@kedem/okdb 2.6.3 → 2.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/okdb.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';const _0x32d6b8=_0x1684;(function(_0x4d147a,_0x27065a){const _0x44b9c7=_0x1684,_0xc856be=_0x4d147a();while(!![]){try{const _0x2c75f4=parseInt(_0x44b9c7(0x839))/0x1*(parseInt(_0x44b9c7(0x485))/0x2)+-parseInt(_0x44b9c7(0x62d))/0x3+parseInt(_0x44b9c7(0x672))/0x4*(parseInt(_0x44b9c7(0x6b2))/0x5)+-parseInt(_0x44b9c7(0x3e8))/0x6+parseInt(_0x44b9c7(0x1eb))/0x7+parseInt(_0x44b9c7(0x3f1))/0x8+-parseInt(_0x44b9c7(0x34a))/0x9*(-parseInt(_0x44b9c7(0x425))/0xa);if(_0x2c75f4===_0x27065a)break;else _0xc856be['push'](_0xc856be['shift']());}catch(_0x5c56ab){_0xc856be['push'](_0xc856be['shift']());}}}(_0x4ab8,0x416d9));var require$$1=require(_0x32d6b8(0x1de)),require$$0$1=require('fs'),require$$0=require('os'),require$$4$1=require('net'),require$$5$1=require(_0x32d6b8(0x42c)),require$$0$3=require('readline'),require$$2=require(_0x32d6b8(0x445)),require$$5=require(_0x32d6b8(0x3ca)),require$$2$1=require(_0x32d6b8(0x582)),require$$0$2=require('node:crypto'),require$$4=require('child_process'),require$$1$1=require(_0x32d6b8(0x759)),require$$0$4=require(_0x32d6b8(0x478)),require$$0$5=require(_0x32d6b8(0x785)),require$$0$6=require(_0x32d6b8(0x5ea)),require$$0$7=require(_0x32d6b8(0x4fc)),require$$1$2=require(_0x32d6b8(0x7c2)),require$$3$1=require(_0x32d6b8(0x542)),require$$2$2=require(_0x32d6b8(0x7ef)),require$$3$2=require(_0x32d6b8(0x205)),commonjsGlobal=typeof globalThis!==_0x32d6b8(0x3e1)?globalThis:typeof window!=='undefined'?window:typeof global!=='undefined'?global:typeof self!==_0x32d6b8(0x3e1)?self:{};function getDefaultExportFromCjs(_0x4ba2b7){const _0x14c8d4=_0x32d6b8;return _0x4ba2b7&&_0x4ba2b7[_0x14c8d4(0x5a3)]&&Object[_0x14c8d4(0x57f)][_0x14c8d4(0x6b9)][_0x14c8d4(0x65b)](_0x4ba2b7,_0x14c8d4(0x2dc))?_0x4ba2b7[_0x14c8d4(0x2dc)]:_0x4ba2b7;}var okdb$1={},okdbWorkers,hasRequiredOkdbWorkers;function requireOkdbWorkers(){if(hasRequiredOkdbWorkers)return okdbWorkers;hasRequiredOkdbWorkers=0x1;const _0x1e1419=require$$0,_0x36f62f=require$$0$1,_0x25664f=require$$1;let _0x2099b7;function _0xd9a82d(){const _0x5ca432=_0x1684;if(process.env.OKDB_FORCE_SHMBUF_FALLBACK==='1')return![];if(_0x2099b7!==undefined)return _0x2099b7;try{const _0x166877=_0x25664f['dirname'](require['resolve'](_0x5ca432(0x7df)));_0x2099b7=_0x36f62f[_0x5ca432(0x4e5)](_0x25664f[_0x5ca432(0x86d)](_0x166877,_0x5ca432(0x850),_0x5ca432(0x66a),_0x5ca432(0x30c)));}catch{_0x2099b7=![];}return _0x2099b7;}function _0x596039(){const _0x396465=_0x1684,_0x5b91d7=_0x1e1419[_0x396465(0x3f2)]()['length'];return Math[_0x396465(0x321)](0x1,_0x5b91d7-0x1);}function _0x2508a0(_0x357eea,_0x3df976={}){const _0x221f9b=_0x1684,_0x3961f6=_0x3df976[_0x221f9b(0x3d3)]!==undefined?_0x3df976[_0x221f9b(0x3d3)]:_0xd9a82d();let _0x54b4a8;if(_0x357eea?.[_0x221f9b(0x2cb)])_0x54b4a8=0x1;else{let _0x5f0ccd,_0x43d9f9;if(_0x357eea?.[_0x221f9b(0x636)]!==undefined&&_0x357eea[_0x221f9b(0x636)]!==null&&_0x357eea['workersFlag']!=='')_0x5f0ccd=_0x357eea[_0x221f9b(0x636)],_0x43d9f9='--workers';else{if(process.env.OKDB_HTTP_WORKERS!==undefined&&process.env.OKDB_HTTP_WORKERS!=='')_0x5f0ccd=process.env.OKDB_HTTP_WORKERS,_0x43d9f9=_0x221f9b(0x53f);else _0x357eea?.[_0x221f9b(0x4fc)]?.[_0x221f9b(0x38d)]!==undefined&&_0x357eea[_0x221f9b(0x4fc)][_0x221f9b(0x38d)]!==null&&_0x357eea[_0x221f9b(0x4fc)][_0x221f9b(0x38d)]!==''&&(_0x5f0ccd=_0x357eea[_0x221f9b(0x4fc)][_0x221f9b(0x38d)],_0x43d9f9=_0x221f9b(0x594));}if(_0x5f0ccd===undefined)_0x54b4a8=_0x596039();else{const _0x3ac915=Number(_0x5f0ccd);!Number['isInteger'](_0x3ac915)||_0x3ac915<0x1?(console[_0x221f9b(0x6c6)](_0x221f9b(0x397)+_0x43d9f9+'='+JSON[_0x221f9b(0x46c)](_0x5f0ccd)+_0x221f9b(0x467)),_0x54b4a8=0x1):_0x54b4a8=_0x3ac915;}}return!_0x3961f6&&_0x54b4a8>0x1&&(console[_0x221f9b(0x6c6)](_0x221f9b(0x651)+(_0x221f9b(0x297)+_0x54b4a8+').')),_0x54b4a8=0x1),_0x54b4a8;}return okdbWorkers={'isShmbufNative':_0xd9a82d,'defaultWorkers':_0x596039,'resolveWorkers':_0x2508a0},okdbWorkers;}var version=_0x32d6b8(0x352),require$$3={'version':version},okdbMigrate={'exports':{}},okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x685234 extends Error{constructor(_0x5464eb,_0x234d65,_0x357489={}){const _0x1e19b6=_0x1684;super(_0x5464eb),this[_0x1e19b6(0x2a9)]=_0x1e19b6(0x78d),this[_0x1e19b6(0x5f9)]=_0x234d65,this[_0x1e19b6(0x820)]=_0x357489,_0x357489[_0x1e19b6(0x45b)]&&(this[_0x1e19b6(0x45b)]=_0x357489[_0x1e19b6(0x45b)]),Error[_0x1e19b6(0x8bb)](this,this[_0x1e19b6(0x683)]);}}class _0x20e546 extends _0x685234{constructor(_0x1c33b3,_0x407c82,_0x2fbbc2,_0x3ad48d){const _0x12c621=_0x1684;super(_0x12c621(0x685)+_0x1c33b3+'@'+_0x407c82+_0x12c621(0x6cf)+_0x2fbbc2+_0x12c621(0x6df)+_0x3ad48d,_0x12c621(0x494),{'type':_0x1c33b3,'key':_0x407c82,'expectedVersion':_0x2fbbc2,'actualVersion':_0x3ad48d}),this[_0x12c621(0x2a9)]=_0x12c621(0x1ea);}}class _0x2c3c8a extends _0x685234{constructor(_0x1e19ca,_0x348a38){const _0x3dcb6f=_0x1684;super(_0x1e19ca+'@'+_0x348a38+_0x3dcb6f(0x76d),_0x3dcb6f(0x896),{'type':_0x1e19ca,'key':_0x348a38}),this[_0x3dcb6f(0x2a9)]=_0x3dcb6f(0x5e4);}}class _0x4e7345 extends _0x685234{constructor(_0xc498a4,_0x5a5b12){const _0x62f58c=_0x1684;super(_0xc498a4+'@'+_0x5a5b12+_0x62f58c(0x253),_0x62f58c(0x2a8),{'type':_0xc498a4,'key':_0x5a5b12}),this[_0x62f58c(0x2a9)]=_0x62f58c(0x60b);}}class _0xd3d65a extends _0x685234{constructor(_0x5f483b,_0x1b7e26){const _0x5dfdd0=_0x1684,_0xcde67f=typeof _0x1b7e26;super(_0x5dfdd0(0x44b)+_0x5f483b+_0x5dfdd0(0x41b)+_0xcde67f+_0x5dfdd0(0x6bb)+_0x1b7e26,_0x5dfdd0(0x641),{'index':_0x5f483b,'key':_0x1b7e26,'keyType':_0xcde67f}),this[_0x5dfdd0(0x2a9)]=_0x5dfdd0(0x7e2);}}class _0x1da161 extends _0x685234{constructor(_0x36f87c){const _0x541794=_0x1684,_0x1f8a89=typeof _0x36f87c;super(_0x541794(0x3d9)+_0x1f8a89+_0x541794(0x1c5)+_0x36f87c,_0x541794(0x873),{'key':_0x36f87c,'keyType':_0x1f8a89}),this[_0x541794(0x2a9)]=_0x541794(0x3cc);}}class _0x3308b0 extends _0x685234{constructor(_0x396549){const _0x2ae8de=_0x1684;super(_0x2ae8de(0x3de)+_0x396549+_0x2ae8de(0x728),_0x2ae8de(0x4a2),{'type':_0x396549}),this[_0x2ae8de(0x2a9)]='OKDBTypeNotRegisteredError';}}class _0x11a098 extends _0x685234{constructor(_0x60ab68){const _0x4a0a2d=_0x1684;super(_0x4a0a2d(0x3de)+_0x60ab68+_0x4a0a2d(0x86b),_0x4a0a2d(0x238),{'type':_0x60ab68}),this[_0x4a0a2d(0x2a9)]=_0x4a0a2d(0x7b1);}}class _0x5993f6 extends _0x685234{constructor(_0x387a85,_0x5527cc){const _0x3ba78d=_0x1684;super('Index\x20\x27'+_0x5527cc+'\x27\x20on\x20type\x20\x27'+_0x387a85+'\x27\x20doesn\x27t\x20exist',_0x3ba78d(0x203),{'type':_0x387a85,'index':_0x5527cc}),this[_0x3ba78d(0x2a9)]='OKDBIndexNotRegisteredError';}}class _0x5d6610 extends _0x685234{constructor(_0xf65e6d,_0x5c682e){const _0x9a8015=_0x1684;super(_0x9a8015(0x75c)+_0x5c682e+'\x27\x20on\x20type\x20\x27'+_0xf65e6d+_0x9a8015(0x1b6),_0x9a8015(0x411),{'type':_0xf65e6d,'index':_0x5c682e}),this['name']=_0x9a8015(0x3e0);}}class _0x37001a extends _0x685234{constructor(_0x264d1d,_0x2e1d7a={}){const _0x5102d4=_0x1684;super(_0x264d1d,_0x5102d4(0x4e3),_0x2e1d7a),this['name']=_0x5102d4(0x2e4);}}class _0x13f6b5 extends _0x685234{constructor(_0x2619e9,_0x2d658c,_0x2bf33d,_0x18a2b4,_0x7a204b){const _0x318a32=_0x1684;super(_0x318a32(0x4d4)+_0x2619e9+'@'+_0x2d658c+_0x318a32(0x479)+_0x2bf33d+_0x318a32(0x808)+_0x18a2b4+_0x318a32(0x794)+_0x7a204b+'\x27',_0x318a32(0x88f),{'type':_0x2619e9,'index':_0x2d658c,'indexKey':_0x2bf33d,'existingKey':_0x18a2b4,'conflictingKey':_0x7a204b}),this[_0x318a32(0x2a9)]=_0x318a32(0x598);}}class _0x50b89b extends _0x685234{constructor(_0x15a2b6,_0x4d2bf4,_0x6138f0){const _0x5ca225=_0x1684;super(_0x5ca225(0x1fe)+_0x15a2b6+'@'+_0x4d2bf4,_0x5ca225(0x680),{'type':_0x15a2b6,'key':_0x4d2bf4,'errors':_0x6138f0}),this['name']=_0x5ca225(0x1e5),this[_0x5ca225(0x70d)]=_0x15a2b6,this[_0x5ca225(0x7d4)]=_0x4d2bf4,this[_0x5ca225(0x73d)]=_0x6138f0;}}class _0x3208ec extends _0x685234{constructor(_0x50f915,_0x3cd995){const _0x3a263d=_0x1684;super(_0x3a263d(0x2f5)+_0x50f915+':\x20'+_0x3cd995[_0x3a263d(0x3be)]+_0x3a263d(0x4e6),_0x3a263d(0x47a),{'type':_0x50f915,'failures':_0x3cd995}),this[_0x3a263d(0x2a9)]=_0x3a263d(0x4f3),this[_0x3a263d(0x70d)]=_0x50f915,this[_0x3a263d(0x83a)]=_0x3cd995;}}class _0x293958 extends _0x685234{constructor(_0x2bed46,_0x1c041d,_0x50c63a,_0x2caa86,_0x2aa5e9){const _0x44d953=_0x1684;super(_0x44d953(0x600)+_0x2bed46+'@'+_0x1c041d+'.'+_0x50c63a+_0x44d953(0x678)+_0x2caa86+'@'+_0x2aa5e9+_0x44d953(0x72b),_0x44d953(0x8a3),{'sourceType':_0x2bed46,'sourceKey':_0x1c041d,'fieldPath':_0x50c63a,'targetType':_0x2caa86,'targetKey':_0x2aa5e9}),this[_0x44d953(0x2a9)]=_0x44d953(0x800),this['sourceType']=_0x2bed46,this[_0x44d953(0x471)]=_0x1c041d,this['fieldPath']=_0x50c63a,this['targetType']=_0x2caa86,this['targetKey']=_0x2aa5e9;}}class _0x551d27 extends _0x685234{constructor(_0x50ca88,_0x19543c,_0x295494){const _0x4667e5=_0x1684;super(_0x4667e5(0x560)+_0x50ca88+'@'+_0x19543c+':\x20'+_0x295494[_0x4667e5(0x3be)]+'\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict',_0x4667e5(0x504),{'targetType':_0x50ca88,'targetKey':_0x19543c,'references':_0x295494}),this[_0x4667e5(0x2a9)]=_0x4667e5(0x413),this['targetType']=_0x50ca88,this[_0x4667e5(0x5f3)]=_0x19543c,this['references']=_0x295494;}}class _0x4a6758 extends _0x685234{constructor(_0x3b8cf1,_0x2d6d33,_0x1fe6cd){const _0x267547=_0x1684;super(_0x267547(0x666)+_0x2d6d33+_0x267547(0x82a)+_0x3b8cf1+_0x267547(0x674)+_0x1fe6cd['map'](_0x2016c9=>_0x2016c9['kind']+':'+_0x2016c9[_0x267547(0x2a9)])['join'](',\x20'),_0x267547(0x36a),{'type':_0x3b8cf1,'index':_0x2d6d33,'usedBy':_0x1fe6cd}),this[_0x267547(0x2a9)]=_0x267547(0x3f5);}}return okdbError={'OKDBError':_0x685234,'OKDBVersionMismatchError':_0x20e546,'OKDBNotFoundError':_0x2c3c8a,'OKDBAlreadyExistsError':_0x4e7345,'OKDBInvalidIndexKeyError':_0xd3d65a,'OKDBInvalidPrimaryKeyError':_0x1da161,'OKDBTypeNotRegisteredError':_0x3308b0,'OKDBTypeAlreadyRegisteredError':_0x11a098,'OKDBIndexNotRegisteredError':_0x5993f6,'OKDBIndexAlreadyRegisteredError':_0x5d6610,'OKDBInvalidValueError':_0x37001a,'OKDBUniqueConstraintError':_0x13f6b5,'OKDBSchemaValidationError':_0x50b89b,'OKDBSchemaCollectionError':_0x3208ec,'OKDBForeignKeyError':_0x293958,'OKDBForeignKeyDeleteError':_0x551d27,'OKDBIndexHasConsumersError':_0x4a6758},okdbError;}var hasRequiredOkdbMigrate;function requireOkdbMigrate(){const _0x455012=_0x32d6b8;if(hasRequiredOkdbMigrate)return okdbMigrate[_0x455012(0x47d)];hasRequiredOkdbMigrate=0x1;const _0x1e7640=require$$0$1,_0x32b1a2=require$$1,_0x5b9c9c=require$$2,{OKDBError:_0x5cf14c}=requireOkdbError(),_0x3b3d92='header',_0x53bd80=_0x455012(0x344),_0x177fe8='schema',_0x22150d=_0x455012(0x44d),_0xdf4c38=_0x455012(0x85e),_0x4c4690=0x1f4,_0x5e4514=0x3e8,_0x32f022=_0x455012(0x5b4);async function _0x6f25b7(_0x362203,_0x2bd878,_0xdeeee1,_0x4cc5c0){const _0x15678d=_0x455012;if(_0x362203){await _0x362203[_0x15678d(0x811)](_0xdeeee1,Boolean(_0x4cc5c0));return;}const _0x3a77ce=_0x5b9c9c[_0x15678d(0x654)](_0x2bd878,{'readOnly':!![],'maxDbs':0x8});try{await _0x3a77ce['backup'](_0xdeeee1,Boolean(_0x4cc5c0));}finally{await _0x3a77ce[_0x15678d(0x55c)]();}}const _0x2d5cca=()=>new Promise(_0x1f0065=>setImmediate(_0x1f0065));function _0x9bd151(_0x524bc1,_0xf611a9){const _0x38a35f=_0x455012;if(_0x524bc1[_0x38a35f(0x6d4)](_0xf611a9))return Promise[_0x38a35f(0x400)]();return new Promise((_0x161c28,_0x20f177)=>{const _0x6e3943=_0x38a35f,_0x32a004=_0xbbfece=>{const _0x3ab8c1=_0x1684;_0x524bc1['off']?.(_0x3ab8c1(0x544),_0x4a173b),_0x524bc1[_0x3ab8c1(0x866)]?.(_0x3ab8c1(0x21f),_0xffc109),_0x524bc1[_0x3ab8c1(0x866)]?.(_0x3ab8c1(0x55c),_0x5a8054);if(_0xbbfece)_0x20f177(_0xbbfece);else _0x161c28();},_0x4a173b=()=>_0x32a004(),_0xffc109=_0x2accc5=>_0x32a004(_0x2accc5),_0x5a8054=()=>_0x32a004(new Error('export:\x20stream\x20closed\x20before\x20drain'));_0x524bc1[_0x6e3943(0x405)]('drain',_0x4a173b),_0x524bc1['once'](_0x6e3943(0x21f),_0xffc109),_0x524bc1['once'](_0x6e3943(0x55c),_0x5a8054);});}async function _0x3b8113(_0x24b216,_0x664a73,_0x4f9b41){const _0x277850=_0x455012;let _0x30cfaa=0x0,_0x3ce59b,_0x7e08e7=!![];for(;;){const _0x6f4878={'snapshot':!![],'limit':_0x5e4514};!_0x7e08e7&&(_0x6f4878[_0x277850(0x1db)]=_0x3ce59b,_0x6f4878[_0x277850(0x7ea)]=!![]);_0x7e08e7=![];const _0x26de18=Array['from'](_0x664a73[_0x277850(0x754)](_0x6f4878));if(_0x26de18[_0x277850(0x3be)]===0x0)break;let _0x16f54b='';for(const _0x2cc485 of _0x26de18)_0x16f54b+=_0x4f9b41(_0x2cc485)+'\x0a';_0x3ce59b=_0x26de18[_0x26de18[_0x277850(0x3be)]-0x1][_0x277850(0x7d4)],_0x30cfaa+=_0x26de18['length'],await _0x9bd151(_0x24b216,_0x16f54b);if(_0x26de18[_0x277850(0x3be)]<_0x5e4514)break;await _0x2d5cca();}return _0x30cfaa;}class _0x8582cc{constructor(_0x4c785a){const _0x19de13=_0x455012;this[_0x19de13(0x7f8)]=_0x4c785a;}[_0x455012(0x6dd)](_0x4f2d98=_0x455012(0x2dc)){const _0x17a289=_0x455012;return this[_0x17a289(0x7f8)][_0x17a289(0x344)](_0x4f2d98);}async[_0x455012(0x819)](_0x5a1d0d='default'){const _0xb8f07b=_0x455012;return!this[_0xb8f07b(0x7f8)][_0xb8f07b(0x828)][_0xb8f07b(0x6f1)](_0x5a1d0d)&&await this['okdb'][_0xb8f07b(0x4e7)](_0x5a1d0d,{'sync':!![]}),this[_0xb8f07b(0x7f8)][_0xb8f07b(0x344)](_0x5a1d0d);}[_0x455012(0x4e0)](_0x326c92,_0x318156){const _0x5008aa=_0x455012,_0x3e6110=[..._0x326c92[_0x5008aa(0x3ae)]['getKeys']()][_0x5008aa(0x49c)](_0x598e5c=>!_0x598e5c[_0x5008aa(0x5e1)]('~')&&!_0x598e5c[_0x5008aa(0x5e1)](_0x5008aa(0x47e)));if(!_0x318156)return _0x3e6110;return _0x3e6110['filter'](_0x5396b4=>_0x318156[_0x5008aa(0x6d1)](_0x5396b4));}['_typeSchema'](_0xeae540,_0x421e8d){const _0x2de110=_0x455012,_0x3c9360=_0xeae540[_0x2de110(0x662)][_0x2de110(0x5ab)](_0x421e8d),_0x1775f2=_0xeae540[_0x2de110(0x3ae)]['get'](_0x421e8d)||{},_0x329406=[];for(const [,_0x136ef1]of _0x3c9360?.[_0x2de110(0x6c1)]??new Map()){const _0x5c27aa={'fields':_0x136ef1[_0x2de110(0x39f)]};if(_0x136ef1[_0x2de110(0x747)])_0x5c27aa[_0x2de110(0x4c6)]=_0x136ef1[_0x2de110(0x747)];if(_0x136ef1[_0x2de110(0x457)])_0x5c27aa['unique']=!![];_0x329406[_0x2de110(0x338)](_0x5c27aa);}const _0x249501={};for(const [_0x4699af,_0x2b4259]of Object[_0x2de110(0x444)](_0x1775f2['ftsIndexes']||{})){_0x249501[_0x4699af]={'fields':_0x2b4259[_0x2de110(0x6e7)]?.[_0x2de110(0x8ad)],'tokenizer':_0x2b4259[_0x2de110(0x6e7)]?.[_0x2de110(0x7eb)]};}const _0x2feab4={'indexes':_0x329406,'ftsIndexes':_0x249501};return _0x1775f2[_0x2de110(0x534)]&&(_0x2feab4['schema']=_0x1775f2[_0x2de110(0x534)]),_0x2feab4;}async[_0x455012(0x5b1)](_0x2f2fb2,_0x4a29b6={}){const _0x4bc747=_0x455012,{envName:envName=_0x4bc747(0x2dc),types:types=null,includeChanges:includeChanges=![],_noHeader:_noHeader=![]}=_0x4a29b6,_0x598a38=this[_0x4bc747(0x6dd)](envName),_0x240aca=this[_0x4bc747(0x4e0)](_0x598a38,types);let _0x2ff981=0x0,_0xd99251=0x0;!_noHeader&&await _0x9bd151(_0x2f2fb2,JSON[_0x4bc747(0x46c)]({'r':_0x3b3d92,'kdbVersion':require$$3[_0x4bc747(0x24a)],'exportedAt':Date['now'](),'envName':envName})+'\x0a');for(const _0x3cfd40 of _0x240aca){const _0x646239=_0x598a38[_0x4bc747(0x662)][_0x4bc747(0x5ab)](_0x3cfd40);if(!_0x646239)continue;const _0x55cfe1=this[_0x4bc747(0x5e2)](_0x598a38,_0x3cfd40);await _0x9bd151(_0x2f2fb2,JSON[_0x4bc747(0x46c)]({'r':_0x177fe8,'type':_0x3cfd40,..._0x55cfe1})+'\x0a'),_0x2ff981+=await _0x3b8113(_0x2f2fb2,_0x646239[_0x4bc747(0x44d)],({key:_0x21bf89,value:_0x50385f,version:_0x21a8ae})=>JSON[_0x4bc747(0x46c)]({'r':_0x22150d,'t':_0x3cfd40,'k':_0x21bf89,'v':_0x50385f,'ver':_0x21a8ae}));}return includeChanges&&_0x598a38[_0x4bc747(0x69d)]&&(_0xd99251=await _0x3b8113(_0x2f2fb2,_0x598a38[_0x4bc747(0x246)],({key:_0xbde2a2,value:_0x15ec48})=>JSON[_0x4bc747(0x46c)]({'r':_0xdf4c38,'clock':_0xbde2a2,'event':_0x15ec48}))),{'types':_0x240aca[_0x4bc747(0x3be)],'records':_0x2ff981,'changes':_0xd99251};}async[_0x455012(0x3b7)](_0x586cc8,_0xbd1dc6={}){const _0x23320b=_0x455012;_0x1e7640[_0x23320b(0x642)](_0x32b1a2[_0x23320b(0x815)](_0x586cc8),{'recursive':!![]});const _0x536a6e=_0x1e7640[_0x23320b(0x25f)](_0x586cc8),_0x157f14=await this['exportToStream'](_0x536a6e,_0xbd1dc6);return await new Promise((_0x11b21d,_0x5f2559)=>{const _0x3620e0=_0x23320b;_0x536a6e[_0x3620e0(0x424)](),_0x536a6e['once']('finish',_0x11b21d),_0x536a6e[_0x3620e0(0x405)](_0x3620e0(0x21f),_0x5f2559);}),{..._0x157f14,'filePath':_0x586cc8};}async[_0x455012(0x604)](_0x577aa4,_0x2113ff={}){const _0x28384b=_0x455012,{envNames:envNames=null,types:types=null,includeChanges:includeChanges=![]}=_0x2113ff,_0x4e39d0=[...this['okdb'][_0x28384b(0x828)][_0x28384b(0x6c7)]()]['filter'](_0x126ebb=>!_0x126ebb['startsWith']('~')),_0x59c4be=envNames?_0x4e39d0[_0x28384b(0x49c)](_0x885a45=>envNames[_0x28384b(0x6d1)](_0x885a45)):_0x4e39d0;await _0x9bd151(_0x577aa4,JSON[_0x28384b(0x46c)]({'r':_0x3b3d92,'kdbVersion':require$$3[_0x28384b(0x24a)],'exportedAt':Date[_0x28384b(0x81b)](),'envNames':_0x59c4be})+'\x0a');let _0x163014=0x0,_0x5e98bd=0x0,_0x192bd0=0x0;for(const _0x37457c of _0x59c4be){await _0x9bd151(_0x577aa4,JSON['stringify']({'r':_0x53bd80,'name':_0x37457c})+'\x0a');const _0x455e13=await this[_0x28384b(0x5b1)](_0x577aa4,{'envName':_0x37457c,'types':types,'includeChanges':includeChanges,'_noHeader':!![]});_0x163014+=_0x455e13[_0x28384b(0x732)],_0x5e98bd+=_0x455e13[_0x28384b(0x3f8)],_0x192bd0+=_0x455e13[_0x28384b(0x7a2)];}return{'envs':_0x59c4be[_0x28384b(0x3be)],'types':_0x163014,'records':_0x5e98bd,'changes':_0x192bd0};}async[_0x455012(0x6fb)](_0x141d74,_0x204f5b={}){const _0x4a5b2f=_0x455012,{envName:_0x526ec8=null,types:_0x3b9450=null,dropExisting:dropExisting=![],batchSize:batchSize=_0x4c4690,includeChanges:includeChanges=![],onProgress:onProgress=null}=_0x204f5b;let _0x5158d0=_0x526ec8??'default',_0x56cfa6=null,_0x1886ba=0x0,_0x237aa0=0x0,_0x2509b4=0x0,_0x40b5c8=null,_0x419b63=[];const _0x28a9db=[],_0x380edb=async()=>{const _0x20bcbc=_0x1684;if(!_0x419b63[_0x20bcbc(0x3be)]||!_0x40b5c8||!_0x56cfa6)return;await _0x56cfa6[_0x20bcbc(0x6db)]['transaction'](()=>{for(const {k:_0x3d1d69,v:_0xd2fe62,ver:_0x1f3e44}of _0x419b63){_0x56cfa6['_put'](null,_0x40b5c8,_0x3d1d69,_0xd2fe62,{'version':_0x1f3e44,'origin':'import'});}}),_0x237aa0+=_0x419b63[_0x20bcbc(0x3be)],onProgress?.({'type':_0x40b5c8,'count':_0x237aa0}),_0x419b63=[];};await this[_0x4a5b2f(0x2f8)](_0x141d74,async _0x4338e8=>{const _0x334ef5=_0x4a5b2f,_0x1a5245=_0x4338e8['r'];if(_0x1a5245===_0x3b3d92){if(!_0x526ec8&&_0x4338e8[_0x334ef5(0x2ed)])_0x5158d0=_0x4338e8['envName'];_0x56cfa6=await this[_0x334ef5(0x819)](_0x5158d0);return;}if(!_0x56cfa6)_0x56cfa6=await this['_resolveOrCreateEnv'](_0x5158d0);if(_0x1a5245===_0x53bd80){await _0x380edb(),_0x40b5c8=null,_0x5158d0=_0x526ec8??_0x4338e8[_0x334ef5(0x2a9)],_0x56cfa6=await this[_0x334ef5(0x819)](_0x5158d0);return;}if(_0x1a5245===_0x177fe8){const {type:_0x53c7ae,indexes:indexes=[],ftsIndexes:ftsIndexes={},schema:_0x3bdf2d}=_0x4338e8;if(_0x3b9450&&!_0x3b9450['includes'](_0x53c7ae))return;await _0x380edb(),_0x40b5c8=_0x53c7ae;dropExisting&&_0x56cfa6[_0x334ef5(0x708)](_0x53c7ae)&&await _0x56cfa6['dropType'](_0x53c7ae);!_0x56cfa6['hasType'](_0x53c7ae)&&(await _0x56cfa6[_0x334ef5(0x6de)](_0x53c7ae),_0x1886ba++);for(const _0x339e1f of indexes){if(!_0x56cfa6[_0x334ef5(0x216)](_0x53c7ae,_0x339e1f[_0x334ef5(0x8ad)])){const _0x4fde53={};_0x339e1f[_0x334ef5(0x4c6)]&&(_0x4fde53['type']=_0x334ef5(0x4c6),_0x4fde53[_0x334ef5(0x7e8)]=_0x339e1f['geo']['precision']);if(_0x339e1f['unique'])_0x4fde53['unique']=!![];await _0x56cfa6[_0x334ef5(0x772)](_0x53c7ae,_0x339e1f[_0x334ef5(0x8ad)],_0x4fde53);}}for(const [_0x35873f,_0x1e1a7a]of Object[_0x334ef5(0x444)](ftsIndexes)){!this[_0x334ef5(0x7f8)][_0x334ef5(0x6ca)]['has'](_0x53c7ae,_0x35873f,_0x56cfa6)&&await this[_0x334ef5(0x7f8)][_0x334ef5(0x6ca)][_0x334ef5(0x437)](_0x53c7ae,_0x35873f,{'fields':_0x1e1a7a[_0x334ef5(0x8ad)],'tokenizer':_0x1e1a7a[_0x334ef5(0x7eb)]},undefined,_0x56cfa6);}_0x3bdf2d?.[_0x334ef5(0x60a)]&&_0x28a9db[_0x334ef5(0x338)]({'env':_0x56cfa6,'type':_0x53c7ae,'schema':_0x3bdf2d});return;}if(_0x1a5245===_0x22150d){if(_0x3b9450&&!_0x3b9450[_0x334ef5(0x6d1)](_0x4338e8['t']))return;_0x4338e8['t']!==_0x40b5c8&&(await _0x380edb(),_0x40b5c8=_0x4338e8['t']);_0x419b63[_0x334ef5(0x338)]({'k':_0x4338e8['k'],'v':_0x4338e8['v'],'ver':_0x4338e8[_0x334ef5(0x28a)]});if(_0x419b63[_0x334ef5(0x3be)]>=batchSize)await _0x380edb();return;}_0x1a5245===_0xdf4c38&&includeChanges&&_0x56cfa6[_0x334ef5(0x69d)]&&(_0x56cfa6[_0x334ef5(0x246)][_0x334ef5(0x6d8)](_0x4338e8[_0x334ef5(0x882)],_0x4338e8[_0x334ef5(0x789)]),_0x2509b4++);}),await _0x380edb();for(const {env:_0x159755,type:_0x5008b4,schema:_0x56317b}of _0x28a9db){try{await _0x159755['setSchema'](_0x5008b4,_0x56317b);}catch{if(_0x56317b[_0x4a5b2f(0x7b7)])try{await _0x159755[_0x4a5b2f(0x3fb)](_0x5008b4,{..._0x56317b,'enforce':![]});}catch{}}}return{'types':_0x1886ba,'records':_0x237aa0,'changes':_0x2509b4};}async['importFromFile'](_0x416dfd,_0x15628f={}){const _0x5ada6b=_0x455012,_0x343811=_0x1e7640['createReadStream'](_0x416dfd,{'encoding':_0x5ada6b(0x6ec)});return this[_0x5ada6b(0x6fb)](_0x343811,_0x15628f);}[_0x455012(0x2f8)](_0x3ceca9,_0x36b4c9){return new Promise((_0x2bc06e,_0x4f0a02)=>{const _0x3a7f37=_0x1684;let _0x14e4a9='',_0x5bc03f=Promise[_0x3a7f37(0x400)]();const _0x5e0efe=async _0x503fba=>{const _0x2f5ff5=_0x3a7f37;_0x14e4a9+=_0x503fba;const _0x19e935=_0x14e4a9[_0x2f5ff5(0x735)]('\x0a');_0x14e4a9=_0x19e935[_0x2f5ff5(0x720)]();for(const _0x3873f6 of _0x19e935){const _0x43140e=_0x3873f6['trim']();if(!_0x43140e)continue;let _0x55152c;try{_0x55152c=JSON[_0x2f5ff5(0x81a)](_0x43140e);}catch{continue;}await _0x36b4c9(_0x55152c);}};_0x3ceca9['on']('data',_0x10ff78=>{const _0x55a325=_0x3a7f37;_0x5bc03f=_0x5bc03f[_0x55a325(0x76c)](()=>_0x5e0efe(String(_0x10ff78)));}),_0x3ceca9['on'](_0x3a7f37(0x424),()=>{const _0x1252b7=_0x3a7f37;_0x5bc03f[_0x1252b7(0x76c)](async()=>{const _0x9b9a2=_0x1252b7,_0x4fb714=_0x14e4a9[_0x9b9a2(0x543)]();if(_0x4fb714)try{await _0x36b4c9(JSON['parse'](_0x4fb714));}catch{}_0x2bc06e();})[_0x1252b7(0x6ce)](_0x4f0a02);}),_0x3ceca9['on']('error',_0x4f0a02);});}async['backup'](_0x5a5ea9,_0x2a1b1f={}){const _0x45ea5b=_0x455012,{envNames:envNames=null,compact:compact=!![]}=_0x2a1b1f,_0x41c37b=this[_0x45ea5b(0x7f8)],_0x8afca0=_0x32b1a2[_0x45ea5b(0x400)](_0x41c37b['path']),_0xe43494=_0x32b1a2[_0x45ea5b(0x400)](_0x5a5ea9),_0x504cb8=_0x32b1a2[_0x45ea5b(0x4f0)](_0x8afca0,_0xe43494);if(_0x504cb8===''||!(_0x504cb8[_0x45ea5b(0x5e1)]('..')||_0x32b1a2[_0x45ea5b(0x1dc)](_0x504cb8)))throw new _0x5cf14c('backup\x20destination\x20\x22'+_0xe43494+'\x22\x20is\x20inside\x20the\x20store\x20\x22'+_0x8afca0+_0x45ea5b(0x1f7),'BACKUP_DEST_INSIDE_STORE');if(_0x1e7640[_0x45ea5b(0x4e5)](_0xe43494)&&_0x1e7640[_0x45ea5b(0x35c)](_0xe43494)['length']>0x0)throw new _0x5cf14c(_0x45ea5b(0x712)+_0xe43494+_0x45ea5b(0x826),'BACKUP_DEST_NOT_EMPTY');_0x1e7640[_0x45ea5b(0x642)](_0xe43494,{'recursive':!![]});const _0x38d496=envNames?new Set([...envNames,_0x45ea5b(0x827)]):null,_0x5428b1=[],_0x1df73d=[],_0x145d45=[];for(const [_0x40fa57,_0xfdf1ed]of[..._0x41c37b['_envs'][_0x45ea5b(0x444)]()]){if(_0x38d496&&!_0x38d496[_0x45ea5b(0x6f1)](_0x40fa57))continue;if(_0x40fa57===_0x45ea5b(0x853))continue;if(!_0xfdf1ed[_0x45ea5b(0x4ce)]||!_0xfdf1ed['db']){_0x1df73d['push']({'name':_0x40fa57,'reason':'not\x20open'});continue;}const _0x304dc7=_0x32b1a2['resolve'](_0xfdf1ed[_0x45ea5b(0x1de)]),_0x3c3491=_0x32b1a2[_0x45ea5b(0x4f0)](_0x8afca0,_0x304dc7),_0xafa485=_0x3c3491===''||_0x3c3491[_0x45ea5b(0x5e1)]('..')||_0x32b1a2[_0x45ea5b(0x1dc)](_0x3c3491),_0x5d04bd=_0xafa485?_0x41c37b[_0x45ea5b(0x693)](_0x40fa57):_0x3c3491,_0x5341d9=_0x32b1a2[_0x45ea5b(0x86d)](_0xe43494,_0x5d04bd);_0x1e7640[_0x45ea5b(0x642)](_0x5341d9,{'recursive':!![]});const _0x2f96ee=_0x32b1a2[_0x45ea5b(0x86d)](_0x304dc7,'time-machine');let _0x9ca514=![];if(_0x1e7640[_0x45ea5b(0x4e5)](_0x32b1a2[_0x45ea5b(0x86d)](_0x2f96ee,_0x45ea5b(0x5e5)))){const _0x16b5e0=_0x32b1a2[_0x45ea5b(0x86d)](_0x5341d9,_0x45ea5b(0x698));_0x1e7640[_0x45ea5b(0x642)](_0x16b5e0,{'recursive':!![]}),await _0x6f25b7(_0xfdf1ed[_0x45ea5b(0x3a4)]?.[_0x45ea5b(0x85f)]?.['db'],_0x2f96ee,_0x16b5e0,compact),_0x9ca514=!![];}let _0x3c75e1=0x0;try{_0x3c75e1=_0x1e7640[_0x45ea5b(0x267)](_0x32b1a2[_0x45ea5b(0x86d)](_0x304dc7,_0x45ea5b(0x5e5)))[_0x45ea5b(0x4a8)];}catch{}await _0xfdf1ed['db']['backup'](_0x5341d9,Boolean(compact));let _0x2dbd31=0x0;try{_0x2dbd31=_0x1e7640[_0x45ea5b(0x267)](_0x32b1a2['join'](_0x5341d9,'data.mdb'))[_0x45ea5b(0x4a8)];}catch{}_0x5428b1[_0x45ea5b(0x338)]({'name':_0x40fa57,'dest':_0x5341d9,'sizeBefore':_0x3c75e1,'sizeAfter':_0x2dbd31,'timeMachine':_0x9ca514}),_0x145d45[_0x45ea5b(0x338)]({'name':_0x40fa57,'dir':_0x5d04bd,'timeMachine':_0x9ca514,..._0xafa485?{'outOfTree':_0xafa485,'sourcePath':_0x304dc7}:{}});}for(const [_0x56a358,_0x2a1bb2]of _0x41c37b[_0x45ea5b(0x899)]??[]){if(_0x38d496&&!_0x38d496[_0x45ea5b(0x6f1)](_0x56a358))continue;_0x1df73d[_0x45ea5b(0x338)]({'name':_0x56a358,'reason':_0x45ea5b(0x8a4)+(_0x2a1bb2?.[_0x45ea5b(0x21f)]??_0x45ea5b(0x4ba))});}const _0xf36952={'count':0x0,'bytes':0x0},_0x394ffa=_0x41c37b['files']?.[_0x45ea5b(0x3dd)];_0x394ffa&&_0x1e7640[_0x45ea5b(0x4e5)](_0x394ffa)&&await this[_0x45ea5b(0x3ed)](_0x394ffa,_0x32b1a2[_0x45ea5b(0x86d)](_0xe43494,_0x45ea5b(0x653)),_0xf36952,(_0x15ff2a,_0x3728b3)=>_0x3728b3===0x0&&_0x15ff2a==='tmp');const _0x2453ac=_0x32b1a2['join'](_0xe43494,_0x32f022),_0x38fff8={'format':0x1,'okdbVersion':require$$3[_0x45ea5b(0x24a)],'createdAt':new Date()[_0x45ea5b(0x362)](),'source':_0x8afca0,'compact':Boolean(compact),'envs':_0x145d45,'blobs':_0xf36952,'skipped':_0x1df73d,'excluded':{'~fts':_0x45ea5b(0x657),'~processes':_0x45ea5b(0x26e)}};return _0x1e7640[_0x45ea5b(0x43e)](_0x2453ac,JSON[_0x45ea5b(0x46c)](_0x38fff8,null,0x2)+'\x0a'),{'ok':!![],'dest':_0xe43494,'envs':_0x5428b1,'blobs':_0xf36952,'skipped':_0x1df73d,'manifest':_0x2453ac};}[_0x455012(0x292)](){const _0x50a9a8=_0x455012,_0x482d31=this[_0x50a9a8(0x7f8)][_0x50a9a8(0x663)]?.[_0x50a9a8(0x811)]?.['root'];if(_0x482d31)return _0x32b1a2[_0x50a9a8(0x400)](_0x482d31);const _0x297a19=_0x32b1a2[_0x50a9a8(0x400)](this[_0x50a9a8(0x7f8)][_0x50a9a8(0x1de)]);return _0x32b1a2[_0x50a9a8(0x86d)](_0x32b1a2[_0x50a9a8(0x815)](_0x297a19),_0x32b1a2[_0x50a9a8(0x215)](_0x297a19)+_0x50a9a8(0x33b));}[_0x455012(0x3e5)](_0x3ad5e9){const _0xb230e3=_0x455012,_0x2ee0fc=this['backupRoot']();_0x1e7640[_0xb230e3(0x642)](_0x2ee0fc,{'recursive':!![]});const _0x5d5cb1=_0x1e7640[_0xb230e3(0x390)](_0x2ee0fc),_0x20db8b=_0x3ad5e9==null||String(_0x3ad5e9)[_0xb230e3(0x543)]()===''?_0xb230e3(0x699)+new Date()[_0xb230e3(0x362)]()[_0xb230e3(0x2f9)](/[:.]/g,'-'):String(_0x3ad5e9)[_0xb230e3(0x543)](),_0x2f397f=_0x32b1a2['resolve'](_0x2ee0fc,_0x20db8b);let _0x27a66=_0x2f397f;const _0x49a2c0=[];while(!_0x1e7640[_0xb230e3(0x4e5)](_0x27a66)){_0x49a2c0[_0xb230e3(0x1e8)](_0x32b1a2[_0xb230e3(0x215)](_0x27a66));const _0x5ad1d9=_0x32b1a2[_0xb230e3(0x815)](_0x27a66);if(_0x5ad1d9===_0x27a66)break;_0x27a66=_0x5ad1d9;}const _0x473583=_0x32b1a2['join'](_0x1e7640['realpathSync'](_0x27a66),..._0x49a2c0),_0x27f744=_0x32b1a2[_0xb230e3(0x4f0)](_0x5d5cb1,_0x473583);if(_0x27f744===''||_0x27f744[_0xb230e3(0x5e1)]('..')||_0x32b1a2[_0xb230e3(0x1dc)](_0x27f744))throw new _0x5cf14c(_0xb230e3(0x712)+_0x20db8b+_0xb230e3(0x2e0)+_0x2ee0fc+'\x22\x20—\x20pass\x20a\x20path\x20relative\x20to\x20it\x20(configure\x20with\x20the\x20`backup.root`\x20option)',_0xb230e3(0x50a),{'root':_0x2ee0fc,'destDir':_0x20db8b});return{'root':_0x2ee0fc,'dest':_0x473583};}async[_0x455012(0x3ed)](_0x5f198e,_0x475b18,_0x1911c3={'count':0x0,'bytes':0x0},_0x27deac=null,_0x28985a=0x0){const _0x363d3c=_0x455012;_0x1e7640[_0x363d3c(0x642)](_0x475b18,{'recursive':!![]});for(const _0x1f0175 of _0x1e7640[_0x363d3c(0x35c)](_0x5f198e,{'withFileTypes':!![]})){if(_0x27deac?.(_0x1f0175[_0x363d3c(0x2a9)],_0x28985a))continue;const _0xd012bf=_0x32b1a2['join'](_0x5f198e,_0x1f0175['name']),_0x14d034=_0x32b1a2[_0x363d3c(0x86d)](_0x475b18,_0x1f0175[_0x363d3c(0x2a9)]);if(_0x1f0175['isDirectory']())await this['_copyDir'](_0xd012bf,_0x14d034,_0x1911c3,_0x27deac,_0x28985a+0x1);else{try{await _0x1e7640[_0x363d3c(0x25b)]['copyFile'](_0xd012bf,_0x14d034);}catch(_0x22cd30){if(_0x22cd30?.[_0x363d3c(0x5f9)]==='ENOENT')continue;throw _0x22cd30;}_0x1911c3[_0x363d3c(0x2a3)]++;try{_0x1911c3['bytes']+=_0x1e7640['statSync'](_0x14d034)[_0x363d3c(0x4a8)];}catch{}}}return _0x1911c3;}async[_0x455012(0x286)](_0x47aaea={}){const _0x494a4c=_0x455012,{envName:envName=_0x494a4c(0x2dc),types:types=null,includeChanges:includeChanges=![]}=_0x47aaea,_0x1945e6={'types':{},'changes':[]},_0x2e0586=[],_0x586805=new require$$5[(_0x494a4c(0x36e))]({'write'(_0x1520fe,_0x4e37ff,_0x3c85df){_0x2e0586['push'](String(_0x1520fe)),_0x3c85df();}});await this[_0x494a4c(0x5b1)](_0x586805,{'envName':envName,'types':types,'includeChanges':includeChanges});for(const _0x4cb58c of _0x2e0586[_0x494a4c(0x86d)]('')[_0x494a4c(0x735)]('\x0a')){const _0x3198fe=_0x4cb58c['trim']();if(!_0x3198fe)continue;let _0x1d2aa8;try{_0x1d2aa8=JSON[_0x494a4c(0x81a)](_0x3198fe);}catch{continue;}if(_0x1d2aa8['r']===_0x177fe8){if(!_0x1945e6[_0x494a4c(0x732)][_0x1d2aa8[_0x494a4c(0x70d)]])_0x1945e6[_0x494a4c(0x732)][_0x1d2aa8[_0x494a4c(0x70d)]]={'entries':[]};if(_0x1d2aa8[_0x494a4c(0x8c6)])_0x1945e6[_0x494a4c(0x732)][_0x1d2aa8['type']][_0x494a4c(0x8c6)]=_0x1d2aa8[_0x494a4c(0x8c6)];if(_0x1d2aa8[_0x494a4c(0x690)])_0x1945e6['types'][_0x1d2aa8[_0x494a4c(0x70d)]]['ftsIndexes']=_0x1d2aa8[_0x494a4c(0x690)];if(_0x1d2aa8[_0x494a4c(0x534)])_0x1945e6[_0x494a4c(0x732)][_0x1d2aa8[_0x494a4c(0x70d)]][_0x494a4c(0x534)]=_0x1d2aa8['schema'];}else{if(_0x1d2aa8['r']===_0x22150d){if(!_0x1945e6[_0x494a4c(0x732)][_0x1d2aa8['t']])_0x1945e6[_0x494a4c(0x732)][_0x1d2aa8['t']]={'entries':[]};_0x1945e6[_0x494a4c(0x732)][_0x1d2aa8['t']][_0x494a4c(0x444)][_0x494a4c(0x338)]({'key':_0x1d2aa8['k'],'value':_0x1d2aa8['v'],'version':_0x1d2aa8[_0x494a4c(0x28a)]});}else _0x1d2aa8['r']===_0xdf4c38&&_0x1945e6[_0x494a4c(0x7a2)][_0x494a4c(0x338)]({'clock':_0x1d2aa8[_0x494a4c(0x882)],'event':_0x1d2aa8[_0x494a4c(0x789)]});}}return _0x1945e6;}async[_0x455012(0x291)](_0x39898e,_0x19f53b={}){const _0x53860d=_0x455012,_0x21c176=[];for(const [_0x31eee8,_0x7d3274]of Object[_0x53860d(0x444)](_0x39898e[_0x53860d(0x732)]||{})){const _0x1ddc81={'r':_0x177fe8,'type':_0x31eee8,'indexes':_0x7d3274[_0x53860d(0x8c6)]||[],'ftsIndexes':_0x7d3274[_0x53860d(0x690)]||{}};if(_0x7d3274['schema'])_0x1ddc81[_0x53860d(0x534)]=_0x7d3274[_0x53860d(0x534)];_0x21c176[_0x53860d(0x338)](JSON[_0x53860d(0x46c)](_0x1ddc81));for(const {key:_0x26fb54,value:_0x5157b5,version:_0x2e98fb}of _0x7d3274[_0x53860d(0x444)]||[]){_0x21c176[_0x53860d(0x338)](JSON['stringify']({'r':_0x22150d,'t':_0x31eee8,'k':_0x26fb54,'v':_0x5157b5,'ver':_0x2e98fb}));}}for(const {clock:_0x29d7d0,event:_0x35c444}of _0x39898e[_0x53860d(0x7a2)]||[]){_0x21c176[_0x53860d(0x338)](JSON['stringify']({'r':_0xdf4c38,'clock':_0x29d7d0,'event':_0x35c444}));}const {Readable:_0x4f7a68}=require$$5,_0x45930e=_0x4f7a68['from'](_0x21c176[_0x53860d(0x86d)]('\x0a')+'\x0a');return this[_0x53860d(0x6fb)](_0x45930e,{..._0x19f53b,'dropExisting':_0x19f53b[_0x53860d(0x62e)]??!![]});}async[_0x455012(0x53a)]({pretty:pretty=![]}={}){const _0x2e072e=_0x455012,_0x546423=await this[_0x2e072e(0x286)]();return JSON['stringify'](_0x546423,null,pretty?0x2:0x0);}async[_0x455012(0x3eb)](_0x18db0b){const _0x3ced83=_0x455012,_0x13d341=JSON[_0x3ced83(0x81a)](_0x18db0b);return this[_0x3ced83(0x291)](_0x13d341);}async['exportBlobs'](_0x5eb050){const _0x493d9b=_0x455012;if(!this[_0x493d9b(0x7f8)][_0x493d9b(0x874)])throw new Error(_0x493d9b(0x779));const _0x43a9bf=this[_0x493d9b(0x7f8)][_0x493d9b(0x874)]['_blobsDir'];let _0x221946=0x0,_0x322a17=0x0;const _0x31823c=_0xab641b=>{const _0x4d3925=_0x493d9b;if(!_0x1e7640['existsSync'](_0xab641b))return;for(const _0x46c87b of _0x1e7640[_0x4d3925(0x35c)](_0xab641b,{'withFileTypes':!![]})){const _0x138eaf=_0x32b1a2[_0x4d3925(0x86d)](_0xab641b,_0x46c87b['name']);if(_0x46c87b[_0x4d3925(0x750)]()){if(_0x46c87b['name']===_0x4d3925(0x837))continue;_0x31823c(_0x138eaf);}else{const _0xe9f1d9=_0x32b1a2[_0x4d3925(0x215)](_0x32b1a2[_0x4d3925(0x815)](_0x138eaf)),_0x9813a7=_0xe9f1d9+_0x46c87b['name'],_0x1da2ad=_0x32b1a2['join'](_0x5eb050,_0x9813a7[_0x4d3925(0x556)](0x0,0x2)),_0x2bb4fc=_0x32b1a2[_0x4d3925(0x86d)](_0x1da2ad,_0x9813a7[_0x4d3925(0x556)](0x2));_0x1e7640[_0x4d3925(0x642)](_0x1da2ad,{'recursive':!![]}),_0x1e7640[_0x4d3925(0x8b1)](_0x138eaf,_0x2bb4fc),_0x221946++;try{_0x322a17+=_0x1e7640[_0x4d3925(0x267)](_0x138eaf)[_0x4d3925(0x4a8)];}catch{}}}};return _0x1e7640[_0x493d9b(0x642)](_0x5eb050,{'recursive':!![]}),_0x31823c(_0x43a9bf),{'count':_0x221946,'bytes':_0x322a17};}async[_0x455012(0x4de)](_0xa7c5d8){const _0x1ea0e8=_0x455012;if(!this[_0x1ea0e8(0x7f8)][_0x1ea0e8(0x874)])throw new Error(_0x1ea0e8(0x779));await this[_0x1ea0e8(0x7f8)][_0x1ea0e8(0x874)][_0x1ea0e8(0x854)]();let _0x19875b=0x0,_0x361ff2=0x0;const _0x319881=_0x20ea1b=>{const _0x4b2631=_0x1ea0e8;if(!_0x1e7640[_0x4b2631(0x4e5)](_0x20ea1b))return;for(const _0x2da99e of _0x1e7640[_0x4b2631(0x35c)](_0x20ea1b,{'withFileTypes':!![]})){const _0x405bab=_0x32b1a2[_0x4b2631(0x86d)](_0x20ea1b,_0x2da99e['name']);if(_0x2da99e[_0x4b2631(0x750)]())_0x319881(_0x405bab);else{const _0x5b2e8a=_0x32b1a2['basename'](_0x32b1a2['dirname'](_0x405bab)),_0x914d3d=_0x5b2e8a+_0x2da99e['name'],_0x160a30=this[_0x4b2631(0x7f8)]['files'][_0x4b2631(0x2c0)](_0x914d3d);if(_0x1e7640['existsSync'](_0x160a30)){_0x361ff2++;continue;}const _0x43fac3=_0x32b1a2[_0x4b2631(0x815)](_0x160a30);_0x1e7640[_0x4b2631(0x642)](_0x43fac3,{'recursive':!![]}),_0x1e7640[_0x4b2631(0x8b1)](_0x405bab,_0x160a30);const _0xd58ce5=this[_0x4b2631(0x7f8)][_0x4b2631(0x874)]['_countFileRefs'](_0x914d3d);this[_0x4b2631(0x7f8)][_0x4b2631(0x874)][_0x4b2631(0x4a9)]?.[_0x4b2631(0x6d8)](_0x914d3d,{'refs':_0xd58ce5}),_0x19875b++;}}};return _0x319881(_0xa7c5d8),{'imported':_0x19875b,'skipped':_0x361ff2};}['_allEnvsWithFiles'](){const _0x469b92=_0x455012,_0x62aaba=[];for(const [,_0x308fe5]of this['okdb'][_0x469b92(0x828)]){if(_0x308fe5[_0x469b92(0x69d)]&&_0x308fe5[_0x469b92(0x708)]('~files'))_0x62aaba[_0x469b92(0x338)](_0x308fe5);}return _0x62aaba;}async['validateBlobIntegrity'](){const _0xc073cb=_0x455012;if(!this[_0xc073cb(0x7f8)]['files'])throw new Error('files\x20feature\x20not\x20available');await this['okdb'][_0xc073cb(0x874)][_0xc073cb(0x854)]();const _0x485cda=[],_0xab3e1f=this[_0xc073cb(0x7f8)][_0xc073cb(0x874)];for(const _0xa06a4c of this[_0xc073cb(0x65e)]()){for(const {key:_0x26fa2e,value:_0x54f985}of _0xa06a4c[_0xc073cb(0x754)](_0xc073cb(0x7f4))){if(!_0x54f985['hash'])continue;const _0x5e737a=_0xab3e1f[_0xc073cb(0x2c0)](_0x54f985[_0xc073cb(0x614)]);!_0x1e7640[_0xc073cb(0x4e5)](_0x5e737a)&&_0x485cda[_0xc073cb(0x338)]({'type':_0xc073cb(0x5db),'env':_0xa06a4c[_0xc073cb(0x2a9)],'id':String(_0x26fa2e),'hash':_0x54f985[_0xc073cb(0x614)],'message':_0xc073cb(0x7a8)+_0x26fa2e+_0xc073cb(0x360)+_0xa06a4c['name']+_0xc073cb(0x628)+_0x54f985[_0xc073cb(0x614)][_0xc073cb(0x556)](0x0,0x8)+'…)'});const _0x2b990e=_0xab3e1f[_0xc073cb(0x4a9)]?.['get'](_0x54f985['hash']);(!_0x2b990e||_0x2b990e[_0xc073cb(0x2de)]<=0x0)&&_0x485cda[_0xc073cb(0x338)]({'type':_0xc073cb(0x65d),'env':_0xa06a4c[_0xc073cb(0x2a9)],'id':String(_0x26fa2e),'hash':_0x54f985['hash'],'message':_0xc073cb(0x82f)+_0x26fa2e+_0xc073cb(0x360)+_0xa06a4c[_0xc073cb(0x2a9)]+'\x22\x20(hash:\x20'+_0x54f985[_0xc073cb(0x614)]['slice'](0x0,0x8)+'…)'});}}const _0x42e674=new Set();for(const _0x5761bd of this[_0xc073cb(0x65e)]()){for(const {value:_0xa654b}of _0x5761bd['getRange'](_0xc073cb(0x7f4))){if(_0xa654b['hash'])_0x42e674['add'](_0xa654b['hash']);}}const _0x330d50=_0x12beef=>{const _0x408054=_0xc073cb;if(!_0x1e7640['existsSync'](_0x12beef))return;for(const _0x142516 of _0x1e7640[_0x408054(0x35c)](_0x12beef,{'withFileTypes':!![]})){const _0x1a7016=_0x32b1a2[_0x408054(0x86d)](_0x12beef,_0x142516['name']);if(_0x142516[_0x408054(0x750)]()){if(_0x142516[_0x408054(0x2a9)]==='tmp')continue;_0x330d50(_0x1a7016);}else{const _0xfdd161=_0x32b1a2[_0x408054(0x215)](_0x32b1a2[_0x408054(0x815)](_0x1a7016)),_0x5d38e8=_0xfdd161+_0x142516[_0x408054(0x2a9)];!_0x42e674[_0x408054(0x6f1)](_0x5d38e8)&&_0x485cda[_0x408054(0x338)]({'type':'orphan_blob','hash':_0x5d38e8,'message':_0x408054(0x39c)+_0x5d38e8[_0x408054(0x556)](0x0,0x8)+'…)'});}}};return _0x330d50(_0xab3e1f[_0xc073cb(0x3dd)]),_0x485cda;}async['repairBlobRefs'](){const _0x12aa91=_0x455012;if(!this[_0x12aa91(0x7f8)]['files'])throw new Error(_0x12aa91(0x779));await this[_0x12aa91(0x7f8)]['files'][_0x12aa91(0x854)]();const _0x4a848e=this[_0x12aa91(0x7f8)][_0x12aa91(0x874)][_0x12aa91(0x4a9)];if(!_0x4a848e)throw new Error(_0x12aa91(0x1bb));const _0x368ad0=[];for(const {key:_0x581b21}of _0x4a848e[_0x12aa91(0x754)]())_0x368ad0[_0x12aa91(0x338)](_0x581b21);for(const _0x17c6b6 of _0x368ad0)_0x4a848e['removeSync'](_0x17c6b6);const _0x169a38=new Map();for(const _0x276a79 of this[_0x12aa91(0x65e)]()){for(const {value:_0xa81774}of _0x276a79[_0x12aa91(0x754)](_0x12aa91(0x7f4))){_0xa81774[_0x12aa91(0x614)]&&_0x169a38['set'](_0xa81774['hash'],(_0x169a38[_0x12aa91(0x5ab)](_0xa81774[_0x12aa91(0x614)])??0x0)+0x1);}}for(const [_0x4c0a20,_0x395085]of _0x169a38){_0x4a848e[_0x12aa91(0x6d8)](_0x4c0a20,{'refs':_0x395085});}return{'rebuilt':_0x169a38['size']};}}return okdbMigrate[_0x455012(0x47d)]=_0x8582cc,okdbMigrate[_0x455012(0x47d)][_0x455012(0x8a6)]=_0x32f022,okdbMigrate[_0x455012(0x47d)];}var okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x3006aa=require$$2$1;function _0x1a0170(_0x5f3eef,_0xfc6957){const _0x46e4fd=_0x1684;return _0x3006aa[_0x46e4fd(0x399)]('sha256',_0xfc6957)['update'](_0x5f3eef)['digest'](_0x46e4fd(0x68f));}function _0x351752(_0x473630,_0x5de498){const _0x3d90da=_0x1684;if(typeof _0x473630!==_0x3d90da(0x2b2)||typeof _0x5de498!==_0x3d90da(0x2b2))return![];if(Buffer[_0x3d90da(0x6e0)](_0x473630)!==Buffer[_0x3d90da(0x6e0)](_0x5de498))return![];return _0x3006aa[_0x3d90da(0x675)](Buffer[_0x3d90da(0x4e1)](_0x473630),Buffer[_0x3d90da(0x4e1)](_0x5de498));}function _0x7ef631(_0x77c2a0){const _0xa1a224=_0x1684;if(!_0x77c2a0?.[_0xa1a224(0x5e1)](_0xa1a224(0x4d3)))return null;return _0x77c2a0[_0xa1a224(0x556)](0x7);}function _0x22c9f3(_0x585335=0x20){const _0x135099=_0x1684;return _0x3006aa[_0x135099(0x346)](_0x585335)[_0x135099(0x1f5)](_0x135099(0x68f));}function _0x27f15e(_0x3c4237){const _0xf711b6=_0x1684;return _0x3006aa['createHash'](_0xf711b6(0x33d))[_0xf711b6(0x67f)](_0x3c4237)['digest'](_0xf711b6(0x45a));}function _0x362064(_0x548c1d,_0x308e12,_0x6449b0=0x36ee80){const _0x4ad523=_0x1684;if(!_0x308e12)throw new Error('Token\x20secret\x20not\x20configured');const _0x1bab9a=Date['now'](),_0x49884b=Buffer[_0x4ad523(0x4e1)](JSON[_0x4ad523(0x46c)]({'iat':_0x1bab9a,'exp':_0x1bab9a+_0x6449b0,'sub':_0x548c1d?.['id']??_0x548c1d?.[_0x4ad523(0x208)]??null,'username':_0x548c1d?.[_0x4ad523(0x6c3)]??_0x548c1d?.[_0x4ad523(0x2a9)]??null,'roles':Array['isArray'](_0x548c1d?.[_0x4ad523(0x5df)])?_0x548c1d[_0x4ad523(0x5df)]:[]}))[_0x4ad523(0x1f5)](_0x4ad523(0x68f)),_0x3ac445=_0x1a0170(_0x49884b,_0x308e12);return _0x49884b+'.'+_0x3ac445;}function _0x50dbc8(_0x48a85b,_0x16359c){const _0x44c6b6=_0x1684;if(!_0x16359c||typeof _0x48a85b!=='string')return null;const [_0x4a6f9b,_0x289b30]=_0x48a85b[_0x44c6b6(0x735)]('.');if(!_0x4a6f9b||!_0x289b30)return null;const _0x2779a7=_0x1a0170(_0x4a6f9b,_0x16359c);if(!_0x351752(_0x289b30,_0x2779a7))return null;try{const _0x496285=JSON[_0x44c6b6(0x81a)](Buffer[_0x44c6b6(0x4e1)](_0x4a6f9b,_0x44c6b6(0x68f))[_0x44c6b6(0x1f5)]()),_0x1af82b=0x7530;if(Date[_0x44c6b6(0x81b)]()>Number(_0x496285?.['exp']??0x0)+_0x1af82b)return null;return _0x496285;}catch{return null;}}async function _0xdb53c7(_0x4ae63){return new Promise((_0x3225a3,_0x47468c)=>{const _0x32ea3e=_0x1684,_0x1d2c71=_0x3006aa['randomBytes'](0x10);_0x3006aa[_0x32ea3e(0x4f7)](_0x4ae63,_0x1d2c71,0x40,(_0x17b2cd,_0xbb203a)=>{const _0x3bbe22=_0x32ea3e;if(_0x17b2cd)return _0x47468c(_0x17b2cd);_0x3225a3(_0x1d2c71['toString'](_0x3bbe22(0x45a))+':'+_0xbb203a['toString']('hex'));});});}async function _0x56381a(_0x4d1ee0,_0xd70d65){const _0x512695=_0x1684;if(typeof _0xd70d65!==_0x512695(0x2b2))return![];const [_0x455cce,_0x5359f2]=_0xd70d65[_0x512695(0x735)](':');if(!_0x455cce||!_0x5359f2)return![];const _0x307fa4=Buffer[_0x512695(0x4e1)](_0x455cce,_0x512695(0x45a)),_0x4c5274=Buffer[_0x512695(0x4e1)](_0x5359f2,_0x512695(0x45a));if(_0x4c5274['length']!==0x40)return![];return new Promise((_0x415ea3,_0x28e117)=>{const _0x196406=_0x512695;_0x3006aa[_0x196406(0x4f7)](_0x4d1ee0,_0x307fa4,0x40,(_0x171c52,_0x3c21d5)=>{const _0x17921b=_0x196406;if(_0x171c52)return _0x28e117(_0x171c52);_0x415ea3(_0x3006aa[_0x17921b(0x675)](_0x3c21d5,_0x4c5274));});});}return okdbAuthTokens={'hmac':_0x1a0170,'timingSafeEqual':_0x351752,'parseBearer':_0x7ef631,'randomToken':_0x22c9f3,'hashToken':_0x27f15e,'issueToken':_0x362064,'authenticateToken':_0x50dbc8,'hashPassword':_0xdb53c7,'verifyPassword':_0x56381a},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0xe1bfe=_0x32d6b8;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x3c690c=require$$0$2,_0x4c44fc=_0xe1bfe(0x56c),_0x5e7c6f=new Uint8Array(0x100)[_0xe1bfe(0x324)](0xff);for(let _0x377681=0x0;_0x377681<_0x4c44fc['length'];_0x377681++){_0x5e7c6f[_0x4c44fc[_0xe1bfe(0x5fd)](_0x377681)]=_0x377681,_0x5e7c6f[_0x4c44fc['charCodeAt'](_0x377681)+0x20]=_0x377681;}_0x5e7c6f['O'[_0xe1bfe(0x5fd)](0x0)]=0x0,_0x5e7c6f['o'[_0xe1bfe(0x5fd)](0x0)]=0x0,_0x5e7c6f['I'[_0xe1bfe(0x5fd)](0x0)]=0x1,_0x5e7c6f['i'['charCodeAt'](0x0)]=0x1,_0x5e7c6f['L'[_0xe1bfe(0x5fd)](0x0)]=0x1,_0x5e7c6f['l'['charCodeAt'](0x0)]=0x1;function _0x3f5d10(_0x2054a9){const _0x339487=_0xe1bfe;let _0x242327=0x0,_0xa656c6=0x0,_0x1f5b99='';for(let _0x284c1a=0x0;_0x284c1a<_0x2054a9[_0x339487(0x3be)];_0x284c1a++){_0xa656c6=_0xa656c6<<0x8|_0x2054a9[_0x284c1a],_0x242327+=0x8;while(_0x242327>=0x5){_0x242327-=0x5,_0x1f5b99+=_0x4c44fc[_0xa656c6>>>_0x242327&0x1f];}}return _0x242327>0x0&&(_0x1f5b99+=_0x4c44fc[_0xa656c6<<0x5-_0x242327&0x1f]),_0x1f5b99;}function _0x161b44(_0x444280){const _0x19871f=_0xe1bfe;_0x444280=_0x444280[_0x19871f(0x2f9)](/-/g,'')[_0x19871f(0x589)]();let _0x115323=0x0,_0x27b000=0x0;const _0x951ca=[];for(let _0x55472c=0x0;_0x55472c<_0x444280['length'];_0x55472c++){const _0x41a917=_0x5e7c6f[_0x444280[_0x19871f(0x5fd)](_0x55472c)];if(_0x41a917===0xff)continue;_0x27b000=_0x27b000<<0x5|_0x41a917,_0x115323+=0x5,_0x115323>=0x8&&(_0x115323-=0x8,_0x951ca[_0x19871f(0x338)](_0x27b000>>>_0x115323&0xff));}return Buffer['from'](_0x951ca);}const _0x592676=[_0xe1bfe(0x461),_0xe1bfe(0x659),_0xe1bfe(0x71a),_0xe1bfe(0x6ca),_0xe1bfe(0x3a4),_0xe1bfe(0x41f),'mcp','files'],_0x28b483=0x0,_0x54a204=0x1,_0x1383da=0x2,_0x269ace=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x1b9e7a({issuedAt:_0x28af24,expiresAt:_0x4447ab,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x28b483}){const _0x2b83a4=_0xe1bfe,_0x198c0b=Buffer[_0x2b83a4(0x4e1)](licensee,_0x2b83a4(0x6ec))[_0x2b83a4(0x556)](0x0,0x40),_0xd12493=0x1+0x1+0x4+0x4+0x1+_0x198c0b[_0x2b83a4(0x3be)]+0x2+0x10,_0x2f164c=Buffer[_0x2b83a4(0x7cf)](_0xd12493);let _0x42703a=0x0;_0x2f164c[_0x2b83a4(0x7f1)](0x1,_0x42703a++),_0x2f164c[_0x2b83a4(0x7f1)](licenseType,_0x42703a++),_0x2f164c[_0x2b83a4(0x23e)](Math[_0x2b83a4(0x3a7)](_0x28af24/0x3e8),_0x42703a),_0x42703a+=0x4,_0x2f164c[_0x2b83a4(0x23e)](Math[_0x2b83a4(0x3a7)](_0x4447ab/0x3e8),_0x42703a),_0x42703a+=0x4,_0x2f164c[_0x2b83a4(0x7f1)](_0x198c0b[_0x2b83a4(0x3be)],_0x42703a++),_0x198c0b[_0x2b83a4(0x408)](_0x2f164c,_0x42703a),_0x42703a+=_0x198c0b[_0x2b83a4(0x3be)];let _0x50ea17=0x0;for(let _0x4bd7d6=0x0;_0x4bd7d6<_0x592676[_0x2b83a4(0x3be)];_0x4bd7d6++){if(features[_0x592676[_0x4bd7d6]])_0x50ea17|=0x1<<_0x4bd7d6;}_0x2f164c[_0x2b83a4(0x700)](_0x50ea17,_0x42703a),_0x42703a+=0x2;const _0x341fd6=[_0x2b83a4(0x576),_0x2b83a4(0x77b),_0x2b83a4(0x840),_0x2b83a4(0x4bf)];for(const _0x161b96 of _0x341fd6){_0x2f164c[_0x2b83a4(0x23e)](limits[_0x161b96]||0x0,_0x42703a),_0x42703a+=0x4;}return _0x2f164c;}function _0x27fc88(_0x3f7d04){const _0x32431a=_0xe1bfe;let _0x39c6c0=0x0;const _0x1335d5=_0x3f7d04[_0x32431a(0x830)](_0x39c6c0++),_0x5c35eb=_0x3f7d04[_0x32431a(0x830)](_0x39c6c0++),_0x5bdd4a=_0x3f7d04[_0x32431a(0x62a)](_0x39c6c0);_0x39c6c0+=0x4;const _0xbc638=_0x3f7d04[_0x32431a(0x62a)](_0x39c6c0);_0x39c6c0+=0x4;const _0x5a1034=_0x3f7d04[_0x32431a(0x830)](_0x39c6c0++),_0x3e0417=_0x3f7d04[_0x32431a(0x556)](_0x39c6c0,_0x39c6c0+_0x5a1034)['toString'](_0x32431a(0x6ec));_0x39c6c0+=_0x5a1034;const _0x43938a=_0x3f7d04['readUInt16BE'](_0x39c6c0);_0x39c6c0+=0x2;const _0x5b907e={};for(let _0x3967ad=0x0;_0x3967ad<_0x592676['length'];_0x3967ad++){_0x5b907e[_0x592676[_0x3967ad]]=Boolean(_0x43938a&0x1<<_0x3967ad);}const _0x48ef61=[_0x32431a(0x576),_0x32431a(0x77b),_0x32431a(0x840),_0x32431a(0x4bf)],_0x2c17f6={};for(const _0x5baf65 of _0x48ef61){const _0x36ba05=_0x3f7d04[_0x32431a(0x62a)](_0x39c6c0);_0x39c6c0+=0x4,_0x2c17f6[_0x5baf65]=_0x36ba05===0x0?null:_0x36ba05;}return{'v':_0x1335d5,'licenseType':_0x5c35eb,'issuedAt':_0x5bdd4a*0x3e8,'expiresAt':_0xbc638*0x3e8,'licensee':_0x3e0417,'features':_0x5b907e,'limits':_0x2c17f6};}function _0x4b72ff(_0x38d2a5,_0x587742){const _0x4ab041=_0xe1bfe,_0x439c81=Buffer['concat']([_0x38d2a5,_0x587742]),_0x2667b8=_0x3f5d10(_0x439c81),_0x509bb9=[];for(let _0x23dba7=0x0;_0x23dba7<_0x2667b8[_0x4ab041(0x3be)];_0x23dba7+=0x8){_0x509bb9['push'](_0x2667b8[_0x4ab041(0x556)](_0x23dba7,_0x23dba7+0x8));}return _0x509bb9[_0x4ab041(0x86d)]('-');}function _0x36918d(_0x2dc69b){const _0x19832f=_0xe1bfe;if(typeof _0x2dc69b!==_0x19832f(0x2b2))throw new Error('decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string');const _0x1c7f30=_0x161b44(_0x2dc69b[_0x19832f(0x2f9)](/-/g,''));if(_0x1c7f30[_0x19832f(0x3be)]<0x41)throw new Error('decodeLicenseBlob:\x20blob\x20too\x20short\x20('+_0x1c7f30['length']+_0x19832f(0x881));const _0x273955=_0x1c7f30[_0x19832f(0x556)](0x0,_0x1c7f30[_0x19832f(0x3be)]-0x40),_0x27407=_0x1c7f30[_0x19832f(0x556)](_0x1c7f30['length']-0x40);let _0x119c7d;try{_0x119c7d=_0x27fc88(_0x273955);}catch(_0x281d31){throw new Error(_0x19832f(0x823)+_0x281d31[_0x19832f(0x439)]);}return{'rawBuf':_0x1c7f30,'payload':_0x273955,'sig':_0x27407,'decoded':_0x119c7d};}function _0x253366(_0x375687){const _0x507f82=_0xe1bfe;return _0x3c690c[_0x507f82(0x7d2)](_0x507f82(0x33d))[_0x507f82(0x67f)](_0x375687)[_0x507f82(0x313)]()[_0x507f82(0x556)](0x0,0x8);}function _0x2b1abe(_0x9c6e1f,_0x3f3532,_0x111035){const _0x53a0ea=_0xe1bfe,_0x5f3ad1='OKDB-PIN-V1:'+_0x111035,_0x582490=Buffer[_0x53a0ea(0x249)]([Buffer['from'](_0x9c6e1f,'utf8'),_0x3f3532]),_0x43a7d7=_0x3c690c[_0x53a0ea(0x399)](_0x53a0ea(0x33d),_0x5f3ad1)[_0x53a0ea(0x67f)](_0x582490)[_0x53a0ea(0x313)](),_0xa98e49=_0x3f5d10(_0x43a7d7[_0x53a0ea(0x556)](0x0,0x5));return{'pin':_0xa98e49,'pinHmac':_0x43a7d7};}function _0x57a11c(_0xbe5715,_0x407b0e,_0x288510){const _0x373b2f=_0xe1bfe,_0x3a2775=Buffer[_0x373b2f(0x7cf)](0x4d);let _0x3b963c=0x0;_0x3a2775[_0x373b2f(0x7f1)](0x1,_0x3b963c++),_0xbe5715[_0x373b2f(0x408)](_0x3a2775,_0x3b963c),_0x3b963c+=0x8,_0x3a2775[_0x373b2f(0x23e)](_0x407b0e,_0x3b963c),_0x3b963c+=0x4,_0x288510['copy'](_0x3a2775,_0x3b963c);const _0x3a9597=_0x3f5d10(_0x3a2775),_0x4cc1da=[];for(let _0x19836b=0x0;_0x19836b<_0x3a9597[_0x373b2f(0x3be)];_0x19836b+=0x6){_0x4cc1da[_0x373b2f(0x338)](_0x3a9597[_0x373b2f(0x556)](_0x19836b,_0x19836b+0x6));}return _0x4cc1da[_0x373b2f(0x86d)]('-');}function _0x3727b7(_0x195be5){const _0x5124b0=_0xe1bfe;if(typeof _0x195be5!==_0x5124b0(0x2b2))throw new Error(_0x5124b0(0x6f8));const _0x2a3da4=_0x161b44(_0x195be5['replace'](/-/g,''));if(_0x2a3da4[_0x5124b0(0x3be)]!==0x4d)throw new Error(_0x5124b0(0x568)+_0x2a3da4[_0x5124b0(0x3be)]);let _0x7c982b=0x0;const _0x4bd02c=_0x2a3da4[_0x5124b0(0x830)](_0x7c982b++),_0x314e1b=_0x2a3da4[_0x5124b0(0x556)](_0x7c982b,_0x7c982b+0x8);_0x7c982b+=0x8;const _0x1d573d=_0x2a3da4[_0x5124b0(0x62a)](_0x7c982b);_0x7c982b+=0x4;const _0x2975e6=_0x2a3da4[_0x5124b0(0x556)](_0x7c982b);return{'v':_0x4bd02c,'licenseHash':_0x314e1b,'expiry':_0x1d573d,'sig':_0x2975e6};}const _0x3ac727=0x100,_0x56ee1d=new Set(),_0x4b79a8=new Map();function _0x3877fd(_0x16420e,_0x25855b,_0x440450){const _0x27b85c=_0xe1bfe;if(typeof _0x440450!==_0x27b85c(0x2b2)||!Buffer['isBuffer'](_0x16420e)||!Buffer[_0x27b85c(0x200)](_0x25855b))return _0x3c690c[_0x27b85c(0x476)](null,_0x16420e,_0x440450,_0x25855b);const _0x6dcd5b=_0x440450+'\x0a'+_0x16420e[_0x27b85c(0x1f5)](_0x27b85c(0x70b))+'\x0a'+_0x25855b['toString'](_0x27b85c(0x70b));if(_0x56ee1d[_0x27b85c(0x6f1)](_0x6dcd5b))return!![];let _0x5a6988=_0x4b79a8[_0x27b85c(0x5ab)](_0x440450);if(!_0x5a6988){_0x5a6988=_0x3c690c[_0x27b85c(0x749)](_0x440450);if(_0x4b79a8['size']>=0x10)_0x4b79a8[_0x27b85c(0x2d8)]();_0x4b79a8[_0x27b85c(0x4dc)](_0x440450,_0x5a6988);}const _0x534425=_0x3c690c[_0x27b85c(0x476)](null,_0x16420e,_0x5a6988,_0x25855b)===!![];if(_0x534425){if(_0x56ee1d[_0x27b85c(0x4a8)]>=_0x3ac727)_0x56ee1d['clear']();_0x56ee1d[_0x27b85c(0x88a)](_0x6dcd5b);}return _0x534425;}function _0x5bb63d({tokenString:_0x24e77e,nodeId:_0x3a6528,rawBlobBuf:_0x3377e9,pubKeyPem:_0x519081,pubFingerprint:_0xfeeb43}){const _0x15a0ea=_0xe1bfe;let _0x23fc4e;try{_0x23fc4e=_0x3727b7(_0x24e77e);}catch(_0x5252b8){return{'valid':![],'reason':_0x15a0ea(0x6f4)};}const _0x38c84b=_0x253366(_0x3377e9);if(!_0x38c84b['equals'](_0x23fc4e['licenseHash']))return{'valid':![],'reason':'LICENSE_HASH_MISMATCH'};const {pinHmac:_0x14d554}=_0x2b1abe(_0x3a6528,_0x38c84b,_0xfeeb43),_0x3553e8=Buffer[_0x15a0ea(0x7cf)](0x4);_0x3553e8[_0x15a0ea(0x23e)](_0x23fc4e[_0x15a0ea(0x816)],0x0);const _0x163e5d=Buffer['concat']([Buffer[_0x15a0ea(0x4e1)]([_0x23fc4e['v']]),_0x14d554[_0x15a0ea(0x556)](0x0,0x5),_0x23fc4e[_0x15a0ea(0x64f)],_0x3553e8]);try{const _0x3eaad9=_0x3877fd(_0x163e5d,_0x23fc4e[_0x15a0ea(0x5f6)],_0x519081);if(!_0x3eaad9)return{'valid':![],'reason':_0x15a0ea(0x276)};}catch(_0x26ded4){return{'valid':![],'reason':_0x15a0ea(0x276)};}if(_0x23fc4e[_0x15a0ea(0x816)]<Date[_0x15a0ea(0x81b)]()/0x3e8)return{'valid':![],'reason':_0x15a0ea(0x550)};return{'valid':!![],'reason':'ok'};}function _0x57d2c6(_0x5ff73a){const _0x40fce7=_0xe1bfe;if(typeof _0x5ff73a!==_0x40fce7(0x2b2))return _0x40fce7(0x4b3);const _0x504f78=_0x5ff73a[_0x40fce7(0x543)]();if(_0x504f78[_0x40fce7(0x5e1)]('/')||_0x504f78[_0x40fce7(0x5e1)]('./')||_0x504f78[_0x40fce7(0x5e1)]('../')||/^[A-Za-z]:[\\/]/[_0x40fce7(0x27f)](_0x504f78))return _0x40fce7(0x1de);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x40fce7(0x27f)](_0x504f78))return _0x40fce7(0x4bd);const _0x36fa22=_0x504f78[_0x40fce7(0x2f9)](/[\s-]+/g,'')[_0x40fce7(0x3be)];if(_0x36fa22===0x7c)return _0x40fce7(0x631);if(_0x36fa22>=0x95&&_0x36fa22<=0xfc)return _0x40fce7(0x4fb);return _0x40fce7(0x4b3);}return okdbLicenseCodec={'toBase32':_0x3f5d10,'fromBase32':_0x161b44,'encodeLicensePayload':_0x1b9e7a,'decodeLicensePayload':_0x27fc88,'encodeLicenseBlob':_0x4b72ff,'decodeLicenseBlob':_0x36918d,'licenseHash':_0x253366,'derivePin':_0x2b1abe,'encodeActivationToken':_0x57a11c,'decodeActivationToken':_0x3727b7,'verifyActivation':_0x5bb63d,'verifySignature':_0x3877fd,'detectInputType':_0x57d2c6,'FEATURE_NAMES':_0x592676,'LICENSE_TYPE_STANDARD':_0x28b483,'LICENSE_TYPE_OPEN':_0x54a204,'LICENSE_TYPE_INTERNAL':_0x1383da,'OPEN_LICENSE_MAX_DURATION_MS':_0x269ace},okdbLicenseCodec;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x4da960=_0x32d6b8;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x2df02f={'PUT':_0x4da960(0x3ba),'REMOVE':_0x4da960(0x77c),'INDEX_DROP':'dropIndex','INDEX_REGISTER':'registerIndex','INDEX_RESET':'resetIndex','TYPE_REGISTER':_0x4da960(0x6de),'TYPE_DROP':'dropType','FTS_REGISTER':_0x4da960(0x66d),'FTS_DROP':_0x4da960(0x378),'FTS_RESET':_0x4da960(0x64c),'SCHEMA_SET':'setSchema','SCHEMA_DROP':'dropSchema','TTL_SET':_0x4da960(0x1fb),'TTL_CLEAR':_0x4da960(0x7fb)},_0x532832={'SYSTEM_READY':'system:ready','FIELD_RESOLVER_REGISTERED':'field:resolver_registered','SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':_0x4da960(0x88e),'SYSTEM_POKE':'system:poke','SYSTEM_DRAIN':_0x4da960(0x456),'SYSTEM_TYPE_DROP':'system:type_drop','SYSTEM_PROC':_0x4da960(0x46a),'SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':'item:create','ITEM_UPDATE':'item:update','ITEM_REMOVE':_0x4da960(0x40a),'ITEM_PENDING':'item:pending','INDEX_RESET':_0x4da960(0x4ff),'INDEX_READY':_0x4da960(0x6ab),'INDEX_PROGRESS':_0x4da960(0x634),'VIEW_PROGRESS':_0x4da960(0x414),'INDEX_DROP':_0x4da960(0x70a),'INDEX_REGISTERED':_0x4da960(0x884),'FTS_REGISTERED':_0x4da960(0x725),'FTS_DROP':_0x4da960(0x366),'FTS_RESET':_0x4da960(0x867),'SCHEMA_SET':_0x4da960(0x6ea),'SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':'unique:violation_resolved','REF_VIOLATION':_0x4da960(0x1df),'REF_VIOLATION_RESOLVED':_0x4da960(0x520),'SYNC_APPLY':'sync:apply','TXN_START':'txn:start','TXN_END':_0x4da960(0x6ed),'TXN_ROLLBACK':'txn:rollback','TYPE_REGISTERED':_0x4da960(0x2ad),'TYPE_DROP':'type:drop','ENV_OPENED':_0x4da960(0x88b),'ENV_REMOVED':'env:removed','SYSTEM_ENV_RELEASE':'system:env_release','TTL_EXPIRED':_0x4da960(0x6f2),'TTL_SET':_0x4da960(0x463),'TTL_CLEAR':_0x4da960(0x76b),'LICENSE_INVALID':'license:invalid','LICENSE_ADDED':'license:added','LICENSE_ACTIVATED':_0x4da960(0x5e8),'LICENSE_REMOVED':'license:removed'},_0x91efea={'CREATING':_0x4da960(0x697),'RESETTING':_0x4da960(0x22b),'READY':_0x4da960(0x822),'DROPPING':_0x4da960(0x2b4),'WAITING':_0x4da960(0x3bc),'ERROR':'error'},_0xc58c3e={'CREATED':_0x4da960(0x61a),'STARTING':'starting','STARTED':'started','STOPPING':'stopping','STOPPED':_0x4da960(0x8b8)},_0x33865b={'CREATING':_0x4da960(0x697),'READY':_0x4da960(0x822),'HALTED':_0x4da960(0x2ba),'STOPPED':'stopped','RESETTING':_0x4da960(0x22b)},_0x170450=Object[_0x4da960(0x247)]({'POKE':_0x4da960(0x385),'DRAIN':_0x4da960(0x64a),'TYPE_DROP':_0x4da960(0x28f),'PROC':'bus:proc','ENV_RELEASE':_0x4da960(0x841)});return okdbEnums={'BUS_EVENTS':_0x170450,'CHANGE_ACTIONS':_0x2df02f,'EVENTS':_0x532832,'INDEX_STATE':_0x91efea,'OKDB_STATE':_0xc58c3e,'VIEW_STATE':_0x33865b},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x5db0d9=_0x32d6b8;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x1089df=require$$0$1,_0x3f1491=require$$1,_0x53a804=require$$2$1,_0xca0bb9=_0x1089df[_0x5db0d9(0x7d6)](_0x3f1491[_0x5db0d9(0x86d)](__dirname,_0x5db0d9(0x8b7)),'utf8')[_0x5db0d9(0x543)](),_0x463883=_0x53a804[_0x5db0d9(0x749)](_0xca0bb9)[_0x5db0d9(0x286)]({'type':_0x5db0d9(0x1c9),'format':_0x5db0d9(0x532)}),_0x4477b2=_0x53a804[_0x5db0d9(0x7d2)](_0x5db0d9(0x33d))[_0x5db0d9(0x67f)](_0x463883)[_0x5db0d9(0x313)](_0x5db0d9(0x45a))['slice'](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0xca0bb9,'PUB_FINGERPRINT':_0x4477b2},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0xdb0473=_0x32d6b8;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x1f2a19=require$$2$1,{OKDBError:_0x12d1f4}=requireOkdbError(),{EVENTS:_0xca7a1}=requireOkdbEnums(),_0x1283d0=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x4705ca,LICENSE_TYPE_INTERNAL:_0x3f9a39,OPEN_LICENSE_MAX_DURATION_MS:_0x295c8e}=_0x1283d0,_0x37bf11=requireOkdbPubkey(),_0x2dc289={'LICENSED_BUILD':_0xdb0473(0x574),'PUBLIC_KEY_PEM':_0x37bf11['PUBLIC_KEY_PEM'],'PUB_FINGERPRINT':_0x37bf11[_0xdb0473(0x8b9)],'LICENSE_EXPIRED_ACTION':_0xdb0473(0x51a)},_0x174ed7='~licenses',_0x1ca037={'features':{'sync':![],'embeddings':!![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x5,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240,'pipelinesPerEnv':0x2},'_isFree':!![]};async function _0x4da823(_0x44159f){const _0x20f5aa=_0xdb0473;await _0x44159f[_0x20f5aa(0x490)](_0x174ed7);}class _0x28d966{constructor(_0x282853){const _0xf9478d=_0xdb0473;this[_0xf9478d(0x7f8)]=_0x282853,this['_active']=null;}async[_0xdb0473(0x46d)](){const _0x33998b=_0xdb0473,_0x164570=this['okdb']['_systemEnv'];if(!_0x164570||!_0x164570[_0x33998b(0x708)](_0x174ed7)){this['_active']=null;return;}const _0xff7194=this[_0x33998b(0x7f8)]['id'];let _0x3c8875=null;for(const {key:_0x16d5af,value:_0x1d45b6}of _0x164570[_0x33998b(0x754)](_0x174ed7)){const _0x215fc7=this[_0x33998b(0x83d)](_0x1d45b6,_0xff7194);_0x215fc7==='active'&&!_0x3c8875&&(_0x3c8875={..._0x1d45b6,'id':_0x16d5af,'status':_0x215fc7});}this['_active']=_0x3c8875;if(this['_active']&&this['_active']['licenseType']===_0x4705ca){const _0x4675d1=Math[_0x33998b(0x35b)]((this['_active']['expiresAt']-Date[_0x33998b(0x81b)]())/0x5265c00);this[_0x33998b(0x7f8)][_0x33998b(0x51a)]?.[_0x33998b(0x6c6)](_0x33998b(0x349)+_0x4675d1+'\x20day(s).',{'feature':_0x33998b(0x6a5),'licensee':this[_0x33998b(0x369)]['licensee'],'expiresAt':new Date(this['_active'][_0x33998b(0x6ad)])['toISOString']()});}this[_0x33998b(0x369)]&&this[_0x33998b(0x369)]['licenseType']===_0x3f9a39&&this['okdb'][_0x33998b(0x51a)]?.[_0x33998b(0x6c6)](_0x33998b(0x7d1),{'feature':'license','licensee':this[_0x33998b(0x369)][_0x33998b(0x228)]});}['_computeStatus'](_0x55f15d,_0x531729){const _0x144730=_0xdb0473;if(!_0x55f15d[_0x144730(0x4fb)])return'invalid';let _0x2831fc;try{_0x2831fc=_0x1283d0[_0x144730(0x619)](_0x55f15d[_0x144730(0x4fb)]);}catch(_0x111481){return'invalid';}try{const _0x9991b7=_0x1283d0['verifySignature'](_0x2831fc[_0x144730(0x23f)],_0x2831fc[_0x144730(0x5f6)],_0x2dc289[_0x144730(0x46f)]);if(!_0x9991b7)return _0x144730(0x73b);}catch(_0xc5107d){return _0x144730(0x73b);}if(_0x2831fc['decoded'][_0x144730(0x259)]===_0x3f9a39)return _0x144730(0x3d6);if(_0x2831fc[_0x144730(0x55a)][_0x144730(0x6ad)]<=Date[_0x144730(0x81b)]())return'expired';if(_0x2831fc[_0x144730(0x55a)][_0x144730(0x259)]===_0x4705ca)return _0x144730(0x3d6);if(!_0x55f15d[_0x144730(0x631)])return _0x144730(0x1ab);const _0x27396a=_0x1283d0[_0x144730(0x7aa)]({'tokenString':_0x55f15d[_0x144730(0x631)],'nodeId':_0x531729,'rawBlobBuf':_0x2831fc[_0x144730(0x8c9)],'pubKeyPem':_0x2dc289[_0x144730(0x46f)],'pubFingerprint':_0x2dc289[_0x144730(0x8b9)]});if(_0x27396a['reason']==='LICENSE_HASH_MISMATCH'||_0x27396a[_0x144730(0x535)]===_0x144730(0x276))return _0x144730(0x54b);if(_0x27396a['reason']==='ACTIVATION_EXPIRED')return'expired';if(!_0x27396a['valid'])return _0x144730(0x54b);return _0x144730(0x3d6);}get[_0xdb0473(0x3d6)](){const _0x446e45=_0xdb0473;return this[_0x446e45(0x369)];}get[_0xdb0473(0x701)](){return this['_active']??_0x1ca037;}[_0xdb0473(0x31a)](_0x13bb15){const _0x2c78a8=_0xdb0473;if(_0x2dc289['LICENSED_BUILD']!==_0x2c78a8(0x574))return;const _0x42f1a0=this[_0x2c78a8(0x701)];if(!_0x42f1a0[_0x2c78a8(0x5a5)]?.[_0x13bb15]){const _0x56fc2c=_0x42f1a0[_0x2c78a8(0x301)]?_0x2c78a8(0x489)+_0x13bb15+'.\x20Add\x20a\x20license\x20that\x20includes\x20\x22'+_0x13bb15+_0x2c78a8(0x797):_0x2c78a8(0x350)+_0x13bb15+_0x2c78a8(0x1f3)+_0x13bb15+'\x22.';throw new _0x12d1f4(_0x56fc2c,_0x2c78a8(0x5f1),{'feature':_0x13bb15});}}[_0xdb0473(0x3c8)](_0x261a8b){const _0x34aa1a=_0xdb0473;if(_0x2dc289[_0x34aa1a(0x335)]!==_0x34aa1a(0x574))return!![];return!!this[_0x34aa1a(0x701)][_0x34aa1a(0x5a5)]?.[_0x261a8b];}['hasLimit'](_0x193209){const _0x2fbf5d=_0xdb0473;if(_0x2dc289[_0x2fbf5d(0x335)]!==_0x2fbf5d(0x574))return![];const _0x33f09b=this['effective'][_0x2fbf5d(0x427)]?.[_0x193209];return!(_0x33f09b===null||_0x33f09b===undefined||_0x33f09b===0x0);}[_0xdb0473(0x5dc)](_0x4e0335,_0x1b96bd){const _0x92742d=_0xdb0473;if(_0x2dc289['LICENSED_BUILD']!==_0x92742d(0x574))return;const _0x4acc6b=this[_0x92742d(0x701)],_0x5f544c=_0x4acc6b[_0x92742d(0x427)]?.[_0x4e0335];if(_0x5f544c===null||_0x5f544c===undefined||_0x5f544c===0x0)return;if(_0x1b96bd>=_0x5f544c)throw new _0x12d1f4('License\x20limit\x20exceeded:\x20'+_0x4e0335+'\x20('+_0x1b96bd+'/'+_0x5f544c+')','LICENSE_LIMIT_EXCEEDED',{'limit':_0x4e0335,'current':_0x1b96bd,'max':_0x5f544c});}async['addLicense'](_0x31fa08){const _0x4b7867=_0xdb0473;let _0x3e0475;try{_0x3e0475=_0x1283d0[_0x4b7867(0x619)](_0x31fa08);}catch(_0x2a8436){throw new _0x12d1f4(_0x4b7867(0x44a)+_0x2a8436[_0x4b7867(0x439)],_0x4b7867(0x714));}let _0x1b63b1;try{_0x1b63b1=_0x1283d0[_0x4b7867(0x50b)](_0x3e0475[_0x4b7867(0x23f)],_0x3e0475[_0x4b7867(0x5f6)],_0x2dc289[_0x4b7867(0x46f)]);}catch(_0x5dcabe){throw new _0x12d1f4(_0x4b7867(0x4a3)+_0x5dcabe[_0x4b7867(0x439)],'LICENSE_INVALID');}if(!_0x1b63b1)throw new _0x12d1f4(_0x4b7867(0x21d)+(_0x4b7867(0x5da)+_0x2dc289[_0x4b7867(0x8b9)]+'.\x20')+_0x4b7867(0x702),_0x4b7867(0x714),{'expectedFingerprint':_0x2dc289[_0x4b7867(0x8b9)]});if(_0x3e0475[_0x4b7867(0x55a)][_0x4b7867(0x259)]===_0x4705ca){const _0x3cfab5=_0x3e0475[_0x4b7867(0x55a)][_0x4b7867(0x6ad)]-_0x3e0475[_0x4b7867(0x55a)]['issuedAt'];if(_0x3cfab5>_0x295c8e)throw new _0x12d1f4('Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20'+Math[_0x4b7867(0x35b)](_0x3cfab5/(0x1e*0x5265c00))+_0x4b7867(0x3f7),_0x4b7867(0x714));}const _0x4316b4=this['okdb'][_0x4b7867(0x6a1)];await _0x4da823(_0x4316b4);const _0x55b504=_0x1283d0['licenseHash'](_0x3e0475[_0x4b7867(0x8c9)])['toString']('hex');for(const {key:_0x515849,value:_0x3aa11f}of _0x4316b4[_0x4b7867(0x754)](_0x174ed7)){if(_0x3aa11f[_0x4b7867(0x438)]===_0x55b504)throw new _0x12d1f4(_0x4b7867(0x20f),_0x4b7867(0x616),{'id':_0x515849});}const _0x3e5ae2=_0x1f2a19['createHash'](_0x4b7867(0x33d))[_0x4b7867(0x67f)](_0x4b7867(0x644))[_0x4b7867(0x67f)](_0x3e0475[_0x4b7867(0x8c9)])[_0x4b7867(0x313)]('hex'),_0x21e45f=_0x3e5ae2[_0x4b7867(0x556)](0x0,0x8)+'-'+_0x3e5ae2['slice'](0x8,0xc)+'-5'+_0x3e5ae2[_0x4b7867(0x556)](0xd,0x10)+'-'+(parseInt(_0x3e5ae2[0x10],0x10)&0x3|0x8)['toString'](0x10)+_0x3e5ae2[_0x4b7867(0x556)](0x11,0x14)+'-'+_0x3e5ae2['slice'](0x14,0x20),_0x47f628={'blob':_0x31fa08,'activation':null,'addedAt':Date[_0x4b7867(0x81b)](),'_licenseHash':_0x55b504,'licensee':_0x3e0475[_0x4b7867(0x55a)][_0x4b7867(0x228)],'expiresAt':_0x3e0475[_0x4b7867(0x55a)][_0x4b7867(0x6ad)],'features':_0x3e0475['decoded'][_0x4b7867(0x5a5)],'limits':_0x3e0475['decoded'][_0x4b7867(0x427)],'licenseType':_0x3e0475[_0x4b7867(0x55a)][_0x4b7867(0x259)]};return await _0x4316b4[_0x4b7867(0x3ba)](_0x174ed7,_0x21e45f,_0x47f628),{'id':_0x21e45f,..._0x47f628};}async[_0xdb0473(0x6f0)](_0xf0aa9d){const _0x5d7173=_0xdb0473;let _0x4c2875;try{_0x4c2875=_0x1283d0[_0x5d7173(0x275)](_0xf0aa9d);}catch(_0x294cb1){throw new _0x12d1f4(_0x5d7173(0x3f4)+_0x294cb1[_0x5d7173(0x439)],'LICENSE_ACTIVATION_INVALID');}const _0x576acf=_0x4c2875[_0x5d7173(0x64f)][_0x5d7173(0x1f5)](_0x5d7173(0x45a)),_0x53e3e9=this[_0x5d7173(0x7f8)][_0x5d7173(0x6a1)];if(!_0x53e3e9||!_0x53e3e9['hasType'](_0x174ed7))throw new _0x12d1f4(_0x5d7173(0x4a4),_0x5d7173(0x72d));let _0x4942c8=null,_0x2222cf=null;for(const {key:_0x195f6e,value:_0x3d37fa}of _0x53e3e9[_0x5d7173(0x754)](_0x174ed7)){if(_0x3d37fa['_licenseHash']===_0x576acf){_0x4942c8=_0x195f6e,_0x2222cf=_0x3d37fa;break;}}if(!_0x4942c8)throw new _0x12d1f4(_0x5d7173(0x4a4),_0x5d7173(0x72d));const {rawBuf:_0x236259}=_0x1283d0['decodeLicenseBlob'](_0x2222cf[_0x5d7173(0x4fb)]),_0x576ab7=_0x1283d0[_0x5d7173(0x7aa)]({'tokenString':_0xf0aa9d,'nodeId':this[_0x5d7173(0x7f8)]['id'],'rawBlobBuf':_0x236259,'pubKeyPem':_0x2dc289[_0x5d7173(0x46f)],'pubFingerprint':_0x2dc289[_0x5d7173(0x8b9)]});if(!_0x576ab7[_0x5d7173(0x309)])throw new _0x12d1f4(_0x5d7173(0x4df)+_0x576ab7[_0x5d7173(0x535)],'LICENSE_ACTIVATION_INVALID',{'reason':_0x576ab7[_0x5d7173(0x535)]});const _0x48c3f1={..._0x2222cf,'activation':_0xf0aa9d};return await _0x53e3e9[_0x5d7173(0x67f)](_0x174ed7,_0x4942c8,_0x48c3f1),{'id':_0x4942c8,..._0x48c3f1};}async[_0xdb0473(0x5d0)](_0x24aabb){const _0x1c9d2e=_0xdb0473,_0x1f7c43=this[_0x1c9d2e(0x7f8)]['_systemEnv'];if(!_0x1f7c43||!_0x1f7c43[_0x1c9d2e(0x708)](_0x174ed7))return;await _0x1f7c43[_0x1c9d2e(0x77c)](_0x174ed7,_0x24aabb);}async[_0xdb0473(0x599)](){const _0x41ae40=_0xdb0473,_0xee1127=this[_0x41ae40(0x7f8)][_0x41ae40(0x6a1)];if(!_0xee1127||!_0xee1127[_0x41ae40(0x708)](_0x174ed7))return[];const _0x13928f=this[_0x41ae40(0x7f8)]['id'],_0x40e55a=[];for(const {key:_0x3deb5f,value:_0x5d9bea}of _0xee1127['getRange'](_0x174ed7)){const _0x7363aa=this[_0x41ae40(0x83d)](_0x5d9bea,_0x13928f);_0x40e55a[_0x41ae40(0x338)]({..._0x5d9bea,'id':_0x3deb5f,'status':_0x7363aa});}return _0x40e55a;}[_0xdb0473(0x838)](){const _0x2657e8=_0xdb0473,_0x3b8cf2=this[_0x2657e8(0x7f8)][_0x2657e8(0x6a1)];if(!_0x3b8cf2||!_0x3b8cf2[_0x2657e8(0x708)](_0x174ed7))return[];const _0x69e3b8=this['okdb']['id'],_0xaaf536=[];for(const {key:_0x122b5d,value:_0x53128e}of _0x3b8cf2['getRange'](_0x174ed7)){if(_0x53128e['_licenseHash']){if(_0x53128e[_0x2657e8(0x259)]===_0x4705ca)_0xaaf536[_0x2657e8(0x338)]({'licenseId':_0x122b5d,'pin':null});else{const _0x24e8e9=Buffer['from'](_0x53128e[_0x2657e8(0x438)],'hex'),{pin:_0x2e6186}=_0x1283d0[_0x2657e8(0x372)](_0x69e3b8,_0x24e8e9,_0x2dc289[_0x2657e8(0x8b9)]);_0xaaf536[_0x2657e8(0x338)]({'licenseId':_0x122b5d,'pin':_0x2e6186});}}}return _0xaaf536;}async[_0xdb0473(0x2d4)](){const _0x242869=_0xdb0473,_0x5b539d=this[_0x242869(0x369)];await this[_0x242869(0x46d)]();if(this[_0x242869(0x369)]&&this[_0x242869(0x369)][_0x242869(0x259)]===_0x4705ca){const _0x25e16f=Math[_0x242869(0x35b)]((this[_0x242869(0x369)][_0x242869(0x6ad)]-Date[_0x242869(0x81b)]())/0x5265c00);this[_0x242869(0x7f8)][_0x242869(0x51a)]?.[_0x242869(0x6c6)](_0x242869(0x349)+_0x25e16f+_0x242869(0x880),{'feature':_0x242869(0x6a5),'licensee':this[_0x242869(0x369)][_0x242869(0x228)],'expiresAt':new Date(this['_active'][_0x242869(0x6ad)])[_0x242869(0x362)]()});}this[_0x242869(0x369)]&&this[_0x242869(0x369)]['licenseType']===_0x3f9a39&&this['okdb']['log']?.[_0x242869(0x6c6)](_0x242869(0x7d1),{'feature':_0x242869(0x6a5),'licensee':this['_active'][_0x242869(0x228)]});if(_0x5b539d&&!this[_0x242869(0x369)]){this[_0x242869(0x7f8)][_0x242869(0x51a)]?.[_0x242869(0x6c6)](_0x242869(0x1bd),{'feature':_0x242869(0x6a5)}),this['okdb'][_0x242869(0x791)]?.[_0x242869(0x6d7)](_0xca7a1[_0x242869(0x714)],{'previous':_0x5b539d});const _0x9b3a83=this['okdb']['options']?.[_0x242869(0x7da)]??_0x2dc289['LICENSE_EXPIRED_ACTION'];_0x9b3a83===_0x242869(0x8cb)&&(this[_0x242869(0x7f8)][_0x242869(0x51a)]?.['error'](_0x242869(0x2a6),{'feature':_0x242869(0x6a5)}),this[_0x242869(0x7f8)]['close']()[_0x242869(0x6ce)](()=>{})[_0x242869(0x306)](()=>process[_0x242869(0x56e)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x28d966,'_C':_0x2dc289,'FREE_TIER':_0x1ca037},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x4f6d31=_0x32d6b8;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0xa6c2c8=require$$0$3,_0x139e7f=require$$0$1,_0xa90218=require$$0,_0x1f0380=require$$1,_0x20aea3=_0x1f0380[_0x4f6d31(0x86d)](_0xa90218[_0x4f6d31(0x343)](),_0x4f6d31(0x6ff)),_0x5c741f=0x3e8,_0x142582={'reset':_0x4f6d31(0x85b),'bold':_0x4f6d31(0x1af),'dim':'\x1b[2m','red':_0x4f6d31(0x23d),'green':_0x4f6d31(0x40f),'yellow':_0x4f6d31(0x299),'blue':_0x4f6d31(0x788),'magenta':_0x4f6d31(0x57d),'cyan':_0x4f6d31(0x66e),'white':_0x4f6d31(0x7c8),'gray':_0x4f6d31(0x67a)},_0x10f0fd=!process[_0x4f6d31(0x6cd)][_0x4f6d31(0x4ca)]||!!process.env.NO_COLOR,_0x534bbf=(_0x5a68a2,_0x5939e1)=>_0x10f0fd?_0x5939e1:''+_0x5a68a2+_0x5939e1+_0x142582['reset'],_0x29f554={'error':_0x142582[_0x4f6d31(0x27e)],'warn':_0x142582[_0x4f6d31(0x5eb)],'info':_0x142582['cyan'],'debug':_0x142582['gray']},_0x4a91ba={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x29e459(_0x1b76ab,_0x30d114='info'){const _0x1f5738=_0x4f6d31,{level:_0x56b89d,msg:_0x1d88cb,meta:_0x20d853,context:_0x5af430,ts:_0x2b936c}=_0x1b76ab;if((_0x4a91ba[_0x56b89d]??0x1)<(_0x4a91ba[_0x30d114]??0x1))return;const _0xf154f0=_0x534bbf(_0x142582[_0x1f5738(0x395)],new Date(_0x2b936c)['toISOString']()),_0x1f36a6=_0x534bbf(_0x29f554[_0x56b89d]??_0x142582[_0x1f5738(0x6aa)],_0x56b89d[_0x1f5738(0x6ee)](0x5));let _0x552ad5='\x20\x20'+_0xf154f0+'\x20'+_0x534bbf(_0x142582[_0x1f5738(0x756)],_0x1f36a6)+'\x20'+_0x1d88cb;if(_0x20d853&&Object[_0x1f5738(0x6c7)](_0x20d853)[_0x1f5738(0x3be)]>0x0){const _0xacbed2=Object[_0x1f5738(0x444)](_0x20d853)[_0x1f5738(0x8bd)](([_0x40536c,_0x1945a6])=>_0x40536c+'='+_0x1945a6)['join']('\x20');_0x552ad5+=_0x534bbf(_0x142582[_0x1f5738(0x38b)],_0x1f5738(0x81c)+_0xacbed2+']');}if(_0x5af430!==undefined){const _0x4564e1=typeof _0x5af430===_0x1f5738(0x320)?JSON[_0x1f5738(0x46c)](_0x5af430):String(_0x5af430);_0x552ad5+=_0x534bbf(_0x142582['dim'],'\x20\x20'+_0x4564e1);}const _0x275cea=_0x56b89d===_0x1f5738(0x21f)||_0x56b89d===_0x1f5738(0x6c6)?process[_0x1f5738(0x58d)][_0x1f5738(0x6d4)]['bind'](process[_0x1f5738(0x58d)]):process[_0x1f5738(0x6cd)]['write'][_0x1f5738(0x1d6)](process[_0x1f5738(0x6cd)]);_0x275cea(_0x552ad5+'\x0a');}function _0xe084c2(_0x1ead98,_0x394abe){const _0x114f86=_0x4f6d31;if(_0x1ead98===0xcc||_0x1ead98>=0xc8&&_0x1ead98<0x12c&&!_0x394abe){console[_0x114f86(0x51a)]('\x0a\x20\x20'+_0x534bbf(_0x142582[_0x114f86(0x229)],'✓')+'\x0a');return;}if(_0x1ead98>=0x190||_0x394abe?.[_0x114f86(0x21f)]){const _0x32b2cd=_0x394abe?.['error']??_0x394abe?.[_0x114f86(0x439)]??_0x114f86(0x4b8)+_0x1ead98;console[_0x114f86(0x51a)]('\x0a\x20\x20'+_0x534bbf(_0x142582['red'],'✗')+'\x20'+_0x534bbf(_0x142582[_0x114f86(0x756)]+_0x142582[_0x114f86(0x27e)],String(_0x1ead98))+'\x20\x20'+_0x32b2cd+'\x0a');return;}const _0x445d43=Object['prototype'][_0x114f86(0x6b9)][_0x114f86(0x65b)](_0x394abe??{},_0x114f86(0x647))?_0x394abe[_0x114f86(0x647)]:_0x394abe,_0x2658ee=_0x394abe?.[_0x114f86(0x49b)];console['log'](''),_0x40fd37(_0x445d43,'\x20\x20');if(_0x2658ee?.['count']!=null||_0x2658ee?.[_0x114f86(0x4ae)]!=null){const _0x61735c=[];if(_0x2658ee['count']!=null)_0x61735c[_0x114f86(0x338)](_0x2658ee[_0x114f86(0x2a3)]+'\x20result'+(_0x2658ee[_0x114f86(0x2a3)]!==0x1?'s':''));if(_0x2658ee[_0x114f86(0x4ae)]!=null)_0x61735c['push'](_0x2658ee[_0x114f86(0x4ae)]+'ms');console[_0x114f86(0x51a)](_0x114f86(0x356)+_0x534bbf(_0x142582[_0x114f86(0x38b)],_0x61735c['join']('\x20\x20·\x20\x20')));}console[_0x114f86(0x51a)]('');}function _0x40fd37(_0x237885,_0x20e1e7=''){const _0x274a8d=_0x4f6d31;if(_0x237885===null||_0x237885===undefined){console[_0x274a8d(0x51a)](_0x20e1e7+_0x534bbf(_0x142582[_0x274a8d(0x38b)],_0x274a8d(0x1f8)));return;}if(Array[_0x274a8d(0x590)](_0x237885)){if(_0x237885[_0x274a8d(0x3be)]===0x0){console[_0x274a8d(0x51a)](_0x20e1e7+_0x534bbf(_0x142582[_0x274a8d(0x38b)],_0x274a8d(0x58a)));return;}if(_0x237885[_0x274a8d(0x796)](_0x428394=>_0x428394&&typeof _0x428394==='object'&&_0x274a8d(0x7d4)in _0x428394&&_0x274a8d(0x6ba)in _0x428394)){_0x1ac28b(_0x237885,_0x20e1e7);return;}if(_0x237885[_0x274a8d(0x796)](_0x32baec=>_0x32baec&&typeof _0x32baec===_0x274a8d(0x320)&&_0x274a8d(0x70d)in _0x32baec&&_0x274a8d(0x2a3)in _0x32baec)){_0x40ea72(_0x237885,_0x20e1e7);return;}if(_0x237885[_0x274a8d(0x796)](_0x402f3b=>typeof _0x402f3b!==_0x274a8d(0x320)||_0x402f3b===null)){_0x237885[_0x274a8d(0x773)]((_0x2933d1,_0x1dabbd)=>console['log'](_0x20e1e7+_0x534bbf(_0x142582['gray'],_0x1dabbd+0x1+'.')+'\x20'+_0x534bbf(_0x142582[_0x274a8d(0x6aa)],String(_0x2933d1))));return;}_0x237885[_0x274a8d(0x773)]((_0x744d2a,_0x9bd30d)=>{const _0x2f8ca5=_0x274a8d;console[_0x2f8ca5(0x51a)](_0x20e1e7+_0x534bbf(_0x142582[_0x2f8ca5(0x38b)],'['+_0x9bd30d+']'));if(typeof _0x744d2a===_0x2f8ca5(0x320)&&_0x744d2a!==null)_0x3f03e9(_0x744d2a,_0x20e1e7+'\x20\x20');else console[_0x2f8ca5(0x51a)](_0x20e1e7+'\x20\x20'+String(_0x744d2a));});return;}if(typeof _0x237885===_0x274a8d(0x320)){if(_0x274a8d(0x7d4)in _0x237885&&_0x274a8d(0x6ba)in _0x237885&&Object[_0x274a8d(0x6c7)](_0x237885)['length']<=0x3){console[_0x274a8d(0x51a)](_0x20e1e7+_0x534bbf(_0x142582[_0x274a8d(0x756)]+_0x142582[_0x274a8d(0x2af)],String(_0x237885['key'])));const _0x445ae9=_0x237885['value'];if(_0x445ae9&&typeof _0x445ae9===_0x274a8d(0x320))_0x3f03e9(_0x445ae9,_0x20e1e7);else console[_0x274a8d(0x51a)](_0x20e1e7+_0x534bbf(_0x142582[_0x274a8d(0x6aa)],String(_0x445ae9)));return;}_0x3f03e9(_0x237885,_0x20e1e7);return;}console['log'](_0x20e1e7+_0x534bbf(_0x142582[_0x274a8d(0x6aa)],String(_0x237885)));}function _0x3f03e9(_0x47bc21,_0x4b2a6e=''){const _0x32f416=_0x4f6d31,_0x2ac652=Object[_0x32f416(0x444)](_0x47bc21);if(_0x2ac652[_0x32f416(0x3be)]===0x0){console[_0x32f416(0x51a)](_0x4b2a6e+_0x534bbf(_0x142582[_0x32f416(0x38b)],'{}'));return;}const _0x2baa29=Math[_0x32f416(0x87d)](0x1c,Math['max'](..._0x2ac652['map'](([_0x1eaed1])=>_0x1eaed1[_0x32f416(0x3be)])));for(const [_0x1241ff,_0x35e1f3]of _0x2ac652){const _0x17febf=_0x534bbf(_0x142582[_0x32f416(0x2af)],_0x1241ff[_0x32f416(0x6ee)](_0x2baa29));if(_0x35e1f3===null||_0x35e1f3===undefined)console['log'](_0x4b2a6e+_0x17febf+'\x20\x20'+_0x534bbf(_0x142582[_0x32f416(0x38b)],'null'));else{if(typeof _0x35e1f3===_0x32f416(0x320)){const _0x1d6f6b=JSON[_0x32f416(0x46c)](_0x35e1f3);_0x1d6f6b[_0x32f416(0x3be)]<=0x50?console[_0x32f416(0x51a)](_0x4b2a6e+_0x17febf+'\x20\x20'+_0x534bbf(_0x142582[_0x32f416(0x38b)],_0x1d6f6b)):(console[_0x32f416(0x51a)](_0x4b2a6e+_0x17febf),_0x40fd37(_0x35e1f3,_0x4b2a6e+'\x20\x20'));}else{const _0x259b5a=typeof _0x35e1f3==='boolean'?_0x534bbf(_0x35e1f3?_0x142582[_0x32f416(0x229)]:_0x142582[_0x32f416(0x5eb)],String(_0x35e1f3)):typeof _0x35e1f3==='number'?_0x534bbf(_0x142582['magenta'],String(_0x35e1f3)):_0x534bbf(_0x142582['white'],String(_0x35e1f3));console['log'](_0x4b2a6e+_0x17febf+'\x20\x20'+_0x259b5a);}}}}function _0x1ac28b(_0x39ba74,_0x3fe1e7=''){const _0xd554d2=_0x4f6d31,_0xf6ef52=Math['min'](0x20,Math[_0xd554d2(0x321)](..._0x39ba74[_0xd554d2(0x8bd)](_0x193fa3=>String(_0x193fa3[_0xd554d2(0x7d4)])['length'])));for(const {key:_0x22846c,value:_0x511d24,score:_0x481c9a,clock:_0x10e156}of _0x39ba74){const _0x520a2b=_0x534bbf(_0x142582['bold']+_0x142582[_0xd554d2(0x2af)],String(_0x22846c)[_0xd554d2(0x6ee)](_0xf6ef52)),_0x4aa54a=_0x511d24==null?_0x534bbf(_0x142582['dim'],_0xd554d2(0x498)):typeof _0x511d24===_0xd554d2(0x320)?_0x534bbf(_0x142582['dim'],JSON['stringify'](_0x511d24)):_0x534bbf(_0x142582[_0xd554d2(0x6aa)],String(_0x511d24)),_0x1873b8=_0x481c9a!=null?_0x534bbf(_0x142582['gray'],'\x20\x20score:'+_0x481c9a[_0xd554d2(0x849)](0x4)):'',_0x27b9e3=_0x10e156!=null?_0x534bbf(_0x142582['gray'],_0xd554d2(0x2fa)+_0x10e156):'';console[_0xd554d2(0x51a)](_0x3fe1e7+_0x520a2b+'\x20\x20'+_0x4aa54a+_0x1873b8+_0x27b9e3);}}function _0x40ea72(_0x547930,_0x52b338=''){const _0x5e2b9f=_0x4f6d31,_0x43f592=Math[_0x5e2b9f(0x87d)](0x20,Math[_0x5e2b9f(0x321)](..._0x547930[_0x5e2b9f(0x8bd)](_0xc46260=>_0xc46260[_0x5e2b9f(0x70d)]['length'])));for(const {type:_0x4f2412,count:_0x367f49,fields:_0x4937ac}of _0x547930){if(_0x4f2412[_0x5e2b9f(0x5e1)]('~'))continue;const _0x45c404=_0x534bbf(_0x142582[_0x5e2b9f(0x756)]+_0x142582['cyan'],_0x4f2412['padEnd'](_0x43f592)),_0x4bf4af=_0x534bbf(_0x142582[_0x5e2b9f(0x5ae)],String(_0x367f49)[_0x5e2b9f(0x7ce)](0x6))+_0x534bbf(_0x142582[_0x5e2b9f(0x38b)],_0x5e2b9f(0x64b)),_0x12256d=_0x4937ac&&Object[_0x5e2b9f(0x6c7)](_0x4937ac)[_0x5e2b9f(0x3be)]?_0x534bbf(_0x142582[_0x5e2b9f(0x38b)],_0x5e2b9f(0x561)+Object[_0x5e2b9f(0x6c7)](_0x4937ac)[_0x5e2b9f(0x556)](0x0,0x6)['join'](',\x20')+(Object[_0x5e2b9f(0x6c7)](_0x4937ac)['length']>0x6?'…':'')):'';console[_0x5e2b9f(0x51a)](_0x52b338+_0x45c404+'\x20\x20'+_0x4bf4af+_0x12256d);}}const _0x3c4743=[_0x4f6d31(0x732),'type/','queue/',_0x4f6d31(0x5bd),_0x4f6d31(0x80c),_0x4f6d31(0x341)];function _0x1ff547(_0x1aca1e,_0x30981c){const _0x4a8fad=_0x4f6d31;if(_0x1aca1e['startsWith'](_0x4a8fad(0x848)))return _0x1aca1e;if(_0x1aca1e[_0x4a8fad(0x5e1)]('/'))return'/api'+_0x1aca1e;if(_0x1aca1e[_0x4a8fad(0x5e1)](_0x4a8fad(0x7a4)))return _0x4a8fad(0x848)+_0x1aca1e;const _0x46e67a=_0x3c4743['some'](_0x4f55bd=>_0x1aca1e===_0x4f55bd[_0x4a8fad(0x2f9)](/\/$/,'')||_0x1aca1e[_0x4a8fad(0x5e1)](_0x4f55bd));return _0x46e67a?_0x4a8fad(0x861)+_0x30981c+'/'+_0x1aca1e:_0x4a8fad(0x848)+_0x1aca1e;}function _0x208242(_0x3f0031){const _0x1c06dc=_0x4f6d31,_0x56c864={},_0x4bfa36=[];let _0x12042b=0x0;while(_0x12042b<_0x3f0031[_0x1c06dc(0x3be)]){if((_0x3f0031[_0x12042b]===_0x1c06dc(0x2cc)||_0x3f0031[_0x12042b]==='-e')&&_0x3f0031[_0x12042b+0x1]&&!_0x3f0031[_0x12042b+0x1][_0x1c06dc(0x5e1)]('-'))_0x56c864[_0x1c06dc(0x344)]=_0x3f0031[++_0x12042b];else _0x3f0031[_0x12042b]===_0x1c06dc(0x58f)||_0x3f0031[_0x12042b]==='-h'?_0x56c864['help']=!![]:_0x4bfa36['push'](_0x3f0031[_0x12042b]);_0x12042b++;}return{'flags':_0x56c864,'rest':_0x4bfa36};}const _0xee7c17={'system':_0x4f6d31(0x227),'envs':_0x4f6d31(0x43f),'types':_0x4f6d31(0x611),'data':'Records','indexes':_0x4f6d31(0x591),'fts':_0x4f6d31(0x741),'sync':_0x4f6d31(0x28d),'queue':_0x4f6d31(0x4fd),'files':_0x4f6d31(0x54e),'embeddings':'Embeddings','engines':_0x4f6d31(0x368),'admin':_0x4f6d31(0x32f),'event':_0x4f6d31(0x807),'processor':_0x4f6d31(0x40d)},_0x96f247=[_0x4f6d31(0x1c8),'envs',_0x4f6d31(0x732),_0x4f6d31(0x44d),_0x4f6d31(0x8c6),_0x4f6d31(0x6ca),_0x4f6d31(0x461),_0x4f6d31(0x719),_0x4f6d31(0x874),_0x4f6d31(0x659),'engines',_0x4f6d31(0x45e)];function _0x93b52a(_0x2badb2){const _0x24f208=_0x4f6d31;return _0x2badb2[_0x24f208(0x2f9)](/^\/api/,'')[_0x24f208(0x2f9)](/^\[\/env\/:env=[^\]]*\]/,_0x24f208(0x2ae))['replace'](/^\/env\/:env/,_0x24f208(0x74b))['replace'](/^\//,'');}function _0x67b55f(_0x154d8e,_0x19aa7a=''){const _0x42d474=_0x4f6d31,_0x29dd32=_0x154d8e[_0x42d474(0x4fc)]['listRoutes']()['filter'](_0x3bf64a=>!_0x3bf64a[_0x42d474(0x49b)]?.['hidden']),_0xcc7030=_0x19aa7a?_0x29dd32['filter'](_0x24097c=>_0x24097c[_0x42d474(0x1de)][_0x42d474(0x6e4)]()[_0x42d474(0x6d1)](_0x19aa7a[_0x42d474(0x6e4)]())||(_0x184d21(_0x24097c)??'')[_0x42d474(0x6e4)]()[_0x42d474(0x6d1)](_0x19aa7a[_0x42d474(0x6e4)]())||_0x2a69f5(_0x24097c)[_0x42d474(0x4af)](_0x363244=>_0x363244[_0x42d474(0x6e4)]()[_0x42d474(0x6d1)](_0x19aa7a[_0x42d474(0x6e4)]()))):_0x29dd32;if(!_0xcc7030[_0x42d474(0x3be)]){console['log'](_0x534bbf(_0x142582[_0x42d474(0x5eb)],_0x42d474(0x377)+_0x19aa7a+'\x22\x0a'));return;}const _0x392020=new Map();for(const _0x41e008 of _0xcc7030){const _0x3eb7af=_0x2a69f5(_0x41e008)[0x0]??_0x42d474(0x894);if(!_0x392020['has'](_0x3eb7af))_0x392020[_0x42d474(0x4dc)](_0x3eb7af,[]);_0x392020['get'](_0x3eb7af)['push'](_0x41e008);}const _0x4a173c=[..._0x96f247['filter'](_0x110918=>_0x392020[_0x42d474(0x6f1)](_0x110918)),...[..._0x392020[_0x42d474(0x6c7)]()][_0x42d474(0x49c)](_0x3b43cb=>!_0x96f247[_0x42d474(0x6d1)](_0x3b43cb))];console[_0x42d474(0x51a)]('');for(const _0xb4bfe3 of _0x4a173c){const _0x5d61aa=_0x392020[_0x42d474(0x5ab)](_0xb4bfe3);if(!_0x5d61aa?.[_0x42d474(0x3be)])continue;console[_0x42d474(0x51a)](_0x534bbf(_0x142582[_0x42d474(0x756)],'\x20\x20'+(_0xee7c17[_0xb4bfe3]??_0xb4bfe3)));for(const _0x1efb15 of _0x5d61aa){const _0x4aca1d=_0x534bbf(_0x142582['magenta'],_0x1efb15[_0x42d474(0x74a)]['padEnd'](0x7)),_0x50cb4d=_0x534bbf(_0x142582[_0x42d474(0x2af)],_0x93b52a(_0x1efb15['path'])),_0xe42b15=_0x184d21(_0x1efb15)?_0x534bbf(_0x142582[_0x42d474(0x38b)],'\x20\x20'+_0x184d21(_0x1efb15)):'',_0x2b7216=_0x1efb15[_0x42d474(0x3dc)]?.['id']?_0x534bbf(_0x142582[_0x42d474(0x395)],_0x42d474(0x81c)+_0x1efb15['operation']['id']+']'):'';console[_0x42d474(0x51a)](_0x42d474(0x1d3)+_0x4aca1d+'\x20'+_0x50cb4d+_0xe42b15+_0x2b7216);}console[_0x42d474(0x51a)]('');}}function _0x2e590f(_0x352458,_0x2c3aeb){const _0x3099c3=_0x4f6d31,_0x29bf09=_0x2c3aeb[_0x3099c3(0x2f9)](/^\/api(\/env\/[^/]+)?\//,'')[_0x3099c3(0x735)]('/')[0x0],_0x393fdf=_0x352458['http']['listRoutes']()[_0x3099c3(0x49c)](_0x1c08c6=>_0x1c08c6[_0x3099c3(0x1de)][_0x3099c3(0x6e4)]()[_0x3099c3(0x6d1)](_0x29bf09[_0x3099c3(0x6e4)]()));if(!_0x393fdf['length']){console[_0x3099c3(0x51a)](_0x534bbf(_0x142582[_0x3099c3(0x5eb)],_0x3099c3(0x1ca)+_0x2c3aeb+'\x0a'));return;}console[_0x3099c3(0x51a)]('');for(const _0x432367 of _0x393fdf[_0x3099c3(0x556)](0x0,0xc)){for(const _0x513e30 of _0x4805a3(_0x432367)){console[_0x3099c3(0x51a)](_0x513e30);}console[_0x3099c3(0x51a)]('');}}function _0x184d21(_0x1cdced){const _0x247015=_0x4f6d31;return _0x1cdced[_0x247015(0x3dc)]?.[_0x247015(0x511)]??_0x1cdced['meta']?.[_0x247015(0x511)]??'';}function _0x5d8850(_0x26723d){const _0x4d1109=_0x4f6d31;return _0x26723d[_0x4d1109(0x3dc)]?.['description']??_0x26723d[_0x4d1109(0x49b)]?.['description']??'';}function _0x2a69f5(_0x2668a9){const _0x1c0260=_0x4f6d31;return _0x2668a9[_0x1c0260(0x3dc)]?.[_0x1c0260(0x4f6)]?.['length']?_0x2668a9[_0x1c0260(0x3dc)][_0x1c0260(0x4f6)]:_0x2668a9[_0x1c0260(0x49b)]?.['tags']??[];}function _0x4805a3(_0x4749ca){const _0x156fae=_0x4f6d31,_0x5e255c=[];_0x5e255c[_0x156fae(0x338)]('\x20\x20'+_0x534bbf(_0x142582[_0x156fae(0x756)]+_0x142582['magenta'],_0x4749ca[_0x156fae(0x74a)]['padEnd'](0x7))+'\x20'+_0x534bbf(_0x142582['bold']+_0x142582[_0x156fae(0x2af)],_0x4749ca['path']));_0x4749ca[_0x156fae(0x3dc)]?.['id']&&_0x5e255c[_0x156fae(0x338)](_0x156fae(0x484)+_0x534bbf(_0x142582[_0x156fae(0x395)],_0x156fae(0x262)+_0x4749ca['operation']['id']));_0x184d21(_0x4749ca)&&_0x5e255c[_0x156fae(0x338)](_0x156fae(0x484)+_0x534bbf(_0x142582['white'],_0x184d21(_0x4749ca)));_0x5d8850(_0x4749ca)&&_0x5e255c[_0x156fae(0x338)](_0x156fae(0x484)+_0x534bbf(_0x142582['dim'],_0x5d8850(_0x4749ca)));_0x2a69f5(_0x4749ca)[_0x156fae(0x3be)]&&_0x5e255c[_0x156fae(0x338)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x534bbf(_0x142582[_0x156fae(0x395)],_0x156fae(0x587)+_0x2a69f5(_0x4749ca)[_0x156fae(0x86d)](',\x20')));_0x4749ca[_0x156fae(0x3dc)]?.[_0x156fae(0x5c5)]?.[_0x156fae(0x564)]&&_0x5e255c[_0x156fae(0x338)](_0x156fae(0x484)+_0x534bbf(_0x142582['gray'],_0x156fae(0x755)+_0x4749ca[_0x156fae(0x3dc)][_0x156fae(0x5c5)]['access']));_0x4749ca[_0x156fae(0x3dc)]?.[_0x156fae(0x4fc)]?.[_0x156fae(0x802)]&&_0x4749ca[_0x156fae(0x3dc)][_0x156fae(0x4fc)][_0x156fae(0x802)]!==_0x156fae(0x5b3)&&_0x5e255c[_0x156fae(0x338)](_0x156fae(0x484)+_0x534bbf(_0x142582[_0x156fae(0x395)],_0x156fae(0x376)+_0x4749ca['operation']['http'][_0x156fae(0x802)]));if(_0x4749ca[_0x156fae(0x3dc)]?.['inputSchema']){const _0x441294=Object[_0x156fae(0x6c7)](_0x4749ca[_0x156fae(0x3dc)][_0x156fae(0x623)][_0x156fae(0x4aa)]||{});if(_0x441294[_0x156fae(0x3be)])_0x5e255c[_0x156fae(0x338)](_0x156fae(0x484)+_0x534bbf(_0x142582['gray'],'input:\x20'+_0x441294['join'](',\x20')));}return _0x4749ca[_0x156fae(0x49b)]?.[_0x156fae(0x8b0)]&&_0x5e255c['push'](_0x156fae(0x484)+_0x534bbf(_0x142582[_0x156fae(0x395)],'body:\x20'+JSON['stringify'](_0x4749ca[_0x156fae(0x49b)]['body']))),_0x5e255c;}async function _0x47433e(_0x3e72fc,_0x156338,_0x12d7f9,_0x1ef0fe=null){const _0x575a23=_0x4f6d31,_0x2d822b=_0x12d7f9[_0x575a23(0x24b)]('?'),_0x17bf40=_0x2d822b>=0x0?_0x12d7f9[_0x575a23(0x556)](0x0,_0x2d822b):_0x12d7f9,_0x10e955=_0x2d822b>=0x0?_0x12d7f9['slice'](_0x2d822b+0x1):'',_0x345c61=Object[_0x575a23(0x6e9)](new URLSearchParams(_0x10e955)[_0x575a23(0x444)]());return _0x3e72fc['http'][_0x575a23(0x781)](_0x156338,_0x17bf40,{'body':_0x1ef0fe,'query':_0x345c61,'headers':{'content-type':_0x575a23(0x5c1)}},{'internal':!![]});}function _0xf9ad7f(_0x436f6e){const _0x195302=_0x4f6d31;if(!_0x436f6e)return null;const _0x316ba0=_0x436f6e['trim']();if(!_0x316ba0)return null;try{return JSON[_0x195302(0x81a)](_0x316ba0);}catch{}try{return JSON[_0x195302(0x81a)](_0x245611(_0x316ba0));}catch(_0x42312a){throw new SyntaxError(_0x42312a[_0x195302(0x439)],{'cause':_0x42312a});}}function _0x245611(_0x4a623d){const _0x2d8064=_0x4f6d31;let _0x3dac09='',_0x3885c2=0x0;while(_0x3885c2<_0x4a623d[_0x2d8064(0x3be)]){const _0x6f7078=_0x4a623d[_0x3885c2];if(_0x6f7078==='\x22'){_0x3dac09+='\x22',_0x3885c2++;while(_0x3885c2<_0x4a623d[_0x2d8064(0x3be)]&&_0x4a623d[_0x3885c2]!=='\x22'){if(_0x4a623d[_0x3885c2]==='\x5c'){_0x3dac09+=_0x4a623d[_0x3885c2++];if(_0x3885c2<_0x4a623d[_0x2d8064(0x3be)])_0x3dac09+=_0x4a623d[_0x3885c2++];}else _0x3dac09+=_0x4a623d[_0x3885c2++];}_0x3dac09+='\x22';if(_0x3885c2<_0x4a623d[_0x2d8064(0x3be)])_0x3885c2++;continue;}if(_0x6f7078==='\x27'){_0x3dac09+='\x22',_0x3885c2++;while(_0x3885c2<_0x4a623d['length']&&_0x4a623d[_0x3885c2]!=='\x27'){if(_0x4a623d[_0x3885c2]==='\x5c'&&_0x4a623d[_0x3885c2+0x1]==='\x27')_0x3dac09+='\x27',_0x3885c2+=0x2;else _0x4a623d[_0x3885c2]==='\x22'?(_0x3dac09+='\x5c\x22',_0x3885c2++):_0x3dac09+=_0x4a623d[_0x3885c2++];}_0x3dac09+='\x22';if(_0x3885c2<_0x4a623d[_0x2d8064(0x3be)])_0x3885c2++;continue;}if(_0x2d8064(0x670)[_0x2d8064(0x6d1)](_0x6f7078)){_0x3dac09+=_0x6f7078,_0x3885c2++;continue;}let _0x70c29b='';while(_0x3885c2<_0x4a623d[_0x2d8064(0x3be)]&&!_0x2d8064(0x3a2)[_0x2d8064(0x6d1)](_0x4a623d[_0x3885c2])&&_0x4a623d[_0x3885c2]!=='\x20'&&_0x4a623d[_0x3885c2]!=='\x09'&&_0x4a623d[_0x3885c2]!=='\x0a'&&_0x4a623d[_0x3885c2]!=='\x0d'){_0x70c29b+=_0x4a623d[_0x3885c2++];}let _0x31848c=_0x3885c2;while(_0x31848c<_0x4a623d['length']&&(_0x4a623d[_0x31848c]==='\x20'||_0x4a623d[_0x31848c]==='\x09'))_0x31848c++;if(_0x4a623d[_0x31848c]===':')_0x3dac09+='\x22'+_0x70c29b+'\x22';else _0x70c29b===_0x2d8064(0x574)||_0x70c29b===_0x2d8064(0x83b)||_0x70c29b===_0x2d8064(0x498)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/['test'](_0x70c29b)?_0x3dac09+=_0x70c29b:_0x3dac09+='\x22'+_0x70c29b+'\x22';}return _0x3dac09[_0x2d8064(0x2f9)](/,(\s*[}\]])/g,'$1');}function _0x33a136(_0x627c78){const _0x5dac60=_0x4f6d31,_0x1cafb5=[];let _0x131d11=0x0;while(_0x131d11<_0x627c78[_0x5dac60(0x3be)]){while(_0x131d11<_0x627c78[_0x5dac60(0x3be)]&&(_0x627c78[_0x131d11]==='\x20'||_0x627c78[_0x131d11]==='\x09'))_0x131d11++;if(_0x131d11>=_0x627c78[_0x5dac60(0x3be)])break;const _0x93aa69=_0x627c78[_0x131d11];if(_0x93aa69==='{'||_0x93aa69==='['){const _0x4eb5fb=_0x93aa69==='{'?'}':']',_0x6a3835=_0x131d11++;let _0x3e08ef=0x1,_0xdacaad=![],_0x3f381d='';while(_0x131d11<_0x627c78[_0x5dac60(0x3be)]&&_0x3e08ef>0x0){const _0x19f21b=_0x627c78[_0x131d11];if(_0xdacaad){if(_0x19f21b==='\x5c')_0x131d11++;else{if(_0x19f21b===_0x3f381d)_0xdacaad=![];}}else{if(_0x19f21b==='\x22'||_0x19f21b==='\x27')_0xdacaad=!![],_0x3f381d=_0x19f21b;else{if(_0x19f21b===_0x93aa69)_0x3e08ef++;else{if(_0x19f21b===_0x4eb5fb)_0x3e08ef--;}}}_0x131d11++;}_0x1cafb5['push'](_0x627c78[_0x5dac60(0x556)](_0x6a3835,_0x131d11));continue;}if(_0x93aa69==='\x22'||_0x93aa69==='\x27'){const _0x96abcd=_0x93aa69;_0x131d11++;let _0x407866='';while(_0x131d11<_0x627c78[_0x5dac60(0x3be)]&&_0x627c78[_0x131d11]!==_0x96abcd){if(_0x627c78[_0x131d11]==='\x5c'&&_0x131d11+0x1<_0x627c78[_0x5dac60(0x3be)])_0x131d11++,_0x407866+=_0x627c78[_0x131d11++];else _0x407866+=_0x627c78[_0x131d11++];}if(_0x131d11<_0x627c78[_0x5dac60(0x3be)])_0x131d11++;_0x1cafb5[_0x5dac60(0x338)](_0x407866);continue;}let _0x5219b4='';while(_0x131d11<_0x627c78['length']&&_0x627c78[_0x131d11]!=='\x20'&&_0x627c78[_0x131d11]!=='\x09'&&_0x627c78[_0x131d11]!=='{'&&_0x627c78[_0x131d11]!=='['){_0x5219b4+=_0x627c78[_0x131d11++];}if(_0x5219b4)_0x1cafb5['push'](_0x5219b4);}return _0x1cafb5;}function _0x171669(_0x76dd83,_0x589d43){const _0x177d11=_0x4f6d31,_0x744d6f=[..._0x76dd83['_envs'][_0x177d11(0x6c7)]()][_0x177d11(0x49c)](_0x222ed3=>!_0x222ed3[_0x177d11(0x5e1)]('~'));console[_0x177d11(0x51a)](['',_0x534bbf(_0x142582['bold']+_0x142582[_0x177d11(0x2af)],_0x177d11(0x2b1)),_0x534bbf(_0x142582['bold']+_0x142582[_0x177d11(0x2af)],_0x177d11(0x52b))+_0x534bbf(_0x142582[_0x177d11(0x756)],_0x177d11(0x464))+_0x534bbf(_0x142582[_0x177d11(0x756)]+_0x142582[_0x177d11(0x2af)],'║'),_0x534bbf(_0x142582[_0x177d11(0x756)]+_0x142582[_0x177d11(0x2af)],'\x20\x20╚═══════════════════════════╝'),'','\x20\x20'+_0x534bbf(_0x142582[_0x177d11(0x229)],'✓')+'\x20'+_0x534bbf(_0x142582['bold'],_0x177d11(0x622))+'\x20\x20http://localhost:'+_0x589d43[_0x177d11(0x537)],..._0x589d43[_0x177d11(0x373)]>0x1?['\x20\x20'+_0x534bbf(_0x142582['green'],'✓')+'\x20'+_0x534bbf(_0x142582[_0x177d11(0x756)],_0x177d11(0x759))+'\x20'+_0x589d43[_0x177d11(0x373)]+_0x177d11(0x6c8)+_0x534bbf(_0x142582[_0x177d11(0x395)],_0x177d11(0x42e))]:[],'\x20\x20'+_0x534bbf(_0x142582[_0x177d11(0x229)],'✓')+'\x20'+_0x534bbf(_0x142582[_0x177d11(0x756)],_0x177d11(0x7bc))+'\x20\x20\x20\x20\x20http://localhost:'+_0x589d43[_0x177d11(0x537)]+_0x177d11(0x79f),'\x20\x20'+_0x534bbf(_0x142582[_0x177d11(0x229)],'✓')+'\x20'+_0x534bbf(_0x142582['bold'],'path')+_0x177d11(0x1d3)+_0x589d43[_0x177d11(0x5f0)],'\x20\x20'+_0x534bbf(_0x142582['green'],'✓')+'\x20'+_0x534bbf(_0x142582[_0x177d11(0x756)],'id')+_0x177d11(0x222)+_0x534bbf(_0x142582[_0x177d11(0x395)],_0x76dd83['id']),'\x20\x20'+_0x534bbf(_0x142582[_0x177d11(0x229)],'✓')+'\x20'+_0x534bbf(_0x142582[_0x177d11(0x756)],_0x177d11(0x576))+_0x177d11(0x1d3)+_0x744d6f['map'](_0x2911b4=>_0x534bbf(_0x142582[_0x177d11(0x2af)],_0x2911b4))[_0x177d11(0x86d)]('\x20\x20'),..._0x589d43['noAdmin']?[]:['\x20\x20'+_0x534bbf(_0x142582[_0x177d11(0x229)],'✓')+'\x20'+_0x534bbf(_0x142582[_0x177d11(0x756)],_0x177d11(0x45e))+'\x20\x20\x20http://localhost:'+_0x589d43[_0x177d11(0x537)]+_0x177d11(0x5d8)],'',_0x534bbf(_0x142582['dim'],_0x177d11(0x84f)+_0x534bbf(_0x142582[_0x177d11(0x756)],'help')+'\x20for\x20commands,\x20'+_0x534bbf(_0x142582[_0x177d11(0x756)],_0x177d11(0x8ae))+_0x177d11(0x593)+_0x534bbf(_0x142582[_0x177d11(0x756)],_0x177d11(0x56e))+_0x177d11(0x236)),'']['join']('\x0a'));}function _0x692920(_0x2790d9){const _0x8844d7=_0x4f6d31;console[_0x8844d7(0x51a)]('\x0a'+_0x534bbf(_0x142582['bold'],_0x8844d7(0x829))+'\x20\x20'+_0x534bbf(_0x142582['dim'],'—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected')+'\x0a\x0a\x20\x20'+_0x534bbf(_0x142582[_0x8844d7(0x2af)],'<path>')+_0x8844d7(0x4f5)+_0x534bbf(_0x142582[_0x8844d7(0x2af)],_0x8844d7(0x42f))+'\x20'+_0x534bbf(_0x142582[_0x8844d7(0x5eb)],_0x8844d7(0x890))+_0x8844d7(0x895)+_0x534bbf(_0x142582['cyan'],'VERB')+'\x20'+_0x534bbf(_0x142582[_0x8844d7(0x2af)],_0x8844d7(0x42f))+'\x20'+_0x534bbf(_0x142582[_0x8844d7(0x5eb)],_0x8844d7(0x6be))+_0x8844d7(0x4c9)+_0x534bbf(_0x142582[_0x8844d7(0x38b)],_0x8844d7(0x6c5))+'\x0a\x20\x20\x20\x20'+_0x534bbf(_0x142582[_0x8844d7(0x395)],_0x8844d7(0x8c8))+_0x8844d7(0x6e5)+_0x534bbf(_0x142582['gray'],'envs')+_0x8844d7(0x398)+_0x534bbf(_0x142582[_0x8844d7(0x395)],_0x8844d7(0x732))+_0x8844d7(0x69c)+_0x2790d9[_0x8844d7(0x344)]+_0x8844d7(0x4f2)+_0x534bbf(_0x142582[_0x8844d7(0x395)],'type/users')+_0x8844d7(0x585)+_0x2790d9[_0x8844d7(0x344)]+_0x8844d7(0x3fe)+_0x534bbf(_0x142582[_0x8844d7(0x395)],'type/users/item/alice')+_0x8844d7(0x803)+_0x2790d9[_0x8844d7(0x344)]+_0x8844d7(0x855)+_0x534bbf(_0x142582['gray'],_0x8844d7(0x688))+_0x8844d7(0x878)+_0x2790d9[_0x8844d7(0x344)]+'/type/users/query\x0a\x20\x20\x20\x20'+_0x534bbf(_0x142582['gray'],'PUT\x20type/users/item/x\x20{\x22n\x22:1}')+_0x8844d7(0x54a)+_0x534bbf(_0x142582['gray'],_0x8844d7(0x374))+_0x8844d7(0x54a)+_0x534bbf(_0x142582[_0x8844d7(0x395)],_0x8844d7(0x1f4))+'\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'+_0x534bbf(_0x142582[_0x8844d7(0x756)],_0x8844d7(0x1b8))+'\x20\x20'+_0x534bbf(_0x142582['dim'],'(on\x20any\x20path\x20command)')+'\x0a\x0a\x20\x20'+_0x534bbf(_0x142582[_0x8844d7(0x2af)],_0x8844d7(0x404))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20'+_0x534bbf(_0x142582[_0x8844d7(0x2af)],_0x8844d7(0x58f))+_0x8844d7(0x214)+_0x534bbf(_0x142582[_0x8844d7(0x38b)],_0x8844d7(0x6c5))+_0x8844d7(0x54a)+_0x534bbf(_0x142582[_0x8844d7(0x395)],_0x8844d7(0x5c3))+_0x8844d7(0x54a)+_0x534bbf(_0x142582[_0x8844d7(0x395)],_0x8844d7(0x480))+_0x8844d7(0x54a)+_0x534bbf(_0x142582[_0x8844d7(0x395)],_0x8844d7(0x2f6))+'\x0a\x0a'+_0x534bbf(_0x142582[_0x8844d7(0x756)],'\x20\x20Shell\x20commands')+'\x0a\x0a\x20\x20'+_0x534bbf(_0x142582[_0x8844d7(0x2af)],_0x8844d7(0x70f))+_0x8844d7(0x33c)+_0x534bbf(_0x142582[_0x8844d7(0x2af)],'env')+_0x8844d7(0x602)+_0x534bbf(_0x142582[_0x8844d7(0x2af)],_0x8844d7(0x8ae))+'\x20'+_0x534bbf(_0x142582[_0x8844d7(0x38b)],'[filter]')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20'+_0x534bbf(_0x142582[_0x8844d7(0x2af)],'logs')+'\x20'+_0x534bbf(_0x142582[_0x8844d7(0x38b)],_0x8844d7(0x832))+_0x8844d7(0x572)+_0x534bbf(_0x142582[_0x8844d7(0x2af)],_0x8844d7(0x654))+'\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'+_0x534bbf(_0x142582[_0x8844d7(0x2af)],_0x8844d7(0x7c9))+_0x8844d7(0x7ca)+_0x534bbf(_0x142582[_0x8844d7(0x2af)],'exit')+'\x20'+_0x534bbf(_0x142582[_0x8844d7(0x38b)],_0x8844d7(0x84c))+'\x20\x20\x20\x20graceful\x20shutdown\x0a');}let _0x33306e=![];async function _0x45c75f(_0x2b3a4e,_0x2451ce=0x0,_0xf9abeb=null){const _0x63d793=_0x4f6d31;_0x33306e&&(process[_0x63d793(0x58d)][_0x63d793(0x6d4)](_0x534bbf(_0x142582[_0x63d793(0x27e)],'\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a')),process[_0x63d793(0x56e)](0x82));_0x33306e=!![],process[_0x63d793(0x6cd)][_0x63d793(0x6d4)]('\x0a'),process[_0x63d793(0x58d)][_0x63d793(0x6d4)](_0x534bbf(_0x142582['yellow'],_0x63d793(0x278)+(_0xf9abeb?_0x63d793(0x6fc)+_0xf9abeb+',\x20':'')+'shutting\x20down…\x0a'));const _0x1f9b1f=setTimeout(()=>{const _0x528ea2=_0x63d793;process['stderr']['write'](_0x534bbf(_0x142582['red'],'\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a')),process[_0x528ea2(0x56e)](0x1);},0x1388);try{await _0x2b3a4e[_0x63d793(0x55c)]();}catch(_0x469e63){console['error'](_0x534bbf(_0x142582[_0x63d793(0x27e)],'\x20\x20'+_0x469e63[_0x63d793(0x439)]));}clearTimeout(_0x1f9b1f),process[_0x63d793(0x58d)][_0x63d793(0x6d4)](_0x534bbf(_0x142582['dim'],_0x63d793(0x7f0))),process[_0x63d793(0x56e)](_0x2451ce);}function _0x2ad610(_0x553368){const _0x4d141b=_0x4f6d31,_0xf5e61a=_0x553368['env']!==_0x4d141b(0x2dc)?_0x534bbf(_0x142582[_0x4d141b(0x5eb)],'['+_0x553368[_0x4d141b(0x344)]+']'):'';return _0x534bbf(_0x142582[_0x4d141b(0x756)]+_0x142582[_0x4d141b(0x2af)],_0x4d141b(0x7f8))+_0xf5e61a+_0x534bbf(_0x142582[_0x4d141b(0x395)],'>\x20');}const _0x45694e=new Set(['GET',_0x4f6d31(0x254),_0x4f6d31(0x6ae),_0x4f6d31(0x351),_0x4f6d31(0x584)]);async function _0x466fc7(_0xf9de54,_0xe2ebec,_0x4acb07,_0x4d7214,_0x554ce2,_0x397a92){const _0xc54211=_0x4f6d31;_0xf9de54=_0xf9de54[_0xc54211(0x543)]();if(!_0xf9de54||_0xf9de54[_0xc54211(0x5e1)]('#'))return;const _0x293d95=_0x33a136(_0xf9de54),{flags:_0x24fb4f,rest:_0x1813de}=_0x208242(_0x293d95);if(!_0x1813de['length'])return;const _0x108e63=_0x1813de[0x0],_0x5324dd=_0x108e63[_0xc54211(0x589)]();if(_0x5324dd===_0xc54211(0x20c)){if(_0x1813de[0x1])_0x2e590f(_0xe2ebec,_0x1ff547(_0x1813de[0x1],_0x24fb4f[_0xc54211(0x344)]??_0x554ce2[_0xc54211(0x344)]));else _0x692920(_0x554ce2);return;}if(_0x5324dd==='USE'){const _0x26cf09=_0x1813de[0x1];if(!_0x26cf09){console[_0xc54211(0x51a)](_0x534bbf(_0x142582['red'],_0xc54211(0x80e)));return;}try{_0xe2ebec['env'](_0x26cf09),_0x554ce2['env']=_0x26cf09,_0x397a92?.[_0xc54211(0x27a)](_0x2ad610(_0x554ce2)),console['log'](_0xc54211(0x356)+_0x534bbf(_0x142582[_0xc54211(0x229)],'✓')+'\x20active\x20env:\x20'+_0x534bbf(_0x142582['bold']+_0x142582[_0xc54211(0x2af)],_0x26cf09)+'\x0a');}catch{console[_0xc54211(0x51a)](_0xc54211(0x356)+_0x534bbf(_0x142582['red'],'✗')+_0xc54211(0x415)+_0x534bbf(_0x142582[_0xc54211(0x756)],_0x26cf09)+'\x20not\x20found'+_0x534bbf(_0x142582[_0xc54211(0x38b)],_0xc54211(0x5bb)));}return;}if(_0x5324dd===_0xc54211(0x3cd)){const _0x360f81=[..._0xe2ebec[_0xc54211(0x828)][_0xc54211(0x6c7)]()][_0xc54211(0x49c)](_0x109c9b=>!_0x109c9b[_0xc54211(0x5e1)]('~'));console[_0xc54211(0x51a)]('');for(const _0x5907b3 of _0x360f81){const _0x1f8d13=_0x5907b3===_0x554ce2[_0xc54211(0x344)];console[_0xc54211(0x51a)]('\x20\x20'+(_0x1f8d13?_0x534bbf(_0x142582[_0xc54211(0x229)],'●'):_0x534bbf(_0x142582[_0xc54211(0x38b)],'○'))+'\x20\x20'+(_0x1f8d13?_0x534bbf(_0x142582[_0xc54211(0x756)]+_0x142582[_0xc54211(0x2af)],_0x5907b3):_0x534bbf(_0x142582[_0xc54211(0x38b)],_0x5907b3)));}console[_0xc54211(0x51a)]('\x0a\x20\x20'+_0x534bbf(_0x142582[_0xc54211(0x38b)],'active:')+'\x20'+_0x534bbf(_0x142582[_0xc54211(0x2af)],_0x554ce2[_0xc54211(0x344)])),console[_0xc54211(0x51a)]('');return;}if(_0x5324dd===_0xc54211(0x2e2)){const _0x2cd01a=[..._0xe2ebec[_0xc54211(0x828)][_0xc54211(0x33f)]()][_0xc54211(0x49c)](_0x560ccf=>!_0x560ccf[_0xc54211(0x2a9)][_0xc54211(0x5e1)]('~'));console[_0xc54211(0x51a)]('');const _0x5b884e=Math[_0xc54211(0x321)](..._0x2cd01a[_0xc54211(0x8bd)](_0x48dee8=>_0x48dee8[_0xc54211(0x2a9)][_0xc54211(0x3be)]));for(const _0x18174e of _0x2cd01a){const _0x465a95=_0x18174e[_0xc54211(0x2a9)]===_0x554ce2[_0xc54211(0x344)],_0x19e693=_0x465a95?_0x534bbf(_0x142582[_0xc54211(0x229)],'●'):_0x534bbf(_0x142582[_0xc54211(0x38b)],'○'),_0x49bffc=_0x465a95?_0x534bbf(_0x142582[_0xc54211(0x756)]+_0x142582[_0xc54211(0x2af)],_0x18174e['name'][_0xc54211(0x6ee)](_0x5b884e)):_0x534bbf(_0x142582[_0xc54211(0x38b)],_0x18174e[_0xc54211(0x2a9)][_0xc54211(0x6ee)](_0x5b884e)),_0x3b3593=[..._0x18174e['typeSubDbs'][_0xc54211(0x6c7)]()][_0xc54211(0x49c)](_0x408d24=>!_0x408d24['startsWith']('~')),_0x2ac6a7=_0x3b3593['length']?_0x534bbf(_0x142582[_0xc54211(0x38b)],_0x3b3593[_0xc54211(0x556)](0x0,0x5)[_0xc54211(0x86d)](',\x20')+(_0x3b3593['length']>0x5?'\x20\x20+'+(_0x3b3593['length']-0x5)+'\x20more':'')):_0x534bbf(_0x142582[_0xc54211(0x38b)],_0xc54211(0x5f5));console[_0xc54211(0x51a)]('\x20\x20'+_0x19e693+'\x20\x20'+_0x49bffc+'\x20\x20'+_0x2ac6a7);}console[_0xc54211(0x51a)]('');return;}if(_0x5324dd===_0xc54211(0x7cd)){const _0x4a556f=_0x24fb4f[_0xc54211(0x344)]??_0x1813de[0x1]??_0x554ce2[_0xc54211(0x344)];try{const _0x1d4d94=_0xe2ebec[_0xc54211(0x344)](_0x4a556f),_0xa204a4=[..._0x1d4d94[_0xc54211(0x662)][_0xc54211(0x6c7)]()][_0xc54211(0x49c)](_0x4e6ec3=>!_0x4e6ec3[_0xc54211(0x5e1)]('~'))['sort']();console['log'](_0xc54211(0x356)+_0x534bbf(_0x142582[_0xc54211(0x38b)],_0xa204a4['length']+_0xc54211(0x4d2)+(_0xa204a4[_0xc54211(0x3be)]!==0x1?'s':'')+'\x20in\x20'+_0x4a556f));for(const _0x51a2e6 of _0xa204a4){const _0x150ec=_0x1d4d94[_0xc54211(0x662)][_0xc54211(0x5ab)](_0x51a2e6),_0x4d3c67=_0x150ec?.[_0xc54211(0x44d)]?.['getCount']?.()??0x0,_0x12a014=_0x534bbf(_0x142582[_0xc54211(0x756)]+_0x142582['cyan'],_0x51a2e6[_0xc54211(0x6ee)](0x1c));console[_0xc54211(0x51a)]('\x20\x20\x20\x20'+_0x12a014+'\x20\x20'+_0x534bbf(_0x142582[_0xc54211(0x5ae)],String(_0x4d3c67)['padStart'](0x6))+'\x20'+_0x534bbf(_0x142582[_0xc54211(0x38b)],_0xc54211(0x3f8)));}console[_0xc54211(0x51a)]('');}catch(_0x183287){console[_0xc54211(0x21f)](_0x534bbf(_0x142582[_0xc54211(0x27e)],_0xc54211(0x356)+_0x183287['message']+'\x0a'));}return;}if(_0x5324dd===_0xc54211(0x454)){_0x67b55f(_0xe2ebec,_0x1813de[_0xc54211(0x556)](0x1)['join']('\x20'));return;}if(_0x5324dd===_0xc54211(0x245)){const _0x12ff93=(_0x1813de[0x1]??'')[_0xc54211(0x6e4)]();if(!_0x12ff93||_0x12ff93==='on')_0x4d7214['enabled']=!![],_0x4d7214[_0xc54211(0x5ad)]=_0xc54211(0x8c8),console[_0xc54211(0x51a)](_0xc54211(0x356)+_0x534bbf(_0x142582[_0xc54211(0x229)],'✓')+_0xc54211(0x1c7)+_0x534bbf(_0x142582[_0xc54211(0x38b)],_0xc54211(0x8a7))+'\x0a');else{if(_0x12ff93===_0xc54211(0x866))_0x4d7214[_0xc54211(0x71f)]=![],console[_0xc54211(0x51a)]('\x0a\x20\x20'+_0x534bbf(_0x142582[_0xc54211(0x5eb)],'○')+_0xc54211(0x1ed));else _0x4a91ba[_0x12ff93]!==undefined?(_0x4d7214['enabled']=!![],_0x4d7214[_0xc54211(0x5ad)]=_0x12ff93,console[_0xc54211(0x51a)]('\x0a\x20\x20'+_0x534bbf(_0x142582[_0xc54211(0x229)],'✓')+'\x20log\x20level:\x20'+_0x534bbf(_0x142582['bold'],_0x12ff93)+'\x0a')):console[_0xc54211(0x21f)](_0x534bbf(_0x142582[_0xc54211(0x27e)],_0xc54211(0x73e)));}return;}if(_0x5324dd===_0xc54211(0x645)||_0x5324dd===_0xc54211(0x30b)){await _0x45c75f(_0xe2ebec,0x0);return;}if(_0x5324dd===_0xc54211(0x34e)){const _0x1f5320='http://localhost:'+_0x4acb07['port']+_0xc54211(0x5d8),_0x1a8077=process['platform']===_0xc54211(0x61d)?_0xc54211(0x430)+_0x1f5320:process[_0xc54211(0x3ea)]===_0xc54211(0x47f)?'open\x20'+_0x1f5320:_0xc54211(0x2a5)+_0x1f5320;require$$4[_0xc54211(0x20a)](_0x1a8077),console[_0xc54211(0x51a)](_0xc54211(0x356)+_0x534bbf(_0x142582[_0xc54211(0x229)],'✓')+_0xc54211(0x709)+_0x534bbf(_0x142582['cyan'],_0x1f5320)+'\x0a');return;}let _0xf33b47,_0x30ceae,_0x5235ac;if(_0x45694e[_0xc54211(0x6f1)](_0x5324dd)){_0xf33b47=_0x5324dd,_0x30ceae=_0x1813de[0x1],_0x5235ac=_0x1813de[_0xc54211(0x556)](0x2);if(!_0x30ceae){console[_0xc54211(0x21f)](_0x534bbf(_0x142582[_0xc54211(0x27e)],_0xc54211(0x60d)+_0x108e63+_0xc54211(0x5d3)));return;}}else _0xf33b47=null,_0x30ceae=_0x1813de[0x0],_0x5235ac=_0x1813de[_0xc54211(0x556)](0x1);const _0x726c49=_0x24fb4f[_0xc54211(0x344)]??_0x554ce2[_0xc54211(0x344)],_0x16c1ba=_0x1ff547(_0x30ceae,_0x726c49);if(_0x24fb4f[_0xc54211(0x7c9)]){_0x2e590f(_0xe2ebec,_0x16c1ba);return;}let _0x378c68=null;if(_0x5235ac[_0xc54211(0x3be)]){const _0xfb4b3e=_0x5235ac['join']('\x20');try{_0x378c68=_0xf9ad7f(_0xfb4b3e);}catch(_0xa32757){console[_0xc54211(0x21f)](_0x534bbf(_0x142582[_0xc54211(0x27e)],_0xc54211(0x396)+_0xfb4b3e+_0xc54211(0x356)+_0x534bbf(_0x142582[_0xc54211(0x38b)],_0xa32757['message'])+'\x0a'));return;}}if(!_0xf33b47)_0xf33b47=_0x378c68!==null?'POST':_0xc54211(0x4da);try{const _0x2e7fa5=await _0x47433e(_0xe2ebec,_0xf33b47,_0x16c1ba,_0x378c68);_0xe084c2(_0x2e7fa5[_0xc54211(0x492)],_0x2e7fa5[_0xc54211(0x8b0)]);}catch(_0xf37c28){console[_0xc54211(0x21f)]('\x0a\x20\x20'+_0x534bbf(_0x142582[_0xc54211(0x27e)],'✗')+'\x20'+_0xf37c28[_0xc54211(0x439)]+'\x0a');}}class _0x5dd389{constructor(){const _0x5bcfe3=_0x4f6d31;this[_0x5bcfe3(0x2a2)]=new Map(),this[_0x5bcfe3(0x38c)]=null,this['terminal']=![];}}function _0x14de88(_0x4af1ca){const _0x3978ca=_0x4f6d31,_0x528b87=new _0x5dd389();for(const _0xfa2f8c of _0x4af1ca){if(_0xfa2f8c[_0x3978ca(0x49b)]?.['hidden'])continue;const _0x182607=_0xfa2f8c[_0x3978ca(0x1de)][_0x3978ca(0x2f9)](/^\/api/,'')['replace'](/^\[\/env\/:env=[^\]]*\]/,'')[_0x3978ca(0x2f9)](/^\//,'');if(!_0x182607)continue;let _0x4bcc93=_0x528b87;for(const _0x282ef1 of _0x182607['split']('/')[_0x3978ca(0x49c)](Boolean)){if(_0x282ef1[_0x3978ca(0x5e1)](':')){const _0x2fd0b6=_0x282ef1[_0x3978ca(0x556)](0x1);if(!_0x4bcc93['dynamic'])_0x4bcc93['dynamic']={'param':_0x2fd0b6,'node':new _0x5dd389()};_0x4bcc93=_0x4bcc93[_0x3978ca(0x38c)]['node'];}else{if(!_0x4bcc93[_0x3978ca(0x2a2)]['has'](_0x282ef1))_0x4bcc93['children'][_0x3978ca(0x4dc)](_0x282ef1,new _0x5dd389());_0x4bcc93=_0x4bcc93['children'][_0x3978ca(0x5ab)](_0x282ef1);}}_0x4bcc93[_0x3978ca(0x724)]=!![];}return _0x528b87;}const _0x160cb=new Map();function _0x1adced(_0x2cf870,_0x30b404,_0x15cd05){const _0x4bca98=_0x4f6d31,_0x48ef75=_0x160cb[_0x4bca98(0x5ab)](_0x2cf870);if(_0x48ef75&&_0x48ef75[_0x4bca98(0x7a6)]>Date[_0x4bca98(0x81b)]())return _0x48ef75[_0x4bca98(0x632)];const _0x1ce6be=_0x15cd05();return _0x160cb['set'](_0x2cf870,{'val':_0x1ce6be,'exp':Date[_0x4bca98(0x81b)]()+_0x30b404}),_0x1ce6be;}function _0x3b7985(_0x59c8ba,_0x53723b,_0x16a2ab,_0x4ffdfc){const _0x157546=_0x4f6d31,_0x3a747e=_0x53723b['env']??_0x4ffdfc[_0x157546(0x344)];switch(_0x59c8ba){case'env':return[..._0x16a2ab['_envs'][_0x157546(0x6c7)]()][_0x157546(0x49c)](_0x5289d8=>!_0x5289d8[_0x157546(0x5e1)]('~'));case'type':return _0x1adced(_0x157546(0x1ac)+_0x3a747e,0x7d0,()=>{const _0x30ad61=_0x157546;try{return[..._0x16a2ab[_0x30ad61(0x344)](_0x3a747e)['typeSubDbs'][_0x30ad61(0x6c7)]()][_0x30ad61(0x49c)](_0x231c83=>!_0x231c83[_0x30ad61(0x5e1)]('~'));}catch{return[];}});case _0x157546(0x7d4):if(!_0x53723b[_0x157546(0x70d)])return[];return _0x1adced('keys:'+_0x3a747e+':'+_0x53723b['type'],0x5dc,()=>{const _0x2676e0=_0x157546;try{const _0x2a8e33=_0x16a2ab[_0x2676e0(0x344)](_0x3a747e)['typeSubDbs']['get'](_0x53723b[_0x2676e0(0x70d)]);if(!_0x2a8e33?.[_0x2676e0(0x44d)])return[];const _0x4f8522=[];for(const {key:_0x125729}of _0x2a8e33[_0x2676e0(0x44d)][_0x2676e0(0x754)]({'limit':0x32})){_0x4f8522[_0x2676e0(0x338)](String(_0x125729));if(_0x4f8522[_0x2676e0(0x3be)]>=0x32)break;}return _0x4f8522;}catch{return[];}});case _0x157546(0x391):if(!_0x53723b[_0x157546(0x70d)])return[];return _0x1adced(_0x157546(0x26f)+_0x3a747e+':'+_0x53723b['type'],0x7d0,()=>{const _0xaf0b28=_0x157546;try{const _0x4fcb94=_0x16a2ab[_0xaf0b28(0x344)](_0x3a747e)[_0xaf0b28(0x662)]['get'](_0x53723b[_0xaf0b28(0x70d)]);return _0x4fcb94?[..._0x4fcb94[_0xaf0b28(0x6c1)]?.[_0xaf0b28(0x6c7)]()??[]]:[];}catch{return[];}});case _0x157546(0x668):if(!_0x53723b['type'])return[];return _0x1adced(_0x157546(0x31e)+_0x3a747e+':'+_0x53723b[_0x157546(0x70d)],0x7d0,()=>{const _0x579e8f=_0x157546;try{return _0x16a2ab[_0x579e8f(0x6ca)]?.['list']?.(_0x53723b['type'],_0x16a2ab[_0x579e8f(0x344)](_0x3a747e))?.[_0x579e8f(0x8bd)](_0x588d40=>_0x588d40[_0x579e8f(0x2a9)])??[];}catch{return[];}});default:return[];}}function _0x4d858e(_0x231150,_0xcc7f50,_0x483289,_0xd1bf34){const _0x283a26=_0x4f6d31,_0x50c928=_0x231150[_0x283a26(0x43a)]('/'),_0x58ee13=_0x231150[_0x283a26(0x735)]('/'),_0xb260b0=_0x50c928?_0x58ee13['slice'](0x0,-0x1):_0x58ee13[_0x283a26(0x556)](0x0,-0x1),_0xce8b5d=_0x50c928?'':_0x58ee13[_0x58ee13['length']-0x1];let _0x4f0ff6=_0xcc7f50;const _0x3273c7={};for(const _0x29f982 of _0xb260b0){if(!_0x29f982)continue;if(_0x4f0ff6['children'][_0x283a26(0x6f1)](_0x29f982))_0x4f0ff6=_0x4f0ff6[_0x283a26(0x2a2)][_0x283a26(0x5ab)](_0x29f982);else{if(_0x4f0ff6[_0x283a26(0x38c)])_0x3273c7[_0x4f0ff6['dynamic'][_0x283a26(0x409)]]=_0x29f982,_0x4f0ff6=_0x4f0ff6[_0x283a26(0x38c)]['node'];else return[];}}const _0x8495db=_0xb260b0[_0x283a26(0x49c)](Boolean),_0x5d0e5c=_0x8495db[_0x283a26(0x3be)]?_0x8495db[_0x283a26(0x86d)]('/')+'/':'',_0x607389=[];for(const [_0x30bec5]of _0x4f0ff6[_0x283a26(0x2a2)]){if(_0x30bec5[_0x283a26(0x5e1)](_0xce8b5d))_0x607389[_0x283a26(0x338)](_0x5d0e5c+_0x30bec5);}if(_0x4f0ff6['dynamic'])for(const _0x3d7d3d of _0x3b7985(_0x4f0ff6[_0x283a26(0x38c)][_0x283a26(0x409)],_0x3273c7,_0x483289,_0xd1bf34)){if(String(_0x3d7d3d)[_0x283a26(0x5e1)](_0xce8b5d))_0x607389[_0x283a26(0x338)](_0x5d0e5c+_0x3d7d3d);}return _0x607389[_0x283a26(0x556)](0x0,0x64);}const _0x4996c0=[_0x4f6d31(0x7c9),_0x4f6d31(0x81d),_0x4f6d31(0x344),_0x4f6d31(0x576),_0x4f6d31(0x732),_0x4f6d31(0x8ae),_0x4f6d31(0x42b),_0x4f6d31(0x654),_0x4f6d31(0x56e),_0x4f6d31(0x1c2)];function _0x2b107f(_0x562578,_0x1fe74c,_0x1ea5e0){return function _0x2c7bc2(_0x235364){const _0x1def3f=_0x1684;try{const _0x5cae0b=_0x235364[_0x1def3f(0x310)](/\s[{[]/),_0x202009=_0x5cae0b>=0x0?_0x235364[_0x1def3f(0x556)](0x0,_0x5cae0b):_0x235364,_0xb49f4e=_0x202009['trimStart']();if(!_0xb49f4e){const _0x3b52ce=[..._0x4996c0,...[..._0x562578['children']['keys']()]][_0x1def3f(0x556)](0x0,0x64);return[_0x3b52ce,''];}const _0x29a9f5=_0xb49f4e[_0x1def3f(0x735)](/\s+/),_0x1e7f15=_0x29a9f5[0x0],_0x32734d=_0x1e7f15['toUpperCase']();if(_0x29a9f5[_0x1def3f(0x3be)]===0x1){const _0x61d884=_0x1e7f15[_0x1def3f(0x6e4)](),_0x4b1f20=_0x4996c0[_0x1def3f(0x49c)](_0x1fbb5d=>_0x1fbb5d[_0x1def3f(0x5e1)](_0x61d884)),_0x422de7=_0x4d858e(_0x1e7f15,_0x562578,_0x1fe74c,_0x1ea5e0),_0xc6f1cb=[...new Set([..._0x4b1f20,..._0x422de7])][_0x1def3f(0x556)](0x0,0x64);return[_0xc6f1cb,_0x1e7f15];}if(_0x45694e['has'](_0x32734d)&&_0x29a9f5[_0x1def3f(0x3be)]===0x2){const _0x2ba9b6=_0x29a9f5[0x1],_0x4d0a11=_0x4d858e(_0x2ba9b6,_0x562578,_0x1fe74c,_0x1ea5e0);return[_0x4d0a11['map'](_0x3f7439=>_0x1e7f15+'\x20'+_0x3f7439),_0x1e7f15+'\x20'+_0x2ba9b6];}if(!_0x45694e[_0x1def3f(0x6f1)](_0x32734d)&&_0x29a9f5[_0x1def3f(0x3be)]>0x1){const _0x52ef6d=_0x4d858e(_0x1e7f15,_0x562578,_0x1fe74c,_0x1ea5e0),_0x1fdbca='\x20'+_0x29a9f5[_0x1def3f(0x556)](0x1)[_0x1def3f(0x86d)]('\x20');return[_0x52ef6d[_0x1def3f(0x8bd)](_0x233a77=>_0x233a77+_0x1fdbca),_0x1e7f15+_0x1fdbca];}return[[],_0x235364];}catch{return[[],_0x235364];}};}async function _0x4763c1(_0xc05b48,_0x115672){const _0x5d8047=_0x4f6d31,_0x45aa98={'enabled':!![],'level':_0x115672[_0x5d8047(0x79d)]??_0x5d8047(0x8c8)},_0x23687d={'env':_0x5d8047(0x2dc)},_0x59b8aa={'current':null},_0x56d362=_0x14de88(_0xc05b48[_0x5d8047(0x4fc)][_0x5d8047(0x223)]()),_0x31098a=_0x2b107f(_0x56d362,_0xc05b48,_0x23687d);_0xc05b48[_0x5d8047(0x51a)][_0x5d8047(0x59f)](_0x86caa9=>{const _0x3d92d7=_0x5d8047;if(!_0x45aa98['enabled'])return;_0x29e459(_0x86caa9,_0x45aa98['level']),_0x59b8aa[_0x3d92d7(0x2c2)]?.['prompt'](!![]);}),_0x171669(_0xc05b48,_0x115672);const _0x165bf8=_0xa6c2c8[_0x5d8047(0x3d7)]({'input':process[_0x5d8047(0x538)],'output':process[_0x5d8047(0x6cd)],'terminal':!![],'completer':_0x31098a,'prompt':_0x2ad610(_0x23687d),'historySize':_0x5c741f});try{const _0x47e2f7=_0x139e7f[_0x5d8047(0x7d6)](_0x20aea3,_0x5d8047(0x6ec))[_0x5d8047(0x735)]('\x0a')[_0x5d8047(0x49c)](Boolean);_0x165bf8[_0x5d8047(0x7c7)]=_0x47e2f7[_0x5d8047(0x37c)]()[_0x5d8047(0x556)](0x0,_0x5c741f);}catch{}_0x59b8aa[_0x5d8047(0x2c2)]=_0x165bf8,_0x165bf8['on'](_0x5d8047(0x49f),async _0x2202a0=>{const _0x251f82=_0x5d8047;_0x165bf8[_0x251f82(0x4cc)]();try{await _0x466fc7(_0x2202a0,_0xc05b48,_0x115672,_0x45aa98,_0x23687d,_0x165bf8);}catch(_0x5130c5){console[_0x251f82(0x21f)](_0x534bbf(_0x142582['red'],_0x251f82(0x25c)+_0x5130c5[_0x251f82(0x439)]));}finally{_0x165bf8[_0x251f82(0x32b)](),_0x165bf8['prompt']();}}),_0x165bf8['on'](_0x5d8047(0x55c),()=>{const _0x7e4e00=_0x5d8047;try{const _0x2f07a7=[..._0x165bf8[_0x7e4e00(0x7c7)]][_0x7e4e00(0x37c)]()['filter'](Boolean)[_0x7e4e00(0x556)](0x0,_0x5c741f);_0x139e7f[_0x7e4e00(0x43e)](_0x20aea3,_0x2f07a7[_0x7e4e00(0x86d)]('\x0a')+'\x0a');}catch{}_0x45c75f(_0xc05b48,0x0);});let _0x498a27=0x0;return process['on'](_0x5d8047(0x4f9),()=>{const _0x3ec107=_0x5d8047;if(_0x33306e)return _0x45c75f(_0xc05b48,0x82,_0x3ec107(0x4f9));if(_0x165bf8['line']==='')return _0x45c75f(_0xc05b48,0x0,'SIGINT');const _0x1c067c=Date[_0x3ec107(0x81b)]();if(_0x1c067c-_0x498a27<0x5dc)return _0x45c75f(_0xc05b48,0x0,_0x3ec107(0x1b9));_0x498a27=_0x1c067c,process[_0x3ec107(0x6cd)]['write']('\x0a'),_0x165bf8[_0x3ec107(0x5ba)](0x0),_0x165bf8[_0x3ec107(0x37e)](),process['stderr'][_0x3ec107(0x6d4)](_0x534bbf(_0x142582[_0x3ec107(0x38b)],_0x3ec107(0x3fa)));}),process['on']('SIGTERM',()=>_0x45c75f(_0xc05b48,0x0,_0x5d8047(0x52e))),process['on'](_0x5d8047(0x757),()=>_0x45c75f(_0xc05b48,0x0,_0x5d8047(0x757))),_0x165bf8[_0x5d8047(0x37e)](),_0x165bf8;}return okdbShell={'start':_0x4763c1,'colorLog':_0x29e459,'lenientParse':_0xf9ad7f,'_splitLine':_0x33a136,'_formatRouteHelpLines':_0x4805a3,'_routeSummary':_0x184d21,'_routeTags':_0x2a69f5},okdbShell;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x592166=_0x32d6b8;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x581799,performance:_0x1b8fa9}=require$$0$4,_0x293708=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x592166(0x574),_0xa2bce7=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x4ab1e1=process.env.OKDB_LOOP_LAG_ALL==='1',_0x423a17=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x408237{constructor(){const _0xf27b8b=_0x592166;this[_0xf27b8b(0x71f)]=_0x293708,this[_0xf27b8b(0x6da)]=new Map(),this['_h']=null,this[_0xf27b8b(0x3e9)]=null,this[_0xf27b8b(0x41a)]=![],this[_0xf27b8b(0x6a7)]=(_0x35b76a,_0x2eb320)=>process['stderr'][_0xf27b8b(0x6d4)](_0x35b76a+(_0x2eb320?'\x20'+JSON[_0xf27b8b(0x46c)](_0x2eb320):'')+'\x0a');}[_0x592166(0x81b)](){return _0x1b8fa9['now']();}[_0x592166(0x6b5)](_0x4b1726){const _0x51ce34=_0x592166;if(typeof _0x4b1726===_0x51ce34(0x500))this[_0x51ce34(0x6a7)]=_0x4b1726;}[_0x592166(0x1fc)](_0x5a43a7,_0x416402,_0x5daeb2){const _0x52e91e=_0x592166;if(!this[_0x52e91e(0x71f)])return;let _0x25de63=this[_0x52e91e(0x6da)]['get'](_0x5a43a7);!_0x25de63&&(_0x25de63={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this['_buckets']['set'](_0x5a43a7,_0x25de63)),_0x25de63['ms']+=_0x416402,_0x25de63[_0x52e91e(0x2a3)]+=0x1,_0x416402>_0x25de63[_0x52e91e(0x736)]&&(_0x25de63['maxMs']=_0x416402,_0x25de63[_0x52e91e(0x59d)]=_0x5daeb2||'');}['start'](_0x2d86d5){const _0x4b1332=_0x592166;if(!this['enabled']||this['_started'])return;this[_0x4b1332(0x41a)]=!![];if(_0x2d86d5)this[_0x4b1332(0x6a7)]=_0x2d86d5;this['_h']=_0x581799({'resolution':0xa}),this['_h']['enable'](),this[_0x4b1332(0x3e9)]=setInterval(()=>this['_report'](),_0xa2bce7);if(this[_0x4b1332(0x3e9)][_0x4b1332(0x5e0)])this[_0x4b1332(0x3e9)][_0x4b1332(0x5e0)]();}[_0x592166(0x682)](_0x583ca4){const _0x2d2479=_0x592166;if(!this[_0x2d2479(0x501)])this[_0x2d2479(0x501)]=new Set();this['_windowCbs'][_0x2d2479(0x88a)](_0x583ca4);if(!this[_0x2d2479(0x41a)])this[_0x2d2479(0x230)]();}[_0x592166(0x626)](_0x13dd7e){const _0x455cb9=_0x592166;this[_0x455cb9(0x501)]?.['delete'](_0x13dd7e);}[_0x592166(0x230)](){const _0x38716c=_0x592166;if(this['_admissionStarted'])return;this[_0x38716c(0x61b)]=!![];!this['_h']&&(this['_h']=_0x581799({'resolution':0xa}),this['_h'][_0x38716c(0x6e6)]());const _0x58317c=_0xa2bce7;this[_0x38716c(0x3a5)]=setInterval(()=>{const _0x20df9c=_0x38716c,_0x19cc8f=this['_h'];if(!_0x19cc8f)return;const _0x9691c9=_0x19cc8f[_0x20df9c(0x7ec)](0x63)/0xf4240,_0x2c5d45=_0x19cc8f[_0x20df9c(0x321)]/0xf4240,_0x5360c3=_0x19cc8f['mean']/0xf4240;_0x19cc8f['reset']();if(this['_windowCbs'])for(const _0x14b9d0 of this[_0x20df9c(0x501)]){try{_0x14b9d0({'p99Ms':_0x9691c9,'maxMs':_0x2c5d45,'meanMs':_0x5360c3,'reportMs':_0x58317c});}catch{}}},_0x58317c);if(this['_admissionTimer'][_0x38716c(0x5e0)])this[_0x38716c(0x3a5)][_0x38716c(0x5e0)]();}[_0x592166(0x7e7)](){const _0x5dafac=_0x592166,_0x5dd3c7=this['_h'],_0x2f50eb=_0x5dd3c7[_0x5dafac(0x321)]/0xf4240,_0x1ea3ba=_0x5dd3c7[_0x5dafac(0x7ec)](0x63)/0xf4240,_0x224933=_0x5dd3c7[_0x5dafac(0x4fe)]/0xf4240;_0x5dd3c7['reset']();const _0x351b28=[...this[_0x5dafac(0x6da)][_0x5dafac(0x444)]()]['map'](([_0x326755,_0x4d08bd])=>({'label':_0x326755,..._0x4d08bd}))[_0x5dafac(0x51f)]((_0x28f26a,_0x3f5cf2)=>_0x3f5cf2['ms']-_0x28f26a['ms'])[_0x5dafac(0x556)](0x0,0x8);this['_buckets'][_0x5dafac(0x2d8)]();const _0xbf5614=_0x351b28[_0x5dafac(0x897)]((_0x36fef4,_0x1e3ba0)=>_0x36fef4+_0x1e3ba0['ms'],0x0),_0x4e96ca=_0x351b28[_0x5dafac(0x8bd)](_0x1c5b18=>_0x1c5b18[_0x5dafac(0x660)]+'='+_0x1c5b18['ms'][_0x5dafac(0x849)](0x0)+'ms/'+_0x1c5b18[_0x5dafac(0x2a3)]+(_0x1c5b18[_0x5dafac(0x736)]>0x5?'(worst\x20'+_0x1c5b18[_0x5dafac(0x736)][_0x5dafac(0x849)](0x0)+'ms'+(_0x1c5b18[_0x5dafac(0x59d)]?'\x20'+_0x1c5b18['maxExtra']:'')+')':''));(_0x4ab1e1||_0x2f50eb>=_0x423a17)&&this[_0x5dafac(0x6a7)](_0x5dafac(0x1b7)+_0xa2bce7+_0x5dafac(0x1f0)+_0x2f50eb[_0x5dafac(0x849)](0x0)+_0x5dafac(0x3df)+_0x1ea3ba[_0x5dafac(0x849)](0x0)+'ms\x20mean='+_0x224933[_0x5dafac(0x849)](0x0)+'ms\x20busy='+_0xbf5614[_0x5dafac(0x849)](0x0)+'ms'+(_0x4e96ca[_0x5dafac(0x3be)]?_0x5dafac(0x7de)+_0x4e96ca['join']('\x20\x20'):''),{'feature':_0x5dafac(0x658)});if(this[_0x5dafac(0x501)])for(const _0x5a39d2 of this[_0x5dafac(0x501)]){try{_0x5a39d2({'p99Ms':_0x1ea3ba,'maxMs':_0x2f50eb,'meanMs':_0x224933,'reportMs':_0xa2bce7});}catch{}}}[_0x592166(0x3b1)](){const _0x394982=_0x592166;if(this[_0x394982(0x3e9)])clearInterval(this['_timer']);if(this['_h'])this['_h'][_0x394982(0x382)]();this[_0x394982(0x3e9)]=null,this['_h']=null,this['_started']=![];}}const _0x57b2b5=new _0x408237();if(_0x57b2b5['enabled'])_0x57b2b5[_0x592166(0x1db)]();return okdbLoopMonitor={'LOOP':_0x57b2b5},okdbLoopMonitor;}function _0x1684(_0x399506,_0x53a1af){_0x399506=_0x399506-0x1ab;const _0x4ab804=_0x4ab8();let _0x1684e4=_0x4ab804[_0x399506];return _0x1684e4;}var okdbTimers,hasRequiredOkdbTimers;function requireOkdbTimers(){if(hasRequiredOkdbTimers)return okdbTimers;hasRequiredOkdbTimers=0x1;const _0x244d48=0x2**0x1f-0x1;function _0x4767b4(_0x324f27){if(!(_0x324f27>0x0))return 0x0;return _0x324f27>_0x244d48?_0x244d48:_0x324f27;}function _0x3d9e92(_0x34ac02){return _0x34ac02===Infinity;}return okdbTimers={'MAX_TIMER_DELAY':_0x244d48,'clampTimerDelay':_0x4767b4,'isNeverDelay':_0x3d9e92},okdbTimers;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x2359a2=require$$0$1,_0x310018=require$$1;let _0x24732f,_0x43fb62,_0x5780c2,_0x175715,_0x3dd5b1,_0x3c348d,_0x296398,_0x4b8df2=![];const _0x2e596d=new Set();let _0x422707=null;const _0x1cf161=new Map();function _0x1b9d3f(){const _0x1f79a3=_0x1684;if(_0x24732f!==undefined)return _0x24732f;_0x24732f=process.env.OKDB_DIAG==='1';if(!_0x24732f)return![];_0x43fb62=process.env.OKDB_DIAG_STACK==='1',_0x175715=Math[_0x1f79a3(0x321)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x5780c2=new Array(_0x175715),_0x3dd5b1=0x0,_0x3c348d=0x0,_0x296398=process.env.OKDB_DIAG_DIR||null;if(_0x296398)try{_0x2359a2['mkdirSync'](_0x296398,{'recursive':!![]});}catch{}return!![];}function _0x33644f(){return _0x24732f===undefined?_0x1b9d3f():_0x24732f;}function _0x947b0c(_0x58f59a,_0x1b2765){const _0x123fbc=_0x1684;if(_0x24732f===undefined?!_0x1b9d3f():!_0x24732f)return;let _0x51e6f3;if(_0x43fb62){const _0x21878a=new Error()['stack']||'';_0x51e6f3=_0x21878a['split']('\x0a')[_0x123fbc(0x556)](0x3)['map'](_0x2533cf=>_0x2533cf['trim']())[_0x123fbc(0x49c)](Boolean)[_0x123fbc(0x556)](0x0,0x8);}_0x5780c2[_0x3dd5b1]={'seq':_0x3c348d++,'t':Date[_0x123fbc(0x81b)](),'env':_0x58f59a,'kind':_0x1b2765||_0x123fbc(0x402),'stack':_0x51e6f3},_0x3dd5b1=(_0x3dd5b1+0x1)%_0x175715;}function _0x270d02(_0x348abc){const _0x19b98f=_0x1684,_0x412143=[];for(let _0x4bc9ca=0x0;_0x4bc9ca<_0x175715;_0x4bc9ca++){const _0x5cc4a3=_0x5780c2[(_0x3dd5b1-0x1-_0x4bc9ca+_0x175715*0x2)%_0x175715];if(!_0x5cc4a3)continue;_0x412143[_0x19b98f(0x338)](_0x5cc4a3);if(_0x412143[_0x19b98f(0x3be)]>=_0x348abc)break;}return _0x412143;}function _0x36553c(_0x43ec01){const _0xff35db=_0x1684;try{process['stderr'][_0xff35db(0x6d4)](_0x43ec01+'\x0a');}catch{}if(_0x296398)try{_0x2359a2[_0xff35db(0x8ac)](_0x310018[_0xff35db(0x86d)](_0x296398,_0xff35db(0x491)+process['pid']+_0xff35db(0x58c)),_0x43ec01+'\x0a');}catch{}}function _0x15f64f(_0x4d4ab6){const _0x1b66ba=_0x1684,_0x573721=_0x270d02(_0x4d4ab6);if(!_0x573721[_0x1b66ba(0x3be)])return _0x1b66ba(0x8c1);const _0x36333b=Date['now']();return _0x573721[_0x1b66ba(0x8bd)](_0x33abbe=>{const _0x5a1353=_0x1b66ba,_0xa41d2e=_0x5a1353(0x426)+_0x33abbe[_0x5a1353(0x364)]+'\x20-'+(_0x36333b-_0x33abbe['t'])+_0x5a1353(0x86c)+_0x33abbe['env']+'\x20'+_0x33abbe[_0x5a1353(0x7be)];return _0x33abbe['stack']&&_0x33abbe[_0x5a1353(0x509)][_0x5a1353(0x3be)]?_0xa41d2e+_0x5a1353(0x2db)+_0x33abbe[_0x5a1353(0x509)][_0x5a1353(0x86d)](_0x5a1353(0x2db)):_0xa41d2e;})[_0x1b66ba(0x86d)]('\x0a');}function _0x4cce4e(_0x3caaec,_0x502acc){const _0x436f94=_0x1684,_0x5bb442=_0x436f94(0x6a9)+_0x3caaec+'\x20@\x20'+new Date()[_0x436f94(0x362)]()+_0x436f94(0x431)+process[_0x436f94(0x5bc)]+_0x436f94(0x74c),_0x3d7dc9=[_0x5bb442,_0x436f94(0x592)+(_0x502acc&&_0x502acc[_0x436f94(0x509)]?_0x502acc['stack'][_0x436f94(0x735)]('\x0a')[0x0]:_0x502acc),_0x436f94(0x232)+(_0x43fb62?'':_0x436f94(0x5c0))+':',_0x15f64f(0x18),_0x15d089(),'='[_0x436f94(0x37a)](_0x5bb442[_0x436f94(0x3be)]-0x1)];_0x36553c(_0x3d7dc9[_0x436f94(0x86d)]('\x0a'));}function _0x7c502c(_0x29cd74){const _0x21c04b=_0x1684;if(!_0x33644f())return;const _0x933417=String(_0x29cd74&&_0x29cd74[_0x21c04b(0x439)]||_0x29cd74||''),_0x52943d=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x21c04b(0x27f)](_0x933417);_0x4cce4e(_0x52943d?'ORPHAN\x20(env-closed\x20write)':_0x21c04b(0x61f),_0x29cd74);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x52943d)return;try{console[_0x21c04b(0x21f)](_0x29cd74&&_0x29cd74[_0x21c04b(0x509)]?_0x29cd74['stack']:_0x29cd74);}catch{}process['exit'](0x1);}function _0x5e7d01(_0x387981){const _0x314eec=_0x1684;if(!_0x33644f())return;const _0x34e37a=String(_0x387981&&_0x387981[_0x314eec(0x439)]||_0x387981||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x314eec(0x27f)](_0x34e37a)&&_0x4cce4e(_0x314eec(0x843),_0x387981);}function _0x15d089(){const _0x2aa5d7=_0x1684,_0x2fde0f=['drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):'];let _0x4a578c=![];for(const _0x46297f of _0x2e596d){const _0xc7c451=_0x46297f&&_0x46297f[_0x2aa5d7(0x828)];if(!_0xc7c451)continue;for(const [_0x58f564,_0x54f99e]of _0xc7c451){const _0x238398=_0x54f99e&&_0x54f99e[_0x2aa5d7(0x24f)]&&_0x54f99e['_coordinator'][_0x2aa5d7(0x82b)];if(!_0x238398)continue;let _0x5b0cf3,_0x505f90;try{_0x5b0cf3=Atomics[_0x2aa5d7(0x782)](_0x238398,0x0),_0x505f90=Atomics[_0x2aa5d7(0x782)](_0x238398,0x1);}catch{continue;}if(_0x5b0cf3===0x0)continue;_0x4a578c=!![];const _0x5e20e0=_0x5b0cf3>0x0?_0x2aa5d7(0x2f3):'copy',_0x4e7903=Date[_0x2aa5d7(0x81b)]()-Math[_0x2aa5d7(0x5ef)](_0x5b0cf3)*0x3e8,_0x3cf03c=((()=>{const _0xde7648=_0x2aa5d7;try{return _0x54f99e['_writer']&&_0x54f99e[_0xde7648(0x6db)]['status']?_0x54f99e[_0xde7648(0x6db)][_0xde7648(0x492)]():null;}catch{return null;}})());_0x2fde0f['push'](_0x2aa5d7(0x7f6)+_0x58f564+_0x2aa5d7(0x505)+_0x5e20e0+_0x2aa5d7(0x3c6)+_0x4e7903+'ms\x20activeWriters='+_0x505f90+(_0x3cf03c?_0x2aa5d7(0x449)+_0x3cf03c[_0x2aa5d7(0x8c5)]+_0x2aa5d7(0x506)+_0x3cf03c[_0x2aa5d7(0x302)]+_0x2aa5d7(0x34d)+_0x3cf03c[_0x2aa5d7(0x1cb)]+'}':''));}}if(!_0x4a578c)_0x2fde0f['push'](_0x2aa5d7(0x4b6));return _0x2fde0f['join']('\x0a');}function _0x34fa67(){const _0x7870e4=_0x1684;if(!_0x33644f())return;const _0x434163=Math[_0x7870e4(0x321)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x34f128=Date[_0x7870e4(0x81b)]();for(const _0x58ea3c of _0x2e596d){const _0x3fa8a9=_0x58ea3c&&_0x58ea3c[_0x7870e4(0x828)];if(!_0x3fa8a9)continue;for(const [_0x180d9d,_0xe8b3c]of _0x3fa8a9){const _0x51b1d1=_0xe8b3c&&_0xe8b3c[_0x7870e4(0x24f)]&&_0xe8b3c[_0x7870e4(0x24f)][_0x7870e4(0x82b)];if(!_0x51b1d1)continue;let _0x5ca8d4;try{_0x5ca8d4=Atomics[_0x7870e4(0x782)](_0x51b1d1,0x0);}catch{continue;}const _0x2e091f=_0x58ea3c[_0x7870e4(0x1de)]+'|'+_0x180d9d;if(_0x5ca8d4<=0x0){_0x1cf161[_0x7870e4(0x1d4)](_0x2e091f);continue;}const _0x1d6af8=_0x34f128-_0x5ca8d4*0x3e8,_0x54d238=_0x1cf161[_0x7870e4(0x5ab)](_0x2e091f);if(_0x1d6af8<_0x434163)continue;if(_0x54d238&&_0x34f128-_0x54d238[_0x7870e4(0x322)]<_0x434163)continue;_0x1cf161[_0x7870e4(0x4dc)](_0x2e091f,{'firstTs':_0x54d238?_0x54d238['firstTs']:_0x5ca8d4,'dumpedAt':_0x34f128});const _0xe2a1c6=_0x7870e4(0x71e)+_0x1d6af8+'ms\x20on\x20env='+_0x180d9d+_0x7870e4(0x5d9)+new Date()[_0x7870e4(0x362)]()+_0x7870e4(0x431)+process['pid']+'\x20===';_0x36553c([_0xe2a1c6,_0x15d089(),'='[_0x7870e4(0x37a)](_0xe2a1c6[_0x7870e4(0x3be)]-0x1)][_0x7870e4(0x86d)]('\x0a'));}}}function _0x147cd4(){const _0x1f7bcf=_0x1684;if(!_0x33644f()||_0x4b8df2)return;_0x4b8df2=!![],process[_0x1f7bcf(0x83c)]('uncaughtException',_0x7c502c),process['prependListener'](_0x1f7bcf(0x69b),_0x5e7d01);const _0x1e8c32=Math[_0x1f7bcf(0x321)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x422707=setInterval(_0x34fa67,_0x1e8c32);if(_0x422707[_0x1f7bcf(0x5e0)])_0x422707['unref']();}function _0x15e370(_0x9b86b3){const _0x24d92c=_0x1684;if(!_0x33644f()||!_0x9b86b3)return;_0x2e596d[_0x24d92c(0x88a)](_0x9b86b3),_0x147cd4();}function _0x5d31a9(_0x17a792){const _0x5db093=_0x1684;_0x2e596d[_0x5db093(0x1d4)](_0x17a792);}function _0x4ef962(){const _0x252682=_0x1684;if(!_0x33644f())return{'enabled':![],'hint':_0x252682(0x601)};return{'enabled':!![],'stackCapture':!!_0x43fb62,'recentWrites':_0x270d02(0x10),'drain':_0x15d089()};}return okdbDiag={'isEnabled':_0x33644f,'recordWrite':_0x947b0c,'installDiag':_0x147cd4,'registerOkdb':_0x15e370,'unregisterOkdb':_0x5d31a9,'snapshot':_0x4ef962},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x292818=_0x32d6b8;if(hasRequiredOkdbWriter)return okdbWriter[_0x292818(0x47d)];hasRequiredOkdbWriter=0x1;const {performance:_0x1caffe}=require$$0$5,_0x1a57ca=requireOkdbDiag(),_0x1218e9=process.env.OKDB_COMMIT_MODE==='sync';class _0x57e40a{constructor(_0x528625){const _0x2b0a2e=_0x292818;this[_0x2b0a2e(0x344)]=_0x528625,this[_0x2b0a2e(0x493)]=new Set(),this['_enqueuedAt']=new Map(),this['_committed']=0x0,this[_0x2b0a2e(0x3f3)]=[],this[_0x2b0a2e(0x5ca)]=[],this['_highWater']=Math[_0x2b0a2e(0x321)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this['_outstanding']=0x0,this['_bpWaiters']=[],this[_0x2b0a2e(0x24c)]=0x0,this[_0x2b0a2e(0x486)]=null,this[_0x2b0a2e(0x1f1)]=0x0,this[_0x2b0a2e(0x635)]=0x0,this[_0x2b0a2e(0x20e)]=![];}async[_0x292818(0x80c)](_0x3432e9,_0xa5d66c,{admitted:admitted=![]}={}){const _0x50d085=_0x292818;if(_0x1a57ca[_0x50d085(0x4c1)]())_0x1a57ca[_0x50d085(0x393)](this[_0x50d085(0x344)]?.[_0x50d085(0x2a9)],_0xa5d66c);if(this[_0x50d085(0x1ee)]){const _0x42850e=new Error(_0x50d085(0x66c));_0x42850e[_0x50d085(0x5f9)]=_0x50d085(0x7ad);throw _0x42850e;}if(this['_highWater']>0x0){let _0x5d77d8=![];while(this['_outstanding']>=this[_0x50d085(0x49a)]&&!this[_0x50d085(0x1ee)]){!_0x5d77d8&&(_0x5d77d8=!![],this[_0x50d085(0x24c)]++),await new Promise(_0x17b33d=>this[_0x50d085(0x7d7)]['push'](_0x17b33d));}if(this[_0x50d085(0x1ee)]){const _0xddf858=new Error(_0x50d085(0x66c));_0xddf858[_0x50d085(0x5f9)]=_0x50d085(0x7ad);throw _0xddf858;}}this[_0x50d085(0x3d4)]++;const _0x3e9265=admitted?null:this[_0x50d085(0x344)]['_coordinator'];for(;;){while(this[_0x50d085(0x486)])await this[_0x50d085(0x486)];if(_0x3e9265)try{await _0x3e9265[_0x50d085(0x5c4)]();}catch(_0x1dcd83){this[_0x50d085(0x3d4)]--;if(this[_0x50d085(0x7d7)][_0x50d085(0x3be)]&&this[_0x50d085(0x3d4)]<this[_0x50d085(0x49a)])this[_0x50d085(0x7d7)]['shift']()();throw _0x1dcd83;}if(!this[_0x50d085(0x486)])break;if(_0x3e9265)_0x3e9265[_0x50d085(0x6af)]();}if(this[_0x50d085(0x1ee)]){if(_0x3e9265)_0x3e9265[_0x50d085(0x6af)]();this[_0x50d085(0x3d4)]--;if(this[_0x50d085(0x7d7)][_0x50d085(0x3be)]&&this[_0x50d085(0x3d4)]<this[_0x50d085(0x49a)])this[_0x50d085(0x7d7)][_0x50d085(0x2e8)]()();const _0x2bc2d0=new Error(_0x50d085(0x66c));_0x2bc2d0['code']='ENV_CLOSING_RETRY';throw _0x2bc2d0;}const _0x879143=_0x1caffe[_0x50d085(0x81b)]();if(_0x1218e9)try{const _0xb4cfea=this['env']['db'][_0x50d085(0x2ef)](_0x3432e9);this[_0x50d085(0x64d)]++;if(this[_0x50d085(0x3f3)]['push'](_0x1caffe['now']()-_0x879143)>0x100)this['_durs'][_0x50d085(0x2e8)]();if(this[_0x50d085(0x5ca)]['push'](_0x1caffe[_0x50d085(0x81b)]())>0x800)this[_0x50d085(0x5ca)]['shift']();return _0xb4cfea;}finally{this[_0x50d085(0x3d4)]--;if(this['_bpWaiters'][_0x50d085(0x3be)]&&this[_0x50d085(0x3d4)]<this[_0x50d085(0x49a)])this['_bpWaiters'][_0x50d085(0x2e8)]()();if(_0x3e9265)_0x3e9265[_0x50d085(0x6af)]();}let _0xfa0f68=null;const _0x36811=()=>{const _0x10a3ae=_0x50d085,_0x3ca087=_0x3432e9();if(_0x3ca087&&typeof _0x3ca087[_0x10a3ae(0x76c)]===_0x10a3ae(0x500)&&!_0xfa0f68){this[_0x10a3ae(0x1f1)]++;let _0x179228;const _0x403c89=new Promise(_0x511b0f=>_0x179228=_0x511b0f);this[_0x10a3ae(0x486)]=_0x403c89,_0xfa0f68=()=>{const _0x800bc7=_0x10a3ae;if(this[_0x800bc7(0x486)]===_0x403c89)this[_0x800bc7(0x486)]=null;_0x179228();};}return _0x3ca087;};let _0x361cd6;try{_0x361cd6=this[_0x50d085(0x344)]['db'][_0x50d085(0x562)](_0x36811);}catch(_0x339dc6){_0x361cd6=Promise[_0x50d085(0x860)](_0x339dc6);}(!_0x361cd6||typeof _0x361cd6[_0x50d085(0x76c)]!==_0x50d085(0x500))&&(this[_0x50d085(0x635)]++,!this[_0x50d085(0x20e)]&&(this[_0x50d085(0x20e)]=!![],console['warn'](_0x50d085(0x3c5)+(this['env']?.[_0x50d085(0x2a9)]??'?')+_0x50d085(0x664))),_0x361cd6=Promise[_0x50d085(0x400)](_0x361cd6));const _0x48d2ae=()=>{if(_0xfa0f68)_0xfa0f68();};_0x361cd6[_0x50d085(0x76c)](_0x48d2ae,_0x48d2ae),this[_0x50d085(0x493)][_0x50d085(0x88a)](_0x361cd6),this[_0x50d085(0x79e)][_0x50d085(0x4dc)](_0x361cd6,_0x879143);const _0x8b5f3b=()=>{const _0xdfbc01=_0x50d085;this[_0xdfbc01(0x493)]['delete'](_0x361cd6),this[_0xdfbc01(0x79e)][_0xdfbc01(0x1d4)](_0x361cd6),this['_committed']++,this['_outstanding']--;this[_0xdfbc01(0x7d7)][_0xdfbc01(0x3be)]&&this[_0xdfbc01(0x3d4)]<this['_highWater']&&this[_0xdfbc01(0x7d7)][_0xdfbc01(0x2e8)]()();if(this[_0xdfbc01(0x3f3)][_0xdfbc01(0x338)](_0x1caffe[_0xdfbc01(0x81b)]()-_0x879143)>0x100)this[_0xdfbc01(0x3f3)][_0xdfbc01(0x2e8)]();if(this[_0xdfbc01(0x5ca)][_0xdfbc01(0x338)](_0x1caffe['now']())>0x800)this[_0xdfbc01(0x5ca)][_0xdfbc01(0x2e8)]();};_0x361cd6['then'](_0x8b5f3b,_0x8b5f3b);try{return await _0x361cd6;}finally{if(_0x3e9265)_0x3e9265[_0x50d085(0x6af)]();}}[_0x292818(0x492)](){const _0xaea815=_0x292818,_0x152eac=_0x1caffe['now']();let _0x1ab9d6=0x0;for(const _0xb73035 of this[_0xaea815(0x79e)][_0xaea815(0x33f)]()){const _0x338863=_0x152eac-_0xb73035;if(_0x338863>_0x1ab9d6)_0x1ab9d6=_0x338863;}let _0x3cb547=0x0;for(let _0x459515=this['_done']['length']-0x1;_0x459515>=0x0;_0x459515--){if(_0x152eac-this['_done'][_0x459515]>0x3e8)break;_0x3cb547++;}let _0xfe5120=0x0;if(this[_0xaea815(0x3f3)]['length']){const _0x409ad2=[...this['_durs']]['sort']((_0x37fbc5,_0x1ea4c0)=>_0x37fbc5-_0x1ea4c0);_0xfe5120=_0x409ad2[Math['min'](_0x409ad2[_0xaea815(0x3be)]-0x1,Math[_0xaea815(0x3a7)](_0x409ad2[_0xaea815(0x3be)]*0.99))];}return{'depth':this[_0xaea815(0x493)][_0xaea815(0x4a8)],'oldestPendingMs':Math[_0xaea815(0x283)](_0x1ab9d6),'committed':this[_0xaea815(0x64d)],'commitsPerSec':_0x3cb547,'commitP99Ms':Math[_0xaea815(0x283)](_0xfe5120),'parkedNow':this[_0xaea815(0x7d7)][_0xaea815(0x3be)],'parkedTotal':this[_0xaea815(0x24c)],'highWater':this[_0xaea815(0x49a)]};}['inflightAgesMs'](){const _0x59b89e=_0x292818,_0x3cb030=_0x1caffe[_0x59b89e(0x81b)]();return[...this[_0x59b89e(0x79e)]['values']()][_0x59b89e(0x8bd)](_0x59c5da=>Math[_0x59b89e(0x283)](_0x3cb030-_0x59c5da))[_0x59b89e(0x51f)]((_0x46c3fd,_0x3e476e)=>_0x3e476e-_0x46c3fd);}[_0x292818(0x2c7)](){const _0x188e89=_0x292818;this[_0x188e89(0x1ee)]=!![];for(const _0x451ca9 of this[_0x188e89(0x7d7)]['splice'](0x0))_0x451ca9();}async[_0x292818(0x544)](){const _0x475d76=_0x292818;let _0x23ad1e=0x0;while(this[_0x475d76(0x493)][_0x475d76(0x4a8)]&&_0x23ad1e++<0x3e8){await Promise[_0x475d76(0x8b5)]([...this[_0x475d76(0x493)]]);}}async['put'](_0x55c8c2,_0x4f2b27,_0x1489d9,_0x54a827){const _0x3195c2=_0x292818;return this[_0x3195c2(0x80c)](()=>{const _0x5abccd=_0x3195c2;if(_0x54a827===undefined)_0x55c8c2[_0x5abccd(0x6d8)](_0x4f2b27,_0x1489d9);else _0x55c8c2[_0x5abccd(0x6d8)](_0x4f2b27,_0x1489d9,_0x54a827);},_0x3195c2(0x336));}async[_0x292818(0x77c)](_0x86ea2d,_0x197273){const _0x462cc2=_0x292818;return this[_0x462cc2(0x80c)](()=>_0x86ea2d[_0x462cc2(0x35f)](_0x197273),'raw-remove');}}async function _0x12cb26(_0x12aab0,_0x5c0018){const _0x303f09=_0x292818;if(_0x5c0018==null)_0x5c0018=Math['max'](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0xc3c1d7=_0x12aab0?.['flushed'];if(!_0xc3c1d7||typeof _0xc3c1d7[_0x303f09(0x76c)]!==_0x303f09(0x500))return;await Promise[_0x303f09(0x1cf)]([Promise[_0x303f09(0x400)](_0xc3c1d7)[_0x303f09(0x6ce)](()=>{}),new Promise(_0x4a1a07=>{const _0x1fbb0a=_0x303f09,_0x1311e0=setTimeout(_0x4a1a07,_0x5c0018);if(_0x1311e0['unref'])_0x1311e0[_0x1fbb0a(0x5e0)]();})]);}catch{}}function _0x2a9a0a(_0x3a3bce){const _0x24157e=_0x292818;if(_0x1218e9)return Promise[_0x24157e(0x400)]();const _0x2d4a8d=_0x3a3bce?.[_0x24157e(0x7b2)];return _0x2d4a8d&&typeof _0x2d4a8d['then']===_0x24157e(0x500)?_0x2d4a8d:Promise[_0x24157e(0x400)]();}const _0x32b4a6=Math[_0x292818(0x321)](0x1,Math[_0x292818(0x3a7)](Number(process.env.UV_THREADPOOL_SIZE))||0x4),_0x5233e2=Math[_0x292818(0x321)](0x1,_0x32b4a6-0x2);let _0xfb6428=0x0;const _0x505c1a=[];async function _0x5e0cae(_0x8ae063){const _0x1e39b4=_0x292818;if(_0xfb6428<_0x5233e2)_0xfb6428++;else await new Promise(_0x242064=>_0x505c1a['push'](_0x242064));try{return await _0x8ae063();}finally{const _0x23d05d=_0x505c1a[_0x1e39b4(0x2e8)]();if(_0x23d05d)_0x23d05d();else _0xfb6428--;}}return okdbWriter[_0x292818(0x47d)]=_0x57e40a,okdbWriter[_0x292818(0x47d)]['withPoolHold']=_0x5e0cae,okdbWriter[_0x292818(0x47d)][_0x292818(0x315)]=_0x5233e2,okdbWriter[_0x292818(0x47d)][_0x292818(0x2b0)]=_0x12cb26,okdbWriter[_0x292818(0x47d)]['committed']=_0x2a9a0a,okdbWriter[_0x292818(0x47d)][_0x292818(0x361)]=_0x1218e9,okdbWriter[_0x292818(0x47d)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x46b3b6=_0x32d6b8;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x3f5d86=require$$0,{clampTimerDelay:_0x3e5bde}=requireOkdbTimers(),{SYNC_COMMITS:_0x2493e1}=requireOkdbWriter(),_0x404109='~lock';class _0x22eaa7{constructor(_0x399ad8,_0x31de79,_0x24a1ce){const _0x56454c=_0x1684;this[_0x56454c(0x52d)]=_0x399ad8,this[_0x56454c(0x56a)]=_0x31de79,this[_0x56454c(0x6c0)]=_0x24a1ce,this[_0x56454c(0x765)]=![],this[_0x56454c(0x36b)]=null,this['_heartbeatInFlight']=null;}[_0x46b3b6(0x6c4)](){const _0x3d5ec9=_0x46b3b6;if(this[_0x3d5ec9(0x765)])return![];try{const _0x302e90=this['_lock'][_0x3d5ec9(0x1d0)]()[_0x3d5ec9(0x5ab)](this[_0x3d5ec9(0x56a)]);if(!_0x302e90||_0x302e90[_0x3d5ec9(0x4eb)]!==this[_0x3d5ec9(0x6c0)])return![];const _0x6b8f6f=_0x302e90['updatedAt']??_0x302e90[_0x3d5ec9(0x4eb)];if(_0x6b8f6f+_0x302e90[_0x3d5ec9(0x220)]<Date[_0x3d5ec9(0x81b)]())return![];return!![];}catch{return!this[_0x3d5ec9(0x765)];}}['holder'](){const _0xd26459=_0x46b3b6;if(this[_0xd26459(0x765)])return null;try{return this[_0xd26459(0x52d)][_0xd26459(0x1d0)]()[_0xd26459(0x5ab)](this[_0xd26459(0x56a)])??null;}catch{return null;}}async[_0x46b3b6(0x615)](_0x300df0){const _0x1d585c=_0x46b3b6;if(this[_0x1d585c(0x765)])return;try{if(this[_0x1d585c(0x52d)][_0x1d585c(0x1ee)]())return;const _0x36f932=this[_0x1d585c(0x52d)][_0x1d585c(0x1d0)]()['get'](this[_0x1d585c(0x56a)]);if(!_0x36f932||_0x36f932[_0x1d585c(0x4eb)]!==this[_0x1d585c(0x6c0)])return;if(_0x2493e1)this[_0x1d585c(0x52d)][_0x1d585c(0x1d0)]()[_0x1d585c(0x6d8)](this[_0x1d585c(0x56a)],{..._0x36f932,'ttlMs':_0x36f932['ttlMs']+_0x300df0});else await this['_lock'][_0x1d585c(0x1d0)]()['put'](this[_0x1d585c(0x56a)],{..._0x36f932,'ttlMs':_0x36f932[_0x1d585c(0x220)]+_0x300df0});}catch{}}async[_0x46b3b6(0x4d0)](){const _0x55d49a=_0x46b3b6;if(this[_0x55d49a(0x765)])return;if(this['_heartbeatInFlight'])try{await this[_0x55d49a(0x475)];}catch{}clearInterval(this[_0x55d49a(0x36b)]),this['_heartbeatTimer']=null,this[_0x55d49a(0x765)]=!![];try{if(this[_0x55d49a(0x52d)]['_closed']())return;const _0x147102=this[_0x55d49a(0x52d)][_0x55d49a(0x1d0)]()[_0x55d49a(0x5ab)](this['_key']);if(_0x147102&&_0x147102[_0x55d49a(0x4eb)]===this[_0x55d49a(0x6c0)]){if(_0x2493e1)this[_0x55d49a(0x52d)][_0x55d49a(0x1d0)]()[_0x55d49a(0x35f)](this[_0x55d49a(0x56a)]);else await this[_0x55d49a(0x52d)][_0x55d49a(0x1d0)]()[_0x55d49a(0x77c)](this[_0x55d49a(0x56a)]);}}catch{}}['_startHeartbeat'](_0x54c335,_0xfd41d2){const _0x460a30=_0x46b3b6,_0x119870=_0x3e5bde(_0xfd41d2??Math[_0x460a30(0x3a7)](_0x54c335/0x3));this['_heartbeatTimer']=setInterval(()=>{const _0x27c01f=_0x460a30;if(this[_0x27c01f(0x765)])return;this['_heartbeatInFlight']=((async()=>{const _0x4e34d4=_0x27c01f;try{if(this['_lock'][_0x4e34d4(0x1ee)]())return;const _0x37021b=this[_0x4e34d4(0x52d)][_0x4e34d4(0x1d0)]()[_0x4e34d4(0x5ab)](this[_0x4e34d4(0x56a)]);if(!_0x37021b||_0x37021b[_0x4e34d4(0x4eb)]!==this[_0x4e34d4(0x6c0)]){this['_released']=!![],clearInterval(this[_0x4e34d4(0x36b)]),this[_0x4e34d4(0x36b)]=null;return;}if(_0x2493e1)this[_0x4e34d4(0x52d)]['_db']()[_0x4e34d4(0x6d8)](this[_0x4e34d4(0x56a)],{..._0x37021b,'updatedAt':Date['now']()});else await this[_0x4e34d4(0x52d)]['_db']()[_0x4e34d4(0x3ba)](this[_0x4e34d4(0x56a)],{..._0x37021b,'updatedAt':Date[_0x4e34d4(0x81b)]()});}catch{}this[_0x4e34d4(0x475)]=null;})());},_0x119870);if(this[_0x460a30(0x36b)][_0x460a30(0x5e0)])this[_0x460a30(0x36b)][_0x460a30(0x5e0)]();}}class _0x6dd327{constructor(_0x114b46,{namespace:_0x152c46,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x299719=_0x46b3b6;this[_0x299719(0x35d)]=_0x114b46,this['namespace']=_0x152c46,this['ttlMs']=ttlMs,this[_0x299719(0x6b1)]=heartbeatMs,this['_lockDb']=null;}[_0x46b3b6(0x1d0)](){const _0x195d2a=_0x46b3b6;return this[_0x195d2a(0x8a0)](),(!this[_0x195d2a(0x4f8)]||this[_0x195d2a(0x872)]!==this[_0x195d2a(0x35d)])&&(this['_lockDb']=this[_0x195d2a(0x35d)]['openDB'](_0x404109,{'dupSort':![]}),this['_lockDbOf']=this[_0x195d2a(0x35d)]),this[_0x195d2a(0x4f8)];}['_wantDb'](){const _0x2e0e4f=_0x46b3b6;return this[_0x2e0e4f(0x8a0)](),(!this[_0x2e0e4f(0x7f7)]||this[_0x2e0e4f(0x2ac)]!==this[_0x2e0e4f(0x35d)])&&(this[_0x2e0e4f(0x7f7)]=this[_0x2e0e4f(0x35d)]['openDB'](_0x404109+':want',{'dupSort':![]}),this[_0x2e0e4f(0x2ac)]=this[_0x2e0e4f(0x35d)]),this[_0x2e0e4f(0x7f7)];}[_0x46b3b6(0x1ee)](){const _0x5f1853=_0x46b3b6,_0x138afa=this[_0x5f1853(0x35d)]?.[_0x5f1853(0x492)];return _0x138afa===_0x5f1853(0x696)||_0x138afa==='closed';}[_0x46b3b6(0x8a0)](){const _0x8f4ebe=_0x46b3b6;if(this[_0x8f4ebe(0x1ee)]())throw new Error('okdb-lock:\x20env\x20closed');}['_key'](_0x2ea914){const _0x1cab7d=_0x46b3b6;return this[_0x1cab7d(0x7c4)]+':'+_0x2ea914;}[_0x46b3b6(0x1f6)](_0x589047){const _0x189d80=_0x46b3b6;try{if(this['_closed']())return;_0x2493e1?this[_0x189d80(0x305)]()[_0x189d80(0x6d8)](this[_0x189d80(0x56a)](_0x589047),Date[_0x189d80(0x81b)]()):this['_wantDb']()[_0x189d80(0x3ba)](this[_0x189d80(0x56a)](_0x589047),Date['now']())?.[_0x189d80(0x6ce)]?.(()=>{});}catch{}}[_0x46b3b6(0x3d2)](_0x4acf8a,_0x2f0f7e=0x3e8){const _0x4309d3=_0x46b3b6;try{const _0x3a5e20=this['_wantDb']()['get'](this['_key'](_0x4acf8a));return typeof _0x3a5e20===_0x4309d3(0x56d)&&Date[_0x4309d3(0x81b)]()-_0x3a5e20<_0x2f0f7e;}catch{return![];}}[_0x46b3b6(0x5d7)](_0x41c527){const _0x3b9066=_0x46b3b6,_0x478839=_0x41c527['updatedAt']??_0x41c527[_0x3b9066(0x4eb)];return _0x478839+_0x41c527[_0x3b9066(0x220)]<Date[_0x3b9066(0x81b)]();}static[_0x46b3b6(0x89c)](_0x326d48){const _0x5802fd=_0x46b3b6,_0x26baa3=_0x326d48?.['holder'];if(!_0x26baa3||typeof _0x26baa3[_0x5802fd(0x5bc)]!==_0x5802fd(0x56d))return![];if(_0x26baa3[_0x5802fd(0x2f2)]!==_0x3f5d86[_0x5802fd(0x2f2)]())return![];if(_0x26baa3[_0x5802fd(0x5bc)]===process[_0x5802fd(0x5bc)])return![];try{return process[_0x5802fd(0x6a0)](_0x26baa3[_0x5802fd(0x5bc)],0x0),![];}catch(_0x32b074){return _0x32b074[_0x5802fd(0x5f9)]==='ESRCH';}}async['tryAcquire'](_0x304218,_0x10a343={},_0x46a318={}){const _0x197ae5=_0x46b3b6,_0x3f8fe8=this['_key'](_0x304218),_0x47363a=_0x46a318['ttlMs']??this[_0x197ae5(0x220)],_0x2e46b4=Date[_0x197ae5(0x81b)](),_0x1f329a={'holder':{'pid':process[_0x197ae5(0x5bc)],'hostname':_0x3f5d86[_0x197ae5(0x2f2)](),..._0x10a343},'acquiredAt':_0x2e46b4,'updatedAt':_0x2e46b4,'ttlMs':_0x47363a};let _0x416055=![],_0x2a37d6=null;if(this[_0x197ae5(0x1ee)]())return{'acquired':![],'handle':null,'current':null};try{const _0x453568=()=>{const _0x574c42=_0x197ae5,_0x33a4be=this[_0x574c42(0x1d0)]()['get'](_0x3f8fe8);if(_0x33a4be&&!this[_0x574c42(0x5d7)](_0x33a4be)&&!_0x6dd327[_0x574c42(0x89c)](_0x33a4be)){const _0x32b53d=_0x10a343[_0x574c42(0x416)]!=null&&_0x33a4be[_0x574c42(0x289)][_0x574c42(0x5bc)]===process[_0x574c42(0x5bc)]&&_0x33a4be[_0x574c42(0x289)][_0x574c42(0x416)]===_0x10a343[_0x574c42(0x416)];if(!_0x32b53d){_0x416055=![],_0x2a37d6=_0x33a4be;return;}_0x1f329a[_0x574c42(0x4eb)]<=_0x33a4be[_0x574c42(0x4eb)]&&(_0x1f329a[_0x574c42(0x4eb)]=_0x33a4be[_0x574c42(0x4eb)]+0x1,_0x1f329a[_0x574c42(0x2fb)]=_0x1f329a[_0x574c42(0x4eb)]);}this[_0x574c42(0x1d0)]()['put'](_0x3f8fe8,_0x1f329a),_0x416055=!![],_0x2a37d6=_0x1f329a;};if(_0x2493e1)this[_0x197ae5(0x1d0)]()[_0x197ae5(0x2ef)](_0x453568);else await this[_0x197ae5(0x1d0)]()[_0x197ae5(0x562)](_0x453568);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x416055)return{'acquired':![],'handle':null,'current':_0x2a37d6};const _0x4f0c49=new _0x22eaa7(this,_0x3f8fe8,_0x1f329a[_0x197ae5(0x4eb)]);return _0x4f0c49['_startHeartbeat'](_0x47363a,this[_0x197ae5(0x6b1)]),{'acquired':!![],'handle':_0x4f0c49,'current':_0x2a37d6};}[_0x46b3b6(0x555)](_0x9d3d01){const _0x11370d=_0x46b3b6;try{return this['_db']()[_0x11370d(0x5ab)](this[_0x11370d(0x56a)](_0x9d3d01))??null;}catch{return null;}}['list'](){const _0x1c8840=_0x46b3b6,_0xb9e1cc=this['namespace']+':',_0x3dd28c=[];try{for(const {key:_0x303bce,value:_0x267cc9}of this[_0x1c8840(0x1d0)]()['getRange']({'start':_0xb9e1cc,'end':_0xb9e1cc+'\xff'})){typeof _0x303bce===_0x1c8840(0x2b2)&&_0x303bce[_0x1c8840(0x5e1)](_0xb9e1cc)&&_0x3dd28c[_0x1c8840(0x338)]({'id':_0x303bce[_0x1c8840(0x556)](_0xb9e1cc['length']),'entry':_0x267cc9});}}catch{}return _0x3dd28c;}static['listAll'](_0x878d58){const _0x861742=_0x46b3b6,_0x35ee4d=[];try{const _0x11df0a=_0x878d58[_0x861742(0x5a0)](_0x404109,{'dupSort':![]});for(const {key:_0x4d6b0c,value:_0x5c64d7}of _0x11df0a[_0x861742(0x754)]({})){if(typeof _0x4d6b0c!==_0x861742(0x2b2))continue;const _0xdb5ac5=_0x4d6b0c[_0x861742(0x24b)](':');if(_0xdb5ac5<0x1)continue;_0x35ee4d[_0x861742(0x338)]({'namespace':_0x4d6b0c[_0x861742(0x556)](0x0,_0xdb5ac5),'id':_0x4d6b0c[_0x861742(0x556)](_0xdb5ac5+0x1),'entry':_0x5c64d7});}}catch{}return _0x35ee4d;}}return okdbLock={'OKDBLock':_0x6dd327},okdbLock;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x13751e=_0x32d6b8;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x39ab93=require$$0,_0x2af716=require$$1$1,_0x279616=require$$2$1,{LOOP:_0x5a9caa}=requireOkdbLoopMonitor(),{OKDBLock:_0x47a9a1}=requireOkdbLock(),{SYNC_COMMITS:_0x5a8f6c}=requireOkdbWriter(),_0x54dadb=_0x13751e(0x853),_0x34673a='node',_0x5aeb5d='~processes:desired',_0x251026=_0x13751e(0x6b8),_0xf3c481=(_0x4a8364,_0x55024e)=>_0x4a8364+':'+_0x55024e,_0x1973ae=(_0x210d34,_0x1de40f)=>_0x210d34+'::'+_0x1de40f,_0x262a9c=(_0x41fd2e,_0x366c1d)=>_0x41fd2e+'/'+_0x366c1d,_0x3f8337=(_0x35060c,_0x84fb39)=>_0x35060c+'#'+_0x84fb39,_0x3e3503=_0x16e2d1=>{const _0x2c6502=_0x13751e;if(_0x16e2d1?.[_0x2c6502(0x88c)])return _0x16e2d1[_0x2c6502(0x88c)];const _0x20012f=_0x16e2d1?.['nodeKey'];return typeof _0x20012f===_0x2c6502(0x2b2)&&_0x20012f['includes']('#')?_0x20012f[_0x2c6502(0x556)](0x0,_0x20012f['indexOf']('#')):_0x20012f;},_0x4a9632=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x13b0a6=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x3eb9c9=_0x4a9632*0x3,_0xad4997=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math['max'](0x927c0,_0x3eb9c9*0x14),_0x4c08e2=[_0x13751e(0x35e),_0x13751e(0x327),'processor:retry',_0x13751e(0x8b4),_0x13751e(0x7d3),'processor:resumed'];let _0x58b11f=null;function _0x37b85f(){const _0x4b9a7f=_0x13751e;if(_0x58b11f==null)_0x58b11f=Math[_0x4b9a7f(0x283)]((Date[_0x4b9a7f(0x81b)]()-process[_0x4b9a7f(0x2ab)]()*0x3e8)/0x3e8)*0x3e8;return _0x58b11f;}function _0x4a93c8(_0x4041d6){const _0x44e853=_0x13751e;if(process.env.OKDB_PROCESS_KILL==='off')return![];if(_0x4041d6?.[_0x44e853(0x663)]?.[_0x44e853(0x317)]&&typeof _0x4041d6[_0x44e853(0x663)][_0x44e853(0x317)]==='object'&&_0x4041d6[_0x44e853(0x663)]['processes'][_0x44e853(0x6a0)]===![])return![];return!![];}function _0x3090bf(_0x142e66,_0x4e570a){const _0x147560=_0x13751e,_0xaee834=!!_0x4e570a?.[_0x147560(0x342)];switch(_0x142e66){case'primary':return{'controllable':_0xaee834,'decommissionable':![],'killable':!![],'killConfirm':'cluster-wide'};case'cli':case _0x147560(0x295):return{'controllable':_0xaee834,'decommissionable':![],'killable':!![],'killConfirm':'confirm'};case _0x147560(0x5ee):return{'controllable':![],'decommissionable':![],'killable':![]};case'http-server':case _0x147560(0x706):case _0x147560(0x37d):case _0x147560(0x3e2):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x147560(0x3e4)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x5ba604{constructor(_0x16d3c7){const _0x2b8c5b=_0x13751e;this[_0x2b8c5b(0x7f8)]=_0x16d3c7,this[_0x2b8c5b(0x633)]=null,this[_0x2b8c5b(0x52a)]=null,this[_0x2b8c5b(0x455)]=new Map(),this[_0x2b8c5b(0x5f7)]=null,this[_0x2b8c5b(0x6d0)]=![],this[_0x2b8c5b(0x80f)]=![],this[_0x2b8c5b(0x57b)]=_0x37b85f(),this[_0x2b8c5b(0x330)]=_0xf3c481(process[_0x2b8c5b(0x5bc)],this[_0x2b8c5b(0x57b)]),this[_0x2b8c5b(0x497)]=_0x279616[_0x2b8c5b(0x38f)]()[_0x2b8c5b(0x556)](0x0,0x8),this['_rowKey']=_0x3f8337(this[_0x2b8c5b(0x330)],this['_instanceId']),this['_startedAt']=Date[_0x2b8c5b(0x81b)](),this['_kind']=null,this[_0x2b8c5b(0x363)]=null,this[_0x2b8c5b(0x8c0)]=null,this[_0x2b8c5b(0x258)]=null,this['_onProcEvent']=null,this[_0x2b8c5b(0x281)]=null,this['_lastPublishAt']=0x0,this[_0x2b8c5b(0x2d7)]={},this[_0x2b8c5b(0x2c5)]=new Map(),this[_0x2b8c5b(0x79a)]=process['cpuUsage'](),this[_0x2b8c5b(0x328)]=Date[_0x2b8c5b(0x81b)](),this[_0x2b8c5b(0x239)]=0x0,this['_threadStats']=new Map();}get[_0x13751e(0x5b2)](){const _0x4742d7=_0x13751e;return this[_0x4742d7(0x330)];}get[_0x13751e(0x686)](){const _0x12301a=_0x13751e;return this[_0x12301a(0x4f4)];}[_0x13751e(0x5ac)](_0x49dadf,_0x199922){const _0x48cbc5=_0x13751e,_0x2f04b2=_0x3090bf(_0x49dadf,_0x199922);if(_0x2f04b2[_0x48cbc5(0x67e)]&&!_0x4a93c8(this[_0x48cbc5(0x7f8)]))return{..._0x2f04b2,'killable':![],'killConfirm':undefined};return _0x2f04b2;}[_0x13751e(0x54d)](){const _0x3e5168=_0x13751e;return!!this[_0x3e5168(0x633)];}[_0x13751e(0x4c5)](_0x5dbe2b){const _0x56998d=_0x13751e;Object[_0x56998d(0x846)](this[_0x56998d(0x2d7)],_0x5dbe2b||{});}[_0x13751e(0x1e3)](_0x456843){const _0x177c4a=_0x13751e;if(_0x456843)this[_0x177c4a(0x8c0)]=_0x456843;}[_0x13751e(0x437)](_0x1a2920={}){const _0x1c923f=_0x13751e;return this[_0x1c923f(0x7f8)][_0x1c923f(0x460)](_0x1a2920);}[_0x13751e(0x8b2)](){const _0x421700=_0x13751e,_0x339123={};let _0xaf1c1f=0x0,_0x22b0e0=0x0;const _0x3909dc=new Set();for(const _0x1f80cd of this[_0x421700(0x251)]()){_0x22b0e0++;const _0x24ac51=_0x1f80cd[_0x421700(0x1d9)];if(!_0x24ac51)continue;if(_0x24ac51[_0x421700(0x381)])_0xaf1c1f++;for(const _0x1c7ccc of _0x24ac51['processors']||[]){if(![_0x421700(0x752),_0x421700(0x515)][_0x421700(0x6d1)](_0x1c7ccc[_0x421700(0x419)]))continue;(_0x1c7ccc[_0x421700(0x67c)]===_0x421700(0x2a0)||_0x1c7ccc[_0x421700(0x67c)]===_0x421700(0x671))&&_0x1c7ccc['cursorKey']&&_0x3909dc[_0x421700(0x88a)]((_0x1c7ccc[_0x421700(0x344)]||_0x421700(0x2dc))+':'+_0x1c7ccc[_0x421700(0x401)]);const _0x1c7d35=_0x1c7ccc[_0x421700(0x344)]||_0x421700(0x2dc);(_0x339123[_0x1c7d35]||=[])[_0x421700(0x338)]({..._0x1c7ccc,'env':_0x1c7d35,'owner':{'pid':_0x1f80cd[_0x421700(0x5bc)]??null,'kind':_0x1f80cd['kind']??null}});}}for(const [_0x1bf702,_0x4714f4]of Object[_0x421700(0x444)](_0x339123)){for(const _0xb3cf9 of _0x4714f4){if(_0xb3cf9[_0x421700(0x419)]===_0x421700(0x752)&&!_0xb3cf9['claimGated']){const _0x2999b5=_0x1bf702+':'+(_0xb3cf9['cursorKey']??'');if(!_0x3909dc[_0x421700(0x6f1)](_0x2999b5))_0xb3cf9['unclaimed']=!![];}}}return{'envs':_0x339123,'policy':null,'participation':{'participating':_0xaf1c1f,'total':_0x22b0e0},'source':_0x421700(0x38d)};}['processorsView'](){const _0x4d1b88=_0x13751e,_0x37c3e2=_0x33bd5b=>{const _0x110501=_0x1684;if(_0x33bd5b[_0x110501(0x67c)]==='online'||_0x33bd5b[_0x110501(0x67c)]===_0x110501(0x671)||_0x33bd5b[_0x110501(0x67c)]===_0x110501(0x21f))return 0x3;if(_0x33bd5b[_0x110501(0x6c9)])return 0x1;return 0x2;},_0xb506e2=new Map();for(const _0x34b22c of this['listNodes']()){for(const _0x3eefbe of _0x34b22c[_0x4d1b88(0x1d9)]?.[_0x4d1b88(0x342)]||[]){const _0x121baf={..._0x3eefbe,'owner':{'pid':_0x34b22c[_0x4d1b88(0x5bc)]??null,'kind':_0x34b22c['kind']??null,'host':_0x34b22c[_0x4d1b88(0x367)]??null}},_0x134ec0=_0x3eefbe[_0x4d1b88(0x419)]===_0x4d1b88(0x752)?_0x4d1b88(0x603)+(_0x3eefbe[_0x4d1b88(0x344)]??'')+'::'+(_0x3eefbe['cursorKey']??_0x3eefbe[_0x4d1b88(0x70d)]??_0x3eefbe['id']):_0x4d1b88(0x7db)+(_0x34b22c[_0x4d1b88(0x876)]??_0x34b22c[_0x4d1b88(0x88c)]??'')+'::'+(_0x3eefbe['env']??'')+'::'+_0x3eefbe['id'],_0xcda6c9=_0xb506e2[_0x4d1b88(0x5ab)](_0x134ec0);if(!_0xcda6c9||_0x37c3e2(_0x121baf)>_0x37c3e2(_0xcda6c9))_0xb506e2[_0x4d1b88(0x4dc)](_0x134ec0,_0x121baf);}}return[..._0xb506e2[_0x4d1b88(0x33f)]()];}[_0x13751e(0x462)](){const _0x2e32f9=_0x13751e,_0x3366d4=Date[_0x2e32f9(0x81b)](),_0x240b4f=this[_0x2e32f9(0x251)](),_0x518eb9=_0x109e89=>Math['max'](0x0,Math[_0x2e32f9(0x283)]((_0x3366d4-(_0x109e89[_0x2e32f9(0x527)]||_0x3366d4))/0x3e8)),_0x177cab=_0x240b4f[_0x2e32f9(0x66f)](_0x165afe=>_0x165afe[_0x2e32f9(0x7be)]===_0x2e32f9(0x440)),_0x1c8487=_0x240b4f['filter'](_0x5d2601=>_0x5d2601['kind']===_0x2e32f9(0x563));if(_0x177cab||_0x1c8487['length'])return{'primary':_0x177cab?{'pid':_0x177cab[_0x2e32f9(0x5bc)],'uptime':_0x518eb9(_0x177cab)}:null,'workers':_0x1c8487[_0x2e32f9(0x8bd)](_0x4bfa87=>({'pid':_0x4bfa87[_0x2e32f9(0x5bc)],'uptime':_0x518eb9(_0x4bfa87)})),'workersConfigured':_0x177cab?.[_0x2e32f9(0x49b)]?.[_0x2e32f9(0x567)]??_0x1c8487[_0x2e32f9(0x3be)],'mode':_0x2e32f9(0x759)};const _0x9e8b0b=_0x240b4f[_0x2e32f9(0x66f)](_0x211216=>_0x211216['kind']===_0x2e32f9(0x6a2)||_0x211216[_0x2e32f9(0x7be)]===_0x2e32f9(0x295)||_0x211216['kind']===_0x2e32f9(0x5ee)),_0x56bcc8=_0x9e8b0b?{'pid':_0x9e8b0b[_0x2e32f9(0x5bc)],'uptime':_0x518eb9(_0x9e8b0b)}:{'pid':process[_0x2e32f9(0x5bc)],'uptime':Math[_0x2e32f9(0x321)](0x0,Math['round'](process[_0x2e32f9(0x2ab)]()))};return{'primary':_0x56bcc8,'workers':[_0x56bcc8],'workersConfigured':0x1,'mode':_0x2e32f9(0x752)};}[_0x13751e(0x470)](){return this['_groupByProcess']();}[_0x13751e(0x29b)](){const _0x3e6937=_0x13751e,_0x17ee5e=new Map();for(const _0x2e22ec of this[_0x3e6937(0x875)]())_0x17ee5e[_0x3e6937(0x4dc)](_0x2e22ec['processKey'],{..._0x2e22ec,'children':[]});const _0xd1555a=[];for(const _0x28a171 of _0x17ee5e[_0x3e6937(0x33f)]()){const _0x4e08d5=_0x28a171['supervisorKey']?_0x17ee5e[_0x3e6937(0x5ab)](_0x28a171[_0x3e6937(0x1cd)]):null;if(_0x4e08d5&&_0x4e08d5!==_0x28a171)_0x4e08d5[_0x3e6937(0x2a2)][_0x3e6937(0x338)](_0x28a171);else _0xd1555a['push'](_0x28a171);}const _0x4efbb3=(_0x51cad4,_0x57a59b)=>_0x51cad4[_0x3e6937(0x7be)]===_0x57a59b[_0x3e6937(0x7be)]?(_0x51cad4[_0x3e6937(0x5bc)]||0x0)-(_0x57a59b[_0x3e6937(0x5bc)]||0x0):(_0x51cad4[_0x3e6937(0x7be)]??'')<(_0x57a59b[_0x3e6937(0x7be)]??'')?-0x1:0x1,_0x37a6a8=_0x135906=>{const _0x55701c=_0x3e6937;_0x135906[_0x55701c(0x51f)](_0x4efbb3);for(const _0x16ae4b of _0x135906)if(_0x16ae4b[_0x55701c(0x2a2)][_0x55701c(0x3be)])_0x37a6a8(_0x16ae4b[_0x55701c(0x2a2)]);};return _0x37a6a8(_0xd1555a),_0xd1555a;}[_0x13751e(0x3cf)](_0x576e29){const _0x125aa5=_0x13751e;return this[_0x125aa5(0x875)]()[_0x125aa5(0x66f)](_0x47f68c=>_0x47f68c[_0x125aa5(0x88c)]===_0x576e29)??null;}[_0x13751e(0x875)](_0x439e3e=Date['now']()){const _0x3d750f=_0x13751e,_0x537b0b=new Map();for(const _0xca4732 of this[_0x3d750f(0x251)]()){const _0x33929c=_0x3e3503(_0xca4732);let _0x49bc17=_0x537b0b[_0x3d750f(0x5ab)](_0x33929c);!_0x49bc17&&(_0x49bc17={'processKey':_0x33929c,'nodeKey':_0x33929c,'pid':_0xca4732[_0x3d750f(0x5bc)],'ppid':_0xca4732['ppid']??null,'host':_0xca4732[_0x3d750f(0x367)]??null,'kind':_0xca4732['kind'],'role':null,'supervisorKey':_0xca4732[_0x3d750f(0x1cd)]??null,'slot':_0xca4732['slot']??null,'slotKey':_0xca4732['slotKey']??null,'caps':_0xca4732[_0x3d750f(0x769)]??null,'lifecycle':_0xca4732[_0x3d750f(0x5d2)]??null,'uptime':Math[_0x3d750f(0x321)](0x0,Math[_0x3d750f(0x283)]((_0x439e3e-(_0xca4732['startedAt']||_0x439e3e))/0x3e8)),'startedAt':_0xca4732[_0x3d750f(0x527)]??null,'meta':_0xca4732[_0x3d750f(0x49b)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x537b0b[_0x3d750f(0x4dc)](_0x33929c,_0x49bc17));_0x49bc17[_0x3d750f(0x617)][_0x3d750f(0x338)]({'instanceId':_0xca4732[_0x3d750f(0x3ec)]??null,'role':_0xca4732[_0x3d750f(0x32e)]??null,'listenAddr':_0xca4732[_0x3d750f(0x403)]??null,'lifecycle':_0xca4732[_0x3d750f(0x5d2)]??null,'processing':_0xca4732[_0x3d750f(0x1d9)]??null});if(!_0x49bc17[_0x3d750f(0x32e)]&&_0xca4732[_0x3d750f(0x32e)])_0x49bc17['role']=_0xca4732[_0x3d750f(0x32e)];if(!_0x49bc17['listenAddr']&&_0xca4732[_0x3d750f(0x403)])_0x49bc17[_0x3d750f(0x403)]=_0xca4732['listenAddr'];if(!_0x49bc17['processing']&&_0xca4732[_0x3d750f(0x1d9)])_0x49bc17[_0x3d750f(0x1d9)]=_0xca4732[_0x3d750f(0x1d9)];if(!_0x49bc17[_0x3d750f(0x71a)]&&_0xca4732[_0x3d750f(0x71a)])_0x49bc17[_0x3d750f(0x71a)]=_0xca4732[_0x3d750f(0x71a)];if(!_0x49bc17['singletonClaims']&&_0xca4732[_0x3d750f(0x7fe)])_0x49bc17[_0x3d750f(0x7fe)]=_0xca4732[_0x3d750f(0x7fe)];if(_0x49bc17[_0x3d750f(0x769)]==null&&_0xca4732[_0x3d750f(0x769)])_0x49bc17[_0x3d750f(0x769)]=_0xca4732['caps'];if(_0xca4732[_0x3d750f(0x5f2)]&&(!_0x49bc17['stats']||(_0xca4732[_0x3d750f(0x5f2)]['at']??0x0)>(_0x49bc17['stats']['at']??0x0)))_0x49bc17[_0x3d750f(0x5f2)]=_0xca4732[_0x3d750f(0x5f2)];}return[..._0x537b0b['values']()];}[_0x13751e(0x71d)](){const _0x34b938=_0x13751e,_0x1dca3d=[],_0x830833={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x1c992e of this[_0x34b938(0x875)]()){_0x1dca3d[_0x34b938(0x338)]({'processKey':_0x1c992e[_0x34b938(0x88c)],'kind':_0x1c992e[_0x34b938(0x7be)],'pid':_0x1c992e[_0x34b938(0x5bc)],'supervisorKey':_0x1c992e[_0x34b938(0x1cd)],'meta':_0x1c992e[_0x34b938(0x49b)]??null,'uptime':_0x1c992e[_0x34b938(0x2ab)],'stats':_0x1c992e[_0x34b938(0x5f2)]??null}),_0x830833[_0x34b938(0x317)]++;if(_0x1c992e[_0x34b938(0x5f2)]){_0x830833[_0x34b938(0x2d9)]+=_0x1c992e[_0x34b938(0x5f2)][_0x34b938(0x2d9)]||0x0,_0x830833[_0x34b938(0x891)]+=(_0x1c992e['stats'][_0x34b938(0x891)]||0x0)+(_0x1c992e[_0x34b938(0x5f2)][_0x34b938(0x57e)]?.[_0x34b938(0x891)]||0x0);const _0x36018f=_0x1c992e[_0x34b938(0x5f2)][_0x34b938(0x57e)];_0x36018f&&(_0x830833[_0x34b938(0x57e)][_0x34b938(0x2a3)]+=_0x36018f[_0x34b938(0x2a3)]||0x0,_0x830833[_0x34b938(0x57e)][_0x34b938(0x451)]+=_0x36018f['sandbox']||0x0,_0x830833[_0x34b938(0x57e)][_0x34b938(0x774)]+=_0x36018f[_0x34b938(0x774)]||0x0);}}return{'totals':_0x830833,'nodes':_0x1dca3d};}async[_0x13751e(0x654)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x189f92=_0x13751e;this[_0x189f92(0x6d0)]=this[_0x189f92(0x6d0)]||!!writer,this[_0x189f92(0x80f)]=this[_0x189f92(0x80f)]||!!reader,this[_0x189f92(0x22d)]=kind||this[_0x189f92(0x22d)]||(_0x2af716[_0x189f92(0x3c7)]?'http-server':_0x189f92(0x6a2)),this[_0x189f92(0x363)]=supervisorKey??this[_0x189f92(0x363)],this[_0x189f92(0x8c0)]=listenAddr??this[_0x189f92(0x8c0)],this[_0x189f92(0x7dd)](),await this[_0x189f92(0x2fe)]();if(!writer&&!reader)return null;if(!this[_0x189f92(0x633)]){const _0x4fc679=await this['okdb'][_0x189f92(0x4e7)](_0x54dadb,{'sync':![],'durability':_0x189f92(0x533)});await _0x4fc679[_0x189f92(0x490)](_0x34673a),this[_0x189f92(0x633)]=_0x4fc679;}return this['_statusEnv'];}[_0x13751e(0x55d)](){const _0x4a8af9=_0x13751e;return this[_0x4a8af9(0x2c3)]!==this[_0x4a8af9(0x633)]&&(this[_0x4a8af9(0x2c3)]=this['_statusEnv'],this['_nodeDbCache']=this[_0x4a8af9(0x633)][_0x4a8af9(0x566)](_0x34673a)[_0x4a8af9(0x44d)]),this['_nodeDbCache'];}[_0x13751e(0x673)](_0x4021bf){const _0x4b841e=_0x13751e;if(_0x5a8f6c)return this[_0x4b841e(0x55d)]()[_0x4b841e(0x6d8)](_0x4021bf[_0x4b841e(0x876)],_0x4021bf,0x1);const _0x42c324=this[_0x4b841e(0x55d)]()[_0x4b841e(0x3ba)](_0x4021bf[_0x4b841e(0x876)],_0x4021bf,0x1);if(_0x42c324&&typeof _0x42c324[_0x4b841e(0x76c)]===_0x4b841e(0x500))_0x42c324[_0x4b841e(0x76c)](undefined,()=>{});return _0x42c324;}['_putRowSync'](_0x13dc19){const _0x1dfdc7=_0x13751e;return this[_0x1dfdc7(0x55d)]()[_0x1dfdc7(0x6d8)](_0x13dc19[_0x1dfdc7(0x876)],_0x13dc19,0x1);}[_0x13751e(0x4d8)](_0x2a6f96){const _0x8763ea=_0x13751e;if(_0x5a8f6c)try{return this[_0x8763ea(0x55d)]()[_0x8763ea(0x35f)](_0x2a6f96);}catch{return![];}const _0x2f9b04=this['_nodeDb']()[_0x8763ea(0x77c)](_0x2a6f96);if(_0x2f9b04&&typeof _0x2f9b04[_0x8763ea(0x76c)]==='function')_0x2f9b04[_0x8763ea(0x76c)](undefined,()=>{});return _0x2f9b04;}async['putNode'](_0x30934a){const _0xc9d55c=_0x13751e;if(!this['_statusEnv']||!this[_0xc9d55c(0x6d0)]||!_0x30934a?.[_0xc9d55c(0x876)])return;return this['_putRowAsync'](_0x30934a);}async[_0x13751e(0x5ec)](_0x152b1c){const _0x2c0924=_0x13751e;if(!this[_0x2c0924(0x633)]||!this[_0x2c0924(0x6d0)]||!_0x152b1c)return;const _0xec4062=_0x152b1c[_0x2c0924(0x6d1)]('#'),_0x145adf=[];for(const {key:_0x202361}of this[_0x2c0924(0x633)][_0x2c0924(0x754)](_0x34673a)){if(_0x202361===_0x152b1c||!_0xec4062&&typeof _0x202361==='string'&&_0x202361[_0x2c0924(0x5e1)](_0x152b1c+'#'))_0x145adf[_0x2c0924(0x338)](_0x202361);}for(const _0x5bedc3 of _0x145adf){try{this[_0x2c0924(0x55d)]()[_0x2c0924(0x35f)](_0x5bedc3);}catch{}}}[_0x13751e(0x2eb)](_0x55377c){const _0x186da1=_0x13751e;if(typeof _0x55377c?.[_0x186da1(0x5bc)]!==_0x186da1(0x56d))return![];if(_0x55377c[_0x186da1(0x367)]!==_0x39ab93[_0x186da1(0x2f2)]())return![];if(_0x55377c[_0x186da1(0x5bc)]===process['pid'])return![];if(_0x55377c[_0x186da1(0x6ad)]!=null&&_0x55377c[_0x186da1(0x6ad)]<Date[_0x186da1(0x81b)]()-_0xad4997)return!![];try{return process[_0x186da1(0x6a0)](_0x55377c['pid'],0x0),![];}catch(_0x62294a){return _0x62294a[_0x186da1(0x5f9)]==='ESRCH';}}[_0x13751e(0x251)](){const _0x582b37=_0x13751e;if(!this[_0x582b37(0x633)])return[];try{this[_0x582b37(0x633)]['db']?.[_0x582b37(0x717)]?.();}catch{}const _0x1b7282=Date[_0x582b37(0x81b)](),_0x1d31c0=_0x39ab93[_0x582b37(0x2f2)](),_0x401990=[];for(const {value:_0x477eba}of this[_0x582b37(0x633)][_0x582b37(0x754)](_0x34673a)){if(!_0x477eba)continue;let _0x352d69=null;_0x477eba['host']===_0x1d31c0&&typeof _0x477eba['pid']===_0x582b37(0x56d)&&(_0x352d69=!this[_0x582b37(0x2eb)](_0x477eba));if(_0x352d69===![])continue;const _0x3bfc45=_0x477eba['expiresAt']==null||_0x477eba[_0x582b37(0x6ad)]>=_0x1b7282;if(_0x352d69===!![]||_0x3bfc45)_0x401990[_0x582b37(0x338)](_0x477eba);}return _0x401990;}async['reap'](_0x426d26=0x0){const _0x770b7b=_0x13751e;if(!this['_statusEnv']||!this[_0x770b7b(0x6d0)])return;const _0x41f187=Date[_0x770b7b(0x81b)]()-_0x426d26,_0x23cca9=new Set(),_0x462c19=[],_0x5ceba2=_0x39ab93['hostname'](),_0x5928cd=require$$3[_0x770b7b(0x24a)];for(const {key:_0x37ea96,value:_0x10c390}of this[_0x770b7b(0x633)][_0x770b7b(0x754)](_0x34673a)){if(!_0x10c390)continue;const _0x5328a9=_0x10c390['host']===_0x5ceba2&&typeof _0x10c390[_0x770b7b(0x5bc)]===_0x770b7b(0x56d),_0x41e7ea=_0x5328a9?this[_0x770b7b(0x2eb)](_0x10c390):_0x10c390['expiresAt']!=null&&_0x10c390['expiresAt']<_0x41f187;if(_0x41e7ea)_0x462c19[_0x770b7b(0x338)](_0x37ea96);else{_0x23cca9[_0x770b7b(0x88a)](_0x3e3503(_0x10c390)??_0x37ea96);if(_0x10c390[_0x770b7b(0x24a)]&&_0x10c390[_0x770b7b(0x24a)]!==_0x5928cd){if(!this[_0x770b7b(0x5fb)])this[_0x770b7b(0x5fb)]=new Set();!this['_versionSkewWarned'][_0x770b7b(0x6f1)](_0x10c390[_0x770b7b(0x24a)])&&(this[_0x770b7b(0x5fb)][_0x770b7b(0x88a)](_0x10c390[_0x770b7b(0x24a)]),this[_0x770b7b(0x7f8)][_0x770b7b(0x51a)]?.[_0x770b7b(0x6c6)]?.(_0x770b7b(0x453)+(_0x10c390['pid']??'?')+_0x770b7b(0x818)+_0x10c390['version']+_0x770b7b(0x4d6)+_0x5928cd+_0x770b7b(0x252)+'mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.',{'feature':_0x770b7b(0x70e)}));}}}for(const _0x465d3e of _0x462c19)this[_0x770b7b(0x4d8)](_0x465d3e);if(this[_0x770b7b(0x7dd)]()){const _0x20fd48=[];for(const {key:_0x13a822}of this[_0x770b7b(0x7c0)](_0x770b7b(0x2da))){if(!_0x23cca9[_0x770b7b(0x6f1)](_0x13a822)){if(_0x5a8f6c)try{this[_0x770b7b(0x52a)][_0x770b7b(0x35f)](_0x770b7b(0x858)+_0x13a822);}catch{}else _0x20fd48[_0x770b7b(0x338)](this[_0x770b7b(0x52a)][_0x770b7b(0x77c)](_0x770b7b(0x858)+_0x13a822));}}if(_0x20fd48['length'])await Promise['allSettled'](_0x20fd48);}}[_0x13751e(0x359)](_0x18839b=null){const _0x49c5db=_0x13751e;if(this[_0x49c5db(0x258)])return;if(!this[_0x49c5db(0x6d0)]||!this[_0x49c5db(0x633)]){this[_0x49c5db(0x7f8)]?.[_0x49c5db(0x51a)]?.[_0x49c5db(0x6c6)]?.('registry\x20heartbeat\x20skipped\x20(writer='+this[_0x49c5db(0x6d0)]+_0x49c5db(0x87e)+!!this[_0x49c5db(0x633)]+_0x49c5db(0x893),{'feature':'processes'});return;}this[_0x49c5db(0x281)]=_0x18839b,this[_0x49c5db(0x1c1)]=()=>this[_0x49c5db(0x524)]();for(const _0x370c46 of _0x4c08e2)this[_0x49c5db(0x7f8)]['events']['on'](_0x370c46,this['_onProcEvent']);this['_publishNow']();const _0x27669a=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x4a9632;this[_0x49c5db(0x258)]=setInterval(()=>{const _0x1e9e68=_0x49c5db;if(this[_0x1e9e68(0x281)])try{this[_0x1e9e68(0x281)]();}catch{}this[_0x1e9e68(0x831)](),this[_0x1e9e68(0x88d)]()[_0x1e9e68(0x6ce)](()=>{});},_0x27669a);if(this[_0x49c5db(0x258)][_0x49c5db(0x5e0)])this[_0x49c5db(0x258)][_0x49c5db(0x5e0)]();}[_0x13751e(0x524)](){const _0x3547ff=_0x13751e;if(!this[_0x3547ff(0x6d0)]||!this['_statusEnv'])return;if(Date[_0x3547ff(0x81b)]()-this[_0x3547ff(0x56f)]<_0x13b0a6)return;this[_0x3547ff(0x831)]();}['_publishNow'](){const _0x25a1c=_0x13751e;if(!this['_isWriter']||!this[_0x25a1c(0x633)])return;this[_0x25a1c(0x56f)]=Date[_0x25a1c(0x81b)]();try{const _0x3cb9d9=[this['_buildOwnRow']()];for(const _0x142195 of this[_0x25a1c(0x2c5)][_0x25a1c(0x33f)]())_0x3cb9d9[_0x25a1c(0x338)](this[_0x25a1c(0x695)](_0x142195));const _0x29b1d3=_0x5a9caa[_0x25a1c(0x71f)]?_0x5a9caa[_0x25a1c(0x81b)]():0x0;for(const _0x2b4a1b of _0x3cb9d9){try{this[_0x25a1c(0x3f6)](_0x2b4a1b),this[_0x25a1c(0x207)]=![];}catch(_0x3071e6){!this[_0x25a1c(0x207)]&&(this['_publishFailWarned']=!![],this[_0x25a1c(0x7f8)]?.[_0x25a1c(0x51a)]?.[_0x25a1c(0x6c6)]?.('registry\x20publish\x20failing:\x20'+_0x3071e6['message'],{'feature':_0x25a1c(0x317)}));}}if(_0x5a9caa[_0x25a1c(0x71f)])_0x5a9caa[_0x25a1c(0x1fc)]('registry-publish',_0x5a9caa[_0x25a1c(0x81b)]()-_0x29b1d3,_0x25a1c(0x22c)+_0x3cb9d9[_0x25a1c(0x3be)]+_0x25a1c(0x23c));}catch(_0x2a2d49){!this[_0x25a1c(0x207)]&&(this['_publishFailWarned']=!![],this[_0x25a1c(0x7f8)]?.[_0x25a1c(0x51a)]?.[_0x25a1c(0x6c6)]?.(_0x25a1c(0x522)+_0x2a2d49[_0x25a1c(0x439)],{'feature':_0x25a1c(0x317)}));}}async[_0x13751e(0x2e1)](){const _0x4c168b=_0x13751e;if(this['_onProcEvent']){for(const _0x4ee4c7 of _0x4c08e2){try{this['okdb'][_0x4c168b(0x791)][_0x4c168b(0x866)](_0x4ee4c7,this[_0x4c168b(0x1c1)]);}catch{}}this[_0x4c168b(0x1c1)]=null;}this[_0x4c168b(0x258)]&&(clearInterval(this[_0x4c168b(0x258)]),this[_0x4c168b(0x258)]=null);try{if(this[_0x4c168b(0x633)]&&this[_0x4c168b(0x6d0)])await this[_0x4c168b(0x5ec)](this[_0x4c168b(0x4f4)]);}catch{}}async['deregisterSelf'](){const _0x1c6532=_0x13751e;if(!this[_0x1c6532(0x633)]||!this['_isWriter'])return;try{await this[_0x1c6532(0x5ec)](this['_rowKey']);}catch{}try{const _0x599ca9=[];for(const {value:_0x3af109}of this['_statusEnv'][_0x1c6532(0x754)](_0x34673a)){if(_0x3af109?.[_0x1c6532(0x4ad)]===process[_0x1c6532(0x5bc)]&&_0x3af109['nodeKey'])_0x599ca9['push'](_0x3af109[_0x1c6532(0x876)]);}for(const _0x2d6848 of _0x599ca9){try{await this['removeNode'](_0x2d6848);}catch{}}}catch{}}async['publishOwnRow'](){const _0x2b3dec=_0x13751e;return this[_0x2b3dec(0x332)](this[_0x2b3dec(0x86f)]());}async['publishChildRow'](_0x4016b5){const _0xe971ac=_0x13751e;if(!this[_0xe971ac(0x633)]||!this['_isWriter'])return;return this['putNode'](this[_0xe971ac(0x695)](_0x4016b5));}[_0x13751e(0x695)]({pid:_0x238fde,startedAt:_0x273870,kind:_0x4d3540,supervisorKey:_0x3e6618,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle='running',meta:meta=null,stats:stats=null}){const _0x217b3d=_0x13751e,_0x1564c1=Date[_0x217b3d(0x81b)](),_0x59bb8f=_0xf3c481(_0x238fde,_0x273870);return{'nodeKey':_0x3f8337(_0x59bb8f,'0'),'processKey':_0x59bb8f,'instanceId':'0','pid':_0x238fde,'startedAt':_0x273870,'ppid':process['pid'],'host':_0x39ab93[_0x217b3d(0x2f2)](),'supervisorKey':_0x3e6618,'slot':slot,'slotKey':slotKey,'kind':_0x4d3540,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x1564c1,'expiresAt':_0x1564c1+_0x3eb9c9,'caps':this[_0x217b3d(0x5ac)](_0x4d3540,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x13751e(0x681)](_0x1f0dc4){const _0x55056c=_0x13751e;if(!_0x1f0dc4?.[_0x55056c(0x5bc)])return null;const _0x4a3853=_0xf3c481(_0x1f0dc4[_0x55056c(0x5bc)],_0x1f0dc4[_0x55056c(0x527)]);this[_0x55056c(0x2c5)][_0x55056c(0x4dc)](_0x4a3853,{..._0x1f0dc4,'supervisorKey':_0x1f0dc4['supervisorKey']??this['_selfKey']});if(this['_isWriter'])await this['publishChildRow'](this['_children'][_0x55056c(0x5ab)](_0x4a3853))[_0x55056c(0x6ce)]?.(()=>{});return _0x4a3853;}[_0x13751e(0x31d)](_0xdb09ec){const _0x2b3c48=_0x13751e;if(!_0xdb09ec)return;return this[_0x2b3c48(0x2c5)][_0x2b3c48(0x1d4)](_0xdb09ec),this[_0x2b3c48(0x5ec)](_0xdb09ec);}[_0x13751e(0x529)](){const _0x301d4d=_0x13751e,_0x2cf39f=Date['now'](),_0x2cdf14=process['cpuUsage'](),_0x176d80=(_0x2cf39f-this[_0x301d4d(0x328)])*0x3e8;if(_0x176d80>=0x3d090){const _0x22e5e7=_0x2cdf14[_0x301d4d(0x1bc)]-this['_lastCpuUsage']['user']+(_0x2cdf14['system']-this[_0x301d4d(0x79a)][_0x301d4d(0x1c8)]),_0xf61675=_0x39ab93[_0x301d4d(0x3f2)]()['length']||0x1;this[_0x301d4d(0x239)]=Math[_0x301d4d(0x87d)](0x64,Math[_0x301d4d(0x283)](_0x22e5e7/(_0x176d80*_0xf61675)*0x64)),this['_lastCpuWindowMs']=Math['round'](_0x176d80/0x3e8),this[_0x301d4d(0x79a)]=_0x2cdf14,this[_0x301d4d(0x328)]=_0x2cf39f;}const _0x4a7298=process[_0x301d4d(0x63d)](),_0x43f8ae=this['_threadStats']['size'];let _0x269767=0x0;if(_0x43f8ae>0x0){const _0xf4e52c=[this[_0x301d4d(0x7f8)],...this[_0x301d4d(0x7f8)]['_envs']?.[_0x301d4d(0x33f)]?.()??[]];for(const _0x1e17ee of _0xf4e52c){const _0x51f652=_0x1e17ee[_0x301d4d(0x2aa)]?.['_sandbox'];if(_0x51f652)_0x269767+=_0x51f652[_0x301d4d(0x74f)][_0x301d4d(0x774)];}}let _0x1c8db8=null;const _0x562261=_0x43f8ae;if(_0x562261>0x0){let _0x3f226a=0x0;for(const _0x1c108e of this[_0x301d4d(0x345)]['values']())_0x3f226a+=_0x1c108e['heapUsed']||0x0;_0x1c8db8={'count':_0x562261,'heapUsed':_0x3f226a,'sandbox':_0x43f8ae,'busy':_0x269767};}return{'rss':_0x4a7298['rss'],'heapUsed':_0x4a7298['heapUsed'],'heapTotal':_0x4a7298[_0x301d4d(0x3a0)],'external':_0x4a7298[_0x301d4d(0x667)],'cpuPct':this[_0x301d4d(0x239)],'cpuWindowMs':this[_0x301d4d(0x72a)]??null,'threads':_0x1c8db8,'at':_0x2cf39f};}['reportThreadStats'](_0x22ff70,_0x4c3bcc){const _0x1057ca=_0x13751e;if(!_0x22ff70||!_0x4c3bcc)return;this[_0x1057ca(0x345)][_0x1057ca(0x4dc)](_0x22ff70,_0x4c3bcc);}[_0x13751e(0x835)](_0x219fdb){const _0x26ebc8=_0x13751e;this[_0x26ebc8(0x345)][_0x26ebc8(0x1d4)](_0x219fdb);}['updateSupervisedChildStats'](_0x597def,_0x2ba44b,_0x57b979=undefined){const _0x54e4bb=_0x13751e,_0x12c290=this[_0x54e4bb(0x2c5)][_0x54e4bb(0x5ab)](_0x597def);if(!_0x12c290||!_0x2ba44b)return;if(_0x57b979!==undefined)_0x12c290[_0x54e4bb(0x1d9)]=_0x57b979;_0x12c290['stats']={'rss':_0x2ba44b[_0x54e4bb(0x2d9)]??null,'heapUsed':_0x2ba44b['heapUsed']??null,'heapTotal':_0x2ba44b[_0x54e4bb(0x3a0)]??null,'external':_0x2ba44b['external']??null,'cpuPct':_0x2ba44b['cpuPct']??null,'cpuWindowMs':_0x2ba44b[_0x54e4bb(0x7b6)]??null,'threads':_0x2ba44b[_0x54e4bb(0x57e)]??null,'claims':_0x2ba44b[_0x54e4bb(0x7dc)]??null,'envsOpen':_0x2ba44b[_0x54e4bb(0x571)]??null,'at':Date['now']()};}[_0x13751e(0x86f)](){const _0x3dc8af=_0x13751e,_0x97061c=Date[_0x3dc8af(0x81b)](),_0x27fd37=this['okdb'][_0x3dc8af(0x7af)]||{},_0x33bf40=this[_0x3dc8af(0x22d)]||_0x3dc8af(0x6a2);return{'nodeKey':this[_0x3dc8af(0x4f4)],'processKey':this['_selfKey'],'instanceId':this['_instanceId'],'pid':process[_0x3dc8af(0x5bc)],'startedAt':this[_0x3dc8af(0x57b)],'instanceStartedAt':this[_0x3dc8af(0x775)],'ppid':typeof process[_0x3dc8af(0x4ad)]===_0x3dc8af(0x56d)?process['ppid']:null,'host':_0x39ab93[_0x3dc8af(0x2f2)](),'supervisorKey':this['_supervisorKey']??null,'version':require$$3[_0x3dc8af(0x24a)],'kind':_0x33bf40,'role':{'engines':!!_0x27fd37['engines'],'processors':!!_0x27fd37[_0x3dc8af(0x342)],'compaction':_0x27fd37[_0x3dc8af(0x50e)],'http':_0x27fd37[_0x3dc8af(0x4fc)]},'listenAddr':this[_0x3dc8af(0x8c0)]??null,'heartbeatAt':_0x97061c,'expiresAt':_0x97061c+_0x3eb9c9,'caps':this[_0x3dc8af(0x5ac)](_0x33bf40,_0x27fd37),'lifecycle':{'state':_0x3dc8af(0x412),'desiredVersionApplied':null},'meta':{...this[_0x3dc8af(0x2d7)]},'processing':_0x27fd37[_0x3dc8af(0x342)]?this[_0x3dc8af(0x269)]():null,'engines':_0x27fd37[_0x3dc8af(0x71a)]?[...this[_0x3dc8af(0x7f8)][_0x3dc8af(0x8a5)]??[]]:null,'singletonClaims':this[_0x3dc8af(0x5fe)](),'stats':this[_0x3dc8af(0x529)](),'writers':this[_0x3dc8af(0x85a)]()};}[_0x13751e(0x85a)](){const _0x3da823=_0x13751e,_0x269f1b={};try{for(const [_0x18433b,_0x2a494f]of this[_0x3da823(0x7f8)][_0x3da823(0x828)]){try{const _0x548cd9=_0x2a494f[_0x3da823(0x740)]?.();if(!_0x548cd9)continue;if(!_0x548cd9[_0x3da823(0x8c5)]&&!_0x548cd9['committed']&&!(_0x548cd9[_0x3da823(0x1cb)]??0x0)&&!_0x548cd9['draining'])continue;_0x269f1b[_0x18433b]={'depth':_0x548cd9['depth'],'oldestPendingMs':_0x548cd9[_0x3da823(0x302)],'committed':_0x548cd9[_0x3da823(0x7b2)],'commitsPerSec':_0x548cd9[_0x3da823(0x851)],'commitP99Ms':_0x548cd9[_0x3da823(0x8ba)],'parkedNow':_0x548cd9['parkedNow']??0x0,'draining':!!_0x548cd9['draining']};}catch{}}}catch{}return Object[_0x3da823(0x6c7)](_0x269f1b)['length']?_0x269f1b:null;}[_0x13751e(0x5fe)](){const _0xe74cec=_0x13751e,_0x3f1496=process[_0xe74cec(0x5bc)],_0x499984=Date[_0xe74cec(0x81b)](),_0xe28fac=_0x31147f=>{const _0x32d0e4=_0xe74cec;if(!_0x31147f)return[];const _0x22362c=[];try{for(const {id:_0x23ddbb,entry:_0x33df5b}of _0x31147f[_0x32d0e4(0x44f)]()){if(_0x33df5b?.['holder']?.[_0x32d0e4(0x5bc)]!==_0x3f1496)continue;const _0x446987=_0x33df5b[_0x32d0e4(0x2fb)]??_0x33df5b[_0x32d0e4(0x4eb)]??0x0;if(_0x446987+(_0x33df5b[_0x32d0e4(0x220)]??0x0)<_0x499984)continue;_0x22362c['push'](_0x23ddbb);}}catch{}return _0x22362c;},_0x3b2708=_0xe28fac(this['_singletonLock']('compact')),_0xddc015=_0xe28fac(this[_0xe74cec(0x4b9)](_0xe74cec(0x461)));if(!_0x3b2708[_0xe74cec(0x3be)]&&!_0xddc015['length'])return null;return{'compact':_0x3b2708,'replicate':_0xddc015};}[_0x13751e(0x4b9)](_0x3403da){const _0x41feba=_0x13751e;if(!this[_0x41feba(0x7f8)]?.[_0x41feba(0x879)])return null;if(!this['_singletonLocks'])this[_0x41feba(0x655)]=new Map();let _0xd6eb71=this[_0x41feba(0x655)]['get'](_0x3403da);if(!_0xd6eb71)try{_0xd6eb71=new _0x47a9a1(this[_0x41feba(0x7f8)][_0x41feba(0x879)],{'namespace':_0x3403da}),this[_0x41feba(0x655)][_0x41feba(0x4dc)](_0x3403da,_0xd6eb71);}catch{return null;}return _0xd6eb71;}[_0x13751e(0x269)](){const _0x680104=_0x13751e,_0xc0d7f2=[];try{for(const [_0x5ec449,_0x45524c]of this[_0x680104(0x7f8)][_0x680104(0x828)]){if(_0x5ec449[_0x680104(0x5e1)]('~'))continue;for(const _0x58fa19 of _0x45524c[_0x680104(0x260)][_0x680104(0x768)]())_0xc0d7f2[_0x680104(0x338)]({..._0x58fa19,'env':_0x5ec449});}}catch{}return{'participate':this['okdb'][_0x680104(0x342)]?.[_0x680104(0x496)]??![],'processors':_0xc0d7f2};}[_0x13751e(0x7dd)](){const _0x311d66=_0x13751e;if(this['_desired'])return!![];const _0x40d21f=this[_0x311d66(0x7f8)][_0x311d66(0x879)];if(!_0x40d21f)return![];return this[_0x311d66(0x52a)]=_0x40d21f['openDB'](_0x5aeb5d,{'dupSort':![]}),this['_cmd']=_0x40d21f[_0x311d66(0x5a0)](_0x251026,{'dupSort':![]}),!![];}async[_0x13751e(0x2fe)](){const _0x130f8a=_0x13751e;if(!this[_0x130f8a(0x7dd)]())return;const _0x6e97a9=_0x130f8a(0x6a4),_0x34317c=0x1,_0x3f7d4e=this[_0x130f8a(0x52a)][_0x130f8a(0x5ab)](_0x6e97a9)??0x0;if(_0x3f7d4e>=_0x34317c)return;const _0x4b2597=_0x19a3aa=>{const _0x12fe1f=_0x130f8a;if(_0x19a3aa===_0x12fe1f(0x3e2))return'single';if(_0x19a3aa==='async')return'fanout';return _0x19a3aa;};await this[_0x130f8a(0x7f8)][_0x130f8a(0x6a1)][_0x130f8a(0x6db)]['transaction'](()=>{const _0x16a4d9=_0x130f8a;for(const _0x583072 of[_0x16a4d9(0x37b),_0x16a4d9(0x776)]){for(const {key:_0x2b032d,value:_0x1c8ab1}of this[_0x16a4d9(0x52a)][_0x16a4d9(0x754)]({'start':_0x583072,'end':_0x583072+'\xff'})){if(typeof _0x2b032d!==_0x16a4d9(0x2b2)||!_0x2b032d[_0x16a4d9(0x5e1)](_0x583072))break;const _0x5b5864=_0x4b2597(_0x1c8ab1[_0x16a4d9(0x419)]);if(_0x5b5864!==_0x1c8ab1[_0x16a4d9(0x419)])this[_0x16a4d9(0x52a)][_0x16a4d9(0x3ba)](_0x2b032d,{..._0x1c8ab1,'mode':_0x5b5864});}}this[_0x16a4d9(0x52a)][_0x16a4d9(0x3ba)](_0x6e97a9,_0x34317c);});}['hasDesired'](){const _0x3834c1=_0x13751e;return!!this[_0x3834c1(0x52a)];}[_0x13751e(0x7b9)](_0x43fe18,_0x23af8f){const _0x216e38=_0x13751e;if(!this[_0x216e38(0x7dd)]())return null;const _0x33b883=_0x43fe18+'/'+_0x23af8f;return this['_refreshDesiredSnapshot'](),this[_0x216e38(0x455)][_0x216e38(0x5ab)](_0x33b883)??this['_desired'][_0x216e38(0x5ab)](_0x33b883)??null;}[_0x13751e(0x786)](){const _0x2739c4=_0x13751e;if(!_0x5a8f6c)return;try{this[_0x2739c4(0x7f8)]['_systemEnv']?.['db']?.[_0x2739c4(0x717)]?.();}catch{}}async['setDesired'](_0xc0abc1,_0x2a1d51,_0x5c6430){const _0x13e273=_0x13751e;if(!this[_0x13e273(0x7dd)]())return null;const _0x585a7b=_0xc0abc1+'/'+_0x2a1d51;this[_0x13e273(0x786)]();const _0x3f51a7=this[_0x13e273(0x455)]['get'](_0x585a7b)??this[_0x13e273(0x52a)][_0x13e273(0x5ab)](_0x585a7b)??{'version':0x0},_0x115722=(_0x3f51a7[_0x13e273(0x24a)]||0x0)+0x1,_0x233259={..._0x3f51a7,..._0x5c6430,'version':_0x115722,'updatedAt':Date['now']()};this[_0x13e273(0x455)]['set'](_0x585a7b,_0x233259);try{await this[_0x13e273(0x7f8)][_0x13e273(0x6a1)][_0x13e273(0x6db)][_0x13e273(0x80c)](()=>{const _0x533e33=_0x13e273;this[_0x533e33(0x52a)][_0x533e33(0x3ba)](_0x585a7b,_0x233259);});}finally{if(this[_0x13e273(0x455)][_0x13e273(0x5ab)](_0x585a7b)===_0x233259)this['_desiredOverlay'][_0x13e273(0x1d4)](_0x585a7b);}return _0x115722;}[_0x13751e(0x7c0)](_0x3e3df3){const _0x5b3e2a=_0x13751e;if(!this[_0x5b3e2a(0x7dd)]())return[];this[_0x5b3e2a(0x786)]();const _0xa80bcc=_0x3e3df3+'/',_0x95395b=[];for(const {key:_0x4780f4,value:_0x5e3d3a}of this['_desired'][_0x5b3e2a(0x754)]({'start':_0xa80bcc,'end':_0xa80bcc+'\xff'})){if(typeof _0x4780f4!==_0x5b3e2a(0x2b2)||!_0x4780f4[_0x5b3e2a(0x5e1)](_0xa80bcc))break;_0x95395b[_0x5b3e2a(0x338)]({'key':_0x4780f4[_0x5b3e2a(0x556)](_0xa80bcc[_0x5b3e2a(0x3be)]),'value':_0x5e3d3a});}return _0x95395b;}['getCmd'](_0x2881e5){const _0x5810a0=_0x13751e;if(!this['_ensureDesired']())return null;return this['_cmd'][_0x5810a0(0x5ab)](_0x2881e5)??null;}async[_0x13751e(0x859)](_0x408b05,_0xee2939,_0x5b6f79={}){const _0x1d8b77=_0x13751e;if(!this[_0x1d8b77(0x7dd)]())return null;let _0x4a96dd;return await this['okdb'][_0x1d8b77(0x6a1)]['_writer'][_0x1d8b77(0x80c)](()=>{const _0x336b0e=_0x1d8b77,_0x4546f4=this['_cmd']['get'](_0x408b05)||{'epoch':0x0};_0x4a96dd=(_0x4546f4[_0x336b0e(0x1ef)]||0x0)+0x1,this[_0x336b0e(0x5f7)][_0x336b0e(0x3ba)](_0x408b05,{..._0x4546f4,..._0x5b6f79,'cmd':_0xee2939,'epoch':_0x4a96dd,'updatedAt':Date[_0x336b0e(0x81b)]()});}),_0x4a96dd;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x5ba604,'nodeKey':_0xf3c481,'logicalKey':_0x1973ae,'slotKey':_0x262a9c,'PROCESS_ENV':_0x54dadb,'NODE_TYPE':_0x34673a},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x51a55a=_0x32d6b8;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x59705a=require$$0$6,{clampTimerDelay:_0x1a4b65}=requireOkdbTimers(),{EVENTS:_0x42e3d1,CHANGE_ACTIONS:_0x17a302}=requireOkdbEnums(),{LOOP:_0x33083f}=requireOkdbLoopMonitor(),_0x1aacc4=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x1a59b9=0x5,_0x24e5bf=0x2710;class _0x8e83ac extends _0x59705a{constructor(_0x1a3e6d,_0xedfc39={}){const _0x2825de=_0x1684;super(),this['okdb']=_0x1a3e6d,this[_0x2825de(0x468)]=_0xedfc39[_0x2825de(0x4ab)]??_0x1aacc4,this[_0x2825de(0x798)]=_0xedfc39[_0x2825de(0x89d)]??_0x1a59b9,this[_0x2825de(0x3a6)]=_0xedfc39['dedupeMax']??_0x24e5bf,this['_started']=![],this['_cursors']=new Map(),this[_0x2825de(0x1e9)]=new Map(),this[_0x2825de(0x8ab)]=new Map(),this[_0x2825de(0x469)]=null,this[_0x2825de(0x1d5)]=![],this[_0x2825de(0x39b)]=new Set(),this[_0x2825de(0x3b6)]=new Set(),this['_onItem']=_0x2d079d=>this[_0x2825de(0x691)](_0x2d079d),this['_onPending']=_0x2ec4c7=>this[_0x2825de(0x605)](_0x2ec4c7),this[_0x2825de(0x640)]=_0x37e652=>this[_0x2825de(0x459)](_0x37e652),this[_0x2825de(0x87c)]=()=>this[_0x2825de(0x3b1)]();}[_0x51a55a(0x1db)](){const _0x3860f5=_0x51a55a;if(this[_0x3860f5(0x41a)])return;this['_started']=!![];for(const [_0x50180c,_0x17c9a4]of this[_0x3860f5(0x7f8)][_0x3860f5(0x828)]){if(_0x50180c[_0x3860f5(0x5e1)]('~'))continue;try{_0x17c9a4['_enableChangelog']();}catch{}}for(const [_0xbc14af,_0x22edc2]of this[_0x3860f5(0x7f8)][_0x3860f5(0x828)]){if(_0xbc14af['startsWith']('~'))continue;try{this[_0x3860f5(0x1e9)][_0x3860f5(0x4dc)](_0xbc14af,_0x22edc2[_0x3860f5(0x78b)]()||0x0);}catch{}}const {events:_0x5b9cd5}=this[_0x3860f5(0x7f8)];_0x5b9cd5['on'](_0x42e3d1['ITEM_PENDING'],this[_0x3860f5(0x43b)]),_0x5b9cd5['on'](_0x42e3d1[_0x3860f5(0x6eb)],this[_0x3860f5(0x4cd)]),_0x5b9cd5['on'](_0x42e3d1[_0x3860f5(0x607)],this[_0x3860f5(0x4cd)]),_0x5b9cd5['on'](_0x42e3d1[_0x3860f5(0x274)],this['_onItem']),_0x5b9cd5['on'](_0x42e3d1['SYSTEM_POKE'],this[_0x3860f5(0x640)]),_0x5b9cd5['once'](_0x42e3d1[_0x3860f5(0x2a4)],this[_0x3860f5(0x87c)]);}[_0x51a55a(0x3b1)](){const _0x4aa85c=_0x51a55a;if(!this['_started'])return;this['_started']=![];const {events:_0x46b54d}=this['okdb'];_0x46b54d['off'](_0x42e3d1[_0x4aa85c(0x32c)],this[_0x4aa85c(0x43b)]),_0x46b54d[_0x4aa85c(0x866)](_0x42e3d1['ITEM_CREATE'],this[_0x4aa85c(0x4cd)]),_0x46b54d[_0x4aa85c(0x866)](_0x42e3d1['ITEM_UPDATE'],this['_onItem']),_0x46b54d[_0x4aa85c(0x866)](_0x42e3d1[_0x4aa85c(0x274)],this[_0x4aa85c(0x4cd)]),_0x46b54d[_0x4aa85c(0x866)](_0x42e3d1['SYSTEM_POKE'],this[_0x4aa85c(0x640)]);try{_0x46b54d[_0x4aa85c(0x866)](_0x42e3d1[_0x4aa85c(0x2a4)],this[_0x4aa85c(0x87c)]);}catch{}this[_0x4aa85c(0x469)]&&(clearTimeout(this[_0x4aa85c(0x469)]),this[_0x4aa85c(0x469)]=null),this[_0x4aa85c(0x8ab)][_0x4aa85c(0x2d8)](),this[_0x4aa85c(0x495)][_0x4aa85c(0x2d8)](),this[_0x4aa85c(0x1e9)][_0x4aa85c(0x2d8)](),this['_seen'][_0x4aa85c(0x2d8)](),this[_0x4aa85c(0x3b6)]['clear']();}['_dedupeKey'](_0xe7bdfa,_0x2fd9bc,_0x286d6c,_0x4f5b25){return _0xe7bdfa+'\x00'+_0x2fd9bc+'\x00'+_0x286d6c+'\x00'+_0x4f5b25;}['_markSeen'](_0x28d866,_0x336424,_0x1ea9b5,_0x2d8ee5){const _0x3e54b6=_0x51a55a,_0x404d9e=this['_dedupeKey'](_0x28d866,_0x336424,_0x1ea9b5,_0x2d8ee5);if(this[_0x3e54b6(0x39b)][_0x3e54b6(0x6f1)](_0x404d9e))return![];this[_0x3e54b6(0x39b)]['add'](_0x404d9e);if(this['_seen']['size']>this[_0x3e54b6(0x3a6)]){const _0x331d9e=this[_0x3e54b6(0x39b)]['values']()[_0x3e54b6(0x868)]()[_0x3e54b6(0x6ba)];this[_0x3e54b6(0x39b)][_0x3e54b6(0x1d4)](_0x331d9e);}return!![];}[_0x51a55a(0x605)](_0xef9a14){const _0x5ebb8b=_0x51a55a;if(!this[_0x5ebb8b(0x41a)]||!_0xef9a14)return;const {env:_0x495525,type:_0x17aa5f,key:_0x588844,clock:_0x1f4746}=_0xef9a14;if(_0x495525==null||_0x17aa5f==null||_0x588844==null)return;if(typeof _0x495525===_0x5ebb8b(0x2b2)&&_0x495525[_0x5ebb8b(0x5e1)]('~'))return;if(typeof _0x17aa5f==='string'&&_0x17aa5f[_0x5ebb8b(0x5e1)]('~'))return;this[_0x5ebb8b(0x3b6)][_0x5ebb8b(0x88a)](this[_0x5ebb8b(0x692)](_0x495525,_0x17aa5f,_0x588844,_0x1f4746)),this['_pendingLocal'][_0x5ebb8b(0x4a8)]>this[_0x5ebb8b(0x3a6)]&&this[_0x5ebb8b(0x3b6)]['delete'](this[_0x5ebb8b(0x3b6)][_0x5ebb8b(0x33f)]()['next']()[_0x5ebb8b(0x6ba)]);}[_0x51a55a(0x691)](_0x1db012){const _0x2958f2=_0x51a55a;if(!this[_0x2958f2(0x41a)]||!_0x1db012)return;const {env:_0xaa75e4,type:_0x332d7,key:_0x39aca5,clock:_0x29e1b5,origin:_0x2697ca,action:_0x453117,newValue:_0x32113f,oldValue:_0x578991}=_0x1db012;if(_0xaa75e4==null||_0x332d7==null||_0x39aca5==null)return;if(typeof _0xaa75e4===_0x2958f2(0x2b2)&&_0xaa75e4[_0x2958f2(0x5e1)]('~'))return;if(typeof _0x332d7===_0x2958f2(0x2b2)&&_0x332d7[_0x2958f2(0x5e1)]('~'))return;this[_0x2958f2(0x3b6)][_0x2958f2(0x1d4)](this[_0x2958f2(0x692)](_0xaa75e4,_0x332d7,_0x39aca5,_0x29e1b5));if(!this[_0x2958f2(0x39a)](_0xaa75e4,_0x332d7,_0x39aca5,_0x29e1b5))return;const _0x54f686=_0x453117===_0x17a302[_0x2958f2(0x4d5)]?'remove':_0x2958f2(0x3ba);this[_0x2958f2(0x6d7)]('change',{'env':_0xaa75e4,'type':_0x332d7,'key':_0x39aca5,'op':_0x54f686,'clock':_0x29e1b5,'origin':_0x2697ca,'value':_0x54f686===_0x2958f2(0x77c)?null:_0x32113f,'prevValue':_0x578991});}[_0x51a55a(0x459)](_0x551188){const _0x373164=_0x51a55a;if(!this[_0x373164(0x41a)])return;if(!_0x551188||typeof _0x551188[_0x373164(0x344)]!==_0x373164(0x2b2)||typeof _0x551188[_0x373164(0x70d)]!==_0x373164(0x2b2))return;const {env:_0x3ac194,type:_0x2985c5}=_0x551188;if(_0x3ac194['startsWith']('~')||_0x2985c5[_0x373164(0x5e1)]('~'))return;this[_0x373164(0x8ab)]['set'](_0x3ac194+'\x00'+_0x2985c5,{'env':_0x3ac194,'type':_0x2985c5}),this[_0x373164(0x64e)]();}[_0x51a55a(0x64e)](){const _0x3784f9=_0x51a55a;if(this[_0x3784f9(0x469)])return;const _0x35888a=()=>{const _0x178afe=_0x3784f9;this[_0x178afe(0x469)]=null,this[_0x178afe(0x646)]()[_0x178afe(0x6ce)](()=>{});};this[_0x3784f9(0x469)]=setTimeout(_0x35888a,_0x1a4b65(this[_0x3784f9(0x798)]));}async['_drain'](){const _0x2979a4=_0x51a55a;if(this['_draining']){this['_scheduleFlush']();return;}this['_draining']=!![];try{const _0x4501de=[...this['_pending']['values']()];this['_pending'][_0x2979a4(0x2d8)]();let _0x3cface=![];for(const {env:_0x5399c4,type:_0x289a32}of _0x4501de){try{const _0x4cb1d4=await this[_0x2979a4(0x5b0)](_0x5399c4,_0x289a32);if(_0x4cb1d4)_0x3cface=!![];}catch{this[_0x2979a4(0x8ab)][_0x2979a4(0x4dc)](_0x5399c4+'\x00'+_0x289a32,{'env':_0x5399c4,'type':_0x289a32}),_0x3cface=!![];}}if(_0x3cface||this['_pending']['size']>0x0)this[_0x2979a4(0x64e)]();}finally{this[_0x2979a4(0x1d5)]=![];}}async[_0x51a55a(0x5b0)](_0x39212c,_0x5d89a8){const _0x322c28=_0x51a55a,_0x5cd70b=await this[_0x322c28(0x7f8)][_0x322c28(0x446)](_0x39212c),_0x57c051=_0x39212c+'\x00'+_0x5d89a8;!this['_cursors'][_0x322c28(0x6f1)](_0x57c051)&&(!this['_baselines']['has'](_0x39212c)&&(_0x5cd70b['_enableChangelog'](),this[_0x322c28(0x1e9)][_0x322c28(0x4dc)](_0x39212c,_0x5cd70b[_0x322c28(0x78b)]()||0x0)),this['_cursors'][_0x322c28(0x4dc)](_0x57c051,this['_baselines'][_0x322c28(0x5ab)](_0x39212c)));const _0x4404d8=this[_0x322c28(0x495)]['get'](_0x57c051),_0x392e4e=_0x5cd70b[_0x322c28(0x78b)](_0x5d89a8)||0x0;if(_0x392e4e<=_0x4404d8)return![];const _0x52372f=_0x4404d8+this[_0x322c28(0x468)],_0x49e596=Math[_0x322c28(0x87d)](_0x392e4e,_0x52372f),_0x590f88=_0x33083f[_0x322c28(0x71f)]?_0x33083f[_0x322c28(0x81b)]():0x0,_0x1e0ade=Array[_0x322c28(0x4e1)](_0x5cd70b[_0x322c28(0x1d2)](_0x5d89a8,_0x4404d8+0x1,_0x49e596));let _0x231814=_0x4404d8;for(const _0x5468d7 of _0x1e0ade){const {clock:_0xffabbe,key:_0x43b2f8,action:_0x36ef95,origin:_0x2b0321}=_0x5468d7;if(_0xffabbe>_0x231814)_0x231814=_0xffabbe;if(_0x43b2f8==null)continue;if(this[_0x322c28(0x3b6)][_0x322c28(0x6f1)](this['_dedupeKey'](_0x39212c,_0x5d89a8,_0x43b2f8,_0xffabbe)))continue;if(!this['_markSeen'](_0x39212c,_0x5d89a8,_0x43b2f8,_0xffabbe))continue;let _0x1ec597,_0x579f8e;if(_0x36ef95===_0x17a302[_0x322c28(0x4d5)])_0x1ec597=_0x322c28(0x77c),_0x579f8e=null;else{const _0x4a1260=_0x5cd70b[_0x322c28(0x5ab)](_0x5d89a8,_0x43b2f8);_0x4a1260==null?(_0x1ec597='remove',_0x579f8e=null):(_0x1ec597=_0x322c28(0x3ba),_0x579f8e=_0x4a1260);}this['emit'](_0x322c28(0x85e),{'env':_0x39212c,'type':_0x5d89a8,'key':_0x43b2f8,'op':_0x1ec597,'clock':_0xffabbe,'origin':_0x2b0321,'value':_0x579f8e});}if(_0x33083f[_0x322c28(0x71f)])_0x33083f[_0x322c28(0x1fc)]('feed:'+_0x39212c+':'+_0x5d89a8,_0x33083f[_0x322c28(0x81b)]()-_0x590f88,'n='+_0x1e0ade['length']);return this['_cursors'][_0x322c28(0x4dc)](_0x57c051,Math['max'](_0x231814,_0x49e596)),_0x5cd70b['getClock'](_0x5d89a8)>_0x49e596;}['status'](){const _0x36d806=_0x51a55a;return{'started':this['_started'],'quantum':this[_0x36d806(0x468)],'flushDebounce':this[_0x36d806(0x798)],'cursors':Object[_0x36d806(0x6e9)]([...this[_0x36d806(0x495)][_0x36d806(0x444)]()]['map'](([_0x25ca64,_0x1e70cf])=>[_0x25ca64['replace']('\x00',':'),_0x1e70cf])),'pending':this['_pending'][_0x36d806(0x4a8)],'seen':this[_0x36d806(0x39b)][_0x36d806(0x4a8)]};}}return _0x8e83ac[_0x51a55a(0x380)]=_0x1aacc4,okdbChangefeed={'OKDBChangefeed':_0x8e83ac},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x27c2aa=_0x32d6b8;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x295369=require$$1$1,_0xe60a7d=require$$1,{EVENTS:_0x911e45}=requireOkdbEnums(),_0x24f099=require$$0,{slotKey:_0x3c0341}=requireOkdbProcessRegistry(),_0x486d70=Number(process.env.OKDB_CLUSTER_RESPAWN_BACKOFF_MS)||0xfa,_0xc46c2d=0xfa0,_0x52400e=0x5,_0x53280a=0x2710,_0x327c02=0xbb8,_0x3b412a=0x7d0,_0x2aa72a=_0x27c2aa(0x29e),_0x3a06b3=_0x27c2aa(0x865),_0xedf38a=_0x27c2aa(0x51a),_0x2c49fc='stats',_0x5536f1=[_0x911e45['VIEW_PROGRESS'],_0x911e45['FTS_REGISTERED'],_0x911e45[_0x27c2aa(0x5f8)],_0x911e45['FTS_RESET'],_0x911e45[_0x27c2aa(0x565)],_0x911e45[_0x27c2aa(0x4b7)],_0x911e45[_0x27c2aa(0x2d0)],_0x911e45[_0x27c2aa(0x50c)],_0x27c2aa(0x327),'processor:progress',_0x27c2aa(0x8b4),_0x27c2aa(0x7d3),_0x27c2aa(0x723),'processor:retry'],_0x1d6028=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0,_0x575e2d=0x64;function _0x2ebf68(_0x2256f2){const _0x26f897=_0x27c2aa;if(!_0x2256f2)return _0x26f897(0x498);const _0x172190=(_0x2256f2[_0x26f897(0x342)]||[])[_0x26f897(0x8bd)](_0x3e6945=>[_0x3e6945['env'],_0x3e6945['id'],_0x3e6945[_0x26f897(0x419)],_0x3e6945[_0x26f897(0x67c)],!!_0x3e6945[_0x26f897(0x4b4)],!!_0x3e6945[_0x26f897(0x76e)],!!_0x3e6945[_0x26f897(0x6c9)],_0x3e6945[_0x26f897(0x597)]?.[_0x26f897(0x5bc)]??null,_0x3e6945[_0x26f897(0x21f)]?String(_0x3e6945['error']?.[_0x26f897(0x439)]??_0x3e6945[_0x26f897(0x21f)]):null]);return JSON[_0x26f897(0x46c)]([!!_0x2256f2[_0x26f897(0x381)],_0x172190]);}function _0x11dfa5({workers:_0x343787,makeOkdb:_0x288823,port:_0x402d21,primaryOkdb:_0x5e97d5,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0x56624a=_0x27c2aa;if(_0x295369[_0x56624a(0x72e)])return childEntry&&_0x295369[_0x56624a(0x6ac)]({'exec':_0xe60a7d[_0x56624a(0x86d)](__dirname,_0x56624a(0x46e)),'args':[],'execArgv':((()=>{const _0x50815f=_0x56624a,_0x210abd=[];for(let _0x3f2303=0x0;_0x3f2303<process[_0x50815f(0x6f3)][_0x50815f(0x3be)];_0x3f2303++){const _0x4182fd=process[_0x50815f(0x6f3)][_0x3f2303];if(_0x4182fd[_0x50815f(0x5e1)](_0x50815f(0x764))||_0x4182fd['startsWith']('--watch')||_0x4182fd['startsWith'](_0x50815f(0x7b4)))continue;if(_0x4182fd==='-e'||_0x4182fd===_0x50815f(0x37f)||_0x4182fd==='-p'||_0x4182fd===_0x50815f(0x2c4)){_0x3f2303++;continue;}_0x210abd[_0x50815f(0x338)](_0x4182fd);}return _0x210abd;})())}),_0x15ea10({'workers':_0x343787,'port':_0x402d21,'primaryOkdb':_0x5e97d5,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x402d21});return _0x4ade57({'makeOkdb':_0x288823,'port':_0x402d21});}function _0x15ea10({workers:_0x1b930a,port:_0x4d2d66,primaryOkdb:_0x5b5c34,workerEnv:_0x2a7571,workerRole:_0x269fc9,listenAddr:_0x544145}){const _0x513267=_0x27c2aa,_0x43f1b9=new Map(),_0x4ad6a0=new Map();let _0x2c0464=![];const _0x36e65a=_0x5810d2=>_0x5810d2?.[_0x513267(0x76f)],_0x5ba029=_0x2dcd75=>{const _0x621007=_0x513267,_0xa8e934=_0x295369[_0x621007(0x59b)]({...process.env,..._0x2a7571||{},'OKDB_CLUSTER_SLOT':String(_0x2dcd75)});return _0xa8e934[_0x621007(0x76f)]=_0x2dcd75,_0x43f1b9[_0x621007(0x4dc)](_0xa8e934[_0x621007(0x7f5)][_0x621007(0x5bc)],{'worker':_0xa8e934,'startedAt':Date[_0x621007(0x81b)](),'slot':_0x2dcd75}),_0xa8e934['on'](_0x621007(0x21f),_0x525e0c=>{const _0x2793f1=_0x621007;console[_0x2793f1(0x51a)](_0x2793f1(0x31b)+_0xa8e934[_0x2793f1(0x7f5)][_0x2793f1(0x5bc)]+_0x2793f1(0x89a)+(_0x525e0c?.['message']??_0x525e0c));}),_0xa8e934['on']('online',()=>_0x898948()),_0xa8e934;},_0x231a16=_0x51f56d=>{const _0x440d9a=_0x513267;for(const {worker:_0x3b67c5}of _0x43f1b9[_0x440d9a(0x33f)]()){if(_0x3b67c5[_0x440d9a(0x8bc)]()||!_0x3b67c5['isConnected']())continue;try{_0x3b67c5['send'](_0x51f56d);}catch{}}};_0x5b5c34?.[_0x513267(0x460)]?.({'kind':'primary','listenAddr':_0x544145})['catch'](()=>{}),_0x5b5c34?.[_0x513267(0x317)]?.[_0x513267(0x4c5)]?.({'workersConfigured':_0x1b930a});const _0x474c7d={'engines':!![],'processors':!![],'compaction':!![],..._0x269fc9,'http':!![]},_0x898948=()=>{const _0x5157e7=_0x513267,_0x78738b=_0x5b5c34?.[_0x5157e7(0x317)];if(!_0x78738b||!_0x78738b['_isWriter'])return;const _0x411ea0=_0x78738b[_0x5157e7(0x5b2)];for(const {worker:_0x35687d,startedAt:_0x47051e,slot:_0x277b42,stats:_0x2a33b5,processing:_0x12624f}of _0x43f1b9[_0x5157e7(0x33f)]()){if(_0x35687d[_0x5157e7(0x8bc)]())continue;const _0x1f785d=_0x78738b[_0x5157e7(0x2a7)]?.()&&_0x78738b['getDesired'](_0x5157e7(0x5e7),_0x5c238a(_0x277b42))?.[_0x5157e7(0x2ee)]===!![];_0x78738b[_0x5157e7(0x514)]({'pid':_0x35687d[_0x5157e7(0x7f5)][_0x5157e7(0x5bc)],'startedAt':_0x47051e,'kind':_0x5157e7(0x563),'supervisorKey':_0x411ea0,'slot':_0x277b42,'slotKey':_0x5c238a(_0x277b42),'role':_0x474c7d,'listenAddr':_0x544145,'lifecycle':_0x1f785d?_0x5157e7(0x2e7):_0x5157e7(0x412),'processing':_0x12624f??null,'stats':_0x2a33b5??null})[_0x5157e7(0x6ce)](()=>{});}},_0x5c238a=_0x3ca277=>_0x3c0341('cluster:'+_0x4d2d66,_0x3ca277),_0x3f6bb1=_0x3a74ec=>{const _0x14a65a=_0x513267,_0x531fa8=_0x5b5c34?.[_0x14a65a(0x317)];if(!_0x531fa8?.['hasDesired']?.())return![];return _0x531fa8[_0x14a65a(0x7b9)](_0x14a65a(0x5e7),_0x5c238a(_0x3a74ec))?.[_0x14a65a(0x2ee)]===!![];};for(let _0x36b20a=0x0;_0x36b20a<_0x1b930a;_0x36b20a++){const _0x5b61aa=_0x3f6bb1(_0x36b20a);_0x4ad6a0['set'](_0x36b20a,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x5b61aa,'respawnTimer':null}),_0x5b61aa?console[_0x513267(0x51a)](_0x513267(0x1ce)+_0x36b20a+_0x513267(0x531)):_0x5ba029(_0x36b20a);}const _0x5599c3=()=>{const _0xdf1d6e=_0x513267,_0x3b4fd0=_0x5b5c34?.[_0xdf1d6e(0x317)];if(!_0x3b4fd0?.[_0xdf1d6e(0x6d0)]||!_0x3b4fd0[_0xdf1d6e(0x2a7)]?.())return;for(const [_0x115dc9,_0x2e15f8]of _0x4ad6a0[_0xdf1d6e(0x444)]()){const _0xfa3d62=_0x3b4fd0['getDesired'](_0xdf1d6e(0x5e7),_0x5c238a(_0x115dc9)),_0x51937d=_0xfa3d62?.[_0xdf1d6e(0x2ee)]===!![],_0x4b1733=_0xfa3d62?.[_0xdf1d6e(0x6a0)]===!![];if(_0x51937d&&!_0x2e15f8['dead']){_0x2e15f8['dead']=!![];_0x2e15f8[_0xdf1d6e(0x1b2)]&&(clearTimeout(_0x2e15f8[_0xdf1d6e(0x1b2)]),_0x2e15f8[_0xdf1d6e(0x1b2)]=null);for(const {worker:_0x465b53}of _0x43f1b9[_0xdf1d6e(0x33f)]()){if(_0x36e65a(_0x465b53)!==_0x115dc9||_0x465b53[_0xdf1d6e(0x8bc)]())continue;try{if(_0x4b1733)_0x465b53[_0xdf1d6e(0x7f5)][_0xdf1d6e(0x6a0)]('SIGKILL');else _0x465b53['isConnected']()&&_0x465b53[_0xdf1d6e(0x5a2)]();}catch{}}console[_0xdf1d6e(0x51a)](_0xdf1d6e(0x1da)+(_0x4b1733?'hard-killed':_0xdf1d6e(0x499))+_0xdf1d6e(0x7ee)+_0x115dc9+_0xdf1d6e(0x49e));}else{if(!_0x51937d&&_0x2e15f8[_0xdf1d6e(0x503)]&&_0xfa3d62){_0x2e15f8['dead']=![],_0x2e15f8[_0xdf1d6e(0x89e)]=[],_0x2e15f8['consecutiveFailures']=0x0;const _0x1e23a3=[..._0x43f1b9[_0xdf1d6e(0x33f)]()]['some'](({worker:_0x20df21})=>_0x36e65a(_0x20df21)===_0x115dc9&&!_0x20df21['isDead']());!_0x1e23a3&&!_0x2c0464&&(_0x5ba029(_0x115dc9),console[_0xdf1d6e(0x51a)](_0xdf1d6e(0x6fd)+_0x115dc9));}}}},_0x4c1f5a=()=>{try{_0x5599c3();}catch{}};_0x5b5c34?.[_0x513267(0x791)]?.['on']?.(_0x911e45[_0x513267(0x375)],_0x4c1f5a);const _0x3f6f65=[];if(_0x5b5c34?.['events']?.['on'])for(const _0x109089 of _0x5536f1){const _0x2a4ecf=_0x1a734a=>{_0x231a16({[_0x2aa72a]:_0x3a06b3,'event':_0x109089,'data':_0x1a734a??{}});};_0x5b5c34['events']['on'](_0x109089,_0x2a4ecf),_0x3f6f65[_0x513267(0x338)]({'event':_0x109089,'handler':_0x2a4ecf});}const _0x13e42c=setInterval(()=>{_0x5599c3(),_0x898948();},_0x1d6028);_0x13e42c['unref']?.();const _0x38079e=(_0x3e2b24,_0x34f767)=>{const _0x3b1d5c=_0x513267;if(!_0x34f767||typeof _0x34f767!==_0x3b1d5c(0x320)||_0x34f767[_0x2aa72a]!==_0xedf38a)return;if(!_0x5b5c34?.[_0x3b1d5c(0x51a)]?.['ingest'])return;const _0x29dd41=_0x34f767['entry']||{};_0x5b5c34[_0x3b1d5c(0x51a)][_0x3b1d5c(0x6d5)]({..._0x29dd41,'msg':'[w'+_0x34f767['slot']+']\x20'+(_0x29dd41[_0x3b1d5c(0x758)]??''),'meta':{..._0x29dd41[_0x3b1d5c(0x49b)]||{},'worker':_0x34f767[_0x3b1d5c(0x5e7)],'workerPid':_0x34f767[_0x3b1d5c(0x5bc)]}});};_0x295369['on'](_0x513267(0x439),_0x38079e);const _0x3380e7=(_0x4c8eda,_0x6477f2)=>{const _0xe48241=_0x513267;if(!_0x6477f2||typeof _0x6477f2!==_0xe48241(0x320)||_0x6477f2[_0x2aa72a]!==_0x2c49fc)return;const _0x5014f6=_0x43f1b9['get'](_0x4c8eda[_0xe48241(0x7f5)]['pid']);if(_0x5014f6){_0x5014f6[_0xe48241(0x5f2)]={..._0x6477f2[_0xe48241(0x5f2)],'at':Date[_0xe48241(0x81b)]()};if(_0x6477f2[_0xe48241(0x1d9)]!==undefined){const _0x12f1f2=_0x2ebf68(_0x6477f2[_0xe48241(0x1d9)]);_0x12f1f2!==_0x5014f6[_0xe48241(0x57a)]&&(_0x5014f6[_0xe48241(0x57a)]=_0x12f1f2,_0x51c45b()),_0x5014f6[_0xe48241(0x1d9)]=_0x6477f2[_0xe48241(0x1d9)];}}};let _0x2d13d9=null;const _0x51c45b=()=>{if(_0x2d13d9||_0x2c0464)return;_0x2d13d9=setTimeout(()=>{_0x2d13d9=null;if(!_0x2c0464)_0x898948();},_0x575e2d),_0x2d13d9['unref']?.();};_0x295369['on'](_0x513267(0x439),_0x3380e7),_0x295369['on'](_0x513267(0x56e),(_0x45d995,_0x46a785,_0x21caf1)=>{const _0x4410e2=_0x513267,_0x297575=_0x45d995['process']['pid'],_0x3acf2f=_0x36e65a(_0x45d995),_0x124041=_0x43f1b9[_0x4410e2(0x5ab)](_0x297575);if(_0x124041&&_0x5b5c34?.[_0x4410e2(0x317)])_0x5b5c34['processes'][_0x4410e2(0x5ec)](_0x297575+':'+_0x124041[_0x4410e2(0x527)])[_0x4410e2(0x6ce)](()=>{});_0x43f1b9['delete'](_0x297575),console[_0x4410e2(0x51a)](_0x4410e2(0x31b)+_0x297575+_0x4410e2(0x48e)+(_0x3acf2f??'?')+')\x20exited\x20'+(_0x4410e2(0x578)+_0x46a785+',\x20signal='+(_0x21caf1??_0x4410e2(0x428))+_0x4410e2(0x25d)+_0x43f1b9[_0x4410e2(0x4a8)]+_0x4410e2(0x371))),_0x898948();if(_0x2c0464||_0x3acf2f==null)return;const _0x45b7ed=_0x4ad6a0['get'](_0x3acf2f);if(!_0x45b7ed||_0x45b7ed[_0x4410e2(0x503)])return;const _0x361580=Date['now']();_0x45b7ed[_0x4410e2(0x89e)][_0x4410e2(0x338)](_0x361580),_0x45b7ed[_0x4410e2(0x89e)]=_0x45b7ed[_0x4410e2(0x89e)][_0x4410e2(0x49c)](_0x29afe9=>_0x361580-_0x29afe9<=_0x53280a);if(_0x45b7ed[_0x4410e2(0x89e)][_0x4410e2(0x3be)]>=_0x52400e){_0x45b7ed[_0x4410e2(0x503)]=!![],console[_0x4410e2(0x21f)](_0x4410e2(0x1b3)+_0x3acf2f+_0x4410e2(0x84b)+_0x45b7ed[_0x4410e2(0x89e)][_0x4410e2(0x3be)]+_0x4410e2(0x3b5)+(_0x53280a+_0x4410e2(0x325)+_0x43f1b9['size']+_0x4410e2(0x4c7)));return;}_0x45b7ed[_0x4410e2(0x2bf)]++;const _0x3028b7=Math['min'](_0xc46c2d,_0x486d70*0x2**(_0x45b7ed['consecutiveFailures']-0x1));console['log']('[okdb-cluster]\x20respawning\x20worker\x20slot='+_0x3acf2f+_0x4410e2(0x6bf)+_0x3028b7+_0x4410e2(0x842)+_0x45b7ed[_0x4410e2(0x2bf)]+')'),_0x45b7ed[_0x4410e2(0x1b2)]=setTimeout(()=>{const _0x2be2e9=_0x4410e2;_0x45b7ed[_0x2be2e9(0x1b2)]=null;if(_0x2c0464||_0x45b7ed[_0x2be2e9(0x503)])return;const _0x390d72=_0x5ba029(_0x3acf2f);_0x390d72[_0x2be2e9(0x405)](_0x2be2e9(0x51d),()=>{const _0x35a159=_0x2be2e9;if(_0x4ad6a0[_0x35a159(0x5ab)](_0x3acf2f)===_0x45b7ed)_0x45b7ed['consecutiveFailures']=0x0;});},_0x3028b7),_0x45b7ed[_0x4410e2(0x1b2)][_0x4410e2(0x5e0)]?.();});const _0x57750c=[..._0x43f1b9['keys']()];console[_0x513267(0x51a)](_0x513267(0x2d2)+process[_0x513267(0x5bc)]+_0x513267(0x743)+_0x1b930a+'\x20HTTP\x20server(s)\x20on\x20port\x20'+_0x4d2d66+':\x20'+('['+_0x57750c[_0x513267(0x86d)](',\x20')+']'));const _0x2945f0={'_isClusterController':!![],'port':_0x4d2d66,'primaryOkdb':_0x5b5c34??null,'status'(){const _0x1788a8=_0x513267;return{'clustered':!![],'primaryPid':process[_0x1788a8(0x5bc)],'port':_0x4d2d66,'primaryRole':_0x5b5c34?.[_0x1788a8(0x32e)]??null,'processorPid':null,'supervisorPid':process['pid'],'workers':[..._0x43f1b9[_0x1788a8(0x33f)]()]['map'](({worker:_0x28ffed})=>({'pid':_0x28ffed[_0x1788a8(0x7f5)][_0x1788a8(0x5bc)],'id':_0x28ffed['id'],'dead':_0x28ffed[_0x1788a8(0x8bc)]()}))};},async 'close'(){const _0x5ab8d8=_0x513267;_0x2c0464=!![];for(const _0x4b2918 of _0x4ad6a0[_0x5ab8d8(0x33f)]()){_0x4b2918[_0x5ab8d8(0x503)]=!![],_0x4b2918[_0x5ab8d8(0x1b2)]&&(clearTimeout(_0x4b2918[_0x5ab8d8(0x1b2)]),_0x4b2918[_0x5ab8d8(0x1b2)]=null);}clearInterval(_0x13e42c);_0x2d13d9&&(clearTimeout(_0x2d13d9),_0x2d13d9=null);_0x295369['off'](_0x5ab8d8(0x439),_0x38079e),_0x295369[_0x5ab8d8(0x866)](_0x5ab8d8(0x439),_0x3380e7),_0x5b5c34?.['events']?.[_0x5ab8d8(0x866)]?.(_0x911e45[_0x5ab8d8(0x375)],_0x4c1f5a);if(_0x5b5c34?.['events']?.[_0x5ab8d8(0x866)])for(const {event:_0x494dfe,handler:_0x260725}of _0x3f6f65){try{_0x5b5c34[_0x5ab8d8(0x791)][_0x5ab8d8(0x866)](_0x494dfe,_0x260725);}catch{}}_0x3f6f65['length']=0x0;const _0x4418b3=[..._0x43f1b9[_0x5ab8d8(0x33f)]()][_0x5ab8d8(0x8bd)](({worker:_0x4beefd})=>_0x4beefd);if(_0x4418b3['length']===0x0)return;await Promise[_0x5ab8d8(0x75b)](_0x4418b3[_0x5ab8d8(0x8bd)](_0x1e4ed6=>new Promise(_0x2f6246=>{const _0x29d4a1=_0x5ab8d8;if(_0x1e4ed6['isDead']()){_0x2f6246();return;}let _0x378369=![];const _0x16663b=()=>{if(_0x378369)return;_0x378369=!![];if(_0x3b6802)clearTimeout(_0x3b6802);_0x2f6246();};_0x1e4ed6[_0x29d4a1(0x405)]('exit',_0x16663b);const _0x3b6802=setTimeout(()=>{const _0x157187=_0x29d4a1;try{_0x1e4ed6[_0x157187(0x7f5)][_0x157187(0x6a0)]();}catch{}},_0x327c02+0x1f4);_0x3b6802['unref']?.();try{_0x1e4ed6[_0x29d4a1(0x5a2)]();}catch{try{_0x1e4ed6[_0x29d4a1(0x7f5)][_0x29d4a1(0x6a0)]();}catch{}}})));}};return _0x2945f0;}async function _0x4ade57({makeOkdb:_0x4efb75,port:_0x52a6b4}){const _0x323dd3=_0x27c2aa,_0x51c3f6=await _0x4efb75();return _0x3fe37f(_0x51c3f6),_0x51c3f6['http'][_0x323dd3(0x4bc)](_0x52a6b4);}function _0x3fe37f(_0x206c0c){const _0x100370=_0x27c2aa;if(!_0x206c0c||_0x206c0c[_0x100370(0x83e)])return;_0x206c0c[_0x100370(0x83e)]=!![];try{const {OKDBChangefeed:_0x341b23}=requireOkdbChangefeed(),_0x2d2c6d=_0x206c0c['_adminRelay'];if(_0x2d2c6d&&typeof _0x2d2c6d[_0x100370(0x256)]==='function'){const _0x57a902=new _0x341b23(_0x206c0c);_0x57a902['start'](),_0x2d2c6d[_0x100370(0x256)](_0x57a902),_0x206c0c[_0x100370(0x625)]=_0x57a902;}}catch(_0x5e8e21){_0x206c0c[_0x100370(0x51a)]?.['warn']?.(_0x100370(0x3ab)+(_0x5e8e21?.['message']??_0x5e8e21),{'feature':_0x100370(0x759)});}const _0xf1916d=_0x340f05=>{const _0x101500=_0x100370;if(!_0x340f05||typeof _0x340f05!=='object'||_0x340f05[_0x2aa72a]==null)return;if(_0x340f05[_0x2aa72a]===_0x3a06b3)try{_0x206c0c[_0x101500(0x387)]?.[_0x101500(0x3c2)]?.(_0x340f05['event'],_0x340f05['data']);}catch{}};process['on']('message',_0xf1916d),_0x206c0c[_0x100370(0x33e)]=_0xf1916d;{let _0x30220d=process[_0x100370(0x705)](),_0x482bcc=Date[_0x100370(0x81b)]();const _0x6828d0=()=>{const _0x2bb0f9=_0x100370;if(typeof process[_0x2bb0f9(0x3d8)]!=='function'||!process[_0x2bb0f9(0x298)])return;const _0x2d6af2=Date[_0x2bb0f9(0x81b)](),_0x5c004e=process[_0x2bb0f9(0x705)](),_0x3adc82=(_0x2d6af2-_0x482bcc)*0x3e8,_0x1d36f8=_0x5c004e[_0x2bb0f9(0x1bc)]-_0x30220d[_0x2bb0f9(0x1bc)]+(_0x5c004e[_0x2bb0f9(0x1c8)]-_0x30220d['system']),_0x577061=_0x3adc82>0x0?Math[_0x2bb0f9(0x87d)](0x64,Math[_0x2bb0f9(0x283)](_0x1d36f8/(_0x3adc82*(_0x24f099[_0x2bb0f9(0x3f2)]()[_0x2bb0f9(0x3be)]||0x1))*0x64)):0x0;_0x30220d=_0x5c004e,_0x482bcc=_0x2d6af2;const _0x55dab5=process[_0x2bb0f9(0x63d)]();let _0x3c4e8a=null;try{_0x3c4e8a=_0x206c0c[_0x2bb0f9(0x32e)]?.['processors']?_0x206c0c['processes']?.[_0x2bb0f9(0x269)]?.()??null:null;}catch{}try{process[_0x2bb0f9(0x3d8)]({[_0x2aa72a]:_0x2c49fc,'stats':{'rss':_0x55dab5[_0x2bb0f9(0x2d9)],'heapUsed':_0x55dab5[_0x2bb0f9(0x891)],'heapTotal':_0x55dab5['heapTotal'],'external':_0x55dab5['external'],'cpuPct':_0x577061,'cpuWindowMs':Math[_0x2bb0f9(0x283)](_0x3adc82/0x3e8)||null},'processing':_0x3c4e8a});}catch{}},_0x2f360f=Math[_0x100370(0x321)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x56074a=setInterval(_0x6828d0,_0x2f360f);_0x56074a[_0x100370(0x5e0)]?.(),_0x6828d0();for(const _0x4ed114 of[_0x100370(0x7d3),_0x100370(0x723)]){_0x206c0c['events']?.['on']?.(_0x4ed114,()=>{try{_0x6828d0();}catch{}});}}let _0x2a7e37=![];const _0xbd79e8=async _0x5d3f3e=>{const _0x13dd94=_0x100370;if(_0x2a7e37)return;_0x2a7e37=!![];const _0x389d79=setTimeout(()=>process[_0x13dd94(0x56e)](_0x5d3f3e),_0x327c02);_0x389d79[_0x13dd94(0x5e0)]?.();try{await _0x206c0c[_0x13dd94(0x55c)]?.();}catch{}process[_0x13dd94(0x56e)](_0x5d3f3e);};process['on']('disconnect',()=>_0xbd79e8(0x0));if(process['send']&&!process[_0x100370(0x298)])_0xbd79e8(0x0);if(process['platform']!==_0x100370(0x61d)){const _0x217879=setInterval(()=>{const _0x5b179d=_0x100370;if(process[_0x5b179d(0x4ad)]===0x1)_0xbd79e8(0x0);},_0x3b412a);_0x217879['unref']?.(),_0x206c0c['_clusterOrphanWatch']=_0x217879;}}return okdbCluster={'runClustered':_0x11dfa5,'attachWorkerCluster':_0x3fe37f},okdbCluster;}var okdbHttp={'exports':{}},okdbMetrics,hasRequiredOkdbMetrics;function requireOkdbMetrics(){const _0x2d6f81=_0x32d6b8;if(hasRequiredOkdbMetrics)return okdbMetrics;hasRequiredOkdbMetrics=0x1;const _0x44f88c=0x3c;function _0x1c9d6c(){return{'requests':0x0,'reads':0x0,'writes':0x0,'errors':0x0,'readMs':0x0,'writeMs':0x0};}class _0x172da7{constructor(){const _0x20e2cf=_0x1684;this['_totalRequests']=0x0,this[_0x20e2cf(0x290)]=0x0,this[_0x20e2cf(0x5cb)]=0x0,this['_totalErrors']=0x0,this[_0x20e2cf(0x577)]=0x0,this[_0x20e2cf(0x77f)]=0x0,this[_0x20e2cf(0x6da)]=Array['from']({'length':_0x44f88c},_0x1c9d6c),this['_bucketIdx']=0x0,this[_0x20e2cf(0x250)]=Date['now'](),this[_0x20e2cf(0x3e9)]=setInterval(()=>this[_0x20e2cf(0x856)](),0x3e8);if(this[_0x20e2cf(0x3e9)]['unref'])this[_0x20e2cf(0x3e9)]['unref']();}[_0x2d6f81(0x856)](){const _0x30be9f=_0x2d6f81;this[_0x30be9f(0x3c9)]=(this[_0x30be9f(0x3c9)]+0x1)%_0x44f88c,this['_buckets'][this['_bucketIdx']]=_0x1c9d6c(),this[_0x30be9f(0x250)]=Date[_0x30be9f(0x81b)]();}[_0x2d6f81(0x637)](_0x302a18,_0xa53a23,_0x50efd0){const _0x5cd072=_0x2d6f81,_0xc43ef1=/^(POST|PUT|PATCH|DELETE)$/i[_0x5cd072(0x27f)](_0x302a18),_0x4fa436=this[_0x5cd072(0x6da)][this[_0x5cd072(0x3c9)]];this[_0x5cd072(0x783)]++,_0x4fa436[_0x5cd072(0x43d)]++,_0x50efd0&&(this[_0x5cd072(0x82e)]++,_0x4fa436['errors']++),_0xc43ef1?(this[_0x5cd072(0x5cb)]++,this[_0x5cd072(0x77f)]+=_0xa53a23,_0x4fa436[_0x5cd072(0x5cc)]++,_0x4fa436[_0x5cd072(0x5ed)]+=_0xa53a23):(this[_0x5cd072(0x290)]++,this[_0x5cd072(0x577)]+=_0xa53a23,_0x4fa436[_0x5cd072(0x63b)]++,_0x4fa436['readMs']+=_0xa53a23);}[_0x2d6f81(0x5f2)](){const _0x4b5ef5=_0x2d6f81;let _0x1566f6=0x0,_0x132b1e=0x0,_0x3b80b8=0x0,_0xc3099c=0x0,_0x47e831=0x0,_0x8e3d26=0x0;for(const _0x1039e6 of this[_0x4b5ef5(0x6da)]){_0x1566f6+=_0x1039e6[_0x4b5ef5(0x43d)],_0x132b1e+=_0x1039e6[_0x4b5ef5(0x63b)],_0x3b80b8+=_0x1039e6[_0x4b5ef5(0x5cc)],_0xc3099c+=_0x1039e6['errors'],_0x47e831+=_0x1039e6[_0x4b5ef5(0x767)],_0x8e3d26+=_0x1039e6[_0x4b5ef5(0x5ed)];}const _0x237014=_0x44f88c;return{'lifetime':{'requests':this[_0x4b5ef5(0x783)],'reads':this[_0x4b5ef5(0x290)],'writes':this['_totalWrites'],'errors':this[_0x4b5ef5(0x82e)],'avgReadMs':this[_0x4b5ef5(0x290)]>0x0?+(this[_0x4b5ef5(0x577)]/this['_totalReads'])[_0x4b5ef5(0x849)](0x2):null,'avgWriteMs':this['_totalWrites']>0x0?+(this[_0x4b5ef5(0x77f)]/this[_0x4b5ef5(0x5cb)])[_0x4b5ef5(0x849)](0x2):null},'window':{'seconds':_0x237014,'requests':_0x1566f6,'reads':_0x132b1e,'writes':_0x3b80b8,'errors':_0xc3099c,'reqPerSec':+(_0x1566f6/_0x237014)[_0x4b5ef5(0x849)](0x2),'readPerSec':+(_0x132b1e/_0x237014)[_0x4b5ef5(0x849)](0x2),'writePerSec':+(_0x3b80b8/_0x237014)[_0x4b5ef5(0x849)](0x2),'avgReadMs':_0x132b1e>0x0?+(_0x47e831/_0x132b1e)[_0x4b5ef5(0x849)](0x2):null,'avgWriteMs':_0x3b80b8>0x0?+(_0x8e3d26/_0x3b80b8)[_0x4b5ef5(0x849)](0x2):null}};}[_0x2d6f81(0x55c)](){const _0x46ba44=_0x2d6f81;clearInterval(this[_0x46ba44(0x3e9)]);}}return okdbMetrics=_0x172da7,okdbMetrics;}var okdbAuthNamespaces,hasRequiredOkdbAuthNamespaces;function requireOkdbAuthNamespaces(){const _0xc8ff78=_0x32d6b8;if(hasRequiredOkdbAuthNamespaces)return okdbAuthNamespaces;hasRequiredOkdbAuthNamespaces=0x1;const _0x87086b={'data':{'label':_0xc8ff78(0x2fc),'scope':_0xc8ff78(0x344),'description':_0xc8ff78(0x6f5),'operations':{'read':{'label':_0xc8ff78(0x53c),'summary':_0xc8ff78(0x852)},'write':{'label':_0xc8ff78(0x610),'summary':_0xc8ff78(0x50d)}}},'schema':{'label':_0xc8ff78(0x225),'scope':_0xc8ff78(0x344),'description':'Type\x20definitions,\x20all\x20index\x20registrations\x20(byIndex,\x20FTS,\x20vector),\x20and\x20TTL\x20policy.','operations':{'read':{'label':_0xc8ff78(0x53c),'summary':_0xc8ff78(0x5bf)},'write':{'label':_0xc8ff78(0x610),'summary':'Register/update/delete\x20types,\x20register/drop/rebuild\x20indexes,\x20set\x20TTL\x20policy.'}}},'search':{'label':'Search','scope':_0xc8ff78(0x344),'description':_0xc8ff78(0x45d),'operations':{'query':{'label':_0xc8ff78(0x1ae),'summary':_0xc8ff78(0x536)}}},'queue':{'label':_0xc8ff78(0x4fd),'scope':_0xc8ff78(0x344),'description':_0xc8ff78(0x738),'operations':{'read':{'label':'Read','summary':_0xc8ff78(0x78a)},'write':{'label':'Write','summary':_0xc8ff78(0x6e3)},'work':{'label':_0xc8ff78(0x3ef),'summary':_0xc8ff78(0x6a3)}}},'files':{'label':_0xc8ff78(0x54e),'scope':'env','description':_0xc8ff78(0x42d),'operations':{'read':{'label':_0xc8ff78(0x53c),'summary':_0xc8ff78(0x1e7)},'write':{'label':'Write','summary':_0xc8ff78(0x77a)}}},'functions':{'label':_0xc8ff78(0x21c),'scope':_0xc8ff78(0x344),'description':_0xc8ff78(0x237),'operations':{'read':{'label':_0xc8ff78(0x53c),'summary':'List\x20functions\x20and\x20inspect\x20their\x20source.'},'write':{'label':_0xc8ff78(0x610),'summary':_0xc8ff78(0x384)},'run':{'label':_0xc8ff78(0x26d),'summary':_0xc8ff78(0x86e)}}},'views':{'label':'Views','scope':_0xc8ff78(0x344),'description':_0xc8ff78(0x443),'operations':{'read':{'label':'Read','summary':_0xc8ff78(0x7a3)},'write':{'label':'Write','summary':_0xc8ff78(0x2e5)}}},'env':{'label':_0xc8ff78(0x43f),'scope':'env','description':_0xc8ff78(0x47b),'operations':{'read':{'label':_0xc8ff78(0x53c),'summary':'List\x20environments\x20and\x20read\x20environment\x20info.'},'write':{'label':_0xc8ff78(0x610),'summary':_0xc8ff78(0x45f)}}},'auth':{'label':_0xc8ff78(0x727),'scope':'system','description':_0xc8ff78(0x4a7),'operations':{'read':{'label':_0xc8ff78(0x53c),'summary':'List\x20tokens\x20and\x20users.'},'write':{'label':_0xc8ff78(0x610),'summary':_0xc8ff78(0x65f)}}},'system':{'label':_0xc8ff78(0x227),'scope':'system','description':_0xc8ff78(0x234),'operations':{'read':{'label':_0xc8ff78(0x53c),'summary':_0xc8ff78(0x821)},'write':{'label':'Write','summary':_0xc8ff78(0x271)}}},'sync':{'label':'Sync','scope':_0xc8ff78(0x1c8),'description':'Cluster\x20replication.\x20The\x20\x22peer\x22\x20op\x20is\x20for\x20cluster\x20nodes,\x20not\x20human\x20users.','operations':{'read':{'label':_0xc8ff78(0x53c),'summary':_0xc8ff78(0x69a)},'write':{'label':'Write','summary':'Register,\x20configure,\x20and\x20remove\x20cluster\x20peers.'},'peer':{'label':_0xc8ff78(0x26b),'summary':_0xc8ff78(0x329),'machineOnly':!![]}}},'protected':{'label':_0xc8ff78(0x6a8),'scope':_0xc8ff78(0x365),'description':'Gate\x20flag\x20required\x20to\x20touch\x20system\x20types\x20(those\x20whose\x20name\x20starts\x20with\x20\x22~\x22).\x20Combined\x20with\x20the\x20underlying\x20namespace\x20permission.','operations':{'read':{'label':_0xc8ff78(0x53c),'summary':'May\x20read\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20read\x20permission.'},'write':{'label':'Write','summary':_0xc8ff78(0x331)}}}},_0x3189b0={'schema:read':[_0xc8ff78(0x5b9),_0xc8ff78(0x2e9),'search:query']},_0x56d511=[_0xc8ff78(0x86a),_0xc8ff78(0x74e),'run',_0xc8ff78(0x6d4),'work',_0xc8ff78(0x487)];function _0x7f2ebf(){const _0x32f9e9=[];for(const [_0x12ced6,_0x75f0d6]of Object['entries'](_0x87086b)){for(const _0x3a5738 of Object['keys'](_0x75f0d6['operations'])){_0x32f9e9['push'](_0x12ced6+':'+_0x3a5738);}}return _0x32f9e9;}function _0x5d9442(_0xc4dbf2){return _0x87086b[_0xc4dbf2]||null;}function _0x16a34a(_0x308307,_0x40753d){const _0x101d1a=_0xc8ff78;return _0x87086b[_0x308307]?.[_0x101d1a(0x6f7)][_0x40753d]||null;}return okdbAuthNamespaces={'NAMESPACES':_0x87086b,'IMPLIED_BY':_0x3189b0,'OP_ORDER':_0x56d511,'listAllPermissions':_0x7f2ebf,'getNamespaceMeta':_0x5d9442,'getOperationMeta':_0x16a34a},okdbAuthNamespaces;}var okdbAuthPermissions,hasRequiredOkdbAuthPermissions;function requireOkdbAuthPermissions(){const _0x394c03=_0x32d6b8;if(hasRequiredOkdbAuthPermissions)return okdbAuthPermissions;hasRequiredOkdbAuthPermissions=0x1;const {IMPLIED_BY:_0xf1f910}=requireOkdbAuthNamespaces(),_0x53c855=new Set([_0x394c03(0x86a),_0x394c03(0x74e)]);function _0x64fc72(_0x4e6874,_0x15e228){const _0x5e64f8=_0x394c03;if(!Array[_0x5e64f8(0x590)](_0x4e6874)||_0x4e6874[_0x5e64f8(0x3be)]===0x0)return![];for(const _0x26e624 of _0x4e6874){if(typeof _0x26e624!==_0x5e64f8(0x2b2)||!_0x26e624['includes'](':')){if(_0x26e624==='*')return!![];continue;}const [_0x17457e,_0x347197]=_0x26e624[_0x5e64f8(0x735)](':'),[_0x1fc2fd,_0x41d427]=_0x15e228['split'](':'),_0x30885a=_0x17457e==='*'||_0x17457e===_0x1fc2fd,_0x24c3e7=_0x347197==='*'||_0x347197===_0x41d427;if(_0x30885a&&_0x24c3e7)return!![];}const _0x3b268c=_0xf1f910[_0x15e228];if(_0x3b268c)for(const _0x280679 of _0x3b268c){if(_0x64fc72(_0x4e6874,_0x280679))return!![];}return![];}function _0x351d55(_0x21f88f,_0x1b86c4){const _0x30c4f5=_0x394c03,_0x44fa56=new Set();if(Array[_0x30c4f5(0x590)](_0x21f88f)){for(const _0x337ba6 of _0x21f88f)_0x44fa56[_0x30c4f5(0x88a)](_0x337ba6);}if(Array[_0x30c4f5(0x590)](_0x1b86c4)){for(const _0x15140d of _0x1b86c4)_0x44fa56['add'](_0x15140d);}return Array[_0x30c4f5(0x4e1)](_0x44fa56);}function _0x384fcd(_0x5ab63c){const _0x22311c=_0x394c03;if(typeof _0x5ab63c!=='string')return![];const [,_0x294843]=_0x5ab63c[_0x22311c(0x735)](':');return _0x53c855['has'](_0x294843);}function _0x2e41d2(_0x47fdcd){const _0x4a2c49=_0x394c03;return _0x384fcd(_0x47fdcd)?'protected:read':_0x4a2c49(0x5af);}function _0x2bfc24(_0x6ddaeb,_0x3f6c0e){const _0x46edb3=_0x394c03;return _0x351d55(_0x6ddaeb[_0x46edb3(0x394)]||[],_0x3f6c0e?(_0x6ddaeb[_0x46edb3(0x296)]||{})[_0x3f6c0e]||[]:[]);}function _0x46af13(_0x5aaf6a){const _0x9496c2=_0x394c03,_0x84a108=[];for(const _0x1a0f2d of _0x5aaf6a[_0x9496c2(0x223)]()){const _0x393ca5=_0x1a0f2d['operation']?.[_0x9496c2(0x564)];if(!_0x393ca5)continue;_0x393ca5['authRequired']&&!_0x393ca5[_0x9496c2(0x1e6)]&&_0x84a108['push'](_0x1a0f2d[_0x9496c2(0x74a)]+'\x20'+_0x1a0f2d[_0x9496c2(0x1de)]+_0x9496c2(0x211)+(_0x1a0f2d[_0x9496c2(0x3dc)]['id']??'?')+')');}if(_0x84a108['length'])throw new Error('The\x20following\x20routes\x20require\x20auth\x20but\x20declare\x20no\x20permission:\x0a\x20\x20'+_0x84a108['join'](_0x9496c2(0x356)));}return okdbAuthPermissions={'hasPermission':_0x64fc72,'unionPermissions':_0x351d55,'isReadOperation':_0x384fcd,'resolveProtectedGate':_0x2e41d2,'getEffectivePermissions':_0x2bfc24,'assertEveryRouteHasPermission':_0x46af13},okdbAuthPermissions;}var okdbJwtUtils,hasRequiredOkdbJwtUtils;function requireOkdbJwtUtils(){if(hasRequiredOkdbJwtUtils)return okdbJwtUtils;hasRequiredOkdbJwtUtils=0x1;const _0x5f2511=require$$0$7,_0x1fba89=require$$1$2,_0x2fea00=require$$2$1;function _0x37e4ac(_0x118338){const _0xcbe21a=_0x1684,_0x5137fa=String(_0x118338||'')['replace'](/-/g,'+')[_0xcbe21a(0x2f9)](/_/g,'/'),_0x211374=_0x5137fa+'='[_0xcbe21a(0x37a)]((0x4-(_0x5137fa[_0xcbe21a(0x3be)]%0x4||0x4))%0x4);return Buffer[_0xcbe21a(0x4e1)](_0x211374,_0xcbe21a(0x70b));}function _0x38ca2f(_0x97e556){const _0x5649a8=_0x1684;if(typeof _0x97e556!==_0x5649a8(0x2b2))throw new Error('Invalid\x20token');const _0x5f08ff=_0x97e556[_0x5649a8(0x735)]('.');if(_0x5f08ff['length']!==0x3)throw new Error(_0x5649a8(0x48b));const [_0x203d49,_0x153dd2,_0x2bf6db]=_0x5f08ff,_0x5424c6=JSON[_0x5649a8(0x81a)](_0x37e4ac(_0x203d49)[_0x5649a8(0x1f5)](_0x5649a8(0x6ec))),_0x2ad1b6=JSON[_0x5649a8(0x81a)](_0x37e4ac(_0x153dd2)[_0x5649a8(0x1f5)](_0x5649a8(0x6ec)));return{'header':_0x5424c6,'payload':_0x2ad1b6,'signature':_0x37e4ac(_0x2bf6db),'signingInput':Buffer[_0x5649a8(0x4e1)](_0x203d49+'.'+_0x153dd2),'encodedHeader':_0x203d49,'encodedPayload':_0x153dd2};}function _0x551266(_0x55cdc1){if(Array['isArray'](_0x55cdc1))return _0x55cdc1;if(_0x55cdc1==null)return[];return[_0x55cdc1];}function _0x115d5c(_0x1c7381){const _0x4038f1=_0x1684,_0x40b0e3=String(_0x1c7381||'')[_0x4038f1(0x8be)](/.{1,64}/g)||[];return _0x4038f1(0x55f)+_0x40b0e3[_0x4038f1(0x86d)]('\x0a')+'\x0a-----END\x20CERTIFICATE-----\x0a';}function _0x23f5ae(_0x5172db={}){const _0x31159e=_0x1684;if(_0x5172db[_0x31159e(0x61c)]?.[0x0])return _0x2fea00['createPublicKey'](_0x115d5c(_0x5172db[_0x31159e(0x61c)][0x0]));return _0x2fea00[_0x31159e(0x749)]({'key':_0x5172db,'format':_0x31159e(0x75d)});}function _0x50d5f5(_0x1fb054,_0x56db14,_0x422b98,_0x1017ff){const _0xc4c4e9=_0x1684;if(_0x1fb054===_0xc4c4e9(0x2bc))return _0x2fea00[_0xc4c4e9(0x476)](_0xc4c4e9(0x5e9),_0x422b98,_0x56db14,_0x1017ff);if(_0x1fb054===_0xc4c4e9(0x2b3))return _0x2fea00[_0xc4c4e9(0x476)](_0xc4c4e9(0x33d),_0x422b98,{'key':_0x56db14,'dsaEncoding':'ieee-p1363'},_0x1017ff);return![];}function _0x3b8b1d(_0x181492){const _0x2da999=_0x1684;if(typeof commonjsGlobal['fetch']==='function')return commonjsGlobal['fetch'](_0x181492,{'headers':{'accept':'application/json'}})[_0x2da999(0x76c)](async _0xc7dd18=>{const _0x43683c=_0x2da999;if(!_0xc7dd18['ok']){const _0x5d5ec9=new Error(_0x43683c(0x4b8)+_0xc7dd18[_0x43683c(0x492)]+'\x20fetching\x20'+_0x181492);_0x5d5ec9['status']=_0xc7dd18[_0x43683c(0x492)];throw _0x5d5ec9;}return _0xc7dd18[_0x43683c(0x3a8)]();});return new Promise((_0x5dc933,_0x2cedb2)=>{const _0x40921a=_0x2da999,_0x6e8019=String(_0x181492)['startsWith'](_0x40921a(0x57c))?_0x1fba89:_0x5f2511,_0x8ebe22=_0x6e8019['get'](_0x181492,{'headers':{'accept':_0x40921a(0x5c1)}},_0x4440ac=>{const _0x1d8e06=_0x40921a;let _0x36258e='';_0x4440ac[_0x1d8e06(0x65a)]('utf8'),_0x4440ac['on']('data',_0x218e98=>{_0x36258e+=_0x218e98;}),_0x4440ac['on'](_0x1d8e06(0x424),()=>{const _0x3aaa65=_0x1d8e06;if(_0x4440ac[_0x3aaa65(0x4e9)]<0xc8||_0x4440ac['statusCode']>=0x12c){const _0x596839=new Error('HTTP\x20'+_0x4440ac[_0x3aaa65(0x4e9)]+_0x3aaa65(0x75e)+_0x181492);return _0x596839[_0x3aaa65(0x492)]=_0x4440ac[_0x3aaa65(0x4e9)],_0x2cedb2(_0x596839);}try{_0x5dc933(JSON['parse'](_0x36258e||'{}'));}catch(_0x50be98){_0x2cedb2(_0x50be98);}});});_0x8ebe22['on'](_0x40921a(0x21f),_0x2cedb2),_0x8ebe22[_0x40921a(0x424)]();});}return okdbJwtUtils={'base64UrlDecode':_0x37e4ac,'parseJwt':_0x38ca2f,'normalizeAudience':_0x551266,'normalizePemCertificate':_0x115d5c,'jwkToKeyObject':_0x23f5ae,'verifyJwtSignature':_0x50d5f5,'fetchJson':_0x3b8b1d},okdbJwtUtils;}var hasRequiredOkdbHttp;function requireOkdbHttp(){const _0x11ff25=_0x32d6b8;if(hasRequiredOkdbHttp)return okdbHttp['exports'];hasRequiredOkdbHttp=0x1;const _0x4e156a=require$$0$7,{clampTimerDelay:_0x20f58b,isNeverDelay:_0x17dc0e}=requireOkdbTimers(),{URL:_0x29b30f}=require$$3$1,_0x22b766=requireOkdbMetrics(),_0x12a959=requireOkdbAuthTokens(),{hasPermission:_0x3ed95a,unionPermissions:_0x291115,resolveProtectedGate:_0x29ca88}=requireOkdbAuthPermissions(),_0x2a6bc3={0x190:_0x11ff25(0x61e),0x191:_0x11ff25(0x677),0x193:_0x11ff25(0x507),0x194:_0x11ff25(0x896),0x195:_0x11ff25(0x82d),0x198:_0x11ff25(0x59a),0x199:_0x11ff25(0x58b),0x19a:_0x11ff25(0x812),0x19b:'LENGTH_REQUIRED',0x19d:_0x11ff25(0x7cc),0x19f:'UNSUPPORTED_MEDIA_TYPE',0x1a6:_0x11ff25(0x877),0x1ad:'TOO_MANY_REQUESTS',0x1f4:_0x11ff25(0x79c),0x1f5:_0x11ff25(0x704),0x1f6:_0x11ff25(0x3db),0x1f7:'SERVICE_UNAVAILABLE',0x1f8:_0x11ff25(0x36c)},_0x36b3f6={'INVALID_VALUE':0x190,'BAD_CONFIG':0x190,'INVALID_PRIMARY_KEY':0x190,'INVALID_INDEX_KEY':0x190,'TYPE_NOT_REGISTERED':0x194,'INDEX_NOT_REGISTERED':0x194,'NOT_FOUND':0x194,'ALREADY_EXISTS':0x199,'VERSION_MISMATCH':0x199,'UNIQUE_CONSTRAINT':0x199,'TYPE_ALREADY_REGISTERED':0x199,'INDEX_ALREADY_REGISTERED':0x199,'FK_ERROR':0x199,'FK_DELETE_ERROR':0x199,'FOREIGN_KEY_VIOLATION':0x199,'FOREIGN_KEY_DELETE_RESTRICTED':0x199,'ENV_NOT_FOUND':0x194,'ENV_PROTECTED':0x193,'ENGINE_CONFIG_PATCH_UNSUPPORTED':0x190,'QUEUE_WORKER_JOB_TYPE_CONFLICT':0x199,'SCHEMA_VALIDATION_FAILED':0x1a6,'SCHEMA_COLLECTION_INVALID':0x199,'INVALID_SCHEMA':0x190,'QUERY_OPERATOR_FORBIDDEN':0x190,'BUCKET_CONFIG_INVALID':0x190,'BUCKET_INVALID_TIME_VALUE':0x1a6,'BUCKET_PROJECT_NOT_PERSISTABLE':0x190,'BUCKET_PROJECT_UNKNOWN':0x190,'VIEW_UNKNOWN_REDUCER':0x190,'RESERVED_VIEW_NAME':0x190,'VIEW_NOT_BUCKETED':0x190,'VIEW_NOT_FOUND':0x194,'VIEW_RANGE_GRANULARITY_MISMATCH':0x190,'VIEW_RANGE_GRANULARITY_REQUIRED':0x190,'VIEW_REF_UNSUPPORTED_REDUCER':0x190},{hmac:_0x28c88b,timingSafeEqual:_0x56fe4d,parseBearer:_0x439549,randomToken:_0x3f27c2,issueToken:_0x58fcba,authenticateToken:_0x12102e}=_0x12a959,{base64UrlDecode:_0xcd2f6c,parseJwt:_0x53a234,normalizeAudience:_0x5ac504,normalizePemCertificate:_0x31d50c,jwkToKeyObject:_0x5215fd,verifyJwtSignature:_0x1d2323,fetchJson:_0x39f127}=requireOkdbJwtUtils();function _0x4695f(_0x5aa546){const _0x4f43a3=_0x11ff25;return(_0x5aa546||_0x4f43a3(0x4da))[_0x4f43a3(0x589)]();}function _0x5b24c4(_0x3a4c0f){const _0x436003=_0x11ff25;if(Array['isArray'](_0x3a4c0f))return _0x3a4c0f[_0x436003(0x5d5)](_0x5b24c4);return String(_0x3a4c0f||'')[_0x436003(0x735)](',')['map'](_0x156d81=>_0x156d81[_0x436003(0x543)]())[_0x436003(0x49c)](Boolean);}function _0xe135b6(..._0x1bb68f){const _0x502519=_0x11ff25;return[...new Set(_0x1bb68f[_0x502519(0x5d5)](_0x5b24c4))][_0x502519(0x86d)](',\x20');}function _0x25cbcb(_0x3fc0b5,_0x384c59){const _0x28f03c=_0x11ff25;if(!_0x3fc0b5)return![];if(_0x384c59==='*')return!![];if(_0x384c59 instanceof RegExp)return _0x384c59['test'](_0x3fc0b5);if(typeof _0x384c59==='function')return!!_0x384c59(_0x3fc0b5);if(Array[_0x28f03c(0x590)](_0x384c59))return _0x384c59[_0x28f03c(0x6d1)](_0x3fc0b5);return _0x384c59===_0x3fc0b5;}function _0x236b37(_0x4ace69={},_0xce31ad={},_0x101f70=null){const _0x35c223=_0x11ff25;if(!_0xce31ad)return null;const _0x207470=_0x4ace69['origin'],_0xc8b490=_0xce31ad[_0x35c223(0x4c3)]??_0xce31ad[_0x35c223(0x293)]??'*',_0x11e6dc=_0xc8b490==='*'?'*':_0x25cbcb(_0x207470,_0xc8b490)?_0x207470:null;if(!_0x11e6dc)return null;const _0x2f85f5=_0x4ace69[_0x35c223(0x5de)],_0xf492c0=_0xce31ad[_0x35c223(0x4e8)]??_0xce31ad[_0x35c223(0x339)]??['content-type',_0x35c223(0x68d),_0x35c223(0x3ad),_0x35c223(0x6b4),_0x35c223(0x4a6)],_0x1db218=_0xce31ad[_0x35c223(0x521)]??_0xce31ad[_0x35c223(0x801)]??(_0x101f70?[_0x101f70,_0x35c223(0x47c)]:[_0x35c223(0x4da),'POST',_0x35c223(0x47c)]),_0x53705b=_0xce31ad[_0x35c223(0x862)]??[_0x35c223(0x3ad)],_0x5f1f57={'access-control-allow-origin':_0x11e6dc,'access-control-allow-methods':Array['isArray'](_0x1db218)?_0x1db218[_0x35c223(0x86d)](',\x20'):String(_0x1db218),'access-control-allow-headers':_0x2f85f5?_0xe135b6(_0xf492c0,_0x2f85f5):Array[_0x35c223(0x590)](_0xf492c0)?_0xf492c0['join'](',\x20'):String(_0xf492c0),'access-control-expose-headers':Array[_0x35c223(0x590)](_0x53705b)?_0x53705b[_0x35c223(0x86d)](',\x20'):String(_0x53705b),'vary':_0xe135b6(_0x35c223(0x7b0),_0x11e6dc==='*'?'':_0x35c223(0x7b0),_0x2f85f5?_0x35c223(0x795):'')};if(_0xce31ad[_0x35c223(0x1c3)])_0x5f1f57[_0x35c223(0x268)]='true';if(Number[_0x35c223(0x1be)](_0xce31ad[_0x35c223(0x26c)]))_0x5f1f57[_0x35c223(0x5a6)]=String(_0xce31ad['maxAge']);return _0x5f1f57;}function _0x2d324b(_0x4e4a4e){const _0x5c447a=_0x11ff25,_0x484cac=[],_0x5c495c={};let _0x5709bb=![];_0x4e4a4e['endsWith']('/*')&&(_0x5709bb=!![],_0x4e4a4e=_0x4e4a4e[_0x5c447a(0x556)](0x0,-0x2),_0x484cac[_0x5c447a(0x338)]('*'));let _0x4112a9=_0x4e4a4e['replace'](/\/+$/,'')['replace'](/\[([^\]]*)\]/g,(_0x1e549f,_0x10af58)=>{const _0x423024=_0x5c447a,_0x291515=_0x10af58[_0x423024(0x2f9)](/\/:(\w+)(?:=([^/\]\s]*))?/g,(_0x2e2dee,_0x24b95b,_0x5ea952)=>{const _0x5d1bdc=_0x423024;_0x484cac[_0x5d1bdc(0x338)](_0x24b95b);if(_0x5ea952!==undefined)_0x5c495c[_0x24b95b]=_0x5ea952;return _0x5d1bdc(0x49d);});return _0x423024(0x580)+_0x291515+')?';})[_0x5c447a(0x2f9)](/\/:(\w+)/g,(_0x3c25af,_0x13dc34)=>{const _0x42ba23=_0x5c447a;return _0x484cac[_0x42ba23(0x338)](_0x13dc34),_0x42ba23(0x49d);});if(_0x4112a9==='')_0x4112a9='/';return{'keys':_0x484cac,'defaults':_0x5c495c,'wildcard':_0x5709bb,'regex':new RegExp(_0x5709bb?'^'+_0x4112a9+_0x5c447a(0x5b8):'^'+_0x4112a9+'$')};}function _0x5222b8(_0x269444){const _0xdc395=_0x11ff25;if(_0x269444==null)return _0x269444;return JSON[_0xdc395(0x81a)](JSON['stringify'](_0x269444));}function _0x40e9ff(_0x3ab90f){const _0x533490=_0x11ff25;if(_0x3ab90f==null)return null;if(_0x3ab90f[_0x533490(0x70d)]===_0x533490(0x320)&&_0x3ab90f[_0x533490(0x4aa)]&&!Array[_0x533490(0x590)](_0x3ab90f[_0x533490(0x4aa)]))return _0x5222b8(_0x3ab90f);const _0x8278ab=Object[_0x533490(0x33f)](_0x3ab90f),_0xe8344c=_0x8278ab[_0x533490(0x3be)]>0x0&&_0x8278ab[_0x533490(0x796)](_0x377bcb=>{const _0x46ab33=_0x533490;return _0x377bcb&&typeof _0x377bcb===_0x46ab33(0x320)&&!Array[_0x46ab33(0x590)](_0x377bcb)&&(Object['prototype'][_0x46ab33(0x6b9)][_0x46ab33(0x65b)](_0x377bcb,'type')||Object[_0x46ab33(0x57f)][_0x46ab33(0x6b9)][_0x46ab33(0x65b)](_0x377bcb,_0x46ab33(0x4aa))||Object[_0x46ab33(0x57f)][_0x46ab33(0x6b9)][_0x46ab33(0x65b)](_0x377bcb,_0x46ab33(0x7ff))||Object[_0x46ab33(0x57f)]['hasOwnProperty'][_0x46ab33(0x65b)](_0x377bcb,_0x46ab33(0x2dc)));});if(_0xe8344c)return{'type':_0x533490(0x320),'properties':_0x5222b8(_0x3ab90f),'required':[],'additionalProperties':![]};const _0x8790d1={},_0x59f464=[];for(const [_0x278a7b,_0x486372]of Object[_0x533490(0x444)](_0x3ab90f)){_0x8790d1[_0x278a7b]=_0x35130c(_0x486372);if(_0x486372!==null&&_0x486372!==undefined)_0x59f464[_0x533490(0x338)](_0x278a7b);}return{'type':_0x533490(0x320),'properties':_0x8790d1,'required':_0x59f464,'additionalProperties':![]};}function _0x35130c(_0x5a274){const _0x44bc14=_0x11ff25;if(_0x5a274===null)return{'type':[_0x44bc14(0x498),_0x44bc14(0x2b2),_0x44bc14(0x56d),_0x44bc14(0x3b4),_0x44bc14(0x320),'array']};if(Array['isArray'](_0x5a274))return{'type':'array','items':_0x5a274[_0x44bc14(0x3be)]>0x0?_0x35130c(_0x5a274[0x0]):{}};switch(typeof _0x5a274){case _0x44bc14(0x2b2):return{'type':_0x44bc14(0x2b2),'default':_0x5a274};case'number':return{'type':Number[_0x44bc14(0x2f4)](_0x5a274)?_0x44bc14(0x282):'number','default':_0x5a274};case _0x44bc14(0x3b4):return{'type':'boolean','default':_0x5a274};case _0x44bc14(0x320):{const _0x48b1f9={};for(const [_0x2d8576,_0x595cec]of Object[_0x44bc14(0x444)](_0x5a274))_0x48b1f9[_0x2d8576]=_0x35130c(_0x595cec);return{'type':'object','properties':_0x48b1f9,'additionalProperties':!![],'default':_0x5222b8(_0x5a274)};}default:return{};}}function _0x3c1e90(_0x128069,_0x245dfe){const _0x27b62d=_0x11ff25,_0x530251=[];for(const _0x3bcae4 of _0x245dfe[_0x27b62d(0x6c7)]){if(_0x3bcae4==='*')continue;_0x530251['push']({'name':_0x3bcae4,'required':!Object[_0x27b62d(0x57f)][_0x27b62d(0x6b9)][_0x27b62d(0x65b)](_0x245dfe[_0x27b62d(0x525)],_0x3bcae4),'default':_0x245dfe[_0x27b62d(0x525)][_0x3bcae4]});}return _0x530251;}function _0x3317ad(_0x4a02da={},_0x377768){const _0x38387d=_0x11ff25,_0x267f50=_0x40e9ff(_0x4a02da[_0x38387d(0x4fc)]?.[_0x38387d(0x422)]??_0x4a02da['query']??null),_0x24218d=_0x4a02da['http']?.['bodyMode']??(_0x4a02da[_0x38387d(0x235)]?'raw':_0x377768[_0x38387d(0x74a)]===_0x38387d(0x4da)||_0x377768[_0x38387d(0x74a)]===_0x38387d(0x41e)?'none':_0x38387d(0x5fa));return{'querySchema':_0x267f50,'bodyMode':_0x24218d,'bindings':_0x5222b8(_0x4a02da[_0x38387d(0x4fc)]?.[_0x38387d(0x48d)]??{}),'statuses':_0x5222b8(_0x4a02da[_0x38387d(0x4fc)]?.['statuses']??(_0x4a02da[_0x38387d(0x204)]||[])),'transport':_0x4a02da[_0x38387d(0x4fc)]?.['transport']??(_0x4a02da[_0x38387d(0x8b3)]?'sse':_0x4a02da['raw']?_0x38387d(0x235):_0x38387d(0x5b3)),'rawResponse':_0x4a02da[_0x38387d(0x4fc)]?.[_0x38387d(0x2b7)]??!!_0x4a02da[_0x38387d(0x2b7)],'cors':_0x5222b8(_0x4a02da[_0x38387d(0x4fc)]?.[_0x38387d(0x5c9)]??_0x4a02da['cors']??null)};}function _0x1a3327(_0x3f7e86){const _0x69f322=_0x11ff25,_0x15fa83=_0x3f7e86['meta']||{},_0x3e399f=_0x3c1e90(_0x3f7e86[_0x69f322(0x1de)],_0x3f7e86['matcher']),_0x2bf935=!!(_0x15fa83['id']||_0x15fa83[_0x69f322(0x623)]||_0x15fa83[_0x69f322(0x581)]||_0x15fa83[_0x69f322(0x4fc)]||_0x15fa83[_0x69f322(0x3ac)]||_0x15fa83[_0x69f322(0x6a2)]||_0x15fa83[_0x69f322(0x564)]||_0x15fa83['safety']),_0x41d0b4=_0x3317ad(_0x15fa83,_0x3f7e86),_0x5c6fc9=_0x15fa83[_0x69f322(0x623)]?_0x5222b8(_0x15fa83[_0x69f322(0x623)]):null;return{'id':_0x15fa83['id']??null,'summary':_0x15fa83[_0x69f322(0x511)]??null,'description':_0x15fa83[_0x69f322(0x21b)]??null,'tags':_0x5222b8(_0x15fa83[_0x69f322(0x4f6)]??[]),'category':_0x15fa83[_0x69f322(0x2b6)]??null,'safety':_0x5222b8(_0x15fa83[_0x69f322(0x5c5)]??null),'access':_0x5222b8(_0x15fa83[_0x69f322(0x564)]??null),'inputSchema':_0x5c6fc9,'outputSchema':_0x5222b8(_0x15fa83[_0x69f322(0x581)]??null),'examples':_0x5222b8(_0x15fa83[_0x69f322(0x311)]??[]),'pathParams':_0x3e399f,'http':_0x41d0b4,'cli':_0x5222b8(_0x15fa83[_0x69f322(0x6a2)]??null),'mcp':_0x5222b8(_0x15fa83[_0x69f322(0x3ac)]??null),'legacy':{'params':_0x5222b8(_0x15fa83[_0x69f322(0x488)]??null),'query':_0x5222b8(_0x15fa83['query']??null),'body':_0x5222b8(_0x15fa83[_0x69f322(0x8b0)]??null),'response':_0x5222b8(_0x15fa83[_0x69f322(0x889)]??null)},'transport':{'raw':!!_0x15fa83[_0x69f322(0x235)],'sse':!!_0x15fa83['sse'],'rawResponse':!!_0x15fa83['rawResponse'],'cors':_0x5222b8(_0x15fa83[_0x69f322(0x5c9)]??null)},'hasCanonical':_0x2bf935};}function _0x1cbd2e(_0x4734da,_0x3337d0){const _0x2bed7e=_0x11ff25;if(!_0x3337d0?.[_0x2bed7e(0x32a)])return;if(!_0x3337d0['inputSchema']||_0x3337d0['inputSchema'][_0x2bed7e(0x70d)]!==_0x2bed7e(0x320)||!_0x3337d0['inputSchema'][_0x2bed7e(0x4aa)])throw new Error('Route\x20'+_0x4734da[_0x2bed7e(0x74a)]+'\x20'+_0x4734da[_0x2bed7e(0x1de)]+'\x20has\x20canonical\x20metadata\x20but\x20missing\x20valid\x20inputSchema');const _0x528a8b=_0x3337d0[_0x2bed7e(0x623)][_0x2bed7e(0x4aa)]||{},_0x2f9fa4=new Set(_0x3337d0[_0x2bed7e(0x2b5)]['map'](_0x4f6aad=>_0x4f6aad[_0x2bed7e(0x2a9)])),_0xdaf347=new Set(Object[_0x2bed7e(0x6c7)](_0x3337d0[_0x2bed7e(0x4fc)]?.[_0x2bed7e(0x422)]?.[_0x2bed7e(0x4aa)]||{})),_0x550e9a=new Set(Object[_0x2bed7e(0x6c7)](_0x3337d0[_0x2bed7e(0x4fc)]?.[_0x2bed7e(0x48d)]||{}));for(const _0x29b114 of _0x3337d0[_0x2bed7e(0x2b5)]){if(!_0x528a8b[_0x29b114[_0x2bed7e(0x2a9)]])throw new Error(_0x2bed7e(0x687)+_0x4734da['method']+'\x20'+_0x4734da[_0x2bed7e(0x1de)]+_0x2bed7e(0x5c8)+_0x29b114[_0x2bed7e(0x2a9)]);}for(const _0x4e1ba6 of _0xdaf347){if(!_0x528a8b[_0x4e1ba6])throw new Error(_0x2bed7e(0x687)+_0x4734da[_0x2bed7e(0x74a)]+'\x20'+_0x4734da[_0x2bed7e(0x1de)]+_0x2bed7e(0x389)+_0x4e1ba6);}for(const _0x52d8cc of _0x550e9a){if(!_0x528a8b[_0x52d8cc])throw new Error(_0x2bed7e(0x687)+_0x4734da[_0x2bed7e(0x74a)]+'\x20'+_0x4734da[_0x2bed7e(0x1de)]+'\x20binding\x20references\x20missing\x20input\x20field:\x20'+_0x52d8cc);}for(const _0x3950e9 of _0x550e9a){if(_0x2f9fa4[_0x2bed7e(0x6f1)](_0x3950e9))throw new Error('Route\x20'+_0x4734da[_0x2bed7e(0x74a)]+'\x20'+_0x4734da[_0x2bed7e(0x1de)]+'\x20has\x20ambiguous\x20binding\x20for\x20path\x20field:\x20'+_0x3950e9);if(_0xdaf347['has'](_0x3950e9))throw new Error(_0x2bed7e(0x687)+_0x4734da['method']+'\x20'+_0x4734da[_0x2bed7e(0x1de)]+_0x2bed7e(0x7c6)+_0x3950e9);const _0x477812=_0x3337d0[_0x2bed7e(0x4fc)]['bindings'][_0x3950e9];if(!/^params\.[A-Za-z0-9_*.-]+$/[_0x2bed7e(0x27f)](_0x477812)&&!/^query\.[A-Za-z0-9_*.-]+$/[_0x2bed7e(0x27f)](_0x477812)&&!/^body(?:\.[A-Za-z0-9_*.-]+)?$/[_0x2bed7e(0x27f)](_0x477812)&&!/^headers\.[A-Za-z0-9_*.-]+$/[_0x2bed7e(0x27f)](_0x477812))throw new Error(_0x2bed7e(0x687)+_0x4734da[_0x2bed7e(0x74a)]+'\x20'+_0x4734da[_0x2bed7e(0x1de)]+_0x2bed7e(0x6e1)+_0x3950e9+':\x20'+_0x477812);}for(const _0xbe2b38 of _0xdaf347){if(_0x2f9fa4[_0x2bed7e(0x6f1)](_0xbe2b38))throw new Error(_0x2bed7e(0x687)+_0x4734da[_0x2bed7e(0x74a)]+'\x20'+_0x4734da[_0x2bed7e(0x1de)]+'\x20has\x20ambiguous\x20query/path\x20field:\x20'+_0xbe2b38);}const _0x486e47=_0x3337d0[_0x2bed7e(0x4fc)]?.[_0x2bed7e(0x78f)],_0x343dbf=new Set([_0x2bed7e(0x428),_0x2bed7e(0x5fa),_0x2bed7e(0x320),_0x2bed7e(0x5cd),_0x2bed7e(0x2f7),'raw']);if(!_0x343dbf[_0x2bed7e(0x6f1)](_0x486e47))throw new Error(_0x2bed7e(0x687)+_0x4734da[_0x2bed7e(0x74a)]+'\x20'+_0x4734da[_0x2bed7e(0x1de)]+_0x2bed7e(0x25e)+_0x486e47);if(_0x486e47===_0x2bed7e(0x235)&&!_0x4734da[_0x2bed7e(0x49b)]?.[_0x2bed7e(0x235)])throw new Error(_0x2bed7e(0x687)+_0x4734da[_0x2bed7e(0x74a)]+'\x20'+_0x4734da[_0x2bed7e(0x1de)]+_0x2bed7e(0x433));if(_0x3337d0['mcp']?.[_0x2bed7e(0x23b)]!==![]&&(_0x4734da[_0x2bed7e(0x49b)]?.[_0x2bed7e(0x235)]||_0x4734da[_0x2bed7e(0x49b)]?.[_0x2bed7e(0x8b3)]||_0x3337d0['http']?.[_0x2bed7e(0x802)]===_0x2bed7e(0x3ca)))throw new Error(_0x2bed7e(0x687)+_0x4734da[_0x2bed7e(0x74a)]+'\x20'+_0x4734da[_0x2bed7e(0x1de)]+'\x20cannot\x20be\x20MCP-exposed\x20without\x20an\x20explicit\x20adapter\x20because\x20it\x20uses\x20'+_0x3337d0[_0x2bed7e(0x4fc)]?.[_0x2bed7e(0x802)]);const _0x48cbc8=Object['keys'](_0x528a8b)[_0x2bed7e(0x49c)](_0x341dd5=>{const _0x266ddf=_0x2bed7e;if(_0x2f9fa4[_0x266ddf(0x6f1)](_0x341dd5))return![];if(_0xdaf347['has'](_0x341dd5))return![];if(_0x550e9a['has'](_0x341dd5))return![];return!![];});if(_0x486e47===_0x2bed7e(0x428)&&_0x48cbc8[_0x2bed7e(0x3be)]>0x0)throw new Error(_0x2bed7e(0x687)+_0x4734da[_0x2bed7e(0x74a)]+'\x20'+_0x4734da[_0x2bed7e(0x1de)]+'\x20has\x20unbound\x20input\x20fields\x20with\x20bodyMode:none:\x20'+_0x48cbc8[_0x2bed7e(0x86d)](',\x20'));if(_0x486e47==='array'&&_0x48cbc8['filter'](_0x5e5278=>_0x14d2fd(_0x528a8b[_0x5e5278],_0x2bed7e(0x2f7)))['length']!==0x1)throw new Error(_0x2bed7e(0x687)+_0x4734da[_0x2bed7e(0x74a)]+'\x20'+_0x4734da[_0x2bed7e(0x1de)]+_0x2bed7e(0x847));}function _0x5d1d9d(_0x34ddf5,_0x41d22a,_0x14baa6,_0xe9dd55){const _0x28e1c6=_0x11ff25;for(const [_0x380fe1,_0x29555e]of Object[_0x28e1c6(0x444)](_0x34ddf5)){if(_0x41d22a[_0x28e1c6(0x6f1)](_0x380fe1)||_0x14baa6[_0x28e1c6(0x6f1)](_0x380fe1)||Object[_0x28e1c6(0x57f)]['hasOwnProperty'][_0x28e1c6(0x65b)](_0xe9dd55,_0x380fe1))continue;if(_0x14d2fd(_0x29555e,_0x28e1c6(0x2f7)))return _0x380fe1;}return null;}function _0xe5694a(_0x53cbaa){const _0x59dacf=_0x11ff25;if(Array[_0x59dacf(0x590)](_0x53cbaa))return _0x53cbaa;if(_0x53cbaa==null)return[];return[_0x53cbaa];}function _0x14d2fd(_0x649b14,_0x1504f5){const _0x2602be=_0x11ff25;return _0xe5694a(_0x649b14?.[_0x2602be(0x70d)])[_0x2602be(0x6d1)](_0x1504f5);}function _0x5c9b13(_0x104adc,_0x2c6523){const _0x151f4d=_0x11ff25;if(_0x104adc==null||typeof _0x104adc!==_0x151f4d(0x2b2))return _0x104adc;const _0xf39f7f=_0xe5694a(_0x2c6523?.['type']);if(_0xf39f7f[_0x151f4d(0x3be)]===0x0)return _0x104adc;if(_0xf39f7f[_0x151f4d(0x6d1)](_0x151f4d(0x498))&&_0x104adc===_0x151f4d(0x498))return null;if(_0xf39f7f[_0x151f4d(0x6d1)]('boolean')){if(_0x104adc===_0x151f4d(0x574))return!![];if(_0x104adc===_0x151f4d(0x83b))return![];}if(_0xf39f7f['includes'](_0x151f4d(0x282))&&/^-?\d+$/[_0x151f4d(0x27f)](_0x104adc))return Number['parseInt'](_0x104adc,0xa);if(_0xf39f7f['includes'](_0x151f4d(0x56d))&&/^-?(?:\d+|\d*\.\d+)$/[_0x151f4d(0x27f)](_0x104adc))return Number(_0x104adc);return _0x104adc;}function _0x33f6e8(_0x1e92cf){return _0x5222b8(_0x1e92cf);}function _0xf619c1(_0x424544,_0x3e1cec={},_0x5020d8={},_0x403fbb=null,_0x3f6245={}){const _0x24e699=_0x11ff25,_0x5e797e=_0x424544?.['operation'];if(!_0x5e797e?.['hasCanonical']||!_0x5e797e[_0x24e699(0x623)])return null;const _0x49aea6=_0x5e797e['inputSchema'][_0x24e699(0x4aa)]||{},_0x4b3ddc=_0x5e797e[_0x24e699(0x4fc)]?.[_0x24e699(0x422)]?.[_0x24e699(0x4aa)]||{},_0x479337=_0x5e797e[_0x24e699(0x4fc)]?.[_0x24e699(0x48d)]||{},_0x451749=new Set((_0x5e797e[_0x24e699(0x2b5)]||[])['map'](_0x188c49=>_0x188c49[_0x24e699(0x2a9)])),_0x58198b=new Set(Object[_0x24e699(0x6c7)](_0x4b3ddc)),_0x444101={};for(const [_0xdc434a,_0x336930]of Object[_0x24e699(0x444)](_0x49aea6)){Object['prototype'][_0x24e699(0x6b9)][_0x24e699(0x65b)](_0x336930||{},_0x24e699(0x2dc))&&(_0x444101[_0xdc434a]=_0x33f6e8(_0x336930[_0x24e699(0x2dc)]));}for(const _0x551f14 of _0x5e797e[_0x24e699(0x2b5)]||[]){if(!Object[_0x24e699(0x57f)]['hasOwnProperty']['call'](_0x3e1cec,_0x551f14['name']))continue;const _0x26cdcb=_0x49aea6[_0x551f14[_0x24e699(0x2a9)]]||{};_0x444101[_0x551f14['name']]=_0x5c9b13(_0x3e1cec[_0x551f14['name']],_0x26cdcb);}for(const [_0xba6824,_0x45d998]of Object['entries'](_0x4b3ddc)){if(!Object[_0x24e699(0x57f)][_0x24e699(0x6b9)][_0x24e699(0x65b)](_0x5020d8,_0xba6824))continue;_0x444101[_0xba6824]=_0x5c9b13(_0x5020d8[_0xba6824],_0x45d998||_0x49aea6[_0xba6824]||{});}for(const [_0x4c8db9,_0x3a1cc5]of Object[_0x24e699(0x444)](_0x479337)){if(typeof _0x3a1cc5!==_0x24e699(0x2b2))continue;let _0x408eb2;if(_0x3a1cc5[_0x24e699(0x5e1)](_0x24e699(0x7a1)))_0x408eb2=_0x3e1cec[_0x3a1cc5[_0x24e699(0x556)](0x7)];else{if(_0x3a1cc5[_0x24e699(0x5e1)]('query.'))_0x408eb2=_0x5020d8[_0x3a1cc5[_0x24e699(0x556)](0x6)];else{if(_0x3a1cc5==='body')_0x408eb2=_0x403fbb;else{if(_0x3a1cc5[_0x24e699(0x5e1)](_0x24e699(0x7e1)))_0x408eb2=_0x403fbb?.[_0x3a1cc5['slice'](0x5)];else{if(_0x3a1cc5[_0x24e699(0x5e1)](_0x24e699(0x2ca)))_0x408eb2=_0x3f6245?.[_0x3a1cc5[_0x24e699(0x556)](0x8)[_0x24e699(0x6e4)]()]??_0x3f6245?.[_0x3a1cc5[_0x24e699(0x556)](0x8)];}}}}if(_0x408eb2!==undefined)_0x444101[_0x4c8db9]=_0x408eb2;}const _0x2a3a9d=_0x5e797e[_0x24e699(0x4fc)]?.[_0x24e699(0x78f)];if(_0x2a3a9d!=='none'&&_0x2a3a9d!=='raw'&&_0x403fbb!=null){if(_0x2a3a9d===_0x24e699(0x2f7)&&Array[_0x24e699(0x590)](_0x403fbb)){const _0x30d1b4=_0x5d1d9d(_0x49aea6,_0x451749,_0x58198b,_0x479337);if(_0x30d1b4)_0x444101[_0x30d1b4]=_0x403fbb;}else{if(_0x2a3a9d===_0x24e699(0x320))for(const [_0x505da5,_0x54accc]of Object[_0x24e699(0x444)](_0x49aea6)){if(_0x451749[_0x24e699(0x6f1)](_0x505da5)||_0x58198b['has'](_0x505da5)||Object[_0x24e699(0x57f)][_0x24e699(0x6b9)][_0x24e699(0x65b)](_0x479337,_0x505da5))continue;if(Object[_0x24e699(0x57f)][_0x24e699(0x6b9)][_0x24e699(0x65b)](_0x403fbb,_0x505da5))_0x444101[_0x505da5]=_0x403fbb[_0x505da5];else{if(_0x14d2fd(_0x54accc,_0x24e699(0x320)))_0x444101[_0x505da5]=_0x403fbb;}}else for(const [_0x197e1e,_0x236bd5]of Object[_0x24e699(0x444)](_0x403fbb)){if(_0x451749['has'](_0x197e1e)||_0x58198b[_0x24e699(0x6f1)](_0x197e1e)||Object[_0x24e699(0x57f)]['hasOwnProperty']['call'](_0x479337,_0x197e1e))continue;_0x444101[_0x197e1e]=_0x236bd5;}}}return _0x444101;}function _0x2208a6(_0x23477c,_0x5064f4,_0x4a664c,_0x1e2236){const _0x5814bc=_0x11ff25;if(!_0x5064f4)return;const _0x21a478=_0xe5694a(_0x5064f4[_0x5814bc(0x70d)]);if(_0x23477c===undefined)return;if(_0x23477c===null){_0x21a478[_0x5814bc(0x3be)]>0x0&&!_0x21a478['includes'](_0x5814bc(0x498))&&_0x1e2236['push']({'field':_0x4a664c,'message':_0x5814bc(0x4f1),'expected':_0x21a478[_0x5814bc(0x86d)]('|'),'actual':null});return;}if(_0x21a478[_0x5814bc(0x3be)]===0x0)return;const _0x418382=_0x21a478[_0x5814bc(0x4af)](_0x110eae=>{const _0x35cd81=_0x5814bc;switch(_0x110eae){case'string':return typeof _0x23477c===_0x35cd81(0x2b2);case'integer':return Number[_0x35cd81(0x2f4)](_0x23477c);case _0x35cd81(0x56d):return typeof _0x23477c===_0x35cd81(0x56d)&&Number['isFinite'](_0x23477c);case _0x35cd81(0x3b4):return typeof _0x23477c===_0x35cd81(0x3b4);case _0x35cd81(0x320):return _0x23477c&&typeof _0x23477c===_0x35cd81(0x320)&&!Array[_0x35cd81(0x590)](_0x23477c);case'array':return Array[_0x35cd81(0x590)](_0x23477c);case _0x35cd81(0x498):return _0x23477c===null;default:return!![];}});if(!_0x418382){_0x1e2236[_0x5814bc(0x338)]({'field':_0x4a664c,'message':_0x5814bc(0x472)+_0x21a478[_0x5814bc(0x86d)]('|'),'expected':_0x21a478[_0x5814bc(0x86d)]('|'),'actual':_0x23477c});return;}Array[_0x5814bc(0x590)](_0x23477c)&&_0x5064f4[_0x5814bc(0x7ff)]&&_0x23477c[_0x5814bc(0x773)]((_0x578da3,_0x2c04c7)=>_0x2208a6(_0x578da3,_0x5064f4[_0x5814bc(0x7ff)],_0x4a664c+'['+_0x2c04c7+']',_0x1e2236));}function _0x27a88c(_0x5e21a7,_0xc7d188){const _0xacf500=_0x11ff25,_0x390ca3=_0x5e21a7?.[_0xacf500(0x3dc)];if(!_0x390ca3?.['hasCanonical']||!_0x390ca3['inputSchema'])return null;const _0xf6ee3e=_0x390ca3[_0xacf500(0x623)],_0x4e50dc=_0xf6ee3e[_0xacf500(0x4aa)]||{},_0x25c4a6=new Set(_0xf6ee3e[_0xacf500(0x242)]||[]),_0x2cf637=[];for(const _0x408211 of _0x25c4a6){_0xc7d188[_0x408211]===undefined&&_0x2cf637[_0xacf500(0x338)]({'field':_0x408211,'message':_0xacf500(0x6a6),'expected':_0xacf500(0x730),'actual':undefined});}if(_0xf6ee3e[_0xacf500(0x6c2)]===![])for(const _0x2ddcec of Object[_0xacf500(0x6c7)](_0xc7d188||{})){!Object[_0xacf500(0x57f)][_0xacf500(0x6b9)][_0xacf500(0x65b)](_0x4e50dc,_0x2ddcec)&&_0x2cf637[_0xacf500(0x338)]({'field':_0x2ddcec,'message':_0xacf500(0x442),'expected':_0xacf500(0x60f),'actual':_0xc7d188[_0x2ddcec]});}for(const [_0x394989,_0x1e3b21]of Object[_0xacf500(0x444)](_0x4e50dc)){_0x2208a6(_0xc7d188[_0x394989],_0x1e3b21,_0x394989,_0x2cf637);}if(_0x2cf637['length']===0x0)return null;return{'code':_0xacf500(0x406),'errors':_0x2cf637};}function _0x549c08(_0x1a621c=[]){const _0x3b2293=_0x11ff25;if(!Array[_0x3b2293(0x590)](_0x1a621c)||_0x1a621c['length']===0x0)return null;const _0x9129bf=_0x1a621c[_0x3b2293(0x556)](0x0,0x3)[_0x3b2293(0x8bd)]((_0x571cdd={})=>{const _0x422182=_0x3b2293,_0x131a9c=_0x571cdd['field']?_0x571cdd[_0x422182(0x6d2)]+'\x20':'';return(''+_0x131a9c+(_0x571cdd['message']||_0x422182(0x540)))[_0x422182(0x543)]();})[_0x3b2293(0x86d)](';\x20');return _0x1a621c[_0x3b2293(0x3be)]>0x3?_0x9129bf+'\x20(+'+(_0x1a621c[_0x3b2293(0x3be)]-0x3)+_0x3b2293(0x793):_0x9129bf;}function _0x4d1bb7(_0x24ec52,_0x26f0ee={}){const _0x21a4de=_0x11ff25,_0x18ca9b=_0x26f0ee?.['result']?.[_0x21a4de(0x21f)]??_0x26f0ee?.[_0x21a4de(0x21f)]??_0x21a4de(0x307),_0x420ca5=_0x26f0ee?.[_0x21a4de(0x647)]?.['details']??_0x26f0ee?.[_0x21a4de(0x820)]??_0x18ca9b?.[_0x21a4de(0x820)]??null,_0x256ac4=_0x26f0ee?.[_0x21a4de(0x647)]?.[_0x21a4de(0x5f9)]??_0x26f0ee?.['code']??_0x18ca9b?.[_0x21a4de(0x5f9)]??null,_0x524e20=_0x26f0ee?.['result']?.[_0x21a4de(0x439)]??_0x26f0ee?.['message']??_0x18ca9b?.[_0x21a4de(0x439)]??null,_0x69ea6=typeof _0x18ca9b==='string'?_0x18ca9b:null,_0x198fb3=typeof _0x69ea6===_0x21a4de(0x2b2)&&/^[A-Z0-9_]+$/[_0x21a4de(0x27f)](_0x69ea6),_0x28c651=_0x256ac4??(_0x198fb3?_0x69ea6:null)??(_0x2a6bc3[_0x24ec52]||_0x21a4de(0x621)+_0x24ec52);let _0x2f8d3f=_0x524e20;!_0x2f8d3f&&typeof _0x69ea6===_0x21a4de(0x2b2)&&!_0x198fb3&&(_0x2f8d3f=_0x69ea6);if(!_0x2f8d3f&&_0x28c651===_0x21a4de(0x406)){const _0x5b0338=_0x549c08(_0x420ca5);_0x2f8d3f=_0x5b0338?_0x21a4de(0x586)+_0x5b0338:_0x21a4de(0x596);}if(!_0x2f8d3f&&Array['isArray'](_0x420ca5)&&_0x420ca5[_0x21a4de(0x3be)]>0x0){const _0x1f4ce2=_0x549c08(_0x420ca5);if(_0x1f4ce2)_0x2f8d3f=_0x1f4ce2;}if(!_0x2f8d3f)_0x2f8d3f=_0x2a6bc3[_0x24ec52]||_0x21a4de(0x307);const _0x40679b={'code':_0x28c651,'message':_0x2f8d3f};if(_0x420ca5!=null)_0x40679b[_0x21a4de(0x820)]=_0x420ca5;return _0x40679b;}function _0x453374(_0x3d86da){const _0x2f0d61=_0x11ff25,_0x179b4a={};if(!_0x3d86da)return _0x179b4a;for(const _0x2c4576 of _0x3d86da[_0x2f0d61(0x735)](';')){const _0x2a11e0=_0x2c4576[_0x2f0d61(0x24b)]('=');if(_0x2a11e0===-0x1)continue;const _0x1f82c6=_0x2c4576[_0x2f0d61(0x556)](0x0,_0x2a11e0)[_0x2f0d61(0x543)](),_0x435308=_0x2c4576[_0x2f0d61(0x556)](_0x2a11e0+0x1)['trim']();_0x179b4a[_0x1f82c6]=decodeURIComponent(_0x435308);}return _0x179b4a;}function _0x936f76(_0x32d96e,_0x487442){const _0x212c9a=_0x11ff25;return _0x487442=_0x37d74e(_0x487442),{'status':_0x487442[_0x212c9a(0x492)]??_0x32d96e[_0x212c9a(0x492)],'headers':{..._0x32d96e[_0x212c9a(0x4e8)]||{},..._0x487442[_0x212c9a(0x4e8)]||{}},'body':_0x487442[_0x212c9a(0x8b0)]??_0x32d96e[_0x212c9a(0x8b0)]};}function _0x3590fb(_0x34184f={}){const _0x1db265=_0x11ff25;return _0x34184f[_0x1db265(0x802)]||(_0x34184f[_0x1db265(0x3fc)]?_0x1db265(0x3fc):_0x1db265(0x4fc));}function _0x2e7d8c(_0x2729ef){const _0x4932c4=_0x11ff25;if(_0x2729ef[_0x4932c4(0x70c)]?.[_0x4932c4(0x3fc)]===!![])return!![];if(_0x2729ef[_0x4932c4(0x70c)]?.['auth']?.[_0x4932c4(0x2d5)]===!![])return!![];if(_0x2729ef[_0x4932c4(0x70c)]?.[_0x4932c4(0x3bb)]?.['ok']===!![])return!![];return![];}function _0x1950ca(_0x2c4837,_0x4a9610){const _0x41546e=_0x11ff25,_0x1f49b4=_0x4a9610[_0x41546e(0x735)]('.');let _0x33bb89=_0x2c4837;for(const _0x59b171 of _0x1f49b4){_0x33bb89=_0x33bb89?.[_0x59b171];}return _0x33bb89||null;}class _0x20048a{constructor(){const _0x3342bc=_0x11ff25;this[_0x3342bc(0x7c3)]=[],this[_0x3342bc(0x218)]=[],this[_0x3342bc(0x8ae)]=[],this['maxBodyBytes']=0x5*0x400*0x400,this[_0x3342bc(0x622)]=null,this[_0x3342bc(0x8a8)]=[],this[_0x3342bc(0x6d6)]=new Set(),this[_0x3342bc(0x3bb)]={'cookieName':_0x3342bc(0x558),'stateCookieName':_0x3342bc(0x5c7),'csrfCookieName':'kdb_admin_csrf'},this[_0x3342bc(0x473)]={},this[_0x3342bc(0x55b)]=new Map(),this[_0x3342bc(0x1cc)]=null,this[_0x3342bc(0x5b7)]=null,this['_jwksNegativeCache']=new Map(),this[_0x3342bc(0x8b6)]=new _0x22b766(),this[_0x3342bc(0x734)]=![],this[_0x3342bc(0x78e)]=0x0;}[_0x11ff25(0x7fa)](_0x1dd861={}){const _0x4684b0=_0x11ff25;return this['_authOptions']=_0x1dd861||{},this['authMode']=_0x1dd861[_0x4684b0(0x419)]??_0x4684b0(0x654),this['_authOptions'];}get['isSetupMode'](){const _0x2aa4c2=_0x11ff25;if(this[_0x2aa4c2(0x3ff)]?.[_0x2aa4c2(0x3bb)])return this[_0x2aa4c2(0x3ff)][_0x2aa4c2(0x3bb)]['isSetupMode'];return![];}['getAuthOptions'](){const _0x1f1d61=_0x11ff25;if(this[_0x1f1d61(0x3ff)]?.[_0x1f1d61(0x3bb)])return this[_0x1f1d61(0x3ff)]['auth']['getAuthOptions']();return this[_0x1f1d61(0x473)]||{};}[_0x11ff25(0x81d)](_0x5633a9){const _0x120759=_0x11ff25;this['middlewares'][_0x120759(0x338)](_0x5633a9);}[_0x11ff25(0x595)](_0x38e620,_0xafa061){const _0x238c6c=_0x11ff25;this['guards'][_0x238c6c(0x338)]({'match':_0x38e620,'handler':_0xafa061});}['add'](_0x28f5ab,_0x3e3125,_0x1eea77,_0x37e304={}){const _0xfc3fd5=_0x11ff25,_0x5d818a={'method':_0x4695f(_0x28f5ab),'path':_0x3e3125,'matcher':_0x2d324b(_0x3e3125),'handler':_0x1eea77,'meta':_0x37e304||{}},_0x53740a=_0x1a3327(_0x5d818a);_0x1cbd2e(_0x5d818a,_0x53740a),_0x5d818a[_0xfc3fd5(0x3dc)]=_0x53740a,_0x5d818a[_0xfc3fd5(0x7bf)]=this[_0xfc3fd5(0x734)]===!![];if(_0x5d818a[_0xfc3fd5(0x7bf)])this['_userRouteCount']++;this[_0xfc3fd5(0x8ae)]['push'](_0x5d818a);}[_0x11ff25(0x68c)](_0x5c2f2c,_0xbac145,_0x4b3bb4,_0x16963b={}){this['add'](_0x5c2f2c,_0xbac145,_0x4b3bb4,{..._0x16963b,'raw':!![]});}[_0x11ff25(0x892)](_0x4ae5ad,_0x1a7b89,{corsOnly:corsOnly=![]}={}){const _0x387ec8=_0x11ff25;let _0x50e6c1=null,_0x5db65c=Infinity;for(const _0x278ed5 of this[_0x387ec8(0x8ae)]){if(corsOnly){if(!_0x278ed5[_0x387ec8(0x49b)]?.['cors'])continue;}else{if(_0x278ed5['method']!==_0x4ae5ad)continue;}if(!_0x278ed5[_0x387ec8(0x588)][_0x387ec8(0x2b9)]['test'](_0x1a7b89))continue;const _0x463dc7=_0x278ed5['matcher'][_0x387ec8(0x6c7)]?.[_0x387ec8(0x3be)]??0x0;if(_0x463dc7<_0x5db65c){_0x50e6c1=_0x278ed5,_0x5db65c=_0x463dc7;if(_0x463dc7===0x0)break;}}return _0x50e6c1;}[_0x11ff25(0x805)](_0x21b2e1,_0x4d72dd){const _0x161630=_0x11ff25,_0x1fc930=_0x4695f(_0x21b2e1),_0x377098=this[_0x161630(0x892)](_0x1fc930,_0x4d72dd);if(_0x377098)return _0x377098;if(_0x1fc930==='OPTIONS')return this[_0x161630(0x892)](_0x1fc930,_0x4d72dd,{'corsOnly':!![]});return null;}[_0x11ff25(0x477)](_0x58e267,_0x37ebcb){const _0x40f912=_0x11ff25;if(_0x58e267?.['meta']?.[_0x40f912(0x2b7)])return![];if(_0x37ebcb?.[_0x40f912(0x4e8)]?.[_0x40f912(0x270)])return![];return!![];}[_0x11ff25(0x223)](){const _0x3d4ead=_0x11ff25;return this[_0x3d4ead(0x8ae)]['filter'](_0x603d6b=>!_0x603d6b[_0x3d4ead(0x49b)]?.[_0x3d4ead(0x665)])[_0x3d4ead(0x8bd)](_0x2f0d47=>({'method':_0x2f0d47[_0x3d4ead(0x74a)],'path':_0x2f0d47[_0x3d4ead(0x1de)],'defaults':_0x2f0d47[_0x3d4ead(0x588)][_0x3d4ead(0x525)],'meta':_0x2f0d47[_0x3d4ead(0x49b)],'operation':_0x2f0d47[_0x3d4ead(0x3dc)]}));}[_0x11ff25(0x6fa)](_0x2c684b,_0x274f48,_0x276393={}){const _0x283c1b=_0x11ff25,{PassThrough:_0x2aeab3}=require$$5;this[_0x283c1b(0x88a)](_0x283c1b(0x4da),_0x2c684b,({params:_0x3ec5a7,query:_0x3cdedc,headers:_0xf5c56b,context:_0x38736e})=>{const _0x38ce2f=_0x283c1b,_0x5b19e1=new _0x2aeab3();let _0x5df0ed=null;const _0x3f2c72={};try{_0x38736e?.[_0x38ce2f(0x1d1)]?.[_0x38ce2f(0x54f)]?.[_0x38ce2f(0x825)](!![]);}catch{}_0x5b19e1[_0x38ce2f(0x6d4)](_0x38ce2f(0x206)),_0x5df0ed=setInterval(()=>{const _0x458506=_0x38ce2f;try{_0x5b19e1[_0x458506(0x6d4)](_0x458506(0x79b));}catch{}},0x3a98);const _0x2a5412=(_0x5ce5de,_0x5c3dd0,_0x330ad5={})=>{const _0xa976e3=_0x38ce2f;try{const _0x590850=_0x330ad5[_0xa976e3(0x235)]?String(_0x5c3dd0??''):JSON[_0xa976e3(0x46c)](_0x5c3dd0);_0x330ad5['id']!=null&&_0x5b19e1[_0xa976e3(0x6d4)](_0xa976e3(0x262)+_0x330ad5['id']+'\x0a');_0x5b19e1[_0xa976e3(0x6d4)](_0xa976e3(0x579)+_0x5ce5de+'\x0a');for(const _0x569924 of _0x590850['split']('\x0a')){_0x5b19e1[_0xa976e3(0x6d4)](_0xa976e3(0x1b0)+_0x569924+'\x0a');}_0x5b19e1[_0xa976e3(0x6d4)]('\x0a');}catch{}},_0x31fb2c=()=>{const _0x34b2ed=_0x38ce2f;_0x5df0ed&&(clearInterval(_0x5df0ed),_0x5df0ed=null);try{_0x5b19e1[_0x34b2ed(0x609)]();}catch{}},_0x442bf8=(_0xfd871c,_0x5388d3)=>{_0x3f2c72[_0xfd871c]=_0x5388d3;};_0x38736e?.[_0x38ce2f(0x1d1)]?.['on']('close',_0x31fb2c),_0x5b19e1['on'](_0x38ce2f(0x55c),_0x31fb2c);if(_0x38736e?.['auth']&&_0x38736e[_0x38ce2f(0x3bb)][_0x38ce2f(0x654)]!==!![]&&_0x38736e['auth']['isAuthenticated']){const _0x16acc7={'headers':_0xf5c56b??{},'cookies':_0x453374(_0xf5c56b?.['cookie']),'context':{},'socket':_0x38736e?.[_0x38ce2f(0x1d1)]?.[_0x38ce2f(0x54f)]??{'remoteAddress':null}},_0x4ab297=setInterval(async()=>{const _0x3f1219=_0x38ce2f;try{const _0x2f7259=await this[_0x3f1219(0x7ae)](_0x16acc7);if(_0x2f7259?.['open']===!![]||_0x2f7259?.['isAuthenticated'])return;_0x2a5412('auth',{'expired':!![]}),_0x31fb2c();}catch{_0x31fb2c();}},0xea60);_0x4ab297[_0x38ce2f(0x5e0)]?.(),_0x5b19e1['on'](_0x38ce2f(0x55c),()=>clearInterval(_0x4ab297));}const _0x37297d=_0x274f48({'send':_0x2a5412,'close':_0x31fb2c,'params':_0x3ec5a7??{},'query':_0x3cdedc??{},'headers':_0xf5c56b??{},'context':_0x38736e,'setHeader':_0x442bf8});return typeof _0x37297d===_0x38ce2f(0x500)&&_0x5b19e1['on'](_0x38ce2f(0x55c),_0x37297d),{'status':0xc8,'headers':{'content-type':'text/event-stream;\x20charset=utf-8','cache-control':_0x38ce2f(0x2ff),'connection':_0x38ce2f(0x65c),'x-accel-buffering':'no',..._0x3f2c72},'body':_0x5b19e1};},{..._0x276393,'sse':!![]});}async[_0x11ff25(0x834)](_0x458700,_0x491860){const _0x144d37=_0x11ff25;for(const _0x483783 of this[_0x144d37(0x218)]){if(!_0x483783[_0x144d37(0x8be)](_0x458700))continue;const _0x6005c9=await _0x483783[_0x144d37(0x34b)](_0x458700,_0x491860);if(_0x6005c9===![])return![];}return!![];}async[_0x11ff25(0x7a9)](_0xffa1fa,_0x2c5f16,_0x315724){let _0x10d3c6=0x0;const _0x57ffaf=async()=>{const _0x4a53f6=_0x1684,_0x153248=this[_0x4a53f6(0x7c3)][_0x10d3c6++];if(!_0x153248)return _0x315724();return _0x153248(_0xffa1fa,_0x2c5f16,_0x57ffaf);};return _0x57ffaf();}[_0x11ff25(0x241)](_0x2430c5,_0x4f529c){const _0x9e15ba=_0x11ff25,{status:status=0xc8,headers:headers={},body:_0x468c14}=_0x2430c5;if(status>=0x12c&&status<0x190)return _0x2430c5;if(_0x3875d(_0x468c14))return _0x2430c5;if(Buffer['isBuffer'](_0x468c14))return _0x2430c5;if(typeof _0x468c14===_0x9e15ba(0x2b2))return _0x2430c5;const _0x5da1a7={'time':+_0x4f529c[_0x9e15ba(0x849)](0x2)};if(_0x468c14?.[_0x9e15ba(0x49b)]&&typeof _0x468c14[_0x9e15ba(0x49b)]===_0x9e15ba(0x320)){const {time:_0x1b7c4f,..._0x41f042}=_0x468c14[_0x9e15ba(0x49b)];Object[_0x9e15ba(0x846)](_0x5da1a7,_0x41f042);}let _0x2f5fc0;if(status>=0x190){const _0xf650cc=_0x4d1bb7(status,_0x468c14);_0x2f5fc0={'data':null,'error':_0xf650cc,'meta':_0x5da1a7};}else{if(status===0xcc||_0x468c14==null)_0x2f5fc0={'data':null,'error':null,'meta':_0x5da1a7};else{let _0x4cc341;if(_0x9e15ba(0x647)in _0x468c14)_0x4cc341=_0x468c14[_0x9e15ba(0x647)];else{const {meta:_0x24e02f,..._0x796992}=_0x468c14;_0x4cc341=Object[_0x9e15ba(0x6c7)](_0x796992)[_0x9e15ba(0x3be)]>0x0?_0x796992:null;}_0x2f5fc0={'data':_0x4cc341,'error':null,'meta':_0x5da1a7};}}return{'status':status===0xcc?0xc8:status,'headers':headers,'body':_0x2f5fc0};}async['handle'](_0xb5933b,_0x19cbb4,_0x393e9d={},_0x24daa3={}){const _0xf0f52f=_0x11ff25;_0xb5933b=_0x4695f(_0xb5933b);const _0xe0f86f=this[_0xf0f52f(0x805)](_0xb5933b,_0x19cbb4),_0x72b6dc={'method':_0xb5933b,'path':_0x19cbb4,'headers':_0x393e9d['headers']??{},'body':_0x393e9d[_0xf0f52f(0x8b0)]??null,'query':_0x393e9d[_0xf0f52f(0x74e)]??{},'context':_0x24daa3,'cookies':_0x453374(_0x393e9d[_0xf0f52f(0x4e8)]?.[_0xf0f52f(0x27d)]),'route':_0xe0f86f,'socket':{'remoteAddress':_0x393e9d[_0xf0f52f(0x21a)]??'127.0.0.1'}};_0x72b6dc[_0xf0f52f(0x70c)]=_0x72b6dc[_0xf0f52f(0x70c)]||{};!_0x72b6dc[_0xf0f52f(0x70c)][_0xf0f52f(0x3bb)]&&(_0x72b6dc[_0xf0f52f(0x70c)][_0xf0f52f(0x3bb)]=await this['authenticateRequest'](_0x72b6dc));if(_0x72b6dc[_0xf0f52f(0x70c)]['auth']?.[_0xf0f52f(0x7f3)])return _0x37d74e({'status':0x193,'body':{'error':{'code':'BOOTSTRAP_LOCALHOST_ONLY','message':'Server\x20is\x20in\x20bootstrap\x20mode\x20and\x20only\x20accepts\x20localhost\x20connections\x20until\x20the\x20first\x20token\x20is\x20created.'}}});_0x72b6dc[_0xf0f52f(0x70c)]['auth']?.['user']&&!_0x72b6dc[_0xf0f52f(0x70c)][_0xf0f52f(0x1bc)]&&(_0x72b6dc[_0xf0f52f(0x70c)][_0xf0f52f(0x1bc)]=_0x72b6dc[_0xf0f52f(0x70c)][_0xf0f52f(0x3bb)]['user']);let _0xa44b0b=null;const _0x399af9={'status'(_0x4e91a1){const _0x1ba345=_0xf0f52f;_0xa44b0b=_0xa44b0b||{},_0xa44b0b[_0x1ba345(0x492)]=_0x4e91a1;},'setHeader'(_0x519eee,_0xa4b8e0){const _0x20f59a=_0xf0f52f;_0xa44b0b=_0xa44b0b||{},_0xa44b0b[_0x20f59a(0x4e8)]=_0xa44b0b[_0x20f59a(0x4e8)]||{};const _0x1ecc66=String(_0x519eee)[_0x20f59a(0x6e4)]();if(_0x1ecc66===_0x20f59a(0x620)){const _0x52fa22=_0xa44b0b[_0x20f59a(0x4e8)][_0x519eee];if(!_0x52fa22)_0xa44b0b[_0x20f59a(0x4e8)][_0x519eee]=_0xa4b8e0;else{if(Array[_0x20f59a(0x590)](_0x52fa22))_0x52fa22[_0x20f59a(0x338)](_0xa4b8e0);else _0xa44b0b['headers'][_0x519eee]=[_0x52fa22,_0xa4b8e0];}return;}_0xa44b0b['headers'][_0x519eee]=_0xa4b8e0;},'send'(_0x55973a){_0xa44b0b=_0xa44b0b||{},_0xa44b0b['body']=_0x55973a;}},_0x5df7cb=await this[_0xf0f52f(0x834)](_0x72b6dc,_0x399af9);if(!_0x5df7cb)return _0x37d74e(_0xa44b0b??{'status':0x193});const _0x3fa64a=this[_0xf0f52f(0x226)](_0x72b6dc);if(_0x3fa64a)return _0x37d74e(_0x3fa64a);const _0x5864a8=this[_0xf0f52f(0x383)](_0x72b6dc);if(_0x5864a8)return _0x37d74e(_0x5864a8);return await this['_runMiddlewares'](_0x72b6dc,_0x399af9,async()=>{const _0x90dcbd=await this['_dispatch'](_0x72b6dc);if(_0xa44b0b==null){_0xa44b0b=_0x90dcbd;return;}_0xa44b0b=_0x936f76(_0xa44b0b,_0x90dcbd);}),_0x37d74e(_0xa44b0b);}[_0x11ff25(0x226)](_0x411ea7){const _0x542e15=_0x11ff25,_0x292909=_0x411ea7[_0x542e15(0x314)]?.[_0x542e15(0x3dc)],_0x29a151=_0x292909?.['access'];if(!_0x292909?.[_0x542e15(0x32a)]||!_0x29a151)return null;if(_0x411ea7[_0x542e15(0x70c)]?.[_0x542e15(0x3bb)]?.[_0x542e15(0x654)]===!![]||_0x411ea7['context']?.['auth']?.['isSystem']===!![])return null;const _0x3ba0cf=_0x3590fb(_0x411ea7['context']),_0xc13232=Array[_0x542e15(0x590)](_0x29a151[_0x542e15(0x8c2)])?_0x29a151[_0x542e15(0x8c2)]:null;if(_0x29a151[_0x542e15(0x3e7)]&&_0x411ea7[_0x542e15(0x70c)]?.[_0x542e15(0x3fc)]!==!![])return{'status':0x193,'body':{'error':_0x542e15(0x2d6)}};if(_0xc13232&&_0xc13232[_0x542e15(0x3be)]>0x0&&!_0xc13232[_0x542e15(0x6d1)](_0x3ba0cf)&&!(_0x3ba0cf==='internal'&&_0xc13232[_0x542e15(0x6d1)](_0x542e15(0x50f))))return{'status':0x193,'body':{'error':'Forbidden'}};if(_0x29a151[_0x542e15(0x340)]&&!_0x2e7d8c(_0x411ea7))return{'status':0x191,'body':{'error':_0x542e15(0x649)}};const _0x4e66a2=_0x29a151[_0x542e15(0x1e6)];if(!_0x4e66a2)return null;if(_0x411ea7[_0x542e15(0x70c)]?.['auth']?.[_0x542e15(0x70d)]==='sync-node')return null;const _0x3ca28f=_0x411ea7[_0x542e15(0x70c)]?.[_0x542e15(0x3bb)]?.[_0x542e15(0x353)];if(!_0x3ca28f){if(_0x411ea7[_0x542e15(0x70c)]?.[_0x542e15(0x3bb)]?.['ok']===!![])return null;return{'status':0x193,'body':{'error':_0x542e15(0x263)}};}if(!_0x411ea7['params']&&_0x411ea7[_0x542e15(0x314)]?.[_0x542e15(0x588)]){const _0x1d7f38=_0x411ea7[_0x542e15(0x314)][_0x542e15(0x588)][_0x542e15(0x2b9)][_0x542e15(0x20a)](_0x411ea7[_0x542e15(0x1de)]);_0x1d7f38&&(_0x411ea7[_0x542e15(0x488)]={},_0x411ea7[_0x542e15(0x314)][_0x542e15(0x588)][_0x542e15(0x6c7)][_0x542e15(0x773)]((_0x120d9d,_0x4da830)=>{const _0x5b79cc=_0x542e15,_0x488dce=_0x1d7f38[_0x4da830+0x1];_0x411ea7[_0x5b79cc(0x488)][_0x120d9d]=_0x488dce?decodeURIComponent(_0x488dce):_0x411ea7[_0x5b79cc(0x314)][_0x5b79cc(0x588)]['defaults'][_0x120d9d]??undefined;}));}let _0x1c3b84=null;const _0x29a420=_0x29a151[_0x542e15(0x6e8)]===_0x542e15(0x344)?_0x542e15(0x45c):_0x29a151['scope']?.[_0x542e15(0x344)];_0x29a420&&(_0x1c3b84=_0x1950ca(_0x411ea7,_0x29a420));if(_0x1c3b84&&_0x1c3b84[_0x542e15(0x5e1)]('~')){const _0x1fca76=_0x29ca88(_0x4e66a2),_0x1f65a2=_0x291115(_0x3ca28f[_0x542e15(0x394)]||[],(_0x3ca28f[_0x542e15(0x296)]||{})[_0x1c3b84]||[]);if(!_0x3ed95a(_0x1f65a2,_0x1fca76))return{'status':0x193,'body':{'error':_0x542e15(0x608)+_0x1fca76+_0x542e15(0x888)}};}const _0x5b2887=_0x291115(_0x3ca28f[_0x542e15(0x394)]||[],_0x1c3b84?(_0x3ca28f['grants']||{})[_0x1c3b84]||[]:[]);if(!_0x3ed95a(_0x5b2887,_0x4e66a2))return{'status':0x193,'body':{'error':_0x542e15(0x608)+_0x4e66a2}};return null;}[_0x11ff25(0x383)](_0x58e4cb){const _0x486313=_0x11ff25,_0x990697=_0x58e4cb[_0x486313(0x314)],_0x24bf65=_0x990697?.['operation'];if(!_0x24bf65?.[_0x486313(0x32a)]||!_0x24bf65[_0x486313(0x623)])return null;let _0x2e1b72=_0x58e4cb[_0x486313(0x488)]??null;if(!_0x2e1b72&&_0x990697?.[_0x486313(0x588)]){const _0x2cbecf=_0x990697[_0x486313(0x588)]['regex']['exec'](_0x58e4cb[_0x486313(0x1de)]);_0x2cbecf&&(_0x2e1b72={},_0x990697[_0x486313(0x588)][_0x486313(0x6c7)][_0x486313(0x773)]((_0x20fac2,_0x555763)=>{const _0x13174d=_0x486313,_0x245884=_0x2cbecf[_0x555763+0x1];_0x2e1b72[_0x20fac2]=_0x245884?decodeURIComponent(_0x245884):_0x990697[_0x13174d(0x588)]['defaults'][_0x20fac2]??undefined;}));}const _0x5f0c6c=_0xf619c1(_0x990697,_0x2e1b72??{},_0x58e4cb['query']??{},_0x58e4cb[_0x486313(0x8b0)],_0x58e4cb['headers']??{}),_0x2e3449=_0x27a88c(_0x990697,_0x5f0c6c||{});if(!_0x2e3449)return null;const _0x50a173=_0x549c08(_0x2e3449[_0x486313(0x73d)]);return{'status':0x190,'body':{'error':_0x2e3449[_0x486313(0x5f9)],'code':_0x2e3449['code'],'message':_0x50a173?_0x486313(0x586)+_0x50a173:_0x486313(0x596),'details':_0x2e3449['errors']}};}['validateRouteInput'](_0x4015bf,_0x4c2637){const _0x4d58d4=_0x11ff25,_0x3c41ed=_0x27a88c(_0x4015bf,_0x4c2637||{});if(!_0x3c41ed)return null;return{'code':_0x3c41ed['code'],'message':_0x549c08(_0x3c41ed[_0x4d58d4(0x73d)])?_0x4d58d4(0x586)+_0x549c08(_0x3c41ed[_0x4d58d4(0x73d)]):_0x4d58d4(0x596),'details':_0x3c41ed[_0x4d58d4(0x73d)]};}async[_0x11ff25(0x5f4)](_0x5dd748){const _0x35bb79=_0x11ff25;if(_0x5dd748['method']==='OPTIONS'){const _0x336237=this[_0x35bb79(0x892)](_0x35bb79(0x47c),_0x5dd748[_0x35bb79(0x1de)],{'corsOnly':!![]});if(_0x336237)return{'status':0xcc,'headers':_0x236b37(_0x5dd748[_0x35bb79(0x4e8)],_0x336237[_0x35bb79(0x49b)][_0x35bb79(0x5c9)],_0x336237[_0x35bb79(0x74a)])||{}};}const _0x3f8a77=this[_0x35bb79(0x892)](_0x5dd748[_0x35bb79(0x74a)],_0x5dd748[_0x35bb79(0x1de)]);if(_0x3f8a77){const _0x291d52=_0x3f8a77[_0x35bb79(0x588)]['regex'][_0x35bb79(0x20a)](_0x5dd748[_0x35bb79(0x1de)]),_0x36b293={};_0x3f8a77[_0x35bb79(0x588)]['keys'][_0x35bb79(0x773)]((_0xd395a9,_0x19db6a)=>{const _0x1186bc=_0x35bb79,_0x14e8ad=_0x291d52[_0x19db6a+0x1];_0x36b293[_0xd395a9]=_0x14e8ad?decodeURIComponent(_0x14e8ad):_0x3f8a77['matcher'][_0x1186bc(0x525)][_0xd395a9]??undefined;}),_0x5dd748[_0x35bb79(0x488)]=_0x36b293;try{const _0x221c9f=await _0x3f8a77[_0x35bb79(0x34b)]({'params':_0x36b293,'body':_0x5dd748[_0x35bb79(0x8b0)],'query':_0x5dd748[_0x35bb79(0x74e)],'headers':_0x5dd748['headers'],'context':_0x5dd748['context']}),_0x3321cf=_0x37d74e(_0x221c9f),_0x1d31ae=_0x236b37(_0x5dd748['headers'],_0x3f8a77[_0x35bb79(0x49b)]?.['cors'],_0x3f8a77[_0x35bb79(0x74a)]);if(!_0x1d31ae)return _0x3321cf;return{..._0x3321cf,'headers':{..._0x3321cf[_0x35bb79(0x4e8)]||{},..._0x1d31ae}};}catch(_0x4ae0b6){const _0x2a3330=_0x4ae0b6?.['status']||_0x36b3f6[_0x4ae0b6?.[_0x35bb79(0x5f9)]]||0x1f4;return{'status':_0x2a3330,'body':{'error':_0x4ae0b6['message']||_0x35bb79(0x3fd),'code':_0x4ae0b6?.[_0x35bb79(0x5f9)]||_0x2a6bc3[_0x2a3330]||_0x35bb79(0x621)+_0x2a3330,'message':_0x4ae0b6?.[_0x35bb79(0x439)]||'Internal\x20error',..._0x4ae0b6?.[_0x35bb79(0x820)]!=null?{'details':_0x4ae0b6[_0x35bb79(0x820)]}:{}}};}}return{'status':0x194,'body':{'error':'Not\x20Found'}};}[_0x11ff25(0x4bc)](_0x8b58b3,_0x4def13={}){const _0x4f1e03=_0x11ff25;if(typeof _0x4def13===_0x4f1e03(0x2b2)||Array[_0x4f1e03(0x590)](_0x4def13))_0x4def13={'host':_0x4def13};_0x4def13=_0x4def13??{};const _0x346f9c=Number(_0x4def13[_0x4f1e03(0x38d)])||0x0;if(_0x346f9c>=0x1||_0x4def13[_0x4f1e03(0x35a)]!=null||_0x4def13[_0x4f1e03(0x22a)]!=null){const _0x21f056=new Error(_0x4f1e03(0x5b6)+'library\x20(okdb\x20node-model\x202.0).\x20For\x20multi-process\x20HTTP\x20serving\x20use\x20the\x20okdb\x20'+'CLI\x20(`okdb\x20listen`),\x20or\x20use\x20Node\x27s\x20built-in\x20`cluster`\x20module\x20and\x20call\x20'+_0x4f1e03(0x46b));_0x21f056[_0x4f1e03(0x5f9)]=_0x4f1e03(0x3f9);throw _0x21f056;}if(this[_0x4f1e03(0x622)])throw new Error(_0x4f1e03(0x4c4));const _0x5d430f=_0x4def13['host']==null?[undefined]:[][_0x4f1e03(0x249)](_0x4def13[_0x4f1e03(0x367)]);if(!_0x5d430f[_0x4f1e03(0x3be)]||_0x5d430f['some'](_0x78e632=>_0x78e632!==undefined&&(typeof _0x78e632!==_0x4f1e03(0x2b2)||!_0x78e632))){const _0x20979f=new Error('http.listen:\x20host\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20an\x20array\x20of\x20them');_0x20979f['code']='BAD_HOST';throw _0x20979f;}_0x8b58b3&&this[_0x4f1e03(0x3bb)]['cookieName']===_0x4f1e03(0x558)&&(this['auth'][_0x4f1e03(0x77d)]=_0x4f1e03(0x3d1)+_0x8b58b3,this[_0x4f1e03(0x3ff)]?.['auth']&&(this['_okdb'][_0x4f1e03(0x3bb)][_0x4f1e03(0x6f9)]=this['auth'][_0x4f1e03(0x77d)]));const _0x17d580=this[_0x4f1e03(0x3ff)]?.[_0x4f1e03(0x663)]?.[_0x4f1e03(0x612)]?.[_0x4f1e03(0x3d5)]??![],_0x339b31=async(_0x3f8d7c,_0x22e77f)=>{const _0x12b7dc=_0x4f1e03,_0x42af56=Date[_0x12b7dc(0x81b)]();if(_0x17d580){const _0x58ea49=_0x3f8d7c[_0x12b7dc(0x542)]||'/',_0x527711=_0x3f8d7c[_0x12b7dc(0x4e8)]?.[_0x12b7dc(0x68d)]?_0x3f8d7c[_0x12b7dc(0x4e8)][_0x12b7dc(0x68d)]['replace'](/^Bearer\s+(\S{0,8})\S*/i,_0x12b7dc(0x39d)):'-',_0x156422=_0x3f8d7c[_0x12b7dc(0x4e8)]?.[_0x12b7dc(0x83f)]||'-',_0x2a38e0=_0x3f8d7c[_0x12b7dc(0x4e8)]?.[_0x12b7dc(0x410)]||_0x3f8d7c[_0x12b7dc(0x4e8)]?.[_0x12b7dc(0x2c9)]||'-',_0x58dd88=_0x3f8d7c[_0x12b7dc(0x4e8)]?.[_0x12b7dc(0x293)]||'-';process[_0x12b7dc(0x6cd)][_0x12b7dc(0x6d4)](_0x12b7dc(0x240)+_0x3f8d7c['method']['padEnd'](0x7)+'\x20'+_0x58ea49['padEnd'](0x2d)+'\x20'+('auth='+_0x527711+_0x12b7dc(0x551)+_0x58dd88+'\x20cf-ray='+_0x156422+'\x20cf-ip='+_0x2a38e0+'\x0a'));}try{const _0xb31c9f=new _0x29b30f(_0x3f8d7c[_0x12b7dc(0x542)],_0x12b7dc(0x883)+_0x3f8d7c[_0x12b7dc(0x4e8)][_0x12b7dc(0x367)]),_0x15a7df=this['_matchRoute'](_0x3f8d7c[_0x12b7dc(0x74a)],_0xb31c9f['pathname']),_0x4c1a5a=_0x15a7df?.['meta']?.[_0x12b7dc(0x235)]===!![];if(_0x4c1a5a){const _0x137c86=_0x3f8d7c['headers']?.[_0x12b7dc(0x6e2)];if(_0x137c86!=null){const _0x221589=Number(_0x137c86);if(Number[_0x12b7dc(0x1be)](_0x221589)&&_0x221589>this['maxBodyBytes']){_0x22e77f[_0x12b7dc(0x4e9)]=0x19d,_0x22e77f[_0x12b7dc(0x424)](_0x12b7dc(0x7c5));return;}}}const _0x2bbfdd=_0x4c1a5a?null:await _0x543b75(_0x3f8d7c,this[_0x12b7dc(0x6dc)]),_0x88adaa=_0x4c1a5a?_0x582da2(_0x3f8d7c,this[_0x12b7dc(0x6dc)]):undefined,_0x29836c=await this[_0x12b7dc(0x781)](_0x3f8d7c[_0x12b7dc(0x74a)],_0xb31c9f[_0x12b7dc(0x421)],{'body':_0x2bbfdd,'query':Object[_0x12b7dc(0x6e9)](_0xb31c9f[_0x12b7dc(0x75a)][_0x12b7dc(0x444)]()),'headers':_0x3f8d7c[_0x12b7dc(0x4e8)]},{'req':_0x3f8d7c,'res':_0x22e77f,'rawStream':_0x88adaa}),_0x36d5e1=this[_0x12b7dc(0x805)](_0x3f8d7c[_0x12b7dc(0x74a)],_0xb31c9f[_0x12b7dc(0x421)]),_0x37df1e=Date[_0x12b7dc(0x81b)]()-_0x42af56,_0x28a94b=this['_shouldWrapResponse'](_0x36d5e1,_0x29836c)?this[_0x12b7dc(0x241)](_0x29836c,_0x37df1e):_0x37d74e(_0x29836c),_0x193eb7=(_0x28a94b[_0x12b7dc(0x492)]||0xc8)>=0x190;this[_0x12b7dc(0x8b6)][_0x12b7dc(0x637)](_0x3f8d7c['method'],_0x37df1e,_0x193eb7),_0x49725a(_0x22e77f,_0x28a94b);if(_0x17d580){const _0x51952a=_0x28a94b['status']||0xc8,_0x1cd1ee=Date[_0x12b7dc(0x81b)]()-_0x42af56;process[_0x12b7dc(0x6cd)]['write'](_0x12b7dc(0x7a5)+_0x3f8d7c['method'][_0x12b7dc(0x6ee)](0x7)+'\x20'+_0xb31c9f['pathname'][_0x12b7dc(0x6ee)](0x2d)+'\x20'+_0x51952a+'\x20\x20'+_0x1cd1ee+_0x12b7dc(0x8ca));}}catch(_0x3bc87c){const _0xa267bc=Date[_0x12b7dc(0x81b)]()-_0x42af56;this[_0x12b7dc(0x8b6)][_0x12b7dc(0x637)](_0x3f8d7c[_0x12b7dc(0x74a)],_0xa267bc,!![]);const _0xe0ba40=_0x3bc87c?.['status']||0x1f4;_0x22e77f['statusCode']=_0xe0ba40,_0xe0ba40===0x19d?_0x22e77f['end'](_0x12b7dc(0x7c5)):_0x22e77f[_0x12b7dc(0x424)](_0x3bc87c[_0x12b7dc(0x439)]||_0x12b7dc(0x3fd));}};this[_0x4f1e03(0x8a8)]=_0x5d430f[_0x4f1e03(0x8bd)](_0x62efe1=>{const _0x343aef=_0x4f1e03,_0x508657=_0x4e156a[_0x343aef(0x549)](_0x339b31);_0x508657['on']('connection',_0xd312e2=>{const _0x32791f=_0x343aef;this[_0x32791f(0x6d6)][_0x32791f(0x88a)](_0xd312e2),_0xd312e2['on']('close',()=>this[_0x32791f(0x6d6)][_0x32791f(0x1d4)](_0xd312e2));});if(_0x62efe1===undefined)_0x508657[_0x343aef(0x4bc)](_0x8b58b3);else _0x508657['listen'](_0x8b58b3,_0x62efe1);return _0x508657;}),this['server']=this[_0x4f1e03(0x8a8)][0x0];for(const _0x3d3e41 of this[_0x4f1e03(0x8a8)]['slice'](0x1))_0x3d3e41['on'](_0x4f1e03(0x21f),_0x5803a8=>this[_0x4f1e03(0x622)]?.[_0x4f1e03(0x6d7)](_0x4f1e03(0x21f),_0x5803a8));const _0x25f383=_0x48f418(_0x8b58b3,_0x4def13[_0x4f1e03(0x367)]),_0x271340=this[_0x4f1e03(0x3ff)];return _0x271340?.[_0x4f1e03(0x317)]&&(_0x271340['processes'][_0x4f1e03(0x1e3)](_0x25f383),require$$1$1[_0x4f1e03(0x3c7)]?_0x271340[_0x4f1e03(0x210)]?.({'kind':_0x4f1e03(0x563)})['catch'](()=>{}):_0x271340[_0x4f1e03(0x460)]?.({'kind':_0x4f1e03(0x295),'listenAddr':_0x25f383})[_0x4f1e03(0x6ce)](()=>{})),this['server'];}async[_0x11ff25(0x55c)](_0x159581={}){const _0xc86a17=_0x11ff25,_0x4885f3=this[_0xc86a17(0x622)];this[_0xc86a17(0x622)]=null;const _0x592956=this[_0xc86a17(0x8a8)]['includes'](_0x4885f3)?this[_0xc86a17(0x8a8)]:_0x4885f3?[_0x4885f3]:[];this[_0xc86a17(0x8a8)]=[];if(_0x4885f3&&_0x4885f3[_0xc86a17(0x2dd)]){try{await _0x4885f3[_0xc86a17(0x55c)]();}catch{}this['metrics']&&this[_0xc86a17(0x8b6)]['close']();return;}if(_0x592956[_0xc86a17(0x3be)]){const _0x47273a=_0x159581[_0xc86a17(0x280)]===Infinity?Infinity:Number[_0xc86a17(0x1be)](_0x159581['forceAfterMs'])?Math[_0xc86a17(0x321)](0x0,_0x159581[_0xc86a17(0x280)]):0x3e8,_0xe03765=_0x10733b=>new Promise(_0x3c54d6=>{const _0x54888e=_0xc86a17;let _0x223b1a=![],_0xff1e20=null,_0x2d14dd=null;const _0x416470=()=>{if(_0x223b1a)return;_0x223b1a=!![];if(_0xff1e20)clearTimeout(_0xff1e20);if(_0x2d14dd)clearTimeout(_0x2d14dd);_0x3c54d6();};try{_0x10733b[_0x54888e(0x55c)](_0x416470);}catch{_0x416470();return;}try{_0x10733b[_0x54888e(0x89b)]?.();}catch{}if(_0x17dc0e(_0x47273a))return;_0xff1e20=setTimeout(()=>{const _0x2343f0=_0x54888e;try{_0x10733b[_0x2343f0(0x466)]?.();}catch{}for(const _0x43badd of this[_0x2343f0(0x6d6)]){try{_0x43badd[_0x2343f0(0x609)]();}catch{}}_0x2d14dd=setTimeout(_0x416470,0x64),_0x2d14dd[_0x2343f0(0x5e0)]?.();},_0x20f58b(_0x47273a)),_0xff1e20[_0x54888e(0x5e0)]?.();});await Promise[_0xc86a17(0x75b)](_0x592956[_0xc86a17(0x8bd)](_0xe03765));}this[_0xc86a17(0x8b6)]&&this[_0xc86a17(0x8b6)][_0xc86a17(0x55c)]();}[_0x11ff25(0x80d)](_0x5adc6c,_0x47421d,_0x4bf729=0x36ee80){const _0x72081e=_0x11ff25,_0xcf391a=Date[_0x72081e(0x81b)](),_0x4b2ebf=Buffer['from'](JSON['stringify']({'iat':_0xcf391a,'exp':_0xcf391a+_0x4bf729,..._0x5adc6c}))[_0x72081e(0x1f5)](_0x72081e(0x68f)),_0xbf247d=_0x28c88b(_0x4b2ebf,_0x47421d);return _0x4b2ebf+'.'+_0xbf247d;}[_0x11ff25(0x2b8)](_0x5126c4,_0x34e59a={}){const _0x27b46f=_0x11ff25,{httpOnly:httpOnly=!![],sameSite:sameSite=_0x27b46f(0x4b2),path:path='/',secure:secure=![],maxAge:maxAge=null,expires:expires=null}=_0x34e59a;let _0x256bf6=this[_0x27b46f(0x3bb)][_0x27b46f(0x77d)]+'='+_0x5126c4;if(httpOnly)_0x256bf6+=';\x20HttpOnly';if(sameSite)_0x256bf6+=_0x27b46f(0x386)+sameSite;if(path)_0x256bf6+=_0x27b46f(0x570)+path;if(secure)_0x256bf6+=_0x27b46f(0x656);if(Number[_0x27b46f(0x1be)](maxAge))_0x256bf6+=_0x27b46f(0x68a)+Math[_0x27b46f(0x321)](0x0,Math[_0x27b46f(0x3a7)](maxAge));if(expires instanceof Date)_0x256bf6+=_0x27b46f(0x5ce)+expires[_0x27b46f(0x4ee)]();return _0x256bf6;}[_0x11ff25(0x751)](_0x93c0e2=this[_0x11ff25(0x3bb)][_0x11ff25(0x77d)],_0x4ede43={}){const _0x451257=_0x11ff25,{path:path='/',sameSite:sameSite=_0x451257(0x4b2),secure:secure=![],httpOnly:httpOnly=!![]}=_0x4ede43;let _0x4e708b=_0x93c0e2+'=';if(httpOnly)_0x4e708b+=_0x451257(0x7e9);if(sameSite)_0x4e708b+=_0x451257(0x386)+sameSite;if(path)_0x4e708b+=_0x451257(0x570)+path;if(secure)_0x4e708b+=_0x451257(0x656);return _0x4e708b+=_0x451257(0x30f),_0x4e708b;}['verifyCookie'](_0x52ea13,_0x33b65d){const _0x9707a3=_0x11ff25;if(!_0x52ea13)return null;const [_0x334059,_0xcaddad]=String(_0x52ea13)[_0x9707a3(0x735)]('.');if(!_0x334059||!_0xcaddad)return null;const _0x301856=_0x28c88b(_0x334059,_0x33b65d);if(!_0x56fe4d(_0xcaddad,_0x301856))return null;try{const _0x56af8b=JSON[_0x9707a3(0x81a)](Buffer[_0x9707a3(0x4e1)](_0x334059,'base64url')[_0x9707a3(0x1f5)]());if(_0x56af8b[_0x9707a3(0x7a6)]<=Date[_0x9707a3(0x81b)]())return null;return _0x56af8b;}catch{return null;}}[_0x11ff25(0x56b)](_0x52aba0){const _0x5e00bb=_0x11ff25;if(this[_0x5e00bb(0x3ff)]?.['auth'])return this['_okdb'][_0x5e00bb(0x3bb)][_0x5e00bb(0x56b)](_0x52aba0);return _0x439549(_0x52aba0);}['issueToken'](_0xefe82f){const _0x19eb98=_0x11ff25;if(this[_0x19eb98(0x3ff)]?.['auth'])return this['_okdb'][_0x19eb98(0x3bb)][_0x19eb98(0x48c)](_0xefe82f);const _0x185fb0=this[_0x19eb98(0x473)]?.[_0x19eb98(0x721)]??0x36ee80,_0x40f665=this[_0x19eb98(0x473)]?.[_0x19eb98(0x780)];return _0x58fcba(_0xefe82f,_0x40f665,_0x185fb0);}[_0x11ff25(0x627)](_0x30299b){const _0x401cf6=_0x11ff25;if(this[_0x401cf6(0x3ff)]?.['auth'])return this['_okdb'][_0x401cf6(0x3bb)]['authenticateToken'](_0x30299b);const _0x5381c5=this['_authOptions']?.[_0x401cf6(0x780)];return _0x12102e(_0x30299b,_0x5381c5);}async[_0x11ff25(0x7ae)](_0x5d6440){const _0x2c8168=_0x11ff25;if(this[_0x2c8168(0x3ff)]?.['auth'])return this[_0x2c8168(0x3ff)][_0x2c8168(0x3bb)][_0x2c8168(0x7ae)](_0x5d6440);if(_0x5d6440[_0x2c8168(0x70c)]?.[_0x2c8168(0x3fc)]===!![]||this[_0x2c8168(0x38a)]==='open')return{'id':_0x2c8168(0x1c8),'username':_0x2c8168(0x1c8),'roles':[_0x2c8168(0x45e)],'isAuthenticated':!![],'isSystem':!![],'user':{'id':'system','username':'system','roles':['admin'],'isAuthenticated':!![],'isSystem':!![]}};const _0x3e651d=this[_0x2c8168(0x56b)](_0x5d6440[_0x2c8168(0x4e8)]?.[_0x2c8168(0x68d)]),_0x2f168c=_0x5d6440['cookies']?.[this['auth'][_0x2c8168(0x77d)]],_0x4d944f=_0x3e651d||_0x2f168c;if(!_0x4d944f)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x3d0d50=this[_0x2c8168(0x627)](_0x4d944f);if(!_0x3d0d50)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0xffb0ef={'id':_0x3d0d50[_0x2c8168(0x208)]??null,'username':_0x3d0d50['username']??null,'roles':Array[_0x2c8168(0x590)](_0x3d0d50['roles'])?_0x3d0d50[_0x2c8168(0x5df)]:[],'isAuthenticated':!![],'isSystem':![]};return{'id':_0xffb0ef['id'],'username':_0xffb0ef[_0x2c8168(0x6c3)],'roles':_0xffb0ef['roles'],'isAuthenticated':!![],'isSystem':![],'user':_0xffb0ef,'claims':_0x3d0d50,'subject':_0xffb0ef['id']};}async[_0x11ff25(0x80b)](_0x4d967e,_0x35bef0={}){const _0x55c794=_0x11ff25,_0x2c386f=_0x53a234(_0x4d967e),_0x25d2e1=Array[_0x55c794(0x590)](_0x35bef0[_0x55c794(0x739)])&&_0x35bef0[_0x55c794(0x739)][_0x55c794(0x3be)]>0x0?_0x35bef0['allowedAlgs']:[_0x55c794(0x2bc),_0x55c794(0x2b3)],_0x3e5208=_0x2c386f[_0x55c794(0x2c6)]?.[_0x55c794(0x650)];if(!_0x25d2e1['includes'](_0x3e5208))throw new Error(_0x55c794(0x277)+_0x3e5208);if(!_0x2c386f['header']?.[_0x55c794(0x8aa)])throw new Error(_0x55c794(0x6bc));const _0x587ad4=await this[_0x55c794(0x213)](_0x35bef0);if(!_0x587ad4?.[_0x55c794(0x4d9)])throw new Error(_0x55c794(0x2f0));const _0x52ff12=await this[_0x55c794(0x1e0)](_0x587ad4['jwks_uri'],_0x2c386f[_0x55c794(0x2c6)][_0x55c794(0x8aa)],_0x35bef0);if(!_0x1d2323(_0x3e5208,_0x52ff12,_0x2c386f[_0x55c794(0x6bd)],_0x2c386f[_0x55c794(0x3bf)]))throw new Error(_0x55c794(0x63f));const _0x2c9b90=Math['floor'](Date['now']()/0x3e8),_0xcb4cc8=_0x2c386f[_0x55c794(0x23f)]||{};if(_0xcb4cc8['iss']!==_0x587ad4['issuer'])throw new Error(_0x55c794(0x5a4));const _0x5b228a=_0x35bef0[_0x55c794(0x53d)];if(_0x5b228a){const _0x4a03c1=_0x5ac504(_0xcb4cc8[_0x55c794(0x63e)]);if(!_0x4a03c1['includes'](_0x5b228a))throw new Error(_0x55c794(0x202));}if(typeof _0xcb4cc8[_0x55c794(0x7a6)]!=='number'||_0xcb4cc8[_0x55c794(0x7a6)]<=_0x2c9b90)throw new Error(_0x55c794(0x465));if(_0xcb4cc8[_0x55c794(0x526)]!=null&&_0xcb4cc8['nbf']>_0x2c9b90)throw new Error(_0x55c794(0x731));if(_0xcb4cc8[_0x55c794(0x4e4)]==='id')throw new Error(_0x55c794(0x62c));return{'subject':_0xcb4cc8[_0x55c794(0x208)]??null,'email':_0xcb4cc8['email']??null,'scopes':typeof _0xcb4cc8[_0x55c794(0x6e8)]===_0x55c794(0x2b2)?_0xcb4cc8['scope'][_0x55c794(0x735)](/\s+/)['filter'](Boolean):[],'claims':_0xcb4cc8,'tokenType':_0x55c794(0x564)};}async[_0x11ff25(0x213)](_0xa97f8a={}){const _0x55db45=_0x11ff25,_0x3dde81=String(_0xa97f8a[_0x55db45(0x48a)]||'')[_0x55db45(0x2f9)](/\/+$/,'');if(!_0x3dde81)return null;const _0x48fe8e=Number[_0x55db45(0x1be)](_0xa97f8a[_0x55db45(0x326)])?_0xa97f8a[_0x55db45(0x326)]:0xa*0x3c*0x3e8;if(this['_oidcDiscoveryCache']?.[_0x55db45(0x48a)]===_0x3dde81&&this[_0x55db45(0x1cc)]['expiresAt']>Date[_0x55db45(0x81b)]())return this['_oidcDiscoveryCache']['value'];const _0x3dc234=await _0x39f127(_0x3dde81+'/.well-known/openid-configuration'),_0x2a39f2={'issuer':_0x3dc234[_0x55db45(0x48a)]||_0x3dde81,'authorization_endpoint':_0xa97f8a[_0x55db45(0x392)]||_0x3dc234[_0x55db45(0x745)],'token_endpoint':_0xa97f8a['tokenUrl']||_0x3dc234[_0x55db45(0x4a0)],'jwks_uri':_0xa97f8a[_0x55db45(0x358)]||_0x3dc234[_0x55db45(0x4d9)]};return this[_0x55db45(0x1cc)]={'issuer':_0x3dde81,'value':_0x2a39f2,'expiresAt':Date[_0x55db45(0x81b)]()+_0x48fe8e},_0x2a39f2;}async['_fetchJwks'](_0x24518b,_0x14ac8a=0x5*0x3c*0x3e8){const _0x3e366f=_0x11ff25,_0x323756=await _0x39f127(_0x24518b),_0x47f2ed=new Map();for(const _0xb312d8 of _0x323756[_0x3e366f(0x6c7)]||[]){if(!_0xb312d8?.[_0x3e366f(0x8aa)])continue;_0x47f2ed[_0x3e366f(0x4dc)](_0xb312d8['kid'],_0x5215fd(_0xb312d8));}return this['_jwksCache']={'uri':_0x24518b,'keys':_0x47f2ed,'expiresAt':Date[_0x3e366f(0x81b)]()+_0x14ac8a},this['_jwksCache'];}async[_0x11ff25(0x1e0)](_0x4ac8a8,_0x39091b,_0x13ce17={}){const _0xa7f06a=_0x11ff25,_0x3f684a=Number[_0xa7f06a(0x1be)](_0x13ce17[_0xa7f06a(0x71c)])?_0x13ce17['jwksTtlMs']:0x5*0x3c*0x3e8,_0xba1147=0x1e*0x3e8,_0x50d8a0=this['_jwksNegativeCache'][_0xa7f06a(0x5ab)](_0x39091b);if(_0x50d8a0!==undefined&&_0x50d8a0>Date[_0xa7f06a(0x81b)]())throw new Error(_0xa7f06a(0x6b3)+_0x39091b);(!this[_0xa7f06a(0x5b7)]||this['_jwksCache'][_0xa7f06a(0x452)]!==_0x4ac8a8||this[_0xa7f06a(0x5b7)][_0xa7f06a(0x6ad)]<=Date[_0xa7f06a(0x81b)]())&&await this['_fetchJwks'](_0x4ac8a8,_0x3f684a);let _0x403f1d=this[_0xa7f06a(0x5b7)]?.[_0xa7f06a(0x6c7)]?.[_0xa7f06a(0x5ab)](_0x39091b);if(_0x403f1d)return _0x403f1d;await this['_fetchJwks'](_0x4ac8a8,_0x3f684a),_0x403f1d=this[_0xa7f06a(0x5b7)]?.[_0xa7f06a(0x6c7)]?.[_0xa7f06a(0x5ab)](_0x39091b);if(!_0x403f1d){this[_0xa7f06a(0x73a)][_0xa7f06a(0x4dc)](_0x39091b,Date[_0xa7f06a(0x81b)]()+_0xba1147);throw new Error('Unknown\x20JWKS\x20kid:\x20'+_0x39091b);}return _0x403f1d;}[_0x11ff25(0x7ed)](_0x362974){const _0x1253ee=_0x11ff25;if(this[_0x1253ee(0x3ff)]?.[_0x1253ee(0x3bb)])return this[_0x1253ee(0x3ff)][_0x1253ee(0x3bb)]['_normalizeOAuthAuthResult'](_0x362974);const _0x32b2b5=_0x362974?.[_0x1253ee(0x7dc)]||{},_0x3e2ccd={'sub':_0x362974?.['subject']??_0x32b2b5[_0x1253ee(0x208)]??null,'email':_0x362974?.[_0x1253ee(0x523)]??_0x32b2b5[_0x1253ee(0x523)]??null,'name':_0x362974?.[_0x1253ee(0x2a9)]??_0x32b2b5['name']??_0x32b2b5[_0x1253ee(0x312)]??null,'groups':_0x362974?.[_0x1253ee(0x1f2)]??_0x32b2b5['groups']??[],'roles':_0x362974?.[_0x1253ee(0x5df)]??_0x32b2b5[_0x1253ee(0x5df)]??[]};return{'type':'oauth','tokenType':_0x362974?.['tokenType']??'access','subject':_0x3e2ccd['sub'],'email':_0x3e2ccd['email'],'scopes':_0x362974?.['scopes']??_0x32b2b5[_0x1253ee(0x6e8)]?.[_0x1253ee(0x735)]?.('\x20')?.['filter'](Boolean)??[],'claims':_0x32b2b5,'user':_0x3e2ccd,'isAuthenticated':!![]};}[_0x11ff25(0x48f)](_0x2075b7={},_0x28264c=0x927c0){const _0x21b997=_0x11ff25;if(this[_0x21b997(0x3ff)]?.['auth'])return this[_0x21b997(0x3ff)][_0x21b997(0x3bb)][_0x21b997(0x48f)](_0x2075b7,_0x28264c);const _0x51adc2=_0x3f27c2(0x18);this[_0x21b997(0x55b)]['set'](_0x51adc2,{..._0x2075b7,'exp':Date['now']()+_0x28264c});if(this['_loginStates'][_0x21b997(0x4a8)]%0x32===0x0){const _0x10845c=Date[_0x21b997(0x81b)]();for(const [_0x3b7da1,_0x35061e]of this['_loginStates']){if(_0x35061e[_0x21b997(0x7a6)]<=_0x10845c)this[_0x21b997(0x55b)][_0x21b997(0x1d4)](_0x3b7da1);}}return _0x51adc2;}[_0x11ff25(0x69f)](_0x36f9f8){const _0x116e32=_0x11ff25;if(this[_0x116e32(0x3ff)]?.[_0x116e32(0x3bb)])return this[_0x116e32(0x3ff)][_0x116e32(0x3bb)]['consumeLoginState'](_0x36f9f8);if(!_0x36f9f8)return null;const _0x1f6cc4=this[_0x116e32(0x55b)]['get'](_0x36f9f8);this[_0x116e32(0x55b)][_0x116e32(0x1d4)](_0x36f9f8);if(!_0x1f6cc4)return null;if(_0x1f6cc4[_0x116e32(0x7a6)]<=Date[_0x116e32(0x81b)]())return null;return _0x1f6cc4;}}function _0x37d74e(_0x35a3b1){const _0x1c102a=_0x11ff25;if(_0x35a3b1==null)return{'status':0xcc};if(Buffer[_0x1c102a(0x200)](_0x35a3b1)||_0x3875d(_0x35a3b1))return{'status':0xc8,'body':_0x35a3b1};if(typeof _0x35a3b1===_0x1c102a(0x320)&&_0x1c102a(0x492)in _0x35a3b1){if(!(_0x1c102a(0x8b0)in _0x35a3b1)&&!_0x3875d(_0x35a3b1['body'])){const {status:_0x295d8e,headers:_0x952711,..._0x39c56a}=_0x35a3b1;if(Object[_0x1c102a(0x6c7)](_0x39c56a)[_0x1c102a(0x3be)]>0x0)return{'status':_0x295d8e,'headers':_0x952711,'body':_0x39c56a};}return _0x35a3b1;}return{'status':0xc8,'body':_0x35a3b1};}function _0x3875d(_0x4e27da){const _0x6c9032=_0x11ff25;return _0x4e27da&&typeof _0x4e27da[_0x6c9032(0x3c4)]===_0x6c9032(0x500);}function _0x582da2(_0x5eee69,_0x5bf5f1){const _0x447733=_0x11ff25,{PassThrough:_0x1c06f9}=require$$5;let _0x33cba0=0x0,_0x42ba80=![];const _0x31d592=new _0x1c06f9();return _0x5eee69['on'](_0x447733(0x44d),_0xc04bfc=>{const _0x22ba43=_0x447733;if(_0x42ba80)return;_0x33cba0+=_0xc04bfc['length'];if(_0x33cba0>_0x5bf5f1){_0x42ba80=!![];const _0x389a3f=new Error('Payload\x20too\x20large');_0x389a3f[_0x22ba43(0x492)]=0x19d,_0x31d592[_0x22ba43(0x609)](_0x389a3f);return;}if(!_0x31d592[_0x22ba43(0x24d)])_0x31d592['push'](_0xc04bfc);}),_0x5eee69['on'](_0x447733(0x424),()=>{const _0x59ca25=_0x447733;!_0x42ba80&&!_0x31d592[_0x59ca25(0x24d)]&&(_0x42ba80=!![],_0x31d592[_0x59ca25(0x424)]());}),_0x5eee69['on'](_0x447733(0x21f),_0x3c1bd8=>{const _0x5f0ca2=_0x447733;if(!_0x31d592[_0x5f0ca2(0x24d)])_0x31d592[_0x5f0ca2(0x609)](_0x3c1bd8);}),_0x5eee69['pause'](),_0x31d592['on'](_0x447733(0x32b),()=>{const _0x5ac5ba=_0x447733;if(!_0x31d592[_0x5ac5ba(0x24d)])_0x5eee69[_0x5ac5ba(0x32b)]();}),_0x31d592;}function _0x543b75(_0x38d3e8,_0x2bb581){const _0x28b96c=_0x11ff25;if(_0x38d3e8['method']===_0x28b96c(0x4da)||_0x38d3e8[_0x28b96c(0x74a)]===_0x28b96c(0x41e))return null;const _0x29a3a4=_0x38d3e8[_0x28b96c(0x4e8)]?.[_0x28b96c(0x6e2)];if(_0x29a3a4!=null){const _0x503267=Number(_0x29a3a4);if(Number[_0x28b96c(0x1be)](_0x503267)&&_0x503267>_0x2bb581){const _0x36d19d=new Error(_0x28b96c(0x7c5));_0x36d19d[_0x28b96c(0x492)]=0x19d;throw _0x36d19d;}}return new Promise((_0x1f64b7,_0x1c17b0)=>{const _0x410efc=_0x28b96c;let _0x40023f='',_0x258028=0x0;_0x38d3e8['on'](_0x410efc(0x44d),_0x52cf4a=>{const _0x37b309=_0x410efc;_0x258028+=_0x52cf4a[_0x37b309(0x3be)];if(_0x258028>_0x2bb581){try{_0x38d3e8[_0x37b309(0x609)]();}catch{}const _0x40f8d9=new Error(_0x37b309(0x7c5));_0x40f8d9[_0x37b309(0x492)]=0x19d,_0x1c17b0(_0x40f8d9);return;}_0x40023f+=_0x52cf4a;}),_0x38d3e8['on']('end',()=>{const _0x2e2786=_0x410efc;if(!_0x40023f)return _0x1f64b7(null);const _0x794fc6=_0x38d3e8[_0x2e2786(0x4e8)]?.[_0x2e2786(0x836)]||'';if(_0x794fc6[_0x2e2786(0x6d1)](_0x2e2786(0x7f9))){const _0x34d00f={};for(const [_0x3e8b89,_0x1b99cc]of new URLSearchParams(_0x40023f))_0x34d00f[_0x3e8b89]=_0x1b99cc;return _0x1f64b7(_0x34d00f);}try{_0x1f64b7(JSON[_0x2e2786(0x81a)](_0x40023f));}catch(_0x28f7eb){_0x1c17b0(_0x28f7eb);}}),_0x38d3e8['on']('error',_0x1c17b0);});}function _0x49725a(_0x3700a5,_0xf26e50){const _0x23f754=_0x11ff25,{status:status=0xc8,headers:headers={},body:_0x48304e}=_0xf26e50;_0x3700a5[_0x23f754(0x4e9)]=status;for(const [_0x493586,_0x846f3d]of Object[_0x23f754(0x444)](headers)){_0x3700a5[_0x23f754(0x4b0)](_0x493586,_0x846f3d);}if(_0x48304e==null){_0x3700a5['end']();return;}if(_0x3875d(_0x48304e)){_0x48304e[_0x23f754(0x3c4)](_0x3700a5);return;}if(Buffer[_0x23f754(0x200)](_0x48304e)){_0x3700a5['end'](_0x48304e);return;}if(typeof _0x48304e===_0x23f754(0x320)){!_0x3700a5[_0x23f754(0x2cd)]('Content-Type')&&_0x3700a5[_0x23f754(0x4b0)](_0x23f754(0x6cc),_0x23f754(0x5c1));_0x3700a5['end'](JSON[_0x23f754(0x46c)](_0x48304e));return;}_0x3700a5[_0x23f754(0x424)](String(_0x48304e));}function _0x48f418(_0x7f1375,_0x2309d9){const _0x31f341=_0x11ff25;if(_0x2309d9==null)return':'+_0x7f1375;return[][_0x31f341(0x249)](_0x2309d9)[_0x31f341(0x8bd)](_0x3870bc=>(_0x3870bc[_0x31f341(0x6d1)](':')?'['+_0x3870bc+']':_0x3870bc)+':'+_0x7f1375)[_0x31f341(0x86d)](',\x20');}return okdbHttp[_0x11ff25(0x47d)]=_0x20048a,okdbHttp[_0x11ff25(0x47d)][_0x11ff25(0x7e0)]=_0x48f418,okdbHttp['exports']['OKDB_CODE_TO_HTTP_STATUS']=_0x36b3f6,okdbHttp[_0x11ff25(0x47d)];}var okdbShmSegment,hasRequiredOkdbShmSegment;function requireOkdbShmSegment(){const _0x60fad3=_0x32d6b8;if(hasRequiredOkdbShmSegment)return okdbShmSegment;hasRequiredOkdbShmSegment=0x1;const _0x3592a1=require$$0$1,_0x1ad361=require$$2$1,_0xee12a7=0x80,_0x49aef9=0x0,_0x2b2381=0x1,_0x33b3eb=0x2,_0x108c13=0x3,_0xc63cf9=0x4,_0x5d6e29=_0xc63cf9+_0xee12a7,_0x1b420e=_0x5d6e29+_0xee12a7,_0x35b8a4=require$$2$2[_0x60fad3(0x40b)],_0x149280=_0x1b420e*0x4,_0x55b3a5=process['platform']!==_0x60fad3(0x61d),_0x4da4a4=0xc,_0x209477=process[_0x60fad3(0x3ea)]==='darwin'?0x1f:0xa0,_0x31e3d0=/^[A-Za-z0-9-]+(?:_boot)?$/,_0xa6964f=/^[A-Za-z0-9-]*-[0-9a-f]{12}(?:_boot)?$/,_0x9f97d7=_0x1fc942=>_0x1fc942[_0x60fad3(0x2f9)](/[^a-zA-Z0-9]/g,'-');function _0x2d7b0c(_0x376786,_0x57af40=''){const _0x1714c4=_0x60fad3;if(typeof _0x376786!==_0x1714c4(0x2b2)||_0x376786==='')throw new TypeError(_0x1714c4(0x669));if(_0x57af40!==''&&!/^_[A-Za-z0-9]+$/[_0x1714c4(0x27f)](_0x57af40))throw new TypeError('segmentNameFor:\x20suffix\x20must\x20look\x20like\x20\x22_name\x22\x20(got\x20'+JSON[_0x1714c4(0x46c)](_0x57af40)+')');const _0x2f3957=_0x1ad361['createHash'](_0x1714c4(0x33d))[_0x1714c4(0x67f)](_0x376786)[_0x1714c4(0x313)](_0x1714c4(0x45a))[_0x1714c4(0x556)](0x0,_0x4da4a4),_0x1271d7=Math[_0x1714c4(0x321)](0x0,_0x209477-0x1-_0x4da4a4-_0x57af40['length']);return _0x9f97d7(_0x376786)['slice'](0x0,_0x1271d7)+'-'+_0x2f3957+_0x57af40;}function _0x5a318a(_0x207b47,_0x4e615a=''){return''+_0x9f97d7(_0x207b47)+_0x4e615a;}function _0x5ed6e3(_0x45d6cf){const _0x3d7493=_0x60fad3;if(_0xa6964f[_0x3d7493(0x27f)](_0x45d6cf))return'hashed';if(_0x31e3d0[_0x3d7493(0x27f)](_0x45d6cf))return _0x3d7493(0x713);return null;}const _0x5130da={'onMapped':null,'onClaimed':null,'onRetiring':null},_0x39f947=_0x58c082=>Math[_0x60fad3(0x35b)](_0x58c082/0x8)*0x8,_0x1cbbfa=_0xff4acc=>_0x39f947(_0xff4acc)+_0x149280;function _0x329a57(_0x1a399e){const _0x3f7a1a=_0x60fad3;try{return process[_0x3f7a1a(0x6a0)](_0x1a399e,0x0),![];}catch(_0x2f4311){return _0x2f4311[_0x3f7a1a(0x5f9)]===_0x3f7a1a(0x869);}}const _0x21fe60=new Int32Array(new SharedArrayBuffer(0x4));function _0x4dc95f(_0x18dca3){const _0x587078=_0x60fad3;if(_0x18dca3>0x0)Atomics[_0x587078(0x711)](_0x21fe60,0x0,0x0,_0x18dca3);}function _0x5b7bdc(_0x111a02,_0xc46ea8){const _0x1fb77c=_0x60fad3;if(process[_0x1fb77c(0x3ea)]!==_0x1fb77c(0x8bf))return;let _0x3af7f0;try{_0x3af7f0=_0x3592a1['openSync'](_0x1fb77c(0x7bd)+_0x111a02,'r+');if(_0x3592a1[_0x1fb77c(0x5c6)](_0x3af7f0)[_0x1fb77c(0x4a8)]<_0xc46ea8)_0x3592a1['ftruncateSync'](_0x3af7f0,_0xc46ea8);}catch{}finally{if(_0x3af7f0!==undefined)try{_0x3592a1[_0x1fb77c(0x284)](_0x3af7f0);}catch{}}}function _0x4b6d47(_0x3f11d1,_0x7ed088){const _0x16dbaa=_0x60fad3,_0x1d8513=require$$3$2;for(let _0x424263=0x0;;_0x424263++){try{return _0x1d8513[_0x16dbaa(0x654)](_0x3f11d1,_0x7ed088);}catch(_0x136f2e){if(_0x424263>=0x3e8||!/No such file or directory/['test'](_0x136f2e?.[_0x16dbaa(0x439)]??''))throw _0x136f2e;}}}function _0x53d3e2(_0x26832b,_0x3305fd){const _0x1b4f1e=_0x60fad3,_0x43c31a=_0x1cbbfa(_0x3305fd),_0x1bafd2=_0x4b6d47(_0x26832b,_0x43c31a);_0x5b7bdc(_0x26832b,_0x43c31a);if(_0x1bafd2['byteLength']<_0x43c31a)throw new Error(_0x1b4f1e(0x30a)+_0x26832b+_0x1b4f1e(0x28b)+_0x1bafd2[_0x1b4f1e(0x6e0)]+_0x1b4f1e(0x72f)+_0x43c31a+'\x20bytes');return{'sab':_0x1bafd2,'hdr':new Int32Array(_0x1bafd2,_0x39f947(_0x3305fd),_0x1b420e)};}function _0x900f40(_0x45aeec){const _0x5e4e73=_0x60fad3;try{require(_0x5e4e73(0x205))['close'](_0x45aeec);}catch{}}function _0x351f25(_0x355ebf){const _0x155e9d=_0x60fad3;try{require(_0x155e9d(0x205))[_0x155e9d(0x2ec)](_0x355ebf);}catch{}}function _0x5aab14(_0x54c11f){const _0x2e711d=_0x60fad3;if(Atomics['load'](_0x54c11f,_0x33b3eb)!==0x0&&Atomics[_0x2e711d(0x782)](_0x54c11f,_0x108c13)!==0x0)return;const _0x3e43b1=_0x1ad361['randomBytes'](0x8),_0x366b93=_0x3e43b1[_0x2e711d(0x272)](0x0)||0x1,_0x19c073=_0x3e43b1[_0x2e711d(0x272)](0x4)||0x1;Atomics['compareExchange'](_0x54c11f,_0x33b3eb,0x0,_0x366b93),Atomics[_0x2e711d(0x6b0)](_0x54c11f,_0x108c13,0x0,_0x19c073);}function _0x4166bd(_0x4864f1){const _0x64982d=_0x60fad3,_0x205fa9=process[_0x64982d(0x5bc)];for(let _0x4c286a=0x0;_0x4c286a<_0xee12a7;_0x4c286a++){const _0x1f0261=Atomics[_0x64982d(0x782)](_0x4864f1,_0xc63cf9+_0x4c286a);if(_0x1f0261===0x0||_0x1f0261===_0x205fa9)continue;if(!_0x329a57(_0x1f0261))continue;Atomics[_0x64982d(0x5fc)](_0x4864f1,_0x5d6e29+_0x4c286a,0x0),Atomics[_0x64982d(0x6b0)](_0x4864f1,_0xc63cf9+_0x4c286a,_0x1f0261,0x0);}}function _0x1269d9(_0x42c014){if(Atomics['load'](_0x42c014,_0x2b2381)!==0x0)return!![];for(let _0x196420=0x0;_0x196420<_0xee12a7;_0x196420++)if(Atomics['load'](_0x42c014,_0xc63cf9+_0x196420)!==0x0)return!![];return![];}function _0x4a6f4d(_0xf4a464){const _0x4e5465=_0x60fad3,_0x1afcac=process[_0x4e5465(0x5bc)];for(let _0x3575b2=0x0;_0x3575b2<0x2;_0x3575b2++){for(let _0x5174b8=0x0;_0x5174b8<_0xee12a7;_0x5174b8++){if(Atomics[_0x4e5465(0x6b0)](_0xf4a464,_0xc63cf9+_0x5174b8,0x0,_0x1afcac)===0x0)return Atomics['store'](_0xf4a464,_0x5d6e29+_0x5174b8,_0x35b8a4),_0x5174b8;}_0x4166bd(_0xf4a464);}return Atomics[_0x4e5465(0x88a)](_0xf4a464,_0x2b2381,0x1),-0x1;}function _0x3ccc8e(_0x403ad5,_0xdd9d12){const _0x540509=_0x60fad3;if(_0xdd9d12>=0x0)Atomics[_0x540509(0x5fc)](_0x403ad5,_0x5d6e29+_0xdd9d12,0x0),Atomics['compareExchange'](_0x403ad5,_0xc63cf9+_0xdd9d12,process['pid'],0x0);else Atomics[_0x540509(0x208)](_0x403ad5,_0x2b2381,0x1);}function _0x116603(_0x58cf75,_0x183af7,_0x4a2937,_0x44378c){const _0x4eb289=_0x60fad3,_0x3bfaef=process[_0x4eb289(0x5bc)];if(Atomics[_0x4eb289(0x6b0)](_0x4a2937,_0x49aef9,_0x44378c,_0x3bfaef)!==_0x44378c)return _0x4eb289(0x512);const _0x4cd5b3=Atomics['load'](_0x4a2937,_0x33b3eb),_0x12a153=Atomics['load'](_0x4a2937,_0x108c13);let _0x2b1597;try{_0x2b1597=_0x53d3e2(_0x58cf75,_0x183af7)[_0x4eb289(0x3e6)];}catch{return _0x4eb289(0x63a);}if(Atomics[_0x4eb289(0x782)](_0x2b1597,_0x33b3eb)!==_0x4cd5b3||Atomics['load'](_0x2b1597,_0x108c13)!==_0x12a153)return _0x4eb289(0x63a);_0x4166bd(_0x4a2937);if(_0x1269d9(_0x4a2937))return Atomics[_0x4eb289(0x6b0)](_0x4a2937,_0x49aef9,_0x3bfaef,0x0),'revived';return _0x351f25(_0x58cf75),_0x4eb289(0x4ed);}function _0xda7128(_0x427908,_0x2ebb04,{timeoutMs:_0x65552d}={}){const _0x397e67=_0x60fad3;_0x65552d=_0x65552d??(Number(process.env.OKDB_SHM_ATTACH_TIMEOUT_MS)||0x7530);const _0x5b38c7=process['pid'],_0x4fc5cd=Date['now']()+_0x65552d;for(let _0x258379=0x0;;_0x258379++){const {sab:_0x1b4430,hdr:_0x46928a}=_0x53d3e2(_0x427908,_0x2ebb04);_0x5130da['onMapped']?.(_0x427908,_0x258379),_0x5aab14(_0x46928a);const _0xd58a3f=_0x4a6f4d(_0x46928a);_0x5130da[_0x397e67(0x1c6)]?.(_0x427908,_0x258379);const _0x4f7609=Atomics['load'](_0x46928a,_0x49aef9);if(_0x4f7609===0x0||!_0x55b3a5){if(_0x258379===0x0)_0x4166bd(_0x46928a);return{'sab':_0x1b4430,'hdr':_0x46928a,'slot':_0xd58a3f};}_0x3ccc8e(_0x46928a,_0xd58a3f);if(_0x4f7609!==_0x5b38c7&&_0x329a57(_0x4f7609))_0x116603(_0x427908,_0x2ebb04,_0x46928a,_0x4f7609);_0x900f40(_0x427908);if(Date[_0x397e67(0x81b)]()>_0x4fc5cd){const {OKDBError:_0xfed5b0}=requireOkdbError();throw new _0xfed5b0(_0x397e67(0x661)+_0x427908+_0x397e67(0x279)+_0x65552d+_0x397e67(0x5be)+_0x4f7609+_0x397e67(0x25d)+'stop\x20every\x20okdb\x20process\x20on\x20this\x20path\x20and\x20run\x20`okdb\x20shm-gc`.',_0x397e67(0x1e4));}_0x4dc95f(_0x258379<0x14?0x0:0x1);}}function _0x3e5644(_0x7aabeb,_0x5cc694,_0x896f6c,_0x22e80f){const _0x39ff83=_0x60fad3,{hdr:_0x1b8df4,slot:_0x2ecb8a}=_0x896f6c;if(_0x2ecb8a!==null)_0x3ccc8e(_0x1b8df4,_0x2ecb8a);let _0x2de47f=![];try{if(!_0x55b3a5)return![];const _0x3b99d0=process[_0x39ff83(0x5bc)];_0x4166bd(_0x1b8df4);if(_0x1269d9(_0x1b8df4)||_0x22e80f?.(_0x896f6c[_0x39ff83(0x68b)]))return![];if(Atomics[_0x39ff83(0x6b0)](_0x1b8df4,_0x49aef9,0x0,_0x3b99d0)!==0x0)return![];let _0x4271bf=!![];try{_0x5130da[_0x39ff83(0x3c0)]?.(_0x7aabeb),!_0x1269d9(_0x1b8df4)&&!_0x22e80f?.(_0x896f6c[_0x39ff83(0x68b)])&&(_0x4271bf=![],_0x351f25(_0x7aabeb),_0x2de47f=!![]);}finally{if(_0x4271bf)Atomics[_0x39ff83(0x6b0)](_0x1b8df4,_0x49aef9,_0x3b99d0,0x0);}return _0x2de47f;}finally{_0x900f40(_0x7aabeb);}}function _0x2f6db9(_0x3e5138,_0x273757,{isBusy:_0x1cfcb6}={}){const _0x525e8a=_0x60fad3,_0x1b24a9=process[_0x525e8a(0x5bc)],{sab:_0x132c2d,hdr:_0x1bae49}=_0x53d3e2(_0x3e5138,_0x273757);try{_0x4166bd(_0x1bae49);const _0x3700b9=Atomics[_0x525e8a(0x782)](_0x1bae49,_0x49aef9);if(_0x3700b9!==0x0){if(_0x3700b9===_0x1b24a9||!_0x329a57(_0x3700b9))return _0x525e8a(0x36d);return _0x116603(_0x3e5138,_0x273757,_0x1bae49,_0x3700b9);}if(_0x1269d9(_0x1bae49))return'attached';if(_0x1cfcb6?.(_0x132c2d))return _0x525e8a(0x774);if(Atomics[_0x525e8a(0x6b0)](_0x1bae49,_0x49aef9,0x0,_0x1b24a9)!==0x0)return _0x525e8a(0x36d);if(_0x1269d9(_0x1bae49)||_0x1cfcb6?.(_0x132c2d))return Atomics[_0x525e8a(0x6b0)](_0x1bae49,_0x49aef9,_0x1b24a9,0x0),'attached';return _0x351f25(_0x3e5138),_0x525e8a(0x4ed);}finally{_0x900f40(_0x3e5138);}}const _0x75745a=new Map(),_0x2ca775=new Set();function _0x100969(_0x3c6727){const _0x3d2521=_0x60fad3,_0x3c956a=process[_0x3d2521(0x5bc)];for(let _0xbe7320=0x0;_0xbe7320<_0xee12a7;_0xbe7320++){if(Atomics[_0x3d2521(0x782)](_0x3c6727,_0xc63cf9+_0xbe7320)===_0x3c956a&&Atomics[_0x3d2521(0x782)](_0x3c6727,_0x5d6e29+_0xbe7320)!==_0x35b8a4)return!![];}return![];}function _0x63e68d(_0x45cefc,_0x454ff9,_0x3da09f={}){const _0x3251c9=_0x60fad3;let _0x26c660=_0x75745a['get'](_0x45cefc);if(!_0x26c660){const _0x1fe68f=_0xda7128(_0x45cefc,_0x454ff9,_0x3da09f);_0x26c660={'att':_0x1fe68f,'dataBytes':_0x454ff9,'refs':0x0,'isBusy':_0x3da09f[_0x3251c9(0x4cf)]??null,'onThreadExit':_0x3da09f['onThreadExit']??null},_0x75745a['set'](_0x45cefc,_0x26c660);}if(_0x3da09f[_0x3251c9(0x4cf)])_0x26c660[_0x3251c9(0x4cf)]=_0x3da09f[_0x3251c9(0x4cf)];if(_0x3da09f[_0x3251c9(0x51b)])_0x26c660[_0x3251c9(0x51b)]=_0x3da09f[_0x3251c9(0x51b)];_0x26c660[_0x3251c9(0x2de)]++;let _0x4496d1=![];return{'sab':_0x26c660['att'][_0x3251c9(0x68b)],'name':_0x45cefc,'release'(){const _0x45ac20=_0x3251c9;if(_0x4496d1)return![];_0x4496d1=!![];if(--_0x26c660[_0x45ac20(0x2de)]>0x0)return![];if(_0x75745a[_0x45ac20(0x5ab)](_0x45cefc)===_0x26c660)_0x75745a[_0x45ac20(0x1d4)](_0x45cefc);const _0x360d61=_0x3e5644(_0x45cefc,_0x26c660[_0x45ac20(0x53b)],_0x26c660[_0x45ac20(0x450)],_0x26c660[_0x45ac20(0x4cf)]);!_0x360d61&&_0x55b3a5&&_0x100969(_0x26c660['att'][_0x45ac20(0x3e6)])&&_0x2ca775[_0x45ac20(0x88a)]({'name':_0x45cefc,'dataBytes':_0x26c660[_0x45ac20(0x53b)],'att':{..._0x26c660[_0x45ac20(0x450)],'slot':null},'isBusy':_0x26c660[_0x45ac20(0x4cf)],'onThreadExit':_0x26c660['onThreadExit']});if(_0x2ca775[_0x45ac20(0x4a8)])_0x5133f1();return _0x360d61;}};}function _0x1a69c3(_0x5d9a89){const _0x30668f=_0x60fad3;if(!(_0x5d9a89>0x0))return 0x0;const _0x15065e=process[_0x30668f(0x5bc)];let _0x47ffee=0x0;const _0xb9f21e=({att:_0x3eb173,onThreadExit:_0x2557fc})=>{const _0x31f770=_0x30668f;try{_0x2557fc?.(_0x3eb173[_0x31f770(0x68b)],_0x5d9a89);}catch{}const {hdr:_0x5eafe6}=_0x3eb173;for(let _0x18088c=0x0;_0x18088c<_0xee12a7;_0x18088c++){if(Atomics[_0x31f770(0x782)](_0x5eafe6,_0xc63cf9+_0x18088c)!==_0x15065e||Atomics[_0x31f770(0x782)](_0x5eafe6,_0x5d6e29+_0x18088c)!==_0x5d9a89)continue;Atomics[_0x31f770(0x5fc)](_0x5eafe6,_0x5d6e29+_0x18088c,0x0);if(Atomics[_0x31f770(0x6b0)](_0x5eafe6,_0xc63cf9+_0x18088c,_0x15065e,0x0)===_0x15065e)_0x47ffee++;}};for(const _0x5d93f5 of _0x75745a[_0x30668f(0x33f)]())_0xb9f21e(_0x5d93f5);for(const _0x1a0ebe of _0x2ca775)_0xb9f21e(_0x1a0ebe);return _0x5133f1(),_0x47ffee;}function _0x5133f1(){const _0x37c9eb=_0x60fad3;for(const _0x2913f6 of[..._0x2ca775]){if(_0x100969(_0x2913f6[_0x37c9eb(0x450)][_0x37c9eb(0x3e6)]))continue;_0x2ca775['delete'](_0x2913f6),_0x3e5644(_0x2913f6['name'],_0x2913f6[_0x37c9eb(0x53b)],_0x2913f6['att'],_0x2913f6[_0x37c9eb(0x4cf)]);}}return okdbShmSegment={'attachSegment':_0x63e68d,'releaseThreadSlots':_0x1a69c3,'segmentNameFor':_0x2d7b0c,'legacySegmentNameFor':_0x5a318a,'segmentNameStyle':_0x5ed6e3,'SEG_NAME_MAX':_0x209477,'retireIfUnused':_0x2f6db9,'totalBytes':_0x1cbbfa,'headerOffset':_0x39f947,'MAX_SLOTS':_0xee12a7,'_attachRaw':_0xda7128,'_detachRaw':_0x3e5644,'_takeover':_0x116603,'_mapByName':_0x53d3e2,'_hooks':_0x5130da,'_registry':_0x75745a,'_lingering':_0x2ca775,'_H':{'STATE':_0x49aef9,'OVERFLOW':_0x2b2381,'NONCE_A':_0x33b3eb,'NONCE_B':_0x108c13,'SLOTS':_0xc63cf9,'TIDS':_0x5d6e29}},okdbShmSegment;}var okdbShmGc,hasRequiredOkdbShmGc;function requireOkdbShmGc(){const _0x505217=_0x32d6b8;if(hasRequiredOkdbShmGc)return okdbShmGc;hasRequiredOkdbShmGc=0x1;const _0x252092=require$$0$1,_0x30db6f=require$$1,_0xfb2a9e=_0x505217(0x36f),_0x2be408=0x18+0x3*0x100*0x4,_0x5cf08e=0x18+0x2*0x100*0x4,_0x28ea47=0xc;function _0x5bad4a(){const {totalBytes:_0x1da96a}=requireOkdbShmSegment();return new Set([0x0,0x8,0x18,_0x5cf08e,_0x28ea47,_0x1da96a(_0x5cf08e),_0x1da96a(_0x2be408),_0x1da96a(_0x28ea47)]);}function _0x4290fe(_0x26d2dc,_0x59135d,_0x21ae69){const _0x1dd880=_0x505217,{totalBytes:_0x1039b5}=requireOkdbShmSegment();if(_0x26d2dc[_0x1dd880(0x43a)]('_boot')||_0x59135d===_0x28ea47||_0x59135d===_0x1039b5(_0x28ea47))return _0x28ea47;if(_0x59135d===_0x1039b5(_0x2be408))return _0x2be408;if(_0x59135d===_0x1039b5(_0x5cf08e))return _0x5cf08e;return _0x21ae69===_0x1dd880(0x458)?_0x2be408:_0x5cf08e;}function _0x463865(){const _0x5483da=_0x505217,_0x1e329c=new Set(),_0xc6a440=[],_0x2b82bf=_0xfb2a9e+'/';let _0x222baf;try{_0x222baf=_0x252092[_0x5483da(0x35c)]('/proc')[_0x5483da(0x49c)](_0x53feac=>/^\d+$/['test'](_0x53feac));}catch{throw new Error(_0x5483da(0x4b1));}for(const _0x5efa55 of _0x222baf){const _0x2c73ca=_0x30db6f['join'](_0x5483da(0x60c),_0x5efa55);let _0x2fd645=!![];try{const _0x32b819=_0x252092[_0x5483da(0x7d6)](_0x30db6f[_0x5483da(0x86d)](_0x2c73ca,_0x5483da(0x7fc)),_0x5483da(0x6ec));let _0x2ec05d=_0x32b819['indexOf'](_0x2b82bf);while(_0x2ec05d!==-0x1){const _0x385a05=_0x32b819['indexOf']('\x0a',_0x2ec05d),_0x21b4a1=_0x32b819[_0x5483da(0x556)](_0x2ec05d+_0x2b82bf['length'],_0x385a05===-0x1?undefined:_0x385a05);if(!_0x21b4a1[_0x5483da(0x43a)](_0x5483da(0x824)))_0x1e329c['add'](_0x21b4a1);_0x2ec05d=_0x32b819[_0x5483da(0x24b)](_0x2b82bf,_0x2ec05d+0x1);}}catch(_0x4756c7){if(_0x4756c7[_0x5483da(0x5f9)]!==_0x5483da(0x34f)&&_0x4756c7[_0x5483da(0x5f9)]!==_0x5483da(0x869))_0x2fd645=![];}try{for(const _0x1f1fbf of _0x252092['readdirSync'](_0x30db6f['join'](_0x2c73ca,'fd'))){let _0x1c904d;try{_0x1c904d=_0x252092[_0x5483da(0x4e2)](_0x30db6f[_0x5483da(0x86d)](_0x2c73ca,'fd',_0x1f1fbf));}catch{continue;}if(_0x1c904d[_0x5483da(0x5e1)](_0x2b82bf)&&!_0x1c904d['endsWith'](_0x5483da(0x824)))_0x1e329c[_0x5483da(0x88a)](_0x1c904d['slice'](_0x2b82bf[_0x5483da(0x3be)]));}}catch(_0x4cda2e){if(_0x4cda2e['code']!==_0x5483da(0x34f)&&_0x4cda2e[_0x5483da(0x5f9)]!==_0x5483da(0x869))_0x2fd645=![];}if(!_0x2fd645){let _0x126ce8=null;try{_0x126ce8=_0x252092[_0x5483da(0x267)](_0x2c73ca)[_0x5483da(0x2bd)];}catch{}let _0x5d9747='?';try{_0x5d9747=_0x252092[_0x5483da(0x7d6)](_0x30db6f[_0x5483da(0x86d)](_0x2c73ca,_0x5483da(0x20b)),_0x5483da(0x6ec))[_0x5483da(0x543)]();}catch{}if(_0x126ce8!==null)_0xc6a440[_0x5483da(0x338)]({'pid':Number(_0x5efa55),'uid':_0x126ce8,'comm':_0x5d9747});}}return{'inUse':_0x1e329c,'unreadable':_0xc6a440};}function _0x2a7de0({prefix:prefix=_0x505217(0x28c),dryRun:dryRun=![],anySize:anySize=![],force:force=![],log:log=()=>{}}={}){const _0xf47a94=_0x505217;if(process['platform']!==_0xf47a94(0x8bf)||!_0x252092[_0xf47a94(0x4e5)](_0xfb2a9e))throw new Error(_0xf47a94(0x7bb));const _0x50fdc5=process['getuid'](),_0xd0607d=_0x50fdc5===0x0,_0x36f0a0=_0x5bad4a(),{inUse:_0x2627a1,unreadable:_0x3c1423}=_0x463865(),_0x5abdef=_0x3c1423[_0xf47a94(0x49c)](_0x174dbb=>_0xd0607d||_0x174dbb[_0xf47a94(0x2bd)]===_0x50fdc5),_0x210253={'dryRun':dryRun,'prefix':prefix,'scanned':0x0,'matched':0x0,'inUse':0x0,'notOkdbShaped':0x0,'foreignOwner':0x0,'candidates':0x0,'candidatesLegacyNamed':0x0,'candidateBytes':0x0,'candidateAllocated':0x0,'deleted':0x0,'deletedAllocated':0x0,'skippedByProtocol':0x0,'errors':0x0,'unreadablePids':_0x3c1423[_0xf47a94(0x3be)],'blindPids':_0x5abdef[_0xf47a94(0x8bd)](_0x12e7c8=>_0x12e7c8['pid']),'blindCommands':_0x2395c4(_0x5abdef)};if(_0x5abdef[_0xf47a94(0x3be)]&&!dryRun&&!force)throw new Error(_0xf47a94(0x7fd)+_0x5abdef[_0xf47a94(0x3be)]+_0xf47a94(0x777)+(_0xf47a94(0x40e)+_0x210253[_0xf47a94(0x58e)]+_0xf47a94(0x3c3))+_0xf47a94(0x790));const {retireIfUnused:_0x463e4e,segmentNameStyle:_0x103ce7,_registry:_0x157c7b}=requireOkdbShmSegment();let _0x1f119c=null;if(!dryRun)try{require('v8')[_0xf47a94(0x530)](_0xf47a94(0x31f)),_0x1f119c=require('vm')[_0xf47a94(0x886)]('gc');}catch{}const _0x5ba0a7=_0x252092['opendirSync'](_0xfb2a9e);try{let _0x3c82c7,_0x351978=0x0;while(_0x3c82c7=_0x5ba0a7[_0xf47a94(0x2cf)]()){_0x210253['scanned']++;const _0x450084=_0x3c82c7[_0xf47a94(0x2a9)];if(!_0x450084[_0xf47a94(0x5e1)](prefix))continue;_0x210253[_0xf47a94(0x1bf)]++;if(_0x157c7b[_0xf47a94(0x6f1)](_0x450084)){_0x210253['inUse']++;continue;}if(_0x2627a1[_0xf47a94(0x6f1)](_0x450084)){_0x210253[_0xf47a94(0x7ab)]++;continue;}let _0x499677;try{_0x499677=_0x252092[_0xf47a94(0x32d)](_0x30db6f[_0xf47a94(0x86d)](_0xfb2a9e,_0x450084));}catch{continue;}if(!_0x499677['isFile']())continue;const _0x2093a5=_0x103ce7(_0x450084);if(!_0x2093a5||!anySize&&!_0x36f0a0[_0xf47a94(0x6f1)](_0x499677['size'])){_0x210253['notOkdbShaped']++;continue;}if(!_0xd0607d&&_0x499677[_0xf47a94(0x2bd)]!==_0x50fdc5){_0x210253[_0xf47a94(0x722)]++;continue;}_0x210253[_0xf47a94(0x4c0)]++;if(_0x2093a5===_0xf47a94(0x713))_0x210253[_0xf47a94(0x575)]++;_0x210253[_0xf47a94(0x85d)]+=_0x499677[_0xf47a94(0x4a8)],_0x210253[_0xf47a94(0x69e)]+=_0x499677[_0xf47a94(0x27b)]*0x200;if(dryRun)continue;const _0x45ce17=_0x4290fe(_0x450084,_0x499677[_0xf47a94(0x4a8)],_0x2093a5);try{const _0x147402=_0x463e4e(_0x450084,_0x45ce17);_0x147402==='unlinked'?(_0x210253[_0xf47a94(0x799)]++,_0x210253[_0xf47a94(0x7cb)]+=_0x499677['blocks']*0x200):(_0x210253[_0xf47a94(0x40c)]++,log(_0xf47a94(0x80a)+_0x450084+':\x20'+_0x147402));}catch(_0x4d200c){_0x210253[_0xf47a94(0x73d)]++,log(_0xf47a94(0x710)+_0x450084+':\x20'+_0x4d200c[_0xf47a94(0x439)]);}_0x1f119c&&++_0x351978>=0x200&&(_0x351978=0x0,_0x1f119c());}}finally{_0x5ba0a7[_0xf47a94(0x284)]();}return _0x210253;}function _0x2395c4(_0x195715){const _0x22a2c4=_0x505217,_0xea1056=new Map();for(const _0x1d3379 of _0x195715)_0xea1056[_0x22a2c4(0x4dc)](_0x1d3379[_0x22a2c4(0x20b)],(_0xea1056[_0x22a2c4(0x5ab)](_0x1d3379[_0x22a2c4(0x20b)])??0x0)+0x1);return[..._0xea1056]['map'](([_0x4deccf,_0x48309c])=>_0x48309c>0x1?_0x4deccf+'×'+_0x48309c:_0x4deccf)[_0x22a2c4(0x86d)](',\x20');}function _0x18cd35(_0x4aa05c){const _0x45ad62=_0x505217,_0x171f37=['B','KiB',_0x45ad62(0x28e),'GiB',_0x45ad62(0x4bb)];let _0x3a5db2=0x0;while(_0x4aa05c>=0x400&&_0x3a5db2<_0x171f37[_0x45ad62(0x3be)]-0x1){_0x4aa05c/=0x400,_0x3a5db2++;}return _0x4aa05c[_0x45ad62(0x849)](_0x3a5db2?0x1:0x0)+'\x20'+_0x171f37[_0x3a5db2];}function _0x1c1db6(_0x4188de){const _0x33c837=_0x505217,_0x3c46fe=[_0x33c837(0x73c)+(_0x4188de[_0x33c837(0x4a1)]?_0x33c837(0x62f):'')+_0x33c837(0x716)+JSON['stringify'](_0x4188de[_0x33c837(0x43c)]),_0x33c837(0x7d5)+_0x4188de['scanned']+_0x33c837(0x4dd)+_0xfb2a9e,'\x20\x20matching\x20prefix\x20\x20\x20\x20'+_0x4188de[_0x33c837(0x1bf)],'\x20\x20in\x20use\x20(mapped/fd)\x20'+_0x4188de[_0x33c837(0x7ab)],_0x33c837(0x652)+_0x4188de[_0x33c837(0x629)],'\x20\x20other\x20owner\x20\x20\x20\x20\x20\x20\x20\x20'+_0x4188de[_0x33c837(0x722)],'\x20\x20unused\x20(deletable)\x20'+_0x4188de['candidates']+'\x20—\x20'+_0x18cd35(_0x4188de[_0x33c837(0x85d)])+_0x33c837(0x303)+_0x18cd35(_0x4188de['candidateAllocated'])+_0x33c837(0x244)+(_0x4188de[_0x33c837(0x575)]?'\x20('+_0x4188de[_0x33c837(0x575)]+_0x33c837(0x370):'')];if(!_0x4188de['dryRun']){_0x3c46fe['push'](_0x33c837(0x618)+_0x4188de[_0x33c837(0x799)]+_0x33c837(0x252)+_0x18cd35(_0x4188de['deletedAllocated'])+_0x33c837(0x676));if(_0x4188de[_0x33c837(0x40c)])_0x3c46fe[_0x33c837(0x338)](_0x33c837(0x1fd)+_0x4188de[_0x33c837(0x40c)]);if(_0x4188de[_0x33c837(0x73d)])_0x3c46fe['push'](_0x33c837(0x7a7)+_0x4188de[_0x33c837(0x73d)]);}return _0x4188de[_0x33c837(0x763)]&&_0x3c46fe[_0x33c837(0x338)](_0x33c837(0x1b1)+_0x4188de[_0x33c837(0x763)]+_0x33c837(0x29f)+(_0x4188de['blindPids'][_0x33c837(0x3be)]?_0x33c837(0x252)+_0x4188de[_0x33c837(0x435)]['length']+_0x33c837(0x5a7)+(_0x4188de[_0x33c837(0x58e)]+_0x33c837(0x4c2)):_0x33c837(0x753))),_0x3c46fe['join']('\x0a');}function _0x540dcf(_0x5effa5){const _0x42a55e=_0x505217,_0x199600={'prefix':'-tmp-','dryRun':![],'anySize':![],'force':![],'verbose':![]};for(let _0x3c1342=0x0;_0x3c1342<_0x5effa5[_0x42a55e(0x3be)];_0x3c1342++){const _0x30aed5=_0x5effa5[_0x3c1342];if(_0x30aed5===_0x42a55e(0x559)||_0x30aed5==='-n')_0x199600['dryRun']=!![];else{if(_0x30aed5===_0x42a55e(0x33a))_0x199600['anySize']=!![];else{if(_0x30aed5===_0x42a55e(0x1e1))_0x199600[_0x42a55e(0x3e4)]=!![];else{if(_0x30aed5==='--verbose'||_0x30aed5==='-v')_0x199600['verbose']=!![];else{if(_0x30aed5===_0x42a55e(0x5a8))_0x199600['prefix']=_0x5effa5[++_0x3c1342]??'';else{if(_0x30aed5[_0x42a55e(0x5e1)]('--prefix='))_0x199600[_0x42a55e(0x43c)]=_0x30aed5[_0x42a55e(0x556)](_0x42a55e(0x5d1)['length']);else{if(_0x30aed5==='--help'||_0x30aed5==='-h')_0x199600[_0x42a55e(0x7c9)]=!![];else throw new Error(_0x42a55e(0x261)+_0x30aed5);}}}}}}}return _0x199600;}const _0xbfcb63=_0x505217(0x447);function _0x58dad1(_0xdbd303){const _0x2dea55=_0x505217;let _0x113989;try{_0x113989=_0x540dcf(_0xdbd303);}catch(_0x2da370){return console[_0x2dea55(0x21f)](_0x2da370['message']),console[_0x2dea55(0x21f)](_0xbfcb63),0x2;}if(_0x113989[_0x2dea55(0x7c9)])return console['log'](_0xbfcb63),0x0;const _0x5a4899=_0x2a7de0({..._0x113989,'log':_0x113989['verbose']?_0x174099=>console[_0x2dea55(0x51a)](_0x174099):undefined});return console[_0x2dea55(0x51a)](_0x1c1db6(_0x5a4899)),_0x5a4899['errors']?0x1:0x0;}return okdbShmGc={'shmGc':_0x2a7de0,'formatReport':_0x1c1db6,'main':_0x58dad1,'scanInUse':_0x463865,'ENV_DATA_BYTES':_0x2be408,'LEGACY_ENV_DATA_BYTES':_0x5cf08e,'BOOT_DATA_BYTES':_0x28ea47},okdbShmGc;}var hasRequiredOkdb;function requireOkdb(){const _0x460c8d=_0x32d6b8;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x460c8d(0x684)]();}catch{}const _0x4616a9=require$$1,_0x372abd=require$$0$1,{resolveWorkers:_0x13f89c,isShmbufNative:_0x2967fa}=requireOkdbWorkers();function _0x3f3124(_0x22a625){const _0x472f16=_0x460c8d,_0x25136e=_0x22a625[_0x472f16(0x556)](0x2),_0x53b02e={};let _0x51e526=0x0;while(_0x51e526<_0x25136e[_0x472f16(0x3be)]){const _0x539569=_0x25136e[_0x51e526];if(_0x539569==='--port'||_0x539569==='-p')_0x53b02e[_0x472f16(0x537)]=Number(_0x25136e[++_0x51e526]);else{if(_0x539569===_0x472f16(0x3b8)||_0x539569==='-d')_0x53b02e[_0x472f16(0x1de)]=_0x25136e[++_0x51e526];else{if(_0x539569===_0x472f16(0x22e)||_0x539569==='-k')_0x53b02e[_0x472f16(0x7d4)]=_0x25136e[++_0x51e526];else{if(_0x539569==='--config'||_0x539569==='-c')_0x53b02e[_0x472f16(0x6e7)]=_0x25136e[++_0x51e526];else{if(_0x539569===_0x472f16(0x4fa))_0x53b02e['logLevel']=_0x25136e[++_0x51e526];else{if(_0x539569===_0x472f16(0x541))_0x53b02e[_0x472f16(0x4b5)]=!![];else{if(_0x539569===_0x472f16(0x804))_0x53b02e[_0x472f16(0x784)]=!![];else{if(_0x539569===_0x472f16(0x510))_0x53b02e[_0x472f16(0x38d)]=_0x25136e[++_0x51e526];else{if(_0x539569==='--no-cluster')_0x53b02e[_0x472f16(0x2cb)]=!![];else{if(_0x539569===_0x472f16(0x2cc)||_0x539569==='-e')_0x53b02e[_0x472f16(0x344)]=_0x25136e[++_0x51e526];else{if(_0x539569===_0x472f16(0x285))_0x53b02e['types']=_0x25136e[++_0x51e526];else{if(_0x539569===_0x472f16(0x1b4))_0x53b02e[_0x472f16(0x7a2)]=!![];else{if(_0x539569===_0x472f16(0x81e))_0x53b02e['blobs']=!![];else{if(_0x539569===_0x472f16(0x3b2))_0x53b02e[_0x472f16(0x4db)]=!![];else{if(_0x539569===_0x472f16(0x844))_0x53b02e[_0x472f16(0x806)]=!![];else{if(_0x539569==='--open'){const _0x495fd9=[];while(_0x51e526+0x1<_0x25136e[_0x472f16(0x3be)]&&!_0x25136e[_0x51e526+0x1][_0x472f16(0x5e1)]('--')){_0x495fd9['push'](_0x25136e[++_0x51e526]);}_0x53b02e['open']=_0x495fd9['length']>0x0?_0x495fd9:!![];}else{if(_0x539569===_0x472f16(0x29c))_0x53b02e[_0x472f16(0x3d5)]=!![];else{if(_0x539569===_0x472f16(0x3a9))_0x53b02e[_0x472f16(0x2a9)]=_0x25136e[++_0x51e526];else{if(_0x539569===_0x472f16(0x221))_0x53b02e[_0x472f16(0x863)]=_0x25136e[++_0x51e526];else{if(_0x539569===_0x472f16(0x1d8))_0x53b02e[_0x472f16(0x660)]=_0x25136e[++_0x51e526];else{if(_0x539569===_0x472f16(0x726))_0x53b02e[_0x472f16(0x394)]=_0x25136e[++_0x51e526];else{if(_0x539569===_0x472f16(0x762))_0x53b02e[_0x472f16(0x296)]=_0x25136e[++_0x51e526];else{if(_0x539569==='--ttl')_0x53b02e['ttl']=_0x25136e[++_0x51e526];else{if(_0x539569===_0x472f16(0x34c))_0x53b02e['token']=_0x25136e[++_0x51e526];else{if(_0x539569===_0x472f16(0x508)||_0x539569==='-u')_0x53b02e[_0x472f16(0x6c3)]=_0x25136e[++_0x51e526];else{if(_0x539569==='--address')_0x53b02e[_0x472f16(0x557)]=_0x25136e[++_0x51e526];else{if(_0x539569===_0x472f16(0x760)||_0x539569==='-v'){const _0x531bab=require$$3;console[_0x472f16(0x51a)](_0x531bab[_0x472f16(0x24a)]),process[_0x472f16(0x56e)](0x0);}else(_0x539569===_0x472f16(0x58f)||_0x539569==='-h')&&(_0x5ace33(),process['exit'](0x0));}}}}}}}}}}}}}}}}}}}}}}}}}}_0x51e526++;}return _0x53b02e;}function _0x5ace33(){const _0x2757d7=_0x460c8d;console['log'](_0x2757d7(0x84d));}const _0x176bd4=new Set([_0x460c8d(0x612),_0x460c8d(0x8c8),'warn',_0x460c8d(0x21f)]);function _0x23dc56(_0x4c41fb){const _0x15aeeb=_0x460c8d,_0x1d8536=_0x4c41fb[_0x15aeeb(0x6e7)]?_0x4616a9[_0x15aeeb(0x400)](_0x4c41fb[_0x15aeeb(0x6e7)]):_0x4616a9[_0x15aeeb(0x400)](_0x15aeeb(0x8a2));let _0x490ded={};if(_0x372abd[_0x15aeeb(0x4e5)](_0x1d8536))try{const _0x4bdfa1=_0x372abd['readFileSync'](_0x1d8536,'utf8')[_0x15aeeb(0x2f9)](/^\uFEFF/,'');_0x490ded=JSON[_0x15aeeb(0x81a)](_0x4bdfa1),console[_0x15aeeb(0x51a)]('[okdb]\x20loaded\x20config:\x20'+_0x1d8536);}catch(_0x330aac){console['error'](_0x15aeeb(0x201)+_0x1d8536+':\x20'+_0x330aac[_0x15aeeb(0x439)]),process['exit'](0x1);}const _0x51c12a={'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},_0x1393ad={'port':_0x4c41fb[_0x15aeeb(0x537)]??_0x490ded[_0x15aeeb(0x537)]??_0x51c12a[_0x15aeeb(0x537)]??0x2124,'dbPath':_0x4c41fb[_0x15aeeb(0x1de)]??_0x490ded[_0x15aeeb(0x1de)]??_0x51c12a['path']??_0x15aeeb(0x7e5),'key':_0x4c41fb[_0x15aeeb(0x7d4)]??_0x490ded['key']??_0x51c12a[_0x15aeeb(0x7d4)]??undefined,'logLevel':_0x4c41fb[_0x15aeeb(0x79d)]??_0x490ded['logLevel']??_0x51c12a[_0x15aeeb(0x79d)]??_0x15aeeb(0x8c8),'noRepl':_0x4c41fb['noRepl']??_0x490ded[_0x15aeeb(0x4b5)]??_0x51c12a['noRepl']??![],'noAdmin':_0x4c41fb[_0x15aeeb(0x784)]??_0x490ded[_0x15aeeb(0x784)]??_0x51c12a[_0x15aeeb(0x784)]??![],'admin':_0x490ded[_0x15aeeb(0x45e)]??{},'api':_0x490ded[_0x15aeeb(0x7bc)]??undefined,'auth':_0x490ded['auth']??undefined,'mcp':_0x490ded['mcp']??undefined,'http':_0x490ded[_0x15aeeb(0x4fc)]??undefined,'backup':_0x490ded[_0x15aeeb(0x811)]??undefined,'timeMachine':_0x490ded[_0x15aeeb(0x3a4)]!==![]?_0x490ded['timeMachine']??{}:![],'processors':_0x490ded[_0x15aeeb(0x342)],'engines':_0x490ded[_0x15aeeb(0x71a)],'compaction':_0x490ded[_0x15aeeb(0x50e)]};if(_0x4c41fb[_0x15aeeb(0x2cb)])_0x1393ad[_0x15aeeb(0x2cb)]=!![];if(_0x4c41fb[_0x15aeeb(0x38d)]!==undefined)_0x1393ad[_0x15aeeb(0x636)]=_0x4c41fb[_0x15aeeb(0x38d)];_0x4c41fb[_0x15aeeb(0x654)]!==undefined&&(_0x1393ad[_0x15aeeb(0x3bb)]=_0x1393ad[_0x15aeeb(0x3bb)]||{},_0x1393ad[_0x15aeeb(0x3bb)][_0x15aeeb(0x654)]=_0x4c41fb[_0x15aeeb(0x654)]);_0x4c41fb[_0x15aeeb(0x3d5)]&&(_0x1393ad[_0x15aeeb(0x612)]=_0x1393ad['debug']||{},_0x1393ad[_0x15aeeb(0x612)]['logRequests']=!![]);(!Number[_0x15aeeb(0x2f4)](_0x1393ad[_0x15aeeb(0x537)])||_0x1393ad[_0x15aeeb(0x537)]<0x1||_0x1393ad[_0x15aeeb(0x537)]>0xffff)&&(console[_0x15aeeb(0x21f)]('[okdb]\x20invalid\x20port:\x20'+_0x1393ad[_0x15aeeb(0x537)]+'\x20(must\x20be\x201–65535)'),process[_0x15aeeb(0x56e)](0x1));!_0x176bd4[_0x15aeeb(0x6f1)](_0x1393ad[_0x15aeeb(0x79d)])&&(console[_0x15aeeb(0x21f)](_0x15aeeb(0x6f6)+_0x1393ad[_0x15aeeb(0x79d)]+'\x22\x20(must\x20be\x20debug|info|warn|error)'),process['exit'](0x1));const _0x4e0579=_0x1393ad[_0x15aeeb(0x4fc)]?.[_0x15aeeb(0x367)];_0x4e0579!==undefined&&!(typeof _0x4e0579===_0x15aeeb(0x2b2)&&_0x4e0579)&&!(Array[_0x15aeeb(0x590)](_0x4e0579)&&_0x4e0579['length']&&_0x4e0579[_0x15aeeb(0x796)](_0x38aa06=>typeof _0x38aa06===_0x15aeeb(0x2b2)&&_0x38aa06))&&(console[_0x15aeeb(0x21f)](_0x15aeeb(0x7b3)+JSON[_0x15aeeb(0x46c)](_0x4e0579)+_0x15aeeb(0x2c1)),process[_0x15aeeb(0x56e)](0x1));for(const _0x5bc87d of _0x405183){_0x1393ad[_0x5bc87d]!==undefined&&typeof _0x1393ad[_0x5bc87d]!==_0x15aeeb(0x3b4)&&(console[_0x15aeeb(0x21f)](_0x15aeeb(0x2d1)+_0x5bc87d+_0x15aeeb(0x583)+JSON[_0x15aeeb(0x46c)](_0x1393ad[_0x5bc87d])+_0x15aeeb(0x742)),process['exit'](0x1));}return _0x1393ad;}const _0x405183=[_0x460c8d(0x342),'engines',_0x460c8d(0x50e)];function _0x2841c8(_0x4c5688){const _0x3ca7d6=_0x460c8d;return!!(_0x4c5688&&typeof _0x4c5688===_0x3ca7d6(0x320)&&!Array[_0x3ca7d6(0x590)](_0x4c5688)&&Object[_0x3ca7d6(0x6c7)](_0x4c5688)['length']>0x0);}function _0x4a3f07(_0x1af177){const _0x14025b=_0x460c8d;return{..._0x1af177[_0x14025b(0x7d4)]?{'encryptionKey':_0x1af177[_0x14025b(0x7d4)]}:{},'engines':![],'processors':![],'compaction':![]};}const _0x4b9458=!process['stdout'][_0x460c8d(0x4ca)]||!!process.env.NO_COLOR;function _0x4999d9(_0x16e42b,_0x4806bc){return _0x4b9458?_0x4806bc:'\x1b['+_0x16e42b+'m'+_0x4806bc+'\x1b[0m';}function _0x54c7e(_0x5e81ab){const _0x34c4fb=_0x460c8d;if(!_0x5e81ab||_0x5e81ab['length']===0x0)return;const _0x58e60b='─'[_0x34c4fb(0x37a)](0x38);process[_0x34c4fb(0x58d)]['write']('\x0a'),process[_0x34c4fb(0x58d)]['write'](_0x4999d9('33',_0x34c4fb(0x407)+_0x5e81ab[_0x34c4fb(0x3be)]+_0x34c4fb(0x3aa)+(_0x5e81ab['length']>0x1?'S':'')+'\x0a')),process[_0x34c4fb(0x58d)][_0x34c4fb(0x6d4)]('\x20\x20'+_0x58e60b+'\x0a');for(const _0x46b154 of _0x5e81ab){const _0x1c8d55=_0x46b154[_0x34c4fb(0x5ad)]===_0x34c4fb(0x21f)?_0x4999d9('31',_0x34c4fb(0x1fa)):_0x4999d9('33','\x20\x20⚠');process[_0x34c4fb(0x58d)][_0x34c4fb(0x6d4)](_0x1c8d55+'\x20\x20'+_0x4999d9('1',_0x46b154[_0x34c4fb(0x53e)])+'\x0a'),process[_0x34c4fb(0x58d)]['write'](_0x34c4fb(0x8c7)+_0x46b154[_0x34c4fb(0x439)]+'\x0a');if(_0x46b154[_0x34c4fb(0x248)])process[_0x34c4fb(0x58d)]['write'](_0x34c4fb(0x8c7)+_0x4999d9('2','Hint:\x20'+_0x46b154['hint'])+'\x0a');process[_0x34c4fb(0x58d)]['write']('\x0a');}process[_0x34c4fb(0x58d)]['write']('\x20\x20'+_0x58e60b+'\x0a\x0a');}function _0x1317dd(_0x2f50a6,_0xe784c8,_0x2b92b9={}){const _0x223baa=_0x460c8d,_0x124009=_0x2f50a6['http'][_0x223baa(0x4bc)](_0xe784c8,_0x2b92b9);if(_0x124009&&_0x124009['_isClusterController'])return Promise[_0x223baa(0x400)](_0x124009);const _0x1324ab=_0x2f50a6[_0x223baa(0x4fc)]['servers']?.[_0x223baa(0x3be)]?_0x2f50a6[_0x223baa(0x4fc)][_0x223baa(0x8a8)]:[_0x124009];return new Promise((_0x4e4dbe,_0x572843)=>{const _0xf56116=_0x223baa;_0x124009[_0xf56116(0x405)](_0xf56116(0x21f),_0x572843),Promise['all'](_0x1324ab[_0xf56116(0x8bd)](_0x34f9d3=>_0x34f9d3['listening']?null:new Promise(_0x1ea382=>_0x34f9d3['once'](_0xf56116(0x51d),_0x1ea382))))[_0xf56116(0x76c)](()=>_0x4e4dbe(_0x124009));});}function _0x14eb46(_0x16f706){const _0x4d2be8=_0x460c8d;return _0x16f706[_0x4d2be8(0x4fc)]?.[_0x4d2be8(0x367)]!==undefined?{'host':_0x16f706[_0x4d2be8(0x4fc)][_0x4d2be8(0x367)]}:{};}async function _0x738643(_0x3759ae){const _0x143572=_0x460c8d,_0x10b422=require$$4$1;console['log']('\x0a\x20\x20okdb\x20doctor\x0a');let _0x5f5480=!![];const _0x338f6f=(_0x464f6f,_0x5b072c)=>{const _0x47fd30=_0x1684;console[_0x47fd30(0x51a)]('\x20\x20'+(_0x464f6f?'✓':'✗')+'\x20'+_0x5b072c);if(!_0x464f6f)_0x5f5480=![];},_0xf8b85d=Number(process[_0x143572(0x24a)][_0x143572(0x2f9)]('v','')[_0x143572(0x735)]('.')[0x0]);_0x338f6f(_0xf8b85d>=0x12,_0x143572(0x231)+process[_0x143572(0x24a)]+(_0xf8b85d<0x12?_0x143572(0x8a9):''));const _0xbecdc7=_0x4616a9[_0x143572(0x400)](_0x3759ae['dbPath']);try{_0x372abd[_0x143572(0x642)](_0xbecdc7,{'recursive':!![]});const _0x9341f=_0x4616a9[_0x143572(0x86d)](_0xbecdc7,_0x143572(0x52c));_0x372abd[_0x143572(0x43e)](_0x9341f,''),_0x372abd[_0x143572(0x23a)](_0x9341f),_0x338f6f(!![],_0x143572(0x513)+_0xbecdc7);}catch(_0x32dd92){_0x338f6f(![],_0x143572(0x76a)+_0xbecdc7+_0x143572(0x2fd)+_0x32dd92['message']+')');}const _0x558a4c=await new Promise(_0x2ee0dd=>{const _0x52c1d1=_0x143572,_0x1cc0f8=_0x10b422['createServer']();_0x1cc0f8[_0x52c1d1(0x405)]('error',()=>_0x2ee0dd(![])),_0x1cc0f8[_0x52c1d1(0x405)](_0x52c1d1(0x51d),()=>{const _0x2d3dea=_0x52c1d1;_0x1cc0f8[_0x2d3dea(0x55c)](),_0x2ee0dd(!![]);}),_0x1cc0f8[_0x52c1d1(0x4bc)](_0x3759ae[_0x52c1d1(0x537)],'127.0.0.1');});_0x338f6f(_0x558a4c,'port\x20'+_0x3759ae[_0x143572(0x537)]+'\x20'+(_0x558a4c?_0x143572(0x3a1):'already\x20in\x20use'));const _0x2ac3f8=_0x4616a9['resolve'](_0x143572(0x8a2));if(_0x372abd[_0x143572(0x4e5)](_0x2ac3f8))try{JSON[_0x143572(0x81a)](_0x372abd[_0x143572(0x7d6)](_0x2ac3f8,_0x143572(0x6ec))[_0x143572(0x2f9)](/^\uFEFF/,'')),_0x338f6f(!![],_0x143572(0x420)+_0x2ac3f8);}catch(_0x4be8f2){_0x338f6f(![],_0x143572(0x7c1)+_0x4be8f2[_0x143572(0x439)]);}else _0x338f6f(!![],'no\x20.kdbconfig\x20(using\x20defaults)');if(_0x2967fa()){const _0x37387e=_0x13f89c(_0x3759ae,{'shmbufNative':!![]});_0x338f6f(!![],_0x143572(0x4c8)+_0x37387e+_0x143572(0x887)+(_0x37387e===0x1?'':'s')+')');}else _0x338f6f(!![],_0x143572(0x606));if(!_0x558a4c)try{const _0xab8fcd=require('../okdb'),_0x12cf73=new _0xab8fcd(_0xbecdc7,{'engines':![],'processors':![],'compaction':![],'auth':{'open':!![]}});await _0x12cf73[_0x143572(0x654)]();try{await _0x12cf73['processes']['open']({'reader':!![]});const _0x255d81=_0x12cf73[_0x143572(0x317)][_0x143572(0x251)](),_0x865640=_0x255d81[_0x143572(0x49c)](_0x21ec59=>_0x21ec59[_0x143572(0x1cd)]!=null)['length'];_0x338f6f(!![],_0x143572(0x264)+_0x255d81['length']+_0x143572(0x71b)+(_0x255d81[_0x143572(0x3be)]===0x1?'':'es')+'\x20('+_0x865640+_0x143572(0x3b3));}finally{await _0x12cf73[_0x143572(0x55c)]();}}catch{}console['log'](''),_0x5f5480?console['log'](_0x143572(0x483)):(console[_0x143572(0x51a)](_0x143572(0x3f0)),process[_0x143572(0x56e)](0x1));}async function _0x40f676(){const _0x3e7d03=_0x460c8d,_0x4e47f3=_0x4616a9[_0x3e7d03(0x400)](_0x3e7d03(0x8a2));!_0x372abd[_0x3e7d03(0x4e5)](_0x4e47f3)?(_0x372abd[_0x3e7d03(0x43e)](_0x4e47f3,JSON[_0x3e7d03(0x46c)]({'port':0x2124,'path':_0x3e7d03(0x7e5),'logLevel':_0x3e7d03(0x8c8),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x3e7d03(0x51a)](_0x3e7d03(0x648))):console['log'](_0x3e7d03(0x1d7));const _0x287915=_0x4616a9['resolve'](_0x3e7d03(0x7e5));!_0x372abd[_0x3e7d03(0x4e5)](_0x287915)?(_0x372abd[_0x3e7d03(0x642)](_0x287915,{'recursive':!![]}),console['log'](_0x3e7d03(0x81f))):console[_0x3e7d03(0x51a)](_0x3e7d03(0x85c)),console[_0x3e7d03(0x51a)]('\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a');}async function _0x55ef0e(_0x32db79){const _0x595963=_0x460c8d,_0x4cf641=_0x4616a9['resolve'](_0x32db79[_0x595963(0x5f0)]);if(!_0x372abd['existsSync'](_0x4cf641)){console[_0x595963(0x51a)]('[okdb]\x20nothing\x20to\x20reset\x20—\x20'+_0x4cf641+_0x595963(0x76d));return;}const _0x466a0b=require$$0$3,_0x4559ee=_0x466a0b[_0x595963(0x3d7)]({'input':process[_0x595963(0x538)],'output':process[_0x595963(0x6cd)]}),_0xe2465=await new Promise(_0x2d4c9c=>_0x4559ee[_0x595963(0x845)](_0x595963(0x517)+_0x4cf641+_0x595963(0x7e4),_0x2d4c9c));_0x4559ee[_0x595963(0x55c)](),console[_0x595963(0x51a)]('');if(_0xe2465[_0x595963(0x543)]()['toLowerCase']()!=='yes'){console[_0x595963(0x51a)](_0x595963(0x41d));return;}let _0x512e5d=null;try{_0x512e5d=await _0x4e0f48(_0x4cf641,_0x32db79,async _0x5a3ce7=>{const _0x4cc5d5=_0x595963,_0x1af587=_0x5a3ce7[_0x4cc5d5(0x6a1)],_0x448329=_0x1af587?.['db']?.[_0x4cc5d5(0x5ab)](_0x4cc5d5(0x8c3))??null,_0x5ece98=[];if(_0x1af587?.[_0x4cc5d5(0x708)](_0x4cc5d5(0x554)))for(const {key:_0x27f665,value:_0xea31a}of _0x1af587['getRange'](_0x4cc5d5(0x554))){_0x5ece98[_0x4cc5d5(0x338)]({'key':_0x27f665,'value':_0xea31a});}return{'identity':_0x448329,'licenses':_0x5ece98};});}catch(_0x44f9fe){console[_0x595963(0x51a)](_0x595963(0x26a)+_0x44f9fe[_0x595963(0x439)]+_0x595963(0x316));}_0x372abd['rmSync'](_0x4cf641,{'recursive':!![],'force':!![]}),console[_0x595963(0x51a)]('[okdb]\x20reset:\x20'+_0x4cf641+_0x595963(0x761));if(_0x512e5d&&(_0x512e5d[_0x595963(0x547)]||_0x512e5d[_0x595963(0x52f)][_0x595963(0x3be)]>0x0))try{await _0x4e0f48(_0x4cf641,_0x32db79,async _0x28aa5e=>{const _0x5c53b0=_0x595963,_0x54323d=_0x28aa5e[_0x5c53b0(0x6a1)];_0x512e5d['identity']&&_0x54323d['db'][_0x5c53b0(0x6d8)](_0x5c53b0(0x8c3),_0x512e5d['identity']);if(_0x512e5d[_0x5c53b0(0x52f)]['length']>0x0){if(!_0x54323d[_0x5c53b0(0x708)]('~licenses'))await _0x54323d[_0x5c53b0(0x6de)]('~licenses');for(const {key:_0x5944c9,value:_0x487d5d}of _0x512e5d[_0x5c53b0(0x52f)]){await _0x54323d[_0x5c53b0(0x3ba)](_0x5c53b0(0x554),_0x5944c9,_0x487d5d);}}});const _0x549f81=[];if(_0x512e5d['identity'])_0x549f81[_0x595963(0x338)]('node\x20identity');if(_0x512e5d[_0x595963(0x52f)][_0x595963(0x3be)]>0x0)_0x549f81[_0x595963(0x338)](_0x512e5d[_0x595963(0x52f)][_0x595963(0x3be)]+_0x595963(0x417));console[_0x595963(0x51a)](_0x595963(0x518)+_0x549f81['join'](_0x595963(0x357)));}catch(_0x38917e){console[_0x595963(0x51a)](_0x595963(0x347)+_0x38917e[_0x595963(0x439)]);}}async function _0x4e0f48(_0x77060a,_0xd6da70,_0x24618a){const _0x381ef9=_0x460c8d,_0x594069=require$$5$1,_0x5ce423=new _0x594069(_0x77060a,{'admin':![],'mcp':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],..._0x4a3f07(_0xd6da70)});await _0x5ce423[_0x381ef9(0x654)]();try{return await _0x24618a(_0x5ce423);}finally{await _0x5ce423[_0x381ef9(0x55c)]();}}async function _0x161c17(_0x2f9d6d,_0x433ffb){const _0xe79a19=_0x460c8d,_0x1a3cb1=require$$5$1,_0x38bd49=_0x4616a9[_0xe79a19(0x400)](_0x433ffb[_0xe79a19(0x5f0)]);console[_0xe79a19(0x51a)](_0xe79a19(0x255)+_0x38bd49+'…');const _0x16adb2=new _0x1a3cb1(_0x38bd49,_0x4a3f07(_0x433ffb));await _0x16adb2['open'](),console[_0xe79a19(0x51a)]('[okdb]\x20backing\x20up\x20to\x20'+_0x2f9d6d+'…');const {envs:_0x250cac,blobs:_0x2ed045,skipped:_0x9f4177}=await _0x16adb2['migrate']['backup'](_0x2f9d6d);for(const _0x55d446 of _0x250cac){const _0x3bee3c=_0x55d446[_0xe79a19(0x519)]>0x0?_0xe79a19(0x2fd)+(_0x55d446[_0xe79a19(0x519)]/0x400/0x400)[_0xe79a19(0x849)](0x2)+_0xe79a19(0x60e)+(_0x55d446[_0xe79a19(0x857)]/0x400/0x400)['toFixed'](0x2)+_0xe79a19(0x481):'';console[_0xe79a19(0x51a)](_0xe79a19(0x748)+_0x55d446[_0xe79a19(0x2a9)]+_0xe79a19(0x89f)+_0x55d446[_0xe79a19(0x212)]+_0x3bee3c+(_0x55d446[_0xe79a19(0x3a4)]?'\x20\x20(+\x20time-machine)':''));}if(_0x2ed045[_0xe79a19(0x2a3)]>0x0)console[_0xe79a19(0x51a)](_0xe79a19(0x870)+_0x2ed045[_0xe79a19(0x2a3)]+_0xe79a19(0x552));for(const _0x1b2f46 of _0x9f4177)console['log']('\x20\x20✗\x20'+_0x1b2f46[_0xe79a19(0x2a9)]+_0xe79a19(0x744)+_0x1b2f46['reason']);await _0x16adb2[_0xe79a19(0x55c)](),console['log'](_0xe79a19(0x7d8));}async function _0x25d104(_0x140d3f,_0x54e43d,_0x198865={}){const _0x2387c4=_0x460c8d,{BACKUP_MANIFEST:_0x51336c}=requireOkdbMigrate(),_0x3ecbee=_0x4616a9[_0x2387c4(0x400)](_0x54e43d[_0x2387c4(0x5f0)]),_0x1124e9=_0x4616a9[_0x2387c4(0x86d)](_0x140d3f,_0x51336c);if(!_0x372abd[_0x2387c4(0x4e5)](_0x1124e9))throw new Error(_0x140d3f+_0x2387c4(0x2e3)+_0x51336c+')');const _0x3538bf=JSON[_0x2387c4(0x81a)](_0x372abd[_0x2387c4(0x7d6)](_0x1124e9,_0x2387c4(0x6ec))),_0x5179ee=_0x4616a9[_0x2387c4(0x4f0)](_0x140d3f,_0x3ecbee);if(_0x5179ee===''||!(_0x5179ee[_0x2387c4(0x5e1)]('..')||_0x4616a9['isAbsolute'](_0x5179ee)))throw new Error(_0x2387c4(0x770)+_0x3ecbee+_0x2387c4(0x2e6)+_0x140d3f);if(_0x372abd['existsSync'](_0x3ecbee)&&_0x372abd['readdirSync'](_0x3ecbee)[_0x2387c4(0x3be)]>0x0)throw new Error(_0x2387c4(0x770)+_0x3ecbee+'\x20is\x20not\x20empty\x20—\x20restore\x20only\x20into\x20a\x20new\x20or\x20empty\x20directory');console['log'](_0x2387c4(0x482)+_0x140d3f+_0x2387c4(0x4cb)+_0x3538bf[_0x2387c4(0x5a9)]+',\x20'+_0x3538bf[_0x2387c4(0x5b5)]+_0x2387c4(0x813)+_0x3ecbee+'…'),_0x372abd[_0x2387c4(0x59c)](_0x140d3f,_0x3ecbee,{'recursive':!![],'errorOnExist':!![]});for(const _0x4f28fc of _0x3538bf[_0x2387c4(0x576)]??[]){console[_0x2387c4(0x51a)](_0x2387c4(0x748)+_0x4f28fc[_0x2387c4(0x2a9)]+(_0x4f28fc[_0x2387c4(0x3a4)]?_0x2387c4(0x792):'')),_0x4f28fc[_0x2387c4(0x84e)]&&_0x4f28fc[_0x2387c4(0x44e)]&&_0x372abd[_0x2387c4(0x4e5)](_0x4f28fc[_0x2387c4(0x44e)])&&console['log'](_0x2387c4(0x434)+_0x4f28fc[_0x2387c4(0x2a9)]+_0x2387c4(0x3b0)+_0x4f28fc['sourcePath']+_0x2387c4(0x787)+('store\x20will\x20open\x20THAT\x20directory,\x20not\x20the\x20copy\x20in\x20'+_0x4f28fc[_0x2387c4(0x885)]+'.\x20Move\x20it\x20away\x20first\x20to\x20use\x20the\x20copy.'));}_0x198865[_0x2387c4(0x4db)]&&(require$$5$1[_0x2387c4(0x55e)](_0x3ecbee),console[_0x2387c4(0x51a)](_0x2387c4(0x82c))),console[_0x2387c4(0x51a)](_0x2387c4(0x7d0));}async function _0x5b91d8(_0x1b8c22,_0x376b9b,_0x3e28a1){const _0x50adff=_0x460c8d,_0x2c5854=require$$5$1,_0x790f5b=_0x4616a9[_0x50adff(0x400)](_0x376b9b[_0x50adff(0x5f0)]),_0x2dc35e=_0x3e28a1['env']??_0x50adff(0x2dc),_0x23a46b=_0x3e28a1[_0x50adff(0x732)]?_0x3e28a1[_0x50adff(0x732)][_0x50adff(0x735)](',')[_0x50adff(0x8bd)](_0x395c6f=>_0x395c6f['trim']()):null;console[_0x50adff(0x51a)](_0x50adff(0x255)+_0x790f5b+'…');const _0x5d9c5c=new _0x2c5854(_0x790f5b,_0x4a3f07(_0x376b9b));await _0x5d9c5c['open'](),console[_0x50adff(0x51a)](_0x50adff(0x1e2)+_0x2dc35e+_0x50adff(0x4a5)+_0x1b8c22+'…');const _0x5cf4ed=await _0x5d9c5c[_0x50adff(0x1c4)][_0x50adff(0x3b7)](_0x1b8c22,{'envName':_0x2dc35e,'types':_0x23a46b,'includeChanges':!!_0x3e28a1[_0x50adff(0x7a2)]});console[_0x50adff(0x51a)]('[okdb]\x20exported\x20\x20types='+_0x5cf4ed[_0x50adff(0x732)]+'\x20\x20records='+_0x5cf4ed['records']+_0x50adff(0x3bd)+_0x5cf4ed['changes']);if(_0x3e28a1[_0x50adff(0x84a)]){const _0x58980e=_0x4616a9['join'](_0x4616a9[_0x50adff(0x815)](_0x1b8c22),_0x50adff(0x84a));process[_0x50adff(0x6cd)][_0x50adff(0x6d4)](_0x50adff(0x30e));const {count:_0x30ee3a,bytes:_0x14381c}=await _0x5d9c5c[_0x50adff(0x1c4)][_0x50adff(0x319)](_0x58980e);console[_0x50adff(0x51a)](_0x50adff(0x224)+_0x58980e+'\x20\x20('+_0x30ee3a+_0x50adff(0x318)+(_0x30ee3a!==0x1?'s':'')+',\x20'+(_0x14381c/0x400/0x400)[_0x50adff(0x849)](0x2)+_0x50adff(0x481));}await _0x5d9c5c['close'](),console[_0x50adff(0x51a)](_0x50adff(0x7b5));}async function _0x239d03(_0x17027f,_0x30cf61,_0x549fd9){const _0x4a168a=_0x460c8d,_0x2cc2e0=require$$5$1,_0x4796cc=_0x4616a9[_0x4a168a(0x400)](_0x30cf61['dbPath']),_0x55eb5b=_0x549fd9['env']??null,_0x57f963=_0x549fd9[_0x4a168a(0x732)]?_0x549fd9[_0x4a168a(0x732)]['split'](',')[_0x4a168a(0x8bd)](_0x5e6d08=>_0x5e6d08[_0x4a168a(0x543)]()):null,_0x398757=!!_0x549fd9[_0x4a168a(0x806)];console['log'](_0x4a168a(0x255)+_0x4796cc+'…');const _0x589d84=new _0x2cc2e0(_0x4796cc,_0x4a3f07(_0x30cf61));await _0x589d84[_0x4a168a(0x654)](),console[_0x4a168a(0x51a)](_0x4a168a(0x1c0)+_0x17027f+'…');const _0x11f109=await _0x589d84[_0x4a168a(0x1c4)][_0x4a168a(0x6b6)](_0x17027f,{'envName':_0x55eb5b,'types':_0x57f963,'dropExisting':_0x398757,'includeChanges':!!_0x549fd9[_0x4a168a(0x7a2)],'onProgress':({type:_0x4e4bf0,count:_0x5da22e})=>{const _0x425fc0=_0x4a168a;process['stdout'][_0x425fc0(0x6d4)](_0x425fc0(0x418)+_0x4e4bf0+':\x20'+_0x5da22e+'\x20records…');}});process[_0x4a168a(0x6cd)][_0x4a168a(0x6d4)]('\x0a'),console[_0x4a168a(0x51a)](_0x4a168a(0x354)+_0x11f109['types']+_0x4a168a(0x38e)+_0x11f109[_0x4a168a(0x3f8)]+_0x4a168a(0x3bd)+_0x11f109[_0x4a168a(0x7a2)]);if(_0x549fd9[_0x4a168a(0x84a)]){const _0x5606a3=_0x4616a9[_0x4a168a(0x86d)](_0x4616a9[_0x4a168a(0x815)](_0x17027f),_0x4a168a(0x84a));if(_0x372abd[_0x4a168a(0x4e5)](_0x5606a3)){const {imported:_0x4814b5,skipped:_0x2b1df1}=await _0x589d84['migrate'][_0x4a168a(0x4de)](_0x5606a3);console[_0x4a168a(0x51a)](_0x4a168a(0x528)+_0x4814b5+_0x4a168a(0x771)+_0x2b1df1);}}await _0x589d84[_0x4a168a(0x55c)](),console[_0x4a168a(0x51a)]('[okdb]\x20import\x20complete');}async function _0x165809(_0xd24160,_0x23af6d){const _0x218241=_0x460c8d;_0x23af6d['password']&&!_0x23af6d[_0x218241(0x2a9)]&&(console[_0x218241(0x21f)](_0x218241(0x243)),process[_0x218241(0x56e)](0x1));const _0x57c95b=_0x23af6d[_0x218241(0x394)]?_0x23af6d['permissions'][_0x218241(0x735)](',')[_0x218241(0x8bd)](_0x2345d5=>_0x2345d5[_0x218241(0x543)]())[_0x218241(0x49c)](Boolean):[];let _0x4829fd={};if(_0x23af6d[_0x218241(0x296)])try{_0x4829fd=JSON[_0x218241(0x81a)](_0x23af6d[_0x218241(0x296)]);if(typeof _0x4829fd!==_0x218241(0x320)||Array[_0x218241(0x590)](_0x4829fd)||_0x4829fd===null)throw new Error();}catch{console['error'](_0x218241(0x308)),process[_0x218241(0x56e)](0x1);}const _0x50ee5a=require$$5$1,{randomToken:_0xe63276,hashToken:_0x547bef,hashPassword:_0x1c295f}=requireOkdbAuthTokens(),_0x1be130=require$$2$1,_0x7e3ad7=_0x4616a9[_0x218241(0x400)](_0xd24160['dbPath']),_0x1b1f1c=new _0x50ee5a(_0x7e3ad7,_0x4a3f07(_0xd24160));await _0x1b1f1c[_0x218241(0x654)]();try{await _0x1b1f1c[_0x218241(0x3bb)]['_ensureTokensType']();if(_0x23af6d[_0x218241(0x2a9)]){const _0x2f9e3a=await _0x1b1f1c[_0x218241(0x3bb)]['_lookupByName'](_0x23af6d[_0x218241(0x2a9)]);_0x2f9e3a&&(console[_0x218241(0x21f)](_0x218241(0x388)+_0x23af6d['name']+'\x22\x20already\x20exists'),process[_0x218241(0x56e)](0x1));}const _0x413635=_0xe63276(0x20),_0x142bcf=_0x547bef(_0x413635),_0x144413=_0x23af6d[_0x218241(0x863)]?await _0x1c295f(_0x23af6d[_0x218241(0x863)]):null,_0x19fe89=_0x1be130[_0x218241(0x38f)](),_0x54db63={'tokenHash':_0x142bcf,'name':_0x23af6d[_0x218241(0x2a9)]||null,'passwordHash':_0x144413,'label':_0x23af6d[_0x218241(0x660)]||null,'permissions':_0x57c95b,'grants':_0x4829fd,'createdAt':Date[_0x218241(0x81b)](),'lastUsedAt':null},_0x31a510=_0x23af6d['ttl']?{'ttl':Number(_0x23af6d['ttl'])}:undefined;await _0x1b1f1c['_systemEnv'][_0x218241(0x3ba)](_0x218241(0x1b5),_0x19fe89,_0x54db63,_0x31a510),console[_0x218241(0x51a)]('\x0a\x20\x20\u2713\x20Token\x20created'),console['log'](_0x218241(0x4ec)+_0x19fe89),console[_0x218241(0x51a)]('\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x23af6d[_0x218241(0x2a9)]||_0x218241(0x87f))),console[_0x218241(0x51a)]('\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20'+(_0x23af6d[_0x218241(0x660)]||'(unset)')),console['log'](_0x218241(0x78c)+(_0x57c95b[_0x218241(0x86d)](',\x20')||_0x218241(0x432))),console[_0x218241(0x51a)](_0x218241(0x5a1)),console[_0x218241(0x51a)](_0x218241(0x1d3)+_0x413635+'\x0a');}finally{await _0x1b1f1c[_0x218241(0x55c)]();}}async function _0x3e6066(_0x6f1a9f){const _0x2b332b=_0x460c8d,_0x292c50=require$$5$1,_0x5142e8=_0x4616a9['resolve'](_0x6f1a9f['dbPath']),_0x26ba54=new _0x292c50(_0x5142e8,_0x4a3f07(_0x6f1a9f));await _0x26ba54[_0x2b332b(0x654)]();try{const _0x42566a=_0x26ba54['_systemEnv'];if(!_0x42566a||!_0x42566a[_0x2b332b(0x708)](_0x2b332b(0x1b5))){console['log'](_0x2b332b(0x1ff));return;}const _0x4d5360=[];for(const {key:_0x38f9ec,value:_0x58ca94}of _0x42566a['getRange'](_0x2b332b(0x1b5))){_0x4d5360[_0x2b332b(0x338)]({'id':_0x38f9ec,'name':_0x58ca94[_0x2b332b(0x2a9)]||'(unset)','label':_0x58ca94[_0x2b332b(0x660)]||_0x2b332b(0x87f),'permissions':Array[_0x2b332b(0x590)](_0x58ca94[_0x2b332b(0x394)])?_0x58ca94[_0x2b332b(0x394)]['join'](','):'','created':_0x58ca94[_0x2b332b(0x5b5)]?new Date(_0x58ca94[_0x2b332b(0x5b5)])[_0x2b332b(0x362)]()[_0x2b332b(0x556)](0x0,0xa):''});}if(_0x4d5360['length']===0x0){console[_0x2b332b(0x51a)](_0x2b332b(0x1ff));return;}const _0x1e79eb=!process[_0x2b332b(0x6cd)][_0x2b332b(0x2bb)]||process[_0x2b332b(0x6cd)][_0x2b332b(0x2bb)]>=0x64,_0x3fb1fc=_0x1e79eb?0x24:0xa,_0x38d7aa=['ID'['padEnd'](_0x3fb1fc),'NAME'[_0x2b332b(0x6ee)](0x10),_0x2b332b(0x502)['padEnd'](0x14),_0x2b332b(0x73f)[_0x2b332b(0x6ee)](0x14),'CREATED']['join']('\x20\x20');console[_0x2b332b(0x51a)]('\x0a'+_0x38d7aa),console[_0x2b332b(0x51a)]('-'['repeat'](_0x38d7aa[_0x2b332b(0x3be)]));for(const _0x301cf6 of _0x4d5360){const _0x3bd6a2=_0x1e79eb?_0x301cf6['id']:_0x301cf6['id'][_0x2b332b(0x556)](0x0,0x8)+'…';console['log']([_0x3bd6a2[_0x2b332b(0x6ee)](_0x3fb1fc),_0x301cf6[_0x2b332b(0x2a9)][_0x2b332b(0x556)](0x0,0x10)[_0x2b332b(0x6ee)](0x10),_0x301cf6[_0x2b332b(0x660)][_0x2b332b(0x556)](0x0,0x14)[_0x2b332b(0x6ee)](0x14),_0x301cf6[_0x2b332b(0x394)]['slice'](0x0,0x14)['padEnd'](0x14),_0x301cf6[_0x2b332b(0x61a)]][_0x2b332b(0x86d)]('\x20\x20'));}console[_0x2b332b(0x51a)]('');}finally{await _0x26ba54[_0x2b332b(0x55c)]();}}async function _0x150aaa(_0x41982a,_0x499120){const _0x2be282=_0x460c8d;!_0x41982a&&(console['error'](_0x2be282(0x337)),process[_0x2be282(0x56e)](0x1));const _0x9a839=require$$5$1,_0x534be5=_0x4616a9[_0x2be282(0x400)](_0x499120['dbPath']),_0x3c1304=new _0x9a839(_0x534be5,_0x4a3f07(_0x499120));await _0x3c1304['open']();try{const _0x3fd31c=_0x3c1304[_0x2be282(0x6a1)];(!_0x3fd31c||!_0x3fd31c[_0x2be282(0x708)](_0x2be282(0x1b5)))&&(console[_0x2be282(0x21f)](_0x2be282(0x737)+_0x41982a+'\x22'),process[_0x2be282(0x56e)](0x1));let _0x180506=null,_0x38d57c=null;const _0x3a2566=_0x3fd31c[_0x2be282(0x5ab)](_0x2be282(0x1b5),_0x41982a);if(_0x3a2566)_0x180506=_0x41982a,_0x38d57c=_0x3a2566;else{const _0x34f16f=[];for(const {key:_0x540316,value:_0x69330c}of _0x3fd31c[_0x2be282(0x754)]('~tokens')){if(_0x540316[_0x2be282(0x5e1)](_0x41982a))_0x34f16f['push']({'key':_0x540316,'value':_0x69330c});}_0x34f16f[_0x2be282(0x3be)]===0x0&&(console[_0x2be282(0x21f)](_0x2be282(0x737)+_0x41982a+'\x22'),process['exit'](0x1));if(_0x34f16f[_0x2be282(0x3be)]>0x1){console[_0x2be282(0x21f)](_0x2be282(0x643)+_0x41982a+_0x2be282(0x300)+_0x34f16f[_0x2be282(0x3be)]+_0x2be282(0x5ff));for(const _0x3454db of _0x34f16f){console[_0x2be282(0x21f)]('\x20\x20'+_0x3454db[_0x2be282(0x7d4)]+_0x2be282(0x294)+(_0x3454db[_0x2be282(0x6ba)][_0x2be282(0x2a9)]||_0x2be282(0x87f))+')');}process['exit'](0x1);}_0x180506=_0x34f16f[0x0][_0x2be282(0x7d4)],_0x38d57c=_0x34f16f[0x0][_0x2be282(0x6ba)];}await _0x3fd31c[_0x2be282(0x77c)](_0x2be282(0x1b5),_0x180506),console[_0x2be282(0x51a)](_0x2be282(0x7b8)+_0x180506+_0x2be282(0x294)+(_0x38d57c[_0x2be282(0x2a9)]||_0x2be282(0x87f))+_0x2be282(0x66b)+(_0x38d57c['label']||_0x2be282(0x87f))+')');}finally{await _0x3c1304[_0x2be282(0x55c)]();}}function _0x5e2a83(_0x20d01b,_0x1806c7){const _0xcde5e8=_0x460c8d;if(!_0x20d01b[_0xcde5e8(0x631)])return _0xcde5e8(0x1ab);const _0x51af8c=_0x20d01b[_0xcde5e8(0x6ad)];if(!_0x51af8c)return'active';if(_0x1806c7>_0x51af8c)return _0xcde5e8(0x2be);return _0xcde5e8(0x3d6);}function _0x53f19c(_0x5dfb76){const _0x23eb89=_0x460c8d;if(!_0x5dfb76||typeof _0x5dfb76!=='object')return'';const _0x1b616d=Object[_0x23eb89(0x444)](_0x5dfb76)[_0x23eb89(0x49c)](([,_0x112fa2])=>_0x112fa2)[_0x23eb89(0x8bd)](([_0xad7c62])=>_0xad7c62);if(_0x1b616d[_0x23eb89(0x3be)]===0x0)return _0x23eb89(0x432);if(_0x1b616d[_0x23eb89(0x3be)]<=0x3)return _0x1b616d[_0x23eb89(0x86d)]('\x20');return _0x1b616d[_0x23eb89(0x556)](0x0,0x3)[_0x23eb89(0x86d)]('\x20')+('\x20+'+(_0x1b616d[_0x23eb89(0x3be)]-0x3));}async function _0x72a10c(_0x26e7ae){const _0x139633=_0x460c8d,_0x3b7e62=require$$5$1,_0x231773=requireOkdbLicenseCodec(),{_C:_0x579e93}=requireOkdbLicense(),_0x2637ef=_0x4616a9[_0x139633(0x400)](_0x26e7ae['dbPath']),_0x5369ef=new _0x3b7e62(_0x2637ef,_0x4a3f07(_0x26e7ae));await _0x5369ef[_0x139633(0x654)]();try{const _0x2aff0e=_0x5369ef[_0x139633(0x6a1)],_0x1af1f7=_0x2aff0e?.['db']?.['get']?.(_0x139633(0x87b))??0x0,_0x568928=[..._0x5369ef[_0x139633(0x828)][_0x139633(0x6c7)]()][_0x139633(0x49c)](_0x420fe5=>!_0x420fe5[_0x139633(0x5e1)]('~'))[_0x139633(0x3be)],_0x2a87c2=_0x5369ef['_license']?.[_0x139633(0x701)];if(_0x2a87c2){const _0x50262a=_0x2a87c2[_0x139633(0x301)]===!![],_0x1fbeb8=_0x50262a?'free\x20tier':_0x5369ef[_0x139633(0x5dd)]['active']?.['licensee']||_0x139633(0x273);console[_0x139633(0x51a)](''),console[_0x139633(0x51a)]('\x20\x20Tier:\x20\x20\x20\x20'+_0x1fbeb8);const _0x1ac6de=_0x2a87c2[_0x139633(0x427)]||{};if(_0x1ac6de[_0x139633(0x4bf)]){const _0x3b54ba=Math[_0x139633(0x283)](_0x1af1f7/_0x1ac6de['maxWrites']*0x64);console[_0x139633(0x51a)](_0x139633(0x2ea)+_0x1af1f7[_0x139633(0x864)]()+'\x20/\x20'+_0x1ac6de[_0x139633(0x4bf)][_0x139633(0x864)]()+_0x139633(0x2fd)+_0x3b54ba+'%)');}else console[_0x139633(0x51a)]('\x20\x20Writes:\x20\x20'+_0x1af1f7['toLocaleString']());_0x1ac6de['envs']?console[_0x139633(0x51a)]('\x20\x20Envs:\x20\x20\x20\x20'+_0x568928+_0x139633(0x5e3)+_0x1ac6de[_0x139633(0x576)]):console[_0x139633(0x51a)](_0x139633(0x29a)+_0x568928),_0x579e93?.[_0x139633(0x8b9)]&&console[_0x139633(0x51a)](_0x139633(0x355)+_0x579e93[_0x139633(0x8b9)]+_0x139633(0x1ad));}if(!_0x2aff0e||!_0x2aff0e[_0x139633(0x708)](_0x139633(0x554))){console[_0x139633(0x51a)](''),console[_0x139633(0x51a)](_0x139633(0x74d)),console[_0x139633(0x51a)]('');return;}const _0x16b4d8=[],_0x19d6ce=Date[_0x139633(0x81b)](),_0x5248e0=_0x5369ef['id'],_0x428e8d='__OKDB_PUB_FINGERPRINT__';for(const {key:_0x39e739,value:_0x254d4b}of _0x2aff0e[_0x139633(0x754)](_0x139633(0x554))){const _0x2c32f9=_0x254d4b[_0x139633(0x438)]?Buffer[_0x139633(0x4e1)](_0x254d4b[_0x139633(0x438)],_0x139633(0x45a)):Buffer[_0x139633(0x718)](0x8);let _0x45edf3='';try{_0x45edf3=_0x231773[_0x139633(0x372)](_0x5248e0,_0x2c32f9,_0x428e8d)[_0x139633(0x733)];}catch{}_0x16b4d8[_0x139633(0x338)]({'id':_0x39e739,'licensee':_0x254d4b[_0x139633(0x228)]||'','expires':_0x254d4b[_0x139633(0x6ad)]?new Date(_0x254d4b['expiresAt'])[_0x139633(0x362)]()[_0x139633(0x556)](0x0,0xa):'','features':_0x53f19c(_0x254d4b[_0x139633(0x5a5)]),'pin':_0x45edf3,'status':_0x5e2a83(_0x254d4b,_0x19d6ce)});}if(_0x16b4d8[_0x139633(0x3be)]===0x0){console[_0x139633(0x51a)](''),console[_0x139633(0x51a)](_0x139633(0x74d)),console[_0x139633(0x51a)]('');return;}const _0x48e900=['\x20\x20'+'ID'[_0x139633(0x6ee)](0xe),'LICENSEE'['padEnd'](0xe),_0x139633(0x746)[_0x139633(0x6ee)](0xc),_0x139633(0x2ce)[_0x139633(0x6ee)](0x1e),_0x139633(0x639)[_0x139633(0x6ee)](0xa),_0x139633(0x288)][_0x139633(0x86d)]('\x20');console[_0x139633(0x51a)]('\x0a'+_0x48e900);for(const _0x21b2e3 of _0x16b4d8){const _0x48ff25=_0x21b2e3['id'][_0x139633(0x556)](0x0,0x8)+'\u2026';console['log'](['\x20\x20'+_0x48ff25['padEnd'](0xe),_0x21b2e3['licensee'][_0x139633(0x556)](0x0,0xe)[_0x139633(0x6ee)](0xe),_0x21b2e3[_0x139633(0x63c)][_0x139633(0x6ee)](0xc),_0x21b2e3[_0x139633(0x5a5)][_0x139633(0x556)](0x0,0x1e)['padEnd'](0x1e),_0x21b2e3[_0x139633(0x733)]['padEnd'](0xa),_0x21b2e3[_0x139633(0x492)]][_0x139633(0x86d)]('\x20'));}console[_0x139633(0x51a)]('');}finally{await _0x5369ef[_0x139633(0x55c)]();}}async function _0x4bedcd(_0xaae1d1,_0x42f2f2){const _0x57c3a0=_0x460c8d,_0x3718c4=require$$5$1,_0x2388fa=requireOkdbLicenseCodec();let _0x1c484c=_0xaae1d1;(_0x2388fa[_0x57c3a0(0x539)](_0xaae1d1)==='path'||_0x372abd['existsSync'](_0xaae1d1)&&_0x372abd[_0x57c3a0(0x267)](_0xaae1d1)['isFile']())&&(_0x1c484c=_0x372abd[_0x57c3a0(0x7d6)](_0xaae1d1,'utf8')[_0x57c3a0(0x543)]());const _0x422c93=_0x4616a9[_0x57c3a0(0x400)](_0x42f2f2[_0x57c3a0(0x5f0)]),_0x3dc2fe=new _0x3718c4(_0x422c93,_0x4a3f07(_0x42f2f2));await _0x3dc2fe[_0x57c3a0(0x654)]();try{let _0x571b58;try{_0x571b58=await _0x3dc2fe[_0x57c3a0(0x52f)][_0x57c3a0(0x88a)]({'blob':_0x1c484c});}catch(_0x453683){console[_0x57c3a0(0x21f)]('[okdb]\x20error:\x20'+_0x453683['message']),process[_0x57c3a0(0x56e)](0x1);}const _0x224458=_0x571b58[_0x57c3a0(0x733)]||'',_0xcb48a4=Object[_0x57c3a0(0x444)](_0x571b58['features']||{})['filter'](([,_0x17abdc])=>_0x17abdc)[_0x57c3a0(0x8bd)](([_0x43fe9c])=>_0x43fe9c),_0x2dad78=_0x571b58['limits']||{},_0x4b13a2=[_0x2dad78[_0x57c3a0(0x576)]?'envs='+_0x2dad78[_0x57c3a0(0x576)]:null,_0x2dad78['typesPerEnv']?_0x57c3a0(0x1ec)+_0x2dad78['typesPerEnv']:null,_0x2dad78[_0x57c3a0(0x840)]?_0x57c3a0(0x333)+_0x2dad78[_0x57c3a0(0x840)]:null,_0x2dad78['maxWrites']?_0x57c3a0(0x265)+_0x2dad78[_0x57c3a0(0x4bf)][_0x57c3a0(0x864)]():null]['filter'](Boolean)[_0x57c3a0(0x86d)]('\x20\x20'),_0x3e7d40=_0x571b58[_0x57c3a0(0x70d)]!==_0x57c3a0(0x5b3);console[_0x57c3a0(0x51a)](_0x571b58[_0x57c3a0(0x3e3)]?_0x57c3a0(0x5c2):_0x57c3a0(0x630)),console['log'](_0x57c3a0(0x766)+_0x571b58['id']),console[_0x57c3a0(0x51a)](_0x57c3a0(0x6b7)+_0x571b58[_0x57c3a0(0x228)]),console[_0x57c3a0(0x51a)]('\x20\x20\x20\x20expires:\x20\x20\x20'+(_0x571b58[_0x57c3a0(0x6ad)]?new Date(_0x571b58[_0x57c3a0(0x6ad)])[_0x57c3a0(0x362)]()[_0x57c3a0(0x556)](0x0,0xa):_0x57c3a0(0x2df))),console['log']('\x20\x20\x20\x20features:\x20\x20'+(_0xcb48a4[_0x57c3a0(0x86d)](',\x20')||_0x57c3a0(0x432)));if(_0x4b13a2)console[_0x57c3a0(0x51a)](_0x57c3a0(0x436)+_0x4b13a2);if(_0x3e7d40)console['log'](_0x57c3a0(0x21e)+_0x571b58[_0x57c3a0(0x70d)]+'\x20license\x20—\x20no\x20activation\x20needed)'),console[_0x57c3a0(0x51a)]('');else!_0x571b58[_0x57c3a0(0x7ba)]?(console[_0x57c3a0(0x51a)](_0x57c3a0(0x545)+_0x571b58['status']),console['log']('')):(console['log'](_0x57c3a0(0x546)+_0x224458),console['log'](_0x57c3a0(0x429)),console['log'](''),console['log'](_0x57c3a0(0x3da)),console[_0x57c3a0(0x51a)](_0x57c3a0(0x67d)+_0x224458+_0x57c3a0(0x51c)),console['log'](_0x57c3a0(0x39e)),console[_0x57c3a0(0x51a)]('\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>'),console[_0x57c3a0(0x51a)](''));}finally{await _0x3dc2fe[_0x57c3a0(0x55c)]();}}async function _0x1ffbbd(_0x43bf67,_0xc0d56d){const _0x5bb7c7=_0x460c8d,_0x5ab7a7=require$$5$1,_0x42916d=_0x4616a9[_0x5bb7c7(0x400)](_0xc0d56d[_0x5bb7c7(0x5f0)]),_0x33e4b9=new _0x5ab7a7(_0x42916d,_0x4a3f07(_0xc0d56d));await _0x33e4b9[_0x5bb7c7(0x654)]();try{let _0x38a0b1;try{_0x38a0b1=await _0x33e4b9[_0x5bb7c7(0x52f)][_0x5bb7c7(0x233)](_0x43bf67);}catch(_0x4ad522){console[_0x5bb7c7(0x21f)](_0x5bb7c7(0x2f1)+_0x4ad522[_0x5bb7c7(0x439)]),console['error'](''),console[_0x5bb7c7(0x21f)](_0x5bb7c7(0x638)),console[_0x5bb7c7(0x21f)](_0x5bb7c7(0x287)),console[_0x5bb7c7(0x21f)]('\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.'),console[_0x5bb7c7(0x21f)](_0x5bb7c7(0x707)),console['error'](''),process['exit'](0x1);}console['log']('\x0a\x20\x20✓\x20License\x20activated'),console[_0x5bb7c7(0x51a)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x38a0b1['id']),console[_0x5bb7c7(0x51a)]('\x20\x20\x20\x20licensee:\x20\x20'+_0x38a0b1[_0x5bb7c7(0x228)]),console['log'](_0x5bb7c7(0x7a0)+(_0x38a0b1[_0x5bb7c7(0x6ad)]?new Date(_0x38a0b1[_0x5bb7c7(0x6ad)])[_0x5bb7c7(0x362)]()[_0x5bb7c7(0x556)](0x0,0xa):_0x5bb7c7(0x2df))),console[_0x5bb7c7(0x51a)](_0x5bb7c7(0x3ee)),console[_0x5bb7c7(0x51a)]('');}finally{await _0x33e4b9['close']();}}async function _0x22b2c7(_0x5e8d08,_0x11dbee){const _0x336558=_0x460c8d;!_0x5e8d08&&(console[_0x336558(0x21f)](_0x336558(0x30d)),process['exit'](0x1));const _0x54d4d6=require$$5$1,_0x454526=requireOkdbLicenseCodec(),_0x1c63ab=_0x4616a9[_0x336558(0x400)](_0x11dbee[_0x336558(0x5f0)]),_0x269aaf=new _0x54d4d6(_0x1c63ab,_0x4a3f07(_0x11dbee));await _0x269aaf[_0x336558(0x654)]();try{const _0x39f8ad=_0x269aaf['_systemEnv'];(!_0x39f8ad||!_0x39f8ad['hasType'](_0x336558(0x554)))&&(console[_0x336558(0x21f)](_0x336558(0x27c)+_0x5e8d08+'\x22'),process['exit'](0x1));let _0x188ca2=null,_0x3f93a2=null;const _0x34b9c4=_0x39f8ad[_0x336558(0x5ab)]('~licenses',_0x5e8d08);if(_0x34b9c4)_0x188ca2=_0x5e8d08,_0x3f93a2=_0x34b9c4;else{const _0xc24bfa=[];for(const {key:_0x4155d5,value:_0x3a4c31}of _0x39f8ad['getRange']('~licenses')){if(_0x4155d5['startsWith'](_0x5e8d08))_0xc24bfa[_0x336558(0x338)]({'key':_0x4155d5,'value':_0x3a4c31});}_0xc24bfa['length']===0x0&&(console['error'](_0x336558(0x27c)+_0x5e8d08+'\x22'),process[_0x336558(0x56e)](0x1)),_0xc24bfa[_0x336558(0x3be)]>0x1&&(console[_0x336558(0x21f)](_0x336558(0x643)+_0x5e8d08+_0x336558(0x300)+_0xc24bfa[_0x336558(0x3be)]+'\x20licenses'),process['exit'](0x1)),_0x188ca2=_0xc24bfa[0x0][_0x336558(0x7d4)],_0x3f93a2=_0xc24bfa[0x0][_0x336558(0x6ba)];}const _0x59346d=Date['now'](),_0x1a5181=_0x5e2a83(_0x3f93a2,_0x59346d),_0x57934e=_0x269aaf['id'],_0x28561c=_0x336558(0x898);let _0x3f9def='';try{const _0xe0b19a=Buffer['from'](_0x3f93a2['_licenseHash'],_0x336558(0x45a));_0x3f9def=_0x454526[_0x336558(0x372)](_0x57934e,_0xe0b19a,_0x28561c)[_0x336558(0x733)];}catch{}const _0x4d52fc=_0x3f93a2[_0x336558(0x5a5)]?Object[_0x336558(0x444)](_0x3f93a2['features'])[_0x336558(0x49c)](([,_0x2f677a])=>_0x2f677a)[_0x336558(0x8bd)](([_0xe17835])=>_0xe17835):[],_0x10f4c9=_0x3f93a2[_0x336558(0x427)]||{},_0x4762b1=_0x39f8ad?.['db']?.[_0x336558(0x5ab)]?.(_0x336558(0x87b))??0x0,_0x375324=[..._0x269aaf[_0x336558(0x828)]['keys']()]['filter'](_0x354506=>!_0x354506['startsWith']('~'))[_0x336558(0x3be)];console[_0x336558(0x51a)](_0x336558(0x4be)),console['log']('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x188ca2),console[_0x336558(0x51a)](_0x336558(0x6b7)+(_0x3f93a2['licensee']||'')),console[_0x336558(0x51a)](_0x336558(0x7a0)+(_0x3f93a2[_0x336558(0x6ad)]?new Date(_0x3f93a2[_0x336558(0x6ad)])[_0x336558(0x362)]()[_0x336558(0x556)](0x0,0xa):'')),console['log'](_0x336558(0x3cb)+(_0x4d52fc[_0x336558(0x86d)](',\x20')||_0x336558(0x432))),console[_0x336558(0x51a)]('\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20'+_0x3f9def),console[_0x336558(0x51a)](_0x336558(0x545)+_0x1a5181),console['log'](_0x336558(0x266)+new Date(_0x3f93a2[_0x336558(0x5cf)])[_0x336558(0x362)]());if(_0x1a5181===_0x336558(0x3d6)){console[_0x336558(0x51a)](''),console[_0x336558(0x51a)]('\x20\x20Usage:');if(_0x10f4c9['maxWrites']){const _0x130d09=Math[_0x336558(0x283)](_0x4762b1/_0x10f4c9[_0x336558(0x4bf)]*0x64);console[_0x336558(0x51a)](_0x336558(0x8c4)+_0x4762b1['toLocaleString']()+_0x336558(0x5e3)+_0x10f4c9[_0x336558(0x4bf)]['toLocaleString']()+'\x20\x20('+_0x130d09+'%)');}else console[_0x336558(0x51a)]('\x20\x20\x20\x20writes:\x20\x20\x20\x20'+_0x4762b1[_0x336558(0x864)]()+_0x336558(0x41c));_0x10f4c9[_0x336558(0x576)]?console['log'](_0x336558(0x217)+_0x375324+_0x336558(0x5e3)+_0x10f4c9[_0x336558(0x576)]):console[_0x336558(0x51a)](_0x336558(0x217)+_0x375324+'\x20\x20(unlimited)');}console[_0x336558(0x51a)]('');}finally{await _0x269aaf[_0x336558(0x55c)]();}}async function _0x58cbeb(_0x17123f,_0x2a8931){const _0x30ff0d=_0x460c8d;!_0x17123f&&(console['error']('[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument'),process['exit'](0x1));const _0x34e614=require$$5$1,_0x35a5f4=_0x4616a9[_0x30ff0d(0x400)](_0x2a8931[_0x30ff0d(0x5f0)]),_0x23ca69=new _0x34e614(_0x35a5f4,_0x4a3f07(_0x2a8931));await _0x23ca69[_0x30ff0d(0x654)]();try{const _0x56d5f8=_0x23ca69[_0x30ff0d(0x6a1)];(!_0x56d5f8||!_0x56d5f8[_0x30ff0d(0x708)](_0x30ff0d(0x554)))&&(console['error']('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x17123f+'\x22'),process[_0x30ff0d(0x56e)](0x1));let _0x19fb17=null,_0x4ac972=null;const _0x2b6389=_0x56d5f8[_0x30ff0d(0x5ab)](_0x30ff0d(0x554),_0x17123f);if(_0x2b6389)_0x19fb17=_0x17123f,_0x4ac972=_0x2b6389;else{const _0x42eaca=[];for(const {key:_0x53729f,value:_0x5763b2}of _0x56d5f8['getRange']('~licenses')){if(_0x53729f[_0x30ff0d(0x5e1)](_0x17123f))_0x42eaca[_0x30ff0d(0x338)]({'key':_0x53729f,'value':_0x5763b2});}_0x42eaca['length']===0x0&&(console[_0x30ff0d(0x21f)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x17123f+'\x22'),process[_0x30ff0d(0x56e)](0x1)),_0x42eaca[_0x30ff0d(0x3be)]>0x1&&(console[_0x30ff0d(0x21f)](_0x30ff0d(0x643)+_0x17123f+_0x30ff0d(0x300)+_0x42eaca[_0x30ff0d(0x3be)]+_0x30ff0d(0x613)),process[_0x30ff0d(0x56e)](0x1)),_0x19fb17=_0x42eaca[0x0][_0x30ff0d(0x7d4)],_0x4ac972=_0x42eaca[0x0][_0x30ff0d(0x6ba)];}await _0x56d5f8[_0x30ff0d(0x77c)](_0x30ff0d(0x554),_0x19fb17),console['log'](_0x30ff0d(0x4ef)+_0x19fb17+_0x30ff0d(0x871)+(_0x4ac972[_0x30ff0d(0x228)]||'(unset)')+')');}finally{await _0x23ca69[_0x30ff0d(0x55c)]();}}async function _0x1fa1d8(_0x2a5b3e,_0x2f4705,_0x2bd825){const _0x5ecfa4=_0x460c8d;!_0x2a5b3e&&(console['error'](_0x5ecfa4(0x42a)),process[_0x5ecfa4(0x56e)](0x1));!_0x2bd825[_0x5ecfa4(0x353)]&&!(_0x2bd825[_0x5ecfa4(0x6c3)]&&_0x2bd825[_0x5ecfa4(0x863)])&&(console[_0x5ecfa4(0x21f)](_0x5ecfa4(0x778)),process['exit'](0x1));const _0x35c29d=_0x2bd825[_0x5ecfa4(0x557)]||_0x2f4705[_0x5ecfa4(0x461)]?.[_0x5ecfa4(0x448)];!_0x35c29d&&(console['error'](_0x5ecfa4(0x548)+_0x5ecfa4(0x4ac)+_0x5ecfa4(0x304)),process[_0x5ecfa4(0x56e)](0x1));const _0x39a38a=require$$5$1,_0x8768cb=new _0x39a38a(_0x2f4705[_0x5ecfa4(0x5f0)],{'sync':{'address':_0x35c29d,'auto_reconcile':![]}});await _0x8768cb[_0x5ecfa4(0x654)]();try{const _0x16b91c=_0x8768cb[_0x5ecfa4(0x6a1)];if(_0x16b91c&&_0x16b91c[_0x5ecfa4(0x708)]('~tokens')){let _0x12fb01=![];for(const _0x168dbe of _0x16b91c[_0x5ecfa4(0x754)](_0x5ecfa4(0x1b5))){_0x12fb01=!![];break;}_0x12fb01&&console[_0x5ecfa4(0x51a)]('\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a'+_0x5ecfa4(0x24e));}console[_0x5ecfa4(0x51a)](_0x5ecfa4(0x257)+_0x2a5b3e+'…'),await _0x8768cb['sync']['join'](_0x2a5b3e[_0x5ecfa4(0x2f9)](/\/+$/,''),{'token':_0x2bd825[_0x5ecfa4(0x353)],'username':_0x2bd825['username'],'password':_0x2bd825[_0x5ecfa4(0x863)]}),console[_0x5ecfa4(0x51a)](_0x5ecfa4(0x1f9)),console[_0x5ecfa4(0x51a)](_0x5ecfa4(0x3d0));}finally{await _0x8768cb[_0x5ecfa4(0x55c)]();}}async function _0x45d85f(){const _0x138eab=_0x460c8d,_0x13db96=Date[_0x138eab(0x81b)](),_0x3dc940=_0x3f3124(process[_0x138eab(0x553)]),_0x5f50bb=_0x23dc56(_0x3dc940),_0x4a0434=_0x4616a9[_0x138eab(0x400)](_0x5f50bb['dbPath']);!_0x5f50bb['noRepl']&&!process['stdin']['isTTY']&&(_0x5f50bb[_0x138eab(0x4b5)]=!![]);const _0x50003d=require$$5$1,{start:_0xed3a28,colorLog:_0x21d460}=requireOkdbShell(),_0x55679e=require$$1$1,_0x490b0={..._0x5f50bb[_0x138eab(0x7d4)]?{'encryptionKey':_0x5f50bb[_0x138eab(0x7d4)]}:{},..._0x5f50bb['noAdmin']?{'admin':![]}:_0x2841c8(_0x5f50bb[_0x138eab(0x45e)])?{'admin':_0x5f50bb['admin']}:{},..._0x2841c8(_0x5f50bb[_0x138eab(0x7bc)])?{'api':_0x5f50bb['api']}:{},..._0x2841c8(_0x5f50bb[_0x138eab(0x3bb)])?{'auth':_0x5f50bb['auth']}:{},..._0x2841c8(_0x5f50bb[_0x138eab(0x3ac)])?{'mcp':_0x5f50bb['mcp']}:{},..._0x2841c8(_0x5f50bb[_0x138eab(0x811)])?{'backup':_0x5f50bb[_0x138eab(0x811)]}:{},..._0x5f50bb[_0x138eab(0x3a4)]!==![]?{'timeMachine':_0x5f50bb['timeMachine']}:{},...Object['fromEntries'](_0x405183[_0x138eab(0x49c)](_0x140ee5=>_0x5f50bb[_0x140ee5]!==undefined)[_0x138eab(0x8bd)](_0xbde1d2=>[_0xbde1d2,_0x5f50bb[_0xbde1d2]]))},_0x44b853=_0x13f89c(_0x5f50bb);if(!_0x55679e[_0x138eab(0x3c7)]){const _0x57e967=_0x2967fa(),_0xc6a65d=_0x5f50bb[_0x138eab(0x2cb)]?'--no-cluster':_0x5f50bb['workersFlag']!=null&&_0x5f50bb[_0x138eab(0x636)]!==''?'--workers':process.env.OKDB_HTTP_WORKERS?_0x138eab(0x62b):_0x5f50bb[_0x138eab(0x4fc)]?.['workers']!=null?_0x138eab(0x6ef):_0x138eab(0x25a)+Math['max'](0x1,require$$0[_0x138eab(0x3f2)]()[_0x138eab(0x3be)]-0x1);process[_0x138eab(0x6cd)]['write'](_0x138eab(0x3af)+_0x44b853+'\x20('+_0xc6a65d+(!_0x57e967?';\x20shmbuf\x20native\x20missing\x20→\x20forced\x20single-process':'')+')\x0a');}if(_0x55679e[_0x138eab(0x3c7)]){const _0x312b96={..._0x490b0},_0x245d97=new _0x50003d(_0x4a0434,_0x312b96);_0x245d97[_0x138eab(0x51a)][_0x138eab(0x3c1)]?.();const _0x4bd14b=process.env.OKDB_CLUSTER_SLOT??'?',_0x117e33={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x5cba3e=_0x117e33[_0x5f50bb[_0x138eab(0x79d)]]??_0x117e33[_0x138eab(0x8c8)];_0x245d97[_0x138eab(0x51a)][_0x138eab(0x59f)](_0x5c7a48=>{const _0x1c07de=_0x138eab;if((_0x117e33[_0x5c7a48[_0x1c07de(0x5ad)]]??0x1)<_0x5cba3e)return;try{process['send']?.({'__okdbCluster':_0x1c07de(0x51a),'slot':_0x4bd14b,'pid':process['pid'],'entry':_0x5c7a48});}catch{}}),await _0x245d97['open']();const {attachWorkerCluster:_0x12582e}=requireOkdbCluster();_0x12582e(_0x245d97),await _0x1317dd(_0x245d97,_0x5f50bb['port'],_0x14eb46(_0x5f50bb));return;}if(_0x44b853>0x1){const {runClustered:_0x3301fe}=requireOkdbCluster(),_0x249da3=new _0x50003d(_0x4a0434,{..._0x490b0,'engines':![],'processors':![],'compaction':![]});await _0x249da3[_0x138eab(0x654)]();const _0x4ebb87=async()=>{const _0x312119=_0x138eab,_0x30a8b1=new _0x50003d(_0x4a0434,{..._0x490b0});return await _0x30a8b1[_0x312119(0x654)](),_0x30a8b1;},_0x39f639=Object['fromEntries'](_0x405183[_0x138eab(0x8bd)](_0xa18035=>[_0xa18035,_0x490b0[_0xa18035]??!![]])),{formatListenAddr:_0x1dbf4e}=requireOkdbHttp(),_0x1ef3a5=_0x1dbf4e(_0x5f50bb[_0x138eab(0x537)],_0x5f50bb['http']?.[_0x138eab(0x367)]),_0x5506e3=_0x3301fe({'workers':_0x44b853,'makeOkdb':_0x4ebb87,'port':_0x5f50bb['port'],'primaryOkdb':_0x249da3,'workerRole':_0x39f639,'listenAddr':_0x1ef3a5});let _0x29af53=![];async function _0x334d7c(_0x32c46b){const _0xd034e2=_0x138eab;_0x29af53&&(process['stderr'][_0xd034e2(0x6d4)](_0xd034e2(0x44c)),process[_0xd034e2(0x56e)](0x82));_0x29af53=!![],process['stderr'][_0xd034e2(0x6d4)](_0xd034e2(0x20d)+(_0x32c46b||_0xd034e2(0x8cb))+_0xd034e2(0x441));const _0x2dab97=setTimeout(()=>{const _0x59d836=_0xd034e2;process['stderr'][_0x59d836(0x6d4)](_0x59d836(0x334)),process[_0x59d836(0x56e)](0x0);},0xbb8);_0x2dab97[_0xd034e2(0x5e0)]?.();try{await _0x5506e3['close']();}catch(_0x104498){process[_0xd034e2(0x58d)][_0xd034e2(0x6d4)](_0xd034e2(0x31c)+(_0x104498?.[_0xd034e2(0x439)]??_0x104498)+'\x0a');}try{await _0x249da3[_0xd034e2(0x55c)]();}catch(_0x1476b4){process['stderr']['write'](_0xd034e2(0x54c)+(_0x1476b4?.[_0xd034e2(0x439)]??_0x1476b4)+'\x0a');}process[_0xd034e2(0x56e)](0x0);}_0x5f50bb['clusterWorkers']=_0x44b853;if(!_0x5f50bb[_0x138eab(0x4b5)]){_0x249da3[_0x138eab(0x51a)][_0x138eab(0x3c1)]?.(),_0x54c7e(_0x249da3[_0x138eab(0x3bb)]?.[_0x138eab(0x323)]?.()??[]),await _0xed3a28(_0x249da3,_0x5f50bb);return;}process[_0x138eab(0x6cd)][_0x138eab(0x6d4)](_0x138eab(0x6d9)+process[_0x138eab(0x5bc)]+_0x138eab(0x51e)+_0x44b853+'\x20'+('capable\x20HTTP\x20worker(s)\x20serving\x20:'+_0x5f50bb['port']+'\x0a')),console[_0x138eab(0x51a)](''),console[_0x138eab(0x51a)](_0x138eab(0x516)),console[_0x138eab(0x51a)](_0x138eab(0x2c8)+_0x5f50bb[_0x138eab(0x537)]+_0x138eab(0x2fd)+_0x44b853+_0x138eab(0x833)),console[_0x138eab(0x51a)]('\x20\x20\x20\x20path:\x20\x20\x20\x20'+_0x4a0434),console[_0x138eab(0x51a)](_0x138eab(0x2a1)+_0x249da3['id']),console[_0x138eab(0x51a)](_0x138eab(0x715)+_0x5f50bb[_0x138eab(0x537)]+_0x138eab(0x79f));!_0x5f50bb['noAdmin']&&console[_0x138eab(0x51a)](_0x138eab(0x703)+_0x5f50bb['port']+_0x138eab(0x5d8));console[_0x138eab(0x51a)](''),_0x54c7e(_0x249da3[_0x138eab(0x3bb)]?.['getSecurityNotices']?.()??[]),process['on']('SIGINT',()=>_0x334d7c(_0x138eab(0x4f9))),process['on'](_0x138eab(0x52e),()=>_0x334d7c(_0x138eab(0x52e))),process['on']('SIGBREAK',()=>_0x334d7c(_0x138eab(0x757)));return;}const _0x58e645=new _0x50003d(_0x4a0434,_0x490b0);_0x58e645[_0x138eab(0x51a)][_0x138eab(0x3c1)]?.();const _0x2390fb=_0x58e645[_0x138eab(0x51a)]['attach'](_0x17e276=>_0x21d460(_0x17e276,_0x5f50bb[_0x138eab(0x79d)]));if(_0x5f50bb['noRepl'])process['stdout']['write'](_0x138eab(0x3ce));await _0x58e645[_0x138eab(0x654)]();if(_0x5f50bb[_0x138eab(0x4b5)])process[_0x138eab(0x6cd)]['write'](_0x138eab(0x1ba));try{await _0x1317dd(_0x58e645,_0x5f50bb[_0x138eab(0x537)],_0x14eb46(_0x5f50bb));}catch(_0x485576){_0x485576['code']===_0x138eab(0x29d)&&(console[_0x138eab(0x21f)](_0x138eab(0x72c)+_0x5f50bb[_0x138eab(0x537)]+_0x138eab(0x814)),process[_0x138eab(0x56e)](0x1));throw _0x485576;}if(_0x5f50bb[_0x138eab(0x4b5)]){const _0x3aef8d=_0x5f50bb[_0x138eab(0x4fc)]?.['host']!==undefined?[][_0x138eab(0x249)](_0x5f50bb['http'][_0x138eab(0x367)])['join'](',\x20')+'\x20':'';process[_0x138eab(0x6cd)][_0x138eab(0x6d4)](_0x138eab(0x679)+_0x3aef8d+':'+_0x5f50bb[_0x138eab(0x537)]+'\x0a');}if(!_0x5f50bb['noRepl'])_0x58e645[_0x138eab(0x51a)][_0x138eab(0x3c1)]?.(),_0x2390fb?.(),_0x54c7e(_0x58e645[_0x138eab(0x3bb)]?.[_0x138eab(0x323)]?.()??[]),await _0xed3a28(_0x58e645,_0x5f50bb);else{const _0x31900e=_0x4616a9['join'](_0x4a0434,_0x138eab(0x6d3));try{_0x372abd[_0x138eab(0x43e)](_0x31900e,String(process['pid']));}catch{}const _0x22028d=Date[_0x138eab(0x81b)]()-_0x13db96;console['log'](''),console[_0x138eab(0x51a)]('\x20\x20✓\x20OKDB\x20server\x20running'),console[_0x138eab(0x51a)](_0x138eab(0x22f)+_0x5f50bb[_0x138eab(0x537)]),console['log'](_0x138eab(0x6fe)+_0x4a0434),console[_0x138eab(0x51a)](_0x138eab(0x3b9)+_0x58e645['id']);{const _0x5a7cdb=_0x58e645['_systemEnv']?.['db']?.[_0x138eab(0x5ab)]?.(_0x138eab(0x87b))??0x0,_0x1bd4bd=[..._0x58e645[_0x138eab(0x828)][_0x138eab(0x6c7)]()][_0x138eab(0x49c)](_0x507b2c=>!_0x507b2c['startsWith']('~'))[_0x138eab(0x3be)];if(_0x58e645[_0x138eab(0x5dd)]?.[_0x138eab(0x3d6)]?.['licenseType']===0x1){const _0x2782a5=Math['ceil']((_0x58e645['_license']['active']['expiresAt']-Date[_0x138eab(0x81b)]())/0x5265c00);console[_0x138eab(0x51a)](_0x138eab(0x8a1)+_0x58e645[_0x138eab(0x5dd)]['active'][_0x138eab(0x228)]+_0x138eab(0x4d1)+_0x2782a5+'\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)');}else{if(_0x58e645[_0x138eab(0x5dd)]?.[_0x138eab(0x3d6)]){const _0x31a12d=_0x58e645['_license']['active'];console['log'](_0x138eab(0x2d3)+_0x31a12d[_0x138eab(0x228)]+_0x138eab(0x624)+new Date(_0x31a12d['expiresAt'])[_0x138eab(0x362)]()[_0x138eab(0x556)](0x0,0xa)+')');const _0x8d7e06=_0x31a12d['limits']||{};if(_0x8d7e06[_0x138eab(0x4bf)]){const _0x483eb9=Math[_0x138eab(0x283)](_0x5a7cdb/_0x8d7e06[_0x138eab(0x4bf)]*0x64);console['log'](_0x138eab(0x573)+_0x5a7cdb['toLocaleString']()+_0x138eab(0x5e3)+_0x8d7e06[_0x138eab(0x4bf)]['toLocaleString']()+_0x138eab(0x5aa)+_0x483eb9+_0x138eab(0x67b)+_0x1bd4bd+(_0x8d7e06[_0x138eab(0x576)]?'/'+_0x8d7e06['envs']:'')+_0x138eab(0x379)+(_0x1bd4bd===0x1?'':'s'));}}else{if(_0x58e645[_0x138eab(0x5dd)]){const _0x5e3655=_0x58e645[_0x138eab(0x5dd)][_0x138eab(0x838)](),_0x34e1bb=_0x5e3655[_0x138eab(0x3be)]?_0x5e3655[_0x138eab(0x8bd)](_0xcb5cf0=>_0xcb5cf0[_0x138eab(0x733)])[_0x138eab(0x86d)](',\x20'):_0x138eab(0x7f2),_0x4cd059=_0x58e645[_0x138eab(0x5dd)]['effective'],_0xb4810a=_0x4cd059[_0x138eab(0x427)][_0x138eab(0x4bf)]?Math[_0x138eab(0x283)](_0x5a7cdb/_0x4cd059['limits'][_0x138eab(0x4bf)]*0x64):0x0;console[_0x138eab(0x51a)]('\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine'),console[_0x138eab(0x51a)](_0x138eab(0x573)+_0x5a7cdb[_0x138eab(0x864)]()+'\x20/\x20'+_0x4cd059[_0x138eab(0x427)]['maxWrites'][_0x138eab(0x864)]()+_0x138eab(0x5aa)+_0xb4810a+_0x138eab(0x67b)+_0x1bd4bd+'\x20/\x20'+_0x4cd059[_0x138eab(0x427)]['envs']+'\x20envs'),console[_0x138eab(0x51a)](_0x138eab(0x59e)+_0x34e1bb);}}}}console['log'](_0x138eab(0x729)+_0x5f50bb[_0x138eab(0x537)]+_0x138eab(0x79f));!_0x5f50bb[_0x138eab(0x784)]&&console[_0x138eab(0x51a)](_0x138eab(0x7d9)+_0x5f50bb[_0x138eab(0x537)]+'/admin/index.html');console['log'](''),console[_0x138eab(0x51a)](_0x138eab(0x4d7)+_0x22028d+'ms'),_0x54c7e(_0x58e645[_0x138eab(0x3bb)]?.[_0x138eab(0x323)]?.()??[]);let _0x5498b3=![];async function _0x3971d6(_0x33310b){const _0x36f289=_0x138eab;_0x5498b3&&(process['stderr'][_0x36f289(0x6d4)](_0x36f289(0x44c)),process[_0x36f289(0x56e)](0x82));_0x5498b3=!![],process[_0x36f289(0x58d)][_0x36f289(0x6d4)](_0x36f289(0x20d)+(_0x33310b||_0x36f289(0x8cb))+',\x20closing…\x0a');const _0x16c91d=setTimeout(()=>{const _0x35fa23=_0x36f289;process[_0x35fa23(0x58d)][_0x35fa23(0x6d4)](_0x35fa23(0x817)),process[_0x35fa23(0x56e)](0x1);},0x1388);try{_0x372abd[_0x36f289(0x23a)](_0x31900e);}catch{}try{await _0x58e645[_0x36f289(0x55c)]();}catch(_0x11df6c){process[_0x36f289(0x58d)][_0x36f289(0x6d4)](_0x36f289(0x75f)+(_0x11df6c?.['message']??_0x11df6c)+'\x0a');}clearTimeout(_0x16c91d),process[_0x36f289(0x58d)][_0x36f289(0x6d4)](_0x36f289(0x423)),process[_0x36f289(0x56e)](0x0);}process['on'](_0x138eab(0x4f9),()=>_0x3971d6('SIGINT')),process['on'](_0x138eab(0x52e),()=>_0x3971d6(_0x138eab(0x52e))),process['on'](_0x138eab(0x757),()=>_0x3971d6(_0x138eab(0x757)));}}const _0xa414a1=new Set([_0x460c8d(0x24a),_0x460c8d(0x809),_0x460c8d(0x348),_0x460c8d(0x811),'restore',_0x460c8d(0x286),'import',_0x460c8d(0x694),_0x460c8d(0x353),_0x460c8d(0x86d),'license']),_0x50e7eb=process['argv'][0x2];if(_0x50e7eb===_0x460c8d(0x24a))console['log'](require$$3['version']),process[_0x460c8d(0x56e)](0x0);else{if(_0x50e7eb===_0x460c8d(0x73c))process[_0x460c8d(0x56e)](requireOkdbShmGc()[_0x460c8d(0x77e)](process[_0x460c8d(0x553)][_0x460c8d(0x556)](0x3)));else{if(_0x50e7eb&&_0xa414a1[_0x460c8d(0x6f1)](_0x50e7eb)){const _0x4e8b53=process[_0x460c8d(0x553)][_0x460c8d(0x556)](0x3),_0x13945e=_0x3f3124([_0x460c8d(0x2da),_0x460c8d(0x7f8),..._0x4e8b53]),_0x198901=_0x23dc56(_0x13945e),_0x3f11ee=new Set([_0x460c8d(0x3b8),'-d','--key','-k',_0x460c8d(0x5d4),'-c',_0x460c8d(0x7ac),'-p',_0x460c8d(0x4fa),_0x460c8d(0x2cc),'-e',_0x460c8d(0x285),_0x460c8d(0x3a9),_0x460c8d(0x221),_0x460c8d(0x1d8),_0x460c8d(0x726),'--grants',_0x460c8d(0x569),_0x460c8d(0x34c),_0x460c8d(0x508),'-u',_0x460c8d(0x6cb)]);let _0x13b68f=null;for(let _0x1f49fa=0x0;_0x1f49fa<_0x4e8b53['length'];_0x1f49fa++){if(_0x3f11ee['has'](_0x4e8b53[_0x1f49fa])){_0x1f49fa++;continue;}if(!_0x4e8b53[_0x1f49fa][_0x460c8d(0x5e1)]('-')){_0x13b68f=_0x4e8b53[_0x1f49fa];break;}}(async()=>{const _0x2990ae=_0x460c8d;if(_0x50e7eb===_0x2990ae(0x353)){const _0x45750b=process[_0x2990ae(0x553)][0x3],_0x395c87=process[_0x2990ae(0x553)][_0x2990ae(0x556)](0x4),_0x666fe8=_0x3f3124([_0x2990ae(0x2da),_0x2990ae(0x7f8),..._0x395c87]),_0x3e699a=_0x23dc56(_0x666fe8),_0x4c3c9f=new Set([_0x2990ae(0x3b8),'-d',_0x2990ae(0x22e),'-k',_0x2990ae(0x5d4),'-c','--port','-p',_0x2990ae(0x3a9),'--password',_0x2990ae(0x1d8),'--permissions',_0x2990ae(0x762),'--ttl',_0x2990ae(0x4fa),_0x2990ae(0x2cc),'-e',_0x2990ae(0x285)]),_0x5c14c7=[];for(let _0xc67e78=0x0;_0xc67e78<_0x395c87[_0x2990ae(0x3be)];_0xc67e78++){if(_0x4c3c9f[_0x2990ae(0x6f1)](_0x395c87[_0xc67e78])){_0xc67e78++;continue;}if(_0x395c87[_0xc67e78][_0x2990ae(0x5e1)]('-'))continue;_0x5c14c7[_0x2990ae(0x338)](_0x395c87[_0xc67e78]);}switch(_0x45750b){case _0x2990ae(0x474):await _0x165809(_0x3e699a,_0x666fe8);break;case _0x2990ae(0x44f):await _0x3e6066(_0x3e699a);break;case'revoke':await _0x150aaa(_0x5c14c7[0x0],_0x3e699a);break;default:console[_0x2990ae(0x21f)](_0x2990ae(0x219)+_0x45750b+'\x22.\x20Use:\x20create,\x20list,\x20revoke'),process[_0x2990ae(0x56e)](0x1);}return;}if(_0x50e7eb===_0x2990ae(0x6a5)){const _0x109ce7=requireOkdbLicenseCodec(),_0x4be7b9=process[_0x2990ae(0x553)][_0x2990ae(0x556)](0x3),_0x5e3e2f=_0x3f3124(['node','okdb',..._0x4be7b9]),_0x2cc9aa=_0x23dc56(_0x5e3e2f),_0x725a6d=new Set([_0x2990ae(0x3b8),'-d',_0x2990ae(0x22e),'-k',_0x2990ae(0x5d4),'-c',_0x2990ae(0x7ac),'-p','--log-level']),_0x1c8b2b=[];for(let _0x2d4c13=0x0;_0x2d4c13<_0x4be7b9['length'];_0x2d4c13++){if(_0x725a6d[_0x2990ae(0x6f1)](_0x4be7b9[_0x2d4c13])){_0x2d4c13++;continue;}if(_0x4be7b9[_0x2d4c13][_0x2990ae(0x5e1)]('-'))continue;_0x1c8b2b[_0x2990ae(0x338)](_0x4be7b9[_0x2d4c13]);}const _0x44be95=_0x1c8b2b[0x0]??null;if(_0x44be95===_0x2990ae(0x77c))await _0x58cbeb(_0x1c8b2b[0x1],_0x2cc9aa);else{if(!_0x44be95)await _0x72a10c(_0x2cc9aa);else{let _0x35a8d0=_0x109ce7[_0x2990ae(0x539)](_0x44be95);if(_0x35a8d0===_0x2990ae(0x4b3)&&_0x372abd['existsSync'](_0x44be95))_0x35a8d0=_0x2990ae(0x1de);if(_0x35a8d0===_0x2990ae(0x1de))try{const _0x54211c=_0x372abd['readFileSync'](_0x44be95,_0x2990ae(0x6ec))[_0x2990ae(0x543)](),_0x2cb635=_0x109ce7[_0x2990ae(0x539)](_0x54211c);if(_0x2cb635===_0x2990ae(0x631)){await _0x1ffbbd(_0x54211c,_0x2cc9aa);return;}await _0x4bedcd(_0x44be95,_0x2cc9aa);return;}catch(_0x326c4a){console[_0x2990ae(0x21f)](_0x2990ae(0x1dd)+_0x44be95+':\x20'+_0x326c4a[_0x2990ae(0x439)]),process['exit'](0x1);}switch(_0x35a8d0){case _0x2990ae(0x4fb):await _0x4bedcd(_0x44be95,_0x2cc9aa);break;case _0x2990ae(0x631):await _0x1ffbbd(_0x44be95,_0x2cc9aa);break;case'uuid':await _0x22b2c7(_0x44be95,_0x2cc9aa);break;default:console['error'](_0x2990ae(0x7e6)+_0x44be95+'\x22'),console[_0x2990ae(0x21f)](''),console['error']('\x20\x20Expected\x20one\x20of:'),console[_0x2990ae(0x21f)](_0x2990ae(0x5d6)),console[_0x2990ae(0x21f)](_0x2990ae(0x8af)),console[_0x2990ae(0x21f)](_0x2990ae(0x87a)),console[_0x2990ae(0x21f)](_0x2990ae(0x5e6)),console['error'](''),console[_0x2990ae(0x21f)](_0x2990ae(0x4ea)),process[_0x2990ae(0x56e)](0x1);}}}return;}switch(_0x50e7eb){case _0x2990ae(0x809):await _0x738643(_0x198901);break;case _0x2990ae(0x348):await _0x40f676();break;case _0x2990ae(0x694):await _0x55ef0e(_0x198901);break;case'backup':await _0x161c17(_0x13b68f??_0x4616a9[_0x2990ae(0x400)](_0x2990ae(0x209)),_0x198901);break;case _0x2990ae(0x810):if(!_0x13b68f)throw new Error(_0x2990ae(0x68e));await _0x25d104(_0x4616a9['resolve'](_0x13b68f),_0x198901,_0x13945e);break;case _0x2990ae(0x286):await _0x5b91d8(_0x13b68f??_0x4616a9['resolve']('./okdb-export.ndjson'),_0x198901,_0x13945e);break;case _0x2990ae(0x291):await _0x239d03(_0x13b68f??_0x4616a9[_0x2990ae(0x400)](_0x2990ae(0x689)),_0x198901,_0x13945e);break;case _0x2990ae(0x86d):await _0x1fa1d8(_0x13b68f,_0x198901,_0x13945e);break;}})()[_0x460c8d(0x76c)](()=>process['exit'](0x0))[_0x460c8d(0x6ce)](_0x597152=>{const _0x2cd806=_0x460c8d;console['error'](_0x2cd806(0x7e3)+(_0x597152['message']||_0x597152)+'\x0a'),process[_0x2cd806(0x56e)](0x1);});}else _0x45d85f()[_0x460c8d(0x6ce)](_0x583b7d=>{const _0x2284eb=_0x460c8d;console[_0x2284eb(0x21f)](_0x2284eb(0x3a3)),console[_0x2284eb(0x21f)](_0x583b7d[_0x2284eb(0x509)]||_0x583b7d),process[_0x2284eb(0x56e)](0x1);});}}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);function _0x4ab8(){const _0x3c2ce5=['body.','OKDBInvalidIndexKeyError','\x0a[okdb]\x20error:\x20','?\x0a\x20\x20(node\x20identity\x20and\x20licenses\x20are\x20preserved)\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','./okdb-data','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','_report','precision',';\x20HttpOnly','exclusiveStart','tokenizer','percentile','_normalizeOAuthAuthResult','\x20worker\x20slot=','worker_threads','\x20\x20[okdb]\x20closed\x20cleanly\x0a','writeUInt8','(add\x20a\x20license\x20first)','bootstrapBlocked','~files','process','\x20\x20env=','_wantDbHandle','okdb','application/x-www-form-urlencoded','configureAuth','clearTtl','maps','shm-gc:\x20cannot\x20read\x20the\x20memory\x20maps\x20of\x20','singletonClaims','items','OKDBForeignKeyError','allowMethods','transport','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','--no-admin','_matchRoute','drop','Events',']\x20already\x20maps\x20to\x20\x27','doctor','skip\x20','_validateOidcAccessToken','transaction','signCookie','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','_isReader','restore','backup','GONE',')\x20→\x20','\x20already\x20in\x20use','dirname','expiry','[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','_resolveOrCreateEnv','parse','now','\x20\x20[','use','--blobs','[okdb]\x20created\x20./okdb-data','details','View\x20server\x20info,\x20logs,\x20SSE\x20event\x20streams,\x20processor\x20status,\x20backup\x20list.','ready','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','\x20(deleted)','setNoDelay','\x22\x20is\x20not\x20empty\x20—\x20backups\x20never\x20overwrite;\x20choose\x20a\x20new\x20directory','~system','_envs','\x20\x20Path\x20access','\x22\x20on\x20\x22','view','\x20\x20✓\x20marked\x20for\x20a\x20new\x20identity\x20—\x20the\x20first\x20open\x20gives\x20this\x20copy\x20its\x20own\x20node\x20id','METHOD_NOT_ALLOWED','_totalErrors','Blob\x20ref-count\x20is\x20zero\x20for\x20~files\x20record\x20\x22','readUInt8','_publishNow','[on|off|level]','\x20HTTP\x20workers,\x20each\x20serves\x20+\x20processes)','_runGuards','clearThreadStats','content-type','tmp','getPins','1CLfwgl','failures','false','prependListener','_computeStatus','_clusterWorkerAttached','cf-ray','syncPeers','bus:env_release','ms\x20(attempt\x20','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','--drop','question','assign','\x20uses\x20bodyMode:array\x20but\x20does\x20not\x20have\x20exactly\x20one\x20unbound\x20array\x20input\x20field','/api/','toFixed','blobs','\x20died\x20','/\x20quit\x20/\x20Ctrl+C','\x0a\x20\x20okdb\x20—\x20standalone\x20OKDB\x20server\x0a\x0a\x20\x20Usage:\x0a\x20\x20\x20\x20okdb\x20[options]\x0a\x20\x20\x20\x20okdb\x20<command>\x0a\x0a\x20\x20Options:\x0a\x20\x20\x20\x20-p,\x20--port\x20<port>\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x20(default:\x208484)\x0a\x20\x20\x20\x20-d,\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x20(default:\x20./okdb-data)\x0a\x20\x20\x20\x20-k,\x20--key\x20\x20<secret>\x20\x20\x20\x20\x20\x20Encryption\x20key\x20for\x20data\x20at\x20rest\x0a\x20\x20\x20\x20-c,\x20--config\x20<file>\x20\x20\x20\x20\x20\x20Config\x20file\x20path\x20(default:\x20.kdbconfig)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-level\x20<level>\x20\x20Log\x20level:\x20debug\x20|\x20info\x20|\x20warn\x20|\x20error\x20(default:\x20info)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-repl\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20without\x20interactive\x20shell\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-admin\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20\x20\x20\x20\x20--open\x20[ip\x20...]\x20\x20\x20\x20\x20\x20Open\x20mode:\x20bypass\x20auth\x20for\x20listed\x20IPs\x20(default:\x20localhost).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Examples:\x20--open\x20\x20--open\x20192.168.1.0/24\x20\x20--open\x20*\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-requests\x20\x20\x20\x20\x20\x20\x20Print\x20every\x20HTTP\x20request\x20to\x20stdout\x20(for\x20debugging)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--workers\x20<n>\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20capable\x20worker\x20processes\x20sharing\x20the\x20listen\x20socket\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(default:\x20cores\x20−\x201).\x20Each\x20worker\x20serves\x20HTTP\x20+\x20SSE\x20AND\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20processes\x20(claims\x20leases,\x20drains\x20on\x20its\x20own\x20loop);\x20the\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20cluster\x20primary\x20is\x20a\x20thin\x20passive\x20supervisor.\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-cluster\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20single-process\x20(equivalent\x20to\x20--workers\x201)\x0a\x20\x20\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x0a\x20\x20Commands:\x0a\x20\x20\x20\x20version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20doctor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20health\x20checks\x0a\x20\x20\x20\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20.kdbconfig\x20and\x20okdb-data/\x0a\x20\x20\x20\x20token\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20a\x20token\x20in\x20the\x20local\x20DB\x20(direct\x20access,\x20no\x20HTTP)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--name\x20<name>\x20\x20\x20\x20\x20\x20For\x20password\x20login\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<pass>\x20\x20Password\x20(requires\x20--name)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--label\x20<text>\x20\x20\x20\x20\x20Human\x20description\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--permissions\x20<l>\x20\x20Comma-separated\x20baseline\x20permissions\x20(e.g.\x20\x22*\x22\x20or\x20\x22data:read\x22)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--grants\x20<json>\x20\x20\x20\x20Per-env\x20grants\x20as\x20JSON\x20(e.g.\x20\x27{\x22orders\x22:[\x22data:*\x22]}\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--ttl\x20<ms>\x20\x20\x20\x20\x20\x20\x20\x20\x20Optional\x20TTL\x20in\x20milliseconds\x0a\x20\x20\x20\x20token\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20all\x20tokens\x20in\x20the\x20local\x20DB\x0a\x20\x20\x20\x20token\x20revoke\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20Revoke\x20(delete)\x20a\x20token\x20by\x20id\x20(full\x20uuid\x20or\x20unique\x20prefix)\x0a\x20\x20\x20\x20join\x20<address>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Join\x20an\x20existing\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--token\x20<t>\x20\x20\x20\x20\x20\x20\x20\x20Bearer\x20token\x20from\x20the\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--username\x20<u>\x20\x20\x20\x20\x20Or,\x20username\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<p>\x20\x20\x20\x20\x20Password\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--address\x20<addr>\x20\x20\x20This\x20node\x27s\x20reachable\x20sync\x20address\x20(required)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20Local\x20DB\x20path\x0a\x20\x20\x20\x20backup\x20[dir]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Hot\x20backup:\x20LMDB\x20snapshot\x20copy\x20of\x20every\x20env\x20+\x20time-machine\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\x20history\x20+\x20file\x20blobs\x20into\x20a\x20NEW\x20dir\x20(default:\x20./okdb-backup);\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\x20full-text\x20indexes\x20are\x20rebuilt\x20on\x20first\x20open,\x20not\x20copied\x0a\x20\x20\x20\x20restore\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Restore\x20a\x20backup\x20dir\x20into\x20--path\x20(must\x20not\x20exist\x20or\x20be\x20empty)\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--new-identity\x20\x20\x20\x20bring\x20the\x20copy\x20up\x20as\x20a\x20NEW\x20node\x20(fresh\x20id,\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\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20no\x20sync\x20membership)\x20instead\x20of\x20replacing\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\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20the\x20original\x20—\x20see\x20docs/migration.md\x0a\x20\x20\x20\x20export\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20export\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20env\x20to\x20export\x20(default:\x20default)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20comma-separated\x20type\x20filter\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20include\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20export\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20import\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20import\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20target\x20env\x20override\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20import\x20only\x20these\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--drop\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20drop\x20&\x20recreate\x20existing\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20restore\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20import\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20and\x20recreate\x20database\x20(with\x20confirmation);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20node\x20identity\x20and\x20licenses\x20are\x20preserved\x0a\x20\x20\x20\x20license\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20stored\x20licenses,\x20current\x20tier,\x20and\x20usage\x0a\x20\x20\x20\x20license\x20<blob|path>\x20\x20\x20\x20\x20\x20Add\x20a\x20license\x20blob\x20(or\x20read\x20from\x20a\x20.license\x20file)\x0a\x20\x20\x20\x20license\x20<activation>\x20\x20\x20\x20\x20Activate\x20a\x20previously-added\x20license\x20with\x20the\x20vendor\x27s\x20token\x0a\x20\x20\x20\x20license\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20details\x20for\x20one\x20stored\x20license\x20(by\x20uuid\x20or\x20prefix)\x0a\x20\x20\x20\x20license\x20remove\x20<id>\x20\x20\x20\x20\x20\x20Remove\x20a\x20stored\x20license\x0a\x20\x20\x20\x20shm-gc\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20leaked\x20okdb\x20shared-memory\x20segments\x20no\x20process\x20uses\x20(Linux)\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--dry-run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20report\x20only\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--prefix\x20<p>\x20\x20\x20\x20\x20\x20\x20only\x20names\x20starting\x20with\x20<p>\x20(default\x20\x22-tmp-\x22)\x0a\x0a\x20\x20Environment\x20variables:\x0a\x20\x20\x20\x20OKDB_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x0a\x20\x20\x20\x20OKDB_PATH\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x0a\x20\x20\x20\x20OKDB_LOG_LEVEL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log\x20level\x20(debug|info|warn|error)\x0a\x20\x20\x20\x20OKDB_KEY\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Encryption\x20key\x0a\x20\x20\x20\x20OKDB_NO_REPL=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20REPL\x0a\x20\x20\x20\x20OKDB_NO_ADMIN=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20OKDB_HTTP_WORKERS\x20\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20passive\x20HTTP\x20worker\x20processes\x20(default:\x20cores\x20−\x201;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20forced\x20to\x201\x20if\x20the\x20shmbuf\x20native\x20binding\x20is\x20unavailable)\x0a\x0a\x20\x20Config\x20file\x20(.kdbconfig)\x20—\x20JSON,\x20all\x20keys\x20optional:\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22port\x22:\x20\x20\x20\x20\x208484,\x0a\x20\x20\x20\x20\x20\x20\x22path\x22:\x20\x20\x20\x20\x20\x22./okdb-data\x22,\x0a\x20\x20\x20\x20\x20\x20\x22key\x22:\x20\x20\x20\x20\x20\x20\x22...\x22,\x0a\x20\x20\x20\x20\x20\x20\x22logLevel\x22:\x20\x22info\x22,\x0a\x20\x20\x20\x20\x20\x20\x22noAdmin\x22:\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22noRepl\x22:\x20\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22auth\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22open\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20Examples:\x0a\x20\x20\x20\x20okdb\x0a\x20\x20\x20\x20okdb\x20--port\x209000\x20--path\x20./mydb\x0a\x20\x20\x20\x20okdb\x20--no-repl\x20--port\x208080\x0a\x20\x20\x20\x20okdb\x20--open\x0a\x20\x20\x20\x20okdb\x20--open\x20192.168.1.0/24\x0a\x20\x20\x20\x20okdb\x20doctor\x0a\x20\x20\x20\x20okdb\x20backup\x20./my-backup\x0a\x20\x20\x20\x20okdb\x20restore\x20./my-backup\x20--path\x20./okdb-data\x0a','outOfTree','\x20\x20Type\x20','build','commitsPerSec','Get\x20and\x20list\x20records,\x20run\x20byIndex\x20queries.','~processes','_ensure','/type/users/item/alice\x0a\x20\x20\x20\x20','_rotateBucket','sizeAfter','node/','bumpCmd','_collectWriterFacet','\x1b[0m','[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping','candidateBytes','change','_store','reject','/api/env/','exposeHeaders','password','toLocaleString','ephemeral','off','fts:reset','next','ESRCH','read','\x27\x20already\x20registered','ms\x20env=','join','Execute\x20functions\x20over\x20HTTP/MCP/shell.','_buildOwnRow','\x20\x20✓\x20~blobs\x20\x20(','\x20\x20(licensee:\x20','_lockDbOf','INVALID_PRIMARY_KEY','files','_groupByProcess','nodeKey','UNPROCESSABLE_ENTITY','\x20→\x20POST\x20/api/env/','_rootDb','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','__writeCounter','_onStop','min','\x20statusEnv=','(unset)','\x20day(s).','\x20bytes,\x20need\x20>=\x2065)','clock','http://','index:registered','dir','runInNewContext','\x20worker','\x20for\x20system\x20env','response','add','env:opened','processKey','reap','system:clock_change','UNIQUE_CONSTRAINT','<json-body>','heapUsed','_bestMatch',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','other','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','NOT_FOUND','reduce','__OKDB_PUB_FINGERPRINT__','_quarantinedEnvs','\x20ipc\x20error:\x20','closeIdleConnections','_holderDead','flushDebounce','deaths','\x20\x20→\x20\x20','_assertUsable','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','.kdbconfig','FOREIGN_KEY_VIOLATION','quarantined:\x20','_servingEngines','BACKUP_MANIFEST','level:\x20info','servers','\x20\x20(need\x20≥\x2018)','kid','_pending','appendFileSync','fields','routes','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','body','copyFileSync','processingStatusView','sse','processor:error','allSettled','metrics','keys/public.pem','stopped','PUB_FINGERPRINT','commitP99Ms','captureStackTrace','isDead','map','match','linux','_listenAddr','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','audiences','__identity','\x20\x20\x20\x20writes:\x20\x20\x20\x20','depth','indexes','\x20\x20\x20\x20\x20\x20\x20','info','rawBuf','ms\x0a','shutdown','pending','types:','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','Query','\x1b[1m','data:\x20','\x20\x20note:\x20','respawnTimer','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','--changes','~tokens','\x27\x20is\x20already\x20registered','loop-lag\x20','\x20\x20Flags','SIGINT\x20(double-tap)','\x20\x20✓\x20database\x20opened\x0a','blob\x20status\x20db\x20not\x20available','user','License\x20expired\x20or\x20invalidated','isFinite','matched','[okdb]\x20importing\x20','_onProcEvent','quit','credentials','migrate','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','onClaimed','\x20logs\x20on\x20\x20','system','spki','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','parkedNow','_oidcDiscoveryCache','supervisorKey','[okdb-cluster]\x20slot=','race','_db','req','getChanges','\x20\x20\x20\x20','delete','_draining','bind','[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping','--label','processing','[okdb-cluster]\x20','start','isAbsolute','[okdb]\x20error:\x20failed\x20to\x20read\x20','path','ref:violation','_getJwkKey','--force','[okdb]\x20exporting\x20env\x20\x22','noteListenAddr','SHM_SEGMENT_RETIRING','OKDBSchemaValidationError','permission','List,\x20download,\x20and\x20inspect\x20file\x20metadata.','unshift','_baselines','OKDBVersionMismatchError','1415722FwzreB','types/env=','\x20logs\x20off\x0a','_closed','epoch','ms\x20max=','_heldTotal','groups','.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22','env/staging/info','toString','signalWant','\x22\x20—\x20choose\x20a\x20directory\x20outside\x20it','(null)','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','\x20\x20✗','setTtl','note','\x20\x20kept\x20(attached/retiring\x20when\x20retired)\x20','Schema\x20validation\x20failed\x20for\x20','No\x20tokens.','isBuffer','[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20','JWT\x20audience\x20mismatch','INDEX_NOT_REGISTERED','responseStatuses','shmbuf',':\x20connected\x0a\x0a','_publishFailWarned','sub','./okdb-backup','exec','comm','HELP','\x0a[okdb]\x20received\x20','_nestedWarned','License\x20already\x20stored','_activateProcessesReader','\x20(id:\x20','dest','_getOidcDiscovery','\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','basename','hasIndex','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','guards','[okdb]\x20unknown\x20token\x20action:\x20\x22','remoteAddress','description','Functions','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(','error','ttlMs','--password','\x20\x20\x20\x20\x20\x20','listRoutes','\x0d[okdb]\x20blobs:\x20','Schema\x20&\x20Indexes','_enforceOperationAccess','System','licensee','green','primaryOkdb','resetting','rows=','_kind','--key','\x20\x20\x20\x20port:\x20\x20','_startAdmission','node\x20','recent\x20writes\x20(newest\x20first)','activate','Operator\x20surface:\x20server\x20info,\x20logs,\x20event\x20streams,\x20processor\x20status,\x20backups.','raw','\x20to\x20quit.','Server-side\x20user-defined\x20functions\x20registered\x20per\x20environment.','TYPE_ALREADY_REGISTERED','_lastCpuPct','unlinkSync','include','\x20sync','\x1b[31m','writeUInt32BE','payload','[req]\x20','_wrapApiResponse','required','[okdb]\x20error:\x20--password\x20requires\x20--name','\x20allocated','LOGS','clockToChangeDb','freeze','hint','concat','version','indexOf','_bpParkedTotal','destroyed','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','_coordinator','_lastTick','listNodes','\x20—\x20','\x20already\x20exists','POST','[okdb]\x20opening\x20','attachFeed','\x0a\x20\x20Joining\x20cluster\x20at\x20','_hbTimer','licenseType','default:\x20cores−1\x20=\x20','promises','\x20\x20Error:\x20',');\x20','\x20has\x20invalid\x20http.bodyMode:\x20','createWriteStream','processor','shm-gc:\x20unknown\x20argument\x20','id:\x20','Forbidden\x20—\x20no\x20permissions\x20available','processes:\x20','writes=','\x20\x20\x20\x20addedAt:\x20\x20\x20','statSync','access-control-allow-credentials','_buildProcessingFacet','[okdb]\x20warning:\x20could\x20not\x20read\x20node\x20identity/licenses\x20before\x20reset\x20(','Peer','maxAge','Run','live\x20process\x20registry;\x20disposable','idx:','x-okdb-raw-response','Pause/resume\x20processor,\x20trigger\x20backups,\x20restore.','readInt32LE','licensed','ITEM_REMOVE','decodeActivationToken','SIG_INVALID','Unsupported\x20JWT\x20alg:\x20','\x20\x20[okdb]\x20','\x22\x20has\x20been\x20retiring\x20for\x20','setPrompt','blocks','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','cookie','red','test','forceAfterMs','_onTick','integer','round','closeSync','--types','export','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','STATUS','holder','ver',':\x20mapped\x20','-tmp-','Sync','MiB','bus:type_drop','_totalReads','import','backupRoot','origin','\x20\x20(name:\x20','standalone','grants','(workers\x20can\x27t\x20share\x20the\x20cross-process\x20HLC/clock).\x20Forcing\x20single-process\x20(was\x20','connected','\x1b[33m','\x20\x20Envs:\x20\x20\x20\x20','treeView','--log-requests','EADDRINUSE','__okdbCluster','\x20process(es)\x20had\x20unreadable\x20maps','online','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20','children','count','SYSTEM_STOPPED','xdg-open\x20','Shutting\x20down\x20due\x20to\x20license\x20expiry','hasDesired','ALREADY_EXISTS','name','functions','uptime','_wantDbOf','type:registered','[env]','cyan','flushLmdb','\x20\x20╔═══════════════════════════╗','string','ES256','dropping','pathParams','category','rawResponse','formatCookie','regex','halted','columns','RS256','uid','expired','consecutiveFailures','_blobPath','\x20(must\x20be\x20a\x20string\x20or\x20array\x20of\x20strings)','current','_nodeDbFor','--print','_children','header','markClosed','\x20\x20\x20\x20port:\x20\x20\x20\x20','x-forwarded-for','headers.','noCluster','--env','getHeader','FEATURES','readSync','INDEX_RESET','[okdb]\x20invalid\x20config\x20\x22','[okdb-cluster]\x20primary\x20pid=','\x20\x20\x20\x20license:\x20','recheck','isAuthenticated','Forbidden','_ownMeta','clear','rss','node','\x0a\x20\x20\x20\x20\x20\x20','default','_isClusterController','refs','never','\x22\x20resolves\x20outside\x20the\x20backup\x20root\x20\x22','stopHeartbeat','ENVS','\x20is\x20not\x20a\x20complete\x20okdb\x20backup\x20(no\x20','OKDBInvalidValueError','Create\x20and\x20delete\x20views,\x20start,\x20stop,\x20and\x20rebuild\x20them.','\x20is\x20inside\x20the\x20backup\x20','decommissioning','shift','data:write','\x20\x20Writes:\x20\x20','_nodeDead','unlink','envName','decommission','transactionSync','OIDC\x20discovery\x20missing\x20jwks_uri','[okdb]\x20error:\x20','hostname','SWAP','isInteger','Cannot\x20set\x20enforce\x20schema\x20on\x20','type/users\x20--help','array','_readNDJSON','replace','\x20\x20@','updatedAt','Data','\x20\x20(','_migrateVocab','no-cache,\x20no-transform','\x22\x20matches\x20','_isFree','oldestPendingMs','\x20size,\x20','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','_wantDb','finally','Unknown\x20error','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','valid','shm\x20segment\x20','QUIT','shmbuf.node','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','[okdb]\x20exporting\x20blobs…',';\x20Max-Age=0;\x20Expires=Thu,\x2001\x20Jan\x201970\x2000:00:00\x20GMT','search','examples','preferred_username','digest','route','MAX_POOL_HOLDS',')\x20—\x20they\x20will\x20NOT\x20be\x20preserved','processes','\x20file','exportBlobs','assertFeature','[okdb-cluster]\x20worker\x20pid=','[okdb]\x20cluster\x20close\x20error:\x20','removeSupervisedChild','fts:','--expose-gc','object','max','dumpedAt','getSecurityNotices','fill','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','discoveryTtlMs','processor:ready','_lastCpuAt','Machine-to-machine\x20cluster\x20protocol\x20(join\x20handshake,\x20replication\x20channel,\x20traffic).\x20Grant\x20only\x20to\x20peer\x20nodes\x20—\x20not\x20to\x20humans.','hasCanonical','resume','ITEM_PENDING','lstatSync','role','Admin','_selfKey','May\x20write\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20write\x20permission.','putNode','peers=','[okdb]\x20shutdown\x20drain\x20exceeded\x203000ms\x20—\x20hard-exiting\x0a','LICENSED_BUILD','raw-put','[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument','push','allowHeaders','--any-size','-backups','\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','sha256','_clusterOnMessage','values','authRequired','processors/','processors','homedir','env','_threadStats','randomBytes','[okdb]\x20warning:\x20failed\x20to\x20restore\x20identity/licenses\x20after\x20reset:\x20','init','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','9279WCbPIh','handler','--token','\x20parkedNow=','OPEN','ENOENT','Feature\x20not\x20licensed:\x20','PATCH','2.6.3','token','[okdb]\x20imported\x20\x20types=','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','\x0a\x20\x20','\x20+\x20','jwksUri','startHeartbeat','makeOkdb','ceil','readdirSync','_rawDb','processor:progress','removeSync','\x22\x20in\x20env\x20\x22','SYNC_COMMITS','toISOString','_supervisorKey','seq','gate','fts:drop','host','Engines','_active','INDEX_HAS_CONSUMERS','_heartbeatTimer','GATEWAY_TIMEOUT','retiring','Writable','/dev/shm','\x20named\x20by\x20okdb\x20≤\x202.4.0)','\x20worker(s)\x20remaining','derivePin','clusterWorkers','DELETE\x20type/users/item/x','SYSTEM_PROC','transport:\x20','\x0a\x20\x20No\x20routes\x20matching\x20\x22','dropFts','\x20env','repeat','procmode/','reverse','fn-runner','prompt','--eval','CHANGEFEED_QUANTUM','participate','disable','_validateOperationRequest','Register,\x20update,\x20and\x20delete\x20function\x20definitions.','bus:poke',';\x20SameSite=','_adminRelay','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','\x20querySchema\x20references\x20missing\x20input\x20field:\x20','authMode','dim','dynamic','workers','\x20\x20records=','randomUUID','realpathSync','index','authorizationUrl','recordWrite','permissions','gray','\x0a\x20\x20Invalid\x20JSON:\x20','[okdb]\x20invalid\x20','\x20\x20\x20\x20\x20\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','createHmac','_markSeen','_seen','Blob\x20on\x20disk\x20has\x20no\x20~files\x20record\x20in\x20any\x20env\x20(hash:\x20','Bearer\x20$1…','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','parts','heapTotal','available','{}[]:,\x27\x22','\x0a[okdb]\x20fatal\x20error:','timeMachine','_admissionTimer','_dedupeMax','floor','json','--name','\x20SECURITY\x20NOTICE','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','mcp','mcp-session-id','typesDb','[okdb]\x20http\x20workers:\x20','\x20lived\x20outside\x20the\x20store\x20at\x20','stop','--new-identity','\x20supervised)','boolean','\x20times\x20in\x20','_pendingLocal','exportToFile','--path','\x20\x20\x20\x20id:\x20\x20\x20\x20','put','auth','waiting','\x20\x20changes=','length','signature','onRetiring','detachConsole','pushEphemeral',').\x20If\x20none\x20of\x20them\x20runs\x20okdb,\x20pass\x20--force;\x20','pipe','okdb-writer[','\x20drainAge=','isWorker','isFeatureEnabled','_bucketIdx','stream','\x20\x20\x20\x20features:\x20\x20','OKDBInvalidPrimaryKeyError','ENV','[okdb]\x20starting…\x0a','getProcess','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','okdb_session_','isWanted','shmbufNative','_outstanding','logRequests','active','createInterface','send','Invalid\x20primary\x20key\x20type:\x20','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','BAD_GATEWAY','operation','_blobsDir','Type\x20\x27','ms\x20p99=','OKDBIndexAlreadyRegisteredError','undefined','worker','changed','force','resolveBackupDest','hdr','internalOnly','2576424prQzaM','_timer','platform','importJSON','instanceId','_copyDir','\x20\x20\x20\x20status:\x20\x20\x20\x20active','Work','\x20\x20Some\x20checks\x20failed.\x0a','2413616DboTtP','cpus','_durs','Invalid\x20activation\x20token:\x20','OKDBIndexHasConsumersError','_putRowSync','\x20months\x20from\x20issuance)','records','HTTP_CLUSTER_REMOVED','\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a','setSchema','internal','Internal\x20error','/type/users\x0a\x20\x20\x20\x20','_okdb','resolve','cursorKey','commit','listenAddr','--env\x20<name>','once','VALIDATION_ERROR','\x20\x20⚠\x20\x20','copy','param','item:remove','threadId','skippedByProtocol','Processors','segments\x20(','\x1b[32m','cf-connecting-ip','INDEX_ALREADY_REGISTERED','running','OKDBForeignKeyDeleteError','view:progress','\x20environment\x20','processorId','\x20license(s)','\x0d[okdb]\x20','mode','_started','\x27:\x20','\x20\x20(unlimited)','[okdb]\x20reset\x20aborted','HEAD','views','config\x20file\x20valid:\x20','pathname','querySchema','[okdb]\x20closed\x20cleanly\x0a','end','2270OwjBwx','\x20\x20#','limits','none','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','logs','../okdb','Blob\x20storage:\x20large\x20file\x20uploads\x20attached\x20to\x20records\x20or\x20stored\x20standalone.','(primary\x20=\x20processor)','<path>','start\x20','\x20pid=','(none)','\x20uses\x20raw\x20bodyMode\x20without\x20addRaw/raw\x20route\x20metadata','\x20\x20!\x20','blindPids','\x20\x20\x20\x20limits:\x20\x20\x20\x20','register','_licenseHash','message','endsWith','_onPending','prefix','requests','writeFileSync','Environments','primary',',\x20stopping\x20workers…\x0a','is\x20not\x20allowed','Materialized\x20views:\x20query\x20definitions\x20that\x20are\x20continuously\x20maintained\x20and\x20queryable.','entries','lmdb','_openEnvLazy','Usage:\x20okdb\x20shm-gc\x20[--dry-run]\x20[--prefix\x20<p>]\x20[--any-size]\x20[--force]\x20[--verbose]\x0a\x0aDelete\x20okdb\x20shared-memory\x20segments\x20in\x20/dev/shm\x20that\x20no\x20live\x20process\x20maps\x20or\x20holds\x20open\x0a(older\x20okdb\x20versions\x20never\x20unlinked\x20them).\x20Recognises\x20both\x20the\x20current\x20hashed\x20names\x0a(<path>-<hash>)\x20and\x20the\x20bare-path\x20names\x20of\x20okdb\x20<=\x202.4.0.\x20Linux\x20only.\x0a\x0a\x20\x20--dry-run,\x20-n\x20\x20\x20report\x20what\x20would\x20be\x20deleted,\x20delete\x20nothing\x0a\x20\x20--prefix\x20<p>\x20\x20\x20\x20only\x20names\x20starting\x20with\x20<p>\x20(default\x20\x22-tmp-\x22:\x20stores\x20under\x20/tmp;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22\x22\x20=\x20every\x20okdb-shaped\x20name)\x0a\x20\x20--any-size\x20\x20\x20\x20\x20\x20don\x27t\x20require\x20an\x20okdb\x20segment\x20size\x0a\x20\x20--force\x20\x20\x20\x20\x20\x20\x20\x20\x20delete\x20even\x20if\x20some\x20same-user\x20process\x27s\x20maps\x20could\x20not\x20be\x20read\x0a\x20\x20--verbose,\x20-v\x20\x20\x20print\x20every\x20kept\x20segment\x20and\x20why','address','\x20writer{depth=','Invalid\x20license\x20blob:\x20','Invalid\x20index\x20key\x20type\x20for\x20\x27','\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','data','sourcePath','list','att','sandbox','uri','process\x20','ROUTES','_desiredOverlay','system:drain','unique','hashed','_handlePoke','hex','cause','params.env','Run\x20searches\x20against\x20registered\x20FTS\x20and\x20vector\x20indexes.','admin','Create,\x20delete,\x20and\x20compact\x20environments.','_activateProcesses','sync','clusterStatusView','ttl:set','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20','JWT\x20expired','closeAllConnections','\x20(must\x20be\x20an\x20integer\x20>=\x201)\x20—\x20using\x201','_quantum','_flushTimer','system:proc','okdb.http.listen(port)\x20in\x20each\x20worker.','stringify','reload','okdb-http-worker-child.js','PUBLIC_KEY_PEM','nodesView','sourceKey','must\x20be\x20','_authOptions','create','_heartbeatInFlight','verify','_shouldWrapResponse','node:perf_hooks',':\x20key\x20[','SCHEMA_COLLECTION_INVALID','Environment\x20lifecycle.\x20Listing\x20and\x20creating\x20envs\x20is\x20system-level.','OPTIONS','exports','__fts:','darwin','type/users/item/alice\x20--env\x20staging','\x20MB)','[okdb]\x20restoring\x20','\x20\x20All\x20checks\x20passed.\x0a','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','404258hYDFqB','_held','peer','params','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','issuer','Token\x20must\x20be\x20a\x20JWT','issueToken','bindings','\x20(slot=','createLoginState','ensureType','okdb-diag.','status','_inflight','VERSION_MISMATCH','_cursors','_participate','_instanceId','null','decommissioned','_highWater','meta','filter','/([^/]+)','\x20(durable\x20desired-state)','line','token_endpoint','dryRun','TYPE_NOT_REGISTERED','License\x20signature\x20invalid:\x20','No\x20license\x20found\x20matching\x20this\x20activation\x20token','\x22\x20→\x20','x-requested-with','API\x20tokens,\x20users,\x20and\x20credentials.','size','_blobStatusDb','properties','quantum','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','ppid','time','some','setHeader','shm-gc:\x20/proc\x20is\x20not\x20readable\x20—\x20cannot\x20tell\x20which\x20segments\x20are\x20in\x20use','Lax','unknown','paused','noRepl','\x20\x20(no\x20env\x20draining)','INDEX_READY','HTTP\x20','_singletonLock','failed\x20to\x20open','TiB','listen','uuid','\x0a\x20\x20License\x20details:','maxWrites','candidates','isEnabled','\x20(deleting\x20requires\x20--force\x20if\x20none\x20of\x20them\x20is\x20okdb)','origins','HTTP\x20server\x20already\x20running','setOwnMeta','geo','\x20worker(s)\x20still\x20serving','cluster:\x20ready\x20(','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','isTTY','\x20(okdb\x20','pause','_onItem','_isOpen','isBusy','release','\x20(expires\x20in\x20','\x20type','Bearer\x20','Unique\x20constraint\x20violated\x20on\x20','REMOVE','\x20while\x20this\x20process\x20runs\x20','[okdb]\x20started\x20in\x20','_removeRowAsync','jwks_uri','GET','newIdentity','set','\x20entries\x20in\x20','importBlobs','Activation\x20invalid:\x20','_listTypes','from','readlinkSync','INVALID_VALUE','token_use','existsSync','\x20documents\x20fail\x20validation','createEnvironment','headers','statusCode','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','acquiredAt','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','unlinked','toUTCString','\x20\x20✓\x20Removed\x20license\x20','relative','must\x20not\x20be\x20null','/types\x0a\x20\x20\x20\x20','OKDBSchemaCollectionError','_rowKey','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','tags','scrypt','_lockDb','SIGINT','--log-level','blob','http','Queue','mean','index:reset','function','_windowCbs','LABEL','dead','FOREIGN_KEY_DELETE_RESTRICTED','\x20phase=','\x20oldestPendingMs=','FORBIDDEN','--username','stack','BACKUP_PATH_OUTSIDE_ROOT','verifySignature','INDEX_REGISTERED','Create,\x20update,\x20and\x20delete\x20records\x20(including\x20bulk\x20import).','compaction','shell','--workers','summary','lost','database\x20path\x20writable:\x20','publishChildRow','fanout','\x20\x20✓\x20OKDB\x20cluster\x20running','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','[okdb]\x20preserved:\x20','sizeBefore','log','onThreadExit',')\x20to\x20your\x20license\x20vendor.','listening','\x20(passive),\x20','sort','ref:violation_resolved','methods','registry\x20publish\x20failing:\x20','email','_maybePublish','defaults','nbf','startedAt','[okdb]\x20blobs:\x20imported=','_sampleOwnStats','_desired','\x20\x20║','.okdb-write-test','_lock','SIGTERM','licenses','setFlagsFromString','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','der','fast','schema','reason','Execute\x20full-text\x20and\x20vector\x20searches.','port','stdin','detectInputType','exportJSON','dataBytes','Read','audience','title','OKDB_HTTP_WORKERS','is\x20invalid','--no-repl','url','trim','drain','\x20\x20\x20\x20status:\x20\x20\x20\x20','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','identity','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','createServer','\x0a\x20\x20\x20\x20','wrong_node','[okdb]\x20primary\x20okdb\x20close\x20error:\x20','isActive','Files','socket','ACTIVATION_EXPIRED','\x20origin=','\x20files)','argv','~licenses','inspect','slice','selfAddress','okdb_session','--dry-run','decoded','_loginStates','close','_nodeDb','reidentify','-----BEGIN\x20CERTIFICATE-----\x0a','Cannot\x20delete\x20','\x20\x20·\x20','childTransaction','http-server','access','INDEX_PROGRESS','_getType','workersConfigured','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','--ttl','_key','parseBearer','0123456789ABCDEFGHJKMNPQRSTVWXYZ','number','exit','_lastPublishAt',';\x20Path=','envsOpen','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','\x20\x20\x20\x20usage:\x20\x20\x20','true','candidatesLegacyNamed','envs','_totalReadMs','(code=','event:\x20','processingSig','_processStartedAt','https:','\x1b[35m','threads','prototype','(?:','outputSchema','crypto','\x22:\x20','DELETE','\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/','Validation\x20failed:\x20','tags:\x20','matcher','toUpperCase','(empty)','CONFLICT','.log','stderr','blindCommands','--help','isArray','Indexes','error:\x20','\x20to\x20browse\x20the\x20API,\x20','http.workers','guard','Validation\x20failed','heldBy','OKDBUniqueConstraintError','listLicenses','REQUEST_TIMEOUT','fork','cpSync','maxExtra','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','attach','openDB','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','disconnect','__esModule','JWT\x20issuer\x20mismatch','features','access-control-max-age','\x20of\x20them\x20run\x20as\x20this\x20user\x20and\x20could\x20map\x20these\x20segments:\x20','--prefix','okdbVersion','\x20writes\x20(','get','_caps','level','magenta','protected:write','_drainOne','exportToStream','selfKey','standard','okdb-backup.json','createdAt','http.listen({workers/makeOkdb/primaryOkdb})\x20is\x20no\x20longer\x20supported\x20in\x20the\x20','_jwksCache','(?:/(.*))?$','data:read','clearLine','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','pid','files/','ms\x20(pid\x20','List\x20types,\x20get\x20type\x20schema,\x20list\x20registered\x20indexes.','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','application/json','\x0a\x20\x20✓\x20License\x20added','types\x20--env\x20staging','beforeWrite','safety','fstatSync','kdb_admin_oauth_state','\x20missing\x20path\x20field\x20in\x20inputSchema:\x20','cors','_done','_totalWrites','writes','payload-or-self',';\x20Expires=','addedAt','removeLicense','--prefix=','lifecycle','\x20<path>\x20[json-body]','--config','flatMap','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','_isStale','/admin/index.html','\x20@\x20','Build\x20expects\x20public\x20key\x20fingerprint\x20','missing_blob','assertLimit','_license','access-control-request-headers','roles','unref','startsWith','_typeSchema','\x20/\x20','OKDBNotFoundError','data.mdb','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','slot','license:activated','RSA-SHA256','node:events','yellow','removeNode','writeMs','embedded','abs','dbPath','LICENSE_FEATURE_DISABLED','stats','targetKey','_dispatch','(no\x20types)','sig','_cmd','FTS_DROP','code','remaining-fields','_versionSkewWarned','store','charCodeAt','_collectSingletonClaims','\x20tokens:','Foreign\x20key\x20violation:\x20','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','\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','1ofN:','exportEnvsToStream','_handlePending','cluster:\x20unavailable\x20(shmbuf\x20native\x20missing)\x20—\x20running\x20single-process','ITEM_UPDATE','Forbidden\x20—\x20requires\x20','destroy','definition','OKDBAlreadyExistsError','/proc','\x20\x20Usage:\x20','\x20MB\x20→\x20','known\x20field','Write','Types','debug','\x20licenses','hash','extend','LICENSE_ALREADY_STORED','instances','\x20\x20deleted\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','decodeLicenseBlob','created','_admissionStarted','x5c','win32','BAD_REQUEST','uncaughtException','set-cookie','HTTP_','server','inputSchema','\x20(expires\x20','_changefeed','offWindow','authenticateToken','\x22\x20(hash:\x20','notOkdbShaped','readUInt32BE','OKDB_HTTP_WORKERS\x20env','ID\x20token\x20is\x20not\x20accepted','1154733lOUjLk','dropExisting','\x20(dry\x20run)','\x0a\x20\x20✓\x20License\x20already\x20stored\x20(no\x20change)','activation','val','_statusEnv','index:progress','_nestedTotal','workersFlag','record','\x20\x20Common\x20causes:','PIN','orphan','reads','expires','memoryUsage','aud','JWT\x20signature\x20verification\x20failed','_onPoke','INVALID_INDEX_KEY','mkdirSync','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','okdb-license-id:','EXIT','_drain','result','[okdb]\x20created\x20.kdbconfig','Unauthorized','bus:drain','\x20records','resetFts','_committed','_scheduleFlush','licenseHash','alg','[okdb]\x20shmbuf\x20native\x20binding\x20unavailable\x20—\x20multi-process\x20clustering\x20is\x20unsafe\x20','\x20\x20not\x20okdb-shaped\x20\x20\x20\x20','~blobs','open','_singletonLocks',';\x20Secure','derived;\x20rebuilt\x20from\x20source\x20docs\x20on\x20first\x20open\x20of\x20the\x20restored\x20store','loop-lag','embeddings','setEncoding','call','keep-alive','zero_refs','_allEnvsWithFiles','Create,\x20update,\x20and\x20delete\x20tokens\x20and\x20users;\x20rotate\x20keys.','label','shared-memory\x20segment\x20\x22','typeSubDbs','options',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','hidden','Index\x20\x22','external','ftsName','segmentNameFor:\x20canonicalPath\x20must\x20be\x20a\x20non-empty\x20string','Release',',\x20label:\x20','okdb-writer:\x20env\x20closing\x20—\x20retry','registerFts','\x1b[36m','find','{}[]:,\x0a\x0d\x09\x20','building','284388RNUnPq','_putRowAsync','\x22\x20is\x20used\x20by:\x20','timingSafeEqual','\x20freed','UNAUTHORIZED','\x20references\x20','\x20\x20✓\x20http\x20listening\x20on\x20','\x1b[90m','%),\x20','state','\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20(','killable','update','SCHEMA_VALIDATION_FAILED','addSupervisedChild','onWindow','constructor','loadEnvFile','Version\x20mismatch\x20for\x20','rowKey','Route\x20','type/users/query\x20{\x22active\x22:true}','./okdb-export.ndjson',';\x20Max-Age=','sab','addRaw','authorization','usage:\x20okdb\x20restore\x20<backup-dir>\x20--path\x20<target-data-dir>','base64url','ftsIndexes','_handleInProcess','_dedupeKey','_safeEnvDirName','reset','_buildChildRow','closing','creating','time-machine','okdb-backup-','View\x20peer\x20status\x20and\x20replication\x20stats.','unhandledRejection','\x20\x20\x20\x20\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/','_sync','candidateAllocated','consumeLoginState','kill','_systemEnv','cli','Worker-side:\x20claim,\x20heartbeat,\x20complete,\x20fail,\x20progress.','__vocab/version','license','is\x20required','_log','Protected\x20(gate)','\x0a===\x20OKDB_DIAG\x20','white','index:ready','setupPrimary','expiresAt','PUT','afterWrite','compareExchange','heartbeatMs','10VwWiQQ','Unknown\x20JWKS\x20kid:\x20','last-event-id','setLogger','importFromFile','\x20\x20\x20\x20licensee:\x20\x20','~processes:cmd','hasOwnProperty','value','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','JWT\x20is\x20missing\x20kid','signingInput','[body]','\x20in\x20','_acquiredAt','indexToDb','additionalProperties','username','isHeld','Examples','warn','keys','\x20HTTP\x20workers\x20','claimGated','fts','--address','Content-Type','stdout','catch',':\x20expected\x20','_isWriter','includes','field','okdb.pid','write','ingest','_sockets','emit','putSync','[okdb]\x20cluster\x20supervisor\x20pid=','_buckets','_writer','maxBodyBytes','_resolveEnv','registerType',',\x20got\x20','byteLength','\x20has\x20illegal\x20binding\x20target\x20for\x20','content-length','Enqueue,\x20cancel,\x20retry,\x20remove\x20jobs;\x20manage\x20buckets;\x20reconcile\x20and\x20rebuild\x20stats.','toLowerCase','\x20\x20\x20\x20\x20\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','enable','config','scope','fromEntries','schema:set','ITEM_CREATE','utf8','txn:end','padEnd','config\x20http.workers','activateLicense','has','ttl:expired','execArgv','MALFORMED_TOKEN','Records\x20inside\x20your\x20types\x20—\x20the\x20actual\x20rows\x20you\x20store.','[okdb]\x20invalid\x20log\x20level:\x20\x22','operations','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','_cookieName','addSSE','importFromStream','received\x20','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','\x20\x20\x20\x20path:\x20\x20','.kdb_history','writeUInt16BE','effective','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','\x20\x20\x20\x20admin:\x20\x20\x20http://localhost:','NOT_IMPLEMENTED','cpuUsage','queue-worker','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','hasType','\x20opening\x20','index:drop','base64','context','type','migrations','use\x20<env>','error\x20','wait','backup\x20destination\x20\x22','legacy','LICENSE_INVALID','\x20\x20\x20\x20api:\x20\x20\x20\x20\x20http://localhost:',':\x20prefix\x20','resetReadTxn','alloc','queue','engines','\x20process','jwksTtlMs','runtimeProcessesView','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','enabled','pop','tokenTtl','foreignOwner','processor:resumed','terminal','fts:registered','--permissions','Auth','\x27\x20doesn\x27t\x20exist','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','_lastCpuWindowMs','\x20which\x20does\x20not\x20exist','[okdb]\x20port\x20','LICENSE_ACTIVATION_INVALID','isPrimary','\x20<\x20','present','JWT\x20not\x20yet\x20valid','types','pin','_userPhase','split','maxMs','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','Background\x20job\x20queue:\x20enqueue\x20work,\x20observe\x20state,\x20and\x20process\x20jobs.','allowedAlgs','_jwksNegativeCache','invalid','shm-gc','errors','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','PERMISSIONS','writerStatus','Full-text\x20search','\x20(must\x20be\x20true\x20or\x20false)','\x20forked\x20','\x20\x20skipped:\x20','authorization_endpoint','EXPIRES','geoConfig','\x20\x20✓\x20','createPublicKey','method','env/:env','\x20===','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','query','liveThreadStats','isDirectory','clearCookie','single','\x20(other\x20users;\x20cannot\x20map\x200600\x20segments)','getRange','access:\x20','bold','SIGBREAK','msg','cluster','searchParams','all','Index\x20\x27','jwk','\x20fetching\x20','[okdb]\x20close\x20error:\x20','--version','\x20deleted','--grants','unreadablePids','--test','_released','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','readMs','tierList','caps','database\x20path\x20not\x20writable:\x20','ttl:clear','then','\x20does\x20not\x20exist','unclaimed','__okdbSlot','target\x20','\x20\x20skipped=','registerIndex','forEach','busy','_startedAt','procmodeack/','\x20process(es)\x20that\x20could\x20map\x20these\x20','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','files\x20feature\x20not\x20available','Upload,\x20update\x20metadata,\x20and\x20delete\x20files.','typesPerEnv','remove','cookieName','main','_totalWriteMs','tokenSecret','handle','load','_totalRequests','noAdmin','perf_hooks','_refreshDesiredSnapshot',',\x20which\x20still\x20exists\x20—\x20the\x20restored\x20','\x1b[34m','event','List\x20jobs,\x20view\x20stats,\x20list\x20buckets.','getClock','\x20\x20\x20\x20permissions:\x20','OKDBError','_userRouteCount','bodyMode','otherwise\x20rerun\x20as\x20root.','events','\x20\x20(+\x20time-machine)','\x20more)','\x27,\x20cannot\x20map\x20to\x20\x27','Access-Control-Request-Headers','every','\x22\x20to\x20enable\x20it.','_flushDebounce','deleted','_lastCpuUsage',':\x20ping\x0a\x0a','INTERNAL_ERROR','logLevel','_enqueuedAt','/api','\x20\x20\x20\x20expires:\x20\x20\x20','params.','changes','List\x20views,\x20query\x20view\x20output,\x20inspect\x20metadata\x20and\x20definition.','env/','[res]\x20','exp','\x20\x20errors\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Blob\x20file\x20missing\x20for\x20~files\x20record\x20\x22','_runMiddlewares','verifyActivation','inUse','--port','ENV_CLOSING_RETRY','authenticateRequest','_role','Origin','OKDBTypeAlreadyRegisteredError','committed','[okdb]\x20invalid\x20config\x20\x22http.host\x22:\x20','--inspect','[okdb]\x20export\x20complete','cpuWindowMs','enforce','\x20\x20✓\x20Revoked\x20token\x20','getDesired','needsActivation','shm-gc:\x20Linux\x20only\x20(POSIX\x20shared\x20memory\x20under\x20/dev/shm)','api','/dev/shm/','kind','userAdded','listDesired','config\x20file\x20invalid:\x20','https','middlewares','namespace','Payload\x20too\x20large','\x20has\x20ambiguous\x20binding\x20for\x20query\x20field:\x20','history','\x1b[37m','help','\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','deletedAllocated','PAYLOAD_TOO_LARGE','TYPES','padStart','allocUnsafe','[okdb]\x20restore\x20complete\x20—\x20full-text\x20indexes\x20rebuild\x20on\x20first\x20open','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','createHash','processor:paused','key','\x20\x20scanned\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','readFileSync','_bpWaiters','[okdb]\x20backup\x20complete','\x20\x20\x20\x20admin:\x20http://localhost:','onLicenseExpired','inst:','claims','_ensureDesired','\x20│\x20','shmbuf/package.json','formatListenAddr'];_0x4ab8=function(){return _0x3c2ce5;};return _0x4ab8();}module[_0x32d6b8(0x47d)]=okdb;
2
+ 'use strict';const _0x1a2e0d=_0x4c4a;(function(_0x507a91,_0x189e2d){const _0x465a37=_0x4c4a,_0x38925d=_0x507a91();while(!![]){try{const _0x3db35b=parseInt(_0x465a37(0x5e1))/0x1+-parseInt(_0x465a37(0x4c5))/0x2+parseInt(_0x465a37(0x5ae))/0x3*(-parseInt(_0x465a37(0x5a4))/0x4)+parseInt(_0x465a37(0x55d))/0x5+parseInt(_0x465a37(0x889))/0x6+parseInt(_0x465a37(0x269))/0x7+-parseInt(_0x465a37(0x897))/0x8;if(_0x3db35b===_0x189e2d)break;else _0x38925d['push'](_0x38925d['shift']());}catch(_0x53164f){_0x38925d['push'](_0x38925d['shift']());}}}(_0x3812,0x6b88c));var require$$1=require(_0x1a2e0d(0x5be)),require$$0$1=require('fs'),require$$0=require('os'),require$$4$1=require(_0x1a2e0d(0x781)),require$$5$1=require(_0x1a2e0d(0x7b8)),require$$0$3=require(_0x1a2e0d(0x3be)),require$$2=require(_0x1a2e0d(0x753)),require$$5=require(_0x1a2e0d(0x481)),require$$2$1=require('crypto'),require$$0$2=require('node:crypto'),require$$4=require(_0x1a2e0d(0x247)),require$$1$1=require(_0x1a2e0d(0x60a)),require$$0$4=require('node:perf_hooks'),require$$0$5=require(_0x1a2e0d(0x306)),require$$0$6=require('node:events'),require$$0$7=require(_0x1a2e0d(0x5fb)),require$$1$2=require(_0x1a2e0d(0x5a1)),require$$3$1=require('url'),require$$2$2=require(_0x1a2e0d(0x28d)),require$$3$2=require('shmbuf'),commonjsGlobal=typeof globalThis!==_0x1a2e0d(0x625)?globalThis:typeof window!==_0x1a2e0d(0x625)?window:typeof global!==_0x1a2e0d(0x625)?global:typeof self!==_0x1a2e0d(0x625)?self:{};function getDefaultExportFromCjs(_0x7afe39){const _0x11eabc=_0x1a2e0d;return _0x7afe39&&_0x7afe39[_0x11eabc(0x1d5)]&&Object[_0x11eabc(0x404)][_0x11eabc(0x3e0)][_0x11eabc(0x8c3)](_0x7afe39,_0x11eabc(0x7eb))?_0x7afe39[_0x11eabc(0x7eb)]:_0x7afe39;}function _0x3812(){const _0x132257=['listen','--prefix=','~system','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','invalid','--no-repl','claims','items','exports','shm-gc:\x20/proc\x20is\x20not\x20readable\x20—\x20cannot\x20tell\x20which\x20segments\x20are\x20in\x20use','payload-or-self','import','ttl','signCookie','\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','[okdb]\x20warning:\x20could\x20not\x20read\x20node\x20identity/licenses\x20before\x20reset\x20(','backup','padStart','\x20worker\x20slot=','listLicenses','../okdb','GiB','\x20missing\x20path\x20field\x20in\x20inputSchema:\x20','\x20named\x20by\x20okdb\x20≤\x202.4.0)','read','queue-worker','bind','access-control-request-headers','Operator\x20surface:\x20server\x20info,\x20logs,\x20event\x20streams,\x20processor\x20status,\x20backups.','_refreshDesiredSnapshot','_sockets','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','true','heldBy','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','registry-publish','\x20(id:\x20','Schema\x20&\x20Indexes','function','--token','\x0a\x20\x20✓\x20License\x20activated','\x20\x20scanned\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','none','sizeBefore','--version','size','\x20(expires\x20in\x20','parse','readlinkSync','geoConfig','\x20\x20Flags','\x20\x20\x20\x20port:\x20\x20','License\x20limit\x20exceeded:\x20','--label','OKDBIndexNotRegisteredError','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','default:\x20cores−1\x20=\x20','licensed','jwksUri','_matchRoute','SIGINT','Views','deleted','exportToFile','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','changed','--env','consecutiveFailures','slot','ftruncateSync',':\x20mapped\x20','default','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','cookie','\x20\x20Writes:\x20\x20','\x20HTTP\x20server(s)\x20on\x20port\x20','system','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','\x20writes\x20(','envs','\x20\x20\x20\x20path:\x20\x20\x20\x20','finish','\x20\x20\x20\x20\x20http://localhost:','\x20(other\x20users;\x20cannot\x20map\x200600\x20segments)','NAME','\x20to\x20browse\x20the\x20API,\x20','Examples','-tmp-','segmentNameFor:\x20canonicalPath\x20must\x20be\x20a\x20non-empty\x20string','extend','concat','\x20\x20\x20\x20\x20\x20\x20','config\x20http.workers','_resolveEnv','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a',',\x20got\x20','off','\x20\x20(unlimited)','_blobsDir','LOGS','\x20\x20(+\x20time-machine)','_lastPublishAt','cli','ms\x20(pid\x20','[okdb-cluster]\x20','POST','\x20\x20\x20\x20status:\x20\x20\x20\x20active','[okdb]\x20warning:\x20failed\x20to\x20restore\x20identity/licenses\x20after\x20reset:\x20','draining','\x20\x20\x20\x20expires:\x20\x20\x20','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','replace','Get\x20and\x20list\x20records,\x20run\x20byIndex\x20queries.','_lastCpuAt','candidateAllocated','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','keys','hard-killed','blob','__vocab/version','getPins','message','flushed','--force','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','\x0a\x20\x20\x20\x20\x20\x20','\x0a\x20\x20','okdb-writer:\x20env\x20closing\x20—\x20retry','fstatSync','assertLimit','transaction','logs','geo','fts:drop','\x20\x20\x20\x20graceful\x20shutdown\x0a','write','rows=','application/json','HTTP\x20server\x20already\x20running','acquiredAt','valid','_desired','--workers','zero_refs','isDirectory','wrong_node','dirname','FOREIGN_KEY_DELETE_RESTRICTED','(workers\x20can\x27t\x20share\x20the\x20cross-process\x20HLC/clock).\x20Forcing\x20single-process\x20(was\x20','force','captureStackTrace','scanned','body.','constructor','headers.','finally','derived;\x20rebuilt\x20from\x20source\x20docs\x20on\x20first\x20open\x20of\x20the\x20restored\x20store','_isOpen','.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22','ENOENT','details','\x20\x20env=','decommission','stats','\x20cf-ip=','openSync','paused','\x1b[1m','FOREIGN_KEY_VIOLATION','mcp-session-id','split','/([^/]+)','\x1b[0m',';\x20Secure','\x20\x20kept\x20(attached/retiring\x20when\x20retired)\x20','consumeLoginState','Lax','BAD_GATEWAY','QUIT','okdb.pid','\x20logs\x20on\x20\x20','readdirSync','loop-lag','resume','start\x20','\x20\x20→\x20\x20','ver','\x20which\x20does\x20not\x20exist','outputSchema','mcp','Invalid\x20primary\x20key\x20type:\x20','_writer','process','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','prependListener','importJSON','setPrompt',').\x20If\x20none\x20of\x20them\x20runs\x20okdb,\x20pass\x20--force;\x20','\x0a\x20\x20Invalid\x20JSON:\x20','EXIT','_putRowAsync','Create,\x20update,\x20and\x20delete\x20records\x20(including\x20bulk\x20import).','\x20\x20Some\x20checks\x20failed.\x0a','\x20\x20\x20\x20','help','[okdb]\x20exporting\x20blobs…','licenseHash','readUInt32BE','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','View\x20peer\x20status\x20and\x20replication\x20stats.','\x20\x20#','\x20\x20+','_done','Environment\x20lifecycle.\x20Listing\x20and\x20creating\x20envs\x20is\x20system-level.','OKDBForeignKeyError','text/event-stream;\x20charset=utf-8','Sync','authMode','origin','entries','[okdb]\x20reset\x20aborted','forEach','readSync','statSync','{}[]:,\x0a\x0d\x09\x20','\x20of\x20them\x20run\x20as\x20this\x20user\x20and\x20could\x20map\x20these\x20segments:\x20','Content-Type','\x0a[okdb]\x20error:\x20','OKDBIndexHasConsumersError','1502166jcHdqt','utf8','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','unique','allowHeaders','_readNDJSON','handle','Forbidden\x20—\x20requires\x20','--permissions','/type/users/item/alice\x0a\x20\x20\x20\x20','ttlMs','candidatesLegacyNamed','unref','0123456789ABCDEFGHJKMNPQRSTVWXYZ','3789040HSYdcB','once','signature','dead','_isWriter','\x0a\x20\x20okdb\x20doctor\x0a','params.env','ROUTES','removeNode','_admissionStarted','\x20(passive),\x20','system:type_drop','unreadablePids','Unique\x20constraint\x20violated\x20on\x20','_jwksNegativeCache','removeSync','_validateOperationRequest','cyan','\x20\x20\x20\x20port:\x20\x20\x20\x20','[okdb]\x20started\x20in\x20','_drainOne','heartbeatMs','_processStartedAt','\x20license(s)','\x20(deleted)','removeSupervisedChild','shm-gc:\x20Linux\x20only\x20(POSIX\x20shared\x20memory\x20under\x20/dev/shm)','seq','operation','matched','_totalErrors','HEAD','HTTP\x20','\x0a\x20\x20✓\x20Token\x20created','abs','build','memoryUsage','SIGTERM',';\x20Expires=','BACKUP_MANIFEST','\x20worker','logLevel','response','resolve','call','fanout','_report','hidden','ftsName','\x20\x20(','ES256','run','ms/','\x20times\x20in\x20','Upload,\x20update\x20metadata,\x20and\x20delete\x20files.','halted','indexOf','[okdb]\x20importing\x20','\x20\x20\x20\x20\x20\x20','fill','lifecycle','getChanges','\x20is\x20not\x20a\x20complete\x20okdb\x20backup\x20(no\x20','Not\x20Found','isWanted','OKDB-PIN-V1:','isBuffer','includes','BAD_HOST','TYPES','CREATED','~processes:desired','\x22\x20(must\x20be\x20debug|info|warn|error)','\x20\x20\x20\x20\x20\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','shmbuf.node','~licenses','category','type/users\x20--help','effective','Validation\x20failed','claimGated','fts:registered','route','missing_blob','processor:ready','writes','~blobs','files\x20feature\x20not\x20available','License\x20signature\x20invalid:\x20','param','_heartbeatInFlight','PUBLIC_KEY_PEM','description','admin','_instanceId','--any-size','trimStart','Materialized\x20views:\x20query\x20definitions\x20that\x20are\x20continuously\x20maintained\x20and\x20queryable.','disconnect','Create,\x20delete,\x20and\x20compact\x20environments.','REMOVE','raw','\x27,\x20cannot\x20map\x20to\x20\x27','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','_publishNow','\x20in\x20','syncPeers','join','\x20SECURITY\x20NOTICE','execArgv','_supervisorKey','lstatSync','OKDBTypeNotRegisteredError','single','deregisterSelf','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','string','_resolveOrCreateEnv','/type/users\x0a\x20\x20\x20\x20','__esModule','_flushDebounce','updateSupervisedChildStats','bumpCmd','makeOkdb','participate',':want','columns','licenseType','\x20\x20✓\x20marked\x20for\x20a\x20new\x20identity\x20—\x20the\x20first\x20open\x20gives\x20this\x20copy\x20its\x20own\x20node\x20id','connection','maxWrites','onRetiring','OKDBInvalidIndexKeyError','\x20\x20✓\x20OKDB\x20server\x20running','\x20lived\x20outside\x20the\x20store\x20at\x20','_seen','MAX_POOL_HOLDS','shm-gc:\x20unknown\x20argument\x20','exportToStream','scope','sha256','_drain','\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','expires','library\x20(okdb\x20node-model\x202.0).\x20For\x20multi-process\x20HTTP\x20serving\x20use\x20the\x20okdb\x20','percentile','port\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\x20\x20\x20\x20--workers\x20<n>\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20capable\x20worker\x20processes\x20sharing\x20the\x20listen\x20socket\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(default:\x20cores\x20−\x201).\x20Each\x20worker\x20serves\x20HTTP\x20+\x20SSE\x20AND\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20processes\x20(claims\x20leases,\x20drains\x20on\x20its\x20own\x20loop);\x20the\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20cluster\x20primary\x20is\x20a\x20thin\x20passive\x20supervisor.\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-cluster\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20single-process\x20(equivalent\x20to\x20--workers\x201)\x0a\x20\x20\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x0a\x20\x20Commands:\x0a\x20\x20\x20\x20version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20doctor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20health\x20checks\x0a\x20\x20\x20\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20.kdbconfig\x20and\x20okdb-data/\x0a\x20\x20\x20\x20token\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20a\x20token\x20in\x20the\x20local\x20DB\x20(direct\x20access,\x20no\x20HTTP)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--name\x20<name>\x20\x20\x20\x20\x20\x20For\x20password\x20login\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<pass>\x20\x20Password\x20(requires\x20--name)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--label\x20<text>\x20\x20\x20\x20\x20Human\x20description\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--permissions\x20<l>\x20\x20Comma-separated\x20baseline\x20permissions\x20(e.g.\x20\x22*\x22\x20or\x20\x22data:read\x22)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--grants\x20<json>\x20\x20\x20\x20Per-env\x20grants\x20as\x20JSON\x20(e.g.\x20\x27{\x22orders\x22:[\x22data:*\x22]}\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--ttl\x20<ms>\x20\x20\x20\x20\x20\x20\x20\x20\x20Optional\x20TTL\x20in\x20milliseconds\x0a\x20\x20\x20\x20token\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20all\x20tokens\x20in\x20the\x20local\x20DB\x0a\x20\x20\x20\x20token\x20revoke\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20Revoke\x20(delete)\x20a\x20token\x20by\x20id\x20(full\x20uuid\x20or\x20unique\x20prefix)\x0a\x20\x20\x20\x20join\x20<address>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Join\x20an\x20existing\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--token\x20<t>\x20\x20\x20\x20\x20\x20\x20\x20Bearer\x20token\x20from\x20the\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--username\x20<u>\x20\x20\x20\x20\x20Or,\x20username\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<p>\x20\x20\x20\x20\x20Password\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--address\x20<addr>\x20\x20\x20This\x20node\x27s\x20reachable\x20sync\x20address\x20(required)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20Local\x20DB\x20path\x0a\x20\x20\x20\x20backup\x20[dir]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Hot\x20backup:\x20LMDB\x20snapshot\x20copy\x20of\x20every\x20env\x20+\x20time-machine\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\x20history\x20+\x20file\x20blobs\x20into\x20a\x20NEW\x20dir\x20(default:\x20./okdb-backup);\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\x20full-text\x20indexes\x20are\x20rebuilt\x20on\x20first\x20open,\x20not\x20copied\x0a\x20\x20\x20\x20restore\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Restore\x20a\x20backup\x20dir\x20into\x20--path\x20(must\x20not\x20exist\x20or\x20be\x20empty)\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--new-identity\x20\x20\x20\x20bring\x20the\x20copy\x20up\x20as\x20a\x20NEW\x20node\x20(fresh\x20id,\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\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20no\x20sync\x20membership)\x20instead\x20of\x20replacing\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\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20the\x20original\x20—\x20see\x20docs/migration.md\x0a\x20\x20\x20\x20export\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20export\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20env\x20to\x20export\x20(default:\x20default)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20comma-separated\x20type\x20filter\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20include\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20export\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20import\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20import\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20target\x20env\x20override\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20import\x20only\x20these\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--drop\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20drop\x20&\x20recreate\x20existing\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20restore\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20import\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20and\x20recreate\x20database\x20(with\x20confirmation);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20node\x20identity\x20and\x20licenses\x20are\x20preserved\x0a\x20\x20\x20\x20license\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20stored\x20licenses,\x20current\x20tier,\x20and\x20usage\x0a\x20\x20\x20\x20license\x20<blob|path>\x20\x20\x20\x20\x20\x20Add\x20a\x20license\x20blob\x20(or\x20read\x20from\x20a\x20.license\x20file)\x0a\x20\x20\x20\x20license\x20<activation>\x20\x20\x20\x20\x20Activate\x20a\x20previously-added\x20license\x20with\x20the\x20vendor\x27s\x20token\x0a\x20\x20\x20\x20license\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20details\x20for\x20one\x20stored\x20license\x20(by\x20uuid\x20or\x20prefix)\x0a\x20\x20\x20\x20license\x20remove\x20<id>\x20\x20\x20\x20\x20\x20Remove\x20a\x20stored\x20license\x0a\x20\x20\x20\x20shm-gc\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20leaked\x20okdb\x20shared-memory\x20segments\x20no\x20process\x20uses\x20(Linux)\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--dry-run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20report\x20only\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--prefix\x20<p>\x20\x20\x20\x20\x20\x20\x20only\x20names\x20starting\x20with\x20<p>\x20(default\x20\x22-tmp-\x22)\x0a\x0a\x20\x20Environment\x20variables:\x0a\x20\x20\x20\x20OKDB_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x0a\x20\x20\x20\x20OKDB_PATH\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x0a\x20\x20\x20\x20OKDB_LOG_LEVEL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log\x20level\x20(debug|info|warn|error)\x0a\x20\x20\x20\x20OKDB_KEY\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Encryption\x20key\x0a\x20\x20\x20\x20OKDB_NO_REPL=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20REPL\x0a\x20\x20\x20\x20OKDB_NO_ADMIN=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20OKDB_HTTP_WORKERS\x20\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20passive\x20HTTP\x20worker\x20processes\x20(default:\x20cores\x20−\x201;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20forced\x20to\x201\x20if\x20the\x20shmbuf\x20native\x20binding\x20is\x20unavailable)\x0a\x0a\x20\x20Config\x20file\x20(.kdbconfig)\x20—\x20JSON,\x20all\x20keys\x20optional:\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22port\x22:\x20\x20\x20\x20\x208484,\x0a\x20\x20\x20\x20\x20\x20\x22path\x22:\x20\x20\x20\x20\x20\x22./okdb-data\x22,\x0a\x20\x20\x20\x20\x20\x20\x22key\x22:\x20\x20\x20\x20\x20\x20\x22...\x22,\x0a\x20\x20\x20\x20\x20\x20\x22logLevel\x22:\x20\x22info\x22,\x0a\x20\x20\x20\x20\x20\x20\x22noAdmin\x22:\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22noRepl\x22:\x20\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22auth\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22open\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20Examples:\x0a\x20\x20\x20\x20okdb\x0a\x20\x20\x20\x20okdb\x20--port\x209000\x20--path\x20./mydb\x0a\x20\x20\x20\x20okdb\x20--no-repl\x20--port\x208080\x0a\x20\x20\x20\x20okdb\x20--open\x0a\x20\x20\x20\x20okdb\x20--open\x20192.168.1.0/24\x0a\x20\x20\x20\x20okdb\x20doctor\x0a\x20\x20\x20\x20okdb\x20backup\x20./my-backup\x0a\x20\x20\x20\x20okdb\x20restore\x20./my-backup\x20--path\x20./okdb-data\x0a','uptime','notOkdbShaped','closeAllConnections','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','withPoolHold','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','_lastCpuUsage',':\x20key\x20[','allSettled','cursorKey',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','level:\x20info','Blob\x20on\x20disk\x20has\x20no\x20~files\x20record\x20in\x20any\x20env\x20(hash:\x20','_versionSkewWarned','_validateOidcAccessToken','fts:','platform','\x20@\x20','jwk','additionalProperties','Files','_lockDb','\x20(deleting\x20requires\x20--force\x20if\x20none\x20of\x20them\x20is\x20okdb)','outOfTree','okdb-license-id:','\x20/\x20','processorId','\x20process(es)\x20that\x20could\x20map\x20these\x20','LENGTH_REQUIRED','is\x20not\x20allowed','INDEX_ALREADY_REGISTERED','\x20\x20Shell\x20commands','Execute\x20functions\x20over\x20HTTP/MCP/shell.','Processors','token_endpoint','from','hostname','OKDBInvalidValueError','pipe','[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping','?\x0a\x20\x20(node\x20identity\x20and\x20licenses\x20are\x20preserved)\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','clock','SIGBREAK','allowMethods','[okdb]\x20export\x20complete','TYPE_ALREADY_REGISTERED','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','\x0d[okdb]\x20','\x20deleted','ENVS','debug','method','No\x20license\x20found\x20matching\x20this\x20activation\x20token','exp','_authOptions','not\x20open','[okdb]\x20exporting\x20env\x20\x22','\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','\x22\x20already\x20exists','\x20supervised)','recent\x20writes\x20(newest\x20first)','\x20MB)','usage:\x20okdb\x20restore\x20<backup-dir>\x20--path\x20<target-data-dir>','\x27\x20doesn\x27t\x20exist','json','ref:violation_resolved','transactionSync','anySize','stopHeartbeat','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','schema:set','LICENSED_BUILD','_blobPath','online','LABEL','GATEWAY_TIMEOUT','password','\x20\x20score:','_adminRelay','search:query','pending','stopped','_totalReadMs','authorizationUrl','body','child_process','stdin','License\x20already\x20stored','flatMap','race','_jwksCache','node','searchParams','byteLength','uid','copyFileSync','(on\x20any\x20path\x20command)','closeIdleConnections','setLogger','candidates','heapUsed','features','ingest','set','note','--ttl','processingSig','SCHEMA_VALIDATION_FAILED','exportBlobs','put','dest','indexes','targetKey','[okdb]\x20error:\x20failed\x20to\x20read\x20','JWT\x20issuer\x20mismatch','_rotateBucket','processors/','ITEM_CREATE','importBlobs','2787526WVNCYR','comm','host','\x1b[36m','\x20\x20✓\x20Revoked\x20token\x20','time','ieee-p1363','List\x20functions\x20and\x20inspect\x20their\x20source.',')\x20→\x20','index:registered','shm-gc:\x20cannot\x20read\x20the\x20memory\x20maps\x20of\x20','_singletonLocks','CHANGEFEED_QUANTUM','_started','is\x20required','\x20\x20matching\x20prefix\x20\x20\x20\x20','min','_released','\x20process','address','audiences','_boot','slice','routes','Engines','expiresAt','ttl:expired','Write','enforce','[okdb]\x20invalid\x20log\x20level:\x20\x22','parts','[okdb]\x20exported\x20\x20types=','type/users/item/alice','updatedAt','segmentNameFor:\x20suffix\x20must\x20look\x20like\x20\x22_name\x22\x20(got\x20','_maybePublish','worker_threads','context','_nodeDb','queue/','unlinkSync','type/','readUInt16BE','cors','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','cluster:','_putRowSync','UNIQUE_CONSTRAINT','_rawDb','Register/update/delete\x20types,\x20register/drop/rebuild\x20indexes,\x20set\x20TTL\x20policy.','ref:violation','\x20sync','boolean','List\x20views,\x20query\x20view\x20output,\x20inspect\x20metadata\x20and\x20definition.','handler','env:opened','files','copy','data','supervisorKey','next','OKDBIndexAlreadyRegisteredError','scopes','_totalWriteMs','Functions','types:','--env\x20<name>','/\x20quit\x20/\x20Ctrl+C','has','\x20\x20@','ppid','headers','api','readUInt8','indexToDb','sourceType','assertFeature','schema','\x22\x20is\x20used\x20by:\x20','\x20env','reduce','registerType','license','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','processor','_onPending','issuedAt','Version\x20mismatch\x20for\x20','matcher','\x0a[okdb]\x20received\x20','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','status','importFromStream','System','alg','.okdb-write-test','_nodeDead','\x27\x20is\x20already\x20registered','opendirSync','_lastCpuWindowMs','_log','http.listen:\x20host\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20an\x20array\x20of\x20them','Unknown\x20error','ms\x20(attempt\x20','stringify','createEnvironment','input:\x20','sse','\x20has\x20ambiguous\x20binding\x20for\x20path\x20field:\x20','last-event-id','floor','okdbVersion','__fts:','INVALID_PRIMARY_KEY','getuid','code','logRequests','access-control-max-age','schema:drop','[okdb]\x20invalid\x20config\x20\x22http.host\x22:\x20','\x20\x20\x20\x20path:\x20\x20','cluster-wide','--verbose','_startAdmission','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','toUpperCase','writes=','endsWith','ms\x20p99=','\x20more)','Schema\x20validation\x20failed\x20for\x20','.kdb_history','_okdb','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','system:clock_change','afterWrite',',\x20signal=','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','x5c','_handleInProcess','repeat','drop','\x20while\x20this\x20process\x20runs\x20','UNSUPPORTED_MEDIA_TYPE','include','get','timingSafeEqual','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','./okdb-backup','alloc','--log-requests','_holderDead','\x0a\x20\x20✓\x20License\x20already\x20stored\x20(no\x20change)','gate','ENV','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','Validation\x20failed:\x20','perf_hooks','workers','readFileSync','.kdbconfig','Bearer\x20$1…','/admin/index.html','okdb.http.listen(port)\x20in\x20each\x20worker.','ACTIVATION_EXPIRED','runInNewContext','\x20\x20\x20\x20licensee:\x20\x20','safety','enable','setDesired','\x0a\x20\x20✓\x20License\x20added','embeddings','params','regex','\x20(okdb\x20','GET','\x20for\x20system\x20env','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','[okdb]\x20restoring\x20','[okdb]\x20invalid\x20port:\x20','deaths','LICENSE_INVALID','send','[okdb]\x20error:\x20','typeSubDbs','_activateProcesses','getHeader','fromEntries','shmbuf','\x20died\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20this\x20help\x0a\x20\x20','\x0a-----END\x20CERTIFICATE-----\x0a','Create\x20and\x20delete\x20views,\x20start,\x20stop,\x20and\x20rebuild\x20them.','_highWater','orphan','\x20environment\x20','inst:','DELETE','\x20\x20\x20\x20addedAt:\x20\x20\x20','changes','Token\x20must\x20be\x20a\x20JWT','processor:paused','records','reverse','\x20\x20!\x20','dbPath','needsActivation','commit','defaults','_userRouteCount','\x20forked\x20','tags','\x20\x20✓\x20~blobs\x20\x20(','system:poke','unlink','typesPerEnv','index:drop','[okdb]\x20shutdown\x20drain\x20exceeded\x203000ms\x20—\x20hard-exiting\x0a','repairBlobRefs','--path','der','_listTypes','ceil','gray','respawnTimer','_shouldWrapResponse','Type\x20definitions,\x20all\x20index\x20registrations\x20(byIndex,\x20FTS,\x20vector),\x20and\x20TTL\x20policy.','getCount','store','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','node/','bus:type_drop','clearLine','value','procmode/','stop','\x20\x20(licensee:\x20','threads','SYSTEM_STOPPED','transport','hashed','[okdb]\x20imported\x20\x20types=','req','async','maps','is\x20invalid','dataBytes','delete','SIGINT\x20(double-tap)','[okdb]\x20preserved:\x20','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','header','isAuthenticated','listAll','singletonClaims','toLowerCase','reads','x-okdb-raw-response','KiB','root','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','\x20(must\x20be\x20an\x20integer\x20>=\x201)\x20—\x20using\x201','compareExchange','spki','\x20references\x20','msg','shared-memory\x20segment\x20\x22','Records','sandbox','\x20\x20\x20\x20permissions:\x20','_openEnvLazy','\x20licenses','_closed','createServer','\x20\x20\x20\x20admin:\x20\x20\x20http://localhost:','_wantDb','\x20(+','label','\x20\x20skipped:\x20','\x0a[okdb]\x20fatal\x20error:','\x20has\x20illegal\x20binding\x20target\x20for\x20','standard','sizeAfter','charCodeAt','pin','childTransaction','_getJwkKey','\x20log\x20level:\x20','\x20more','\x20\x20\x20\x20status:\x20\x20\x20\x20','config','engines','dropType','magenta','preferred_username','\x20type','\x20\x20\x20\x20usage:\x20\x20\x20','closed','reject','expiry','fast','env/staging/info','port','start','red','resetting','toFixed','\x20already\x20exists','Payload\x20too\x20large','catch','servers','compaction','(unset)','markClosed','unlinked','cpSync','BAD_REQUEST','ms\x20env=','blindPids','\x20\x20Tier:\x20\x20\x20\x20',',\x20stopping\x20workers…\x0a','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','field','ensureType','[okdb]\x20unknown\x20token\x20action:\x20\x22','primary','--prefix','Register,\x20configure,\x20and\x20remove\x20cluster\x20peers.','TiB','\x22\x20to\x20enable\x20it.','ALREADY_EXISTS','use\x20<env>','getAuthOptions','setOwnMeta','cluster:\x20unavailable\x20(shmbuf\x20native\x20missing)\x20—\x20running\x20single-process','\x20origin=','createHash','system:stopped','detectInputType','_coordinator','decommissioning','readline','pushEphemeral','idx:','registry\x20publish\x20failing:\x20','Enqueue,\x20cancel,\x20retry,\x20remove\x20jobs;\x20manage\x20buckets;\x20reconcile\x20and\x20rebuild\x20stats.','_ensureDesired','_windowCbs','_children','2.6.4','\x20(must\x20be\x20a\x20string\x20or\x20array\x20of\x20strings)','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','getRange',';\x20SameSite=','getClock','keys/public.pem','_ensure','clockToChangeDb','data:read','sourceKey','verifyCookie','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','\x20result','http-server','\x20\x20·\x20','item:update','license:removed','runtimeProcessesView','Work','toUTCString','set-cookie','SYSTEM_PROC','reload','registerIndex','scrypt','hasOwnProperty','verifySignature','groups','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','FTS_RESET','cause','[okdb]\x20backing\x20up\x20to\x20','okdb_session_','rawBuf','options','OPEN','hint','result','reportThreadStats','live\x20process\x20registry;\x20disposable','\x20fetching\x20','RS256','\x20documents\x20fail\x20validation','remaining-fields','Invalid\x20license\x20blob:\x20','id:\x20','listDesired','test','getDesired','list','_startedAt','type/users/item/alice\x20--env\x20staging','./okdb-data','ready','formatCookie','\x22\x20resolves\x20outside\x20the\x20backup\x20root\x20\x22','uuid','equals','LICENSE_HASH_MISMATCH','user','holder','prototype','\x20(slot=','_bucketIdx','_hbTimer','detachConsole','argv','Hint:\x20','createReadStream','maxAge','aud','\x20writer{depth=','cpuUsage','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','\x20<path>\x20[json-body]','writeMs','max','\x20is\x20inside\x20the\x20backup\x20','\x20\x20Type\x20','oldestPendingMs','remove','HTTP_','INDEX_HAS_CONSUMERS','randomBytes','[env]','queue','heapTotal','_envs','disable','clearCookie','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','putSync','_lockDbOf','Protected\x20(gate)','\x20cf-ray=','type/users/query\x20{\x22active\x22:true}','types','\x20(expires\x20','null','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','Blob\x20file\x20missing\x20for\x20~files\x20record\x20\x22','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','./okdb-export.ndjson','allocUnsafe','attachFeed','count','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','[okdb-cluster]\x20primary\x20pid=','\x20ipc\x20error:\x20','\x20has\x20ambiguous\x20query/path\x20field:\x20','dropSchema','readInt32LE','socket','recheck','available','FEATURES','createLoginState','clear','\x20binding\x20references\x20missing\x20input\x20field:\x20','workersFlag','application/x-www-form-urlencoded','signalWant','_servingEngines','[on|off|level]','\x20→\x20POST\x20/api/env/','protected:read','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','_blobStatusDb','\x20===','Route\x20','_publishFailWarned','__okdbCluster','bus:proc','_buildProcessingFacet',')\x20exited\x20','role','warn','dynamic','bodyMode','green','parseInt','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','resetReadTxn','never','blobs','standalone','/api','\x1b[33m','Cannot\x20delete\x20','integer','[okdb]\x20created\x20.kdbconfig','/proc','\x20\x20\x20\x20id:\x20\x20\x20\x20','okdb-backup.json','system:ready','tryAcquire','data.mdb','caps','_getType','release','_getOidcDiscovery','exit','listNodes','\x20\x20\x20\x20api:\x20\x20\x20\x20\x20http://localhost:','[okdb]\x20primary\x20okdb\x20close\x20error:\x20','_rowKey','maxMs','isPrimary','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','nbf','_ownMeta','decommissioned','stop\x20every\x20okdb\x20process\x20on\x20this\x20path\x20and\x20run\x20`okdb\x20shm-gc`.','JWT\x20expired','[okdb]\x20restore\x20complete\x20—\x20full-text\x20indexes\x20rebuild\x20on\x20first\x20open','PUB_FINGERPRINT','responseStatuses','_store','username','_nodeDbFor','%),\x20','primaryOkdb','rawResponse','\x20querySchema\x20references\x20missing\x20input\x20field:\x20','key','--changes','stream','OKDBInvalidPrimaryKeyError','_lookupByName','Origin','_kind','kill','enabled','PUT','\x22\x20matches\x20','refs','trim','line','MALFORMED_TOKEN','beforeWrite','liveThreadStats','iss','Embeddings','match','isWorker','_onProcEvent','jwks_uri','permissions','writeFileSync','stdout','\x0a\x20\x20\x20\x20','\x20\x20\x20http://localhost:','bold','--test','BACKUP_DEST_INSIDE_STORE','Worker-side:\x20claim,\x20heartbeat,\x20complete,\x20fail,\x20progress.','addedAt','\x1b[35m','_buildChildRow','slotKey','_enableChangelog','_wrapApiResponse','_assertUsable','Environments','_desiredOverlay','dir','\x20\x20in\x20use\x20(mapped/fd)\x20','listRoutes','retiring','keys:','started','_buckets','noteListenAddr','Unauthorized','~tokens','processor:error','question','work','authenticateToken','newIdentity',')\x20to\x20your\x20license\x20vendor.','\x22:\x20','toString','licenses','clearThreadStats','cpuWindowMs','_runMiddlewares','blocks','_isFree','blob\x20status\x20db\x20not\x20available','(null)','fieldPath','_selfKey','writeUInt32BE','1088372QIthwW','txn:end','loadEnvFile','\x20oldestPendingMs=','configureAuth','okdb-lock:\x20env\x20closed',')\x20—\x20they\x20will\x20NOT\x20be\x20preserved','UNPROCESSABLE_ENTITY','Forbidden\x20—\x20no\x20permissions\x20available','_bpWaiters','identity','processingStatusView','Shutting\x20down\x20due\x20to\x20license\x20expiry','JWT\x20is\x20missing\x20kid','_durs','[okdb]\x20closed\x20cleanly\x0a','Internal\x20error','NOT_FOUND','METHOD_NOT_ALLOWED','\x20process(es)\x20had\x20unreadable\x20maps','Build\x20expects\x20public\x20key\x20fingerprint\x20','add','_userPhase','INDEX_NOT_REGISTERED','_changefeed','okdb-writer[','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','subject','target\x20','Bearer\x20','_lastTick','\x20statusEnv=','isFeatureEnabled','\x20\x20records=','/types\x0a\x20\x20\x20\x20','_nestedWarned','selfAddress','system:bus_state_change','\x20records','now','then','title','attach','Forbidden','--no-cluster','origins','reason','cookies','unique:violation','\x20\x20⚠','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','Run','name','type','\x20\x20(need\x20≥\x2018)','discoveryTtlMs','_sandbox','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','_baselines','use','pause','_license','tags:\x20','processor:retry','_typeSchema','/api/','hash','--types','inspect','cpuPct','internalOnly','committed','[okdb]\x20starting…\x0a','processing','\x20records…','timeMachine','errors','isInteger','_pending','cluster:\x20ready\x20(','verbose','created','\x20\x20[','resolveBackupDest','\x20does\x20not\x20exist','mkdirSync','\x20\x20http://localhost:','config\x20file\x20valid:\x20','body:\x20','false','setupPrimary','127.0.0.1','OIDC\x20discovery\x20missing\x20jwks_uri','getSecurityNotices','_sampleOwnStats','\x20\x20✓\x20','env:removed','VALIDATION_ERROR','token','_acquiredAt','shm-gc','content-type','FTS_REGISTERED','commitP99Ms','find','_held','publishChildRow','inflightAgesMs','Full-text\x20search','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','export:\x20stream\x20closed\x20before\x20drain','url','permission','--no-admin','expired','LICENSEE','putNode','ttl:clear','INVALID_INDEX_KEY','\x20\x20╔═══════════════════════════╗','licensee','env/','fields','inputSchema','_buildOwnRow','filter','LICENSE_ACTIVATION_INVALID','_dispatch','requests','attached','List,\x20download,\x20and\x20inspect\x20file\x20metadata.','_loginStates','--blobs','okdb_session','OKDB_CODE_TO_HTTP_STATUS','[okdb]\x20import\x20complete','external','bindings','uncaughtException','\x20\x20\x20\x20\x20\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','segments\x20(','mean','foreignOwner','instances','failed\x20to\x20open','Token\x20secret\x20not\x20configured','push','internal','setHeader','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','ESRCH','2174970vdZsuC','verifyActivation','_licenseHash','\x22\x20on\x20\x22','types/env=','sort','\x20\x20✓\x20OKDB\x20cluster\x20running','shmbufNative','ttl:set','load','sab','addSupervisedChild','\x20\x20unused\x20(deletable)\x20','txn:rollback','type:drop','info','listenAddr','update','functions','index:progress','_onTick','known\x20field','every','processor:progress','\x20drainAge=','node\x20identity','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','round','startsWith','\x20\x20✓\x20Removed\x20license\x20','Indexes','parkedNow','closeSync','No\x20tokens.','\x20\x20║','OKDBSchemaCollectionError','fetch','token_use','\x1b[2m','BACKUP_PATH_OUTSIDE_ROOT','--config','_ensureTokensType','hasDesired','OKDBNotFoundError','activation','okdb','The\x20following\x20routes\x20require\x20auth\x20but\x20declare\x20no\x20permission:\x0a\x20\x20','sig','SIG_INVALID','exposeHeaders','_role','/dev/shm','Read','precision','dryRun','shmbuf/package.json','map','index:reset','PATCH','version','http.listen({workers/makeOkdb/primaryOkdb})\x20is\x20no\x20longer\x20supported\x20in\x20the\x20','backupRoot','isArray',');\x20','_quarantinedEnvs','view','views','userAdded','https','starting','received\x20','28740zjRqZG','kid','addRaw','email','List\x20environments\x20and\x20read\x20environment\x20info.','[okdb]\x20reset:\x20','examples','setEncoding','_fetchJwks','NOT_IMPLEMENTED','207YSQier','[okdb]\x20invalid\x20','envs=','\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','resetIndex','limits','worker','white','existsSync',':\x20prefix\x20','[okdb]\x20port\x20','\x0d[okdb]\x20blobs:\x20','stack','free\x20tier','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','{}[]:,\x27\x22','path','LICENSE_FEATURE_DISABLED','credentials','shell','\x1b[90m','pid','current','~processes:cmd','reap','_caps','blindCommands','bus:drain','x-requested-with','statuses','yellow','\x20\x20(no\x20env\x20draining)','splice','--watch','okdb-diag.','ms\x20on\x20env=','operations','Unknown\x20JWKS\x20kid:\x20','clusterStatusView','JWT\x20audience\x20mismatch','\x20worker(s)\x20still\x20serving','INDEX_READY','ms\x20mean=','shutting\x20down…\x0a','\x20\x20Envs:\x20\x20\x20\x20','_lock','tokenSecret','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','database\x20path\x20writable:\x20','writeUInt8','870468IayVFp','\x20\x20skipped=','txn:start','\x20pid=','ITEM_PENDING','item:create','waiting','isFile','_onStop','no\x20.kdbconfig\x20(using\x20defaults)','children','allowedAlgs','issueToken','_enqueuedAt','remoteAddress','open','onThreadExit','[okdb]\x20http\x20workers:\x20','PIN','_nodeDbCache','(code=','Events','no-cache,\x20no-transform','ITEM_UPDATE','reset','Invalid\x20index\x20key\x20type\x20for\x20\x27','http','INVALID_VALUE','EADDRINUSE','\x20\x20\x20\x20license:\x20','Blob\x20storage:\x20large\x20file\x20uploads\x20attached\x20to\x20records\x20or\x20stored\x20standalone.','\x20has\x20canonical\x20metadata\x20but\x20missing\x20valid\x20inputSchema','object','\x22\x20is\x20inside\x20the\x20store\x20\x22','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','_groupByProcess','List\x20tokens\x20and\x20users.','Machine-to-machine\x20cluster\x20protocol\x20(join\x20handshake,\x20replication\x20channel,\x20traffic).\x20Grant\x20only\x20to\x20peer\x20nodes\x20—\x20not\x20to\x20humans.','exec','createWriteStream','\x20\x20\x20\x20admin:\x20http://localhost:','cluster','index','migrate','--eval','_isReader','[okdb]\x20close\x20error:\x20','payload','toISOString','Query','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','unclaimed','roles','_safeEnvDirName','\x22\x20—\x20pass\x20a\x20path\x20relative\x20to\x20it\x20(configure\x20with\x20the\x20`backup.root`\x20option)','OPTIONS','_put','/api/env/','\x22\x20→\x20','[okdb]\x20invalid\x20config\x20\x22','index:ready','orphan_blob','Pause/resume\x20processor,\x20trigger\x20backups,\x20restore.','\x0a\x0a\x20\x20','Records\x20inside\x20your\x20types\x20—\x20the\x20actual\x20rows\x20you\x20store.','\x20\x20(name:\x20','_statusEnv','other','undefined','setSchema','system:drain','_clusterWorkerAttached','MiB','\x20opening\x20','INTERNAL_ERROR','authorization','\x20\x20Path\x20access','--help','\x20bytes,\x20need\x20>=\x2065)','--name','<json-body>','/dev/shm/','_singletonLock','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','_totalReads','createInterface','-backups','creating','record','flushLmdb','\x20(durable\x20desired-state)','\x20phase=','end','Invalid\x20token','\x20\x20\x20\x20features:\x20\x20','_flushTimer','_bestMatch','yes','Foreign\x20key\x20violation:\x20','skip\x20','[res]\x20','threadId','\x20day(s).','system:env_release','doctor','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20',':\x20connected\x0a\x0a','procmodeack/',';\x20Max-Age=0;\x20Expires=Thu,\x2001\x20Jan\x201970\x2000:00:00\x20GMT','references','pathname','kind','backup\x20destination\x20\x22','\x20\x20All\x20checks\x20passed.\x0a','getCmd','Data','writeUInt16BE','digest','pathParams','license:added','fts','ORPHAN\x20(env-closed\x20write)','processes','terminal','<path>','_onItem','[okdb]\x20cluster\x20supervisor\x20pid=','[okdb]\x20blobs:\x20imported=','register','cpus','emit','\x20<\x20','\x22.\x20Use:\x20create,\x20list,\x20revoke','_quantum','jwksTtlMs','properties','namespace','SERVICE_UNAVAILABLE','open\x20','_oidcDiscoveryCache','parseBearer','drain','May\x20read\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20read\x20permission.','isTTY','Cannot\x20set\x20enforce\x20schema\x20on\x20','JWT\x20not\x20yet\x20valid','relative','linux','SIGKILL','active','validateBlobIntegrity','export','decodeActivationToken','\x20HTTP\x20workers\x20','array','offWindow','_copyDir','_listenAddr','onWindow','middlewares','_cursors','level','_runGuards','toLocaleString','dedupeMax','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','VIEW_PROGRESS','resetFts','log','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','\x20—\x20','LICENSE_ALREADY_STORED','(add\x20a\x20license\x20first)','base64','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','_markSeen','_active','\x20size,\x20','\x20cannot\x20be\x20MCP-exposed\x20without\x20an\x20explicit\x20adapter\x20because\x20it\x20uses\x20','state','_onPoke','maxExtra','listening','event','restore','noCluster','noAdmin','guards','_totalWrites','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','isConnected','_allEnvsWithFiles','time-machine','targetType','\x20envs','inUse','~files','https:','createHmac','decodeLicenseBlob','USE','BACKUP_DEST_NOT_EMPTY','_startHeartbeat','authenticateRequest','length','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','change','\x20(must\x20be\x20true\x20or\x20false)','hex','1ofN:','\x22\x20(hash:\x20','TYPE_NOT_REGISTERED','nodeKey','shutdown','isHeld','--address','\x20\x20deleted\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','--username','entry','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','PERMISSIONS','item:pending',';\x20Path=','ms\x20activeWriters=','_timer','xdg-open\x20','_admissionTimer','processor:resumed','Search','_pendingLocal','rmSync','prompt','_db','[okdb]\x20backup\x20complete','unique:violation_resolved','access','error','cf-connecting-ip','\x20\x20⚠\x20\x20','query','_committed','commitsPerSec','stderr','createdAt','(none)','_cmd','__okdbSlot','metrics','sync','[okdb-cluster]\x20slot=','issuer','\x22\x20—\x20choose\x20a\x20directory\x20outside\x20it','_dedupeKey','database\x20path\x20not\x20writable:\x20','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','close','--drop','darwin','Queue','must\x20be\x20','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','destroy','_rootDb','running','flushDebounce','view:progress','tmp','\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','ms\x20max=','kdb_admin_oauth_state','freeze','_collectWriterFacet','hasType','ID\x20token\x20is\x20not\x20accepted','sub','isAbsolute','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','_sync','[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','\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','\x20tokens:','homedir','[okdb]\x20error:\x20--password\x20requires\x20--name','registry\x20heartbeat\x20skipped\x20(writer=','grants','../','--port','verify','recordWrite','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','--grants','revoke','processorsView','\x20logs\x20off\x0a','\x1b[34m','padEnd','processKey','~processes','_heartbeatTimer','assign','ftsIndexes','decoded','cookieName','confirm','publishOwnRow','selfKey','Index\x20\x27','params.','_migrateVocab','auth','killable','OKDBForeignKeyDeleteError','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','Activation\x20invalid:\x20','isDead','forceAfterMs','unhandledRejection','create','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','__OKDB_PUB_FINGERPRINT__','some','values','win32','_handlePending','oauth','hasIndex','openDB','--inspect','DELETE\x20type/users/item/x','envName','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','number','server','isFinite','active:','transport:\x20','[okdb]\x20opening\x20','shift','destroyed','ms\x20busy=','content-length','_systemEnv','activate','search','\x20bytes','randomUUID','statusCode','_threadStats','sourcePath','SYSTEM_POKE','_totalRequests','isBusy','derivePin','\x0a\x20\x20Joining\x20cluster\x20at\x20','_inflight','migrations','--dry-run','setNoDelay','mode','_handlePoke','system:proc','events','noRepl','meta','setTtl','addLicense','_computeStatus','realpathSync','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','_wantDbOf','lmdb','_outstanding','_scheduleFlush','unknown','_lastCpuPct','createPublicKey','readMs','[okdb]\x20created\x20./okdb-data','(?:/(.*))?$','summary','ephemeral','lost','HELP','busy','[okdb-cluster]\x20worker\x20pid=','skippedByProtocol','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','\x20\x20changes=','raw-put','maxBodyBytes','http://','__writeCounter','quantum','process\x20','--print','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','base64url','_key','startedAt','INDEX_REGISTERED','API\x20tokens,\x20users,\x20and\x20credentials.','--log-level','authRequired','\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a','connected','--key','_isClusterController','basename','VERB','\x20\x20Usage:\x20','RSA-SHA256','--password','prefix','feed:','\x20allocated','hdr','net','main','clusterWorkers',';\x20Max-Age=','Type\x20\x27','_bpParkedTotal','env','typesDb','legacy','processors','_draining','_dedupeMax','\x20(dry\x20run)','hasCanonical','dim','otherwise\x20rerun\x20as\x20root.','PAYLOAD_TOO_LARGE','att','[filter]','\x20HTTP\x20workers,\x20each\x20serves\x20+\x20processes)','STATUS','rss','PUT\x20type/users/item/x\x20{\x22n\x22:1}','\x1b[37m','depth','Server-side\x20user-defined\x20functions\x20registered\x20per\x20environment.','instanceId','error\x20','_normalizeOAuthAuthResult','wait','shm\x20segment\x20','Invalid\x20activation\x20token:\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/','ITEM_REMOVE','appendFileSync'];_0x3812=function(){return _0x132257;};return _0x3812();}var okdb$1={},okdbWorkers,hasRequiredOkdbWorkers;function requireOkdbWorkers(){if(hasRequiredOkdbWorkers)return okdbWorkers;hasRequiredOkdbWorkers=0x1;const _0x5a3ba6=require$$0,_0x306423=require$$0$1,_0x2b85eb=require$$1;let _0x39f2a8;function _0x1a8ebf(){const _0x43fe41=_0x4c4a;if(process.env.OKDB_FORCE_SHMBUF_FALLBACK==='1')return![];if(_0x39f2a8!==undefined)return _0x39f2a8;try{const _0x585303=_0x2b85eb[_0x43fe41(0x836)](require[_0x43fe41(0x8c2)](_0x43fe41(0x594)));_0x39f2a8=_0x306423['existsSync'](_0x2b85eb[_0x43fe41(0x1c9)](_0x585303,_0x43fe41(0x8ba),'Release',_0x43fe41(0x1a8)));}catch{_0x39f2a8=![];}return _0x39f2a8;}function _0x2a09e8(){const _0xa606a6=_0x4c4a,_0x5011ce=_0x5a3ba6[_0xa606a6(0x662)]()[_0xa606a6(0x6ad)];return Math['max'](0x1,_0x5011ce-0x1);}function _0x56a7ca(_0x478cd2,_0x4911d1={}){const _0x59f09b=_0x4c4a,_0x355262=_0x4911d1[_0x59f09b(0x564)]!==undefined?_0x4911d1[_0x59f09b(0x564)]:_0x1a8ebf();let _0xbec9bd;if(_0x478cd2?.[_0x59f09b(0x69a)])_0xbec9bd=0x1;else{let _0x50931f,_0xea9455;if(_0x478cd2?.[_0x59f09b(0x43e)]!==undefined&&_0x478cd2['workersFlag']!==null&&_0x478cd2[_0x59f09b(0x43e)]!=='')_0x50931f=_0x478cd2[_0x59f09b(0x43e)],_0xea9455=_0x59f09b(0x832);else{if(process.env.OKDB_HTTP_WORKERS!==undefined&&process.env.OKDB_HTTP_WORKERS!=='')_0x50931f=process.env.OKDB_HTTP_WORKERS,_0xea9455='OKDB_HTTP_WORKERS';else _0x478cd2?.['http']?.[_0x59f09b(0x307)]!==undefined&&_0x478cd2[_0x59f09b(0x5fb)]['workers']!==null&&_0x478cd2[_0x59f09b(0x5fb)][_0x59f09b(0x307)]!==''&&(_0x50931f=_0x478cd2[_0x59f09b(0x5fb)][_0x59f09b(0x307)],_0xea9455='http.workers');}if(_0x50931f===undefined)_0xbec9bd=_0x2a09e8();else{const _0x50d003=Number(_0x50931f);!Number[_0x59f09b(0x512)](_0x50d003)||_0x50d003<0x1?(console[_0x59f09b(0x44f)](_0x59f09b(0x5af)+_0xea9455+'='+JSON[_0x59f09b(0x2d1)](_0x50931f)+_0x59f09b(0x36e)),_0xbec9bd=0x1):_0xbec9bd=_0x50d003;}}return!_0x355262&&_0xbec9bd>0x1&&(console[_0x59f09b(0x44f)]('[okdb]\x20shmbuf\x20native\x20binding\x20unavailable\x20—\x20multi-process\x20clustering\x20is\x20unsafe\x20'+(_0x59f09b(0x838)+_0xbec9bd+').')),_0xbec9bd=0x1),_0xbec9bd;}return okdbWorkers={'isShmbufNative':_0x1a8ebf,'defaultWorkers':_0x2a09e8,'resolveWorkers':_0x56a7ca},okdbWorkers;}var version=_0x1a2e0d(0x3c6),require$$3={'version':version},okdbMigrate={'exports':{}},okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0xfc62a2 extends Error{constructor(_0x1016ab,_0x513aa8,_0x4e0799={}){const _0x3d734a=_0x4c4a;super(_0x1016ab),this['name']='OKDBError',this[_0x3d734a(0x2dc)]=_0x513aa8,this[_0x3d734a(0x844)]=_0x4e0799,_0x4e0799['cause']&&(this['cause']=_0x4e0799[_0x3d734a(0x3e5)]),Error[_0x3d734a(0x83a)](this,this[_0x3d734a(0x83d)]);}}class _0x575ebc extends _0xfc62a2{constructor(_0x26a1df,_0x376705,_0x29e09a,_0x2ab1de){const _0x6c8344=_0x4c4a;super(_0x6c8344(0x2c0)+_0x26a1df+'@'+_0x376705+':\x20expected\x20'+_0x29e09a+_0x6c8344(0x803)+_0x2ab1de,'VERSION_MISMATCH',{'type':_0x26a1df,'key':_0x376705,'expectedVersion':_0x29e09a,'actualVersion':_0x2ab1de}),this['name']='OKDBVersionMismatchError';}}class _0x5ecc3c extends _0xfc62a2{constructor(_0x1c1d80,_0x567ece){const _0x117782=_0x4c4a;super(_0x1c1d80+'@'+_0x567ece+_0x117782(0x519),_0x117782(0x4d6),{'type':_0x1c1d80,'key':_0x567ece}),this[_0x117782(0x4f9)]=_0x117782(0x588);}}class _0x35a792 extends _0xfc62a2{constructor(_0x1e2e22,_0x69949d){const _0x51cc0a=_0x4c4a;super(_0x1e2e22+'@'+_0x69949d+_0x51cc0a(0x39c),_0x51cc0a(0x3b3),{'type':_0x1e2e22,'key':_0x69949d}),this[_0x51cc0a(0x4f9)]='OKDBAlreadyExistsError';}}class _0x7cd4d7 extends _0xfc62a2{constructor(_0x29ad88,_0x3bde4a){const _0x588aef=_0x4c4a,_0x40443b=typeof _0x3bde4a;super(_0x588aef(0x5fa)+_0x29ad88+'\x27:\x20'+_0x40443b+_0x588aef(0x6e5)+_0x3bde4a,_0x588aef(0x53b),{'index':_0x29ad88,'key':_0x3bde4a,'keyType':_0x40443b}),this[_0x588aef(0x4f9)]=_0x588aef(0x1e2);}}class _0x526f38 extends _0xfc62a2{constructor(_0x45059f){const _0x44d292=_0x4c4a,_0x34d30e=typeof _0x45059f;super(_0x44d292(0x862)+_0x34d30e+_0x44d292(0x4fe)+_0x45059f,_0x44d292(0x2da),{'key':_0x45059f,'keyType':_0x34d30e}),this[_0x44d292(0x4f9)]=_0x44d292(0x482);}}class _0x2708c5 extends _0xfc62a2{constructor(_0x474d83){const _0x5be217=_0x4c4a;super(_0x5be217(0x785)+_0x474d83+_0x5be217(0x231),_0x5be217(0x6b4),{'type':_0x474d83}),this[_0x5be217(0x4f9)]=_0x5be217(0x1ce);}}class _0x46fe48 extends _0xfc62a2{constructor(_0x21bcfb){const _0x10a45e=_0x4c4a;super(_0x10a45e(0x785)+_0x21bcfb+'\x27\x20already\x20registered',_0x10a45e(0x21f),{'type':_0x21bcfb}),this[_0x10a45e(0x4f9)]='OKDBTypeAlreadyRegisteredError';}}class _0x54043b extends _0xfc62a2{constructor(_0x3f14d5,_0x2e24d7){const _0xb3a9a6=_0x4c4a;super('Index\x20\x27'+_0x2e24d7+'\x27\x20on\x20type\x20\x27'+_0x3f14d5+_0xb3a9a6(0x231),_0xb3a9a6(0x4dc),{'type':_0x3f14d5,'index':_0x2e24d7}),this[_0xb3a9a6(0x4f9)]=_0xb3a9a6(0x7da);}}class _0x1beaa7 extends _0xfc62a2{constructor(_0x1d9846,_0x52ec39){const _0xe45a92=_0x4c4a;super(_0xe45a92(0x713)+_0x52ec39+'\x27\x20on\x20type\x20\x27'+_0x1d9846+_0xe45a92(0x2ca),_0xe45a92(0x210),{'type':_0x1d9846,'index':_0x52ec39}),this[_0xe45a92(0x4f9)]=_0xe45a92(0x2a6);}}class _0x18590c extends _0xfc62a2{constructor(_0x5d5d7a,_0x3a6bab={}){const _0x9ba5cd=_0x4c4a;super(_0x5d5d7a,_0x9ba5cd(0x5fc),_0x3a6bab),this[_0x9ba5cd(0x4f9)]=_0x9ba5cd(0x217);}}class _0x40145c extends _0xfc62a2{constructor(_0xaf98b4,_0x36a8c8,_0x1c59df,_0x45c351,_0x47ce05){const _0x59f694=_0x4c4a;super(_0x59f694(0x8a4)+_0xaf98b4+'@'+_0x36a8c8+_0x59f694(0x1f9)+_0x1c59df+']\x20already\x20maps\x20to\x20\x27'+_0x45c351+_0x59f694(0x1c4)+_0x47ce05+'\x27',_0x59f694(0x298),{'type':_0xaf98b4,'index':_0x36a8c8,'indexKey':_0x1c59df,'existingKey':_0x45c351,'conflictingKey':_0x47ce05}),this['name']='OKDBUniqueConstraintError';}}class _0x4b2d7f extends _0xfc62a2{constructor(_0x290a88,_0x50e7f8,_0x4fc8ae){const _0x4b7ebf=_0x4c4a;super(_0x4b7ebf(0x2eb)+_0x290a88+'@'+_0x50e7f8,_0x4b7ebf(0x25d),{'type':_0x290a88,'key':_0x50e7f8,'errors':_0x4fc8ae}),this[_0x4b7ebf(0x4f9)]='OKDBSchemaValidationError',this['type']=_0x290a88,this[_0x4b7ebf(0x47f)]=_0x50e7f8,this[_0x4b7ebf(0x511)]=_0x4fc8ae;}}class _0x5bd637 extends _0xfc62a2{constructor(_0x10ce46,_0xb764c5){const _0x381a97=_0x4c4a;super(_0x381a97(0x671)+_0x10ce46+':\x20'+_0xb764c5[_0x381a97(0x6ad)]+_0x381a97(0x3f1),'SCHEMA_COLLECTION_INVALID',{'type':_0x10ce46,'failures':_0xb764c5}),this[_0x381a97(0x4f9)]=_0x381a97(0x580),this[_0x381a97(0x4fa)]=_0x10ce46,this['failures']=_0xb764c5;}}class _0x5a38ad extends _0xfc62a2{constructor(_0x12a71d,_0xe6d4a0,_0x2d3cc5,_0x1345d3,_0x4fcdcc){const _0x399087=_0x4c4a;super(_0x399087(0x643)+_0x12a71d+'@'+_0xe6d4a0+'.'+_0x2d3cc5+_0x399087(0x371)+_0x1345d3+'@'+_0x4fcdcc+_0x399087(0x85f),_0x399087(0x84c),{'sourceType':_0x12a71d,'sourceKey':_0xe6d4a0,'fieldPath':_0x2d3cc5,'targetType':_0x1345d3,'targetKey':_0x4fcdcc}),this[_0x399087(0x4f9)]=_0x399087(0x87a),this[_0x399087(0x2b4)]=_0x12a71d,this[_0x399087(0x3d0)]=_0xe6d4a0,this[_0x399087(0x4c2)]=_0x2d3cc5,this[_0x399087(0x6a2)]=_0x1345d3,this[_0x399087(0x262)]=_0x4fcdcc;}}class _0x303f47 extends _0xfc62a2{constructor(_0x10d46a,_0x7ad9a4,_0x1beecb){const _0x1656f6=_0x4c4a;super(_0x1656f6(0x45b)+_0x10d46a+'@'+_0x7ad9a4+':\x20'+_0x1beecb[_0x1656f6(0x6ad)]+'\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict',_0x1656f6(0x837),{'targetType':_0x10d46a,'targetKey':_0x7ad9a4,'references':_0x1beecb}),this[_0x1656f6(0x4f9)]=_0x1656f6(0x718),this[_0x1656f6(0x6a2)]=_0x10d46a,this[_0x1656f6(0x262)]=_0x7ad9a4,this[_0x1656f6(0x64e)]=_0x1beecb;}}class _0x5da0f5 extends _0xfc62a2{constructor(_0x223f36,_0x488fda,_0x376185){const _0x48fd82=_0x4c4a;super('Index\x20\x22'+_0x488fda+_0x48fd82(0x560)+_0x223f36+_0x48fd82(0x2b7)+_0x376185['map'](_0x555a35=>_0x555a35['kind']+':'+_0x555a35[_0x48fd82(0x4f9)])[_0x48fd82(0x1c9)](',\x20'),_0x48fd82(0x419),{'type':_0x223f36,'index':_0x488fda,'usedBy':_0x376185}),this[_0x48fd82(0x4f9)]=_0x48fd82(0x888);}}return okdbError={'OKDBError':_0xfc62a2,'OKDBVersionMismatchError':_0x575ebc,'OKDBNotFoundError':_0x5ecc3c,'OKDBAlreadyExistsError':_0x35a792,'OKDBInvalidIndexKeyError':_0x7cd4d7,'OKDBInvalidPrimaryKeyError':_0x526f38,'OKDBTypeNotRegisteredError':_0x2708c5,'OKDBTypeAlreadyRegisteredError':_0x46fe48,'OKDBIndexNotRegisteredError':_0x54043b,'OKDBIndexAlreadyRegisteredError':_0x1beaa7,'OKDBInvalidValueError':_0x18590c,'OKDBUniqueConstraintError':_0x40145c,'OKDBSchemaValidationError':_0x4b2d7f,'OKDBSchemaCollectionError':_0x5bd637,'OKDBForeignKeyError':_0x5a38ad,'OKDBForeignKeyDeleteError':_0x303f47,'OKDBIndexHasConsumersError':_0x5da0f5},okdbError;}var hasRequiredOkdbMigrate;function requireOkdbMigrate(){const _0x3060a9=_0x1a2e0d;if(hasRequiredOkdbMigrate)return okdbMigrate['exports'];hasRequiredOkdbMigrate=0x1;const _0x4258d2=require$$0$1,_0xcfd171=require$$1,_0x2d389b=require$$2,{OKDBError:_0x3b8dd4}=requireOkdbError(),_0x396603='header',_0x3e42bd='env',_0x33355c=_0x3060a9(0x2b6),_0x596a51=_0x3060a9(0x2a3),_0x2c7ce0=_0x3060a9(0x6af),_0x1201a6=0x1f4,_0x3916ec=0x3e8,_0x39d426=_0x3060a9(0x460);async function _0x23bb79(_0x4b7bd3,_0xa0f27a,_0x3567bb,_0x31d0a7){const _0x388bd3=_0x3060a9;if(_0x4b7bd3){await _0x4b7bd3[_0x388bd3(0x7b4)](_0x3567bb,Boolean(_0x31d0a7));return;}const _0x5200d4=_0x2d389b[_0x388bd3(0x5f0)](_0xa0f27a,{'readOnly':!![],'maxDbs':0x8});try{await _0x5200d4[_0x388bd3(0x7b4)](_0x3567bb,Boolean(_0x31d0a7));}finally{await _0x5200d4[_0x388bd3(0x6e0)]();}}const _0xf599fc=()=>new Promise(_0x108642=>setImmediate(_0x108642));function _0x252baa(_0x3975b1,_0x4d3b71){if(_0x3975b1['write'](_0x4d3b71))return Promise['resolve']();return new Promise((_0x2b41e5,_0x4ca65e)=>{const _0x792aeb=_0x4c4a,_0x76a10f=_0x2944d9=>{const _0x4e31bd=_0x4c4a;_0x3975b1[_0x4e31bd(0x804)]?.(_0x4e31bd(0x66e),_0x422410),_0x3975b1[_0x4e31bd(0x804)]?.(_0x4e31bd(0x6cd),_0x29d7fd),_0x3975b1[_0x4e31bd(0x804)]?.(_0x4e31bd(0x6e0),_0x2717f8);if(_0x2944d9)_0x4ca65e(_0x2944d9);else _0x2b41e5();},_0x422410=()=>_0x76a10f(),_0x29d7fd=_0x3fecb0=>_0x76a10f(_0x3fecb0),_0x2717f8=()=>_0x76a10f(new Error(_0x792aeb(0x533)));_0x3975b1[_0x792aeb(0x898)](_0x792aeb(0x66e),_0x422410),_0x3975b1['once']('error',_0x29d7fd),_0x3975b1[_0x792aeb(0x898)](_0x792aeb(0x6e0),_0x2717f8);});}async function _0x5902dd(_0x1893b5,_0x2242fa,_0x3bb590){const _0x1a313b=_0x3060a9;let _0x279864=0x0,_0x2a6444,_0x4e2273=!![];for(;;){const _0x31dc43={'snapshot':!![],'limit':_0x3916ec};!_0x4e2273&&(_0x31dc43[_0x1a313b(0x398)]=_0x2a6444,_0x31dc43['exclusiveStart']=!![]);_0x4e2273=![];const _0x3b096d=Array[_0x1a313b(0x215)](_0x2242fa['getRange'](_0x31dc43));if(_0x3b096d[_0x1a313b(0x6ad)]===0x0)break;let _0x2d1750='';for(const _0x184c1b of _0x3b096d)_0x2d1750+=_0x3bb590(_0x184c1b)+'\x0a';_0x2a6444=_0x3b096d[_0x3b096d['length']-0x1][_0x1a313b(0x47f)],_0x279864+=_0x3b096d['length'],await _0x252baa(_0x1893b5,_0x2d1750);if(_0x3b096d['length']<_0x3916ec)break;await _0xf599fc();}return _0x279864;}class _0x1dfedf{constructor(_0x39a82a){this['okdb']=_0x39a82a;}['_resolveEnv'](_0x1f39f4=_0x3060a9(0x7eb)){const _0x189ff3=_0x3060a9;return this['okdb'][_0x189ff3(0x787)](_0x1f39f4);}async[_0x3060a9(0x1d3)](_0x42c1a0=_0x3060a9(0x7eb)){const _0x139587=_0x3060a9;return!this[_0x139587(0x58a)][_0x139587(0x41e)][_0x139587(0x2ad)](_0x42c1a0)&&await this['okdb'][_0x139587(0x2d2)](_0x42c1a0,{'sync':!![]}),this[_0x139587(0x58a)][_0x139587(0x787)](_0x42c1a0);}[_0x3060a9(0x346)](_0x4a704b,_0x50d466){const _0x243f96=_0x3060a9,_0x19aaaa=[..._0x4a704b[_0x243f96(0x788)]['getKeys']()][_0x243f96(0x542)](_0xe01d29=>!_0xe01d29[_0x243f96(0x579)]('~')&&!_0xe01d29[_0x243f96(0x579)](_0x243f96(0x2d9)));if(!_0x50d466)return _0x19aaaa;return _0x19aaaa[_0x243f96(0x542)](_0x53e8c5=>_0x50d466['includes'](_0x53e8c5));}[_0x3060a9(0x505)](_0x4a5899,_0x425468){const _0x4949f5=_0x3060a9,_0x456ebb=_0x4a5899[_0x4949f5(0x321)][_0x4949f5(0x2fa)](_0x425468),_0xafce54=_0x4a5899[_0x4949f5(0x788)]['get'](_0x425468)||{},_0x1279d9=[];for(const [,_0x48ea2f]of _0x456ebb?.[_0x4949f5(0x2b3)]??new Map()){const _0x214ebe={'fields':_0x48ea2f[_0x4949f5(0x287)]};if(_0x48ea2f[_0x4949f5(0x7d5)])_0x214ebe['geo']=_0x48ea2f[_0x4949f5(0x7d5)];if(_0x48ea2f[_0x4949f5(0x88c)])_0x214ebe[_0x4949f5(0x88c)]=!![];_0x1279d9['push'](_0x214ebe);}const _0x3dc11a={};for(const [_0x1ef879,_0x4da2af]of Object[_0x4949f5(0x87f)](_0xafce54[_0x4949f5(0x70d)]||{})){_0x3dc11a[_0x1ef879]={'fields':_0x4da2af[_0x4949f5(0x38b)]?.[_0x4949f5(0x53f)],'tokenizer':_0x4da2af['config']?.['tokenizer']};}const _0x3514d3={'indexes':_0x1279d9,'ftsIndexes':_0x3dc11a};return _0xafce54[_0x4949f5(0x2b6)]&&(_0x3514d3[_0x4949f5(0x2b6)]=_0xafce54[_0x4949f5(0x2b6)]),_0x3514d3;}async['exportToStream'](_0x489431,_0x17b7c5={}){const _0x13ae8e=_0x3060a9,{envName:envName='default',types:types=null,includeChanges:includeChanges=![],_noHeader:_noHeader=![]}=_0x17b7c5,_0x1a177a=this[_0x13ae8e(0x801)](envName),_0x1959cf=this[_0x13ae8e(0x346)](_0x1a177a,types);let _0x3bfa75=0x0,_0x5a805c=0x0;!_noHeader&&await _0x252baa(_0x489431,JSON['stringify']({'r':_0x396603,'kdbVersion':require$$3[_0x13ae8e(0x598)],'exportedAt':Date['now'](),'envName':envName})+'\x0a');for(const _0x213b29 of _0x1959cf){const _0x1416b5=_0x1a177a[_0x13ae8e(0x321)][_0x13ae8e(0x2fa)](_0x213b29);if(!_0x1416b5)continue;const _0x3bcc68=this['_typeSchema'](_0x1a177a,_0x213b29);await _0x252baa(_0x489431,JSON[_0x13ae8e(0x2d1)]({'r':_0x33355c,'type':_0x213b29,..._0x3bcc68})+'\x0a'),_0x3bfa75+=await _0x5902dd(_0x489431,_0x1416b5['data'],({key:_0x4ebd38,value:_0x57dadc,version:_0x2e4972})=>JSON[_0x13ae8e(0x2d1)]({'r':_0x596a51,'t':_0x213b29,'k':_0x4ebd38,'v':_0x57dadc,'ver':_0x2e4972}));}return includeChanges&&_0x1a177a[_0x13ae8e(0x6f6)]&&(_0x5a805c=await _0x5902dd(_0x489431,_0x1a177a[_0x13ae8e(0x3ce)],({key:_0x1ec2ce,value:_0x439127})=>JSON[_0x13ae8e(0x2d1)]({'r':_0x2c7ce0,'clock':_0x1ec2ce,'event':_0x439127}))),{'types':_0x1959cf['length'],'records':_0x3bfa75,'changes':_0x5a805c};}async[_0x3060a9(0x7e3)](_0x45d108,_0x34ae38={}){const _0x210532=_0x3060a9;_0x4258d2[_0x210532(0x51a)](_0xcfd171[_0x210532(0x836)](_0x45d108),{'recursive':!![]});const _0x717737=_0x4258d2[_0x210532(0x608)](_0x45d108),_0x118c12=await this['exportToStream'](_0x717737,_0x34ae38);return await new Promise((_0x301c6d,_0x3d2103)=>{const _0x1a5afe=_0x210532;_0x717737[_0x1a5afe(0x63d)](),_0x717737['once'](_0x1a5afe(0x7f5),_0x301c6d),_0x717737['once'](_0x1a5afe(0x6cd),_0x3d2103);}),{..._0x118c12,'filePath':_0x45d108};}async['exportEnvsToStream'](_0x12a4dc,_0x1072ef={}){const _0x32b081=_0x3060a9,{envNames:envNames=null,types:types=null,includeChanges:includeChanges=![]}=_0x1072ef,_0x49987e=[...this[_0x32b081(0x58a)][_0x32b081(0x41e)][_0x32b081(0x818)]()]['filter'](_0x59031e=>!_0x59031e[_0x32b081(0x579)]('~')),_0x16893c=envNames?_0x49987e[_0x32b081(0x542)](_0x83e418=>envNames[_0x32b081(0x1a1)](_0x83e418)):_0x49987e;await _0x252baa(_0x12a4dc,JSON[_0x32b081(0x2d1)]({'r':_0x396603,'kdbVersion':require$$3['version'],'exportedAt':Date[_0x32b081(0x4ec)](),'envNames':_0x16893c})+'\x0a');let _0xf02a28=0x0,_0x385cdc=0x0,_0x4d1d65=0x0;for(const _0x5c030e of _0x16893c){await _0x252baa(_0x12a4dc,JSON[_0x32b081(0x2d1)]({'r':_0x3e42bd,'name':_0x5c030e})+'\x0a');const _0x3c3422=await this[_0x32b081(0x1e8)](_0x12a4dc,{'envName':_0x5c030e,'types':types,'includeChanges':includeChanges,'_noHeader':!![]});_0xf02a28+=_0x3c3422['types'],_0x385cdc+=_0x3c3422[_0x32b081(0x333)],_0x4d1d65+=_0x3c3422[_0x32b081(0x330)];}return{'envs':_0x16893c[_0x32b081(0x6ad)],'types':_0xf02a28,'records':_0x385cdc,'changes':_0x4d1d65};}async[_0x3060a9(0x2c5)](_0x534354,_0x3c3f51={}){const _0x457f02=_0x3060a9,{envName:_0xf6e73b=null,types:_0x250812=null,dropExisting:dropExisting=![],batchSize:batchSize=_0x1201a6,includeChanges:includeChanges=![],onProgress:onProgress=null}=_0x3c3f51;let _0x1507e7=_0xf6e73b??_0x457f02(0x7eb),_0x3f7d55=null,_0x4b05e5=0x0,_0x130387=0x0,_0x19e7d0=0x0,_0x36da0e=null,_0x4a5ee1=[];const _0x21918a=[],_0x5813ad=async()=>{const _0x49b454=_0x457f02;if(!_0x4a5ee1[_0x49b454(0x6ad)]||!_0x36da0e||!_0x3f7d55)return;await _0x3f7d55[_0x49b454(0x863)][_0x49b454(0x826)](()=>{const _0x2e644d=_0x49b454;for(const {k:_0x234289,v:_0x49dcfc,ver:_0x287693}of _0x4a5ee1){_0x3f7d55[_0x2e644d(0x619)](null,_0x36da0e,_0x234289,_0x49dcfc,{'version':_0x287693,'origin':_0x2e644d(0x7af)});}}),_0x130387+=_0x4a5ee1[_0x49b454(0x6ad)],onProgress?.({'type':_0x36da0e,'count':_0x130387}),_0x4a5ee1=[];};await this[_0x457f02(0x88e)](_0x534354,async _0x195b86=>{const _0x4f1148=_0x457f02,_0x206c44=_0x195b86['r'];if(_0x206c44===_0x396603){if(!_0xf6e73b&&_0x195b86[_0x4f1148(0x72a)])_0x1507e7=_0x195b86[_0x4f1148(0x72a)];_0x3f7d55=await this[_0x4f1148(0x1d3)](_0x1507e7);return;}if(!_0x3f7d55)_0x3f7d55=await this[_0x4f1148(0x1d3)](_0x1507e7);if(_0x206c44===_0x3e42bd){await _0x5813ad(),_0x36da0e=null,_0x1507e7=_0xf6e73b??_0x195b86['name'],_0x3f7d55=await this[_0x4f1148(0x1d3)](_0x1507e7);return;}if(_0x206c44===_0x33355c){const {type:_0x284afe,indexes:indexes=[],ftsIndexes:ftsIndexes={},schema:_0x48cea7}=_0x195b86;if(_0x250812&&!_0x250812['includes'](_0x284afe))return;await _0x5813ad(),_0x36da0e=_0x284afe;dropExisting&&_0x3f7d55[_0x4f1148(0x6f1)](_0x284afe)&&await _0x3f7d55[_0x4f1148(0x38d)](_0x284afe);!_0x3f7d55[_0x4f1148(0x6f1)](_0x284afe)&&(await _0x3f7d55[_0x4f1148(0x2ba)](_0x284afe),_0x4b05e5++);for(const _0xa67b77 of indexes){if(!_0x3f7d55[_0x4f1148(0x726)](_0x284afe,_0xa67b77['fields'])){const _0x11dec0={};_0xa67b77[_0x4f1148(0x828)]&&(_0x11dec0['type']=_0x4f1148(0x828),_0x11dec0['precision']=_0xa67b77[_0x4f1148(0x828)][_0x4f1148(0x592)]);if(_0xa67b77[_0x4f1148(0x88c)])_0x11dec0[_0x4f1148(0x88c)]=!![];await _0x3f7d55[_0x4f1148(0x3de)](_0x284afe,_0xa67b77[_0x4f1148(0x53f)],_0x11dec0);}}for(const [_0x2aea31,_0x38276b]of Object[_0x4f1148(0x87f)](ftsIndexes)){!this[_0x4f1148(0x58a)][_0x4f1148(0x659)][_0x4f1148(0x2ad)](_0x284afe,_0x2aea31,_0x3f7d55)&&await this[_0x4f1148(0x58a)][_0x4f1148(0x659)][_0x4f1148(0x661)](_0x284afe,_0x2aea31,{'fields':_0x38276b[_0x4f1148(0x53f)],'tokenizer':_0x38276b['tokenizer']},undefined,_0x3f7d55);}_0x48cea7?.['definition']&&_0x21918a['push']({'env':_0x3f7d55,'type':_0x284afe,'schema':_0x48cea7});return;}if(_0x206c44===_0x596a51){if(_0x250812&&!_0x250812['includes'](_0x195b86['t']))return;_0x195b86['t']!==_0x36da0e&&(await _0x5813ad(),_0x36da0e=_0x195b86['t']);_0x4a5ee1[_0x4f1148(0x557)]({'k':_0x195b86['k'],'v':_0x195b86['v'],'ver':_0x195b86[_0x4f1148(0x85e)]});if(_0x4a5ee1[_0x4f1148(0x6ad)]>=batchSize)await _0x5813ad();return;}_0x206c44===_0x2c7ce0&&includeChanges&&_0x3f7d55['_sync']&&(_0x3f7d55['clockToChangeDb'][_0x4f1148(0x422)](_0x195b86[_0x4f1148(0x21b)],_0x195b86[_0x4f1148(0x698)]),_0x19e7d0++);}),await _0x5813ad();for(const {env:_0x1499b4,type:_0x555b34,schema:_0x34091c}of _0x21918a){try{await _0x1499b4[_0x457f02(0x626)](_0x555b34,_0x34091c);}catch{if(_0x34091c[_0x457f02(0x285)])try{await _0x1499b4['setSchema'](_0x555b34,{..._0x34091c,'enforce':![]});}catch{}}}return{'types':_0x4b05e5,'records':_0x130387,'changes':_0x19e7d0};}async['importFromFile'](_0x3f68e4,_0x53f931={}){const _0x18ce1d=_0x3060a9,_0xc80c71=_0x4258d2[_0x18ce1d(0x40b)](_0x3f68e4,{'encoding':_0x18ce1d(0x88a)});return this[_0x18ce1d(0x2c5)](_0xc80c71,_0x53f931);}[_0x3060a9(0x88e)](_0x566035,_0x4ecbcc){return new Promise((_0x5d8565,_0x3d9438)=>{const _0x46b835=_0x4c4a;let _0x310cca='',_0x32a479=Promise[_0x46b835(0x8c2)]();const _0x47a7ad=async _0x522190=>{const _0x2aaf4c=_0x46b835;_0x310cca+=_0x522190;const _0x5057ca=_0x310cca[_0x2aaf4c(0x84e)]('\x0a');_0x310cca=_0x5057ca['pop']();for(const _0x4242ab of _0x5057ca){const _0x41de41=_0x4242ab[_0x2aaf4c(0x48b)]();if(!_0x41de41)continue;let _0x4a94c0;try{_0x4a94c0=JSON[_0x2aaf4c(0x7d3)](_0x41de41);}catch{continue;}await _0x4ecbcc(_0x4a94c0);}};_0x566035['on'](_0x46b835(0x2a3),_0x216e86=>{_0x32a479=_0x32a479['then'](()=>_0x47a7ad(String(_0x216e86)));}),_0x566035['on']('end',()=>{const _0x4114ff=_0x46b835;_0x32a479[_0x4114ff(0x4ed)](async()=>{const _0x1429a2=_0x4114ff,_0xaddc13=_0x310cca[_0x1429a2(0x48b)]();if(_0xaddc13)try{await _0x4ecbcc(JSON[_0x1429a2(0x7d3)](_0xaddc13));}catch{}_0x5d8565();})[_0x4114ff(0x39e)](_0x3d9438);}),_0x566035['on'](_0x46b835(0x6cd),_0x3d9438);});}async[_0x3060a9(0x7b4)](_0x5a1dd1,_0x4ae229={}){const _0x173125=_0x3060a9,{envNames:envNames=null,compact:compact=!![]}=_0x4ae229,_0x3fbe3e=this[_0x173125(0x58a)],_0x2982f6=_0xcfd171['resolve'](_0x3fbe3e[_0x173125(0x5be)]),_0x3817aa=_0xcfd171[_0x173125(0x8c2)](_0x5a1dd1),_0x3168e1=_0xcfd171[_0x173125(0x673)](_0x2982f6,_0x3817aa);if(_0x3168e1===''||!(_0x3168e1[_0x173125(0x579)]('..')||_0xcfd171[_0x173125(0x6f4)](_0x3168e1)))throw new _0x3b8dd4('backup\x20destination\x20\x22'+_0x3817aa+_0x173125(0x602)+_0x2982f6+_0x173125(0x6dc),_0x173125(0x49d));if(_0x4258d2['existsSync'](_0x3817aa)&&_0x4258d2[_0x173125(0x859)](_0x3817aa)[_0x173125(0x6ad)]>0x0)throw new _0x3b8dd4(_0x173125(0x651)+_0x3817aa+'\x22\x20is\x20not\x20empty\x20—\x20backups\x20never\x20overwrite;\x20choose\x20a\x20new\x20directory',_0x173125(0x6aa));_0x4258d2[_0x173125(0x51a)](_0x3817aa,{'recursive':!![]});const _0x420420=envNames?new Set([...envNames,_0x173125(0x7a6)]):null,_0x5c74e6=[],_0x1b24e1=[],_0x4fbdf9=[];for(const [_0x4a10f9,_0x533b51]of[..._0x3fbe3e['_envs'][_0x173125(0x87f)]()]){if(_0x420420&&!_0x420420[_0x173125(0x2ad)](_0x4a10f9))continue;if(_0x4a10f9==='~processes')continue;if(!_0x533b51[_0x173125(0x841)]||!_0x533b51['db']){_0x1b24e1['push']({'name':_0x4a10f9,'reason':_0x173125(0x229)});continue;}const _0x1bf5a3=_0xcfd171[_0x173125(0x8c2)](_0x533b51['path']),_0x296378=_0xcfd171[_0x173125(0x673)](_0x2982f6,_0x1bf5a3),_0x395fa3=_0x296378===''||_0x296378['startsWith']('..')||_0xcfd171[_0x173125(0x6f4)](_0x296378),_0x5b1731=_0x395fa3?_0x3fbe3e[_0x173125(0x616)](_0x4a10f9):_0x296378,_0x455dcf=_0xcfd171['join'](_0x3817aa,_0x5b1731);_0x4258d2[_0x173125(0x51a)](_0x455dcf,{'recursive':!![]});const _0x537459=_0xcfd171[_0x173125(0x1c9)](_0x1bf5a3,_0x173125(0x6a1));let _0x12536d=![];if(_0x4258d2[_0x173125(0x5b6)](_0xcfd171[_0x173125(0x1c9)](_0x537459,_0x173125(0x463)))){const _0x5bddf5=_0xcfd171[_0x173125(0x1c9)](_0x455dcf,'time-machine');_0x4258d2[_0x173125(0x51a)](_0x5bddf5,{'recursive':!![]}),await _0x23bb79(_0x533b51[_0x173125(0x510)]?.[_0x173125(0x478)]?.['db'],_0x537459,_0x5bddf5,compact),_0x12536d=!![];}let _0x4ce284=0x0;try{_0x4ce284=_0x4258d2[_0x173125(0x883)](_0xcfd171['join'](_0x1bf5a3,'data.mdb'))[_0x173125(0x7d1)];}catch{}await _0x533b51['db'][_0x173125(0x7b4)](_0x455dcf,Boolean(compact));let _0x2141be=0x0;try{_0x2141be=_0x4258d2['statSync'](_0xcfd171[_0x173125(0x1c9)](_0x455dcf,_0x173125(0x463)))[_0x173125(0x7d1)];}catch{}_0x5c74e6[_0x173125(0x557)]({'name':_0x4a10f9,'dest':_0x455dcf,'sizeBefore':_0x4ce284,'sizeAfter':_0x2141be,'timeMachine':_0x12536d}),_0x4fbdf9['push']({'name':_0x4a10f9,'dir':_0x5b1731,'timeMachine':_0x12536d,..._0x395fa3?{'outOfTree':_0x395fa3,'sourcePath':_0x1bf5a3}:{}});}for(const [_0x567ff5,_0x4c705b]of _0x3fbe3e[_0x173125(0x59d)]??[]){if(_0x420420&&!_0x420420[_0x173125(0x2ad)](_0x567ff5))continue;_0x1b24e1[_0x173125(0x557)]({'name':_0x567ff5,'reason':'quarantined:\x20'+(_0x4c705b?.[_0x173125(0x6cd)]??_0x173125(0x555))});}const _0x5032a1={'count':0x0,'bytes':0x0},_0x419e26=_0x3fbe3e[_0x173125(0x2a1)]?.[_0x173125(0x806)];_0x419e26&&_0x4258d2[_0x173125(0x5b6)](_0x419e26)&&await this['_copyDir'](_0x419e26,_0xcfd171[_0x173125(0x1c9)](_0x3817aa,_0x173125(0x1b4)),_0x5032a1,(_0x15638a,_0x39ec19)=>_0x39ec19===0x0&&_0x15638a==='tmp');const _0x17d804=_0xcfd171[_0x173125(0x1c9)](_0x3817aa,_0x39d426),_0x174ecc={'format':0x1,'okdbVersion':require$$3['version'],'createdAt':new Date()['toISOString'](),'source':_0x2982f6,'compact':Boolean(compact),'envs':_0x4fbdf9,'blobs':_0x5032a1,'skipped':_0x1b24e1,'excluded':{'~fts':_0x173125(0x840),'~processes':_0x173125(0x3ee)}};return _0x4258d2[_0x173125(0x497)](_0x17d804,JSON[_0x173125(0x2d1)](_0x174ecc,null,0x2)+'\x0a'),{'ok':!![],'dest':_0x3817aa,'envs':_0x5c74e6,'blobs':_0x5032a1,'skipped':_0x1b24e1,'manifest':_0x17d804};}[_0x3060a9(0x59a)](){const _0x1cc96a=_0x3060a9,_0x1ec5ec=this['okdb']['options']?.[_0x1cc96a(0x7b4)]?.[_0x1cc96a(0x36c)];if(_0x1ec5ec)return _0xcfd171[_0x1cc96a(0x8c2)](_0x1ec5ec);const _0x466c3d=_0xcfd171[_0x1cc96a(0x8c2)](this[_0x1cc96a(0x58a)][_0x1cc96a(0x5be)]);return _0xcfd171[_0x1cc96a(0x1c9)](_0xcfd171[_0x1cc96a(0x836)](_0x466c3d),_0xcfd171[_0x1cc96a(0x778)](_0x466c3d)+_0x1cc96a(0x637));}[_0x3060a9(0x518)](_0x6a5d5d){const _0x46b445=_0x3060a9,_0x557afa=this[_0x46b445(0x59a)]();_0x4258d2[_0x46b445(0x51a)](_0x557afa,{'recursive':!![]});const _0x4b4347=_0x4258d2[_0x46b445(0x750)](_0x557afa),_0x50ee3e=_0x6a5d5d==null||String(_0x6a5d5d)[_0x46b445(0x48b)]()===''?'okdb-backup-'+new Date()[_0x46b445(0x611)]()[_0x46b445(0x813)](/[:.]/g,'-'):String(_0x6a5d5d)[_0x46b445(0x48b)](),_0x517981=_0xcfd171[_0x46b445(0x8c2)](_0x557afa,_0x50ee3e);let _0x2bf72f=_0x517981;const _0x174094=[];while(!_0x4258d2[_0x46b445(0x5b6)](_0x2bf72f)){_0x174094['unshift'](_0xcfd171[_0x46b445(0x778)](_0x2bf72f));const _0x149d0f=_0xcfd171[_0x46b445(0x836)](_0x2bf72f);if(_0x149d0f===_0x2bf72f)break;_0x2bf72f=_0x149d0f;}const _0xa26883=_0xcfd171[_0x46b445(0x1c9)](_0x4258d2[_0x46b445(0x750)](_0x2bf72f),..._0x174094),_0x10ffe5=_0xcfd171[_0x46b445(0x673)](_0x4b4347,_0xa26883);if(_0x10ffe5===''||_0x10ffe5[_0x46b445(0x579)]('..')||_0xcfd171[_0x46b445(0x6f4)](_0x10ffe5))throw new _0x3b8dd4(_0x46b445(0x651)+_0x50ee3e+_0x46b445(0x3fe)+_0x557afa+_0x46b445(0x617),_0x46b445(0x584),{'root':_0x557afa,'destDir':_0x50ee3e});return{'root':_0x557afa,'dest':_0xa26883};}async['_copyDir'](_0x554158,_0x1fefe7,_0x27a0a5={'count':0x0,'bytes':0x0},_0x2886b5=null,_0x2cffc3=0x0){const _0x1d833f=_0x3060a9;_0x4258d2[_0x1d833f(0x51a)](_0x1fefe7,{'recursive':!![]});for(const _0x31af24 of _0x4258d2[_0x1d833f(0x859)](_0x554158,{'withFileTypes':!![]})){if(_0x2886b5?.(_0x31af24[_0x1d833f(0x4f9)],_0x2cffc3))continue;const _0x51264e=_0xcfd171[_0x1d833f(0x1c9)](_0x554158,_0x31af24[_0x1d833f(0x4f9)]),_0x2f87f5=_0xcfd171[_0x1d833f(0x1c9)](_0x1fefe7,_0x31af24['name']);if(_0x31af24[_0x1d833f(0x834)]())await this[_0x1d833f(0x67d)](_0x51264e,_0x2f87f5,_0x27a0a5,_0x2886b5,_0x2cffc3+0x1);else{try{await _0x4258d2['promises']['copyFile'](_0x51264e,_0x2f87f5);}catch(_0x2690a1){if(_0x2690a1?.[_0x1d833f(0x2dc)]==='ENOENT')continue;throw _0x2690a1;}_0x27a0a5[_0x1d833f(0x430)]++;try{_0x27a0a5['bytes']+=_0x4258d2[_0x1d833f(0x883)](_0x2f87f5)[_0x1d833f(0x7d1)];}catch{}}}return _0x27a0a5;}async[_0x3060a9(0x678)](_0x5082e8={}){const _0x3f1490=_0x3060a9,{envName:envName=_0x3f1490(0x7eb),types:types=null,includeChanges:includeChanges=![]}=_0x5082e8,_0x3cec73={'types':{},'changes':[]},_0x354ded=[],_0x534580=new require$$5['Writable']({'write'(_0x4475c4,_0x5a1d31,_0x498e21){const _0x1f3380=_0x3f1490;_0x354ded[_0x1f3380(0x557)](String(_0x4475c4)),_0x498e21();}});await this['exportToStream'](_0x534580,{'envName':envName,'types':types,'includeChanges':includeChanges});for(const _0x1a289f of _0x354ded[_0x3f1490(0x1c9)]('')[_0x3f1490(0x84e)]('\x0a')){const _0x5e4d20=_0x1a289f[_0x3f1490(0x48b)]();if(!_0x5e4d20)continue;let _0x184858;try{_0x184858=JSON[_0x3f1490(0x7d3)](_0x5e4d20);}catch{continue;}if(_0x184858['r']===_0x33355c){if(!_0x3cec73[_0x3f1490(0x427)][_0x184858[_0x3f1490(0x4fa)]])_0x3cec73[_0x3f1490(0x427)][_0x184858[_0x3f1490(0x4fa)]]={'entries':[]};if(_0x184858[_0x3f1490(0x261)])_0x3cec73[_0x3f1490(0x427)][_0x184858[_0x3f1490(0x4fa)]][_0x3f1490(0x261)]=_0x184858[_0x3f1490(0x261)];if(_0x184858[_0x3f1490(0x70d)])_0x3cec73['types'][_0x184858[_0x3f1490(0x4fa)]][_0x3f1490(0x70d)]=_0x184858[_0x3f1490(0x70d)];if(_0x184858[_0x3f1490(0x2b6)])_0x3cec73['types'][_0x184858[_0x3f1490(0x4fa)]]['schema']=_0x184858[_0x3f1490(0x2b6)];}else{if(_0x184858['r']===_0x596a51){if(!_0x3cec73[_0x3f1490(0x427)][_0x184858['t']])_0x3cec73[_0x3f1490(0x427)][_0x184858['t']]={'entries':[]};_0x3cec73[_0x3f1490(0x427)][_0x184858['t']]['entries'][_0x3f1490(0x557)]({'key':_0x184858['k'],'value':_0x184858['v'],'version':_0x184858['ver']});}else _0x184858['r']===_0x2c7ce0&&_0x3cec73[_0x3f1490(0x330)][_0x3f1490(0x557)]({'clock':_0x184858[_0x3f1490(0x21b)],'event':_0x184858['event']});}}return _0x3cec73;}async[_0x3060a9(0x7af)](_0x826cd6,_0x53fa74={}){const _0x50d22d=_0x3060a9,_0x248afc=[];for(const [_0x4da8f3,_0x2e258e]of Object[_0x50d22d(0x87f)](_0x826cd6['types']||{})){const _0x27271a={'r':_0x33355c,'type':_0x4da8f3,'indexes':_0x2e258e['indexes']||[],'ftsIndexes':_0x2e258e[_0x50d22d(0x70d)]||{}};if(_0x2e258e[_0x50d22d(0x2b6)])_0x27271a['schema']=_0x2e258e['schema'];_0x248afc[_0x50d22d(0x557)](JSON['stringify'](_0x27271a));for(const {key:_0x30f5ed,value:_0x497f89,version:_0x43beda}of _0x2e258e[_0x50d22d(0x87f)]||[]){_0x248afc['push'](JSON[_0x50d22d(0x2d1)]({'r':_0x596a51,'t':_0x4da8f3,'k':_0x30f5ed,'v':_0x497f89,'ver':_0x43beda}));}}for(const {clock:_0x5dc071,event:_0x16814a}of _0x826cd6[_0x50d22d(0x330)]||[]){_0x248afc[_0x50d22d(0x557)](JSON[_0x50d22d(0x2d1)]({'r':_0x2c7ce0,'clock':_0x5dc071,'event':_0x16814a}));}const {Readable:_0x5a28ef}=require$$5,_0x398be5=_0x5a28ef[_0x50d22d(0x215)](_0x248afc[_0x50d22d(0x1c9)]('\x0a')+'\x0a');return this['importFromStream'](_0x398be5,{..._0x53fa74,'dropExisting':_0x53fa74['dropExisting']??!![]});}async['exportJSON']({pretty:pretty=![]}={}){const _0x3700aa=_0x3060a9,_0x510c6e=await this[_0x3700aa(0x678)]();return JSON[_0x3700aa(0x2d1)](_0x510c6e,null,pretty?0x2:0x0);}async[_0x3060a9(0x867)](_0x48c65b){const _0x2b4087=_0x3060a9,_0x52cd64=JSON[_0x2b4087(0x7d3)](_0x48c65b);return this[_0x2b4087(0x7af)](_0x52cd64);}async[_0x3060a9(0x25e)](_0xf4be53){const _0x2077e4=_0x3060a9;if(!this['okdb'][_0x2077e4(0x2a1)])throw new Error(_0x2077e4(0x1b5));const _0x1780f7=this[_0x2077e4(0x58a)][_0x2077e4(0x2a1)][_0x2077e4(0x806)];let _0x183f0a=0x0,_0x4c92b8=0x0;const _0x1b393d=_0x2c0c2b=>{const _0x466415=_0x2077e4;if(!_0x4258d2[_0x466415(0x5b6)](_0x2c0c2b))return;for(const _0x378bce of _0x4258d2[_0x466415(0x859)](_0x2c0c2b,{'withFileTypes':!![]})){const _0x5a5ba1=_0xcfd171[_0x466415(0x1c9)](_0x2c0c2b,_0x378bce[_0x466415(0x4f9)]);if(_0x378bce[_0x466415(0x834)]()){if(_0x378bce['name']===_0x466415(0x6eb))continue;_0x1b393d(_0x5a5ba1);}else{const _0x2bf84b=_0xcfd171[_0x466415(0x778)](_0xcfd171[_0x466415(0x836)](_0x5a5ba1)),_0x2490ee=_0x2bf84b+_0x378bce[_0x466415(0x4f9)],_0x34dea7=_0xcfd171[_0x466415(0x1c9)](_0xf4be53,_0x2490ee['slice'](0x0,0x2)),_0x2e3373=_0xcfd171['join'](_0x34dea7,_0x2490ee['slice'](0x2));_0x4258d2[_0x466415(0x51a)](_0x34dea7,{'recursive':!![]}),_0x4258d2['copyFileSync'](_0x5a5ba1,_0x2e3373),_0x183f0a++;try{_0x4c92b8+=_0x4258d2['statSync'](_0x5a5ba1)['size'];}catch{}}}};return _0x4258d2[_0x2077e4(0x51a)](_0xf4be53,{'recursive':!![]}),_0x1b393d(_0x1780f7),{'count':_0x183f0a,'bytes':_0x4c92b8};}async[_0x3060a9(0x268)](_0x15d8cd){const _0x517f3c=_0x3060a9;if(!this[_0x517f3c(0x58a)][_0x517f3c(0x2a1)])throw new Error(_0x517f3c(0x1b5));await this[_0x517f3c(0x58a)]['files']['_ensure']();let _0x38a0fb=0x0,_0x38a8ee=0x0;const _0x84d207=_0x5230f4=>{const _0x5e0379=_0x517f3c;if(!_0x4258d2[_0x5e0379(0x5b6)](_0x5230f4))return;for(const _0x5e166d of _0x4258d2[_0x5e0379(0x859)](_0x5230f4,{'withFileTypes':!![]})){const _0x4e6d2b=_0xcfd171[_0x5e0379(0x1c9)](_0x5230f4,_0x5e166d[_0x5e0379(0x4f9)]);if(_0x5e166d[_0x5e0379(0x834)]())_0x84d207(_0x4e6d2b);else{const _0x3beba5=_0xcfd171['basename'](_0xcfd171[_0x5e0379(0x836)](_0x4e6d2b)),_0x3e9b12=_0x3beba5+_0x5e166d[_0x5e0379(0x4f9)],_0xda43ac=this[_0x5e0379(0x58a)]['files'][_0x5e0379(0x23a)](_0x3e9b12);if(_0x4258d2[_0x5e0379(0x5b6)](_0xda43ac)){_0x38a8ee++;continue;}const _0x97fb18=_0xcfd171[_0x5e0379(0x836)](_0xda43ac);_0x4258d2[_0x5e0379(0x51a)](_0x97fb18,{'recursive':!![]}),_0x4258d2[_0x5e0379(0x251)](_0x4e6d2b,_0xda43ac);const _0x3afdb5=this['okdb'][_0x5e0379(0x2a1)]['_countFileRefs'](_0x3e9b12);this[_0x5e0379(0x58a)][_0x5e0379(0x2a1)][_0x5e0379(0x446)]?.[_0x5e0379(0x422)](_0x3e9b12,{'refs':_0x3afdb5}),_0x38a0fb++;}}};return _0x84d207(_0x15d8cd),{'imported':_0x38a0fb,'skipped':_0x38a8ee};}[_0x3060a9(0x6a0)](){const _0x2211fd=_0x3060a9,_0x329025=[];for(const [,_0x43913d]of this[_0x2211fd(0x58a)][_0x2211fd(0x41e)]){if(_0x43913d[_0x2211fd(0x6f6)]&&_0x43913d[_0x2211fd(0x6f1)](_0x2211fd(0x6a5)))_0x329025['push'](_0x43913d);}return _0x329025;}async[_0x3060a9(0x677)](){const _0x46a806=_0x3060a9;if(!this[_0x46a806(0x58a)][_0x46a806(0x2a1)])throw new Error('files\x20feature\x20not\x20available');await this[_0x46a806(0x58a)][_0x46a806(0x2a1)][_0x46a806(0x3cd)]();const _0x466a5c=[],_0x7ccb47=this[_0x46a806(0x58a)][_0x46a806(0x2a1)];for(const _0xac1f51 of this[_0x46a806(0x6a0)]()){for(const {key:_0x100c81,value:_0x53dd2e}of _0xac1f51['getRange'](_0x46a806(0x6a5))){if(!_0x53dd2e[_0x46a806(0x507)])continue;const _0x296b56=_0x7ccb47[_0x46a806(0x23a)](_0x53dd2e[_0x46a806(0x507)]);!_0x4258d2[_0x46a806(0x5b6)](_0x296b56)&&_0x466a5c[_0x46a806(0x557)]({'type':_0x46a806(0x1b1),'env':_0xac1f51[_0x46a806(0x4f9)],'id':String(_0x100c81),'hash':_0x53dd2e[_0x46a806(0x507)],'message':_0x46a806(0x42b)+_0x100c81+'\x22\x20in\x20env\x20\x22'+_0xac1f51[_0x46a806(0x4f9)]+_0x46a806(0x6b3)+_0x53dd2e[_0x46a806(0x507)]['slice'](0x0,0x8)+'…)'});const _0x5cc7d2=_0x7ccb47[_0x46a806(0x446)]?.[_0x46a806(0x2fa)](_0x53dd2e[_0x46a806(0x507)]);(!_0x5cc7d2||_0x5cc7d2['refs']<=0x0)&&_0x466a5c[_0x46a806(0x557)]({'type':_0x46a806(0x833),'env':_0xac1f51['name'],'id':String(_0x100c81),'hash':_0x53dd2e[_0x46a806(0x507)],'message':'Blob\x20ref-count\x20is\x20zero\x20for\x20~files\x20record\x20\x22'+_0x100c81+'\x22\x20in\x20env\x20\x22'+_0xac1f51['name']+_0x46a806(0x6b3)+_0x53dd2e[_0x46a806(0x507)][_0x46a806(0x27f)](0x0,0x8)+'…)'});}}const _0x1efa1d=new Set();for(const _0x22c4b9 of this[_0x46a806(0x6a0)]()){for(const {value:_0x5b0557}of _0x22c4b9[_0x46a806(0x3c9)](_0x46a806(0x6a5))){if(_0x5b0557['hash'])_0x1efa1d[_0x46a806(0x4da)](_0x5b0557[_0x46a806(0x507)]);}}const _0x4381cb=_0x2ba01b=>{const _0x31ea33=_0x46a806;if(!_0x4258d2['existsSync'](_0x2ba01b))return;for(const _0x37b06c of _0x4258d2[_0x31ea33(0x859)](_0x2ba01b,{'withFileTypes':!![]})){const _0x2d2863=_0xcfd171[_0x31ea33(0x1c9)](_0x2ba01b,_0x37b06c[_0x31ea33(0x4f9)]);if(_0x37b06c[_0x31ea33(0x834)]()){if(_0x37b06c[_0x31ea33(0x4f9)]===_0x31ea33(0x6eb))continue;_0x4381cb(_0x2d2863);}else{const _0x5bb85a=_0xcfd171[_0x31ea33(0x778)](_0xcfd171[_0x31ea33(0x836)](_0x2d2863)),_0x59b551=_0x5bb85a+_0x37b06c[_0x31ea33(0x4f9)];!_0x1efa1d[_0x31ea33(0x2ad)](_0x59b551)&&_0x466a5c[_0x31ea33(0x557)]({'type':_0x31ea33(0x61e),'hash':_0x59b551,'message':_0x31ea33(0x1fe)+_0x59b551['slice'](0x0,0x8)+'…)'});}}};return _0x4381cb(_0x7ccb47[_0x46a806(0x806)]),_0x466a5c;}async[_0x3060a9(0x343)](){const _0x3c5259=_0x3060a9;if(!this[_0x3c5259(0x58a)][_0x3c5259(0x2a1)])throw new Error(_0x3c5259(0x1b5));await this[_0x3c5259(0x58a)][_0x3c5259(0x2a1)][_0x3c5259(0x3cd)]();const _0x4f6e17=this[_0x3c5259(0x58a)][_0x3c5259(0x2a1)]['_blobStatusDb'];if(!_0x4f6e17)throw new Error(_0x3c5259(0x4c0));const _0x59d7d9=[];for(const {key:_0x10808d}of _0x4f6e17['getRange']())_0x59d7d9[_0x3c5259(0x557)](_0x10808d);for(const _0x1ce08e of _0x59d7d9)_0x4f6e17[_0x3c5259(0x8a6)](_0x1ce08e);const _0x7a4079=new Map();for(const _0x3b602e of this[_0x3c5259(0x6a0)]()){for(const {value:_0x516bf7}of _0x3b602e['getRange']('~files')){_0x516bf7[_0x3c5259(0x507)]&&_0x7a4079[_0x3c5259(0x259)](_0x516bf7['hash'],(_0x7a4079[_0x3c5259(0x2fa)](_0x516bf7[_0x3c5259(0x507)])??0x0)+0x1);}}for(const [_0x578a67,_0x494fc3]of _0x7a4079){_0x4f6e17[_0x3c5259(0x422)](_0x578a67,{'refs':_0x494fc3});}return{'rebuilt':_0x7a4079[_0x3c5259(0x7d1)]};}}return okdbMigrate[_0x3060a9(0x7ac)]=_0x1dfedf,okdbMigrate['exports'][_0x3060a9(0x8be)]=_0x39d426,okdbMigrate[_0x3060a9(0x7ac)];}var okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x304dcc=require$$2$1;function _0x5e5de7(_0x24d5a9,_0x5567bd){const _0x22acaf=_0x4c4a;return _0x304dcc[_0x22acaf(0x6a7)](_0x22acaf(0x1ea),_0x5567bd)[_0x22acaf(0x56e)](_0x24d5a9)[_0x22acaf(0x656)](_0x22acaf(0x76d));}function _0x1fe561(_0x38ad84,_0x1a2fae){const _0x21075c=_0x4c4a;if(typeof _0x38ad84!=='string'||typeof _0x1a2fae!==_0x21075c(0x1d2))return![];if(Buffer['byteLength'](_0x38ad84)!==Buffer['byteLength'](_0x1a2fae))return![];return _0x304dcc[_0x21075c(0x2fb)](Buffer[_0x21075c(0x215)](_0x38ad84),Buffer['from'](_0x1a2fae));}function _0x35c5e5(_0x45ebe9){const _0x492cfb=_0x4c4a;if(!_0x45ebe9?.[_0x492cfb(0x579)](_0x492cfb(0x4e2)))return null;return _0x45ebe9[_0x492cfb(0x27f)](0x7);}function _0x370e89(_0x259d6e=0x20){const _0x7f24ef=_0x4c4a;return _0x304dcc[_0x7f24ef(0x41a)](_0x259d6e)[_0x7f24ef(0x4b9)](_0x7f24ef(0x76d));}function _0x6ab7c5(_0x572a0b){const _0x4dbc3c=_0x4c4a;return _0x304dcc[_0x4dbc3c(0x3b9)](_0x4dbc3c(0x1ea))[_0x4dbc3c(0x56e)](_0x572a0b)['digest'](_0x4dbc3c(0x6b1));}function _0x5e798e(_0xc36ba7,_0x10a0c8,_0x447d4c=0x36ee80){const _0x2f111c=_0x4c4a;if(!_0x10a0c8)throw new Error(_0x2f111c(0x556));const _0x1243be=Date[_0x2f111c(0x4ec)](),_0x3d469e=Buffer['from'](JSON[_0x2f111c(0x2d1)]({'iat':_0x1243be,'exp':_0x1243be+_0x447d4c,'sub':_0xc36ba7?.['id']??_0xc36ba7?.[_0x2f111c(0x6f3)]??null,'username':_0xc36ba7?.[_0x2f111c(0x479)]??_0xc36ba7?.[_0x2f111c(0x4f9)]??null,'roles':Array[_0x2f111c(0x59b)](_0xc36ba7?.[_0x2f111c(0x615)])?_0xc36ba7[_0x2f111c(0x615)]:[]}))['toString']('base64url'),_0x54db80=_0x5e5de7(_0x3d469e,_0x10a0c8);return _0x3d469e+'.'+_0x54db80;}function _0x2d4fa7(_0x381be8,_0x333835){const _0x455e39=_0x4c4a;if(!_0x333835||typeof _0x381be8!==_0x455e39(0x1d2))return null;const [_0x1eba24,_0x29596d]=_0x381be8[_0x455e39(0x84e)]('.');if(!_0x1eba24||!_0x29596d)return null;const _0x338edb=_0x5e5de7(_0x1eba24,_0x333835);if(!_0x1fe561(_0x29596d,_0x338edb))return null;try{const _0x2d6569=JSON[_0x455e39(0x7d3)](Buffer[_0x455e39(0x215)](_0x1eba24,_0x455e39(0x76d))[_0x455e39(0x4b9)]()),_0x2c57bd=0x7530;if(Date[_0x455e39(0x4ec)]()>Number(_0x2d6569?.['exp']??0x0)+_0x2c57bd)return null;return _0x2d6569;}catch{return null;}}async function _0x49962e(_0x28728d){return new Promise((_0x4dd88b,_0x57d7f3)=>{const _0x4b4449=_0x4c4a,_0x20c29c=_0x304dcc[_0x4b4449(0x41a)](0x10);_0x304dcc[_0x4b4449(0x3df)](_0x28728d,_0x20c29c,0x40,(_0x27a742,_0x351bef)=>{const _0x3e4d5c=_0x4b4449;if(_0x27a742)return _0x57d7f3(_0x27a742);_0x4dd88b(_0x20c29c['toString'](_0x3e4d5c(0x6b1))+':'+_0x351bef[_0x3e4d5c(0x4b9)]('hex'));});});}async function _0x58ea25(_0x15e038,_0x45c52c){const _0x599d9e=_0x4c4a;if(typeof _0x45c52c!==_0x599d9e(0x1d2))return![];const [_0xf2c297,_0x7db435]=_0x45c52c['split'](':');if(!_0xf2c297||!_0x7db435)return![];const _0x924c6e=Buffer[_0x599d9e(0x215)](_0xf2c297,_0x599d9e(0x6b1)),_0x21c9ac=Buffer[_0x599d9e(0x215)](_0x7db435,_0x599d9e(0x6b1));if(_0x21c9ac['length']!==0x40)return![];return new Promise((_0x53076c,_0x2efbe5)=>{const _0x1991be=_0x599d9e;_0x304dcc[_0x1991be(0x3df)](_0x15e038,_0x924c6e,0x40,(_0x45e063,_0x4b6af6)=>{if(_0x45e063)return _0x2efbe5(_0x45e063);_0x53076c(_0x304dcc['timingSafeEqual'](_0x4b6af6,_0x21c9ac));});});}return okdbAuthTokens={'hmac':_0x5e5de7,'timingSafeEqual':_0x1fe561,'parseBearer':_0x35c5e5,'randomToken':_0x370e89,'hashToken':_0x6ab7c5,'issueToken':_0x5e798e,'authenticateToken':_0x2d4fa7,'hashPassword':_0x49962e,'verifyPassword':_0x58ea25},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x33d98f=_0x1a2e0d;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0xb4a118=require$$0$2,_0x47377a=_0x33d98f(0x896),_0x2d0980=new Uint8Array(0x100)[_0x33d98f(0x199)](0xff);for(let _0x224d86=0x0;_0x224d86<_0x47377a[_0x33d98f(0x6ad)];_0x224d86++){_0x2d0980[_0x47377a[_0x33d98f(0x384)](_0x224d86)]=_0x224d86,_0x2d0980[_0x47377a['charCodeAt'](_0x224d86)+0x20]=_0x224d86;}_0x2d0980['O'['charCodeAt'](0x0)]=0x0,_0x2d0980['o'[_0x33d98f(0x384)](0x0)]=0x0,_0x2d0980['I'[_0x33d98f(0x384)](0x0)]=0x1,_0x2d0980['i'['charCodeAt'](0x0)]=0x1,_0x2d0980['L'['charCodeAt'](0x0)]=0x1,_0x2d0980['l'[_0x33d98f(0x384)](0x0)]=0x1;function _0x12b7b4(_0xb41916){let _0x4661a6=0x0,_0x335e85=0x0,_0x3eced6='';for(let _0x37aee7=0x0;_0x37aee7<_0xb41916['length'];_0x37aee7++){_0x335e85=_0x335e85<<0x8|_0xb41916[_0x37aee7],_0x4661a6+=0x8;while(_0x4661a6>=0x5){_0x4661a6-=0x5,_0x3eced6+=_0x47377a[_0x335e85>>>_0x4661a6&0x1f];}}return _0x4661a6>0x0&&(_0x3eced6+=_0x47377a[_0x335e85<<0x5-_0x4661a6&0x1f]),_0x3eced6;}function _0x10301d(_0x3d1b95){const _0x1eb9ea=_0x33d98f;_0x3d1b95=_0x3d1b95[_0x1eb9ea(0x813)](/-/g,'')[_0x1eb9ea(0x2e6)]();let _0x1e9405=0x0,_0x108d78=0x0;const _0x13ad56=[];for(let _0x2377e4=0x0;_0x2377e4<_0x3d1b95['length'];_0x2377e4++){const _0x3ee2a9=_0x2d0980[_0x3d1b95[_0x1eb9ea(0x384)](_0x2377e4)];if(_0x3ee2a9===0xff)continue;_0x108d78=_0x108d78<<0x5|_0x3ee2a9,_0x1e9405+=0x5,_0x1e9405>=0x8&&(_0x1e9405-=0x8,_0x13ad56[_0x1eb9ea(0x557)](_0x108d78>>>_0x1e9405&0xff));}return Buffer[_0x1eb9ea(0x215)](_0x13ad56);}const _0x408615=[_0x33d98f(0x6d9),_0x33d98f(0x314),_0x33d98f(0x38c),_0x33d98f(0x659),_0x33d98f(0x510),_0x33d98f(0x59f),_0x33d98f(0x861),_0x33d98f(0x2a1)],_0x5e8bfc=0x0,_0xf4bd4b=0x1,_0x275456=0x2,_0x50315a=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x135d25({issuedAt:_0x296099,expiresAt:_0x547f6b,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x5e8bfc}){const _0x52b06f=_0x33d98f,_0x4e0176=Buffer[_0x52b06f(0x215)](licensee,'utf8')[_0x52b06f(0x27f)](0x0,0x40),_0x52316c=0x1+0x1+0x4+0x4+0x1+_0x4e0176[_0x52b06f(0x6ad)]+0x2+0x10,_0xbc7528=Buffer[_0x52b06f(0x42e)](_0x52316c);let _0x302368=0x0;_0xbc7528['writeUInt8'](0x1,_0x302368++),_0xbc7528['writeUInt8'](licenseType,_0x302368++),_0xbc7528[_0x52b06f(0x4c4)](Math[_0x52b06f(0x2d7)](_0x296099/0x3e8),_0x302368),_0x302368+=0x4,_0xbc7528[_0x52b06f(0x4c4)](Math['floor'](_0x547f6b/0x3e8),_0x302368),_0x302368+=0x4,_0xbc7528[_0x52b06f(0x5e0)](_0x4e0176[_0x52b06f(0x6ad)],_0x302368++),_0x4e0176[_0x52b06f(0x2a2)](_0xbc7528,_0x302368),_0x302368+=_0x4e0176[_0x52b06f(0x6ad)];let _0x400e2c=0x0;for(let _0x57c402=0x0;_0x57c402<_0x408615[_0x52b06f(0x6ad)];_0x57c402++){if(features[_0x408615[_0x57c402]])_0x400e2c|=0x1<<_0x57c402;}_0xbc7528[_0x52b06f(0x655)](_0x400e2c,_0x302368),_0x302368+=0x2;const _0x3681fe=['envs',_0x52b06f(0x340),_0x52b06f(0x1c8),_0x52b06f(0x1e0)];for(const _0x6627de of _0x3681fe){_0xbc7528[_0x52b06f(0x4c4)](limits[_0x6627de]||0x0,_0x302368),_0x302368+=0x4;}return _0xbc7528;}function _0x38426e(_0x4d9796){const _0x29cd66=_0x33d98f;let _0x53bc65=0x0;const _0x3692dc=_0x4d9796[_0x29cd66(0x2b2)](_0x53bc65++),_0x58aca6=_0x4d9796['readUInt8'](_0x53bc65++),_0x3f25e9=_0x4d9796[_0x29cd66(0x873)](_0x53bc65);_0x53bc65+=0x4;const _0x487c61=_0x4d9796['readUInt32BE'](_0x53bc65);_0x53bc65+=0x4;const _0x3cfc3c=_0x4d9796['readUInt8'](_0x53bc65++),_0x378042=_0x4d9796[_0x29cd66(0x27f)](_0x53bc65,_0x53bc65+_0x3cfc3c)[_0x29cd66(0x4b9)]('utf8');_0x53bc65+=_0x3cfc3c;const _0x4a125e=_0x4d9796[_0x29cd66(0x293)](_0x53bc65);_0x53bc65+=0x2;const _0x35af38={};for(let _0x2a8c06=0x0;_0x2a8c06<_0x408615[_0x29cd66(0x6ad)];_0x2a8c06++){_0x35af38[_0x408615[_0x2a8c06]]=Boolean(_0x4a125e&0x1<<_0x2a8c06);}const _0x5d3ac2=[_0x29cd66(0x7f3),_0x29cd66(0x340),'syncPeers',_0x29cd66(0x1e0)],_0x57e589={};for(const _0x161964 of _0x5d3ac2){const _0x32ca5f=_0x4d9796['readUInt32BE'](_0x53bc65);_0x53bc65+=0x4,_0x57e589[_0x161964]=_0x32ca5f===0x0?null:_0x32ca5f;}return{'v':_0x3692dc,'licenseType':_0x58aca6,'issuedAt':_0x3f25e9*0x3e8,'expiresAt':_0x487c61*0x3e8,'licensee':_0x378042,'features':_0x35af38,'limits':_0x57e589};}function _0x2e20ef(_0x1da443,_0x191f2d){const _0x4d6c5e=_0x33d98f,_0x385c79=Buffer[_0x4d6c5e(0x7fe)]([_0x1da443,_0x191f2d]),_0x445963=_0x12b7b4(_0x385c79),_0x17bf15=[];for(let _0x3581c4=0x0;_0x3581c4<_0x445963[_0x4d6c5e(0x6ad)];_0x3581c4+=0x8){_0x17bf15[_0x4d6c5e(0x557)](_0x445963[_0x4d6c5e(0x27f)](_0x3581c4,_0x3581c4+0x8));}return _0x17bf15[_0x4d6c5e(0x1c9)]('-');}function _0x44e66a(_0x958551){const _0x18c4e6=_0x33d98f;if(typeof _0x958551!==_0x18c4e6(0x1d2))throw new Error(_0x18c4e6(0x55b));const _0x58e58d=_0x10301d(_0x958551[_0x18c4e6(0x813)](/-/g,''));if(_0x58e58d['length']<0x41)throw new Error(_0x18c4e6(0x2fc)+_0x58e58d['length']+_0x18c4e6(0x62f));const _0x5e4450=_0x58e58d[_0x18c4e6(0x27f)](0x0,_0x58e58d['length']-0x40),_0x300ee1=_0x58e58d[_0x18c4e6(0x27f)](_0x58e58d['length']-0x40);let _0x7e3d4;try{_0x7e3d4=_0x38426e(_0x5e4450);}catch(_0x4fdff5){throw new Error(_0x18c4e6(0x64a)+_0x4fdff5['message']);}return{'rawBuf':_0x58e58d,'payload':_0x5e4450,'sig':_0x300ee1,'decoded':_0x7e3d4};}function _0x4e304a(_0x420e66){const _0x141dca=_0x33d98f;return _0xb4a118[_0x141dca(0x3b9)]('sha256')['update'](_0x420e66)[_0x141dca(0x656)]()[_0x141dca(0x27f)](0x0,0x8);}function _0x5bdfac(_0x335c1b,_0x407aad,_0x3115c7){const _0x579b0e=_0x33d98f,_0x4d38af=_0x579b0e(0x19f)+_0x3115c7,_0x2e54ae=Buffer['concat']([Buffer[_0x579b0e(0x215)](_0x335c1b,'utf8'),_0x407aad]),_0x19324b=_0xb4a118['createHmac']('sha256',_0x4d38af)['update'](_0x2e54ae)[_0x579b0e(0x656)](),_0x45405d=_0x12b7b4(_0x19324b[_0x579b0e(0x27f)](0x0,0x5));return{'pin':_0x45405d,'pinHmac':_0x19324b};}function _0x256988(_0x388819,_0x4d432e,_0x510a59){const _0x500830=_0x33d98f,_0x42e81f=Buffer[_0x500830(0x42e)](0x4d);let _0x6c234a=0x0;_0x42e81f['writeUInt8'](0x1,_0x6c234a++),_0x388819[_0x500830(0x2a2)](_0x42e81f,_0x6c234a),_0x6c234a+=0x8,_0x42e81f['writeUInt32BE'](_0x4d432e,_0x6c234a),_0x6c234a+=0x4,_0x510a59[_0x500830(0x2a2)](_0x42e81f,_0x6c234a);const _0x31a6bf=_0x12b7b4(_0x42e81f),_0x5df0a4=[];for(let _0x1ae7f6=0x0;_0x1ae7f6<_0x31a6bf[_0x500830(0x6ad)];_0x1ae7f6+=0x6){_0x5df0a4[_0x500830(0x557)](_0x31a6bf[_0x500830(0x27f)](_0x1ae7f6,_0x1ae7f6+0x6));}return _0x5df0a4['join']('-');}function _0x1b821f(_0x21452f){const _0x20861c=_0x33d98f;if(typeof _0x21452f!==_0x20861c(0x1d2))throw new Error(_0x20861c(0x865));const _0x2a2ddb=_0x10301d(_0x21452f[_0x20861c(0x813)](/-/g,''));if(_0x2a2ddb['length']!==0x4d)throw new Error('decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20'+_0x2a2ddb[_0x20861c(0x6ad)]);let _0x15265c=0x0;const _0x59f2b8=_0x2a2ddb['readUInt8'](_0x15265c++),_0x54fe31=_0x2a2ddb[_0x20861c(0x27f)](_0x15265c,_0x15265c+0x8);_0x15265c+=0x8;const _0x39b4a8=_0x2a2ddb['readUInt32BE'](_0x15265c);_0x15265c+=0x4;const _0x1b9267=_0x2a2ddb[_0x20861c(0x27f)](_0x15265c);return{'v':_0x59f2b8,'licenseHash':_0x54fe31,'expiry':_0x39b4a8,'sig':_0x1b9267};}const _0x271ebd=0x100,_0x106f1c=new Set(),_0x5ea14e=new Map();function _0xe09447(_0x48fc94,_0x414e59,_0x4b9672){const _0x2cfc83=_0x33d98f;if(typeof _0x4b9672!==_0x2cfc83(0x1d2)||!Buffer[_0x2cfc83(0x1a0)](_0x48fc94)||!Buffer[_0x2cfc83(0x1a0)](_0x414e59))return _0xb4a118[_0x2cfc83(0x700)](null,_0x48fc94,_0x4b9672,_0x414e59);const _0x33a422=_0x4b9672+'\x0a'+_0x48fc94[_0x2cfc83(0x4b9)]('base64')+'\x0a'+_0x414e59[_0x2cfc83(0x4b9)](_0x2cfc83(0x68e));if(_0x106f1c[_0x2cfc83(0x2ad)](_0x33a422))return!![];let _0x10c373=_0x5ea14e['get'](_0x4b9672);if(!_0x10c373){_0x10c373=_0xb4a118[_0x2cfc83(0x758)](_0x4b9672);if(_0x5ea14e[_0x2cfc83(0x7d1)]>=0x10)_0x5ea14e[_0x2cfc83(0x43c)]();_0x5ea14e['set'](_0x4b9672,_0x10c373);}const _0x5c08d2=_0xb4a118[_0x2cfc83(0x700)](null,_0x48fc94,_0x10c373,_0x414e59)===!![];if(_0x5c08d2){if(_0x106f1c['size']>=_0x271ebd)_0x106f1c[_0x2cfc83(0x43c)]();_0x106f1c['add'](_0x33a422);}return _0x5c08d2;}function _0x7bb603({tokenString:_0x5e1690,nodeId:_0x4a3285,rawBlobBuf:_0x3f29d9,pubKeyPem:_0x233262,pubFingerprint:_0x45000f}){const _0x5a78c4=_0x33d98f;let _0x55538f;try{_0x55538f=_0x1b821f(_0x5e1690);}catch(_0x32aff1){return{'valid':![],'reason':_0x5a78c4(0x48d)};}const _0x4bdfb8=_0x4e304a(_0x3f29d9);if(!_0x4bdfb8[_0x5a78c4(0x400)](_0x55538f[_0x5a78c4(0x872)]))return{'valid':![],'reason':_0x5a78c4(0x401)};const {pinHmac:_0x56b348}=_0x5bdfac(_0x4a3285,_0x4bdfb8,_0x45000f),_0x4fb54f=Buffer['allocUnsafe'](0x4);_0x4fb54f[_0x5a78c4(0x4c4)](_0x55538f[_0x5a78c4(0x394)],0x0);const _0x55f507=Buffer[_0x5a78c4(0x7fe)]([Buffer[_0x5a78c4(0x215)]([_0x55538f['v']]),_0x56b348[_0x5a78c4(0x27f)](0x0,0x5),_0x55538f[_0x5a78c4(0x872)],_0x4fb54f]);try{const _0x4e7d18=_0xe09447(_0x55f507,_0x55538f[_0x5a78c4(0x58c)],_0x233262);if(!_0x4e7d18)return{'valid':![],'reason':_0x5a78c4(0x58d)};}catch(_0x6f3d13){return{'valid':![],'reason':_0x5a78c4(0x58d)};}if(_0x55538f[_0x5a78c4(0x394)]<Date[_0x5a78c4(0x4ec)]()/0x3e8)return{'valid':![],'reason':_0x5a78c4(0x30d)};return{'valid':!![],'reason':'ok'};}function _0x243a70(_0x644921){const _0x292298=_0x33d98f;if(typeof _0x644921!==_0x292298(0x1d2))return _0x292298(0x756);const _0x558807=_0x644921[_0x292298(0x48b)]();if(_0x558807[_0x292298(0x579)]('/')||_0x558807[_0x292298(0x579)]('./')||_0x558807[_0x292298(0x579)](_0x292298(0x6fe))||/^[A-Za-z]:[\\/]/['test'](_0x558807))return'path';if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x292298(0x3f6)](_0x558807))return _0x292298(0x3ff);const _0xbfc493=_0x558807[_0x292298(0x813)](/[\s-]+/g,'')[_0x292298(0x6ad)];if(_0xbfc493===0x7c)return _0x292298(0x589);if(_0xbfc493>=0x95&&_0xbfc493<=0xfc)return _0x292298(0x81a);return'unknown';}return okdbLicenseCodec={'toBase32':_0x12b7b4,'fromBase32':_0x10301d,'encodeLicensePayload':_0x135d25,'decodeLicensePayload':_0x38426e,'encodeLicenseBlob':_0x2e20ef,'decodeLicenseBlob':_0x44e66a,'licenseHash':_0x4e304a,'derivePin':_0x5bdfac,'encodeActivationToken':_0x256988,'decodeActivationToken':_0x1b821f,'verifyActivation':_0x7bb603,'verifySignature':_0xe09447,'detectInputType':_0x243a70,'FEATURE_NAMES':_0x408615,'LICENSE_TYPE_STANDARD':_0x5e8bfc,'LICENSE_TYPE_OPEN':_0xf4bd4b,'LICENSE_TYPE_INTERNAL':_0x275456,'OPEN_LICENSE_MAX_DURATION_MS':_0x50315a},okdbLicenseCodec;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x1c5ef2=_0x1a2e0d;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x5c098a={'PUT':'put','REMOVE':_0x1c5ef2(0x417),'INDEX_DROP':'dropIndex','INDEX_REGISTER':_0x1c5ef2(0x3de),'INDEX_RESET':_0x1c5ef2(0x5b2),'TYPE_REGISTER':'registerType','TYPE_DROP':'dropType','FTS_REGISTER':'registerFts','FTS_DROP':'dropFts','FTS_RESET':_0x1c5ef2(0x688),'SCHEMA_SET':_0x1c5ef2(0x626),'SCHEMA_DROP':_0x1c5ef2(0x435),'TTL_SET':_0x1c5ef2(0x74d),'TTL_CLEAR':'clearTtl'},_0x39e3bc={'SYSTEM_READY':_0x1c5ef2(0x461),'FIELD_RESOLVER_REGISTERED':'field:resolver_registered','SYSTEM_STOPPED':_0x1c5ef2(0x3ba),'SYSTEM_CLOCK_CHANGE':_0x1c5ef2(0x2ef),'SYSTEM_POKE':_0x1c5ef2(0x33e),'SYSTEM_DRAIN':_0x1c5ef2(0x627),'SYSTEM_TYPE_DROP':_0x1c5ef2(0x8a2),'SYSTEM_PROC':_0x1c5ef2(0x749),'SYSTEM_BUS_STATE_CHANGE':_0x1c5ef2(0x4ea),'ITEM_CREATE':_0x1c5ef2(0x5e6),'ITEM_UPDATE':_0x1c5ef2(0x3d6),'ITEM_REMOVE':'item:remove','ITEM_PENDING':_0x1c5ef2(0x6be),'INDEX_RESET':_0x1c5ef2(0x596),'INDEX_READY':_0x1c5ef2(0x61d),'INDEX_PROGRESS':_0x1c5ef2(0x570),'VIEW_PROGRESS':_0x1c5ef2(0x6ea),'INDEX_DROP':_0x1c5ef2(0x341),'INDEX_REGISTERED':_0x1c5ef2(0x272),'FTS_REGISTERED':_0x1c5ef2(0x1af),'FTS_DROP':_0x1c5ef2(0x829),'FTS_RESET':'fts:reset','SCHEMA_SET':_0x1c5ef2(0x238),'SCHEMA_DROP':_0x1c5ef2(0x2df),'UNIQUE_VIOLATION':_0x1c5ef2(0x4f5),'UNIQUE_VIOLATION_RESOLVED':_0x1c5ef2(0x6cb),'REF_VIOLATION':_0x1c5ef2(0x29b),'REF_VIOLATION_RESOLVED':_0x1c5ef2(0x233),'SYNC_APPLY':'sync:apply','TXN_START':_0x1c5ef2(0x5e3),'TXN_END':_0x1c5ef2(0x4c6),'TXN_ROLLBACK':_0x1c5ef2(0x56a),'TYPE_REGISTERED':'type:registered','TYPE_DROP':_0x1c5ef2(0x56b),'ENV_OPENED':_0x1c5ef2(0x2a0),'ENV_REMOVED':_0x1c5ef2(0x525),'SYSTEM_ENV_RELEASE':_0x1c5ef2(0x648),'TTL_EXPIRED':_0x1c5ef2(0x283),'TTL_SET':_0x1c5ef2(0x565),'TTL_CLEAR':_0x1c5ef2(0x53a),'LICENSE_INVALID':'license:invalid','LICENSE_ADDED':_0x1c5ef2(0x658),'LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':_0x1c5ef2(0x3d7)},_0x368de0={'CREATING':_0x1c5ef2(0x638),'RESETTING':_0x1c5ef2(0x39a),'READY':'ready','DROPPING':'dropping','WAITING':_0x1c5ef2(0x5e7),'ERROR':'error'},_0x1a2ccb={'CREATED':_0x1c5ef2(0x516),'STARTING':_0x1c5ef2(0x5a2),'STARTED':_0x1c5ef2(0x4ad),'STOPPING':'stopping','STOPPED':_0x1c5ef2(0x243)},_0x58165f={'CREATING':'creating','READY':_0x1c5ef2(0x3fc),'HALTED':_0x1c5ef2(0x195),'STOPPED':_0x1c5ef2(0x243),'RESETTING':_0x1c5ef2(0x39a)},_0x4ec9d=Object[_0x1c5ef2(0x6ef)]({'POKE':'bus:poke','DRAIN':_0x1c5ef2(0x5c9),'TYPE_DROP':_0x1c5ef2(0x350),'PROC':_0x1c5ef2(0x44b),'ENV_RELEASE':'bus:env_release'});return okdbEnums={'BUS_EVENTS':_0x4ec9d,'CHANGE_ACTIONS':_0x5c098a,'EVENTS':_0x39e3bc,'INDEX_STATE':_0x368de0,'OKDB_STATE':_0x1a2ccb,'VIEW_STATE':_0x58165f},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x503391=_0x1a2e0d;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x5accd3=require$$0$1,_0x4154cd=require$$1,_0x47e9cf=require$$2$1,_0x20a4b2=_0x5accd3[_0x503391(0x308)](_0x4154cd['join'](__dirname,_0x503391(0x3cc)),_0x503391(0x88a))[_0x503391(0x48b)](),_0x17a87d=_0x47e9cf[_0x503391(0x758)](_0x20a4b2)[_0x503391(0x678)]({'type':_0x503391(0x370),'format':_0x503391(0x345)}),_0x160659=_0x47e9cf['createHash'](_0x503391(0x1ea))[_0x503391(0x56e)](_0x17a87d)[_0x503391(0x656)](_0x503391(0x6b1))[_0x503391(0x27f)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x20a4b2,'PUB_FINGERPRINT':_0x160659},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x4a8e10=_0x1a2e0d;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x4cceea=require$$2$1,{OKDBError:_0xa87ed5}=requireOkdbError(),{EVENTS:_0x4eab4a}=requireOkdbEnums(),_0x3c1618=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x25a01f,LICENSE_TYPE_INTERNAL:_0x1ade42,OPEN_LICENSE_MAX_DURATION_MS:_0x5f0c78}=_0x3c1618,_0x267a92=requireOkdbPubkey(),_0x252199={'LICENSED_BUILD':'true','PUBLIC_KEY_PEM':_0x267a92['PUBLIC_KEY_PEM'],'PUB_FINGERPRINT':_0x267a92['PUB_FINGERPRINT'],'LICENSE_EXPIRED_ACTION':'log'},_0x1d47f1=_0x4a8e10(0x1a9),_0x3f289b={'features':{'sync':![],'embeddings':!![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x5,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240,'pipelinesPerEnv':0x2},'_isFree':!![]};async function _0x495af9(_0x3a256f){const _0x813661=_0x4a8e10;await _0x3a256f[_0x813661(0x3ac)](_0x1d47f1);}class _0xdc17c1{constructor(_0x523eec){const _0x1f1c1e=_0x4a8e10;this[_0x1f1c1e(0x58a)]=_0x523eec,this[_0x1f1c1e(0x691)]=null;}async[_0x4a8e10(0x3dd)](){const _0xfda64a=_0x4a8e10,_0x2f0d67=this['okdb'][_0xfda64a(0x736)];if(!_0x2f0d67||!_0x2f0d67[_0xfda64a(0x6f1)](_0x1d47f1)){this[_0xfda64a(0x691)]=null;return;}const _0x501164=this[_0xfda64a(0x58a)]['id'];let _0x336deb=null;for(const {key:_0x206a4b,value:_0x38aba8}of _0x2f0d67[_0xfda64a(0x3c9)](_0x1d47f1)){const _0x2e2da9=this[_0xfda64a(0x74f)](_0x38aba8,_0x501164);_0x2e2da9===_0xfda64a(0x676)&&!_0x336deb&&(_0x336deb={..._0x38aba8,'id':_0x206a4b,'status':_0x2e2da9});}this[_0xfda64a(0x691)]=_0x336deb;if(this['_active']&&this[_0xfda64a(0x691)][_0xfda64a(0x1dd)]===_0x25a01f){const _0x2043fb=Math[_0xfda64a(0x347)]((this[_0xfda64a(0x691)][_0xfda64a(0x282)]-Date[_0xfda64a(0x4ec)]())/0x5265c00);this['okdb']['log']?.[_0xfda64a(0x44f)]('⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20'+_0x2043fb+_0xfda64a(0x647),{'feature':_0xfda64a(0x2bb),'licensee':this[_0xfda64a(0x691)][_0xfda64a(0x53d)],'expiresAt':new Date(this[_0xfda64a(0x691)][_0xfda64a(0x282)])[_0xfda64a(0x611)]()});}this['_active']&&this[_0xfda64a(0x691)][_0xfda64a(0x1dd)]===_0x1ade42&&this[_0xfda64a(0x58a)]['log']?.[_0xfda64a(0x44f)](_0xfda64a(0x577),{'feature':_0xfda64a(0x2bb),'licensee':this[_0xfda64a(0x691)]['licensee']});}['_computeStatus'](_0x428eb9,_0x1eb978){const _0x5310bf=_0x4a8e10;if(!_0x428eb9[_0x5310bf(0x81a)])return'invalid';let _0x56b2bc;try{_0x56b2bc=_0x3c1618[_0x5310bf(0x6a8)](_0x428eb9[_0x5310bf(0x81a)]);}catch(_0x96e3d6){return'invalid';}try{const _0x5d169d=_0x3c1618['verifySignature'](_0x56b2bc[_0x5310bf(0x610)],_0x56b2bc['sig'],_0x252199[_0x5310bf(0x1b9)]);if(!_0x5d169d)return _0x5310bf(0x7a8);}catch(_0x563c69){return _0x5310bf(0x7a8);}if(_0x56b2bc[_0x5310bf(0x70e)][_0x5310bf(0x1dd)]===_0x1ade42)return _0x5310bf(0x676);if(_0x56b2bc[_0x5310bf(0x70e)]['expiresAt']<=Date[_0x5310bf(0x4ec)]())return _0x5310bf(0x537);if(_0x56b2bc['decoded'][_0x5310bf(0x1dd)]===_0x25a01f)return'active';if(!_0x428eb9[_0x5310bf(0x589)])return _0x5310bf(0x242);const _0x102187=_0x3c1618['verifyActivation']({'tokenString':_0x428eb9[_0x5310bf(0x589)],'nodeId':_0x1eb978,'rawBlobBuf':_0x56b2bc['rawBuf'],'pubKeyPem':_0x252199[_0x5310bf(0x1b9)],'pubFingerprint':_0x252199[_0x5310bf(0x476)]});if(_0x102187[_0x5310bf(0x4f3)]==='LICENSE_HASH_MISMATCH'||_0x102187['reason']==='SIG_INVALID')return _0x5310bf(0x835);if(_0x102187[_0x5310bf(0x4f3)]==='ACTIVATION_EXPIRED')return _0x5310bf(0x537);if(!_0x102187['valid'])return _0x5310bf(0x835);return _0x5310bf(0x676);}get[_0x4a8e10(0x676)](){const _0x1cd7b6=_0x4a8e10;return this[_0x1cd7b6(0x691)];}get['effective'](){const _0x2aac68=_0x4a8e10;return this[_0x2aac68(0x691)]??_0x3f289b;}[_0x4a8e10(0x2b5)](_0x2d1296){const _0x273dca=_0x4a8e10;if(_0x252199['LICENSED_BUILD']!==_0x273dca(0x7c4))return;const _0x45fc67=this['effective'];if(!_0x45fc67['features']?.[_0x2d1296]){const _0x5680df=_0x45fc67[_0x273dca(0x4bf)]?_0x273dca(0x7ec)+_0x2d1296+'.\x20Add\x20a\x20license\x20that\x20includes\x20\x22'+_0x2d1296+_0x273dca(0x3b2):'Feature\x20not\x20licensed:\x20'+_0x2d1296+_0x273dca(0x842)+_0x2d1296+'\x22.';throw new _0xa87ed5(_0x5680df,_0x273dca(0x5bf),{'feature':_0x2d1296});}}[_0x4a8e10(0x4e5)](_0x3e1d29){const _0x4cc459=_0x4a8e10;if(_0x252199[_0x4cc459(0x239)]!==_0x4cc459(0x7c4))return!![];return!!this[_0x4cc459(0x1ac)][_0x4cc459(0x257)]?.[_0x3e1d29];}['hasLimit'](_0x304a78){const _0x32fa25=_0x4a8e10;if(_0x252199['LICENSED_BUILD']!==_0x32fa25(0x7c4))return![];const _0x3e0380=this[_0x32fa25(0x1ac)]['limits']?.[_0x304a78];return!(_0x3e0380===null||_0x3e0380===undefined||_0x3e0380===0x0);}[_0x4a8e10(0x825)](_0x4cb4b5,_0x1a37c5){const _0x4f0145=_0x4a8e10;if(_0x252199[_0x4f0145(0x239)]!=='true')return;const _0x171b87=this[_0x4f0145(0x1ac)],_0x3105d8=_0x171b87[_0x4f0145(0x5b3)]?.[_0x4cb4b5];if(_0x3105d8===null||_0x3105d8===undefined||_0x3105d8===0x0)return;if(_0x1a37c5>=_0x3105d8)throw new _0xa87ed5(_0x4f0145(0x7d8)+_0x4cb4b5+'\x20('+_0x1a37c5+'/'+_0x3105d8+')','LICENSE_LIMIT_EXCEEDED',{'limit':_0x4cb4b5,'current':_0x1a37c5,'max':_0x3105d8});}async[_0x4a8e10(0x74e)](_0x31637b){const _0x521261=_0x4a8e10;let _0x59c826;try{_0x59c826=_0x3c1618[_0x521261(0x6a8)](_0x31637b);}catch(_0x42818f){throw new _0xa87ed5(_0x521261(0x3f3)+_0x42818f[_0x521261(0x81d)],'LICENSE_INVALID');}let _0x3b84be;try{_0x3b84be=_0x3c1618[_0x521261(0x3e1)](_0x59c826[_0x521261(0x610)],_0x59c826[_0x521261(0x58c)],_0x252199[_0x521261(0x1b9)]);}catch(_0x96df55){throw new _0xa87ed5(_0x521261(0x1b6)+_0x96df55[_0x521261(0x81d)],_0x521261(0x31e));}if(!_0x3b84be)throw new _0xa87ed5(_0x521261(0x2e5)+(_0x521261(0x4d9)+_0x252199[_0x521261(0x476)]+'.\x20')+_0x521261(0x68a),_0x521261(0x31e),{'expectedFingerprint':_0x252199[_0x521261(0x476)]});if(_0x59c826['decoded'][_0x521261(0x1dd)]===_0x25a01f){const _0x468c50=_0x59c826[_0x521261(0x70e)][_0x521261(0x282)]-_0x59c826[_0x521261(0x70e)][_0x521261(0x2bf)];if(_0x468c50>_0x5f0c78)throw new _0xa87ed5(_0x521261(0x237)+Math[_0x521261(0x347)](_0x468c50/(0x1e*0x5265c00))+'\x20months\x20from\x20issuance)',_0x521261(0x31e));}const _0x2d692f=this['okdb'][_0x521261(0x736)];await _0x495af9(_0x2d692f);const _0x42624a=_0x3c1618['licenseHash'](_0x59c826[_0x521261(0x3e8)])[_0x521261(0x4b9)](_0x521261(0x6b1));for(const {key:_0x5c7453,value:_0x261d21}of _0x2d692f[_0x521261(0x3c9)](_0x1d47f1)){if(_0x261d21[_0x521261(0x55f)]===_0x42624a)throw new _0xa87ed5(_0x521261(0x249),_0x521261(0x68c),{'id':_0x5c7453});}const _0x5f68b5=_0x4cceea[_0x521261(0x3b9)](_0x521261(0x1ea))[_0x521261(0x56e)](_0x521261(0x20a))['update'](_0x59c826['rawBuf'])['digest']('hex'),_0x52e672=_0x5f68b5['slice'](0x0,0x8)+'-'+_0x5f68b5['slice'](0x8,0xc)+'-5'+_0x5f68b5[_0x521261(0x27f)](0xd,0x10)+'-'+(parseInt(_0x5f68b5[0x10],0x10)&0x3|0x8)[_0x521261(0x4b9)](0x10)+_0x5f68b5[_0x521261(0x27f)](0x11,0x14)+'-'+_0x5f68b5[_0x521261(0x27f)](0x14,0x20),_0x18da4d={'blob':_0x31637b,'activation':null,'addedAt':Date[_0x521261(0x4ec)](),'_licenseHash':_0x42624a,'licensee':_0x59c826['decoded'][_0x521261(0x53d)],'expiresAt':_0x59c826[_0x521261(0x70e)][_0x521261(0x282)],'features':_0x59c826[_0x521261(0x70e)][_0x521261(0x257)],'limits':_0x59c826[_0x521261(0x70e)][_0x521261(0x5b3)],'licenseType':_0x59c826[_0x521261(0x70e)][_0x521261(0x1dd)]};return await _0x2d692f[_0x521261(0x25f)](_0x1d47f1,_0x52e672,_0x18da4d),{'id':_0x52e672,..._0x18da4d};}async['activateLicense'](_0x432579){const _0x2a050d=_0x4a8e10;let _0x397489;try{_0x397489=_0x3c1618[_0x2a050d(0x679)](_0x432579);}catch(_0x383c77){throw new _0xa87ed5(_0x2a050d(0x7a0)+_0x383c77[_0x2a050d(0x81d)],'LICENSE_ACTIVATION_INVALID');}const _0x18209c=_0x397489[_0x2a050d(0x872)][_0x2a050d(0x4b9)]('hex'),_0x24dd22=this[_0x2a050d(0x58a)][_0x2a050d(0x736)];if(!_0x24dd22||!_0x24dd22[_0x2a050d(0x6f1)](_0x1d47f1))throw new _0xa87ed5(_0x2a050d(0x226),_0x2a050d(0x543));let _0x904ad=null,_0x1d23de=null;for(const {key:_0x2ee066,value:_0x391a10}of _0x24dd22['getRange'](_0x1d47f1)){if(_0x391a10[_0x2a050d(0x55f)]===_0x18209c){_0x904ad=_0x2ee066,_0x1d23de=_0x391a10;break;}}if(!_0x904ad)throw new _0xa87ed5(_0x2a050d(0x226),_0x2a050d(0x543));const {rawBuf:_0x23d631}=_0x3c1618['decodeLicenseBlob'](_0x1d23de[_0x2a050d(0x81a)]),_0x1d3230=_0x3c1618[_0x2a050d(0x55e)]({'tokenString':_0x432579,'nodeId':this[_0x2a050d(0x58a)]['id'],'rawBlobBuf':_0x23d631,'pubKeyPem':_0x252199[_0x2a050d(0x1b9)],'pubFingerprint':_0x252199[_0x2a050d(0x476)]});if(!_0x1d3230[_0x2a050d(0x830)])throw new _0xa87ed5(_0x2a050d(0x71a)+_0x1d3230[_0x2a050d(0x4f3)],_0x2a050d(0x543),{'reason':_0x1d3230[_0x2a050d(0x4f3)]});const _0x26c75b={..._0x1d23de,'activation':_0x432579};return await _0x24dd22[_0x2a050d(0x56e)](_0x1d47f1,_0x904ad,_0x26c75b),{'id':_0x904ad,..._0x26c75b};}async['removeLicense'](_0x47db21){const _0x4d5455=_0x4a8e10,_0x21db16=this['okdb'][_0x4d5455(0x736)];if(!_0x21db16||!_0x21db16[_0x4d5455(0x6f1)](_0x1d47f1))return;await _0x21db16[_0x4d5455(0x417)](_0x1d47f1,_0x47db21);}async[_0x4a8e10(0x7b7)](){const _0x5a0743=_0x4a8e10,_0x27cf0e=this[_0x5a0743(0x58a)][_0x5a0743(0x736)];if(!_0x27cf0e||!_0x27cf0e[_0x5a0743(0x6f1)](_0x1d47f1))return[];const _0x43d482=this['okdb']['id'],_0x5670ad=[];for(const {key:_0xf03a31,value:_0x1f5440}of _0x27cf0e[_0x5a0743(0x3c9)](_0x1d47f1)){const _0x1e26cd=this['_computeStatus'](_0x1f5440,_0x43d482);_0x5670ad[_0x5a0743(0x557)]({..._0x1f5440,'id':_0xf03a31,'status':_0x1e26cd});}return _0x5670ad;}[_0x4a8e10(0x81c)](){const _0x289f1c=_0x4a8e10,_0x1a76f6=this[_0x289f1c(0x58a)][_0x289f1c(0x736)];if(!_0x1a76f6||!_0x1a76f6[_0x289f1c(0x6f1)](_0x1d47f1))return[];const _0x2f358d=this[_0x289f1c(0x58a)]['id'],_0x3ad347=[];for(const {key:_0x2cb366,value:_0x25a655}of _0x1a76f6[_0x289f1c(0x3c9)](_0x1d47f1)){if(_0x25a655[_0x289f1c(0x55f)]){if(_0x25a655['licenseType']===_0x25a01f)_0x3ad347[_0x289f1c(0x557)]({'licenseId':_0x2cb366,'pin':null});else{const _0x278007=Buffer['from'](_0x25a655[_0x289f1c(0x55f)],'hex'),{pin:_0x341964}=_0x3c1618[_0x289f1c(0x741)](_0x2f358d,_0x278007,_0x252199[_0x289f1c(0x476)]);_0x3ad347[_0x289f1c(0x557)]({'licenseId':_0x2cb366,'pin':_0x341964});}}}return _0x3ad347;}async[_0x4a8e10(0x438)](){const _0x149baa=_0x4a8e10,_0x24ca17=this['_active'];await this[_0x149baa(0x3dd)]();if(this[_0x149baa(0x691)]&&this[_0x149baa(0x691)][_0x149baa(0x1dd)]===_0x25a01f){const _0x589a3d=Math[_0x149baa(0x347)]((this['_active'][_0x149baa(0x282)]-Date['now']())/0x5265c00);this['okdb'][_0x149baa(0x689)]?.[_0x149baa(0x44f)]('⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20'+_0x589a3d+_0x149baa(0x647),{'feature':_0x149baa(0x2bb),'licensee':this[_0x149baa(0x691)][_0x149baa(0x53d)],'expiresAt':new Date(this[_0x149baa(0x691)]['expiresAt'])[_0x149baa(0x611)]()});}this[_0x149baa(0x691)]&&this[_0x149baa(0x691)][_0x149baa(0x1dd)]===_0x1ade42&&this[_0x149baa(0x58a)][_0x149baa(0x689)]?.[_0x149baa(0x44f)](_0x149baa(0x577),{'feature':'license','licensee':this[_0x149baa(0x691)][_0x149baa(0x53d)]});if(_0x24ca17&&!this['_active']){this[_0x149baa(0x58a)][_0x149baa(0x689)]?.[_0x149baa(0x44f)]('License\x20expired\x20or\x20invalidated',{'feature':_0x149baa(0x2bb)}),this[_0x149baa(0x58a)][_0x149baa(0x74a)]?.[_0x149baa(0x663)](_0x4eab4a[_0x149baa(0x31e)],{'previous':_0x24ca17});const _0x3245c9=this[_0x149baa(0x58a)][_0x149baa(0x3e9)]?.['onLicenseExpired']??_0x252199['LICENSE_EXPIRED_ACTION'];_0x3245c9===_0x149baa(0x6b6)&&(this[_0x149baa(0x58a)][_0x149baa(0x689)]?.[_0x149baa(0x6cd)](_0x149baa(0x4d1),{'feature':'license'}),this[_0x149baa(0x58a)][_0x149baa(0x6e0)]()[_0x149baa(0x39e)](()=>{})[_0x149baa(0x83f)](()=>process[_0x149baa(0x468)](0x1)));}}}return okdbLicense={'LicenseChecker':_0xdc17c1,'_C':_0x252199,'FREE_TIER':_0x3f289b},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x5eea53=_0x1a2e0d;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x16e03c=require$$0$3,_0x22f7c4=require$$0$1,_0x2b8154=require$$0,_0x133afb=require$$1,_0x4f4a35=_0x133afb[_0x5eea53(0x1c9)](_0x2b8154[_0x5eea53(0x6fa)](),_0x5eea53(0x2ec)),_0x3e6880=0x3e8,_0x3523a5={'reset':_0x5eea53(0x850),'bold':_0x5eea53(0x84b),'dim':_0x5eea53(0x583),'red':'\x1b[31m','green':'\x1b[32m','yellow':_0x5eea53(0x45a),'blue':_0x5eea53(0x707),'magenta':_0x5eea53(0x4a0),'cyan':_0x5eea53(0x26c),'white':_0x5eea53(0x798),'gray':_0x5eea53(0x5c2)},_0x2cb3d1=!process[_0x5eea53(0x498)][_0x5eea53(0x670)]||!!process.env.NO_COLOR,_0x22840b=(_0x4790b9,_0x337df9)=>_0x2cb3d1?_0x337df9:''+_0x4790b9+_0x337df9+_0x3523a5['reset'],_0x24dabd={'error':_0x3523a5[_0x5eea53(0x399)],'warn':_0x3523a5[_0x5eea53(0x5cc)],'info':_0x3523a5[_0x5eea53(0x8a8)],'debug':_0x3523a5[_0x5eea53(0x348)]},_0xdaf3d0={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x24d976(_0x279215,_0xcfebc5='info'){const _0x21b4ca=_0x5eea53,{level:_0xd4ce21,msg:_0x432c05,meta:_0x3181e7,context:_0x382082,ts:_0x3543f5}=_0x279215;if((_0xdaf3d0[_0xd4ce21]??0x1)<(_0xdaf3d0[_0xcfebc5]??0x1))return;const _0x3eb4cc=_0x22840b(_0x3523a5[_0x21b4ca(0x348)],new Date(_0x3543f5)['toISOString']()),_0x423331=_0x22840b(_0x24dabd[_0xd4ce21]??_0x3523a5[_0x21b4ca(0x5b5)],_0xd4ce21[_0x21b4ca(0x708)](0x5));let _0x174da8='\x20\x20'+_0x3eb4cc+'\x20'+_0x22840b(_0x3523a5['bold'],_0x423331)+'\x20'+_0x432c05;if(_0x3181e7&&Object[_0x21b4ca(0x818)](_0x3181e7)[_0x21b4ca(0x6ad)]>0x0){const _0x3bb4b8=Object[_0x21b4ca(0x87f)](_0x3181e7)[_0x21b4ca(0x595)](([_0x303dac,_0x54e7f2])=>_0x303dac+'='+_0x54e7f2)[_0x21b4ca(0x1c9)]('\x20');_0x174da8+=_0x22840b(_0x3523a5[_0x21b4ca(0x78f)],_0x21b4ca(0x517)+_0x3bb4b8+']');}if(_0x382082!==undefined){const _0x2db7c6=typeof _0x382082===_0x21b4ca(0x601)?JSON[_0x21b4ca(0x2d1)](_0x382082):String(_0x382082);_0x174da8+=_0x22840b(_0x3523a5['dim'],'\x20\x20'+_0x2db7c6);}const _0x3eb110=_0xd4ce21===_0x21b4ca(0x6cd)||_0xd4ce21===_0x21b4ca(0x44f)?process[_0x21b4ca(0x6d3)][_0x21b4ca(0x82b)][_0x21b4ca(0x7be)](process['stderr']):process['stdout'][_0x21b4ca(0x82b)]['bind'](process[_0x21b4ca(0x498)]);_0x3eb110(_0x174da8+'\x0a');}function _0x12839f(_0x38e1e9,_0x49c4df){const _0x3beb7a=_0x5eea53;if(_0x38e1e9===0xcc||_0x38e1e9>=0xc8&&_0x38e1e9<0x12c&&!_0x49c4df){console['log'](_0x3beb7a(0x822)+_0x22840b(_0x3523a5[_0x3beb7a(0x452)],'✓')+'\x0a');return;}if(_0x38e1e9>=0x190||_0x49c4df?.['error']){const _0xfd5830=_0x49c4df?.[_0x3beb7a(0x6cd)]??_0x49c4df?.[_0x3beb7a(0x81d)]??_0x3beb7a(0x8b7)+_0x38e1e9;console[_0x3beb7a(0x689)](_0x3beb7a(0x822)+_0x22840b(_0x3523a5[_0x3beb7a(0x399)],'✗')+'\x20'+_0x22840b(_0x3523a5[_0x3beb7a(0x49b)]+_0x3523a5[_0x3beb7a(0x399)],String(_0x38e1e9))+'\x20\x20'+_0xfd5830+'\x0a');return;}const _0x1b9cd=Object[_0x3beb7a(0x404)][_0x3beb7a(0x3e0)]['call'](_0x49c4df??{},_0x3beb7a(0x3ec))?_0x49c4df[_0x3beb7a(0x3ec)]:_0x49c4df,_0x588cbb=_0x49c4df?.[_0x3beb7a(0x74c)];console[_0x3beb7a(0x689)](''),_0x12ef18(_0x1b9cd,'\x20\x20');if(_0x588cbb?.[_0x3beb7a(0x430)]!=null||_0x588cbb?.[_0x3beb7a(0x26e)]!=null){const _0x410ed0=[];if(_0x588cbb[_0x3beb7a(0x430)]!=null)_0x410ed0['push'](_0x588cbb[_0x3beb7a(0x430)]+_0x3beb7a(0x3d3)+(_0x588cbb[_0x3beb7a(0x430)]!==0x1?'s':''));if(_0x588cbb[_0x3beb7a(0x26e)]!=null)_0x410ed0[_0x3beb7a(0x557)](_0x588cbb[_0x3beb7a(0x26e)]+'ms');console[_0x3beb7a(0x689)](_0x3beb7a(0x822)+_0x22840b(_0x3523a5[_0x3beb7a(0x78f)],_0x410ed0[_0x3beb7a(0x1c9)]('\x20\x20·\x20\x20')));}console[_0x3beb7a(0x689)]('');}function _0x12ef18(_0x2511e9,_0x1f175a=''){const _0x179baf=_0x5eea53;if(_0x2511e9===null||_0x2511e9===undefined){console[_0x179baf(0x689)](_0x1f175a+_0x22840b(_0x3523a5[_0x179baf(0x78f)],_0x179baf(0x4c1)));return;}if(Array[_0x179baf(0x59b)](_0x2511e9)){if(_0x2511e9[_0x179baf(0x6ad)]===0x0){console[_0x179baf(0x689)](_0x1f175a+_0x22840b(_0x3523a5[_0x179baf(0x78f)],'(empty)'));return;}if(_0x2511e9[_0x179baf(0x573)](_0x4d8f02=>_0x4d8f02&&typeof _0x4d8f02===_0x179baf(0x601)&&'key'in _0x4d8f02&&_0x179baf(0x352)in _0x4d8f02)){_0x12072e(_0x2511e9,_0x1f175a);return;}if(_0x2511e9['every'](_0x2c940c=>_0x2c940c&&typeof _0x2c940c===_0x179baf(0x601)&&_0x179baf(0x4fa)in _0x2c940c&&_0x179baf(0x430)in _0x2c940c)){_0x1b7411(_0x2511e9,_0x1f175a);return;}if(_0x2511e9[_0x179baf(0x573)](_0x23d283=>typeof _0x23d283!==_0x179baf(0x601)||_0x23d283===null)){_0x2511e9[_0x179baf(0x881)]((_0x523d32,_0x187477)=>console[_0x179baf(0x689)](_0x1f175a+_0x22840b(_0x3523a5[_0x179baf(0x348)],_0x187477+0x1+'.')+'\x20'+_0x22840b(_0x3523a5['white'],String(_0x523d32))));return;}_0x2511e9[_0x179baf(0x881)]((_0x2a6fa4,_0x584d4f)=>{const _0x677af0=_0x179baf;console['log'](_0x1f175a+_0x22840b(_0x3523a5[_0x677af0(0x78f)],'['+_0x584d4f+']'));if(typeof _0x2a6fa4===_0x677af0(0x601)&&_0x2a6fa4!==null)_0x5b50ae(_0x2a6fa4,_0x1f175a+'\x20\x20');else console[_0x677af0(0x689)](_0x1f175a+'\x20\x20'+String(_0x2a6fa4));});return;}if(typeof _0x2511e9===_0x179baf(0x601)){if(_0x179baf(0x47f)in _0x2511e9&&'value'in _0x2511e9&&Object[_0x179baf(0x818)](_0x2511e9)[_0x179baf(0x6ad)]<=0x3){console[_0x179baf(0x689)](_0x1f175a+_0x22840b(_0x3523a5[_0x179baf(0x49b)]+_0x3523a5['cyan'],String(_0x2511e9[_0x179baf(0x47f)])));const _0x1c7448=_0x2511e9[_0x179baf(0x352)];if(_0x1c7448&&typeof _0x1c7448===_0x179baf(0x601))_0x5b50ae(_0x1c7448,_0x1f175a);else console[_0x179baf(0x689)](_0x1f175a+_0x22840b(_0x3523a5[_0x179baf(0x5b5)],String(_0x1c7448)));return;}_0x5b50ae(_0x2511e9,_0x1f175a);return;}console[_0x179baf(0x689)](_0x1f175a+_0x22840b(_0x3523a5['white'],String(_0x2511e9)));}function _0x5b50ae(_0x289e18,_0x282826=''){const _0x140ac5=_0x5eea53,_0x2a9529=Object[_0x140ac5(0x87f)](_0x289e18);if(_0x2a9529['length']===0x0){console[_0x140ac5(0x689)](_0x282826+_0x22840b(_0x3523a5['dim'],'{}'));return;}const _0x36b9fc=Math['min'](0x1c,Math[_0x140ac5(0x413)](..._0x2a9529['map'](([_0x20ba08])=>_0x20ba08[_0x140ac5(0x6ad)])));for(const [_0x3f50f3,_0x3dfa77]of _0x2a9529){const _0x434f01=_0x22840b(_0x3523a5[_0x140ac5(0x8a8)],_0x3f50f3['padEnd'](_0x36b9fc));if(_0x3dfa77===null||_0x3dfa77===undefined)console[_0x140ac5(0x689)](_0x282826+_0x434f01+'\x20\x20'+_0x22840b(_0x3523a5['dim'],_0x140ac5(0x429)));else{if(typeof _0x3dfa77===_0x140ac5(0x601)){const _0x4840ef=JSON[_0x140ac5(0x2d1)](_0x3dfa77);_0x4840ef[_0x140ac5(0x6ad)]<=0x50?console[_0x140ac5(0x689)](_0x282826+_0x434f01+'\x20\x20'+_0x22840b(_0x3523a5[_0x140ac5(0x78f)],_0x4840ef)):(console[_0x140ac5(0x689)](_0x282826+_0x434f01),_0x12ef18(_0x3dfa77,_0x282826+'\x20\x20'));}else{const _0x42f1c3=typeof _0x3dfa77===_0x140ac5(0x29d)?_0x22840b(_0x3dfa77?_0x3523a5['green']:_0x3523a5[_0x140ac5(0x5cc)],String(_0x3dfa77)):typeof _0x3dfa77===_0x140ac5(0x72c)?_0x22840b(_0x3523a5[_0x140ac5(0x38e)],String(_0x3dfa77)):_0x22840b(_0x3523a5[_0x140ac5(0x5b5)],String(_0x3dfa77));console['log'](_0x282826+_0x434f01+'\x20\x20'+_0x42f1c3);}}}}function _0x12072e(_0x186b24,_0x51ce59=''){const _0x3acf7f=_0x5eea53,_0x21f214=Math[_0x3acf7f(0x279)](0x20,Math[_0x3acf7f(0x413)](..._0x186b24[_0x3acf7f(0x595)](_0x501869=>String(_0x501869['key'])['length'])));for(const {key:_0x420910,value:_0x426d91,score:_0x1cb14b,clock:_0xd27fe1}of _0x186b24){const _0x54e936=_0x22840b(_0x3523a5[_0x3acf7f(0x49b)]+_0x3523a5[_0x3acf7f(0x8a8)],String(_0x420910)[_0x3acf7f(0x708)](_0x21f214)),_0x49b5bf=_0x426d91==null?_0x22840b(_0x3523a5[_0x3acf7f(0x78f)],_0x3acf7f(0x429)):typeof _0x426d91==='object'?_0x22840b(_0x3523a5['dim'],JSON[_0x3acf7f(0x2d1)](_0x426d91)):_0x22840b(_0x3523a5[_0x3acf7f(0x5b5)],String(_0x426d91)),_0x546434=_0x1cb14b!=null?_0x22840b(_0x3523a5[_0x3acf7f(0x348)],_0x3acf7f(0x23f)+_0x1cb14b[_0x3acf7f(0x39b)](0x4)):'',_0x40060c=_0xd27fe1!=null?_0x22840b(_0x3523a5[_0x3acf7f(0x348)],_0x3acf7f(0x2ae)+_0xd27fe1):'';console[_0x3acf7f(0x689)](_0x51ce59+_0x54e936+'\x20\x20'+_0x49b5bf+_0x546434+_0x40060c);}}function _0x1b7411(_0x435e0c,_0x4fbf42=''){const _0x25bcf5=_0x5eea53,_0x168eb3=Math['min'](0x20,Math[_0x25bcf5(0x413)](..._0x435e0c[_0x25bcf5(0x595)](_0x352914=>_0x352914['type']['length'])));for(const {type:_0x9c8fdd,count:_0x187be3,fields:_0x3ec74e}of _0x435e0c){if(_0x9c8fdd[_0x25bcf5(0x579)]('~'))continue;const _0x12638b=_0x22840b(_0x3523a5['bold']+_0x3523a5['cyan'],_0x9c8fdd['padEnd'](_0x168eb3)),_0x4d4009=_0x22840b(_0x3523a5[_0x25bcf5(0x38e)],String(_0x187be3)[_0x25bcf5(0x7b5)](0x6))+_0x22840b(_0x3523a5['dim'],_0x25bcf5(0x4eb)),_0x49715b=_0x3ec74e&&Object[_0x25bcf5(0x818)](_0x3ec74e)[_0x25bcf5(0x6ad)]?_0x22840b(_0x3523a5['dim'],_0x25bcf5(0x3d5)+Object['keys'](_0x3ec74e)[_0x25bcf5(0x27f)](0x0,0x6)['join'](',\x20')+(Object[_0x25bcf5(0x818)](_0x3ec74e)[_0x25bcf5(0x6ad)]>0x6?'…':'')):'';console['log'](_0x4fbf42+_0x12638b+'\x20\x20'+_0x4d4009+_0x49715b);}}const _0x34aaf0=[_0x5eea53(0x427),_0x5eea53(0x292),_0x5eea53(0x290),'files/',_0x5eea53(0x826),_0x5eea53(0x266)];function _0x5931a3(_0x4c9492,_0x2977b4){const _0xc149ba=_0x5eea53;if(_0x4c9492[_0xc149ba(0x579)]('/api/'))return _0x4c9492;if(_0x4c9492[_0xc149ba(0x579)]('/'))return _0xc149ba(0x459)+_0x4c9492;if(_0x4c9492[_0xc149ba(0x579)](_0xc149ba(0x53e)))return _0xc149ba(0x506)+_0x4c9492;const _0x139c8a=_0x34aaf0['some'](_0x7505b0=>_0x4c9492===_0x7505b0[_0xc149ba(0x813)](/\/$/,'')||_0x4c9492[_0xc149ba(0x579)](_0x7505b0));return _0x139c8a?_0xc149ba(0x61a)+_0x2977b4+'/'+_0x4c9492:_0xc149ba(0x506)+_0x4c9492;}function _0x131c6c(_0x398c66){const _0x252f9d=_0x5eea53,_0x48bfd3={},_0x4031c7=[];let _0x4c43bb=0x0;while(_0x4c43bb<_0x398c66[_0x252f9d(0x6ad)]){if((_0x398c66[_0x4c43bb]===_0x252f9d(0x7e6)||_0x398c66[_0x4c43bb]==='-e')&&_0x398c66[_0x4c43bb+0x1]&&!_0x398c66[_0x4c43bb+0x1]['startsWith']('-'))_0x48bfd3[_0x252f9d(0x787)]=_0x398c66[++_0x4c43bb];else _0x398c66[_0x4c43bb]===_0x252f9d(0x62e)||_0x398c66[_0x4c43bb]==='-h'?_0x48bfd3[_0x252f9d(0x870)]=!![]:_0x4031c7['push'](_0x398c66[_0x4c43bb]);_0x4c43bb++;}return{'flags':_0x48bfd3,'rest':_0x4031c7};}const _0x4df1df={'system':_0x5eea53(0x2c6),'envs':_0x5eea53(0x4a6),'types':'Types','data':_0x5eea53(0x374),'indexes':_0x5eea53(0x57b),'fts':_0x5eea53(0x531),'sync':_0x5eea53(0x87c),'queue':_0x5eea53(0x6e3),'files':_0x5eea53(0x206),'embeddings':_0x5eea53(0x491),'engines':_0x5eea53(0x281),'admin':'Admin','event':_0x5eea53(0x5f6),'processor':_0x5eea53(0x213)},_0x1069ce=[_0x5eea53(0x7f0),'envs',_0x5eea53(0x427),_0x5eea53(0x2a3),_0x5eea53(0x261),'fts',_0x5eea53(0x6d9),_0x5eea53(0x41c),_0x5eea53(0x2a1),_0x5eea53(0x314),_0x5eea53(0x38c),'admin'];function _0x2d8572(_0x1494f4){const _0x2ec303=_0x5eea53;return _0x1494f4[_0x2ec303(0x813)](/^\/api/,'')[_0x2ec303(0x813)](/^\[\/env\/:env=[^\]]*\]/,_0x2ec303(0x41b))['replace'](/^\/env\/:env/,'env/:env')[_0x2ec303(0x813)](/^\//,'');}function _0x5b26e1(_0x334efe,_0x407e9f=''){const _0x2a2ec0=_0x5eea53,_0x9dfa74=_0x334efe[_0x2a2ec0(0x5fb)]['listRoutes']()[_0x2a2ec0(0x542)](_0xc28f37=>!_0xc28f37[_0x2a2ec0(0x74c)]?.[_0x2a2ec0(0x8c6)]),_0xff698f=_0x407e9f?_0x9dfa74[_0x2a2ec0(0x542)](_0xeda72a=>_0xeda72a[_0x2a2ec0(0x5be)][_0x2a2ec0(0x368)]()[_0x2a2ec0(0x1a1)](_0x407e9f[_0x2a2ec0(0x368)]())||(_0x22211d(_0xeda72a)??'')[_0x2a2ec0(0x368)]()['includes'](_0x407e9f[_0x2a2ec0(0x368)]())||_0x237475(_0xeda72a)[_0x2a2ec0(0x721)](_0x18a3d0=>_0x18a3d0[_0x2a2ec0(0x368)]()[_0x2a2ec0(0x1a1)](_0x407e9f['toLowerCase']()))):_0x9dfa74;if(!_0xff698f[_0x2a2ec0(0x6ad)]){console['log'](_0x22840b(_0x3523a5[_0x2a2ec0(0x5cc)],'\x0a\x20\x20No\x20routes\x20matching\x20\x22'+_0x407e9f+'\x22\x0a'));return;}const _0x5b42ef=new Map();for(const _0x53a10f of _0xff698f){const _0x1c7de9=_0x237475(_0x53a10f)[0x0]??_0x2a2ec0(0x624);if(!_0x5b42ef[_0x2a2ec0(0x2ad)](_0x1c7de9))_0x5b42ef[_0x2a2ec0(0x259)](_0x1c7de9,[]);_0x5b42ef[_0x2a2ec0(0x2fa)](_0x1c7de9)[_0x2a2ec0(0x557)](_0x53a10f);}const _0x271ea1=[..._0x1069ce[_0x2a2ec0(0x542)](_0x2bdbcf=>_0x5b42ef[_0x2a2ec0(0x2ad)](_0x2bdbcf)),...[..._0x5b42ef[_0x2a2ec0(0x818)]()][_0x2a2ec0(0x542)](_0x3325aa=>!_0x1069ce[_0x2a2ec0(0x1a1)](_0x3325aa))];console[_0x2a2ec0(0x689)]('');for(const _0x2199df of _0x271ea1){const _0x1deffa=_0x5b42ef[_0x2a2ec0(0x2fa)](_0x2199df);if(!_0x1deffa?.['length'])continue;console[_0x2a2ec0(0x689)](_0x22840b(_0x3523a5[_0x2a2ec0(0x49b)],'\x20\x20'+(_0x4df1df[_0x2199df]??_0x2199df)));for(const _0x1925e2 of _0x1deffa){const _0x476ee8=_0x22840b(_0x3523a5[_0x2a2ec0(0x38e)],_0x1925e2[_0x2a2ec0(0x225)][_0x2a2ec0(0x708)](0x7)),_0xa02e7e=_0x22840b(_0x3523a5[_0x2a2ec0(0x8a8)],_0x2d8572(_0x1925e2['path'])),_0x2fa878=_0x22211d(_0x1925e2)?_0x22840b(_0x3523a5['dim'],'\x20\x20'+_0x22211d(_0x1925e2)):'',_0x549d66=_0x1925e2['operation']?.['id']?_0x22840b(_0x3523a5[_0x2a2ec0(0x348)],_0x2a2ec0(0x517)+_0x1925e2['operation']['id']+']'):'';console[_0x2a2ec0(0x689)]('\x20\x20\x20\x20'+_0x476ee8+'\x20'+_0xa02e7e+_0x2fa878+_0x549d66);}console['log']('');}}function _0x3f3ed1(_0x2b6ff6,_0x44cd60){const _0x3a2632=_0x5eea53,_0x3f58ce=_0x44cd60['replace'](/^\/api(\/env\/[^/]+)?\//,'')[_0x3a2632(0x84e)]('/')[0x0],_0x362b54=_0x2b6ff6[_0x3a2632(0x5fb)][_0x3a2632(0x4aa)]()[_0x3a2632(0x542)](_0x52b3b4=>_0x52b3b4[_0x3a2632(0x5be)][_0x3a2632(0x368)]()[_0x3a2632(0x1a1)](_0x3f58ce[_0x3a2632(0x368)]()));if(!_0x362b54['length']){console['log'](_0x22840b(_0x3523a5['yellow'],_0x3a2632(0x634)+_0x44cd60+'\x0a'));return;}console['log']('');for(const _0x340916 of _0x362b54[_0x3a2632(0x27f)](0x0,0xc)){for(const _0x47c3dd of _0x583be1(_0x340916)){console['log'](_0x47c3dd);}console[_0x3a2632(0x689)]('');}}function _0x22211d(_0x7c9848){const _0x4a0eb2=_0x5eea53;return _0x7c9848[_0x4a0eb2(0x8b3)]?.['summary']??_0x7c9848[_0x4a0eb2(0x74c)]?.['summary']??'';}function _0x2253f5(_0x3f4182){const _0x18612e=_0x5eea53;return _0x3f4182[_0x18612e(0x8b3)]?.[_0x18612e(0x1ba)]??_0x3f4182['meta']?.[_0x18612e(0x1ba)]??'';}function _0x237475(_0x2f145d){const _0x5cb944=_0x5eea53;return _0x2f145d[_0x5cb944(0x8b3)]?.[_0x5cb944(0x33c)]?.[_0x5cb944(0x6ad)]?_0x2f145d['operation'][_0x5cb944(0x33c)]:_0x2f145d[_0x5cb944(0x74c)]?.[_0x5cb944(0x33c)]??[];}function _0x583be1(_0x434542){const _0x4b3919=_0x5eea53,_0x381be2=[];_0x381be2[_0x4b3919(0x557)]('\x20\x20'+_0x22840b(_0x3523a5['bold']+_0x3523a5[_0x4b3919(0x38e)],_0x434542[_0x4b3919(0x225)][_0x4b3919(0x708)](0x7))+'\x20'+_0x22840b(_0x3523a5[_0x4b3919(0x49b)]+_0x3523a5['cyan'],_0x434542[_0x4b3919(0x5be)]));_0x434542[_0x4b3919(0x8b3)]?.['id']&&_0x381be2[_0x4b3919(0x557)](_0x4b3919(0x421)+_0x22840b(_0x3523a5[_0x4b3919(0x348)],_0x4b3919(0x3f4)+_0x434542['operation']['id']));_0x22211d(_0x434542)&&_0x381be2[_0x4b3919(0x557)](_0x4b3919(0x421)+_0x22840b(_0x3523a5[_0x4b3919(0x5b5)],_0x22211d(_0x434542)));_0x2253f5(_0x434542)&&_0x381be2[_0x4b3919(0x557)](_0x4b3919(0x421)+_0x22840b(_0x3523a5[_0x4b3919(0x78f)],_0x2253f5(_0x434542)));_0x237475(_0x434542)['length']&&_0x381be2[_0x4b3919(0x557)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x22840b(_0x3523a5['gray'],_0x4b3919(0x503)+_0x237475(_0x434542)[_0x4b3919(0x1c9)](',\x20')));_0x434542['operation']?.[_0x4b3919(0x310)]?.['access']&&_0x381be2[_0x4b3919(0x557)](_0x4b3919(0x421)+_0x22840b(_0x3523a5[_0x4b3919(0x348)],'access:\x20'+_0x434542['operation'][_0x4b3919(0x310)]['access']));_0x434542[_0x4b3919(0x8b3)]?.['http']?.[_0x4b3919(0x358)]&&_0x434542[_0x4b3919(0x8b3)][_0x4b3919(0x5fb)][_0x4b3919(0x358)]!==_0x4b3919(0x382)&&_0x381be2[_0x4b3919(0x557)](_0x4b3919(0x421)+_0x22840b(_0x3523a5[_0x4b3919(0x348)],_0x4b3919(0x730)+_0x434542[_0x4b3919(0x8b3)][_0x4b3919(0x5fb)][_0x4b3919(0x358)]));if(_0x434542[_0x4b3919(0x8b3)]?.['inputSchema']){const _0x551f00=Object[_0x4b3919(0x818)](_0x434542[_0x4b3919(0x8b3)]['inputSchema']['properties']||{});if(_0x551f00[_0x4b3919(0x6ad)])_0x381be2[_0x4b3919(0x557)](_0x4b3919(0x421)+_0x22840b(_0x3523a5[_0x4b3919(0x348)],_0x4b3919(0x2d3)+_0x551f00[_0x4b3919(0x1c9)](',\x20')));}return _0x434542[_0x4b3919(0x74c)]?.['body']&&_0x381be2[_0x4b3919(0x557)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x22840b(_0x3523a5[_0x4b3919(0x348)],_0x4b3919(0x51d)+JSON['stringify'](_0x434542[_0x4b3919(0x74c)][_0x4b3919(0x246)]))),_0x381be2;}async function _0x5023ee(_0x22fb81,_0x1d0d9f,_0x1515e2,_0x2b7343=null){const _0x56917e=_0x5eea53,_0x2ea71c=_0x1515e2[_0x56917e(0x196)]('?'),_0x37cd95=_0x2ea71c>=0x0?_0x1515e2[_0x56917e(0x27f)](0x0,_0x2ea71c):_0x1515e2,_0x597937=_0x2ea71c>=0x0?_0x1515e2[_0x56917e(0x27f)](_0x2ea71c+0x1):'',_0x160732=Object['fromEntries'](new URLSearchParams(_0x597937)['entries']());return _0x22fb81['http'][_0x56917e(0x88f)](_0x1d0d9f,_0x37cd95,{'body':_0x2b7343,'query':_0x160732,'headers':{'content-type':'application/json'}},{'internal':!![]});}function _0x31ba4a(_0x4d02ec){const _0x16f888=_0x5eea53;if(!_0x4d02ec)return null;const _0x36c0b8=_0x4d02ec[_0x16f888(0x48b)]();if(!_0x36c0b8)return null;try{return JSON[_0x16f888(0x7d3)](_0x36c0b8);}catch{}try{return JSON[_0x16f888(0x7d3)](_0x1923b5(_0x36c0b8));}catch(_0xa6b930){throw new SyntaxError(_0xa6b930[_0x16f888(0x81d)],{'cause':_0xa6b930});}}function _0x1923b5(_0x7c939b){const _0xa8601d=_0x5eea53;let _0x35a1ad='',_0x133b3c=0x0;while(_0x133b3c<_0x7c939b[_0xa8601d(0x6ad)]){const _0x281e8a=_0x7c939b[_0x133b3c];if(_0x281e8a==='\x22'){_0x35a1ad+='\x22',_0x133b3c++;while(_0x133b3c<_0x7c939b[_0xa8601d(0x6ad)]&&_0x7c939b[_0x133b3c]!=='\x22'){if(_0x7c939b[_0x133b3c]==='\x5c'){_0x35a1ad+=_0x7c939b[_0x133b3c++];if(_0x133b3c<_0x7c939b[_0xa8601d(0x6ad)])_0x35a1ad+=_0x7c939b[_0x133b3c++];}else _0x35a1ad+=_0x7c939b[_0x133b3c++];}_0x35a1ad+='\x22';if(_0x133b3c<_0x7c939b[_0xa8601d(0x6ad)])_0x133b3c++;continue;}if(_0x281e8a==='\x27'){_0x35a1ad+='\x22',_0x133b3c++;while(_0x133b3c<_0x7c939b[_0xa8601d(0x6ad)]&&_0x7c939b[_0x133b3c]!=='\x27'){if(_0x7c939b[_0x133b3c]==='\x5c'&&_0x7c939b[_0x133b3c+0x1]==='\x27')_0x35a1ad+='\x27',_0x133b3c+=0x2;else _0x7c939b[_0x133b3c]==='\x22'?(_0x35a1ad+='\x5c\x22',_0x133b3c++):_0x35a1ad+=_0x7c939b[_0x133b3c++];}_0x35a1ad+='\x22';if(_0x133b3c<_0x7c939b[_0xa8601d(0x6ad)])_0x133b3c++;continue;}if(_0xa8601d(0x884)[_0xa8601d(0x1a1)](_0x281e8a)){_0x35a1ad+=_0x281e8a,_0x133b3c++;continue;}let _0x4143fa='';while(_0x133b3c<_0x7c939b['length']&&!_0xa8601d(0x5bd)['includes'](_0x7c939b[_0x133b3c])&&_0x7c939b[_0x133b3c]!=='\x20'&&_0x7c939b[_0x133b3c]!=='\x09'&&_0x7c939b[_0x133b3c]!=='\x0a'&&_0x7c939b[_0x133b3c]!=='\x0d'){_0x4143fa+=_0x7c939b[_0x133b3c++];}let _0x23f491=_0x133b3c;while(_0x23f491<_0x7c939b[_0xa8601d(0x6ad)]&&(_0x7c939b[_0x23f491]==='\x20'||_0x7c939b[_0x23f491]==='\x09'))_0x23f491++;if(_0x7c939b[_0x23f491]===':')_0x35a1ad+='\x22'+_0x4143fa+'\x22';else _0x4143fa===_0xa8601d(0x7c4)||_0x4143fa===_0xa8601d(0x51e)||_0x4143fa===_0xa8601d(0x429)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/['test'](_0x4143fa)?_0x35a1ad+=_0x4143fa:_0x35a1ad+='\x22'+_0x4143fa+'\x22';}return _0x35a1ad[_0xa8601d(0x813)](/,(\s*[}\]])/g,'$1');}function _0x1b9b51(_0x756e28){const _0x225c75=_0x5eea53,_0x1de8ce=[];let _0x120c95=0x0;while(_0x120c95<_0x756e28[_0x225c75(0x6ad)]){while(_0x120c95<_0x756e28[_0x225c75(0x6ad)]&&(_0x756e28[_0x120c95]==='\x20'||_0x756e28[_0x120c95]==='\x09'))_0x120c95++;if(_0x120c95>=_0x756e28['length'])break;const _0x30ac7c=_0x756e28[_0x120c95];if(_0x30ac7c==='{'||_0x30ac7c==='['){const _0x5a03fe=_0x30ac7c==='{'?'}':']',_0x557382=_0x120c95++;let _0xd82ea2=0x1,_0x290cec=![],_0x48c957='';while(_0x120c95<_0x756e28[_0x225c75(0x6ad)]&&_0xd82ea2>0x0){const _0x3b4322=_0x756e28[_0x120c95];if(_0x290cec){if(_0x3b4322==='\x5c')_0x120c95++;else{if(_0x3b4322===_0x48c957)_0x290cec=![];}}else{if(_0x3b4322==='\x22'||_0x3b4322==='\x27')_0x290cec=!![],_0x48c957=_0x3b4322;else{if(_0x3b4322===_0x30ac7c)_0xd82ea2++;else{if(_0x3b4322===_0x5a03fe)_0xd82ea2--;}}}_0x120c95++;}_0x1de8ce['push'](_0x756e28[_0x225c75(0x27f)](_0x557382,_0x120c95));continue;}if(_0x30ac7c==='\x22'||_0x30ac7c==='\x27'){const _0x3eb875=_0x30ac7c;_0x120c95++;let _0xc989ce='';while(_0x120c95<_0x756e28[_0x225c75(0x6ad)]&&_0x756e28[_0x120c95]!==_0x3eb875){if(_0x756e28[_0x120c95]==='\x5c'&&_0x120c95+0x1<_0x756e28['length'])_0x120c95++,_0xc989ce+=_0x756e28[_0x120c95++];else _0xc989ce+=_0x756e28[_0x120c95++];}if(_0x120c95<_0x756e28[_0x225c75(0x6ad)])_0x120c95++;_0x1de8ce['push'](_0xc989ce);continue;}let _0x23e2ee='';while(_0x120c95<_0x756e28[_0x225c75(0x6ad)]&&_0x756e28[_0x120c95]!=='\x20'&&_0x756e28[_0x120c95]!=='\x09'&&_0x756e28[_0x120c95]!=='{'&&_0x756e28[_0x120c95]!=='['){_0x23e2ee+=_0x756e28[_0x120c95++];}if(_0x23e2ee)_0x1de8ce[_0x225c75(0x557)](_0x23e2ee);}return _0x1de8ce;}function _0x3e8fd6(_0x149369,_0x53323d){const _0x238831=_0x5eea53,_0x9c6ef5=[..._0x149369['_envs'][_0x238831(0x818)]()][_0x238831(0x542)](_0xb45512=>!_0xb45512['startsWith']('~'));console['log'](['',_0x22840b(_0x3523a5[_0x238831(0x49b)]+_0x3523a5[_0x238831(0x8a8)],_0x238831(0x53c)),_0x22840b(_0x3523a5['bold']+_0x3523a5[_0x238831(0x8a8)],_0x238831(0x57f))+_0x22840b(_0x3523a5['bold'],'\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20')+_0x22840b(_0x3523a5[_0x238831(0x49b)]+_0x3523a5[_0x238831(0x8a8)],'║'),_0x22840b(_0x3523a5['bold']+_0x3523a5[_0x238831(0x8a8)],'\x20\x20╚═══════════════════════════╝'),'','\x20\x20'+_0x22840b(_0x3523a5[_0x238831(0x452)],'✓')+'\x20'+_0x22840b(_0x3523a5[_0x238831(0x49b)],_0x238831(0x72d))+_0x238831(0x51b)+_0x53323d['port'],..._0x53323d[_0x238831(0x783)]>0x1?['\x20\x20'+_0x22840b(_0x3523a5['green'],'✓')+'\x20'+_0x22840b(_0x3523a5[_0x238831(0x49b)],_0x238831(0x60a))+'\x20'+_0x53323d[_0x238831(0x783)]+_0x238831(0x67a)+_0x22840b(_0x3523a5['gray'],'(primary\x20=\x20processor)')]:[],'\x20\x20'+_0x22840b(_0x3523a5[_0x238831(0x452)],'✓')+'\x20'+_0x22840b(_0x3523a5[_0x238831(0x49b)],'api')+_0x238831(0x7f6)+_0x53323d[_0x238831(0x397)]+'/api','\x20\x20'+_0x22840b(_0x3523a5[_0x238831(0x452)],'✓')+'\x20'+_0x22840b(_0x3523a5['bold'],_0x238831(0x5be))+_0x238831(0x86f)+_0x53323d[_0x238831(0x336)],'\x20\x20'+_0x22840b(_0x3523a5[_0x238831(0x452)],'✓')+'\x20'+_0x22840b(_0x3523a5['bold'],'id')+_0x238831(0x198)+_0x22840b(_0x3523a5[_0x238831(0x348)],_0x149369['id']),'\x20\x20'+_0x22840b(_0x3523a5[_0x238831(0x452)],'✓')+'\x20'+_0x22840b(_0x3523a5[_0x238831(0x49b)],'envs')+_0x238831(0x86f)+_0x9c6ef5[_0x238831(0x595)](_0x38109c=>_0x22840b(_0x3523a5[_0x238831(0x8a8)],_0x38109c))[_0x238831(0x1c9)]('\x20\x20'),..._0x53323d[_0x238831(0x69b)]?[]:['\x20\x20'+_0x22840b(_0x3523a5[_0x238831(0x452)],'✓')+'\x20'+_0x22840b(_0x3523a5[_0x238831(0x49b)],'admin')+_0x238831(0x49a)+_0x53323d[_0x238831(0x397)]+'/admin/index.html'],'',_0x22840b(_0x3523a5['dim'],_0x238831(0x415)+_0x22840b(_0x3523a5['bold'],'help')+'\x20for\x20commands,\x20'+_0x22840b(_0x3523a5[_0x238831(0x49b)],_0x238831(0x280))+_0x238831(0x7f9)+_0x22840b(_0x3523a5['bold'],_0x238831(0x468))+'\x20to\x20quit.'),''][_0x238831(0x1c9)]('\x0a'));}function _0x1ce3a6(_0x4c9dbe){const _0x55dda0=_0x5eea53;console[_0x55dda0(0x689)]('\x0a'+_0x22840b(_0x3523a5[_0x55dda0(0x49b)],_0x55dda0(0x62d))+'\x20\x20'+_0x22840b(_0x3523a5[_0x55dda0(0x78f)],_0x55dda0(0x702))+'\x0a\x0a\x20\x20'+_0x22840b(_0x3523a5[_0x55dda0(0x8a8)],'<path>')+_0x55dda0(0x603)+_0x22840b(_0x3523a5[_0x55dda0(0x8a8)],_0x55dda0(0x65d))+'\x20'+_0x22840b(_0x3523a5[_0x55dda0(0x5cc)],_0x55dda0(0x631))+_0x55dda0(0x7c3)+_0x22840b(_0x3523a5[_0x55dda0(0x8a8)],_0x55dda0(0x779))+'\x20'+_0x22840b(_0x3523a5[_0x55dda0(0x8a8)],_0x55dda0(0x65d))+'\x20'+_0x22840b(_0x3523a5['yellow'],'[body]')+'\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20'+_0x22840b(_0x3523a5[_0x55dda0(0x78f)],_0x55dda0(0x7fa))+'\x0a\x20\x20\x20\x20'+_0x22840b(_0x3523a5[_0x55dda0(0x348)],_0x55dda0(0x56c))+_0x55dda0(0x550)+_0x22840b(_0x3523a5[_0x55dda0(0x348)],_0x55dda0(0x7f3))+_0x55dda0(0x1a7)+_0x22840b(_0x3523a5[_0x55dda0(0x348)],_0x55dda0(0x427))+'\x20\x20\x20\x20\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/'+_0x4c9dbe[_0x55dda0(0x787)]+_0x55dda0(0x4e7)+_0x22840b(_0x3523a5[_0x55dda0(0x348)],'type/users')+_0x55dda0(0x7a1)+_0x4c9dbe[_0x55dda0(0x787)]+_0x55dda0(0x1d4)+_0x22840b(_0x3523a5[_0x55dda0(0x348)],_0x55dda0(0x289))+_0x55dda0(0x2ee)+_0x4c9dbe[_0x55dda0(0x787)]+_0x55dda0(0x892)+_0x22840b(_0x3523a5[_0x55dda0(0x348)],_0x55dda0(0x426))+_0x55dda0(0x443)+_0x4c9dbe[_0x55dda0(0x787)]+'/type/users/query\x0a\x20\x20\x20\x20'+_0x22840b(_0x3523a5[_0x55dda0(0x348)],_0x55dda0(0x797))+'\x0a\x20\x20\x20\x20'+_0x22840b(_0x3523a5[_0x55dda0(0x348)],_0x55dda0(0x729))+_0x55dda0(0x499)+_0x22840b(_0x3523a5[_0x55dda0(0x348)],_0x55dda0(0x396))+'\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'+_0x22840b(_0x3523a5[_0x55dda0(0x49b)],_0x55dda0(0x7d6))+'\x20\x20'+_0x22840b(_0x3523a5[_0x55dda0(0x78f)],_0x55dda0(0x252))+_0x55dda0(0x620)+_0x22840b(_0x3523a5['cyan'],_0x55dda0(0x2ab))+_0x55dda0(0x6bc)+_0x22840b(_0x3523a5[_0x55dda0(0x8a8)],_0x55dda0(0x62e))+_0x55dda0(0x5b1)+_0x22840b(_0x3523a5['dim'],'Examples')+'\x0a\x20\x20\x20\x20'+_0x22840b(_0x3523a5[_0x55dda0(0x348)],'types\x20--env\x20staging')+_0x55dda0(0x499)+_0x22840b(_0x3523a5[_0x55dda0(0x348)],_0x55dda0(0x3fa))+_0x55dda0(0x499)+_0x22840b(_0x3523a5['gray'],_0x55dda0(0x1ab))+'\x0a\x0a'+_0x22840b(_0x3523a5[_0x55dda0(0x49b)],_0x55dda0(0x211))+'\x0a\x0a\x20\x20'+_0x22840b(_0x3523a5['cyan'],_0x55dda0(0x3b4))+_0x55dda0(0x22b)+_0x22840b(_0x3523a5[_0x55dda0(0x8a8)],_0x55dda0(0x787))+_0x55dda0(0x7b2)+_0x22840b(_0x3523a5['cyan'],_0x55dda0(0x280))+'\x20'+_0x22840b(_0x3523a5['dim'],_0x55dda0(0x793))+_0x55dda0(0x6f5)+_0x22840b(_0x3523a5['cyan'],_0x55dda0(0x827))+'\x20'+_0x22840b(_0x3523a5[_0x55dda0(0x78f)],_0x55dda0(0x442))+_0x55dda0(0x1d1)+_0x22840b(_0x3523a5[_0x55dda0(0x8a8)],_0x55dda0(0x5f0))+_0x55dda0(0x6f8)+_0x22840b(_0x3523a5[_0x55dda0(0x8a8)],_0x55dda0(0x870))+_0x55dda0(0x327)+_0x22840b(_0x3523a5[_0x55dda0(0x8a8)],_0x55dda0(0x468))+'\x20'+_0x22840b(_0x3523a5['dim'],_0x55dda0(0x2ac))+_0x55dda0(0x82a));}let _0x1b9073=![];async function _0x21fd38(_0xc65779,_0x7cc77=0x0,_0x324f38=null){const _0x72dd4d=_0x5eea53;_0x1b9073&&(process['stderr'][_0x72dd4d(0x82b)](_0x22840b(_0x3523a5[_0x72dd4d(0x399)],_0x72dd4d(0x6ec))),process[_0x72dd4d(0x468)](0x82));_0x1b9073=!![],process[_0x72dd4d(0x498)][_0x72dd4d(0x82b)]('\x0a'),process[_0x72dd4d(0x6d3)][_0x72dd4d(0x82b)](_0x22840b(_0x3523a5['yellow'],'\x20\x20[okdb]\x20'+(_0x324f38?_0x72dd4d(0x5a3)+_0x324f38+',\x20':'')+_0x72dd4d(0x5d9)));const _0xe62be0=setTimeout(()=>{const _0x36700e=_0x72dd4d;process['stderr'][_0x36700e(0x82b)](_0x22840b(_0x3523a5[_0x36700e(0x399)],'\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a')),process['exit'](0x1);},0x1388);try{await _0xc65779[_0x72dd4d(0x6e0)]();}catch(_0x481411){console[_0x72dd4d(0x6cd)](_0x22840b(_0x3523a5[_0x72dd4d(0x399)],'\x20\x20'+_0x481411['message']));}clearTimeout(_0xe62be0),process[_0x72dd4d(0x6d3)][_0x72dd4d(0x82b)](_0x22840b(_0x3523a5[_0x72dd4d(0x78f)],'\x20\x20[okdb]\x20closed\x20cleanly\x0a')),process[_0x72dd4d(0x468)](_0x7cc77);}function _0x14a4d4(_0x41729b){const _0x1b9820=_0x5eea53,_0x1614e5=_0x41729b[_0x1b9820(0x787)]!==_0x1b9820(0x7eb)?_0x22840b(_0x3523a5[_0x1b9820(0x5cc)],'['+_0x41729b[_0x1b9820(0x787)]+']'):'';return _0x22840b(_0x3523a5['bold']+_0x3523a5[_0x1b9820(0x8a8)],_0x1b9820(0x58a))+_0x1614e5+_0x22840b(_0x3523a5['gray'],'>\x20');}const _0x241da1=new Set([_0x5eea53(0x318),'POST',_0x5eea53(0x488),_0x5eea53(0x597),_0x5eea53(0x32e)]);async function _0x137ced(_0x401f85,_0xffb647,_0x454830,_0x58b851,_0xf1d529,_0x208d96){const _0x1418d3=_0x5eea53;_0x401f85=_0x401f85[_0x1418d3(0x48b)]();if(!_0x401f85||_0x401f85[_0x1418d3(0x579)]('#'))return;const _0x3c3da6=_0x1b9b51(_0x401f85),{flags:_0x381ea4,rest:_0x322e1e}=_0x131c6c(_0x3c3da6);if(!_0x322e1e[_0x1418d3(0x6ad)])return;const _0x1fdf4c=_0x322e1e[0x0],_0x2793c1=_0x1fdf4c[_0x1418d3(0x2e6)]();if(_0x2793c1===_0x1418d3(0x75f)){if(_0x322e1e[0x1])_0x3f3ed1(_0xffb647,_0x5931a3(_0x322e1e[0x1],_0x381ea4['env']??_0xf1d529[_0x1418d3(0x787)]));else _0x1ce3a6(_0xf1d529);return;}if(_0x2793c1===_0x1418d3(0x6a9)){const _0x2eae4b=_0x322e1e[0x1];if(!_0x2eae4b){console['log'](_0x22840b(_0x3523a5['red'],_0x1418d3(0x1c5)));return;}try{_0xffb647['env'](_0x2eae4b),_0xf1d529['env']=_0x2eae4b,_0x208d96?.[_0x1418d3(0x868)](_0x14a4d4(_0xf1d529)),console['log']('\x0a\x20\x20'+_0x22840b(_0x3523a5[_0x1418d3(0x452)],'✓')+'\x20active\x20env:\x20'+_0x22840b(_0x3523a5['bold']+_0x3523a5[_0x1418d3(0x8a8)],_0x2eae4b)+'\x0a');}catch{console[_0x1418d3(0x689)]('\x0a\x20\x20'+_0x22840b(_0x3523a5[_0x1418d3(0x399)],'✗')+_0x1418d3(0x32c)+_0x22840b(_0x3523a5['bold'],_0x2eae4b)+'\x20not\x20found'+_0x22840b(_0x3523a5[_0x1418d3(0x78f)],_0x1418d3(0x686)));}return;}if(_0x2793c1===_0x1418d3(0x303)){const _0x504d2c=[..._0xffb647[_0x1418d3(0x41e)][_0x1418d3(0x818)]()][_0x1418d3(0x542)](_0x159ee0=>!_0x159ee0['startsWith']('~'));console['log']('');for(const _0x402e07 of _0x504d2c){const _0x57418d=_0x402e07===_0xf1d529['env'];console['log']('\x20\x20'+(_0x57418d?_0x22840b(_0x3523a5[_0x1418d3(0x452)],'●'):_0x22840b(_0x3523a5[_0x1418d3(0x78f)],'○'))+'\x20\x20'+(_0x57418d?_0x22840b(_0x3523a5[_0x1418d3(0x49b)]+_0x3523a5['cyan'],_0x402e07):_0x22840b(_0x3523a5[_0x1418d3(0x78f)],_0x402e07)));}console[_0x1418d3(0x689)](_0x1418d3(0x822)+_0x22840b(_0x3523a5[_0x1418d3(0x78f)],_0x1418d3(0x72f))+'\x20'+_0x22840b(_0x3523a5[_0x1418d3(0x8a8)],_0xf1d529['env'])),console[_0x1418d3(0x689)]('');return;}if(_0x2793c1===_0x1418d3(0x223)){const _0x37059d=[..._0xffb647[_0x1418d3(0x41e)][_0x1418d3(0x722)]()][_0x1418d3(0x542)](_0x443cc0=>!_0x443cc0[_0x1418d3(0x4f9)][_0x1418d3(0x579)]('~'));console[_0x1418d3(0x689)]('');const _0x3bd803=Math['max'](..._0x37059d[_0x1418d3(0x595)](_0x5085a9=>_0x5085a9['name'][_0x1418d3(0x6ad)]));for(const _0x47e906 of _0x37059d){const _0x24640e=_0x47e906[_0x1418d3(0x4f9)]===_0xf1d529['env'],_0x3c29e7=_0x24640e?_0x22840b(_0x3523a5[_0x1418d3(0x452)],'●'):_0x22840b(_0x3523a5[_0x1418d3(0x78f)],'○'),_0x2caee4=_0x24640e?_0x22840b(_0x3523a5[_0x1418d3(0x49b)]+_0x3523a5['cyan'],_0x47e906[_0x1418d3(0x4f9)][_0x1418d3(0x708)](_0x3bd803)):_0x22840b(_0x3523a5['dim'],_0x47e906[_0x1418d3(0x4f9)][_0x1418d3(0x708)](_0x3bd803)),_0x51123f=[..._0x47e906[_0x1418d3(0x321)][_0x1418d3(0x818)]()]['filter'](_0x50eba7=>!_0x50eba7[_0x1418d3(0x579)]('~')),_0xf0c88f=_0x51123f['length']?_0x22840b(_0x3523a5['dim'],_0x51123f[_0x1418d3(0x27f)](0x0,0x5)[_0x1418d3(0x1c9)](',\x20')+(_0x51123f[_0x1418d3(0x6ad)]>0x5?_0x1418d3(0x877)+(_0x51123f[_0x1418d3(0x6ad)]-0x5)+_0x1418d3(0x389):'')):_0x22840b(_0x3523a5['dim'],'(no\x20types)');console[_0x1418d3(0x689)]('\x20\x20'+_0x3c29e7+'\x20\x20'+_0x2caee4+'\x20\x20'+_0xf0c88f);}console[_0x1418d3(0x689)]('');return;}if(_0x2793c1===_0x1418d3(0x1a3)){const _0x3ab63c=_0x381ea4[_0x1418d3(0x787)]??_0x322e1e[0x1]??_0xf1d529[_0x1418d3(0x787)];try{const _0xebf642=_0xffb647[_0x1418d3(0x787)](_0x3ab63c),_0x1afa25=[..._0xebf642[_0x1418d3(0x321)][_0x1418d3(0x818)]()][_0x1418d3(0x542)](_0x358db9=>!_0x358db9[_0x1418d3(0x579)]('~'))['sort']();console[_0x1418d3(0x689)](_0x1418d3(0x822)+_0x22840b(_0x3523a5[_0x1418d3(0x78f)],_0x1afa25['length']+_0x1418d3(0x390)+(_0x1afa25[_0x1418d3(0x6ad)]!==0x1?'s':'')+_0x1418d3(0x1c7)+_0x3ab63c));for(const _0x4cde7c of _0x1afa25){const _0x29094a=_0xebf642[_0x1418d3(0x321)][_0x1418d3(0x2fa)](_0x4cde7c),_0x208043=_0x29094a?.[_0x1418d3(0x2a3)]?.[_0x1418d3(0x34c)]?.()??0x0,_0x5add25=_0x22840b(_0x3523a5['bold']+_0x3523a5[_0x1418d3(0x8a8)],_0x4cde7c[_0x1418d3(0x708)](0x1c));console['log'](_0x1418d3(0x86f)+_0x5add25+'\x20\x20'+_0x22840b(_0x3523a5[_0x1418d3(0x38e)],String(_0x208043)[_0x1418d3(0x7b5)](0x6))+'\x20'+_0x22840b(_0x3523a5['dim'],'records'));}console[_0x1418d3(0x689)]('');}catch(_0x4c4bf2){console[_0x1418d3(0x6cd)](_0x22840b(_0x3523a5['red'],'\x0a\x20\x20'+_0x4c4bf2[_0x1418d3(0x81d)]+'\x0a'));}return;}if(_0x2793c1===_0x1418d3(0x89e)){_0x5b26e1(_0xffb647,_0x322e1e[_0x1418d3(0x27f)](0x1)[_0x1418d3(0x1c9)]('\x20'));return;}if(_0x2793c1===_0x1418d3(0x807)){const _0x3b3c5e=(_0x322e1e[0x1]??'')[_0x1418d3(0x368)]();if(!_0x3b3c5e||_0x3b3c5e==='on')_0x58b851[_0x1418d3(0x487)]=!![],_0x58b851[_0x1418d3(0x682)]='info',console[_0x1418d3(0x689)](_0x1418d3(0x822)+_0x22840b(_0x3523a5[_0x1418d3(0x452)],'✓')+_0x1418d3(0x858)+_0x22840b(_0x3523a5[_0x1418d3(0x78f)],_0x1418d3(0x1fd))+'\x0a');else{if(_0x3b3c5e===_0x1418d3(0x804))_0x58b851[_0x1418d3(0x487)]=![],console[_0x1418d3(0x689)](_0x1418d3(0x822)+_0x22840b(_0x3523a5[_0x1418d3(0x5cc)],'○')+_0x1418d3(0x706));else _0xdaf3d0[_0x3b3c5e]!==undefined?(_0x58b851['enabled']=!![],_0x58b851[_0x1418d3(0x682)]=_0x3b3c5e,console['log'](_0x1418d3(0x822)+_0x22840b(_0x3523a5['green'],'✓')+_0x1418d3(0x388)+_0x22840b(_0x3523a5['bold'],_0x3b3c5e)+'\x0a')):console[_0x1418d3(0x6cd)](_0x22840b(_0x3523a5['red'],_0x1418d3(0x3aa)));}return;}if(_0x2793c1===_0x1418d3(0x86b)||_0x2793c1===_0x1418d3(0x856)){await _0x21fd38(_0xffb647,0x0);return;}if(_0x2793c1===_0x1418d3(0x3ea)){const _0x56758f='http://localhost:'+_0x454830[_0x1418d3(0x397)]+'/admin/index.html',_0x2ef25e=process[_0x1418d3(0x202)]===_0x1418d3(0x723)?_0x1418d3(0x85c)+_0x56758f:process[_0x1418d3(0x202)]===_0x1418d3(0x6e2)?_0x1418d3(0x66b)+_0x56758f:_0x1418d3(0x6c2)+_0x56758f;require$$4[_0x1418d3(0x607)](_0x2ef25e),console[_0x1418d3(0x689)](_0x1418d3(0x822)+_0x22840b(_0x3523a5[_0x1418d3(0x452)],'✓')+_0x1418d3(0x62a)+_0x22840b(_0x3523a5[_0x1418d3(0x8a8)],_0x56758f)+'\x0a');return;}let _0x5ad06d,_0x28029a,_0x566b4c;if(_0x241da1[_0x1418d3(0x2ad)](_0x2793c1)){_0x5ad06d=_0x2793c1,_0x28029a=_0x322e1e[0x1],_0x566b4c=_0x322e1e[_0x1418d3(0x27f)](0x2);if(!_0x28029a){console[_0x1418d3(0x6cd)](_0x22840b(_0x3523a5[_0x1418d3(0x399)],_0x1418d3(0x77a)+_0x1fdf4c+_0x1418d3(0x411)));return;}}else _0x5ad06d=null,_0x28029a=_0x322e1e[0x0],_0x566b4c=_0x322e1e[_0x1418d3(0x27f)](0x1);const _0x1d5000=_0x381ea4[_0x1418d3(0x787)]??_0xf1d529[_0x1418d3(0x787)],_0x204db7=_0x5931a3(_0x28029a,_0x1d5000);if(_0x381ea4[_0x1418d3(0x870)]){_0x3f3ed1(_0xffb647,_0x204db7);return;}let _0x20774b=null;if(_0x566b4c[_0x1418d3(0x6ad)]){const _0x4c9869=_0x566b4c[_0x1418d3(0x1c9)]('\x20');try{_0x20774b=_0x31ba4a(_0x4c9869);}catch(_0x594d65){console[_0x1418d3(0x6cd)](_0x22840b(_0x3523a5[_0x1418d3(0x399)],_0x1418d3(0x86a)+_0x4c9869+'\x0a\x20\x20'+_0x22840b(_0x3523a5['dim'],_0x594d65['message'])+'\x0a'));return;}}if(!_0x5ad06d)_0x5ad06d=_0x20774b!==null?'POST':'GET';try{const _0x50c6b1=await _0x5023ee(_0xffb647,_0x5ad06d,_0x204db7,_0x20774b);_0x12839f(_0x50c6b1[_0x1418d3(0x2c4)],_0x50c6b1[_0x1418d3(0x246)]);}catch(_0x519d67){console['error'](_0x1418d3(0x822)+_0x22840b(_0x3523a5[_0x1418d3(0x399)],'✗')+'\x20'+_0x519d67['message']+'\x0a');}}class _0x52f450{constructor(){const _0x4eff61=_0x5eea53;this[_0x4eff61(0x5eb)]=new Map(),this[_0x4eff61(0x450)]=null,this[_0x4eff61(0x65c)]=![];}}function _0x3adfd8(_0x24f3fd){const _0x1dd0b5=_0x5eea53,_0x2f5c84=new _0x52f450();for(const _0x3931f7 of _0x24f3fd){if(_0x3931f7[_0x1dd0b5(0x74c)]?.[_0x1dd0b5(0x8c6)])continue;const _0x1d1967=_0x3931f7[_0x1dd0b5(0x5be)][_0x1dd0b5(0x813)](/^\/api/,'')[_0x1dd0b5(0x813)](/^\[\/env\/:env=[^\]]*\]/,'')[_0x1dd0b5(0x813)](/^\//,'');if(!_0x1d1967)continue;let _0x14cf95=_0x2f5c84;for(const _0x107bf2 of _0x1d1967['split']('/')[_0x1dd0b5(0x542)](Boolean)){if(_0x107bf2[_0x1dd0b5(0x579)](':')){const _0xe4c1ca=_0x107bf2['slice'](0x1);if(!_0x14cf95[_0x1dd0b5(0x450)])_0x14cf95[_0x1dd0b5(0x450)]={'param':_0xe4c1ca,'node':new _0x52f450()};_0x14cf95=_0x14cf95['dynamic'][_0x1dd0b5(0x24d)];}else{if(!_0x14cf95[_0x1dd0b5(0x5eb)][_0x1dd0b5(0x2ad)](_0x107bf2))_0x14cf95[_0x1dd0b5(0x5eb)][_0x1dd0b5(0x259)](_0x107bf2,new _0x52f450());_0x14cf95=_0x14cf95['children']['get'](_0x107bf2);}}_0x14cf95[_0x1dd0b5(0x65c)]=!![];}return _0x2f5c84;}const _0x41d969=new Map();function _0x36c5bb(_0x48cb2e,_0x3ad7de,_0x31adc8){const _0x415f47=_0x5eea53,_0x517c4d=_0x41d969[_0x415f47(0x2fa)](_0x48cb2e);if(_0x517c4d&&_0x517c4d[_0x415f47(0x227)]>Date[_0x415f47(0x4ec)]())return _0x517c4d['val'];const _0x3d6892=_0x31adc8();return _0x41d969[_0x415f47(0x259)](_0x48cb2e,{'val':_0x3d6892,'exp':Date['now']()+_0x3ad7de}),_0x3d6892;}function _0x358bbf(_0x147659,_0x24c923,_0x2263be,_0x50b288){const _0x222351=_0x5eea53,_0x483e11=_0x24c923[_0x222351(0x787)]??_0x50b288['env'];switch(_0x147659){case _0x222351(0x787):return[..._0x2263be['_envs'][_0x222351(0x818)]()][_0x222351(0x542)](_0x2668d5=>!_0x2668d5[_0x222351(0x579)]('~'));case _0x222351(0x4fa):return _0x36c5bb(_0x222351(0x2aa)+_0x483e11,0x7d0,()=>{const _0x56555e=_0x222351;try{return[..._0x2263be[_0x56555e(0x787)](_0x483e11)[_0x56555e(0x321)]['keys']()][_0x56555e(0x542)](_0xac8d04=>!_0xac8d04['startsWith']('~'));}catch{return[];}});case _0x222351(0x47f):if(!_0x24c923[_0x222351(0x4fa)])return[];return _0x36c5bb(_0x222351(0x4ac)+_0x483e11+':'+_0x24c923[_0x222351(0x4fa)],0x5dc,()=>{const _0xdd1be0=_0x222351;try{const _0x2c9510=_0x2263be[_0xdd1be0(0x787)](_0x483e11)[_0xdd1be0(0x321)][_0xdd1be0(0x2fa)](_0x24c923[_0xdd1be0(0x4fa)]);if(!_0x2c9510?.[_0xdd1be0(0x2a3)])return[];const _0x341cf4=[];for(const {key:_0x316ea6}of _0x2c9510['data'][_0xdd1be0(0x3c9)]({'limit':0x32})){_0x341cf4[_0xdd1be0(0x557)](String(_0x316ea6));if(_0x341cf4['length']>=0x32)break;}return _0x341cf4;}catch{return[];}});case _0x222351(0x60b):if(!_0x24c923[_0x222351(0x4fa)])return[];return _0x36c5bb(_0x222351(0x3c0)+_0x483e11+':'+_0x24c923[_0x222351(0x4fa)],0x7d0,()=>{const _0x419e80=_0x222351;try{const _0x5d0585=_0x2263be['env'](_0x483e11)[_0x419e80(0x321)][_0x419e80(0x2fa)](_0x24c923[_0x419e80(0x4fa)]);return _0x5d0585?[..._0x5d0585[_0x419e80(0x2b3)]?.['keys']()??[]]:[];}catch{return[];}});case _0x222351(0x8c7):if(!_0x24c923[_0x222351(0x4fa)])return[];return _0x36c5bb(_0x222351(0x201)+_0x483e11+':'+_0x24c923[_0x222351(0x4fa)],0x7d0,()=>{const _0xd264c2=_0x222351;try{return _0x2263be[_0xd264c2(0x659)]?.['list']?.(_0x24c923[_0xd264c2(0x4fa)],_0x2263be[_0xd264c2(0x787)](_0x483e11))?.['map'](_0x523425=>_0x523425[_0xd264c2(0x4f9)])??[];}catch{return[];}});default:return[];}}function _0x205f6e(_0x36a34a,_0x2092a2,_0x69b21f,_0x3adc71){const _0x37b584=_0x5eea53,_0x39f33d=_0x36a34a[_0x37b584(0x2e8)]('/'),_0x59fd0b=_0x36a34a[_0x37b584(0x84e)]('/'),_0x44b6eb=_0x39f33d?_0x59fd0b[_0x37b584(0x27f)](0x0,-0x1):_0x59fd0b[_0x37b584(0x27f)](0x0,-0x1),_0x515f9f=_0x39f33d?'':_0x59fd0b[_0x59fd0b[_0x37b584(0x6ad)]-0x1];let _0x3c6831=_0x2092a2;const _0x472af3={};for(const _0x477313 of _0x44b6eb){if(!_0x477313)continue;if(_0x3c6831[_0x37b584(0x5eb)][_0x37b584(0x2ad)](_0x477313))_0x3c6831=_0x3c6831[_0x37b584(0x5eb)][_0x37b584(0x2fa)](_0x477313);else{if(_0x3c6831[_0x37b584(0x450)])_0x472af3[_0x3c6831[_0x37b584(0x450)][_0x37b584(0x1b7)]]=_0x477313,_0x3c6831=_0x3c6831[_0x37b584(0x450)][_0x37b584(0x24d)];else return[];}}const _0x47de83=_0x44b6eb[_0x37b584(0x542)](Boolean),_0x2ea5cb=_0x47de83[_0x37b584(0x6ad)]?_0x47de83['join']('/')+'/':'',_0x35953d=[];for(const [_0x50690c]of _0x3c6831[_0x37b584(0x5eb)]){if(_0x50690c[_0x37b584(0x579)](_0x515f9f))_0x35953d[_0x37b584(0x557)](_0x2ea5cb+_0x50690c);}if(_0x3c6831[_0x37b584(0x450)])for(const _0x1b410b of _0x358bbf(_0x3c6831[_0x37b584(0x450)][_0x37b584(0x1b7)],_0x472af3,_0x69b21f,_0x3adc71)){if(String(_0x1b410b)[_0x37b584(0x579)](_0x515f9f))_0x35953d['push'](_0x2ea5cb+_0x1b410b);}return _0x35953d[_0x37b584(0x27f)](0x0,0x64);}const _0x59e690=[_0x5eea53(0x870),_0x5eea53(0x500),_0x5eea53(0x787),'envs',_0x5eea53(0x427),'routes',_0x5eea53(0x827),_0x5eea53(0x5f0),_0x5eea53(0x468),'quit'];function _0x71709b(_0x4c81c0,_0x4cdac2,_0x120dfe){return function _0x24a3e6(_0x13bcdc){const _0x2ae485=_0x4c4a;try{const _0x3aedc3=_0x13bcdc[_0x2ae485(0x738)](/\s[{[]/),_0x14dc73=_0x3aedc3>=0x0?_0x13bcdc['slice'](0x0,_0x3aedc3):_0x13bcdc,_0x3e9f55=_0x14dc73[_0x2ae485(0x1be)]();if(!_0x3e9f55){const _0xd8501b=[..._0x59e690,...[..._0x4c81c0['children'][_0x2ae485(0x818)]()]][_0x2ae485(0x27f)](0x0,0x64);return[_0xd8501b,''];}const _0x57cbdc=_0x3e9f55['split'](/\s+/),_0x50fc48=_0x57cbdc[0x0],_0x4d446f=_0x50fc48[_0x2ae485(0x2e6)]();if(_0x57cbdc['length']===0x1){const _0x1b0a7b=_0x50fc48[_0x2ae485(0x368)](),_0x5f4252=_0x59e690[_0x2ae485(0x542)](_0x256c73=>_0x256c73['startsWith'](_0x1b0a7b)),_0x51fd32=_0x205f6e(_0x50fc48,_0x4c81c0,_0x4cdac2,_0x120dfe),_0x3c8da9=[...new Set([..._0x5f4252,..._0x51fd32])][_0x2ae485(0x27f)](0x0,0x64);return[_0x3c8da9,_0x50fc48];}if(_0x241da1[_0x2ae485(0x2ad)](_0x4d446f)&&_0x57cbdc[_0x2ae485(0x6ad)]===0x2){const _0x42122f=_0x57cbdc[0x1],_0x54b1bd=_0x205f6e(_0x42122f,_0x4c81c0,_0x4cdac2,_0x120dfe);return[_0x54b1bd[_0x2ae485(0x595)](_0x4d1b87=>_0x50fc48+'\x20'+_0x4d1b87),_0x50fc48+'\x20'+_0x42122f];}if(!_0x241da1[_0x2ae485(0x2ad)](_0x4d446f)&&_0x57cbdc[_0x2ae485(0x6ad)]>0x1){const _0x2dd09b=_0x205f6e(_0x50fc48,_0x4c81c0,_0x4cdac2,_0x120dfe),_0x5e3825='\x20'+_0x57cbdc[_0x2ae485(0x27f)](0x1)['join']('\x20');return[_0x2dd09b[_0x2ae485(0x595)](_0x2bf723=>_0x2bf723+_0x5e3825),_0x50fc48+_0x5e3825];}return[[],_0x13bcdc];}catch{return[[],_0x13bcdc];}};}async function _0x57cf64(_0x59d2ec,_0x18a272){const _0xd9e460=_0x5eea53,_0x507e44={'enabled':!![],'level':_0x18a272[_0xd9e460(0x8c0)]??_0xd9e460(0x56c)},_0x48f26d={'env':_0xd9e460(0x7eb)},_0x551290={'current':null},_0x278416=_0x3adfd8(_0x59d2ec[_0xd9e460(0x5fb)][_0xd9e460(0x4aa)]()),_0x43c7ae=_0x71709b(_0x278416,_0x59d2ec,_0x48f26d);_0x59d2ec[_0xd9e460(0x689)][_0xd9e460(0x4ef)](_0x3c1743=>{const _0x3d56de=_0xd9e460;if(!_0x507e44[_0x3d56de(0x487)])return;_0x24d976(_0x3c1743,_0x507e44[_0x3d56de(0x682)]),_0x551290[_0x3d56de(0x5c4)]?.['prompt'](!![]);}),_0x3e8fd6(_0x59d2ec,_0x18a272);const _0x38de71=_0x16e03c[_0xd9e460(0x636)]({'input':process[_0xd9e460(0x248)],'output':process['stdout'],'terminal':!![],'completer':_0x43c7ae,'prompt':_0x14a4d4(_0x48f26d),'historySize':_0x3e6880});try{const _0xf4c17a=_0x22f7c4[_0xd9e460(0x308)](_0x4f4a35,_0xd9e460(0x88a))['split']('\x0a')[_0xd9e460(0x542)](Boolean);_0x38de71['history']=_0xf4c17a[_0xd9e460(0x334)]()[_0xd9e460(0x27f)](0x0,_0x3e6880);}catch{}_0x551290[_0xd9e460(0x5c4)]=_0x38de71,_0x38de71['on'](_0xd9e460(0x48c),async _0x5159a1=>{const _0x4d7e7=_0xd9e460;_0x38de71['pause']();try{await _0x137ced(_0x5159a1,_0x59d2ec,_0x18a272,_0x507e44,_0x48f26d,_0x38de71);}catch(_0xd040dd){console['error'](_0x22840b(_0x3523a5[_0x4d7e7(0x399)],'\x20\x20Error:\x20'+_0xd040dd[_0x4d7e7(0x81d)]));}finally{_0x38de71['resume'](),_0x38de71[_0x4d7e7(0x6c8)]();}}),_0x38de71['on'](_0xd9e460(0x6e0),()=>{const _0x23afe7=_0xd9e460;try{const _0x2d4364=[..._0x38de71['history']][_0x23afe7(0x334)]()[_0x23afe7(0x542)](Boolean)[_0x23afe7(0x27f)](0x0,_0x3e6880);_0x22f7c4[_0x23afe7(0x497)](_0x4f4a35,_0x2d4364['join']('\x0a')+'\x0a');}catch{}_0x21fd38(_0x59d2ec,0x0);});let _0x3eefee=0x0;return process['on'](_0xd9e460(0x7e0),()=>{const _0x495515=_0xd9e460;if(_0x1b9073)return _0x21fd38(_0x59d2ec,0x82,'SIGINT');if(_0x38de71['line']==='')return _0x21fd38(_0x59d2ec,0x0,_0x495515(0x7e0));const _0x2a0b8e=Date[_0x495515(0x4ec)]();if(_0x2a0b8e-_0x3eefee<0x5dc)return _0x21fd38(_0x59d2ec,0x0,_0x495515(0x361));_0x3eefee=_0x2a0b8e,process[_0x495515(0x498)]['write']('\x0a'),_0x38de71[_0x495515(0x351)](0x0),_0x38de71['prompt'](),process[_0x495515(0x6d3)][_0x495515(0x82b)](_0x22840b(_0x3523a5[_0x495515(0x78f)],_0x495515(0x774)));}),process['on']('SIGTERM',()=>_0x21fd38(_0x59d2ec,0x0,_0xd9e460(0x8bc))),process['on'](_0xd9e460(0x21c),()=>_0x21fd38(_0x59d2ec,0x0,_0xd9e460(0x21c))),_0x38de71['prompt'](),_0x38de71;}return okdbShell={'start':_0x57cf64,'colorLog':_0x24d976,'lenientParse':_0x31ba4a,'_splitLine':_0x1b9b51,'_formatRouteHelpLines':_0x583be1,'_routeSummary':_0x22211d,'_routeTags':_0x237475},okdbShell;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x1afbc8=_0x1a2e0d;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x27c8be,performance:_0x1ce06a}=require$$0$4,_0x52fabb=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x1afbc8(0x7c4),_0x5b39ba=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x5f0f9f=process.env.OKDB_LOOP_LAG_ALL==='1',_0x533943=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x23f0c1{constructor(){const _0x41bf70=_0x1afbc8;this[_0x41bf70(0x487)]=_0x52fabb,this[_0x41bf70(0x4ae)]=new Map(),this['_h']=null,this['_timer']=null,this[_0x41bf70(0x276)]=![],this[_0x41bf70(0x2cd)]=(_0x5a892f,_0x2e98ad)=>process[_0x41bf70(0x6d3)][_0x41bf70(0x82b)](_0x5a892f+(_0x2e98ad?'\x20'+JSON[_0x41bf70(0x2d1)](_0x2e98ad):'')+'\x0a');}[_0x1afbc8(0x4ec)](){return _0x1ce06a['now']();}[_0x1afbc8(0x254)](_0x22bc36){const _0x56d32d=_0x1afbc8;if(typeof _0x22bc36===_0x56d32d(0x7ca))this[_0x56d32d(0x2cd)]=_0x22bc36;}['note'](_0x254247,_0x504693,_0x444c93){const _0x29ae33=_0x1afbc8;if(!this[_0x29ae33(0x487)])return;let _0x4a8070=this['_buckets'][_0x29ae33(0x2fa)](_0x254247);!_0x4a8070&&(_0x4a8070={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x29ae33(0x4ae)][_0x29ae33(0x259)](_0x254247,_0x4a8070)),_0x4a8070['ms']+=_0x504693,_0x4a8070['count']+=0x1,_0x504693>_0x4a8070[_0x29ae33(0x46d)]&&(_0x4a8070[_0x29ae33(0x46d)]=_0x504693,_0x4a8070[_0x29ae33(0x696)]=_0x444c93||'');}[_0x1afbc8(0x398)](_0x3d0f32){const _0x4beeed=_0x1afbc8;if(!this[_0x4beeed(0x487)]||this[_0x4beeed(0x276)])return;this[_0x4beeed(0x276)]=!![];if(_0x3d0f32)this['_log']=_0x3d0f32;this['_h']=_0x27c8be({'resolution':0xa}),this['_h']['enable'](),this['_timer']=setInterval(()=>this['_report'](),_0x5b39ba);if(this[_0x4beeed(0x6c1)][_0x4beeed(0x895)])this[_0x4beeed(0x6c1)][_0x4beeed(0x895)]();}[_0x1afbc8(0x67f)](_0x9fe9ac){const _0x3768b1=_0x1afbc8;if(!this[_0x3768b1(0x3c4)])this['_windowCbs']=new Set();this['_windowCbs'][_0x3768b1(0x4da)](_0x9fe9ac);if(!this[_0x3768b1(0x276)])this[_0x3768b1(0x2e4)]();}[_0x1afbc8(0x67c)](_0x5be3fb){const _0x5305ed=_0x1afbc8;this[_0x5305ed(0x3c4)]?.[_0x5305ed(0x360)](_0x5be3fb);}['_startAdmission'](){const _0x26cc2f=_0x1afbc8;if(this[_0x26cc2f(0x8a0)])return;this[_0x26cc2f(0x8a0)]=!![];!this['_h']&&(this['_h']=_0x27c8be({'resolution':0xa}),this['_h'][_0x26cc2f(0x311)]());const _0x1da30d=_0x5b39ba;this[_0x26cc2f(0x6c3)]=setInterval(()=>{const _0x20b5c6=_0x26cc2f,_0x408697=this['_h'];if(!_0x408697)return;const _0x2f490d=_0x408697[_0x20b5c6(0x1ef)](0x63)/0xf4240,_0x5aaf68=_0x408697['max']/0xf4240,_0x266fe8=_0x408697['mean']/0xf4240;_0x408697[_0x20b5c6(0x5f9)]();if(this[_0x20b5c6(0x3c4)])for(const _0x5c7a4b of this[_0x20b5c6(0x3c4)]){try{_0x5c7a4b({'p99Ms':_0x2f490d,'maxMs':_0x5aaf68,'meanMs':_0x266fe8,'reportMs':_0x1da30d});}catch{}}},_0x1da30d);if(this[_0x26cc2f(0x6c3)][_0x26cc2f(0x895)])this[_0x26cc2f(0x6c3)][_0x26cc2f(0x895)]();}[_0x1afbc8(0x8c5)](){const _0x50e805=_0x1afbc8,_0x15b68c=this['_h'],_0x42de56=_0x15b68c[_0x50e805(0x413)]/0xf4240,_0x4b935f=_0x15b68c[_0x50e805(0x1ef)](0x63)/0xf4240,_0x264155=_0x15b68c[_0x50e805(0x552)]/0xf4240;_0x15b68c['reset']();const _0x3d1162=[...this[_0x50e805(0x4ae)]['entries']()][_0x50e805(0x595)](([_0x128511,_0x2a776c])=>({'label':_0x128511,..._0x2a776c}))['sort']((_0x76b6a1,_0x26374e)=>_0x26374e['ms']-_0x76b6a1['ms'])[_0x50e805(0x27f)](0x0,0x8);this[_0x50e805(0x4ae)][_0x50e805(0x43c)]();const _0x1d5d83=_0x3d1162[_0x50e805(0x2b9)]((_0x392cc8,_0x3db523)=>_0x392cc8+_0x3db523['ms'],0x0),_0x19323a=_0x3d1162['map'](_0x5bc2c4=>_0x5bc2c4[_0x50e805(0x37e)]+'='+_0x5bc2c4['ms'][_0x50e805(0x39b)](0x0)+_0x50e805(0x192)+_0x5bc2c4[_0x50e805(0x430)]+(_0x5bc2c4[_0x50e805(0x46d)]>0x5?'(worst\x20'+_0x5bc2c4[_0x50e805(0x46d)][_0x50e805(0x39b)](0x0)+'ms'+(_0x5bc2c4[_0x50e805(0x696)]?'\x20'+_0x5bc2c4[_0x50e805(0x696)]:'')+')':''));(_0x5f0f9f||_0x42de56>=_0x533943)&&this['_log']('loop-lag\x20'+_0x5b39ba+_0x50e805(0x6ed)+_0x42de56[_0x50e805(0x39b)](0x0)+_0x50e805(0x2e9)+_0x4b935f[_0x50e805(0x39b)](0x0)+_0x50e805(0x5d8)+_0x264155[_0x50e805(0x39b)](0x0)+_0x50e805(0x734)+_0x1d5d83[_0x50e805(0x39b)](0x0)+'ms'+(_0x19323a['length']?'\x20│\x20'+_0x19323a[_0x50e805(0x1c9)]('\x20\x20'):''),{'feature':_0x50e805(0x85a)});if(this[_0x50e805(0x3c4)])for(const _0x3bb12d of this[_0x50e805(0x3c4)]){try{_0x3bb12d({'p99Ms':_0x4b935f,'maxMs':_0x42de56,'meanMs':_0x264155,'reportMs':_0x5b39ba});}catch{}}}[_0x1afbc8(0x354)](){const _0x3884c5=_0x1afbc8;if(this[_0x3884c5(0x6c1)])clearInterval(this[_0x3884c5(0x6c1)]);if(this['_h'])this['_h'][_0x3884c5(0x41f)]();this[_0x3884c5(0x6c1)]=null,this['_h']=null,this[_0x3884c5(0x276)]=![];}}const _0x83e855=new _0x23f0c1();if(_0x83e855[_0x1afbc8(0x487)])_0x83e855[_0x1afbc8(0x398)]();return okdbLoopMonitor={'LOOP':_0x83e855},okdbLoopMonitor;}var okdbTimers,hasRequiredOkdbTimers;function requireOkdbTimers(){if(hasRequiredOkdbTimers)return okdbTimers;hasRequiredOkdbTimers=0x1;const _0x20adce=0x2**0x1f-0x1;function _0x3cbd52(_0x352ae8){if(!(_0x352ae8>0x0))return 0x0;return _0x352ae8>_0x20adce?_0x20adce:_0x352ae8;}function _0x38a0a9(_0x34adcc){return _0x34adcc===Infinity;}return okdbTimers={'MAX_TIMER_DELAY':_0x20adce,'clampTimerDelay':_0x3cbd52,'isNeverDelay':_0x38a0a9},okdbTimers;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x4fe917=require$$0$1,_0xc16328=require$$1;let _0x3cf0cd,_0x4c3e45,_0x55b413,_0x502c82,_0x14e915,_0x112cba,_0xf7e227,_0x26b650=![];const _0x15bcbe=new Set();let _0x4fd725=null;const _0x202f6f=new Map();function _0x216aee(){const _0x5b1fcc=_0x4c4a;if(_0x3cf0cd!==undefined)return _0x3cf0cd;_0x3cf0cd=process.env.OKDB_DIAG==='1';if(!_0x3cf0cd)return![];_0x4c3e45=process.env.OKDB_DIAG_STACK==='1',_0x502c82=Math['max'](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x55b413=new Array(_0x502c82),_0x14e915=0x0,_0x112cba=0x0,_0xf7e227=process.env.OKDB_DIAG_DIR||null;if(_0xf7e227)try{_0x4fe917[_0x5b1fcc(0x51a)](_0xf7e227,{'recursive':!![]});}catch{}return!![];}function _0x295bd1(){return _0x3cf0cd===undefined?_0x216aee():_0x3cf0cd;}function _0x15f6d7(_0x3ec8f5,_0x207946){const _0x4add73=_0x4c4a;if(_0x3cf0cd===undefined?!_0x216aee():!_0x3cf0cd)return;let _0x4892ca;if(_0x4c3e45){const _0x5d1b10=new Error()[_0x4add73(0x5ba)]||'';_0x4892ca=_0x5d1b10['split']('\x0a')[_0x4add73(0x27f)](0x3)[_0x4add73(0x595)](_0x3b9a26=>_0x3b9a26['trim']())[_0x4add73(0x542)](Boolean)[_0x4add73(0x27f)](0x0,0x8);}_0x55b413[_0x14e915]={'seq':_0x112cba++,'t':Date[_0x4add73(0x4ec)](),'env':_0x3ec8f5,'kind':_0x207946||_0x4add73(0x338),'stack':_0x4892ca},_0x14e915=(_0x14e915+0x1)%_0x502c82;}function _0x50a437(_0x2808d0){const _0x2e7148=_0x4c4a,_0x53ab12=[];for(let _0x3eda08=0x0;_0x3eda08<_0x502c82;_0x3eda08++){const _0xc5e864=_0x55b413[(_0x14e915-0x1-_0x3eda08+_0x502c82*0x2)%_0x502c82];if(!_0xc5e864)continue;_0x53ab12['push'](_0xc5e864);if(_0x53ab12[_0x2e7148(0x6ad)]>=_0x2808d0)break;}return _0x53ab12;}function _0x3b990b(_0x5ea2c3){const _0x5946ae=_0x4c4a;try{process['stderr']['write'](_0x5ea2c3+'\x0a');}catch{}if(_0xf7e227)try{_0x4fe917[_0x5946ae(0x7a3)](_0xc16328[_0x5946ae(0x1c9)](_0xf7e227,_0x5946ae(0x5d0)+process[_0x5946ae(0x5c3)]+'.log'),_0x5ea2c3+'\x0a');}catch{}}function _0x1347fa(_0x5a05a6){const _0x4c363a=_0x4c4a,_0x4bf1cb=_0x50a437(_0x5a05a6);if(!_0x4bf1cb[_0x4c363a(0x6ad)])return _0x4c363a(0x1f5);const _0x26c7ba=Date[_0x4c363a(0x4ec)]();return _0x4bf1cb[_0x4c363a(0x595)](_0xbb5276=>{const _0xc062d8=_0x4c363a,_0x27e586=_0xc062d8(0x876)+_0xbb5276[_0xc062d8(0x8b2)]+'\x20-'+(_0x26c7ba-_0xbb5276['t'])+_0xc062d8(0x3a6)+_0xbb5276[_0xc062d8(0x787)]+'\x20'+_0xbb5276['kind'];return _0xbb5276[_0xc062d8(0x5ba)]&&_0xbb5276[_0xc062d8(0x5ba)]['length']?_0x27e586+'\x0a\x20\x20\x20\x20\x20\x20'+_0xbb5276['stack'][_0xc062d8(0x1c9)](_0xc062d8(0x821)):_0x27e586;})[_0x4c363a(0x1c9)]('\x0a');}function _0x5d8e5e(_0x59831b,_0x517c8d){const _0x21b41a=_0x4c4a,_0xf5ec2c='\x0a===\x20OKDB_DIAG\x20'+_0x59831b+_0x21b41a(0x203)+new Date()[_0x21b41a(0x611)]()+_0x21b41a(0x5e4)+process[_0x21b41a(0x5c3)]+'\x20===',_0x483b6b=[_0xf5ec2c,'error:\x20'+(_0x517c8d&&_0x517c8d[_0x21b41a(0x5ba)]?_0x517c8d['stack'][_0x21b41a(0x84e)]('\x0a')[0x0]:_0x517c8d),_0x21b41a(0x22e)+(_0x4c3e45?'':'\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site')+':',_0x1347fa(0x18),_0x44e4c1(),'='['repeat'](_0xf5ec2c[_0x21b41a(0x6ad)]-0x1)];_0x3b990b(_0x483b6b[_0x21b41a(0x1c9)]('\x0a'));}function _0xee82ad(_0x3433c9){const _0x5728bc=_0x4c4a;if(!_0x295bd1())return;const _0x5f1a41=String(_0x3433c9&&_0x3433c9[_0x5728bc(0x81d)]||_0x3433c9||''),_0x352234=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x5728bc(0x3f6)](_0x5f1a41);_0x5d8e5e(_0x352234?_0x5728bc(0x65a):_0x5728bc(0x54f),_0x3433c9);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x352234)return;try{console[_0x5728bc(0x6cd)](_0x3433c9&&_0x3433c9[_0x5728bc(0x5ba)]?_0x3433c9[_0x5728bc(0x5ba)]:_0x3433c9);}catch{}process[_0x5728bc(0x468)](0x1);}function _0x43060b(_0x328f93){const _0x5e24f1=_0x4c4a;if(!_0x295bd1())return;const _0x4b7994=String(_0x328f93&&_0x328f93[_0x5e24f1(0x81d)]||_0x328f93||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x5e24f1(0x3f6)](_0x4b7994)&&_0x5d8e5e('ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)',_0x328f93);}function _0x44e4c1(){const _0x480e9a=_0x4c4a,_0x283205=[_0x480e9a(0x7c6)];let _0x1a5eb1=![];for(const _0x4f152f of _0x15bcbe){const _0x228696=_0x4f152f&&_0x4f152f[_0x480e9a(0x41e)];if(!_0x228696)continue;for(const [_0x740065,_0xcf4142]of _0x228696){const _0x232546=_0xcf4142&&_0xcf4142[_0x480e9a(0x3bc)]&&_0xcf4142[_0x480e9a(0x3bc)][_0x480e9a(0x59e)];if(!_0x232546)continue;let _0x8f73bf,_0x237f56;try{_0x8f73bf=Atomics[_0x480e9a(0x566)](_0x232546,0x0),_0x237f56=Atomics[_0x480e9a(0x566)](_0x232546,0x1);}catch{continue;}if(_0x8f73bf===0x0)continue;_0x1a5eb1=!![];const _0x2813c1=_0x8f73bf>0x0?'SWAP':_0x480e9a(0x2a2),_0x112e85=Date[_0x480e9a(0x4ec)]()-Math[_0x480e9a(0x8b9)](_0x8f73bf)*0x3e8,_0x4255f0=((()=>{const _0x4ebde4=_0x480e9a;try{return _0xcf4142[_0x4ebde4(0x863)]&&_0xcf4142[_0x4ebde4(0x863)][_0x4ebde4(0x2c4)]?_0xcf4142['_writer'][_0x4ebde4(0x2c4)]():null;}catch{return null;}})());_0x283205[_0x480e9a(0x557)](_0x480e9a(0x845)+_0x740065+_0x480e9a(0x63c)+_0x2813c1+_0x480e9a(0x575)+_0x112e85+_0x480e9a(0x6c0)+_0x237f56+(_0x4255f0?_0x480e9a(0x40e)+_0x4255f0['depth']+_0x480e9a(0x4c8)+_0x4255f0[_0x480e9a(0x416)]+'\x20parkedNow='+_0x4255f0[_0x480e9a(0x57c)]+'}':''));}}if(!_0x1a5eb1)_0x283205['push'](_0x480e9a(0x5cd));return _0x283205[_0x480e9a(0x1c9)]('\x0a');}function _0x293ada(){const _0x545d15=_0x4c4a;if(!_0x295bd1())return;const _0x3dc576=Math[_0x545d15(0x413)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x1cbd30=Date[_0x545d15(0x4ec)]();for(const _0x157302 of _0x15bcbe){const _0xc16e67=_0x157302&&_0x157302[_0x545d15(0x41e)];if(!_0xc16e67)continue;for(const [_0x37b896,_0x252056]of _0xc16e67){const _0x39c311=_0x252056&&_0x252056[_0x545d15(0x3bc)]&&_0x252056[_0x545d15(0x3bc)][_0x545d15(0x59e)];if(!_0x39c311)continue;let _0x34894f;try{_0x34894f=Atomics[_0x545d15(0x566)](_0x39c311,0x0);}catch{continue;}const _0x37e1f2=_0x157302[_0x545d15(0x5be)]+'|'+_0x37b896;if(_0x34894f<=0x0){_0x202f6f[_0x545d15(0x360)](_0x37e1f2);continue;}const _0x4bae25=_0x1cbd30-_0x34894f*0x3e8,_0x51b123=_0x202f6f['get'](_0x37e1f2);if(_0x4bae25<_0x3dc576)continue;if(_0x51b123&&_0x1cbd30-_0x51b123['dumpedAt']<_0x3dc576)continue;_0x202f6f[_0x545d15(0x259)](_0x37e1f2,{'firstTs':_0x51b123?_0x51b123['firstTs']:_0x34894f,'dumpedAt':_0x1cbd30});const _0x58efa1=_0x545d15(0x5de)+_0x4bae25+_0x545d15(0x5d1)+_0x37b896+_0x545d15(0x203)+new Date()[_0x545d15(0x611)]()+'\x20pid='+process['pid']+_0x545d15(0x447);_0x3b990b([_0x58efa1,_0x44e4c1(),'='['repeat'](_0x58efa1[_0x545d15(0x6ad)]-0x1)][_0x545d15(0x1c9)]('\x0a'));}}}function _0x26fced(){const _0x3bf45c=_0x4c4a;if(!_0x295bd1()||_0x26b650)return;_0x26b650=!![],process[_0x3bf45c(0x866)](_0x3bf45c(0x54f),_0xee82ad),process[_0x3bf45c(0x866)](_0x3bf45c(0x71d),_0x43060b);const _0x347c5b=Math[_0x3bf45c(0x413)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x4fd725=setInterval(_0x293ada,_0x347c5b);if(_0x4fd725[_0x3bf45c(0x895)])_0x4fd725[_0x3bf45c(0x895)]();}function _0xf6297(_0x59e485){const _0x18c5b3=_0x4c4a;if(!_0x295bd1()||!_0x59e485)return;_0x15bcbe[_0x18c5b3(0x4da)](_0x59e485),_0x26fced();}function _0x7b89d2(_0x55fec7){const _0x1619dc=_0x4c4a;_0x15bcbe[_0x1619dc(0x360)](_0x55fec7);}function _0x2b8788(){const _0x380afd=_0x4c4a;if(!_0x295bd1())return{'enabled':![],'hint':_0x380afd(0x445)};return{'enabled':!![],'stackCapture':!!_0x4c3e45,'recentWrites':_0x50a437(0x10),'drain':_0x44e4c1()};}return okdbDiag={'isEnabled':_0x295bd1,'recordWrite':_0x15f6d7,'installDiag':_0x26fced,'registerOkdb':_0xf6297,'unregisterOkdb':_0x7b89d2,'snapshot':_0x2b8788},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x41720a=_0x1a2e0d;if(hasRequiredOkdbWriter)return okdbWriter[_0x41720a(0x7ac)];hasRequiredOkdbWriter=0x1;const {performance:_0x1a1612}=require$$0$5,_0x2a6175=requireOkdbDiag(),_0x388f7a=process.env.OKDB_COMMIT_MODE===_0x41720a(0x6d9);class _0x30fdd4{constructor(_0x6ffd4b){const _0x5716d1=_0x41720a;this[_0x5716d1(0x787)]=_0x6ffd4b,this[_0x5716d1(0x743)]=new Set(),this[_0x5716d1(0x5ee)]=new Map(),this[_0x5716d1(0x6d1)]=0x0,this[_0x5716d1(0x4d3)]=[],this[_0x5716d1(0x878)]=[],this[_0x5716d1(0x32a)]=Math[_0x5716d1(0x413)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x5716d1(0x754)]=0x0,this['_bpWaiters']=[],this[_0x5716d1(0x786)]=0x0,this[_0x5716d1(0x52e)]=null,this['_heldTotal']=0x0,this['_nestedTotal']=0x0,this['_nestedWarned']=![];}async[_0x41720a(0x826)](_0x322fa3,_0x3b86e9,{admitted:admitted=![]}={}){const _0x1c23fd=_0x41720a;if(_0x2a6175['isEnabled']())_0x2a6175[_0x1c23fd(0x701)](this[_0x1c23fd(0x787)]?.[_0x1c23fd(0x4f9)],_0x3b86e9);if(this['_closed']){const _0x22b7f6=new Error(_0x1c23fd(0x823));_0x22b7f6['code']='ENV_CLOSING_RETRY';throw _0x22b7f6;}if(this[_0x1c23fd(0x32a)]>0x0){let _0x30cfe8=![];while(this['_outstanding']>=this['_highWater']&&!this[_0x1c23fd(0x379)]){!_0x30cfe8&&(_0x30cfe8=!![],this[_0x1c23fd(0x786)]++),await new Promise(_0x425ab9=>this[_0x1c23fd(0x4ce)]['push'](_0x425ab9));}if(this[_0x1c23fd(0x379)]){const _0x27edd4=new Error(_0x1c23fd(0x823));_0x27edd4[_0x1c23fd(0x2dc)]='ENV_CLOSING_RETRY';throw _0x27edd4;}}this[_0x1c23fd(0x754)]++;const _0x1c97d3=admitted?null:this[_0x1c23fd(0x787)][_0x1c23fd(0x3bc)];for(;;){while(this['_held'])await this[_0x1c23fd(0x52e)];if(_0x1c97d3)try{await _0x1c97d3[_0x1c23fd(0x48e)]();}catch(_0x42f46d){this[_0x1c23fd(0x754)]--;if(this[_0x1c23fd(0x4ce)][_0x1c23fd(0x6ad)]&&this[_0x1c23fd(0x754)]<this[_0x1c23fd(0x32a)])this[_0x1c23fd(0x4ce)][_0x1c23fd(0x732)]()();throw _0x42f46d;}if(!this[_0x1c23fd(0x52e)])break;if(_0x1c97d3)_0x1c97d3[_0x1c23fd(0x2f0)]();}if(this['_closed']){if(_0x1c97d3)_0x1c97d3[_0x1c23fd(0x2f0)]();this[_0x1c23fd(0x754)]--;if(this[_0x1c23fd(0x4ce)]['length']&&this[_0x1c23fd(0x754)]<this['_highWater'])this['_bpWaiters'][_0x1c23fd(0x732)]()();const _0x3d9cce=new Error(_0x1c23fd(0x823));_0x3d9cce['code']='ENV_CLOSING_RETRY';throw _0x3d9cce;}const _0x37174c=_0x1a1612[_0x1c23fd(0x4ec)]();if(_0x388f7a)try{const _0x14a8e4=this[_0x1c23fd(0x787)]['db'][_0x1c23fd(0x234)](_0x322fa3);this[_0x1c23fd(0x6d1)]++;if(this[_0x1c23fd(0x4d3)]['push'](_0x1a1612[_0x1c23fd(0x4ec)]()-_0x37174c)>0x100)this[_0x1c23fd(0x4d3)][_0x1c23fd(0x732)]();if(this[_0x1c23fd(0x878)][_0x1c23fd(0x557)](_0x1a1612['now']())>0x800)this[_0x1c23fd(0x878)][_0x1c23fd(0x732)]();return _0x14a8e4;}finally{this[_0x1c23fd(0x754)]--;if(this[_0x1c23fd(0x4ce)][_0x1c23fd(0x6ad)]&&this[_0x1c23fd(0x754)]<this[_0x1c23fd(0x32a)])this[_0x1c23fd(0x4ce)][_0x1c23fd(0x732)]()();if(_0x1c97d3)_0x1c97d3[_0x1c23fd(0x2f0)]();}let _0x11782e=null;const _0x2d144b=()=>{const _0x5c7d71=_0x1c23fd,_0x51bbf8=_0x322fa3();if(_0x51bbf8&&typeof _0x51bbf8[_0x5c7d71(0x4ed)]==='function'&&!_0x11782e){this['_heldTotal']++;let _0x32c444;const _0x30739b=new Promise(_0x29fc34=>_0x32c444=_0x29fc34);this[_0x5c7d71(0x52e)]=_0x30739b,_0x11782e=()=>{const _0x4ad443=_0x5c7d71;if(this[_0x4ad443(0x52e)]===_0x30739b)this[_0x4ad443(0x52e)]=null;_0x32c444();};}return _0x51bbf8;};let _0x93c5cd;try{_0x93c5cd=this['env']['db']['childTransaction'](_0x2d144b);}catch(_0x42b2d6){_0x93c5cd=Promise[_0x1c23fd(0x393)](_0x42b2d6);}(!_0x93c5cd||typeof _0x93c5cd['then']!==_0x1c23fd(0x7ca))&&(this['_nestedTotal']++,!this[_0x1c23fd(0x4e8)]&&(this[_0x1c23fd(0x4e8)]=!![],console['warn'](_0x1c23fd(0x4de)+(this['env']?.[_0x1c23fd(0x4f9)]??'?')+_0x1c23fd(0x1fc))),_0x93c5cd=Promise['resolve'](_0x93c5cd));const _0x393849=()=>{if(_0x11782e)_0x11782e();};_0x93c5cd['then'](_0x393849,_0x393849),this[_0x1c23fd(0x743)][_0x1c23fd(0x4da)](_0x93c5cd),this[_0x1c23fd(0x5ee)][_0x1c23fd(0x259)](_0x93c5cd,_0x37174c);const _0x27cd04=()=>{const _0x2d061f=_0x1c23fd;this[_0x2d061f(0x743)][_0x2d061f(0x360)](_0x93c5cd),this[_0x2d061f(0x5ee)][_0x2d061f(0x360)](_0x93c5cd),this[_0x2d061f(0x6d1)]++,this[_0x2d061f(0x754)]--;this[_0x2d061f(0x4ce)][_0x2d061f(0x6ad)]&&this[_0x2d061f(0x754)]<this[_0x2d061f(0x32a)]&&this[_0x2d061f(0x4ce)][_0x2d061f(0x732)]()();if(this[_0x2d061f(0x4d3)][_0x2d061f(0x557)](_0x1a1612[_0x2d061f(0x4ec)]()-_0x37174c)>0x100)this[_0x2d061f(0x4d3)][_0x2d061f(0x732)]();if(this[_0x2d061f(0x878)][_0x2d061f(0x557)](_0x1a1612[_0x2d061f(0x4ec)]())>0x800)this[_0x2d061f(0x878)][_0x2d061f(0x732)]();};_0x93c5cd[_0x1c23fd(0x4ed)](_0x27cd04,_0x27cd04);try{return await _0x93c5cd;}finally{if(_0x1c97d3)_0x1c97d3[_0x1c23fd(0x2f0)]();}}['status'](){const _0x1e6530=_0x41720a,_0x1d231d=_0x1a1612[_0x1e6530(0x4ec)]();let _0x51b181=0x0;for(const _0x7e7247 of this[_0x1e6530(0x5ee)][_0x1e6530(0x722)]()){const _0x415758=_0x1d231d-_0x7e7247;if(_0x415758>_0x51b181)_0x51b181=_0x415758;}let _0x5c3e3b=0x0;for(let _0x3a365a=this[_0x1e6530(0x878)]['length']-0x1;_0x3a365a>=0x0;_0x3a365a--){if(_0x1d231d-this[_0x1e6530(0x878)][_0x3a365a]>0x3e8)break;_0x5c3e3b++;}let _0x46e8dd=0x0;if(this[_0x1e6530(0x4d3)][_0x1e6530(0x6ad)]){const _0xefc77b=[...this[_0x1e6530(0x4d3)]][_0x1e6530(0x562)]((_0x2662af,_0x3567d7)=>_0x2662af-_0x3567d7);_0x46e8dd=_0xefc77b[Math[_0x1e6530(0x279)](_0xefc77b['length']-0x1,Math[_0x1e6530(0x2d7)](_0xefc77b[_0x1e6530(0x6ad)]*0.99))];}return{'depth':this[_0x1e6530(0x743)]['size'],'oldestPendingMs':Math[_0x1e6530(0x578)](_0x51b181),'committed':this['_committed'],'commitsPerSec':_0x5c3e3b,'commitP99Ms':Math[_0x1e6530(0x578)](_0x46e8dd),'parkedNow':this[_0x1e6530(0x4ce)]['length'],'parkedTotal':this['_bpParkedTotal'],'highWater':this[_0x1e6530(0x32a)]};}[_0x41720a(0x530)](){const _0xa7657c=_0x41720a,_0x13879d=_0x1a1612[_0xa7657c(0x4ec)]();return[...this[_0xa7657c(0x5ee)]['values']()][_0xa7657c(0x595)](_0x2c29c7=>Math[_0xa7657c(0x578)](_0x13879d-_0x2c29c7))[_0xa7657c(0x562)]((_0x11e55f,_0x315aff)=>_0x315aff-_0x11e55f);}[_0x41720a(0x3a2)](){const _0x1debc7=_0x41720a;this[_0x1debc7(0x379)]=!![];for(const _0x1fe408 of this['_bpWaiters'][_0x1debc7(0x5ce)](0x0))_0x1fe408();}async[_0x41720a(0x66e)](){const _0x197bc8=_0x41720a;let _0x509bee=0x0;while(this[_0x197bc8(0x743)][_0x197bc8(0x7d1)]&&_0x509bee++<0x3e8){await Promise['allSettled']([...this[_0x197bc8(0x743)]]);}}async['put'](_0xc81044,_0x593a65,_0x93c1ef,_0xe6900e){const _0x49a7ec=_0x41720a;return this[_0x49a7ec(0x826)](()=>{const _0x397b15=_0x49a7ec;if(_0xe6900e===undefined)_0xc81044['putSync'](_0x593a65,_0x93c1ef);else _0xc81044[_0x397b15(0x422)](_0x593a65,_0x93c1ef,_0xe6900e);},_0x49a7ec(0x765));}async['remove'](_0x59d760,_0x141059){const _0x1a48c3=_0x41720a;return this[_0x1a48c3(0x826)](()=>_0x59d760[_0x1a48c3(0x8a6)](_0x141059),'raw-remove');}}async function _0x302417(_0x57523f,_0x2c92d7){const _0x87c46a=_0x41720a;if(_0x2c92d7==null)_0x2c92d7=Math['max'](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x5ec0f4=_0x57523f?.[_0x87c46a(0x81e)];if(!_0x5ec0f4||typeof _0x5ec0f4[_0x87c46a(0x4ed)]!=='function')return;await Promise[_0x87c46a(0x24b)]([Promise['resolve'](_0x5ec0f4)['catch'](()=>{}),new Promise(_0xbd9cc5=>{const _0x2a6a1a=_0x87c46a,_0x2fca48=setTimeout(_0xbd9cc5,_0x2c92d7);if(_0x2fca48[_0x2a6a1a(0x895)])_0x2fca48[_0x2a6a1a(0x895)]();})]);}catch{}}function _0x515a05(_0x18af7d){const _0x295ed6=_0x41720a;if(_0x388f7a)return Promise[_0x295ed6(0x8c2)]();const _0x5beb0e=_0x18af7d?.[_0x295ed6(0x50c)];return _0x5beb0e&&typeof _0x5beb0e[_0x295ed6(0x4ed)]==='function'?_0x5beb0e:Promise[_0x295ed6(0x8c2)]();}const _0x487348=Math['max'](0x1,Math[_0x41720a(0x2d7)](Number(process.env.UV_THREADPOOL_SIZE))||0x4),_0x287b33=Math['max'](0x1,_0x487348-0x2);let _0x4d7e21=0x0;const _0x49820f=[];async function _0x1cd885(_0x4154e5){const _0x5aa45e=_0x41720a;if(_0x4d7e21<_0x287b33)_0x4d7e21++;else await new Promise(_0x5c62ed=>_0x49820f[_0x5aa45e(0x557)](_0x5c62ed));try{return await _0x4154e5();}finally{const _0x5f52db=_0x49820f[_0x5aa45e(0x732)]();if(_0x5f52db)_0x5f52db();else _0x4d7e21--;}}return okdbWriter[_0x41720a(0x7ac)]=_0x30fdd4,okdbWriter[_0x41720a(0x7ac)][_0x41720a(0x1f6)]=_0x1cd885,okdbWriter[_0x41720a(0x7ac)][_0x41720a(0x1e6)]=_0x287b33,okdbWriter[_0x41720a(0x7ac)][_0x41720a(0x63a)]=_0x302417,okdbWriter[_0x41720a(0x7ac)][_0x41720a(0x50c)]=_0x515a05,okdbWriter[_0x41720a(0x7ac)]['SYNC_COMMITS']=_0x388f7a,okdbWriter[_0x41720a(0x7ac)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x593b82=_0x1a2e0d;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x1bd8c6=require$$0,{clampTimerDelay:_0x1bfaff}=requireOkdbTimers(),{SYNC_COMMITS:_0x1c9df1}=requireOkdbWriter(),_0x48db4f='~lock';class _0x20684b{constructor(_0x414395,_0x391f29,_0x2e2580){const _0x1f7666=_0x4c4a;this['_lock']=_0x414395,this['_key']=_0x391f29,this['_acquiredAt']=_0x2e2580,this[_0x1f7666(0x27a)]=![],this['_heartbeatTimer']=null,this[_0x1f7666(0x1b8)]=null;}[_0x593b82(0x6b7)](){const _0x56aafb=_0x593b82;if(this[_0x56aafb(0x27a)])return![];try{const _0x432440=this[_0x56aafb(0x5db)][_0x56aafb(0x6c9)]()[_0x56aafb(0x2fa)](this[_0x56aafb(0x76e)]);if(!_0x432440||_0x432440[_0x56aafb(0x82f)]!==this[_0x56aafb(0x528)])return![];const _0x24aa1d=_0x432440[_0x56aafb(0x28a)]??_0x432440['acquiredAt'];if(_0x24aa1d+_0x432440[_0x56aafb(0x893)]<Date[_0x56aafb(0x4ec)]())return![];return!![];}catch{return!this[_0x56aafb(0x27a)];}}[_0x593b82(0x403)](){const _0x1ab5e7=_0x593b82;if(this[_0x1ab5e7(0x27a)])return null;try{return this[_0x1ab5e7(0x5db)][_0x1ab5e7(0x6c9)]()[_0x1ab5e7(0x2fa)](this[_0x1ab5e7(0x76e)])??null;}catch{return null;}}async[_0x593b82(0x7fd)](_0x3a41b0){const _0x4f44a3=_0x593b82;if(this['_released'])return;try{if(this['_lock'][_0x4f44a3(0x379)]())return;const _0x22da52=this[_0x4f44a3(0x5db)][_0x4f44a3(0x6c9)]()[_0x4f44a3(0x2fa)](this[_0x4f44a3(0x76e)]);if(!_0x22da52||_0x22da52[_0x4f44a3(0x82f)]!==this['_acquiredAt'])return;if(_0x1c9df1)this['_lock'][_0x4f44a3(0x6c9)]()[_0x4f44a3(0x422)](this[_0x4f44a3(0x76e)],{..._0x22da52,'ttlMs':_0x22da52[_0x4f44a3(0x893)]+_0x3a41b0});else await this[_0x4f44a3(0x5db)][_0x4f44a3(0x6c9)]()[_0x4f44a3(0x25f)](this[_0x4f44a3(0x76e)],{..._0x22da52,'ttlMs':_0x22da52['ttlMs']+_0x3a41b0});}catch{}}async[_0x593b82(0x466)](){const _0x18259c=_0x593b82;if(this[_0x18259c(0x27a)])return;if(this[_0x18259c(0x1b8)])try{await this[_0x18259c(0x1b8)];}catch{}clearInterval(this['_heartbeatTimer']),this['_heartbeatTimer']=null,this[_0x18259c(0x27a)]=!![];try{if(this['_lock']['_closed']())return;const _0xf3a582=this[_0x18259c(0x5db)][_0x18259c(0x6c9)]()['get'](this[_0x18259c(0x76e)]);if(_0xf3a582&&_0xf3a582[_0x18259c(0x82f)]===this[_0x18259c(0x528)]){if(_0x1c9df1)this[_0x18259c(0x5db)][_0x18259c(0x6c9)]()[_0x18259c(0x8a6)](this['_key']);else await this[_0x18259c(0x5db)][_0x18259c(0x6c9)]()['remove'](this['_key']);}}catch{}}[_0x593b82(0x6ab)](_0x2ceee7,_0x5ae690){const _0x49b8f4=_0x593b82,_0x3e2252=_0x1bfaff(_0x5ae690??Math[_0x49b8f4(0x2d7)](_0x2ceee7/0x3));this[_0x49b8f4(0x70b)]=setInterval(()=>{const _0xa3b690=_0x49b8f4;if(this[_0xa3b690(0x27a)])return;this[_0xa3b690(0x1b8)]=((async()=>{const _0x35cc38=_0xa3b690;try{if(this['_lock'][_0x35cc38(0x379)]())return;const _0x54cb8b=this[_0x35cc38(0x5db)][_0x35cc38(0x6c9)]()[_0x35cc38(0x2fa)](this[_0x35cc38(0x76e)]);if(!_0x54cb8b||_0x54cb8b['acquiredAt']!==this[_0x35cc38(0x528)]){this[_0x35cc38(0x27a)]=!![],clearInterval(this[_0x35cc38(0x70b)]),this[_0x35cc38(0x70b)]=null;return;}if(_0x1c9df1)this[_0x35cc38(0x5db)][_0x35cc38(0x6c9)]()['putSync'](this[_0x35cc38(0x76e)],{..._0x54cb8b,'updatedAt':Date['now']()});else await this[_0x35cc38(0x5db)]['_db']()[_0x35cc38(0x25f)](this['_key'],{..._0x54cb8b,'updatedAt':Date[_0x35cc38(0x4ec)]()});}catch{}this['_heartbeatInFlight']=null;})());},_0x3e2252);if(this[_0x49b8f4(0x70b)][_0x49b8f4(0x895)])this[_0x49b8f4(0x70b)][_0x49b8f4(0x895)]();}}class _0x3c2697{constructor(_0x305dc3,{namespace:_0x7c15d1,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0xefd867=_0x593b82;this[_0xefd867(0x299)]=_0x305dc3,this[_0xefd867(0x669)]=_0x7c15d1,this[_0xefd867(0x893)]=ttlMs,this['heartbeatMs']=heartbeatMs,this[_0xefd867(0x207)]=null;}['_db'](){const _0x46acba=_0x593b82;return this[_0x46acba(0x4a5)](),(!this[_0x46acba(0x207)]||this[_0x46acba(0x423)]!==this[_0x46acba(0x299)])&&(this[_0x46acba(0x207)]=this[_0x46acba(0x299)][_0x46acba(0x727)](_0x48db4f,{'dupSort':![]}),this[_0x46acba(0x423)]=this[_0x46acba(0x299)]),this[_0x46acba(0x207)];}[_0x593b82(0x37c)](){const _0x89775b=_0x593b82;return this[_0x89775b(0x4a5)](),(!this['_wantDbHandle']||this[_0x89775b(0x752)]!==this[_0x89775b(0x299)])&&(this['_wantDbHandle']=this[_0x89775b(0x299)]['openDB'](_0x48db4f+_0x89775b(0x1db),{'dupSort':![]}),this[_0x89775b(0x752)]=this[_0x89775b(0x299)]),this['_wantDbHandle'];}[_0x593b82(0x379)](){const _0x41421d=_0x593b82,_0x6eccea=this[_0x41421d(0x299)]?.['status'];return _0x6eccea==='closing'||_0x6eccea===_0x41421d(0x392);}[_0x593b82(0x4a5)](){const _0x12cd04=_0x593b82;if(this[_0x12cd04(0x379)]())throw new Error(_0x12cd04(0x4ca));}[_0x593b82(0x76e)](_0x5034b0){const _0x11c0e2=_0x593b82;return this[_0x11c0e2(0x669)]+':'+_0x5034b0;}[_0x593b82(0x440)](_0x124171){const _0x90d4ce=_0x593b82;try{if(this[_0x90d4ce(0x379)]())return;_0x1c9df1?this['_wantDb']()[_0x90d4ce(0x422)](this[_0x90d4ce(0x76e)](_0x124171),Date[_0x90d4ce(0x4ec)]()):this[_0x90d4ce(0x37c)]()[_0x90d4ce(0x25f)](this[_0x90d4ce(0x76e)](_0x124171),Date[_0x90d4ce(0x4ec)]())?.['catch']?.(()=>{});}catch{}}[_0x593b82(0x19e)](_0x3208eb,_0x34ee8d=0x3e8){const _0xad2c20=_0x593b82;try{const _0x4036c4=this[_0xad2c20(0x37c)]()[_0xad2c20(0x2fa)](this[_0xad2c20(0x76e)](_0x3208eb));return typeof _0x4036c4==='number'&&Date[_0xad2c20(0x4ec)]()-_0x4036c4<_0x34ee8d;}catch{return![];}}['_isStale'](_0x11a84e){const _0x37a5b7=_0x593b82,_0x2ab501=_0x11a84e[_0x37a5b7(0x28a)]??_0x11a84e['acquiredAt'];return _0x2ab501+_0x11a84e[_0x37a5b7(0x893)]<Date['now']();}static[_0x593b82(0x300)](_0xbcf300){const _0x52649d=_0x593b82,_0x1d3335=_0xbcf300?.[_0x52649d(0x403)];if(!_0x1d3335||typeof _0x1d3335[_0x52649d(0x5c3)]!==_0x52649d(0x72c))return![];if(_0x1d3335['hostname']!==_0x1bd8c6[_0x52649d(0x216)]())return![];if(_0x1d3335[_0x52649d(0x5c3)]===process['pid'])return![];try{return process[_0x52649d(0x486)](_0x1d3335[_0x52649d(0x5c3)],0x0),![];}catch(_0x211805){return _0x211805[_0x52649d(0x2dc)]===_0x52649d(0x55c);}}async[_0x593b82(0x462)](_0x2ecc72,_0x1ee774={},_0x30ef36={}){const _0x4bba85=_0x593b82,_0x48a642=this[_0x4bba85(0x76e)](_0x2ecc72),_0x19c0ef=_0x30ef36['ttlMs']??this[_0x4bba85(0x893)],_0xb661a4=Date['now'](),_0x25ef12={'holder':{'pid':process[_0x4bba85(0x5c3)],'hostname':_0x1bd8c6[_0x4bba85(0x216)](),..._0x1ee774},'acquiredAt':_0xb661a4,'updatedAt':_0xb661a4,'ttlMs':_0x19c0ef};let _0x204e2f=![],_0x254cbd=null;if(this[_0x4bba85(0x379)]())return{'acquired':![],'handle':null,'current':null};try{const _0x2d165b=()=>{const _0x4f1ec0=_0x4bba85,_0x24fd93=this['_db']()['get'](_0x48a642);if(_0x24fd93&&!this['_isStale'](_0x24fd93)&&!_0x3c2697[_0x4f1ec0(0x300)](_0x24fd93)){const _0x1e7f0a=_0x1ee774[_0x4f1ec0(0x20c)]!=null&&_0x24fd93['holder'][_0x4f1ec0(0x5c3)]===process[_0x4f1ec0(0x5c3)]&&_0x24fd93['holder'][_0x4f1ec0(0x20c)]===_0x1ee774[_0x4f1ec0(0x20c)];if(!_0x1e7f0a){_0x204e2f=![],_0x254cbd=_0x24fd93;return;}_0x25ef12[_0x4f1ec0(0x82f)]<=_0x24fd93[_0x4f1ec0(0x82f)]&&(_0x25ef12['acquiredAt']=_0x24fd93[_0x4f1ec0(0x82f)]+0x1,_0x25ef12[_0x4f1ec0(0x28a)]=_0x25ef12[_0x4f1ec0(0x82f)]);}this['_db']()[_0x4f1ec0(0x25f)](_0x48a642,_0x25ef12),_0x204e2f=!![],_0x254cbd=_0x25ef12;};if(_0x1c9df1)this[_0x4bba85(0x6c9)]()[_0x4bba85(0x234)](_0x2d165b);else await this['_db']()[_0x4bba85(0x386)](_0x2d165b);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x204e2f)return{'acquired':![],'handle':null,'current':_0x254cbd};const _0x2678e7=new _0x20684b(this,_0x48a642,_0x25ef12['acquiredAt']);return _0x2678e7[_0x4bba85(0x6ab)](_0x19c0ef,this[_0x4bba85(0x8ac)]),{'acquired':!![],'handle':_0x2678e7,'current':_0x254cbd};}[_0x593b82(0x509)](_0x50b54e){const _0x157adb=_0x593b82;try{return this[_0x157adb(0x6c9)]()[_0x157adb(0x2fa)](this['_key'](_0x50b54e))??null;}catch{return null;}}[_0x593b82(0x3f8)](){const _0x3fc053=_0x593b82,_0x50fc5c=this[_0x3fc053(0x669)]+':',_0x12de06=[];try{for(const {key:_0x48e7d2,value:_0x4b96b2}of this[_0x3fc053(0x6c9)]()[_0x3fc053(0x3c9)]({'start':_0x50fc5c,'end':_0x50fc5c+'\xff'})){typeof _0x48e7d2===_0x3fc053(0x1d2)&&_0x48e7d2[_0x3fc053(0x579)](_0x50fc5c)&&_0x12de06[_0x3fc053(0x557)]({'id':_0x48e7d2[_0x3fc053(0x27f)](_0x50fc5c['length']),'entry':_0x4b96b2});}}catch{}return _0x12de06;}static[_0x593b82(0x366)](_0x594eb0){const _0x5d6219=_0x593b82,_0x20ec15=[];try{const _0x4d983f=_0x594eb0['openDB'](_0x48db4f,{'dupSort':![]});for(const {key:_0x393c24,value:_0x4f6470}of _0x4d983f[_0x5d6219(0x3c9)]({})){if(typeof _0x393c24!==_0x5d6219(0x1d2))continue;const _0x453977=_0x393c24[_0x5d6219(0x196)](':');if(_0x453977<0x1)continue;_0x20ec15[_0x5d6219(0x557)]({'namespace':_0x393c24['slice'](0x0,_0x453977),'id':_0x393c24['slice'](_0x453977+0x1),'entry':_0x4f6470});}}catch{}return _0x20ec15;}}return okdbLock={'OKDBLock':_0x3c2697},okdbLock;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x13208d=_0x1a2e0d;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x46d00e=require$$0,_0x28d7f3=require$$1$1,_0x1ecfd7=require$$2$1,{LOOP:_0x3c3fc6}=requireOkdbLoopMonitor(),{OKDBLock:_0x200d49}=requireOkdbLock(),{SYNC_COMMITS:_0x16df1a}=requireOkdbWriter(),_0x34295a=_0x13208d(0x70a),_0xb6b155=_0x13208d(0x24d),_0x7217f8=_0x13208d(0x1a5),_0x4c0ca4=_0x13208d(0x5c5),_0x194d70=(_0x211860,_0x30e84f)=>_0x211860+':'+_0x30e84f,_0x2d74a2=(_0x6bbf74,_0x5c8223)=>_0x6bbf74+'::'+_0x5c8223,_0x83cc=(_0x180f24,_0x4d1997)=>_0x180f24+'/'+_0x4d1997,_0x5aeb4a=(_0x2c928e,_0x40de68)=>_0x2c928e+'#'+_0x40de68,_0x2c3d4d=_0x45db8f=>{const _0x179c1c=_0x13208d;if(_0x45db8f?.[_0x179c1c(0x709)])return _0x45db8f['processKey'];const _0x340b13=_0x45db8f?.[_0x179c1c(0x6b5)];return typeof _0x340b13==='string'&&_0x340b13['includes']('#')?_0x340b13[_0x179c1c(0x27f)](0x0,_0x340b13[_0x179c1c(0x196)]('#')):_0x340b13;},_0x5e6904=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0xb7f8a6=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x192c22=_0x5e6904*0x3,_0x2cc14e=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x13208d(0x413)](0x927c0,_0x192c22*0x14),_0x4e6cee=[_0x13208d(0x574),_0x13208d(0x1b2),_0x13208d(0x504),_0x13208d(0x4b2),'processor:paused',_0x13208d(0x6c4)];let _0x32a68a=null;function _0x353639(){const _0x396d3a=_0x13208d;if(_0x32a68a==null)_0x32a68a=Math[_0x396d3a(0x578)]((Date[_0x396d3a(0x4ec)]()-process[_0x396d3a(0x1f2)]()*0x3e8)/0x3e8)*0x3e8;return _0x32a68a;}function _0x2c0e30(_0x3e94f4){const _0x1cbdee=_0x13208d;if(process.env.OKDB_PROCESS_KILL===_0x1cbdee(0x804))return![];if(_0x3e94f4?.[_0x1cbdee(0x3e9)]?.['processes']&&typeof _0x3e94f4[_0x1cbdee(0x3e9)][_0x1cbdee(0x65b)]===_0x1cbdee(0x601)&&_0x3e94f4[_0x1cbdee(0x3e9)]['processes'][_0x1cbdee(0x486)]===![])return![];return!![];}function _0x247a46(_0x2d64d3,_0x54419e){const _0x46795a=_0x13208d,_0x4d5530=!!_0x54419e?.[_0x46795a(0x78a)];switch(_0x2d64d3){case _0x46795a(0x3ae):return{'controllable':_0x4d5530,'decommissionable':![],'killable':!![],'killConfirm':_0x46795a(0x2e2)};case'cli':case'standalone':return{'controllable':_0x4d5530,'decommissionable':![],'killable':!![],'killConfirm':_0x46795a(0x710)};case'embedded':return{'controllable':![],'decommissionable':![],'killable':![]};case _0x46795a(0x3d4):case _0x46795a(0x7bd):case'fn-runner':case _0x46795a(0x5b4):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x46795a(0x839)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x93bbc6{constructor(_0x1c1801){const _0x4be761=_0x13208d;this[_0x4be761(0x58a)]=_0x1c1801,this[_0x4be761(0x623)]=null,this['_desired']=null,this[_0x4be761(0x4a7)]=new Map(),this['_cmd']=null,this[_0x4be761(0x89b)]=![],this[_0x4be761(0x60e)]=![],this[_0x4be761(0x8ad)]=_0x353639(),this[_0x4be761(0x4c3)]=_0x194d70(process[_0x4be761(0x5c3)],this[_0x4be761(0x8ad)]),this[_0x4be761(0x1bc)]=_0x1ecfd7[_0x4be761(0x73a)]()['slice'](0x0,0x8),this['_rowKey']=_0x5aeb4a(this[_0x4be761(0x4c3)],this[_0x4be761(0x1bc)]),this[_0x4be761(0x3f9)]=Date['now'](),this[_0x4be761(0x485)]=null,this[_0x4be761(0x1cc)]=null,this[_0x4be761(0x67e)]=null,this[_0x4be761(0x407)]=null,this[_0x4be761(0x494)]=null,this['_onTick']=null,this[_0x4be761(0x809)]=0x0,this[_0x4be761(0x471)]={},this[_0x4be761(0x3c5)]=new Map(),this[_0x4be761(0x1f8)]=process['cpuUsage'](),this[_0x4be761(0x815)]=Date['now'](),this[_0x4be761(0x757)]=0x0,this[_0x4be761(0x73c)]=new Map();}get['selfKey'](){const _0x2b0f72=_0x13208d;return this[_0x2b0f72(0x4c3)];}get['rowKey'](){const _0x3ba158=_0x13208d;return this[_0x3ba158(0x46c)];}['_caps'](_0x584d59,_0xaf90c9){const _0x27b89c=_0x13208d,_0x3c3c4e=_0x247a46(_0x584d59,_0xaf90c9);if(_0x3c3c4e[_0x27b89c(0x717)]&&!_0x2c0e30(this['okdb']))return{..._0x3c3c4e,'killable':![],'killConfirm':undefined};return _0x3c3c4e;}['isActive'](){const _0x2d6dbb=_0x13208d;return!!this[_0x2d6dbb(0x623)];}[_0x13208d(0x3b6)](_0x54bc57){const _0x227641=_0x13208d;Object[_0x227641(0x70c)](this[_0x227641(0x471)],_0x54bc57||{});}[_0x13208d(0x4af)](_0x14c7fe){const _0x3d4788=_0x13208d;if(_0x14c7fe)this[_0x3d4788(0x67e)]=_0x14c7fe;}[_0x13208d(0x661)](_0x54a05a={}){const _0xfa8351=_0x13208d;return this['okdb'][_0xfa8351(0x322)](_0x54a05a);}[_0x13208d(0x4d0)](){const _0xb68f77=_0x13208d,_0x3cfe41={};let _0x432069=0x0,_0x16c346=0x0;const _0x938c9d=new Set();for(const _0x2846e0 of this[_0xb68f77(0x469)]()){_0x16c346++;const _0x3db52c=_0x2846e0[_0xb68f77(0x50e)];if(!_0x3db52c)continue;if(_0x3db52c['participate'])_0x432069++;for(const _0x2cdd92 of _0x3db52c[_0xb68f77(0x78a)]||[]){if(![_0xb68f77(0x1cf),_0xb68f77(0x8c4)]['includes'](_0x2cdd92[_0xb68f77(0x747)]))continue;(_0x2cdd92[_0xb68f77(0x694)]===_0xb68f77(0x23b)||_0x2cdd92[_0xb68f77(0x694)]==='building')&&_0x2cdd92[_0xb68f77(0x1fb)]&&_0x938c9d[_0xb68f77(0x4da)]((_0x2cdd92['env']||'default')+':'+_0x2cdd92[_0xb68f77(0x1fb)]);const _0x4826ac=_0x2cdd92[_0xb68f77(0x787)]||'default';(_0x3cfe41[_0x4826ac]||=[])[_0xb68f77(0x557)]({..._0x2cdd92,'env':_0x4826ac,'owner':{'pid':_0x2846e0[_0xb68f77(0x5c3)]??null,'kind':_0x2846e0[_0xb68f77(0x650)]??null}});}}for(const [_0x5e5571,_0x24272a]of Object[_0xb68f77(0x87f)](_0x3cfe41)){for(const _0x552a38 of _0x24272a){if(_0x552a38[_0xb68f77(0x747)]==='single'&&!_0x552a38['claimGated']){const _0x2de9fd=_0x5e5571+':'+(_0x552a38[_0xb68f77(0x1fb)]??'');if(!_0x938c9d[_0xb68f77(0x2ad)](_0x2de9fd))_0x552a38['unclaimed']=!![];}}}return{'envs':_0x3cfe41,'policy':null,'participation':{'participating':_0x432069,'total':_0x16c346},'source':_0xb68f77(0x307)};}[_0x13208d(0x705)](){const _0x238f8f=_0x13208d,_0x128c8c=_0x4e5384=>{const _0x1ba4f9=_0x4c4a;if(_0x4e5384[_0x1ba4f9(0x694)]===_0x1ba4f9(0x23b)||_0x4e5384[_0x1ba4f9(0x694)]==='building'||_0x4e5384[_0x1ba4f9(0x694)]===_0x1ba4f9(0x6cd))return 0x3;if(_0x4e5384[_0x1ba4f9(0x1ae)])return 0x1;return 0x2;},_0x3bfe44=new Map();for(const _0x1e9c79 of this[_0x238f8f(0x469)]()){for(const _0x5cd8cc of _0x1e9c79[_0x238f8f(0x50e)]?.[_0x238f8f(0x78a)]||[]){const _0x361a41={..._0x5cd8cc,'owner':{'pid':_0x1e9c79[_0x238f8f(0x5c3)]??null,'kind':_0x1e9c79[_0x238f8f(0x650)]??null,'host':_0x1e9c79[_0x238f8f(0x26b)]??null}},_0x184362=_0x5cd8cc[_0x238f8f(0x747)]===_0x238f8f(0x1cf)?_0x238f8f(0x6b2)+(_0x5cd8cc[_0x238f8f(0x787)]??'')+'::'+(_0x5cd8cc['cursorKey']??_0x5cd8cc['type']??_0x5cd8cc['id']):_0x238f8f(0x32d)+(_0x1e9c79[_0x238f8f(0x6b5)]??_0x1e9c79['processKey']??'')+'::'+(_0x5cd8cc[_0x238f8f(0x787)]??'')+'::'+_0x5cd8cc['id'],_0x5431f7=_0x3bfe44[_0x238f8f(0x2fa)](_0x184362);if(!_0x5431f7||_0x128c8c(_0x361a41)>_0x128c8c(_0x5431f7))_0x3bfe44['set'](_0x184362,_0x361a41);}}return[..._0x3bfe44[_0x238f8f(0x722)]()];}[_0x13208d(0x5d4)](){const _0x55a052=_0x13208d,_0x49b8e=Date[_0x55a052(0x4ec)](),_0x568375=this['listNodes'](),_0xf0e7ec=_0xb05048=>Math[_0x55a052(0x413)](0x0,Math[_0x55a052(0x578)]((_0x49b8e-(_0xb05048[_0x55a052(0x76f)]||_0x49b8e))/0x3e8)),_0x4e1cb4=_0x568375[_0x55a052(0x52d)](_0x1672d1=>_0x1672d1['kind']===_0x55a052(0x3ae)),_0x488d7a=_0x568375['filter'](_0x3f114f=>_0x3f114f[_0x55a052(0x650)]==='http-server');if(_0x4e1cb4||_0x488d7a[_0x55a052(0x6ad)])return{'primary':_0x4e1cb4?{'pid':_0x4e1cb4[_0x55a052(0x5c3)],'uptime':_0xf0e7ec(_0x4e1cb4)}:null,'workers':_0x488d7a['map'](_0x28fbb8=>({'pid':_0x28fbb8[_0x55a052(0x5c3)],'uptime':_0xf0e7ec(_0x28fbb8)})),'workersConfigured':_0x4e1cb4?.[_0x55a052(0x74c)]?.['workersConfigured']??_0x488d7a['length'],'mode':'cluster'};const _0x1fc513=_0x568375[_0x55a052(0x52d)](_0x4ffb95=>_0x4ffb95[_0x55a052(0x650)]===_0x55a052(0x80a)||_0x4ffb95[_0x55a052(0x650)]===_0x55a052(0x458)||_0x4ffb95[_0x55a052(0x650)]==='embedded'),_0x5b2c3f=_0x1fc513?{'pid':_0x1fc513[_0x55a052(0x5c3)],'uptime':_0xf0e7ec(_0x1fc513)}:{'pid':process[_0x55a052(0x5c3)],'uptime':Math[_0x55a052(0x413)](0x0,Math[_0x55a052(0x578)](process[_0x55a052(0x1f2)]()))};return{'primary':_0x5b2c3f,'workers':[_0x5b2c3f],'workersConfigured':0x1,'mode':_0x55a052(0x1cf)};}['nodesView'](){const _0x36d1b2=_0x13208d;return this[_0x36d1b2(0x604)]();}['treeView'](){const _0x4f076a=_0x13208d,_0x40ddf4=new Map();for(const _0x229328 of this[_0x4f076a(0x604)]())_0x40ddf4[_0x4f076a(0x259)](_0x229328['processKey'],{..._0x229328,'children':[]});const _0x291176=[];for(const _0x3a23f2 of _0x40ddf4[_0x4f076a(0x722)]()){const _0x4195b3=_0x3a23f2[_0x4f076a(0x2a4)]?_0x40ddf4['get'](_0x3a23f2[_0x4f076a(0x2a4)]):null;if(_0x4195b3&&_0x4195b3!==_0x3a23f2)_0x4195b3[_0x4f076a(0x5eb)][_0x4f076a(0x557)](_0x3a23f2);else _0x291176[_0x4f076a(0x557)](_0x3a23f2);}const _0xdc01db=(_0x32aed7,_0x4d7d42)=>_0x32aed7[_0x4f076a(0x650)]===_0x4d7d42[_0x4f076a(0x650)]?(_0x32aed7[_0x4f076a(0x5c3)]||0x0)-(_0x4d7d42[_0x4f076a(0x5c3)]||0x0):(_0x32aed7[_0x4f076a(0x650)]??'')<(_0x4d7d42[_0x4f076a(0x650)]??'')?-0x1:0x1,_0x365a0d=_0x43edbd=>{const _0x329c41=_0x4f076a;_0x43edbd[_0x329c41(0x562)](_0xdc01db);for(const _0x1c0016 of _0x43edbd)if(_0x1c0016[_0x329c41(0x5eb)]['length'])_0x365a0d(_0x1c0016[_0x329c41(0x5eb)]);};return _0x365a0d(_0x291176),_0x291176;}['getProcess'](_0x2123b5){return this['_groupByProcess']()['find'](_0x4315be=>_0x4315be['processKey']===_0x2123b5)??null;}[_0x13208d(0x604)](_0x1da3fe=Date[_0x13208d(0x4ec)]()){const _0x2b924c=_0x13208d,_0x164b52=new Map();for(const _0x4f61a0 of this[_0x2b924c(0x469)]()){const _0x332682=_0x2c3d4d(_0x4f61a0);let _0x1df58d=_0x164b52[_0x2b924c(0x2fa)](_0x332682);!_0x1df58d&&(_0x1df58d={'processKey':_0x332682,'nodeKey':_0x332682,'pid':_0x4f61a0[_0x2b924c(0x5c3)],'ppid':_0x4f61a0[_0x2b924c(0x2af)]??null,'host':_0x4f61a0[_0x2b924c(0x26b)]??null,'kind':_0x4f61a0['kind'],'role':null,'supervisorKey':_0x4f61a0[_0x2b924c(0x2a4)]??null,'slot':_0x4f61a0['slot']??null,'slotKey':_0x4f61a0[_0x2b924c(0x4a2)]??null,'caps':_0x4f61a0[_0x2b924c(0x464)]??null,'lifecycle':_0x4f61a0[_0x2b924c(0x19a)]??null,'uptime':Math[_0x2b924c(0x413)](0x0,Math[_0x2b924c(0x578)]((_0x1da3fe-(_0x4f61a0[_0x2b924c(0x76f)]||_0x1da3fe))/0x3e8)),'startedAt':_0x4f61a0['startedAt']??null,'meta':_0x4f61a0[_0x2b924c(0x74c)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x164b52[_0x2b924c(0x259)](_0x332682,_0x1df58d));_0x1df58d[_0x2b924c(0x554)]['push']({'instanceId':_0x4f61a0[_0x2b924c(0x79b)]??null,'role':_0x4f61a0[_0x2b924c(0x44e)]??null,'listenAddr':_0x4f61a0['listenAddr']??null,'lifecycle':_0x4f61a0['lifecycle']??null,'processing':_0x4f61a0[_0x2b924c(0x50e)]??null});if(!_0x1df58d[_0x2b924c(0x44e)]&&_0x4f61a0['role'])_0x1df58d[_0x2b924c(0x44e)]=_0x4f61a0[_0x2b924c(0x44e)];if(!_0x1df58d['listenAddr']&&_0x4f61a0[_0x2b924c(0x56d)])_0x1df58d[_0x2b924c(0x56d)]=_0x4f61a0[_0x2b924c(0x56d)];if(!_0x1df58d[_0x2b924c(0x50e)]&&_0x4f61a0[_0x2b924c(0x50e)])_0x1df58d[_0x2b924c(0x50e)]=_0x4f61a0[_0x2b924c(0x50e)];if(!_0x1df58d[_0x2b924c(0x38c)]&&_0x4f61a0[_0x2b924c(0x38c)])_0x1df58d['engines']=_0x4f61a0[_0x2b924c(0x38c)];if(!_0x1df58d[_0x2b924c(0x367)]&&_0x4f61a0[_0x2b924c(0x367)])_0x1df58d[_0x2b924c(0x367)]=_0x4f61a0[_0x2b924c(0x367)];if(_0x1df58d[_0x2b924c(0x464)]==null&&_0x4f61a0[_0x2b924c(0x464)])_0x1df58d['caps']=_0x4f61a0[_0x2b924c(0x464)];if(_0x4f61a0[_0x2b924c(0x847)]&&(!_0x1df58d['stats']||(_0x4f61a0[_0x2b924c(0x847)]['at']??0x0)>(_0x1df58d[_0x2b924c(0x847)]['at']??0x0)))_0x1df58d[_0x2b924c(0x847)]=_0x4f61a0['stats'];}return[..._0x164b52[_0x2b924c(0x722)]()];}[_0x13208d(0x3d8)](){const _0x12892b=_0x13208d,_0x2f5503=[],_0x18fd0c={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x602c83 of this[_0x12892b(0x604)]()){_0x2f5503[_0x12892b(0x557)]({'processKey':_0x602c83[_0x12892b(0x709)],'kind':_0x602c83[_0x12892b(0x650)],'pid':_0x602c83[_0x12892b(0x5c3)],'supervisorKey':_0x602c83[_0x12892b(0x2a4)],'meta':_0x602c83[_0x12892b(0x74c)]??null,'uptime':_0x602c83[_0x12892b(0x1f2)],'stats':_0x602c83[_0x12892b(0x847)]??null}),_0x18fd0c[_0x12892b(0x65b)]++;if(_0x602c83[_0x12892b(0x847)]){_0x18fd0c['rss']+=_0x602c83[_0x12892b(0x847)][_0x12892b(0x796)]||0x0,_0x18fd0c[_0x12892b(0x256)]+=(_0x602c83['stats'][_0x12892b(0x256)]||0x0)+(_0x602c83[_0x12892b(0x847)]['threads']?.[_0x12892b(0x256)]||0x0);const _0x3757c5=_0x602c83['stats'][_0x12892b(0x356)];_0x3757c5&&(_0x18fd0c[_0x12892b(0x356)][_0x12892b(0x430)]+=_0x3757c5[_0x12892b(0x430)]||0x0,_0x18fd0c[_0x12892b(0x356)][_0x12892b(0x375)]+=_0x3757c5[_0x12892b(0x375)]||0x0,_0x18fd0c['threads']['busy']+=_0x3757c5[_0x12892b(0x760)]||0x0);}}return{'totals':_0x18fd0c,'nodes':_0x2f5503};}async[_0x13208d(0x5f0)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x5b2348=_0x13208d;this[_0x5b2348(0x89b)]=this[_0x5b2348(0x89b)]||!!writer,this[_0x5b2348(0x60e)]=this[_0x5b2348(0x60e)]||!!reader,this[_0x5b2348(0x485)]=kind||this[_0x5b2348(0x485)]||(_0x28d7f3[_0x5b2348(0x493)]?_0x5b2348(0x3d4):_0x5b2348(0x80a)),this[_0x5b2348(0x1cc)]=supervisorKey??this[_0x5b2348(0x1cc)],this[_0x5b2348(0x67e)]=listenAddr??this[_0x5b2348(0x67e)],this['_ensureDesired'](),await this['_migrateVocab']();if(!writer&&!reader)return null;if(!this[_0x5b2348(0x623)]){const _0x5df606=await this['okdb'][_0x5b2348(0x2d2)](_0x34295a,{'sync':![],'durability':_0x5b2348(0x395)});await _0x5df606[_0x5b2348(0x3ac)](_0xb6b155),this[_0x5b2348(0x623)]=_0x5df606;}return this[_0x5b2348(0x623)];}[_0x13208d(0x28f)](){const _0x4cf721=_0x13208d;return this[_0x4cf721(0x47a)]!==this[_0x4cf721(0x623)]&&(this[_0x4cf721(0x47a)]=this[_0x4cf721(0x623)],this[_0x4cf721(0x5f4)]=this[_0x4cf721(0x623)][_0x4cf721(0x465)](_0xb6b155)[_0x4cf721(0x2a3)]),this[_0x4cf721(0x5f4)];}[_0x13208d(0x86c)](_0x2deb98){const _0x4c9df8=_0x13208d;if(_0x16df1a)return this[_0x4c9df8(0x28f)]()['putSync'](_0x2deb98['nodeKey'],_0x2deb98,0x1);const _0x2aabdc=this[_0x4c9df8(0x28f)]()['put'](_0x2deb98[_0x4c9df8(0x6b5)],_0x2deb98,0x1);if(_0x2aabdc&&typeof _0x2aabdc[_0x4c9df8(0x4ed)]==='function')_0x2aabdc[_0x4c9df8(0x4ed)](undefined,()=>{});return _0x2aabdc;}[_0x13208d(0x297)](_0x454d98){const _0x4fbc7f=_0x13208d;return this[_0x4fbc7f(0x28f)]()[_0x4fbc7f(0x422)](_0x454d98[_0x4fbc7f(0x6b5)],_0x454d98,0x1);}['_removeRowAsync'](_0x2df22d){const _0x5ae928=_0x13208d;if(_0x16df1a)try{return this['_nodeDb']()[_0x5ae928(0x8a6)](_0x2df22d);}catch{return![];}const _0x482c5d=this['_nodeDb']()[_0x5ae928(0x417)](_0x2df22d);if(_0x482c5d&&typeof _0x482c5d[_0x5ae928(0x4ed)]===_0x5ae928(0x7ca))_0x482c5d[_0x5ae928(0x4ed)](undefined,()=>{});return _0x482c5d;}async[_0x13208d(0x539)](_0x4ea21b){const _0x5a835a=_0x13208d;if(!this[_0x5a835a(0x623)]||!this[_0x5a835a(0x89b)]||!_0x4ea21b?.['nodeKey'])return;return this[_0x5a835a(0x86c)](_0x4ea21b);}async[_0x13208d(0x89f)](_0xe900ac){const _0x1159e4=_0x13208d;if(!this[_0x1159e4(0x623)]||!this[_0x1159e4(0x89b)]||!_0xe900ac)return;const _0x499b02=_0xe900ac[_0x1159e4(0x1a1)]('#'),_0x5d032f=[];for(const {key:_0x3cdfbf}of this[_0x1159e4(0x623)][_0x1159e4(0x3c9)](_0xb6b155)){if(_0x3cdfbf===_0xe900ac||!_0x499b02&&typeof _0x3cdfbf===_0x1159e4(0x1d2)&&_0x3cdfbf[_0x1159e4(0x579)](_0xe900ac+'#'))_0x5d032f[_0x1159e4(0x557)](_0x3cdfbf);}for(const _0x3d67e5 of _0x5d032f){try{this[_0x1159e4(0x28f)]()[_0x1159e4(0x8a6)](_0x3d67e5);}catch{}}}[_0x13208d(0x2c9)](_0x475c62){const _0x44cbf7=_0x13208d;if(typeof _0x475c62?.[_0x44cbf7(0x5c3)]!==_0x44cbf7(0x72c))return![];if(_0x475c62[_0x44cbf7(0x26b)]!==_0x46d00e['hostname']())return![];if(_0x475c62[_0x44cbf7(0x5c3)]===process['pid'])return![];if(_0x475c62[_0x44cbf7(0x282)]!=null&&_0x475c62[_0x44cbf7(0x282)]<Date[_0x44cbf7(0x4ec)]()-_0x2cc14e)return!![];try{return process['kill'](_0x475c62[_0x44cbf7(0x5c3)],0x0),![];}catch(_0x20caf6){return _0x20caf6[_0x44cbf7(0x2dc)]===_0x44cbf7(0x55c);}}[_0x13208d(0x469)](){const _0x391903=_0x13208d;if(!this[_0x391903(0x623)])return[];try{this['_statusEnv']['db']?.[_0x391903(0x455)]?.();}catch{}const _0x250d23=Date[_0x391903(0x4ec)](),_0x284a81=_0x46d00e[_0x391903(0x216)](),_0x27f86d=[];for(const {value:_0x46ddec}of this[_0x391903(0x623)][_0x391903(0x3c9)](_0xb6b155)){if(!_0x46ddec)continue;let _0x39e4f8=null;_0x46ddec['host']===_0x284a81&&typeof _0x46ddec['pid']===_0x391903(0x72c)&&(_0x39e4f8=!this[_0x391903(0x2c9)](_0x46ddec));if(_0x39e4f8===![])continue;const _0x3aa2fe=_0x46ddec['expiresAt']==null||_0x46ddec[_0x391903(0x282)]>=_0x250d23;if(_0x39e4f8===!![]||_0x3aa2fe)_0x27f86d[_0x391903(0x557)](_0x46ddec);}return _0x27f86d;}async['reap'](_0x5b1efc=0x0){const _0xabcf2e=_0x13208d;if(!this['_statusEnv']||!this[_0xabcf2e(0x89b)])return;const _0x4a2254=Date[_0xabcf2e(0x4ec)]()-_0x5b1efc,_0x7c19e9=new Set(),_0x5848c3=[],_0x5a3e2d=_0x46d00e['hostname'](),_0x3e4235=require$$3[_0xabcf2e(0x598)];for(const {key:_0x195aa3,value:_0x548314}of this[_0xabcf2e(0x623)][_0xabcf2e(0x3c9)](_0xb6b155)){if(!_0x548314)continue;const _0x392371=_0x548314[_0xabcf2e(0x26b)]===_0x5a3e2d&&typeof _0x548314[_0xabcf2e(0x5c3)]===_0xabcf2e(0x72c),_0x25bbc5=_0x392371?this['_nodeDead'](_0x548314):_0x548314[_0xabcf2e(0x282)]!=null&&_0x548314[_0xabcf2e(0x282)]<_0x4a2254;if(_0x25bbc5)_0x5848c3[_0xabcf2e(0x557)](_0x195aa3);else{_0x7c19e9[_0xabcf2e(0x4da)](_0x2c3d4d(_0x548314)??_0x195aa3);if(_0x548314['version']&&_0x548314[_0xabcf2e(0x598)]!==_0x3e4235){if(!this[_0xabcf2e(0x1ff)])this['_versionSkewWarned']=new Set();!this['_versionSkewWarned'][_0xabcf2e(0x2ad)](_0x548314[_0xabcf2e(0x598)])&&(this[_0xabcf2e(0x1ff)][_0xabcf2e(0x4da)](_0x548314[_0xabcf2e(0x598)]),this[_0xabcf2e(0x58a)]['log']?.[_0xabcf2e(0x44f)]?.(_0xabcf2e(0x76a)+(_0x548314['pid']??'?')+_0xabcf2e(0x763)+_0x548314[_0xabcf2e(0x598)]+_0xabcf2e(0x2f7)+_0x3e4235+'\x20—\x20'+'mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.',{'feature':_0xabcf2e(0x744)}));}}}for(const _0x4c5551 of _0x5848c3)this['_removeRowAsync'](_0x4c5551);if(this['_ensureDesired']()){const _0x9e9b50=[];for(const {key:_0x32fe69}of this[_0xabcf2e(0x3f5)]('node')){if(!_0x7c19e9[_0xabcf2e(0x2ad)](_0x32fe69)){if(_0x16df1a)try{this[_0xabcf2e(0x831)][_0xabcf2e(0x8a6)](_0xabcf2e(0x34f)+_0x32fe69);}catch{}else _0x9e9b50[_0xabcf2e(0x557)](this[_0xabcf2e(0x831)][_0xabcf2e(0x417)](_0xabcf2e(0x34f)+_0x32fe69));}}if(_0x9e9b50[_0xabcf2e(0x6ad)])await Promise[_0xabcf2e(0x1fa)](_0x9e9b50);}}['startHeartbeat'](_0x20b443=null){const _0x1ca04c=_0x13208d;if(this[_0x1ca04c(0x407)])return;if(!this[_0x1ca04c(0x89b)]||!this[_0x1ca04c(0x623)]){this[_0x1ca04c(0x58a)]?.[_0x1ca04c(0x689)]?.['warn']?.(_0x1ca04c(0x6fc)+this[_0x1ca04c(0x89b)]+_0x1ca04c(0x4e4)+!!this[_0x1ca04c(0x623)]+')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census',{'feature':'processes'});return;}this[_0x1ca04c(0x571)]=_0x20b443,this['_onProcEvent']=()=>this['_maybePublish']();for(const _0x5f36bd of _0x4e6cee)this['okdb'][_0x1ca04c(0x74a)]['on'](_0x5f36bd,this[_0x1ca04c(0x494)]);this[_0x1ca04c(0x1c6)]();const _0x4ade69=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x5e6904;this[_0x1ca04c(0x407)]=setInterval(()=>{const _0x33f64e=_0x1ca04c;if(this[_0x33f64e(0x571)])try{this[_0x33f64e(0x571)]();}catch{}this['_publishNow'](),this[_0x33f64e(0x5c6)]()[_0x33f64e(0x39e)](()=>{});},_0x4ade69);if(this['_hbTimer'][_0x1ca04c(0x895)])this['_hbTimer'][_0x1ca04c(0x895)]();}[_0x13208d(0x28c)](){const _0x21d1e6=_0x13208d;if(!this['_isWriter']||!this['_statusEnv'])return;if(Date[_0x21d1e6(0x4ec)]()-this[_0x21d1e6(0x809)]<_0xb7f8a6)return;this[_0x21d1e6(0x1c6)]();}['_publishNow'](){const _0x388f54=_0x13208d;if(!this[_0x388f54(0x89b)]||!this[_0x388f54(0x623)])return;this[_0x388f54(0x809)]=Date[_0x388f54(0x4ec)]();try{const _0x5135b4=[this[_0x388f54(0x541)]()];for(const _0x556103 of this[_0x388f54(0x3c5)][_0x388f54(0x722)]())_0x5135b4[_0x388f54(0x557)](this[_0x388f54(0x4a1)](_0x556103));const _0x408570=_0x3c3fc6[_0x388f54(0x487)]?_0x3c3fc6[_0x388f54(0x4ec)]():0x0;for(const _0x345119 of _0x5135b4){try{this[_0x388f54(0x297)](_0x345119),this['_publishFailWarned']=![];}catch(_0x5d3ce4){!this[_0x388f54(0x449)]&&(this['_publishFailWarned']=!![],this[_0x388f54(0x58a)]?.[_0x388f54(0x689)]?.[_0x388f54(0x44f)]?.(_0x388f54(0x3c1)+_0x5d3ce4[_0x388f54(0x81d)],{'feature':_0x388f54(0x65b)}));}}if(_0x3c3fc6[_0x388f54(0x487)])_0x3c3fc6[_0x388f54(0x25a)](_0x388f54(0x7c7),_0x3c3fc6[_0x388f54(0x4ec)]()-_0x408570,_0x388f54(0x82c)+_0x5135b4[_0x388f54(0x6ad)]+_0x388f54(0x29c));}catch(_0xb5b6e0){!this[_0x388f54(0x449)]&&(this['_publishFailWarned']=!![],this[_0x388f54(0x58a)]?.['log']?.[_0x388f54(0x44f)]?.(_0x388f54(0x3c1)+_0xb5b6e0[_0x388f54(0x81d)],{'feature':_0x388f54(0x65b)}));}}async[_0x13208d(0x236)](){const _0x45042f=_0x13208d;if(this[_0x45042f(0x494)]){for(const _0x3d6910 of _0x4e6cee){try{this[_0x45042f(0x58a)]['events'][_0x45042f(0x804)](_0x3d6910,this[_0x45042f(0x494)]);}catch{}}this[_0x45042f(0x494)]=null;}this[_0x45042f(0x407)]&&(clearInterval(this[_0x45042f(0x407)]),this[_0x45042f(0x407)]=null);try{if(this['_statusEnv']&&this[_0x45042f(0x89b)])await this[_0x45042f(0x89f)](this['_rowKey']);}catch{}}async[_0x13208d(0x1d0)](){const _0x528695=_0x13208d;if(!this[_0x528695(0x623)]||!this[_0x528695(0x89b)])return;try{await this[_0x528695(0x89f)](this[_0x528695(0x46c)]);}catch{}try{const _0xc47e67=[];for(const {value:_0x8eaa56}of this[_0x528695(0x623)][_0x528695(0x3c9)](_0xb6b155)){if(_0x8eaa56?.[_0x528695(0x2af)]===process[_0x528695(0x5c3)]&&_0x8eaa56[_0x528695(0x6b5)])_0xc47e67['push'](_0x8eaa56['nodeKey']);}for(const _0x184df3 of _0xc47e67){try{await this['removeNode'](_0x184df3);}catch{}}}catch{}}async[_0x13208d(0x711)](){const _0x1c2fa5=_0x13208d;return this[_0x1c2fa5(0x539)](this[_0x1c2fa5(0x541)]());}async[_0x13208d(0x52f)](_0x265a88){const _0xbf819=_0x13208d;if(!this[_0xbf819(0x623)]||!this['_isWriter'])return;return this[_0xbf819(0x539)](this[_0xbf819(0x4a1)](_0x265a88));}['_buildChildRow']({pid:_0x5afee4,startedAt:_0x4b9b58,kind:_0x436e7d,supervisorKey:_0x3e963b,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x13208d(0x6e8),meta:meta=null,stats:stats=null}){const _0x16aa6c=_0x13208d,_0xaa054c=Date[_0x16aa6c(0x4ec)](),_0xc08bd1=_0x194d70(_0x5afee4,_0x4b9b58);return{'nodeKey':_0x5aeb4a(_0xc08bd1,'0'),'processKey':_0xc08bd1,'instanceId':'0','pid':_0x5afee4,'startedAt':_0x4b9b58,'ppid':process[_0x16aa6c(0x5c3)],'host':_0x46d00e['hostname'](),'supervisorKey':_0x3e963b,'slot':slot,'slotKey':slotKey,'kind':_0x436e7d,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0xaa054c,'expiresAt':_0xaa054c+_0x192c22,'caps':this[_0x16aa6c(0x5c7)](_0x436e7d,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x13208d(0x568)](_0xda7f57){const _0x4ab9e4=_0x13208d;if(!_0xda7f57?.['pid'])return null;const _0x5017fa=_0x194d70(_0xda7f57[_0x4ab9e4(0x5c3)],_0xda7f57[_0x4ab9e4(0x76f)]);this[_0x4ab9e4(0x3c5)][_0x4ab9e4(0x259)](_0x5017fa,{..._0xda7f57,'supervisorKey':_0xda7f57[_0x4ab9e4(0x2a4)]??this['_selfKey']});if(this[_0x4ab9e4(0x89b)])await this[_0x4ab9e4(0x52f)](this[_0x4ab9e4(0x3c5)]['get'](_0x5017fa))['catch']?.(()=>{});return _0x5017fa;}[_0x13208d(0x8b0)](_0x50b573){const _0x5a223b=_0x13208d;if(!_0x50b573)return;return this[_0x5a223b(0x3c5)][_0x5a223b(0x360)](_0x50b573),this['removeNode'](_0x50b573);}['_sampleOwnStats'](){const _0x55dbc6=_0x13208d,_0x46ea70=Date[_0x55dbc6(0x4ec)](),_0x10dcc4=process[_0x55dbc6(0x40f)](),_0x6dd33f=(_0x46ea70-this[_0x55dbc6(0x815)])*0x3e8;if(_0x6dd33f>=0x3d090){const _0x4873c5=_0x10dcc4[_0x55dbc6(0x402)]-this['_lastCpuUsage']['user']+(_0x10dcc4[_0x55dbc6(0x7f0)]-this[_0x55dbc6(0x1f8)][_0x55dbc6(0x7f0)]),_0x240233=_0x46d00e[_0x55dbc6(0x662)]()[_0x55dbc6(0x6ad)]||0x1;this[_0x55dbc6(0x757)]=Math[_0x55dbc6(0x279)](0x64,Math['round'](_0x4873c5/(_0x6dd33f*_0x240233)*0x64)),this[_0x55dbc6(0x2cc)]=Math[_0x55dbc6(0x578)](_0x6dd33f/0x3e8),this['_lastCpuUsage']=_0x10dcc4,this[_0x55dbc6(0x815)]=_0x46ea70;}const _0xb3a46b=process[_0x55dbc6(0x8bb)](),_0x18f970=this[_0x55dbc6(0x73c)][_0x55dbc6(0x7d1)];let _0x4ef25d=0x0;if(_0x18f970>0x0){const _0x49a6ed=[this[_0x55dbc6(0x58a)],...this[_0x55dbc6(0x58a)][_0x55dbc6(0x41e)]?.[_0x55dbc6(0x722)]?.()??[]];for(const _0x221973 of _0x49a6ed){const _0x5151c2=_0x221973[_0x55dbc6(0x56f)]?.[_0x55dbc6(0x4fd)];if(_0x5151c2)_0x4ef25d+=_0x5151c2[_0x55dbc6(0x48f)][_0x55dbc6(0x760)];}}let _0x5cc868=null;const _0x37dfd4=_0x18f970;if(_0x37dfd4>0x0){let _0x24ac6c=0x0;for(const _0x2f99f8 of this[_0x55dbc6(0x73c)][_0x55dbc6(0x722)]())_0x24ac6c+=_0x2f99f8['heapUsed']||0x0;_0x5cc868={'count':_0x37dfd4,'heapUsed':_0x24ac6c,'sandbox':_0x18f970,'busy':_0x4ef25d};}return{'rss':_0xb3a46b[_0x55dbc6(0x796)],'heapUsed':_0xb3a46b[_0x55dbc6(0x256)],'heapTotal':_0xb3a46b[_0x55dbc6(0x41d)],'external':_0xb3a46b['external'],'cpuPct':this[_0x55dbc6(0x757)],'cpuWindowMs':this[_0x55dbc6(0x2cc)]??null,'threads':_0x5cc868,'at':_0x46ea70};}[_0x13208d(0x3ed)](_0x39e408,_0x58da68){const _0x59abd8=_0x13208d;if(!_0x39e408||!_0x58da68)return;this[_0x59abd8(0x73c)][_0x59abd8(0x259)](_0x39e408,_0x58da68);}[_0x13208d(0x4bb)](_0x2f3450){const _0x41f8f3=_0x13208d;this['_threadStats'][_0x41f8f3(0x360)](_0x2f3450);}[_0x13208d(0x1d7)](_0x20c666,_0x218db5,_0x1302fc=undefined){const _0x37d1be=_0x13208d,_0xda13a1=this[_0x37d1be(0x3c5)][_0x37d1be(0x2fa)](_0x20c666);if(!_0xda13a1||!_0x218db5)return;if(_0x1302fc!==undefined)_0xda13a1[_0x37d1be(0x50e)]=_0x1302fc;_0xda13a1[_0x37d1be(0x847)]={'rss':_0x218db5[_0x37d1be(0x796)]??null,'heapUsed':_0x218db5[_0x37d1be(0x256)]??null,'heapTotal':_0x218db5[_0x37d1be(0x41d)]??null,'external':_0x218db5[_0x37d1be(0x54d)]??null,'cpuPct':_0x218db5[_0x37d1be(0x50a)]??null,'cpuWindowMs':_0x218db5[_0x37d1be(0x4bc)]??null,'threads':_0x218db5[_0x37d1be(0x356)]??null,'claims':_0x218db5[_0x37d1be(0x7aa)]??null,'envsOpen':_0x218db5['envsOpen']??null,'at':Date[_0x37d1be(0x4ec)]()};}['_buildOwnRow'](){const _0x1f1046=_0x13208d,_0x566d82=Date[_0x1f1046(0x4ec)](),_0x2547fb=this[_0x1f1046(0x58a)][_0x1f1046(0x58f)]||{},_0x21780e=this['_kind']||'cli';return{'nodeKey':this[_0x1f1046(0x46c)],'processKey':this['_selfKey'],'instanceId':this['_instanceId'],'pid':process['pid'],'startedAt':this[_0x1f1046(0x8ad)],'instanceStartedAt':this['_startedAt'],'ppid':typeof process[_0x1f1046(0x2af)]===_0x1f1046(0x72c)?process[_0x1f1046(0x2af)]:null,'host':_0x46d00e['hostname'](),'supervisorKey':this['_supervisorKey']??null,'version':require$$3[_0x1f1046(0x598)],'kind':_0x21780e,'role':{'engines':!!_0x2547fb[_0x1f1046(0x38c)],'processors':!!_0x2547fb['processors'],'compaction':_0x2547fb['compaction'],'http':_0x2547fb['http']},'listenAddr':this['_listenAddr']??null,'heartbeatAt':_0x566d82,'expiresAt':_0x566d82+_0x192c22,'caps':this[_0x1f1046(0x5c7)](_0x21780e,_0x2547fb),'lifecycle':{'state':'running','desiredVersionApplied':null},'meta':{...this[_0x1f1046(0x471)]},'processing':_0x2547fb[_0x1f1046(0x78a)]?this[_0x1f1046(0x44c)]():null,'engines':_0x2547fb[_0x1f1046(0x38c)]?[...this[_0x1f1046(0x58a)][_0x1f1046(0x441)]??[]]:null,'singletonClaims':this['_collectSingletonClaims'](),'stats':this[_0x1f1046(0x523)](),'writers':this[_0x1f1046(0x6f0)]()};}[_0x13208d(0x6f0)](){const _0xb8b63a=_0x13208d,_0x5e2d72={};try{for(const [_0x24cc5a,_0x4d2670]of this[_0xb8b63a(0x58a)][_0xb8b63a(0x41e)]){try{const _0x577680=_0x4d2670['writerStatus']?.();if(!_0x577680)continue;if(!_0x577680[_0xb8b63a(0x799)]&&!_0x577680['committed']&&!(_0x577680[_0xb8b63a(0x57c)]??0x0)&&!_0x577680['draining'])continue;_0x5e2d72[_0x24cc5a]={'depth':_0x577680[_0xb8b63a(0x799)],'oldestPendingMs':_0x577680['oldestPendingMs'],'committed':_0x577680[_0xb8b63a(0x50c)],'commitsPerSec':_0x577680[_0xb8b63a(0x6d2)],'commitP99Ms':_0x577680[_0xb8b63a(0x52c)],'parkedNow':_0x577680[_0xb8b63a(0x57c)]??0x0,'draining':!!_0x577680[_0xb8b63a(0x810)]};}catch{}}}catch{}return Object['keys'](_0x5e2d72)[_0xb8b63a(0x6ad)]?_0x5e2d72:null;}['_collectSingletonClaims'](){const _0x387685=_0x13208d,_0x580fff=process[_0x387685(0x5c3)],_0x5e8bb4=Date[_0x387685(0x4ec)](),_0xe6b517=_0x22f9de=>{const _0x571cca=_0x387685;if(!_0x22f9de)return[];const _0x1b539c=[];try{for(const {id:_0x59d5c0,entry:_0x5f4f4b}of _0x22f9de[_0x571cca(0x3f8)]()){if(_0x5f4f4b?.[_0x571cca(0x403)]?.[_0x571cca(0x5c3)]!==_0x580fff)continue;const _0x206a54=_0x5f4f4b['updatedAt']??_0x5f4f4b[_0x571cca(0x82f)]??0x0;if(_0x206a54+(_0x5f4f4b[_0x571cca(0x893)]??0x0)<_0x5e8bb4)continue;_0x1b539c[_0x571cca(0x557)](_0x59d5c0);}}catch{}return _0x1b539c;},_0x2d2bd5=_0xe6b517(this[_0x387685(0x633)]('compact')),_0x318e27=_0xe6b517(this[_0x387685(0x633)]('sync'));if(!_0x2d2bd5[_0x387685(0x6ad)]&&!_0x318e27[_0x387685(0x6ad)])return null;return{'compact':_0x2d2bd5,'replicate':_0x318e27};}[_0x13208d(0x633)](_0x345949){const _0x33ffab=_0x13208d;if(!this[_0x33ffab(0x58a)]?.[_0x33ffab(0x6e7)])return null;if(!this[_0x33ffab(0x274)])this['_singletonLocks']=new Map();let _0x5989bf=this[_0x33ffab(0x274)][_0x33ffab(0x2fa)](_0x345949);if(!_0x5989bf)try{_0x5989bf=new _0x200d49(this[_0x33ffab(0x58a)]['_rootDb'],{'namespace':_0x345949}),this[_0x33ffab(0x274)]['set'](_0x345949,_0x5989bf);}catch{return null;}return _0x5989bf;}[_0x13208d(0x44c)](){const _0x571689=_0x13208d,_0x26e40d=[];try{for(const [_0x1bb5b5,_0x5cbb06]of this[_0x571689(0x58a)][_0x571689(0x41e)]){if(_0x1bb5b5[_0x571689(0x579)]('~'))continue;for(const _0x22a841 of _0x5cbb06[_0x571689(0x2bd)]['tierList']())_0x26e40d[_0x571689(0x557)]({..._0x22a841,'env':_0x1bb5b5});}}catch{}return{'participate':this['okdb'][_0x571689(0x78a)]?.['_participate']??![],'processors':_0x26e40d};}[_0x13208d(0x3c3)](){const _0x9256d=_0x13208d;if(this[_0x9256d(0x831)])return!![];const _0x425a9d=this[_0x9256d(0x58a)][_0x9256d(0x6e7)];if(!_0x425a9d)return![];return this[_0x9256d(0x831)]=_0x425a9d[_0x9256d(0x727)](_0x7217f8,{'dupSort':![]}),this[_0x9256d(0x6d6)]=_0x425a9d[_0x9256d(0x727)](_0x4c0ca4,{'dupSort':![]}),!![];}async[_0x13208d(0x715)](){const _0x1f0e73=_0x13208d;if(!this[_0x1f0e73(0x3c3)]())return;const _0x2abd14=_0x1f0e73(0x81b),_0x26289b=0x1,_0x164e3b=this['_desired'][_0x1f0e73(0x2fa)](_0x2abd14)??0x0;if(_0x164e3b>=_0x26289b)return;const _0x2d1e36=_0x1f7606=>{const _0x7f7beb=_0x1f0e73;if(_0x1f7606==='worker')return _0x7f7beb(0x1cf);if(_0x1f7606===_0x7f7beb(0x35c))return _0x7f7beb(0x8c4);return _0x1f7606;};await this[_0x1f0e73(0x58a)]['_systemEnv'][_0x1f0e73(0x863)][_0x1f0e73(0x826)](()=>{const _0x4cb30d=_0x1f0e73;for(const _0x28f0ff of[_0x4cb30d(0x353),_0x4cb30d(0x64c)]){for(const {key:_0x4ea021,value:_0x396bdc}of this['_desired'][_0x4cb30d(0x3c9)]({'start':_0x28f0ff,'end':_0x28f0ff+'\xff'})){if(typeof _0x4ea021!==_0x4cb30d(0x1d2)||!_0x4ea021[_0x4cb30d(0x579)](_0x28f0ff))break;const _0x782979=_0x2d1e36(_0x396bdc[_0x4cb30d(0x747)]);if(_0x782979!==_0x396bdc[_0x4cb30d(0x747)])this['_desired'][_0x4cb30d(0x25f)](_0x4ea021,{..._0x396bdc,'mode':_0x782979});}}this['_desired']['put'](_0x2abd14,_0x26289b);});}[_0x13208d(0x587)](){const _0x1d29af=_0x13208d;return!!this[_0x1d29af(0x831)];}[_0x13208d(0x3f7)](_0x2a301f,_0x42198b){const _0x5f4293=_0x13208d;if(!this[_0x5f4293(0x3c3)]())return null;const _0x17744e=_0x2a301f+'/'+_0x42198b;return this['_refreshDesiredSnapshot'](),this[_0x5f4293(0x4a7)][_0x5f4293(0x2fa)](_0x17744e)??this[_0x5f4293(0x831)][_0x5f4293(0x2fa)](_0x17744e)??null;}[_0x13208d(0x7c1)](){const _0x2898ea=_0x13208d;if(!_0x16df1a)return;try{this[_0x2898ea(0x58a)][_0x2898ea(0x736)]?.['db']?.['resetReadTxn']?.();}catch{}}async[_0x13208d(0x312)](_0x199594,_0x50b683,_0x2fe61e){const _0x1bf219=_0x13208d;if(!this[_0x1bf219(0x3c3)]())return null;const _0x3dc127=_0x199594+'/'+_0x50b683;this[_0x1bf219(0x7c1)]();const _0x4e1763=this['_desiredOverlay'][_0x1bf219(0x2fa)](_0x3dc127)??this[_0x1bf219(0x831)][_0x1bf219(0x2fa)](_0x3dc127)??{'version':0x0},_0x18e2de=(_0x4e1763[_0x1bf219(0x598)]||0x0)+0x1,_0x2ff5bf={..._0x4e1763,..._0x2fe61e,'version':_0x18e2de,'updatedAt':Date[_0x1bf219(0x4ec)]()};this[_0x1bf219(0x4a7)][_0x1bf219(0x259)](_0x3dc127,_0x2ff5bf);try{await this[_0x1bf219(0x58a)][_0x1bf219(0x736)][_0x1bf219(0x863)][_0x1bf219(0x826)](()=>{const _0x3ce0eb=_0x1bf219;this[_0x3ce0eb(0x831)][_0x3ce0eb(0x25f)](_0x3dc127,_0x2ff5bf);});}finally{if(this[_0x1bf219(0x4a7)][_0x1bf219(0x2fa)](_0x3dc127)===_0x2ff5bf)this[_0x1bf219(0x4a7)][_0x1bf219(0x360)](_0x3dc127);}return _0x18e2de;}['listDesired'](_0x3278b8){const _0x8a1857=_0x13208d;if(!this[_0x8a1857(0x3c3)]())return[];this[_0x8a1857(0x7c1)]();const _0x13c31c=_0x3278b8+'/',_0x4429db=[];for(const {key:_0x303913,value:_0x104072}of this[_0x8a1857(0x831)][_0x8a1857(0x3c9)]({'start':_0x13c31c,'end':_0x13c31c+'\xff'})){if(typeof _0x303913!==_0x8a1857(0x1d2)||!_0x303913['startsWith'](_0x13c31c))break;_0x4429db['push']({'key':_0x303913[_0x8a1857(0x27f)](_0x13c31c[_0x8a1857(0x6ad)]),'value':_0x104072});}return _0x4429db;}[_0x13208d(0x653)](_0x5a6db0){const _0x5d5617=_0x13208d;if(!this['_ensureDesired']())return null;return this[_0x5d5617(0x6d6)][_0x5d5617(0x2fa)](_0x5a6db0)??null;}async[_0x13208d(0x1d8)](_0x572c60,_0x2ff94f,_0x7e3f1f={}){const _0x53cb84=_0x13208d;if(!this[_0x53cb84(0x3c3)]())return null;let _0x2f61d4;return await this[_0x53cb84(0x58a)][_0x53cb84(0x736)][_0x53cb84(0x863)][_0x53cb84(0x826)](()=>{const _0xa6f062=_0x53cb84,_0x252901=this[_0xa6f062(0x6d6)][_0xa6f062(0x2fa)](_0x572c60)||{'epoch':0x0};_0x2f61d4=(_0x252901['epoch']||0x0)+0x1,this['_cmd'][_0xa6f062(0x25f)](_0x572c60,{..._0x252901,..._0x7e3f1f,'cmd':_0x2ff94f,'epoch':_0x2f61d4,'updatedAt':Date[_0xa6f062(0x4ec)]()});}),_0x2f61d4;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x93bbc6,'nodeKey':_0x194d70,'logicalKey':_0x2d74a2,'slotKey':_0x83cc,'PROCESS_ENV':_0x34295a,'NODE_TYPE':_0xb6b155},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x3b3758=_0x1a2e0d;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x295698=require$$0$6,{clampTimerDelay:_0x2ea3ff}=requireOkdbTimers(),{EVENTS:_0x2e6c6e,CHANGE_ACTIONS:_0x1f21ab}=requireOkdbEnums(),{LOOP:_0x356936}=requireOkdbLoopMonitor(),_0x479157=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x545a8f=0x5,_0x48ab6a=0x2710;class _0x515597 extends _0x295698{constructor(_0x953b47,_0x2f24e1={}){const _0x5d1773=_0x4c4a;super(),this[_0x5d1773(0x58a)]=_0x953b47,this[_0x5d1773(0x666)]=_0x2f24e1[_0x5d1773(0x769)]??_0x479157,this[_0x5d1773(0x1d6)]=_0x2f24e1[_0x5d1773(0x6e9)]??_0x545a8f,this[_0x5d1773(0x78c)]=_0x2f24e1[_0x5d1773(0x685)]??_0x48ab6a,this[_0x5d1773(0x276)]=![],this[_0x5d1773(0x681)]=new Map(),this[_0x5d1773(0x4ff)]=new Map(),this[_0x5d1773(0x513)]=new Map(),this[_0x5d1773(0x640)]=null,this['_draining']=![],this[_0x5d1773(0x1e5)]=new Set(),this['_pendingLocal']=new Set(),this[_0x5d1773(0x65e)]=_0x56081f=>this[_0x5d1773(0x2f4)](_0x56081f),this['_onPending']=_0x319eb2=>this[_0x5d1773(0x724)](_0x319eb2),this[_0x5d1773(0x695)]=_0x20941c=>this[_0x5d1773(0x748)](_0x20941c),this[_0x5d1773(0x5e9)]=()=>this[_0x5d1773(0x354)]();}[_0x3b3758(0x398)](){const _0x1ac0f2=_0x3b3758;if(this[_0x1ac0f2(0x276)])return;this[_0x1ac0f2(0x276)]=!![];for(const [_0x3205f2,_0x5d1ec3]of this[_0x1ac0f2(0x58a)]['_envs']){if(_0x3205f2[_0x1ac0f2(0x579)]('~'))continue;try{_0x5d1ec3['_enableChangelog']();}catch{}}for(const [_0x1d8286,_0xdfc52b]of this['okdb'][_0x1ac0f2(0x41e)]){if(_0x1d8286[_0x1ac0f2(0x579)]('~'))continue;try{this['_baselines'][_0x1ac0f2(0x259)](_0x1d8286,_0xdfc52b[_0x1ac0f2(0x3cb)]()||0x0);}catch{}}const {events:_0xaf6778}=this['okdb'];_0xaf6778['on'](_0x2e6c6e[_0x1ac0f2(0x5e5)],this[_0x1ac0f2(0x2be)]),_0xaf6778['on'](_0x2e6c6e[_0x1ac0f2(0x267)],this[_0x1ac0f2(0x65e)]),_0xaf6778['on'](_0x2e6c6e[_0x1ac0f2(0x5f8)],this['_onItem']),_0xaf6778['on'](_0x2e6c6e['ITEM_REMOVE'],this['_onItem']),_0xaf6778['on'](_0x2e6c6e[_0x1ac0f2(0x73e)],this[_0x1ac0f2(0x695)]),_0xaf6778['once'](_0x2e6c6e[_0x1ac0f2(0x357)],this[_0x1ac0f2(0x5e9)]);}['stop'](){const _0x52c3a3=_0x3b3758;if(!this[_0x52c3a3(0x276)])return;this['_started']=![];const {events:_0x860298}=this['okdb'];_0x860298[_0x52c3a3(0x804)](_0x2e6c6e[_0x52c3a3(0x5e5)],this[_0x52c3a3(0x2be)]),_0x860298[_0x52c3a3(0x804)](_0x2e6c6e[_0x52c3a3(0x267)],this[_0x52c3a3(0x65e)]),_0x860298[_0x52c3a3(0x804)](_0x2e6c6e['ITEM_UPDATE'],this[_0x52c3a3(0x65e)]),_0x860298['off'](_0x2e6c6e[_0x52c3a3(0x7a2)],this['_onItem']),_0x860298[_0x52c3a3(0x804)](_0x2e6c6e[_0x52c3a3(0x73e)],this[_0x52c3a3(0x695)]);try{_0x860298[_0x52c3a3(0x804)](_0x2e6c6e['SYSTEM_STOPPED'],this[_0x52c3a3(0x5e9)]);}catch{}this['_flushTimer']&&(clearTimeout(this['_flushTimer']),this[_0x52c3a3(0x640)]=null),this[_0x52c3a3(0x513)][_0x52c3a3(0x43c)](),this[_0x52c3a3(0x681)]['clear'](),this['_baselines'][_0x52c3a3(0x43c)](),this[_0x52c3a3(0x1e5)][_0x52c3a3(0x43c)](),this[_0x52c3a3(0x6c6)][_0x52c3a3(0x43c)]();}['_dedupeKey'](_0x1ae6d6,_0x166fd5,_0x4c8a68,_0x429bc8){return _0x1ae6d6+'\x00'+_0x166fd5+'\x00'+_0x4c8a68+'\x00'+_0x429bc8;}[_0x3b3758(0x690)](_0x4f67a8,_0x3de9c1,_0xc0211,_0x593cfb){const _0x337670=_0x3b3758,_0x4b7dc4=this[_0x337670(0x6dd)](_0x4f67a8,_0x3de9c1,_0xc0211,_0x593cfb);if(this[_0x337670(0x1e5)][_0x337670(0x2ad)](_0x4b7dc4))return![];this['_seen'][_0x337670(0x4da)](_0x4b7dc4);if(this['_seen'][_0x337670(0x7d1)]>this[_0x337670(0x78c)]){const _0xd3cfb0=this[_0x337670(0x1e5)][_0x337670(0x722)]()[_0x337670(0x2a5)]()[_0x337670(0x352)];this[_0x337670(0x1e5)][_0x337670(0x360)](_0xd3cfb0);}return!![];}[_0x3b3758(0x724)](_0x50673c){const _0x24aec8=_0x3b3758;if(!this[_0x24aec8(0x276)]||!_0x50673c)return;const {env:_0x485437,type:_0x492aea,key:_0x4c792c,clock:_0x2df75f}=_0x50673c;if(_0x485437==null||_0x492aea==null||_0x4c792c==null)return;if(typeof _0x485437==='string'&&_0x485437[_0x24aec8(0x579)]('~'))return;if(typeof _0x492aea===_0x24aec8(0x1d2)&&_0x492aea['startsWith']('~'))return;this[_0x24aec8(0x6c6)][_0x24aec8(0x4da)](this['_dedupeKey'](_0x485437,_0x492aea,_0x4c792c,_0x2df75f)),this[_0x24aec8(0x6c6)][_0x24aec8(0x7d1)]>this[_0x24aec8(0x78c)]&&this[_0x24aec8(0x6c6)][_0x24aec8(0x360)](this[_0x24aec8(0x6c6)][_0x24aec8(0x722)]()[_0x24aec8(0x2a5)]()['value']);}[_0x3b3758(0x2f4)](_0x2db877){const _0xe1d37a=_0x3b3758;if(!this['_started']||!_0x2db877)return;const {env:_0x5b1423,type:_0x2b86a7,key:_0x3b1f4f,clock:_0xa4350b,origin:_0x4a36d4,action:_0x58647c,newValue:_0xb72e6,oldValue:_0x5c3816}=_0x2db877;if(_0x5b1423==null||_0x2b86a7==null||_0x3b1f4f==null)return;if(typeof _0x5b1423===_0xe1d37a(0x1d2)&&_0x5b1423[_0xe1d37a(0x579)]('~'))return;if(typeof _0x2b86a7===_0xe1d37a(0x1d2)&&_0x2b86a7['startsWith']('~'))return;this[_0xe1d37a(0x6c6)][_0xe1d37a(0x360)](this['_dedupeKey'](_0x5b1423,_0x2b86a7,_0x3b1f4f,_0xa4350b));if(!this[_0xe1d37a(0x690)](_0x5b1423,_0x2b86a7,_0x3b1f4f,_0xa4350b))return;const _0x2b2c02=_0x58647c===_0x1f21ab[_0xe1d37a(0x1c2)]?'remove':_0xe1d37a(0x25f);this[_0xe1d37a(0x663)](_0xe1d37a(0x6af),{'env':_0x5b1423,'type':_0x2b86a7,'key':_0x3b1f4f,'op':_0x2b2c02,'clock':_0xa4350b,'origin':_0x4a36d4,'value':_0x2b2c02===_0xe1d37a(0x417)?null:_0xb72e6,'prevValue':_0x5c3816});}[_0x3b3758(0x748)](_0x1850ea){const _0x26a118=_0x3b3758;if(!this[_0x26a118(0x276)])return;if(!_0x1850ea||typeof _0x1850ea[_0x26a118(0x787)]!==_0x26a118(0x1d2)||typeof _0x1850ea[_0x26a118(0x4fa)]!==_0x26a118(0x1d2))return;const {env:_0x4a9497,type:_0x50f936}=_0x1850ea;if(_0x4a9497[_0x26a118(0x579)]('~')||_0x50f936[_0x26a118(0x579)]('~'))return;this[_0x26a118(0x513)][_0x26a118(0x259)](_0x4a9497+'\x00'+_0x50f936,{'env':_0x4a9497,'type':_0x50f936}),this[_0x26a118(0x755)]();}[_0x3b3758(0x755)](){const _0x51e693=_0x3b3758;if(this[_0x51e693(0x640)])return;const _0x306abe=()=>{const _0x33b2a6=_0x51e693;this[_0x33b2a6(0x640)]=null,this[_0x33b2a6(0x1eb)]()['catch'](()=>{});};this['_flushTimer']=setTimeout(_0x306abe,_0x2ea3ff(this[_0x51e693(0x1d6)]));}async[_0x3b3758(0x1eb)](){const _0x590978=_0x3b3758;if(this[_0x590978(0x78b)]){this[_0x590978(0x755)]();return;}this[_0x590978(0x78b)]=!![];try{const _0x54ed95=[...this['_pending']['values']()];this[_0x590978(0x513)][_0x590978(0x43c)]();let _0x4cfe98=![];for(const {env:_0x597a83,type:_0x530fbc}of _0x54ed95){try{const _0x4e60=await this['_drainOne'](_0x597a83,_0x530fbc);if(_0x4e60)_0x4cfe98=!![];}catch{this['_pending']['set'](_0x597a83+'\x00'+_0x530fbc,{'env':_0x597a83,'type':_0x530fbc}),_0x4cfe98=!![];}}if(_0x4cfe98||this['_pending'][_0x590978(0x7d1)]>0x0)this[_0x590978(0x755)]();}finally{this[_0x590978(0x78b)]=![];}}async[_0x3b3758(0x8ab)](_0x3df72f,_0x1dfd57){const _0x3b857f=_0x3b3758,_0x9dbcd3=await this['okdb'][_0x3b857f(0x377)](_0x3df72f),_0xd0b5ab=_0x3df72f+'\x00'+_0x1dfd57;!this[_0x3b857f(0x681)]['has'](_0xd0b5ab)&&(!this[_0x3b857f(0x4ff)][_0x3b857f(0x2ad)](_0x3df72f)&&(_0x9dbcd3[_0x3b857f(0x4a3)](),this[_0x3b857f(0x4ff)][_0x3b857f(0x259)](_0x3df72f,_0x9dbcd3[_0x3b857f(0x3cb)]()||0x0)),this['_cursors'][_0x3b857f(0x259)](_0xd0b5ab,this[_0x3b857f(0x4ff)][_0x3b857f(0x2fa)](_0x3df72f)));const _0xf1451c=this[_0x3b857f(0x681)][_0x3b857f(0x2fa)](_0xd0b5ab),_0x34cff5=_0x9dbcd3[_0x3b857f(0x3cb)](_0x1dfd57)||0x0;if(_0x34cff5<=_0xf1451c)return![];const _0x3ac593=_0xf1451c+this[_0x3b857f(0x666)],_0x59d0aa=Math[_0x3b857f(0x279)](_0x34cff5,_0x3ac593),_0x4c7a9d=_0x356936[_0x3b857f(0x487)]?_0x356936['now']():0x0,_0x2330bc=Array[_0x3b857f(0x215)](_0x9dbcd3[_0x3b857f(0x19b)](_0x1dfd57,_0xf1451c+0x1,_0x59d0aa));let _0x4838b9=_0xf1451c;for(const _0x410497 of _0x2330bc){const {clock:_0x5caade,key:_0x48b4a0,action:_0x36659b,origin:_0x366a5c}=_0x410497;if(_0x5caade>_0x4838b9)_0x4838b9=_0x5caade;if(_0x48b4a0==null)continue;if(this['_pendingLocal'][_0x3b857f(0x2ad)](this[_0x3b857f(0x6dd)](_0x3df72f,_0x1dfd57,_0x48b4a0,_0x5caade)))continue;if(!this[_0x3b857f(0x690)](_0x3df72f,_0x1dfd57,_0x48b4a0,_0x5caade))continue;let _0x15148a,_0xdf2037;if(_0x36659b===_0x1f21ab[_0x3b857f(0x1c2)])_0x15148a=_0x3b857f(0x417),_0xdf2037=null;else{const _0x10af6a=_0x9dbcd3[_0x3b857f(0x2fa)](_0x1dfd57,_0x48b4a0);_0x10af6a==null?(_0x15148a=_0x3b857f(0x417),_0xdf2037=null):(_0x15148a=_0x3b857f(0x25f),_0xdf2037=_0x10af6a);}this[_0x3b857f(0x663)](_0x3b857f(0x6af),{'env':_0x3df72f,'type':_0x1dfd57,'key':_0x48b4a0,'op':_0x15148a,'clock':_0x5caade,'origin':_0x366a5c,'value':_0xdf2037});}if(_0x356936['enabled'])_0x356936[_0x3b857f(0x25a)](_0x3b857f(0x77e)+_0x3df72f+':'+_0x1dfd57,_0x356936[_0x3b857f(0x4ec)]()-_0x4c7a9d,'n='+_0x2330bc[_0x3b857f(0x6ad)]);return this['_cursors'][_0x3b857f(0x259)](_0xd0b5ab,Math['max'](_0x4838b9,_0x59d0aa)),_0x9dbcd3['getClock'](_0x1dfd57)>_0x59d0aa;}[_0x3b3758(0x2c4)](){const _0x12e8b2=_0x3b3758;return{'started':this[_0x12e8b2(0x276)],'quantum':this['_quantum'],'flushDebounce':this[_0x12e8b2(0x1d6)],'cursors':Object['fromEntries']([...this['_cursors'][_0x12e8b2(0x87f)]()][_0x12e8b2(0x595)](([_0x143db4,_0x4096a1])=>[_0x143db4[_0x12e8b2(0x813)]('\x00',':'),_0x4096a1])),'pending':this[_0x12e8b2(0x513)][_0x12e8b2(0x7d1)],'seen':this[_0x12e8b2(0x1e5)][_0x12e8b2(0x7d1)]};}}return _0x515597[_0x3b3758(0x275)]=_0x479157,okdbChangefeed={'OKDBChangefeed':_0x515597},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x1e178b=_0x1a2e0d;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x521294=require$$1$1,_0x14cedb=require$$1,{EVENTS:_0x27a123}=requireOkdbEnums(),_0x2d873b=require$$0,{slotKey:_0x168706}=requireOkdbProcessRegistry(),_0x217899=Number(process.env.OKDB_CLUSTER_RESPAWN_BACKOFF_MS)||0xfa,_0x46b2bf=0xfa0,_0x2e5009=0x5,_0x459ef3=0x2710,_0x30bf99=0xbb8,_0x96a7d8=0x7d0,_0x415f41=_0x1e178b(0x44a),_0x190cde=_0x1e178b(0x75d),_0x81b876=_0x1e178b(0x689),_0x406c45='stats',_0x4e7fd1=[_0x27a123[_0x1e178b(0x687)],_0x27a123[_0x1e178b(0x52b)],_0x27a123['FTS_DROP'],_0x27a123[_0x1e178b(0x3e4)],_0x27a123['INDEX_PROGRESS'],_0x27a123[_0x1e178b(0x5d7)],_0x27a123['INDEX_RESET'],_0x27a123[_0x1e178b(0x770)],_0x1e178b(0x1b2),_0x1e178b(0x574),_0x1e178b(0x4b2),_0x1e178b(0x332),_0x1e178b(0x6c4),_0x1e178b(0x504)],_0x1990a1=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0,_0x5c4ab6=0x64;function _0x43b45c(_0x12a2da){const _0x27681e=_0x1e178b;if(!_0x12a2da)return'null';const _0x117f73=(_0x12a2da[_0x27681e(0x78a)]||[])[_0x27681e(0x595)](_0x593da8=>[_0x593da8['env'],_0x593da8['id'],_0x593da8['mode'],_0x593da8[_0x27681e(0x694)],!!_0x593da8[_0x27681e(0x84a)],!!_0x593da8[_0x27681e(0x614)],!!_0x593da8[_0x27681e(0x1ae)],_0x593da8[_0x27681e(0x7c5)]?.['pid']??null,_0x593da8[_0x27681e(0x6cd)]?String(_0x593da8[_0x27681e(0x6cd)]?.[_0x27681e(0x81d)]??_0x593da8['error']):null]);return JSON[_0x27681e(0x2d1)]([!!_0x12a2da[_0x27681e(0x1da)],_0x117f73]);}function _0x390e01({workers:_0x21e650,makeOkdb:_0x5e6398,port:_0x6a93d6,primaryOkdb:_0x1fa5b6,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0x516b44=_0x1e178b;if(_0x521294[_0x516b44(0x46e)])return childEntry&&_0x521294[_0x516b44(0x51f)]({'exec':_0x14cedb[_0x516b44(0x1c9)](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0x110fc3=_0x516b44,_0x11ca3a=[];for(let _0x3f26a5=0x0;_0x3f26a5<process[_0x110fc3(0x1cb)]['length'];_0x3f26a5++){const _0x37fd3a=process[_0x110fc3(0x1cb)][_0x3f26a5];if(_0x37fd3a[_0x110fc3(0x579)](_0x110fc3(0x49c))||_0x37fd3a[_0x110fc3(0x579)](_0x110fc3(0x5cf))||_0x37fd3a[_0x110fc3(0x579)](_0x110fc3(0x728)))continue;if(_0x37fd3a==='-e'||_0x37fd3a===_0x110fc3(0x60d)||_0x37fd3a==='-p'||_0x37fd3a===_0x110fc3(0x76b)){_0x3f26a5++;continue;}_0x11ca3a['push'](_0x37fd3a);}return _0x11ca3a;})())}),_0x27edab({'workers':_0x21e650,'port':_0x6a93d6,'primaryOkdb':_0x1fa5b6,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x6a93d6});return _0x51f2a6({'makeOkdb':_0x5e6398,'port':_0x6a93d6});}function _0x27edab({workers:_0x3c0b1c,port:_0x412c8f,primaryOkdb:_0x5e542b,workerEnv:_0x56268d,workerRole:_0x2594dd,listenAddr:_0x4703c5}){const _0x4966fc=_0x1e178b,_0x2b008d=new Map(),_0x2f7ba1=new Map();let _0xf0849c=![];const _0x297fe7=_0xba481a=>_0xba481a?.['__okdbSlot'],_0x47917a=_0x23eccb=>{const _0xb301bd=_0x4c4a,_0x1b2de2=_0x521294['fork']({...process.env,..._0x56268d||{},'OKDB_CLUSTER_SLOT':String(_0x23eccb)});return _0x1b2de2[_0xb301bd(0x6d7)]=_0x23eccb,_0x2b008d[_0xb301bd(0x259)](_0x1b2de2['process'][_0xb301bd(0x5c3)],{'worker':_0x1b2de2,'startedAt':Date[_0xb301bd(0x4ec)](),'slot':_0x23eccb}),_0x1b2de2['on'](_0xb301bd(0x6cd),_0x55f9df=>{const _0x2e1c5a=_0xb301bd;console[_0x2e1c5a(0x689)](_0x2e1c5a(0x761)+_0x1b2de2['process'][_0x2e1c5a(0x5c3)]+_0x2e1c5a(0x433)+(_0x55f9df?.[_0x2e1c5a(0x81d)]??_0x55f9df));}),_0x1b2de2['on'](_0xb301bd(0x23b),()=>_0x2b9326()),_0x1b2de2;},_0x163361=_0x27b6e9=>{const _0x455d9b=_0x4c4a;for(const {worker:_0x586e70}of _0x2b008d[_0x455d9b(0x722)]()){if(_0x586e70[_0x455d9b(0x71b)]()||!_0x586e70[_0x455d9b(0x69f)]())continue;try{_0x586e70['send'](_0x27b6e9);}catch{}}};_0x5e542b?.['_activateProcesses']?.({'kind':_0x4966fc(0x3ae),'listenAddr':_0x4703c5})[_0x4966fc(0x39e)](()=>{}),_0x5e542b?.[_0x4966fc(0x65b)]?.['setOwnMeta']?.({'workersConfigured':_0x3c0b1c});const _0x4ada80={'engines':!![],'processors':!![],'compaction':!![],..._0x2594dd,'http':!![]},_0x2b9326=()=>{const _0x1f882c=_0x4966fc,_0x984c19=_0x5e542b?.[_0x1f882c(0x65b)];if(!_0x984c19||!_0x984c19['_isWriter'])return;const _0x591209=_0x984c19[_0x1f882c(0x712)];for(const {worker:_0x25ea4c,startedAt:_0x5b341b,slot:_0xd3b618,stats:_0x490d94,processing:_0x2403f9}of _0x2b008d[_0x1f882c(0x722)]()){if(_0x25ea4c[_0x1f882c(0x71b)]())continue;const _0x3e95df=_0x984c19[_0x1f882c(0x587)]?.()&&_0x984c19[_0x1f882c(0x3f7)](_0x1f882c(0x7e8),_0x5490ab(_0xd3b618))?.['decommission']===!![];_0x984c19[_0x1f882c(0x52f)]({'pid':_0x25ea4c['process'][_0x1f882c(0x5c3)],'startedAt':_0x5b341b,'kind':_0x1f882c(0x3d4),'supervisorKey':_0x591209,'slot':_0xd3b618,'slotKey':_0x5490ab(_0xd3b618),'role':_0x4ada80,'listenAddr':_0x4703c5,'lifecycle':_0x3e95df?_0x1f882c(0x3bd):_0x1f882c(0x6e8),'processing':_0x2403f9??null,'stats':_0x490d94??null})[_0x1f882c(0x39e)](()=>{});}},_0x5490ab=_0x3622cf=>_0x168706(_0x4966fc(0x296)+_0x412c8f,_0x3622cf),_0x4dc520=_0x1494ac=>{const _0x3b2865=_0x4966fc,_0x113d1e=_0x5e542b?.[_0x3b2865(0x65b)];if(!_0x113d1e?.[_0x3b2865(0x587)]?.())return![];return _0x113d1e[_0x3b2865(0x3f7)](_0x3b2865(0x7e8),_0x5490ab(_0x1494ac))?.[_0x3b2865(0x846)]===!![];};for(let _0x398291=0x0;_0x398291<_0x3c0b1c;_0x398291++){const _0x31a17b=_0x4dc520(_0x398291);_0x2f7ba1[_0x4966fc(0x259)](_0x398291,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x31a17b,'respawnTimer':null}),_0x31a17b?console[_0x4966fc(0x689)](_0x4966fc(0x6da)+_0x398291+_0x4966fc(0x7e4)):_0x47917a(_0x398291);}const _0x10d8e8=()=>{const _0x9dae43=_0x4966fc,_0x34e153=_0x5e542b?.['processes'];if(!_0x34e153?.[_0x9dae43(0x89b)]||!_0x34e153[_0x9dae43(0x587)]?.())return;for(const [_0x812a23,_0xee5f7f]of _0x2f7ba1[_0x9dae43(0x87f)]()){const _0x5ac454=_0x34e153[_0x9dae43(0x3f7)](_0x9dae43(0x7e8),_0x5490ab(_0x812a23)),_0x2ba92e=_0x5ac454?.[_0x9dae43(0x846)]===!![],_0x4de0d6=_0x5ac454?.[_0x9dae43(0x486)]===!![];if(_0x2ba92e&&!_0xee5f7f[_0x9dae43(0x89a)]){_0xee5f7f[_0x9dae43(0x89a)]=!![];_0xee5f7f['respawnTimer']&&(clearTimeout(_0xee5f7f['respawnTimer']),_0xee5f7f[_0x9dae43(0x349)]=null);for(const {worker:_0x392f6d}of _0x2b008d['values']()){if(_0x297fe7(_0x392f6d)!==_0x812a23||_0x392f6d['isDead']())continue;try{if(_0x4de0d6)_0x392f6d[_0x9dae43(0x864)]['kill'](_0x9dae43(0x675));else _0x392f6d['isConnected']()&&_0x392f6d['disconnect']();}catch{}}console[_0x9dae43(0x689)](_0x9dae43(0x80c)+(_0x4de0d6?_0x9dae43(0x819):_0x9dae43(0x472))+_0x9dae43(0x7b6)+_0x812a23+_0x9dae43(0x63b));}else{if(!_0x2ba92e&&_0xee5f7f[_0x9dae43(0x89a)]&&_0x5ac454){_0xee5f7f[_0x9dae43(0x89a)]=![],_0xee5f7f[_0x9dae43(0x31d)]=[],_0xee5f7f[_0x9dae43(0x7e7)]=0x0;const _0x39aebc=[..._0x2b008d[_0x9dae43(0x722)]()][_0x9dae43(0x721)](({worker:_0x396e57})=>_0x297fe7(_0x396e57)===_0x812a23&&!_0x396e57[_0x9dae43(0x71b)]());!_0x39aebc&&!_0xf0849c&&(_0x47917a(_0x812a23),console[_0x9dae43(0x689)]('[okdb-cluster]\x20recommissioned\x20worker\x20slot='+_0x812a23));}}}},_0x3e910a=()=>{try{_0x10d8e8();}catch{}};_0x5e542b?.['events']?.['on']?.(_0x27a123[_0x4966fc(0x3dc)],_0x3e910a);const _0x4b63d7=[];if(_0x5e542b?.['events']?.['on'])for(const _0x5a2c79 of _0x4e7fd1){const _0x18abfa=_0x2c5aa5=>{_0x163361({[_0x415f41]:_0x190cde,'event':_0x5a2c79,'data':_0x2c5aa5??{}});};_0x5e542b[_0x4966fc(0x74a)]['on'](_0x5a2c79,_0x18abfa),_0x4b63d7['push']({'event':_0x5a2c79,'handler':_0x18abfa});}const _0x301380=setInterval(()=>{_0x10d8e8(),_0x2b9326();},_0x1990a1);_0x301380[_0x4966fc(0x895)]?.();const _0x99829d=(_0x327473,_0x55e839)=>{const _0x5cb841=_0x4966fc;if(!_0x55e839||typeof _0x55e839!=='object'||_0x55e839[_0x415f41]!==_0x81b876)return;if(!_0x5e542b?.[_0x5cb841(0x689)]?.[_0x5cb841(0x258)])return;const _0x413efb=_0x55e839[_0x5cb841(0x6bb)]||{};_0x5e542b['log'][_0x5cb841(0x258)]({..._0x413efb,'msg':'[w'+_0x55e839[_0x5cb841(0x7e8)]+']\x20'+(_0x413efb[_0x5cb841(0x372)]??''),'meta':{..._0x413efb[_0x5cb841(0x74c)]||{},'worker':_0x55e839[_0x5cb841(0x7e8)],'workerPid':_0x55e839[_0x5cb841(0x5c3)]}});};_0x521294['on'](_0x4966fc(0x81d),_0x99829d);const _0x3056f5=(_0x5a8c7c,_0x35f36d)=>{const _0x41434d=_0x4966fc;if(!_0x35f36d||typeof _0x35f36d!==_0x41434d(0x601)||_0x35f36d[_0x415f41]!==_0x406c45)return;const _0xeb21f=_0x2b008d[_0x41434d(0x2fa)](_0x5a8c7c['process'][_0x41434d(0x5c3)]);if(_0xeb21f){_0xeb21f[_0x41434d(0x847)]={..._0x35f36d[_0x41434d(0x847)],'at':Date['now']()};if(_0x35f36d[_0x41434d(0x50e)]!==undefined){const _0x3addaa=_0x43b45c(_0x35f36d[_0x41434d(0x50e)]);_0x3addaa!==_0xeb21f['processingSig']&&(_0xeb21f[_0x41434d(0x25c)]=_0x3addaa,_0x5e26b6()),_0xeb21f['processing']=_0x35f36d[_0x41434d(0x50e)];}}};let _0x2ce48b=null;const _0x5e26b6=()=>{if(_0x2ce48b||_0xf0849c)return;_0x2ce48b=setTimeout(()=>{_0x2ce48b=null;if(!_0xf0849c)_0x2b9326();},_0x5c4ab6),_0x2ce48b['unref']?.();};_0x521294['on'](_0x4966fc(0x81d),_0x3056f5),_0x521294['on'](_0x4966fc(0x468),(_0x240635,_0x7b402d,_0x15d77d)=>{const _0x43df4f=_0x4966fc,_0x4471ef=_0x240635[_0x43df4f(0x864)][_0x43df4f(0x5c3)],_0x1b750a=_0x297fe7(_0x240635),_0x80ee9c=_0x2b008d[_0x43df4f(0x2fa)](_0x4471ef);if(_0x80ee9c&&_0x5e542b?.[_0x43df4f(0x65b)])_0x5e542b['processes']['removeNode'](_0x4471ef+':'+_0x80ee9c[_0x43df4f(0x76f)])[_0x43df4f(0x39e)](()=>{});_0x2b008d['delete'](_0x4471ef),console[_0x43df4f(0x689)](_0x43df4f(0x761)+_0x4471ef+_0x43df4f(0x405)+(_0x1b750a??'?')+_0x43df4f(0x44d)+(_0x43df4f(0x5f5)+_0x7b402d+_0x43df4f(0x2f1)+(_0x15d77d??_0x43df4f(0x7ce))+_0x43df4f(0x59c)+_0x2b008d[_0x43df4f(0x7d1)]+'\x20worker(s)\x20remaining')),_0x2b9326();if(_0xf0849c||_0x1b750a==null)return;const _0x42cccd=_0x2f7ba1[_0x43df4f(0x2fa)](_0x1b750a);if(!_0x42cccd||_0x42cccd[_0x43df4f(0x89a)])return;const _0x308997=Date[_0x43df4f(0x4ec)]();_0x42cccd[_0x43df4f(0x31d)][_0x43df4f(0x557)](_0x308997),_0x42cccd[_0x43df4f(0x31d)]=_0x42cccd[_0x43df4f(0x31d)]['filter'](_0x187a90=>_0x308997-_0x187a90<=_0x459ef3);if(_0x42cccd['deaths'][_0x43df4f(0x6ad)]>=_0x2e5009){_0x42cccd[_0x43df4f(0x89a)]=!![],console['error'](_0x43df4f(0x532)+_0x1b750a+_0x43df4f(0x326)+_0x42cccd[_0x43df4f(0x31d)]['length']+_0x43df4f(0x193)+(_0x459ef3+_0x43df4f(0x6ae)+_0x2b008d['size']+_0x43df4f(0x5d6)));return;}_0x42cccd[_0x43df4f(0x7e7)]++;const _0x1a09d8=Math['min'](_0x46b2bf,_0x217899*0x2**(_0x42cccd['consecutiveFailures']-0x1));console['log']('[okdb-cluster]\x20respawning\x20worker\x20slot='+_0x1b750a+_0x43df4f(0x1c7)+_0x1a09d8+_0x43df4f(0x2d0)+_0x42cccd[_0x43df4f(0x7e7)]+')'),_0x42cccd[_0x43df4f(0x349)]=setTimeout(()=>{const _0x20bea4=_0x43df4f;_0x42cccd[_0x20bea4(0x349)]=null;if(_0xf0849c||_0x42cccd[_0x20bea4(0x89a)])return;const _0x5698ba=_0x47917a(_0x1b750a);_0x5698ba[_0x20bea4(0x898)](_0x20bea4(0x697),()=>{const _0x226a78=_0x20bea4;if(_0x2f7ba1[_0x226a78(0x2fa)](_0x1b750a)===_0x42cccd)_0x42cccd[_0x226a78(0x7e7)]=0x0;});},_0x1a09d8),_0x42cccd['respawnTimer'][_0x43df4f(0x895)]?.();});const _0x24bb53=[..._0x2b008d[_0x4966fc(0x818)]()];console[_0x4966fc(0x689)](_0x4966fc(0x432)+process[_0x4966fc(0x5c3)]+_0x4966fc(0x33b)+_0x3c0b1c+_0x4966fc(0x7ef)+_0x412c8f+':\x20'+('['+_0x24bb53['join'](',\x20')+']'));const _0x309282={'_isClusterController':!![],'port':_0x412c8f,'primaryOkdb':_0x5e542b??null,'status'(){const _0x1d7243=_0x4966fc;return{'clustered':!![],'primaryPid':process[_0x1d7243(0x5c3)],'port':_0x412c8f,'primaryRole':_0x5e542b?.[_0x1d7243(0x44e)]??null,'processorPid':null,'supervisorPid':process['pid'],'workers':[..._0x2b008d[_0x1d7243(0x722)]()][_0x1d7243(0x595)](({worker:_0x33dc59})=>({'pid':_0x33dc59[_0x1d7243(0x864)]['pid'],'id':_0x33dc59['id'],'dead':_0x33dc59['isDead']()}))};},async 'close'(){const _0x5400d3=_0x4966fc;_0xf0849c=!![];for(const _0x2d2b1a of _0x2f7ba1[_0x5400d3(0x722)]()){_0x2d2b1a[_0x5400d3(0x89a)]=!![],_0x2d2b1a[_0x5400d3(0x349)]&&(clearTimeout(_0x2d2b1a[_0x5400d3(0x349)]),_0x2d2b1a['respawnTimer']=null);}clearInterval(_0x301380);_0x2ce48b&&(clearTimeout(_0x2ce48b),_0x2ce48b=null);_0x521294[_0x5400d3(0x804)]('message',_0x99829d),_0x521294[_0x5400d3(0x804)](_0x5400d3(0x81d),_0x3056f5),_0x5e542b?.[_0x5400d3(0x74a)]?.[_0x5400d3(0x804)]?.(_0x27a123[_0x5400d3(0x3dc)],_0x3e910a);if(_0x5e542b?.['events']?.[_0x5400d3(0x804)])for(const {event:_0x47bc04,handler:_0x2b6708}of _0x4b63d7){try{_0x5e542b[_0x5400d3(0x74a)][_0x5400d3(0x804)](_0x47bc04,_0x2b6708);}catch{}}_0x4b63d7[_0x5400d3(0x6ad)]=0x0;const _0x27c900=[..._0x2b008d[_0x5400d3(0x722)]()][_0x5400d3(0x595)](({worker:_0x10ebbd})=>_0x10ebbd);if(_0x27c900[_0x5400d3(0x6ad)]===0x0)return;await Promise['all'](_0x27c900['map'](_0x4f6fb6=>new Promise(_0x20b758=>{const _0x192b82=_0x5400d3;if(_0x4f6fb6[_0x192b82(0x71b)]()){_0x20b758();return;}let _0x2b15d1=![];const _0x30f279=()=>{if(_0x2b15d1)return;_0x2b15d1=!![];if(_0x3d88e3)clearTimeout(_0x3d88e3);_0x20b758();};_0x4f6fb6['once'](_0x192b82(0x468),_0x30f279);const _0x3d88e3=setTimeout(()=>{const _0x98e30d=_0x192b82;try{_0x4f6fb6[_0x98e30d(0x864)][_0x98e30d(0x486)]();}catch{}},_0x30bf99+0x1f4);_0x3d88e3[_0x192b82(0x895)]?.();try{_0x4f6fb6[_0x192b82(0x1c0)]();}catch{try{_0x4f6fb6['process']['kill']();}catch{}}})));}};return _0x309282;}async function _0x51f2a6({makeOkdb:_0x54017d,port:_0x26bb2b}){const _0x38b182=_0x1e178b,_0x248dc2=await _0x54017d();return _0xa92dea(_0x248dc2),_0x248dc2[_0x38b182(0x5fb)][_0x38b182(0x7a4)](_0x26bb2b);}function _0xa92dea(_0x1d44ea){const _0x3c94ac=_0x1e178b;if(!_0x1d44ea||_0x1d44ea[_0x3c94ac(0x628)])return;_0x1d44ea[_0x3c94ac(0x628)]=!![];try{const {OKDBChangefeed:_0x20cb29}=requireOkdbChangefeed(),_0x3443e8=_0x1d44ea['_adminRelay'];if(_0x3443e8&&typeof _0x3443e8[_0x3c94ac(0x42f)]==='function'){const _0x130a20=new _0x20cb29(_0x1d44ea);_0x130a20[_0x3c94ac(0x398)](),_0x3443e8['attachFeed'](_0x130a20),_0x1d44ea[_0x3c94ac(0x4dd)]=_0x130a20;}}catch(_0x2ea985){_0x1d44ea[_0x3c94ac(0x689)]?.[_0x3c94ac(0x44f)]?.(_0x3c94ac(0x2bc)+(_0x2ea985?.[_0x3c94ac(0x81d)]??_0x2ea985),{'feature':'cluster'});}const _0x10ea32=_0x575aee=>{const _0x211aa3=_0x3c94ac;if(!_0x575aee||typeof _0x575aee!==_0x211aa3(0x601)||_0x575aee[_0x415f41]==null)return;if(_0x575aee[_0x415f41]===_0x190cde)try{_0x1d44ea[_0x211aa3(0x240)]?.[_0x211aa3(0x3bf)]?.(_0x575aee['event'],_0x575aee['data']);}catch{}};process['on']('message',_0x10ea32),_0x1d44ea['_clusterOnMessage']=_0x10ea32;{let _0x33dfe3=process[_0x3c94ac(0x40f)](),_0x50ad5d=Date[_0x3c94ac(0x4ec)]();const _0x1283bc=()=>{const _0x40cfbb=_0x3c94ac;if(typeof process[_0x40cfbb(0x31f)]!==_0x40cfbb(0x7ca)||!process[_0x40cfbb(0x775)])return;const _0x5cb0c=Date[_0x40cfbb(0x4ec)](),_0x20c8f6=process[_0x40cfbb(0x40f)](),_0x141f13=(_0x5cb0c-_0x50ad5d)*0x3e8,_0xddcd4a=_0x20c8f6[_0x40cfbb(0x402)]-_0x33dfe3[_0x40cfbb(0x402)]+(_0x20c8f6[_0x40cfbb(0x7f0)]-_0x33dfe3[_0x40cfbb(0x7f0)]),_0x39a695=_0x141f13>0x0?Math['min'](0x64,Math[_0x40cfbb(0x578)](_0xddcd4a/(_0x141f13*(_0x2d873b[_0x40cfbb(0x662)]()[_0x40cfbb(0x6ad)]||0x1))*0x64)):0x0;_0x33dfe3=_0x20c8f6,_0x50ad5d=_0x5cb0c;const _0x53fe1f=process[_0x40cfbb(0x8bb)]();let _0x5cb78a=null;try{_0x5cb78a=_0x1d44ea['role']?.['processors']?_0x1d44ea[_0x40cfbb(0x65b)]?.[_0x40cfbb(0x44c)]?.()??null:null;}catch{}try{process[_0x40cfbb(0x31f)]({[_0x415f41]:_0x406c45,'stats':{'rss':_0x53fe1f[_0x40cfbb(0x796)],'heapUsed':_0x53fe1f[_0x40cfbb(0x256)],'heapTotal':_0x53fe1f[_0x40cfbb(0x41d)],'external':_0x53fe1f[_0x40cfbb(0x54d)],'cpuPct':_0x39a695,'cpuWindowMs':Math[_0x40cfbb(0x578)](_0x141f13/0x3e8)||null},'processing':_0x5cb78a});}catch{}},_0x56c19d=Math[_0x3c94ac(0x413)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x433e61=setInterval(_0x1283bc,_0x56c19d);_0x433e61[_0x3c94ac(0x895)]?.(),_0x1283bc();for(const _0x35b66a of[_0x3c94ac(0x332),_0x3c94ac(0x6c4)]){_0x1d44ea[_0x3c94ac(0x74a)]?.['on']?.(_0x35b66a,()=>{try{_0x1283bc();}catch{}});}}let _0x276a9e=![];const _0x402366=async _0x3d652d=>{const _0xefa148=_0x3c94ac;if(_0x276a9e)return;_0x276a9e=!![];const _0x28401b=setTimeout(()=>process[_0xefa148(0x468)](_0x3d652d),_0x30bf99);_0x28401b[_0xefa148(0x895)]?.();try{await _0x1d44ea[_0xefa148(0x6e0)]?.();}catch{}process[_0xefa148(0x468)](_0x3d652d);};process['on']('disconnect',()=>_0x402366(0x0));if(process[_0x3c94ac(0x31f)]&&!process[_0x3c94ac(0x775)])_0x402366(0x0);if(process['platform']!==_0x3c94ac(0x723)){const _0x252a34=setInterval(()=>{const _0x5cf96a=_0x3c94ac;if(process[_0x5cf96a(0x2af)]===0x1)_0x402366(0x0);},_0x96a7d8);_0x252a34['unref']?.(),_0x1d44ea['_clusterOrphanWatch']=_0x252a34;}}return okdbCluster={'runClustered':_0x390e01,'attachWorkerCluster':_0xa92dea},okdbCluster;}var okdbHttp={'exports':{}},okdbMetrics,hasRequiredOkdbMetrics;function requireOkdbMetrics(){const _0x5ac7c5=_0x1a2e0d;if(hasRequiredOkdbMetrics)return okdbMetrics;hasRequiredOkdbMetrics=0x1;const _0x1ee3e5=0x3c;function _0x4d5daf(){return{'requests':0x0,'reads':0x0,'writes':0x0,'errors':0x0,'readMs':0x0,'writeMs':0x0};}class _0x39e952{constructor(){const _0x48da24=_0x4c4a;this['_totalRequests']=0x0,this[_0x48da24(0x635)]=0x0,this[_0x48da24(0x69d)]=0x0,this[_0x48da24(0x8b5)]=0x0,this[_0x48da24(0x244)]=0x0,this[_0x48da24(0x2a8)]=0x0,this[_0x48da24(0x4ae)]=Array[_0x48da24(0x215)]({'length':_0x1ee3e5},_0x4d5daf),this[_0x48da24(0x406)]=0x0,this[_0x48da24(0x4e3)]=Date[_0x48da24(0x4ec)](),this[_0x48da24(0x6c1)]=setInterval(()=>this[_0x48da24(0x265)](),0x3e8);if(this['_timer'][_0x48da24(0x895)])this[_0x48da24(0x6c1)][_0x48da24(0x895)]();}[_0x5ac7c5(0x265)](){const _0x439dff=_0x5ac7c5;this[_0x439dff(0x406)]=(this[_0x439dff(0x406)]+0x1)%_0x1ee3e5,this[_0x439dff(0x4ae)][this[_0x439dff(0x406)]]=_0x4d5daf(),this[_0x439dff(0x4e3)]=Date['now']();}[_0x5ac7c5(0x639)](_0xb46e45,_0x37e551,_0x1c7676){const _0x33b061=_0x5ac7c5,_0x57ee92=/^(POST|PUT|PATCH|DELETE)$/i[_0x33b061(0x3f6)](_0xb46e45),_0x255645=this['_buckets'][this[_0x33b061(0x406)]];this[_0x33b061(0x73f)]++,_0x255645[_0x33b061(0x545)]++,_0x1c7676&&(this[_0x33b061(0x8b5)]++,_0x255645[_0x33b061(0x511)]++),_0x57ee92?(this[_0x33b061(0x69d)]++,this['_totalWriteMs']+=_0x37e551,_0x255645[_0x33b061(0x1b3)]++,_0x255645[_0x33b061(0x412)]+=_0x37e551):(this[_0x33b061(0x635)]++,this[_0x33b061(0x244)]+=_0x37e551,_0x255645[_0x33b061(0x369)]++,_0x255645[_0x33b061(0x759)]+=_0x37e551);}[_0x5ac7c5(0x847)](){const _0x5785c5=_0x5ac7c5;let _0x9a4d91=0x0,_0x464de2=0x0,_0x4401bd=0x0,_0x3c56a2=0x0,_0x45f35c=0x0,_0x3017d=0x0;for(const _0x19bc10 of this['_buckets']){_0x9a4d91+=_0x19bc10[_0x5785c5(0x545)],_0x464de2+=_0x19bc10['reads'],_0x4401bd+=_0x19bc10['writes'],_0x3c56a2+=_0x19bc10[_0x5785c5(0x511)],_0x45f35c+=_0x19bc10[_0x5785c5(0x759)],_0x3017d+=_0x19bc10[_0x5785c5(0x412)];}const _0x3be346=_0x1ee3e5;return{'lifetime':{'requests':this[_0x5785c5(0x73f)],'reads':this[_0x5785c5(0x635)],'writes':this[_0x5785c5(0x69d)],'errors':this['_totalErrors'],'avgReadMs':this[_0x5785c5(0x635)]>0x0?+(this[_0x5785c5(0x244)]/this['_totalReads'])[_0x5785c5(0x39b)](0x2):null,'avgWriteMs':this[_0x5785c5(0x69d)]>0x0?+(this[_0x5785c5(0x2a8)]/this[_0x5785c5(0x69d)])['toFixed'](0x2):null},'window':{'seconds':_0x3be346,'requests':_0x9a4d91,'reads':_0x464de2,'writes':_0x4401bd,'errors':_0x3c56a2,'reqPerSec':+(_0x9a4d91/_0x3be346)[_0x5785c5(0x39b)](0x2),'readPerSec':+(_0x464de2/_0x3be346)[_0x5785c5(0x39b)](0x2),'writePerSec':+(_0x4401bd/_0x3be346)[_0x5785c5(0x39b)](0x2),'avgReadMs':_0x464de2>0x0?+(_0x45f35c/_0x464de2)['toFixed'](0x2):null,'avgWriteMs':_0x4401bd>0x0?+(_0x3017d/_0x4401bd)[_0x5785c5(0x39b)](0x2):null}};}[_0x5ac7c5(0x6e0)](){const _0x2cbdf1=_0x5ac7c5;clearInterval(this[_0x2cbdf1(0x6c1)]);}}return okdbMetrics=_0x39e952,okdbMetrics;}function _0x4c4a(_0x2ba922,_0x5d3727){_0x2ba922=_0x2ba922-0x192;const _0x381275=_0x3812();let _0x4c4a3e=_0x381275[_0x2ba922];return _0x4c4a3e;}var okdbAuthNamespaces,hasRequiredOkdbAuthNamespaces;function requireOkdbAuthNamespaces(){const _0x2f2708=_0x1a2e0d;if(hasRequiredOkdbAuthNamespaces)return okdbAuthNamespaces;hasRequiredOkdbAuthNamespaces=0x1;const _0x5e7441={'data':{'label':_0x2f2708(0x654),'scope':_0x2f2708(0x787),'description':_0x2f2708(0x621),'operations':{'read':{'label':'Read','summary':_0x2f2708(0x814)},'write':{'label':_0x2f2708(0x284),'summary':_0x2f2708(0x86d)}}},'schema':{'label':_0x2f2708(0x7c9),'scope':'env','description':_0x2f2708(0x34b),'operations':{'read':{'label':_0x2f2708(0x591),'summary':'List\x20types,\x20get\x20type\x20schema,\x20list\x20registered\x20indexes.'},'write':{'label':_0x2f2708(0x284),'summary':_0x2f2708(0x29a)}}},'search':{'label':_0x2f2708(0x6c5),'scope':_0x2f2708(0x787),'description':'Run\x20searches\x20against\x20registered\x20FTS\x20and\x20vector\x20indexes.','operations':{'query':{'label':_0x2f2708(0x612),'summary':'Execute\x20full-text\x20and\x20vector\x20searches.'}}},'queue':{'label':_0x2f2708(0x6e3),'scope':'env','description':'Background\x20job\x20queue:\x20enqueue\x20work,\x20observe\x20state,\x20and\x20process\x20jobs.','operations':{'read':{'label':_0x2f2708(0x591),'summary':'List\x20jobs,\x20view\x20stats,\x20list\x20buckets.'},'write':{'label':_0x2f2708(0x284),'summary':_0x2f2708(0x3c2)},'work':{'label':_0x2f2708(0x3d9),'summary':_0x2f2708(0x49e)}}},'files':{'label':'Files','scope':_0x2f2708(0x787),'description':_0x2f2708(0x5ff),'operations':{'read':{'label':_0x2f2708(0x591),'summary':_0x2f2708(0x547)},'write':{'label':_0x2f2708(0x284),'summary':_0x2f2708(0x194)}}},'functions':{'label':_0x2f2708(0x2a9),'scope':'env','description':_0x2f2708(0x79a),'operations':{'read':{'label':_0x2f2708(0x591),'summary':_0x2f2708(0x270)},'write':{'label':_0x2f2708(0x284),'summary':'Register,\x20update,\x20and\x20delete\x20function\x20definitions.'},'run':{'label':_0x2f2708(0x4f8),'summary':_0x2f2708(0x212)}}},'views':{'label':_0x2f2708(0x7e1),'scope':_0x2f2708(0x787),'description':_0x2f2708(0x1bf),'operations':{'read':{'label':_0x2f2708(0x591),'summary':_0x2f2708(0x29e)},'write':{'label':_0x2f2708(0x284),'summary':_0x2f2708(0x329)}}},'env':{'label':_0x2f2708(0x4a6),'scope':_0x2f2708(0x787),'description':_0x2f2708(0x879),'operations':{'read':{'label':_0x2f2708(0x591),'summary':_0x2f2708(0x5a8)},'write':{'label':_0x2f2708(0x284),'summary':_0x2f2708(0x1c1)}}},'auth':{'label':'Auth','scope':_0x2f2708(0x7f0),'description':_0x2f2708(0x771),'operations':{'read':{'label':_0x2f2708(0x591),'summary':_0x2f2708(0x605)},'write':{'label':'Write','summary':'Create,\x20update,\x20and\x20delete\x20tokens\x20and\x20users;\x20rotate\x20keys.'}}},'system':{'label':_0x2f2708(0x2c6),'scope':'system','description':_0x2f2708(0x7c0),'operations':{'read':{'label':_0x2f2708(0x591),'summary':'View\x20server\x20info,\x20logs,\x20SSE\x20event\x20streams,\x20processor\x20status,\x20backup\x20list.'},'write':{'label':'Write','summary':_0x2f2708(0x61f)}}},'sync':{'label':_0x2f2708(0x87c),'scope':_0x2f2708(0x7f0),'description':'Cluster\x20replication.\x20The\x20\x22peer\x22\x20op\x20is\x20for\x20cluster\x20nodes,\x20not\x20human\x20users.','operations':{'read':{'label':_0x2f2708(0x591),'summary':_0x2f2708(0x875)},'write':{'label':_0x2f2708(0x284),'summary':_0x2f2708(0x3b0)},'peer':{'label':'Peer','summary':_0x2f2708(0x606),'machineOnly':!![]}}},'protected':{'label':_0x2f2708(0x424),'scope':_0x2f2708(0x302),'description':'Gate\x20flag\x20required\x20to\x20touch\x20system\x20types\x20(those\x20whose\x20name\x20starts\x20with\x20\x22~\x22).\x20Combined\x20with\x20the\x20underlying\x20namespace\x20permission.','operations':{'read':{'label':_0x2f2708(0x591),'summary':_0x2f2708(0x66f)},'write':{'label':'Write','summary':'May\x20write\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20write\x20permission.'}}}},_0xde8aed={'schema:read':[_0x2f2708(0x3cf),'data:write',_0x2f2708(0x241)]},_0x3d208a=[_0x2f2708(0x7bc),_0x2f2708(0x6d0),_0x2f2708(0x8ca),'write',_0x2f2708(0x4b4),'peer'];function _0x2a7f95(){const _0x9a24b1=_0x2f2708,_0x4a5147=[];for(const [_0x3492f6,_0x361371]of Object[_0x9a24b1(0x87f)](_0x5e7441)){for(const _0xef0ecd of Object[_0x9a24b1(0x818)](_0x361371[_0x9a24b1(0x5d2)])){_0x4a5147['push'](_0x3492f6+':'+_0xef0ecd);}}return _0x4a5147;}function _0x223cf2(_0x49eb45){return _0x5e7441[_0x49eb45]||null;}function _0x493de3(_0x56499e,_0x548590){return _0x5e7441[_0x56499e]?.['operations'][_0x548590]||null;}return okdbAuthNamespaces={'NAMESPACES':_0x5e7441,'IMPLIED_BY':_0xde8aed,'OP_ORDER':_0x3d208a,'listAllPermissions':_0x2a7f95,'getNamespaceMeta':_0x223cf2,'getOperationMeta':_0x493de3},okdbAuthNamespaces;}var okdbAuthPermissions,hasRequiredOkdbAuthPermissions;function requireOkdbAuthPermissions(){const _0x179cc4=_0x1a2e0d;if(hasRequiredOkdbAuthPermissions)return okdbAuthPermissions;hasRequiredOkdbAuthPermissions=0x1;const {IMPLIED_BY:_0x62a861}=requireOkdbAuthNamespaces(),_0x5c1390=new Set([_0x179cc4(0x7bc),'query']);function _0x489ae6(_0x47bfbd,_0x482561){const _0x166271=_0x179cc4;if(!Array[_0x166271(0x59b)](_0x47bfbd)||_0x47bfbd['length']===0x0)return![];for(const _0x207559 of _0x47bfbd){if(typeof _0x207559!=='string'||!_0x207559[_0x166271(0x1a1)](':')){if(_0x207559==='*')return!![];continue;}const [_0x3d55eb,_0x1be419]=_0x207559['split'](':'),[_0x1d3c87,_0x226dbe]=_0x482561[_0x166271(0x84e)](':'),_0x4878c5=_0x3d55eb==='*'||_0x3d55eb===_0x1d3c87,_0x13fd03=_0x1be419==='*'||_0x1be419===_0x226dbe;if(_0x4878c5&&_0x13fd03)return!![];}const _0x3e13b3=_0x62a861[_0x482561];if(_0x3e13b3)for(const _0x7f486c of _0x3e13b3){if(_0x489ae6(_0x47bfbd,_0x7f486c))return!![];}return![];}function _0x455afd(_0xe31fe6,_0x1ea87c){const _0x7ebd0=_0x179cc4,_0x480028=new Set();if(Array[_0x7ebd0(0x59b)](_0xe31fe6)){for(const _0x20ebbf of _0xe31fe6)_0x480028[_0x7ebd0(0x4da)](_0x20ebbf);}if(Array['isArray'](_0x1ea87c)){for(const _0xcca6f4 of _0x1ea87c)_0x480028[_0x7ebd0(0x4da)](_0xcca6f4);}return Array['from'](_0x480028);}function _0xfcec19(_0x56acab){const _0x41e03c=_0x179cc4;if(typeof _0x56acab!==_0x41e03c(0x1d2))return![];const [,_0x5678e3]=_0x56acab[_0x41e03c(0x84e)](':');return _0x5c1390[_0x41e03c(0x2ad)](_0x5678e3);}function _0x5f19a7(_0x174b1c){const _0x2ae334=_0x179cc4;return _0xfcec19(_0x174b1c)?_0x2ae334(0x444):'protected:write';}function _0xccf3b0(_0x177e8d,_0x379cff){const _0x50166e=_0x179cc4;return _0x455afd(_0x177e8d[_0x50166e(0x496)]||[],_0x379cff?(_0x177e8d[_0x50166e(0x6fd)]||{})[_0x379cff]||[]:[]);}function _0x43cfa4(_0x293161){const _0x367b53=_0x179cc4,_0x132a4f=[];for(const _0x2c796d of _0x293161[_0x367b53(0x4aa)]()){const _0x2560c7=_0x2c796d[_0x367b53(0x8b3)]?.[_0x367b53(0x6cc)];if(!_0x2560c7)continue;_0x2560c7[_0x367b53(0x773)]&&!_0x2560c7[_0x367b53(0x535)]&&_0x132a4f['push'](_0x2c796d[_0x367b53(0x225)]+'\x20'+_0x2c796d['path']+_0x367b53(0x7c8)+(_0x2c796d['operation']['id']??'?')+')');}if(_0x132a4f[_0x367b53(0x6ad)])throw new Error(_0x367b53(0x58b)+_0x132a4f[_0x367b53(0x1c9)](_0x367b53(0x822)));}return okdbAuthPermissions={'hasPermission':_0x489ae6,'unionPermissions':_0x455afd,'isReadOperation':_0xfcec19,'resolveProtectedGate':_0x5f19a7,'getEffectivePermissions':_0xccf3b0,'assertEveryRouteHasPermission':_0x43cfa4},okdbAuthPermissions;}var okdbJwtUtils,hasRequiredOkdbJwtUtils;function requireOkdbJwtUtils(){if(hasRequiredOkdbJwtUtils)return okdbJwtUtils;hasRequiredOkdbJwtUtils=0x1;const _0x4c1165=require$$0$7,_0x2ca14f=require$$1$2,_0xcaa3e5=require$$2$1;function _0xe5160e(_0x3173f1){const _0x456077=_0x4c4a,_0x2e0989=String(_0x3173f1||'')['replace'](/-/g,'+')[_0x456077(0x813)](/_/g,'/'),_0x3cc769=_0x2e0989+'='['repeat']((0x4-(_0x2e0989[_0x456077(0x6ad)]%0x4||0x4))%0x4);return Buffer[_0x456077(0x215)](_0x3cc769,_0x456077(0x68e));}function _0x53b910(_0x4e961c){const _0x5e9da3=_0x4c4a;if(typeof _0x4e961c!==_0x5e9da3(0x1d2))throw new Error(_0x5e9da3(0x63e));const _0x38d591=_0x4e961c[_0x5e9da3(0x84e)]('.');if(_0x38d591[_0x5e9da3(0x6ad)]!==0x3)throw new Error(_0x5e9da3(0x331));const [_0x422c9a,_0x223cad,_0x250b1d]=_0x38d591,_0x2844ab=JSON['parse'](_0xe5160e(_0x422c9a)[_0x5e9da3(0x4b9)](_0x5e9da3(0x88a))),_0x423d97=JSON[_0x5e9da3(0x7d3)](_0xe5160e(_0x223cad)['toString'](_0x5e9da3(0x88a)));return{'header':_0x2844ab,'payload':_0x423d97,'signature':_0xe5160e(_0x250b1d),'signingInput':Buffer['from'](_0x422c9a+'.'+_0x223cad),'encodedHeader':_0x422c9a,'encodedPayload':_0x223cad};}function _0x435c6e(_0x2c77f8){if(Array['isArray'](_0x2c77f8))return _0x2c77f8;if(_0x2c77f8==null)return[];return[_0x2c77f8];}function _0x38422d(_0x31ebf6){const _0x167070=_0x4c4a,_0x4114bd=String(_0x31ebf6||'')['match'](/.{1,64}/g)||[];return'-----BEGIN\x20CERTIFICATE-----\x0a'+_0x4114bd[_0x167070(0x1c9)]('\x0a')+_0x167070(0x328);}function _0x4e5689(_0x4c102c={}){const _0x530d57=_0x4c4a;if(_0x4c102c[_0x530d57(0x2f3)]?.[0x0])return _0xcaa3e5[_0x530d57(0x758)](_0x38422d(_0x4c102c[_0x530d57(0x2f3)][0x0]));return _0xcaa3e5['createPublicKey']({'key':_0x4c102c,'format':_0x530d57(0x204)});}function _0x33099e(_0x4fc3b7,_0x4ec910,_0x47e2cb,_0x22e628){const _0x446041=_0x4c4a;if(_0x4fc3b7===_0x446041(0x3f0))return _0xcaa3e5[_0x446041(0x700)](_0x446041(0x77b),_0x47e2cb,_0x4ec910,_0x22e628);if(_0x4fc3b7===_0x446041(0x8c9))return _0xcaa3e5[_0x446041(0x700)](_0x446041(0x1ea),_0x47e2cb,{'key':_0x4ec910,'dsaEncoding':_0x446041(0x26f)},_0x22e628);return![];}function _0x115a5c(_0x4ee72f){const _0x36faab=_0x4c4a;if(typeof commonjsGlobal[_0x36faab(0x581)]===_0x36faab(0x7ca))return commonjsGlobal[_0x36faab(0x581)](_0x4ee72f,{'headers':{'accept':_0x36faab(0x82d)}})[_0x36faab(0x4ed)](async _0x1f3526=>{const _0x3fbfb8=_0x36faab;if(!_0x1f3526['ok']){const _0x474c0d=new Error(_0x3fbfb8(0x8b7)+_0x1f3526[_0x3fbfb8(0x2c4)]+'\x20fetching\x20'+_0x4ee72f);_0x474c0d[_0x3fbfb8(0x2c4)]=_0x1f3526[_0x3fbfb8(0x2c4)];throw _0x474c0d;}return _0x1f3526[_0x3fbfb8(0x232)]();});return new Promise((_0x2a44bb,_0x509e3d)=>{const _0x5055ac=_0x36faab,_0xc25ce9=String(_0x4ee72f)['startsWith'](_0x5055ac(0x6a6))?_0x2ca14f:_0x4c1165,_0x1ca203=_0xc25ce9['get'](_0x4ee72f,{'headers':{'accept':_0x5055ac(0x82d)}},_0x122d03=>{const _0x15de8f=_0x5055ac;let _0x446ddb='';_0x122d03[_0x15de8f(0x5ab)]('utf8'),_0x122d03['on']('data',_0x47bb53=>{_0x446ddb+=_0x47bb53;}),_0x122d03['on'](_0x15de8f(0x63d),()=>{const _0x339335=_0x15de8f;if(_0x122d03[_0x339335(0x73b)]<0xc8||_0x122d03[_0x339335(0x73b)]>=0x12c){const _0x341596=new Error(_0x339335(0x8b7)+_0x122d03[_0x339335(0x73b)]+_0x339335(0x3ef)+_0x4ee72f);return _0x341596[_0x339335(0x2c4)]=_0x122d03[_0x339335(0x73b)],_0x509e3d(_0x341596);}try{_0x2a44bb(JSON['parse'](_0x446ddb||'{}'));}catch(_0x27e134){_0x509e3d(_0x27e134);}});});_0x1ca203['on'](_0x5055ac(0x6cd),_0x509e3d),_0x1ca203[_0x5055ac(0x63d)]();});}return okdbJwtUtils={'base64UrlDecode':_0xe5160e,'parseJwt':_0x53b910,'normalizeAudience':_0x435c6e,'normalizePemCertificate':_0x38422d,'jwkToKeyObject':_0x4e5689,'verifyJwtSignature':_0x33099e,'fetchJson':_0x115a5c},okdbJwtUtils;}var hasRequiredOkdbHttp;function requireOkdbHttp(){const _0x404acb=_0x1a2e0d;if(hasRequiredOkdbHttp)return okdbHttp[_0x404acb(0x7ac)];hasRequiredOkdbHttp=0x1;const _0x5e3a3d=require$$0$7,{clampTimerDelay:_0x428b58,isNeverDelay:_0x1e985f}=requireOkdbTimers(),{URL:_0x3ad444}=require$$3$1,_0x30fcce=requireOkdbMetrics(),_0x46442c=requireOkdbAuthTokens(),{hasPermission:_0x4cfc49,unionPermissions:_0x2fb0f3,resolveProtectedGate:_0x370c93}=requireOkdbAuthPermissions(),_0x11e6bb={0x190:_0x404acb(0x3a5),0x191:'UNAUTHORIZED',0x193:'FORBIDDEN',0x194:'NOT_FOUND',0x195:_0x404acb(0x4d7),0x198:'REQUEST_TIMEOUT',0x199:'CONFLICT',0x19a:'GONE',0x19b:_0x404acb(0x20e),0x19d:_0x404acb(0x791),0x19f:_0x404acb(0x2f8),0x1a6:_0x404acb(0x4cc),0x1ad:'TOO_MANY_REQUESTS',0x1f4:_0x404acb(0x62b),0x1f5:_0x404acb(0x5ad),0x1f6:_0x404acb(0x855),0x1f7:_0x404acb(0x66a),0x1f8:_0x404acb(0x23d)},_0x460813={'INVALID_VALUE':0x190,'BAD_CONFIG':0x190,'INVALID_PRIMARY_KEY':0x190,'INVALID_INDEX_KEY':0x190,'TYPE_NOT_REGISTERED':0x194,'INDEX_NOT_REGISTERED':0x194,'NOT_FOUND':0x194,'ALREADY_EXISTS':0x199,'VERSION_MISMATCH':0x199,'UNIQUE_CONSTRAINT':0x199,'TYPE_ALREADY_REGISTERED':0x199,'INDEX_ALREADY_REGISTERED':0x199,'FK_ERROR':0x199,'FK_DELETE_ERROR':0x199,'FOREIGN_KEY_VIOLATION':0x199,'FOREIGN_KEY_DELETE_RESTRICTED':0x199,'ENV_NOT_FOUND':0x194,'ENV_PROTECTED':0x193,'ENGINE_CONFIG_PATCH_UNSUPPORTED':0x190,'QUEUE_WORKER_JOB_TYPE_CONFLICT':0x199,'SCHEMA_VALIDATION_FAILED':0x1a6,'SCHEMA_COLLECTION_INVALID':0x199,'INVALID_SCHEMA':0x190,'QUERY_OPERATOR_FORBIDDEN':0x190,'BUCKET_CONFIG_INVALID':0x190,'BUCKET_INVALID_TIME_VALUE':0x1a6,'BUCKET_PROJECT_NOT_PERSISTABLE':0x190,'BUCKET_PROJECT_UNKNOWN':0x190,'VIEW_UNKNOWN_REDUCER':0x190,'RESERVED_VIEW_NAME':0x190,'VIEW_NOT_BUCKETED':0x190,'VIEW_NOT_FOUND':0x194,'VIEW_RANGE_GRANULARITY_MISMATCH':0x190,'VIEW_RANGE_GRANULARITY_REQUIRED':0x190,'VIEW_REF_UNSUPPORTED_REDUCER':0x190},{hmac:_0x554977,timingSafeEqual:_0x43084e,parseBearer:_0x10be7f,randomToken:_0x52e40e,issueToken:_0x21d830,authenticateToken:_0x401c61}=_0x46442c,{base64UrlDecode:_0x3977c7,parseJwt:_0x512421,normalizeAudience:_0xce76c9,normalizePemCertificate:_0x3ba467,jwkToKeyObject:_0x3b1d97,verifyJwtSignature:_0x855de5,fetchJson:_0x1bd512}=requireOkdbJwtUtils();function _0x38b448(_0x55dae2){const _0x1645c9=_0x404acb;return(_0x55dae2||_0x1645c9(0x318))[_0x1645c9(0x2e6)]();}function _0x3be6b6(_0x497fc6){const _0x4b5b00=_0x404acb;if(Array[_0x4b5b00(0x59b)](_0x497fc6))return _0x497fc6[_0x4b5b00(0x24a)](_0x3be6b6);return String(_0x497fc6||'')['split'](',')['map'](_0xd8ee81=>_0xd8ee81[_0x4b5b00(0x48b)]())[_0x4b5b00(0x542)](Boolean);}function _0x5cba3f(..._0x275309){return[...new Set(_0x275309['flatMap'](_0x3be6b6))]['join'](',\x20');}function _0x2c6c51(_0x5d7bf0,_0x4ae4e4){const _0x2fd316=_0x404acb;if(!_0x5d7bf0)return![];if(_0x4ae4e4==='*')return!![];if(_0x4ae4e4 instanceof RegExp)return _0x4ae4e4['test'](_0x5d7bf0);if(typeof _0x4ae4e4===_0x2fd316(0x7ca))return!!_0x4ae4e4(_0x5d7bf0);if(Array['isArray'](_0x4ae4e4))return _0x4ae4e4[_0x2fd316(0x1a1)](_0x5d7bf0);return _0x4ae4e4===_0x5d7bf0;}function _0x137d18(_0x552219={},_0x2283e7={},_0x54051d=null){const _0x3ac33b=_0x404acb;if(!_0x2283e7)return null;const _0x51702a=_0x552219[_0x3ac33b(0x87e)],_0x356fd8=_0x2283e7[_0x3ac33b(0x4f2)]??_0x2283e7[_0x3ac33b(0x87e)]??'*',_0x22caab=_0x356fd8==='*'?'*':_0x2c6c51(_0x51702a,_0x356fd8)?_0x51702a:null;if(!_0x22caab)return null;const _0x47ecd2=_0x552219[_0x3ac33b(0x7bf)],_0x20b486=_0x2283e7[_0x3ac33b(0x2b0)]??_0x2283e7[_0x3ac33b(0x88d)]??[_0x3ac33b(0x52a),_0x3ac33b(0x62c),_0x3ac33b(0x84d),_0x3ac33b(0x2d6),_0x3ac33b(0x5ca)],_0x54b99f=_0x2283e7['methods']??_0x2283e7[_0x3ac33b(0x21d)]??(_0x54051d?[_0x54051d,'OPTIONS']:[_0x3ac33b(0x318),_0x3ac33b(0x80d),_0x3ac33b(0x618)]),_0x5a621a=_0x2283e7[_0x3ac33b(0x58e)]??['mcp-session-id'],_0x464dbe={'access-control-allow-origin':_0x22caab,'access-control-allow-methods':Array['isArray'](_0x54b99f)?_0x54b99f['join'](',\x20'):String(_0x54b99f),'access-control-allow-headers':_0x47ecd2?_0x5cba3f(_0x20b486,_0x47ecd2):Array['isArray'](_0x20b486)?_0x20b486[_0x3ac33b(0x1c9)](',\x20'):String(_0x20b486),'access-control-expose-headers':Array[_0x3ac33b(0x59b)](_0x5a621a)?_0x5a621a[_0x3ac33b(0x1c9)](',\x20'):String(_0x5a621a),'vary':_0x5cba3f(_0x3ac33b(0x484),_0x22caab==='*'?'':_0x3ac33b(0x484),_0x47ecd2?'Access-Control-Request-Headers':'')};if(_0x2283e7[_0x3ac33b(0x5c0)])_0x464dbe['access-control-allow-credentials']=_0x3ac33b(0x7c4);if(Number[_0x3ac33b(0x72e)](_0x2283e7['maxAge']))_0x464dbe[_0x3ac33b(0x2de)]=String(_0x2283e7[_0x3ac33b(0x40c)]);return _0x464dbe;}function _0x5215ab(_0x1d174f){const _0x45e9e5=_0x404acb,_0x5c4436=[],_0x4ed78a={};let _0x580d21=![];_0x1d174f[_0x45e9e5(0x2e8)]('/*')&&(_0x580d21=!![],_0x1d174f=_0x1d174f['slice'](0x0,-0x2),_0x5c4436[_0x45e9e5(0x557)]('*'));let _0x129d66=_0x1d174f['replace'](/\/+$/,'')[_0x45e9e5(0x813)](/\[([^\]]*)\]/g,(_0x143fea,_0x215d60)=>{const _0x2b4f10=_0x215d60['replace'](/\/:(\w+)(?:=([^/\]\s]*))?/g,(_0x3280fd,_0x480520,_0x270587)=>{const _0x2625fa=_0x4c4a;_0x5c4436[_0x2625fa(0x557)](_0x480520);if(_0x270587!==undefined)_0x4ed78a[_0x480520]=_0x270587;return'/([^/]+)';});return'(?:'+_0x2b4f10+')?';})['replace'](/\/:(\w+)/g,(_0x585acf,_0x330f00)=>{const _0x2f812e=_0x45e9e5;return _0x5c4436['push'](_0x330f00),_0x2f812e(0x84f);});if(_0x129d66==='')_0x129d66='/';return{'keys':_0x5c4436,'defaults':_0x4ed78a,'wildcard':_0x580d21,'regex':new RegExp(_0x580d21?'^'+_0x129d66+_0x45e9e5(0x75b):'^'+_0x129d66+'$')};}function _0x27940d(_0x220271){const _0x38a807=_0x404acb;if(_0x220271==null)return _0x220271;return JSON[_0x38a807(0x7d3)](JSON[_0x38a807(0x2d1)](_0x220271));}function _0x5c4e38(_0x530a46){const _0xb9afb7=_0x404acb;if(_0x530a46==null)return null;if(_0x530a46[_0xb9afb7(0x4fa)]==='object'&&_0x530a46['properties']&&!Array[_0xb9afb7(0x59b)](_0x530a46['properties']))return _0x27940d(_0x530a46);const _0x514779=Object['values'](_0x530a46),_0x34942e=_0x514779[_0xb9afb7(0x6ad)]>0x0&&_0x514779[_0xb9afb7(0x573)](_0x5b6cbf=>{const _0x39ce35=_0xb9afb7;return _0x5b6cbf&&typeof _0x5b6cbf===_0x39ce35(0x601)&&!Array['isArray'](_0x5b6cbf)&&(Object['prototype'][_0x39ce35(0x3e0)]['call'](_0x5b6cbf,_0x39ce35(0x4fa))||Object[_0x39ce35(0x404)][_0x39ce35(0x3e0)][_0x39ce35(0x8c3)](_0x5b6cbf,'properties')||Object[_0x39ce35(0x404)][_0x39ce35(0x3e0)][_0x39ce35(0x8c3)](_0x5b6cbf,_0x39ce35(0x7ab))||Object['prototype'][_0x39ce35(0x3e0)][_0x39ce35(0x8c3)](_0x5b6cbf,_0x39ce35(0x7eb)));});if(_0x34942e)return{'type':'object','properties':_0x27940d(_0x530a46),'required':[],'additionalProperties':![]};const _0x47a393={},_0x3a8243=[];for(const [_0xc4737d,_0x3c0465]of Object['entries'](_0x530a46)){_0x47a393[_0xc4737d]=_0x168f87(_0x3c0465);if(_0x3c0465!==null&&_0x3c0465!==undefined)_0x3a8243[_0xb9afb7(0x557)](_0xc4737d);}return{'type':'object','properties':_0x47a393,'required':_0x3a8243,'additionalProperties':![]};}function _0x168f87(_0x525144){const _0x1c1d17=_0x404acb;if(_0x525144===null)return{'type':[_0x1c1d17(0x429),_0x1c1d17(0x1d2),_0x1c1d17(0x72c),_0x1c1d17(0x29d),_0x1c1d17(0x601),_0x1c1d17(0x67b)]};if(Array[_0x1c1d17(0x59b)](_0x525144))return{'type':_0x1c1d17(0x67b),'items':_0x525144['length']>0x0?_0x168f87(_0x525144[0x0]):{}};switch(typeof _0x525144){case _0x1c1d17(0x1d2):return{'type':_0x1c1d17(0x1d2),'default':_0x525144};case'number':return{'type':Number[_0x1c1d17(0x512)](_0x525144)?_0x1c1d17(0x45c):_0x1c1d17(0x72c),'default':_0x525144};case _0x1c1d17(0x29d):return{'type':'boolean','default':_0x525144};case _0x1c1d17(0x601):{const _0x24398d={};for(const [_0x47e6e7,_0x1e0d05]of Object[_0x1c1d17(0x87f)](_0x525144))_0x24398d[_0x47e6e7]=_0x168f87(_0x1e0d05);return{'type':'object','properties':_0x24398d,'additionalProperties':!![],'default':_0x27940d(_0x525144)};}default:return{};}}function _0x532e59(_0x5bca95,_0x29052f){const _0x3099b2=_0x404acb,_0x145432=[];for(const _0x70259 of _0x29052f[_0x3099b2(0x818)]){if(_0x70259==='*')continue;_0x145432[_0x3099b2(0x557)]({'name':_0x70259,'required':!Object[_0x3099b2(0x404)][_0x3099b2(0x3e0)][_0x3099b2(0x8c3)](_0x29052f[_0x3099b2(0x339)],_0x70259),'default':_0x29052f['defaults'][_0x70259]});}return _0x145432;}function _0x437d8d(_0x2bebd0={},_0x33a6db){const _0x4e5bfb=_0x404acb,_0x1339c6=_0x5c4e38(_0x2bebd0[_0x4e5bfb(0x5fb)]?.['querySchema']??_0x2bebd0[_0x4e5bfb(0x6d0)]??null),_0x98cbc7=_0x2bebd0[_0x4e5bfb(0x5fb)]?.[_0x4e5bfb(0x451)]??(_0x2bebd0['raw']?_0x4e5bfb(0x1c3):_0x33a6db['method']==='GET'||_0x33a6db['method']===_0x4e5bfb(0x8b6)?_0x4e5bfb(0x7ce):_0x4e5bfb(0x3f2));return{'querySchema':_0x1339c6,'bodyMode':_0x98cbc7,'bindings':_0x27940d(_0x2bebd0[_0x4e5bfb(0x5fb)]?.[_0x4e5bfb(0x54e)]??{}),'statuses':_0x27940d(_0x2bebd0['http']?.[_0x4e5bfb(0x5cb)]??(_0x2bebd0[_0x4e5bfb(0x477)]||[])),'transport':_0x2bebd0['http']?.[_0x4e5bfb(0x358)]??(_0x2bebd0[_0x4e5bfb(0x2d4)]?_0x4e5bfb(0x2d4):_0x2bebd0[_0x4e5bfb(0x1c3)]?_0x4e5bfb(0x1c3):_0x4e5bfb(0x382)),'rawResponse':_0x2bebd0['http']?.[_0x4e5bfb(0x47d)]??!!_0x2bebd0[_0x4e5bfb(0x47d)],'cors':_0x27940d(_0x2bebd0['http']?.[_0x4e5bfb(0x294)]??_0x2bebd0[_0x4e5bfb(0x294)]??null)};}function _0xef0bef(_0x198931){const _0x1ccc5b=_0x404acb,_0x5952ed=_0x198931[_0x1ccc5b(0x74c)]||{},_0x21669c=_0x532e59(_0x198931[_0x1ccc5b(0x5be)],_0x198931[_0x1ccc5b(0x2c1)]),_0x2679d5=!!(_0x5952ed['id']||_0x5952ed[_0x1ccc5b(0x540)]||_0x5952ed[_0x1ccc5b(0x860)]||_0x5952ed[_0x1ccc5b(0x5fb)]||_0x5952ed[_0x1ccc5b(0x861)]||_0x5952ed[_0x1ccc5b(0x80a)]||_0x5952ed[_0x1ccc5b(0x6cc)]||_0x5952ed['safety']),_0x50fdce=_0x437d8d(_0x5952ed,_0x198931),_0x11d645=_0x5952ed[_0x1ccc5b(0x540)]?_0x27940d(_0x5952ed[_0x1ccc5b(0x540)]):null;return{'id':_0x5952ed['id']??null,'summary':_0x5952ed[_0x1ccc5b(0x75c)]??null,'description':_0x5952ed[_0x1ccc5b(0x1ba)]??null,'tags':_0x27940d(_0x5952ed[_0x1ccc5b(0x33c)]??[]),'category':_0x5952ed[_0x1ccc5b(0x1aa)]??null,'safety':_0x27940d(_0x5952ed[_0x1ccc5b(0x310)]??null),'access':_0x27940d(_0x5952ed[_0x1ccc5b(0x6cc)]??null),'inputSchema':_0x11d645,'outputSchema':_0x27940d(_0x5952ed[_0x1ccc5b(0x860)]??null),'examples':_0x27940d(_0x5952ed[_0x1ccc5b(0x5aa)]??[]),'pathParams':_0x21669c,'http':_0x50fdce,'cli':_0x27940d(_0x5952ed[_0x1ccc5b(0x80a)]??null),'mcp':_0x27940d(_0x5952ed['mcp']??null),'legacy':{'params':_0x27940d(_0x5952ed['params']??null),'query':_0x27940d(_0x5952ed['query']??null),'body':_0x27940d(_0x5952ed['body']??null),'response':_0x27940d(_0x5952ed[_0x1ccc5b(0x8c1)]??null)},'transport':{'raw':!!_0x5952ed[_0x1ccc5b(0x1c3)],'sse':!!_0x5952ed[_0x1ccc5b(0x2d4)],'rawResponse':!!_0x5952ed[_0x1ccc5b(0x47d)],'cors':_0x27940d(_0x5952ed[_0x1ccc5b(0x294)]??null)},'hasCanonical':_0x2679d5};}function _0xd10169(_0x11a6a3,_0x432065){const _0x15e8bc=_0x404acb;if(!_0x432065?.[_0x15e8bc(0x78e)])return;if(!_0x432065[_0x15e8bc(0x540)]||_0x432065[_0x15e8bc(0x540)][_0x15e8bc(0x4fa)]!==_0x15e8bc(0x601)||!_0x432065[_0x15e8bc(0x540)]['properties'])throw new Error('Route\x20'+_0x11a6a3[_0x15e8bc(0x225)]+'\x20'+_0x11a6a3[_0x15e8bc(0x5be)]+_0x15e8bc(0x600));const _0x2caf20=_0x432065[_0x15e8bc(0x540)][_0x15e8bc(0x668)]||{},_0x2424fb=new Set(_0x432065[_0x15e8bc(0x657)][_0x15e8bc(0x595)](_0x338f3c=>_0x338f3c[_0x15e8bc(0x4f9)])),_0x5d04da=new Set(Object['keys'](_0x432065[_0x15e8bc(0x5fb)]?.['querySchema']?.['properties']||{})),_0xf368cc=new Set(Object[_0x15e8bc(0x818)](_0x432065[_0x15e8bc(0x5fb)]?.[_0x15e8bc(0x54e)]||{}));for(const _0x103d06 of _0x432065[_0x15e8bc(0x657)]){if(!_0x2caf20[_0x103d06[_0x15e8bc(0x4f9)]])throw new Error('Route\x20'+_0x11a6a3[_0x15e8bc(0x225)]+'\x20'+_0x11a6a3[_0x15e8bc(0x5be)]+_0x15e8bc(0x7ba)+_0x103d06[_0x15e8bc(0x4f9)]);}for(const _0x43f311 of _0x5d04da){if(!_0x2caf20[_0x43f311])throw new Error(_0x15e8bc(0x448)+_0x11a6a3[_0x15e8bc(0x225)]+'\x20'+_0x11a6a3['path']+_0x15e8bc(0x47e)+_0x43f311);}for(const _0x4763b7 of _0xf368cc){if(!_0x2caf20[_0x4763b7])throw new Error(_0x15e8bc(0x448)+_0x11a6a3[_0x15e8bc(0x225)]+'\x20'+_0x11a6a3['path']+_0x15e8bc(0x43d)+_0x4763b7);}for(const _0x5e137c of _0xf368cc){if(_0x2424fb[_0x15e8bc(0x2ad)](_0x5e137c))throw new Error('Route\x20'+_0x11a6a3[_0x15e8bc(0x225)]+'\x20'+_0x11a6a3['path']+_0x15e8bc(0x2d5)+_0x5e137c);if(_0x5d04da[_0x15e8bc(0x2ad)](_0x5e137c))throw new Error(_0x15e8bc(0x448)+_0x11a6a3[_0x15e8bc(0x225)]+'\x20'+_0x11a6a3['path']+'\x20has\x20ambiguous\x20binding\x20for\x20query\x20field:\x20'+_0x5e137c);const _0x293f2e=_0x432065[_0x15e8bc(0x5fb)]['bindings'][_0x5e137c];if(!/^params\.[A-Za-z0-9_*.-]+$/[_0x15e8bc(0x3f6)](_0x293f2e)&&!/^query\.[A-Za-z0-9_*.-]+$/[_0x15e8bc(0x3f6)](_0x293f2e)&&!/^body(?:\.[A-Za-z0-9_*.-]+)?$/['test'](_0x293f2e)&&!/^headers\.[A-Za-z0-9_*.-]+$/[_0x15e8bc(0x3f6)](_0x293f2e))throw new Error('Route\x20'+_0x11a6a3[_0x15e8bc(0x225)]+'\x20'+_0x11a6a3[_0x15e8bc(0x5be)]+_0x15e8bc(0x381)+_0x5e137c+':\x20'+_0x293f2e);}for(const _0x5a3086 of _0x5d04da){if(_0x2424fb[_0x15e8bc(0x2ad)](_0x5a3086))throw new Error(_0x15e8bc(0x448)+_0x11a6a3[_0x15e8bc(0x225)]+'\x20'+_0x11a6a3[_0x15e8bc(0x5be)]+_0x15e8bc(0x434)+_0x5a3086);}const _0x340a9d=_0x432065['http']?.[_0x15e8bc(0x451)],_0x416a26=new Set([_0x15e8bc(0x7ce),'remaining-fields',_0x15e8bc(0x601),_0x15e8bc(0x7ae),'array',_0x15e8bc(0x1c3)]);if(!_0x416a26[_0x15e8bc(0x2ad)](_0x340a9d))throw new Error('Route\x20'+_0x11a6a3[_0x15e8bc(0x225)]+'\x20'+_0x11a6a3[_0x15e8bc(0x5be)]+'\x20has\x20invalid\x20http.bodyMode:\x20'+_0x340a9d);if(_0x340a9d===_0x15e8bc(0x1c3)&&!_0x11a6a3[_0x15e8bc(0x74c)]?.[_0x15e8bc(0x1c3)])throw new Error(_0x15e8bc(0x448)+_0x11a6a3[_0x15e8bc(0x225)]+'\x20'+_0x11a6a3[_0x15e8bc(0x5be)]+'\x20uses\x20raw\x20bodyMode\x20without\x20addRaw/raw\x20route\x20metadata');if(_0x432065[_0x15e8bc(0x861)]?.[_0x15e8bc(0x2f9)]!==![]&&(_0x11a6a3['meta']?.['raw']||_0x11a6a3['meta']?.[_0x15e8bc(0x2d4)]||_0x432065['http']?.[_0x15e8bc(0x358)]===_0x15e8bc(0x481)))throw new Error(_0x15e8bc(0x448)+_0x11a6a3[_0x15e8bc(0x225)]+'\x20'+_0x11a6a3[_0x15e8bc(0x5be)]+_0x15e8bc(0x693)+_0x432065[_0x15e8bc(0x5fb)]?.[_0x15e8bc(0x358)]);const _0x4a2416=Object[_0x15e8bc(0x818)](_0x2caf20)[_0x15e8bc(0x542)](_0x10a712=>{const _0x1c677d=_0x15e8bc;if(_0x2424fb['has'](_0x10a712))return![];if(_0x5d04da[_0x1c677d(0x2ad)](_0x10a712))return![];if(_0xf368cc[_0x1c677d(0x2ad)](_0x10a712))return![];return!![];});if(_0x340a9d===_0x15e8bc(0x7ce)&&_0x4a2416['length']>0x0)throw new Error('Route\x20'+_0x11a6a3[_0x15e8bc(0x225)]+'\x20'+_0x11a6a3[_0x15e8bc(0x5be)]+'\x20has\x20unbound\x20input\x20fields\x20with\x20bodyMode:none:\x20'+_0x4a2416[_0x15e8bc(0x1c9)](',\x20'));if(_0x340a9d===_0x15e8bc(0x67b)&&_0x4a2416['filter'](_0x35c441=>_0x491aa5(_0x2caf20[_0x35c441],_0x15e8bc(0x67b)))['length']!==0x1)throw new Error('Route\x20'+_0x11a6a3[_0x15e8bc(0x225)]+'\x20'+_0x11a6a3['path']+'\x20uses\x20bodyMode:array\x20but\x20does\x20not\x20have\x20exactly\x20one\x20unbound\x20array\x20input\x20field');}function _0x13e494(_0xac3848,_0x571795,_0x248e93,_0x1fbd6f){const _0x512b12=_0x404acb;for(const [_0x1efea8,_0x2119b2]of Object[_0x512b12(0x87f)](_0xac3848)){if(_0x571795[_0x512b12(0x2ad)](_0x1efea8)||_0x248e93[_0x512b12(0x2ad)](_0x1efea8)||Object['prototype'][_0x512b12(0x3e0)][_0x512b12(0x8c3)](_0x1fbd6f,_0x1efea8))continue;if(_0x491aa5(_0x2119b2,'array'))return _0x1efea8;}return null;}function _0x3cfb28(_0x3bdd3a){const _0x451aa0=_0x404acb;if(Array[_0x451aa0(0x59b)](_0x3bdd3a))return _0x3bdd3a;if(_0x3bdd3a==null)return[];return[_0x3bdd3a];}function _0x491aa5(_0x3e01da,_0x3861e4){const _0x38cc08=_0x404acb;return _0x3cfb28(_0x3e01da?.[_0x38cc08(0x4fa)])[_0x38cc08(0x1a1)](_0x3861e4);}function _0x20a5d5(_0x2dd1a8,_0x43e3b7){const _0x19faba=_0x404acb;if(_0x2dd1a8==null||typeof _0x2dd1a8!==_0x19faba(0x1d2))return _0x2dd1a8;const _0x11f39c=_0x3cfb28(_0x43e3b7?.[_0x19faba(0x4fa)]);if(_0x11f39c[_0x19faba(0x6ad)]===0x0)return _0x2dd1a8;if(_0x11f39c[_0x19faba(0x1a1)](_0x19faba(0x429))&&_0x2dd1a8===_0x19faba(0x429))return null;if(_0x11f39c[_0x19faba(0x1a1)]('boolean')){if(_0x2dd1a8===_0x19faba(0x7c4))return!![];if(_0x2dd1a8==='false')return![];}if(_0x11f39c[_0x19faba(0x1a1)](_0x19faba(0x45c))&&/^-?\d+$/[_0x19faba(0x3f6)](_0x2dd1a8))return Number[_0x19faba(0x453)](_0x2dd1a8,0xa);if(_0x11f39c[_0x19faba(0x1a1)](_0x19faba(0x72c))&&/^-?(?:\d+|\d*\.\d+)$/[_0x19faba(0x3f6)](_0x2dd1a8))return Number(_0x2dd1a8);return _0x2dd1a8;}function _0x3774cb(_0x305126){return _0x27940d(_0x305126);}function _0x15607c(_0x21cd68,_0x551fa8={},_0x125dc1={},_0x1c99c6=null,_0x398dbc={}){const _0x2ae683=_0x404acb,_0x5850a=_0x21cd68?.[_0x2ae683(0x8b3)];if(!_0x5850a?.[_0x2ae683(0x78e)]||!_0x5850a['inputSchema'])return null;const _0x3517ed=_0x5850a['inputSchema'][_0x2ae683(0x668)]||{},_0x45f599=_0x5850a[_0x2ae683(0x5fb)]?.['querySchema']?.[_0x2ae683(0x668)]||{},_0x38ade8=_0x5850a[_0x2ae683(0x5fb)]?.[_0x2ae683(0x54e)]||{},_0x5446bc=new Set((_0x5850a[_0x2ae683(0x657)]||[])[_0x2ae683(0x595)](_0x8dc99b=>_0x8dc99b['name'])),_0x50547b=new Set(Object['keys'](_0x45f599)),_0x421304={};for(const [_0x4784e9,_0x364153]of Object[_0x2ae683(0x87f)](_0x3517ed)){Object[_0x2ae683(0x404)][_0x2ae683(0x3e0)][_0x2ae683(0x8c3)](_0x364153||{},_0x2ae683(0x7eb))&&(_0x421304[_0x4784e9]=_0x3774cb(_0x364153[_0x2ae683(0x7eb)]));}for(const _0x18429d of _0x5850a['pathParams']||[]){if(!Object[_0x2ae683(0x404)][_0x2ae683(0x3e0)][_0x2ae683(0x8c3)](_0x551fa8,_0x18429d[_0x2ae683(0x4f9)]))continue;const _0x50eca2=_0x3517ed[_0x18429d['name']]||{};_0x421304[_0x18429d[_0x2ae683(0x4f9)]]=_0x20a5d5(_0x551fa8[_0x18429d['name']],_0x50eca2);}for(const [_0x5dfe01,_0x3103a0]of Object['entries'](_0x45f599)){if(!Object['prototype'][_0x2ae683(0x3e0)][_0x2ae683(0x8c3)](_0x125dc1,_0x5dfe01))continue;_0x421304[_0x5dfe01]=_0x20a5d5(_0x125dc1[_0x5dfe01],_0x3103a0||_0x3517ed[_0x5dfe01]||{});}for(const [_0x22afb7,_0x3cb251]of Object['entries'](_0x38ade8)){if(typeof _0x3cb251!==_0x2ae683(0x1d2))continue;let _0x53ffff;if(_0x3cb251[_0x2ae683(0x579)](_0x2ae683(0x714)))_0x53ffff=_0x551fa8[_0x3cb251[_0x2ae683(0x27f)](0x7)];else{if(_0x3cb251[_0x2ae683(0x579)]('query.'))_0x53ffff=_0x125dc1[_0x3cb251[_0x2ae683(0x27f)](0x6)];else{if(_0x3cb251===_0x2ae683(0x246))_0x53ffff=_0x1c99c6;else{if(_0x3cb251['startsWith'](_0x2ae683(0x83c)))_0x53ffff=_0x1c99c6?.[_0x3cb251[_0x2ae683(0x27f)](0x5)];else{if(_0x3cb251[_0x2ae683(0x579)](_0x2ae683(0x83e)))_0x53ffff=_0x398dbc?.[_0x3cb251[_0x2ae683(0x27f)](0x8)[_0x2ae683(0x368)]()]??_0x398dbc?.[_0x3cb251['slice'](0x8)];}}}}if(_0x53ffff!==undefined)_0x421304[_0x22afb7]=_0x53ffff;}const _0x5ed978=_0x5850a['http']?.[_0x2ae683(0x451)];if(_0x5ed978!==_0x2ae683(0x7ce)&&_0x5ed978!==_0x2ae683(0x1c3)&&_0x1c99c6!=null){if(_0x5ed978===_0x2ae683(0x67b)&&Array[_0x2ae683(0x59b)](_0x1c99c6)){const _0x382867=_0x13e494(_0x3517ed,_0x5446bc,_0x50547b,_0x38ade8);if(_0x382867)_0x421304[_0x382867]=_0x1c99c6;}else{if(_0x5ed978==='object')for(const [_0xa992fc,_0x371262]of Object[_0x2ae683(0x87f)](_0x3517ed)){if(_0x5446bc['has'](_0xa992fc)||_0x50547b['has'](_0xa992fc)||Object['prototype'][_0x2ae683(0x3e0)][_0x2ae683(0x8c3)](_0x38ade8,_0xa992fc))continue;if(Object['prototype'][_0x2ae683(0x3e0)]['call'](_0x1c99c6,_0xa992fc))_0x421304[_0xa992fc]=_0x1c99c6[_0xa992fc];else{if(_0x491aa5(_0x371262,_0x2ae683(0x601)))_0x421304[_0xa992fc]=_0x1c99c6;}}else for(const [_0x47b9e9,_0x207cf2]of Object[_0x2ae683(0x87f)](_0x1c99c6)){if(_0x5446bc[_0x2ae683(0x2ad)](_0x47b9e9)||_0x50547b[_0x2ae683(0x2ad)](_0x47b9e9)||Object[_0x2ae683(0x404)][_0x2ae683(0x3e0)][_0x2ae683(0x8c3)](_0x38ade8,_0x47b9e9))continue;_0x421304[_0x47b9e9]=_0x207cf2;}}}return _0x421304;}function _0x49565f(_0x293e8f,_0xf4753e,_0x3baeb6,_0x418be8){const _0xde9807=_0x404acb;if(!_0xf4753e)return;const _0x508313=_0x3cfb28(_0xf4753e[_0xde9807(0x4fa)]);if(_0x293e8f===undefined)return;if(_0x293e8f===null){_0x508313['length']>0x0&&!_0x508313[_0xde9807(0x1a1)]('null')&&_0x418be8['push']({'field':_0x3baeb6,'message':'must\x20not\x20be\x20null','expected':_0x508313[_0xde9807(0x1c9)]('|'),'actual':null});return;}if(_0x508313['length']===0x0)return;const _0x30e6b5=_0x508313[_0xde9807(0x721)](_0x21395f=>{const _0x3f0cee=_0xde9807;switch(_0x21395f){case _0x3f0cee(0x1d2):return typeof _0x293e8f==='string';case _0x3f0cee(0x45c):return Number['isInteger'](_0x293e8f);case _0x3f0cee(0x72c):return typeof _0x293e8f===_0x3f0cee(0x72c)&&Number[_0x3f0cee(0x72e)](_0x293e8f);case _0x3f0cee(0x29d):return typeof _0x293e8f===_0x3f0cee(0x29d);case _0x3f0cee(0x601):return _0x293e8f&&typeof _0x293e8f==='object'&&!Array[_0x3f0cee(0x59b)](_0x293e8f);case _0x3f0cee(0x67b):return Array['isArray'](_0x293e8f);case'null':return _0x293e8f===null;default:return!![];}});if(!_0x30e6b5){_0x418be8[_0xde9807(0x557)]({'field':_0x3baeb6,'message':_0xde9807(0x6e4)+_0x508313[_0xde9807(0x1c9)]('|'),'expected':_0x508313[_0xde9807(0x1c9)]('|'),'actual':_0x293e8f});return;}Array[_0xde9807(0x59b)](_0x293e8f)&&_0xf4753e[_0xde9807(0x7ab)]&&_0x293e8f[_0xde9807(0x881)]((_0x2afa6b,_0x5dd476)=>_0x49565f(_0x2afa6b,_0xf4753e[_0xde9807(0x7ab)],_0x3baeb6+'['+_0x5dd476+']',_0x418be8));}function _0x565cf0(_0x7cb3a9,_0x2d415a){const _0x10fd5b=_0x404acb,_0x505e10=_0x7cb3a9?.[_0x10fd5b(0x8b3)];if(!_0x505e10?.['hasCanonical']||!_0x505e10[_0x10fd5b(0x540)])return null;const _0x514a91=_0x505e10[_0x10fd5b(0x540)],_0x39cc6b=_0x514a91[_0x10fd5b(0x668)]||{},_0x4de956=new Set(_0x514a91['required']||[]),_0x3aeeea=[];for(const _0x12df2f of _0x4de956){_0x2d415a[_0x12df2f]===undefined&&_0x3aeeea[_0x10fd5b(0x557)]({'field':_0x12df2f,'message':_0x10fd5b(0x277),'expected':'present','actual':undefined});}if(_0x514a91[_0x10fd5b(0x205)]===![])for(const _0x519764 of Object[_0x10fd5b(0x818)](_0x2d415a||{})){!Object[_0x10fd5b(0x404)][_0x10fd5b(0x3e0)][_0x10fd5b(0x8c3)](_0x39cc6b,_0x519764)&&_0x3aeeea[_0x10fd5b(0x557)]({'field':_0x519764,'message':_0x10fd5b(0x20f),'expected':_0x10fd5b(0x572),'actual':_0x2d415a[_0x519764]});}for(const [_0x4c62f8,_0x1eba60]of Object[_0x10fd5b(0x87f)](_0x39cc6b)){_0x49565f(_0x2d415a[_0x4c62f8],_0x1eba60,_0x4c62f8,_0x3aeeea);}if(_0x3aeeea['length']===0x0)return null;return{'code':'VALIDATION_ERROR','errors':_0x3aeeea};}function _0x11c3b9(_0x2821bc=[]){const _0x4197fb=_0x404acb;if(!Array[_0x4197fb(0x59b)](_0x2821bc)||_0x2821bc[_0x4197fb(0x6ad)]===0x0)return null;const _0x2e0fd5=_0x2821bc['slice'](0x0,0x3)['map']((_0x406650={})=>{const _0x1ba6ac=_0x4197fb,_0x4131dd=_0x406650[_0x1ba6ac(0x3ab)]?_0x406650[_0x1ba6ac(0x3ab)]+'\x20':'';return(''+_0x4131dd+(_0x406650[_0x1ba6ac(0x81d)]||_0x1ba6ac(0x35e)))[_0x1ba6ac(0x48b)]();})[_0x4197fb(0x1c9)](';\x20');return _0x2821bc[_0x4197fb(0x6ad)]>0x3?_0x2e0fd5+_0x4197fb(0x37d)+(_0x2821bc[_0x4197fb(0x6ad)]-0x3)+_0x4197fb(0x2ea):_0x2e0fd5;}function _0x2d7394(_0x4cb31b,_0x51d1ac={}){const _0x1bf6a1=_0x404acb,_0x1dc29a=_0x51d1ac?.[_0x1bf6a1(0x3ec)]?.[_0x1bf6a1(0x6cd)]??_0x51d1ac?.[_0x1bf6a1(0x6cd)]??_0x1bf6a1(0x2cf),_0x3f9b92=_0x51d1ac?.['result']?.[_0x1bf6a1(0x844)]??_0x51d1ac?.[_0x1bf6a1(0x844)]??_0x1dc29a?.['details']??null,_0x86eabc=_0x51d1ac?.[_0x1bf6a1(0x3ec)]?.[_0x1bf6a1(0x2dc)]??_0x51d1ac?.['code']??_0x1dc29a?.[_0x1bf6a1(0x2dc)]??null,_0x107d57=_0x51d1ac?.['result']?.[_0x1bf6a1(0x81d)]??_0x51d1ac?.['message']??_0x1dc29a?.['message']??null,_0x308fde=typeof _0x1dc29a===_0x1bf6a1(0x1d2)?_0x1dc29a:null,_0x4f8d85=typeof _0x308fde===_0x1bf6a1(0x1d2)&&/^[A-Z0-9_]+$/[_0x1bf6a1(0x3f6)](_0x308fde),_0x25bfb0=_0x86eabc??(_0x4f8d85?_0x308fde:null)??(_0x11e6bb[_0x4cb31b]||_0x1bf6a1(0x418)+_0x4cb31b);let _0x436b6a=_0x107d57;!_0x436b6a&&typeof _0x308fde===_0x1bf6a1(0x1d2)&&!_0x4f8d85&&(_0x436b6a=_0x308fde);if(!_0x436b6a&&_0x25bfb0===_0x1bf6a1(0x526)){const _0x5e5879=_0x11c3b9(_0x3f9b92);_0x436b6a=_0x5e5879?_0x1bf6a1(0x305)+_0x5e5879:'Validation\x20failed';}if(!_0x436b6a&&Array['isArray'](_0x3f9b92)&&_0x3f9b92[_0x1bf6a1(0x6ad)]>0x0){const _0x5f2ba5=_0x11c3b9(_0x3f9b92);if(_0x5f2ba5)_0x436b6a=_0x5f2ba5;}if(!_0x436b6a)_0x436b6a=_0x11e6bb[_0x4cb31b]||_0x1bf6a1(0x2cf);const _0x11e5b5={'code':_0x25bfb0,'message':_0x436b6a};if(_0x3f9b92!=null)_0x11e5b5[_0x1bf6a1(0x844)]=_0x3f9b92;return _0x11e5b5;}function _0x352492(_0x166ced){const _0x1ac57a=_0x404acb,_0x217f1f={};if(!_0x166ced)return _0x217f1f;for(const _0x2bf140 of _0x166ced[_0x1ac57a(0x84e)](';')){const _0x1fa257=_0x2bf140[_0x1ac57a(0x196)]('=');if(_0x1fa257===-0x1)continue;const _0x4f7385=_0x2bf140[_0x1ac57a(0x27f)](0x0,_0x1fa257)[_0x1ac57a(0x48b)](),_0x24109c=_0x2bf140[_0x1ac57a(0x27f)](_0x1fa257+0x1)['trim']();_0x217f1f[_0x4f7385]=decodeURIComponent(_0x24109c);}return _0x217f1f;}function _0x1c28ac(_0x24bc01,_0x21ffb0){const _0xa7d575=_0x404acb;return _0x21ffb0=_0x446926(_0x21ffb0),{'status':_0x21ffb0['status']??_0x24bc01[_0xa7d575(0x2c4)],'headers':{..._0x24bc01[_0xa7d575(0x2b0)]||{},..._0x21ffb0[_0xa7d575(0x2b0)]||{}},'body':_0x21ffb0['body']??_0x24bc01[_0xa7d575(0x246)]};}function _0x161fd2(_0x1accc0={}){const _0x4d381e=_0x404acb;return _0x1accc0[_0x4d381e(0x358)]||(_0x1accc0[_0x4d381e(0x558)]?'internal':_0x4d381e(0x5fb));}function _0x1acef1(_0x195e8c){const _0x3ca8bb=_0x404acb;if(_0x195e8c[_0x3ca8bb(0x28e)]?.[_0x3ca8bb(0x558)]===!![])return!![];if(_0x195e8c[_0x3ca8bb(0x28e)]?.[_0x3ca8bb(0x716)]?.[_0x3ca8bb(0x365)]===!![])return!![];if(_0x195e8c[_0x3ca8bb(0x28e)]?.['auth']?.['ok']===!![])return!![];return![];}function _0x399f68(_0x21e3a9,_0x173bbc){const _0x29e310=_0x404acb,_0x3755ff=_0x173bbc[_0x29e310(0x84e)]('.');let _0x33651f=_0x21e3a9;for(const _0x17a9db of _0x3755ff){_0x33651f=_0x33651f?.[_0x17a9db];}return _0x33651f||null;}class _0x1d4309{constructor(){const _0x2c43eb=_0x404acb;this['middlewares']=[],this['guards']=[],this[_0x2c43eb(0x280)]=[],this['maxBodyBytes']=0x5*0x400*0x400,this['server']=null,this[_0x2c43eb(0x39f)]=[],this['_sockets']=new Set(),this[_0x2c43eb(0x716)]={'cookieName':_0x2c43eb(0x54a),'stateCookieName':_0x2c43eb(0x6ee),'csrfCookieName':'kdb_admin_csrf'},this['_authOptions']={},this[_0x2c43eb(0x548)]=new Map(),this['_oidcDiscoveryCache']=null,this[_0x2c43eb(0x24c)]=null,this[_0x2c43eb(0x8a5)]=new Map(),this[_0x2c43eb(0x6d8)]=new _0x30fcce(),this[_0x2c43eb(0x4db)]=![],this[_0x2c43eb(0x33a)]=0x0;}[_0x404acb(0x4c9)](_0x307397={}){const _0x4dd910=_0x404acb;return this['_authOptions']=_0x307397||{},this[_0x4dd910(0x87d)]=_0x307397['mode']??_0x4dd910(0x5f0),this[_0x4dd910(0x228)];}get['isSetupMode'](){const _0xb3d61=_0x404acb;if(this[_0xb3d61(0x2ed)]?.[_0xb3d61(0x716)])return this['_okdb']['auth']['isSetupMode'];return![];}[_0x404acb(0x3b5)](){const _0x6c71be=_0x404acb;if(this['_okdb']?.['auth'])return this[_0x6c71be(0x2ed)]['auth'][_0x6c71be(0x3b5)]();return this[_0x6c71be(0x228)]||{};}['use'](_0x5c1311){const _0x21cf81=_0x404acb;this[_0x21cf81(0x680)]['push'](_0x5c1311);}['guard'](_0x97b67f,_0x410f85){const _0x39cbf6=_0x404acb;this[_0x39cbf6(0x69c)]['push']({'match':_0x97b67f,'handler':_0x410f85});}[_0x404acb(0x4da)](_0x3bc5f1,_0xc34780,_0x510cdd,_0x22c9bf={}){const _0x137e06=_0x404acb,_0x30f438={'method':_0x38b448(_0x3bc5f1),'path':_0xc34780,'matcher':_0x5215ab(_0xc34780),'handler':_0x510cdd,'meta':_0x22c9bf||{}},_0x5baab7=_0xef0bef(_0x30f438);_0xd10169(_0x30f438,_0x5baab7),_0x30f438['operation']=_0x5baab7,_0x30f438[_0x137e06(0x5a0)]=this['_userPhase']===!![];if(_0x30f438[_0x137e06(0x5a0)])this['_userRouteCount']++;this[_0x137e06(0x280)][_0x137e06(0x557)](_0x30f438);}[_0x404acb(0x5a6)](_0xa9c4ca,_0x10cfa2,_0xfc5759,_0x38412a={}){this['add'](_0xa9c4ca,_0x10cfa2,_0xfc5759,{..._0x38412a,'raw':!![]});}[_0x404acb(0x641)](_0x1c60ab,_0x9db493,{corsOnly:corsOnly=![]}={}){const _0x51cb1b=_0x404acb;let _0x3e17ad=null,_0x3d75d5=Infinity;for(const _0x4fd61f of this[_0x51cb1b(0x280)]){if(corsOnly){if(!_0x4fd61f[_0x51cb1b(0x74c)]?.[_0x51cb1b(0x294)])continue;}else{if(_0x4fd61f[_0x51cb1b(0x225)]!==_0x1c60ab)continue;}if(!_0x4fd61f[_0x51cb1b(0x2c1)][_0x51cb1b(0x316)][_0x51cb1b(0x3f6)](_0x9db493))continue;const _0x14f448=_0x4fd61f[_0x51cb1b(0x2c1)]['keys']?.[_0x51cb1b(0x6ad)]??0x0;if(_0x14f448<_0x3d75d5){_0x3e17ad=_0x4fd61f,_0x3d75d5=_0x14f448;if(_0x14f448===0x0)break;}}return _0x3e17ad;}[_0x404acb(0x7df)](_0x14c887,_0x387ce5){const _0x2cdd54=_0x404acb,_0x5da506=_0x38b448(_0x14c887),_0x111895=this[_0x2cdd54(0x641)](_0x5da506,_0x387ce5);if(_0x111895)return _0x111895;if(_0x5da506===_0x2cdd54(0x618))return this[_0x2cdd54(0x641)](_0x5da506,_0x387ce5,{'corsOnly':!![]});return null;}[_0x404acb(0x34a)](_0x57afc7,_0x135869){const _0x52233c=_0x404acb;if(_0x57afc7?.[_0x52233c(0x74c)]?.['rawResponse'])return![];if(_0x135869?.['headers']?.[_0x52233c(0x36a)])return![];return!![];}['listRoutes'](){const _0x551886=_0x404acb;return this[_0x551886(0x280)][_0x551886(0x542)](_0x52769a=>!_0x52769a[_0x551886(0x74c)]?.[_0x551886(0x8c6)])[_0x551886(0x595)](_0x3a5744=>({'method':_0x3a5744['method'],'path':_0x3a5744['path'],'defaults':_0x3a5744['matcher'][_0x551886(0x339)],'meta':_0x3a5744[_0x551886(0x74c)],'operation':_0x3a5744[_0x551886(0x8b3)]}));}['addSSE'](_0x55e143,_0x133e0e,_0x318d65={}){const _0x13fbc3=_0x404acb,{PassThrough:_0x5621f0}=require$$5;this[_0x13fbc3(0x4da)](_0x13fbc3(0x318),_0x55e143,({params:_0x16af83,query:_0x230c5e,headers:_0x1358f8,context:_0x233ebd})=>{const _0x364ced=_0x13fbc3,_0x4a6810=new _0x5621f0();let _0x10af59=null;const _0x1a808d={};try{_0x233ebd?.[_0x364ced(0x35b)]?.[_0x364ced(0x437)]?.[_0x364ced(0x746)](!![]);}catch{}_0x4a6810[_0x364ced(0x82b)](_0x364ced(0x64b)),_0x10af59=setInterval(()=>{const _0x279948=_0x364ced;try{_0x4a6810[_0x279948(0x82b)](':\x20ping\x0a\x0a');}catch{}},0x3a98);const _0x23deb4=(_0x309411,_0x568638,_0x209abd={})=>{const _0x46d304=_0x364ced;try{const _0x47c796=_0x209abd[_0x46d304(0x1c3)]?String(_0x568638??''):JSON[_0x46d304(0x2d1)](_0x568638);_0x209abd['id']!=null&&_0x4a6810[_0x46d304(0x82b)](_0x46d304(0x3f4)+_0x209abd['id']+'\x0a');_0x4a6810['write']('event:\x20'+_0x309411+'\x0a');for(const _0x2c614d of _0x47c796[_0x46d304(0x84e)]('\x0a')){_0x4a6810[_0x46d304(0x82b)]('data:\x20'+_0x2c614d+'\x0a');}_0x4a6810[_0x46d304(0x82b)]('\x0a');}catch{}},_0x27b484=()=>{const _0x3dcd7a=_0x364ced;_0x10af59&&(clearInterval(_0x10af59),_0x10af59=null);try{_0x4a6810[_0x3dcd7a(0x6e6)]();}catch{}},_0x16482c=(_0x149dce,_0x4866ae)=>{_0x1a808d[_0x149dce]=_0x4866ae;};_0x233ebd?.[_0x364ced(0x35b)]?.['on'](_0x364ced(0x6e0),_0x27b484),_0x4a6810['on'](_0x364ced(0x6e0),_0x27b484);if(_0x233ebd?.['auth']&&_0x233ebd[_0x364ced(0x716)][_0x364ced(0x5f0)]!==!![]&&_0x233ebd['auth'][_0x364ced(0x365)]){const _0x2358f1={'headers':_0x1358f8??{},'cookies':_0x352492(_0x1358f8?.[_0x364ced(0x7ed)]),'context':{},'socket':_0x233ebd?.[_0x364ced(0x35b)]?.['socket']??{'remoteAddress':null}},_0xa0086c=setInterval(async()=>{const _0x14ba44=_0x364ced;try{const _0x2507f4=await this['authenticateRequest'](_0x2358f1);if(_0x2507f4?.[_0x14ba44(0x5f0)]===!![]||_0x2507f4?.[_0x14ba44(0x365)])return;_0x23deb4(_0x14ba44(0x716),{'expired':!![]}),_0x27b484();}catch{_0x27b484();}},0xea60);_0xa0086c['unref']?.(),_0x4a6810['on'](_0x364ced(0x6e0),()=>clearInterval(_0xa0086c));}const _0x92730a=_0x133e0e({'send':_0x23deb4,'close':_0x27b484,'params':_0x16af83??{},'query':_0x230c5e??{},'headers':_0x1358f8??{},'context':_0x233ebd,'setHeader':_0x16482c});return typeof _0x92730a==='function'&&_0x4a6810['on'](_0x364ced(0x6e0),_0x92730a),{'status':0xc8,'headers':{'content-type':_0x364ced(0x87b),'cache-control':_0x364ced(0x5f7),'connection':'keep-alive','x-accel-buffering':'no',..._0x1a808d},'body':_0x4a6810};},{..._0x318d65,'sse':!![]});}async['_runGuards'](_0x1c0bb5,_0x43bd7a){const _0x160048=_0x404acb;for(const _0x399ffa of this[_0x160048(0x69c)]){if(!_0x399ffa[_0x160048(0x492)](_0x1c0bb5))continue;const _0x50d735=await _0x399ffa[_0x160048(0x29f)](_0x1c0bb5,_0x43bd7a);if(_0x50d735===![])return![];}return!![];}async[_0x404acb(0x4bd)](_0x3f3e17,_0xe99fd0,_0x264e14){let _0x544abb=0x0;const _0x4ca583=async()=>{const _0xb93a8=this['middlewares'][_0x544abb++];if(!_0xb93a8)return _0x264e14();return _0xb93a8(_0x3f3e17,_0xe99fd0,_0x4ca583);};return _0x4ca583();}[_0x404acb(0x4a4)](_0x49c3fc,_0x58fff3){const _0x4ba48e=_0x404acb,{status:status=0xc8,headers:headers={},body:_0x3895de}=_0x49c3fc;if(status>=0x12c&&status<0x190)return _0x49c3fc;if(_0x4efe79(_0x3895de))return _0x49c3fc;if(Buffer['isBuffer'](_0x3895de))return _0x49c3fc;if(typeof _0x3895de===_0x4ba48e(0x1d2))return _0x49c3fc;const _0x101aca={'time':+_0x58fff3['toFixed'](0x2)};if(_0x3895de?.[_0x4ba48e(0x74c)]&&typeof _0x3895de[_0x4ba48e(0x74c)]===_0x4ba48e(0x601)){const {time:_0x2183f1,..._0x338dab}=_0x3895de['meta'];Object['assign'](_0x101aca,_0x338dab);}let _0x34c330;if(status>=0x190){const _0x1b8450=_0x2d7394(status,_0x3895de);_0x34c330={'data':null,'error':_0x1b8450,'meta':_0x101aca};}else{if(status===0xcc||_0x3895de==null)_0x34c330={'data':null,'error':null,'meta':_0x101aca};else{let _0x65637a;if('result'in _0x3895de)_0x65637a=_0x3895de[_0x4ba48e(0x3ec)];else{const {meta:_0x2dd2d1,..._0x24143f}=_0x3895de;_0x65637a=Object['keys'](_0x24143f)['length']>0x0?_0x24143f:null;}_0x34c330={'data':_0x65637a,'error':null,'meta':_0x101aca};}}return{'status':status===0xcc?0xc8:status,'headers':headers,'body':_0x34c330};}async[_0x404acb(0x88f)](_0x18c534,_0x422094,_0xc1e0a={},_0x16281e={}){const _0x1ba4a8=_0x404acb;_0x18c534=_0x38b448(_0x18c534);const _0x44d399=this[_0x1ba4a8(0x7df)](_0x18c534,_0x422094),_0x3611e7={'method':_0x18c534,'path':_0x422094,'headers':_0xc1e0a[_0x1ba4a8(0x2b0)]??{},'body':_0xc1e0a[_0x1ba4a8(0x246)]??null,'query':_0xc1e0a[_0x1ba4a8(0x6d0)]??{},'context':_0x16281e,'cookies':_0x352492(_0xc1e0a[_0x1ba4a8(0x2b0)]?.[_0x1ba4a8(0x7ed)]),'route':_0x44d399,'socket':{'remoteAddress':_0xc1e0a[_0x1ba4a8(0x5ef)]??_0x1ba4a8(0x520)}};_0x3611e7[_0x1ba4a8(0x28e)]=_0x3611e7[_0x1ba4a8(0x28e)]||{};!_0x3611e7['context']['auth']&&(_0x3611e7[_0x1ba4a8(0x28e)][_0x1ba4a8(0x716)]=await this[_0x1ba4a8(0x6ac)](_0x3611e7));if(_0x3611e7[_0x1ba4a8(0x28e)][_0x1ba4a8(0x716)]?.['bootstrapBlocked'])return _0x446926({'status':0x193,'body':{'error':{'code':'BOOTSTRAP_LOCALHOST_ONLY','message':'Server\x20is\x20in\x20bootstrap\x20mode\x20and\x20only\x20accepts\x20localhost\x20connections\x20until\x20the\x20first\x20token\x20is\x20created.'}}});_0x3611e7[_0x1ba4a8(0x28e)]['auth']?.[_0x1ba4a8(0x402)]&&!_0x3611e7[_0x1ba4a8(0x28e)]['user']&&(_0x3611e7[_0x1ba4a8(0x28e)][_0x1ba4a8(0x402)]=_0x3611e7['context'][_0x1ba4a8(0x716)][_0x1ba4a8(0x402)]);let _0x5410ba=null;const _0x2cec4f={'status'(_0x27df6d){_0x5410ba=_0x5410ba||{},_0x5410ba['status']=_0x27df6d;},'setHeader'(_0x509364,_0x4f512c){const _0x384406=_0x1ba4a8;_0x5410ba=_0x5410ba||{},_0x5410ba['headers']=_0x5410ba[_0x384406(0x2b0)]||{};const _0x822b90=String(_0x509364)[_0x384406(0x368)]();if(_0x822b90===_0x384406(0x3db)){const _0x22189a=_0x5410ba[_0x384406(0x2b0)][_0x509364];if(!_0x22189a)_0x5410ba['headers'][_0x509364]=_0x4f512c;else{if(Array[_0x384406(0x59b)](_0x22189a))_0x22189a[_0x384406(0x557)](_0x4f512c);else _0x5410ba[_0x384406(0x2b0)][_0x509364]=[_0x22189a,_0x4f512c];}return;}_0x5410ba[_0x384406(0x2b0)][_0x509364]=_0x4f512c;},'send'(_0x47961b){const _0x2b2e0c=_0x1ba4a8;_0x5410ba=_0x5410ba||{},_0x5410ba[_0x2b2e0c(0x246)]=_0x47961b;}},_0x3b725a=await this[_0x1ba4a8(0x683)](_0x3611e7,_0x2cec4f);if(!_0x3b725a)return _0x446926(_0x5410ba??{'status':0x193});const _0x3e494e=this['_enforceOperationAccess'](_0x3611e7);if(_0x3e494e)return _0x446926(_0x3e494e);const _0xca59cb=this['_validateOperationRequest'](_0x3611e7);if(_0xca59cb)return _0x446926(_0xca59cb);return await this['_runMiddlewares'](_0x3611e7,_0x2cec4f,async()=>{const _0x218fcc=_0x1ba4a8,_0x34d91a=await this[_0x218fcc(0x544)](_0x3611e7);if(_0x5410ba==null){_0x5410ba=_0x34d91a;return;}_0x5410ba=_0x1c28ac(_0x5410ba,_0x34d91a);}),_0x446926(_0x5410ba);}['_enforceOperationAccess'](_0x298437){const _0x100eb2=_0x404acb,_0x31a13c=_0x298437[_0x100eb2(0x1b0)]?.[_0x100eb2(0x8b3)],_0x23ff2c=_0x31a13c?.[_0x100eb2(0x6cc)];if(!_0x31a13c?.[_0x100eb2(0x78e)]||!_0x23ff2c)return null;if(_0x298437[_0x100eb2(0x28e)]?.[_0x100eb2(0x716)]?.[_0x100eb2(0x5f0)]===!![]||_0x298437[_0x100eb2(0x28e)]?.[_0x100eb2(0x716)]?.['isSystem']===!![])return null;const _0x976943=_0x161fd2(_0x298437[_0x100eb2(0x28e)]),_0x499731=Array[_0x100eb2(0x59b)](_0x23ff2c[_0x100eb2(0x27d)])?_0x23ff2c[_0x100eb2(0x27d)]:null;if(_0x23ff2c[_0x100eb2(0x50b)]&&_0x298437[_0x100eb2(0x28e)]?.[_0x100eb2(0x558)]!==!![])return{'status':0x193,'body':{'error':_0x100eb2(0x4f0)}};if(_0x499731&&_0x499731[_0x100eb2(0x6ad)]>0x0&&!_0x499731[_0x100eb2(0x1a1)](_0x976943)&&!(_0x976943===_0x100eb2(0x558)&&_0x499731[_0x100eb2(0x1a1)](_0x100eb2(0x5c1))))return{'status':0x193,'body':{'error':_0x100eb2(0x4f0)}};if(_0x23ff2c['authRequired']&&!_0x1acef1(_0x298437))return{'status':0x191,'body':{'error':_0x100eb2(0x4b0)}};const _0x2cd157=_0x23ff2c[_0x100eb2(0x535)];if(!_0x2cd157)return null;if(_0x298437[_0x100eb2(0x28e)]?.[_0x100eb2(0x716)]?.[_0x100eb2(0x4fa)]==='sync-node')return null;const _0x33f5e5=_0x298437[_0x100eb2(0x28e)]?.[_0x100eb2(0x716)]?.[_0x100eb2(0x527)];if(!_0x33f5e5){if(_0x298437[_0x100eb2(0x28e)]?.[_0x100eb2(0x716)]?.['ok']===!![])return null;return{'status':0x193,'body':{'error':_0x100eb2(0x4cd)}};}if(!_0x298437['params']&&_0x298437[_0x100eb2(0x1b0)]?.[_0x100eb2(0x2c1)]){const _0x12dc9f=_0x298437[_0x100eb2(0x1b0)]['matcher'][_0x100eb2(0x316)][_0x100eb2(0x607)](_0x298437[_0x100eb2(0x5be)]);_0x12dc9f&&(_0x298437[_0x100eb2(0x315)]={},_0x298437[_0x100eb2(0x1b0)]['matcher']['keys'][_0x100eb2(0x881)]((_0x446ca4,_0x37472d)=>{const _0x3f4bdc=_0x100eb2,_0x461bfc=_0x12dc9f[_0x37472d+0x1];_0x298437[_0x3f4bdc(0x315)][_0x446ca4]=_0x461bfc?decodeURIComponent(_0x461bfc):_0x298437[_0x3f4bdc(0x1b0)][_0x3f4bdc(0x2c1)][_0x3f4bdc(0x339)][_0x446ca4]??undefined;}));}let _0x3eb36d=null;const _0xcf062b=_0x23ff2c[_0x100eb2(0x1e9)]===_0x100eb2(0x787)?_0x100eb2(0x89d):_0x23ff2c[_0x100eb2(0x1e9)]?.[_0x100eb2(0x787)];_0xcf062b&&(_0x3eb36d=_0x399f68(_0x298437,_0xcf062b));if(_0x3eb36d&&_0x3eb36d[_0x100eb2(0x579)]('~')){const _0x2b20c6=_0x370c93(_0x2cd157),_0x536450=_0x2fb0f3(_0x33f5e5[_0x100eb2(0x496)]||[],(_0x33f5e5['grants']||{})[_0x3eb36d]||[]);if(!_0x4cfc49(_0x536450,_0x2b20c6))return{'status':0x193,'body':{'error':_0x100eb2(0x890)+_0x2b20c6+_0x100eb2(0x319)}};}const _0x160e22=_0x2fb0f3(_0x33f5e5['permissions']||[],_0x3eb36d?(_0x33f5e5[_0x100eb2(0x6fd)]||{})[_0x3eb36d]||[]:[]);if(!_0x4cfc49(_0x160e22,_0x2cd157))return{'status':0x193,'body':{'error':_0x100eb2(0x890)+_0x2cd157}};return null;}[_0x404acb(0x8a7)](_0x1ac1cb){const _0x4cd1a6=_0x404acb,_0x1cc6cb=_0x1ac1cb[_0x4cd1a6(0x1b0)],_0x49cf6d=_0x1cc6cb?.['operation'];if(!_0x49cf6d?.[_0x4cd1a6(0x78e)]||!_0x49cf6d['inputSchema'])return null;let _0x46c1be=_0x1ac1cb[_0x4cd1a6(0x315)]??null;if(!_0x46c1be&&_0x1cc6cb?.[_0x4cd1a6(0x2c1)]){const _0x344864=_0x1cc6cb[_0x4cd1a6(0x2c1)][_0x4cd1a6(0x316)][_0x4cd1a6(0x607)](_0x1ac1cb[_0x4cd1a6(0x5be)]);_0x344864&&(_0x46c1be={},_0x1cc6cb[_0x4cd1a6(0x2c1)][_0x4cd1a6(0x818)][_0x4cd1a6(0x881)]((_0x327f1d,_0x2119c9)=>{const _0x146284=_0x4cd1a6,_0x31d48a=_0x344864[_0x2119c9+0x1];_0x46c1be[_0x327f1d]=_0x31d48a?decodeURIComponent(_0x31d48a):_0x1cc6cb[_0x146284(0x2c1)][_0x146284(0x339)][_0x327f1d]??undefined;}));}const _0x720a4=_0x15607c(_0x1cc6cb,_0x46c1be??{},_0x1ac1cb[_0x4cd1a6(0x6d0)]??{},_0x1ac1cb[_0x4cd1a6(0x246)],_0x1ac1cb['headers']??{}),_0x5aa177=_0x565cf0(_0x1cc6cb,_0x720a4||{});if(!_0x5aa177)return null;const _0x3b578e=_0x11c3b9(_0x5aa177[_0x4cd1a6(0x511)]);return{'status':0x190,'body':{'error':_0x5aa177[_0x4cd1a6(0x2dc)],'code':_0x5aa177['code'],'message':_0x3b578e?'Validation\x20failed:\x20'+_0x3b578e:_0x4cd1a6(0x1ad),'details':_0x5aa177[_0x4cd1a6(0x511)]}};}['validateRouteInput'](_0x2162b5,_0x2bcad4){const _0x4d8690=_0x404acb,_0x20ad23=_0x565cf0(_0x2162b5,_0x2bcad4||{});if(!_0x20ad23)return null;return{'code':_0x20ad23[_0x4d8690(0x2dc)],'message':_0x11c3b9(_0x20ad23[_0x4d8690(0x511)])?_0x4d8690(0x305)+_0x11c3b9(_0x20ad23[_0x4d8690(0x511)]):_0x4d8690(0x1ad),'details':_0x20ad23[_0x4d8690(0x511)]};}async['_dispatch'](_0x2165e1){const _0x37458d=_0x404acb;if(_0x2165e1[_0x37458d(0x225)]===_0x37458d(0x618)){const _0x1085a9=this[_0x37458d(0x641)]('OPTIONS',_0x2165e1[_0x37458d(0x5be)],{'corsOnly':!![]});if(_0x1085a9)return{'status':0xcc,'headers':_0x137d18(_0x2165e1[_0x37458d(0x2b0)],_0x1085a9[_0x37458d(0x74c)][_0x37458d(0x294)],_0x1085a9[_0x37458d(0x225)])||{}};}const _0x1b6a7b=this[_0x37458d(0x641)](_0x2165e1[_0x37458d(0x225)],_0x2165e1[_0x37458d(0x5be)]);if(_0x1b6a7b){const _0x3ef6ad=_0x1b6a7b[_0x37458d(0x2c1)][_0x37458d(0x316)][_0x37458d(0x607)](_0x2165e1[_0x37458d(0x5be)]),_0x553e50={};_0x1b6a7b[_0x37458d(0x2c1)][_0x37458d(0x818)][_0x37458d(0x881)]((_0x2f7f65,_0x4d6104)=>{const _0x428df4=_0x37458d,_0x4b69b9=_0x3ef6ad[_0x4d6104+0x1];_0x553e50[_0x2f7f65]=_0x4b69b9?decodeURIComponent(_0x4b69b9):_0x1b6a7b[_0x428df4(0x2c1)]['defaults'][_0x2f7f65]??undefined;}),_0x2165e1['params']=_0x553e50;try{const _0x2c1eae=await _0x1b6a7b[_0x37458d(0x29f)]({'params':_0x553e50,'body':_0x2165e1[_0x37458d(0x246)],'query':_0x2165e1[_0x37458d(0x6d0)],'headers':_0x2165e1['headers'],'context':_0x2165e1[_0x37458d(0x28e)]}),_0x521a1c=_0x446926(_0x2c1eae),_0x44e65a=_0x137d18(_0x2165e1[_0x37458d(0x2b0)],_0x1b6a7b['meta']?.['cors'],_0x1b6a7b[_0x37458d(0x225)]);if(!_0x44e65a)return _0x521a1c;return{..._0x521a1c,'headers':{..._0x521a1c['headers']||{},..._0x44e65a}};}catch(_0x2a9d68){const _0x5d8058=_0x2a9d68?.[_0x37458d(0x2c4)]||_0x460813[_0x2a9d68?.[_0x37458d(0x2dc)]]||0x1f4;return{'status':_0x5d8058,'body':{'error':_0x2a9d68[_0x37458d(0x81d)]||_0x37458d(0x4d5),'code':_0x2a9d68?.[_0x37458d(0x2dc)]||_0x11e6bb[_0x5d8058]||'HTTP_'+_0x5d8058,'message':_0x2a9d68?.[_0x37458d(0x81d)]||_0x37458d(0x4d5),..._0x2a9d68?.[_0x37458d(0x844)]!=null?{'details':_0x2a9d68['details']}:{}}};}}return{'status':0x194,'body':{'error':_0x37458d(0x19d)}};}[_0x404acb(0x7a4)](_0x2d582c,_0x3ee527={}){const _0x26949b=_0x404acb;if(typeof _0x3ee527===_0x26949b(0x1d2)||Array[_0x26949b(0x59b)](_0x3ee527))_0x3ee527={'host':_0x3ee527};_0x3ee527=_0x3ee527??{};const _0x147314=Number(_0x3ee527['workers'])||0x0;if(_0x147314>=0x1||_0x3ee527[_0x26949b(0x1d9)]!=null||_0x3ee527[_0x26949b(0x47c)]!=null){const _0x833a19=new Error(_0x26949b(0x599)+_0x26949b(0x1ee)+'CLI\x20(`okdb\x20listen`),\x20or\x20use\x20Node\x27s\x20built-in\x20`cluster`\x20module\x20and\x20call\x20'+_0x26949b(0x30c));_0x833a19[_0x26949b(0x2dc)]='HTTP_CLUSTER_REMOVED';throw _0x833a19;}if(this[_0x26949b(0x72d)])throw new Error(_0x26949b(0x82e));const _0x3991c0=_0x3ee527[_0x26949b(0x26b)]==null?[undefined]:[][_0x26949b(0x7fe)](_0x3ee527[_0x26949b(0x26b)]);if(!_0x3991c0['length']||_0x3991c0[_0x26949b(0x721)](_0x17e077=>_0x17e077!==undefined&&(typeof _0x17e077!=='string'||!_0x17e077))){const _0x213948=new Error(_0x26949b(0x2ce));_0x213948['code']=_0x26949b(0x1a2);throw _0x213948;}_0x2d582c&&this[_0x26949b(0x716)][_0x26949b(0x70f)]===_0x26949b(0x54a)&&(this[_0x26949b(0x716)][_0x26949b(0x70f)]=_0x26949b(0x3e7)+_0x2d582c,this[_0x26949b(0x2ed)]?.[_0x26949b(0x716)]&&(this['_okdb'][_0x26949b(0x716)]['_cookieName']=this[_0x26949b(0x716)][_0x26949b(0x70f)]));const _0x2a87dd=this[_0x26949b(0x2ed)]?.[_0x26949b(0x3e9)]?.['debug']?.['logRequests']??![],_0x4b460e=async(_0x287439,_0x574908)=>{const _0x6c9eab=_0x26949b,_0x48d6b5=Date[_0x6c9eab(0x4ec)]();if(_0x2a87dd){const _0xc0ad67=_0x287439[_0x6c9eab(0x534)]||'/',_0x335edf=_0x287439['headers']?.[_0x6c9eab(0x62c)]?_0x287439[_0x6c9eab(0x2b0)][_0x6c9eab(0x62c)][_0x6c9eab(0x813)](/^Bearer\s+(\S{0,8})\S*/i,_0x6c9eab(0x30a)):'-',_0x4af072=_0x287439[_0x6c9eab(0x2b0)]?.['cf-ray']||'-',_0x4756da=_0x287439[_0x6c9eab(0x2b0)]?.[_0x6c9eab(0x6ce)]||_0x287439[_0x6c9eab(0x2b0)]?.['x-forwarded-for']||'-',_0x32ea8f=_0x287439[_0x6c9eab(0x2b0)]?.['origin']||'-';process[_0x6c9eab(0x498)][_0x6c9eab(0x82b)]('[req]\x20'+_0x287439[_0x6c9eab(0x225)][_0x6c9eab(0x708)](0x7)+'\x20'+_0xc0ad67[_0x6c9eab(0x708)](0x2d)+'\x20'+('auth='+_0x335edf+_0x6c9eab(0x3b8)+_0x32ea8f+_0x6c9eab(0x425)+_0x4af072+_0x6c9eab(0x848)+_0x4756da+'\x0a'));}try{const _0x158cec=new _0x3ad444(_0x287439[_0x6c9eab(0x534)],_0x6c9eab(0x767)+_0x287439['headers'][_0x6c9eab(0x26b)]),_0x5ba5ba=this[_0x6c9eab(0x7df)](_0x287439[_0x6c9eab(0x225)],_0x158cec['pathname']),_0x2ed254=_0x5ba5ba?.[_0x6c9eab(0x74c)]?.[_0x6c9eab(0x1c3)]===!![];if(_0x2ed254){const _0x5c0d27=_0x287439[_0x6c9eab(0x2b0)]?.[_0x6c9eab(0x735)];if(_0x5c0d27!=null){const _0x37ce9b=Number(_0x5c0d27);if(Number[_0x6c9eab(0x72e)](_0x37ce9b)&&_0x37ce9b>this[_0x6c9eab(0x766)]){_0x574908[_0x6c9eab(0x73b)]=0x19d,_0x574908[_0x6c9eab(0x63d)]('Payload\x20too\x20large');return;}}}const _0x2c20a8=_0x2ed254?null:await _0x1ebf77(_0x287439,this['maxBodyBytes']),_0x1b1ca6=_0x2ed254?_0x4af4e1(_0x287439,this['maxBodyBytes']):undefined,_0x36b6c7=await this[_0x6c9eab(0x88f)](_0x287439[_0x6c9eab(0x225)],_0x158cec['pathname'],{'body':_0x2c20a8,'query':Object[_0x6c9eab(0x324)](_0x158cec[_0x6c9eab(0x24e)][_0x6c9eab(0x87f)]()),'headers':_0x287439[_0x6c9eab(0x2b0)]},{'req':_0x287439,'res':_0x574908,'rawStream':_0x1b1ca6}),_0x130a66=this['_matchRoute'](_0x287439[_0x6c9eab(0x225)],_0x158cec[_0x6c9eab(0x64f)]),_0x4b9777=Date['now']()-_0x48d6b5,_0x17bddf=this['_shouldWrapResponse'](_0x130a66,_0x36b6c7)?this[_0x6c9eab(0x4a4)](_0x36b6c7,_0x4b9777):_0x446926(_0x36b6c7),_0x4cfebc=(_0x17bddf[_0x6c9eab(0x2c4)]||0xc8)>=0x190;this['metrics']['record'](_0x287439[_0x6c9eab(0x225)],_0x4b9777,_0x4cfebc),_0x12011f(_0x574908,_0x17bddf);if(_0x2a87dd){const _0x108800=_0x17bddf[_0x6c9eab(0x2c4)]||0xc8,_0x2dc525=Date[_0x6c9eab(0x4ec)]()-_0x48d6b5;process['stdout']['write'](_0x6c9eab(0x645)+_0x287439['method']['padEnd'](0x7)+'\x20'+_0x158cec['pathname'][_0x6c9eab(0x708)](0x2d)+'\x20'+_0x108800+'\x20\x20'+_0x2dc525+'ms\x0a');}}catch(_0x7d2f66){const _0x470cd7=Date['now']()-_0x48d6b5;this[_0x6c9eab(0x6d8)][_0x6c9eab(0x639)](_0x287439[_0x6c9eab(0x225)],_0x470cd7,!![]);const _0x27b33d=_0x7d2f66?.[_0x6c9eab(0x2c4)]||0x1f4;_0x574908['statusCode']=_0x27b33d,_0x27b33d===0x19d?_0x574908[_0x6c9eab(0x63d)](_0x6c9eab(0x39d)):_0x574908[_0x6c9eab(0x63d)](_0x7d2f66[_0x6c9eab(0x81d)]||_0x6c9eab(0x4d5));}};this[_0x26949b(0x39f)]=_0x3991c0['map'](_0x3e5c64=>{const _0x1e2e23=_0x26949b,_0x1cecff=_0x5e3a3d[_0x1e2e23(0x37a)](_0x4b460e);_0x1cecff['on'](_0x1e2e23(0x1df),_0x16d73d=>{const _0x369d78=_0x1e2e23;this[_0x369d78(0x7c2)][_0x369d78(0x4da)](_0x16d73d),_0x16d73d['on']('close',()=>this['_sockets'][_0x369d78(0x360)](_0x16d73d));});if(_0x3e5c64===undefined)_0x1cecff[_0x1e2e23(0x7a4)](_0x2d582c);else _0x1cecff[_0x1e2e23(0x7a4)](_0x2d582c,_0x3e5c64);return _0x1cecff;}),this[_0x26949b(0x72d)]=this[_0x26949b(0x39f)][0x0];for(const _0x5effac of this[_0x26949b(0x39f)][_0x26949b(0x27f)](0x1))_0x5effac['on'](_0x26949b(0x6cd),_0x1dcc84=>this[_0x26949b(0x72d)]?.[_0x26949b(0x663)](_0x26949b(0x6cd),_0x1dcc84));const _0x1f7dec=_0x14fb60(_0x2d582c,_0x3ee527['host']),_0x48bf7d=this[_0x26949b(0x2ed)];return _0x48bf7d?.['processes']&&(_0x48bf7d['processes'][_0x26949b(0x4af)](_0x1f7dec),require$$1$1['isWorker']?_0x48bf7d['_activateProcessesReader']?.({'kind':_0x26949b(0x3d4)})[_0x26949b(0x39e)](()=>{}):_0x48bf7d[_0x26949b(0x322)]?.({'kind':_0x26949b(0x458),'listenAddr':_0x1f7dec})[_0x26949b(0x39e)](()=>{})),this[_0x26949b(0x72d)];}async[_0x404acb(0x6e0)](_0x5be0d7={}){const _0x90b845=_0x404acb,_0x3a8dbb=this[_0x90b845(0x72d)];this[_0x90b845(0x72d)]=null;const _0x42e8a4=this[_0x90b845(0x39f)][_0x90b845(0x1a1)](_0x3a8dbb)?this[_0x90b845(0x39f)]:_0x3a8dbb?[_0x3a8dbb]:[];this[_0x90b845(0x39f)]=[];if(_0x3a8dbb&&_0x3a8dbb['_isClusterController']){try{await _0x3a8dbb[_0x90b845(0x6e0)]();}catch{}this['metrics']&&this[_0x90b845(0x6d8)][_0x90b845(0x6e0)]();return;}if(_0x42e8a4[_0x90b845(0x6ad)]){const _0x264641=_0x5be0d7['forceAfterMs']===Infinity?Infinity:Number[_0x90b845(0x72e)](_0x5be0d7[_0x90b845(0x71c)])?Math[_0x90b845(0x413)](0x0,_0x5be0d7[_0x90b845(0x71c)]):0x3e8,_0x30fd9d=_0x3907c2=>new Promise(_0x1c308f=>{const _0x21ecc9=_0x90b845;let _0x547f75=![],_0x1222dd=null,_0x21341b=null;const _0x1b256c=()=>{if(_0x547f75)return;_0x547f75=!![];if(_0x1222dd)clearTimeout(_0x1222dd);if(_0x21341b)clearTimeout(_0x21341b);_0x1c308f();};try{_0x3907c2[_0x21ecc9(0x6e0)](_0x1b256c);}catch{_0x1b256c();return;}try{_0x3907c2[_0x21ecc9(0x253)]?.();}catch{}if(_0x1e985f(_0x264641))return;_0x1222dd=setTimeout(()=>{const _0x222486=_0x21ecc9;try{_0x3907c2[_0x222486(0x1f4)]?.();}catch{}for(const _0x311f44 of this[_0x222486(0x7c2)]){try{_0x311f44[_0x222486(0x6e6)]();}catch{}}_0x21341b=setTimeout(_0x1b256c,0x64),_0x21341b[_0x222486(0x895)]?.();},_0x428b58(_0x264641)),_0x1222dd['unref']?.();});await Promise['all'](_0x42e8a4[_0x90b845(0x595)](_0x30fd9d));}this[_0x90b845(0x6d8)]&&this[_0x90b845(0x6d8)][_0x90b845(0x6e0)]();}[_0x404acb(0x7b1)](_0x1443f2,_0x21f5de,_0x30e0cc=0x36ee80){const _0x37cc46=_0x404acb,_0x7ae0ec=Date[_0x37cc46(0x4ec)](),_0x457f45=Buffer['from'](JSON[_0x37cc46(0x2d1)]({'iat':_0x7ae0ec,'exp':_0x7ae0ec+_0x30e0cc,..._0x1443f2}))[_0x37cc46(0x4b9)](_0x37cc46(0x76d)),_0x73b816=_0x554977(_0x457f45,_0x21f5de);return _0x457f45+'.'+_0x73b816;}[_0x404acb(0x3fd)](_0x23d01e,_0x464c87={}){const _0x5cd42a=_0x404acb,{httpOnly:httpOnly=!![],sameSite:sameSite=_0x5cd42a(0x854),path:path='/',secure:secure=![],maxAge:maxAge=null,expires:expires=null}=_0x464c87;let _0x3156f7=this[_0x5cd42a(0x716)][_0x5cd42a(0x70f)]+'='+_0x23d01e;if(httpOnly)_0x3156f7+=';\x20HttpOnly';if(sameSite)_0x3156f7+=_0x5cd42a(0x3ca)+sameSite;if(path)_0x3156f7+=_0x5cd42a(0x6bf)+path;if(secure)_0x3156f7+=_0x5cd42a(0x851);if(Number[_0x5cd42a(0x72e)](maxAge))_0x3156f7+=_0x5cd42a(0x784)+Math['max'](0x0,Math[_0x5cd42a(0x2d7)](maxAge));if(expires instanceof Date)_0x3156f7+=_0x5cd42a(0x8bd)+expires[_0x5cd42a(0x3da)]();return _0x3156f7;}[_0x404acb(0x420)](_0x589b18=this['auth'][_0x404acb(0x70f)],_0x4af202={}){const _0x3aa103=_0x404acb,{path:path='/',sameSite:sameSite='Lax',secure:secure=![],httpOnly:httpOnly=!![]}=_0x4af202;let _0xf9090d=_0x589b18+'=';if(httpOnly)_0xf9090d+=';\x20HttpOnly';if(sameSite)_0xf9090d+=_0x3aa103(0x3ca)+sameSite;if(path)_0xf9090d+=';\x20Path='+path;if(secure)_0xf9090d+=_0x3aa103(0x851);return _0xf9090d+=_0x3aa103(0x64d),_0xf9090d;}[_0x404acb(0x3d1)](_0x2998b2,_0xebc858){const _0x15455a=_0x404acb;if(!_0x2998b2)return null;const [_0x42cfb8,_0x1c0814]=String(_0x2998b2)['split']('.');if(!_0x42cfb8||!_0x1c0814)return null;const _0x2003b1=_0x554977(_0x42cfb8,_0xebc858);if(!_0x43084e(_0x1c0814,_0x2003b1))return null;try{const _0x189943=JSON['parse'](Buffer[_0x15455a(0x215)](_0x42cfb8,'base64url')[_0x15455a(0x4b9)]());if(_0x189943[_0x15455a(0x227)]<=Date[_0x15455a(0x4ec)]())return null;return _0x189943;}catch{return null;}}[_0x404acb(0x66d)](_0x144fab){const _0x13c368=_0x404acb;if(this[_0x13c368(0x2ed)]?.['auth'])return this[_0x13c368(0x2ed)][_0x13c368(0x716)][_0x13c368(0x66d)](_0x144fab);return _0x10be7f(_0x144fab);}[_0x404acb(0x5ed)](_0x3f0765){const _0x34ac4a=_0x404acb;if(this[_0x34ac4a(0x2ed)]?.['auth'])return this[_0x34ac4a(0x2ed)][_0x34ac4a(0x716)][_0x34ac4a(0x5ed)](_0x3f0765);const _0x12a337=this[_0x34ac4a(0x228)]?.['tokenTtl']??0x36ee80,_0x150ac7=this['_authOptions']?.[_0x34ac4a(0x5dc)];return _0x21d830(_0x3f0765,_0x150ac7,_0x12a337);}[_0x404acb(0x4b5)](_0x5d21b9){const _0x31359f=_0x404acb;if(this[_0x31359f(0x2ed)]?.[_0x31359f(0x716)])return this[_0x31359f(0x2ed)][_0x31359f(0x716)][_0x31359f(0x4b5)](_0x5d21b9);const _0x30d6b0=this[_0x31359f(0x228)]?.[_0x31359f(0x5dc)];return _0x401c61(_0x5d21b9,_0x30d6b0);}async['authenticateRequest'](_0x51503d){const _0x3d4f=_0x404acb;if(this[_0x3d4f(0x2ed)]?.['auth'])return this[_0x3d4f(0x2ed)][_0x3d4f(0x716)][_0x3d4f(0x6ac)](_0x51503d);if(_0x51503d[_0x3d4f(0x28e)]?.[_0x3d4f(0x558)]===!![]||this[_0x3d4f(0x87d)]===_0x3d4f(0x5f0))return{'id':_0x3d4f(0x7f0),'username':_0x3d4f(0x7f0),'roles':[_0x3d4f(0x1bb)],'isAuthenticated':!![],'isSystem':!![],'user':{'id':'system','username':_0x3d4f(0x7f0),'roles':['admin'],'isAuthenticated':!![],'isSystem':!![]}};const _0x3d7c5e=this[_0x3d4f(0x66d)](_0x51503d[_0x3d4f(0x2b0)]?.[_0x3d4f(0x62c)]),_0x2c2817=_0x51503d[_0x3d4f(0x4f4)]?.[this[_0x3d4f(0x716)]['cookieName']],_0x355de4=_0x3d7c5e||_0x2c2817;if(!_0x355de4)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x298c50=this[_0x3d4f(0x4b5)](_0x355de4);if(!_0x298c50)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x5ec1d4={'id':_0x298c50[_0x3d4f(0x6f3)]??null,'username':_0x298c50['username']??null,'roles':Array[_0x3d4f(0x59b)](_0x298c50['roles'])?_0x298c50[_0x3d4f(0x615)]:[],'isAuthenticated':!![],'isSystem':![]};return{'id':_0x5ec1d4['id'],'username':_0x5ec1d4[_0x3d4f(0x479)],'roles':_0x5ec1d4[_0x3d4f(0x615)],'isAuthenticated':!![],'isSystem':![],'user':_0x5ec1d4,'claims':_0x298c50,'subject':_0x5ec1d4['id']};}async[_0x404acb(0x200)](_0x2be2d0,_0x54d0bc={}){const _0x132fe3=_0x404acb,_0x178b99=_0x512421(_0x2be2d0),_0x28b0f4=Array[_0x132fe3(0x59b)](_0x54d0bc['allowedAlgs'])&&_0x54d0bc[_0x132fe3(0x5ec)][_0x132fe3(0x6ad)]>0x0?_0x54d0bc['allowedAlgs']:[_0x132fe3(0x3f0),_0x132fe3(0x8c9)],_0xa8c6e8=_0x178b99['header']?.[_0x132fe3(0x2c7)];if(!_0x28b0f4['includes'](_0xa8c6e8))throw new Error('Unsupported\x20JWT\x20alg:\x20'+_0xa8c6e8);if(!_0x178b99[_0x132fe3(0x364)]?.[_0x132fe3(0x5a5)])throw new Error(_0x132fe3(0x4d2));const _0x9abea2=await this[_0x132fe3(0x467)](_0x54d0bc);if(!_0x9abea2?.['jwks_uri'])throw new Error(_0x132fe3(0x521));const _0x383a85=await this[_0x132fe3(0x387)](_0x9abea2[_0x132fe3(0x495)],_0x178b99[_0x132fe3(0x364)][_0x132fe3(0x5a5)],_0x54d0bc);if(!_0x855de5(_0xa8c6e8,_0x383a85,_0x178b99['signingInput'],_0x178b99[_0x132fe3(0x899)]))throw new Error('JWT\x20signature\x20verification\x20failed');const _0x58aa4c=Math[_0x132fe3(0x2d7)](Date[_0x132fe3(0x4ec)]()/0x3e8),_0x41b4d1=_0x178b99[_0x132fe3(0x610)]||{};if(_0x41b4d1[_0x132fe3(0x490)]!==_0x9abea2['issuer'])throw new Error(_0x132fe3(0x264));const _0x245a81=_0x54d0bc['audience'];if(_0x245a81){const _0x31196f=_0xce76c9(_0x41b4d1[_0x132fe3(0x40d)]);if(!_0x31196f[_0x132fe3(0x1a1)](_0x245a81))throw new Error(_0x132fe3(0x5d5));}if(typeof _0x41b4d1[_0x132fe3(0x227)]!==_0x132fe3(0x72c)||_0x41b4d1[_0x132fe3(0x227)]<=_0x58aa4c)throw new Error(_0x132fe3(0x474));if(_0x41b4d1[_0x132fe3(0x470)]!=null&&_0x41b4d1[_0x132fe3(0x470)]>_0x58aa4c)throw new Error(_0x132fe3(0x672));if(_0x41b4d1[_0x132fe3(0x582)]==='id')throw new Error(_0x132fe3(0x6f2));return{'subject':_0x41b4d1[_0x132fe3(0x6f3)]??null,'email':_0x41b4d1['email']??null,'scopes':typeof _0x41b4d1[_0x132fe3(0x1e9)]===_0x132fe3(0x1d2)?_0x41b4d1[_0x132fe3(0x1e9)][_0x132fe3(0x84e)](/\s+/)[_0x132fe3(0x542)](Boolean):[],'claims':_0x41b4d1,'tokenType':_0x132fe3(0x6cc)};}async[_0x404acb(0x467)](_0x266baf={}){const _0x16cf98=_0x404acb,_0x1e6245=String(_0x266baf['issuer']||'')[_0x16cf98(0x813)](/\/+$/,'');if(!_0x1e6245)return null;const _0x135138=Number[_0x16cf98(0x72e)](_0x266baf[_0x16cf98(0x4fc)])?_0x266baf[_0x16cf98(0x4fc)]:0xa*0x3c*0x3e8;if(this[_0x16cf98(0x66c)]?.['issuer']===_0x1e6245&&this[_0x16cf98(0x66c)][_0x16cf98(0x282)]>Date[_0x16cf98(0x4ec)]())return this['_oidcDiscoveryCache'][_0x16cf98(0x352)];const _0x5b3762=await _0x1bd512(_0x1e6245+'/.well-known/openid-configuration'),_0x205014={'issuer':_0x5b3762[_0x16cf98(0x6db)]||_0x1e6245,'authorization_endpoint':_0x266baf[_0x16cf98(0x245)]||_0x5b3762['authorization_endpoint'],'token_endpoint':_0x266baf['tokenUrl']||_0x5b3762[_0x16cf98(0x214)],'jwks_uri':_0x266baf[_0x16cf98(0x7de)]||_0x5b3762[_0x16cf98(0x495)]};return this[_0x16cf98(0x66c)]={'issuer':_0x1e6245,'value':_0x205014,'expiresAt':Date[_0x16cf98(0x4ec)]()+_0x135138},_0x205014;}async['_fetchJwks'](_0xfd0db,_0x590197=0x5*0x3c*0x3e8){const _0x59428b=_0x404acb,_0x274c1f=await _0x1bd512(_0xfd0db),_0x2d2728=new Map();for(const _0x46a7fb of _0x274c1f[_0x59428b(0x818)]||[]){if(!_0x46a7fb?.[_0x59428b(0x5a5)])continue;_0x2d2728[_0x59428b(0x259)](_0x46a7fb['kid'],_0x3b1d97(_0x46a7fb));}return this[_0x59428b(0x24c)]={'uri':_0xfd0db,'keys':_0x2d2728,'expiresAt':Date[_0x59428b(0x4ec)]()+_0x590197},this['_jwksCache'];}async['_getJwkKey'](_0x4c7f73,_0x1335c6,_0x8e1cdc={}){const _0x544a88=_0x404acb,_0x2a3afd=Number[_0x544a88(0x72e)](_0x8e1cdc[_0x544a88(0x667)])?_0x8e1cdc['jwksTtlMs']:0x5*0x3c*0x3e8,_0x5615a4=0x1e*0x3e8,_0xd804f7=this[_0x544a88(0x8a5)][_0x544a88(0x2fa)](_0x1335c6);if(_0xd804f7!==undefined&&_0xd804f7>Date['now']())throw new Error(_0x544a88(0x5d3)+_0x1335c6);(!this[_0x544a88(0x24c)]||this['_jwksCache']['uri']!==_0x4c7f73||this[_0x544a88(0x24c)]['expiresAt']<=Date[_0x544a88(0x4ec)]())&&await this[_0x544a88(0x5ac)](_0x4c7f73,_0x2a3afd);let _0xc2f158=this[_0x544a88(0x24c)]?.[_0x544a88(0x818)]?.[_0x544a88(0x2fa)](_0x1335c6);if(_0xc2f158)return _0xc2f158;await this[_0x544a88(0x5ac)](_0x4c7f73,_0x2a3afd),_0xc2f158=this['_jwksCache']?.[_0x544a88(0x818)]?.[_0x544a88(0x2fa)](_0x1335c6);if(!_0xc2f158){this[_0x544a88(0x8a5)][_0x544a88(0x259)](_0x1335c6,Date[_0x544a88(0x4ec)]()+_0x5615a4);throw new Error(_0x544a88(0x5d3)+_0x1335c6);}return _0xc2f158;}[_0x404acb(0x79d)](_0xfa6e7d){const _0x5d8b53=_0x404acb;if(this[_0x5d8b53(0x2ed)]?.[_0x5d8b53(0x716)])return this[_0x5d8b53(0x2ed)][_0x5d8b53(0x716)][_0x5d8b53(0x79d)](_0xfa6e7d);const _0x4ffef6=_0xfa6e7d?.['claims']||{},_0x25324c={'sub':_0xfa6e7d?.[_0x5d8b53(0x4e0)]??_0x4ffef6[_0x5d8b53(0x6f3)]??null,'email':_0xfa6e7d?.['email']??_0x4ffef6[_0x5d8b53(0x5a7)]??null,'name':_0xfa6e7d?.[_0x5d8b53(0x4f9)]??_0x4ffef6[_0x5d8b53(0x4f9)]??_0x4ffef6[_0x5d8b53(0x38f)]??null,'groups':_0xfa6e7d?.[_0x5d8b53(0x3e2)]??_0x4ffef6[_0x5d8b53(0x3e2)]??[],'roles':_0xfa6e7d?.['roles']??_0x4ffef6['roles']??[]};return{'type':_0x5d8b53(0x725),'tokenType':_0xfa6e7d?.['tokenType']??_0x5d8b53(0x6cc),'subject':_0x25324c[_0x5d8b53(0x6f3)],'email':_0x25324c[_0x5d8b53(0x5a7)],'scopes':_0xfa6e7d?.[_0x5d8b53(0x2a7)]??_0x4ffef6[_0x5d8b53(0x1e9)]?.['split']?.('\x20')?.[_0x5d8b53(0x542)](Boolean)??[],'claims':_0x4ffef6,'user':_0x25324c,'isAuthenticated':!![]};}[_0x404acb(0x43b)](_0x5150a0={},_0x2676f7=0x927c0){const _0x157d0a=_0x404acb;if(this[_0x157d0a(0x2ed)]?.['auth'])return this[_0x157d0a(0x2ed)][_0x157d0a(0x716)]['createLoginState'](_0x5150a0,_0x2676f7);const _0x19cd72=_0x52e40e(0x18);this['_loginStates'][_0x157d0a(0x259)](_0x19cd72,{..._0x5150a0,'exp':Date[_0x157d0a(0x4ec)]()+_0x2676f7});if(this[_0x157d0a(0x548)]['size']%0x32===0x0){const _0x1bf8b3=Date[_0x157d0a(0x4ec)]();for(const [_0x53a1a3,_0x360de7]of this['_loginStates']){if(_0x360de7[_0x157d0a(0x227)]<=_0x1bf8b3)this[_0x157d0a(0x548)]['delete'](_0x53a1a3);}}return _0x19cd72;}[_0x404acb(0x853)](_0x5dc212){const _0x919b0=_0x404acb;if(this[_0x919b0(0x2ed)]?.[_0x919b0(0x716)])return this[_0x919b0(0x2ed)]['auth'][_0x919b0(0x853)](_0x5dc212);if(!_0x5dc212)return null;const _0x1e3f4d=this[_0x919b0(0x548)][_0x919b0(0x2fa)](_0x5dc212);this[_0x919b0(0x548)][_0x919b0(0x360)](_0x5dc212);if(!_0x1e3f4d)return null;if(_0x1e3f4d[_0x919b0(0x227)]<=Date[_0x919b0(0x4ec)]())return null;return _0x1e3f4d;}}function _0x446926(_0x1bb50a){const _0x1d8145=_0x404acb;if(_0x1bb50a==null)return{'status':0xcc};if(Buffer[_0x1d8145(0x1a0)](_0x1bb50a)||_0x4efe79(_0x1bb50a))return{'status':0xc8,'body':_0x1bb50a};if(typeof _0x1bb50a===_0x1d8145(0x601)&&'status'in _0x1bb50a){if(!(_0x1d8145(0x246)in _0x1bb50a)&&!_0x4efe79(_0x1bb50a[_0x1d8145(0x246)])){const {status:_0x5515de,headers:_0x5527d3,..._0x2ed8a8}=_0x1bb50a;if(Object['keys'](_0x2ed8a8)[_0x1d8145(0x6ad)]>0x0)return{'status':_0x5515de,'headers':_0x5527d3,'body':_0x2ed8a8};}return _0x1bb50a;}return{'status':0xc8,'body':_0x1bb50a};}function _0x4efe79(_0x21cd7c){const _0x249970=_0x404acb;return _0x21cd7c&&typeof _0x21cd7c[_0x249970(0x218)]===_0x249970(0x7ca);}function _0x4af4e1(_0x3c8fbc,_0x46cd6d){const _0x22bfe1=_0x404acb,{PassThrough:_0x4d1520}=require$$5;let _0x54e213=0x0,_0x5ebdcc=![];const _0x5b966b=new _0x4d1520();return _0x3c8fbc['on'](_0x22bfe1(0x2a3),_0x58c6ac=>{const _0x52734f=_0x22bfe1;if(_0x5ebdcc)return;_0x54e213+=_0x58c6ac[_0x52734f(0x6ad)];if(_0x54e213>_0x46cd6d){_0x5ebdcc=!![];const _0x110afb=new Error(_0x52734f(0x39d));_0x110afb[_0x52734f(0x2c4)]=0x19d,_0x5b966b[_0x52734f(0x6e6)](_0x110afb);return;}if(!_0x5b966b['destroyed'])_0x5b966b[_0x52734f(0x557)](_0x58c6ac);}),_0x3c8fbc['on'](_0x22bfe1(0x63d),()=>{const _0x4d311b=_0x22bfe1;!_0x5ebdcc&&!_0x5b966b[_0x4d311b(0x733)]&&(_0x5ebdcc=!![],_0x5b966b['end']());}),_0x3c8fbc['on'](_0x22bfe1(0x6cd),_0x2661c2=>{const _0x17b16f=_0x22bfe1;if(!_0x5b966b[_0x17b16f(0x733)])_0x5b966b[_0x17b16f(0x6e6)](_0x2661c2);}),_0x3c8fbc[_0x22bfe1(0x501)](),_0x5b966b['on'](_0x22bfe1(0x85b),()=>{const _0x49ef29=_0x22bfe1;if(!_0x5b966b[_0x49ef29(0x733)])_0x3c8fbc[_0x49ef29(0x85b)]();}),_0x5b966b;}function _0x1ebf77(_0x566506,_0x30393f){const _0x1cf530=_0x404acb;if(_0x566506[_0x1cf530(0x225)]===_0x1cf530(0x318)||_0x566506['method']===_0x1cf530(0x8b6))return null;const _0x2fa783=_0x566506['headers']?.[_0x1cf530(0x735)];if(_0x2fa783!=null){const _0x25ca4f=Number(_0x2fa783);if(Number['isFinite'](_0x25ca4f)&&_0x25ca4f>_0x30393f){const _0x79beb8=new Error(_0x1cf530(0x39d));_0x79beb8['status']=0x19d;throw _0x79beb8;}}return new Promise((_0x400622,_0x204ab3)=>{let _0x238132='',_0xe5b3ab=0x0;_0x566506['on']('data',_0x3a21b9=>{const _0x5691f2=_0x4c4a;_0xe5b3ab+=_0x3a21b9[_0x5691f2(0x6ad)];if(_0xe5b3ab>_0x30393f){try{_0x566506[_0x5691f2(0x6e6)]();}catch{}const _0x595fe3=new Error(_0x5691f2(0x39d));_0x595fe3[_0x5691f2(0x2c4)]=0x19d,_0x204ab3(_0x595fe3);return;}_0x238132+=_0x3a21b9;}),_0x566506['on']('end',()=>{const _0xf7b885=_0x4c4a;if(!_0x238132)return _0x400622(null);const _0x2bb9b2=_0x566506['headers']?.[_0xf7b885(0x52a)]||'';if(_0x2bb9b2['includes'](_0xf7b885(0x43f))){const _0x690e8={};for(const [_0x37ab0b,_0x2708fc]of new URLSearchParams(_0x238132))_0x690e8[_0x37ab0b]=_0x2708fc;return _0x400622(_0x690e8);}try{_0x400622(JSON[_0xf7b885(0x7d3)](_0x238132));}catch(_0x4b9602){_0x204ab3(_0x4b9602);}}),_0x566506['on']('error',_0x204ab3);});}function _0x12011f(_0x5234ee,_0x12cec5){const _0x5cc11b=_0x404acb,{status:status=0xc8,headers:headers={},body:_0x4d2b37}=_0x12cec5;_0x5234ee[_0x5cc11b(0x73b)]=status;for(const [_0x1ce74b,_0x49ae9c]of Object[_0x5cc11b(0x87f)](headers)){_0x5234ee[_0x5cc11b(0x559)](_0x1ce74b,_0x49ae9c);}if(_0x4d2b37==null){_0x5234ee[_0x5cc11b(0x63d)]();return;}if(_0x4efe79(_0x4d2b37)){_0x4d2b37[_0x5cc11b(0x218)](_0x5234ee);return;}if(Buffer[_0x5cc11b(0x1a0)](_0x4d2b37)){_0x5234ee[_0x5cc11b(0x63d)](_0x4d2b37);return;}if(typeof _0x4d2b37==='object'){!_0x5234ee[_0x5cc11b(0x323)](_0x5cc11b(0x886))&&_0x5234ee['setHeader']('Content-Type','application/json');_0x5234ee['end'](JSON['stringify'](_0x4d2b37));return;}_0x5234ee[_0x5cc11b(0x63d)](String(_0x4d2b37));}function _0x14fb60(_0x3f97ef,_0x18377e){const _0x14cdb2=_0x404acb;if(_0x18377e==null)return':'+_0x3f97ef;return[][_0x14cdb2(0x7fe)](_0x18377e)['map'](_0x3ea151=>(_0x3ea151[_0x14cdb2(0x1a1)](':')?'['+_0x3ea151+']':_0x3ea151)+':'+_0x3f97ef)[_0x14cdb2(0x1c9)](',\x20');}return okdbHttp[_0x404acb(0x7ac)]=_0x1d4309,okdbHttp[_0x404acb(0x7ac)]['formatListenAddr']=_0x14fb60,okdbHttp[_0x404acb(0x7ac)][_0x404acb(0x54b)]=_0x460813,okdbHttp[_0x404acb(0x7ac)];}var okdbShmSegment,hasRequiredOkdbShmSegment;function requireOkdbShmSegment(){const _0xe0eedf=_0x1a2e0d;if(hasRequiredOkdbShmSegment)return okdbShmSegment;hasRequiredOkdbShmSegment=0x1;const _0x345cfd=require$$0$1,_0x168686=require$$2$1,_0x4696f4=0x80,_0x289c8f=0x0,_0x1ba207=0x1,_0x1dec8c=0x2,_0xca2d4f=0x3,_0x23bdda=0x4,_0x2cee61=_0x23bdda+_0x4696f4,_0x34c6cc=_0x2cee61+_0x4696f4,_0x3d2219=require$$2$2[_0xe0eedf(0x646)],_0x230655=_0x34c6cc*0x4,_0x346b0b=process[_0xe0eedf(0x202)]!==_0xe0eedf(0x723),_0x1a899b=0xc,_0x17066c=process[_0xe0eedf(0x202)]==='darwin'?0x1f:0xa0,_0x2e598e=/^[A-Za-z0-9-]+(?:_boot)?$/,_0x48980f=/^[A-Za-z0-9-]*-[0-9a-f]{12}(?:_boot)?$/,_0x3c77d4=_0x3c7a5c=>_0x3c7a5c[_0xe0eedf(0x813)](/[^a-zA-Z0-9]/g,'-');function _0x2ae123(_0x476b71,_0x2e9148=''){const _0x2acac7=_0xe0eedf;if(typeof _0x476b71!==_0x2acac7(0x1d2)||_0x476b71==='')throw new TypeError(_0x2acac7(0x7fc));if(_0x2e9148!==''&&!/^_[A-Za-z0-9]+$/[_0x2acac7(0x3f6)](_0x2e9148))throw new TypeError(_0x2acac7(0x28b)+JSON[_0x2acac7(0x2d1)](_0x2e9148)+')');const _0x2b46fd=_0x168686[_0x2acac7(0x3b9)]('sha256')[_0x2acac7(0x56e)](_0x476b71)[_0x2acac7(0x656)](_0x2acac7(0x6b1))[_0x2acac7(0x27f)](0x0,_0x1a899b),_0x829a15=Math[_0x2acac7(0x413)](0x0,_0x17066c-0x1-_0x1a899b-_0x2e9148[_0x2acac7(0x6ad)]);return _0x3c77d4(_0x476b71)['slice'](0x0,_0x829a15)+'-'+_0x2b46fd+_0x2e9148;}function _0x1b6c64(_0x5b3d0a,_0x437d0f=''){return''+_0x3c77d4(_0x5b3d0a)+_0x437d0f;}function _0x347ea7(_0x48a8e0){const _0xaf5613=_0xe0eedf;if(_0x48980f['test'](_0x48a8e0))return _0xaf5613(0x359);if(_0x2e598e['test'](_0x48a8e0))return _0xaf5613(0x789);return null;}const _0x586405={'onMapped':null,'onClaimed':null,'onRetiring':null},_0xf9e57d=_0xef1733=>Math['ceil'](_0xef1733/0x8)*0x8,_0x6321ff=_0x58e9ee=>_0xf9e57d(_0x58e9ee)+_0x230655;function _0x4814f2(_0x1dca0f){const _0x49301f=_0xe0eedf;try{return process[_0x49301f(0x486)](_0x1dca0f,0x0),![];}catch(_0x1cac17){return _0x1cac17[_0x49301f(0x2dc)]===_0x49301f(0x55c);}}const _0x2264ac=new Int32Array(new SharedArrayBuffer(0x4));function _0xb4e2c4(_0x560a6d){const _0xe19991=_0xe0eedf;if(_0x560a6d>0x0)Atomics[_0xe19991(0x79e)](_0x2264ac,0x0,0x0,_0x560a6d);}function _0x47bafa(_0x4e13aa,_0x2df505){const _0x1a2bbe=_0xe0eedf;if(process[_0x1a2bbe(0x202)]!==_0x1a2bbe(0x674))return;let _0x432034;try{_0x432034=_0x345cfd[_0x1a2bbe(0x849)](_0x1a2bbe(0x632)+_0x4e13aa,'r+');if(_0x345cfd[_0x1a2bbe(0x824)](_0x432034)['size']<_0x2df505)_0x345cfd[_0x1a2bbe(0x7e9)](_0x432034,_0x2df505);}catch{}finally{if(_0x432034!==undefined)try{_0x345cfd[_0x1a2bbe(0x57d)](_0x432034);}catch{}}}function _0x51e289(_0x1213c4,_0x47d735){const _0x265277=_0xe0eedf,_0x270363=require$$3$2;for(let _0x1bee36=0x0;;_0x1bee36++){try{return _0x270363[_0x265277(0x5f0)](_0x1213c4,_0x47d735);}catch(_0x707249){if(_0x1bee36>=0x3e8||!/No such file or directory/['test'](_0x707249?.[_0x265277(0x81d)]??''))throw _0x707249;}}}function _0x351b29(_0x51fdf3,_0x65e467){const _0x4c464c=_0xe0eedf,_0x5a46e6=_0x6321ff(_0x65e467),_0x4ba1ab=_0x51e289(_0x51fdf3,_0x5a46e6);_0x47bafa(_0x51fdf3,_0x5a46e6);if(_0x4ba1ab[_0x4c464c(0x24f)]<_0x5a46e6)throw new Error(_0x4c464c(0x79f)+_0x51fdf3+_0x4c464c(0x7ea)+_0x4ba1ab[_0x4c464c(0x24f)]+_0x4c464c(0x664)+_0x5a46e6+_0x4c464c(0x739));return{'sab':_0x4ba1ab,'hdr':new Int32Array(_0x4ba1ab,_0xf9e57d(_0x65e467),_0x34c6cc)};}function _0xda8861(_0x38c428){const _0x552d81=_0xe0eedf;try{require('shmbuf')[_0x552d81(0x6e0)](_0x38c428);}catch{}}function _0x523a9c(_0x12fa52){const _0x233510=_0xe0eedf;try{require(_0x233510(0x325))[_0x233510(0x33f)](_0x12fa52);}catch{}}function _0x5d6424(_0x4e6150){const _0x114c29=_0xe0eedf;if(Atomics[_0x114c29(0x566)](_0x4e6150,_0x1dec8c)!==0x0&&Atomics[_0x114c29(0x566)](_0x4e6150,_0xca2d4f)!==0x0)return;const _0x2fea7c=_0x168686[_0x114c29(0x41a)](0x8),_0x28bf72=_0x2fea7c[_0x114c29(0x436)](0x0)||0x1,_0x1ea33d=_0x2fea7c[_0x114c29(0x436)](0x4)||0x1;Atomics['compareExchange'](_0x4e6150,_0x1dec8c,0x0,_0x28bf72),Atomics['compareExchange'](_0x4e6150,_0xca2d4f,0x0,_0x1ea33d);}function _0x5ab210(_0x4d74f9){const _0x2c1854=_0xe0eedf,_0x22180e=process['pid'];for(let _0x39a272=0x0;_0x39a272<_0x4696f4;_0x39a272++){const _0x5c303f=Atomics[_0x2c1854(0x566)](_0x4d74f9,_0x23bdda+_0x39a272);if(_0x5c303f===0x0||_0x5c303f===_0x22180e)continue;if(!_0x4814f2(_0x5c303f))continue;Atomics['store'](_0x4d74f9,_0x2cee61+_0x39a272,0x0),Atomics['compareExchange'](_0x4d74f9,_0x23bdda+_0x39a272,_0x5c303f,0x0);}}function _0x5a15f5(_0x3414af){const _0x595bcc=_0xe0eedf;if(Atomics['load'](_0x3414af,_0x1ba207)!==0x0)return!![];for(let _0x22f6cf=0x0;_0x22f6cf<_0x4696f4;_0x22f6cf++)if(Atomics[_0x595bcc(0x566)](_0x3414af,_0x23bdda+_0x22f6cf)!==0x0)return!![];return![];}function _0x500fe7(_0x3c244e){const _0x17be5f=_0xe0eedf,_0x53cd70=process['pid'];for(let _0x540f81=0x0;_0x540f81<0x2;_0x540f81++){for(let _0x332b83=0x0;_0x332b83<_0x4696f4;_0x332b83++){if(Atomics[_0x17be5f(0x36f)](_0x3c244e,_0x23bdda+_0x332b83,0x0,_0x53cd70)===0x0)return Atomics[_0x17be5f(0x34d)](_0x3c244e,_0x2cee61+_0x332b83,_0x3d2219),_0x332b83;}_0x5ab210(_0x3c244e);}return Atomics['add'](_0x3c244e,_0x1ba207,0x1),-0x1;}function _0x45373d(_0x3732cd,_0x109083){const _0x481aee=_0xe0eedf;if(_0x109083>=0x0)Atomics[_0x481aee(0x34d)](_0x3732cd,_0x2cee61+_0x109083,0x0),Atomics['compareExchange'](_0x3732cd,_0x23bdda+_0x109083,process[_0x481aee(0x5c3)],0x0);else Atomics[_0x481aee(0x6f3)](_0x3732cd,_0x1ba207,0x1);}function _0x49289e(_0x564844,_0x57ee1a,_0x5bc475,_0x34034b){const _0x380ac0=_0xe0eedf,_0xbe3f1b=process[_0x380ac0(0x5c3)];if(Atomics[_0x380ac0(0x36f)](_0x5bc475,_0x289c8f,_0x34034b,_0xbe3f1b)!==_0x34034b)return _0x380ac0(0x75e);const _0x27842a=Atomics[_0x380ac0(0x566)](_0x5bc475,_0x1dec8c),_0x35a5a7=Atomics[_0x380ac0(0x566)](_0x5bc475,_0xca2d4f);let _0x49c8cf;try{_0x49c8cf=_0x351b29(_0x564844,_0x57ee1a)[_0x380ac0(0x780)];}catch{return'orphan';}if(Atomics['load'](_0x49c8cf,_0x1dec8c)!==_0x27842a||Atomics[_0x380ac0(0x566)](_0x49c8cf,_0xca2d4f)!==_0x35a5a7)return _0x380ac0(0x32b);_0x5ab210(_0x5bc475);if(_0x5a15f5(_0x5bc475))return Atomics[_0x380ac0(0x36f)](_0x5bc475,_0x289c8f,_0xbe3f1b,0x0),'revived';return _0x523a9c(_0x564844),_0x380ac0(0x3a3);}function _0x233a13(_0x23e5eb,_0x1dc2d6,{timeoutMs:_0x240fe5}={}){const _0x43f8f0=_0xe0eedf;_0x240fe5=_0x240fe5??(Number(process.env.OKDB_SHM_ATTACH_TIMEOUT_MS)||0x7530);const _0x5336fe=process[_0x43f8f0(0x5c3)],_0x5dae6c=Date['now']()+_0x240fe5;for(let _0x4f6a2f=0x0;;_0x4f6a2f++){const {sab:_0x13931f,hdr:_0x47e1b3}=_0x351b29(_0x23e5eb,_0x1dc2d6);_0x586405['onMapped']?.(_0x23e5eb,_0x4f6a2f),_0x5d6424(_0x47e1b3);const _0x5334d7=_0x500fe7(_0x47e1b3);_0x586405['onClaimed']?.(_0x23e5eb,_0x4f6a2f);const _0x21df55=Atomics[_0x43f8f0(0x566)](_0x47e1b3,_0x289c8f);if(_0x21df55===0x0||!_0x346b0b){if(_0x4f6a2f===0x0)_0x5ab210(_0x47e1b3);return{'sab':_0x13931f,'hdr':_0x47e1b3,'slot':_0x5334d7};}_0x45373d(_0x47e1b3,_0x5334d7);if(_0x21df55!==_0x5336fe&&_0x4814f2(_0x21df55))_0x49289e(_0x23e5eb,_0x1dc2d6,_0x47e1b3,_0x21df55);_0xda8861(_0x23e5eb);if(Date[_0x43f8f0(0x4ec)]()>_0x5dae6c){const {OKDBError:_0x4c2ee1}=requireOkdbError();throw new _0x4c2ee1(_0x43f8f0(0x373)+_0x23e5eb+'\x22\x20has\x20been\x20retiring\x20for\x20'+_0x240fe5+_0x43f8f0(0x80b)+_0x21df55+_0x43f8f0(0x59c)+_0x43f8f0(0x473),'SHM_SEGMENT_RETIRING');}_0xb4e2c4(_0x4f6a2f<0x14?0x0:0x1);}}function _0x371f59(_0x17874e,_0x53382b,_0x5a2a55,_0x773b4e){const _0x36a818=_0xe0eedf,{hdr:_0x317c23,slot:_0x22d417}=_0x5a2a55;if(_0x22d417!==null)_0x45373d(_0x317c23,_0x22d417);let _0x4cea74=![];try{if(!_0x346b0b)return![];const _0x38165e=process[_0x36a818(0x5c3)];_0x5ab210(_0x317c23);if(_0x5a15f5(_0x317c23)||_0x773b4e?.(_0x5a2a55[_0x36a818(0x567)]))return![];if(Atomics[_0x36a818(0x36f)](_0x317c23,_0x289c8f,0x0,_0x38165e)!==0x0)return![];let _0x4023af=!![];try{_0x586405[_0x36a818(0x1e1)]?.(_0x17874e),!_0x5a15f5(_0x317c23)&&!_0x773b4e?.(_0x5a2a55[_0x36a818(0x567)])&&(_0x4023af=![],_0x523a9c(_0x17874e),_0x4cea74=!![]);}finally{if(_0x4023af)Atomics[_0x36a818(0x36f)](_0x317c23,_0x289c8f,_0x38165e,0x0);}return _0x4cea74;}finally{_0xda8861(_0x17874e);}}function _0x2e52f6(_0x36de6d,_0x2a59ba,{isBusy:_0x63daa2}={}){const _0x322f9e=_0xe0eedf,_0x528831=process[_0x322f9e(0x5c3)],{sab:_0x1884ba,hdr:_0x1937e1}=_0x351b29(_0x36de6d,_0x2a59ba);try{_0x5ab210(_0x1937e1);const _0x51657b=Atomics[_0x322f9e(0x566)](_0x1937e1,_0x289c8f);if(_0x51657b!==0x0){if(_0x51657b===_0x528831||!_0x4814f2(_0x51657b))return _0x322f9e(0x4ab);return _0x49289e(_0x36de6d,_0x2a59ba,_0x1937e1,_0x51657b);}if(_0x5a15f5(_0x1937e1))return _0x322f9e(0x546);if(_0x63daa2?.(_0x1884ba))return'busy';if(Atomics['compareExchange'](_0x1937e1,_0x289c8f,0x0,_0x528831)!==0x0)return _0x322f9e(0x4ab);if(_0x5a15f5(_0x1937e1)||_0x63daa2?.(_0x1884ba))return Atomics[_0x322f9e(0x36f)](_0x1937e1,_0x289c8f,_0x528831,0x0),'attached';return _0x523a9c(_0x36de6d),_0x322f9e(0x3a3);}finally{_0xda8861(_0x36de6d);}}const _0x4e0e52=new Map(),_0x38d03c=new Set();function _0x390309(_0x4bc057){const _0x4b3d08=_0xe0eedf,_0x5de605=process[_0x4b3d08(0x5c3)];for(let _0x5148d2=0x0;_0x5148d2<_0x4696f4;_0x5148d2++){if(Atomics[_0x4b3d08(0x566)](_0x4bc057,_0x23bdda+_0x5148d2)===_0x5de605&&Atomics[_0x4b3d08(0x566)](_0x4bc057,_0x2cee61+_0x5148d2)!==_0x3d2219)return!![];}return![];}function _0x523f8c(_0x18f5ab,_0x4e05e3,_0x5ec6ad={}){const _0xdb37d=_0xe0eedf;let _0x2c6c6d=_0x4e0e52[_0xdb37d(0x2fa)](_0x18f5ab);if(!_0x2c6c6d){const _0x5972b2=_0x233a13(_0x18f5ab,_0x4e05e3,_0x5ec6ad);_0x2c6c6d={'att':_0x5972b2,'dataBytes':_0x4e05e3,'refs':0x0,'isBusy':_0x5ec6ad[_0xdb37d(0x740)]??null,'onThreadExit':_0x5ec6ad[_0xdb37d(0x5f1)]??null},_0x4e0e52[_0xdb37d(0x259)](_0x18f5ab,_0x2c6c6d);}if(_0x5ec6ad['isBusy'])_0x2c6c6d[_0xdb37d(0x740)]=_0x5ec6ad['isBusy'];if(_0x5ec6ad[_0xdb37d(0x5f1)])_0x2c6c6d[_0xdb37d(0x5f1)]=_0x5ec6ad[_0xdb37d(0x5f1)];_0x2c6c6d['refs']++;let _0x3c3ec3=![];return{'sab':_0x2c6c6d[_0xdb37d(0x792)][_0xdb37d(0x567)],'name':_0x18f5ab,'release'(){const _0x3dc180=_0xdb37d;if(_0x3c3ec3)return![];_0x3c3ec3=!![];if(--_0x2c6c6d[_0x3dc180(0x48a)]>0x0)return![];if(_0x4e0e52['get'](_0x18f5ab)===_0x2c6c6d)_0x4e0e52[_0x3dc180(0x360)](_0x18f5ab);const _0x4c93cb=_0x371f59(_0x18f5ab,_0x2c6c6d[_0x3dc180(0x35f)],_0x2c6c6d[_0x3dc180(0x792)],_0x2c6c6d[_0x3dc180(0x740)]);!_0x4c93cb&&_0x346b0b&&_0x390309(_0x2c6c6d[_0x3dc180(0x792)][_0x3dc180(0x780)])&&_0x38d03c[_0x3dc180(0x4da)]({'name':_0x18f5ab,'dataBytes':_0x2c6c6d[_0x3dc180(0x35f)],'att':{..._0x2c6c6d[_0x3dc180(0x792)],'slot':null},'isBusy':_0x2c6c6d[_0x3dc180(0x740)],'onThreadExit':_0x2c6c6d[_0x3dc180(0x5f1)]});if(_0x38d03c['size'])_0x56cb9a();return _0x4c93cb;}};}function _0x175e33(_0x4f97a6){const _0x3d603a=_0xe0eedf;if(!(_0x4f97a6>0x0))return 0x0;const _0x42512c=process[_0x3d603a(0x5c3)];let _0x1131ce=0x0;const _0x8709c0=({att:_0xc925d,onThreadExit:_0x5b379c})=>{const _0x53c9dc=_0x3d603a;try{_0x5b379c?.(_0xc925d[_0x53c9dc(0x567)],_0x4f97a6);}catch{}const {hdr:_0x3a7e07}=_0xc925d;for(let _0x1339c4=0x0;_0x1339c4<_0x4696f4;_0x1339c4++){if(Atomics[_0x53c9dc(0x566)](_0x3a7e07,_0x23bdda+_0x1339c4)!==_0x42512c||Atomics['load'](_0x3a7e07,_0x2cee61+_0x1339c4)!==_0x4f97a6)continue;Atomics['store'](_0x3a7e07,_0x2cee61+_0x1339c4,0x0);if(Atomics[_0x53c9dc(0x36f)](_0x3a7e07,_0x23bdda+_0x1339c4,_0x42512c,0x0)===_0x42512c)_0x1131ce++;}};for(const _0x2c1552 of _0x4e0e52['values']())_0x8709c0(_0x2c1552);for(const _0x2b4fc8 of _0x38d03c)_0x8709c0(_0x2b4fc8);return _0x56cb9a(),_0x1131ce;}function _0x56cb9a(){const _0x30d5d7=_0xe0eedf;for(const _0x2e0658 of[..._0x38d03c]){if(_0x390309(_0x2e0658[_0x30d5d7(0x792)]['hdr']))continue;_0x38d03c[_0x30d5d7(0x360)](_0x2e0658),_0x371f59(_0x2e0658['name'],_0x2e0658[_0x30d5d7(0x35f)],_0x2e0658[_0x30d5d7(0x792)],_0x2e0658[_0x30d5d7(0x740)]);}}return okdbShmSegment={'attachSegment':_0x523f8c,'releaseThreadSlots':_0x175e33,'segmentNameFor':_0x2ae123,'legacySegmentNameFor':_0x1b6c64,'segmentNameStyle':_0x347ea7,'SEG_NAME_MAX':_0x17066c,'retireIfUnused':_0x2e52f6,'totalBytes':_0x6321ff,'headerOffset':_0xf9e57d,'MAX_SLOTS':_0x4696f4,'_attachRaw':_0x233a13,'_detachRaw':_0x371f59,'_takeover':_0x49289e,'_mapByName':_0x351b29,'_hooks':_0x586405,'_registry':_0x4e0e52,'_lingering':_0x38d03c,'_H':{'STATE':_0x289c8f,'OVERFLOW':_0x1ba207,'NONCE_A':_0x1dec8c,'NONCE_B':_0xca2d4f,'SLOTS':_0x23bdda,'TIDS':_0x2cee61}},okdbShmSegment;}var okdbShmGc,hasRequiredOkdbShmGc;function requireOkdbShmGc(){const _0x1de220=_0x1a2e0d;if(hasRequiredOkdbShmGc)return okdbShmGc;hasRequiredOkdbShmGc=0x1;const _0x4e0193=require$$0$1,_0x42f9e5=require$$1,_0x28b38b=_0x1de220(0x590),_0x3c3e70=0x18+0x3*0x100*0x4,_0x582025=0x18+0x2*0x100*0x4,_0x2b4ca1=0xc;function _0xc23715(){const {totalBytes:_0x40553a}=requireOkdbShmSegment();return new Set([0x0,0x8,0x18,_0x582025,_0x2b4ca1,_0x40553a(_0x582025),_0x40553a(_0x3c3e70),_0x40553a(_0x2b4ca1)]);}function _0x1a7b53(_0x48427d,_0x20d283,_0x25ef6e){const _0xf8638d=_0x1de220,{totalBytes:_0x3e5549}=requireOkdbShmSegment();if(_0x48427d[_0xf8638d(0x2e8)](_0xf8638d(0x27e))||_0x20d283===_0x2b4ca1||_0x20d283===_0x3e5549(_0x2b4ca1))return _0x2b4ca1;if(_0x20d283===_0x3e5549(_0x3c3e70))return _0x3c3e70;if(_0x20d283===_0x3e5549(_0x582025))return _0x582025;return _0x25ef6e===_0xf8638d(0x359)?_0x3c3e70:_0x582025;}function _0x41da9e(){const _0x4ed731=_0x1de220,_0x474ac1=new Set(),_0x5ecac0=[],_0x5cad8f=_0x28b38b+'/';let _0x1e82ad;try{_0x1e82ad=_0x4e0193['readdirSync'](_0x4ed731(0x45e))['filter'](_0xb2b4a9=>/^\d+$/[_0x4ed731(0x3f6)](_0xb2b4a9));}catch{throw new Error(_0x4ed731(0x7ad));}for(const _0x49d95b of _0x1e82ad){const _0x406987=_0x42f9e5['join'](_0x4ed731(0x45e),_0x49d95b);let _0x727d01=!![];try{const _0x9541ff=_0x4e0193['readFileSync'](_0x42f9e5[_0x4ed731(0x1c9)](_0x406987,_0x4ed731(0x35d)),'utf8');let _0x243535=_0x9541ff[_0x4ed731(0x196)](_0x5cad8f);while(_0x243535!==-0x1){const _0x8bea0c=_0x9541ff['indexOf']('\x0a',_0x243535),_0x8e9ceb=_0x9541ff[_0x4ed731(0x27f)](_0x243535+_0x5cad8f[_0x4ed731(0x6ad)],_0x8bea0c===-0x1?undefined:_0x8bea0c);if(!_0x8e9ceb[_0x4ed731(0x2e8)]('\x20(deleted)'))_0x474ac1[_0x4ed731(0x4da)](_0x8e9ceb);_0x243535=_0x9541ff[_0x4ed731(0x196)](_0x5cad8f,_0x243535+0x1);}}catch(_0x2ad8c8){if(_0x2ad8c8[_0x4ed731(0x2dc)]!==_0x4ed731(0x843)&&_0x2ad8c8[_0x4ed731(0x2dc)]!=='ESRCH')_0x727d01=![];}try{for(const _0x256ee3 of _0x4e0193[_0x4ed731(0x859)](_0x42f9e5[_0x4ed731(0x1c9)](_0x406987,'fd'))){let _0x56e910;try{_0x56e910=_0x4e0193[_0x4ed731(0x7d4)](_0x42f9e5[_0x4ed731(0x1c9)](_0x406987,'fd',_0x256ee3));}catch{continue;}if(_0x56e910[_0x4ed731(0x579)](_0x5cad8f)&&!_0x56e910[_0x4ed731(0x2e8)](_0x4ed731(0x8af)))_0x474ac1['add'](_0x56e910['slice'](_0x5cad8f['length']));}}catch(_0x15dbb1){if(_0x15dbb1['code']!=='ENOENT'&&_0x15dbb1[_0x4ed731(0x2dc)]!=='ESRCH')_0x727d01=![];}if(!_0x727d01){let _0x3c55f2=null;try{_0x3c55f2=_0x4e0193['statSync'](_0x406987)['uid'];}catch{}let _0x1f795c='?';try{_0x1f795c=_0x4e0193['readFileSync'](_0x42f9e5[_0x4ed731(0x1c9)](_0x406987,_0x4ed731(0x26a)),_0x4ed731(0x88a))[_0x4ed731(0x48b)]();}catch{}if(_0x3c55f2!==null)_0x5ecac0['push']({'pid':Number(_0x49d95b),'uid':_0x3c55f2,'comm':_0x1f795c});}}return{'inUse':_0x474ac1,'unreadable':_0x5ecac0};}function _0x10d7f7({prefix:prefix=_0x1de220(0x7fb),dryRun:dryRun=![],anySize:anySize=![],force:force=![],log:log=()=>{}}={}){const _0x547806=_0x1de220;if(process[_0x547806(0x202)]!==_0x547806(0x674)||!_0x4e0193[_0x547806(0x5b6)](_0x28b38b))throw new Error(_0x547806(0x8b1));const _0x3affb9=process[_0x547806(0x2db)](),_0x51d08c=_0x3affb9===0x0,_0x2b46b8=_0xc23715(),{inUse:_0x4922fe,unreadable:_0x510171}=_0x41da9e(),_0xba6897=_0x510171[_0x547806(0x542)](_0x3daec8=>_0x51d08c||_0x3daec8[_0x547806(0x250)]===_0x3affb9),_0x46a0c1={'dryRun':dryRun,'prefix':prefix,'scanned':0x0,'matched':0x0,'inUse':0x0,'notOkdbShaped':0x0,'foreignOwner':0x0,'candidates':0x0,'candidatesLegacyNamed':0x0,'candidateBytes':0x0,'candidateAllocated':0x0,'deleted':0x0,'deletedAllocated':0x0,'skippedByProtocol':0x0,'errors':0x0,'unreadablePids':_0x510171['length'],'blindPids':_0xba6897[_0x547806(0x595)](_0x4170d2=>_0x4170d2['pid']),'blindCommands':_0x2c5679(_0xba6897)};if(_0xba6897[_0x547806(0x6ad)]&&!dryRun&&!force)throw new Error(_0x547806(0x273)+_0xba6897[_0x547806(0x6ad)]+_0x547806(0x20d)+(_0x547806(0x551)+_0x46a0c1[_0x547806(0x5c8)]+_0x547806(0x869))+_0x547806(0x790));const {retireIfUnused:_0xaa717b,segmentNameStyle:_0x127775,_registry:_0x5a7c8f}=requireOkdbShmSegment();let _0x306178=null;if(!dryRun)try{require('v8')['setFlagsFromString']('--expose-gc'),_0x306178=require('vm')[_0x547806(0x30e)]('gc');}catch{}const _0x4a04dd=_0x4e0193[_0x547806(0x2cb)](_0x28b38b);try{let _0x2634e2,_0x50a81f=0x0;while(_0x2634e2=_0x4a04dd[_0x547806(0x882)]()){_0x46a0c1['scanned']++;const _0x5e71c4=_0x2634e2[_0x547806(0x4f9)];if(!_0x5e71c4[_0x547806(0x579)](prefix))continue;_0x46a0c1[_0x547806(0x8b4)]++;if(_0x5a7c8f[_0x547806(0x2ad)](_0x5e71c4)){_0x46a0c1[_0x547806(0x6a4)]++;continue;}if(_0x4922fe[_0x547806(0x2ad)](_0x5e71c4)){_0x46a0c1['inUse']++;continue;}let _0x3359bf;try{_0x3359bf=_0x4e0193[_0x547806(0x1cd)](_0x42f9e5[_0x547806(0x1c9)](_0x28b38b,_0x5e71c4));}catch{continue;}if(!_0x3359bf[_0x547806(0x5e8)]())continue;const _0x38e139=_0x127775(_0x5e71c4);if(!_0x38e139||!anySize&&!_0x2b46b8[_0x547806(0x2ad)](_0x3359bf['size'])){_0x46a0c1[_0x547806(0x1f3)]++;continue;}if(!_0x51d08c&&_0x3359bf[_0x547806(0x250)]!==_0x3affb9){_0x46a0c1['foreignOwner']++;continue;}_0x46a0c1[_0x547806(0x255)]++;if(_0x38e139===_0x547806(0x789))_0x46a0c1['candidatesLegacyNamed']++;_0x46a0c1['candidateBytes']+=_0x3359bf['size'],_0x46a0c1[_0x547806(0x816)]+=_0x3359bf[_0x547806(0x4be)]*0x200;if(dryRun)continue;const _0x552da6=_0x1a7b53(_0x5e71c4,_0x3359bf['size'],_0x38e139);try{const _0xd66c87=_0xaa717b(_0x5e71c4,_0x552da6);_0xd66c87===_0x547806(0x3a3)?(_0x46a0c1['deleted']++,_0x46a0c1['deletedAllocated']+=_0x3359bf['blocks']*0x200):(_0x46a0c1[_0x547806(0x762)]++,log(_0x547806(0x644)+_0x5e71c4+':\x20'+_0xd66c87));}catch(_0x2e47cc){_0x46a0c1['errors']++,log(_0x547806(0x79c)+_0x5e71c4+':\x20'+_0x2e47cc['message']);}_0x306178&&++_0x50a81f>=0x200&&(_0x50a81f=0x0,_0x306178());}}finally{_0x4a04dd[_0x547806(0x57d)]();}return _0x46a0c1;}function _0x2c5679(_0x51155b){const _0x4ff067=_0x1de220,_0x2bdd9b=new Map();for(const _0x51502a of _0x51155b)_0x2bdd9b[_0x4ff067(0x259)](_0x51502a[_0x4ff067(0x26a)],(_0x2bdd9b[_0x4ff067(0x2fa)](_0x51502a[_0x4ff067(0x26a)])??0x0)+0x1);return[..._0x2bdd9b][_0x4ff067(0x595)](([_0x46cc00,_0x5a1e8e])=>_0x5a1e8e>0x1?_0x46cc00+'×'+_0x5a1e8e:_0x46cc00)['join'](',\x20');}function _0x39bba7(_0x5adec8){const _0x5f2986=_0x1de220,_0x2e769b=['B',_0x5f2986(0x36b),_0x5f2986(0x629),_0x5f2986(0x7b9),_0x5f2986(0x3b1)];let _0x1e2298=0x0;while(_0x5adec8>=0x400&&_0x1e2298<_0x2e769b[_0x5f2986(0x6ad)]-0x1){_0x5adec8/=0x400,_0x1e2298++;}return _0x5adec8['toFixed'](_0x1e2298?0x1:0x0)+'\x20'+_0x2e769b[_0x1e2298];}function _0x2935f8(_0x518182){const _0x5b3e4c=_0x1de220,_0x109838=[_0x5b3e4c(0x529)+(_0x518182[_0x5b3e4c(0x593)]?_0x5b3e4c(0x78d):'')+_0x5b3e4c(0x5b7)+JSON[_0x5b3e4c(0x2d1)](_0x518182['prefix']),_0x5b3e4c(0x7cd)+_0x518182[_0x5b3e4c(0x83b)]+'\x20entries\x20in\x20'+_0x28b38b,_0x5b3e4c(0x278)+_0x518182[_0x5b3e4c(0x8b4)],_0x5b3e4c(0x4a9)+_0x518182[_0x5b3e4c(0x6a4)],'\x20\x20not\x20okdb-shaped\x20\x20\x20\x20'+_0x518182['notOkdbShaped'],'\x20\x20other\x20owner\x20\x20\x20\x20\x20\x20\x20\x20'+_0x518182[_0x5b3e4c(0x553)],_0x5b3e4c(0x569)+_0x518182['candidates']+_0x5b3e4c(0x68b)+_0x39bba7(_0x518182['candidateBytes'])+_0x5b3e4c(0x692)+_0x39bba7(_0x518182[_0x5b3e4c(0x816)])+_0x5b3e4c(0x77f)+(_0x518182[_0x5b3e4c(0x894)]?'\x20('+_0x518182[_0x5b3e4c(0x894)]+_0x5b3e4c(0x7bb):'')];if(!_0x518182[_0x5b3e4c(0x593)]){_0x109838[_0x5b3e4c(0x557)](_0x5b3e4c(0x6b9)+_0x518182[_0x5b3e4c(0x7e2)]+_0x5b3e4c(0x68b)+_0x39bba7(_0x518182['deletedAllocated'])+'\x20freed');if(_0x518182['skippedByProtocol'])_0x109838['push'](_0x5b3e4c(0x852)+_0x518182[_0x5b3e4c(0x762)]);if(_0x518182[_0x5b3e4c(0x511)])_0x109838['push']('\x20\x20errors\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x518182[_0x5b3e4c(0x511)]);}return _0x518182[_0x5b3e4c(0x8a3)]&&_0x109838[_0x5b3e4c(0x557)]('\x20\x20note:\x20'+_0x518182[_0x5b3e4c(0x8a3)]+_0x5b3e4c(0x4d8)+(_0x518182[_0x5b3e4c(0x3a7)][_0x5b3e4c(0x6ad)]?'\x20—\x20'+_0x518182[_0x5b3e4c(0x3a7)][_0x5b3e4c(0x6ad)]+_0x5b3e4c(0x885)+(_0x518182[_0x5b3e4c(0x5c8)]+_0x5b3e4c(0x208)):_0x5b3e4c(0x7f7))),_0x109838[_0x5b3e4c(0x1c9)]('\x0a');}function _0x73d51c(_0x16d6a4){const _0x1194ce=_0x1de220,_0x59d02c={'prefix':_0x1194ce(0x7fb),'dryRun':![],'anySize':![],'force':![],'verbose':![]};for(let _0x1f721c=0x0;_0x1f721c<_0x16d6a4[_0x1194ce(0x6ad)];_0x1f721c++){const _0x53926c=_0x16d6a4[_0x1f721c];if(_0x53926c===_0x1194ce(0x745)||_0x53926c==='-n')_0x59d02c['dryRun']=!![];else{if(_0x53926c===_0x1194ce(0x1bd))_0x59d02c[_0x1194ce(0x235)]=!![];else{if(_0x53926c===_0x1194ce(0x81f))_0x59d02c[_0x1194ce(0x839)]=!![];else{if(_0x53926c===_0x1194ce(0x2e3)||_0x53926c==='-v')_0x59d02c[_0x1194ce(0x515)]=!![];else{if(_0x53926c===_0x1194ce(0x3af))_0x59d02c[_0x1194ce(0x77d)]=_0x16d6a4[++_0x1f721c]??'';else{if(_0x53926c[_0x1194ce(0x579)](_0x1194ce(0x7a5)))_0x59d02c[_0x1194ce(0x77d)]=_0x53926c['slice'](_0x1194ce(0x7a5)['length']);else{if(_0x53926c===_0x1194ce(0x62e)||_0x53926c==='-h')_0x59d02c['help']=!![];else throw new Error(_0x1194ce(0x1e7)+_0x53926c);}}}}}}}return _0x59d02c;}const _0x1989eb='Usage:\x20okdb\x20shm-gc\x20[--dry-run]\x20[--prefix\x20<p>]\x20[--any-size]\x20[--force]\x20[--verbose]\x0a\x0aDelete\x20okdb\x20shared-memory\x20segments\x20in\x20/dev/shm\x20that\x20no\x20live\x20process\x20maps\x20or\x20holds\x20open\x0a(older\x20okdb\x20versions\x20never\x20unlinked\x20them).\x20Recognises\x20both\x20the\x20current\x20hashed\x20names\x0a(<path>-<hash>)\x20and\x20the\x20bare-path\x20names\x20of\x20okdb\x20<=\x202.4.0.\x20Linux\x20only.\x0a\x0a\x20\x20--dry-run,\x20-n\x20\x20\x20report\x20what\x20would\x20be\x20deleted,\x20delete\x20nothing\x0a\x20\x20--prefix\x20<p>\x20\x20\x20\x20only\x20names\x20starting\x20with\x20<p>\x20(default\x20\x22-tmp-\x22:\x20stores\x20under\x20/tmp;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22\x22\x20=\x20every\x20okdb-shaped\x20name)\x0a\x20\x20--any-size\x20\x20\x20\x20\x20\x20don\x27t\x20require\x20an\x20okdb\x20segment\x20size\x0a\x20\x20--force\x20\x20\x20\x20\x20\x20\x20\x20\x20delete\x20even\x20if\x20some\x20same-user\x20process\x27s\x20maps\x20could\x20not\x20be\x20read\x0a\x20\x20--verbose,\x20-v\x20\x20\x20print\x20every\x20kept\x20segment\x20and\x20why';function _0x532e02(_0x52d7da){const _0x1e22e0=_0x1de220;let _0x1b1568;try{_0x1b1568=_0x73d51c(_0x52d7da);}catch(_0x48a275){return console[_0x1e22e0(0x6cd)](_0x48a275[_0x1e22e0(0x81d)]),console['error'](_0x1989eb),0x2;}if(_0x1b1568[_0x1e22e0(0x870)])return console['log'](_0x1989eb),0x0;const _0x44a7cb=_0x10d7f7({..._0x1b1568,'log':_0x1b1568['verbose']?_0x265205=>console[_0x1e22e0(0x689)](_0x265205):undefined});return console[_0x1e22e0(0x689)](_0x2935f8(_0x44a7cb)),_0x44a7cb['errors']?0x1:0x0;}return okdbShmGc={'shmGc':_0x10d7f7,'formatReport':_0x2935f8,'main':_0x532e02,'scanInUse':_0x41da9e,'ENV_DATA_BYTES':_0x3c3e70,'LEGACY_ENV_DATA_BYTES':_0x582025,'BOOT_DATA_BYTES':_0x2b4ca1},okdbShmGc;}var hasRequiredOkdb;function requireOkdb(){const _0x92a1c9=_0x1a2e0d;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x92a1c9(0x4c7)]();}catch{}const _0x3e45a6=require$$1,_0x372f01=require$$0$1,{resolveWorkers:_0x11fa34,isShmbufNative:_0x1bf56b}=requireOkdbWorkers();function _0x4e5792(_0x2ecd88){const _0xc4b210=_0x92a1c9,_0x4d8deb=_0x2ecd88[_0xc4b210(0x27f)](0x2),_0x586053={};let _0x486753=0x0;while(_0x486753<_0x4d8deb[_0xc4b210(0x6ad)]){const _0x42c5d2=_0x4d8deb[_0x486753];if(_0x42c5d2===_0xc4b210(0x6ff)||_0x42c5d2==='-p')_0x586053['port']=Number(_0x4d8deb[++_0x486753]);else{if(_0x42c5d2===_0xc4b210(0x344)||_0x42c5d2==='-d')_0x586053[_0xc4b210(0x5be)]=_0x4d8deb[++_0x486753];else{if(_0x42c5d2==='--key'||_0x42c5d2==='-k')_0x586053[_0xc4b210(0x47f)]=_0x4d8deb[++_0x486753];else{if(_0x42c5d2===_0xc4b210(0x585)||_0x42c5d2==='-c')_0x586053[_0xc4b210(0x38b)]=_0x4d8deb[++_0x486753];else{if(_0x42c5d2===_0xc4b210(0x772))_0x586053[_0xc4b210(0x8c0)]=_0x4d8deb[++_0x486753];else{if(_0x42c5d2===_0xc4b210(0x7a9))_0x586053['noRepl']=!![];else{if(_0x42c5d2===_0xc4b210(0x536))_0x586053[_0xc4b210(0x69b)]=!![];else{if(_0x42c5d2===_0xc4b210(0x832))_0x586053[_0xc4b210(0x307)]=_0x4d8deb[++_0x486753];else{if(_0x42c5d2===_0xc4b210(0x4f1))_0x586053['noCluster']=!![];else{if(_0x42c5d2===_0xc4b210(0x7e6)||_0x42c5d2==='-e')_0x586053['env']=_0x4d8deb[++_0x486753];else{if(_0x42c5d2===_0xc4b210(0x508))_0x586053[_0xc4b210(0x427)]=_0x4d8deb[++_0x486753];else{if(_0x42c5d2===_0xc4b210(0x480))_0x586053[_0xc4b210(0x330)]=!![];else{if(_0x42c5d2===_0xc4b210(0x549))_0x586053[_0xc4b210(0x457)]=!![];else{if(_0x42c5d2==='--new-identity')_0x586053[_0xc4b210(0x4b6)]=!![];else{if(_0x42c5d2===_0xc4b210(0x6e1))_0x586053['drop']=!![];else{if(_0x42c5d2==='--open'){const _0x160c22=[];while(_0x486753+0x1<_0x4d8deb[_0xc4b210(0x6ad)]&&!_0x4d8deb[_0x486753+0x1]['startsWith']('--')){_0x160c22[_0xc4b210(0x557)](_0x4d8deb[++_0x486753]);}_0x586053[_0xc4b210(0x5f0)]=_0x160c22[_0xc4b210(0x6ad)]>0x0?_0x160c22:!![];}else{if(_0x42c5d2===_0xc4b210(0x2ff))_0x586053[_0xc4b210(0x2dd)]=!![];else{if(_0x42c5d2===_0xc4b210(0x630))_0x586053[_0xc4b210(0x4f9)]=_0x4d8deb[++_0x486753];else{if(_0x42c5d2===_0xc4b210(0x77c))_0x586053[_0xc4b210(0x23e)]=_0x4d8deb[++_0x486753];else{if(_0x42c5d2==='--label')_0x586053[_0xc4b210(0x37e)]=_0x4d8deb[++_0x486753];else{if(_0x42c5d2==='--permissions')_0x586053[_0xc4b210(0x496)]=_0x4d8deb[++_0x486753];else{if(_0x42c5d2===_0xc4b210(0x703))_0x586053['grants']=_0x4d8deb[++_0x486753];else{if(_0x42c5d2==='--ttl')_0x586053[_0xc4b210(0x7b0)]=_0x4d8deb[++_0x486753];else{if(_0x42c5d2===_0xc4b210(0x7cb))_0x586053['token']=_0x4d8deb[++_0x486753];else{if(_0x42c5d2==='--username'||_0x42c5d2==='-u')_0x586053[_0xc4b210(0x479)]=_0x4d8deb[++_0x486753];else{if(_0x42c5d2===_0xc4b210(0x6b8))_0x586053[_0xc4b210(0x4e9)]=_0x4d8deb[++_0x486753];else{if(_0x42c5d2===_0xc4b210(0x7d0)||_0x42c5d2==='-v'){const _0x44b53e=require$$3;console['log'](_0x44b53e[_0xc4b210(0x598)]),process[_0xc4b210(0x468)](0x0);}else(_0x42c5d2===_0xc4b210(0x62e)||_0x42c5d2==='-h')&&(_0x245c97(),process['exit'](0x0));}}}}}}}}}}}}}}}}}}}}}}}}}}_0x486753++;}return _0x586053;}function _0x245c97(){const _0x213b2b=_0x92a1c9;console[_0x213b2b(0x689)](_0x213b2b(0x1f1));}const _0x9547ff=new Set([_0x92a1c9(0x224),_0x92a1c9(0x56c),_0x92a1c9(0x44f),'error']);function _0xc7735d(_0x1bbf25){const _0x5ac0c6=_0x92a1c9,_0x50a02a=_0x1bbf25['config']?_0x3e45a6[_0x5ac0c6(0x8c2)](_0x1bbf25[_0x5ac0c6(0x38b)]):_0x3e45a6['resolve'](_0x5ac0c6(0x309));let _0x45a1b7={};if(_0x372f01['existsSync'](_0x50a02a))try{const _0x16900d=_0x372f01[_0x5ac0c6(0x308)](_0x50a02a,_0x5ac0c6(0x88a))[_0x5ac0c6(0x813)](/^\uFEFF/,'');_0x45a1b7=JSON[_0x5ac0c6(0x7d3)](_0x16900d),console['log']('[okdb]\x20loaded\x20config:\x20'+_0x50a02a);}catch(_0x59811c){console[_0x5ac0c6(0x6cd)]('[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20'+_0x50a02a+':\x20'+_0x59811c[_0x5ac0c6(0x81d)]),process[_0x5ac0c6(0x468)](0x1);}const _0xba45c2={'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},_0x311efa={'port':_0x1bbf25[_0x5ac0c6(0x397)]??_0x45a1b7['port']??_0xba45c2[_0x5ac0c6(0x397)]??0x2124,'dbPath':_0x1bbf25['path']??_0x45a1b7[_0x5ac0c6(0x5be)]??_0xba45c2[_0x5ac0c6(0x5be)]??'./okdb-data','key':_0x1bbf25[_0x5ac0c6(0x47f)]??_0x45a1b7[_0x5ac0c6(0x47f)]??_0xba45c2[_0x5ac0c6(0x47f)]??undefined,'logLevel':_0x1bbf25[_0x5ac0c6(0x8c0)]??_0x45a1b7[_0x5ac0c6(0x8c0)]??_0xba45c2[_0x5ac0c6(0x8c0)]??_0x5ac0c6(0x56c),'noRepl':_0x1bbf25['noRepl']??_0x45a1b7['noRepl']??_0xba45c2['noRepl']??![],'noAdmin':_0x1bbf25[_0x5ac0c6(0x69b)]??_0x45a1b7[_0x5ac0c6(0x69b)]??_0xba45c2['noAdmin']??![],'admin':_0x45a1b7[_0x5ac0c6(0x1bb)]??{},'api':_0x45a1b7['api']??undefined,'auth':_0x45a1b7[_0x5ac0c6(0x716)]??undefined,'mcp':_0x45a1b7[_0x5ac0c6(0x861)]??undefined,'http':_0x45a1b7[_0x5ac0c6(0x5fb)]??undefined,'backup':_0x45a1b7[_0x5ac0c6(0x7b4)]??undefined,'timeMachine':_0x45a1b7[_0x5ac0c6(0x510)]!==![]?_0x45a1b7[_0x5ac0c6(0x510)]??{}:![],'processors':_0x45a1b7[_0x5ac0c6(0x78a)],'engines':_0x45a1b7['engines'],'compaction':_0x45a1b7[_0x5ac0c6(0x3a0)]};if(_0x1bbf25[_0x5ac0c6(0x69a)])_0x311efa[_0x5ac0c6(0x69a)]=!![];if(_0x1bbf25[_0x5ac0c6(0x307)]!==undefined)_0x311efa[_0x5ac0c6(0x43e)]=_0x1bbf25[_0x5ac0c6(0x307)];_0x1bbf25[_0x5ac0c6(0x5f0)]!==undefined&&(_0x311efa[_0x5ac0c6(0x716)]=_0x311efa['auth']||{},_0x311efa['auth'][_0x5ac0c6(0x5f0)]=_0x1bbf25[_0x5ac0c6(0x5f0)]);_0x1bbf25[_0x5ac0c6(0x2dd)]&&(_0x311efa[_0x5ac0c6(0x224)]=_0x311efa['debug']||{},_0x311efa[_0x5ac0c6(0x224)]['logRequests']=!![]);(!Number[_0x5ac0c6(0x512)](_0x311efa['port'])||_0x311efa[_0x5ac0c6(0x397)]<0x1||_0x311efa[_0x5ac0c6(0x397)]>0xffff)&&(console[_0x5ac0c6(0x6cd)](_0x5ac0c6(0x31c)+_0x311efa[_0x5ac0c6(0x397)]+'\x20(must\x20be\x201–65535)'),process[_0x5ac0c6(0x468)](0x1));!_0x9547ff[_0x5ac0c6(0x2ad)](_0x311efa['logLevel'])&&(console[_0x5ac0c6(0x6cd)](_0x5ac0c6(0x286)+_0x311efa[_0x5ac0c6(0x8c0)]+_0x5ac0c6(0x1a6)),process[_0x5ac0c6(0x468)](0x1));const _0x5e17e3=_0x311efa[_0x5ac0c6(0x5fb)]?.[_0x5ac0c6(0x26b)];_0x5e17e3!==undefined&&!(typeof _0x5e17e3===_0x5ac0c6(0x1d2)&&_0x5e17e3)&&!(Array[_0x5ac0c6(0x59b)](_0x5e17e3)&&_0x5e17e3[_0x5ac0c6(0x6ad)]&&_0x5e17e3[_0x5ac0c6(0x573)](_0x2105d2=>typeof _0x2105d2===_0x5ac0c6(0x1d2)&&_0x2105d2))&&(console[_0x5ac0c6(0x6cd)](_0x5ac0c6(0x2e0)+JSON[_0x5ac0c6(0x2d1)](_0x5e17e3)+_0x5ac0c6(0x3c7)),process[_0x5ac0c6(0x468)](0x1));for(const _0x867cc8 of _0x260a0d){_0x311efa[_0x867cc8]!==undefined&&typeof _0x311efa[_0x867cc8]!=='boolean'&&(console['error'](_0x5ac0c6(0x61c)+_0x867cc8+_0x5ac0c6(0x4b8)+JSON[_0x5ac0c6(0x2d1)](_0x311efa[_0x867cc8])+_0x5ac0c6(0x6b0)),process[_0x5ac0c6(0x468)](0x1));}return _0x311efa;}const _0x260a0d=['processors',_0x92a1c9(0x38c),_0x92a1c9(0x3a0)];function _0x5aa31d(_0x29af4e){const _0x3e7928=_0x92a1c9;return!!(_0x29af4e&&typeof _0x29af4e===_0x3e7928(0x601)&&!Array['isArray'](_0x29af4e)&&Object[_0x3e7928(0x818)](_0x29af4e)[_0x3e7928(0x6ad)]>0x0);}function _0xef2b40(_0x438cf1){const _0x583ae3=_0x92a1c9;return{..._0x438cf1['key']?{'encryptionKey':_0x438cf1[_0x583ae3(0x47f)]}:{},'engines':![],'processors':![],'compaction':![]};}const _0x40b8c6=!process[_0x92a1c9(0x498)][_0x92a1c9(0x670)]||!!process.env.NO_COLOR;function _0x383be3(_0x3b4f95,_0x1160e3){const _0xab9de2=_0x92a1c9;return _0x40b8c6?_0x1160e3:'\x1b['+_0x3b4f95+'m'+_0x1160e3+_0xab9de2(0x850);}function _0x4856fc(_0x232fca){const _0x3037f2=_0x92a1c9;if(!_0x232fca||_0x232fca[_0x3037f2(0x6ad)]===0x0)return;const _0x25030d='─'[_0x3037f2(0x2f5)](0x38);process[_0x3037f2(0x6d3)][_0x3037f2(0x82b)]('\x0a'),process[_0x3037f2(0x6d3)][_0x3037f2(0x82b)](_0x383be3('33',_0x3037f2(0x6cf)+_0x232fca[_0x3037f2(0x6ad)]+_0x3037f2(0x1ca)+(_0x232fca['length']>0x1?'S':'')+'\x0a')),process[_0x3037f2(0x6d3)]['write']('\x20\x20'+_0x25030d+'\x0a');for(const _0x5116c0 of _0x232fca){const _0x452d9c=_0x5116c0[_0x3037f2(0x682)]===_0x3037f2(0x6cd)?_0x383be3('31','\x20\x20✗'):_0x383be3('33',_0x3037f2(0x4f6));process[_0x3037f2(0x6d3)]['write'](_0x452d9c+'\x20\x20'+_0x383be3('1',_0x5116c0[_0x3037f2(0x4ee)])+'\x0a'),process[_0x3037f2(0x6d3)]['write'](_0x3037f2(0x7ff)+_0x5116c0[_0x3037f2(0x81d)]+'\x0a');if(_0x5116c0['hint'])process[_0x3037f2(0x6d3)][_0x3037f2(0x82b)](_0x3037f2(0x7ff)+_0x383be3('2',_0x3037f2(0x40a)+_0x5116c0[_0x3037f2(0x3eb)])+'\x0a');process[_0x3037f2(0x6d3)][_0x3037f2(0x82b)]('\x0a');}process[_0x3037f2(0x6d3)][_0x3037f2(0x82b)]('\x20\x20'+_0x25030d+'\x0a\x0a');}function _0x5a8ed5(_0xcceb05,_0x5a11ea,_0x18b847={}){const _0x2cc0bb=_0x92a1c9,_0x12439a=_0xcceb05[_0x2cc0bb(0x5fb)][_0x2cc0bb(0x7a4)](_0x5a11ea,_0x18b847);if(_0x12439a&&_0x12439a[_0x2cc0bb(0x777)])return Promise[_0x2cc0bb(0x8c2)](_0x12439a);const _0xf05737=_0xcceb05[_0x2cc0bb(0x5fb)][_0x2cc0bb(0x39f)]?.[_0x2cc0bb(0x6ad)]?_0xcceb05['http'][_0x2cc0bb(0x39f)]:[_0x12439a];return new Promise((_0x98c4b0,_0x420c46)=>{const _0x4a2664=_0x2cc0bb;_0x12439a[_0x4a2664(0x898)]('error',_0x420c46),Promise['all'](_0xf05737[_0x4a2664(0x595)](_0x42a1f8=>_0x42a1f8['listening']?null:new Promise(_0x3307ec=>_0x42a1f8[_0x4a2664(0x898)](_0x4a2664(0x697),_0x3307ec))))[_0x4a2664(0x4ed)](()=>_0x98c4b0(_0x12439a));});}function _0x5bbcc0(_0x2ef561){const _0x663b6d=_0x92a1c9;return _0x2ef561['http']?.[_0x663b6d(0x26b)]!==undefined?{'host':_0x2ef561[_0x663b6d(0x5fb)][_0x663b6d(0x26b)]}:{};}async function _0x4f10c0(_0x40357a){const _0xa7b2ab=_0x92a1c9,_0x2c12a7=require$$4$1;console[_0xa7b2ab(0x689)](_0xa7b2ab(0x89c));let _0x234d20=!![];const _0xcda6a9=(_0x1ce704,_0x13e84e)=>{const _0x34744b=_0xa7b2ab;console[_0x34744b(0x689)]('\x20\x20'+(_0x1ce704?'✓':'✗')+'\x20'+_0x13e84e);if(!_0x1ce704)_0x234d20=![];},_0x5dec9f=Number(process['version'][_0xa7b2ab(0x813)]('v','')['split']('.')[0x0]);_0xcda6a9(_0x5dec9f>=0x12,'node\x20'+process[_0xa7b2ab(0x598)]+(_0x5dec9f<0x12?_0xa7b2ab(0x4fb):''));const _0x283413=_0x3e45a6['resolve'](_0x40357a['dbPath']);try{_0x372f01[_0xa7b2ab(0x51a)](_0x283413,{'recursive':!![]});const _0x1f5e41=_0x3e45a6[_0xa7b2ab(0x1c9)](_0x283413,_0xa7b2ab(0x2c8));_0x372f01[_0xa7b2ab(0x497)](_0x1f5e41,''),_0x372f01[_0xa7b2ab(0x291)](_0x1f5e41),_0xcda6a9(!![],_0xa7b2ab(0x5df)+_0x283413);}catch(_0x2a94d7){_0xcda6a9(![],_0xa7b2ab(0x6de)+_0x283413+_0xa7b2ab(0x8c8)+_0x2a94d7[_0xa7b2ab(0x81d)]+')');}const _0x16527c=await new Promise(_0x1a3734=>{const _0x1bc922=_0xa7b2ab,_0x4d7294=_0x2c12a7[_0x1bc922(0x37a)]();_0x4d7294['once']('error',()=>_0x1a3734(![])),_0x4d7294['once']('listening',()=>{_0x4d7294['close'](),_0x1a3734(!![]);}),_0x4d7294[_0x1bc922(0x7a4)](_0x40357a[_0x1bc922(0x397)],'127.0.0.1');});_0xcda6a9(_0x16527c,_0xa7b2ab(0x1f0)+_0x40357a['port']+'\x20'+(_0x16527c?_0xa7b2ab(0x439):'already\x20in\x20use'));const _0x1704d6=_0x3e45a6['resolve'](_0xa7b2ab(0x309));if(_0x372f01[_0xa7b2ab(0x5b6)](_0x1704d6))try{JSON[_0xa7b2ab(0x7d3)](_0x372f01[_0xa7b2ab(0x308)](_0x1704d6,'utf8')[_0xa7b2ab(0x813)](/^\uFEFF/,'')),_0xcda6a9(!![],_0xa7b2ab(0x51c)+_0x1704d6);}catch(_0x280f75){_0xcda6a9(![],'config\x20file\x20invalid:\x20'+_0x280f75[_0xa7b2ab(0x81d)]);}else _0xcda6a9(!![],_0xa7b2ab(0x5ea));if(_0x1bf56b()){const _0x430d09=_0x11fa34(_0x40357a,{'shmbufNative':!![]});_0xcda6a9(!![],_0xa7b2ab(0x514)+_0x430d09+_0xa7b2ab(0x8bf)+(_0x430d09===0x1?'':'s')+')');}else _0xcda6a9(!![],_0xa7b2ab(0x3b7));if(!_0x16527c)try{const _0x3b5177=require('../okdb'),_0x675e48=new _0x3b5177(_0x283413,{'engines':![],'processors':![],'compaction':![],'auth':{'open':!![]}});await _0x675e48[_0xa7b2ab(0x5f0)]();try{await _0x675e48[_0xa7b2ab(0x65b)]['open']({'reader':!![]});const _0x247d98=_0x675e48[_0xa7b2ab(0x65b)][_0xa7b2ab(0x469)](),_0x390ba7=_0x247d98[_0xa7b2ab(0x542)](_0x246fde=>_0x246fde[_0xa7b2ab(0x2a4)]!=null)[_0xa7b2ab(0x6ad)];_0xcda6a9(!![],'processes:\x20'+_0x247d98['length']+_0xa7b2ab(0x27b)+(_0x247d98[_0xa7b2ab(0x6ad)]===0x1?'':'es')+'\x20('+_0x390ba7+_0xa7b2ab(0x22d));}finally{await _0x675e48['close']();}}catch{}console[_0xa7b2ab(0x689)](''),_0x234d20?console['log'](_0xa7b2ab(0x652)):(console[_0xa7b2ab(0x689)](_0xa7b2ab(0x86e)),process[_0xa7b2ab(0x468)](0x1));}async function _0x366f39(){const _0xec1696=_0x92a1c9,_0x167b0b=_0x3e45a6['resolve'](_0xec1696(0x309));!_0x372f01[_0xec1696(0x5b6)](_0x167b0b)?(_0x372f01[_0xec1696(0x497)](_0x167b0b,JSON[_0xec1696(0x2d1)]({'port':0x2124,'path':'./okdb-data','logLevel':_0xec1696(0x56c),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0xec1696(0x689)](_0xec1696(0x45d))):console[_0xec1696(0x689)]('[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping');const _0x525778=_0x3e45a6[_0xec1696(0x8c2)](_0xec1696(0x3fb));!_0x372f01[_0xec1696(0x5b6)](_0x525778)?(_0x372f01[_0xec1696(0x51a)](_0x525778,{'recursive':!![]}),console['log'](_0xec1696(0x75a))):console[_0xec1696(0x689)](_0xec1696(0x219)),console[_0xec1696(0x689)](_0xec1696(0x7db));}async function _0x234c7c(_0x4b341c){const _0x4c5022=_0x92a1c9,_0xf9843=_0x3e45a6['resolve'](_0x4b341c[_0x4c5022(0x336)]);if(!_0x372f01['existsSync'](_0xf9843)){console['log']('[okdb]\x20nothing\x20to\x20reset\x20—\x20'+_0xf9843+'\x20does\x20not\x20exist');return;}const _0x3d4ca5=require$$0$3,_0x16fea8=_0x3d4ca5[_0x4c5022(0x636)]({'input':process[_0x4c5022(0x248)],'output':process[_0x4c5022(0x498)]}),_0x350fb0=await new Promise(_0x2ff87c=>_0x16fea8[_0x4c5022(0x4b3)](_0x4c5022(0x817)+_0xf9843+_0x4c5022(0x21a),_0x2ff87c));_0x16fea8[_0x4c5022(0x6e0)](),console[_0x4c5022(0x689)]('');if(_0x350fb0['trim']()['toLowerCase']()!==_0x4c5022(0x642)){console['log'](_0x4c5022(0x880));return;}let _0x197283=null;try{_0x197283=await _0x35ea7b(_0xf9843,_0x4b341c,async _0x3c9752=>{const _0x4786b1=_0x4c5022,_0x548c70=_0x3c9752[_0x4786b1(0x736)],_0x279e47=_0x548c70?.['db']?.[_0x4786b1(0x2fa)]('__identity')??null,_0x38b150=[];if(_0x548c70?.[_0x4786b1(0x6f1)](_0x4786b1(0x1a9)))for(const {key:_0x3c6b74,value:_0x40ffd2}of _0x548c70[_0x4786b1(0x3c9)](_0x4786b1(0x1a9))){_0x38b150[_0x4786b1(0x557)]({'key':_0x3c6b74,'value':_0x40ffd2});}return{'identity':_0x279e47,'licenses':_0x38b150};});}catch(_0x200224){console[_0x4c5022(0x689)](_0x4c5022(0x7b3)+_0x200224[_0x4c5022(0x81d)]+_0x4c5022(0x4cb));}_0x372f01[_0x4c5022(0x6c7)](_0xf9843,{'recursive':!![],'force':!![]}),console['log'](_0x4c5022(0x5a9)+_0xf9843+_0x4c5022(0x222));if(_0x197283&&(_0x197283['identity']||_0x197283[_0x4c5022(0x4ba)][_0x4c5022(0x6ad)]>0x0))try{await _0x35ea7b(_0xf9843,_0x4b341c,async _0x192539=>{const _0x5d9dd4=_0x4c5022,_0x2daa1a=_0x192539[_0x5d9dd4(0x736)];_0x197283[_0x5d9dd4(0x4cf)]&&_0x2daa1a['db'][_0x5d9dd4(0x422)]('__identity',_0x197283['identity']);if(_0x197283[_0x5d9dd4(0x4ba)][_0x5d9dd4(0x6ad)]>0x0){if(!_0x2daa1a[_0x5d9dd4(0x6f1)]('~licenses'))await _0x2daa1a[_0x5d9dd4(0x2ba)]('~licenses');for(const {key:_0x8d5dbc,value:_0x25c25f}of _0x197283['licenses']){await _0x2daa1a[_0x5d9dd4(0x25f)]('~licenses',_0x8d5dbc,_0x25c25f);}}});const _0x3c74d2=[];if(_0x197283['identity'])_0x3c74d2[_0x4c5022(0x557)](_0x4c5022(0x576));if(_0x197283['licenses']['length']>0x0)_0x3c74d2[_0x4c5022(0x557)](_0x197283['licenses']['length']+_0x4c5022(0x8ae));console['log'](_0x4c5022(0x362)+_0x3c74d2[_0x4c5022(0x1c9)]('\x20+\x20'));}catch(_0x482052){console['log'](_0x4c5022(0x80f)+_0x482052[_0x4c5022(0x81d)]);}}async function _0x35ea7b(_0x20c880,_0x3ad3cd,_0x21ead0){const _0x5001ae=_0x92a1c9,_0x2a675b=require$$5$1,_0x7b99e=new _0x2a675b(_0x20c880,{'admin':![],'mcp':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],..._0xef2b40(_0x3ad3cd)});await _0x7b99e['open']();try{return await _0x21ead0(_0x7b99e);}finally{await _0x7b99e[_0x5001ae(0x6e0)]();}}async function _0x3fa566(_0x302001,_0x4994ca){const _0x391ca6=_0x92a1c9,_0x9025c3=require$$5$1,_0x45772d=_0x3e45a6[_0x391ca6(0x8c2)](_0x4994ca[_0x391ca6(0x336)]);console[_0x391ca6(0x689)](_0x391ca6(0x731)+_0x45772d+'…');const _0x3c30eb=new _0x9025c3(_0x45772d,_0xef2b40(_0x4994ca));await _0x3c30eb[_0x391ca6(0x5f0)](),console['log'](_0x391ca6(0x3e6)+_0x302001+'…');const {envs:_0x305323,blobs:_0x2e62ee,skipped:_0x4ed2fb}=await _0x3c30eb[_0x391ca6(0x60c)][_0x391ca6(0x7b4)](_0x302001);for(const _0x55839c of _0x305323){const _0x1f8e2e=_0x55839c['sizeBefore']>0x0?'\x20\x20('+(_0x55839c[_0x391ca6(0x7cf)]/0x400/0x400)[_0x391ca6(0x39b)](0x2)+'\x20MB\x20→\x20'+(_0x55839c[_0x391ca6(0x383)]/0x400/0x400)[_0x391ca6(0x39b)](0x2)+_0x391ca6(0x22f):'';console[_0x391ca6(0x689)]('\x20\x20✓\x20'+_0x55839c[_0x391ca6(0x4f9)]+_0x391ca6(0x85d)+_0x55839c[_0x391ca6(0x260)]+_0x1f8e2e+(_0x55839c['timeMachine']?_0x391ca6(0x808):''));}if(_0x2e62ee['count']>0x0)console['log'](_0x391ca6(0x33d)+_0x2e62ee[_0x391ca6(0x430)]+'\x20files)');for(const _0x2639db of _0x4ed2fb)console[_0x391ca6(0x689)]('\x20\x20✗\x20'+_0x2639db['name']+_0x391ca6(0x37f)+_0x2639db[_0x391ca6(0x4f3)]);await _0x3c30eb[_0x391ca6(0x6e0)](),console[_0x391ca6(0x689)](_0x391ca6(0x6ca));}async function _0x43d6cf(_0x2b014e,_0x2d611a,_0x11a90d={}){const _0x2ef108=_0x92a1c9,{BACKUP_MANIFEST:_0x3afb63}=requireOkdbMigrate(),_0x3cf400=_0x3e45a6['resolve'](_0x2d611a['dbPath']),_0x2cda15=_0x3e45a6[_0x2ef108(0x1c9)](_0x2b014e,_0x3afb63);if(!_0x372f01[_0x2ef108(0x5b6)](_0x2cda15))throw new Error(_0x2b014e+_0x2ef108(0x19c)+_0x3afb63+')');const _0x3a038e=JSON[_0x2ef108(0x7d3)](_0x372f01[_0x2ef108(0x308)](_0x2cda15,'utf8')),_0x201b1b=_0x3e45a6['relative'](_0x2b014e,_0x3cf400);if(_0x201b1b===''||!(_0x201b1b[_0x2ef108(0x579)]('..')||_0x3e45a6['isAbsolute'](_0x201b1b)))throw new Error(_0x2ef108(0x4e1)+_0x3cf400+_0x2ef108(0x414)+_0x2b014e);if(_0x372f01[_0x2ef108(0x5b6)](_0x3cf400)&&_0x372f01[_0x2ef108(0x859)](_0x3cf400)[_0x2ef108(0x6ad)]>0x0)throw new Error(_0x2ef108(0x4e1)+_0x3cf400+'\x20is\x20not\x20empty\x20—\x20restore\x20only\x20into\x20a\x20new\x20or\x20empty\x20directory');console['log'](_0x2ef108(0x31b)+_0x2b014e+_0x2ef108(0x317)+_0x3a038e[_0x2ef108(0x2d8)]+',\x20'+_0x3a038e['createdAt']+_0x2ef108(0x271)+_0x3cf400+'…'),_0x372f01[_0x2ef108(0x3a4)](_0x2b014e,_0x3cf400,{'recursive':!![],'errorOnExist':!![]});for(const _0x18b0f1 of _0x3a038e[_0x2ef108(0x7f3)]??[]){console['log'](_0x2ef108(0x524)+_0x18b0f1[_0x2ef108(0x4f9)]+(_0x18b0f1['timeMachine']?_0x2ef108(0x808):'')),_0x18b0f1[_0x2ef108(0x209)]&&_0x18b0f1['sourcePath']&&_0x372f01['existsSync'](_0x18b0f1[_0x2ef108(0x73d)])&&console['log'](_0x2ef108(0x335)+_0x18b0f1['name']+_0x2ef108(0x1e4)+_0x18b0f1['sourcePath']+',\x20which\x20still\x20exists\x20—\x20the\x20restored\x20'+('store\x20will\x20open\x20THAT\x20directory,\x20not\x20the\x20copy\x20in\x20'+_0x18b0f1[_0x2ef108(0x4a8)]+'.\x20Move\x20it\x20away\x20first\x20to\x20use\x20the\x20copy.'));}_0x11a90d['newIdentity']&&(require$$5$1['reidentify'](_0x3cf400),console[_0x2ef108(0x689)](_0x2ef108(0x1de))),console['log'](_0x2ef108(0x475));}async function _0x48f8f9(_0x2622d2,_0x99cced,_0xa5ee01){const _0x4f5bf=_0x92a1c9,_0x3c2aff=require$$5$1,_0x32da99=_0x3e45a6[_0x4f5bf(0x8c2)](_0x99cced[_0x4f5bf(0x336)]),_0x241b94=_0xa5ee01[_0x4f5bf(0x787)]??'default',_0xe10aec=_0xa5ee01[_0x4f5bf(0x427)]?_0xa5ee01[_0x4f5bf(0x427)][_0x4f5bf(0x84e)](',')[_0x4f5bf(0x595)](_0x20940a=>_0x20940a['trim']()):null;console['log']('[okdb]\x20opening\x20'+_0x32da99+'…');const _0x4b958b=new _0x3c2aff(_0x32da99,_0xef2b40(_0x99cced));await _0x4b958b[_0x4f5bf(0x5f0)](),console[_0x4f5bf(0x689)](_0x4f5bf(0x22a)+_0x241b94+_0x4f5bf(0x61b)+_0x2622d2+'…');const _0x2e5270=await _0x4b958b[_0x4f5bf(0x60c)][_0x4f5bf(0x7e3)](_0x2622d2,{'envName':_0x241b94,'types':_0xe10aec,'includeChanges':!!_0xa5ee01[_0x4f5bf(0x330)]});console[_0x4f5bf(0x689)](_0x4f5bf(0x288)+_0x2e5270[_0x4f5bf(0x427)]+_0x4f5bf(0x4e6)+_0x2e5270['records']+_0x4f5bf(0x764)+_0x2e5270[_0x4f5bf(0x330)]);if(_0xa5ee01[_0x4f5bf(0x457)]){const _0x5293f9=_0x3e45a6[_0x4f5bf(0x1c9)](_0x3e45a6[_0x4f5bf(0x836)](_0x2622d2),_0x4f5bf(0x457));process[_0x4f5bf(0x498)][_0x4f5bf(0x82b)](_0x4f5bf(0x871));const {count:_0x5b2f7d,bytes:_0x1770dc}=await _0x4b958b[_0x4f5bf(0x60c)]['exportBlobs'](_0x5293f9);console[_0x4f5bf(0x689)](_0x4f5bf(0x5b9)+_0x5293f9+_0x4f5bf(0x8c8)+_0x5b2f7d+'\x20file'+(_0x5b2f7d!==0x1?'s':'')+',\x20'+(_0x1770dc/0x400/0x400)[_0x4f5bf(0x39b)](0x2)+'\x20MB)');}await _0x4b958b[_0x4f5bf(0x6e0)](),console[_0x4f5bf(0x689)](_0x4f5bf(0x21e));}async function _0x3a1cbd(_0x56555c,_0x14b08a,_0x583870){const _0xcc23c1=_0x92a1c9,_0x38ac39=require$$5$1,_0x28fcce=_0x3e45a6[_0xcc23c1(0x8c2)](_0x14b08a[_0xcc23c1(0x336)]),_0x39aa55=_0x583870[_0xcc23c1(0x787)]??null,_0x257e5e=_0x583870[_0xcc23c1(0x427)]?_0x583870[_0xcc23c1(0x427)][_0xcc23c1(0x84e)](',')[_0xcc23c1(0x595)](_0x469dff=>_0x469dff[_0xcc23c1(0x48b)]()):null,_0x2e580d=!!_0x583870[_0xcc23c1(0x2f6)];console[_0xcc23c1(0x689)](_0xcc23c1(0x731)+_0x28fcce+'…');const _0x2914aa=new _0x38ac39(_0x28fcce,_0xef2b40(_0x14b08a));await _0x2914aa[_0xcc23c1(0x5f0)](),console['log'](_0xcc23c1(0x197)+_0x56555c+'…');const _0x55baff=await _0x2914aa[_0xcc23c1(0x60c)]['importFromFile'](_0x56555c,{'envName':_0x39aa55,'types':_0x257e5e,'dropExisting':_0x2e580d,'includeChanges':!!_0x583870[_0xcc23c1(0x330)],'onProgress':({type:_0x1776ff,count:_0x4c017b})=>{const _0x3ca679=_0xcc23c1;process[_0x3ca679(0x498)][_0x3ca679(0x82b)](_0x3ca679(0x221)+_0x1776ff+':\x20'+_0x4c017b+_0x3ca679(0x50f));}});process[_0xcc23c1(0x498)][_0xcc23c1(0x82b)]('\x0a'),console[_0xcc23c1(0x689)](_0xcc23c1(0x35a)+_0x55baff[_0xcc23c1(0x427)]+_0xcc23c1(0x4e6)+_0x55baff[_0xcc23c1(0x333)]+_0xcc23c1(0x764)+_0x55baff[_0xcc23c1(0x330)]);if(_0x583870[_0xcc23c1(0x457)]){const _0x1dbf25=_0x3e45a6[_0xcc23c1(0x1c9)](_0x3e45a6[_0xcc23c1(0x836)](_0x56555c),_0xcc23c1(0x457));if(_0x372f01[_0xcc23c1(0x5b6)](_0x1dbf25)){const {imported:_0x43f298,skipped:_0x29873e}=await _0x2914aa[_0xcc23c1(0x60c)][_0xcc23c1(0x268)](_0x1dbf25);console[_0xcc23c1(0x689)](_0xcc23c1(0x660)+_0x43f298+_0xcc23c1(0x5e2)+_0x29873e);}}await _0x2914aa[_0xcc23c1(0x6e0)](),console[_0xcc23c1(0x689)](_0xcc23c1(0x54c));}async function _0x80db64(_0x4b37b9,_0x598e71){const _0x35eac1=_0x92a1c9;_0x598e71['password']&&!_0x598e71[_0x35eac1(0x4f9)]&&(console[_0x35eac1(0x6cd)](_0x35eac1(0x6fb)),process[_0x35eac1(0x468)](0x1));const _0x1895b4=_0x598e71[_0x35eac1(0x496)]?_0x598e71[_0x35eac1(0x496)][_0x35eac1(0x84e)](',')['map'](_0x26a748=>_0x26a748['trim']())[_0x35eac1(0x542)](Boolean):[];let _0x253eed={};if(_0x598e71[_0x35eac1(0x6fd)])try{_0x253eed=JSON[_0x35eac1(0x7d3)](_0x598e71['grants']);if(typeof _0x253eed!=='object'||Array[_0x35eac1(0x59b)](_0x253eed)||_0x253eed===null)throw new Error();}catch{console[_0x35eac1(0x6cd)](_0x35eac1(0x4df)),process[_0x35eac1(0x468)](0x1);}const _0x3b98a9=require$$5$1,{randomToken:_0x511f1b,hashToken:_0x54505d,hashPassword:_0x4b078d}=requireOkdbAuthTokens(),_0x4f9314=require$$2$1,_0x20328c=_0x3e45a6[_0x35eac1(0x8c2)](_0x4b37b9[_0x35eac1(0x336)]),_0x51f5ae=new _0x3b98a9(_0x20328c,_0xef2b40(_0x4b37b9));await _0x51f5ae['open']();try{await _0x51f5ae[_0x35eac1(0x716)][_0x35eac1(0x586)]();if(_0x598e71['name']){const _0x231cde=await _0x51f5ae[_0x35eac1(0x716)][_0x35eac1(0x483)](_0x598e71[_0x35eac1(0x4f9)]);_0x231cde&&(console['error'](_0x35eac1(0x4f7)+_0x598e71[_0x35eac1(0x4f9)]+_0x35eac1(0x22c)),process['exit'](0x1));}const _0x2b161e=_0x511f1b(0x20),_0xe17521=_0x54505d(_0x2b161e),_0x476d86=_0x598e71['password']?await _0x4b078d(_0x598e71[_0x35eac1(0x23e)]):null,_0x2a29e9=_0x4f9314['randomUUID'](),_0x60c3ac={'tokenHash':_0xe17521,'name':_0x598e71[_0x35eac1(0x4f9)]||null,'passwordHash':_0x476d86,'label':_0x598e71[_0x35eac1(0x37e)]||null,'permissions':_0x1895b4,'grants':_0x253eed,'createdAt':Date[_0x35eac1(0x4ec)](),'lastUsedAt':null},_0x15f165=_0x598e71[_0x35eac1(0x7b0)]?{'ttl':Number(_0x598e71[_0x35eac1(0x7b0)])}:undefined;await _0x51f5ae[_0x35eac1(0x736)][_0x35eac1(0x25f)](_0x35eac1(0x4b1),_0x2a29e9,_0x60c3ac,_0x15f165),console[_0x35eac1(0x689)](_0x35eac1(0x8b8)),console[_0x35eac1(0x689)](_0x35eac1(0x34e)+_0x2a29e9),console[_0x35eac1(0x689)](_0x35eac1(0x46f)+(_0x598e71['name']||_0x35eac1(0x3a1))),console[_0x35eac1(0x689)](_0x35eac1(0x71f)+(_0x598e71[_0x35eac1(0x37e)]||_0x35eac1(0x3a1))),console[_0x35eac1(0x689)](_0x35eac1(0x376)+(_0x1895b4['join'](',\x20')||_0x35eac1(0x6d5))),console[_0x35eac1(0x689)](_0x35eac1(0x1f7)),console[_0x35eac1(0x689)](_0x35eac1(0x86f)+_0x2b161e+'\x0a');}finally{await _0x51f5ae[_0x35eac1(0x6e0)]();}}async function _0x496bc3(_0x1d6119){const _0x285be5=_0x92a1c9,_0x345d94=require$$5$1,_0x29ae2e=_0x3e45a6['resolve'](_0x1d6119['dbPath']),_0xf550b9=new _0x345d94(_0x29ae2e,_0xef2b40(_0x1d6119));await _0xf550b9[_0x285be5(0x5f0)]();try{const _0x45e868=_0xf550b9[_0x285be5(0x736)];if(!_0x45e868||!_0x45e868[_0x285be5(0x6f1)]('~tokens')){console['log'](_0x285be5(0x57e));return;}const _0x97c847=[];for(const {key:_0x159dbe,value:_0x4c858d}of _0x45e868['getRange'](_0x285be5(0x4b1))){_0x97c847['push']({'id':_0x159dbe,'name':_0x4c858d['name']||_0x285be5(0x3a1),'label':_0x4c858d[_0x285be5(0x37e)]||_0x285be5(0x3a1),'permissions':Array[_0x285be5(0x59b)](_0x4c858d['permissions'])?_0x4c858d[_0x285be5(0x496)][_0x285be5(0x1c9)](','):'','created':_0x4c858d[_0x285be5(0x6d4)]?new Date(_0x4c858d[_0x285be5(0x6d4)])[_0x285be5(0x611)]()[_0x285be5(0x27f)](0x0,0xa):''});}if(_0x97c847[_0x285be5(0x6ad)]===0x0){console[_0x285be5(0x689)](_0x285be5(0x57e));return;}const _0x42329d=!process[_0x285be5(0x498)][_0x285be5(0x1dc)]||process[_0x285be5(0x498)][_0x285be5(0x1dc)]>=0x64,_0x960533=_0x42329d?0x24:0xa,_0x465cf0=['ID'[_0x285be5(0x708)](_0x960533),_0x285be5(0x7f8)[_0x285be5(0x708)](0x10),_0x285be5(0x23c)['padEnd'](0x14),_0x285be5(0x6bd)[_0x285be5(0x708)](0x14),_0x285be5(0x1a4)][_0x285be5(0x1c9)]('\x20\x20');console[_0x285be5(0x689)]('\x0a'+_0x465cf0),console['log']('-'[_0x285be5(0x2f5)](_0x465cf0['length']));for(const _0x5cb9e9 of _0x97c847){const _0x5e81aa=_0x42329d?_0x5cb9e9['id']:_0x5cb9e9['id'][_0x285be5(0x27f)](0x0,0x8)+'…';console[_0x285be5(0x689)]([_0x5e81aa[_0x285be5(0x708)](_0x960533),_0x5cb9e9[_0x285be5(0x4f9)][_0x285be5(0x27f)](0x0,0x10)['padEnd'](0x10),_0x5cb9e9[_0x285be5(0x37e)][_0x285be5(0x27f)](0x0,0x14)['padEnd'](0x14),_0x5cb9e9['permissions']['slice'](0x0,0x14)[_0x285be5(0x708)](0x14),_0x5cb9e9[_0x285be5(0x516)]]['join']('\x20\x20'));}console['log']('');}finally{await _0xf550b9['close']();}}async function _0x2a5f71(_0x31f9cd,_0x44698e){const _0x4d4392=_0x92a1c9;!_0x31f9cd&&(console[_0x4d4392(0x6cd)]('[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument'),process[_0x4d4392(0x468)](0x1));const _0x2c3eef=require$$5$1,_0x148f11=_0x3e45a6['resolve'](_0x44698e[_0x4d4392(0x336)]),_0x35166f=new _0x2c3eef(_0x148f11,_0xef2b40(_0x44698e));await _0x35166f[_0x4d4392(0x5f0)]();try{const _0x2ec7c9=_0x35166f[_0x4d4392(0x736)];(!_0x2ec7c9||!_0x2ec7c9[_0x4d4392(0x6f1)](_0x4d4392(0x4b1)))&&(console[_0x4d4392(0x6cd)]('[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22'+_0x31f9cd+'\x22'),process['exit'](0x1));let _0x32f361=null,_0x377605=null;const _0x33732c=_0x2ec7c9[_0x4d4392(0x2fa)](_0x4d4392(0x4b1),_0x31f9cd);if(_0x33732c)_0x32f361=_0x31f9cd,_0x377605=_0x33732c;else{const _0x3301a9=[];for(const {key:_0x1de98d,value:_0x1dc89a}of _0x2ec7c9[_0x4d4392(0x3c9)](_0x4d4392(0x4b1))){if(_0x1de98d[_0x4d4392(0x579)](_0x31f9cd))_0x3301a9[_0x4d4392(0x557)]({'key':_0x1de98d,'value':_0x1dc89a});}_0x3301a9[_0x4d4392(0x6ad)]===0x0&&(console[_0x4d4392(0x6cd)](_0x4d4392(0x7f1)+_0x31f9cd+'\x22'),process[_0x4d4392(0x468)](0x1));if(_0x3301a9[_0x4d4392(0x6ad)]>0x1){console[_0x4d4392(0x6cd)](_0x4d4392(0x820)+_0x31f9cd+_0x4d4392(0x489)+_0x3301a9['length']+_0x4d4392(0x6f9));for(const _0x137462 of _0x3301a9){console[_0x4d4392(0x6cd)]('\x20\x20'+_0x137462[_0x4d4392(0x47f)]+'\x20\x20(name:\x20'+(_0x137462[_0x4d4392(0x352)][_0x4d4392(0x4f9)]||_0x4d4392(0x3a1))+')');}process['exit'](0x1);}_0x32f361=_0x3301a9[0x0][_0x4d4392(0x47f)],_0x377605=_0x3301a9[0x0][_0x4d4392(0x352)];}await _0x2ec7c9[_0x4d4392(0x417)]('~tokens',_0x32f361),console['log'](_0x4d4392(0x26d)+_0x32f361+_0x4d4392(0x622)+(_0x377605['name']||_0x4d4392(0x3a1))+',\x20label:\x20'+(_0x377605[_0x4d4392(0x37e)]||'(unset)')+')');}finally{await _0x35166f[_0x4d4392(0x6e0)]();}}function _0x46ace7(_0x12136e,_0x20d421){const _0x4b785e=_0x92a1c9;if(!_0x12136e[_0x4b785e(0x589)])return _0x4b785e(0x242);const _0xc076c4=_0x12136e[_0x4b785e(0x282)];if(!_0xc076c4)return'active';if(_0x20d421>_0xc076c4)return _0x4b785e(0x537);return _0x4b785e(0x676);}function _0x313f80(_0x485d40){const _0x503816=_0x92a1c9;if(!_0x485d40||typeof _0x485d40!==_0x503816(0x601))return'';const _0x3e70cd=Object[_0x503816(0x87f)](_0x485d40)[_0x503816(0x542)](([,_0x44b057])=>_0x44b057)[_0x503816(0x595)](([_0x1e8688])=>_0x1e8688);if(_0x3e70cd[_0x503816(0x6ad)]===0x0)return _0x503816(0x6d5);if(_0x3e70cd[_0x503816(0x6ad)]<=0x3)return _0x3e70cd[_0x503816(0x1c9)]('\x20');return _0x3e70cd[_0x503816(0x27f)](0x0,0x3)[_0x503816(0x1c9)]('\x20')+('\x20+'+(_0x3e70cd['length']-0x3));}async function _0x3abaf8(_0x15a47d){const _0x2fd173=_0x92a1c9,_0x53a115=require$$5$1,_0x2ae5b8=requireOkdbLicenseCodec(),{_C:_0x447ed4}=requireOkdbLicense(),_0x347d72=_0x3e45a6[_0x2fd173(0x8c2)](_0x15a47d[_0x2fd173(0x336)]),_0x4e3478=new _0x53a115(_0x347d72,_0xef2b40(_0x15a47d));await _0x4e3478[_0x2fd173(0x5f0)]();try{const _0x431530=_0x4e3478[_0x2fd173(0x736)],_0x2616ec=_0x431530?.['db']?.[_0x2fd173(0x2fa)]?.(_0x2fd173(0x768))??0x0,_0x55421c=[..._0x4e3478[_0x2fd173(0x41e)][_0x2fd173(0x818)]()]['filter'](_0xa3adb8=>!_0xa3adb8[_0x2fd173(0x579)]('~'))[_0x2fd173(0x6ad)],_0x3d81e5=_0x4e3478[_0x2fd173(0x502)]?.[_0x2fd173(0x1ac)];if(_0x3d81e5){const _0x4ff578=_0x3d81e5['_isFree']===!![],_0xf499ad=_0x4ff578?_0x2fd173(0x5bb):_0x4e3478['_license'][_0x2fd173(0x676)]?.[_0x2fd173(0x53d)]||_0x2fd173(0x7dd);console[_0x2fd173(0x689)](''),console[_0x2fd173(0x689)](_0x2fd173(0x3a8)+_0xf499ad);const _0x114548=_0x3d81e5['limits']||{};if(_0x114548[_0x2fd173(0x1e0)]){const _0x1425d3=Math['round'](_0x2616ec/_0x114548[_0x2fd173(0x1e0)]*0x64);console[_0x2fd173(0x689)]('\x20\x20Writes:\x20\x20'+_0x2616ec[_0x2fd173(0x684)]()+'\x20/\x20'+_0x114548[_0x2fd173(0x1e0)][_0x2fd173(0x684)]()+_0x2fd173(0x8c8)+_0x1425d3+'%)');}else console[_0x2fd173(0x689)](_0x2fd173(0x7ee)+_0x2616ec[_0x2fd173(0x684)]());_0x114548[_0x2fd173(0x7f3)]?console['log'](_0x2fd173(0x5da)+_0x55421c+_0x2fd173(0x20b)+_0x114548[_0x2fd173(0x7f3)]):console[_0x2fd173(0x689)]('\x20\x20Envs:\x20\x20\x20\x20'+_0x55421c),_0x447ed4?.['PUB_FINGERPRINT']&&console[_0x2fd173(0x689)](_0x2fd173(0x751)+_0x447ed4[_0x2fd173(0x476)]+_0x2fd173(0x31a));}if(!_0x431530||!_0x431530['hasType'](_0x2fd173(0x1a9))){console['log'](''),console['log'](_0x2fd173(0x72b)),console[_0x2fd173(0x689)]('');return;}const _0x2be9f4=[],_0x5a184d=Date[_0x2fd173(0x4ec)](),_0x15cb26=_0x4e3478['id'],_0x50c076=_0x2fd173(0x720);for(const {key:_0x2719ff,value:_0xe72de4}of _0x431530[_0x2fd173(0x3c9)](_0x2fd173(0x1a9))){const _0x4efc47=_0xe72de4[_0x2fd173(0x55f)]?Buffer['from'](_0xe72de4[_0x2fd173(0x55f)],'hex'):Buffer[_0x2fd173(0x2fe)](0x8);let _0x1c48d0='';try{_0x1c48d0=_0x2ae5b8[_0x2fd173(0x741)](_0x15cb26,_0x4efc47,_0x50c076)[_0x2fd173(0x385)];}catch{}_0x2be9f4[_0x2fd173(0x557)]({'id':_0x2719ff,'licensee':_0xe72de4[_0x2fd173(0x53d)]||'','expires':_0xe72de4[_0x2fd173(0x282)]?new Date(_0xe72de4[_0x2fd173(0x282)])[_0x2fd173(0x611)]()['slice'](0x0,0xa):'','features':_0x313f80(_0xe72de4['features']),'pin':_0x1c48d0,'status':_0x46ace7(_0xe72de4,_0x5a184d)});}if(_0x2be9f4[_0x2fd173(0x6ad)]===0x0){console[_0x2fd173(0x689)](''),console[_0x2fd173(0x689)](_0x2fd173(0x72b)),console[_0x2fd173(0x689)]('');return;}const _0x5fadab=['\x20\x20'+'ID'[_0x2fd173(0x708)](0xe),_0x2fd173(0x538)[_0x2fd173(0x708)](0xe),'EXPIRES'[_0x2fd173(0x708)](0xc),_0x2fd173(0x43a)[_0x2fd173(0x708)](0x1e),_0x2fd173(0x5f3)[_0x2fd173(0x708)](0xa),_0x2fd173(0x795)][_0x2fd173(0x1c9)]('\x20');console[_0x2fd173(0x689)]('\x0a'+_0x5fadab);for(const _0x5adbf4 of _0x2be9f4){const _0x4801ed=_0x5adbf4['id'][_0x2fd173(0x27f)](0x0,0x8)+'\u2026';console[_0x2fd173(0x689)](['\x20\x20'+_0x4801ed[_0x2fd173(0x708)](0xe),_0x5adbf4[_0x2fd173(0x53d)][_0x2fd173(0x27f)](0x0,0xe)[_0x2fd173(0x708)](0xe),_0x5adbf4[_0x2fd173(0x1ed)][_0x2fd173(0x708)](0xc),_0x5adbf4[_0x2fd173(0x257)][_0x2fd173(0x27f)](0x0,0x1e)['padEnd'](0x1e),_0x5adbf4['pin']['padEnd'](0xa),_0x5adbf4[_0x2fd173(0x2c4)]][_0x2fd173(0x1c9)]('\x20'));}console[_0x2fd173(0x689)]('');}finally{await _0x4e3478[_0x2fd173(0x6e0)]();}}async function _0x4ccb98(_0x177919,_0x5684d2){const _0x4ccd2c=_0x92a1c9,_0x11b02b=require$$5$1,_0x466813=requireOkdbLicenseCodec();let _0x17a891=_0x177919;(_0x466813[_0x4ccd2c(0x3bb)](_0x177919)===_0x4ccd2c(0x5be)||_0x372f01['existsSync'](_0x177919)&&_0x372f01['statSync'](_0x177919)['isFile']())&&(_0x17a891=_0x372f01[_0x4ccd2c(0x308)](_0x177919,_0x4ccd2c(0x88a))[_0x4ccd2c(0x48b)]());const _0x7bf2eb=_0x3e45a6[_0x4ccd2c(0x8c2)](_0x5684d2[_0x4ccd2c(0x336)]),_0x892e38=new _0x11b02b(_0x7bf2eb,_0xef2b40(_0x5684d2));await _0x892e38['open']();try{let _0x2f9ba5;try{_0x2f9ba5=await _0x892e38[_0x4ccd2c(0x4ba)]['add']({'blob':_0x17a891});}catch(_0x79a294){console[_0x4ccd2c(0x6cd)](_0x4ccd2c(0x320)+_0x79a294[_0x4ccd2c(0x81d)]),process['exit'](0x1);}const _0x322a29=_0x2f9ba5[_0x4ccd2c(0x385)]||'',_0x1fb697=Object['entries'](_0x2f9ba5[_0x4ccd2c(0x257)]||{})[_0x4ccd2c(0x542)](([,_0x19003d])=>_0x19003d)[_0x4ccd2c(0x595)](([_0x17bccd])=>_0x17bccd),_0x2851a3=_0x2f9ba5[_0x4ccd2c(0x5b3)]||{},_0x43cea4=[_0x2851a3[_0x4ccd2c(0x7f3)]?_0x4ccd2c(0x5b0)+_0x2851a3[_0x4ccd2c(0x7f3)]:null,_0x2851a3[_0x4ccd2c(0x340)]?_0x4ccd2c(0x561)+_0x2851a3['typesPerEnv']:null,_0x2851a3['syncPeers']?'peers='+_0x2851a3[_0x4ccd2c(0x1c8)]:null,_0x2851a3[_0x4ccd2c(0x1e0)]?_0x4ccd2c(0x2e7)+_0x2851a3[_0x4ccd2c(0x1e0)][_0x4ccd2c(0x684)]():null]['filter'](Boolean)[_0x4ccd2c(0x1c9)]('\x20\x20'),_0x143c83=_0x2f9ba5[_0x4ccd2c(0x4fa)]!==_0x4ccd2c(0x382);console[_0x4ccd2c(0x689)](_0x2f9ba5[_0x4ccd2c(0x7e5)]?_0x4ccd2c(0x313):_0x4ccd2c(0x301)),console[_0x4ccd2c(0x689)](_0x4ccd2c(0x363)+_0x2f9ba5['id']),console['log']('\x20\x20\x20\x20licensee:\x20\x20'+_0x2f9ba5[_0x4ccd2c(0x53d)]),console[_0x4ccd2c(0x689)](_0x4ccd2c(0x811)+(_0x2f9ba5[_0x4ccd2c(0x282)]?new Date(_0x2f9ba5[_0x4ccd2c(0x282)])[_0x4ccd2c(0x611)]()[_0x4ccd2c(0x27f)](0x0,0xa):_0x4ccd2c(0x456))),console['log'](_0x4ccd2c(0x63f)+(_0x1fb697[_0x4ccd2c(0x1c9)](',\x20')||_0x4ccd2c(0x6d5)));if(_0x43cea4)console[_0x4ccd2c(0x689)]('\x20\x20\x20\x20limits:\x20\x20\x20\x20'+_0x43cea4);if(_0x143c83)console[_0x4ccd2c(0x689)]('\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20('+_0x2f9ba5[_0x4ccd2c(0x4fa)]+'\x20license\x20—\x20no\x20activation\x20needed)'),console['log']('');else!_0x2f9ba5[_0x4ccd2c(0x337)]?(console[_0x4ccd2c(0x689)](_0x4ccd2c(0x38a)+_0x2f9ba5[_0x4ccd2c(0x2c4)]),console[_0x4ccd2c(0x689)]('')):(console[_0x4ccd2c(0x689)](_0x4ccd2c(0x874)+_0x322a29),console['log'](_0x4ccd2c(0x410)),console[_0x4ccd2c(0x689)](''),console[_0x4ccd2c(0x689)]('\x20\x20Next\x20step\x20\u2014\x20activate\x20the\x20license:'),console[_0x4ccd2c(0x689)]('\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20('+_0x322a29+_0x4ccd2c(0x4b7)),console[_0x4ccd2c(0x689)](_0x4ccd2c(0x2f2)),console[_0x4ccd2c(0x689)]('\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>'),console['log'](''));}finally{await _0x892e38[_0x4ccd2c(0x6e0)]();}}async function _0x58e7e9(_0xb80d9b,_0x5828cb){const _0x2aa5b2=_0x92a1c9,_0x5600ca=require$$5$1,_0x5ddc9e=_0x3e45a6[_0x2aa5b2(0x8c2)](_0x5828cb[_0x2aa5b2(0x336)]),_0x22f47d=new _0x5600ca(_0x5ddc9e,_0xef2b40(_0x5828cb));await _0x22f47d[_0x2aa5b2(0x5f0)]();try{let _0x51c191;try{_0x51c191=await _0x22f47d['licenses'][_0x2aa5b2(0x737)](_0xb80d9b);}catch(_0x2f6e88){console[_0x2aa5b2(0x6cd)](_0x2aa5b2(0x320)+_0x2f6e88[_0x2aa5b2(0x81d)]),console[_0x2aa5b2(0x6cd)](''),console[_0x2aa5b2(0x6cd)]('\x20\x20Common\x20causes:'),console['error'](_0x2aa5b2(0x719)),console[_0x2aa5b2(0x6cd)](_0x2aa5b2(0x431)),console[_0x2aa5b2(0x6cd)](_0x2aa5b2(0x304)),console['error'](''),process['exit'](0x1);}console['log'](_0x2aa5b2(0x7cc)),console[_0x2aa5b2(0x689)](_0x2aa5b2(0x363)+_0x51c191['id']),console[_0x2aa5b2(0x689)]('\x20\x20\x20\x20licensee:\x20\x20'+_0x51c191['licensee']),console[_0x2aa5b2(0x689)](_0x2aa5b2(0x811)+(_0x51c191['expiresAt']?new Date(_0x51c191[_0x2aa5b2(0x282)])[_0x2aa5b2(0x611)]()[_0x2aa5b2(0x27f)](0x0,0xa):_0x2aa5b2(0x456))),console['log'](_0x2aa5b2(0x80e)),console['log']('');}finally{await _0x22f47d[_0x2aa5b2(0x6e0)]();}}async function _0x1bc1a4(_0x3a7ae7,_0x2b303a){const _0x2004a2=_0x92a1c9;!_0x3a7ae7&&(console[_0x2004a2(0x6cd)](_0x2004a2(0x295)),process[_0x2004a2(0x468)](0x1));const _0x58993c=require$$5$1,_0x523d76=requireOkdbLicenseCodec(),_0x2c8542=_0x3e45a6[_0x2004a2(0x8c2)](_0x2b303a[_0x2004a2(0x336)]),_0x358e13=new _0x58993c(_0x2c8542,_0xef2b40(_0x2b303a));await _0x358e13[_0x2004a2(0x5f0)]();try{const _0x5ce951=_0x358e13[_0x2004a2(0x736)];(!_0x5ce951||!_0x5ce951[_0x2004a2(0x6f1)]('~licenses'))&&(console['error'](_0x2004a2(0x68f)+_0x3a7ae7+'\x22'),process[_0x2004a2(0x468)](0x1));let _0x1683ba=null,_0xe1e2d5=null;const _0x34f423=_0x5ce951['get'](_0x2004a2(0x1a9),_0x3a7ae7);if(_0x34f423)_0x1683ba=_0x3a7ae7,_0xe1e2d5=_0x34f423;else{const _0x23d479=[];for(const {key:_0x1069bf,value:_0x5009b1}of _0x5ce951[_0x2004a2(0x3c9)](_0x2004a2(0x1a9))){if(_0x1069bf[_0x2004a2(0x579)](_0x3a7ae7))_0x23d479[_0x2004a2(0x557)]({'key':_0x1069bf,'value':_0x5009b1});}_0x23d479[_0x2004a2(0x6ad)]===0x0&&(console[_0x2004a2(0x6cd)](_0x2004a2(0x68f)+_0x3a7ae7+'\x22'),process[_0x2004a2(0x468)](0x1)),_0x23d479['length']>0x1&&(console[_0x2004a2(0x6cd)]('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x3a7ae7+_0x2004a2(0x489)+_0x23d479[_0x2004a2(0x6ad)]+_0x2004a2(0x378)),process[_0x2004a2(0x468)](0x1)),_0x1683ba=_0x23d479[0x0]['key'],_0xe1e2d5=_0x23d479[0x0][_0x2004a2(0x352)];}const _0xbcda0=Date[_0x2004a2(0x4ec)](),_0x50e4be=_0x46ace7(_0xe1e2d5,_0xbcda0),_0x399ddc=_0x358e13['id'],_0x36c890=_0x2004a2(0x720);let _0x2467c8='';try{const _0xf27e43=Buffer['from'](_0xe1e2d5[_0x2004a2(0x55f)],_0x2004a2(0x6b1));_0x2467c8=_0x523d76[_0x2004a2(0x741)](_0x399ddc,_0xf27e43,_0x36c890)[_0x2004a2(0x385)];}catch{}const _0x34f8da=_0xe1e2d5[_0x2004a2(0x257)]?Object[_0x2004a2(0x87f)](_0xe1e2d5[_0x2004a2(0x257)])[_0x2004a2(0x542)](([,_0x1f53f3])=>_0x1f53f3)[_0x2004a2(0x595)](([_0x30a9af])=>_0x30a9af):[],_0x2df3b6=_0xe1e2d5[_0x2004a2(0x5b3)]||{},_0x455168=_0x5ce951?.['db']?.[_0x2004a2(0x2fa)]?.(_0x2004a2(0x768))??0x0,_0x1a9566=[..._0x358e13[_0x2004a2(0x41e)][_0x2004a2(0x818)]()]['filter'](_0x5bba0f=>!_0x5bba0f[_0x2004a2(0x579)]('~'))[_0x2004a2(0x6ad)];console[_0x2004a2(0x689)]('\x0a\x20\x20License\x20details:'),console['log'](_0x2004a2(0x363)+_0x1683ba),console[_0x2004a2(0x689)](_0x2004a2(0x30f)+(_0xe1e2d5[_0x2004a2(0x53d)]||'')),console[_0x2004a2(0x689)]('\x20\x20\x20\x20expires:\x20\x20\x20'+(_0xe1e2d5['expiresAt']?new Date(_0xe1e2d5['expiresAt'])['toISOString']()['slice'](0x0,0xa):'')),console[_0x2004a2(0x689)](_0x2004a2(0x63f)+(_0x34f8da[_0x2004a2(0x1c9)](',\x20')||_0x2004a2(0x6d5))),console[_0x2004a2(0x689)](_0x2004a2(0x874)+_0x2467c8),console[_0x2004a2(0x689)]('\x20\x20\x20\x20status:\x20\x20\x20\x20'+_0x50e4be),console[_0x2004a2(0x689)](_0x2004a2(0x32f)+new Date(_0xe1e2d5[_0x2004a2(0x49f)])[_0x2004a2(0x611)]());if(_0x50e4be===_0x2004a2(0x676)){console['log'](''),console[_0x2004a2(0x689)]('\x20\x20Usage:');if(_0x2df3b6[_0x2004a2(0x1e0)]){const _0x55785b=Math[_0x2004a2(0x578)](_0x455168/_0x2df3b6['maxWrites']*0x64);console[_0x2004a2(0x689)]('\x20\x20\x20\x20writes:\x20\x20\x20\x20'+_0x455168[_0x2004a2(0x684)]()+'\x20/\x20'+_0x2df3b6['maxWrites'][_0x2004a2(0x684)]()+_0x2004a2(0x8c8)+_0x55785b+'%)');}else console[_0x2004a2(0x689)]('\x20\x20\x20\x20writes:\x20\x20\x20\x20'+_0x455168[_0x2004a2(0x684)]()+_0x2004a2(0x805));_0x2df3b6[_0x2004a2(0x7f3)]?console[_0x2004a2(0x689)](_0x2004a2(0x42c)+_0x1a9566+_0x2004a2(0x20b)+_0x2df3b6[_0x2004a2(0x7f3)]):console[_0x2004a2(0x689)](_0x2004a2(0x42c)+_0x1a9566+'\x20\x20(unlimited)');}console[_0x2004a2(0x689)]('');}finally{await _0x358e13[_0x2004a2(0x6e0)]();}}async function _0x1a746f(_0xe6d293,_0x63d1cb){const _0x76075d=_0x92a1c9;!_0xe6d293&&(console[_0x76075d(0x6cd)](_0x76075d(0x220)),process['exit'](0x1));const _0x358d20=require$$5$1,_0x4c4d2a=_0x3e45a6[_0x76075d(0x8c2)](_0x63d1cb[_0x76075d(0x336)]),_0x656440=new _0x358d20(_0x4c4d2a,_0xef2b40(_0x63d1cb));await _0x656440['open']();try{const _0xb3a405=_0x656440[_0x76075d(0x736)];(!_0xb3a405||!_0xb3a405[_0x76075d(0x6f1)](_0x76075d(0x1a9)))&&(console[_0x76075d(0x6cd)](_0x76075d(0x68f)+_0xe6d293+'\x22'),process[_0x76075d(0x468)](0x1));let _0x5d16fd=null,_0x9d670f=null;const _0x14aacf=_0xb3a405['get']('~licenses',_0xe6d293);if(_0x14aacf)_0x5d16fd=_0xe6d293,_0x9d670f=_0x14aacf;else{const _0x1b8377=[];for(const {key:_0x21c6ca,value:_0x595916}of _0xb3a405['getRange'](_0x76075d(0x1a9))){if(_0x21c6ca[_0x76075d(0x579)](_0xe6d293))_0x1b8377['push']({'key':_0x21c6ca,'value':_0x595916});}_0x1b8377[_0x76075d(0x6ad)]===0x0&&(console[_0x76075d(0x6cd)](_0x76075d(0x68f)+_0xe6d293+'\x22'),process['exit'](0x1)),_0x1b8377['length']>0x1&&(console['error'](_0x76075d(0x820)+_0xe6d293+_0x76075d(0x489)+_0x1b8377[_0x76075d(0x6ad)]+_0x76075d(0x378)),process[_0x76075d(0x468)](0x1)),_0x5d16fd=_0x1b8377[0x0][_0x76075d(0x47f)],_0x9d670f=_0x1b8377[0x0][_0x76075d(0x352)];}await _0xb3a405[_0x76075d(0x417)](_0x76075d(0x1a9),_0x5d16fd),console[_0x76075d(0x689)](_0x76075d(0x57a)+_0x5d16fd+_0x76075d(0x355)+(_0x9d670f[_0x76075d(0x53d)]||_0x76075d(0x3a1))+')');}finally{await _0x656440['close']();}}async function _0x4b5e60(_0x5eed63,_0x304961,_0x4eff57){const _0x1530a1=_0x92a1c9;!_0x5eed63&&(console[_0x1530a1(0x6cd)](_0x1530a1(0x36d)),process[_0x1530a1(0x468)](0x1));!_0x4eff57['token']&&!(_0x4eff57[_0x1530a1(0x479)]&&_0x4eff57['password'])&&(console['error']('[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>'),process['exit'](0x1));const _0x455d03=_0x4eff57['selfAddress']||_0x304961['sync']?.[_0x1530a1(0x27c)];!_0x455d03&&(console[_0x1530a1(0x6cd)](_0x1530a1(0x3c8)+_0x1530a1(0x2c3)+_0x1530a1(0x3d2)),process[_0x1530a1(0x468)](0x1));const _0x4d4665=require$$5$1,_0x59cf0a=new _0x4d4665(_0x304961[_0x1530a1(0x336)],{'sync':{'address':_0x455d03,'auto_reconcile':![]}});await _0x59cf0a[_0x1530a1(0x5f0)]();try{const _0x1c3d98=_0x59cf0a['_systemEnv'];if(_0x1c3d98&&_0x1c3d98[_0x1530a1(0x6f1)](_0x1530a1(0x4b1))){let _0x283a75=![];for(const _0x53694a of _0x1c3d98[_0x1530a1(0x3c9)](_0x1530a1(0x4b1))){_0x283a75=!![];break;}_0x283a75&&console['log']('\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a'+_0x1530a1(0x3e3));}console[_0x1530a1(0x689)](_0x1530a1(0x742)+_0x5eed63+'…'),await _0x59cf0a[_0x1530a1(0x6d9)][_0x1530a1(0x1c9)](_0x5eed63[_0x1530a1(0x813)](/\/+$/,''),{'token':_0x4eff57[_0x1530a1(0x527)],'username':_0x4eff57[_0x1530a1(0x479)],'password':_0x4eff57[_0x1530a1(0x23e)]}),console[_0x1530a1(0x689)](_0x1530a1(0x812)),console[_0x1530a1(0x689)](_0x1530a1(0x802));}finally{await _0x59cf0a[_0x1530a1(0x6e0)]();}}async function _0x2fb5ae(){const _0x4d1048=_0x92a1c9,_0x4ed9ab=Date[_0x4d1048(0x4ec)](),_0x3fbe6e=_0x4e5792(process[_0x4d1048(0x409)]),_0x1b208f=_0xc7735d(_0x3fbe6e),_0x4c4267=_0x3e45a6[_0x4d1048(0x8c2)](_0x1b208f[_0x4d1048(0x336)]);!_0x1b208f[_0x4d1048(0x74b)]&&!process[_0x4d1048(0x248)][_0x4d1048(0x670)]&&(_0x1b208f[_0x4d1048(0x74b)]=!![]);const _0x591d2d=require$$5$1,{start:_0x3220de,colorLog:_0x1e553c}=requireOkdbShell(),_0x66e75a=require$$1$1,_0xebee84={..._0x1b208f[_0x4d1048(0x47f)]?{'encryptionKey':_0x1b208f[_0x4d1048(0x47f)]}:{},..._0x1b208f[_0x4d1048(0x69b)]?{'admin':![]}:_0x5aa31d(_0x1b208f[_0x4d1048(0x1bb)])?{'admin':_0x1b208f[_0x4d1048(0x1bb)]}:{},..._0x5aa31d(_0x1b208f[_0x4d1048(0x2b1)])?{'api':_0x1b208f[_0x4d1048(0x2b1)]}:{},..._0x5aa31d(_0x1b208f[_0x4d1048(0x716)])?{'auth':_0x1b208f[_0x4d1048(0x716)]}:{},..._0x5aa31d(_0x1b208f[_0x4d1048(0x861)])?{'mcp':_0x1b208f['mcp']}:{},..._0x5aa31d(_0x1b208f['backup'])?{'backup':_0x1b208f[_0x4d1048(0x7b4)]}:{},..._0x1b208f[_0x4d1048(0x510)]!==![]?{'timeMachine':_0x1b208f[_0x4d1048(0x510)]}:{},...Object[_0x4d1048(0x324)](_0x260a0d[_0x4d1048(0x542)](_0x35f32b=>_0x1b208f[_0x35f32b]!==undefined)[_0x4d1048(0x595)](_0x1701d6=>[_0x1701d6,_0x1b208f[_0x1701d6]]))},_0x468f26=_0x11fa34(_0x1b208f);if(!_0x66e75a['isWorker']){const _0x30eee9=_0x1bf56b(),_0x7124bd=_0x1b208f['noCluster']?_0x4d1048(0x4f1):_0x1b208f[_0x4d1048(0x43e)]!=null&&_0x1b208f['workersFlag']!==''?_0x4d1048(0x832):process.env.OKDB_HTTP_WORKERS?'OKDB_HTTP_WORKERS\x20env':_0x1b208f['http']?.[_0x4d1048(0x307)]!=null?_0x4d1048(0x800):_0x4d1048(0x7dc)+Math['max'](0x1,require$$0[_0x4d1048(0x662)]()[_0x4d1048(0x6ad)]-0x1);process[_0x4d1048(0x498)][_0x4d1048(0x82b)](_0x4d1048(0x5f2)+_0x468f26+'\x20('+_0x7124bd+(!_0x30eee9?';\x20shmbuf\x20native\x20missing\x20→\x20forced\x20single-process':'')+')\x0a');}if(_0x66e75a[_0x4d1048(0x493)]){const _0x4fdb0e={..._0xebee84},_0x2306ee=new _0x591d2d(_0x4c4267,_0x4fdb0e);_0x2306ee['log'][_0x4d1048(0x408)]?.();const _0x56baa2=process.env.OKDB_CLUSTER_SLOT??'?',_0x53ba40={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x1f0f88=_0x53ba40[_0x1b208f['logLevel']]??_0x53ba40['info'];_0x2306ee[_0x4d1048(0x689)][_0x4d1048(0x4ef)](_0x1d597c=>{const _0x5e681d=_0x4d1048;if((_0x53ba40[_0x1d597c[_0x5e681d(0x682)]]??0x1)<_0x1f0f88)return;try{process['send']?.({'__okdbCluster':_0x5e681d(0x689),'slot':_0x56baa2,'pid':process[_0x5e681d(0x5c3)],'entry':_0x1d597c});}catch{}}),await _0x2306ee[_0x4d1048(0x5f0)]();const {attachWorkerCluster:_0x1da99f}=requireOkdbCluster();_0x1da99f(_0x2306ee),await _0x5a8ed5(_0x2306ee,_0x1b208f['port'],_0x5bbcc0(_0x1b208f));return;}if(_0x468f26>0x1){const {runClustered:_0x1d7993}=requireOkdbCluster(),_0x3eb96f=new _0x591d2d(_0x4c4267,{..._0xebee84,'engines':![],'processors':![],'compaction':![]});await _0x3eb96f[_0x4d1048(0x5f0)]();const _0x499247=async()=>{const _0x3aa063=_0x4d1048,_0x2a0022=new _0x591d2d(_0x4c4267,{..._0xebee84});return await _0x2a0022[_0x3aa063(0x5f0)](),_0x2a0022;},_0x54d544=Object[_0x4d1048(0x324)](_0x260a0d[_0x4d1048(0x595)](_0xe4e6f9=>[_0xe4e6f9,_0xebee84[_0xe4e6f9]??!![]])),{formatListenAddr:_0x37121b}=requireOkdbHttp(),_0x3524ac=_0x37121b(_0x1b208f[_0x4d1048(0x397)],_0x1b208f[_0x4d1048(0x5fb)]?.[_0x4d1048(0x26b)]),_0x4ebc83=_0x1d7993({'workers':_0x468f26,'makeOkdb':_0x499247,'port':_0x1b208f[_0x4d1048(0x397)],'primaryOkdb':_0x3eb96f,'workerRole':_0x54d544,'listenAddr':_0x3524ac});let _0x2d911d=![];async function _0x195fdb(_0x2294fa){const _0x29898f=_0x4d1048;_0x2d911d&&(process['stderr'][_0x29898f(0x82b)](_0x29898f(0x1ec)),process['exit'](0x82));_0x2d911d=!![],process['stderr']['write'](_0x29898f(0x2c2)+(_0x2294fa||_0x29898f(0x6b6))+_0x29898f(0x3a9));const _0x4b56f5=setTimeout(()=>{const _0x4cedcc=_0x29898f;process['stderr']['write'](_0x4cedcc(0x342)),process['exit'](0x0);},0xbb8);_0x4b56f5[_0x29898f(0x895)]?.();try{await _0x4ebc83[_0x29898f(0x6e0)]();}catch(_0x58617e){process[_0x29898f(0x6d3)][_0x29898f(0x82b)]('[okdb]\x20cluster\x20close\x20error:\x20'+(_0x58617e?.[_0x29898f(0x81d)]??_0x58617e)+'\x0a');}try{await _0x3eb96f[_0x29898f(0x6e0)]();}catch(_0x54d997){process[_0x29898f(0x6d3)]['write'](_0x29898f(0x46b)+(_0x54d997?.[_0x29898f(0x81d)]??_0x54d997)+'\x0a');}process[_0x29898f(0x468)](0x0);}_0x1b208f['clusterWorkers']=_0x468f26;if(!_0x1b208f['noRepl']){_0x3eb96f[_0x4d1048(0x689)][_0x4d1048(0x408)]?.(),_0x4856fc(_0x3eb96f[_0x4d1048(0x716)]?.['getSecurityNotices']?.()??[]),await _0x3220de(_0x3eb96f,_0x1b208f);return;}process[_0x4d1048(0x498)]['write'](_0x4d1048(0x65f)+process[_0x4d1048(0x5c3)]+_0x4d1048(0x8a1)+_0x468f26+'\x20'+('capable\x20HTTP\x20worker(s)\x20serving\x20:'+_0x1b208f[_0x4d1048(0x397)]+'\x0a')),console[_0x4d1048(0x689)](''),console[_0x4d1048(0x689)](_0x4d1048(0x563)),console[_0x4d1048(0x689)](_0x4d1048(0x8a9)+_0x1b208f[_0x4d1048(0x397)]+_0x4d1048(0x8c8)+_0x468f26+_0x4d1048(0x794)),console['log'](_0x4d1048(0x7f4)+_0x4c4267),console[_0x4d1048(0x689)](_0x4d1048(0x5dd)+_0x3eb96f['id']),console['log'](_0x4d1048(0x46a)+_0x1b208f[_0x4d1048(0x397)]+_0x4d1048(0x459));!_0x1b208f['noAdmin']&&console['log'](_0x4d1048(0x37b)+_0x1b208f[_0x4d1048(0x397)]+_0x4d1048(0x30b));console[_0x4d1048(0x689)](''),_0x4856fc(_0x3eb96f[_0x4d1048(0x716)]?.[_0x4d1048(0x522)]?.()??[]),process['on'](_0x4d1048(0x7e0),()=>_0x195fdb(_0x4d1048(0x7e0))),process['on'](_0x4d1048(0x8bc),()=>_0x195fdb(_0x4d1048(0x8bc))),process['on']('SIGBREAK',()=>_0x195fdb(_0x4d1048(0x21c)));return;}const _0x54bd85=new _0x591d2d(_0x4c4267,_0xebee84);_0x54bd85[_0x4d1048(0x689)][_0x4d1048(0x408)]?.();const _0x84295a=_0x54bd85['log'][_0x4d1048(0x4ef)](_0x57181e=>_0x1e553c(_0x57181e,_0x1b208f[_0x4d1048(0x8c0)]));if(_0x1b208f[_0x4d1048(0x74b)])process[_0x4d1048(0x498)][_0x4d1048(0x82b)](_0x4d1048(0x50d));await _0x54bd85['open']();if(_0x1b208f[_0x4d1048(0x74b)])process[_0x4d1048(0x498)][_0x4d1048(0x82b)]('\x20\x20✓\x20database\x20opened\x0a');try{await _0x5a8ed5(_0x54bd85,_0x1b208f[_0x4d1048(0x397)],_0x5bbcc0(_0x1b208f));}catch(_0x2d75f7){_0x2d75f7[_0x4d1048(0x2dc)]===_0x4d1048(0x5fd)&&(console[_0x4d1048(0x6cd)](_0x4d1048(0x5b8)+_0x1b208f[_0x4d1048(0x397)]+'\x20already\x20in\x20use'),process['exit'](0x1));throw _0x2d75f7;}if(_0x1b208f[_0x4d1048(0x74b)]){const _0x3fe340=_0x1b208f[_0x4d1048(0x5fb)]?.[_0x4d1048(0x26b)]!==undefined?[][_0x4d1048(0x7fe)](_0x1b208f[_0x4d1048(0x5fb)][_0x4d1048(0x26b)])[_0x4d1048(0x1c9)](',\x20')+'\x20':'';process[_0x4d1048(0x498)][_0x4d1048(0x82b)]('\x20\x20✓\x20http\x20listening\x20on\x20'+_0x3fe340+':'+_0x1b208f[_0x4d1048(0x397)]+'\x0a');}if(!_0x1b208f[_0x4d1048(0x74b)])_0x54bd85[_0x4d1048(0x689)][_0x4d1048(0x408)]?.(),_0x84295a?.(),_0x4856fc(_0x54bd85[_0x4d1048(0x716)]?.[_0x4d1048(0x522)]?.()??[]),await _0x3220de(_0x54bd85,_0x1b208f);else{const _0x3e7539=_0x3e45a6[_0x4d1048(0x1c9)](_0x4c4267,_0x4d1048(0x857));try{_0x372f01[_0x4d1048(0x497)](_0x3e7539,String(process[_0x4d1048(0x5c3)]));}catch{}const _0x34c889=Date[_0x4d1048(0x4ec)]()-_0x4ed9ab;console[_0x4d1048(0x689)](''),console[_0x4d1048(0x689)](_0x4d1048(0x1e3)),console[_0x4d1048(0x689)](_0x4d1048(0x7d7)+_0x1b208f[_0x4d1048(0x397)]),console[_0x4d1048(0x689)](_0x4d1048(0x2e1)+_0x4c4267),console['log'](_0x4d1048(0x45f)+_0x54bd85['id']);{const _0xa4986f=_0x54bd85[_0x4d1048(0x736)]?.['db']?.[_0x4d1048(0x2fa)]?.(_0x4d1048(0x768))??0x0,_0x210c33=[..._0x54bd85['_envs'][_0x4d1048(0x818)]()][_0x4d1048(0x542)](_0x1a4318=>!_0x1a4318[_0x4d1048(0x579)]('~'))[_0x4d1048(0x6ad)];if(_0x54bd85['_license']?.['active']?.[_0x4d1048(0x1dd)]===0x1){const _0x419d9e=Math[_0x4d1048(0x347)]((_0x54bd85[_0x4d1048(0x502)][_0x4d1048(0x676)][_0x4d1048(0x282)]-Date['now']())/0x5265c00);console[_0x4d1048(0x689)](_0x4d1048(0x7a7)+_0x54bd85[_0x4d1048(0x502)][_0x4d1048(0x676)][_0x4d1048(0x53d)]+_0x4d1048(0x7d2)+_0x419d9e+_0x4d1048(0x6df));}else{if(_0x54bd85['_license']?.[_0x4d1048(0x676)]){const _0x3fa903=_0x54bd85[_0x4d1048(0x502)][_0x4d1048(0x676)];console[_0x4d1048(0x689)](_0x4d1048(0x5fe)+_0x3fa903[_0x4d1048(0x53d)]+_0x4d1048(0x428)+new Date(_0x3fa903[_0x4d1048(0x282)])['toISOString']()[_0x4d1048(0x27f)](0x0,0xa)+')');const _0x2a5e6b=_0x3fa903['limits']||{};if(_0x2a5e6b[_0x4d1048(0x1e0)]){const _0x523c7d=Math[_0x4d1048(0x578)](_0xa4986f/_0x2a5e6b[_0x4d1048(0x1e0)]*0x64);console[_0x4d1048(0x689)](_0x4d1048(0x391)+_0xa4986f['toLocaleString']()+_0x4d1048(0x20b)+_0x2a5e6b[_0x4d1048(0x1e0)][_0x4d1048(0x684)]()+_0x4d1048(0x7f2)+_0x523c7d+_0x4d1048(0x47b)+_0x210c33+(_0x2a5e6b[_0x4d1048(0x7f3)]?'/'+_0x2a5e6b[_0x4d1048(0x7f3)]:'')+_0x4d1048(0x2b8)+(_0x210c33===0x1?'':'s'));}}else{if(_0x54bd85[_0x4d1048(0x502)]){const _0x5b9bbd=_0x54bd85[_0x4d1048(0x502)][_0x4d1048(0x81c)](),_0x1f73d=_0x5b9bbd[_0x4d1048(0x6ad)]?_0x5b9bbd[_0x4d1048(0x595)](_0x5de509=>_0x5de509[_0x4d1048(0x385)])[_0x4d1048(0x1c9)](',\x20'):_0x4d1048(0x68d),_0x33da81=_0x54bd85[_0x4d1048(0x502)]['effective'],_0x2665bd=_0x33da81['limits'][_0x4d1048(0x1e0)]?Math[_0x4d1048(0x578)](_0xa4986f/_0x33da81[_0x4d1048(0x5b3)][_0x4d1048(0x1e0)]*0x64):0x0;console[_0x4d1048(0x689)](_0x4d1048(0x76c)),console['log'](_0x4d1048(0x391)+_0xa4986f['toLocaleString']()+_0x4d1048(0x20b)+_0x33da81[_0x4d1048(0x5b3)][_0x4d1048(0x1e0)][_0x4d1048(0x684)]()+_0x4d1048(0x7f2)+_0x2665bd+_0x4d1048(0x47b)+_0x210c33+_0x4d1048(0x20b)+_0x33da81['limits']['envs']+_0x4d1048(0x6a3)),console[_0x4d1048(0x689)]('\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20'+_0x1f73d);}}}}console['log'](_0x4d1048(0x55a)+_0x1b208f[_0x4d1048(0x397)]+_0x4d1048(0x459));!_0x1b208f[_0x4d1048(0x69b)]&&console['log'](_0x4d1048(0x609)+_0x1b208f[_0x4d1048(0x397)]+_0x4d1048(0x30b));console[_0x4d1048(0x689)](''),console[_0x4d1048(0x689)](_0x4d1048(0x8aa)+_0x34c889+'ms'),_0x4856fc(_0x54bd85['auth']?.['getSecurityNotices']?.()??[]);let _0xce3c3a=![];async function _0x5c01ef(_0x4db60e){const _0x49cf98=_0x4d1048;_0xce3c3a&&(process[_0x49cf98(0x6d3)][_0x49cf98(0x82b)]('\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a'),process[_0x49cf98(0x468)](0x82));_0xce3c3a=!![],process['stderr'][_0x49cf98(0x82b)](_0x49cf98(0x2c2)+(_0x4db60e||'shutdown')+',\x20closing…\x0a');const _0x2f970a=setTimeout(()=>{const _0x3b2b12=_0x49cf98;process[_0x3b2b12(0x6d3)][_0x3b2b12(0x82b)](_0x3b2b12(0x6f7)),process[_0x3b2b12(0x468)](0x1);},0x1388);try{_0x372f01[_0x49cf98(0x291)](_0x3e7539);}catch{}try{await _0x54bd85[_0x49cf98(0x6e0)]();}catch(_0x1f7915){process['stderr']['write'](_0x49cf98(0x60f)+(_0x1f7915?.[_0x49cf98(0x81d)]??_0x1f7915)+'\x0a');}clearTimeout(_0x2f970a),process[_0x49cf98(0x6d3)][_0x49cf98(0x82b)](_0x49cf98(0x4d4)),process[_0x49cf98(0x468)](0x0);}process['on'](_0x4d1048(0x7e0),()=>_0x5c01ef(_0x4d1048(0x7e0))),process['on'](_0x4d1048(0x8bc),()=>_0x5c01ef('SIGTERM')),process['on'](_0x4d1048(0x21c),()=>_0x5c01ef('SIGBREAK'));}}const _0x46f215=new Set([_0x92a1c9(0x598),'doctor','init',_0x92a1c9(0x7b4),_0x92a1c9(0x699),_0x92a1c9(0x678),_0x92a1c9(0x7af),_0x92a1c9(0x5f9),_0x92a1c9(0x527),_0x92a1c9(0x1c9),_0x92a1c9(0x2bb)]),_0x282d72=process[_0x92a1c9(0x409)][0x2];if(_0x282d72===_0x92a1c9(0x598))console[_0x92a1c9(0x689)](require$$3[_0x92a1c9(0x598)]),process[_0x92a1c9(0x468)](0x0);else{if(_0x282d72===_0x92a1c9(0x529))process[_0x92a1c9(0x468)](requireOkdbShmGc()[_0x92a1c9(0x782)](process['argv'][_0x92a1c9(0x27f)](0x3)));else{if(_0x282d72&&_0x46f215['has'](_0x282d72)){const _0x1a96b1=process[_0x92a1c9(0x409)][_0x92a1c9(0x27f)](0x3),_0x502dd0=_0x4e5792([_0x92a1c9(0x24d),_0x92a1c9(0x58a),..._0x1a96b1]),_0x236c60=_0xc7735d(_0x502dd0),_0x384a5f=new Set([_0x92a1c9(0x344),'-d',_0x92a1c9(0x776),'-k',_0x92a1c9(0x585),'-c',_0x92a1c9(0x6ff),'-p',_0x92a1c9(0x772),'--env','-e',_0x92a1c9(0x508),'--name',_0x92a1c9(0x77c),_0x92a1c9(0x7d9),_0x92a1c9(0x891),'--grants',_0x92a1c9(0x25b),_0x92a1c9(0x7cb),_0x92a1c9(0x6ba),'-u','--address']);let _0x233543=null;for(let _0x530328=0x0;_0x530328<_0x1a96b1[_0x92a1c9(0x6ad)];_0x530328++){if(_0x384a5f[_0x92a1c9(0x2ad)](_0x1a96b1[_0x530328])){_0x530328++;continue;}if(!_0x1a96b1[_0x530328][_0x92a1c9(0x579)]('-')){_0x233543=_0x1a96b1[_0x530328];break;}}(async()=>{const _0x36f99f=_0x92a1c9;if(_0x282d72===_0x36f99f(0x527)){const _0x458979=process['argv'][0x3],_0x3ad47b=process[_0x36f99f(0x409)][_0x36f99f(0x27f)](0x4),_0x2b3d1f=_0x4e5792([_0x36f99f(0x24d),_0x36f99f(0x58a),..._0x3ad47b]),_0x471488=_0xc7735d(_0x2b3d1f),_0x7904ba=new Set([_0x36f99f(0x344),'-d',_0x36f99f(0x776),'-k',_0x36f99f(0x585),'-c',_0x36f99f(0x6ff),'-p','--name','--password','--label','--permissions',_0x36f99f(0x703),'--ttl',_0x36f99f(0x772),_0x36f99f(0x7e6),'-e',_0x36f99f(0x508)]),_0x4e8e50=[];for(let _0x5aeaa9=0x0;_0x5aeaa9<_0x3ad47b[_0x36f99f(0x6ad)];_0x5aeaa9++){if(_0x7904ba[_0x36f99f(0x2ad)](_0x3ad47b[_0x5aeaa9])){_0x5aeaa9++;continue;}if(_0x3ad47b[_0x5aeaa9]['startsWith']('-'))continue;_0x4e8e50[_0x36f99f(0x557)](_0x3ad47b[_0x5aeaa9]);}switch(_0x458979){case _0x36f99f(0x71e):await _0x80db64(_0x471488,_0x2b3d1f);break;case'list':await _0x496bc3(_0x471488);break;case _0x36f99f(0x704):await _0x2a5f71(_0x4e8e50[0x0],_0x471488);break;default:console[_0x36f99f(0x6cd)](_0x36f99f(0x3ad)+_0x458979+_0x36f99f(0x665)),process[_0x36f99f(0x468)](0x1);}return;}if(_0x282d72===_0x36f99f(0x2bb)){const _0x4ba0e8=requireOkdbLicenseCodec(),_0x4e4bd2=process[_0x36f99f(0x409)]['slice'](0x3),_0xedba6f=_0x4e5792([_0x36f99f(0x24d),_0x36f99f(0x58a),..._0x4e4bd2]),_0x3418c0=_0xc7735d(_0xedba6f),_0xe20f34=new Set(['--path','-d',_0x36f99f(0x776),'-k',_0x36f99f(0x585),'-c',_0x36f99f(0x6ff),'-p',_0x36f99f(0x772)]),_0x277805=[];for(let _0x42ed72=0x0;_0x42ed72<_0x4e4bd2[_0x36f99f(0x6ad)];_0x42ed72++){if(_0xe20f34[_0x36f99f(0x2ad)](_0x4e4bd2[_0x42ed72])){_0x42ed72++;continue;}if(_0x4e4bd2[_0x42ed72][_0x36f99f(0x579)]('-'))continue;_0x277805['push'](_0x4e4bd2[_0x42ed72]);}const _0x246daa=_0x277805[0x0]??null;if(_0x246daa===_0x36f99f(0x417))await _0x1a746f(_0x277805[0x1],_0x3418c0);else{if(!_0x246daa)await _0x3abaf8(_0x3418c0);else{let _0x3881c4=_0x4ba0e8[_0x36f99f(0x3bb)](_0x246daa);if(_0x3881c4===_0x36f99f(0x756)&&_0x372f01[_0x36f99f(0x5b6)](_0x246daa))_0x3881c4=_0x36f99f(0x5be);if(_0x3881c4===_0x36f99f(0x5be))try{const _0x4c4158=_0x372f01[_0x36f99f(0x308)](_0x246daa,_0x36f99f(0x88a))[_0x36f99f(0x48b)](),_0x3b98ba=_0x4ba0e8[_0x36f99f(0x3bb)](_0x4c4158);if(_0x3b98ba==='activation'){await _0x58e7e9(_0x4c4158,_0x3418c0);return;}await _0x4ccb98(_0x246daa,_0x3418c0);return;}catch(_0x536e78){console[_0x36f99f(0x6cd)](_0x36f99f(0x263)+_0x246daa+':\x20'+_0x536e78[_0x36f99f(0x81d)]),process['exit'](0x1);}switch(_0x3881c4){case _0x36f99f(0x81a):await _0x4ccb98(_0x246daa,_0x3418c0);break;case _0x36f99f(0x589):await _0x58e7e9(_0x246daa,_0x3418c0);break;case'uuid':await _0x1bc1a4(_0x246daa,_0x3418c0);break;default:console[_0x36f99f(0x6cd)](_0x36f99f(0x454)+_0x246daa+'\x22'),console['error'](''),console['error']('\x20\x20Expected\x20one\x20of:'),console[_0x36f99f(0x6cd)](_0x36f99f(0x69e)),console[_0x36f99f(0x6cd)](_0x36f99f(0x42a)),console[_0x36f99f(0x6cd)](_0x36f99f(0x613)),console[_0x36f99f(0x6cd)](_0x36f99f(0x88b)),console[_0x36f99f(0x6cd)](''),console[_0x36f99f(0x6cd)](_0x36f99f(0x5bc)),process[_0x36f99f(0x468)](0x1);}}}return;}switch(_0x282d72){case _0x36f99f(0x649):await _0x4f10c0(_0x236c60);break;case'init':await _0x366f39();break;case _0x36f99f(0x5f9):await _0x234c7c(_0x236c60);break;case _0x36f99f(0x7b4):await _0x3fa566(_0x233543??_0x3e45a6['resolve'](_0x36f99f(0x2fd)),_0x236c60);break;case _0x36f99f(0x699):if(!_0x233543)throw new Error(_0x36f99f(0x230));await _0x43d6cf(_0x3e45a6[_0x36f99f(0x8c2)](_0x233543),_0x236c60,_0x502dd0);break;case _0x36f99f(0x678):await _0x48f8f9(_0x233543??_0x3e45a6[_0x36f99f(0x8c2)]('./okdb-export.ndjson'),_0x236c60,_0x502dd0);break;case'import':await _0x3a1cbd(_0x233543??_0x3e45a6['resolve'](_0x36f99f(0x42d)),_0x236c60,_0x502dd0);break;case _0x36f99f(0x1c9):await _0x4b5e60(_0x233543,_0x236c60,_0x502dd0);break;}})()[_0x92a1c9(0x4ed)](()=>process[_0x92a1c9(0x468)](0x0))[_0x92a1c9(0x39e)](_0x2d7610=>{const _0xecf3de=_0x92a1c9;console[_0xecf3de(0x6cd)](_0xecf3de(0x887)+(_0x2d7610[_0xecf3de(0x81d)]||_0x2d7610)+'\x0a'),process[_0xecf3de(0x468)](0x1);});}else _0x2fb5ae()[_0x92a1c9(0x39e)](_0x486c5a=>{const _0x3dd05c=_0x92a1c9;console[_0x3dd05c(0x6cd)](_0x3dd05c(0x380)),console['error'](_0x486c5a['stack']||_0x486c5a),process['exit'](0x1);});}}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x1a2e0d(0x7ac)]=okdb;