@kedem/okdb 1.6.2 → 1.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/okdb.js +1 -1
- package/okdb.js +1 -1
- package/package.json +1 -1
package/bin/okdb.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
'use strict';const _0x538f61=_0x44a0;(function(_0x31dffb,_0x1e1a7d){const _0x2942a4=_0x44a0,_0x5de995=_0x31dffb();while(!![]){try{const _0x2c488b=parseInt(_0x2942a4(0x405))/0x1+-parseInt(_0x2942a4(0x1f7))/0x2*(-parseInt(_0x2942a4(0x2d2))/0x3)+parseInt(_0x2942a4(0x35d))/0x4*(parseInt(_0x2942a4(0x20f))/0x5)+-parseInt(_0x2942a4(0x38d))/0x6+-parseInt(_0x2942a4(0x40b))/0x7+parseInt(_0x2942a4(0x2bd))/0x8*(-parseInt(_0x2942a4(0x299))/0x9)+parseInt(_0x2942a4(0x386))/0xa*(-parseInt(_0x2942a4(0x1b5))/0xb);if(_0x2c488b===_0x1e1a7d)break;else _0x5de995['push'](_0x5de995['shift']());}catch(_0x7c6956){_0x5de995['push'](_0x5de995['shift']());}}}(_0x52d5,0x90b46));var require$$1$1=require(_0x538f61(0x3c3)),require$$1=require('fs'),require$$3=require(_0x538f61(0x25f)),require$$0$2=require(_0x538f61(0x45e)),require$$5=require(_0x538f61(0x246)),require$$0=require(_0x538f61(0x451)),require$$0$1=require(_0x538f61(0x341)),require$$2$1=require('os'),require$$4=require(_0x538f61(0x349));function getDefaultExportFromCjs(_0x1abbcd){const _0x406f4f=_0x538f61;return _0x1abbcd&&_0x1abbcd[_0x406f4f(0x35c)]&&Object[_0x406f4f(0x376)]['hasOwnProperty'][_0x406f4f(0x248)](_0x1abbcd,_0x406f4f(0x200))?_0x1abbcd[_0x406f4f(0x200)]:_0x1abbcd;}var okdb$1={},version='1.6.2',require$$2={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x1373c9=require$$0;function _0x3d8842(_0x16e0ff,_0x37b8ad){const _0x27f552=_0x44a0;return _0x1373c9[_0x27f552(0x474)]('sha256',_0x37b8ad)[_0x27f552(0x2c5)](_0x16e0ff)[_0x27f552(0x1dc)]('base64url');}function _0x3edbf1(_0x54514a,_0x104c27){const _0x1ea4d4=_0x44a0;if(typeof _0x54514a!==_0x1ea4d4(0x373)||typeof _0x104c27!==_0x1ea4d4(0x373))return![];if(Buffer[_0x1ea4d4(0x466)](_0x54514a)!==Buffer[_0x1ea4d4(0x466)](_0x104c27))return![];return _0x1373c9[_0x1ea4d4(0x33d)](Buffer[_0x1ea4d4(0x252)](_0x54514a),Buffer['from'](_0x104c27));}function _0x183f2d(_0x372790){const _0x5045a2=_0x44a0;if(!_0x372790?.['startsWith'](_0x5045a2(0x3ef)))return null;return _0x372790[_0x5045a2(0x1c2)](0x7);}function _0x550ad0(_0x19ed25=0x20){const _0x3d8646=_0x44a0;return _0x1373c9[_0x3d8646(0x394)](_0x19ed25)[_0x3d8646(0x449)](_0x3d8646(0x1f8));}function _0x250ab9(_0x2abb93){const _0x2eb6b6=_0x44a0;return _0x1373c9['createHash'](_0x2eb6b6(0x2a3))['update'](_0x2abb93)[_0x2eb6b6(0x1dc)](_0x2eb6b6(0x269));}function _0x1c8624(_0x3a7a58,_0xd1118f,_0x4bceb4=0x36ee80){const _0x4e24e=_0x44a0;if(!_0xd1118f)throw new Error('Token\x20secret\x20not\x20configured');const _0x4b90af=Date['now'](),_0x4962af=Buffer[_0x4e24e(0x252)](JSON['stringify']({'iat':_0x4b90af,'exp':_0x4b90af+_0x4bceb4,'sub':_0x3a7a58?.['id']??_0x3a7a58?.[_0x4e24e(0x3f2)]??null,'username':_0x3a7a58?.[_0x4e24e(0x1e5)]??_0x3a7a58?.[_0x4e24e(0x2b5)]??null,'roles':Array[_0x4e24e(0x27d)](_0x3a7a58?.[_0x4e24e(0x369)])?_0x3a7a58[_0x4e24e(0x369)]:[]}))[_0x4e24e(0x449)](_0x4e24e(0x1f8)),_0x5ea42a=_0x3d8842(_0x4962af,_0xd1118f);return _0x4962af+'.'+_0x5ea42a;}function _0x4c14e9(_0x5900a8,_0x558954){const _0x3af6ae=_0x44a0;if(!_0x558954||typeof _0x5900a8!==_0x3af6ae(0x373))return null;const [_0x151054,_0x58eb15]=_0x5900a8['split']('.');if(!_0x151054||!_0x58eb15)return null;const _0x522abc=_0x3d8842(_0x151054,_0x558954);if(!_0x3edbf1(_0x58eb15,_0x522abc))return null;try{const _0x264bd4=JSON['parse'](Buffer[_0x3af6ae(0x252)](_0x151054,_0x3af6ae(0x1f8))['toString']()),_0x28198c=0x7530;if(Date[_0x3af6ae(0x311)]()>Number(_0x264bd4?.[_0x3af6ae(0x239)]??0x0)+_0x28198c)return null;return _0x264bd4;}catch{return null;}}async function _0x422777(_0x20fd5b){return new Promise((_0x1657c8,_0x59a646)=>{const _0x4a1383=_0x44a0,_0x5564a8=_0x1373c9[_0x4a1383(0x394)](0x10);_0x1373c9[_0x4a1383(0x20b)](_0x20fd5b,_0x5564a8,0x40,(_0x4fcba3,_0x185054)=>{const _0xfe82d0=_0x4a1383;if(_0x4fcba3)_0x59a646(_0x4fcba3);_0x1657c8(_0x5564a8[_0xfe82d0(0x449)](_0xfe82d0(0x269))+':'+_0x185054[_0xfe82d0(0x449)](_0xfe82d0(0x269)));});});}async function _0x5f026e(_0x9427f1,_0x55d431){const _0x22ceb6=_0x44a0,[_0x1b5f08,_0x4c2f32]=_0x55d431['split'](':');if(!_0x1b5f08||!_0x4c2f32)return![];const _0x52bec5=Buffer[_0x22ceb6(0x252)](_0x1b5f08,_0x22ceb6(0x269));return new Promise((_0x12698a,_0x138002)=>{const _0x1282c2=_0x22ceb6;_0x1373c9[_0x1282c2(0x20b)](_0x9427f1,_0x52bec5,0x40,(_0x1ab860,_0x117940)=>{const _0x26945b=_0x1282c2;if(_0x1ab860)_0x138002(_0x1ab860);_0x12698a(_0x1373c9['timingSafeEqual'](_0x117940,Buffer[_0x26945b(0x252)](_0x4c2f32,_0x26945b(0x269))));});});}return okdbAuthTokens={'hmac':_0x3d8842,'timingSafeEqual':_0x3edbf1,'parseBearer':_0x183f2d,'randomToken':_0x550ad0,'hashToken':_0x250ab9,'issueToken':_0x1c8624,'authenticateToken':_0x4c14e9,'hashPassword':_0x422777,'verifyPassword':_0x5f026e},okdbAuthTokens;}function _0x44a0(_0x2ca66d,_0x555599){_0x2ca66d=_0x2ca66d-0x1b1;const _0x52d55b=_0x52d5();let _0x44a0f7=_0x52d55b[_0x2ca66d];return _0x44a0f7;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x3fc48d=_0x538f61;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x5bd276=require$$0$1,_0x13dae6=_0x3fc48d(0x201),_0x39e999=new Uint8Array(0x100)[_0x3fc48d(0x486)](0xff);for(let _0x301461=0x0;_0x301461<_0x13dae6['length'];_0x301461++){_0x39e999[_0x13dae6[_0x3fc48d(0x22e)](_0x301461)]=_0x301461,_0x39e999[_0x13dae6[_0x3fc48d(0x22e)](_0x301461)+0x20]=_0x301461;}_0x39e999['O'[_0x3fc48d(0x22e)](0x0)]=0x0,_0x39e999['o'[_0x3fc48d(0x22e)](0x0)]=0x0,_0x39e999['I'['charCodeAt'](0x0)]=0x1,_0x39e999['i'['charCodeAt'](0x0)]=0x1,_0x39e999['L'[_0x3fc48d(0x22e)](0x0)]=0x1,_0x39e999['l'[_0x3fc48d(0x22e)](0x0)]=0x1;function _0x17aa5d(_0x5c170b){let _0x3bdbbd=0x0,_0x39b4b4=0x0,_0x37862b='';for(let _0x31c79e=0x0;_0x31c79e<_0x5c170b['length'];_0x31c79e++){_0x39b4b4=_0x39b4b4<<0x8|_0x5c170b[_0x31c79e],_0x3bdbbd+=0x8;while(_0x3bdbbd>=0x5){_0x3bdbbd-=0x5,_0x37862b+=_0x13dae6[_0x39b4b4>>>_0x3bdbbd&0x1f];}}return _0x3bdbbd>0x0&&(_0x37862b+=_0x13dae6[_0x39b4b4<<0x5-_0x3bdbbd&0x1f]),_0x37862b;}function _0x529e94(_0xf52574){const _0x163dd6=_0x3fc48d;_0xf52574=_0xf52574[_0x163dd6(0x279)](/-/g,'')['toUpperCase']();let _0x4ec64a=0x0,_0x11cc1f=0x0;const _0x319082=[];for(let _0x9d9355=0x0;_0x9d9355<_0xf52574[_0x163dd6(0x48c)];_0x9d9355++){const _0x371019=_0x39e999[_0xf52574[_0x163dd6(0x22e)](_0x9d9355)];if(_0x371019===0xff)continue;_0x11cc1f=_0x11cc1f<<0x5|_0x371019,_0x4ec64a+=0x5,_0x4ec64a>=0x8&&(_0x4ec64a-=0x8,_0x319082[_0x163dd6(0x488)](_0x11cc1f>>>_0x4ec64a&0xff));}return Buffer[_0x163dd6(0x252)](_0x319082);}const _0x33a4fb=[_0x3fc48d(0x346),_0x3fc48d(0x3db),'engines',_0x3fc48d(0x243),_0x3fc48d(0x2a6),_0x3fc48d(0x1c4),_0x3fc48d(0x44b),_0x3fc48d(0x47a)],_0x181c54=0x0,_0x346139=0x1,_0x42001a=0x2,_0x4edd1c=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x34fda2({issuedAt:_0x323e44,expiresAt:_0x56c7bd,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x181c54}){const _0x118585=_0x3fc48d,_0x3344d1=Buffer[_0x118585(0x252)](licensee,_0x118585(0x484))[_0x118585(0x1c2)](0x0,0x40),_0x2c2242=0x1+0x1+0x4+0x4+0x1+_0x3344d1[_0x118585(0x48c)]+0x2+0x10,_0x2f651c=Buffer['allocUnsafe'](_0x2c2242);let _0xd23f5f=0x0;_0x2f651c[_0x118585(0x41f)](0x1,_0xd23f5f++),_0x2f651c[_0x118585(0x41f)](licenseType,_0xd23f5f++),_0x2f651c[_0x118585(0x41c)](Math[_0x118585(0x222)](_0x323e44/0x3e8),_0xd23f5f),_0xd23f5f+=0x4,_0x2f651c['writeUInt32BE'](Math[_0x118585(0x222)](_0x56c7bd/0x3e8),_0xd23f5f),_0xd23f5f+=0x4,_0x2f651c[_0x118585(0x41f)](_0x3344d1[_0x118585(0x48c)],_0xd23f5f++),_0x3344d1[_0x118585(0x284)](_0x2f651c,_0xd23f5f),_0xd23f5f+=_0x3344d1['length'];let _0x1a7ecc=0x0;for(let _0x134204=0x0;_0x134204<_0x33a4fb['length'];_0x134204++){if(features[_0x33a4fb[_0x134204]])_0x1a7ecc|=0x1<<_0x134204;}_0x2f651c['writeUInt16BE'](_0x1a7ecc,_0xd23f5f),_0xd23f5f+=0x2;const _0x1c2e80=[_0x118585(0x431),_0x118585(0x388),_0x118585(0x215),_0x118585(0x1b3)];for(const _0x1686fe of _0x1c2e80){_0x2f651c['writeUInt32BE'](limits[_0x1686fe]||0x0,_0xd23f5f),_0xd23f5f+=0x4;}return _0x2f651c;}function _0x228933(_0x48259b){const _0x47d5c8=_0x3fc48d;let _0x2a45d5=0x0;const _0x4ba34d=_0x48259b[_0x47d5c8(0x3c8)](_0x2a45d5++),_0x47f8c6=_0x48259b[_0x47d5c8(0x3c8)](_0x2a45d5++),_0x5e1cc1=_0x48259b['readUInt32BE'](_0x2a45d5);_0x2a45d5+=0x4;const _0x3a1151=_0x48259b[_0x47d5c8(0x1cc)](_0x2a45d5);_0x2a45d5+=0x4;const _0x57bd19=_0x48259b['readUInt8'](_0x2a45d5++),_0x13782a=_0x48259b[_0x47d5c8(0x1c2)](_0x2a45d5,_0x2a45d5+_0x57bd19)[_0x47d5c8(0x449)](_0x47d5c8(0x484));_0x2a45d5+=_0x57bd19;const _0x2318bd=_0x48259b[_0x47d5c8(0x2ec)](_0x2a45d5);_0x2a45d5+=0x2;const _0x448004={};for(let _0x1eb864=0x0;_0x1eb864<_0x33a4fb[_0x47d5c8(0x48c)];_0x1eb864++){_0x448004[_0x33a4fb[_0x1eb864]]=Boolean(_0x2318bd&0x1<<_0x1eb864);}const _0x1a2ca8=[_0x47d5c8(0x431),_0x47d5c8(0x388),'syncPeers','maxWrites'],_0x393ce1={};for(const _0x3a937c of _0x1a2ca8){const _0x4ee044=_0x48259b[_0x47d5c8(0x1cc)](_0x2a45d5);_0x2a45d5+=0x4,_0x393ce1[_0x3a937c]=_0x4ee044===0x0?null:_0x4ee044;}return{'v':_0x4ba34d,'licenseType':_0x47f8c6,'issuedAt':_0x5e1cc1*0x3e8,'expiresAt':_0x3a1151*0x3e8,'licensee':_0x13782a,'features':_0x448004,'limits':_0x393ce1};}function _0x5f36a9(_0x5d85b4,_0x4e2beb){const _0x7acce4=_0x3fc48d,_0x4b3fab=Buffer[_0x7acce4(0x42f)]([_0x5d85b4,_0x4e2beb]),_0x530c39=_0x17aa5d(_0x4b3fab),_0x5af057=[];for(let _0x18c376=0x0;_0x18c376<_0x530c39[_0x7acce4(0x48c)];_0x18c376+=0x8){_0x5af057[_0x7acce4(0x488)](_0x530c39['slice'](_0x18c376,_0x18c376+0x8));}return _0x5af057[_0x7acce4(0x2d8)]('-');}function _0x224ce0(_0x199eab){const _0x38862a=_0x3fc48d;if(typeof _0x199eab!==_0x38862a(0x373))throw new Error(_0x38862a(0x1dd));const _0x578034=_0x529e94(_0x199eab[_0x38862a(0x279)](/-/g,''));if(_0x578034[_0x38862a(0x48c)]<0x41)throw new Error(_0x38862a(0x1d1)+_0x578034[_0x38862a(0x48c)]+'\x20bytes,\x20need\x20>=\x2065)');const _0x39dc0a=_0x578034[_0x38862a(0x1c2)](0x0,_0x578034[_0x38862a(0x48c)]-0x40),_0x44d7ab=_0x578034['slice'](_0x578034[_0x38862a(0x48c)]-0x40);let _0x25d0d8;try{_0x25d0d8=_0x228933(_0x39dc0a);}catch(_0x43f593){throw new Error('decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20'+_0x43f593[_0x38862a(0x2a5)]);}return{'rawBuf':_0x578034,'payload':_0x39dc0a,'sig':_0x44d7ab,'decoded':_0x25d0d8};}function _0x2f2d00(_0x22b44d){const _0x45dd34=_0x3fc48d;return _0x5bd276[_0x45dd34(0x318)](_0x45dd34(0x2a3))[_0x45dd34(0x2c5)](_0x22b44d)[_0x45dd34(0x1dc)]()[_0x45dd34(0x1c2)](0x0,0x8);}function _0x3a90fc(_0x1e89b3,_0x6ab5c4,_0x418031){const _0x14a5e4=_0x3fc48d,_0x5997a6=_0x14a5e4(0x242)+_0x418031,_0x2adb0a=Buffer[_0x14a5e4(0x42f)]([Buffer[_0x14a5e4(0x252)](_0x1e89b3,_0x14a5e4(0x484)),_0x6ab5c4]),_0x382fab=_0x5bd276[_0x14a5e4(0x474)](_0x14a5e4(0x2a3),_0x5997a6)['update'](_0x2adb0a)[_0x14a5e4(0x1dc)](),_0xfa64d3=_0x17aa5d(_0x382fab[_0x14a5e4(0x1c2)](0x0,0x5));return{'pin':_0xfa64d3,'pinHmac':_0x382fab};}function _0x222db6(_0x296389,_0x7631a6,_0x5151a7){const _0x547b18=_0x3fc48d,_0x47d806=Buffer[_0x547b18(0x355)](0x4d);let _0x1413ae=0x0;_0x47d806[_0x547b18(0x41f)](0x1,_0x1413ae++),_0x296389[_0x547b18(0x284)](_0x47d806,_0x1413ae),_0x1413ae+=0x8,_0x47d806[_0x547b18(0x41c)](_0x7631a6,_0x1413ae),_0x1413ae+=0x4,_0x5151a7[_0x547b18(0x284)](_0x47d806,_0x1413ae);const _0x1fa201=_0x17aa5d(_0x47d806),_0x13184d=[];for(let _0x6ea1a2=0x0;_0x6ea1a2<_0x1fa201[_0x547b18(0x48c)];_0x6ea1a2+=0x6){_0x13184d[_0x547b18(0x488)](_0x1fa201[_0x547b18(0x1c2)](_0x6ea1a2,_0x6ea1a2+0x6));}return _0x13184d[_0x547b18(0x2d8)]('-');}function _0x3843da(_0x303763){const _0x2c5db8=_0x3fc48d;if(typeof _0x303763!=='string')throw new Error(_0x2c5db8(0x3f9));const _0x4ddc16=_0x529e94(_0x303763['replace'](/-/g,''));if(_0x4ddc16[_0x2c5db8(0x48c)]!==0x4d)throw new Error('decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20'+_0x4ddc16[_0x2c5db8(0x48c)]);let _0x47378c=0x0;const _0x592c82=_0x4ddc16[_0x2c5db8(0x3c8)](_0x47378c++),_0x467e64=_0x4ddc16[_0x2c5db8(0x1c2)](_0x47378c,_0x47378c+0x8);_0x47378c+=0x8;const _0x24b086=_0x4ddc16[_0x2c5db8(0x1cc)](_0x47378c);_0x47378c+=0x4;const _0x214fd8=_0x4ddc16[_0x2c5db8(0x1c2)](_0x47378c);return{'v':_0x592c82,'licenseHash':_0x467e64,'expiry':_0x24b086,'sig':_0x214fd8};}function _0x4df930({tokenString:_0x22d01e,nodeId:_0x529dd7,rawBlobBuf:_0x4deac2,pubKeyPem:_0x3646c3,pubFingerprint:_0x43b9b7}){const _0x563f80=_0x3fc48d;let _0x31ccc1;try{_0x31ccc1=_0x3843da(_0x22d01e);}catch(_0x2cbb9d){return{'valid':![],'reason':'MALFORMED_TOKEN'};}const _0x1ee466=_0x2f2d00(_0x4deac2);if(!_0x1ee466['equals'](_0x31ccc1[_0x563f80(0x22b)]))return{'valid':![],'reason':_0x563f80(0x27b)};const {pinHmac:_0x53c645}=_0x3a90fc(_0x529dd7,_0x1ee466,_0x43b9b7),_0x554e18=Buffer[_0x563f80(0x355)](0x4);_0x554e18[_0x563f80(0x41c)](_0x31ccc1[_0x563f80(0x39a)],0x0);const _0x55df06=Buffer[_0x563f80(0x42f)]([Buffer['from']([_0x31ccc1['v']]),_0x53c645[_0x563f80(0x1c2)](0x0,0x5),_0x31ccc1[_0x563f80(0x22b)],_0x554e18]);try{const _0x4a7cfe=_0x5bd276['verify'](null,_0x55df06,_0x3646c3,_0x31ccc1['sig']);if(!_0x4a7cfe)return{'valid':![],'reason':_0x563f80(0x2a7)};}catch(_0x2a3350){return{'valid':![],'reason':'SIG_INVALID'};}if(_0x31ccc1[_0x563f80(0x39a)]<Date[_0x563f80(0x311)]()/0x3e8)return{'valid':![],'reason':_0x563f80(0x34a)};return{'valid':!![],'reason':'ok'};}function _0x520397(_0x27b13f){const _0xb720ae=_0x3fc48d;if(typeof _0x27b13f!=='string')return _0xb720ae(0x273);const _0x3a52d7=_0x27b13f[_0xb720ae(0x34d)]();if(_0x3a52d7[_0xb720ae(0x424)]('/')||_0x3a52d7[_0xb720ae(0x424)]('./')||_0x3a52d7[_0xb720ae(0x424)](_0xb720ae(0x26c))||/^[A-Za-z]:[\\/]/[_0xb720ae(0x320)](_0x3a52d7))return _0xb720ae(0x3c3);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0xb720ae(0x320)](_0x3a52d7))return _0xb720ae(0x3cd);const _0xdf5035=_0x3a52d7[_0xb720ae(0x279)](/[\s-]+/g,'')[_0xb720ae(0x48c)];if(_0xdf5035===0x7c)return _0xb720ae(0x3a9);if(_0xdf5035>=0x95&&_0xdf5035<=0xfc)return _0xb720ae(0x283);return _0xb720ae(0x273);}return okdbLicenseCodec={'toBase32':_0x17aa5d,'fromBase32':_0x529e94,'encodeLicensePayload':_0x34fda2,'decodeLicensePayload':_0x228933,'encodeLicenseBlob':_0x5f36a9,'decodeLicenseBlob':_0x224ce0,'licenseHash':_0x2f2d00,'derivePin':_0x3a90fc,'encodeActivationToken':_0x222db6,'decodeActivationToken':_0x3843da,'verifyActivation':_0x4df930,'detectInputType':_0x520397,'FEATURE_NAMES':_0x33a4fb,'LICENSE_TYPE_STANDARD':_0x181c54,'LICENSE_TYPE_OPEN':_0x346139,'LICENSE_TYPE_INTERNAL':_0x42001a,'OPEN_LICENSE_MAX_DURATION_MS':_0x4edd1c},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x519e23 extends Error{constructor(_0x5cc48c,_0x267260,_0x16c9a5={}){const _0x3923e0=_0x44a0;super(_0x5cc48c),this['name']=_0x3923e0(0x258),this[_0x3923e0(0x2d7)]=_0x267260,this[_0x3923e0(0x367)]=_0x16c9a5,_0x16c9a5[_0x3923e0(0x3d5)]&&(this[_0x3923e0(0x3d5)]=_0x16c9a5[_0x3923e0(0x3d5)]),Error[_0x3923e0(0x478)](this,this[_0x3923e0(0x457)]);}}class _0x139364 extends _0x519e23{constructor(_0x44fcac,_0x44c5e2,_0x444d19,_0xfff964){const _0x2d26a1=_0x44a0;super('Version\x20mismatch\x20for\x20'+_0x44fcac+'@'+_0x44c5e2+_0x2d26a1(0x4ae)+_0x444d19+_0x2d26a1(0x3c9)+_0xfff964,'VERSION_MISMATCH',{'type':_0x44fcac,'key':_0x44c5e2,'expectedVersion':_0x444d19,'actualVersion':_0xfff964}),this['name']='OKDBVersionMismatchError';}}class _0x4eea25 extends _0x519e23{constructor(_0x1ccca0,_0x1fe5e0){const _0x4177b7=_0x44a0;super(_0x1ccca0+'@'+_0x1fe5e0+_0x4177b7(0x2c3),'NOT_FOUND',{'type':_0x1ccca0,'key':_0x1fe5e0}),this[_0x4177b7(0x2b5)]=_0x4177b7(0x1ec);}}class _0x129a9a extends _0x519e23{constructor(_0x214c5e,_0x2feb53){const _0x1a8b5a=_0x44a0;super(_0x214c5e+'@'+_0x2feb53+_0x1a8b5a(0x45a),'ALREADY_EXISTS',{'type':_0x214c5e,'key':_0x2feb53}),this['name']=_0x1a8b5a(0x228);}}class _0x21b174 extends _0x519e23{constructor(_0x18ffe3,_0x4615a5){const _0x42fa94=_0x44a0,_0x1d075e=typeof _0x4615a5;super(_0x42fa94(0x251)+_0x18ffe3+_0x42fa94(0x459)+_0x1d075e+'.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20'+_0x4615a5,'INVALID_INDEX_KEY',{'index':_0x18ffe3,'key':_0x4615a5,'keyType':_0x1d075e}),this[_0x42fa94(0x2b5)]=_0x42fa94(0x44f);}}class _0x13df89 extends _0x519e23{constructor(_0x2db62c){const _0x32c479=_0x44a0,_0x44bd45=typeof _0x2db62c;super(_0x32c479(0x212)+_0x44bd45+'.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20'+_0x2db62c,_0x32c479(0x1c1),{'key':_0x2db62c,'keyType':_0x44bd45}),this['name']=_0x32c479(0x3d3);}}class _0x2b79a0 extends _0x519e23{constructor(_0x5856da){const _0x3e5ad2=_0x44a0;super(_0x3e5ad2(0x3d1)+_0x5856da+'\x27\x20doesn\x27t\x20exist',_0x3e5ad2(0x446),{'type':_0x5856da}),this[_0x3e5ad2(0x2b5)]=_0x3e5ad2(0x220);}}class _0x17cdd2 extends _0x519e23{constructor(_0x3de509){const _0x48536c=_0x44a0;super(_0x48536c(0x3d1)+_0x3de509+'\x27\x20already\x20registered',_0x48536c(0x372),{'type':_0x3de509}),this[_0x48536c(0x2b5)]=_0x48536c(0x27c);}}class _0x239d8e extends _0x519e23{constructor(_0x470622,_0x32f30e){const _0x3c0218=_0x44a0;super(_0x3c0218(0x436)+_0x32f30e+_0x3c0218(0x2f8)+_0x470622+'\x27\x20doesn\x27t\x20exist','INDEX_NOT_REGISTERED',{'type':_0x470622,'index':_0x32f30e}),this[_0x3c0218(0x2b5)]=_0x3c0218(0x470);}}class _0x56bade extends _0x519e23{constructor(_0x4b66e2,_0x4f9f0e){const _0x352498=_0x44a0;super(_0x352498(0x436)+_0x4f9f0e+_0x352498(0x2f8)+_0x4b66e2+_0x352498(0x24c),_0x352498(0x483),{'type':_0x4b66e2,'index':_0x4f9f0e}),this[_0x352498(0x2b5)]=_0x352498(0x335);}}class _0x93e817 extends _0x519e23{constructor(_0xbbeb6d,_0x3ad4a5={}){const _0x5cc5ba=_0x44a0;super(_0xbbeb6d,_0x5cc5ba(0x2b9),_0x3ad4a5),this[_0x5cc5ba(0x2b5)]=_0x5cc5ba(0x402);}}class _0x3287b1 extends _0x519e23{constructor(_0x2b88f7,_0x4e6cc3,_0x171665,_0x304781,_0x800c06){const _0x3671a3=_0x44a0;super(_0x3671a3(0x36e)+_0x2b88f7+'@'+_0x4e6cc3+':\x20key\x20['+_0x171665+']\x20already\x20maps\x20to\x20\x27'+_0x304781+_0x3671a3(0x468)+_0x800c06+'\x27',_0x3671a3(0x390),{'type':_0x2b88f7,'index':_0x4e6cc3,'indexKey':_0x171665,'existingKey':_0x304781,'conflictingKey':_0x800c06}),this[_0x3671a3(0x2b5)]=_0x3671a3(0x1d0);}}class _0x5d9ada extends _0x519e23{constructor(_0x7bd7e5,_0x3fb7aa,_0x52ac34){const _0x44cbe6=_0x44a0;super(_0x44cbe6(0x2b0)+_0x7bd7e5+'@'+_0x3fb7aa,_0x44cbe6(0x1fd),{'type':_0x7bd7e5,'key':_0x3fb7aa,'errors':_0x52ac34}),this[_0x44cbe6(0x2b5)]=_0x44cbe6(0x270),this['type']=_0x7bd7e5,this[_0x44cbe6(0x22c)]=_0x3fb7aa,this['errors']=_0x52ac34;}}class _0x3239e9 extends _0x519e23{constructor(_0x564ad6,_0x3cae2e){const _0x3919a2=_0x44a0;super(_0x3919a2(0x475)+_0x564ad6+':\x20'+_0x3cae2e['length']+_0x3919a2(0x1b9),'SCHEMA_COLLECTION_INVALID',{'type':_0x564ad6,'failures':_0x3cae2e}),this[_0x3919a2(0x2b5)]='OKDBSchemaCollectionError',this[_0x3919a2(0x398)]=_0x564ad6,this[_0x3919a2(0x37b)]=_0x3cae2e;}}class _0x3fb43f extends _0x519e23{constructor(_0x1945f6,_0x2b30d0,_0x1fa56b,_0x50761c,_0x4e92e6){const _0x54e697=_0x44a0;super('Foreign\x20key\x20violation:\x20'+_0x1945f6+'@'+_0x2b30d0+'.'+_0x1fa56b+_0x54e697(0x26f)+_0x50761c+'@'+_0x4e92e6+_0x54e697(0x29d),'FOREIGN_KEY_VIOLATION',{'sourceType':_0x1945f6,'sourceKey':_0x2b30d0,'fieldPath':_0x1fa56b,'targetType':_0x50761c,'targetKey':_0x4e92e6}),this[_0x54e697(0x2b5)]='OKDBForeignKeyError',this[_0x54e697(0x1f2)]=_0x1945f6,this[_0x54e697(0x25a)]=_0x2b30d0,this[_0x54e697(0x25c)]=_0x1fa56b,this['targetType']=_0x50761c,this[_0x54e697(0x1d5)]=_0x4e92e6;}}class _0x463e7c extends _0x519e23{constructor(_0x24cd30,_0x33f22f,_0x545dfd){const _0x584b23=_0x44a0;super('Cannot\x20delete\x20'+_0x24cd30+'@'+_0x33f22f+':\x20'+_0x545dfd['length']+_0x584b23(0x216),'FOREIGN_KEY_DELETE_RESTRICTED',{'targetType':_0x24cd30,'targetKey':_0x33f22f,'references':_0x545dfd}),this[_0x584b23(0x2b5)]=_0x584b23(0x24f),this[_0x584b23(0x331)]=_0x24cd30,this[_0x584b23(0x1d5)]=_0x33f22f,this[_0x584b23(0x421)]=_0x545dfd;}}class _0x4be49b extends _0x519e23{constructor(_0xc636a8,_0x444a3e,_0x1c3955){const _0x243d21=_0x44a0;super('Index\x20\x22'+_0x444a3e+_0x243d21(0x33f)+_0xc636a8+'\x22\x20is\x20used\x20by:\x20'+_0x1c3955[_0x243d21(0x308)](_0x4eaff5=>_0x4eaff5[_0x243d21(0x217)]+':'+_0x4eaff5[_0x243d21(0x2b5)])[_0x243d21(0x2d8)](',\x20'),_0x243d21(0x2a4),{'type':_0xc636a8,'index':_0x444a3e,'usedBy':_0x1c3955}),this[_0x243d21(0x2b5)]=_0x243d21(0x400);}}return okdbError={'OKDBError':_0x519e23,'OKDBVersionMismatchError':_0x139364,'OKDBNotFoundError':_0x4eea25,'OKDBAlreadyExistsError':_0x129a9a,'OKDBInvalidIndexKeyError':_0x21b174,'OKDBInvalidPrimaryKeyError':_0x13df89,'OKDBTypeNotRegisteredError':_0x2b79a0,'OKDBTypeAlreadyRegisteredError':_0x17cdd2,'OKDBIndexNotRegisteredError':_0x239d8e,'OKDBIndexAlreadyRegisteredError':_0x56bade,'OKDBInvalidValueError':_0x93e817,'OKDBUniqueConstraintError':_0x3287b1,'OKDBSchemaValidationError':_0x5d9ada,'OKDBSchemaCollectionError':_0x3239e9,'OKDBForeignKeyError':_0x3fb43f,'OKDBForeignKeyDeleteError':_0x463e7c,'OKDBIndexHasConsumersError':_0x4be49b},okdbError;}function _0x52d5(){const _0x14c759=['count','\x20\x20Path\x20access','decoded','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','licenseId','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','every','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','readUInt16BE','Sync','getRange','--key','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','wrong_node','darwin','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','doctor','ceil','CREATED','yellow','\x27\x20on\x20type\x20\x27','--config','\x20\x20(unlimited)','selfAddress','[body]','index:progress','_active','Types','PATCH','access','\x20/\x20','\x20more','verifyActivation','val','EXIT','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','map','summary','{}[]:,\x0a\x0d\x09\x20','[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping','\x0a\x20\x20\x20\x20','stderr','_isFree','_systemEnv','type/users/item/alice','now','info','stdout','filter','queue','--log-level','\x1b[34m','createHash','noRepl','--path','addedAt','processors/','typeSubDbs','rmSync','other','test','children','(none)','enabled','SIGTERM','drop','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','param','Processors','once','\x20MB)','(on\x20any\x20path\x20command)','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','getPins','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','stopping','~tokens','targetType','\x20(must\x20be\x201–65535)','halted','addLicense','OKDBIndexAlreadyRegisteredError','\x20records…','operation',',\x20label:\x20','Full-text\x20search','USE','title','inputSchema','timingSafeEqual','derivePin','\x22\x20on\x20\x22','keys/public.pem','node:crypto','Activation\x20invalid:\x20','create','\x20\x20✓\x20database\x20opened\x0a','unique:violation','sync','type/users/item/alice\x20--env\x20staging','\x0a\x20\x20Invalid\x20JSON:\x20','child_process','ACTIVATION_EXPIRED','set','history','trim','xdg-open\x20','License\x20expired\x20or\x20invalidated','registerType','--name','finally','listen','\x20day(s).','allocUnsafe','(no\x20types)','--types','_envs','\x20result','.okdb-write-test','logRequests','__esModule','1492qvgUip','\x20\x20\x20\x20licensee:\x20\x20','VERB','valid','\x0a[okdb]\x20error:\x20','\x22\x20→\x20','pending','\x20\x20\x20\x20','schema:set','\x20\x20·\x20','details','\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','roles','starting','types:','\x20(expires\x20','free\x20tier','Unique\x20constraint\x20violated\x20on\x20','admin','\x0a[okdb]\x20shutting\x20down…\x0a','isFile','TYPE_ALREADY_REGISTERED','string','created','--permissions','prototype','\x1b[31m','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','stringify','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','failures','env:removed','engines','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','\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','expires','.kdb_history','resetIndex','tags','values','__OKDB_PUB_FINGERPRINT__','10180BKdyVw','\x20\x20\x20\x20graceful\x20shutdown\x0a','typesPerEnv','readFileSync','\x20\x20\x20\x20\x20\x20','rawBuf','\x20logs\x20on\x20\x20','5032602pSClRy','indexToDb','invalid','UNIQUE_CONSTRAINT','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','dropSchema','item:update','randomBytes','auth','licenseType','terminal','type','http://localhost:','expiry','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','http','__writeCounter','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','\x22\x20already\x20exists','[okdb]\x20opening\x20','\x1b[33m','level','Indexes','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','\x20\x20⚠','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','\x20environment\x20','\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)','activation','./okdb-export.ndjson','\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','setPrompt','hint','[okdb]\x20exporting\x20env\x20\x22','\x20\x20@','Environments','loadEnvFile','indexes','envs=','ready','port\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','unlinkSync','\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','.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22','\x1b[2m','\x0a\x20\x20Joining\x20cluster\x20at\x20','./okdb-backup','/type/users/query\x0a\x20\x20\x20\x20','records','/type/users/item/alice\x0a\x20\x20\x20\x20','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','types/env=','path','onLicenseExpired','statSync','dim','catch','readUInt8',',\x20got\x20','env','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','permissions','uuid','system:drain','repeat','data','Type\x20\x27','license:activated','OKDBInvalidPrimaryKeyError','env:opened','cause','homedir','hasType','toLocaleString','init','--port','embeddings','dirname','schema:drop','Queue','label','value','clearTtl','exportToFile','[okdb]\x20import\x20complete','LICENSED_BUILD','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','resolve','list','No\x20tokens.','LABEL','\x20\x20(need\x20≥\x2018)','safety','database\x20path\x20not\x20writable:\x20','\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','--token','Bearer\x20','[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20','\x20\x20Common\x20causes:','sub','--password','\x20SECURITY\x20NOTICE','\x20env','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','--blobs','entries','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','setSchema','\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/','keys','has','detectInputType','OKDBIndexHasConsumersError','false','OKDBInvalidValueError','LICENSE_INVALID','--ttl','1071663VxsvCX','Files','transport','\x20\x20\x20\x20\x20http://localhost:','env/:env','ttl','337127GTfsni','reason','\x20\x20\x20\x20writes:\x20\x20\x20\x20','type/users\x20--help','includes','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','listening','input:\x20','yes','--address','\x20(expires\x20in\x20','bold','available','\x20\x20╚═══════════════════════════╝','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','stack','idx:','writeUInt32BE','der','\x1b[0m','writeUInt8','padStart','references','true','\x20\x20All\x20checks\x20passed.\x0a','startsWith','\x22.\x20Use:\x20create,\x20list,\x20revoke','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','migrate','\x20\x20Shell\x20commands','stdin','importFromFile','\x20logs\x20off\x0a','\x1b[35m','shutdown','config','concat','(add\x20a\x20license\x20first)','envs','\x20\x20╔═══════════════════════════╗','[okdb]\x20port\x20','LICENSE_TYPE_OPEN','\x22\x20matches\x20','Index\x20\x27','\x20\x20✓\x20Revoked\x20token\x20','token','mkdirSync','ref:violation','password','then','\x20\x20\x20\x20limits:\x20\x20\x20\x20','logLevel','type/users','active:','\x0d[okdb]\x20','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','pause','id:\x20','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','TYPE_NOT_REGISTERED','type/','[okdb]\x20nothing\x20to\x20reset\x20—\x20','toString','--env','mcp','trimStart','\x20MB\x20→\x20','sizeBefore','OKDBInvalidIndexKeyError','[okdb]\x20loaded\x20config:\x20','crypto','./okdb-data','item:remove','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','item:create','[okdb]\x20error:\x20','constructor','\x0a\x0a\x20\x20','\x27:\x20','\x20already\x20exists','started','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','meta','readline','getCount','open','resetting','indexOf','exit','LOGS','txn:end','byteLength','[okdb]\x20error:\x20failed\x20to\x20read\x20','\x27,\x20cannot\x20map\x20to\x20\x27','randomUUID','/api/env/','\x20\x20Usage:\x20','api','fts:drop','env/staging/info','green','OKDBIndexNotRegisteredError','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','_license','round','createHmac','Cannot\x20set\x20enforce\x20schema\x20on\x20','licensed','pin','captureStackTrace','endsWith','files','\x1b[32m','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','DELETE','options','[okdb]\x20invalid\x20port:\x20','search','fromEntries','\x20\x20\x20\x20status:\x20\x20\x20\x20','INDEX_ALREADY_REGISTERED','utf8','find','fill','sig','push','prompt','already\x20in\x20use','type/users/query\x20{\x22active\x22:true}','length','hasOwnProperty','[filter]','use\x20<env>','cyan','POST','debug','some','--open','padEnd','[okdb]\x20started\x20in\x20','import','\x20\x20\x20\x20expires:\x20\x20\x20','log','isTTY','--no-admin','txn:rollback','--help','registerIndex','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','red','null','split','routes','[okdb]\x20error:\x20--password\x20requires\x20--name','Invalid\x20license\x20blob:\x20','createInterface','\x0d[okdb]\x20blobs:\x20','standard','ttl:clear','expired','database\x20path\x20writable:\x20','\x20\x20\x20\x20path:\x20\x20','TYPES',':\x20expected\x20','License\x20signature\x20invalid:\x20','transaction','activateLicense','maxWrites','argv','5654dRNISH','Hint:\x20','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','result','\x20documents\x20fail\x20validation','dbPath','detachConsole','server','/api/','PUBLIC_KEY_PEM','question','noAdmin','INVALID_PRIMARY_KEY','slice','put','views','sync:apply','no\x20.kdbconfig\x20(using\x20defaults)','license','\x20\x20(','createdAt','licensee','[okdb]\x20created\x20.kdbconfig','readUInt32BE','description','.kdbconfig','time','OKDBUniqueConstraintError','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','LICENSE_ACTIVATION_INVALID','\x20\x20Envs:\x20\x20\x20\x20','reverse','targetKey','(empty)','[okdb]\x20blobs:\x20imported=','\x20\x20·\x20\x20','properties','\x20envs','\x20\x20→\x20\x20','digest','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','type:drop','\x20\x20\x20\x20features:\x20\x20','[okdb]\x20importing\x20','[okdb]\x20unknown\x20token\x20action:\x20\x22','/type/users\x0a\x20\x20\x20\x20','/\x20quit\x20/\x20Ctrl+C','--username','username','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','dynamic','\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-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\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\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','\x0a\x20\x20','createServer','\x20\x20\x20\x20port:\x20\x20','OKDBNotFoundError','decodeLicenseBlob','object','_ensureTokensType','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','address','sourceType','ENV','Shutting\x20down\x20due\x20to\x20license\x20expiry','[env]','HELP','9762rToPJB','base64url','Embeddings','min','ROUTES','--drop','SCHEMA_VALIDATION_FAILED','okdb.pid','toFixed','default','0123456789ABCDEFGHJKMNPQRSTVWXYZ','error','node\x20','write','\x20\x20\x20\x20\x20\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','node','\x20\x20(licensee:\x20','warn','version','PUB_FINGERPRINT','scrypt','forEach','_licenseHash','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','7145gVvIDd','\x20\x20\x20\x20status:\x20\x20\x20\x20active','\x20\x20[','Invalid\x20primary\x20key\x20type:\x20','_computeStatus','expiresAt','syncPeers','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','kind','fts:registered','status','index:registered','port','peers=','/types\x0a\x20\x20\x20\x20','decodeActivationToken','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','OKDBTypeNotRegisteredError','features','floor','Invalid\x20activation\x20token:\x20','recheck','payload','removeLicense','ftsName','OKDBAlreadyExistsError','License\x20limit\x20exceeded:\x20','%),\x20','licenseHash','key','writeFileSync','charCodeAt','current','body:\x20','waiting','/api','\x20\x20✓\x20','\x20\x20✓\x20OKDB\x20server\x20running','blobs','ttl:set','\x20licenses','listRoutes','exp','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','\x20\x20✓\x20http\x20listening\x20on\x20:','\x20deleted','--log-requests','white','\x20\x20\x20\x20\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/','grants','verify','OKDB-PIN-V1:','fts','\x20\x20Error:\x20','\x20\x20Usage:','../okdb','\x20\x20http://localhost:','call','LICENSE_EXPIRED_ACTION','Admin','parse','\x27\x20is\x20already\x20registered','remove','\x20\x20changes=','OKDBForeignKeyDeleteError','okdb','Invalid\x20index\x20key\x20type\x20for\x20\x27','from','STATUS','--env\x20<name>','magenta','exec','line','OKDBError','reload','sourceKey','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','fieldPath','types','platform','net','\x20\x20(name:\x20','Examples','system:bus_state_change','\x20\x20\x20\x20admin:\x20http://localhost:','help','\x20\x20\x20\x20addedAt:\x20\x20\x20','index:ready','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','\x0a\x20\x20No\x20routes\x20matching\x20\x22','hex','revoke','get','../','--version','\x0a\x20\x20okdb\x20doctor\x0a','\x20references\x20','OKDBSchemaValidationError','bind','[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument','unknown','\x20\x20records=','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','issuedAt','replace','[on|off|level]','LICENSE_HASH_MISMATCH','OKDBTypeAlreadyRegisteredError','isArray','license:invalid','\x20\x20\x20\x20\x20\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','PIN','\x22\x20to\x20enable\x20it.','\x20\x20Expected\x20one\x20of:','blob','copy','toUpperCase','OPEN','attach','[okdb]\x20export\x20complete','--grants','txn:start','effective','<path>','\x20\x20skipped=','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','dropping','writes=','toLowerCase','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20\x20','existsSync','method','index:reset','\x0a\x20\x20✓\x20License\x20added','{}[]:,\x27\x22','off','108657BrNJYo','\x20\x20⚠\x20\x20','(unset)','assertLimit','\x20which\x20does\x20not\x20exist','\x20\x20score:','Build\x20expects\x20public\x20key\x20fingerprint\x20','limits','clearLine','[okdb]\x20exporting\x20blobs…','sha256','INDEX_HAS_CONSUMERS','message','timeMachine','SIG_INVALID','dropIndex','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','backup','No\x20license\x20found\x20matching\x20this\x20activation\x20token','\x0a[okdb]\x20fatal\x20error:','system:poke','--label','sizeAfter','Schema\x20validation\x20failed\x20for\x20','gray','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','toISOString','getSecurityNotices','name','logs','env/','start\x20','INVALID_VALUE','dropFts','[okdb]\x20reset:\x20','\x20\x20\x20\x20id:\x20\x20\x20\x20','176uhfPTu','max','\x20\x20\x20\x20usage:\x20\x20\x20','changes','resume','Events','\x20does\x20not\x20exist','PERMISSIONS','update','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','~licenses',')\x20to\x20your\x20license\x20vendor.','\x20to\x20quit.','\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','stopped','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','columns','\x20<path>\x20[json-body]','hidden','\x20writes\x20(','exports','408ffFfjL','active','\x0a\x20\x20✓\x20License\x20activated','export','_lookupByName','code','join','close','pid','\x20records','creating','resetFts','[okdb]\x20reset\x20aborted','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','config\x20file\x20valid:\x20','body','/admin/index.html'];_0x52d5=function(){return _0x14c759;};return _0x52d5();}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x35ca51=_0x538f61;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x56cd79={'PUT':'put','REMOVE':_0x35ca51(0x24d),'INDEX_DROP':_0x35ca51(0x2a8),'INDEX_REGISTER':_0x35ca51(0x49e),'INDEX_RESET':_0x35ca51(0x382),'TYPE_REGISTER':_0x35ca51(0x350),'TYPE_DROP':'dropType','FTS_REGISTER':'registerFts','FTS_DROP':_0x35ca51(0x2ba),'FTS_RESET':_0x35ca51(0x2dd),'SCHEMA_SET':_0x35ca51(0x3fb),'SCHEMA_DROP':_0x35ca51(0x392),'TTL_SET':'setTtl','TTL_CLEAR':_0x35ca51(0x3e1)},_0x54eeee={'SYSTEM_READY':'system:ready','SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x35ca51(0x2ad),'SYSTEM_DRAIN':_0x35ca51(0x3ce),'SYSTEM_BUS_STATE_CHANGE':_0x35ca51(0x262),'ITEM_CREATE':_0x35ca51(0x455),'ITEM_UPDATE':_0x35ca51(0x393),'ITEM_REMOVE':_0x35ca51(0x453),'INDEX_RESET':_0x35ca51(0x295),'INDEX_READY':_0x35ca51(0x266),'INDEX_PROGRESS':_0x35ca51(0x2fd),'INDEX_DROP':'index:drop','INDEX_REGISTERED':_0x35ca51(0x21a),'FTS_REGISTERED':_0x35ca51(0x218),'FTS_DROP':_0x35ca51(0x46d),'FTS_RESET':'fts:reset','SCHEMA_SET':_0x35ca51(0x365),'SCHEMA_DROP':_0x35ca51(0x3dd),'UNIQUE_VIOLATION':_0x35ca51(0x345),'UNIQUE_VIOLATION_RESOLVED':'unique:violation_resolved','REF_VIOLATION':_0x35ca51(0x43a),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x35ca51(0x1c5),'TXN_START':_0x35ca51(0x28a),'TXN_END':_0x35ca51(0x465),'TXN_ROLLBACK':_0x35ca51(0x49c),'TYPE_REGISTERED':'type:registered','TYPE_DROP':_0x35ca51(0x1de),'ENV_OPENED':_0x35ca51(0x3d4),'ENV_REMOVED':_0x35ca51(0x37c),'TTL_EXPIRED':'ttl:expired','TTL_SET':_0x35ca51(0x236),'TTL_CLEAR':_0x35ca51(0x4a9),'LICENSE_INVALID':_0x35ca51(0x27e),'LICENSE_ADDED':'license:added','LICENSE_ACTIVATED':_0x35ca51(0x3d2),'LICENSE_REMOVED':'license:removed'},_0x3ae819={'CREATING':_0x35ca51(0x2dc),'RESETTING':'resetting','READY':'ready','DROPPING':_0x35ca51(0x28f),'WAITING':_0x35ca51(0x231)},_0x317076={'CREATED':_0x35ca51(0x374),'STARTING':_0x35ca51(0x36a),'STARTED':_0x35ca51(0x45b),'STOPPING':_0x35ca51(0x32f),'STOPPED':_0x35ca51(0x2cb)},_0x174cbb={'CREATING':'creating','READY':_0x35ca51(0x3b4),'HALTED':_0x35ca51(0x333),'STOPPED':_0x35ca51(0x2cb),'RESETTING':_0x35ca51(0x461)},_0x3efcde=Object['freeze']({'POKE':'bus:poke','DRAIN':'bus:drain'});return okdbEnums={'BUS_EVENTS':_0x3efcde,'CHANGE_ACTIONS':_0x56cd79,'EVENTS':_0x54eeee,'INDEX_STATE':_0x3ae819,'OKDB_STATE':_0x317076,'VIEW_STATE':_0x174cbb},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x3840e5=_0x538f61;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x2f8173=require$$1,_0x387840=require$$1$1,_0x507ae9=require$$0,_0x2ebb80=_0x2f8173[_0x3840e5(0x389)](_0x387840[_0x3840e5(0x2d8)](__dirname,_0x3840e5(0x340)),'utf8')[_0x3840e5(0x34d)](),_0x2e44c6=_0x507ae9['createPublicKey'](_0x2ebb80)[_0x3840e5(0x2d5)]({'type':'spki','format':_0x3840e5(0x41d)}),_0x9447b8=_0x507ae9['createHash']('sha256')[_0x3840e5(0x2c5)](_0x2e44c6)[_0x3840e5(0x1dc)]('hex')['slice'](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x2ebb80,'PUB_FINGERPRINT':_0x9447b8},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x37793d=_0x538f61;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x5cb370=require$$0,{OKDBError:_0x38e550}=requireOkdbError(),{EVENTS:_0x4a8f0a}=requireOkdbEnums(),_0x1fceda=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x77d9f7,LICENSE_TYPE_INTERNAL:_0x3fbe5e,OPEN_LICENSE_MAX_DURATION_MS:_0x3f50e8}=_0x1fceda,_0x3efc81=requireOkdbPubkey(),_0x3c83ec={'LICENSED_BUILD':_0x37793d(0x422),'PUBLIC_KEY_PEM':_0x3efc81[_0x37793d(0x1be)],'PUB_FINGERPRINT':_0x3efc81[_0x37793d(0x20a)],'LICENSE_EXPIRED_ACTION':_0x37793d(0x499)},_0xec6d73=_0x37793d(0x2c7),_0x363ba3={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x289463(_0x384b85){const _0x931f5c=_0x37793d;!_0x384b85[_0x931f5c(0x3d7)](_0xec6d73)&&await _0x384b85[_0x931f5c(0x350)](_0xec6d73);}class _0x32dc0f{constructor(_0x2f2cdd){const _0x229282=_0x37793d;this[_0x229282(0x250)]=_0x2f2cdd,this[_0x229282(0x2fe)]=null;}async[_0x37793d(0x259)](){const _0xcdde66=_0x37793d,_0x46504c=this[_0xcdde66(0x250)][_0xcdde66(0x30f)];if(!_0x46504c||!_0x46504c[_0xcdde66(0x3d7)](_0xec6d73)){this[_0xcdde66(0x2fe)]=null;return;}const _0x22e7af=this[_0xcdde66(0x250)]['id'];let _0x633167=null;for(const {key:_0x224398,value:_0xf9f5c2}of _0x46504c['getRange'](_0xec6d73)){const _0x404579=this[_0xcdde66(0x213)](_0xf9f5c2,_0x22e7af);_0x404579===_0xcdde66(0x2d3)&&!_0x633167&&(_0x633167={..._0xf9f5c2,'id':_0x224398,'status':_0x404579});}this[_0xcdde66(0x2fe)]=_0x633167;if(this[_0xcdde66(0x2fe)]&&this['_active'][_0xcdde66(0x396)]===_0x77d9f7){const _0x4c28e4=Math['ceil']((this[_0xcdde66(0x2fe)][_0xcdde66(0x214)]-Date[_0xcdde66(0x311)]())/0x5265c00);this[_0xcdde66(0x250)][_0xcdde66(0x499)]?.[_0xcdde66(0x208)](_0xcdde66(0x2eb)+_0x4c28e4+'\x20day(s).',{'feature':_0xcdde66(0x1c7),'licensee':this['_active'][_0xcdde66(0x1ca)],'expiresAt':new Date(this[_0xcdde66(0x2fe)][_0xcdde66(0x214)])['toISOString']()});}this['_active']&&this[_0xcdde66(0x2fe)][_0xcdde66(0x396)]===_0x3fbe5e&&this[_0xcdde66(0x250)][_0xcdde66(0x499)]?.['warn'](_0xcdde66(0x3e5),{'feature':_0xcdde66(0x1c7),'licensee':this[_0xcdde66(0x2fe)][_0xcdde66(0x1ca)]});}[_0x37793d(0x213)](_0x495dc2,_0x5a89d6){const _0x836b9a=_0x37793d;if(!_0x495dc2[_0x836b9a(0x283)])return _0x836b9a(0x38f);let _0x4f922a;try{_0x4f922a=_0x1fceda[_0x836b9a(0x1ed)](_0x495dc2[_0x836b9a(0x283)]);}catch(_0x9dec2c){return _0x836b9a(0x38f);}try{const _0x4dd68b=_0x5cb370[_0x836b9a(0x241)](null,_0x4f922a[_0x836b9a(0x225)],_0x3c83ec[_0x836b9a(0x1be)],_0x4f922a['sig']);if(!_0x4dd68b)return _0x836b9a(0x38f);}catch(_0x1ff1c9){return _0x836b9a(0x38f);}if(_0x4f922a['decoded']['licenseType']===_0x3fbe5e)return _0x836b9a(0x2d3);if(_0x4f922a[_0x836b9a(0x2e5)][_0x836b9a(0x214)]<=Date[_0x836b9a(0x311)]())return _0x836b9a(0x4aa);if(_0x4f922a[_0x836b9a(0x2e5)][_0x836b9a(0x396)]===_0x77d9f7)return'active';if(!_0x495dc2[_0x836b9a(0x3a9)])return _0x836b9a(0x363);const _0x5f49c=_0x1fceda[_0x836b9a(0x304)]({'tokenString':_0x495dc2[_0x836b9a(0x3a9)],'nodeId':_0x5a89d6,'rawBlobBuf':_0x4f922a['rawBuf'],'pubKeyPem':_0x3c83ec['PUBLIC_KEY_PEM'],'pubFingerprint':_0x3c83ec[_0x836b9a(0x20a)]});if(_0x5f49c['reason']===_0x836b9a(0x27b)||_0x5f49c['reason']==='SIG_INVALID')return _0x836b9a(0x2f1);if(_0x5f49c[_0x836b9a(0x40c)]===_0x836b9a(0x34a))return'expired';if(!_0x5f49c[_0x836b9a(0x360)])return _0x836b9a(0x2f1);return'active';}get[_0x37793d(0x2d3)](){const _0x4ce159=_0x37793d;return this[_0x4ce159(0x2fe)];}get[_0x37793d(0x28b)](){const _0x4b64a1=_0x37793d;return this[_0x4b64a1(0x2fe)]??_0x363ba3;}['assertFeature'](_0x1ccbcb){const _0x4e6d7b=_0x37793d;if(_0x3c83ec[_0x4e6d7b(0x3e4)]!==_0x4e6d7b(0x422))return;const _0x1b515e=this[_0x4e6d7b(0x28b)];if(!_0x1b515e[_0x4e6d7b(0x221)]?.[_0x1ccbcb]){const _0xe682a=_0x1b515e[_0x4e6d7b(0x30e)]?_0x4e6d7b(0x419)+_0x1ccbcb+_0x4e6d7b(0x23a)+_0x1ccbcb+_0x4e6d7b(0x281):'Feature\x20not\x20licensed:\x20'+_0x1ccbcb+_0x4e6d7b(0x3ba)+_0x1ccbcb+'\x22.';throw new _0x38e550(_0xe682a,'LICENSE_FEATURE_DISABLED',{'feature':_0x1ccbcb});}}['isFeatureEnabled'](_0x54d732){const _0xe0e8d=_0x37793d;if(_0x3c83ec[_0xe0e8d(0x3e4)]!==_0xe0e8d(0x422))return!![];return!!this[_0xe0e8d(0x28b)][_0xe0e8d(0x221)]?.[_0x54d732];}[_0x37793d(0x29c)](_0x293239,_0x1dda75){const _0x80fb9c=_0x37793d;if(_0x3c83ec[_0x80fb9c(0x3e4)]!=='true')return;const _0x506120=this['effective'],_0x1cf8d1=_0x506120['limits']?.[_0x293239];if(_0x1cf8d1===null||_0x1cf8d1===undefined||_0x1cf8d1===0x0)return;if(_0x1dda75>=_0x1cf8d1)throw new _0x38e550(_0x80fb9c(0x229)+_0x293239+'\x20('+_0x1dda75+'/'+_0x1cf8d1+')','LICENSE_LIMIT_EXCEEDED',{'limit':_0x293239,'current':_0x1dda75,'max':_0x1cf8d1});}async[_0x37793d(0x334)](_0x4ac15c){const _0x401dcb=_0x37793d;let _0x1cd274;try{_0x1cd274=_0x1fceda['decodeLicenseBlob'](_0x4ac15c);}catch(_0x5080c7){throw new _0x38e550(_0x401dcb(0x4a5)+_0x5080c7[_0x401dcb(0x2a5)],_0x401dcb(0x403));}let _0x35d1dc;try{_0x35d1dc=_0x5cb370[_0x401dcb(0x241)](null,_0x1cd274[_0x401dcb(0x225)],_0x3c83ec[_0x401dcb(0x1be)],_0x1cd274[_0x401dcb(0x487)]);}catch(_0x729099){throw new _0x38e550(_0x401dcb(0x4af)+_0x729099[_0x401dcb(0x2a5)],_0x401dcb(0x403));}if(!_0x35d1dc)throw new _0x38e550(_0x401dcb(0x442)+(_0x401dcb(0x29f)+_0x3c83ec[_0x401dcb(0x20a)]+'.\x20')+_0x401dcb(0x471),_0x401dcb(0x403),{'expectedFingerprint':_0x3c83ec[_0x401dcb(0x20a)]});if(_0x1cd274['decoded'][_0x401dcb(0x396)]===_0x77d9f7){const _0x263269=_0x1cd274[_0x401dcb(0x2e5)][_0x401dcb(0x214)]-_0x1cd274[_0x401dcb(0x2e5)][_0x401dcb(0x278)];if(_0x263269>_0x3f50e8)throw new _0x38e550(_0x401dcb(0x2e6)+Math[_0x401dcb(0x2f5)](_0x263269/(0x1e*0x5265c00))+'\x20months\x20from\x20issuance)',_0x401dcb(0x403));}const _0x3d3951=this[_0x401dcb(0x250)][_0x401dcb(0x30f)];await _0x289463(_0x3d3951);const _0x4d198f=_0x1fceda['licenseHash'](_0x1cd274[_0x401dcb(0x38b)])[_0x401dcb(0x449)]('hex');for(const {value:_0xb330c9}of _0x3d3951[_0x401dcb(0x2ee)](_0xec6d73)){if(_0xb330c9['_licenseHash']===_0x4d198f)throw new _0x38e550('License\x20already\x20stored',_0x401dcb(0x403));}const _0x361483=_0x5cb370[_0x401dcb(0x469)](),_0x701a5b={'blob':_0x4ac15c,'activation':null,'addedAt':Date['now'](),'_licenseHash':_0x4d198f,'licensee':_0x1cd274[_0x401dcb(0x2e5)][_0x401dcb(0x1ca)],'expiresAt':_0x1cd274[_0x401dcb(0x2e5)]['expiresAt'],'features':_0x1cd274[_0x401dcb(0x2e5)][_0x401dcb(0x221)],'limits':_0x1cd274[_0x401dcb(0x2e5)][_0x401dcb(0x2a0)],'licenseType':_0x1cd274[_0x401dcb(0x2e5)][_0x401dcb(0x396)]};return await _0x3d3951[_0x401dcb(0x1c3)](_0xec6d73,_0x361483,_0x701a5b),{'id':_0x361483,..._0x701a5b};}async[_0x37793d(0x1b2)](_0xd78c94){const _0x2e3b2f=_0x37793d;let _0x1f3521;try{_0x1f3521=_0x1fceda[_0x2e3b2f(0x21e)](_0xd78c94);}catch(_0x4968e8){throw new _0x38e550(_0x2e3b2f(0x223)+_0x4968e8[_0x2e3b2f(0x2a5)],_0x2e3b2f(0x1d2));}const _0x537ff7=_0x1f3521['licenseHash']['toString'](_0x2e3b2f(0x269)),_0x4aebcc=this['okdb']['_systemEnv'];if(!_0x4aebcc||!_0x4aebcc[_0x2e3b2f(0x3d7)](_0xec6d73))throw new _0x38e550('No\x20license\x20found\x20matching\x20this\x20activation\x20token',_0x2e3b2f(0x1d2));let _0x38a680=null,_0x1ed161=null;for(const {key:_0x40cd67,value:_0x59d47d}of _0x4aebcc[_0x2e3b2f(0x2ee)](_0xec6d73)){if(_0x59d47d[_0x2e3b2f(0x20d)]===_0x537ff7){_0x38a680=_0x40cd67,_0x1ed161=_0x59d47d;break;}}if(!_0x38a680)throw new _0x38e550(_0x2e3b2f(0x2ab),_0x2e3b2f(0x1d2));const {rawBuf:_0x15505c}=_0x1fceda[_0x2e3b2f(0x1ed)](_0x1ed161[_0x2e3b2f(0x283)]),_0x21f0da=_0x1fceda[_0x2e3b2f(0x304)]({'tokenString':_0xd78c94,'nodeId':this[_0x2e3b2f(0x250)]['id'],'rawBlobBuf':_0x15505c,'pubKeyPem':_0x3c83ec[_0x2e3b2f(0x1be)],'pubFingerprint':_0x3c83ec[_0x2e3b2f(0x20a)]});if(!_0x21f0da[_0x2e3b2f(0x360)])throw new _0x38e550(_0x2e3b2f(0x342)+_0x21f0da[_0x2e3b2f(0x40c)],'LICENSE_ACTIVATION_INVALID',{'reason':_0x21f0da['reason']});const _0x4e2ed8={..._0x1ed161,'activation':_0xd78c94};return await _0x4aebcc[_0x2e3b2f(0x2c5)](_0xec6d73,_0x38a680,_0x4e2ed8),{'id':_0x38a680,..._0x4e2ed8};}async[_0x37793d(0x226)](_0x45db79){const _0x178bcc=_0x37793d,_0x4260fe=this[_0x178bcc(0x250)][_0x178bcc(0x30f)];if(!_0x4260fe||!_0x4260fe[_0x178bcc(0x3d7)](_0xec6d73))return;await _0x4260fe[_0x178bcc(0x24d)](_0xec6d73,_0x45db79);}async['listLicenses'](){const _0x3734fe=_0x37793d,_0x2bff29=this[_0x3734fe(0x250)][_0x3734fe(0x30f)];if(!_0x2bff29||!_0x2bff29[_0x3734fe(0x3d7)](_0xec6d73))return[];const _0x16272f=this[_0x3734fe(0x250)]['id'],_0x582af1=[];for(const {key:_0x178eba,value:_0x3552df}of _0x2bff29[_0x3734fe(0x2ee)](_0xec6d73)){const _0x3406c3=this[_0x3734fe(0x213)](_0x3552df,_0x16272f);_0x582af1[_0x3734fe(0x488)]({..._0x3552df,'id':_0x178eba,'status':_0x3406c3});}return _0x582af1;}[_0x37793d(0x32d)](){const _0x268837=_0x37793d,_0x1df827=this[_0x268837(0x250)][_0x268837(0x30f)];if(!_0x1df827||!_0x1df827[_0x268837(0x3d7)](_0xec6d73))return[];const _0x1d18e4=this['okdb']['id'],_0x1f7c33=[];for(const {key:_0x1d882a,value:_0x370d00}of _0x1df827['getRange'](_0xec6d73)){if(_0x370d00[_0x268837(0x20d)]){if(_0x370d00[_0x268837(0x396)]===_0x77d9f7)_0x1f7c33[_0x268837(0x488)]({'licenseId':_0x1d882a,'pin':null});else{const _0xe041f7=Buffer[_0x268837(0x252)](_0x370d00['_licenseHash'],_0x268837(0x269)),{pin:_0x4afc09}=_0x1fceda[_0x268837(0x33e)](_0x1d18e4,_0xe041f7,_0x3c83ec[_0x268837(0x20a)]);_0x1f7c33['push']({'licenseId':_0x1d882a,'pin':_0x4afc09});}}}return _0x1f7c33;}async[_0x37793d(0x224)](){const _0x5548ac=_0x37793d,_0x4bb2de=this[_0x5548ac(0x2fe)];await this[_0x5548ac(0x259)]();if(this[_0x5548ac(0x2fe)]&&this[_0x5548ac(0x2fe)][_0x5548ac(0x396)]===_0x77d9f7){const _0xede30e=Math['ceil']((this[_0x5548ac(0x2fe)][_0x5548ac(0x214)]-Date['now']())/0x5265c00);this[_0x5548ac(0x250)][_0x5548ac(0x499)]?.[_0x5548ac(0x208)]('⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20'+_0xede30e+_0x5548ac(0x354),{'feature':_0x5548ac(0x1c7),'licensee':this['_active'][_0x5548ac(0x1ca)],'expiresAt':new Date(this[_0x5548ac(0x2fe)]['expiresAt'])[_0x5548ac(0x2b3)]()});}this['_active']&&this['_active']['licenseType']===_0x3fbe5e&&this[_0x5548ac(0x250)]['log']?.[_0x5548ac(0x208)](_0x5548ac(0x3e5),{'feature':'license','licensee':this[_0x5548ac(0x2fe)][_0x5548ac(0x1ca)]});if(_0x4bb2de&&!this[_0x5548ac(0x2fe)]){this[_0x5548ac(0x250)][_0x5548ac(0x499)]?.[_0x5548ac(0x208)](_0x5548ac(0x34f),{'feature':_0x5548ac(0x1c7)}),this[_0x5548ac(0x250)]['events']?.['emit'](_0x4a8f0a[_0x5548ac(0x403)],{'previous':_0x4bb2de});const _0x5e471d=this['okdb'][_0x5548ac(0x47e)]?.[_0x5548ac(0x3c4)]??_0x3c83ec[_0x5548ac(0x249)];_0x5e471d===_0x5548ac(0x42d)&&(this[_0x5548ac(0x250)][_0x5548ac(0x499)]?.[_0x5548ac(0x202)](_0x5548ac(0x1f4),{'feature':_0x5548ac(0x1c7)}),this[_0x5548ac(0x250)][_0x5548ac(0x2d9)]()[_0x5548ac(0x3c7)](()=>{})[_0x5548ac(0x352)](()=>process[_0x5548ac(0x463)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x32dc0f,'_C':_0x3c83ec},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x3136f7=_0x538f61;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x51b846=require$$0$2,_0x562786=require$$1,_0x5cfad5=require$$2$1,_0x4e8bf9=require$$1$1,_0x2aa2c7=_0x4e8bf9[_0x3136f7(0x2d8)](_0x5cfad5[_0x3136f7(0x3d6)](),_0x3136f7(0x381)),_0x22d439=0x3e8,_0x1d9d03={'reset':_0x3136f7(0x41e),'bold':'\x1b[1m','dim':_0x3136f7(0x3bb),'red':_0x3136f7(0x377),'green':_0x3136f7(0x47b),'yellow':_0x3136f7(0x3a1),'blue':_0x3136f7(0x317),'magenta':_0x3136f7(0x42c),'cyan':'\x1b[36m','white':'\x1b[37m','gray':'\x1b[90m'},_0x24264e=!process[_0x3136f7(0x313)][_0x3136f7(0x49a)]||!!process.env.NO_COLOR,_0x402df7=(_0x5b0a68,_0x19cdd3)=>_0x24264e?_0x19cdd3:''+_0x5b0a68+_0x19cdd3+_0x1d9d03['reset'],_0x4ab8de={'error':_0x1d9d03[_0x3136f7(0x4a0)],'warn':_0x1d9d03[_0x3136f7(0x2f7)],'info':_0x1d9d03[_0x3136f7(0x490)],'debug':_0x1d9d03['gray']},_0x124412={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x182a9b(_0x119075,_0x1bf44d=_0x3136f7(0x312)){const _0x2329c1=_0x3136f7,{level:_0x3cde2c,msg:_0x21b1c7,meta:_0x195755,context:_0x2365ed,ts:_0x1fecb1}=_0x119075;if((_0x124412[_0x3cde2c]??0x1)<(_0x124412[_0x1bf44d]??0x1))return;const _0x4a7e59=_0x402df7(_0x1d9d03[_0x2329c1(0x2b1)],new Date(_0x1fecb1)[_0x2329c1(0x2b3)]()),_0x15cd66=_0x402df7(_0x4ab8de[_0x3cde2c]??_0x1d9d03[_0x2329c1(0x23e)],_0x3cde2c[_0x2329c1(0x495)](0x5));let _0x28afb8='\x20\x20'+_0x4a7e59+'\x20'+_0x402df7(_0x1d9d03[_0x2329c1(0x416)],_0x15cd66)+'\x20'+_0x21b1c7;if(_0x195755&&Object[_0x2329c1(0x3fd)](_0x195755)['length']>0x0){const _0x24e0ed=Object[_0x2329c1(0x3f8)](_0x195755)[_0x2329c1(0x308)](([_0x372324,_0x6a6297])=>_0x372324+'='+_0x6a6297)[_0x2329c1(0x2d8)]('\x20');_0x28afb8+=_0x402df7(_0x1d9d03['dim'],_0x2329c1(0x211)+_0x24e0ed+']');}if(_0x2365ed!==undefined){const _0x2b002d=typeof _0x2365ed===_0x2329c1(0x1ee)?JSON['stringify'](_0x2365ed):String(_0x2365ed);_0x28afb8+=_0x402df7(_0x1d9d03[_0x2329c1(0x3c6)],'\x20\x20'+_0x2b002d);}const _0xcc038d=_0x3cde2c===_0x2329c1(0x202)||_0x3cde2c===_0x2329c1(0x208)?process['stderr'][_0x2329c1(0x204)][_0x2329c1(0x271)](process['stderr']):process[_0x2329c1(0x313)][_0x2329c1(0x204)]['bind'](process[_0x2329c1(0x313)]);_0xcc038d(_0x28afb8+'\x0a');}function _0x4f316f(_0x4fcb90,_0x50e5d3){const _0x31d47b=_0x3136f7;if(_0x4fcb90===0xcc||_0x4fcb90>=0xc8&&_0x4fcb90<0x12c&&!_0x50e5d3){console[_0x31d47b(0x499)](_0x31d47b(0x1e9)+_0x402df7(_0x1d9d03[_0x31d47b(0x46f)],'✓')+'\x0a');return;}if(_0x4fcb90>=0x190||_0x50e5d3?.[_0x31d47b(0x202)]){const _0xae59dd=_0x50e5d3?.[_0x31d47b(0x202)]??_0x50e5d3?.[_0x31d47b(0x2a5)]??'HTTP\x20'+_0x4fcb90;console[_0x31d47b(0x499)]('\x0a\x20\x20'+_0x402df7(_0x1d9d03[_0x31d47b(0x4a0)],'✗')+'\x20'+_0x402df7(_0x1d9d03[_0x31d47b(0x416)]+_0x1d9d03[_0x31d47b(0x4a0)],String(_0x4fcb90))+'\x20\x20'+_0xae59dd+'\x0a');return;}const _0x5063ed=Object[_0x31d47b(0x376)][_0x31d47b(0x48d)][_0x31d47b(0x248)](_0x50e5d3??{},_0x31d47b(0x1b8))?_0x50e5d3[_0x31d47b(0x1b8)]:_0x50e5d3,_0x1bbfd1=_0x50e5d3?.['meta'];console[_0x31d47b(0x499)](''),_0x38340b(_0x5063ed,'\x20\x20');if(_0x1bbfd1?.[_0x31d47b(0x2e3)]!=null||_0x1bbfd1?.[_0x31d47b(0x1cf)]!=null){const _0x172abb=[];if(_0x1bbfd1[_0x31d47b(0x2e3)]!=null)_0x172abb[_0x31d47b(0x488)](_0x1bbfd1[_0x31d47b(0x2e3)]+_0x31d47b(0x359)+(_0x1bbfd1[_0x31d47b(0x2e3)]!==0x1?'s':''));if(_0x1bbfd1[_0x31d47b(0x1cf)]!=null)_0x172abb['push'](_0x1bbfd1[_0x31d47b(0x1cf)]+'ms');console[_0x31d47b(0x499)](_0x31d47b(0x1e9)+_0x402df7(_0x1d9d03[_0x31d47b(0x3c6)],_0x172abb[_0x31d47b(0x2d8)](_0x31d47b(0x1d8))));}console['log']('');}function _0x38340b(_0x5a2bde,_0x504e68=''){const _0x58ebd4=_0x3136f7;if(_0x5a2bde===null||_0x5a2bde===undefined){console['log'](_0x504e68+_0x402df7(_0x1d9d03[_0x58ebd4(0x3c6)],'(null)'));return;}if(Array['isArray'](_0x5a2bde)){if(_0x5a2bde['length']===0x0){console[_0x58ebd4(0x499)](_0x504e68+_0x402df7(_0x1d9d03[_0x58ebd4(0x3c6)],_0x58ebd4(0x1d6)));return;}if(_0x5a2bde['every'](_0x1d1799=>_0x1d1799&&typeof _0x1d1799==='object'&&_0x58ebd4(0x22c)in _0x1d1799&&_0x58ebd4(0x3e0)in _0x1d1799)){_0x25f847(_0x5a2bde,_0x504e68);return;}if(_0x5a2bde[_0x58ebd4(0x2e9)](_0x1313a5=>_0x1313a5&&typeof _0x1313a5==='object'&&_0x58ebd4(0x398)in _0x1313a5&&'count'in _0x1313a5)){_0x256f01(_0x5a2bde,_0x504e68);return;}if(_0x5a2bde[_0x58ebd4(0x2e9)](_0x1b3134=>typeof _0x1b3134!==_0x58ebd4(0x1ee)||_0x1b3134===null)){_0x5a2bde[_0x58ebd4(0x20c)]((_0x183f92,_0x88d049)=>console[_0x58ebd4(0x499)](_0x504e68+_0x402df7(_0x1d9d03[_0x58ebd4(0x2b1)],_0x88d049+0x1+'.')+'\x20'+_0x402df7(_0x1d9d03[_0x58ebd4(0x23e)],String(_0x183f92))));return;}_0x5a2bde[_0x58ebd4(0x20c)]((_0x55ceea,_0x2aec26)=>{const _0xf966ef=_0x58ebd4;console['log'](_0x504e68+_0x402df7(_0x1d9d03[_0xf966ef(0x3c6)],'['+_0x2aec26+']'));if(typeof _0x55ceea===_0xf966ef(0x1ee)&&_0x55ceea!==null)_0x48c68c(_0x55ceea,_0x504e68+'\x20\x20');else console[_0xf966ef(0x499)](_0x504e68+'\x20\x20'+String(_0x55ceea));});return;}if(typeof _0x5a2bde===_0x58ebd4(0x1ee)){if('key'in _0x5a2bde&&'value'in _0x5a2bde&&Object[_0x58ebd4(0x3fd)](_0x5a2bde)[_0x58ebd4(0x48c)]<=0x3){console[_0x58ebd4(0x499)](_0x504e68+_0x402df7(_0x1d9d03['bold']+_0x1d9d03[_0x58ebd4(0x490)],String(_0x5a2bde['key'])));const _0x2e94bf=_0x5a2bde[_0x58ebd4(0x3e0)];if(_0x2e94bf&&typeof _0x2e94bf===_0x58ebd4(0x1ee))_0x48c68c(_0x2e94bf,_0x504e68);else console[_0x58ebd4(0x499)](_0x504e68+_0x402df7(_0x1d9d03[_0x58ebd4(0x23e)],String(_0x2e94bf)));return;}_0x48c68c(_0x5a2bde,_0x504e68);return;}console[_0x58ebd4(0x499)](_0x504e68+_0x402df7(_0x1d9d03[_0x58ebd4(0x23e)],String(_0x5a2bde)));}function _0x48c68c(_0x478af7,_0x528059=''){const _0x4f069=_0x3136f7,_0x15192d=Object['entries'](_0x478af7);if(_0x15192d[_0x4f069(0x48c)]===0x0){console[_0x4f069(0x499)](_0x528059+_0x402df7(_0x1d9d03[_0x4f069(0x3c6)],'{}'));return;}const _0x58bfd0=Math['min'](0x1c,Math['max'](..._0x15192d[_0x4f069(0x308)](([_0x2830ef])=>_0x2830ef['length'])));for(const [_0x3abf48,_0x771624]of _0x15192d){const _0x14bc64=_0x402df7(_0x1d9d03[_0x4f069(0x490)],_0x3abf48[_0x4f069(0x495)](_0x58bfd0));if(_0x771624===null||_0x771624===undefined)console[_0x4f069(0x499)](_0x528059+_0x14bc64+'\x20\x20'+_0x402df7(_0x1d9d03[_0x4f069(0x3c6)],'null'));else{if(typeof _0x771624==='object'){const _0x5eae48=JSON[_0x4f069(0x379)](_0x771624);_0x5eae48['length']<=0x50?console['log'](_0x528059+_0x14bc64+'\x20\x20'+_0x402df7(_0x1d9d03[_0x4f069(0x3c6)],_0x5eae48)):(console[_0x4f069(0x499)](_0x528059+_0x14bc64),_0x38340b(_0x771624,_0x528059+'\x20\x20'));}else{const _0x352d5a=typeof _0x771624==='boolean'?_0x402df7(_0x771624?_0x1d9d03['green']:_0x1d9d03[_0x4f069(0x2f7)],String(_0x771624)):typeof _0x771624==='number'?_0x402df7(_0x1d9d03[_0x4f069(0x255)],String(_0x771624)):_0x402df7(_0x1d9d03[_0x4f069(0x23e)],String(_0x771624));console[_0x4f069(0x499)](_0x528059+_0x14bc64+'\x20\x20'+_0x352d5a);}}}}function _0x25f847(_0x3be329,_0x34d84e=''){const _0x55f368=_0x3136f7,_0xbb0274=Math['min'](0x20,Math[_0x55f368(0x2be)](..._0x3be329[_0x55f368(0x308)](_0x18b500=>String(_0x18b500[_0x55f368(0x22c)])[_0x55f368(0x48c)])));for(const {key:_0x3fe56a,value:_0x5c9003,score:_0xcdb2f0,clock:_0x3fd664}of _0x3be329){const _0xdf9ee3=_0x402df7(_0x1d9d03[_0x55f368(0x416)]+_0x1d9d03[_0x55f368(0x490)],String(_0x3fe56a)['padEnd'](_0xbb0274)),_0x6cfa4b=_0x5c9003==null?_0x402df7(_0x1d9d03[_0x55f368(0x3c6)],'null'):typeof _0x5c9003===_0x55f368(0x1ee)?_0x402df7(_0x1d9d03[_0x55f368(0x3c6)],JSON[_0x55f368(0x379)](_0x5c9003)):_0x402df7(_0x1d9d03[_0x55f368(0x23e)],String(_0x5c9003)),_0x21f57d=_0xcdb2f0!=null?_0x402df7(_0x1d9d03['gray'],_0x55f368(0x29e)+_0xcdb2f0[_0x55f368(0x1ff)](0x4)):'',_0x11349f=_0x3fd664!=null?_0x402df7(_0x1d9d03[_0x55f368(0x2b1)],_0x55f368(0x3af)+_0x3fd664):'';console[_0x55f368(0x499)](_0x34d84e+_0xdf9ee3+'\x20\x20'+_0x6cfa4b+_0x21f57d+_0x11349f);}}function _0x256f01(_0x1bf94a,_0x190a32=''){const _0x18e872=_0x3136f7,_0x194485=Math[_0x18e872(0x1fa)](0x20,Math[_0x18e872(0x2be)](..._0x1bf94a['map'](_0x4ec2d8=>_0x4ec2d8['type'][_0x18e872(0x48c)])));for(const {type:_0x19a870,count:_0x3f1071,fields:_0x27e01f}of _0x1bf94a){if(_0x19a870[_0x18e872(0x424)]('~'))continue;const _0x5ab706=_0x402df7(_0x1d9d03[_0x18e872(0x416)]+_0x1d9d03[_0x18e872(0x490)],_0x19a870[_0x18e872(0x495)](_0x194485)),_0x589253=_0x402df7(_0x1d9d03[_0x18e872(0x255)],String(_0x3f1071)[_0x18e872(0x420)](0x6))+_0x402df7(_0x1d9d03['dim'],_0x18e872(0x2db)),_0x23e9f4=_0x27e01f&&Object[_0x18e872(0x3fd)](_0x27e01f)['length']?_0x402df7(_0x1d9d03['dim'],_0x18e872(0x366)+Object[_0x18e872(0x3fd)](_0x27e01f)['slice'](0x0,0x6)[_0x18e872(0x2d8)](',\x20')+(Object['keys'](_0x27e01f)[_0x18e872(0x48c)]>0x6?'…':'')):'';console['log'](_0x190a32+_0x5ab706+'\x20\x20'+_0x589253+_0x23e9f4);}}const _0x54f19b=[_0x3136f7(0x25d),_0x3136f7(0x447),'queue/','files/',_0x3136f7(0x1b1),_0x3136f7(0x31c)];function _0x252226(_0x5b2eb4,_0x362c9e){const _0x4f017e=_0x3136f7;if(_0x5b2eb4['startsWith']('/api/'))return _0x5b2eb4;if(_0x5b2eb4[_0x4f017e(0x424)]('/'))return'/api'+_0x5b2eb4;if(_0x5b2eb4[_0x4f017e(0x424)](_0x4f017e(0x2b7)))return _0x4f017e(0x1bd)+_0x5b2eb4;const _0x3e4419=_0x54f19b[_0x4f017e(0x493)](_0x57fdfb=>_0x5b2eb4===_0x57fdfb[_0x4f017e(0x279)](/\/$/,'')||_0x5b2eb4[_0x4f017e(0x424)](_0x57fdfb));return _0x3e4419?_0x4f017e(0x46a)+_0x362c9e+'/'+_0x5b2eb4:_0x4f017e(0x1bd)+_0x5b2eb4;}function _0x70bb86(_0x450165){const _0x5f41c9=_0x3136f7,_0x5c8f2a={},_0x91d8ce=[];let _0xcc4b8e=0x0;while(_0xcc4b8e<_0x450165['length']){if((_0x450165[_0xcc4b8e]==='--env'||_0x450165[_0xcc4b8e]==='-e')&&_0x450165[_0xcc4b8e+0x1]&&!_0x450165[_0xcc4b8e+0x1][_0x5f41c9(0x424)]('-'))_0x5c8f2a[_0x5f41c9(0x3ca)]=_0x450165[++_0xcc4b8e];else _0x450165[_0xcc4b8e]==='--help'||_0x450165[_0xcc4b8e]==='-h'?_0x5c8f2a[_0x5f41c9(0x264)]=!![]:_0x91d8ce[_0x5f41c9(0x488)](_0x450165[_0xcc4b8e]);_0xcc4b8e++;}return{'flags':_0x5c8f2a,'rest':_0x91d8ce};}const _0x57f5b7={'system':'System','envs':_0x3136f7(0x3b0),'types':_0x3136f7(0x2ff),'data':'Records','indexes':_0x3136f7(0x3a3),'fts':_0x3136f7(0x339),'sync':_0x3136f7(0x2ed),'queue':_0x3136f7(0x3de),'files':_0x3136f7(0x406),'embeddings':_0x3136f7(0x1f9),'engines':'Engines','admin':_0x3136f7(0x24a),'event':_0x3136f7(0x2c2),'processor':_0x3136f7(0x328)},_0x58b20f=['system',_0x3136f7(0x431),'types',_0x3136f7(0x3d0),_0x3136f7(0x3b2),_0x3136f7(0x243),'sync',_0x3136f7(0x315),_0x3136f7(0x47a),_0x3136f7(0x3db),_0x3136f7(0x37d),_0x3136f7(0x36f)];function _0x19aa12(_0x4ec516){const _0x4d9468=_0x3136f7;return _0x4ec516[_0x4d9468(0x279)](/^\/api/,'')[_0x4d9468(0x279)](/^\[\/env\/:env=[^\]]*\]/,_0x4d9468(0x1f5))['replace'](/^\/env\/:env/,_0x4d9468(0x409))[_0x4d9468(0x279)](/^\//,'');}function _0xa3a137(_0xc90bd5,_0x509d4d=''){const _0x2ebc2b=_0x3136f7,_0x4043f2=_0xc90bd5['http'][_0x2ebc2b(0x238)]()['filter'](_0x22c559=>!_0x22c559['meta']?.[_0x2ebc2b(0x2cf)]),_0x2d08c0=_0x509d4d?_0x4043f2[_0x2ebc2b(0x314)](_0xf8f0f4=>_0xf8f0f4[_0x2ebc2b(0x3c3)][_0x2ebc2b(0x291)]()['includes'](_0x509d4d[_0x2ebc2b(0x291)]())||(_0x94fddb(_0xf8f0f4)??'')[_0x2ebc2b(0x291)]()[_0x2ebc2b(0x40f)](_0x509d4d[_0x2ebc2b(0x291)]())||_0x54fb96(_0xf8f0f4)['some'](_0x2e3b81=>_0x2e3b81[_0x2ebc2b(0x291)]()[_0x2ebc2b(0x40f)](_0x509d4d[_0x2ebc2b(0x291)]()))):_0x4043f2;if(!_0x2d08c0[_0x2ebc2b(0x48c)]){console[_0x2ebc2b(0x499)](_0x402df7(_0x1d9d03[_0x2ebc2b(0x2f7)],_0x2ebc2b(0x268)+_0x509d4d+'\x22\x0a'));return;}const _0x9583f4=new Map();for(const _0x2c7338 of _0x2d08c0){const _0x30f72e=_0x54fb96(_0x2c7338)[0x0]??_0x2ebc2b(0x31f);if(!_0x9583f4[_0x2ebc2b(0x3fe)](_0x30f72e))_0x9583f4[_0x2ebc2b(0x34b)](_0x30f72e,[]);_0x9583f4['get'](_0x30f72e)['push'](_0x2c7338);}const _0x2fb8af=[..._0x58b20f[_0x2ebc2b(0x314)](_0x257d03=>_0x9583f4[_0x2ebc2b(0x3fe)](_0x257d03)),...[..._0x9583f4[_0x2ebc2b(0x3fd)]()][_0x2ebc2b(0x314)](_0x18901a=>!_0x58b20f[_0x2ebc2b(0x40f)](_0x18901a))];console[_0x2ebc2b(0x499)]('');for(const _0x34b7e8 of _0x2fb8af){const _0x3ab1a6=_0x9583f4[_0x2ebc2b(0x26b)](_0x34b7e8);if(!_0x3ab1a6?.[_0x2ebc2b(0x48c)])continue;console[_0x2ebc2b(0x499)](_0x402df7(_0x1d9d03[_0x2ebc2b(0x416)],'\x20\x20'+(_0x57f5b7[_0x34b7e8]??_0x34b7e8)));for(const _0x41f57c of _0x3ab1a6){const _0x3348c8=_0x402df7(_0x1d9d03[_0x2ebc2b(0x255)],_0x41f57c[_0x2ebc2b(0x294)][_0x2ebc2b(0x495)](0x7)),_0x578340=_0x402df7(_0x1d9d03[_0x2ebc2b(0x490)],_0x19aa12(_0x41f57c[_0x2ebc2b(0x3c3)])),_0x3b3f97=_0x94fddb(_0x41f57c)?_0x402df7(_0x1d9d03[_0x2ebc2b(0x3c6)],'\x20\x20'+_0x94fddb(_0x41f57c)):'',_0xfeb3bb=_0x41f57c['operation']?.['id']?_0x402df7(_0x1d9d03['gray'],_0x2ebc2b(0x211)+_0x41f57c['operation']['id']+']'):'';console[_0x2ebc2b(0x499)]('\x20\x20\x20\x20'+_0x3348c8+'\x20'+_0x578340+_0x3b3f97+_0xfeb3bb);}console['log']('');}}function _0x3fe033(_0x5a473c,_0x40bee6){const _0x3a8e12=_0x3136f7,_0x170b85=_0x40bee6[_0x3a8e12(0x279)](/^\/api(\/env\/[^/]+)?\//,'')[_0x3a8e12(0x4a2)]('/')[0x0],_0x4398b3=_0x5a473c[_0x3a8e12(0x39c)][_0x3a8e12(0x238)]()[_0x3a8e12(0x314)](_0x4111aa=>_0x4111aa[_0x3a8e12(0x3c3)]['toLowerCase']()['includes'](_0x170b85['toLowerCase']()));if(!_0x4398b3['length']){console[_0x3a8e12(0x499)](_0x402df7(_0x1d9d03[_0x3a8e12(0x2f7)],'\x0a\x20\x20No\x20documentation\x20found\x20for:\x20'+_0x40bee6+'\x0a'));return;}console['log']('');for(const _0x16fc94 of _0x4398b3[_0x3a8e12(0x1c2)](0x0,0xc)){for(const _0x2fd2ec of _0x17a7aa(_0x16fc94)){console[_0x3a8e12(0x499)](_0x2fd2ec);}console[_0x3a8e12(0x499)]('');}}function _0x94fddb(_0x47278c){const _0x2ce782=_0x3136f7;return _0x47278c[_0x2ce782(0x337)]?.[_0x2ce782(0x309)]??_0x47278c[_0x2ce782(0x45d)]?.[_0x2ce782(0x309)]??'';}function _0x3daa3d(_0x249530){const _0x3d1c11=_0x3136f7;return _0x249530[_0x3d1c11(0x337)]?.[_0x3d1c11(0x1cd)]??_0x249530[_0x3d1c11(0x45d)]?.[_0x3d1c11(0x1cd)]??'';}function _0x54fb96(_0x5c9bf7){const _0x2ddcac=_0x3136f7;return _0x5c9bf7['operation']?.[_0x2ddcac(0x383)]?.[_0x2ddcac(0x48c)]?_0x5c9bf7[_0x2ddcac(0x337)][_0x2ddcac(0x383)]:_0x5c9bf7[_0x2ddcac(0x45d)]?.[_0x2ddcac(0x383)]??[];}function _0x17a7aa(_0x541770){const _0x51441e=_0x3136f7,_0x2c6f16=[];_0x2c6f16[_0x51441e(0x488)]('\x20\x20'+_0x402df7(_0x1d9d03[_0x51441e(0x416)]+_0x1d9d03[_0x51441e(0x255)],_0x541770['method'][_0x51441e(0x495)](0x7))+'\x20'+_0x402df7(_0x1d9d03[_0x51441e(0x416)]+_0x1d9d03[_0x51441e(0x490)],_0x541770[_0x51441e(0x3c3)]));_0x541770[_0x51441e(0x337)]?.['id']&&_0x2c6f16[_0x51441e(0x488)](_0x51441e(0x1f0)+_0x402df7(_0x1d9d03[_0x51441e(0x2b1)],_0x51441e(0x444)+_0x541770[_0x51441e(0x337)]['id']));_0x94fddb(_0x541770)&&_0x2c6f16[_0x51441e(0x488)](_0x51441e(0x1f0)+_0x402df7(_0x1d9d03[_0x51441e(0x23e)],_0x94fddb(_0x541770)));_0x3daa3d(_0x541770)&&_0x2c6f16[_0x51441e(0x488)](_0x51441e(0x1f0)+_0x402df7(_0x1d9d03[_0x51441e(0x3c6)],_0x3daa3d(_0x541770)));_0x54fb96(_0x541770)[_0x51441e(0x48c)]&&_0x2c6f16[_0x51441e(0x488)](_0x51441e(0x1f0)+_0x402df7(_0x1d9d03['gray'],'tags:\x20'+_0x54fb96(_0x541770)['join'](',\x20')));_0x541770[_0x51441e(0x337)]?.['safety']?.['access']&&_0x2c6f16['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x402df7(_0x1d9d03[_0x51441e(0x2b1)],'access:\x20'+_0x541770[_0x51441e(0x337)][_0x51441e(0x3eb)][_0x51441e(0x301)]));_0x541770[_0x51441e(0x337)]?.['http']?.[_0x51441e(0x407)]&&_0x541770[_0x51441e(0x337)]['http'][_0x51441e(0x407)]!==_0x51441e(0x4a8)&&_0x2c6f16[_0x51441e(0x488)](_0x51441e(0x1f0)+_0x402df7(_0x1d9d03['gray'],'transport:\x20'+_0x541770[_0x51441e(0x337)][_0x51441e(0x39c)]['transport']));if(_0x541770['operation']?.['inputSchema']){const _0x3d4a44=Object['keys'](_0x541770[_0x51441e(0x337)][_0x51441e(0x33c)][_0x51441e(0x1d9)]||{});if(_0x3d4a44[_0x51441e(0x48c)])_0x2c6f16[_0x51441e(0x488)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x402df7(_0x1d9d03[_0x51441e(0x2b1)],_0x51441e(0x412)+_0x3d4a44[_0x51441e(0x2d8)](',\x20')));}return _0x541770['meta']?.[_0x51441e(0x2e1)]&&_0x2c6f16[_0x51441e(0x488)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x402df7(_0x1d9d03[_0x51441e(0x2b1)],_0x51441e(0x230)+JSON[_0x51441e(0x379)](_0x541770[_0x51441e(0x45d)][_0x51441e(0x2e1)]))),_0x2c6f16;}async function _0xe42de1(_0x3a0823,_0x446b01,_0x1f06c7,_0x47e1dc=null){const _0x2abe6f=_0x3136f7,_0x502b6c=_0x1f06c7[_0x2abe6f(0x462)]('?'),_0x2f0efd=_0x502b6c>=0x0?_0x1f06c7[_0x2abe6f(0x1c2)](0x0,_0x502b6c):_0x1f06c7,_0x537d08=_0x502b6c>=0x0?_0x1f06c7['slice'](_0x502b6c+0x1):'',_0x4e9ab5=Object[_0x2abe6f(0x481)](new URLSearchParams(_0x537d08)[_0x2abe6f(0x3f8)]());return _0x3a0823[_0x2abe6f(0x39c)]['handle'](_0x446b01,_0x2f0efd,{'body':_0x47e1dc,'query':_0x4e9ab5,'headers':{'content-type':'application/json'}},{'internal':!![]});}function _0x5d2be3(_0x41576d){const _0x4fcaad=_0x3136f7;if(!_0x41576d)return null;const _0x5a5e24=_0x41576d[_0x4fcaad(0x34d)]();if(!_0x5a5e24)return null;try{return JSON[_0x4fcaad(0x24b)](_0x5a5e24);}catch{}try{return JSON[_0x4fcaad(0x24b)](_0x13d248(_0x5a5e24));}catch(_0x11bc71){throw new SyntaxError(_0x11bc71[_0x4fcaad(0x2a5)],{'cause':_0x11bc71});}}function _0x13d248(_0x5f36fb){const _0xfa2fc6=_0x3136f7;let _0x364a5d='',_0x596a8a=0x0;while(_0x596a8a<_0x5f36fb[_0xfa2fc6(0x48c)]){const _0x3ced47=_0x5f36fb[_0x596a8a];if(_0x3ced47==='\x22'){_0x364a5d+='\x22',_0x596a8a++;while(_0x596a8a<_0x5f36fb[_0xfa2fc6(0x48c)]&&_0x5f36fb[_0x596a8a]!=='\x22'){if(_0x5f36fb[_0x596a8a]==='\x5c'){_0x364a5d+=_0x5f36fb[_0x596a8a++];if(_0x596a8a<_0x5f36fb['length'])_0x364a5d+=_0x5f36fb[_0x596a8a++];}else _0x364a5d+=_0x5f36fb[_0x596a8a++];}_0x364a5d+='\x22';if(_0x596a8a<_0x5f36fb[_0xfa2fc6(0x48c)])_0x596a8a++;continue;}if(_0x3ced47==='\x27'){_0x364a5d+='\x22',_0x596a8a++;while(_0x596a8a<_0x5f36fb['length']&&_0x5f36fb[_0x596a8a]!=='\x27'){if(_0x5f36fb[_0x596a8a]==='\x5c'&&_0x5f36fb[_0x596a8a+0x1]==='\x27')_0x364a5d+='\x27',_0x596a8a+=0x2;else _0x5f36fb[_0x596a8a]==='\x22'?(_0x364a5d+='\x5c\x22',_0x596a8a++):_0x364a5d+=_0x5f36fb[_0x596a8a++];}_0x364a5d+='\x22';if(_0x596a8a<_0x5f36fb[_0xfa2fc6(0x48c)])_0x596a8a++;continue;}if(_0xfa2fc6(0x30a)[_0xfa2fc6(0x40f)](_0x3ced47)){_0x364a5d+=_0x3ced47,_0x596a8a++;continue;}let _0x33105e='';while(_0x596a8a<_0x5f36fb[_0xfa2fc6(0x48c)]&&!_0xfa2fc6(0x297)[_0xfa2fc6(0x40f)](_0x5f36fb[_0x596a8a])&&_0x5f36fb[_0x596a8a]!=='\x20'&&_0x5f36fb[_0x596a8a]!=='\x09'&&_0x5f36fb[_0x596a8a]!=='\x0a'&&_0x5f36fb[_0x596a8a]!=='\x0d'){_0x33105e+=_0x5f36fb[_0x596a8a++];}let _0x5a3a17=_0x596a8a;while(_0x5a3a17<_0x5f36fb[_0xfa2fc6(0x48c)]&&(_0x5f36fb[_0x5a3a17]==='\x20'||_0x5f36fb[_0x5a3a17]==='\x09'))_0x5a3a17++;if(_0x5f36fb[_0x5a3a17]===':')_0x364a5d+='\x22'+_0x33105e+'\x22';else _0x33105e===_0xfa2fc6(0x422)||_0x33105e===_0xfa2fc6(0x401)||_0x33105e===_0xfa2fc6(0x4a1)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0xfa2fc6(0x320)](_0x33105e)?_0x364a5d+=_0x33105e:_0x364a5d+='\x22'+_0x33105e+'\x22';}return _0x364a5d[_0xfa2fc6(0x279)](/,(\s*[}\]])/g,'$1');}function _0x563f11(_0x3f12ab){const _0xfc55eb=_0x3136f7,_0x500791=[];let _0x417a63=0x0;while(_0x417a63<_0x3f12ab[_0xfc55eb(0x48c)]){while(_0x417a63<_0x3f12ab['length']&&(_0x3f12ab[_0x417a63]==='\x20'||_0x3f12ab[_0x417a63]==='\x09'))_0x417a63++;if(_0x417a63>=_0x3f12ab[_0xfc55eb(0x48c)])break;const _0x100d1f=_0x3f12ab[_0x417a63];if(_0x100d1f==='{'||_0x100d1f==='['){const _0x40bd62=_0x100d1f==='{'?'}':']',_0x174c8f=_0x417a63++;let _0x581c26=0x1,_0x307bd5=![],_0x189e2f='';while(_0x417a63<_0x3f12ab[_0xfc55eb(0x48c)]&&_0x581c26>0x0){const _0x1f9498=_0x3f12ab[_0x417a63];if(_0x307bd5){if(_0x1f9498==='\x5c')_0x417a63++;else{if(_0x1f9498===_0x189e2f)_0x307bd5=![];}}else{if(_0x1f9498==='\x22'||_0x1f9498==='\x27')_0x307bd5=!![],_0x189e2f=_0x1f9498;else{if(_0x1f9498===_0x100d1f)_0x581c26++;else{if(_0x1f9498===_0x40bd62)_0x581c26--;}}}_0x417a63++;}_0x500791[_0xfc55eb(0x488)](_0x3f12ab[_0xfc55eb(0x1c2)](_0x174c8f,_0x417a63));continue;}if(_0x100d1f==='\x22'||_0x100d1f==='\x27'){const _0x486455=_0x100d1f;_0x417a63++;let _0x17b2cd='';while(_0x417a63<_0x3f12ab['length']&&_0x3f12ab[_0x417a63]!==_0x486455){if(_0x3f12ab[_0x417a63]==='\x5c'&&_0x417a63+0x1<_0x3f12ab[_0xfc55eb(0x48c)])_0x417a63++,_0x17b2cd+=_0x3f12ab[_0x417a63++];else _0x17b2cd+=_0x3f12ab[_0x417a63++];}if(_0x417a63<_0x3f12ab['length'])_0x417a63++;_0x500791[_0xfc55eb(0x488)](_0x17b2cd);continue;}let _0x467e42='';while(_0x417a63<_0x3f12ab['length']&&_0x3f12ab[_0x417a63]!=='\x20'&&_0x3f12ab[_0x417a63]!=='\x09'&&_0x3f12ab[_0x417a63]!=='{'&&_0x3f12ab[_0x417a63]!=='['){_0x467e42+=_0x3f12ab[_0x417a63++];}if(_0x467e42)_0x500791[_0xfc55eb(0x488)](_0x467e42);}return _0x500791;}function _0x26917e(_0x497b2f,_0x16413a){const _0x2f47bd=_0x3136f7,_0xe617b8=[..._0x497b2f['_envs'][_0x2f47bd(0x3fd)]()][_0x2f47bd(0x314)](_0x4c00ba=>!_0x4c00ba['startsWith']('~'));console[_0x2f47bd(0x499)](['',_0x402df7(_0x1d9d03[_0x2f47bd(0x416)]+_0x1d9d03[_0x2f47bd(0x490)],_0x2f47bd(0x432)),_0x402df7(_0x1d9d03[_0x2f47bd(0x416)]+_0x1d9d03[_0x2f47bd(0x490)],'\x20\x20║')+_0x402df7(_0x1d9d03[_0x2f47bd(0x416)],_0x2f47bd(0x292))+_0x402df7(_0x1d9d03['bold']+_0x1d9d03['cyan'],'║'),_0x402df7(_0x1d9d03[_0x2f47bd(0x416)]+_0x1d9d03['cyan'],_0x2f47bd(0x418)),'','\x20\x20'+_0x402df7(_0x1d9d03[_0x2f47bd(0x46f)],'✓')+'\x20'+_0x402df7(_0x1d9d03[_0x2f47bd(0x416)],_0x2f47bd(0x1bc))+_0x2f47bd(0x247)+_0x16413a[_0x2f47bd(0x21b)],'\x20\x20'+_0x402df7(_0x1d9d03['green'],'✓')+'\x20'+_0x402df7(_0x1d9d03[_0x2f47bd(0x416)],'api')+_0x2f47bd(0x408)+_0x16413a['port']+_0x2f47bd(0x232),'\x20\x20'+_0x402df7(_0x1d9d03[_0x2f47bd(0x46f)],'✓')+'\x20'+_0x402df7(_0x1d9d03[_0x2f47bd(0x416)],_0x2f47bd(0x3c3))+_0x2f47bd(0x364)+_0x16413a[_0x2f47bd(0x1ba)],'\x20\x20'+_0x402df7(_0x1d9d03[_0x2f47bd(0x46f)],'✓')+'\x20'+_0x402df7(_0x1d9d03[_0x2f47bd(0x416)],'id')+_0x2f47bd(0x38a)+_0x402df7(_0x1d9d03[_0x2f47bd(0x2b1)],_0x497b2f['id']),'\x20\x20'+_0x402df7(_0x1d9d03['green'],'✓')+'\x20'+_0x402df7(_0x1d9d03[_0x2f47bd(0x416)],'envs')+'\x20\x20\x20\x20'+_0xe617b8[_0x2f47bd(0x308)](_0x35cb9b=>_0x402df7(_0x1d9d03['cyan'],_0x35cb9b))[_0x2f47bd(0x2d8)]('\x20\x20'),..._0x16413a['noAdmin']?[]:['\x20\x20'+_0x402df7(_0x1d9d03[_0x2f47bd(0x46f)],'✓')+'\x20'+_0x402df7(_0x1d9d03[_0x2f47bd(0x416)],_0x2f47bd(0x36f))+'\x20\x20\x20http://localhost:'+_0x16413a[_0x2f47bd(0x21b)]+'/admin/index.html'],'',_0x402df7(_0x1d9d03[_0x2f47bd(0x3c6)],'\x20\x20Type\x20'+_0x402df7(_0x1d9d03['bold'],_0x2f47bd(0x264))+'\x20for\x20commands,\x20'+_0x402df7(_0x1d9d03['bold'],_0x2f47bd(0x4a3))+'\x20to\x20browse\x20the\x20API,\x20'+_0x402df7(_0x1d9d03[_0x2f47bd(0x416)],_0x2f47bd(0x463))+_0x2f47bd(0x2c9)),''][_0x2f47bd(0x2d8)]('\x0a'));}function _0x4df7b0(_0x30028d){const _0x453209=_0x3136f7;console['log']('\x0a'+_0x402df7(_0x1d9d03['bold'],_0x453209(0x2e4))+'\x20\x20'+_0x402df7(_0x1d9d03[_0x453209(0x3c6)],_0x453209(0x307))+_0x453209(0x458)+_0x402df7(_0x1d9d03['cyan'],_0x453209(0x28c))+_0x453209(0x3b6)+_0x402df7(_0x1d9d03[_0x453209(0x490)],_0x453209(0x28c))+'\x20'+_0x402df7(_0x1d9d03[_0x453209(0x2f7)],'<json-body>')+_0x453209(0x47c)+_0x402df7(_0x1d9d03[_0x453209(0x490)],_0x453209(0x35f))+'\x20'+_0x402df7(_0x1d9d03[_0x453209(0x490)],_0x453209(0x28c))+'\x20'+_0x402df7(_0x1d9d03[_0x453209(0x2f7)],_0x453209(0x2fc))+_0x453209(0x32e)+_0x402df7(_0x1d9d03[_0x453209(0x3c6)],_0x453209(0x261))+_0x453209(0x30c)+_0x402df7(_0x1d9d03['gray'],_0x453209(0x312))+_0x453209(0x27f)+_0x402df7(_0x1d9d03[_0x453209(0x2b1)],_0x453209(0x431))+_0x453209(0x205)+_0x402df7(_0x1d9d03[_0x453209(0x2b1)],_0x453209(0x25d))+_0x453209(0x23f)+_0x30028d[_0x453209(0x3ca)]+_0x453209(0x21d)+_0x402df7(_0x1d9d03[_0x453209(0x2b1)],_0x453209(0x43f))+_0x453209(0x3fc)+_0x30028d[_0x453209(0x3ca)]+_0x453209(0x1e2)+_0x402df7(_0x1d9d03['gray'],_0x453209(0x310))+_0x453209(0x326)+_0x30028d[_0x453209(0x3ca)]+_0x453209(0x3c0)+_0x402df7(_0x1d9d03[_0x453209(0x2b1)],_0x453209(0x48b))+'\x20→\x20POST\x20/api/env/'+_0x30028d['env']+_0x453209(0x3be)+_0x402df7(_0x1d9d03[_0x453209(0x2b1)],'PUT\x20type/users/item/x\x20{\x22n\x22:1}')+_0x453209(0x30c)+_0x402df7(_0x1d9d03[_0x453209(0x2b1)],'DELETE\x20type/users/item/x')+_0x453209(0x30c)+_0x402df7(_0x1d9d03[_0x453209(0x2b1)],_0x453209(0x46e))+_0x453209(0x3ab)+_0x402df7(_0x1d9d03[_0x453209(0x416)],'\x20\x20Flags')+'\x20\x20'+_0x402df7(_0x1d9d03['dim'],_0x453209(0x32b))+_0x453209(0x458)+_0x402df7(_0x1d9d03[_0x453209(0x490)],_0x453209(0x254))+_0x453209(0x2df)+_0x402df7(_0x1d9d03['cyan'],_0x453209(0x49d))+_0x453209(0x2ca)+_0x402df7(_0x1d9d03['dim'],_0x453209(0x261))+_0x453209(0x30c)+_0x402df7(_0x1d9d03[_0x453209(0x2b1)],'types\x20--env\x20staging')+_0x453209(0x30c)+_0x402df7(_0x1d9d03['gray'],_0x453209(0x347))+_0x453209(0x30c)+_0x402df7(_0x1d9d03[_0x453209(0x2b1)],_0x453209(0x40e))+'\x0a\x0a'+_0x402df7(_0x1d9d03['bold'],_0x453209(0x428))+_0x453209(0x458)+_0x402df7(_0x1d9d03[_0x453209(0x490)],_0x453209(0x48f))+_0x453209(0x368)+_0x402df7(_0x1d9d03[_0x453209(0x490)],_0x453209(0x3ca))+_0x453209(0x3b9)+_0x402df7(_0x1d9d03[_0x453209(0x490)],_0x453209(0x4a3))+'\x20'+_0x402df7(_0x1d9d03[_0x453209(0x3c6)],_0x453209(0x48e))+_0x453209(0x32c)+_0x402df7(_0x1d9d03[_0x453209(0x490)],_0x453209(0x2b6))+'\x20'+_0x402df7(_0x1d9d03['dim'],_0x453209(0x27a))+'\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20'+_0x402df7(_0x1d9d03[_0x453209(0x490)],_0x453209(0x460))+_0x453209(0x3ed)+_0x402df7(_0x1d9d03['cyan'],'help')+_0x453209(0x37f)+_0x402df7(_0x1d9d03['cyan'],_0x453209(0x463))+'\x20'+_0x402df7(_0x1d9d03[_0x453209(0x3c6)],_0x453209(0x1e3))+_0x453209(0x387));}async function _0x2b06d1(_0x545221,_0x2c07ef=0x0){const _0x19f849=_0x3136f7;process[_0x19f849(0x313)][_0x19f849(0x204)]('\x0a'),console[_0x19f849(0x499)](_0x402df7(_0x1d9d03[_0x19f849(0x2f7)],'\x20\x20[okdb]\x20shutting\x20down…'));try{await _0x545221['close']();}catch(_0x15b191){console[_0x19f849(0x202)](_0x402df7(_0x1d9d03[_0x19f849(0x4a0)],'\x20\x20'+_0x15b191[_0x19f849(0x2a5)]));}process[_0x19f849(0x463)](_0x2c07ef);}function _0x191811(_0x5ce0b1){const _0x36442f=_0x3136f7,_0x95c227=_0x5ce0b1[_0x36442f(0x3ca)]!=='default'?_0x402df7(_0x1d9d03[_0x36442f(0x2f7)],'['+_0x5ce0b1[_0x36442f(0x3ca)]+']'):'';return _0x402df7(_0x1d9d03[_0x36442f(0x416)]+_0x1d9d03['cyan'],_0x36442f(0x250))+_0x95c227+_0x402df7(_0x1d9d03[_0x36442f(0x2b1)],'>\x20');}const _0xb953be=new Set(['GET',_0x3136f7(0x491),'PUT',_0x3136f7(0x300),_0x3136f7(0x47d)]);async function _0x37c092(_0x184712,_0xf1fe57,_0x28db62,_0x44ad02,_0x4276e4,_0x8e01d4){const _0x9215f3=_0x3136f7;_0x184712=_0x184712[_0x9215f3(0x34d)]();if(!_0x184712||_0x184712[_0x9215f3(0x424)]('#'))return;const _0x5f0902=_0x563f11(_0x184712),{flags:_0x1c8183,rest:_0x3f9f65}=_0x70bb86(_0x5f0902);if(!_0x3f9f65[_0x9215f3(0x48c)])return;const _0x50bbb7=_0x3f9f65[0x0],_0x48dbb6=_0x50bbb7[_0x9215f3(0x285)]();if(_0x48dbb6===_0x9215f3(0x1f6)){if(_0x3f9f65[0x1])_0x3fe033(_0xf1fe57,_0x252226(_0x3f9f65[0x1],_0x1c8183['env']??_0x4276e4[_0x9215f3(0x3ca)]));else _0x4df7b0(_0x4276e4);return;}if(_0x48dbb6===_0x9215f3(0x33a)){const _0x52054d=_0x3f9f65[0x1];if(!_0x52054d){console[_0x9215f3(0x499)](_0x402df7(_0x1d9d03[_0x9215f3(0x4a0)],'\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a'));return;}try{_0xf1fe57[_0x9215f3(0x3ca)](_0x52054d),_0x4276e4[_0x9215f3(0x3ca)]=_0x52054d,_0x8e01d4?.[_0x9215f3(0x3ac)](_0x191811(_0x4276e4)),console[_0x9215f3(0x499)](_0x9215f3(0x1e9)+_0x402df7(_0x1d9d03['green'],'✓')+'\x20active\x20env:\x20'+_0x402df7(_0x1d9d03[_0x9215f3(0x416)]+_0x1d9d03[_0x9215f3(0x490)],_0x52054d)+'\x0a');}catch{console['log']('\x0a\x20\x20'+_0x402df7(_0x1d9d03[_0x9215f3(0x4a0)],'✗')+_0x9215f3(0x3a7)+_0x402df7(_0x1d9d03[_0x9215f3(0x416)],_0x52054d)+'\x20not\x20found'+_0x402df7(_0x1d9d03['dim'],_0x9215f3(0x426)));}return;}if(_0x48dbb6===_0x9215f3(0x1f3)){const _0x4b7de4=[..._0xf1fe57[_0x9215f3(0x358)][_0x9215f3(0x3fd)]()][_0x9215f3(0x314)](_0x57d738=>!_0x57d738[_0x9215f3(0x424)]('~'));console[_0x9215f3(0x499)]('');for(const _0x43acb9 of _0x4b7de4){const _0x4fdc77=_0x43acb9===_0x4276e4[_0x9215f3(0x3ca)];console['log']('\x20\x20'+(_0x4fdc77?_0x402df7(_0x1d9d03[_0x9215f3(0x46f)],'●'):_0x402df7(_0x1d9d03[_0x9215f3(0x3c6)],'○'))+'\x20\x20'+(_0x4fdc77?_0x402df7(_0x1d9d03[_0x9215f3(0x416)]+_0x1d9d03['cyan'],_0x43acb9):_0x402df7(_0x1d9d03[_0x9215f3(0x3c6)],_0x43acb9)));}console['log'](_0x9215f3(0x1e9)+_0x402df7(_0x1d9d03['dim'],_0x9215f3(0x440))+'\x20'+_0x402df7(_0x1d9d03[_0x9215f3(0x490)],_0x4276e4[_0x9215f3(0x3ca)])),console[_0x9215f3(0x499)]('');return;}if(_0x48dbb6==='ENVS'){const _0x212b86=[..._0xf1fe57[_0x9215f3(0x358)][_0x9215f3(0x384)]()][_0x9215f3(0x314)](_0x4e4a50=>!_0x4e4a50[_0x9215f3(0x2b5)]['startsWith']('~'));console['log']('');const _0x21823a=Math[_0x9215f3(0x2be)](..._0x212b86[_0x9215f3(0x308)](_0x252266=>_0x252266[_0x9215f3(0x2b5)][_0x9215f3(0x48c)]));for(const _0x18178a of _0x212b86){const _0x4ed905=_0x18178a[_0x9215f3(0x2b5)]===_0x4276e4[_0x9215f3(0x3ca)],_0x220647=_0x4ed905?_0x402df7(_0x1d9d03['green'],'●'):_0x402df7(_0x1d9d03[_0x9215f3(0x3c6)],'○'),_0x1e8d85=_0x4ed905?_0x402df7(_0x1d9d03[_0x9215f3(0x416)]+_0x1d9d03[_0x9215f3(0x490)],_0x18178a[_0x9215f3(0x2b5)]['padEnd'](_0x21823a)):_0x402df7(_0x1d9d03[_0x9215f3(0x3c6)],_0x18178a[_0x9215f3(0x2b5)][_0x9215f3(0x495)](_0x21823a)),_0x5819b5=[..._0x18178a[_0x9215f3(0x31d)][_0x9215f3(0x3fd)]()][_0x9215f3(0x314)](_0x5352ab=>!_0x5352ab[_0x9215f3(0x424)]('~')),_0x3abae8=_0x5819b5[_0x9215f3(0x48c)]?_0x402df7(_0x1d9d03[_0x9215f3(0x3c6)],_0x5819b5[_0x9215f3(0x1c2)](0x0,0x5)[_0x9215f3(0x2d8)](',\x20')+(_0x5819b5[_0x9215f3(0x48c)]>0x5?'\x20\x20+'+(_0x5819b5[_0x9215f3(0x48c)]-0x5)+_0x9215f3(0x303):'')):_0x402df7(_0x1d9d03[_0x9215f3(0x3c6)],_0x9215f3(0x356));console[_0x9215f3(0x499)]('\x20\x20'+_0x220647+'\x20\x20'+_0x1e8d85+'\x20\x20'+_0x3abae8);}console[_0x9215f3(0x499)]('');return;}if(_0x48dbb6===_0x9215f3(0x4ad)){const _0x58636b=_0x1c8183[_0x9215f3(0x3ca)]??_0x3f9f65[0x1]??_0x4276e4[_0x9215f3(0x3ca)];try{const _0xf75fc5=_0xf1fe57[_0x9215f3(0x3ca)](_0x58636b),_0x388515=[..._0xf75fc5[_0x9215f3(0x31d)][_0x9215f3(0x3fd)]()][_0x9215f3(0x314)](_0x4262dd=>!_0x4262dd[_0x9215f3(0x424)]('~'))['sort']();console[_0x9215f3(0x499)](_0x9215f3(0x1e9)+_0x402df7(_0x1d9d03[_0x9215f3(0x3c6)],_0x388515[_0x9215f3(0x48c)]+'\x20type'+(_0x388515[_0x9215f3(0x48c)]!==0x1?'s':'')+'\x20in\x20'+_0x58636b));for(const _0x139a9a of _0x388515){const _0x533c81=_0xf75fc5[_0x9215f3(0x31d)]['get'](_0x139a9a),_0x2f419d=_0x533c81?.['data']?.[_0x9215f3(0x45f)]?.()??0x0,_0x23a24e=_0x402df7(_0x1d9d03[_0x9215f3(0x416)]+_0x1d9d03[_0x9215f3(0x490)],_0x139a9a[_0x9215f3(0x495)](0x1c));console['log'](_0x9215f3(0x364)+_0x23a24e+'\x20\x20'+_0x402df7(_0x1d9d03[_0x9215f3(0x255)],String(_0x2f419d)['padStart'](0x6))+'\x20'+_0x402df7(_0x1d9d03[_0x9215f3(0x3c6)],'records'));}console[_0x9215f3(0x499)]('');}catch(_0x4fbf17){console['error'](_0x402df7(_0x1d9d03[_0x9215f3(0x4a0)],_0x9215f3(0x1e9)+_0x4fbf17[_0x9215f3(0x2a5)]+'\x0a'));}return;}if(_0x48dbb6===_0x9215f3(0x1fb)){_0xa3a137(_0xf1fe57,_0x3f9f65[_0x9215f3(0x1c2)](0x1)[_0x9215f3(0x2d8)]('\x20'));return;}if(_0x48dbb6===_0x9215f3(0x464)){const _0x385e8c=(_0x3f9f65[0x1]??'')[_0x9215f3(0x291)]();if(!_0x385e8c||_0x385e8c==='on')_0x44ad02[_0x9215f3(0x323)]=!![],_0x44ad02[_0x9215f3(0x3a2)]=_0x9215f3(0x312),console[_0x9215f3(0x499)](_0x9215f3(0x1e9)+_0x402df7(_0x1d9d03[_0x9215f3(0x46f)],'✓')+_0x9215f3(0x38c)+_0x402df7(_0x1d9d03[_0x9215f3(0x3c6)],'level:\x20info')+'\x0a');else{if(_0x385e8c===_0x9215f3(0x298))_0x44ad02[_0x9215f3(0x323)]=![],console[_0x9215f3(0x499)](_0x9215f3(0x1e9)+_0x402df7(_0x1d9d03['yellow'],'○')+_0x9215f3(0x42b));else _0x124412[_0x385e8c]!==undefined?(_0x44ad02[_0x9215f3(0x323)]=!![],_0x44ad02[_0x9215f3(0x3a2)]=_0x385e8c,console[_0x9215f3(0x499)](_0x9215f3(0x1e9)+_0x402df7(_0x1d9d03['green'],'✓')+'\x20log\x20level:\x20'+_0x402df7(_0x1d9d03['bold'],_0x385e8c)+'\x0a')):console[_0x9215f3(0x202)](_0x402df7(_0x1d9d03[_0x9215f3(0x4a0)],_0x9215f3(0x275)));}return;}if(_0x48dbb6===_0x9215f3(0x306)||_0x48dbb6==='QUIT'){await _0x2b06d1(_0xf1fe57,0x0);return;}if(_0x48dbb6===_0x9215f3(0x286)){const _0xdc5b5=_0x9215f3(0x399)+_0x28db62[_0x9215f3(0x21b)]+'/admin/index.html',_0x222e9e=process[_0x9215f3(0x25e)]==='win32'?_0x9215f3(0x2b8)+_0xdc5b5:process[_0x9215f3(0x25e)]===_0x9215f3(0x2f2)?'open\x20'+_0xdc5b5:_0x9215f3(0x34e)+_0xdc5b5;require$$4[_0x9215f3(0x256)](_0x222e9e),console[_0x9215f3(0x499)]('\x0a\x20\x20'+_0x402df7(_0x1d9d03['green'],'✓')+'\x20opening\x20'+_0x402df7(_0x1d9d03[_0x9215f3(0x490)],_0xdc5b5)+'\x0a');return;}let _0x450922,_0x1a91e7,_0x1720e3;if(_0xb953be[_0x9215f3(0x3fe)](_0x48dbb6)){_0x450922=_0x48dbb6,_0x1a91e7=_0x3f9f65[0x1],_0x1720e3=_0x3f9f65[_0x9215f3(0x1c2)](0x2);if(!_0x1a91e7){console[_0x9215f3(0x202)](_0x402df7(_0x1d9d03[_0x9215f3(0x4a0)],_0x9215f3(0x46b)+_0x50bbb7+_0x9215f3(0x2ce)));return;}}else _0x450922=null,_0x1a91e7=_0x3f9f65[0x0],_0x1720e3=_0x3f9f65[_0x9215f3(0x1c2)](0x1);const _0x300510=_0x1c8183[_0x9215f3(0x3ca)]??_0x4276e4[_0x9215f3(0x3ca)],_0x541375=_0x252226(_0x1a91e7,_0x300510);if(_0x1c8183[_0x9215f3(0x264)]){_0x3fe033(_0xf1fe57,_0x541375);return;}let _0xef058d=null;if(_0x1720e3['length']){const _0x597063=_0x1720e3[_0x9215f3(0x2d8)]('\x20');try{_0xef058d=_0x5d2be3(_0x597063);}catch(_0x5e58f8){console[_0x9215f3(0x202)](_0x402df7(_0x1d9d03['red'],_0x9215f3(0x348)+_0x597063+_0x9215f3(0x1e9)+_0x402df7(_0x1d9d03[_0x9215f3(0x3c6)],_0x5e58f8[_0x9215f3(0x2a5)])+'\x0a'));return;}}if(!_0x450922)_0x450922=_0xef058d!==null?_0x9215f3(0x491):'GET';try{const _0x578a10=await _0xe42de1(_0xf1fe57,_0x450922,_0x541375,_0xef058d);_0x4f316f(_0x578a10[_0x9215f3(0x219)],_0x578a10[_0x9215f3(0x2e1)]);}catch(_0x10e09d){console[_0x9215f3(0x202)]('\x0a\x20\x20'+_0x402df7(_0x1d9d03[_0x9215f3(0x4a0)],'✗')+'\x20'+_0x10e09d[_0x9215f3(0x2a5)]+'\x0a');}}class _0x1a2e4e{constructor(){const _0x15fb40=_0x3136f7;this[_0x15fb40(0x321)]=new Map(),this[_0x15fb40(0x1e7)]=null,this[_0x15fb40(0x397)]=![];}}function _0x28949d(_0x1fe5c8){const _0x1ad684=_0x3136f7,_0xa97ee9=new _0x1a2e4e();for(const _0x30c1cd of _0x1fe5c8){if(_0x30c1cd[_0x1ad684(0x45d)]?.[_0x1ad684(0x2cf)])continue;const _0x31a239=_0x30c1cd[_0x1ad684(0x3c3)]['replace'](/^\/api/,'')['replace'](/^\[\/env\/:env=[^\]]*\]/,'')['replace'](/^\//,'');if(!_0x31a239)continue;let _0x3ffbd3=_0xa97ee9;for(const _0x5b0f37 of _0x31a239[_0x1ad684(0x4a2)]('/')[_0x1ad684(0x314)](Boolean)){if(_0x5b0f37[_0x1ad684(0x424)](':')){const _0x32f816=_0x5b0f37[_0x1ad684(0x1c2)](0x1);if(!_0x3ffbd3['dynamic'])_0x3ffbd3[_0x1ad684(0x1e7)]={'param':_0x32f816,'node':new _0x1a2e4e()};_0x3ffbd3=_0x3ffbd3['dynamic']['node'];}else{if(!_0x3ffbd3[_0x1ad684(0x321)][_0x1ad684(0x3fe)](_0x5b0f37))_0x3ffbd3[_0x1ad684(0x321)]['set'](_0x5b0f37,new _0x1a2e4e());_0x3ffbd3=_0x3ffbd3[_0x1ad684(0x321)][_0x1ad684(0x26b)](_0x5b0f37);}}_0x3ffbd3[_0x1ad684(0x397)]=!![];}return _0xa97ee9;}const _0x5a33fb=new Map();function _0x5096d2(_0x318b71,_0x105af0,_0x49ce2f){const _0x405f08=_0x3136f7,_0x32e2d8=_0x5a33fb[_0x405f08(0x26b)](_0x318b71);if(_0x32e2d8&&_0x32e2d8[_0x405f08(0x239)]>Date[_0x405f08(0x311)]())return _0x32e2d8[_0x405f08(0x305)];const _0x5a613a=_0x49ce2f();return _0x5a33fb[_0x405f08(0x34b)](_0x318b71,{'val':_0x5a613a,'exp':Date[_0x405f08(0x311)]()+_0x105af0}),_0x5a613a;}function _0xafdf65(_0xf8b5b4,_0xdc8c,_0x58ade1,_0x25f30f){const _0x4b4f86=_0x3136f7,_0x5be8b4=_0xdc8c[_0x4b4f86(0x3ca)]??_0x25f30f[_0x4b4f86(0x3ca)];switch(_0xf8b5b4){case'env':return[..._0x58ade1[_0x4b4f86(0x358)][_0x4b4f86(0x3fd)]()][_0x4b4f86(0x314)](_0xa2bcc=>!_0xa2bcc[_0x4b4f86(0x424)]('~'));case _0x4b4f86(0x398):return _0x5096d2(_0x4b4f86(0x36b)+_0x5be8b4,0x7d0,()=>{const _0x417a2d=_0x4b4f86;try{return[..._0x58ade1[_0x417a2d(0x3ca)](_0x5be8b4)[_0x417a2d(0x31d)][_0x417a2d(0x3fd)]()]['filter'](_0x4f099c=>!_0x4f099c[_0x417a2d(0x424)]('~'));}catch{return[];}});case _0x4b4f86(0x22c):if(!_0xdc8c[_0x4b4f86(0x398)])return[];return _0x5096d2('keys:'+_0x5be8b4+':'+_0xdc8c[_0x4b4f86(0x398)],0x5dc,()=>{const _0x5cef41=_0x4b4f86;try{const _0x531c53=_0x58ade1[_0x5cef41(0x3ca)](_0x5be8b4)[_0x5cef41(0x31d)][_0x5cef41(0x26b)](_0xdc8c[_0x5cef41(0x398)]);if(!_0x531c53?.[_0x5cef41(0x3d0)])return[];const _0x5dc81e=[];for(const {key:_0x34cd74}of _0x531c53[_0x5cef41(0x3d0)][_0x5cef41(0x2ee)]({'limit':0x32})){_0x5dc81e['push'](String(_0x34cd74));if(_0x5dc81e[_0x5cef41(0x48c)]>=0x32)break;}return _0x5dc81e;}catch{return[];}});case'index':if(!_0xdc8c[_0x4b4f86(0x398)])return[];return _0x5096d2(_0x4b4f86(0x41b)+_0x5be8b4+':'+_0xdc8c[_0x4b4f86(0x398)],0x7d0,()=>{const _0x54eee3=_0x4b4f86;try{const _0x4eb387=_0x58ade1[_0x54eee3(0x3ca)](_0x5be8b4)[_0x54eee3(0x31d)][_0x54eee3(0x26b)](_0xdc8c[_0x54eee3(0x398)]);return _0x4eb387?[..._0x4eb387[_0x54eee3(0x38e)]?.['keys']()??[]]:[];}catch{return[];}});case _0x4b4f86(0x227):if(!_0xdc8c[_0x4b4f86(0x398)])return[];return _0x5096d2('fts:'+_0x5be8b4+':'+_0xdc8c[_0x4b4f86(0x398)],0x7d0,()=>{const _0x39f022=_0x4b4f86;try{return _0x58ade1['fts']?.[_0x39f022(0x3e7)]?.(_0xdc8c['type'],_0x58ade1['env'](_0x5be8b4))?.[_0x39f022(0x308)](_0x76b935=>_0x76b935[_0x39f022(0x2b5)])??[];}catch{return[];}});default:return[];}}function _0x2b6d7e(_0x5217af,_0x5b5d3a,_0x9bd6dd,_0xe82008){const _0x2ae1bd=_0x3136f7,_0x4b333f=_0x5217af[_0x2ae1bd(0x479)]('/'),_0x2a4711=_0x5217af['split']('/'),_0x29ee4a=_0x4b333f?_0x2a4711[_0x2ae1bd(0x1c2)](0x0,-0x1):_0x2a4711[_0x2ae1bd(0x1c2)](0x0,-0x1),_0x15a3ec=_0x4b333f?'':_0x2a4711[_0x2a4711[_0x2ae1bd(0x48c)]-0x1];let _0x1a8960=_0x5b5d3a;const _0x172e47={};for(const _0x7f0e72 of _0x29ee4a){if(!_0x7f0e72)continue;if(_0x1a8960[_0x2ae1bd(0x321)]['has'](_0x7f0e72))_0x1a8960=_0x1a8960['children'][_0x2ae1bd(0x26b)](_0x7f0e72);else{if(_0x1a8960[_0x2ae1bd(0x1e7)])_0x172e47[_0x1a8960[_0x2ae1bd(0x1e7)][_0x2ae1bd(0x327)]]=_0x7f0e72,_0x1a8960=_0x1a8960[_0x2ae1bd(0x1e7)]['node'];else return[];}}const _0x5401c8=_0x29ee4a[_0x2ae1bd(0x314)](Boolean),_0xb9dd62=_0x5401c8['length']?_0x5401c8[_0x2ae1bd(0x2d8)]('/')+'/':'',_0xe2ad80=[];for(const [_0x11d9c0]of _0x1a8960['children']){if(_0x11d9c0[_0x2ae1bd(0x424)](_0x15a3ec))_0xe2ad80['push'](_0xb9dd62+_0x11d9c0);}if(_0x1a8960[_0x2ae1bd(0x1e7)])for(const _0x33ae23 of _0xafdf65(_0x1a8960[_0x2ae1bd(0x1e7)][_0x2ae1bd(0x327)],_0x172e47,_0x9bd6dd,_0xe82008)){if(String(_0x33ae23)[_0x2ae1bd(0x424)](_0x15a3ec))_0xe2ad80[_0x2ae1bd(0x488)](_0xb9dd62+_0x33ae23);}return _0xe2ad80[_0x2ae1bd(0x1c2)](0x0,0x64);}const _0x19486f=[_0x3136f7(0x264),'use',_0x3136f7(0x3ca),_0x3136f7(0x431),'types',_0x3136f7(0x4a3),_0x3136f7(0x2b6),_0x3136f7(0x460),'exit','quit'];function _0x5dc5d7(_0x5bb043,_0x129c29,_0x3c87c4){return function _0x499613(_0x261743){const _0x44b230=_0x44a0;try{const _0x256039=_0x261743[_0x44b230(0x480)](/\s[{[]/),_0x577561=_0x256039>=0x0?_0x261743[_0x44b230(0x1c2)](0x0,_0x256039):_0x261743,_0x5ce39c=_0x577561[_0x44b230(0x44c)]();if(!_0x5ce39c){const _0x5468da=[..._0x19486f,...[..._0x5bb043[_0x44b230(0x321)]['keys']()]][_0x44b230(0x1c2)](0x0,0x64);return[_0x5468da,''];}const _0x5d7672=_0x5ce39c[_0x44b230(0x4a2)](/\s+/),_0x3991f9=_0x5d7672[0x0],_0x5daaa9=_0x3991f9[_0x44b230(0x285)]();if(_0x5d7672[_0x44b230(0x48c)]===0x1){const _0x5ebf0c=_0x3991f9['toLowerCase'](),_0x2bc088=_0x19486f[_0x44b230(0x314)](_0x209741=>_0x209741[_0x44b230(0x424)](_0x5ebf0c)),_0x4c444f=_0x2b6d7e(_0x3991f9,_0x5bb043,_0x129c29,_0x3c87c4),_0x4a3c10=[...new Set([..._0x2bc088,..._0x4c444f])]['slice'](0x0,0x64);return[_0x4a3c10,_0x3991f9];}if(_0xb953be['has'](_0x5daaa9)&&_0x5d7672[_0x44b230(0x48c)]===0x2){const _0x4beda5=_0x5d7672[0x1],_0xce4c4d=_0x2b6d7e(_0x4beda5,_0x5bb043,_0x129c29,_0x3c87c4);return[_0xce4c4d[_0x44b230(0x308)](_0x57ae76=>_0x3991f9+'\x20'+_0x57ae76),_0x3991f9+'\x20'+_0x4beda5];}if(!_0xb953be[_0x44b230(0x3fe)](_0x5daaa9)&&_0x5d7672['length']>0x1){const _0x1aef16=_0x2b6d7e(_0x3991f9,_0x5bb043,_0x129c29,_0x3c87c4),_0x454a65='\x20'+_0x5d7672[_0x44b230(0x1c2)](0x1)[_0x44b230(0x2d8)]('\x20');return[_0x1aef16[_0x44b230(0x308)](_0x1c143a=>_0x1c143a+_0x454a65),_0x3991f9+_0x454a65];}return[[],_0x261743];}catch{return[[],_0x261743];}};}async function _0x547b76(_0x11c47c,_0x4c4e1b){const _0x47abc9=_0x3136f7,_0x4189d2={'enabled':!![],'level':_0x4c4e1b['logLevel']??_0x47abc9(0x312)},_0x2ae445={'env':_0x47abc9(0x200)},_0x5cf3e2={'current':null},_0x367af7=_0x28949d(_0x11c47c[_0x47abc9(0x39c)][_0x47abc9(0x238)]()),_0xd51850=_0x5dc5d7(_0x367af7,_0x11c47c,_0x2ae445);_0x11c47c[_0x47abc9(0x499)][_0x47abc9(0x287)](_0x461324=>{const _0x4ace3a=_0x47abc9;if(!_0x4189d2['enabled'])return;_0x182a9b(_0x461324,_0x4189d2[_0x4ace3a(0x3a2)]),_0x5cf3e2[_0x4ace3a(0x22f)]?.[_0x4ace3a(0x489)](!![]);}),_0x26917e(_0x11c47c,_0x4c4e1b);const _0x132fa3=_0x51b846[_0x47abc9(0x4a6)]({'input':process[_0x47abc9(0x429)],'output':process[_0x47abc9(0x313)],'terminal':!![],'completer':_0xd51850,'prompt':_0x191811(_0x2ae445),'historySize':_0x22d439});try{const _0x5b6667=_0x562786[_0x47abc9(0x389)](_0x2aa2c7,_0x47abc9(0x484))['split']('\x0a')[_0x47abc9(0x314)](Boolean);_0x132fa3[_0x47abc9(0x34c)]=_0x5b6667[_0x47abc9(0x1d4)]()[_0x47abc9(0x1c2)](0x0,_0x22d439);}catch{}return _0x5cf3e2[_0x47abc9(0x22f)]=_0x132fa3,_0x132fa3['on'](_0x47abc9(0x257),async _0x497ff2=>{const _0x4305b1=_0x47abc9;_0x132fa3[_0x4305b1(0x443)]();try{await _0x37c092(_0x497ff2,_0x11c47c,_0x4c4e1b,_0x4189d2,_0x2ae445,_0x132fa3);}catch(_0x1b5bc1){console['error'](_0x402df7(_0x1d9d03[_0x4305b1(0x4a0)],_0x4305b1(0x244)+_0x1b5bc1[_0x4305b1(0x2a5)]));}finally{_0x132fa3[_0x4305b1(0x2c1)](),_0x132fa3[_0x4305b1(0x489)]();}}),_0x132fa3['on'](_0x47abc9(0x2d9),()=>{const _0x3e6f70=_0x47abc9;try{const _0x208594=[..._0x132fa3['history']][_0x3e6f70(0x1d4)]()[_0x3e6f70(0x314)](Boolean)['slice'](0x0,_0x22d439);_0x562786[_0x3e6f70(0x22d)](_0x2aa2c7,_0x208594[_0x3e6f70(0x2d8)]('\x0a')+'\x0a');}catch{}_0x2b06d1(_0x11c47c,0x0);}),process['on']('SIGINT',()=>{const _0x2ed5f0=_0x47abc9;if(_0x132fa3[_0x2ed5f0(0x257)]==='')_0x2b06d1(_0x11c47c,0x0);else process[_0x2ed5f0(0x313)][_0x2ed5f0(0x204)]('\x0a'),_0x132fa3[_0x2ed5f0(0x2a1)](0x0),_0x132fa3[_0x2ed5f0(0x489)]();}),process['on'](_0x47abc9(0x324),()=>_0x2b06d1(_0x11c47c,0x0)),_0x132fa3['prompt'](),_0x132fa3;}return okdbShell={'start':_0x547b76,'colorLog':_0x182a9b,'lenientParse':_0x5d2be3,'_splitLine':_0x563f11,'_formatRouteHelpLines':_0x17a7aa,'_routeSummary':_0x94fddb,'_routeTags':_0x54fb96},okdbShell;}var hasRequiredOkdb;function requireOkdb(){const _0x3a4bd7=_0x538f61;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x3a4bd7(0x3b1)]();}catch{}const _0x4f4c56=require$$1$1,_0x10d084=require$$1;function _0x131052(_0x14debe){const _0x4de07f=_0x3a4bd7,_0xb1ba1d=_0x14debe[_0x4de07f(0x1c2)](0x2),_0x6413d7={};let _0x4c93bc=0x0;while(_0x4c93bc<_0xb1ba1d[_0x4de07f(0x48c)]){const _0x3b0649=_0xb1ba1d[_0x4c93bc];if(_0x3b0649==='--port'||_0x3b0649==='-p')_0x6413d7[_0x4de07f(0x21b)]=Number(_0xb1ba1d[++_0x4c93bc]);else{if(_0x3b0649==='--path'||_0x3b0649==='-d')_0x6413d7[_0x4de07f(0x3c3)]=_0xb1ba1d[++_0x4c93bc];else{if(_0x3b0649===_0x4de07f(0x2ef)||_0x3b0649==='-k')_0x6413d7[_0x4de07f(0x22c)]=_0xb1ba1d[++_0x4c93bc];else{if(_0x3b0649===_0x4de07f(0x2f9)||_0x3b0649==='-c')_0x6413d7[_0x4de07f(0x42e)]=_0xb1ba1d[++_0x4c93bc];else{if(_0x3b0649===_0x4de07f(0x316))_0x6413d7[_0x4de07f(0x43e)]=_0xb1ba1d[++_0x4c93bc];else{if(_0x3b0649==='--no-repl')_0x6413d7['noRepl']=!![];else{if(_0x3b0649===_0x4de07f(0x49b))_0x6413d7[_0x4de07f(0x1c0)]=!![];else{if(_0x3b0649===_0x4de07f(0x44a)||_0x3b0649==='-e')_0x6413d7[_0x4de07f(0x3ca)]=_0xb1ba1d[++_0x4c93bc];else{if(_0x3b0649==='--types')_0x6413d7[_0x4de07f(0x25d)]=_0xb1ba1d[++_0x4c93bc];else{if(_0x3b0649==='--changes')_0x6413d7['changes']=!![];else{if(_0x3b0649===_0x4de07f(0x3f7))_0x6413d7['blobs']=!![];else{if(_0x3b0649===_0x4de07f(0x1fc))_0x6413d7['drop']=!![];else{if(_0x3b0649===_0x4de07f(0x494)){const _0x2bb554=[];while(_0x4c93bc+0x1<_0xb1ba1d[_0x4de07f(0x48c)]&&!_0xb1ba1d[_0x4c93bc+0x1][_0x4de07f(0x424)]('--')){_0x2bb554[_0x4de07f(0x488)](_0xb1ba1d[++_0x4c93bc]);}_0x6413d7[_0x4de07f(0x460)]=_0x2bb554['length']>0x0?_0x2bb554:!![];}else{if(_0x3b0649===_0x4de07f(0x23d))_0x6413d7['logRequests']=!![];else{if(_0x3b0649===_0x4de07f(0x351))_0x6413d7['name']=_0xb1ba1d[++_0x4c93bc];else{if(_0x3b0649===_0x4de07f(0x3f3))_0x6413d7[_0x4de07f(0x43b)]=_0xb1ba1d[++_0x4c93bc];else{if(_0x3b0649===_0x4de07f(0x2ae))_0x6413d7['label']=_0xb1ba1d[++_0x4c93bc];else{if(_0x3b0649===_0x4de07f(0x375))_0x6413d7[_0x4de07f(0x3cc)]=_0xb1ba1d[++_0x4c93bc];else{if(_0x3b0649===_0x4de07f(0x289))_0x6413d7[_0x4de07f(0x240)]=_0xb1ba1d[++_0x4c93bc];else{if(_0x3b0649===_0x4de07f(0x404))_0x6413d7['ttl']=_0xb1ba1d[++_0x4c93bc];else{if(_0x3b0649===_0x4de07f(0x3ee))_0x6413d7[_0x4de07f(0x438)]=_0xb1ba1d[++_0x4c93bc];else{if(_0x3b0649===_0x4de07f(0x1e4)||_0x3b0649==='-u')_0x6413d7['username']=_0xb1ba1d[++_0x4c93bc];else{if(_0x3b0649==='--address')_0x6413d7[_0x4de07f(0x2fb)]=_0xb1ba1d[++_0x4c93bc];else{if(_0x3b0649===_0x4de07f(0x26d)||_0x3b0649==='-v'){const _0x42146f=require$$2;console[_0x4de07f(0x499)](_0x42146f['version']),process[_0x4de07f(0x463)](0x0);}else(_0x3b0649===_0x4de07f(0x49d)||_0x3b0649==='-h')&&(_0x49a788(),process[_0x4de07f(0x463)](0x0));}}}}}}}}}}}}}}}}}}}}}}}_0x4c93bc++;}return _0x6413d7;}function _0x49a788(){const _0x1c510d=_0x3a4bd7;console[_0x1c510d(0x499)](_0x1c510d(0x1e8));}const _0x16bdcc=new Set(['debug',_0x3a4bd7(0x312),_0x3a4bd7(0x208),_0x3a4bd7(0x202)]);function _0x48c23c(_0x47937c){const _0x398fbf=_0x3a4bd7,_0x493a26=_0x47937c['config']?_0x4f4c56[_0x398fbf(0x3e6)](_0x47937c[_0x398fbf(0x42e)]):_0x4f4c56[_0x398fbf(0x3e6)](_0x398fbf(0x1ce));let _0xc5cd52={};if(_0x10d084['existsSync'](_0x493a26))try{const _0x594147=_0x10d084[_0x398fbf(0x389)](_0x493a26,_0x398fbf(0x484))[_0x398fbf(0x279)](/^\uFEFF/,'');_0xc5cd52=JSON['parse'](_0x594147),console[_0x398fbf(0x499)](_0x398fbf(0x450)+_0x493a26);}catch(_0x43e08b){console['error'](_0x398fbf(0x3f0)+_0x493a26+':\x20'+_0x43e08b[_0x398fbf(0x2a5)]),process[_0x398fbf(0x463)](0x1);}const _0x4281a3={'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},_0x4d85b5={'port':_0x47937c['port']??_0xc5cd52['port']??_0x4281a3[_0x398fbf(0x21b)]??0x2124,'dbPath':_0x47937c[_0x398fbf(0x3c3)]??_0xc5cd52['path']??_0x4281a3['path']??_0x398fbf(0x452),'key':_0x47937c[_0x398fbf(0x22c)]??_0xc5cd52[_0x398fbf(0x22c)]??_0x4281a3[_0x398fbf(0x22c)]??undefined,'logLevel':_0x47937c[_0x398fbf(0x43e)]??_0xc5cd52['logLevel']??_0x4281a3[_0x398fbf(0x43e)]??'info','noRepl':_0x47937c[_0x398fbf(0x319)]??_0xc5cd52[_0x398fbf(0x319)]??_0x4281a3[_0x398fbf(0x319)]??![],'noAdmin':_0x47937c[_0x398fbf(0x1c0)]??_0xc5cd52[_0x398fbf(0x1c0)]??_0x4281a3['noAdmin']??![],'admin':_0xc5cd52[_0x398fbf(0x36f)]??{},'api':_0xc5cd52[_0x398fbf(0x46c)]??undefined,'auth':_0xc5cd52[_0x398fbf(0x395)]??undefined,'mcp':_0xc5cd52['mcp']??undefined,'timeMachine':_0xc5cd52[_0x398fbf(0x2a6)]!==![]?_0xc5cd52[_0x398fbf(0x2a6)]??{}:![]};return _0x47937c[_0x398fbf(0x460)]!==undefined&&(_0x4d85b5['auth']=_0x4d85b5[_0x398fbf(0x395)]||{},_0x4d85b5[_0x398fbf(0x395)][_0x398fbf(0x460)]=_0x47937c[_0x398fbf(0x460)]),_0x47937c[_0x398fbf(0x35b)]&&(_0x4d85b5[_0x398fbf(0x492)]=_0x4d85b5[_0x398fbf(0x492)]||{},_0x4d85b5[_0x398fbf(0x492)][_0x398fbf(0x35b)]=!![]),(!Number['isInteger'](_0x4d85b5['port'])||_0x4d85b5[_0x398fbf(0x21b)]<0x1||_0x4d85b5[_0x398fbf(0x21b)]>0xffff)&&(console['error'](_0x398fbf(0x47f)+_0x4d85b5[_0x398fbf(0x21b)]+_0x398fbf(0x332)),process[_0x398fbf(0x463)](0x1)),!_0x16bdcc[_0x398fbf(0x3fe)](_0x4d85b5[_0x398fbf(0x43e)])&&(console[_0x398fbf(0x202)]('[okdb]\x20invalid\x20log\x20level:\x20\x22'+_0x4d85b5[_0x398fbf(0x43e)]+'\x22\x20(must\x20be\x20debug|info|warn|error)'),process[_0x398fbf(0x463)](0x1)),_0x4d85b5;}function _0x55364b(_0x23c7de){const _0x1dcbd7=_0x3a4bd7;return!!(_0x23c7de&&typeof _0x23c7de===_0x1dcbd7(0x1ee)&&!Array[_0x1dcbd7(0x27d)](_0x23c7de)&&Object[_0x1dcbd7(0x3fd)](_0x23c7de)[_0x1dcbd7(0x48c)]>0x0);}const _0x526838=!process['stdout']['isTTY']||!!process.env.NO_COLOR;function _0x6dff8c(_0x2c6623,_0x47f9f2){return _0x526838?_0x47f9f2:'\x1b['+_0x2c6623+'m'+_0x47f9f2+'\x1b[0m';}function _0x2f6e85(_0x34f4ac){const _0x4ffb71=_0x3a4bd7;if(!_0x34f4ac||_0x34f4ac[_0x4ffb71(0x48c)]===0x0)return;const _0x503b6d='─'[_0x4ffb71(0x3cf)](0x38);process[_0x4ffb71(0x30d)]['write']('\x0a'),process[_0x4ffb71(0x30d)]['write'](_0x6dff8c('33',_0x4ffb71(0x29a)+_0x34f4ac[_0x4ffb71(0x48c)]+_0x4ffb71(0x3f4)+(_0x34f4ac[_0x4ffb71(0x48c)]>0x1?'S':'')+'\x0a')),process[_0x4ffb71(0x30d)]['write']('\x20\x20'+_0x503b6d+'\x0a');for(const _0x58ed83 of _0x34f4ac){const _0xe9fe7e=_0x58ed83['level']===_0x4ffb71(0x202)?_0x6dff8c('31','\x20\x20✗'):_0x6dff8c('33',_0x4ffb71(0x3a5));process[_0x4ffb71(0x30d)]['write'](_0xe9fe7e+'\x20\x20'+_0x6dff8c('1',_0x58ed83[_0x4ffb71(0x33b)])+'\x0a'),process[_0x4ffb71(0x30d)][_0x4ffb71(0x204)]('\x20\x20\x20\x20\x20\x20\x20'+_0x58ed83[_0x4ffb71(0x2a5)]+'\x0a');if(_0x58ed83[_0x4ffb71(0x3ad)])process[_0x4ffb71(0x30d)][_0x4ffb71(0x204)]('\x20\x20\x20\x20\x20\x20\x20'+_0x6dff8c('2',_0x4ffb71(0x1b6)+_0x58ed83[_0x4ffb71(0x3ad)])+'\x0a');process['stderr'][_0x4ffb71(0x204)]('\x0a');}process[_0x4ffb71(0x30d)][_0x4ffb71(0x204)]('\x20\x20'+_0x503b6d+'\x0a\x0a');}function _0x3936c6(_0x3c1f63,_0x43b750){const _0x58159c=_0x3a4bd7,_0x470d1a=_0x3c1f63[_0x58159c(0x39c)][_0x58159c(0x353)](_0x43b750);return new Promise((_0x4ba17d,_0x1d20b2)=>{const _0x504627=_0x58159c;_0x470d1a[_0x504627(0x329)](_0x504627(0x411),_0x4ba17d),_0x470d1a['once'](_0x504627(0x202),_0x1d20b2);});}async function _0x3f5db3(_0x3d0d7e){const _0x2089d4=_0x3a4bd7,_0x1d3baa=require$$3;console[_0x2089d4(0x499)](_0x2089d4(0x26e));let _0x20a124=!![];const _0x335d2e=(_0xab3640,_0x45913f)=>{const _0x44df15=_0x2089d4;console[_0x44df15(0x499)]('\x20\x20'+(_0xab3640?'✓':'✗')+'\x20'+_0x45913f);if(!_0xab3640)_0x20a124=![];},_0x3b4005=Number(process[_0x2089d4(0x209)]['replace']('v','')['split']('.')[0x0]);_0x335d2e(_0x3b4005>=0x12,_0x2089d4(0x203)+process[_0x2089d4(0x209)]+(_0x3b4005<0x12?_0x2089d4(0x3ea):''));const _0x2699ac=_0x4f4c56[_0x2089d4(0x3e6)](_0x3d0d7e[_0x2089d4(0x1ba)]);try{_0x10d084[_0x2089d4(0x439)](_0x2699ac,{'recursive':!![]});const _0xa3addc=_0x4f4c56[_0x2089d4(0x2d8)](_0x2699ac,_0x2089d4(0x35a));_0x10d084['writeFileSync'](_0xa3addc,''),_0x10d084[_0x2089d4(0x3b8)](_0xa3addc),_0x335d2e(!![],_0x2089d4(0x4ab)+_0x2699ac);}catch(_0xa118a7){_0x335d2e(![],_0x2089d4(0x3ec)+_0x2699ac+_0x2089d4(0x1c8)+_0xa118a7[_0x2089d4(0x2a5)]+')');}const _0x46e4bb=await new Promise(_0x4a7f8=>{const _0x32e058=_0x2089d4,_0x3cf61e=_0x1d3baa[_0x32e058(0x1ea)]();_0x3cf61e[_0x32e058(0x329)]('error',()=>_0x4a7f8(![])),_0x3cf61e[_0x32e058(0x329)](_0x32e058(0x411),()=>{const _0x18ff9f=_0x32e058;_0x3cf61e[_0x18ff9f(0x2d9)](),_0x4a7f8(!![]);}),_0x3cf61e[_0x32e058(0x353)](_0x3d0d7e[_0x32e058(0x21b)],'127.0.0.1');});_0x335d2e(_0x46e4bb,_0x2089d4(0x3b5)+_0x3d0d7e[_0x2089d4(0x21b)]+'\x20'+(_0x46e4bb?_0x2089d4(0x417):_0x2089d4(0x48a)));const _0x499e6c=_0x4f4c56[_0x2089d4(0x3e6)](_0x2089d4(0x1ce));if(_0x10d084['existsSync'](_0x499e6c))try{JSON[_0x2089d4(0x24b)](_0x10d084[_0x2089d4(0x389)](_0x499e6c,_0x2089d4(0x484))[_0x2089d4(0x279)](/^\uFEFF/,'')),_0x335d2e(!![],_0x2089d4(0x2e0)+_0x499e6c);}catch(_0x7169a2){_0x335d2e(![],'config\x20file\x20invalid:\x20'+_0x7169a2[_0x2089d4(0x2a5)]);}else _0x335d2e(!![],_0x2089d4(0x1c6));console[_0x2089d4(0x499)](''),_0x20a124?console[_0x2089d4(0x499)](_0x2089d4(0x423)):(console['log']('\x20\x20Some\x20checks\x20failed.\x0a'),process[_0x2089d4(0x463)](0x1));}async function _0x275e00(){const _0x52e2f1=_0x3a4bd7,_0x3bc988=_0x4f4c56['resolve'](_0x52e2f1(0x1ce));!_0x10d084['existsSync'](_0x3bc988)?(_0x10d084[_0x52e2f1(0x22d)](_0x3bc988,JSON[_0x52e2f1(0x379)]({'port':0x2124,'path':_0x52e2f1(0x452),'logLevel':_0x52e2f1(0x312),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console['log'](_0x52e2f1(0x1cb))):console[_0x52e2f1(0x499)](_0x52e2f1(0x30b));const _0x40d280=_0x4f4c56[_0x52e2f1(0x3e6)]('./okdb-data');!_0x10d084[_0x52e2f1(0x293)](_0x40d280)?(_0x10d084[_0x52e2f1(0x439)](_0x40d280,{'recursive':!![]}),console[_0x52e2f1(0x499)]('[okdb]\x20created\x20./okdb-data')):console[_0x52e2f1(0x499)]('[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping'),console[_0x52e2f1(0x499)](_0x52e2f1(0x20e));}async function _0x201b7c(_0x1f1fc7){const _0x5ad22e=_0x3a4bd7,_0x5f54a0=_0x4f4c56[_0x5ad22e(0x3e6)](_0x1f1fc7['dbPath']);if(!_0x10d084[_0x5ad22e(0x293)](_0x5f54a0)){console[_0x5ad22e(0x499)](_0x5ad22e(0x448)+_0x5f54a0+_0x5ad22e(0x2c3));return;}const _0x3a636b=require$$0$2,_0x5720a3=_0x3a636b['createInterface']({'input':process[_0x5ad22e(0x429)],'output':process['stdout']}),_0x24aa1d=await new Promise(_0x22a236=>_0x5720a3[_0x5ad22e(0x1bf)](_0x5ad22e(0x45c)+_0x5f54a0+'?\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20',_0x22a236));_0x5720a3[_0x5ad22e(0x2d9)](),console['log']('');if(_0x24aa1d[_0x5ad22e(0x34d)]()['toLowerCase']()!==_0x5ad22e(0x413)){console[_0x5ad22e(0x499)](_0x5ad22e(0x2de));return;}_0x10d084[_0x5ad22e(0x31e)](_0x5f54a0,{'recursive':!![],'force':!![]}),console[_0x5ad22e(0x499)](_0x5ad22e(0x2bb)+_0x5f54a0+_0x5ad22e(0x23c));}async function _0xa4e409(_0x45e8a2,_0x1a021b){const _0x1e4588=_0x3a4bd7,_0x25b28f=require$$5,_0x489543=_0x4f4c56[_0x1e4588(0x3e6)](_0x1a021b[_0x1e4588(0x1ba)]);console[_0x1e4588(0x499)]('[okdb]\x20opening\x20'+_0x489543+'…');const _0x4f8326=new _0x25b28f(_0x489543,_0x1a021b[_0x1e4588(0x22c)]?{'encryptionKey':_0x1a021b[_0x1e4588(0x22c)]}:{});await _0x4f8326['open'](),console['log']('[okdb]\x20backing\x20up\x20to\x20'+_0x45e8a2+'…');const {envs:_0x2c8f56}=await _0x4f8326[_0x1e4588(0x427)][_0x1e4588(0x2aa)](_0x45e8a2);for(const _0x2a0d49 of _0x2c8f56){const _0x170e7a=_0x2a0d49['sizeBefore']>0x0?'\x20\x20('+(_0x2a0d49[_0x1e4588(0x44e)]/0x400/0x400)[_0x1e4588(0x1ff)](0x2)+_0x1e4588(0x44d)+(_0x2a0d49[_0x1e4588(0x2af)]/0x400/0x400)[_0x1e4588(0x1ff)](0x2)+_0x1e4588(0x32a):'';console['log'](_0x1e4588(0x233)+_0x2a0d49[_0x1e4588(0x2b5)]+_0x1e4588(0x1db)+_0x2a0d49['dest']+_0x170e7a);}await _0x4f8326[_0x1e4588(0x2d9)](),console[_0x1e4588(0x499)]('[okdb]\x20backup\x20complete');}async function _0x512c5f(_0x4dba18,_0x302f28,_0x308842){const _0x5ef43e=_0x3a4bd7,_0x1e5ee2=require$$5,_0x102045=_0x4f4c56['resolve'](_0x302f28[_0x5ef43e(0x1ba)]),_0xd691d9=_0x308842[_0x5ef43e(0x3ca)]??_0x5ef43e(0x200),_0x346f83=_0x308842[_0x5ef43e(0x25d)]?_0x308842[_0x5ef43e(0x25d)][_0x5ef43e(0x4a2)](',')['map'](_0xbda5ae=>_0xbda5ae[_0x5ef43e(0x34d)]()):null;console[_0x5ef43e(0x499)](_0x5ef43e(0x3a0)+_0x102045+'…');const _0x5534f5=new _0x1e5ee2(_0x102045,_0x302f28[_0x5ef43e(0x22c)]?{'encryptionKey':_0x302f28[_0x5ef43e(0x22c)]}:{});await _0x5534f5['open'](),console[_0x5ef43e(0x499)](_0x5ef43e(0x3ae)+_0xd691d9+_0x5ef43e(0x362)+_0x4dba18+'…');const _0x4aff3c=await _0x5534f5[_0x5ef43e(0x427)][_0x5ef43e(0x3e2)](_0x4dba18,{'envName':_0xd691d9,'types':_0x346f83,'includeChanges':!!_0x308842[_0x5ef43e(0x2c0)]});console[_0x5ef43e(0x499)]('[okdb]\x20exported\x20\x20types='+_0x4aff3c[_0x5ef43e(0x25d)]+_0x5ef43e(0x274)+_0x4aff3c['records']+_0x5ef43e(0x24e)+_0x4aff3c['changes']);if(_0x308842[_0x5ef43e(0x235)]){const _0x55184f=_0x4f4c56[_0x5ef43e(0x2d8)](_0x4f4c56[_0x5ef43e(0x3dc)](_0x4dba18),_0x5ef43e(0x235));process[_0x5ef43e(0x313)][_0x5ef43e(0x204)](_0x5ef43e(0x2a2));const {count:_0x343942,bytes:_0x52ca97}=await _0x5534f5[_0x5ef43e(0x427)]['exportBlobs'](_0x55184f);console[_0x5ef43e(0x499)](_0x5ef43e(0x4a7)+_0x55184f+'\x20\x20('+_0x343942+'\x20file'+(_0x343942!==0x1?'s':'')+',\x20'+(_0x52ca97/0x400/0x400)[_0x5ef43e(0x1ff)](0x2)+_0x5ef43e(0x32a));}await _0x5534f5[_0x5ef43e(0x2d9)](),console[_0x5ef43e(0x499)](_0x5ef43e(0x288));}async function _0x233b56(_0x2a98c0,_0x35a712,_0x3b2d2b){const _0x4527f6=_0x3a4bd7,_0x13eb26=require$$5,_0x501f8e=_0x4f4c56['resolve'](_0x35a712['dbPath']),_0x164f20=_0x3b2d2b['env']??null,_0x2f6a60=_0x3b2d2b[_0x4527f6(0x25d)]?_0x3b2d2b[_0x4527f6(0x25d)][_0x4527f6(0x4a2)](',')['map'](_0x14f415=>_0x14f415[_0x4527f6(0x34d)]()):null,_0x5a5901=!!_0x3b2d2b[_0x4527f6(0x325)];console[_0x4527f6(0x499)](_0x4527f6(0x3a0)+_0x501f8e+'…');const _0x293bf5=new _0x13eb26(_0x501f8e,_0x35a712[_0x4527f6(0x22c)]?{'encryptionKey':_0x35a712['key']}:{});await _0x293bf5[_0x4527f6(0x460)](),console['log'](_0x4527f6(0x1e0)+_0x2a98c0+'…');const _0x43c457=await _0x293bf5[_0x4527f6(0x427)][_0x4527f6(0x42a)](_0x2a98c0,{'envName':_0x164f20,'types':_0x2f6a60,'dropExisting':_0x5a5901,'includeChanges':!!_0x3b2d2b['changes'],'onProgress':({type:_0x245931,count:_0x44ff2e})=>{const _0x5ea5be=_0x4527f6;process['stdout'][_0x5ea5be(0x204)](_0x5ea5be(0x441)+_0x245931+':\x20'+_0x44ff2e+_0x5ea5be(0x336));}});process['stdout'][_0x4527f6(0x204)]('\x0a'),console[_0x4527f6(0x499)]('[okdb]\x20imported\x20\x20types='+_0x43c457[_0x4527f6(0x25d)]+'\x20\x20records='+_0x43c457[_0x4527f6(0x3bf)]+_0x4527f6(0x24e)+_0x43c457['changes']);if(_0x3b2d2b[_0x4527f6(0x235)]){const _0x32a6b0=_0x4f4c56[_0x4527f6(0x2d8)](_0x4f4c56[_0x4527f6(0x3dc)](_0x2a98c0),_0x4527f6(0x235));if(_0x10d084[_0x4527f6(0x293)](_0x32a6b0)){const {imported:_0x3a1b52,skipped:_0x3cafac}=await _0x293bf5[_0x4527f6(0x427)]['importBlobs'](_0x32a6b0);console[_0x4527f6(0x499)](_0x4527f6(0x1d7)+_0x3a1b52+_0x4527f6(0x28d)+_0x3cafac);}}await _0x293bf5['close'](),console['log'](_0x4527f6(0x3e3));}async function _0x59dc77(_0xc566fa,_0x534ed7){const _0x1c5517=_0x3a4bd7;_0x534ed7[_0x1c5517(0x43b)]&&!_0x534ed7[_0x1c5517(0x2b5)]&&(console[_0x1c5517(0x202)](_0x1c5517(0x4a4)),process[_0x1c5517(0x463)](0x1));const _0x2faf07=_0x534ed7[_0x1c5517(0x3cc)]?_0x534ed7[_0x1c5517(0x3cc)][_0x1c5517(0x4a2)](',')['map'](_0x38d6c6=>_0x38d6c6[_0x1c5517(0x34d)]())['filter'](Boolean):[];let _0x3ab8dc={};if(_0x534ed7[_0x1c5517(0x240)])try{_0x3ab8dc=JSON[_0x1c5517(0x24b)](_0x534ed7['grants']);if(typeof _0x3ab8dc!=='object'||Array['isArray'](_0x3ab8dc)||_0x3ab8dc===null)throw new Error();}catch{console[_0x1c5517(0x202)]('[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object'),process['exit'](0x1);}const _0x3ecb71=require$$5,{randomToken:_0x5a6c04,hashToken:_0x57e38d,hashPassword:_0x4d1650}=requireOkdbAuthTokens(),_0x3304ef=require$$0,_0x35eebc=_0x4f4c56[_0x1c5517(0x3e6)](_0xc566fa[_0x1c5517(0x1ba)]),_0x2f6156=new _0x3ecb71(_0x35eebc,_0xc566fa[_0x1c5517(0x22c)]?{'encryptionKey':_0xc566fa[_0x1c5517(0x22c)]}:{});await _0x2f6156['open']();try{await _0x2f6156[_0x1c5517(0x395)][_0x1c5517(0x1ef)]();if(_0x534ed7['name']){const _0x1bee4e=await _0x2f6156[_0x1c5517(0x395)][_0x1c5517(0x2d6)](_0x534ed7[_0x1c5517(0x2b5)]);_0x1bee4e&&(console[_0x1c5517(0x202)]('[okdb]\x20error:\x20token\x20with\x20name\x20\x22'+_0x534ed7['name']+_0x1c5517(0x39f)),process[_0x1c5517(0x463)](0x1));}const _0x39bcdb=_0x5a6c04(0x20),_0x510512=_0x57e38d(_0x39bcdb),_0x59b315=_0x534ed7[_0x1c5517(0x43b)]?await _0x4d1650(_0x534ed7[_0x1c5517(0x43b)]):null,_0x4fe61d=_0x3304ef[_0x1c5517(0x469)](),_0x3bc183={'tokenHash':_0x510512,'name':_0x534ed7[_0x1c5517(0x2b5)]||null,'passwordHash':_0x59b315,'label':_0x534ed7[_0x1c5517(0x3df)]||null,'permissions':_0x2faf07,'grants':_0x3ab8dc,'createdAt':Date[_0x1c5517(0x311)](),'lastUsedAt':null},_0x1c956d=_0x534ed7[_0x1c5517(0x40a)]?{'ttl':Number(_0x534ed7[_0x1c5517(0x40a)])}:undefined;await _0x2f6156[_0x1c5517(0x30f)][_0x1c5517(0x1c3)]('~tokens',_0x4fe61d,_0x3bc183,_0x1c956d),console['log']('\x0a\x20\x20✓\x20Token\x20created'),console[_0x1c5517(0x499)](_0x1c5517(0x2c6)+_0x4fe61d),console[_0x1c5517(0x499)](_0x1c5517(0x391)+(_0x534ed7['name']||_0x1c5517(0x29b))),console[_0x1c5517(0x499)](_0x1c5517(0x2ea)+(_0x534ed7[_0x1c5517(0x3df)]||'(unset)')),console[_0x1c5517(0x499)]('\x20\x20\x20\x20permissions:\x20'+(_0x2faf07['join'](',\x20')||_0x1c5517(0x322))),console[_0x1c5517(0x499)]('\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a'),console[_0x1c5517(0x499)]('\x20\x20\x20\x20'+_0x39bcdb+'\x0a');}finally{await _0x2f6156['close']();}}async function _0x401697(_0x5a70f8){const _0x5baeaa=_0x3a4bd7,_0x151a42=require$$5,_0x2d8646=_0x4f4c56[_0x5baeaa(0x3e6)](_0x5a70f8[_0x5baeaa(0x1ba)]),_0x25952e=new _0x151a42(_0x2d8646,_0x5a70f8[_0x5baeaa(0x22c)]?{'encryptionKey':_0x5a70f8[_0x5baeaa(0x22c)]}:{});await _0x25952e[_0x5baeaa(0x460)]();try{const _0x52874b=_0x25952e[_0x5baeaa(0x30f)];if(!_0x52874b||!_0x52874b[_0x5baeaa(0x3d7)](_0x5baeaa(0x330))){console[_0x5baeaa(0x499)](_0x5baeaa(0x3e8));return;}const _0x239759=[];for(const {key:_0x276fed,value:_0x5cc495}of _0x52874b[_0x5baeaa(0x2ee)](_0x5baeaa(0x330))){_0x239759['push']({'id':_0x276fed,'name':_0x5cc495[_0x5baeaa(0x2b5)]||_0x5baeaa(0x29b),'label':_0x5cc495[_0x5baeaa(0x3df)]||'(unset)','permissions':Array[_0x5baeaa(0x27d)](_0x5cc495[_0x5baeaa(0x3cc)])?_0x5cc495['permissions'][_0x5baeaa(0x2d8)](','):'','created':_0x5cc495[_0x5baeaa(0x1c9)]?new Date(_0x5cc495['createdAt'])[_0x5baeaa(0x2b3)]()[_0x5baeaa(0x1c2)](0x0,0xa):''});}if(_0x239759[_0x5baeaa(0x48c)]===0x0){console['log'](_0x5baeaa(0x3e8));return;}const _0x46d0ad=!process['stdout'][_0x5baeaa(0x2cd)]||process[_0x5baeaa(0x313)][_0x5baeaa(0x2cd)]>=0x64,_0x2d79b3=_0x46d0ad?0x24:0xa,_0x4cdba6=['ID'[_0x5baeaa(0x495)](_0x2d79b3),'NAME'[_0x5baeaa(0x495)](0x10),_0x5baeaa(0x3e9)[_0x5baeaa(0x495)](0x14),_0x5baeaa(0x2c4)[_0x5baeaa(0x495)](0x14),_0x5baeaa(0x2f6)][_0x5baeaa(0x2d8)]('\x20\x20');console['log']('\x0a'+_0x4cdba6),console['log']('-'[_0x5baeaa(0x3cf)](_0x4cdba6[_0x5baeaa(0x48c)]));for(const _0x5b89ea of _0x239759){const _0x588dfe=_0x46d0ad?_0x5b89ea['id']:_0x5b89ea['id']['slice'](0x0,0x8)+'…';console[_0x5baeaa(0x499)]([_0x588dfe[_0x5baeaa(0x495)](_0x2d79b3),_0x5b89ea[_0x5baeaa(0x2b5)][_0x5baeaa(0x1c2)](0x0,0x10)['padEnd'](0x10),_0x5b89ea[_0x5baeaa(0x3df)][_0x5baeaa(0x1c2)](0x0,0x14)[_0x5baeaa(0x495)](0x14),_0x5b89ea[_0x5baeaa(0x3cc)][_0x5baeaa(0x1c2)](0x0,0x14)['padEnd'](0x14),_0x5b89ea[_0x5baeaa(0x374)]][_0x5baeaa(0x2d8)]('\x20\x20'));}console['log']('');}finally{await _0x25952e[_0x5baeaa(0x2d9)]();}}async function _0x15f7af(_0x452884,_0x4f337b){const _0x5b0c06=_0x3a4bd7;!_0x452884&&(console[_0x5b0c06(0x202)](_0x5b0c06(0x272)),process[_0x5b0c06(0x463)](0x1));const _0x10e603=require$$5,_0x1c6109=_0x4f4c56[_0x5b0c06(0x3e6)](_0x4f337b[_0x5b0c06(0x1ba)]),_0x2545a7=new _0x10e603(_0x1c6109,_0x4f337b[_0x5b0c06(0x22c)]?{'encryptionKey':_0x4f337b[_0x5b0c06(0x22c)]}:{});await _0x2545a7['open']();try{const _0x4fb6b0=_0x2545a7[_0x5b0c06(0x30f)];(!_0x4fb6b0||!_0x4fb6b0[_0x5b0c06(0x3d7)](_0x5b0c06(0x330)))&&(console['error'](_0x5b0c06(0x2e8)+_0x452884+'\x22'),process[_0x5b0c06(0x463)](0x1));let _0x3e328d=null,_0x53dc31=null;const _0xf27a67=_0x4fb6b0[_0x5b0c06(0x26b)]('~tokens',_0x452884);if(_0xf27a67)_0x3e328d=_0x452884,_0x53dc31=_0xf27a67;else{const _0x24e423=[];for(const {key:_0x606fbb,value:_0x53bc72}of _0x4fb6b0['getRange'](_0x5b0c06(0x330))){if(_0x606fbb['startsWith'](_0x452884))_0x24e423[_0x5b0c06(0x488)]({'key':_0x606fbb,'value':_0x53bc72});}_0x24e423[_0x5b0c06(0x48c)]===0x0&&(console['error'](_0x5b0c06(0x2e8)+_0x452884+'\x22'),process[_0x5b0c06(0x463)](0x1));if(_0x24e423[_0x5b0c06(0x48c)]>0x1){console[_0x5b0c06(0x202)](_0x5b0c06(0x3c1)+_0x452884+_0x5b0c06(0x435)+_0x24e423[_0x5b0c06(0x48c)]+'\x20tokens:');for(const _0xf88b50 of _0x24e423){console[_0x5b0c06(0x202)]('\x20\x20'+_0xf88b50[_0x5b0c06(0x22c)]+_0x5b0c06(0x260)+(_0xf88b50[_0x5b0c06(0x3e0)][_0x5b0c06(0x2b5)]||'(unset)')+')');}process[_0x5b0c06(0x463)](0x1);}_0x3e328d=_0x24e423[0x0]['key'],_0x53dc31=_0x24e423[0x0][_0x5b0c06(0x3e0)];}await _0x4fb6b0[_0x5b0c06(0x24d)](_0x5b0c06(0x330),_0x3e328d),console[_0x5b0c06(0x499)](_0x5b0c06(0x437)+_0x3e328d+_0x5b0c06(0x260)+(_0x53dc31[_0x5b0c06(0x2b5)]||_0x5b0c06(0x29b))+_0x5b0c06(0x338)+(_0x53dc31[_0x5b0c06(0x3df)]||_0x5b0c06(0x29b))+')');}finally{await _0x2545a7[_0x5b0c06(0x2d9)]();}}function _0x405895(_0x1664da,_0x1951f3){const _0x1fe425=_0x3a4bd7;if(!_0x1664da[_0x1fe425(0x3a9)])return _0x1fe425(0x363);const _0x27d256=_0x1664da[_0x1fe425(0x214)];if(!_0x27d256)return _0x1fe425(0x2d3);if(_0x1951f3>_0x27d256)return _0x1fe425(0x4aa);return'active';}function _0x232e00(_0x31c120){const _0x261320=_0x3a4bd7;if(!_0x31c120||typeof _0x31c120!==_0x261320(0x1ee))return'';const _0x590116=Object['entries'](_0x31c120)['filter'](([,_0x392ede])=>_0x392ede)[_0x261320(0x308)](([_0x2398e8])=>_0x2398e8);if(_0x590116[_0x261320(0x48c)]===0x0)return _0x261320(0x322);if(_0x590116[_0x261320(0x48c)]<=0x3)return _0x590116[_0x261320(0x2d8)]('\x20');return _0x590116[_0x261320(0x1c2)](0x0,0x3)['join']('\x20')+('\x20+'+(_0x590116['length']-0x3));}async function _0x473950(_0x304dee){const _0x311870=_0x3a4bd7,_0x4e69af=require$$5,_0x4f0450=requireOkdbLicenseCodec(),{_C:_0x3737ad}=requireOkdbLicense(),_0x1dd362=_0x4f4c56[_0x311870(0x3e6)](_0x304dee['dbPath']),_0x4d0229=new _0x4e69af(_0x1dd362,_0x304dee[_0x311870(0x22c)]?{'encryptionKey':_0x304dee['key']}:{});await _0x4d0229['open']();try{const _0x15892a=_0x4d0229[_0x311870(0x30f)],_0x395506=_0x15892a?.['db']?.[_0x311870(0x26b)]?.(_0x311870(0x39d))??0x0,_0x4d203e=[..._0x4d0229['_envs'][_0x311870(0x3fd)]()][_0x311870(0x314)](_0x5f1729=>!_0x5f1729[_0x311870(0x424)]('~'))['length'],_0x497322=_0x4d0229[_0x311870(0x472)]?.[_0x311870(0x28b)];if(_0x497322){const _0x544592=_0x497322[_0x311870(0x30e)]===!![],_0x5ec47a=_0x544592?_0x311870(0x36d):_0x4d0229[_0x311870(0x472)][_0x311870(0x2d3)]?.[_0x311870(0x1ca)]||_0x311870(0x476);console[_0x311870(0x499)](''),console[_0x311870(0x499)]('\x20\x20Tier:\x20\x20\x20\x20'+_0x5ec47a);const _0x38f7d6=_0x497322[_0x311870(0x2a0)]||{};if(_0x38f7d6['maxWrites']){const _0x1ee82c=Math['round'](_0x395506/_0x38f7d6[_0x311870(0x1b3)]*0x64);console[_0x311870(0x499)]('\x20\x20Writes:\x20\x20'+_0x395506['toLocaleString']()+_0x311870(0x302)+_0x38f7d6[_0x311870(0x1b3)][_0x311870(0x3d8)]()+_0x311870(0x1c8)+_0x1ee82c+'%)');}else console[_0x311870(0x499)]('\x20\x20Writes:\x20\x20'+_0x395506[_0x311870(0x3d8)]());_0x38f7d6[_0x311870(0x431)]?console[_0x311870(0x499)]('\x20\x20Envs:\x20\x20\x20\x20'+_0x4d203e+'\x20/\x20'+_0x38f7d6[_0x311870(0x431)]):console[_0x311870(0x499)](_0x311870(0x1d3)+_0x4d203e),_0x3737ad?.['PUB_FINGERPRINT']&&console[_0x311870(0x499)]('\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20'+_0x3737ad[_0x311870(0x20a)]+_0x311870(0x2f3));}if(!_0x15892a||!_0x15892a[_0x311870(0x3d7)](_0x311870(0x2c7))){console[_0x311870(0x499)](''),console[_0x311870(0x499)](_0x311870(0x3f6)),console[_0x311870(0x499)]('');return;}const _0x1d2c13=[],_0x413b99=Date[_0x311870(0x311)](),_0x5bc47c=_0x4d0229['id'],_0xc87421=_0x311870(0x385);for(const {key:_0x47c94f,value:_0x60ef0f}of _0x15892a[_0x311870(0x2ee)](_0x311870(0x2c7))){const _0x5c9d55=_0x60ef0f[_0x311870(0x20d)]?Buffer[_0x311870(0x252)](_0x60ef0f[_0x311870(0x20d)],_0x311870(0x269)):Buffer['alloc'](0x8);let _0x373945='';try{_0x373945=_0x4f0450[_0x311870(0x33e)](_0x5bc47c,_0x5c9d55,_0xc87421)[_0x311870(0x477)];}catch{}_0x1d2c13['push']({'id':_0x47c94f,'licensee':_0x60ef0f['licensee']||'','expires':_0x60ef0f[_0x311870(0x214)]?new Date(_0x60ef0f[_0x311870(0x214)])[_0x311870(0x2b3)]()[_0x311870(0x1c2)](0x0,0xa):'','features':_0x232e00(_0x60ef0f['features']),'pin':_0x373945,'status':_0x405895(_0x60ef0f,_0x413b99)});}if(_0x1d2c13[_0x311870(0x48c)]===0x0){console[_0x311870(0x499)](''),console[_0x311870(0x499)](_0x311870(0x3f6)),console[_0x311870(0x499)]('');return;}const _0x1dfad4=['\x20\x20'+'ID'['padEnd'](0xe),'LICENSEE'[_0x311870(0x495)](0xe),'EXPIRES'[_0x311870(0x495)](0xc),'FEATURES'['padEnd'](0x1e),_0x311870(0x280)[_0x311870(0x495)](0xa),_0x311870(0x253)][_0x311870(0x2d8)]('\x20');console[_0x311870(0x499)]('\x0a'+_0x1dfad4);for(const _0x341614 of _0x1d2c13){const _0x34bbf8=_0x341614['id'][_0x311870(0x1c2)](0x0,0x8)+'…';console[_0x311870(0x499)](['\x20\x20'+_0x34bbf8[_0x311870(0x495)](0xe),_0x341614['licensee'][_0x311870(0x1c2)](0x0,0xe)['padEnd'](0xe),_0x341614[_0x311870(0x380)][_0x311870(0x495)](0xc),_0x341614[_0x311870(0x221)]['slice'](0x0,0x1e)[_0x311870(0x495)](0x1e),_0x341614['pin'][_0x311870(0x495)](0xa),_0x341614[_0x311870(0x219)]]['join']('\x20'));}console[_0x311870(0x499)]('');}finally{await _0x4d0229[_0x311870(0x2d9)]();}}async function _0xec1910(_0xf79a3d,_0x3ea0a0){const _0x3287e0=_0x3a4bd7,_0x195a42=require$$5,_0x16d6d3=requireOkdbLicenseCodec();let _0x27e476=_0xf79a3d;(_0x16d6d3['detectInputType'](_0xf79a3d)===_0x3287e0(0x3c3)||_0x10d084[_0x3287e0(0x293)](_0xf79a3d)&&_0x10d084[_0x3287e0(0x3c5)](_0xf79a3d)[_0x3287e0(0x371)]())&&(_0x27e476=_0x10d084[_0x3287e0(0x389)](_0xf79a3d,_0x3287e0(0x484))['trim']());const _0x334daf=_0x4f4c56[_0x3287e0(0x3e6)](_0x3ea0a0[_0x3287e0(0x1ba)]),_0x41304a=new _0x195a42(_0x334daf,_0x3ea0a0[_0x3287e0(0x22c)]?{'encryptionKey':_0x3ea0a0[_0x3287e0(0x22c)]}:{});await _0x41304a['open']();try{!_0x41304a[_0x3287e0(0x472)]&&(console[_0x3287e0(0x202)](_0x3287e0(0x39e)),process[_0x3287e0(0x463)](0x1));let _0x4663b3;try{_0x4663b3=await _0x41304a[_0x3287e0(0x472)][_0x3287e0(0x334)](_0x27e476);}catch(_0x411bec){console[_0x3287e0(0x202)](_0x3287e0(0x456)+_0x411bec[_0x3287e0(0x2a5)]),process[_0x3287e0(0x463)](0x1);}const _0x5146c3=_0x41304a[_0x3287e0(0x472)]['getPins'](),_0x45bba2=_0x5146c3[_0x3287e0(0x485)](_0x9f3251=>_0x9f3251[_0x3287e0(0x2e7)]===_0x4663b3['id'])?.[_0x3287e0(0x477)]||'',_0x349bfb=Object[_0x3287e0(0x3f8)](_0x4663b3[_0x3287e0(0x221)]||{})[_0x3287e0(0x314)](([,_0x566376])=>_0x566376)[_0x3287e0(0x308)](([_0x2baaab])=>_0x2baaab),_0xf3f7e3=_0x4663b3[_0x3287e0(0x2a0)]||{},_0xbde93=[_0xf3f7e3['envs']?_0x3287e0(0x3b3)+_0xf3f7e3[_0x3287e0(0x431)]:null,_0xf3f7e3[_0x3287e0(0x388)]?_0x3287e0(0x3c2)+_0xf3f7e3[_0x3287e0(0x388)]:null,_0xf3f7e3[_0x3287e0(0x215)]?_0x3287e0(0x21c)+_0xf3f7e3[_0x3287e0(0x215)]:null,_0xf3f7e3[_0x3287e0(0x1b3)]?_0x3287e0(0x290)+_0xf3f7e3['maxWrites'][_0x3287e0(0x3d8)]():null][_0x3287e0(0x314)](Boolean)[_0x3287e0(0x2d8)]('\x20\x20'),_0x48dd67=_0x4663b3[_0x3287e0(0x396)]===_0x16d6d3[_0x3287e0(0x434)];console[_0x3287e0(0x499)](_0x3287e0(0x296)),console[_0x3287e0(0x499)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x4663b3['id']),console[_0x3287e0(0x499)](_0x3287e0(0x35e)+_0x4663b3[_0x3287e0(0x1ca)]),console['log'](_0x3287e0(0x498)+new Date(_0x4663b3[_0x3287e0(0x214)])[_0x3287e0(0x2b3)]()[_0x3287e0(0x1c2)](0x0,0xa)),console[_0x3287e0(0x499)]('\x20\x20\x20\x20features:\x20\x20'+(_0x349bfb['join'](',\x20')||_0x3287e0(0x322)));if(_0xbde93)console[_0x3287e0(0x499)](_0x3287e0(0x43d)+_0xbde93);_0x48dd67?(console['log'](_0x3287e0(0x3a8)),console['log']('')):(console[_0x3287e0(0x499)](_0x3287e0(0x37a)+_0x45bba2),console['log'](_0x3287e0(0x410)),console[_0x3287e0(0x499)](''),console[_0x3287e0(0x499)](_0x3287e0(0x28e)),console[_0x3287e0(0x499)]('\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20('+_0x45bba2+_0x3287e0(0x2c8)),console[_0x3287e0(0x499)](_0x3287e0(0x2f0)),console[_0x3287e0(0x499)](_0x3287e0(0x2cc)),console['log'](''));}finally{await _0x41304a[_0x3287e0(0x2d9)]();}}async function _0x45889a(_0x112550,_0x2103f8){const _0x369b2b=_0x3a4bd7,_0x1da73a=require$$5,_0x124cf8=_0x4f4c56['resolve'](_0x2103f8[_0x369b2b(0x1ba)]),_0x88d429=new _0x1da73a(_0x124cf8,_0x2103f8['key']?{'encryptionKey':_0x2103f8[_0x369b2b(0x22c)]}:{});await _0x88d429[_0x369b2b(0x460)]();try{!_0x88d429['_license']&&(console[_0x369b2b(0x202)](_0x369b2b(0x39e)),process[_0x369b2b(0x463)](0x1));let _0xd52739;try{_0xd52739=await _0x88d429[_0x369b2b(0x472)]['activateLicense'](_0x112550[_0x369b2b(0x34d)]());}catch(_0x2b6033){console[_0x369b2b(0x202)](_0x369b2b(0x456)+_0x2b6033['message']),console['error'](''),console[_0x369b2b(0x202)](_0x369b2b(0x3f1)),console[_0x369b2b(0x202)]('\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.'),console[_0x369b2b(0x202)](_0x369b2b(0x445)),console[_0x369b2b(0x202)](_0x369b2b(0x3fa)),console[_0x369b2b(0x202)](''),process[_0x369b2b(0x463)](0x1);}console[_0x369b2b(0x499)](_0x369b2b(0x2d4)),console[_0x369b2b(0x499)](_0x369b2b(0x2a9)+_0xd52739['id']),console['log']('\x20\x20\x20\x20licensee:\x20\x20'+_0xd52739['licensee']),console['log']('\x20\x20\x20\x20expires:\x20\x20\x20'+new Date(_0xd52739[_0x369b2b(0x214)])[_0x369b2b(0x2b3)]()['slice'](0x0,0xa)),console['log'](_0x369b2b(0x210)),console[_0x369b2b(0x499)]('');}finally{await _0x88d429[_0x369b2b(0x2d9)]();}}async function _0x436e1e(_0x2afa42,_0x1488f8){const _0x479ad3=_0x3a4bd7;!_0x2afa42&&(console[_0x479ad3(0x202)](_0x479ad3(0x1b7)),process[_0x479ad3(0x463)](0x1));const _0x55ba62=require$$5,_0x4296f7=requireOkdbLicenseCodec(),_0x1195d9=_0x4f4c56[_0x479ad3(0x3e6)](_0x1488f8[_0x479ad3(0x1ba)]),_0x641376=new _0x55ba62(_0x1195d9,_0x1488f8[_0x479ad3(0x22c)]?{'encryptionKey':_0x1488f8[_0x479ad3(0x22c)]}:{});await _0x641376[_0x479ad3(0x460)]();try{const _0x11dc95=_0x641376['_systemEnv'];(!_0x11dc95||!_0x11dc95['hasType'](_0x479ad3(0x2c7)))&&(console[_0x479ad3(0x202)](_0x479ad3(0x378)+_0x2afa42+'\x22'),process['exit'](0x1));let _0x1e962d=null,_0x1b42c8=null;const _0x141908=_0x11dc95['get'](_0x479ad3(0x2c7),_0x2afa42);if(_0x141908)_0x1e962d=_0x2afa42,_0x1b42c8=_0x141908;else{const _0x54ea58=[];for(const {key:_0x22e512,value:_0x285df7}of _0x11dc95[_0x479ad3(0x2ee)](_0x479ad3(0x2c7))){if(_0x22e512[_0x479ad3(0x424)](_0x2afa42))_0x54ea58[_0x479ad3(0x488)]({'key':_0x22e512,'value':_0x285df7});}_0x54ea58[_0x479ad3(0x48c)]===0x0&&(console[_0x479ad3(0x202)](_0x479ad3(0x378)+_0x2afa42+'\x22'),process[_0x479ad3(0x463)](0x1)),_0x54ea58[_0x479ad3(0x48c)]>0x1&&(console[_0x479ad3(0x202)]('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x2afa42+_0x479ad3(0x435)+_0x54ea58['length']+_0x479ad3(0x237)),process[_0x479ad3(0x463)](0x1)),_0x1e962d=_0x54ea58[0x0]['key'],_0x1b42c8=_0x54ea58[0x0][_0x479ad3(0x3e0)];}const _0x493347=Date[_0x479ad3(0x311)](),_0x4909b8=_0x405895(_0x1b42c8,_0x493347),_0x1e14e8=_0x641376['id'],_0x903b04=_0x479ad3(0x385);let _0x5039ce='';try{const _0x3bbd4f=Buffer[_0x479ad3(0x252)](_0x1b42c8[_0x479ad3(0x20d)],_0x479ad3(0x269));_0x5039ce=_0x4296f7['derivePin'](_0x1e14e8,_0x3bbd4f,_0x903b04)['pin'];}catch{}const _0x5423b8=_0x1b42c8[_0x479ad3(0x221)]?Object['entries'](_0x1b42c8['features'])['filter'](([,_0x585990])=>_0x585990)[_0x479ad3(0x308)](([_0x317eb0])=>_0x317eb0):[],_0x19f12c=_0x1b42c8[_0x479ad3(0x2a0)]||{},_0x504c24=_0x11dc95?.['db']?.[_0x479ad3(0x26b)]?.(_0x479ad3(0x39d))??0x0,_0x218afb=[..._0x641376[_0x479ad3(0x358)][_0x479ad3(0x3fd)]()][_0x479ad3(0x314)](_0x588d5f=>!_0x588d5f['startsWith']('~'))[_0x479ad3(0x48c)];console[_0x479ad3(0x499)]('\x0a\x20\x20License\x20details:'),console[_0x479ad3(0x499)](_0x479ad3(0x2a9)+_0x1e962d),console[_0x479ad3(0x499)](_0x479ad3(0x35e)+(_0x1b42c8[_0x479ad3(0x1ca)]||'')),console[_0x479ad3(0x499)](_0x479ad3(0x498)+(_0x1b42c8[_0x479ad3(0x214)]?new Date(_0x1b42c8[_0x479ad3(0x214)])[_0x479ad3(0x2b3)]()['slice'](0x0,0xa):'')),console[_0x479ad3(0x499)](_0x479ad3(0x1df)+(_0x5423b8[_0x479ad3(0x2d8)](',\x20')||_0x479ad3(0x322))),console[_0x479ad3(0x499)](_0x479ad3(0x37a)+_0x5039ce),console[_0x479ad3(0x499)](_0x479ad3(0x482)+_0x4909b8),console['log'](_0x479ad3(0x265)+new Date(_0x1b42c8[_0x479ad3(0x31b)])[_0x479ad3(0x2b3)]());if(_0x4909b8===_0x479ad3(0x2d3)){console[_0x479ad3(0x499)](''),console['log'](_0x479ad3(0x245));if(_0x19f12c[_0x479ad3(0x1b3)]){const _0x2c9893=Math[_0x479ad3(0x473)](_0x504c24/_0x19f12c[_0x479ad3(0x1b3)]*0x64);console[_0x479ad3(0x499)](_0x479ad3(0x40d)+_0x504c24[_0x479ad3(0x3d8)]()+_0x479ad3(0x302)+_0x19f12c[_0x479ad3(0x1b3)][_0x479ad3(0x3d8)]()+_0x479ad3(0x1c8)+_0x2c9893+'%)');}else console['log'](_0x479ad3(0x40d)+_0x504c24[_0x479ad3(0x3d8)]()+_0x479ad3(0x2fa));_0x19f12c['envs']?console[_0x479ad3(0x499)](_0x479ad3(0x21f)+_0x218afb+_0x479ad3(0x302)+_0x19f12c[_0x479ad3(0x431)]):console[_0x479ad3(0x499)]('\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20'+_0x218afb+_0x479ad3(0x2fa));}console[_0x479ad3(0x499)]('');}finally{await _0x641376[_0x479ad3(0x2d9)]();}}async function _0x938eb3(_0x431212,_0x3746b1){const _0x4c5772=_0x3a4bd7;!_0x431212&&(console[_0x4c5772(0x202)](_0x4c5772(0x37e)),process[_0x4c5772(0x463)](0x1));const _0x1b09fb=require$$5,_0x1f57cb=_0x4f4c56[_0x4c5772(0x3e6)](_0x3746b1[_0x4c5772(0x1ba)]),_0x2cc26a=new _0x1b09fb(_0x1f57cb,_0x3746b1[_0x4c5772(0x22c)]?{'encryptionKey':_0x3746b1['key']}:{});await _0x2cc26a[_0x4c5772(0x460)]();try{const _0x1cd4af=_0x2cc26a['_systemEnv'];(!_0x1cd4af||!_0x1cd4af['hasType'](_0x4c5772(0x2c7)))&&(console[_0x4c5772(0x202)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x431212+'\x22'),process[_0x4c5772(0x463)](0x1));let _0x1c193a=null,_0x315899=null;const _0x316a4d=_0x1cd4af[_0x4c5772(0x26b)](_0x4c5772(0x2c7),_0x431212);if(_0x316a4d)_0x1c193a=_0x431212,_0x315899=_0x316a4d;else{const _0x12102=[];for(const {key:_0x3fa36c,value:_0xd90fe4}of _0x1cd4af[_0x4c5772(0x2ee)](_0x4c5772(0x2c7))){if(_0x3fa36c['startsWith'](_0x431212))_0x12102['push']({'key':_0x3fa36c,'value':_0xd90fe4});}_0x12102[_0x4c5772(0x48c)]===0x0&&(console[_0x4c5772(0x202)](_0x4c5772(0x378)+_0x431212+'\x22'),process['exit'](0x1)),_0x12102['length']>0x1&&(console[_0x4c5772(0x202)](_0x4c5772(0x3c1)+_0x431212+_0x4c5772(0x435)+_0x12102['length']+'\x20licenses'),process[_0x4c5772(0x463)](0x1)),_0x1c193a=_0x12102[0x0][_0x4c5772(0x22c)],_0x315899=_0x12102[0x0][_0x4c5772(0x3e0)];}await _0x1cd4af['remove'](_0x4c5772(0x2c7),_0x1c193a),console[_0x4c5772(0x499)]('\x20\x20✓\x20Removed\x20license\x20'+_0x1c193a+_0x4c5772(0x207)+(_0x315899[_0x4c5772(0x1ca)]||_0x4c5772(0x29b))+')');}finally{await _0x2cc26a[_0x4c5772(0x2d9)]();}}async function _0x273a12(_0x34286b,_0x4de309,_0x26573b){const _0x3cf085=_0x3a4bd7;!_0x34286b&&(console[_0x3cf085(0x202)](_0x3cf085(0x277)),process['exit'](0x1));!_0x26573b['token']&&!(_0x26573b[_0x3cf085(0x1e5)]&&_0x26573b[_0x3cf085(0x43b)])&&(console[_0x3cf085(0x202)](_0x3cf085(0x267)),process[_0x3cf085(0x463)](0x1));const _0x1d9424=_0x26573b[_0x3cf085(0x2fb)]||_0x4de309[_0x3cf085(0x346)]?.[_0x3cf085(0x1f1)];!_0x1d9424&&(console['error'](_0x3cf085(0x2b2)+_0x3cf085(0x3cb)+'\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig'),process[_0x3cf085(0x463)](0x1));const _0x42f588=require$$5,_0x5251ad=new _0x42f588(_0x4de309[_0x3cf085(0x1ba)],{'sync':{'address':_0x1d9424,'auto_reconcile':![]}});await _0x5251ad[_0x3cf085(0x460)]();try{const _0x56e960=_0x5251ad[_0x3cf085(0x30f)];if(_0x56e960&&_0x56e960[_0x3cf085(0x3d7)](_0x3cf085(0x330))){let _0x25694b=![];for(const _0x401f08 of _0x56e960[_0x3cf085(0x2ee)](_0x3cf085(0x330))){_0x25694b=!![];break;}_0x25694b&&console['log'](_0x3cf085(0x454)+_0x3cf085(0x1e6));}console[_0x3cf085(0x499)](_0x3cf085(0x3bc)+_0x34286b+'…'),await _0x5251ad[_0x3cf085(0x346)][_0x3cf085(0x2d8)](_0x34286b[_0x3cf085(0x279)](/\/+$/,''),{'token':_0x26573b['token'],'username':_0x26573b[_0x3cf085(0x1e5)],'password':_0x26573b['password']}),console[_0x3cf085(0x499)]('\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated'),console[_0x3cf085(0x499)]('\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a');}finally{await _0x5251ad[_0x3cf085(0x2d9)]();}}async function _0x1c29b0(){const _0x132eae=_0x3a4bd7,_0x1bcbd7=Date[_0x132eae(0x311)](),_0x3b7506=_0x131052(process[_0x132eae(0x1b4)]),_0x3c9a82=_0x48c23c(_0x3b7506),_0xab8f72=_0x4f4c56[_0x132eae(0x3e6)](_0x3c9a82[_0x132eae(0x1ba)]);!_0x3c9a82[_0x132eae(0x319)]&&!process[_0x132eae(0x429)][_0x132eae(0x49a)]&&(_0x3c9a82['noRepl']=!![]);const _0x4a6b9b=require$$5,{start:_0x221a91,colorLog:_0x230e4f}=requireOkdbShell(),_0x3271f7={..._0x3c9a82[_0x132eae(0x22c)]?{'encryptionKey':_0x3c9a82['key']}:{},..._0x3c9a82['noAdmin']?{'admin':![]}:_0x55364b(_0x3c9a82[_0x132eae(0x36f)])?{'admin':_0x3c9a82[_0x132eae(0x36f)]}:{},..._0x55364b(_0x3c9a82['api'])?{'api':_0x3c9a82['api']}:{},..._0x55364b(_0x3c9a82['auth'])?{'auth':_0x3c9a82[_0x132eae(0x395)]}:{},..._0x55364b(_0x3c9a82[_0x132eae(0x44b)])?{'mcp':_0x3c9a82['mcp']}:{},..._0x3c9a82[_0x132eae(0x2a6)]!==![]?{'timeMachine':_0x3c9a82[_0x132eae(0x2a6)]}:{}},_0xed95e4=new _0x4a6b9b(_0xab8f72,_0x3271f7);_0xed95e4[_0x132eae(0x499)][_0x132eae(0x1bb)]?.();const _0x177736=_0xed95e4[_0x132eae(0x499)][_0x132eae(0x287)](_0x9fb748=>_0x230e4f(_0x9fb748,_0x3c9a82['logLevel']));if(_0x3c9a82[_0x132eae(0x319)])process['stdout'][_0x132eae(0x204)]('[okdb]\x20starting…\x0a');await _0xed95e4[_0x132eae(0x460)]();if(_0x3c9a82[_0x132eae(0x319)])process[_0x132eae(0x313)][_0x132eae(0x204)](_0x132eae(0x344));try{await _0x3936c6(_0xed95e4,_0x3c9a82[_0x132eae(0x21b)]);}catch(_0x17cd49){_0x17cd49[_0x132eae(0x2d7)]==='EADDRINUSE'&&(console[_0x132eae(0x202)](_0x132eae(0x433)+_0x3c9a82[_0x132eae(0x21b)]+'\x20already\x20in\x20use'),process[_0x132eae(0x463)](0x1));throw _0x17cd49;}if(_0x3c9a82[_0x132eae(0x319)])process[_0x132eae(0x313)][_0x132eae(0x204)](_0x132eae(0x23b)+_0x3c9a82[_0x132eae(0x21b)]+'\x0a');if(!_0x3c9a82[_0x132eae(0x319)])_0xed95e4[_0x132eae(0x499)][_0x132eae(0x1bb)]?.(),_0x177736?.(),_0x2f6e85(_0xed95e4['auth']?.[_0x132eae(0x2b4)]?.()??[]),await _0x221a91(_0xed95e4,_0x3c9a82);else{const _0x3de69d=_0x4f4c56['join'](_0xab8f72,_0x132eae(0x1fe));try{_0x10d084[_0x132eae(0x22d)](_0x3de69d,String(process[_0x132eae(0x2da)]));}catch{}const _0x449046=Date['now']()-_0x1bcbd7;console[_0x132eae(0x499)](''),console[_0x132eae(0x499)](_0x132eae(0x234)),console[_0x132eae(0x499)](_0x132eae(0x1eb)+_0x3c9a82[_0x132eae(0x21b)]),console[_0x132eae(0x499)](_0x132eae(0x4ac)+_0xab8f72),console['log'](_0x132eae(0x2bc)+_0xed95e4['id']);{const _0x415742=_0xed95e4[_0x132eae(0x30f)]?.['db']?.['get']?.(_0x132eae(0x39d))??0x0,_0x153744=[..._0xed95e4[_0x132eae(0x358)]['keys']()][_0x132eae(0x314)](_0xb041ee=>!_0xb041ee[_0x132eae(0x424)]('~'))[_0x132eae(0x48c)];if(_0xed95e4['_license']?.[_0x132eae(0x2d3)]?.[_0x132eae(0x396)]===0x1){const _0x47f667=Math[_0x132eae(0x2f5)]((_0xed95e4[_0x132eae(0x472)][_0x132eae(0x2d3)]['expiresAt']-Date['now']())/0x5265c00);console[_0x132eae(0x499)]('\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20'+_0xed95e4['_license'][_0x132eae(0x2d3)]['licensee']+_0x132eae(0x415)+_0x47f667+_0x132eae(0x3b7));}else{if(_0xed95e4[_0x132eae(0x472)]?.[_0x132eae(0x2d3)]){const _0x238796=_0xed95e4[_0x132eae(0x472)]['active'];console[_0x132eae(0x499)]('\x20\x20\x20\x20license:\x20'+_0x238796[_0x132eae(0x1ca)]+_0x132eae(0x36c)+new Date(_0x238796[_0x132eae(0x214)])[_0x132eae(0x2b3)]()[_0x132eae(0x1c2)](0x0,0xa)+')');const _0x5070db=_0x238796[_0x132eae(0x2a0)]||{};if(_0x5070db['maxWrites']){const _0x5bbd34=Math[_0x132eae(0x473)](_0x415742/_0x5070db[_0x132eae(0x1b3)]*0x64);console[_0x132eae(0x499)](_0x132eae(0x2bf)+_0x415742['toLocaleString']()+_0x132eae(0x302)+_0x5070db[_0x132eae(0x1b3)]['toLocaleString']()+_0x132eae(0x2d0)+_0x5bbd34+'%),\x20'+_0x153744+(_0x5070db[_0x132eae(0x431)]?'/'+_0x5070db[_0x132eae(0x431)]:'')+_0x132eae(0x3f5)+(_0x153744===0x1?'':'s'));}}else{if(_0xed95e4[_0x132eae(0x472)]){const _0x1c8e54=_0xed95e4['_license']['getPins'](),_0x1c3cbd=_0x1c8e54[_0x132eae(0x48c)]?_0x1c8e54[_0x132eae(0x308)](_0x2c65bc=>_0x2c65bc[_0x132eae(0x477)])['join'](',\x20'):_0x132eae(0x430),_0x3f2582=_0xed95e4['_license']['effective'],_0xb807c2=_0x3f2582[_0x132eae(0x2a0)][_0x132eae(0x1b3)]?Math[_0x132eae(0x473)](_0x415742/_0x3f2582[_0x132eae(0x2a0)][_0x132eae(0x1b3)]*0x64):0x0;console[_0x132eae(0x499)](_0x132eae(0x49f)),console[_0x132eae(0x499)](_0x132eae(0x2bf)+_0x415742[_0x132eae(0x3d8)]()+'\x20/\x20'+_0x3f2582['limits'][_0x132eae(0x1b3)][_0x132eae(0x3d8)]()+'\x20writes\x20('+_0xb807c2+_0x132eae(0x22a)+_0x153744+_0x132eae(0x302)+_0x3f2582[_0x132eae(0x2a0)]['envs']+_0x132eae(0x1da)),console[_0x132eae(0x499)]('\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20'+_0x1c3cbd);}}}}console['log']('\x20\x20\x20\x20api:\x20\x20\x20http://localhost:'+_0x3c9a82[_0x132eae(0x21b)]+'/api');!_0x3c9a82[_0x132eae(0x1c0)]&&console['log'](_0x132eae(0x263)+_0x3c9a82[_0x132eae(0x21b)]+_0x132eae(0x2e2));console['log'](''),console[_0x132eae(0x499)](_0x132eae(0x496)+_0x449046+'ms'),_0x2f6e85(_0xed95e4[_0x132eae(0x395)]?.[_0x132eae(0x2b4)]?.()??[]);async function _0x29d2ed(){const _0x4dab7=_0x132eae;process[_0x4dab7(0x313)][_0x4dab7(0x204)](_0x4dab7(0x370));try{_0x10d084['unlinkSync'](_0x3de69d);}catch{}await _0xed95e4[_0x4dab7(0x2d9)](),process['exit'](0x0);}process['on']('SIGINT',_0x29d2ed),process['on'](_0x132eae(0x324),_0x29d2ed);}}const _0x414bb1=new Set(['version',_0x3a4bd7(0x2f4),'init',_0x3a4bd7(0x2aa),_0x3a4bd7(0x2d5),_0x3a4bd7(0x497),'reset','token',_0x3a4bd7(0x2d8),_0x3a4bd7(0x1c7)]),_0x3b33e1=process[_0x3a4bd7(0x1b4)][0x2];if(_0x3b33e1===_0x3a4bd7(0x209))console['log'](require$$2[_0x3a4bd7(0x209)]),process['exit'](0x0);else{if(_0x3b33e1&&_0x414bb1[_0x3a4bd7(0x3fe)](_0x3b33e1)){const _0x11b3b6=process[_0x3a4bd7(0x1b4)][_0x3a4bd7(0x1c2)](0x3),_0x30cf9a=_0x131052(['node','okdb',..._0x11b3b6]),_0x4ebc2b=_0x48c23c(_0x30cf9a),_0x118c76=new Set(['--path','-d',_0x3a4bd7(0x2ef),'-k','--config','-c','--port','-p',_0x3a4bd7(0x316),_0x3a4bd7(0x44a),'-e',_0x3a4bd7(0x357),_0x3a4bd7(0x351),_0x3a4bd7(0x3f3),_0x3a4bd7(0x2ae),'--permissions',_0x3a4bd7(0x289),_0x3a4bd7(0x404),_0x3a4bd7(0x3ee),_0x3a4bd7(0x1e4),'-u',_0x3a4bd7(0x414)]);let _0x5bbdca=null;for(let _0x255e3c=0x0;_0x255e3c<_0x11b3b6[_0x3a4bd7(0x48c)];_0x255e3c++){if(_0x118c76[_0x3a4bd7(0x3fe)](_0x11b3b6[_0x255e3c])){_0x255e3c++;continue;}if(!_0x11b3b6[_0x255e3c][_0x3a4bd7(0x424)]('-')){_0x5bbdca=_0x11b3b6[_0x255e3c];break;}}(async()=>{const _0x54df21=_0x3a4bd7;if(_0x3b33e1===_0x54df21(0x438)){const _0x3b7e5d=process[_0x54df21(0x1b4)][0x3],_0x8fb7a8=process[_0x54df21(0x1b4)][_0x54df21(0x1c2)](0x4),_0x2b7bcf=_0x131052([_0x54df21(0x206),_0x54df21(0x250),..._0x8fb7a8]),_0x4a5b69=_0x48c23c(_0x2b7bcf),_0xb6dea=new Set([_0x54df21(0x31a),'-d',_0x54df21(0x2ef),'-k','--config','-c',_0x54df21(0x3da),'-p',_0x54df21(0x351),_0x54df21(0x3f3),_0x54df21(0x2ae),_0x54df21(0x375),_0x54df21(0x289),'--ttl',_0x54df21(0x316),_0x54df21(0x44a),'-e',_0x54df21(0x357)]),_0x4137ac=[];for(let _0x530b6d=0x0;_0x530b6d<_0x8fb7a8['length'];_0x530b6d++){if(_0xb6dea[_0x54df21(0x3fe)](_0x8fb7a8[_0x530b6d])){_0x530b6d++;continue;}if(_0x8fb7a8[_0x530b6d][_0x54df21(0x424)]('-'))continue;_0x4137ac[_0x54df21(0x488)](_0x8fb7a8[_0x530b6d]);}switch(_0x3b7e5d){case _0x54df21(0x343):await _0x59dc77(_0x4a5b69,_0x2b7bcf);break;case _0x54df21(0x3e7):await _0x401697(_0x4a5b69);break;case _0x54df21(0x26a):await _0x15f7af(_0x4137ac[0x0],_0x4a5b69);break;default:console[_0x54df21(0x202)](_0x54df21(0x1e1)+_0x3b7e5d+_0x54df21(0x425)),process[_0x54df21(0x463)](0x1);}return;}if(_0x3b33e1===_0x54df21(0x1c7)){const _0x294a9c=requireOkdbLicenseCodec(),_0x3c8d8a=process['argv']['slice'](0x3),_0x2eb426=_0x131052([_0x54df21(0x206),_0x54df21(0x250),..._0x3c8d8a]),_0x46b58f=_0x48c23c(_0x2eb426),_0x5dbcd7=new Set([_0x54df21(0x31a),'-d',_0x54df21(0x2ef),'-k','--config','-c',_0x54df21(0x3da),'-p',_0x54df21(0x316)]),_0x42adf9=[];for(let _0x3c5499=0x0;_0x3c5499<_0x3c8d8a[_0x54df21(0x48c)];_0x3c5499++){if(_0x5dbcd7[_0x54df21(0x3fe)](_0x3c8d8a[_0x3c5499])){_0x3c5499++;continue;}if(_0x3c8d8a[_0x3c5499][_0x54df21(0x424)]('-'))continue;_0x42adf9['push'](_0x3c8d8a[_0x3c5499]);}const _0x3227af=_0x42adf9[0x0]??null;if(_0x3227af===_0x54df21(0x24d))await _0x938eb3(_0x42adf9[0x1],_0x46b58f);else{if(!_0x3227af)await _0x473950(_0x46b58f);else{let _0x1ffc6f=_0x294a9c[_0x54df21(0x3ff)](_0x3227af);if(_0x1ffc6f===_0x54df21(0x273)&&_0x10d084[_0x54df21(0x293)](_0x3227af))_0x1ffc6f=_0x54df21(0x3c3);if(_0x1ffc6f===_0x54df21(0x3c3))try{const _0x557518=_0x10d084[_0x54df21(0x389)](_0x3227af,_0x54df21(0x484))[_0x54df21(0x34d)](),_0x5215de=_0x294a9c[_0x54df21(0x3ff)](_0x557518);if(_0x5215de==='activation'){await _0x45889a(_0x557518,_0x46b58f);return;}await _0xec1910(_0x3227af,_0x46b58f);return;}catch(_0x317f41){console['error'](_0x54df21(0x467)+_0x3227af+':\x20'+_0x317f41['message']),process[_0x54df21(0x463)](0x1);}switch(_0x1ffc6f){case _0x54df21(0x283):await _0xec1910(_0x3227af,_0x46b58f);break;case _0x54df21(0x3a9):await _0x45889a(_0x3227af,_0x46b58f);break;case _0x54df21(0x3cd):await _0x436e1e(_0x3227af,_0x46b58f);break;default:console[_0x54df21(0x202)](_0x54df21(0x39b)+_0x3227af+'\x22'),console['error'](''),console[_0x54df21(0x202)](_0x54df21(0x282)),console[_0x54df21(0x202)]('\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)'),console[_0x54df21(0x202)](_0x54df21(0x3a6)),console[_0x54df21(0x202)](_0x54df21(0x25b)),console[_0x54df21(0x202)](_0x54df21(0x3a4)),console[_0x54df21(0x202)](''),console[_0x54df21(0x202)](_0x54df21(0x276)),process[_0x54df21(0x463)](0x1);}}}return;}switch(_0x3b33e1){case _0x54df21(0x2f4):await _0x3f5db3(_0x4ebc2b);break;case _0x54df21(0x3d9):await _0x275e00();break;case'reset':await _0x201b7c(_0x4ebc2b);break;case _0x54df21(0x2aa):await _0xa4e409(_0x5bbdca??_0x4f4c56[_0x54df21(0x3e6)](_0x54df21(0x3bd)),_0x4ebc2b);break;case _0x54df21(0x2d5):await _0x512c5f(_0x5bbdca??_0x4f4c56[_0x54df21(0x3e6)](_0x54df21(0x3aa)),_0x4ebc2b,_0x30cf9a);break;case _0x54df21(0x497):await _0x233b56(_0x5bbdca??_0x4f4c56[_0x54df21(0x3e6)](_0x54df21(0x3aa)),_0x4ebc2b,_0x30cf9a);break;case _0x54df21(0x2d8):await _0x273a12(_0x5bbdca,_0x4ebc2b,_0x30cf9a);break;}})()[_0x3a4bd7(0x43c)](()=>process[_0x3a4bd7(0x463)](0x0))[_0x3a4bd7(0x3c7)](_0x3e8e65=>{const _0x57ef56=_0x3a4bd7;console[_0x57ef56(0x202)](_0x57ef56(0x361)+(_0x3e8e65[_0x57ef56(0x2a5)]||_0x3e8e65)+'\x0a'),process['exit'](0x1);});}else _0x1c29b0()['catch'](_0x432bef=>{const _0x44ee3c=_0x3a4bd7;console[_0x44ee3c(0x202)](_0x44ee3c(0x2ac)),console[_0x44ee3c(0x202)](_0x432bef[_0x44ee3c(0x41a)]||_0x432bef),process[_0x44ee3c(0x463)](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x538f61(0x2d1)]=okdb;
|
|
2
|
+
'use strict';const _0xddaf03=_0x3a76;(function(_0x3b8604,_0x2cb55c){const _0x5a51ef=_0x3a76,_0x15b69f=_0x3b8604();while(!![]){try{const _0x288a2e=parseInt(_0x5a51ef(0x27f))/0x1+-parseInt(_0x5a51ef(0x220))/0x2+parseInt(_0x5a51ef(0x24c))/0x3+parseInt(_0x5a51ef(0x38d))/0x4+-parseInt(_0x5a51ef(0x215))/0x5*(-parseInt(_0x5a51ef(0x2e9))/0x6)+-parseInt(_0x5a51ef(0x4ac))/0x7+parseInt(_0x5a51ef(0x1e5))/0x8*(-parseInt(_0x5a51ef(0x2ab))/0x9);if(_0x288a2e===_0x2cb55c)break;else _0x15b69f['push'](_0x15b69f['shift']());}catch(_0x29944f){_0x15b69f['push'](_0x15b69f['shift']());}}}(_0x30dd,0xede1a));var require$$1$1=require('path'),require$$1=require('fs'),require$$3=require(_0xddaf03(0x3e0)),require$$0$2=require(_0xddaf03(0x2d9)),require$$5=require(_0xddaf03(0x49b)),require$$0=require(_0xddaf03(0x372)),require$$0$1=require(_0xddaf03(0x4b0)),require$$2$1=require('os'),require$$4=require(_0xddaf03(0x4e0));function getDefaultExportFromCjs(_0x348bb2){const _0x34f55d=_0xddaf03;return _0x348bb2&&_0x348bb2['__esModule']&&Object['prototype'][_0x34f55d(0x2e6)][_0x34f55d(0x255)](_0x348bb2,'default')?_0x348bb2[_0x34f55d(0x42d)]:_0x348bb2;}var okdb$1={},version='1.6.3',require$$2={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x400b55=require$$0;function _0x16bd84(_0x3b50f0,_0x37ab37){const _0x284191=_0x3a76;return _0x400b55[_0x284191(0x3b6)](_0x284191(0x3e7),_0x37ab37)[_0x284191(0x4de)](_0x3b50f0)[_0x284191(0x29e)](_0x284191(0x4da));}function _0x3fdca5(_0x1ddbf6,_0x52110c){const _0x410297=_0x3a76;if(typeof _0x1ddbf6!==_0x410297(0x48a)||typeof _0x52110c!==_0x410297(0x48a))return![];if(Buffer[_0x410297(0x22d)](_0x1ddbf6)!==Buffer[_0x410297(0x22d)](_0x52110c))return![];return _0x400b55[_0x410297(0x201)](Buffer[_0x410297(0x240)](_0x1ddbf6),Buffer[_0x410297(0x240)](_0x52110c));}function _0x1e82eb(_0x3fb32e){const _0x372d9a=_0x3a76;if(!_0x3fb32e?.[_0x372d9a(0x22f)](_0x372d9a(0x4b7)))return null;return _0x3fb32e[_0x372d9a(0x48e)](0x7);}function _0x3d8432(_0x30f3e9=0x20){const _0x38105e=_0x3a76;return _0x400b55['randomBytes'](_0x30f3e9)[_0x38105e(0x213)]('base64url');}function _0x2f9306(_0x4cb322){const _0xe62086=_0x3a76;return _0x400b55[_0xe62086(0x3b3)](_0xe62086(0x3e7))[_0xe62086(0x4de)](_0x4cb322)[_0xe62086(0x29e)](_0xe62086(0x1f7));}function _0x1c07c1(_0x25bac3,_0x53ed01,_0x4426bf=0x36ee80){const _0x2a6e66=_0x3a76;if(!_0x53ed01)throw new Error(_0x2a6e66(0x330));const _0x381256=Date[_0x2a6e66(0x416)](),_0xa18bf4=Buffer[_0x2a6e66(0x240)](JSON[_0x2a6e66(0x3f2)]({'iat':_0x381256,'exp':_0x381256+_0x4426bf,'sub':_0x25bac3?.['id']??_0x25bac3?.['sub']??null,'username':_0x25bac3?.[_0x2a6e66(0x47f)]??_0x25bac3?.[_0x2a6e66(0x49e)]??null,'roles':Array['isArray'](_0x25bac3?.['roles'])?_0x25bac3['roles']:[]}))['toString'](_0x2a6e66(0x4da)),_0x41048a=_0x16bd84(_0xa18bf4,_0x53ed01);return _0xa18bf4+'.'+_0x41048a;}function _0x5c6c43(_0x252c52,_0x455bd1){const _0x6cfbec=_0x3a76;if(!_0x455bd1||typeof _0x252c52!=='string')return null;const [_0x258e45,_0x296f8a]=_0x252c52['split']('.');if(!_0x258e45||!_0x296f8a)return null;const _0x1ef46c=_0x16bd84(_0x258e45,_0x455bd1);if(!_0x3fdca5(_0x296f8a,_0x1ef46c))return null;try{const _0x5e6a12=JSON['parse'](Buffer['from'](_0x258e45,_0x6cfbec(0x4da))[_0x6cfbec(0x213)]()),_0x39d672=0x7530;if(Date[_0x6cfbec(0x416)]()>Number(_0x5e6a12?.[_0x6cfbec(0x21d)]??0x0)+_0x39d672)return null;return _0x5e6a12;}catch{return null;}}async function _0x59560a(_0x54c57e){return new Promise((_0x1554d6,_0x2f9919)=>{const _0x5696d4=_0x3a76,_0x3fab97=_0x400b55[_0x5696d4(0x36e)](0x10);_0x400b55[_0x5696d4(0x222)](_0x54c57e,_0x3fab97,0x40,(_0x28fa22,_0x422961)=>{const _0x2ccafb=_0x5696d4;if(_0x28fa22)_0x2f9919(_0x28fa22);_0x1554d6(_0x3fab97['toString']('hex')+':'+_0x422961[_0x2ccafb(0x213)](_0x2ccafb(0x1f7)));});});}async function _0x4ab66c(_0x2b03f2,_0x2ec415){const _0xc024c8=_0x3a76,[_0x289f1b,_0x3647a0]=_0x2ec415[_0xc024c8(0x36d)](':');if(!_0x289f1b||!_0x3647a0)return![];const _0x4852f4=Buffer[_0xc024c8(0x240)](_0x289f1b,_0xc024c8(0x1f7));return new Promise((_0x4a26b9,_0x3d7c2c)=>{const _0x588f00=_0xc024c8;_0x400b55[_0x588f00(0x222)](_0x2b03f2,_0x4852f4,0x40,(_0x5d9c92,_0x2acda8)=>{const _0xb8111e=_0x588f00;if(_0x5d9c92)_0x3d7c2c(_0x5d9c92);_0x4a26b9(_0x400b55[_0xb8111e(0x201)](_0x2acda8,Buffer[_0xb8111e(0x240)](_0x3647a0,'hex')));});});}return okdbAuthTokens={'hmac':_0x16bd84,'timingSafeEqual':_0x3fdca5,'parseBearer':_0x1e82eb,'randomToken':_0x3d8432,'hashToken':_0x2f9306,'issueToken':_0x1c07c1,'authenticateToken':_0x5c6c43,'hashPassword':_0x59560a,'verifyPassword':_0x4ab66c},okdbAuthTokens;}function _0x30dd(){const _0x55b3e5=['\x0a\x20\x20okdb\x20doctor\x0a','detectInputType','param','index:reset','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','--log-level','system:stopped','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','net','join','OKDBForeignKeyError','Activation\x20invalid:\x20','--name','has','/api','sha256','\x20\x20✗','removeLicense','utf8','access:\x20','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','[okdb]\x20exporting\x20blobs…','doctor','summary','inputSchema','padStart','stringify',',\x20got\x20','_computeStatus','terminal','repeat','noRepl','blob','\x20\x20\x20\x20id:\x20\x20\x20\x20','put','toISOString','\x0d[okdb]\x20','true','__OKDB_PUB_FINGERPRINT__','options','\x20\x20Shell\x20commands','\x1b[90m','copy','der','map','fts','<path>','unique:violation','(add\x20a\x20license\x20first)','[okdb]\x20blobs:\x20imported=','\x20\x20changes=','existsSync','\x27\x20doesn\x27t\x20exist','(none)','type/users/item/alice\x20--env\x20staging','Events','\x0a\x20\x20','[okdb]\x20invalid\x20port:\x20','peers=','logLevel','--env','every','now','port\x20','License\x20expired\x20or\x20invalidated','writeUInt16BE','\x0a\x20\x20✓\x20License\x20activated','--username','\x20\x20\x20http://localhost:','setTtl','\x20(must\x20be\x201–65535)','types','\x20bytes,\x20need\x20>=\x2065)','_isFree','blobs','set','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','targetType','server','\x20\x20\x20\x20status:\x20\x20\x20\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/','OKDBError','fts:drop','ttl:set','DELETE\x20type/users/item/x','default','\x0a\x20\x20Joining\x20cluster\x20at\x20','OKDB-PIN-V1:','label','__writeCounter','OKDBIndexHasConsumersError','--log-requests','\x20day(s).','\x0a\x0a\x20\x20','\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-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\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\x0a\x20\x20Config\x20file\x20(.kdbconfig)\x20—\x20JSON,\x20all\x20keys\x20optional:\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22port\x22:\x20\x20\x20\x20\x208484,\x0a\x20\x20\x20\x20\x20\x20\x22path\x22:\x20\x20\x20\x20\x20\x22./okdb-data\x22,\x0a\x20\x20\x20\x20\x20\x20\x22key\x22:\x20\x20\x20\x20\x20\x20\x22...\x22,\x0a\x20\x20\x20\x20\x20\x20\x22logLevel\x22:\x20\x22info\x22,\x0a\x20\x20\x20\x20\x20\x20\x22noAdmin\x22:\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22noRepl\x22:\x20\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22auth\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22open\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20Examples:\x0a\x20\x20\x20\x20okdb\x0a\x20\x20\x20\x20okdb\x20--port\x209000\x20--path\x20./mydb\x0a\x20\x20\x20\x20okdb\x20--no-repl\x20--port\x208080\x0a\x20\x20\x20\x20okdb\x20--open\x0a\x20\x20\x20\x20okdb\x20--open\x20192.168.1.0/24\x0a\x20\x20\x20\x20okdb\x20doctor\x0a\x20\x20\x20\x20okdb\x20backup\x20./my-backup\x0a','\x20\x20✓\x20database\x20opened\x0a','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','keys/public.pem','api','OKDBTypeAlreadyRegisteredError','\x20\x20\x20\x20','License\x20already\x20stored','/type/users/item/alice\x0a\x20\x20\x20\x20','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','limits','FEATURES','\x20\x20Path\x20access','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','[okdb]\x20created\x20.kdbconfig','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','exportToFile','\x20documents\x20fail\x20validation','registerIndex','boolean','\x27\x20already\x20registered','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','Files','http://localhost:','\x20\x20╔═══════════════════════════╗','license','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','other','constructor','--label','sig','UNIQUE_CONSTRAINT','\x20\x20\x20\x20licensee:\x20\x20','createInterface','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','config\x20file\x20invalid:\x20','migrate','emit','listRoutes','%),\x20','yellow','[okdb]\x20imported\x20\x20types=','activation',':\x20key\x20[','readUInt32BE','\x1b[0m','\x20<path>\x20[json-body]','bold','\x20\x20✓\x20http\x20listening\x20on\x20:','\x20already\x20in\x20use','database\x20path\x20writable:\x20','sync:apply','clearLine','replace','reset','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','Invalid\x20primary\x20key\x20type:\x20','win32','\x20(expires\x20','allocUnsafe','use\x20<env>','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','embeddings',',\x20label:\x20','\x20\x20\x20\x20usage:\x20\x20\x20','address','--port','listening','Hint:\x20','\x22\x20already\x20exists','\x27:\x20','\x0d[okdb]\x20blobs:\x20','username','time','bus:drain','sizeBefore','licensed','\x20env','level','waiting','_systemEnv','system:drain','fromEntries','string','ceil','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','events','slice','\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','verifyActivation','meta','\x20\x20→\x20\x20','some','[okdb]\x20error:\x20--password\x20requires\x20--name','onLicenseExpired','token','no\x20.kdbconfig\x20(using\x20defaults)','\x20MB)','\x22\x20→\x20','licenseHash','../okdb','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','toUpperCase','name','OKDBUniqueConstraintError','drop','index:drop','\x20\x20Some\x20checks\x20failed.\x0a','standard','decodeActivationToken','\x20writes\x20(','Index\x20\x27','--path','decoded','~licenses','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','active','12252898SbYAsA','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','statSync','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','node:crypto','NAME','targetKey','resolve','QUIT','registerFts','types:','Bearer\x20','[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20','type/users/item/alice','argv','password','[on|off|level]','\x0a\x20\x20\x20\x20','/admin/index.html','finally','Indexes','importBlobs','\x20\x20records=','errors','\x20\x20\x20\x20expires:\x20\x20\x20','--address','decodeLicenseBlob','LICENSE_HASH_MISMATCH','exec','_license','count','changes','Records','\x1b[1m','POST','rmSync','transport:\x20','verify','typeSubDbs','created','body','toFixed','\x20SECURITY\x20NOTICE','remove','pin','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','base64url','spki','keys','pid','update','\x27\x20on\x20type\x20\x27','child_process','files/','Embeddings','unique:violation_resolved','LICENSEE','hint','createServer','LICENSE_FEATURE_DISABLED','--help','failures','TYPE_ALREADY_REGISTERED','MALFORMED_TOKEN','(null)','Queue','captureStackTrace','pause','idx:','sort','24Tycnhp','system:ready','equals','dropType','OKDBInvalidPrimaryKeyError','stopping','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','prompt','status','\x20\x20\x20\x20\x20http://localhost:','bus:poke','listen','\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','logRequests','error','HTTP\x20','pending','\x0a\x20\x20✓\x20Token\x20created','hex','round','\x20\x20✓\x20OKDB\x20server\x20running','GET','\x1b[34m','\x20\x20\x20\x20features:\x20\x20','node\x20','item:remove','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','isTTY','timingSafeEqual','logs','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','\x20\x20·\x20','\x20→\x20POST\x20/api/env/','dirname','\x20result','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','config\x20file\x20valid:\x20','\x20to\x20browse\x20the\x20API,\x20','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','(on\x20any\x20path\x20command)','Cannot\x20delete\x20','addLicense','LICENSE_LIMIT_EXCEEDED','fill','stack','starting','toString','\x1b[32m','1765akGMaY','safety','--types','[okdb]\x20reset\x20aborted','reason','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','index:ready','\x20\x20║','exp','envs','length','711446Edgoew','EADDRINUSE','scrypt','transport','\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','create','routes','type:drop','\x20type','stopped','\x20\x20\x20\x20\x20\x20\x20','env:opened','[okdb]\x20error:\x20','byteLength','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','startsWith','\x20to\x20quit.','object','TYPE_NOT_REGISTERED','EXPIRES','writeUInt8','[okdb]\x20opening\x20','\x20\x20@','isFeatureEnabled','help','EXIT','\x20\x20Usage:\x20','gray','Invalid\x20activation\x20token:\x20','--open','OKDBAlreadyExistsError','hidden','from','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','licenseType','charCodeAt','registerType','[okdb]\x20backing\x20up\x20to\x20','type/','application/json','ftsName','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','2789826JORYKg','ENVS','(no\x20types)','maxWrites','No\x20license\x20found\x20matching\x20this\x20activation\x20token','\x0a\x20\x20✓\x20License\x20added','free\x20tier','quit','getPins','call','LICENSED_BUILD','fieldPath','[okdb]\x20port\x20','--no-repl','--permissions','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','access','current','unlinkSync','creating','isArray','floor','envs=','payload','OKDBForeignKeyDeleteError','sync','_envs','history','PIN','log','OKDBIndexNotRegisteredError','active:','env/','0123456789ABCDEFGHJKMNPQRSTVWXYZ','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','SIGINT','cause','--no-admin','homedir','expiresAt','127.0.0.1','number','\x0a[okdb]\x20error:\x20','false','parse','ready','LOGS','\x1b[2m','[okdb]\x20exported\x20\x20types=','noAdmin','10865dXowXZ','files','PUBLIC_KEY_PEM','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','backup','okdb.pid','--password','includes','\x20\x20\x20\x20\x20\x20','env:removed','ttl','CREATED','\x22\x20matches\x20','title','info','body:\x20','Index\x20\x22','\x0a[okdb]\x20fatal\x20error:','debug','INDEX_NOT_REGISTERED','\x1b[31m','/type/users/query\x0a\x20\x20\x20\x20','tags','\x20\x20[','\x20\x20(','auth','/api/','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','resetFts','\x20licenses','\x27\x20is\x20already\x20registered','digest','push','method','operation','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','\x27,\x20cannot\x20map\x20to\x20\x27','\x22\x20to\x20enable\x20it.','\x20\x20(licensee:\x20','\x20\x20Type\x20','yes','question','--changes','~tokens','1288863AuyTNf','INDEX_HAS_CONSUMERS','ref:violation_resolved','\x20\x20\x20\x20\x20\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','timeMachine','OKDBIndexAlreadyRegisteredError','cyan','trim','\x20\x20\x20\x20limits:\x20\x20\x20\x20','null','\x20\x20\x20\x20\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/','id:\x20','../','OKDBNotFoundError','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','\x20\x20╚═══════════════════════════╝','import','VERSION_MISMATCH','attach','dest','port','\x20\x20Expected\x20one\x20of:','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','INDEX_ALREADY_REGISTERED','detachConsole','resetIndex','Feature\x20not\x20licensed:\x20','PUB_FINGERPRINT','columns','[env]','padEnd','[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping','activateLicense','indexToDb','\x22.\x20Use:\x20create,\x20list,\x20revoke','readFileSync','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20status:\x20\x20\x20\x20active','FOREIGN_KEY_DELETE_RESTRICTED','open\x20','--grants','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','forEach','Examples','reload','./okdb-backup','readline','env','indexes','children','PUT','\x20\x20(name:\x20',':\x20expected\x20','dim','system:bus_state_change','version','test','Schema\x20validation\x20failed\x20for\x20','\x20MB\x20→\x20','hasOwnProperty','exportBlobs','rawBuf','31938iLKcKX','http','[okdb]\x20starting…\x0a','{}[]:,\x27\x22','\x0a[okdb]\x20shutting\x20down…\x0a','warn','--blobs','\x20\x20Error:\x20','System','INVALID_INDEX_KEY','key','concat','Build\x20expects\x20public\x20key\x20fingerprint\x20','enabled','mcp','listLicenses','filter','\x20\x20\x20\x20license:\x20','node','\x20does\x20not\x20exist','\x22\x20is\x20used\x20by:\x20','export','uuid','catch','\x20\x20⚠\x20\x20','.okdb-write-test','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','admin','dynamic','\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20(','Unique\x20constraint\x20violated\x20on\x20','license:removed','grants','stderr','DELETE','platform','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','item:update','STATUS','\x20\x20Envs:\x20\x20\x20\x20','init','config','green','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','LICENSE_EXPIRED_ACTION','clearTtl','fts:registered','\x20\x20\x20\x20port:\x20\x20','\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)','magenta','exit','PERMISSIONS','OKDBVersionMismatchError','\x20log\x20level:\x20','getSecurityNotices','stdin','stdout','_active','close','ref:violation','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','txn:start','\x20\x20Flags','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','entries','Type\x20\x27','\x20not\x20found','expiry','(unset)','unknown','Token\x20secret\x20not\x20configured','syncPeers','index:registered','[okdb]\x20backup\x20complete','write','fts:reset','addedAt','LICENSE_INVALID','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','\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','Invalid\x20index\x20key\x20type\x20for\x20\x27','\x20opening\x20','SIGTERM','\x20\x20Writes:\x20\x20','_licenseHash','\x1b[37m','writes=','VERB','--token','\x1b[33m','message','txn:rollback','\x20\x20\x20\x20addedAt:\x20\x20\x20','[okdb]\x20invalid\x20log\x20level:\x20\x22','hasType','bind','mkdirSync','txn:end','data','--ttl','\x20more','red','search','\x20environment\x20','Invalid\x20license\x20blob:\x20','exports','LABEL','licensee','off','type:registered','resetting','okdb','INVALID_VALUE','\x20\x20skipped=','\x20records','--config','records','\x1b[36m','\x20\x20All\x20checks\x20passed.\x0a','ALREADY_EXISTS','[okdb]\x20nothing\x20to\x20reset\x20—\x20','\x20deleted','values','item:create','HELP','[okdb]\x20importing\x20','dropFts','ttl:expired','\x20\x20\x20\x20writes:\x20\x20\x20\x20','USE','split','randomBytes','endsWith','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','start\x20','crypto','ENV','tags:\x20','get','effective','dbPath','setPrompt','Environments','value','\x20\x20\x20\x20graceful\x20shutdown\x0a','path','reverse','\x20logs\x20off\x0a','LICENSE_ACTIVATION_INVALID','level:\x20info','max','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','OKDBInvalidValueError',']\x20already\x20maps\x20to\x20\x27','\x20\x20[okdb]\x20shutting\x20down…','setSchema','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20\x20','once','derivePin','\x20\x20·\x20\x20','references','schema:drop','2761176uEPXxu','\x20\x20(need\x20≥\x2018)','\x20in\x20','\x22\x20(must\x20be\x20debug|info|warn|error)','invalid','\x20tokens:','isInteger','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','sourceKey','toLowerCase','open','assertLimit','writeUInt32BE','toLocaleString','sizeAfter','expires','indexOf','randomUUID','SIG_INVALID','OKDBTypeNotRegisteredError','writeFileSync','LICENSE_TYPE_OPEN','\x20\x20\x20\x20path:\x20\x20','engines','\x20\x20✓\x20Removed\x20license\x20','system:poke','--version','freeze','\x22\x20on\x20\x22','loadEnvFile','permissions','Version\x20mismatch\x20for\x20','\x0a\x20\x20License\x20details:','license:invalid','./okdb-data','\x20/\x20','revoke','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','createHash','result','Processors','createHmac','kind','getRange','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','trimStart','list','FOREIGN_KEY_VIOLATION','\x20\x20\x20\x20permissions:\x20','INVALID_PRIMARY_KEY','[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping','[okdb]\x20reset:\x20','\x20\x20⚠','then','OPEN','typesPerEnv','--key','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','No\x20tokens.','description','features','.kdbconfig','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Common\x20causes:','white','readUInt8','readUInt16BE','\x20\x20(unlimited)','type','[okdb]\x20started\x20in\x20','min','{}[]:,\x0a\x0d\x09\x20','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','\x20for\x20commands,\x20'];_0x30dd=function(){return _0x55b3e5;};return _0x30dd();}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x54ed4c=_0xddaf03;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x42a874=require$$0$1,_0x3576df=_0x54ed4c(0x26e),_0x38b19e=new Uint8Array(0x100)[_0x54ed4c(0x210)](0xff);for(let _0x381afe=0x0;_0x381afe<_0x3576df['length'];_0x381afe++){_0x38b19e[_0x3576df[_0x54ed4c(0x244)](_0x381afe)]=_0x381afe,_0x38b19e[_0x3576df[_0x54ed4c(0x244)](_0x381afe)+0x20]=_0x381afe;}_0x38b19e['O'['charCodeAt'](0x0)]=0x0,_0x38b19e['o'[_0x54ed4c(0x244)](0x0)]=0x0,_0x38b19e['I'['charCodeAt'](0x0)]=0x1,_0x38b19e['i'[_0x54ed4c(0x244)](0x0)]=0x1,_0x38b19e['L'['charCodeAt'](0x0)]=0x1,_0x38b19e['l'['charCodeAt'](0x0)]=0x1;function _0x211ebc(_0x1415b5){let _0x201167=0x0,_0x44a392=0x0,_0x134aad='';for(let _0x536206=0x0;_0x536206<_0x1415b5['length'];_0x536206++){_0x44a392=_0x44a392<<0x8|_0x1415b5[_0x536206],_0x201167+=0x8;while(_0x201167>=0x5){_0x201167-=0x5,_0x134aad+=_0x3576df[_0x44a392>>>_0x201167&0x1f];}}return _0x201167>0x0&&(_0x134aad+=_0x3576df[_0x44a392<<0x5-_0x201167&0x1f]),_0x134aad;}function _0x21aace(_0x216ec5){const _0x7c39f9=_0x54ed4c;_0x216ec5=_0x216ec5[_0x7c39f9(0x46c)](/-/g,'')['toUpperCase']();let _0x4b02f8=0x0,_0x135e17=0x0;const _0x2a5e29=[];for(let _0x1556f9=0x0;_0x1556f9<_0x216ec5['length'];_0x1556f9++){const _0x5289d1=_0x38b19e[_0x216ec5[_0x7c39f9(0x244)](_0x1556f9)];if(_0x5289d1===0xff)continue;_0x135e17=_0x135e17<<0x5|_0x5289d1,_0x4b02f8+=0x5,_0x4b02f8>=0x8&&(_0x4b02f8-=0x8,_0x2a5e29['push'](_0x135e17>>>_0x4b02f8&0xff));}return Buffer[_0x7c39f9(0x240)](_0x2a5e29);}const _0x125d98=[_0x54ed4c(0x266),_0x54ed4c(0x475),_0x54ed4c(0x3a4),_0x54ed4c(0x405),_0x54ed4c(0x2af),'views',_0x54ed4c(0x2f7),_0x54ed4c(0x280)],_0x10b1f1=0x0,_0x2d48a6=0x1,_0x495023=0x2,_0x26c459=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x20bddd({issuedAt:_0x47fd02,expiresAt:_0x30001b,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x10b1f1}){const _0x536dab=_0x54ed4c,_0x35b501=Buffer['from'](licensee,_0x536dab(0x3ea))[_0x536dab(0x48e)](0x0,0x40),_0x595a41=0x1+0x1+0x4+0x4+0x1+_0x35b501[_0x536dab(0x21f)]+0x2+0x10,_0x477ac7=Buffer['allocUnsafe'](_0x595a41);let _0x4caa85=0x0;_0x477ac7['writeUInt8'](0x1,_0x4caa85++),_0x477ac7[_0x536dab(0x234)](licenseType,_0x4caa85++),_0x477ac7[_0x536dab(0x399)](Math[_0x536dab(0x262)](_0x47fd02/0x3e8),_0x4caa85),_0x4caa85+=0x4,_0x477ac7[_0x536dab(0x399)](Math[_0x536dab(0x262)](_0x30001b/0x3e8),_0x4caa85),_0x4caa85+=0x4,_0x477ac7['writeUInt8'](_0x35b501['length'],_0x4caa85++),_0x35b501[_0x536dab(0x402)](_0x477ac7,_0x4caa85),_0x4caa85+=_0x35b501['length'];let _0x1ff054=0x0;for(let _0x3e5dfa=0x0;_0x3e5dfa<_0x125d98[_0x536dab(0x21f)];_0x3e5dfa++){if(features[_0x125d98[_0x3e5dfa]])_0x1ff054|=0x1<<_0x3e5dfa;}_0x477ac7[_0x536dab(0x419)](_0x1ff054,_0x4caa85),_0x4caa85+=0x2;const _0x40d9a8=['envs',_0x536dab(0x3c4),'syncPeers',_0x536dab(0x24f)];for(const _0x209d96 of _0x40d9a8){_0x477ac7[_0x536dab(0x399)](limits[_0x209d96]||0x0,_0x4caa85),_0x4caa85+=0x4;}return _0x477ac7;}function _0x216795(_0x517058){const _0x5be00e=_0x54ed4c;let _0x2b9f7c=0x0;const _0x28d9e2=_0x517058['readUInt8'](_0x2b9f7c++),_0x2ed21e=_0x517058[_0x5be00e(0x3cf)](_0x2b9f7c++),_0xd06ef9=_0x517058[_0x5be00e(0x463)](_0x2b9f7c);_0x2b9f7c+=0x4;const _0x36bb93=_0x517058[_0x5be00e(0x463)](_0x2b9f7c);_0x2b9f7c+=0x4;const _0x1ebe73=_0x517058[_0x5be00e(0x3cf)](_0x2b9f7c++),_0x7c9ff3=_0x517058['slice'](_0x2b9f7c,_0x2b9f7c+_0x1ebe73)['toString']('utf8');_0x2b9f7c+=_0x1ebe73;const _0x38b5db=_0x517058[_0x5be00e(0x3d0)](_0x2b9f7c);_0x2b9f7c+=0x2;const _0x2ec6e6={};for(let _0x5c4b65=0x0;_0x5c4b65<_0x125d98['length'];_0x5c4b65++){_0x2ec6e6[_0x125d98[_0x5c4b65]]=Boolean(_0x38b5db&0x1<<_0x5c4b65);}const _0x201e37=['envs',_0x5be00e(0x3c4),'syncPeers',_0x5be00e(0x24f)],_0x5730bb={};for(const _0x42a9fa of _0x201e37){const _0x180872=_0x517058[_0x5be00e(0x463)](_0x2b9f7c);_0x2b9f7c+=0x4,_0x5730bb[_0x42a9fa]=_0x180872===0x0?null:_0x180872;}return{'v':_0x28d9e2,'licenseType':_0x2ed21e,'issuedAt':_0xd06ef9*0x3e8,'expiresAt':_0x36bb93*0x3e8,'licensee':_0x7c9ff3,'features':_0x2ec6e6,'limits':_0x5730bb};}function _0x4f0cde(_0x2122e1,_0x56b3f2){const _0x298c56=_0x54ed4c,_0x144727=Buffer[_0x298c56(0x2f4)]([_0x2122e1,_0x56b3f2]),_0x4d63aa=_0x211ebc(_0x144727),_0x311d40=[];for(let _0x1dfe91=0x0;_0x1dfe91<_0x4d63aa[_0x298c56(0x21f)];_0x1dfe91+=0x8){_0x311d40[_0x298c56(0x29f)](_0x4d63aa[_0x298c56(0x48e)](_0x1dfe91,_0x1dfe91+0x8));}return _0x311d40['join']('-');}function _0x2031ea(_0x47432c){const _0x475103=_0x54ed4c;if(typeof _0x47432c!==_0x475103(0x48a))throw new Error(_0x475103(0x3ec));const _0x99b747=_0x21aace(_0x47432c['replace'](/-/g,''));if(_0x99b747['length']<0x41)throw new Error(_0x475103(0x3b2)+_0x99b747[_0x475103(0x21f)]+_0x475103(0x420));const _0x492094=_0x99b747['slice'](0x0,_0x99b747['length']-0x40),_0x1334c2=_0x99b747[_0x475103(0x48e)](_0x99b747[_0x475103(0x21f)]-0x40);let _0x1d78cd;try{_0x1d78cd=_0x216795(_0x492094);}catch(_0x50687c){throw new Error(_0x475103(0x20b)+_0x50687c['message']);}return{'rawBuf':_0x99b747,'payload':_0x492094,'sig':_0x1334c2,'decoded':_0x1d78cd};}function _0x181fa0(_0x3129a8){const _0x316b64=_0x54ed4c;return _0x42a874[_0x316b64(0x3b3)](_0x316b64(0x3e7))[_0x316b64(0x4de)](_0x3129a8)['digest']()['slice'](0x0,0x8);}function _0x42fbf3(_0x28f885,_0x1bc788,_0x22e977){const _0x239bde=_0x54ed4c,_0x103880=_0x239bde(0x42f)+_0x22e977,_0x3d1060=Buffer[_0x239bde(0x2f4)]([Buffer['from'](_0x28f885,_0x239bde(0x3ea)),_0x1bc788]),_0x1783f1=_0x42a874[_0x239bde(0x3b6)](_0x239bde(0x3e7),_0x103880)[_0x239bde(0x4de)](_0x3d1060)[_0x239bde(0x29e)](),_0x5223cc=_0x211ebc(_0x1783f1[_0x239bde(0x48e)](0x0,0x5));return{'pin':_0x5223cc,'pinHmac':_0x1783f1};}function _0x384dec(_0xe766b4,_0x557d36,_0x4b176f){const _0x3fe8dd=_0x54ed4c,_0x3f8618=Buffer['allocUnsafe'](0x4d);let _0x54bfb0=0x0;_0x3f8618[_0x3fe8dd(0x234)](0x1,_0x54bfb0++),_0xe766b4[_0x3fe8dd(0x402)](_0x3f8618,_0x54bfb0),_0x54bfb0+=0x8,_0x3f8618['writeUInt32BE'](_0x557d36,_0x54bfb0),_0x54bfb0+=0x4,_0x4b176f[_0x3fe8dd(0x402)](_0x3f8618,_0x54bfb0);const _0x57e86=_0x211ebc(_0x3f8618),_0x3531a8=[];for(let _0x43cbaf=0x0;_0x43cbaf<_0x57e86[_0x3fe8dd(0x21f)];_0x43cbaf+=0x6){_0x3531a8['push'](_0x57e86[_0x3fe8dd(0x48e)](_0x43cbaf,_0x43cbaf+0x6));}return _0x3531a8[_0x3fe8dd(0x3e1)]('-');}function _0x57906a(_0x123e13){const _0x38ad0c=_0x54ed4c;if(typeof _0x123e13!==_0x38ad0c(0x48a))throw new Error(_0x38ad0c(0x1ff));const _0x465db9=_0x21aace(_0x123e13[_0x38ad0c(0x46c)](/-/g,''));if(_0x465db9[_0x38ad0c(0x21f)]!==0x4d)throw new Error(_0x38ad0c(0x339)+_0x465db9[_0x38ad0c(0x21f)]);let _0x3826c3=0x0;const _0x1a1798=_0x465db9['readUInt8'](_0x3826c3++),_0x2d9414=_0x465db9[_0x38ad0c(0x48e)](_0x3826c3,_0x3826c3+0x8);_0x3826c3+=0x8;const _0x124f48=_0x465db9[_0x38ad0c(0x463)](_0x3826c3);_0x3826c3+=0x4;const _0x10fea4=_0x465db9[_0x38ad0c(0x48e)](_0x3826c3);return{'v':_0x1a1798,'licenseHash':_0x2d9414,'expiry':_0x124f48,'sig':_0x10fea4};}function _0x22b02f({tokenString:_0x4001f6,nodeId:_0x133f52,rawBlobBuf:_0x59859a,pubKeyPem:_0x78679b,pubFingerprint:_0x39f041}){const _0x5d5609=_0x54ed4c;let _0xd21768;try{_0xd21768=_0x57906a(_0x4001f6);}catch(_0x18887b){return{'valid':![],'reason':_0x5d5609(0x4eb)};}const _0x30649a=_0x181fa0(_0x59859a);if(!_0x30649a[_0x5d5609(0x1e7)](_0xd21768[_0x5d5609(0x49a)]))return{'valid':![],'reason':_0x5d5609(0x4c7)};const {pinHmac:_0x322def}=_0x42fbf3(_0x133f52,_0x30649a,_0x39f041),_0x593990=Buffer[_0x5d5609(0x472)](0x4);_0x593990[_0x5d5609(0x399)](_0xd21768[_0x5d5609(0x32d)],0x0);const _0x3ed055=Buffer[_0x5d5609(0x2f4)]([Buffer[_0x5d5609(0x240)]([_0xd21768['v']]),_0x322def[_0x5d5609(0x48e)](0x0,0x5),_0xd21768['licenseHash'],_0x593990]);try{const _0x5ac819=_0x42a874[_0x5d5609(0x4d1)](null,_0x3ed055,_0x78679b,_0xd21768['sig']);if(!_0x5ac819)return{'valid':![],'reason':_0x5d5609(0x39f)};}catch(_0x57ad8e){return{'valid':![],'reason':_0x5d5609(0x39f)};}if(_0xd21768['expiry']<Date['now']()/0x3e8)return{'valid':![],'reason':'ACTIVATION_EXPIRED'};return{'valid':!![],'reason':'ok'};}function _0x23956b(_0x457987){const _0x1863c5=_0x54ed4c;if(typeof _0x457987!==_0x1863c5(0x48a))return _0x1863c5(0x32f);const _0x3a0aaf=_0x457987['trim']();if(_0x3a0aaf[_0x1863c5(0x22f)]('/')||_0x3a0aaf[_0x1863c5(0x22f)]('./')||_0x3a0aaf[_0x1863c5(0x22f)](_0x1863c5(0x2b7))||/^[A-Za-z]:[\\/]/[_0x1863c5(0x2e3)](_0x3a0aaf))return'path';if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x1863c5(0x2e3)](_0x3a0aaf))return _0x1863c5(0x2ff);const _0x3d0a2a=_0x3a0aaf[_0x1863c5(0x46c)](/[\s-]+/g,'')[_0x1863c5(0x21f)];if(_0x3d0a2a===0x7c)return'activation';if(_0x3d0a2a>=0x95&&_0x3d0a2a<=0xfc)return _0x1863c5(0x3f8);return _0x1863c5(0x32f);}return okdbLicenseCodec={'toBase32':_0x211ebc,'fromBase32':_0x21aace,'encodeLicensePayload':_0x20bddd,'decodeLicensePayload':_0x216795,'encodeLicenseBlob':_0x4f0cde,'decodeLicenseBlob':_0x2031ea,'licenseHash':_0x181fa0,'derivePin':_0x42fbf3,'encodeActivationToken':_0x384dec,'decodeActivationToken':_0x57906a,'verifyActivation':_0x22b02f,'detectInputType':_0x23956b,'FEATURE_NAMES':_0x125d98,'LICENSE_TYPE_STANDARD':_0x10b1f1,'LICENSE_TYPE_OPEN':_0x2d48a6,'LICENSE_TYPE_INTERNAL':_0x495023,'OPEN_LICENSE_MAX_DURATION_MS':_0x26c459},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x5ed7e3 extends Error{constructor(_0x721ca,_0x4a5131,_0x431c3a={}){const _0x2fdb70=_0x3a76;super(_0x721ca),this[_0x2fdb70(0x49e)]=_0x2fdb70(0x429),this['code']=_0x4a5131,this['details']=_0x431c3a,_0x431c3a[_0x2fdb70(0x271)]&&(this[_0x2fdb70(0x271)]=_0x431c3a[_0x2fdb70(0x271)]),Error[_0x2fdb70(0x4ee)](this,this[_0x2fdb70(0x453)]);}}class _0x5e91c5 extends _0x5ed7e3{constructor(_0x6bee53,_0x5d0e63,_0x4e6d9c,_0x41247e){const _0x15d004=_0x3a76;super(_0x15d004(0x3ac)+_0x6bee53+'@'+_0x5d0e63+_0x15d004(0x2df)+_0x4e6d9c+_0x15d004(0x3f3)+_0x41247e,_0x15d004(0x2bc),{'type':_0x6bee53,'key':_0x5d0e63,'expectedVersion':_0x4e6d9c,'actualVersion':_0x41247e}),this[_0x15d004(0x49e)]=_0x15d004(0x31e);}}class _0x4321a7 extends _0x5ed7e3{constructor(_0x1c38c9,_0x4781e7){const _0x2d9491=_0x3a76;super(_0x1c38c9+'@'+_0x4781e7+_0x2d9491(0x2fc),'NOT_FOUND',{'type':_0x1c38c9,'key':_0x4781e7}),this[_0x2d9491(0x49e)]=_0x2d9491(0x2b8);}}class _0x56950d extends _0x5ed7e3{constructor(_0x5d6541,_0x32912a){const _0x41433a=_0x3a76;super(_0x5d6541+'@'+_0x32912a+'\x20already\x20exists',_0x41433a(0x362),{'type':_0x5d6541,'key':_0x32912a}),this[_0x41433a(0x49e)]=_0x41433a(0x23e);}}class _0x35cc58 extends _0x5ed7e3{constructor(_0x1f538b,_0xc69881){const _0x99c23d=_0x3a76,_0x312309=typeof _0xc69881;super(_0x99c23d(0x33b)+_0x1f538b+_0x99c23d(0x47d)+_0x312309+_0x99c23d(0x46e)+_0xc69881,_0x99c23d(0x2f2),{'index':_0x1f538b,'key':_0xc69881,'keyType':_0x312309}),this[_0x99c23d(0x49e)]='OKDBInvalidIndexKeyError';}}class _0xe91a63 extends _0x5ed7e3{constructor(_0x20a3c1){const _0x379c94=_0x3a76,_0x22c89a=typeof _0x20a3c1;super(_0x379c94(0x46f)+_0x22c89a+_0x379c94(0x26f)+_0x20a3c1,_0x379c94(0x3be),{'key':_0x20a3c1,'keyType':_0x22c89a}),this[_0x379c94(0x49e)]=_0x379c94(0x1e9);}}class _0x1e56e9 extends _0x5ed7e3{constructor(_0x277258){const _0x8e35d=_0x3a76;super(_0x8e35d(0x32b)+_0x277258+_0x8e35d(0x40c),_0x8e35d(0x232),{'type':_0x277258}),this['name']=_0x8e35d(0x3a0);}}class _0x40f96d extends _0x5ed7e3{constructor(_0x5892c4){const _0x4cab83=_0x3a76;super(_0x4cab83(0x32b)+_0x5892c4+_0x4cab83(0x44a),_0x4cab83(0x4ea),{'type':_0x5892c4}),this[_0x4cab83(0x49e)]=_0x4cab83(0x43b);}}class _0x39c250 extends _0x5ed7e3{constructor(_0x1c86ae,_0x20068e){const _0x4c0d38=_0x3a76;super(_0x4c0d38(0x4a6)+_0x20068e+_0x4c0d38(0x4df)+_0x1c86ae+_0x4c0d38(0x40c),_0x4c0d38(0x292),{'type':_0x1c86ae,'index':_0x20068e}),this['name']=_0x4c0d38(0x26b);}}class _0x22a75b extends _0x5ed7e3{constructor(_0x292784,_0x50e9b5){const _0x333063=_0x3a76;super(_0x333063(0x4a6)+_0x50e9b5+_0x333063(0x4df)+_0x292784+_0x333063(0x29d),_0x333063(0x2c2),{'type':_0x292784,'index':_0x50e9b5}),this[_0x333063(0x49e)]=_0x333063(0x2b0);}}class _0x4439b2 extends _0x5ed7e3{constructor(_0xe9e134,_0x1bc8e0={}){const _0x2284cd=_0x3a76;super(_0xe9e134,_0x2284cd(0x35b),_0x1bc8e0),this['name']=_0x2284cd(0x383);}}class _0x482b2e extends _0x5ed7e3{constructor(_0x583fbe,_0x43a565,_0x477f30,_0x5c95d1,_0x11a0ab){const _0x58c8f6=_0x3a76;super(_0x58c8f6(0x307)+_0x583fbe+'@'+_0x43a565+_0x58c8f6(0x462)+_0x477f30+_0x58c8f6(0x384)+_0x5c95d1+_0x58c8f6(0x2a3)+_0x11a0ab+'\x27',_0x58c8f6(0x456),{'type':_0x583fbe,'index':_0x43a565,'indexKey':_0x477f30,'existingKey':_0x5c95d1,'conflictingKey':_0x11a0ab}),this[_0x58c8f6(0x49e)]=_0x58c8f6(0x49f);}}class _0x565490 extends _0x5ed7e3{constructor(_0x296dcf,_0x2dd342,_0x445b82){const _0x461202=_0x3a76;super(_0x461202(0x2e4)+_0x296dcf+'@'+_0x2dd342,'SCHEMA_VALIDATION_FAILED',{'type':_0x296dcf,'key':_0x2dd342,'errors':_0x445b82}),this['name']='OKDBSchemaValidationError',this['type']=_0x296dcf,this['key']=_0x2dd342,this[_0x461202(0x4c3)]=_0x445b82;}}class _0x576760 extends _0x5ed7e3{constructor(_0x21d41e,_0x4aeb0f){const _0x3f9051=_0x3a76;super('Cannot\x20set\x20enforce\x20schema\x20on\x20'+_0x21d41e+':\x20'+_0x4aeb0f[_0x3f9051(0x21f)]+_0x3f9051(0x447),'SCHEMA_COLLECTION_INVALID',{'type':_0x21d41e,'failures':_0x4aeb0f}),this[_0x3f9051(0x49e)]='OKDBSchemaCollectionError',this[_0x3f9051(0x3d2)]=_0x21d41e,this[_0x3f9051(0x4e9)]=_0x4aeb0f;}}class _0x45ecb4 extends _0x5ed7e3{constructor(_0x1a9994,_0x230c90,_0x5cc220,_0x3618d4,_0x5f406d){const _0x4697b6=_0x3a76;super('Foreign\x20key\x20violation:\x20'+_0x1a9994+'@'+_0x230c90+'.'+_0x5cc220+'\x20references\x20'+_0x3618d4+'@'+_0x5f406d+'\x20which\x20does\x20not\x20exist',_0x4697b6(0x3bc),{'sourceType':_0x1a9994,'sourceKey':_0x230c90,'fieldPath':_0x5cc220,'targetType':_0x3618d4,'targetKey':_0x5f406d}),this[_0x4697b6(0x49e)]=_0x4697b6(0x3e2),this['sourceType']=_0x1a9994,this[_0x4697b6(0x395)]=_0x230c90,this[_0x4697b6(0x257)]=_0x5cc220,this[_0x4697b6(0x425)]=_0x3618d4,this[_0x4697b6(0x4b2)]=_0x5f406d;}}class _0x178d6b extends _0x5ed7e3{constructor(_0xf757c,_0x57fbdd,_0x8eaecf){const _0x3128cc=_0x3a76;super(_0x3128cc(0x20d)+_0xf757c+'@'+_0x57fbdd+':\x20'+_0x8eaecf[_0x3128cc(0x21f)]+'\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict',_0x3128cc(0x2d1),{'targetType':_0xf757c,'targetKey':_0x57fbdd,'references':_0x8eaecf}),this[_0x3128cc(0x49e)]=_0x3128cc(0x265),this['targetType']=_0xf757c,this[_0x3128cc(0x4b2)]=_0x57fbdd,this[_0x3128cc(0x38b)]=_0x8eaecf;}}class _0x534c61 extends _0x5ed7e3{constructor(_0xaa1966,_0x4efe83,_0x4f6804){const _0x122d9d=_0x3a76;super(_0x122d9d(0x28f)+_0x4efe83+_0x122d9d(0x3a9)+_0xaa1966+_0x122d9d(0x2fd)+_0x4f6804[_0x122d9d(0x404)](_0x3c66b7=>_0x3c66b7[_0x122d9d(0x3b7)]+':'+_0x3c66b7[_0x122d9d(0x49e)])['join'](',\x20'),_0x122d9d(0x2ac),{'type':_0xaa1966,'index':_0x4efe83,'usedBy':_0x4f6804}),this[_0x122d9d(0x49e)]=_0x122d9d(0x432);}}return okdbError={'OKDBError':_0x5ed7e3,'OKDBVersionMismatchError':_0x5e91c5,'OKDBNotFoundError':_0x4321a7,'OKDBAlreadyExistsError':_0x56950d,'OKDBInvalidIndexKeyError':_0x35cc58,'OKDBInvalidPrimaryKeyError':_0xe91a63,'OKDBTypeNotRegisteredError':_0x1e56e9,'OKDBTypeAlreadyRegisteredError':_0x40f96d,'OKDBIndexNotRegisteredError':_0x39c250,'OKDBIndexAlreadyRegisteredError':_0x22a75b,'OKDBInvalidValueError':_0x4439b2,'OKDBUniqueConstraintError':_0x482b2e,'OKDBSchemaValidationError':_0x565490,'OKDBSchemaCollectionError':_0x576760,'OKDBForeignKeyError':_0x45ecb4,'OKDBForeignKeyDeleteError':_0x178d6b,'OKDBIndexHasConsumersError':_0x534c61},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function _0x3a76(_0x3d8522,_0x2afbcf){_0x3d8522=_0x3d8522-0x1e2;const _0x30dd4d=_0x30dd();let _0x3a766d=_0x30dd4d[_0x3d8522];return _0x3a766d;}function requireOkdbEnums(){const _0x2976f8=_0xddaf03;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x11310e={'PUT':_0x2976f8(0x3fa),'REMOVE':'remove','INDEX_DROP':'dropIndex','INDEX_REGISTER':_0x2976f8(0x448),'INDEX_RESET':_0x2976f8(0x2c4),'TYPE_REGISTER':_0x2976f8(0x245),'TYPE_DROP':_0x2976f8(0x1e8),'FTS_REGISTER':_0x2976f8(0x4b5),'FTS_DROP':_0x2976f8(0x369),'FTS_RESET':_0x2976f8(0x29b),'SCHEMA_SET':_0x2976f8(0x386),'SCHEMA_DROP':'dropSchema','TTL_SET':_0x2976f8(0x41d),'TTL_CLEAR':_0x2976f8(0x317)},_0x232653={'SYSTEM_READY':_0x2976f8(0x1e6),'SYSTEM_STOPPED':_0x2976f8(0x3de),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x2976f8(0x3a6),'SYSTEM_DRAIN':_0x2976f8(0x488),'SYSTEM_BUS_STATE_CHANGE':_0x2976f8(0x2e1),'ITEM_CREATE':_0x2976f8(0x366),'ITEM_UPDATE':_0x2976f8(0x30e),'ITEM_REMOVE':_0x2976f8(0x1fe),'INDEX_RESET':_0x2976f8(0x3db),'INDEX_READY':_0x2976f8(0x21b),'INDEX_PROGRESS':'index:progress','INDEX_DROP':_0x2976f8(0x4a1),'INDEX_REGISTERED':_0x2976f8(0x332),'FTS_REGISTERED':_0x2976f8(0x318),'FTS_DROP':_0x2976f8(0x42a),'FTS_RESET':_0x2976f8(0x335),'SCHEMA_SET':'schema:set','SCHEMA_DROP':_0x2976f8(0x38c),'UNIQUE_VIOLATION':_0x2976f8(0x407),'UNIQUE_VIOLATION_RESOLVED':_0x2976f8(0x4e3),'REF_VIOLATION':_0x2976f8(0x325),'REF_VIOLATION_RESOLVED':_0x2976f8(0x2ad),'SYNC_APPLY':_0x2976f8(0x46a),'TXN_START':_0x2976f8(0x327),'TXN_END':_0x2976f8(0x34c),'TXN_ROLLBACK':_0x2976f8(0x346),'TYPE_REGISTERED':_0x2976f8(0x358),'TYPE_DROP':_0x2976f8(0x227),'ENV_OPENED':_0x2976f8(0x22b),'ENV_REMOVED':_0x2976f8(0x288),'TTL_EXPIRED':_0x2976f8(0x36a),'TTL_SET':_0x2976f8(0x42b),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x2976f8(0x3ae),'LICENSE_ADDED':'license:added','LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':_0x2976f8(0x308)},_0x454b93={'CREATING':_0x2976f8(0x260),'RESETTING':'resetting','READY':_0x2976f8(0x27a),'DROPPING':'dropping','WAITING':_0x2976f8(0x486)},_0x1ece9c={'CREATED':_0x2976f8(0x4d3),'STARTING':_0x2976f8(0x212),'STARTED':'started','STOPPING':_0x2976f8(0x1ea),'STOPPED':_0x2976f8(0x229)},_0x36ae20={'CREATING':_0x2976f8(0x260),'READY':_0x2976f8(0x27a),'HALTED':'halted','STOPPED':_0x2976f8(0x229),'RESETTING':_0x2976f8(0x359)},_0x25f947=Object[_0x2976f8(0x3a8)]({'POKE':_0x2976f8(0x1ef),'DRAIN':_0x2976f8(0x481)});return okdbEnums={'BUS_EVENTS':_0x25f947,'CHANGE_ACTIONS':_0x11310e,'EVENTS':_0x232653,'INDEX_STATE':_0x454b93,'OKDB_STATE':_0x1ece9c,'VIEW_STATE':_0x36ae20},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x2ee2fd=_0xddaf03;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x39a405=require$$1,_0x1ea9f9=require$$1$1,_0x3b472e=require$$0,_0x5e33cf=_0x39a405[_0x2ee2fd(0x2ce)](_0x1ea9f9[_0x2ee2fd(0x3e1)](__dirname,_0x2ee2fd(0x439)),_0x2ee2fd(0x3ea))[_0x2ee2fd(0x2b2)](),_0x23c82c=_0x3b472e['createPublicKey'](_0x5e33cf)[_0x2ee2fd(0x2fe)]({'type':_0x2ee2fd(0x4db),'format':_0x2ee2fd(0x403)}),_0x5a8ca1=_0x3b472e['createHash'](_0x2ee2fd(0x3e7))[_0x2ee2fd(0x4de)](_0x23c82c)[_0x2ee2fd(0x29e)](_0x2ee2fd(0x1f7))[_0x2ee2fd(0x48e)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x5e33cf,'PUB_FINGERPRINT':_0x5a8ca1},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0xa75729=_0xddaf03;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x27c312=require$$0,{OKDBError:_0x5e3a1b}=requireOkdbError(),{EVENTS:_0x5b4020}=requireOkdbEnums(),_0x2351f5=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x48ffd4,LICENSE_TYPE_INTERNAL:_0x1d62c1,OPEN_LICENSE_MAX_DURATION_MS:_0x279022}=_0x2351f5,_0x460d28=requireOkdbPubkey(),_0x1f2b2e={'LICENSED_BUILD':'true','PUBLIC_KEY_PEM':_0x460d28['PUBLIC_KEY_PEM'],'PUB_FINGERPRINT':_0x460d28[_0xa75729(0x2c6)],'LICENSE_EXPIRED_ACTION':_0xa75729(0x26a)},_0x17163f='~licenses',_0x568292={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x99bce6(_0xe3b44f){const _0x4eb638=_0xa75729;!_0xe3b44f[_0x4eb638(0x349)](_0x17163f)&&await _0xe3b44f[_0x4eb638(0x245)](_0x17163f);}class _0x5f0962{constructor(_0x43a4e1){const _0x18efd6=_0xa75729;this['okdb']=_0x43a4e1,this[_0x18efd6(0x323)]=null;}async['reload'](){const _0x1b130f=_0xa75729,_0x124314=this['okdb'][_0x1b130f(0x487)];if(!_0x124314||!_0x124314[_0x1b130f(0x349)](_0x17163f)){this[_0x1b130f(0x323)]=null;return;}const _0x514c9e=this['okdb']['id'];let _0x3eda3f=null;for(const {key:_0xbe1210,value:_0x39aff6}of _0x124314[_0x1b130f(0x3b8)](_0x17163f)){const _0x2acdcd=this['_computeStatus'](_0x39aff6,_0x514c9e);_0x2acdcd===_0x1b130f(0x4ab)&&!_0x3eda3f&&(_0x3eda3f={..._0x39aff6,'id':_0xbe1210,'status':_0x2acdcd});}this[_0x1b130f(0x323)]=_0x3eda3f;if(this[_0x1b130f(0x323)]&&this[_0x1b130f(0x323)][_0x1b130f(0x243)]===_0x48ffd4){const _0x4ffcac=Math['ceil']((this[_0x1b130f(0x323)][_0x1b130f(0x274)]-Date[_0x1b130f(0x416)]())/0x5265c00);this[_0x1b130f(0x35a)][_0x1b130f(0x26a)]?.[_0x1b130f(0x2ee)]('⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20'+_0x4ffcac+_0x1b130f(0x434),{'feature':_0x1b130f(0x450),'licensee':this[_0x1b130f(0x323)][_0x1b130f(0x356)],'expiresAt':new Date(this[_0x1b130f(0x323)][_0x1b130f(0x274)])[_0x1b130f(0x3fb)]()});}this[_0x1b130f(0x323)]&&this[_0x1b130f(0x323)]['licenseType']===_0x1d62c1&&this['okdb'][_0x1b130f(0x26a)]?.['warn'](_0x1b130f(0x474),{'feature':_0x1b130f(0x450),'licensee':this[_0x1b130f(0x323)]['licensee']});}[_0xa75729(0x3f4)](_0xe0d037,_0x52ee35){const _0x2fc966=_0xa75729;if(!_0xe0d037[_0x2fc966(0x3f8)])return _0x2fc966(0x391);let _0x152e64;try{_0x152e64=_0x2351f5[_0x2fc966(0x4c6)](_0xe0d037['blob']);}catch(_0xeb0689){return _0x2fc966(0x391);}try{const _0x31ca43=_0x27c312['verify'](null,_0x152e64['payload'],_0x1f2b2e[_0x2fc966(0x281)],_0x152e64['sig']);if(!_0x31ca43)return'invalid';}catch(_0x20ad29){return _0x2fc966(0x391);}if(_0x152e64[_0x2fc966(0x4a8)]['licenseType']===_0x1d62c1)return _0x2fc966(0x4ab);if(_0x152e64['decoded'][_0x2fc966(0x274)]<=Date[_0x2fc966(0x416)]())return'expired';if(_0x152e64[_0x2fc966(0x4a8)][_0x2fc966(0x243)]===_0x48ffd4)return _0x2fc966(0x4ab);if(!_0xe0d037[_0x2fc966(0x461)])return _0x2fc966(0x1f5);const _0x4abd34=_0x2351f5[_0x2fc966(0x490)]({'tokenString':_0xe0d037[_0x2fc966(0x461)],'nodeId':_0x52ee35,'rawBlobBuf':_0x152e64[_0x2fc966(0x2e8)],'pubKeyPem':_0x1f2b2e[_0x2fc966(0x281)],'pubFingerprint':_0x1f2b2e['PUB_FINGERPRINT']});if(_0x4abd34[_0x2fc966(0x219)]===_0x2fc966(0x4c7)||_0x4abd34[_0x2fc966(0x219)]===_0x2fc966(0x39f))return'wrong_node';if(_0x4abd34[_0x2fc966(0x219)]==='ACTIVATION_EXPIRED')return'expired';if(!_0x4abd34['valid'])return'wrong_node';return _0x2fc966(0x4ab);}get['active'](){const _0x5a1f02=_0xa75729;return this[_0x5a1f02(0x323)];}get[_0xa75729(0x376)](){return this['_active']??_0x568292;}['assertFeature'](_0x2786b8){const _0x21cd9d=_0xa75729;if(_0x1f2b2e[_0x21cd9d(0x256)]!==_0x21cd9d(0x3fd))return;const _0xf5c23e=this[_0x21cd9d(0x376)];if(!_0xf5c23e[_0x21cd9d(0x3ca)]?.[_0x2786b8]){const _0x27d800=_0xf5c23e['_isFree']?_0x21cd9d(0x424)+_0x2786b8+_0x21cd9d(0x44b)+_0x2786b8+_0x21cd9d(0x2a4):_0x21cd9d(0x2c5)+_0x2786b8+'.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22'+_0x2786b8+'\x22.';throw new _0x5e3a1b(_0x27d800,_0x21cd9d(0x4e7),{'feature':_0x2786b8});}}[_0xa75729(0x237)](_0x5554b2){const _0x3a8c68=_0xa75729;if(_0x1f2b2e[_0x3a8c68(0x256)]!==_0x3a8c68(0x3fd))return!![];return!!this[_0x3a8c68(0x376)][_0x3a8c68(0x3ca)]?.[_0x5554b2];}[_0xa75729(0x398)](_0x56dc1b,_0x1b331a){const _0x3e9f6b=_0xa75729;if(_0x1f2b2e['LICENSED_BUILD']!==_0x3e9f6b(0x3fd))return;const _0x98949f=this[_0x3e9f6b(0x376)],_0x52fd5a=_0x98949f[_0x3e9f6b(0x440)]?.[_0x56dc1b];if(_0x52fd5a===null||_0x52fd5a===undefined||_0x52fd5a===0x0)return;if(_0x1b331a>=_0x52fd5a)throw new _0x5e3a1b('License\x20limit\x20exceeded:\x20'+_0x56dc1b+'\x20('+_0x1b331a+'/'+_0x52fd5a+')',_0x3e9f6b(0x20f),{'limit':_0x56dc1b,'current':_0x1b331a,'max':_0x52fd5a});}async[_0xa75729(0x20e)](_0x532948){const _0x15a138=_0xa75729;let _0x15e434;try{_0x15e434=_0x2351f5['decodeLicenseBlob'](_0x532948);}catch(_0x18d3df){throw new _0x5e3a1b(_0x15a138(0x353)+_0x18d3df[_0x15a138(0x345)],_0x15a138(0x337));}let _0xb4aa8b;try{_0xb4aa8b=_0x27c312[_0x15a138(0x4d1)](null,_0x15e434[_0x15a138(0x264)],_0x1f2b2e['PUBLIC_KEY_PEM'],_0x15e434[_0x15a138(0x455)]);}catch(_0x2b2778){throw new _0x5e3a1b('License\x20signature\x20invalid:\x20'+_0x2b2778[_0x15a138(0x345)],_0x15a138(0x337));}if(!_0xb4aa8b)throw new _0x5e3a1b('License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20'+(_0x15a138(0x2f5)+_0x1f2b2e['PUB_FINGERPRINT']+'.\x20')+'Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.',_0x15a138(0x337),{'expectedFingerprint':_0x1f2b2e['PUB_FINGERPRINT']});if(_0x15e434[_0x15a138(0x4a8)][_0x15a138(0x243)]===_0x48ffd4){const _0x12f442=_0x15e434[_0x15a138(0x4a8)][_0x15a138(0x274)]-_0x15e434[_0x15a138(0x4a8)]['issuedAt'];if(_0x12f442>_0x279022)throw new _0x5e3a1b('Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20'+Math['ceil'](_0x12f442/(0x1e*0x5265c00))+'\x20months\x20from\x20issuance)',_0x15a138(0x337));}const _0x306379=this[_0x15a138(0x35a)]['_systemEnv'];await _0x99bce6(_0x306379);const _0x4717ce=_0x2351f5['licenseHash'](_0x15e434[_0x15a138(0x2e8)])[_0x15a138(0x213)](_0x15a138(0x1f7));for(const {value:_0x4de80a}of _0x306379[_0x15a138(0x3b8)](_0x17163f)){if(_0x4de80a[_0x15a138(0x33f)]===_0x4717ce)throw new _0x5e3a1b(_0x15a138(0x43d),_0x15a138(0x337));}const _0x1466d3=_0x27c312[_0x15a138(0x39e)](),_0x496db2={'blob':_0x532948,'activation':null,'addedAt':Date[_0x15a138(0x416)](),'_licenseHash':_0x4717ce,'licensee':_0x15e434[_0x15a138(0x4a8)][_0x15a138(0x356)],'expiresAt':_0x15e434[_0x15a138(0x4a8)][_0x15a138(0x274)],'features':_0x15e434[_0x15a138(0x4a8)][_0x15a138(0x3ca)],'limits':_0x15e434[_0x15a138(0x4a8)][_0x15a138(0x440)],'licenseType':_0x15e434[_0x15a138(0x4a8)]['licenseType']};return await _0x306379[_0x15a138(0x3fa)](_0x17163f,_0x1466d3,_0x496db2),{'id':_0x1466d3,..._0x496db2};}async[_0xa75729(0x2cb)](_0x2ea72b){const _0x455714=_0xa75729;let _0x5edaf6;try{_0x5edaf6=_0x2351f5[_0x455714(0x4a4)](_0x2ea72b);}catch(_0x1349af){throw new _0x5e3a1b(_0x455714(0x23c)+_0x1349af[_0x455714(0x345)],_0x455714(0x37f));}const _0x59f95a=_0x5edaf6['licenseHash'][_0x455714(0x213)](_0x455714(0x1f7)),_0x18ceca=this[_0x455714(0x35a)]['_systemEnv'];if(!_0x18ceca||!_0x18ceca[_0x455714(0x349)](_0x17163f))throw new _0x5e3a1b('No\x20license\x20found\x20matching\x20this\x20activation\x20token',_0x455714(0x37f));let _0x3ea595=null,_0x359e55=null;for(const {key:_0x15a113,value:_0x2a8fe1}of _0x18ceca[_0x455714(0x3b8)](_0x17163f)){if(_0x2a8fe1[_0x455714(0x33f)]===_0x59f95a){_0x3ea595=_0x15a113,_0x359e55=_0x2a8fe1;break;}}if(!_0x3ea595)throw new _0x5e3a1b(_0x455714(0x250),_0x455714(0x37f));const {rawBuf:_0x13c7fd}=_0x2351f5[_0x455714(0x4c6)](_0x359e55[_0x455714(0x3f8)]),_0x452811=_0x2351f5[_0x455714(0x490)]({'tokenString':_0x2ea72b,'nodeId':this[_0x455714(0x35a)]['id'],'rawBlobBuf':_0x13c7fd,'pubKeyPem':_0x1f2b2e[_0x455714(0x281)],'pubFingerprint':_0x1f2b2e['PUB_FINGERPRINT']});if(!_0x452811['valid'])throw new _0x5e3a1b(_0x455714(0x3e3)+_0x452811[_0x455714(0x219)],_0x455714(0x37f),{'reason':_0x452811[_0x455714(0x219)]});const _0x227313={..._0x359e55,'activation':_0x2ea72b};return await _0x18ceca[_0x455714(0x4de)](_0x17163f,_0x3ea595,_0x227313),{'id':_0x3ea595,..._0x227313};}async[_0xa75729(0x3e9)](_0x1237b6){const _0x3c682b=_0xa75729,_0x40710d=this[_0x3c682b(0x35a)]['_systemEnv'];if(!_0x40710d||!_0x40710d[_0x3c682b(0x349)](_0x17163f))return;await _0x40710d[_0x3c682b(0x4d7)](_0x17163f,_0x1237b6);}async[_0xa75729(0x2f8)](){const _0x2be969=_0xa75729,_0x20372a=this[_0x2be969(0x35a)][_0x2be969(0x487)];if(!_0x20372a||!_0x20372a[_0x2be969(0x349)](_0x17163f))return[];const _0x2ba1bb=this[_0x2be969(0x35a)]['id'],_0x536c1d=[];for(const {key:_0x56d9ed,value:_0x1fa540}of _0x20372a[_0x2be969(0x3b8)](_0x17163f)){const _0x210717=this['_computeStatus'](_0x1fa540,_0x2ba1bb);_0x536c1d[_0x2be969(0x29f)]({..._0x1fa540,'id':_0x56d9ed,'status':_0x210717});}return _0x536c1d;}[_0xa75729(0x254)](){const _0x56053d=_0xa75729,_0x1ff1b4=this['okdb'][_0x56053d(0x487)];if(!_0x1ff1b4||!_0x1ff1b4[_0x56053d(0x349)](_0x17163f))return[];const _0x203ddf=this[_0x56053d(0x35a)]['id'],_0x40a4b3=[];for(const {key:_0xab3285,value:_0x4384c9}of _0x1ff1b4[_0x56053d(0x3b8)](_0x17163f)){if(_0x4384c9[_0x56053d(0x33f)]){if(_0x4384c9['licenseType']===_0x48ffd4)_0x40a4b3[_0x56053d(0x29f)]({'licenseId':_0xab3285,'pin':null});else{const _0x598092=Buffer['from'](_0x4384c9[_0x56053d(0x33f)],_0x56053d(0x1f7)),{pin:_0xd49347}=_0x2351f5[_0x56053d(0x389)](_0x203ddf,_0x598092,_0x1f2b2e[_0x56053d(0x2c6)]);_0x40a4b3[_0x56053d(0x29f)]({'licenseId':_0xab3285,'pin':_0xd49347});}}}return _0x40a4b3;}async['recheck'](){const _0x3f2021=_0xa75729,_0xb14060=this[_0x3f2021(0x323)];await this[_0x3f2021(0x2d7)]();if(this[_0x3f2021(0x323)]&&this[_0x3f2021(0x323)]['licenseType']===_0x48ffd4){const _0x5edb54=Math[_0x3f2021(0x48b)]((this[_0x3f2021(0x323)]['expiresAt']-Date[_0x3f2021(0x416)]())/0x5265c00);this[_0x3f2021(0x35a)][_0x3f2021(0x26a)]?.[_0x3f2021(0x2ee)]('⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20'+_0x5edb54+_0x3f2021(0x434),{'feature':_0x3f2021(0x450),'licensee':this[_0x3f2021(0x323)][_0x3f2021(0x356)],'expiresAt':new Date(this[_0x3f2021(0x323)][_0x3f2021(0x274)])[_0x3f2021(0x3fb)]()});}this[_0x3f2021(0x323)]&&this[_0x3f2021(0x323)][_0x3f2021(0x243)]===_0x1d62c1&&this['okdb']['log']?.[_0x3f2021(0x2ee)]('⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.',{'feature':'license','licensee':this[_0x3f2021(0x323)][_0x3f2021(0x356)]});if(_0xb14060&&!this[_0x3f2021(0x323)]){this[_0x3f2021(0x35a)][_0x3f2021(0x26a)]?.[_0x3f2021(0x2ee)](_0x3f2021(0x418),{'feature':_0x3f2021(0x450)}),this[_0x3f2021(0x35a)][_0x3f2021(0x48d)]?.[_0x3f2021(0x45c)](_0x5b4020[_0x3f2021(0x337)],{'previous':_0xb14060});const _0x1349e1=this[_0x3f2021(0x35a)][_0x3f2021(0x3ff)]?.[_0x3f2021(0x495)]??_0x1f2b2e[_0x3f2021(0x316)];_0x1349e1==='shutdown'&&(this[_0x3f2021(0x35a)][_0x3f2021(0x26a)]?.[_0x3f2021(0x1f3)]('Shutting\x20down\x20due\x20to\x20license\x20expiry',{'feature':_0x3f2021(0x450)}),this[_0x3f2021(0x35a)][_0x3f2021(0x324)]()[_0x3f2021(0x300)](()=>{})[_0x3f2021(0x4bf)](()=>process['exit'](0x1)));}}}return okdbLicense={'LicenseChecker':_0x5f0962,'_C':_0x1f2b2e},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x4a2f63=_0xddaf03;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x5a1678=require$$0$2,_0x28716f=require$$1,_0x2bfbe4=require$$2$1,_0x46d3d7=require$$1$1,_0x177f81=_0x46d3d7['join'](_0x2bfbe4[_0x4a2f63(0x273)](),'.kdb_history'),_0x45c909=0x3e8,_0x286ea4={'reset':'\x1b[0m','bold':_0x4a2f63(0x4cd),'dim':_0x4a2f63(0x27c),'red':_0x4a2f63(0x293),'green':_0x4a2f63(0x214),'yellow':_0x4a2f63(0x344),'blue':_0x4a2f63(0x1fb),'magenta':'\x1b[35m','cyan':_0x4a2f63(0x360),'white':_0x4a2f63(0x340),'gray':_0x4a2f63(0x401)},_0x410753=!process[_0x4a2f63(0x322)][_0x4a2f63(0x200)]||!!process.env.NO_COLOR,_0x21c1a7=(_0x3ab858,_0x4c399d)=>_0x410753?_0x4c399d:''+_0x3ab858+_0x4c399d+_0x286ea4[_0x4a2f63(0x46d)],_0x47666b={'error':_0x286ea4[_0x4a2f63(0x350)],'warn':_0x286ea4['yellow'],'info':_0x286ea4[_0x4a2f63(0x2b1)],'debug':_0x286ea4[_0x4a2f63(0x23b)]},_0x1f5c85={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x1c354e(_0x2e4a10,_0x79124a=_0x4a2f63(0x28d)){const _0x4f0d6d=_0x4a2f63,{level:_0x1ce875,msg:_0x20bbb1,meta:_0x2259b0,context:_0xd34ebf,ts:_0x1d4d65}=_0x2e4a10;if((_0x1f5c85[_0x1ce875]??0x1)<(_0x1f5c85[_0x79124a]??0x1))return;const _0x1879c6=_0x21c1a7(_0x286ea4[_0x4f0d6d(0x23b)],new Date(_0x1d4d65)[_0x4f0d6d(0x3fb)]()),_0x5a949e=_0x21c1a7(_0x47666b[_0x1ce875]??_0x286ea4[_0x4f0d6d(0x3ce)],_0x1ce875[_0x4f0d6d(0x2c9)](0x5));let _0x146032='\x20\x20'+_0x1879c6+'\x20'+_0x21c1a7(_0x286ea4[_0x4f0d6d(0x466)],_0x5a949e)+'\x20'+_0x20bbb1;if(_0x2259b0&&Object[_0x4f0d6d(0x4dc)](_0x2259b0)['length']>0x0){const _0xb6f001=Object[_0x4f0d6d(0x32a)](_0x2259b0)['map'](([_0x6273a3,_0x1ce5e4])=>_0x6273a3+'='+_0x1ce5e4)[_0x4f0d6d(0x3e1)]('\x20');_0x146032+=_0x21c1a7(_0x286ea4[_0x4f0d6d(0x2e0)],_0x4f0d6d(0x296)+_0xb6f001+']');}if(_0xd34ebf!==undefined){const _0xda48ee=typeof _0xd34ebf==='object'?JSON[_0x4f0d6d(0x3f2)](_0xd34ebf):String(_0xd34ebf);_0x146032+=_0x21c1a7(_0x286ea4['dim'],'\x20\x20'+_0xda48ee);}const _0x5f2f18=_0x1ce875===_0x4f0d6d(0x1f3)||_0x1ce875===_0x4f0d6d(0x2ee)?process[_0x4f0d6d(0x30a)][_0x4f0d6d(0x334)][_0x4f0d6d(0x34a)](process['stderr']):process[_0x4f0d6d(0x322)][_0x4f0d6d(0x334)][_0x4f0d6d(0x34a)](process[_0x4f0d6d(0x322)]);_0x5f2f18(_0x146032+'\x0a');}function _0x247cf1(_0x197a96,_0x32b096){const _0x46078b=_0x4a2f63;if(_0x197a96===0xcc||_0x197a96>=0xc8&&_0x197a96<0x12c&&!_0x32b096){console[_0x46078b(0x26a)]('\x0a\x20\x20'+_0x21c1a7(_0x286ea4[_0x46078b(0x313)],'✓')+'\x0a');return;}if(_0x197a96>=0x190||_0x32b096?.[_0x46078b(0x1f3)]){const _0x2dead8=_0x32b096?.[_0x46078b(0x1f3)]??_0x32b096?.[_0x46078b(0x345)]??_0x46078b(0x1f4)+_0x197a96;console['log'](_0x46078b(0x410)+_0x21c1a7(_0x286ea4['red'],'✗')+'\x20'+_0x21c1a7(_0x286ea4['bold']+_0x286ea4[_0x46078b(0x350)],String(_0x197a96))+'\x20\x20'+_0x2dead8+'\x0a');return;}const _0x562cc2=Object['prototype'][_0x46078b(0x2e6)][_0x46078b(0x255)](_0x32b096??{},'result')?_0x32b096[_0x46078b(0x3b4)]:_0x32b096,_0x2d48d9=_0x32b096?.[_0x46078b(0x491)];console['log'](''),_0x27ec4c(_0x562cc2,'\x20\x20');if(_0x2d48d9?.[_0x46078b(0x4ca)]!=null||_0x2d48d9?.[_0x46078b(0x480)]!=null){const _0x488745=[];if(_0x2d48d9['count']!=null)_0x488745[_0x46078b(0x29f)](_0x2d48d9[_0x46078b(0x4ca)]+_0x46078b(0x207)+(_0x2d48d9[_0x46078b(0x4ca)]!==0x1?'s':''));if(_0x2d48d9[_0x46078b(0x480)]!=null)_0x488745[_0x46078b(0x29f)](_0x2d48d9['time']+'ms');console[_0x46078b(0x26a)]('\x0a\x20\x20'+_0x21c1a7(_0x286ea4[_0x46078b(0x2e0)],_0x488745[_0x46078b(0x3e1)](_0x46078b(0x38a))));}console[_0x46078b(0x26a)]('');}function _0x27ec4c(_0xed3bbc,_0xca1834=''){const _0x49af9b=_0x4a2f63;if(_0xed3bbc===null||_0xed3bbc===undefined){console[_0x49af9b(0x26a)](_0xca1834+_0x21c1a7(_0x286ea4['dim'],_0x49af9b(0x4ec)));return;}if(Array['isArray'](_0xed3bbc)){if(_0xed3bbc[_0x49af9b(0x21f)]===0x0){console['log'](_0xca1834+_0x21c1a7(_0x286ea4[_0x49af9b(0x2e0)],'(empty)'));return;}if(_0xed3bbc[_0x49af9b(0x415)](_0x1ba7f0=>_0x1ba7f0&&typeof _0x1ba7f0===_0x49af9b(0x231)&&_0x49af9b(0x2f3)in _0x1ba7f0&&_0x49af9b(0x37a)in _0x1ba7f0)){_0x177dc1(_0xed3bbc,_0xca1834);return;}if(_0xed3bbc[_0x49af9b(0x415)](_0x58aca8=>_0x58aca8&&typeof _0x58aca8===_0x49af9b(0x231)&&_0x49af9b(0x3d2)in _0x58aca8&&'count'in _0x58aca8)){_0xcf1779(_0xed3bbc,_0xca1834);return;}if(_0xed3bbc[_0x49af9b(0x415)](_0x4d3263=>typeof _0x4d3263!=='object'||_0x4d3263===null)){_0xed3bbc[_0x49af9b(0x2d5)]((_0x1792ce,_0x232bab)=>console['log'](_0xca1834+_0x21c1a7(_0x286ea4[_0x49af9b(0x23b)],_0x232bab+0x1+'.')+'\x20'+_0x21c1a7(_0x286ea4[_0x49af9b(0x3ce)],String(_0x1792ce))));return;}_0xed3bbc[_0x49af9b(0x2d5)]((_0x374e0f,_0x3453a4)=>{const _0x48fbcb=_0x49af9b;console[_0x48fbcb(0x26a)](_0xca1834+_0x21c1a7(_0x286ea4[_0x48fbcb(0x2e0)],'['+_0x3453a4+']'));if(typeof _0x374e0f===_0x48fbcb(0x231)&&_0x374e0f!==null)_0x3ca586(_0x374e0f,_0xca1834+'\x20\x20');else console[_0x48fbcb(0x26a)](_0xca1834+'\x20\x20'+String(_0x374e0f));});return;}if(typeof _0xed3bbc==='object'){if(_0x49af9b(0x2f3)in _0xed3bbc&&_0x49af9b(0x37a)in _0xed3bbc&&Object[_0x49af9b(0x4dc)](_0xed3bbc)[_0x49af9b(0x21f)]<=0x3){console[_0x49af9b(0x26a)](_0xca1834+_0x21c1a7(_0x286ea4[_0x49af9b(0x466)]+_0x286ea4[_0x49af9b(0x2b1)],String(_0xed3bbc[_0x49af9b(0x2f3)])));const _0x3eba22=_0xed3bbc[_0x49af9b(0x37a)];if(_0x3eba22&&typeof _0x3eba22==='object')_0x3ca586(_0x3eba22,_0xca1834);else console[_0x49af9b(0x26a)](_0xca1834+_0x21c1a7(_0x286ea4[_0x49af9b(0x3ce)],String(_0x3eba22)));return;}_0x3ca586(_0xed3bbc,_0xca1834);return;}console[_0x49af9b(0x26a)](_0xca1834+_0x21c1a7(_0x286ea4[_0x49af9b(0x3ce)],String(_0xed3bbc)));}function _0x3ca586(_0x36fa72,_0x1371de=''){const _0x342d49=_0x4a2f63,_0x1c60ed=Object[_0x342d49(0x32a)](_0x36fa72);if(_0x1c60ed[_0x342d49(0x21f)]===0x0){console['log'](_0x1371de+_0x21c1a7(_0x286ea4[_0x342d49(0x2e0)],'{}'));return;}const _0x48f464=Math[_0x342d49(0x3d4)](0x1c,Math[_0x342d49(0x381)](..._0x1c60ed[_0x342d49(0x404)](([_0x26da4b])=>_0x26da4b[_0x342d49(0x21f)])));for(const [_0x4f2de2,_0x18eb40]of _0x1c60ed){const _0x566c0=_0x21c1a7(_0x286ea4[_0x342d49(0x2b1)],_0x4f2de2['padEnd'](_0x48f464));if(_0x18eb40===null||_0x18eb40===undefined)console['log'](_0x1371de+_0x566c0+'\x20\x20'+_0x21c1a7(_0x286ea4[_0x342d49(0x2e0)],'null'));else{if(typeof _0x18eb40===_0x342d49(0x231)){const _0x32f0bc=JSON[_0x342d49(0x3f2)](_0x18eb40);_0x32f0bc[_0x342d49(0x21f)]<=0x50?console[_0x342d49(0x26a)](_0x1371de+_0x566c0+'\x20\x20'+_0x21c1a7(_0x286ea4[_0x342d49(0x2e0)],_0x32f0bc)):(console[_0x342d49(0x26a)](_0x1371de+_0x566c0),_0x27ec4c(_0x18eb40,_0x1371de+'\x20\x20'));}else{const _0x144bc6=typeof _0x18eb40===_0x342d49(0x449)?_0x21c1a7(_0x18eb40?_0x286ea4[_0x342d49(0x313)]:_0x286ea4[_0x342d49(0x45f)],String(_0x18eb40)):typeof _0x18eb40===_0x342d49(0x276)?_0x21c1a7(_0x286ea4[_0x342d49(0x31b)],String(_0x18eb40)):_0x21c1a7(_0x286ea4[_0x342d49(0x3ce)],String(_0x18eb40));console['log'](_0x1371de+_0x566c0+'\x20\x20'+_0x144bc6);}}}}function _0x177dc1(_0x4391b3,_0x2363df=''){const _0x36b8c8=_0x4a2f63,_0x1bbb69=Math[_0x36b8c8(0x3d4)](0x20,Math[_0x36b8c8(0x381)](..._0x4391b3[_0x36b8c8(0x404)](_0x5af2b5=>String(_0x5af2b5['key'])[_0x36b8c8(0x21f)])));for(const {key:_0x2a30ad,value:_0x494e3d,score:_0x45990c,clock:_0x3baa54}of _0x4391b3){const _0x25b5b9=_0x21c1a7(_0x286ea4[_0x36b8c8(0x466)]+_0x286ea4['cyan'],String(_0x2a30ad)[_0x36b8c8(0x2c9)](_0x1bbb69)),_0x19a77c=_0x494e3d==null?_0x21c1a7(_0x286ea4[_0x36b8c8(0x2e0)],'null'):typeof _0x494e3d===_0x36b8c8(0x231)?_0x21c1a7(_0x286ea4['dim'],JSON['stringify'](_0x494e3d)):_0x21c1a7(_0x286ea4['white'],String(_0x494e3d)),_0x4b6c9a=_0x45990c!=null?_0x21c1a7(_0x286ea4[_0x36b8c8(0x23b)],'\x20\x20score:'+_0x45990c[_0x36b8c8(0x4d5)](0x4)):'',_0xf6bd0a=_0x3baa54!=null?_0x21c1a7(_0x286ea4[_0x36b8c8(0x23b)],_0x36b8c8(0x236)+_0x3baa54):'';console['log'](_0x2363df+_0x25b5b9+'\x20\x20'+_0x19a77c+_0x4b6c9a+_0xf6bd0a);}}function _0xcf1779(_0x31e763,_0x5007a2=''){const _0x541188=_0x4a2f63,_0x120cb2=Math['min'](0x20,Math['max'](..._0x31e763[_0x541188(0x404)](_0x4d2b4d=>_0x4d2b4d['type']['length'])));for(const {type:_0x4174b4,count:_0xd36276,fields:_0x3a1a95}of _0x31e763){if(_0x4174b4['startsWith']('~'))continue;const _0x83f7e9=_0x21c1a7(_0x286ea4[_0x541188(0x466)]+_0x286ea4['cyan'],_0x4174b4[_0x541188(0x2c9)](_0x120cb2)),_0x502e7b=_0x21c1a7(_0x286ea4['magenta'],String(_0xd36276)['padStart'](0x6))+_0x21c1a7(_0x286ea4['dim'],_0x541188(0x35d)),_0x59f837=_0x3a1a95&&Object[_0x541188(0x4dc)](_0x3a1a95)[_0x541188(0x21f)]?_0x21c1a7(_0x286ea4['dim'],_0x541188(0x204)+Object['keys'](_0x3a1a95)[_0x541188(0x48e)](0x0,0x6)[_0x541188(0x3e1)](',\x20')+(Object[_0x541188(0x4dc)](_0x3a1a95)['length']>0x6?'…':'')):'';console['log'](_0x5007a2+_0x83f7e9+'\x20\x20'+_0x502e7b+_0x59f837);}}const _0x3586fb=[_0x4a2f63(0x41f),_0x4a2f63(0x247),'queue/',_0x4a2f63(0x4e1),'transaction','processors/'];function _0x1ea2a7(_0x43d5d1,_0x5b1a55){const _0x29863f=_0x4a2f63;if(_0x43d5d1[_0x29863f(0x22f)](_0x29863f(0x299)))return _0x43d5d1;if(_0x43d5d1[_0x29863f(0x22f)]('/'))return _0x29863f(0x3e6)+_0x43d5d1;if(_0x43d5d1[_0x29863f(0x22f)](_0x29863f(0x26d)))return _0x29863f(0x299)+_0x43d5d1;const _0x1c9978=_0x3586fb[_0x29863f(0x493)](_0x134ee2=>_0x43d5d1===_0x134ee2['replace'](/\/$/,'')||_0x43d5d1[_0x29863f(0x22f)](_0x134ee2));return _0x1c9978?'/api/env/'+_0x5b1a55+'/'+_0x43d5d1:_0x29863f(0x299)+_0x43d5d1;}function _0x197024(_0x54c470){const _0x42f4e5=_0x4a2f63,_0x30c242={},_0x230989=[];let _0x14327b=0x0;while(_0x14327b<_0x54c470['length']){if((_0x54c470[_0x14327b]===_0x42f4e5(0x414)||_0x54c470[_0x14327b]==='-e')&&_0x54c470[_0x14327b+0x1]&&!_0x54c470[_0x14327b+0x1][_0x42f4e5(0x22f)]('-'))_0x30c242[_0x42f4e5(0x2da)]=_0x54c470[++_0x14327b];else _0x54c470[_0x14327b]===_0x42f4e5(0x4e8)||_0x54c470[_0x14327b]==='-h'?_0x30c242['help']=!![]:_0x230989[_0x42f4e5(0x29f)](_0x54c470[_0x14327b]);_0x14327b++;}return{'flags':_0x30c242,'rest':_0x230989};}const _0x352e30={'system':_0x4a2f63(0x2f1),'envs':_0x4a2f63(0x379),'types':'Types','data':_0x4a2f63(0x4cc),'indexes':_0x4a2f63(0x4c0),'fts':'Full-text\x20search','sync':'Sync','queue':_0x4a2f63(0x4ed),'files':_0x4a2f63(0x44d),'embeddings':_0x4a2f63(0x4e2),'engines':'Engines','admin':'Admin','event':_0x4a2f63(0x40f),'processor':_0x4a2f63(0x3b5)},_0x4d1612=['system','envs','types',_0x4a2f63(0x34d),_0x4a2f63(0x2db),_0x4a2f63(0x405),'sync','queue','files',_0x4a2f63(0x475),_0x4a2f63(0x3a4),'admin'];function _0x5cdc1b(_0x5cf0aa){const _0x3d92a3=_0x4a2f63;return _0x5cf0aa['replace'](/^\/api/,'')['replace'](/^\[\/env\/:env=[^\]]*\]/,_0x3d92a3(0x2c8))[_0x3d92a3(0x46c)](/^\/env\/:env/,'env/:env')[_0x3d92a3(0x46c)](/^\//,'');}function _0x2b2cd4(_0x22ad93,_0x31d976=''){const _0xa7c153=_0x4a2f63,_0x171d20=_0x22ad93[_0xa7c153(0x2ea)]['listRoutes']()[_0xa7c153(0x2f9)](_0x3c5a9d=>!_0x3c5a9d[_0xa7c153(0x491)]?.[_0xa7c153(0x23f)]),_0x5a5d64=_0x31d976?_0x171d20[_0xa7c153(0x2f9)](_0x3674d3=>_0x3674d3[_0xa7c153(0x37c)][_0xa7c153(0x396)]()[_0xa7c153(0x286)](_0x31d976[_0xa7c153(0x396)]())||(_0x1c0435(_0x3674d3)??'')['toLowerCase']()[_0xa7c153(0x286)](_0x31d976[_0xa7c153(0x396)]())||_0x3932e3(_0x3674d3)['some'](_0x2cec5a=>_0x2cec5a['toLowerCase']()['includes'](_0x31d976[_0xa7c153(0x396)]()))):_0x171d20;if(!_0x5a5d64['length']){console[_0xa7c153(0x26a)](_0x21c1a7(_0x286ea4['yellow'],'\x0a\x20\x20No\x20routes\x20matching\x20\x22'+_0x31d976+'\x22\x0a'));return;}const _0x43d838=new Map();for(const _0xfe915 of _0x5a5d64){const _0x49cf66=_0x3932e3(_0xfe915)[0x0]??_0xa7c153(0x452);if(!_0x43d838[_0xa7c153(0x3e5)](_0x49cf66))_0x43d838[_0xa7c153(0x423)](_0x49cf66,[]);_0x43d838[_0xa7c153(0x375)](_0x49cf66)['push'](_0xfe915);}const _0x27af09=[..._0x4d1612[_0xa7c153(0x2f9)](_0x214a7f=>_0x43d838[_0xa7c153(0x3e5)](_0x214a7f)),...[..._0x43d838[_0xa7c153(0x4dc)]()][_0xa7c153(0x2f9)](_0x5b81df=>!_0x4d1612[_0xa7c153(0x286)](_0x5b81df))];console[_0xa7c153(0x26a)]('');for(const _0x3d34e8 of _0x27af09){const _0x4b2586=_0x43d838[_0xa7c153(0x375)](_0x3d34e8);if(!_0x4b2586?.['length'])continue;console[_0xa7c153(0x26a)](_0x21c1a7(_0x286ea4['bold'],'\x20\x20'+(_0x352e30[_0x3d34e8]??_0x3d34e8)));for(const _0x5c28f5 of _0x4b2586){const _0x426a22=_0x21c1a7(_0x286ea4[_0xa7c153(0x31b)],_0x5c28f5[_0xa7c153(0x2a0)][_0xa7c153(0x2c9)](0x7)),_0x527f5a=_0x21c1a7(_0x286ea4[_0xa7c153(0x2b1)],_0x5cdc1b(_0x5c28f5['path'])),_0x51f475=_0x1c0435(_0x5c28f5)?_0x21c1a7(_0x286ea4[_0xa7c153(0x2e0)],'\x20\x20'+_0x1c0435(_0x5c28f5)):'',_0x1f7167=_0x5c28f5[_0xa7c153(0x2a1)]?.['id']?_0x21c1a7(_0x286ea4['gray'],'\x20\x20['+_0x5c28f5[_0xa7c153(0x2a1)]['id']+']'):'';console[_0xa7c153(0x26a)]('\x20\x20\x20\x20'+_0x426a22+'\x20'+_0x527f5a+_0x51f475+_0x1f7167);}console[_0xa7c153(0x26a)]('');}}function _0x48c3cc(_0x368488,_0x192403){const _0x49c9c0=_0x4a2f63,_0x2ff9a9=_0x192403[_0x49c9c0(0x46c)](/^\/api(\/env\/[^/]+)?\//,'')[_0x49c9c0(0x36d)]('/')[0x0],_0x738527=_0x368488[_0x49c9c0(0x2ea)][_0x49c9c0(0x45d)]()['filter'](_0x5c9530=>_0x5c9530[_0x49c9c0(0x37c)][_0x49c9c0(0x396)]()['includes'](_0x2ff9a9['toLowerCase']()));if(!_0x738527['length']){console[_0x49c9c0(0x26a)](_0x21c1a7(_0x286ea4['yellow'],_0x49c9c0(0x30d)+_0x192403+'\x0a'));return;}console[_0x49c9c0(0x26a)]('');for(const _0x4c94fa of _0x738527[_0x49c9c0(0x48e)](0x0,0xc)){for(const _0x66ca23 of _0x50f02b(_0x4c94fa)){console[_0x49c9c0(0x26a)](_0x66ca23);}console[_0x49c9c0(0x26a)]('');}}function _0x1c0435(_0x1222d9){const _0x4f2b9f=_0x4a2f63;return _0x1222d9[_0x4f2b9f(0x2a1)]?.['summary']??_0x1222d9[_0x4f2b9f(0x491)]?.[_0x4f2b9f(0x3ef)]??'';}function _0x8a016(_0x3a1b97){const _0x2161a5=_0x4a2f63;return _0x3a1b97[_0x2161a5(0x2a1)]?.['description']??_0x3a1b97[_0x2161a5(0x491)]?.[_0x2161a5(0x3c9)]??'';}function _0x3932e3(_0x188fd3){const _0x3627ea=_0x4a2f63;return _0x188fd3['operation']?.[_0x3627ea(0x295)]?.[_0x3627ea(0x21f)]?_0x188fd3['operation']['tags']:_0x188fd3[_0x3627ea(0x491)]?.[_0x3627ea(0x295)]??[];}function _0x50f02b(_0xc02617){const _0x2fbe2f=_0x4a2f63,_0x28b406=[];_0x28b406[_0x2fbe2f(0x29f)]('\x20\x20'+_0x21c1a7(_0x286ea4[_0x2fbe2f(0x466)]+_0x286ea4[_0x2fbe2f(0x31b)],_0xc02617[_0x2fbe2f(0x2a0)][_0x2fbe2f(0x2c9)](0x7))+'\x20'+_0x21c1a7(_0x286ea4[_0x2fbe2f(0x466)]+_0x286ea4[_0x2fbe2f(0x2b1)],_0xc02617['path']));_0xc02617[_0x2fbe2f(0x2a1)]?.['id']&&_0x28b406['push'](_0x2fbe2f(0x21a)+_0x21c1a7(_0x286ea4[_0x2fbe2f(0x23b)],_0x2fbe2f(0x2b6)+_0xc02617[_0x2fbe2f(0x2a1)]['id']));_0x1c0435(_0xc02617)&&_0x28b406[_0x2fbe2f(0x29f)](_0x2fbe2f(0x21a)+_0x21c1a7(_0x286ea4['white'],_0x1c0435(_0xc02617)));_0x8a016(_0xc02617)&&_0x28b406[_0x2fbe2f(0x29f)](_0x2fbe2f(0x21a)+_0x21c1a7(_0x286ea4[_0x2fbe2f(0x2e0)],_0x8a016(_0xc02617)));_0x3932e3(_0xc02617)[_0x2fbe2f(0x21f)]&&_0x28b406[_0x2fbe2f(0x29f)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x21c1a7(_0x286ea4[_0x2fbe2f(0x23b)],_0x2fbe2f(0x374)+_0x3932e3(_0xc02617)[_0x2fbe2f(0x3e1)](',\x20')));_0xc02617[_0x2fbe2f(0x2a1)]?.[_0x2fbe2f(0x216)]?.[_0x2fbe2f(0x25d)]&&_0x28b406[_0x2fbe2f(0x29f)](_0x2fbe2f(0x21a)+_0x21c1a7(_0x286ea4[_0x2fbe2f(0x23b)],_0x2fbe2f(0x3eb)+_0xc02617[_0x2fbe2f(0x2a1)][_0x2fbe2f(0x216)][_0x2fbe2f(0x25d)]));_0xc02617[_0x2fbe2f(0x2a1)]?.[_0x2fbe2f(0x2ea)]?.['transport']&&_0xc02617['operation']['http'][_0x2fbe2f(0x223)]!==_0x2fbe2f(0x4a3)&&_0x28b406['push'](_0x2fbe2f(0x21a)+_0x21c1a7(_0x286ea4['gray'],_0x2fbe2f(0x4d0)+_0xc02617[_0x2fbe2f(0x2a1)][_0x2fbe2f(0x2ea)][_0x2fbe2f(0x223)]));if(_0xc02617['operation']?.[_0x2fbe2f(0x3f0)]){const _0x63511e=Object['keys'](_0xc02617[_0x2fbe2f(0x2a1)][_0x2fbe2f(0x3f0)]['properties']||{});if(_0x63511e['length'])_0x28b406['push'](_0x2fbe2f(0x21a)+_0x21c1a7(_0x286ea4['gray'],'input:\x20'+_0x63511e[_0x2fbe2f(0x3e1)](',\x20')));}return _0xc02617[_0x2fbe2f(0x491)]?.['body']&&_0x28b406[_0x2fbe2f(0x29f)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x21c1a7(_0x286ea4['gray'],_0x2fbe2f(0x28e)+JSON[_0x2fbe2f(0x3f2)](_0xc02617[_0x2fbe2f(0x491)][_0x2fbe2f(0x4d4)]))),_0x28b406;}async function _0x6e7976(_0x5d0a21,_0x484811,_0x4500c3,_0x466fa4=null){const _0x3ba1a8=_0x4a2f63,_0x513e06=_0x4500c3[_0x3ba1a8(0x39d)]('?'),_0x1f1aec=_0x513e06>=0x0?_0x4500c3[_0x3ba1a8(0x48e)](0x0,_0x513e06):_0x4500c3,_0x4269b0=_0x513e06>=0x0?_0x4500c3[_0x3ba1a8(0x48e)](_0x513e06+0x1):'',_0x42e0f7=Object[_0x3ba1a8(0x489)](new URLSearchParams(_0x4269b0)[_0x3ba1a8(0x32a)]());return _0x5d0a21['http']['handle'](_0x484811,_0x1f1aec,{'body':_0x466fa4,'query':_0x42e0f7,'headers':{'content-type':_0x3ba1a8(0x248)}},{'internal':!![]});}function _0x447fc2(_0x2956ef){const _0x225e6b=_0x4a2f63;if(!_0x2956ef)return null;const _0xdb267b=_0x2956ef['trim']();if(!_0xdb267b)return null;try{return JSON[_0x225e6b(0x279)](_0xdb267b);}catch{}try{return JSON[_0x225e6b(0x279)](_0x27e58c(_0xdb267b));}catch(_0x27c223){throw new SyntaxError(_0x27c223[_0x225e6b(0x345)],{'cause':_0x27c223});}}function _0x27e58c(_0x1b1f67){const _0x2acf2d=_0x4a2f63;let _0x3c1e9c='',_0x1e1495=0x0;while(_0x1e1495<_0x1b1f67[_0x2acf2d(0x21f)]){const _0x283a8d=_0x1b1f67[_0x1e1495];if(_0x283a8d==='\x22'){_0x3c1e9c+='\x22',_0x1e1495++;while(_0x1e1495<_0x1b1f67[_0x2acf2d(0x21f)]&&_0x1b1f67[_0x1e1495]!=='\x22'){if(_0x1b1f67[_0x1e1495]==='\x5c'){_0x3c1e9c+=_0x1b1f67[_0x1e1495++];if(_0x1e1495<_0x1b1f67[_0x2acf2d(0x21f)])_0x3c1e9c+=_0x1b1f67[_0x1e1495++];}else _0x3c1e9c+=_0x1b1f67[_0x1e1495++];}_0x3c1e9c+='\x22';if(_0x1e1495<_0x1b1f67[_0x2acf2d(0x21f)])_0x1e1495++;continue;}if(_0x283a8d==='\x27'){_0x3c1e9c+='\x22',_0x1e1495++;while(_0x1e1495<_0x1b1f67[_0x2acf2d(0x21f)]&&_0x1b1f67[_0x1e1495]!=='\x27'){if(_0x1b1f67[_0x1e1495]==='\x5c'&&_0x1b1f67[_0x1e1495+0x1]==='\x27')_0x3c1e9c+='\x27',_0x1e1495+=0x2;else _0x1b1f67[_0x1e1495]==='\x22'?(_0x3c1e9c+='\x5c\x22',_0x1e1495++):_0x3c1e9c+=_0x1b1f67[_0x1e1495++];}_0x3c1e9c+='\x22';if(_0x1e1495<_0x1b1f67[_0x2acf2d(0x21f)])_0x1e1495++;continue;}if(_0x2acf2d(0x3d5)[_0x2acf2d(0x286)](_0x283a8d)){_0x3c1e9c+=_0x283a8d,_0x1e1495++;continue;}let _0x14e236='';while(_0x1e1495<_0x1b1f67[_0x2acf2d(0x21f)]&&!_0x2acf2d(0x2ec)[_0x2acf2d(0x286)](_0x1b1f67[_0x1e1495])&&_0x1b1f67[_0x1e1495]!=='\x20'&&_0x1b1f67[_0x1e1495]!=='\x09'&&_0x1b1f67[_0x1e1495]!=='\x0a'&&_0x1b1f67[_0x1e1495]!=='\x0d'){_0x14e236+=_0x1b1f67[_0x1e1495++];}let _0x2f09ff=_0x1e1495;while(_0x2f09ff<_0x1b1f67[_0x2acf2d(0x21f)]&&(_0x1b1f67[_0x2f09ff]==='\x20'||_0x1b1f67[_0x2f09ff]==='\x09'))_0x2f09ff++;if(_0x1b1f67[_0x2f09ff]===':')_0x3c1e9c+='\x22'+_0x14e236+'\x22';else _0x14e236===_0x2acf2d(0x3fd)||_0x14e236===_0x2acf2d(0x278)||_0x14e236===_0x2acf2d(0x2b4)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/['test'](_0x14e236)?_0x3c1e9c+=_0x14e236:_0x3c1e9c+='\x22'+_0x14e236+'\x22';}return _0x3c1e9c['replace'](/,(\s*[}\]])/g,'$1');}function _0x3f2a57(_0x32d7bc){const _0x41e64e=_0x4a2f63,_0x91aa82=[];let _0x598906=0x0;while(_0x598906<_0x32d7bc[_0x41e64e(0x21f)]){while(_0x598906<_0x32d7bc[_0x41e64e(0x21f)]&&(_0x32d7bc[_0x598906]==='\x20'||_0x32d7bc[_0x598906]==='\x09'))_0x598906++;if(_0x598906>=_0x32d7bc[_0x41e64e(0x21f)])break;const _0x453c0a=_0x32d7bc[_0x598906];if(_0x453c0a==='{'||_0x453c0a==='['){const _0x13edce=_0x453c0a==='{'?'}':']',_0x36b99d=_0x598906++;let _0x14e2e7=0x1,_0x2dc97f=![],_0x57fb1d='';while(_0x598906<_0x32d7bc[_0x41e64e(0x21f)]&&_0x14e2e7>0x0){const _0x2cd43c=_0x32d7bc[_0x598906];if(_0x2dc97f){if(_0x2cd43c==='\x5c')_0x598906++;else{if(_0x2cd43c===_0x57fb1d)_0x2dc97f=![];}}else{if(_0x2cd43c==='\x22'||_0x2cd43c==='\x27')_0x2dc97f=!![],_0x57fb1d=_0x2cd43c;else{if(_0x2cd43c===_0x453c0a)_0x14e2e7++;else{if(_0x2cd43c===_0x13edce)_0x14e2e7--;}}}_0x598906++;}_0x91aa82[_0x41e64e(0x29f)](_0x32d7bc[_0x41e64e(0x48e)](_0x36b99d,_0x598906));continue;}if(_0x453c0a==='\x22'||_0x453c0a==='\x27'){const _0x2bc18b=_0x453c0a;_0x598906++;let _0x8bf57b='';while(_0x598906<_0x32d7bc['length']&&_0x32d7bc[_0x598906]!==_0x2bc18b){if(_0x32d7bc[_0x598906]==='\x5c'&&_0x598906+0x1<_0x32d7bc[_0x41e64e(0x21f)])_0x598906++,_0x8bf57b+=_0x32d7bc[_0x598906++];else _0x8bf57b+=_0x32d7bc[_0x598906++];}if(_0x598906<_0x32d7bc['length'])_0x598906++;_0x91aa82[_0x41e64e(0x29f)](_0x8bf57b);continue;}let _0x12f2cc='';while(_0x598906<_0x32d7bc[_0x41e64e(0x21f)]&&_0x32d7bc[_0x598906]!=='\x20'&&_0x32d7bc[_0x598906]!=='\x09'&&_0x32d7bc[_0x598906]!=='{'&&_0x32d7bc[_0x598906]!=='['){_0x12f2cc+=_0x32d7bc[_0x598906++];}if(_0x12f2cc)_0x91aa82['push'](_0x12f2cc);}return _0x91aa82;}function _0x53ea6a(_0x2d60db,_0x363ad4){const _0x2458e4=_0x4a2f63,_0x130dfe=[..._0x2d60db[_0x2458e4(0x267)][_0x2458e4(0x4dc)]()][_0x2458e4(0x2f9)](_0x38acf2=>!_0x38acf2[_0x2458e4(0x22f)]('~'));console[_0x2458e4(0x26a)](['',_0x21c1a7(_0x286ea4['bold']+_0x286ea4[_0x2458e4(0x2b1)],_0x2458e4(0x44f)),_0x21c1a7(_0x286ea4[_0x2458e4(0x466)]+_0x286ea4['cyan'],_0x2458e4(0x21c))+_0x21c1a7(_0x286ea4['bold'],_0x2458e4(0x387))+_0x21c1a7(_0x286ea4[_0x2458e4(0x466)]+_0x286ea4[_0x2458e4(0x2b1)],'║'),_0x21c1a7(_0x286ea4[_0x2458e4(0x466)]+_0x286ea4[_0x2458e4(0x2b1)],_0x2458e4(0x2ba)),'','\x20\x20'+_0x21c1a7(_0x286ea4[_0x2458e4(0x313)],'✓')+'\x20'+_0x21c1a7(_0x286ea4[_0x2458e4(0x466)],_0x2458e4(0x426))+'\x20\x20http://localhost:'+_0x363ad4[_0x2458e4(0x2bf)],'\x20\x20'+_0x21c1a7(_0x286ea4[_0x2458e4(0x313)],'✓')+'\x20'+_0x21c1a7(_0x286ea4[_0x2458e4(0x466)],_0x2458e4(0x43a))+_0x2458e4(0x1ee)+_0x363ad4['port']+_0x2458e4(0x3e6),'\x20\x20'+_0x21c1a7(_0x286ea4[_0x2458e4(0x313)],'✓')+'\x20'+_0x21c1a7(_0x286ea4[_0x2458e4(0x466)],_0x2458e4(0x37c))+'\x20\x20\x20\x20'+_0x363ad4[_0x2458e4(0x377)],'\x20\x20'+_0x21c1a7(_0x286ea4['green'],'✓')+'\x20'+_0x21c1a7(_0x286ea4[_0x2458e4(0x466)],'id')+_0x2458e4(0x287)+_0x21c1a7(_0x286ea4['gray'],_0x2d60db['id']),'\x20\x20'+_0x21c1a7(_0x286ea4[_0x2458e4(0x313)],'✓')+'\x20'+_0x21c1a7(_0x286ea4[_0x2458e4(0x466)],_0x2458e4(0x21e))+_0x2458e4(0x43c)+_0x130dfe[_0x2458e4(0x404)](_0x4fb13b=>_0x21c1a7(_0x286ea4[_0x2458e4(0x2b1)],_0x4fb13b))[_0x2458e4(0x3e1)]('\x20\x20'),..._0x363ad4[_0x2458e4(0x27e)]?[]:['\x20\x20'+_0x21c1a7(_0x286ea4[_0x2458e4(0x313)],'✓')+'\x20'+_0x21c1a7(_0x286ea4['bold'],_0x2458e4(0x304))+_0x2458e4(0x41c)+_0x363ad4['port']+'/admin/index.html'],'',_0x21c1a7(_0x286ea4['dim'],_0x2458e4(0x2a6)+_0x21c1a7(_0x286ea4[_0x2458e4(0x466)],_0x2458e4(0x238))+_0x2458e4(0x3d7)+_0x21c1a7(_0x286ea4['bold'],_0x2458e4(0x226))+_0x2458e4(0x20a)+_0x21c1a7(_0x286ea4[_0x2458e4(0x466)],_0x2458e4(0x31c))+_0x2458e4(0x230)),''][_0x2458e4(0x3e1)]('\x0a'));}function _0x4817a5(_0x5a3aca){const _0xb25cf1=_0x4a2f63;console[_0xb25cf1(0x26a)]('\x0a'+_0x21c1a7(_0x286ea4[_0xb25cf1(0x466)],_0xb25cf1(0x442))+'\x20\x20'+_0x21c1a7(_0x286ea4[_0xb25cf1(0x2e0)],'—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected')+_0xb25cf1(0x435)+_0x21c1a7(_0x286ea4[_0xb25cf1(0x2b1)],_0xb25cf1(0x406))+_0xb25cf1(0x203)+_0x21c1a7(_0x286ea4[_0xb25cf1(0x2b1)],_0xb25cf1(0x406))+'\x20'+_0x21c1a7(_0x286ea4[_0xb25cf1(0x45f)],'<json-body>')+_0xb25cf1(0x4d9)+_0x21c1a7(_0x286ea4[_0xb25cf1(0x2b1)],_0xb25cf1(0x342))+'\x20'+_0x21c1a7(_0x286ea4['cyan'],'<path>')+'\x20'+_0x21c1a7(_0x286ea4[_0xb25cf1(0x45f)],'[body]')+'\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20'+_0x21c1a7(_0x286ea4[_0xb25cf1(0x2e0)],'Examples')+_0xb25cf1(0x4bd)+_0x21c1a7(_0x286ea4[_0xb25cf1(0x23b)],_0xb25cf1(0x28d))+_0xb25cf1(0x2ae)+_0x21c1a7(_0x286ea4[_0xb25cf1(0x23b)],_0xb25cf1(0x21e))+'\x20\x20\x20\x20\x20\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'+_0x21c1a7(_0x286ea4[_0xb25cf1(0x23b)],_0xb25cf1(0x41f))+_0xb25cf1(0x2b5)+_0x5a3aca[_0xb25cf1(0x2da)]+'/types\x0a\x20\x20\x20\x20'+_0x21c1a7(_0x286ea4['gray'],'type/users')+_0xb25cf1(0x428)+_0x5a3aca[_0xb25cf1(0x2da)]+'/type/users\x0a\x20\x20\x20\x20'+_0x21c1a7(_0x286ea4['gray'],_0xb25cf1(0x4b9))+_0xb25cf1(0x315)+_0x5a3aca[_0xb25cf1(0x2da)]+_0xb25cf1(0x43e)+_0x21c1a7(_0x286ea4[_0xb25cf1(0x23b)],'type/users/query\x20{\x22active\x22:true}')+_0xb25cf1(0x205)+_0x5a3aca['env']+_0xb25cf1(0x294)+_0x21c1a7(_0x286ea4[_0xb25cf1(0x23b)],'PUT\x20type/users/item/x\x20{\x22n\x22:1}')+_0xb25cf1(0x4bd)+_0x21c1a7(_0x286ea4[_0xb25cf1(0x23b)],_0xb25cf1(0x42c))+_0xb25cf1(0x4bd)+_0x21c1a7(_0x286ea4[_0xb25cf1(0x23b)],'env/staging/info')+_0xb25cf1(0x224)+_0x21c1a7(_0x286ea4[_0xb25cf1(0x466)],_0xb25cf1(0x328))+'\x20\x20'+_0x21c1a7(_0x286ea4[_0xb25cf1(0x2e0)],_0xb25cf1(0x20c))+_0xb25cf1(0x435)+_0x21c1a7(_0x286ea4[_0xb25cf1(0x2b1)],'--env\x20<name>')+_0xb25cf1(0x25b)+_0x21c1a7(_0x286ea4[_0xb25cf1(0x2b1)],_0xb25cf1(0x4e8))+_0xb25cf1(0x1f1)+_0x21c1a7(_0x286ea4[_0xb25cf1(0x2e0)],_0xb25cf1(0x2d6))+_0xb25cf1(0x4bd)+_0x21c1a7(_0x286ea4['gray'],'types\x20--env\x20staging')+_0xb25cf1(0x4bd)+_0x21c1a7(_0x286ea4[_0xb25cf1(0x23b)],_0xb25cf1(0x40e))+_0xb25cf1(0x4bd)+_0x21c1a7(_0x286ea4['gray'],'type/users\x20--help')+'\x0a\x0a'+_0x21c1a7(_0x286ea4['bold'],_0xb25cf1(0x400))+'\x0a\x0a\x20\x20'+_0x21c1a7(_0x286ea4[_0xb25cf1(0x2b1)],_0xb25cf1(0x473))+_0xb25cf1(0x33a)+_0x21c1a7(_0x286ea4[_0xb25cf1(0x2b1)],_0xb25cf1(0x2da))+'\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'+_0x21c1a7(_0x286ea4[_0xb25cf1(0x2b1)],_0xb25cf1(0x226))+'\x20'+_0x21c1a7(_0x286ea4[_0xb25cf1(0x2e0)],'[filter]')+_0xb25cf1(0x2a2)+_0x21c1a7(_0x286ea4['cyan'],_0xb25cf1(0x202))+'\x20'+_0x21c1a7(_0x286ea4[_0xb25cf1(0x2e0)],_0xb25cf1(0x4bc))+_0xb25cf1(0x445)+_0x21c1a7(_0x286ea4[_0xb25cf1(0x2b1)],'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'+_0x21c1a7(_0x286ea4[_0xb25cf1(0x2b1)],'help')+_0xb25cf1(0x48f)+_0x21c1a7(_0x286ea4['cyan'],_0xb25cf1(0x31c))+'\x20'+_0x21c1a7(_0x286ea4[_0xb25cf1(0x2e0)],'/\x20quit\x20/\x20Ctrl+C')+_0xb25cf1(0x37b));}async function _0x1260ee(_0x1fa429,_0x397657=0x0){const _0x44abc8=_0x4a2f63;process[_0x44abc8(0x322)][_0x44abc8(0x334)]('\x0a'),console[_0x44abc8(0x26a)](_0x21c1a7(_0x286ea4['yellow'],_0x44abc8(0x385)));try{await _0x1fa429[_0x44abc8(0x324)]();}catch(_0x246f25){console[_0x44abc8(0x1f3)](_0x21c1a7(_0x286ea4[_0x44abc8(0x350)],'\x20\x20'+_0x246f25[_0x44abc8(0x345)]));}process[_0x44abc8(0x31c)](_0x397657);}function _0x28a399(_0x615dac){const _0x5c8a2e=_0x4a2f63,_0x26bffd=_0x615dac[_0x5c8a2e(0x2da)]!=='default'?_0x21c1a7(_0x286ea4[_0x5c8a2e(0x45f)],'['+_0x615dac[_0x5c8a2e(0x2da)]+']'):'';return _0x21c1a7(_0x286ea4['bold']+_0x286ea4['cyan'],_0x5c8a2e(0x35a))+_0x26bffd+_0x21c1a7(_0x286ea4[_0x5c8a2e(0x23b)],'>\x20');}const _0xec7241=new Set([_0x4a2f63(0x1fa),_0x4a2f63(0x4ce),_0x4a2f63(0x2dd),'PATCH',_0x4a2f63(0x30b)]);async function _0x4649f4(_0x4564af,_0x57015e,_0x1d665e,_0x12349c,_0xae8c41,_0x1958e5){const _0x2d527f=_0x4a2f63;_0x4564af=_0x4564af[_0x2d527f(0x2b2)]();if(!_0x4564af||_0x4564af['startsWith']('#'))return;const _0x1919a4=_0x3f2a57(_0x4564af),{flags:_0x1d1133,rest:_0x69d021}=_0x197024(_0x1919a4);if(!_0x69d021[_0x2d527f(0x21f)])return;const _0x2d9214=_0x69d021[0x0],_0xa59e6c=_0x2d9214[_0x2d527f(0x49d)]();if(_0xa59e6c===_0x2d527f(0x367)){if(_0x69d021[0x1])_0x48c3cc(_0x57015e,_0x1ea2a7(_0x69d021[0x1],_0x1d1133[_0x2d527f(0x2da)]??_0xae8c41[_0x2d527f(0x2da)]));else _0x4817a5(_0xae8c41);return;}if(_0xa59e6c===_0x2d527f(0x36c)){const _0x18c46b=_0x69d021[0x1];if(!_0x18c46b){console['log'](_0x21c1a7(_0x286ea4['red'],_0x2d527f(0x3c6)));return;}try{_0x57015e['env'](_0x18c46b),_0xae8c41[_0x2d527f(0x2da)]=_0x18c46b,_0x1958e5?.[_0x2d527f(0x378)](_0x28a399(_0xae8c41)),console[_0x2d527f(0x26a)]('\x0a\x20\x20'+_0x21c1a7(_0x286ea4['green'],'✓')+'\x20active\x20env:\x20'+_0x21c1a7(_0x286ea4[_0x2d527f(0x466)]+_0x286ea4['cyan'],_0x18c46b)+'\x0a');}catch{console[_0x2d527f(0x26a)](_0x2d527f(0x410)+_0x21c1a7(_0x286ea4['red'],'✗')+_0x2d527f(0x352)+_0x21c1a7(_0x286ea4[_0x2d527f(0x466)],_0x18c46b)+_0x2d527f(0x32c)+_0x21c1a7(_0x286ea4[_0x2d527f(0x2e0)],_0x2d527f(0x459)));}return;}if(_0xa59e6c===_0x2d527f(0x373)){const _0x59fa91=[..._0x57015e[_0x2d527f(0x267)][_0x2d527f(0x4dc)]()]['filter'](_0x384782=>!_0x384782['startsWith']('~'));console[_0x2d527f(0x26a)]('');for(const _0x3d99ca of _0x59fa91){const _0x509526=_0x3d99ca===_0xae8c41[_0x2d527f(0x2da)];console[_0x2d527f(0x26a)]('\x20\x20'+(_0x509526?_0x21c1a7(_0x286ea4[_0x2d527f(0x313)],'●'):_0x21c1a7(_0x286ea4['dim'],'○'))+'\x20\x20'+(_0x509526?_0x21c1a7(_0x286ea4[_0x2d527f(0x466)]+_0x286ea4[_0x2d527f(0x2b1)],_0x3d99ca):_0x21c1a7(_0x286ea4[_0x2d527f(0x2e0)],_0x3d99ca)));}console[_0x2d527f(0x26a)](_0x2d527f(0x410)+_0x21c1a7(_0x286ea4[_0x2d527f(0x2e0)],_0x2d527f(0x26c))+'\x20'+_0x21c1a7(_0x286ea4[_0x2d527f(0x2b1)],_0xae8c41['env'])),console[_0x2d527f(0x26a)]('');return;}if(_0xa59e6c===_0x2d527f(0x24d)){const _0x582b5f=[..._0x57015e[_0x2d527f(0x267)][_0x2d527f(0x365)]()][_0x2d527f(0x2f9)](_0x1d4b47=>!_0x1d4b47['name'][_0x2d527f(0x22f)]('~'));console[_0x2d527f(0x26a)]('');const _0x4cd290=Math[_0x2d527f(0x381)](..._0x582b5f[_0x2d527f(0x404)](_0x5d1ff2=>_0x5d1ff2[_0x2d527f(0x49e)][_0x2d527f(0x21f)]));for(const _0x332dcf of _0x582b5f){const _0x1d43f4=_0x332dcf[_0x2d527f(0x49e)]===_0xae8c41['env'],_0x588dd7=_0x1d43f4?_0x21c1a7(_0x286ea4[_0x2d527f(0x313)],'●'):_0x21c1a7(_0x286ea4['dim'],'○'),_0x5b90e8=_0x1d43f4?_0x21c1a7(_0x286ea4['bold']+_0x286ea4['cyan'],_0x332dcf[_0x2d527f(0x49e)][_0x2d527f(0x2c9)](_0x4cd290)):_0x21c1a7(_0x286ea4[_0x2d527f(0x2e0)],_0x332dcf[_0x2d527f(0x49e)][_0x2d527f(0x2c9)](_0x4cd290)),_0x93bc3a=[..._0x332dcf['typeSubDbs'][_0x2d527f(0x4dc)]()][_0x2d527f(0x2f9)](_0x58ab43=>!_0x58ab43[_0x2d527f(0x22f)]('~')),_0x9f4ea5=_0x93bc3a[_0x2d527f(0x21f)]?_0x21c1a7(_0x286ea4[_0x2d527f(0x2e0)],_0x93bc3a['slice'](0x0,0x5)[_0x2d527f(0x3e1)](',\x20')+(_0x93bc3a[_0x2d527f(0x21f)]>0x5?'\x20\x20+'+(_0x93bc3a[_0x2d527f(0x21f)]-0x5)+_0x2d527f(0x34f):'')):_0x21c1a7(_0x286ea4[_0x2d527f(0x2e0)],_0x2d527f(0x24e));console['log']('\x20\x20'+_0x588dd7+'\x20\x20'+_0x5b90e8+'\x20\x20'+_0x9f4ea5);}console[_0x2d527f(0x26a)]('');return;}if(_0xa59e6c==='TYPES'){const _0x55290c=_0x1d1133[_0x2d527f(0x2da)]??_0x69d021[0x1]??_0xae8c41['env'];try{const _0x84631=_0x57015e[_0x2d527f(0x2da)](_0x55290c),_0x47a7d9=[..._0x84631[_0x2d527f(0x4d2)][_0x2d527f(0x4dc)]()][_0x2d527f(0x2f9)](_0x19145a=>!_0x19145a[_0x2d527f(0x22f)]('~'))[_0x2d527f(0x1e4)]();console[_0x2d527f(0x26a)](_0x2d527f(0x410)+_0x21c1a7(_0x286ea4[_0x2d527f(0x2e0)],_0x47a7d9[_0x2d527f(0x21f)]+_0x2d527f(0x228)+(_0x47a7d9['length']!==0x1?'s':'')+_0x2d527f(0x38f)+_0x55290c));for(const _0x29422a of _0x47a7d9){const _0x3911e2=_0x84631[_0x2d527f(0x4d2)][_0x2d527f(0x375)](_0x29422a),_0x40e4c6=_0x3911e2?.[_0x2d527f(0x34d)]?.['getCount']?.()??0x0,_0x399ae6=_0x21c1a7(_0x286ea4[_0x2d527f(0x466)]+_0x286ea4[_0x2d527f(0x2b1)],_0x29422a[_0x2d527f(0x2c9)](0x1c));console[_0x2d527f(0x26a)](_0x2d527f(0x43c)+_0x399ae6+'\x20\x20'+_0x21c1a7(_0x286ea4['magenta'],String(_0x40e4c6)[_0x2d527f(0x3f1)](0x6))+'\x20'+_0x21c1a7(_0x286ea4[_0x2d527f(0x2e0)],_0x2d527f(0x35f)));}console[_0x2d527f(0x26a)]('');}catch(_0x128a9d){console[_0x2d527f(0x1f3)](_0x21c1a7(_0x286ea4[_0x2d527f(0x350)],_0x2d527f(0x410)+_0x128a9d[_0x2d527f(0x345)]+'\x0a'));}return;}if(_0xa59e6c==='ROUTES'){_0x2b2cd4(_0x57015e,_0x69d021[_0x2d527f(0x48e)](0x1)['join']('\x20'));return;}if(_0xa59e6c===_0x2d527f(0x27b)){const _0x5dccdf=(_0x69d021[0x1]??'')[_0x2d527f(0x396)]();if(!_0x5dccdf||_0x5dccdf==='on')_0x12349c[_0x2d527f(0x2f6)]=!![],_0x12349c['level']='info',console[_0x2d527f(0x26a)](_0x2d527f(0x410)+_0x21c1a7(_0x286ea4['green'],'✓')+'\x20logs\x20on\x20\x20'+_0x21c1a7(_0x286ea4[_0x2d527f(0x2e0)],_0x2d527f(0x380))+'\x0a');else{if(_0x5dccdf===_0x2d527f(0x357))_0x12349c['enabled']=![],console[_0x2d527f(0x26a)](_0x2d527f(0x410)+_0x21c1a7(_0x286ea4[_0x2d527f(0x45f)],'○')+_0x2d527f(0x37e));else _0x1f5c85[_0x5dccdf]!==undefined?(_0x12349c['enabled']=!![],_0x12349c[_0x2d527f(0x485)]=_0x5dccdf,console[_0x2d527f(0x26a)](_0x2d527f(0x410)+_0x21c1a7(_0x286ea4['green'],'✓')+_0x2d527f(0x31f)+_0x21c1a7(_0x286ea4[_0x2d527f(0x466)],_0x5dccdf)+'\x0a')):console[_0x2d527f(0x1f3)](_0x21c1a7(_0x286ea4['red'],_0x2d527f(0x4aa)));}return;}if(_0xa59e6c===_0x2d527f(0x239)||_0xa59e6c===_0x2d527f(0x4b4)){await _0x1260ee(_0x57015e,0x0);return;}if(_0xa59e6c===_0x2d527f(0x3c3)){const _0x268fe8=_0x2d527f(0x44e)+_0x1d665e[_0x2d527f(0x2bf)]+_0x2d527f(0x4be),_0x51c100=process[_0x2d527f(0x30c)]===_0x2d527f(0x470)?_0x2d527f(0x371)+_0x268fe8:process[_0x2d527f(0x30c)]==='darwin'?_0x2d527f(0x2d2)+_0x268fe8:'xdg-open\x20'+_0x268fe8;require$$4[_0x2d527f(0x4c8)](_0x51c100),console[_0x2d527f(0x26a)](_0x2d527f(0x410)+_0x21c1a7(_0x286ea4[_0x2d527f(0x313)],'✓')+_0x2d527f(0x33c)+_0x21c1a7(_0x286ea4[_0x2d527f(0x2b1)],_0x268fe8)+'\x0a');return;}let _0x7fac8e,_0x359b0a,_0x26bde6;if(_0xec7241['has'](_0xa59e6c)){_0x7fac8e=_0xa59e6c,_0x359b0a=_0x69d021[0x1],_0x26bde6=_0x69d021[_0x2d527f(0x48e)](0x2);if(!_0x359b0a){console[_0x2d527f(0x1f3)](_0x21c1a7(_0x286ea4[_0x2d527f(0x350)],_0x2d527f(0x23a)+_0x2d9214+_0x2d527f(0x465)));return;}}else _0x7fac8e=null,_0x359b0a=_0x69d021[0x0],_0x26bde6=_0x69d021['slice'](0x1);const _0x5979f7=_0x1d1133[_0x2d527f(0x2da)]??_0xae8c41['env'],_0x31d0c8=_0x1ea2a7(_0x359b0a,_0x5979f7);if(_0x1d1133[_0x2d527f(0x238)]){_0x48c3cc(_0x57015e,_0x31d0c8);return;}let _0x8947b=null;if(_0x26bde6[_0x2d527f(0x21f)]){const _0x1c737c=_0x26bde6['join']('\x20');try{_0x8947b=_0x447fc2(_0x1c737c);}catch(_0x54e98f){console[_0x2d527f(0x1f3)](_0x21c1a7(_0x286ea4[_0x2d527f(0x350)],'\x0a\x20\x20Invalid\x20JSON:\x20'+_0x1c737c+_0x2d527f(0x410)+_0x21c1a7(_0x286ea4['dim'],_0x54e98f['message'])+'\x0a'));return;}}if(!_0x7fac8e)_0x7fac8e=_0x8947b!==null?_0x2d527f(0x4ce):_0x2d527f(0x1fa);try{const _0x53af27=await _0x6e7976(_0x57015e,_0x7fac8e,_0x31d0c8,_0x8947b);_0x247cf1(_0x53af27[_0x2d527f(0x1ed)],_0x53af27[_0x2d527f(0x4d4)]);}catch(_0x12b230){console['error'](_0x2d527f(0x410)+_0x21c1a7(_0x286ea4[_0x2d527f(0x350)],'✗')+'\x20'+_0x12b230[_0x2d527f(0x345)]+'\x0a');}}class _0x43e62e{constructor(){const _0x216a83=_0x4a2f63;this[_0x216a83(0x2dc)]=new Map(),this[_0x216a83(0x305)]=null,this[_0x216a83(0x3f5)]=![];}}function _0x22820d(_0x4259ee){const _0x5453f3=_0x4a2f63,_0x2ea115=new _0x43e62e();for(const _0x5e0dea of _0x4259ee){if(_0x5e0dea[_0x5453f3(0x491)]?.[_0x5453f3(0x23f)])continue;const _0x23c217=_0x5e0dea[_0x5453f3(0x37c)][_0x5453f3(0x46c)](/^\/api/,'')[_0x5453f3(0x46c)](/^\[\/env\/:env=[^\]]*\]/,'')[_0x5453f3(0x46c)](/^\//,'');if(!_0x23c217)continue;let _0xd06919=_0x2ea115;for(const _0x614fb9 of _0x23c217[_0x5453f3(0x36d)]('/')['filter'](Boolean)){if(_0x614fb9[_0x5453f3(0x22f)](':')){const _0x2bda96=_0x614fb9['slice'](0x1);if(!_0xd06919[_0x5453f3(0x305)])_0xd06919['dynamic']={'param':_0x2bda96,'node':new _0x43e62e()};_0xd06919=_0xd06919[_0x5453f3(0x305)]['node'];}else{if(!_0xd06919[_0x5453f3(0x2dc)][_0x5453f3(0x3e5)](_0x614fb9))_0xd06919[_0x5453f3(0x2dc)][_0x5453f3(0x423)](_0x614fb9,new _0x43e62e());_0xd06919=_0xd06919[_0x5453f3(0x2dc)]['get'](_0x614fb9);}}_0xd06919[_0x5453f3(0x3f5)]=!![];}return _0x2ea115;}const _0x5a5389=new Map();function _0x7e02ff(_0x516933,_0x165d65,_0x5176e5){const _0x5252e0=_0x4a2f63,_0x3bf9c5=_0x5a5389[_0x5252e0(0x375)](_0x516933);if(_0x3bf9c5&&_0x3bf9c5[_0x5252e0(0x21d)]>Date[_0x5252e0(0x416)]())return _0x3bf9c5['val'];const _0x4b4ded=_0x5176e5();return _0x5a5389[_0x5252e0(0x423)](_0x516933,{'val':_0x4b4ded,'exp':Date['now']()+_0x165d65}),_0x4b4ded;}function _0x18c027(_0x3cbc45,_0x45e62b,_0x59fe8c,_0x50c7ca){const _0x44e521=_0x4a2f63,_0x58101b=_0x45e62b[_0x44e521(0x2da)]??_0x50c7ca['env'];switch(_0x3cbc45){case _0x44e521(0x2da):return[..._0x59fe8c[_0x44e521(0x267)][_0x44e521(0x4dc)]()][_0x44e521(0x2f9)](_0x40cd79=>!_0x40cd79[_0x44e521(0x22f)]('~'));case'type':return _0x7e02ff(_0x44e521(0x4b6)+_0x58101b,0x7d0,()=>{const _0xe5ccde=_0x44e521;try{return[..._0x59fe8c[_0xe5ccde(0x2da)](_0x58101b)[_0xe5ccde(0x4d2)][_0xe5ccde(0x4dc)]()][_0xe5ccde(0x2f9)](_0x5886c8=>!_0x5886c8['startsWith']('~'));}catch{return[];}});case _0x44e521(0x2f3):if(!_0x45e62b['type'])return[];return _0x7e02ff('keys:'+_0x58101b+':'+_0x45e62b[_0x44e521(0x3d2)],0x5dc,()=>{const _0x17dadc=_0x44e521;try{const _0x2b35bc=_0x59fe8c['env'](_0x58101b)['typeSubDbs']['get'](_0x45e62b[_0x17dadc(0x3d2)]);if(!_0x2b35bc?.[_0x17dadc(0x34d)])return[];const _0x671248=[];for(const {key:_0x170701}of _0x2b35bc[_0x17dadc(0x34d)][_0x17dadc(0x3b8)]({'limit':0x32})){_0x671248['push'](String(_0x170701));if(_0x671248[_0x17dadc(0x21f)]>=0x32)break;}return _0x671248;}catch{return[];}});case'index':if(!_0x45e62b[_0x44e521(0x3d2)])return[];return _0x7e02ff(_0x44e521(0x1e3)+_0x58101b+':'+_0x45e62b[_0x44e521(0x3d2)],0x7d0,()=>{const _0x338052=_0x44e521;try{const _0x177630=_0x59fe8c[_0x338052(0x2da)](_0x58101b)[_0x338052(0x4d2)]['get'](_0x45e62b[_0x338052(0x3d2)]);return _0x177630?[..._0x177630[_0x338052(0x2cc)]?.['keys']()??[]]:[];}catch{return[];}});case _0x44e521(0x249):if(!_0x45e62b['type'])return[];return _0x7e02ff('fts:'+_0x58101b+':'+_0x45e62b[_0x44e521(0x3d2)],0x7d0,()=>{const _0x358f74=_0x44e521;try{return _0x59fe8c[_0x358f74(0x405)]?.[_0x358f74(0x3bb)]?.(_0x45e62b[_0x358f74(0x3d2)],_0x59fe8c[_0x358f74(0x2da)](_0x58101b))?.[_0x358f74(0x404)](_0x443027=>_0x443027[_0x358f74(0x49e)])??[];}catch{return[];}});default:return[];}}function _0x1e5385(_0x44cd0d,_0x24d6a0,_0x359039,_0x2004b2){const _0x4bbe0b=_0x4a2f63,_0x4a41d6=_0x44cd0d[_0x4bbe0b(0x36f)]('/'),_0x12de03=_0x44cd0d['split']('/'),_0xcd666b=_0x4a41d6?_0x12de03['slice'](0x0,-0x1):_0x12de03[_0x4bbe0b(0x48e)](0x0,-0x1),_0x24343c=_0x4a41d6?'':_0x12de03[_0x12de03[_0x4bbe0b(0x21f)]-0x1];let _0xb6ed6e=_0x24d6a0;const _0x22a628={};for(const _0x4517fc of _0xcd666b){if(!_0x4517fc)continue;if(_0xb6ed6e['children']['has'](_0x4517fc))_0xb6ed6e=_0xb6ed6e[_0x4bbe0b(0x2dc)][_0x4bbe0b(0x375)](_0x4517fc);else{if(_0xb6ed6e['dynamic'])_0x22a628[_0xb6ed6e['dynamic'][_0x4bbe0b(0x3da)]]=_0x4517fc,_0xb6ed6e=_0xb6ed6e[_0x4bbe0b(0x305)][_0x4bbe0b(0x2fb)];else return[];}}const _0x2fd294=_0xcd666b[_0x4bbe0b(0x2f9)](Boolean),_0x4c9605=_0x2fd294[_0x4bbe0b(0x21f)]?_0x2fd294[_0x4bbe0b(0x3e1)]('/')+'/':'',_0x54eabc=[];for(const [_0x2236b4]of _0xb6ed6e['children']){if(_0x2236b4[_0x4bbe0b(0x22f)](_0x24343c))_0x54eabc[_0x4bbe0b(0x29f)](_0x4c9605+_0x2236b4);}if(_0xb6ed6e[_0x4bbe0b(0x305)])for(const _0x210aef of _0x18c027(_0xb6ed6e[_0x4bbe0b(0x305)][_0x4bbe0b(0x3da)],_0x22a628,_0x359039,_0x2004b2)){if(String(_0x210aef)[_0x4bbe0b(0x22f)](_0x24343c))_0x54eabc[_0x4bbe0b(0x29f)](_0x4c9605+_0x210aef);}return _0x54eabc[_0x4bbe0b(0x48e)](0x0,0x64);}const _0x2989d4=[_0x4a2f63(0x238),'use',_0x4a2f63(0x2da),_0x4a2f63(0x21e),'types',_0x4a2f63(0x226),_0x4a2f63(0x202),_0x4a2f63(0x397),_0x4a2f63(0x31c),_0x4a2f63(0x253)];function _0x742a8e(_0x95ff0c,_0x2663fc,_0x40878e){return function _0x3acc39(_0x1b9e45){const _0x29a008=_0x3a76;try{const _0x5a188c=_0x1b9e45[_0x29a008(0x351)](/\s[{[]/),_0x578d39=_0x5a188c>=0x0?_0x1b9e45[_0x29a008(0x48e)](0x0,_0x5a188c):_0x1b9e45,_0x1cf340=_0x578d39[_0x29a008(0x3ba)]();if(!_0x1cf340){const _0x520fc3=[..._0x2989d4,...[..._0x95ff0c[_0x29a008(0x2dc)]['keys']()]][_0x29a008(0x48e)](0x0,0x64);return[_0x520fc3,''];}const _0xb44cd7=_0x1cf340[_0x29a008(0x36d)](/\s+/),_0x3a5e8a=_0xb44cd7[0x0],_0x372995=_0x3a5e8a[_0x29a008(0x49d)]();if(_0xb44cd7['length']===0x1){const _0x307358=_0x3a5e8a['toLowerCase'](),_0x4986f5=_0x2989d4[_0x29a008(0x2f9)](_0x2dc062=>_0x2dc062[_0x29a008(0x22f)](_0x307358)),_0x478316=_0x1e5385(_0x3a5e8a,_0x95ff0c,_0x2663fc,_0x40878e),_0x11b114=[...new Set([..._0x4986f5,..._0x478316])]['slice'](0x0,0x64);return[_0x11b114,_0x3a5e8a];}if(_0xec7241[_0x29a008(0x3e5)](_0x372995)&&_0xb44cd7['length']===0x2){const _0x140df0=_0xb44cd7[0x1],_0x93df75=_0x1e5385(_0x140df0,_0x95ff0c,_0x2663fc,_0x40878e);return[_0x93df75[_0x29a008(0x404)](_0x3cd0f9=>_0x3a5e8a+'\x20'+_0x3cd0f9),_0x3a5e8a+'\x20'+_0x140df0];}if(!_0xec7241['has'](_0x372995)&&_0xb44cd7[_0x29a008(0x21f)]>0x1){const _0x57a37b=_0x1e5385(_0x3a5e8a,_0x95ff0c,_0x2663fc,_0x40878e),_0xf9c01e='\x20'+_0xb44cd7[_0x29a008(0x48e)](0x1)['join']('\x20');return[_0x57a37b[_0x29a008(0x404)](_0x58b2c0=>_0x58b2c0+_0xf9c01e),_0x3a5e8a+_0xf9c01e];}return[[],_0x1b9e45];}catch{return[[],_0x1b9e45];}};}async function _0x4cdbf7(_0x59d40f,_0xb382b4){const _0x457fd0=_0x4a2f63,_0x1c8c32={'enabled':!![],'level':_0xb382b4[_0x457fd0(0x413)]??_0x457fd0(0x28d)},_0x395371={'env':_0x457fd0(0x42d)},_0x2f8980={'current':null},_0xbc9b4d=_0x22820d(_0x59d40f[_0x457fd0(0x2ea)][_0x457fd0(0x45d)]()),_0x52f835=_0x742a8e(_0xbc9b4d,_0x59d40f,_0x395371);_0x59d40f['log']['attach'](_0x517ead=>{const _0xa2bef0=_0x457fd0;if(!_0x1c8c32[_0xa2bef0(0x2f6)])return;_0x1c354e(_0x517ead,_0x1c8c32[_0xa2bef0(0x485)]),_0x2f8980['current']?.['prompt'](!![]);}),_0x53ea6a(_0x59d40f,_0xb382b4);const _0x4a3976=_0x5a1678[_0x457fd0(0x458)]({'input':process[_0x457fd0(0x321)],'output':process['stdout'],'terminal':!![],'completer':_0x52f835,'prompt':_0x28a399(_0x395371),'historySize':_0x45c909});try{const _0x58779d=_0x28716f[_0x457fd0(0x2ce)](_0x177f81,_0x457fd0(0x3ea))[_0x457fd0(0x36d)]('\x0a')[_0x457fd0(0x2f9)](Boolean);_0x4a3976[_0x457fd0(0x268)]=_0x58779d[_0x457fd0(0x37d)]()[_0x457fd0(0x48e)](0x0,_0x45c909);}catch{}return _0x2f8980[_0x457fd0(0x25e)]=_0x4a3976,_0x4a3976['on']('line',async _0x164745=>{const _0x15e9b2=_0x457fd0;_0x4a3976[_0x15e9b2(0x1e2)]();try{await _0x4649f4(_0x164745,_0x59d40f,_0xb382b4,_0x1c8c32,_0x395371,_0x4a3976);}catch(_0xeb5edc){console['error'](_0x21c1a7(_0x286ea4['red'],_0x15e9b2(0x2f0)+_0xeb5edc[_0x15e9b2(0x345)]));}finally{_0x4a3976['resume'](),_0x4a3976[_0x15e9b2(0x1ec)]();}}),_0x4a3976['on'](_0x457fd0(0x324),()=>{const _0x441e14=_0x457fd0;try{const _0x4b6f1d=[..._0x4a3976[_0x441e14(0x268)]][_0x441e14(0x37d)]()[_0x441e14(0x2f9)](Boolean)['slice'](0x0,_0x45c909);_0x28716f[_0x441e14(0x3a1)](_0x177f81,_0x4b6f1d[_0x441e14(0x3e1)]('\x0a')+'\x0a');}catch{}_0x1260ee(_0x59d40f,0x0);}),process['on'](_0x457fd0(0x270),()=>{const _0x37767b=_0x457fd0;if(_0x4a3976['line']==='')_0x1260ee(_0x59d40f,0x0);else process[_0x37767b(0x322)][_0x37767b(0x334)]('\x0a'),_0x4a3976[_0x37767b(0x46b)](0x0),_0x4a3976[_0x37767b(0x1ec)]();}),process['on']('SIGTERM',()=>_0x1260ee(_0x59d40f,0x0)),_0x4a3976[_0x457fd0(0x1ec)](),_0x4a3976;}return okdbShell={'start':_0x4cdbf7,'colorLog':_0x1c354e,'lenientParse':_0x447fc2,'_splitLine':_0x3f2a57,'_formatRouteHelpLines':_0x50f02b,'_routeSummary':_0x1c0435,'_routeTags':_0x3932e3},okdbShell;}var hasRequiredOkdb;function requireOkdb(){const _0x396e5=_0xddaf03;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x396e5(0x3aa)]();}catch{}const _0x37c1e7=require$$1$1,_0x2753d1=require$$1;function _0x38668f(_0x23808d){const _0x3c6a47=_0x396e5,_0xf3ecc9=_0x23808d[_0x3c6a47(0x48e)](0x2),_0x56a70c={};let _0x25d049=0x0;while(_0x25d049<_0xf3ecc9[_0x3c6a47(0x21f)]){const _0x107248=_0xf3ecc9[_0x25d049];if(_0x107248==='--port'||_0x107248==='-p')_0x56a70c[_0x3c6a47(0x2bf)]=Number(_0xf3ecc9[++_0x25d049]);else{if(_0x107248==='--path'||_0x107248==='-d')_0x56a70c['path']=_0xf3ecc9[++_0x25d049];else{if(_0x107248===_0x3c6a47(0x3c5)||_0x107248==='-k')_0x56a70c[_0x3c6a47(0x2f3)]=_0xf3ecc9[++_0x25d049];else{if(_0x107248==='--config'||_0x107248==='-c')_0x56a70c[_0x3c6a47(0x312)]=_0xf3ecc9[++_0x25d049];else{if(_0x107248==='--log-level')_0x56a70c['logLevel']=_0xf3ecc9[++_0x25d049];else{if(_0x107248===_0x3c6a47(0x259))_0x56a70c[_0x3c6a47(0x3f7)]=!![];else{if(_0x107248===_0x3c6a47(0x272))_0x56a70c[_0x3c6a47(0x27e)]=!![];else{if(_0x107248===_0x3c6a47(0x414)||_0x107248==='-e')_0x56a70c[_0x3c6a47(0x2da)]=_0xf3ecc9[++_0x25d049];else{if(_0x107248===_0x3c6a47(0x217))_0x56a70c[_0x3c6a47(0x41f)]=_0xf3ecc9[++_0x25d049];else{if(_0x107248===_0x3c6a47(0x2a9))_0x56a70c[_0x3c6a47(0x4cb)]=!![];else{if(_0x107248===_0x3c6a47(0x2ef))_0x56a70c[_0x3c6a47(0x422)]=!![];else{if(_0x107248==='--drop')_0x56a70c[_0x3c6a47(0x4a0)]=!![];else{if(_0x107248===_0x3c6a47(0x23d)){const _0x505af7=[];while(_0x25d049+0x1<_0xf3ecc9['length']&&!_0xf3ecc9[_0x25d049+0x1][_0x3c6a47(0x22f)]('--')){_0x505af7[_0x3c6a47(0x29f)](_0xf3ecc9[++_0x25d049]);}_0x56a70c[_0x3c6a47(0x397)]=_0x505af7[_0x3c6a47(0x21f)]>0x0?_0x505af7:!![];}else{if(_0x107248===_0x3c6a47(0x433))_0x56a70c[_0x3c6a47(0x1f2)]=!![];else{if(_0x107248===_0x3c6a47(0x3e4))_0x56a70c[_0x3c6a47(0x49e)]=_0xf3ecc9[++_0x25d049];else{if(_0x107248===_0x3c6a47(0x285))_0x56a70c[_0x3c6a47(0x4bb)]=_0xf3ecc9[++_0x25d049];else{if(_0x107248===_0x3c6a47(0x454))_0x56a70c[_0x3c6a47(0x430)]=_0xf3ecc9[++_0x25d049];else{if(_0x107248===_0x3c6a47(0x25a))_0x56a70c[_0x3c6a47(0x3ab)]=_0xf3ecc9[++_0x25d049];else{if(_0x107248==='--grants')_0x56a70c[_0x3c6a47(0x309)]=_0xf3ecc9[++_0x25d049];else{if(_0x107248===_0x3c6a47(0x34e))_0x56a70c[_0x3c6a47(0x289)]=_0xf3ecc9[++_0x25d049];else{if(_0x107248==='--token')_0x56a70c[_0x3c6a47(0x496)]=_0xf3ecc9[++_0x25d049];else{if(_0x107248===_0x3c6a47(0x41b)||_0x107248==='-u')_0x56a70c['username']=_0xf3ecc9[++_0x25d049];else{if(_0x107248===_0x3c6a47(0x4c5))_0x56a70c['selfAddress']=_0xf3ecc9[++_0x25d049];else{if(_0x107248===_0x3c6a47(0x3a7)||_0x107248==='-v'){const _0x804072=require$$2;console[_0x3c6a47(0x26a)](_0x804072[_0x3c6a47(0x2e2)]),process[_0x3c6a47(0x31c)](0x0);}else(_0x107248===_0x3c6a47(0x4e8)||_0x107248==='-h')&&(_0x1dbc0d(),process[_0x3c6a47(0x31c)](0x0));}}}}}}}}}}}}}}}}}}}}}}}_0x25d049++;}return _0x56a70c;}function _0x1dbc0d(){const _0x32db68=_0x396e5;console[_0x32db68(0x26a)](_0x32db68(0x436));}const _0x392f35=new Set([_0x396e5(0x291),'info',_0x396e5(0x2ee),_0x396e5(0x1f3)]);function _0x2d4682(_0x55156c){const _0x17a5e1=_0x396e5,_0x40573d=_0x55156c['config']?_0x37c1e7[_0x17a5e1(0x4b3)](_0x55156c[_0x17a5e1(0x312)]):_0x37c1e7[_0x17a5e1(0x4b3)](_0x17a5e1(0x3cb));let _0xe10302={};if(_0x2753d1['existsSync'](_0x40573d))try{const _0x57cbdd=_0x2753d1[_0x17a5e1(0x2ce)](_0x40573d,_0x17a5e1(0x3ea))['replace'](/^\uFEFF/,'');_0xe10302=JSON[_0x17a5e1(0x279)](_0x57cbdd),console[_0x17a5e1(0x26a)]('[okdb]\x20loaded\x20config:\x20'+_0x40573d);}catch(_0x3c5fd0){console['error'](_0x17a5e1(0x4b8)+_0x40573d+':\x20'+_0x3c5fd0[_0x17a5e1(0x345)]),process[_0x17a5e1(0x31c)](0x1);}const _0x317b84={'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},_0x4a9a17={'port':_0x55156c['port']??_0xe10302[_0x17a5e1(0x2bf)]??_0x317b84[_0x17a5e1(0x2bf)]??0x2124,'dbPath':_0x55156c[_0x17a5e1(0x37c)]??_0xe10302[_0x17a5e1(0x37c)]??_0x317b84[_0x17a5e1(0x37c)]??_0x17a5e1(0x3af),'key':_0x55156c['key']??_0xe10302['key']??_0x317b84[_0x17a5e1(0x2f3)]??undefined,'logLevel':_0x55156c[_0x17a5e1(0x413)]??_0xe10302['logLevel']??_0x317b84[_0x17a5e1(0x413)]??_0x17a5e1(0x28d),'noRepl':_0x55156c[_0x17a5e1(0x3f7)]??_0xe10302[_0x17a5e1(0x3f7)]??_0x317b84[_0x17a5e1(0x3f7)]??![],'noAdmin':_0x55156c['noAdmin']??_0xe10302[_0x17a5e1(0x27e)]??_0x317b84[_0x17a5e1(0x27e)]??![],'admin':_0xe10302[_0x17a5e1(0x304)]??{},'api':_0xe10302[_0x17a5e1(0x43a)]??undefined,'auth':_0xe10302[_0x17a5e1(0x298)]??undefined,'mcp':_0xe10302['mcp']??undefined,'timeMachine':_0xe10302['timeMachine']!==![]?_0xe10302[_0x17a5e1(0x2af)]??{}:![]};return _0x55156c[_0x17a5e1(0x397)]!==undefined&&(_0x4a9a17[_0x17a5e1(0x298)]=_0x4a9a17[_0x17a5e1(0x298)]||{},_0x4a9a17['auth'][_0x17a5e1(0x397)]=_0x55156c[_0x17a5e1(0x397)]),_0x55156c['logRequests']&&(_0x4a9a17[_0x17a5e1(0x291)]=_0x4a9a17['debug']||{},_0x4a9a17['debug'][_0x17a5e1(0x1f2)]=!![]),(!Number[_0x17a5e1(0x393)](_0x4a9a17[_0x17a5e1(0x2bf)])||_0x4a9a17['port']<0x1||_0x4a9a17[_0x17a5e1(0x2bf)]>0xffff)&&(console[_0x17a5e1(0x1f3)](_0x17a5e1(0x411)+_0x4a9a17[_0x17a5e1(0x2bf)]+_0x17a5e1(0x41e)),process[_0x17a5e1(0x31c)](0x1)),!_0x392f35[_0x17a5e1(0x3e5)](_0x4a9a17[_0x17a5e1(0x413)])&&(console[_0x17a5e1(0x1f3)](_0x17a5e1(0x348)+_0x4a9a17[_0x17a5e1(0x413)]+_0x17a5e1(0x390)),process[_0x17a5e1(0x31c)](0x1)),_0x4a9a17;}function _0x269c11(_0x2ae1a7){const _0x30e192=_0x396e5;return!!(_0x2ae1a7&&typeof _0x2ae1a7==='object'&&!Array[_0x30e192(0x261)](_0x2ae1a7)&&Object[_0x30e192(0x4dc)](_0x2ae1a7)[_0x30e192(0x21f)]>0x0);}const _0x38c37d=!process[_0x396e5(0x322)][_0x396e5(0x200)]||!!process.env.NO_COLOR;function _0xd50dd7(_0x7f0329,_0x7cb767){const _0xa6b56=_0x396e5;return _0x38c37d?_0x7cb767:'\x1b['+_0x7f0329+'m'+_0x7cb767+_0xa6b56(0x464);}function _0x230027(_0x4d4a1b){const _0x453ce1=_0x396e5;if(!_0x4d4a1b||_0x4d4a1b[_0x453ce1(0x21f)]===0x0)return;const _0x18f5d3='─'[_0x453ce1(0x3f6)](0x38);process[_0x453ce1(0x30a)]['write']('\x0a'),process[_0x453ce1(0x30a)]['write'](_0xd50dd7('33',_0x453ce1(0x301)+_0x4d4a1b[_0x453ce1(0x21f)]+_0x453ce1(0x4d6)+(_0x4d4a1b[_0x453ce1(0x21f)]>0x1?'S':'')+'\x0a')),process[_0x453ce1(0x30a)][_0x453ce1(0x334)]('\x20\x20'+_0x18f5d3+'\x0a');for(const _0x19b0c8 of _0x4d4a1b){const _0x310b24=_0x19b0c8[_0x453ce1(0x485)]===_0x453ce1(0x1f3)?_0xd50dd7('31',_0x453ce1(0x3e8)):_0xd50dd7('33',_0x453ce1(0x3c1));process[_0x453ce1(0x30a)][_0x453ce1(0x334)](_0x310b24+'\x20\x20'+_0xd50dd7('1',_0x19b0c8[_0x453ce1(0x28c)])+'\x0a'),process['stderr'][_0x453ce1(0x334)](_0x453ce1(0x22a)+_0x19b0c8[_0x453ce1(0x345)]+'\x0a');if(_0x19b0c8[_0x453ce1(0x4e5)])process[_0x453ce1(0x30a)]['write'](_0x453ce1(0x22a)+_0xd50dd7('2',_0x453ce1(0x47b)+_0x19b0c8['hint'])+'\x0a');process[_0x453ce1(0x30a)][_0x453ce1(0x334)]('\x0a');}process[_0x453ce1(0x30a)]['write']('\x20\x20'+_0x18f5d3+'\x0a\x0a');}function _0x4bce81(_0x33ce40,_0x38ee02){const _0x5394a8=_0x396e5,_0x5b9b45=_0x33ce40[_0x5394a8(0x2ea)][_0x5394a8(0x1f0)](_0x38ee02);return new Promise((_0x238d1c,_0x4bb1be)=>{const _0x3b6aa7=_0x5394a8;_0x5b9b45['once'](_0x3b6aa7(0x47a),_0x238d1c),_0x5b9b45[_0x3b6aa7(0x388)](_0x3b6aa7(0x1f3),_0x4bb1be);});}async function _0x131a1a(_0x8bc033){const _0x492a17=_0x396e5,_0x5a0597=require$$3;console[_0x492a17(0x26a)](_0x492a17(0x3d8));let _0x4ef0e9=!![];const _0x131227=(_0x36db01,_0x50b923)=>{const _0x52f7d9=_0x492a17;console[_0x52f7d9(0x26a)]('\x20\x20'+(_0x36db01?'✓':'✗')+'\x20'+_0x50b923);if(!_0x36db01)_0x4ef0e9=![];},_0x3460d0=Number(process['version'][_0x492a17(0x46c)]('v','')['split']('.')[0x0]);_0x131227(_0x3460d0>=0x12,_0x492a17(0x1fd)+process[_0x492a17(0x2e2)]+(_0x3460d0<0x12?_0x492a17(0x38e):''));const _0x584a3a=_0x37c1e7['resolve'](_0x8bc033[_0x492a17(0x377)]);try{_0x2753d1[_0x492a17(0x34b)](_0x584a3a,{'recursive':!![]});const _0x10f58c=_0x37c1e7[_0x492a17(0x3e1)](_0x584a3a,_0x492a17(0x302));_0x2753d1[_0x492a17(0x3a1)](_0x10f58c,''),_0x2753d1[_0x492a17(0x25f)](_0x10f58c),_0x131227(!![],_0x492a17(0x469)+_0x584a3a);}catch(_0x5a5c8b){_0x131227(![],'database\x20path\x20not\x20writable:\x20'+_0x584a3a+'\x20\x20('+_0x5a5c8b[_0x492a17(0x345)]+')');}const _0x3665b8=await new Promise(_0xba1142=>{const _0x197d97=_0x492a17,_0x4ed119=_0x5a0597[_0x197d97(0x4e6)]();_0x4ed119[_0x197d97(0x388)](_0x197d97(0x1f3),()=>_0xba1142(![])),_0x4ed119['once'](_0x197d97(0x47a),()=>{_0x4ed119['close'](),_0xba1142(!![]);}),_0x4ed119[_0x197d97(0x1f0)](_0x8bc033[_0x197d97(0x2bf)],_0x197d97(0x275));});_0x131227(_0x3665b8,_0x492a17(0x417)+_0x8bc033['port']+'\x20'+(_0x3665b8?'available':'already\x20in\x20use'));const _0x4e526c=_0x37c1e7[_0x492a17(0x4b3)](_0x492a17(0x3cb));if(_0x2753d1[_0x492a17(0x40b)](_0x4e526c))try{JSON[_0x492a17(0x279)](_0x2753d1[_0x492a17(0x2ce)](_0x4e526c,_0x492a17(0x3ea))[_0x492a17(0x46c)](/^\uFEFF/,'')),_0x131227(!![],_0x492a17(0x209)+_0x4e526c);}catch(_0x23d2e6){_0x131227(![],_0x492a17(0x45a)+_0x23d2e6[_0x492a17(0x345)]);}else _0x131227(!![],_0x492a17(0x497));console['log'](''),_0x4ef0e9?console['log'](_0x492a17(0x361)):(console[_0x492a17(0x26a)](_0x492a17(0x4a2)),process[_0x492a17(0x31c)](0x1));}async function _0x452520(){const _0x1641fb=_0x396e5,_0x17ec30=_0x37c1e7[_0x1641fb(0x4b3)](_0x1641fb(0x3cb));!_0x2753d1[_0x1641fb(0x40b)](_0x17ec30)?(_0x2753d1[_0x1641fb(0x3a1)](_0x17ec30,JSON[_0x1641fb(0x3f2)]({'port':0x2124,'path':_0x1641fb(0x3af),'logLevel':_0x1641fb(0x28d),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x1641fb(0x26a)](_0x1641fb(0x444))):console['log'](_0x1641fb(0x3bf));const _0x348504=_0x37c1e7[_0x1641fb(0x4b3)](_0x1641fb(0x3af));!_0x2753d1[_0x1641fb(0x40b)](_0x348504)?(_0x2753d1[_0x1641fb(0x34b)](_0x348504,{'recursive':!![]}),console['log']('[okdb]\x20created\x20./okdb-data')):console[_0x1641fb(0x26a)](_0x1641fb(0x2ca)),console['log']('\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a');}async function _0x248c09(_0x3c5d81){const _0x56adc7=_0x396e5,_0x3f8792=_0x37c1e7['resolve'](_0x3c5d81['dbPath']);if(!_0x2753d1['existsSync'](_0x3f8792)){console[_0x56adc7(0x26a)](_0x56adc7(0x363)+_0x3f8792+_0x56adc7(0x2fc));return;}const _0x38eb2c=require$$0$2,_0x51e8eb=_0x38eb2c[_0x56adc7(0x458)]({'input':process[_0x56adc7(0x321)],'output':process[_0x56adc7(0x322)]}),_0x549c55=await new Promise(_0x412f8c=>_0x51e8eb[_0x56adc7(0x2a8)](_0x56adc7(0x2b9)+_0x3f8792+'?\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20',_0x412f8c));_0x51e8eb[_0x56adc7(0x324)](),console[_0x56adc7(0x26a)]('');if(_0x549c55['trim']()['toLowerCase']()!==_0x56adc7(0x2a7)){console[_0x56adc7(0x26a)](_0x56adc7(0x218));return;}_0x2753d1[_0x56adc7(0x4cf)](_0x3f8792,{'recursive':!![],'force':!![]}),console[_0x56adc7(0x26a)](_0x56adc7(0x3c0)+_0x3f8792+_0x56adc7(0x364));}async function _0x4cbc5a(_0x15d06e,_0x3bf361){const _0x4131a4=_0x396e5,_0xbce268=require$$5,_0x44f8f5=_0x37c1e7[_0x4131a4(0x4b3)](_0x3bf361[_0x4131a4(0x377)]);console[_0x4131a4(0x26a)](_0x4131a4(0x235)+_0x44f8f5+'…');const _0x359592=new _0xbce268(_0x44f8f5,_0x3bf361[_0x4131a4(0x2f3)]?{'encryptionKey':_0x3bf361[_0x4131a4(0x2f3)]}:{});await _0x359592[_0x4131a4(0x397)](),console[_0x4131a4(0x26a)](_0x4131a4(0x246)+_0x15d06e+'…');const {envs:_0x1e6d18}=await _0x359592['migrate'][_0x4131a4(0x283)](_0x15d06e);for(const _0x2adf72 of _0x1e6d18){const _0x24a2d4=_0x2adf72[_0x4131a4(0x482)]>0x0?_0x4131a4(0x297)+(_0x2adf72[_0x4131a4(0x482)]/0x400/0x400)[_0x4131a4(0x4d5)](0x2)+_0x4131a4(0x2e5)+(_0x2adf72[_0x4131a4(0x39b)]/0x400/0x400)[_0x4131a4(0x4d5)](0x2)+_0x4131a4(0x498):'';console['log']('\x20\x20✓\x20'+_0x2adf72['name']+_0x4131a4(0x492)+_0x2adf72[_0x4131a4(0x2be)]+_0x24a2d4);}await _0x359592[_0x4131a4(0x324)](),console[_0x4131a4(0x26a)](_0x4131a4(0x333));}async function _0x534d67(_0x1421c2,_0x1796bc,_0x17455a){const _0x110007=_0x396e5,_0x3f5cd7=require$$5,_0xbe34de=_0x37c1e7[_0x110007(0x4b3)](_0x1796bc[_0x110007(0x377)]),_0x224540=_0x17455a['env']??_0x110007(0x42d),_0x349ea8=_0x17455a[_0x110007(0x41f)]?_0x17455a[_0x110007(0x41f)][_0x110007(0x36d)](',')[_0x110007(0x404)](_0x1776ff=>_0x1776ff['trim']()):null;console['log']('[okdb]\x20opening\x20'+_0xbe34de+'…');const _0x4bd0dc=new _0x3f5cd7(_0xbe34de,_0x1796bc[_0x110007(0x2f3)]?{'encryptionKey':_0x1796bc['key']}:{});await _0x4bd0dc[_0x110007(0x397)](),console[_0x110007(0x26a)]('[okdb]\x20exporting\x20env\x20\x22'+_0x224540+_0x110007(0x499)+_0x1421c2+'…');const _0x341922=await _0x4bd0dc[_0x110007(0x45b)][_0x110007(0x446)](_0x1421c2,{'envName':_0x224540,'types':_0x349ea8,'includeChanges':!!_0x17455a['changes']});console['log'](_0x110007(0x27d)+_0x341922['types']+_0x110007(0x4c2)+_0x341922['records']+_0x110007(0x40a)+_0x341922[_0x110007(0x4cb)]);if(_0x17455a[_0x110007(0x422)]){const _0x16759d=_0x37c1e7[_0x110007(0x3e1)](_0x37c1e7['dirname'](_0x1421c2),_0x110007(0x422));process[_0x110007(0x322)][_0x110007(0x334)](_0x110007(0x3ed));const {count:_0x273c77,bytes:_0x11e75c}=await _0x4bd0dc[_0x110007(0x45b)][_0x110007(0x2e7)](_0x16759d);console['log'](_0x110007(0x47e)+_0x16759d+'\x20\x20('+_0x273c77+'\x20file'+(_0x273c77!==0x1?'s':'')+',\x20'+(_0x11e75c/0x400/0x400)[_0x110007(0x4d5)](0x2)+_0x110007(0x498));}await _0x4bd0dc['close'](),console[_0x110007(0x26a)]('[okdb]\x20export\x20complete');}async function _0x5437a2(_0x325773,_0x1089f8,_0xe7d95){const _0xccffbd=_0x396e5,_0x5e38cb=require$$5,_0x509363=_0x37c1e7[_0xccffbd(0x4b3)](_0x1089f8[_0xccffbd(0x377)]),_0x455eb2=_0xe7d95['env']??null,_0x5bc956=_0xe7d95[_0xccffbd(0x41f)]?_0xe7d95['types']['split'](',')[_0xccffbd(0x404)](_0x5eb23b=>_0x5eb23b[_0xccffbd(0x2b2)]()):null,_0x12c80d=!!_0xe7d95[_0xccffbd(0x4a0)];console[_0xccffbd(0x26a)](_0xccffbd(0x235)+_0x509363+'…');const _0x8c66bb=new _0x5e38cb(_0x509363,_0x1089f8[_0xccffbd(0x2f3)]?{'encryptionKey':_0x1089f8['key']}:{});await _0x8c66bb[_0xccffbd(0x397)](),console[_0xccffbd(0x26a)](_0xccffbd(0x368)+_0x325773+'…');const _0x5c30ab=await _0x8c66bb['migrate']['importFromFile'](_0x325773,{'envName':_0x455eb2,'types':_0x5bc956,'dropExisting':_0x12c80d,'includeChanges':!!_0xe7d95[_0xccffbd(0x4cb)],'onProgress':({type:_0x27299f,count:_0x523e8a})=>{const _0x10fd95=_0xccffbd;process['stdout']['write'](_0x10fd95(0x3fc)+_0x27299f+':\x20'+_0x523e8a+'\x20records…');}});process[_0xccffbd(0x322)][_0xccffbd(0x334)]('\x0a'),console['log'](_0xccffbd(0x460)+_0x5c30ab[_0xccffbd(0x41f)]+_0xccffbd(0x4c2)+_0x5c30ab['records']+'\x20\x20changes='+_0x5c30ab[_0xccffbd(0x4cb)]);if(_0xe7d95[_0xccffbd(0x422)]){const _0x12c1cc=_0x37c1e7[_0xccffbd(0x3e1)](_0x37c1e7[_0xccffbd(0x206)](_0x325773),_0xccffbd(0x422));if(_0x2753d1[_0xccffbd(0x40b)](_0x12c1cc)){const {imported:_0x13da9a,skipped:_0x10bb52}=await _0x8c66bb[_0xccffbd(0x45b)][_0xccffbd(0x4c1)](_0x12c1cc);console[_0xccffbd(0x26a)](_0xccffbd(0x409)+_0x13da9a+_0xccffbd(0x35c)+_0x10bb52);}}await _0x8c66bb[_0xccffbd(0x324)](),console['log']('[okdb]\x20import\x20complete');}async function _0x8ccbc1(_0x457c4b,_0x158e8d){const _0x4067b1=_0x396e5;_0x158e8d[_0x4067b1(0x4bb)]&&!_0x158e8d[_0x4067b1(0x49e)]&&(console['error'](_0x4067b1(0x494)),process[_0x4067b1(0x31c)](0x1));const _0x59268b=_0x158e8d[_0x4067b1(0x3ab)]?_0x158e8d[_0x4067b1(0x3ab)][_0x4067b1(0x36d)](',')[_0x4067b1(0x404)](_0x20d450=>_0x20d450[_0x4067b1(0x2b2)]())[_0x4067b1(0x2f9)](Boolean):[];let _0x15161={};if(_0x158e8d[_0x4067b1(0x309)])try{_0x15161=JSON[_0x4067b1(0x279)](_0x158e8d[_0x4067b1(0x309)]);if(typeof _0x15161!==_0x4067b1(0x231)||Array[_0x4067b1(0x261)](_0x15161)||_0x15161===null)throw new Error();}catch{console['error']('[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object'),process[_0x4067b1(0x31c)](0x1);}const _0x311f67=require$$5,{randomToken:_0x2c7144,hashToken:_0x27636c,hashPassword:_0x26ff7b}=requireOkdbAuthTokens(),_0x56d13c=require$$0,_0x937296=_0x37c1e7[_0x4067b1(0x4b3)](_0x457c4b['dbPath']),_0x598495=new _0x311f67(_0x937296,_0x457c4b[_0x4067b1(0x2f3)]?{'encryptionKey':_0x457c4b['key']}:{});await _0x598495[_0x4067b1(0x397)]();try{await _0x598495['auth']['_ensureTokensType']();if(_0x158e8d[_0x4067b1(0x49e)]){const _0x21782d=await _0x598495[_0x4067b1(0x298)]['_lookupByName'](_0x158e8d[_0x4067b1(0x49e)]);_0x21782d&&(console[_0x4067b1(0x1f3)](_0x4067b1(0x382)+_0x158e8d[_0x4067b1(0x49e)]+_0x4067b1(0x47c)),process[_0x4067b1(0x31c)](0x1));}const _0x5a5a3f=_0x2c7144(0x20),_0x200f52=_0x27636c(_0x5a5a3f),_0x27c07e=_0x158e8d[_0x4067b1(0x4bb)]?await _0x26ff7b(_0x158e8d['password']):null,_0x280fb8=_0x56d13c[_0x4067b1(0x39e)](),_0x1798b4={'tokenHash':_0x200f52,'name':_0x158e8d['name']||null,'passwordHash':_0x27c07e,'label':_0x158e8d[_0x4067b1(0x430)]||null,'permissions':_0x59268b,'grants':_0x15161,'createdAt':Date[_0x4067b1(0x416)](),'lastUsedAt':null},_0x3d1af2=_0x158e8d[_0x4067b1(0x289)]?{'ttl':Number(_0x158e8d['ttl'])}:undefined;await _0x598495[_0x4067b1(0x487)][_0x4067b1(0x3fa)](_0x4067b1(0x2aa),_0x280fb8,_0x1798b4,_0x3d1af2),console['log'](_0x4067b1(0x1f6)),console[_0x4067b1(0x26a)](_0x4067b1(0x3df)+_0x280fb8),console['log'](_0x4067b1(0x443)+(_0x158e8d[_0x4067b1(0x49e)]||_0x4067b1(0x32e))),console[_0x4067b1(0x26a)](_0x4067b1(0x43f)+(_0x158e8d[_0x4067b1(0x430)]||'(unset)')),console[_0x4067b1(0x26a)](_0x4067b1(0x3bd)+(_0x59268b[_0x4067b1(0x3e1)](',\x20')||_0x4067b1(0x40d))),console['log'](_0x4067b1(0x329)),console[_0x4067b1(0x26a)]('\x20\x20\x20\x20'+_0x5a5a3f+'\x0a');}finally{await _0x598495[_0x4067b1(0x324)]();}}async function _0x315e6b(_0x1da4f2){const _0x34e577=_0x396e5,_0x52c0a9=require$$5,_0x53543d=_0x37c1e7[_0x34e577(0x4b3)](_0x1da4f2[_0x34e577(0x377)]),_0x5f3e30=new _0x52c0a9(_0x53543d,_0x1da4f2[_0x34e577(0x2f3)]?{'encryptionKey':_0x1da4f2[_0x34e577(0x2f3)]}:{});await _0x5f3e30[_0x34e577(0x397)]();try{const _0x5e8c12=_0x5f3e30[_0x34e577(0x487)];if(!_0x5e8c12||!_0x5e8c12[_0x34e577(0x349)]('~tokens')){console[_0x34e577(0x26a)](_0x34e577(0x3c8));return;}const _0x39bf0b=[];for(const {key:_0x3fa2f4,value:_0xf1e80f}of _0x5e8c12[_0x34e577(0x3b8)](_0x34e577(0x2aa))){_0x39bf0b[_0x34e577(0x29f)]({'id':_0x3fa2f4,'name':_0xf1e80f[_0x34e577(0x49e)]||_0x34e577(0x32e),'label':_0xf1e80f[_0x34e577(0x430)]||_0x34e577(0x32e),'permissions':Array[_0x34e577(0x261)](_0xf1e80f[_0x34e577(0x3ab)])?_0xf1e80f[_0x34e577(0x3ab)][_0x34e577(0x3e1)](','):'','created':_0xf1e80f['createdAt']?new Date(_0xf1e80f['createdAt'])[_0x34e577(0x3fb)]()[_0x34e577(0x48e)](0x0,0xa):''});}if(_0x39bf0b['length']===0x0){console[_0x34e577(0x26a)]('No\x20tokens.');return;}const _0x5c725a=!process[_0x34e577(0x322)][_0x34e577(0x2c7)]||process[_0x34e577(0x322)][_0x34e577(0x2c7)]>=0x64,_0x2eba4d=_0x5c725a?0x24:0xa,_0x33d926=['ID'[_0x34e577(0x2c9)](_0x2eba4d),_0x34e577(0x4b1)[_0x34e577(0x2c9)](0x10),_0x34e577(0x355)[_0x34e577(0x2c9)](0x14),_0x34e577(0x31d)['padEnd'](0x14),_0x34e577(0x28a)]['join']('\x20\x20');console[_0x34e577(0x26a)]('\x0a'+_0x33d926),console['log']('-'[_0x34e577(0x3f6)](_0x33d926['length']));for(const _0x3459ba of _0x39bf0b){const _0x1dd847=_0x5c725a?_0x3459ba['id']:_0x3459ba['id'][_0x34e577(0x48e)](0x0,0x8)+'…';console['log']([_0x1dd847['padEnd'](_0x2eba4d),_0x3459ba['name'][_0x34e577(0x48e)](0x0,0x10)[_0x34e577(0x2c9)](0x10),_0x3459ba[_0x34e577(0x430)][_0x34e577(0x48e)](0x0,0x14)[_0x34e577(0x2c9)](0x14),_0x3459ba['permissions'][_0x34e577(0x48e)](0x0,0x14)[_0x34e577(0x2c9)](0x14),_0x3459ba[_0x34e577(0x4d3)]][_0x34e577(0x3e1)]('\x20\x20'));}console['log']('');}finally{await _0x5f3e30[_0x34e577(0x324)]();}}async function _0x1c61bc(_0x506b66,_0x307aa2){const _0x466083=_0x396e5;!_0x506b66&&(console[_0x466083(0x1f3)]('[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument'),process[_0x466083(0x31c)](0x1));const _0x35644d=require$$5,_0xfcd079=_0x37c1e7[_0x466083(0x4b3)](_0x307aa2[_0x466083(0x377)]),_0x249906=new _0x35644d(_0xfcd079,_0x307aa2[_0x466083(0x2f3)]?{'encryptionKey':_0x307aa2['key']}:{});await _0x249906[_0x466083(0x397)]();try{const _0x2d3aea=_0x249906[_0x466083(0x487)];(!_0x2d3aea||!_0x2d3aea[_0x466083(0x349)](_0x466083(0x2aa)))&&(console[_0x466083(0x1f3)](_0x466083(0x451)+_0x506b66+'\x22'),process[_0x466083(0x31c)](0x1));let _0x35cb97=null,_0xda3e51=null;const _0x5ed653=_0x2d3aea['get']('~tokens',_0x506b66);if(_0x5ed653)_0x35cb97=_0x506b66,_0xda3e51=_0x5ed653;else{const _0x2be13c=[];for(const {key:_0x18e82b,value:_0x2cbf98}of _0x2d3aea[_0x466083(0x3b8)](_0x466083(0x2aa))){if(_0x18e82b[_0x466083(0x22f)](_0x506b66))_0x2be13c[_0x466083(0x29f)]({'key':_0x18e82b,'value':_0x2cbf98});}_0x2be13c[_0x466083(0x21f)]===0x0&&(console['error'](_0x466083(0x451)+_0x506b66+'\x22'),process[_0x466083(0x31c)](0x1));if(_0x2be13c[_0x466083(0x21f)]>0x1){console[_0x466083(0x1f3)](_0x466083(0x241)+_0x506b66+_0x466083(0x28b)+_0x2be13c['length']+_0x466083(0x392));for(const _0x185d92 of _0x2be13c){console['error']('\x20\x20'+_0x185d92[_0x466083(0x2f3)]+_0x466083(0x2de)+(_0x185d92[_0x466083(0x37a)][_0x466083(0x49e)]||'(unset)')+')');}process[_0x466083(0x31c)](0x1);}_0x35cb97=_0x2be13c[0x0][_0x466083(0x2f3)],_0xda3e51=_0x2be13c[0x0][_0x466083(0x37a)];}await _0x2d3aea[_0x466083(0x4d7)](_0x466083(0x2aa),_0x35cb97),console[_0x466083(0x26a)]('\x20\x20✓\x20Revoked\x20token\x20'+_0x35cb97+_0x466083(0x2de)+(_0xda3e51[_0x466083(0x49e)]||'(unset)')+_0x466083(0x476)+(_0xda3e51[_0x466083(0x430)]||_0x466083(0x32e))+')');}finally{await _0x249906['close']();}}function _0x120351(_0x16290e,_0x6f8f4f){const _0x38c1af=_0x396e5;if(!_0x16290e[_0x38c1af(0x461)])return _0x38c1af(0x1f5);const _0x4bb303=_0x16290e[_0x38c1af(0x274)];if(!_0x4bb303)return _0x38c1af(0x4ab);if(_0x6f8f4f>_0x4bb303)return'expired';return'active';}function _0x514803(_0x285cfd){const _0x27c1b1=_0x396e5;if(!_0x285cfd||typeof _0x285cfd!==_0x27c1b1(0x231))return'';const _0x38ca07=Object[_0x27c1b1(0x32a)](_0x285cfd)[_0x27c1b1(0x2f9)](([,_0x5e7410])=>_0x5e7410)[_0x27c1b1(0x404)](([_0x2798d5])=>_0x2798d5);if(_0x38ca07[_0x27c1b1(0x21f)]===0x0)return _0x27c1b1(0x40d);if(_0x38ca07['length']<=0x3)return _0x38ca07['join']('\x20');return _0x38ca07[_0x27c1b1(0x48e)](0x0,0x3)[_0x27c1b1(0x3e1)]('\x20')+('\x20+'+(_0x38ca07[_0x27c1b1(0x21f)]-0x3));}async function _0x253713(_0x4bacde){const _0x20be0c=_0x396e5,_0x366ffb=require$$5,_0x1cdc9b=requireOkdbLicenseCodec(),{_C:_0x3baee7}=requireOkdbLicense(),_0x1343d7=_0x37c1e7[_0x20be0c(0x4b3)](_0x4bacde[_0x20be0c(0x377)]),_0x51fa47=new _0x366ffb(_0x1343d7,_0x4bacde[_0x20be0c(0x2f3)]?{'encryptionKey':_0x4bacde[_0x20be0c(0x2f3)]}:{});await _0x51fa47['open']();try{const _0x1d5c41=_0x51fa47['_systemEnv'],_0x48417=_0x1d5c41?.['db']?.[_0x20be0c(0x375)]?.(_0x20be0c(0x431))??0x0,_0x26680b=[..._0x51fa47['_envs'][_0x20be0c(0x4dc)]()][_0x20be0c(0x2f9)](_0x34aa62=>!_0x34aa62[_0x20be0c(0x22f)]('~'))[_0x20be0c(0x21f)],_0x5c396c=_0x51fa47[_0x20be0c(0x4c9)]?.[_0x20be0c(0x376)];if(_0x5c396c){const _0x3742a1=_0x5c396c[_0x20be0c(0x421)]===!![],_0x1e4d75=_0x3742a1?_0x20be0c(0x252):_0x51fa47[_0x20be0c(0x4c9)][_0x20be0c(0x4ab)]?.[_0x20be0c(0x356)]||_0x20be0c(0x483);console[_0x20be0c(0x26a)](''),console[_0x20be0c(0x26a)]('\x20\x20Tier:\x20\x20\x20\x20'+_0x1e4d75);const _0x7f3208=_0x5c396c[_0x20be0c(0x440)]||{};if(_0x7f3208[_0x20be0c(0x24f)]){const _0x369d58=Math[_0x20be0c(0x1f8)](_0x48417/_0x7f3208[_0x20be0c(0x24f)]*0x64);console[_0x20be0c(0x26a)](_0x20be0c(0x33e)+_0x48417[_0x20be0c(0x39a)]()+_0x20be0c(0x3b0)+_0x7f3208[_0x20be0c(0x24f)][_0x20be0c(0x39a)]()+_0x20be0c(0x297)+_0x369d58+'%)');}else console[_0x20be0c(0x26a)](_0x20be0c(0x33e)+_0x48417[_0x20be0c(0x39a)]());_0x7f3208[_0x20be0c(0x21e)]?console[_0x20be0c(0x26a)](_0x20be0c(0x310)+_0x26680b+_0x20be0c(0x3b0)+_0x7f3208[_0x20be0c(0x21e)]):console[_0x20be0c(0x26a)](_0x20be0c(0x310)+_0x26680b),_0x3baee7?.[_0x20be0c(0x2c6)]&&console[_0x20be0c(0x26a)]('\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20'+_0x3baee7[_0x20be0c(0x2c6)]+_0x20be0c(0x4af));}if(!_0x1d5c41||!_0x1d5c41[_0x20be0c(0x349)]('~licenses')){console[_0x20be0c(0x26a)](''),console[_0x20be0c(0x26a)](_0x20be0c(0x303)),console['log']('');return;}const _0x34fda6=[],_0x356b56=Date[_0x20be0c(0x416)](),_0x3cabe0=_0x51fa47['id'],_0x1b1db9=_0x20be0c(0x3fe);for(const {key:_0x368bc4,value:_0x19eb41}of _0x1d5c41['getRange'](_0x20be0c(0x4a9))){const _0x5c52e5=_0x19eb41['_licenseHash']?Buffer[_0x20be0c(0x240)](_0x19eb41[_0x20be0c(0x33f)],'hex'):Buffer['alloc'](0x8);let _0x196f50='';try{_0x196f50=_0x1cdc9b[_0x20be0c(0x389)](_0x3cabe0,_0x5c52e5,_0x1b1db9)[_0x20be0c(0x4d8)];}catch{}_0x34fda6[_0x20be0c(0x29f)]({'id':_0x368bc4,'licensee':_0x19eb41[_0x20be0c(0x356)]||'','expires':_0x19eb41[_0x20be0c(0x274)]?new Date(_0x19eb41[_0x20be0c(0x274)])[_0x20be0c(0x3fb)]()['slice'](0x0,0xa):'','features':_0x514803(_0x19eb41['features']),'pin':_0x196f50,'status':_0x120351(_0x19eb41,_0x356b56)});}if(_0x34fda6[_0x20be0c(0x21f)]===0x0){console[_0x20be0c(0x26a)](''),console[_0x20be0c(0x26a)](_0x20be0c(0x303)),console['log']('');return;}const _0x47cef7=['\x20\x20'+'ID'['padEnd'](0xe),_0x20be0c(0x4e4)[_0x20be0c(0x2c9)](0xe),_0x20be0c(0x233)['padEnd'](0xc),_0x20be0c(0x441)[_0x20be0c(0x2c9)](0x1e),_0x20be0c(0x269)[_0x20be0c(0x2c9)](0xa),_0x20be0c(0x30f)][_0x20be0c(0x3e1)]('\x20');console[_0x20be0c(0x26a)]('\x0a'+_0x47cef7);for(const _0x59c732 of _0x34fda6){const _0x2bf98c=_0x59c732['id'][_0x20be0c(0x48e)](0x0,0x8)+'…';console[_0x20be0c(0x26a)](['\x20\x20'+_0x2bf98c[_0x20be0c(0x2c9)](0xe),_0x59c732[_0x20be0c(0x356)][_0x20be0c(0x48e)](0x0,0xe)[_0x20be0c(0x2c9)](0xe),_0x59c732[_0x20be0c(0x39c)][_0x20be0c(0x2c9)](0xc),_0x59c732[_0x20be0c(0x3ca)][_0x20be0c(0x48e)](0x0,0x1e)[_0x20be0c(0x2c9)](0x1e),_0x59c732['pin'][_0x20be0c(0x2c9)](0xa),_0x59c732[_0x20be0c(0x1ed)]][_0x20be0c(0x3e1)]('\x20'));}console['log']('');}finally{await _0x51fa47[_0x20be0c(0x324)]();}}async function _0x5ecd25(_0x33d63b,_0x69d43c){const _0x44aaad=_0x396e5,_0x21d5e1=require$$5,_0x5daef7=requireOkdbLicenseCodec();let _0x15e3e5=_0x33d63b;(_0x5daef7[_0x44aaad(0x3d9)](_0x33d63b)===_0x44aaad(0x37c)||_0x2753d1['existsSync'](_0x33d63b)&&_0x2753d1[_0x44aaad(0x4ae)](_0x33d63b)['isFile']())&&(_0x15e3e5=_0x2753d1[_0x44aaad(0x2ce)](_0x33d63b,'utf8')[_0x44aaad(0x2b2)]());const _0x328ea6=_0x37c1e7[_0x44aaad(0x4b3)](_0x69d43c['dbPath']),_0x583fa6=new _0x21d5e1(_0x328ea6,_0x69d43c[_0x44aaad(0x2f3)]?{'encryptionKey':_0x69d43c[_0x44aaad(0x2f3)]}:{});await _0x583fa6[_0x44aaad(0x397)]();try{!_0x583fa6['_license']&&(console[_0x44aaad(0x1f3)](_0x44aaad(0x438)),process['exit'](0x1));let _0x2c6e21;try{_0x2c6e21=await _0x583fa6[_0x44aaad(0x4c9)]['addLicense'](_0x15e3e5);}catch(_0x1d7658){console[_0x44aaad(0x1f3)]('[okdb]\x20error:\x20'+_0x1d7658[_0x44aaad(0x345)]),process[_0x44aaad(0x31c)](0x1);}const _0x45c1ff=_0x583fa6[_0x44aaad(0x4c9)]['getPins'](),_0x36bc7c=_0x45c1ff['find'](_0x5bd897=>_0x5bd897['licenseId']===_0x2c6e21['id'])?.[_0x44aaad(0x4d8)]||'',_0x4200d1=Object['entries'](_0x2c6e21['features']||{})[_0x44aaad(0x2f9)](([,_0x39a007])=>_0x39a007)[_0x44aaad(0x404)](([_0x4a0314])=>_0x4a0314),_0x563e4d=_0x2c6e21[_0x44aaad(0x440)]||{},_0xc35581=[_0x563e4d[_0x44aaad(0x21e)]?_0x44aaad(0x263)+_0x563e4d[_0x44aaad(0x21e)]:null,_0x563e4d[_0x44aaad(0x3c4)]?'types/env='+_0x563e4d['typesPerEnv']:null,_0x563e4d[_0x44aaad(0x331)]?_0x44aaad(0x412)+_0x563e4d[_0x44aaad(0x331)]:null,_0x563e4d[_0x44aaad(0x24f)]?_0x44aaad(0x341)+_0x563e4d[_0x44aaad(0x24f)][_0x44aaad(0x39a)]():null]['filter'](Boolean)[_0x44aaad(0x3e1)]('\x20\x20'),_0x364b6=_0x2c6e21['licenseType']===_0x5daef7[_0x44aaad(0x3a2)];console[_0x44aaad(0x26a)](_0x44aaad(0x251)),console[_0x44aaad(0x26a)](_0x44aaad(0x3cc)+_0x2c6e21['id']),console[_0x44aaad(0x26a)](_0x44aaad(0x457)+_0x2c6e21[_0x44aaad(0x356)]),console[_0x44aaad(0x26a)](_0x44aaad(0x4c4)+new Date(_0x2c6e21[_0x44aaad(0x274)])[_0x44aaad(0x3fb)]()['slice'](0x0,0xa)),console[_0x44aaad(0x26a)](_0x44aaad(0x1fc)+(_0x4200d1[_0x44aaad(0x3e1)](',\x20')||_0x44aaad(0x40d)));if(_0xc35581)console[_0x44aaad(0x26a)](_0x44aaad(0x2b3)+_0xc35581);_0x364b6?(console[_0x44aaad(0x26a)](_0x44aaad(0x31a)),console['log']('')):(console[_0x44aaad(0x26a)](_0x44aaad(0x2cf)+_0x36bc7c),console[_0x44aaad(0x26a)]('\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation'),console[_0x44aaad(0x26a)](''),console[_0x44aaad(0x26a)](_0x44aaad(0x394)),console[_0x44aaad(0x26a)](_0x44aaad(0x306)+_0x36bc7c+')\x20to\x20your\x20license\x20vendor.'),console['log'](_0x44aaad(0x1eb)),console[_0x44aaad(0x26a)](_0x44aaad(0x314)),console[_0x44aaad(0x26a)](''));}finally{await _0x583fa6['close']();}}async function _0x4f73f9(_0xca6800,_0x594c32){const _0x1f71b8=_0x396e5,_0x187a0f=require$$5,_0x222908=_0x37c1e7[_0x1f71b8(0x4b3)](_0x594c32['dbPath']),_0x3e75be=new _0x187a0f(_0x222908,_0x594c32[_0x1f71b8(0x2f3)]?{'encryptionKey':_0x594c32[_0x1f71b8(0x2f3)]}:{});await _0x3e75be[_0x1f71b8(0x397)]();try{!_0x3e75be[_0x1f71b8(0x4c9)]&&(console[_0x1f71b8(0x1f3)](_0x1f71b8(0x438)),process[_0x1f71b8(0x31c)](0x1));let _0x20e726;try{_0x20e726=await _0x3e75be[_0x1f71b8(0x4c9)][_0x1f71b8(0x2cb)](_0xca6800[_0x1f71b8(0x2b2)]());}catch(_0x279db3){console['error'](_0x1f71b8(0x22c)+_0x279db3['message']),console[_0x1f71b8(0x1f3)](''),console[_0x1f71b8(0x1f3)](_0x1f71b8(0x3cd)),console[_0x1f71b8(0x1f3)](_0x1f71b8(0x3c7)),console[_0x1f71b8(0x1f3)](_0x1f71b8(0x326)),console[_0x1f71b8(0x1f3)](_0x1f71b8(0x282)),console[_0x1f71b8(0x1f3)](''),process[_0x1f71b8(0x31c)](0x1);}console[_0x1f71b8(0x26a)](_0x1f71b8(0x41a)),console[_0x1f71b8(0x26a)](_0x1f71b8(0x3cc)+_0x20e726['id']),console[_0x1f71b8(0x26a)](_0x1f71b8(0x457)+_0x20e726['licensee']),console[_0x1f71b8(0x26a)]('\x20\x20\x20\x20expires:\x20\x20\x20'+new Date(_0x20e726[_0x1f71b8(0x274)])[_0x1f71b8(0x3fb)]()['slice'](0x0,0xa)),console['log'](_0x1f71b8(0x2d0)),console[_0x1f71b8(0x26a)]('');}finally{await _0x3e75be[_0x1f71b8(0x324)]();}}async function _0x399deb(_0x594e4c,_0x528ba8){const _0x3d5742=_0x396e5;!_0x594e4c&&(console['error'](_0x3d5742(0x24b)),process[_0x3d5742(0x31c)](0x1));const _0x45a185=require$$5,_0x146b54=requireOkdbLicenseCodec(),_0x16eeaa=_0x37c1e7[_0x3d5742(0x4b3)](_0x528ba8[_0x3d5742(0x377)]),_0x392435=new _0x45a185(_0x16eeaa,_0x528ba8['key']?{'encryptionKey':_0x528ba8['key']}:{});await _0x392435[_0x3d5742(0x397)]();try{const _0x1161f6=_0x392435['_systemEnv'];(!_0x1161f6||!_0x1161f6[_0x3d5742(0x349)](_0x3d5742(0x4a9)))&&(console[_0x3d5742(0x1f3)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x594e4c+'\x22'),process[_0x3d5742(0x31c)](0x1));let _0x1e4a14=null,_0x1ba800=null;const _0x2571f1=_0x1161f6['get']('~licenses',_0x594e4c);if(_0x2571f1)_0x1e4a14=_0x594e4c,_0x1ba800=_0x2571f1;else{const _0x557db5=[];for(const {key:_0x3c7341,value:_0x44c640}of _0x1161f6[_0x3d5742(0x3b8)](_0x3d5742(0x4a9))){if(_0x3c7341[_0x3d5742(0x22f)](_0x594e4c))_0x557db5[_0x3d5742(0x29f)]({'key':_0x3c7341,'value':_0x44c640});}_0x557db5[_0x3d5742(0x21f)]===0x0&&(console[_0x3d5742(0x1f3)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x594e4c+'\x22'),process['exit'](0x1)),_0x557db5[_0x3d5742(0x21f)]>0x1&&(console['error'](_0x3d5742(0x241)+_0x594e4c+_0x3d5742(0x28b)+_0x557db5['length']+_0x3d5742(0x29c)),process[_0x3d5742(0x31c)](0x1)),_0x1e4a14=_0x557db5[0x0][_0x3d5742(0x2f3)],_0x1ba800=_0x557db5[0x0][_0x3d5742(0x37a)];}const _0x31fb50=Date[_0x3d5742(0x416)](),_0x3d2c7f=_0x120351(_0x1ba800,_0x31fb50),_0x6bc953=_0x392435['id'],_0x38c741=_0x3d5742(0x3fe);let _0x4f5e51='';try{const _0x4da86a=Buffer[_0x3d5742(0x240)](_0x1ba800[_0x3d5742(0x33f)],_0x3d5742(0x1f7));_0x4f5e51=_0x146b54[_0x3d5742(0x389)](_0x6bc953,_0x4da86a,_0x38c741)[_0x3d5742(0x4d8)];}catch{}const _0x26f9b1=_0x1ba800['features']?Object[_0x3d5742(0x32a)](_0x1ba800[_0x3d5742(0x3ca)])[_0x3d5742(0x2f9)](([,_0x266d90])=>_0x266d90)[_0x3d5742(0x404)](([_0x5ce741])=>_0x5ce741):[],_0x4c4310=_0x1ba800[_0x3d5742(0x440)]||{},_0x15ffe0=_0x1161f6?.['db']?.[_0x3d5742(0x375)]?.(_0x3d5742(0x431))??0x0,_0x1cd0f3=[..._0x392435['_envs'][_0x3d5742(0x4dc)]()][_0x3d5742(0x2f9)](_0x3d5881=>!_0x3d5881['startsWith']('~'))[_0x3d5742(0x21f)];console[_0x3d5742(0x26a)](_0x3d5742(0x3ad)),console[_0x3d5742(0x26a)](_0x3d5742(0x3cc)+_0x1e4a14),console[_0x3d5742(0x26a)](_0x3d5742(0x457)+(_0x1ba800[_0x3d5742(0x356)]||'')),console[_0x3d5742(0x26a)](_0x3d5742(0x4c4)+(_0x1ba800[_0x3d5742(0x274)]?new Date(_0x1ba800[_0x3d5742(0x274)])['toISOString']()['slice'](0x0,0xa):'')),console[_0x3d5742(0x26a)](_0x3d5742(0x1fc)+(_0x26f9b1[_0x3d5742(0x3e1)](',\x20')||_0x3d5742(0x40d))),console[_0x3d5742(0x26a)](_0x3d5742(0x2cf)+_0x4f5e51),console[_0x3d5742(0x26a)](_0x3d5742(0x427)+_0x3d2c7f),console[_0x3d5742(0x26a)](_0x3d5742(0x347)+new Date(_0x1ba800[_0x3d5742(0x336)])['toISOString']());if(_0x3d2c7f==='active'){console[_0x3d5742(0x26a)](''),console[_0x3d5742(0x26a)]('\x20\x20Usage:');if(_0x4c4310['maxWrites']){const _0x2bbb8b=Math['round'](_0x15ffe0/_0x4c4310['maxWrites']*0x64);console['log'](_0x3d5742(0x36b)+_0x15ffe0[_0x3d5742(0x39a)]()+_0x3d5742(0x3b0)+_0x4c4310['maxWrites'][_0x3d5742(0x39a)]()+_0x3d5742(0x297)+_0x2bbb8b+'%)');}else console[_0x3d5742(0x26a)](_0x3d5742(0x36b)+_0x15ffe0[_0x3d5742(0x39a)]()+_0x3d5742(0x3d1));_0x4c4310[_0x3d5742(0x21e)]?console['log'](_0x3d5742(0x242)+_0x1cd0f3+_0x3d5742(0x3b0)+_0x4c4310['envs']):console[_0x3d5742(0x26a)](_0x3d5742(0x242)+_0x1cd0f3+_0x3d5742(0x3d1));}console[_0x3d5742(0x26a)]('');}finally{await _0x392435['close']();}}async function _0x176d8f(_0xfc25d0,_0x3eca5e){const _0x2314cb=_0x396e5;!_0xfc25d0&&(console['error'](_0x2314cb(0x49c)),process[_0x2314cb(0x31c)](0x1));const _0x4f1b94=require$$5,_0x2f5069=_0x37c1e7[_0x2314cb(0x4b3)](_0x3eca5e[_0x2314cb(0x377)]),_0x359809=new _0x4f1b94(_0x2f5069,_0x3eca5e[_0x2314cb(0x2f3)]?{'encryptionKey':_0x3eca5e[_0x2314cb(0x2f3)]}:{});await _0x359809[_0x2314cb(0x397)]();try{const _0x426a18=_0x359809['_systemEnv'];(!_0x426a18||!_0x426a18[_0x2314cb(0x349)]('~licenses'))&&(console['error'](_0x2314cb(0x3dc)+_0xfc25d0+'\x22'),process[_0x2314cb(0x31c)](0x1));let _0x83fc43=null,_0x321831=null;const _0x5adee1=_0x426a18[_0x2314cb(0x375)]('~licenses',_0xfc25d0);if(_0x5adee1)_0x83fc43=_0xfc25d0,_0x321831=_0x5adee1;else{const _0x14df37=[];for(const {key:_0x579480,value:_0xac07e0}of _0x426a18[_0x2314cb(0x3b8)]('~licenses')){if(_0x579480[_0x2314cb(0x22f)](_0xfc25d0))_0x14df37[_0x2314cb(0x29f)]({'key':_0x579480,'value':_0xac07e0});}_0x14df37[_0x2314cb(0x21f)]===0x0&&(console['error']('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0xfc25d0+'\x22'),process[_0x2314cb(0x31c)](0x1)),_0x14df37[_0x2314cb(0x21f)]>0x1&&(console[_0x2314cb(0x1f3)]('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0xfc25d0+_0x2314cb(0x28b)+_0x14df37[_0x2314cb(0x21f)]+_0x2314cb(0x29c)),process[_0x2314cb(0x31c)](0x1)),_0x83fc43=_0x14df37[0x0][_0x2314cb(0x2f3)],_0x321831=_0x14df37[0x0][_0x2314cb(0x37a)];}await _0x426a18[_0x2314cb(0x4d7)](_0x2314cb(0x4a9),_0x83fc43),console['log'](_0x2314cb(0x3a5)+_0x83fc43+_0x2314cb(0x2a5)+(_0x321831['licensee']||_0x2314cb(0x32e))+')');}finally{await _0x359809[_0x2314cb(0x324)]();}}async function _0x234356(_0x1115bf,_0x5dbd64,_0x5be5b0){const _0x98a4bb=_0x396e5;!_0x1115bf&&(console[_0x98a4bb(0x1f3)](_0x98a4bb(0x48c)),process[_0x98a4bb(0x31c)](0x1));!_0x5be5b0[_0x98a4bb(0x496)]&&!(_0x5be5b0[_0x98a4bb(0x47f)]&&_0x5be5b0['password'])&&(console[_0x98a4bb(0x1f3)](_0x98a4bb(0x29a)),process['exit'](0x1));const _0xcb32a0=_0x5be5b0['selfAddress']||_0x5dbd64[_0x98a4bb(0x266)]?.[_0x98a4bb(0x478)];!_0xcb32a0&&(console[_0x98a4bb(0x1f3)]('[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a'+_0x98a4bb(0x370)+_0x98a4bb(0x25c)),process['exit'](0x1));const _0x3db0d4=require$$5,_0x4d0fb2=new _0x3db0d4(_0x5dbd64[_0x98a4bb(0x377)],{'sync':{'address':_0xcb32a0,'auto_reconcile':![]}});await _0x4d0fb2[_0x98a4bb(0x397)]();try{const _0x4d71cc=_0x4d0fb2[_0x98a4bb(0x487)];if(_0x4d71cc&&_0x4d71cc['hasType'](_0x98a4bb(0x2aa))){let _0x22782f=![];for(const _0x43de02 of _0x4d71cc[_0x98a4bb(0x3b8)](_0x98a4bb(0x2aa))){_0x22782f=!![];break;}_0x22782f&&console['log'](_0x98a4bb(0x4ad)+_0x98a4bb(0x44c));}console['log'](_0x98a4bb(0x42e)+_0x1115bf+'…'),await _0x4d0fb2[_0x98a4bb(0x266)]['join'](_0x1115bf[_0x98a4bb(0x46c)](/\/+$/,''),{'token':_0x5be5b0['token'],'username':_0x5be5b0[_0x98a4bb(0x47f)],'password':_0x5be5b0['password']}),console['log']('\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated'),console['log'](_0x98a4bb(0x338));}finally{await _0x4d0fb2['close']();}}async function _0xd588bf(){const _0x194c07=_0x396e5,_0x50e443=Date['now'](),_0x9dd002=_0x38668f(process[_0x194c07(0x4ba)]),_0x52a05c=_0x2d4682(_0x9dd002),_0x2d1da5=_0x37c1e7['resolve'](_0x52a05c[_0x194c07(0x377)]);!_0x52a05c[_0x194c07(0x3f7)]&&!process[_0x194c07(0x321)][_0x194c07(0x200)]&&(_0x52a05c[_0x194c07(0x3f7)]=!![]);const _0x28aee2=require$$5,{start:_0x1259ca,colorLog:_0x53c63e}=requireOkdbShell(),_0x4680af={..._0x52a05c[_0x194c07(0x2f3)]?{'encryptionKey':_0x52a05c[_0x194c07(0x2f3)]}:{},..._0x52a05c['noAdmin']?{'admin':![]}:_0x269c11(_0x52a05c[_0x194c07(0x304)])?{'admin':_0x52a05c[_0x194c07(0x304)]}:{},..._0x269c11(_0x52a05c['api'])?{'api':_0x52a05c[_0x194c07(0x43a)]}:{},..._0x269c11(_0x52a05c[_0x194c07(0x298)])?{'auth':_0x52a05c[_0x194c07(0x298)]}:{},..._0x269c11(_0x52a05c[_0x194c07(0x2f7)])?{'mcp':_0x52a05c[_0x194c07(0x2f7)]}:{},..._0x52a05c[_0x194c07(0x2af)]!==![]?{'timeMachine':_0x52a05c['timeMachine']}:{}},_0x504580=new _0x28aee2(_0x2d1da5,_0x4680af);_0x504580[_0x194c07(0x26a)][_0x194c07(0x2c3)]?.();const _0x94d324=_0x504580[_0x194c07(0x26a)][_0x194c07(0x2bd)](_0x1f3f09=>_0x53c63e(_0x1f3f09,_0x52a05c['logLevel']));if(_0x52a05c['noRepl'])process['stdout'][_0x194c07(0x334)](_0x194c07(0x2eb));await _0x504580[_0x194c07(0x397)]();if(_0x52a05c['noRepl'])process['stdout'][_0x194c07(0x334)](_0x194c07(0x437));try{await _0x4bce81(_0x504580,_0x52a05c[_0x194c07(0x2bf)]);}catch(_0x190600){_0x190600['code']===_0x194c07(0x221)&&(console[_0x194c07(0x1f3)](_0x194c07(0x258)+_0x52a05c[_0x194c07(0x2bf)]+_0x194c07(0x468)),process[_0x194c07(0x31c)](0x1));throw _0x190600;}if(_0x52a05c[_0x194c07(0x3f7)])process['stdout']['write'](_0x194c07(0x467)+_0x52a05c[_0x194c07(0x2bf)]+'\x0a');if(!_0x52a05c['noRepl'])_0x504580['log'][_0x194c07(0x2c3)]?.(),_0x94d324?.(),_0x230027(_0x504580['auth']?.[_0x194c07(0x320)]?.()??[]),await _0x1259ca(_0x504580,_0x52a05c);else{const _0x39364c=_0x37c1e7[_0x194c07(0x3e1)](_0x2d1da5,_0x194c07(0x284));try{_0x2753d1[_0x194c07(0x3a1)](_0x39364c,String(process[_0x194c07(0x4dd)]));}catch{}const _0x149623=Date['now']()-_0x50e443;console['log'](''),console[_0x194c07(0x26a)](_0x194c07(0x1f9)),console[_0x194c07(0x26a)](_0x194c07(0x319)+_0x52a05c[_0x194c07(0x2bf)]),console[_0x194c07(0x26a)](_0x194c07(0x3a3)+_0x2d1da5),console['log'](_0x194c07(0x3f9)+_0x504580['id']);{const _0x4bab6f=_0x504580[_0x194c07(0x487)]?.['db']?.[_0x194c07(0x375)]?.(_0x194c07(0x431))??0x0,_0x5ef472=[..._0x504580['_envs'][_0x194c07(0x4dc)]()][_0x194c07(0x2f9)](_0x2098d2=>!_0x2098d2['startsWith']('~'))[_0x194c07(0x21f)];if(_0x504580[_0x194c07(0x4c9)]?.['active']?.[_0x194c07(0x243)]===0x1){const _0x24b369=Math[_0x194c07(0x48b)]((_0x504580[_0x194c07(0x4c9)]['active'][_0x194c07(0x274)]-Date[_0x194c07(0x416)]())/0x5265c00);console[_0x194c07(0x26a)](_0x194c07(0x2d4)+_0x504580[_0x194c07(0x4c9)][_0x194c07(0x4ab)][_0x194c07(0x356)]+'\x20(expires\x20in\x20'+_0x24b369+'\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)');}else{if(_0x504580['_license']?.['active']){const _0x37fde1=_0x504580[_0x194c07(0x4c9)][_0x194c07(0x4ab)];console[_0x194c07(0x26a)](_0x194c07(0x2fa)+_0x37fde1['licensee']+_0x194c07(0x471)+new Date(_0x37fde1[_0x194c07(0x274)])[_0x194c07(0x3fb)]()[_0x194c07(0x48e)](0x0,0xa)+')');const _0x320934=_0x37fde1[_0x194c07(0x440)]||{};if(_0x320934[_0x194c07(0x24f)]){const _0x57d43f=Math['round'](_0x4bab6f/_0x320934[_0x194c07(0x24f)]*0x64);console[_0x194c07(0x26a)](_0x194c07(0x477)+_0x4bab6f[_0x194c07(0x39a)]()+_0x194c07(0x3b0)+_0x320934['maxWrites'][_0x194c07(0x39a)]()+'\x20writes\x20('+_0x57d43f+'%),\x20'+_0x5ef472+(_0x320934[_0x194c07(0x21e)]?'/'+_0x320934[_0x194c07(0x21e)]:'')+_0x194c07(0x484)+(_0x5ef472===0x1?'':'s'));}}else{if(_0x504580['_license']){const _0x3284f8=_0x504580['_license'][_0x194c07(0x254)](),_0x10cd1e=_0x3284f8[_0x194c07(0x21f)]?_0x3284f8[_0x194c07(0x404)](_0x27dfe3=>_0x27dfe3['pin'])[_0x194c07(0x3e1)](',\x20'):_0x194c07(0x408),_0x2a703c=_0x504580[_0x194c07(0x4c9)]['effective'],_0x1aed40=_0x2a703c[_0x194c07(0x440)]['maxWrites']?Math[_0x194c07(0x1f8)](_0x4bab6f/_0x2a703c[_0x194c07(0x440)][_0x194c07(0x24f)]*0x64):0x0;console['log']('\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine'),console[_0x194c07(0x26a)](_0x194c07(0x477)+_0x4bab6f['toLocaleString']()+_0x194c07(0x3b0)+_0x2a703c[_0x194c07(0x440)]['maxWrites'][_0x194c07(0x39a)]()+_0x194c07(0x4a5)+_0x1aed40+_0x194c07(0x45e)+_0x5ef472+_0x194c07(0x3b0)+_0x2a703c['limits'][_0x194c07(0x21e)]+'\x20envs'),console[_0x194c07(0x26a)](_0x194c07(0x2c1)+_0x10cd1e);}}}}console[_0x194c07(0x26a)](_0x194c07(0x22e)+_0x52a05c[_0x194c07(0x2bf)]+_0x194c07(0x3e6));!_0x52a05c[_0x194c07(0x27e)]&&console[_0x194c07(0x26a)]('\x20\x20\x20\x20admin:\x20http://localhost:'+_0x52a05c[_0x194c07(0x2bf)]+'/admin/index.html');console[_0x194c07(0x26a)](''),console[_0x194c07(0x26a)](_0x194c07(0x3d3)+_0x149623+'ms'),_0x230027(_0x504580[_0x194c07(0x298)]?.[_0x194c07(0x320)]?.()??[]);async function _0x42473a(){const _0x2af883=_0x194c07;process[_0x2af883(0x322)][_0x2af883(0x334)](_0x2af883(0x2ed));try{_0x2753d1[_0x2af883(0x25f)](_0x39364c);}catch{}await _0x504580[_0x2af883(0x324)](),process[_0x2af883(0x31c)](0x0);}process['on'](_0x194c07(0x270),_0x42473a),process['on'](_0x194c07(0x33d),_0x42473a);}}const _0x9dbc9c=new Set(['version',_0x396e5(0x3ee),_0x396e5(0x311),'backup',_0x396e5(0x2fe),_0x396e5(0x2bb),_0x396e5(0x46d),'token','join',_0x396e5(0x450)]),_0xbd59de=process['argv'][0x2];if(_0xbd59de===_0x396e5(0x2e2))console[_0x396e5(0x26a)](require$$2[_0x396e5(0x2e2)]),process[_0x396e5(0x31c)](0x0);else{if(_0xbd59de&&_0x9dbc9c[_0x396e5(0x3e5)](_0xbd59de)){const _0x2d1b5c=process[_0x396e5(0x4ba)]['slice'](0x3),_0x18c766=_0x38668f(['node',_0x396e5(0x35a),..._0x2d1b5c]),_0x2c990a=_0x2d4682(_0x18c766),_0x27b397=new Set([_0x396e5(0x4a7),'-d','--key','-k','--config','-c','--port','-p','--log-level',_0x396e5(0x414),'-e','--types',_0x396e5(0x3e4),_0x396e5(0x285),_0x396e5(0x454),'--permissions',_0x396e5(0x2d3),_0x396e5(0x34e),_0x396e5(0x343),_0x396e5(0x41b),'-u',_0x396e5(0x4c5)]);let _0x416989=null;for(let _0x149b2c=0x0;_0x149b2c<_0x2d1b5c[_0x396e5(0x21f)];_0x149b2c++){if(_0x27b397[_0x396e5(0x3e5)](_0x2d1b5c[_0x149b2c])){_0x149b2c++;continue;}if(!_0x2d1b5c[_0x149b2c]['startsWith']('-')){_0x416989=_0x2d1b5c[_0x149b2c];break;}}(async()=>{const _0x23d744=_0x396e5;if(_0xbd59de==='token'){const _0x5449f8=process[_0x23d744(0x4ba)][0x3],_0x5be2a0=process[_0x23d744(0x4ba)]['slice'](0x4),_0x3b4fbc=_0x38668f([_0x23d744(0x2fb),_0x23d744(0x35a),..._0x5be2a0]),_0x17a003=_0x2d4682(_0x3b4fbc),_0x378ea9=new Set([_0x23d744(0x4a7),'-d','--key','-k','--config','-c','--port','-p',_0x23d744(0x3e4),_0x23d744(0x285),_0x23d744(0x454),_0x23d744(0x25a),'--grants',_0x23d744(0x34e),'--log-level',_0x23d744(0x414),'-e','--types']),_0x4e3d54=[];for(let _0x5789e2=0x0;_0x5789e2<_0x5be2a0[_0x23d744(0x21f)];_0x5789e2++){if(_0x378ea9['has'](_0x5be2a0[_0x5789e2])){_0x5789e2++;continue;}if(_0x5be2a0[_0x5789e2]['startsWith']('-'))continue;_0x4e3d54[_0x23d744(0x29f)](_0x5be2a0[_0x5789e2]);}switch(_0x5449f8){case _0x23d744(0x225):await _0x8ccbc1(_0x17a003,_0x3b4fbc);break;case _0x23d744(0x3bb):await _0x315e6b(_0x17a003);break;case _0x23d744(0x3b1):await _0x1c61bc(_0x4e3d54[0x0],_0x17a003);break;default:console[_0x23d744(0x1f3)]('[okdb]\x20unknown\x20token\x20action:\x20\x22'+_0x5449f8+_0x23d744(0x2cd)),process[_0x23d744(0x31c)](0x1);}return;}if(_0xbd59de===_0x23d744(0x450)){const _0x75abe6=requireOkdbLicenseCodec(),_0xd11748=process[_0x23d744(0x4ba)]['slice'](0x3),_0x1165b0=_0x38668f([_0x23d744(0x2fb),_0x23d744(0x35a),..._0xd11748]),_0x3f6529=_0x2d4682(_0x1165b0),_0x1addf8=new Set(['--path','-d',_0x23d744(0x3c5),'-k',_0x23d744(0x35e),'-c',_0x23d744(0x479),'-p',_0x23d744(0x3dd)]),_0x3b7d94=[];for(let _0xbf2ff0=0x0;_0xbf2ff0<_0xd11748['length'];_0xbf2ff0++){if(_0x1addf8[_0x23d744(0x3e5)](_0xd11748[_0xbf2ff0])){_0xbf2ff0++;continue;}if(_0xd11748[_0xbf2ff0][_0x23d744(0x22f)]('-'))continue;_0x3b7d94[_0x23d744(0x29f)](_0xd11748[_0xbf2ff0]);}const _0x5029fa=_0x3b7d94[0x0]??null;if(_0x5029fa===_0x23d744(0x4d7))await _0x176d8f(_0x3b7d94[0x1],_0x3f6529);else{if(!_0x5029fa)await _0x253713(_0x3f6529);else{let _0x542e0f=_0x75abe6[_0x23d744(0x3d9)](_0x5029fa);if(_0x542e0f===_0x23d744(0x32f)&&_0x2753d1[_0x23d744(0x40b)](_0x5029fa))_0x542e0f=_0x23d744(0x37c);if(_0x542e0f===_0x23d744(0x37c))try{const _0x443558=_0x2753d1['readFileSync'](_0x5029fa,'utf8')[_0x23d744(0x2b2)](),_0x48068b=_0x75abe6[_0x23d744(0x3d9)](_0x443558);if(_0x48068b===_0x23d744(0x461)){await _0x4f73f9(_0x443558,_0x3f6529);return;}await _0x5ecd25(_0x5029fa,_0x3f6529);return;}catch(_0x1746d0){console[_0x23d744(0x1f3)]('[okdb]\x20error:\x20failed\x20to\x20read\x20'+_0x5029fa+':\x20'+_0x1746d0[_0x23d744(0x345)]),process[_0x23d744(0x31c)](0x1);}switch(_0x542e0f){case'blob':await _0x5ecd25(_0x5029fa,_0x3f6529);break;case _0x23d744(0x461):await _0x4f73f9(_0x5029fa,_0x3f6529);break;case'uuid':await _0x399deb(_0x5029fa,_0x3f6529);break;default:console[_0x23d744(0x1f3)](_0x23d744(0x3b9)+_0x5029fa+'\x22'),console[_0x23d744(0x1f3)](''),console[_0x23d744(0x1f3)](_0x23d744(0x2c0)),console[_0x23d744(0x1f3)](_0x23d744(0x208)),console[_0x23d744(0x1f3)]('\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)'),console[_0x23d744(0x1f3)]('\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)'),console['error'](_0x23d744(0x24a)),console['error'](''),console[_0x23d744(0x1f3)](_0x23d744(0x3d6)),process[_0x23d744(0x31c)](0x1);}}}return;}switch(_0xbd59de){case'doctor':await _0x131a1a(_0x2c990a);break;case _0x23d744(0x311):await _0x452520();break;case _0x23d744(0x46d):await _0x248c09(_0x2c990a);break;case _0x23d744(0x283):await _0x4cbc5a(_0x416989??_0x37c1e7[_0x23d744(0x4b3)](_0x23d744(0x2d8)),_0x2c990a);break;case _0x23d744(0x2fe):await _0x534d67(_0x416989??_0x37c1e7['resolve']('./okdb-export.ndjson'),_0x2c990a,_0x18c766);break;case _0x23d744(0x2bb):await _0x5437a2(_0x416989??_0x37c1e7[_0x23d744(0x4b3)]('./okdb-export.ndjson'),_0x2c990a,_0x18c766);break;case _0x23d744(0x3e1):await _0x234356(_0x416989,_0x2c990a,_0x18c766);break;}})()[_0x396e5(0x3c2)](()=>process['exit'](0x0))[_0x396e5(0x300)](_0x1dea8a=>{const _0x5c2939=_0x396e5;console['error'](_0x5c2939(0x277)+(_0x1dea8a[_0x5c2939(0x345)]||_0x1dea8a)+'\x0a'),process[_0x5c2939(0x31c)](0x1);});}else _0xd588bf()[_0x396e5(0x300)](_0x459ba3=>{const _0x1c92ac=_0x396e5;console['error'](_0x1c92ac(0x290)),console[_0x1c92ac(0x1f3)](_0x459ba3[_0x1c92ac(0x211)]||_0x459ba3),process[_0x1c92ac(0x31c)](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0xddaf03(0x354)]=okdb;
|