@kedem/okdb 2.6.0 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/algorithm-worker-thread.js +1 -1
- package/bin/okdb.js +1 -1
- package/okdb-functions-sandbox-worker.js +1 -1
- package/okdb-http-worker-child.js +1 -1
- package/okdb-views-bootstrap-worker.js +1 -1
- package/okdb.js +1 -1
- package/package.json +1 -1
- package/public/vendor/okjs/ok.esm.min.js +1 -1
- package/public/vendor/okjs/toolkit/components/ok-chart.ok.js +1 -1
- package/public/vendor/okjs/toolkit/components/ok-doc-viewer.ok.js +1 -1
- package/public/vendor/okjs/toolkit/components/ok-monaco.ok.js +1 -1
- package/public/vendor/okjs/toolkit/core/virtualized.ok.js +1 -1
- package/public/vendor/okjs/toolkit/editor/ok-live-shell.ok.js +1 -1
- package/public/vendor/okjs/toolkit/elements/ok-select.ok.js +1 -1
- package/public/vendor/okjs/toolkit/elements/ok-table.ok.js +1 -1
package/bin/okdb.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
'use strict';const _0x3d20e4=_0x8cd7;(function(_0x4f62fc,_0x510b66){const _0x30a075=_0x8cd7,_0x46544f=_0x4f62fc();while(!![]){try{const _0x23446a=-parseInt(_0x30a075(0x646))/0x1+-parseInt(_0x30a075(0x505))/0x2+-parseInt(_0x30a075(0x6d3))/0x3*(-parseInt(_0x30a075(0x615))/0x4)+-parseInt(_0x30a075(0x163))/0x5+parseInt(_0x30a075(0x719))/0x6+-parseInt(_0x30a075(0x672))/0x7+-parseInt(_0x30a075(0x663))/0x8*(-parseInt(_0x30a075(0x290))/0x9);if(_0x23446a===_0x510b66)break;else _0x46544f['push'](_0x46544f['shift']());}catch(_0x21e221){_0x46544f['push'](_0x46544f['shift']());}}}(_0x166e,0x92b37));var require$$1=require('path'),require$$0$1=require('fs'),require$$0=require('os'),require$$4$1=require(_0x3d20e4(0x423)),require$$5$1=require(_0x3d20e4(0x4e1)),require$$0$3=require('readline'),require$$2=require(_0x3d20e4(0x6c5)),require$$5=require(_0x3d20e4(0x667)),require$$2$1=require(_0x3d20e4(0x276)),require$$0$2=require(_0x3d20e4(0x252)),require$$4=require(_0x3d20e4(0x57b)),require$$1$1=require(_0x3d20e4(0x2bd)),require$$0$4=require(_0x3d20e4(0x2db)),require$$0$5=require('perf_hooks'),require$$0$6=require(_0x3d20e4(0x23f)),require$$0$7=require(_0x3d20e4(0x91)),require$$1$2=require(_0x3d20e4(0x3ce)),require$$2$2=require(_0x3d20e4(0x62d)),require$$2$3=require('worker_threads'),require$$3$1=require(_0x3d20e4(0xcf)),commonjsGlobal=typeof globalThis!==_0x3d20e4(0x4be)?globalThis:typeof window!==_0x3d20e4(0x4be)?window:typeof global!==_0x3d20e4(0x4be)?global:typeof self!==_0x3d20e4(0x4be)?self:{};function getDefaultExportFromCjs(_0x5d498c){const _0x448208=_0x3d20e4;return _0x5d498c&&_0x5d498c['__esModule']&&Object['prototype']['hasOwnProperty'][_0x448208(0x3c6)](_0x5d498c,_0x448208(0x3e8))?_0x5d498c['default']:_0x5d498c;}var okdb$1={},okdbWorkers,hasRequiredOkdbWorkers;function requireOkdbWorkers(){if(hasRequiredOkdbWorkers)return okdbWorkers;hasRequiredOkdbWorkers=0x1;const _0x1bd139=require$$0,_0x2c7ceb=require$$0$1,_0x3263ef=require$$1;let _0x478373;function _0x58b634(){const _0x165d7f=_0x8cd7;if(process.env.OKDB_FORCE_SHMBUF_FALLBACK==='1')return![];if(_0x478373!==undefined)return _0x478373;try{const _0x3048c7=_0x3263ef['dirname'](require[_0x165d7f(0x738)](_0x165d7f(0x6b9)));_0x478373=_0x2c7ceb[_0x165d7f(0x1c9)](_0x3263ef[_0x165d7f(0x10b)](_0x3048c7,'build',_0x165d7f(0x314),_0x165d7f(0x26d)));}catch{_0x478373=![];}return _0x478373;}function _0x1e40a1(){const _0x52cac4=_0x8cd7,_0x38902c=_0x1bd139[_0x52cac4(0x19c)]()[_0x52cac4(0x39d)];return Math[_0x52cac4(0x68c)](0x1,_0x38902c-0x1);}function _0x390fdc(_0x180fdc,_0x5de5b7={}){const _0x47cfb9=_0x8cd7,_0x5ee58f=_0x5de5b7[_0x47cfb9(0xfd)]!==undefined?_0x5de5b7['shmbufNative']:_0x58b634();let _0x22bd00;if(_0x180fdc?.[_0x47cfb9(0x38a)])_0x22bd00=0x1;else{let _0x341c28,_0x440512;if(_0x180fdc?.[_0x47cfb9(0x3bd)]!==undefined&&_0x180fdc[_0x47cfb9(0x3bd)]!==null&&_0x180fdc['workersFlag']!=='')_0x341c28=_0x180fdc[_0x47cfb9(0x3bd)],_0x440512=_0x47cfb9(0x548);else{if(process.env.OKDB_HTTP_WORKERS!==undefined&&process.env.OKDB_HTTP_WORKERS!=='')_0x341c28=process.env.OKDB_HTTP_WORKERS,_0x440512=_0x47cfb9(0x3b5);else _0x180fdc?.[_0x47cfb9(0x91)]?.[_0x47cfb9(0x150)]!==undefined&&_0x180fdc['http'][_0x47cfb9(0x150)]!==null&&_0x180fdc[_0x47cfb9(0x91)][_0x47cfb9(0x150)]!==''&&(_0x341c28=_0x180fdc['http'][_0x47cfb9(0x150)],_0x440512=_0x47cfb9(0x68));}if(_0x341c28===undefined)_0x22bd00=_0x1e40a1();else{const _0x587870=Number(_0x341c28);!Number[_0x47cfb9(0x446)](_0x587870)||_0x587870<0x1?(console[_0x47cfb9(0x6a7)](_0x47cfb9(0x94)+_0x440512+'='+JSON[_0x47cfb9(0x5c1)](_0x341c28)+_0x47cfb9(0x49a)),_0x22bd00=0x1):_0x22bd00=_0x587870;}}return!_0x5ee58f&&_0x22bd00>0x1&&(console[_0x47cfb9(0x6a7)]('[okdb]\x20shmbuf\x20native\x20binding\x20unavailable\x20—\x20multi-process\x20clustering\x20is\x20unsafe\x20'+(_0x47cfb9(0x3f5)+_0x22bd00+').')),_0x22bd00=0x1),_0x22bd00;}return okdbWorkers={'isShmbufNative':_0x58b634,'defaultWorkers':_0x1e40a1,'resolveWorkers':_0x390fdc},okdbWorkers;}var version=_0x3d20e4(0x5f3),require$$3={'version':version},okdbMigrate={'exports':{}},okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x44a72e extends Error{constructor(_0x8b8635,_0x1cefca,_0x2e61d7={}){const _0x335c58=_0x8cd7;super(_0x8b8635),this[_0x335c58(0x707)]=_0x335c58(0x102),this['code']=_0x1cefca,this['details']=_0x2e61d7,_0x2e61d7[_0x335c58(0x300)]&&(this[_0x335c58(0x300)]=_0x2e61d7[_0x335c58(0x300)]),Error['captureStackTrace'](this,this[_0x335c58(0x533)]);}}class _0x3c9c1e extends _0x44a72e{constructor(_0x401aa6,_0x50c659,_0x40272e,_0x93908a){const _0x28da0b=_0x8cd7;super(_0x28da0b(0x370)+_0x401aa6+'@'+_0x50c659+_0x28da0b(0x2be)+_0x40272e+_0x28da0b(0x2a0)+_0x93908a,_0x28da0b(0x405),{'type':_0x401aa6,'key':_0x50c659,'expectedVersion':_0x40272e,'actualVersion':_0x93908a}),this[_0x28da0b(0x707)]=_0x28da0b(0x648);}}class _0x181237 extends _0x44a72e{constructor(_0x1fcc0c,_0xde4172){const _0x4859bb=_0x8cd7;super(_0x1fcc0c+'@'+_0xde4172+'\x20does\x20not\x20exist',_0x4859bb(0x269),{'type':_0x1fcc0c,'key':_0xde4172}),this['name']='OKDBNotFoundError';}}class _0x3de3a6 extends _0x44a72e{constructor(_0x54bd0b,_0x1ed186){const _0x4b1fe2=_0x8cd7;super(_0x54bd0b+'@'+_0x1ed186+'\x20already\x20exists',_0x4b1fe2(0x24a),{'type':_0x54bd0b,'key':_0x1ed186}),this[_0x4b1fe2(0x707)]=_0x4b1fe2(0x53f);}}class _0x3a793a extends _0x44a72e{constructor(_0x3b444d,_0x413d67){const _0x99e9da=_0x8cd7,_0x5af810=typeof _0x413d67;super(_0x99e9da(0x544)+_0x3b444d+_0x99e9da(0x709)+_0x5af810+_0x99e9da(0x745)+_0x413d67,_0x99e9da(0x4fe),{'index':_0x3b444d,'key':_0x413d67,'keyType':_0x5af810}),this['name']=_0x99e9da(0x2de);}}class _0x2189d7 extends _0x44a72e{constructor(_0xd3ea4e){const _0x2715e7=_0x8cd7,_0x3dd669=typeof _0xd3ea4e;super(_0x2715e7(0x710)+_0x3dd669+'.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20'+_0xd3ea4e,'INVALID_PRIMARY_KEY',{'key':_0xd3ea4e,'keyType':_0x3dd669}),this[_0x2715e7(0x707)]=_0x2715e7(0x72d);}}class _0x26c014 extends _0x44a72e{constructor(_0x44c180){const _0x23e57e=_0x8cd7;super(_0x23e57e(0x210)+_0x44c180+_0x23e57e(0x1d8),'TYPE_NOT_REGISTERED',{'type':_0x44c180}),this[_0x23e57e(0x707)]=_0x23e57e(0x28f);}}class _0x8a3f8c extends _0x44a72e{constructor(_0x1f56b8){const _0x1a0b93=_0x8cd7;super(_0x1a0b93(0x210)+_0x1f56b8+_0x1a0b93(0x571),'TYPE_ALREADY_REGISTERED',{'type':_0x1f56b8}),this[_0x1a0b93(0x707)]='OKDBTypeAlreadyRegisteredError';}}class _0x3f8fd2 extends _0x44a72e{constructor(_0xd46925,_0x184a8b){const _0x10e053=_0x8cd7;super(_0x10e053(0x140)+_0x184a8b+_0x10e053(0x162)+_0xd46925+'\x27\x20doesn\x27t\x20exist','INDEX_NOT_REGISTERED',{'type':_0xd46925,'index':_0x184a8b}),this[_0x10e053(0x707)]=_0x10e053(0x27d);}}class _0x14c259 extends _0x44a72e{constructor(_0x5d3065,_0x3f14f6){const _0x2c644e=_0x8cd7;super(_0x2c644e(0x140)+_0x3f14f6+'\x27\x20on\x20type\x20\x27'+_0x5d3065+_0x2c644e(0x41d),_0x2c644e(0x19a),{'type':_0x5d3065,'index':_0x3f14f6}),this[_0x2c644e(0x707)]='OKDBIndexAlreadyRegisteredError';}}class _0x43c5e7 extends _0x44a72e{constructor(_0xe6f192,_0x49606d={}){const _0x6012c8=_0x8cd7;super(_0xe6f192,_0x6012c8(0x6cd),_0x49606d),this[_0x6012c8(0x707)]=_0x6012c8(0x164);}}class _0x129a3c extends _0x44a72e{constructor(_0x22140c,_0x36e66c,_0x1e6416,_0x2f710e,_0x398c4a){const _0x302ace=_0x8cd7;super(_0x302ace(0x222)+_0x22140c+'@'+_0x36e66c+_0x302ace(0x702)+_0x1e6416+_0x302ace(0x4f1)+_0x2f710e+_0x302ace(0x5b8)+_0x398c4a+'\x27',_0x302ace(0x741),{'type':_0x22140c,'index':_0x36e66c,'indexKey':_0x1e6416,'existingKey':_0x2f710e,'conflictingKey':_0x398c4a}),this[_0x302ace(0x707)]=_0x302ace(0x28a);}}class _0xc957ec extends _0x44a72e{constructor(_0x58c2a0,_0x22593c,_0x2aed89){const _0x4d9e98=_0x8cd7;super('Schema\x20validation\x20failed\x20for\x20'+_0x58c2a0+'@'+_0x22593c,_0x4d9e98(0x4e3),{'type':_0x58c2a0,'key':_0x22593c,'errors':_0x2aed89}),this[_0x4d9e98(0x707)]=_0x4d9e98(0x6e),this[_0x4d9e98(0x66f)]=_0x58c2a0,this[_0x4d9e98(0x466)]=_0x22593c,this[_0x4d9e98(0x422)]=_0x2aed89;}}class _0x160b4b extends _0x44a72e{constructor(_0x3c9eb9,_0x234c17){const _0x4e5cbd=_0x8cd7;super(_0x4e5cbd(0x1f1)+_0x3c9eb9+':\x20'+_0x234c17[_0x4e5cbd(0x39d)]+_0x4e5cbd(0x4b4),_0x4e5cbd(0x341),{'type':_0x3c9eb9,'failures':_0x234c17}),this[_0x4e5cbd(0x707)]=_0x4e5cbd(0xc1),this[_0x4e5cbd(0x66f)]=_0x3c9eb9,this[_0x4e5cbd(0x529)]=_0x234c17;}}class _0x3445a6 extends _0x44a72e{constructor(_0x3e2fde,_0x2e3cec,_0x42c821,_0x46e689,_0x528765){const _0x29bdea=_0x8cd7;super(_0x29bdea(0x464)+_0x3e2fde+'@'+_0x2e3cec+'.'+_0x42c821+'\x20references\x20'+_0x46e689+'@'+_0x528765+_0x29bdea(0x5d7),_0x29bdea(0x51c),{'sourceType':_0x3e2fde,'sourceKey':_0x2e3cec,'fieldPath':_0x42c821,'targetType':_0x46e689,'targetKey':_0x528765}),this[_0x29bdea(0x707)]=_0x29bdea(0x54c),this[_0x29bdea(0x20a)]=_0x3e2fde,this[_0x29bdea(0x563)]=_0x2e3cec,this['fieldPath']=_0x42c821,this[_0x29bdea(0x67a)]=_0x46e689,this[_0x29bdea(0x23b)]=_0x528765;}}class _0x593dd2 extends _0x44a72e{constructor(_0x550398,_0x57ff20,_0x32385b){const _0x29b8eb=_0x8cd7;super(_0x29b8eb(0x664)+_0x550398+'@'+_0x57ff20+':\x20'+_0x32385b['length']+_0x29b8eb(0x46d),_0x29b8eb(0x171),{'targetType':_0x550398,'targetKey':_0x57ff20,'references':_0x32385b}),this[_0x29b8eb(0x707)]=_0x29b8eb(0x4dc),this[_0x29b8eb(0x67a)]=_0x550398,this['targetKey']=_0x57ff20,this[_0x29b8eb(0x6ee)]=_0x32385b;}}class _0x5cbc98 extends _0x44a72e{constructor(_0xe0e80d,_0x36c784,_0x4486e4){const _0x58f618=_0x8cd7;super(_0x58f618(0x10d)+_0x36c784+_0x58f618(0x304)+_0xe0e80d+_0x58f618(0x24d)+_0x4486e4[_0x58f618(0x757)](_0x491a7a=>_0x491a7a[_0x58f618(0xaa)]+':'+_0x491a7a[_0x58f618(0x707)])[_0x58f618(0x10b)](',\x20'),_0x58f618(0x31c),{'type':_0xe0e80d,'index':_0x36c784,'usedBy':_0x4486e4}),this[_0x58f618(0x707)]=_0x58f618(0x62e);}}return okdbError={'OKDBError':_0x44a72e,'OKDBVersionMismatchError':_0x3c9c1e,'OKDBNotFoundError':_0x181237,'OKDBAlreadyExistsError':_0x3de3a6,'OKDBInvalidIndexKeyError':_0x3a793a,'OKDBInvalidPrimaryKeyError':_0x2189d7,'OKDBTypeNotRegisteredError':_0x26c014,'OKDBTypeAlreadyRegisteredError':_0x8a3f8c,'OKDBIndexNotRegisteredError':_0x3f8fd2,'OKDBIndexAlreadyRegisteredError':_0x14c259,'OKDBInvalidValueError':_0x43c5e7,'OKDBUniqueConstraintError':_0x129a3c,'OKDBSchemaValidationError':_0xc957ec,'OKDBSchemaCollectionError':_0x160b4b,'OKDBForeignKeyError':_0x3445a6,'OKDBForeignKeyDeleteError':_0x593dd2,'OKDBIndexHasConsumersError':_0x5cbc98},okdbError;}var hasRequiredOkdbMigrate;function requireOkdbMigrate(){const _0x1f7bf3=_0x3d20e4;if(hasRequiredOkdbMigrate)return okdbMigrate[_0x1f7bf3(0x71d)];hasRequiredOkdbMigrate=0x1;const _0x268cb0=require$$0$1,_0x3909fa=require$$1,_0x13954a=require$$2,{OKDBError:_0x4c4660}=requireOkdbError(),_0x6046be=_0x1f7bf3(0x632),_0x4c7be3=_0x1f7bf3(0x124),_0x1c72c8=_0x1f7bf3(0x2b7),_0x4c2baf='data',_0x5cefbc='change',_0x7e630b=0x1f4,_0x249d9f=0x3e8,_0x3fe4af='okdb-backup.json';async function _0x5a4efc(_0x2cc592,_0x6629ff,_0x5cd565,_0xdf65c0){const _0x3068c2=_0x1f7bf3;if(_0x2cc592){await _0x2cc592['backup'](_0x5cd565,Boolean(_0xdf65c0));return;}const _0x162cb1=_0x13954a[_0x3068c2(0x1fd)](_0x6629ff,{'readOnly':!![],'maxDbs':0x8});try{await _0x162cb1[_0x3068c2(0x156)](_0x5cd565,Boolean(_0xdf65c0));}finally{await _0x162cb1[_0x3068c2(0x44f)]();}}const _0xf851d=()=>new Promise(_0x56002c=>setImmediate(_0x56002c));function _0x3a014e(_0xdae743,_0x5328a7){const _0x13223d=_0x1f7bf3;if(_0xdae743[_0x13223d(0xb6)](_0x5328a7))return Promise[_0x13223d(0x738)]();return new Promise((_0x53a35c,_0x55a010)=>{const _0x641eb0=_0x13223d,_0x1fa091=_0x1a0272=>{const _0x4fe29a=_0x8cd7;_0xdae743[_0x4fe29a(0x567)]?.(_0x4fe29a(0x61b),_0x4ebbc8),_0xdae743[_0x4fe29a(0x567)]?.(_0x4fe29a(0x492),_0x311554),_0xdae743[_0x4fe29a(0x567)]?.(_0x4fe29a(0x44f),_0x4e8b3b);if(_0x1a0272)_0x55a010(_0x1a0272);else _0x53a35c();},_0x4ebbc8=()=>_0x1fa091(),_0x311554=_0x614242=>_0x1fa091(_0x614242),_0x4e8b3b=()=>_0x1fa091(new Error('export:\x20stream\x20closed\x20before\x20drain'));_0xdae743[_0x641eb0(0x375)](_0x641eb0(0x61b),_0x4ebbc8),_0xdae743[_0x641eb0(0x375)]('error',_0x311554),_0xdae743[_0x641eb0(0x375)]('close',_0x4e8b3b);});}async function _0xb018ea(_0x54266a,_0x5a3764,_0x405ddd){const _0xa0358c=_0x1f7bf3;let _0x446551=0x0,_0x9987a2,_0x1d217f=!![];for(;;){const _0x21a187={'snapshot':!![],'limit':_0x249d9f};!_0x1d217f&&(_0x21a187[_0xa0358c(0x570)]=_0x9987a2,_0x21a187[_0xa0358c(0x15a)]=!![]);_0x1d217f=![];const _0x62ecd7=Array['from'](_0x5a3764[_0xa0358c(0x1c1)](_0x21a187));if(_0x62ecd7[_0xa0358c(0x39d)]===0x0)break;let _0x1ea81b='';for(const _0x233496 of _0x62ecd7)_0x1ea81b+=_0x405ddd(_0x233496)+'\x0a';_0x9987a2=_0x62ecd7[_0x62ecd7[_0xa0358c(0x39d)]-0x1][_0xa0358c(0x466)],_0x446551+=_0x62ecd7[_0xa0358c(0x39d)],await _0x3a014e(_0x54266a,_0x1ea81b);if(_0x62ecd7[_0xa0358c(0x39d)]<_0x249d9f)break;await _0xf851d();}return _0x446551;}class _0x4c2aa4{constructor(_0x47956e){const _0x5b7e15=_0x1f7bf3;this[_0x5b7e15(0x229)]=_0x47956e;}[_0x1f7bf3(0x158)](_0xb1b0da=_0x1f7bf3(0x3e8)){const _0x346cc0=_0x1f7bf3;return this[_0x346cc0(0x229)]['env'](_0xb1b0da);}async[_0x1f7bf3(0x76a)](_0x5704c5=_0x1f7bf3(0x3e8)){const _0x2aa0a2=_0x1f7bf3;return!this[_0x2aa0a2(0x229)][_0x2aa0a2(0x64c)][_0x2aa0a2(0x469)](_0x5704c5)&&await this['okdb'][_0x2aa0a2(0x758)](_0x5704c5,{'sync':!![]}),this[_0x2aa0a2(0x229)]['env'](_0x5704c5);}[_0x1f7bf3(0x278)](_0x22b3ba,_0x16122d){const _0x503abe=_0x1f7bf3,_0x2173b4=[..._0x22b3ba[_0x503abe(0x5e0)][_0x503abe(0x680)]()][_0x503abe(0x293)](_0x581219=>!_0x581219[_0x503abe(0x42e)]('~')&&!_0x581219['startsWith'](_0x503abe(0x53c)));if(!_0x16122d)return _0x2173b4;return _0x2173b4['filter'](_0x21df88=>_0x16122d[_0x503abe(0x8f)](_0x21df88));}[_0x1f7bf3(0x457)](_0x5da1d3,_0x3a0386){const _0x285e9c=_0x1f7bf3,_0x18721a=_0x5da1d3[_0x285e9c(0x105)][_0x285e9c(0x6a)](_0x3a0386),_0x49cec7=_0x5da1d3[_0x285e9c(0x5e0)]['get'](_0x3a0386)||{},_0xc12b65=[];for(const [,_0x2cdc2a]of _0x18721a?.[_0x285e9c(0x149)]??new Map()){const _0x57d480={'fields':_0x2cdc2a[_0x285e9c(0x3cb)]};if(_0x2cdc2a[_0x285e9c(0x6ce)])_0x57d480[_0x285e9c(0x420)]=_0x2cdc2a[_0x285e9c(0x6ce)];if(_0x2cdc2a[_0x285e9c(0x71b)])_0x57d480[_0x285e9c(0x71b)]=!![];_0xc12b65[_0x285e9c(0x2f9)](_0x57d480);}const _0x5dde19={};for(const [_0x4f5e8a,_0xca8960]of Object[_0x285e9c(0x61d)](_0x49cec7['ftsIndexes']||{})){_0x5dde19[_0x4f5e8a]={'fields':_0xca8960[_0x285e9c(0x3f4)]?.['fields'],'tokenizer':_0xca8960['config']?.[_0x285e9c(0x106)]};}const _0x27183b={'indexes':_0xc12b65,'ftsIndexes':_0x5dde19};return _0x49cec7['schema']&&(_0x27183b[_0x285e9c(0x2b7)]=_0x49cec7[_0x285e9c(0x2b7)]),_0x27183b;}async['exportToStream'](_0x555361,_0x590400={}){const _0x19051c=_0x1f7bf3,{envName:envName=_0x19051c(0x3e8),types:types=null,includeChanges:includeChanges=![],_noHeader:_noHeader=![]}=_0x590400,_0x34cfc3=this[_0x19051c(0x158)](envName),_0x1c6dcd=this[_0x19051c(0x278)](_0x34cfc3,types);let _0x2224cb=0x0,_0x26ab52=0x0;!_noHeader&&await _0x3a014e(_0x555361,JSON[_0x19051c(0x5c1)]({'r':_0x6046be,'kdbVersion':require$$3[_0x19051c(0x3e1)],'exportedAt':Date[_0x19051c(0x127)](),'envName':envName})+'\x0a');for(const _0x39e12c of _0x1c6dcd){const _0x5432bf=_0x34cfc3[_0x19051c(0x105)][_0x19051c(0x6a)](_0x39e12c);if(!_0x5432bf)continue;const _0x3b3346=this[_0x19051c(0x457)](_0x34cfc3,_0x39e12c);await _0x3a014e(_0x555361,JSON[_0x19051c(0x5c1)]({'r':_0x1c72c8,'type':_0x39e12c,..._0x3b3346})+'\x0a'),_0x2224cb+=await _0xb018ea(_0x555361,_0x5432bf['data'],({key:_0x5a0157,value:_0x298967,version:_0x268710})=>JSON[_0x19051c(0x5c1)]({'r':_0x4c2baf,'t':_0x39e12c,'k':_0x5a0157,'v':_0x298967,'ver':_0x268710}));}return includeChanges&&_0x34cfc3['_sync']&&(_0x26ab52=await _0xb018ea(_0x555361,_0x34cfc3[_0x19051c(0x4eb)],({key:_0x4292ff,value:_0x273731})=>JSON['stringify']({'r':_0x5cefbc,'clock':_0x4292ff,'event':_0x273731}))),{'types':_0x1c6dcd[_0x19051c(0x39d)],'records':_0x2224cb,'changes':_0x26ab52};}async['exportToFile'](_0x2a1e71,_0x578eef={}){const _0x23dc5f=_0x1f7bf3;_0x268cb0[_0x23dc5f(0x2ad)](_0x3909fa[_0x23dc5f(0x195)](_0x2a1e71),{'recursive':!![]});const _0x3da2c0=_0x268cb0[_0x23dc5f(0x1ff)](_0x2a1e71),_0x565fb0=await this[_0x23dc5f(0x500)](_0x3da2c0,_0x578eef);return await new Promise((_0x23f31e,_0x3c2e08)=>{const _0x1323e4=_0x23dc5f;_0x3da2c0[_0x1323e4(0xe5)](),_0x3da2c0[_0x1323e4(0x375)](_0x1323e4(0x47b),_0x23f31e),_0x3da2c0[_0x1323e4(0x375)](_0x1323e4(0x492),_0x3c2e08);}),{..._0x565fb0,'filePath':_0x2a1e71};}async['exportEnvsToStream'](_0x3e281a,_0xf425ac={}){const _0x545a95=_0x1f7bf3,{envNames:envNames=null,types:types=null,includeChanges:includeChanges=![]}=_0xf425ac,_0x37c1ca=[...this['okdb'][_0x545a95(0x64c)][_0x545a95(0x6d8)]()][_0x545a95(0x293)](_0x31a309=>!_0x31a309[_0x545a95(0x42e)]('~')),_0x3d9024=envNames?_0x37c1ca[_0x545a95(0x293)](_0x37cd34=>envNames[_0x545a95(0x8f)](_0x37cd34)):_0x37c1ca;await _0x3a014e(_0x3e281a,JSON[_0x545a95(0x5c1)]({'r':_0x6046be,'kdbVersion':require$$3['version'],'exportedAt':Date['now'](),'envNames':_0x3d9024})+'\x0a');let _0x34662b=0x0,_0x19e676=0x0,_0x18f5f9=0x0;for(const _0x38893d of _0x3d9024){await _0x3a014e(_0x3e281a,JSON['stringify']({'r':_0x4c7be3,'name':_0x38893d})+'\x0a');const _0x1bf34e=await this[_0x545a95(0x500)](_0x3e281a,{'envName':_0x38893d,'types':types,'includeChanges':includeChanges,'_noHeader':!![]});_0x34662b+=_0x1bf34e[_0x545a95(0x429)],_0x19e676+=_0x1bf34e[_0x545a95(0x3ee)],_0x18f5f9+=_0x1bf34e['changes'];}return{'envs':_0x3d9024[_0x545a95(0x39d)],'types':_0x34662b,'records':_0x19e676,'changes':_0x18f5f9};}async[_0x1f7bf3(0xd2)](_0x52d7c5,_0x22063d={}){const _0x106707=_0x1f7bf3,{envName:_0x24bbf1=null,types:_0xd0a7e1=null,dropExisting:dropExisting=![],batchSize:batchSize=_0x7e630b,includeChanges:includeChanges=![],onProgress:onProgress=null}=_0x22063d;let _0x43874a=_0x24bbf1??_0x106707(0x3e8),_0x59f48a=null,_0x50f892=0x0,_0x2d6fb0=0x0,_0x4acd2a=0x0,_0xd9452b=null,_0x21753b=[];const _0x386a87=[],_0x296139=async()=>{const _0x341da5=_0x106707;if(!_0x21753b[_0x341da5(0x39d)]||!_0xd9452b||!_0x59f48a)return;await _0x59f48a['_writer'][_0x341da5(0x4f9)](()=>{const _0x197cb=_0x341da5;for(const {k:_0x205e70,v:_0x35460e,ver:_0x5167e6}of _0x21753b){_0x59f48a[_0x197cb(0x483)](null,_0xd9452b,_0x205e70,_0x35460e,{'version':_0x5167e6,'origin':_0x197cb(0x1e2)});}}),_0x2d6fb0+=_0x21753b[_0x341da5(0x39d)],onProgress?.({'type':_0xd9452b,'count':_0x2d6fb0}),_0x21753b=[];};await this[_0x106707(0x75)](_0x52d7c5,async _0xc71cb0=>{const _0x47d57a=_0x106707,_0x33bf3b=_0xc71cb0['r'];if(_0x33bf3b===_0x6046be){if(!_0x24bbf1&&_0xc71cb0['envName'])_0x43874a=_0xc71cb0[_0x47d57a(0x30b)];_0x59f48a=await this[_0x47d57a(0x76a)](_0x43874a);return;}if(!_0x59f48a)_0x59f48a=await this[_0x47d57a(0x76a)](_0x43874a);if(_0x33bf3b===_0x4c7be3){await _0x296139(),_0xd9452b=null,_0x43874a=_0x24bbf1??_0xc71cb0[_0x47d57a(0x707)],_0x59f48a=await this[_0x47d57a(0x76a)](_0x43874a);return;}if(_0x33bf3b===_0x1c72c8){const {type:_0x3007e8,indexes:indexes=[],ftsIndexes:ftsIndexes={},schema:_0x499d60}=_0xc71cb0;if(_0xd0a7e1&&!_0xd0a7e1[_0x47d57a(0x8f)](_0x3007e8))return;await _0x296139(),_0xd9452b=_0x3007e8;dropExisting&&_0x59f48a[_0x47d57a(0x753)](_0x3007e8)&&await _0x59f48a[_0x47d57a(0x729)](_0x3007e8);!_0x59f48a[_0x47d57a(0x753)](_0x3007e8)&&(await _0x59f48a['registerType'](_0x3007e8),_0x50f892++);for(const _0x4fa0a6 of indexes){if(!_0x59f48a['hasIndex'](_0x3007e8,_0x4fa0a6[_0x47d57a(0x6b0)])){const _0x2a39e0={};_0x4fa0a6[_0x47d57a(0x420)]&&(_0x2a39e0[_0x47d57a(0x66f)]=_0x47d57a(0x420),_0x2a39e0['precision']=_0x4fa0a6[_0x47d57a(0x420)][_0x47d57a(0x69f)]);if(_0x4fa0a6['unique'])_0x2a39e0['unique']=!![];await _0x59f48a['registerIndex'](_0x3007e8,_0x4fa0a6[_0x47d57a(0x6b0)],_0x2a39e0);}}for(const [_0x3a77e4,_0x37b652]of Object['entries'](ftsIndexes)){!this[_0x47d57a(0x229)][_0x47d57a(0x2c1)][_0x47d57a(0x469)](_0x3007e8,_0x3a77e4,_0x59f48a)&&await this[_0x47d57a(0x229)]['fts'][_0x47d57a(0x44e)](_0x3007e8,_0x3a77e4,{'fields':_0x37b652['fields'],'tokenizer':_0x37b652[_0x47d57a(0x106)]},undefined,_0x59f48a);}_0x499d60?.[_0x47d57a(0xb8)]&&_0x386a87[_0x47d57a(0x2f9)]({'env':_0x59f48a,'type':_0x3007e8,'schema':_0x499d60});return;}if(_0x33bf3b===_0x4c2baf){if(_0xd0a7e1&&!_0xd0a7e1[_0x47d57a(0x8f)](_0xc71cb0['t']))return;_0xc71cb0['t']!==_0xd9452b&&(await _0x296139(),_0xd9452b=_0xc71cb0['t']);_0x21753b['push']({'k':_0xc71cb0['k'],'v':_0xc71cb0['v'],'ver':_0xc71cb0[_0x47d57a(0x4a6)]});if(_0x21753b[_0x47d57a(0x39d)]>=batchSize)await _0x296139();return;}_0x33bf3b===_0x5cefbc&&includeChanges&&_0x59f48a[_0x47d57a(0x731)]&&(_0x59f48a[_0x47d57a(0x4eb)][_0x47d57a(0x16c)](_0xc71cb0[_0x47d57a(0x73d)],_0xc71cb0['event']),_0x4acd2a++);}),await _0x296139();for(const {env:_0x12d821,type:_0x1bbf23,schema:_0x50085e}of _0x386a87){try{await _0x12d821[_0x106707(0x2e1)](_0x1bbf23,_0x50085e);}catch{if(_0x50085e[_0x106707(0x213)])try{await _0x12d821[_0x106707(0x2e1)](_0x1bbf23,{..._0x50085e,'enforce':![]});}catch{}}}return{'types':_0x50f892,'records':_0x2d6fb0,'changes':_0x4acd2a};}async[_0x1f7bf3(0x1be)](_0x55a215,_0x10fd62={}){const _0x3cd7c9=_0x1f7bf3,_0x13038e=_0x268cb0['createReadStream'](_0x55a215,{'encoding':_0x3cd7c9(0x320)});return this['importFromStream'](_0x13038e,_0x10fd62);}[_0x1f7bf3(0x75)](_0x44489e,_0x880628){return new Promise((_0x4bbc36,_0x26e040)=>{const _0x16aaa7=_0x8cd7;let _0x1601c4='',_0x2614a8=Promise[_0x16aaa7(0x738)]();const _0x517c0f=async _0x5df4f5=>{const _0x52924c=_0x16aaa7;_0x1601c4+=_0x5df4f5;const _0x43ede9=_0x1601c4[_0x52924c(0x2aa)]('\x0a');_0x1601c4=_0x43ede9[_0x52924c(0x76e)]();for(const _0x388743 of _0x43ede9){const _0x3537a5=_0x388743['trim']();if(!_0x3537a5)continue;let _0x5af514;try{_0x5af514=JSON[_0x52924c(0xc3)](_0x3537a5);}catch{continue;}await _0x880628(_0x5af514);}};_0x44489e['on'](_0x16aaa7(0x32e),_0x5b73b1=>{const _0x31661f=_0x16aaa7;_0x2614a8=_0x2614a8[_0x31661f(0xad)](()=>_0x517c0f(String(_0x5b73b1)));}),_0x44489e['on'](_0x16aaa7(0xe5),()=>{const _0x3611fd=_0x16aaa7;_0x2614a8[_0x3611fd(0xad)](async()=>{const _0xef430a=_0x3611fd,_0x49cacd=_0x1601c4['trim']();if(_0x49cacd)try{await _0x880628(JSON[_0xef430a(0xc3)](_0x49cacd));}catch{}_0x4bbc36();})[_0x3611fd(0x618)](_0x26e040);}),_0x44489e['on']('error',_0x26e040);});}async[_0x1f7bf3(0x156)](_0xfa9ed8,_0x7c28a8={}){const _0x46c3c5=_0x1f7bf3,{envNames:envNames=null,compact:compact=!![]}=_0x7c28a8,_0x19de55=this[_0x46c3c5(0x229)],_0x451e24=_0x3909fa[_0x46c3c5(0x738)](_0x19de55[_0x46c3c5(0x4c5)]),_0x24d366=_0x3909fa[_0x46c3c5(0x738)](_0xfa9ed8),_0x3602c6=_0x3909fa['relative'](_0x451e24,_0x24d366);if(_0x3602c6===''||!(_0x3602c6['startsWith']('..')||_0x3909fa[_0x46c3c5(0x65d)](_0x3602c6)))throw new _0x4c4660(_0x46c3c5(0x444)+_0x24d366+_0x46c3c5(0x5f1)+_0x451e24+_0x46c3c5(0x265),_0x46c3c5(0x360));if(_0x268cb0[_0x46c3c5(0x1c9)](_0x24d366)&&_0x268cb0[_0x46c3c5(0x1ed)](_0x24d366)['length']>0x0)throw new _0x4c4660(_0x46c3c5(0x444)+_0x24d366+_0x46c3c5(0x649),_0x46c3c5(0x4b9));_0x268cb0[_0x46c3c5(0x2ad)](_0x24d366,{'recursive':!![]});const _0x5a4b18=envNames?new Set([...envNames,_0x46c3c5(0x668)]):null,_0x169f38=[],_0x1e0922=[],_0x35c8db=[];for(const [_0x4a272a,_0x460cc8]of[..._0x19de55['_envs'][_0x46c3c5(0x61d)]()]){if(_0x5a4b18&&!_0x5a4b18[_0x46c3c5(0x469)](_0x4a272a))continue;if(_0x4a272a===_0x46c3c5(0x63c))continue;if(!_0x460cc8[_0x46c3c5(0x550)]||!_0x460cc8['db']){_0x1e0922[_0x46c3c5(0x2f9)]({'name':_0x4a272a,'reason':_0x46c3c5(0x1c0)});continue;}const _0x11bdb4=_0x3909fa['resolve'](_0x460cc8['path']),_0x56b475=_0x3909fa[_0x46c3c5(0x61e)](_0x451e24,_0x11bdb4),_0x47345a=_0x56b475===''||_0x56b475['startsWith']('..')||_0x3909fa[_0x46c3c5(0x65d)](_0x56b475),_0x3774a6=_0x47345a?_0x19de55['_safeEnvDirName'](_0x4a272a):_0x56b475,_0x168027=_0x3909fa[_0x46c3c5(0x10b)](_0x24d366,_0x3774a6);_0x268cb0[_0x46c3c5(0x2ad)](_0x168027,{'recursive':!![]});const _0x501607=_0x3909fa[_0x46c3c5(0x10b)](_0x11bdb4,_0x46c3c5(0x60f));let _0x141357=![];if(_0x268cb0[_0x46c3c5(0x1c9)](_0x3909fa[_0x46c3c5(0x10b)](_0x501607,_0x46c3c5(0x192)))){const _0x226c7e=_0x3909fa['join'](_0x168027,_0x46c3c5(0x60f));_0x268cb0['mkdirSync'](_0x226c7e,{'recursive':!![]}),await _0x5a4efc(_0x460cc8[_0x46c3c5(0x121)]?.['_store']?.['db'],_0x501607,_0x226c7e,compact),_0x141357=!![];}let _0x5a2e02=0x0;try{_0x5a2e02=_0x268cb0[_0x46c3c5(0x52d)](_0x3909fa[_0x46c3c5(0x10b)](_0x11bdb4,_0x46c3c5(0x192)))['size'];}catch{}await _0x460cc8['db'][_0x46c3c5(0x156)](_0x168027,Boolean(compact));let _0x2abb0c=0x0;try{_0x2abb0c=_0x268cb0[_0x46c3c5(0x52d)](_0x3909fa[_0x46c3c5(0x10b)](_0x168027,_0x46c3c5(0x192)))[_0x46c3c5(0x35f)];}catch{}_0x169f38[_0x46c3c5(0x2f9)]({'name':_0x4a272a,'dest':_0x168027,'sizeBefore':_0x5a2e02,'sizeAfter':_0x2abb0c,'timeMachine':_0x141357}),_0x35c8db[_0x46c3c5(0x2f9)]({'name':_0x4a272a,'dir':_0x3774a6,'timeMachine':_0x141357,..._0x47345a?{'outOfTree':_0x47345a,'sourcePath':_0x11bdb4}:{}});}for(const [_0x5e28ff,_0x2d1893]of _0x19de55[_0x46c3c5(0xf7)]??[]){if(_0x5a4b18&&!_0x5a4b18['has'](_0x5e28ff))continue;_0x1e0922[_0x46c3c5(0x2f9)]({'name':_0x5e28ff,'reason':'quarantined:\x20'+(_0x2d1893?.[_0x46c3c5(0x492)]??_0x46c3c5(0xd0))});}const _0x3bf353={'count':0x0,'bytes':0x0},_0x5ca520=_0x19de55[_0x46c3c5(0x4e4)]?.['_blobsDir'];_0x5ca520&&_0x268cb0[_0x46c3c5(0x1c9)](_0x5ca520)&&await this[_0x46c3c5(0x1cc)](_0x5ca520,_0x3909fa[_0x46c3c5(0x10b)](_0x24d366,_0x46c3c5(0x6ea)),_0x3bf353,(_0x418c43,_0xc42c9)=>_0xc42c9===0x0&&_0x418c43===_0x46c3c5(0x6d7));const _0x25f265=_0x3909fa[_0x46c3c5(0x10b)](_0x24d366,_0x3fe4af),_0x28f3a1={'format':0x1,'okdbVersion':require$$3[_0x46c3c5(0x3e1)],'createdAt':new Date()[_0x46c3c5(0x261)](),'source':_0x451e24,'compact':Boolean(compact),'envs':_0x35c8db,'blobs':_0x3bf353,'skipped':_0x1e0922,'excluded':{'~fts':_0x46c3c5(0x474),'~processes':'live\x20process\x20registry;\x20disposable'}};return _0x268cb0[_0x46c3c5(0x188)](_0x25f265,JSON['stringify'](_0x28f3a1,null,0x2)+'\x0a'),{'ok':!![],'dest':_0x24d366,'envs':_0x169f38,'blobs':_0x3bf353,'skipped':_0x1e0922,'manifest':_0x25f265};}['backupRoot'](){const _0x19b9eb=_0x1f7bf3,_0x47cbcc=this[_0x19b9eb(0x229)][_0x19b9eb(0x518)]?.[_0x19b9eb(0x156)]?.['root'];if(_0x47cbcc)return _0x3909fa[_0x19b9eb(0x738)](_0x47cbcc);const _0x593ca7=_0x3909fa[_0x19b9eb(0x738)](this[_0x19b9eb(0x229)]['path']);return _0x3909fa[_0x19b9eb(0x10b)](_0x3909fa[_0x19b9eb(0x195)](_0x593ca7),_0x3909fa['basename'](_0x593ca7)+_0x19b9eb(0x5c6));}[_0x1f7bf3(0x1a1)](_0x346166){const _0x2182a8=_0x1f7bf3,_0x1e2fb0=this['backupRoot']();_0x268cb0['mkdirSync'](_0x1e2fb0,{'recursive':!![]});const _0x1942dc=_0x268cb0['realpathSync'](_0x1e2fb0),_0x5597aa=_0x346166==null||String(_0x346166)[_0x2182a8(0x471)]()===''?_0x2182a8(0x3d2)+new Date()[_0x2182a8(0x261)]()[_0x2182a8(0x416)](/[:.]/g,'-'):String(_0x346166)['trim'](),_0x54fb26=_0x3909fa['resolve'](_0x1e2fb0,_0x5597aa);let _0x250769=_0x54fb26;const _0x5845f0=[];while(!_0x268cb0[_0x2182a8(0x1c9)](_0x250769)){_0x5845f0[_0x2182a8(0x232)](_0x3909fa[_0x2182a8(0x699)](_0x250769));const _0x5ef6d1=_0x3909fa['dirname'](_0x250769);if(_0x5ef6d1===_0x250769)break;_0x250769=_0x5ef6d1;}const _0x4a964f=_0x3909fa['join'](_0x268cb0[_0x2182a8(0x279)](_0x250769),..._0x5845f0),_0x45c929=_0x3909fa[_0x2182a8(0x61e)](_0x1942dc,_0x4a964f);if(_0x45c929===''||_0x45c929[_0x2182a8(0x42e)]('..')||_0x3909fa['isAbsolute'](_0x45c929))throw new _0x4c4660('backup\x20destination\x20\x22'+_0x5597aa+_0x2182a8(0x2b9)+_0x1e2fb0+_0x2182a8(0x430),_0x2182a8(0x4bc),{'root':_0x1e2fb0,'destDir':_0x5597aa});return{'root':_0x1e2fb0,'dest':_0x4a964f};}async[_0x1f7bf3(0x1cc)](_0x5c5505,_0x6fa817,_0xd0051b={'count':0x0,'bytes':0x0},_0x1f687b=null,_0x4f9fd3=0x0){const _0x1ffe53=_0x1f7bf3;_0x268cb0[_0x1ffe53(0x2ad)](_0x6fa817,{'recursive':!![]});for(const _0xa6bc25 of _0x268cb0[_0x1ffe53(0x1ed)](_0x5c5505,{'withFileTypes':!![]})){if(_0x1f687b?.(_0xa6bc25[_0x1ffe53(0x707)],_0x4f9fd3))continue;const _0x10e866=_0x3909fa['join'](_0x5c5505,_0xa6bc25['name']),_0x183232=_0x3909fa[_0x1ffe53(0x10b)](_0x6fa817,_0xa6bc25[_0x1ffe53(0x707)]);if(_0xa6bc25[_0x1ffe53(0x6e0)]())await this[_0x1ffe53(0x1cc)](_0x10e866,_0x183232,_0xd0051b,_0x1f687b,_0x4f9fd3+0x1);else{try{await _0x268cb0[_0x1ffe53(0x242)][_0x1ffe53(0x99)](_0x10e866,_0x183232);}catch(_0x1f2e66){if(_0x1f2e66?.[_0x1ffe53(0x25b)]===_0x1ffe53(0x109))continue;throw _0x1f2e66;}_0xd0051b[_0x1ffe53(0x6ad)]++;try{_0xd0051b['bytes']+=_0x268cb0['statSync'](_0x183232)[_0x1ffe53(0x35f)];}catch{}}}return _0xd0051b;}async[_0x1f7bf3(0x23a)](_0x1ef8b5={}){const _0x1da115=_0x1f7bf3,{envName:envName=_0x1da115(0x3e8),types:types=null,includeChanges:includeChanges=![]}=_0x1ef8b5,_0x2b48ad={'types':{},'changes':[]},_0x366178=[],_0xf41cb6=new require$$5[(_0x1da115(0xd3))]({'write'(_0xdf1eb0,_0x745a56,_0xda2b9){const _0x5dcf32=_0x1da115;_0x366178[_0x5dcf32(0x2f9)](String(_0xdf1eb0)),_0xda2b9();}});await this[_0x1da115(0x500)](_0xf41cb6,{'envName':envName,'types':types,'includeChanges':includeChanges});for(const _0x574387 of _0x366178['join']('')[_0x1da115(0x2aa)]('\x0a')){const _0x3cb3dc=_0x574387[_0x1da115(0x471)]();if(!_0x3cb3dc)continue;let _0xcfc91e;try{_0xcfc91e=JSON['parse'](_0x3cb3dc);}catch{continue;}if(_0xcfc91e['r']===_0x1c72c8){if(!_0x2b48ad[_0x1da115(0x429)][_0xcfc91e['type']])_0x2b48ad[_0x1da115(0x429)][_0xcfc91e[_0x1da115(0x66f)]]={'entries':[]};if(_0xcfc91e[_0x1da115(0x21f)])_0x2b48ad['types'][_0xcfc91e[_0x1da115(0x66f)]][_0x1da115(0x21f)]=_0xcfc91e[_0x1da115(0x21f)];if(_0xcfc91e[_0x1da115(0x73)])_0x2b48ad[_0x1da115(0x429)][_0xcfc91e[_0x1da115(0x66f)]][_0x1da115(0x73)]=_0xcfc91e['ftsIndexes'];if(_0xcfc91e[_0x1da115(0x2b7)])_0x2b48ad[_0x1da115(0x429)][_0xcfc91e[_0x1da115(0x66f)]][_0x1da115(0x2b7)]=_0xcfc91e['schema'];}else{if(_0xcfc91e['r']===_0x4c2baf){if(!_0x2b48ad[_0x1da115(0x429)][_0xcfc91e['t']])_0x2b48ad[_0x1da115(0x429)][_0xcfc91e['t']]={'entries':[]};_0x2b48ad[_0x1da115(0x429)][_0xcfc91e['t']][_0x1da115(0x61d)][_0x1da115(0x2f9)]({'key':_0xcfc91e['k'],'value':_0xcfc91e['v'],'version':_0xcfc91e['ver']});}else _0xcfc91e['r']===_0x5cefbc&&_0x2b48ad[_0x1da115(0x6b8)][_0x1da115(0x2f9)]({'clock':_0xcfc91e[_0x1da115(0x73d)],'event':_0xcfc91e[_0x1da115(0x6bf)]});}}return _0x2b48ad;}async['import'](_0x186fc3,_0xe100fd={}){const _0x3b410b=_0x1f7bf3,_0x13e849=[];for(const [_0x30d1eb,_0x2a7d29]of Object[_0x3b410b(0x61d)](_0x186fc3[_0x3b410b(0x429)]||{})){const _0x3b7f79={'r':_0x1c72c8,'type':_0x30d1eb,'indexes':_0x2a7d29['indexes']||[],'ftsIndexes':_0x2a7d29['ftsIndexes']||{}};if(_0x2a7d29[_0x3b410b(0x2b7)])_0x3b7f79[_0x3b410b(0x2b7)]=_0x2a7d29['schema'];_0x13e849[_0x3b410b(0x2f9)](JSON[_0x3b410b(0x5c1)](_0x3b7f79));for(const {key:_0x32947c,value:_0x1654fa,version:_0x13c5c6}of _0x2a7d29['entries']||[]){_0x13e849[_0x3b410b(0x2f9)](JSON[_0x3b410b(0x5c1)]({'r':_0x4c2baf,'t':_0x30d1eb,'k':_0x32947c,'v':_0x1654fa,'ver':_0x13c5c6}));}}for(const {clock:_0x453d20,event:_0x54f9de}of _0x186fc3[_0x3b410b(0x6b8)]||[]){_0x13e849[_0x3b410b(0x2f9)](JSON[_0x3b410b(0x5c1)]({'r':_0x5cefbc,'clock':_0x453d20,'event':_0x54f9de}));}const {Readable:_0x2ed81a}=require$$5,_0x16b810=_0x2ed81a[_0x3b410b(0x690)](_0x13e849['join']('\x0a')+'\x0a');return this['importFromStream'](_0x16b810,{..._0xe100fd,'dropExisting':_0xe100fd[_0x3b410b(0x468)]??!![]});}async[_0x1f7bf3(0x5b2)]({pretty:pretty=![]}={}){const _0x54732f=_0x1f7bf3,_0x214802=await this[_0x54732f(0x23a)]();return JSON['stringify'](_0x214802,null,pretty?0x2:0x0);}async[_0x1f7bf3(0x482)](_0xfc766){const _0x4fea7d=_0x1f7bf3,_0x50e0af=JSON[_0x4fea7d(0xc3)](_0xfc766);return this['import'](_0x50e0af);}async['exportBlobs'](_0x32ee62){const _0x154305=_0x1f7bf3;if(!this['okdb']['files'])throw new Error(_0x154305(0x6a1));const _0x1cda8c=this['okdb'][_0x154305(0x4e4)][_0x154305(0x18c)];let _0x5d1250=0x0,_0x70ad90=0x0;const _0x5a0b10=_0x52ac16=>{const _0x1969d2=_0x154305;if(!_0x268cb0[_0x1969d2(0x1c9)](_0x52ac16))return;for(const _0x3fc7fe of _0x268cb0['readdirSync'](_0x52ac16,{'withFileTypes':!![]})){const _0xf6fb87=_0x3909fa['join'](_0x52ac16,_0x3fc7fe[_0x1969d2(0x707)]);if(_0x3fc7fe[_0x1969d2(0x6e0)]()){if(_0x3fc7fe[_0x1969d2(0x707)]===_0x1969d2(0x6d7))continue;_0x5a0b10(_0xf6fb87);}else{const _0x8d1723=_0x3909fa[_0x1969d2(0x699)](_0x3909fa[_0x1969d2(0x195)](_0xf6fb87)),_0x594999=_0x8d1723+_0x3fc7fe['name'],_0x44fe7=_0x3909fa[_0x1969d2(0x10b)](_0x32ee62,_0x594999['slice'](0x0,0x2)),_0x218ace=_0x3909fa[_0x1969d2(0x10b)](_0x44fe7,_0x594999[_0x1969d2(0x13a)](0x2));_0x268cb0[_0x1969d2(0x2ad)](_0x44fe7,{'recursive':!![]}),_0x268cb0[_0x1969d2(0x326)](_0xf6fb87,_0x218ace),_0x5d1250++;try{_0x70ad90+=_0x268cb0['statSync'](_0xf6fb87)['size'];}catch{}}}};return _0x268cb0[_0x154305(0x2ad)](_0x32ee62,{'recursive':!![]}),_0x5a0b10(_0x1cda8c),{'count':_0x5d1250,'bytes':_0x70ad90};}async[_0x1f7bf3(0x2d0)](_0x1d6343){const _0x1f722e=_0x1f7bf3;if(!this[_0x1f722e(0x229)][_0x1f722e(0x4e4)])throw new Error(_0x1f722e(0x6a1));await this['okdb']['files'][_0x1f722e(0x5ac)]();let _0x179091=0x0,_0x4fbb26=0x0;const _0x2ffd7f=_0x578d5d=>{const _0x2a13a6=_0x1f722e;if(!_0x268cb0[_0x2a13a6(0x1c9)](_0x578d5d))return;for(const _0x319aba of _0x268cb0[_0x2a13a6(0x1ed)](_0x578d5d,{'withFileTypes':!![]})){const _0x25a0e7=_0x3909fa[_0x2a13a6(0x10b)](_0x578d5d,_0x319aba[_0x2a13a6(0x707)]);if(_0x319aba[_0x2a13a6(0x6e0)]())_0x2ffd7f(_0x25a0e7);else{const _0x1ef230=_0x3909fa[_0x2a13a6(0x699)](_0x3909fa[_0x2a13a6(0x195)](_0x25a0e7)),_0x5c6dc6=_0x1ef230+_0x319aba[_0x2a13a6(0x707)],_0x581615=this[_0x2a13a6(0x229)]['files'][_0x2a13a6(0x6f2)](_0x5c6dc6);if(_0x268cb0[_0x2a13a6(0x1c9)](_0x581615)){_0x4fbb26++;continue;}const _0x200443=_0x3909fa[_0x2a13a6(0x195)](_0x581615);_0x268cb0[_0x2a13a6(0x2ad)](_0x200443,{'recursive':!![]}),_0x268cb0[_0x2a13a6(0x326)](_0x25a0e7,_0x581615);const _0x4e73ba=this[_0x2a13a6(0x229)][_0x2a13a6(0x4e4)][_0x2a13a6(0x308)](_0x5c6dc6);this['okdb'][_0x2a13a6(0x4e4)][_0x2a13a6(0xeb)]?.[_0x2a13a6(0x16c)](_0x5c6dc6,{'refs':_0x4e73ba}),_0x179091++;}}};return _0x2ffd7f(_0x1d6343),{'imported':_0x179091,'skipped':_0x4fbb26};}[_0x1f7bf3(0x5d8)](){const _0x139a86=_0x1f7bf3,_0x3ed248=[];for(const [,_0xfa81cd]of this[_0x139a86(0x229)]['_envs']){if(_0xfa81cd['_sync']&&_0xfa81cd['hasType']('~files'))_0x3ed248[_0x139a86(0x2f9)](_0xfa81cd);}return _0x3ed248;}async[_0x1f7bf3(0x5d2)](){const _0x4beef5=_0x1f7bf3;if(!this[_0x4beef5(0x229)]['files'])throw new Error(_0x4beef5(0x6a1));await this[_0x4beef5(0x229)][_0x4beef5(0x4e4)]['_ensure']();const _0x433adc=[],_0x384cbe=this[_0x4beef5(0x229)][_0x4beef5(0x4e4)];for(const _0x35ee80 of this[_0x4beef5(0x5d8)]()){for(const {key:_0x243e73,value:_0x41fe3c}of _0x35ee80['getRange'](_0x4beef5(0xba))){if(!_0x41fe3c[_0x4beef5(0x357)])continue;const _0x104479=_0x384cbe[_0x4beef5(0x6f2)](_0x41fe3c[_0x4beef5(0x357)]);!_0x268cb0[_0x4beef5(0x1c9)](_0x104479)&&_0x433adc['push']({'type':_0x4beef5(0x120),'env':_0x35ee80[_0x4beef5(0x707)],'id':String(_0x243e73),'hash':_0x41fe3c[_0x4beef5(0x357)],'message':_0x4beef5(0x3be)+_0x243e73+_0x4beef5(0x378)+_0x35ee80[_0x4beef5(0x707)]+_0x4beef5(0x407)+_0x41fe3c[_0x4beef5(0x357)][_0x4beef5(0x13a)](0x0,0x8)+'…)'});const _0x1b5f02=_0x384cbe[_0x4beef5(0xeb)]?.[_0x4beef5(0x6a)](_0x41fe3c['hash']);(!_0x1b5f02||_0x1b5f02[_0x4beef5(0x47f)]<=0x0)&&_0x433adc[_0x4beef5(0x2f9)]({'type':_0x4beef5(0x2f5),'env':_0x35ee80[_0x4beef5(0x707)],'id':String(_0x243e73),'hash':_0x41fe3c['hash'],'message':_0x4beef5(0x65a)+_0x243e73+'\x22\x20in\x20env\x20\x22'+_0x35ee80[_0x4beef5(0x707)]+'\x22\x20(hash:\x20'+_0x41fe3c[_0x4beef5(0x357)][_0x4beef5(0x13a)](0x0,0x8)+'…)'});}}const _0x11077c=new Set();for(const _0x394900 of this[_0x4beef5(0x5d8)]()){for(const {value:_0x52bbf2}of _0x394900['getRange'](_0x4beef5(0xba))){if(_0x52bbf2[_0x4beef5(0x357)])_0x11077c['add'](_0x52bbf2[_0x4beef5(0x357)]);}}const _0x230491=_0x1acd17=>{const _0x58b2c1=_0x4beef5;if(!_0x268cb0[_0x58b2c1(0x1c9)](_0x1acd17))return;for(const _0x7362ce of _0x268cb0[_0x58b2c1(0x1ed)](_0x1acd17,{'withFileTypes':!![]})){const _0x4918c5=_0x3909fa[_0x58b2c1(0x10b)](_0x1acd17,_0x7362ce[_0x58b2c1(0x707)]);if(_0x7362ce[_0x58b2c1(0x6e0)]()){if(_0x7362ce[_0x58b2c1(0x707)]===_0x58b2c1(0x6d7))continue;_0x230491(_0x4918c5);}else{const _0xb09963=_0x3909fa[_0x58b2c1(0x699)](_0x3909fa[_0x58b2c1(0x195)](_0x4918c5)),_0x57fe6b=_0xb09963+_0x7362ce[_0x58b2c1(0x707)];!_0x11077c['has'](_0x57fe6b)&&_0x433adc[_0x58b2c1(0x2f9)]({'type':_0x58b2c1(0x117),'hash':_0x57fe6b,'message':_0x58b2c1(0x49f)+_0x57fe6b[_0x58b2c1(0x13a)](0x0,0x8)+'…)'});}}};return _0x230491(_0x384cbe[_0x4beef5(0x18c)]),_0x433adc;}async['repairBlobRefs'](){const _0x4367bd=_0x1f7bf3;if(!this[_0x4367bd(0x229)]['files'])throw new Error(_0x4367bd(0x6a1));await this['okdb'][_0x4367bd(0x4e4)]['_ensure']();const _0x475312=this[_0x4367bd(0x229)][_0x4367bd(0x4e4)]['_blobStatusDb'];if(!_0x475312)throw new Error(_0x4367bd(0x6bc));const _0x57e945=[];for(const {key:_0x1a54e0}of _0x475312[_0x4367bd(0x1c1)]())_0x57e945[_0x4367bd(0x2f9)](_0x1a54e0);for(const _0x2fd84c of _0x57e945)_0x475312[_0x4367bd(0x59e)](_0x2fd84c);const _0x5d1e12=new Map();for(const _0x638a0c of this[_0x4367bd(0x5d8)]()){for(const {value:_0x27a27f}of _0x638a0c[_0x4367bd(0x1c1)](_0x4367bd(0xba))){_0x27a27f['hash']&&_0x5d1e12[_0x4367bd(0x49d)](_0x27a27f['hash'],(_0x5d1e12['get'](_0x27a27f[_0x4367bd(0x357)])??0x0)+0x1);}}for(const [_0x38bb08,_0x1b4c2c]of _0x5d1e12){_0x475312[_0x4367bd(0x16c)](_0x38bb08,{'refs':_0x1b4c2c});}return{'rebuilt':_0x5d1e12[_0x4367bd(0x35f)]};}}return okdbMigrate['exports']=_0x4c2aa4,okdbMigrate[_0x1f7bf3(0x71d)][_0x1f7bf3(0x585)]=_0x3fe4af,okdbMigrate['exports'];}var okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x28cc93=require$$2$1;function _0x10557a(_0x59fc74,_0x5b4acb){const _0x3f22e7=_0x8cd7;return _0x28cc93[_0x3f22e7(0x6d5)](_0x3f22e7(0x647),_0x5b4acb)['update'](_0x59fc74)[_0x3f22e7(0x674)](_0x3f22e7(0x1bf));}function _0x16e986(_0x24554a,_0x1abcca){const _0x325b3c=_0x8cd7;if(typeof _0x24554a!=='string'||typeof _0x1abcca!=='string')return![];if(Buffer[_0x325b3c(0x32c)](_0x24554a)!==Buffer[_0x325b3c(0x32c)](_0x1abcca))return![];return _0x28cc93[_0x325b3c(0xa8)](Buffer[_0x325b3c(0x690)](_0x24554a),Buffer[_0x325b3c(0x690)](_0x1abcca));}function _0x32e4a5(_0x217c9c){const _0x18a853=_0x8cd7;if(!_0x217c9c?.[_0x18a853(0x42e)](_0x18a853(0x557)))return null;return _0x217c9c[_0x18a853(0x13a)](0x7);}function _0x492f49(_0x4515b5=0x20){const _0x3ceb75=_0x8cd7;return _0x28cc93[_0x3ceb75(0x122)](_0x4515b5)[_0x3ceb75(0x240)](_0x3ceb75(0x1bf));}function _0x17eca6(_0x690ffd){const _0x532d6a=_0x8cd7;return _0x28cc93[_0x532d6a(0x3cc)](_0x532d6a(0x647))[_0x532d6a(0x29f)](_0x690ffd)[_0x532d6a(0x674)](_0x532d6a(0x31b));}function _0x3e9cb4(_0x5107bf,_0x2c963a,_0x286562=0x36ee80){const _0x4f30c1=_0x8cd7;if(!_0x2c963a)throw new Error(_0x4f30c1(0x1dc));const _0x213a4a=Date[_0x4f30c1(0x127)](),_0x2b2458=Buffer[_0x4f30c1(0x690)](JSON['stringify']({'iat':_0x213a4a,'exp':_0x213a4a+_0x286562,'sub':_0x5107bf?.['id']??_0x5107bf?.['sub']??null,'username':_0x5107bf?.[_0x4f30c1(0x573)]??_0x5107bf?.[_0x4f30c1(0x707)]??null,'roles':Array[_0x4f30c1(0x339)](_0x5107bf?.['roles'])?_0x5107bf[_0x4f30c1(0x733)]:[]}))[_0x4f30c1(0x240)](_0x4f30c1(0x1bf)),_0x5479f0=_0x10557a(_0x2b2458,_0x2c963a);return _0x2b2458+'.'+_0x5479f0;}function _0x12b462(_0x20c854,_0x1e0785){const _0x26a7ae=_0x8cd7;if(!_0x1e0785||typeof _0x20c854!==_0x26a7ae(0xe7))return null;const [_0x11cd76,_0x54f663]=_0x20c854[_0x26a7ae(0x2aa)]('.');if(!_0x11cd76||!_0x54f663)return null;const _0x71f2e=_0x10557a(_0x11cd76,_0x1e0785);if(!_0x16e986(_0x54f663,_0x71f2e))return null;try{const _0x4ee268=JSON['parse'](Buffer['from'](_0x11cd76,_0x26a7ae(0x1bf))['toString']()),_0x55a389=0x7530;if(Date[_0x26a7ae(0x127)]()>Number(_0x4ee268?.['exp']??0x0)+_0x55a389)return null;return _0x4ee268;}catch{return null;}}async function _0x54062a(_0x4091e5){return new Promise((_0x5c7351,_0x202e8f)=>{const _0x29908a=_0x8cd7,_0x5f2397=_0x28cc93[_0x29908a(0x122)](0x10);_0x28cc93[_0x29908a(0x6ec)](_0x4091e5,_0x5f2397,0x40,(_0x427dd2,_0x36d9d6)=>{const _0x1fdde3=_0x29908a;if(_0x427dd2)return _0x202e8f(_0x427dd2);_0x5c7351(_0x5f2397[_0x1fdde3(0x240)](_0x1fdde3(0x31b))+':'+_0x36d9d6[_0x1fdde3(0x240)](_0x1fdde3(0x31b)));});});}async function _0x294e22(_0x42c165,_0x144b2e){const _0x555212=_0x8cd7;if(typeof _0x144b2e!==_0x555212(0xe7))return![];const [_0x3e0866,_0x3a9572]=_0x144b2e[_0x555212(0x2aa)](':');if(!_0x3e0866||!_0x3a9572)return![];const _0x17287b=Buffer[_0x555212(0x690)](_0x3e0866,_0x555212(0x31b)),_0x563093=Buffer[_0x555212(0x690)](_0x3a9572,_0x555212(0x31b));if(_0x563093[_0x555212(0x39d)]!==0x40)return![];return new Promise((_0x118775,_0x5257ce)=>{_0x28cc93['scrypt'](_0x42c165,_0x17287b,0x40,(_0x49ee41,_0x26fb37)=>{const _0x1d8b23=_0x8cd7;if(_0x49ee41)return _0x5257ce(_0x49ee41);_0x118775(_0x28cc93[_0x1d8b23(0xa8)](_0x26fb37,_0x563093));});});}return okdbAuthTokens={'hmac':_0x10557a,'timingSafeEqual':_0x16e986,'parseBearer':_0x32e4a5,'randomToken':_0x492f49,'hashToken':_0x17eca6,'issueToken':_0x3e9cb4,'authenticateToken':_0x12b462,'hashPassword':_0x54062a,'verifyPassword':_0x294e22},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x27036c=_0x3d20e4;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x10bdc8=require$$0$2,_0xcac285='0123456789ABCDEFGHJKMNPQRSTVWXYZ',_0x5ba0db=new Uint8Array(0x100)['fill'](0xff);for(let _0xca850f=0x0;_0xca850f<_0xcac285[_0x27036c(0x39d)];_0xca850f++){_0x5ba0db[_0xcac285[_0x27036c(0x641)](_0xca850f)]=_0xca850f,_0x5ba0db[_0xcac285[_0x27036c(0x641)](_0xca850f)+0x20]=_0xca850f;}_0x5ba0db['O'[_0x27036c(0x641)](0x0)]=0x0,_0x5ba0db['o'[_0x27036c(0x641)](0x0)]=0x0,_0x5ba0db['I'['charCodeAt'](0x0)]=0x1,_0x5ba0db['i'[_0x27036c(0x641)](0x0)]=0x1,_0x5ba0db['L'['charCodeAt'](0x0)]=0x1,_0x5ba0db['l'[_0x27036c(0x641)](0x0)]=0x1;function _0x2d3bff(_0x10ce1a){const _0xd9bae3=_0x27036c;let _0x47a569=0x0,_0x1c7788=0x0,_0x234445='';for(let _0xdaa13a=0x0;_0xdaa13a<_0x10ce1a[_0xd9bae3(0x39d)];_0xdaa13a++){_0x1c7788=_0x1c7788<<0x8|_0x10ce1a[_0xdaa13a],_0x47a569+=0x8;while(_0x47a569>=0x5){_0x47a569-=0x5,_0x234445+=_0xcac285[_0x1c7788>>>_0x47a569&0x1f];}}return _0x47a569>0x0&&(_0x234445+=_0xcac285[_0x1c7788<<0x5-_0x47a569&0x1f]),_0x234445;}function _0x893c60(_0x35857f){const _0x5c3149=_0x27036c;_0x35857f=_0x35857f[_0x5c3149(0x416)](/-/g,'')[_0x5c3149(0x419)]();let _0x4188dd=0x0,_0x5a8463=0x0;const _0x2fd04d=[];for(let _0x3448c7=0x0;_0x3448c7<_0x35857f['length'];_0x3448c7++){const _0x4e6257=_0x5ba0db[_0x35857f[_0x5c3149(0x641)](_0x3448c7)];if(_0x4e6257===0xff)continue;_0x5a8463=_0x5a8463<<0x5|_0x4e6257,_0x4188dd+=0x5,_0x4188dd>=0x8&&(_0x4188dd-=0x8,_0x2fd04d[_0x5c3149(0x2f9)](_0x5a8463>>>_0x4188dd&0xff));}return Buffer[_0x5c3149(0x690)](_0x2fd04d);}const _0x590562=['sync',_0x27036c(0x6ac),_0x27036c(0x39c),_0x27036c(0x2c1),_0x27036c(0x121),_0x27036c(0x3f8),_0x27036c(0x3a2),'files'],_0x5def1b=0x0,_0x1f469d=0x1,_0xdb160d=0x2,_0x243b05=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x2e8617({issuedAt:_0x4aff63,expiresAt:_0x350843,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x5def1b}){const _0x53863b=_0x27036c,_0x319f6e=Buffer[_0x53863b(0x690)](licensee,'utf8')[_0x53863b(0x13a)](0x0,0x40),_0x244444=0x1+0x1+0x4+0x4+0x1+_0x319f6e[_0x53863b(0x39d)]+0x2+0x10,_0x300ee2=Buffer[_0x53863b(0x547)](_0x244444);let _0x24d415=0x0;_0x300ee2[_0x53863b(0x1aa)](0x1,_0x24d415++),_0x300ee2[_0x53863b(0x1aa)](licenseType,_0x24d415++),_0x300ee2[_0x53863b(0x78)](Math[_0x53863b(0x5e9)](_0x4aff63/0x3e8),_0x24d415),_0x24d415+=0x4,_0x300ee2[_0x53863b(0x78)](Math['floor'](_0x350843/0x3e8),_0x24d415),_0x24d415+=0x4,_0x300ee2[_0x53863b(0x1aa)](_0x319f6e[_0x53863b(0x39d)],_0x24d415++),_0x319f6e[_0x53863b(0x593)](_0x300ee2,_0x24d415),_0x24d415+=_0x319f6e[_0x53863b(0x39d)];let _0x2e3645=0x0;for(let _0x492bf3=0x0;_0x492bf3<_0x590562[_0x53863b(0x39d)];_0x492bf3++){if(features[_0x590562[_0x492bf3]])_0x2e3645|=0x1<<_0x492bf3;}_0x300ee2[_0x53863b(0x3da)](_0x2e3645,_0x24d415),_0x24d415+=0x2;const _0xa01b88=[_0x53863b(0x5cb),_0x53863b(0x490),_0x53863b(0x6fa),'maxWrites'];for(const _0x421cc2 of _0xa01b88){_0x300ee2['writeUInt32BE'](limits[_0x421cc2]||0x0,_0x24d415),_0x24d415+=0x4;}return _0x300ee2;}function _0x1c754d(_0x1173ef){const _0x14ae21=_0x27036c;let _0x5b69ca=0x0;const _0x30d778=_0x1173ef[_0x14ae21(0x3dc)](_0x5b69ca++),_0x1f188b=_0x1173ef[_0x14ae21(0x3dc)](_0x5b69ca++),_0x7b480e=_0x1173ef[_0x14ae21(0x473)](_0x5b69ca);_0x5b69ca+=0x4;const _0x3ddbfd=_0x1173ef['readUInt32BE'](_0x5b69ca);_0x5b69ca+=0x4;const _0x1dd704=_0x1173ef[_0x14ae21(0x3dc)](_0x5b69ca++),_0x5c39bd=_0x1173ef[_0x14ae21(0x13a)](_0x5b69ca,_0x5b69ca+_0x1dd704)[_0x14ae21(0x240)](_0x14ae21(0x320));_0x5b69ca+=_0x1dd704;const _0x577806=_0x1173ef[_0x14ae21(0x765)](_0x5b69ca);_0x5b69ca+=0x2;const _0x4536a8={};for(let _0x5d7349=0x0;_0x5d7349<_0x590562['length'];_0x5d7349++){_0x4536a8[_0x590562[_0x5d7349]]=Boolean(_0x577806&0x1<<_0x5d7349);}const _0x54dc55=[_0x14ae21(0x5cb),_0x14ae21(0x490),_0x14ae21(0x6fa),_0x14ae21(0x425)],_0x2175b5={};for(const _0xa1c40b of _0x54dc55){const _0x1252cb=_0x1173ef[_0x14ae21(0x473)](_0x5b69ca);_0x5b69ca+=0x4,_0x2175b5[_0xa1c40b]=_0x1252cb===0x0?null:_0x1252cb;}return{'v':_0x30d778,'licenseType':_0x1f188b,'issuedAt':_0x7b480e*0x3e8,'expiresAt':_0x3ddbfd*0x3e8,'licensee':_0x5c39bd,'features':_0x4536a8,'limits':_0x2175b5};}function _0x5f360a(_0x4528e7,_0x4f3980){const _0x224e43=_0x27036c,_0x3d68b0=Buffer[_0x224e43(0x123)]([_0x4528e7,_0x4f3980]),_0xba8ea9=_0x2d3bff(_0x3d68b0),_0x1bc2b8=[];for(let _0x452dd8=0x0;_0x452dd8<_0xba8ea9['length'];_0x452dd8+=0x8){_0x1bc2b8[_0x224e43(0x2f9)](_0xba8ea9['slice'](_0x452dd8,_0x452dd8+0x8));}return _0x1bc2b8['join']('-');}function _0x4b57c5(_0x581767){const _0x28a4e3=_0x27036c;if(typeof _0x581767!==_0x28a4e3(0xe7))throw new Error(_0x28a4e3(0x43d));const _0x19dc63=_0x893c60(_0x581767[_0x28a4e3(0x416)](/-/g,''));if(_0x19dc63[_0x28a4e3(0x39d)]<0x41)throw new Error(_0x28a4e3(0x4c1)+_0x19dc63[_0x28a4e3(0x39d)]+_0x28a4e3(0x358));const _0x14e7cc=_0x19dc63[_0x28a4e3(0x13a)](0x0,_0x19dc63[_0x28a4e3(0x39d)]-0x40),_0x512577=_0x19dc63[_0x28a4e3(0x13a)](_0x19dc63[_0x28a4e3(0x39d)]-0x40);let _0x55846d;try{_0x55846d=_0x1c754d(_0x14e7cc);}catch(_0x4dcb43){throw new Error(_0x28a4e3(0x2e9)+_0x4dcb43['message']);}return{'rawBuf':_0x19dc63,'payload':_0x14e7cc,'sig':_0x512577,'decoded':_0x55846d};}function _0x35b83e(_0x42f6f1){const _0x5c64c8=_0x27036c;return _0x10bdc8[_0x5c64c8(0x3cc)](_0x5c64c8(0x647))[_0x5c64c8(0x29f)](_0x42f6f1)[_0x5c64c8(0x674)]()[_0x5c64c8(0x13a)](0x0,0x8);}function _0x26200f(_0x24a220,_0x135730,_0x1c7008){const _0x19206e=_0x27036c,_0x5601e5=_0x19206e(0x219)+_0x1c7008,_0x37dc7c=Buffer[_0x19206e(0x123)]([Buffer[_0x19206e(0x690)](_0x24a220,_0x19206e(0x320)),_0x135730]),_0x1ab931=_0x10bdc8[_0x19206e(0x6d5)](_0x19206e(0x647),_0x5601e5)[_0x19206e(0x29f)](_0x37dc7c)[_0x19206e(0x674)](),_0x3448fd=_0x2d3bff(_0x1ab931[_0x19206e(0x13a)](0x0,0x5));return{'pin':_0x3448fd,'pinHmac':_0x1ab931};}function _0x41bb1e(_0x1a1bba,_0x3f53e5,_0xc6419a){const _0x31e5c4=_0x27036c,_0x29bc1a=Buffer[_0x31e5c4(0x547)](0x4d);let _0x1e5b04=0x0;_0x29bc1a['writeUInt8'](0x1,_0x1e5b04++),_0x1a1bba[_0x31e5c4(0x593)](_0x29bc1a,_0x1e5b04),_0x1e5b04+=0x8,_0x29bc1a[_0x31e5c4(0x78)](_0x3f53e5,_0x1e5b04),_0x1e5b04+=0x4,_0xc6419a[_0x31e5c4(0x593)](_0x29bc1a,_0x1e5b04);const _0x1f5994=_0x2d3bff(_0x29bc1a),_0x3ed0ea=[];for(let _0x23282f=0x0;_0x23282f<_0x1f5994['length'];_0x23282f+=0x6){_0x3ed0ea[_0x31e5c4(0x2f9)](_0x1f5994[_0x31e5c4(0x13a)](_0x23282f,_0x23282f+0x6));}return _0x3ed0ea['join']('-');}function _0x22afe4(_0x1f3115){const _0x527aa0=_0x27036c;if(typeof _0x1f3115!==_0x527aa0(0xe7))throw new Error('decodeActivationToken:\x20input\x20must\x20be\x20a\x20string');const _0x13501c=_0x893c60(_0x1f3115[_0x527aa0(0x416)](/-/g,''));if(_0x13501c[_0x527aa0(0x39d)]!==0x4d)throw new Error(_0x527aa0(0x6ba)+_0x13501c['length']);let _0xf966d8=0x0;const _0x1e8373=_0x13501c[_0x527aa0(0x3dc)](_0xf966d8++),_0x52138b=_0x13501c[_0x527aa0(0x13a)](_0xf966d8,_0xf966d8+0x8);_0xf966d8+=0x8;const _0x305062=_0x13501c['readUInt32BE'](_0xf966d8);_0xf966d8+=0x4;const _0x32e993=_0x13501c['slice'](_0xf966d8);return{'v':_0x1e8373,'licenseHash':_0x52138b,'expiry':_0x305062,'sig':_0x32e993};}const _0x115c36=0x100,_0x18a794=new Set(),_0x6e9e68=new Map();function _0x2326e1(_0x1390e9,_0x5e718e,_0x5424d8){const _0x44d660=_0x27036c;if(typeof _0x5424d8!==_0x44d660(0xe7)||!Buffer[_0x44d660(0x365)](_0x1390e9)||!Buffer['isBuffer'](_0x5e718e))return _0x10bdc8[_0x44d660(0x6de)](null,_0x1390e9,_0x5424d8,_0x5e718e);const _0x4306f7=_0x5424d8+'\x0a'+_0x1390e9['toString']('base64')+'\x0a'+_0x5e718e[_0x44d660(0x240)](_0x44d660(0x154));if(_0x18a794[_0x44d660(0x469)](_0x4306f7))return!![];let _0x233e11=_0x6e9e68[_0x44d660(0x6a)](_0x5424d8);if(!_0x233e11){_0x233e11=_0x10bdc8[_0x44d660(0x9c)](_0x5424d8);if(_0x6e9e68[_0x44d660(0x35f)]>=0x10)_0x6e9e68[_0x44d660(0x209)]();_0x6e9e68[_0x44d660(0x49d)](_0x5424d8,_0x233e11);}const _0x3d2938=_0x10bdc8[_0x44d660(0x6de)](null,_0x1390e9,_0x233e11,_0x5e718e)===!![];if(_0x3d2938){if(_0x18a794[_0x44d660(0x35f)]>=_0x115c36)_0x18a794[_0x44d660(0x209)]();_0x18a794[_0x44d660(0x3e9)](_0x4306f7);}return _0x3d2938;}function _0x5e7167({tokenString:_0x11200a,nodeId:_0xf4f9e0,rawBlobBuf:_0x32ec12,pubKeyPem:_0x2a7d6c,pubFingerprint:_0x557025}){const _0x544e2a=_0x27036c;let _0x551e2f;try{_0x551e2f=_0x22afe4(_0x11200a);}catch(_0x3fd9bd){return{'valid':![],'reason':_0x544e2a(0x621)};}const _0x3ebbe9=_0x35b83e(_0x32ec12);if(!_0x3ebbe9['equals'](_0x551e2f['licenseHash']))return{'valid':![],'reason':_0x544e2a(0x4cc)};const {pinHmac:_0x2f32e9}=_0x26200f(_0xf4f9e0,_0x3ebbe9,_0x557025),_0x4e25fe=Buffer['allocUnsafe'](0x4);_0x4e25fe[_0x544e2a(0x78)](_0x551e2f[_0x544e2a(0x144)],0x0);const _0x294579=Buffer[_0x544e2a(0x123)]([Buffer[_0x544e2a(0x690)]([_0x551e2f['v']]),_0x2f32e9['slice'](0x0,0x5),_0x551e2f[_0x544e2a(0x58c)],_0x4e25fe]);try{const _0x39e279=_0x2326e1(_0x294579,_0x551e2f['sig'],_0x2a7d6c);if(!_0x39e279)return{'valid':![],'reason':_0x544e2a(0x77a)};}catch(_0x1a4da5){return{'valid':![],'reason':_0x544e2a(0x77a)};}if(_0x551e2f[_0x544e2a(0x144)]<Date[_0x544e2a(0x127)]()/0x3e8)return{'valid':![],'reason':_0x544e2a(0x305)};return{'valid':!![],'reason':'ok'};}function _0x174578(_0x10fbb9){const _0x561912=_0x27036c;if(typeof _0x10fbb9!==_0x561912(0xe7))return _0x561912(0x14a);const _0x4076ff=_0x10fbb9['trim']();if(_0x4076ff[_0x561912(0x42e)]('/')||_0x4076ff[_0x561912(0x42e)]('./')||_0x4076ff[_0x561912(0x42e)](_0x561912(0x24c))||/^[A-Za-z]:[\\/]/[_0x561912(0x155)](_0x4076ff))return'path';if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x561912(0x155)](_0x4076ff))return'uuid';const _0x2eceae=_0x4076ff[_0x561912(0x416)](/[\s-]+/g,'')['length'];if(_0x2eceae===0x7c)return _0x561912(0x552);if(_0x2eceae>=0x95&&_0x2eceae<=0xfc)return _0x561912(0x712);return _0x561912(0x14a);}return okdbLicenseCodec={'toBase32':_0x2d3bff,'fromBase32':_0x893c60,'encodeLicensePayload':_0x2e8617,'decodeLicensePayload':_0x1c754d,'encodeLicenseBlob':_0x5f360a,'decodeLicenseBlob':_0x4b57c5,'licenseHash':_0x35b83e,'derivePin':_0x26200f,'encodeActivationToken':_0x41bb1e,'decodeActivationToken':_0x22afe4,'verifyActivation':_0x5e7167,'verifySignature':_0x2326e1,'detectInputType':_0x174578,'FEATURE_NAMES':_0x590562,'LICENSE_TYPE_STANDARD':_0x5def1b,'LICENSE_TYPE_OPEN':_0x1f469d,'LICENSE_TYPE_INTERNAL':_0xdb160d,'OPEN_LICENSE_MAX_DURATION_MS':_0x243b05},okdbLicenseCodec;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x604437=_0x3d20e4;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0xf8bffa={'PUT':_0x604437(0x463),'REMOVE':_0x604437(0x34e),'INDEX_DROP':'dropIndex','INDEX_REGISTER':_0x604437(0x13e),'INDEX_RESET':_0x604437(0x3c4),'TYPE_REGISTER':_0x604437(0xbc),'TYPE_DROP':_0x604437(0x729),'FTS_REGISTER':_0x604437(0x4d4),'FTS_DROP':_0x604437(0x743),'FTS_RESET':_0x604437(0x11b),'SCHEMA_SET':_0x604437(0x2e1),'SCHEMA_DROP':_0x604437(0x730),'TTL_SET':_0x604437(0x3e0),'TTL_CLEAR':_0x604437(0x624)},_0x2caf0e={'SYSTEM_READY':_0x604437(0x77),'FIELD_RESOLVER_REGISTERED':_0x604437(0x3d1),'SYSTEM_STOPPED':_0x604437(0xf3),'SYSTEM_CLOCK_CHANGE':_0x604437(0x15c),'SYSTEM_POKE':'system:poke','SYSTEM_DRAIN':'system:drain','SYSTEM_TYPE_DROP':_0x604437(0x190),'SYSTEM_PROC':_0x604437(0x6a6),'SYSTEM_BUS_STATE_CHANGE':_0x604437(0x584),'ITEM_CREATE':_0x604437(0x6d6),'ITEM_UPDATE':_0x604437(0x34d),'ITEM_REMOVE':_0x604437(0x5fd),'ITEM_PENDING':_0x604437(0xf8),'INDEX_RESET':'index:reset','INDEX_READY':'index:ready','INDEX_PROGRESS':_0x604437(0x4ed),'VIEW_PROGRESS':_0x604437(0x4ca),'INDEX_DROP':_0x604437(0x460),'INDEX_REGISTERED':'index:registered','FTS_REGISTERED':_0x604437(0x3cd),'FTS_DROP':_0x604437(0x534),'FTS_RESET':_0x604437(0x65b),'SCHEMA_SET':'schema:set','SCHEMA_DROP':_0x604437(0x3c3),'UNIQUE_VIOLATION':_0x604437(0x3e4),'UNIQUE_VIOLATION_RESOLVED':_0x604437(0x5c0),'REF_VIOLATION':_0x604437(0x2b4),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':'sync:apply','TXN_START':_0x604437(0x740),'TXN_END':'txn:end','TXN_ROLLBACK':'txn:rollback','TYPE_REGISTERED':_0x604437(0x72b),'TYPE_DROP':'type:drop','ENV_OPENED':_0x604437(0x6fc),'ENV_REMOVED':'env:removed','SYSTEM_ENV_RELEASE':_0x604437(0x160),'TTL_EXPIRED':_0x604437(0x33c),'TTL_SET':_0x604437(0x1d4),'TTL_CLEAR':_0x604437(0x68b),'LICENSE_INVALID':'license:invalid','LICENSE_ADDED':_0x604437(0x136),'LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':_0x604437(0x515)},_0x4d0f1a={'CREATING':_0x604437(0x344),'RESETTING':'resetting','READY':'ready','DROPPING':_0x604437(0x771),'WAITING':'waiting','ERROR':_0x604437(0x492)},_0x1d601c={'CREATED':'created','STARTING':_0x604437(0x62f),'STARTED':'started','STOPPING':_0x604437(0x147),'STOPPED':_0x604437(0x780)},_0x7d8d0={'CREATING':'creating','READY':_0x604437(0x4c9),'HALTED':_0x604437(0x328),'STOPPED':_0x604437(0x780),'RESETTING':'resetting'},_0x1d945e=Object[_0x604437(0xc0)]({'POKE':_0x604437(0x755),'DRAIN':'bus:drain','TYPE_DROP':_0x604437(0x69d),'PROC':_0x604437(0x143),'ENV_RELEASE':_0x604437(0x70a)});return okdbEnums={'BUS_EVENTS':_0x1d945e,'CHANGE_ACTIONS':_0xf8bffa,'EVENTS':_0x2caf0e,'INDEX_STATE':_0x4d0f1a,'OKDB_STATE':_0x1d601c,'VIEW_STATE':_0x7d8d0},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x3000b9=_0x3d20e4;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x38c4df=require$$0$1,_0x5c5fb6=require$$1,_0x850354=require$$2$1,_0x28c948=_0x38c4df[_0x3000b9(0x418)](_0x5c5fb6[_0x3000b9(0x10b)](__dirname,_0x3000b9(0x610)),_0x3000b9(0x320))['trim'](),_0x197a3f=_0x850354[_0x3000b9(0x9c)](_0x28c948)[_0x3000b9(0x23a)]({'type':'spki','format':_0x3000b9(0x2a3)}),_0x5098ce=_0x850354['createHash'](_0x3000b9(0x647))[_0x3000b9(0x29f)](_0x197a3f)[_0x3000b9(0x674)](_0x3000b9(0x31b))[_0x3000b9(0x13a)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x28c948,'PUB_FINGERPRINT':_0x5098ce},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x278556=_0x3d20e4;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x20cad5=require$$2$1,{OKDBError:_0x3457e2}=requireOkdbError(),{EVENTS:_0x21e9c5}=requireOkdbEnums(),_0x540d63=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x31bdd8,LICENSE_TYPE_INTERNAL:_0x42c9d1,OPEN_LICENSE_MAX_DURATION_MS:_0x42139e}=_0x540d63,_0x1c10f2=requireOkdbPubkey(),_0x5e7623={'LICENSED_BUILD':_0x278556(0x727),'PUBLIC_KEY_PEM':_0x1c10f2[_0x278556(0x5e4)],'PUB_FINGERPRINT':_0x1c10f2[_0x278556(0x4e0)],'LICENSE_EXPIRED_ACTION':_0x278556(0x24e)},_0x41ce94=_0x278556(0x506),_0x351771={'features':{'sync':![],'embeddings':!![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x5,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240,'pipelinesPerEnv':0x2},'_isFree':!![]};async function _0x244e5e(_0x1a0065){await _0x1a0065['ensureType'](_0x41ce94);}class _0x3affac{constructor(_0x3ce46a){const _0x444373=_0x278556;this[_0x444373(0x229)]=_0x3ce46a,this[_0x444373(0x65c)]=null;}async['reload'](){const _0x35f11f=_0x278556,_0x1b849f=this['okdb'][_0x35f11f(0x5bc)];if(!_0x1b849f||!_0x1b849f[_0x35f11f(0x753)](_0x41ce94)){this[_0x35f11f(0x65c)]=null;return;}const _0xf4bcaa=this['okdb']['id'];let _0x35d54f=null;for(const {key:_0x11bde1,value:_0x54c6ce}of _0x1b849f[_0x35f11f(0x1c1)](_0x41ce94)){const _0x155c97=this[_0x35f11f(0x6a0)](_0x54c6ce,_0xf4bcaa);_0x155c97==='active'&&!_0x35d54f&&(_0x35d54f={..._0x54c6ce,'id':_0x11bde1,'status':_0x155c97});}this[_0x35f11f(0x65c)]=_0x35d54f;if(this['_active']&&this['_active']['licenseType']===_0x31bdd8){const _0x3dd70e=Math[_0x35f11f(0x6c3)]((this[_0x35f11f(0x65c)][_0x35f11f(0x57a)]-Date['now']())/0x5265c00);this['okdb'][_0x35f11f(0x24e)]?.[_0x35f11f(0x6a7)](_0x35f11f(0x70e)+_0x3dd70e+_0x35f11f(0x54f),{'feature':_0x35f11f(0x39b),'licensee':this[_0x35f11f(0x65c)][_0x35f11f(0x22b)],'expiresAt':new Date(this[_0x35f11f(0x65c)][_0x35f11f(0x57a)])[_0x35f11f(0x261)]()});}this[_0x35f11f(0x65c)]&&this['_active']['licenseType']===_0x42c9d1&&this['okdb'][_0x35f11f(0x24e)]?.['warn'](_0x35f11f(0x36d),{'feature':_0x35f11f(0x39b),'licensee':this['_active'][_0x35f11f(0x22b)]});}[_0x278556(0x6a0)](_0x22a63f,_0x86321e){const _0x505ecb=_0x278556;if(!_0x22a63f[_0x505ecb(0x712)])return'invalid';let _0x741f50;try{_0x741f50=_0x540d63['decodeLicenseBlob'](_0x22a63f['blob']);}catch(_0x507598){return _0x505ecb(0x50f);}try{const _0x188fcc=_0x540d63[_0x505ecb(0x628)](_0x741f50['payload'],_0x741f50[_0x505ecb(0x467)],_0x5e7623[_0x505ecb(0x5e4)]);if(!_0x188fcc)return _0x505ecb(0x50f);}catch(_0x2530f1){return _0x505ecb(0x50f);}if(_0x741f50[_0x505ecb(0x6eb)][_0x505ecb(0x60a)]===_0x42c9d1)return _0x505ecb(0x1b3);if(_0x741f50['decoded']['expiresAt']<=Date[_0x505ecb(0x127)]())return'expired';if(_0x741f50['decoded'][_0x505ecb(0x60a)]===_0x31bdd8)return _0x505ecb(0x1b3);if(!_0x22a63f['activation'])return'pending';const _0x261e4e=_0x540d63[_0x505ecb(0xb2)]({'tokenString':_0x22a63f[_0x505ecb(0x552)],'nodeId':_0x86321e,'rawBlobBuf':_0x741f50[_0x505ecb(0x4a7)],'pubKeyPem':_0x5e7623['PUBLIC_KEY_PEM'],'pubFingerprint':_0x5e7623['PUB_FINGERPRINT']});if(_0x261e4e['reason']==='LICENSE_HASH_MISMATCH'||_0x261e4e[_0x505ecb(0x37c)]===_0x505ecb(0x77a))return _0x505ecb(0x1c8);if(_0x261e4e[_0x505ecb(0x37c)]===_0x505ecb(0x305))return'expired';if(!_0x261e4e[_0x505ecb(0x3b2)])return _0x505ecb(0x1c8);return _0x505ecb(0x1b3);}get[_0x278556(0x1b3)](){const _0xde7b82=_0x278556;return this[_0xde7b82(0x65c)];}get[_0x278556(0x12d)](){const _0x1102e2=_0x278556;return this[_0x1102e2(0x65c)]??_0x351771;}[_0x278556(0x48f)](_0x48e141){const _0x125c71=_0x278556;if(_0x5e7623['LICENSED_BUILD']!=='true')return;const _0x4b5271=this[_0x125c71(0x12d)];if(!_0x4b5271['features']?.[_0x48e141]){const _0xf1b353=_0x4b5271['_isFree']?_0x125c71(0x773)+_0x48e141+_0x125c71(0x2c4)+_0x48e141+'\x22\x20to\x20enable\x20it.':_0x125c71(0xd5)+_0x48e141+'.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22'+_0x48e141+'\x22.';throw new _0x3457e2(_0xf1b353,_0x125c71(0x535),{'feature':_0x48e141});}}[_0x278556(0x5c4)](_0xdd38fd){const _0x41274f=_0x278556;if(_0x5e7623[_0x41274f(0x3c5)]!=='true')return!![];return!!this[_0x41274f(0x12d)]['features']?.[_0xdd38fd];}[_0x278556(0x398)](_0x15d6fb){const _0x1349dd=_0x278556;if(_0x5e7623[_0x1349dd(0x3c5)]!=='true')return![];const _0x49a519=this[_0x1349dd(0x12d)][_0x1349dd(0x260)]?.[_0x15d6fb];return!(_0x49a519===null||_0x49a519===undefined||_0x49a519===0x0);}[_0x278556(0x331)](_0xdfad9f,_0x589145){const _0x1648da=_0x278556;if(_0x5e7623[_0x1648da(0x3c5)]!==_0x1648da(0x727))return;const _0x519e3d=this[_0x1648da(0x12d)],_0x9f9dcd=_0x519e3d[_0x1648da(0x260)]?.[_0xdfad9f];if(_0x9f9dcd===null||_0x9f9dcd===undefined||_0x9f9dcd===0x0)return;if(_0x589145>=_0x9f9dcd)throw new _0x3457e2(_0x1648da(0x49e)+_0xdfad9f+'\x20('+_0x589145+'/'+_0x9f9dcd+')',_0x1648da(0xe4),{'limit':_0xdfad9f,'current':_0x589145,'max':_0x9f9dcd});}async[_0x278556(0x267)](_0x3fed34){const _0x316cfd=_0x278556;let _0x384bcb;try{_0x384bcb=_0x540d63[_0x316cfd(0x5a7)](_0x3fed34);}catch(_0x40daa3){throw new _0x3457e2(_0x316cfd(0x6ae)+_0x40daa3['message'],_0x316cfd(0x602));}let _0x4276a0;try{_0x4276a0=_0x540d63[_0x316cfd(0x628)](_0x384bcb['payload'],_0x384bcb[_0x316cfd(0x467)],_0x5e7623['PUBLIC_KEY_PEM']);}catch(_0x450ebe){throw new _0x3457e2(_0x316cfd(0x16e)+_0x450ebe[_0x316cfd(0x5e6)],_0x316cfd(0x602));}if(!_0x4276a0)throw new _0x3457e2(_0x316cfd(0x495)+('Build\x20expects\x20public\x20key\x20fingerprint\x20'+_0x5e7623['PUB_FINGERPRINT']+'.\x20')+_0x316cfd(0x236),_0x316cfd(0x602),{'expectedFingerprint':_0x5e7623['PUB_FINGERPRINT']});if(_0x384bcb[_0x316cfd(0x6eb)][_0x316cfd(0x60a)]===_0x31bdd8){const _0x2a56e1=_0x384bcb[_0x316cfd(0x6eb)][_0x316cfd(0x57a)]-_0x384bcb[_0x316cfd(0x6eb)][_0x316cfd(0x312)];if(_0x2a56e1>_0x42139e)throw new _0x3457e2(_0x316cfd(0x352)+Math[_0x316cfd(0x6c3)](_0x2a56e1/(0x1e*0x5265c00))+_0x316cfd(0x2ff),_0x316cfd(0x602));}const _0x5b7a05=this[_0x316cfd(0x229)]['_systemEnv'];await _0x244e5e(_0x5b7a05);const _0x237b09=_0x540d63[_0x316cfd(0x58c)](_0x384bcb['rawBuf'])[_0x316cfd(0x240)](_0x316cfd(0x31b));for(const {key:_0x4fa353,value:_0x551baa}of _0x5b7a05[_0x316cfd(0x1c1)](_0x41ce94)){if(_0x551baa[_0x316cfd(0x2f8)]===_0x237b09)throw new _0x3457e2(_0x316cfd(0x516),_0x316cfd(0x10e),{'id':_0x4fa353});}const _0x3337fe=_0x20cad5[_0x316cfd(0x3cc)](_0x316cfd(0x647))[_0x316cfd(0x29f)](_0x316cfd(0x4ba))['update'](_0x384bcb[_0x316cfd(0x4a7)])[_0x316cfd(0x674)](_0x316cfd(0x31b)),_0x3fcbf9=_0x3337fe['slice'](0x0,0x8)+'-'+_0x3337fe['slice'](0x8,0xc)+'-5'+_0x3337fe['slice'](0xd,0x10)+'-'+(parseInt(_0x3337fe[0x10],0x10)&0x3|0x8)['toString'](0x10)+_0x3337fe['slice'](0x11,0x14)+'-'+_0x3337fe['slice'](0x14,0x20),_0x2af606={'blob':_0x3fed34,'activation':null,'addedAt':Date[_0x316cfd(0x127)](),'_licenseHash':_0x237b09,'licensee':_0x384bcb['decoded'][_0x316cfd(0x22b)],'expiresAt':_0x384bcb[_0x316cfd(0x6eb)][_0x316cfd(0x57a)],'features':_0x384bcb['decoded'][_0x316cfd(0x5de)],'limits':_0x384bcb['decoded'][_0x316cfd(0x260)],'licenseType':_0x384bcb[_0x316cfd(0x6eb)][_0x316cfd(0x60a)]};return await _0x5b7a05['put'](_0x41ce94,_0x3fcbf9,_0x2af606),{'id':_0x3fcbf9,..._0x2af606};}async[_0x278556(0x76c)](_0x20a121){const _0xd2bf89=_0x278556;let _0x37597d;try{_0x37597d=_0x540d63[_0xd2bf89(0x29d)](_0x20a121);}catch(_0x2c60d5){throw new _0x3457e2('Invalid\x20activation\x20token:\x20'+_0x2c60d5[_0xd2bf89(0x5e6)],_0xd2bf89(0x19b));}const _0x413559=_0x37597d[_0xd2bf89(0x58c)][_0xd2bf89(0x240)]('hex'),_0x4ddbf9=this[_0xd2bf89(0x229)][_0xd2bf89(0x5bc)];if(!_0x4ddbf9||!_0x4ddbf9[_0xd2bf89(0x753)](_0x41ce94))throw new _0x3457e2(_0xd2bf89(0x5b4),_0xd2bf89(0x19b));let _0x4100a2=null,_0x308c4e=null;for(const {key:_0x76980b,value:_0x4f9766}of _0x4ddbf9[_0xd2bf89(0x1c1)](_0x41ce94)){if(_0x4f9766['_licenseHash']===_0x413559){_0x4100a2=_0x76980b,_0x308c4e=_0x4f9766;break;}}if(!_0x4100a2)throw new _0x3457e2(_0xd2bf89(0x5b4),_0xd2bf89(0x19b));const {rawBuf:_0x34c5b7}=_0x540d63[_0xd2bf89(0x5a7)](_0x308c4e[_0xd2bf89(0x712)]),_0x2cff40=_0x540d63[_0xd2bf89(0xb2)]({'tokenString':_0x20a121,'nodeId':this[_0xd2bf89(0x229)]['id'],'rawBlobBuf':_0x34c5b7,'pubKeyPem':_0x5e7623[_0xd2bf89(0x5e4)],'pubFingerprint':_0x5e7623[_0xd2bf89(0x4e0)]});if(!_0x2cff40[_0xd2bf89(0x3b2)])throw new _0x3457e2(_0xd2bf89(0x44a)+_0x2cff40['reason'],_0xd2bf89(0x19b),{'reason':_0x2cff40['reason']});const _0x5b1721={..._0x308c4e,'activation':_0x20a121};return await _0x4ddbf9[_0xd2bf89(0x29f)](_0x41ce94,_0x4100a2,_0x5b1721),{'id':_0x4100a2,..._0x5b1721};}async[_0x278556(0x1d3)](_0x9d81c1){const _0x28e381=_0x278556,_0xedfbcc=this['okdb'][_0x28e381(0x5bc)];if(!_0xedfbcc||!_0xedfbcc[_0x28e381(0x753)](_0x41ce94))return;await _0xedfbcc[_0x28e381(0x34e)](_0x41ce94,_0x9d81c1);}async[_0x278556(0x441)](){const _0x5ee283=_0x278556,_0x4e1c85=this[_0x5ee283(0x229)][_0x5ee283(0x5bc)];if(!_0x4e1c85||!_0x4e1c85[_0x5ee283(0x753)](_0x41ce94))return[];const _0x508b07=this[_0x5ee283(0x229)]['id'],_0x3336cb=[];for(const {key:_0x2d0ed1,value:_0x1999fb}of _0x4e1c85[_0x5ee283(0x1c1)](_0x41ce94)){const _0x3817ef=this[_0x5ee283(0x6a0)](_0x1999fb,_0x508b07);_0x3336cb[_0x5ee283(0x2f9)]({..._0x1999fb,'id':_0x2d0ed1,'status':_0x3817ef});}return _0x3336cb;}[_0x278556(0x6fd)](){const _0x24551e=_0x278556,_0x4ad516=this[_0x24551e(0x229)][_0x24551e(0x5bc)];if(!_0x4ad516||!_0x4ad516[_0x24551e(0x753)](_0x41ce94))return[];const _0x2d0c75=this[_0x24551e(0x229)]['id'],_0x9979e3=[];for(const {key:_0x40cf84,value:_0x4fe90a}of _0x4ad516[_0x24551e(0x1c1)](_0x41ce94)){if(_0x4fe90a[_0x24551e(0x2f8)]){if(_0x4fe90a['licenseType']===_0x31bdd8)_0x9979e3[_0x24551e(0x2f9)]({'licenseId':_0x40cf84,'pin':null});else{const _0x12f8df=Buffer[_0x24551e(0x690)](_0x4fe90a[_0x24551e(0x2f8)],_0x24551e(0x31b)),{pin:_0x420599}=_0x540d63[_0x24551e(0x51b)](_0x2d0c75,_0x12f8df,_0x5e7623[_0x24551e(0x4e0)]);_0x9979e3['push']({'licenseId':_0x40cf84,'pin':_0x420599});}}}return _0x9979e3;}async['recheck'](){const _0x36c7b9=_0x278556,_0x3de1a4=this[_0x36c7b9(0x65c)];await this['reload']();if(this[_0x36c7b9(0x65c)]&&this[_0x36c7b9(0x65c)]['licenseType']===_0x31bdd8){const _0x33a1ee=Math[_0x36c7b9(0x6c3)]((this['_active'][_0x36c7b9(0x57a)]-Date[_0x36c7b9(0x127)]())/0x5265c00);this[_0x36c7b9(0x229)][_0x36c7b9(0x24e)]?.[_0x36c7b9(0x6a7)](_0x36c7b9(0x70e)+_0x33a1ee+'\x20day(s).',{'feature':_0x36c7b9(0x39b),'licensee':this['_active'][_0x36c7b9(0x22b)],'expiresAt':new Date(this[_0x36c7b9(0x65c)][_0x36c7b9(0x57a)])[_0x36c7b9(0x261)]()});}this[_0x36c7b9(0x65c)]&&this[_0x36c7b9(0x65c)][_0x36c7b9(0x60a)]===_0x42c9d1&&this[_0x36c7b9(0x229)][_0x36c7b9(0x24e)]?.[_0x36c7b9(0x6a7)](_0x36c7b9(0x36d),{'feature':_0x36c7b9(0x39b),'licensee':this[_0x36c7b9(0x65c)]['licensee']});if(_0x3de1a4&&!this['_active']){this[_0x36c7b9(0x229)][_0x36c7b9(0x24e)]?.[_0x36c7b9(0x6a7)](_0x36c7b9(0x402),{'feature':_0x36c7b9(0x39b)}),this['okdb'][_0x36c7b9(0x194)]?.['emit'](_0x21e9c5['LICENSE_INVALID'],{'previous':_0x3de1a4});const _0x458608=this[_0x36c7b9(0x229)][_0x36c7b9(0x518)]?.[_0x36c7b9(0x461)]??_0x5e7623[_0x36c7b9(0x15f)];_0x458608===_0x36c7b9(0x119)&&(this[_0x36c7b9(0x229)][_0x36c7b9(0x24e)]?.[_0x36c7b9(0x492)](_0x36c7b9(0x49b),{'feature':_0x36c7b9(0x39b)}),this[_0x36c7b9(0x229)][_0x36c7b9(0x44f)]()[_0x36c7b9(0x618)](()=>{})['finally'](()=>process[_0x36c7b9(0x4e7)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x3affac,'_C':_0x5e7623,'FREE_TIER':_0x351771},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x26a86f=_0x3d20e4;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x52889e=require$$0$3,_0x22358a=require$$0$1,_0x40451e=require$$0,_0x47bfbe=require$$1,_0x3d347d=_0x47bfbe[_0x26a86f(0x10b)](_0x40451e[_0x26a86f(0x74)](),_0x26a86f(0x40a)),_0x2f1774=0x3e8,_0x4bb7aa={'reset':_0x26a86f(0x2cc),'bold':_0x26a86f(0x5a9),'dim':'\x1b[2m','red':_0x26a86f(0x3c1),'green':_0x26a86f(0x6fb),'yellow':_0x26a86f(0x29e),'blue':_0x26a86f(0x355),'magenta':_0x26a86f(0x487),'cyan':_0x26a86f(0x1cb),'white':_0x26a86f(0x6ed),'gray':_0x26a86f(0x2a7)},_0x6c0532=!process[_0x26a86f(0x11c)]['isTTY']||!!process.env.NO_COLOR,_0x43d25e=(_0x24e8b1,_0x33d2d3)=>_0x6c0532?_0x33d2d3:''+_0x24e8b1+_0x33d2d3+_0x4bb7aa[_0x26a86f(0x478)],_0x568e10={'error':_0x4bb7aa[_0x26a86f(0x356)],'warn':_0x4bb7aa[_0x26a86f(0x1bd)],'info':_0x4bb7aa[_0x26a86f(0x3aa)],'debug':_0x4bb7aa[_0x26a86f(0x701)]},_0xa81c21={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x13c223(_0x106402,_0x12ec8f=_0x26a86f(0x2cf)){const _0x5a8df8=_0x26a86f,{level:_0x8d05a6,msg:_0xaee619,meta:_0x1ddc32,context:_0x5eaa88,ts:_0xd2edb2}=_0x106402;if((_0xa81c21[_0x8d05a6]??0x1)<(_0xa81c21[_0x12ec8f]??0x1))return;const _0x51393c=_0x43d25e(_0x4bb7aa[_0x5a8df8(0x701)],new Date(_0xd2edb2)[_0x5a8df8(0x261)]()),_0x16a571=_0x43d25e(_0x568e10[_0x8d05a6]??_0x4bb7aa[_0x5a8df8(0x206)],_0x8d05a6['padEnd'](0x5));let _0x35c020='\x20\x20'+_0x51393c+'\x20'+_0x43d25e(_0x4bb7aa[_0x5a8df8(0x3ef)],_0x16a571)+'\x20'+_0xaee619;if(_0x1ddc32&&Object[_0x5a8df8(0x6d8)](_0x1ddc32)[_0x5a8df8(0x39d)]>0x0){const _0x318da4=Object[_0x5a8df8(0x61d)](_0x1ddc32)[_0x5a8df8(0x757)](([_0x25ea72,_0x12507c])=>_0x25ea72+'='+_0x12507c)[_0x5a8df8(0x10b)]('\x20');_0x35c020+=_0x43d25e(_0x4bb7aa[_0x5a8df8(0x775)],_0x5a8df8(0x759)+_0x318da4+']');}if(_0x5eaa88!==undefined){const _0x2e70e5=typeof _0x5eaa88===_0x5a8df8(0x5d4)?JSON[_0x5a8df8(0x5c1)](_0x5eaa88):String(_0x5eaa88);_0x35c020+=_0x43d25e(_0x4bb7aa[_0x5a8df8(0x775)],'\x20\x20'+_0x2e70e5);}const _0x6a74a6=_0x8d05a6===_0x5a8df8(0x492)||_0x8d05a6==='warn'?process['stderr']['write'][_0x5a8df8(0x245)](process[_0x5a8df8(0x705)]):process[_0x5a8df8(0x11c)]['write'][_0x5a8df8(0x245)](process[_0x5a8df8(0x11c)]);_0x6a74a6(_0x35c020+'\x0a');}function _0x4cd5fd(_0x5bf4c6,_0x10c931){const _0x4021b9=_0x26a86f;if(_0x5bf4c6===0xcc||_0x5bf4c6>=0xc8&&_0x5bf4c6<0x12c&&!_0x10c931){console[_0x4021b9(0x24e)]('\x0a\x20\x20'+_0x43d25e(_0x4bb7aa[_0x4021b9(0x404)],'✓')+'\x0a');return;}if(_0x5bf4c6>=0x190||_0x10c931?.[_0x4021b9(0x492)]){const _0x3e8b67=_0x10c931?.[_0x4021b9(0x492)]??_0x10c931?.[_0x4021b9(0x5e6)]??_0x4021b9(0x1e1)+_0x5bf4c6;console[_0x4021b9(0x24e)](_0x4021b9(0x82)+_0x43d25e(_0x4bb7aa['red'],'✗')+'\x20'+_0x43d25e(_0x4bb7aa['bold']+_0x4bb7aa[_0x4021b9(0x356)],String(_0x5bf4c6))+'\x20\x20'+_0x3e8b67+'\x0a');return;}const _0x19999e=Object[_0x4021b9(0x568)][_0x4021b9(0x1fa)][_0x4021b9(0x3c6)](_0x10c931??{},_0x4021b9(0x5a1))?_0x10c931['result']:_0x10c931,_0x4abb2d=_0x10c931?.['meta'];console[_0x4021b9(0x24e)](''),_0x103608(_0x19999e,'\x20\x20');if(_0x4abb2d?.[_0x4021b9(0x6ad)]!=null||_0x4abb2d?.[_0x4021b9(0x4ac)]!=null){const _0x6aeba5=[];if(_0x4abb2d['count']!=null)_0x6aeba5[_0x4021b9(0x2f9)](_0x4abb2d[_0x4021b9(0x6ad)]+_0x4021b9(0x29a)+(_0x4abb2d[_0x4021b9(0x6ad)]!==0x1?'s':''));if(_0x4abb2d['time']!=null)_0x6aeba5['push'](_0x4abb2d['time']+'ms');console[_0x4021b9(0x24e)](_0x4021b9(0x82)+_0x43d25e(_0x4bb7aa[_0x4021b9(0x775)],_0x6aeba5[_0x4021b9(0x10b)](_0x4021b9(0x586))));}console[_0x4021b9(0x24e)]('');}function _0x103608(_0x1c612a,_0x29d03c=''){const _0x114162=_0x26a86f;if(_0x1c612a===null||_0x1c612a===undefined){console['log'](_0x29d03c+_0x43d25e(_0x4bb7aa[_0x114162(0x775)],_0x114162(0x427)));return;}if(Array[_0x114162(0x339)](_0x1c612a)){if(_0x1c612a[_0x114162(0x39d)]===0x0){console[_0x114162(0x24e)](_0x29d03c+_0x43d25e(_0x4bb7aa[_0x114162(0x775)],'(empty)'));return;}if(_0x1c612a[_0x114162(0x6be)](_0x14fbf3=>_0x14fbf3&&typeof _0x14fbf3===_0x114162(0x5d4)&&_0x114162(0x466)in _0x14fbf3&&_0x114162(0x101)in _0x14fbf3)){_0x16235f(_0x1c612a,_0x29d03c);return;}if(_0x1c612a[_0x114162(0x6be)](_0x507d0a=>_0x507d0a&&typeof _0x507d0a===_0x114162(0x5d4)&&_0x114162(0x66f)in _0x507d0a&&'count'in _0x507d0a)){_0x181782(_0x1c612a,_0x29d03c);return;}if(_0x1c612a[_0x114162(0x6be)](_0x5ce377=>typeof _0x5ce377!==_0x114162(0x5d4)||_0x5ce377===null)){_0x1c612a[_0x114162(0x2e2)]((_0x436d9a,_0xa64d11)=>console[_0x114162(0x24e)](_0x29d03c+_0x43d25e(_0x4bb7aa[_0x114162(0x701)],_0xa64d11+0x1+'.')+'\x20'+_0x43d25e(_0x4bb7aa[_0x114162(0x206)],String(_0x436d9a))));return;}_0x1c612a['forEach']((_0x2010f4,_0x246601)=>{const _0x228d8b=_0x114162;console['log'](_0x29d03c+_0x43d25e(_0x4bb7aa[_0x228d8b(0x775)],'['+_0x246601+']'));if(typeof _0x2010f4===_0x228d8b(0x5d4)&&_0x2010f4!==null)_0x550618(_0x2010f4,_0x29d03c+'\x20\x20');else console['log'](_0x29d03c+'\x20\x20'+String(_0x2010f4));});return;}if(typeof _0x1c612a===_0x114162(0x5d4)){if('key'in _0x1c612a&&_0x114162(0x101)in _0x1c612a&&Object[_0x114162(0x6d8)](_0x1c612a)[_0x114162(0x39d)]<=0x3){console['log'](_0x29d03c+_0x43d25e(_0x4bb7aa[_0x114162(0x3ef)]+_0x4bb7aa[_0x114162(0x3aa)],String(_0x1c612a[_0x114162(0x466)])));const _0x40aeeb=_0x1c612a[_0x114162(0x101)];if(_0x40aeeb&&typeof _0x40aeeb===_0x114162(0x5d4))_0x550618(_0x40aeeb,_0x29d03c);else console['log'](_0x29d03c+_0x43d25e(_0x4bb7aa['white'],String(_0x40aeeb)));return;}_0x550618(_0x1c612a,_0x29d03c);return;}console[_0x114162(0x24e)](_0x29d03c+_0x43d25e(_0x4bb7aa['white'],String(_0x1c612a)));}function _0x550618(_0x5c0463,_0x48fe78=''){const _0x554339=_0x26a86f,_0x320872=Object[_0x554339(0x61d)](_0x5c0463);if(_0x320872['length']===0x0){console[_0x554339(0x24e)](_0x48fe78+_0x43d25e(_0x4bb7aa[_0x554339(0x775)],'{}'));return;}const _0x115cfd=Math['min'](0x1c,Math[_0x554339(0x68c)](..._0x320872[_0x554339(0x757)](([_0xe69e4f])=>_0xe69e4f[_0x554339(0x39d)])));for(const [_0x528107,_0x2889cc]of _0x320872){const _0x117d81=_0x43d25e(_0x4bb7aa[_0x554339(0x3aa)],_0x528107['padEnd'](_0x115cfd));if(_0x2889cc===null||_0x2889cc===undefined)console[_0x554339(0x24e)](_0x48fe78+_0x117d81+'\x20\x20'+_0x43d25e(_0x4bb7aa[_0x554339(0x775)],_0x554339(0x359)));else{if(typeof _0x2889cc==='object'){const _0x2be1c2=JSON[_0x554339(0x5c1)](_0x2889cc);_0x2be1c2[_0x554339(0x39d)]<=0x50?console[_0x554339(0x24e)](_0x48fe78+_0x117d81+'\x20\x20'+_0x43d25e(_0x4bb7aa[_0x554339(0x775)],_0x2be1c2)):(console[_0x554339(0x24e)](_0x48fe78+_0x117d81),_0x103608(_0x2889cc,_0x48fe78+'\x20\x20'));}else{const _0x304a8f=typeof _0x2889cc==='boolean'?_0x43d25e(_0x2889cc?_0x4bb7aa[_0x554339(0x404)]:_0x4bb7aa[_0x554339(0x1bd)],String(_0x2889cc)):typeof _0x2889cc===_0x554339(0x6af)?_0x43d25e(_0x4bb7aa[_0x554339(0x1ba)],String(_0x2889cc)):_0x43d25e(_0x4bb7aa['white'],String(_0x2889cc));console['log'](_0x48fe78+_0x117d81+'\x20\x20'+_0x304a8f);}}}}function _0x16235f(_0x442cf5,_0x1c28e3=''){const _0x5d12d3=_0x26a86f,_0x2cd3ab=Math['min'](0x20,Math[_0x5d12d3(0x68c)](..._0x442cf5['map'](_0x45651d=>String(_0x45651d[_0x5d12d3(0x466)])[_0x5d12d3(0x39d)])));for(const {key:_0x15fa81,value:_0x5dedee,score:_0x411207,clock:_0x1fdba9}of _0x442cf5){const _0x2e1780=_0x43d25e(_0x4bb7aa[_0x5d12d3(0x3ef)]+_0x4bb7aa[_0x5d12d3(0x3aa)],String(_0x15fa81)[_0x5d12d3(0x485)](_0x2cd3ab)),_0x997229=_0x5dedee==null?_0x43d25e(_0x4bb7aa[_0x5d12d3(0x775)],_0x5d12d3(0x359)):typeof _0x5dedee===_0x5d12d3(0x5d4)?_0x43d25e(_0x4bb7aa['dim'],JSON[_0x5d12d3(0x5c1)](_0x5dedee)):_0x43d25e(_0x4bb7aa['white'],String(_0x5dedee)),_0x5f36d0=_0x411207!=null?_0x43d25e(_0x4bb7aa[_0x5d12d3(0x701)],'\x20\x20score:'+_0x411207[_0x5d12d3(0x72c)](0x4)):'',_0x38977f=_0x1fdba9!=null?_0x43d25e(_0x4bb7aa['gray'],'\x20\x20@'+_0x1fdba9):'';console[_0x5d12d3(0x24e)](_0x1c28e3+_0x2e1780+'\x20\x20'+_0x997229+_0x5f36d0+_0x38977f);}}function _0x181782(_0x1c66bc,_0x368e1a=''){const _0x532408=_0x26a86f,_0x2f44fd=Math[_0x532408(0x268)](0x20,Math[_0x532408(0x68c)](..._0x1c66bc[_0x532408(0x757)](_0x114f2c=>_0x114f2c[_0x532408(0x66f)]['length'])));for(const {type:_0x17f297,count:_0x309fb7,fields:_0x56cfb1}of _0x1c66bc){if(_0x17f297[_0x532408(0x42e)]('~'))continue;const _0x40b758=_0x43d25e(_0x4bb7aa[_0x532408(0x3ef)]+_0x4bb7aa[_0x532408(0x3aa)],_0x17f297['padEnd'](_0x2f44fd)),_0x4f8755=_0x43d25e(_0x4bb7aa[_0x532408(0x1ba)],String(_0x309fb7)[_0x532408(0x6b6)](0x6))+_0x43d25e(_0x4bb7aa[_0x532408(0x775)],_0x532408(0x749)),_0x1e28e2=_0x56cfb1&&Object['keys'](_0x56cfb1)[_0x532408(0x39d)]?_0x43d25e(_0x4bb7aa[_0x532408(0x775)],_0x532408(0x205)+Object['keys'](_0x56cfb1)[_0x532408(0x13a)](0x0,0x6)[_0x532408(0x10b)](',\x20')+(Object[_0x532408(0x6d8)](_0x56cfb1)['length']>0x6?'…':'')):'';console['log'](_0x368e1a+_0x40b758+'\x20\x20'+_0x4f8755+_0x1e28e2);}}const _0x4eb1c6=[_0x26a86f(0x429),_0x26a86f(0x2f4),'queue/',_0x26a86f(0x19e),_0x26a86f(0x4f9),_0x26a86f(0x2b8)];function _0x42538c(_0x157cb3,_0x35a59b){const _0x3cb546=_0x26a86f;if(_0x157cb3[_0x3cb546(0x42e)]('/api/'))return _0x157cb3;if(_0x157cb3['startsWith']('/'))return _0x3cb546(0x126)+_0x157cb3;if(_0x157cb3[_0x3cb546(0x42e)](_0x3cb546(0x7c)))return'/api/'+_0x157cb3;const _0x29a108=_0x4eb1c6['some'](_0x420a28=>_0x157cb3===_0x420a28[_0x3cb546(0x416)](/\/$/,'')||_0x157cb3[_0x3cb546(0x42e)](_0x420a28));return _0x29a108?'/api/env/'+_0x35a59b+'/'+_0x157cb3:_0x3cb546(0x6b3)+_0x157cb3;}function _0x3e2f5d(_0x309e52){const _0x38fb78=_0x26a86f,_0xdc34d8={},_0x3967a5=[];let _0x33ac95=0x0;while(_0x33ac95<_0x309e52[_0x38fb78(0x39d)]){if((_0x309e52[_0x33ac95]===_0x38fb78(0x488)||_0x309e52[_0x33ac95]==='-e')&&_0x309e52[_0x33ac95+0x1]&&!_0x309e52[_0x33ac95+0x1]['startsWith']('-'))_0xdc34d8[_0x38fb78(0x124)]=_0x309e52[++_0x33ac95];else _0x309e52[_0x33ac95]==='--help'||_0x309e52[_0x33ac95]==='-h'?_0xdc34d8['help']=!![]:_0x3967a5[_0x38fb78(0x2f9)](_0x309e52[_0x33ac95]);_0x33ac95++;}return{'flags':_0xdc34d8,'rest':_0x3967a5};}const _0x1c2a7c={'system':_0x26a86f(0x68f),'envs':'Environments','types':_0x26a86f(0x56f),'data':_0x26a86f(0xd9),'indexes':_0x26a86f(0x399),'fts':'Full-text\x20search','sync':'Sync','queue':_0x26a86f(0x12c),'files':_0x26a86f(0x6a8),'embeddings':'Embeddings','engines':_0x26a86f(0x582),'admin':_0x26a86f(0x770),'event':_0x26a86f(0x2a5),'processor':_0x26a86f(0x697)},_0xd6c566=[_0x26a86f(0x619),_0x26a86f(0x5cb),_0x26a86f(0x429),_0x26a86f(0x32e),_0x26a86f(0x21f),_0x26a86f(0x2c1),'sync','queue',_0x26a86f(0x4e4),'embeddings',_0x26a86f(0x39c),_0x26a86f(0x270)];function _0x3cd9e5(_0x4924a4){const _0x7cf014=_0x26a86f;return _0x4924a4[_0x7cf014(0x416)](/^\/api/,'')['replace'](/^\[\/env\/:env=[^\]]*\]/,_0x7cf014(0x614))[_0x7cf014(0x416)](/^\/env\/:env/,_0x7cf014(0x3db))['replace'](/^\//,'');}function _0x4fad5c(_0x5c3963,_0x25ae69=''){const _0x581451=_0x26a86f,_0x112a58=_0x5c3963[_0x581451(0x91)][_0x581451(0x562)]()['filter'](_0x3f5530=>!_0x3f5530[_0x581451(0xc9)]?.[_0x581451(0x4f4)]),_0x5c1962=_0x25ae69?_0x112a58[_0x581451(0x293)](_0x5e1f8f=>_0x5e1f8f[_0x581451(0x4c5)][_0x581451(0x8d)]()[_0x581451(0x8f)](_0x25ae69[_0x581451(0x8d)]())||(_0x9eddb5(_0x5e1f8f)??'')[_0x581451(0x8d)]()['includes'](_0x25ae69[_0x581451(0x8d)]())||_0x2c3099(_0x5e1f8f)[_0x581451(0x35c)](_0x327ab8=>_0x327ab8[_0x581451(0x8d)]()[_0x581451(0x8f)](_0x25ae69[_0x581451(0x8d)]()))):_0x112a58;if(!_0x5c1962[_0x581451(0x39d)]){console['log'](_0x43d25e(_0x4bb7aa['yellow'],_0x581451(0x381)+_0x25ae69+'\x22\x0a'));return;}const _0x56b367=new Map();for(const _0x45370e of _0x5c1962){const _0x38743c=_0x2c3099(_0x45370e)[0x0]??_0x581451(0x3b0);if(!_0x56b367[_0x581451(0x469)](_0x38743c))_0x56b367[_0x581451(0x49d)](_0x38743c,[]);_0x56b367['get'](_0x38743c)[_0x581451(0x2f9)](_0x45370e);}const _0x29b80b=[..._0xd6c566[_0x581451(0x293)](_0x417e5c=>_0x56b367[_0x581451(0x469)](_0x417e5c)),...[..._0x56b367[_0x581451(0x6d8)]()][_0x581451(0x293)](_0x4cc975=>!_0xd6c566['includes'](_0x4cc975))];console[_0x581451(0x24e)]('');for(const _0x198b91 of _0x29b80b){const _0x1f09d5=_0x56b367[_0x581451(0x6a)](_0x198b91);if(!_0x1f09d5?.[_0x581451(0x39d)])continue;console['log'](_0x43d25e(_0x4bb7aa['bold'],'\x20\x20'+(_0x1c2a7c[_0x198b91]??_0x198b91)));for(const _0x373940 of _0x1f09d5){const _0xa8ea74=_0x43d25e(_0x4bb7aa[_0x581451(0x1ba)],_0x373940[_0x581451(0xdf)][_0x581451(0x485)](0x7)),_0xc73376=_0x43d25e(_0x4bb7aa[_0x581451(0x3aa)],_0x3cd9e5(_0x373940[_0x581451(0x4c5)])),_0x444ffb=_0x9eddb5(_0x373940)?_0x43d25e(_0x4bb7aa[_0x581451(0x775)],'\x20\x20'+_0x9eddb5(_0x373940)):'',_0x579de7=_0x373940[_0x581451(0x396)]?.['id']?_0x43d25e(_0x4bb7aa[_0x581451(0x701)],_0x581451(0x759)+_0x373940[_0x581451(0x396)]['id']+']'):'';console[_0x581451(0x24e)]('\x20\x20\x20\x20'+_0xa8ea74+'\x20'+_0xc73376+_0x444ffb+_0x579de7);}console['log']('');}}function _0x56c906(_0x40f2f9,_0xf282f4){const _0x910539=_0x26a86f,_0x4d766d=_0xf282f4[_0x910539(0x416)](/^\/api(\/env\/[^/]+)?\//,'')[_0x910539(0x2aa)]('/')[0x0],_0x1b5ac2=_0x40f2f9['http'][_0x910539(0x562)]()[_0x910539(0x293)](_0x48aec2=>_0x48aec2[_0x910539(0x4c5)][_0x910539(0x8d)]()[_0x910539(0x8f)](_0x4d766d[_0x910539(0x8d)]()));if(!_0x1b5ac2[_0x910539(0x39d)]){console[_0x910539(0x24e)](_0x43d25e(_0x4bb7aa[_0x910539(0x1bd)],_0x910539(0x675)+_0xf282f4+'\x0a'));return;}console['log']('');for(const _0x2450b3 of _0x1b5ac2[_0x910539(0x13a)](0x0,0xc)){for(const _0x5a4cb2 of _0x20d4ae(_0x2450b3)){console[_0x910539(0x24e)](_0x5a4cb2);}console[_0x910539(0x24e)]('');}}function _0x9eddb5(_0xbffe57){const _0x22cda0=_0x26a86f;return _0xbffe57['operation']?.[_0x22cda0(0x4d1)]??_0xbffe57['meta']?.[_0x22cda0(0x4d1)]??'';}function _0x1a5fcc(_0xf7db69){const _0x4a5496=_0x26a86f;return _0xf7db69[_0x4a5496(0x396)]?.['description']??_0xf7db69['meta']?.[_0x4a5496(0x13c)]??'';}function _0x2c3099(_0x40ed8e){const _0x420615=_0x26a86f;return _0x40ed8e[_0x420615(0x396)]?.[_0x420615(0x5bd)]?.[_0x420615(0x39d)]?_0x40ed8e['operation'][_0x420615(0x5bd)]:_0x40ed8e[_0x420615(0xc9)]?.['tags']??[];}function _0x20d4ae(_0x183c02){const _0x37a42e=_0x26a86f,_0x4cbfcd=[];_0x4cbfcd[_0x37a42e(0x2f9)]('\x20\x20'+_0x43d25e(_0x4bb7aa[_0x37a42e(0x3ef)]+_0x4bb7aa[_0x37a42e(0x1ba)],_0x183c02[_0x37a42e(0xdf)][_0x37a42e(0x485)](0x7))+'\x20'+_0x43d25e(_0x4bb7aa[_0x37a42e(0x3ef)]+_0x4bb7aa[_0x37a42e(0x3aa)],_0x183c02['path']));_0x183c02[_0x37a42e(0x396)]?.['id']&&_0x4cbfcd[_0x37a42e(0x2f9)](_0x37a42e(0x90)+_0x43d25e(_0x4bb7aa[_0x37a42e(0x701)],_0x37a42e(0x607)+_0x183c02[_0x37a42e(0x396)]['id']));_0x9eddb5(_0x183c02)&&_0x4cbfcd[_0x37a42e(0x2f9)](_0x37a42e(0x90)+_0x43d25e(_0x4bb7aa[_0x37a42e(0x206)],_0x9eddb5(_0x183c02)));_0x1a5fcc(_0x183c02)&&_0x4cbfcd[_0x37a42e(0x2f9)](_0x37a42e(0x90)+_0x43d25e(_0x4bb7aa[_0x37a42e(0x775)],_0x1a5fcc(_0x183c02)));_0x2c3099(_0x183c02)[_0x37a42e(0x39d)]&&_0x4cbfcd[_0x37a42e(0x2f9)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x43d25e(_0x4bb7aa['gray'],'tags:\x20'+_0x2c3099(_0x183c02)[_0x37a42e(0x10b)](',\x20')));_0x183c02['operation']?.['safety']?.[_0x37a42e(0x2af)]&&_0x4cbfcd[_0x37a42e(0x2f9)](_0x37a42e(0x90)+_0x43d25e(_0x4bb7aa[_0x37a42e(0x701)],'access:\x20'+_0x183c02[_0x37a42e(0x396)][_0x37a42e(0x1d1)][_0x37a42e(0x2af)]));_0x183c02[_0x37a42e(0x396)]?.[_0x37a42e(0x91)]?.[_0x37a42e(0x601)]&&_0x183c02[_0x37a42e(0x396)][_0x37a42e(0x91)][_0x37a42e(0x601)]!==_0x37a42e(0x63e)&&_0x4cbfcd[_0x37a42e(0x2f9)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x43d25e(_0x4bb7aa[_0x37a42e(0x701)],_0x37a42e(0x530)+_0x183c02[_0x37a42e(0x396)][_0x37a42e(0x91)][_0x37a42e(0x601)]));if(_0x183c02['operation']?.[_0x37a42e(0x2f6)]){const _0x5442a2=Object[_0x37a42e(0x6d8)](_0x183c02[_0x37a42e(0x396)][_0x37a42e(0x2f6)][_0x37a42e(0x9d)]||{});if(_0x5442a2[_0x37a42e(0x39d)])_0x4cbfcd[_0x37a42e(0x2f9)](_0x37a42e(0x90)+_0x43d25e(_0x4bb7aa[_0x37a42e(0x701)],'input:\x20'+_0x5442a2[_0x37a42e(0x10b)](',\x20')));}return _0x183c02[_0x37a42e(0xc9)]?.['body']&&_0x4cbfcd[_0x37a42e(0x2f9)](_0x37a42e(0x90)+_0x43d25e(_0x4bb7aa[_0x37a42e(0x701)],'body:\x20'+JSON[_0x37a42e(0x5c1)](_0x183c02['meta'][_0x37a42e(0x4fc)]))),_0x4cbfcd;}async function _0x32005a(_0x2cef0f,_0x52e256,_0x576906,_0x157818=null){const _0x3a7a4b=_0x26a86f,_0x1d6e8d=_0x576906[_0x3a7a4b(0x380)]('?'),_0x1a3629=_0x1d6e8d>=0x0?_0x576906[_0x3a7a4b(0x13a)](0x0,_0x1d6e8d):_0x576906,_0x2599bc=_0x1d6e8d>=0x0?_0x576906[_0x3a7a4b(0x13a)](_0x1d6e8d+0x1):'',_0x1608b8=Object[_0x3a7a4b(0x66e)](new URLSearchParams(_0x2599bc)[_0x3a7a4b(0x61d)]());return _0x2cef0f['http']['handle'](_0x52e256,_0x1a3629,{'body':_0x157818,'query':_0x1608b8,'headers':{'content-type':_0x3a7a4b(0x754)}},{'internal':!![]});}function _0x158ef8(_0x1fb89f){const _0x360cc5=_0x26a86f;if(!_0x1fb89f)return null;const _0x89c3b6=_0x1fb89f[_0x360cc5(0x471)]();if(!_0x89c3b6)return null;try{return JSON[_0x360cc5(0xc3)](_0x89c3b6);}catch{}try{return JSON[_0x360cc5(0xc3)](_0x52a5a1(_0x89c3b6));}catch(_0x33123a){throw new SyntaxError(_0x33123a[_0x360cc5(0x5e6)],{'cause':_0x33123a});}}function _0x52a5a1(_0xe896ee){const _0x162db7=_0x26a86f;let _0x232c96='',_0x3135a0=0x0;while(_0x3135a0<_0xe896ee[_0x162db7(0x39d)]){const _0x3e9a8c=_0xe896ee[_0x3135a0];if(_0x3e9a8c==='\x22'){_0x232c96+='\x22',_0x3135a0++;while(_0x3135a0<_0xe896ee['length']&&_0xe896ee[_0x3135a0]!=='\x22'){if(_0xe896ee[_0x3135a0]==='\x5c'){_0x232c96+=_0xe896ee[_0x3135a0++];if(_0x3135a0<_0xe896ee['length'])_0x232c96+=_0xe896ee[_0x3135a0++];}else _0x232c96+=_0xe896ee[_0x3135a0++];}_0x232c96+='\x22';if(_0x3135a0<_0xe896ee[_0x162db7(0x39d)])_0x3135a0++;continue;}if(_0x3e9a8c==='\x27'){_0x232c96+='\x22',_0x3135a0++;while(_0x3135a0<_0xe896ee[_0x162db7(0x39d)]&&_0xe896ee[_0x3135a0]!=='\x27'){if(_0xe896ee[_0x3135a0]==='\x5c'&&_0xe896ee[_0x3135a0+0x1]==='\x27')_0x232c96+='\x27',_0x3135a0+=0x2;else _0xe896ee[_0x3135a0]==='\x22'?(_0x232c96+='\x5c\x22',_0x3135a0++):_0x232c96+=_0xe896ee[_0x3135a0++];}_0x232c96+='\x22';if(_0x3135a0<_0xe896ee[_0x162db7(0x39d)])_0x3135a0++;continue;}if('{}[]:,\x0a\x0d\x09\x20'[_0x162db7(0x8f)](_0x3e9a8c)){_0x232c96+=_0x3e9a8c,_0x3135a0++;continue;}let _0x1f0005='';while(_0x3135a0<_0xe896ee[_0x162db7(0x39d)]&&!'{}[]:,\x27\x22'['includes'](_0xe896ee[_0x3135a0])&&_0xe896ee[_0x3135a0]!=='\x20'&&_0xe896ee[_0x3135a0]!=='\x09'&&_0xe896ee[_0x3135a0]!=='\x0a'&&_0xe896ee[_0x3135a0]!=='\x0d'){_0x1f0005+=_0xe896ee[_0x3135a0++];}let _0x2ba7af=_0x3135a0;while(_0x2ba7af<_0xe896ee[_0x162db7(0x39d)]&&(_0xe896ee[_0x2ba7af]==='\x20'||_0xe896ee[_0x2ba7af]==='\x09'))_0x2ba7af++;if(_0xe896ee[_0x2ba7af]===':')_0x232c96+='\x22'+_0x1f0005+'\x22';else _0x1f0005===_0x162db7(0x727)||_0x1f0005===_0x162db7(0x779)||_0x1f0005==='null'||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x162db7(0x155)](_0x1f0005)?_0x232c96+=_0x1f0005:_0x232c96+='\x22'+_0x1f0005+'\x22';}return _0x232c96[_0x162db7(0x416)](/,(\s*[}\]])/g,'$1');}function _0x8fe228(_0x234d3e){const _0x205fcd=_0x26a86f,_0x481c30=[];let _0x2d1d77=0x0;while(_0x2d1d77<_0x234d3e['length']){while(_0x2d1d77<_0x234d3e[_0x205fcd(0x39d)]&&(_0x234d3e[_0x2d1d77]==='\x20'||_0x234d3e[_0x2d1d77]==='\x09'))_0x2d1d77++;if(_0x2d1d77>=_0x234d3e[_0x205fcd(0x39d)])break;const _0x2e862b=_0x234d3e[_0x2d1d77];if(_0x2e862b==='{'||_0x2e862b==='['){const _0x7988bf=_0x2e862b==='{'?'}':']',_0x589745=_0x2d1d77++;let _0x32bec4=0x1,_0x4c81b3=![],_0x1f356b='';while(_0x2d1d77<_0x234d3e[_0x205fcd(0x39d)]&&_0x32bec4>0x0){const _0x17036f=_0x234d3e[_0x2d1d77];if(_0x4c81b3){if(_0x17036f==='\x5c')_0x2d1d77++;else{if(_0x17036f===_0x1f356b)_0x4c81b3=![];}}else{if(_0x17036f==='\x22'||_0x17036f==='\x27')_0x4c81b3=!![],_0x1f356b=_0x17036f;else{if(_0x17036f===_0x2e862b)_0x32bec4++;else{if(_0x17036f===_0x7988bf)_0x32bec4--;}}}_0x2d1d77++;}_0x481c30[_0x205fcd(0x2f9)](_0x234d3e[_0x205fcd(0x13a)](_0x589745,_0x2d1d77));continue;}if(_0x2e862b==='\x22'||_0x2e862b==='\x27'){const _0x271549=_0x2e862b;_0x2d1d77++;let _0x5e9ad5='';while(_0x2d1d77<_0x234d3e['length']&&_0x234d3e[_0x2d1d77]!==_0x271549){if(_0x234d3e[_0x2d1d77]==='\x5c'&&_0x2d1d77+0x1<_0x234d3e[_0x205fcd(0x39d)])_0x2d1d77++,_0x5e9ad5+=_0x234d3e[_0x2d1d77++];else _0x5e9ad5+=_0x234d3e[_0x2d1d77++];}if(_0x2d1d77<_0x234d3e[_0x205fcd(0x39d)])_0x2d1d77++;_0x481c30[_0x205fcd(0x2f9)](_0x5e9ad5);continue;}let _0x3d96e4='';while(_0x2d1d77<_0x234d3e[_0x205fcd(0x39d)]&&_0x234d3e[_0x2d1d77]!=='\x20'&&_0x234d3e[_0x2d1d77]!=='\x09'&&_0x234d3e[_0x2d1d77]!=='{'&&_0x234d3e[_0x2d1d77]!=='['){_0x3d96e4+=_0x234d3e[_0x2d1d77++];}if(_0x3d96e4)_0x481c30[_0x205fcd(0x2f9)](_0x3d96e4);}return _0x481c30;}function _0x1c3ad0(_0x7df442,_0x4d1d48){const _0x1e1de1=_0x26a86f,_0x3f588d=[..._0x7df442[_0x1e1de1(0x64c)]['keys']()][_0x1e1de1(0x293)](_0x4e451f=>!_0x4e451f[_0x1e1de1(0x42e)]('~'));console['log'](['',_0x43d25e(_0x4bb7aa[_0x1e1de1(0x3ef)]+_0x4bb7aa[_0x1e1de1(0x3aa)],'\x20\x20╔═══════════════════════════╗'),_0x43d25e(_0x4bb7aa[_0x1e1de1(0x3ef)]+_0x4bb7aa[_0x1e1de1(0x3aa)],_0x1e1de1(0x26c))+_0x43d25e(_0x4bb7aa[_0x1e1de1(0x3ef)],_0x1e1de1(0x93))+_0x43d25e(_0x4bb7aa[_0x1e1de1(0x3ef)]+_0x4bb7aa[_0x1e1de1(0x3aa)],'║'),_0x43d25e(_0x4bb7aa[_0x1e1de1(0x3ef)]+_0x4bb7aa[_0x1e1de1(0x3aa)],'\x20\x20╚═══════════════════════════╝'),'','\x20\x20'+_0x43d25e(_0x4bb7aa[_0x1e1de1(0x404)],'✓')+'\x20'+_0x43d25e(_0x4bb7aa[_0x1e1de1(0x3ef)],_0x1e1de1(0x33d))+_0x1e1de1(0x59b)+_0x4d1d48[_0x1e1de1(0x255)],..._0x4d1d48[_0x1e1de1(0x616)]>0x1?['\x20\x20'+_0x43d25e(_0x4bb7aa[_0x1e1de1(0x404)],'✓')+'\x20'+_0x43d25e(_0x4bb7aa[_0x1e1de1(0x3ef)],_0x1e1de1(0x2bd))+'\x20'+_0x4d1d48['clusterWorkers']+_0x1e1de1(0x335)+_0x43d25e(_0x4bb7aa['gray'],_0x1e1de1(0xef))]:[],'\x20\x20'+_0x43d25e(_0x4bb7aa[_0x1e1de1(0x404)],'✓')+'\x20'+_0x43d25e(_0x4bb7aa[_0x1e1de1(0x3ef)],'api')+_0x1e1de1(0x5ea)+_0x4d1d48[_0x1e1de1(0x255)]+_0x1e1de1(0x126),'\x20\x20'+_0x43d25e(_0x4bb7aa['green'],'✓')+'\x20'+_0x43d25e(_0x4bb7aa[_0x1e1de1(0x3ef)],_0x1e1de1(0x4c5))+_0x1e1de1(0x75b)+_0x4d1d48[_0x1e1de1(0x361)],'\x20\x20'+_0x43d25e(_0x4bb7aa[_0x1e1de1(0x404)],'✓')+'\x20'+_0x43d25e(_0x4bb7aa[_0x1e1de1(0x3ef)],'id')+_0x1e1de1(0x15b)+_0x43d25e(_0x4bb7aa['gray'],_0x7df442['id']),'\x20\x20'+_0x43d25e(_0x4bb7aa[_0x1e1de1(0x404)],'✓')+'\x20'+_0x43d25e(_0x4bb7aa[_0x1e1de1(0x3ef)],'envs')+_0x1e1de1(0x75b)+_0x3f588d[_0x1e1de1(0x757)](_0xe199eb=>_0x43d25e(_0x4bb7aa[_0x1e1de1(0x3aa)],_0xe199eb))[_0x1e1de1(0x10b)]('\x20\x20'),..._0x4d1d48[_0x1e1de1(0x116)]?[]:['\x20\x20'+_0x43d25e(_0x4bb7aa[_0x1e1de1(0x404)],'✓')+'\x20'+_0x43d25e(_0x4bb7aa['bold'],'admin')+_0x1e1de1(0x40d)+_0x4d1d48[_0x1e1de1(0x255)]+_0x1e1de1(0xc8)],'',_0x43d25e(_0x4bb7aa[_0x1e1de1(0x775)],'\x20\x20Type\x20'+_0x43d25e(_0x4bb7aa[_0x1e1de1(0x3ef)],_0x1e1de1(0x353))+_0x1e1de1(0x246)+_0x43d25e(_0x4bb7aa['bold'],_0x1e1de1(0x249))+_0x1e1de1(0xfc)+_0x43d25e(_0x4bb7aa[_0x1e1de1(0x3ef)],_0x1e1de1(0x4e7))+_0x1e1de1(0x2f2)),''][_0x1e1de1(0x10b)]('\x0a'));}function _0x101f46(_0x5588e5){const _0x46495e=_0x26a86f;console[_0x46495e(0x24e)]('\x0a'+_0x43d25e(_0x4bb7aa[_0x46495e(0x3ef)],'\x20\x20Path\x20access')+'\x20\x20'+_0x43d25e(_0x4bb7aa[_0x46495e(0x775)],'—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected')+_0x46495e(0x4d8)+_0x43d25e(_0x4bb7aa[_0x46495e(0x3aa)],_0x46495e(0x108))+_0x46495e(0x750)+_0x43d25e(_0x4bb7aa[_0x46495e(0x3aa)],'<path>')+'\x20'+_0x43d25e(_0x4bb7aa['yellow'],'<json-body>')+_0x46495e(0x665)+_0x43d25e(_0x4bb7aa['cyan'],_0x46495e(0x654))+'\x20'+_0x43d25e(_0x4bb7aa['cyan'],_0x46495e(0x108))+'\x20'+_0x43d25e(_0x4bb7aa['yellow'],_0x46495e(0x28e))+_0x46495e(0x3b9)+_0x43d25e(_0x4bb7aa[_0x46495e(0x775)],_0x46495e(0x50e))+_0x46495e(0x2fd)+_0x43d25e(_0x4bb7aa['gray'],_0x46495e(0x2cf))+_0x46495e(0x440)+_0x43d25e(_0x4bb7aa['gray'],_0x46495e(0x5cb))+_0x46495e(0x68d)+_0x43d25e(_0x4bb7aa[_0x46495e(0x701)],_0x46495e(0x429))+_0x46495e(0x3f0)+_0x5588e5[_0x46495e(0x124)]+_0x46495e(0x503)+_0x43d25e(_0x4bb7aa[_0x46495e(0x701)],_0x46495e(0x413))+'\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/'+_0x5588e5['env']+_0x46495e(0x66d)+_0x43d25e(_0x4bb7aa[_0x46495e(0x701)],_0x46495e(0x325))+_0x46495e(0x531)+_0x5588e5[_0x46495e(0x124)]+_0x46495e(0x130)+_0x43d25e(_0x4bb7aa[_0x46495e(0x701)],_0x46495e(0x247))+'\x20→\x20POST\x20/api/env/'+_0x5588e5[_0x46495e(0x124)]+_0x46495e(0x73c)+_0x43d25e(_0x4bb7aa[_0x46495e(0x701)],'PUT\x20type/users/item/x\x20{\x22n\x22:1}')+_0x46495e(0x2fd)+_0x43d25e(_0x4bb7aa[_0x46495e(0x701)],_0x46495e(0x284))+_0x46495e(0x2fd)+_0x43d25e(_0x4bb7aa[_0x46495e(0x701)],'env/staging/info')+_0x46495e(0x76b)+_0x43d25e(_0x4bb7aa[_0x46495e(0x3ef)],'\x20\x20Flags')+'\x20\x20'+_0x43d25e(_0x4bb7aa[_0x46495e(0x775)],'(on\x20any\x20path\x20command)')+_0x46495e(0x4d8)+_0x43d25e(_0x4bb7aa[_0x46495e(0x3aa)],'--env\x20<name>')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20'+_0x43d25e(_0x4bb7aa[_0x46495e(0x3aa)],_0x46495e(0x14b))+_0x46495e(0x1c3)+_0x43d25e(_0x4bb7aa[_0x46495e(0x775)],_0x46495e(0x50e))+_0x46495e(0x2fd)+_0x43d25e(_0x4bb7aa[_0x46495e(0x701)],_0x46495e(0x5ca))+_0x46495e(0x2fd)+_0x43d25e(_0x4bb7aa[_0x46495e(0x701)],_0x46495e(0x5f8))+_0x46495e(0x2fd)+_0x43d25e(_0x4bb7aa[_0x46495e(0x701)],_0x46495e(0x392))+'\x0a\x0a'+_0x43d25e(_0x4bb7aa[_0x46495e(0x3ef)],_0x46495e(0x522))+'\x0a\x0a\x20\x20'+_0x43d25e(_0x4bb7aa[_0x46495e(0x3aa)],_0x46495e(0x1b6))+_0x46495e(0x3d9)+_0x43d25e(_0x4bb7aa[_0x46495e(0x3aa)],'env')+_0x46495e(0x231)+_0x43d25e(_0x4bb7aa['cyan'],_0x46495e(0x249))+'\x20'+_0x43d25e(_0x4bb7aa[_0x46495e(0x775)],_0x46495e(0x1d6))+_0x46495e(0x66c)+_0x43d25e(_0x4bb7aa[_0x46495e(0x3aa)],'logs')+'\x20'+_0x43d25e(_0x4bb7aa[_0x46495e(0x775)],_0x46495e(0x348))+_0x46495e(0x77e)+_0x43d25e(_0x4bb7aa[_0x46495e(0x3aa)],_0x46495e(0x1fd))+_0x46495e(0x5ae)+_0x43d25e(_0x4bb7aa[_0x46495e(0x3aa)],'help')+_0x46495e(0x599)+_0x43d25e(_0x4bb7aa[_0x46495e(0x3aa)],_0x46495e(0x4e7))+'\x20'+_0x43d25e(_0x4bb7aa[_0x46495e(0x775)],_0x46495e(0x48c))+_0x46495e(0x453));}let _0x204f39=![];async function _0x3950bd(_0x272dda,_0xe2cc4d=0x0,_0x36116a=null){const _0x1913b9=_0x26a86f;_0x204f39&&(process['stderr'][_0x1913b9(0xb6)](_0x43d25e(_0x4bb7aa['red'],_0x1913b9(0x2fa))),process[_0x1913b9(0x4e7)](0x82));_0x204f39=!![],process[_0x1913b9(0x11c)][_0x1913b9(0xb6)]('\x0a'),process['stderr'][_0x1913b9(0xb6)](_0x43d25e(_0x4bb7aa[_0x1913b9(0x1bd)],'\x20\x20[okdb]\x20'+(_0x36116a?_0x1913b9(0x4ce)+_0x36116a+',\x20':'')+'shutting\x20down…\x0a'));const _0x5f5a36=setTimeout(()=>{const _0x4e79ec=_0x1913b9;process[_0x4e79ec(0x705)][_0x4e79ec(0xb6)](_0x43d25e(_0x4bb7aa['red'],_0x4e79ec(0x526))),process['exit'](0x1);},0x1388);try{await _0x272dda[_0x1913b9(0x44f)]();}catch(_0x34cb41){console[_0x1913b9(0x492)](_0x43d25e(_0x4bb7aa['red'],'\x20\x20'+_0x34cb41[_0x1913b9(0x5e6)]));}clearTimeout(_0x5f5a36),process[_0x1913b9(0x705)][_0x1913b9(0xb6)](_0x43d25e(_0x4bb7aa[_0x1913b9(0x775)],'\x20\x20[okdb]\x20closed\x20cleanly\x0a')),process['exit'](_0xe2cc4d);}function _0x53c343(_0x15690f){const _0x3dcdea=_0x26a86f,_0x4a5d7e=_0x15690f[_0x3dcdea(0x124)]!==_0x3dcdea(0x3e8)?_0x43d25e(_0x4bb7aa[_0x3dcdea(0x1bd)],'['+_0x15690f[_0x3dcdea(0x124)]+']'):'';return _0x43d25e(_0x4bb7aa['bold']+_0x4bb7aa[_0x3dcdea(0x3aa)],'okdb')+_0x4a5d7e+_0x43d25e(_0x4bb7aa[_0x3dcdea(0x701)],'>\x20');}const _0x42e204=new Set([_0x26a86f(0x248),_0x26a86f(0x2ed),_0x26a86f(0x6ff),_0x26a86f(0x689),_0x26a86f(0x3ed)]);async function _0x295ed4(_0x209328,_0x142524,_0x578afa,_0x2589a6,_0x6a8e88,_0x4a7979){const _0x3a1d3b=_0x26a86f;_0x209328=_0x209328['trim']();if(!_0x209328||_0x209328[_0x3a1d3b(0x42e)]('#'))return;const _0xd10ef=_0x8fe228(_0x209328),{flags:_0x1c9c46,rest:_0x43001d}=_0x3e2f5d(_0xd10ef);if(!_0x43001d[_0x3a1d3b(0x39d)])return;const _0x2eec3e=_0x43001d[0x0],_0x5c7f5f=_0x2eec3e[_0x3a1d3b(0x419)]();if(_0x5c7f5f==='HELP'){if(_0x43001d[0x1])_0x56c906(_0x142524,_0x42538c(_0x43001d[0x1],_0x1c9c46[_0x3a1d3b(0x124)]??_0x6a8e88['env']));else _0x101f46(_0x6a8e88);return;}if(_0x5c7f5f===_0x3a1d3b(0x16d)){const _0x29255c=_0x43001d[0x1];if(!_0x29255c){console[_0x3a1d3b(0x24e)](_0x43d25e(_0x4bb7aa[_0x3a1d3b(0x356)],_0x3a1d3b(0x25f)));return;}try{_0x142524[_0x3a1d3b(0x124)](_0x29255c),_0x6a8e88['env']=_0x29255c,_0x4a7979?.[_0x3a1d3b(0x13b)](_0x53c343(_0x6a8e88)),console[_0x3a1d3b(0x24e)](_0x3a1d3b(0x82)+_0x43d25e(_0x4bb7aa['green'],'✓')+_0x3a1d3b(0x3e3)+_0x43d25e(_0x4bb7aa[_0x3a1d3b(0x3ef)]+_0x4bb7aa[_0x3a1d3b(0x3aa)],_0x29255c)+'\x0a');}catch{console[_0x3a1d3b(0x24e)](_0x3a1d3b(0x82)+_0x43d25e(_0x4bb7aa[_0x3a1d3b(0x356)],'✗')+_0x3a1d3b(0x5a4)+_0x43d25e(_0x4bb7aa[_0x3a1d3b(0x3ef)],_0x29255c)+_0x3a1d3b(0x1e9)+_0x43d25e(_0x4bb7aa[_0x3a1d3b(0x775)],_0x3a1d3b(0x292)));}return;}if(_0x5c7f5f===_0x3a1d3b(0x5b1)){const _0xbcb40b=[..._0x142524[_0x3a1d3b(0x64c)][_0x3a1d3b(0x6d8)]()]['filter'](_0x2af308=>!_0x2af308[_0x3a1d3b(0x42e)]('~'));console[_0x3a1d3b(0x24e)]('');for(const _0x292eba of _0xbcb40b){const _0x5bbb8b=_0x292eba===_0x6a8e88[_0x3a1d3b(0x124)];console['log']('\x20\x20'+(_0x5bbb8b?_0x43d25e(_0x4bb7aa[_0x3a1d3b(0x404)],'●'):_0x43d25e(_0x4bb7aa[_0x3a1d3b(0x775)],'○'))+'\x20\x20'+(_0x5bbb8b?_0x43d25e(_0x4bb7aa[_0x3a1d3b(0x3ef)]+_0x4bb7aa[_0x3a1d3b(0x3aa)],_0x292eba):_0x43d25e(_0x4bb7aa['dim'],_0x292eba)));}console[_0x3a1d3b(0x24e)]('\x0a\x20\x20'+_0x43d25e(_0x4bb7aa['dim'],_0x3a1d3b(0x46b))+'\x20'+_0x43d25e(_0x4bb7aa[_0x3a1d3b(0x3aa)],_0x6a8e88['env'])),console[_0x3a1d3b(0x24e)]('');return;}if(_0x5c7f5f===_0x3a1d3b(0x4b3)){const _0x120783=[..._0x142524[_0x3a1d3b(0x64c)][_0x3a1d3b(0x591)]()][_0x3a1d3b(0x293)](_0x22b5cf=>!_0x22b5cf[_0x3a1d3b(0x707)][_0x3a1d3b(0x42e)]('~'));console[_0x3a1d3b(0x24e)]('');const _0x5589c4=Math[_0x3a1d3b(0x68c)](..._0x120783[_0x3a1d3b(0x757)](_0x490e47=>_0x490e47[_0x3a1d3b(0x707)]['length']));for(const _0x59ec4b of _0x120783){const _0xdf617a=_0x59ec4b[_0x3a1d3b(0x707)]===_0x6a8e88[_0x3a1d3b(0x124)],_0x276209=_0xdf617a?_0x43d25e(_0x4bb7aa[_0x3a1d3b(0x404)],'●'):_0x43d25e(_0x4bb7aa[_0x3a1d3b(0x775)],'○'),_0x2a7603=_0xdf617a?_0x43d25e(_0x4bb7aa[_0x3a1d3b(0x3ef)]+_0x4bb7aa[_0x3a1d3b(0x3aa)],_0x59ec4b['name'][_0x3a1d3b(0x485)](_0x5589c4)):_0x43d25e(_0x4bb7aa[_0x3a1d3b(0x775)],_0x59ec4b[_0x3a1d3b(0x707)][_0x3a1d3b(0x485)](_0x5589c4)),_0x25e400=[..._0x59ec4b[_0x3a1d3b(0x105)][_0x3a1d3b(0x6d8)]()][_0x3a1d3b(0x293)](_0x273bf8=>!_0x273bf8[_0x3a1d3b(0x42e)]('~')),_0x5e0b49=_0x25e400[_0x3a1d3b(0x39d)]?_0x43d25e(_0x4bb7aa[_0x3a1d3b(0x775)],_0x25e400[_0x3a1d3b(0x13a)](0x0,0x5)[_0x3a1d3b(0x10b)](',\x20')+(_0x25e400['length']>0x5?'\x20\x20+'+(_0x25e400[_0x3a1d3b(0x39d)]-0x5)+'\x20more':'')):_0x43d25e(_0x4bb7aa[_0x3a1d3b(0x775)],'(no\x20types)');console[_0x3a1d3b(0x24e)]('\x20\x20'+_0x276209+'\x20\x20'+_0x2a7603+'\x20\x20'+_0x5e0b49);}console[_0x3a1d3b(0x24e)]('');return;}if(_0x5c7f5f===_0x3a1d3b(0x110)){const _0x5d7852=_0x1c9c46[_0x3a1d3b(0x124)]??_0x43001d[0x1]??_0x6a8e88['env'];try{const _0x248530=_0x142524[_0x3a1d3b(0x124)](_0x5d7852),_0x396d3d=[..._0x248530[_0x3a1d3b(0x105)][_0x3a1d3b(0x6d8)]()][_0x3a1d3b(0x293)](_0x3f3b45=>!_0x3f3b45[_0x3a1d3b(0x42e)]('~'))['sort']();console[_0x3a1d3b(0x24e)](_0x3a1d3b(0x82)+_0x43d25e(_0x4bb7aa[_0x3a1d3b(0x775)],_0x396d3d[_0x3a1d3b(0x39d)]+'\x20type'+(_0x396d3d[_0x3a1d3b(0x39d)]!==0x1?'s':'')+_0x3a1d3b(0x644)+_0x5d7852));for(const _0x4cd742 of _0x396d3d){const _0x1a279f=_0x248530['typeSubDbs']['get'](_0x4cd742),_0x9cd513=_0x1a279f?.[_0x3a1d3b(0x32e)]?.['getCount']?.()??0x0,_0x206a21=_0x43d25e(_0x4bb7aa[_0x3a1d3b(0x3ef)]+_0x4bb7aa[_0x3a1d3b(0x3aa)],_0x4cd742['padEnd'](0x1c));console[_0x3a1d3b(0x24e)](_0x3a1d3b(0x75b)+_0x206a21+'\x20\x20'+_0x43d25e(_0x4bb7aa[_0x3a1d3b(0x1ba)],String(_0x9cd513)[_0x3a1d3b(0x6b6)](0x6))+'\x20'+_0x43d25e(_0x4bb7aa[_0x3a1d3b(0x775)],_0x3a1d3b(0x3ee)));}console['log']('');}catch(_0x2413ad){console[_0x3a1d3b(0x492)](_0x43d25e(_0x4bb7aa[_0x3a1d3b(0x356)],'\x0a\x20\x20'+_0x2413ad[_0x3a1d3b(0x5e6)]+'\x0a'));}return;}if(_0x5c7f5f===_0x3a1d3b(0x6fe)){_0x4fad5c(_0x142524,_0x43001d[_0x3a1d3b(0x13a)](0x1)['join']('\x20'));return;}if(_0x5c7f5f==='LOGS'){const _0x521e04=(_0x43001d[0x1]??'')[_0x3a1d3b(0x8d)]();if(!_0x521e04||_0x521e04==='on')_0x2589a6[_0x3a1d3b(0x1f9)]=!![],_0x2589a6[_0x3a1d3b(0x67c)]=_0x3a1d3b(0x2cf),console[_0x3a1d3b(0x24e)](_0x3a1d3b(0x82)+_0x43d25e(_0x4bb7aa['green'],'✓')+_0x3a1d3b(0x4c2)+_0x43d25e(_0x4bb7aa['dim'],_0x3a1d3b(0x1af))+'\x0a');else{if(_0x521e04===_0x3a1d3b(0x567))_0x2589a6[_0x3a1d3b(0x1f9)]=![],console[_0x3a1d3b(0x24e)](_0x3a1d3b(0x82)+_0x43d25e(_0x4bb7aa[_0x3a1d3b(0x1bd)],'○')+'\x20logs\x20off\x0a');else _0xa81c21[_0x521e04]!==undefined?(_0x2589a6['enabled']=!![],_0x2589a6['level']=_0x521e04,console[_0x3a1d3b(0x24e)](_0x3a1d3b(0x82)+_0x43d25e(_0x4bb7aa[_0x3a1d3b(0x404)],'✓')+_0x3a1d3b(0x6a2)+_0x43d25e(_0x4bb7aa['bold'],_0x521e04)+'\x0a')):console['error'](_0x43d25e(_0x4bb7aa[_0x3a1d3b(0x356)],_0x3a1d3b(0x5a8)));}return;}if(_0x5c7f5f==='EXIT'||_0x5c7f5f===_0x3a1d3b(0x61c)){await _0x3950bd(_0x142524,0x0);return;}if(_0x5c7f5f==='OPEN'){const _0x4be530='http://localhost:'+_0x578afa[_0x3a1d3b(0x255)]+'/admin/index.html',_0x3d4d89=process['platform']===_0x3a1d3b(0x73f)?_0x3a1d3b(0x74a)+_0x4be530:process[_0x3a1d3b(0x379)]===_0x3a1d3b(0x551)?'open\x20'+_0x4be530:_0x3a1d3b(0x46f)+_0x4be530;require$$4[_0x3a1d3b(0xb1)](_0x3d4d89),console[_0x3a1d3b(0x24e)]('\x0a\x20\x20'+_0x43d25e(_0x4bb7aa[_0x3a1d3b(0x404)],'✓')+_0x3a1d3b(0x2d2)+_0x43d25e(_0x4bb7aa['cyan'],_0x4be530)+'\x0a');return;}let _0x576672,_0x427108,_0x1de7d4;if(_0x42e204['has'](_0x5c7f5f)){_0x576672=_0x5c7f5f,_0x427108=_0x43001d[0x1],_0x1de7d4=_0x43001d[_0x3a1d3b(0x13a)](0x2);if(!_0x427108){console[_0x3a1d3b(0x492)](_0x43d25e(_0x4bb7aa[_0x3a1d3b(0x356)],_0x3a1d3b(0xf5)+_0x2eec3e+_0x3a1d3b(0x2c3)));return;}}else _0x576672=null,_0x427108=_0x43001d[0x0],_0x1de7d4=_0x43001d[_0x3a1d3b(0x13a)](0x1);const _0x3accbd=_0x1c9c46[_0x3a1d3b(0x124)]??_0x6a8e88[_0x3a1d3b(0x124)],_0x417ee0=_0x42538c(_0x427108,_0x3accbd);if(_0x1c9c46[_0x3a1d3b(0x353)]){_0x56c906(_0x142524,_0x417ee0);return;}let _0xd7fc8f=null;if(_0x1de7d4[_0x3a1d3b(0x39d)]){const _0x2357e4=_0x1de7d4[_0x3a1d3b(0x10b)]('\x20');try{_0xd7fc8f=_0x158ef8(_0x2357e4);}catch(_0x5ec380){console[_0x3a1d3b(0x492)](_0x43d25e(_0x4bb7aa['red'],_0x3a1d3b(0x1ea)+_0x2357e4+_0x3a1d3b(0x82)+_0x43d25e(_0x4bb7aa[_0x3a1d3b(0x775)],_0x5ec380[_0x3a1d3b(0x5e6)])+'\x0a'));return;}}if(!_0x576672)_0x576672=_0xd7fc8f!==null?_0x3a1d3b(0x2ed):_0x3a1d3b(0x248);try{const _0x3a8e81=await _0x32005a(_0x142524,_0x576672,_0x417ee0,_0xd7fc8f);_0x4cd5fd(_0x3a8e81[_0x3a1d3b(0x170)],_0x3a8e81[_0x3a1d3b(0x4fc)]);}catch(_0x24384d){console[_0x3a1d3b(0x492)](_0x3a1d3b(0x82)+_0x43d25e(_0x4bb7aa[_0x3a1d3b(0x356)],'✗')+'\x20'+_0x24384d[_0x3a1d3b(0x5e6)]+'\x0a');}}class _0x188a15{constructor(){const _0x1bdbe0=_0x26a86f;this['children']=new Map(),this[_0x1bdbe0(0x77f)]=null,this[_0x1bdbe0(0x250)]=![];}}function _0x2ff1a9(_0x1908df){const _0x45b474=_0x26a86f,_0x4e2aff=new _0x188a15();for(const _0x363551 of _0x1908df){if(_0x363551[_0x45b474(0xc9)]?.[_0x45b474(0x4f4)])continue;const _0x577b99=_0x363551[_0x45b474(0x4c5)][_0x45b474(0x416)](/^\/api/,'')[_0x45b474(0x416)](/^\[\/env\/:env=[^\]]*\]/,'')[_0x45b474(0x416)](/^\//,'');if(!_0x577b99)continue;let _0x4cc5fc=_0x4e2aff;for(const _0x1c374f of _0x577b99[_0x45b474(0x2aa)]('/')['filter'](Boolean)){if(_0x1c374f['startsWith'](':')){const _0x35c4d4=_0x1c374f[_0x45b474(0x13a)](0x1);if(!_0x4cc5fc['dynamic'])_0x4cc5fc[_0x45b474(0x77f)]={'param':_0x35c4d4,'node':new _0x188a15()};_0x4cc5fc=_0x4cc5fc['dynamic'][_0x45b474(0x68e)];}else{if(!_0x4cc5fc[_0x45b474(0x5ff)]['has'](_0x1c374f))_0x4cc5fc[_0x45b474(0x5ff)][_0x45b474(0x49d)](_0x1c374f,new _0x188a15());_0x4cc5fc=_0x4cc5fc[_0x45b474(0x5ff)]['get'](_0x1c374f);}}_0x4cc5fc['terminal']=!![];}return _0x4e2aff;}const _0x267af9=new Map();function _0x24db31(_0x22bbc9,_0x46a443,_0x562763){const _0x51def0=_0x26a86f,_0x49e7a5=_0x267af9['get'](_0x22bbc9);if(_0x49e7a5&&_0x49e7a5[_0x51def0(0x69e)]>Date['now']())return _0x49e7a5[_0x51def0(0x20d)];const _0x40e850=_0x562763();return _0x267af9['set'](_0x22bbc9,{'val':_0x40e850,'exp':Date[_0x51def0(0x127)]()+_0x46a443}),_0x40e850;}function _0x32b0d7(_0x5d8e3b,_0x22d2a6,_0x103af3,_0x32df9b){const _0x56ec6f=_0x26a86f,_0x28efdb=_0x22d2a6[_0x56ec6f(0x124)]??_0x32df9b[_0x56ec6f(0x124)];switch(_0x5d8e3b){case _0x56ec6f(0x124):return[..._0x103af3[_0x56ec6f(0x64c)][_0x56ec6f(0x6d8)]()][_0x56ec6f(0x293)](_0x1844c6=>!_0x1844c6['startsWith']('~'));case'type':return _0x24db31(_0x56ec6f(0x642)+_0x28efdb,0x7d0,()=>{const _0x1484c4=_0x56ec6f;try{return[..._0x103af3[_0x1484c4(0x124)](_0x28efdb)[_0x1484c4(0x105)][_0x1484c4(0x6d8)]()][_0x1484c4(0x293)](_0x4d2948=>!_0x4d2948[_0x1484c4(0x42e)]('~'));}catch{return[];}});case'key':if(!_0x22d2a6[_0x56ec6f(0x66f)])return[];return _0x24db31('keys:'+_0x28efdb+':'+_0x22d2a6['type'],0x5dc,()=>{const _0x284aa4=_0x56ec6f;try{const _0x42d984=_0x103af3[_0x284aa4(0x124)](_0x28efdb)[_0x284aa4(0x105)][_0x284aa4(0x6a)](_0x22d2a6[_0x284aa4(0x66f)]);if(!_0x42d984?.[_0x284aa4(0x32e)])return[];const _0x518d4b=[];for(const {key:_0x4aa6c5}of _0x42d984['data'][_0x284aa4(0x1c1)]({'limit':0x32})){_0x518d4b[_0x284aa4(0x2f9)](String(_0x4aa6c5));if(_0x518d4b['length']>=0x32)break;}return _0x518d4b;}catch{return[];}});case'index':if(!_0x22d2a6[_0x56ec6f(0x66f)])return[];return _0x24db31('idx:'+_0x28efdb+':'+_0x22d2a6[_0x56ec6f(0x66f)],0x7d0,()=>{const _0x2f3580=_0x56ec6f;try{const _0x3e62cf=_0x103af3[_0x2f3580(0x124)](_0x28efdb)[_0x2f3580(0x105)]['get'](_0x22d2a6[_0x2f3580(0x66f)]);return _0x3e62cf?[..._0x3e62cf[_0x2f3580(0x149)]?.[_0x2f3580(0x6d8)]()??[]]:[];}catch{return[];}});case _0x56ec6f(0x1a6):if(!_0x22d2a6[_0x56ec6f(0x66f)])return[];return _0x24db31(_0x56ec6f(0x1f3)+_0x28efdb+':'+_0x22d2a6[_0x56ec6f(0x66f)],0x7d0,()=>{const _0x45243b=_0x56ec6f;try{return _0x103af3[_0x45243b(0x2c1)]?.['list']?.(_0x22d2a6[_0x45243b(0x66f)],_0x103af3['env'](_0x28efdb))?.[_0x45243b(0x757)](_0x454a1b=>_0x454a1b['name'])??[];}catch{return[];}});default:return[];}}function _0xdf744a(_0x1de48e,_0x6c6d46,_0x1876ea,_0x4574be){const _0xf13f83=_0x26a86f,_0x31ff4b=_0x1de48e[_0xf13f83(0x113)]('/'),_0x3cb57f=_0x1de48e[_0xf13f83(0x2aa)]('/'),_0x2a68bd=_0x31ff4b?_0x3cb57f['slice'](0x0,-0x1):_0x3cb57f['slice'](0x0,-0x1),_0x58c5e8=_0x31ff4b?'':_0x3cb57f[_0x3cb57f[_0xf13f83(0x39d)]-0x1];let _0x154a17=_0x6c6d46;const _0x4cebbc={};for(const _0x7f8cde of _0x2a68bd){if(!_0x7f8cde)continue;if(_0x154a17[_0xf13f83(0x5ff)][_0xf13f83(0x469)](_0x7f8cde))_0x154a17=_0x154a17[_0xf13f83(0x5ff)]['get'](_0x7f8cde);else{if(_0x154a17[_0xf13f83(0x77f)])_0x4cebbc[_0x154a17[_0xf13f83(0x77f)][_0xf13f83(0x32f)]]=_0x7f8cde,_0x154a17=_0x154a17[_0xf13f83(0x77f)][_0xf13f83(0x68e)];else return[];}}const _0xa154ec=_0x2a68bd[_0xf13f83(0x293)](Boolean),_0x3a9f5a=_0xa154ec[_0xf13f83(0x39d)]?_0xa154ec[_0xf13f83(0x10b)]('/')+'/':'',_0x465051=[];for(const [_0x4cb457]of _0x154a17[_0xf13f83(0x5ff)]){if(_0x4cb457[_0xf13f83(0x42e)](_0x58c5e8))_0x465051[_0xf13f83(0x2f9)](_0x3a9f5a+_0x4cb457);}if(_0x154a17[_0xf13f83(0x77f)])for(const _0x224ce8 of _0x32b0d7(_0x154a17[_0xf13f83(0x77f)][_0xf13f83(0x32f)],_0x4cebbc,_0x1876ea,_0x4574be)){if(String(_0x224ce8)[_0xf13f83(0x42e)](_0x58c5e8))_0x465051[_0xf13f83(0x2f9)](_0x3a9f5a+_0x224ce8);}return _0x465051[_0xf13f83(0x13a)](0x0,0x64);}const _0x58f62c=[_0x26a86f(0x353),_0x26a86f(0x724),_0x26a86f(0x124),_0x26a86f(0x5cb),_0x26a86f(0x429),_0x26a86f(0x249),_0x26a86f(0x5fc),_0x26a86f(0x1fd),'exit',_0x26a86f(0x28d)];function _0x527660(_0x1ab475,_0x19920a,_0x2ea2c9){return function _0x127833(_0x2ca06c){const _0x4c3f47=_0x8cd7;try{const _0x2861cc=_0x2ca06c[_0x4c3f47(0x41c)](/\s[{[]/),_0x13bf75=_0x2861cc>=0x0?_0x2ca06c[_0x4c3f47(0x13a)](0x0,_0x2861cc):_0x2ca06c,_0x2dd505=_0x13bf75[_0x4c3f47(0x251)]();if(!_0x2dd505){const _0x447f6d=[..._0x58f62c,...[..._0x1ab475['children'][_0x4c3f47(0x6d8)]()]][_0x4c3f47(0x13a)](0x0,0x64);return[_0x447f6d,''];}const _0x2a4788=_0x2dd505[_0x4c3f47(0x2aa)](/\s+/),_0x43cd7f=_0x2a4788[0x0],_0x1baf18=_0x43cd7f[_0x4c3f47(0x419)]();if(_0x2a4788[_0x4c3f47(0x39d)]===0x1){const _0x878dc4=_0x43cd7f[_0x4c3f47(0x8d)](),_0xd39a1f=_0x58f62c[_0x4c3f47(0x293)](_0x29df2e=>_0x29df2e['startsWith'](_0x878dc4)),_0x1e043d=_0xdf744a(_0x43cd7f,_0x1ab475,_0x19920a,_0x2ea2c9),_0x17398e=[...new Set([..._0xd39a1f,..._0x1e043d])][_0x4c3f47(0x13a)](0x0,0x64);return[_0x17398e,_0x43cd7f];}if(_0x42e204[_0x4c3f47(0x469)](_0x1baf18)&&_0x2a4788[_0x4c3f47(0x39d)]===0x2){const _0x573335=_0x2a4788[0x1],_0x5344fa=_0xdf744a(_0x573335,_0x1ab475,_0x19920a,_0x2ea2c9);return[_0x5344fa[_0x4c3f47(0x757)](_0xa30773=>_0x43cd7f+'\x20'+_0xa30773),_0x43cd7f+'\x20'+_0x573335];}if(!_0x42e204[_0x4c3f47(0x469)](_0x1baf18)&&_0x2a4788[_0x4c3f47(0x39d)]>0x1){const _0x5bea81=_0xdf744a(_0x43cd7f,_0x1ab475,_0x19920a,_0x2ea2c9),_0x2f12c3='\x20'+_0x2a4788[_0x4c3f47(0x13a)](0x1)[_0x4c3f47(0x10b)]('\x20');return[_0x5bea81[_0x4c3f47(0x757)](_0x3be5e4=>_0x3be5e4+_0x2f12c3),_0x43cd7f+_0x2f12c3];}return[[],_0x2ca06c];}catch{return[[],_0x2ca06c];}};}async function _0x16d1b7(_0x577470,_0x482c7c){const _0x359c8f=_0x26a86f,_0x36f6c9={'enabled':!![],'level':_0x482c7c[_0x359c8f(0x4a0)]??_0x359c8f(0x2cf)},_0x1f9eea={'env':_0x359c8f(0x3e8)},_0x14d19a={'current':null},_0x2617ae=_0x2ff1a9(_0x577470[_0x359c8f(0x91)][_0x359c8f(0x562)]()),_0x3b2154=_0x527660(_0x2617ae,_0x577470,_0x1f9eea);_0x577470[_0x359c8f(0x24e)]['attach'](_0x4c9dee=>{const _0x5e82b0=_0x359c8f;if(!_0x36f6c9[_0x5e82b0(0x1f9)])return;_0x13c223(_0x4c9dee,_0x36f6c9['level']),_0x14d19a[_0x5e82b0(0x2ef)]?.[_0x5e82b0(0x33e)](!![]);}),_0x1c3ad0(_0x577470,_0x482c7c);const _0x306123=_0x52889e[_0x359c8f(0x3d7)]({'input':process[_0x359c8f(0x40c)],'output':process[_0x359c8f(0x11c)],'terminal':!![],'completer':_0x3b2154,'prompt':_0x53c343(_0x1f9eea),'historySize':_0x2f1774});try{const _0x42ff0a=_0x22358a[_0x359c8f(0x418)](_0x3d347d,_0x359c8f(0x320))[_0x359c8f(0x2aa)]('\x0a')['filter'](Boolean);_0x306123[_0x359c8f(0x5ad)]=_0x42ff0a[_0x359c8f(0x693)]()['slice'](0x0,_0x2f1774);}catch{}_0x14d19a[_0x359c8f(0x2ef)]=_0x306123,_0x306123['on']('line',async _0x36afd6=>{const _0x544edd=_0x359c8f;_0x306123['pause']();try{await _0x295ed4(_0x36afd6,_0x577470,_0x482c7c,_0x36f6c9,_0x1f9eea,_0x306123);}catch(_0x4349b9){console[_0x544edd(0x492)](_0x43d25e(_0x4bb7aa[_0x544edd(0x356)],_0x544edd(0xae)+_0x4349b9[_0x544edd(0x5e6)]));}finally{_0x306123[_0x544edd(0x2a4)](),_0x306123[_0x544edd(0x33e)]();}}),_0x306123['on'](_0x359c8f(0x44f),()=>{const _0x267a06=_0x359c8f;try{const _0x4ee92b=[..._0x306123[_0x267a06(0x5ad)]]['reverse']()[_0x267a06(0x293)](Boolean)['slice'](0x0,_0x2f1774);_0x22358a[_0x267a06(0x188)](_0x3d347d,_0x4ee92b[_0x267a06(0x10b)]('\x0a')+'\x0a');}catch{}_0x3950bd(_0x577470,0x0);});let _0x5f5b9b=0x0;return process['on'](_0x359c8f(0xe2),()=>{const _0x28b7d3=_0x359c8f;if(_0x204f39)return _0x3950bd(_0x577470,0x82,'SIGINT');if(_0x306123[_0x28b7d3(0x1c4)]==='')return _0x3950bd(_0x577470,0x0,'SIGINT');const _0x10a65d=Date['now']();if(_0x10a65d-_0x5f5b9b<0x5dc)return _0x3950bd(_0x577470,0x0,'SIGINT\x20(double-tap)');_0x5f5b9b=_0x10a65d,process['stdout'][_0x28b7d3(0xb6)]('\x0a'),_0x306123[_0x28b7d3(0x169)](0x0),_0x306123[_0x28b7d3(0x33e)](),process[_0x28b7d3(0x705)]['write'](_0x43d25e(_0x4bb7aa[_0x28b7d3(0x775)],_0x28b7d3(0x5bb)));}),process['on'](_0x359c8f(0x196),()=>_0x3950bd(_0x577470,0x0,_0x359c8f(0x196))),process['on'](_0x359c8f(0x583),()=>_0x3950bd(_0x577470,0x0,_0x359c8f(0x583))),_0x306123[_0x359c8f(0x33e)](),_0x306123;}return okdbShell={'start':_0x16d1b7,'colorLog':_0x13c223,'lenientParse':_0x158ef8,'_splitLine':_0x8fe228,'_formatRouteHelpLines':_0x20d4ae,'_routeSummary':_0x9eddb5,'_routeTags':_0x2c3099},okdbShell;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0xb64380=_0x3d20e4;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x4b9ef2,performance:_0x1ab312}=require$$0$4,_0x2d6788=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0xb64380(0x727),_0x5b8ec6=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x5dfe4f=process.env.OKDB_LOOP_LAG_ALL==='1',_0x5e834a=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x12544d{constructor(){const _0x4601ab=_0xb64380;this[_0x4601ab(0x1f9)]=_0x2d6788,this[_0x4601ab(0x84)]=new Map(),this['_h']=null,this[_0x4601ab(0x577)]=null,this[_0x4601ab(0x589)]=![],this[_0x4601ab(0x42a)]=(_0x3393a5,_0x4c5cc2)=>process['stderr'][_0x4601ab(0xb6)](_0x3393a5+(_0x4c5cc2?'\x20'+JSON[_0x4601ab(0x5c1)](_0x4c5cc2):'')+'\x0a');}[_0xb64380(0x127)](){const _0x15de53=_0xb64380;return _0x1ab312[_0x15de53(0x127)]();}['setLogger'](_0xcc0208){const _0x11775e=_0xb64380;if(typeof _0xcc0208===_0x11775e(0x372))this[_0x11775e(0x42a)]=_0xcc0208;}[_0xb64380(0x79)](_0x346fa4,_0x3efb30,_0x56ce5e){const _0x242a90=_0xb64380;if(!this[_0x242a90(0x1f9)])return;let _0x337f73=this[_0x242a90(0x84)][_0x242a90(0x6a)](_0x346fa4);!_0x337f73&&(_0x337f73={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x242a90(0x84)][_0x242a90(0x49d)](_0x346fa4,_0x337f73)),_0x337f73['ms']+=_0x3efb30,_0x337f73['count']+=0x1,_0x3efb30>_0x337f73[_0x242a90(0x17a)]&&(_0x337f73[_0x242a90(0x17a)]=_0x3efb30,_0x337f73[_0x242a90(0x9e)]=_0x56ce5e||'');}['start'](_0x3d50ea){const _0x543f78=_0xb64380;if(!this[_0x543f78(0x1f9)]||this[_0x543f78(0x589)])return;this['_started']=!![];if(_0x3d50ea)this['_log']=_0x3d50ea;this['_h']=_0x4b9ef2({'resolution':0xa}),this['_h']['enable'](),this['_timer']=setInterval(()=>this[_0x543f78(0x72a)](),_0x5b8ec6);if(this[_0x543f78(0x577)][_0x543f78(0xe9)])this[_0x543f78(0x577)][_0x543f78(0xe9)]();}[_0xb64380(0x600)](_0x2ff297){const _0x54b32e=_0xb64380;if(!this[_0x54b32e(0x677)])this[_0x54b32e(0x677)]=new Set();this[_0x54b32e(0x677)][_0x54b32e(0x3e9)](_0x2ff297);if(!this[_0x54b32e(0x589)])this[_0x54b32e(0x578)]();}[_0xb64380(0x3ab)](_0x51ad45){const _0x71791e=_0xb64380;this[_0x71791e(0x677)]?.['delete'](_0x51ad45);}[_0xb64380(0x578)](){const _0x44ed84=_0xb64380;if(this['_admissionStarted'])return;this[_0x44ed84(0x713)]=!![];!this['_h']&&(this['_h']=_0x4b9ef2({'resolution':0xa}),this['_h'][_0x44ed84(0x17c)]());const _0x5b645a=_0x5b8ec6;this[_0x44ed84(0x643)]=setInterval(()=>{const _0x4b6e03=_0x44ed84,_0xf6f09c=this['_h'];if(!_0xf6f09c)return;const _0x52a55d=_0xf6f09c['percentile'](0x63)/0xf4240,_0x471a27=_0xf6f09c[_0x4b6e03(0x68c)]/0xf4240,_0x4a2a22=_0xf6f09c[_0x4b6e03(0x72f)]/0xf4240;_0xf6f09c[_0x4b6e03(0x478)]();if(this[_0x4b6e03(0x677)])for(const _0x5e48d6 of this[_0x4b6e03(0x677)]){try{_0x5e48d6({'p99Ms':_0x52a55d,'maxMs':_0x471a27,'meanMs':_0x4a2a22,'reportMs':_0x5b645a});}catch{}}},_0x5b645a);if(this[_0x44ed84(0x643)]['unref'])this['_admissionTimer'][_0x44ed84(0xe9)]();}[_0xb64380(0x72a)](){const _0x45cfc1=_0xb64380,_0x41fa05=this['_h'],_0x44da3f=_0x41fa05['max']/0xf4240,_0x156668=_0x41fa05[_0x45cfc1(0x721)](0x63)/0xf4240,_0x3cc160=_0x41fa05[_0x45cfc1(0x72f)]/0xf4240;_0x41fa05[_0x45cfc1(0x478)]();const _0x106de9=[...this[_0x45cfc1(0x84)]['entries']()][_0x45cfc1(0x757)](([_0x50ce35,_0x549a7e])=>({'label':_0x50ce35,..._0x549a7e}))[_0x45cfc1(0x774)]((_0x32747e,_0x2fc856)=>_0x2fc856['ms']-_0x32747e['ms'])[_0x45cfc1(0x13a)](0x0,0x8);this['_buckets'][_0x45cfc1(0x209)]();const _0x58e7f0=_0x106de9[_0x45cfc1(0x47e)]((_0x2bb518,_0x58f985)=>_0x2bb518+_0x58f985['ms'],0x0),_0x21b2ee=_0x106de9['map'](_0x22877a=>_0x22877a[_0x45cfc1(0x313)]+'='+_0x22877a['ms'][_0x45cfc1(0x72c)](0x0)+_0x45cfc1(0xda)+_0x22877a[_0x45cfc1(0x6ad)]+(_0x22877a[_0x45cfc1(0x17a)]>0x5?'(worst\x20'+_0x22877a['maxMs'][_0x45cfc1(0x72c)](0x0)+'ms'+(_0x22877a['maxExtra']?'\x20'+_0x22877a[_0x45cfc1(0x9e)]:'')+')':''));(_0x5dfe4f||_0x44da3f>=_0x5e834a)&&this[_0x45cfc1(0x42a)]('loop-lag\x20'+_0x5b8ec6+_0x45cfc1(0x354)+_0x44da3f['toFixed'](0x0)+_0x45cfc1(0x42c)+_0x156668[_0x45cfc1(0x72c)](0x0)+_0x45cfc1(0x63f)+_0x3cc160[_0x45cfc1(0x72c)](0x0)+_0x45cfc1(0x291)+_0x58e7f0[_0x45cfc1(0x72c)](0x0)+'ms'+(_0x21b2ee[_0x45cfc1(0x39d)]?_0x45cfc1(0x367)+_0x21b2ee['join']('\x20\x20'):''),{'feature':'loop-lag'});if(this['_windowCbs'])for(const _0x1eaaf1 of this[_0x45cfc1(0x677)]){try{_0x1eaaf1({'p99Ms':_0x156668,'maxMs':_0x44da3f,'meanMs':_0x3cc160,'reportMs':_0x5b8ec6});}catch{}}}[_0xb64380(0x226)](){const _0x1996d8=_0xb64380;if(this[_0x1996d8(0x577)])clearInterval(this[_0x1996d8(0x577)]);if(this['_h'])this['_h'][_0x1996d8(0xa4)]();this[_0x1996d8(0x577)]=null,this['_h']=null,this['_started']=![];}}const _0x2eb4ba=new _0x12544d();if(_0x2eb4ba[_0xb64380(0x1f9)])_0x2eb4ba[_0xb64380(0x570)]();return okdbLoopMonitor={'LOOP':_0x2eb4ba},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x402fd4=require$$0$1,_0x5d11aa=require$$1;let _0x3211d3,_0x3ae21f,_0x59aa73,_0x4f646c,_0x4fc8da,_0x444485,_0x26cc5c,_0x11ee7a=![];const _0xb9dbbe=new Set();let _0x5ba2bb=null;const _0x17a51f=new Map();function _0x1166b8(){const _0x247ca5=_0x8cd7;if(_0x3211d3!==undefined)return _0x3211d3;_0x3211d3=process.env.OKDB_DIAG==='1';if(!_0x3211d3)return![];_0x3ae21f=process.env.OKDB_DIAG_STACK==='1',_0x4f646c=Math['max'](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x59aa73=new Array(_0x4f646c),_0x4fc8da=0x0,_0x444485=0x0,_0x26cc5c=process.env.OKDB_DIAG_DIR||null;if(_0x26cc5c)try{_0x402fd4[_0x247ca5(0x2ad)](_0x26cc5c,{'recursive':!![]});}catch{}return!![];}function _0x3101e0(){return _0x3211d3===undefined?_0x1166b8():_0x3211d3;}function _0x35ca33(_0xbbc73b,_0xc146d){const _0x532fa4=_0x8cd7;if(_0x3211d3===undefined?!_0x1166b8():!_0x3211d3)return;let _0x2eb918;if(_0x3ae21f){const _0x1676dc=new Error()[_0x532fa4(0x5ed)]||'';_0x2eb918=_0x1676dc['split']('\x0a')[_0x532fa4(0x13a)](0x3)['map'](_0x2bfcab=>_0x2bfcab[_0x532fa4(0x471)]())[_0x532fa4(0x293)](Boolean)[_0x532fa4(0x13a)](0x0,0x8);}_0x59aa73[_0x4fc8da]={'seq':_0x444485++,'t':Date[_0x532fa4(0x127)](),'env':_0xbbc73b,'kind':_0xc146d||'commit','stack':_0x2eb918},_0x4fc8da=(_0x4fc8da+0x1)%_0x4f646c;}function _0x382166(_0x1dbd1e){const _0x4a7d43=_0x8cd7,_0x35c929=[];for(let _0x1d2c2e=0x0;_0x1d2c2e<_0x4f646c;_0x1d2c2e++){const _0x1906be=_0x59aa73[(_0x4fc8da-0x1-_0x1d2c2e+_0x4f646c*0x2)%_0x4f646c];if(!_0x1906be)continue;_0x35c929[_0x4a7d43(0x2f9)](_0x1906be);if(_0x35c929[_0x4a7d43(0x39d)]>=_0x1dbd1e)break;}return _0x35c929;}function _0x69fb1d(_0x1ca1b9){const _0x1ae2dd=_0x8cd7;try{process[_0x1ae2dd(0x705)]['write'](_0x1ca1b9+'\x0a');}catch{}if(_0x26cc5c)try{_0x402fd4[_0x1ae2dd(0xfb)](_0x5d11aa['join'](_0x26cc5c,'okdb-diag.'+process['pid']+_0x1ae2dd(0x30f)),_0x1ca1b9+'\x0a');}catch{}}function _0x3f1696(_0x4ac17b){const _0x45c7ae=_0x8cd7,_0x5207de=_0x382166(_0x4ac17b);if(!_0x5207de[_0x45c7ae(0x39d)])return _0x45c7ae(0xfe);const _0x599b99=Date[_0x45c7ae(0x127)]();return _0x5207de[_0x45c7ae(0x757)](_0x412687=>{const _0x279832=_0x45c7ae,_0x23be15=_0x279832(0x5f2)+_0x412687['seq']+'\x20-'+(_0x599b99-_0x412687['t'])+_0x279832(0x637)+_0x412687[_0x279832(0x124)]+'\x20'+_0x412687[_0x279832(0xaa)];return _0x412687['stack']&&_0x412687[_0x279832(0x5ed)]['length']?_0x23be15+'\x0a\x20\x20\x20\x20\x20\x20'+_0x412687[_0x279832(0x5ed)][_0x279832(0x10b)](_0x279832(0x33b)):_0x23be15;})[_0x45c7ae(0x10b)]('\x0a');}function _0x48b9a7(_0x358039,_0x53b3dd){const _0x3266cf=_0x8cd7,_0x295509='\x0a===\x20OKDB_DIAG\x20'+_0x358039+_0x3266cf(0x2b1)+new Date()[_0x3266cf(0x261)]()+'\x20pid='+process['pid']+_0x3266cf(0x71f),_0x4ad973=[_0x295509,_0x3266cf(0x85)+(_0x53b3dd&&_0x53b3dd['stack']?_0x53b3dd['stack'][_0x3266cf(0x2aa)]('\x0a')[0x0]:_0x53b3dd),'recent\x20writes\x20(newest\x20first)'+(_0x3ae21f?'':_0x3266cf(0x215))+':',_0x3f1696(0x18),_0x57e79d(),'='[_0x3266cf(0x4d9)](_0x295509[_0x3266cf(0x39d)]-0x1)];_0x69fb1d(_0x4ad973[_0x3266cf(0x10b)]('\x0a'));}function _0x4a072d(_0x178837){const _0x1db119=_0x8cd7;if(!_0x3101e0())return;const _0x219849=String(_0x178837&&_0x178837[_0x1db119(0x5e6)]||_0x178837||''),_0x24f45e=/already closed|environment is already|invalid read txn|reset an invalid/i['test'](_0x219849);_0x48b9a7(_0x24f45e?_0x1db119(0x135):_0x1db119(0x509),_0x178837);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x24f45e)return;try{console[_0x1db119(0x492)](_0x178837&&_0x178837[_0x1db119(0x5ed)]?_0x178837[_0x1db119(0x5ed)]:_0x178837);}catch{}process['exit'](0x1);}function _0x435fe5(_0x361ccf){const _0x1ac2e2=_0x8cd7;if(!_0x3101e0())return;const _0x43a054=String(_0x361ccf&&_0x361ccf[_0x1ac2e2(0x5e6)]||_0x361ccf||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x1ac2e2(0x155)](_0x43a054)&&_0x48b9a7(_0x1ac2e2(0x4af),_0x361ccf);}function _0x57e79d(){const _0x5e3966=_0x8cd7,_0x8fe059=[_0x5e3966(0x66a)];let _0x151638=![];for(const _0x2c29cf of _0xb9dbbe){const _0x24b220=_0x2c29cf&&_0x2c29cf[_0x5e3966(0x64c)];if(!_0x24b220)continue;for(const [_0x495615,_0x5416dd]of _0x24b220){const _0x43ee37=_0x5416dd&&_0x5416dd['_coordinator']&&_0x5416dd['_coordinator']['view'];if(!_0x43ee37)continue;let _0x242b1b,_0x34785e;try{_0x242b1b=Atomics[_0x5e3966(0x776)](_0x43ee37,0x0),_0x34785e=Atomics[_0x5e3966(0x776)](_0x43ee37,0x1);}catch{continue;}if(_0x242b1b===0x0)continue;_0x151638=!![];const _0x4fcd09=_0x242b1b>0x0?_0x5e3966(0x363):_0x5e3966(0x593),_0x199019=Date[_0x5e3966(0x127)]()-Math[_0x5e3966(0x369)](_0x242b1b)*0x3e8,_0x17f5ba=((()=>{const _0x5285f9=_0x5e3966;try{return _0x5416dd[_0x5285f9(0x385)]&&_0x5416dd[_0x5285f9(0x385)][_0x5285f9(0x170)]?_0x5416dd[_0x5285f9(0x385)][_0x5285f9(0x170)]():null;}catch{return null;}})());_0x8fe059[_0x5e3966(0x2f9)](_0x5e3966(0x608)+_0x495615+_0x5e3966(0x3c7)+_0x4fcd09+_0x5e3966(0x480)+_0x199019+_0x5e3966(0x6e8)+_0x34785e+(_0x17f5ba?'\x20writer{depth='+_0x17f5ba[_0x5e3966(0x5c7)]+_0x5e3966(0x152)+_0x17f5ba[_0x5e3966(0x3f9)]+_0x5e3966(0x2e3)+_0x17f5ba[_0x5e3966(0x228)]+'}':''));}}if(!_0x151638)_0x8fe059['push'](_0x5e3966(0x4cd));return _0x8fe059[_0x5e3966(0x10b)]('\x0a');}function _0x482f65(){const _0x1ef437=_0x8cd7;if(!_0x3101e0())return;const _0x54f5a8=Math[_0x1ef437(0x68c)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x4121ea=Date['now']();for(const _0x103328 of _0xb9dbbe){const _0x26e821=_0x103328&&_0x103328[_0x1ef437(0x64c)];if(!_0x26e821)continue;for(const [_0x322cc0,_0x347ef7]of _0x26e821){const _0x2d5fc5=_0x347ef7&&_0x347ef7[_0x1ef437(0x6c7)]&&_0x347ef7[_0x1ef437(0x6c7)][_0x1ef437(0xf6)];if(!_0x2d5fc5)continue;let _0x1bb272;try{_0x1bb272=Atomics[_0x1ef437(0x776)](_0x2d5fc5,0x0);}catch{continue;}const _0x325f3b=_0x103328[_0x1ef437(0x4c5)]+'|'+_0x322cc0;if(_0x1bb272<=0x0){_0x17a51f[_0x1ef437(0x95)](_0x325f3b);continue;}const _0x4ee649=_0x4121ea-_0x1bb272*0x3e8,_0xbeee5c=_0x17a51f['get'](_0x325f3b);if(_0x4ee649<_0x54f5a8)continue;if(_0xbeee5c&&_0x4121ea-_0xbeee5c[_0x1ef437(0xbe)]<_0x54f5a8)continue;_0x17a51f[_0x1ef437(0x49d)](_0x325f3b,{'firstTs':_0xbeee5c?_0xbeee5c['firstTs']:_0x1bb272,'dumpedAt':_0x4121ea});const _0x917209=_0x1ef437(0x71e)+_0x4ee649+'ms\x20on\x20env='+_0x322cc0+_0x1ef437(0x2b1)+new Date()[_0x1ef437(0x261)]()+_0x1ef437(0x431)+process[_0x1ef437(0xee)]+_0x1ef437(0x71f);_0x69fb1d([_0x917209,_0x57e79d(),'='[_0x1ef437(0x4d9)](_0x917209[_0x1ef437(0x39d)]-0x1)][_0x1ef437(0x10b)]('\x0a'));}}}function _0x572982(){const _0x4ffb9e=_0x8cd7;if(!_0x3101e0()||_0x11ee7a)return;_0x11ee7a=!![],process['prependListener']('uncaughtException',_0x4a072d),process[_0x4ffb9e(0x193)](_0x4ffb9e(0x569),_0x435fe5);const _0x39d557=Math[_0x4ffb9e(0x68c)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x5ba2bb=setInterval(_0x482f65,_0x39d557);if(_0x5ba2bb['unref'])_0x5ba2bb['unref']();}function _0x506d85(_0x388014){const _0x60ba1d=_0x8cd7;if(!_0x3101e0()||!_0x388014)return;_0xb9dbbe[_0x60ba1d(0x3e9)](_0x388014),_0x572982();}function _0x157e11(_0x5af868){const _0x551249=_0x8cd7;_0xb9dbbe[_0x551249(0x95)](_0x5af868);}function _0x388d75(){const _0x13d8d5=_0x8cd7;if(!_0x3101e0())return{'enabled':![],'hint':_0x13d8d5(0x5ec)};return{'enabled':!![],'stackCapture':!!_0x3ae21f,'recentWrites':_0x382166(0x10),'drain':_0x57e79d()};}return okdbDiag={'isEnabled':_0x3101e0,'recordWrite':_0x35ca33,'installDiag':_0x572982,'registerOkdb':_0x506d85,'unregisterOkdb':_0x157e11,'snapshot':_0x388d75},okdbDiag;}function _0x166e(){const _0x4a4ee1=[')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','listenAddr','dataBytes','title','peers=','syncPeers','\x1b[32m','env:opened','getPins','ROUTES','PUT','discoveryTtlMs','gray',':\x20key\x20[','_cookieName','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','stderr','hasDesired','name','API\x20tokens,\x20users,\x20and\x20credentials.','\x27:\x20','bus:env_release','\x20\x20matching\x20prefix\x20\x20\x20\x20','protected:read','nodeKey','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','--ttl','Invalid\x20primary\x20key\x20type:\x20','addRaw','blob','_admissionStarted','_clusterOnMessage','jwks_uri','[okdb-cluster]\x20','authorization_endpoint','_children','243858pqUWRX','GONE','unique','\x20\x20(','exports','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','\x20===','readSync','percentile','dedupeMax','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','use','_caps','\x20\x20\x20\x20addedAt:\x20\x20\x20','true','List\x20tokens\x20and\x20users.','dropType','_report','type:registered','toFixed','OKDBInvalidPrimaryKeyError','msg','mean','dropSchema','_sync','\x0a\x20\x20✓\x20License\x20added','roles','_buildProcessingFacet','\x20envs','sab','INDEX_READY','resolve','\x20deleted','okdb-writer[','primary','/type/users/query\x0a\x20\x20\x20\x20','clock','_onTick','win32','txn:start','UNIQUE_CONSTRAINT','reads','dropFts','View\x20peer\x20status\x20and\x20replication\x20stats.','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','_ownMeta','closeAllConnections','Environment\x20lifecycle.\x20Listing\x20and\x20creating\x20envs\x20is\x20system-level.','\x20records','start\x20','okdb.pid','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','tokenSecret','building','candidateBytes','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','_nodeDead','sizeAfter','hasType','application/json','bus:poke','onClaimed','map','createEnvironment','\x20\x20[','processor:resumed','\x20\x20\x20\x20','_heldTotal','yes','oauth','updatedAt','process\x20','\x20\x20\x20\x20licensee:\x20\x20','origins','FTS_RESET','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','readUInt16BE','hashed','\x20\x20Envs:\x20\x20\x20\x20','\x20\x20skipped:\x20','clusterStatusView','_resolveOrCreateEnv','\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','activateLicense','\x20env','pop',',\x20which\x20still\x20exists\x20—\x20the\x20restored\x20','Admin','dropping','consecutiveFailures','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','sort','dim','load','--port','\x20\x20\x20\x20admin:\x20\x20\x20http://localhost:','false','SIG_INVALID','Blob\x20storage:\x20large\x20file\x20uploads\x20attached\x20to\x20records\x20or\x20stored\x20standalone.','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','supervisorKey','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','dynamic','stopped','acquiredAt','BAD_GATEWAY','_validateOidcAccessToken','http.workers','error\x20','get','permission','\x20binding\x20references\x20missing\x20input\x20field:\x20','\x20\x20\x20\x20admin:\x20http://localhost:','OKDBSchemaValidationError','\x20\x20errors\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','newIdentity','guard','attached','ftsIndexes','homedir','_readNDJSON','_isWriter','system:ready','writeUInt32BE','note','_done','_pending','env/','_okdb','\x20+\x20','sourcePath','Type\x20definitions,\x20all\x20index\x20registrations\x20(byIndex,\x20FTS,\x20vector),\x20and\x20TTL\x20policy.','.okdb-write-test','\x0a\x20\x20','find','_buckets','error:\x20','STATUS','destroyed','[okdb]\x20importing\x20','\x20(expires\x20','auth','cursorKey','HTTP_CLUSTER_REMOVED','toLowerCase','Schema\x20&\x20Indexes','includes','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','http','_handleInProcess','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20','[okdb]\x20invalid\x20','delete','_lockDbOf','config\x20http.workers',';\x20Secure','copyFile','_onStop','user','createPublicKey','properties','maxExtra','(?:','Write','fstatSync','socket','recordWrite','disable','\x20license(s)',')\x20→\x20','\x20worker(s)\x20remaining','timingSafeEqual','application/x-www-form-urlencoded','kind','setFlagsFromString','[okdb]\x20reset:\x20','then','\x20\x20Error:\x20','\x20cannot\x20be\x20MCP-exposed\x20without\x20an\x20explicit\x20adapter\x20because\x20it\x20uses\x20','\x22\x20already\x20exists','exec','verifyActivation','context',';\x20shmbuf\x20native\x20missing\x20→\x20forced\x20single-process','[okdb]\x20http\x20workers:\x20','write','_clusterWorkerAttached','definition','_totalRequests','~files','rawResponse','registerType','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','dumpedAt','toLocaleString','freeze','OKDBSchemaCollectionError','PAYLOAD_TOO_LARGE','parse','maxBodyBytes','UNSUPPORTED_MEDIA_TYPE','createdAt','\x20\x20deleted\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','/admin/index.html','meta','commitsPerSec','--username','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','(code=','May\x20read\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20read\x20permission.','shmbuf','failed\x20to\x20open','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','importFromStream','Writable','_hbTimer','Feature\x20not\x20licensed:\x20','prefix','_key','\x20has\x20ambiguous\x20query/path\x20field:\x20','Records','ms/','RS256','data:\x20','--test','\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','method','[okdb]\x20invalid\x20log\x20level:\x20\x22','_bucketIdx','SIGINT','writeMs','LICENSE_LIMIT_EXCEEDED','end','_flushTimer','string','_isClusterController','unref','okdb_session','_blobStatusDb','--print','isFile','pid','(primary\x20=\x20processor)','allSettled','authenticateRequest','cookie','system:stopped','beforeWrite','\x20\x20Usage:\x20','view','_quarantinedEnvs','item:pending','openSync','shift','appendFileSync','\x20to\x20browse\x20the\x20API,\x20','shmbufNative','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)',',\x20closing…\x0a','_dedupeMax','value','OKDBError','legacy','List\x20jobs,\x20view\x20stats,\x20list\x20buckets.','typeSubDbs','tokenizer','processorsView','<path>','ENOENT','\x20\x20\x20\x20id:\x20\x20\x20\x20','join','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','Index\x20\x22','LICENSE_ALREADY_STORED','defaults','TYPES','\x20origin=','\x20<\x20','endsWith','treeView','\x20has\x20invalid\x20http.bodyMode:\x20','noAdmin','orphan_blob','credentials','shutdown','\x20fetching\x20','resetFts','stdout','workersConfigured','\x20MB\x20→\x20','_kind','missing_blob','timeMachine','randomBytes','concat','env','envsOpen','/api','now','blindPids','token','_startedAt','_jwksNegativeCache','Queue','effective','cli','unlink','/type/users/item/alice\x0a\x20\x20\x20\x20','selfKey','role','attach','\x20\x20Usage:','ORPHAN\x20(env-closed\x20write)','license:added','examples','[okdb]\x20primary\x20okdb\x20close\x20error:\x20','round','slice','setPrompt','description','isSetupMode','registerIndex','--grants','Index\x20\x27','[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','email','bus:proc','expiry','access-control-allow-credentials','\x20(expires\x20in\x20','stopping','\x0a[okdb]\x20error:\x20','indexToDb','unknown','--help','Lax','memoryUsage','exposeHeaders','exportBlobs','workers','[okdb]\x20blobs:\x20imported=','\x20oldestPendingMs=','\x0a\x20\x20✓\x20License\x20already\x20stored\x20(no\x20change)','base64','test','backup','__OKDB_PUB_FINGERPRINT__','_resolveEnv','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','exclusiveStart','\x20\x20\x20\x20\x20\x20','system:clock_change','searchParams','_lastTick','LICENSE_EXPIRED_ACTION','system:env_release','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','\x27\x20on\x20type\x20\x27','1558350Ordchh','OKDBInvalidValueError','headers','killable','signalWant','_userRouteCount','clearLine','pathParams','scanned','putSync','USE','License\x20signature\x20invalid:\x20','closed','status','FOREIGN_KEY_DELETE_RESTRICTED','sub','BAD_HOST','_nodeDbFor','\x20file','isEnabled','segments\x20(','[okdb]\x20restoring\x20','[okdb]\x20invalid\x20config\x20\x22http.host\x22:\x20','maxMs','\x20\x20✓\x20marked\x20for\x20a\x20new\x20identity\x20—\x20the\x20first\x20open\x20gives\x20this\x20copy\x20its\x20own\x20node\x20id','enable','x-requested-with','runInNewContext','_startHeartbeat','_bpWaiters','getAuthOptions','1ofN:','\x20worker\x20slot=','main','_maybePublish','\x22:\x20','detectInputType','writeFileSync','INTERNAL_ERROR','_totalReads','\x20—\x20','_blobsDir','FTS_DROP',';\x20Expires=','x5c','system:type_drop','authenticateToken','data.mdb','prependListener','events','dirname','SIGTERM','setDesired','cors','pipe','INDEX_ALREADY_REGISTERED','LICENSE_ACTIVATION_INVALID','cpus','integer','files/','tokenUrl','\x20\x20changes=','resolveBackupDest','--prefix','state','VALIDATION_ERROR','Validation\x20failed','ftsName','Create,\x20delete,\x20and\x20compact\x20environments.','./okdb-export.ndjson','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','writeUInt8','_rootDb','__vocab/version','is\x20required','\x20\x20scanned\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','level:\x20info','configureAuth','\x20named\x20by\x20okdb\x20≤\x202.4.0)','\x20\x20\x20\x20status:\x20\x20\x20\x20active','active','--password','(none)','use\x20<env>','_enforceOperationAccess','--force','reidentify','magenta','\x20allocated','_oidcDiscoveryCache','yellow','importFromFile','base64url','not\x20open','getRange','_refreshDesiredSnapshot','\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','line','init','kdb_admin_oauth_state','[okdb]\x20cluster\x20close\x20error:\x20','wrong_node','existsSync','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','\x1b[36m','_copyDir',',\x20signal=','RSA-SHA256','\x20\x20Some\x20checks\x20failed.\x0a','https:','safety','capable\x20HTTP\x20worker(s)\x20serving\x20:','removeLicense','ttl:set','Pause/resume\x20processor,\x20trigger\x20backups,\x20restore.','[filter]','_dedupeKey','\x27\x20doesn\x27t\x20exist','claimGated','_heartbeatTimer','internal','Token\x20secret\x20not\x20configured','\x20\x20\x20\x20expires:\x20\x20\x20','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','\x22\x20matches\x20','responseStatuses','HTTP\x20','import','\x20\x20✗','onThreadExit','[okdb-cluster]\x20worker\x20pid=','querySchema','REQUEST_TIMEOUT','include','\x20not\x20found','\x0a\x20\x20Invalid\x20JSON:\x20','\x0d[okdb]\x20blobs:\x20','UNAUTHORIZED','readdirSync','/([^/]+)','bodyMode','_wantDb','Cannot\x20set\x20enforce\x20schema\x20on\x20','\x20\x20\x20\x20permissions:\x20','fts:','permissions','\x22.\x20Use:\x20create,\x20list,\x20revoke','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','?\x0a\x20\x20(node\x20identity\x20and\x20licenses\x20are\x20preserved)\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','--eval','enabled','hasOwnProperty','Register/update/delete\x20types,\x20register/drop/rebuild\x20indexes,\x20set\x20TTL\x20policy.','Peer','open','columns','createWriteStream','boolean','licenses','pending','ITEM_REMOVE','isDead','\x20\x20·\x20','white','JWT\x20expired','_committed','clear','sourceType','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','envs=','val','handle','LABEL','Type\x20\x27','.\x20Move\x20it\x20away\x20first\x20to\x20use\x20the\x20copy.','foreignOwner','enforce','race','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','create','must\x20be\x20','_nodeDb','OKDB-PIN-V1:','(unset)','--name','unclaimed','List,\x20download,\x20and\x20inspect\x20file\x20metadata.','requests','indexes','work','att','Unique\x20constraint\x20violated\x20on\x20','\x20\x20✓\x20database\x20opened\x0a','x-okdb-raw-response','isActive','stop','signingInput','parkedNow','okdb','_draining','licensee','pathname','_listenAddr','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','protected:write','loadEnvFile','\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','unshift','content-type','INDEX_PROGRESS','~lock','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','groups','single','already\x20in\x20use','export','targetKey','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','Hint:\x20',':want','node:events','toString','doctor','promises','Protected\x20(gate)','port\x20','bind','\x20for\x20commands,\x20','type/users/query\x20{\x22active\x22:true}','GET','routes','ALREADY_EXISTS','setupPrimary','../','\x22\x20is\x20used\x20by:\x20','log','hostname','terminal','trimStart','node:crypto','namespace','_rowKey','port','LICENSEE','slot','\x20writes\x20(','worker','retiring','code','emit','SHM_SEGMENT_RETIRING','processingSig','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','limits','toISOString','_db','childTransaction','set-cookie','\x22\x20—\x20choose\x20a\x20directory\x20outside\x20it','_drainOne','addLicense','min','NOT_FOUND','_processStartedAt','migrate','\x20\x20║','shmbuf.node','[okdb]\x20export\x20complete','__okdbSlot','admin','_desiredOverlay','listDesired','METHOD_NOT_ALLOWED','[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20','params','crypto','preferred_username','_listTypes','realpathSync','forceAfterMs','removeSupervisedChild','_nestedTotal','OKDBIndexNotRegisteredError','_singletonLock','\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(','Forbidden\x20—\x20requires\x20','items','[okdb]\x20backing\x20up\x20to\x20','_normalizeOAuthAuthResult','DELETE\x20type/users/item/x','processorId','\x20\x20\x20\x20path:\x20\x20\x20\x20','\x20licenses','guards','listen','OKDBUniqueConstraintError','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','cookies','quit','[body]','OKDBTypeNotRegisteredError','56898iirYDc','ms\x20busy=','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','filter','verifyCookie','commitP99Ms','HTTP_','instances','\x20(okdb\x20','hint','\x20result','\x20\x20\x20\x20features:\x20\x20','noRepl','decodeActivationToken','\x1b[33m','update',',\x20got\x20','library\x20(okdb\x20node-model\x202.0).\x20For\x20multi-process\x20HTTP\x20serving\x20use\x20the\x20okdb\x20','[okdb]\x20invalid\x20port:\x20','der','resume','Events','details','\x1b[90m','--no-admin','\x0a\x20\x20okdb\x20doctor\x0a','split','Views','decommission','mkdirSync','sync','access','alloc','\x20@\x20','_shouldWrapResponse','alg','ref:violation','SERVICE_UNAVAILABLE','extend','schema','processors/','\x22\x20resolves\x20outside\x20the\x20backup\x20root\x20\x22','_singletonLocks','sizeBefore','api','cluster',':\x20expected\x20','disconnect','_authOptions','fts','[okdb]\x20preserved:\x20','\x20<path>\x20[json-body]','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','_fetchJwks','\x0a[okdb]\x20received\x20','revoke','usage:\x20okdb\x20restore\x20<backup-dir>\x20--path\x20<target-data-dir>','removeNode','flushDebounce','Token\x20must\x20be\x20a\x20JWT','\x1b[0m','processor:error','Content-Type','info','importBlobs','_onProcEvent','\x20opening\x20','\x20files)','\x20\x20(licensee:\x20','search:query','SYSTEM_STOPPED','[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping','cpuPct','\x22\x20→\x20','readMs','node:perf_hooks','\x20entries\x20in\x20','withPoolHold','OKDBInvalidIndexKeyError','lost','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','setSchema','forEach','\x20parkedNow=','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','\x20\x20✓\x20Removed\x20license\x20','shm-gc:\x20unknown\x20argument\x20','issueToken','middlewares','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','Read','Sync','POST','isBusy','current','closeIdleConnections','token_endpoint','\x20to\x20quit.','./okdb-data','type/','zero_refs','inputSchema','operations','_licenseHash','push','\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a',';\x20Max-Age=','\x20freed','\x0a\x20\x20\x20\x20','[okdb]\x20closed\x20cleanly\x0a','\x20months\x20from\x20issuance)','cause','release','claims','publishChildRow','\x22\x20on\x20\x22','ACTIVATION_EXPIRED','dest','--log-requests','_countFileRefs','--address','shell','envName','processes:\x20','tierList','_enableChangelog','.log','_totalReadMs','[okdb]\x20unknown\x20token\x20action:\x20\x22','issuedAt','label','Release','Access-Control-Request-Headers','noteListenAddr','\x20\x20(need\x20≥\x2018)','_activateProcessesReader','Internal\x20error','lstatSync','hex','INDEX_HAS_CONSUMERS','_sandbox','CONFLICT','--permissions','utf8','node/','functions','required','is\x20invalid','type/users/item/alice','copyFileSync','/dev/shm','halted','[okdb]\x20opening\x20','matched','CHANGEFEED_QUANTUM','byteLength','[okdb]\x20created\x20./okdb-data','data','param','decommissioned','assertLimit','is\x20not\x20allowed','\x20\x20skipped=','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','\x20HTTP\x20workers\x20','Unsupported\x20JWT\x20alg:\x20','licensed','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','isArray','reportThreadStats','\x0a\x20\x20\x20\x20\x20\x20','ttl:expired','server','prompt','Payload\x20too\x20large','http://','SCHEMA_COLLECTION_INVALID','cluster:\x20unavailable\x20(shmbuf\x20native\x20missing)\x20—\x20running\x20single-process','splice','creating','_buildOwnRow','_flushDebounce','BAD_REQUEST','[on|off|level]','raw','isWanted','Enqueue,\x20cancel,\x20retry,\x20remove\x20jobs;\x20manage\x20buckets;\x20reconcile\x20and\x20rebuild\x20stats.','NOT_IMPLEMENTED','item:update','remove','mcp-session-id','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','_buildChildRow','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','help','ms\x20max=','\x1b[34m','red','hash','\x20bytes,\x20need\x20>=\x2065)','null','decommissioning','[okdb-cluster]\x20primary\x20pid=','some','http-server','_lastPublishAt','size','BACKUP_DEST_INSIDE_STORE','dbPath','[okdb]\x20nothing\x20to\x20reset\x20—\x20','SWAP','running','isBuffer','config\x20file\x20invalid:\x20','\x20│\x20','dead','abs','\x20HTTP\x20workers,\x20each\x20serves\x20+\x20processes)','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','\x20statusEnv=','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','\x20tokens:','isSystem','Version\x20mismatch\x20for\x20','\x20(slot=','function','bootstrapBlocked','[res]\x20','once','authMode','_outstanding','\x22\x20in\x20env\x20\x22','platform','blobs','JWT\x20not\x20yet\x20valid','reason','_supervisorKey','_released','signature','indexOf','\x0a\x20\x20No\x20routes\x20matching\x20\x22','\x20(durable\x20desired-state)','REMOVE','parseInt','_writer','hasCanonical','Background\x20job\x20queue:\x20enqueue\x20work,\x20observe\x20state,\x20and\x20process\x20jobs.','run','CREATED','noCluster','mode','_instanceId','req','_lookupByName','\x20uses\x20raw\x20bodyMode\x20without\x20addRaw/raw\x20route\x20metadata','stop\x20every\x20okdb\x20process\x20on\x20this\x20path\x20and\x20run\x20`okdb\x20shm-gc`.','holder','type/users\x20--help','\x20\x20→\x20\x20','cookieName','randomUUID','operation','listening','hasLimit','Indexes','change','license','engines','length','candidatesLegacyNamed','\x20\x20✓\x20Revoked\x20token\x20','slotKey','matcher','mcp','unlinkSync','created','paused','compaction','send','\x20license\x20—\x20no\x20activation\x20needed)','isAuthenticated','cyan','offWindow',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','_getType','allowMethods','_onPoke','other','_onItem','valid','_collectWriterFacet','_ensureDesired','OKDB_HTTP_WORKERS','caps','content-length','draining','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','--label','procmode/','isHeld','workersFlag','Blob\x20file\x20missing\x20for\x20~files\x20record\x20\x22','GATEWAY_TIMEOUT','[okdb]\x20import\x20complete','\x1b[31m','--config','schema:drop','resetIndex','LICENSED_BUILD','call','\x20phase=','cf-ray',';\x20Max-Age=0;\x20Expires=Thu,\x2001\x20Jan\x201970\x2000:00:00\x20GMT','ensureType','parts','createHash','fts:registered','https','Forbidden','\x20worker(s)\x20still\x20serving','field:resolver_registered','okdb-backup-','process','_heartbeatInFlight','\x20does\x20not\x20exist','jwk','createInterface','_wantDbOf','\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','writeUInt16BE','env/:env','readUInt8','internalOnly','Operator\x20surface:\x20server\x20info,\x20logs,\x20event\x20streams,\x20processor\x20status,\x20backups.','tryAcquire','setTtl','version','\x20\x20Common\x20causes:','\x20active\x20env:\x20','unique:violation','\x20worker','statusCode','singletonClaims','default','add','[okdb]\x20shutdown\x20drain\x20exceeded\x203000ms\x20—\x20hard-exiting\x0a','query.','\x20has\x20canonical\x20metadata\x20but\x20missing\x20valid\x20inputSchema','DELETE','records','bold','\x20\x20\x20\x20\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/','_desired','\x20size,\x20','\x22\x20has\x20been\x20retiring\x20for\x20','config','(workers\x20can\x27t\x20share\x20the\x20cross-process\x20HLC/clock).\x20Forcing\x20single-process\x20(was\x20','drop','_totalWriteMs','views','oldestPendingMs','authRequired','x-forwarded-for','Run','_activateProcesses','\x20\x20\x20\x20port:\x20\x20','isFinite','argv','list','License\x20expired\x20or\x20invalidated','\x20more)','green','VERSION_MISMATCH','\x20records…','\x22\x20(hash:\x20','\x20\x20⚠','[okdb-cluster]\x20slot=','.kdb_history','_lockDb','stdin','\x20\x20\x20http://localhost:','stopHeartbeat','processing','notOkdbShaped','identity',':\x20connected\x0a\x0a','type/users','putNode','May\x20write\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20write\x20permission.','replace','uptime','readFileSync','toUpperCase','host','read','search','\x27\x20is\x20already\x20registered','\x20\x20✓\x20OKDB\x20server\x20running','authorizationUrl','geo',').\x20If\x20none\x20of\x20them\x20runs\x20okdb,\x20pass\x20--force;\x20','errors','net','_clusterOrphanWatch','maxWrites','_userPhase','(null)','--log-level','types','_log','isWorker','ms\x20p99=','\x20has\x20illegal\x20binding\x20target\x20for\x20','startsWith','regex','\x22\x20—\x20pass\x20a\x20path\x20relative\x20to\x20it\x20(configure\x20with\x20the\x20`backup.root`\x20option)','\x20pid=','cluster:','bindings','Environments','kill','onRetiring','[okdb]\x20imported\x20\x20types=','all','audiences','\x20has\x20ambiguous\x20binding\x20for\x20query\x20field:\x20','okdb-writer:\x20env\x20closing\x20—\x20retry','_lock','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','processors','OPTIONS','\x20\x20\x20\x20\x20\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','listLicenses','_totalErrors','closeSync','backup\x20destination\x20\x22','\x20\x20note:\x20','isInteger','quantum','flushed','Work','Activation\x20invalid:\x20','JWT\x20audience\x20mismatch','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','publishOwnRow','register','close',');\x20','cf-connecting-ip','_selfKey','\x20\x20\x20\x20graceful\x20shutdown\x0a','--key','\x20cf-ray=','Unauthorized','_typeSchema','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','_putRowAsync','epoch','\x20\x20(+\x20time-machine)','_changefeed','store','params.','debug','index:drop','onLicenseExpired','clearCookie','put','Foreign\x20key\x20violation:\x20','array','key','sig','dropExisting','has','external','active:','\x20\x20\x20\x20port:\x20\x20\x20\x20','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','field','xdg-open\x20','\x20\x20\x20\x20usage:\x20\x20\x20','trim','--types','readUInt32BE','derived;\x20rebuilt\x20from\x20source\x20docs\x20on\x20first\x20open\x20of\x20the\x20restored\x20store','\x20\x20unused\x20(deletable)\x20','SIGKILL','participate','reset','/.well-known/openid-configuration','[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument','finish','\x20(dry\x20run)','_bestMatch','reduce','refs','\x20drainAge=','HEAD','importJSON','_put','entry','padEnd','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.','\x1b[35m','--env','\x20\x20\x20\x20writes:\x20\x20\x20\x20','address','types/env=','/\x20quit\x20/\x20Ctrl+C','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','assertFeature','typesPerEnv','EXPIRES','error','--any-size','processKey','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','execArgv','heapUsed','scope','LENGTH_REQUIRED','\x20(must\x20be\x20an\x20integer\x20>=\x201)\x20—\x20using\x201','Shutting\x20down\x20due\x20to\x20license\x20expiry','getCmd','set','License\x20limit\x20exceeded:\x20','Blob\x20on\x20disk\x20has\x20no\x20~files\x20record\x20in\x20any\x20env\x20(hash:\x20','logLevel','__identity','skip\x20','-----BEGIN\x20CERTIFICATE-----\x0a','_matchRoute','ITEM_PENDING','ver','rawBuf','\x20\x20Expected\x20one\x20of:','Auth','_publishFailWarned','\x0d[okdb]\x20','time','uuid','\x20(passive),\x20','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','pin','ephemeral','inflightAgesMs','ENVS','\x20documents\x20fail\x20validation','tokenTtl','updateSupervisedChildStats','processor:progress','--prefix=','BACKUP_DEST_NOT_EMPTY','okdb-license-id:','linux','BACKUP_PATH_OUTSIDE_ROOT','verbose','undefined','node\x20','getDesired','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','\x20logs\x20on\x20\x20','readlinkSync','\x20process(es)\x20that\x20could\x20map\x20these\x20','path',',\x20label:\x20','none','markClosed','ready','view:progress','reap','LICENSE_HASH_MISMATCH','\x20\x20(no\x20env\x20draining)','received\x20','no\x20.kdbconfig\x20(using\x20defaults)','committed','summary','remoteAddress','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','registerFts','cpuUsage','sse','remaining-fields','\x0a\x0a\x20\x20','repeat','must\x20not\x20be\x20null','setOwnMeta','OKDBForeignKeyDeleteError','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','ieee-p1363','~processes:desired','PUB_FINGERPRINT','../okdb','detachConsole','SCHEMA_VALIDATION_FAILED','files','jwksTtlMs','_handlePending','exit','readInt32LE','listAll','pushEphemeral','clockToChangeDb','payload','index:progress','handler','INDEX_REGISTERED','--open',']\x20already\x20maps\x20to\x20\x27','Route\x20',';\x20HttpOnly','hidden','Records\x20inside\x20your\x20types\x20—\x20the\x20actual\x20rows\x20you\x20store.','_highWater','_getOidcDiscovery','writes=','transaction','List\x20functions\x20and\x20inspect\x20their\x20source.','__okdbCluster','body','_closed','INVALID_INDEX_KEY','kid','exportToStream','\x0a\x20\x20✓\x20Token\x20created','_wrapApiResponse','/types\x0a\x20\x20\x20\x20','connection','1083548bETSHj','~licenses','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','\x20\x20\x20\x20status:\x20\x20\x20\x20','uncaughtException','_dispatch','[okdb]\x20error:\x20--password\x20requires\x20--name','standalone','no-cache,\x20no-transform','Examples','invalid','inst:','_license','ITEM_CREATE','_rawDb','Server-side\x20user-defined\x20functions\x20registered\x20per\x20environment.','license:removed','License\x20already\x20stored','closing','options','okdb.http.listen(port)\x20in\x20each\x20worker.','_assertUsable','derivePin','FOREIGN_KEY_VIOLATION','parseBearer','\x20\x20in\x20use\x20(mapped/fd)\x20','restore','_baselines','(?:/(.*))?$','\x20\x20Shell\x20commands','processor:paused','registry\x20publish\x20failing:\x20','node\x20identity','\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','shm-gc','failures','toUTCString','_cmd','~tokens','statSync','ttlMs','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','transport:\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','constructor','fts:drop','LICENSE_FEATURE_DISABLED','\x20\x20(unlimited)','fast','Validation\x20failed:\x20','--path','[okdb]\x20error:\x20','config\x20file\x20valid:\x20','__fts:','rows=','--version','OKDBAlreadyExistsError','threadId','attachFeed',',\x20stopping\x20workers…\x0a','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','Invalid\x20index\x20key\x20type\x20for\x20\x27','outputSchema','_cursors','allocUnsafe','--workers','opendirSync','anySize','password','OKDBForeignKeyError','record','Server\x20is\x20in\x20bootstrap\x20mode\x20and\x20only\x20accepts\x20localhost\x20connections\x20until\x20the\x20first\x20token\x20is\x20created.','\x20day(s).','_isOpen','darwin','activation','The\x20following\x20routes\x20require\x20auth\x20but\x20declare\x20no\x20permission:\x0a\x20\x20','/proc','[req]\x20','_groupByProcess','Bearer\x20','unlinked','_scheduleFlush','expired','_validateOperationRequest',';\x20Path=','--dry-run','allowHeaders','--token','[okdb]\x20invalid\x20config\x20\x22','procmodeack/','listRoutes','sourceKey','\x20SECURITY\x20NOTICE','destroy','\x20\x20⚠\x20\x20','off','prototype','unhandledRejection','openDB','TiB','\x20supervised)','_durs','ppid','Types','start','\x27\x20already\x20registered','[okdb]\x20backup\x20complete','username','\x20(deleting\x20requires\x20--force\x20if\x20none\x20of\x20them\x20is\x20okdb)','free\x20tier','\x0a[okdb]\x20fatal\x20error:','_timer','_startAdmission','\x20(must\x20be\x201–65535)','expiresAt','child_process','_runGuards','INDEX_RESET','_quantum','_publishNow','MAX_POOL_HOLDS','match','Engines','SIGBREAK','system:bus_state_change','BACKUP_MANIFEST','\x20\x20·\x20\x20','_openEnvLazy','scopes','_started','Unknown\x20error','_inflight','licenseHash',':\x20ping\x0a\x0a','_lastCpuAt','processor:ready','candidateAllocated','values','SYNC_COMMITS','copy','blocks','never','otherwise\x20rerun\x20as\x20root.','_sampleOwnStats','compareExchange','\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','allowedAlgs','\x20\x20http://localhost:','\x20bytes','_handlePoke','removeSync','present','inUse','result','makeOkdb','known\x20field','\x20environment\x20','consumeLoginState','_isStale','decodeLicenseBlob','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','\x1b[1m','target\x20','liveThreadStats','_ensure','history','\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','auth=','params.env','ENV','exportJSON','clearThreadStats','No\x20license\x20found\x20matching\x20this\x20activation\x20token','uid','Origin','isConnected','\x27,\x20cannot\x20map\x20to\x20\x27','__writeCounter','getSecurityNotices','\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a','_systemEnv','tags','onMapped','shm\x20segment\x20','unique:violation_resolved','stringify','[okdb]\x20error:\x20failed\x20to\x20read\x20','available','isFeatureEnabled','next','-backups','depth','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','processes','types\x20--env\x20staging','envs','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','~processes:cmd','\x20\x20kept\x20(attached/retiring\x20when\x20retired)\x20','\x20\x20✗\x20','[okdb]\x20reset\x20aborted','\x20(other\x20users;\x20cannot\x20map\x200600\x20segments)','validateBlobIntegrity','issuer','object','_rotateBucket','_held','\x20which\x20does\x20not\x20exist','_allEnvsWithFiles','registry\x20heartbeat\x20skipped\x20(writer=','No\x20tokens.','category','okdbVersion','sync-node','features','maxAge','typesDb','access-control-max-age','fanout','segmentNameFor:\x20canonicalPath\x20must\x20be\x20a\x20non-empty\x20string','PUBLIC_KEY_PEM',':\x20mapped\x20','message','instanceId','\x20MB)','floor','\x20\x20\x20\x20\x20http://localhost:',')\x20to\x20your\x20license\x20vendor.','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','stack','hdr','cpSync','_drain','\x22\x20is\x20inside\x20the\x20store\x20\x22','\x20\x20#','2.6.0','_adminRelay','GiB','_versionSkewWarned','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','type/users/item/alice\x20--env\x20staging','EADDRINUSE','\x20\x20✓\x20','\x20/\x20','logs','item:remove','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','children','onWindow','transport','LICENSE_INVALID','audience','ttl','OKDB_CODE_TO_HTTP_STATUS','ITEM_UPDATE','id:\x20','\x20\x20env=','stats','licenseType','_totalWrites','payload-or-self','rss','\x20\x20\x20\x20\x20\x20\x20','time-machine','keys/public.pem','rowKey','ES256','revived','[env]','12UGDXxs','clusterWorkers','PIN','catch','system','ms\x0a','drain','QUIT','entries','relative','_onPending','\x20lived\x20outside\x20the\x20store\x20at\x20','MALFORMED_TOKEN','\x22\x20(must\x20be\x20debug|info|warn|error)','connected','clearTtl','\x20\x20Writes:\x20\x20','_nodeDbCache','_markSeen','verifySignature','processor:retry','[okdb]\x20warning:\x20could\x20not\x20read\x20node\x20identity/licenses\x20before\x20reset\x20(','confirm','online','url','OKDBIndexHasConsumersError','starting','\x20sync','migrations','header','origin','token_use','setHeader','Invalid\x20token','ms\x20env=','UNPROCESSABLE_ENTITY','\x20\x20Tier:\x20\x20\x20\x20','ENV_CLOSING_RETRY','servers','~processes','busy','standard','ms\x20mean=','assign','charCodeAt','types:','_admissionTimer','\x20in\x20','_lastCpuPct','613180HYVslG','sha256','OKDBVersionMismatchError','\x22\x20is\x20not\x20empty\x20—\x20backups\x20never\x20overwrite;\x20choose\x20a\x20new\x20directory','\x20has\x20unbound\x20input\x20fields\x20with\x20bodyMode:none:\x20','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','_envs','queue-worker','Machine-to-machine\x20cluster\x20protocol\x20(join\x20handshake,\x20replication\x20channel,\x20traffic).\x20Grant\x20only\x20to\x20peer\x20nodes\x20—\x20not\x20to\x20humans.','[okdb]\x20warning:\x20failed\x20to\x20restore\x20identity/licenses\x20after\x20reset:\x20','-tmp-','respawnTimer','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','--no-cluster','VERB','_pendingLocal','\x20\x20\x20\x20path:\x20\x20','[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping','_putRowSync','ftruncateSync','Blob\x20ref-count\x20is\x20zero\x20for\x20~files\x20record\x20\x22','fts:reset','_active','isAbsolute','Functions','KiB','grants','uri','resetReadTxn','3816MzJaug','Cannot\x20delete\x20','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','\x0a\x20\x20✓\x20License\x20activated','stream','~system','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','_bpParkedTotal','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','/type/users\x0a\x20\x20\x20\x20','fromEntries','type','getClock','_statusEnv','7820491USXovf','FTS_REGISTERED','digest','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','ingest','_windowCbs','_isFree','_acquiredAt','targetType','getuid','level','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','%),\x20','route','getKeys','_threadStats','_lastCpuWindowMs','feed:','query','createServer','primaryOkdb','dryRun','logRequests','PATCH','_isReader','ttl:clear','max','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/envs\x0a\x20\x20\x20\x20','node','System','from','methods','gate','reverse','\x20\x20(name:\x20','[okdb]\x20created\x20.kdbconfig','ESRCH','Processors','startedAt','basename','_collectSingletonClaims','_jwksCache','\x20\x20\x20\x20api:\x20\x20\x20\x20\x20http://localhost:','bus:type_drop','exp','precision','_computeStatus','files\x20feature\x20not\x20available','\x20log\x20level:\x20','\x20(+','--new-identity','event:\x20','system:proc','warn','Files','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','\x20(deleted)','afterWrite','embeddings','count','Invalid\x20license\x20blob:\x20','number','fields','\x20is\x20not\x20empty\x20—\x20restore\x20only\x20into\x20a\x20new\x20or\x20empty\x20directory','metrics','/api/','127.0.0.1','\x20\x20not\x20okdb-shaped\x20\x20\x20\x20','padStart','threads','changes','shmbuf/package.json','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','nbf','blob\x20status\x20db\x20not\x20available','flatMap','every','event','_enqueuedAt','cpuWindowMs','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','ceil','--inspect','lmdb','_runMiddlewares','_coordinator','comm','[okdb]\x20close\x20error:\x20','_lastCpuUsage','writerStatus','\x20already\x20in\x20use','INVALID_VALUE','geoConfig','JWT\x20is\x20missing\x20kid','_sockets','\x20\x20\x20\x20limits:\x20\x20\x20\x20','deletedAllocated','128487XHQvmC','Register,\x20update,\x20and\x20delete\x20function\x20definitions.','createHmac','item:create','tmp','keys','_nestedWarned','_loginStates','\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20(','blindCommands','deaths','verify','--no-repl','isDirectory','Not\x20Found','Gate\x20flag\x20required\x20to\x20touch\x20system\x20types\x20(those\x20whose\x20name\x20starts\x20with\x20\x22~\x22).\x20Combined\x20with\x20the\x20underlying\x20namespace\x20permission.','listNodes','_wantDbHandle','SYSTEM_POKE','ms\x20(pid\x20','writes','ms\x20activeWriters=','authorization','~blobs','decoded','scrypt','\x1b[37m','references','response','SYSTEM_PROC','heapTotal','_blobPath','.kdbconfig','_seen'];_0x166e=function(){return _0x4a4ee1;};return _0x166e();}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x13c5b4=_0x3d20e4;if(hasRequiredOkdbWriter)return okdbWriter[_0x13c5b4(0x71d)];hasRequiredOkdbWriter=0x1;const {performance:_0x28955f}=require$$0$5,_0x4369fd=requireOkdbDiag(),_0x1ea970=process.env.OKDB_COMMIT_MODE===_0x13c5b4(0x2ae);class _0x130396{constructor(_0x387347){const _0x53e5e3=_0x13c5b4;this['env']=_0x387347,this['_inflight']=new Set(),this[_0x53e5e3(0x6c0)]=new Map(),this[_0x53e5e3(0x208)]=0x0,this[_0x53e5e3(0x56d)]=[],this['_done']=[],this[_0x53e5e3(0x4f6)]=Math[_0x53e5e3(0x68c)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this['_outstanding']=0x0,this[_0x53e5e3(0x180)]=[],this[_0x53e5e3(0x66b)]=0x0,this[_0x53e5e3(0x5d6)]=null,this[_0x53e5e3(0x75c)]=0x0,this[_0x53e5e3(0x27c)]=0x0,this[_0x53e5e3(0x6d9)]=![];}async['transaction'](_0x517c7f,_0x1a8c5c,{admitted:admitted=![]}={}){const _0x51ce03=_0x13c5b4;if(_0x4369fd[_0x51ce03(0x176)]())_0x4369fd[_0x51ce03(0xa3)](this['env']?.[_0x51ce03(0x707)],_0x1a8c5c);if(this[_0x51ce03(0x4fd)]){const _0x170d2c=new Error(_0x51ce03(0x43b));_0x170d2c[_0x51ce03(0x25b)]=_0x51ce03(0x63a);throw _0x170d2c;}if(this[_0x51ce03(0x4f6)]>0x0){let _0xcb353d=![];while(this[_0x51ce03(0x377)]>=this[_0x51ce03(0x4f6)]&&!this[_0x51ce03(0x4fd)]){!_0xcb353d&&(_0xcb353d=!![],this[_0x51ce03(0x66b)]++),await new Promise(_0x5d37c0=>this['_bpWaiters'][_0x51ce03(0x2f9)](_0x5d37c0));}if(this[_0x51ce03(0x4fd)]){const _0x249a0d=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x249a0d[_0x51ce03(0x25b)]=_0x51ce03(0x63a);throw _0x249a0d;}}this['_outstanding']++;const _0x38d8cd=admitted?null:this[_0x51ce03(0x124)][_0x51ce03(0x6c7)];for(;;){while(this['_held'])await this[_0x51ce03(0x5d6)];if(_0x38d8cd)try{await _0x38d8cd[_0x51ce03(0xf4)]();}catch(_0x735dc){this[_0x51ce03(0x377)]--;if(this['_bpWaiters']['length']&&this[_0x51ce03(0x377)]<this[_0x51ce03(0x4f6)])this['_bpWaiters']['shift']()();throw _0x735dc;}if(!this[_0x51ce03(0x5d6)])break;if(_0x38d8cd)_0x38d8cd[_0x51ce03(0x6ab)]();}if(this['_closed']){if(_0x38d8cd)_0x38d8cd[_0x51ce03(0x6ab)]();this['_outstanding']--;if(this['_bpWaiters'][_0x51ce03(0x39d)]&&this[_0x51ce03(0x377)]<this[_0x51ce03(0x4f6)])this[_0x51ce03(0x180)][_0x51ce03(0xfa)]()();const _0x3d5627=new Error(_0x51ce03(0x43b));_0x3d5627['code']=_0x51ce03(0x63a);throw _0x3d5627;}const _0x1c8c9d=_0x28955f[_0x51ce03(0x127)]();if(_0x1ea970)try{const _0x4f0886=this[_0x51ce03(0x124)]['db']['transactionSync'](_0x517c7f);this[_0x51ce03(0x208)]++;if(this[_0x51ce03(0x56d)][_0x51ce03(0x2f9)](_0x28955f[_0x51ce03(0x127)]()-_0x1c8c9d)>0x100)this[_0x51ce03(0x56d)][_0x51ce03(0xfa)]();if(this[_0x51ce03(0x7a)]['push'](_0x28955f[_0x51ce03(0x127)]())>0x800)this[_0x51ce03(0x7a)][_0x51ce03(0xfa)]();return _0x4f0886;}finally{this[_0x51ce03(0x377)]--;if(this[_0x51ce03(0x180)][_0x51ce03(0x39d)]&&this[_0x51ce03(0x377)]<this[_0x51ce03(0x4f6)])this[_0x51ce03(0x180)][_0x51ce03(0xfa)]()();if(_0x38d8cd)_0x38d8cd[_0x51ce03(0x6ab)]();}let _0x5286e7=null;const _0xc90c00=()=>{const _0x241db4=_0x51ce03,_0x31c276=_0x517c7f();if(_0x31c276&&typeof _0x31c276['then']===_0x241db4(0x372)&&!_0x5286e7){this[_0x241db4(0x75c)]++;let _0x43c9ea;const _0x2d1eb6=new Promise(_0x2c0eca=>_0x43c9ea=_0x2c0eca);this[_0x241db4(0x5d6)]=_0x2d1eb6,_0x5286e7=()=>{const _0x559d68=_0x241db4;if(this[_0x559d68(0x5d6)]===_0x2d1eb6)this[_0x559d68(0x5d6)]=null;_0x43c9ea();};}return _0x31c276;};let _0x257ba3;try{_0x257ba3=this[_0x51ce03(0x124)]['db'][_0x51ce03(0x263)](_0xc90c00);}catch(_0x1dd900){_0x257ba3=Promise['reject'](_0x1dd900);}(!_0x257ba3||typeof _0x257ba3['then']!==_0x51ce03(0x372))&&(this[_0x51ce03(0x27c)]++,!this[_0x51ce03(0x6d9)]&&(this[_0x51ce03(0x6d9)]=!![],console[_0x51ce03(0x6a7)](_0x51ce03(0x73a)+(this['env']?.[_0x51ce03(0x707)]??'?')+_0x51ce03(0x3ac))),_0x257ba3=Promise['resolve'](_0x257ba3));const _0x3fa521=()=>{if(_0x5286e7)_0x5286e7();};_0x257ba3[_0x51ce03(0xad)](_0x3fa521,_0x3fa521),this['_inflight'][_0x51ce03(0x3e9)](_0x257ba3),this[_0x51ce03(0x6c0)]['set'](_0x257ba3,_0x1c8c9d);const _0x33c997=()=>{const _0x550dbb=_0x51ce03;this['_inflight'][_0x550dbb(0x95)](_0x257ba3),this[_0x550dbb(0x6c0)]['delete'](_0x257ba3),this[_0x550dbb(0x208)]++,this[_0x550dbb(0x377)]--;this[_0x550dbb(0x180)]['length']&&this[_0x550dbb(0x377)]<this[_0x550dbb(0x4f6)]&&this[_0x550dbb(0x180)][_0x550dbb(0xfa)]()();if(this[_0x550dbb(0x56d)][_0x550dbb(0x2f9)](_0x28955f[_0x550dbb(0x127)]()-_0x1c8c9d)>0x100)this[_0x550dbb(0x56d)]['shift']();if(this[_0x550dbb(0x7a)]['push'](_0x28955f['now']())>0x800)this[_0x550dbb(0x7a)][_0x550dbb(0xfa)]();};_0x257ba3['then'](_0x33c997,_0x33c997);try{return await _0x257ba3;}finally{if(_0x38d8cd)_0x38d8cd[_0x51ce03(0x6ab)]();}}['status'](){const _0x1c9a31=_0x13c5b4,_0x2c709b=_0x28955f[_0x1c9a31(0x127)]();let _0x42882b=0x0;for(const _0x38e7f2 of this['_enqueuedAt']['values']()){const _0xe06ab3=_0x2c709b-_0x38e7f2;if(_0xe06ab3>_0x42882b)_0x42882b=_0xe06ab3;}let _0x4de4ba=0x0;for(let _0x4e0d27=this['_done'][_0x1c9a31(0x39d)]-0x1;_0x4e0d27>=0x0;_0x4e0d27--){if(_0x2c709b-this[_0x1c9a31(0x7a)][_0x4e0d27]>0x3e8)break;_0x4de4ba++;}let _0x1499f9=0x0;if(this[_0x1c9a31(0x56d)][_0x1c9a31(0x39d)]){const _0x2cf4f8=[...this['_durs']]['sort']((_0x5aa859,_0x19af29)=>_0x5aa859-_0x19af29);_0x1499f9=_0x2cf4f8[Math[_0x1c9a31(0x268)](_0x2cf4f8[_0x1c9a31(0x39d)]-0x1,Math[_0x1c9a31(0x5e9)](_0x2cf4f8[_0x1c9a31(0x39d)]*0.99))];}return{'depth':this[_0x1c9a31(0x58b)][_0x1c9a31(0x35f)],'oldestPendingMs':Math['round'](_0x42882b),'committed':this['_committed'],'commitsPerSec':_0x4de4ba,'commitP99Ms':Math[_0x1c9a31(0x139)](_0x1499f9),'parkedNow':this[_0x1c9a31(0x180)]['length'],'parkedTotal':this[_0x1c9a31(0x66b)],'highWater':this[_0x1c9a31(0x4f6)]};}[_0x13c5b4(0x4b2)](){const _0x33adf2=_0x13c5b4,_0x5e22da=_0x28955f[_0x33adf2(0x127)]();return[...this['_enqueuedAt'][_0x33adf2(0x591)]()][_0x33adf2(0x757)](_0x5e19b9=>Math[_0x33adf2(0x139)](_0x5e22da-_0x5e19b9))[_0x33adf2(0x774)]((_0x43b681,_0x5a5d38)=>_0x5a5d38-_0x43b681);}[_0x13c5b4(0x4c8)](){const _0x1db940=_0x13c5b4;this[_0x1db940(0x4fd)]=!![];for(const _0xa4757d of this[_0x1db940(0x180)][_0x1db940(0x343)](0x0))_0xa4757d();}async['drain'](){const _0x58fcc2=_0x13c5b4;let _0x41c7ab=0x0;while(this[_0x58fcc2(0x58b)][_0x58fcc2(0x35f)]&&_0x41c7ab++<0x3e8){await Promise[_0x58fcc2(0xf0)]([...this['_inflight']]);}}async[_0x13c5b4(0x463)](_0x530fcb,_0x3e2153,_0x37649b,_0xee0e0a){const _0xf883cb=_0x13c5b4;return this[_0xf883cb(0x4f9)](()=>{const _0x39b856=_0xf883cb;if(_0xee0e0a===undefined)_0x530fcb['putSync'](_0x3e2153,_0x37649b);else _0x530fcb[_0x39b856(0x16c)](_0x3e2153,_0x37649b,_0xee0e0a);},'raw-put');}async[_0x13c5b4(0x34e)](_0x36edcc,_0x5c7dbf){const _0x277d02=_0x13c5b4;return this[_0x277d02(0x4f9)](()=>_0x36edcc[_0x277d02(0x59e)](_0x5c7dbf),'raw-remove');}}async function _0x530c1e(_0x17df84,_0x4acf37){const _0x10e5c4=_0x13c5b4;if(_0x4acf37==null)_0x4acf37=Math[_0x10e5c4(0x68c)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x35b649=_0x17df84?.[_0x10e5c4(0x448)];if(!_0x35b649||typeof _0x35b649[_0x10e5c4(0xad)]!==_0x10e5c4(0x372))return;await Promise[_0x10e5c4(0x214)]([Promise[_0x10e5c4(0x738)](_0x35b649)['catch'](()=>{}),new Promise(_0x5be166=>{const _0x48ec10=_0x10e5c4,_0x377b77=setTimeout(_0x5be166,_0x4acf37);if(_0x377b77[_0x48ec10(0xe9)])_0x377b77[_0x48ec10(0xe9)]();})]);}catch{}}function _0x3a73e0(_0x200cad){const _0x43b46e=_0x13c5b4;if(_0x1ea970)return Promise[_0x43b46e(0x738)]();const _0x1522a4=_0x200cad?.[_0x43b46e(0x4d0)];return _0x1522a4&&typeof _0x1522a4[_0x43b46e(0xad)]===_0x43b46e(0x372)?_0x1522a4:Promise[_0x43b46e(0x738)]();}const _0x1cd804=Math[_0x13c5b4(0x68c)](0x1,Math[_0x13c5b4(0x5e9)](Number(process.env.UV_THREADPOOL_SIZE))||0x4),_0x450731=Math[_0x13c5b4(0x68c)](0x1,_0x1cd804-0x2);let _0x632bd=0x0;const _0x3f543b=[];async function _0x5cae7c(_0x39cb2c){const _0x25f72f=_0x13c5b4;if(_0x632bd<_0x450731)_0x632bd++;else await new Promise(_0x1eddf4=>_0x3f543b['push'](_0x1eddf4));try{return await _0x39cb2c();}finally{const _0x4b2ebc=_0x3f543b[_0x25f72f(0xfa)]();if(_0x4b2ebc)_0x4b2ebc();else _0x632bd--;}}return okdbWriter[_0x13c5b4(0x71d)]=_0x130396,okdbWriter[_0x13c5b4(0x71d)][_0x13c5b4(0x2dd)]=_0x5cae7c,okdbWriter[_0x13c5b4(0x71d)][_0x13c5b4(0x580)]=_0x450731,okdbWriter[_0x13c5b4(0x71d)]['flushLmdb']=_0x530c1e,okdbWriter[_0x13c5b4(0x71d)]['committed']=_0x3a73e0,okdbWriter[_0x13c5b4(0x71d)][_0x13c5b4(0x592)]=_0x1ea970,okdbWriter[_0x13c5b4(0x71d)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x2946ee=_0x3d20e4;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x51ec14=require$$0,{SYNC_COMMITS:_0x25a7b8}=requireOkdbWriter(),_0x3caa46=_0x2946ee(0x235);class _0x2aa42c{constructor(_0x449be6,_0x985e73,_0x58e838){const _0x1a57de=_0x2946ee;this[_0x1a57de(0x43c)]=_0x449be6,this['_key']=_0x985e73,this[_0x1a57de(0x679)]=_0x58e838,this['_released']=![],this['_heartbeatTimer']=null,this[_0x1a57de(0x3d4)]=null;}[_0x2946ee(0x3bc)](){const _0x4fae50=_0x2946ee;if(this[_0x4fae50(0x37e)])return![];try{const _0x5d2619=this['_lock']['_db']()['get'](this[_0x4fae50(0xd7)]);if(!_0x5d2619||_0x5d2619[_0x4fae50(0x781)]!==this[_0x4fae50(0x679)])return![];const _0x24fad7=_0x5d2619[_0x4fae50(0x75f)]??_0x5d2619[_0x4fae50(0x781)];if(_0x24fad7+_0x5d2619[_0x4fae50(0x52e)]<Date[_0x4fae50(0x127)]())return![];return!![];}catch{return!this[_0x4fae50(0x37e)];}}[_0x2946ee(0x391)](){const _0x3cf293=_0x2946ee;if(this[_0x3cf293(0x37e)])return null;try{return this[_0x3cf293(0x43c)][_0x3cf293(0x262)]()[_0x3cf293(0x6a)](this[_0x3cf293(0xd7)])??null;}catch{return null;}}async[_0x2946ee(0x2b6)](_0x4e8439){const _0x1d3d48=_0x2946ee;if(this['_released'])return;try{if(this[_0x1d3d48(0x43c)]['_closed']())return;const _0x160d22=this['_lock'][_0x1d3d48(0x262)]()[_0x1d3d48(0x6a)](this[_0x1d3d48(0xd7)]);if(!_0x160d22||_0x160d22[_0x1d3d48(0x781)]!==this[_0x1d3d48(0x679)])return;if(_0x25a7b8)this[_0x1d3d48(0x43c)]['_db']()[_0x1d3d48(0x16c)](this['_key'],{..._0x160d22,'ttlMs':_0x160d22['ttlMs']+_0x4e8439});else await this[_0x1d3d48(0x43c)]['_db']()[_0x1d3d48(0x463)](this[_0x1d3d48(0xd7)],{..._0x160d22,'ttlMs':_0x160d22[_0x1d3d48(0x52e)]+_0x4e8439});}catch{}}async[_0x2946ee(0x301)](){const _0x5d83b1=_0x2946ee;if(this[_0x5d83b1(0x37e)])return;if(this[_0x5d83b1(0x3d4)])try{await this['_heartbeatInFlight'];}catch{}clearInterval(this[_0x5d83b1(0x1da)]),this['_heartbeatTimer']=null,this[_0x5d83b1(0x37e)]=!![];try{if(this['_lock'][_0x5d83b1(0x4fd)]())return;const _0x2663f7=this[_0x5d83b1(0x43c)]['_db']()['get'](this[_0x5d83b1(0xd7)]);if(_0x2663f7&&_0x2663f7[_0x5d83b1(0x781)]===this[_0x5d83b1(0x679)]){if(_0x25a7b8)this[_0x5d83b1(0x43c)]['_db']()[_0x5d83b1(0x59e)](this[_0x5d83b1(0xd7)]);else await this[_0x5d83b1(0x43c)][_0x5d83b1(0x262)]()[_0x5d83b1(0x34e)](this[_0x5d83b1(0xd7)]);}}catch{}}['_startHeartbeat'](_0x3da7ff,_0x5a617f){const _0x6b8d64=_0x2946ee,_0x24ea3b=_0x5a617f??Math[_0x6b8d64(0x5e9)](_0x3da7ff/0x3);this['_heartbeatTimer']=setInterval(()=>{const _0x1299d8=_0x6b8d64;if(this[_0x1299d8(0x37e)])return;this[_0x1299d8(0x3d4)]=((async()=>{const _0x40a78d=_0x1299d8;try{if(this['_lock']['_closed']())return;const _0x29dda7=this[_0x40a78d(0x43c)][_0x40a78d(0x262)]()['get'](this[_0x40a78d(0xd7)]);if(!_0x29dda7||_0x29dda7[_0x40a78d(0x781)]!==this['_acquiredAt']){this[_0x40a78d(0x37e)]=!![],clearInterval(this[_0x40a78d(0x1da)]),this['_heartbeatTimer']=null;return;}if(_0x25a7b8)this[_0x40a78d(0x43c)][_0x40a78d(0x262)]()[_0x40a78d(0x16c)](this[_0x40a78d(0xd7)],{..._0x29dda7,'updatedAt':Date[_0x40a78d(0x127)]()});else await this['_lock'][_0x40a78d(0x262)]()[_0x40a78d(0x463)](this[_0x40a78d(0xd7)],{..._0x29dda7,'updatedAt':Date[_0x40a78d(0x127)]()});}catch{}this[_0x40a78d(0x3d4)]=null;})());},_0x24ea3b);if(this[_0x6b8d64(0x1da)][_0x6b8d64(0xe9)])this[_0x6b8d64(0x1da)][_0x6b8d64(0xe9)]();}}class _0xf34329{constructor(_0x433b27,{namespace:_0x35e923,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x59aa01=_0x2946ee;this[_0x59aa01(0x513)]=_0x433b27,this[_0x59aa01(0x253)]=_0x35e923,this['ttlMs']=ttlMs,this['heartbeatMs']=heartbeatMs,this[_0x59aa01(0x40b)]=null;}[_0x2946ee(0x262)](){const _0x206f69=_0x2946ee;return this[_0x206f69(0x51a)](),(!this[_0x206f69(0x40b)]||this['_lockDbOf']!==this[_0x206f69(0x513)])&&(this[_0x206f69(0x40b)]=this['_rawDb'][_0x206f69(0x56a)](_0x3caa46,{'dupSort':![]}),this[_0x206f69(0x96)]=this[_0x206f69(0x513)]),this['_lockDb'];}[_0x2946ee(0x1f0)](){const _0x359b08=_0x2946ee;return this[_0x359b08(0x51a)](),(!this[_0x359b08(0x6e4)]||this[_0x359b08(0x3d8)]!==this[_0x359b08(0x513)])&&(this[_0x359b08(0x6e4)]=this['_rawDb']['openDB'](_0x3caa46+_0x359b08(0x23e),{'dupSort':![]}),this[_0x359b08(0x3d8)]=this['_rawDb']),this[_0x359b08(0x6e4)];}[_0x2946ee(0x4fd)](){const _0x4b7f99=_0x2946ee,_0x2c8a71=this[_0x4b7f99(0x513)]?.[_0x4b7f99(0x170)];return _0x2c8a71===_0x4b7f99(0x517)||_0x2c8a71===_0x4b7f99(0x16f);}[_0x2946ee(0x51a)](){if(this['_closed']())throw new Error('okdb-lock:\x20env\x20closed');}[_0x2946ee(0xd7)](_0x320091){const _0x9577b4=_0x2946ee;return this[_0x9577b4(0x253)]+':'+_0x320091;}[_0x2946ee(0x167)](_0x38758a){const _0xe5d16e=_0x2946ee;try{if(this[_0xe5d16e(0x4fd)]())return;_0x25a7b8?this[_0xe5d16e(0x1f0)]()[_0xe5d16e(0x16c)](this[_0xe5d16e(0xd7)](_0x38758a),Date['now']()):this[_0xe5d16e(0x1f0)]()[_0xe5d16e(0x463)](this[_0xe5d16e(0xd7)](_0x38758a),Date[_0xe5d16e(0x127)]())?.[_0xe5d16e(0x618)]?.(()=>{});}catch{}}[_0x2946ee(0x34a)](_0x32b793,_0x1ca333=0x3e8){const _0x4545e9=_0x2946ee;try{const _0x11b37c=this[_0x4545e9(0x1f0)]()[_0x4545e9(0x6a)](this[_0x4545e9(0xd7)](_0x32b793));return typeof _0x11b37c===_0x4545e9(0x6af)&&Date['now']()-_0x11b37c<_0x1ca333;}catch{return![];}}[_0x2946ee(0x5a6)](_0x29182d){const _0x2dcbc3=_0x2946ee,_0x34051e=_0x29182d['updatedAt']??_0x29182d[_0x2dcbc3(0x781)];return _0x34051e+_0x29182d['ttlMs']<Date[_0x2dcbc3(0x127)]();}static['_holderDead'](_0x2bb296){const _0x5d8ae6=_0x2946ee,_0x3651eb=_0x2bb296?.[_0x5d8ae6(0x391)];if(!_0x3651eb||typeof _0x3651eb[_0x5d8ae6(0xee)]!==_0x5d8ae6(0x6af))return![];if(_0x3651eb[_0x5d8ae6(0x24f)]!==_0x51ec14[_0x5d8ae6(0x24f)]())return![];if(_0x3651eb['pid']===process['pid'])return![];try{return process[_0x5d8ae6(0x435)](_0x3651eb[_0x5d8ae6(0xee)],0x0),![];}catch(_0xd13a2b){return _0xd13a2b[_0x5d8ae6(0x25b)]===_0x5d8ae6(0x696);}}async[_0x2946ee(0x3df)](_0x8b6bbe,_0x3ff246={},_0x584968={}){const _0x99e604=_0x2946ee,_0x32fd77=this[_0x99e604(0xd7)](_0x8b6bbe),_0x280f58=_0x584968[_0x99e604(0x52e)]??this[_0x99e604(0x52e)],_0x5a2092=Date[_0x99e604(0x127)](),_0x5b6507={'holder':{'pid':process['pid'],'hostname':_0x51ec14['hostname'](),..._0x3ff246},'acquiredAt':_0x5a2092,'updatedAt':_0x5a2092,'ttlMs':_0x280f58};let _0x347aa4=![],_0x6f3a9b=null;if(this[_0x99e604(0x4fd)]())return{'acquired':![],'handle':null,'current':null};try{const _0x52b943=()=>{const _0x21d557=_0x99e604,_0x2b18bc=this[_0x21d557(0x262)]()[_0x21d557(0x6a)](_0x32fd77);if(_0x2b18bc&&!this[_0x21d557(0x5a6)](_0x2b18bc)&&!_0xf34329['_holderDead'](_0x2b18bc)){const _0x19ea73=_0x3ff246['processorId']!=null&&_0x2b18bc[_0x21d557(0x391)]['pid']===process[_0x21d557(0xee)]&&_0x2b18bc['holder']['processorId']===_0x3ff246[_0x21d557(0x285)];if(!_0x19ea73){_0x347aa4=![],_0x6f3a9b=_0x2b18bc;return;}_0x5b6507[_0x21d557(0x781)]<=_0x2b18bc[_0x21d557(0x781)]&&(_0x5b6507[_0x21d557(0x781)]=_0x2b18bc[_0x21d557(0x781)]+0x1,_0x5b6507[_0x21d557(0x75f)]=_0x5b6507[_0x21d557(0x781)]);}this['_db']()['put'](_0x32fd77,_0x5b6507),_0x347aa4=!![],_0x6f3a9b=_0x5b6507;};if(_0x25a7b8)this[_0x99e604(0x262)]()['transactionSync'](_0x52b943);else await this[_0x99e604(0x262)]()['childTransaction'](_0x52b943);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x347aa4)return{'acquired':![],'handle':null,'current':_0x6f3a9b};const _0x2823f7=new _0x2aa42c(this,_0x32fd77,_0x5b6507[_0x99e604(0x781)]);return _0x2823f7[_0x99e604(0x17f)](_0x280f58,this['heartbeatMs']),{'acquired':!![],'handle':_0x2823f7,'current':_0x6f3a9b};}['inspect'](_0x1d4323){const _0x1d54c7=_0x2946ee;try{return this[_0x1d54c7(0x262)]()[_0x1d54c7(0x6a)](this[_0x1d54c7(0xd7)](_0x1d4323))??null;}catch{return null;}}[_0x2946ee(0x401)](){const _0x573b18=_0x2946ee,_0xa00d1b=this[_0x573b18(0x253)]+':',_0x26f651=[];try{for(const {key:_0x3edd17,value:_0x4631a8}of this[_0x573b18(0x262)]()[_0x573b18(0x1c1)]({'start':_0xa00d1b,'end':_0xa00d1b+'\xff'})){typeof _0x3edd17==='string'&&_0x3edd17[_0x573b18(0x42e)](_0xa00d1b)&&_0x26f651[_0x573b18(0x2f9)]({'id':_0x3edd17[_0x573b18(0x13a)](_0xa00d1b[_0x573b18(0x39d)]),'entry':_0x4631a8});}}catch{}return _0x26f651;}static[_0x2946ee(0x4e9)](_0x1ef531){const _0x51f817=_0x2946ee,_0x422710=[];try{const _0x567366=_0x1ef531[_0x51f817(0x56a)](_0x3caa46,{'dupSort':![]});for(const {key:_0x2e06a0,value:_0x115611}of _0x567366[_0x51f817(0x1c1)]({})){if(typeof _0x2e06a0!==_0x51f817(0xe7))continue;const _0x1f39ee=_0x2e06a0[_0x51f817(0x380)](':');if(_0x1f39ee<0x1)continue;_0x422710[_0x51f817(0x2f9)]({'namespace':_0x2e06a0[_0x51f817(0x13a)](0x0,_0x1f39ee),'id':_0x2e06a0['slice'](_0x1f39ee+0x1),'entry':_0x115611});}}catch{}return _0x422710;}}return okdbLock={'OKDBLock':_0xf34329},okdbLock;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x16b568=_0x3d20e4;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x2f5a30=require$$0,_0x6abccb=require$$1$1,_0x5c98a6=require$$2$1,{LOOP:_0x3b727a}=requireOkdbLoopMonitor(),{OKDBLock:_0x1de777}=requireOkdbLock(),{SYNC_COMMITS:_0x4ac07b}=requireOkdbWriter(),_0x600417='~processes',_0x109a13=_0x16b568(0x68e),_0x4e41c6=_0x16b568(0x4df),_0x17db9f=_0x16b568(0x5cd),_0x4d5519=(_0x258d69,_0x5ad7d0)=>_0x258d69+':'+_0x5ad7d0,_0x3fb6d6=(_0x133a3b,_0x5939a5)=>_0x133a3b+'::'+_0x5939a5,_0x3bd861=(_0x5f0226,_0x46e437)=>_0x5f0226+'/'+_0x46e437,_0x8257a7=(_0x17958c,_0x23630e)=>_0x17958c+'#'+_0x23630e,_0x196db6=_0x288eb5=>{const _0x56364d=_0x16b568;if(_0x288eb5?.['processKey'])return _0x288eb5[_0x56364d(0x494)];const _0x2481af=_0x288eb5?.[_0x56364d(0x70d)];return typeof _0x2481af==='string'&&_0x2481af[_0x56364d(0x8f)]('#')?_0x2481af[_0x56364d(0x13a)](0x0,_0x2481af[_0x56364d(0x380)]('#')):_0x2481af;},_0xc80032=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x1e6bd6=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x141854=_0xc80032*0x3,_0x4c8eb3=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x16b568(0x68c)](0x927c0,_0x141854*0x14),_0x4aacd3=['processor:progress',_0x16b568(0x58f),'processor:retry',_0x16b568(0x2cd),_0x16b568(0x523),_0x16b568(0x75a)];let _0x47285c=null;function _0x5cb54a(){const _0x44e28e=_0x16b568;if(_0x47285c==null)_0x47285c=Math['round']((Date[_0x44e28e(0x127)]()-process[_0x44e28e(0x417)]()*0x3e8)/0x3e8)*0x3e8;return _0x47285c;}function _0x28bf91(_0x124bff){const _0x461f6b=_0x16b568;if(process.env.OKDB_PROCESS_KILL===_0x461f6b(0x567))return![];if(_0x124bff?.[_0x461f6b(0x518)]?.['processes']&&typeof _0x124bff['options'][_0x461f6b(0x5c9)]===_0x461f6b(0x5d4)&&_0x124bff[_0x461f6b(0x518)]['processes'][_0x461f6b(0x435)]===![])return![];return!![];}function _0x151ca7(_0x2c9947,_0x3373f9){const _0x119895=_0x16b568,_0x3f9f3b=!!_0x3373f9?.[_0x119895(0x43e)];switch(_0x2c9947){case _0x119895(0x73b):return{'controllable':_0x3f9f3b,'decommissionable':![],'killable':!![],'killConfirm':'cluster-wide'};case _0x119895(0x12e):case _0x119895(0x50c):return{'controllable':_0x3f9f3b,'decommissionable':![],'killable':!![],'killConfirm':_0x119895(0x62b)};case'embedded':return{'controllable':![],'decommissionable':![],'killable':![]};case'http-server':case _0x119895(0x64d):case'fn-runner':case _0x119895(0x259):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':'force'};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x1cfcfa{constructor(_0x2ecc25){const _0x4997c9=_0x16b568;this['okdb']=_0x2ecc25,this['_statusEnv']=null,this[_0x4997c9(0x3f1)]=null,this[_0x4997c9(0x271)]=new Map(),this[_0x4997c9(0x52b)]=null,this[_0x4997c9(0x76)]=![],this[_0x4997c9(0x68a)]=![],this[_0x4997c9(0x26a)]=_0x5cb54a(),this[_0x4997c9(0x452)]=_0x4d5519(process['pid'],this[_0x4997c9(0x26a)]),this[_0x4997c9(0x38c)]=_0x5c98a6['randomUUID']()[_0x4997c9(0x13a)](0x0,0x8),this[_0x4997c9(0x254)]=_0x8257a7(this['_selfKey'],this[_0x4997c9(0x38c)]),this[_0x4997c9(0x12a)]=Date[_0x4997c9(0x127)](),this[_0x4997c9(0x11f)]=null,this['_supervisorKey']=null,this['_listenAddr']=null,this[_0x4997c9(0xd4)]=null,this[_0x4997c9(0x2d1)]=null,this['_onTick']=null,this[_0x4997c9(0x35e)]=0x0,this[_0x4997c9(0x746)]={},this[_0x4997c9(0x718)]=new Map(),this[_0x4997c9(0x6ca)]=process[_0x4997c9(0x4d5)](),this['_lastCpuAt']=Date['now'](),this[_0x4997c9(0x645)]=0x0,this['_threadStats']=new Map();}get[_0x16b568(0x131)](){return this['_selfKey'];}get[_0x16b568(0x611)](){return this['_rowKey'];}['_caps'](_0x2479ab,_0x15297d){const _0x3f870f=_0x16b568,_0x5b2b2d=_0x151ca7(_0x2479ab,_0x15297d);if(_0x5b2b2d[_0x3f870f(0x166)]&&!_0x28bf91(this[_0x3f870f(0x229)]))return{..._0x5b2b2d,'killable':![],'killConfirm':undefined};return _0x5b2b2d;}[_0x16b568(0x225)](){const _0xee40ae=_0x16b568;return!!this[_0xee40ae(0x671)];}[_0x16b568(0x4db)](_0x138d27){const _0x1d958e=_0x16b568;Object['assign'](this[_0x1d958e(0x746)],_0x138d27||{});}[_0x16b568(0x316)](_0x57731b){const _0x56677d=_0x16b568;if(_0x57731b)this[_0x56677d(0x22d)]=_0x57731b;}[_0x16b568(0x44e)](_0x35017d={}){const _0x2ecd8f=_0x16b568;return this['okdb'][_0x2ecd8f(0x3fd)](_0x35017d);}['processingStatusView'](){const _0x440408=_0x16b568,_0x2bb2d6={};let _0x4780f3=0x0,_0x541117=0x0;const _0x34f54c=new Set();for(const _0x15568e of this['listNodes']()){_0x541117++;const _0x1aa2c8=_0x15568e[_0x440408(0x40f)];if(!_0x1aa2c8)continue;if(_0x1aa2c8[_0x440408(0x477)])_0x4780f3++;for(const _0x1d77a6 of _0x1aa2c8[_0x440408(0x43e)]||[]){if(![_0x440408(0x238),'fanout'][_0x440408(0x8f)](_0x1d77a6[_0x440408(0x38b)]))continue;(_0x1d77a6[_0x440408(0x1a3)]==='online'||_0x1d77a6[_0x440408(0x1a3)]===_0x440408(0x74e))&&_0x1d77a6[_0x440408(0x8b)]&&_0x34f54c[_0x440408(0x3e9)]((_0x1d77a6[_0x440408(0x124)]||_0x440408(0x3e8))+':'+_0x1d77a6[_0x440408(0x8b)]);const _0x5d4604=_0x1d77a6[_0x440408(0x124)]||_0x440408(0x3e8);(_0x2bb2d6[_0x5d4604]||=[])[_0x440408(0x2f9)]({..._0x1d77a6,'env':_0x5d4604,'owner':{'pid':_0x15568e[_0x440408(0xee)]??null,'kind':_0x15568e[_0x440408(0xaa)]??null}});}}for(const [_0x6d758a,_0x365b6f]of Object['entries'](_0x2bb2d6)){for(const _0x3d641a of _0x365b6f){if(_0x3d641a[_0x440408(0x38b)]===_0x440408(0x238)&&!_0x3d641a[_0x440408(0x1d9)]){const _0x50d0e8=_0x6d758a+':'+(_0x3d641a[_0x440408(0x8b)]??'');if(!_0x34f54c['has'](_0x50d0e8))_0x3d641a[_0x440408(0x21c)]=!![];}}}return{'envs':_0x2bb2d6,'policy':null,'participation':{'participating':_0x4780f3,'total':_0x541117},'source':_0x440408(0x150)};}[_0x16b568(0x107)](){const _0x178273=_0x16b568,_0x4e13c0=_0x4f577d=>{const _0x46f137=_0x8cd7;if(_0x4f577d['state']==='online'||_0x4f577d[_0x46f137(0x1a3)]===_0x46f137(0x74e)||_0x4f577d[_0x46f137(0x1a3)]===_0x46f137(0x492))return 0x3;if(_0x4f577d['claimGated'])return 0x1;return 0x2;},_0x4a4771=new Map();for(const _0x5bd4a4 of this[_0x178273(0x6e3)]()){for(const _0x57c1e3 of _0x5bd4a4[_0x178273(0x40f)]?.[_0x178273(0x43e)]||[]){const _0x1cf6f9={..._0x57c1e3,'owner':{'pid':_0x5bd4a4[_0x178273(0xee)]??null,'kind':_0x5bd4a4[_0x178273(0xaa)]??null,'host':_0x5bd4a4['host']??null}},_0xee0805=_0x57c1e3[_0x178273(0x38b)]==='single'?_0x178273(0x182)+(_0x57c1e3[_0x178273(0x124)]??'')+'::'+(_0x57c1e3[_0x178273(0x8b)]??_0x57c1e3['type']??_0x57c1e3['id']):_0x178273(0x510)+(_0x5bd4a4['nodeKey']??_0x5bd4a4[_0x178273(0x494)]??'')+'::'+(_0x57c1e3[_0x178273(0x124)]??'')+'::'+_0x57c1e3['id'],_0x33f434=_0x4a4771[_0x178273(0x6a)](_0xee0805);if(!_0x33f434||_0x4e13c0(_0x1cf6f9)>_0x4e13c0(_0x33f434))_0x4a4771['set'](_0xee0805,_0x1cf6f9);}}return[..._0x4a4771['values']()];}[_0x16b568(0x769)](){const _0x121c2c=_0x16b568,_0x1fd030=Date[_0x121c2c(0x127)](),_0x573a64=this[_0x121c2c(0x6e3)](),_0x20ca79=_0x33c760=>Math[_0x121c2c(0x68c)](0x0,Math['round']((_0x1fd030-(_0x33c760[_0x121c2c(0x698)]||_0x1fd030))/0x3e8)),_0x4543e9=_0x573a64['find'](_0x352738=>_0x352738[_0x121c2c(0xaa)]===_0x121c2c(0x73b)),_0x30d93d=_0x573a64['filter'](_0xac39e3=>_0xac39e3['kind']===_0x121c2c(0x35d));if(_0x4543e9||_0x30d93d[_0x121c2c(0x39d)])return{'primary':_0x4543e9?{'pid':_0x4543e9['pid'],'uptime':_0x20ca79(_0x4543e9)}:null,'workers':_0x30d93d[_0x121c2c(0x757)](_0x56413a=>({'pid':_0x56413a[_0x121c2c(0xee)],'uptime':_0x20ca79(_0x56413a)})),'workersConfigured':_0x4543e9?.['meta']?.[_0x121c2c(0x11d)]??_0x30d93d['length'],'mode':_0x121c2c(0x2bd)};const _0x1fc0ee=_0x573a64[_0x121c2c(0x83)](_0x26af74=>_0x26af74['kind']===_0x121c2c(0x12e)||_0x26af74[_0x121c2c(0xaa)]===_0x121c2c(0x50c)||_0x26af74[_0x121c2c(0xaa)]==='embedded'),_0x1939ec=_0x1fc0ee?{'pid':_0x1fc0ee['pid'],'uptime':_0x20ca79(_0x1fc0ee)}:{'pid':process[_0x121c2c(0xee)],'uptime':Math[_0x121c2c(0x68c)](0x0,Math[_0x121c2c(0x139)](process[_0x121c2c(0x417)]()))};return{'primary':_0x1939ec,'workers':[_0x1939ec],'workersConfigured':0x1,'mode':'single'};}['nodesView'](){const _0x4cc0ad=_0x16b568;return this[_0x4cc0ad(0x556)]();}[_0x16b568(0x114)](){const _0x4bd523=_0x16b568,_0x211ce3=new Map();for(const _0x41ae22 of this[_0x4bd523(0x556)]())_0x211ce3[_0x4bd523(0x49d)](_0x41ae22['processKey'],{..._0x41ae22,'children':[]});const _0x4c0672=[];for(const _0x4e29ef of _0x211ce3['values']()){const _0x57e08b=_0x4e29ef[_0x4bd523(0x77d)]?_0x211ce3[_0x4bd523(0x6a)](_0x4e29ef['supervisorKey']):null;if(_0x57e08b&&_0x57e08b!==_0x4e29ef)_0x57e08b['children'][_0x4bd523(0x2f9)](_0x4e29ef);else _0x4c0672[_0x4bd523(0x2f9)](_0x4e29ef);}const _0x3fbbc0=(_0x5db2d4,_0x3e3a90)=>_0x5db2d4[_0x4bd523(0xaa)]===_0x3e3a90[_0x4bd523(0xaa)]?(_0x5db2d4[_0x4bd523(0xee)]||0x0)-(_0x3e3a90[_0x4bd523(0xee)]||0x0):(_0x5db2d4['kind']??'')<(_0x3e3a90['kind']??'')?-0x1:0x1,_0x4b959d=_0x1fb8e3=>{const _0x880fcf=_0x4bd523;_0x1fb8e3[_0x880fcf(0x774)](_0x3fbbc0);for(const _0x406d7a of _0x1fb8e3)if(_0x406d7a[_0x880fcf(0x5ff)][_0x880fcf(0x39d)])_0x4b959d(_0x406d7a[_0x880fcf(0x5ff)]);};return _0x4b959d(_0x4c0672),_0x4c0672;}['getProcess'](_0x4d380f){const _0x17aa18=_0x16b568;return this[_0x17aa18(0x556)]()['find'](_0x4457fd=>_0x4457fd[_0x17aa18(0x494)]===_0x4d380f)??null;}[_0x16b568(0x556)](_0x33198e=Date[_0x16b568(0x127)]()){const _0x831fae=_0x16b568,_0x599124=new Map();for(const _0x5aa9e2 of this[_0x831fae(0x6e3)]()){const _0xbf7b30=_0x196db6(_0x5aa9e2);let _0x56e878=_0x599124['get'](_0xbf7b30);!_0x56e878&&(_0x56e878={'processKey':_0xbf7b30,'nodeKey':_0xbf7b30,'pid':_0x5aa9e2[_0x831fae(0xee)],'ppid':_0x5aa9e2[_0x831fae(0x56e)]??null,'host':_0x5aa9e2[_0x831fae(0x41a)]??null,'kind':_0x5aa9e2[_0x831fae(0xaa)],'role':null,'supervisorKey':_0x5aa9e2[_0x831fae(0x77d)]??null,'slot':_0x5aa9e2[_0x831fae(0x257)]??null,'slotKey':_0x5aa9e2[_0x831fae(0x3a0)]??null,'caps':_0x5aa9e2[_0x831fae(0x3b6)]??null,'lifecycle':_0x5aa9e2['lifecycle']??null,'uptime':Math[_0x831fae(0x68c)](0x0,Math[_0x831fae(0x139)]((_0x33198e-(_0x5aa9e2[_0x831fae(0x698)]||_0x33198e))/0x3e8)),'startedAt':_0x5aa9e2[_0x831fae(0x698)]??null,'meta':_0x5aa9e2[_0x831fae(0xc9)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x599124['set'](_0xbf7b30,_0x56e878));_0x56e878[_0x831fae(0x297)]['push']({'instanceId':_0x5aa9e2[_0x831fae(0x5e7)]??null,'role':_0x5aa9e2[_0x831fae(0x132)]??null,'listenAddr':_0x5aa9e2[_0x831fae(0x6f6)]??null,'lifecycle':_0x5aa9e2['lifecycle']??null,'processing':_0x5aa9e2['processing']??null});if(!_0x56e878[_0x831fae(0x132)]&&_0x5aa9e2[_0x831fae(0x132)])_0x56e878[_0x831fae(0x132)]=_0x5aa9e2[_0x831fae(0x132)];if(!_0x56e878['listenAddr']&&_0x5aa9e2[_0x831fae(0x6f6)])_0x56e878['listenAddr']=_0x5aa9e2[_0x831fae(0x6f6)];if(!_0x56e878[_0x831fae(0x40f)]&&_0x5aa9e2[_0x831fae(0x40f)])_0x56e878[_0x831fae(0x40f)]=_0x5aa9e2['processing'];if(!_0x56e878[_0x831fae(0x39c)]&&_0x5aa9e2[_0x831fae(0x39c)])_0x56e878[_0x831fae(0x39c)]=_0x5aa9e2[_0x831fae(0x39c)];if(!_0x56e878[_0x831fae(0x3e7)]&&_0x5aa9e2[_0x831fae(0x3e7)])_0x56e878[_0x831fae(0x3e7)]=_0x5aa9e2[_0x831fae(0x3e7)];if(_0x56e878[_0x831fae(0x3b6)]==null&&_0x5aa9e2['caps'])_0x56e878[_0x831fae(0x3b6)]=_0x5aa9e2[_0x831fae(0x3b6)];if(_0x5aa9e2[_0x831fae(0x609)]&&(!_0x56e878[_0x831fae(0x609)]||(_0x5aa9e2['stats']['at']??0x0)>(_0x56e878['stats']['at']??0x0)))_0x56e878[_0x831fae(0x609)]=_0x5aa9e2[_0x831fae(0x609)];}return[..._0x599124[_0x831fae(0x591)]()];}['runtimeProcessesView'](){const _0x2201dc=_0x16b568,_0x2e5878=[],_0x3204c5={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x12093e of this[_0x2201dc(0x556)]()){_0x2e5878[_0x2201dc(0x2f9)]({'processKey':_0x12093e[_0x2201dc(0x494)],'kind':_0x12093e[_0x2201dc(0xaa)],'pid':_0x12093e[_0x2201dc(0xee)],'supervisorKey':_0x12093e[_0x2201dc(0x77d)],'meta':_0x12093e[_0x2201dc(0xc9)]??null,'uptime':_0x12093e[_0x2201dc(0x417)],'stats':_0x12093e[_0x2201dc(0x609)]??null}),_0x3204c5[_0x2201dc(0x5c9)]++;if(_0x12093e[_0x2201dc(0x609)]){_0x3204c5[_0x2201dc(0x60d)]+=_0x12093e['stats']['rss']||0x0,_0x3204c5[_0x2201dc(0x497)]+=(_0x12093e[_0x2201dc(0x609)][_0x2201dc(0x497)]||0x0)+(_0x12093e[_0x2201dc(0x609)][_0x2201dc(0x6b7)]?.['heapUsed']||0x0);const _0x1fdeee=_0x12093e[_0x2201dc(0x609)][_0x2201dc(0x6b7)];_0x1fdeee&&(_0x3204c5['threads'][_0x2201dc(0x6ad)]+=_0x1fdeee['count']||0x0,_0x3204c5['threads']['sandbox']+=_0x1fdeee['sandbox']||0x0,_0x3204c5['threads'][_0x2201dc(0x63d)]+=_0x1fdeee['busy']||0x0);}}return{'totals':_0x3204c5,'nodes':_0x2e5878};}async['open']({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x1f8a3f=_0x16b568;this[_0x1f8a3f(0x76)]=this['_isWriter']||!!writer,this[_0x1f8a3f(0x68a)]=this[_0x1f8a3f(0x68a)]||!!reader,this[_0x1f8a3f(0x11f)]=kind||this[_0x1f8a3f(0x11f)]||(_0x6abccb['isWorker']?_0x1f8a3f(0x35d):_0x1f8a3f(0x12e)),this[_0x1f8a3f(0x37d)]=supervisorKey??this[_0x1f8a3f(0x37d)],this[_0x1f8a3f(0x22d)]=listenAddr??this[_0x1f8a3f(0x22d)],this[_0x1f8a3f(0x3b4)](),await this['_migrateVocab']();if(!writer&&!reader)return null;if(!this[_0x1f8a3f(0x671)]){const _0x411d9e=await this['okdb']['createEnvironment'](_0x600417,{'sync':![],'durability':_0x1f8a3f(0x537)});await _0x411d9e[_0x1f8a3f(0x3ca)](_0x109a13),this['_statusEnv']=_0x411d9e;}return this['_statusEnv'];}[_0x16b568(0x218)](){const _0x2ff8b9=_0x16b568;return this[_0x2ff8b9(0x174)]!==this[_0x2ff8b9(0x671)]&&(this[_0x2ff8b9(0x174)]=this[_0x2ff8b9(0x671)],this[_0x2ff8b9(0x626)]=this[_0x2ff8b9(0x671)][_0x2ff8b9(0x3ad)](_0x109a13)[_0x2ff8b9(0x32e)]),this[_0x2ff8b9(0x626)];}[_0x16b568(0x459)](_0x44cfb1){const _0x47a7f0=_0x16b568;if(_0x4ac07b)return this['_nodeDb']()['putSync'](_0x44cfb1[_0x47a7f0(0x70d)],_0x44cfb1,0x1);const _0x11aca0=this[_0x47a7f0(0x218)]()['put'](_0x44cfb1[_0x47a7f0(0x70d)],_0x44cfb1,0x1);if(_0x11aca0&&typeof _0x11aca0[_0x47a7f0(0xad)]===_0x47a7f0(0x372))_0x11aca0[_0x47a7f0(0xad)](undefined,()=>{});return _0x11aca0;}['_putRowSync'](_0x5918f0){const _0x308ebf=_0x16b568;return this[_0x308ebf(0x218)]()[_0x308ebf(0x16c)](_0x5918f0['nodeKey'],_0x5918f0,0x1);}['_removeRowAsync'](_0x146ab7){const _0x200eb6=_0x16b568;if(_0x4ac07b)try{return this[_0x200eb6(0x218)]()[_0x200eb6(0x59e)](_0x146ab7);}catch{return![];}const _0x36d04e=this[_0x200eb6(0x218)]()[_0x200eb6(0x34e)](_0x146ab7);if(_0x36d04e&&typeof _0x36d04e[_0x200eb6(0xad)]===_0x200eb6(0x372))_0x36d04e[_0x200eb6(0xad)](undefined,()=>{});return _0x36d04e;}async[_0x16b568(0x414)](_0x18e037){const _0x146f80=_0x16b568;if(!this['_statusEnv']||!this['_isWriter']||!_0x18e037?.[_0x146f80(0x70d)])return;return this['_putRowAsync'](_0x18e037);}async[_0x16b568(0x2c9)](_0x23c7cf){const _0x987e65=_0x16b568;if(!this[_0x987e65(0x671)]||!this[_0x987e65(0x76)]||!_0x23c7cf)return;const _0x5efb22=_0x23c7cf['includes']('#'),_0x56f36f=[];for(const {key:_0x2852cf}of this[_0x987e65(0x671)][_0x987e65(0x1c1)](_0x109a13)){if(_0x2852cf===_0x23c7cf||!_0x5efb22&&typeof _0x2852cf==='string'&&_0x2852cf['startsWith'](_0x23c7cf+'#'))_0x56f36f[_0x987e65(0x2f9)](_0x2852cf);}for(const _0x4a2b02 of _0x56f36f){try{this['_nodeDb']()['removeSync'](_0x4a2b02);}catch{}}}[_0x16b568(0x751)](_0x3d18f3){const _0x5060e8=_0x16b568;if(typeof _0x3d18f3?.[_0x5060e8(0xee)]!=='number')return![];if(_0x3d18f3[_0x5060e8(0x41a)]!==_0x2f5a30[_0x5060e8(0x24f)]())return![];if(_0x3d18f3[_0x5060e8(0xee)]===process[_0x5060e8(0xee)])return![];if(_0x3d18f3[_0x5060e8(0x57a)]!=null&&_0x3d18f3['expiresAt']<Date[_0x5060e8(0x127)]()-_0x4c8eb3)return!![];try{return process[_0x5060e8(0x435)](_0x3d18f3[_0x5060e8(0xee)],0x0),![];}catch(_0x3c7f0b){return _0x3c7f0b['code']===_0x5060e8(0x696);}}[_0x16b568(0x6e3)](){const _0x4439be=_0x16b568;if(!this['_statusEnv'])return[];try{this['_statusEnv']['db']?.[_0x4439be(0x662)]?.();}catch{}const _0x41799d=Date[_0x4439be(0x127)](),_0x354876=_0x2f5a30['hostname'](),_0xe67c71=[];for(const {value:_0x364f09}of this[_0x4439be(0x671)][_0x4439be(0x1c1)](_0x109a13)){if(!_0x364f09)continue;let _0x158e18=null;_0x364f09[_0x4439be(0x41a)]===_0x354876&&typeof _0x364f09['pid']===_0x4439be(0x6af)&&(_0x158e18=!this[_0x4439be(0x751)](_0x364f09));if(_0x158e18===![])continue;const _0xbbc2f3=_0x364f09[_0x4439be(0x57a)]==null||_0x364f09[_0x4439be(0x57a)]>=_0x41799d;if(_0x158e18===!![]||_0xbbc2f3)_0xe67c71[_0x4439be(0x2f9)](_0x364f09);}return _0xe67c71;}async[_0x16b568(0x4cb)](_0x457fd4=0x0){const _0x459c84=_0x16b568;if(!this['_statusEnv']||!this[_0x459c84(0x76)])return;const _0x3fcc50=Date[_0x459c84(0x127)]()-_0x457fd4,_0x4e6305=new Set(),_0x598218=[],_0x38a7fd=_0x2f5a30[_0x459c84(0x24f)](),_0x198101=require$$3[_0x459c84(0x3e1)];for(const {key:_0x332710,value:_0x35fb00}of this[_0x459c84(0x671)][_0x459c84(0x1c1)](_0x109a13)){if(!_0x35fb00)continue;const _0x443b7b=_0x35fb00[_0x459c84(0x41a)]===_0x38a7fd&&typeof _0x35fb00[_0x459c84(0xee)]===_0x459c84(0x6af),_0x257603=_0x443b7b?this[_0x459c84(0x751)](_0x35fb00):_0x35fb00[_0x459c84(0x57a)]!=null&&_0x35fb00[_0x459c84(0x57a)]<_0x3fcc50;if(_0x257603)_0x598218[_0x459c84(0x2f9)](_0x332710);else{_0x4e6305[_0x459c84(0x3e9)](_0x196db6(_0x35fb00)??_0x332710);if(_0x35fb00[_0x459c84(0x3e1)]&&_0x35fb00['version']!==_0x198101){if(!this['_versionSkewWarned'])this[_0x459c84(0x5f6)]=new Set();!this[_0x459c84(0x5f6)]['has'](_0x35fb00['version'])&&(this[_0x459c84(0x5f6)][_0x459c84(0x3e9)](_0x35fb00[_0x459c84(0x3e1)]),this[_0x459c84(0x229)][_0x459c84(0x24e)]?.[_0x459c84(0x6a7)]?.(_0x459c84(0x760)+(_0x35fb00['pid']??'?')+_0x459c84(0x67d)+_0x35fb00[_0x459c84(0x3e1)]+'\x20while\x20this\x20process\x20runs\x20'+_0x198101+'\x20—\x20'+_0x459c84(0x486),{'feature':_0x459c84(0x631)}));}}}for(const _0x58215a of _0x598218)this['_removeRowAsync'](_0x58215a);if(this['_ensureDesired']()){const _0x3f9fcf=[];for(const {key:_0x3ffb90}of this[_0x459c84(0x272)](_0x459c84(0x68e))){if(!_0x4e6305[_0x459c84(0x469)](_0x3ffb90)){if(_0x4ac07b)try{this['_desired'][_0x459c84(0x59e)](_0x459c84(0x321)+_0x3ffb90);}catch{}else _0x3f9fcf['push'](this[_0x459c84(0x3f1)][_0x459c84(0x34e)](_0x459c84(0x321)+_0x3ffb90));}}if(_0x3f9fcf['length'])await Promise[_0x459c84(0xf0)](_0x3f9fcf);}}['startHeartbeat'](_0x35cbeb=null){const _0x388be5=_0x16b568;if(this[_0x388be5(0xd4)])return;if(!this[_0x388be5(0x76)]||!this['_statusEnv']){this[_0x388be5(0x229)]?.['log']?.[_0x388be5(0x6a7)]?.(_0x388be5(0x5d9)+this['_isWriter']+_0x388be5(0x36c)+!!this['_statusEnv']+_0x388be5(0x6f5),{'feature':_0x388be5(0x5c9)});return;}this[_0x388be5(0x73e)]=_0x35cbeb,this[_0x388be5(0x2d1)]=()=>this[_0x388be5(0x185)]();for(const _0x3bc066 of _0x4aacd3)this[_0x388be5(0x229)]['events']['on'](_0x3bc066,this[_0x388be5(0x2d1)]);this['_publishNow']();const _0x2c3242=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0xc80032;this[_0x388be5(0xd4)]=setInterval(()=>{const _0x514cf4=_0x388be5;if(this['_onTick'])try{this['_onTick']();}catch{}this[_0x514cf4(0x57f)](),this[_0x514cf4(0x4cb)]()[_0x514cf4(0x618)](()=>{});},_0x2c3242);if(this[_0x388be5(0xd4)][_0x388be5(0xe9)])this[_0x388be5(0xd4)][_0x388be5(0xe9)]();}['_maybePublish'](){const _0x12068c=_0x16b568;if(!this['_isWriter']||!this[_0x12068c(0x671)])return;if(Date[_0x12068c(0x127)]()-this[_0x12068c(0x35e)]<_0x1e6bd6)return;this['_publishNow']();}[_0x16b568(0x57f)](){const _0x575f9e=_0x16b568;if(!this[_0x575f9e(0x76)]||!this[_0x575f9e(0x671)])return;this[_0x575f9e(0x35e)]=Date[_0x575f9e(0x127)]();try{const _0x54e466=[this[_0x575f9e(0x345)]()];for(const _0x5e1dfd of this[_0x575f9e(0x718)][_0x575f9e(0x591)]())_0x54e466[_0x575f9e(0x2f9)](this[_0x575f9e(0x351)](_0x5e1dfd));const _0x56e995=_0x3b727a[_0x575f9e(0x1f9)]?_0x3b727a['now']():0x0;for(const _0x4cd4dd of _0x54e466){try{this[_0x575f9e(0x658)](_0x4cd4dd),this[_0x575f9e(0x4aa)]=![];}catch(_0x2bde63){!this[_0x575f9e(0x4aa)]&&(this[_0x575f9e(0x4aa)]=!![],this[_0x575f9e(0x229)]?.[_0x575f9e(0x24e)]?.['warn']?.(_0x575f9e(0x524)+_0x2bde63['message'],{'feature':'processes'}));}}if(_0x3b727a[_0x575f9e(0x1f9)])_0x3b727a[_0x575f9e(0x79)]('registry-publish',_0x3b727a['now']()-_0x56e995,_0x575f9e(0x53d)+_0x54e466[_0x575f9e(0x39d)]+_0x575f9e(0x630));}catch(_0x11dac3){!this[_0x575f9e(0x4aa)]&&(this['_publishFailWarned']=!![],this[_0x575f9e(0x229)]?.[_0x575f9e(0x24e)]?.[_0x575f9e(0x6a7)]?.('registry\x20publish\x20failing:\x20'+_0x11dac3[_0x575f9e(0x5e6)],{'feature':_0x575f9e(0x5c9)}));}}async[_0x16b568(0x40e)](){const _0x5378b2=_0x16b568;if(this[_0x5378b2(0x2d1)]){for(const _0x167e5f of _0x4aacd3){try{this['okdb']['events'][_0x5378b2(0x567)](_0x167e5f,this[_0x5378b2(0x2d1)]);}catch{}}this[_0x5378b2(0x2d1)]=null;}this['_hbTimer']&&(clearInterval(this['_hbTimer']),this[_0x5378b2(0xd4)]=null);try{if(this[_0x5378b2(0x671)]&&this[_0x5378b2(0x76)])await this[_0x5378b2(0x2c9)](this[_0x5378b2(0x254)]);}catch{}}async['deregisterSelf'](){const _0x29a1c8=_0x16b568;if(!this[_0x29a1c8(0x671)]||!this[_0x29a1c8(0x76)])return;try{await this[_0x29a1c8(0x2c9)](this[_0x29a1c8(0x254)]);}catch{}try{const _0x46f295=[];for(const {value:_0x416a82}of this[_0x29a1c8(0x671)][_0x29a1c8(0x1c1)](_0x109a13)){if(_0x416a82?.[_0x29a1c8(0x56e)]===process['pid']&&_0x416a82['nodeKey'])_0x46f295['push'](_0x416a82[_0x29a1c8(0x70d)]);}for(const _0x185186 of _0x46f295){try{await this[_0x29a1c8(0x2c9)](_0x185186);}catch{}}}catch{}}async[_0x16b568(0x44d)](){const _0x593df7=_0x16b568;return this['putNode'](this[_0x593df7(0x345)]());}async['publishChildRow'](_0x530d14){const _0x407f62=_0x16b568;if(!this['_statusEnv']||!this[_0x407f62(0x76)])return;return this[_0x407f62(0x414)](this[_0x407f62(0x351)](_0x530d14));}[_0x16b568(0x351)]({pid:_0x306691,startedAt:_0x1b88ad,kind:_0x5cd041,supervisorKey:_0x602293,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x16b568(0x364),meta:meta=null,stats:stats=null}){const _0x3a4f7d=_0x16b568,_0xb926e=Date[_0x3a4f7d(0x127)](),_0x1eb6c5=_0x4d5519(_0x306691,_0x1b88ad);return{'nodeKey':_0x8257a7(_0x1eb6c5,'0'),'processKey':_0x1eb6c5,'instanceId':'0','pid':_0x306691,'startedAt':_0x1b88ad,'ppid':process['pid'],'host':_0x2f5a30[_0x3a4f7d(0x24f)](),'supervisorKey':_0x602293,'slot':slot,'slotKey':slotKey,'kind':_0x5cd041,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0xb926e,'expiresAt':_0xb926e+_0x141854,'caps':this[_0x3a4f7d(0x725)](_0x5cd041,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async['addSupervisedChild'](_0x3ea9ca){const _0x3da7fc=_0x16b568;if(!_0x3ea9ca?.[_0x3da7fc(0xee)])return null;const _0xaa846e=_0x4d5519(_0x3ea9ca[_0x3da7fc(0xee)],_0x3ea9ca['startedAt']);this[_0x3da7fc(0x718)][_0x3da7fc(0x49d)](_0xaa846e,{..._0x3ea9ca,'supervisorKey':_0x3ea9ca[_0x3da7fc(0x77d)]??this[_0x3da7fc(0x452)]});if(this[_0x3da7fc(0x76)])await this[_0x3da7fc(0x303)](this[_0x3da7fc(0x718)][_0x3da7fc(0x6a)](_0xaa846e))[_0x3da7fc(0x618)]?.(()=>{});return _0xaa846e;}[_0x16b568(0x27b)](_0x21fd17){const _0x26c76c=_0x16b568;if(!_0x21fd17)return;return this['_children']['delete'](_0x21fd17),this[_0x26c76c(0x2c9)](_0x21fd17);}[_0x16b568(0x597)](){const _0x697404=_0x16b568,_0x56916e=Date[_0x697404(0x127)](),_0x4f4412=process[_0x697404(0x4d5)](),_0x148db6=(_0x56916e-this[_0x697404(0x58e)])*0x3e8;if(_0x148db6>=0x3d090){const _0xa24ba9=_0x4f4412[_0x697404(0x9b)]-this[_0x697404(0x6ca)][_0x697404(0x9b)]+(_0x4f4412[_0x697404(0x619)]-this[_0x697404(0x6ca)][_0x697404(0x619)]),_0x2793d7=_0x2f5a30[_0x697404(0x19c)]()[_0x697404(0x39d)]||0x1;this['_lastCpuPct']=Math[_0x697404(0x268)](0x64,Math[_0x697404(0x139)](_0xa24ba9/(_0x148db6*_0x2793d7)*0x64)),this[_0x697404(0x682)]=Math['round'](_0x148db6/0x3e8),this[_0x697404(0x6ca)]=_0x4f4412,this[_0x697404(0x58e)]=_0x56916e;}const _0x30839f=process[_0x697404(0x14d)](),_0x5d13b8=this['_threadStats'][_0x697404(0x35f)];let _0x12cfa8=0x0;if(_0x5d13b8>0x0){const _0x7c2895=[this['okdb'],...this[_0x697404(0x229)][_0x697404(0x64c)]?.['values']?.()??[]];for(const _0x3ae5ae of _0x7c2895){const _0x19f71a=_0x3ae5ae[_0x697404(0x322)]?.[_0x697404(0x31d)];if(_0x19f71a)_0x12cfa8+=_0x19f71a[_0x697404(0x5ab)][_0x697404(0x63d)];}}let _0x25f0e6=null;const _0x5c2f9e=_0x5d13b8;if(_0x5c2f9e>0x0){let _0x3df7b4=0x0;for(const _0x2357fb of this[_0x697404(0x681)][_0x697404(0x591)]())_0x3df7b4+=_0x2357fb[_0x697404(0x497)]||0x0;_0x25f0e6={'count':_0x5c2f9e,'heapUsed':_0x3df7b4,'sandbox':_0x5d13b8,'busy':_0x12cfa8};}return{'rss':_0x30839f[_0x697404(0x60d)],'heapUsed':_0x30839f[_0x697404(0x497)],'heapTotal':_0x30839f['heapTotal'],'external':_0x30839f[_0x697404(0x46a)],'cpuPct':this[_0x697404(0x645)],'cpuWindowMs':this[_0x697404(0x682)]??null,'threads':_0x25f0e6,'at':_0x56916e};}[_0x16b568(0x33a)](_0x488bb1,_0x457c19){const _0x3105cb=_0x16b568;if(!_0x488bb1||!_0x457c19)return;this['_threadStats'][_0x3105cb(0x49d)](_0x488bb1,_0x457c19);}[_0x16b568(0x5b3)](_0x4da0a3){const _0x9b2196=_0x16b568;this[_0x9b2196(0x681)][_0x9b2196(0x95)](_0x4da0a3);}[_0x16b568(0x4b6)](_0x39ed7f,_0x57a32c,_0x380863=undefined){const _0x237ec9=_0x16b568,_0x1d9d1e=this[_0x237ec9(0x718)]['get'](_0x39ed7f);if(!_0x1d9d1e||!_0x57a32c)return;if(_0x380863!==undefined)_0x1d9d1e[_0x237ec9(0x40f)]=_0x380863;_0x1d9d1e[_0x237ec9(0x609)]={'rss':_0x57a32c['rss']??null,'heapUsed':_0x57a32c[_0x237ec9(0x497)]??null,'heapTotal':_0x57a32c[_0x237ec9(0x6f1)]??null,'external':_0x57a32c[_0x237ec9(0x46a)]??null,'cpuPct':_0x57a32c[_0x237ec9(0x2d8)]??null,'cpuWindowMs':_0x57a32c[_0x237ec9(0x6c1)]??null,'threads':_0x57a32c[_0x237ec9(0x6b7)]??null,'claims':_0x57a32c[_0x237ec9(0x302)]??null,'envsOpen':_0x57a32c[_0x237ec9(0x125)]??null,'at':Date['now']()};}[_0x16b568(0x345)](){const _0x84e3b8=_0x16b568,_0x1fe5eb=Date[_0x84e3b8(0x127)](),_0x22ff2e=this['okdb']['_role']||{},_0x175cdc=this['_kind']||_0x84e3b8(0x12e);return{'nodeKey':this[_0x84e3b8(0x254)],'processKey':this[_0x84e3b8(0x452)],'instanceId':this['_instanceId'],'pid':process['pid'],'startedAt':this[_0x84e3b8(0x26a)],'instanceStartedAt':this['_startedAt'],'ppid':typeof process[_0x84e3b8(0x56e)]===_0x84e3b8(0x6af)?process[_0x84e3b8(0x56e)]:null,'host':_0x2f5a30['hostname'](),'supervisorKey':this[_0x84e3b8(0x37d)]??null,'version':require$$3[_0x84e3b8(0x3e1)],'kind':_0x175cdc,'role':{'engines':!!_0x22ff2e['engines'],'processors':!!_0x22ff2e[_0x84e3b8(0x43e)],'compaction':_0x22ff2e[_0x84e3b8(0x3a6)],'http':_0x22ff2e[_0x84e3b8(0x91)]},'listenAddr':this[_0x84e3b8(0x22d)]??null,'heartbeatAt':_0x1fe5eb,'expiresAt':_0x1fe5eb+_0x141854,'caps':this[_0x84e3b8(0x725)](_0x175cdc,_0x22ff2e),'lifecycle':{'state':'running','desiredVersionApplied':null},'meta':{...this[_0x84e3b8(0x746)]},'processing':_0x22ff2e[_0x84e3b8(0x43e)]?this[_0x84e3b8(0x734)]():null,'engines':_0x22ff2e[_0x84e3b8(0x39c)]?[...this[_0x84e3b8(0x229)]['_servingEngines']??[]]:null,'singletonClaims':this['_collectSingletonClaims'](),'stats':this[_0x84e3b8(0x597)](),'writers':this['_collectWriterFacet']()};}[_0x16b568(0x3b3)](){const _0x5b0462=_0x16b568,_0x15eb9f={};try{for(const [_0x530a77,_0x3f6164]of this[_0x5b0462(0x229)][_0x5b0462(0x64c)]){try{const _0x589e9e=_0x3f6164[_0x5b0462(0x6cb)]?.();if(!_0x589e9e)continue;if(!_0x589e9e['depth']&&!_0x589e9e[_0x5b0462(0x4d0)]&&!(_0x589e9e[_0x5b0462(0x228)]??0x0)&&!_0x589e9e[_0x5b0462(0x3b8)])continue;_0x15eb9f[_0x530a77]={'depth':_0x589e9e[_0x5b0462(0x5c7)],'oldestPendingMs':_0x589e9e['oldestPendingMs'],'committed':_0x589e9e[_0x5b0462(0x4d0)],'commitsPerSec':_0x589e9e[_0x5b0462(0xca)],'commitP99Ms':_0x589e9e[_0x5b0462(0x295)],'parkedNow':_0x589e9e[_0x5b0462(0x228)]??0x0,'draining':!!_0x589e9e['draining']};}catch{}}}catch{}return Object['keys'](_0x15eb9f)[_0x5b0462(0x39d)]?_0x15eb9f:null;}[_0x16b568(0x69a)](){const _0x4af914=_0x16b568,_0x49385b=process[_0x4af914(0xee)],_0x4f4498=Date['now'](),_0x27084a=_0x147f70=>{const _0x14f729=_0x4af914;if(!_0x147f70)return[];const _0x5c0edd=[];try{for(const {id:_0x1cee04,entry:_0x34aee5}of _0x147f70['list']()){if(_0x34aee5?.['holder']?.[_0x14f729(0xee)]!==_0x49385b)continue;const _0x273ba9=_0x34aee5[_0x14f729(0x75f)]??_0x34aee5[_0x14f729(0x781)]??0x0;if(_0x273ba9+(_0x34aee5[_0x14f729(0x52e)]??0x0)<_0x4f4498)continue;_0x5c0edd['push'](_0x1cee04);}}catch{}return _0x5c0edd;},_0x8188a9=_0x27084a(this[_0x4af914(0x27e)]('compact')),_0x2501ab=_0x27084a(this['_singletonLock'](_0x4af914(0x2ae)));if(!_0x8188a9[_0x4af914(0x39d)]&&!_0x2501ab[_0x4af914(0x39d)])return null;return{'compact':_0x8188a9,'replicate':_0x2501ab};}[_0x16b568(0x27e)](_0x192607){const _0x5c1cfe=_0x16b568;if(!this[_0x5c1cfe(0x229)]?.[_0x5c1cfe(0x1ab)])return null;if(!this[_0x5c1cfe(0x2ba)])this['_singletonLocks']=new Map();let _0x1d7191=this[_0x5c1cfe(0x2ba)][_0x5c1cfe(0x6a)](_0x192607);if(!_0x1d7191)try{_0x1d7191=new _0x1de777(this['okdb'][_0x5c1cfe(0x1ab)],{'namespace':_0x192607}),this['_singletonLocks'][_0x5c1cfe(0x49d)](_0x192607,_0x1d7191);}catch{return null;}return _0x1d7191;}['_buildProcessingFacet'](){const _0xe64b1f=_0x16b568,_0x178b56=[];try{for(const [_0x4cba1c,_0x3f6d55]of this[_0xe64b1f(0x229)][_0xe64b1f(0x64c)]){if(_0x4cba1c[_0xe64b1f(0x42e)]('~'))continue;for(const _0x40e4c5 of _0x3f6d55['processor'][_0xe64b1f(0x30d)]())_0x178b56[_0xe64b1f(0x2f9)]({..._0x40e4c5,'env':_0x4cba1c});}}catch{}return{'participate':this[_0xe64b1f(0x229)][_0xe64b1f(0x43e)]?.['_participate']??![],'processors':_0x178b56};}['_ensureDesired'](){const _0x51f7e7=_0x16b568;if(this[_0x51f7e7(0x3f1)])return!![];const _0x1abd00=this[_0x51f7e7(0x229)][_0x51f7e7(0x1ab)];if(!_0x1abd00)return![];return this['_desired']=_0x1abd00[_0x51f7e7(0x56a)](_0x4e41c6,{'dupSort':![]}),this[_0x51f7e7(0x52b)]=_0x1abd00['openDB'](_0x17db9f,{'dupSort':![]}),!![];}async['_migrateVocab'](){const _0x3c84d2=_0x16b568;if(!this[_0x3c84d2(0x3b4)]())return;const _0x5a6a31=_0x3c84d2(0x1ac),_0x2dfa11=0x1,_0x16582a=this[_0x3c84d2(0x3f1)]['get'](_0x5a6a31)??0x0;if(_0x16582a>=_0x2dfa11)return;const _0x2b9cf6=_0x14960a=>{const _0x12da23=_0x3c84d2;if(_0x14960a===_0x12da23(0x259))return'single';if(_0x14960a==='async')return _0x12da23(0x5e2);return _0x14960a;};await this['okdb'][_0x3c84d2(0x5bc)][_0x3c84d2(0x385)][_0x3c84d2(0x4f9)](()=>{const _0x581b5d=_0x3c84d2;for(const _0x1f8956 of[_0x581b5d(0x3bb),_0x581b5d(0x561)]){for(const {key:_0xf388d5,value:_0x2659f8}of this[_0x581b5d(0x3f1)][_0x581b5d(0x1c1)]({'start':_0x1f8956,'end':_0x1f8956+'\xff'})){if(typeof _0xf388d5!=='string'||!_0xf388d5[_0x581b5d(0x42e)](_0x1f8956))break;const _0x305b68=_0x2b9cf6(_0x2659f8[_0x581b5d(0x38b)]);if(_0x305b68!==_0x2659f8[_0x581b5d(0x38b)])this[_0x581b5d(0x3f1)]['put'](_0xf388d5,{..._0x2659f8,'mode':_0x305b68});}}this[_0x581b5d(0x3f1)][_0x581b5d(0x463)](_0x5a6a31,_0x2dfa11);});}[_0x16b568(0x706)](){const _0x579ec0=_0x16b568;return!!this[_0x579ec0(0x3f1)];}[_0x16b568(0x4c0)](_0x1e572b,_0xa9a8a){const _0xdfec0d=_0x16b568;if(!this[_0xdfec0d(0x3b4)]())return null;const _0x234431=_0x1e572b+'/'+_0xa9a8a;return this['_refreshDesiredSnapshot'](),this[_0xdfec0d(0x271)][_0xdfec0d(0x6a)](_0x234431)??this[_0xdfec0d(0x3f1)]['get'](_0x234431)??null;}['_refreshDesiredSnapshot'](){const _0x141e14=_0x16b568;if(!_0x4ac07b)return;try{this[_0x141e14(0x229)][_0x141e14(0x5bc)]?.['db']?.[_0x141e14(0x662)]?.();}catch{}}async[_0x16b568(0x197)](_0x5bdb64,_0x397652,_0x2223a){const _0x2b80d7=_0x16b568;if(!this[_0x2b80d7(0x3b4)]())return null;const _0x2f53be=_0x5bdb64+'/'+_0x397652;this[_0x2b80d7(0x1c2)]();const _0x41721a=this['_desiredOverlay']['get'](_0x2f53be)??this['_desired'][_0x2b80d7(0x6a)](_0x2f53be)??{'version':0x0},_0x1a2a6b=(_0x41721a[_0x2b80d7(0x3e1)]||0x0)+0x1,_0x1af576={..._0x41721a,..._0x2223a,'version':_0x1a2a6b,'updatedAt':Date[_0x2b80d7(0x127)]()};this[_0x2b80d7(0x271)]['set'](_0x2f53be,_0x1af576);try{await this[_0x2b80d7(0x229)]['_systemEnv']['_writer'][_0x2b80d7(0x4f9)](()=>{const _0x141188=_0x2b80d7;this['_desired'][_0x141188(0x463)](_0x2f53be,_0x1af576);});}finally{if(this['_desiredOverlay'][_0x2b80d7(0x6a)](_0x2f53be)===_0x1af576)this[_0x2b80d7(0x271)]['delete'](_0x2f53be);}return _0x1a2a6b;}[_0x16b568(0x272)](_0xe9a767){const _0x171b6e=_0x16b568;if(!this['_ensureDesired']())return[];this[_0x171b6e(0x1c2)]();const _0x4ac355=_0xe9a767+'/',_0x2e7209=[];for(const {key:_0x4d992c,value:_0x125cb6}of this[_0x171b6e(0x3f1)][_0x171b6e(0x1c1)]({'start':_0x4ac355,'end':_0x4ac355+'\xff'})){if(typeof _0x4d992c!==_0x171b6e(0xe7)||!_0x4d992c['startsWith'](_0x4ac355))break;_0x2e7209['push']({'key':_0x4d992c[_0x171b6e(0x13a)](_0x4ac355[_0x171b6e(0x39d)]),'value':_0x125cb6});}return _0x2e7209;}[_0x16b568(0x49c)](_0x40429d){const _0x207a02=_0x16b568;if(!this[_0x207a02(0x3b4)]())return null;return this[_0x207a02(0x52b)]['get'](_0x40429d)??null;}async['bumpCmd'](_0x191e35,_0x126099,_0x5d8ca3={}){const _0x26c707=_0x16b568;if(!this[_0x26c707(0x3b4)]())return null;let _0x42b593;return await this[_0x26c707(0x229)]['_systemEnv'][_0x26c707(0x385)][_0x26c707(0x4f9)](()=>{const _0x4de7e9=_0x26c707,_0x22cbbc=this[_0x4de7e9(0x52b)]['get'](_0x191e35)||{'epoch':0x0};_0x42b593=(_0x22cbbc[_0x4de7e9(0x45a)]||0x0)+0x1,this['_cmd'][_0x4de7e9(0x463)](_0x191e35,{..._0x22cbbc,..._0x5d8ca3,'cmd':_0x126099,'epoch':_0x42b593,'updatedAt':Date[_0x4de7e9(0x127)]()});}),_0x42b593;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x1cfcfa,'nodeKey':_0x4d5519,'logicalKey':_0x3fb6d6,'slotKey':_0x3bd861,'PROCESS_ENV':_0x600417,'NODE_TYPE':_0x109a13},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function _0x8cd7(_0x1cbba2,_0x26366c){_0x1cbba2=_0x1cbba2-0x67;const _0x166efe=_0x166e();let _0x8cd74e=_0x166efe[_0x1cbba2];return _0x8cd74e;}function requireOkdbChangefeed(){const _0x1c2419=_0x3d20e4;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x5c820d=require$$0$6,{EVENTS:_0x5f2dd8,CHANGE_ACTIONS:_0x2fbc26}=requireOkdbEnums(),{LOOP:_0x2a1d9e}=requireOkdbLoopMonitor(),_0x258028=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x215a38=0x5,_0x46fcd2=0x2710;class _0x527f6d extends _0x5c820d{constructor(_0x2446b2,_0x32e254={}){const _0x1ab7d0=_0x8cd7;super(),this['okdb']=_0x2446b2,this[_0x1ab7d0(0x57e)]=_0x32e254[_0x1ab7d0(0x447)]??_0x258028,this[_0x1ab7d0(0x346)]=_0x32e254[_0x1ab7d0(0x2ca)]??_0x215a38,this['_dedupeMax']=_0x32e254[_0x1ab7d0(0x722)]??_0x46fcd2,this[_0x1ab7d0(0x589)]=![],this[_0x1ab7d0(0x546)]=new Map(),this['_baselines']=new Map(),this['_pending']=new Map(),this[_0x1ab7d0(0xe6)]=null,this[_0x1ab7d0(0x22a)]=![],this[_0x1ab7d0(0x6f4)]=new Set(),this[_0x1ab7d0(0x655)]=new Set(),this[_0x1ab7d0(0x3b1)]=_0x5df90f=>this[_0x1ab7d0(0x92)](_0x5df90f),this[_0x1ab7d0(0x61f)]=_0x3b7615=>this[_0x1ab7d0(0x4e6)](_0x3b7615),this[_0x1ab7d0(0x3af)]=_0x1e81cd=>this['_handlePoke'](_0x1e81cd),this['_onStop']=()=>this[_0x1ab7d0(0x226)]();}[_0x1c2419(0x570)](){const _0x292596=_0x1c2419;if(this[_0x292596(0x589)])return;this[_0x292596(0x589)]=!![];for(const [_0x47110a,_0x53f841]of this['okdb']['_envs']){if(_0x47110a[_0x292596(0x42e)]('~'))continue;try{_0x53f841[_0x292596(0x30e)]();}catch{}}for(const [_0x5c0cff,_0x2b1bce]of this[_0x292596(0x229)][_0x292596(0x64c)]){if(_0x5c0cff['startsWith']('~'))continue;try{this[_0x292596(0x520)]['set'](_0x5c0cff,_0x2b1bce[_0x292596(0x670)]()||0x0);}catch{}}const {events:_0x4b5aa3}=this[_0x292596(0x229)];_0x4b5aa3['on'](_0x5f2dd8['ITEM_PENDING'],this[_0x292596(0x61f)]),_0x4b5aa3['on'](_0x5f2dd8[_0x292596(0x512)],this['_onItem']),_0x4b5aa3['on'](_0x5f2dd8['ITEM_UPDATE'],this[_0x292596(0x3b1)]),_0x4b5aa3['on'](_0x5f2dd8['ITEM_REMOVE'],this[_0x292596(0x3b1)]),_0x4b5aa3['on'](_0x5f2dd8[_0x292596(0x6e5)],this[_0x292596(0x3af)]),_0x4b5aa3[_0x292596(0x375)](_0x5f2dd8['SYSTEM_STOPPED'],this[_0x292596(0x9a)]);}[_0x1c2419(0x226)](){const _0x340cea=_0x1c2419;if(!this['_started'])return;this['_started']=![];const {events:_0x2c7cf7}=this[_0x340cea(0x229)];_0x2c7cf7[_0x340cea(0x567)](_0x5f2dd8[_0x340cea(0x4a5)],this[_0x340cea(0x61f)]),_0x2c7cf7['off'](_0x5f2dd8['ITEM_CREATE'],this[_0x340cea(0x3b1)]),_0x2c7cf7[_0x340cea(0x567)](_0x5f2dd8[_0x340cea(0x606)],this[_0x340cea(0x3b1)]),_0x2c7cf7[_0x340cea(0x567)](_0x5f2dd8[_0x340cea(0x203)],this[_0x340cea(0x3b1)]),_0x2c7cf7[_0x340cea(0x567)](_0x5f2dd8['SYSTEM_POKE'],this[_0x340cea(0x3af)]);try{_0x2c7cf7['off'](_0x5f2dd8[_0x340cea(0x2d6)],this[_0x340cea(0x9a)]);}catch{}this[_0x340cea(0xe6)]&&(clearTimeout(this[_0x340cea(0xe6)]),this[_0x340cea(0xe6)]=null),this[_0x340cea(0x7b)][_0x340cea(0x209)](),this[_0x340cea(0x546)][_0x340cea(0x209)](),this[_0x340cea(0x520)][_0x340cea(0x209)](),this[_0x340cea(0x6f4)][_0x340cea(0x209)](),this['_pendingLocal'][_0x340cea(0x209)]();}[_0x1c2419(0x1d7)](_0x32bed2,_0x22d34a,_0x1b465b,_0x1069d7){return _0x32bed2+'\x00'+_0x22d34a+'\x00'+_0x1b465b+'\x00'+_0x1069d7;}[_0x1c2419(0x627)](_0x9ff229,_0x36f7f8,_0x48e05f,_0x401c20){const _0x3a9926=_0x1c2419,_0x57b1cd=this[_0x3a9926(0x1d7)](_0x9ff229,_0x36f7f8,_0x48e05f,_0x401c20);if(this[_0x3a9926(0x6f4)][_0x3a9926(0x469)](_0x57b1cd))return![];this['_seen'][_0x3a9926(0x3e9)](_0x57b1cd);if(this[_0x3a9926(0x6f4)]['size']>this[_0x3a9926(0x100)]){const _0x4f2b79=this['_seen'][_0x3a9926(0x591)]()[_0x3a9926(0x5c5)]()['value'];this[_0x3a9926(0x6f4)][_0x3a9926(0x95)](_0x4f2b79);}return!![];}[_0x1c2419(0x4e6)](_0x41595c){const _0x7a7e2e=_0x1c2419;if(!this[_0x7a7e2e(0x589)]||!_0x41595c)return;const {env:_0x44fa9d,type:_0x41351f,key:_0x51b061,clock:_0x5ec30b}=_0x41595c;if(_0x44fa9d==null||_0x41351f==null||_0x51b061==null)return;if(typeof _0x44fa9d==='string'&&_0x44fa9d['startsWith']('~'))return;if(typeof _0x41351f===_0x7a7e2e(0xe7)&&_0x41351f[_0x7a7e2e(0x42e)]('~'))return;this['_pendingLocal'][_0x7a7e2e(0x3e9)](this[_0x7a7e2e(0x1d7)](_0x44fa9d,_0x41351f,_0x51b061,_0x5ec30b)),this[_0x7a7e2e(0x655)][_0x7a7e2e(0x35f)]>this['_dedupeMax']&&this[_0x7a7e2e(0x655)][_0x7a7e2e(0x95)](this['_pendingLocal'][_0x7a7e2e(0x591)]()[_0x7a7e2e(0x5c5)]()[_0x7a7e2e(0x101)]);}[_0x1c2419(0x92)](_0x169acf){const _0x4c60f1=_0x1c2419;if(!this[_0x4c60f1(0x589)]||!_0x169acf)return;const {env:_0x5d5e4a,type:_0x526711,key:_0x3c0630,clock:_0x138d52,origin:_0x465c92,action:_0x72741c,newValue:_0x3cbdbf,oldValue:_0x38d446}=_0x169acf;if(_0x5d5e4a==null||_0x526711==null||_0x3c0630==null)return;if(typeof _0x5d5e4a==='string'&&_0x5d5e4a[_0x4c60f1(0x42e)]('~'))return;if(typeof _0x526711===_0x4c60f1(0xe7)&&_0x526711['startsWith']('~'))return;this[_0x4c60f1(0x655)][_0x4c60f1(0x95)](this[_0x4c60f1(0x1d7)](_0x5d5e4a,_0x526711,_0x3c0630,_0x138d52));if(!this[_0x4c60f1(0x627)](_0x5d5e4a,_0x526711,_0x3c0630,_0x138d52))return;const _0x116297=_0x72741c===_0x2fbc26[_0x4c60f1(0x383)]?_0x4c60f1(0x34e):'put';this[_0x4c60f1(0x25c)](_0x4c60f1(0x39a),{'env':_0x5d5e4a,'type':_0x526711,'key':_0x3c0630,'op':_0x116297,'clock':_0x138d52,'origin':_0x465c92,'value':_0x116297==='remove'?null:_0x3cbdbf,'prevValue':_0x38d446});}[_0x1c2419(0x59d)](_0x2374f0){const _0x10efd9=_0x1c2419;if(!this['_started'])return;if(!_0x2374f0||typeof _0x2374f0[_0x10efd9(0x124)]!==_0x10efd9(0xe7)||typeof _0x2374f0[_0x10efd9(0x66f)]!==_0x10efd9(0xe7))return;const {env:_0x1714d0,type:_0x17debf}=_0x2374f0;if(_0x1714d0[_0x10efd9(0x42e)]('~')||_0x17debf['startsWith']('~'))return;this[_0x10efd9(0x7b)][_0x10efd9(0x49d)](_0x1714d0+'\x00'+_0x17debf,{'env':_0x1714d0,'type':_0x17debf}),this[_0x10efd9(0x559)]();}[_0x1c2419(0x559)](){const _0x59e8db=_0x1c2419;if(this['_flushTimer'])return;const _0x37ef46=()=>{const _0x40e1c6=_0x8cd7;this[_0x40e1c6(0xe6)]=null,this[_0x40e1c6(0x5f0)]()['catch'](()=>{});};this[_0x59e8db(0xe6)]=setTimeout(_0x37ef46,this[_0x59e8db(0x346)]>0x0?this['_flushDebounce']:0x0);}async[_0x1c2419(0x5f0)](){const _0x28e808=_0x1c2419;if(this[_0x28e808(0x22a)]){this[_0x28e808(0x559)]();return;}this[_0x28e808(0x22a)]=!![];try{const _0x281294=[...this[_0x28e808(0x7b)][_0x28e808(0x591)]()];this['_pending']['clear']();let _0x575db8=![];for(const {env:_0x1d6e6a,type:_0x1fa8b7}of _0x281294){try{const _0x483d8d=await this['_drainOne'](_0x1d6e6a,_0x1fa8b7);if(_0x483d8d)_0x575db8=!![];}catch{this[_0x28e808(0x7b)][_0x28e808(0x49d)](_0x1d6e6a+'\x00'+_0x1fa8b7,{'env':_0x1d6e6a,'type':_0x1fa8b7}),_0x575db8=!![];}}if(_0x575db8||this[_0x28e808(0x7b)][_0x28e808(0x35f)]>0x0)this[_0x28e808(0x559)]();}finally{this[_0x28e808(0x22a)]=![];}}async[_0x1c2419(0x266)](_0x118af9,_0x48fa7a){const _0x291a58=_0x1c2419,_0x2d5053=await this['okdb'][_0x291a58(0x587)](_0x118af9),_0xdb648=_0x118af9+'\x00'+_0x48fa7a;!this[_0x291a58(0x546)][_0x291a58(0x469)](_0xdb648)&&(!this[_0x291a58(0x520)][_0x291a58(0x469)](_0x118af9)&&(_0x2d5053[_0x291a58(0x30e)](),this['_baselines'][_0x291a58(0x49d)](_0x118af9,_0x2d5053['getClock']()||0x0)),this[_0x291a58(0x546)][_0x291a58(0x49d)](_0xdb648,this['_baselines'][_0x291a58(0x6a)](_0x118af9)));const _0x23fb12=this[_0x291a58(0x546)]['get'](_0xdb648),_0x24b75e=_0x2d5053[_0x291a58(0x670)](_0x48fa7a)||0x0;if(_0x24b75e<=_0x23fb12)return![];const _0x1ca2ae=_0x23fb12+this[_0x291a58(0x57e)],_0x221677=Math[_0x291a58(0x268)](_0x24b75e,_0x1ca2ae),_0x28e2e2=_0x2a1d9e[_0x291a58(0x1f9)]?_0x2a1d9e[_0x291a58(0x127)]():0x0,_0x73e2cd=Array[_0x291a58(0x690)](_0x2d5053['getChanges'](_0x48fa7a,_0x23fb12+0x1,_0x221677));let _0x20fdd6=_0x23fb12;for(const _0x14e89c of _0x73e2cd){const {clock:_0x10f06d,key:_0x569227,action:_0x50e277,origin:_0x531fc2}=_0x14e89c;if(_0x10f06d>_0x20fdd6)_0x20fdd6=_0x10f06d;if(_0x569227==null)continue;if(this[_0x291a58(0x655)][_0x291a58(0x469)](this[_0x291a58(0x1d7)](_0x118af9,_0x48fa7a,_0x569227,_0x10f06d)))continue;if(!this['_markSeen'](_0x118af9,_0x48fa7a,_0x569227,_0x10f06d))continue;let _0x7ee219,_0x2f862e;if(_0x50e277===_0x2fbc26[_0x291a58(0x383)])_0x7ee219=_0x291a58(0x34e),_0x2f862e=null;else{const _0x1f2b62=_0x2d5053[_0x291a58(0x6a)](_0x48fa7a,_0x569227);_0x1f2b62==null?(_0x7ee219='remove',_0x2f862e=null):(_0x7ee219=_0x291a58(0x463),_0x2f862e=_0x1f2b62);}this[_0x291a58(0x25c)](_0x291a58(0x39a),{'env':_0x118af9,'type':_0x48fa7a,'key':_0x569227,'op':_0x7ee219,'clock':_0x10f06d,'origin':_0x531fc2,'value':_0x2f862e});}if(_0x2a1d9e[_0x291a58(0x1f9)])_0x2a1d9e['note'](_0x291a58(0x683)+_0x118af9+':'+_0x48fa7a,_0x2a1d9e['now']()-_0x28e2e2,'n='+_0x73e2cd[_0x291a58(0x39d)]);return this['_cursors']['set'](_0xdb648,Math[_0x291a58(0x68c)](_0x20fdd6,_0x221677)),_0x2d5053[_0x291a58(0x670)](_0x48fa7a)>_0x221677;}[_0x1c2419(0x170)](){const _0x2f3882=_0x1c2419;return{'started':this['_started'],'quantum':this[_0x2f3882(0x57e)],'flushDebounce':this['_flushDebounce'],'cursors':Object[_0x2f3882(0x66e)]([...this['_cursors'][_0x2f3882(0x61d)]()]['map'](([_0x549ecb,_0x35a76c])=>[_0x549ecb[_0x2f3882(0x416)]('\x00',':'),_0x35a76c])),'pending':this[_0x2f3882(0x7b)][_0x2f3882(0x35f)],'seen':this[_0x2f3882(0x6f4)]['size']};}}return _0x527f6d[_0x1c2419(0x32b)]=_0x258028,okdbChangefeed={'OKDBChangefeed':_0x527f6d},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x32d610=_0x3d20e4;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x3f10fd=require$$1$1,_0x43552c=require$$1,{EVENTS:_0x3dbb06}=requireOkdbEnums(),_0x1255e5=require$$0,{slotKey:_0x9cb5b4}=requireOkdbProcessRegistry(),_0x3bd560=Number(process.env.OKDB_CLUSTER_RESPAWN_BACKOFF_MS)||0xfa,_0x5c3569=0xfa0,_0x58c971=0x5,_0x190832=0x2710,_0x59677c=0xbb8,_0x225072=0x7d0,_0x5705b5=_0x32d610(0x4fb),_0x4ac35b=_0x32d610(0x4b1),_0xb8e8e5=_0x32d610(0x24e),_0x434999=_0x32d610(0x609),_0x141e3e=[_0x3dbb06['VIEW_PROGRESS'],_0x3dbb06[_0x32d610(0x673)],_0x3dbb06[_0x32d610(0x18d)],_0x3dbb06[_0x32d610(0x763)],_0x3dbb06[_0x32d610(0x234)],_0x3dbb06[_0x32d610(0x737)],_0x3dbb06[_0x32d610(0x57d)],_0x3dbb06[_0x32d610(0x4ef)],_0x32d610(0x58f),_0x32d610(0x4b7),_0x32d610(0x2cd),_0x32d610(0x523),_0x32d610(0x75a),_0x32d610(0x629)],_0x29dcc0=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0,_0x2930b4=0x64;function _0x345a37(_0x49c622){const _0x37ad85=_0x32d610;if(!_0x49c622)return _0x37ad85(0x359);const _0x420b2b=(_0x49c622[_0x37ad85(0x43e)]||[])[_0x37ad85(0x757)](_0x3cf349=>[_0x3cf349[_0x37ad85(0x124)],_0x3cf349['id'],_0x3cf349[_0x37ad85(0x38b)],_0x3cf349[_0x37ad85(0x1a3)],!!_0x3cf349[_0x37ad85(0x3a5)],!!_0x3cf349[_0x37ad85(0x21c)],!!_0x3cf349[_0x37ad85(0x1d9)],_0x3cf349['heldBy']?.[_0x37ad85(0xee)]??null,_0x3cf349[_0x37ad85(0x492)]?String(_0x3cf349[_0x37ad85(0x492)]?.[_0x37ad85(0x5e6)]??_0x3cf349['error']):null]);return JSON['stringify']([!!_0x49c622['participate'],_0x420b2b]);}function _0x5c8d36({workers:_0x886655,makeOkdb:_0x17b1a8,port:_0x59085f,primaryOkdb:_0x3780de,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0x2bf7dd=_0x32d610;if(_0x3f10fd['isPrimary'])return childEntry&&_0x3f10fd[_0x2bf7dd(0x24b)]({'exec':_0x43552c[_0x2bf7dd(0x10b)](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0xf90b5a=_0x2bf7dd,_0x2b907f=[];for(let _0x8e6858=0x0;_0x8e6858<process[_0xf90b5a(0x496)][_0xf90b5a(0x39d)];_0x8e6858++){const _0x5490c2=process[_0xf90b5a(0x496)][_0x8e6858];if(_0x5490c2[_0xf90b5a(0x42e)](_0xf90b5a(0xdd))||_0x5490c2[_0xf90b5a(0x42e)]('--watch')||_0x5490c2[_0xf90b5a(0x42e)](_0xf90b5a(0x6c4)))continue;if(_0x5490c2==='-e'||_0x5490c2===_0xf90b5a(0x1f8)||_0x5490c2==='-p'||_0x5490c2===_0xf90b5a(0xec)){_0x8e6858++;continue;}_0x2b907f[_0xf90b5a(0x2f9)](_0x5490c2);}return _0x2b907f;})())}),_0x10e97b({'workers':_0x886655,'port':_0x59085f,'primaryOkdb':_0x3780de,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x59085f});return _0x10352c({'makeOkdb':_0x17b1a8,'port':_0x59085f});}function _0x10e97b({workers:_0x427246,port:_0x2df4c8,primaryOkdb:_0x51b18f,workerEnv:_0x500f4d,workerRole:_0x544d34,listenAddr:_0x5b99a2}){const _0x41fa2f=_0x32d610,_0x2a85df=new Map(),_0x5eb382=new Map();let _0x338143=![];const _0x562465=_0x10fcc5=>_0x10fcc5?.[_0x41fa2f(0x26f)],_0x48a9b0=_0x38096d=>{const _0x2569e5=_0x41fa2f,_0xeeacea=_0x3f10fd['fork']({...process.env,..._0x500f4d||{},'OKDB_CLUSTER_SLOT':String(_0x38096d)});return _0xeeacea[_0x2569e5(0x26f)]=_0x38096d,_0x2a85df[_0x2569e5(0x49d)](_0xeeacea[_0x2569e5(0x3d3)]['pid'],{'worker':_0xeeacea,'startedAt':Date[_0x2569e5(0x127)](),'slot':_0x38096d}),_0xeeacea['on']('error',_0x2778bf=>{const _0x4ad0f1=_0x2569e5;console[_0x4ad0f1(0x24e)](_0x4ad0f1(0x1e5)+_0xeeacea[_0x4ad0f1(0x3d3)]['pid']+'\x20ipc\x20error:\x20'+(_0x2778bf?.['message']??_0x2778bf));}),_0xeeacea['on'](_0x2569e5(0x62c),()=>_0x52f2d5()),_0xeeacea;},_0x3c3361=_0x1f1f64=>{const _0xde3acb=_0x41fa2f;for(const {worker:_0x4ecca7}of _0x2a85df[_0xde3acb(0x591)]()){if(_0x4ecca7[_0xde3acb(0x204)]()||!_0x4ecca7['isConnected']())continue;try{_0x4ecca7[_0xde3acb(0x3a7)](_0x1f1f64);}catch{}}};_0x51b18f?.[_0x41fa2f(0x3fd)]?.({'kind':_0x41fa2f(0x73b),'listenAddr':_0x5b99a2})[_0x41fa2f(0x618)](()=>{}),_0x51b18f?.[_0x41fa2f(0x5c9)]?.[_0x41fa2f(0x4db)]?.({'workersConfigured':_0x427246});const _0x11bf2e={'engines':!![],'processors':!![],'compaction':!![],..._0x544d34,'http':!![]},_0x52f2d5=()=>{const _0x4895e4=_0x41fa2f,_0x2e815d=_0x51b18f?.[_0x4895e4(0x5c9)];if(!_0x2e815d||!_0x2e815d[_0x4895e4(0x76)])return;const _0x3756c3=_0x2e815d[_0x4895e4(0x131)];for(const {worker:_0x55eb17,startedAt:_0x3a71e3,slot:_0x21f1d7,stats:_0x3821f8,processing:_0x1fd6d2}of _0x2a85df[_0x4895e4(0x591)]()){if(_0x55eb17[_0x4895e4(0x204)]())continue;const _0x402942=_0x2e815d[_0x4895e4(0x706)]?.()&&_0x2e815d['getDesired'](_0x4895e4(0x257),_0x250a68(_0x21f1d7))?.[_0x4895e4(0x2ac)]===!![];_0x2e815d[_0x4895e4(0x303)]({'pid':_0x55eb17['process']['pid'],'startedAt':_0x3a71e3,'kind':_0x4895e4(0x35d),'supervisorKey':_0x3756c3,'slot':_0x21f1d7,'slotKey':_0x250a68(_0x21f1d7),'role':_0x11bf2e,'listenAddr':_0x5b99a2,'lifecycle':_0x402942?_0x4895e4(0x35a):_0x4895e4(0x364),'processing':_0x1fd6d2??null,'stats':_0x3821f8??null})['catch'](()=>{});}},_0x250a68=_0x5c5e2a=>_0x9cb5b4(_0x41fa2f(0x432)+_0x2df4c8,_0x5c5e2a),_0x250097=_0x241d7c=>{const _0x30c1db=_0x41fa2f,_0x453245=_0x51b18f?.[_0x30c1db(0x5c9)];if(!_0x453245?.[_0x30c1db(0x706)]?.())return![];return _0x453245[_0x30c1db(0x4c0)]('slot',_0x250a68(_0x241d7c))?.[_0x30c1db(0x2ac)]===!![];};for(let _0x4c8c62=0x0;_0x4c8c62<_0x427246;_0x4c8c62++){const _0x1ce94b=_0x250097(_0x4c8c62);_0x5eb382[_0x41fa2f(0x49d)](_0x4c8c62,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x1ce94b,'respawnTimer':null}),_0x1ce94b?console[_0x41fa2f(0x24e)](_0x41fa2f(0x409)+_0x4c8c62+_0x41fa2f(0x334)):_0x48a9b0(_0x4c8c62);}const _0x4bd21c=()=>{const _0x422ee9=_0x41fa2f,_0x18fc64=_0x51b18f?.[_0x422ee9(0x5c9)];if(!_0x18fc64?.[_0x422ee9(0x76)]||!_0x18fc64[_0x422ee9(0x706)]?.())return;for(const [_0x222d3c,_0x447d66]of _0x5eb382[_0x422ee9(0x61d)]()){const _0x4f6985=_0x18fc64[_0x422ee9(0x4c0)](_0x422ee9(0x257),_0x250a68(_0x222d3c)),_0x3aaf05=_0x4f6985?.['decommission']===!![],_0x35a99e=_0x4f6985?.[_0x422ee9(0x435)]===!![];if(_0x3aaf05&&!_0x447d66['dead']){_0x447d66[_0x422ee9(0x368)]=!![];_0x447d66[_0x422ee9(0x651)]&&(clearTimeout(_0x447d66['respawnTimer']),_0x447d66['respawnTimer']=null);for(const {worker:_0x3b19ee}of _0x2a85df[_0x422ee9(0x591)]()){if(_0x562465(_0x3b19ee)!==_0x222d3c||_0x3b19ee[_0x422ee9(0x204)]())continue;try{if(_0x35a99e)_0x3b19ee[_0x422ee9(0x3d3)]['kill'](_0x422ee9(0x476));else _0x3b19ee[_0x422ee9(0x5b7)]()&&_0x3b19ee[_0x422ee9(0x2bf)]();}catch{}}console[_0x422ee9(0x24e)](_0x422ee9(0x716)+(_0x35a99e?'hard-killed':_0x422ee9(0x330))+_0x422ee9(0x183)+_0x222d3c+_0x422ee9(0x382));}else{if(!_0x3aaf05&&_0x447d66[_0x422ee9(0x368)]&&_0x4f6985){_0x447d66[_0x422ee9(0x368)]=![],_0x447d66[_0x422ee9(0x6dd)]=[],_0x447d66[_0x422ee9(0x772)]=0x0;const _0x616370=[..._0x2a85df[_0x422ee9(0x591)]()][_0x422ee9(0x35c)](({worker:_0x212893})=>_0x562465(_0x212893)===_0x222d3c&&!_0x212893[_0x422ee9(0x204)]());!_0x616370&&!_0x338143&&(_0x48a9b0(_0x222d3c),console[_0x422ee9(0x24e)](_0x422ee9(0x74c)+_0x222d3c));}}}},_0x126b93=()=>{try{_0x4bd21c();}catch{}};_0x51b18f?.['events']?.['on']?.(_0x3dbb06['SYSTEM_PROC'],_0x126b93);const _0x5b8f4a=[];if(_0x51b18f?.[_0x41fa2f(0x194)]?.['on'])for(const _0x4b204a of _0x141e3e){const _0x5b581d=_0x7fd832=>{_0x3c3361({[_0x5705b5]:_0x4ac35b,'event':_0x4b204a,'data':_0x7fd832??{}});};_0x51b18f['events']['on'](_0x4b204a,_0x5b581d),_0x5b8f4a['push']({'event':_0x4b204a,'handler':_0x5b581d});}const _0x5ce293=setInterval(()=>{_0x4bd21c(),_0x52f2d5();},_0x29dcc0);_0x5ce293[_0x41fa2f(0xe9)]?.();const _0x2b02f6=(_0x1cf89a,_0x2b90b1)=>{const _0x3274b7=_0x41fa2f;if(!_0x2b90b1||typeof _0x2b90b1!==_0x3274b7(0x5d4)||_0x2b90b1[_0x5705b5]!==_0xb8e8e5)return;if(!_0x51b18f?.[_0x3274b7(0x24e)]?.[_0x3274b7(0x676)])return;const _0x5e3002=_0x2b90b1[_0x3274b7(0x484)]||{};_0x51b18f[_0x3274b7(0x24e)][_0x3274b7(0x676)]({..._0x5e3002,'msg':'[w'+_0x2b90b1[_0x3274b7(0x257)]+']\x20'+(_0x5e3002[_0x3274b7(0x72e)]??''),'meta':{..._0x5e3002[_0x3274b7(0xc9)]||{},'worker':_0x2b90b1[_0x3274b7(0x257)],'workerPid':_0x2b90b1['pid']}});};_0x3f10fd['on'](_0x41fa2f(0x5e6),_0x2b02f6);const _0x3ef83f=(_0x4d0302,_0x571d55)=>{const _0x221f50=_0x41fa2f;if(!_0x571d55||typeof _0x571d55!==_0x221f50(0x5d4)||_0x571d55[_0x5705b5]!==_0x434999)return;const _0x1bb621=_0x2a85df['get'](_0x4d0302[_0x221f50(0x3d3)]['pid']);if(_0x1bb621){_0x1bb621[_0x221f50(0x609)]={..._0x571d55['stats'],'at':Date['now']()};if(_0x571d55['processing']!==undefined){const _0x2f767a=_0x345a37(_0x571d55[_0x221f50(0x40f)]);_0x2f767a!==_0x1bb621[_0x221f50(0x25e)]&&(_0x1bb621['processingSig']=_0x2f767a,_0x3674b6()),_0x1bb621['processing']=_0x571d55[_0x221f50(0x40f)];}}};let _0x370b8f=null;const _0x3674b6=()=>{const _0x73ee18=_0x41fa2f;if(_0x370b8f||_0x338143)return;_0x370b8f=setTimeout(()=>{_0x370b8f=null;if(!_0x338143)_0x52f2d5();},_0x2930b4),_0x370b8f[_0x73ee18(0xe9)]?.();};_0x3f10fd['on'](_0x41fa2f(0x5e6),_0x3ef83f),_0x3f10fd['on'](_0x41fa2f(0x4e7),(_0x4d5aec,_0x350dfe,_0x44b6d5)=>{const _0x84a5de=_0x41fa2f,_0x2e24fe=_0x4d5aec['process'][_0x84a5de(0xee)],_0x138285=_0x562465(_0x4d5aec),_0x483f21=_0x2a85df['get'](_0x2e24fe);if(_0x483f21&&_0x51b18f?.[_0x84a5de(0x5c9)])_0x51b18f[_0x84a5de(0x5c9)][_0x84a5de(0x2c9)](_0x2e24fe+':'+_0x483f21[_0x84a5de(0x698)])[_0x84a5de(0x618)](()=>{});_0x2a85df['delete'](_0x2e24fe),console[_0x84a5de(0x24e)](_0x84a5de(0x1e5)+_0x2e24fe+_0x84a5de(0x371)+(_0x138285??'?')+')\x20exited\x20'+(_0x84a5de(0xcd)+_0x350dfe+_0x84a5de(0x1cd)+(_0x44b6d5??_0x84a5de(0x4c7))+_0x84a5de(0x450)+_0x2a85df['size']+_0x84a5de(0xa7))),_0x52f2d5();if(_0x338143||_0x138285==null)return;const _0x15a593=_0x5eb382['get'](_0x138285);if(!_0x15a593||_0x15a593[_0x84a5de(0x368)])return;const _0x19fb50=Date[_0x84a5de(0x127)]();_0x15a593[_0x84a5de(0x6dd)][_0x84a5de(0x2f9)](_0x19fb50),_0x15a593[_0x84a5de(0x6dd)]=_0x15a593[_0x84a5de(0x6dd)][_0x84a5de(0x293)](_0x3cc6e5=>_0x19fb50-_0x3cc6e5<=_0x190832);if(_0x15a593[_0x84a5de(0x6dd)][_0x84a5de(0x39d)]>=_0x58c971){_0x15a593[_0x84a5de(0x368)]=!![],console[_0x84a5de(0x492)]('[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot='+_0x138285+'\x20died\x20'+_0x15a593[_0x84a5de(0x6dd)]['length']+'\x20times\x20in\x20'+(_0x190832+_0x84a5de(0x22e)+_0x2a85df['size']+_0x84a5de(0x3d0)));return;}_0x15a593['consecutiveFailures']++;const _0x498ba2=Math[_0x84a5de(0x268)](_0x5c3569,_0x3bd560*0x2**(_0x15a593[_0x84a5de(0x772)]-0x1));console[_0x84a5de(0x24e)]('[okdb-cluster]\x20respawning\x20worker\x20slot='+_0x138285+_0x84a5de(0x644)+_0x498ba2+'ms\x20(attempt\x20'+_0x15a593[_0x84a5de(0x772)]+')'),_0x15a593[_0x84a5de(0x651)]=setTimeout(()=>{const _0x150cb7=_0x84a5de;_0x15a593[_0x150cb7(0x651)]=null;if(_0x338143||_0x15a593[_0x150cb7(0x368)])return;const _0x177f96=_0x48a9b0(_0x138285);_0x177f96[_0x150cb7(0x375)](_0x150cb7(0x397),()=>{const _0x343fd7=_0x150cb7;if(_0x5eb382['get'](_0x138285)===_0x15a593)_0x15a593[_0x343fd7(0x772)]=0x0;});},_0x498ba2),_0x15a593[_0x84a5de(0x651)]['unref']?.();});const _0x148bb2=[..._0x2a85df[_0x41fa2f(0x6d8)]()];console[_0x41fa2f(0x24e)](_0x41fa2f(0x35b)+process[_0x41fa2f(0xee)]+'\x20forked\x20'+_0x427246+'\x20HTTP\x20server(s)\x20on\x20port\x20'+_0x2df4c8+':\x20'+('['+_0x148bb2[_0x41fa2f(0x10b)](',\x20')+']'));const _0x3fa56c={'_isClusterController':!![],'port':_0x2df4c8,'primaryOkdb':_0x51b18f??null,'status'(){const _0x20e815=_0x41fa2f;return{'clustered':!![],'primaryPid':process[_0x20e815(0xee)],'port':_0x2df4c8,'primaryRole':_0x51b18f?.[_0x20e815(0x132)]??null,'processorPid':null,'supervisorPid':process[_0x20e815(0xee)],'workers':[..._0x2a85df['values']()][_0x20e815(0x757)](({worker:_0x5360e8})=>({'pid':_0x5360e8[_0x20e815(0x3d3)]['pid'],'id':_0x5360e8['id'],'dead':_0x5360e8[_0x20e815(0x204)]()}))};},async 'close'(){const _0x5c1979=_0x41fa2f;_0x338143=!![];for(const _0x2f957c of _0x5eb382[_0x5c1979(0x591)]()){_0x2f957c[_0x5c1979(0x368)]=!![],_0x2f957c[_0x5c1979(0x651)]&&(clearTimeout(_0x2f957c[_0x5c1979(0x651)]),_0x2f957c[_0x5c1979(0x651)]=null);}clearInterval(_0x5ce293);_0x370b8f&&(clearTimeout(_0x370b8f),_0x370b8f=null);_0x3f10fd[_0x5c1979(0x567)](_0x5c1979(0x5e6),_0x2b02f6),_0x3f10fd[_0x5c1979(0x567)]('message',_0x3ef83f),_0x51b18f?.['events']?.[_0x5c1979(0x567)]?.(_0x3dbb06[_0x5c1979(0x6f0)],_0x126b93);if(_0x51b18f?.[_0x5c1979(0x194)]?.[_0x5c1979(0x567)])for(const {event:_0x46c782,handler:_0x29c24d}of _0x5b8f4a){try{_0x51b18f[_0x5c1979(0x194)][_0x5c1979(0x567)](_0x46c782,_0x29c24d);}catch{}}_0x5b8f4a[_0x5c1979(0x39d)]=0x0;const _0x285138=[..._0x2a85df['values']()][_0x5c1979(0x757)](({worker:_0xa45c7a})=>_0xa45c7a);if(_0x285138['length']===0x0)return;await Promise[_0x5c1979(0x438)](_0x285138[_0x5c1979(0x757)](_0x10b51d=>new Promise(_0xdc7d1d=>{const _0x273b9c=_0x5c1979;if(_0x10b51d[_0x273b9c(0x204)]()){_0xdc7d1d();return;}let _0x5a597a=![];const _0x5061a5=()=>{if(_0x5a597a)return;_0x5a597a=!![];if(_0x2d1ee0)clearTimeout(_0x2d1ee0);_0xdc7d1d();};_0x10b51d[_0x273b9c(0x375)]('exit',_0x5061a5);const _0x2d1ee0=setTimeout(()=>{const _0x4bbf1a=_0x273b9c;try{_0x10b51d[_0x4bbf1a(0x3d3)][_0x4bbf1a(0x435)]();}catch{}},_0x59677c+0x1f4);_0x2d1ee0[_0x273b9c(0xe9)]?.();try{_0x10b51d['disconnect']();}catch{try{_0x10b51d['process'][_0x273b9c(0x435)]();}catch{}}})));}};return _0x3fa56c;}async function _0x10352c({makeOkdb:_0x6bbc0a,port:_0x3e0625}){const _0x3b5a22=_0x32d610,_0xd9b76a=await _0x6bbc0a();return _0x39d9a2(_0xd9b76a),_0xd9b76a['http'][_0x3b5a22(0x289)](_0x3e0625);}function _0x39d9a2(_0x3c6e8b){const _0xd8973=_0x32d610;if(!_0x3c6e8b||_0x3c6e8b[_0xd8973(0xb7)])return;_0x3c6e8b[_0xd8973(0xb7)]=!![];try{const {OKDBChangefeed:_0x19ee78}=requireOkdbChangefeed(),_0x5c9cc9=_0x3c6e8b[_0xd8973(0x5f4)];if(_0x5c9cc9&&typeof _0x5c9cc9[_0xd8973(0x541)]===_0xd8973(0x372)){const _0x57e311=new _0x19ee78(_0x3c6e8b);_0x57e311[_0xd8973(0x570)](),_0x5c9cc9[_0xd8973(0x541)](_0x57e311),_0x3c6e8b[_0xd8973(0x45c)]=_0x57e311;}}catch(_0x401f0c){_0x3c6e8b[_0xd8973(0x24e)]?.[_0xd8973(0x6a7)]?.(_0xd8973(0x48d)+(_0x401f0c?.['message']??_0x401f0c),{'feature':_0xd8973(0x2bd)});}const _0x4098aa=_0x4e655a=>{const _0x549f35=_0xd8973;if(!_0x4e655a||typeof _0x4e655a!==_0x549f35(0x5d4)||_0x4e655a[_0x5705b5]==null)return;if(_0x4e655a[_0x5705b5]===_0x4ac35b)try{_0x3c6e8b['_adminRelay']?.[_0x549f35(0x4ea)]?.(_0x4e655a[_0x549f35(0x6bf)],_0x4e655a[_0x549f35(0x32e)]);}catch{}};process['on'](_0xd8973(0x5e6),_0x4098aa),_0x3c6e8b[_0xd8973(0x714)]=_0x4098aa;{let _0x5ed782=process[_0xd8973(0x4d5)](),_0x50a42c=Date[_0xd8973(0x127)]();const _0x3ea162=()=>{const _0x201adb=_0xd8973;if(typeof process[_0x201adb(0x3a7)]!==_0x201adb(0x372)||!process[_0x201adb(0x623)])return;const _0x3e8f93=Date[_0x201adb(0x127)](),_0x5754a6=process['cpuUsage'](),_0x1c684c=(_0x3e8f93-_0x50a42c)*0x3e8,_0x1d426e=_0x5754a6[_0x201adb(0x9b)]-_0x5ed782[_0x201adb(0x9b)]+(_0x5754a6['system']-_0x5ed782[_0x201adb(0x619)]),_0x225149=_0x1c684c>0x0?Math[_0x201adb(0x268)](0x64,Math[_0x201adb(0x139)](_0x1d426e/(_0x1c684c*(_0x1255e5[_0x201adb(0x19c)]()[_0x201adb(0x39d)]||0x1))*0x64)):0x0;_0x5ed782=_0x5754a6,_0x50a42c=_0x3e8f93;const _0x347db2=process[_0x201adb(0x14d)]();let _0x37987e=null;try{_0x37987e=_0x3c6e8b[_0x201adb(0x132)]?.[_0x201adb(0x43e)]?_0x3c6e8b[_0x201adb(0x5c9)]?.[_0x201adb(0x734)]?.()??null:null;}catch{}try{process[_0x201adb(0x3a7)]({[_0x5705b5]:_0x434999,'stats':{'rss':_0x347db2[_0x201adb(0x60d)],'heapUsed':_0x347db2[_0x201adb(0x497)],'heapTotal':_0x347db2[_0x201adb(0x6f1)],'external':_0x347db2[_0x201adb(0x46a)],'cpuPct':_0x225149,'cpuWindowMs':Math['round'](_0x1c684c/0x3e8)||null},'processing':_0x37987e});}catch{}},_0x324c9d=Math[_0xd8973(0x68c)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x3a3228=setInterval(_0x3ea162,_0x324c9d);_0x3a3228[_0xd8973(0xe9)]?.(),_0x3ea162();for(const _0xb4ed2b of[_0xd8973(0x523),_0xd8973(0x75a)]){_0x3c6e8b['events']?.['on']?.(_0xb4ed2b,()=>{try{_0x3ea162();}catch{}});}}let _0x35aa08=![];const _0x24bc87=async _0x2ba6fb=>{const _0x18115c=_0xd8973;if(_0x35aa08)return;_0x35aa08=!![];const _0x9efa9e=setTimeout(()=>process[_0x18115c(0x4e7)](_0x2ba6fb),_0x59677c);_0x9efa9e['unref']?.();try{await _0x3c6e8b['close']?.();}catch{}process[_0x18115c(0x4e7)](_0x2ba6fb);};process['on']('disconnect',()=>_0x24bc87(0x0));if(process[_0xd8973(0x3a7)]&&!process[_0xd8973(0x623)])_0x24bc87(0x0);if(process[_0xd8973(0x379)]!==_0xd8973(0x73f)){const _0x1fd34a=setInterval(()=>{if(process['ppid']===0x1)_0x24bc87(0x0);},_0x225072);_0x1fd34a[_0xd8973(0xe9)]?.(),_0x3c6e8b[_0xd8973(0x424)]=_0x1fd34a;}}return okdbCluster={'runClustered':_0x5c8d36,'attachWorkerCluster':_0x39d9a2},okdbCluster;}var okdbHttp={'exports':{}},okdbMetrics,hasRequiredOkdbMetrics;function requireOkdbMetrics(){const _0x5858de=_0x3d20e4;if(hasRequiredOkdbMetrics)return okdbMetrics;hasRequiredOkdbMetrics=0x1;const _0x22235=0x3c;function _0x23e0f8(){return{'requests':0x0,'reads':0x0,'writes':0x0,'errors':0x0,'readMs':0x0,'writeMs':0x0};}class _0x5bfba7{constructor(){const _0x44afb7=_0x8cd7;this['_totalRequests']=0x0,this[_0x44afb7(0x18a)]=0x0,this['_totalWrites']=0x0,this[_0x44afb7(0x442)]=0x0,this[_0x44afb7(0x310)]=0x0,this[_0x44afb7(0x3f7)]=0x0,this[_0x44afb7(0x84)]=Array['from']({'length':_0x22235},_0x23e0f8),this['_bucketIdx']=0x0,this['_lastTick']=Date[_0x44afb7(0x127)](),this[_0x44afb7(0x577)]=setInterval(()=>this['_rotateBucket'](),0x3e8);if(this['_timer'][_0x44afb7(0xe9)])this['_timer']['unref']();}[_0x5858de(0x5d5)](){const _0xee5ac1=_0x5858de;this[_0xee5ac1(0xe1)]=(this[_0xee5ac1(0xe1)]+0x1)%_0x22235,this['_buckets'][this['_bucketIdx']]=_0x23e0f8(),this[_0xee5ac1(0x15e)]=Date[_0xee5ac1(0x127)]();}[_0x5858de(0x54d)](_0x340ecf,_0x26201b,_0x4ca55d){const _0x32cc7a=_0x5858de,_0x336bd4=/^(POST|PUT|PATCH|DELETE)$/i[_0x32cc7a(0x155)](_0x340ecf),_0x5aeb81=this[_0x32cc7a(0x84)][this[_0x32cc7a(0xe1)]];this[_0x32cc7a(0xb9)]++,_0x5aeb81['requests']++,_0x4ca55d&&(this[_0x32cc7a(0x442)]++,_0x5aeb81[_0x32cc7a(0x422)]++),_0x336bd4?(this[_0x32cc7a(0x60b)]++,this[_0x32cc7a(0x3f7)]+=_0x26201b,_0x5aeb81[_0x32cc7a(0x6e7)]++,_0x5aeb81[_0x32cc7a(0xe3)]+=_0x26201b):(this['_totalReads']++,this[_0x32cc7a(0x310)]+=_0x26201b,_0x5aeb81[_0x32cc7a(0x742)]++,_0x5aeb81[_0x32cc7a(0x2da)]+=_0x26201b);}[_0x5858de(0x609)](){const _0x471a96=_0x5858de;let _0x51c2e2=0x0,_0x183710=0x0,_0x124382=0x0,_0x67b58=0x0,_0x450ba8=0x0,_0xd81342=0x0;for(const _0x1d9b85 of this[_0x471a96(0x84)]){_0x51c2e2+=_0x1d9b85[_0x471a96(0x21e)],_0x183710+=_0x1d9b85[_0x471a96(0x742)],_0x124382+=_0x1d9b85[_0x471a96(0x6e7)],_0x67b58+=_0x1d9b85[_0x471a96(0x422)],_0x450ba8+=_0x1d9b85[_0x471a96(0x2da)],_0xd81342+=_0x1d9b85[_0x471a96(0xe3)];}const _0x47f084=_0x22235;return{'lifetime':{'requests':this[_0x471a96(0xb9)],'reads':this[_0x471a96(0x18a)],'writes':this['_totalWrites'],'errors':this[_0x471a96(0x442)],'avgReadMs':this['_totalReads']>0x0?+(this[_0x471a96(0x310)]/this[_0x471a96(0x18a)])[_0x471a96(0x72c)](0x2):null,'avgWriteMs':this['_totalWrites']>0x0?+(this[_0x471a96(0x3f7)]/this[_0x471a96(0x60b)])[_0x471a96(0x72c)](0x2):null},'window':{'seconds':_0x47f084,'requests':_0x51c2e2,'reads':_0x183710,'writes':_0x124382,'errors':_0x67b58,'reqPerSec':+(_0x51c2e2/_0x47f084)[_0x471a96(0x72c)](0x2),'readPerSec':+(_0x183710/_0x47f084)['toFixed'](0x2),'writePerSec':+(_0x124382/_0x47f084)[_0x471a96(0x72c)](0x2),'avgReadMs':_0x183710>0x0?+(_0x450ba8/_0x183710)['toFixed'](0x2):null,'avgWriteMs':_0x124382>0x0?+(_0xd81342/_0x124382)[_0x471a96(0x72c)](0x2):null}};}[_0x5858de(0x44f)](){const _0xf84bf9=_0x5858de;clearInterval(this[_0xf84bf9(0x577)]);}}return okdbMetrics=_0x5bfba7,okdbMetrics;}var okdbAuthNamespaces,hasRequiredOkdbAuthNamespaces;function requireOkdbAuthNamespaces(){const _0x270a48=_0x3d20e4;if(hasRequiredOkdbAuthNamespaces)return okdbAuthNamespaces;hasRequiredOkdbAuthNamespaces=0x1;const _0x5c0d3f={'data':{'label':'Data','scope':_0x270a48(0x124),'description':_0x270a48(0x4f5),'operations':{'read':{'label':'Read','summary':'Get\x20and\x20list\x20records,\x20run\x20byIndex\x20queries.'},'write':{'label':'Write','summary':'Create,\x20update,\x20and\x20delete\x20records\x20(including\x20bulk\x20import).'}}},'schema':{'label':_0x270a48(0x8e),'scope':_0x270a48(0x124),'description':_0x270a48(0x80),'operations':{'read':{'label':'Read','summary':'List\x20types,\x20get\x20type\x20schema,\x20list\x20registered\x20indexes.'},'write':{'label':_0x270a48(0xa0),'summary':_0x270a48(0x1fb)}}},'search':{'label':'Search','scope':_0x270a48(0x124),'description':'Run\x20searches\x20against\x20registered\x20FTS\x20and\x20vector\x20indexes.','operations':{'query':{'label':'Query','summary':'Execute\x20full-text\x20and\x20vector\x20searches.'}}},'queue':{'label':_0x270a48(0x12c),'scope':_0x270a48(0x124),'description':_0x270a48(0x387),'operations':{'read':{'label':_0x270a48(0x2eb),'summary':_0x270a48(0x104)},'write':{'label':'Write','summary':_0x270a48(0x34b)},'work':{'label':_0x270a48(0x449),'summary':'Worker-side:\x20claim,\x20heartbeat,\x20complete,\x20fail,\x20progress.'}}},'files':{'label':_0x270a48(0x6a8),'scope':_0x270a48(0x124),'description':_0x270a48(0x77b),'operations':{'read':{'label':_0x270a48(0x2eb),'summary':_0x270a48(0x21d)},'write':{'label':_0x270a48(0xa0),'summary':'Upload,\x20update\x20metadata,\x20and\x20delete\x20files.'}}},'functions':{'label':_0x270a48(0x65e),'scope':_0x270a48(0x124),'description':_0x270a48(0x514),'operations':{'read':{'label':_0x270a48(0x2eb),'summary':_0x270a48(0x4fa)},'write':{'label':_0x270a48(0xa0),'summary':_0x270a48(0x6d4)},'run':{'label':_0x270a48(0x3fc),'summary':'Execute\x20functions\x20over\x20HTTP/MCP/shell.'}}},'views':{'label':_0x270a48(0x2ab),'scope':_0x270a48(0x124),'description':'Materialized\x20views:\x20query\x20definitions\x20that\x20are\x20continuously\x20maintained\x20and\x20queryable.','operations':{'read':{'label':_0x270a48(0x2eb),'summary':'List\x20views,\x20query\x20view\x20output,\x20inspect\x20metadata\x20and\x20definition.'},'write':{'label':'Write','summary':'Create\x20and\x20delete\x20views,\x20start,\x20stop,\x20and\x20rebuild\x20them.'}}},'env':{'label':_0x270a48(0x434),'scope':'env','description':_0x270a48(0x748),'operations':{'read':{'label':_0x270a48(0x2eb),'summary':'List\x20environments\x20and\x20read\x20environment\x20info.'},'write':{'label':_0x270a48(0xa0),'summary':_0x270a48(0x1a7)}}},'auth':{'label':_0x270a48(0x4a9),'scope':_0x270a48(0x619),'description':_0x270a48(0x708),'operations':{'read':{'label':_0x270a48(0x2eb),'summary':_0x270a48(0x728)},'write':{'label':'Write','summary':'Create,\x20update,\x20and\x20delete\x20tokens\x20and\x20users;\x20rotate\x20keys.'}}},'system':{'label':_0x270a48(0x68f),'scope':'system','description':_0x270a48(0x3de),'operations':{'read':{'label':_0x270a48(0x2eb),'summary':'View\x20server\x20info,\x20logs,\x20SSE\x20event\x20streams,\x20processor\x20status,\x20backup\x20list.'},'write':{'label':'Write','summary':_0x270a48(0x1d5)}}},'sync':{'label':_0x270a48(0x2ec),'scope':_0x270a48(0x619),'description':'Cluster\x20replication.\x20The\x20\x22peer\x22\x20op\x20is\x20for\x20cluster\x20nodes,\x20not\x20human\x20users.','operations':{'read':{'label':'Read','summary':_0x270a48(0x744)},'write':{'label':_0x270a48(0xa0),'summary':'Register,\x20configure,\x20and\x20remove\x20cluster\x20peers.'},'peer':{'label':_0x270a48(0x1fc),'summary':_0x270a48(0x64e),'machineOnly':!![]}}},'protected':{'label':_0x270a48(0x243),'scope':_0x270a48(0x692),'description':_0x270a48(0x6e2),'operations':{'read':{'label':'Read','summary':_0x270a48(0xce)},'write':{'label':_0x270a48(0xa0),'summary':_0x270a48(0x415)}}}},_0x29f4ac={'schema:read':['data:read','data:write',_0x270a48(0x2d5)]},_0x1ecdf6=[_0x270a48(0x41b),_0x270a48(0x684),_0x270a48(0x388),'write',_0x270a48(0x220),'peer'];function _0x38c599(){const _0x3349f0=_0x270a48,_0x45e968=[];for(const [_0x4915ce,_0x581e53]of Object[_0x3349f0(0x61d)](_0x5c0d3f)){for(const _0x527c2e of Object[_0x3349f0(0x6d8)](_0x581e53[_0x3349f0(0x2f7)])){_0x45e968[_0x3349f0(0x2f9)](_0x4915ce+':'+_0x527c2e);}}return _0x45e968;}function _0x2d88f2(_0xbf25b6){return _0x5c0d3f[_0xbf25b6]||null;}function _0x7ccb14(_0x3d8a23,_0x37769b){const _0x4a9c20=_0x270a48;return _0x5c0d3f[_0x3d8a23]?.[_0x4a9c20(0x2f7)][_0x37769b]||null;}return okdbAuthNamespaces={'NAMESPACES':_0x5c0d3f,'IMPLIED_BY':_0x29f4ac,'OP_ORDER':_0x1ecdf6,'listAllPermissions':_0x38c599,'getNamespaceMeta':_0x2d88f2,'getOperationMeta':_0x7ccb14},okdbAuthNamespaces;}var okdbAuthPermissions,hasRequiredOkdbAuthPermissions;function requireOkdbAuthPermissions(){const _0x10d35d=_0x3d20e4;if(hasRequiredOkdbAuthPermissions)return okdbAuthPermissions;hasRequiredOkdbAuthPermissions=0x1;const {IMPLIED_BY:_0x3a609f}=requireOkdbAuthNamespaces(),_0x5b03a2=new Set([_0x10d35d(0x41b),'query']);function _0x5e4cc2(_0x5e568a,_0xba93bd){const _0x14499c=_0x10d35d;if(!Array[_0x14499c(0x339)](_0x5e568a)||_0x5e568a[_0x14499c(0x39d)]===0x0)return![];for(const _0x235ac1 of _0x5e568a){if(typeof _0x235ac1!==_0x14499c(0xe7)||!_0x235ac1['includes'](':')){if(_0x235ac1==='*')return!![];continue;}const [_0x5d6683,_0x4efcc9]=_0x235ac1[_0x14499c(0x2aa)](':'),[_0x3b2560,_0x5914b7]=_0xba93bd[_0x14499c(0x2aa)](':'),_0x48105d=_0x5d6683==='*'||_0x5d6683===_0x3b2560,_0x560b3c=_0x4efcc9==='*'||_0x4efcc9===_0x5914b7;if(_0x48105d&&_0x560b3c)return!![];}const _0xaec9fa=_0x3a609f[_0xba93bd];if(_0xaec9fa)for(const _0x42f703 of _0xaec9fa){if(_0x5e4cc2(_0x5e568a,_0x42f703))return!![];}return![];}function _0x5478b3(_0x58f19a,_0x5e0e73){const _0x8ed23d=_0x10d35d,_0x39702e=new Set();if(Array[_0x8ed23d(0x339)](_0x58f19a)){for(const _0x85eda2 of _0x58f19a)_0x39702e[_0x8ed23d(0x3e9)](_0x85eda2);}if(Array[_0x8ed23d(0x339)](_0x5e0e73)){for(const _0x11e923 of _0x5e0e73)_0x39702e[_0x8ed23d(0x3e9)](_0x11e923);}return Array[_0x8ed23d(0x690)](_0x39702e);}function _0x6f1e08(_0x5bc743){const _0x2ab403=_0x10d35d;if(typeof _0x5bc743!==_0x2ab403(0xe7))return![];const [,_0x1c1a26]=_0x5bc743['split'](':');return _0x5b03a2[_0x2ab403(0x469)](_0x1c1a26);}function _0x556569(_0x495a67){const _0x543c69=_0x10d35d;return _0x6f1e08(_0x495a67)?_0x543c69(0x70c):_0x543c69(0x22f);}function _0x4b875c(_0x2937f5,_0x358524){const _0x2cf2e8=_0x10d35d;return _0x5478b3(_0x2937f5[_0x2cf2e8(0x1f4)]||[],_0x358524?(_0x2937f5['grants']||{})[_0x358524]||[]:[]);}function _0x17ac42(_0x2a1d94){const _0x43c386=_0x10d35d,_0x3bd3bb=[];for(const _0x46f9a5 of _0x2a1d94[_0x43c386(0x562)]()){const _0x582d93=_0x46f9a5['operation']?.[_0x43c386(0x2af)];if(!_0x582d93)continue;_0x582d93[_0x43c386(0x3fa)]&&!_0x582d93[_0x43c386(0x6b)]&&_0x3bd3bb['push'](_0x46f9a5['method']+'\x20'+_0x46f9a5[_0x43c386(0x4c5)]+'\x20(id:\x20'+(_0x46f9a5['operation']['id']??'?')+')');}if(_0x3bd3bb[_0x43c386(0x39d)])throw new Error(_0x43c386(0x553)+_0x3bd3bb['join'](_0x43c386(0x82)));}return okdbAuthPermissions={'hasPermission':_0x5e4cc2,'unionPermissions':_0x5478b3,'isReadOperation':_0x6f1e08,'resolveProtectedGate':_0x556569,'getEffectivePermissions':_0x4b875c,'assertEveryRouteHasPermission':_0x17ac42},okdbAuthPermissions;}var okdbJwtUtils,hasRequiredOkdbJwtUtils;function requireOkdbJwtUtils(){if(hasRequiredOkdbJwtUtils)return okdbJwtUtils;hasRequiredOkdbJwtUtils=0x1;const _0x350e6d=require$$0$7,_0x536b05=require$$1$2,_0x27d487=require$$2$1;function _0x19bac0(_0x474627){const _0x1d697a=_0x8cd7,_0x362865=String(_0x474627||'')[_0x1d697a(0x416)](/-/g,'+')['replace'](/_/g,'/'),_0x98dffb=_0x362865+'='[_0x1d697a(0x4d9)]((0x4-(_0x362865[_0x1d697a(0x39d)]%0x4||0x4))%0x4);return Buffer[_0x1d697a(0x690)](_0x98dffb,_0x1d697a(0x154));}function _0xca284e(_0x9fabfb){const _0x1a9b6a=_0x8cd7;if(typeof _0x9fabfb!==_0x1a9b6a(0xe7))throw new Error(_0x1a9b6a(0x636));const _0x511df8=_0x9fabfb[_0x1a9b6a(0x2aa)]('.');if(_0x511df8[_0x1a9b6a(0x39d)]!==0x3)throw new Error(_0x1a9b6a(0x2cb));const [_0x4f8101,_0x45dd9f,_0x2ffcc5]=_0x511df8,_0x53db6e=JSON['parse'](_0x19bac0(_0x4f8101)[_0x1a9b6a(0x240)](_0x1a9b6a(0x320))),_0x286d55=JSON[_0x1a9b6a(0xc3)](_0x19bac0(_0x45dd9f)['toString'](_0x1a9b6a(0x320)));return{'header':_0x53db6e,'payload':_0x286d55,'signature':_0x19bac0(_0x2ffcc5),'signingInput':Buffer[_0x1a9b6a(0x690)](_0x4f8101+'.'+_0x45dd9f),'encodedHeader':_0x4f8101,'encodedPayload':_0x45dd9f};}function _0x50a060(_0x4e6ff1){const _0x5aee7d=_0x8cd7;if(Array[_0x5aee7d(0x339)](_0x4e6ff1))return _0x4e6ff1;if(_0x4e6ff1==null)return[];return[_0x4e6ff1];}function _0x4e28cb(_0x23eaed){const _0x390076=_0x8cd7,_0x28833c=String(_0x23eaed||'')[_0x390076(0x581)](/.{1,64}/g)||[];return _0x390076(0x4a3)+_0x28833c[_0x390076(0x10b)]('\x0a')+'\x0a-----END\x20CERTIFICATE-----\x0a';}function _0x254aa6(_0x2e57e9={}){const _0x49848b=_0x8cd7;if(_0x2e57e9[_0x49848b(0x18f)]?.[0x0])return _0x27d487[_0x49848b(0x9c)](_0x4e28cb(_0x2e57e9['x5c'][0x0]));return _0x27d487[_0x49848b(0x9c)]({'key':_0x2e57e9,'format':_0x49848b(0x3d6)});}function _0x44c2f2(_0x18b914,_0x566551,_0x279abb,_0x3ca101){const _0x563f3e=_0x8cd7;if(_0x18b914==='RS256')return _0x27d487[_0x563f3e(0x6de)](_0x563f3e(0x1ce),_0x279abb,_0x566551,_0x3ca101);if(_0x18b914===_0x563f3e(0x612))return _0x27d487[_0x563f3e(0x6de)]('sha256',_0x279abb,{'key':_0x566551,'dsaEncoding':_0x563f3e(0x4de)},_0x3ca101);return![];}function _0x38cb41(_0xf422e1){const _0x149bb6=_0x8cd7;if(typeof commonjsGlobal['fetch']===_0x149bb6(0x372))return commonjsGlobal['fetch'](_0xf422e1,{'headers':{'accept':_0x149bb6(0x754)}})[_0x149bb6(0xad)](async _0x1c0492=>{const _0x4bc870=_0x149bb6;if(!_0x1c0492['ok']){const _0x301b22=new Error(_0x4bc870(0x1e1)+_0x1c0492[_0x4bc870(0x170)]+_0x4bc870(0x11a)+_0xf422e1);_0x301b22[_0x4bc870(0x170)]=_0x1c0492[_0x4bc870(0x170)];throw _0x301b22;}return _0x1c0492['json']();});return new Promise((_0x5528b0,_0x959c30)=>{const _0x3cd19c=_0x149bb6,_0x583fed=String(_0xf422e1)[_0x3cd19c(0x42e)](_0x3cd19c(0x1d0))?_0x536b05:_0x350e6d,_0x3bf647=_0x583fed['get'](_0xf422e1,{'headers':{'accept':_0x3cd19c(0x754)}},_0x226682=>{const _0x4ad874=_0x3cd19c;let _0x526b64='';_0x226682['setEncoding'](_0x4ad874(0x320)),_0x226682['on'](_0x4ad874(0x32e),_0x9f172e=>{_0x526b64+=_0x9f172e;}),_0x226682['on'](_0x4ad874(0xe5),()=>{const _0x468319=_0x4ad874;if(_0x226682['statusCode']<0xc8||_0x226682[_0x468319(0x3e6)]>=0x12c){const _0x70d032=new Error(_0x468319(0x1e1)+_0x226682[_0x468319(0x3e6)]+_0x468319(0x11a)+_0xf422e1);return _0x70d032['status']=_0x226682[_0x468319(0x3e6)],_0x959c30(_0x70d032);}try{_0x5528b0(JSON['parse'](_0x526b64||'{}'));}catch(_0x4e2a24){_0x959c30(_0x4e2a24);}});});_0x3bf647['on']('error',_0x959c30),_0x3bf647[_0x3cd19c(0xe5)]();});}return okdbJwtUtils={'base64UrlDecode':_0x19bac0,'parseJwt':_0xca284e,'normalizeAudience':_0x50a060,'normalizePemCertificate':_0x4e28cb,'jwkToKeyObject':_0x254aa6,'verifyJwtSignature':_0x44c2f2,'fetchJson':_0x38cb41},okdbJwtUtils;}var hasRequiredOkdbHttp;function requireOkdbHttp(){const _0x398641=_0x3d20e4;if(hasRequiredOkdbHttp)return okdbHttp[_0x398641(0x71d)];hasRequiredOkdbHttp=0x1;const _0x1a5019=require$$0$7,{URL:_0x1d8af8}=require$$2$2,_0x1c47b3=requireOkdbMetrics(),_0x42d881=requireOkdbAuthTokens(),{hasPermission:_0x1d012a,unionPermissions:_0x1cd758,resolveProtectedGate:_0x32f72e}=requireOkdbAuthPermissions(),_0x341cf6={0x190:_0x398641(0x347),0x191:_0x398641(0x1ec),0x193:'FORBIDDEN',0x194:'NOT_FOUND',0x195:_0x398641(0x273),0x198:_0x398641(0x1e7),0x199:_0x398641(0x31e),0x19a:_0x398641(0x71a),0x19b:_0x398641(0x499),0x19d:_0x398641(0xc2),0x19f:_0x398641(0xc5),0x1a6:_0x398641(0x638),0x1ad:'TOO_MANY_REQUESTS',0x1f4:_0x398641(0x189),0x1f5:_0x398641(0x34c),0x1f6:_0x398641(0x782),0x1f7:_0x398641(0x2b5),0x1f8:_0x398641(0x3bf)},_0x544ce8={'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:_0x4ed188,timingSafeEqual:_0x218fe9,parseBearer:_0x270045,randomToken:_0x392ef6,issueToken:_0x4ee366,authenticateToken:_0x3ac6d1}=_0x42d881,{base64UrlDecode:_0x5de891,parseJwt:_0x4ba030,normalizeAudience:_0x21824d,normalizePemCertificate:_0x35390c,jwkToKeyObject:_0x399aec,verifyJwtSignature:_0x2be05e,fetchJson:_0xfc123b}=requireOkdbJwtUtils();function _0x2ba097(_0x41cce6){const _0x507a09=_0x398641;return(_0x41cce6||_0x507a09(0x248))[_0x507a09(0x419)]();}function _0x39f960(_0x1dc196){const _0x1c7754=_0x398641;if(Array[_0x1c7754(0x339)](_0x1dc196))return _0x1dc196[_0x1c7754(0x6bd)](_0x39f960);return String(_0x1dc196||'')[_0x1c7754(0x2aa)](',')[_0x1c7754(0x757)](_0x593d68=>_0x593d68[_0x1c7754(0x471)]())['filter'](Boolean);}function _0x53c872(..._0x19f9c0){const _0x38d78c=_0x398641;return[...new Set(_0x19f9c0[_0x38d78c(0x6bd)](_0x39f960))][_0x38d78c(0x10b)](',\x20');}function _0x4de1f8(_0x9f4e63,_0x2e21f3){const _0x52011a=_0x398641;if(!_0x9f4e63)return![];if(_0x2e21f3==='*')return!![];if(_0x2e21f3 instanceof RegExp)return _0x2e21f3[_0x52011a(0x155)](_0x9f4e63);if(typeof _0x2e21f3==='function')return!!_0x2e21f3(_0x9f4e63);if(Array[_0x52011a(0x339)](_0x2e21f3))return _0x2e21f3[_0x52011a(0x8f)](_0x9f4e63);return _0x2e21f3===_0x9f4e63;}function _0xa37337(_0xa70bd1={},_0x4bf707={},_0x24c79c=null){const _0x5f45e0=_0x398641;if(!_0x4bf707)return null;const _0x2421c3=_0xa70bd1[_0x5f45e0(0x633)],_0x4f388e=_0x4bf707[_0x5f45e0(0x762)]??_0x4bf707['origin']??'*',_0x23c29d=_0x4f388e==='*'?'*':_0x4de1f8(_0x2421c3,_0x4f388e)?_0x2421c3:null;if(!_0x23c29d)return null;const _0x188c07=_0xa70bd1['access-control-request-headers'],_0x3d90f3=_0x4bf707[_0x5f45e0(0x165)]??_0x4bf707[_0x5f45e0(0x55e)]??['content-type','authorization',_0x5f45e0(0x34f),'last-event-id',_0x5f45e0(0x17d)],_0x411b1f=_0x4bf707[_0x5f45e0(0x691)]??_0x4bf707[_0x5f45e0(0x3ae)]??(_0x24c79c?[_0x24c79c,'OPTIONS']:['GET',_0x5f45e0(0x2ed),_0x5f45e0(0x43f)]),_0xf15a7d=_0x4bf707[_0x5f45e0(0x14e)]??[_0x5f45e0(0x34f)],_0x2578dd={'access-control-allow-origin':_0x23c29d,'access-control-allow-methods':Array[_0x5f45e0(0x339)](_0x411b1f)?_0x411b1f[_0x5f45e0(0x10b)](',\x20'):String(_0x411b1f),'access-control-allow-headers':_0x188c07?_0x53c872(_0x3d90f3,_0x188c07):Array['isArray'](_0x3d90f3)?_0x3d90f3[_0x5f45e0(0x10b)](',\x20'):String(_0x3d90f3),'access-control-expose-headers':Array[_0x5f45e0(0x339)](_0xf15a7d)?_0xf15a7d[_0x5f45e0(0x10b)](',\x20'):String(_0xf15a7d),'vary':_0x53c872(_0x5f45e0(0x5b6),_0x23c29d==='*'?'':_0x5f45e0(0x5b6),_0x188c07?_0x5f45e0(0x315):'')};if(_0x4bf707[_0x5f45e0(0x118)])_0x2578dd[_0x5f45e0(0x145)]=_0x5f45e0(0x727);if(Number['isFinite'](_0x4bf707['maxAge']))_0x2578dd[_0x5f45e0(0x5e1)]=String(_0x4bf707[_0x5f45e0(0x5df)]);return _0x2578dd;}function _0x800295(_0x536fb1){const _0x19c516=_0x398641,_0x11e463=[],_0x5089b1={};let _0x4bee30=![];_0x536fb1[_0x19c516(0x113)]('/*')&&(_0x4bee30=!![],_0x536fb1=_0x536fb1['slice'](0x0,-0x2),_0x11e463[_0x19c516(0x2f9)]('*'));let _0x3e1a04=_0x536fb1[_0x19c516(0x416)](/\/+$/,'')[_0x19c516(0x416)](/\[([^\]]*)\]/g,(_0x55602b,_0x4e548e)=>{const _0x34b6cb=_0x19c516,_0x5abbd8=_0x4e548e[_0x34b6cb(0x416)](/\/:(\w+)(?:=([^/\]\s]*))?/g,(_0x13e0c7,_0x27c402,_0x4adf26)=>{const _0x4fee48=_0x34b6cb;_0x11e463[_0x4fee48(0x2f9)](_0x27c402);if(_0x4adf26!==undefined)_0x5089b1[_0x27c402]=_0x4adf26;return'/([^/]+)';});return _0x34b6cb(0x9f)+_0x5abbd8+')?';})[_0x19c516(0x416)](/\/:(\w+)/g,(_0x4c93e2,_0x5c6b6b)=>{const _0x32c290=_0x19c516;return _0x11e463[_0x32c290(0x2f9)](_0x5c6b6b),_0x32c290(0x1ee);});if(_0x3e1a04==='')_0x3e1a04='/';return{'keys':_0x11e463,'defaults':_0x5089b1,'wildcard':_0x4bee30,'regex':new RegExp(_0x4bee30?'^'+_0x3e1a04+_0x19c516(0x521):'^'+_0x3e1a04+'$')};}function _0x30edd9(_0x54ccef){const _0x554a17=_0x398641;if(_0x54ccef==null)return _0x54ccef;return JSON[_0x554a17(0xc3)](JSON[_0x554a17(0x5c1)](_0x54ccef));}function _0x5d3d3d(_0x32141a){const _0x3e8bf8=_0x398641;if(_0x32141a==null)return null;if(_0x32141a['type']===_0x3e8bf8(0x5d4)&&_0x32141a[_0x3e8bf8(0x9d)]&&!Array[_0x3e8bf8(0x339)](_0x32141a[_0x3e8bf8(0x9d)]))return _0x30edd9(_0x32141a);const _0x4caae7=Object['values'](_0x32141a),_0x33f604=_0x4caae7[_0x3e8bf8(0x39d)]>0x0&&_0x4caae7[_0x3e8bf8(0x6be)](_0x4f6871=>{const _0xa088e2=_0x3e8bf8;return _0x4f6871&&typeof _0x4f6871==='object'&&!Array[_0xa088e2(0x339)](_0x4f6871)&&(Object[_0xa088e2(0x568)][_0xa088e2(0x1fa)]['call'](_0x4f6871,_0xa088e2(0x66f))||Object['prototype']['hasOwnProperty']['call'](_0x4f6871,_0xa088e2(0x9d))||Object[_0xa088e2(0x568)][_0xa088e2(0x1fa)]['call'](_0x4f6871,_0xa088e2(0x281))||Object[_0xa088e2(0x568)][_0xa088e2(0x1fa)][_0xa088e2(0x3c6)](_0x4f6871,_0xa088e2(0x3e8)));});if(_0x33f604)return{'type':'object','properties':_0x30edd9(_0x32141a),'required':[],'additionalProperties':![]};const _0x4b9cb9={},_0x362bed=[];for(const [_0x1ceb6c,_0x2ebb51]of Object[_0x3e8bf8(0x61d)](_0x32141a)){_0x4b9cb9[_0x1ceb6c]=_0x4c9408(_0x2ebb51);if(_0x2ebb51!==null&&_0x2ebb51!==undefined)_0x362bed[_0x3e8bf8(0x2f9)](_0x1ceb6c);}return{'type':_0x3e8bf8(0x5d4),'properties':_0x4b9cb9,'required':_0x362bed,'additionalProperties':![]};}function _0x4c9408(_0x3ca0bd){const _0x22d42c=_0x398641;if(_0x3ca0bd===null)return{'type':[_0x22d42c(0x359),'string','number','boolean',_0x22d42c(0x5d4),'array']};if(Array[_0x22d42c(0x339)](_0x3ca0bd))return{'type':_0x22d42c(0x465),'items':_0x3ca0bd['length']>0x0?_0x4c9408(_0x3ca0bd[0x0]):{}};switch(typeof _0x3ca0bd){case _0x22d42c(0xe7):return{'type':_0x22d42c(0xe7),'default':_0x3ca0bd};case _0x22d42c(0x6af):return{'type':Number[_0x22d42c(0x446)](_0x3ca0bd)?_0x22d42c(0x19d):_0x22d42c(0x6af),'default':_0x3ca0bd};case'boolean':return{'type':_0x22d42c(0x200),'default':_0x3ca0bd};case'object':{const _0x2fe0a8={};for(const [_0x2df685,_0x24685d]of Object['entries'](_0x3ca0bd))_0x2fe0a8[_0x2df685]=_0x4c9408(_0x24685d);return{'type':'object','properties':_0x2fe0a8,'additionalProperties':!![],'default':_0x30edd9(_0x3ca0bd)};}default:return{};}}function _0x40a72f(_0x212e34,_0x27c19b){const _0x56e515=_0x398641,_0x5ce2ab=[];for(const _0x3d1e71 of _0x27c19b[_0x56e515(0x6d8)]){if(_0x3d1e71==='*')continue;_0x5ce2ab[_0x56e515(0x2f9)]({'name':_0x3d1e71,'required':!Object[_0x56e515(0x568)][_0x56e515(0x1fa)][_0x56e515(0x3c6)](_0x27c19b['defaults'],_0x3d1e71),'default':_0x27c19b[_0x56e515(0x10f)][_0x3d1e71]});}return _0x5ce2ab;}function _0x4a4ba9(_0x361478={},_0x53ffb5){const _0x5ca94c=_0x398641,_0x321008=_0x5d3d3d(_0x361478['http']?.[_0x5ca94c(0x1e6)]??_0x361478[_0x5ca94c(0x684)]??null),_0x873051=_0x361478[_0x5ca94c(0x91)]?.[_0x5ca94c(0x1ef)]??(_0x361478['raw']?_0x5ca94c(0x349):_0x53ffb5[_0x5ca94c(0xdf)]===_0x5ca94c(0x248)||_0x53ffb5[_0x5ca94c(0xdf)]===_0x5ca94c(0x481)?_0x5ca94c(0x4c7):_0x5ca94c(0x4d7));return{'querySchema':_0x321008,'bodyMode':_0x873051,'bindings':_0x30edd9(_0x361478[_0x5ca94c(0x91)]?.[_0x5ca94c(0x433)]??{}),'statuses':_0x30edd9(_0x361478[_0x5ca94c(0x91)]?.['statuses']??(_0x361478[_0x5ca94c(0x1e0)]||[])),'transport':_0x361478[_0x5ca94c(0x91)]?.[_0x5ca94c(0x601)]??(_0x361478[_0x5ca94c(0x4d6)]?'sse':_0x361478[_0x5ca94c(0x349)]?'raw':_0x5ca94c(0x63e)),'rawResponse':_0x361478[_0x5ca94c(0x91)]?.['rawResponse']??!!_0x361478[_0x5ca94c(0xbb)],'cors':_0x30edd9(_0x361478[_0x5ca94c(0x91)]?.['cors']??_0x361478['cors']??null)};}function _0x2da795(_0x219b2e){const _0x27cf56=_0x398641,_0x31b29b=_0x219b2e['meta']||{},_0x75a26d=_0x40a72f(_0x219b2e['path'],_0x219b2e['matcher']),_0x26a9d4=!!(_0x31b29b['id']||_0x31b29b[_0x27cf56(0x2f6)]||_0x31b29b[_0x27cf56(0x545)]||_0x31b29b[_0x27cf56(0x91)]||_0x31b29b[_0x27cf56(0x3a2)]||_0x31b29b[_0x27cf56(0x12e)]||_0x31b29b[_0x27cf56(0x2af)]||_0x31b29b['safety']),_0x246af9=_0x4a4ba9(_0x31b29b,_0x219b2e),_0x5ac47d=_0x31b29b[_0x27cf56(0x2f6)]?_0x30edd9(_0x31b29b['inputSchema']):null;return{'id':_0x31b29b['id']??null,'summary':_0x31b29b[_0x27cf56(0x4d1)]??null,'description':_0x31b29b[_0x27cf56(0x13c)]??null,'tags':_0x30edd9(_0x31b29b['tags']??[]),'category':_0x31b29b[_0x27cf56(0x5db)]??null,'safety':_0x30edd9(_0x31b29b['safety']??null),'access':_0x30edd9(_0x31b29b[_0x27cf56(0x2af)]??null),'inputSchema':_0x5ac47d,'outputSchema':_0x30edd9(_0x31b29b[_0x27cf56(0x545)]??null),'examples':_0x30edd9(_0x31b29b[_0x27cf56(0x137)]??[]),'pathParams':_0x75a26d,'http':_0x246af9,'cli':_0x30edd9(_0x31b29b['cli']??null),'mcp':_0x30edd9(_0x31b29b[_0x27cf56(0x3a2)]??null),'legacy':{'params':_0x30edd9(_0x31b29b[_0x27cf56(0x275)]??null),'query':_0x30edd9(_0x31b29b[_0x27cf56(0x684)]??null),'body':_0x30edd9(_0x31b29b['body']??null),'response':_0x30edd9(_0x31b29b[_0x27cf56(0x6ef)]??null)},'transport':{'raw':!!_0x31b29b[_0x27cf56(0x349)],'sse':!!_0x31b29b[_0x27cf56(0x4d6)],'rawResponse':!!_0x31b29b[_0x27cf56(0xbb)],'cors':_0x30edd9(_0x31b29b[_0x27cf56(0x198)]??null)},'hasCanonical':_0x26a9d4};}function _0x3e3e8c(_0x47a166,_0x42db5f){const _0x4f33f7=_0x398641;if(!_0x42db5f?.[_0x4f33f7(0x386)])return;if(!_0x42db5f[_0x4f33f7(0x2f6)]||_0x42db5f[_0x4f33f7(0x2f6)]['type']!=='object'||!_0x42db5f[_0x4f33f7(0x2f6)][_0x4f33f7(0x9d)])throw new Error(_0x4f33f7(0x4f2)+_0x47a166[_0x4f33f7(0xdf)]+'\x20'+_0x47a166[_0x4f33f7(0x4c5)]+_0x4f33f7(0x3ec));const _0x1eddb1=_0x42db5f['inputSchema'][_0x4f33f7(0x9d)]||{},_0x335453=new Set(_0x42db5f[_0x4f33f7(0x16a)][_0x4f33f7(0x757)](_0x721773=>_0x721773['name'])),_0x35f4de=new Set(Object[_0x4f33f7(0x6d8)](_0x42db5f[_0x4f33f7(0x91)]?.[_0x4f33f7(0x1e6)]?.[_0x4f33f7(0x9d)]||{})),_0x362da9=new Set(Object[_0x4f33f7(0x6d8)](_0x42db5f['http']?.['bindings']||{}));for(const _0x527dc5 of _0x42db5f[_0x4f33f7(0x16a)]){if(!_0x1eddb1[_0x527dc5[_0x4f33f7(0x707)]])throw new Error(_0x4f33f7(0x4f2)+_0x47a166[_0x4f33f7(0xdf)]+'\x20'+_0x47a166[_0x4f33f7(0x4c5)]+'\x20missing\x20path\x20field\x20in\x20inputSchema:\x20'+_0x527dc5[_0x4f33f7(0x707)]);}for(const _0x35227c of _0x35f4de){if(!_0x1eddb1[_0x35227c])throw new Error(_0x4f33f7(0x4f2)+_0x47a166[_0x4f33f7(0xdf)]+'\x20'+_0x47a166[_0x4f33f7(0x4c5)]+'\x20querySchema\x20references\x20missing\x20input\x20field:\x20'+_0x35227c);}for(const _0x405f36 of _0x362da9){if(!_0x1eddb1[_0x405f36])throw new Error(_0x4f33f7(0x4f2)+_0x47a166[_0x4f33f7(0xdf)]+'\x20'+_0x47a166[_0x4f33f7(0x4c5)]+_0x4f33f7(0x6c)+_0x405f36);}for(const _0x191188 of _0x362da9){if(_0x335453[_0x4f33f7(0x469)](_0x191188))throw new Error('Route\x20'+_0x47a166['method']+'\x20'+_0x47a166[_0x4f33f7(0x4c5)]+'\x20has\x20ambiguous\x20binding\x20for\x20path\x20field:\x20'+_0x191188);if(_0x35f4de[_0x4f33f7(0x469)](_0x191188))throw new Error(_0x4f33f7(0x4f2)+_0x47a166['method']+'\x20'+_0x47a166[_0x4f33f7(0x4c5)]+_0x4f33f7(0x43a)+_0x191188);const _0x5cf610=_0x42db5f['http'][_0x4f33f7(0x433)][_0x191188];if(!/^params\.[A-Za-z0-9_*.-]+$/[_0x4f33f7(0x155)](_0x5cf610)&&!/^query\.[A-Za-z0-9_*.-]+$/[_0x4f33f7(0x155)](_0x5cf610)&&!/^body(?:\.[A-Za-z0-9_*.-]+)?$/[_0x4f33f7(0x155)](_0x5cf610)&&!/^headers\.[A-Za-z0-9_*.-]+$/[_0x4f33f7(0x155)](_0x5cf610))throw new Error(_0x4f33f7(0x4f2)+_0x47a166[_0x4f33f7(0xdf)]+'\x20'+_0x47a166[_0x4f33f7(0x4c5)]+_0x4f33f7(0x42d)+_0x191188+':\x20'+_0x5cf610);}for(const _0x2235ab of _0x35f4de){if(_0x335453[_0x4f33f7(0x469)](_0x2235ab))throw new Error(_0x4f33f7(0x4f2)+_0x47a166[_0x4f33f7(0xdf)]+'\x20'+_0x47a166[_0x4f33f7(0x4c5)]+_0x4f33f7(0xd8)+_0x2235ab);}const _0x24491e=_0x42db5f[_0x4f33f7(0x91)]?.[_0x4f33f7(0x1ef)],_0x4cb329=new Set([_0x4f33f7(0x4c7),_0x4f33f7(0x4d7),'object',_0x4f33f7(0x60c),'array',_0x4f33f7(0x349)]);if(!_0x4cb329[_0x4f33f7(0x469)](_0x24491e))throw new Error(_0x4f33f7(0x4f2)+_0x47a166[_0x4f33f7(0xdf)]+'\x20'+_0x47a166[_0x4f33f7(0x4c5)]+_0x4f33f7(0x115)+_0x24491e);if(_0x24491e===_0x4f33f7(0x349)&&!_0x47a166[_0x4f33f7(0xc9)]?.[_0x4f33f7(0x349)])throw new Error('Route\x20'+_0x47a166[_0x4f33f7(0xdf)]+'\x20'+_0x47a166['path']+_0x4f33f7(0x38f));if(_0x42db5f[_0x4f33f7(0x3a2)]?.[_0x4f33f7(0x1e8)]!==![]&&(_0x47a166[_0x4f33f7(0xc9)]?.[_0x4f33f7(0x349)]||_0x47a166['meta']?.[_0x4f33f7(0x4d6)]||_0x42db5f[_0x4f33f7(0x91)]?.[_0x4f33f7(0x601)]===_0x4f33f7(0x667)))throw new Error(_0x4f33f7(0x4f2)+_0x47a166[_0x4f33f7(0xdf)]+'\x20'+_0x47a166['path']+_0x4f33f7(0xaf)+_0x42db5f[_0x4f33f7(0x91)]?.[_0x4f33f7(0x601)]);const _0x2d482b=Object['keys'](_0x1eddb1)[_0x4f33f7(0x293)](_0x3c0bc8=>{const _0x3d1dab=_0x4f33f7;if(_0x335453['has'](_0x3c0bc8))return![];if(_0x35f4de[_0x3d1dab(0x469)](_0x3c0bc8))return![];if(_0x362da9[_0x3d1dab(0x469)](_0x3c0bc8))return![];return!![];});if(_0x24491e===_0x4f33f7(0x4c7)&&_0x2d482b[_0x4f33f7(0x39d)]>0x0)throw new Error(_0x4f33f7(0x4f2)+_0x47a166[_0x4f33f7(0xdf)]+'\x20'+_0x47a166[_0x4f33f7(0x4c5)]+_0x4f33f7(0x64a)+_0x2d482b[_0x4f33f7(0x10b)](',\x20'));if(_0x24491e===_0x4f33f7(0x465)&&_0x2d482b['filter'](_0xb9d86a=>_0x4760cd(_0x1eddb1[_0xb9d86a],'array'))[_0x4f33f7(0x39d)]!==0x1)throw new Error(_0x4f33f7(0x4f2)+_0x47a166[_0x4f33f7(0xdf)]+'\x20'+_0x47a166['path']+'\x20uses\x20bodyMode:array\x20but\x20does\x20not\x20have\x20exactly\x20one\x20unbound\x20array\x20input\x20field');}function _0x2a2dec(_0x39bdce,_0x1b3dec,_0x508e04,_0x45fd72){const _0x3a8572=_0x398641;for(const [_0x423e2d,_0x3ca391]of Object['entries'](_0x39bdce)){if(_0x1b3dec[_0x3a8572(0x469)](_0x423e2d)||_0x508e04['has'](_0x423e2d)||Object['prototype']['hasOwnProperty'][_0x3a8572(0x3c6)](_0x45fd72,_0x423e2d))continue;if(_0x4760cd(_0x3ca391,_0x3a8572(0x465)))return _0x423e2d;}return null;}function _0x3cc20f(_0x420baa){const _0xe77a57=_0x398641;if(Array[_0xe77a57(0x339)](_0x420baa))return _0x420baa;if(_0x420baa==null)return[];return[_0x420baa];}function _0x4760cd(_0x33852e,_0x167053){const _0x20eb61=_0x398641;return _0x3cc20f(_0x33852e?.['type'])[_0x20eb61(0x8f)](_0x167053);}function _0x50d0ef(_0x5212c5,_0x155ed2){const _0x1e1b0b=_0x398641;if(_0x5212c5==null||typeof _0x5212c5!=='string')return _0x5212c5;const _0x280dd4=_0x3cc20f(_0x155ed2?.['type']);if(_0x280dd4[_0x1e1b0b(0x39d)]===0x0)return _0x5212c5;if(_0x280dd4[_0x1e1b0b(0x8f)](_0x1e1b0b(0x359))&&_0x5212c5===_0x1e1b0b(0x359))return null;if(_0x280dd4[_0x1e1b0b(0x8f)](_0x1e1b0b(0x200))){if(_0x5212c5===_0x1e1b0b(0x727))return!![];if(_0x5212c5===_0x1e1b0b(0x779))return![];}if(_0x280dd4[_0x1e1b0b(0x8f)](_0x1e1b0b(0x19d))&&/^-?\d+$/[_0x1e1b0b(0x155)](_0x5212c5))return Number[_0x1e1b0b(0x384)](_0x5212c5,0xa);if(_0x280dd4['includes'](_0x1e1b0b(0x6af))&&/^-?(?:\d+|\d*\.\d+)$/[_0x1e1b0b(0x155)](_0x5212c5))return Number(_0x5212c5);return _0x5212c5;}function _0x3b3ea3(_0x3abe0a){return _0x30edd9(_0x3abe0a);}function _0x496ca0(_0x2f1aa7,_0x4b9e66={},_0x373a47={},_0x359bc4=null,_0x4c3f14={}){const _0x1ceca6=_0x398641,_0x3387ff=_0x2f1aa7?.[_0x1ceca6(0x396)];if(!_0x3387ff?.[_0x1ceca6(0x386)]||!_0x3387ff['inputSchema'])return null;const _0x3e56f5=_0x3387ff[_0x1ceca6(0x2f6)]['properties']||{},_0x356ea4=_0x3387ff['http']?.[_0x1ceca6(0x1e6)]?.[_0x1ceca6(0x9d)]||{},_0x154d4e=_0x3387ff[_0x1ceca6(0x91)]?.[_0x1ceca6(0x433)]||{},_0x226330=new Set((_0x3387ff[_0x1ceca6(0x16a)]||[])[_0x1ceca6(0x757)](_0x5af62f=>_0x5af62f[_0x1ceca6(0x707)])),_0x3c9e7a=new Set(Object[_0x1ceca6(0x6d8)](_0x356ea4)),_0x329f5b={};for(const [_0x13a7e9,_0x56f422]of Object[_0x1ceca6(0x61d)](_0x3e56f5)){Object[_0x1ceca6(0x568)][_0x1ceca6(0x1fa)][_0x1ceca6(0x3c6)](_0x56f422||{},_0x1ceca6(0x3e8))&&(_0x329f5b[_0x13a7e9]=_0x3b3ea3(_0x56f422[_0x1ceca6(0x3e8)]));}for(const _0x26280e of _0x3387ff[_0x1ceca6(0x16a)]||[]){if(!Object[_0x1ceca6(0x568)][_0x1ceca6(0x1fa)][_0x1ceca6(0x3c6)](_0x4b9e66,_0x26280e[_0x1ceca6(0x707)]))continue;const _0x4e81b5=_0x3e56f5[_0x26280e[_0x1ceca6(0x707)]]||{};_0x329f5b[_0x26280e[_0x1ceca6(0x707)]]=_0x50d0ef(_0x4b9e66[_0x26280e[_0x1ceca6(0x707)]],_0x4e81b5);}for(const [_0x162b93,_0x50a27d]of Object['entries'](_0x356ea4)){if(!Object[_0x1ceca6(0x568)][_0x1ceca6(0x1fa)][_0x1ceca6(0x3c6)](_0x373a47,_0x162b93))continue;_0x329f5b[_0x162b93]=_0x50d0ef(_0x373a47[_0x162b93],_0x50a27d||_0x3e56f5[_0x162b93]||{});}for(const [_0x23a097,_0x3fd25d]of Object[_0x1ceca6(0x61d)](_0x154d4e)){if(typeof _0x3fd25d!==_0x1ceca6(0xe7))continue;let _0x28d988;if(_0x3fd25d[_0x1ceca6(0x42e)](_0x1ceca6(0x45e)))_0x28d988=_0x4b9e66[_0x3fd25d[_0x1ceca6(0x13a)](0x7)];else{if(_0x3fd25d['startsWith'](_0x1ceca6(0x3eb)))_0x28d988=_0x373a47[_0x3fd25d[_0x1ceca6(0x13a)](0x6)];else{if(_0x3fd25d===_0x1ceca6(0x4fc))_0x28d988=_0x359bc4;else{if(_0x3fd25d[_0x1ceca6(0x42e)]('body.'))_0x28d988=_0x359bc4?.[_0x3fd25d[_0x1ceca6(0x13a)](0x5)];else{if(_0x3fd25d[_0x1ceca6(0x42e)]('headers.'))_0x28d988=_0x4c3f14?.[_0x3fd25d[_0x1ceca6(0x13a)](0x8)[_0x1ceca6(0x8d)]()]??_0x4c3f14?.[_0x3fd25d[_0x1ceca6(0x13a)](0x8)];}}}}if(_0x28d988!==undefined)_0x329f5b[_0x23a097]=_0x28d988;}const _0x1fe070=_0x3387ff[_0x1ceca6(0x91)]?.['bodyMode'];if(_0x1fe070!==_0x1ceca6(0x4c7)&&_0x1fe070!=='raw'&&_0x359bc4!=null){if(_0x1fe070===_0x1ceca6(0x465)&&Array[_0x1ceca6(0x339)](_0x359bc4)){const _0x2dce6d=_0x2a2dec(_0x3e56f5,_0x226330,_0x3c9e7a,_0x154d4e);if(_0x2dce6d)_0x329f5b[_0x2dce6d]=_0x359bc4;}else{if(_0x1fe070===_0x1ceca6(0x5d4))for(const [_0x31c729,_0x145663]of Object[_0x1ceca6(0x61d)](_0x3e56f5)){if(_0x226330[_0x1ceca6(0x469)](_0x31c729)||_0x3c9e7a[_0x1ceca6(0x469)](_0x31c729)||Object['prototype'][_0x1ceca6(0x1fa)][_0x1ceca6(0x3c6)](_0x154d4e,_0x31c729))continue;if(Object['prototype'][_0x1ceca6(0x1fa)][_0x1ceca6(0x3c6)](_0x359bc4,_0x31c729))_0x329f5b[_0x31c729]=_0x359bc4[_0x31c729];else{if(_0x4760cd(_0x145663,'object'))_0x329f5b[_0x31c729]=_0x359bc4;}}else for(const [_0x14fde8,_0x412c2f]of Object[_0x1ceca6(0x61d)](_0x359bc4)){if(_0x226330['has'](_0x14fde8)||_0x3c9e7a[_0x1ceca6(0x469)](_0x14fde8)||Object[_0x1ceca6(0x568)][_0x1ceca6(0x1fa)][_0x1ceca6(0x3c6)](_0x154d4e,_0x14fde8))continue;_0x329f5b[_0x14fde8]=_0x412c2f;}}}return _0x329f5b;}function _0x320501(_0x47179b,_0x1dbb93,_0x78ac1,_0xbbfb82){const _0x4541fa=_0x398641;if(!_0x1dbb93)return;const _0x13343f=_0x3cc20f(_0x1dbb93[_0x4541fa(0x66f)]);if(_0x47179b===undefined)return;if(_0x47179b===null){_0x13343f['length']>0x0&&!_0x13343f['includes']('null')&&_0xbbfb82[_0x4541fa(0x2f9)]({'field':_0x78ac1,'message':_0x4541fa(0x4da),'expected':_0x13343f[_0x4541fa(0x10b)]('|'),'actual':null});return;}if(_0x13343f[_0x4541fa(0x39d)]===0x0)return;const _0xaaa84e=_0x13343f[_0x4541fa(0x35c)](_0x26ea52=>{const _0x33b690=_0x4541fa;switch(_0x26ea52){case'string':return typeof _0x47179b===_0x33b690(0xe7);case _0x33b690(0x19d):return Number[_0x33b690(0x446)](_0x47179b);case _0x33b690(0x6af):return typeof _0x47179b===_0x33b690(0x6af)&&Number[_0x33b690(0x3ff)](_0x47179b);case _0x33b690(0x200):return typeof _0x47179b==='boolean';case _0x33b690(0x5d4):return _0x47179b&&typeof _0x47179b===_0x33b690(0x5d4)&&!Array[_0x33b690(0x339)](_0x47179b);case'array':return Array[_0x33b690(0x339)](_0x47179b);case'null':return _0x47179b===null;default:return!![];}});if(!_0xaaa84e){_0xbbfb82[_0x4541fa(0x2f9)]({'field':_0x78ac1,'message':_0x4541fa(0x217)+_0x13343f[_0x4541fa(0x10b)]('|'),'expected':_0x13343f[_0x4541fa(0x10b)]('|'),'actual':_0x47179b});return;}Array[_0x4541fa(0x339)](_0x47179b)&&_0x1dbb93[_0x4541fa(0x281)]&&_0x47179b[_0x4541fa(0x2e2)]((_0x24aa51,_0x24edca)=>_0x320501(_0x24aa51,_0x1dbb93[_0x4541fa(0x281)],_0x78ac1+'['+_0x24edca+']',_0xbbfb82));}function _0xcc0250(_0x9bb484,_0x1baab0){const _0x299415=_0x398641,_0x162dba=_0x9bb484?.[_0x299415(0x396)];if(!_0x162dba?.['hasCanonical']||!_0x162dba['inputSchema'])return null;const _0x1bb320=_0x162dba['inputSchema'],_0x2d795f=_0x1bb320['properties']||{},_0x86277e=new Set(_0x1bb320[_0x299415(0x323)]||[]),_0x5155ab=[];for(const _0x38cf6a of _0x86277e){_0x1baab0[_0x38cf6a]===undefined&&_0x5155ab['push']({'field':_0x38cf6a,'message':_0x299415(0x1ad),'expected':_0x299415(0x59f),'actual':undefined});}if(_0x1bb320['additionalProperties']===![])for(const _0x45a435 of Object['keys'](_0x1baab0||{})){!Object[_0x299415(0x568)][_0x299415(0x1fa)]['call'](_0x2d795f,_0x45a435)&&_0x5155ab[_0x299415(0x2f9)]({'field':_0x45a435,'message':_0x299415(0x332),'expected':_0x299415(0x5a3),'actual':_0x1baab0[_0x45a435]});}for(const [_0x2dcd70,_0x2f6a12]of Object[_0x299415(0x61d)](_0x2d795f)){_0x320501(_0x1baab0[_0x2dcd70],_0x2f6a12,_0x2dcd70,_0x5155ab);}if(_0x5155ab[_0x299415(0x39d)]===0x0)return null;return{'code':_0x299415(0x1a4),'errors':_0x5155ab};}function _0x4dad28(_0x136509=[]){const _0x570e8a=_0x398641;if(!Array[_0x570e8a(0x339)](_0x136509)||_0x136509['length']===0x0)return null;const _0x2e4fbb=_0x136509['slice'](0x0,0x3)[_0x570e8a(0x757)]((_0x20be1d={})=>{const _0x38e9c7=_0x570e8a,_0x46b4e1=_0x20be1d[_0x38e9c7(0x46e)]?_0x20be1d['field']+'\x20':'';return(''+_0x46b4e1+(_0x20be1d[_0x38e9c7(0x5e6)]||_0x38e9c7(0x324)))[_0x38e9c7(0x471)]();})[_0x570e8a(0x10b)](';\x20');return _0x136509['length']>0x3?_0x2e4fbb+_0x570e8a(0x6a3)+(_0x136509['length']-0x3)+_0x570e8a(0x403):_0x2e4fbb;}function _0x23db35(_0x45952e,_0x4157a0={}){const _0x38e6f2=_0x398641,_0x2a56da=_0x4157a0?.[_0x38e6f2(0x5a1)]?.[_0x38e6f2(0x492)]??_0x4157a0?.[_0x38e6f2(0x492)]??_0x38e6f2(0x58a),_0x316ef6=_0x4157a0?.[_0x38e6f2(0x5a1)]?.['details']??_0x4157a0?.[_0x38e6f2(0x2a6)]??_0x2a56da?.['details']??null,_0x9c0b8=_0x4157a0?.[_0x38e6f2(0x5a1)]?.['code']??_0x4157a0?.[_0x38e6f2(0x25b)]??_0x2a56da?.['code']??null,_0xc5c72b=_0x4157a0?.[_0x38e6f2(0x5a1)]?.['message']??_0x4157a0?.[_0x38e6f2(0x5e6)]??_0x2a56da?.['message']??null,_0x1b974d=typeof _0x2a56da==='string'?_0x2a56da:null,_0x53e19c=typeof _0x1b974d===_0x38e6f2(0xe7)&&/^[A-Z0-9_]+$/[_0x38e6f2(0x155)](_0x1b974d),_0x273994=_0x9c0b8??(_0x53e19c?_0x1b974d:null)??(_0x341cf6[_0x45952e]||'HTTP_'+_0x45952e);let _0x2a81e4=_0xc5c72b;!_0x2a81e4&&typeof _0x1b974d===_0x38e6f2(0xe7)&&!_0x53e19c&&(_0x2a81e4=_0x1b974d);if(!_0x2a81e4&&_0x273994===_0x38e6f2(0x1a4)){const _0x252bad=_0x4dad28(_0x316ef6);_0x2a81e4=_0x252bad?_0x38e6f2(0x538)+_0x252bad:_0x38e6f2(0x1a5);}if(!_0x2a81e4&&Array[_0x38e6f2(0x339)](_0x316ef6)&&_0x316ef6[_0x38e6f2(0x39d)]>0x0){const _0x1b5457=_0x4dad28(_0x316ef6);if(_0x1b5457)_0x2a81e4=_0x1b5457;}if(!_0x2a81e4)_0x2a81e4=_0x341cf6[_0x45952e]||_0x38e6f2(0x58a);const _0x35bf50={'code':_0x273994,'message':_0x2a81e4};if(_0x316ef6!=null)_0x35bf50[_0x38e6f2(0x2a6)]=_0x316ef6;return _0x35bf50;}function _0x342723(_0x525d9e){const _0x192a8c=_0x398641,_0x1fb9c2={};if(!_0x525d9e)return _0x1fb9c2;for(const _0x378c02 of _0x525d9e['split'](';')){const _0x107f44=_0x378c02[_0x192a8c(0x380)]('=');if(_0x107f44===-0x1)continue;const _0x423b0a=_0x378c02[_0x192a8c(0x13a)](0x0,_0x107f44)[_0x192a8c(0x471)](),_0x490c10=_0x378c02[_0x192a8c(0x13a)](_0x107f44+0x1)[_0x192a8c(0x471)]();_0x1fb9c2[_0x423b0a]=decodeURIComponent(_0x490c10);}return _0x1fb9c2;}function _0x5c600f(_0x3cde92,_0x39bf5d){const _0x34043b=_0x398641;return _0x39bf5d=_0x5b9500(_0x39bf5d),{'status':_0x39bf5d[_0x34043b(0x170)]??_0x3cde92[_0x34043b(0x170)],'headers':{..._0x3cde92['headers']||{},..._0x39bf5d['headers']||{}},'body':_0x39bf5d[_0x34043b(0x4fc)]??_0x3cde92[_0x34043b(0x4fc)]};}function _0x59eb41(_0x4462bb={}){const _0x31de8b=_0x398641;return _0x4462bb[_0x31de8b(0x601)]||(_0x4462bb[_0x31de8b(0x1db)]?_0x31de8b(0x1db):_0x31de8b(0x91));}function _0x1aa987(_0x45fcfe){const _0x406393=_0x398641;if(_0x45fcfe['context']?.[_0x406393(0x1db)]===!![])return!![];if(_0x45fcfe[_0x406393(0xb3)]?.[_0x406393(0x8a)]?.[_0x406393(0x3a9)]===!![])return!![];if(_0x45fcfe[_0x406393(0xb3)]?.[_0x406393(0x8a)]?.['ok']===!![])return!![];return![];}function _0x341aba(_0x53bee,_0x2f9d3c){const _0x4d0d55=_0x2f9d3c['split']('.');let _0x2c8fa1=_0x53bee;for(const _0xdd52a7 of _0x4d0d55){_0x2c8fa1=_0x2c8fa1?.[_0xdd52a7];}return _0x2c8fa1||null;}class _0x1fe4c0{constructor(){const _0x4ea8ea=_0x398641;this[_0x4ea8ea(0x2e8)]=[],this['guards']=[],this[_0x4ea8ea(0x249)]=[],this[_0x4ea8ea(0xc4)]=0x5*0x400*0x400,this[_0x4ea8ea(0x33d)]=null,this[_0x4ea8ea(0x63b)]=[],this[_0x4ea8ea(0x6d0)]=new Set(),this[_0x4ea8ea(0x8a)]={'cookieName':_0x4ea8ea(0xea),'stateCookieName':_0x4ea8ea(0x1c6),'csrfCookieName':'kdb_admin_csrf'},this[_0x4ea8ea(0x2c0)]={},this['_loginStates']=new Map(),this['_oidcDiscoveryCache']=null,this['_jwksCache']=null,this['_jwksNegativeCache']=new Map(),this['metrics']=new _0x1c47b3(),this[_0x4ea8ea(0x426)]=![],this[_0x4ea8ea(0x168)]=0x0;}[_0x398641(0x1b0)](_0x1fdb35={}){const _0x55c7f4=_0x398641;return this[_0x55c7f4(0x2c0)]=_0x1fdb35||{},this[_0x55c7f4(0x376)]=_0x1fdb35[_0x55c7f4(0x38b)]??_0x55c7f4(0x1fd),this[_0x55c7f4(0x2c0)];}get[_0x398641(0x13d)](){const _0x25aa43=_0x398641;if(this[_0x25aa43(0x7d)]?.[_0x25aa43(0x8a)])return this['_okdb']['auth'][_0x25aa43(0x13d)];return![];}[_0x398641(0x181)](){const _0x48d46a=_0x398641;if(this[_0x48d46a(0x7d)]?.[_0x48d46a(0x8a)])return this['_okdb']['auth'][_0x48d46a(0x181)]();return this[_0x48d46a(0x2c0)]||{};}[_0x398641(0x724)](_0x434924){const _0x51eb09=_0x398641;this[_0x51eb09(0x2e8)]['push'](_0x434924);}[_0x398641(0x71)](_0x351b8f,_0xcc9842){const _0x306ad0=_0x398641;this[_0x306ad0(0x288)][_0x306ad0(0x2f9)]({'match':_0x351b8f,'handler':_0xcc9842});}[_0x398641(0x3e9)](_0x42806b,_0x48f426,_0x2abc8d,_0x5ea677={}){const _0x33624e=_0x398641,_0x1c85c4={'method':_0x2ba097(_0x42806b),'path':_0x48f426,'matcher':_0x800295(_0x48f426),'handler':_0x2abc8d,'meta':_0x5ea677||{}},_0x3b7434=_0x2da795(_0x1c85c4);_0x3e3e8c(_0x1c85c4,_0x3b7434),_0x1c85c4[_0x33624e(0x396)]=_0x3b7434,_0x1c85c4['userAdded']=this[_0x33624e(0x426)]===!![];if(_0x1c85c4['userAdded'])this[_0x33624e(0x168)]++;this[_0x33624e(0x249)][_0x33624e(0x2f9)](_0x1c85c4);}[_0x398641(0x711)](_0xbd0ab1,_0x5a9d61,_0xf49f8d,_0x1bf5cb={}){this['add'](_0xbd0ab1,_0x5a9d61,_0xf49f8d,{..._0x1bf5cb,'raw':!![]});}['_bestMatch'](_0x29ea40,_0x4fb337,{corsOnly:corsOnly=![]}={}){const _0x2f21ba=_0x398641;let _0x529d9a=null,_0x412099=Infinity;for(const _0x1834aa of this[_0x2f21ba(0x249)]){if(corsOnly){if(!_0x1834aa['meta']?.[_0x2f21ba(0x198)])continue;}else{if(_0x1834aa[_0x2f21ba(0xdf)]!==_0x29ea40)continue;}if(!_0x1834aa[_0x2f21ba(0x3a1)][_0x2f21ba(0x42f)][_0x2f21ba(0x155)](_0x4fb337))continue;const _0xc809e=_0x1834aa[_0x2f21ba(0x3a1)][_0x2f21ba(0x6d8)]?.['length']??0x0;if(_0xc809e<_0x412099){_0x529d9a=_0x1834aa,_0x412099=_0xc809e;if(_0xc809e===0x0)break;}}return _0x529d9a;}['_matchRoute'](_0x3a00dd,_0x80ef4){const _0x456e81=_0x398641,_0x39da8a=_0x2ba097(_0x3a00dd),_0x5899db=this[_0x456e81(0x47d)](_0x39da8a,_0x80ef4);if(_0x5899db)return _0x5899db;if(_0x39da8a===_0x456e81(0x43f))return this[_0x456e81(0x47d)](_0x39da8a,_0x80ef4,{'corsOnly':!![]});return null;}[_0x398641(0x2b2)](_0x4ba781,_0xeabc64){const _0x59b8ba=_0x398641;if(_0x4ba781?.[_0x59b8ba(0xc9)]?.[_0x59b8ba(0xbb)])return![];if(_0xeabc64?.[_0x59b8ba(0x165)]?.[_0x59b8ba(0x224)])return![];return!![];}['listRoutes'](){const _0x15fad5=_0x398641;return this[_0x15fad5(0x249)][_0x15fad5(0x293)](_0x5cb474=>!_0x5cb474['meta']?.[_0x15fad5(0x4f4)])[_0x15fad5(0x757)](_0x45da79=>({'method':_0x45da79['method'],'path':_0x45da79[_0x15fad5(0x4c5)],'defaults':_0x45da79[_0x15fad5(0x3a1)][_0x15fad5(0x10f)],'meta':_0x45da79[_0x15fad5(0xc9)],'operation':_0x45da79[_0x15fad5(0x396)]}));}['addSSE'](_0x599f08,_0x51ab39,_0x3cd3c0={}){const _0x5555c9=_0x398641,{PassThrough:_0x2a22eb}=require$$5;this[_0x5555c9(0x3e9)](_0x5555c9(0x248),_0x599f08,({params:_0x3ee3c6,query:_0x191b29,headers:_0x1c207d,context:_0x5008fd})=>{const _0x119ad8=_0x5555c9,_0x2371df=new _0x2a22eb();let _0x37fdff=null;const _0x507222={};try{_0x5008fd?.[_0x119ad8(0x38d)]?.['socket']?.['setNoDelay'](!![]);}catch{}_0x2371df[_0x119ad8(0xb6)](_0x119ad8(0x412)),_0x37fdff=setInterval(()=>{const _0x158d3f=_0x119ad8;try{_0x2371df[_0x158d3f(0xb6)](_0x158d3f(0x58d));}catch{}},0x3a98);const _0x5245ae=(_0x24a5f3,_0xf9513b,_0xa4ed4={})=>{const _0x4f4ebc=_0x119ad8;try{const _0x31a484=_0xa4ed4[_0x4f4ebc(0x349)]?String(_0xf9513b??''):JSON[_0x4f4ebc(0x5c1)](_0xf9513b);_0xa4ed4['id']!=null&&_0x2371df[_0x4f4ebc(0xb6)](_0x4f4ebc(0x607)+_0xa4ed4['id']+'\x0a');_0x2371df[_0x4f4ebc(0xb6)](_0x4f4ebc(0x6a5)+_0x24a5f3+'\x0a');for(const _0x58d53a of _0x31a484[_0x4f4ebc(0x2aa)]('\x0a')){_0x2371df[_0x4f4ebc(0xb6)](_0x4f4ebc(0xdc)+_0x58d53a+'\x0a');}_0x2371df['write']('\x0a');}catch{}},_0x573696=()=>{const _0x20e770=_0x119ad8;_0x37fdff&&(clearInterval(_0x37fdff),_0x37fdff=null);try{_0x2371df[_0x20e770(0x565)]();}catch{}},_0x2dd4fd=(_0x1a7d6d,_0x1cde30)=>{_0x507222[_0x1a7d6d]=_0x1cde30;};_0x5008fd?.[_0x119ad8(0x38d)]?.['on'](_0x119ad8(0x44f),_0x573696),_0x2371df['on'](_0x119ad8(0x44f),_0x573696);if(_0x5008fd?.[_0x119ad8(0x8a)]&&_0x5008fd[_0x119ad8(0x8a)][_0x119ad8(0x1fd)]!==!![]&&_0x5008fd[_0x119ad8(0x8a)][_0x119ad8(0x3a9)]){const _0x147cca={'headers':_0x1c207d??{},'cookies':_0x342723(_0x1c207d?.[_0x119ad8(0xf2)]),'context':{},'socket':_0x5008fd?.[_0x119ad8(0x38d)]?.[_0x119ad8(0xa2)]??{'remoteAddress':null}},_0x3d87aa=setInterval(async()=>{const _0x4a924e=_0x119ad8;try{const _0x5e9906=await this[_0x4a924e(0xf1)](_0x147cca);if(_0x5e9906?.[_0x4a924e(0x1fd)]===!![]||_0x5e9906?.[_0x4a924e(0x3a9)])return;_0x5245ae(_0x4a924e(0x8a),{'expired':!![]}),_0x573696();}catch{_0x573696();}},0xea60);_0x3d87aa[_0x119ad8(0xe9)]?.(),_0x2371df['on'](_0x119ad8(0x44f),()=>clearInterval(_0x3d87aa));}const _0x480536=_0x51ab39({'send':_0x5245ae,'close':_0x573696,'params':_0x3ee3c6??{},'query':_0x191b29??{},'headers':_0x1c207d??{},'context':_0x5008fd,'setHeader':_0x2dd4fd});return typeof _0x480536==='function'&&_0x2371df['on'](_0x119ad8(0x44f),_0x480536),{'status':0xc8,'headers':{'content-type':'text/event-stream;\x20charset=utf-8','cache-control':_0x119ad8(0x50d),'connection':'keep-alive','x-accel-buffering':'no',..._0x507222},'body':_0x2371df};},{..._0x3cd3c0,'sse':!![]});}async[_0x398641(0x57c)](_0xba1e23,_0x58626f){const _0x46b37c=_0x398641;for(const _0x20266c of this['guards']){if(!_0x20266c['match'](_0xba1e23))continue;const _0x5cfdd1=await _0x20266c[_0x46b37c(0x4ee)](_0xba1e23,_0x58626f);if(_0x5cfdd1===![])return![];}return!![];}async[_0x398641(0x6c6)](_0x344ff1,_0x45b57e,_0x48fc7d){let _0x13d0c0=0x0;const _0x536176=async()=>{const _0x283814=_0x8cd7,_0x2c9a94=this[_0x283814(0x2e8)][_0x13d0c0++];if(!_0x2c9a94)return _0x48fc7d();return _0x2c9a94(_0x344ff1,_0x45b57e,_0x536176);};return _0x536176();}[_0x398641(0x502)](_0x2d5ae7,_0x5c343a){const _0x4f2096=_0x398641,{status:status=0xc8,headers:headers={},body:_0x1243dc}=_0x2d5ae7;if(status>=0x12c&&status<0x190)return _0x2d5ae7;if(_0x8fc7b4(_0x1243dc))return _0x2d5ae7;if(Buffer[_0x4f2096(0x365)](_0x1243dc))return _0x2d5ae7;if(typeof _0x1243dc===_0x4f2096(0xe7))return _0x2d5ae7;const _0xd19f76={'time':+_0x5c343a[_0x4f2096(0x72c)](0x2)};if(_0x1243dc?.[_0x4f2096(0xc9)]&&typeof _0x1243dc[_0x4f2096(0xc9)]==='object'){const {time:_0x5bf29d,..._0x1bc60c}=_0x1243dc[_0x4f2096(0xc9)];Object[_0x4f2096(0x640)](_0xd19f76,_0x1bc60c);}let _0x32a5bd;if(status>=0x190){const _0x505cda=_0x23db35(status,_0x1243dc);_0x32a5bd={'data':null,'error':_0x505cda,'meta':_0xd19f76};}else{if(status===0xcc||_0x1243dc==null)_0x32a5bd={'data':null,'error':null,'meta':_0xd19f76};else{let _0x30d254;if('result'in _0x1243dc)_0x30d254=_0x1243dc[_0x4f2096(0x5a1)];else{const {meta:_0x31a2cf,..._0x3c7372}=_0x1243dc;_0x30d254=Object['keys'](_0x3c7372)[_0x4f2096(0x39d)]>0x0?_0x3c7372:null;}_0x32a5bd={'data':_0x30d254,'error':null,'meta':_0xd19f76};}}return{'status':status===0xcc?0xc8:status,'headers':headers,'body':_0x32a5bd};}async[_0x398641(0x20e)](_0x292112,_0x346188,_0xe04488={},_0x1cd35b={}){const _0x2af299=_0x398641;_0x292112=_0x2ba097(_0x292112);const _0x3548cb=this['_matchRoute'](_0x292112,_0x346188),_0x31386e={'method':_0x292112,'path':_0x346188,'headers':_0xe04488['headers']??{},'body':_0xe04488[_0x2af299(0x4fc)]??null,'query':_0xe04488[_0x2af299(0x684)]??{},'context':_0x1cd35b,'cookies':_0x342723(_0xe04488[_0x2af299(0x165)]?.[_0x2af299(0xf2)]),'route':_0x3548cb,'socket':{'remoteAddress':_0xe04488[_0x2af299(0x4d2)]??_0x2af299(0x6b4)}};_0x31386e[_0x2af299(0xb3)]=_0x31386e['context']||{};!_0x31386e['context'][_0x2af299(0x8a)]&&(_0x31386e[_0x2af299(0xb3)][_0x2af299(0x8a)]=await this[_0x2af299(0xf1)](_0x31386e));if(_0x31386e['context']['auth']?.[_0x2af299(0x373)])return _0x5b9500({'status':0x193,'body':{'error':{'code':'BOOTSTRAP_LOCALHOST_ONLY','message':_0x2af299(0x54e)}}});_0x31386e[_0x2af299(0xb3)][_0x2af299(0x8a)]?.[_0x2af299(0x9b)]&&!_0x31386e[_0x2af299(0xb3)][_0x2af299(0x9b)]&&(_0x31386e[_0x2af299(0xb3)][_0x2af299(0x9b)]=_0x31386e[_0x2af299(0xb3)][_0x2af299(0x8a)][_0x2af299(0x9b)]);let _0x5dbaed=null;const _0x36bac0={'status'(_0x10ea44){const _0x2e4795=_0x2af299;_0x5dbaed=_0x5dbaed||{},_0x5dbaed[_0x2e4795(0x170)]=_0x10ea44;},'setHeader'(_0x46bdd3,_0x7e10c5){const _0x48a7cd=_0x2af299;_0x5dbaed=_0x5dbaed||{},_0x5dbaed[_0x48a7cd(0x165)]=_0x5dbaed[_0x48a7cd(0x165)]||{};const _0x2c5b9b=String(_0x46bdd3)['toLowerCase']();if(_0x2c5b9b===_0x48a7cd(0x264)){const _0x39dea0=_0x5dbaed[_0x48a7cd(0x165)][_0x46bdd3];if(!_0x39dea0)_0x5dbaed[_0x48a7cd(0x165)][_0x46bdd3]=_0x7e10c5;else{if(Array[_0x48a7cd(0x339)](_0x39dea0))_0x39dea0['push'](_0x7e10c5);else _0x5dbaed[_0x48a7cd(0x165)][_0x46bdd3]=[_0x39dea0,_0x7e10c5];}return;}_0x5dbaed[_0x48a7cd(0x165)][_0x46bdd3]=_0x7e10c5;},'send'(_0x193ab2){const _0x47e990=_0x2af299;_0x5dbaed=_0x5dbaed||{},_0x5dbaed[_0x47e990(0x4fc)]=_0x193ab2;}},_0x44dcf9=await this[_0x2af299(0x57c)](_0x31386e,_0x36bac0);if(!_0x44dcf9)return _0x5b9500(_0x5dbaed??{'status':0x193});const _0x112e2a=this[_0x2af299(0x1b7)](_0x31386e);if(_0x112e2a)return _0x5b9500(_0x112e2a);const _0xc6246c=this[_0x2af299(0x55b)](_0x31386e);if(_0xc6246c)return _0x5b9500(_0xc6246c);return await this['_runMiddlewares'](_0x31386e,_0x36bac0,async()=>{const _0x41d99c=_0x2af299,_0x1d393b=await this[_0x41d99c(0x50a)](_0x31386e);if(_0x5dbaed==null){_0x5dbaed=_0x1d393b;return;}_0x5dbaed=_0x5c600f(_0x5dbaed,_0x1d393b);}),_0x5b9500(_0x5dbaed);}[_0x398641(0x1b7)](_0xddca9){const _0xd6e502=_0x398641,_0x32048e=_0xddca9[_0xd6e502(0x67f)]?.[_0xd6e502(0x396)],_0x4080f3=_0x32048e?.[_0xd6e502(0x2af)];if(!_0x32048e?.['hasCanonical']||!_0x4080f3)return null;if(_0xddca9[_0xd6e502(0xb3)]?.[_0xd6e502(0x8a)]?.[_0xd6e502(0x1fd)]===!![]||_0xddca9[_0xd6e502(0xb3)]?.[_0xd6e502(0x8a)]?.[_0xd6e502(0x36f)]===!![])return null;const _0x5a1b92=_0x59eb41(_0xddca9['context']),_0x5062e5=Array['isArray'](_0x4080f3['audiences'])?_0x4080f3[_0xd6e502(0x439)]:null;if(_0x4080f3[_0xd6e502(0x3dd)]&&_0xddca9[_0xd6e502(0xb3)]?.['internal']!==!![])return{'status':0x193,'body':{'error':'Forbidden'}};if(_0x5062e5&&_0x5062e5[_0xd6e502(0x39d)]>0x0&&!_0x5062e5[_0xd6e502(0x8f)](_0x5a1b92)&&!(_0x5a1b92===_0xd6e502(0x1db)&&_0x5062e5[_0xd6e502(0x8f)](_0xd6e502(0x30a))))return{'status':0x193,'body':{'error':_0xd6e502(0x3cf)}};if(_0x4080f3['authRequired']&&!_0x1aa987(_0xddca9))return{'status':0x191,'body':{'error':_0xd6e502(0x456)}};const _0x28e734=_0x4080f3[_0xd6e502(0x6b)];if(!_0x28e734)return null;if(_0xddca9['context']?.[_0xd6e502(0x8a)]?.[_0xd6e502(0x66f)]===_0xd6e502(0x5dd))return null;const _0xc38e58=_0xddca9[_0xd6e502(0xb3)]?.[_0xd6e502(0x8a)]?.[_0xd6e502(0x129)];if(!_0xc38e58){if(_0xddca9['context']?.[_0xd6e502(0x8a)]?.['ok']===!![])return null;return{'status':0x193,'body':{'error':'Forbidden\x20—\x20no\x20permissions\x20available'}};}if(!_0xddca9[_0xd6e502(0x275)]&&_0xddca9['route']?.[_0xd6e502(0x3a1)]){const _0x5b16da=_0xddca9[_0xd6e502(0x67f)]['matcher']['regex'][_0xd6e502(0xb1)](_0xddca9[_0xd6e502(0x4c5)]);_0x5b16da&&(_0xddca9[_0xd6e502(0x275)]={},_0xddca9[_0xd6e502(0x67f)][_0xd6e502(0x3a1)]['keys'][_0xd6e502(0x2e2)]((_0x1e23a4,_0x40e0ba)=>{const _0x518460=_0xd6e502,_0x5a5221=_0x5b16da[_0x40e0ba+0x1];_0xddca9['params'][_0x1e23a4]=_0x5a5221?decodeURIComponent(_0x5a5221):_0xddca9['route']['matcher'][_0x518460(0x10f)][_0x1e23a4]??undefined;}));}let _0x2a4670=null;const _0x19014b=_0x4080f3[_0xd6e502(0x498)]===_0xd6e502(0x124)?_0xd6e502(0x5b0):_0x4080f3[_0xd6e502(0x498)]?.[_0xd6e502(0x124)];_0x19014b&&(_0x2a4670=_0x341aba(_0xddca9,_0x19014b));if(_0x2a4670&&_0x2a4670[_0xd6e502(0x42e)]('~')){const _0x1ab43c=_0x32f72e(_0x28e734),_0x483237=_0x1cd758(_0xc38e58[_0xd6e502(0x1f4)]||[],(_0xc38e58[_0xd6e502(0x660)]||{})[_0x2a4670]||[]);if(!_0x1d012a(_0x483237,_0x1ab43c))return{'status':0x193,'body':{'error':_0xd6e502(0x280)+_0x1ab43c+'\x20for\x20system\x20env'}};}const _0x1ddb7f=_0x1cd758(_0xc38e58[_0xd6e502(0x1f4)]||[],_0x2a4670?(_0xc38e58['grants']||{})[_0x2a4670]||[]:[]);if(!_0x1d012a(_0x1ddb7f,_0x28e734))return{'status':0x193,'body':{'error':_0xd6e502(0x280)+_0x28e734}};return null;}['_validateOperationRequest'](_0x128968){const _0x3f7f63=_0x398641,_0x169b2b=_0x128968[_0x3f7f63(0x67f)],_0x104b1e=_0x169b2b?.[_0x3f7f63(0x396)];if(!_0x104b1e?.[_0x3f7f63(0x386)]||!_0x104b1e[_0x3f7f63(0x2f6)])return null;let _0x3bebf6=_0x128968[_0x3f7f63(0x275)]??null;if(!_0x3bebf6&&_0x169b2b?.[_0x3f7f63(0x3a1)]){const _0x581a02=_0x169b2b[_0x3f7f63(0x3a1)]['regex']['exec'](_0x128968[_0x3f7f63(0x4c5)]);_0x581a02&&(_0x3bebf6={},_0x169b2b[_0x3f7f63(0x3a1)]['keys'][_0x3f7f63(0x2e2)]((_0x2f45c3,_0x6dbe98)=>{const _0x25220b=_0x3f7f63,_0x2bac58=_0x581a02[_0x6dbe98+0x1];_0x3bebf6[_0x2f45c3]=_0x2bac58?decodeURIComponent(_0x2bac58):_0x169b2b[_0x25220b(0x3a1)][_0x25220b(0x10f)][_0x2f45c3]??undefined;}));}const _0x8f3bc0=_0x496ca0(_0x169b2b,_0x3bebf6??{},_0x128968[_0x3f7f63(0x684)]??{},_0x128968[_0x3f7f63(0x4fc)],_0x128968[_0x3f7f63(0x165)]??{}),_0x41f30a=_0xcc0250(_0x169b2b,_0x8f3bc0||{});if(!_0x41f30a)return null;const _0x5f2af7=_0x4dad28(_0x41f30a[_0x3f7f63(0x422)]);return{'status':0x190,'body':{'error':_0x41f30a[_0x3f7f63(0x25b)],'code':_0x41f30a[_0x3f7f63(0x25b)],'message':_0x5f2af7?_0x3f7f63(0x538)+_0x5f2af7:_0x3f7f63(0x1a5),'details':_0x41f30a[_0x3f7f63(0x422)]}};}['validateRouteInput'](_0x5dcb9b,_0x5413b3){const _0x10d42b=_0x398641,_0x527ecb=_0xcc0250(_0x5dcb9b,_0x5413b3||{});if(!_0x527ecb)return null;return{'code':_0x527ecb[_0x10d42b(0x25b)],'message':_0x4dad28(_0x527ecb[_0x10d42b(0x422)])?_0x10d42b(0x538)+_0x4dad28(_0x527ecb[_0x10d42b(0x422)]):_0x10d42b(0x1a5),'details':_0x527ecb['errors']};}async[_0x398641(0x50a)](_0x2dce10){const _0x30584f=_0x398641;if(_0x2dce10[_0x30584f(0xdf)]===_0x30584f(0x43f)){const _0xb0bf7f=this['_bestMatch'](_0x30584f(0x43f),_0x2dce10[_0x30584f(0x4c5)],{'corsOnly':!![]});if(_0xb0bf7f)return{'status':0xcc,'headers':_0xa37337(_0x2dce10[_0x30584f(0x165)],_0xb0bf7f[_0x30584f(0xc9)]['cors'],_0xb0bf7f['method'])||{}};}const _0x382430=this[_0x30584f(0x47d)](_0x2dce10[_0x30584f(0xdf)],_0x2dce10['path']);if(_0x382430){const _0x4b0712=_0x382430[_0x30584f(0x3a1)][_0x30584f(0x42f)]['exec'](_0x2dce10[_0x30584f(0x4c5)]),_0x5cb0d7={};_0x382430[_0x30584f(0x3a1)]['keys']['forEach']((_0x164932,_0x4eab89)=>{const _0x51e336=_0x30584f,_0x3fd9dc=_0x4b0712[_0x4eab89+0x1];_0x5cb0d7[_0x164932]=_0x3fd9dc?decodeURIComponent(_0x3fd9dc):_0x382430[_0x51e336(0x3a1)][_0x51e336(0x10f)][_0x164932]??undefined;}),_0x2dce10[_0x30584f(0x275)]=_0x5cb0d7;try{const _0x2b4c95=await _0x382430[_0x30584f(0x4ee)]({'params':_0x5cb0d7,'body':_0x2dce10[_0x30584f(0x4fc)],'query':_0x2dce10[_0x30584f(0x684)],'headers':_0x2dce10['headers'],'context':_0x2dce10[_0x30584f(0xb3)]}),_0x560e7f=_0x5b9500(_0x2b4c95),_0x7f6642=_0xa37337(_0x2dce10[_0x30584f(0x165)],_0x382430[_0x30584f(0xc9)]?.[_0x30584f(0x198)],_0x382430[_0x30584f(0xdf)]);if(!_0x7f6642)return _0x560e7f;return{..._0x560e7f,'headers':{..._0x560e7f['headers']||{},..._0x7f6642}};}catch(_0x11b2c1){const _0x20c79b=_0x11b2c1?.['status']||_0x544ce8[_0x11b2c1?.[_0x30584f(0x25b)]]||0x1f4;return{'status':_0x20c79b,'body':{'error':_0x11b2c1[_0x30584f(0x5e6)]||_0x30584f(0x319),'code':_0x11b2c1?.[_0x30584f(0x25b)]||_0x341cf6[_0x20c79b]||_0x30584f(0x296)+_0x20c79b,'message':_0x11b2c1?.[_0x30584f(0x5e6)]||_0x30584f(0x319),..._0x11b2c1?.['details']!=null?{'details':_0x11b2c1[_0x30584f(0x2a6)]}:{}}};}}return{'status':0x194,'body':{'error':_0x30584f(0x6e1)}};}[_0x398641(0x289)](_0x203825,_0x43a70e={}){const _0x3fbb61=_0x398641;if(typeof _0x43a70e===_0x3fbb61(0xe7)||Array[_0x3fbb61(0x339)](_0x43a70e))_0x43a70e={'host':_0x43a70e};_0x43a70e=_0x43a70e??{};const _0x37b2d2=Number(_0x43a70e[_0x3fbb61(0x150)])||0x0;if(_0x37b2d2>=0x1||_0x43a70e[_0x3fbb61(0x5a2)]!=null||_0x43a70e[_0x3fbb61(0x686)]!=null){const _0x59fde4=new Error('http.listen({workers/makeOkdb/primaryOkdb})\x20is\x20no\x20longer\x20supported\x20in\x20the\x20'+_0x3fbb61(0x2a1)+'CLI\x20(`okdb\x20listen`),\x20or\x20use\x20Node\x27s\x20built-in\x20`cluster`\x20module\x20and\x20call\x20'+_0x3fbb61(0x519));_0x59fde4['code']=_0x3fbb61(0x8c);throw _0x59fde4;}if(this[_0x3fbb61(0x33d)])throw new Error('HTTP\x20server\x20already\x20running');const _0x10269b=_0x43a70e['host']==null?[undefined]:[][_0x3fbb61(0x123)](_0x43a70e[_0x3fbb61(0x41a)]);if(!_0x10269b['length']||_0x10269b[_0x3fbb61(0x35c)](_0x201245=>_0x201245!==undefined&&(typeof _0x201245!=='string'||!_0x201245))){const _0x3deeab=new Error('http.listen:\x20host\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20an\x20array\x20of\x20them');_0x3deeab[_0x3fbb61(0x25b)]=_0x3fbb61(0x173);throw _0x3deeab;}_0x203825&&this[_0x3fbb61(0x8a)][_0x3fbb61(0x394)]==='okdb_session'&&(this[_0x3fbb61(0x8a)][_0x3fbb61(0x394)]='okdb_session_'+_0x203825,this[_0x3fbb61(0x7d)]?.['auth']&&(this[_0x3fbb61(0x7d)]['auth'][_0x3fbb61(0x703)]=this[_0x3fbb61(0x8a)][_0x3fbb61(0x394)]));const _0x10c66d=this[_0x3fbb61(0x7d)]?.[_0x3fbb61(0x518)]?.['debug']?.[_0x3fbb61(0x688)]??![],_0xd17da1=async(_0x276d09,_0x2fb16)=>{const _0x3ada12=_0x3fbb61,_0x402a80=Date[_0x3ada12(0x127)]();if(_0x10c66d){const _0x4e3ea4=_0x276d09[_0x3ada12(0x62d)]||'/',_0x1b7872=_0x276d09[_0x3ada12(0x165)]?.[_0x3ada12(0x6e9)]?_0x276d09[_0x3ada12(0x165)][_0x3ada12(0x6e9)][_0x3ada12(0x416)](/^Bearer\s+(\S{0,8})\S*/i,'Bearer\x20$1…'):'-',_0x5bca76=_0x276d09[_0x3ada12(0x165)]?.[_0x3ada12(0x3c8)]||'-',_0x2b7295=_0x276d09['headers']?.[_0x3ada12(0x451)]||_0x276d09['headers']?.[_0x3ada12(0x3fb)]||'-',_0x66d03e=_0x276d09[_0x3ada12(0x165)]?.[_0x3ada12(0x633)]||'-';process[_0x3ada12(0x11c)][_0x3ada12(0xb6)](_0x3ada12(0x555)+_0x276d09[_0x3ada12(0xdf)]['padEnd'](0x7)+'\x20'+_0x4e3ea4[_0x3ada12(0x485)](0x2d)+'\x20'+(_0x3ada12(0x5af)+_0x1b7872+_0x3ada12(0x111)+_0x66d03e+_0x3ada12(0x455)+_0x5bca76+'\x20cf-ip='+_0x2b7295+'\x0a'));}try{const _0x4612d2=new _0x1d8af8(_0x276d09['url'],_0x3ada12(0x340)+_0x276d09[_0x3ada12(0x165)][_0x3ada12(0x41a)]),_0x1bd0a6=this[_0x3ada12(0x4a4)](_0x276d09['method'],_0x4612d2[_0x3ada12(0x22c)]),_0x13290e=_0x1bd0a6?.[_0x3ada12(0xc9)]?.[_0x3ada12(0x349)]===!![];if(_0x13290e){const _0x9f1d3d=_0x276d09['headers']?.[_0x3ada12(0x3b7)];if(_0x9f1d3d!=null){const _0x41cb74=Number(_0x9f1d3d);if(Number['isFinite'](_0x41cb74)&&_0x41cb74>this[_0x3ada12(0xc4)]){_0x2fb16[_0x3ada12(0x3e6)]=0x19d,_0x2fb16['end'](_0x3ada12(0x33f));return;}}}const _0x52a9c8=_0x13290e?null:await _0xcf7450(_0x276d09,this[_0x3ada12(0xc4)]),_0x5c6f1c=_0x13290e?_0x251ad8(_0x276d09,this[_0x3ada12(0xc4)]):undefined,_0x5aecaf=await this[_0x3ada12(0x20e)](_0x276d09['method'],_0x4612d2[_0x3ada12(0x22c)],{'body':_0x52a9c8,'query':Object[_0x3ada12(0x66e)](_0x4612d2[_0x3ada12(0x15d)][_0x3ada12(0x61d)]()),'headers':_0x276d09[_0x3ada12(0x165)]},{'req':_0x276d09,'res':_0x2fb16,'rawStream':_0x5c6f1c}),_0x5511be=this[_0x3ada12(0x4a4)](_0x276d09[_0x3ada12(0xdf)],_0x4612d2['pathname']),_0x43f45e=Date['now']()-_0x402a80,_0x143e10=this[_0x3ada12(0x2b2)](_0x5511be,_0x5aecaf)?this['_wrapApiResponse'](_0x5aecaf,_0x43f45e):_0x5b9500(_0x5aecaf),_0x5b1c67=(_0x143e10[_0x3ada12(0x170)]||0xc8)>=0x190;this['metrics']['record'](_0x276d09[_0x3ada12(0xdf)],_0x43f45e,_0x5b1c67),_0xcdda3e(_0x2fb16,_0x143e10);if(_0x10c66d){const _0x428d0f=_0x143e10[_0x3ada12(0x170)]||0xc8,_0x4d6624=Date['now']()-_0x402a80;process[_0x3ada12(0x11c)][_0x3ada12(0xb6)](_0x3ada12(0x374)+_0x276d09['method'][_0x3ada12(0x485)](0x7)+'\x20'+_0x4612d2[_0x3ada12(0x22c)][_0x3ada12(0x485)](0x2d)+'\x20'+_0x428d0f+'\x20\x20'+_0x4d6624+_0x3ada12(0x61a));}}catch(_0x27b522){const _0x43765a=Date[_0x3ada12(0x127)]()-_0x402a80;this[_0x3ada12(0x6b2)]['record'](_0x276d09[_0x3ada12(0xdf)],_0x43765a,!![]);const _0x4dcec8=_0x27b522?.[_0x3ada12(0x170)]||0x1f4;_0x2fb16[_0x3ada12(0x3e6)]=_0x4dcec8,_0x4dcec8===0x19d?_0x2fb16['end'](_0x3ada12(0x33f)):_0x2fb16['end'](_0x27b522[_0x3ada12(0x5e6)]||_0x3ada12(0x319));}};this[_0x3fbb61(0x63b)]=_0x10269b[_0x3fbb61(0x757)](_0x18bc0d=>{const _0x1f2859=_0x3fbb61,_0x5c06eb=_0x1a5019[_0x1f2859(0x685)](_0xd17da1);_0x5c06eb['on'](_0x1f2859(0x504),_0x507f3c=>{const _0x187a5e=_0x1f2859;this['_sockets'][_0x187a5e(0x3e9)](_0x507f3c),_0x507f3c['on'](_0x187a5e(0x44f),()=>this['_sockets'][_0x187a5e(0x95)](_0x507f3c));});if(_0x18bc0d===undefined)_0x5c06eb[_0x1f2859(0x289)](_0x203825);else _0x5c06eb[_0x1f2859(0x289)](_0x203825,_0x18bc0d);return _0x5c06eb;}),this[_0x3fbb61(0x33d)]=this[_0x3fbb61(0x63b)][0x0];for(const _0x3cc1e1 of this[_0x3fbb61(0x63b)]['slice'](0x1))_0x3cc1e1['on'](_0x3fbb61(0x492),_0x38a335=>this['server']?.[_0x3fbb61(0x25c)](_0x3fbb61(0x492),_0x38a335));const _0xcb85fa=_0x138376(_0x203825,_0x43a70e[_0x3fbb61(0x41a)]),_0x28b61d=this[_0x3fbb61(0x7d)];return _0x28b61d?.[_0x3fbb61(0x5c9)]&&(_0x28b61d[_0x3fbb61(0x5c9)][_0x3fbb61(0x316)](_0xcb85fa),require$$1$1['isWorker']?_0x28b61d[_0x3fbb61(0x318)]?.({'kind':'http-server'})[_0x3fbb61(0x618)](()=>{}):_0x28b61d[_0x3fbb61(0x3fd)]?.({'kind':_0x3fbb61(0x50c),'listenAddr':_0xcb85fa})[_0x3fbb61(0x618)](()=>{})),this[_0x3fbb61(0x33d)];}async[_0x398641(0x44f)](_0xea6a2b={}){const _0x536255=_0x398641,_0x201ab7=this[_0x536255(0x33d)];this[_0x536255(0x33d)]=null;const _0x204de3=this['servers']['includes'](_0x201ab7)?this['servers']:_0x201ab7?[_0x201ab7]:[];this['servers']=[];if(_0x201ab7&&_0x201ab7[_0x536255(0xe8)]){try{await _0x201ab7[_0x536255(0x44f)]();}catch{}this['metrics']&&this['metrics']['close']();return;}if(_0x204de3[_0x536255(0x39d)]){const _0x17dcc3=Number[_0x536255(0x3ff)](_0xea6a2b[_0x536255(0x27a)])?Math['max'](0x0,_0xea6a2b[_0x536255(0x27a)]):0x3e8,_0x2fbc55=_0x2b7569=>new Promise(_0x412a91=>{const _0x230f73=_0x536255;let _0x1d58f5=![],_0x3f1030=null,_0x3e5e00=null;const _0x542ad3=()=>{if(_0x1d58f5)return;_0x1d58f5=!![];if(_0x3f1030)clearTimeout(_0x3f1030);if(_0x3e5e00)clearTimeout(_0x3e5e00);_0x412a91();};try{_0x2b7569[_0x230f73(0x44f)](_0x542ad3);}catch{_0x542ad3();return;}try{_0x2b7569[_0x230f73(0x2f0)]?.();}catch{}_0x3f1030=setTimeout(()=>{const _0x2fb7b0=_0x230f73;try{_0x2b7569[_0x2fb7b0(0x747)]?.();}catch{}for(const _0xce39d5 of this[_0x2fb7b0(0x6d0)]){try{_0xce39d5[_0x2fb7b0(0x565)]();}catch{}}_0x3e5e00=setTimeout(_0x542ad3,0x64),_0x3e5e00['unref']?.();},_0x17dcc3),_0x3f1030[_0x230f73(0xe9)]?.();});await Promise[_0x536255(0x438)](_0x204de3[_0x536255(0x757)](_0x2fbc55));}this[_0x536255(0x6b2)]&&this[_0x536255(0x6b2)][_0x536255(0x44f)]();}['signCookie'](_0x269bf7,_0x1e29c2,_0x46b622=0x36ee80){const _0x409313=_0x398641,_0x2d0953=Date[_0x409313(0x127)](),_0x856995=Buffer[_0x409313(0x690)](JSON[_0x409313(0x5c1)]({'iat':_0x2d0953,'exp':_0x2d0953+_0x46b622,..._0x269bf7}))[_0x409313(0x240)](_0x409313(0x1bf)),_0x15a223=_0x4ed188(_0x856995,_0x1e29c2);return _0x856995+'.'+_0x15a223;}['formatCookie'](_0x35ce90,_0x4e39e9={}){const _0x1717ff=_0x398641,{httpOnly:httpOnly=!![],sameSite:sameSite=_0x1717ff(0x14c),path:path='/',secure:secure=![],maxAge:maxAge=null,expires:expires=null}=_0x4e39e9;let _0x237b42=this[_0x1717ff(0x8a)][_0x1717ff(0x394)]+'='+_0x35ce90;if(httpOnly)_0x237b42+=_0x1717ff(0x4f3);if(sameSite)_0x237b42+=';\x20SameSite='+sameSite;if(path)_0x237b42+=_0x1717ff(0x55c)+path;if(secure)_0x237b42+=_0x1717ff(0x98);if(Number[_0x1717ff(0x3ff)](maxAge))_0x237b42+=_0x1717ff(0x2fb)+Math[_0x1717ff(0x68c)](0x0,Math[_0x1717ff(0x5e9)](maxAge));if(expires instanceof Date)_0x237b42+=_0x1717ff(0x18e)+expires[_0x1717ff(0x52a)]();return _0x237b42;}[_0x398641(0x462)](_0x4d15ae=this[_0x398641(0x8a)][_0x398641(0x394)],_0x39b3ea={}){const _0x579765=_0x398641,{path:path='/',sameSite:sameSite=_0x579765(0x14c),secure:secure=![],httpOnly:httpOnly=!![]}=_0x39b3ea;let _0x43243a=_0x4d15ae+'=';if(httpOnly)_0x43243a+=_0x579765(0x4f3);if(sameSite)_0x43243a+=';\x20SameSite='+sameSite;if(path)_0x43243a+=_0x579765(0x55c)+path;if(secure)_0x43243a+=_0x579765(0x98);return _0x43243a+=_0x579765(0x3c9),_0x43243a;}[_0x398641(0x294)](_0x3e1a00,_0x448807){const _0x454182=_0x398641;if(!_0x3e1a00)return null;const [_0x5cdd49,_0x258608]=String(_0x3e1a00)[_0x454182(0x2aa)]('.');if(!_0x5cdd49||!_0x258608)return null;const _0x1d84b5=_0x4ed188(_0x5cdd49,_0x448807);if(!_0x218fe9(_0x258608,_0x1d84b5))return null;try{const _0x44aec5=JSON['parse'](Buffer[_0x454182(0x690)](_0x5cdd49,_0x454182(0x1bf))[_0x454182(0x240)]());if(_0x44aec5[_0x454182(0x69e)]<=Date[_0x454182(0x127)]())return null;return _0x44aec5;}catch{return null;}}['parseBearer'](_0x3eabe2){const _0x399e24=_0x398641;if(this[_0x399e24(0x7d)]?.['auth'])return this[_0x399e24(0x7d)]['auth'][_0x399e24(0x51d)](_0x3eabe2);return _0x270045(_0x3eabe2);}[_0x398641(0x2e7)](_0x38653e){const _0x1b552f=_0x398641;if(this[_0x1b552f(0x7d)]?.[_0x1b552f(0x8a)])return this[_0x1b552f(0x7d)]['auth'][_0x1b552f(0x2e7)](_0x38653e);const _0x2c0e16=this[_0x1b552f(0x2c0)]?.[_0x1b552f(0x4b5)]??0x36ee80,_0x3cf921=this[_0x1b552f(0x2c0)]?.[_0x1b552f(0x74d)];return _0x4ee366(_0x38653e,_0x3cf921,_0x2c0e16);}[_0x398641(0x191)](_0x1e37e9){const _0x17a805=_0x398641;if(this['_okdb']?.[_0x17a805(0x8a)])return this[_0x17a805(0x7d)][_0x17a805(0x8a)][_0x17a805(0x191)](_0x1e37e9);const _0x3d0014=this[_0x17a805(0x2c0)]?.[_0x17a805(0x74d)];return _0x3ac6d1(_0x1e37e9,_0x3d0014);}async['authenticateRequest'](_0x327f27){const _0x21bf40=_0x398641;if(this[_0x21bf40(0x7d)]?.[_0x21bf40(0x8a)])return this[_0x21bf40(0x7d)][_0x21bf40(0x8a)][_0x21bf40(0xf1)](_0x327f27);if(_0x327f27['context']?.[_0x21bf40(0x1db)]===!![]||this[_0x21bf40(0x376)]===_0x21bf40(0x1fd))return{'id':_0x21bf40(0x619),'username':_0x21bf40(0x619),'roles':[_0x21bf40(0x270)],'isAuthenticated':!![],'isSystem':!![],'user':{'id':_0x21bf40(0x619),'username':_0x21bf40(0x619),'roles':['admin'],'isAuthenticated':!![],'isSystem':!![]}};const _0x2a05b7=this[_0x21bf40(0x51d)](_0x327f27[_0x21bf40(0x165)]?.[_0x21bf40(0x6e9)]),_0x4a94cf=_0x327f27[_0x21bf40(0x28c)]?.[this[_0x21bf40(0x8a)][_0x21bf40(0x394)]],_0x225577=_0x2a05b7||_0x4a94cf;if(!_0x225577)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x15dbb0=this[_0x21bf40(0x191)](_0x225577);if(!_0x15dbb0)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x30e168={'id':_0x15dbb0[_0x21bf40(0x172)]??null,'username':_0x15dbb0['username']??null,'roles':Array[_0x21bf40(0x339)](_0x15dbb0[_0x21bf40(0x733)])?_0x15dbb0['roles']:[],'isAuthenticated':!![],'isSystem':![]};return{'id':_0x30e168['id'],'username':_0x30e168[_0x21bf40(0x573)],'roles':_0x30e168[_0x21bf40(0x733)],'isAuthenticated':!![],'isSystem':![],'user':_0x30e168,'claims':_0x15dbb0,'subject':_0x30e168['id']};}async[_0x398641(0x67)](_0x5438a4,_0x2e4be8={}){const _0x2bb927=_0x398641,_0x163bb2=_0x4ba030(_0x5438a4),_0x3bd29d=Array[_0x2bb927(0x339)](_0x2e4be8[_0x2bb927(0x59a)])&&_0x2e4be8[_0x2bb927(0x59a)][_0x2bb927(0x39d)]>0x0?_0x2e4be8[_0x2bb927(0x59a)]:[_0x2bb927(0xdb),'ES256'],_0x2d8e2a=_0x163bb2[_0x2bb927(0x632)]?.[_0x2bb927(0x2b3)];if(!_0x3bd29d[_0x2bb927(0x8f)](_0x2d8e2a))throw new Error(_0x2bb927(0x336)+_0x2d8e2a);if(!_0x163bb2[_0x2bb927(0x632)]?.[_0x2bb927(0x4ff)])throw new Error(_0x2bb927(0x6cf));const _0x226f2b=await this['_getOidcDiscovery'](_0x2e4be8);if(!_0x226f2b?.[_0x2bb927(0x715)])throw new Error('OIDC\x20discovery\x20missing\x20jwks_uri');const _0x4d00c7=await this['_getJwkKey'](_0x226f2b['jwks_uri'],_0x163bb2[_0x2bb927(0x632)][_0x2bb927(0x4ff)],_0x2e4be8);if(!_0x2be05e(_0x2d8e2a,_0x4d00c7,_0x163bb2[_0x2bb927(0x227)],_0x163bb2[_0x2bb927(0x37f)]))throw new Error('JWT\x20signature\x20verification\x20failed');const _0x3cce62=Math[_0x2bb927(0x5e9)](Date[_0x2bb927(0x127)]()/0x3e8),_0xbf4ecd=_0x163bb2[_0x2bb927(0x4ec)]||{};if(_0xbf4ecd['iss']!==_0x226f2b[_0x2bb927(0x5d3)])throw new Error('JWT\x20issuer\x20mismatch');const _0x5b1160=_0x2e4be8[_0x2bb927(0x603)];if(_0x5b1160){const _0x5718ea=_0x21824d(_0xbf4ecd['aud']);if(!_0x5718ea[_0x2bb927(0x8f)](_0x5b1160))throw new Error(_0x2bb927(0x44b));}if(typeof _0xbf4ecd[_0x2bb927(0x69e)]!=='number'||_0xbf4ecd['exp']<=_0x3cce62)throw new Error(_0x2bb927(0x207));if(_0xbf4ecd[_0x2bb927(0x6bb)]!=null&&_0xbf4ecd[_0x2bb927(0x6bb)]>_0x3cce62)throw new Error(_0x2bb927(0x37b));if(_0xbf4ecd[_0x2bb927(0x634)]==='id')throw new Error('ID\x20token\x20is\x20not\x20accepted');return{'subject':_0xbf4ecd[_0x2bb927(0x172)]??null,'email':_0xbf4ecd[_0x2bb927(0x142)]??null,'scopes':typeof _0xbf4ecd[_0x2bb927(0x498)]===_0x2bb927(0xe7)?_0xbf4ecd[_0x2bb927(0x498)][_0x2bb927(0x2aa)](/\s+/)[_0x2bb927(0x293)](Boolean):[],'claims':_0xbf4ecd,'tokenType':_0x2bb927(0x2af)};}async[_0x398641(0x4f7)](_0x10d718={}){const _0x1f00cf=_0x398641,_0x40138a=String(_0x10d718[_0x1f00cf(0x5d3)]||'')[_0x1f00cf(0x416)](/\/+$/,'');if(!_0x40138a)return null;const _0x4d007c=Number[_0x1f00cf(0x3ff)](_0x10d718['discoveryTtlMs'])?_0x10d718[_0x1f00cf(0x700)]:0xa*0x3c*0x3e8;if(this[_0x1f00cf(0x1bc)]?.['issuer']===_0x40138a&&this[_0x1f00cf(0x1bc)][_0x1f00cf(0x57a)]>Date[_0x1f00cf(0x127)]())return this[_0x1f00cf(0x1bc)][_0x1f00cf(0x101)];const _0x1b1c80=await _0xfc123b(_0x40138a+_0x1f00cf(0x479)),_0x36e488={'issuer':_0x1b1c80[_0x1f00cf(0x5d3)]||_0x40138a,'authorization_endpoint':_0x10d718[_0x1f00cf(0x41f)]||_0x1b1c80[_0x1f00cf(0x717)],'token_endpoint':_0x10d718[_0x1f00cf(0x19f)]||_0x1b1c80[_0x1f00cf(0x2f1)],'jwks_uri':_0x10d718['jwksUri']||_0x1b1c80['jwks_uri']};return this[_0x1f00cf(0x1bc)]={'issuer':_0x40138a,'value':_0x36e488,'expiresAt':Date[_0x1f00cf(0x127)]()+_0x4d007c},_0x36e488;}async[_0x398641(0x2c5)](_0x2357d9,_0x3bdb83=0x5*0x3c*0x3e8){const _0x96b216=_0x398641,_0x6fb24e=await _0xfc123b(_0x2357d9),_0x233fb5=new Map();for(const _0x3d9f54 of _0x6fb24e[_0x96b216(0x6d8)]||[]){if(!_0x3d9f54?.['kid'])continue;_0x233fb5[_0x96b216(0x49d)](_0x3d9f54['kid'],_0x399aec(_0x3d9f54));}return this[_0x96b216(0x69b)]={'uri':_0x2357d9,'keys':_0x233fb5,'expiresAt':Date['now']()+_0x3bdb83},this[_0x96b216(0x69b)];}async['_getJwkKey'](_0x5d1750,_0x203dc9,_0x30a88a={}){const _0x4d8ab6=_0x398641,_0x3daa7d=Number['isFinite'](_0x30a88a[_0x4d8ab6(0x4e5)])?_0x30a88a[_0x4d8ab6(0x4e5)]:0x5*0x3c*0x3e8,_0x461c04=0x1e*0x3e8,_0xcf7bbf=this[_0x4d8ab6(0x12b)]['get'](_0x203dc9);if(_0xcf7bbf!==undefined&&_0xcf7bbf>Date[_0x4d8ab6(0x127)]())throw new Error('Unknown\x20JWKS\x20kid:\x20'+_0x203dc9);(!this[_0x4d8ab6(0x69b)]||this['_jwksCache'][_0x4d8ab6(0x661)]!==_0x5d1750||this['_jwksCache'][_0x4d8ab6(0x57a)]<=Date[_0x4d8ab6(0x127)]())&&await this[_0x4d8ab6(0x2c5)](_0x5d1750,_0x3daa7d);let _0xdef50=this['_jwksCache']?.[_0x4d8ab6(0x6d8)]?.[_0x4d8ab6(0x6a)](_0x203dc9);if(_0xdef50)return _0xdef50;await this[_0x4d8ab6(0x2c5)](_0x5d1750,_0x3daa7d),_0xdef50=this[_0x4d8ab6(0x69b)]?.['keys']?.[_0x4d8ab6(0x6a)](_0x203dc9);if(!_0xdef50){this[_0x4d8ab6(0x12b)][_0x4d8ab6(0x49d)](_0x203dc9,Date['now']()+_0x461c04);throw new Error('Unknown\x20JWKS\x20kid:\x20'+_0x203dc9);}return _0xdef50;}[_0x398641(0x283)](_0x3a1bd0){const _0x2e61fb=_0x398641;if(this[_0x2e61fb(0x7d)]?.[_0x2e61fb(0x8a)])return this[_0x2e61fb(0x7d)][_0x2e61fb(0x8a)]['_normalizeOAuthAuthResult'](_0x3a1bd0);const _0x6f24b4=_0x3a1bd0?.[_0x2e61fb(0x302)]||{},_0x4a6183={'sub':_0x3a1bd0?.['subject']??_0x6f24b4[_0x2e61fb(0x172)]??null,'email':_0x3a1bd0?.[_0x2e61fb(0x142)]??_0x6f24b4[_0x2e61fb(0x142)]??null,'name':_0x3a1bd0?.[_0x2e61fb(0x707)]??_0x6f24b4['name']??_0x6f24b4[_0x2e61fb(0x277)]??null,'groups':_0x3a1bd0?.[_0x2e61fb(0x237)]??_0x6f24b4[_0x2e61fb(0x237)]??[],'roles':_0x3a1bd0?.['roles']??_0x6f24b4['roles']??[]};return{'type':_0x2e61fb(0x75e),'tokenType':_0x3a1bd0?.['tokenType']??_0x2e61fb(0x2af),'subject':_0x4a6183[_0x2e61fb(0x172)],'email':_0x4a6183[_0x2e61fb(0x142)],'scopes':_0x3a1bd0?.[_0x2e61fb(0x588)]??_0x6f24b4[_0x2e61fb(0x498)]?.['split']?.('\x20')?.[_0x2e61fb(0x293)](Boolean)??[],'claims':_0x6f24b4,'user':_0x4a6183,'isAuthenticated':!![]};}['createLoginState'](_0x80be6c={},_0x5c3313=0x927c0){const _0x2a0d5b=_0x398641;if(this['_okdb']?.[_0x2a0d5b(0x8a)])return this[_0x2a0d5b(0x7d)]['auth']['createLoginState'](_0x80be6c,_0x5c3313);const _0x2125e3=_0x392ef6(0x18);this[_0x2a0d5b(0x6da)]['set'](_0x2125e3,{..._0x80be6c,'exp':Date[_0x2a0d5b(0x127)]()+_0x5c3313});if(this['_loginStates']['size']%0x32===0x0){const _0x5955d7=Date[_0x2a0d5b(0x127)]();for(const [_0x284104,_0x432d40]of this['_loginStates']){if(_0x432d40[_0x2a0d5b(0x69e)]<=_0x5955d7)this[_0x2a0d5b(0x6da)][_0x2a0d5b(0x95)](_0x284104);}}return _0x2125e3;}[_0x398641(0x5a5)](_0x3ecde0){const _0x2177ae=_0x398641;if(this[_0x2177ae(0x7d)]?.[_0x2177ae(0x8a)])return this[_0x2177ae(0x7d)][_0x2177ae(0x8a)]['consumeLoginState'](_0x3ecde0);if(!_0x3ecde0)return null;const _0x2a581d=this['_loginStates'][_0x2177ae(0x6a)](_0x3ecde0);this['_loginStates'][_0x2177ae(0x95)](_0x3ecde0);if(!_0x2a581d)return null;if(_0x2a581d[_0x2177ae(0x69e)]<=Date['now']())return null;return _0x2a581d;}}function _0x5b9500(_0x856313){const _0xfcbb4d=_0x398641;if(_0x856313==null)return{'status':0xcc};if(Buffer[_0xfcbb4d(0x365)](_0x856313)||_0x8fc7b4(_0x856313))return{'status':0xc8,'body':_0x856313};if(typeof _0x856313===_0xfcbb4d(0x5d4)&&_0xfcbb4d(0x170)in _0x856313){if(!('body'in _0x856313)&&!_0x8fc7b4(_0x856313[_0xfcbb4d(0x4fc)])){const {status:_0x4d67d0,headers:_0x38a27f,..._0x3bc078}=_0x856313;if(Object[_0xfcbb4d(0x6d8)](_0x3bc078)['length']>0x0)return{'status':_0x4d67d0,'headers':_0x38a27f,'body':_0x3bc078};}return _0x856313;}return{'status':0xc8,'body':_0x856313};}function _0x8fc7b4(_0x4b26e2){const _0x41cbeb=_0x398641;return _0x4b26e2&&typeof _0x4b26e2[_0x41cbeb(0x199)]===_0x41cbeb(0x372);}function _0x251ad8(_0x557298,_0x522ec4){const _0x5e06e6=_0x398641,{PassThrough:_0xbb0669}=require$$5;let _0x474724=0x0,_0x92b83b=![];const _0x2af554=new _0xbb0669();return _0x557298['on'](_0x5e06e6(0x32e),_0x55bd8e=>{const _0x58c03e=_0x5e06e6;if(_0x92b83b)return;_0x474724+=_0x55bd8e['length'];if(_0x474724>_0x522ec4){_0x92b83b=!![];const _0x247547=new Error(_0x58c03e(0x33f));_0x247547[_0x58c03e(0x170)]=0x19d,_0x2af554[_0x58c03e(0x565)](_0x247547);return;}if(!_0x2af554[_0x58c03e(0x87)])_0x2af554['push'](_0x55bd8e);}),_0x557298['on']('end',()=>{const _0x53f3e7=_0x5e06e6;!_0x92b83b&&!_0x2af554[_0x53f3e7(0x87)]&&(_0x92b83b=!![],_0x2af554['end']());}),_0x557298['on']('error',_0x4c8fd2=>{const _0xe01aa9=_0x5e06e6;if(!_0x2af554[_0xe01aa9(0x87)])_0x2af554[_0xe01aa9(0x565)](_0x4c8fd2);}),_0x557298['pause'](),_0x2af554['on'](_0x5e06e6(0x2a4),()=>{const _0x54bae3=_0x5e06e6;if(!_0x2af554[_0x54bae3(0x87)])_0x557298[_0x54bae3(0x2a4)]();}),_0x2af554;}function _0xcf7450(_0x1e91dd,_0xc2f626){const _0x2a9f7f=_0x398641;if(_0x1e91dd[_0x2a9f7f(0xdf)]==='GET'||_0x1e91dd[_0x2a9f7f(0xdf)]===_0x2a9f7f(0x481))return null;const _0x45dada=_0x1e91dd[_0x2a9f7f(0x165)]?.[_0x2a9f7f(0x3b7)];if(_0x45dada!=null){const _0x4cbf2c=Number(_0x45dada);if(Number[_0x2a9f7f(0x3ff)](_0x4cbf2c)&&_0x4cbf2c>_0xc2f626){const _0x1c4638=new Error('Payload\x20too\x20large');_0x1c4638[_0x2a9f7f(0x170)]=0x19d;throw _0x1c4638;}}return new Promise((_0x2e6cf0,_0x17696d)=>{const _0x4a67be=_0x2a9f7f;let _0x10eeff='',_0x4a6e51=0x0;_0x1e91dd['on'](_0x4a67be(0x32e),_0x522c3e=>{const _0x310cca=_0x4a67be;_0x4a6e51+=_0x522c3e[_0x310cca(0x39d)];if(_0x4a6e51>_0xc2f626){try{_0x1e91dd[_0x310cca(0x565)]();}catch{}const _0x1bd5ba=new Error(_0x310cca(0x33f));_0x1bd5ba[_0x310cca(0x170)]=0x19d,_0x17696d(_0x1bd5ba);return;}_0x10eeff+=_0x522c3e;}),_0x1e91dd['on'](_0x4a67be(0xe5),()=>{const _0x5759c1=_0x4a67be;if(!_0x10eeff)return _0x2e6cf0(null);const _0x57a5fe=_0x1e91dd[_0x5759c1(0x165)]?.[_0x5759c1(0x233)]||'';if(_0x57a5fe[_0x5759c1(0x8f)](_0x5759c1(0xa9))){const _0x40e8f0={};for(const [_0xc09d57,_0x4ab9f3]of new URLSearchParams(_0x10eeff))_0x40e8f0[_0xc09d57]=_0x4ab9f3;return _0x2e6cf0(_0x40e8f0);}try{_0x2e6cf0(JSON['parse'](_0x10eeff));}catch(_0x3ca01d){_0x17696d(_0x3ca01d);}}),_0x1e91dd['on']('error',_0x17696d);});}function _0xcdda3e(_0x4ea726,_0x37ae9b){const _0x467c67=_0x398641,{status:status=0xc8,headers:headers={},body:_0x50dd36}=_0x37ae9b;_0x4ea726[_0x467c67(0x3e6)]=status;for(const [_0x1e9acb,_0x5d9a63]of Object['entries'](headers)){_0x4ea726[_0x467c67(0x635)](_0x1e9acb,_0x5d9a63);}if(_0x50dd36==null){_0x4ea726[_0x467c67(0xe5)]();return;}if(_0x8fc7b4(_0x50dd36)){_0x50dd36[_0x467c67(0x199)](_0x4ea726);return;}if(Buffer[_0x467c67(0x365)](_0x50dd36)){_0x4ea726['end'](_0x50dd36);return;}if(typeof _0x50dd36===_0x467c67(0x5d4)){!_0x4ea726['getHeader'](_0x467c67(0x2ce))&&_0x4ea726[_0x467c67(0x635)](_0x467c67(0x2ce),'application/json');_0x4ea726['end'](JSON['stringify'](_0x50dd36));return;}_0x4ea726[_0x467c67(0xe5)](String(_0x50dd36));}function _0x138376(_0x1c6280,_0x91d55e){const _0xedfe9=_0x398641;if(_0x91d55e==null)return':'+_0x1c6280;return[][_0xedfe9(0x123)](_0x91d55e)[_0xedfe9(0x757)](_0x487fa4=>(_0x487fa4[_0xedfe9(0x8f)](':')?'['+_0x487fa4+']':_0x487fa4)+':'+_0x1c6280)[_0xedfe9(0x10b)](',\x20');}return okdbHttp[_0x398641(0x71d)]=_0x1fe4c0,okdbHttp[_0x398641(0x71d)]['formatListenAddr']=_0x138376,okdbHttp[_0x398641(0x71d)][_0x398641(0x605)]=_0x544ce8,okdbHttp[_0x398641(0x71d)];}var okdbShmSegment,hasRequiredOkdbShmSegment;function requireOkdbShmSegment(){const _0x199e2d=_0x3d20e4;if(hasRequiredOkdbShmSegment)return okdbShmSegment;hasRequiredOkdbShmSegment=0x1;const _0x59491f=require$$0$1,_0x257a62=require$$2$1,_0x2b0396=0x80,_0x28a4c6=0x0,_0x90f5b2=0x1,_0x2cbaa7=0x2,_0x233eb4=0x3,_0x704d52=0x4,_0x5cfbea=_0x704d52+_0x2b0396,_0x27f174=_0x5cfbea+_0x2b0396,_0x4b5f40=require$$2$3[_0x199e2d(0x540)],_0x494dc5=_0x27f174*0x4,_0x97c722=process[_0x199e2d(0x379)]!==_0x199e2d(0x73f),_0x2b4bc1=0xc,_0x319988=process['platform']===_0x199e2d(0x551)?0x1f:0xa0,_0x592ed9=/^[A-Za-z0-9-]+(?:_boot)?$/,_0x5419c8=/^[A-Za-z0-9-]*-[0-9a-f]{12}(?:_boot)?$/,_0x1bd306=_0x27f013=>_0x27f013[_0x199e2d(0x416)](/[^a-zA-Z0-9]/g,'-');function _0x1563f7(_0x85a546,_0x3bd172=''){const _0x52e0a3=_0x199e2d;if(typeof _0x85a546!==_0x52e0a3(0xe7)||_0x85a546==='')throw new TypeError(_0x52e0a3(0x5e3));if(_0x3bd172!==''&&!/^_[A-Za-z0-9]+$/['test'](_0x3bd172))throw new TypeError('segmentNameFor:\x20suffix\x20must\x20look\x20like\x20\x22_name\x22\x20(got\x20'+JSON['stringify'](_0x3bd172)+')');const _0x24fc98=_0x257a62[_0x52e0a3(0x3cc)](_0x52e0a3(0x647))[_0x52e0a3(0x29f)](_0x85a546)['digest'](_0x52e0a3(0x31b))[_0x52e0a3(0x13a)](0x0,_0x2b4bc1),_0x1bbee9=Math['max'](0x0,_0x319988-0x1-_0x2b4bc1-_0x3bd172[_0x52e0a3(0x39d)]);return _0x1bd306(_0x85a546)[_0x52e0a3(0x13a)](0x0,_0x1bbee9)+'-'+_0x24fc98+_0x3bd172;}function _0x7aa27a(_0x2dceed,_0x5cd874=''){return''+_0x1bd306(_0x2dceed)+_0x5cd874;}function _0x3ee61c(_0x2c5f50){const _0x1712cc=_0x199e2d;if(_0x5419c8[_0x1712cc(0x155)](_0x2c5f50))return _0x1712cc(0x766);if(_0x592ed9[_0x1712cc(0x155)](_0x2c5f50))return'legacy';return null;}const _0x56a07b={'onMapped':null,'onClaimed':null,'onRetiring':null},_0x73b7bb=_0x1dd8cf=>Math[_0x199e2d(0x6c3)](_0x1dd8cf/0x8)*0x8,_0x57274f=_0x37ebd3=>_0x73b7bb(_0x37ebd3)+_0x494dc5;function _0x3e5f3b(_0xf32e26){const _0x56b5af=_0x199e2d;try{return process['kill'](_0xf32e26,0x0),![];}catch(_0x183b19){return _0x183b19[_0x56b5af(0x25b)]==='ESRCH';}}const _0x42c1cc=new Int32Array(new SharedArrayBuffer(0x4));function _0x4ff30f(_0x27029c){if(_0x27029c>0x0)Atomics['wait'](_0x42c1cc,0x0,0x0,_0x27029c);}function _0x3cada9(_0x4a4f60,_0x2ff04c){const _0xad5912=_0x199e2d;if(process['platform']!==_0xad5912(0x4bb))return;let _0x209484;try{_0x209484=_0x59491f[_0xad5912(0xf9)]('/dev/shm/'+_0x4a4f60,'r+');if(_0x59491f[_0xad5912(0xa1)](_0x209484)[_0xad5912(0x35f)]<_0x2ff04c)_0x59491f[_0xad5912(0x659)](_0x209484,_0x2ff04c);}catch{}finally{if(_0x209484!==undefined)try{_0x59491f[_0xad5912(0x443)](_0x209484);}catch{}}}function _0x3d1e18(_0x18f0df,_0x39d55f){const _0x132a4a=_0x199e2d,_0x5df139=require$$3$1;for(let _0x206054=0x0;;_0x206054++){try{return _0x5df139['open'](_0x18f0df,_0x39d55f);}catch(_0xda959e){if(_0x206054>=0x3e8||!/No such file or directory/[_0x132a4a(0x155)](_0xda959e?.[_0x132a4a(0x5e6)]??''))throw _0xda959e;}}}function _0x3d15a4(_0x2c81f8,_0x5b3535){const _0x4a10f6=_0x199e2d,_0x55c269=_0x57274f(_0x5b3535),_0x2c4fb7=_0x3d1e18(_0x2c81f8,_0x55c269);_0x3cada9(_0x2c81f8,_0x55c269);if(_0x2c4fb7[_0x4a10f6(0x32c)]<_0x55c269)throw new Error(_0x4a10f6(0x5bf)+_0x2c81f8+_0x4a10f6(0x5e5)+_0x2c4fb7['byteLength']+_0x4a10f6(0x112)+_0x55c269+_0x4a10f6(0x59c));return{'sab':_0x2c4fb7,'hdr':new Int32Array(_0x2c4fb7,_0x73b7bb(_0x5b3535),_0x27f174)};}function _0x34a7a5(_0x5430c8){const _0x2495e5=_0x199e2d;try{require('shmbuf')[_0x2495e5(0x44f)](_0x5430c8);}catch{}}function _0x31d91d(_0x250fd4){const _0x2ac0f9=_0x199e2d;try{require(_0x2ac0f9(0xcf))[_0x2ac0f9(0x12f)](_0x250fd4);}catch{}}function _0x2ae63d(_0x35f37a){const _0x1c8975=_0x199e2d;if(Atomics[_0x1c8975(0x776)](_0x35f37a,_0x2cbaa7)!==0x0&&Atomics[_0x1c8975(0x776)](_0x35f37a,_0x233eb4)!==0x0)return;const _0x5ac665=_0x257a62['randomBytes'](0x8),_0x3846e2=_0x5ac665[_0x1c8975(0x4e8)](0x0)||0x1,_0x47191b=_0x5ac665[_0x1c8975(0x4e8)](0x4)||0x1;Atomics[_0x1c8975(0x598)](_0x35f37a,_0x2cbaa7,0x0,_0x3846e2),Atomics[_0x1c8975(0x598)](_0x35f37a,_0x233eb4,0x0,_0x47191b);}function _0x1f0b7d(_0x833521){const _0x125ee1=_0x199e2d,_0x1f8445=process['pid'];for(let _0x412b83=0x0;_0x412b83<_0x2b0396;_0x412b83++){const _0x1693a6=Atomics[_0x125ee1(0x776)](_0x833521,_0x704d52+_0x412b83);if(_0x1693a6===0x0||_0x1693a6===_0x1f8445)continue;if(!_0x3e5f3b(_0x1693a6))continue;Atomics[_0x125ee1(0x45d)](_0x833521,_0x5cfbea+_0x412b83,0x0),Atomics['compareExchange'](_0x833521,_0x704d52+_0x412b83,_0x1693a6,0x0);}}function _0x5a5181(_0x8694f6){const _0x53ba02=_0x199e2d;if(Atomics[_0x53ba02(0x776)](_0x8694f6,_0x90f5b2)!==0x0)return!![];for(let _0x1d4f89=0x0;_0x1d4f89<_0x2b0396;_0x1d4f89++)if(Atomics[_0x53ba02(0x776)](_0x8694f6,_0x704d52+_0x1d4f89)!==0x0)return!![];return![];}function _0x42228b(_0x3b78a8){const _0x12cdb7=_0x199e2d,_0x2f1db3=process['pid'];for(let _0x26c1af=0x0;_0x26c1af<0x2;_0x26c1af++){for(let _0x1d47b3=0x0;_0x1d47b3<_0x2b0396;_0x1d47b3++){if(Atomics[_0x12cdb7(0x598)](_0x3b78a8,_0x704d52+_0x1d47b3,0x0,_0x2f1db3)===0x0)return Atomics['store'](_0x3b78a8,_0x5cfbea+_0x1d47b3,_0x4b5f40),_0x1d47b3;}_0x1f0b7d(_0x3b78a8);}return Atomics['add'](_0x3b78a8,_0x90f5b2,0x1),-0x1;}function _0x5d2f63(_0x39632e,_0x40ba75){const _0x3e73fb=_0x199e2d;if(_0x40ba75>=0x0)Atomics[_0x3e73fb(0x45d)](_0x39632e,_0x5cfbea+_0x40ba75,0x0),Atomics[_0x3e73fb(0x598)](_0x39632e,_0x704d52+_0x40ba75,process[_0x3e73fb(0xee)],0x0);else Atomics['sub'](_0x39632e,_0x90f5b2,0x1);}function _0x3767f7(_0x53102c,_0xfaaee3,_0x1fa7c3,_0x47f03a){const _0x4667f8=_0x199e2d,_0x5c33c6=process[_0x4667f8(0xee)];if(Atomics['compareExchange'](_0x1fa7c3,_0x28a4c6,_0x47f03a,_0x5c33c6)!==_0x47f03a)return _0x4667f8(0x2df);const _0x5bd41c=Atomics[_0x4667f8(0x776)](_0x1fa7c3,_0x2cbaa7),_0x5ba5d6=Atomics[_0x4667f8(0x776)](_0x1fa7c3,_0x233eb4);let _0x4d59e0;try{_0x4d59e0=_0x3d15a4(_0x53102c,_0xfaaee3)[_0x4667f8(0x5ee)];}catch{return'orphan';}if(Atomics[_0x4667f8(0x776)](_0x4d59e0,_0x2cbaa7)!==_0x5bd41c||Atomics['load'](_0x4d59e0,_0x233eb4)!==_0x5ba5d6)return'orphan';_0x1f0b7d(_0x1fa7c3);if(_0x5a5181(_0x1fa7c3))return Atomics[_0x4667f8(0x598)](_0x1fa7c3,_0x28a4c6,_0x5c33c6,0x0),_0x4667f8(0x613);return _0x31d91d(_0x53102c),_0x4667f8(0x558);}function _0x53ee8c(_0x1fe8de,_0x5a853d,{timeoutMs:_0x32e878}={}){const _0x344756=_0x199e2d;_0x32e878=_0x32e878??(Number(process.env.OKDB_SHM_ATTACH_TIMEOUT_MS)||0x7530);const _0x63fbe5=process[_0x344756(0xee)],_0x2a6e07=Date[_0x344756(0x127)]()+_0x32e878;for(let _0x4bfbb3=0x0;;_0x4bfbb3++){const {sab:_0x594767,hdr:_0x476705}=_0x3d15a4(_0x1fe8de,_0x5a853d);_0x56a07b[_0x344756(0x5be)]?.(_0x1fe8de,_0x4bfbb3),_0x2ae63d(_0x476705);const _0x2d443c=_0x42228b(_0x476705);_0x56a07b[_0x344756(0x756)]?.(_0x1fe8de,_0x4bfbb3);const _0x9993e3=Atomics[_0x344756(0x776)](_0x476705,_0x28a4c6);if(_0x9993e3===0x0||!_0x97c722){if(_0x4bfbb3===0x0)_0x1f0b7d(_0x476705);return{'sab':_0x594767,'hdr':_0x476705,'slot':_0x2d443c};}_0x5d2f63(_0x476705,_0x2d443c);if(_0x9993e3!==_0x63fbe5&&_0x3e5f3b(_0x9993e3))_0x3767f7(_0x1fe8de,_0x5a853d,_0x476705,_0x9993e3);_0x34a7a5(_0x1fe8de);if(Date['now']()>_0x2a6e07){const {OKDBError:_0x7af30e}=requireOkdbError();throw new _0x7af30e('shared-memory\x20segment\x20\x22'+_0x1fe8de+_0x344756(0x3f3)+_0x32e878+_0x344756(0x6e6)+_0x9993e3+_0x344756(0x450)+_0x344756(0x390),_0x344756(0x25d));}_0x4ff30f(_0x4bfbb3<0x14?0x0:0x1);}}function _0x2655b2(_0x3ed8ad,_0x4d5991,_0x24fd15,_0x5184c5){const _0xa5e8c2=_0x199e2d,{hdr:_0x488dcf,slot:_0x5128cb}=_0x24fd15;if(_0x5128cb!==null)_0x5d2f63(_0x488dcf,_0x5128cb);let _0x1e5061=![];try{if(!_0x97c722)return![];const _0x530e0e=process[_0xa5e8c2(0xee)];_0x1f0b7d(_0x488dcf);if(_0x5a5181(_0x488dcf)||_0x5184c5?.(_0x24fd15[_0xa5e8c2(0x736)]))return![];if(Atomics[_0xa5e8c2(0x598)](_0x488dcf,_0x28a4c6,0x0,_0x530e0e)!==0x0)return![];let _0x317cc6=!![];try{_0x56a07b[_0xa5e8c2(0x436)]?.(_0x3ed8ad),!_0x5a5181(_0x488dcf)&&!_0x5184c5?.(_0x24fd15[_0xa5e8c2(0x736)])&&(_0x317cc6=![],_0x31d91d(_0x3ed8ad),_0x1e5061=!![]);}finally{if(_0x317cc6)Atomics[_0xa5e8c2(0x598)](_0x488dcf,_0x28a4c6,_0x530e0e,0x0);}return _0x1e5061;}finally{_0x34a7a5(_0x3ed8ad);}}function _0x192eb9(_0x1bf12a,_0x38f62a,{isBusy:_0x3eb7fa}={}){const _0x3755e5=_0x199e2d,_0x5232a6=process[_0x3755e5(0xee)],{sab:_0x1e55fb,hdr:_0x497b2d}=_0x3d15a4(_0x1bf12a,_0x38f62a);try{_0x1f0b7d(_0x497b2d);const _0x62a5e8=Atomics[_0x3755e5(0x776)](_0x497b2d,_0x28a4c6);if(_0x62a5e8!==0x0){if(_0x62a5e8===_0x5232a6||!_0x3e5f3b(_0x62a5e8))return _0x3755e5(0x25a);return _0x3767f7(_0x1bf12a,_0x38f62a,_0x497b2d,_0x62a5e8);}if(_0x5a5181(_0x497b2d))return _0x3755e5(0x72);if(_0x3eb7fa?.(_0x1e55fb))return _0x3755e5(0x63d);if(Atomics['compareExchange'](_0x497b2d,_0x28a4c6,0x0,_0x5232a6)!==0x0)return _0x3755e5(0x25a);if(_0x5a5181(_0x497b2d)||_0x3eb7fa?.(_0x1e55fb))return Atomics[_0x3755e5(0x598)](_0x497b2d,_0x28a4c6,_0x5232a6,0x0),'attached';return _0x31d91d(_0x1bf12a),_0x3755e5(0x558);}finally{_0x34a7a5(_0x1bf12a);}}const _0x27ab7b=new Map(),_0x1d7c5b=new Set();function _0x56e05c(_0x32d637){const _0x57d4ed=_0x199e2d,_0x14dcf7=process[_0x57d4ed(0xee)];for(let _0x265f21=0x0;_0x265f21<_0x2b0396;_0x265f21++){if(Atomics[_0x57d4ed(0x776)](_0x32d637,_0x704d52+_0x265f21)===_0x14dcf7&&Atomics['load'](_0x32d637,_0x5cfbea+_0x265f21)!==_0x4b5f40)return!![];}return![];}function _0x3f66dd(_0x185d03,_0x10dcba,_0x2517ba={}){const _0x4bf3ac=_0x199e2d;let _0x5459b6=_0x27ab7b[_0x4bf3ac(0x6a)](_0x185d03);if(!_0x5459b6){const _0x4acf16=_0x53ee8c(_0x185d03,_0x10dcba,_0x2517ba);_0x5459b6={'att':_0x4acf16,'dataBytes':_0x10dcba,'refs':0x0,'isBusy':_0x2517ba[_0x4bf3ac(0x2ee)]??null,'onThreadExit':_0x2517ba[_0x4bf3ac(0x1e4)]??null},_0x27ab7b[_0x4bf3ac(0x49d)](_0x185d03,_0x5459b6);}if(_0x2517ba[_0x4bf3ac(0x2ee)])_0x5459b6[_0x4bf3ac(0x2ee)]=_0x2517ba[_0x4bf3ac(0x2ee)];if(_0x2517ba[_0x4bf3ac(0x1e4)])_0x5459b6[_0x4bf3ac(0x1e4)]=_0x2517ba[_0x4bf3ac(0x1e4)];_0x5459b6['refs']++;let _0x2f9e84=![];return{'sab':_0x5459b6['att'][_0x4bf3ac(0x736)],'name':_0x185d03,'release'(){const _0x3134df=_0x4bf3ac;if(_0x2f9e84)return![];_0x2f9e84=!![];if(--_0x5459b6[_0x3134df(0x47f)]>0x0)return![];if(_0x27ab7b['get'](_0x185d03)===_0x5459b6)_0x27ab7b[_0x3134df(0x95)](_0x185d03);const _0x540f23=_0x2655b2(_0x185d03,_0x5459b6[_0x3134df(0x6f7)],_0x5459b6[_0x3134df(0x221)],_0x5459b6['isBusy']);!_0x540f23&&_0x97c722&&_0x56e05c(_0x5459b6[_0x3134df(0x221)][_0x3134df(0x5ee)])&&_0x1d7c5b[_0x3134df(0x3e9)]({'name':_0x185d03,'dataBytes':_0x5459b6[_0x3134df(0x6f7)],'att':{..._0x5459b6[_0x3134df(0x221)],'slot':null},'isBusy':_0x5459b6[_0x3134df(0x2ee)],'onThreadExit':_0x5459b6[_0x3134df(0x1e4)]});if(_0x1d7c5b[_0x3134df(0x35f)])_0x46f2eb();return _0x540f23;}};}function _0x5e3014(_0x24e06c){const _0x124dec=_0x199e2d;if(!(_0x24e06c>0x0))return 0x0;const _0x4387e0=process[_0x124dec(0xee)];let _0x471c8a=0x0;const _0x5e8285=({att:_0x472d83,onThreadExit:_0x22dfd7})=>{const _0xcb48b4=_0x124dec;try{_0x22dfd7?.(_0x472d83['sab'],_0x24e06c);}catch{}const {hdr:_0x418722}=_0x472d83;for(let _0x28eba7=0x0;_0x28eba7<_0x2b0396;_0x28eba7++){if(Atomics[_0xcb48b4(0x776)](_0x418722,_0x704d52+_0x28eba7)!==_0x4387e0||Atomics[_0xcb48b4(0x776)](_0x418722,_0x5cfbea+_0x28eba7)!==_0x24e06c)continue;Atomics[_0xcb48b4(0x45d)](_0x418722,_0x5cfbea+_0x28eba7,0x0);if(Atomics[_0xcb48b4(0x598)](_0x418722,_0x704d52+_0x28eba7,_0x4387e0,0x0)===_0x4387e0)_0x471c8a++;}};for(const _0xcda6a6 of _0x27ab7b[_0x124dec(0x591)]())_0x5e8285(_0xcda6a6);for(const _0x5b9001 of _0x1d7c5b)_0x5e8285(_0x5b9001);return _0x46f2eb(),_0x471c8a;}function _0x46f2eb(){const _0x1727b8=_0x199e2d;for(const _0x242c84 of[..._0x1d7c5b]){if(_0x56e05c(_0x242c84[_0x1727b8(0x221)][_0x1727b8(0x5ee)]))continue;_0x1d7c5b['delete'](_0x242c84),_0x2655b2(_0x242c84['name'],_0x242c84[_0x1727b8(0x6f7)],_0x242c84[_0x1727b8(0x221)],_0x242c84[_0x1727b8(0x2ee)]);}}return okdbShmSegment={'attachSegment':_0x3f66dd,'releaseThreadSlots':_0x5e3014,'segmentNameFor':_0x1563f7,'legacySegmentNameFor':_0x7aa27a,'segmentNameStyle':_0x3ee61c,'SEG_NAME_MAX':_0x319988,'retireIfUnused':_0x192eb9,'totalBytes':_0x57274f,'headerOffset':_0x73b7bb,'MAX_SLOTS':_0x2b0396,'_attachRaw':_0x53ee8c,'_detachRaw':_0x2655b2,'_takeover':_0x3767f7,'_mapByName':_0x3d15a4,'_hooks':_0x56a07b,'_registry':_0x27ab7b,'_lingering':_0x1d7c5b,'_H':{'STATE':_0x28a4c6,'OVERFLOW':_0x90f5b2,'NONCE_A':_0x2cbaa7,'NONCE_B':_0x233eb4,'SLOTS':_0x704d52,'TIDS':_0x5cfbea}},okdbShmSegment;}var okdbShmGc,hasRequiredOkdbShmGc;function requireOkdbShmGc(){const _0x5b3e9d=_0x3d20e4;if(hasRequiredOkdbShmGc)return okdbShmGc;hasRequiredOkdbShmGc=0x1;const _0x154d03=require$$0$1,_0x5936c8=require$$1,_0x174ffe=_0x5b3e9d(0x327),_0x235b14=0x18+0x3*0x100*0x4,_0x11bec4=0x18+0x2*0x100*0x4,_0x208411=0xc;function _0x836fe3(){const {totalBytes:_0x24a71b}=requireOkdbShmSegment();return new Set([0x0,0x8,0x18,_0x11bec4,_0x208411,_0x24a71b(_0x11bec4),_0x24a71b(_0x235b14),_0x24a71b(_0x208411)]);}function _0x28bdbe(_0x52d9b8,_0x5559d4,_0x3a244d){const _0x35b74d=_0x5b3e9d,{totalBytes:_0x44f0eb}=requireOkdbShmSegment();if(_0x52d9b8['endsWith']('_boot')||_0x5559d4===_0x208411||_0x5559d4===_0x44f0eb(_0x208411))return _0x208411;if(_0x5559d4===_0x44f0eb(_0x235b14))return _0x235b14;if(_0x5559d4===_0x44f0eb(_0x11bec4))return _0x11bec4;return _0x3a244d===_0x35b74d(0x766)?_0x235b14:_0x11bec4;}function _0x335229(){const _0xcfbd97=_0x5b3e9d,_0x38b5a4=new Set(),_0x2ed101=[],_0x250035=_0x174ffe+'/';let _0x474887;try{_0x474887=_0x154d03[_0xcfbd97(0x1ed)](_0xcfbd97(0x554))[_0xcfbd97(0x293)](_0x33eed4=>/^\d+$/[_0xcfbd97(0x155)](_0x33eed4));}catch{throw new Error('shm-gc:\x20/proc\x20is\x20not\x20readable\x20—\x20cannot\x20tell\x20which\x20segments\x20are\x20in\x20use');}for(const _0x3c29ab of _0x474887){const _0x538cbc=_0x5936c8[_0xcfbd97(0x10b)]('/proc',_0x3c29ab);let _0x42fe5c=!![];try{const _0xcac326=_0x154d03[_0xcfbd97(0x418)](_0x5936c8[_0xcfbd97(0x10b)](_0x538cbc,'maps'),_0xcfbd97(0x320));let _0x81d510=_0xcac326[_0xcfbd97(0x380)](_0x250035);while(_0x81d510!==-0x1){const _0x59e431=_0xcac326['indexOf']('\x0a',_0x81d510),_0x41f72d=_0xcac326['slice'](_0x81d510+_0x250035[_0xcfbd97(0x39d)],_0x59e431===-0x1?undefined:_0x59e431);if(!_0x41f72d[_0xcfbd97(0x113)](_0xcfbd97(0x6aa)))_0x38b5a4[_0xcfbd97(0x3e9)](_0x41f72d);_0x81d510=_0xcac326[_0xcfbd97(0x380)](_0x250035,_0x81d510+0x1);}}catch(_0x40f48e){if(_0x40f48e['code']!=='ENOENT'&&_0x40f48e[_0xcfbd97(0x25b)]!==_0xcfbd97(0x696))_0x42fe5c=![];}try{for(const _0x40301e of _0x154d03['readdirSync'](_0x5936c8[_0xcfbd97(0x10b)](_0x538cbc,'fd'))){let _0x5f55ad;try{_0x5f55ad=_0x154d03[_0xcfbd97(0x4c3)](_0x5936c8[_0xcfbd97(0x10b)](_0x538cbc,'fd',_0x40301e));}catch{continue;}if(_0x5f55ad[_0xcfbd97(0x42e)](_0x250035)&&!_0x5f55ad[_0xcfbd97(0x113)](_0xcfbd97(0x6aa)))_0x38b5a4['add'](_0x5f55ad[_0xcfbd97(0x13a)](_0x250035[_0xcfbd97(0x39d)]));}}catch(_0x41bbbc){if(_0x41bbbc[_0xcfbd97(0x25b)]!==_0xcfbd97(0x109)&&_0x41bbbc[_0xcfbd97(0x25b)]!==_0xcfbd97(0x696))_0x42fe5c=![];}if(!_0x42fe5c){let _0x3f9bec=null;try{_0x3f9bec=_0x154d03['statSync'](_0x538cbc)[_0xcfbd97(0x5b5)];}catch{}let _0x587c5d='?';try{_0x587c5d=_0x154d03[_0xcfbd97(0x418)](_0x5936c8[_0xcfbd97(0x10b)](_0x538cbc,_0xcfbd97(0x6c8)),_0xcfbd97(0x320))['trim']();}catch{}if(_0x3f9bec!==null)_0x2ed101[_0xcfbd97(0x2f9)]({'pid':Number(_0x3c29ab),'uid':_0x3f9bec,'comm':_0x587c5d});}}return{'inUse':_0x38b5a4,'unreadable':_0x2ed101};}function _0x54b95b({prefix:prefix=_0x5b3e9d(0x650),dryRun:dryRun=![],anySize:anySize=![],force:force=![],log:log=()=>{}}={}){const _0x1ab2ad=_0x5b3e9d;if(process[_0x1ab2ad(0x379)]!==_0x1ab2ad(0x4bb)||!_0x154d03[_0x1ab2ad(0x1c9)](_0x174ffe))throw new Error('shm-gc:\x20Linux\x20only\x20(POSIX\x20shared\x20memory\x20under\x20/dev/shm)');const _0x30be64=process[_0x1ab2ad(0x67b)](),_0x2cd0f1=_0x30be64===0x0,_0x338aa7=_0x836fe3(),{inUse:_0xd6f01c,unreadable:_0x52929b}=_0x335229(),_0x2ed7ec=_0x52929b[_0x1ab2ad(0x293)](_0x3b5505=>_0x2cd0f1||_0x3b5505[_0x1ab2ad(0x5b5)]===_0x30be64),_0x1c20b7={'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':_0x52929b['length'],'blindPids':_0x2ed7ec[_0x1ab2ad(0x757)](_0x207f9f=>_0x207f9f[_0x1ab2ad(0xee)]),'blindCommands':_0x4d010e(_0x2ed7ec)};if(_0x2ed7ec['length']&&!dryRun&&!force)throw new Error('shm-gc:\x20cannot\x20read\x20the\x20memory\x20maps\x20of\x20'+_0x2ed7ec[_0x1ab2ad(0x39d)]+_0x1ab2ad(0x4c4)+(_0x1ab2ad(0x177)+_0x1c20b7['blindCommands']+_0x1ab2ad(0x421))+_0x1ab2ad(0x596));const {retireIfUnused:_0x3358e4,segmentNameStyle:_0x241f16,_registry:_0x3f7d16}=requireOkdbShmSegment();let _0x4ff5df=null;if(!dryRun)try{require('v8')[_0x1ab2ad(0xab)]('--expose-gc'),_0x4ff5df=require('vm')[_0x1ab2ad(0x17e)]('gc');}catch{}const _0x62496b=_0x154d03[_0x1ab2ad(0x549)](_0x174ffe);try{let _0x4c6004,_0x321ee1=0x0;while(_0x4c6004=_0x62496b[_0x1ab2ad(0x720)]()){_0x1c20b7[_0x1ab2ad(0x16b)]++;const _0x2a5b0e=_0x4c6004[_0x1ab2ad(0x707)];if(!_0x2a5b0e[_0x1ab2ad(0x42e)](prefix))continue;_0x1c20b7[_0x1ab2ad(0x32a)]++;if(_0x3f7d16[_0x1ab2ad(0x469)](_0x2a5b0e)){_0x1c20b7['inUse']++;continue;}if(_0xd6f01c['has'](_0x2a5b0e)){_0x1c20b7[_0x1ab2ad(0x5a0)]++;continue;}let _0x5b988e;try{_0x5b988e=_0x154d03[_0x1ab2ad(0x31a)](_0x5936c8[_0x1ab2ad(0x10b)](_0x174ffe,_0x2a5b0e));}catch{continue;}if(!_0x5b988e[_0x1ab2ad(0xed)]())continue;const _0xb06388=_0x241f16(_0x2a5b0e);if(!_0xb06388||!anySize&&!_0x338aa7['has'](_0x5b988e[_0x1ab2ad(0x35f)])){_0x1c20b7[_0x1ab2ad(0x410)]++;continue;}if(!_0x2cd0f1&&_0x5b988e[_0x1ab2ad(0x5b5)]!==_0x30be64){_0x1c20b7[_0x1ab2ad(0x212)]++;continue;}_0x1c20b7['candidates']++;if(_0xb06388===_0x1ab2ad(0x103))_0x1c20b7[_0x1ab2ad(0x39e)]++;_0x1c20b7[_0x1ab2ad(0x74f)]+=_0x5b988e[_0x1ab2ad(0x35f)],_0x1c20b7[_0x1ab2ad(0x590)]+=_0x5b988e[_0x1ab2ad(0x594)]*0x200;if(dryRun)continue;const _0x641eb1=_0x28bdbe(_0x2a5b0e,_0x5b988e[_0x1ab2ad(0x35f)],_0xb06388);try{const _0x4387d7=_0x3358e4(_0x2a5b0e,_0x641eb1);_0x4387d7===_0x1ab2ad(0x558)?(_0x1c20b7['deleted']++,_0x1c20b7[_0x1ab2ad(0x6d2)]+=_0x5b988e[_0x1ab2ad(0x594)]*0x200):(_0x1c20b7['skippedByProtocol']++,log(_0x1ab2ad(0x4a2)+_0x2a5b0e+':\x20'+_0x4387d7));}catch(_0x289255){_0x1c20b7['errors']++,log(_0x1ab2ad(0x69)+_0x2a5b0e+':\x20'+_0x289255[_0x1ab2ad(0x5e6)]);}_0x4ff5df&&++_0x321ee1>=0x200&&(_0x321ee1=0x0,_0x4ff5df());}}finally{_0x62496b[_0x1ab2ad(0x443)]();}return _0x1c20b7;}function _0x4d010e(_0x59f374){const _0x4cafe3=_0x5b3e9d,_0xaed3d8=new Map();for(const _0x5f2e32 of _0x59f374)_0xaed3d8[_0x4cafe3(0x49d)](_0x5f2e32['comm'],(_0xaed3d8[_0x4cafe3(0x6a)](_0x5f2e32[_0x4cafe3(0x6c8)])??0x0)+0x1);return[..._0xaed3d8]['map'](([_0x902c0a,_0x520b8b])=>_0x520b8b>0x1?_0x902c0a+'×'+_0x520b8b:_0x902c0a)[_0x4cafe3(0x10b)](',\x20');}function _0x4c2eca(_0x54cb42){const _0x440f3c=_0x5b3e9d,_0x5c6ea0=['B',_0x440f3c(0x65f),'MiB',_0x440f3c(0x5f5),_0x440f3c(0x56b)];let _0x1260fc=0x0;while(_0x54cb42>=0x400&&_0x1260fc<_0x5c6ea0[_0x440f3c(0x39d)]-0x1){_0x54cb42/=0x400,_0x1260fc++;}return _0x54cb42['toFixed'](_0x1260fc?0x1:0x0)+'\x20'+_0x5c6ea0[_0x1260fc];}function _0x1d3a0b(_0x48e60e){const _0x35c0f9=_0x5b3e9d,_0x8863f2=[_0x35c0f9(0x528)+(_0x48e60e[_0x35c0f9(0x687)]?_0x35c0f9(0x47c):'')+':\x20prefix\x20'+JSON[_0x35c0f9(0x5c1)](_0x48e60e[_0x35c0f9(0xd6)]),_0x35c0f9(0x1ae)+_0x48e60e[_0x35c0f9(0x16b)]+_0x35c0f9(0x2dc)+_0x174ffe,_0x35c0f9(0x70b)+_0x48e60e[_0x35c0f9(0x32a)],_0x35c0f9(0x51e)+_0x48e60e[_0x35c0f9(0x5a0)],_0x35c0f9(0x6b5)+_0x48e60e[_0x35c0f9(0x410)],'\x20\x20other\x20owner\x20\x20\x20\x20\x20\x20\x20\x20'+_0x48e60e[_0x35c0f9(0x212)],_0x35c0f9(0x475)+_0x48e60e['candidates']+'\x20—\x20'+_0x4c2eca(_0x48e60e['candidateBytes'])+_0x35c0f9(0x3f2)+_0x4c2eca(_0x48e60e[_0x35c0f9(0x590)])+_0x35c0f9(0x1bb)+(_0x48e60e['candidatesLegacyNamed']?'\x20('+_0x48e60e[_0x35c0f9(0x39e)]+_0x35c0f9(0x1b1):'')];if(!_0x48e60e['dryRun']){_0x8863f2[_0x35c0f9(0x2f9)](_0x35c0f9(0xc7)+_0x48e60e['deleted']+_0x35c0f9(0x18b)+_0x4c2eca(_0x48e60e[_0x35c0f9(0x6d2)])+_0x35c0f9(0x2fc));if(_0x48e60e['skippedByProtocol'])_0x8863f2[_0x35c0f9(0x2f9)](_0x35c0f9(0x5ce)+_0x48e60e['skippedByProtocol']);if(_0x48e60e[_0x35c0f9(0x422)])_0x8863f2['push'](_0x35c0f9(0x6f)+_0x48e60e[_0x35c0f9(0x422)]);}return _0x48e60e['unreadablePids']&&_0x8863f2[_0x35c0f9(0x2f9)](_0x35c0f9(0x445)+_0x48e60e['unreadablePids']+'\x20process(es)\x20had\x20unreadable\x20maps'+(_0x48e60e[_0x35c0f9(0x128)][_0x35c0f9(0x39d)]?_0x35c0f9(0x18b)+_0x48e60e[_0x35c0f9(0x128)]['length']+'\x20of\x20them\x20run\x20as\x20this\x20user\x20and\x20could\x20map\x20these\x20segments:\x20'+(_0x48e60e[_0x35c0f9(0x6dc)]+_0x35c0f9(0x574)):_0x35c0f9(0x5d1))),_0x8863f2[_0x35c0f9(0x10b)]('\x0a');}function _0x407368(_0x2b1e87){const _0x1712ac=_0x5b3e9d,_0x6490f5={'prefix':_0x1712ac(0x650),'dryRun':![],'anySize':![],'force':![],'verbose':![]};for(let _0x343189=0x0;_0x343189<_0x2b1e87[_0x1712ac(0x39d)];_0x343189++){const _0x378cba=_0x2b1e87[_0x343189];if(_0x378cba===_0x1712ac(0x55d)||_0x378cba==='-n')_0x6490f5[_0x1712ac(0x687)]=!![];else{if(_0x378cba===_0x1712ac(0x493))_0x6490f5[_0x1712ac(0x54a)]=!![];else{if(_0x378cba===_0x1712ac(0x1b8))_0x6490f5['force']=!![];else{if(_0x378cba==='--verbose'||_0x378cba==='-v')_0x6490f5[_0x1712ac(0x4bd)]=!![];else{if(_0x378cba===_0x1712ac(0x1a2))_0x6490f5['prefix']=_0x2b1e87[++_0x343189]??'';else{if(_0x378cba[_0x1712ac(0x42e)](_0x1712ac(0x4b8)))_0x6490f5[_0x1712ac(0xd6)]=_0x378cba[_0x1712ac(0x13a)](_0x1712ac(0x4b8)[_0x1712ac(0x39d)]);else{if(_0x378cba==='--help'||_0x378cba==='-h')_0x6490f5['help']=!![];else throw new Error(_0x1712ac(0x2e6)+_0x378cba);}}}}}}}return _0x6490f5;}const _0x2669d0=_0x5b3e9d(0x5cc);function _0x27ad31(_0x51a232){const _0x319060=_0x5b3e9d;let _0x3a48e8;try{_0x3a48e8=_0x407368(_0x51a232);}catch(_0x9c3ab8){return console[_0x319060(0x492)](_0x9c3ab8[_0x319060(0x5e6)]),console[_0x319060(0x492)](_0x2669d0),0x2;}if(_0x3a48e8[_0x319060(0x353)])return console[_0x319060(0x24e)](_0x2669d0),0x0;const _0x4d3b3f=_0x54b95b({..._0x3a48e8,'log':_0x3a48e8['verbose']?_0x357525=>console[_0x319060(0x24e)](_0x357525):undefined});return console[_0x319060(0x24e)](_0x1d3a0b(_0x4d3b3f)),_0x4d3b3f['errors']?0x1:0x0;}return okdbShmGc={'shmGc':_0x54b95b,'formatReport':_0x1d3a0b,'main':_0x27ad31,'scanInUse':_0x335229,'ENV_DATA_BYTES':_0x235b14,'LEGACY_ENV_DATA_BYTES':_0x11bec4,'BOOT_DATA_BYTES':_0x208411},okdbShmGc;}var hasRequiredOkdb;function requireOkdb(){const _0x2480b7=_0x3d20e4;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x2480b7(0x230)]();}catch{}const _0x9b04e6=require$$1,_0xf79001=require$$0$1,{resolveWorkers:_0x102e3e,isShmbufNative:_0x44736a}=requireOkdbWorkers();function _0x4bd009(_0x374ca0){const _0xcde2d9=_0x2480b7,_0x1e3c74=_0x374ca0[_0xcde2d9(0x13a)](0x2),_0x3439dd={};let _0x2d6092=0x0;while(_0x2d6092<_0x1e3c74[_0xcde2d9(0x39d)]){const _0x50f50e=_0x1e3c74[_0x2d6092];if(_0x50f50e==='--port'||_0x50f50e==='-p')_0x3439dd[_0xcde2d9(0x255)]=Number(_0x1e3c74[++_0x2d6092]);else{if(_0x50f50e===_0xcde2d9(0x539)||_0x50f50e==='-d')_0x3439dd[_0xcde2d9(0x4c5)]=_0x1e3c74[++_0x2d6092];else{if(_0x50f50e==='--key'||_0x50f50e==='-k')_0x3439dd[_0xcde2d9(0x466)]=_0x1e3c74[++_0x2d6092];else{if(_0x50f50e===_0xcde2d9(0x3c2)||_0x50f50e==='-c')_0x3439dd['config']=_0x1e3c74[++_0x2d6092];else{if(_0x50f50e===_0xcde2d9(0x428))_0x3439dd['logLevel']=_0x1e3c74[++_0x2d6092];else{if(_0x50f50e===_0xcde2d9(0x6df))_0x3439dd[_0xcde2d9(0x29c)]=!![];else{if(_0x50f50e===_0xcde2d9(0x2a8))_0x3439dd[_0xcde2d9(0x116)]=!![];else{if(_0x50f50e===_0xcde2d9(0x548))_0x3439dd[_0xcde2d9(0x150)]=_0x1e3c74[++_0x2d6092];else{if(_0x50f50e==='--no-cluster')_0x3439dd[_0xcde2d9(0x38a)]=!![];else{if(_0x50f50e===_0xcde2d9(0x488)||_0x50f50e==='-e')_0x3439dd[_0xcde2d9(0x124)]=_0x1e3c74[++_0x2d6092];else{if(_0x50f50e===_0xcde2d9(0x472))_0x3439dd[_0xcde2d9(0x429)]=_0x1e3c74[++_0x2d6092];else{if(_0x50f50e==='--changes')_0x3439dd[_0xcde2d9(0x6b8)]=!![];else{if(_0x50f50e==='--blobs')_0x3439dd[_0xcde2d9(0x37a)]=!![];else{if(_0x50f50e===_0xcde2d9(0x6a4))_0x3439dd['newIdentity']=!![];else{if(_0x50f50e==='--drop')_0x3439dd[_0xcde2d9(0x3f6)]=!![];else{if(_0x50f50e===_0xcde2d9(0x4f0)){const _0x203c99=[];while(_0x2d6092+0x1<_0x1e3c74[_0xcde2d9(0x39d)]&&!_0x1e3c74[_0x2d6092+0x1]['startsWith']('--')){_0x203c99[_0xcde2d9(0x2f9)](_0x1e3c74[++_0x2d6092]);}_0x3439dd[_0xcde2d9(0x1fd)]=_0x203c99['length']>0x0?_0x203c99:!![];}else{if(_0x50f50e===_0xcde2d9(0x307))_0x3439dd['logRequests']=!![];else{if(_0x50f50e===_0xcde2d9(0x21b))_0x3439dd[_0xcde2d9(0x707)]=_0x1e3c74[++_0x2d6092];else{if(_0x50f50e===_0xcde2d9(0x1b4))_0x3439dd[_0xcde2d9(0x54b)]=_0x1e3c74[++_0x2d6092];else{if(_0x50f50e==='--label')_0x3439dd['label']=_0x1e3c74[++_0x2d6092];else{if(_0x50f50e==='--permissions')_0x3439dd[_0xcde2d9(0x1f4)]=_0x1e3c74[++_0x2d6092];else{if(_0x50f50e===_0xcde2d9(0x13f))_0x3439dd[_0xcde2d9(0x660)]=_0x1e3c74[++_0x2d6092];else{if(_0x50f50e===_0xcde2d9(0x70f))_0x3439dd[_0xcde2d9(0x604)]=_0x1e3c74[++_0x2d6092];else{if(_0x50f50e==='--token')_0x3439dd[_0xcde2d9(0x129)]=_0x1e3c74[++_0x2d6092];else{if(_0x50f50e==='--username'||_0x50f50e==='-u')_0x3439dd[_0xcde2d9(0x573)]=_0x1e3c74[++_0x2d6092];else{if(_0x50f50e===_0xcde2d9(0x309))_0x3439dd['selfAddress']=_0x1e3c74[++_0x2d6092];else{if(_0x50f50e===_0xcde2d9(0x53e)||_0x50f50e==='-v'){const _0x3a0dfd=require$$3;console[_0xcde2d9(0x24e)](_0x3a0dfd[_0xcde2d9(0x3e1)]),process[_0xcde2d9(0x4e7)](0x0);}else(_0x50f50e==='--help'||_0x50f50e==='-h')&&(_0x313f59(),process[_0xcde2d9(0x4e7)](0x0));}}}}}}}}}}}}}}}}}}}}}}}}}}_0x2d6092++;}return _0x3439dd;}function _0x313f59(){const _0x1ff632=_0x2480b7;console[_0x1ff632(0x24e)](_0x1ff632(0xde));}const _0x1eae6f=new Set([_0x2480b7(0x45f),_0x2480b7(0x2cf),'warn',_0x2480b7(0x492)]);function _0x117dd0(_0x17511e){const _0x8c5dcc=_0x2480b7,_0x49b32f=_0x17511e['config']?_0x9b04e6[_0x8c5dcc(0x738)](_0x17511e[_0x8c5dcc(0x3f4)]):_0x9b04e6[_0x8c5dcc(0x738)](_0x8c5dcc(0x6f3));let _0x51d17c={};if(_0xf79001[_0x8c5dcc(0x1c9)](_0x49b32f))try{const _0x3d1966=_0xf79001['readFileSync'](_0x49b32f,'utf8')[_0x8c5dcc(0x416)](/^\uFEFF/,'');_0x51d17c=JSON[_0x8c5dcc(0xc3)](_0x3d1966),console[_0x8c5dcc(0x24e)]('[okdb]\x20loaded\x20config:\x20'+_0x49b32f);}catch(_0x109e05){console[_0x8c5dcc(0x492)](_0x8c5dcc(0x274)+_0x49b32f+':\x20'+_0x109e05['message']),process[_0x8c5dcc(0x4e7)](0x1);}const _0x20c627={'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},_0x20c55f={'port':_0x17511e[_0x8c5dcc(0x255)]??_0x51d17c['port']??_0x20c627['port']??0x2124,'dbPath':_0x17511e[_0x8c5dcc(0x4c5)]??_0x51d17c[_0x8c5dcc(0x4c5)]??_0x20c627['path']??_0x8c5dcc(0x2f3),'key':_0x17511e['key']??_0x51d17c[_0x8c5dcc(0x466)]??_0x20c627[_0x8c5dcc(0x466)]??undefined,'logLevel':_0x17511e[_0x8c5dcc(0x4a0)]??_0x51d17c['logLevel']??_0x20c627['logLevel']??_0x8c5dcc(0x2cf),'noRepl':_0x17511e[_0x8c5dcc(0x29c)]??_0x51d17c[_0x8c5dcc(0x29c)]??_0x20c627[_0x8c5dcc(0x29c)]??![],'noAdmin':_0x17511e['noAdmin']??_0x51d17c[_0x8c5dcc(0x116)]??_0x20c627[_0x8c5dcc(0x116)]??![],'admin':_0x51d17c[_0x8c5dcc(0x270)]??{},'api':_0x51d17c[_0x8c5dcc(0x2bc)]??undefined,'auth':_0x51d17c[_0x8c5dcc(0x8a)]??undefined,'mcp':_0x51d17c[_0x8c5dcc(0x3a2)]??undefined,'http':_0x51d17c['http']??undefined,'backup':_0x51d17c[_0x8c5dcc(0x156)]??undefined,'timeMachine':_0x51d17c[_0x8c5dcc(0x121)]!==![]?_0x51d17c[_0x8c5dcc(0x121)]??{}:![],'processors':_0x51d17c[_0x8c5dcc(0x43e)],'engines':_0x51d17c[_0x8c5dcc(0x39c)],'compaction':_0x51d17c['compaction']};if(_0x17511e[_0x8c5dcc(0x38a)])_0x20c55f[_0x8c5dcc(0x38a)]=!![];if(_0x17511e[_0x8c5dcc(0x150)]!==undefined)_0x20c55f[_0x8c5dcc(0x3bd)]=_0x17511e[_0x8c5dcc(0x150)];_0x17511e['open']!==undefined&&(_0x20c55f[_0x8c5dcc(0x8a)]=_0x20c55f[_0x8c5dcc(0x8a)]||{},_0x20c55f[_0x8c5dcc(0x8a)][_0x8c5dcc(0x1fd)]=_0x17511e['open']);_0x17511e['logRequests']&&(_0x20c55f[_0x8c5dcc(0x45f)]=_0x20c55f['debug']||{},_0x20c55f[_0x8c5dcc(0x45f)]['logRequests']=!![]);(!Number[_0x8c5dcc(0x446)](_0x20c55f[_0x8c5dcc(0x255)])||_0x20c55f['port']<0x1||_0x20c55f[_0x8c5dcc(0x255)]>0xffff)&&(console[_0x8c5dcc(0x492)](_0x8c5dcc(0x2a2)+_0x20c55f['port']+_0x8c5dcc(0x579)),process[_0x8c5dcc(0x4e7)](0x1));!_0x1eae6f[_0x8c5dcc(0x469)](_0x20c55f[_0x8c5dcc(0x4a0)])&&(console[_0x8c5dcc(0x492)](_0x8c5dcc(0xe0)+_0x20c55f['logLevel']+_0x8c5dcc(0x622)),process[_0x8c5dcc(0x4e7)](0x1));const _0x1607ee=_0x20c55f[_0x8c5dcc(0x91)]?.[_0x8c5dcc(0x41a)];_0x1607ee!==undefined&&!(typeof _0x1607ee===_0x8c5dcc(0xe7)&&_0x1607ee)&&!(Array[_0x8c5dcc(0x339)](_0x1607ee)&&_0x1607ee[_0x8c5dcc(0x39d)]&&_0x1607ee['every'](_0x29e141=>typeof _0x29e141===_0x8c5dcc(0xe7)&&_0x29e141))&&(console[_0x8c5dcc(0x492)](_0x8c5dcc(0x179)+JSON[_0x8c5dcc(0x5c1)](_0x1607ee)+'\x20(must\x20be\x20a\x20string\x20or\x20array\x20of\x20strings)'),process['exit'](0x1));for(const _0x35495f of _0x360f83){_0x20c55f[_0x35495f]!==undefined&&typeof _0x20c55f[_0x35495f]!==_0x8c5dcc(0x200)&&(console[_0x8c5dcc(0x492)](_0x8c5dcc(0x560)+_0x35495f+_0x8c5dcc(0x186)+JSON[_0x8c5dcc(0x5c1)](_0x20c55f[_0x35495f])+'\x20(must\x20be\x20true\x20or\x20false)'),process['exit'](0x1));}return _0x20c55f;}const _0x360f83=[_0x2480b7(0x43e),'engines',_0x2480b7(0x3a6)];function _0x3e7e17(_0x5c75b4){const _0x24329e=_0x2480b7;return!!(_0x5c75b4&&typeof _0x5c75b4===_0x24329e(0x5d4)&&!Array[_0x24329e(0x339)](_0x5c75b4)&&Object[_0x24329e(0x6d8)](_0x5c75b4)[_0x24329e(0x39d)]>0x0);}function _0x288e37(_0x1e0911){return{..._0x1e0911['key']?{'encryptionKey':_0x1e0911['key']}:{},'engines':![],'processors':![],'compaction':![]};}const _0x47f2b8=!process[_0x2480b7(0x11c)]['isTTY']||!!process.env.NO_COLOR;function _0x8cdc79(_0x5eda06,_0x239c3d){const _0x4f559b=_0x2480b7;return _0x47f2b8?_0x239c3d:'\x1b['+_0x5eda06+'m'+_0x239c3d+_0x4f559b(0x2cc);}function _0x229da7(_0x1bc95f){const _0x2717b5=_0x2480b7;if(!_0x1bc95f||_0x1bc95f['length']===0x0)return;const _0x54276c='─'['repeat'](0x38);process[_0x2717b5(0x705)]['write']('\x0a'),process[_0x2717b5(0x705)][_0x2717b5(0xb6)](_0x8cdc79('33',_0x2717b5(0x566)+_0x1bc95f['length']+_0x2717b5(0x564)+(_0x1bc95f[_0x2717b5(0x39d)]>0x1?'S':'')+'\x0a')),process['stderr'][_0x2717b5(0xb6)]('\x20\x20'+_0x54276c+'\x0a');for(const _0x1e8243 of _0x1bc95f){const _0x5c3902=_0x1e8243[_0x2717b5(0x67c)]===_0x2717b5(0x492)?_0x8cdc79('31',_0x2717b5(0x1e3)):_0x8cdc79('33',_0x2717b5(0x408));process['stderr'][_0x2717b5(0xb6)](_0x5c3902+'\x20\x20'+_0x8cdc79('1',_0x1e8243[_0x2717b5(0x6f8)])+'\x0a'),process[_0x2717b5(0x705)][_0x2717b5(0xb6)](_0x2717b5(0x60e)+_0x1e8243['message']+'\x0a');if(_0x1e8243[_0x2717b5(0x299)])process[_0x2717b5(0x705)][_0x2717b5(0xb6)]('\x20\x20\x20\x20\x20\x20\x20'+_0x8cdc79('2',_0x2717b5(0x23d)+_0x1e8243[_0x2717b5(0x299)])+'\x0a');process[_0x2717b5(0x705)][_0x2717b5(0xb6)]('\x0a');}process['stderr'][_0x2717b5(0xb6)]('\x20\x20'+_0x54276c+'\x0a\x0a');}function _0x2bebd9(_0x4bf3db,_0x3bd47b,_0x9366de={}){const _0x23c90d=_0x2480b7,_0x403529=_0x4bf3db[_0x23c90d(0x91)][_0x23c90d(0x289)](_0x3bd47b,_0x9366de);if(_0x403529&&_0x403529['_isClusterController'])return Promise[_0x23c90d(0x738)](_0x403529);const _0x2c86e3=_0x4bf3db[_0x23c90d(0x91)]['servers']?.[_0x23c90d(0x39d)]?_0x4bf3db[_0x23c90d(0x91)][_0x23c90d(0x63b)]:[_0x403529];return new Promise((_0x150ebc,_0x7ec229)=>{const _0x35843d=_0x23c90d;_0x403529[_0x35843d(0x375)](_0x35843d(0x492),_0x7ec229),Promise['all'](_0x2c86e3['map'](_0x319a3b=>_0x319a3b[_0x35843d(0x397)]?null:new Promise(_0x3d89c5=>_0x319a3b['once'](_0x35843d(0x397),_0x3d89c5))))[_0x35843d(0xad)](()=>_0x150ebc(_0x403529));});}function _0x313d09(_0x462b6a){const _0x386170=_0x2480b7;return _0x462b6a[_0x386170(0x91)]?.[_0x386170(0x41a)]!==undefined?{'host':_0x462b6a[_0x386170(0x91)][_0x386170(0x41a)]}:{};}async function _0x4e2758(_0x22e21b){const _0x32d97f=_0x2480b7,_0x1075b6=require$$4$1;console[_0x32d97f(0x24e)](_0x32d97f(0x2a9));let _0x2ca77c=!![];const _0x430b9e=(_0x471378,_0x1f8470)=>{const _0x45c451=_0x32d97f;console[_0x45c451(0x24e)]('\x20\x20'+(_0x471378?'✓':'✗')+'\x20'+_0x1f8470);if(!_0x471378)_0x2ca77c=![];},_0x1be8f3=Number(process[_0x32d97f(0x3e1)][_0x32d97f(0x416)]('v','')[_0x32d97f(0x2aa)]('.')[0x0]);_0x430b9e(_0x1be8f3>=0x12,_0x32d97f(0x4bf)+process[_0x32d97f(0x3e1)]+(_0x1be8f3<0x12?_0x32d97f(0x317):''));const _0x3a582b=_0x9b04e6[_0x32d97f(0x738)](_0x22e21b[_0x32d97f(0x361)]);try{_0xf79001[_0x32d97f(0x2ad)](_0x3a582b,{'recursive':!![]});const _0x17d98b=_0x9b04e6[_0x32d97f(0x10b)](_0x3a582b,_0x32d97f(0x81));_0xf79001[_0x32d97f(0x188)](_0x17d98b,''),_0xf79001[_0x32d97f(0x3a3)](_0x17d98b),_0x430b9e(!![],'database\x20path\x20writable:\x20'+_0x3a582b);}catch(_0x5266d6){_0x430b9e(![],'database\x20path\x20not\x20writable:\x20'+_0x3a582b+'\x20\x20('+_0x5266d6[_0x32d97f(0x5e6)]+')');}const _0x2348fa=await new Promise(_0x997ba9=>{const _0x188a4f=_0x32d97f,_0x42fbc1=_0x1075b6[_0x188a4f(0x685)]();_0x42fbc1['once']('error',()=>_0x997ba9(![])),_0x42fbc1['once'](_0x188a4f(0x397),()=>{const _0x57b687=_0x188a4f;_0x42fbc1[_0x57b687(0x44f)](),_0x997ba9(!![]);}),_0x42fbc1[_0x188a4f(0x289)](_0x22e21b[_0x188a4f(0x255)],'127.0.0.1');});_0x430b9e(_0x2348fa,_0x32d97f(0x244)+_0x22e21b[_0x32d97f(0x255)]+'\x20'+(_0x2348fa?_0x32d97f(0x5c3):_0x32d97f(0x239)));const _0x596d5a=_0x9b04e6['resolve'](_0x32d97f(0x6f3));if(_0xf79001[_0x32d97f(0x1c9)](_0x596d5a))try{JSON[_0x32d97f(0xc3)](_0xf79001[_0x32d97f(0x418)](_0x596d5a,_0x32d97f(0x320))['replace'](/^\uFEFF/,'')),_0x430b9e(!![],_0x32d97f(0x53b)+_0x596d5a);}catch(_0x5ad8cc){_0x430b9e(![],_0x32d97f(0x366)+_0x5ad8cc[_0x32d97f(0x5e6)]);}else _0x430b9e(!![],_0x32d97f(0x4cf));if(_0x44736a()){const _0x31fa57=_0x102e3e(_0x22e21b,{'shmbufNative':!![]});_0x430b9e(!![],'cluster:\x20ready\x20('+_0x31fa57+_0x32d97f(0x3e5)+(_0x31fa57===0x1?'':'s')+')');}else _0x430b9e(!![],_0x32d97f(0x342));if(!_0x2348fa)try{const _0x2dd94d=require(_0x32d97f(0x4e1)),_0x5e9f7b=new _0x2dd94d(_0x3a582b,{'engines':![],'processors':![],'compaction':![],'auth':{'open':!![]}});await _0x5e9f7b['open']();try{await _0x5e9f7b['processes']['open']({'reader':!![]});const _0x379e36=_0x5e9f7b[_0x32d97f(0x5c9)][_0x32d97f(0x6e3)](),_0x197452=_0x379e36[_0x32d97f(0x293)](_0x26dd9d=>_0x26dd9d[_0x32d97f(0x77d)]!=null)[_0x32d97f(0x39d)];_0x430b9e(!![],_0x32d97f(0x30c)+_0x379e36[_0x32d97f(0x39d)]+'\x20process'+(_0x379e36[_0x32d97f(0x39d)]===0x1?'':'es')+'\x20('+_0x197452+_0x32d97f(0x56c));}finally{await _0x5e9f7b[_0x32d97f(0x44f)]();}}catch{}console[_0x32d97f(0x24e)](''),_0x2ca77c?console[_0x32d97f(0x24e)]('\x20\x20All\x20checks\x20passed.\x0a'):(console[_0x32d97f(0x24e)](_0x32d97f(0x1cf)),process[_0x32d97f(0x4e7)](0x1));}async function _0x27c8f0(){const _0x13ef0f=_0x2480b7,_0x3a6124=_0x9b04e6['resolve']('.kdbconfig');!_0xf79001[_0x13ef0f(0x1c9)](_0x3a6124)?(_0xf79001[_0x13ef0f(0x188)](_0x3a6124,JSON[_0x13ef0f(0x5c1)]({'port':0x2124,'path':'./okdb-data','logLevel':_0x13ef0f(0x2cf),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console['log'](_0x13ef0f(0x695))):console['log'](_0x13ef0f(0x2d7));const _0xddeaa6=_0x9b04e6['resolve']('./okdb-data');!_0xf79001[_0x13ef0f(0x1c9)](_0xddeaa6)?(_0xf79001[_0x13ef0f(0x2ad)](_0xddeaa6,{'recursive':!![]}),console[_0x13ef0f(0x24e)](_0x13ef0f(0x32d))):console['log'](_0x13ef0f(0x657)),console[_0x13ef0f(0x24e)](_0x13ef0f(0x10c));}async function _0x3a6768(_0xb642d2){const _0x1d823c=_0x2480b7,_0xe95c30=_0x9b04e6[_0x1d823c(0x738)](_0xb642d2['dbPath']);if(!_0xf79001['existsSync'](_0xe95c30)){console['log'](_0x1d823c(0x362)+_0xe95c30+_0x1d823c(0x3d5));return;}const _0x2be87d=require$$0$3,_0x35db9a=_0x2be87d['createInterface']({'input':process[_0x1d823c(0x40c)],'output':process['stdout']}),_0x5fd147=await new Promise(_0x407091=>_0x35db9a['question'](_0x1d823c(0x1de)+_0xe95c30+_0x1d823c(0x1f7),_0x407091));_0x35db9a[_0x1d823c(0x44f)](),console['log']('');if(_0x5fd147[_0x1d823c(0x471)]()['toLowerCase']()!==_0x1d823c(0x75d)){console[_0x1d823c(0x24e)](_0x1d823c(0x5d0));return;}let _0x150d06=null;try{_0x150d06=await _0x147d58(_0xe95c30,_0xb642d2,async _0xf7b834=>{const _0x59aeb2=_0x1d823c,_0x525b17=_0xf7b834[_0x59aeb2(0x5bc)],_0x422b14=_0x525b17?.['db']?.[_0x59aeb2(0x6a)](_0x59aeb2(0x4a1))??null,_0x22aab8=[];if(_0x525b17?.[_0x59aeb2(0x753)]('~licenses'))for(const {key:_0x3d1c77,value:_0x3828fb}of _0x525b17[_0x59aeb2(0x1c1)](_0x59aeb2(0x506))){_0x22aab8[_0x59aeb2(0x2f9)]({'key':_0x3d1c77,'value':_0x3828fb});}return{'identity':_0x422b14,'licenses':_0x22aab8};});}catch(_0x2bad55){console[_0x1d823c(0x24e)](_0x1d823c(0x62a)+_0x2bad55[_0x1d823c(0x5e6)]+')\x20—\x20they\x20will\x20NOT\x20be\x20preserved');}_0xf79001['rmSync'](_0xe95c30,{'recursive':!![],'force':!![]}),console[_0x1d823c(0x24e)](_0x1d823c(0xac)+_0xe95c30+_0x1d823c(0x739));if(_0x150d06&&(_0x150d06[_0x1d823c(0x411)]||_0x150d06[_0x1d823c(0x201)]['length']>0x0))try{await _0x147d58(_0xe95c30,_0xb642d2,async _0x138334=>{const _0x50e9b0=_0x1d823c,_0xa5d70c=_0x138334['_systemEnv'];_0x150d06[_0x50e9b0(0x411)]&&_0xa5d70c['db'][_0x50e9b0(0x16c)](_0x50e9b0(0x4a1),_0x150d06['identity']);if(_0x150d06[_0x50e9b0(0x201)]['length']>0x0){if(!_0xa5d70c[_0x50e9b0(0x753)]('~licenses'))await _0xa5d70c[_0x50e9b0(0xbc)](_0x50e9b0(0x506));for(const {key:_0x256f5e,value:_0x1cdeeb}of _0x150d06[_0x50e9b0(0x201)]){await _0xa5d70c[_0x50e9b0(0x463)](_0x50e9b0(0x506),_0x256f5e,_0x1cdeeb);}}});const _0x4f7692=[];if(_0x150d06['identity'])_0x4f7692['push'](_0x1d823c(0x525));if(_0x150d06[_0x1d823c(0x201)]['length']>0x0)_0x4f7692['push'](_0x150d06['licenses'][_0x1d823c(0x39d)]+_0x1d823c(0xa5));console['log'](_0x1d823c(0x2c2)+_0x4f7692[_0x1d823c(0x10b)](_0x1d823c(0x7e)));}catch(_0xcee68d){console[_0x1d823c(0x24e)](_0x1d823c(0x64f)+_0xcee68d[_0x1d823c(0x5e6)]);}}async function _0x147d58(_0x11cae4,_0x352f7b,_0x53287f){const _0x4b4128=_0x2480b7,_0x16fa33=require$$5$1,_0x426f20=new _0x16fa33(_0x11cae4,{'admin':![],'mcp':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],..._0x288e37(_0x352f7b)});await _0x426f20['open']();try{return await _0x53287f(_0x426f20);}finally{await _0x426f20[_0x4b4128(0x44f)]();}}async function _0x3f91a5(_0x4d88e4,_0xeebaa6){const _0x11d68a=_0x2480b7,_0x59a9e7=require$$5$1,_0x2e5410=_0x9b04e6[_0x11d68a(0x738)](_0xeebaa6[_0x11d68a(0x361)]);console['log'](_0x11d68a(0x329)+_0x2e5410+'…');const _0x26d374=new _0x59a9e7(_0x2e5410,_0x288e37(_0xeebaa6));await _0x26d374['open'](),console[_0x11d68a(0x24e)](_0x11d68a(0x282)+_0x4d88e4+'…');const {envs:_0x2e8809,blobs:_0x25e1cd,skipped:_0x5cd86e}=await _0x26d374[_0x11d68a(0x26b)][_0x11d68a(0x156)](_0x4d88e4);for(const _0x38abbe of _0x2e8809){const _0x487406=_0x38abbe[_0x11d68a(0x2bb)]>0x0?_0x11d68a(0x71c)+(_0x38abbe['sizeBefore']/0x400/0x400)['toFixed'](0x2)+_0x11d68a(0x11e)+(_0x38abbe[_0x11d68a(0x752)]/0x400/0x400)[_0x11d68a(0x72c)](0x2)+_0x11d68a(0x5e8):'';console[_0x11d68a(0x24e)]('\x20\x20✓\x20'+_0x38abbe[_0x11d68a(0x707)]+_0x11d68a(0x393)+_0x38abbe[_0x11d68a(0x306)]+_0x487406+(_0x38abbe['timeMachine']?_0x11d68a(0x45b):''));}if(_0x25e1cd[_0x11d68a(0x6ad)]>0x0)console['log']('\x20\x20✓\x20~blobs\x20\x20('+_0x25e1cd[_0x11d68a(0x6ad)]+_0x11d68a(0x2d3));for(const _0x1ee3d5 of _0x5cd86e)console[_0x11d68a(0x24e)](_0x11d68a(0x5cf)+_0x1ee3d5[_0x11d68a(0x707)]+_0x11d68a(0x768)+_0x1ee3d5[_0x11d68a(0x37c)]);await _0x26d374[_0x11d68a(0x44f)](),console[_0x11d68a(0x24e)](_0x11d68a(0x572));}async function _0x56e7f2(_0x36da9c,_0x4b7b34,_0x16a99b={}){const _0x1ace2e=_0x2480b7,{BACKUP_MANIFEST:_0x17308d}=requireOkdbMigrate(),_0x3f26f6=_0x9b04e6['resolve'](_0x4b7b34[_0x1ace2e(0x361)]),_0x2b5290=_0x9b04e6[_0x1ace2e(0x10b)](_0x36da9c,_0x17308d);if(!_0xf79001[_0x1ace2e(0x1c9)](_0x2b5290))throw new Error(_0x36da9c+'\x20is\x20not\x20a\x20complete\x20okdb\x20backup\x20(no\x20'+_0x17308d+')');const _0x25191d=JSON[_0x1ace2e(0xc3)](_0xf79001[_0x1ace2e(0x418)](_0x2b5290,'utf8')),_0x5c9c54=_0x9b04e6['relative'](_0x36da9c,_0x3f26f6);if(_0x5c9c54===''||!(_0x5c9c54[_0x1ace2e(0x42e)]('..')||_0x9b04e6['isAbsolute'](_0x5c9c54)))throw new Error(_0x1ace2e(0x5aa)+_0x3f26f6+'\x20is\x20inside\x20the\x20backup\x20'+_0x36da9c);if(_0xf79001[_0x1ace2e(0x1c9)](_0x3f26f6)&&_0xf79001[_0x1ace2e(0x1ed)](_0x3f26f6)[_0x1ace2e(0x39d)]>0x0)throw new Error(_0x1ace2e(0x5aa)+_0x3f26f6+_0x1ace2e(0x6b1));console[_0x1ace2e(0x24e)](_0x1ace2e(0x178)+_0x36da9c+_0x1ace2e(0x298)+_0x25191d[_0x1ace2e(0x5dc)]+',\x20'+_0x25191d[_0x1ace2e(0xc6)]+_0x1ace2e(0xa6)+_0x3f26f6+'…'),_0xf79001[_0x1ace2e(0x5ef)](_0x36da9c,_0x3f26f6,{'recursive':!![],'errorOnExist':!![]});for(const _0x25e035 of _0x25191d[_0x1ace2e(0x5cb)]??[]){console[_0x1ace2e(0x24e)](_0x1ace2e(0x5fa)+_0x25e035['name']+(_0x25e035[_0x1ace2e(0x121)]?_0x1ace2e(0x45b):'')),_0x25e035['outOfTree']&&_0x25e035[_0x1ace2e(0x7f)]&&_0xf79001[_0x1ace2e(0x1c9)](_0x25e035[_0x1ace2e(0x7f)])&&console[_0x1ace2e(0x24e)]('\x20\x20!\x20'+_0x25e035[_0x1ace2e(0x707)]+_0x1ace2e(0x620)+_0x25e035[_0x1ace2e(0x7f)]+_0x1ace2e(0x76f)+('store\x20will\x20open\x20THAT\x20directory,\x20not\x20the\x20copy\x20in\x20'+_0x25e035['dir']+_0x1ace2e(0x211)));}_0x16a99b[_0x1ace2e(0x70)]&&(require$$5$1[_0x1ace2e(0x1b9)](_0x3f26f6),console[_0x1ace2e(0x24e)](_0x1ace2e(0x17b))),console['log']('[okdb]\x20restore\x20complete\x20—\x20full-text\x20indexes\x20rebuild\x20on\x20first\x20open');}async function _0x484629(_0x31e3d9,_0x11e014,_0x3f0c41){const _0x4fcef4=_0x2480b7,_0x7fa83e=require$$5$1,_0x102a8c=_0x9b04e6[_0x4fcef4(0x738)](_0x11e014[_0x4fcef4(0x361)]),_0x1aef7e=_0x3f0c41['env']??'default',_0x5c465b=_0x3f0c41[_0x4fcef4(0x429)]?_0x3f0c41[_0x4fcef4(0x429)][_0x4fcef4(0x2aa)](',')[_0x4fcef4(0x757)](_0x4481ae=>_0x4481ae[_0x4fcef4(0x471)]()):null;console[_0x4fcef4(0x24e)]('[okdb]\x20opening\x20'+_0x102a8c+'…');const _0x487b59=new _0x7fa83e(_0x102a8c,_0x288e37(_0x11e014));await _0x487b59['open'](),console[_0x4fcef4(0x24e)]('[okdb]\x20exporting\x20env\x20\x22'+_0x1aef7e+_0x4fcef4(0x2d9)+_0x31e3d9+'…');const _0x1b0f61=await _0x487b59['migrate']['exportToFile'](_0x31e3d9,{'envName':_0x1aef7e,'types':_0x5c465b,'includeChanges':!!_0x3f0c41[_0x4fcef4(0x6b8)]});console['log']('[okdb]\x20exported\x20\x20types='+_0x1b0f61['types']+'\x20\x20records='+_0x1b0f61[_0x4fcef4(0x3ee)]+_0x4fcef4(0x1a0)+_0x1b0f61[_0x4fcef4(0x6b8)]);if(_0x3f0c41['blobs']){const _0x52e6e3=_0x9b04e6[_0x4fcef4(0x10b)](_0x9b04e6[_0x4fcef4(0x195)](_0x31e3d9),_0x4fcef4(0x37a));process['stdout'][_0x4fcef4(0xb6)]('[okdb]\x20exporting\x20blobs…');const {count:_0x2af539,bytes:_0xb0b328}=await _0x487b59[_0x4fcef4(0x26b)][_0x4fcef4(0x14f)](_0x52e6e3);console[_0x4fcef4(0x24e)](_0x4fcef4(0x1eb)+_0x52e6e3+_0x4fcef4(0x71c)+_0x2af539+_0x4fcef4(0x175)+(_0x2af539!==0x1?'s':'')+',\x20'+(_0xb0b328/0x400/0x400)['toFixed'](0x2)+_0x4fcef4(0x5e8));}await _0x487b59[_0x4fcef4(0x44f)](),console[_0x4fcef4(0x24e)](_0x4fcef4(0x26e));}async function _0x5b20b7(_0x44e204,_0x465d72,_0x41f00c){const _0x987c8b=_0x2480b7,_0x4b8442=require$$5$1,_0x42f769=_0x9b04e6['resolve'](_0x465d72[_0x987c8b(0x361)]),_0x71d620=_0x41f00c['env']??null,_0x1ec8eb=_0x41f00c['types']?_0x41f00c[_0x987c8b(0x429)]['split'](',')[_0x987c8b(0x757)](_0xb7cfeb=>_0xb7cfeb[_0x987c8b(0x471)]()):null,_0x148f6c=!!_0x41f00c['drop'];console[_0x987c8b(0x24e)](_0x987c8b(0x329)+_0x42f769+'…');const _0x32663f=new _0x4b8442(_0x42f769,_0x288e37(_0x465d72));await _0x32663f[_0x987c8b(0x1fd)](),console[_0x987c8b(0x24e)](_0x987c8b(0x88)+_0x44e204+'…');const _0x3c2f3a=await _0x32663f[_0x987c8b(0x26b)]['importFromFile'](_0x44e204,{'envName':_0x71d620,'types':_0x1ec8eb,'dropExisting':_0x148f6c,'includeChanges':!!_0x41f00c['changes'],'onProgress':({type:_0xe5cf78,count:_0x1227bb})=>{const _0x4bbcbc=_0x987c8b;process[_0x4bbcbc(0x11c)][_0x4bbcbc(0xb6)](_0x4bbcbc(0x4ab)+_0xe5cf78+':\x20'+_0x1227bb+_0x4bbcbc(0x406));}});process[_0x987c8b(0x11c)][_0x987c8b(0xb6)]('\x0a'),console[_0x987c8b(0x24e)](_0x987c8b(0x437)+_0x3c2f3a[_0x987c8b(0x429)]+'\x20\x20records='+_0x3c2f3a[_0x987c8b(0x3ee)]+_0x987c8b(0x1a0)+_0x3c2f3a['changes']);if(_0x41f00c[_0x987c8b(0x37a)]){const _0x202d4c=_0x9b04e6[_0x987c8b(0x10b)](_0x9b04e6[_0x987c8b(0x195)](_0x44e204),_0x987c8b(0x37a));if(_0xf79001[_0x987c8b(0x1c9)](_0x202d4c)){const {imported:_0x34625d,skipped:_0x301b98}=await _0x32663f[_0x987c8b(0x26b)][_0x987c8b(0x2d0)](_0x202d4c);console[_0x987c8b(0x24e)](_0x987c8b(0x151)+_0x34625d+_0x987c8b(0x333)+_0x301b98);}}await _0x32663f[_0x987c8b(0x44f)](),console['log'](_0x987c8b(0x3c0));}async function _0x37089e(_0x2b29da,_0x22acf3){const _0x3602a1=_0x2480b7;_0x22acf3[_0x3602a1(0x54b)]&&!_0x22acf3[_0x3602a1(0x707)]&&(console['error'](_0x3602a1(0x50b)),process['exit'](0x1));const _0x528b8e=_0x22acf3[_0x3602a1(0x1f4)]?_0x22acf3[_0x3602a1(0x1f4)][_0x3602a1(0x2aa)](',')[_0x3602a1(0x757)](_0x254481=>_0x254481['trim']())['filter'](Boolean):[];let _0x5c9fe3={};if(_0x22acf3[_0x3602a1(0x660)])try{_0x5c9fe3=JSON[_0x3602a1(0xc3)](_0x22acf3[_0x3602a1(0x660)]);if(typeof _0x5c9fe3!=='object'||Array[_0x3602a1(0x339)](_0x5c9fe3)||_0x5c9fe3===null)throw new Error();}catch{console['error'](_0x3602a1(0x161)),process[_0x3602a1(0x4e7)](0x1);}const _0x5383c2=require$$5$1,{randomToken:_0x43fde5,hashToken:_0xec2973,hashPassword:_0x38d3f5}=requireOkdbAuthTokens(),_0x122a32=require$$2$1,_0x3e7d65=_0x9b04e6[_0x3602a1(0x738)](_0x2b29da['dbPath']),_0x20248b=new _0x5383c2(_0x3e7d65,_0x288e37(_0x2b29da));await _0x20248b[_0x3602a1(0x1fd)]();try{await _0x20248b['auth']['_ensureTokensType']();if(_0x22acf3[_0x3602a1(0x707)]){const _0x1fca4b=await _0x20248b[_0x3602a1(0x8a)][_0x3602a1(0x38e)](_0x22acf3[_0x3602a1(0x707)]);_0x1fca4b&&(console[_0x3602a1(0x492)](_0x3602a1(0x458)+_0x22acf3[_0x3602a1(0x707)]+_0x3602a1(0xb0)),process[_0x3602a1(0x4e7)](0x1));}const _0x48d87d=_0x43fde5(0x20),_0x404414=_0xec2973(_0x48d87d),_0x44d59e=_0x22acf3[_0x3602a1(0x54b)]?await _0x38d3f5(_0x22acf3[_0x3602a1(0x54b)]):null,_0x1de465=_0x122a32[_0x3602a1(0x395)](),_0x6e854b={'tokenHash':_0x404414,'name':_0x22acf3['name']||null,'passwordHash':_0x44d59e,'label':_0x22acf3[_0x3602a1(0x313)]||null,'permissions':_0x528b8e,'grants':_0x5c9fe3,'createdAt':Date['now'](),'lastUsedAt':null},_0x40481d=_0x22acf3[_0x3602a1(0x604)]?{'ttl':Number(_0x22acf3[_0x3602a1(0x604)])}:undefined;await _0x20248b[_0x3602a1(0x5bc)][_0x3602a1(0x463)](_0x3602a1(0x52c),_0x1de465,_0x6e854b,_0x40481d),console[_0x3602a1(0x24e)](_0x3602a1(0x501)),console['log'](_0x3602a1(0x52f)+_0x1de465),console[_0x3602a1(0x24e)](_0x3602a1(0x28b)+(_0x22acf3[_0x3602a1(0x707)]||_0x3602a1(0x21a))),console[_0x3602a1(0x24e)](_0x3602a1(0x527)+(_0x22acf3['label']||_0x3602a1(0x21a))),console[_0x3602a1(0x24e)](_0x3602a1(0x1f2)+(_0x528b8e['join'](',\x20')||_0x3602a1(0x1b5))),console[_0x3602a1(0x24e)](_0x3602a1(0x77c)),console[_0x3602a1(0x24e)](_0x3602a1(0x75b)+_0x48d87d+'\x0a');}finally{await _0x20248b['close']();}}async function _0x442469(_0x201853){const _0x527a3d=_0x2480b7,_0x55a5c7=require$$5$1,_0x381422=_0x9b04e6[_0x527a3d(0x738)](_0x201853[_0x527a3d(0x361)]),_0x2988c1=new _0x55a5c7(_0x381422,_0x288e37(_0x201853));await _0x2988c1[_0x527a3d(0x1fd)]();try{const _0x3d012f=_0x2988c1[_0x527a3d(0x5bc)];if(!_0x3d012f||!_0x3d012f[_0x527a3d(0x753)](_0x527a3d(0x52c))){console[_0x527a3d(0x24e)](_0x527a3d(0x5da));return;}const _0x235174=[];for(const {key:_0x5243e7,value:_0x180b01}of _0x3d012f['getRange'](_0x527a3d(0x52c))){_0x235174[_0x527a3d(0x2f9)]({'id':_0x5243e7,'name':_0x180b01[_0x527a3d(0x707)]||_0x527a3d(0x21a),'label':_0x180b01[_0x527a3d(0x313)]||_0x527a3d(0x21a),'permissions':Array['isArray'](_0x180b01[_0x527a3d(0x1f4)])?_0x180b01[_0x527a3d(0x1f4)][_0x527a3d(0x10b)](','):'','created':_0x180b01[_0x527a3d(0xc6)]?new Date(_0x180b01[_0x527a3d(0xc6)])['toISOString']()[_0x527a3d(0x13a)](0x0,0xa):''});}if(_0x235174[_0x527a3d(0x39d)]===0x0){console['log'](_0x527a3d(0x5da));return;}const _0x1925e9=!process['stdout']['columns']||process[_0x527a3d(0x11c)][_0x527a3d(0x1fe)]>=0x64,_0x4deb4f=_0x1925e9?0x24:0xa,_0x9ea3db=['ID'['padEnd'](_0x4deb4f),'NAME'['padEnd'](0x10),_0x527a3d(0x20f)[_0x527a3d(0x485)](0x14),'PERMISSIONS'['padEnd'](0x14),_0x527a3d(0x389)][_0x527a3d(0x10b)]('\x20\x20');console[_0x527a3d(0x24e)]('\x0a'+_0x9ea3db),console[_0x527a3d(0x24e)]('-'[_0x527a3d(0x4d9)](_0x9ea3db['length']));for(const _0x5a12ab of _0x235174){const _0x4d9788=_0x1925e9?_0x5a12ab['id']:_0x5a12ab['id'][_0x527a3d(0x13a)](0x0,0x8)+'…';console[_0x527a3d(0x24e)]([_0x4d9788[_0x527a3d(0x485)](_0x4deb4f),_0x5a12ab['name']['slice'](0x0,0x10)[_0x527a3d(0x485)](0x10),_0x5a12ab['label'][_0x527a3d(0x13a)](0x0,0x14)[_0x527a3d(0x485)](0x14),_0x5a12ab[_0x527a3d(0x1f4)][_0x527a3d(0x13a)](0x0,0x14)['padEnd'](0x14),_0x5a12ab[_0x527a3d(0x3a4)]][_0x527a3d(0x10b)]('\x20\x20'));}console[_0x527a3d(0x24e)]('');}finally{await _0x2988c1[_0x527a3d(0x44f)]();}}async function _0xeb5a1e(_0xcad143,_0x4af2d1){const _0x1dd610=_0x2480b7;!_0xcad143&&(console[_0x1dd610(0x492)](_0x1dd610(0x47a)),process[_0x1dd610(0x4e7)](0x1));const _0x58b4c5=require$$5$1,_0x816b56=_0x9b04e6[_0x1dd610(0x738)](_0x4af2d1[_0x1dd610(0x361)]),_0x3ecdf6=new _0x58b4c5(_0x816b56,_0x288e37(_0x4af2d1));await _0x3ecdf6[_0x1dd610(0x1fd)]();try{const _0x5ccde2=_0x3ecdf6[_0x1dd610(0x5bc)];(!_0x5ccde2||!_0x5ccde2['hasType'](_0x1dd610(0x52c)))&&(console[_0x1dd610(0x492)](_0x1dd610(0x64b)+_0xcad143+'\x22'),process['exit'](0x1));let _0x4e8127=null,_0x1bbb36=null;const _0x123705=_0x5ccde2[_0x1dd610(0x6a)]('~tokens',_0xcad143);if(_0x123705)_0x4e8127=_0xcad143,_0x1bbb36=_0x123705;else{const _0x588534=[];for(const {key:_0x54f237,value:_0x289d21}of _0x5ccde2[_0x1dd610(0x1c1)](_0x1dd610(0x52c))){if(_0x54f237[_0x1dd610(0x42e)](_0xcad143))_0x588534['push']({'key':_0x54f237,'value':_0x289d21});}_0x588534[_0x1dd610(0x39d)]===0x0&&(console['error']('[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22'+_0xcad143+'\x22'),process['exit'](0x1));if(_0x588534[_0x1dd610(0x39d)]>0x1){console[_0x1dd610(0x492)](_0x1dd610(0x36b)+_0xcad143+_0x1dd610(0x1df)+_0x588534[_0x1dd610(0x39d)]+_0x1dd610(0x36e));for(const _0x3cea32 of _0x588534){console['error']('\x20\x20'+_0x3cea32[_0x1dd610(0x466)]+_0x1dd610(0x694)+(_0x3cea32[_0x1dd610(0x101)][_0x1dd610(0x707)]||_0x1dd610(0x21a))+')');}process[_0x1dd610(0x4e7)](0x1);}_0x4e8127=_0x588534[0x0][_0x1dd610(0x466)],_0x1bbb36=_0x588534[0x0]['value'];}await _0x5ccde2[_0x1dd610(0x34e)](_0x1dd610(0x52c),_0x4e8127),console[_0x1dd610(0x24e)](_0x1dd610(0x39f)+_0x4e8127+_0x1dd610(0x694)+(_0x1bbb36[_0x1dd610(0x707)]||_0x1dd610(0x21a))+_0x1dd610(0x4c6)+(_0x1bbb36['label']||_0x1dd610(0x21a))+')');}finally{await _0x3ecdf6[_0x1dd610(0x44f)]();}}function _0xbb4946(_0x3e079e,_0x385987){const _0x2f0c6d=_0x2480b7;if(!_0x3e079e[_0x2f0c6d(0x552)])return _0x2f0c6d(0x202);const _0xc860c7=_0x3e079e[_0x2f0c6d(0x57a)];if(!_0xc860c7)return _0x2f0c6d(0x1b3);if(_0x385987>_0xc860c7)return _0x2f0c6d(0x55a);return'active';}function _0x3b1ae4(_0x508391){const _0x5aae09=_0x2480b7;if(!_0x508391||typeof _0x508391!==_0x5aae09(0x5d4))return'';const _0x4cc522=Object['entries'](_0x508391)[_0x5aae09(0x293)](([,_0x4f1575])=>_0x4f1575)[_0x5aae09(0x757)](([_0x36bc79])=>_0x36bc79);if(_0x4cc522[_0x5aae09(0x39d)]===0x0)return _0x5aae09(0x1b5);if(_0x4cc522[_0x5aae09(0x39d)]<=0x3)return _0x4cc522[_0x5aae09(0x10b)]('\x20');return _0x4cc522['slice'](0x0,0x3)['join']('\x20')+('\x20+'+(_0x4cc522[_0x5aae09(0x39d)]-0x3));}async function _0x2011ca(_0x1177fd){const _0x27d522=_0x2480b7,_0x1a2ee3=require$$5$1,_0x3a3516=requireOkdbLicenseCodec(),{_C:_0x1e2709}=requireOkdbLicense(),_0x43d121=_0x9b04e6[_0x27d522(0x738)](_0x1177fd[_0x27d522(0x361)]),_0x13eb17=new _0x1a2ee3(_0x43d121,_0x288e37(_0x1177fd));await _0x13eb17['open']();try{const _0x25d0da=_0x13eb17[_0x27d522(0x5bc)],_0x24f1b6=_0x25d0da?.['db']?.[_0x27d522(0x6a)]?.(_0x27d522(0x5b9))??0x0,_0x2cd274=[..._0x13eb17[_0x27d522(0x64c)][_0x27d522(0x6d8)]()][_0x27d522(0x293)](_0x590a98=>!_0x590a98['startsWith']('~'))[_0x27d522(0x39d)],_0x1c23e5=_0x13eb17['_license']?.[_0x27d522(0x12d)];if(_0x1c23e5){const _0x9a1363=_0x1c23e5[_0x27d522(0x678)]===!![],_0x2711d1=_0x9a1363?_0x27d522(0x575):_0x13eb17[_0x27d522(0x511)]['active']?.[_0x27d522(0x22b)]||_0x27d522(0x337);console['log'](''),console[_0x27d522(0x24e)](_0x27d522(0x639)+_0x2711d1);const _0xfc2d8e=_0x1c23e5[_0x27d522(0x260)]||{};if(_0xfc2d8e['maxWrites']){const _0x1799d5=Math[_0x27d522(0x139)](_0x24f1b6/_0xfc2d8e[_0x27d522(0x425)]*0x64);console[_0x27d522(0x24e)](_0x27d522(0x625)+_0x24f1b6[_0x27d522(0xbf)]()+'\x20/\x20'+_0xfc2d8e[_0x27d522(0x425)][_0x27d522(0xbf)]()+'\x20\x20('+_0x1799d5+'%)');}else console['log'](_0x27d522(0x625)+_0x24f1b6[_0x27d522(0xbf)]());_0xfc2d8e[_0x27d522(0x5cb)]?console[_0x27d522(0x24e)]('\x20\x20Envs:\x20\x20\x20\x20'+_0x2cd274+_0x27d522(0x5fb)+_0xfc2d8e[_0x27d522(0x5cb)]):console[_0x27d522(0x24e)](_0x27d522(0x767)+_0x2cd274),_0x1e2709?.[_0x27d522(0x4e0)]&&console[_0x27d522(0x24e)](_0x27d522(0x1ca)+_0x1e2709[_0x27d522(0x4e0)]+'\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)');}if(!_0x25d0da||!_0x25d0da[_0x27d522(0x753)](_0x27d522(0x506))){console[_0x27d522(0x24e)](''),console[_0x27d522(0x24e)](_0x27d522(0x5f7)),console[_0x27d522(0x24e)]('');return;}const _0x33cd56=[],_0x47d1cf=Date['now'](),_0x4d0771=_0x13eb17['id'],_0x3627d3=_0x27d522(0x157);for(const {key:_0x9fa282,value:_0x1cdf4a}of _0x25d0da['getRange'](_0x27d522(0x506))){const _0x5c693a=_0x1cdf4a[_0x27d522(0x2f8)]?Buffer[_0x27d522(0x690)](_0x1cdf4a[_0x27d522(0x2f8)],_0x27d522(0x31b)):Buffer[_0x27d522(0x2b0)](0x8);let _0x42abe7='';try{_0x42abe7=_0x3a3516[_0x27d522(0x51b)](_0x4d0771,_0x5c693a,_0x3627d3)[_0x27d522(0x4b0)];}catch{}_0x33cd56[_0x27d522(0x2f9)]({'id':_0x9fa282,'licensee':_0x1cdf4a[_0x27d522(0x22b)]||'','expires':_0x1cdf4a[_0x27d522(0x57a)]?new Date(_0x1cdf4a[_0x27d522(0x57a)])[_0x27d522(0x261)]()[_0x27d522(0x13a)](0x0,0xa):'','features':_0x3b1ae4(_0x1cdf4a[_0x27d522(0x5de)]),'pin':_0x42abe7,'status':_0xbb4946(_0x1cdf4a,_0x47d1cf)});}if(_0x33cd56[_0x27d522(0x39d)]===0x0){console[_0x27d522(0x24e)](''),console[_0x27d522(0x24e)]('\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.'),console[_0x27d522(0x24e)]('');return;}const _0x1e53ec=['\x20\x20'+'ID'[_0x27d522(0x485)](0xe),_0x27d522(0x256)[_0x27d522(0x485)](0xe),_0x27d522(0x491)[_0x27d522(0x485)](0xc),'FEATURES'[_0x27d522(0x485)](0x1e),_0x27d522(0x617)['padEnd'](0xa),_0x27d522(0x86)][_0x27d522(0x10b)]('\x20');console[_0x27d522(0x24e)]('\x0a'+_0x1e53ec);for(const _0x4c8c6d of _0x33cd56){const _0x198d7a=_0x4c8c6d['id']['slice'](0x0,0x8)+'\u2026';console['log'](['\x20\x20'+_0x198d7a['padEnd'](0xe),_0x4c8c6d[_0x27d522(0x22b)][_0x27d522(0x13a)](0x0,0xe)[_0x27d522(0x485)](0xe),_0x4c8c6d['expires'][_0x27d522(0x485)](0xc),_0x4c8c6d[_0x27d522(0x5de)]['slice'](0x0,0x1e)[_0x27d522(0x485)](0x1e),_0x4c8c6d[_0x27d522(0x4b0)][_0x27d522(0x485)](0xa),_0x4c8c6d[_0x27d522(0x170)]][_0x27d522(0x10b)]('\x20'));}console[_0x27d522(0x24e)]('');}finally{await _0x13eb17[_0x27d522(0x44f)]();}}async function _0x3a54e1(_0x358feb,_0x825d30){const _0x17dbb4=_0x2480b7,_0x2e3669=require$$5$1,_0x3c03ab=requireOkdbLicenseCodec();let _0x13e84b=_0x358feb;(_0x3c03ab[_0x17dbb4(0x187)](_0x358feb)==='path'||_0xf79001['existsSync'](_0x358feb)&&_0xf79001['statSync'](_0x358feb)[_0x17dbb4(0xed)]())&&(_0x13e84b=_0xf79001[_0x17dbb4(0x418)](_0x358feb,_0x17dbb4(0x320))[_0x17dbb4(0x471)]());const _0x589fa1=_0x9b04e6[_0x17dbb4(0x738)](_0x825d30[_0x17dbb4(0x361)]),_0x1b2353=new _0x2e3669(_0x589fa1,_0x288e37(_0x825d30));await _0x1b2353[_0x17dbb4(0x1fd)]();try{let _0x5939df;try{_0x5939df=await _0x1b2353['licenses'][_0x17dbb4(0x3e9)]({'blob':_0x13e84b});}catch(_0x262055){console['error'](_0x17dbb4(0x53a)+_0x262055[_0x17dbb4(0x5e6)]),process[_0x17dbb4(0x4e7)](0x1);}const _0x8f45ff=_0x5939df[_0x17dbb4(0x4b0)]||'',_0x235ff6=Object[_0x17dbb4(0x61d)](_0x5939df[_0x17dbb4(0x5de)]||{})[_0x17dbb4(0x293)](([,_0x4eb613])=>_0x4eb613)['map'](([_0x4f37e0])=>_0x4f37e0),_0xb929cf=_0x5939df['limits']||{},_0x52e0c1=[_0xb929cf[_0x17dbb4(0x5cb)]?_0x17dbb4(0x20c)+_0xb929cf[_0x17dbb4(0x5cb)]:null,_0xb929cf['typesPerEnv']?_0x17dbb4(0x48b)+_0xb929cf[_0x17dbb4(0x490)]:null,_0xb929cf[_0x17dbb4(0x6fa)]?_0x17dbb4(0x6f9)+_0xb929cf['syncPeers']:null,_0xb929cf['maxWrites']?_0x17dbb4(0x4f8)+_0xb929cf[_0x17dbb4(0x425)]['toLocaleString']():null][_0x17dbb4(0x293)](Boolean)['join']('\x20\x20'),_0x47eb3a=_0x5939df[_0x17dbb4(0x66f)]!=='standard';console[_0x17dbb4(0x24e)](_0x5939df['changed']?_0x17dbb4(0x732):_0x17dbb4(0x153)),console[_0x17dbb4(0x24e)](_0x17dbb4(0x338)+_0x5939df['id']),console['log'](_0x17dbb4(0x761)+_0x5939df[_0x17dbb4(0x22b)]),console[_0x17dbb4(0x24e)](_0x17dbb4(0x1dd)+(_0x5939df[_0x17dbb4(0x57a)]?new Date(_0x5939df[_0x17dbb4(0x57a)])[_0x17dbb4(0x261)]()['slice'](0x0,0xa):_0x17dbb4(0x595))),console[_0x17dbb4(0x24e)](_0x17dbb4(0x29b)+(_0x235ff6[_0x17dbb4(0x10b)](',\x20')||_0x17dbb4(0x1b5)));if(_0x52e0c1)console[_0x17dbb4(0x24e)](_0x17dbb4(0x6d1)+_0x52e0c1);if(_0x47eb3a)console[_0x17dbb4(0x24e)](_0x17dbb4(0x27f)+_0x5939df[_0x17dbb4(0x66f)]+_0x17dbb4(0x3a8)),console[_0x17dbb4(0x24e)]('');else!_0x5939df['needsActivation']?(console['log'](_0x17dbb4(0x508)+_0x5939df[_0x17dbb4(0x170)]),console['log']('')):(console[_0x17dbb4(0x24e)](_0x17dbb4(0x4d3)+_0x8f45ff),console[_0x17dbb4(0x24e)]('\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation'),console[_0x17dbb4(0x24e)](''),console[_0x17dbb4(0x24e)](_0x17dbb4(0x5fe)),console[_0x17dbb4(0x24e)](_0x17dbb4(0x6db)+_0x8f45ff+_0x17dbb4(0x5eb)),console['log'](_0x17dbb4(0x23c)),console[_0x17dbb4(0x24e)](_0x17dbb4(0x20b)),console[_0x17dbb4(0x24e)](''));}finally{await _0x1b2353[_0x17dbb4(0x44f)]();}}async function _0x532735(_0x4dd151,_0x5cad10){const _0x287fb3=_0x2480b7,_0x1a518c=require$$5$1,_0x1e2c17=_0x9b04e6[_0x287fb3(0x738)](_0x5cad10['dbPath']),_0x188a44=new _0x1a518c(_0x1e2c17,_0x288e37(_0x5cad10));await _0x188a44['open']();try{let _0x532a34;try{_0x532a34=await _0x188a44[_0x287fb3(0x201)]['activate'](_0x4dd151);}catch(_0x42deb3){console[_0x287fb3(0x492)](_0x287fb3(0x53a)+_0x42deb3[_0x287fb3(0x5e6)]),console[_0x287fb3(0x492)](''),console[_0x287fb3(0x492)](_0x287fb3(0x3e2)),console[_0x287fb3(0x492)]('\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.'),console[_0x287fb3(0x492)](_0x287fb3(0x48e)),console[_0x287fb3(0x492)](_0x287fb3(0x1a9)),console['error'](''),process[_0x287fb3(0x4e7)](0x1);}console[_0x287fb3(0x24e)](_0x287fb3(0x666)),console['log'](_0x287fb3(0x338)+_0x532a34['id']),console[_0x287fb3(0x24e)](_0x287fb3(0x761)+_0x532a34['licensee']),console[_0x287fb3(0x24e)]('\x20\x20\x20\x20expires:\x20\x20\x20'+(_0x532a34[_0x287fb3(0x57a)]?new Date(_0x532a34[_0x287fb3(0x57a)])[_0x287fb3(0x261)]()[_0x287fb3(0x13a)](0x0,0xa):_0x287fb3(0x595))),console['log'](_0x287fb3(0x1b2)),console['log']('');}finally{await _0x188a44[_0x287fb3(0x44f)]();}}async function _0x43b83b(_0x284c53,_0x382aa4){const _0x5b9e5c=_0x2480b7;!_0x284c53&&(console['error'](_0x5b9e5c(0x669)),process[_0x5b9e5c(0x4e7)](0x1));const _0xb3bf13=require$$5$1,_0x4c6e5d=requireOkdbLicenseCodec(),_0x73b2d9=_0x9b04e6[_0x5b9e5c(0x738)](_0x382aa4[_0x5b9e5c(0x361)]),_0x83bea1=new _0xb3bf13(_0x73b2d9,_0x288e37(_0x382aa4));await _0x83bea1['open']();try{const _0x12a13f=_0x83bea1[_0x5b9e5c(0x5bc)];(!_0x12a13f||!_0x12a13f[_0x5b9e5c(0x753)](_0x5b9e5c(0x506)))&&(console[_0x5b9e5c(0x492)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x284c53+'\x22'),process['exit'](0x1));let _0x1ad261=null,_0x3aac17=null;const _0x39b770=_0x12a13f['get'](_0x5b9e5c(0x506),_0x284c53);if(_0x39b770)_0x1ad261=_0x284c53,_0x3aac17=_0x39b770;else{const _0x6f542b=[];for(const {key:_0x10e54e,value:_0x27fc93}of _0x12a13f[_0x5b9e5c(0x1c1)](_0x5b9e5c(0x506))){if(_0x10e54e[_0x5b9e5c(0x42e)](_0x284c53))_0x6f542b[_0x5b9e5c(0x2f9)]({'key':_0x10e54e,'value':_0x27fc93});}_0x6f542b[_0x5b9e5c(0x39d)]===0x0&&(console[_0x5b9e5c(0x492)](_0x5b9e5c(0x2e0)+_0x284c53+'\x22'),process[_0x5b9e5c(0x4e7)](0x1)),_0x6f542b[_0x5b9e5c(0x39d)]>0x1&&(console['error']('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x284c53+_0x5b9e5c(0x1df)+_0x6f542b[_0x5b9e5c(0x39d)]+_0x5b9e5c(0x287)),process['exit'](0x1)),_0x1ad261=_0x6f542b[0x0][_0x5b9e5c(0x466)],_0x3aac17=_0x6f542b[0x0][_0x5b9e5c(0x101)];}const _0x54a7a2=Date[_0x5b9e5c(0x127)](),_0x250700=_0xbb4946(_0x3aac17,_0x54a7a2),_0x247c01=_0x83bea1['id'],_0x59beba=_0x5b9e5c(0x157);let _0x570514='';try{const _0x54ad44=Buffer[_0x5b9e5c(0x690)](_0x3aac17[_0x5b9e5c(0x2f8)],_0x5b9e5c(0x31b));_0x570514=_0x4c6e5d[_0x5b9e5c(0x51b)](_0x247c01,_0x54ad44,_0x59beba)[_0x5b9e5c(0x4b0)];}catch{}const _0x38d037=_0x3aac17[_0x5b9e5c(0x5de)]?Object[_0x5b9e5c(0x61d)](_0x3aac17['features'])['filter'](([,_0x3814ef])=>_0x3814ef)['map'](([_0x368a6a])=>_0x368a6a):[],_0x137e03=_0x3aac17[_0x5b9e5c(0x260)]||{},_0x204892=_0x12a13f?.['db']?.[_0x5b9e5c(0x6a)]?.('__writeCounter')??0x0,_0x9dd941=[..._0x83bea1[_0x5b9e5c(0x64c)]['keys']()][_0x5b9e5c(0x293)](_0x6ccb37=>!_0x6ccb37[_0x5b9e5c(0x42e)]('~'))['length'];console[_0x5b9e5c(0x24e)]('\x0a\x20\x20License\x20details:'),console[_0x5b9e5c(0x24e)](_0x5b9e5c(0x338)+_0x1ad261),console[_0x5b9e5c(0x24e)](_0x5b9e5c(0x761)+(_0x3aac17['licensee']||'')),console[_0x5b9e5c(0x24e)](_0x5b9e5c(0x1dd)+(_0x3aac17['expiresAt']?new Date(_0x3aac17[_0x5b9e5c(0x57a)])[_0x5b9e5c(0x261)]()[_0x5b9e5c(0x13a)](0x0,0xa):'')),console['log'](_0x5b9e5c(0x29b)+(_0x38d037[_0x5b9e5c(0x10b)](',\x20')||'(none)')),console[_0x5b9e5c(0x24e)]('\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20'+_0x570514),console[_0x5b9e5c(0x24e)]('\x20\x20\x20\x20status:\x20\x20\x20\x20'+_0x250700),console['log'](_0x5b9e5c(0x726)+new Date(_0x3aac17['addedAt'])[_0x5b9e5c(0x261)]());if(_0x250700===_0x5b9e5c(0x1b3)){console['log'](''),console[_0x5b9e5c(0x24e)](_0x5b9e5c(0x134));if(_0x137e03['maxWrites']){const _0xf2c85b=Math[_0x5b9e5c(0x139)](_0x204892/_0x137e03[_0x5b9e5c(0x425)]*0x64);console[_0x5b9e5c(0x24e)](_0x5b9e5c(0x489)+_0x204892[_0x5b9e5c(0xbf)]()+'\x20/\x20'+_0x137e03[_0x5b9e5c(0x425)][_0x5b9e5c(0xbf)]()+_0x5b9e5c(0x71c)+_0xf2c85b+'%)');}else console['log'](_0x5b9e5c(0x489)+_0x204892[_0x5b9e5c(0xbf)]()+_0x5b9e5c(0x536));_0x137e03['envs']?console[_0x5b9e5c(0x24e)](_0x5b9e5c(0x350)+_0x9dd941+_0x5b9e5c(0x5fb)+_0x137e03['envs']):console['log']('\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20'+_0x9dd941+_0x5b9e5c(0x536));}console[_0x5b9e5c(0x24e)]('');}finally{await _0x83bea1[_0x5b9e5c(0x44f)]();}}async function _0x515c3d(_0x154d1b,_0x2a6d30){const _0x5f13a0=_0x2480b7;!_0x154d1b&&(console[_0x5f13a0(0x492)]('[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument'),process[_0x5f13a0(0x4e7)](0x1));const _0xdd87ad=require$$5$1,_0x20f4a8=_0x9b04e6[_0x5f13a0(0x738)](_0x2a6d30[_0x5f13a0(0x361)]),_0x4e4da1=new _0xdd87ad(_0x20f4a8,_0x288e37(_0x2a6d30));await _0x4e4da1[_0x5f13a0(0x1fd)]();try{const _0xeb8372=_0x4e4da1[_0x5f13a0(0x5bc)];(!_0xeb8372||!_0xeb8372[_0x5f13a0(0x753)]('~licenses'))&&(console[_0x5f13a0(0x492)](_0x5f13a0(0x2e0)+_0x154d1b+'\x22'),process[_0x5f13a0(0x4e7)](0x1));let _0x4e52b3=null,_0x3ee159=null;const _0x43324a=_0xeb8372[_0x5f13a0(0x6a)]('~licenses',_0x154d1b);if(_0x43324a)_0x4e52b3=_0x154d1b,_0x3ee159=_0x43324a;else{const _0x207450=[];for(const {key:_0x135b70,value:_0x7f431a}of _0xeb8372[_0x5f13a0(0x1c1)]('~licenses')){if(_0x135b70['startsWith'](_0x154d1b))_0x207450[_0x5f13a0(0x2f9)]({'key':_0x135b70,'value':_0x7f431a});}_0x207450['length']===0x0&&(console['error']('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x154d1b+'\x22'),process[_0x5f13a0(0x4e7)](0x1)),_0x207450[_0x5f13a0(0x39d)]>0x1&&(console['error']('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x154d1b+_0x5f13a0(0x1df)+_0x207450[_0x5f13a0(0x39d)]+_0x5f13a0(0x287)),process[_0x5f13a0(0x4e7)](0x1)),_0x4e52b3=_0x207450[0x0][_0x5f13a0(0x466)],_0x3ee159=_0x207450[0x0]['value'];}await _0xeb8372['remove']('~licenses',_0x4e52b3),console[_0x5f13a0(0x24e)](_0x5f13a0(0x2e5)+_0x4e52b3+_0x5f13a0(0x2d4)+(_0x3ee159[_0x5f13a0(0x22b)]||_0x5f13a0(0x21a))+')');}finally{await _0x4e4da1[_0x5f13a0(0x44f)]();}}async function _0x4840da(_0x497b73,_0x388206,_0x264e93){const _0x4b20c8=_0x2480b7;!_0x497b73&&(console[_0x4b20c8(0x492)](_0x4b20c8(0x704)),process[_0x4b20c8(0x4e7)](0x1));!_0x264e93[_0x4b20c8(0x129)]&&!(_0x264e93[_0x4b20c8(0x573)]&&_0x264e93[_0x4b20c8(0x54b)])&&(console[_0x4b20c8(0x492)]('[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>'),process[_0x4b20c8(0x4e7)](0x1));const _0x35aecf=_0x264e93['selfAddress']||_0x388206['sync']?.[_0x4b20c8(0x48a)];!_0x35aecf&&(console[_0x4b20c8(0x492)](_0x4b20c8(0x6c2)+_0x4b20c8(0x4dd)+'\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig'),process['exit'](0x1));const _0xea4721=require$$5$1,_0x3e3ba0=new _0xea4721(_0x388206[_0x4b20c8(0x361)],{'sync':{'address':_0x35aecf,'auto_reconcile':![]}});await _0x3e3ba0[_0x4b20c8(0x1fd)]();try{const _0x2cbbb0=_0x3e3ba0[_0x4b20c8(0x5bc)];if(_0x2cbbb0&&_0x2cbbb0[_0x4b20c8(0x753)]('~tokens')){let _0x2c79a8=![];for(const _0x3fab63 of _0x2cbbb0[_0x4b20c8(0x1c1)](_0x4b20c8(0x52c))){_0x2c79a8=!![];break;}_0x2c79a8&&console[_0x4b20c8(0x24e)](_0x4b20c8(0x652)+_0x4b20c8(0x6a9));}console[_0x4b20c8(0x24e)]('\x0a\x20\x20Joining\x20cluster\x20at\x20'+_0x497b73+'…'),await _0x3e3ba0[_0x4b20c8(0x2ae)][_0x4b20c8(0x10b)](_0x497b73['replace'](/\/+$/,''),{'token':_0x264e93[_0x4b20c8(0x129)],'username':_0x264e93[_0x4b20c8(0x573)],'password':_0x264e93[_0x4b20c8(0x54b)]}),console[_0x4b20c8(0x24e)](_0x4b20c8(0x2e4)),console['log'](_0x4b20c8(0x764));}finally{await _0x3e3ba0[_0x4b20c8(0x44f)]();}}async function _0x298880(){const _0x57b26f=_0x2480b7,_0x3a957f=Date[_0x57b26f(0x127)](),_0x1fbf0a=_0x4bd009(process[_0x57b26f(0x400)]),_0x5e1732=_0x117dd0(_0x1fbf0a),_0x2df244=_0x9b04e6[_0x57b26f(0x738)](_0x5e1732['dbPath']);!_0x5e1732['noRepl']&&!process['stdin']['isTTY']&&(_0x5e1732[_0x57b26f(0x29c)]=!![]);const _0x2c0d40=require$$5$1,{start:_0x3feaca,colorLog:_0x1cd8d7}=requireOkdbShell(),_0x7f77d4=require$$1$1,_0x25f7ba={..._0x5e1732[_0x57b26f(0x466)]?{'encryptionKey':_0x5e1732['key']}:{},..._0x5e1732[_0x57b26f(0x116)]?{'admin':![]}:_0x3e7e17(_0x5e1732['admin'])?{'admin':_0x5e1732[_0x57b26f(0x270)]}:{},..._0x3e7e17(_0x5e1732['api'])?{'api':_0x5e1732[_0x57b26f(0x2bc)]}:{},..._0x3e7e17(_0x5e1732[_0x57b26f(0x8a)])?{'auth':_0x5e1732[_0x57b26f(0x8a)]}:{},..._0x3e7e17(_0x5e1732[_0x57b26f(0x3a2)])?{'mcp':_0x5e1732[_0x57b26f(0x3a2)]}:{},..._0x3e7e17(_0x5e1732[_0x57b26f(0x156)])?{'backup':_0x5e1732['backup']}:{},..._0x5e1732[_0x57b26f(0x121)]!==![]?{'timeMachine':_0x5e1732[_0x57b26f(0x121)]}:{},...Object['fromEntries'](_0x360f83[_0x57b26f(0x293)](_0x24f78d=>_0x5e1732[_0x24f78d]!==undefined)[_0x57b26f(0x757)](_0x5204f2=>[_0x5204f2,_0x5e1732[_0x5204f2]]))},_0x3642d1=_0x102e3e(_0x5e1732);if(!_0x7f77d4[_0x57b26f(0x42b)]){const _0x9ba6c6=_0x44736a(),_0x78e944=_0x5e1732[_0x57b26f(0x38a)]?_0x57b26f(0x653):_0x5e1732[_0x57b26f(0x3bd)]!=null&&_0x5e1732[_0x57b26f(0x3bd)]!==''?_0x57b26f(0x548):process.env.OKDB_HTTP_WORKERS?'OKDB_HTTP_WORKERS\x20env':_0x5e1732[_0x57b26f(0x91)]?.[_0x57b26f(0x150)]!=null?_0x57b26f(0x97):'default:\x20cores−1\x20=\x20'+Math[_0x57b26f(0x68c)](0x1,require$$0[_0x57b26f(0x19c)]()[_0x57b26f(0x39d)]-0x1);process[_0x57b26f(0x11c)][_0x57b26f(0xb6)](_0x57b26f(0xb5)+_0x3642d1+'\x20('+_0x78e944+(!_0x9ba6c6?_0x57b26f(0xb4):'')+')\x0a');}if(_0x7f77d4[_0x57b26f(0x42b)]){const _0x116652={..._0x25f7ba},_0x59f78b=new _0x2c0d40(_0x2df244,_0x116652);_0x59f78b[_0x57b26f(0x24e)][_0x57b26f(0x4e2)]?.();const _0x55d973=process.env.OKDB_CLUSTER_SLOT??'?',_0x177c9b={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x4540d=_0x177c9b[_0x5e1732[_0x57b26f(0x4a0)]]??_0x177c9b['info'];_0x59f78b[_0x57b26f(0x24e)][_0x57b26f(0x133)](_0x44bcea=>{const _0x5b870b=_0x57b26f;if((_0x177c9b[_0x44bcea[_0x5b870b(0x67c)]]??0x1)<_0x4540d)return;try{process[_0x5b870b(0x3a7)]?.({'__okdbCluster':'log','slot':_0x55d973,'pid':process[_0x5b870b(0xee)],'entry':_0x44bcea});}catch{}}),await _0x59f78b[_0x57b26f(0x1fd)]();const {attachWorkerCluster:_0x5099f2}=requireOkdbCluster();_0x5099f2(_0x59f78b),await _0x2bebd9(_0x59f78b,_0x5e1732[_0x57b26f(0x255)],_0x313d09(_0x5e1732));return;}if(_0x3642d1>0x1){const {runClustered:_0x3a6e67}=requireOkdbCluster(),_0x820826=new _0x2c0d40(_0x2df244,{..._0x25f7ba,'engines':![],'processors':![],'compaction':![]});await _0x820826[_0x57b26f(0x1fd)]();const _0x17fdba=async()=>{const _0x398902=new _0x2c0d40(_0x2df244,{..._0x25f7ba});return await _0x398902['open'](),_0x398902;},_0xaf1b6f=Object['fromEntries'](_0x360f83[_0x57b26f(0x757)](_0x558141=>[_0x558141,_0x25f7ba[_0x558141]??!![]])),{formatListenAddr:_0x3235c0}=requireOkdbHttp(),_0x6a0e2c=_0x3235c0(_0x5e1732[_0x57b26f(0x255)],_0x5e1732[_0x57b26f(0x91)]?.[_0x57b26f(0x41a)]),_0x2f2686=_0x3a6e67({'workers':_0x3642d1,'makeOkdb':_0x17fdba,'port':_0x5e1732['port'],'primaryOkdb':_0x820826,'workerRole':_0xaf1b6f,'listenAddr':_0x6a0e2c});let _0x1e74cc=![];async function _0x4b87f2(_0x3b6b99){const _0xc90e7c=_0x57b26f;_0x1e74cc&&(process[_0xc90e7c(0x705)][_0xc90e7c(0xb6)](_0xc90e7c(0x2ea)),process[_0xc90e7c(0x4e7)](0x82));_0x1e74cc=!![],process['stderr'][_0xc90e7c(0xb6)](_0xc90e7c(0x2c6)+(_0x3b6b99||_0xc90e7c(0x119))+_0xc90e7c(0x542));const _0x1427a9=setTimeout(()=>{const _0x423f0b=_0xc90e7c;process[_0x423f0b(0x705)][_0x423f0b(0xb6)](_0x423f0b(0x3ea)),process[_0x423f0b(0x4e7)](0x0);},0xbb8);_0x1427a9['unref']?.();try{await _0x2f2686[_0xc90e7c(0x44f)]();}catch(_0x4c995b){process['stderr'][_0xc90e7c(0xb6)](_0xc90e7c(0x1c7)+(_0x4c995b?.[_0xc90e7c(0x5e6)]??_0x4c995b)+'\x0a');}try{await _0x820826[_0xc90e7c(0x44f)]();}catch(_0x1735b1){process[_0xc90e7c(0x705)]['write'](_0xc90e7c(0x138)+(_0x1735b1?.[_0xc90e7c(0x5e6)]??_0x1735b1)+'\x0a');}process[_0xc90e7c(0x4e7)](0x0);}_0x5e1732[_0x57b26f(0x616)]=_0x3642d1;if(!_0x5e1732[_0x57b26f(0x29c)]){_0x820826['log'][_0x57b26f(0x4e2)]?.(),_0x229da7(_0x820826[_0x57b26f(0x8a)]?.[_0x57b26f(0x5ba)]?.()??[]),await _0x3feaca(_0x820826,_0x5e1732);return;}process[_0x57b26f(0x11c)][_0x57b26f(0xb6)]('[okdb]\x20cluster\x20supervisor\x20pid='+process[_0x57b26f(0xee)]+_0x57b26f(0x4ae)+_0x3642d1+'\x20'+(_0x57b26f(0x1d2)+_0x5e1732[_0x57b26f(0x255)]+'\x0a')),console[_0x57b26f(0x24e)](''),console[_0x57b26f(0x24e)]('\x20\x20✓\x20OKDB\x20cluster\x20running'),console[_0x57b26f(0x24e)](_0x57b26f(0x46c)+_0x5e1732[_0x57b26f(0x255)]+_0x57b26f(0x71c)+_0x3642d1+_0x57b26f(0x36a)),console[_0x57b26f(0x24e)](_0x57b26f(0x286)+_0x2df244),console[_0x57b26f(0x24e)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20'+_0x820826['id']),console[_0x57b26f(0x24e)](_0x57b26f(0x69c)+_0x5e1732['port']+_0x57b26f(0x126));!_0x5e1732[_0x57b26f(0x116)]&&console['log'](_0x57b26f(0x778)+_0x5e1732[_0x57b26f(0x255)]+_0x57b26f(0xc8));console[_0x57b26f(0x24e)](''),_0x229da7(_0x820826['auth']?.[_0x57b26f(0x5ba)]?.()??[]),process['on'](_0x57b26f(0xe2),()=>_0x4b87f2(_0x57b26f(0xe2))),process['on'](_0x57b26f(0x196),()=>_0x4b87f2(_0x57b26f(0x196))),process['on']('SIGBREAK',()=>_0x4b87f2(_0x57b26f(0x583)));return;}const _0x3e9ccc=new _0x2c0d40(_0x2df244,_0x25f7ba);_0x3e9ccc[_0x57b26f(0x24e)][_0x57b26f(0x4e2)]?.();const _0x42dd33=_0x3e9ccc[_0x57b26f(0x24e)][_0x57b26f(0x133)](_0x1c6e96=>_0x1cd8d7(_0x1c6e96,_0x5e1732[_0x57b26f(0x4a0)]));if(_0x5e1732[_0x57b26f(0x29c)])process['stdout'][_0x57b26f(0xb6)]('[okdb]\x20starting…\x0a');await _0x3e9ccc[_0x57b26f(0x1fd)]();if(_0x5e1732[_0x57b26f(0x29c)])process['stdout'][_0x57b26f(0xb6)](_0x57b26f(0x223));try{await _0x2bebd9(_0x3e9ccc,_0x5e1732[_0x57b26f(0x255)],_0x313d09(_0x5e1732));}catch(_0x337e1f){_0x337e1f[_0x57b26f(0x25b)]===_0x57b26f(0x5f9)&&(console[_0x57b26f(0x492)]('[okdb]\x20port\x20'+_0x5e1732[_0x57b26f(0x255)]+_0x57b26f(0x6cc)),process['exit'](0x1));throw _0x337e1f;}if(_0x5e1732[_0x57b26f(0x29c)]){const _0x18ff1e=_0x5e1732[_0x57b26f(0x91)]?.[_0x57b26f(0x41a)]!==undefined?[][_0x57b26f(0x123)](_0x5e1732['http'][_0x57b26f(0x41a)])[_0x57b26f(0x10b)](',\x20')+'\x20':'';process[_0x57b26f(0x11c)][_0x57b26f(0xb6)]('\x20\x20✓\x20http\x20listening\x20on\x20'+_0x18ff1e+':'+_0x5e1732[_0x57b26f(0x255)]+'\x0a');}if(!_0x5e1732[_0x57b26f(0x29c)])_0x3e9ccc[_0x57b26f(0x24e)]['detachConsole']?.(),_0x42dd33?.(),_0x229da7(_0x3e9ccc[_0x57b26f(0x8a)]?.[_0x57b26f(0x5ba)]?.()??[]),await _0x3feaca(_0x3e9ccc,_0x5e1732);else{const _0x26b38=_0x9b04e6[_0x57b26f(0x10b)](_0x2df244,_0x57b26f(0x74b));try{_0xf79001[_0x57b26f(0x188)](_0x26b38,String(process['pid']));}catch{}const _0x51d4bc=Date[_0x57b26f(0x127)]()-_0x3a957f;console[_0x57b26f(0x24e)](''),console['log'](_0x57b26f(0x41e)),console[_0x57b26f(0x24e)](_0x57b26f(0x3fe)+_0x5e1732[_0x57b26f(0x255)]),console[_0x57b26f(0x24e)](_0x57b26f(0x656)+_0x2df244),console[_0x57b26f(0x24e)](_0x57b26f(0x10a)+_0x3e9ccc['id']);{const _0x2b15b5=_0x3e9ccc[_0x57b26f(0x5bc)]?.['db']?.[_0x57b26f(0x6a)]?.(_0x57b26f(0x5b9))??0x0,_0x15714e=[..._0x3e9ccc[_0x57b26f(0x64c)]['keys']()]['filter'](_0x44ba25=>!_0x44ba25['startsWith']('~'))[_0x57b26f(0x39d)];if(_0x3e9ccc['_license']?.[_0x57b26f(0x1b3)]?.[_0x57b26f(0x60a)]===0x1){const _0xc519d5=Math[_0x57b26f(0x6c3)]((_0x3e9ccc['_license']['active']['expiresAt']-Date[_0x57b26f(0x127)]())/0x5265c00);console[_0x57b26f(0x24e)](_0x57b26f(0x507)+_0x3e9ccc['_license'][_0x57b26f(0x1b3)][_0x57b26f(0x22b)]+_0x57b26f(0x146)+_0xc519d5+_0x57b26f(0x532));}else{if(_0x3e9ccc[_0x57b26f(0x511)]?.[_0x57b26f(0x1b3)]){const _0xae740e=_0x3e9ccc[_0x57b26f(0x511)][_0x57b26f(0x1b3)];console['log']('\x20\x20\x20\x20license:\x20'+_0xae740e[_0x57b26f(0x22b)]+_0x57b26f(0x89)+new Date(_0xae740e[_0x57b26f(0x57a)])[_0x57b26f(0x261)]()[_0x57b26f(0x13a)](0x0,0xa)+')');const _0x3bd775=_0xae740e[_0x57b26f(0x260)]||{};if(_0x3bd775['maxWrites']){const _0x1cf4f8=Math[_0x57b26f(0x139)](_0x2b15b5/_0x3bd775[_0x57b26f(0x425)]*0x64);console[_0x57b26f(0x24e)](_0x57b26f(0x470)+_0x2b15b5[_0x57b26f(0xbf)]()+_0x57b26f(0x5fb)+_0x3bd775[_0x57b26f(0x425)][_0x57b26f(0xbf)]()+_0x57b26f(0x258)+_0x1cf4f8+_0x57b26f(0x67e)+_0x15714e+(_0x3bd775[_0x57b26f(0x5cb)]?'/'+_0x3bd775[_0x57b26f(0x5cb)]:'')+_0x57b26f(0x76d)+(_0x15714e===0x1?'':'s'));}}else{if(_0x3e9ccc[_0x57b26f(0x511)]){const _0x27476c=_0x3e9ccc[_0x57b26f(0x511)][_0x57b26f(0x6fd)](),_0x458e14=_0x27476c['length']?_0x27476c[_0x57b26f(0x757)](_0x226935=>_0x226935[_0x57b26f(0x4b0)])[_0x57b26f(0x10b)](',\x20'):'(add\x20a\x20license\x20first)',_0x4e3c61=_0x3e9ccc[_0x57b26f(0x511)]['effective'],_0x4221df=_0x4e3c61[_0x57b26f(0x260)][_0x57b26f(0x425)]?Math['round'](_0x2b15b5/_0x4e3c61[_0x57b26f(0x260)]['maxWrites']*0x64):0x0;console[_0x57b26f(0x24e)](_0x57b26f(0xcc)),console[_0x57b26f(0x24e)](_0x57b26f(0x470)+_0x2b15b5[_0x57b26f(0xbf)]()+_0x57b26f(0x5fb)+_0x4e3c61[_0x57b26f(0x260)][_0x57b26f(0x425)][_0x57b26f(0xbf)]()+_0x57b26f(0x258)+_0x4221df+'%),\x20'+_0x15714e+'\x20/\x20'+_0x4e3c61[_0x57b26f(0x260)][_0x57b26f(0x5cb)]+_0x57b26f(0x735)),console[_0x57b26f(0x24e)](_0x57b26f(0xd1)+_0x458e14);}}}}console[_0x57b26f(0x24e)](_0x57b26f(0x44c)+_0x5e1732['port']+_0x57b26f(0x126));!_0x5e1732[_0x57b26f(0x116)]&&console[_0x57b26f(0x24e)](_0x57b26f(0x6d)+_0x5e1732[_0x57b26f(0x255)]+_0x57b26f(0xc8));console[_0x57b26f(0x24e)](''),console[_0x57b26f(0x24e)]('[okdb]\x20started\x20in\x20'+_0x51d4bc+'ms'),_0x229da7(_0x3e9ccc[_0x57b26f(0x8a)]?.[_0x57b26f(0x5ba)]?.()??[]);let _0xde4cbb=![];async function _0x1ecee2(_0x4d857e){const _0x436c9d=_0x57b26f;_0xde4cbb&&(process['stderr'][_0x436c9d(0xb6)]('\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a'),process[_0x436c9d(0x4e7)](0x82));_0xde4cbb=!![],process[_0x436c9d(0x705)][_0x436c9d(0xb6)](_0x436c9d(0x2c6)+(_0x4d857e||'shutdown')+_0x436c9d(0xff));const _0x3ae836=setTimeout(()=>{const _0x34f1ba=_0x436c9d;process[_0x34f1ba(0x705)][_0x34f1ba(0xb6)](_0x34f1ba(0x141)),process['exit'](0x1);},0x1388);try{_0xf79001[_0x436c9d(0x3a3)](_0x26b38);}catch{}try{await _0x3e9ccc['close']();}catch(_0xcb8016){process[_0x436c9d(0x705)][_0x436c9d(0xb6)](_0x436c9d(0x6c9)+(_0xcb8016?.[_0x436c9d(0x5e6)]??_0xcb8016)+'\x0a');}clearTimeout(_0x3ae836),process['stderr'][_0x436c9d(0xb6)](_0x436c9d(0x2fe)),process['exit'](0x0);}process['on'](_0x57b26f(0xe2),()=>_0x1ecee2('SIGINT')),process['on'](_0x57b26f(0x196),()=>_0x1ecee2(_0x57b26f(0x196))),process['on'](_0x57b26f(0x583),()=>_0x1ecee2(_0x57b26f(0x583)));}}const _0x60e7e1=new Set([_0x2480b7(0x3e1),_0x2480b7(0x241),_0x2480b7(0x1c5),_0x2480b7(0x156),'restore',_0x2480b7(0x23a),'import','reset',_0x2480b7(0x129),_0x2480b7(0x10b),_0x2480b7(0x39b)]),_0x9d314f=process['argv'][0x2];if(_0x9d314f===_0x2480b7(0x3e1))console[_0x2480b7(0x24e)](require$$3[_0x2480b7(0x3e1)]),process[_0x2480b7(0x4e7)](0x0);else{if(_0x9d314f===_0x2480b7(0x528))process[_0x2480b7(0x4e7)](requireOkdbShmGc()[_0x2480b7(0x184)](process[_0x2480b7(0x400)][_0x2480b7(0x13a)](0x3)));else{if(_0x9d314f&&_0x60e7e1[_0x2480b7(0x469)](_0x9d314f)){const _0x451039=process[_0x2480b7(0x400)]['slice'](0x3),_0x11bbb8=_0x4bd009([_0x2480b7(0x68e),_0x2480b7(0x229),..._0x451039]),_0x15ef20=_0x117dd0(_0x11bbb8),_0x45b2ed=new Set(['--path','-d',_0x2480b7(0x454),'-k',_0x2480b7(0x3c2),'-c',_0x2480b7(0x777),'-p',_0x2480b7(0x428),_0x2480b7(0x488),'-e',_0x2480b7(0x472),_0x2480b7(0x21b),_0x2480b7(0x1b4),_0x2480b7(0x3ba),_0x2480b7(0x31f),_0x2480b7(0x13f),_0x2480b7(0x70f),_0x2480b7(0x55f),_0x2480b7(0xcb),'-u',_0x2480b7(0x309)]);let _0x7112fd=null;for(let _0x113bfe=0x0;_0x113bfe<_0x451039[_0x2480b7(0x39d)];_0x113bfe++){if(_0x45b2ed[_0x2480b7(0x469)](_0x451039[_0x113bfe])){_0x113bfe++;continue;}if(!_0x451039[_0x113bfe][_0x2480b7(0x42e)]('-')){_0x7112fd=_0x451039[_0x113bfe];break;}}(async()=>{const _0x2ae8ee=_0x2480b7;if(_0x9d314f===_0x2ae8ee(0x129)){const _0x8f0ad0=process['argv'][0x3],_0x1643bb=process['argv'][_0x2ae8ee(0x13a)](0x4),_0x5d40c3=_0x4bd009([_0x2ae8ee(0x68e),_0x2ae8ee(0x229),..._0x1643bb]),_0xce8b26=_0x117dd0(_0x5d40c3),_0x2e502f=new Set([_0x2ae8ee(0x539),'-d',_0x2ae8ee(0x454),'-k',_0x2ae8ee(0x3c2),'-c',_0x2ae8ee(0x777),'-p',_0x2ae8ee(0x21b),'--password',_0x2ae8ee(0x3ba),'--permissions',_0x2ae8ee(0x13f),_0x2ae8ee(0x70f),_0x2ae8ee(0x428),_0x2ae8ee(0x488),'-e',_0x2ae8ee(0x472)]),_0x52d9c1=[];for(let _0x3bbc4e=0x0;_0x3bbc4e<_0x1643bb[_0x2ae8ee(0x39d)];_0x3bbc4e++){if(_0x2e502f[_0x2ae8ee(0x469)](_0x1643bb[_0x3bbc4e])){_0x3bbc4e++;continue;}if(_0x1643bb[_0x3bbc4e][_0x2ae8ee(0x42e)]('-'))continue;_0x52d9c1['push'](_0x1643bb[_0x3bbc4e]);}switch(_0x8f0ad0){case _0x2ae8ee(0x216):await _0x37089e(_0xce8b26,_0x5d40c3);break;case _0x2ae8ee(0x401):await _0x442469(_0xce8b26);break;case _0x2ae8ee(0x2c7):await _0xeb5a1e(_0x52d9c1[0x0],_0xce8b26);break;default:console[_0x2ae8ee(0x492)](_0x2ae8ee(0x311)+_0x8f0ad0+_0x2ae8ee(0x1f5)),process[_0x2ae8ee(0x4e7)](0x1);}return;}if(_0x9d314f==='license'){const _0x577ad9=requireOkdbLicenseCodec(),_0x54eb56=process['argv'][_0x2ae8ee(0x13a)](0x3),_0x31ebf8=_0x4bd009([_0x2ae8ee(0x68e),_0x2ae8ee(0x229),..._0x54eb56]),_0x3ef834=_0x117dd0(_0x31ebf8),_0x104d30=new Set([_0x2ae8ee(0x539),'-d',_0x2ae8ee(0x454),'-k',_0x2ae8ee(0x3c2),'-c',_0x2ae8ee(0x777),'-p',_0x2ae8ee(0x428)]),_0x6b7f6b=[];for(let _0x10e2fc=0x0;_0x10e2fc<_0x54eb56[_0x2ae8ee(0x39d)];_0x10e2fc++){if(_0x104d30[_0x2ae8ee(0x469)](_0x54eb56[_0x10e2fc])){_0x10e2fc++;continue;}if(_0x54eb56[_0x10e2fc][_0x2ae8ee(0x42e)]('-'))continue;_0x6b7f6b[_0x2ae8ee(0x2f9)](_0x54eb56[_0x10e2fc]);}const _0xc0388a=_0x6b7f6b[0x0]??null;if(_0xc0388a==='remove')await _0x515c3d(_0x6b7f6b[0x1],_0x3ef834);else{if(!_0xc0388a)await _0x2011ca(_0x3ef834);else{let _0xd780c0=_0x577ad9[_0x2ae8ee(0x187)](_0xc0388a);if(_0xd780c0===_0x2ae8ee(0x14a)&&_0xf79001[_0x2ae8ee(0x1c9)](_0xc0388a))_0xd780c0=_0x2ae8ee(0x4c5);if(_0xd780c0===_0x2ae8ee(0x4c5))try{const _0x33cf5f=_0xf79001[_0x2ae8ee(0x418)](_0xc0388a,_0x2ae8ee(0x320))[_0x2ae8ee(0x471)](),_0x18883f=_0x577ad9['detectInputType'](_0x33cf5f);if(_0x18883f===_0x2ae8ee(0x552)){await _0x532735(_0x33cf5f,_0x3ef834);return;}await _0x3a54e1(_0xc0388a,_0x3ef834);return;}catch(_0x446dbc){console[_0x2ae8ee(0x492)](_0x2ae8ee(0x5c2)+_0xc0388a+':\x20'+_0x446dbc[_0x2ae8ee(0x5e6)]),process['exit'](0x1);}switch(_0xd780c0){case _0x2ae8ee(0x712):await _0x3a54e1(_0xc0388a,_0x3ef834);break;case _0x2ae8ee(0x552):await _0x532735(_0xc0388a,_0x3ef834);break;case _0x2ae8ee(0x4ad):await _0x43b83b(_0xc0388a,_0x3ef834);break;default:console[_0x2ae8ee(0x492)](_0x2ae8ee(0x543)+_0xc0388a+'\x22'),console['error'](''),console['error'](_0x2ae8ee(0x4a8)),console['error'](_0x2ae8ee(0x5c8)),console[_0x2ae8ee(0x492)](_0x2ae8ee(0xbd)),console['error'](_0x2ae8ee(0x159)),console[_0x2ae8ee(0x492)](_0x2ae8ee(0x723)),console[_0x2ae8ee(0x492)](''),console[_0x2ae8ee(0x492)](_0x2ae8ee(0x1f6)),process[_0x2ae8ee(0x4e7)](0x1);}}}return;}switch(_0x9d314f){case _0x2ae8ee(0x241):await _0x4e2758(_0x15ef20);break;case _0x2ae8ee(0x1c5):await _0x27c8f0();break;case _0x2ae8ee(0x478):await _0x3a6768(_0x15ef20);break;case _0x2ae8ee(0x156):await _0x3f91a5(_0x7112fd??_0x9b04e6[_0x2ae8ee(0x738)]('./okdb-backup'),_0x15ef20);break;case _0x2ae8ee(0x51f):if(!_0x7112fd)throw new Error(_0x2ae8ee(0x2c8));await _0x56e7f2(_0x9b04e6[_0x2ae8ee(0x738)](_0x7112fd),_0x15ef20,_0x11bbb8);break;case _0x2ae8ee(0x23a):await _0x484629(_0x7112fd??_0x9b04e6[_0x2ae8ee(0x738)](_0x2ae8ee(0x1a8)),_0x15ef20,_0x11bbb8);break;case _0x2ae8ee(0x1e2):await _0x5b20b7(_0x7112fd??_0x9b04e6[_0x2ae8ee(0x738)]('./okdb-export.ndjson'),_0x15ef20,_0x11bbb8);break;case _0x2ae8ee(0x10b):await _0x4840da(_0x7112fd,_0x15ef20,_0x11bbb8);break;}})()['then'](()=>process[_0x2480b7(0x4e7)](0x0))[_0x2480b7(0x618)](_0x10fafd=>{const _0x312e36=_0x2480b7;console[_0x312e36(0x492)](_0x312e36(0x148)+(_0x10fafd['message']||_0x10fafd)+'\x0a'),process['exit'](0x1);});}else _0x298880()[_0x2480b7(0x618)](_0x23e3e5=>{const _0x4bcbd8=_0x2480b7;console[_0x4bcbd8(0x492)](_0x4bcbd8(0x576)),console[_0x4bcbd8(0x492)](_0x23e3e5[_0x4bcbd8(0x5ed)]||_0x23e3e5),process[_0x4bcbd8(0x4e7)](0x1);});}}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module['exports']=okdb;
|
|
2
|
+
'use strict';const _0x29bffd=_0x51c5;(function(_0x1697ea,_0x3a99e5){const _0xe49258=_0x51c5,_0x4f10c5=_0x1697ea();while(!![]){try{const _0x1df59a=parseInt(_0xe49258(0x681))/0x1*(parseInt(_0xe49258(0x587))/0x2)+-parseInt(_0xe49258(0x27e))/0x3*(-parseInt(_0xe49258(0xdc))/0x4)+parseInt(_0xe49258(0xb7))/0x5+parseInt(_0xe49258(0xd0))/0x6*(parseInt(_0xe49258(0x3e5))/0x7)+-parseInt(_0xe49258(0x437))/0x8*(-parseInt(_0xe49258(0x3d9))/0x9)+-parseInt(_0xe49258(0x410))/0xa+-parseInt(_0xe49258(0x246))/0xb;if(_0x1df59a===_0x3a99e5)break;else _0x4f10c5['push'](_0x4f10c5['shift']());}catch(_0x5dd54e){_0x4f10c5['push'](_0x4f10c5['shift']());}}}(_0x4d22,0x6c91f));function _0x51c5(_0x1a9df4,_0x17c97b){_0x1a9df4=_0x1a9df4-0xad;const _0x4d22c1=_0x4d22();let _0x51c5a9=_0x4d22c1[_0x1a9df4];return _0x51c5a9;}var require$$1=require(_0x29bffd(0x272)),require$$0$1=require('fs'),require$$0=require('os'),require$$4$1=require(_0x29bffd(0x14c)),require$$5$1=require(_0x29bffd(0x605)),require$$0$3=require('readline'),require$$2=require('lmdb'),require$$5=require(_0x29bffd(0x515)),require$$2$1=require(_0x29bffd(0x485)),require$$0$2=require('node:crypto'),require$$4=require('child_process'),require$$1$1=require(_0x29bffd(0x449)),require$$0$4=require(_0x29bffd(0x1cf)),require$$0$5=require(_0x29bffd(0x61e)),require$$0$6=require(_0x29bffd(0x471)),require$$0$7=require('http'),require$$1$2=require('https'),require$$2$2=require('url'),require$$2$3=require(_0x29bffd(0x39e)),require$$3$1=require(_0x29bffd(0x2a9)),commonjsGlobal=typeof globalThis!=='undefined'?globalThis:typeof window!==_0x29bffd(0xae)?window:typeof global!==_0x29bffd(0xae)?global:typeof self!=='undefined'?self:{};function getDefaultExportFromCjs(_0x10d228){const _0x54b395=_0x29bffd;return _0x10d228&&_0x10d228[_0x54b395(0x3ab)]&&Object[_0x54b395(0x44c)][_0x54b395(0x4ea)][_0x54b395(0x120)](_0x10d228,_0x54b395(0x58f))?_0x10d228[_0x54b395(0x58f)]:_0x10d228;}var okdb$1={},okdbWorkers,hasRequiredOkdbWorkers;function requireOkdbWorkers(){if(hasRequiredOkdbWorkers)return okdbWorkers;hasRequiredOkdbWorkers=0x1;const _0x3f81dc=require$$0,_0x1ce2fd=require$$0$1,_0x453cf5=require$$1;let _0x5dc573;function _0xf42e36(){const _0x8fbed=_0x51c5;if(process.env.OKDB_FORCE_SHMBUF_FALLBACK==='1')return![];if(_0x5dc573!==undefined)return _0x5dc573;try{const _0x1b21d0=_0x453cf5[_0x8fbed(0x6ea)](require['resolve'](_0x8fbed(0x346)));_0x5dc573=_0x1ce2fd[_0x8fbed(0x12c)](_0x453cf5[_0x8fbed(0x4d3)](_0x1b21d0,_0x8fbed(0x519),'Release',_0x8fbed(0x2c9)));}catch{_0x5dc573=![];}return _0x5dc573;}function _0x3bb1cc(){const _0x38c449=_0x51c5,_0x40afa3=_0x3f81dc[_0x38c449(0x261)]()[_0x38c449(0x275)];return Math[_0x38c449(0x114)](0x1,_0x40afa3-0x1);}function _0x24b63d(_0x251158,_0x23af4c={}){const _0x5da3ac=_0x51c5,_0x51ba1f=_0x23af4c[_0x5da3ac(0x162)]!==undefined?_0x23af4c[_0x5da3ac(0x162)]:_0xf42e36();let _0x376888;if(_0x251158?.['noCluster'])_0x376888=0x1;else{let _0x4b3fcd,_0x5718f6;if(_0x251158?.[_0x5da3ac(0x1d8)]!==undefined&&_0x251158[_0x5da3ac(0x1d8)]!==null&&_0x251158[_0x5da3ac(0x1d8)]!=='')_0x4b3fcd=_0x251158[_0x5da3ac(0x1d8)],_0x5718f6=_0x5da3ac(0x764);else{if(process.env.OKDB_HTTP_WORKERS!==undefined&&process.env.OKDB_HTTP_WORKERS!=='')_0x4b3fcd=process.env.OKDB_HTTP_WORKERS,_0x5718f6=_0x5da3ac(0x69e);else _0x251158?.['http']?.[_0x5da3ac(0x7aa)]!==undefined&&_0x251158[_0x5da3ac(0x5b1)][_0x5da3ac(0x7aa)]!==null&&_0x251158['http']['workers']!==''&&(_0x4b3fcd=_0x251158[_0x5da3ac(0x5b1)][_0x5da3ac(0x7aa)],_0x5718f6=_0x5da3ac(0x69b));}if(_0x4b3fcd===undefined)_0x376888=_0x3bb1cc();else{const _0x571fe7=Number(_0x4b3fcd);!Number['isInteger'](_0x571fe7)||_0x571fe7<0x1?(console[_0x5da3ac(0x27f)](_0x5da3ac(0x3cb)+_0x5718f6+'='+JSON[_0x5da3ac(0x490)](_0x4b3fcd)+_0x5da3ac(0x11d)),_0x376888=0x1):_0x376888=_0x571fe7;}}return!_0x51ba1f&&_0x376888>0x1&&(console[_0x5da3ac(0x27f)](_0x5da3ac(0x75b)+(_0x5da3ac(0x498)+_0x376888+').')),_0x376888=0x1),_0x376888;}return okdbWorkers={'isShmbufNative':_0xf42e36,'defaultWorkers':_0x3bb1cc,'resolveWorkers':_0x24b63d},okdbWorkers;}function _0x4d22(){const _0x3c7792=['uid','procmodeack/','reportThreadStats','\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a','stop\x20every\x20okdb\x20process\x20on\x20this\x20path\x20and\x20run\x20`okdb\x20shm-gc`.','magenta','(no\x20types)','clearLine','role','\x20\x20\x20\x20admin:\x20\x20\x20http://localhost:','no-cache,\x20no-transform','INDEX_READY','_bestMatch','mode','--expose-gc','INVALID_INDEX_KEY','decommission','\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','database\x20path\x20writable:\x20','_groupByProcess','1325IdLUbs','fts:registered','middlewares','listen','\x20\x20(','\x20\x20✗\x20','signature','\x20has\x20ambiguous\x20query/path\x20field:\x20','permission','alg','_drainOne','\x20while\x20this\x20process\x20runs\x20','_copyDir','context','\x20/\x20','start\x20',':\x20key\x20[','unlinked','last-event-id','yellow','info','true','authenticateToken','floor','\x20bytes,\x20need\x20>=\x2065)','cursorKey','http.workers','_timer','registry-publish','OKDB_HTTP_WORKERS','_refreshDesiredSnapshot','admin','Blob\x20storage:\x20large\x20file\x20uploads\x20attached\x20to\x20records\x20or\x20stored\x20standalone.','handle','OKDBError','count','ITEM_UPDATE','params','--drop','data:\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','candidatesLegacyNamed','create','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','other','ESRCH','_buildProcessingFacet','noRepl','resolveBackupDest','token','[okdb]\x20exporting\x20env\x20\x22','sig','--any-size','inst:','-tmp-','access:\x20','homedir','embeddings','lost','readMs','exposeHeaders','stdout','[okdb]\x20backing\x20up\x20to\x20','ms\x20(attempt\x20','hasType','TOO_MANY_REQUESTS','createWriteStream','_lastCpuWindowMs','participate','needsActivation','\x20tokens:','captureStackTrace','\x22\x20is\x20used\x20by:\x20','unshift','_lastCpuUsage','nodeKey','unique','reject','Queue','bodyMode','_isClusterController','is\x20invalid','green','\x20which\x20does\x20not\x20exist','refs','jwksUri','LOGS','(?:/(.*))?$','Invalid\x20token','processor:resumed','hex','noCluster','processor','https:','pause','mcp','_wrapApiResponse','okdb-backup-','\x22.\x20Use:\x20create,\x20list,\x20revoke','PATCH','\x27\x20is\x20already\x20registered','_singletonLock','\x20\x20unused\x20(deletable)\x20','BACKUP_MANIFEST','not\x20open','dirname','OKDBInvalidValueError','BAD_REQUEST','[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument','\x20\x20(no\x20env\x20draining)','_listenAddr','\x20\x20Shell\x20commands','isAbsolute','heartbeatMs','change','invalid','onClaimed','\x20uses\x20raw\x20bodyMode\x20without\x20addRaw/raw\x20route\x20metadata','charCodeAt','prependListener','target\x20','cause','features','ingest','licensed','toString','body:\x20','transaction','email','resetReadTxn','HEAD','CONFLICT','\x20writes\x20(','_getJwkKey','\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','prefix','use\x20<env>','\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','closeAllConnections','\x0a\x20\x20✓\x20Token\x20created','toFixed','disable','_heldTotal','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','hasCanonical','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','listenAddr','Search','updatedAt','_nestedTotal','_participate','Examples','history','okdb-license-id:','field','[filter]','--username','oldestPendingMs','terminal','Forbidden','dropType','statSync','geoConfig','index:registered','_buckets','_lastCpuAt','_bpParkedTotal','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','--label',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','category','cors',')\x20—\x20they\x20will\x20NOT\x20be\x20preserved','\x20\x20(licensee:\x20','_dispatch','isInteger','_handlePoke','readdirSync','_lastCpuPct','~system','result','\x20\x20╔═══════════════════════════╗','code','readUInt32BE','embedded','__identity','options','[okdb-cluster]\x20worker\x20pid=','typeSubDbs','\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(','database\x20path\x20not\x20writable:\x20','INVALID_VALUE','REQUEST_TIMEOUT','\x20already\x20in\x20use','--help','isBuffer','ttl:set','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','_dedupeMax','from','repeat','\x1b[34m','blindPids','data:write','clusterWorkers','BACKUP_PATH_OUTSIDE_ROOT','startsWith','~licenses','sub','bus:poke','_lastPublishAt','Protected\x20(gate)','_putRowAsync','recordWrite','okdb-diag.','isFinite','object','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','[okdb]\x20shmbuf\x20native\x20binding\x20unavailable\x20—\x20multi-process\x20clustering\x20is\x20unsafe\x20','blocks','fanout','--ttl','readUInt8','_pending','\x20\x20✓\x20http\x20listening\x20on\x20','_onItem','Engines','--workers','CHANGEFEED_QUANTUM','runtimeProcessesView','Invalid\x20primary\x20key\x20type:\x20','_bucketIdx','NOT_FOUND','committed','hashed','[okdb]\x20reset\x20aborted','limits','legacy','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','dropSchema','handler','shm-gc:\x20unknown\x20argument\x20',').\x20If\x20none\x20of\x20them\x20runs\x20okdb,\x20pass\x20--force;\x20','dumpedAt','[okdb]\x20exported\x20\x20types=','Full-text\x20search','_highWater','_maybePublish','SIGINT','isAuthenticated','white','decodeLicenseBlob','POST','license:removed','\x20\x20→\x20\x20','label','clearTtl','servers','number','PAYLOAD_TOO_LARGE','dead','\x20\x20changes=','ENV','\x20months\x20from\x20issuance)','writeFileSync','filter','headers','claims','memoryUsage','required','\x20references\x20','_wantDbHandle','kid','/dev/shm','basename','GONE','registry\x20heartbeat\x20skipped\x20(writer=','TYPES','{}[]:,\x27\x22','\x20(dry\x20run)','\x20to\x20browse\x20the\x20API,\x20','recent\x20writes\x20(newest\x20first)','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','MALFORMED_TOKEN','setOwnMeta','_selfKey',');\x20','byteLength','selfAddress','_holderDead','afterWrite','[okdb]\x20created\x20.kdbconfig','SYNC_COMMITS','_activateProcessesReader','read','raw','\x20<\x20','workers','\x20\x20Flags','newIdentity','_nodeDbFor','readlinkSync','addSupervisedChild','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','has','\x20(deleted)','unclaimed','win32','keys/public.pem','[res]\x20','_heartbeatTimer','okdb_session_','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','--inspect','update','VIEW_PROGRESS','_licenseHash','version','token_use','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','_baselines','\x20\x20All\x20checks\x20passed.\x0a','gray','active:','\x20\x20[','RSA-SHA256','Functions','INDEX_HAS_CONSUMERS','\x20for\x20system\x20env','\x20\x20\x20\x20port:\x20\x20','execArgv','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','license','kdb_admin_oauth_state','skippedByProtocol','event','undefined','online','clockToChangeDb','dropExisting','emit','dynamic','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','_ensureTokensType','maxMs','3716395ibUzJP','config\x20file\x20invalid:\x20','queue/','tokenType','fts','randomUUID','_instanceId','pathname','attach','Invalid\x20license\x20blob:\x20','Feature\x20not\x20licensed:\x20','licenseHash','verifyActivation','CREATED','store\x20will\x20open\x20THAT\x20directory,\x20not\x20the\x20copy\x20in\x20','input:\x20','isActive','createInterface','markClosed','title','createHash','_nodeDead','compareExchange','_rowKey','failed\x20to\x20open','1005054LjnUCQ',';\x20Secure','_enforceOperationAccess','\x20file','License\x20expired\x20or\x20invalidated','--grants','bus:type_drop','wait','/dev/shm/','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','Forbidden\x20—\x20no\x20permissions\x20available','null','100bYwMpt','\x22\x20—\x20choose\x20a\x20directory\x20outside\x20it','Blob\x20on\x20disk\x20has\x20no\x20~files\x20record\x20in\x20any\x20env\x20(hash:\x20','\x22\x20is\x20inside\x20the\x20store\x20\x22','_active','activateLicense','_durs','worker','\x20logs\x20off\x0a','started','query.','off','\x20\x20score:','peer','\x22\x20on\x20\x22','\x1b[35m','_admissionStarted','\x20\x20·\x20','__okdbCluster','\x27\x20doesn\x27t\x20exist','shm-gc:\x20Linux\x20only\x20(POSIX\x20shared\x20memory\x20under\x20/dev/shm)','copy','127.0.0.1','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','candidateBytes','OPTIONS','ready','alloc','\x20(id:\x20','__OKDB_PUB_FINGERPRINT__','\x20(deleting\x20requires\x20--force\x20if\x20none\x20of\x20them\x20is\x20okdb)','--config','UNPROCESSABLE_ENTITY','_wantDbOf','[okdb]\x20close\x20error:\x20','_totalRequests','force','system:poke','\x20(+','withPoolHold','hdr','use','removeLicense','types','supervisorKey','makeOkdb','hash','quit','\x20\x20\x20\x20expires:\x20\x20\x20','_db','\x20\x20env=','exportToStream','selfKey','\x0a\x20\x20✓\x20License\x20activated','reason','\x27\x20already\x20registered','max','remaining-fields','\x20\x20records=','[okdb]\x20starting…\x0a','present','shift','nbf','unknown','tags','\x20(must\x20be\x20an\x20integer\x20>=\x201)\x20—\x20using\x201','/api','\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','call','targetKey','assertLimit',';\x20shmbuf\x20native\x20missing\x20→\x20forced\x20single-process','ttl:clear','fieldPath','_kind','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','[okdb]\x20warning:\x20could\x20not\x20read\x20node\x20identity/licenses\x20before\x20reset\x20(','OKDBSchemaValidationError','_onPending','single','existsSync','(worst\x20','_done','data.mdb','params.','error','ttlMs','Read','HTTP\x20','references','\x20\x20\x20\x20usage:\x20\x20\x20','--open','\x20\x20note:\x20','detectInputType','exec','\x20(expires\x20','\x20worker','(code=','no\x20.kdbconfig\x20(using\x20defaults)','method','gate','\x20\x20+','payload-or-self','LICENSE_INVALID','dest','identity','fork','items','caps','respawnTimer','text/event-stream;\x20charset=utf-8','importFromStream','net','heldBy','--no-admin','Payload\x20too\x20large','publishOwnRow','\x20origin=','SIGINT\x20(double-tap)','ms\x20mean=','address','sync','.log','keys','\x20\x20\x20\x20\x20\x20\x20','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','shm-gc','--port','root','_drain','/proc','expiresAt','export:\x20stream\x20closed\x20before\x20drain','importFromFile','shmbufNative','trimStart','issueToken','_listTypes','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','find','origins','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','/types\x0a\x20\x20\x20\x20','_seen','FOREIGN_KEY_VIOLATION','\x20\x20\x20\x20id:\x20\x20\x20\x20','--watch','derivePin','okdb-backup.json','Background\x20job\x20queue:\x20enqueue\x20work,\x20observe\x20state,\x20and\x20process\x20jobs.','\x20env','\x20documents\x20fail\x20validation','List\x20types,\x20get\x20type\x20schema,\x20list\x20registered\x20indexes.','isSetupMode','isHeld','store','system:bus_state_change','allowMethods','destroyed','scanned','allSettled','forEach','once','_closed','stdin','_totalErrors','[okdb]\x20http\x20workers:\x20','linux','okdb-writer:\x20env\x20closing\x20—\x20retry','decodeActivationToken','definition','size','pop','requests','registerType','_statusEnv','config\x20file\x20valid:\x20','tierList','cyan','\x20\x20Expected\x20one\x20of:','access-control-request-headers','onLicenseExpired','[okdb]\x20restore\x20complete\x20—\x20full-text\x20indexes\x20rebuild\x20on\x20first\x20open','tags:\x20','SYSTEM_STOPPED','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','_migrateVocab','_desiredOverlay','PUB_FINGERPRINT','discoveryTtlMs','retiring','anySize','formatListenAddr','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20','failures','Work',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','_inflight','send','pin','maxWrites','msg','\x20does\x20not\x20exist','field:resolver_registered','user','_held','List\x20tokens\x20and\x20users.','--env\x20<name>','MiB','pending','loop-lag','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','raw-remove','_children','listNodes','schema','./okdb-data','--test','\x20writer{depth=','getDesired','ftsIndexes','\x20\x20(+\x20time-machine)','time-machine','flushLmdb','env:removed','decoded','include','OKDBNotFoundError','bindings','trim','process\x20','(?:','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','engines','allowedAlgs','push','\x1b[36m',':\x20expected\x20','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','metrics','heapUsed','opendirSync','_startAdmission','node:perf_hooks','ms/','_buildChildRow',':\x20connected\x0a\x0a','List,\x20download,\x20and\x20inspect\x20file\x20metadata.','repairBlobRefs','\x20envs','min',',\x20got\x20','workersFlag','key','\x20\x20\x20\x20status:\x20\x20\x20\x20','Validation\x20failed','Content-Type','Records','_getOidcDiscovery','_rotateBucket','ID\x20token\x20is\x20not\x20accepted','isWorker','capable\x20HTTP\x20worker(s)\x20serving\x20:','consecutiveFailures','hard-killed','active','\x1b[1m','\x22\x20matches\x20','[okdb]\x20imported\x20\x20types=','INVALID_PRIMARY_KEY','[okdb]\x20warning:\x20failed\x20to\x20restore\x20identity/licenses\x20after\x20reset:\x20','cli','/api/','lifecycle','_resolveEnv','~files','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','authorization','internal','--log-level','doctor','readFileSync',',\x20signal=','closeSync','\x22\x20has\x20been\x20retiring\x20for\x20','expiry','--changes','param','_put','uri','orphan_blob','beforeWrite','index:drop','_clusterWorkerAttached','dataBytes','tmp','Gate\x20flag\x20required\x20to\x20touch\x20system\x20types\x20(those\x20whose\x20name\x20starts\x20with\x20\x22~\x22).\x20Combined\x20with\x20the\x20underlying\x20namespace\x20permission.','_clusterOrphanWatch','UNAUTHORIZED','license:activated','registry\x20publish\x20failing:\x20','current','inputSchema','\x20\x20Envs:\x20\x20\x20\x20','_startHeartbeat','bus:env_release','tokenizer','\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','hasDesired','ms\x20(pid\x20','openSync','\x22:\x20','\x0a[okdb]\x20received\x20','prompt','_windowCbs','segments\x20(','scope','Files','sort','_desired','\x20<path>\x20[json-body]','lstatSync','treeView','_authOptions','_ownMeta','sourcePath','primary','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','list','[okdb]\x20loaded\x20config:\x20','./okdb-export.ndjson','rows=','verbose','stopping','[okdb]\x20backup\x20complete','hostname','standard','Indexes','\x20is\x20inside\x20the\x20backup\x20','[env]','Shutting\x20down\x20due\x20to\x20license\x20expiry','isWanted','.\x20Move\x20it\x20away\x20first\x20to\x20use\x20the\x20copy.','precision','export','clock','createServer','live\x20process\x20registry;\x20disposable','--verbose','_isReader','Token\x20secret\x20not\x20configured','_wantDb','txn:rollback','matched','timingSafeEqual','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','load','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','isFile','_quarantinedEnvs','http.listen({workers/makeOkdb/primaryOkdb})\x20is\x20no\x20longer\x20supported\x20in\x20the\x20','processingStatusView','18662589KMhnyK','enable','JWT\x20signature\x20verification\x20failed','protected:read','signalWant','RS256','Route\x20','writes','appendFileSync','listRoutes','oauth','Server\x20is\x20in\x20bootstrap\x20mode\x20and\x20only\x20accepts\x20localhost\x20connections\x20until\x20the\x20first\x20token\x20is\x20created.','Execute\x20functions\x20over\x20HTTP/MCP/shell.','utf8','assign','commitsPerSec','remoteAddress','clearThreadStats','route','Sync','errors','\x20has\x20unbound\x20input\x20fields\x20with\x20bodyMode:none:\x20','\x0a\x20\x20✓\x20License\x20already\x20stored\x20(no\x20change)','event:\x20','Origin','process','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','cpus','body.','_computeStatus','--address','KiB','Cluster\x20replication.\x20The\x20\x22peer\x22\x20op\x20is\x20for\x20cluster\x20nodes,\x20not\x20human\x20users.','\x20\x20[okdb]\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','view','help','operation','_hbTimer','details','Activation\x20invalid:\x20','unreadablePids','blob\x20status\x20db\x20not\x20available','set','path','ITEM_PENDING','UNSUPPORTED_MEDIA_TYPE','length','_sync','\x20has\x20invalid\x20http.bodyMode:\x20','shutting\x20down…\x0a','mean','\x20active\x20env:\x20','split','JWT\x20audience\x20mismatch','put','93705fFnTKL','warn','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','sandbox','exit','argv','async','__vocab/version','TYPE_ALREADY_REGISTERED','hidden','audiences','Enqueue,\x20cancel,\x20retry,\x20remove\x20jobs;\x20manage\x20buckets;\x20reconcile\x20and\x20rebuild\x20stats.','att','__okdbSlot','aud','LICENSEE','closeIdleConnections','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','heapTotal','ENV_CLOSING_RETRY','[okdb]\x20nothing\x20to\x20reset\x20—\x20','[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping','parseBearer','_activateProcesses','mkdirSync','dbPath','concat','setTtl','OKDBForeignKeyError','processor:progress','SYSTEM_POKE','PUT','/admin/index.html','guards','\x0a\x0a\x20\x20','[okdb]\x20port\x20','_markSeen','protected:write','\x20freed','--types','_admissionTimer','createEnvironment','is\x20not\x20allowed','shmbuf','Type\x20\x27','ttl:expired','ftsName','--env','\x20(slot=','\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','OKDBForeignKeyDeleteError','Access-Control-Request-Headers','randomBytes','view:progress','level','[okdb-cluster]\x20','ITEM_REMOVE','_publishFailWarned','\x0d[okdb]\x20','_allEnvsWithFiles','functions',';\x20Expires=','Not\x20Found','some','destroy','SIG_INVALID','type/users\x20--help','SERVICE_UNAVAILABLE','verify','allocUnsafe','--prefix','\x20uses\x20bodyMode:array\x20but\x20does\x20not\x20have\x20exactly\x20one\x20unbound\x20array\x20input\x20field','sync:apply','-backups','.kdbconfig','shmbuf.node','access-control-allow-credentials','realpathSync','item:create','--password','writeUInt32BE','configureAuth','header','processKey','entry','REMOVE','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','--new-identity','createReadStream','LENGTH_REQUIRED','stopped','x-forwarded-for','\x20\x20errors\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','_role','_versionSkewWarned','HTTP_','[okdb]\x20opening\x20','~blobs','_changefeed','isSystem','envs=','cpSync','ceil','revived','Blob\x20file\x20missing\x20for\x20~files\x20record\x20\x22','item:remove','_bpWaiters','boolean','copyFileSync','\x20\x20\x20\x20license:\x20','sse','processor:ready','\x20\x20\x20\x20\x20\x20','processors/','authenticateRequest','_handlePending','BACKUP_DEST_NOT_EMPTY','importBlobs','now','port','ms\x20env=','\x20logs\x20on\x20\x20','verifyCookie','ieee-p1363','Types','exports','maxAge','log','level:\x20info','processor:paused','Operator\x20surface:\x20server\x20info,\x20logs,\x20event\x20streams,\x20processor\x20status,\x20backups.','setupPrimary','\x20in\x20','setSchema','PIN','\x20\x20!\x20','_started','http://','_flushDebounce','responseStatuses','test','\x20\x20✓\x20','library\x20(okdb\x20node-model\x202.0).\x20For\x20multi-process\x20HTTP\x20serving\x20use\x20the\x20okdb\x20','HTTP\x20server\x20already\x20running','routes','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','jwks_uri','OKDB-PIN-V1:','formatCookie','[okdb]\x20importing\x20','GATEWAY_TIMEOUT','List\x20functions\x20and\x20inspect\x20their\x20source.','fill','--print','namespace','access','sourceKey','drain','INDEX_ALREADY_REGISTERED','putNode','external','deleted','SIGTERM','isArray','cluster-wide','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x22\x20→\x20','parse','processors',']\x20already\x20maps\x20to\x20\x27','blob','shared-memory\x20segment\x20\x22','BACKUP_DEST_INSIDE_STORE','\x1b[90m','add','\x1b[2m','startedAt','\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20(','headers.','\x20result','instanceId','open\x20','unref','\x20\x20(unlimited)','\x20(expires\x20in\x20','values','permissions','content-type','bus:proc','verifySignature','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','transport','spki','[okdb]\x20restoring\x20','?\x0a\x20\x20(node\x20identity\x20and\x20licenses\x20are\x20preserved)\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','map','writerStatus','data','unlink','dim','shmbuf/package.json','singletonClaims',':\x20prefix\x20','Unsupported\x20JWT\x20alg:\x20','_cmd','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','processes:\x20','\x20\x20\x20\x20\x20http://localhost:','enforce','threadId','claimGated','createHmac','darwin','\x0a\x20\x20','error:\x20','listAll','Run\x20searches\x20against\x20registered\x20FTS\x20and\x20vector\x20indexes.','statusCode','item:pending','comm','false','_singletonLocks','env/staging/info','\x20\x20✗','events','type:drop','unique:violation_resolved','dropIndex','pipe','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','\x20\x20#','activation','LABEL','logLevel','host','\x20deleted','_report','compact','[okdb]\x20closed\x20cleanly\x0a','[okdb]\x20started\x20in\x20','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','~processes:cmd','ver','\x20\x20\x20\x20addedAt:\x20\x20\x20','types\x20--env\x20staging','indexOf','\x20not\x20found','json','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','derived;\x20rebuilt\x20from\x20source\x20docs\x20on\x20first\x20open\x20of\x20the\x20restored\x20store','audience','Invalid\x20activation\x20token:\x20','node\x20identity','VALIDATION_ERROR','record','querySchema','stack','\x20MB)','slot','readInt32LE','candidates','api','\x20has\x20illegal\x20binding\x20target\x20for\x20','Upload,\x20update\x20metadata,\x20and\x20delete\x20files.','\x20\x20\x20\x20status:\x20\x20\x20\x20active','_key','outputSchema','_shouldWrapResponse','Validation\x20failed:\x20','setDesired','fn-runner',')\x20to\x20your\x20license\x20vendor.','\x20fetching\x20','candidateAllocated','quantum','_lockDb','SHM_SEGMENT_RETIRING','HTTP_CLUSTER_REMOVED','Bearer\x20$1…','\x20statusEnv=','\x0a\x20\x20License\x20details:','INDEX_REGISTERED','authorizationUrl','resetIndex','setPrompt',';\x20SameSite=','dir','migrations','worker_threads','HELP','node\x20','License\x20limit\x20exceeded:\x20','_sandbox','Materialized\x20views:\x20query\x20definitions\x20that\x20are\x20continuously\x20maintained\x20and\x20queryable.','timeMachine','[okdb]\x20preserved:\x20','0123456789ABCDEFGHJKMNPQRSTVWXYZ','_handleInProcess','SIGKILL','slice','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','__esModule','delete','otherwise\x20rerun\x20as\x20root.','_envs','env','disconnect','Server-side\x20user-defined\x20functions\x20registered\x20per\x20environment.','processing','register','scrypt','run','description','SWAP','exportEnvsToStream','_totalWriteMs','epoch','exclusiveStart','ttl','padEnd','type/users/query\x20{\x22active\x22:true}','authMode','sha256','jwksTtlMs','ephemeral','Schema\x20validation\x20failed\x20for\x20','\x1b[0m','--path','item:update','confirm','OKDB_HTTP_WORKERS\x20env','resolve','pid','[okdb]\x20invalid\x20','_okdb','\x0a\x20\x20\x20\x20','orphan','\x20lived\x20outside\x20the\x20store\x20at\x20','getCount','usage:\x20okdb\x20restore\x20<backup-dir>\x20--path\x20<target-data-dir>','transport:\x20','ORPHAN\x20(env-closed\x20write)','LICENSE_LIMIT_EXCEEDED','\x20opening\x20','_isWriter','addLicense','equals','62649YPzbRM','noAdmin','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','_threadStats','attached','_caps','freeze','--blobs','_scheduleFlush','summary','\x20type','_blobStatusDb','14ibkmwQ','draining','ftruncateSync','work','_lastTick','\x0a\x20\x20Joining\x20cluster\x20at\x20','maxBodyBytes','starting','_released','cookieName','defaults','~processes','ppid','runInNewContext','CLI\x20(`okdb\x20listen`),\x20or\x20use\x20Node\x27s\x20built-in\x20`cluster`\x20module\x20and\x20call\x20','indexToDb','LICENSE_ACTIVATION_INVALID','\x20\x20✓\x20database\x20opened\x0a','envName','auth=','pathParams','Internal\x20error','close','internalOnly','isTTY','\x20process(es)\x20that\x20could\x20map\x20these\x20','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','_processStartedAt','tokenSecret','resetting','Forbidden\x20—\x20requires\x20','get','Register,\x20configure,\x20and\x20remove\x20cluster\x20peers.','_sockets','_onStop','JWT\x20not\x20yet\x20valid','ensureType','exportToFile','stopHeartbeat','_committed','catch','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','FORBIDDEN','3966060QLQTyT','_dedupeKey','okdb-lock:\x20env\x20closed','closed','\x20\x20\x20\x20\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/','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','_validateOperationRequest','fetch','license:added','padStart','backup\x20destination\x20\x22','__writeCounter','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','_userRouteCount','.kdb_history','List\x20views,\x20query\x20view\x20output,\x20inspect\x20metadata\x20and\x20definition.','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','grants','system:proc','available','SCHEMA_COLLECTION_INVALID','registerIndex','_coordinator','\x20(must\x20be\x20a\x20string\x20or\x20array\x20of\x20strings)','System','openDB','params.env','GiB','platform','resume','files\x20feature\x20not\x20available','_enableChangelog','reap','content-length','_pendingLocal','\x20has\x20ambiguous\x20binding\x20for\x20path\x20field:\x20','fields','\x22\x20in\x20env\x20\x22','_ensureDesired','8FfrCah','\x20\x20·\x20\x20','queue-worker','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','line','geo','regex','_safeEnvDirName','Create\x20and\x20delete\x20views,\x20start,\x20stop,\x20and\x20rebuild\x20them.','Bearer\x20','SIGBREAK','typesDb','commit','never','next','value','_servingEngines','shell','cluster','\x20allocated','parseInt','prototype','clear','migrate','note','SYSTEM_PROC','Unknown\x20error','Create,\x20update,\x20and\x20delete\x20tokens\x20and\x20users;\x20rotate\x20keys.','writeUInt16BE','_nodeDb','query','preferred_username','cpuPct','isDead','\x20\x20\x20\x20api:\x20\x20\x20\x20\x20http://localhost:','_userPhase','connected','system:type_drop','Unauthorized','node/','unique:violation','deregisterSelf','val','open','(unset)','/([^/]+)',';\x20HttpOnly','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','_runMiddlewares','LICENSE_HASH_MISMATCH','depth','\x1b[37m','QUIT','toLowerCase','okdb_session','ROUTES','Run','\x20already\x20exists','node:events','searchParams','matcher','\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','_outstanding','2.6.1','\x20\x20\x20\x20features:\x20\x20','DELETE\x20type/users/item/x','bumpCmd','getSecurityNotices','View\x20peer\x20status\x20and\x20replication\x20stats.','\x20\x20\x20\x20permissions:\x20','jwk','enabled','debug','_buildOwnRow','childTransaction','\x22\x20(hash:\x20','percentile','List\x20jobs,\x20view\x20stats,\x20list\x20buckets.','crypto','\x20\x20\x20\x20licensee:\x20\x20','time','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','groups','licensee','\x20\x20(name:\x20','_heartbeatInFlight','_assertUsable','changes','_publishNow','stringify','additionalProperties','valid','status','rawBuf','_collectWriterFacet','then','createPublicKey','(workers\x20can\x27t\x20share\x20the\x20cross-process\x20HLC/clock).\x20Forcing\x20single-process\x20(was\x20','meta','\x20\x20other\x20owner\x20\x20\x20\x20\x20\x20\x20\x20','blindCommands','okdbVersion','[body]','rss','\x20has\x20canonical\x20metadata\x20but\x20missing\x20valid\x20inputSchema','\x20cf-ray=',',\x20stopping\x20workers…\x0a','userAdded','listDesired','access-control-max-age','stop','\x1b[32m','writes=','holder','removeNode','_isFree','okdb.http.listen(port)\x20in\x20each\x20worker.','INDEX_NOT_REGISTERED','shm-gc:\x20/proc\x20is\x20not\x20readable\x20—\x20cannot\x20tell\x20which\x20segments\x20are\x20in\x20use','\x20environment\x20','No\x20license\x20found\x20matching\x20this\x20activation\x20token','OIDC\x20discovery\x20missing\x20jwks_uri','paused','/type/users\x0a\x20\x20\x20\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20','No\x20tokens.','ms\x20max=','~tokens','every','type:registered','match','_enqueuedAt','OKDBIndexHasConsumersError','isEnabled','\x20\x20[okdb]\x20closed\x20cleanly\x0a','\x0a\x20\x20\x20\x20\x20\x20','resetFts','\x27\x20on\x20type\x20\x27','_supervisorKey','\x20is\x20not\x20a\x20complete\x20okdb\x20backup\x20(no\x20','logRequests','getPins','creating','_onProcEvent','_lock','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','decommissioned','\x20HTTP\x20workers,\x20each\x20serves\x20+\x20processes)','username','type','typesPerEnv','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','req','acquiredAt','SCHEMA_VALIDATION_FAILED','type/users','join','--permissions','fts:','\x20\x20\x20\x20\x20\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','[req]\x20','node','\x20\x20scanned\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x27,\x20cannot\x20map\x20to\x20\x27','all','keep-alive','flushDebounce','properties','forceAfterMs','blobs','_oidcDiscoveryCache','OKDB_CODE_TO_HTTP_STATUS','maxExtra','\x22\x20to\x20enable\x20it.','cluster:\x20ready\x20(','digest','_isStale','getAuthOptions','syncPeers','hasOwnProperty','{}[]:,\x0a\x0d\x09\x20','tryAcquire','\x20log\x20level:\x20','_writer','uptime','config','operations','inspect','INDEX_PROGRESS','array','LICENSED_BUILD','x5c','dedupeMax','License\x20signature\x20invalid:\x20','issuer','type/','validateRouteInput','mcp-session-id','fromEntries','finally',',\x20label:\x20','rawResponse','der','_loginStates','\x20(other\x20users;\x20cannot\x20map\x200600\x20segments)','~lock','toLocaleString','(null)','getRange','\x22\x20(must\x20be\x20debug|info|warn|error)','txn:start','exp','state','origin','attachFeed','_license','Writable','parkedNow','main','_collectSingletonClaims','busy','segmentNameFor:\x20suffix\x20must\x20look\x20like\x20\x22_name\x22\x20(got\x20','stream','toUTCString',';\x20Path=','GET','build','envs','port\x20','reload','\x20\x20\x20\x20writes:\x20\x20\x20\x20','\x0a\x20\x20✓\x20License\x20added','bind','MAX_POOL_HOLDS','examples','inUse','uncaughtException','credentials','kind','Index\x20\x22','processor:retry','error\x20','\x20(okdb\x20','_cursors','[okdb]\x20error:\x20','flatMap','Lax','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','server','_matchRoute','_fetchJwks','getuid','is\x20required','env:opened','\x20(must\x20be\x20true\x20or\x20false)','constructor','sync-node','Records\x20inside\x20your\x20types\x20—\x20the\x20actual\x20rows\x20you\x20store.','shm\x20segment\x20','[okdb]\x20error:\x20failed\x20to\x20read\x20','OKDBInvalidPrimaryKeyError','Register,\x20update,\x20and\x20delete\x20function\x20definitions.','building','expired','Type\x20definitions,\x20all\x20index\x20registrations\x20(byIndex,\x20FTS,\x20vector),\x20and\x20TTL\x20policy.','[okdb-cluster]\x20primary\x20pid=','bold','OKDBAlreadyExistsError','http-server','authRequired','\x20\x20\x20\x20path:\x20\x20','\x20\x20kept\x20(attached/retiring\x20when\x20retired)\x20','_adminRelay','ms\x20on\x20env=','_quantum','\x20worker(s)\x20remaining','writeUInt8','outOfTree','remove','\x0a===\x20OKDB_DIAG\x20','Index\x20\x27','includes','columns','replace','[okdb]\x20reset:\x20','okdb','_runGuards','allowHeaders','_normalizeOAuthAuthResult','[okdb]\x20invalid\x20config\x20\x22','Create,\x20update,\x20and\x20delete\x20records\x20(including\x20bulk\x20import).','roles','import','rmSync','scopes','\x20\x20╚═══════════════════════════╝','onMapped','\x20named\x20by\x20okdb\x20≤\x202.4.0)','_putRowSync','\x20cf-ip=','getChanges','\x20drainAge=','_totalReadMs','--version','env/','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','processes','kill','wrong_node','[okdb]\x20error:\x20--password\x20requires\x20--name','raw-put','addRaw','\x0a\x20\x20okdb\x20doctor\x0a','name','METHOD_NOT_ALLOWED','x-okdb-raw-response','\x20day(s).','--key','_onTick','removeSync','backupRoot','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','\x20\x20skipped:\x20','end','[okdb-cluster]\x20slot=','start','createLoginState','\x20phase=','keys:','set-cookie','[okdb]\x20exporting\x20blobs…','Views','deletedAllocated','Processors','views','waiting','1014hpoPZX','\x20\x20Type\x20','_typeSchema','\x20size,\x20','VERSION_MISMATCH','dropping','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','default','getCmd','index','system:drain','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','\x1b[31m','\x20licenses','ENOENT','entries','write','red','_flushTimer','INTERNAL_ERROR','\x20\x20⚠','cpuWindowMs','putSync','endsWith','changed','\x20ipc\x20error:\x20','okdb.pid','sab','_lockDbOf','_onPoke','_readNDJSON','records','NOT_IMPLEMENTED','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','index:reset','toISOString','dryRun','View\x20server\x20info,\x20logs,\x20SSE\x20event\x20streams,\x20processor\x20status,\x20backup\x20list.','clusterStatusView','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','\x20\x20✓\x20OKDB\x20server\x20running','http','\x20\x20\x20\x20graceful\x20shutdown\x0a','tokenUrl','detachConsole','threads','_blobPath','\x20\x20✓\x20Removed\x20license\x20','schema:set','_jwksCache','LICENSE_FEATURE_DISABLED','\x20records…','\x20forked\x20','init','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','\x20HTTP\x20workers\x20','\x20querySchema\x20references\x20missing\x20input\x20field:\x20','\x20===','_acquiredAt','compaction','nodesView','string','onWindow','http.listen:\x20host\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20an\x20array\x20of\x20them','function','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','getClock','_rawDb','readUInt16BE','created','\x0a-----END\x20CERTIFICATE-----\x0a','Peer','isPrimary','\x20\x20\x20\x20port:\x20\x20\x20\x20','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','token_endpoint','\x20SECURITY\x20NOTICE','STATUS','[okdb]\x20invalid\x20config\x20\x22http.host\x22:\x20','\x20\x20\x20\x20path:\x20\x20\x20\x20','1ofN:','base64','running','\x22\x20—\x20pass\x20a\x20path\x20relative\x20to\x20it\x20(configure\x20with\x20the\x20`backup.root`\x20option)','writeMs','validateBlobIntegrity','none','_jwksNegativeCache','application/json','JWT\x20expired','isBusy','_countFileRefs','\x20+\x20','[okdb]\x20blobs:\x20imported=','ITEM_CREATE','_nestedWarned','system:stopped','Hint:\x20','children','_startedAt','<path>','[okdb]\x20import\x20complete','search:query','_log','_boot','--no-cluster','_lookupByName','payload','PUBLIC_KEY_PEM','backup','Query','publishChildRow','\x20@\x20','_removeRowAsync','onThreadExit','cpuUsage','indexes','FEATURES','FTS_DROP','_ensure','\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','[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping','stderr','slotKey','\x20oldestPendingMs=','../okdb','/type/users/item/alice\x0a\x20\x20\x20\x20','cluster:','maps','--prefix=','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','sizeBefore','listening','_getType','files','loadEnvFile','EXIT','Unknown\x20JWKS\x20kid:\x20','body','round',':\x20ping\x0a\x0a','Machine-to-machine\x20cluster\x20protocol\x20(join\x20handshake,\x20replication\x20channel,\x20traffic).\x20Grant\x20only\x20to\x20peer\x20nodes\x20—\x20not\x20to\x20humans.','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','\x20to\x20quit.','--name','clearCookie','free\x20tier','_resolveOrCreateEnv','search','auth','perf_hooks','targetType','effective','_blobsDir','_totalReads','toUpperCase','uuid','Foreign\x20key\x20violation:\x20','Create,\x20delete,\x20and\x20compact\x20environments.','OKDBIndexNotRegisteredError','%),\x20','loop-lag\x20','_totalWrites','logs','\x20more','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','commitP99Ms','shutdown','\x20\x20Some\x20checks\x20failed.\x0a','onRetiring','\x20license(s)','unlinkSync','(empty)','restore','licenseType','isConnected','halted','\x20—\x20','(none)','UNIQUE_CONSTRAINT','\x20\x20Tier:\x20\x20\x20\x20','setHeader','killable','message','notOkdbShaped','deaths','_validateOidcAccessToken','licenses','/\x20quit\x20/\x20Ctrl+C','registerFts','signingInput','\x22\x20resolves\x20outside\x20the\x20backup\x20root\x20\x22','transactionSync','INDEX_RESET','fts:reset','safety','setEncoding','id:\x20','feed:','_cookieName','Version\x20mismatch\x20for\x20','exportBlobs','getKeys','_draining','system','TYPE_NOT_REGISTERED','reidentify','relative','hint','createdAt','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','primaryOkdb','stats','types:','reset','password','/api/env/','--log-requests','base64url','ms\x20activeWriters=','\x20\x20\x20\x20','Write','addSSE','procmode/','NAME','\x20\x20Writes:\x20\x20','response','_systemEnv','reverse'];_0x4d22=function(){return _0x3c7792;};return _0x4d22();}var version=_0x29bffd(0x476),require$$3={'version':version},okdbMigrate={'exports':{}},okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x43fc40 extends Error{constructor(_0x132db5,_0x51f48e,_0x247d5a={}){const _0xe0ab1d=_0x51c5;super(_0x132db5),this[_0xe0ab1d(0x570)]=_0xe0ab1d(0x6a3),this['code']=_0x51f48e,this[_0xe0ab1d(0x26d)]=_0x247d5a,_0x247d5a['cause']&&(this[_0xe0ab1d(0x6fa)]=_0x247d5a[_0xe0ab1d(0x6fa)]),Error[_0xe0ab1d(0x6c8)](this,this[_0xe0ab1d(0x536)]);}}class _0x19e395 extends _0x43fc40{constructor(_0x5a1ecb,_0xe01eba,_0x2ace2f,_0x9cbca5){const _0x5297d8=_0x51c5;super(_0x5297d8(0x650)+_0x5a1ecb+'@'+_0xe01eba+_0x5297d8(0x1c9)+_0x2ace2f+_0x5297d8(0x1d7)+_0x9cbca5,_0x5297d8(0x58b),{'type':_0x5a1ecb,'key':_0xe01eba,'expectedVersion':_0x2ace2f,'actualVersion':_0x9cbca5}),this[_0x5297d8(0x570)]='OKDBVersionMismatchError';}}class _0x1d656f extends _0x43fc40{constructor(_0x2ca1b6,_0x7bca3c){const _0x294599=_0x51c5;super(_0x2ca1b6+'@'+_0x7bca3c+_0x294599(0x1a6),_0x294599(0x769),{'type':_0x2ca1b6,'key':_0x7bca3c}),this[_0x294599(0x570)]=_0x294599(0x1bf);}}class _0xa9593f extends _0x43fc40{constructor(_0x5e2cee,_0x653ff0){const _0xe7ace8=_0x51c5;super(_0x5e2cee+'@'+_0x653ff0+_0xe7ace8(0x470),'ALREADY_EXISTS',{'type':_0x5e2cee,'key':_0x653ff0}),this[_0xe7ace8(0x570)]=_0xe7ace8(0x542);}}class _0x1fa28d extends _0x43fc40{constructor(_0x379435,_0x48c320){const _0x2e2d42=_0x51c5,_0x5141f3=typeof _0x48c320;super('Invalid\x20index\x20key\x20type\x20for\x20\x27'+_0x379435+'\x27:\x20'+_0x5141f3+_0x2e2d42(0x5af)+_0x48c320,_0x2e2d42(0x67c),{'index':_0x379435,'key':_0x48c320,'keyType':_0x5141f3}),this[_0x2e2d42(0x570)]='OKDBInvalidIndexKeyError';}}class _0x16871a extends _0x43fc40{constructor(_0x24ac17){const _0x435319=_0x51c5,_0x925a98=typeof _0x24ac17;super(_0x435319(0x767)+_0x925a98+_0x435319(0x578)+_0x24ac17,_0x435319(0x1e9),{'key':_0x24ac17,'keyType':_0x925a98}),this[_0x435319(0x570)]=_0x435319(0x53b);}}class _0x2e4834 extends _0x43fc40{constructor(_0x1452df){const _0x25b898=_0x51c5;super(_0x25b898(0x2aa)+_0x1452df+_0x25b898(0xef),_0x25b898(0x655),{'type':_0x1452df}),this[_0x25b898(0x570)]='OKDBTypeNotRegisteredError';}}class _0x2f616b extends _0x43fc40{constructor(_0x4e0fff){const _0x519e8f=_0x51c5;super(_0x519e8f(0x2aa)+_0x4e0fff+_0x519e8f(0x113),_0x519e8f(0x286),{'type':_0x4e0fff}),this[_0x519e8f(0x570)]='OKDBTypeAlreadyRegisteredError';}}class _0x55cdc5 extends _0x43fc40{constructor(_0x508c45,_0x1925f2){const _0x47a3f9=_0x51c5;super(_0x47a3f9(0x54f)+_0x1925f2+_0x47a3f9(0x4c0)+_0x508c45+'\x27\x20doesn\x27t\x20exist',_0x47a3f9(0x4ac),{'type':_0x508c45,'index':_0x1925f2}),this[_0x47a3f9(0x570)]=_0x47a3f9(0x627);}}class _0x200750 extends _0x43fc40{constructor(_0x38f589,_0xc6cf05){const _0x35afc3=_0x51c5;super(_0x35afc3(0x54f)+_0xc6cf05+_0x35afc3(0x4c0)+_0x38f589+_0x35afc3(0x6e5),_0x35afc3(0x31c),{'type':_0x38f589,'index':_0xc6cf05}),this[_0x35afc3(0x570)]='OKDBIndexAlreadyRegisteredError';}}class _0x5406cf extends _0x43fc40{constructor(_0x4ba544,_0x3d6c1c={}){const _0x50e04e=_0x51c5;super(_0x4ba544,_0x50e04e(0x740),_0x3d6c1c),this['name']=_0x50e04e(0x6eb);}}class _0x32e8ff extends _0x43fc40{constructor(_0x818fc4,_0x26996e,_0x27b3a2,_0x3723a8,_0xfc0a5d){const _0x26d9ba=_0x51c5;super('Unique\x20constraint\x20violated\x20on\x20'+_0x818fc4+'@'+_0x26996e+_0x26d9ba(0x691)+_0x27b3a2+_0x26d9ba(0x327)+_0x3723a8+_0x26d9ba(0x4da)+_0xfc0a5d+'\x27',_0x26d9ba(0x63b),{'type':_0x818fc4,'index':_0x26996e,'indexKey':_0x27b3a2,'existingKey':_0x3723a8,'conflictingKey':_0xfc0a5d}),this[_0x26d9ba(0x570)]='OKDBUniqueConstraintError';}}class _0x368a0c extends _0x43fc40{constructor(_0x518031,_0x5d8daf,_0x56de10){const _0xaa8616=_0x51c5;super(_0xaa8616(0x3c3)+_0x518031+'@'+_0x5d8daf,_0xaa8616(0x4d1),{'type':_0x518031,'key':_0x5d8daf,'errors':_0x56de10}),this[_0xaa8616(0x570)]=_0xaa8616(0x129),this[_0xaa8616(0x4cc)]=_0x518031,this[_0xaa8616(0x1d9)]=_0x5d8daf,this[_0xaa8616(0x25a)]=_0x56de10;}}class _0x139b97 extends _0x43fc40{constructor(_0x461899,_0x3ccbaf){const _0x2d774d=_0x51c5;super('Cannot\x20set\x20enforce\x20schema\x20on\x20'+_0x461899+':\x20'+_0x3ccbaf['length']+_0x2d774d(0x173),_0x2d774d(0x424),{'type':_0x461899,'failures':_0x3ccbaf}),this['name']='OKDBSchemaCollectionError',this['type']=_0x461899,this[_0x2d774d(0x19e)]=_0x3ccbaf;}}class _0x13cdf6 extends _0x43fc40{constructor(_0xf058ef,_0x2629db,_0x3c9b40,_0x188019,_0x20f04a){const _0x1d273f=_0x51c5;super(_0x1d273f(0x625)+_0xf058ef+'@'+_0x2629db+'.'+_0x3c9b40+_0x1d273f(0x78f)+_0x188019+'@'+_0x20f04a+_0x1d273f(0x6d4),_0x1d273f(0x16c),{'sourceType':_0xf058ef,'sourceKey':_0x2629db,'fieldPath':_0x3c9b40,'targetType':_0x188019,'targetKey':_0x20f04a}),this[_0x1d273f(0x570)]=_0x1d273f(0x29a),this['sourceType']=_0xf058ef,this[_0x1d273f(0x31a)]=_0x2629db,this[_0x1d273f(0x125)]=_0x3c9b40,this[_0x1d273f(0x61f)]=_0x188019,this[_0x1d273f(0x121)]=_0x20f04a;}}class _0x30e065 extends _0x43fc40{constructor(_0x4363f2,_0x310c68,_0x22a8a4){const _0x4fdec5=_0x51c5;super('Cannot\x20delete\x20'+_0x4363f2+'@'+_0x310c68+':\x20'+_0x22a8a4[_0x4fdec5(0x275)]+_0x4fdec5(0x65a),'FOREIGN_KEY_DELETE_RESTRICTED',{'targetType':_0x4363f2,'targetKey':_0x310c68,'references':_0x22a8a4}),this['name']=_0x4fdec5(0x2b0),this[_0x4fdec5(0x61f)]=_0x4363f2,this['targetKey']=_0x310c68,this[_0x4fdec5(0x135)]=_0x22a8a4;}}class _0x296357 extends _0x43fc40{constructor(_0x4f121b,_0x100ecf,_0x4b6eff){const _0x50271c=_0x51c5;super(_0x50271c(0x526)+_0x100ecf+_0x50271c(0xea)+_0x4f121b+_0x50271c(0x6c9)+_0x4b6eff[_0x50271c(0x341)](_0x52b3ed=>_0x52b3ed['kind']+':'+_0x52b3ed[_0x50271c(0x570)])['join'](',\x20'),_0x50271c(0x7c8),{'type':_0x4f121b,'index':_0x100ecf,'usedBy':_0x4b6eff}),this['name']=_0x50271c(0x4bb);}}return okdbError={'OKDBError':_0x43fc40,'OKDBVersionMismatchError':_0x19e395,'OKDBNotFoundError':_0x1d656f,'OKDBAlreadyExistsError':_0xa9593f,'OKDBInvalidIndexKeyError':_0x1fa28d,'OKDBInvalidPrimaryKeyError':_0x16871a,'OKDBTypeNotRegisteredError':_0x2e4834,'OKDBTypeAlreadyRegisteredError':_0x2f616b,'OKDBIndexNotRegisteredError':_0x55cdc5,'OKDBIndexAlreadyRegisteredError':_0x200750,'OKDBInvalidValueError':_0x5406cf,'OKDBUniqueConstraintError':_0x32e8ff,'OKDBSchemaValidationError':_0x368a0c,'OKDBSchemaCollectionError':_0x139b97,'OKDBForeignKeyError':_0x13cdf6,'OKDBForeignKeyDeleteError':_0x30e065,'OKDBIndexHasConsumersError':_0x296357},okdbError;}var hasRequiredOkdbMigrate;function requireOkdbMigrate(){const _0x1864cf=_0x29bffd;if(hasRequiredOkdbMigrate)return okdbMigrate['exports'];hasRequiredOkdbMigrate=0x1;const _0x39c1e0=require$$0$1,_0x5d7267=require$$1,_0x187677=require$$2,{OKDBError:_0x5c11ae}=requireOkdbError(),_0x5dde76='header',_0x3cb337=_0x1864cf(0x3af),_0x50e368='schema',_0x5eb34c=_0x1864cf(0x343),_0x4ccaf9=_0x1864cf(0x6f3),_0x149d05=0x1f4,_0x4a2d8d=0x3e8,_0x328b42=_0x1864cf(0x170);async function _0x26bfa4(_0xb6325a,_0x50472f,_0x3077cf,_0x24c9b8){const _0x549726=_0x1864cf;if(_0xb6325a){await _0xb6325a[_0x549726(0x5f5)](_0x3077cf,Boolean(_0x24c9b8));return;}const _0x47dcb1=_0x187677['open'](_0x50472f,{'readOnly':!![],'maxDbs':0x8});try{await _0x47dcb1[_0x549726(0x5f5)](_0x3077cf,Boolean(_0x24c9b8));}finally{await _0x47dcb1[_0x549726(0x3fb)]();}}const _0x4b5385=()=>new Promise(_0x3942dc=>setImmediate(_0x3942dc));function _0x2881b2(_0x5723c1,_0x272996){const _0x1cd490=_0x1864cf;if(_0x5723c1[_0x1cd490(0x598)](_0x272996))return Promise['resolve']();return new Promise((_0x56a9b5,_0x254343)=>{const _0x1e3e64=_0x1cd490,_0x3884eb=_0x5c601d=>{const _0x30d50b=_0x51c5;_0x5723c1[_0x30d50b(0xe7)]?.(_0x30d50b(0x31b),_0x286696),_0x5723c1[_0x30d50b(0xe7)]?.('error',_0x32d267),_0x5723c1[_0x30d50b(0xe7)]?.(_0x30d50b(0x3fb),_0x4abb4a);if(_0x5c601d)_0x254343(_0x5c601d);else _0x56a9b5();},_0x286696=()=>_0x3884eb(),_0x32d267=_0x4e62d1=>_0x3884eb(_0x4e62d1),_0x4abb4a=()=>_0x3884eb(new Error(_0x1e3e64(0x160)));_0x5723c1[_0x1e3e64(0x17e)]('drain',_0x286696),_0x5723c1[_0x1e3e64(0x17e)](_0x1e3e64(0x131),_0x32d267),_0x5723c1['once']('close',_0x4abb4a);});}async function _0x5380ef(_0x4d63e0,_0x27a9b3,_0x24f588){const _0x1d4136=_0x1864cf;let _0x400319=0x0,_0x4c3166,_0x10f922=!![];for(;;){const _0x3474d9={'snapshot':!![],'limit':_0x4a2d8d};!_0x10f922&&(_0x3474d9['start']=_0x4c3166,_0x3474d9[_0x1d4136(0x3bb)]=!![]);_0x10f922=![];const _0x4aca83=Array[_0x1d4136(0x748)](_0x27a9b3[_0x1d4136(0x507)](_0x3474d9));if(_0x4aca83['length']===0x0)break;let _0x2dc567='';for(const _0x1591de of _0x4aca83)_0x2dc567+=_0x24f588(_0x1591de)+'\x0a';_0x4c3166=_0x4aca83[_0x4aca83[_0x1d4136(0x275)]-0x1][_0x1d4136(0x1d9)],_0x400319+=_0x4aca83[_0x1d4136(0x275)],await _0x2881b2(_0x4d63e0,_0x2dc567);if(_0x4aca83[_0x1d4136(0x275)]<_0x4a2d8d)break;await _0x4b5385();}return _0x400319;}class _0x3c22e4{constructor(_0x45b290){const _0x1cb6bc=_0x1864cf;this[_0x1cb6bc(0x554)]=_0x45b290;}[_0x1864cf(0x1ee)](_0x38e0e6=_0x1864cf(0x58f)){const _0x5f0ad9=_0x1864cf;return this[_0x5f0ad9(0x554)][_0x5f0ad9(0x3af)](_0x38e0e6);}async['_resolveOrCreateEnv'](_0x405c73=_0x1864cf(0x58f)){const _0x5460a8=_0x1864cf;return!this[_0x5460a8(0x554)][_0x5460a8(0x3ae)][_0x5460a8(0x7b1)](_0x405c73)&&await this[_0x5460a8(0x554)][_0x5460a8(0x2a7)](_0x405c73,{'sync':!![]}),this[_0x5460a8(0x554)][_0x5460a8(0x3af)](_0x405c73);}[_0x1864cf(0x165)](_0x34d70a,_0x494de9){const _0x306896=_0x1864cf,_0x5f38bb=[..._0x34d70a[_0x306896(0x442)][_0x306896(0x652)]()][_0x306896(0x78a)](_0x3ea31e=>!_0x3ea31e[_0x306896(0x74f)]('~')&&!_0x3ea31e[_0x306896(0x74f)]('__fts:'));if(!_0x494de9)return _0x5f38bb;return _0x5f38bb[_0x306896(0x78a)](_0x721d77=>_0x494de9[_0x306896(0x550)](_0x721d77));}[_0x1864cf(0x589)](_0x5a6fa0,_0x210b8a){const _0x186838=_0x1864cf,_0x4c722e=_0x5a6fa0[_0x186838(0x73d)][_0x186838(0x404)](_0x210b8a),_0x5055fc=_0x5a6fa0[_0x186838(0x442)]['get'](_0x210b8a)||{},_0xc77162=[];for(const [,_0x1b1e87]of _0x4c722e?.[_0x186838(0x3f4)]??new Map()){const _0xa24235={'fields':_0x1b1e87['parts']};if(_0x1b1e87[_0x186838(0x723)])_0xa24235[_0x186838(0x43c)]=_0x1b1e87[_0x186838(0x723)];if(_0x1b1e87[_0x186838(0x6cd)])_0xa24235['unique']=!![];_0xc77162['push'](_0xa24235);}const _0x4611a1={};for(const [_0x15b203,_0x16de83]of Object['entries'](_0x5055fc[_0x186838(0x1b8)]||{})){_0x4611a1[_0x15b203]={'fields':_0x16de83[_0x186838(0x4f0)]?.[_0x186838(0x434)],'tokenizer':_0x16de83[_0x186838(0x4f0)]?.[_0x186838(0x20e)]};}const _0xaed2be={'indexes':_0xc77162,'ftsIndexes':_0x4611a1};return _0x5055fc['schema']&&(_0xaed2be['schema']=_0x5055fc[_0x186838(0x1b3)]),_0xaed2be;}async[_0x1864cf(0x10f)](_0x538ecd,_0x3aeb02={}){const _0x2f2666=_0x1864cf,{envName:envName=_0x2f2666(0x58f),types:types=null,includeChanges:includeChanges=![],_noHeader:_noHeader=![]}=_0x3aeb02,_0x5596d7=this[_0x2f2666(0x1ee)](envName),_0x112578=this[_0x2f2666(0x165)](_0x5596d7,types);let _0x2fffa2=0x0,_0x30cfac=0x0;!_noHeader&&await _0x2881b2(_0x538ecd,JSON['stringify']({'r':_0x5dde76,'kdbVersion':require$$3[_0x2f2666(0x7be)],'exportedAt':Date[_0x2f2666(0x2f4)](),'envName':envName})+'\x0a');for(const _0x3c6a87 of _0x112578){const _0x250419=_0x5596d7[_0x2f2666(0x73d)]['get'](_0x3c6a87);if(!_0x250419)continue;const _0x2f63dc=this['_typeSchema'](_0x5596d7,_0x3c6a87);await _0x2881b2(_0x538ecd,JSON['stringify']({'r':_0x50e368,'type':_0x3c6a87,..._0x2f63dc})+'\x0a'),_0x2fffa2+=await _0x5380ef(_0x538ecd,_0x250419[_0x2f2666(0x343)],({key:_0x2d97fc,value:_0xe43e4d,version:_0x1d6a83})=>JSON[_0x2f2666(0x490)]({'r':_0x5eb34c,'t':_0x3c6a87,'k':_0x2d97fc,'v':_0xe43e4d,'ver':_0x1d6a83}));}return includeChanges&&_0x5596d7[_0x2f2666(0x276)]&&(_0x30cfac=await _0x5380ef(_0x538ecd,_0x5596d7[_0x2f2666(0xb0)],({key:_0x309d75,value:_0x760fe5})=>JSON[_0x2f2666(0x490)]({'r':_0x4ccaf9,'clock':_0x309d75,'event':_0x760fe5}))),{'types':_0x112578[_0x2f2666(0x275)],'records':_0x2fffa2,'changes':_0x30cfac};}async[_0x1864cf(0x40a)](_0x4cfe07,_0x669da5={}){const _0x383bb9=_0x1864cf;_0x39c1e0['mkdirSync'](_0x5d7267['dirname'](_0x4cfe07),{'recursive':!![]});const _0x4e8ea1=_0x39c1e0[_0x383bb9(0x6c3)](_0x4cfe07),_0x35caf8=await this[_0x383bb9(0x10f)](_0x4e8ea1,_0x669da5);return await new Promise((_0x37087d,_0x42cb29)=>{const _0x3ee175=_0x383bb9;_0x4e8ea1['end'](),_0x4e8ea1[_0x3ee175(0x17e)]('finish',_0x37087d),_0x4e8ea1[_0x3ee175(0x17e)](_0x3ee175(0x131),_0x42cb29);}),{..._0x35caf8,'filePath':_0x4cfe07};}async[_0x1864cf(0x3b8)](_0x213ab2,_0x2c97a4={}){const _0x42c96d=_0x1864cf,{envNames:envNames=null,types:types=null,includeChanges:includeChanges=![]}=_0x2c97a4,_0x45c31e=[...this[_0x42c96d(0x554)][_0x42c96d(0x3ae)][_0x42c96d(0x157)]()][_0x42c96d(0x78a)](_0x234acf=>!_0x234acf['startsWith']('~')),_0xce92a2=envNames?_0x45c31e[_0x42c96d(0x78a)](_0x4e7dc7=>envNames[_0x42c96d(0x550)](_0x4e7dc7)):_0x45c31e;await _0x2881b2(_0x213ab2,JSON[_0x42c96d(0x490)]({'r':_0x5dde76,'kdbVersion':require$$3[_0x42c96d(0x7be)],'exportedAt':Date[_0x42c96d(0x2f4)](),'envNames':_0xce92a2})+'\x0a');let _0x568dbb=0x0,_0x277099=0x0,_0x2fa100=0x0;for(const _0x247af6 of _0xce92a2){await _0x2881b2(_0x213ab2,JSON[_0x42c96d(0x490)]({'r':_0x3cb337,'name':_0x247af6})+'\x0a');const _0x153e71=await this['exportToStream'](_0x213ab2,{'envName':_0x247af6,'types':types,'includeChanges':includeChanges,'_noHeader':!![]});_0x568dbb+=_0x153e71[_0x42c96d(0x107)],_0x277099+=_0x153e71[_0x42c96d(0x5a7)],_0x2fa100+=_0x153e71[_0x42c96d(0x48e)];}return{'envs':_0xce92a2[_0x42c96d(0x275)],'types':_0x568dbb,'records':_0x277099,'changes':_0x2fa100};}async[_0x1864cf(0x14b)](_0x3f0dd4,_0x40984c={}){const _0x5089d2=_0x1864cf,{envName:_0x5492bc=null,types:_0x1f1020=null,dropExisting:dropExisting=![],batchSize:batchSize=_0x149d05,includeChanges:includeChanges=![],onProgress:onProgress=null}=_0x40984c;let _0xdf02a4=_0x5492bc??_0x5089d2(0x58f),_0x52e2be=null,_0x37ed68=0x0,_0x12eac2=0x0,_0x2f1e7b=0x0,_0xeef763=null,_0x5265ce=[];const _0x412887=[],_0x127900=async()=>{const _0x5a9bd5=_0x5089d2;if(!_0x5265ce[_0x5a9bd5(0x275)]||!_0xeef763||!_0x52e2be)return;await _0x52e2be[_0x5a9bd5(0x4ee)][_0x5a9bd5(0x700)](()=>{const _0x95d83e=_0x5a9bd5;for(const {k:_0x484910,v:_0x5c928e,ver:_0x1ac733}of _0x5265ce){_0x52e2be[_0x95d83e(0x1fc)](null,_0xeef763,_0x484910,_0x5c928e,{'version':_0x1ac733,'origin':'import'});}}),_0x12eac2+=_0x5265ce[_0x5a9bd5(0x275)],onProgress?.({'type':_0xeef763,'count':_0x12eac2}),_0x5265ce=[];};await this[_0x5089d2(0x5a6)](_0x3f0dd4,async _0x15347f=>{const _0x5727d7=_0x5089d2,_0x1d34ec=_0x15347f['r'];if(_0x1d34ec===_0x5dde76){if(!_0x5492bc&&_0x15347f[_0x5727d7(0x3f7)])_0xdf02a4=_0x15347f[_0x5727d7(0x3f7)];_0x52e2be=await this[_0x5727d7(0x61b)](_0xdf02a4);return;}if(!_0x52e2be)_0x52e2be=await this['_resolveOrCreateEnv'](_0xdf02a4);if(_0x1d34ec===_0x3cb337){await _0x127900(),_0xeef763=null,_0xdf02a4=_0x5492bc??_0x15347f[_0x5727d7(0x570)],_0x52e2be=await this[_0x5727d7(0x61b)](_0xdf02a4);return;}if(_0x1d34ec===_0x50e368){const {type:_0x109bbe,indexes:indexes=[],ftsIndexes:ftsIndexes={},schema:_0x1ed63f}=_0x15347f;if(_0x1f1020&&!_0x1f1020[_0x5727d7(0x550)](_0x109bbe))return;await _0x127900(),_0xeef763=_0x109bbe;dropExisting&&_0x52e2be[_0x5727d7(0x6c1)](_0x109bbe)&&await _0x52e2be[_0x5727d7(0x721)](_0x109bbe);!_0x52e2be[_0x5727d7(0x6c1)](_0x109bbe)&&(await _0x52e2be[_0x5727d7(0x18a)](_0x109bbe),_0x37ed68++);for(const _0x1924de of indexes){if(!_0x52e2be['hasIndex'](_0x109bbe,_0x1924de['fields'])){const _0x4d3db2={};_0x1924de['geo']&&(_0x4d3db2[_0x5727d7(0x4cc)]=_0x5727d7(0x43c),_0x4d3db2['precision']=_0x1924de['geo'][_0x5727d7(0x233)]);if(_0x1924de[_0x5727d7(0x6cd)])_0x4d3db2[_0x5727d7(0x6cd)]=!![];await _0x52e2be[_0x5727d7(0x425)](_0x109bbe,_0x1924de[_0x5727d7(0x434)],_0x4d3db2);}}for(const [_0x4b303e,_0x24f21b]of Object['entries'](ftsIndexes)){!this['okdb'][_0x5727d7(0xbb)][_0x5727d7(0x7b1)](_0x109bbe,_0x4b303e,_0x52e2be)&&await this[_0x5727d7(0x554)][_0x5727d7(0xbb)]['register'](_0x109bbe,_0x4b303e,{'fields':_0x24f21b[_0x5727d7(0x434)],'tokenizer':_0x24f21b[_0x5727d7(0x20e)]},undefined,_0x52e2be);}_0x1ed63f?.[_0x5727d7(0x186)]&&_0x412887[_0x5727d7(0x1c7)]({'env':_0x52e2be,'type':_0x109bbe,'schema':_0x1ed63f});return;}if(_0x1d34ec===_0x5eb34c){if(_0x1f1020&&!_0x1f1020[_0x5727d7(0x550)](_0x15347f['t']))return;_0x15347f['t']!==_0xeef763&&(await _0x127900(),_0xeef763=_0x15347f['t']);_0x5265ce[_0x5727d7(0x1c7)]({'k':_0x15347f['k'],'v':_0x15347f['v'],'ver':_0x15347f['ver']});if(_0x5265ce[_0x5727d7(0x275)]>=batchSize)await _0x127900();return;}_0x1d34ec===_0x4ccaf9&&includeChanges&&_0x52e2be[_0x5727d7(0x276)]&&(_0x52e2be['clockToChangeDb'][_0x5727d7(0x59e)](_0x15347f[_0x5727d7(0x235)],_0x15347f[_0x5727d7(0xad)]),_0x2f1e7b++);}),await _0x127900();for(const {env:_0x15e372,type:_0x3c1a0e,schema:_0x4d55d3}of _0x412887){try{await _0x15e372[_0x5089d2(0x303)](_0x3c1a0e,_0x4d55d3);}catch{if(_0x4d55d3[_0x5089d2(0x34e)])try{await _0x15e372[_0x5089d2(0x303)](_0x3c1a0e,{..._0x4d55d3,'enforce':![]});}catch{}}}return{'types':_0x37ed68,'records':_0x12eac2,'changes':_0x2f1e7b};}async[_0x1864cf(0x161)](_0x35d2b7,_0xa554c6={}){const _0x372c11=_0x1864cf,_0x8e024a=_0x39c1e0[_0x372c11(0x2d6)](_0x35d2b7,{'encoding':_0x372c11(0x253)});return this[_0x372c11(0x14b)](_0x8e024a,_0xa554c6);}['_readNDJSON'](_0x4352ca,_0x592ab4){return new Promise((_0x59925b,_0x438778)=>{const _0x5de7bb=_0x51c5;let _0x22b6fc='',_0x2104d2=Promise[_0x5de7bb(0x3c9)]();const _0x374abf=async _0x20973d=>{const _0x393e50=_0x5de7bb;_0x22b6fc+=_0x20973d;const _0xb2c26f=_0x22b6fc[_0x393e50(0x27b)]('\x0a');_0x22b6fc=_0xb2c26f[_0x393e50(0x188)]();for(const _0x23a202 of _0xb2c26f){const _0x27e062=_0x23a202[_0x393e50(0x1c1)]();if(!_0x27e062)continue;let _0x403d18;try{_0x403d18=JSON[_0x393e50(0x325)](_0x27e062);}catch{continue;}await _0x592ab4(_0x403d18);}};_0x4352ca['on']('data',_0x43e395=>{_0x2104d2=_0x2104d2['then'](()=>_0x374abf(String(_0x43e395)));}),_0x4352ca['on']('end',()=>{const _0x17bfe4=_0x5de7bb;_0x2104d2[_0x17bfe4(0x496)](async()=>{const _0x712497=_0x17bfe4,_0x1843a1=_0x22b6fc[_0x712497(0x1c1)]();if(_0x1843a1)try{await _0x592ab4(JSON[_0x712497(0x325)](_0x1843a1));}catch{}_0x59925b();})[_0x17bfe4(0x40d)](_0x438778);}),_0x4352ca['on'](_0x5de7bb(0x131),_0x438778);});}async[_0x1864cf(0x5f5)](_0x112284,_0x49166e={}){const _0x1b333a=_0x1864cf,{envNames:envNames=null,compact:compact=!![]}=_0x49166e,_0x572222=this['okdb'],_0x1bb986=_0x5d7267[_0x1b333a(0x3c9)](_0x572222[_0x1b333a(0x272)]),_0x15d5cc=_0x5d7267[_0x1b333a(0x3c9)](_0x112284),_0x4dbe7f=_0x5d7267[_0x1b333a(0x657)](_0x1bb986,_0x15d5cc);if(_0x4dbe7f===''||!(_0x4dbe7f[_0x1b333a(0x74f)]('..')||_0x5d7267[_0x1b333a(0x6f1)](_0x4dbe7f)))throw new _0x5c11ae('backup\x20destination\x20\x22'+_0x15d5cc+_0x1b333a(0xdf)+_0x1bb986+_0x1b333a(0xdd),_0x1b333a(0x32a));if(_0x39c1e0[_0x1b333a(0x12c)](_0x15d5cc)&&_0x39c1e0['readdirSync'](_0x15d5cc)[_0x1b333a(0x275)]>0x0)throw new _0x5c11ae(_0x1b333a(0x41a)+_0x15d5cc+'\x22\x20is\x20not\x20empty\x20—\x20backups\x20never\x20overwrite;\x20choose\x20a\x20new\x20directory',_0x1b333a(0x2f2));_0x39c1e0['mkdirSync'](_0x15d5cc,{'recursive':!![]});const _0xf8882c=envNames?new Set([...envNames,_0x1b333a(0x734)]):null,_0x40415f=[],_0x2b5839=[],_0x226707=[];for(const [_0x5918d1,_0x29d415]of[..._0x572222[_0x1b333a(0x3ae)]['entries']()]){if(_0xf8882c&&!_0xf8882c['has'](_0x5918d1))continue;if(_0x5918d1===_0x1b333a(0x3f0))continue;if(!_0x29d415['_isOpen']||!_0x29d415['db']){_0x2b5839[_0x1b333a(0x1c7)]({'name':_0x5918d1,'reason':_0x1b333a(0x6e9)});continue;}const _0x3e5ce9=_0x5d7267['resolve'](_0x29d415[_0x1b333a(0x272)]),_0x2bc28e=_0x5d7267[_0x1b333a(0x657)](_0x1bb986,_0x3e5ce9),_0x232b6e=_0x2bc28e===''||_0x2bc28e[_0x1b333a(0x74f)]('..')||_0x5d7267['isAbsolute'](_0x2bc28e),_0x5d8ed0=_0x232b6e?_0x572222[_0x1b333a(0x43e)](_0x5918d1):_0x2bc28e,_0x5a7076=_0x5d7267['join'](_0x15d5cc,_0x5d8ed0);_0x39c1e0[_0x1b333a(0x296)](_0x5a7076,{'recursive':!![]});const _0x2a6788=_0x5d7267['join'](_0x3e5ce9,'time-machine');let _0x330347=![];if(_0x39c1e0['existsSync'](_0x5d7267[_0x1b333a(0x4d3)](_0x2a6788,_0x1b333a(0x12f)))){const _0x3154ba=_0x5d7267[_0x1b333a(0x4d3)](_0x5a7076,_0x1b333a(0x1ba));_0x39c1e0[_0x1b333a(0x296)](_0x3154ba,{'recursive':!![]}),await _0x26bfa4(_0x29d415[_0x1b333a(0x3a4)]?.['_store']?.['db'],_0x2a6788,_0x3154ba,compact),_0x330347=!![];}let _0x4c05bb=0x0;try{_0x4c05bb=_0x39c1e0[_0x1b333a(0x722)](_0x5d7267[_0x1b333a(0x4d3)](_0x3e5ce9,_0x1b333a(0x12f)))[_0x1b333a(0x187)];}catch{}await _0x29d415['db']['backup'](_0x5a7076,Boolean(compact));let _0x56621b=0x0;try{_0x56621b=_0x39c1e0[_0x1b333a(0x722)](_0x5d7267[_0x1b333a(0x4d3)](_0x5a7076,'data.mdb'))[_0x1b333a(0x187)];}catch{}_0x40415f['push']({'name':_0x5918d1,'dest':_0x5a7076,'sizeBefore':_0x4c05bb,'sizeAfter':_0x56621b,'timeMachine':_0x330347}),_0x226707[_0x1b333a(0x1c7)]({'name':_0x5918d1,'dir':_0x5d8ed0,'timeMachine':_0x330347,..._0x232b6e?{'outOfTree':_0x232b6e,'sourcePath':_0x3e5ce9}:{}});}for(const [_0x3c0041,_0x27eb63]of _0x572222[_0x1b333a(0x243)]??[]){if(_0xf8882c&&!_0xf8882c['has'](_0x3c0041))continue;_0x2b5839[_0x1b333a(0x1c7)]({'name':_0x3c0041,'reason':'quarantined:\x20'+(_0x27eb63?.[_0x1b333a(0x131)]??_0x1b333a(0xcf))});}const _0xb23bd3={'count':0x0,'bytes':0x0},_0x57cbc6=_0x572222[_0x1b333a(0x60e)]?.[_0x1b333a(0x621)];_0x57cbc6&&_0x39c1e0['existsSync'](_0x57cbc6)&&await this[_0x1b333a(0x68d)](_0x57cbc6,_0x5d7267[_0x1b333a(0x4d3)](_0x15d5cc,_0x1b333a(0x2df)),_0xb23bd3,(_0x5c4fa5,_0x44c12)=>_0x44c12===0x0&&_0x5c4fa5==='tmp');const _0xea14a8=_0x5d7267[_0x1b333a(0x4d3)](_0x15d5cc,_0x328b42),_0x4b6e02={'format':0x1,'okdbVersion':require$$3[_0x1b333a(0x7be)],'createdAt':new Date()[_0x1b333a(0x5ab)](),'source':_0x1bb986,'compact':Boolean(compact),'envs':_0x226707,'blobs':_0xb23bd3,'skipped':_0x2b5839,'excluded':{'~fts':_0x1b333a(0x377),'~processes':_0x1b333a(0x237)}};return _0x39c1e0['writeFileSync'](_0xea14a8,JSON[_0x1b333a(0x490)](_0x4b6e02,null,0x2)+'\x0a'),{'ok':!![],'dest':_0x15d5cc,'envs':_0x40415f,'blobs':_0xb23bd3,'skipped':_0x2b5839,'manifest':_0xea14a8};}[_0x1864cf(0x577)](){const _0xe0a14d=_0x1864cf,_0x3755c3=this[_0xe0a14d(0x554)][_0xe0a14d(0x73b)]?.[_0xe0a14d(0x5f5)]?.[_0xe0a14d(0x15c)];if(_0x3755c3)return _0x5d7267['resolve'](_0x3755c3);const _0x38c380=_0x5d7267[_0xe0a14d(0x3c9)](this[_0xe0a14d(0x554)]['path']);return _0x5d7267[_0xe0a14d(0x4d3)](_0x5d7267[_0xe0a14d(0x6ea)](_0x38c380),_0x5d7267[_0xe0a14d(0x793)](_0x38c380)+_0xe0a14d(0x2c7));}[_0x1864cf(0x6b1)](_0x3f48f4){const _0x46a461=_0x1864cf,_0x2728b7=this['backupRoot']();_0x39c1e0['mkdirSync'](_0x2728b7,{'recursive':!![]});const _0x6d18e4=_0x39c1e0[_0x46a461(0x2cb)](_0x2728b7),_0x291052=_0x3f48f4==null||String(_0x3f48f4)[_0x46a461(0x1c1)]()===''?_0x46a461(0x6e2)+new Date()['toISOString']()[_0x46a461(0x552)](/[:.]/g,'-'):String(_0x3f48f4)[_0x46a461(0x1c1)](),_0xa0872b=_0x5d7267['resolve'](_0x2728b7,_0x291052);let _0x11e17f=_0xa0872b;const _0x47c7be=[];while(!_0x39c1e0[_0x46a461(0x12c)](_0x11e17f)){_0x47c7be[_0x46a461(0x6ca)](_0x5d7267[_0x46a461(0x793)](_0x11e17f));const _0x1d360a=_0x5d7267[_0x46a461(0x6ea)](_0x11e17f);if(_0x1d360a===_0x11e17f)break;_0x11e17f=_0x1d360a;}const _0x5526a7=_0x5d7267[_0x46a461(0x4d3)](_0x39c1e0[_0x46a461(0x2cb)](_0x11e17f),..._0x47c7be),_0x3df955=_0x5d7267[_0x46a461(0x657)](_0x6d18e4,_0x5526a7);if(_0x3df955===''||_0x3df955[_0x46a461(0x74f)]('..')||_0x5d7267[_0x46a461(0x6f1)](_0x3df955))throw new _0x5c11ae('backup\x20destination\x20\x22'+_0x291052+_0x46a461(0x647)+_0x2728b7+_0x46a461(0x5db),_0x46a461(0x74e),{'root':_0x2728b7,'destDir':_0x291052});return{'root':_0x2728b7,'dest':_0x5526a7};}async[_0x1864cf(0x68d)](_0xfcd301,_0x24ddc1,_0x434e45={'count':0x0,'bytes':0x0},_0x577065=null,_0xc12ed=0x0){const _0x24a67c=_0x1864cf;_0x39c1e0[_0x24a67c(0x296)](_0x24ddc1,{'recursive':!![]});for(const _0x482f24 of _0x39c1e0[_0x24a67c(0x732)](_0xfcd301,{'withFileTypes':!![]})){if(_0x577065?.(_0x482f24[_0x24a67c(0x570)],_0xc12ed))continue;const _0x46619a=_0x5d7267['join'](_0xfcd301,_0x482f24[_0x24a67c(0x570)]),_0x3b1923=_0x5d7267[_0x24a67c(0x4d3)](_0x24ddc1,_0x482f24[_0x24a67c(0x570)]);if(_0x482f24['isDirectory']())await this[_0x24a67c(0x68d)](_0x46619a,_0x3b1923,_0x434e45,_0x577065,_0xc12ed+0x1);else{try{await _0x39c1e0['promises']['copyFile'](_0x46619a,_0x3b1923);}catch(_0x15a33e){if(_0x15a33e?.[_0x24a67c(0x737)]===_0x24a67c(0x596))continue;throw _0x15a33e;}_0x434e45[_0x24a67c(0x6a4)]++;try{_0x434e45['bytes']+=_0x39c1e0['statSync'](_0x3b1923)[_0x24a67c(0x187)];}catch{}}}return _0x434e45;}async[_0x1864cf(0x234)](_0xfbef9={}){const _0x2762d9=_0x1864cf,{envName:envName=_0x2762d9(0x58f),types:types=null,includeChanges:includeChanges=![]}=_0xfbef9,_0x3dbe16={'types':{},'changes':[]},_0x4f269a=[],_0x1066fe=new require$$5[(_0x2762d9(0x50f))]({'write'(_0x4a5ec3,_0xcd9994,_0x3b14b4){_0x4f269a['push'](String(_0x4a5ec3)),_0x3b14b4();}});await this[_0x2762d9(0x10f)](_0x1066fe,{'envName':envName,'types':types,'includeChanges':includeChanges});for(const _0x1ce045 of _0x4f269a[_0x2762d9(0x4d3)]('')['split']('\x0a')){const _0x4c4eaf=_0x1ce045[_0x2762d9(0x1c1)]();if(!_0x4c4eaf)continue;let _0x5b2d23;try{_0x5b2d23=JSON[_0x2762d9(0x325)](_0x4c4eaf);}catch{continue;}if(_0x5b2d23['r']===_0x50e368){if(!_0x3dbe16[_0x2762d9(0x107)][_0x5b2d23[_0x2762d9(0x4cc)]])_0x3dbe16['types'][_0x5b2d23['type']]={'entries':[]};if(_0x5b2d23[_0x2762d9(0x5fc)])_0x3dbe16[_0x2762d9(0x107)][_0x5b2d23['type']][_0x2762d9(0x5fc)]=_0x5b2d23[_0x2762d9(0x5fc)];if(_0x5b2d23[_0x2762d9(0x1b8)])_0x3dbe16[_0x2762d9(0x107)][_0x5b2d23[_0x2762d9(0x4cc)]]['ftsIndexes']=_0x5b2d23[_0x2762d9(0x1b8)];if(_0x5b2d23['schema'])_0x3dbe16[_0x2762d9(0x107)][_0x5b2d23[_0x2762d9(0x4cc)]]['schema']=_0x5b2d23[_0x2762d9(0x1b3)];}else{if(_0x5b2d23['r']===_0x5eb34c){if(!_0x3dbe16[_0x2762d9(0x107)][_0x5b2d23['t']])_0x3dbe16['types'][_0x5b2d23['t']]={'entries':[]};_0x3dbe16[_0x2762d9(0x107)][_0x5b2d23['t']][_0x2762d9(0x597)][_0x2762d9(0x1c7)]({'key':_0x5b2d23['k'],'value':_0x5b2d23['v'],'version':_0x5b2d23[_0x2762d9(0x370)]});}else _0x5b2d23['r']===_0x4ccaf9&&_0x3dbe16[_0x2762d9(0x48e)][_0x2762d9(0x1c7)]({'clock':_0x5b2d23[_0x2762d9(0x235)],'event':_0x5b2d23[_0x2762d9(0xad)]});}}return _0x3dbe16;}async[_0x1864cf(0x55b)](_0x494bfb,_0x450269={}){const _0x4c3906=_0x1864cf,_0x1e7a1c=[];for(const [_0x270ee5,_0x54b9ac]of Object[_0x4c3906(0x597)](_0x494bfb[_0x4c3906(0x107)]||{})){const _0x1f2161={'r':_0x50e368,'type':_0x270ee5,'indexes':_0x54b9ac[_0x4c3906(0x5fc)]||[],'ftsIndexes':_0x54b9ac[_0x4c3906(0x1b8)]||{}};if(_0x54b9ac['schema'])_0x1f2161[_0x4c3906(0x1b3)]=_0x54b9ac['schema'];_0x1e7a1c[_0x4c3906(0x1c7)](JSON[_0x4c3906(0x490)](_0x1f2161));for(const {key:_0xe87941,value:_0x189642,version:_0x444e62}of _0x54b9ac[_0x4c3906(0x597)]||[]){_0x1e7a1c[_0x4c3906(0x1c7)](JSON[_0x4c3906(0x490)]({'r':_0x5eb34c,'t':_0x270ee5,'k':_0xe87941,'v':_0x189642,'ver':_0x444e62}));}}for(const {clock:_0x1cbe9e,event:_0x3cb782}of _0x494bfb[_0x4c3906(0x48e)]||[]){_0x1e7a1c['push'](JSON[_0x4c3906(0x490)]({'r':_0x4ccaf9,'clock':_0x1cbe9e,'event':_0x3cb782}));}const {Readable:_0x11707b}=require$$5,_0x55b214=_0x11707b[_0x4c3906(0x748)](_0x1e7a1c['join']('\x0a')+'\x0a');return this[_0x4c3906(0x14b)](_0x55b214,{..._0x450269,'dropExisting':_0x450269[_0x4c3906(0xb1)]??!![]});}async['exportJSON']({pretty:pretty=![]}={}){const _0x42e266=_0x1864cf,_0x5db3bb=await this[_0x42e266(0x234)]();return JSON[_0x42e266(0x490)](_0x5db3bb,null,pretty?0x2:0x0);}async['importJSON'](_0x19b345){const _0x4ba9d4=_0x1864cf,_0x3c9401=JSON[_0x4ba9d4(0x325)](_0x19b345);return this[_0x4ba9d4(0x55b)](_0x3c9401);}async[_0x1864cf(0x651)](_0x38430d){const _0x5dfdef=_0x1864cf;if(!this['okdb'][_0x5dfdef(0x60e)])throw new Error(_0x5dfdef(0x42e));const _0x502b1d=this['okdb'][_0x5dfdef(0x60e)][_0x5dfdef(0x621)];let _0x4b2459=0x0,_0x3f963a=0x0;const _0xe8e681=_0x4b5bf9=>{const _0x1deadb=_0x5dfdef;if(!_0x39c1e0[_0x1deadb(0x12c)](_0x4b5bf9))return;for(const _0x28be15 of _0x39c1e0[_0x1deadb(0x732)](_0x4b5bf9,{'withFileTypes':!![]})){const _0xb390f5=_0x5d7267['join'](_0x4b5bf9,_0x28be15[_0x1deadb(0x570)]);if(_0x28be15['isDirectory']()){if(_0x28be15['name']===_0x1deadb(0x203))continue;_0xe8e681(_0xb390f5);}else{const _0x21f84a=_0x5d7267['basename'](_0x5d7267[_0x1deadb(0x6ea)](_0xb390f5)),_0x38f891=_0x21f84a+_0x28be15[_0x1deadb(0x570)],_0x33109b=_0x5d7267['join'](_0x38430d,_0x38f891['slice'](0x0,0x2)),_0x3caae1=_0x5d7267[_0x1deadb(0x4d3)](_0x33109b,_0x38f891['slice'](0x2));_0x39c1e0[_0x1deadb(0x296)](_0x33109b,{'recursive':!![]}),_0x39c1e0[_0x1deadb(0x2ea)](_0xb390f5,_0x3caae1),_0x4b2459++;try{_0x3f963a+=_0x39c1e0[_0x1deadb(0x722)](_0xb390f5)[_0x1deadb(0x187)];}catch{}}}};return _0x39c1e0[_0x5dfdef(0x296)](_0x38430d,{'recursive':!![]}),_0xe8e681(_0x502b1d),{'count':_0x4b2459,'bytes':_0x3f963a};}async[_0x1864cf(0x2f3)](_0x597ea7){const _0x165761=_0x1864cf;if(!this['okdb'][_0x165761(0x60e)])throw new Error(_0x165761(0x42e));await this[_0x165761(0x554)][_0x165761(0x60e)][_0x165761(0x5ff)]();let _0x348530=0x0,_0x198163=0x0;const _0x513381=_0x243bf8=>{const _0x17e394=_0x165761;if(!_0x39c1e0[_0x17e394(0x12c)](_0x243bf8))return;for(const _0x4b6163 of _0x39c1e0[_0x17e394(0x732)](_0x243bf8,{'withFileTypes':!![]})){const _0x113ddc=_0x5d7267['join'](_0x243bf8,_0x4b6163['name']);if(_0x4b6163['isDirectory']())_0x513381(_0x113ddc);else{const _0x170746=_0x5d7267['basename'](_0x5d7267['dirname'](_0x113ddc)),_0x26583c=_0x170746+_0x4b6163[_0x17e394(0x570)],_0x347fb0=this[_0x17e394(0x554)]['files'][_0x17e394(0x5b6)](_0x26583c);if(_0x39c1e0[_0x17e394(0x12c)](_0x347fb0)){_0x198163++;continue;}const _0x579866=_0x5d7267[_0x17e394(0x6ea)](_0x347fb0);_0x39c1e0[_0x17e394(0x296)](_0x579866,{'recursive':!![]}),_0x39c1e0[_0x17e394(0x2ea)](_0x113ddc,_0x347fb0);const _0x5b1cef=this[_0x17e394(0x554)]['files'][_0x17e394(0x5e3)](_0x26583c);this['okdb']['files'][_0x17e394(0x3e4)]?.[_0x17e394(0x59e)](_0x26583c,{'refs':_0x5b1cef}),_0x348530++;}}};return _0x513381(_0x597ea7),{'imported':_0x348530,'skipped':_0x198163};}[_0x1864cf(0x2b9)](){const _0x504e40=_0x1864cf,_0x1001c7=[];for(const [,_0x2bc45a]of this[_0x504e40(0x554)][_0x504e40(0x3ae)]){if(_0x2bc45a[_0x504e40(0x276)]&&_0x2bc45a[_0x504e40(0x6c1)]('~files'))_0x1001c7[_0x504e40(0x1c7)](_0x2bc45a);}return _0x1001c7;}async[_0x1864cf(0x5dd)](){const _0x3b5cf5=_0x1864cf;if(!this[_0x3b5cf5(0x554)][_0x3b5cf5(0x60e)])throw new Error(_0x3b5cf5(0x42e));await this[_0x3b5cf5(0x554)][_0x3b5cf5(0x60e)][_0x3b5cf5(0x5ff)]();const _0x30c4a9=[],_0x388d07=this[_0x3b5cf5(0x554)][_0x3b5cf5(0x60e)];for(const _0x6bff1e of this['_allEnvsWithFiles']()){for(const {key:_0x70aa9a,value:_0x5104ef}of _0x6bff1e[_0x3b5cf5(0x507)](_0x3b5cf5(0x1ef))){if(!_0x5104ef['hash'])continue;const _0x458d3f=_0x388d07[_0x3b5cf5(0x5b6)](_0x5104ef[_0x3b5cf5(0x10a)]);!_0x39c1e0[_0x3b5cf5(0x12c)](_0x458d3f)&&_0x30c4a9['push']({'type':'missing_blob','env':_0x6bff1e[_0x3b5cf5(0x570)],'id':String(_0x70aa9a),'hash':_0x5104ef[_0x3b5cf5(0x10a)],'message':_0x3b5cf5(0x2e6)+_0x70aa9a+_0x3b5cf5(0x435)+_0x6bff1e[_0x3b5cf5(0x570)]+_0x3b5cf5(0x482)+_0x5104ef[_0x3b5cf5(0x10a)]['slice'](0x0,0x8)+'…)'});const _0x2bf35b=_0x388d07['_blobStatusDb']?.['get'](_0x5104ef[_0x3b5cf5(0x10a)]);(!_0x2bf35b||_0x2bf35b[_0x3b5cf5(0x6d5)]<=0x0)&&_0x30c4a9[_0x3b5cf5(0x1c7)]({'type':'zero_refs','env':_0x6bff1e[_0x3b5cf5(0x570)],'id':String(_0x70aa9a),'hash':_0x5104ef['hash'],'message':'Blob\x20ref-count\x20is\x20zero\x20for\x20~files\x20record\x20\x22'+_0x70aa9a+_0x3b5cf5(0x435)+_0x6bff1e[_0x3b5cf5(0x570)]+'\x22\x20(hash:\x20'+_0x5104ef['hash']['slice'](0x0,0x8)+'…)'});}}const _0x1907b6=new Set();for(const _0x5294e2 of this[_0x3b5cf5(0x2b9)]()){for(const {value:_0x12a08d}of _0x5294e2['getRange'](_0x3b5cf5(0x1ef))){if(_0x12a08d[_0x3b5cf5(0x10a)])_0x1907b6[_0x3b5cf5(0x32c)](_0x12a08d[_0x3b5cf5(0x10a)]);}}const _0xf596fc=_0x2350f2=>{const _0x42f103=_0x3b5cf5;if(!_0x39c1e0[_0x42f103(0x12c)](_0x2350f2))return;for(const _0x527301 of _0x39c1e0[_0x42f103(0x732)](_0x2350f2,{'withFileTypes':!![]})){const _0x4b7e7d=_0x5d7267[_0x42f103(0x4d3)](_0x2350f2,_0x527301[_0x42f103(0x570)]);if(_0x527301['isDirectory']()){if(_0x527301['name']===_0x42f103(0x203))continue;_0xf596fc(_0x4b7e7d);}else{const _0x32e33f=_0x5d7267[_0x42f103(0x793)](_0x5d7267[_0x42f103(0x6ea)](_0x4b7e7d)),_0x46936e=_0x32e33f+_0x527301[_0x42f103(0x570)];!_0x1907b6['has'](_0x46936e)&&_0x30c4a9[_0x42f103(0x1c7)]({'type':_0x42f103(0x1fe),'hash':_0x46936e,'message':_0x42f103(0xde)+_0x46936e[_0x42f103(0x3a9)](0x0,0x8)+'…)'});}}};return _0xf596fc(_0x388d07[_0x3b5cf5(0x621)]),_0x30c4a9;}async[_0x1864cf(0x1d4)](){const _0x3001ba=_0x1864cf;if(!this[_0x3001ba(0x554)][_0x3001ba(0x60e)])throw new Error('files\x20feature\x20not\x20available');await this[_0x3001ba(0x554)]['files'][_0x3001ba(0x5ff)]();const _0x234159=this[_0x3001ba(0x554)][_0x3001ba(0x60e)]['_blobStatusDb'];if(!_0x234159)throw new Error(_0x3001ba(0x270));const _0x2ebedb=[];for(const {key:_0x572f99}of _0x234159['getRange']())_0x2ebedb[_0x3001ba(0x1c7)](_0x572f99);for(const _0x159adc of _0x2ebedb)_0x234159[_0x3001ba(0x576)](_0x159adc);const _0x3ed4a5=new Map();for(const _0x532482 of this[_0x3001ba(0x2b9)]()){for(const {value:_0x2c010b}of _0x532482[_0x3001ba(0x507)]('~files')){_0x2c010b[_0x3001ba(0x10a)]&&_0x3ed4a5[_0x3001ba(0x271)](_0x2c010b[_0x3001ba(0x10a)],(_0x3ed4a5['get'](_0x2c010b['hash'])??0x0)+0x1);}}for(const [_0x2e84e8,_0x55860d]of _0x3ed4a5){_0x234159[_0x3001ba(0x59e)](_0x2e84e8,{'refs':_0x55860d});}return{'rebuilt':_0x3ed4a5[_0x3001ba(0x187)]};}}return okdbMigrate['exports']=_0x3c22e4,okdbMigrate[_0x1864cf(0x2fb)][_0x1864cf(0x6e8)]=_0x328b42,okdbMigrate[_0x1864cf(0x2fb)];}var okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x14b87f=require$$2$1;function _0x27efbb(_0x521422,_0x5cb6d6){const _0xbc1f43=_0x51c5;return _0x14b87f[_0xbc1f43(0x351)](_0xbc1f43(0x3c0),_0x5cb6d6)['update'](_0x521422)[_0xbc1f43(0x4e6)]('base64url');}function _0x474016(_0x3a81f4,_0x491124){const _0xf3876c=_0x51c5;if(typeof _0x3a81f4!==_0xf3876c(0x5c5)||typeof _0x491124!==_0xf3876c(0x5c5))return![];if(Buffer['byteLength'](_0x3a81f4)!==Buffer[_0xf3876c(0x7a0)](_0x491124))return![];return _0x14b87f[_0xf3876c(0x23e)](Buffer['from'](_0x3a81f4),Buffer[_0xf3876c(0x748)](_0x491124));}function _0x88916f(_0x469dde){const _0xebc9f6=_0x51c5;if(!_0x469dde?.[_0xebc9f6(0x74f)](_0xebc9f6(0x440)))return null;return _0x469dde[_0xebc9f6(0x3a9)](0x7);}function _0x4d8ef9(_0xc47e65=0x20){const _0x527290=_0x51c5;return _0x14b87f[_0x527290(0x2b2)](_0xc47e65)[_0x527290(0x6fe)]('base64url');}function _0x27bcef(_0x4701f0){const _0x5f30b7=_0x51c5;return _0x14b87f[_0x5f30b7(0xcb)](_0x5f30b7(0x3c0))[_0x5f30b7(0x7bb)](_0x4701f0)[_0x5f30b7(0x4e6)]('hex');}function _0x3e2a4(_0x45fb99,_0x35951e,_0x4da161=0x36ee80){const _0x4bf26f=_0x51c5;if(!_0x35951e)throw new Error(_0x4bf26f(0x23a));const _0x5d8094=Date[_0x4bf26f(0x2f4)](),_0x29af48=Buffer[_0x4bf26f(0x748)](JSON['stringify']({'iat':_0x5d8094,'exp':_0x5d8094+_0x4da161,'sub':_0x45fb99?.['id']??_0x45fb99?.[_0x4bf26f(0x751)]??null,'username':_0x45fb99?.['username']??_0x45fb99?.[_0x4bf26f(0x570)]??null,'roles':Array[_0x4bf26f(0x321)](_0x45fb99?.[_0x4bf26f(0x55a)])?_0x45fb99[_0x4bf26f(0x55a)]:[]}))[_0x4bf26f(0x6fe)](_0x4bf26f(0x662)),_0x310d7c=_0x27efbb(_0x29af48,_0x35951e);return _0x29af48+'.'+_0x310d7c;}function _0xdb3d28(_0x2624a3,_0x2a00fa){const _0x3d974e=_0x51c5;if(!_0x2a00fa||typeof _0x2624a3!=='string')return null;const [_0x4f3598,_0x1bf836]=_0x2624a3[_0x3d974e(0x27b)]('.');if(!_0x4f3598||!_0x1bf836)return null;const _0x3986f7=_0x27efbb(_0x4f3598,_0x2a00fa);if(!_0x474016(_0x1bf836,_0x3986f7))return null;try{const _0x67eac0=JSON[_0x3d974e(0x325)](Buffer[_0x3d974e(0x748)](_0x4f3598,'base64url')['toString']()),_0x17a371=0x7530;if(Date[_0x3d974e(0x2f4)]()>Number(_0x67eac0?.[_0x3d974e(0x50a)]??0x0)+_0x17a371)return null;return _0x67eac0;}catch{return null;}}async function _0x3dcd8c(_0x5a67fb){return new Promise((_0x32443b,_0x4baf71)=>{const _0x1781ca=_0x51c5,_0x4ca1bc=_0x14b87f['randomBytes'](0x10);_0x14b87f[_0x1781ca(0x3b4)](_0x5a67fb,_0x4ca1bc,0x40,(_0x53be3b,_0x58b3bc)=>{const _0x46a54c=_0x1781ca;if(_0x53be3b)return _0x4baf71(_0x53be3b);_0x32443b(_0x4ca1bc[_0x46a54c(0x6fe)](_0x46a54c(0x6db))+':'+_0x58b3bc[_0x46a54c(0x6fe)](_0x46a54c(0x6db)));});});}async function _0x5eb011(_0xbdc30c,_0x4cee5b){const _0x3face4=_0x51c5;if(typeof _0x4cee5b!==_0x3face4(0x5c5))return![];const [_0x42196e,_0x2416ff]=_0x4cee5b[_0x3face4(0x27b)](':');if(!_0x42196e||!_0x2416ff)return![];const _0x269f68=Buffer[_0x3face4(0x748)](_0x42196e,_0x3face4(0x6db)),_0x454188=Buffer['from'](_0x2416ff,'hex');if(_0x454188[_0x3face4(0x275)]!==0x40)return![];return new Promise((_0x55b21a,_0x5d0793)=>{const _0x5ac0a8=_0x3face4;_0x14b87f[_0x5ac0a8(0x3b4)](_0xbdc30c,_0x269f68,0x40,(_0x237e5c,_0x433fe0)=>{const _0x1139ea=_0x5ac0a8;if(_0x237e5c)return _0x5d0793(_0x237e5c);_0x55b21a(_0x14b87f[_0x1139ea(0x23e)](_0x433fe0,_0x454188));});});}return okdbAuthTokens={'hmac':_0x27efbb,'timingSafeEqual':_0x474016,'parseBearer':_0x88916f,'randomToken':_0x4d8ef9,'hashToken':_0x27bcef,'issueToken':_0x3e2a4,'authenticateToken':_0xdb3d28,'hashPassword':_0x3dcd8c,'verifyPassword':_0x5eb011},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x1299f4=_0x29bffd;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x1f5e8a=require$$0$2,_0x158c47=_0x1299f4(0x3a6),_0x1d694b=new Uint8Array(0x100)[_0x1299f4(0x316)](0xff);for(let _0x5092d7=0x0;_0x5092d7<_0x158c47[_0x1299f4(0x275)];_0x5092d7++){_0x1d694b[_0x158c47[_0x1299f4(0x6f7)](_0x5092d7)]=_0x5092d7,_0x1d694b[_0x158c47['charCodeAt'](_0x5092d7)+0x20]=_0x5092d7;}_0x1d694b['O'[_0x1299f4(0x6f7)](0x0)]=0x0,_0x1d694b['o'[_0x1299f4(0x6f7)](0x0)]=0x0,_0x1d694b['I'[_0x1299f4(0x6f7)](0x0)]=0x1,_0x1d694b['i'[_0x1299f4(0x6f7)](0x0)]=0x1,_0x1d694b['L'[_0x1299f4(0x6f7)](0x0)]=0x1,_0x1d694b['l'[_0x1299f4(0x6f7)](0x0)]=0x1;function _0x4316dd(_0x3977ad){let _0x5f145e=0x0,_0x5ba956=0x0,_0x299c89='';for(let _0x22433c=0x0;_0x22433c<_0x3977ad['length'];_0x22433c++){_0x5ba956=_0x5ba956<<0x8|_0x3977ad[_0x22433c],_0x5f145e+=0x8;while(_0x5f145e>=0x5){_0x5f145e-=0x5,_0x299c89+=_0x158c47[_0x5ba956>>>_0x5f145e&0x1f];}}return _0x5f145e>0x0&&(_0x299c89+=_0x158c47[_0x5ba956<<0x5-_0x5f145e&0x1f]),_0x299c89;}function _0x20b00d(_0x7e0ea0){const _0xf06271=_0x1299f4;_0x7e0ea0=_0x7e0ea0[_0xf06271(0x552)](/-/g,'')[_0xf06271(0x623)]();let _0x4d32e0=0x0,_0x453a87=0x0;const _0xc2fb93=[];for(let _0x1cc658=0x0;_0x1cc658<_0x7e0ea0[_0xf06271(0x275)];_0x1cc658++){const _0x511107=_0x1d694b[_0x7e0ea0[_0xf06271(0x6f7)](_0x1cc658)];if(_0x511107===0xff)continue;_0x453a87=_0x453a87<<0x5|_0x511107,_0x4d32e0+=0x5,_0x4d32e0>=0x8&&(_0x4d32e0-=0x8,_0xc2fb93[_0xf06271(0x1c7)](_0x453a87>>>_0x4d32e0&0xff));}return Buffer[_0xf06271(0x748)](_0xc2fb93);}const _0x5e4d8a=['sync',_0x1299f4(0x6ba),_0x1299f4(0x1c5),_0x1299f4(0xbb),_0x1299f4(0x3a4),_0x1299f4(0x585),_0x1299f4(0x6e0),_0x1299f4(0x60e)],_0x2cd9f1=0x0,_0x418418=0x1,_0x2107b0=0x2,_0x55ffd8=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x294c5d({issuedAt:_0x213d2a,expiresAt:_0x1a8e1c,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x2cd9f1}){const _0x559190=_0x1299f4,_0x57ee21=Buffer[_0x559190(0x748)](licensee,_0x559190(0x253))[_0x559190(0x3a9)](0x0,0x40),_0x2820dc=0x1+0x1+0x4+0x4+0x1+_0x57ee21[_0x559190(0x275)]+0x2+0x10,_0x432bee=Buffer['allocUnsafe'](_0x2820dc);let _0x2ddc8b=0x0;_0x432bee[_0x559190(0x54b)](0x1,_0x2ddc8b++),_0x432bee[_0x559190(0x54b)](licenseType,_0x2ddc8b++),_0x432bee['writeUInt32BE'](Math[_0x559190(0x698)](_0x213d2a/0x3e8),_0x2ddc8b),_0x2ddc8b+=0x4,_0x432bee[_0x559190(0x2ce)](Math[_0x559190(0x698)](_0x1a8e1c/0x3e8),_0x2ddc8b),_0x2ddc8b+=0x4,_0x432bee[_0x559190(0x54b)](_0x57ee21[_0x559190(0x275)],_0x2ddc8b++),_0x57ee21[_0x559190(0xf1)](_0x432bee,_0x2ddc8b),_0x2ddc8b+=_0x57ee21[_0x559190(0x275)];let _0x40ddf4=0x0;for(let _0x474098=0x0;_0x474098<_0x5e4d8a[_0x559190(0x275)];_0x474098++){if(features[_0x5e4d8a[_0x474098]])_0x40ddf4|=0x1<<_0x474098;}_0x432bee[_0x559190(0x453)](_0x40ddf4,_0x2ddc8b),_0x2ddc8b+=0x2;const _0x57dd15=[_0x559190(0x51a),'typesPerEnv','syncPeers','maxWrites'];for(const _0x49805f of _0x57dd15){_0x432bee[_0x559190(0x2ce)](limits[_0x49805f]||0x0,_0x2ddc8b),_0x2ddc8b+=0x4;}return _0x432bee;}function _0x261ec1(_0x3526a1){const _0x3d2d22=_0x1299f4;let _0x47a522=0x0;const _0x408782=_0x3526a1['readUInt8'](_0x47a522++),_0x518a33=_0x3526a1[_0x3d2d22(0x75f)](_0x47a522++),_0x15a849=_0x3526a1[_0x3d2d22(0x738)](_0x47a522);_0x47a522+=0x4;const _0x4662e6=_0x3526a1['readUInt32BE'](_0x47a522);_0x47a522+=0x4;const _0x42ba5c=_0x3526a1['readUInt8'](_0x47a522++),_0x4e89dd=_0x3526a1[_0x3d2d22(0x3a9)](_0x47a522,_0x47a522+_0x42ba5c)['toString'](_0x3d2d22(0x253));_0x47a522+=_0x42ba5c;const _0x596ee3=_0x3526a1[_0x3d2d22(0x5cc)](_0x47a522);_0x47a522+=0x2;const _0x5e77fb={};for(let _0x172f24=0x0;_0x172f24<_0x5e4d8a[_0x3d2d22(0x275)];_0x172f24++){_0x5e77fb[_0x5e4d8a[_0x172f24]]=Boolean(_0x596ee3&0x1<<_0x172f24);}const _0x19e5c1=[_0x3d2d22(0x51a),'typesPerEnv','syncPeers',_0x3d2d22(0x1a4)],_0x3e05b0={};for(const _0x137dcf of _0x19e5c1){const _0x12ce85=_0x3526a1[_0x3d2d22(0x738)](_0x47a522);_0x47a522+=0x4,_0x3e05b0[_0x137dcf]=_0x12ce85===0x0?null:_0x12ce85;}return{'v':_0x408782,'licenseType':_0x518a33,'issuedAt':_0x15a849*0x3e8,'expiresAt':_0x4662e6*0x3e8,'licensee':_0x4e89dd,'features':_0x5e77fb,'limits':_0x3e05b0};}function _0x56e8d4(_0x1f60e5,_0x4b4edf){const _0x32fe66=_0x1299f4,_0x117bc2=Buffer[_0x32fe66(0x298)]([_0x1f60e5,_0x4b4edf]),_0x34f2c0=_0x4316dd(_0x117bc2),_0x3df7ad=[];for(let _0x228660=0x0;_0x228660<_0x34f2c0[_0x32fe66(0x275)];_0x228660+=0x8){_0x3df7ad[_0x32fe66(0x1c7)](_0x34f2c0[_0x32fe66(0x3a9)](_0x228660,_0x228660+0x8));}return _0x3df7ad[_0x32fe66(0x4d3)]('-');}function _0x509b06(_0x21f620){const _0x2fe21f=_0x1299f4;if(typeof _0x21f620!==_0x2fe21f(0x5c5))throw new Error(_0x2fe21f(0x4c8));const _0x4cbf5d=_0x20b00d(_0x21f620[_0x2fe21f(0x552)](/-/g,''));if(_0x4cbf5d[_0x2fe21f(0x275)]<0x41)throw new Error('decodeLicenseBlob:\x20blob\x20too\x20short\x20('+_0x4cbf5d['length']+_0x2fe21f(0x699));const _0x524e1a=_0x4cbf5d[_0x2fe21f(0x3a9)](0x0,_0x4cbf5d[_0x2fe21f(0x275)]-0x40),_0x5d3b98=_0x4cbf5d[_0x2fe21f(0x3a9)](_0x4cbf5d[_0x2fe21f(0x275)]-0x40);let _0x28c42e;try{_0x28c42e=_0x261ec1(_0x524e1a);}catch(_0xa6ab99){throw new Error(_0x2fe21f(0x34b)+_0xa6ab99[_0x2fe21f(0x63f)]);}return{'rawBuf':_0x4cbf5d,'payload':_0x524e1a,'sig':_0x5d3b98,'decoded':_0x28c42e};}function _0x128527(_0x4380ec){const _0x12be1c=_0x1299f4;return _0x1f5e8a['createHash'](_0x12be1c(0x3c0))['update'](_0x4380ec)[_0x12be1c(0x4e6)]()[_0x12be1c(0x3a9)](0x0,0x8);}function _0x4e720a(_0x30e023,_0x3fd0c4,_0x126396){const _0x4f029d=_0x1299f4,_0x2b7f8d=_0x4f029d(0x311)+_0x126396,_0x248b62=Buffer['concat']([Buffer[_0x4f029d(0x748)](_0x30e023,_0x4f029d(0x253)),_0x3fd0c4]),_0x33c7af=_0x1f5e8a[_0x4f029d(0x351)](_0x4f029d(0x3c0),_0x2b7f8d)[_0x4f029d(0x7bb)](_0x248b62)[_0x4f029d(0x4e6)](),_0x53b752=_0x4316dd(_0x33c7af[_0x4f029d(0x3a9)](0x0,0x5));return{'pin':_0x53b752,'pinHmac':_0x33c7af};}function _0x442a87(_0x53f93b,_0x4f095a,_0x29bfac){const _0x20f385=_0x1299f4,_0x66c1d2=Buffer[_0x20f385(0x2c3)](0x4d);let _0x42511b=0x0;_0x66c1d2['writeUInt8'](0x1,_0x42511b++),_0x53f93b[_0x20f385(0xf1)](_0x66c1d2,_0x42511b),_0x42511b+=0x8,_0x66c1d2['writeUInt32BE'](_0x4f095a,_0x42511b),_0x42511b+=0x4,_0x29bfac['copy'](_0x66c1d2,_0x42511b);const _0x579742=_0x4316dd(_0x66c1d2),_0x3029df=[];for(let _0x2c0428=0x0;_0x2c0428<_0x579742['length'];_0x2c0428+=0x6){_0x3029df['push'](_0x579742[_0x20f385(0x3a9)](_0x2c0428,_0x2c0428+0x6));}return _0x3029df[_0x20f385(0x4d3)]('-');}function _0x4467c7(_0x661459){const _0x517936=_0x1299f4;if(typeof _0x661459!==_0x517936(0x5c5))throw new Error(_0x517936(0x28f));const _0x3dfa79=_0x20b00d(_0x661459[_0x517936(0x552)](/-/g,''));if(_0x3dfa79[_0x517936(0x275)]!==0x4d)throw new Error('decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20'+_0x3dfa79[_0x517936(0x275)]);let _0xf505a6=0x0;const _0x4ba441=_0x3dfa79[_0x517936(0x75f)](_0xf505a6++),_0x3d2bc7=_0x3dfa79[_0x517936(0x3a9)](_0xf505a6,_0xf505a6+0x8);_0xf505a6+=0x8;const _0x12c8b4=_0x3dfa79[_0x517936(0x738)](_0xf505a6);_0xf505a6+=0x4;const _0x377701=_0x3dfa79[_0x517936(0x3a9)](_0xf505a6);return{'v':_0x4ba441,'licenseHash':_0x3d2bc7,'expiry':_0x12c8b4,'sig':_0x377701};}const _0x3824bc=0x100,_0x3587c6=new Set(),_0x34eec9=new Map();function _0x27db95(_0x1792d5,_0x26f541,_0x1d49c1){const _0x1316f4=_0x1299f4;if(typeof _0x1d49c1!==_0x1316f4(0x5c5)||!Buffer['isBuffer'](_0x1792d5)||!Buffer[_0x1316f4(0x744)](_0x26f541))return _0x1f5e8a[_0x1316f4(0x2c2)](null,_0x1792d5,_0x1d49c1,_0x26f541);const _0x283af8=_0x1d49c1+'\x0a'+_0x1792d5[_0x1316f4(0x6fe)](_0x1316f4(0x5d9))+'\x0a'+_0x26f541[_0x1316f4(0x6fe)](_0x1316f4(0x5d9));if(_0x3587c6[_0x1316f4(0x7b1)](_0x283af8))return!![];let _0x3c3dca=_0x34eec9[_0x1316f4(0x404)](_0x1d49c1);if(!_0x3c3dca){_0x3c3dca=_0x1f5e8a[_0x1316f4(0x497)](_0x1d49c1);if(_0x34eec9[_0x1316f4(0x187)]>=0x10)_0x34eec9[_0x1316f4(0x44d)]();_0x34eec9['set'](_0x1d49c1,_0x3c3dca);}const _0x358591=_0x1f5e8a[_0x1316f4(0x2c2)](null,_0x1792d5,_0x3c3dca,_0x26f541)===!![];if(_0x358591){if(_0x3587c6['size']>=_0x3824bc)_0x3587c6[_0x1316f4(0x44d)]();_0x3587c6['add'](_0x283af8);}return _0x358591;}function _0x282ea3({tokenString:_0x2bcd99,nodeId:_0xef9236,rawBlobBuf:_0x4c3fcb,pubKeyPem:_0x49881d,pubFingerprint:_0x29ffd6}){const _0x5ab81d=_0x1299f4;let _0x3b888c;try{_0x3b888c=_0x4467c7(_0x2bcd99);}catch(_0x3a751f){return{'valid':![],'reason':_0x5ab81d(0x79c)};}const _0x4cf805=_0x128527(_0x4c3fcb);if(!_0x4cf805[_0x5ab81d(0x3d8)](_0x3b888c['licenseHash']))return{'valid':![],'reason':_0x5ab81d(0x468)};const {pinHmac:_0x5a40a1}=_0x4e720a(_0xef9236,_0x4cf805,_0x29ffd6),_0x49f6d6=Buffer[_0x5ab81d(0x2c3)](0x4);_0x49f6d6[_0x5ab81d(0x2ce)](_0x3b888c['expiry'],0x0);const _0x36799d=Buffer['concat']([Buffer[_0x5ab81d(0x748)]([_0x3b888c['v']]),_0x5a40a1[_0x5ab81d(0x3a9)](0x0,0x5),_0x3b888c['licenseHash'],_0x49f6d6]);try{const _0x4697af=_0x27db95(_0x36799d,_0x3b888c[_0x5ab81d(0x6b4)],_0x49881d);if(!_0x4697af)return{'valid':![],'reason':_0x5ab81d(0x2bf)};}catch(_0x3d8f35){return{'valid':![],'reason':'SIG_INVALID'};}if(_0x3b888c[_0x5ab81d(0x1f9)]<Date[_0x5ab81d(0x2f4)]()/0x3e8)return{'valid':![],'reason':'ACTIVATION_EXPIRED'};return{'valid':!![],'reason':'ok'};}function _0x384414(_0x51968e){const _0x3ad3c8=_0x1299f4;if(typeof _0x51968e!==_0x3ad3c8(0x5c5))return _0x3ad3c8(0x11b);const _0x47cc3f=_0x51968e[_0x3ad3c8(0x1c1)]();if(_0x47cc3f[_0x3ad3c8(0x74f)]('/')||_0x47cc3f[_0x3ad3c8(0x74f)]('./')||_0x47cc3f['startsWith']('../')||/^[A-Za-z]:[\\/]/[_0x3ad3c8(0x30a)](_0x47cc3f))return'path';if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x3ad3c8(0x30a)](_0x47cc3f))return _0x3ad3c8(0x624);const _0x2fdf16=_0x47cc3f['replace'](/[\s-]+/g,'')[_0x3ad3c8(0x275)];if(_0x2fdf16===0x7c)return _0x3ad3c8(0x365);if(_0x2fdf16>=0x95&&_0x2fdf16<=0xfc)return'blob';return'unknown';}return okdbLicenseCodec={'toBase32':_0x4316dd,'fromBase32':_0x20b00d,'encodeLicensePayload':_0x294c5d,'decodeLicensePayload':_0x261ec1,'encodeLicenseBlob':_0x56e8d4,'decodeLicenseBlob':_0x509b06,'licenseHash':_0x128527,'derivePin':_0x4e720a,'encodeActivationToken':_0x442a87,'decodeActivationToken':_0x4467c7,'verifyActivation':_0x282ea3,'verifySignature':_0x27db95,'detectInputType':_0x384414,'FEATURE_NAMES':_0x5e4d8a,'LICENSE_TYPE_STANDARD':_0x2cd9f1,'LICENSE_TYPE_OPEN':_0x418418,'LICENSE_TYPE_INTERNAL':_0x2107b0,'OPEN_LICENSE_MAX_DURATION_MS':_0x55ffd8},okdbLicenseCodec;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x26c9de=_0x29bffd;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x33bdc5={'PUT':'put','REMOVE':'remove','INDEX_DROP':_0x26c9de(0x361),'INDEX_REGISTER':_0x26c9de(0x425),'INDEX_RESET':_0x26c9de(0x399),'TYPE_REGISTER':_0x26c9de(0x18a),'TYPE_DROP':'dropType','FTS_REGISTER':_0x26c9de(0x645),'FTS_DROP':'dropFts','FTS_RESET':_0x26c9de(0x4bf),'SCHEMA_SET':_0x26c9de(0x303),'SCHEMA_DROP':_0x26c9de(0x770),'TTL_SET':_0x26c9de(0x299),'TTL_CLEAR':_0x26c9de(0x781)},_0x11ab3f={'SYSTEM_READY':'system:ready','FIELD_RESOLVER_REGISTERED':_0x26c9de(0x1a7),'SYSTEM_STOPPED':_0x26c9de(0x5e8),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x26c9de(0x101),'SYSTEM_DRAIN':_0x26c9de(0x592),'SYSTEM_TYPE_DROP':_0x26c9de(0x45c),'SYSTEM_PROC':_0x26c9de(0x422),'SYSTEM_BUS_STATE_CHANGE':_0x26c9de(0x178),'ITEM_CREATE':_0x26c9de(0x2cc),'ITEM_UPDATE':_0x26c9de(0x3c6),'ITEM_REMOVE':_0x26c9de(0x2e7),'ITEM_PENDING':_0x26c9de(0x358),'INDEX_RESET':_0x26c9de(0x5aa),'INDEX_READY':'index:ready','INDEX_PROGRESS':'index:progress','VIEW_PROGRESS':_0x26c9de(0x2b3),'INDEX_DROP':_0x26c9de(0x200),'INDEX_REGISTERED':_0x26c9de(0x724),'FTS_REGISTERED':_0x26c9de(0x682),'FTS_DROP':'fts:drop','FTS_RESET':_0x26c9de(0x64a),'SCHEMA_SET':_0x26c9de(0x5b8),'SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':_0x26c9de(0x45f),'UNIQUE_VIOLATION_RESOLVED':_0x26c9de(0x360),'REF_VIOLATION':'ref:violation','REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x26c9de(0x2c6),'TXN_START':_0x26c9de(0x509),'TXN_END':'txn:end','TXN_ROLLBACK':_0x26c9de(0x23c),'TYPE_REGISTERED':_0x26c9de(0x4b8),'TYPE_DROP':_0x26c9de(0x35f),'ENV_OPENED':_0x26c9de(0x534),'ENV_REMOVED':_0x26c9de(0x1bc),'SYSTEM_ENV_RELEASE':'system:env_release','TTL_EXPIRED':_0x26c9de(0x2ab),'TTL_SET':_0x26c9de(0x745),'TTL_CLEAR':_0x26c9de(0x124),'LICENSE_INVALID':'license:invalid','LICENSE_ADDED':_0x26c9de(0x418),'LICENSE_ACTIVATED':_0x26c9de(0x207),'LICENSE_REMOVED':_0x26c9de(0x77e)},_0x6fe22c={'CREATING':'creating','RESETTING':_0x26c9de(0x402),'READY':_0x26c9de(0xf6),'DROPPING':_0x26c9de(0x58c),'WAITING':_0x26c9de(0x586),'ERROR':_0x26c9de(0x131)},_0x3edc57={'CREATED':_0x26c9de(0x5cd),'STARTING':_0x26c9de(0x3ec),'STARTED':_0x26c9de(0xe5),'STOPPING':_0x26c9de(0x229),'STOPPED':_0x26c9de(0x2d8)},_0x2390ea={'CREATING':_0x26c9de(0x4c5),'READY':_0x26c9de(0xf6),'HALTED':_0x26c9de(0x638),'STOPPED':'stopped','RESETTING':_0x26c9de(0x402)},_0x10e37b=Object[_0x26c9de(0x3df)]({'POKE':_0x26c9de(0x752),'DRAIN':'bus:drain','TYPE_DROP':_0x26c9de(0xd6),'PROC':_0x26c9de(0x33a),'ENV_RELEASE':_0x26c9de(0x20d)});return okdbEnums={'BUS_EVENTS':_0x10e37b,'CHANGE_ACTIONS':_0x33bdc5,'EVENTS':_0x11ab3f,'INDEX_STATE':_0x6fe22c,'OKDB_STATE':_0x3edc57,'VIEW_STATE':_0x2390ea},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x354e9d=_0x29bffd;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x148821=require$$0$1,_0x46f27a=require$$1,_0x351b74=require$$2$1,_0xa4a633=_0x148821[_0x354e9d(0x1f5)](_0x46f27a['join'](__dirname,_0x354e9d(0x7b5)),'utf8')[_0x354e9d(0x1c1)](),_0x22e1b6=_0x351b74[_0x354e9d(0x497)](_0xa4a633)['export']({'type':_0x354e9d(0x33e),'format':_0x354e9d(0x501)}),_0x4f4d6b=_0x351b74[_0x354e9d(0xcb)](_0x354e9d(0x3c0))['update'](_0x22e1b6)['digest']('hex')[_0x354e9d(0x3a9)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0xa4a633,'PUB_FINGERPRINT':_0x4f4d6b},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x3247e6=_0x29bffd;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x6732c9=require$$2$1,{OKDBError:_0x3410ce}=requireOkdbError(),{EVENTS:_0x3315d5}=requireOkdbEnums(),_0x5b7b21=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x383447,LICENSE_TYPE_INTERNAL:_0x53e686,OPEN_LICENSE_MAX_DURATION_MS:_0x3e0d16}=_0x5b7b21,_0x41f532=requireOkdbPubkey(),_0x6ed69b={'LICENSED_BUILD':_0x3247e6(0x696),'PUBLIC_KEY_PEM':_0x41f532[_0x3247e6(0x5f4)],'PUB_FINGERPRINT':_0x41f532[_0x3247e6(0x198)],'LICENSE_EXPIRED_ACTION':'log'},_0x22f0a4=_0x3247e6(0x750),_0x48b63a={'features':{'sync':![],'embeddings':!![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x5,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240,'pipelinesPerEnv':0x2},'_isFree':!![]};async function _0x44fbbe(_0x5c317b){await _0x5c317b['ensureType'](_0x22f0a4);}class _0x1fcb26{constructor(_0x470543){const _0xa747b9=_0x3247e6;this[_0xa747b9(0x554)]=_0x470543,this[_0xa747b9(0xe0)]=null;}async[_0x3247e6(0x51c)](){const _0x1f291a=_0x3247e6,_0x38468b=this['okdb'][_0x1f291a(0x66b)];if(!_0x38468b||!_0x38468b['hasType'](_0x22f0a4)){this['_active']=null;return;}const _0x15afa6=this['okdb']['id'];let _0x2fec35=null;for(const {key:_0x482792,value:_0x5128cc}of _0x38468b[_0x1f291a(0x507)](_0x22f0a4)){const _0x46c1cc=this[_0x1f291a(0x263)](_0x5128cc,_0x15afa6);_0x46c1cc===_0x1f291a(0x1e5)&&!_0x2fec35&&(_0x2fec35={..._0x5128cc,'id':_0x482792,'status':_0x46c1cc});}this[_0x1f291a(0xe0)]=_0x2fec35;if(this[_0x1f291a(0xe0)]&&this[_0x1f291a(0xe0)][_0x1f291a(0x636)]===_0x383447){const _0x28038a=Math[_0x1f291a(0x2e4)]((this['_active'][_0x1f291a(0x15f)]-Date[_0x1f291a(0x2f4)]())/0x5265c00);this['okdb'][_0x1f291a(0x2fd)]?.[_0x1f291a(0x27f)]('⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20'+_0x28038a+_0x1f291a(0x573),{'feature':_0x1f291a(0x7cd),'licensee':this[_0x1f291a(0xe0)][_0x1f291a(0x48a)],'expiresAt':new Date(this[_0x1f291a(0xe0)][_0x1f291a(0x15f)])['toISOString']()});}this['_active']&&this[_0x1f291a(0xe0)][_0x1f291a(0x636)]===_0x53e686&&this['okdb']['log']?.[_0x1f291a(0x27f)](_0x1f291a(0x241),{'feature':_0x1f291a(0x7cd),'licensee':this[_0x1f291a(0xe0)][_0x1f291a(0x48a)]});}[_0x3247e6(0x263)](_0x531930,_0x1b906b){const _0x5c2934=_0x3247e6;if(!_0x531930[_0x5c2934(0x328)])return'invalid';let _0x3be328;try{_0x3be328=_0x5b7b21[_0x5c2934(0x77c)](_0x531930[_0x5c2934(0x328)]);}catch(_0x218eb9){return _0x5c2934(0x6f4);}try{const _0x321560=_0x5b7b21['verifySignature'](_0x3be328['payload'],_0x3be328[_0x5c2934(0x6b4)],_0x6ed69b[_0x5c2934(0x5f4)]);if(!_0x321560)return _0x5c2934(0x6f4);}catch(_0x1e5361){return _0x5c2934(0x6f4);}if(_0x3be328[_0x5c2934(0x1bd)]['licenseType']===_0x53e686)return _0x5c2934(0x1e5);if(_0x3be328['decoded'][_0x5c2934(0x15f)]<=Date[_0x5c2934(0x2f4)]())return _0x5c2934(0x53e);if(_0x3be328['decoded'][_0x5c2934(0x636)]===_0x383447)return _0x5c2934(0x1e5);if(!_0x531930[_0x5c2934(0x365)])return'pending';const _0x3cd588=_0x5b7b21[_0x5c2934(0xc3)]({'tokenString':_0x531930[_0x5c2934(0x365)],'nodeId':_0x1b906b,'rawBlobBuf':_0x3be328[_0x5c2934(0x494)],'pubKeyPem':_0x6ed69b['PUBLIC_KEY_PEM'],'pubFingerprint':_0x6ed69b['PUB_FINGERPRINT']});if(_0x3cd588[_0x5c2934(0x112)]==='LICENSE_HASH_MISMATCH'||_0x3cd588[_0x5c2934(0x112)]==='SIG_INVALID')return _0x5c2934(0x56b);if(_0x3cd588[_0x5c2934(0x112)]==='ACTIVATION_EXPIRED')return _0x5c2934(0x53e);if(!_0x3cd588['valid'])return _0x5c2934(0x56b);return _0x5c2934(0x1e5);}get[_0x3247e6(0x1e5)](){const _0x3d00b6=_0x3247e6;return this[_0x3d00b6(0xe0)];}get[_0x3247e6(0x620)](){return this['_active']??_0x48b63a;}['assertFeature'](_0x199e5a){const _0x56891e=_0x3247e6;if(_0x6ed69b[_0x56891e(0x4f5)]!==_0x56891e(0x696))return;const _0x1ec316=this[_0x56891e(0x620)];if(!_0x1ec316[_0x56891e(0x6fb)]?.[_0x199e5a]){const _0x27dce6=_0x1ec316[_0x56891e(0x4aa)]?_0x56891e(0x60a)+_0x199e5a+_0x56891e(0x23f)+_0x199e5a+_0x56891e(0x4e4):_0x56891e(0xc1)+_0x199e5a+'.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22'+_0x199e5a+'\x22.';throw new _0x3410ce(_0x27dce6,_0x56891e(0x5ba),{'feature':_0x199e5a});}}['isFeatureEnabled'](_0x2f2cee){const _0x28d41e=_0x3247e6;if(_0x6ed69b[_0x28d41e(0x4f5)]!==_0x28d41e(0x696))return!![];return!!this['effective']['features']?.[_0x2f2cee];}['hasLimit'](_0x35092f){const _0x4752f3=_0x3247e6;if(_0x6ed69b[_0x4752f3(0x4f5)]!==_0x4752f3(0x696))return![];const _0x469e2f=this['effective'][_0x4752f3(0x76d)]?.[_0x35092f];return!(_0x469e2f===null||_0x469e2f===undefined||_0x469e2f===0x0);}[_0x3247e6(0x122)](_0x50e270,_0x159b6f){const _0x2a0d3c=_0x3247e6;if(_0x6ed69b['LICENSED_BUILD']!==_0x2a0d3c(0x696))return;const _0x40ba05=this['effective'],_0xdbbc26=_0x40ba05[_0x2a0d3c(0x76d)]?.[_0x50e270];if(_0xdbbc26===null||_0xdbbc26===undefined||_0xdbbc26===0x0)return;if(_0x159b6f>=_0xdbbc26)throw new _0x3410ce(_0x2a0d3c(0x3a1)+_0x50e270+'\x20('+_0x159b6f+'/'+_0xdbbc26+')',_0x2a0d3c(0x3d4),{'limit':_0x50e270,'current':_0x159b6f,'max':_0xdbbc26});}async[_0x3247e6(0x3d7)](_0x4b24f7){const _0x486b28=_0x3247e6;let _0x3cf8e4;try{_0x3cf8e4=_0x5b7b21['decodeLicenseBlob'](_0x4b24f7);}catch(_0x5bd856){throw new _0x3410ce(_0x486b28(0xc0)+_0x5bd856[_0x486b28(0x63f)],_0x486b28(0x143));}let _0x55fb38;try{_0x55fb38=_0x5b7b21[_0x486b28(0x33b)](_0x3cf8e4[_0x486b28(0x5f3)],_0x3cf8e4[_0x486b28(0x6b4)],_0x6ed69b[_0x486b28(0x5f4)]);}catch(_0x1ff7ab){throw new _0x3410ce(_0x486b28(0x4f8)+_0x1ff7ab[_0x486b28(0x63f)],_0x486b28(0x143));}if(!_0x55fb38)throw new _0x3410ce('License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20'+('Build\x20expects\x20public\x20key\x20fingerprint\x20'+_0x6ed69b[_0x486b28(0x198)]+'.\x20')+_0x486b28(0x593),'LICENSE_INVALID',{'expectedFingerprint':_0x6ed69b[_0x486b28(0x198)]});if(_0x3cf8e4['decoded'][_0x486b28(0x636)]===_0x383447){const _0x400b60=_0x3cf8e4[_0x486b28(0x1bd)][_0x486b28(0x15f)]-_0x3cf8e4['decoded']['issuedAt'];if(_0x400b60>_0x3e0d16)throw new _0x3410ce(_0x486b28(0x5be)+Math[_0x486b28(0x2e4)](_0x400b60/(0x1e*0x5265c00))+_0x486b28(0x788),_0x486b28(0x143));}const _0x4ab3c5=this['okdb'][_0x486b28(0x66b)];await _0x44fbbe(_0x4ab3c5);const _0x21fd11=_0x5b7b21[_0x486b28(0xc2)](_0x3cf8e4['rawBuf'])[_0x486b28(0x6fe)](_0x486b28(0x6db));for(const {key:_0xfae5f9,value:_0x401bc2}of _0x4ab3c5[_0x486b28(0x507)](_0x22f0a4)){if(_0x401bc2[_0x486b28(0x7bd)]===_0x21fd11)throw new _0x3410ce('License\x20already\x20stored','LICENSE_ALREADY_STORED',{'id':_0xfae5f9});}const _0x44733f=_0x6732c9[_0x486b28(0xcb)]('sha256')[_0x486b28(0x7bb)](_0x486b28(0x71a))[_0x486b28(0x7bb)](_0x3cf8e4[_0x486b28(0x494)])[_0x486b28(0x4e6)](_0x486b28(0x6db)),_0x55c950=_0x44733f[_0x486b28(0x3a9)](0x0,0x8)+'-'+_0x44733f[_0x486b28(0x3a9)](0x8,0xc)+'-5'+_0x44733f[_0x486b28(0x3a9)](0xd,0x10)+'-'+(parseInt(_0x44733f[0x10],0x10)&0x3|0x8)['toString'](0x10)+_0x44733f['slice'](0x11,0x14)+'-'+_0x44733f[_0x486b28(0x3a9)](0x14,0x20),_0x3d6a9d={'blob':_0x4b24f7,'activation':null,'addedAt':Date['now'](),'_licenseHash':_0x21fd11,'licensee':_0x3cf8e4[_0x486b28(0x1bd)]['licensee'],'expiresAt':_0x3cf8e4[_0x486b28(0x1bd)][_0x486b28(0x15f)],'features':_0x3cf8e4['decoded'][_0x486b28(0x6fb)],'limits':_0x3cf8e4[_0x486b28(0x1bd)]['limits'],'licenseType':_0x3cf8e4[_0x486b28(0x1bd)][_0x486b28(0x636)]};return await _0x4ab3c5[_0x486b28(0x27d)](_0x22f0a4,_0x55c950,_0x3d6a9d),{'id':_0x55c950,..._0x3d6a9d};}async[_0x3247e6(0xe1)](_0x32439a){const _0x27f947=_0x3247e6;let _0x5388fb;try{_0x5388fb=_0x5b7b21[_0x27f947(0x185)](_0x32439a);}catch(_0xdffabc){throw new _0x3410ce(_0x27f947(0x379)+_0xdffabc[_0x27f947(0x63f)],_0x27f947(0x3f5));}const _0x1cbbba=_0x5388fb[_0x27f947(0xc2)]['toString']('hex'),_0x251c3c=this[_0x27f947(0x554)]['_systemEnv'];if(!_0x251c3c||!_0x251c3c[_0x27f947(0x6c1)](_0x22f0a4))throw new _0x3410ce(_0x27f947(0x4af),'LICENSE_ACTIVATION_INVALID');let _0x19d48f=null,_0x453cc4=null;for(const {key:_0x339e1d,value:_0x593df7}of _0x251c3c['getRange'](_0x22f0a4)){if(_0x593df7[_0x27f947(0x7bd)]===_0x1cbbba){_0x19d48f=_0x339e1d,_0x453cc4=_0x593df7;break;}}if(!_0x19d48f)throw new _0x3410ce(_0x27f947(0x4af),'LICENSE_ACTIVATION_INVALID');const {rawBuf:_0x4e3342}=_0x5b7b21[_0x27f947(0x77c)](_0x453cc4[_0x27f947(0x328)]),_0x2dfe6c=_0x5b7b21[_0x27f947(0xc3)]({'tokenString':_0x32439a,'nodeId':this[_0x27f947(0x554)]['id'],'rawBlobBuf':_0x4e3342,'pubKeyPem':_0x6ed69b[_0x27f947(0x5f4)],'pubFingerprint':_0x6ed69b[_0x27f947(0x198)]});if(!_0x2dfe6c[_0x27f947(0x492)])throw new _0x3410ce(_0x27f947(0x26e)+_0x2dfe6c['reason'],_0x27f947(0x3f5),{'reason':_0x2dfe6c['reason']});const _0x258b14={..._0x453cc4,'activation':_0x32439a};return await _0x251c3c[_0x27f947(0x7bb)](_0x22f0a4,_0x19d48f,_0x258b14),{'id':_0x19d48f,..._0x258b14};}async[_0x3247e6(0x106)](_0x3ff1a6){const _0x1b2f97=_0x3247e6,_0x2eda1e=this['okdb']['_systemEnv'];if(!_0x2eda1e||!_0x2eda1e[_0x1b2f97(0x6c1)](_0x22f0a4))return;await _0x2eda1e[_0x1b2f97(0x54d)](_0x22f0a4,_0x3ff1a6);}async['listLicenses'](){const _0x2ee6e9=_0x3247e6,_0x4c62b8=this[_0x2ee6e9(0x554)][_0x2ee6e9(0x66b)];if(!_0x4c62b8||!_0x4c62b8['hasType'](_0x22f0a4))return[];const _0x3190be=this[_0x2ee6e9(0x554)]['id'],_0x1437d4=[];for(const {key:_0x4ee625,value:_0x24b944}of _0x4c62b8[_0x2ee6e9(0x507)](_0x22f0a4)){const _0x672c14=this[_0x2ee6e9(0x263)](_0x24b944,_0x3190be);_0x1437d4[_0x2ee6e9(0x1c7)]({..._0x24b944,'id':_0x4ee625,'status':_0x672c14});}return _0x1437d4;}[_0x3247e6(0x4c4)](){const _0x311e8c=_0x3247e6,_0x17d64b=this[_0x311e8c(0x554)]['_systemEnv'];if(!_0x17d64b||!_0x17d64b[_0x311e8c(0x6c1)](_0x22f0a4))return[];const _0x22b75b=this[_0x311e8c(0x554)]['id'],_0x1a7276=[];for(const {key:_0xf9d9fb,value:_0x323ff9}of _0x17d64b['getRange'](_0x22f0a4)){if(_0x323ff9['_licenseHash']){if(_0x323ff9['licenseType']===_0x383447)_0x1a7276[_0x311e8c(0x1c7)]({'licenseId':_0xf9d9fb,'pin':null});else{const _0x3f719b=Buffer[_0x311e8c(0x748)](_0x323ff9[_0x311e8c(0x7bd)],_0x311e8c(0x6db)),{pin:_0x2d6fe9}=_0x5b7b21['derivePin'](_0x22b75b,_0x3f719b,_0x6ed69b[_0x311e8c(0x198)]);_0x1a7276['push']({'licenseId':_0xf9d9fb,'pin':_0x2d6fe9});}}}return _0x1a7276;}async['recheck'](){const _0xe64e4c=_0x3247e6,_0x57d0c5=this[_0xe64e4c(0xe0)];await this[_0xe64e4c(0x51c)]();if(this['_active']&&this[_0xe64e4c(0xe0)][_0xe64e4c(0x636)]===_0x383447){const _0x33f1e4=Math['ceil']((this[_0xe64e4c(0xe0)][_0xe64e4c(0x15f)]-Date[_0xe64e4c(0x2f4)]())/0x5265c00);this[_0xe64e4c(0x554)][_0xe64e4c(0x2fd)]?.[_0xe64e4c(0x27f)](_0xe64e4c(0x43a)+_0x33f1e4+_0xe64e4c(0x573),{'feature':_0xe64e4c(0x7cd),'licensee':this[_0xe64e4c(0xe0)]['licensee'],'expiresAt':new Date(this['_active'][_0xe64e4c(0x15f)])[_0xe64e4c(0x5ab)]()});}this['_active']&&this['_active'][_0xe64e4c(0x636)]===_0x53e686&&this[_0xe64e4c(0x554)][_0xe64e4c(0x2fd)]?.[_0xe64e4c(0x27f)](_0xe64e4c(0x241),{'feature':_0xe64e4c(0x7cd),'licensee':this[_0xe64e4c(0xe0)][_0xe64e4c(0x48a)]});if(_0x57d0c5&&!this['_active']){this[_0xe64e4c(0x554)][_0xe64e4c(0x2fd)]?.['warn'](_0xe64e4c(0xd4),{'feature':_0xe64e4c(0x7cd)}),this[_0xe64e4c(0x554)][_0xe64e4c(0x35e)]?.['emit'](_0x3315d5['LICENSE_INVALID'],{'previous':_0x57d0c5});const _0x505952=this[_0xe64e4c(0x554)][_0xe64e4c(0x73b)]?.[_0xe64e4c(0x191)]??_0x6ed69b['LICENSE_EXPIRED_ACTION'];_0x505952===_0xe64e4c(0x62f)&&(this[_0xe64e4c(0x554)][_0xe64e4c(0x2fd)]?.[_0xe64e4c(0x131)](_0xe64e4c(0x230),{'feature':_0xe64e4c(0x7cd)}),this['okdb'][_0xe64e4c(0x3fb)]()[_0xe64e4c(0x40d)](()=>{})[_0xe64e4c(0x4fe)](()=>process[_0xe64e4c(0x282)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x1fcb26,'_C':_0x6ed69b,'FREE_TIER':_0x48b63a},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x467223=_0x29bffd;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x1e0ee6=require$$0$3,_0x2142ad=require$$0$1,_0x155347=require$$0,_0x3948c3=require$$1,_0x1262ae=_0x3948c3[_0x467223(0x4d3)](_0x155347[_0x467223(0x6b9)](),_0x467223(0x41e)),_0x43fcc3=0x3e8,_0x283405={'reset':_0x467223(0x3c4),'bold':_0x467223(0x1e6),'dim':_0x467223(0x32d),'red':_0x467223(0x594),'green':_0x467223(0x4a6),'yellow':'\x1b[33m','blue':_0x467223(0x74a),'magenta':_0x467223(0xeb),'cyan':_0x467223(0x1c8),'white':_0x467223(0x46a),'gray':_0x467223(0x32b)},_0x29e375=!process[_0x467223(0x6be)][_0x467223(0x3fd)]||!!process.env.NO_COLOR,_0x5a2cd3=(_0x555092,_0x334497)=>_0x29e375?_0x334497:''+_0x555092+_0x334497+_0x283405['reset'],_0x520882={'error':_0x283405[_0x467223(0x599)],'warn':_0x283405[_0x467223(0x694)],'info':_0x283405['cyan'],'debug':_0x283405[_0x467223(0x7c3)]},_0xb0a5d2={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x38f694(_0x49ac04,_0x312a97=_0x467223(0x695)){const _0x429939=_0x467223,{level:_0xd134e1,msg:_0x5b06e6,meta:_0x2b4d55,context:_0x3e12b8,ts:_0x2c68e9}=_0x49ac04;if((_0xb0a5d2[_0xd134e1]??0x1)<(_0xb0a5d2[_0x312a97]??0x1))return;const _0x5ab703=_0x5a2cd3(_0x283405['gray'],new Date(_0x2c68e9)[_0x429939(0x5ab)]()),_0x2ae9a9=_0x5a2cd3(_0x520882[_0xd134e1]??_0x283405[_0x429939(0x77b)],_0xd134e1[_0x429939(0x3bd)](0x5));let _0x2b89af='\x20\x20'+_0x5ab703+'\x20'+_0x5a2cd3(_0x283405[_0x429939(0x541)],_0x2ae9a9)+'\x20'+_0x5b06e6;if(_0x2b4d55&&Object[_0x429939(0x157)](_0x2b4d55)[_0x429939(0x275)]>0x0){const _0x6eab22=Object[_0x429939(0x597)](_0x2b4d55)[_0x429939(0x341)](([_0xfc4ea4,_0x1afdca])=>_0xfc4ea4+'='+_0x1afdca)['join']('\x20');_0x2b89af+=_0x5a2cd3(_0x283405[_0x429939(0x345)],_0x429939(0x7c5)+_0x6eab22+']');}if(_0x3e12b8!==undefined){const _0x1e2b93=typeof _0x3e12b8===_0x429939(0x759)?JSON['stringify'](_0x3e12b8):String(_0x3e12b8);_0x2b89af+=_0x5a2cd3(_0x283405['dim'],'\x20\x20'+_0x1e2b93);}const _0x34bd1f=_0xd134e1===_0x429939(0x131)||_0xd134e1==='warn'?process[_0x429939(0x602)]['write']['bind'](process['stderr']):process[_0x429939(0x6be)][_0x429939(0x598)][_0x429939(0x51f)](process[_0x429939(0x6be)]);_0x34bd1f(_0x2b89af+'\x0a');}function _0x4528d5(_0x22c2c8,_0x367571){const _0x452432=_0x467223;if(_0x22c2c8===0xcc||_0x22c2c8>=0xc8&&_0x22c2c8<0x12c&&!_0x367571){console[_0x452432(0x2fd)](_0x452432(0x353)+_0x5a2cd3(_0x283405[_0x452432(0x6d3)],'✓')+'\x0a');return;}if(_0x22c2c8>=0x190||_0x367571?.[_0x452432(0x131)]){const _0x1ef153=_0x367571?.[_0x452432(0x131)]??_0x367571?.[_0x452432(0x63f)]??_0x452432(0x134)+_0x22c2c8;console[_0x452432(0x2fd)](_0x452432(0x353)+_0x5a2cd3(_0x283405[_0x452432(0x599)],'✗')+'\x20'+_0x5a2cd3(_0x283405['bold']+_0x283405[_0x452432(0x599)],String(_0x22c2c8))+'\x20\x20'+_0x1ef153+'\x0a');return;}const _0x56d9d8=Object[_0x452432(0x44c)][_0x452432(0x4ea)]['call'](_0x367571??{},_0x452432(0x735))?_0x367571['result']:_0x367571,_0x312b1c=_0x367571?.[_0x452432(0x499)];console['log'](''),_0x31bfed(_0x56d9d8,'\x20\x20');if(_0x312b1c?.[_0x452432(0x6a4)]!=null||_0x312b1c?.[_0x452432(0x487)]!=null){const _0x3d4c40=[];if(_0x312b1c[_0x452432(0x6a4)]!=null)_0x3d4c40[_0x452432(0x1c7)](_0x312b1c[_0x452432(0x6a4)]+_0x452432(0x331)+(_0x312b1c['count']!==0x1?'s':''));if(_0x312b1c[_0x452432(0x487)]!=null)_0x3d4c40[_0x452432(0x1c7)](_0x312b1c['time']+'ms');console[_0x452432(0x2fd)]('\x0a\x20\x20'+_0x5a2cd3(_0x283405[_0x452432(0x345)],_0x3d4c40[_0x452432(0x4d3)](_0x452432(0x438))));}console[_0x452432(0x2fd)]('');}function _0x31bfed(_0xd1279a,_0x38a4e2=''){const _0x407cc8=_0x467223;if(_0xd1279a===null||_0xd1279a===undefined){console[_0x407cc8(0x2fd)](_0x38a4e2+_0x5a2cd3(_0x283405['dim'],_0x407cc8(0x506)));return;}if(Array[_0x407cc8(0x321)](_0xd1279a)){if(_0xd1279a[_0x407cc8(0x275)]===0x0){console['log'](_0x38a4e2+_0x5a2cd3(_0x283405[_0x407cc8(0x345)],_0x407cc8(0x634)));return;}if(_0xd1279a[_0x407cc8(0x4b7)](_0x527c60=>_0x527c60&&typeof _0x527c60===_0x407cc8(0x759)&&_0x407cc8(0x1d9)in _0x527c60&&_0x407cc8(0x446)in _0x527c60)){_0x58dd49(_0xd1279a,_0x38a4e2);return;}if(_0xd1279a[_0x407cc8(0x4b7)](_0xf67a4b=>_0xf67a4b&&typeof _0xf67a4b===_0x407cc8(0x759)&&_0x407cc8(0x4cc)in _0xf67a4b&&_0x407cc8(0x6a4)in _0xf67a4b)){_0x440cab(_0xd1279a,_0x38a4e2);return;}if(_0xd1279a[_0x407cc8(0x4b7)](_0x612dcf=>typeof _0x612dcf!==_0x407cc8(0x759)||_0x612dcf===null)){_0xd1279a[_0x407cc8(0x17d)]((_0x53de56,_0x4f1d3a)=>console[_0x407cc8(0x2fd)](_0x38a4e2+_0x5a2cd3(_0x283405[_0x407cc8(0x7c3)],_0x4f1d3a+0x1+'.')+'\x20'+_0x5a2cd3(_0x283405['white'],String(_0x53de56))));return;}_0xd1279a[_0x407cc8(0x17d)]((_0x55f72f,_0xfe4589)=>{const _0x215fb2=_0x407cc8;console[_0x215fb2(0x2fd)](_0x38a4e2+_0x5a2cd3(_0x283405['dim'],'['+_0xfe4589+']'));if(typeof _0x55f72f==='object'&&_0x55f72f!==null)_0x4ab7be(_0x55f72f,_0x38a4e2+'\x20\x20');else console['log'](_0x38a4e2+'\x20\x20'+String(_0x55f72f));});return;}if(typeof _0xd1279a===_0x407cc8(0x759)){if(_0x407cc8(0x1d9)in _0xd1279a&&_0x407cc8(0x446)in _0xd1279a&&Object[_0x407cc8(0x157)](_0xd1279a)[_0x407cc8(0x275)]<=0x3){console[_0x407cc8(0x2fd)](_0x38a4e2+_0x5a2cd3(_0x283405['bold']+_0x283405[_0x407cc8(0x18e)],String(_0xd1279a[_0x407cc8(0x1d9)])));const _0x1a92fd=_0xd1279a[_0x407cc8(0x446)];if(_0x1a92fd&&typeof _0x1a92fd==='object')_0x4ab7be(_0x1a92fd,_0x38a4e2);else console[_0x407cc8(0x2fd)](_0x38a4e2+_0x5a2cd3(_0x283405[_0x407cc8(0x77b)],String(_0x1a92fd)));return;}_0x4ab7be(_0xd1279a,_0x38a4e2);return;}console[_0x407cc8(0x2fd)](_0x38a4e2+_0x5a2cd3(_0x283405[_0x407cc8(0x77b)],String(_0xd1279a)));}function _0x4ab7be(_0x428f91,_0x2eaa7e=''){const _0xf2c911=_0x467223,_0x50ae69=Object['entries'](_0x428f91);if(_0x50ae69[_0xf2c911(0x275)]===0x0){console[_0xf2c911(0x2fd)](_0x2eaa7e+_0x5a2cd3(_0x283405[_0xf2c911(0x345)],'{}'));return;}const _0x4f64cd=Math[_0xf2c911(0x1d6)](0x1c,Math[_0xf2c911(0x114)](..._0x50ae69[_0xf2c911(0x341)](([_0xf77e33])=>_0xf77e33[_0xf2c911(0x275)])));for(const [_0x4ea3bc,_0x2219af]of _0x50ae69){const _0x3a11ab=_0x5a2cd3(_0x283405[_0xf2c911(0x18e)],_0x4ea3bc['padEnd'](_0x4f64cd));if(_0x2219af===null||_0x2219af===undefined)console[_0xf2c911(0x2fd)](_0x2eaa7e+_0x3a11ab+'\x20\x20'+_0x5a2cd3(_0x283405[_0xf2c911(0x345)],_0xf2c911(0xdb)));else{if(typeof _0x2219af===_0xf2c911(0x759)){const _0x567444=JSON['stringify'](_0x2219af);_0x567444[_0xf2c911(0x275)]<=0x50?console['log'](_0x2eaa7e+_0x3a11ab+'\x20\x20'+_0x5a2cd3(_0x283405['dim'],_0x567444)):(console[_0xf2c911(0x2fd)](_0x2eaa7e+_0x3a11ab),_0x31bfed(_0x2219af,_0x2eaa7e+'\x20\x20'));}else{const _0x41e21f=typeof _0x2219af===_0xf2c911(0x2e9)?_0x5a2cd3(_0x2219af?_0x283405[_0xf2c911(0x6d3)]:_0x283405[_0xf2c911(0x694)],String(_0x2219af)):typeof _0x2219af===_0xf2c911(0x783)?_0x5a2cd3(_0x283405[_0xf2c911(0x672)],String(_0x2219af)):_0x5a2cd3(_0x283405['white'],String(_0x2219af));console['log'](_0x2eaa7e+_0x3a11ab+'\x20\x20'+_0x41e21f);}}}}function _0x58dd49(_0x5e1564,_0x52c239=''){const _0x347470=_0x467223,_0x7d1783=Math['min'](0x20,Math['max'](..._0x5e1564['map'](_0x556247=>String(_0x556247['key'])['length'])));for(const {key:_0x37664b,value:_0x17af14,score:_0x4f4e4a,clock:_0x1a1c38}of _0x5e1564){const _0x334171=_0x5a2cd3(_0x283405[_0x347470(0x541)]+_0x283405[_0x347470(0x18e)],String(_0x37664b)[_0x347470(0x3bd)](_0x7d1783)),_0x3e116c=_0x17af14==null?_0x5a2cd3(_0x283405[_0x347470(0x345)],'null'):typeof _0x17af14==='object'?_0x5a2cd3(_0x283405[_0x347470(0x345)],JSON[_0x347470(0x490)](_0x17af14)):_0x5a2cd3(_0x283405[_0x347470(0x77b)],String(_0x17af14)),_0x5119cc=_0x4f4e4a!=null?_0x5a2cd3(_0x283405[_0x347470(0x7c3)],_0x347470(0xe8)+_0x4f4e4a['toFixed'](0x4)):'',_0x2ca2f7=_0x1a1c38!=null?_0x5a2cd3(_0x283405[_0x347470(0x7c3)],'\x20\x20@'+_0x1a1c38):'';console[_0x347470(0x2fd)](_0x52c239+_0x334171+'\x20\x20'+_0x3e116c+_0x5119cc+_0x2ca2f7);}}function _0x440cab(_0x11c7ec,_0x188670=''){const _0x185265=_0x467223,_0x5239f1=Math[_0x185265(0x1d6)](0x20,Math[_0x185265(0x114)](..._0x11c7ec[_0x185265(0x341)](_0xd2eeb6=>_0xd2eeb6[_0x185265(0x4cc)][_0x185265(0x275)])));for(const {type:_0x1e37a5,count:_0x56a327,fields:_0x1c3af5}of _0x11c7ec){if(_0x1e37a5['startsWith']('~'))continue;const _0x2e00c8=_0x5a2cd3(_0x283405['bold']+_0x283405[_0x185265(0x18e)],_0x1e37a5[_0x185265(0x3bd)](_0x5239f1)),_0x5ec3c5=_0x5a2cd3(_0x283405[_0x185265(0x672)],String(_0x56a327)[_0x185265(0x419)](0x6))+_0x5a2cd3(_0x283405['dim'],'\x20records'),_0x252b60=_0x1c3af5&&Object[_0x185265(0x157)](_0x1c3af5)[_0x185265(0x275)]?_0x5a2cd3(_0x283405['dim'],_0x185265(0xed)+Object[_0x185265(0x157)](_0x1c3af5)['slice'](0x0,0x6)['join'](',\x20')+(Object[_0x185265(0x157)](_0x1c3af5)[_0x185265(0x275)]>0x6?'…':'')):'';console[_0x185265(0x2fd)](_0x188670+_0x2e00c8+'\x20\x20'+_0x5ec3c5+_0x252b60);}}const _0xbaea4c=[_0x467223(0x107),_0x467223(0x4fa),_0x467223(0xb9),'files/','transaction',_0x467223(0x2ef)];function _0x16ab21(_0x811c66,_0xd33ef7){const _0x4928b3=_0x467223;if(_0x811c66[_0x4928b3(0x74f)](_0x4928b3(0x1ec)))return _0x811c66;if(_0x811c66[_0x4928b3(0x74f)]('/'))return'/api'+_0x811c66;if(_0x811c66['startsWith'](_0x4928b3(0x567)))return _0x4928b3(0x1ec)+_0x811c66;const _0x1ceb50=_0xbaea4c[_0x4928b3(0x2bd)](_0x4522bd=>_0x811c66===_0x4522bd[_0x4928b3(0x552)](/\/$/,'')||_0x811c66[_0x4928b3(0x74f)](_0x4522bd));return _0x1ceb50?_0x4928b3(0x660)+_0xd33ef7+'/'+_0x811c66:'/api/'+_0x811c66;}function _0x22dab4(_0x3f9e6e){const _0x1cbb32=_0x467223,_0x401086={},_0x44ef73=[];let _0xecfab4=0x0;while(_0xecfab4<_0x3f9e6e['length']){if((_0x3f9e6e[_0xecfab4]==='--env'||_0x3f9e6e[_0xecfab4]==='-e')&&_0x3f9e6e[_0xecfab4+0x1]&&!_0x3f9e6e[_0xecfab4+0x1][_0x1cbb32(0x74f)]('-'))_0x401086[_0x1cbb32(0x3af)]=_0x3f9e6e[++_0xecfab4];else _0x3f9e6e[_0xecfab4]==='--help'||_0x3f9e6e[_0xecfab4]==='-h'?_0x401086[_0x1cbb32(0x26a)]=!![]:_0x44ef73[_0x1cbb32(0x1c7)](_0x3f9e6e[_0xecfab4]);_0xecfab4++;}return{'flags':_0x401086,'rest':_0x44ef73};}const _0x492055={'system':_0x467223(0x428),'envs':'Environments','types':_0x467223(0x2fa),'data':_0x467223(0x1dd),'indexes':_0x467223(0x22d),'fts':_0x467223(0x776),'sync':_0x467223(0x259),'queue':_0x467223(0x6cf),'files':_0x467223(0x219),'embeddings':'Embeddings','engines':_0x467223(0x763),'admin':'Admin','event':'Events','processor':_0x467223(0x584)},_0x148182=[_0x467223(0x654),_0x467223(0x51a),_0x467223(0x107),'data',_0x467223(0x5fc),_0x467223(0xbb),_0x467223(0x155),'queue','files','embeddings',_0x467223(0x1c5),_0x467223(0x6a0)];function _0x550417(_0x40cb82){const _0x4ee6c1=_0x467223;return _0x40cb82['replace'](/^\/api/,'')[_0x4ee6c1(0x552)](/^\[\/env\/:env=[^\]]*\]/,_0x4ee6c1(0x22f))['replace'](/^\/env\/:env/,'env/:env')['replace'](/^\//,'');}function _0x1f497b(_0x2f791d,_0x4852e9=''){const _0x2f968d=_0x467223,_0x230877=_0x2f791d[_0x2f968d(0x5b1)][_0x2f968d(0x24f)]()[_0x2f968d(0x78a)](_0xa24268=>!_0xa24268['meta']?.[_0x2f968d(0x287)]),_0xe49aa3=_0x4852e9?_0x230877[_0x2f968d(0x78a)](_0x343f93=>_0x343f93[_0x2f968d(0x272)][_0x2f968d(0x46c)]()[_0x2f968d(0x550)](_0x4852e9['toLowerCase']())||(_0x2bab16(_0x343f93)??'')[_0x2f968d(0x46c)]()[_0x2f968d(0x550)](_0x4852e9[_0x2f968d(0x46c)]())||_0x3dabd3(_0x343f93)['some'](_0x5bdcef=>_0x5bdcef[_0x2f968d(0x46c)]()[_0x2f968d(0x550)](_0x4852e9[_0x2f968d(0x46c)]()))):_0x230877;if(!_0xe49aa3[_0x2f968d(0x275)]){console[_0x2f968d(0x2fd)](_0x5a2cd3(_0x283405['yellow'],'\x0a\x20\x20No\x20routes\x20matching\x20\x22'+_0x4852e9+'\x22\x0a'));return;}const _0x1f7500=new Map();for(const _0x4578da of _0xe49aa3){const _0x558965=_0x3dabd3(_0x4578da)[0x0]??_0x2f968d(0x6ad);if(!_0x1f7500[_0x2f968d(0x7b1)](_0x558965))_0x1f7500[_0x2f968d(0x271)](_0x558965,[]);_0x1f7500[_0x2f968d(0x404)](_0x558965)[_0x2f968d(0x1c7)](_0x4578da);}const _0x19f82=[..._0x148182[_0x2f968d(0x78a)](_0x3b21f4=>_0x1f7500['has'](_0x3b21f4)),...[..._0x1f7500[_0x2f968d(0x157)]()][_0x2f968d(0x78a)](_0x122bfc=>!_0x148182['includes'](_0x122bfc))];console[_0x2f968d(0x2fd)]('');for(const _0x56d841 of _0x19f82){const _0x25caa0=_0x1f7500[_0x2f968d(0x404)](_0x56d841);if(!_0x25caa0?.['length'])continue;console[_0x2f968d(0x2fd)](_0x5a2cd3(_0x283405[_0x2f968d(0x541)],'\x20\x20'+(_0x492055[_0x56d841]??_0x56d841)));for(const _0x9fd947 of _0x25caa0){const _0x22ec67=_0x5a2cd3(_0x283405[_0x2f968d(0x672)],_0x9fd947[_0x2f968d(0x13f)]['padEnd'](0x7)),_0x560e0d=_0x5a2cd3(_0x283405[_0x2f968d(0x18e)],_0x550417(_0x9fd947[_0x2f968d(0x272)])),_0x2c0b29=_0x2bab16(_0x9fd947)?_0x5a2cd3(_0x283405[_0x2f968d(0x345)],'\x20\x20'+_0x2bab16(_0x9fd947)):'',_0x53a596=_0x9fd947[_0x2f968d(0x26b)]?.['id']?_0x5a2cd3(_0x283405[_0x2f968d(0x7c3)],'\x20\x20['+_0x9fd947[_0x2f968d(0x26b)]['id']+']'):'';console[_0x2f968d(0x2fd)]('\x20\x20\x20\x20'+_0x22ec67+'\x20'+_0x560e0d+_0x2c0b29+_0x53a596);}console[_0x2f968d(0x2fd)]('');}}function _0x21f725(_0x1bfe80,_0xad5011){const _0xdff323=_0x467223,_0x58637d=_0xad5011[_0xdff323(0x552)](/^\/api(\/env\/[^/]+)?\//,'')[_0xdff323(0x27b)]('/')[0x0],_0x5052a0=_0x1bfe80[_0xdff323(0x5b1)]['listRoutes']()['filter'](_0x21bd79=>_0x21bd79[_0xdff323(0x272)][_0xdff323(0x46c)]()[_0xdff323(0x550)](_0x58637d[_0xdff323(0x46c)]()));if(!_0x5052a0['length']){console[_0xdff323(0x2fd)](_0x5a2cd3(_0x283405['yellow'],'\x0a\x20\x20No\x20documentation\x20found\x20for:\x20'+_0xad5011+'\x0a'));return;}console['log']('');for(const _0x39bfe5 of _0x5052a0[_0xdff323(0x3a9)](0x0,0xc)){for(const _0x1a1f28 of _0x2c2f5a(_0x39bfe5)){console[_0xdff323(0x2fd)](_0x1a1f28);}console[_0xdff323(0x2fd)]('');}}function _0x2bab16(_0x34c14c){const _0x4b38c8=_0x467223;return _0x34c14c['operation']?.[_0x4b38c8(0x3e2)]??_0x34c14c[_0x4b38c8(0x499)]?.[_0x4b38c8(0x3e2)]??'';}function _0x3a98ea(_0x1a89f6){const _0x25ab00=_0x467223;return _0x1a89f6[_0x25ab00(0x26b)]?.[_0x25ab00(0x3b6)]??_0x1a89f6[_0x25ab00(0x499)]?.[_0x25ab00(0x3b6)]??'';}function _0x3dabd3(_0x33e09a){const _0x39b958=_0x467223;return _0x33e09a[_0x39b958(0x26b)]?.[_0x39b958(0x11c)]?.['length']?_0x33e09a['operation']['tags']:_0x33e09a[_0x39b958(0x499)]?.['tags']??[];}function _0x2c2f5a(_0x5b3f25){const _0x35d93c=_0x467223,_0x3acb2d=[];_0x3acb2d[_0x35d93c(0x1c7)]('\x20\x20'+_0x5a2cd3(_0x283405[_0x35d93c(0x541)]+_0x283405[_0x35d93c(0x672)],_0x5b3f25[_0x35d93c(0x13f)][_0x35d93c(0x3bd)](0x7))+'\x20'+_0x5a2cd3(_0x283405['bold']+_0x283405['cyan'],_0x5b3f25[_0x35d93c(0x272)]));_0x5b3f25[_0x35d93c(0x26b)]?.['id']&&_0x3acb2d['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5a2cd3(_0x283405[_0x35d93c(0x7c3)],_0x35d93c(0x64d)+_0x5b3f25['operation']['id']));_0x2bab16(_0x5b3f25)&&_0x3acb2d['push'](_0x35d93c(0x323)+_0x5a2cd3(_0x283405[_0x35d93c(0x77b)],_0x2bab16(_0x5b3f25)));_0x3a98ea(_0x5b3f25)&&_0x3acb2d[_0x35d93c(0x1c7)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5a2cd3(_0x283405[_0x35d93c(0x345)],_0x3a98ea(_0x5b3f25)));_0x3dabd3(_0x5b3f25)[_0x35d93c(0x275)]&&_0x3acb2d['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5a2cd3(_0x283405[_0x35d93c(0x7c3)],_0x35d93c(0x193)+_0x3dabd3(_0x5b3f25)['join'](',\x20')));_0x5b3f25[_0x35d93c(0x26b)]?.[_0x35d93c(0x64b)]?.[_0x35d93c(0x319)]&&_0x3acb2d[_0x35d93c(0x1c7)](_0x35d93c(0x323)+_0x5a2cd3(_0x283405['gray'],_0x35d93c(0x6b8)+_0x5b3f25[_0x35d93c(0x26b)][_0x35d93c(0x64b)][_0x35d93c(0x319)]));_0x5b3f25[_0x35d93c(0x26b)]?.[_0x35d93c(0x5b1)]?.['transport']&&_0x5b3f25[_0x35d93c(0x26b)][_0x35d93c(0x5b1)][_0x35d93c(0x33d)]!==_0x35d93c(0x22c)&&_0x3acb2d[_0x35d93c(0x1c7)](_0x35d93c(0x323)+_0x5a2cd3(_0x283405['gray'],_0x35d93c(0x3d2)+_0x5b3f25[_0x35d93c(0x26b)]['http'][_0x35d93c(0x33d)]));if(_0x5b3f25['operation']?.[_0x35d93c(0x20a)]){const _0x332a85=Object[_0x35d93c(0x157)](_0x5b3f25[_0x35d93c(0x26b)][_0x35d93c(0x20a)][_0x35d93c(0x4de)]||{});if(_0x332a85[_0x35d93c(0x275)])_0x3acb2d[_0x35d93c(0x1c7)](_0x35d93c(0x323)+_0x5a2cd3(_0x283405[_0x35d93c(0x7c3)],_0x35d93c(0xc6)+_0x332a85[_0x35d93c(0x4d3)](',\x20')));}return _0x5b3f25[_0x35d93c(0x499)]?.[_0x35d93c(0x612)]&&_0x3acb2d[_0x35d93c(0x1c7)](_0x35d93c(0x323)+_0x5a2cd3(_0x283405[_0x35d93c(0x7c3)],_0x35d93c(0x6ff)+JSON[_0x35d93c(0x490)](_0x5b3f25[_0x35d93c(0x499)][_0x35d93c(0x612)]))),_0x3acb2d;}async function _0x6ae26a(_0x35fec5,_0x42cb5e,_0x4baeb7,_0x33f112=null){const _0x10f5ba=_0x467223,_0x4a87ba=_0x4baeb7['indexOf']('?'),_0x22788b=_0x4a87ba>=0x0?_0x4baeb7['slice'](0x0,_0x4a87ba):_0x4baeb7,_0x355bf6=_0x4a87ba>=0x0?_0x4baeb7[_0x10f5ba(0x3a9)](_0x4a87ba+0x1):'',_0x34047a=Object[_0x10f5ba(0x4fd)](new URLSearchParams(_0x355bf6)['entries']());return _0x35fec5[_0x10f5ba(0x5b1)]['handle'](_0x42cb5e,_0x22788b,{'body':_0x33f112,'query':_0x34047a,'headers':{'content-type':_0x10f5ba(0x5e0)}},{'internal':!![]});}function _0x428982(_0x10f501){const _0x2b9467=_0x467223;if(!_0x10f501)return null;const _0x20e882=_0x10f501['trim']();if(!_0x20e882)return null;try{return JSON[_0x2b9467(0x325)](_0x20e882);}catch{}try{return JSON['parse'](_0x1dc26a(_0x20e882));}catch(_0x125e29){throw new SyntaxError(_0x125e29[_0x2b9467(0x63f)],{'cause':_0x125e29});}}function _0x1dc26a(_0x12f559){const _0x179c1c=_0x467223;let _0xfa9901='',_0x2e0a6d=0x0;while(_0x2e0a6d<_0x12f559['length']){const _0xb92ec7=_0x12f559[_0x2e0a6d];if(_0xb92ec7==='\x22'){_0xfa9901+='\x22',_0x2e0a6d++;while(_0x2e0a6d<_0x12f559[_0x179c1c(0x275)]&&_0x12f559[_0x2e0a6d]!=='\x22'){if(_0x12f559[_0x2e0a6d]==='\x5c'){_0xfa9901+=_0x12f559[_0x2e0a6d++];if(_0x2e0a6d<_0x12f559['length'])_0xfa9901+=_0x12f559[_0x2e0a6d++];}else _0xfa9901+=_0x12f559[_0x2e0a6d++];}_0xfa9901+='\x22';if(_0x2e0a6d<_0x12f559['length'])_0x2e0a6d++;continue;}if(_0xb92ec7==='\x27'){_0xfa9901+='\x22',_0x2e0a6d++;while(_0x2e0a6d<_0x12f559[_0x179c1c(0x275)]&&_0x12f559[_0x2e0a6d]!=='\x27'){if(_0x12f559[_0x2e0a6d]==='\x5c'&&_0x12f559[_0x2e0a6d+0x1]==='\x27')_0xfa9901+='\x27',_0x2e0a6d+=0x2;else _0x12f559[_0x2e0a6d]==='\x22'?(_0xfa9901+='\x5c\x22',_0x2e0a6d++):_0xfa9901+=_0x12f559[_0x2e0a6d++];}_0xfa9901+='\x22';if(_0x2e0a6d<_0x12f559[_0x179c1c(0x275)])_0x2e0a6d++;continue;}if(_0x179c1c(0x4eb)[_0x179c1c(0x550)](_0xb92ec7)){_0xfa9901+=_0xb92ec7,_0x2e0a6d++;continue;}let _0x23efcb='';while(_0x2e0a6d<_0x12f559['length']&&!_0x179c1c(0x797)[_0x179c1c(0x550)](_0x12f559[_0x2e0a6d])&&_0x12f559[_0x2e0a6d]!=='\x20'&&_0x12f559[_0x2e0a6d]!=='\x09'&&_0x12f559[_0x2e0a6d]!=='\x0a'&&_0x12f559[_0x2e0a6d]!=='\x0d'){_0x23efcb+=_0x12f559[_0x2e0a6d++];}let _0x459128=_0x2e0a6d;while(_0x459128<_0x12f559[_0x179c1c(0x275)]&&(_0x12f559[_0x459128]==='\x20'||_0x12f559[_0x459128]==='\x09'))_0x459128++;if(_0x12f559[_0x459128]===':')_0xfa9901+='\x22'+_0x23efcb+'\x22';else _0x23efcb==='true'||_0x23efcb===_0x179c1c(0x35a)||_0x23efcb===_0x179c1c(0xdb)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x179c1c(0x30a)](_0x23efcb)?_0xfa9901+=_0x23efcb:_0xfa9901+='\x22'+_0x23efcb+'\x22';}return _0xfa9901[_0x179c1c(0x552)](/,(\s*[}\]])/g,'$1');}function _0x353478(_0x12e56f){const _0x3d1e8c=_0x467223,_0x4ee05b=[];let _0x379234=0x0;while(_0x379234<_0x12e56f[_0x3d1e8c(0x275)]){while(_0x379234<_0x12e56f[_0x3d1e8c(0x275)]&&(_0x12e56f[_0x379234]==='\x20'||_0x12e56f[_0x379234]==='\x09'))_0x379234++;if(_0x379234>=_0x12e56f[_0x3d1e8c(0x275)])break;const _0x3ba508=_0x12e56f[_0x379234];if(_0x3ba508==='{'||_0x3ba508==='['){const _0x11eb00=_0x3ba508==='{'?'}':']',_0x4949df=_0x379234++;let _0x530471=0x1,_0x3c72f8=![],_0x47ab64='';while(_0x379234<_0x12e56f[_0x3d1e8c(0x275)]&&_0x530471>0x0){const _0x1ed4b6=_0x12e56f[_0x379234];if(_0x3c72f8){if(_0x1ed4b6==='\x5c')_0x379234++;else{if(_0x1ed4b6===_0x47ab64)_0x3c72f8=![];}}else{if(_0x1ed4b6==='\x22'||_0x1ed4b6==='\x27')_0x3c72f8=!![],_0x47ab64=_0x1ed4b6;else{if(_0x1ed4b6===_0x3ba508)_0x530471++;else{if(_0x1ed4b6===_0x11eb00)_0x530471--;}}}_0x379234++;}_0x4ee05b[_0x3d1e8c(0x1c7)](_0x12e56f[_0x3d1e8c(0x3a9)](_0x4949df,_0x379234));continue;}if(_0x3ba508==='\x22'||_0x3ba508==='\x27'){const _0x207b49=_0x3ba508;_0x379234++;let _0x2ae253='';while(_0x379234<_0x12e56f[_0x3d1e8c(0x275)]&&_0x12e56f[_0x379234]!==_0x207b49){if(_0x12e56f[_0x379234]==='\x5c'&&_0x379234+0x1<_0x12e56f[_0x3d1e8c(0x275)])_0x379234++,_0x2ae253+=_0x12e56f[_0x379234++];else _0x2ae253+=_0x12e56f[_0x379234++];}if(_0x379234<_0x12e56f['length'])_0x379234++;_0x4ee05b[_0x3d1e8c(0x1c7)](_0x2ae253);continue;}let _0x2d5071='';while(_0x379234<_0x12e56f[_0x3d1e8c(0x275)]&&_0x12e56f[_0x379234]!=='\x20'&&_0x12e56f[_0x379234]!=='\x09'&&_0x12e56f[_0x379234]!=='{'&&_0x12e56f[_0x379234]!=='['){_0x2d5071+=_0x12e56f[_0x379234++];}if(_0x2d5071)_0x4ee05b[_0x3d1e8c(0x1c7)](_0x2d5071);}return _0x4ee05b;}function _0x58fe45(_0x3b7707,_0x5b5624){const _0x19ef35=_0x467223,_0x2c5414=[..._0x3b7707['_envs'][_0x19ef35(0x157)]()]['filter'](_0x30cf28=>!_0x30cf28[_0x19ef35(0x74f)]('~'));console['log'](['',_0x5a2cd3(_0x283405[_0x19ef35(0x541)]+_0x283405[_0x19ef35(0x18e)],_0x19ef35(0x736)),_0x5a2cd3(_0x283405['bold']+_0x283405[_0x19ef35(0x18e)],'\x20\x20║')+_0x5a2cd3(_0x283405[_0x19ef35(0x541)],_0x19ef35(0x4b3))+_0x5a2cd3(_0x283405[_0x19ef35(0x541)]+_0x283405[_0x19ef35(0x18e)],'║'),_0x5a2cd3(_0x283405[_0x19ef35(0x541)]+_0x283405['cyan'],_0x19ef35(0x55e)),'','\x20\x20'+_0x5a2cd3(_0x283405[_0x19ef35(0x6d3)],'✓')+'\x20'+_0x5a2cd3(_0x283405[_0x19ef35(0x541)],_0x19ef35(0x52f))+'\x20\x20http://localhost:'+_0x5b5624['port'],..._0x5b5624[_0x19ef35(0x74d)]>0x1?['\x20\x20'+_0x5a2cd3(_0x283405['green'],'✓')+'\x20'+_0x5a2cd3(_0x283405['bold'],_0x19ef35(0x449))+'\x20'+_0x5b5624['clusterWorkers']+_0x19ef35(0x5bf)+_0x5a2cd3(_0x283405[_0x19ef35(0x7c3)],'(primary\x20=\x20processor)')]:[],'\x20\x20'+_0x5a2cd3(_0x283405[_0x19ef35(0x6d3)],'✓')+'\x20'+_0x5a2cd3(_0x283405['bold'],_0x19ef35(0x383))+_0x19ef35(0x34d)+_0x5b5624['port']+_0x19ef35(0x11e),'\x20\x20'+_0x5a2cd3(_0x283405[_0x19ef35(0x6d3)],'✓')+'\x20'+_0x5a2cd3(_0x283405['bold'],_0x19ef35(0x272))+'\x20\x20\x20\x20'+_0x5b5624['dbPath'],'\x20\x20'+_0x5a2cd3(_0x283405[_0x19ef35(0x6d3)],'✓')+'\x20'+_0x5a2cd3(_0x283405[_0x19ef35(0x541)],'id')+_0x19ef35(0x2ee)+_0x5a2cd3(_0x283405['gray'],_0x3b7707['id']),'\x20\x20'+_0x5a2cd3(_0x283405[_0x19ef35(0x6d3)],'✓')+'\x20'+_0x5a2cd3(_0x283405[_0x19ef35(0x541)],_0x19ef35(0x51a))+_0x19ef35(0x664)+_0x2c5414[_0x19ef35(0x341)](_0xe1614b=>_0x5a2cd3(_0x283405[_0x19ef35(0x18e)],_0xe1614b))[_0x19ef35(0x4d3)]('\x20\x20'),..._0x5b5624[_0x19ef35(0x3da)]?[]:['\x20\x20'+_0x5a2cd3(_0x283405[_0x19ef35(0x6d3)],'✓')+'\x20'+_0x5a2cd3(_0x283405['bold'],_0x19ef35(0x6a0))+'\x20\x20\x20http://localhost:'+_0x5b5624['port']+_0x19ef35(0x29e)],'',_0x5a2cd3(_0x283405['dim'],_0x19ef35(0x588)+_0x5a2cd3(_0x283405[_0x19ef35(0x541)],_0x19ef35(0x26a))+'\x20for\x20commands,\x20'+_0x5a2cd3(_0x283405[_0x19ef35(0x541)],_0x19ef35(0x30e))+_0x19ef35(0x799)+_0x5a2cd3(_0x283405['bold'],_0x19ef35(0x282))+_0x19ef35(0x617)),''][_0x19ef35(0x4d3)]('\x0a'));}function _0x262fd0(_0x45c903){const _0x4819f1=_0x467223;console['log']('\x0a'+_0x5a2cd3(_0x283405[_0x4819f1(0x541)],'\x20\x20Path\x20access')+'\x20\x20'+_0x5a2cd3(_0x283405[_0x4819f1(0x345)],_0x4819f1(0x415))+_0x4819f1(0x2a0)+_0x5a2cd3(_0x283405[_0x4819f1(0x18e)],_0x4819f1(0x5ec))+_0x4819f1(0x6a9)+_0x5a2cd3(_0x283405[_0x4819f1(0x18e)],_0x4819f1(0x5ec))+'\x20'+_0x5a2cd3(_0x283405['yellow'],'<json-body>')+_0x4819f1(0x62d)+_0x5a2cd3(_0x283405[_0x4819f1(0x18e)],'VERB')+'\x20'+_0x5a2cd3(_0x283405[_0x4819f1(0x18e)],'<path>')+'\x20'+_0x5a2cd3(_0x283405[_0x4819f1(0x694)],_0x4819f1(0x49d))+_0x4819f1(0x1c4)+_0x5a2cd3(_0x283405[_0x4819f1(0x345)],_0x4819f1(0x718))+_0x4819f1(0x3cd)+_0x5a2cd3(_0x283405[_0x4819f1(0x7c3)],_0x4819f1(0x695))+'\x20\x20\x20\x20\x20\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'+_0x5a2cd3(_0x283405['gray'],_0x4819f1(0x51a))+_0x4819f1(0x4d6)+_0x5a2cd3(_0x283405[_0x4819f1(0x7c3)],'types')+_0x4819f1(0x414)+_0x45c903[_0x4819f1(0x3af)]+_0x4819f1(0x16a)+_0x5a2cd3(_0x283405[_0x4819f1(0x7c3)],_0x4819f1(0x4d2))+'\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/'+_0x45c903[_0x4819f1(0x3af)]+_0x4819f1(0x4b2)+_0x5a2cd3(_0x283405[_0x4819f1(0x7c3)],'type/users/item/alice')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/'+_0x45c903[_0x4819f1(0x3af)]+_0x4819f1(0x606)+_0x5a2cd3(_0x283405[_0x4819f1(0x7c3)],_0x4819f1(0x3be))+'\x20→\x20POST\x20/api/env/'+_0x45c903[_0x4819f1(0x3af)]+'/type/users/query\x0a\x20\x20\x20\x20'+_0x5a2cd3(_0x283405[_0x4819f1(0x7c3)],'PUT\x20type/users/item/x\x20{\x22n\x22:1}')+'\x0a\x20\x20\x20\x20'+_0x5a2cd3(_0x283405[_0x4819f1(0x7c3)],_0x4819f1(0x478))+_0x4819f1(0x3cd)+_0x5a2cd3(_0x283405[_0x4819f1(0x7c3)],_0x4819f1(0x35c))+_0x4819f1(0x474)+_0x5a2cd3(_0x283405['bold'],_0x4819f1(0x7ab))+'\x20\x20'+_0x5a2cd3(_0x283405[_0x4819f1(0x345)],'(on\x20any\x20path\x20command)')+_0x4819f1(0x2a0)+_0x5a2cd3(_0x283405[_0x4819f1(0x18e)],_0x4819f1(0x1ab))+_0x4819f1(0x268)+_0x5a2cd3(_0x283405[_0x4819f1(0x18e)],_0x4819f1(0x743))+_0x4819f1(0x707)+_0x5a2cd3(_0x283405[_0x4819f1(0x345)],'Examples')+_0x4819f1(0x3cd)+_0x5a2cd3(_0x283405[_0x4819f1(0x7c3)],_0x4819f1(0x372))+_0x4819f1(0x3cd)+_0x5a2cd3(_0x283405[_0x4819f1(0x7c3)],'type/users/item/alice\x20--env\x20staging')+'\x0a\x20\x20\x20\x20'+_0x5a2cd3(_0x283405[_0x4819f1(0x7c3)],_0x4819f1(0x2c0))+'\x0a\x0a'+_0x5a2cd3(_0x283405[_0x4819f1(0x541)],_0x4819f1(0x6f0))+_0x4819f1(0x2a0)+_0x5a2cd3(_0x283405[_0x4819f1(0x18e)],_0x4819f1(0x709))+_0x4819f1(0x600)+_0x5a2cd3(_0x283405[_0x4819f1(0x18e)],_0x4819f1(0x3af))+_0x4819f1(0x20f)+_0x5a2cd3(_0x283405[_0x4819f1(0x18e)],_0x4819f1(0x30e))+'\x20'+_0x5a2cd3(_0x283405[_0x4819f1(0x345)],_0x4819f1(0x71c))+_0x4819f1(0x280)+_0x5a2cd3(_0x283405[_0x4819f1(0x18e)],_0x4819f1(0x62b))+'\x20'+_0x5a2cd3(_0x283405[_0x4819f1(0x345)],'[on|off|level]')+_0x4819f1(0xf3)+_0x5a2cd3(_0x283405[_0x4819f1(0x18e)],'open')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20open\x20admin\x20UI\x20in\x20browser\x0a\x20\x20'+_0x5a2cd3(_0x283405[_0x4819f1(0x18e)],'help')+_0x4819f1(0x2af)+_0x5a2cd3(_0x283405[_0x4819f1(0x18e)],_0x4819f1(0x282))+'\x20'+_0x5a2cd3(_0x283405[_0x4819f1(0x345)],_0x4819f1(0x644))+_0x4819f1(0x5b2));}let _0x15b7e0=![];async function _0x41f86a(_0x1feef4,_0x2df8bd=0x0,_0x328055=null){const _0x53b04f=_0x467223;_0x15b7e0&&(process[_0x53b04f(0x602)][_0x53b04f(0x598)](_0x5a2cd3(_0x283405[_0x53b04f(0x599)],_0x53b04f(0x67e))),process[_0x53b04f(0x282)](0x82));_0x15b7e0=!![],process[_0x53b04f(0x6be)][_0x53b04f(0x598)]('\x0a'),process[_0x53b04f(0x602)][_0x53b04f(0x598)](_0x5a2cd3(_0x283405[_0x53b04f(0x694)],_0x53b04f(0x267)+(_0x328055?'received\x20'+_0x328055+',\x20':'')+_0x53b04f(0x278)));const _0x2af221=setTimeout(()=>{const _0x4924e7=_0x53b04f;process['stderr'][_0x4924e7(0x598)](_0x5a2cd3(_0x283405[_0x4924e7(0x599)],'\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a')),process['exit'](0x1);},0x1388);try{await _0x1feef4[_0x53b04f(0x3fb)]();}catch(_0x1e0e08){console['error'](_0x5a2cd3(_0x283405[_0x53b04f(0x599)],'\x20\x20'+_0x1e0e08[_0x53b04f(0x63f)]));}clearTimeout(_0x2af221),process[_0x53b04f(0x602)][_0x53b04f(0x598)](_0x5a2cd3(_0x283405[_0x53b04f(0x345)],_0x53b04f(0x4bd))),process[_0x53b04f(0x282)](_0x2df8bd);}function _0x5c2099(_0x4f1723){const _0x496459=_0x467223,_0x2af172=_0x4f1723[_0x496459(0x3af)]!=='default'?_0x5a2cd3(_0x283405[_0x496459(0x694)],'['+_0x4f1723['env']+']'):'';return _0x5a2cd3(_0x283405[_0x496459(0x541)]+_0x283405['cyan'],'okdb')+_0x2af172+_0x5a2cd3(_0x283405[_0x496459(0x7c3)],'>\x20');}const _0x47d03a=new Set(['GET',_0x467223(0x77d),_0x467223(0x29d),_0x467223(0x6e4),'DELETE']);async function _0xafaf24(_0x48a2f4,_0x190317,_0x12b7da,_0x1cf906,_0x510518,_0x5370c5){const _0x22b23a=_0x467223;_0x48a2f4=_0x48a2f4['trim']();if(!_0x48a2f4||_0x48a2f4['startsWith']('#'))return;const _0x3f40fb=_0x353478(_0x48a2f4),{flags:_0x33cde0,rest:_0x225095}=_0x22dab4(_0x3f40fb);if(!_0x225095[_0x22b23a(0x275)])return;const _0x4d93f7=_0x225095[0x0],_0x314bc6=_0x4d93f7[_0x22b23a(0x623)]();if(_0x314bc6===_0x22b23a(0x39f)){if(_0x225095[0x1])_0x21f725(_0x190317,_0x16ab21(_0x225095[0x1],_0x33cde0[_0x22b23a(0x3af)]??_0x510518[_0x22b23a(0x3af)]));else _0x262fd0(_0x510518);return;}if(_0x314bc6==='USE'){const _0x3863fb=_0x225095[0x1];if(!_0x3863fb){console[_0x22b23a(0x2fd)](_0x5a2cd3(_0x283405[_0x22b23a(0x599)],_0x22b23a(0x41c)));return;}try{_0x190317[_0x22b23a(0x3af)](_0x3863fb),_0x510518['env']=_0x3863fb,_0x5370c5?.[_0x22b23a(0x39a)](_0x5c2099(_0x510518)),console[_0x22b23a(0x2fd)](_0x22b23a(0x353)+_0x5a2cd3(_0x283405[_0x22b23a(0x6d3)],'✓')+_0x22b23a(0x27a)+_0x5a2cd3(_0x283405[_0x22b23a(0x541)]+_0x283405['cyan'],_0x3863fb)+'\x0a');}catch{console[_0x22b23a(0x2fd)](_0x22b23a(0x353)+_0x5a2cd3(_0x283405['red'],'✗')+_0x22b23a(0x4ae)+_0x5a2cd3(_0x283405['bold'],_0x3863fb)+_0x22b23a(0x374)+_0x5a2cd3(_0x283405[_0x22b23a(0x345)],_0x22b23a(0x466)));}return;}if(_0x314bc6===_0x22b23a(0x787)){const _0x3b73e3=[..._0x190317[_0x22b23a(0x3ae)][_0x22b23a(0x157)]()]['filter'](_0x257591=>!_0x257591[_0x22b23a(0x74f)]('~'));console[_0x22b23a(0x2fd)]('');for(const _0x3af3a5 of _0x3b73e3){const _0x4c812e=_0x3af3a5===_0x510518['env'];console[_0x22b23a(0x2fd)]('\x20\x20'+(_0x4c812e?_0x5a2cd3(_0x283405[_0x22b23a(0x6d3)],'●'):_0x5a2cd3(_0x283405[_0x22b23a(0x345)],'○'))+'\x20\x20'+(_0x4c812e?_0x5a2cd3(_0x283405[_0x22b23a(0x541)]+_0x283405[_0x22b23a(0x18e)],_0x3af3a5):_0x5a2cd3(_0x283405['dim'],_0x3af3a5)));}console['log']('\x0a\x20\x20'+_0x5a2cd3(_0x283405[_0x22b23a(0x345)],_0x22b23a(0x7c4))+'\x20'+_0x5a2cd3(_0x283405[_0x22b23a(0x18e)],_0x510518[_0x22b23a(0x3af)])),console[_0x22b23a(0x2fd)]('');return;}if(_0x314bc6==='ENVS'){const _0x1b51d6=[..._0x190317[_0x22b23a(0x3ae)][_0x22b23a(0x337)]()][_0x22b23a(0x78a)](_0x187ee8=>!_0x187ee8['name'][_0x22b23a(0x74f)]('~'));console[_0x22b23a(0x2fd)]('');const _0xb26d=Math[_0x22b23a(0x114)](..._0x1b51d6[_0x22b23a(0x341)](_0x344420=>_0x344420[_0x22b23a(0x570)][_0x22b23a(0x275)]));for(const _0x3f00c3 of _0x1b51d6){const _0x283d35=_0x3f00c3[_0x22b23a(0x570)]===_0x510518[_0x22b23a(0x3af)],_0x58eb52=_0x283d35?_0x5a2cd3(_0x283405['green'],'●'):_0x5a2cd3(_0x283405[_0x22b23a(0x345)],'○'),_0x24042c=_0x283d35?_0x5a2cd3(_0x283405['bold']+_0x283405[_0x22b23a(0x18e)],_0x3f00c3[_0x22b23a(0x570)][_0x22b23a(0x3bd)](_0xb26d)):_0x5a2cd3(_0x283405[_0x22b23a(0x345)],_0x3f00c3['name']['padEnd'](_0xb26d)),_0xa6948b=[..._0x3f00c3[_0x22b23a(0x73d)][_0x22b23a(0x157)]()]['filter'](_0x294379=>!_0x294379[_0x22b23a(0x74f)]('~')),_0x400ff2=_0xa6948b[_0x22b23a(0x275)]?_0x5a2cd3(_0x283405[_0x22b23a(0x345)],_0xa6948b['slice'](0x0,0x5)[_0x22b23a(0x4d3)](',\x20')+(_0xa6948b[_0x22b23a(0x275)]>0x5?_0x22b23a(0x141)+(_0xa6948b[_0x22b23a(0x275)]-0x5)+_0x22b23a(0x62c):'')):_0x5a2cd3(_0x283405[_0x22b23a(0x345)],_0x22b23a(0x673));console[_0x22b23a(0x2fd)]('\x20\x20'+_0x58eb52+'\x20\x20'+_0x24042c+'\x20\x20'+_0x400ff2);}console[_0x22b23a(0x2fd)]('');return;}if(_0x314bc6===_0x22b23a(0x796)){const _0x1aeb49=_0x33cde0[_0x22b23a(0x3af)]??_0x225095[0x1]??_0x510518[_0x22b23a(0x3af)];try{const _0x42b211=_0x190317[_0x22b23a(0x3af)](_0x1aeb49),_0x1a61af=[..._0x42b211[_0x22b23a(0x73d)][_0x22b23a(0x157)]()][_0x22b23a(0x78a)](_0x315459=>!_0x315459[_0x22b23a(0x74f)]('~'))[_0x22b23a(0x21a)]();console[_0x22b23a(0x2fd)]('\x0a\x20\x20'+_0x5a2cd3(_0x283405[_0x22b23a(0x345)],_0x1a61af[_0x22b23a(0x275)]+_0x22b23a(0x3e3)+(_0x1a61af[_0x22b23a(0x275)]!==0x1?'s':'')+_0x22b23a(0x302)+_0x1aeb49));for(const _0x550d72 of _0x1a61af){const _0x32e611=_0x42b211[_0x22b23a(0x73d)][_0x22b23a(0x404)](_0x550d72),_0x15be99=_0x32e611?.[_0x22b23a(0x343)]?.[_0x22b23a(0x3d0)]?.()??0x0,_0x30fc7e=_0x5a2cd3(_0x283405['bold']+_0x283405[_0x22b23a(0x18e)],_0x550d72['padEnd'](0x1c));console[_0x22b23a(0x2fd)]('\x20\x20\x20\x20'+_0x30fc7e+'\x20\x20'+_0x5a2cd3(_0x283405['magenta'],String(_0x15be99)[_0x22b23a(0x419)](0x6))+'\x20'+_0x5a2cd3(_0x283405['dim'],_0x22b23a(0x5a7)));}console[_0x22b23a(0x2fd)]('');}catch(_0x13bd60){console[_0x22b23a(0x131)](_0x5a2cd3(_0x283405[_0x22b23a(0x599)],'\x0a\x20\x20'+_0x13bd60[_0x22b23a(0x63f)]+'\x0a'));}return;}if(_0x314bc6===_0x22b23a(0x46e)){_0x1f497b(_0x190317,_0x225095[_0x22b23a(0x3a9)](0x1)[_0x22b23a(0x4d3)]('\x20'));return;}if(_0x314bc6===_0x22b23a(0x6d7)){const _0x5de855=(_0x225095[0x1]??'')[_0x22b23a(0x46c)]();if(!_0x5de855||_0x5de855==='on')_0x1cf906[_0x22b23a(0x47e)]=!![],_0x1cf906[_0x22b23a(0x2b4)]=_0x22b23a(0x695),console[_0x22b23a(0x2fd)](_0x22b23a(0x353)+_0x5a2cd3(_0x283405['green'],'✓')+_0x22b23a(0x2f7)+_0x5a2cd3(_0x283405[_0x22b23a(0x345)],_0x22b23a(0x2fe))+'\x0a');else{if(_0x5de855===_0x22b23a(0xe7))_0x1cf906[_0x22b23a(0x47e)]=![],console[_0x22b23a(0x2fd)](_0x22b23a(0x353)+_0x5a2cd3(_0x283405[_0x22b23a(0x694)],'○')+_0x22b23a(0xe4));else _0xb0a5d2[_0x5de855]!==undefined?(_0x1cf906[_0x22b23a(0x47e)]=!![],_0x1cf906[_0x22b23a(0x2b4)]=_0x5de855,console[_0x22b23a(0x2fd)](_0x22b23a(0x353)+_0x5a2cd3(_0x283405[_0x22b23a(0x6d3)],'✓')+_0x22b23a(0x4ed)+_0x5a2cd3(_0x283405[_0x22b23a(0x541)],_0x5de855)+'\x0a')):console[_0x22b23a(0x131)](_0x5a2cd3(_0x283405[_0x22b23a(0x599)],_0x22b23a(0x710)));}return;}if(_0x314bc6===_0x22b23a(0x610)||_0x314bc6===_0x22b23a(0x46b)){await _0x41f86a(_0x190317,0x0);return;}if(_0x314bc6==='OPEN'){const _0xd477d7='http://localhost:'+_0x12b7da[_0x22b23a(0x2f5)]+_0x22b23a(0x29e),_0x3fc6f8=process[_0x22b23a(0x42c)]==='win32'?_0x22b23a(0x690)+_0xd477d7:process[_0x22b23a(0x42c)]===_0x22b23a(0x352)?_0x22b23a(0x333)+_0xd477d7:'xdg-open\x20'+_0xd477d7;require$$4[_0x22b23a(0x13a)](_0x3fc6f8),console['log'](_0x22b23a(0x353)+_0x5a2cd3(_0x283405['green'],'✓')+_0x22b23a(0x3d5)+_0x5a2cd3(_0x283405[_0x22b23a(0x18e)],_0xd477d7)+'\x0a');return;}let _0xbb0273,_0x434fdd,_0x85f45e;if(_0x47d03a[_0x22b23a(0x7b1)](_0x314bc6)){_0xbb0273=_0x314bc6,_0x434fdd=_0x225095[0x1],_0x85f45e=_0x225095[_0x22b23a(0x3a9)](0x2);if(!_0x434fdd){console['error'](_0x5a2cd3(_0x283405[_0x22b23a(0x599)],'\x20\x20Usage:\x20'+_0x4d93f7+_0x22b23a(0x21c)));return;}}else _0xbb0273=null,_0x434fdd=_0x225095[0x0],_0x85f45e=_0x225095[_0x22b23a(0x3a9)](0x1);const _0x2889f6=_0x33cde0[_0x22b23a(0x3af)]??_0x510518[_0x22b23a(0x3af)],_0x7f391f=_0x16ab21(_0x434fdd,_0x2889f6);if(_0x33cde0[_0x22b23a(0x26a)]){_0x21f725(_0x190317,_0x7f391f);return;}let _0x189607=null;if(_0x85f45e[_0x22b23a(0x275)]){const _0x20336e=_0x85f45e[_0x22b23a(0x4d3)]('\x20');try{_0x189607=_0x428982(_0x20336e);}catch(_0x4cdee0){console[_0x22b23a(0x131)](_0x5a2cd3(_0x283405[_0x22b23a(0x599)],'\x0a\x20\x20Invalid\x20JSON:\x20'+_0x20336e+_0x22b23a(0x353)+_0x5a2cd3(_0x283405[_0x22b23a(0x345)],_0x4cdee0['message'])+'\x0a'));return;}}if(!_0xbb0273)_0xbb0273=_0x189607!==null?'POST':_0x22b23a(0x518);try{const _0x5ecd6b=await _0x6ae26a(_0x190317,_0xbb0273,_0x7f391f,_0x189607);_0x4528d5(_0x5ecd6b['status'],_0x5ecd6b['body']);}catch(_0x37a7ce){console[_0x22b23a(0x131)]('\x0a\x20\x20'+_0x5a2cd3(_0x283405[_0x22b23a(0x599)],'✗')+'\x20'+_0x37a7ce['message']+'\x0a');}}class _0x3f25ca{constructor(){const _0x27fa39=_0x467223;this['children']=new Map(),this['dynamic']=null,this[_0x27fa39(0x71f)]=![];}}function _0x5758b1(_0x2eb9e7){const _0x1e7666=_0x467223,_0x63ab91=new _0x3f25ca();for(const _0x2afd4c of _0x2eb9e7){if(_0x2afd4c['meta']?.[_0x1e7666(0x287)])continue;const _0xb78435=_0x2afd4c['path']['replace'](/^\/api/,'')[_0x1e7666(0x552)](/^\[\/env\/:env=[^\]]*\]/,'')[_0x1e7666(0x552)](/^\//,'');if(!_0xb78435)continue;let _0x445e61=_0x63ab91;for(const _0x172456 of _0xb78435[_0x1e7666(0x27b)]('/')['filter'](Boolean)){if(_0x172456[_0x1e7666(0x74f)](':')){const _0x1973e9=_0x172456[_0x1e7666(0x3a9)](0x1);if(!_0x445e61[_0x1e7666(0xb3)])_0x445e61[_0x1e7666(0xb3)]={'param':_0x1973e9,'node':new _0x3f25ca()};_0x445e61=_0x445e61[_0x1e7666(0xb3)][_0x1e7666(0x4d8)];}else{if(!_0x445e61['children']['has'](_0x172456))_0x445e61['children'][_0x1e7666(0x271)](_0x172456,new _0x3f25ca());_0x445e61=_0x445e61[_0x1e7666(0x5ea)][_0x1e7666(0x404)](_0x172456);}}_0x445e61['terminal']=!![];}return _0x63ab91;}const _0x119535=new Map();function _0x10ce28(_0x1ae3ad,_0x59f6fc,_0x2e2d3e){const _0x51e7ff=_0x467223,_0x53bde4=_0x119535[_0x51e7ff(0x404)](_0x1ae3ad);if(_0x53bde4&&_0x53bde4[_0x51e7ff(0x50a)]>Date[_0x51e7ff(0x2f4)]())return _0x53bde4[_0x51e7ff(0x461)];const _0x2600b9=_0x2e2d3e();return _0x119535[_0x51e7ff(0x271)](_0x1ae3ad,{'val':_0x2600b9,'exp':Date[_0x51e7ff(0x2f4)]()+_0x59f6fc}),_0x2600b9;}function _0x51c388(_0x2f778c,_0x152de2,_0x1ae8e4,_0x1aae29){const _0x43c92d=_0x467223,_0x2b085e=_0x152de2[_0x43c92d(0x3af)]??_0x1aae29[_0x43c92d(0x3af)];switch(_0x2f778c){case _0x43c92d(0x3af):return[..._0x1ae8e4[_0x43c92d(0x3ae)][_0x43c92d(0x157)]()][_0x43c92d(0x78a)](_0x261067=>!_0x261067['startsWith']('~'));case _0x43c92d(0x4cc):return _0x10ce28(_0x43c92d(0x65d)+_0x2b085e,0x7d0,()=>{const _0x42915c=_0x43c92d;try{return[..._0x1ae8e4[_0x42915c(0x3af)](_0x2b085e)[_0x42915c(0x73d)][_0x42915c(0x157)]()][_0x42915c(0x78a)](_0x391daa=>!_0x391daa[_0x42915c(0x74f)]('~'));}catch{return[];}});case _0x43c92d(0x1d9):if(!_0x152de2[_0x43c92d(0x4cc)])return[];return _0x10ce28(_0x43c92d(0x57f)+_0x2b085e+':'+_0x152de2[_0x43c92d(0x4cc)],0x5dc,()=>{const _0x549217=_0x43c92d;try{const _0x1e5a3f=_0x1ae8e4[_0x549217(0x3af)](_0x2b085e)[_0x549217(0x73d)][_0x549217(0x404)](_0x152de2[_0x549217(0x4cc)]);if(!_0x1e5a3f?.[_0x549217(0x343)])return[];const _0x5480cb=[];for(const {key:_0x422f3a}of _0x1e5a3f[_0x549217(0x343)][_0x549217(0x507)]({'limit':0x32})){_0x5480cb['push'](String(_0x422f3a));if(_0x5480cb[_0x549217(0x275)]>=0x32)break;}return _0x5480cb;}catch{return[];}});case _0x43c92d(0x591):if(!_0x152de2[_0x43c92d(0x4cc)])return[];return _0x10ce28('idx:'+_0x2b085e+':'+_0x152de2[_0x43c92d(0x4cc)],0x7d0,()=>{const _0xbdec9b=_0x43c92d;try{const _0x5823d0=_0x1ae8e4[_0xbdec9b(0x3af)](_0x2b085e)[_0xbdec9b(0x73d)][_0xbdec9b(0x404)](_0x152de2['type']);return _0x5823d0?[..._0x5823d0[_0xbdec9b(0x3f4)]?.[_0xbdec9b(0x157)]()??[]]:[];}catch{return[];}});case _0x43c92d(0x2ac):if(!_0x152de2[_0x43c92d(0x4cc)])return[];return _0x10ce28(_0x43c92d(0x4d5)+_0x2b085e+':'+_0x152de2['type'],0x7d0,()=>{const _0x5f4ce4=_0x43c92d;try{return _0x1ae8e4[_0x5f4ce4(0xbb)]?.['list']?.(_0x152de2[_0x5f4ce4(0x4cc)],_0x1ae8e4[_0x5f4ce4(0x3af)](_0x2b085e))?.[_0x5f4ce4(0x341)](_0x2bacd2=>_0x2bacd2[_0x5f4ce4(0x570)])??[];}catch{return[];}});default:return[];}}function _0x364971(_0x76fe56,_0x1401e8,_0x2e69f0,_0x8b7787){const _0x27ed4e=_0x467223,_0x147459=_0x76fe56[_0x27ed4e(0x59f)]('/'),_0x13ab05=_0x76fe56[_0x27ed4e(0x27b)]('/'),_0x5ac852=_0x147459?_0x13ab05['slice'](0x0,-0x1):_0x13ab05['slice'](0x0,-0x1),_0x467cc7=_0x147459?'':_0x13ab05[_0x13ab05[_0x27ed4e(0x275)]-0x1];let _0x40ef50=_0x1401e8;const _0x895cf={};for(const _0x422bfc of _0x5ac852){if(!_0x422bfc)continue;if(_0x40ef50[_0x27ed4e(0x5ea)]['has'](_0x422bfc))_0x40ef50=_0x40ef50['children']['get'](_0x422bfc);else{if(_0x40ef50['dynamic'])_0x895cf[_0x40ef50[_0x27ed4e(0xb3)][_0x27ed4e(0x1fb)]]=_0x422bfc,_0x40ef50=_0x40ef50[_0x27ed4e(0xb3)][_0x27ed4e(0x4d8)];else return[];}}const _0x4c017a=_0x5ac852[_0x27ed4e(0x78a)](Boolean),_0x45b276=_0x4c017a[_0x27ed4e(0x275)]?_0x4c017a[_0x27ed4e(0x4d3)]('/')+'/':'',_0x266082=[];for(const [_0x59ad2f]of _0x40ef50[_0x27ed4e(0x5ea)]){if(_0x59ad2f[_0x27ed4e(0x74f)](_0x467cc7))_0x266082[_0x27ed4e(0x1c7)](_0x45b276+_0x59ad2f);}if(_0x40ef50['dynamic'])for(const _0x132f44 of _0x51c388(_0x40ef50[_0x27ed4e(0xb3)]['param'],_0x895cf,_0x2e69f0,_0x8b7787)){if(String(_0x132f44)['startsWith'](_0x467cc7))_0x266082[_0x27ed4e(0x1c7)](_0x45b276+_0x132f44);}return _0x266082[_0x27ed4e(0x3a9)](0x0,0x64);}const _0x196c0e=[_0x467223(0x26a),_0x467223(0x105),_0x467223(0x3af),_0x467223(0x51a),_0x467223(0x107),_0x467223(0x30e),_0x467223(0x62b),_0x467223(0x462),'exit',_0x467223(0x10b)];function _0x382a9b(_0x26132a,_0x12fd41,_0x4928e6){return function _0x33d817(_0x22ac82){const _0x5e52e7=_0x51c5;try{const _0x5d8d4f=_0x22ac82[_0x5e52e7(0x61c)](/\s[{[]/),_0x3555d=_0x5d8d4f>=0x0?_0x22ac82[_0x5e52e7(0x3a9)](0x0,_0x5d8d4f):_0x22ac82,_0x5d8250=_0x3555d[_0x5e52e7(0x163)]();if(!_0x5d8250){const _0x41a25a=[..._0x196c0e,...[..._0x26132a[_0x5e52e7(0x5ea)]['keys']()]][_0x5e52e7(0x3a9)](0x0,0x64);return[_0x41a25a,''];}const _0x4c0d15=_0x5d8250[_0x5e52e7(0x27b)](/\s+/),_0x306b17=_0x4c0d15[0x0],_0x122224=_0x306b17[_0x5e52e7(0x623)]();if(_0x4c0d15['length']===0x1){const _0x23f9fc=_0x306b17[_0x5e52e7(0x46c)](),_0x4d7a1d=_0x196c0e[_0x5e52e7(0x78a)](_0xc2d206=>_0xc2d206[_0x5e52e7(0x74f)](_0x23f9fc)),_0x371a3b=_0x364971(_0x306b17,_0x26132a,_0x12fd41,_0x4928e6),_0x561ff0=[...new Set([..._0x4d7a1d,..._0x371a3b])]['slice'](0x0,0x64);return[_0x561ff0,_0x306b17];}if(_0x47d03a[_0x5e52e7(0x7b1)](_0x122224)&&_0x4c0d15[_0x5e52e7(0x275)]===0x2){const _0x573614=_0x4c0d15[0x1],_0x471c0e=_0x364971(_0x573614,_0x26132a,_0x12fd41,_0x4928e6);return[_0x471c0e['map'](_0xe91fef=>_0x306b17+'\x20'+_0xe91fef),_0x306b17+'\x20'+_0x573614];}if(!_0x47d03a[_0x5e52e7(0x7b1)](_0x122224)&&_0x4c0d15[_0x5e52e7(0x275)]>0x1){const _0x94215d=_0x364971(_0x306b17,_0x26132a,_0x12fd41,_0x4928e6),_0x5ae0eb='\x20'+_0x4c0d15['slice'](0x1)[_0x5e52e7(0x4d3)]('\x20');return[_0x94215d[_0x5e52e7(0x341)](_0x162f78=>_0x162f78+_0x5ae0eb),_0x306b17+_0x5ae0eb];}return[[],_0x22ac82];}catch{return[[],_0x22ac82];}};}async function _0x328073(_0x690f77,_0x20443b){const _0x33491b=_0x467223,_0x5bd51c={'enabled':!![],'level':_0x20443b[_0x33491b(0x367)]??'info'},_0x5eed26={'env':_0x33491b(0x58f)},_0x16d8a2={'current':null},_0x537374=_0x5758b1(_0x690f77['http'][_0x33491b(0x24f)]()),_0x1544c0=_0x382a9b(_0x537374,_0x690f77,_0x5eed26);_0x690f77[_0x33491b(0x2fd)][_0x33491b(0xbf)](_0x265992=>{const _0x411e15=_0x33491b;if(!_0x5bd51c[_0x411e15(0x47e)])return;_0x38f694(_0x265992,_0x5bd51c[_0x411e15(0x2b4)]),_0x16d8a2[_0x411e15(0x209)]?.[_0x411e15(0x215)](!![]);}),_0x58fe45(_0x690f77,_0x20443b);const _0xeff228=_0x1e0ee6[_0x33491b(0xc8)]({'input':process['stdin'],'output':process[_0x33491b(0x6be)],'terminal':!![],'completer':_0x1544c0,'prompt':_0x5c2099(_0x5eed26),'historySize':_0x43fcc3});try{const _0x4a4ee6=_0x2142ad['readFileSync'](_0x1262ae,'utf8')[_0x33491b(0x27b)]('\x0a')[_0x33491b(0x78a)](Boolean);_0xeff228['history']=_0x4a4ee6['reverse']()[_0x33491b(0x3a9)](0x0,_0x43fcc3);}catch{}_0x16d8a2[_0x33491b(0x209)]=_0xeff228,_0xeff228['on'](_0x33491b(0x43b),async _0x390ee6=>{const _0x57d26d=_0x33491b;_0xeff228['pause']();try{await _0xafaf24(_0x390ee6,_0x690f77,_0x20443b,_0x5bd51c,_0x5eed26,_0xeff228);}catch(_0xe22de7){console[_0x57d26d(0x131)](_0x5a2cd3(_0x283405[_0x57d26d(0x599)],'\x20\x20Error:\x20'+_0xe22de7[_0x57d26d(0x63f)]));}finally{_0xeff228[_0x57d26d(0x42d)](),_0xeff228['prompt']();}}),_0xeff228['on'](_0x33491b(0x3fb),()=>{const _0x5a3aba=_0x33491b;try{const _0x20200d=[..._0xeff228[_0x5a3aba(0x719)]][_0x5a3aba(0x66c)]()['filter'](Boolean)[_0x5a3aba(0x3a9)](0x0,_0x43fcc3);_0x2142ad[_0x5a3aba(0x789)](_0x1262ae,_0x20200d['join']('\x0a')+'\x0a');}catch{}_0x41f86a(_0x690f77,0x0);});let _0x47eb95=0x0;return process['on'](_0x33491b(0x779),()=>{const _0x1c2455=_0x33491b;if(_0x15b7e0)return _0x41f86a(_0x690f77,0x82,_0x1c2455(0x779));if(_0xeff228[_0x1c2455(0x43b)]==='')return _0x41f86a(_0x690f77,0x0,_0x1c2455(0x779));const _0x9fefb0=Date[_0x1c2455(0x2f4)]();if(_0x9fefb0-_0x47eb95<0x5dc)return _0x41f86a(_0x690f77,0x0,_0x1c2455(0x152));_0x47eb95=_0x9fefb0,process[_0x1c2455(0x6be)]['write']('\x0a'),_0xeff228[_0x1c2455(0x674)](0x0),_0xeff228[_0x1c2455(0x215)](),process[_0x1c2455(0x602)][_0x1c2455(0x598)](_0x5a2cd3(_0x283405[_0x1c2455(0x345)],_0x1c2455(0x670)));}),process['on'](_0x33491b(0x320),()=>_0x41f86a(_0x690f77,0x0,_0x33491b(0x320))),process['on'](_0x33491b(0x441),()=>_0x41f86a(_0x690f77,0x0,_0x33491b(0x441))),_0xeff228[_0x33491b(0x215)](),_0xeff228;}return okdbShell={'start':_0x328073,'colorLog':_0x38f694,'lenientParse':_0x428982,'_splitLine':_0x353478,'_formatRouteHelpLines':_0x2c2f5a,'_routeSummary':_0x2bab16,'_routeTags':_0x3dabd3},okdbShell;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x3bc2d2=_0x29bffd;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x562d96,performance:_0x48457b}=require$$0$4,_0x5093de=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG==='true',_0x572326=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x28fba2=process.env.OKDB_LOOP_LAG_ALL==='1',_0x213fd0=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x5959c9{constructor(){const _0x3b55ce=_0x51c5;this[_0x3b55ce(0x47e)]=_0x5093de,this[_0x3b55ce(0x725)]=new Map(),this['_h']=null,this[_0x3b55ce(0x69c)]=null,this[_0x3b55ce(0x306)]=![],this[_0x3b55ce(0x5ef)]=(_0x1f0fe2,_0x2bf02f)=>process['stderr'][_0x3b55ce(0x598)](_0x1f0fe2+(_0x2bf02f?'\x20'+JSON[_0x3b55ce(0x490)](_0x2bf02f):'')+'\x0a');}[_0x3bc2d2(0x2f4)](){return _0x48457b['now']();}['setLogger'](_0x5ee514){const _0x56f5b4=_0x3bc2d2;if(typeof _0x5ee514==='function')this[_0x56f5b4(0x5ef)]=_0x5ee514;}[_0x3bc2d2(0x44f)](_0x29268b,_0x2521dd,_0x1adcd2){const _0x1beb37=_0x3bc2d2;if(!this[_0x1beb37(0x47e)])return;let _0x26a360=this[_0x1beb37(0x725)][_0x1beb37(0x404)](_0x29268b);!_0x26a360&&(_0x26a360={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this['_buckets'][_0x1beb37(0x271)](_0x29268b,_0x26a360)),_0x26a360['ms']+=_0x2521dd,_0x26a360[_0x1beb37(0x6a4)]+=0x1,_0x2521dd>_0x26a360[_0x1beb37(0xb6)]&&(_0x26a360[_0x1beb37(0xb6)]=_0x2521dd,_0x26a360[_0x1beb37(0x4e3)]=_0x1adcd2||'');}[_0x3bc2d2(0x57c)](_0x3b24a){const _0x2b64ef=_0x3bc2d2;if(!this[_0x2b64ef(0x47e)]||this[_0x2b64ef(0x306)])return;this[_0x2b64ef(0x306)]=!![];if(_0x3b24a)this[_0x2b64ef(0x5ef)]=_0x3b24a;this['_h']=_0x562d96({'resolution':0xa}),this['_h'][_0x2b64ef(0x247)](),this[_0x2b64ef(0x69c)]=setInterval(()=>this[_0x2b64ef(0x36a)](),_0x572326);if(this[_0x2b64ef(0x69c)][_0x2b64ef(0x334)])this[_0x2b64ef(0x69c)][_0x2b64ef(0x334)]();}[_0x3bc2d2(0x5c6)](_0x451c3d){const _0x21b7f6=_0x3bc2d2;if(!this[_0x21b7f6(0x216)])this[_0x21b7f6(0x216)]=new Set();this[_0x21b7f6(0x216)][_0x21b7f6(0x32c)](_0x451c3d);if(!this[_0x21b7f6(0x306)])this[_0x21b7f6(0x1ce)]();}['offWindow'](_0x3ce927){const _0x502a53=_0x3bc2d2;this[_0x502a53(0x216)]?.[_0x502a53(0x3ac)](_0x3ce927);}[_0x3bc2d2(0x1ce)](){const _0x46cefc=_0x3bc2d2;if(this[_0x46cefc(0xec)])return;this[_0x46cefc(0xec)]=!![];!this['_h']&&(this['_h']=_0x562d96({'resolution':0xa}),this['_h'][_0x46cefc(0x247)]());const _0x5ea2da=_0x572326;this[_0x46cefc(0x2a6)]=setInterval(()=>{const _0x9b8346=_0x46cefc,_0x1d1cef=this['_h'];if(!_0x1d1cef)return;const _0x144f8c=_0x1d1cef[_0x9b8346(0x483)](0x63)/0xf4240,_0x596340=_0x1d1cef[_0x9b8346(0x114)]/0xf4240,_0x83de7c=_0x1d1cef[_0x9b8346(0x279)]/0xf4240;_0x1d1cef[_0x9b8346(0x65e)]();if(this[_0x9b8346(0x216)])for(const _0x2e4ba3 of this[_0x9b8346(0x216)]){try{_0x2e4ba3({'p99Ms':_0x144f8c,'maxMs':_0x596340,'meanMs':_0x83de7c,'reportMs':_0x5ea2da});}catch{}}},_0x5ea2da);if(this[_0x46cefc(0x2a6)]['unref'])this['_admissionTimer'][_0x46cefc(0x334)]();}[_0x3bc2d2(0x36a)](){const _0x1ac1fd=_0x3bc2d2,_0x37c9c7=this['_h'],_0x219858=_0x37c9c7[_0x1ac1fd(0x114)]/0xf4240,_0x2e61d6=_0x37c9c7[_0x1ac1fd(0x483)](0x63)/0xf4240,_0x256daf=_0x37c9c7['mean']/0xf4240;_0x37c9c7[_0x1ac1fd(0x65e)]();const _0x2da644=[...this[_0x1ac1fd(0x725)][_0x1ac1fd(0x597)]()][_0x1ac1fd(0x341)](([_0x6931ee,_0x1faf14])=>({'label':_0x6931ee,..._0x1faf14}))['sort']((_0x39071f,_0x4f9405)=>_0x4f9405['ms']-_0x39071f['ms'])[_0x1ac1fd(0x3a9)](0x0,0x8);this[_0x1ac1fd(0x725)][_0x1ac1fd(0x44d)]();const _0x409425=_0x2da644['reduce']((_0xfed35b,_0x482b7b)=>_0xfed35b+_0x482b7b['ms'],0x0),_0x32f41b=_0x2da644[_0x1ac1fd(0x341)](_0x4ac28b=>_0x4ac28b[_0x1ac1fd(0x780)]+'='+_0x4ac28b['ms'][_0x1ac1fd(0x70d)](0x0)+_0x1ac1fd(0x1d0)+_0x4ac28b[_0x1ac1fd(0x6a4)]+(_0x4ac28b['maxMs']>0x5?_0x1ac1fd(0x12d)+_0x4ac28b[_0x1ac1fd(0xb6)][_0x1ac1fd(0x70d)](0x0)+'ms'+(_0x4ac28b['maxExtra']?'\x20'+_0x4ac28b[_0x1ac1fd(0x4e3)]:'')+')':''));(_0x28fba2||_0x219858>=_0x213fd0)&&this[_0x1ac1fd(0x5ef)](_0x1ac1fd(0x629)+_0x572326+_0x1ac1fd(0x4b5)+_0x219858[_0x1ac1fd(0x70d)](0x0)+'ms\x20p99='+_0x2e61d6[_0x1ac1fd(0x70d)](0x0)+_0x1ac1fd(0x153)+_0x256daf[_0x1ac1fd(0x70d)](0x0)+'ms\x20busy='+_0x409425[_0x1ac1fd(0x70d)](0x0)+'ms'+(_0x32f41b[_0x1ac1fd(0x275)]?'\x20│\x20'+_0x32f41b[_0x1ac1fd(0x4d3)]('\x20\x20'):''),{'feature':_0x1ac1fd(0x1ae)});if(this[_0x1ac1fd(0x216)])for(const _0x1928df of this[_0x1ac1fd(0x216)]){try{_0x1928df({'p99Ms':_0x2e61d6,'maxMs':_0x219858,'meanMs':_0x256daf,'reportMs':_0x572326});}catch{}}}[_0x3bc2d2(0x4a5)](){const _0x52f0a4=_0x3bc2d2;if(this[_0x52f0a4(0x69c)])clearInterval(this[_0x52f0a4(0x69c)]);if(this['_h'])this['_h'][_0x52f0a4(0x70e)]();this[_0x52f0a4(0x69c)]=null,this['_h']=null,this[_0x52f0a4(0x306)]=![];}}const _0x5f91bf=new _0x5959c9();if(_0x5f91bf[_0x3bc2d2(0x47e)])_0x5f91bf['start']();return okdbLoopMonitor={'LOOP':_0x5f91bf},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x3d30c6=require$$0$1,_0x437e7d=require$$1;let _0x3e9e1c,_0x4399f1,_0x323188,_0x5525c4,_0x2aa9b9,_0x33b1f7,_0x111336,_0x3625e0=![];const _0x5b0d7b=new Set();let _0x537daa=null;const _0x35dac6=new Map();function _0x42fc96(){const _0x4ce464=_0x51c5;if(_0x3e9e1c!==undefined)return _0x3e9e1c;_0x3e9e1c=process.env.OKDB_DIAG==='1';if(!_0x3e9e1c)return![];_0x4399f1=process.env.OKDB_DIAG_STACK==='1',_0x5525c4=Math[_0x4ce464(0x114)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x323188=new Array(_0x5525c4),_0x2aa9b9=0x0,_0x33b1f7=0x0,_0x111336=process.env.OKDB_DIAG_DIR||null;if(_0x111336)try{_0x3d30c6['mkdirSync'](_0x111336,{'recursive':!![]});}catch{}return!![];}function _0x4bbc9e(){return _0x3e9e1c===undefined?_0x42fc96():_0x3e9e1c;}function _0x1b2349(_0x51c8ea,_0x2d4781){const _0x56d39b=_0x51c5;if(_0x3e9e1c===undefined?!_0x42fc96():!_0x3e9e1c)return;let _0x48b95a;if(_0x4399f1){const _0x1e364e=new Error()['stack']||'';_0x48b95a=_0x1e364e[_0x56d39b(0x27b)]('\x0a')[_0x56d39b(0x3a9)](0x3)['map'](_0x1b9294=>_0x1b9294[_0x56d39b(0x1c1)]())['filter'](Boolean)['slice'](0x0,0x8);}_0x323188[_0x2aa9b9]={'seq':_0x33b1f7++,'t':Date[_0x56d39b(0x2f4)](),'env':_0x51c8ea,'kind':_0x2d4781||_0x56d39b(0x443),'stack':_0x48b95a},_0x2aa9b9=(_0x2aa9b9+0x1)%_0x5525c4;}function _0x5a641e(_0x8a6244){const _0x3d554b=_0x51c5,_0x1d4616=[];for(let _0x28d7c5=0x0;_0x28d7c5<_0x5525c4;_0x28d7c5++){const _0x42c767=_0x323188[(_0x2aa9b9-0x1-_0x28d7c5+_0x5525c4*0x2)%_0x5525c4];if(!_0x42c767)continue;_0x1d4616[_0x3d554b(0x1c7)](_0x42c767);if(_0x1d4616[_0x3d554b(0x275)]>=_0x8a6244)break;}return _0x1d4616;}function _0x1b0b28(_0x573996){const _0x251fc2=_0x51c5;try{process[_0x251fc2(0x602)][_0x251fc2(0x598)](_0x573996+'\x0a');}catch{}if(_0x111336)try{_0x3d30c6[_0x251fc2(0x24e)](_0x437e7d['join'](_0x111336,_0x251fc2(0x757)+process[_0x251fc2(0x3ca)]+_0x251fc2(0x156)),_0x573996+'\x0a');}catch{}}function _0x584b5c(_0x685e69){const _0x3ae859=_0x51c5,_0x4c2ae6=_0x5a641e(_0x685e69);if(!_0x4c2ae6[_0x3ae859(0x275)])return'\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)';const _0x2baadf=Date[_0x3ae859(0x2f4)]();return _0x4c2ae6[_0x3ae859(0x341)](_0x59ebac=>{const _0xfbcd4f=_0x3ae859,_0x29307f=_0xfbcd4f(0x364)+_0x59ebac['seq']+'\x20-'+(_0x2baadf-_0x59ebac['t'])+_0xfbcd4f(0x2f6)+_0x59ebac[_0xfbcd4f(0x3af)]+'\x20'+_0x59ebac['kind'];return _0x59ebac[_0xfbcd4f(0x37e)]&&_0x59ebac['stack']['length']?_0x29307f+'\x0a\x20\x20\x20\x20\x20\x20'+_0x59ebac[_0xfbcd4f(0x37e)][_0xfbcd4f(0x4d3)](_0xfbcd4f(0x4be)):_0x29307f;})[_0x3ae859(0x4d3)]('\x0a');}function _0x38dad1(_0x7efb75,_0x5a896d){const _0x3d3cd2=_0x51c5,_0x19502a=_0x3d3cd2(0x54e)+_0x7efb75+_0x3d3cd2(0x5f8)+new Date()[_0x3d3cd2(0x5ab)]()+'\x20pid='+process['pid']+_0x3d3cd2(0x5c1),_0x1ca40c=[_0x19502a,_0x3d3cd2(0x354)+(_0x5a896d&&_0x5a896d[_0x3d3cd2(0x37e)]?_0x5a896d['stack'][_0x3d3cd2(0x27b)]('\x0a')[0x0]:_0x5a896d),_0x3d3cd2(0x79a)+(_0x4399f1?'':'\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site')+':',_0x584b5c(0x18),_0x1a9f8a(),'='[_0x3d3cd2(0x749)](_0x19502a[_0x3d3cd2(0x275)]-0x1)];_0x1b0b28(_0x1ca40c[_0x3d3cd2(0x4d3)]('\x0a'));}function _0x336656(_0xbe46b5){const _0x46ef4e=_0x51c5;if(!_0x4bbc9e())return;const _0x3f869a=String(_0xbe46b5&&_0xbe46b5[_0x46ef4e(0x63f)]||_0xbe46b5||''),_0x5890e6=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x46ef4e(0x30a)](_0x3f869a);_0x38dad1(_0x5890e6?_0x46ef4e(0x3d3):_0x46ef4e(0x523),_0xbe46b5);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x5890e6)return;try{console[_0x46ef4e(0x131)](_0xbe46b5&&_0xbe46b5[_0x46ef4e(0x37e)]?_0xbe46b5[_0x46ef4e(0x37e)]:_0xbe46b5);}catch{}process[_0x46ef4e(0x282)](0x1);}function _0x5c07af(_0x4f824c){if(!_0x4bbc9e())return;const _0x2148eb=String(_0x4f824c&&_0x4f824c['message']||_0x4f824c||'');/already closed|environment is already|invalid read txn|reset an invalid/i['test'](_0x2148eb)&&_0x38dad1('ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)',_0x4f824c);}function _0x1a9f8a(){const _0x11b49e=_0x51c5,_0x21841c=[_0x11b49e(0x712)];let _0x34beac=![];for(const _0x448ea0 of _0x5b0d7b){const _0x4f8199=_0x448ea0&&_0x448ea0[_0x11b49e(0x3ae)];if(!_0x4f8199)continue;for(const [_0x34b1fc,_0x25f6ab]of _0x4f8199){const _0xa595f=_0x25f6ab&&_0x25f6ab[_0x11b49e(0x426)]&&_0x25f6ab['_coordinator'][_0x11b49e(0x269)];if(!_0xa595f)continue;let _0x395dd3,_0x116ab6;try{_0x395dd3=Atomics['load'](_0xa595f,0x0),_0x116ab6=Atomics['load'](_0xa595f,0x1);}catch{continue;}if(_0x395dd3===0x0)continue;_0x34beac=!![];const _0x3ce552=_0x395dd3>0x0?_0x11b49e(0x3b7):_0x11b49e(0xf1),_0x4bcaf9=Date[_0x11b49e(0x2f4)]()-Math['abs'](_0x395dd3)*0x3e8,_0x931f6d=((()=>{const _0x2c3dc3=_0x11b49e;try{return _0x25f6ab['_writer']&&_0x25f6ab['_writer'][_0x2c3dc3(0x493)]?_0x25f6ab['_writer']['status']():null;}catch{return null;}})());_0x21841c[_0x11b49e(0x1c7)](_0x11b49e(0x10e)+_0x34b1fc+_0x11b49e(0x57e)+_0x3ce552+_0x11b49e(0x564)+_0x4bcaf9+_0x11b49e(0x663)+_0x116ab6+(_0x931f6d?_0x11b49e(0x1b6)+_0x931f6d[_0x11b49e(0x469)]+_0x11b49e(0x604)+_0x931f6d['oldestPendingMs']+'\x20parkedNow='+_0x931f6d[_0x11b49e(0x510)]+'}':''));}}if(!_0x34beac)_0x21841c[_0x11b49e(0x1c7)](_0x11b49e(0x6ee));return _0x21841c[_0x11b49e(0x4d3)]('\x0a');}function _0x4a8ca5(){const _0x16cd77=_0x51c5;if(!_0x4bbc9e())return;const _0x376d69=Math[_0x16cd77(0x114)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x4a9c2d=Date[_0x16cd77(0x2f4)]();for(const _0x1a44fd of _0x5b0d7b){const _0x2c3686=_0x1a44fd&&_0x1a44fd[_0x16cd77(0x3ae)];if(!_0x2c3686)continue;for(const [_0x2e664a,_0x3b22d1]of _0x2c3686){const _0x3f4cba=_0x3b22d1&&_0x3b22d1[_0x16cd77(0x426)]&&_0x3b22d1['_coordinator'][_0x16cd77(0x269)];if(!_0x3f4cba)continue;let _0x3a4832;try{_0x3a4832=Atomics[_0x16cd77(0x240)](_0x3f4cba,0x0);}catch{continue;}const _0x5d3374=_0x1a44fd[_0x16cd77(0x272)]+'|'+_0x2e664a;if(_0x3a4832<=0x0){_0x35dac6[_0x16cd77(0x3ac)](_0x5d3374);continue;}const _0x4d6046=_0x4a9c2d-_0x3a4832*0x3e8,_0x52c77a=_0x35dac6[_0x16cd77(0x404)](_0x5d3374);if(_0x4d6046<_0x376d69)continue;if(_0x52c77a&&_0x4a9c2d-_0x52c77a[_0x16cd77(0x774)]<_0x376d69)continue;_0x35dac6[_0x16cd77(0x271)](_0x5d3374,{'firstTs':_0x52c77a?_0x52c77a['firstTs']:_0x3a4832,'dumpedAt':_0x4a9c2d});const _0x12c6fe='\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20'+_0x4d6046+_0x16cd77(0x548)+_0x2e664a+'\x20@\x20'+new Date()['toISOString']()+'\x20pid='+process[_0x16cd77(0x3ca)]+_0x16cd77(0x5c1);_0x1b0b28([_0x12c6fe,_0x1a9f8a(),'='[_0x16cd77(0x749)](_0x12c6fe[_0x16cd77(0x275)]-0x1)]['join']('\x0a'));}}}function _0x3431be(){const _0x5a532e=_0x51c5;if(!_0x4bbc9e()||_0x3625e0)return;_0x3625e0=!![],process[_0x5a532e(0x6f8)]('uncaughtException',_0x336656),process['prependListener']('unhandledRejection',_0x5c07af);const _0x2e1641=Math['max'](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x537daa=setInterval(_0x4a8ca5,_0x2e1641);if(_0x537daa['unref'])_0x537daa[_0x5a532e(0x334)]();}function _0x22e1bb(_0x187f66){if(!_0x4bbc9e()||!_0x187f66)return;_0x5b0d7b['add'](_0x187f66),_0x3431be();}function _0x3f687b(_0x53754e){const _0x47318f=_0x51c5;_0x5b0d7b[_0x47318f(0x3ac)](_0x53754e);}function _0x452f86(){const _0x1c6246=_0x51c5;if(!_0x4bbc9e())return{'enabled':![],'hint':_0x1c6246(0x5c9)};return{'enabled':!![],'stackCapture':!!_0x4399f1,'recentWrites':_0x5a641e(0x10),'drain':_0x1a9f8a()};}return okdbDiag={'isEnabled':_0x4bbc9e,'recordWrite':_0x1b2349,'installDiag':_0x3431be,'registerOkdb':_0x22e1bb,'unregisterOkdb':_0x3f687b,'snapshot':_0x452f86},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x4971ab=_0x29bffd;if(hasRequiredOkdbWriter)return okdbWriter[_0x4971ab(0x2fb)];hasRequiredOkdbWriter=0x1;const {performance:_0x160971}=require$$0$5,_0x3f2f24=requireOkdbDiag(),_0x3964f3=process.env.OKDB_COMMIT_MODE===_0x4971ab(0x155);class _0x2de1be{constructor(_0x3064ec){const _0x40a987=_0x4971ab;this[_0x40a987(0x3af)]=_0x3064ec,this[_0x40a987(0x1a1)]=new Set(),this['_enqueuedAt']=new Map(),this[_0x40a987(0x40c)]=0x0,this[_0x40a987(0xe2)]=[],this[_0x40a987(0x12e)]=[],this['_highWater']=Math[_0x40a987(0x114)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x40a987(0x475)]=0x0,this[_0x40a987(0x2e8)]=[],this['_bpParkedTotal']=0x0,this['_held']=null,this[_0x40a987(0x70f)]=0x0,this[_0x40a987(0x716)]=0x0,this['_nestedWarned']=![];}async['transaction'](_0x428f25,_0x3e6692,{admitted:admitted=![]}={}){const _0x78d566=_0x4971ab;if(_0x3f2f24[_0x78d566(0x4bc)]())_0x3f2f24[_0x78d566(0x756)](this[_0x78d566(0x3af)]?.[_0x78d566(0x570)],_0x3e6692);if(this[_0x78d566(0x17f)]){const _0x14e41b=new Error(_0x78d566(0x184));_0x14e41b[_0x78d566(0x737)]=_0x78d566(0x291);throw _0x14e41b;}if(this[_0x78d566(0x777)]>0x0){let _0x48d2a6=![];while(this[_0x78d566(0x475)]>=this[_0x78d566(0x777)]&&!this[_0x78d566(0x17f)]){!_0x48d2a6&&(_0x48d2a6=!![],this[_0x78d566(0x727)]++),await new Promise(_0x3709c1=>this['_bpWaiters'][_0x78d566(0x1c7)](_0x3709c1));}if(this[_0x78d566(0x17f)]){const _0x50bae7=new Error(_0x78d566(0x184));_0x50bae7[_0x78d566(0x737)]=_0x78d566(0x291);throw _0x50bae7;}}this[_0x78d566(0x475)]++;const _0x54efc0=admitted?null:this['env'][_0x78d566(0x426)];for(;;){while(this[_0x78d566(0x1a9)])await this[_0x78d566(0x1a9)];if(_0x54efc0)try{await _0x54efc0[_0x78d566(0x1ff)]();}catch(_0x2123f0){this['_outstanding']--;if(this[_0x78d566(0x2e8)][_0x78d566(0x275)]&&this[_0x78d566(0x475)]<this[_0x78d566(0x777)])this['_bpWaiters'][_0x78d566(0x119)]()();throw _0x2123f0;}if(!this[_0x78d566(0x1a9)])break;if(_0x54efc0)_0x54efc0[_0x78d566(0x7a3)]();}if(this[_0x78d566(0x17f)]){if(_0x54efc0)_0x54efc0[_0x78d566(0x7a3)]();this['_outstanding']--;if(this['_bpWaiters']['length']&&this[_0x78d566(0x475)]<this[_0x78d566(0x777)])this['_bpWaiters'][_0x78d566(0x119)]()();const _0x373901=new Error(_0x78d566(0x184));_0x373901['code']='ENV_CLOSING_RETRY';throw _0x373901;}const _0x2d9dba=_0x160971[_0x78d566(0x2f4)]();if(_0x3964f3)try{const _0x348024=this[_0x78d566(0x3af)]['db']['transactionSync'](_0x428f25);this[_0x78d566(0x40c)]++;if(this[_0x78d566(0xe2)]['push'](_0x160971[_0x78d566(0x2f4)]()-_0x2d9dba)>0x100)this[_0x78d566(0xe2)][_0x78d566(0x119)]();if(this[_0x78d566(0x12e)][_0x78d566(0x1c7)](_0x160971[_0x78d566(0x2f4)]())>0x800)this[_0x78d566(0x12e)][_0x78d566(0x119)]();return _0x348024;}finally{this['_outstanding']--;if(this['_bpWaiters'][_0x78d566(0x275)]&&this[_0x78d566(0x475)]<this[_0x78d566(0x777)])this[_0x78d566(0x2e8)][_0x78d566(0x119)]()();if(_0x54efc0)_0x54efc0[_0x78d566(0x7a3)]();}let _0x72e568=null;const _0xf04f46=()=>{const _0x1d021f=_0x78d566,_0x303eab=_0x428f25();if(_0x303eab&&typeof _0x303eab['then']===_0x1d021f(0x5c8)&&!_0x72e568){this['_heldTotal']++;let _0x4e05e0;const _0x3f2729=new Promise(_0x50fa39=>_0x4e05e0=_0x50fa39);this[_0x1d021f(0x1a9)]=_0x3f2729,_0x72e568=()=>{const _0xf0f5d9=_0x1d021f;if(this[_0xf0f5d9(0x1a9)]===_0x3f2729)this[_0xf0f5d9(0x1a9)]=null;_0x4e05e0();};}return _0x303eab;};let _0x194eae;try{_0x194eae=this['env']['db']['childTransaction'](_0xf04f46);}catch(_0x1964d4){_0x194eae=Promise[_0x78d566(0x6ce)](_0x1964d4);}(!_0x194eae||typeof _0x194eae['then']!=='function')&&(this[_0x78d566(0x716)]++,!this[_0x78d566(0x5e7)]&&(this[_0x78d566(0x5e7)]=!![],console[_0x78d566(0x27f)]('okdb-writer['+(this[_0x78d566(0x3af)]?.[_0x78d566(0x570)]??'?')+_0x78d566(0x72a))),_0x194eae=Promise[_0x78d566(0x3c9)](_0x194eae));const _0x313448=()=>{if(_0x72e568)_0x72e568();};_0x194eae[_0x78d566(0x496)](_0x313448,_0x313448),this[_0x78d566(0x1a1)][_0x78d566(0x32c)](_0x194eae),this[_0x78d566(0x4ba)]['set'](_0x194eae,_0x2d9dba);const _0xaab877=()=>{const _0x161f99=_0x78d566;this[_0x161f99(0x1a1)][_0x161f99(0x3ac)](_0x194eae),this[_0x161f99(0x4ba)][_0x161f99(0x3ac)](_0x194eae),this[_0x161f99(0x40c)]++,this['_outstanding']--;this[_0x161f99(0x2e8)][_0x161f99(0x275)]&&this[_0x161f99(0x475)]<this['_highWater']&&this[_0x161f99(0x2e8)][_0x161f99(0x119)]()();if(this[_0x161f99(0xe2)][_0x161f99(0x1c7)](_0x160971[_0x161f99(0x2f4)]()-_0x2d9dba)>0x100)this[_0x161f99(0xe2)][_0x161f99(0x119)]();if(this[_0x161f99(0x12e)][_0x161f99(0x1c7)](_0x160971[_0x161f99(0x2f4)]())>0x800)this[_0x161f99(0x12e)][_0x161f99(0x119)]();};_0x194eae['then'](_0xaab877,_0xaab877);try{return await _0x194eae;}finally{if(_0x54efc0)_0x54efc0['afterWrite']();}}['status'](){const _0x41249e=_0x4971ab,_0x58a5d0=_0x160971[_0x41249e(0x2f4)]();let _0x2dcc91=0x0;for(const _0x536ebd of this[_0x41249e(0x4ba)][_0x41249e(0x337)]()){const _0x2d2eca=_0x58a5d0-_0x536ebd;if(_0x2d2eca>_0x2dcc91)_0x2dcc91=_0x2d2eca;}let _0x428c28=0x0;for(let _0x368c4f=this[_0x41249e(0x12e)][_0x41249e(0x275)]-0x1;_0x368c4f>=0x0;_0x368c4f--){if(_0x58a5d0-this[_0x41249e(0x12e)][_0x368c4f]>0x3e8)break;_0x428c28++;}let _0xa65cbc=0x0;if(this['_durs']['length']){const _0x44defc=[...this[_0x41249e(0xe2)]][_0x41249e(0x21a)]((_0x517725,_0x479944)=>_0x517725-_0x479944);_0xa65cbc=_0x44defc[Math[_0x41249e(0x1d6)](_0x44defc['length']-0x1,Math['floor'](_0x44defc[_0x41249e(0x275)]*0.99))];}return{'depth':this[_0x41249e(0x1a1)][_0x41249e(0x187)],'oldestPendingMs':Math['round'](_0x2dcc91),'committed':this['_committed'],'commitsPerSec':_0x428c28,'commitP99Ms':Math[_0x41249e(0x613)](_0xa65cbc),'parkedNow':this[_0x41249e(0x2e8)][_0x41249e(0x275)],'parkedTotal':this['_bpParkedTotal'],'highWater':this[_0x41249e(0x777)]};}['inflightAgesMs'](){const _0x309713=_0x4971ab,_0x226af0=_0x160971[_0x309713(0x2f4)]();return[...this[_0x309713(0x4ba)][_0x309713(0x337)]()][_0x309713(0x341)](_0x288bd8=>Math[_0x309713(0x613)](_0x226af0-_0x288bd8))[_0x309713(0x21a)]((_0x2820a8,_0x24e7cf)=>_0x24e7cf-_0x2820a8);}[_0x4971ab(0xc9)](){const _0x33888a=_0x4971ab;this['_closed']=!![];for(const _0xf30163 of this[_0x33888a(0x2e8)]['splice'](0x0))_0xf30163();}async['drain'](){const _0x5b36f3=_0x4971ab;let _0x1e1d4b=0x0;while(this['_inflight'][_0x5b36f3(0x187)]&&_0x1e1d4b++<0x3e8){await Promise[_0x5b36f3(0x17c)]([...this['_inflight']]);}}async['put'](_0x21dcf3,_0x1ba957,_0x2ff62b,_0x56ec3e){const _0x35a53c=_0x4971ab;return this['transaction'](()=>{const _0x462732=_0x51c5;if(_0x56ec3e===undefined)_0x21dcf3[_0x462732(0x59e)](_0x1ba957,_0x2ff62b);else _0x21dcf3[_0x462732(0x59e)](_0x1ba957,_0x2ff62b,_0x56ec3e);},_0x35a53c(0x56d));}async['remove'](_0x7d2211,_0x48c793){const _0x1e48ce=_0x4971ab;return this[_0x1e48ce(0x700)](()=>_0x7d2211[_0x1e48ce(0x576)](_0x48c793),_0x1e48ce(0x1b0));}}async function _0x13714f(_0x3a7096,_0x4c8b32){const _0x7d03a0=_0x4971ab;if(_0x4c8b32==null)_0x4c8b32=Math[_0x7d03a0(0x114)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x6b07db=_0x3a7096?.['flushed'];if(!_0x6b07db||typeof _0x6b07db['then']!==_0x7d03a0(0x5c8))return;await Promise['race']([Promise['resolve'](_0x6b07db)[_0x7d03a0(0x40d)](()=>{}),new Promise(_0x5ae6aa=>{const _0x27c19e=_0x7d03a0,_0x5dc67e=setTimeout(_0x5ae6aa,_0x4c8b32);if(_0x5dc67e[_0x27c19e(0x334)])_0x5dc67e[_0x27c19e(0x334)]();})]);}catch{}}function _0x534cc6(_0x2da33f){const _0x4f0bbe=_0x4971ab;if(_0x3964f3)return Promise[_0x4f0bbe(0x3c9)]();const _0x482ef9=_0x2da33f?.['committed'];return _0x482ef9&&typeof _0x482ef9['then']===_0x4f0bbe(0x5c8)?_0x482ef9:Promise[_0x4f0bbe(0x3c9)]();}const _0x1751f8=Math[_0x4971ab(0x114)](0x1,Math[_0x4971ab(0x698)](Number(process.env.UV_THREADPOOL_SIZE))||0x4),_0xb0876e=Math[_0x4971ab(0x114)](0x1,_0x1751f8-0x2);let _0x351315=0x0;const _0x2057f5=[];async function _0x46b5fc(_0x461538){if(_0x351315<_0xb0876e)_0x351315++;else await new Promise(_0x5203a1=>_0x2057f5['push'](_0x5203a1));try{return await _0x461538();}finally{const _0xd9f1a0=_0x2057f5['shift']();if(_0xd9f1a0)_0xd9f1a0();else _0x351315--;}}return okdbWriter['exports']=_0x2de1be,okdbWriter['exports'][_0x4971ab(0x103)]=_0x46b5fc,okdbWriter[_0x4971ab(0x2fb)][_0x4971ab(0x520)]=_0xb0876e,okdbWriter[_0x4971ab(0x2fb)][_0x4971ab(0x1bb)]=_0x13714f,okdbWriter[_0x4971ab(0x2fb)][_0x4971ab(0x76a)]=_0x534cc6,okdbWriter['exports'][_0x4971ab(0x7a5)]=_0x3964f3,okdbWriter['exports'];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x5b9687=_0x29bffd;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x409ee5=require$$0,{SYNC_COMMITS:_0x51f5cb}=requireOkdbWriter(),_0x48c048=_0x5b9687(0x504);class _0xdfc8bb{constructor(_0x438cff,_0x36d98f,_0x24860c){const _0x4dfa89=_0x5b9687;this['_lock']=_0x438cff,this[_0x4dfa89(0x387)]=_0x36d98f,this[_0x4dfa89(0x5c2)]=_0x24860c,this[_0x4dfa89(0x3ed)]=![],this['_heartbeatTimer']=null,this[_0x4dfa89(0x48c)]=null;}[_0x5b9687(0x176)](){const _0x4ba9a0=_0x5b9687;if(this[_0x4ba9a0(0x3ed)])return![];try{const _0x5cbcf3=this[_0x4ba9a0(0x4c7)][_0x4ba9a0(0x10d)]()[_0x4ba9a0(0x404)](this[_0x4ba9a0(0x387)]);if(!_0x5cbcf3||_0x5cbcf3[_0x4ba9a0(0x4d0)]!==this[_0x4ba9a0(0x5c2)])return![];const _0x2348dd=_0x5cbcf3[_0x4ba9a0(0x715)]??_0x5cbcf3[_0x4ba9a0(0x4d0)];if(_0x2348dd+_0x5cbcf3[_0x4ba9a0(0x132)]<Date['now']())return![];return!![];}catch{return!this['_released'];}}[_0x5b9687(0x4a8)](){const _0x1ec2b3=_0x5b9687;if(this['_released'])return null;try{return this[_0x1ec2b3(0x4c7)]['_db']()[_0x1ec2b3(0x404)](this['_key'])??null;}catch{return null;}}async['extend'](_0xfbc8be){const _0x1877b8=_0x5b9687;if(this[_0x1877b8(0x3ed)])return;try{if(this[_0x1877b8(0x4c7)][_0x1877b8(0x17f)]())return;const _0x1ffe75=this[_0x1877b8(0x4c7)]['_db']()[_0x1877b8(0x404)](this[_0x1877b8(0x387)]);if(!_0x1ffe75||_0x1ffe75[_0x1877b8(0x4d0)]!==this[_0x1877b8(0x5c2)])return;if(_0x51f5cb)this['_lock'][_0x1877b8(0x10d)]()['putSync'](this[_0x1877b8(0x387)],{..._0x1ffe75,'ttlMs':_0x1ffe75[_0x1877b8(0x132)]+_0xfbc8be});else await this[_0x1877b8(0x4c7)][_0x1877b8(0x10d)]()[_0x1877b8(0x27d)](this['_key'],{..._0x1ffe75,'ttlMs':_0x1ffe75[_0x1877b8(0x132)]+_0xfbc8be});}catch{}}async['release'](){const _0xb5c0e2=_0x5b9687;if(this[_0xb5c0e2(0x3ed)])return;if(this[_0xb5c0e2(0x48c)])try{await this[_0xb5c0e2(0x48c)];}catch{}clearInterval(this[_0xb5c0e2(0x7b7)]),this['_heartbeatTimer']=null,this['_released']=!![];try{if(this[_0xb5c0e2(0x4c7)][_0xb5c0e2(0x17f)]())return;const _0x44ef98=this[_0xb5c0e2(0x4c7)]['_db']()[_0xb5c0e2(0x404)](this['_key']);if(_0x44ef98&&_0x44ef98[_0xb5c0e2(0x4d0)]===this[_0xb5c0e2(0x5c2)]){if(_0x51f5cb)this[_0xb5c0e2(0x4c7)][_0xb5c0e2(0x10d)]()[_0xb5c0e2(0x576)](this[_0xb5c0e2(0x387)]);else await this[_0xb5c0e2(0x4c7)][_0xb5c0e2(0x10d)]()[_0xb5c0e2(0x54d)](this['_key']);}}catch{}}[_0x5b9687(0x20c)](_0x16d6be,_0x5d43eb){const _0x3aa409=_0x5b9687,_0x5df546=_0x5d43eb??Math['floor'](_0x16d6be/0x3);this[_0x3aa409(0x7b7)]=setInterval(()=>{const _0x19d89f=_0x3aa409;if(this['_released'])return;this[_0x19d89f(0x48c)]=((async()=>{const _0x1147ec=_0x19d89f;try{if(this[_0x1147ec(0x4c7)][_0x1147ec(0x17f)]())return;const _0x32d3a3=this['_lock'][_0x1147ec(0x10d)]()[_0x1147ec(0x404)](this[_0x1147ec(0x387)]);if(!_0x32d3a3||_0x32d3a3[_0x1147ec(0x4d0)]!==this[_0x1147ec(0x5c2)]){this[_0x1147ec(0x3ed)]=!![],clearInterval(this['_heartbeatTimer']),this[_0x1147ec(0x7b7)]=null;return;}if(_0x51f5cb)this[_0x1147ec(0x4c7)][_0x1147ec(0x10d)]()[_0x1147ec(0x59e)](this['_key'],{..._0x32d3a3,'updatedAt':Date[_0x1147ec(0x2f4)]()});else await this[_0x1147ec(0x4c7)][_0x1147ec(0x10d)]()[_0x1147ec(0x27d)](this[_0x1147ec(0x387)],{..._0x32d3a3,'updatedAt':Date[_0x1147ec(0x2f4)]()});}catch{}this[_0x1147ec(0x48c)]=null;})());},_0x5df546);if(this[_0x3aa409(0x7b7)][_0x3aa409(0x334)])this[_0x3aa409(0x7b7)]['unref']();}}class _0x2b2b96{constructor(_0x20524e,{namespace:_0x4f4c69,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x1ff4f1=_0x5b9687;this['_rawDb']=_0x20524e,this[_0x1ff4f1(0x318)]=_0x4f4c69,this[_0x1ff4f1(0x132)]=ttlMs,this[_0x1ff4f1(0x6f2)]=heartbeatMs,this[_0x1ff4f1(0x391)]=null;}[_0x5b9687(0x10d)](){const _0x5580a0=_0x5b9687;return this[_0x5580a0(0x48d)](),(!this[_0x5580a0(0x391)]||this[_0x5580a0(0x5a4)]!==this[_0x5580a0(0x5cb)])&&(this[_0x5580a0(0x391)]=this[_0x5580a0(0x5cb)][_0x5580a0(0x429)](_0x48c048,{'dupSort':![]}),this[_0x5580a0(0x5a4)]=this[_0x5580a0(0x5cb)]),this[_0x5580a0(0x391)];}[_0x5b9687(0x23b)](){const _0x59cff4=_0x5b9687;return this[_0x59cff4(0x48d)](),(!this['_wantDbHandle']||this['_wantDbOf']!==this[_0x59cff4(0x5cb)])&&(this[_0x59cff4(0x790)]=this['_rawDb'][_0x59cff4(0x429)](_0x48c048+':want',{'dupSort':![]}),this[_0x59cff4(0xfd)]=this[_0x59cff4(0x5cb)]),this[_0x59cff4(0x790)];}[_0x5b9687(0x17f)](){const _0x4b80b4=_0x5b9687,_0xcdcbf5=this[_0x4b80b4(0x5cb)]?.[_0x4b80b4(0x493)];return _0xcdcbf5==='closing'||_0xcdcbf5===_0x4b80b4(0x413);}[_0x5b9687(0x48d)](){const _0x32056c=_0x5b9687;if(this[_0x32056c(0x17f)]())throw new Error(_0x32056c(0x412));}[_0x5b9687(0x387)](_0xcaf4b6){return this['namespace']+':'+_0xcaf4b6;}[_0x5b9687(0x24a)](_0x226d21){const _0x4d47a4=_0x5b9687;try{if(this[_0x4d47a4(0x17f)]())return;_0x51f5cb?this['_wantDb']()['putSync'](this[_0x4d47a4(0x387)](_0x226d21),Date[_0x4d47a4(0x2f4)]()):this[_0x4d47a4(0x23b)]()['put'](this[_0x4d47a4(0x387)](_0x226d21),Date[_0x4d47a4(0x2f4)]())?.[_0x4d47a4(0x40d)]?.(()=>{});}catch{}}[_0x5b9687(0x231)](_0x3dbb31,_0x589349=0x3e8){const _0xcdc9aa=_0x5b9687;try{const _0x113631=this['_wantDb']()[_0xcdc9aa(0x404)](this['_key'](_0x3dbb31));return typeof _0x113631===_0xcdc9aa(0x783)&&Date['now']()-_0x113631<_0x589349;}catch{return![];}}[_0x5b9687(0x4e7)](_0xc7bb50){const _0x1af101=_0x5b9687,_0x4d575e=_0xc7bb50[_0x1af101(0x715)]??_0xc7bb50[_0x1af101(0x4d0)];return _0x4d575e+_0xc7bb50[_0x1af101(0x132)]<Date['now']();}static[_0x5b9687(0x7a2)](_0x152bc6){const _0x34197f=_0x5b9687,_0x62bab3=_0x152bc6?.[_0x34197f(0x4a8)];if(!_0x62bab3||typeof _0x62bab3['pid']!==_0x34197f(0x783))return![];if(_0x62bab3['hostname']!==_0x409ee5[_0x34197f(0x22b)]())return![];if(_0x62bab3[_0x34197f(0x3ca)]===process[_0x34197f(0x3ca)])return![];try{return process[_0x34197f(0x56a)](_0x62bab3[_0x34197f(0x3ca)],0x0),![];}catch(_0x19e4b2){return _0x19e4b2[_0x34197f(0x737)]===_0x34197f(0x6ae);}}async[_0x5b9687(0x4ec)](_0x19819b,_0x1e4898={},_0x3b13f5={}){const _0x22a4dc=_0x5b9687,_0x17d6fe=this[_0x22a4dc(0x387)](_0x19819b),_0x35c1f4=_0x3b13f5[_0x22a4dc(0x132)]??this[_0x22a4dc(0x132)],_0x32b911=Date['now'](),_0x5306d1={'holder':{'pid':process['pid'],'hostname':_0x409ee5['hostname'](),..._0x1e4898},'acquiredAt':_0x32b911,'updatedAt':_0x32b911,'ttlMs':_0x35c1f4};let _0x2c53a2=![],_0x4cbbb0=null;if(this[_0x22a4dc(0x17f)]())return{'acquired':![],'handle':null,'current':null};try{const _0x5450de=()=>{const _0x2b90c0=_0x22a4dc,_0x23161b=this['_db']()[_0x2b90c0(0x404)](_0x17d6fe);if(_0x23161b&&!this[_0x2b90c0(0x4e7)](_0x23161b)&&!_0x2b2b96['_holderDead'](_0x23161b)){const _0xa22884=_0x1e4898['processorId']!=null&&_0x23161b[_0x2b90c0(0x4a8)][_0x2b90c0(0x3ca)]===process[_0x2b90c0(0x3ca)]&&_0x23161b[_0x2b90c0(0x4a8)]['processorId']===_0x1e4898['processorId'];if(!_0xa22884){_0x2c53a2=![],_0x4cbbb0=_0x23161b;return;}_0x5306d1[_0x2b90c0(0x4d0)]<=_0x23161b[_0x2b90c0(0x4d0)]&&(_0x5306d1[_0x2b90c0(0x4d0)]=_0x23161b[_0x2b90c0(0x4d0)]+0x1,_0x5306d1[_0x2b90c0(0x715)]=_0x5306d1[_0x2b90c0(0x4d0)]);}this['_db']()[_0x2b90c0(0x27d)](_0x17d6fe,_0x5306d1),_0x2c53a2=!![],_0x4cbbb0=_0x5306d1;};if(_0x51f5cb)this[_0x22a4dc(0x10d)]()[_0x22a4dc(0x648)](_0x5450de);else await this[_0x22a4dc(0x10d)]()[_0x22a4dc(0x481)](_0x5450de);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x2c53a2)return{'acquired':![],'handle':null,'current':_0x4cbbb0};const _0x3c3db6=new _0xdfc8bb(this,_0x17d6fe,_0x5306d1[_0x22a4dc(0x4d0)]);return _0x3c3db6[_0x22a4dc(0x20c)](_0x35c1f4,this['heartbeatMs']),{'acquired':!![],'handle':_0x3c3db6,'current':_0x4cbbb0};}[_0x5b9687(0x4f2)](_0x28d0db){const _0x29cd35=_0x5b9687;try{return this['_db']()[_0x29cd35(0x404)](this[_0x29cd35(0x387)](_0x28d0db))??null;}catch{return null;}}['list'](){const _0xcfd40b=_0x5b9687,_0x439602=this['namespace']+':',_0x4fc928=[];try{for(const {key:_0x45bb6b,value:_0x3ddc7a}of this[_0xcfd40b(0x10d)]()[_0xcfd40b(0x507)]({'start':_0x439602,'end':_0x439602+'\xff'})){typeof _0x45bb6b===_0xcfd40b(0x5c5)&&_0x45bb6b[_0xcfd40b(0x74f)](_0x439602)&&_0x4fc928[_0xcfd40b(0x1c7)]({'id':_0x45bb6b['slice'](_0x439602[_0xcfd40b(0x275)]),'entry':_0x3ddc7a});}}catch{}return _0x4fc928;}static[_0x5b9687(0x355)](_0x2c6d6c){const _0x7b74c0=_0x5b9687,_0x572bc3=[];try{const _0x17af2e=_0x2c6d6c[_0x7b74c0(0x429)](_0x48c048,{'dupSort':![]});for(const {key:_0x120a04,value:_0x37e5f4}of _0x17af2e[_0x7b74c0(0x507)]({})){if(typeof _0x120a04!=='string')continue;const _0x45f6ee=_0x120a04['indexOf'](':');if(_0x45f6ee<0x1)continue;_0x572bc3['push']({'namespace':_0x120a04[_0x7b74c0(0x3a9)](0x0,_0x45f6ee),'id':_0x120a04[_0x7b74c0(0x3a9)](_0x45f6ee+0x1),'entry':_0x37e5f4});}}catch{}return _0x572bc3;}}return okdbLock={'OKDBLock':_0x2b2b96},okdbLock;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x3e99bd=_0x29bffd;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0xad22e6=require$$0,_0x24f272=require$$1$1,_0x258d14=require$$2$1,{LOOP:_0x25c842}=requireOkdbLoopMonitor(),{OKDBLock:_0x18d056}=requireOkdbLock(),{SYNC_COMMITS:_0x31296c}=requireOkdbWriter(),_0x1f71da=_0x3e99bd(0x3f0),_0x4623ee=_0x3e99bd(0x4d8),_0x4f672d='~processes:desired',_0x478924=_0x3e99bd(0x36f),_0x50efaf=(_0x506583,_0x1c9e3e)=>_0x506583+':'+_0x1c9e3e,_0x36c9e7=(_0x31932b,_0x2acb4e)=>_0x31932b+'::'+_0x2acb4e,_0x208e56=(_0x51c1f5,_0x50ddeb)=>_0x51c1f5+'/'+_0x50ddeb,_0x47a052=(_0x18241f,_0x600f8d)=>_0x18241f+'#'+_0x600f8d,_0x3fa33f=_0x4d8175=>{const _0x55ac8b=_0x3e99bd;if(_0x4d8175?.[_0x55ac8b(0x2d1)])return _0x4d8175['processKey'];const _0x347802=_0x4d8175?.[_0x55ac8b(0x6cc)];return typeof _0x347802===_0x55ac8b(0x5c5)&&_0x347802[_0x55ac8b(0x550)]('#')?_0x347802[_0x55ac8b(0x3a9)](0x0,_0x347802[_0x55ac8b(0x373)]('#')):_0x347802;},_0x198961=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x2647b1=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x53223f=_0x198961*0x3,_0x512aa0=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math['max'](0x927c0,_0x53223f*0x14),_0xfac9b4=[_0x3e99bd(0x29b),_0x3e99bd(0x2ed),_0x3e99bd(0x527),'processor:error','processor:paused',_0x3e99bd(0x6da)];let _0x56a982=null;function _0x7a14c8(){const _0x2f8fe2=_0x3e99bd;if(_0x56a982==null)_0x56a982=Math['round']((Date[_0x2f8fe2(0x2f4)]()-process[_0x2f8fe2(0x4ef)]()*0x3e8)/0x3e8)*0x3e8;return _0x56a982;}function _0xf22034(_0x539125){const _0x58e030=_0x3e99bd;if(process.env.OKDB_PROCESS_KILL===_0x58e030(0xe7))return![];if(_0x539125?.[_0x58e030(0x73b)]?.[_0x58e030(0x569)]&&typeof _0x539125[_0x58e030(0x73b)][_0x58e030(0x569)]===_0x58e030(0x759)&&_0x539125[_0x58e030(0x73b)][_0x58e030(0x569)][_0x58e030(0x56a)]===![])return![];return!![];}function _0x207d83(_0xa312f0,_0x5f406e){const _0x54a8cc=_0x3e99bd,_0xe0f7a7=!!_0x5f406e?.[_0x54a8cc(0x326)];switch(_0xa312f0){case _0x54a8cc(0x222):return{'controllable':_0xe0f7a7,'decommissionable':![],'killable':!![],'killConfirm':_0x54a8cc(0x322)};case _0x54a8cc(0x1eb):case'standalone':return{'controllable':_0xe0f7a7,'decommissionable':![],'killable':!![],'killConfirm':_0x54a8cc(0x3c7)};case _0x54a8cc(0x739):return{'controllable':![],'decommissionable':![],'killable':![]};case _0x54a8cc(0x543):case _0x54a8cc(0x439):case _0x54a8cc(0x38c):case _0x54a8cc(0xe3):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x54a8cc(0x100)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x5b48af{constructor(_0x4f7e80){const _0x5bbedd=_0x3e99bd;this[_0x5bbedd(0x554)]=_0x4f7e80,this[_0x5bbedd(0x18b)]=null,this['_desired']=null,this[_0x5bbedd(0x197)]=new Map(),this[_0x5bbedd(0x34a)]=null,this[_0x5bbedd(0x3d6)]=![],this[_0x5bbedd(0x239)]=![],this[_0x5bbedd(0x400)]=_0x7a14c8(),this[_0x5bbedd(0x79e)]=_0x50efaf(process[_0x5bbedd(0x3ca)],this['_processStartedAt']),this[_0x5bbedd(0xbd)]=_0x258d14[_0x5bbedd(0xbc)]()[_0x5bbedd(0x3a9)](0x0,0x8),this[_0x5bbedd(0xce)]=_0x47a052(this[_0x5bbedd(0x79e)],this[_0x5bbedd(0xbd)]),this[_0x5bbedd(0x5eb)]=Date[_0x5bbedd(0x2f4)](),this[_0x5bbedd(0x126)]=null,this[_0x5bbedd(0x4c1)]=null,this[_0x5bbedd(0x6ef)]=null,this[_0x5bbedd(0x26c)]=null,this[_0x5bbedd(0x4c6)]=null,this[_0x5bbedd(0x575)]=null,this[_0x5bbedd(0x753)]=0x0,this[_0x5bbedd(0x220)]={},this[_0x5bbedd(0x1b1)]=new Map(),this[_0x5bbedd(0x6cb)]=process['cpuUsage'](),this['_lastCpuAt']=Date[_0x5bbedd(0x2f4)](),this[_0x5bbedd(0x733)]=0x0,this[_0x5bbedd(0x3dc)]=new Map();}get['selfKey'](){return this['_selfKey'];}get['rowKey'](){return this['_rowKey'];}[_0x3e99bd(0x3de)](_0x577c4e,_0x4573fe){const _0x523d89=_0x3e99bd,_0x3918c2=_0x207d83(_0x577c4e,_0x4573fe);if(_0x3918c2[_0x523d89(0x63e)]&&!_0xf22034(this[_0x523d89(0x554)]))return{..._0x3918c2,'killable':![],'killConfirm':undefined};return _0x3918c2;}[_0x3e99bd(0xc7)](){const _0xb4410a=_0x3e99bd;return!!this[_0xb4410a(0x18b)];}[_0x3e99bd(0x79d)](_0x51bbca){const _0x1082a0=_0x3e99bd;Object[_0x1082a0(0x254)](this[_0x1082a0(0x220)],_0x51bbca||{});}['noteListenAddr'](_0x3e9ddb){const _0x2676b4=_0x3e99bd;if(_0x3e9ddb)this[_0x2676b4(0x6ef)]=_0x3e9ddb;}[_0x3e99bd(0x3b3)](_0x358640={}){const _0x2e34cd=_0x3e99bd;return this[_0x2e34cd(0x554)]['_activateProcesses'](_0x358640);}[_0x3e99bd(0x245)](){const _0x4b3227=_0x3e99bd,_0x1a0097={};let _0x20735f=0x0,_0xd7d98d=0x0;const _0x93881a=new Set();for(const _0x40e93e of this[_0x4b3227(0x1b2)]()){_0xd7d98d++;const _0x4ab6cd=_0x40e93e['processing'];if(!_0x4ab6cd)continue;if(_0x4ab6cd[_0x4b3227(0x6c5)])_0x20735f++;for(const _0x4b774f of _0x4ab6cd[_0x4b3227(0x326)]||[]){if(![_0x4b3227(0x12b),_0x4b3227(0x75d)][_0x4b3227(0x550)](_0x4b774f[_0x4b3227(0x67a)]))continue;(_0x4b774f[_0x4b3227(0x50b)]==='online'||_0x4b774f[_0x4b3227(0x50b)]===_0x4b3227(0x53d))&&_0x4b774f[_0x4b3227(0x69a)]&&_0x93881a[_0x4b3227(0x32c)]((_0x4b774f[_0x4b3227(0x3af)]||_0x4b3227(0x58f))+':'+_0x4b774f[_0x4b3227(0x69a)]);const _0x8f94dc=_0x4b774f[_0x4b3227(0x3af)]||_0x4b3227(0x58f);(_0x1a0097[_0x8f94dc]||=[])[_0x4b3227(0x1c7)]({..._0x4b774f,'env':_0x8f94dc,'owner':{'pid':_0x40e93e[_0x4b3227(0x3ca)]??null,'kind':_0x40e93e[_0x4b3227(0x525)]??null}});}}for(const [_0x2a3bab,_0x4e0cc5]of Object[_0x4b3227(0x597)](_0x1a0097)){for(const _0x256372 of _0x4e0cc5){if(_0x256372['mode']==='single'&&!_0x256372['claimGated']){const _0x30764a=_0x2a3bab+':'+(_0x256372[_0x4b3227(0x69a)]??'');if(!_0x93881a['has'](_0x30764a))_0x256372[_0x4b3227(0x7b3)]=!![];}}}return{'envs':_0x1a0097,'policy':null,'participation':{'participating':_0x20735f,'total':_0xd7d98d},'source':'workers'};}['processorsView'](){const _0x41a4ac=_0x3e99bd,_0x5ab612=_0x70b65a=>{const _0x456b8b=_0x51c5;if(_0x70b65a[_0x456b8b(0x50b)]==='online'||_0x70b65a['state']===_0x456b8b(0x53d)||_0x70b65a['state']===_0x456b8b(0x131))return 0x3;if(_0x70b65a[_0x456b8b(0x350)])return 0x1;return 0x2;},_0xbfa46=new Map();for(const _0x3a5c76 of this['listNodes']()){for(const _0x1f8a16 of _0x3a5c76['processing']?.[_0x41a4ac(0x326)]||[]){const _0x3ee3c7={..._0x1f8a16,'owner':{'pid':_0x3a5c76[_0x41a4ac(0x3ca)]??null,'kind':_0x3a5c76['kind']??null,'host':_0x3a5c76[_0x41a4ac(0x368)]??null}},_0x17110c=_0x1f8a16['mode']===_0x41a4ac(0x12b)?_0x41a4ac(0x5d8)+(_0x1f8a16[_0x41a4ac(0x3af)]??'')+'::'+(_0x1f8a16[_0x41a4ac(0x69a)]??_0x1f8a16[_0x41a4ac(0x4cc)]??_0x1f8a16['id']):_0x41a4ac(0x6b6)+(_0x3a5c76['nodeKey']??_0x3a5c76[_0x41a4ac(0x2d1)]??'')+'::'+(_0x1f8a16[_0x41a4ac(0x3af)]??'')+'::'+_0x1f8a16['id'],_0x47ccda=_0xbfa46['get'](_0x17110c);if(!_0x47ccda||_0x5ab612(_0x3ee3c7)>_0x5ab612(_0x47ccda))_0xbfa46[_0x41a4ac(0x271)](_0x17110c,_0x3ee3c7);}}return[..._0xbfa46[_0x41a4ac(0x337)]()];}[_0x3e99bd(0x5ae)](){const _0x148b15=_0x3e99bd,_0x1810b5=Date[_0x148b15(0x2f4)](),_0x18d945=this['listNodes'](),_0x50e586=_0x32bd96=>Math['max'](0x0,Math['round']((_0x1810b5-(_0x32bd96[_0x148b15(0x32e)]||_0x1810b5))/0x3e8)),_0x1bca37=_0x18d945[_0x148b15(0x167)](_0xfafeca=>_0xfafeca['kind']===_0x148b15(0x222)),_0x2167ea=_0x18d945[_0x148b15(0x78a)](_0x52fa12=>_0x52fa12[_0x148b15(0x525)]===_0x148b15(0x543));if(_0x1bca37||_0x2167ea['length'])return{'primary':_0x1bca37?{'pid':_0x1bca37[_0x148b15(0x3ca)],'uptime':_0x50e586(_0x1bca37)}:null,'workers':_0x2167ea['map'](_0x12419e=>({'pid':_0x12419e['pid'],'uptime':_0x50e586(_0x12419e)})),'workersConfigured':_0x1bca37?.[_0x148b15(0x499)]?.['workersConfigured']??_0x2167ea[_0x148b15(0x275)],'mode':'cluster'};const _0x3be2d2=_0x18d945[_0x148b15(0x167)](_0x40ab1e=>_0x40ab1e['kind']==='cli'||_0x40ab1e[_0x148b15(0x525)]==='standalone'||_0x40ab1e[_0x148b15(0x525)]===_0x148b15(0x739)),_0x165808=_0x3be2d2?{'pid':_0x3be2d2[_0x148b15(0x3ca)],'uptime':_0x50e586(_0x3be2d2)}:{'pid':process[_0x148b15(0x3ca)],'uptime':Math[_0x148b15(0x114)](0x0,Math[_0x148b15(0x613)](process[_0x148b15(0x4ef)]()))};return{'primary':_0x165808,'workers':[_0x165808],'workersConfigured':0x1,'mode':'single'};}[_0x3e99bd(0x5c4)](){return this['_groupByProcess']();}[_0x3e99bd(0x21e)](){const _0x4eb199=_0x3e99bd,_0x3ddc7c=new Map();for(const _0x1230b6 of this[_0x4eb199(0x680)]())_0x3ddc7c[_0x4eb199(0x271)](_0x1230b6[_0x4eb199(0x2d1)],{..._0x1230b6,'children':[]});const _0x5b2be4=[];for(const _0xf3a762 of _0x3ddc7c['values']()){const _0x3a1fda=_0xf3a762['supervisorKey']?_0x3ddc7c[_0x4eb199(0x404)](_0xf3a762['supervisorKey']):null;if(_0x3a1fda&&_0x3a1fda!==_0xf3a762)_0x3a1fda[_0x4eb199(0x5ea)][_0x4eb199(0x1c7)](_0xf3a762);else _0x5b2be4[_0x4eb199(0x1c7)](_0xf3a762);}const _0x96d481=(_0x47d7a0,_0x50a839)=>_0x47d7a0[_0x4eb199(0x525)]===_0x50a839[_0x4eb199(0x525)]?(_0x47d7a0[_0x4eb199(0x3ca)]||0x0)-(_0x50a839[_0x4eb199(0x3ca)]||0x0):(_0x47d7a0[_0x4eb199(0x525)]??'')<(_0x50a839[_0x4eb199(0x525)]??'')?-0x1:0x1,_0x147e92=_0x44f996=>{const _0x45c070=_0x4eb199;_0x44f996[_0x45c070(0x21a)](_0x96d481);for(const _0x533d9e of _0x44f996)if(_0x533d9e['children'][_0x45c070(0x275)])_0x147e92(_0x533d9e[_0x45c070(0x5ea)]);};return _0x147e92(_0x5b2be4),_0x5b2be4;}['getProcess'](_0x353bd1){const _0x42b17d=_0x3e99bd;return this[_0x42b17d(0x680)]()[_0x42b17d(0x167)](_0x5b6c3e=>_0x5b6c3e[_0x42b17d(0x2d1)]===_0x353bd1)??null;}[_0x3e99bd(0x680)](_0x238b5d=Date[_0x3e99bd(0x2f4)]()){const _0x373ab4=_0x3e99bd,_0x3ad1ce=new Map();for(const _0x1b4418 of this[_0x373ab4(0x1b2)]()){const _0x21cf99=_0x3fa33f(_0x1b4418);let _0x47105b=_0x3ad1ce[_0x373ab4(0x404)](_0x21cf99);!_0x47105b&&(_0x47105b={'processKey':_0x21cf99,'nodeKey':_0x21cf99,'pid':_0x1b4418[_0x373ab4(0x3ca)],'ppid':_0x1b4418[_0x373ab4(0x3f1)]??null,'host':_0x1b4418[_0x373ab4(0x368)]??null,'kind':_0x1b4418['kind'],'role':null,'supervisorKey':_0x1b4418[_0x373ab4(0x108)]??null,'slot':_0x1b4418[_0x373ab4(0x380)]??null,'slotKey':_0x1b4418[_0x373ab4(0x603)]??null,'caps':_0x1b4418['caps']??null,'lifecycle':_0x1b4418['lifecycle']??null,'uptime':Math[_0x373ab4(0x114)](0x0,Math[_0x373ab4(0x613)]((_0x238b5d-(_0x1b4418[_0x373ab4(0x32e)]||_0x238b5d))/0x3e8)),'startedAt':_0x1b4418[_0x373ab4(0x32e)]??null,'meta':_0x1b4418[_0x373ab4(0x499)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x3ad1ce['set'](_0x21cf99,_0x47105b));_0x47105b['instances'][_0x373ab4(0x1c7)]({'instanceId':_0x1b4418[_0x373ab4(0x332)]??null,'role':_0x1b4418[_0x373ab4(0x675)]??null,'listenAddr':_0x1b4418['listenAddr']??null,'lifecycle':_0x1b4418[_0x373ab4(0x1ed)]??null,'processing':_0x1b4418[_0x373ab4(0x3b2)]??null});if(!_0x47105b[_0x373ab4(0x675)]&&_0x1b4418[_0x373ab4(0x675)])_0x47105b[_0x373ab4(0x675)]=_0x1b4418['role'];if(!_0x47105b[_0x373ab4(0x713)]&&_0x1b4418['listenAddr'])_0x47105b[_0x373ab4(0x713)]=_0x1b4418[_0x373ab4(0x713)];if(!_0x47105b[_0x373ab4(0x3b2)]&&_0x1b4418[_0x373ab4(0x3b2)])_0x47105b[_0x373ab4(0x3b2)]=_0x1b4418[_0x373ab4(0x3b2)];if(!_0x47105b['engines']&&_0x1b4418[_0x373ab4(0x1c5)])_0x47105b[_0x373ab4(0x1c5)]=_0x1b4418['engines'];if(!_0x47105b[_0x373ab4(0x347)]&&_0x1b4418[_0x373ab4(0x347)])_0x47105b['singletonClaims']=_0x1b4418[_0x373ab4(0x347)];if(_0x47105b['caps']==null&&_0x1b4418[_0x373ab4(0x148)])_0x47105b[_0x373ab4(0x148)]=_0x1b4418[_0x373ab4(0x148)];if(_0x1b4418[_0x373ab4(0x65c)]&&(!_0x47105b['stats']||(_0x1b4418[_0x373ab4(0x65c)]['at']??0x0)>(_0x47105b[_0x373ab4(0x65c)]['at']??0x0)))_0x47105b['stats']=_0x1b4418['stats'];}return[..._0x3ad1ce[_0x373ab4(0x337)]()];}[_0x3e99bd(0x766)](){const _0x23951e=_0x3e99bd,_0x570fcb=[],_0x5af731={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0xfd6076 of this[_0x23951e(0x680)]()){_0x570fcb['push']({'processKey':_0xfd6076['processKey'],'kind':_0xfd6076[_0x23951e(0x525)],'pid':_0xfd6076[_0x23951e(0x3ca)],'supervisorKey':_0xfd6076['supervisorKey'],'meta':_0xfd6076[_0x23951e(0x499)]??null,'uptime':_0xfd6076[_0x23951e(0x4ef)],'stats':_0xfd6076[_0x23951e(0x65c)]??null}),_0x5af731[_0x23951e(0x569)]++;if(_0xfd6076[_0x23951e(0x65c)]){_0x5af731[_0x23951e(0x49e)]+=_0xfd6076[_0x23951e(0x65c)][_0x23951e(0x49e)]||0x0,_0x5af731['heapUsed']+=(_0xfd6076[_0x23951e(0x65c)]['heapUsed']||0x0)+(_0xfd6076[_0x23951e(0x65c)]['threads']?.['heapUsed']||0x0);const _0x4bc800=_0xfd6076[_0x23951e(0x65c)][_0x23951e(0x5b5)];_0x4bc800&&(_0x5af731['threads'][_0x23951e(0x6a4)]+=_0x4bc800[_0x23951e(0x6a4)]||0x0,_0x5af731[_0x23951e(0x5b5)][_0x23951e(0x281)]+=_0x4bc800[_0x23951e(0x281)]||0x0,_0x5af731[_0x23951e(0x5b5)][_0x23951e(0x513)]+=_0x4bc800[_0x23951e(0x513)]||0x0);}}return{'totals':_0x5af731,'nodes':_0x570fcb};}async['open']({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x535356=_0x3e99bd;this['_isWriter']=this['_isWriter']||!!writer,this[_0x535356(0x239)]=this[_0x535356(0x239)]||!!reader,this[_0x535356(0x126)]=kind||this['_kind']||(_0x24f272[_0x535356(0x1e1)]?_0x535356(0x543):_0x535356(0x1eb)),this[_0x535356(0x4c1)]=supervisorKey??this['_supervisorKey'],this[_0x535356(0x6ef)]=listenAddr??this[_0x535356(0x6ef)],this[_0x535356(0x436)](),await this[_0x535356(0x196)]();if(!writer&&!reader)return null;if(!this[_0x535356(0x18b)]){const _0x3591ba=await this[_0x535356(0x554)]['createEnvironment'](_0x1f71da,{'sync':![],'durability':'fast'});await _0x3591ba[_0x535356(0x409)](_0x4623ee),this['_statusEnv']=_0x3591ba;}return this[_0x535356(0x18b)];}[_0x3e99bd(0x454)](){const _0x23eab9=_0x3e99bd;return this[_0x23eab9(0x7ad)]!==this['_statusEnv']&&(this[_0x23eab9(0x7ad)]=this[_0x23eab9(0x18b)],this['_nodeDbCache']=this['_statusEnv'][_0x23eab9(0x60d)](_0x4623ee)[_0x23eab9(0x343)]),this['_nodeDbCache'];}[_0x3e99bd(0x755)](_0x51d797){const _0x120236=_0x3e99bd;if(_0x31296c)return this[_0x120236(0x454)]()[_0x120236(0x59e)](_0x51d797[_0x120236(0x6cc)],_0x51d797,0x1);const _0x3e711e=this[_0x120236(0x454)]()[_0x120236(0x27d)](_0x51d797['nodeKey'],_0x51d797,0x1);if(_0x3e711e&&typeof _0x3e711e[_0x120236(0x496)]===_0x120236(0x5c8))_0x3e711e['then'](undefined,()=>{});return _0x3e711e;}['_putRowSync'](_0x3a79c4){const _0x1d3bed=_0x3e99bd;return this['_nodeDb']()[_0x1d3bed(0x59e)](_0x3a79c4[_0x1d3bed(0x6cc)],_0x3a79c4,0x1);}[_0x3e99bd(0x5f9)](_0x217048){const _0xb5c6a3=_0x3e99bd;if(_0x31296c)try{return this[_0xb5c6a3(0x454)]()[_0xb5c6a3(0x576)](_0x217048);}catch{return![];}const _0x25ba71=this[_0xb5c6a3(0x454)]()[_0xb5c6a3(0x54d)](_0x217048);if(_0x25ba71&&typeof _0x25ba71[_0xb5c6a3(0x496)]===_0xb5c6a3(0x5c8))_0x25ba71[_0xb5c6a3(0x496)](undefined,()=>{});return _0x25ba71;}async[_0x3e99bd(0x31d)](_0x236689){const _0x354dec=_0x3e99bd;if(!this[_0x354dec(0x18b)]||!this[_0x354dec(0x3d6)]||!_0x236689?.[_0x354dec(0x6cc)])return;return this[_0x354dec(0x755)](_0x236689);}async['removeNode'](_0x1af41a){const _0x2757cd=_0x3e99bd;if(!this[_0x2757cd(0x18b)]||!this[_0x2757cd(0x3d6)]||!_0x1af41a)return;const _0x235532=_0x1af41a['includes']('#'),_0x2640c8=[];for(const {key:_0x49c2aa}of this['_statusEnv'][_0x2757cd(0x507)](_0x4623ee)){if(_0x49c2aa===_0x1af41a||!_0x235532&&typeof _0x49c2aa===_0x2757cd(0x5c5)&&_0x49c2aa[_0x2757cd(0x74f)](_0x1af41a+'#'))_0x2640c8['push'](_0x49c2aa);}for(const _0x1337f7 of _0x2640c8){try{this[_0x2757cd(0x454)]()[_0x2757cd(0x576)](_0x1337f7);}catch{}}}[_0x3e99bd(0xcc)](_0x3bcfc2){const _0x3b0e80=_0x3e99bd;if(typeof _0x3bcfc2?.[_0x3b0e80(0x3ca)]!==_0x3b0e80(0x783))return![];if(_0x3bcfc2[_0x3b0e80(0x368)]!==_0xad22e6[_0x3b0e80(0x22b)]())return![];if(_0x3bcfc2['pid']===process['pid'])return![];if(_0x3bcfc2['expiresAt']!=null&&_0x3bcfc2[_0x3b0e80(0x15f)]<Date[_0x3b0e80(0x2f4)]()-_0x512aa0)return!![];try{return process[_0x3b0e80(0x56a)](_0x3bcfc2[_0x3b0e80(0x3ca)],0x0),![];}catch(_0x130e74){return _0x130e74['code']===_0x3b0e80(0x6ae);}}['listNodes'](){const _0x258ea7=_0x3e99bd;if(!this[_0x258ea7(0x18b)])return[];try{this[_0x258ea7(0x18b)]['db']?.[_0x258ea7(0x702)]?.();}catch{}const _0xcdd4b8=Date[_0x258ea7(0x2f4)](),_0x4cd91c=_0xad22e6[_0x258ea7(0x22b)](),_0x20969e=[];for(const {value:_0x141214}of this[_0x258ea7(0x18b)]['getRange'](_0x4623ee)){if(!_0x141214)continue;let _0x54078a=null;_0x141214[_0x258ea7(0x368)]===_0x4cd91c&&typeof _0x141214[_0x258ea7(0x3ca)]===_0x258ea7(0x783)&&(_0x54078a=!this[_0x258ea7(0xcc)](_0x141214));if(_0x54078a===![])continue;const _0x418896=_0x141214[_0x258ea7(0x15f)]==null||_0x141214[_0x258ea7(0x15f)]>=_0xcdd4b8;if(_0x54078a===!![]||_0x418896)_0x20969e[_0x258ea7(0x1c7)](_0x141214);}return _0x20969e;}async['reap'](_0x53b7ab=0x0){const _0x3debb9=_0x3e99bd;if(!this[_0x3debb9(0x18b)]||!this[_0x3debb9(0x3d6)])return;const _0x2f8530=Date[_0x3debb9(0x2f4)]()-_0x53b7ab,_0x5177d1=new Set(),_0xd09031=[],_0x525197=_0xad22e6[_0x3debb9(0x22b)](),_0x56f79b=require$$3[_0x3debb9(0x7be)];for(const {key:_0x3c0a13,value:_0x43a37e}of this[_0x3debb9(0x18b)][_0x3debb9(0x507)](_0x4623ee)){if(!_0x43a37e)continue;const _0x2a24d1=_0x43a37e[_0x3debb9(0x368)]===_0x525197&&typeof _0x43a37e[_0x3debb9(0x3ca)]===_0x3debb9(0x783),_0x12c7f7=_0x2a24d1?this[_0x3debb9(0xcc)](_0x43a37e):_0x43a37e[_0x3debb9(0x15f)]!=null&&_0x43a37e[_0x3debb9(0x15f)]<_0x2f8530;if(_0x12c7f7)_0xd09031['push'](_0x3c0a13);else{_0x5177d1[_0x3debb9(0x32c)](_0x3fa33f(_0x43a37e)??_0x3c0a13);if(_0x43a37e[_0x3debb9(0x7be)]&&_0x43a37e[_0x3debb9(0x7be)]!==_0x56f79b){if(!this[_0x3debb9(0x2dc)])this[_0x3debb9(0x2dc)]=new Set();!this['_versionSkewWarned'][_0x3debb9(0x7b1)](_0x43a37e[_0x3debb9(0x7be)])&&(this['_versionSkewWarned'][_0x3debb9(0x32c)](_0x43a37e[_0x3debb9(0x7be)]),this['okdb']['log']?.[_0x3debb9(0x27f)]?.(_0x3debb9(0x1c2)+(_0x43a37e[_0x3debb9(0x3ca)]??'?')+'\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20'+_0x43a37e['version']+_0x3debb9(0x68c)+_0x56f79b+_0x3debb9(0x639)+'mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.',{'feature':_0x3debb9(0x39d)}));}}}for(const _0x1e4e21 of _0xd09031)this['_removeRowAsync'](_0x1e4e21);if(this[_0x3debb9(0x436)]()){const _0x1f867d=[];for(const {key:_0x2b89}of this[_0x3debb9(0x4a3)]('node')){if(!_0x5177d1['has'](_0x2b89)){if(_0x31296c)try{this['_desired']['removeSync'](_0x3debb9(0x45e)+_0x2b89);}catch{}else _0x1f867d[_0x3debb9(0x1c7)](this[_0x3debb9(0x21b)][_0x3debb9(0x54d)](_0x3debb9(0x45e)+_0x2b89));}}if(_0x1f867d[_0x3debb9(0x275)])await Promise['allSettled'](_0x1f867d);}}['startHeartbeat'](_0x422b48=null){const _0x360865=_0x3e99bd;if(this[_0x360865(0x26c)])return;if(!this[_0x360865(0x3d6)]||!this[_0x360865(0x18b)]){this[_0x360865(0x554)]?.[_0x360865(0x2fd)]?.[_0x360865(0x27f)]?.(_0x360865(0x795)+this[_0x360865(0x3d6)]+_0x360865(0x395)+!!this[_0x360865(0x18b)]+_0x360865(0x1a0),{'feature':_0x360865(0x569)});return;}this[_0x360865(0x575)]=_0x422b48,this['_onProcEvent']=()=>this[_0x360865(0x778)]();for(const _0x5ed14a of _0xfac9b4)this[_0x360865(0x554)][_0x360865(0x35e)]['on'](_0x5ed14a,this[_0x360865(0x4c6)]);this['_publishNow']();const _0x37925f=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x198961;this[_0x360865(0x26c)]=setInterval(()=>{const _0x119ebc=_0x360865;if(this[_0x119ebc(0x575)])try{this[_0x119ebc(0x575)]();}catch{}this[_0x119ebc(0x48f)](),this[_0x119ebc(0x430)]()['catch'](()=>{});},_0x37925f);if(this[_0x360865(0x26c)][_0x360865(0x334)])this[_0x360865(0x26c)][_0x360865(0x334)]();}[_0x3e99bd(0x778)](){const _0x395aad=_0x3e99bd;if(!this[_0x395aad(0x3d6)]||!this[_0x395aad(0x18b)])return;if(Date[_0x395aad(0x2f4)]()-this[_0x395aad(0x753)]<_0x2647b1)return;this[_0x395aad(0x48f)]();}['_publishNow'](){const _0x1da74a=_0x3e99bd;if(!this[_0x1da74a(0x3d6)]||!this['_statusEnv'])return;this['_lastPublishAt']=Date[_0x1da74a(0x2f4)]();try{const _0x341801=[this[_0x1da74a(0x480)]()];for(const _0x8a4f38 of this[_0x1da74a(0x1b1)]['values']())_0x341801[_0x1da74a(0x1c7)](this[_0x1da74a(0x1d1)](_0x8a4f38));const _0x1609f0=_0x25c842[_0x1da74a(0x47e)]?_0x25c842[_0x1da74a(0x2f4)]():0x0;for(const _0x287f74 of _0x341801){try{this[_0x1da74a(0x561)](_0x287f74),this[_0x1da74a(0x2b7)]=![];}catch(_0x240088){!this[_0x1da74a(0x2b7)]&&(this[_0x1da74a(0x2b7)]=!![],this[_0x1da74a(0x554)]?.[_0x1da74a(0x2fd)]?.[_0x1da74a(0x27f)]?.(_0x1da74a(0x208)+_0x240088['message'],{'feature':'processes'}));}}if(_0x25c842[_0x1da74a(0x47e)])_0x25c842[_0x1da74a(0x44f)](_0x1da74a(0x69d),_0x25c842['now']()-_0x1609f0,_0x1da74a(0x227)+_0x341801[_0x1da74a(0x275)]+'\x20sync');}catch(_0x4a9478){!this[_0x1da74a(0x2b7)]&&(this[_0x1da74a(0x2b7)]=!![],this[_0x1da74a(0x554)]?.[_0x1da74a(0x2fd)]?.[_0x1da74a(0x27f)]?.(_0x1da74a(0x208)+_0x4a9478[_0x1da74a(0x63f)],{'feature':_0x1da74a(0x569)}));}}async[_0x3e99bd(0x40b)](){const _0x223d32=_0x3e99bd;if(this[_0x223d32(0x4c6)]){for(const _0x98b382 of _0xfac9b4){try{this[_0x223d32(0x554)]['events'][_0x223d32(0xe7)](_0x98b382,this[_0x223d32(0x4c6)]);}catch{}}this[_0x223d32(0x4c6)]=null;}this[_0x223d32(0x26c)]&&(clearInterval(this['_hbTimer']),this[_0x223d32(0x26c)]=null);try{if(this['_statusEnv']&&this[_0x223d32(0x3d6)])await this['removeNode'](this[_0x223d32(0xce)]);}catch{}}async[_0x3e99bd(0x460)](){const _0x1294a5=_0x3e99bd;if(!this[_0x1294a5(0x18b)]||!this[_0x1294a5(0x3d6)])return;try{await this[_0x1294a5(0x4a9)](this[_0x1294a5(0xce)]);}catch{}try{const _0x5d11fd=[];for(const {value:_0x389427}of this[_0x1294a5(0x18b)][_0x1294a5(0x507)](_0x4623ee)){if(_0x389427?.['ppid']===process[_0x1294a5(0x3ca)]&&_0x389427[_0x1294a5(0x6cc)])_0x5d11fd[_0x1294a5(0x1c7)](_0x389427[_0x1294a5(0x6cc)]);}for(const _0x2f9c1a of _0x5d11fd){try{await this[_0x1294a5(0x4a9)](_0x2f9c1a);}catch{}}}catch{}}async[_0x3e99bd(0x150)](){const _0x169c77=_0x3e99bd;return this[_0x169c77(0x31d)](this[_0x169c77(0x480)]());}async[_0x3e99bd(0x5f7)](_0x2c8730){const _0x51a0a1=_0x3e99bd;if(!this['_statusEnv']||!this[_0x51a0a1(0x3d6)])return;return this[_0x51a0a1(0x31d)](this['_buildChildRow'](_0x2c8730));}[_0x3e99bd(0x1d1)]({pid:_0x1475d4,startedAt:_0x1ab6d2,kind:_0x186b8e,supervisorKey:_0x57f5a5,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x3e99bd(0x5da),meta:meta=null,stats:stats=null}){const _0x36d4ae=_0x3e99bd,_0x4982e7=Date['now'](),_0x18c0ba=_0x50efaf(_0x1475d4,_0x1ab6d2);return{'nodeKey':_0x47a052(_0x18c0ba,'0'),'processKey':_0x18c0ba,'instanceId':'0','pid':_0x1475d4,'startedAt':_0x1ab6d2,'ppid':process['pid'],'host':_0xad22e6[_0x36d4ae(0x22b)](),'supervisorKey':_0x57f5a5,'slot':slot,'slotKey':slotKey,'kind':_0x186b8e,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x4982e7,'expiresAt':_0x4982e7+_0x53223f,'caps':this[_0x36d4ae(0x3de)](_0x186b8e,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x3e99bd(0x7af)](_0x2772f8){const _0x4c6de4=_0x3e99bd;if(!_0x2772f8?.[_0x4c6de4(0x3ca)])return null;const _0x1ccd9a=_0x50efaf(_0x2772f8[_0x4c6de4(0x3ca)],_0x2772f8['startedAt']);this[_0x4c6de4(0x1b1)]['set'](_0x1ccd9a,{..._0x2772f8,'supervisorKey':_0x2772f8[_0x4c6de4(0x108)]??this[_0x4c6de4(0x79e)]});if(this[_0x4c6de4(0x3d6)])await this[_0x4c6de4(0x5f7)](this[_0x4c6de4(0x1b1)][_0x4c6de4(0x404)](_0x1ccd9a))[_0x4c6de4(0x40d)]?.(()=>{});return _0x1ccd9a;}['removeSupervisedChild'](_0x4dc70c){const _0x41884f=_0x3e99bd;if(!_0x4dc70c)return;return this[_0x41884f(0x1b1)][_0x41884f(0x3ac)](_0x4dc70c),this['removeNode'](_0x4dc70c);}['_sampleOwnStats'](){const _0x3759e2=_0x3e99bd,_0x59c884=Date['now'](),_0x2d3336=process['cpuUsage'](),_0x2d3d9b=(_0x59c884-this[_0x3759e2(0x726)])*0x3e8;if(_0x2d3d9b>=0x3d090){const _0x3197fe=_0x2d3336[_0x3759e2(0x1a8)]-this[_0x3759e2(0x6cb)][_0x3759e2(0x1a8)]+(_0x2d3336[_0x3759e2(0x654)]-this[_0x3759e2(0x6cb)]['system']),_0x58da15=_0xad22e6[_0x3759e2(0x261)]()[_0x3759e2(0x275)]||0x1;this[_0x3759e2(0x733)]=Math[_0x3759e2(0x1d6)](0x64,Math[_0x3759e2(0x613)](_0x3197fe/(_0x2d3d9b*_0x58da15)*0x64)),this[_0x3759e2(0x6c4)]=Math[_0x3759e2(0x613)](_0x2d3d9b/0x3e8),this[_0x3759e2(0x6cb)]=_0x2d3336,this[_0x3759e2(0x726)]=_0x59c884;}const _0x57fa63=process[_0x3759e2(0x78d)](),_0x2bc9d8=this[_0x3759e2(0x3dc)][_0x3759e2(0x187)];let _0x47a6dd=0x0;if(_0x2bc9d8>0x0){const _0x2aacf7=[this[_0x3759e2(0x554)],...this[_0x3759e2(0x554)][_0x3759e2(0x3ae)]?.[_0x3759e2(0x337)]?.()??[]];for(const _0x56b951 of _0x2aacf7){const _0x244142=_0x56b951[_0x3759e2(0x2ba)]?.[_0x3759e2(0x3a2)];if(_0x244142)_0x47a6dd+=_0x244142['liveThreadStats'][_0x3759e2(0x513)];}}let _0x4107db=null;const _0x27e0de=_0x2bc9d8;if(_0x27e0de>0x0){let _0x59d882=0x0;for(const _0x5954e3 of this[_0x3759e2(0x3dc)][_0x3759e2(0x337)]())_0x59d882+=_0x5954e3[_0x3759e2(0x1cc)]||0x0;_0x4107db={'count':_0x27e0de,'heapUsed':_0x59d882,'sandbox':_0x2bc9d8,'busy':_0x47a6dd};}return{'rss':_0x57fa63[_0x3759e2(0x49e)],'heapUsed':_0x57fa63[_0x3759e2(0x1cc)],'heapTotal':_0x57fa63[_0x3759e2(0x290)],'external':_0x57fa63[_0x3759e2(0x31e)],'cpuPct':this[_0x3759e2(0x733)],'cpuWindowMs':this[_0x3759e2(0x6c4)]??null,'threads':_0x4107db,'at':_0x59c884};}[_0x3e99bd(0x66f)](_0x4c2801,_0x478f3c){const _0x479a5b=_0x3e99bd;if(!_0x4c2801||!_0x478f3c)return;this[_0x479a5b(0x3dc)][_0x479a5b(0x271)](_0x4c2801,_0x478f3c);}[_0x3e99bd(0x257)](_0x2bfe09){const _0x3db3bf=_0x3e99bd;this['_threadStats'][_0x3db3bf(0x3ac)](_0x2bfe09);}['updateSupervisedChildStats'](_0x28f0f1,_0x423747,_0x42d0f7=undefined){const _0x558b1a=_0x3e99bd,_0x41d667=this[_0x558b1a(0x1b1)]['get'](_0x28f0f1);if(!_0x41d667||!_0x423747)return;if(_0x42d0f7!==undefined)_0x41d667['processing']=_0x42d0f7;_0x41d667[_0x558b1a(0x65c)]={'rss':_0x423747[_0x558b1a(0x49e)]??null,'heapUsed':_0x423747[_0x558b1a(0x1cc)]??null,'heapTotal':_0x423747[_0x558b1a(0x290)]??null,'external':_0x423747[_0x558b1a(0x31e)]??null,'cpuPct':_0x423747[_0x558b1a(0x457)]??null,'cpuWindowMs':_0x423747[_0x558b1a(0x59d)]??null,'threads':_0x423747[_0x558b1a(0x5b5)]??null,'claims':_0x423747[_0x558b1a(0x78c)]??null,'envsOpen':_0x423747['envsOpen']??null,'at':Date[_0x558b1a(0x2f4)]()};}['_buildOwnRow'](){const _0x54fec0=_0x3e99bd,_0x58b6dc=Date[_0x54fec0(0x2f4)](),_0x102d8f=this[_0x54fec0(0x554)][_0x54fec0(0x2db)]||{},_0x594103=this[_0x54fec0(0x126)]||_0x54fec0(0x1eb);return{'nodeKey':this[_0x54fec0(0xce)],'processKey':this[_0x54fec0(0x79e)],'instanceId':this[_0x54fec0(0xbd)],'pid':process[_0x54fec0(0x3ca)],'startedAt':this[_0x54fec0(0x400)],'instanceStartedAt':this[_0x54fec0(0x5eb)],'ppid':typeof process[_0x54fec0(0x3f1)]===_0x54fec0(0x783)?process['ppid']:null,'host':_0xad22e6[_0x54fec0(0x22b)](),'supervisorKey':this[_0x54fec0(0x4c1)]??null,'version':require$$3[_0x54fec0(0x7be)],'kind':_0x594103,'role':{'engines':!!_0x102d8f[_0x54fec0(0x1c5)],'processors':!!_0x102d8f[_0x54fec0(0x326)],'compaction':_0x102d8f[_0x54fec0(0x5c3)],'http':_0x102d8f[_0x54fec0(0x5b1)]},'listenAddr':this[_0x54fec0(0x6ef)]??null,'heartbeatAt':_0x58b6dc,'expiresAt':_0x58b6dc+_0x53223f,'caps':this[_0x54fec0(0x3de)](_0x594103,_0x102d8f),'lifecycle':{'state':_0x54fec0(0x5da),'desiredVersionApplied':null},'meta':{...this[_0x54fec0(0x220)]},'processing':_0x102d8f[_0x54fec0(0x326)]?this['_buildProcessingFacet']():null,'engines':_0x102d8f['engines']?[...this[_0x54fec0(0x554)][_0x54fec0(0x447)]??[]]:null,'singletonClaims':this['_collectSingletonClaims'](),'stats':this['_sampleOwnStats'](),'writers':this[_0x54fec0(0x495)]()};}[_0x3e99bd(0x495)](){const _0x517c5d=_0x3e99bd,_0x222061={};try{for(const [_0xbb311b,_0x314614]of this['okdb'][_0x517c5d(0x3ae)]){try{const _0x1eb2bc=_0x314614[_0x517c5d(0x342)]?.();if(!_0x1eb2bc)continue;if(!_0x1eb2bc[_0x517c5d(0x469)]&&!_0x1eb2bc['committed']&&!(_0x1eb2bc['parkedNow']??0x0)&&!_0x1eb2bc[_0x517c5d(0x3e6)])continue;_0x222061[_0xbb311b]={'depth':_0x1eb2bc['depth'],'oldestPendingMs':_0x1eb2bc[_0x517c5d(0x71e)],'committed':_0x1eb2bc[_0x517c5d(0x76a)],'commitsPerSec':_0x1eb2bc[_0x517c5d(0x255)],'commitP99Ms':_0x1eb2bc[_0x517c5d(0x62e)],'parkedNow':_0x1eb2bc[_0x517c5d(0x510)]??0x0,'draining':!!_0x1eb2bc[_0x517c5d(0x3e6)]};}catch{}}}catch{}return Object[_0x517c5d(0x157)](_0x222061)[_0x517c5d(0x275)]?_0x222061:null;}[_0x3e99bd(0x512)](){const _0x43f129=_0x3e99bd,_0x505d8d=process[_0x43f129(0x3ca)],_0x511222=Date['now'](),_0x219742=_0xf21ea6=>{const _0x248cd7=_0x43f129;if(!_0xf21ea6)return[];const _0x2592c7=[];try{for(const {id:_0x238630,entry:_0x1b3eb1}of _0xf21ea6[_0x248cd7(0x224)]()){if(_0x1b3eb1?.['holder']?.[_0x248cd7(0x3ca)]!==_0x505d8d)continue;const _0x439cff=_0x1b3eb1['updatedAt']??_0x1b3eb1[_0x248cd7(0x4d0)]??0x0;if(_0x439cff+(_0x1b3eb1[_0x248cd7(0x132)]??0x0)<_0x511222)continue;_0x2592c7['push'](_0x238630);}}catch{}return _0x2592c7;},_0x3599ea=_0x219742(this[_0x43f129(0x6e6)](_0x43f129(0x36b))),_0x50d237=_0x219742(this[_0x43f129(0x6e6)](_0x43f129(0x155)));if(!_0x3599ea[_0x43f129(0x275)]&&!_0x50d237[_0x43f129(0x275)])return null;return{'compact':_0x3599ea,'replicate':_0x50d237};}[_0x3e99bd(0x6e6)](_0x1b430b){const _0x1facc8=_0x3e99bd;if(!this[_0x1facc8(0x554)]?.['_rootDb'])return null;if(!this[_0x1facc8(0x35b)])this[_0x1facc8(0x35b)]=new Map();let _0x4c6e0d=this[_0x1facc8(0x35b)][_0x1facc8(0x404)](_0x1b430b);if(!_0x4c6e0d)try{_0x4c6e0d=new _0x18d056(this['okdb']['_rootDb'],{'namespace':_0x1b430b}),this[_0x1facc8(0x35b)][_0x1facc8(0x271)](_0x1b430b,_0x4c6e0d);}catch{return null;}return _0x4c6e0d;}[_0x3e99bd(0x6af)](){const _0x4d6829=_0x3e99bd,_0x28b92d=[];try{for(const [_0x48d7fb,_0x4c6a2b]of this['okdb']['_envs']){if(_0x48d7fb[_0x4d6829(0x74f)]('~'))continue;for(const _0x5c72e0 of _0x4c6a2b[_0x4d6829(0x6dd)][_0x4d6829(0x18d)]())_0x28b92d[_0x4d6829(0x1c7)]({..._0x5c72e0,'env':_0x48d7fb});}}catch{}return{'participate':this['okdb'][_0x4d6829(0x326)]?.[_0x4d6829(0x717)]??![],'processors':_0x28b92d};}[_0x3e99bd(0x436)](){const _0x4b90a0=_0x3e99bd;if(this['_desired'])return!![];const _0x55c801=this[_0x4b90a0(0x554)]['_rootDb'];if(!_0x55c801)return![];return this[_0x4b90a0(0x21b)]=_0x55c801[_0x4b90a0(0x429)](_0x4f672d,{'dupSort':![]}),this[_0x4b90a0(0x34a)]=_0x55c801['openDB'](_0x478924,{'dupSort':![]}),!![];}async[_0x3e99bd(0x196)](){const _0xee81b6=_0x3e99bd;if(!this[_0xee81b6(0x436)]())return;const _0x2c622a=_0xee81b6(0x285),_0x30e8ed=0x1,_0x48a561=this['_desired']['get'](_0x2c622a)??0x0;if(_0x48a561>=_0x30e8ed)return;const _0x451ca1=_0x41ed3e=>{const _0x1a5521=_0xee81b6;if(_0x41ed3e==='worker')return'single';if(_0x41ed3e===_0x1a5521(0x284))return _0x1a5521(0x75d);return _0x41ed3e;};await this[_0xee81b6(0x554)][_0xee81b6(0x66b)][_0xee81b6(0x4ee)]['transaction'](()=>{const _0x2cec71=_0xee81b6;for(const _0x2ea52a of[_0x2cec71(0x667),_0x2cec71(0x66e)]){for(const {key:_0x22f3b8,value:_0x35637f}of this[_0x2cec71(0x21b)][_0x2cec71(0x507)]({'start':_0x2ea52a,'end':_0x2ea52a+'\xff'})){if(typeof _0x22f3b8!==_0x2cec71(0x5c5)||!_0x22f3b8['startsWith'](_0x2ea52a))break;const _0x59e22b=_0x451ca1(_0x35637f[_0x2cec71(0x67a)]);if(_0x59e22b!==_0x35637f[_0x2cec71(0x67a)])this[_0x2cec71(0x21b)][_0x2cec71(0x27d)](_0x22f3b8,{..._0x35637f,'mode':_0x59e22b});}}this[_0x2cec71(0x21b)]['put'](_0x2c622a,_0x30e8ed);});}['hasDesired'](){return!!this['_desired'];}[_0x3e99bd(0x1b7)](_0x556f7d,_0x34ea61){const _0x1ff3c7=_0x3e99bd;if(!this[_0x1ff3c7(0x436)]())return null;const _0x2bad22=_0x556f7d+'/'+_0x34ea61;return this[_0x1ff3c7(0x69f)](),this[_0x1ff3c7(0x197)][_0x1ff3c7(0x404)](_0x2bad22)??this[_0x1ff3c7(0x21b)]['get'](_0x2bad22)??null;}[_0x3e99bd(0x69f)](){const _0x5b0c76=_0x3e99bd;if(!_0x31296c)return;try{this[_0x5b0c76(0x554)][_0x5b0c76(0x66b)]?.['db']?.[_0x5b0c76(0x702)]?.();}catch{}}async[_0x3e99bd(0x38b)](_0x4760e6,_0x2401f3,_0x366568){const _0x682500=_0x3e99bd;if(!this[_0x682500(0x436)]())return null;const _0x4f1cdd=_0x4760e6+'/'+_0x2401f3;this['_refreshDesiredSnapshot']();const _0x315cbb=this['_desiredOverlay'][_0x682500(0x404)](_0x4f1cdd)??this['_desired']['get'](_0x4f1cdd)??{'version':0x0},_0x5225d5=(_0x315cbb[_0x682500(0x7be)]||0x0)+0x1,_0x15a48d={..._0x315cbb,..._0x366568,'version':_0x5225d5,'updatedAt':Date[_0x682500(0x2f4)]()};this[_0x682500(0x197)][_0x682500(0x271)](_0x4f1cdd,_0x15a48d);try{await this[_0x682500(0x554)][_0x682500(0x66b)][_0x682500(0x4ee)][_0x682500(0x700)](()=>{const _0x145003=_0x682500;this[_0x145003(0x21b)]['put'](_0x4f1cdd,_0x15a48d);});}finally{if(this[_0x682500(0x197)][_0x682500(0x404)](_0x4f1cdd)===_0x15a48d)this[_0x682500(0x197)][_0x682500(0x3ac)](_0x4f1cdd);}return _0x5225d5;}[_0x3e99bd(0x4a3)](_0x1f9c63){const _0x36c1ee=_0x3e99bd;if(!this['_ensureDesired']())return[];this['_refreshDesiredSnapshot']();const _0x583fd5=_0x1f9c63+'/',_0x5e0f2e=[];for(const {key:_0x10bb42,value:_0x8b0a1d}of this[_0x36c1ee(0x21b)][_0x36c1ee(0x507)]({'start':_0x583fd5,'end':_0x583fd5+'\xff'})){if(typeof _0x10bb42!==_0x36c1ee(0x5c5)||!_0x10bb42[_0x36c1ee(0x74f)](_0x583fd5))break;_0x5e0f2e[_0x36c1ee(0x1c7)]({'key':_0x10bb42[_0x36c1ee(0x3a9)](_0x583fd5[_0x36c1ee(0x275)]),'value':_0x8b0a1d});}return _0x5e0f2e;}[_0x3e99bd(0x590)](_0x58ecc2){const _0x112380=_0x3e99bd;if(!this['_ensureDesired']())return null;return this['_cmd'][_0x112380(0x404)](_0x58ecc2)??null;}async[_0x3e99bd(0x479)](_0x3c6bdd,_0x39b347,_0x29275e={}){const _0x3b54de=_0x3e99bd;if(!this[_0x3b54de(0x436)]())return null;let _0x4c607d;return await this['okdb'][_0x3b54de(0x66b)][_0x3b54de(0x4ee)][_0x3b54de(0x700)](()=>{const _0x1f65fa=_0x3b54de,_0x4218e4=this[_0x1f65fa(0x34a)]['get'](_0x3c6bdd)||{'epoch':0x0};_0x4c607d=(_0x4218e4[_0x1f65fa(0x3ba)]||0x0)+0x1,this[_0x1f65fa(0x34a)][_0x1f65fa(0x27d)](_0x3c6bdd,{..._0x4218e4,..._0x29275e,'cmd':_0x39b347,'epoch':_0x4c607d,'updatedAt':Date[_0x1f65fa(0x2f4)]()});}),_0x4c607d;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x5b48af,'nodeKey':_0x50efaf,'logicalKey':_0x36c9e7,'slotKey':_0x208e56,'PROCESS_ENV':_0x1f71da,'NODE_TYPE':_0x4623ee},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x58a8af=_0x29bffd;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x1f2073=require$$0$6,{EVENTS:_0x170fac,CHANGE_ACTIONS:_0x4338fb}=requireOkdbEnums(),{LOOP:_0x5ec734}=requireOkdbLoopMonitor(),_0x3fe882=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x28e205=0x5,_0x3d652d=0x2710;class _0x45c596 extends _0x1f2073{constructor(_0x5107ab,_0x457704={}){const _0x2f9cda=_0x51c5;super(),this[_0x2f9cda(0x554)]=_0x5107ab,this[_0x2f9cda(0x549)]=_0x457704[_0x2f9cda(0x390)]??_0x3fe882,this['_flushDebounce']=_0x457704[_0x2f9cda(0x4dd)]??_0x28e205,this['_dedupeMax']=_0x457704[_0x2f9cda(0x4f7)]??_0x3d652d,this[_0x2f9cda(0x306)]=![],this[_0x2f9cda(0x52a)]=new Map(),this['_baselines']=new Map(),this[_0x2f9cda(0x760)]=new Map(),this['_flushTimer']=null,this['_draining']=![],this[_0x2f9cda(0x16b)]=new Set(),this[_0x2f9cda(0x432)]=new Set(),this[_0x2f9cda(0x762)]=_0x1dd015=>this[_0x2f9cda(0x3a7)](_0x1dd015),this[_0x2f9cda(0x12a)]=_0x37d3b1=>this[_0x2f9cda(0x2f1)](_0x37d3b1),this[_0x2f9cda(0x5a5)]=_0x5481cb=>this[_0x2f9cda(0x731)](_0x5481cb),this[_0x2f9cda(0x407)]=()=>this[_0x2f9cda(0x4a5)]();}[_0x58a8af(0x57c)](){const _0x20cd38=_0x58a8af;if(this[_0x20cd38(0x306)])return;this[_0x20cd38(0x306)]=!![];for(const [_0x1a988d,_0x525ef6]of this[_0x20cd38(0x554)][_0x20cd38(0x3ae)]){if(_0x1a988d[_0x20cd38(0x74f)]('~'))continue;try{_0x525ef6[_0x20cd38(0x42f)]();}catch{}}for(const [_0x157628,_0x1e0bbd]of this[_0x20cd38(0x554)]['_envs']){if(_0x157628[_0x20cd38(0x74f)]('~'))continue;try{this['_baselines'][_0x20cd38(0x271)](_0x157628,_0x1e0bbd[_0x20cd38(0x5ca)]()||0x0);}catch{}}const {events:_0x599997}=this[_0x20cd38(0x554)];_0x599997['on'](_0x170fac['ITEM_PENDING'],this['_onPending']),_0x599997['on'](_0x170fac['ITEM_CREATE'],this[_0x20cd38(0x762)]),_0x599997['on'](_0x170fac[_0x20cd38(0x6a5)],this[_0x20cd38(0x762)]),_0x599997['on'](_0x170fac[_0x20cd38(0x2b6)],this[_0x20cd38(0x762)]),_0x599997['on'](_0x170fac[_0x20cd38(0x29c)],this['_onPoke']),_0x599997[_0x20cd38(0x17e)](_0x170fac[_0x20cd38(0x194)],this['_onStop']);}[_0x58a8af(0x4a5)](){const _0x3461df=_0x58a8af;if(!this['_started'])return;this[_0x3461df(0x306)]=![];const {events:_0x22739f}=this[_0x3461df(0x554)];_0x22739f[_0x3461df(0xe7)](_0x170fac[_0x3461df(0x273)],this[_0x3461df(0x12a)]),_0x22739f[_0x3461df(0xe7)](_0x170fac[_0x3461df(0x5e6)],this['_onItem']),_0x22739f['off'](_0x170fac['ITEM_UPDATE'],this[_0x3461df(0x762)]),_0x22739f['off'](_0x170fac[_0x3461df(0x2b6)],this[_0x3461df(0x762)]),_0x22739f[_0x3461df(0xe7)](_0x170fac[_0x3461df(0x29c)],this['_onPoke']);try{_0x22739f[_0x3461df(0xe7)](_0x170fac[_0x3461df(0x194)],this[_0x3461df(0x407)]);}catch{}this[_0x3461df(0x59a)]&&(clearTimeout(this['_flushTimer']),this[_0x3461df(0x59a)]=null),this[_0x3461df(0x760)][_0x3461df(0x44d)](),this[_0x3461df(0x52a)][_0x3461df(0x44d)](),this['_baselines']['clear'](),this[_0x3461df(0x16b)][_0x3461df(0x44d)](),this['_pendingLocal'][_0x3461df(0x44d)]();}[_0x58a8af(0x411)](_0x32b6e1,_0x419711,_0x5c10dc,_0x2f38e6){return _0x32b6e1+'\x00'+_0x419711+'\x00'+_0x5c10dc+'\x00'+_0x2f38e6;}[_0x58a8af(0x2a2)](_0x90bb05,_0x2278f5,_0x13156e,_0x4a5848){const _0x221df9=_0x58a8af,_0x5edba7=this[_0x221df9(0x411)](_0x90bb05,_0x2278f5,_0x13156e,_0x4a5848);if(this[_0x221df9(0x16b)][_0x221df9(0x7b1)](_0x5edba7))return![];this[_0x221df9(0x16b)][_0x221df9(0x32c)](_0x5edba7);if(this[_0x221df9(0x16b)][_0x221df9(0x187)]>this[_0x221df9(0x747)]){const _0x4d7b6a=this[_0x221df9(0x16b)][_0x221df9(0x337)]()[_0x221df9(0x445)]()[_0x221df9(0x446)];this['_seen'][_0x221df9(0x3ac)](_0x4d7b6a);}return!![];}[_0x58a8af(0x2f1)](_0x12d7f5){const _0x41d7f3=_0x58a8af;if(!this[_0x41d7f3(0x306)]||!_0x12d7f5)return;const {env:_0x3e98b3,type:_0x904731,key:_0x28ec0a,clock:_0x472efd}=_0x12d7f5;if(_0x3e98b3==null||_0x904731==null||_0x28ec0a==null)return;if(typeof _0x3e98b3===_0x41d7f3(0x5c5)&&_0x3e98b3[_0x41d7f3(0x74f)]('~'))return;if(typeof _0x904731==='string'&&_0x904731[_0x41d7f3(0x74f)]('~'))return;this[_0x41d7f3(0x432)][_0x41d7f3(0x32c)](this[_0x41d7f3(0x411)](_0x3e98b3,_0x904731,_0x28ec0a,_0x472efd)),this[_0x41d7f3(0x432)][_0x41d7f3(0x187)]>this[_0x41d7f3(0x747)]&&this[_0x41d7f3(0x432)]['delete'](this[_0x41d7f3(0x432)][_0x41d7f3(0x337)]()[_0x41d7f3(0x445)]()[_0x41d7f3(0x446)]);}[_0x58a8af(0x3a7)](_0x1f120c){const _0x3a524f=_0x58a8af;if(!this[_0x3a524f(0x306)]||!_0x1f120c)return;const {env:_0x2c2adb,type:_0x51711a,key:_0x89c21f,clock:_0x168d83,origin:_0x5ce1f6,action:_0x9062bf,newValue:_0x241a93,oldValue:_0xd69ea}=_0x1f120c;if(_0x2c2adb==null||_0x51711a==null||_0x89c21f==null)return;if(typeof _0x2c2adb==='string'&&_0x2c2adb[_0x3a524f(0x74f)]('~'))return;if(typeof _0x51711a===_0x3a524f(0x5c5)&&_0x51711a[_0x3a524f(0x74f)]('~'))return;this[_0x3a524f(0x432)]['delete'](this['_dedupeKey'](_0x2c2adb,_0x51711a,_0x89c21f,_0x168d83));if(!this[_0x3a524f(0x2a2)](_0x2c2adb,_0x51711a,_0x89c21f,_0x168d83))return;const _0x5e8ab0=_0x9062bf===_0x4338fb[_0x3a524f(0x2d3)]?_0x3a524f(0x54d):'put';this[_0x3a524f(0xb2)](_0x3a524f(0x6f3),{'env':_0x2c2adb,'type':_0x51711a,'key':_0x89c21f,'op':_0x5e8ab0,'clock':_0x168d83,'origin':_0x5ce1f6,'value':_0x5e8ab0===_0x3a524f(0x54d)?null:_0x241a93,'prevValue':_0xd69ea});}['_handlePoke'](_0x132545){const _0x5eae19=_0x58a8af;if(!this[_0x5eae19(0x306)])return;if(!_0x132545||typeof _0x132545[_0x5eae19(0x3af)]!=='string'||typeof _0x132545[_0x5eae19(0x4cc)]!==_0x5eae19(0x5c5))return;const {env:_0x473973,type:_0x1d4161}=_0x132545;if(_0x473973['startsWith']('~')||_0x1d4161[_0x5eae19(0x74f)]('~'))return;this[_0x5eae19(0x760)][_0x5eae19(0x271)](_0x473973+'\x00'+_0x1d4161,{'env':_0x473973,'type':_0x1d4161}),this[_0x5eae19(0x3e1)]();}[_0x58a8af(0x3e1)](){const _0x381ae8=_0x58a8af;if(this[_0x381ae8(0x59a)])return;const _0x1c6470=()=>{const _0x562216=_0x381ae8;this[_0x562216(0x59a)]=null,this[_0x562216(0x15d)]()[_0x562216(0x40d)](()=>{});};this[_0x381ae8(0x59a)]=setTimeout(_0x1c6470,this[_0x381ae8(0x308)]>0x0?this[_0x381ae8(0x308)]:0x0);}async['_drain'](){const _0x488ad0=_0x58a8af;if(this['_draining']){this[_0x488ad0(0x3e1)]();return;}this[_0x488ad0(0x653)]=!![];try{const _0x5e9ef2=[...this[_0x488ad0(0x760)][_0x488ad0(0x337)]()];this[_0x488ad0(0x760)][_0x488ad0(0x44d)]();let _0x340295=![];for(const {env:_0x15d87b,type:_0x449ac9}of _0x5e9ef2){try{const _0x3a84c0=await this[_0x488ad0(0x68b)](_0x15d87b,_0x449ac9);if(_0x3a84c0)_0x340295=!![];}catch{this[_0x488ad0(0x760)]['set'](_0x15d87b+'\x00'+_0x449ac9,{'env':_0x15d87b,'type':_0x449ac9}),_0x340295=!![];}}if(_0x340295||this[_0x488ad0(0x760)][_0x488ad0(0x187)]>0x0)this[_0x488ad0(0x3e1)]();}finally{this[_0x488ad0(0x653)]=![];}}async[_0x58a8af(0x68b)](_0x3874e4,_0x5dad61){const _0x556f3d=_0x58a8af,_0x4199c6=await this[_0x556f3d(0x554)]['_openEnvLazy'](_0x3874e4),_0x559c4f=_0x3874e4+'\x00'+_0x5dad61;!this[_0x556f3d(0x52a)][_0x556f3d(0x7b1)](_0x559c4f)&&(!this[_0x556f3d(0x7c1)][_0x556f3d(0x7b1)](_0x3874e4)&&(_0x4199c6['_enableChangelog'](),this['_baselines']['set'](_0x3874e4,_0x4199c6['getClock']()||0x0)),this['_cursors']['set'](_0x559c4f,this[_0x556f3d(0x7c1)][_0x556f3d(0x404)](_0x3874e4)));const _0x1242f9=this[_0x556f3d(0x52a)][_0x556f3d(0x404)](_0x559c4f),_0x145dc5=_0x4199c6[_0x556f3d(0x5ca)](_0x5dad61)||0x0;if(_0x145dc5<=_0x1242f9)return![];const _0x4bd75c=_0x1242f9+this['_quantum'],_0x4fdf09=Math[_0x556f3d(0x1d6)](_0x145dc5,_0x4bd75c),_0x449f5e=_0x5ec734[_0x556f3d(0x47e)]?_0x5ec734[_0x556f3d(0x2f4)]():0x0,_0x3d4030=Array['from'](_0x4199c6[_0x556f3d(0x563)](_0x5dad61,_0x1242f9+0x1,_0x4fdf09));let _0x292445=_0x1242f9;for(const _0x519ace of _0x3d4030){const {clock:_0x3a148d,key:_0x5da848,action:_0x17f7be,origin:_0xc123e7}=_0x519ace;if(_0x3a148d>_0x292445)_0x292445=_0x3a148d;if(_0x5da848==null)continue;if(this[_0x556f3d(0x432)][_0x556f3d(0x7b1)](this[_0x556f3d(0x411)](_0x3874e4,_0x5dad61,_0x5da848,_0x3a148d)))continue;if(!this[_0x556f3d(0x2a2)](_0x3874e4,_0x5dad61,_0x5da848,_0x3a148d))continue;let _0x441dc1,_0xa18e4d;if(_0x17f7be===_0x4338fb[_0x556f3d(0x2d3)])_0x441dc1=_0x556f3d(0x54d),_0xa18e4d=null;else{const _0x4496a1=_0x4199c6[_0x556f3d(0x404)](_0x5dad61,_0x5da848);_0x4496a1==null?(_0x441dc1=_0x556f3d(0x54d),_0xa18e4d=null):(_0x441dc1=_0x556f3d(0x27d),_0xa18e4d=_0x4496a1);}this['emit'](_0x556f3d(0x6f3),{'env':_0x3874e4,'type':_0x5dad61,'key':_0x5da848,'op':_0x441dc1,'clock':_0x3a148d,'origin':_0xc123e7,'value':_0xa18e4d});}if(_0x5ec734[_0x556f3d(0x47e)])_0x5ec734['note'](_0x556f3d(0x64e)+_0x3874e4+':'+_0x5dad61,_0x5ec734[_0x556f3d(0x2f4)]()-_0x449f5e,'n='+_0x3d4030[_0x556f3d(0x275)]);return this['_cursors']['set'](_0x559c4f,Math['max'](_0x292445,_0x4fdf09)),_0x4199c6[_0x556f3d(0x5ca)](_0x5dad61)>_0x4fdf09;}[_0x58a8af(0x493)](){const _0x36ec74=_0x58a8af;return{'started':this['_started'],'quantum':this[_0x36ec74(0x549)],'flushDebounce':this[_0x36ec74(0x308)],'cursors':Object['fromEntries']([...this['_cursors'][_0x36ec74(0x597)]()][_0x36ec74(0x341)](([_0x2c7e39,_0x1837d4])=>[_0x2c7e39[_0x36ec74(0x552)]('\x00',':'),_0x1837d4])),'pending':this[_0x36ec74(0x760)][_0x36ec74(0x187)],'seen':this[_0x36ec74(0x16b)]['size']};}}return _0x45c596[_0x58a8af(0x765)]=_0x3fe882,okdbChangefeed={'OKDBChangefeed':_0x45c596},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x24af1f=_0x29bffd;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x48602d=require$$1$1,_0x1084b1=require$$1,{EVENTS:_0x476402}=requireOkdbEnums(),_0x57ccc0=require$$0,{slotKey:_0x45a1f0}=requireOkdbProcessRegistry(),_0x46fb32=Number(process.env.OKDB_CLUSTER_RESPAWN_BACKOFF_MS)||0xfa,_0x3198af=0xfa0,_0x56c197=0x5,_0x8d9820=0x2710,_0x2049aa=0xbb8,_0x76f9fb=0x7d0,_0x75df27=_0x24af1f(0xee),_0xc55f0c=_0x24af1f(0x3c2),_0x296cf9='log',_0x1a6a34=_0x24af1f(0x65c),_0x5a587f=[_0x476402[_0x24af1f(0x7bc)],_0x476402['FTS_REGISTERED'],_0x476402[_0x24af1f(0x5fe)],_0x476402['FTS_RESET'],_0x476402[_0x24af1f(0x4f3)],_0x476402[_0x24af1f(0x678)],_0x476402[_0x24af1f(0x649)],_0x476402[_0x24af1f(0x397)],'processor:ready',_0x24af1f(0x29b),'processor:error',_0x24af1f(0x2ff),'processor:resumed',_0x24af1f(0x527)],_0x18b759=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0,_0x1de575=0x64;function _0x1251e2(_0x489b10){const _0x118fef=_0x24af1f;if(!_0x489b10)return _0x118fef(0xdb);const _0x31f265=(_0x489b10[_0x118fef(0x326)]||[])[_0x118fef(0x341)](_0x5af770=>[_0x5af770['env'],_0x5af770['id'],_0x5af770[_0x118fef(0x67a)],_0x5af770[_0x118fef(0x50b)],!!_0x5af770[_0x118fef(0x4b1)],!!_0x5af770[_0x118fef(0x7b3)],!!_0x5af770['claimGated'],_0x5af770[_0x118fef(0x14d)]?.['pid']??null,_0x5af770['error']?String(_0x5af770[_0x118fef(0x131)]?.[_0x118fef(0x63f)]??_0x5af770[_0x118fef(0x131)]):null]);return JSON['stringify']([!!_0x489b10[_0x118fef(0x6c5)],_0x31f265]);}function _0x5c4b34({workers:_0xe08d39,makeOkdb:_0x5afbe0,port:_0x1c5411,primaryOkdb:_0x524e3e,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0xa5f062=_0x24af1f;if(_0x48602d[_0xa5f062(0x5d0)])return childEntry&&_0x48602d[_0xa5f062(0x301)]({'exec':_0x1084b1[_0xa5f062(0x4d3)](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0x3666f9=_0xa5f062,_0x54379c=[];for(let _0x4f653e=0x0;_0x4f653e<process['execArgv'][_0x3666f9(0x275)];_0x4f653e++){const _0x2dc01d=process[_0x3666f9(0x7cb)][_0x4f653e];if(_0x2dc01d['startsWith'](_0x3666f9(0x1b5))||_0x2dc01d['startsWith'](_0x3666f9(0x16e))||_0x2dc01d[_0x3666f9(0x74f)](_0x3666f9(0x7ba)))continue;if(_0x2dc01d==='-e'||_0x2dc01d==='--eval'||_0x2dc01d==='-p'||_0x2dc01d===_0x3666f9(0x317)){_0x4f653e++;continue;}_0x54379c['push'](_0x2dc01d);}return _0x54379c;})())}),_0x43c4d6({'workers':_0xe08d39,'port':_0x1c5411,'primaryOkdb':_0x524e3e,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x1c5411});return _0x4d7dac({'makeOkdb':_0x5afbe0,'port':_0x1c5411});}function _0x43c4d6({workers:_0x2fdb07,port:_0x44afb8,primaryOkdb:_0x3f8a6d,workerEnv:_0x6c2a5e,workerRole:_0x15b394,listenAddr:_0x1c87e4}){const _0x5788f2=_0x24af1f,_0x529337=new Map(),_0x9981fc=new Map();let _0xee953b=![];const _0x46e2d6=_0x5cff4a=>_0x5cff4a?.[_0x5788f2(0x28b)],_0x2ce42f=_0x2a4a5e=>{const _0x5ef085=_0x5788f2,_0x3536d5=_0x48602d[_0x5ef085(0x146)]({...process.env,..._0x6c2a5e||{},'OKDB_CLUSTER_SLOT':String(_0x2a4a5e)});return _0x3536d5[_0x5ef085(0x28b)]=_0x2a4a5e,_0x529337[_0x5ef085(0x271)](_0x3536d5['process'][_0x5ef085(0x3ca)],{'worker':_0x3536d5,'startedAt':Date[_0x5ef085(0x2f4)](),'slot':_0x2a4a5e}),_0x3536d5['on'](_0x5ef085(0x131),_0x493f83=>{const _0x4b3355=_0x5ef085;console[_0x4b3355(0x2fd)](_0x4b3355(0x73c)+_0x3536d5[_0x4b3355(0x25f)][_0x4b3355(0x3ca)]+_0x4b3355(0x5a1)+(_0x493f83?.[_0x4b3355(0x63f)]??_0x493f83));}),_0x3536d5['on'](_0x5ef085(0xaf),()=>_0x6254ac()),_0x3536d5;},_0x430aef=_0x35768d=>{const _0x41dfce=_0x5788f2;for(const {worker:_0x1944ef}of _0x529337[_0x41dfce(0x337)]()){if(_0x1944ef['isDead']()||!_0x1944ef[_0x41dfce(0x637)]())continue;try{_0x1944ef['send'](_0x35768d);}catch{}}};_0x3f8a6d?.[_0x5788f2(0x295)]?.({'kind':_0x5788f2(0x222),'listenAddr':_0x1c87e4})[_0x5788f2(0x40d)](()=>{}),_0x3f8a6d?.[_0x5788f2(0x569)]?.[_0x5788f2(0x79d)]?.({'workersConfigured':_0x2fdb07});const _0x3612fb={'engines':!![],'processors':!![],'compaction':!![],..._0x15b394,'http':!![]},_0x6254ac=()=>{const _0x4c959f=_0x5788f2,_0x17b2d2=_0x3f8a6d?.['processes'];if(!_0x17b2d2||!_0x17b2d2[_0x4c959f(0x3d6)])return;const _0x5e0f6a=_0x17b2d2[_0x4c959f(0x110)];for(const {worker:_0x1fa34c,startedAt:_0xdadbe,slot:_0x31d512,stats:_0x58a0b7,processing:_0x23e638}of _0x529337['values']()){if(_0x1fa34c['isDead']())continue;const _0x456b97=_0x17b2d2[_0x4c959f(0x210)]?.()&&_0x17b2d2[_0x4c959f(0x1b7)](_0x4c959f(0x380),_0x5bdc5f(_0x31d512))?.[_0x4c959f(0x67d)]===!![];_0x17b2d2[_0x4c959f(0x5f7)]({'pid':_0x1fa34c[_0x4c959f(0x25f)]['pid'],'startedAt':_0xdadbe,'kind':_0x4c959f(0x543),'supervisorKey':_0x5e0f6a,'slot':_0x31d512,'slotKey':_0x5bdc5f(_0x31d512),'role':_0x3612fb,'listenAddr':_0x1c87e4,'lifecycle':_0x456b97?'decommissioning':_0x4c959f(0x5da),'processing':_0x23e638??null,'stats':_0x58a0b7??null})[_0x4c959f(0x40d)](()=>{});}},_0x5bdc5f=_0x57b625=>_0x45a1f0(_0x5788f2(0x607)+_0x44afb8,_0x57b625),_0x1bc4e5=_0x2676cc=>{const _0x16cb6c=_0x5788f2,_0x163423=_0x3f8a6d?.[_0x16cb6c(0x569)];if(!_0x163423?.['hasDesired']?.())return![];return _0x163423[_0x16cb6c(0x1b7)](_0x16cb6c(0x380),_0x5bdc5f(_0x2676cc))?.[_0x16cb6c(0x67d)]===!![];};for(let _0x1663d7=0x0;_0x1663d7<_0x2fdb07;_0x1663d7++){const _0x2ea21e=_0x1bc4e5(_0x1663d7);_0x9981fc[_0x5788f2(0x271)](_0x1663d7,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x2ea21e,'respawnTimer':null}),_0x2ea21e?console[_0x5788f2(0x2fd)](_0x5788f2(0x57b)+_0x1663d7+_0x5788f2(0x3aa)):_0x2ce42f(_0x1663d7);}const _0x12cb19=()=>{const _0x5bf95d=_0x5788f2,_0x2e7bf5=_0x3f8a6d?.['processes'];if(!_0x2e7bf5?.[_0x5bf95d(0x3d6)]||!_0x2e7bf5[_0x5bf95d(0x210)]?.())return;for(const [_0x52290d,_0x43feaf]of _0x9981fc[_0x5bf95d(0x597)]()){const _0x4f8744=_0x2e7bf5[_0x5bf95d(0x1b7)]('slot',_0x5bdc5f(_0x52290d)),_0xadce86=_0x4f8744?.[_0x5bf95d(0x67d)]===!![],_0xa8ad60=_0x4f8744?.[_0x5bf95d(0x56a)]===!![];if(_0xadce86&&!_0x43feaf[_0x5bf95d(0x785)]){_0x43feaf['dead']=!![];_0x43feaf[_0x5bf95d(0x149)]&&(clearTimeout(_0x43feaf['respawnTimer']),_0x43feaf[_0x5bf95d(0x149)]=null);for(const {worker:_0x4e0aa8}of _0x529337[_0x5bf95d(0x337)]()){if(_0x46e2d6(_0x4e0aa8)!==_0x52290d||_0x4e0aa8[_0x5bf95d(0x458)]())continue;try{if(_0xa8ad60)_0x4e0aa8[_0x5bf95d(0x25f)][_0x5bf95d(0x56a)](_0x5bf95d(0x3a8));else _0x4e0aa8[_0x5bf95d(0x637)]()&&_0x4e0aa8[_0x5bf95d(0x3b0)]();}catch{}}console[_0x5bf95d(0x2fd)](_0x5bf95d(0x2b5)+(_0xa8ad60?_0x5bf95d(0x1e4):_0x5bf95d(0x4c9))+'\x20worker\x20slot='+_0x52290d+'\x20(durable\x20desired-state)');}else{if(!_0xadce86&&_0x43feaf[_0x5bf95d(0x785)]&&_0x4f8744){_0x43feaf[_0x5bf95d(0x785)]=![],_0x43feaf['deaths']=[],_0x43feaf[_0x5bf95d(0x1e3)]=0x0;const _0x476320=[..._0x529337[_0x5bf95d(0x337)]()][_0x5bf95d(0x2bd)](({worker:_0x551ea8})=>_0x46e2d6(_0x551ea8)===_0x52290d&&!_0x551ea8[_0x5bf95d(0x458)]());!_0x476320&&!_0xee953b&&(_0x2ce42f(_0x52290d),console[_0x5bf95d(0x2fd)]('[okdb-cluster]\x20recommissioned\x20worker\x20slot='+_0x52290d));}}}},_0x46e34b=()=>{try{_0x12cb19();}catch{}};_0x3f8a6d?.[_0x5788f2(0x35e)]?.['on']?.(_0x476402[_0x5788f2(0x450)],_0x46e34b);const _0x4e58c7=[];if(_0x3f8a6d?.[_0x5788f2(0x35e)]?.['on'])for(const _0x50a172 of _0x5a587f){const _0x16bb74=_0x3acebf=>{_0x430aef({[_0x75df27]:_0xc55f0c,'event':_0x50a172,'data':_0x3acebf??{}});};_0x3f8a6d[_0x5788f2(0x35e)]['on'](_0x50a172,_0x16bb74),_0x4e58c7[_0x5788f2(0x1c7)]({'event':_0x50a172,'handler':_0x16bb74});}const _0x45e2d5=setInterval(()=>{_0x12cb19(),_0x6254ac();},_0x18b759);_0x45e2d5['unref']?.();const _0x26dcca=(_0x2df930,_0x254cd2)=>{const _0x69ffec=_0x5788f2;if(!_0x254cd2||typeof _0x254cd2!==_0x69ffec(0x759)||_0x254cd2[_0x75df27]!==_0x296cf9)return;if(!_0x3f8a6d?.[_0x69ffec(0x2fd)]?.[_0x69ffec(0x6fc)])return;const _0x45d5c5=_0x254cd2[_0x69ffec(0x2d2)]||{};_0x3f8a6d[_0x69ffec(0x2fd)][_0x69ffec(0x6fc)]({..._0x45d5c5,'msg':'[w'+_0x254cd2[_0x69ffec(0x380)]+']\x20'+(_0x45d5c5[_0x69ffec(0x1a5)]??''),'meta':{..._0x45d5c5[_0x69ffec(0x499)]||{},'worker':_0x254cd2[_0x69ffec(0x380)],'workerPid':_0x254cd2[_0x69ffec(0x3ca)]}});};_0x48602d['on']('message',_0x26dcca);const _0x4e4d4a=(_0x22043b,_0x494c73)=>{const _0x44d2c0=_0x5788f2;if(!_0x494c73||typeof _0x494c73!==_0x44d2c0(0x759)||_0x494c73[_0x75df27]!==_0x1a6a34)return;const _0x284e48=_0x529337[_0x44d2c0(0x404)](_0x22043b[_0x44d2c0(0x25f)][_0x44d2c0(0x3ca)]);if(_0x284e48){_0x284e48['stats']={..._0x494c73[_0x44d2c0(0x65c)],'at':Date[_0x44d2c0(0x2f4)]()};if(_0x494c73[_0x44d2c0(0x3b2)]!==undefined){const _0x14c1d2=_0x1251e2(_0x494c73['processing']);_0x14c1d2!==_0x284e48['processingSig']&&(_0x284e48['processingSig']=_0x14c1d2,_0x29bf15()),_0x284e48[_0x44d2c0(0x3b2)]=_0x494c73[_0x44d2c0(0x3b2)];}}};let _0x4fe903=null;const _0x29bf15=()=>{const _0x53ed8d=_0x5788f2;if(_0x4fe903||_0xee953b)return;_0x4fe903=setTimeout(()=>{_0x4fe903=null;if(!_0xee953b)_0x6254ac();},_0x1de575),_0x4fe903[_0x53ed8d(0x334)]?.();};_0x48602d['on']('message',_0x4e4d4a),_0x48602d['on']('exit',(_0x494835,_0x232032,_0x292c19)=>{const _0x4b9f72=_0x5788f2,_0xc0e1e=_0x494835['process'][_0x4b9f72(0x3ca)],_0x2d7756=_0x46e2d6(_0x494835),_0x1bb76f=_0x529337['get'](_0xc0e1e);if(_0x1bb76f&&_0x3f8a6d?.[_0x4b9f72(0x569)])_0x3f8a6d[_0x4b9f72(0x569)][_0x4b9f72(0x4a9)](_0xc0e1e+':'+_0x1bb76f[_0x4b9f72(0x32e)])[_0x4b9f72(0x40d)](()=>{});_0x529337['delete'](_0xc0e1e),console['log'](_0x4b9f72(0x73c)+_0xc0e1e+_0x4b9f72(0x2ae)+(_0x2d7756??'?')+')\x20exited\x20'+(_0x4b9f72(0x13d)+_0x232032+_0x4b9f72(0x1f6)+(_0x292c19??'none')+_0x4b9f72(0x79f)+_0x529337[_0x4b9f72(0x187)]+_0x4b9f72(0x54a))),_0x6254ac();if(_0xee953b||_0x2d7756==null)return;const _0x268704=_0x9981fc[_0x4b9f72(0x404)](_0x2d7756);if(!_0x268704||_0x268704[_0x4b9f72(0x785)])return;const _0x597112=Date['now']();_0x268704['deaths'][_0x4b9f72(0x1c7)](_0x597112),_0x268704[_0x4b9f72(0x641)]=_0x268704['deaths'][_0x4b9f72(0x78a)](_0x5c026e=>_0x597112-_0x5c026e<=_0x8d9820);if(_0x268704[_0x4b9f72(0x641)][_0x4b9f72(0x275)]>=_0x56c197){_0x268704[_0x4b9f72(0x785)]=!![],console[_0x4b9f72(0x131)](_0x4b9f72(0x3ff)+_0x2d7756+'\x20died\x20'+_0x268704['deaths'][_0x4b9f72(0x275)]+'\x20times\x20in\x20'+(_0x8d9820+_0x4b9f72(0x746)+_0x529337[_0x4b9f72(0x187)]+'\x20worker(s)\x20still\x20serving'));return;}_0x268704['consecutiveFailures']++;const _0x426e39=Math[_0x4b9f72(0x1d6)](_0x3198af,_0x46fb32*0x2**(_0x268704[_0x4b9f72(0x1e3)]-0x1));console[_0x4b9f72(0x2fd)]('[okdb-cluster]\x20respawning\x20worker\x20slot='+_0x2d7756+'\x20in\x20'+_0x426e39+_0x4b9f72(0x6c0)+_0x268704['consecutiveFailures']+')'),_0x268704['respawnTimer']=setTimeout(()=>{const _0x4eb2d3=_0x4b9f72;_0x268704[_0x4eb2d3(0x149)]=null;if(_0xee953b||_0x268704[_0x4eb2d3(0x785)])return;const _0x20ff8d=_0x2ce42f(_0x2d7756);_0x20ff8d[_0x4eb2d3(0x17e)]('listening',()=>{const _0x3fd531=_0x4eb2d3;if(_0x9981fc[_0x3fd531(0x404)](_0x2d7756)===_0x268704)_0x268704[_0x3fd531(0x1e3)]=0x0;});},_0x426e39),_0x268704[_0x4b9f72(0x149)][_0x4b9f72(0x334)]?.();});const _0x2d642f=[..._0x529337[_0x5788f2(0x157)]()];console[_0x5788f2(0x2fd)](_0x5788f2(0x540)+process['pid']+_0x5788f2(0x5bc)+_0x2fdb07+'\x20HTTP\x20server(s)\x20on\x20port\x20'+_0x44afb8+':\x20'+('['+_0x2d642f[_0x5788f2(0x4d3)](',\x20')+']'));const _0x6bd628={'_isClusterController':!![],'port':_0x44afb8,'primaryOkdb':_0x3f8a6d??null,'status'(){const _0x37c96e=_0x5788f2;return{'clustered':!![],'primaryPid':process[_0x37c96e(0x3ca)],'port':_0x44afb8,'primaryRole':_0x3f8a6d?.[_0x37c96e(0x675)]??null,'processorPid':null,'supervisorPid':process[_0x37c96e(0x3ca)],'workers':[..._0x529337[_0x37c96e(0x337)]()]['map'](({worker:_0x373f35})=>({'pid':_0x373f35['process'][_0x37c96e(0x3ca)],'id':_0x373f35['id'],'dead':_0x373f35[_0x37c96e(0x458)]()}))};},async 'close'(){const _0x3bc0ad=_0x5788f2;_0xee953b=!![];for(const _0x1e1e50 of _0x9981fc[_0x3bc0ad(0x337)]()){_0x1e1e50['dead']=!![],_0x1e1e50[_0x3bc0ad(0x149)]&&(clearTimeout(_0x1e1e50[_0x3bc0ad(0x149)]),_0x1e1e50[_0x3bc0ad(0x149)]=null);}clearInterval(_0x45e2d5);_0x4fe903&&(clearTimeout(_0x4fe903),_0x4fe903=null);_0x48602d['off'](_0x3bc0ad(0x63f),_0x26dcca),_0x48602d[_0x3bc0ad(0xe7)]('message',_0x4e4d4a),_0x3f8a6d?.[_0x3bc0ad(0x35e)]?.[_0x3bc0ad(0xe7)]?.(_0x476402['SYSTEM_PROC'],_0x46e34b);if(_0x3f8a6d?.[_0x3bc0ad(0x35e)]?.[_0x3bc0ad(0xe7)])for(const {event:_0x536cf6,handler:_0x3a8827}of _0x4e58c7){try{_0x3f8a6d['events'][_0x3bc0ad(0xe7)](_0x536cf6,_0x3a8827);}catch{}}_0x4e58c7['length']=0x0;const _0x196b3=[..._0x529337[_0x3bc0ad(0x337)]()][_0x3bc0ad(0x341)](({worker:_0x2a468c})=>_0x2a468c);if(_0x196b3['length']===0x0)return;await Promise['all'](_0x196b3[_0x3bc0ad(0x341)](_0x488d02=>new Promise(_0x5af9b5=>{const _0x5eba0b=_0x3bc0ad;if(_0x488d02['isDead']()){_0x5af9b5();return;}let _0x2b4c56=![];const _0x2ad446=()=>{if(_0x2b4c56)return;_0x2b4c56=!![];if(_0x474752)clearTimeout(_0x474752);_0x5af9b5();};_0x488d02[_0x5eba0b(0x17e)]('exit',_0x2ad446);const _0x474752=setTimeout(()=>{const _0x2c09e1=_0x5eba0b;try{_0x488d02[_0x2c09e1(0x25f)][_0x2c09e1(0x56a)]();}catch{}},_0x2049aa+0x1f4);_0x474752[_0x5eba0b(0x334)]?.();try{_0x488d02['disconnect']();}catch{try{_0x488d02['process']['kill']();}catch{}}})));}};return _0x6bd628;}async function _0x4d7dac({makeOkdb:_0x40584b,port:_0x5ccf8d}){const _0x2c0da7=_0x24af1f,_0xca442a=await _0x40584b();return _0x19326e(_0xca442a),_0xca442a[_0x2c0da7(0x5b1)][_0x2c0da7(0x684)](_0x5ccf8d);}function _0x19326e(_0x4e9b2e){const _0x4e7c8c=_0x24af1f;if(!_0x4e9b2e||_0x4e9b2e[_0x4e7c8c(0x201)])return;_0x4e9b2e[_0x4e7c8c(0x201)]=!![];try{const {OKDBChangefeed:_0x41fba3}=requireOkdbChangefeed(),_0x42889c=_0x4e9b2e[_0x4e7c8c(0x547)];if(_0x42889c&&typeof _0x42889c[_0x4e7c8c(0x50d)]===_0x4e7c8c(0x5c8)){const _0x4e6919=new _0x41fba3(_0x4e9b2e);_0x4e6919['start'](),_0x42889c['attachFeed'](_0x4e6919),_0x4e9b2e[_0x4e7c8c(0x2e0)]=_0x4e6919;}}catch(_0xa1689b){_0x4e9b2e[_0x4e7c8c(0x2fd)]?.[_0x4e7c8c(0x27f)]?.(_0x4e7c8c(0x52e)+(_0xa1689b?.[_0x4e7c8c(0x63f)]??_0xa1689b),{'feature':'cluster'});}const _0xb107aa=_0x336121=>{const _0x2c9d74=_0x4e7c8c;if(!_0x336121||typeof _0x336121!==_0x2c9d74(0x759)||_0x336121[_0x75df27]==null)return;if(_0x336121[_0x75df27]===_0xc55f0c)try{_0x4e9b2e['_adminRelay']?.['pushEphemeral']?.(_0x336121[_0x2c9d74(0xad)],_0x336121[_0x2c9d74(0x343)]);}catch{}};process['on'](_0x4e7c8c(0x63f),_0xb107aa),_0x4e9b2e['_clusterOnMessage']=_0xb107aa;{let _0x133bfb=process[_0x4e7c8c(0x5fb)](),_0x16a16e=Date[_0x4e7c8c(0x2f4)]();const _0x2e00c5=()=>{const _0x3fa3a2=_0x4e7c8c;if(typeof process[_0x3fa3a2(0x1a2)]!=='function'||!process[_0x3fa3a2(0x45b)])return;const _0x14b171=Date[_0x3fa3a2(0x2f4)](),_0x332546=process['cpuUsage'](),_0x1bd86b=(_0x14b171-_0x16a16e)*0x3e8,_0xb9e3c6=_0x332546['user']-_0x133bfb[_0x3fa3a2(0x1a8)]+(_0x332546[_0x3fa3a2(0x654)]-_0x133bfb[_0x3fa3a2(0x654)]),_0x785b87=_0x1bd86b>0x0?Math['min'](0x64,Math[_0x3fa3a2(0x613)](_0xb9e3c6/(_0x1bd86b*(_0x57ccc0['cpus']()['length']||0x1))*0x64)):0x0;_0x133bfb=_0x332546,_0x16a16e=_0x14b171;const _0x7cf4c=process[_0x3fa3a2(0x78d)]();let _0x301dac=null;try{_0x301dac=_0x4e9b2e['role']?.[_0x3fa3a2(0x326)]?_0x4e9b2e[_0x3fa3a2(0x569)]?.[_0x3fa3a2(0x6af)]?.()??null:null;}catch{}try{process['send']({[_0x75df27]:_0x1a6a34,'stats':{'rss':_0x7cf4c[_0x3fa3a2(0x49e)],'heapUsed':_0x7cf4c[_0x3fa3a2(0x1cc)],'heapTotal':_0x7cf4c['heapTotal'],'external':_0x7cf4c[_0x3fa3a2(0x31e)],'cpuPct':_0x785b87,'cpuWindowMs':Math['round'](_0x1bd86b/0x3e8)||null},'processing':_0x301dac});}catch{}},_0x3de6a9=Math[_0x4e7c8c(0x114)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x4f8cc9=setInterval(_0x2e00c5,_0x3de6a9);_0x4f8cc9[_0x4e7c8c(0x334)]?.(),_0x2e00c5();for(const _0x454ce0 of['processor:paused',_0x4e7c8c(0x6da)]){_0x4e9b2e[_0x4e7c8c(0x35e)]?.['on']?.(_0x454ce0,()=>{try{_0x2e00c5();}catch{}});}}let _0x3d4127=![];const _0x52eda3=async _0xeb7c71=>{const _0x59e840=_0x4e7c8c;if(_0x3d4127)return;_0x3d4127=!![];const _0x4673b6=setTimeout(()=>process['exit'](_0xeb7c71),_0x2049aa);_0x4673b6[_0x59e840(0x334)]?.();try{await _0x4e9b2e['close']?.();}catch{}process[_0x59e840(0x282)](_0xeb7c71);};process['on'](_0x4e7c8c(0x3b0),()=>_0x52eda3(0x0));if(process[_0x4e7c8c(0x1a2)]&&!process['connected'])_0x52eda3(0x0);if(process['platform']!==_0x4e7c8c(0x7b4)){const _0x3c1636=setInterval(()=>{const _0x4e1836=_0x4e7c8c;if(process[_0x4e1836(0x3f1)]===0x1)_0x52eda3(0x0);},_0x76f9fb);_0x3c1636[_0x4e7c8c(0x334)]?.(),_0x4e9b2e[_0x4e7c8c(0x205)]=_0x3c1636;}}return okdbCluster={'runClustered':_0x5c4b34,'attachWorkerCluster':_0x19326e},okdbCluster;}var okdbHttp={'exports':{}},okdbMetrics,hasRequiredOkdbMetrics;function requireOkdbMetrics(){const _0x574930=_0x29bffd;if(hasRequiredOkdbMetrics)return okdbMetrics;hasRequiredOkdbMetrics=0x1;const _0x4911d7=0x3c;function _0x368c53(){return{'requests':0x0,'reads':0x0,'writes':0x0,'errors':0x0,'readMs':0x0,'writeMs':0x0};}class _0x368291{constructor(){const _0x342fe5=_0x51c5;this[_0x342fe5(0xff)]=0x0,this['_totalReads']=0x0,this[_0x342fe5(0x62a)]=0x0,this[_0x342fe5(0x181)]=0x0,this[_0x342fe5(0x565)]=0x0,this[_0x342fe5(0x3b9)]=0x0,this[_0x342fe5(0x725)]=Array[_0x342fe5(0x748)]({'length':_0x4911d7},_0x368c53),this[_0x342fe5(0x768)]=0x0,this[_0x342fe5(0x3e9)]=Date[_0x342fe5(0x2f4)](),this[_0x342fe5(0x69c)]=setInterval(()=>this[_0x342fe5(0x1df)](),0x3e8);if(this[_0x342fe5(0x69c)][_0x342fe5(0x334)])this[_0x342fe5(0x69c)][_0x342fe5(0x334)]();}[_0x574930(0x1df)](){const _0x4bcf8c=_0x574930;this[_0x4bcf8c(0x768)]=(this['_bucketIdx']+0x1)%_0x4911d7,this[_0x4bcf8c(0x725)][this[_0x4bcf8c(0x768)]]=_0x368c53(),this['_lastTick']=Date[_0x4bcf8c(0x2f4)]();}[_0x574930(0x37c)](_0x3aac8c,_0x47ef70,_0xdedb02){const _0x48eccf=_0x574930,_0x274b08=/^(POST|PUT|PATCH|DELETE)$/i[_0x48eccf(0x30a)](_0x3aac8c),_0x175a13=this[_0x48eccf(0x725)][this['_bucketIdx']];this['_totalRequests']++,_0x175a13[_0x48eccf(0x189)]++,_0xdedb02&&(this[_0x48eccf(0x181)]++,_0x175a13[_0x48eccf(0x25a)]++),_0x274b08?(this[_0x48eccf(0x62a)]++,this['_totalWriteMs']+=_0x47ef70,_0x175a13[_0x48eccf(0x24d)]++,_0x175a13[_0x48eccf(0x5dc)]+=_0x47ef70):(this[_0x48eccf(0x622)]++,this['_totalReadMs']+=_0x47ef70,_0x175a13['reads']++,_0x175a13[_0x48eccf(0x6bc)]+=_0x47ef70);}[_0x574930(0x65c)](){const _0x154e15=_0x574930;let _0x59e64a=0x0,_0x5a32ff=0x0,_0x2309f9=0x0,_0x3a1be3=0x0,_0x582c5b=0x0,_0x5a75a7=0x0;for(const _0x12ddb9 of this[_0x154e15(0x725)]){_0x59e64a+=_0x12ddb9[_0x154e15(0x189)],_0x5a32ff+=_0x12ddb9['reads'],_0x2309f9+=_0x12ddb9[_0x154e15(0x24d)],_0x3a1be3+=_0x12ddb9['errors'],_0x582c5b+=_0x12ddb9[_0x154e15(0x6bc)],_0x5a75a7+=_0x12ddb9['writeMs'];}const _0x5345ca=_0x4911d7;return{'lifetime':{'requests':this[_0x154e15(0xff)],'reads':this[_0x154e15(0x622)],'writes':this['_totalWrites'],'errors':this['_totalErrors'],'avgReadMs':this[_0x154e15(0x622)]>0x0?+(this[_0x154e15(0x565)]/this['_totalReads'])['toFixed'](0x2):null,'avgWriteMs':this['_totalWrites']>0x0?+(this['_totalWriteMs']/this[_0x154e15(0x62a)])[_0x154e15(0x70d)](0x2):null},'window':{'seconds':_0x5345ca,'requests':_0x59e64a,'reads':_0x5a32ff,'writes':_0x2309f9,'errors':_0x3a1be3,'reqPerSec':+(_0x59e64a/_0x5345ca)[_0x154e15(0x70d)](0x2),'readPerSec':+(_0x5a32ff/_0x5345ca)[_0x154e15(0x70d)](0x2),'writePerSec':+(_0x2309f9/_0x5345ca)[_0x154e15(0x70d)](0x2),'avgReadMs':_0x5a32ff>0x0?+(_0x582c5b/_0x5a32ff)['toFixed'](0x2):null,'avgWriteMs':_0x2309f9>0x0?+(_0x5a75a7/_0x2309f9)[_0x154e15(0x70d)](0x2):null}};}[_0x574930(0x3fb)](){const _0x5ca384=_0x574930;clearInterval(this[_0x5ca384(0x69c)]);}}return okdbMetrics=_0x368291,okdbMetrics;}var okdbAuthNamespaces,hasRequiredOkdbAuthNamespaces;function requireOkdbAuthNamespaces(){const _0x2bff8f=_0x29bffd;if(hasRequiredOkdbAuthNamespaces)return okdbAuthNamespaces;hasRequiredOkdbAuthNamespaces=0x1;const _0x16f425={'data':{'label':'Data','scope':_0x2bff8f(0x3af),'description':_0x2bff8f(0x538),'operations':{'read':{'label':'Read','summary':'Get\x20and\x20list\x20records,\x20run\x20byIndex\x20queries.'},'write':{'label':_0x2bff8f(0x665),'summary':_0x2bff8f(0x559)}}},'schema':{'label':'Schema\x20&\x20Indexes','scope':'env','description':_0x2bff8f(0x53f),'operations':{'read':{'label':_0x2bff8f(0x133),'summary':_0x2bff8f(0x174)},'write':{'label':'Write','summary':'Register/update/delete\x20types,\x20register/drop/rebuild\x20indexes,\x20set\x20TTL\x20policy.'}}},'search':{'label':_0x2bff8f(0x714),'scope':'env','description':_0x2bff8f(0x356),'operations':{'query':{'label':_0x2bff8f(0x5f6),'summary':'Execute\x20full-text\x20and\x20vector\x20searches.'}}},'queue':{'label':'Queue','scope':_0x2bff8f(0x3af),'description':_0x2bff8f(0x171),'operations':{'read':{'label':_0x2bff8f(0x133),'summary':_0x2bff8f(0x484)},'write':{'label':_0x2bff8f(0x665),'summary':_0x2bff8f(0x289)},'work':{'label':_0x2bff8f(0x19f),'summary':'Worker-side:\x20claim,\x20heartbeat,\x20complete,\x20fail,\x20progress.'}}},'files':{'label':_0x2bff8f(0x219),'scope':'env','description':_0x2bff8f(0x6a1),'operations':{'read':{'label':'Read','summary':_0x2bff8f(0x1d3)},'write':{'label':_0x2bff8f(0x665),'summary':_0x2bff8f(0x385)}}},'functions':{'label':_0x2bff8f(0x7c7),'scope':_0x2bff8f(0x3af),'description':_0x2bff8f(0x3b1),'operations':{'read':{'label':'Read','summary':_0x2bff8f(0x315)},'write':{'label':_0x2bff8f(0x665),'summary':_0x2bff8f(0x53c)},'run':{'label':_0x2bff8f(0x46f),'summary':_0x2bff8f(0x252)}}},'views':{'label':_0x2bff8f(0x582),'scope':'env','description':_0x2bff8f(0x3a3),'operations':{'read':{'label':_0x2bff8f(0x133),'summary':_0x2bff8f(0x41f)},'write':{'label':'Write','summary':_0x2bff8f(0x43f)}}},'env':{'label':'Environments','scope':_0x2bff8f(0x3af),'description':'Environment\x20lifecycle.\x20Listing\x20and\x20creating\x20envs\x20is\x20system-level.','operations':{'read':{'label':_0x2bff8f(0x133),'summary':'List\x20environments\x20and\x20read\x20environment\x20info.'},'write':{'label':_0x2bff8f(0x665),'summary':_0x2bff8f(0x626)}}},'auth':{'label':'Auth','scope':_0x2bff8f(0x654),'description':'API\x20tokens,\x20users,\x20and\x20credentials.','operations':{'read':{'label':_0x2bff8f(0x133),'summary':_0x2bff8f(0x1aa)},'write':{'label':_0x2bff8f(0x665),'summary':_0x2bff8f(0x452)}}},'system':{'label':'System','scope':'system','description':_0x2bff8f(0x300),'operations':{'read':{'label':_0x2bff8f(0x133),'summary':_0x2bff8f(0x5ad)},'write':{'label':_0x2bff8f(0x665),'summary':'Pause/resume\x20processor,\x20trigger\x20backups,\x20restore.'}}},'sync':{'label':'Sync','scope':_0x2bff8f(0x654),'description':_0x2bff8f(0x266),'operations':{'read':{'label':_0x2bff8f(0x133),'summary':_0x2bff8f(0x47b)},'write':{'label':'Write','summary':_0x2bff8f(0x405)},'peer':{'label':_0x2bff8f(0x5cf),'summary':_0x2bff8f(0x615),'machineOnly':!![]}}},'protected':{'label':_0x2bff8f(0x754),'scope':_0x2bff8f(0x140),'description':_0x2bff8f(0x204),'operations':{'read':{'label':'Read','summary':'May\x20read\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20read\x20permission.'},'write':{'label':_0x2bff8f(0x665),'summary':'May\x20write\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20write\x20permission.'}}}},_0x502a29={'schema:read':['data:read',_0x2bff8f(0x74c),_0x2bff8f(0x5ee)]},_0x47d94b=[_0x2bff8f(0x7a7),_0x2bff8f(0x455),_0x2bff8f(0x3b5),_0x2bff8f(0x598),_0x2bff8f(0x3e8),_0x2bff8f(0xe9)];function _0x3a5d9b(){const _0x148470=_0x2bff8f,_0x483520=[];for(const [_0x3481ac,_0x2a3ec7]of Object[_0x148470(0x597)](_0x16f425)){for(const _0x50d8b0 of Object['keys'](_0x2a3ec7[_0x148470(0x4f1)])){_0x483520['push'](_0x3481ac+':'+_0x50d8b0);}}return _0x483520;}function _0x515f5d(_0x1e7729){return _0x16f425[_0x1e7729]||null;}function _0x4c69fb(_0x2d87e0,_0x2f433c){const _0x5baad8=_0x2bff8f;return _0x16f425[_0x2d87e0]?.[_0x5baad8(0x4f1)][_0x2f433c]||null;}return okdbAuthNamespaces={'NAMESPACES':_0x16f425,'IMPLIED_BY':_0x502a29,'OP_ORDER':_0x47d94b,'listAllPermissions':_0x3a5d9b,'getNamespaceMeta':_0x515f5d,'getOperationMeta':_0x4c69fb},okdbAuthNamespaces;}var okdbAuthPermissions,hasRequiredOkdbAuthPermissions;function requireOkdbAuthPermissions(){const _0x27e6eb=_0x29bffd;if(hasRequiredOkdbAuthPermissions)return okdbAuthPermissions;hasRequiredOkdbAuthPermissions=0x1;const {IMPLIED_BY:_0x5dadd8}=requireOkdbAuthNamespaces(),_0x81ab87=new Set(['read',_0x27e6eb(0x455)]);function _0x28b108(_0x3a77e0,_0x591d88){const _0x5e5a00=_0x27e6eb;if(!Array[_0x5e5a00(0x321)](_0x3a77e0)||_0x3a77e0[_0x5e5a00(0x275)]===0x0)return![];for(const _0x467830 of _0x3a77e0){if(typeof _0x467830!==_0x5e5a00(0x5c5)||!_0x467830[_0x5e5a00(0x550)](':')){if(_0x467830==='*')return!![];continue;}const [_0x3565dd,_0x55e53b]=_0x467830[_0x5e5a00(0x27b)](':'),[_0x1d8add,_0x29e310]=_0x591d88[_0x5e5a00(0x27b)](':'),_0x11a844=_0x3565dd==='*'||_0x3565dd===_0x1d8add,_0x29baf8=_0x55e53b==='*'||_0x55e53b===_0x29e310;if(_0x11a844&&_0x29baf8)return!![];}const _0x15b221=_0x5dadd8[_0x591d88];if(_0x15b221)for(const _0x45553d of _0x15b221){if(_0x28b108(_0x3a77e0,_0x45553d))return!![];}return![];}function _0x2b866f(_0x45dfc7,_0x2a5fc3){const _0x471375=_0x27e6eb,_0x2a81c9=new Set();if(Array[_0x471375(0x321)](_0x45dfc7)){for(const _0x542d73 of _0x45dfc7)_0x2a81c9[_0x471375(0x32c)](_0x542d73);}if(Array[_0x471375(0x321)](_0x2a5fc3)){for(const _0x3a3c0a of _0x2a5fc3)_0x2a81c9[_0x471375(0x32c)](_0x3a3c0a);}return Array[_0x471375(0x748)](_0x2a81c9);}function _0xf6da48(_0x47af0f){const _0x1106c2=_0x27e6eb;if(typeof _0x47af0f!=='string')return![];const [,_0x59bd22]=_0x47af0f[_0x1106c2(0x27b)](':');return _0x81ab87[_0x1106c2(0x7b1)](_0x59bd22);}function _0x13f71a(_0x373725){const _0xb09c8a=_0x27e6eb;return _0xf6da48(_0x373725)?_0xb09c8a(0x249):_0xb09c8a(0x2a3);}function _0x376ddd(_0x5d8045,_0x363192){const _0x301334=_0x27e6eb;return _0x2b866f(_0x5d8045[_0x301334(0x338)]||[],_0x363192?(_0x5d8045[_0x301334(0x421)]||{})[_0x363192]||[]:[]);}function _0x5eada2(_0x3f5d12){const _0x2792c8=_0x27e6eb,_0x5a65e3=[];for(const _0x3ca3d4 of _0x3f5d12[_0x2792c8(0x24f)]()){const _0x5561be=_0x3ca3d4[_0x2792c8(0x26b)]?.[_0x2792c8(0x319)];if(!_0x5561be)continue;_0x5561be['authRequired']&&!_0x5561be[_0x2792c8(0x689)]&&_0x5a65e3['push'](_0x3ca3d4[_0x2792c8(0x13f)]+'\x20'+_0x3ca3d4['path']+_0x2792c8(0xf8)+(_0x3ca3d4[_0x2792c8(0x26b)]['id']??'?')+')');}if(_0x5a65e3[_0x2792c8(0x275)])throw new Error('The\x20following\x20routes\x20require\x20auth\x20but\x20declare\x20no\x20permission:\x0a\x20\x20'+_0x5a65e3[_0x2792c8(0x4d3)](_0x2792c8(0x353)));}return okdbAuthPermissions={'hasPermission':_0x28b108,'unionPermissions':_0x2b866f,'isReadOperation':_0xf6da48,'resolveProtectedGate':_0x13f71a,'getEffectivePermissions':_0x376ddd,'assertEveryRouteHasPermission':_0x5eada2},okdbAuthPermissions;}var okdbJwtUtils,hasRequiredOkdbJwtUtils;function requireOkdbJwtUtils(){if(hasRequiredOkdbJwtUtils)return okdbJwtUtils;hasRequiredOkdbJwtUtils=0x1;const _0x5ed691=require$$0$7,_0x4d5f23=require$$1$2,_0x318ce4=require$$2$1;function _0x4ff187(_0x207859){const _0x16664a=_0x51c5,_0x3c6ca3=String(_0x207859||'')[_0x16664a(0x552)](/-/g,'+')[_0x16664a(0x552)](/_/g,'/'),_0x426dec=_0x3c6ca3+'='[_0x16664a(0x749)]((0x4-(_0x3c6ca3[_0x16664a(0x275)]%0x4||0x4))%0x4);return Buffer[_0x16664a(0x748)](_0x426dec,_0x16664a(0x5d9));}function _0x4247ed(_0x2cb61b){const _0x2c9b8f=_0x51c5;if(typeof _0x2cb61b!==_0x2c9b8f(0x5c5))throw new Error(_0x2c9b8f(0x6d9));const _0x5041e0=_0x2cb61b[_0x2c9b8f(0x27b)]('.');if(_0x5041e0[_0x2c9b8f(0x275)]!==0x3)throw new Error('Token\x20must\x20be\x20a\x20JWT');const [_0x36b937,_0x3f8a9e,_0x4fae6c]=_0x5041e0,_0x2a30c3=JSON['parse'](_0x4ff187(_0x36b937)[_0x2c9b8f(0x6fe)](_0x2c9b8f(0x253))),_0x293e7b=JSON[_0x2c9b8f(0x325)](_0x4ff187(_0x3f8a9e)[_0x2c9b8f(0x6fe)](_0x2c9b8f(0x253)));return{'header':_0x2a30c3,'payload':_0x293e7b,'signature':_0x4ff187(_0x4fae6c),'signingInput':Buffer[_0x2c9b8f(0x748)](_0x36b937+'.'+_0x3f8a9e),'encodedHeader':_0x36b937,'encodedPayload':_0x3f8a9e};}function _0x51a6da(_0x14b551){const _0x1ee1d5=_0x51c5;if(Array[_0x1ee1d5(0x321)](_0x14b551))return _0x14b551;if(_0x14b551==null)return[];return[_0x14b551];}function _0x4ad94d(_0x278d57){const _0x3a3c72=_0x51c5,_0x5ae9bb=String(_0x278d57||'')['match'](/.{1,64}/g)||[];return'-----BEGIN\x20CERTIFICATE-----\x0a'+_0x5ae9bb['join']('\x0a')+_0x3a3c72(0x5ce);}function _0x3a483a(_0x17b39e={}){const _0x103913=_0x51c5;if(_0x17b39e[_0x103913(0x4f6)]?.[0x0])return _0x318ce4[_0x103913(0x497)](_0x4ad94d(_0x17b39e[_0x103913(0x4f6)][0x0]));return _0x318ce4[_0x103913(0x497)]({'key':_0x17b39e,'format':_0x103913(0x47d)});}function _0x2da50f(_0x1cbe09,_0x27a2d9,_0x2c705d,_0x573a13){const _0x244540=_0x51c5;if(_0x1cbe09===_0x244540(0x24b))return _0x318ce4[_0x244540(0x2c2)](_0x244540(0x7c6),_0x2c705d,_0x27a2d9,_0x573a13);if(_0x1cbe09==='ES256')return _0x318ce4[_0x244540(0x2c2)](_0x244540(0x3c0),_0x2c705d,{'key':_0x27a2d9,'dsaEncoding':_0x244540(0x2f9)},_0x573a13);return![];}function _0x16bfae(_0x2ed190){const _0x5d7810=_0x51c5;if(typeof commonjsGlobal[_0x5d7810(0x417)]==='function')return commonjsGlobal[_0x5d7810(0x417)](_0x2ed190,{'headers':{'accept':_0x5d7810(0x5e0)}})[_0x5d7810(0x496)](async _0xf9fcc6=>{const _0x1cc557=_0x5d7810;if(!_0xf9fcc6['ok']){const _0xa685b6=new Error(_0x1cc557(0x134)+_0xf9fcc6['status']+_0x1cc557(0x38e)+_0x2ed190);_0xa685b6[_0x1cc557(0x493)]=_0xf9fcc6[_0x1cc557(0x493)];throw _0xa685b6;}return _0xf9fcc6[_0x1cc557(0x375)]();});return new Promise((_0x516284,_0x3c51d6)=>{const _0x2ad284=_0x5d7810,_0x50b4aa=String(_0x2ed190)[_0x2ad284(0x74f)](_0x2ad284(0x6de))?_0x4d5f23:_0x5ed691,_0x7f99a5=_0x50b4aa[_0x2ad284(0x404)](_0x2ed190,{'headers':{'accept':_0x2ad284(0x5e0)}},_0x40a944=>{const _0x18a34d=_0x2ad284;let _0x46629b='';_0x40a944[_0x18a34d(0x64c)]('utf8'),_0x40a944['on'](_0x18a34d(0x343),_0xa122f7=>{_0x46629b+=_0xa122f7;}),_0x40a944['on'](_0x18a34d(0x57a),()=>{const _0x4ca751=_0x18a34d;if(_0x40a944[_0x4ca751(0x357)]<0xc8||_0x40a944[_0x4ca751(0x357)]>=0x12c){const _0x204de7=new Error(_0x4ca751(0x134)+_0x40a944[_0x4ca751(0x357)]+_0x4ca751(0x38e)+_0x2ed190);return _0x204de7[_0x4ca751(0x493)]=_0x40a944[_0x4ca751(0x357)],_0x3c51d6(_0x204de7);}try{_0x516284(JSON[_0x4ca751(0x325)](_0x46629b||'{}'));}catch(_0x180b3e){_0x3c51d6(_0x180b3e);}});});_0x7f99a5['on'](_0x2ad284(0x131),_0x3c51d6),_0x7f99a5[_0x2ad284(0x57a)]();});}return okdbJwtUtils={'base64UrlDecode':_0x4ff187,'parseJwt':_0x4247ed,'normalizeAudience':_0x51a6da,'normalizePemCertificate':_0x4ad94d,'jwkToKeyObject':_0x3a483a,'verifyJwtSignature':_0x2da50f,'fetchJson':_0x16bfae},okdbJwtUtils;}var hasRequiredOkdbHttp;function requireOkdbHttp(){const _0x16030f=_0x29bffd;if(hasRequiredOkdbHttp)return okdbHttp['exports'];hasRequiredOkdbHttp=0x1;const _0x492dc1=require$$0$7,{URL:_0x2ca1fd}=require$$2$2,_0x5a8dac=requireOkdbMetrics(),_0x1f987d=requireOkdbAuthTokens(),{hasPermission:_0x55acbc,unionPermissions:_0x5e0733,resolveProtectedGate:_0x565543}=requireOkdbAuthPermissions(),_0x35b80b={0x190:_0x16030f(0x6ec),0x191:_0x16030f(0x206),0x193:_0x16030f(0x40f),0x194:_0x16030f(0x769),0x195:_0x16030f(0x571),0x198:_0x16030f(0x741),0x199:_0x16030f(0x704),0x19a:_0x16030f(0x794),0x19b:_0x16030f(0x2d7),0x19d:_0x16030f(0x784),0x19f:_0x16030f(0x274),0x1a6:_0x16030f(0xfc),0x1ad:_0x16030f(0x6c2),0x1f4:_0x16030f(0x59b),0x1f5:_0x16030f(0x5a8),0x1f6:'BAD_GATEWAY',0x1f7:_0x16030f(0x2c1),0x1f8:_0x16030f(0x314)},_0x25f941={'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:_0x24d7da,timingSafeEqual:_0x570578,parseBearer:_0x2af858,randomToken:_0x44d4f2,issueToken:_0x192d10,authenticateToken:_0x87bd2e}=_0x1f987d,{base64UrlDecode:_0x570519,parseJwt:_0x5680cd,normalizeAudience:_0x2d946b,normalizePemCertificate:_0x27e81a,jwkToKeyObject:_0x31e558,verifyJwtSignature:_0xbe50f8,fetchJson:_0x336084}=requireOkdbJwtUtils();function _0x4c05a8(_0x4666b0){const _0x4402ce=_0x16030f;return(_0x4666b0||_0x4402ce(0x518))[_0x4402ce(0x623)]();}function _0x568eb1(_0x235d29){const _0x15d7b8=_0x16030f;if(Array[_0x15d7b8(0x321)](_0x235d29))return _0x235d29['flatMap'](_0x568eb1);return String(_0x235d29||'')[_0x15d7b8(0x27b)](',')[_0x15d7b8(0x341)](_0x26fee5=>_0x26fee5[_0x15d7b8(0x1c1)]())[_0x15d7b8(0x78a)](Boolean);}function _0x1bd4d3(..._0x4ade52){const _0x180267=_0x16030f;return[...new Set(_0x4ade52[_0x180267(0x52c)](_0x568eb1))][_0x180267(0x4d3)](',\x20');}function _0x1a70e4(_0x19695f,_0x5c4f6f){const _0x138929=_0x16030f;if(!_0x19695f)return![];if(_0x5c4f6f==='*')return!![];if(_0x5c4f6f instanceof RegExp)return _0x5c4f6f[_0x138929(0x30a)](_0x19695f);if(typeof _0x5c4f6f==='function')return!!_0x5c4f6f(_0x19695f);if(Array['isArray'](_0x5c4f6f))return _0x5c4f6f['includes'](_0x19695f);return _0x5c4f6f===_0x19695f;}function _0x101b32(_0x2751d8={},_0x2e7c80={},_0x9ecbaa=null){const _0x4a647a=_0x16030f;if(!_0x2e7c80)return null;const _0x572685=_0x2751d8[_0x4a647a(0x50c)],_0x4d2b03=_0x2e7c80[_0x4a647a(0x168)]??_0x2e7c80[_0x4a647a(0x50c)]??'*',_0xa77977=_0x4d2b03==='*'?'*':_0x1a70e4(_0x572685,_0x4d2b03)?_0x572685:null;if(!_0xa77977)return null;const _0x400484=_0x2751d8[_0x4a647a(0x190)],_0x43eae8=_0x2e7c80[_0x4a647a(0x78b)]??_0x2e7c80[_0x4a647a(0x556)]??['content-type','authorization',_0x4a647a(0x4fc),_0x4a647a(0x693),'x-requested-with'],_0x5732b7=_0x2e7c80['methods']??_0x2e7c80[_0x4a647a(0x179)]??(_0x9ecbaa?[_0x9ecbaa,_0x4a647a(0xf5)]:[_0x4a647a(0x518),_0x4a647a(0x77d),_0x4a647a(0xf5)]),_0x338458=_0x2e7c80[_0x4a647a(0x6bd)]??[_0x4a647a(0x4fc)],_0x29e889={'access-control-allow-origin':_0xa77977,'access-control-allow-methods':Array[_0x4a647a(0x321)](_0x5732b7)?_0x5732b7['join'](',\x20'):String(_0x5732b7),'access-control-allow-headers':_0x400484?_0x1bd4d3(_0x43eae8,_0x400484):Array[_0x4a647a(0x321)](_0x43eae8)?_0x43eae8[_0x4a647a(0x4d3)](',\x20'):String(_0x43eae8),'access-control-expose-headers':Array[_0x4a647a(0x321)](_0x338458)?_0x338458['join'](',\x20'):String(_0x338458),'vary':_0x1bd4d3('Origin',_0xa77977==='*'?'':_0x4a647a(0x25e),_0x400484?_0x4a647a(0x2b1):'')};if(_0x2e7c80[_0x4a647a(0x524)])_0x29e889[_0x4a647a(0x2ca)]=_0x4a647a(0x696);if(Number[_0x4a647a(0x758)](_0x2e7c80[_0x4a647a(0x2fc)]))_0x29e889[_0x4a647a(0x4a4)]=String(_0x2e7c80['maxAge']);return _0x29e889;}function _0x884503(_0x229244){const _0x237ceb=_0x16030f,_0x1f5556=[],_0x58141e={};let _0x5e178b=![];_0x229244['endsWith']('/*')&&(_0x5e178b=!![],_0x229244=_0x229244['slice'](0x0,-0x2),_0x1f5556[_0x237ceb(0x1c7)]('*'));let _0x7cbc42=_0x229244[_0x237ceb(0x552)](/\/+$/,'')[_0x237ceb(0x552)](/\[([^\]]*)\]/g,(_0x7007df,_0xe553c7)=>{const _0x12cbfd=_0x237ceb,_0x1bb922=_0xe553c7[_0x12cbfd(0x552)](/\/:(\w+)(?:=([^/\]\s]*))?/g,(_0x180882,_0x55abd8,_0x4d1d11)=>{const _0x1b2c45=_0x12cbfd;_0x1f5556['push'](_0x55abd8);if(_0x4d1d11!==undefined)_0x58141e[_0x55abd8]=_0x4d1d11;return _0x1b2c45(0x464);});return _0x12cbfd(0x1c3)+_0x1bb922+')?';})[_0x237ceb(0x552)](/\/:(\w+)/g,(_0x36123c,_0x1aa663)=>{const _0x637b98=_0x237ceb;return _0x1f5556[_0x637b98(0x1c7)](_0x1aa663),_0x637b98(0x464);});if(_0x7cbc42==='')_0x7cbc42='/';return{'keys':_0x1f5556,'defaults':_0x58141e,'wildcard':_0x5e178b,'regex':new RegExp(_0x5e178b?'^'+_0x7cbc42+_0x237ceb(0x6d8):'^'+_0x7cbc42+'$')};}function _0x30d224(_0x26fb83){const _0x2e09c0=_0x16030f;if(_0x26fb83==null)return _0x26fb83;return JSON[_0x2e09c0(0x325)](JSON[_0x2e09c0(0x490)](_0x26fb83));}function _0x446054(_0x1238fa){const _0xa656b0=_0x16030f;if(_0x1238fa==null)return null;if(_0x1238fa[_0xa656b0(0x4cc)]===_0xa656b0(0x759)&&_0x1238fa[_0xa656b0(0x4de)]&&!Array[_0xa656b0(0x321)](_0x1238fa['properties']))return _0x30d224(_0x1238fa);const _0x7be036=Object[_0xa656b0(0x337)](_0x1238fa),_0x143a25=_0x7be036[_0xa656b0(0x275)]>0x0&&_0x7be036[_0xa656b0(0x4b7)](_0x233333=>{const _0x5cef1d=_0xa656b0;return _0x233333&&typeof _0x233333==='object'&&!Array[_0x5cef1d(0x321)](_0x233333)&&(Object[_0x5cef1d(0x44c)][_0x5cef1d(0x4ea)][_0x5cef1d(0x120)](_0x233333,_0x5cef1d(0x4cc))||Object[_0x5cef1d(0x44c)]['hasOwnProperty']['call'](_0x233333,_0x5cef1d(0x4de))||Object[_0x5cef1d(0x44c)][_0x5cef1d(0x4ea)]['call'](_0x233333,_0x5cef1d(0x147))||Object[_0x5cef1d(0x44c)][_0x5cef1d(0x4ea)][_0x5cef1d(0x120)](_0x233333,'default'));});if(_0x143a25)return{'type':'object','properties':_0x30d224(_0x1238fa),'required':[],'additionalProperties':![]};const _0x7c4a07={},_0x2fff8b=[];for(const [_0x32f52f,_0x2e999a]of Object['entries'](_0x1238fa)){_0x7c4a07[_0x32f52f]=_0x270241(_0x2e999a);if(_0x2e999a!==null&&_0x2e999a!==undefined)_0x2fff8b[_0xa656b0(0x1c7)](_0x32f52f);}return{'type':'object','properties':_0x7c4a07,'required':_0x2fff8b,'additionalProperties':![]};}function _0x270241(_0x23032a){const _0x2fe9b5=_0x16030f;if(_0x23032a===null)return{'type':[_0x2fe9b5(0xdb),'string','number',_0x2fe9b5(0x2e9),_0x2fe9b5(0x759),_0x2fe9b5(0x4f4)]};if(Array[_0x2fe9b5(0x321)](_0x23032a))return{'type':_0x2fe9b5(0x4f4),'items':_0x23032a[_0x2fe9b5(0x275)]>0x0?_0x270241(_0x23032a[0x0]):{}};switch(typeof _0x23032a){case'string':return{'type':_0x2fe9b5(0x5c5),'default':_0x23032a};case _0x2fe9b5(0x783):return{'type':Number[_0x2fe9b5(0x730)](_0x23032a)?'integer':_0x2fe9b5(0x783),'default':_0x23032a};case _0x2fe9b5(0x2e9):return{'type':'boolean','default':_0x23032a};case _0x2fe9b5(0x759):{const _0x18c27b={};for(const [_0x361d8b,_0x12b3ea]of Object[_0x2fe9b5(0x597)](_0x23032a))_0x18c27b[_0x361d8b]=_0x270241(_0x12b3ea);return{'type':'object','properties':_0x18c27b,'additionalProperties':!![],'default':_0x30d224(_0x23032a)};}default:return{};}}function _0xbfe24e(_0x4253c1,_0x417147){const _0x334545=_0x16030f,_0x4a7bb9=[];for(const _0x1a50a0 of _0x417147[_0x334545(0x157)]){if(_0x1a50a0==='*')continue;_0x4a7bb9[_0x334545(0x1c7)]({'name':_0x1a50a0,'required':!Object[_0x334545(0x44c)][_0x334545(0x4ea)][_0x334545(0x120)](_0x417147[_0x334545(0x3ef)],_0x1a50a0),'default':_0x417147['defaults'][_0x1a50a0]});}return _0x4a7bb9;}function _0x1c8252(_0x4e234f={},_0x31c07e){const _0xfcc4d=_0x16030f,_0x3c3534=_0x446054(_0x4e234f[_0xfcc4d(0x5b1)]?.[_0xfcc4d(0x37d)]??_0x4e234f[_0xfcc4d(0x455)]??null),_0x5b4a42=_0x4e234f[_0xfcc4d(0x5b1)]?.[_0xfcc4d(0x6d0)]??(_0x4e234f['raw']?_0xfcc4d(0x7a8):_0x31c07e[_0xfcc4d(0x13f)]===_0xfcc4d(0x518)||_0x31c07e[_0xfcc4d(0x13f)]===_0xfcc4d(0x703)?_0xfcc4d(0x5de):_0xfcc4d(0x115));return{'querySchema':_0x3c3534,'bodyMode':_0x5b4a42,'bindings':_0x30d224(_0x4e234f[_0xfcc4d(0x5b1)]?.['bindings']??{}),'statuses':_0x30d224(_0x4e234f['http']?.['statuses']??(_0x4e234f[_0xfcc4d(0x309)]||[])),'transport':_0x4e234f[_0xfcc4d(0x5b1)]?.[_0xfcc4d(0x33d)]??(_0x4e234f[_0xfcc4d(0x2ec)]?'sse':_0x4e234f[_0xfcc4d(0x7a8)]?'raw':_0xfcc4d(0x22c)),'rawResponse':_0x4e234f[_0xfcc4d(0x5b1)]?.[_0xfcc4d(0x500)]??!!_0x4e234f[_0xfcc4d(0x500)],'cors':_0x30d224(_0x4e234f[_0xfcc4d(0x5b1)]?.[_0xfcc4d(0x72c)]??_0x4e234f[_0xfcc4d(0x72c)]??null)};}function _0x2c4a32(_0xf408a6){const _0x1489e4=_0x16030f,_0x3aa5e5=_0xf408a6[_0x1489e4(0x499)]||{},_0x150add=_0xbfe24e(_0xf408a6['path'],_0xf408a6[_0x1489e4(0x473)]),_0x3f0a99=!!(_0x3aa5e5['id']||_0x3aa5e5[_0x1489e4(0x20a)]||_0x3aa5e5[_0x1489e4(0x388)]||_0x3aa5e5[_0x1489e4(0x5b1)]||_0x3aa5e5[_0x1489e4(0x6e0)]||_0x3aa5e5['cli']||_0x3aa5e5[_0x1489e4(0x319)]||_0x3aa5e5[_0x1489e4(0x64b)]),_0x60b22d=_0x1c8252(_0x3aa5e5,_0xf408a6),_0x30cfc8=_0x3aa5e5[_0x1489e4(0x20a)]?_0x30d224(_0x3aa5e5[_0x1489e4(0x20a)]):null;return{'id':_0x3aa5e5['id']??null,'summary':_0x3aa5e5['summary']??null,'description':_0x3aa5e5[_0x1489e4(0x3b6)]??null,'tags':_0x30d224(_0x3aa5e5[_0x1489e4(0x11c)]??[]),'category':_0x3aa5e5[_0x1489e4(0x72b)]??null,'safety':_0x30d224(_0x3aa5e5[_0x1489e4(0x64b)]??null),'access':_0x30d224(_0x3aa5e5[_0x1489e4(0x319)]??null),'inputSchema':_0x30cfc8,'outputSchema':_0x30d224(_0x3aa5e5[_0x1489e4(0x388)]??null),'examples':_0x30d224(_0x3aa5e5[_0x1489e4(0x521)]??[]),'pathParams':_0x150add,'http':_0x60b22d,'cli':_0x30d224(_0x3aa5e5[_0x1489e4(0x1eb)]??null),'mcp':_0x30d224(_0x3aa5e5['mcp']??null),'legacy':{'params':_0x30d224(_0x3aa5e5['params']??null),'query':_0x30d224(_0x3aa5e5[_0x1489e4(0x455)]??null),'body':_0x30d224(_0x3aa5e5[_0x1489e4(0x612)]??null),'response':_0x30d224(_0x3aa5e5[_0x1489e4(0x66a)]??null)},'transport':{'raw':!!_0x3aa5e5[_0x1489e4(0x7a8)],'sse':!!_0x3aa5e5[_0x1489e4(0x2ec)],'rawResponse':!!_0x3aa5e5['rawResponse'],'cors':_0x30d224(_0x3aa5e5[_0x1489e4(0x72c)]??null)},'hasCanonical':_0x3f0a99};}function _0x53889d(_0x1d511b,_0x5d2905){const _0x3df1df=_0x16030f;if(!_0x5d2905?.[_0x3df1df(0x711)])return;if(!_0x5d2905[_0x3df1df(0x20a)]||_0x5d2905[_0x3df1df(0x20a)][_0x3df1df(0x4cc)]!==_0x3df1df(0x759)||!_0x5d2905[_0x3df1df(0x20a)][_0x3df1df(0x4de)])throw new Error(_0x3df1df(0x24c)+_0x1d511b[_0x3df1df(0x13f)]+'\x20'+_0x1d511b[_0x3df1df(0x272)]+_0x3df1df(0x49f));const _0xcd117e=_0x5d2905[_0x3df1df(0x20a)][_0x3df1df(0x4de)]||{},_0x1f8311=new Set(_0x5d2905[_0x3df1df(0x3f9)][_0x3df1df(0x341)](_0x413c6f=>_0x413c6f[_0x3df1df(0x570)])),_0x580440=new Set(Object[_0x3df1df(0x157)](_0x5d2905[_0x3df1df(0x5b1)]?.['querySchema']?.['properties']||{})),_0x5ac2a5=new Set(Object[_0x3df1df(0x157)](_0x5d2905['http']?.[_0x3df1df(0x1c0)]||{}));for(const _0x5541e4 of _0x5d2905[_0x3df1df(0x3f9)]){if(!_0xcd117e[_0x5541e4[_0x3df1df(0x570)]])throw new Error('Route\x20'+_0x1d511b[_0x3df1df(0x13f)]+'\x20'+_0x1d511b[_0x3df1df(0x272)]+'\x20missing\x20path\x20field\x20in\x20inputSchema:\x20'+_0x5541e4[_0x3df1df(0x570)]);}for(const _0x13e409 of _0x580440){if(!_0xcd117e[_0x13e409])throw new Error(_0x3df1df(0x24c)+_0x1d511b[_0x3df1df(0x13f)]+'\x20'+_0x1d511b[_0x3df1df(0x272)]+_0x3df1df(0x5c0)+_0x13e409);}for(const _0x12a35b of _0x5ac2a5){if(!_0xcd117e[_0x12a35b])throw new Error(_0x3df1df(0x24c)+_0x1d511b[_0x3df1df(0x13f)]+'\x20'+_0x1d511b[_0x3df1df(0x272)]+'\x20binding\x20references\x20missing\x20input\x20field:\x20'+_0x12a35b);}for(const _0x31bca6 of _0x5ac2a5){if(_0x1f8311[_0x3df1df(0x7b1)](_0x31bca6))throw new Error(_0x3df1df(0x24c)+_0x1d511b[_0x3df1df(0x13f)]+'\x20'+_0x1d511b[_0x3df1df(0x272)]+_0x3df1df(0x433)+_0x31bca6);if(_0x580440[_0x3df1df(0x7b1)](_0x31bca6))throw new Error(_0x3df1df(0x24c)+_0x1d511b[_0x3df1df(0x13f)]+'\x20'+_0x1d511b[_0x3df1df(0x272)]+'\x20has\x20ambiguous\x20binding\x20for\x20query\x20field:\x20'+_0x31bca6);const _0x4fbba8=_0x5d2905['http'][_0x3df1df(0x1c0)][_0x31bca6];if(!/^params\.[A-Za-z0-9_*.-]+$/[_0x3df1df(0x30a)](_0x4fbba8)&&!/^query\.[A-Za-z0-9_*.-]+$/[_0x3df1df(0x30a)](_0x4fbba8)&&!/^body(?:\.[A-Za-z0-9_*.-]+)?$/['test'](_0x4fbba8)&&!/^headers\.[A-Za-z0-9_*.-]+$/[_0x3df1df(0x30a)](_0x4fbba8))throw new Error(_0x3df1df(0x24c)+_0x1d511b['method']+'\x20'+_0x1d511b[_0x3df1df(0x272)]+_0x3df1df(0x384)+_0x31bca6+':\x20'+_0x4fbba8);}for(const _0x4764ff of _0x580440){if(_0x1f8311[_0x3df1df(0x7b1)](_0x4764ff))throw new Error(_0x3df1df(0x24c)+_0x1d511b[_0x3df1df(0x13f)]+'\x20'+_0x1d511b[_0x3df1df(0x272)]+_0x3df1df(0x688)+_0x4764ff);}const _0x4d46a7=_0x5d2905[_0x3df1df(0x5b1)]?.['bodyMode'],_0x15e158=new Set([_0x3df1df(0x5de),_0x3df1df(0x115),_0x3df1df(0x759),_0x3df1df(0x142),_0x3df1df(0x4f4),_0x3df1df(0x7a8)]);if(!_0x15e158[_0x3df1df(0x7b1)](_0x4d46a7))throw new Error(_0x3df1df(0x24c)+_0x1d511b[_0x3df1df(0x13f)]+'\x20'+_0x1d511b[_0x3df1df(0x272)]+_0x3df1df(0x277)+_0x4d46a7);if(_0x4d46a7===_0x3df1df(0x7a8)&&!_0x1d511b[_0x3df1df(0x499)]?.[_0x3df1df(0x7a8)])throw new Error('Route\x20'+_0x1d511b['method']+'\x20'+_0x1d511b[_0x3df1df(0x272)]+_0x3df1df(0x6f6));if(_0x5d2905[_0x3df1df(0x6e0)]?.[_0x3df1df(0x1be)]!==![]&&(_0x1d511b[_0x3df1df(0x499)]?.['raw']||_0x1d511b['meta']?.['sse']||_0x5d2905[_0x3df1df(0x5b1)]?.[_0x3df1df(0x33d)]===_0x3df1df(0x515)))throw new Error(_0x3df1df(0x24c)+_0x1d511b[_0x3df1df(0x13f)]+'\x20'+_0x1d511b[_0x3df1df(0x272)]+'\x20cannot\x20be\x20MCP-exposed\x20without\x20an\x20explicit\x20adapter\x20because\x20it\x20uses\x20'+_0x5d2905['http']?.[_0x3df1df(0x33d)]);const _0x4041af=Object[_0x3df1df(0x157)](_0xcd117e)[_0x3df1df(0x78a)](_0x540ad0=>{const _0x5cf771=_0x3df1df;if(_0x1f8311[_0x5cf771(0x7b1)](_0x540ad0))return![];if(_0x580440[_0x5cf771(0x7b1)](_0x540ad0))return![];if(_0x5ac2a5['has'](_0x540ad0))return![];return!![];});if(_0x4d46a7===_0x3df1df(0x5de)&&_0x4041af[_0x3df1df(0x275)]>0x0)throw new Error(_0x3df1df(0x24c)+_0x1d511b[_0x3df1df(0x13f)]+'\x20'+_0x1d511b['path']+_0x3df1df(0x25b)+_0x4041af[_0x3df1df(0x4d3)](',\x20'));if(_0x4d46a7===_0x3df1df(0x4f4)&&_0x4041af['filter'](_0x3ea234=>_0x1fee6f(_0xcd117e[_0x3ea234],_0x3df1df(0x4f4)))['length']!==0x1)throw new Error('Route\x20'+_0x1d511b[_0x3df1df(0x13f)]+'\x20'+_0x1d511b[_0x3df1df(0x272)]+_0x3df1df(0x2c5));}function _0x2d52cd(_0x13da10,_0x2d1bee,_0x200477,_0x1c51bb){const _0x4498b9=_0x16030f;for(const [_0x4c40dc,_0x498b12]of Object['entries'](_0x13da10)){if(_0x2d1bee[_0x4498b9(0x7b1)](_0x4c40dc)||_0x200477[_0x4498b9(0x7b1)](_0x4c40dc)||Object[_0x4498b9(0x44c)]['hasOwnProperty'][_0x4498b9(0x120)](_0x1c51bb,_0x4c40dc))continue;if(_0x1fee6f(_0x498b12,_0x4498b9(0x4f4)))return _0x4c40dc;}return null;}function _0x4de3fb(_0x6cd06e){const _0x341f48=_0x16030f;if(Array[_0x341f48(0x321)](_0x6cd06e))return _0x6cd06e;if(_0x6cd06e==null)return[];return[_0x6cd06e];}function _0x1fee6f(_0x57240b,_0x2cf280){const _0x3dc17b=_0x16030f;return _0x4de3fb(_0x57240b?.['type'])[_0x3dc17b(0x550)](_0x2cf280);}function _0x2b54a7(_0x177310,_0x389bed){const _0x582645=_0x16030f;if(_0x177310==null||typeof _0x177310!==_0x582645(0x5c5))return _0x177310;const _0xa8f796=_0x4de3fb(_0x389bed?.[_0x582645(0x4cc)]);if(_0xa8f796[_0x582645(0x275)]===0x0)return _0x177310;if(_0xa8f796[_0x582645(0x550)](_0x582645(0xdb))&&_0x177310===_0x582645(0xdb))return null;if(_0xa8f796[_0x582645(0x550)](_0x582645(0x2e9))){if(_0x177310==='true')return!![];if(_0x177310==='false')return![];}if(_0xa8f796[_0x582645(0x550)]('integer')&&/^-?\d+$/[_0x582645(0x30a)](_0x177310))return Number[_0x582645(0x44b)](_0x177310,0xa);if(_0xa8f796[_0x582645(0x550)](_0x582645(0x783))&&/^-?(?:\d+|\d*\.\d+)$/[_0x582645(0x30a)](_0x177310))return Number(_0x177310);return _0x177310;}function _0x5946de(_0x49d80d){return _0x30d224(_0x49d80d);}function _0x5f3e70(_0x8f0262,_0x1dd8c2={},_0x1306be={},_0x519fa6=null,_0x47d9eb={}){const _0x2a9253=_0x16030f,_0x11eb0e=_0x8f0262?.['operation'];if(!_0x11eb0e?.[_0x2a9253(0x711)]||!_0x11eb0e['inputSchema'])return null;const _0x43ab56=_0x11eb0e[_0x2a9253(0x20a)]['properties']||{},_0x567614=_0x11eb0e[_0x2a9253(0x5b1)]?.[_0x2a9253(0x37d)]?.[_0x2a9253(0x4de)]||{},_0x214edd=_0x11eb0e[_0x2a9253(0x5b1)]?.['bindings']||{},_0x1307d4=new Set((_0x11eb0e[_0x2a9253(0x3f9)]||[])[_0x2a9253(0x341)](_0x525254=>_0x525254[_0x2a9253(0x570)])),_0x40718c=new Set(Object['keys'](_0x567614)),_0x561b42={};for(const [_0x53f7c3,_0x2b546a]of Object['entries'](_0x43ab56)){Object[_0x2a9253(0x44c)][_0x2a9253(0x4ea)][_0x2a9253(0x120)](_0x2b546a||{},_0x2a9253(0x58f))&&(_0x561b42[_0x53f7c3]=_0x5946de(_0x2b546a[_0x2a9253(0x58f)]));}for(const _0x31ca4e of _0x11eb0e['pathParams']||[]){if(!Object['prototype']['hasOwnProperty'][_0x2a9253(0x120)](_0x1dd8c2,_0x31ca4e[_0x2a9253(0x570)]))continue;const _0x54c6bd=_0x43ab56[_0x31ca4e[_0x2a9253(0x570)]]||{};_0x561b42[_0x31ca4e[_0x2a9253(0x570)]]=_0x2b54a7(_0x1dd8c2[_0x31ca4e[_0x2a9253(0x570)]],_0x54c6bd);}for(const [_0xe4b0d5,_0x532c23]of Object[_0x2a9253(0x597)](_0x567614)){if(!Object[_0x2a9253(0x44c)][_0x2a9253(0x4ea)][_0x2a9253(0x120)](_0x1306be,_0xe4b0d5))continue;_0x561b42[_0xe4b0d5]=_0x2b54a7(_0x1306be[_0xe4b0d5],_0x532c23||_0x43ab56[_0xe4b0d5]||{});}for(const [_0x582c56,_0x3274a1]of Object[_0x2a9253(0x597)](_0x214edd)){if(typeof _0x3274a1!=='string')continue;let _0x5dc73a;if(_0x3274a1[_0x2a9253(0x74f)](_0x2a9253(0x130)))_0x5dc73a=_0x1dd8c2[_0x3274a1['slice'](0x7)];else{if(_0x3274a1[_0x2a9253(0x74f)](_0x2a9253(0xe6)))_0x5dc73a=_0x1306be[_0x3274a1[_0x2a9253(0x3a9)](0x6)];else{if(_0x3274a1===_0x2a9253(0x612))_0x5dc73a=_0x519fa6;else{if(_0x3274a1['startsWith'](_0x2a9253(0x262)))_0x5dc73a=_0x519fa6?.[_0x3274a1['slice'](0x5)];else{if(_0x3274a1[_0x2a9253(0x74f)](_0x2a9253(0x330)))_0x5dc73a=_0x47d9eb?.[_0x3274a1[_0x2a9253(0x3a9)](0x8)[_0x2a9253(0x46c)]()]??_0x47d9eb?.[_0x3274a1[_0x2a9253(0x3a9)](0x8)];}}}}if(_0x5dc73a!==undefined)_0x561b42[_0x582c56]=_0x5dc73a;}const _0x1d49c8=_0x11eb0e[_0x2a9253(0x5b1)]?.['bodyMode'];if(_0x1d49c8!==_0x2a9253(0x5de)&&_0x1d49c8!==_0x2a9253(0x7a8)&&_0x519fa6!=null){if(_0x1d49c8==='array'&&Array[_0x2a9253(0x321)](_0x519fa6)){const _0x532a8a=_0x2d52cd(_0x43ab56,_0x1307d4,_0x40718c,_0x214edd);if(_0x532a8a)_0x561b42[_0x532a8a]=_0x519fa6;}else{if(_0x1d49c8===_0x2a9253(0x759))for(const [_0xa3e9bc,_0x236959]of Object[_0x2a9253(0x597)](_0x43ab56)){if(_0x1307d4[_0x2a9253(0x7b1)](_0xa3e9bc)||_0x40718c['has'](_0xa3e9bc)||Object[_0x2a9253(0x44c)][_0x2a9253(0x4ea)][_0x2a9253(0x120)](_0x214edd,_0xa3e9bc))continue;if(Object[_0x2a9253(0x44c)][_0x2a9253(0x4ea)][_0x2a9253(0x120)](_0x519fa6,_0xa3e9bc))_0x561b42[_0xa3e9bc]=_0x519fa6[_0xa3e9bc];else{if(_0x1fee6f(_0x236959,_0x2a9253(0x759)))_0x561b42[_0xa3e9bc]=_0x519fa6;}}else for(const [_0x51c8e4,_0x263f1e]of Object[_0x2a9253(0x597)](_0x519fa6)){if(_0x1307d4[_0x2a9253(0x7b1)](_0x51c8e4)||_0x40718c[_0x2a9253(0x7b1)](_0x51c8e4)||Object[_0x2a9253(0x44c)][_0x2a9253(0x4ea)][_0x2a9253(0x120)](_0x214edd,_0x51c8e4))continue;_0x561b42[_0x51c8e4]=_0x263f1e;}}}return _0x561b42;}function _0x5dcd14(_0xe119f9,_0x44cd50,_0x3bba5a,_0x5a455e){const _0x56879e=_0x16030f;if(!_0x44cd50)return;const _0x21f424=_0x4de3fb(_0x44cd50[_0x56879e(0x4cc)]);if(_0xe119f9===undefined)return;if(_0xe119f9===null){_0x21f424[_0x56879e(0x275)]>0x0&&!_0x21f424[_0x56879e(0x550)](_0x56879e(0xdb))&&_0x5a455e[_0x56879e(0x1c7)]({'field':_0x3bba5a,'message':'must\x20not\x20be\x20null','expected':_0x21f424[_0x56879e(0x4d3)]('|'),'actual':null});return;}if(_0x21f424['length']===0x0)return;const _0x47a1b4=_0x21f424['some'](_0xbdd57d=>{const _0x24531b=_0x56879e;switch(_0xbdd57d){case'string':return typeof _0xe119f9===_0x24531b(0x5c5);case'integer':return Number[_0x24531b(0x730)](_0xe119f9);case _0x24531b(0x783):return typeof _0xe119f9==='number'&&Number['isFinite'](_0xe119f9);case _0x24531b(0x2e9):return typeof _0xe119f9===_0x24531b(0x2e9);case _0x24531b(0x759):return _0xe119f9&&typeof _0xe119f9===_0x24531b(0x759)&&!Array['isArray'](_0xe119f9);case _0x24531b(0x4f4):return Array[_0x24531b(0x321)](_0xe119f9);case _0x24531b(0xdb):return _0xe119f9===null;default:return!![];}});if(!_0x47a1b4){_0x5a455e[_0x56879e(0x1c7)]({'field':_0x3bba5a,'message':'must\x20be\x20'+_0x21f424[_0x56879e(0x4d3)]('|'),'expected':_0x21f424['join']('|'),'actual':_0xe119f9});return;}Array['isArray'](_0xe119f9)&&_0x44cd50[_0x56879e(0x147)]&&_0xe119f9['forEach']((_0x394ffb,_0x1732c1)=>_0x5dcd14(_0x394ffb,_0x44cd50['items'],_0x3bba5a+'['+_0x1732c1+']',_0x5a455e));}function _0x1a9a85(_0x3786e1,_0x2d95af){const _0x1a3e68=_0x16030f,_0xcee6ae=_0x3786e1?.[_0x1a3e68(0x26b)];if(!_0xcee6ae?.['hasCanonical']||!_0xcee6ae[_0x1a3e68(0x20a)])return null;const _0x14ac3e=_0xcee6ae['inputSchema'],_0x5df49d=_0x14ac3e['properties']||{},_0x129e32=new Set(_0x14ac3e[_0x1a3e68(0x78e)]||[]),_0x3bb56b=[];for(const _0x1ca295 of _0x129e32){_0x2d95af[_0x1ca295]===undefined&&_0x3bb56b['push']({'field':_0x1ca295,'message':_0x1a3e68(0x533),'expected':_0x1a3e68(0x118),'actual':undefined});}if(_0x14ac3e[_0x1a3e68(0x491)]===![])for(const _0x2f03da of Object['keys'](_0x2d95af||{})){!Object['prototype'][_0x1a3e68(0x4ea)]['call'](_0x5df49d,_0x2f03da)&&_0x3bb56b[_0x1a3e68(0x1c7)]({'field':_0x2f03da,'message':_0x1a3e68(0x2a8),'expected':'known\x20field','actual':_0x2d95af[_0x2f03da]});}for(const [_0x31f6d6,_0x3ff934]of Object[_0x1a3e68(0x597)](_0x5df49d)){_0x5dcd14(_0x2d95af[_0x31f6d6],_0x3ff934,_0x31f6d6,_0x3bb56b);}if(_0x3bb56b[_0x1a3e68(0x275)]===0x0)return null;return{'code':'VALIDATION_ERROR','errors':_0x3bb56b};}function _0x36cd46(_0x1ec412=[]){const _0x3498b7=_0x16030f;if(!Array[_0x3498b7(0x321)](_0x1ec412)||_0x1ec412[_0x3498b7(0x275)]===0x0)return null;const _0x83e0b3=_0x1ec412['slice'](0x0,0x3)[_0x3498b7(0x341)]((_0x30e339={})=>{const _0x52dbef=_0x3498b7,_0x40cd23=_0x30e339[_0x52dbef(0x71b)]?_0x30e339[_0x52dbef(0x71b)]+'\x20':'';return(''+_0x40cd23+(_0x30e339['message']||_0x52dbef(0x6d2)))[_0x52dbef(0x1c1)]();})[_0x3498b7(0x4d3)](';\x20');return _0x1ec412[_0x3498b7(0x275)]>0x3?_0x83e0b3+_0x3498b7(0x102)+(_0x1ec412['length']-0x3)+'\x20more)':_0x83e0b3;}function _0x13240d(_0x35ed1b,_0x5a601b={}){const _0x56f099=_0x16030f,_0xc78626=_0x5a601b?.[_0x56f099(0x735)]?.[_0x56f099(0x131)]??_0x5a601b?.['error']??'Unknown\x20error',_0x101c46=_0x5a601b?.['result']?.[_0x56f099(0x26d)]??_0x5a601b?.['details']??_0xc78626?.[_0x56f099(0x26d)]??null,_0x2c648f=_0x5a601b?.['result']?.[_0x56f099(0x737)]??_0x5a601b?.[_0x56f099(0x737)]??_0xc78626?.[_0x56f099(0x737)]??null,_0x489e08=_0x5a601b?.[_0x56f099(0x735)]?.['message']??_0x5a601b?.[_0x56f099(0x63f)]??_0xc78626?.['message']??null,_0x24bdee=typeof _0xc78626===_0x56f099(0x5c5)?_0xc78626:null,_0x5b7bf2=typeof _0x24bdee===_0x56f099(0x5c5)&&/^[A-Z0-9_]+$/[_0x56f099(0x30a)](_0x24bdee),_0x81be0d=_0x2c648f??(_0x5b7bf2?_0x24bdee:null)??(_0x35b80b[_0x35ed1b]||_0x56f099(0x2dd)+_0x35ed1b);let _0x236423=_0x489e08;!_0x236423&&typeof _0x24bdee===_0x56f099(0x5c5)&&!_0x5b7bf2&&(_0x236423=_0x24bdee);if(!_0x236423&&_0x81be0d===_0x56f099(0x37b)){const _0x53be29=_0x36cd46(_0x101c46);_0x236423=_0x53be29?'Validation\x20failed:\x20'+_0x53be29:_0x56f099(0x1db);}if(!_0x236423&&Array['isArray'](_0x101c46)&&_0x101c46[_0x56f099(0x275)]>0x0){const _0x576b17=_0x36cd46(_0x101c46);if(_0x576b17)_0x236423=_0x576b17;}if(!_0x236423)_0x236423=_0x35b80b[_0x35ed1b]||_0x56f099(0x451);const _0x43e7c9={'code':_0x81be0d,'message':_0x236423};if(_0x101c46!=null)_0x43e7c9[_0x56f099(0x26d)]=_0x101c46;return _0x43e7c9;}function _0x4196d6(_0x1d2f8c){const _0x1cb32f=_0x16030f,_0x33287f={};if(!_0x1d2f8c)return _0x33287f;for(const _0x3aa635 of _0x1d2f8c[_0x1cb32f(0x27b)](';')){const _0x495235=_0x3aa635[_0x1cb32f(0x373)]('=');if(_0x495235===-0x1)continue;const _0x20bbd4=_0x3aa635[_0x1cb32f(0x3a9)](0x0,_0x495235)[_0x1cb32f(0x1c1)](),_0x143ad0=_0x3aa635[_0x1cb32f(0x3a9)](_0x495235+0x1)['trim']();_0x33287f[_0x20bbd4]=decodeURIComponent(_0x143ad0);}return _0x33287f;}function _0x1a8e09(_0x5bbf8b,_0x157e98){const _0x480ce2=_0x16030f;return _0x157e98=_0x5d860b(_0x157e98),{'status':_0x157e98['status']??_0x5bbf8b[_0x480ce2(0x493)],'headers':{..._0x5bbf8b[_0x480ce2(0x78b)]||{},..._0x157e98[_0x480ce2(0x78b)]||{}},'body':_0x157e98['body']??_0x5bbf8b[_0x480ce2(0x612)]};}function _0x144f0c(_0x23aa43={}){const _0x32d9c7=_0x16030f;return _0x23aa43[_0x32d9c7(0x33d)]||(_0x23aa43[_0x32d9c7(0x1f2)]?'internal':'http');}function _0x2b7399(_0x2cfdb2){const _0xc3eaf6=_0x16030f;if(_0x2cfdb2[_0xc3eaf6(0x68e)]?.['internal']===!![])return!![];if(_0x2cfdb2[_0xc3eaf6(0x68e)]?.[_0xc3eaf6(0x61d)]?.[_0xc3eaf6(0x77a)]===!![])return!![];if(_0x2cfdb2['context']?.[_0xc3eaf6(0x61d)]?.['ok']===!![])return!![];return![];}function _0xd85b1(_0x4a5da5,_0x6b2475){const _0x2f79bb=_0x6b2475['split']('.');let _0x232f24=_0x4a5da5;for(const _0x224948 of _0x2f79bb){_0x232f24=_0x232f24?.[_0x224948];}return _0x232f24||null;}class _0xd5daa6{constructor(){const _0x43b0f8=_0x16030f;this[_0x43b0f8(0x683)]=[],this[_0x43b0f8(0x29f)]=[],this[_0x43b0f8(0x30e)]=[],this[_0x43b0f8(0x3eb)]=0x5*0x400*0x400,this[_0x43b0f8(0x52f)]=null,this[_0x43b0f8(0x782)]=[],this[_0x43b0f8(0x406)]=new Set(),this[_0x43b0f8(0x61d)]={'cookieName':_0x43b0f8(0x46d),'stateCookieName':_0x43b0f8(0x7ce),'csrfCookieName':'kdb_admin_csrf'},this[_0x43b0f8(0x21f)]={},this[_0x43b0f8(0x502)]=new Map(),this['_oidcDiscoveryCache']=null,this[_0x43b0f8(0x5b9)]=null,this[_0x43b0f8(0x5df)]=new Map(),this[_0x43b0f8(0x1cb)]=new _0x5a8dac(),this[_0x43b0f8(0x45a)]=![],this['_userRouteCount']=0x0;}[_0x16030f(0x2cf)](_0x20e5c3={}){const _0x17c141=_0x16030f;return this['_authOptions']=_0x20e5c3||{},this[_0x17c141(0x3bf)]=_0x20e5c3['mode']??_0x17c141(0x462),this[_0x17c141(0x21f)];}get['isSetupMode'](){const _0x4a4d20=_0x16030f;if(this[_0x4a4d20(0x3cc)]?.[_0x4a4d20(0x61d)])return this[_0x4a4d20(0x3cc)]['auth'][_0x4a4d20(0x175)];return![];}[_0x16030f(0x4e8)](){const _0x757c34=_0x16030f;if(this['_okdb']?.[_0x757c34(0x61d)])return this[_0x757c34(0x3cc)][_0x757c34(0x61d)][_0x757c34(0x4e8)]();return this[_0x757c34(0x21f)]||{};}[_0x16030f(0x105)](_0x5b841a){const _0x2fbdb3=_0x16030f;this[_0x2fbdb3(0x683)]['push'](_0x5b841a);}['guard'](_0x410666,_0x64b405){const _0x431457=_0x16030f;this[_0x431457(0x29f)][_0x431457(0x1c7)]({'match':_0x410666,'handler':_0x64b405});}[_0x16030f(0x32c)](_0x274b8c,_0x5a63ee,_0xe13d8d,_0x112257={}){const _0xa6dc9c=_0x16030f,_0x2a47da={'method':_0x4c05a8(_0x274b8c),'path':_0x5a63ee,'matcher':_0x884503(_0x5a63ee),'handler':_0xe13d8d,'meta':_0x112257||{}},_0x414dbb=_0x2c4a32(_0x2a47da);_0x53889d(_0x2a47da,_0x414dbb),_0x2a47da[_0xa6dc9c(0x26b)]=_0x414dbb,_0x2a47da[_0xa6dc9c(0x4a2)]=this['_userPhase']===!![];if(_0x2a47da[_0xa6dc9c(0x4a2)])this[_0xa6dc9c(0x41d)]++;this[_0xa6dc9c(0x30e)][_0xa6dc9c(0x1c7)](_0x2a47da);}[_0x16030f(0x56e)](_0x40a17f,_0x12fc24,_0x27f1cb,_0x592f2e={}){const _0x437776=_0x16030f;this[_0x437776(0x32c)](_0x40a17f,_0x12fc24,_0x27f1cb,{..._0x592f2e,'raw':!![]});}[_0x16030f(0x679)](_0x157024,_0xa9eb2d,{corsOnly:corsOnly=![]}={}){const _0x1a70a9=_0x16030f;let _0x45b0ba=null,_0x3937d7=Infinity;for(const _0x472ab2 of this[_0x1a70a9(0x30e)]){if(corsOnly){if(!_0x472ab2[_0x1a70a9(0x499)]?.[_0x1a70a9(0x72c)])continue;}else{if(_0x472ab2['method']!==_0x157024)continue;}if(!_0x472ab2[_0x1a70a9(0x473)][_0x1a70a9(0x43d)][_0x1a70a9(0x30a)](_0xa9eb2d))continue;const _0x1d358a=_0x472ab2['matcher'][_0x1a70a9(0x157)]?.['length']??0x0;if(_0x1d358a<_0x3937d7){_0x45b0ba=_0x472ab2,_0x3937d7=_0x1d358a;if(_0x1d358a===0x0)break;}}return _0x45b0ba;}['_matchRoute'](_0x3f66f9,_0x21e4ab){const _0x2061a1=_0x16030f,_0x1d6dfb=_0x4c05a8(_0x3f66f9),_0x162aee=this['_bestMatch'](_0x1d6dfb,_0x21e4ab);if(_0x162aee)return _0x162aee;if(_0x1d6dfb===_0x2061a1(0xf5))return this[_0x2061a1(0x679)](_0x1d6dfb,_0x21e4ab,{'corsOnly':!![]});return null;}[_0x16030f(0x389)](_0x55d522,_0x358c9b){const _0x47ecee=_0x16030f;if(_0x55d522?.[_0x47ecee(0x499)]?.[_0x47ecee(0x500)])return![];if(_0x358c9b?.[_0x47ecee(0x78b)]?.[_0x47ecee(0x572)])return![];return!![];}[_0x16030f(0x24f)](){const _0x3bbabf=_0x16030f;return this[_0x3bbabf(0x30e)][_0x3bbabf(0x78a)](_0xdb3f86=>!_0xdb3f86[_0x3bbabf(0x499)]?.[_0x3bbabf(0x287)])[_0x3bbabf(0x341)](_0x65e21e=>({'method':_0x65e21e[_0x3bbabf(0x13f)],'path':_0x65e21e[_0x3bbabf(0x272)],'defaults':_0x65e21e[_0x3bbabf(0x473)][_0x3bbabf(0x3ef)],'meta':_0x65e21e[_0x3bbabf(0x499)],'operation':_0x65e21e[_0x3bbabf(0x26b)]}));}[_0x16030f(0x666)](_0x1fce20,_0x257dbe,_0x31de35={}){const _0x51addb=_0x16030f,{PassThrough:_0x131a89}=require$$5;this[_0x51addb(0x32c)](_0x51addb(0x518),_0x1fce20,({params:_0x5b3c48,query:_0x4b169b,headers:_0x1de475,context:_0x5aee57})=>{const _0x1303c6=_0x51addb,_0x18b955=new _0x131a89();let _0x5283e7=null;const _0x27312a={};try{_0x5aee57?.[_0x1303c6(0x4cf)]?.['socket']?.['setNoDelay'](!![]);}catch{}_0x18b955[_0x1303c6(0x598)](_0x1303c6(0x1d2)),_0x5283e7=setInterval(()=>{const _0x35db76=_0x1303c6;try{_0x18b955[_0x35db76(0x598)](_0x35db76(0x614));}catch{}},0x3a98);const _0x237e60=(_0x47deb2,_0x18a936,_0x2bac9c={})=>{const _0x40ec8f=_0x1303c6;try{const _0x243e0d=_0x2bac9c['raw']?String(_0x18a936??''):JSON[_0x40ec8f(0x490)](_0x18a936);_0x2bac9c['id']!=null&&_0x18b955[_0x40ec8f(0x598)]('id:\x20'+_0x2bac9c['id']+'\x0a');_0x18b955[_0x40ec8f(0x598)](_0x40ec8f(0x25d)+_0x47deb2+'\x0a');for(const _0x39c664 of _0x243e0d[_0x40ec8f(0x27b)]('\x0a')){_0x18b955[_0x40ec8f(0x598)](_0x40ec8f(0x6a8)+_0x39c664+'\x0a');}_0x18b955[_0x40ec8f(0x598)]('\x0a');}catch{}},_0x4e209c=()=>{const _0xa9817d=_0x1303c6;_0x5283e7&&(clearInterval(_0x5283e7),_0x5283e7=null);try{_0x18b955[_0xa9817d(0x2be)]();}catch{}},_0x44e6cb=(_0x25e847,_0x2648cc)=>{_0x27312a[_0x25e847]=_0x2648cc;};_0x5aee57?.['req']?.['on'](_0x1303c6(0x3fb),_0x4e209c),_0x18b955['on']('close',_0x4e209c);if(_0x5aee57?.[_0x1303c6(0x61d)]&&_0x5aee57[_0x1303c6(0x61d)][_0x1303c6(0x462)]!==!![]&&_0x5aee57['auth'][_0x1303c6(0x77a)]){const _0x4af98f={'headers':_0x1de475??{},'cookies':_0x4196d6(_0x1de475?.['cookie']),'context':{},'socket':_0x5aee57?.['req']?.['socket']??{'remoteAddress':null}},_0xab9649=setInterval(async()=>{const _0x4daae0=_0x1303c6;try{const _0x4194a1=await this[_0x4daae0(0x2f0)](_0x4af98f);if(_0x4194a1?.[_0x4daae0(0x462)]===!![]||_0x4194a1?.[_0x4daae0(0x77a)])return;_0x237e60(_0x4daae0(0x61d),{'expired':!![]}),_0x4e209c();}catch{_0x4e209c();}},0xea60);_0xab9649[_0x1303c6(0x334)]?.(),_0x18b955['on'](_0x1303c6(0x3fb),()=>clearInterval(_0xab9649));}const _0x50acae=_0x257dbe({'send':_0x237e60,'close':_0x4e209c,'params':_0x5b3c48??{},'query':_0x4b169b??{},'headers':_0x1de475??{},'context':_0x5aee57,'setHeader':_0x44e6cb});return typeof _0x50acae===_0x1303c6(0x5c8)&&_0x18b955['on'](_0x1303c6(0x3fb),_0x50acae),{'status':0xc8,'headers':{'content-type':_0x1303c6(0x14a),'cache-control':_0x1303c6(0x677),'connection':_0x1303c6(0x4dc),'x-accel-buffering':'no',..._0x27312a},'body':_0x18b955};},{..._0x31de35,'sse':!![]});}async[_0x16030f(0x555)](_0x42774a,_0xc32611){const _0x319427=_0x16030f;for(const _0x118227 of this[_0x319427(0x29f)]){if(!_0x118227[_0x319427(0x4b9)](_0x42774a))continue;const _0x45e707=await _0x118227[_0x319427(0x771)](_0x42774a,_0xc32611);if(_0x45e707===![])return![];}return!![];}async[_0x16030f(0x467)](_0x42f153,_0x169cdc,_0x3e2b0b){let _0x436827=0x0;const _0x31f4d4=async()=>{const _0x2bbbf4=_0x51c5,_0x34c931=this[_0x2bbbf4(0x683)][_0x436827++];if(!_0x34c931)return _0x3e2b0b();return _0x34c931(_0x42f153,_0x169cdc,_0x31f4d4);};return _0x31f4d4();}[_0x16030f(0x6e1)](_0x422866,_0x4f195a){const _0x45210e=_0x16030f,{status:status=0xc8,headers:headers={},body:_0x34fc53}=_0x422866;if(status>=0x12c&&status<0x190)return _0x422866;if(_0x10946f(_0x34fc53))return _0x422866;if(Buffer[_0x45210e(0x744)](_0x34fc53))return _0x422866;if(typeof _0x34fc53===_0x45210e(0x5c5))return _0x422866;const _0x3f02c0={'time':+_0x4f195a[_0x45210e(0x70d)](0x2)};if(_0x34fc53?.[_0x45210e(0x499)]&&typeof _0x34fc53[_0x45210e(0x499)]==='object'){const {time:_0x1ebc22,..._0x43e04a}=_0x34fc53[_0x45210e(0x499)];Object[_0x45210e(0x254)](_0x3f02c0,_0x43e04a);}let _0x55f177;if(status>=0x190){const _0x35fd42=_0x13240d(status,_0x34fc53);_0x55f177={'data':null,'error':_0x35fd42,'meta':_0x3f02c0};}else{if(status===0xcc||_0x34fc53==null)_0x55f177={'data':null,'error':null,'meta':_0x3f02c0};else{let _0x41e5af;if(_0x45210e(0x735)in _0x34fc53)_0x41e5af=_0x34fc53['result'];else{const {meta:_0x3a52ef,..._0x2ff4b3}=_0x34fc53;_0x41e5af=Object[_0x45210e(0x157)](_0x2ff4b3)[_0x45210e(0x275)]>0x0?_0x2ff4b3:null;}_0x55f177={'data':_0x41e5af,'error':null,'meta':_0x3f02c0};}}return{'status':status===0xcc?0xc8:status,'headers':headers,'body':_0x55f177};}async[_0x16030f(0x6a2)](_0x40cb59,_0x205348,_0x405adb={},_0x5d2f74={}){const _0x112e27=_0x16030f;_0x40cb59=_0x4c05a8(_0x40cb59);const _0x1a0876=this[_0x112e27(0x530)](_0x40cb59,_0x205348),_0x2191a7={'method':_0x40cb59,'path':_0x205348,'headers':_0x405adb[_0x112e27(0x78b)]??{},'body':_0x405adb['body']??null,'query':_0x405adb[_0x112e27(0x455)]??{},'context':_0x5d2f74,'cookies':_0x4196d6(_0x405adb[_0x112e27(0x78b)]?.['cookie']),'route':_0x1a0876,'socket':{'remoteAddress':_0x405adb[_0x112e27(0x256)]??_0x112e27(0xf2)}};_0x2191a7[_0x112e27(0x68e)]=_0x2191a7[_0x112e27(0x68e)]||{};!_0x2191a7[_0x112e27(0x68e)][_0x112e27(0x61d)]&&(_0x2191a7[_0x112e27(0x68e)][_0x112e27(0x61d)]=await this['authenticateRequest'](_0x2191a7));if(_0x2191a7['context'][_0x112e27(0x61d)]?.['bootstrapBlocked'])return _0x5d860b({'status':0x193,'body':{'error':{'code':'BOOTSTRAP_LOCALHOST_ONLY','message':_0x112e27(0x251)}}});_0x2191a7[_0x112e27(0x68e)][_0x112e27(0x61d)]?.[_0x112e27(0x1a8)]&&!_0x2191a7['context']['user']&&(_0x2191a7[_0x112e27(0x68e)][_0x112e27(0x1a8)]=_0x2191a7[_0x112e27(0x68e)][_0x112e27(0x61d)][_0x112e27(0x1a8)]);let _0x2ee2ae=null;const _0x18e43d={'status'(_0x558663){_0x2ee2ae=_0x2ee2ae||{},_0x2ee2ae['status']=_0x558663;},'setHeader'(_0x12f186,_0x14f9e5){const _0x5c9635=_0x112e27;_0x2ee2ae=_0x2ee2ae||{},_0x2ee2ae[_0x5c9635(0x78b)]=_0x2ee2ae[_0x5c9635(0x78b)]||{};const _0x538a98=String(_0x12f186)[_0x5c9635(0x46c)]();if(_0x538a98===_0x5c9635(0x580)){const _0x2c4906=_0x2ee2ae[_0x5c9635(0x78b)][_0x12f186];if(!_0x2c4906)_0x2ee2ae['headers'][_0x12f186]=_0x14f9e5;else{if(Array[_0x5c9635(0x321)](_0x2c4906))_0x2c4906[_0x5c9635(0x1c7)](_0x14f9e5);else _0x2ee2ae['headers'][_0x12f186]=[_0x2c4906,_0x14f9e5];}return;}_0x2ee2ae[_0x5c9635(0x78b)][_0x12f186]=_0x14f9e5;},'send'(_0x49d0de){const _0x32ad37=_0x112e27;_0x2ee2ae=_0x2ee2ae||{},_0x2ee2ae[_0x32ad37(0x612)]=_0x49d0de;}},_0x4e38a4=await this[_0x112e27(0x555)](_0x2191a7,_0x18e43d);if(!_0x4e38a4)return _0x5d860b(_0x2ee2ae??{'status':0x193});const _0x22bb8e=this[_0x112e27(0xd2)](_0x2191a7);if(_0x22bb8e)return _0x5d860b(_0x22bb8e);const _0x3ce223=this['_validateOperationRequest'](_0x2191a7);if(_0x3ce223)return _0x5d860b(_0x3ce223);return await this[_0x112e27(0x467)](_0x2191a7,_0x18e43d,async()=>{const _0x48380d=await this['_dispatch'](_0x2191a7);if(_0x2ee2ae==null){_0x2ee2ae=_0x48380d;return;}_0x2ee2ae=_0x1a8e09(_0x2ee2ae,_0x48380d);}),_0x5d860b(_0x2ee2ae);}[_0x16030f(0xd2)](_0x161257){const _0x38f11a=_0x16030f,_0x1c884d=_0x161257[_0x38f11a(0x258)]?.['operation'],_0x2ac646=_0x1c884d?.[_0x38f11a(0x319)];if(!_0x1c884d?.['hasCanonical']||!_0x2ac646)return null;if(_0x161257['context']?.[_0x38f11a(0x61d)]?.[_0x38f11a(0x462)]===!![]||_0x161257[_0x38f11a(0x68e)]?.[_0x38f11a(0x61d)]?.[_0x38f11a(0x2e1)]===!![])return null;const _0x34a3dd=_0x144f0c(_0x161257[_0x38f11a(0x68e)]),_0x240b73=Array['isArray'](_0x2ac646[_0x38f11a(0x288)])?_0x2ac646[_0x38f11a(0x288)]:null;if(_0x2ac646[_0x38f11a(0x3fc)]&&_0x161257[_0x38f11a(0x68e)]?.[_0x38f11a(0x1f2)]!==!![])return{'status':0x193,'body':{'error':_0x38f11a(0x720)}};if(_0x240b73&&_0x240b73['length']>0x0&&!_0x240b73[_0x38f11a(0x550)](_0x34a3dd)&&!(_0x34a3dd===_0x38f11a(0x1f2)&&_0x240b73['includes'](_0x38f11a(0x448))))return{'status':0x193,'body':{'error':_0x38f11a(0x720)}};if(_0x2ac646[_0x38f11a(0x544)]&&!_0x2b7399(_0x161257))return{'status':0x191,'body':{'error':_0x38f11a(0x45d)}};const _0x58b340=_0x2ac646[_0x38f11a(0x689)];if(!_0x58b340)return null;if(_0x161257[_0x38f11a(0x68e)]?.[_0x38f11a(0x61d)]?.[_0x38f11a(0x4cc)]===_0x38f11a(0x537))return null;const _0x15cfd2=_0x161257['context']?.[_0x38f11a(0x61d)]?.[_0x38f11a(0x6b2)];if(!_0x15cfd2){if(_0x161257[_0x38f11a(0x68e)]?.['auth']?.['ok']===!![])return null;return{'status':0x193,'body':{'error':_0x38f11a(0xda)}};}if(!_0x161257[_0x38f11a(0x6a6)]&&_0x161257['route']?.['matcher']){const _0x1e63a3=_0x161257[_0x38f11a(0x258)][_0x38f11a(0x473)][_0x38f11a(0x43d)][_0x38f11a(0x13a)](_0x161257[_0x38f11a(0x272)]);_0x1e63a3&&(_0x161257[_0x38f11a(0x6a6)]={},_0x161257[_0x38f11a(0x258)]['matcher'][_0x38f11a(0x157)]['forEach']((_0xac5c72,_0x97c114)=>{const _0x162287=_0x38f11a,_0x2e8f40=_0x1e63a3[_0x97c114+0x1];_0x161257['params'][_0xac5c72]=_0x2e8f40?decodeURIComponent(_0x2e8f40):_0x161257[_0x162287(0x258)][_0x162287(0x473)][_0x162287(0x3ef)][_0xac5c72]??undefined;}));}let _0xbb0261=null;const _0x5ea455=_0x2ac646['scope']===_0x38f11a(0x3af)?_0x38f11a(0x42a):_0x2ac646[_0x38f11a(0x218)]?.[_0x38f11a(0x3af)];_0x5ea455&&(_0xbb0261=_0xd85b1(_0x161257,_0x5ea455));if(_0xbb0261&&_0xbb0261[_0x38f11a(0x74f)]('~')){const _0x13d778=_0x565543(_0x58b340),_0x54ba10=_0x5e0733(_0x15cfd2[_0x38f11a(0x338)]||[],(_0x15cfd2[_0x38f11a(0x421)]||{})[_0xbb0261]||[]);if(!_0x55acbc(_0x54ba10,_0x13d778))return{'status':0x193,'body':{'error':_0x38f11a(0x403)+_0x13d778+_0x38f11a(0x7c9)}};}const _0x4dce8d=_0x5e0733(_0x15cfd2['permissions']||[],_0xbb0261?(_0x15cfd2[_0x38f11a(0x421)]||{})[_0xbb0261]||[]:[]);if(!_0x55acbc(_0x4dce8d,_0x58b340))return{'status':0x193,'body':{'error':_0x38f11a(0x403)+_0x58b340}};return null;}[_0x16030f(0x416)](_0x339de9){const _0x30cd10=_0x16030f,_0x1c2412=_0x339de9['route'],_0xa060aa=_0x1c2412?.['operation'];if(!_0xa060aa?.[_0x30cd10(0x711)]||!_0xa060aa[_0x30cd10(0x20a)])return null;let _0x44f515=_0x339de9['params']??null;if(!_0x44f515&&_0x1c2412?.[_0x30cd10(0x473)]){const _0x165256=_0x1c2412[_0x30cd10(0x473)][_0x30cd10(0x43d)][_0x30cd10(0x13a)](_0x339de9[_0x30cd10(0x272)]);_0x165256&&(_0x44f515={},_0x1c2412[_0x30cd10(0x473)]['keys'][_0x30cd10(0x17d)]((_0x266988,_0x965189)=>{const _0x148b89=_0x30cd10,_0x55b6b8=_0x165256[_0x965189+0x1];_0x44f515[_0x266988]=_0x55b6b8?decodeURIComponent(_0x55b6b8):_0x1c2412[_0x148b89(0x473)][_0x148b89(0x3ef)][_0x266988]??undefined;}));}const _0x2b0d02=_0x5f3e70(_0x1c2412,_0x44f515??{},_0x339de9['query']??{},_0x339de9['body'],_0x339de9[_0x30cd10(0x78b)]??{}),_0x5892e1=_0x1a9a85(_0x1c2412,_0x2b0d02||{});if(!_0x5892e1)return null;const _0x2c1dfa=_0x36cd46(_0x5892e1[_0x30cd10(0x25a)]);return{'status':0x190,'body':{'error':_0x5892e1[_0x30cd10(0x737)],'code':_0x5892e1[_0x30cd10(0x737)],'message':_0x2c1dfa?_0x30cd10(0x38a)+_0x2c1dfa:_0x30cd10(0x1db),'details':_0x5892e1[_0x30cd10(0x25a)]}};}[_0x16030f(0x4fb)](_0x3ffbd9,_0x4051ec){const _0x10aed6=_0x16030f,_0x3c0aae=_0x1a9a85(_0x3ffbd9,_0x4051ec||{});if(!_0x3c0aae)return null;return{'code':_0x3c0aae[_0x10aed6(0x737)],'message':_0x36cd46(_0x3c0aae['errors'])?_0x10aed6(0x38a)+_0x36cd46(_0x3c0aae[_0x10aed6(0x25a)]):_0x10aed6(0x1db),'details':_0x3c0aae[_0x10aed6(0x25a)]};}async[_0x16030f(0x72f)](_0x46b43f){const _0x1b7112=_0x16030f;if(_0x46b43f['method']==='OPTIONS'){const _0x19cd51=this[_0x1b7112(0x679)](_0x1b7112(0xf5),_0x46b43f['path'],{'corsOnly':!![]});if(_0x19cd51)return{'status':0xcc,'headers':_0x101b32(_0x46b43f[_0x1b7112(0x78b)],_0x19cd51['meta']['cors'],_0x19cd51[_0x1b7112(0x13f)])||{}};}const _0x44385f=this[_0x1b7112(0x679)](_0x46b43f[_0x1b7112(0x13f)],_0x46b43f['path']);if(_0x44385f){const _0x1fc91e=_0x44385f['matcher'][_0x1b7112(0x43d)][_0x1b7112(0x13a)](_0x46b43f[_0x1b7112(0x272)]),_0x145fbe={};_0x44385f[_0x1b7112(0x473)][_0x1b7112(0x157)][_0x1b7112(0x17d)]((_0x5e35fc,_0x270847)=>{const _0x5b2fe5=_0x1b7112,_0xba81d=_0x1fc91e[_0x270847+0x1];_0x145fbe[_0x5e35fc]=_0xba81d?decodeURIComponent(_0xba81d):_0x44385f[_0x5b2fe5(0x473)]['defaults'][_0x5e35fc]??undefined;}),_0x46b43f[_0x1b7112(0x6a6)]=_0x145fbe;try{const _0x30df13=await _0x44385f[_0x1b7112(0x771)]({'params':_0x145fbe,'body':_0x46b43f[_0x1b7112(0x612)],'query':_0x46b43f[_0x1b7112(0x455)],'headers':_0x46b43f[_0x1b7112(0x78b)],'context':_0x46b43f[_0x1b7112(0x68e)]}),_0x1bc7aa=_0x5d860b(_0x30df13),_0x4b0572=_0x101b32(_0x46b43f[_0x1b7112(0x78b)],_0x44385f[_0x1b7112(0x499)]?.[_0x1b7112(0x72c)],_0x44385f[_0x1b7112(0x13f)]);if(!_0x4b0572)return _0x1bc7aa;return{..._0x1bc7aa,'headers':{..._0x1bc7aa[_0x1b7112(0x78b)]||{},..._0x4b0572}};}catch(_0xd3bde6){const _0x3d39d0=_0xd3bde6?.[_0x1b7112(0x493)]||_0x25f941[_0xd3bde6?.[_0x1b7112(0x737)]]||0x1f4;return{'status':_0x3d39d0,'body':{'error':_0xd3bde6[_0x1b7112(0x63f)]||_0x1b7112(0x3fa),'code':_0xd3bde6?.[_0x1b7112(0x737)]||_0x35b80b[_0x3d39d0]||'HTTP_'+_0x3d39d0,'message':_0xd3bde6?.[_0x1b7112(0x63f)]||_0x1b7112(0x3fa),..._0xd3bde6?.[_0x1b7112(0x26d)]!=null?{'details':_0xd3bde6[_0x1b7112(0x26d)]}:{}}};}}return{'status':0x194,'body':{'error':_0x1b7112(0x2bc)}};}[_0x16030f(0x684)](_0x35781f,_0x1f4797={}){const _0xf26acf=_0x16030f;if(typeof _0x1f4797===_0xf26acf(0x5c5)||Array[_0xf26acf(0x321)](_0x1f4797))_0x1f4797={'host':_0x1f4797};_0x1f4797=_0x1f4797??{};const _0x489e67=Number(_0x1f4797[_0xf26acf(0x7aa)])||0x0;if(_0x489e67>=0x1||_0x1f4797[_0xf26acf(0x109)]!=null||_0x1f4797[_0xf26acf(0x65b)]!=null){const _0x3edf63=new Error(_0xf26acf(0x244)+_0xf26acf(0x30c)+_0xf26acf(0x3f3)+_0xf26acf(0x4ab));_0x3edf63[_0xf26acf(0x737)]=_0xf26acf(0x393);throw _0x3edf63;}if(this[_0xf26acf(0x52f)])throw new Error(_0xf26acf(0x30d));const _0x20e95f=_0x1f4797[_0xf26acf(0x368)]==null?[undefined]:[]['concat'](_0x1f4797[_0xf26acf(0x368)]);if(!_0x20e95f['length']||_0x20e95f[_0xf26acf(0x2bd)](_0x5f4d14=>_0x5f4d14!==undefined&&(typeof _0x5f4d14!=='string'||!_0x5f4d14))){const _0x154825=new Error(_0xf26acf(0x5c7));_0x154825[_0xf26acf(0x737)]='BAD_HOST';throw _0x154825;}_0x35781f&&this['auth'][_0xf26acf(0x3ee)]==='okdb_session'&&(this['auth'][_0xf26acf(0x3ee)]=_0xf26acf(0x7b8)+_0x35781f,this['_okdb']?.[_0xf26acf(0x61d)]&&(this[_0xf26acf(0x3cc)][_0xf26acf(0x61d)][_0xf26acf(0x64f)]=this['auth'][_0xf26acf(0x3ee)]));const _0x17b76e=this[_0xf26acf(0x3cc)]?.[_0xf26acf(0x73b)]?.[_0xf26acf(0x47f)]?.[_0xf26acf(0x4c3)]??![],_0x25b1a9=async(_0x314ba8,_0x20679e)=>{const _0x184ba7=_0xf26acf,_0x1358ad=Date[_0x184ba7(0x2f4)]();if(_0x17b76e){const _0x214d4b=_0x314ba8['url']||'/',_0xccda5b=_0x314ba8[_0x184ba7(0x78b)]?.['authorization']?_0x314ba8[_0x184ba7(0x78b)][_0x184ba7(0x1f1)][_0x184ba7(0x552)](/^Bearer\s+(\S{0,8})\S*/i,_0x184ba7(0x394)):'-',_0x400c0f=_0x314ba8['headers']?.['cf-ray']||'-',_0x331683=_0x314ba8[_0x184ba7(0x78b)]?.['cf-connecting-ip']||_0x314ba8['headers']?.[_0x184ba7(0x2d9)]||'-',_0x11c847=_0x314ba8['headers']?.[_0x184ba7(0x50c)]||'-';process[_0x184ba7(0x6be)][_0x184ba7(0x598)](_0x184ba7(0x4d7)+_0x314ba8[_0x184ba7(0x13f)][_0x184ba7(0x3bd)](0x7)+'\x20'+_0x214d4b[_0x184ba7(0x3bd)](0x2d)+'\x20'+(_0x184ba7(0x3f8)+_0xccda5b+_0x184ba7(0x151)+_0x11c847+_0x184ba7(0x4a0)+_0x400c0f+_0x184ba7(0x562)+_0x331683+'\x0a'));}try{const _0x198460=new _0x2ca1fd(_0x314ba8['url'],_0x184ba7(0x307)+_0x314ba8[_0x184ba7(0x78b)]['host']),_0x47eef4=this[_0x184ba7(0x530)](_0x314ba8[_0x184ba7(0x13f)],_0x198460['pathname']),_0x9ef261=_0x47eef4?.[_0x184ba7(0x499)]?.[_0x184ba7(0x7a8)]===!![];if(_0x9ef261){const _0x5641e7=_0x314ba8[_0x184ba7(0x78b)]?.['content-length'];if(_0x5641e7!=null){const _0x70be31=Number(_0x5641e7);if(Number[_0x184ba7(0x758)](_0x70be31)&&_0x70be31>this[_0x184ba7(0x3eb)]){_0x20679e['statusCode']=0x19d,_0x20679e[_0x184ba7(0x57a)](_0x184ba7(0x14f));return;}}}const _0x3944f4=_0x9ef261?null:await _0x5fdd8d(_0x314ba8,this[_0x184ba7(0x3eb)]),_0x1a3a7c=_0x9ef261?_0x39077f(_0x314ba8,this['maxBodyBytes']):undefined,_0x43079c=await this[_0x184ba7(0x6a2)](_0x314ba8[_0x184ba7(0x13f)],_0x198460[_0x184ba7(0xbe)],{'body':_0x3944f4,'query':Object[_0x184ba7(0x4fd)](_0x198460[_0x184ba7(0x472)][_0x184ba7(0x597)]()),'headers':_0x314ba8[_0x184ba7(0x78b)]},{'req':_0x314ba8,'res':_0x20679e,'rawStream':_0x1a3a7c}),_0x2fbe48=this[_0x184ba7(0x530)](_0x314ba8[_0x184ba7(0x13f)],_0x198460[_0x184ba7(0xbe)]),_0x295c3b=Date['now']()-_0x1358ad,_0xce9d2c=this[_0x184ba7(0x389)](_0x2fbe48,_0x43079c)?this[_0x184ba7(0x6e1)](_0x43079c,_0x295c3b):_0x5d860b(_0x43079c),_0x290561=(_0xce9d2c[_0x184ba7(0x493)]||0xc8)>=0x190;this[_0x184ba7(0x1cb)][_0x184ba7(0x37c)](_0x314ba8[_0x184ba7(0x13f)],_0x295c3b,_0x290561),_0x53cbe7(_0x20679e,_0xce9d2c);if(_0x17b76e){const _0x4337b1=_0xce9d2c[_0x184ba7(0x493)]||0xc8,_0x1b648f=Date['now']()-_0x1358ad;process[_0x184ba7(0x6be)][_0x184ba7(0x598)](_0x184ba7(0x7b6)+_0x314ba8['method'][_0x184ba7(0x3bd)](0x7)+'\x20'+_0x198460['pathname'][_0x184ba7(0x3bd)](0x2d)+'\x20'+_0x4337b1+'\x20\x20'+_0x1b648f+'ms\x0a');}}catch(_0x56d1e3){const _0x417cce=Date[_0x184ba7(0x2f4)]()-_0x1358ad;this[_0x184ba7(0x1cb)][_0x184ba7(0x37c)](_0x314ba8[_0x184ba7(0x13f)],_0x417cce,!![]);const _0x26b2d3=_0x56d1e3?.[_0x184ba7(0x493)]||0x1f4;_0x20679e[_0x184ba7(0x357)]=_0x26b2d3,_0x26b2d3===0x19d?_0x20679e[_0x184ba7(0x57a)](_0x184ba7(0x14f)):_0x20679e['end'](_0x56d1e3['message']||_0x184ba7(0x3fa));}};this[_0xf26acf(0x782)]=_0x20e95f[_0xf26acf(0x341)](_0x5c2266=>{const _0x4cf5bf=_0xf26acf,_0x2b28c7=_0x492dc1[_0x4cf5bf(0x236)](_0x25b1a9);_0x2b28c7['on']('connection',_0x249995=>{const _0x5cb711=_0x4cf5bf;this[_0x5cb711(0x406)][_0x5cb711(0x32c)](_0x249995),_0x249995['on'](_0x5cb711(0x3fb),()=>this[_0x5cb711(0x406)][_0x5cb711(0x3ac)](_0x249995));});if(_0x5c2266===undefined)_0x2b28c7[_0x4cf5bf(0x684)](_0x35781f);else _0x2b28c7['listen'](_0x35781f,_0x5c2266);return _0x2b28c7;}),this[_0xf26acf(0x52f)]=this[_0xf26acf(0x782)][0x0];for(const _0x38f69c of this['servers'][_0xf26acf(0x3a9)](0x1))_0x38f69c['on'](_0xf26acf(0x131),_0x5ab844=>this[_0xf26acf(0x52f)]?.[_0xf26acf(0xb2)](_0xf26acf(0x131),_0x5ab844));const _0x1572ed=_0x58cd34(_0x35781f,_0x1f4797['host']),_0x18ebc=this[_0xf26acf(0x3cc)];return _0x18ebc?.['processes']&&(_0x18ebc[_0xf26acf(0x569)]['noteListenAddr'](_0x1572ed),require$$1$1[_0xf26acf(0x1e1)]?_0x18ebc[_0xf26acf(0x7a6)]?.({'kind':_0xf26acf(0x543)})[_0xf26acf(0x40d)](()=>{}):_0x18ebc[_0xf26acf(0x295)]?.({'kind':'standalone','listenAddr':_0x1572ed})[_0xf26acf(0x40d)](()=>{})),this[_0xf26acf(0x52f)];}async[_0x16030f(0x3fb)](_0x2ebe6c={}){const _0x1b0959=_0x16030f,_0x1dae19=this[_0x1b0959(0x52f)];this[_0x1b0959(0x52f)]=null;const _0x2ade78=this[_0x1b0959(0x782)][_0x1b0959(0x550)](_0x1dae19)?this['servers']:_0x1dae19?[_0x1dae19]:[];this['servers']=[];if(_0x1dae19&&_0x1dae19[_0x1b0959(0x6d1)]){try{await _0x1dae19[_0x1b0959(0x3fb)]();}catch{}this['metrics']&&this[_0x1b0959(0x1cb)]['close']();return;}if(_0x2ade78[_0x1b0959(0x275)]){const _0x10c944=Number[_0x1b0959(0x758)](_0x2ebe6c[_0x1b0959(0x4df)])?Math[_0x1b0959(0x114)](0x0,_0x2ebe6c['forceAfterMs']):0x3e8,_0x512fb0=_0x54c0ee=>new Promise(_0x31a403=>{const _0x1fda2a=_0x1b0959;let _0x281e3a=![],_0x1b23ed=null,_0xe9f764=null;const _0x2c8f6e=()=>{if(_0x281e3a)return;_0x281e3a=!![];if(_0x1b23ed)clearTimeout(_0x1b23ed);if(_0xe9f764)clearTimeout(_0xe9f764);_0x31a403();};try{_0x54c0ee[_0x1fda2a(0x3fb)](_0x2c8f6e);}catch{_0x2c8f6e();return;}try{_0x54c0ee[_0x1fda2a(0x28e)]?.();}catch{}_0x1b23ed=setTimeout(()=>{const _0x175ecc=_0x1fda2a;try{_0x54c0ee[_0x175ecc(0x70b)]?.();}catch{}for(const _0x181f9e of this[_0x175ecc(0x406)]){try{_0x181f9e[_0x175ecc(0x2be)]();}catch{}}_0xe9f764=setTimeout(_0x2c8f6e,0x64),_0xe9f764[_0x175ecc(0x334)]?.();},_0x10c944),_0x1b23ed['unref']?.();});await Promise[_0x1b0959(0x4db)](_0x2ade78[_0x1b0959(0x341)](_0x512fb0));}this['metrics']&&this['metrics'][_0x1b0959(0x3fb)]();}['signCookie'](_0x501c5b,_0x2ee4a7,_0x527508=0x36ee80){const _0x4a72ea=_0x16030f,_0x1ebe51=Date[_0x4a72ea(0x2f4)](),_0x449674=Buffer[_0x4a72ea(0x748)](JSON[_0x4a72ea(0x490)]({'iat':_0x1ebe51,'exp':_0x1ebe51+_0x527508,..._0x501c5b}))['toString'](_0x4a72ea(0x662)),_0x424dc9=_0x24d7da(_0x449674,_0x2ee4a7);return _0x449674+'.'+_0x424dc9;}[_0x16030f(0x312)](_0x20e599,_0x540b07={}){const _0x54b55b=_0x16030f,{httpOnly:httpOnly=!![],sameSite:sameSite=_0x54b55b(0x52d),path:path='/',secure:secure=![],maxAge:maxAge=null,expires:expires=null}=_0x540b07;let _0x3e5544=this[_0x54b55b(0x61d)][_0x54b55b(0x3ee)]+'='+_0x20e599;if(httpOnly)_0x3e5544+=_0x54b55b(0x465);if(sameSite)_0x3e5544+=_0x54b55b(0x39b)+sameSite;if(path)_0x3e5544+=_0x54b55b(0x517)+path;if(secure)_0x3e5544+=_0x54b55b(0xd1);if(Number['isFinite'](maxAge))_0x3e5544+=';\x20Max-Age='+Math['max'](0x0,Math[_0x54b55b(0x698)](maxAge));if(expires instanceof Date)_0x3e5544+=_0x54b55b(0x2bb)+expires[_0x54b55b(0x516)]();return _0x3e5544;}[_0x16030f(0x619)](_0x21585f=this[_0x16030f(0x61d)]['cookieName'],_0x5365e8={}){const _0xaa8edd=_0x16030f,{path:path='/',sameSite:sameSite=_0xaa8edd(0x52d),secure:secure=![],httpOnly:httpOnly=!![]}=_0x5365e8;let _0xcf1dd2=_0x21585f+'=';if(httpOnly)_0xcf1dd2+=_0xaa8edd(0x465);if(sameSite)_0xcf1dd2+=_0xaa8edd(0x39b)+sameSite;if(path)_0xcf1dd2+=_0xaa8edd(0x517)+path;if(secure)_0xcf1dd2+=_0xaa8edd(0xd1);return _0xcf1dd2+=';\x20Max-Age=0;\x20Expires=Thu,\x2001\x20Jan\x201970\x2000:00:00\x20GMT',_0xcf1dd2;}[_0x16030f(0x2f8)](_0x501b95,_0x52bc17){const _0x1e0fc0=_0x16030f;if(!_0x501b95)return null;const [_0x35f7ce,_0x35a4fc]=String(_0x501b95)['split']('.');if(!_0x35f7ce||!_0x35a4fc)return null;const _0x2b87df=_0x24d7da(_0x35f7ce,_0x52bc17);if(!_0x570578(_0x35a4fc,_0x2b87df))return null;try{const _0x27ae87=JSON['parse'](Buffer[_0x1e0fc0(0x748)](_0x35f7ce,_0x1e0fc0(0x662))[_0x1e0fc0(0x6fe)]());if(_0x27ae87[_0x1e0fc0(0x50a)]<=Date[_0x1e0fc0(0x2f4)]())return null;return _0x27ae87;}catch{return null;}}['parseBearer'](_0x8656a4){const _0x80d447=_0x16030f;if(this[_0x80d447(0x3cc)]?.['auth'])return this[_0x80d447(0x3cc)][_0x80d447(0x61d)][_0x80d447(0x294)](_0x8656a4);return _0x2af858(_0x8656a4);}['issueToken'](_0x40ff0d){const _0xafe4d0=_0x16030f;if(this[_0xafe4d0(0x3cc)]?.[_0xafe4d0(0x61d)])return this[_0xafe4d0(0x3cc)][_0xafe4d0(0x61d)][_0xafe4d0(0x164)](_0x40ff0d);const _0x5ee5ad=this[_0xafe4d0(0x21f)]?.['tokenTtl']??0x36ee80,_0x55ef9d=this[_0xafe4d0(0x21f)]?.[_0xafe4d0(0x401)];return _0x192d10(_0x40ff0d,_0x55ef9d,_0x5ee5ad);}[_0x16030f(0x697)](_0x914170){const _0x510ed1=_0x16030f;if(this['_okdb']?.[_0x510ed1(0x61d)])return this['_okdb'][_0x510ed1(0x61d)][_0x510ed1(0x697)](_0x914170);const _0x22f1eb=this[_0x510ed1(0x21f)]?.[_0x510ed1(0x401)];return _0x87bd2e(_0x914170,_0x22f1eb);}async[_0x16030f(0x2f0)](_0x2b7f02){const _0xad197f=_0x16030f;if(this[_0xad197f(0x3cc)]?.[_0xad197f(0x61d)])return this[_0xad197f(0x3cc)][_0xad197f(0x61d)][_0xad197f(0x2f0)](_0x2b7f02);if(_0x2b7f02[_0xad197f(0x68e)]?.[_0xad197f(0x1f2)]===!![]||this[_0xad197f(0x3bf)]===_0xad197f(0x462))return{'id':'system','username':_0xad197f(0x654),'roles':[_0xad197f(0x6a0)],'isAuthenticated':!![],'isSystem':!![],'user':{'id':'system','username':_0xad197f(0x654),'roles':[_0xad197f(0x6a0)],'isAuthenticated':!![],'isSystem':!![]}};const _0x5014e5=this[_0xad197f(0x294)](_0x2b7f02['headers']?.['authorization']),_0x50d40a=_0x2b7f02['cookies']?.[this['auth']['cookieName']],_0x216350=_0x5014e5||_0x50d40a;if(!_0x216350)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x412177=this[_0xad197f(0x697)](_0x216350);if(!_0x412177)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x4ec458={'id':_0x412177[_0xad197f(0x751)]??null,'username':_0x412177[_0xad197f(0x4cb)]??null,'roles':Array['isArray'](_0x412177[_0xad197f(0x55a)])?_0x412177[_0xad197f(0x55a)]:[],'isAuthenticated':!![],'isSystem':![]};return{'id':_0x4ec458['id'],'username':_0x4ec458[_0xad197f(0x4cb)],'roles':_0x4ec458[_0xad197f(0x55a)],'isAuthenticated':!![],'isSystem':![],'user':_0x4ec458,'claims':_0x412177,'subject':_0x4ec458['id']};}async[_0x16030f(0x642)](_0x480d91,_0x28056c={}){const _0x1eed5f=_0x16030f,_0x565bab=_0x5680cd(_0x480d91),_0x5d23bd=Array['isArray'](_0x28056c[_0x1eed5f(0x1c6)])&&_0x28056c[_0x1eed5f(0x1c6)][_0x1eed5f(0x275)]>0x0?_0x28056c[_0x1eed5f(0x1c6)]:[_0x1eed5f(0x24b),'ES256'],_0x2da42c=_0x565bab[_0x1eed5f(0x2d0)]?.[_0x1eed5f(0x68a)];if(!_0x5d23bd[_0x1eed5f(0x550)](_0x2da42c))throw new Error(_0x1eed5f(0x349)+_0x2da42c);if(!_0x565bab[_0x1eed5f(0x2d0)]?.[_0x1eed5f(0x791)])throw new Error('JWT\x20is\x20missing\x20kid');const _0x4a8ae5=await this[_0x1eed5f(0x1de)](_0x28056c);if(!_0x4a8ae5?.[_0x1eed5f(0x310)])throw new Error(_0x1eed5f(0x4b0));const _0x52c41d=await this[_0x1eed5f(0x706)](_0x4a8ae5[_0x1eed5f(0x310)],_0x565bab[_0x1eed5f(0x2d0)]['kid'],_0x28056c);if(!_0xbe50f8(_0x2da42c,_0x52c41d,_0x565bab[_0x1eed5f(0x646)],_0x565bab[_0x1eed5f(0x687)]))throw new Error(_0x1eed5f(0x248));const _0x3ad7d3=Math[_0x1eed5f(0x698)](Date[_0x1eed5f(0x2f4)]()/0x3e8),_0x383c67=_0x565bab[_0x1eed5f(0x5f3)]||{};if(_0x383c67['iss']!==_0x4a8ae5[_0x1eed5f(0x4f9)])throw new Error('JWT\x20issuer\x20mismatch');const _0x35b2a4=_0x28056c[_0x1eed5f(0x378)];if(_0x35b2a4){const _0x154266=_0x2d946b(_0x383c67[_0x1eed5f(0x28c)]);if(!_0x154266['includes'](_0x35b2a4))throw new Error(_0x1eed5f(0x27c));}if(typeof _0x383c67[_0x1eed5f(0x50a)]!==_0x1eed5f(0x783)||_0x383c67['exp']<=_0x3ad7d3)throw new Error(_0x1eed5f(0x5e1));if(_0x383c67[_0x1eed5f(0x11a)]!=null&&_0x383c67[_0x1eed5f(0x11a)]>_0x3ad7d3)throw new Error(_0x1eed5f(0x408));if(_0x383c67[_0x1eed5f(0x7bf)]==='id')throw new Error(_0x1eed5f(0x1e0));return{'subject':_0x383c67[_0x1eed5f(0x751)]??null,'email':_0x383c67['email']??null,'scopes':typeof _0x383c67[_0x1eed5f(0x218)]===_0x1eed5f(0x5c5)?_0x383c67['scope']['split'](/\s+/)[_0x1eed5f(0x78a)](Boolean):[],'claims':_0x383c67,'tokenType':_0x1eed5f(0x319)};}async['_getOidcDiscovery'](_0x37d721={}){const _0x347aa4=_0x16030f,_0x281227=String(_0x37d721[_0x347aa4(0x4f9)]||'')[_0x347aa4(0x552)](/\/+$/,'');if(!_0x281227)return null;const _0x6efcfc=Number[_0x347aa4(0x758)](_0x37d721[_0x347aa4(0x199)])?_0x37d721['discoveryTtlMs']:0xa*0x3c*0x3e8;if(this[_0x347aa4(0x4e1)]?.[_0x347aa4(0x4f9)]===_0x281227&&this[_0x347aa4(0x4e1)]['expiresAt']>Date[_0x347aa4(0x2f4)]())return this[_0x347aa4(0x4e1)][_0x347aa4(0x446)];const _0x38e65f=await _0x336084(_0x281227+'/.well-known/openid-configuration'),_0x1318de={'issuer':_0x38e65f['issuer']||_0x281227,'authorization_endpoint':_0x37d721[_0x347aa4(0x398)]||_0x38e65f['authorization_endpoint'],'token_endpoint':_0x37d721[_0x347aa4(0x5b3)]||_0x38e65f[_0x347aa4(0x5d3)],'jwks_uri':_0x37d721[_0x347aa4(0x6d6)]||_0x38e65f[_0x347aa4(0x310)]};return this[_0x347aa4(0x4e1)]={'issuer':_0x281227,'value':_0x1318de,'expiresAt':Date[_0x347aa4(0x2f4)]()+_0x6efcfc},_0x1318de;}async[_0x16030f(0x531)](_0x4dbbfc,_0x5b63d9=0x5*0x3c*0x3e8){const _0x55587c=_0x16030f,_0x30c6c4=await _0x336084(_0x4dbbfc),_0xeaad4a=new Map();for(const _0xc93568 of _0x30c6c4[_0x55587c(0x157)]||[]){if(!_0xc93568?.[_0x55587c(0x791)])continue;_0xeaad4a[_0x55587c(0x271)](_0xc93568[_0x55587c(0x791)],_0x31e558(_0xc93568));}return this[_0x55587c(0x5b9)]={'uri':_0x4dbbfc,'keys':_0xeaad4a,'expiresAt':Date[_0x55587c(0x2f4)]()+_0x5b63d9},this['_jwksCache'];}async[_0x16030f(0x706)](_0x8b4a42,_0x2a769c,_0x5a5f19={}){const _0x2e7799=_0x16030f,_0x5642da=Number[_0x2e7799(0x758)](_0x5a5f19[_0x2e7799(0x3c1)])?_0x5a5f19[_0x2e7799(0x3c1)]:0x5*0x3c*0x3e8,_0x1da6ec=0x1e*0x3e8,_0x2ca42f=this[_0x2e7799(0x5df)][_0x2e7799(0x404)](_0x2a769c);if(_0x2ca42f!==undefined&&_0x2ca42f>Date['now']())throw new Error(_0x2e7799(0x611)+_0x2a769c);(!this['_jwksCache']||this[_0x2e7799(0x5b9)][_0x2e7799(0x1fd)]!==_0x8b4a42||this[_0x2e7799(0x5b9)][_0x2e7799(0x15f)]<=Date[_0x2e7799(0x2f4)]())&&await this[_0x2e7799(0x531)](_0x8b4a42,_0x5642da);let _0x20fd46=this['_jwksCache']?.[_0x2e7799(0x157)]?.['get'](_0x2a769c);if(_0x20fd46)return _0x20fd46;await this[_0x2e7799(0x531)](_0x8b4a42,_0x5642da),_0x20fd46=this[_0x2e7799(0x5b9)]?.[_0x2e7799(0x157)]?.[_0x2e7799(0x404)](_0x2a769c);if(!_0x20fd46){this['_jwksNegativeCache'][_0x2e7799(0x271)](_0x2a769c,Date[_0x2e7799(0x2f4)]()+_0x1da6ec);throw new Error(_0x2e7799(0x611)+_0x2a769c);}return _0x20fd46;}['_normalizeOAuthAuthResult'](_0x56c399){const _0x52e335=_0x16030f;if(this[_0x52e335(0x3cc)]?.['auth'])return this[_0x52e335(0x3cc)]['auth'][_0x52e335(0x557)](_0x56c399);const _0x486f4b=_0x56c399?.[_0x52e335(0x78c)]||{},_0x3e6727={'sub':_0x56c399?.['subject']??_0x486f4b['sub']??null,'email':_0x56c399?.['email']??_0x486f4b[_0x52e335(0x701)]??null,'name':_0x56c399?.[_0x52e335(0x570)]??_0x486f4b['name']??_0x486f4b[_0x52e335(0x456)]??null,'groups':_0x56c399?.[_0x52e335(0x489)]??_0x486f4b[_0x52e335(0x489)]??[],'roles':_0x56c399?.['roles']??_0x486f4b[_0x52e335(0x55a)]??[]};return{'type':_0x52e335(0x250),'tokenType':_0x56c399?.[_0x52e335(0xba)]??'access','subject':_0x3e6727[_0x52e335(0x751)],'email':_0x3e6727[_0x52e335(0x701)],'scopes':_0x56c399?.[_0x52e335(0x55d)]??_0x486f4b[_0x52e335(0x218)]?.[_0x52e335(0x27b)]?.('\x20')?.[_0x52e335(0x78a)](Boolean)??[],'claims':_0x486f4b,'user':_0x3e6727,'isAuthenticated':!![]};}['createLoginState'](_0x2deaae={},_0x13e781=0x927c0){const _0x464e62=_0x16030f;if(this['_okdb']?.['auth'])return this[_0x464e62(0x3cc)]['auth'][_0x464e62(0x57d)](_0x2deaae,_0x13e781);const _0x2ef40c=_0x44d4f2(0x18);this[_0x464e62(0x502)][_0x464e62(0x271)](_0x2ef40c,{..._0x2deaae,'exp':Date['now']()+_0x13e781});if(this[_0x464e62(0x502)][_0x464e62(0x187)]%0x32===0x0){const _0x67c41c=Date['now']();for(const [_0x34978a,_0x5c8866]of this['_loginStates']){if(_0x5c8866[_0x464e62(0x50a)]<=_0x67c41c)this['_loginStates']['delete'](_0x34978a);}}return _0x2ef40c;}['consumeLoginState'](_0x4b22cf){const _0x4a750f=_0x16030f;if(this[_0x4a750f(0x3cc)]?.[_0x4a750f(0x61d)])return this['_okdb']['auth']['consumeLoginState'](_0x4b22cf);if(!_0x4b22cf)return null;const _0x5c7e55=this[_0x4a750f(0x502)][_0x4a750f(0x404)](_0x4b22cf);this[_0x4a750f(0x502)][_0x4a750f(0x3ac)](_0x4b22cf);if(!_0x5c7e55)return null;if(_0x5c7e55[_0x4a750f(0x50a)]<=Date[_0x4a750f(0x2f4)]())return null;return _0x5c7e55;}}function _0x5d860b(_0x377200){const _0x18761e=_0x16030f;if(_0x377200==null)return{'status':0xcc};if(Buffer[_0x18761e(0x744)](_0x377200)||_0x10946f(_0x377200))return{'status':0xc8,'body':_0x377200};if(typeof _0x377200===_0x18761e(0x759)&&_0x18761e(0x493)in _0x377200){if(!(_0x18761e(0x612)in _0x377200)&&!_0x10946f(_0x377200[_0x18761e(0x612)])){const {status:_0x31ca24,headers:_0x56d42d,..._0x1644d9}=_0x377200;if(Object[_0x18761e(0x157)](_0x1644d9)['length']>0x0)return{'status':_0x31ca24,'headers':_0x56d42d,'body':_0x1644d9};}return _0x377200;}return{'status':0xc8,'body':_0x377200};}function _0x10946f(_0x4fe9a3){const _0x2537f8=_0x16030f;return _0x4fe9a3&&typeof _0x4fe9a3[_0x2537f8(0x362)]==='function';}function _0x39077f(_0x5ca234,_0x40090d){const _0x4eeb43=_0x16030f,{PassThrough:_0x157064}=require$$5;let _0x54806a=0x0,_0x40361b=![];const _0x56c7f4=new _0x157064();return _0x5ca234['on'](_0x4eeb43(0x343),_0x1b01d8=>{const _0x51f1f9=_0x4eeb43;if(_0x40361b)return;_0x54806a+=_0x1b01d8[_0x51f1f9(0x275)];if(_0x54806a>_0x40090d){_0x40361b=!![];const _0x5ccd34=new Error(_0x51f1f9(0x14f));_0x5ccd34[_0x51f1f9(0x493)]=0x19d,_0x56c7f4['destroy'](_0x5ccd34);return;}if(!_0x56c7f4[_0x51f1f9(0x17a)])_0x56c7f4['push'](_0x1b01d8);}),_0x5ca234['on'](_0x4eeb43(0x57a),()=>{const _0x121fe3=_0x4eeb43;!_0x40361b&&!_0x56c7f4[_0x121fe3(0x17a)]&&(_0x40361b=!![],_0x56c7f4[_0x121fe3(0x57a)]());}),_0x5ca234['on'](_0x4eeb43(0x131),_0x711d4c=>{const _0x2ec8f7=_0x4eeb43;if(!_0x56c7f4['destroyed'])_0x56c7f4[_0x2ec8f7(0x2be)](_0x711d4c);}),_0x5ca234[_0x4eeb43(0x6df)](),_0x56c7f4['on'](_0x4eeb43(0x42d),()=>{const _0x1c260f=_0x4eeb43;if(!_0x56c7f4[_0x1c260f(0x17a)])_0x5ca234[_0x1c260f(0x42d)]();}),_0x56c7f4;}function _0x5fdd8d(_0x38c926,_0x10318c){const _0x4cb33f=_0x16030f;if(_0x38c926[_0x4cb33f(0x13f)]===_0x4cb33f(0x518)||_0x38c926[_0x4cb33f(0x13f)]===_0x4cb33f(0x703))return null;const _0x441ea1=_0x38c926[_0x4cb33f(0x78b)]?.[_0x4cb33f(0x431)];if(_0x441ea1!=null){const _0xcc6192=Number(_0x441ea1);if(Number[_0x4cb33f(0x758)](_0xcc6192)&&_0xcc6192>_0x10318c){const _0x3133c8=new Error('Payload\x20too\x20large');_0x3133c8[_0x4cb33f(0x493)]=0x19d;throw _0x3133c8;}}return new Promise((_0x4373fd,_0x2bfc0d)=>{const _0x244880=_0x4cb33f;let _0x38459a='',_0x547fff=0x0;_0x38c926['on']('data',_0x34dde8=>{const _0x2f25f0=_0x51c5;_0x547fff+=_0x34dde8[_0x2f25f0(0x275)];if(_0x547fff>_0x10318c){try{_0x38c926[_0x2f25f0(0x2be)]();}catch{}const _0x1f518c=new Error(_0x2f25f0(0x14f));_0x1f518c[_0x2f25f0(0x493)]=0x19d,_0x2bfc0d(_0x1f518c);return;}_0x38459a+=_0x34dde8;}),_0x38c926['on'](_0x244880(0x57a),()=>{const _0x3d5e7f=_0x244880;if(!_0x38459a)return _0x4373fd(null);const _0x5da032=_0x38c926[_0x3d5e7f(0x78b)]?.[_0x3d5e7f(0x339)]||'';if(_0x5da032[_0x3d5e7f(0x550)]('application/x-www-form-urlencoded')){const _0x9d7d33={};for(const [_0x2d87fc,_0x136829]of new URLSearchParams(_0x38459a))_0x9d7d33[_0x2d87fc]=_0x136829;return _0x4373fd(_0x9d7d33);}try{_0x4373fd(JSON[_0x3d5e7f(0x325)](_0x38459a));}catch(_0x1346ae){_0x2bfc0d(_0x1346ae);}}),_0x38c926['on'](_0x244880(0x131),_0x2bfc0d);});}function _0x53cbe7(_0x5f49b6,_0x44d5b5){const _0x396a42=_0x16030f,{status:status=0xc8,headers:headers={},body:_0x43b0c2}=_0x44d5b5;_0x5f49b6[_0x396a42(0x357)]=status;for(const [_0x27853b,_0x1066b2]of Object['entries'](headers)){_0x5f49b6[_0x396a42(0x63d)](_0x27853b,_0x1066b2);}if(_0x43b0c2==null){_0x5f49b6[_0x396a42(0x57a)]();return;}if(_0x10946f(_0x43b0c2)){_0x43b0c2['pipe'](_0x5f49b6);return;}if(Buffer[_0x396a42(0x744)](_0x43b0c2)){_0x5f49b6['end'](_0x43b0c2);return;}if(typeof _0x43b0c2===_0x396a42(0x759)){!_0x5f49b6['getHeader'](_0x396a42(0x1dc))&&_0x5f49b6[_0x396a42(0x63d)](_0x396a42(0x1dc),_0x396a42(0x5e0));_0x5f49b6['end'](JSON[_0x396a42(0x490)](_0x43b0c2));return;}_0x5f49b6['end'](String(_0x43b0c2));}function _0x58cd34(_0x4ff46a,_0x50b56c){const _0x1fe13e=_0x16030f;if(_0x50b56c==null)return':'+_0x4ff46a;return[][_0x1fe13e(0x298)](_0x50b56c)[_0x1fe13e(0x341)](_0x515dca=>(_0x515dca['includes'](':')?'['+_0x515dca+']':_0x515dca)+':'+_0x4ff46a)['join'](',\x20');}return okdbHttp['exports']=_0xd5daa6,okdbHttp[_0x16030f(0x2fb)][_0x16030f(0x19c)]=_0x58cd34,okdbHttp[_0x16030f(0x2fb)][_0x16030f(0x4e2)]=_0x25f941,okdbHttp[_0x16030f(0x2fb)];}var okdbShmSegment,hasRequiredOkdbShmSegment;function requireOkdbShmSegment(){const _0x341106=_0x29bffd;if(hasRequiredOkdbShmSegment)return okdbShmSegment;hasRequiredOkdbShmSegment=0x1;const _0x399a98=require$$0$1,_0xcd71ff=require$$2$1,_0x119837=0x80,_0x4ceaba=0x0,_0x2f0376=0x1,_0x4b9c32=0x2,_0x286f7e=0x3,_0xe7ca=0x4,_0x41fcbd=_0xe7ca+_0x119837,_0x4b861e=_0x41fcbd+_0x119837,_0x43aa45=require$$2$3[_0x341106(0x34f)],_0xd4c329=_0x4b861e*0x4,_0x3d16d8=process[_0x341106(0x42c)]!=='win32',_0x345eb3=0xc,_0x436f6a=process['platform']===_0x341106(0x352)?0x1f:0xa0,_0x3d99c0=/^[A-Za-z0-9-]+(?:_boot)?$/,_0x2f05f3=/^[A-Za-z0-9-]*-[0-9a-f]{12}(?:_boot)?$/,_0x3de873=_0x1e5447=>_0x1e5447['replace'](/[^a-zA-Z0-9]/g,'-');function _0x1169d6(_0x35449c,_0x5a13d5=''){const _0x5c1104=_0x341106;if(typeof _0x35449c!=='string'||_0x35449c==='')throw new TypeError('segmentNameFor:\x20canonicalPath\x20must\x20be\x20a\x20non-empty\x20string');if(_0x5a13d5!==''&&!/^_[A-Za-z0-9]+$/[_0x5c1104(0x30a)](_0x5a13d5))throw new TypeError(_0x5c1104(0x514)+JSON[_0x5c1104(0x490)](_0x5a13d5)+')');const _0x26e305=_0xcd71ff['createHash'](_0x5c1104(0x3c0))['update'](_0x35449c)[_0x5c1104(0x4e6)](_0x5c1104(0x6db))[_0x5c1104(0x3a9)](0x0,_0x345eb3),_0x56ff37=Math[_0x5c1104(0x114)](0x0,_0x436f6a-0x1-_0x345eb3-_0x5a13d5['length']);return _0x3de873(_0x35449c)['slice'](0x0,_0x56ff37)+'-'+_0x26e305+_0x5a13d5;}function _0x35972b(_0xde0a6e,_0x5caf90=''){return''+_0x3de873(_0xde0a6e)+_0x5caf90;}function _0x21bea4(_0x1fb71e){const _0x401d44=_0x341106;if(_0x2f05f3['test'](_0x1fb71e))return _0x401d44(0x76b);if(_0x3d99c0[_0x401d44(0x30a)](_0x1fb71e))return _0x401d44(0x76e);return null;}const _0x5f3380={'onMapped':null,'onClaimed':null,'onRetiring':null},_0x5ad29e=_0x57d4a9=>Math[_0x341106(0x2e4)](_0x57d4a9/0x8)*0x8,_0x49bc16=_0x4c824d=>_0x5ad29e(_0x4c824d)+_0xd4c329;function _0x4eeada(_0x4184cf){const _0x38efe8=_0x341106;try{return process[_0x38efe8(0x56a)](_0x4184cf,0x0),![];}catch(_0x53961c){return _0x53961c['code']===_0x38efe8(0x6ae);}}const _0x3c79e8=new Int32Array(new SharedArrayBuffer(0x4));function _0x161a3f(_0x2c57ba){const _0x8f73e8=_0x341106;if(_0x2c57ba>0x0)Atomics[_0x8f73e8(0xd7)](_0x3c79e8,0x0,0x0,_0x2c57ba);}function _0x73981b(_0x2d25a9,_0x4b2495){const _0x417c33=_0x341106;if(process[_0x417c33(0x42c)]!==_0x417c33(0x183))return;let _0x460326;try{_0x460326=_0x399a98[_0x417c33(0x212)](_0x417c33(0xd8)+_0x2d25a9,'r+');if(_0x399a98['fstatSync'](_0x460326)[_0x417c33(0x187)]<_0x4b2495)_0x399a98[_0x417c33(0x3e7)](_0x460326,_0x4b2495);}catch{}finally{if(_0x460326!==undefined)try{_0x399a98[_0x417c33(0x1f7)](_0x460326);}catch{}}}function _0xd5795d(_0x572b7c,_0x4e428a){const _0x34e96e=_0x341106,_0x655f18=require$$3$1;for(let _0x39e7be=0x0;;_0x39e7be++){try{return _0x655f18[_0x34e96e(0x462)](_0x572b7c,_0x4e428a);}catch(_0x6ba64c){if(_0x39e7be>=0x3e8||!/No such file or directory/[_0x34e96e(0x30a)](_0x6ba64c?.[_0x34e96e(0x63f)]??''))throw _0x6ba64c;}}}function _0x4302aa(_0x59cc21,_0x58341b){const _0x45ec82=_0x341106,_0x3067c7=_0x49bc16(_0x58341b),_0xadc053=_0xd5795d(_0x59cc21,_0x3067c7);_0x73981b(_0x59cc21,_0x3067c7);if(_0xadc053[_0x45ec82(0x7a0)]<_0x3067c7)throw new Error(_0x45ec82(0x539)+_0x59cc21+':\x20mapped\x20'+_0xadc053['byteLength']+_0x45ec82(0x7a9)+_0x3067c7+'\x20bytes');return{'sab':_0xadc053,'hdr':new Int32Array(_0xadc053,_0x5ad29e(_0x58341b),_0x4b861e)};}function _0x594580(_0x392d42){const _0x3c7a76=_0x341106;try{require(_0x3c7a76(0x2a9))[_0x3c7a76(0x3fb)](_0x392d42);}catch{}}function _0x515675(_0x4d4fa6){const _0x5a7bbf=_0x341106;try{require('shmbuf')[_0x5a7bbf(0x344)](_0x4d4fa6);}catch{}}function _0x675db9(_0x21ebbf){const _0x3356bd=_0x341106;if(Atomics[_0x3356bd(0x240)](_0x21ebbf,_0x4b9c32)!==0x0&&Atomics[_0x3356bd(0x240)](_0x21ebbf,_0x286f7e)!==0x0)return;const _0x5a52d8=_0xcd71ff['randomBytes'](0x8),_0x3a62b8=_0x5a52d8[_0x3356bd(0x381)](0x0)||0x1,_0x41c076=_0x5a52d8['readInt32LE'](0x4)||0x1;Atomics[_0x3356bd(0xcd)](_0x21ebbf,_0x4b9c32,0x0,_0x3a62b8),Atomics['compareExchange'](_0x21ebbf,_0x286f7e,0x0,_0x41c076);}function _0x5d8608(_0x4805ea){const _0x269c5c=_0x341106,_0x14ee07=process[_0x269c5c(0x3ca)];for(let _0x4e4847=0x0;_0x4e4847<_0x119837;_0x4e4847++){const _0x39cf30=Atomics[_0x269c5c(0x240)](_0x4805ea,_0xe7ca+_0x4e4847);if(_0x39cf30===0x0||_0x39cf30===_0x14ee07)continue;if(!_0x4eeada(_0x39cf30))continue;Atomics[_0x269c5c(0x177)](_0x4805ea,_0x41fcbd+_0x4e4847,0x0),Atomics[_0x269c5c(0xcd)](_0x4805ea,_0xe7ca+_0x4e4847,_0x39cf30,0x0);}}function _0x51092b(_0x8f77fc){const _0x1185a6=_0x341106;if(Atomics[_0x1185a6(0x240)](_0x8f77fc,_0x2f0376)!==0x0)return!![];for(let _0x3cad78=0x0;_0x3cad78<_0x119837;_0x3cad78++)if(Atomics[_0x1185a6(0x240)](_0x8f77fc,_0xe7ca+_0x3cad78)!==0x0)return!![];return![];}function _0xcd2e5a(_0xdafc91){const _0x606fc7=_0x341106,_0x40b239=process[_0x606fc7(0x3ca)];for(let _0x4ffa2d=0x0;_0x4ffa2d<0x2;_0x4ffa2d++){for(let _0x4becaf=0x0;_0x4becaf<_0x119837;_0x4becaf++){if(Atomics[_0x606fc7(0xcd)](_0xdafc91,_0xe7ca+_0x4becaf,0x0,_0x40b239)===0x0)return Atomics[_0x606fc7(0x177)](_0xdafc91,_0x41fcbd+_0x4becaf,_0x43aa45),_0x4becaf;}_0x5d8608(_0xdafc91);}return Atomics[_0x606fc7(0x32c)](_0xdafc91,_0x2f0376,0x1),-0x1;}function _0x36f36e(_0x55d6a1,_0x559f90){const _0x445a8f=_0x341106;if(_0x559f90>=0x0)Atomics[_0x445a8f(0x177)](_0x55d6a1,_0x41fcbd+_0x559f90,0x0),Atomics['compareExchange'](_0x55d6a1,_0xe7ca+_0x559f90,process['pid'],0x0);else Atomics[_0x445a8f(0x751)](_0x55d6a1,_0x2f0376,0x1);}function _0x4ab235(_0x118026,_0x56d952,_0x3abf30,_0x2ee334){const _0x9e5aba=_0x341106,_0x555026=process['pid'];if(Atomics[_0x9e5aba(0xcd)](_0x3abf30,_0x4ceaba,_0x2ee334,_0x555026)!==_0x2ee334)return _0x9e5aba(0x6bb);const _0x571cf0=Atomics[_0x9e5aba(0x240)](_0x3abf30,_0x4b9c32),_0x412fdd=Atomics[_0x9e5aba(0x240)](_0x3abf30,_0x286f7e);let _0x41fd1d;try{_0x41fd1d=_0x4302aa(_0x118026,_0x56d952)[_0x9e5aba(0x104)];}catch{return _0x9e5aba(0x3ce);}if(Atomics['load'](_0x41fd1d,_0x4b9c32)!==_0x571cf0||Atomics[_0x9e5aba(0x240)](_0x41fd1d,_0x286f7e)!==_0x412fdd)return'orphan';_0x5d8608(_0x3abf30);if(_0x51092b(_0x3abf30))return Atomics['compareExchange'](_0x3abf30,_0x4ceaba,_0x555026,0x0),_0x9e5aba(0x2e5);return _0x515675(_0x118026),_0x9e5aba(0x692);}function _0x8966ca(_0x1e0d21,_0x39a582,{timeoutMs:_0x571d62}={}){const _0x690137=_0x341106;_0x571d62=_0x571d62??(Number(process.env.OKDB_SHM_ATTACH_TIMEOUT_MS)||0x7530);const _0x1dc294=process[_0x690137(0x3ca)],_0x5e3d76=Date[_0x690137(0x2f4)]()+_0x571d62;for(let _0x6854de=0x0;;_0x6854de++){const {sab:_0x99c7e9,hdr:_0x49a2dc}=_0x4302aa(_0x1e0d21,_0x39a582);_0x5f3380[_0x690137(0x55f)]?.(_0x1e0d21,_0x6854de),_0x675db9(_0x49a2dc);const _0x2c00ec=_0xcd2e5a(_0x49a2dc);_0x5f3380[_0x690137(0x6f5)]?.(_0x1e0d21,_0x6854de);const _0x38f5f5=Atomics[_0x690137(0x240)](_0x49a2dc,_0x4ceaba);if(_0x38f5f5===0x0||!_0x3d16d8){if(_0x6854de===0x0)_0x5d8608(_0x49a2dc);return{'sab':_0x99c7e9,'hdr':_0x49a2dc,'slot':_0x2c00ec};}_0x36f36e(_0x49a2dc,_0x2c00ec);if(_0x38f5f5!==_0x1dc294&&_0x4eeada(_0x38f5f5))_0x4ab235(_0x1e0d21,_0x39a582,_0x49a2dc,_0x38f5f5);_0x594580(_0x1e0d21);if(Date[_0x690137(0x2f4)]()>_0x5e3d76){const {OKDBError:_0x49b63f}=requireOkdbError();throw new _0x49b63f(_0x690137(0x329)+_0x1e0d21+_0x690137(0x1f8)+_0x571d62+_0x690137(0x211)+_0x38f5f5+_0x690137(0x79f)+_0x690137(0x671),_0x690137(0x392));}_0x161a3f(_0x6854de<0x14?0x0:0x1);}}function _0x483b5c(_0x5877aa,_0x1c8c7c,_0x1e9917,_0x366669){const _0x18128e=_0x341106,{hdr:_0x2cb664,slot:_0x3b324c}=_0x1e9917;if(_0x3b324c!==null)_0x36f36e(_0x2cb664,_0x3b324c);let _0x1d4574=![];try{if(!_0x3d16d8)return![];const _0x19d3ec=process[_0x18128e(0x3ca)];_0x5d8608(_0x2cb664);if(_0x51092b(_0x2cb664)||_0x366669?.(_0x1e9917[_0x18128e(0x5a3)]))return![];if(Atomics[_0x18128e(0xcd)](_0x2cb664,_0x4ceaba,0x0,_0x19d3ec)!==0x0)return![];let _0xa37ad6=!![];try{_0x5f3380[_0x18128e(0x631)]?.(_0x5877aa),!_0x51092b(_0x2cb664)&&!_0x366669?.(_0x1e9917[_0x18128e(0x5a3)])&&(_0xa37ad6=![],_0x515675(_0x5877aa),_0x1d4574=!![]);}finally{if(_0xa37ad6)Atomics[_0x18128e(0xcd)](_0x2cb664,_0x4ceaba,_0x19d3ec,0x0);}return _0x1d4574;}finally{_0x594580(_0x5877aa);}}function _0x439960(_0x512153,_0x39a9ba,{isBusy:_0x537324}={}){const _0x3e7f89=_0x341106,_0x517639=process['pid'],{sab:_0x3521c8,hdr:_0x173f0e}=_0x4302aa(_0x512153,_0x39a9ba);try{_0x5d8608(_0x173f0e);const _0x439286=Atomics[_0x3e7f89(0x240)](_0x173f0e,_0x4ceaba);if(_0x439286!==0x0){if(_0x439286===_0x517639||!_0x4eeada(_0x439286))return'retiring';return _0x4ab235(_0x512153,_0x39a9ba,_0x173f0e,_0x439286);}if(_0x51092b(_0x173f0e))return'attached';if(_0x537324?.(_0x3521c8))return _0x3e7f89(0x513);if(Atomics[_0x3e7f89(0xcd)](_0x173f0e,_0x4ceaba,0x0,_0x517639)!==0x0)return _0x3e7f89(0x19a);if(_0x51092b(_0x173f0e)||_0x537324?.(_0x3521c8))return Atomics[_0x3e7f89(0xcd)](_0x173f0e,_0x4ceaba,_0x517639,0x0),_0x3e7f89(0x3dd);return _0x515675(_0x512153),_0x3e7f89(0x692);}finally{_0x594580(_0x512153);}}const _0x3f28ff=new Map(),_0x5d0351=new Set();function _0x52e310(_0x49ba64){const _0x4bb98=_0x341106,_0x2fdb9e=process[_0x4bb98(0x3ca)];for(let _0x41c938=0x0;_0x41c938<_0x119837;_0x41c938++){if(Atomics[_0x4bb98(0x240)](_0x49ba64,_0xe7ca+_0x41c938)===_0x2fdb9e&&Atomics['load'](_0x49ba64,_0x41fcbd+_0x41c938)!==_0x43aa45)return!![];}return![];}function _0x27a5f2(_0xcc5df5,_0x3e6561,_0x2664d0={}){const _0x181237=_0x341106;let _0x138832=_0x3f28ff[_0x181237(0x404)](_0xcc5df5);if(!_0x138832){const _0x2e5db9=_0x8966ca(_0xcc5df5,_0x3e6561,_0x2664d0);_0x138832={'att':_0x2e5db9,'dataBytes':_0x3e6561,'refs':0x0,'isBusy':_0x2664d0[_0x181237(0x5e2)]??null,'onThreadExit':_0x2664d0[_0x181237(0x5fa)]??null},_0x3f28ff[_0x181237(0x271)](_0xcc5df5,_0x138832);}if(_0x2664d0['isBusy'])_0x138832['isBusy']=_0x2664d0[_0x181237(0x5e2)];if(_0x2664d0[_0x181237(0x5fa)])_0x138832[_0x181237(0x5fa)]=_0x2664d0[_0x181237(0x5fa)];_0x138832['refs']++;let _0x5c4863=![];return{'sab':_0x138832[_0x181237(0x28a)][_0x181237(0x5a3)],'name':_0xcc5df5,'release'(){const _0x2a1279=_0x181237;if(_0x5c4863)return![];_0x5c4863=!![];if(--_0x138832[_0x2a1279(0x6d5)]>0x0)return![];if(_0x3f28ff[_0x2a1279(0x404)](_0xcc5df5)===_0x138832)_0x3f28ff[_0x2a1279(0x3ac)](_0xcc5df5);const _0x227502=_0x483b5c(_0xcc5df5,_0x138832[_0x2a1279(0x202)],_0x138832['att'],_0x138832[_0x2a1279(0x5e2)]);!_0x227502&&_0x3d16d8&&_0x52e310(_0x138832[_0x2a1279(0x28a)][_0x2a1279(0x104)])&&_0x5d0351[_0x2a1279(0x32c)]({'name':_0xcc5df5,'dataBytes':_0x138832['dataBytes'],'att':{..._0x138832[_0x2a1279(0x28a)],'slot':null},'isBusy':_0x138832[_0x2a1279(0x5e2)],'onThreadExit':_0x138832[_0x2a1279(0x5fa)]});if(_0x5d0351[_0x2a1279(0x187)])_0x51ff3c();return _0x227502;}};}function _0x32c8d5(_0xcfaae8){const _0x46e293=_0x341106;if(!(_0xcfaae8>0x0))return 0x0;const _0x4b3f24=process[_0x46e293(0x3ca)];let _0xdbb285=0x0;const _0x5b0843=({att:_0x23808a,onThreadExit:_0x52e956})=>{const _0x4da730=_0x46e293;try{_0x52e956?.(_0x23808a[_0x4da730(0x5a3)],_0xcfaae8);}catch{}const {hdr:_0x3b921c}=_0x23808a;for(let _0x291838=0x0;_0x291838<_0x119837;_0x291838++){if(Atomics[_0x4da730(0x240)](_0x3b921c,_0xe7ca+_0x291838)!==_0x4b3f24||Atomics[_0x4da730(0x240)](_0x3b921c,_0x41fcbd+_0x291838)!==_0xcfaae8)continue;Atomics['store'](_0x3b921c,_0x41fcbd+_0x291838,0x0);if(Atomics[_0x4da730(0xcd)](_0x3b921c,_0xe7ca+_0x291838,_0x4b3f24,0x0)===_0x4b3f24)_0xdbb285++;}};for(const _0x4c9fc4 of _0x3f28ff[_0x46e293(0x337)]())_0x5b0843(_0x4c9fc4);for(const _0x1db59f of _0x5d0351)_0x5b0843(_0x1db59f);return _0x51ff3c(),_0xdbb285;}function _0x51ff3c(){const _0x3aa41d=_0x341106;for(const _0x1ceea1 of[..._0x5d0351]){if(_0x52e310(_0x1ceea1[_0x3aa41d(0x28a)][_0x3aa41d(0x104)]))continue;_0x5d0351[_0x3aa41d(0x3ac)](_0x1ceea1),_0x483b5c(_0x1ceea1[_0x3aa41d(0x570)],_0x1ceea1[_0x3aa41d(0x202)],_0x1ceea1[_0x3aa41d(0x28a)],_0x1ceea1['isBusy']);}}return okdbShmSegment={'attachSegment':_0x27a5f2,'releaseThreadSlots':_0x32c8d5,'segmentNameFor':_0x1169d6,'legacySegmentNameFor':_0x35972b,'segmentNameStyle':_0x21bea4,'SEG_NAME_MAX':_0x436f6a,'retireIfUnused':_0x439960,'totalBytes':_0x49bc16,'headerOffset':_0x5ad29e,'MAX_SLOTS':_0x119837,'_attachRaw':_0x8966ca,'_detachRaw':_0x483b5c,'_takeover':_0x4ab235,'_mapByName':_0x4302aa,'_hooks':_0x5f3380,'_registry':_0x3f28ff,'_lingering':_0x5d0351,'_H':{'STATE':_0x4ceaba,'OVERFLOW':_0x2f0376,'NONCE_A':_0x4b9c32,'NONCE_B':_0x286f7e,'SLOTS':_0xe7ca,'TIDS':_0x41fcbd}},okdbShmSegment;}var okdbShmGc,hasRequiredOkdbShmGc;function requireOkdbShmGc(){const _0x2ab69b=_0x29bffd;if(hasRequiredOkdbShmGc)return okdbShmGc;hasRequiredOkdbShmGc=0x1;const _0x22e814=require$$0$1,_0x5d3cad=require$$1,_0xfb0328=_0x2ab69b(0x792),_0x57b3e3=0x18+0x3*0x100*0x4,_0x4ff276=0x18+0x2*0x100*0x4,_0x23edd0=0xc;function _0x11cd29(){const {totalBytes:_0x51c9eb}=requireOkdbShmSegment();return new Set([0x0,0x8,0x18,_0x4ff276,_0x23edd0,_0x51c9eb(_0x4ff276),_0x51c9eb(_0x57b3e3),_0x51c9eb(_0x23edd0)]);}function _0x4a945a(_0x58a062,_0x1cf0a1,_0x14da2f){const _0x58e296=_0x2ab69b,{totalBytes:_0x127811}=requireOkdbShmSegment();if(_0x58a062[_0x58e296(0x59f)](_0x58e296(0x5f0))||_0x1cf0a1===_0x23edd0||_0x1cf0a1===_0x127811(_0x23edd0))return _0x23edd0;if(_0x1cf0a1===_0x127811(_0x57b3e3))return _0x57b3e3;if(_0x1cf0a1===_0x127811(_0x4ff276))return _0x4ff276;return _0x14da2f===_0x58e296(0x76b)?_0x57b3e3:_0x4ff276;}function _0x378d1b(){const _0x401197=_0x2ab69b,_0x355bb0=new Set(),_0x4d031c=[],_0x5e5954=_0xfb0328+'/';let _0x1dc169;try{_0x1dc169=_0x22e814[_0x401197(0x732)]('/proc')[_0x401197(0x78a)](_0x3e829b=>/^\d+$/['test'](_0x3e829b));}catch{throw new Error(_0x401197(0x4ad));}for(const _0x439f6a of _0x1dc169){const _0x2a669b=_0x5d3cad[_0x401197(0x4d3)](_0x401197(0x15e),_0x439f6a);let _0x3807dc=!![];try{const _0x1a197c=_0x22e814[_0x401197(0x1f5)](_0x5d3cad['join'](_0x2a669b,_0x401197(0x608)),_0x401197(0x253));let _0x2e65ee=_0x1a197c[_0x401197(0x373)](_0x5e5954);while(_0x2e65ee!==-0x1){const _0x36ea34=_0x1a197c[_0x401197(0x373)]('\x0a',_0x2e65ee),_0x3ce5d0=_0x1a197c[_0x401197(0x3a9)](_0x2e65ee+_0x5e5954[_0x401197(0x275)],_0x36ea34===-0x1?undefined:_0x36ea34);if(!_0x3ce5d0[_0x401197(0x59f)](_0x401197(0x7b2)))_0x355bb0[_0x401197(0x32c)](_0x3ce5d0);_0x2e65ee=_0x1a197c['indexOf'](_0x5e5954,_0x2e65ee+0x1);}}catch(_0x398cc5){if(_0x398cc5['code']!==_0x401197(0x596)&&_0x398cc5[_0x401197(0x737)]!=='ESRCH')_0x3807dc=![];}try{for(const _0xb7411d of _0x22e814['readdirSync'](_0x5d3cad[_0x401197(0x4d3)](_0x2a669b,'fd'))){let _0x556543;try{_0x556543=_0x22e814[_0x401197(0x7ae)](_0x5d3cad[_0x401197(0x4d3)](_0x2a669b,'fd',_0xb7411d));}catch{continue;}if(_0x556543['startsWith'](_0x5e5954)&&!_0x556543['endsWith'](_0x401197(0x7b2)))_0x355bb0['add'](_0x556543[_0x401197(0x3a9)](_0x5e5954[_0x401197(0x275)]));}}catch(_0x382f67){if(_0x382f67[_0x401197(0x737)]!=='ENOENT'&&_0x382f67[_0x401197(0x737)]!==_0x401197(0x6ae))_0x3807dc=![];}if(!_0x3807dc){let _0x2af617=null;try{_0x2af617=_0x22e814[_0x401197(0x722)](_0x2a669b)['uid'];}catch{}let _0x3d6047='?';try{_0x3d6047=_0x22e814[_0x401197(0x1f5)](_0x5d3cad[_0x401197(0x4d3)](_0x2a669b,_0x401197(0x359)),_0x401197(0x253))[_0x401197(0x1c1)]();}catch{}if(_0x2af617!==null)_0x4d031c[_0x401197(0x1c7)]({'pid':Number(_0x439f6a),'uid':_0x2af617,'comm':_0x3d6047});}}return{'inUse':_0x355bb0,'unreadable':_0x4d031c};}function _0x1a24cb({prefix:prefix=_0x2ab69b(0x6b7),dryRun:dryRun=![],anySize:anySize=![],force:force=![],log:log=()=>{}}={}){const _0x1a12dd=_0x2ab69b;if(process[_0x1a12dd(0x42c)]!==_0x1a12dd(0x183)||!_0x22e814['existsSync'](_0xfb0328))throw new Error(_0x1a12dd(0xf0));const _0x2908f2=process[_0x1a12dd(0x532)](),_0x4689a5=_0x2908f2===0x0,_0x4e1edf=_0x11cd29(),{inUse:_0xb04983,unreadable:_0x1e8f32}=_0x378d1b(),_0x4e81d6=_0x1e8f32[_0x1a12dd(0x78a)](_0x433ee8=>_0x4689a5||_0x433ee8[_0x1a12dd(0x66d)]===_0x2908f2),_0x55f1b4={'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':_0x1e8f32['length'],'blindPids':_0x4e81d6[_0x1a12dd(0x341)](_0x1554c7=>_0x1554c7['pid']),'blindCommands':_0x44e872(_0x4e81d6)};if(_0x4e81d6[_0x1a12dd(0x275)]&&!dryRun&&!force)throw new Error('shm-gc:\x20cannot\x20read\x20the\x20memory\x20maps\x20of\x20'+_0x4e81d6[_0x1a12dd(0x275)]+_0x1a12dd(0x3fe)+(_0x1a12dd(0x217)+_0x55f1b4[_0x1a12dd(0x49b)]+_0x1a12dd(0x773))+_0x1a12dd(0x3ad));const {retireIfUnused:_0x39f824,segmentNameStyle:_0x5e7557,_registry:_0x351cee}=requireOkdbShmSegment();let _0x14f127=null;if(!dryRun)try{require('v8')['setFlagsFromString'](_0x1a12dd(0x67b)),_0x14f127=require('vm')[_0x1a12dd(0x3f2)]('gc');}catch{}const _0x1d82e8=_0x22e814[_0x1a12dd(0x1cd)](_0xfb0328);try{let _0x328a04,_0x518027=0x0;while(_0x328a04=_0x1d82e8['readSync']()){_0x55f1b4[_0x1a12dd(0x17b)]++;const _0x21284a=_0x328a04['name'];if(!_0x21284a[_0x1a12dd(0x74f)](prefix))continue;_0x55f1b4['matched']++;if(_0x351cee['has'](_0x21284a)){_0x55f1b4[_0x1a12dd(0x522)]++;continue;}if(_0xb04983[_0x1a12dd(0x7b1)](_0x21284a)){_0x55f1b4[_0x1a12dd(0x522)]++;continue;}let _0x3c8013;try{_0x3c8013=_0x22e814[_0x1a12dd(0x21d)](_0x5d3cad[_0x1a12dd(0x4d3)](_0xfb0328,_0x21284a));}catch{continue;}if(!_0x3c8013[_0x1a12dd(0x242)]())continue;const _0xc61cb5=_0x5e7557(_0x21284a);if(!_0xc61cb5||!anySize&&!_0x4e1edf[_0x1a12dd(0x7b1)](_0x3c8013[_0x1a12dd(0x187)])){_0x55f1b4['notOkdbShaped']++;continue;}if(!_0x4689a5&&_0x3c8013['uid']!==_0x2908f2){_0x55f1b4['foreignOwner']++;continue;}_0x55f1b4[_0x1a12dd(0x382)]++;if(_0xc61cb5==='legacy')_0x55f1b4['candidatesLegacyNamed']++;_0x55f1b4[_0x1a12dd(0xf4)]+=_0x3c8013[_0x1a12dd(0x187)],_0x55f1b4[_0x1a12dd(0x38f)]+=_0x3c8013[_0x1a12dd(0x75c)]*0x200;if(dryRun)continue;const _0x20015f=_0x4a945a(_0x21284a,_0x3c8013[_0x1a12dd(0x187)],_0xc61cb5);try{const _0x495d7e=_0x39f824(_0x21284a,_0x20015f);_0x495d7e===_0x1a12dd(0x692)?(_0x55f1b4[_0x1a12dd(0x31f)]++,_0x55f1b4[_0x1a12dd(0x583)]+=_0x3c8013[_0x1a12dd(0x75c)]*0x200):(_0x55f1b4['skippedByProtocol']++,log('skip\x20'+_0x21284a+':\x20'+_0x495d7e));}catch(_0x2c912d){_0x55f1b4['errors']++,log(_0x1a12dd(0x528)+_0x21284a+':\x20'+_0x2c912d[_0x1a12dd(0x63f)]);}_0x14f127&&++_0x518027>=0x200&&(_0x518027=0x0,_0x14f127());}}finally{_0x1d82e8[_0x1a12dd(0x1f7)]();}return _0x55f1b4;}function _0x44e872(_0x300c2a){const _0x49d6d5=_0x2ab69b,_0x4c3759=new Map();for(const _0x1fcdcf of _0x300c2a)_0x4c3759[_0x49d6d5(0x271)](_0x1fcdcf[_0x49d6d5(0x359)],(_0x4c3759[_0x49d6d5(0x404)](_0x1fcdcf['comm'])??0x0)+0x1);return[..._0x4c3759][_0x49d6d5(0x341)](([_0x58061f,_0x1647ac])=>_0x1647ac>0x1?_0x58061f+'×'+_0x1647ac:_0x58061f)[_0x49d6d5(0x4d3)](',\x20');}function _0x41cc75(_0x3e3172){const _0x4922bd=_0x2ab69b,_0x301ba5=['B',_0x4922bd(0x265),_0x4922bd(0x1ac),_0x4922bd(0x42b),'TiB'];let _0x1f742d=0x0;while(_0x3e3172>=0x400&&_0x1f742d<_0x301ba5[_0x4922bd(0x275)]-0x1){_0x3e3172/=0x400,_0x1f742d++;}return _0x3e3172[_0x4922bd(0x70d)](_0x1f742d?0x1:0x0)+'\x20'+_0x301ba5[_0x1f742d];}function _0x7a0ceb(_0x4af984){const _0x504771=_0x2ab69b,_0x74276d=[_0x504771(0x15a)+(_0x4af984[_0x504771(0x5ac)]?_0x504771(0x798):'')+_0x504771(0x348)+JSON[_0x504771(0x490)](_0x4af984[_0x504771(0x708)]),_0x504771(0x4d9)+_0x4af984['scanned']+'\x20entries\x20in\x20'+_0xfb0328,'\x20\x20matching\x20prefix\x20\x20\x20\x20'+_0x4af984[_0x504771(0x23d)],'\x20\x20in\x20use\x20(mapped/fd)\x20'+_0x4af984[_0x504771(0x522)],'\x20\x20not\x20okdb-shaped\x20\x20\x20\x20'+_0x4af984[_0x504771(0x640)],_0x504771(0x49a)+_0x4af984['foreignOwner'],_0x504771(0x6e7)+_0x4af984['candidates']+'\x20—\x20'+_0x41cc75(_0x4af984[_0x504771(0xf4)])+_0x504771(0x58a)+_0x41cc75(_0x4af984[_0x504771(0x38f)])+_0x504771(0x44a)+(_0x4af984[_0x504771(0x6aa)]?'\x20('+_0x4af984[_0x504771(0x6aa)]+_0x504771(0x560):'')];if(!_0x4af984['dryRun']){_0x74276d[_0x504771(0x1c7)]('\x20\x20deleted\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x4af984[_0x504771(0x31f)]+_0x504771(0x639)+_0x41cc75(_0x4af984[_0x504771(0x583)])+_0x504771(0x2a4));if(_0x4af984[_0x504771(0x7cf)])_0x74276d[_0x504771(0x1c7)](_0x504771(0x546)+_0x4af984[_0x504771(0x7cf)]);if(_0x4af984['errors'])_0x74276d[_0x504771(0x1c7)](_0x504771(0x2da)+_0x4af984[_0x504771(0x25a)]);}return _0x4af984[_0x504771(0x26f)]&&_0x74276d['push'](_0x504771(0x138)+_0x4af984[_0x504771(0x26f)]+'\x20process(es)\x20had\x20unreadable\x20maps'+(_0x4af984[_0x504771(0x74b)]['length']?'\x20—\x20'+_0x4af984['blindPids'][_0x504771(0x275)]+'\x20of\x20them\x20run\x20as\x20this\x20user\x20and\x20could\x20map\x20these\x20segments:\x20'+(_0x4af984[_0x504771(0x49b)]+_0x504771(0xfa)):_0x504771(0x503))),_0x74276d[_0x504771(0x4d3)]('\x0a');}function _0x49a9c3(_0x30d5d6){const _0x5d1d87=_0x2ab69b,_0x30528c={'prefix':_0x5d1d87(0x6b7),'dryRun':![],'anySize':![],'force':![],'verbose':![]};for(let _0x390cfb=0x0;_0x390cfb<_0x30d5d6[_0x5d1d87(0x275)];_0x390cfb++){const _0x2e5275=_0x30d5d6[_0x390cfb];if(_0x2e5275==='--dry-run'||_0x2e5275==='-n')_0x30528c[_0x5d1d87(0x5ac)]=!![];else{if(_0x2e5275===_0x5d1d87(0x6b5))_0x30528c[_0x5d1d87(0x19b)]=!![];else{if(_0x2e5275==='--force')_0x30528c[_0x5d1d87(0x100)]=!![];else{if(_0x2e5275===_0x5d1d87(0x238)||_0x2e5275==='-v')_0x30528c[_0x5d1d87(0x228)]=!![];else{if(_0x2e5275===_0x5d1d87(0x2c4))_0x30528c[_0x5d1d87(0x708)]=_0x30d5d6[++_0x390cfb]??'';else{if(_0x2e5275[_0x5d1d87(0x74f)](_0x5d1d87(0x609)))_0x30528c[_0x5d1d87(0x708)]=_0x2e5275[_0x5d1d87(0x3a9)]('--prefix='['length']);else{if(_0x2e5275===_0x5d1d87(0x743)||_0x2e5275==='-h')_0x30528c[_0x5d1d87(0x26a)]=!![];else throw new Error(_0x5d1d87(0x772)+_0x2e5275);}}}}}}}return _0x30528c;}const _0x16b96e=_0x2ab69b(0x568);function _0x24086c(_0x2ac924){const _0x2512ff=_0x2ab69b;let _0x366e85;try{_0x366e85=_0x49a9c3(_0x2ac924);}catch(_0x305c91){return console[_0x2512ff(0x131)](_0x305c91[_0x2512ff(0x63f)]),console[_0x2512ff(0x131)](_0x16b96e),0x2;}if(_0x366e85[_0x2512ff(0x26a)])return console['log'](_0x16b96e),0x0;const _0x118030=_0x1a24cb({..._0x366e85,'log':_0x366e85['verbose']?_0x4b1dd8=>console[_0x2512ff(0x2fd)](_0x4b1dd8):undefined});return console[_0x2512ff(0x2fd)](_0x7a0ceb(_0x118030)),_0x118030[_0x2512ff(0x25a)]?0x1:0x0;}return okdbShmGc={'shmGc':_0x1a24cb,'formatReport':_0x7a0ceb,'main':_0x24086c,'scanInUse':_0x378d1b,'ENV_DATA_BYTES':_0x57b3e3,'LEGACY_ENV_DATA_BYTES':_0x4ff276,'BOOT_DATA_BYTES':_0x23edd0},okdbShmGc;}var hasRequiredOkdb;function requireOkdb(){const _0x37648b=_0x29bffd;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x37648b(0x60f)]();}catch{}const _0x343fd7=require$$1,_0x3b4cf6=require$$0$1,{resolveWorkers:_0x31963e,isShmbufNative:_0x2063c2}=requireOkdbWorkers();function _0x4051da(_0x23a351){const _0x43ecfd=_0x37648b,_0x5e99ab=_0x23a351[_0x43ecfd(0x3a9)](0x2),_0xa4045={};let _0x31b230=0x0;while(_0x31b230<_0x5e99ab['length']){const _0x397e9c=_0x5e99ab[_0x31b230];if(_0x397e9c===_0x43ecfd(0x15b)||_0x397e9c==='-p')_0xa4045[_0x43ecfd(0x2f5)]=Number(_0x5e99ab[++_0x31b230]);else{if(_0x397e9c==='--path'||_0x397e9c==='-d')_0xa4045['path']=_0x5e99ab[++_0x31b230];else{if(_0x397e9c==='--key'||_0x397e9c==='-k')_0xa4045[_0x43ecfd(0x1d9)]=_0x5e99ab[++_0x31b230];else{if(_0x397e9c===_0x43ecfd(0xfb)||_0x397e9c==='-c')_0xa4045[_0x43ecfd(0x4f0)]=_0x5e99ab[++_0x31b230];else{if(_0x397e9c===_0x43ecfd(0x1f3))_0xa4045[_0x43ecfd(0x367)]=_0x5e99ab[++_0x31b230];else{if(_0x397e9c==='--no-repl')_0xa4045[_0x43ecfd(0x6b0)]=!![];else{if(_0x397e9c===_0x43ecfd(0x14e))_0xa4045[_0x43ecfd(0x3da)]=!![];else{if(_0x397e9c===_0x43ecfd(0x764))_0xa4045[_0x43ecfd(0x7aa)]=_0x5e99ab[++_0x31b230];else{if(_0x397e9c===_0x43ecfd(0x5f1))_0xa4045[_0x43ecfd(0x6dc)]=!![];else{if(_0x397e9c===_0x43ecfd(0x2ad)||_0x397e9c==='-e')_0xa4045['env']=_0x5e99ab[++_0x31b230];else{if(_0x397e9c===_0x43ecfd(0x2a5))_0xa4045[_0x43ecfd(0x107)]=_0x5e99ab[++_0x31b230];else{if(_0x397e9c===_0x43ecfd(0x1fa))_0xa4045[_0x43ecfd(0x48e)]=!![];else{if(_0x397e9c===_0x43ecfd(0x3e0))_0xa4045['blobs']=!![];else{if(_0x397e9c===_0x43ecfd(0x2d5))_0xa4045[_0x43ecfd(0x7ac)]=!![];else{if(_0x397e9c===_0x43ecfd(0x6a7))_0xa4045['drop']=!![];else{if(_0x397e9c===_0x43ecfd(0x137)){const _0x11dca9=[];while(_0x31b230+0x1<_0x5e99ab[_0x43ecfd(0x275)]&&!_0x5e99ab[_0x31b230+0x1]['startsWith']('--')){_0x11dca9[_0x43ecfd(0x1c7)](_0x5e99ab[++_0x31b230]);}_0xa4045['open']=_0x11dca9[_0x43ecfd(0x275)]>0x0?_0x11dca9:!![];}else{if(_0x397e9c===_0x43ecfd(0x661))_0xa4045[_0x43ecfd(0x4c3)]=!![];else{if(_0x397e9c===_0x43ecfd(0x618))_0xa4045[_0x43ecfd(0x570)]=_0x5e99ab[++_0x31b230];else{if(_0x397e9c===_0x43ecfd(0x2cd))_0xa4045[_0x43ecfd(0x65f)]=_0x5e99ab[++_0x31b230];else{if(_0x397e9c===_0x43ecfd(0x729))_0xa4045[_0x43ecfd(0x780)]=_0x5e99ab[++_0x31b230];else{if(_0x397e9c===_0x43ecfd(0x4d4))_0xa4045[_0x43ecfd(0x338)]=_0x5e99ab[++_0x31b230];else{if(_0x397e9c==='--grants')_0xa4045['grants']=_0x5e99ab[++_0x31b230];else{if(_0x397e9c==='--ttl')_0xa4045['ttl']=_0x5e99ab[++_0x31b230];else{if(_0x397e9c==='--token')_0xa4045[_0x43ecfd(0x6b2)]=_0x5e99ab[++_0x31b230];else{if(_0x397e9c===_0x43ecfd(0x71d)||_0x397e9c==='-u')_0xa4045[_0x43ecfd(0x4cb)]=_0x5e99ab[++_0x31b230];else{if(_0x397e9c===_0x43ecfd(0x264))_0xa4045[_0x43ecfd(0x7a1)]=_0x5e99ab[++_0x31b230];else{if(_0x397e9c===_0x43ecfd(0x566)||_0x397e9c==='-v'){const _0x1f6901=require$$3;console['log'](_0x1f6901[_0x43ecfd(0x7be)]),process[_0x43ecfd(0x282)](0x0);}else(_0x397e9c==='--help'||_0x397e9c==='-h')&&(_0x12fc84(),process[_0x43ecfd(0x282)](0x0));}}}}}}}}}}}}}}}}}}}}}}}}}}_0x31b230++;}return _0xa4045;}function _0x12fc84(){const _0x577207=_0x37648b;console[_0x577207(0x2fd)](_0x577207(0x11f));}const _0x56ff71=new Set([_0x37648b(0x47f),'info',_0x37648b(0x27f),'error']);function _0x103a6b(_0x4727b0){const _0x365acd=_0x37648b,_0x5b849d=_0x4727b0['config']?_0x343fd7[_0x365acd(0x3c9)](_0x4727b0[_0x365acd(0x4f0)]):_0x343fd7[_0x365acd(0x3c9)](_0x365acd(0x2c8));let _0xde35b4={};if(_0x3b4cf6[_0x365acd(0x12c)](_0x5b849d))try{const _0x23681e=_0x3b4cf6[_0x365acd(0x1f5)](_0x5b849d,_0x365acd(0x253))[_0x365acd(0x552)](/^\uFEFF/,'');_0xde35b4=JSON['parse'](_0x23681e),console[_0x365acd(0x2fd)](_0x365acd(0x225)+_0x5b849d);}catch(_0xd1d37f){console['error']('[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20'+_0x5b849d+':\x20'+_0xd1d37f[_0x365acd(0x63f)]),process['exit'](0x1);}const _0x400aff={'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},_0xc2c70f={'port':_0x4727b0[_0x365acd(0x2f5)]??_0xde35b4['port']??_0x400aff[_0x365acd(0x2f5)]??0x2124,'dbPath':_0x4727b0[_0x365acd(0x272)]??_0xde35b4[_0x365acd(0x272)]??_0x400aff['path']??'./okdb-data','key':_0x4727b0[_0x365acd(0x1d9)]??_0xde35b4['key']??_0x400aff[_0x365acd(0x1d9)]??undefined,'logLevel':_0x4727b0['logLevel']??_0xde35b4['logLevel']??_0x400aff[_0x365acd(0x367)]??_0x365acd(0x695),'noRepl':_0x4727b0[_0x365acd(0x6b0)]??_0xde35b4[_0x365acd(0x6b0)]??_0x400aff[_0x365acd(0x6b0)]??![],'noAdmin':_0x4727b0['noAdmin']??_0xde35b4['noAdmin']??_0x400aff[_0x365acd(0x3da)]??![],'admin':_0xde35b4[_0x365acd(0x6a0)]??{},'api':_0xde35b4[_0x365acd(0x383)]??undefined,'auth':_0xde35b4['auth']??undefined,'mcp':_0xde35b4[_0x365acd(0x6e0)]??undefined,'http':_0xde35b4[_0x365acd(0x5b1)]??undefined,'backup':_0xde35b4['backup']??undefined,'timeMachine':_0xde35b4[_0x365acd(0x3a4)]!==![]?_0xde35b4[_0x365acd(0x3a4)]??{}:![],'processors':_0xde35b4[_0x365acd(0x326)],'engines':_0xde35b4[_0x365acd(0x1c5)],'compaction':_0xde35b4[_0x365acd(0x5c3)]};if(_0x4727b0[_0x365acd(0x6dc)])_0xc2c70f['noCluster']=!![];if(_0x4727b0[_0x365acd(0x7aa)]!==undefined)_0xc2c70f[_0x365acd(0x1d8)]=_0x4727b0[_0x365acd(0x7aa)];_0x4727b0[_0x365acd(0x462)]!==undefined&&(_0xc2c70f[_0x365acd(0x61d)]=_0xc2c70f[_0x365acd(0x61d)]||{},_0xc2c70f[_0x365acd(0x61d)][_0x365acd(0x462)]=_0x4727b0[_0x365acd(0x462)]);_0x4727b0['logRequests']&&(_0xc2c70f[_0x365acd(0x47f)]=_0xc2c70f[_0x365acd(0x47f)]||{},_0xc2c70f[_0x365acd(0x47f)][_0x365acd(0x4c3)]=!![]);(!Number[_0x365acd(0x730)](_0xc2c70f[_0x365acd(0x2f5)])||_0xc2c70f[_0x365acd(0x2f5)]<0x1||_0xc2c70f[_0x365acd(0x2f5)]>0xffff)&&(console[_0x365acd(0x131)]('[okdb]\x20invalid\x20port:\x20'+_0xc2c70f[_0x365acd(0x2f5)]+'\x20(must\x20be\x201–65535)'),process['exit'](0x1));!_0x56ff71[_0x365acd(0x7b1)](_0xc2c70f[_0x365acd(0x367)])&&(console[_0x365acd(0x131)]('[okdb]\x20invalid\x20log\x20level:\x20\x22'+_0xc2c70f[_0x365acd(0x367)]+_0x365acd(0x508)),process[_0x365acd(0x282)](0x1));const _0xad883e=_0xc2c70f[_0x365acd(0x5b1)]?.[_0x365acd(0x368)];_0xad883e!==undefined&&!(typeof _0xad883e===_0x365acd(0x5c5)&&_0xad883e)&&!(Array['isArray'](_0xad883e)&&_0xad883e[_0x365acd(0x275)]&&_0xad883e[_0x365acd(0x4b7)](_0x208275=>typeof _0x208275==='string'&&_0x208275))&&(console[_0x365acd(0x131)](_0x365acd(0x5d6)+JSON[_0x365acd(0x490)](_0xad883e)+_0x365acd(0x427)),process['exit'](0x1));for(const _0x3185a7 of _0x1d5d1a){_0xc2c70f[_0x3185a7]!==undefined&&typeof _0xc2c70f[_0x3185a7]!==_0x365acd(0x2e9)&&(console[_0x365acd(0x131)](_0x365acd(0x558)+_0x3185a7+_0x365acd(0x213)+JSON[_0x365acd(0x490)](_0xc2c70f[_0x3185a7])+_0x365acd(0x535)),process[_0x365acd(0x282)](0x1));}return _0xc2c70f;}const _0x1d5d1a=[_0x37648b(0x326),_0x37648b(0x1c5),'compaction'];function _0x1f7ae8(_0x8a3a1c){const _0x94c5e2=_0x37648b;return!!(_0x8a3a1c&&typeof _0x8a3a1c===_0x94c5e2(0x759)&&!Array[_0x94c5e2(0x321)](_0x8a3a1c)&&Object[_0x94c5e2(0x157)](_0x8a3a1c)[_0x94c5e2(0x275)]>0x0);}function _0x4f3ef3(_0x3bcb84){const _0x2b3af2=_0x37648b;return{..._0x3bcb84[_0x2b3af2(0x1d9)]?{'encryptionKey':_0x3bcb84[_0x2b3af2(0x1d9)]}:{},'engines':![],'processors':![],'compaction':![]};}const _0x3b8321=!process[_0x37648b(0x6be)]['isTTY']||!!process.env.NO_COLOR;function _0x322c19(_0x358f12,_0x2849d5){const _0x27ce91=_0x37648b;return _0x3b8321?_0x2849d5:'\x1b['+_0x358f12+'m'+_0x2849d5+_0x27ce91(0x3c4);}function _0x507100(_0x5758d6){const _0x357732=_0x37648b;if(!_0x5758d6||_0x5758d6[_0x357732(0x275)]===0x0)return;const _0x1e3675='─'['repeat'](0x38);process['stderr'][_0x357732(0x598)]('\x0a'),process[_0x357732(0x602)][_0x357732(0x598)](_0x322c19('33','\x20\x20⚠\x20\x20'+_0x5758d6[_0x357732(0x275)]+_0x357732(0x5d4)+(_0x5758d6[_0x357732(0x275)]>0x1?'S':'')+'\x0a')),process[_0x357732(0x602)][_0x357732(0x598)]('\x20\x20'+_0x1e3675+'\x0a');for(const _0x473228 of _0x5758d6){const _0x183fe5=_0x473228['level']===_0x357732(0x131)?_0x322c19('31',_0x357732(0x35d)):_0x322c19('33',_0x357732(0x59c));process[_0x357732(0x602)][_0x357732(0x598)](_0x183fe5+'\x20\x20'+_0x322c19('1',_0x473228[_0x357732(0xca)])+'\x0a'),process[_0x357732(0x602)][_0x357732(0x598)](_0x357732(0x158)+_0x473228[_0x357732(0x63f)]+'\x0a');if(_0x473228[_0x357732(0x658)])process['stderr'][_0x357732(0x598)]('\x20\x20\x20\x20\x20\x20\x20'+_0x322c19('2',_0x357732(0x5e9)+_0x473228[_0x357732(0x658)])+'\x0a');process['stderr'][_0x357732(0x598)]('\x0a');}process[_0x357732(0x602)][_0x357732(0x598)]('\x20\x20'+_0x1e3675+'\x0a\x0a');}function _0x4799b8(_0x2200b9,_0x3ca6ac,_0x59779f={}){const _0x41c39e=_0x37648b,_0x8c41ee=_0x2200b9[_0x41c39e(0x5b1)][_0x41c39e(0x684)](_0x3ca6ac,_0x59779f);if(_0x8c41ee&&_0x8c41ee['_isClusterController'])return Promise[_0x41c39e(0x3c9)](_0x8c41ee);const _0x203deb=_0x2200b9[_0x41c39e(0x5b1)][_0x41c39e(0x782)]?.[_0x41c39e(0x275)]?_0x2200b9[_0x41c39e(0x5b1)][_0x41c39e(0x782)]:[_0x8c41ee];return new Promise((_0x45a124,_0x36c69b)=>{const _0x110317=_0x41c39e;_0x8c41ee['once'](_0x110317(0x131),_0x36c69b),Promise[_0x110317(0x4db)](_0x203deb[_0x110317(0x341)](_0x72da76=>_0x72da76[_0x110317(0x60c)]?null:new Promise(_0x28666d=>_0x72da76[_0x110317(0x17e)](_0x110317(0x60c),_0x28666d))))['then'](()=>_0x45a124(_0x8c41ee));});}function _0x8c067b(_0x522233){const _0x5cdba5=_0x37648b;return _0x522233['http']?.[_0x5cdba5(0x368)]!==undefined?{'host':_0x522233[_0x5cdba5(0x5b1)][_0x5cdba5(0x368)]}:{};}async function _0x25d027(_0xec201c){const _0x10aeb0=_0x37648b,_0x289e83=require$$4$1;console[_0x10aeb0(0x2fd)](_0x10aeb0(0x56f));let _0x74f03f=!![];const _0xcffc74=(_0x477dc7,_0x345b08)=>{const _0x3eba88=_0x10aeb0;console[_0x3eba88(0x2fd)]('\x20\x20'+(_0x477dc7?'✓':'✗')+'\x20'+_0x345b08);if(!_0x477dc7)_0x74f03f=![];},_0x4948d7=Number(process[_0x10aeb0(0x7be)][_0x10aeb0(0x552)]('v','')['split']('.')[0x0]);_0xcffc74(_0x4948d7>=0x12,_0x10aeb0(0x3a0)+process[_0x10aeb0(0x7be)]+(_0x4948d7<0x12?'\x20\x20(need\x20≥\x2018)':''));const _0x4dd50f=_0x343fd7[_0x10aeb0(0x3c9)](_0xec201c[_0x10aeb0(0x297)]);try{_0x3b4cf6[_0x10aeb0(0x296)](_0x4dd50f,{'recursive':!![]});const _0x35b40b=_0x343fd7[_0x10aeb0(0x4d3)](_0x4dd50f,'.okdb-write-test');_0x3b4cf6[_0x10aeb0(0x789)](_0x35b40b,''),_0x3b4cf6[_0x10aeb0(0x633)](_0x35b40b),_0xcffc74(!![],_0x10aeb0(0x67f)+_0x4dd50f);}catch(_0x200010){_0xcffc74(![],_0x10aeb0(0x73f)+_0x4dd50f+_0x10aeb0(0x685)+_0x200010[_0x10aeb0(0x63f)]+')');}const _0x1041e4=await new Promise(_0x59cf51=>{const _0x1d6a63=_0x10aeb0,_0x845e47=_0x289e83[_0x1d6a63(0x236)]();_0x845e47['once'](_0x1d6a63(0x131),()=>_0x59cf51(![])),_0x845e47[_0x1d6a63(0x17e)]('listening',()=>{const _0x323699=_0x1d6a63;_0x845e47[_0x323699(0x3fb)](),_0x59cf51(!![]);}),_0x845e47[_0x1d6a63(0x684)](_0xec201c[_0x1d6a63(0x2f5)],_0x1d6a63(0xf2));});_0xcffc74(_0x1041e4,_0x10aeb0(0x51b)+_0xec201c[_0x10aeb0(0x2f5)]+'\x20'+(_0x1041e4?_0x10aeb0(0x423):'already\x20in\x20use'));const _0x5b46b9=_0x343fd7[_0x10aeb0(0x3c9)](_0x10aeb0(0x2c8));if(_0x3b4cf6['existsSync'](_0x5b46b9))try{JSON[_0x10aeb0(0x325)](_0x3b4cf6[_0x10aeb0(0x1f5)](_0x5b46b9,_0x10aeb0(0x253))[_0x10aeb0(0x552)](/^\uFEFF/,'')),_0xcffc74(!![],_0x10aeb0(0x18c)+_0x5b46b9);}catch(_0x198c1c){_0xcffc74(![],_0x10aeb0(0xb8)+_0x198c1c['message']);}else _0xcffc74(!![],_0x10aeb0(0x13e));if(_0x2063c2()){const _0x4b808a=_0x31963e(_0xec201c,{'shmbufNative':!![]});_0xcffc74(!![],_0x10aeb0(0x4e5)+_0x4b808a+_0x10aeb0(0x13c)+(_0x4b808a===0x1?'':'s')+')');}else _0xcffc74(!![],'cluster:\x20unavailable\x20(shmbuf\x20native\x20missing)\x20—\x20running\x20single-process');if(!_0x1041e4)try{const _0x42d77d=require('../okdb'),_0x119376=new _0x42d77d(_0x4dd50f,{'engines':![],'processors':![],'compaction':![],'auth':{'open':!![]}});await _0x119376[_0x10aeb0(0x462)]();try{await _0x119376[_0x10aeb0(0x569)][_0x10aeb0(0x462)]({'reader':!![]});const _0x1b88cf=_0x119376['processes'][_0x10aeb0(0x1b2)](),_0x84da16=_0x1b88cf[_0x10aeb0(0x78a)](_0x836839=>_0x836839['supervisorKey']!=null)[_0x10aeb0(0x275)];_0xcffc74(!![],_0x10aeb0(0x34c)+_0x1b88cf[_0x10aeb0(0x275)]+'\x20process'+(_0x1b88cf[_0x10aeb0(0x275)]===0x1?'':'es')+'\x20('+_0x84da16+'\x20supervised)');}finally{await _0x119376[_0x10aeb0(0x3fb)]();}}catch{}console[_0x10aeb0(0x2fd)](''),_0x74f03f?console['log'](_0x10aeb0(0x7c2)):(console[_0x10aeb0(0x2fd)](_0x10aeb0(0x630)),process['exit'](0x1));}async function _0x3faa22(){const _0x386b9f=_0x37648b,_0x40e943=_0x343fd7[_0x386b9f(0x3c9)](_0x386b9f(0x2c8));!_0x3b4cf6[_0x386b9f(0x12c)](_0x40e943)?(_0x3b4cf6[_0x386b9f(0x789)](_0x40e943,JSON[_0x386b9f(0x490)]({'port':0x2124,'path':_0x386b9f(0x1b4),'logLevel':_0x386b9f(0x695),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x386b9f(0x2fd)](_0x386b9f(0x7a4))):console[_0x386b9f(0x2fd)](_0x386b9f(0x293));const _0x277e1d=_0x343fd7[_0x386b9f(0x3c9)]('./okdb-data');!_0x3b4cf6[_0x386b9f(0x12c)](_0x277e1d)?(_0x3b4cf6[_0x386b9f(0x296)](_0x277e1d,{'recursive':!![]}),console[_0x386b9f(0x2fd)]('[okdb]\x20created\x20./okdb-data')):console[_0x386b9f(0x2fd)](_0x386b9f(0x601)),console[_0x386b9f(0x2fd)](_0x386b9f(0x33c));}async function _0x563e47(_0x4346d4){const _0x504679=_0x37648b,_0x24f666=_0x343fd7[_0x504679(0x3c9)](_0x4346d4[_0x504679(0x297)]);if(!_0x3b4cf6[_0x504679(0x12c)](_0x24f666)){console[_0x504679(0x2fd)](_0x504679(0x292)+_0x24f666+_0x504679(0x1a6));return;}const _0x47484a=require$$0$3,_0x27dc53=_0x47484a['createInterface']({'input':process[_0x504679(0x180)],'output':process[_0x504679(0x6be)]}),_0x52ae4b=await new Promise(_0x10907d=>_0x27dc53['question'](_0x504679(0x260)+_0x24f666+_0x504679(0x340),_0x10907d));_0x27dc53['close'](),console[_0x504679(0x2fd)]('');if(_0x52ae4b[_0x504679(0x1c1)]()[_0x504679(0x46c)]()!=='yes'){console[_0x504679(0x2fd)](_0x504679(0x76c));return;}let _0x2101ec=null;try{_0x2101ec=await _0x500938(_0x24f666,_0x4346d4,async _0x5cbcec=>{const _0x1b3bdd=_0x504679,_0x2e9cd1=_0x5cbcec['_systemEnv'],_0x523eb4=_0x2e9cd1?.['db']?.[_0x1b3bdd(0x404)](_0x1b3bdd(0x73a))??null,_0x1aebb3=[];if(_0x2e9cd1?.[_0x1b3bdd(0x6c1)](_0x1b3bdd(0x750)))for(const {key:_0x5735e9,value:_0x13b893}of _0x2e9cd1[_0x1b3bdd(0x507)]('~licenses')){_0x1aebb3[_0x1b3bdd(0x1c7)]({'key':_0x5735e9,'value':_0x13b893});}return{'identity':_0x523eb4,'licenses':_0x1aebb3};});}catch(_0x17104e){console[_0x504679(0x2fd)](_0x504679(0x128)+_0x17104e[_0x504679(0x63f)]+_0x504679(0x72d));}_0x3b4cf6[_0x504679(0x55c)](_0x24f666,{'recursive':!![],'force':!![]}),console[_0x504679(0x2fd)](_0x504679(0x553)+_0x24f666+_0x504679(0x369));if(_0x2101ec&&(_0x2101ec[_0x504679(0x145)]||_0x2101ec['licenses'][_0x504679(0x275)]>0x0))try{await _0x500938(_0x24f666,_0x4346d4,async _0x293796=>{const _0x22e386=_0x504679,_0x9c92dc=_0x293796[_0x22e386(0x66b)];_0x2101ec['identity']&&_0x9c92dc['db'][_0x22e386(0x59e)](_0x22e386(0x73a),_0x2101ec[_0x22e386(0x145)]);if(_0x2101ec['licenses'][_0x22e386(0x275)]>0x0){if(!_0x9c92dc[_0x22e386(0x6c1)](_0x22e386(0x750)))await _0x9c92dc[_0x22e386(0x18a)](_0x22e386(0x750));for(const {key:_0x191b6b,value:_0x2b52fa}of _0x2101ec[_0x22e386(0x643)]){await _0x9c92dc[_0x22e386(0x27d)](_0x22e386(0x750),_0x191b6b,_0x2b52fa);}}});const _0x48771d=[];if(_0x2101ec[_0x504679(0x145)])_0x48771d[_0x504679(0x1c7)](_0x504679(0x37a));if(_0x2101ec[_0x504679(0x643)][_0x504679(0x275)]>0x0)_0x48771d[_0x504679(0x1c7)](_0x2101ec[_0x504679(0x643)][_0x504679(0x275)]+_0x504679(0x632));console['log'](_0x504679(0x3a5)+_0x48771d['join'](_0x504679(0x5e4)));}catch(_0x52e8fb){console[_0x504679(0x2fd)](_0x504679(0x1ea)+_0x52e8fb[_0x504679(0x63f)]);}}async function _0x500938(_0x1ae442,_0xd0a8b1,_0x1bb1aa){const _0x404420=_0x37648b,_0x4df5a3=require$$5$1,_0x52f6ff=new _0x4df5a3(_0x1ae442,{'admin':![],'mcp':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],..._0x4f3ef3(_0xd0a8b1)});await _0x52f6ff['open']();try{return await _0x1bb1aa(_0x52f6ff);}finally{await _0x52f6ff[_0x404420(0x3fb)]();}}async function _0x40e319(_0xc741fe,_0x314cf4){const _0x1fc4d0=_0x37648b,_0x27f0ee=require$$5$1,_0x2b6f1a=_0x343fd7[_0x1fc4d0(0x3c9)](_0x314cf4['dbPath']);console[_0x1fc4d0(0x2fd)](_0x1fc4d0(0x2de)+_0x2b6f1a+'…');const _0x3fc034=new _0x27f0ee(_0x2b6f1a,_0x4f3ef3(_0x314cf4));await _0x3fc034['open'](),console[_0x1fc4d0(0x2fd)](_0x1fc4d0(0x6bf)+_0xc741fe+'…');const {envs:_0x46f9e0,blobs:_0x25d9b0,skipped:_0x566eac}=await _0x3fc034[_0x1fc4d0(0x44e)]['backup'](_0xc741fe);for(const _0x539504 of _0x46f9e0){const _0x5c82cf=_0x539504['sizeBefore']>0x0?'\x20\x20('+(_0x539504[_0x1fc4d0(0x60b)]/0x400/0x400)[_0x1fc4d0(0x70d)](0x2)+'\x20MB\x20→\x20'+(_0x539504['sizeAfter']/0x400/0x400)[_0x1fc4d0(0x70d)](0x2)+_0x1fc4d0(0x37f):'';console[_0x1fc4d0(0x2fd)](_0x1fc4d0(0x30b)+_0x539504[_0x1fc4d0(0x570)]+_0x1fc4d0(0x77f)+_0x539504[_0x1fc4d0(0x144)]+_0x5c82cf+(_0x539504[_0x1fc4d0(0x3a4)]?_0x1fc4d0(0x1b9):''));}if(_0x25d9b0[_0x1fc4d0(0x6a4)]>0x0)console[_0x1fc4d0(0x2fd)]('\x20\x20✓\x20~blobs\x20\x20('+_0x25d9b0[_0x1fc4d0(0x6a4)]+'\x20files)');for(const _0x2514b9 of _0x566eac)console[_0x1fc4d0(0x2fd)](_0x1fc4d0(0x686)+_0x2514b9[_0x1fc4d0(0x570)]+_0x1fc4d0(0x579)+_0x2514b9[_0x1fc4d0(0x112)]);await _0x3fc034[_0x1fc4d0(0x3fb)](),console[_0x1fc4d0(0x2fd)](_0x1fc4d0(0x22a));}async function _0x156e4f(_0x2f0326,_0x4fb742,_0x1d6956={}){const _0x8d6611=_0x37648b,{BACKUP_MANIFEST:_0x425039}=requireOkdbMigrate(),_0x2acf3d=_0x343fd7[_0x8d6611(0x3c9)](_0x4fb742['dbPath']),_0xc62bfc=_0x343fd7[_0x8d6611(0x4d3)](_0x2f0326,_0x425039);if(!_0x3b4cf6[_0x8d6611(0x12c)](_0xc62bfc))throw new Error(_0x2f0326+_0x8d6611(0x4c2)+_0x425039+')');const _0x425029=JSON[_0x8d6611(0x325)](_0x3b4cf6[_0x8d6611(0x1f5)](_0xc62bfc,'utf8')),_0x516521=_0x343fd7['relative'](_0x2f0326,_0x2acf3d);if(_0x516521===''||!(_0x516521[_0x8d6611(0x74f)]('..')||_0x343fd7[_0x8d6611(0x6f1)](_0x516521)))throw new Error(_0x8d6611(0x6f9)+_0x2acf3d+_0x8d6611(0x22e)+_0x2f0326);if(_0x3b4cf6['existsSync'](_0x2acf3d)&&_0x3b4cf6['readdirSync'](_0x2acf3d)[_0x8d6611(0x275)]>0x0)throw new Error(_0x8d6611(0x6f9)+_0x2acf3d+'\x20is\x20not\x20empty\x20—\x20restore\x20only\x20into\x20a\x20new\x20or\x20empty\x20directory');console['log'](_0x8d6611(0x33f)+_0x2f0326+_0x8d6611(0x529)+_0x425029[_0x8d6611(0x49c)]+',\x20'+_0x425029['createdAt']+')\x20→\x20'+_0x2acf3d+'…'),_0x3b4cf6[_0x8d6611(0x2e3)](_0x2f0326,_0x2acf3d,{'recursive':!![],'errorOnExist':!![]});for(const _0x25d810 of _0x425029[_0x8d6611(0x51a)]??[]){console['log'](_0x8d6611(0x30b)+_0x25d810[_0x8d6611(0x570)]+(_0x25d810[_0x8d6611(0x3a4)]?_0x8d6611(0x1b9):'')),_0x25d810[_0x8d6611(0x54c)]&&_0x25d810[_0x8d6611(0x221)]&&_0x3b4cf6[_0x8d6611(0x12c)](_0x25d810[_0x8d6611(0x221)])&&console[_0x8d6611(0x2fd)](_0x8d6611(0x305)+_0x25d810[_0x8d6611(0x570)]+_0x8d6611(0x3cf)+_0x25d810[_0x8d6611(0x221)]+',\x20which\x20still\x20exists\x20—\x20the\x20restored\x20'+(_0x8d6611(0xc5)+_0x25d810[_0x8d6611(0x39c)]+_0x8d6611(0x232)));}_0x1d6956[_0x8d6611(0x7ac)]&&(require$$5$1[_0x8d6611(0x656)](_0x2acf3d),console[_0x8d6611(0x2fd)]('\x20\x20✓\x20marked\x20for\x20a\x20new\x20identity\x20—\x20the\x20first\x20open\x20gives\x20this\x20copy\x20its\x20own\x20node\x20id')),console[_0x8d6611(0x2fd)](_0x8d6611(0x192));}async function _0x39a08b(_0x3ee0ea,_0x26299a,_0x2df23d){const _0x3a4a7e=_0x37648b,_0x49fa3=require$$5$1,_0x447a2d=_0x343fd7[_0x3a4a7e(0x3c9)](_0x26299a[_0x3a4a7e(0x297)]),_0x5964c4=_0x2df23d[_0x3a4a7e(0x3af)]??'default',_0x3c7696=_0x2df23d[_0x3a4a7e(0x107)]?_0x2df23d['types'][_0x3a4a7e(0x27b)](',')[_0x3a4a7e(0x341)](_0xbf512b=>_0xbf512b[_0x3a4a7e(0x1c1)]()):null;console[_0x3a4a7e(0x2fd)](_0x3a4a7e(0x2de)+_0x447a2d+'…');const _0x3267c1=new _0x49fa3(_0x447a2d,_0x4f3ef3(_0x26299a));await _0x3267c1[_0x3a4a7e(0x462)](),console[_0x3a4a7e(0x2fd)](_0x3a4a7e(0x6b3)+_0x5964c4+_0x3a4a7e(0x324)+_0x3ee0ea+'…');const _0x2ea132=await _0x3267c1[_0x3a4a7e(0x44e)][_0x3a4a7e(0x40a)](_0x3ee0ea,{'envName':_0x5964c4,'types':_0x3c7696,'includeChanges':!!_0x2df23d[_0x3a4a7e(0x48e)]});console[_0x3a4a7e(0x2fd)](_0x3a4a7e(0x775)+_0x2ea132[_0x3a4a7e(0x107)]+_0x3a4a7e(0x116)+_0x2ea132['records']+_0x3a4a7e(0x786)+_0x2ea132[_0x3a4a7e(0x48e)]);if(_0x2df23d[_0x3a4a7e(0x4e0)]){const _0x8971b7=_0x343fd7['join'](_0x343fd7[_0x3a4a7e(0x6ea)](_0x3ee0ea),'blobs');process[_0x3a4a7e(0x6be)]['write'](_0x3a4a7e(0x581));const {count:_0x4a215d,bytes:_0xd3b741}=await _0x3267c1[_0x3a4a7e(0x44e)][_0x3a4a7e(0x651)](_0x8971b7);console['log']('\x0d[okdb]\x20blobs:\x20'+_0x8971b7+_0x3a4a7e(0x685)+_0x4a215d+_0x3a4a7e(0xd3)+(_0x4a215d!==0x1?'s':'')+',\x20'+(_0xd3b741/0x400/0x400)[_0x3a4a7e(0x70d)](0x2)+_0x3a4a7e(0x37f));}await _0x3267c1['close'](),console[_0x3a4a7e(0x2fd)]('[okdb]\x20export\x20complete');}async function _0xb5ecb2(_0x496672,_0x5f40c6,_0x548a1d){const _0x3830ea=_0x37648b,_0x161322=require$$5$1,_0x41ef2e=_0x343fd7['resolve'](_0x5f40c6[_0x3830ea(0x297)]),_0x1ae87a=_0x548a1d[_0x3830ea(0x3af)]??null,_0x540510=_0x548a1d['types']?_0x548a1d[_0x3830ea(0x107)][_0x3830ea(0x27b)](',')['map'](_0x5f04da=>_0x5f04da['trim']()):null,_0x284179=!!_0x548a1d['drop'];console[_0x3830ea(0x2fd)]('[okdb]\x20opening\x20'+_0x41ef2e+'…');const _0x2789e0=new _0x161322(_0x41ef2e,_0x4f3ef3(_0x5f40c6));await _0x2789e0[_0x3830ea(0x462)](),console[_0x3830ea(0x2fd)](_0x3830ea(0x313)+_0x496672+'…');const _0x56c963=await _0x2789e0[_0x3830ea(0x44e)][_0x3830ea(0x161)](_0x496672,{'envName':_0x1ae87a,'types':_0x540510,'dropExisting':_0x284179,'includeChanges':!!_0x548a1d[_0x3830ea(0x48e)],'onProgress':({type:_0x5a5031,count:_0x288443})=>{const _0x3a93d6=_0x3830ea;process[_0x3a93d6(0x6be)][_0x3a93d6(0x598)](_0x3a93d6(0x2b8)+_0x5a5031+':\x20'+_0x288443+_0x3a93d6(0x5bb));}});process[_0x3830ea(0x6be)][_0x3830ea(0x598)]('\x0a'),console[_0x3830ea(0x2fd)](_0x3830ea(0x1e8)+_0x56c963['types']+_0x3830ea(0x116)+_0x56c963[_0x3830ea(0x5a7)]+'\x20\x20changes='+_0x56c963['changes']);if(_0x548a1d['blobs']){const _0xb18ce8=_0x343fd7[_0x3830ea(0x4d3)](_0x343fd7[_0x3830ea(0x6ea)](_0x496672),_0x3830ea(0x4e0));if(_0x3b4cf6[_0x3830ea(0x12c)](_0xb18ce8)){const {imported:_0x393868,skipped:_0x3fcc51}=await _0x2789e0['migrate'][_0x3830ea(0x2f3)](_0xb18ce8);console[_0x3830ea(0x2fd)](_0x3830ea(0x5e5)+_0x393868+'\x20\x20skipped='+_0x3fcc51);}}await _0x2789e0[_0x3830ea(0x3fb)](),console['log'](_0x3830ea(0x5ed));}async function _0x4bb2db(_0x415d24,_0xe5c36){const _0x10983d=_0x37648b;_0xe5c36['password']&&!_0xe5c36['name']&&(console[_0x10983d(0x131)](_0x10983d(0x56c)),process['exit'](0x1));const _0x7d0036=_0xe5c36[_0x10983d(0x338)]?_0xe5c36[_0x10983d(0x338)][_0x10983d(0x27b)](',')[_0x10983d(0x341)](_0x4587d4=>_0x4587d4[_0x10983d(0x1c1)]())['filter'](Boolean):[];let _0x517af8={};if(_0xe5c36[_0x10983d(0x421)])try{_0x517af8=JSON[_0x10983d(0x325)](_0xe5c36[_0x10983d(0x421)]);if(typeof _0x517af8!==_0x10983d(0x759)||Array[_0x10983d(0x321)](_0x517af8)||_0x517af8===null)throw new Error();}catch{console[_0x10983d(0x131)](_0x10983d(0x1af)),process[_0x10983d(0x282)](0x1);}const _0x2946ed=require$$5$1,{randomToken:_0x457d60,hashToken:_0x494f6d,hashPassword:_0xf6b8d5}=requireOkdbAuthTokens(),_0x4fa22f=require$$2$1,_0x25460d=_0x343fd7[_0x10983d(0x3c9)](_0x415d24[_0x10983d(0x297)]),_0x394b57=new _0x2946ed(_0x25460d,_0x4f3ef3(_0x415d24));await _0x394b57[_0x10983d(0x462)]();try{await _0x394b57[_0x10983d(0x61d)][_0x10983d(0xb5)]();if(_0xe5c36['name']){const _0x137931=await _0x394b57[_0x10983d(0x61d)][_0x10983d(0x5f2)](_0xe5c36['name']);_0x137931&&(console[_0x10983d(0x131)](_0x10983d(0x36e)+_0xe5c36[_0x10983d(0x570)]+'\x22\x20already\x20exists'),process[_0x10983d(0x282)](0x1));}const _0x52a04d=_0x457d60(0x20),_0x58d2b5=_0x494f6d(_0x52a04d),_0x5bab6a=_0xe5c36[_0x10983d(0x65f)]?await _0xf6b8d5(_0xe5c36[_0x10983d(0x65f)]):null,_0x46861c=_0x4fa22f[_0x10983d(0xbc)](),_0x3d0b22={'tokenHash':_0x58d2b5,'name':_0xe5c36[_0x10983d(0x570)]||null,'passwordHash':_0x5bab6a,'label':_0xe5c36[_0x10983d(0x780)]||null,'permissions':_0x7d0036,'grants':_0x517af8,'createdAt':Date[_0x10983d(0x2f4)](),'lastUsedAt':null},_0x32254d=_0xe5c36['ttl']?{'ttl':Number(_0xe5c36[_0x10983d(0x3bc)])}:undefined;await _0x394b57[_0x10983d(0x66b)]['put']('~tokens',_0x46861c,_0x3d0b22,_0x32254d),console['log'](_0x10983d(0x70c)),console[_0x10983d(0x2fd)](_0x10983d(0x7cc)+_0x46861c),console[_0x10983d(0x2fd)](_0x10983d(0x7b9)+(_0xe5c36[_0x10983d(0x570)]||_0x10983d(0x463))),console[_0x10983d(0x2fd)](_0x10983d(0x5a9)+(_0xe5c36[_0x10983d(0x780)]||'(unset)')),console['log'](_0x10983d(0x47c)+(_0x7d0036[_0x10983d(0x4d3)](',\x20')||_0x10983d(0x63a))),console[_0x10983d(0x2fd)](_0x10983d(0xd9)),console[_0x10983d(0x2fd)]('\x20\x20\x20\x20'+_0x52a04d+'\x0a');}finally{await _0x394b57[_0x10983d(0x3fb)]();}}async function _0x1cfcd0(_0x162b2d){const _0x347920=_0x37648b,_0x2415b5=require$$5$1,_0xe8a2c0=_0x343fd7['resolve'](_0x162b2d['dbPath']),_0x37d450=new _0x2415b5(_0xe8a2c0,_0x4f3ef3(_0x162b2d));await _0x37d450['open']();try{const _0x4dcf6b=_0x37d450[_0x347920(0x66b)];if(!_0x4dcf6b||!_0x4dcf6b['hasType'](_0x347920(0x4b6))){console['log'](_0x347920(0x4b4));return;}const _0xb43109=[];for(const {key:_0xf17fca,value:_0x30dabb}of _0x4dcf6b[_0x347920(0x507)]('~tokens')){_0xb43109[_0x347920(0x1c7)]({'id':_0xf17fca,'name':_0x30dabb[_0x347920(0x570)]||_0x347920(0x463),'label':_0x30dabb['label']||_0x347920(0x463),'permissions':Array[_0x347920(0x321)](_0x30dabb[_0x347920(0x338)])?_0x30dabb[_0x347920(0x338)][_0x347920(0x4d3)](','):'','created':_0x30dabb[_0x347920(0x659)]?new Date(_0x30dabb[_0x347920(0x659)])[_0x347920(0x5ab)]()[_0x347920(0x3a9)](0x0,0xa):''});}if(_0xb43109[_0x347920(0x275)]===0x0){console[_0x347920(0x2fd)](_0x347920(0x4b4));return;}const _0x1f667b=!process['stdout'][_0x347920(0x551)]||process[_0x347920(0x6be)][_0x347920(0x551)]>=0x64,_0xdd134c=_0x1f667b?0x24:0xa,_0x11e535=['ID'[_0x347920(0x3bd)](_0xdd134c),_0x347920(0x668)[_0x347920(0x3bd)](0x10),_0x347920(0x366)['padEnd'](0x14),'PERMISSIONS'[_0x347920(0x3bd)](0x14),_0x347920(0xc4)][_0x347920(0x4d3)]('\x20\x20');console[_0x347920(0x2fd)]('\x0a'+_0x11e535),console['log']('-'[_0x347920(0x749)](_0x11e535[_0x347920(0x275)]));for(const _0x2c8aa6 of _0xb43109){const _0x3a06d4=_0x1f667b?_0x2c8aa6['id']:_0x2c8aa6['id'][_0x347920(0x3a9)](0x0,0x8)+'…';console[_0x347920(0x2fd)]([_0x3a06d4[_0x347920(0x3bd)](_0xdd134c),_0x2c8aa6[_0x347920(0x570)][_0x347920(0x3a9)](0x0,0x10)[_0x347920(0x3bd)](0x10),_0x2c8aa6[_0x347920(0x780)]['slice'](0x0,0x14)[_0x347920(0x3bd)](0x14),_0x2c8aa6[_0x347920(0x338)][_0x347920(0x3a9)](0x0,0x14)[_0x347920(0x3bd)](0x14),_0x2c8aa6[_0x347920(0x5cd)]][_0x347920(0x4d3)]('\x20\x20'));}console['log']('');}finally{await _0x37d450[_0x347920(0x3fb)]();}}async function _0x428b20(_0xa8e748,_0x1d2315){const _0x18d28e=_0x37648b;!_0xa8e748&&(console[_0x18d28e(0x131)](_0x18d28e(0x6ed)),process[_0x18d28e(0x282)](0x1));const _0x57016f=require$$5$1,_0x3604bf=_0x343fd7['resolve'](_0x1d2315[_0x18d28e(0x297)]),_0x3aa148=new _0x57016f(_0x3604bf,_0x4f3ef3(_0x1d2315));await _0x3aa148[_0x18d28e(0x462)]();try{const _0x196892=_0x3aa148[_0x18d28e(0x66b)];(!_0x196892||!_0x196892['hasType'](_0x18d28e(0x4b6)))&&(console['error'](_0x18d28e(0x40e)+_0xa8e748+'\x22'),process['exit'](0x1));let _0x2ced9d=null,_0x4559f8=null;const _0x445593=_0x196892['get'](_0x18d28e(0x4b6),_0xa8e748);if(_0x445593)_0x2ced9d=_0xa8e748,_0x4559f8=_0x445593;else{const _0x2c09ba=[];for(const {key:_0x44b2ee,value:_0x31a326}of _0x196892[_0x18d28e(0x507)](_0x18d28e(0x4b6))){if(_0x44b2ee[_0x18d28e(0x74f)](_0xa8e748))_0x2c09ba['push']({'key':_0x44b2ee,'value':_0x31a326});}_0x2c09ba[_0x18d28e(0x275)]===0x0&&(console[_0x18d28e(0x131)](_0x18d28e(0x40e)+_0xa8e748+'\x22'),process['exit'](0x1));if(_0x2c09ba[_0x18d28e(0x275)]>0x1){console[_0x18d28e(0x131)](_0x18d28e(0x1ca)+_0xa8e748+_0x18d28e(0x1e7)+_0x2c09ba[_0x18d28e(0x275)]+_0x18d28e(0x6c7));for(const _0x38921a of _0x2c09ba){console['error']('\x20\x20'+_0x38921a[_0x18d28e(0x1d9)]+'\x20\x20(name:\x20'+(_0x38921a[_0x18d28e(0x446)][_0x18d28e(0x570)]||_0x18d28e(0x463))+')');}process['exit'](0x1);}_0x2ced9d=_0x2c09ba[0x0][_0x18d28e(0x1d9)],_0x4559f8=_0x2c09ba[0x0][_0x18d28e(0x446)];}await _0x196892[_0x18d28e(0x54d)](_0x18d28e(0x4b6),_0x2ced9d),console[_0x18d28e(0x2fd)]('\x20\x20✓\x20Revoked\x20token\x20'+_0x2ced9d+_0x18d28e(0x48b)+(_0x4559f8[_0x18d28e(0x570)]||_0x18d28e(0x463))+_0x18d28e(0x4ff)+(_0x4559f8[_0x18d28e(0x780)]||_0x18d28e(0x463))+')');}finally{await _0x3aa148[_0x18d28e(0x3fb)]();}}function _0x561bea(_0x1e3977,_0x6e481a){const _0x4605fe=_0x37648b;if(!_0x1e3977['activation'])return _0x4605fe(0x1ad);const _0x93b55d=_0x1e3977[_0x4605fe(0x15f)];if(!_0x93b55d)return _0x4605fe(0x1e5);if(_0x6e481a>_0x93b55d)return _0x4605fe(0x53e);return'active';}function _0x25336b(_0x102c10){const _0xfba21f=_0x37648b;if(!_0x102c10||typeof _0x102c10!==_0xfba21f(0x759))return'';const _0x413bec=Object[_0xfba21f(0x597)](_0x102c10)[_0xfba21f(0x78a)](([,_0x134acc])=>_0x134acc)[_0xfba21f(0x341)](([_0x1f72f1])=>_0x1f72f1);if(_0x413bec[_0xfba21f(0x275)]===0x0)return _0xfba21f(0x63a);if(_0x413bec['length']<=0x3)return _0x413bec['join']('\x20');return _0x413bec[_0xfba21f(0x3a9)](0x0,0x3)['join']('\x20')+('\x20+'+(_0x413bec[_0xfba21f(0x275)]-0x3));}async function _0x120b8f(_0x297518){const _0x155b21=_0x37648b,_0x4b9107=require$$5$1,_0x5db822=requireOkdbLicenseCodec(),{_C:_0x37825b}=requireOkdbLicense(),_0x23f70d=_0x343fd7[_0x155b21(0x3c9)](_0x297518[_0x155b21(0x297)]),_0x216368=new _0x4b9107(_0x23f70d,_0x4f3ef3(_0x297518));await _0x216368[_0x155b21(0x462)]();try{const _0x420ff9=_0x216368[_0x155b21(0x66b)],_0x417f04=_0x420ff9?.['db']?.[_0x155b21(0x404)]?.('__writeCounter')??0x0,_0x53da27=[..._0x216368[_0x155b21(0x3ae)][_0x155b21(0x157)]()][_0x155b21(0x78a)](_0x21d54a=>!_0x21d54a[_0x155b21(0x74f)]('~'))[_0x155b21(0x275)],_0x1c91d4=_0x216368[_0x155b21(0x50e)]?.[_0x155b21(0x620)];if(_0x1c91d4){const _0x13362a=_0x1c91d4['_isFree']===!![],_0x5b501a=_0x13362a?_0x155b21(0x61a):_0x216368[_0x155b21(0x50e)][_0x155b21(0x1e5)]?.[_0x155b21(0x48a)]||_0x155b21(0x6fd);console['log'](''),console[_0x155b21(0x2fd)](_0x155b21(0x63c)+_0x5b501a);const _0x22cf03=_0x1c91d4['limits']||{};if(_0x22cf03[_0x155b21(0x1a4)]){const _0x14bb77=Math[_0x155b21(0x613)](_0x417f04/_0x22cf03[_0x155b21(0x1a4)]*0x64);console[_0x155b21(0x2fd)](_0x155b21(0x669)+_0x417f04[_0x155b21(0x505)]()+_0x155b21(0x68f)+_0x22cf03[_0x155b21(0x1a4)][_0x155b21(0x505)]()+_0x155b21(0x685)+_0x14bb77+'%)');}else console[_0x155b21(0x2fd)](_0x155b21(0x669)+_0x417f04[_0x155b21(0x505)]());_0x22cf03[_0x155b21(0x51a)]?console['log'](_0x155b21(0x20b)+_0x53da27+_0x155b21(0x68f)+_0x22cf03[_0x155b21(0x51a)]):console[_0x155b21(0x2fd)]('\x20\x20Envs:\x20\x20\x20\x20'+_0x53da27),_0x37825b?.['PUB_FINGERPRINT']&&console[_0x155b21(0x2fd)]('\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20'+_0x37825b[_0x155b21(0x198)]+_0x155b21(0x58d));}if(!_0x420ff9||!_0x420ff9[_0x155b21(0x6c1)]('~licenses')){console[_0x155b21(0x2fd)](''),console['log'](_0x155b21(0x159)),console['log']('');return;}const _0x38ea0c=[],_0x1f9708=Date['now'](),_0x50c6f4=_0x216368['id'],_0x1e566b=_0x155b21(0xf9);for(const {key:_0x54471e,value:_0x1b7f60}of _0x420ff9[_0x155b21(0x507)]('~licenses')){const _0x1e2c73=_0x1b7f60[_0x155b21(0x7bd)]?Buffer[_0x155b21(0x748)](_0x1b7f60[_0x155b21(0x7bd)],'hex'):Buffer[_0x155b21(0xf7)](0x8);let _0x27f812='';try{_0x27f812=_0x5db822[_0x155b21(0x16f)](_0x50c6f4,_0x1e2c73,_0x1e566b)[_0x155b21(0x1a3)];}catch{}_0x38ea0c[_0x155b21(0x1c7)]({'id':_0x54471e,'licensee':_0x1b7f60[_0x155b21(0x48a)]||'','expires':_0x1b7f60[_0x155b21(0x15f)]?new Date(_0x1b7f60[_0x155b21(0x15f)])[_0x155b21(0x5ab)]()[_0x155b21(0x3a9)](0x0,0xa):'','features':_0x25336b(_0x1b7f60[_0x155b21(0x6fb)]),'pin':_0x27f812,'status':_0x561bea(_0x1b7f60,_0x1f9708)});}if(_0x38ea0c[_0x155b21(0x275)]===0x0){console[_0x155b21(0x2fd)](''),console['log'](_0x155b21(0x159)),console[_0x155b21(0x2fd)]('');return;}const _0x3044fd=['\x20\x20'+'ID'['padEnd'](0xe),_0x155b21(0x28d)[_0x155b21(0x3bd)](0xe),'EXPIRES'[_0x155b21(0x3bd)](0xc),_0x155b21(0x5fd)[_0x155b21(0x3bd)](0x1e),_0x155b21(0x304)[_0x155b21(0x3bd)](0xa),_0x155b21(0x5d5)][_0x155b21(0x4d3)]('\x20');console[_0x155b21(0x2fd)]('\x0a'+_0x3044fd);for(const _0xc3ff8 of _0x38ea0c){const _0x1b7ecd=_0xc3ff8['id'][_0x155b21(0x3a9)](0x0,0x8)+'\u2026';console[_0x155b21(0x2fd)](['\x20\x20'+_0x1b7ecd[_0x155b21(0x3bd)](0xe),_0xc3ff8[_0x155b21(0x48a)][_0x155b21(0x3a9)](0x0,0xe)['padEnd'](0xe),_0xc3ff8['expires'][_0x155b21(0x3bd)](0xc),_0xc3ff8[_0x155b21(0x6fb)][_0x155b21(0x3a9)](0x0,0x1e)[_0x155b21(0x3bd)](0x1e),_0xc3ff8[_0x155b21(0x1a3)][_0x155b21(0x3bd)](0xa),_0xc3ff8[_0x155b21(0x493)]]['join']('\x20'));}console[_0x155b21(0x2fd)]('');}finally{await _0x216368[_0x155b21(0x3fb)]();}}async function _0x4d689b(_0x56b74a,_0x2199f5){const _0x44d403=_0x37648b,_0x36a0f=require$$5$1,_0x291bfb=requireOkdbLicenseCodec();let _0x497418=_0x56b74a;(_0x291bfb[_0x44d403(0x139)](_0x56b74a)===_0x44d403(0x272)||_0x3b4cf6['existsSync'](_0x56b74a)&&_0x3b4cf6[_0x44d403(0x722)](_0x56b74a)[_0x44d403(0x242)]())&&(_0x497418=_0x3b4cf6[_0x44d403(0x1f5)](_0x56b74a,_0x44d403(0x253))[_0x44d403(0x1c1)]());const _0x45d8c3=_0x343fd7[_0x44d403(0x3c9)](_0x2199f5['dbPath']),_0x480ea7=new _0x36a0f(_0x45d8c3,_0x4f3ef3(_0x2199f5));await _0x480ea7[_0x44d403(0x462)]();try{let _0x8133ad;try{_0x8133ad=await _0x480ea7['licenses'][_0x44d403(0x32c)]({'blob':_0x497418});}catch(_0x583295){console[_0x44d403(0x131)](_0x44d403(0x52b)+_0x583295[_0x44d403(0x63f)]),process['exit'](0x1);}const _0x53afda=_0x8133ad['pin']||'',_0xd85299=Object[_0x44d403(0x597)](_0x8133ad[_0x44d403(0x6fb)]||{})[_0x44d403(0x78a)](([,_0x3e5337])=>_0x3e5337)[_0x44d403(0x341)](([_0x299bb1])=>_0x299bb1),_0x5a5fbf=_0x8133ad[_0x44d403(0x76d)]||{},_0x3cedf5=[_0x5a5fbf[_0x44d403(0x51a)]?_0x44d403(0x2e2)+_0x5a5fbf[_0x44d403(0x51a)]:null,_0x5a5fbf[_0x44d403(0x4cd)]?'types/env='+_0x5a5fbf[_0x44d403(0x4cd)]:null,_0x5a5fbf[_0x44d403(0x4e9)]?'peers='+_0x5a5fbf['syncPeers']:null,_0x5a5fbf[_0x44d403(0x1a4)]?_0x44d403(0x4a7)+_0x5a5fbf[_0x44d403(0x1a4)][_0x44d403(0x505)]():null][_0x44d403(0x78a)](Boolean)[_0x44d403(0x4d3)]('\x20\x20'),_0x176765=_0x8133ad['type']!==_0x44d403(0x22c);console[_0x44d403(0x2fd)](_0x8133ad[_0x44d403(0x5a0)]?_0x44d403(0x51e):_0x44d403(0x25c)),console['log'](_0x44d403(0x7c0)+_0x8133ad['id']),console['log'](_0x44d403(0x486)+_0x8133ad[_0x44d403(0x48a)]),console[_0x44d403(0x2fd)]('\x20\x20\x20\x20expires:\x20\x20\x20'+(_0x8133ad[_0x44d403(0x15f)]?new Date(_0x8133ad[_0x44d403(0x15f)])[_0x44d403(0x5ab)]()[_0x44d403(0x3a9)](0x0,0xa):'never')),console[_0x44d403(0x2fd)](_0x44d403(0x477)+(_0xd85299[_0x44d403(0x4d3)](',\x20')||_0x44d403(0x63a)));if(_0x3cedf5)console['log']('\x20\x20\x20\x20limits:\x20\x20\x20\x20'+_0x3cedf5);if(_0x176765)console[_0x44d403(0x2fd)](_0x44d403(0x73e)+_0x8133ad[_0x44d403(0x4cc)]+'\x20license\x20—\x20no\x20activation\x20needed)'),console[_0x44d403(0x2fd)]('');else!_0x8133ad[_0x44d403(0x6c6)]?(console[_0x44d403(0x2fd)](_0x44d403(0x1da)+_0x8133ad['status']),console[_0x44d403(0x2fd)]('')):(console['log'](_0x44d403(0x3db)+_0x53afda),console['log'](_0x44d403(0x58e)),console['log'](''),console[_0x44d403(0x2fd)](_0x44d403(0x223)),console[_0x44d403(0x2fd)](_0x44d403(0x32f)+_0x53afda+_0x44d403(0x38d)),console[_0x44d403(0x2fd)](_0x44d403(0x30f)),console['log'](_0x44d403(0xb4)),console[_0x44d403(0x2fd)](''));}finally{await _0x480ea7[_0x44d403(0x3fb)]();}}async function _0x1fe548(_0x298c27,_0x2610df){const _0x1ccc44=_0x37648b,_0x56ed7b=require$$5$1,_0x2fa43c=_0x343fd7['resolve'](_0x2610df['dbPath']),_0xcba14f=new _0x56ed7b(_0x2fa43c,_0x4f3ef3(_0x2610df));await _0xcba14f[_0x1ccc44(0x462)]();try{let _0x1cad77;try{_0x1cad77=await _0xcba14f[_0x1ccc44(0x643)]['activate'](_0x298c27);}catch(_0x27d12a){console[_0x1ccc44(0x131)](_0x1ccc44(0x52b)+_0x27d12a[_0x1ccc44(0x63f)]),console['error'](''),console[_0x1ccc44(0x131)]('\x20\x20Common\x20causes:'),console[_0x1ccc44(0x131)](_0x1ccc44(0x376)),console[_0x1ccc44(0x131)](_0x1ccc44(0x2d4)),console[_0x1ccc44(0x131)]('\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.'),console[_0x1ccc44(0x131)](''),process[_0x1ccc44(0x282)](0x1);}console['log'](_0x1ccc44(0x111)),console[_0x1ccc44(0x2fd)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1cad77['id']),console['log'](_0x1ccc44(0x486)+_0x1cad77['licensee']),console[_0x1ccc44(0x2fd)](_0x1ccc44(0x10c)+(_0x1cad77[_0x1ccc44(0x15f)]?new Date(_0x1cad77[_0x1ccc44(0x15f)])['toISOString']()[_0x1ccc44(0x3a9)](0x0,0xa):_0x1ccc44(0x444))),console[_0x1ccc44(0x2fd)](_0x1ccc44(0x386)),console[_0x1ccc44(0x2fd)]('');}finally{await _0xcba14f['close']();}}async function _0x85583a(_0x566584,_0x1bafc0){const _0x598d14=_0x37648b;!_0x566584&&(console[_0x598d14(0x131)]('[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument'),process[_0x598d14(0x282)](0x1));const _0x3d764c=require$$5$1,_0x1bd785=requireOkdbLicenseCodec(),_0x18de68=_0x343fd7[_0x598d14(0x3c9)](_0x1bafc0[_0x598d14(0x297)]),_0x187b06=new _0x3d764c(_0x18de68,_0x4f3ef3(_0x1bafc0));await _0x187b06[_0x598d14(0x462)]();try{const _0x2e94d4=_0x187b06[_0x598d14(0x66b)];(!_0x2e94d4||!_0x2e94d4[_0x598d14(0x6c1)]('~licenses'))&&(console[_0x598d14(0x131)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x566584+'\x22'),process[_0x598d14(0x282)](0x1));let _0x29e0fc=null,_0x2d65a0=null;const _0x120aae=_0x2e94d4[_0x598d14(0x404)](_0x598d14(0x750),_0x566584);if(_0x120aae)_0x29e0fc=_0x566584,_0x2d65a0=_0x120aae;else{const _0x41c8b9=[];for(const {key:_0x5b1708,value:_0x183195}of _0x2e94d4['getRange'](_0x598d14(0x750))){if(_0x5b1708['startsWith'](_0x566584))_0x41c8b9[_0x598d14(0x1c7)]({'key':_0x5b1708,'value':_0x183195});}_0x41c8b9[_0x598d14(0x275)]===0x0&&(console[_0x598d14(0x131)](_0x598d14(0x488)+_0x566584+'\x22'),process['exit'](0x1)),_0x41c8b9[_0x598d14(0x275)]>0x1&&(console[_0x598d14(0x131)]('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x566584+_0x598d14(0x1e7)+_0x41c8b9[_0x598d14(0x275)]+'\x20licenses'),process[_0x598d14(0x282)](0x1)),_0x29e0fc=_0x41c8b9[0x0]['key'],_0x2d65a0=_0x41c8b9[0x0]['value'];}const _0x3799c7=Date[_0x598d14(0x2f4)](),_0x3a87a2=_0x561bea(_0x2d65a0,_0x3799c7),_0x137757=_0x187b06['id'],_0x2750d3=_0x598d14(0xf9);let _0x5e1428='';try{const _0x4ae9ac=Buffer[_0x598d14(0x748)](_0x2d65a0[_0x598d14(0x7bd)],_0x598d14(0x6db));_0x5e1428=_0x1bd785[_0x598d14(0x16f)](_0x137757,_0x4ae9ac,_0x2750d3)[_0x598d14(0x1a3)];}catch{}const _0x5d7af2=_0x2d65a0['features']?Object['entries'](_0x2d65a0[_0x598d14(0x6fb)])[_0x598d14(0x78a)](([,_0x52d660])=>_0x52d660)[_0x598d14(0x341)](([_0x301211])=>_0x301211):[],_0x58c37e=_0x2d65a0[_0x598d14(0x76d)]||{},_0x50cc48=_0x2e94d4?.['db']?.[_0x598d14(0x404)]?.('__writeCounter')??0x0,_0x41f2bc=[..._0x187b06[_0x598d14(0x3ae)][_0x598d14(0x157)]()]['filter'](_0x23d430=>!_0x23d430['startsWith']('~'))[_0x598d14(0x275)];console[_0x598d14(0x2fd)](_0x598d14(0x396)),console[_0x598d14(0x2fd)](_0x598d14(0x7c0)+_0x29e0fc),console[_0x598d14(0x2fd)](_0x598d14(0x486)+(_0x2d65a0['licensee']||'')),console[_0x598d14(0x2fd)](_0x598d14(0x10c)+(_0x2d65a0['expiresAt']?new Date(_0x2d65a0[_0x598d14(0x15f)])[_0x598d14(0x5ab)]()[_0x598d14(0x3a9)](0x0,0xa):'')),console[_0x598d14(0x2fd)](_0x598d14(0x477)+(_0x5d7af2[_0x598d14(0x4d3)](',\x20')||_0x598d14(0x63a))),console[_0x598d14(0x2fd)](_0x598d14(0x3db)+_0x5e1428),console[_0x598d14(0x2fd)](_0x598d14(0x1da)+_0x3a87a2),console[_0x598d14(0x2fd)](_0x598d14(0x371)+new Date(_0x2d65a0['addedAt'])[_0x598d14(0x5ab)]());if(_0x3a87a2==='active'){console[_0x598d14(0x2fd)](''),console[_0x598d14(0x2fd)]('\x20\x20Usage:');if(_0x58c37e['maxWrites']){const _0xec52d6=Math[_0x598d14(0x613)](_0x50cc48/_0x58c37e['maxWrites']*0x64);console[_0x598d14(0x2fd)](_0x598d14(0x51d)+_0x50cc48[_0x598d14(0x505)]()+_0x598d14(0x68f)+_0x58c37e['maxWrites']['toLocaleString']()+_0x598d14(0x685)+_0xec52d6+'%)');}else console[_0x598d14(0x2fd)]('\x20\x20\x20\x20writes:\x20\x20\x20\x20'+_0x50cc48[_0x598d14(0x505)]()+'\x20\x20(unlimited)');_0x58c37e[_0x598d14(0x51a)]?console[_0x598d14(0x2fd)]('\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20'+_0x41f2bc+_0x598d14(0x68f)+_0x58c37e[_0x598d14(0x51a)]):console[_0x598d14(0x2fd)](_0x598d14(0x728)+_0x41f2bc+_0x598d14(0x335));}console[_0x598d14(0x2fd)]('');}finally{await _0x187b06[_0x598d14(0x3fb)]();}}async function _0x477395(_0x1854bc,_0x365a51){const _0x588ddd=_0x37648b;!_0x1854bc&&(console[_0x588ddd(0x131)]('[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument'),process[_0x588ddd(0x282)](0x1));const _0x5414fe=require$$5$1,_0x32b771=_0x343fd7[_0x588ddd(0x3c9)](_0x365a51[_0x588ddd(0x297)]),_0x422de3=new _0x5414fe(_0x32b771,_0x4f3ef3(_0x365a51));await _0x422de3[_0x588ddd(0x462)]();try{const _0x576eb4=_0x422de3[_0x588ddd(0x66b)];(!_0x576eb4||!_0x576eb4[_0x588ddd(0x6c1)](_0x588ddd(0x750)))&&(console[_0x588ddd(0x131)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x1854bc+'\x22'),process[_0x588ddd(0x282)](0x1));let _0x9e9c43=null,_0x2cc59b=null;const _0x144427=_0x576eb4[_0x588ddd(0x404)](_0x588ddd(0x750),_0x1854bc);if(_0x144427)_0x9e9c43=_0x1854bc,_0x2cc59b=_0x144427;else{const _0x137d3f=[];for(const {key:_0x5e90ac,value:_0x5a56e1}of _0x576eb4['getRange']('~licenses')){if(_0x5e90ac[_0x588ddd(0x74f)](_0x1854bc))_0x137d3f[_0x588ddd(0x1c7)]({'key':_0x5e90ac,'value':_0x5a56e1});}_0x137d3f['length']===0x0&&(console[_0x588ddd(0x131)](_0x588ddd(0x488)+_0x1854bc+'\x22'),process[_0x588ddd(0x282)](0x1)),_0x137d3f[_0x588ddd(0x275)]>0x1&&(console[_0x588ddd(0x131)](_0x588ddd(0x1ca)+_0x1854bc+_0x588ddd(0x1e7)+_0x137d3f[_0x588ddd(0x275)]+_0x588ddd(0x595)),process[_0x588ddd(0x282)](0x1)),_0x9e9c43=_0x137d3f[0x0][_0x588ddd(0x1d9)],_0x2cc59b=_0x137d3f[0x0][_0x588ddd(0x446)];}await _0x576eb4['remove'](_0x588ddd(0x750),_0x9e9c43),console['log'](_0x588ddd(0x5b7)+_0x9e9c43+_0x588ddd(0x72e)+(_0x2cc59b[_0x588ddd(0x48a)]||'(unset)')+')');}finally{await _0x422de3[_0x588ddd(0x3fb)]();}}async function _0x4d3510(_0x500f8f,_0x48963d,_0x29c1ff){const _0x1f21f3=_0x37648b;!_0x500f8f&&(console[_0x1f21f3(0x131)](_0x1f21f3(0x363)),process[_0x1f21f3(0x282)](0x1));!_0x29c1ff[_0x1f21f3(0x6b2)]&&!(_0x29c1ff[_0x1f21f3(0x4cb)]&&_0x29c1ff[_0x1f21f3(0x65f)])&&(console[_0x1f21f3(0x131)](_0x1f21f3(0x166)),process[_0x1f21f3(0x282)](0x1));const _0x323e99=_0x29c1ff[_0x1f21f3(0x7a1)]||_0x48963d[_0x1f21f3(0x155)]?.[_0x1f21f3(0x154)];!_0x323e99&&(console[_0x1f21f3(0x131)](_0x1f21f3(0x616)+_0x1f21f3(0x6ac)+_0x1f21f3(0x79b)),process[_0x1f21f3(0x282)](0x1));const _0x5e9307=require$$5$1,_0x29a1c7=new _0x5e9307(_0x48963d[_0x1f21f3(0x297)],{'sync':{'address':_0x323e99,'auto_reconcile':![]}});await _0x29a1c7[_0x1f21f3(0x462)]();try{const _0x243866=_0x29a1c7[_0x1f21f3(0x66b)];if(_0x243866&&_0x243866['hasType'](_0x1f21f3(0x4b6))){let _0x4236c6=![];for(const _0x543ec9 of _0x243866['getRange']('~tokens')){_0x4236c6=!![];break;}_0x4236c6&&console['log'](_0x1f21f3(0x420)+'\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.');}console[_0x1f21f3(0x2fd)](_0x1f21f3(0x3ea)+_0x500f8f+'…'),await _0x29a1c7[_0x1f21f3(0x155)][_0x1f21f3(0x4d3)](_0x500f8f['replace'](/\/+$/,''),{'token':_0x29c1ff['token'],'username':_0x29c1ff[_0x1f21f3(0x4cb)],'password':_0x29c1ff[_0x1f21f3(0x65f)]}),console['log']('\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated'),console[_0x1f21f3(0x2fd)](_0x1f21f3(0x76f));}finally{await _0x29a1c7[_0x1f21f3(0x3fb)]();}}async function _0x27a7af(){const _0xc26a72=_0x37648b,_0x41e293=Date[_0xc26a72(0x2f4)](),_0x1ad639=_0x4051da(process[_0xc26a72(0x283)]),_0x378286=_0x103a6b(_0x1ad639),_0x54d7ae=_0x343fd7[_0xc26a72(0x3c9)](_0x378286['dbPath']);!_0x378286[_0xc26a72(0x6b0)]&&!process[_0xc26a72(0x180)][_0xc26a72(0x3fd)]&&(_0x378286[_0xc26a72(0x6b0)]=!![]);const _0xc83d18=require$$5$1,{start:_0x12b770,colorLog:_0x3a0a1c}=requireOkdbShell(),_0x320ea3=require$$1$1,_0x4e5a52={..._0x378286[_0xc26a72(0x1d9)]?{'encryptionKey':_0x378286[_0xc26a72(0x1d9)]}:{},..._0x378286[_0xc26a72(0x3da)]?{'admin':![]}:_0x1f7ae8(_0x378286[_0xc26a72(0x6a0)])?{'admin':_0x378286[_0xc26a72(0x6a0)]}:{},..._0x1f7ae8(_0x378286[_0xc26a72(0x383)])?{'api':_0x378286['api']}:{},..._0x1f7ae8(_0x378286[_0xc26a72(0x61d)])?{'auth':_0x378286['auth']}:{},..._0x1f7ae8(_0x378286[_0xc26a72(0x6e0)])?{'mcp':_0x378286[_0xc26a72(0x6e0)]}:{},..._0x1f7ae8(_0x378286['backup'])?{'backup':_0x378286[_0xc26a72(0x5f5)]}:{},..._0x378286[_0xc26a72(0x3a4)]!==![]?{'timeMachine':_0x378286['timeMachine']}:{},...Object[_0xc26a72(0x4fd)](_0x1d5d1a[_0xc26a72(0x78a)](_0x22ce5=>_0x378286[_0x22ce5]!==undefined)[_0xc26a72(0x341)](_0x4661dd=>[_0x4661dd,_0x378286[_0x4661dd]]))},_0x4a4388=_0x31963e(_0x378286);if(!_0x320ea3[_0xc26a72(0x1e1)]){const _0x4fd217=_0x2063c2(),_0x2fd259=_0x378286[_0xc26a72(0x6dc)]?_0xc26a72(0x5f1):_0x378286['workersFlag']!=null&&_0x378286[_0xc26a72(0x1d8)]!==''?'--workers':process.env.OKDB_HTTP_WORKERS?_0xc26a72(0x3c8):_0x378286[_0xc26a72(0x5b1)]?.[_0xc26a72(0x7aa)]!=null?'config\x20http.workers':'default:\x20cores−1\x20=\x20'+Math[_0xc26a72(0x114)](0x1,require$$0[_0xc26a72(0x261)]()[_0xc26a72(0x275)]-0x1);process['stdout'][_0xc26a72(0x598)](_0xc26a72(0x182)+_0x4a4388+'\x20('+_0x2fd259+(!_0x4fd217?_0xc26a72(0x123):'')+')\x0a');}if(_0x320ea3[_0xc26a72(0x1e1)]){const _0x439511={..._0x4e5a52},_0x34282c=new _0xc83d18(_0x54d7ae,_0x439511);_0x34282c[_0xc26a72(0x2fd)][_0xc26a72(0x5b4)]?.();const _0x2666dc=process.env.OKDB_CLUSTER_SLOT??'?',_0x58a058={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x344451=_0x58a058[_0x378286['logLevel']]??_0x58a058[_0xc26a72(0x695)];_0x34282c[_0xc26a72(0x2fd)][_0xc26a72(0xbf)](_0x360f75=>{const _0x5b1d07=_0xc26a72;if((_0x58a058[_0x360f75['level']]??0x1)<_0x344451)return;try{process[_0x5b1d07(0x1a2)]?.({'__okdbCluster':_0x5b1d07(0x2fd),'slot':_0x2666dc,'pid':process[_0x5b1d07(0x3ca)],'entry':_0x360f75});}catch{}}),await _0x34282c['open']();const {attachWorkerCluster:_0x224b8c}=requireOkdbCluster();_0x224b8c(_0x34282c),await _0x4799b8(_0x34282c,_0x378286['port'],_0x8c067b(_0x378286));return;}if(_0x4a4388>0x1){const {runClustered:_0x42d57f}=requireOkdbCluster(),_0x16df4f=new _0xc83d18(_0x54d7ae,{..._0x4e5a52,'engines':![],'processors':![],'compaction':![]});await _0x16df4f[_0xc26a72(0x462)]();const _0xe725df=async()=>{const _0x36718c=new _0xc83d18(_0x54d7ae,{..._0x4e5a52});return await _0x36718c['open'](),_0x36718c;},_0x65e5fe=Object[_0xc26a72(0x4fd)](_0x1d5d1a[_0xc26a72(0x341)](_0x522cbc=>[_0x522cbc,_0x4e5a52[_0x522cbc]??!![]])),{formatListenAddr:_0x334410}=requireOkdbHttp(),_0x1b599a=_0x334410(_0x378286[_0xc26a72(0x2f5)],_0x378286[_0xc26a72(0x5b1)]?.['host']),_0xd1c672=_0x42d57f({'workers':_0x4a4388,'makeOkdb':_0xe725df,'port':_0x378286['port'],'primaryOkdb':_0x16df4f,'workerRole':_0x65e5fe,'listenAddr':_0x1b599a});let _0x1ceb92=![];async function _0x304e64(_0x5270d3){const _0x3d07ab=_0xc26a72;_0x1ceb92&&(process[_0x3d07ab(0x602)][_0x3d07ab(0x598)]('\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a'),process[_0x3d07ab(0x282)](0x82));_0x1ceb92=!![],process[_0x3d07ab(0x602)]['write']('\x0a[okdb]\x20received\x20'+(_0x5270d3||_0x3d07ab(0x62f))+_0x3d07ab(0x4a1));const _0x428506=setTimeout(()=>{const _0x291703=_0x3d07ab;process[_0x291703(0x602)][_0x291703(0x598)]('[okdb]\x20shutdown\x20drain\x20exceeded\x203000ms\x20—\x20hard-exiting\x0a'),process[_0x291703(0x282)](0x0);},0xbb8);_0x428506[_0x3d07ab(0x334)]?.();try{await _0xd1c672[_0x3d07ab(0x3fb)]();}catch(_0x570c94){process['stderr'][_0x3d07ab(0x598)]('[okdb]\x20cluster\x20close\x20error:\x20'+(_0x570c94?.[_0x3d07ab(0x63f)]??_0x570c94)+'\x0a');}try{await _0x16df4f[_0x3d07ab(0x3fb)]();}catch(_0x5d4b0e){process['stderr']['write']('[okdb]\x20primary\x20okdb\x20close\x20error:\x20'+(_0x5d4b0e?.['message']??_0x5d4b0e)+'\x0a');}process['exit'](0x0);}_0x378286[_0xc26a72(0x74d)]=_0x4a4388;if(!_0x378286[_0xc26a72(0x6b0)]){_0x16df4f[_0xc26a72(0x2fd)][_0xc26a72(0x5b4)]?.(),_0x507100(_0x16df4f['auth']?.[_0xc26a72(0x47a)]?.()??[]),await _0x12b770(_0x16df4f,_0x378286);return;}process['stdout'][_0xc26a72(0x598)]('[okdb]\x20cluster\x20supervisor\x20pid='+process[_0xc26a72(0x3ca)]+'\x20(passive),\x20'+_0x4a4388+'\x20'+(_0xc26a72(0x1e2)+_0x378286['port']+'\x0a')),console[_0xc26a72(0x2fd)](''),console[_0xc26a72(0x2fd)]('\x20\x20✓\x20OKDB\x20cluster\x20running'),console[_0xc26a72(0x2fd)](_0xc26a72(0x5d1)+_0x378286[_0xc26a72(0x2f5)]+_0xc26a72(0x685)+_0x4a4388+_0xc26a72(0x4ca)),console['log'](_0xc26a72(0x5d7)+_0x54d7ae),console['log'](_0xc26a72(0x19d)+_0x16df4f['id']),console[_0xc26a72(0x2fd)](_0xc26a72(0x459)+_0x378286[_0xc26a72(0x2f5)]+'/api');!_0x378286[_0xc26a72(0x3da)]&&console[_0xc26a72(0x2fd)](_0xc26a72(0x676)+_0x378286[_0xc26a72(0x2f5)]+'/admin/index.html');console[_0xc26a72(0x2fd)](''),_0x507100(_0x16df4f[_0xc26a72(0x61d)]?.[_0xc26a72(0x47a)]?.()??[]),process['on'](_0xc26a72(0x779),()=>_0x304e64(_0xc26a72(0x779))),process['on'](_0xc26a72(0x320),()=>_0x304e64('SIGTERM')),process['on']('SIGBREAK',()=>_0x304e64(_0xc26a72(0x441)));return;}const _0x233080=new _0xc83d18(_0x54d7ae,_0x4e5a52);_0x233080[_0xc26a72(0x2fd)][_0xc26a72(0x5b4)]?.();const _0x55db06=_0x233080[_0xc26a72(0x2fd)][_0xc26a72(0xbf)](_0xdc92e5=>_0x3a0a1c(_0xdc92e5,_0x378286[_0xc26a72(0x367)]));if(_0x378286['noRepl'])process[_0xc26a72(0x6be)][_0xc26a72(0x598)](_0xc26a72(0x117));await _0x233080[_0xc26a72(0x462)]();if(_0x378286[_0xc26a72(0x6b0)])process['stdout'][_0xc26a72(0x598)](_0xc26a72(0x3f6));try{await _0x4799b8(_0x233080,_0x378286[_0xc26a72(0x2f5)],_0x8c067b(_0x378286));}catch(_0x29b60c){_0x29b60c[_0xc26a72(0x737)]==='EADDRINUSE'&&(console['error'](_0xc26a72(0x2a1)+_0x378286[_0xc26a72(0x2f5)]+_0xc26a72(0x742)),process[_0xc26a72(0x282)](0x1));throw _0x29b60c;}if(_0x378286[_0xc26a72(0x6b0)]){const _0x316ac9=_0x378286['http']?.[_0xc26a72(0x368)]!==undefined?[]['concat'](_0x378286[_0xc26a72(0x5b1)]['host'])[_0xc26a72(0x4d3)](',\x20')+'\x20':'';process['stdout'][_0xc26a72(0x598)](_0xc26a72(0x761)+_0x316ac9+':'+_0x378286[_0xc26a72(0x2f5)]+'\x0a');}if(!_0x378286[_0xc26a72(0x6b0)])_0x233080[_0xc26a72(0x2fd)][_0xc26a72(0x5b4)]?.(),_0x55db06?.(),_0x507100(_0x233080['auth']?.[_0xc26a72(0x47a)]?.()??[]),await _0x12b770(_0x233080,_0x378286);else{const _0x1c54ff=_0x343fd7[_0xc26a72(0x4d3)](_0x54d7ae,_0xc26a72(0x5a2));try{_0x3b4cf6[_0xc26a72(0x789)](_0x1c54ff,String(process['pid']));}catch{}const _0x19c7a0=Date['now']()-_0x41e293;console[_0xc26a72(0x2fd)](''),console[_0xc26a72(0x2fd)](_0xc26a72(0x5b0)),console[_0xc26a72(0x2fd)](_0xc26a72(0x7ca)+_0x378286[_0xc26a72(0x2f5)]),console[_0xc26a72(0x2fd)](_0xc26a72(0x545)+_0x54d7ae),console[_0xc26a72(0x2fd)](_0xc26a72(0x16d)+_0x233080['id']);{const _0x471ab3=_0x233080[_0xc26a72(0x66b)]?.['db']?.[_0xc26a72(0x404)]?.(_0xc26a72(0x41b))??0x0,_0x14e7e0=[..._0x233080[_0xc26a72(0x3ae)][_0xc26a72(0x157)]()]['filter'](_0x431e7d=>!_0x431e7d[_0xc26a72(0x74f)]('~'))[_0xc26a72(0x275)];if(_0x233080[_0xc26a72(0x50e)]?.['active']?.[_0xc26a72(0x636)]===0x1){const _0x50a8bf=Math['ceil']((_0x233080[_0xc26a72(0x50e)]['active'][_0xc26a72(0x15f)]-Date[_0xc26a72(0x2f4)]())/0x5265c00);console[_0xc26a72(0x2fd)]('\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20'+_0x233080[_0xc26a72(0x50e)][_0xc26a72(0x1e5)][_0xc26a72(0x48a)]+_0xc26a72(0x336)+_0x50a8bf+_0xc26a72(0x169));}else{if(_0x233080[_0xc26a72(0x50e)]?.[_0xc26a72(0x1e5)]){const _0x380645=_0x233080[_0xc26a72(0x50e)][_0xc26a72(0x1e5)];console[_0xc26a72(0x2fd)](_0xc26a72(0x2eb)+_0x380645[_0xc26a72(0x48a)]+_0xc26a72(0x13b)+new Date(_0x380645[_0xc26a72(0x15f)])['toISOString']()['slice'](0x0,0xa)+')');const _0x58189b=_0x380645[_0xc26a72(0x76d)]||{};if(_0x58189b['maxWrites']){const _0x2e1904=Math['round'](_0x471ab3/_0x58189b['maxWrites']*0x64);console[_0xc26a72(0x2fd)](_0xc26a72(0x136)+_0x471ab3[_0xc26a72(0x505)]()+_0xc26a72(0x68f)+_0x58189b[_0xc26a72(0x1a4)]['toLocaleString']()+_0xc26a72(0x705)+_0x2e1904+_0xc26a72(0x628)+_0x14e7e0+(_0x58189b[_0xc26a72(0x51a)]?'/'+_0x58189b[_0xc26a72(0x51a)]:'')+_0xc26a72(0x172)+(_0x14e7e0===0x1?'':'s'));}}else{if(_0x233080[_0xc26a72(0x50e)]){const _0x5a1ce4=_0x233080[_0xc26a72(0x50e)][_0xc26a72(0x4c4)](),_0x2087ea=_0x5a1ce4[_0xc26a72(0x275)]?_0x5a1ce4[_0xc26a72(0x341)](_0xc57334=>_0xc57334[_0xc26a72(0x1a3)])[_0xc26a72(0x4d3)](',\x20'):'(add\x20a\x20license\x20first)',_0xcb6f8d=_0x233080[_0xc26a72(0x50e)][_0xc26a72(0x620)],_0x441a10=_0xcb6f8d[_0xc26a72(0x76d)][_0xc26a72(0x1a4)]?Math[_0xc26a72(0x613)](_0x471ab3/_0xcb6f8d[_0xc26a72(0x76d)]['maxWrites']*0x64):0x0;console['log'](_0xc26a72(0x75a)),console[_0xc26a72(0x2fd)]('\x20\x20\x20\x20usage:\x20\x20\x20'+_0x471ab3[_0xc26a72(0x505)]()+'\x20/\x20'+_0xcb6f8d[_0xc26a72(0x76d)][_0xc26a72(0x1a4)][_0xc26a72(0x505)]()+_0xc26a72(0x705)+_0x441a10+_0xc26a72(0x628)+_0x14e7e0+'\x20/\x20'+_0xcb6f8d['limits'][_0xc26a72(0x51a)]+_0xc26a72(0x1d5)),console[_0xc26a72(0x2fd)](_0xc26a72(0x127)+_0x2087ea);}}}}console[_0xc26a72(0x2fd)](_0xc26a72(0x5d2)+_0x378286[_0xc26a72(0x2f5)]+'/api');!_0x378286['noAdmin']&&console[_0xc26a72(0x2fd)]('\x20\x20\x20\x20admin:\x20http://localhost:'+_0x378286[_0xc26a72(0x2f5)]+_0xc26a72(0x29e));console[_0xc26a72(0x2fd)](''),console[_0xc26a72(0x2fd)](_0xc26a72(0x36d)+_0x19c7a0+'ms'),_0x507100(_0x233080[_0xc26a72(0x61d)]?.[_0xc26a72(0x47a)]?.()??[]);let _0x3d369c=![];async function _0x5a205c(_0x28d9e7){const _0x10eb3d=_0xc26a72;_0x3d369c&&(process[_0x10eb3d(0x602)]['write'](_0x10eb3d(0x70a)),process[_0x10eb3d(0x282)](0x82));_0x3d369c=!![],process[_0x10eb3d(0x602)]['write'](_0x10eb3d(0x214)+(_0x28d9e7||_0x10eb3d(0x62f))+',\x20closing…\x0a');const _0x329682=setTimeout(()=>{const _0x4a5fe9=_0x10eb3d;process[_0x4a5fe9(0x602)][_0x4a5fe9(0x598)]('[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a'),process[_0x4a5fe9(0x282)](0x1);},0x1388);try{_0x3b4cf6['unlinkSync'](_0x1c54ff);}catch{}try{await _0x233080['close']();}catch(_0x35c63f){process['stderr'][_0x10eb3d(0x598)](_0x10eb3d(0xfe)+(_0x35c63f?.[_0x10eb3d(0x63f)]??_0x35c63f)+'\x0a');}clearTimeout(_0x329682),process[_0x10eb3d(0x602)][_0x10eb3d(0x598)](_0x10eb3d(0x36c)),process[_0x10eb3d(0x282)](0x0);}process['on']('SIGINT',()=>_0x5a205c(_0xc26a72(0x779))),process['on'](_0xc26a72(0x320),()=>_0x5a205c(_0xc26a72(0x320))),process['on'](_0xc26a72(0x441),()=>_0x5a205c(_0xc26a72(0x441)));}}const _0x55fcac=new Set([_0x37648b(0x7be),_0x37648b(0x1f4),_0x37648b(0x5bd),_0x37648b(0x5f5),'restore',_0x37648b(0x234),'import',_0x37648b(0x65e),_0x37648b(0x6b2),_0x37648b(0x4d3),_0x37648b(0x7cd)]),_0x7e2a16=process['argv'][0x2];if(_0x7e2a16===_0x37648b(0x7be))console['log'](require$$3['version']),process[_0x37648b(0x282)](0x0);else{if(_0x7e2a16===_0x37648b(0x15a))process[_0x37648b(0x282)](requireOkdbShmGc()[_0x37648b(0x511)](process[_0x37648b(0x283)][_0x37648b(0x3a9)](0x3)));else{if(_0x7e2a16&&_0x55fcac[_0x37648b(0x7b1)](_0x7e2a16)){const _0x51560b=process['argv']['slice'](0x3),_0xc3d588=_0x4051da([_0x37648b(0x4d8),_0x37648b(0x554),..._0x51560b]),_0x3b8702=_0x103a6b(_0xc3d588),_0x2ed180=new Set([_0x37648b(0x3c5),'-d','--key','-k',_0x37648b(0xfb),'-c',_0x37648b(0x15b),'-p',_0x37648b(0x1f3),_0x37648b(0x2ad),'-e','--types',_0x37648b(0x618),_0x37648b(0x2cd),_0x37648b(0x729),_0x37648b(0x4d4),_0x37648b(0xd5),_0x37648b(0x75e),'--token',_0x37648b(0x71d),'-u','--address']);let _0x77effd=null;for(let _0x499cc1=0x0;_0x499cc1<_0x51560b[_0x37648b(0x275)];_0x499cc1++){if(_0x2ed180['has'](_0x51560b[_0x499cc1])){_0x499cc1++;continue;}if(!_0x51560b[_0x499cc1][_0x37648b(0x74f)]('-')){_0x77effd=_0x51560b[_0x499cc1];break;}}(async()=>{const _0x2b451e=_0x37648b;if(_0x7e2a16===_0x2b451e(0x6b2)){const _0x1c0e2b=process[_0x2b451e(0x283)][0x3],_0x2d6f71=process[_0x2b451e(0x283)]['slice'](0x4),_0x5b0665=_0x4051da([_0x2b451e(0x4d8),_0x2b451e(0x554),..._0x2d6f71]),_0x241b5b=_0x103a6b(_0x5b0665),_0x564496=new Set([_0x2b451e(0x3c5),'-d',_0x2b451e(0x574),'-k',_0x2b451e(0xfb),'-c',_0x2b451e(0x15b),'-p',_0x2b451e(0x618),'--password','--label',_0x2b451e(0x4d4),'--grants',_0x2b451e(0x75e),_0x2b451e(0x1f3),_0x2b451e(0x2ad),'-e','--types']),_0x584f7f=[];for(let _0x372253=0x0;_0x372253<_0x2d6f71[_0x2b451e(0x275)];_0x372253++){if(_0x564496[_0x2b451e(0x7b1)](_0x2d6f71[_0x372253])){_0x372253++;continue;}if(_0x2d6f71[_0x372253][_0x2b451e(0x74f)]('-'))continue;_0x584f7f[_0x2b451e(0x1c7)](_0x2d6f71[_0x372253]);}switch(_0x1c0e2b){case _0x2b451e(0x6ab):await _0x4bb2db(_0x241b5b,_0x5b0665);break;case _0x2b451e(0x224):await _0x1cfcd0(_0x241b5b);break;case'revoke':await _0x428b20(_0x584f7f[0x0],_0x241b5b);break;default:console[_0x2b451e(0x131)]('[okdb]\x20unknown\x20token\x20action:\x20\x22'+_0x1c0e2b+_0x2b451e(0x6e3)),process[_0x2b451e(0x282)](0x1);}return;}if(_0x7e2a16==='license'){const _0x33d925=requireOkdbLicenseCodec(),_0x305119=process[_0x2b451e(0x283)]['slice'](0x3),_0x2196e5=_0x4051da([_0x2b451e(0x4d8),'okdb',..._0x305119]),_0xb7bdae=_0x103a6b(_0x2196e5),_0x137415=new Set([_0x2b451e(0x3c5),'-d','--key','-k',_0x2b451e(0xfb),'-c','--port','-p',_0x2b451e(0x1f3)]),_0x4f3dfc=[];for(let _0x34f119=0x0;_0x34f119<_0x305119[_0x2b451e(0x275)];_0x34f119++){if(_0x137415[_0x2b451e(0x7b1)](_0x305119[_0x34f119])){_0x34f119++;continue;}if(_0x305119[_0x34f119][_0x2b451e(0x74f)]('-'))continue;_0x4f3dfc['push'](_0x305119[_0x34f119]);}const _0x5d7b60=_0x4f3dfc[0x0]??null;if(_0x5d7b60===_0x2b451e(0x54d))await _0x477395(_0x4f3dfc[0x1],_0xb7bdae);else{if(!_0x5d7b60)await _0x120b8f(_0xb7bdae);else{let _0xa6bef6=_0x33d925[_0x2b451e(0x139)](_0x5d7b60);if(_0xa6bef6===_0x2b451e(0x11b)&&_0x3b4cf6['existsSync'](_0x5d7b60))_0xa6bef6='path';if(_0xa6bef6===_0x2b451e(0x272))try{const _0xc612b=_0x3b4cf6[_0x2b451e(0x1f5)](_0x5d7b60,_0x2b451e(0x253))[_0x2b451e(0x1c1)](),_0x542cbf=_0x33d925[_0x2b451e(0x139)](_0xc612b);if(_0x542cbf===_0x2b451e(0x365)){await _0x1fe548(_0xc612b,_0xb7bdae);return;}await _0x4d689b(_0x5d7b60,_0xb7bdae);return;}catch(_0x53f3f9){console[_0x2b451e(0x131)](_0x2b451e(0x53a)+_0x5d7b60+':\x20'+_0x53f3f9[_0x2b451e(0x63f)]),process[_0x2b451e(0x282)](0x1);}switch(_0xa6bef6){case _0x2b451e(0x328):await _0x4d689b(_0x5d7b60,_0xb7bdae);break;case'activation':await _0x1fe548(_0x5d7b60,_0xb7bdae);break;case _0x2b451e(0x624):await _0x85583a(_0x5d7b60,_0xb7bdae);break;default:console[_0x2b451e(0x131)]('[okdb]\x20error:\x20unrecognized\x20input:\x20\x22'+_0x5d7b60+'\x22'),console[_0x2b451e(0x131)](''),console[_0x2b451e(0x131)](_0x2b451e(0x18f)),console[_0x2b451e(0x131)]('\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)'),console[_0x2b451e(0x131)](_0x2b451e(0x195)),console['error'](_0x2b451e(0x4ce)),console[_0x2b451e(0x131)](_0x2b451e(0x1f0)),console[_0x2b451e(0x131)](''),console[_0x2b451e(0x131)](_0x2b451e(0x7b0)),process[_0x2b451e(0x282)](0x1);}}}return;}switch(_0x7e2a16){case _0x2b451e(0x1f4):await _0x25d027(_0x3b8702);break;case _0x2b451e(0x5bd):await _0x3faa22();break;case _0x2b451e(0x65e):await _0x563e47(_0x3b8702);break;case'backup':await _0x40e319(_0x77effd??_0x343fd7[_0x2b451e(0x3c9)]('./okdb-backup'),_0x3b8702);break;case _0x2b451e(0x635):if(!_0x77effd)throw new Error(_0x2b451e(0x3d1));await _0x156e4f(_0x343fd7[_0x2b451e(0x3c9)](_0x77effd),_0x3b8702,_0xc3d588);break;case _0x2b451e(0x234):await _0x39a08b(_0x77effd??_0x343fd7[_0x2b451e(0x3c9)](_0x2b451e(0x226)),_0x3b8702,_0xc3d588);break;case'import':await _0xb5ecb2(_0x77effd??_0x343fd7[_0x2b451e(0x3c9)](_0x2b451e(0x226)),_0x3b8702,_0xc3d588);break;case _0x2b451e(0x4d3):await _0x4d3510(_0x77effd,_0x3b8702,_0xc3d588);break;}})()['then'](()=>process[_0x37648b(0x282)](0x0))[_0x37648b(0x40d)](_0x34bfb2=>{const _0x3f9429=_0x37648b;console[_0x3f9429(0x131)]('\x0a[okdb]\x20error:\x20'+(_0x34bfb2[_0x3f9429(0x63f)]||_0x34bfb2)+'\x0a'),process[_0x3f9429(0x282)](0x1);});}else _0x27a7af()[_0x37648b(0x40d)](_0x1e9a59=>{const _0x5168ca=_0x37648b;console['error']('\x0a[okdb]\x20fatal\x20error:'),console[_0x5168ca(0x131)](_0x1e9a59[_0x5168ca(0x37e)]||_0x1e9a59),process['exit'](0x1);});}}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module['exports']=okdb;
|