@kedem/okdb 2.6.4 → 2.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- 'use strict';const _0x4abb0e=_0x35c1;(function(_0x5649da,_0x4ba8a7){const _0x588597=_0x35c1,_0x4a10a8=_0x5649da();while(!![]){try{const _0x45528f=parseInt(_0x588597(0x129))/0x1*(-parseInt(_0x588597(0x179))/0x2)+parseInt(_0x588597(0x115))/0x3*(-parseInt(_0x588597(0x1e0))/0x4)+-parseInt(_0x588597(0x301))/0x5*(parseInt(_0x588597(0x208))/0x6)+parseInt(_0x588597(0x27a))/0x7*(parseInt(_0x588597(0x253))/0x8)+parseInt(_0x588597(0x30f))/0x9*(-parseInt(_0x588597(0x16a))/0xa)+parseInt(_0x588597(0x303))/0xb+parseInt(_0x588597(0x299))/0xc*(parseInt(_0x588597(0x2a7))/0xd);if(_0x45528f===_0x4ba8a7)break;else _0x4a10a8['push'](_0x4a10a8['shift']());}catch(_0x1f22dc){_0x4a10a8['push'](_0x4a10a8['shift']());}}}(_0xef45,0x2c15f));var require$$0$5=require('./okdb'),require$$1$1=require(_0x4abb0e(0x318)),require$$1=require(_0x4abb0e(0x1ba)),require$$0$3=require('os'),require$$2=require(_0x4abb0e(0xde)),require$$0=require(_0x4abb0e(0x1fa)),require$$0$2=require(_0x4abb0e(0x21e)),require$$0$1=require('fs'),require$$0$4=require(_0x4abb0e(0x2d9));function getDefaultExportFromCjs(_0x5842ce){const _0x12a13c=_0x4abb0e;return _0x5842ce&&_0x5842ce['__esModule']&&Object[_0x12a13c(0x148)][_0x12a13c(0x1c0)][_0x12a13c(0x16d)](_0x5842ce,_0x12a13c(0x1ea))?_0x5842ce[_0x12a13c(0x1ea)]:_0x5842ce;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x4743a7=_0x4abb0e;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x39ce37={'PUT':_0x4743a7(0x2f3),'REMOVE':_0x4743a7(0x24f),'INDEX_DROP':_0x4743a7(0x23e),'INDEX_REGISTER':_0x4743a7(0x26c),'INDEX_RESET':'resetIndex','TYPE_REGISTER':_0x4743a7(0x169),'TYPE_DROP':_0x4743a7(0x142),'FTS_REGISTER':'registerFts','FTS_DROP':_0x4743a7(0x168),'FTS_RESET':_0x4743a7(0x224),'SCHEMA_SET':_0x4743a7(0x22b),'SCHEMA_DROP':_0x4743a7(0x1db),'TTL_SET':_0x4743a7(0x31f),'TTL_CLEAR':_0x4743a7(0x193)},_0x467ffd={'SYSTEM_READY':'system:ready','FIELD_RESOLVER_REGISTERED':_0x4743a7(0x26f),'SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':_0x4743a7(0x17b),'SYSTEM_POKE':'system:poke','SYSTEM_DRAIN':'system:drain','SYSTEM_TYPE_DROP':_0x4743a7(0x18c),'SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x4743a7(0x291),'ITEM_CREATE':'item:create','ITEM_UPDATE':_0x4743a7(0x245),'ITEM_REMOVE':_0x4743a7(0x265),'ITEM_PENDING':_0x4743a7(0x285),'INDEX_RESET':_0x4743a7(0x1d5),'INDEX_READY':_0x4743a7(0x1f4),'INDEX_PROGRESS':_0x4743a7(0x10b),'VIEW_PROGRESS':_0x4743a7(0x1a9),'INDEX_DROP':_0x4743a7(0x295),'INDEX_REGISTERED':_0x4743a7(0x14c),'FTS_REGISTERED':_0x4743a7(0x240),'FTS_DROP':_0x4743a7(0x233),'FTS_RESET':_0x4743a7(0x161),'SCHEMA_SET':_0x4743a7(0xd3),'SCHEMA_DROP':_0x4743a7(0x2f2),'UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0x4743a7(0x1eb),'REF_VIOLATION':'ref:violation','REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x4743a7(0x1e8),'TXN_START':_0x4743a7(0x283),'TXN_END':_0x4743a7(0x147),'TXN_ROLLBACK':_0x4743a7(0x220),'TYPE_REGISTERED':_0x4743a7(0x29b),'TYPE_DROP':_0x4743a7(0x315),'ENV_OPENED':'env:opened','ENV_REMOVED':_0x4743a7(0xf6),'SYSTEM_ENV_RELEASE':_0x4743a7(0x324),'TTL_EXPIRED':_0x4743a7(0x2d6),'TTL_SET':_0x4743a7(0x2c8),'TTL_CLEAR':_0x4743a7(0x122),'LICENSE_INVALID':_0x4743a7(0x198),'LICENSE_ADDED':'license:added','LICENSE_ACTIVATED':_0x4743a7(0x197),'LICENSE_REMOVED':_0x4743a7(0xeb)},_0xff2100={'CREATING':_0x4743a7(0x131),'RESETTING':_0x4743a7(0xf0),'READY':_0x4743a7(0x20a),'DROPPING':_0x4743a7(0x1cd),'WAITING':_0x4743a7(0x25b),'ERROR':_0x4743a7(0x251)},_0x398344={'CREATED':_0x4743a7(0x2c6),'STARTING':'starting','STARTED':_0x4743a7(0x1be),'STOPPING':_0x4743a7(0x23b),'STOPPED':'stopped'},_0x15f6fa={'CREATING':_0x4743a7(0x131),'READY':_0x4743a7(0x20a),'HALTED':_0x4743a7(0x1ef),'STOPPED':_0x4743a7(0x2b4),'RESETTING':_0x4743a7(0xf0)},_0x5db9c6=Object['freeze']({'POKE':_0x4743a7(0x1a8),'DRAIN':_0x4743a7(0x219),'TYPE_DROP':_0x4743a7(0x109),'PROC':_0x4743a7(0x2d2),'ENV_RELEASE':'bus:env_release'});return okdbEnums={'BUS_EVENTS':_0x5db9c6,'CHANGE_ACTIONS':_0x39ce37,'EVENTS':_0x467ffd,'INDEX_STATE':_0xff2100,'OKDB_STATE':_0x398344,'VIEW_STATE':_0x15f6fa},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x3d6617=_0x4abb0e;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x3243f4,performance:_0x5cb50c}=require$$0,_0x37dd2a=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x3d6617(0xd9),_0x63f981=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x301299=process.env.OKDB_LOOP_LAG_ALL==='1',_0x44a947=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x192f3b{constructor(){const _0x3ad4f1=_0x3d6617;this[_0x3ad4f1(0x12a)]=_0x37dd2a,this[_0x3ad4f1(0x1c3)]=new Map(),this['_h']=null,this[_0x3ad4f1(0x27f)]=null,this[_0x3ad4f1(0x104)]=![],this['_log']=(_0x39841f,_0x46d9ef)=>process[_0x3ad4f1(0x1b0)][_0x3ad4f1(0x2d5)](_0x39841f+(_0x46d9ef?'\x20'+JSON['stringify'](_0x46d9ef):'')+'\x0a');}[_0x3d6617(0x19d)](){const _0xb8d2f8=_0x3d6617;return _0x5cb50c[_0xb8d2f8(0x19d)]();}[_0x3d6617(0x13e)](_0x1e0030){const _0x3c8430=_0x3d6617;if(typeof _0x1e0030===_0x3c8430(0x160))this[_0x3c8430(0xfe)]=_0x1e0030;}[_0x3d6617(0x1f8)](_0x571741,_0x1dab41,_0x3b26c6){const _0x2af603=_0x3d6617;if(!this[_0x2af603(0x12a)])return;let _0x6d1edc=this[_0x2af603(0x1c3)][_0x2af603(0x106)](_0x571741);!_0x6d1edc&&(_0x6d1edc={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x2af603(0x1c3)][_0x2af603(0x30d)](_0x571741,_0x6d1edc)),_0x6d1edc['ms']+=_0x1dab41,_0x6d1edc[_0x2af603(0x2ed)]+=0x1,_0x1dab41>_0x6d1edc[_0x2af603(0xfa)]&&(_0x6d1edc[_0x2af603(0xfa)]=_0x1dab41,_0x6d1edc[_0x2af603(0x20b)]=_0x3b26c6||'');}[_0x3d6617(0x2dc)](_0x3c408d){const _0x2a946d=_0x3d6617;if(!this[_0x2a946d(0x12a)]||this[_0x2a946d(0x104)])return;this['_started']=!![];if(_0x3c408d)this[_0x2a946d(0xfe)]=_0x3c408d;this['_h']=_0x3243f4({'resolution':0xa}),this['_h'][_0x2a946d(0x202)](),this[_0x2a946d(0x27f)]=setInterval(()=>this[_0x2a946d(0x2ef)](),_0x63f981);if(this[_0x2a946d(0x27f)][_0x2a946d(0x2a3)])this[_0x2a946d(0x27f)][_0x2a946d(0x2a3)]();}[_0x3d6617(0x101)](_0x265b69){const _0x5ef881=_0x3d6617;if(!this['_windowCbs'])this[_0x5ef881(0x123)]=new Set();this['_windowCbs']['add'](_0x265b69);if(!this[_0x5ef881(0x104)])this[_0x5ef881(0x1bf)]();}[_0x3d6617(0x2f9)](_0xe816){const _0x17d3b8=_0x3d6617;this[_0x17d3b8(0x123)]?.[_0x17d3b8(0x1a3)](_0xe816);}[_0x3d6617(0x1bf)](){const _0x1d50cc=_0x3d6617;if(this[_0x1d50cc(0x185)])return;this['_admissionStarted']=!![];!this['_h']&&(this['_h']=_0x3243f4({'resolution':0xa}),this['_h'][_0x1d50cc(0x202)]());const _0x12ba31=_0x63f981;this[_0x1d50cc(0x138)]=setInterval(()=>{const _0x442f4e=_0x1d50cc,_0x44bd89=this['_h'];if(!_0x44bd89)return;const _0xaa1257=_0x44bd89[_0x442f4e(0x1ec)](0x63)/0xf4240,_0x5d5ae7=_0x44bd89[_0x442f4e(0xf5)]/0xf4240,_0x308c3a=_0x44bd89['mean']/0xf4240;_0x44bd89[_0x442f4e(0x1d6)]();if(this[_0x442f4e(0x123)])for(const _0x2476e7 of this[_0x442f4e(0x123)]){try{_0x2476e7({'p99Ms':_0xaa1257,'maxMs':_0x5d5ae7,'meanMs':_0x308c3a,'reportMs':_0x12ba31});}catch{}}},_0x12ba31);if(this[_0x1d50cc(0x138)]['unref'])this[_0x1d50cc(0x138)][_0x1d50cc(0x2a3)]();}[_0x3d6617(0x2ef)](){const _0x3b097a=_0x3d6617,_0x593c0d=this['_h'],_0x1c9670=_0x593c0d[_0x3b097a(0xf5)]/0xf4240,_0x4ac3ad=_0x593c0d['percentile'](0x63)/0xf4240,_0x90aff8=_0x593c0d['mean']/0xf4240;_0x593c0d[_0x3b097a(0x1d6)]();const _0x746cf8=[...this[_0x3b097a(0x1c3)][_0x3b097a(0x2e8)]()][_0x3b097a(0x2fe)](([_0x545251,_0x5f1048])=>({'label':_0x545251,..._0x5f1048}))[_0x3b097a(0x2ee)]((_0x525f36,_0x44f663)=>_0x44f663['ms']-_0x525f36['ms'])[_0x3b097a(0x14e)](0x0,0x8);this[_0x3b097a(0x1c3)][_0x3b097a(0x1ee)]();const _0xa89825=_0x746cf8[_0x3b097a(0x272)]((_0x2d0380,_0x1f4163)=>_0x2d0380+_0x1f4163['ms'],0x0),_0x3bbd14=_0x746cf8['map'](_0x34a374=>_0x34a374[_0x3b097a(0x11d)]+'='+_0x34a374['ms'][_0x3b097a(0xf4)](0x0)+'ms/'+_0x34a374[_0x3b097a(0x2ed)]+(_0x34a374[_0x3b097a(0xfa)]>0x5?_0x3b097a(0x27c)+_0x34a374[_0x3b097a(0xfa)]['toFixed'](0x0)+'ms'+(_0x34a374[_0x3b097a(0x20b)]?'\x20'+_0x34a374[_0x3b097a(0x20b)]:'')+')':''));(_0x301299||_0x1c9670>=_0x44a947)&&this['_log'](_0x3b097a(0x2e9)+_0x63f981+_0x3b097a(0xfd)+_0x1c9670['toFixed'](0x0)+_0x3b097a(0x250)+_0x4ac3ad[_0x3b097a(0xf4)](0x0)+'ms\x20mean='+_0x90aff8[_0x3b097a(0xf4)](0x0)+'ms\x20busy='+_0xa89825[_0x3b097a(0xf4)](0x0)+'ms'+(_0x3bbd14[_0x3b097a(0x200)]?_0x3b097a(0x180)+_0x3bbd14[_0x3b097a(0xe8)]('\x20\x20'):''),{'feature':'loop-lag'});if(this[_0x3b097a(0x123)])for(const _0xbfca5e of this[_0x3b097a(0x123)]){try{_0xbfca5e({'p99Ms':_0x4ac3ad,'maxMs':_0x1c9670,'meanMs':_0x90aff8,'reportMs':_0x63f981});}catch{}}}[_0x3d6617(0xfb)](){const _0x53d472=_0x3d6617;if(this['_timer'])clearInterval(this[_0x53d472(0x27f)]);if(this['_h'])this['_h'][_0x53d472(0x273)]();this[_0x53d472(0x27f)]=null,this['_h']=null,this['_started']=![];}}const _0x1868c6=new _0x192f3b();if(_0x1868c6[_0x3d6617(0x12a)])_0x1868c6[_0x3d6617(0x2dc)]();return okdbLoopMonitor={'LOOP':_0x1868c6},okdbLoopMonitor;}var okdbTimers,hasRequiredOkdbTimers;function requireOkdbTimers(){if(hasRequiredOkdbTimers)return okdbTimers;hasRequiredOkdbTimers=0x1;const _0x49dbfe=0x2**0x1f-0x1;function _0x2e600b(_0x5894aa){if(!(_0x5894aa>0x0))return 0x0;return _0x5894aa>_0x49dbfe?_0x49dbfe:_0x5894aa;}function _0x1769c7(_0x3c34c9){return _0x3c34c9===Infinity;}return okdbTimers={'MAX_TIMER_DELAY':_0x49dbfe,'clampTimerDelay':_0x2e600b,'isNeverDelay':_0x1769c7},okdbTimers;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x2d9f14=require$$0$1,_0x487fc4=require$$1;let _0x28bd2c,_0x17824c,_0x376f72,_0x30d734,_0x27091a,_0x4878f6,_0x2f2066,_0x5493bb=![];const _0x1f9e81=new Set();let _0x2dcf7d=null;const _0x5b637b=new Map();function _0x2745b9(){const _0x332ef2=_0x35c1;if(_0x28bd2c!==undefined)return _0x28bd2c;_0x28bd2c=process.env.OKDB_DIAG==='1';if(!_0x28bd2c)return![];_0x17824c=process.env.OKDB_DIAG_STACK==='1',_0x30d734=Math[_0x332ef2(0xf5)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x376f72=new Array(_0x30d734),_0x27091a=0x0,_0x4878f6=0x0,_0x2f2066=process.env.OKDB_DIAG_DIR||null;if(_0x2f2066)try{_0x2d9f14[_0x332ef2(0x1d1)](_0x2f2066,{'recursive':!![]});}catch{}return!![];}function _0x4a29a8(){return _0x28bd2c===undefined?_0x2745b9():_0x28bd2c;}function _0x49b3de(_0x46af64,_0xdb1143){const _0xd75f74=_0x35c1;if(_0x28bd2c===undefined?!_0x2745b9():!_0x28bd2c)return;let _0x44fb32;if(_0x17824c){const _0x1e786c=new Error()['stack']||'';_0x44fb32=_0x1e786c[_0xd75f74(0x28c)]('\x0a')[_0xd75f74(0x14e)](0x3)[_0xd75f74(0x2fe)](_0x1e7542=>_0x1e7542['trim']())[_0xd75f74(0x2df)](Boolean)['slice'](0x0,0x8);}_0x376f72[_0x27091a]={'seq':_0x4878f6++,'t':Date[_0xd75f74(0x19d)](),'env':_0x46af64,'kind':_0xdb1143||_0xd75f74(0x158),'stack':_0x44fb32},_0x27091a=(_0x27091a+0x1)%_0x30d734;}function _0xaab843(_0x51ecc5){const _0x35143e=_0x35c1,_0x261858=[];for(let _0x4c6e6b=0x0;_0x4c6e6b<_0x30d734;_0x4c6e6b++){const _0x162776=_0x376f72[(_0x27091a-0x1-_0x4c6e6b+_0x30d734*0x2)%_0x30d734];if(!_0x162776)continue;_0x261858[_0x35143e(0x2a4)](_0x162776);if(_0x261858[_0x35143e(0x200)]>=_0x51ecc5)break;}return _0x261858;}function _0x283f2c(_0x34b10d){const _0x414d7=_0x35c1;try{process[_0x414d7(0x1b0)]['write'](_0x34b10d+'\x0a');}catch{}if(_0x2f2066)try{_0x2d9f14[_0x414d7(0x2db)](_0x487fc4[_0x414d7(0xe8)](_0x2f2066,_0x414d7(0x146)+process[_0x414d7(0x268)]+_0x414d7(0x187)),_0x34b10d+'\x0a');}catch{}}function _0xa405f7(_0x46b448){const _0x16a621=_0x35c1,_0x3b2537=_0xaab843(_0x46b448);if(!_0x3b2537[_0x16a621(0x200)])return _0x16a621(0x27b);const _0x525f85=Date['now']();return _0x3b2537['map'](_0x313b4d=>{const _0x5b4b6c=_0x16a621,_0x38d3d8=_0x5b4b6c(0x1f9)+_0x313b4d[_0x5b4b6c(0x2d7)]+'\x20-'+(_0x525f85-_0x313b4d['t'])+_0x5b4b6c(0x192)+_0x313b4d['env']+'\x20'+_0x313b4d[_0x5b4b6c(0x25c)];return _0x313b4d[_0x5b4b6c(0x211)]&&_0x313b4d[_0x5b4b6c(0x211)]['length']?_0x38d3d8+_0x5b4b6c(0x321)+_0x313b4d[_0x5b4b6c(0x211)][_0x5b4b6c(0xe8)](_0x5b4b6c(0x321)):_0x38d3d8;})[_0x16a621(0xe8)]('\x0a');}function _0x467ce6(_0x1e90fd,_0x1c0b89){const _0x370b69=_0x35c1,_0x4b70e0=_0x370b69(0x1c5)+_0x1e90fd+_0x370b69(0x1c4)+new Date()[_0x370b69(0x229)]()+_0x370b69(0x12e)+process['pid']+_0x370b69(0x2e0),_0x1953ff=[_0x4b70e0,_0x370b69(0x2ec)+(_0x1c0b89&&_0x1c0b89[_0x370b69(0x211)]?_0x1c0b89[_0x370b69(0x211)][_0x370b69(0x28c)]('\x0a')[0x0]:_0x1c0b89),_0x370b69(0x205)+(_0x17824c?'':_0x370b69(0x177))+':',_0xa405f7(0x18),_0x48c430(),'='[_0x370b69(0x270)](_0x4b70e0[_0x370b69(0x200)]-0x1)];_0x283f2c(_0x1953ff[_0x370b69(0xe8)]('\x0a'));}function _0x55534b(_0x58be36){const _0x3fffe9=_0x35c1;if(!_0x4a29a8())return;const _0x4b59e2=String(_0x58be36&&_0x58be36[_0x3fffe9(0x110)]||_0x58be36||''),_0x40294b=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x3fffe9(0x1d0)](_0x4b59e2);_0x467ce6(_0x40294b?_0x3fffe9(0x24c):'uncaughtException',_0x58be36);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x40294b)return;try{console['error'](_0x58be36&&_0x58be36[_0x3fffe9(0x211)]?_0x58be36['stack']:_0x58be36);}catch{}process[_0x3fffe9(0xe4)](0x1);}function _0x28d69e(_0x1daa31){const _0x25324c=_0x35c1;if(!_0x4a29a8())return;const _0x460575=String(_0x1daa31&&_0x1daa31[_0x25324c(0x110)]||_0x1daa31||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x25324c(0x1d0)](_0x460575)&&_0x467ce6('ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)',_0x1daa31);}function _0x48c430(){const _0x42a044=_0x35c1,_0x3edc68=[_0x42a044(0x2c3)];let _0x3523c7=![];for(const _0x38b2b6 of _0x1f9e81){const _0x4efa20=_0x38b2b6&&_0x38b2b6[_0x42a044(0xd4)];if(!_0x4efa20)continue;for(const [_0x515907,_0x5dba1d]of _0x4efa20){const _0x763ec4=_0x5dba1d&&_0x5dba1d[_0x42a044(0x190)]&&_0x5dba1d['_coordinator'][_0x42a044(0x170)];if(!_0x763ec4)continue;let _0x46519b,_0x11f57d;try{_0x46519b=Atomics[_0x42a044(0x145)](_0x763ec4,0x0),_0x11f57d=Atomics[_0x42a044(0x145)](_0x763ec4,0x1);}catch{continue;}if(_0x46519b===0x0)continue;_0x3523c7=!![];const _0x6ba0a1=_0x46519b>0x0?_0x42a044(0x2d0):_0x42a044(0xce),_0x5ee0fa=Date[_0x42a044(0x19d)]()-Math[_0x42a044(0x196)](_0x46519b)*0x3e8,_0x142cee=((()=>{const _0xc4a3df=_0x42a044;try{return _0x5dba1d[_0xc4a3df(0x1d2)]&&_0x5dba1d[_0xc4a3df(0x1d2)][_0xc4a3df(0xdd)]?_0x5dba1d[_0xc4a3df(0x1d2)][_0xc4a3df(0xdd)]():null;}catch{return null;}})());_0x3edc68[_0x42a044(0x2a4)]('\x20\x20env='+_0x515907+_0x42a044(0x247)+_0x6ba0a1+_0x42a044(0x17f)+_0x5ee0fa+_0x42a044(0x1ed)+_0x11f57d+(_0x142cee?_0x42a044(0x244)+_0x142cee[_0x42a044(0x165)]+_0x42a044(0x2e5)+_0x142cee['oldestPendingMs']+_0x42a044(0x2cb)+_0x142cee['parkedNow']+'}':''));}}if(!_0x3523c7)_0x3edc68[_0x42a044(0x2a4)]('\x20\x20(no\x20env\x20draining)');return _0x3edc68[_0x42a044(0xe8)]('\x0a');}function _0x91726c(){const _0x461c32=_0x35c1;if(!_0x4a29a8())return;const _0xd8afe3=Math[_0x461c32(0xf5)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x3992fb=Date[_0x461c32(0x19d)]();for(const _0x20b7c9 of _0x1f9e81){const _0x290272=_0x20b7c9&&_0x20b7c9['_envs'];if(!_0x290272)continue;for(const [_0x23d777,_0x3c46da]of _0x290272){const _0x17c351=_0x3c46da&&_0x3c46da[_0x461c32(0x190)]&&_0x3c46da['_coordinator']['view'];if(!_0x17c351)continue;let _0x107922;try{_0x107922=Atomics['load'](_0x17c351,0x0);}catch{continue;}const _0x3d58aa=_0x20b7c9[_0x461c32(0x1ba)]+'|'+_0x23d777;if(_0x107922<=0x0){_0x5b637b['delete'](_0x3d58aa);continue;}const _0x4b8949=_0x3992fb-_0x107922*0x3e8,_0x2edac5=_0x5b637b['get'](_0x3d58aa);if(_0x4b8949<_0xd8afe3)continue;if(_0x2edac5&&_0x3992fb-_0x2edac5[_0x461c32(0x2f5)]<_0xd8afe3)continue;_0x5b637b[_0x461c32(0x30d)](_0x3d58aa,{'firstTs':_0x2edac5?_0x2edac5[_0x461c32(0x2cd)]:_0x107922,'dumpedAt':_0x3992fb});const _0x1a7d56=_0x461c32(0x199)+_0x4b8949+_0x461c32(0x2de)+_0x23d777+_0x461c32(0x1c4)+new Date()[_0x461c32(0x229)]()+_0x461c32(0x12e)+process['pid']+_0x461c32(0x2e0);_0x283f2c([_0x1a7d56,_0x48c430(),'='[_0x461c32(0x270)](_0x1a7d56[_0x461c32(0x200)]-0x1)]['join']('\x0a'));}}}function _0x4bccd6(){const _0x5c3e2e=_0x35c1;if(!_0x4a29a8()||_0x5493bb)return;_0x5493bb=!![],process[_0x5c3e2e(0x29a)](_0x5c3e2e(0x2dd),_0x55534b),process[_0x5c3e2e(0x29a)](_0x5c3e2e(0x11f),_0x28d69e);const _0x13c4dd=Math[_0x5c3e2e(0xf5)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x2dcf7d=setInterval(_0x91726c,_0x13c4dd);if(_0x2dcf7d['unref'])_0x2dcf7d[_0x5c3e2e(0x2a3)]();}function _0x5344b8(_0x5dac00){if(!_0x4a29a8()||!_0x5dac00)return;_0x1f9e81['add'](_0x5dac00),_0x4bccd6();}function _0x2e0805(_0x2db8e0){_0x1f9e81['delete'](_0x2db8e0);}function _0x244f38(){const _0xd4107d=_0x35c1;if(!_0x4a29a8())return{'enabled':![],'hint':_0xd4107d(0x103)};return{'enabled':!![],'stackCapture':!!_0x17824c,'recentWrites':_0xaab843(0x10),'drain':_0x48c430()};}return okdbDiag={'isEnabled':_0x4a29a8,'recordWrite':_0x49b3de,'installDiag':_0x4bccd6,'registerOkdb':_0x5344b8,'unregisterOkdb':_0x2e0805,'snapshot':_0x244f38},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x4531db=_0x4abb0e;if(hasRequiredOkdbWriter)return okdbWriter[_0x4531db(0x243)];hasRequiredOkdbWriter=0x1;const {performance:_0x1284c0}=require$$0$2,_0x5b3037=requireOkdbDiag(),_0x3ba61e=process.env.OKDB_COMMIT_MODE===_0x4531db(0x25e);class _0x1a1695{constructor(_0x2ef222){const _0x3f8ce4=_0x4531db;this[_0x3f8ce4(0xee)]=_0x2ef222,this['_inflight']=new Set(),this[_0x3f8ce4(0x274)]=new Map(),this[_0x3f8ce4(0x2e6)]=0x0,this['_durs']=[],this[_0x3f8ce4(0xe1)]=[],this[_0x3f8ce4(0x1bd)]=Math[_0x3f8ce4(0xf5)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x3f8ce4(0xf3)]=0x0,this[_0x3f8ce4(0xe6)]=[],this[_0x3f8ce4(0x271)]=0x0,this['_held']=null,this[_0x3f8ce4(0x2a5)]=0x0,this[_0x3f8ce4(0x278)]=0x0,this[_0x3f8ce4(0x316)]=![];}async[_0x4531db(0x1bc)](_0x4db5c0,_0x5ce9c9,{admitted:admitted=![]}={}){const _0x4a18f5=_0x4531db;if(_0x5b3037[_0x4a18f5(0x175)]())_0x5b3037['recordWrite'](this[_0x4a18f5(0xee)]?.[_0x4a18f5(0x19c)],_0x5ce9c9);if(this[_0x4a18f5(0x15c)]){const _0x50b21c=new Error(_0x4a18f5(0x29e));_0x50b21c[_0x4a18f5(0x28b)]=_0x4a18f5(0x1b3);throw _0x50b21c;}if(this['_highWater']>0x0){let _0x286696=![];while(this[_0x4a18f5(0xf3)]>=this[_0x4a18f5(0x1bd)]&&!this[_0x4a18f5(0x15c)]){!_0x286696&&(_0x286696=!![],this['_bpParkedTotal']++),await new Promise(_0x1cb489=>this[_0x4a18f5(0xe6)][_0x4a18f5(0x2a4)](_0x1cb489));}if(this[_0x4a18f5(0x15c)]){const _0x2ba8ed=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x2ba8ed[_0x4a18f5(0x28b)]=_0x4a18f5(0x1b3);throw _0x2ba8ed;}}this[_0x4a18f5(0xf3)]++;const _0x3d2c57=admitted?null:this[_0x4a18f5(0xee)][_0x4a18f5(0x190)];for(;;){while(this['_held'])await this['_held'];if(_0x3d2c57)try{await _0x3d2c57['beforeWrite']();}catch(_0x43d4b4){this[_0x4a18f5(0xf3)]--;if(this[_0x4a18f5(0xe6)][_0x4a18f5(0x200)]&&this['_outstanding']<this['_highWater'])this[_0x4a18f5(0xe6)]['shift']()();throw _0x43d4b4;}if(!this[_0x4a18f5(0x22e)])break;if(_0x3d2c57)_0x3d2c57['afterWrite']();}if(this[_0x4a18f5(0x15c)]){if(_0x3d2c57)_0x3d2c57[_0x4a18f5(0x107)]();this[_0x4a18f5(0xf3)]--;if(this[_0x4a18f5(0xe6)]['length']&&this[_0x4a18f5(0xf3)]<this[_0x4a18f5(0x1bd)])this[_0x4a18f5(0xe6)]['shift']()();const _0x3f4cc4=new Error(_0x4a18f5(0x29e));_0x3f4cc4[_0x4a18f5(0x28b)]=_0x4a18f5(0x1b3);throw _0x3f4cc4;}const _0x1369bb=_0x1284c0[_0x4a18f5(0x19d)]();if(_0x3ba61e)try{const _0x35f62d=this[_0x4a18f5(0xee)]['db']['transactionSync'](_0x4db5c0);this[_0x4a18f5(0x2e6)]++;if(this[_0x4a18f5(0x139)][_0x4a18f5(0x2a4)](_0x1284c0[_0x4a18f5(0x19d)]()-_0x1369bb)>0x100)this[_0x4a18f5(0x139)][_0x4a18f5(0x234)]();if(this[_0x4a18f5(0xe1)][_0x4a18f5(0x2a4)](_0x1284c0[_0x4a18f5(0x19d)]())>0x800)this[_0x4a18f5(0xe1)][_0x4a18f5(0x234)]();return _0x35f62d;}finally{this[_0x4a18f5(0xf3)]--;if(this[_0x4a18f5(0xe6)][_0x4a18f5(0x200)]&&this[_0x4a18f5(0xf3)]<this[_0x4a18f5(0x1bd)])this['_bpWaiters'][_0x4a18f5(0x234)]()();if(_0x3d2c57)_0x3d2c57[_0x4a18f5(0x107)]();}let _0x3a6268=null;const _0x1c28e6=()=>{const _0x5aca28=_0x4a18f5,_0x559a62=_0x4db5c0();if(_0x559a62&&typeof _0x559a62[_0x5aca28(0x2b2)]===_0x5aca28(0x160)&&!_0x3a6268){this[_0x5aca28(0x2a5)]++;let _0x18df42;const _0x380976=new Promise(_0x4b571d=>_0x18df42=_0x4b571d);this[_0x5aca28(0x22e)]=_0x380976,_0x3a6268=()=>{const _0x5780ce=_0x5aca28;if(this[_0x5780ce(0x22e)]===_0x380976)this['_held']=null;_0x18df42();};}return _0x559a62;};let _0x9012ea;try{_0x9012ea=this[_0x4a18f5(0xee)]['db'][_0x4a18f5(0x144)](_0x1c28e6);}catch(_0x352773){_0x9012ea=Promise[_0x4a18f5(0x2d3)](_0x352773);}(!_0x9012ea||typeof _0x9012ea[_0x4a18f5(0x2b2)]!=='function')&&(this[_0x4a18f5(0x278)]++,!this['_nestedWarned']&&(this[_0x4a18f5(0x316)]=!![],console['warn']('okdb-writer['+(this['env']?.[_0x4a18f5(0x19c)]??'?')+_0x4a18f5(0x1fb))),_0x9012ea=Promise[_0x4a18f5(0x184)](_0x9012ea));const _0x293103=()=>{if(_0x3a6268)_0x3a6268();};_0x9012ea[_0x4a18f5(0x2b2)](_0x293103,_0x293103),this[_0x4a18f5(0x2ba)]['add'](_0x9012ea),this['_enqueuedAt'][_0x4a18f5(0x30d)](_0x9012ea,_0x1369bb);const _0x122ab6=()=>{const _0x4a9bc9=_0x4a18f5;this[_0x4a9bc9(0x2ba)][_0x4a9bc9(0x1a3)](_0x9012ea),this[_0x4a9bc9(0x274)][_0x4a9bc9(0x1a3)](_0x9012ea),this[_0x4a9bc9(0x2e6)]++,this['_outstanding']--;this['_bpWaiters']['length']&&this[_0x4a9bc9(0xf3)]<this[_0x4a9bc9(0x1bd)]&&this[_0x4a9bc9(0xe6)][_0x4a9bc9(0x234)]()();if(this['_durs'][_0x4a9bc9(0x2a4)](_0x1284c0[_0x4a9bc9(0x19d)]()-_0x1369bb)>0x100)this['_durs'][_0x4a9bc9(0x234)]();if(this[_0x4a9bc9(0xe1)][_0x4a9bc9(0x2a4)](_0x1284c0['now']())>0x800)this[_0x4a9bc9(0xe1)][_0x4a9bc9(0x234)]();};_0x9012ea[_0x4a18f5(0x2b2)](_0x122ab6,_0x122ab6);try{return await _0x9012ea;}finally{if(_0x3d2c57)_0x3d2c57[_0x4a18f5(0x107)]();}}[_0x4531db(0xdd)](){const _0x419a24=_0x4531db,_0x4ba879=_0x1284c0['now']();let _0x55a63d=0x0;for(const _0x594525 of this[_0x419a24(0x274)][_0x419a24(0x1ae)]()){const _0x1c62ff=_0x4ba879-_0x594525;if(_0x1c62ff>_0x55a63d)_0x55a63d=_0x1c62ff;}let _0x292606=0x0;for(let _0x56ff3a=this[_0x419a24(0xe1)]['length']-0x1;_0x56ff3a>=0x0;_0x56ff3a--){if(_0x4ba879-this[_0x419a24(0xe1)][_0x56ff3a]>0x3e8)break;_0x292606++;}let _0x445912=0x0;if(this[_0x419a24(0x139)][_0x419a24(0x200)]){const _0x168696=[...this[_0x419a24(0x139)]][_0x419a24(0x2ee)]((_0xc11235,_0x1e0a61)=>_0xc11235-_0x1e0a61);_0x445912=_0x168696[Math[_0x419a24(0x2a1)](_0x168696[_0x419a24(0x200)]-0x1,Math['floor'](_0x168696[_0x419a24(0x200)]*0.99))];}return{'depth':this[_0x419a24(0x2ba)][_0x419a24(0x2bd)],'oldestPendingMs':Math[_0x419a24(0x24b)](_0x55a63d),'committed':this[_0x419a24(0x2e6)],'commitsPerSec':_0x292606,'commitP99Ms':Math[_0x419a24(0x24b)](_0x445912),'parkedNow':this['_bpWaiters']['length'],'parkedTotal':this[_0x419a24(0x271)],'highWater':this[_0x419a24(0x1bd)]};}['inflightAgesMs'](){const _0x35b7ac=_0x4531db,_0x3b0747=_0x1284c0[_0x35b7ac(0x19d)]();return[...this[_0x35b7ac(0x274)][_0x35b7ac(0x1ae)]()][_0x35b7ac(0x2fe)](_0x1efd2a=>Math[_0x35b7ac(0x24b)](_0x3b0747-_0x1efd2a))['sort']((_0x1567c1,_0x1ce659)=>_0x1ce659-_0x1567c1);}[_0x4531db(0x15b)](){const _0x5305fa=_0x4531db;this[_0x5305fa(0x15c)]=!![];for(const _0x5a8560 of this[_0x5305fa(0xe6)][_0x5305fa(0x181)](0x0))_0x5a8560();}async['drain'](){const _0x25e83f=_0x4531db;let _0x5b5627=0x0;while(this[_0x25e83f(0x2ba)][_0x25e83f(0x2bd)]&&_0x5b5627++<0x3e8){await Promise[_0x25e83f(0x157)]([...this[_0x25e83f(0x2ba)]]);}}async[_0x4531db(0x2f3)](_0x2df6a0,_0x3f5713,_0xd5e79e,_0x23ede8){const _0x20d7ee=_0x4531db;return this[_0x20d7ee(0x1bc)](()=>{const _0x47e23a=_0x20d7ee;if(_0x23ede8===undefined)_0x2df6a0[_0x47e23a(0x27d)](_0x3f5713,_0xd5e79e);else _0x2df6a0[_0x47e23a(0x27d)](_0x3f5713,_0xd5e79e,_0x23ede8);},_0x20d7ee(0x1bb));}async[_0x4531db(0x24f)](_0x3f53c7,_0x530b5c){const _0x489d91=_0x4531db;return this['transaction'](()=>_0x3f53c7['removeSync'](_0x530b5c),_0x489d91(0x2f0));}}async function _0x35cb52(_0x56d2d6,_0xdb19bd){const _0x486325=_0x4531db;if(_0xdb19bd==null)_0xdb19bd=Math[_0x486325(0xf5)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x5a60d3=_0x56d2d6?.['flushed'];if(!_0x5a60d3||typeof _0x5a60d3[_0x486325(0x2b2)]!==_0x486325(0x160))return;await Promise[_0x486325(0x10d)]([Promise['resolve'](_0x5a60d3)[_0x486325(0x223)](()=>{}),new Promise(_0x24c8e9=>{const _0x57612a=_0x486325,_0x2713bc=setTimeout(_0x24c8e9,_0xdb19bd);if(_0x2713bc[_0x57612a(0x2a3)])_0x2713bc['unref']();})]);}catch{}}function _0x2b4571(_0xda1637){const _0x3b1d87=_0x4531db;if(_0x3ba61e)return Promise['resolve']();const _0x1b48a5=_0xda1637?.[_0x3b1d87(0x30a)];return _0x1b48a5&&typeof _0x1b48a5['then']===_0x3b1d87(0x160)?_0x1b48a5:Promise[_0x3b1d87(0x184)]();}const _0x1727ab=Math[_0x4531db(0xf5)](0x1,Math[_0x4531db(0x1f6)](Number(process.env.UV_THREADPOOL_SIZE))||0x4),_0x13b4c3=Math[_0x4531db(0xf5)](0x1,_0x1727ab-0x2);let _0x4a7d79=0x0;const _0x173719=[];async function _0x1b23d5(_0x4f63f1){const _0x5ee742=_0x4531db;if(_0x4a7d79<_0x13b4c3)_0x4a7d79++;else await new Promise(_0x58b790=>_0x173719['push'](_0x58b790));try{return await _0x4f63f1();}finally{const _0x1d44e9=_0x173719[_0x5ee742(0x234)]();if(_0x1d44e9)_0x1d44e9();else _0x4a7d79--;}}return okdbWriter[_0x4531db(0x243)]=_0x1a1695,okdbWriter['exports'][_0x4531db(0x248)]=_0x1b23d5,okdbWriter['exports'][_0x4531db(0x19b)]=_0x13b4c3,okdbWriter[_0x4531db(0x243)][_0x4531db(0xd7)]=_0x35cb52,okdbWriter[_0x4531db(0x243)][_0x4531db(0x30a)]=_0x2b4571,okdbWriter[_0x4531db(0x243)][_0x4531db(0x176)]=_0x3ba61e,okdbWriter[_0x4531db(0x243)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x25d430=_0x4abb0e;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x57e9e3=require$$0$3,{clampTimerDelay:_0xcb1adf}=requireOkdbTimers(),{SYNC_COMMITS:_0x206da3}=requireOkdbWriter(),_0x4de3c9=_0x25d430(0x249);class _0x277421{constructor(_0x2cda12,_0x379e5d,_0x312a14){const _0x3921fe=_0x25d430;this[_0x3921fe(0x1aa)]=_0x2cda12,this['_key']=_0x379e5d,this[_0x3921fe(0x221)]=_0x312a14,this[_0x3921fe(0x2fc)]=![],this[_0x3921fe(0xd2)]=null,this['_heartbeatInFlight']=null;}[_0x25d430(0x13f)](){const _0x34a5e3=_0x25d430;if(this[_0x34a5e3(0x2fc)])return![];try{const _0x2b5ce1=this[_0x34a5e3(0x1aa)][_0x34a5e3(0x121)]()[_0x34a5e3(0x106)](this[_0x34a5e3(0x2d4)]);if(!_0x2b5ce1||_0x2b5ce1[_0x34a5e3(0x117)]!==this[_0x34a5e3(0x221)])return![];const _0x58c556=_0x2b5ce1[_0x34a5e3(0x1b7)]??_0x2b5ce1[_0x34a5e3(0x117)];if(_0x58c556+_0x2b5ce1['ttlMs']<Date[_0x34a5e3(0x19d)]())return![];return!![];}catch{return!this[_0x34a5e3(0x2fc)];}}['holder'](){const _0x350c56=_0x25d430;if(this[_0x350c56(0x2fc)])return null;try{return this[_0x350c56(0x1aa)][_0x350c56(0x121)]()[_0x350c56(0x106)](this[_0x350c56(0x2d4)])??null;}catch{return null;}}async[_0x25d430(0x28a)](_0x269ca6){const _0x4619b2=_0x25d430;if(this[_0x4619b2(0x2fc)])return;try{if(this[_0x4619b2(0x1aa)][_0x4619b2(0x15c)]())return;const _0x563207=this[_0x4619b2(0x1aa)][_0x4619b2(0x121)]()[_0x4619b2(0x106)](this['_key']);if(!_0x563207||_0x563207[_0x4619b2(0x117)]!==this[_0x4619b2(0x221)])return;if(_0x206da3)this['_lock']['_db']()[_0x4619b2(0x27d)](this[_0x4619b2(0x2d4)],{..._0x563207,'ttlMs':_0x563207[_0x4619b2(0x2d1)]+_0x269ca6});else await this['_lock'][_0x4619b2(0x121)]()[_0x4619b2(0x2f3)](this[_0x4619b2(0x2d4)],{..._0x563207,'ttlMs':_0x563207[_0x4619b2(0x2d1)]+_0x269ca6});}catch{}}async[_0x25d430(0x2af)](){const _0x2a1edd=_0x25d430;if(this[_0x2a1edd(0x2fc)])return;if(this['_heartbeatInFlight'])try{await this[_0x2a1edd(0x287)];}catch{}clearInterval(this[_0x2a1edd(0xd2)]),this[_0x2a1edd(0xd2)]=null,this['_released']=!![];try{if(this[_0x2a1edd(0x1aa)][_0x2a1edd(0x15c)]())return;const _0x3d153b=this[_0x2a1edd(0x1aa)][_0x2a1edd(0x121)]()['get'](this[_0x2a1edd(0x2d4)]);if(_0x3d153b&&_0x3d153b[_0x2a1edd(0x117)]===this[_0x2a1edd(0x221)]){if(_0x206da3)this[_0x2a1edd(0x1aa)][_0x2a1edd(0x121)]()[_0x2a1edd(0x17a)](this['_key']);else await this[_0x2a1edd(0x1aa)]['_db']()[_0x2a1edd(0x24f)](this['_key']);}}catch{}}['_startHeartbeat'](_0x1f658e,_0xa98918){const _0x5edb43=_0x25d430,_0x214e7a=_0xcb1adf(_0xa98918??Math[_0x5edb43(0x1f6)](_0x1f658e/0x3));this[_0x5edb43(0xd2)]=setInterval(()=>{const _0x4fdc19=_0x5edb43;if(this[_0x4fdc19(0x2fc)])return;this[_0x4fdc19(0x287)]=((async()=>{const _0x37c5a4=_0x4fdc19;try{if(this['_lock']['_closed']())return;const _0x393ab8=this[_0x37c5a4(0x1aa)][_0x37c5a4(0x121)]()[_0x37c5a4(0x106)](this[_0x37c5a4(0x2d4)]);if(!_0x393ab8||_0x393ab8[_0x37c5a4(0x117)]!==this[_0x37c5a4(0x221)]){this[_0x37c5a4(0x2fc)]=!![],clearInterval(this[_0x37c5a4(0xd2)]),this['_heartbeatTimer']=null;return;}if(_0x206da3)this[_0x37c5a4(0x1aa)]['_db']()[_0x37c5a4(0x27d)](this[_0x37c5a4(0x2d4)],{..._0x393ab8,'updatedAt':Date[_0x37c5a4(0x19d)]()});else await this[_0x37c5a4(0x1aa)]['_db']()[_0x37c5a4(0x2f3)](this[_0x37c5a4(0x2d4)],{..._0x393ab8,'updatedAt':Date[_0x37c5a4(0x19d)]()});}catch{}this['_heartbeatInFlight']=null;})());},_0x214e7a);if(this[_0x5edb43(0xd2)][_0x5edb43(0x2a3)])this[_0x5edb43(0xd2)]['unref']();}}class _0x38412e{constructor(_0x4353c3,{namespace:_0x3d892a,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x575e47=_0x25d430;this[_0x575e47(0x30c)]=_0x4353c3,this[_0x575e47(0x112)]=_0x3d892a,this['ttlMs']=ttlMs,this[_0x575e47(0xd0)]=heartbeatMs,this['_lockDb']=null;}[_0x25d430(0x121)](){const _0x31d5a6=_0x25d430;return this[_0x31d5a6(0xf8)](),(!this[_0x31d5a6(0xf2)]||this[_0x31d5a6(0xe3)]!==this[_0x31d5a6(0x30c)])&&(this['_lockDb']=this[_0x31d5a6(0x30c)][_0x31d5a6(0xe5)](_0x4de3c9,{'dupSort':![]}),this[_0x31d5a6(0xe3)]=this['_rawDb']),this['_lockDb'];}[_0x25d430(0x29d)](){const _0x4c44a3=_0x25d430;return this[_0x4c44a3(0xf8)](),(!this['_wantDbHandle']||this[_0x4c44a3(0x288)]!==this['_rawDb'])&&(this['_wantDbHandle']=this[_0x4c44a3(0x30c)][_0x4c44a3(0xe5)](_0x4de3c9+_0x4c44a3(0x2ad),{'dupSort':![]}),this['_wantDbOf']=this[_0x4c44a3(0x30c)]),this[_0x4c44a3(0x19a)];}['_closed'](){const _0x10678a=_0x25d430,_0x1833fd=this['_rawDb']?.['status'];return _0x1833fd===_0x10678a(0x2e3)||_0x1833fd===_0x10678a(0x134);}[_0x25d430(0xf8)](){const _0x1e575a=_0x25d430;if(this[_0x1e575a(0x15c)]())throw new Error(_0x1e575a(0x296));}[_0x25d430(0x2d4)](_0x1c2264){const _0xb4c3d4=_0x25d430;return this[_0xb4c3d4(0x112)]+':'+_0x1c2264;}[_0x25d430(0x1c7)](_0x4aac6d){const _0xdd9540=_0x25d430;try{if(this[_0xdd9540(0x15c)]())return;_0x206da3?this[_0xdd9540(0x29d)]()[_0xdd9540(0x27d)](this[_0xdd9540(0x2d4)](_0x4aac6d),Date[_0xdd9540(0x19d)]()):this[_0xdd9540(0x29d)]()[_0xdd9540(0x2f3)](this[_0xdd9540(0x2d4)](_0x4aac6d),Date['now']())?.[_0xdd9540(0x223)]?.(()=>{});}catch{}}['isWanted'](_0x12eae0,_0x4ea224=0x3e8){const _0x327993=_0x25d430;try{const _0x4000ec=this[_0x327993(0x29d)]()[_0x327993(0x106)](this['_key'](_0x12eae0));return typeof _0x4000ec==='number'&&Date[_0x327993(0x19d)]()-_0x4000ec<_0x4ea224;}catch{return![];}}['_isStale'](_0x1bf109){const _0x136ac5=_0x25d430,_0x18fb58=_0x1bf109[_0x136ac5(0x1b7)]??_0x1bf109[_0x136ac5(0x117)];return _0x18fb58+_0x1bf109[_0x136ac5(0x2d1)]<Date[_0x136ac5(0x19d)]();}static[_0x25d430(0x28f)](_0x4fe0f7){const _0x22da8f=_0x25d430,_0x580022=_0x4fe0f7?.[_0x22da8f(0x167)];if(!_0x580022||typeof _0x580022[_0x22da8f(0x268)]!=='number')return![];if(_0x580022[_0x22da8f(0x306)]!==_0x57e9e3['hostname']())return![];if(_0x580022['pid']===process[_0x22da8f(0x268)])return![];try{return process['kill'](_0x580022[_0x22da8f(0x268)],0x0),![];}catch(_0x222411){return _0x222411[_0x22da8f(0x28b)]===_0x22da8f(0x15d);}}async[_0x25d430(0x13d)](_0x5b4afd,_0x38250d={},_0x370962={}){const _0x3350cf=_0x25d430,_0x36a27f=this[_0x3350cf(0x2d4)](_0x5b4afd),_0x2bba43=_0x370962[_0x3350cf(0x2d1)]??this[_0x3350cf(0x2d1)],_0x19fb5f=Date[_0x3350cf(0x19d)](),_0x5788c1={'holder':{'pid':process[_0x3350cf(0x268)],'hostname':_0x57e9e3[_0x3350cf(0x306)](),..._0x38250d},'acquiredAt':_0x19fb5f,'updatedAt':_0x19fb5f,'ttlMs':_0x2bba43};let _0x81350a=![],_0x1b9e54=null;if(this[_0x3350cf(0x15c)]())return{'acquired':![],'handle':null,'current':null};try{const _0x5aa7c3=()=>{const _0x531b1c=_0x3350cf,_0x59f81e=this['_db']()[_0x531b1c(0x106)](_0x36a27f);if(_0x59f81e&&!this[_0x531b1c(0xdf)](_0x59f81e)&&!_0x38412e[_0x531b1c(0x28f)](_0x59f81e)){const _0x4f0bb5=_0x38250d[_0x531b1c(0x2ff)]!=null&&_0x59f81e[_0x531b1c(0x167)][_0x531b1c(0x268)]===process[_0x531b1c(0x268)]&&_0x59f81e[_0x531b1c(0x167)][_0x531b1c(0x2ff)]===_0x38250d[_0x531b1c(0x2ff)];if(!_0x4f0bb5){_0x81350a=![],_0x1b9e54=_0x59f81e;return;}_0x5788c1[_0x531b1c(0x117)]<=_0x59f81e[_0x531b1c(0x117)]&&(_0x5788c1[_0x531b1c(0x117)]=_0x59f81e[_0x531b1c(0x117)]+0x1,_0x5788c1['updatedAt']=_0x5788c1[_0x531b1c(0x117)]);}this[_0x531b1c(0x121)]()['put'](_0x36a27f,_0x5788c1),_0x81350a=!![],_0x1b9e54=_0x5788c1;};if(_0x206da3)this[_0x3350cf(0x121)]()[_0x3350cf(0x1f7)](_0x5aa7c3);else await this['_db']()[_0x3350cf(0x144)](_0x5aa7c3);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x81350a)return{'acquired':![],'handle':null,'current':_0x1b9e54};const _0x2cd05f=new _0x277421(this,_0x36a27f,_0x5788c1['acquiredAt']);return _0x2cd05f['_startHeartbeat'](_0x2bba43,this[_0x3350cf(0xd0)]),{'acquired':!![],'handle':_0x2cd05f,'current':_0x1b9e54};}['inspect'](_0x2769fc){const _0x27a5e8=_0x25d430;try{return this[_0x27a5e8(0x121)]()['get'](this['_key'](_0x2769fc))??null;}catch{return null;}}[_0x25d430(0x2cf)](){const _0x44435e=_0x25d430,_0x37e2d6=this[_0x44435e(0x112)]+':',_0x2dacac=[];try{for(const {key:_0x1e1c12,value:_0x39938d}of this[_0x44435e(0x121)]()[_0x44435e(0xe7)]({'start':_0x37e2d6,'end':_0x37e2d6+'\xff'})){typeof _0x1e1c12===_0x44435e(0x2c5)&&_0x1e1c12['startsWith'](_0x37e2d6)&&_0x2dacac[_0x44435e(0x2a4)]({'id':_0x1e1c12['slice'](_0x37e2d6['length']),'entry':_0x39938d});}}catch{}return _0x2dacac;}static[_0x25d430(0x11a)](_0x5aa4c4){const _0x4631f7=_0x25d430,_0x233884=[];try{const _0x2b117f=_0x5aa4c4['openDB'](_0x4de3c9,{'dupSort':![]});for(const {key:_0x10912e,value:_0x574b26}of _0x2b117f[_0x4631f7(0xe7)]({})){if(typeof _0x10912e!==_0x4631f7(0x2c5))continue;const _0x4e7ebe=_0x10912e[_0x4631f7(0x2f8)](':');if(_0x4e7ebe<0x1)continue;_0x233884[_0x4631f7(0x2a4)]({'namespace':_0x10912e[_0x4631f7(0x14e)](0x0,_0x4e7ebe),'id':_0x10912e['slice'](_0x4e7ebe+0x1),'entry':_0x574b26});}}catch{}return _0x233884;}}return okdbLock={'OKDBLock':_0x38412e},okdbLock;}var version=_0x4abb0e(0x311),require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function _0x35c1(_0x50307b,_0x2addc6){_0x50307b=_0x50307b-0xcd;const _0xef4537=_0xef45();let _0x35c1d2=_0xef4537[_0x50307b];return _0x35c1d2;}function requireOkdbProcessRegistry(){const _0x74ed62=_0x4abb0e;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x440a57=require$$0$3,_0x45598d=require$$1$1,_0x4717b4=require$$2,{LOOP:_0x309375}=requireOkdbLoopMonitor(),{OKDBLock:_0x564a3e}=requireOkdbLock(),{SYNC_COMMITS:_0x482b9f}=requireOkdbWriter(),_0x4c0b96=_0x74ed62(0x294),_0x4523cc='node',_0x5794e4=_0x74ed62(0x28d),_0x3d77f9=_0x74ed62(0x31c),_0x4b7a3f=(_0x34c57a,_0x5a4ad2)=>_0x34c57a+':'+_0x5a4ad2,_0x312863=(_0x5078d7,_0x385980)=>_0x5078d7+'::'+_0x385980,_0x1c35bb=(_0x8670f,_0x4cfe6d)=>_0x8670f+'/'+_0x4cfe6d,_0x2c1644=(_0x5b170a,_0xe4036f)=>_0x5b170a+'#'+_0xe4036f,_0x246e60=_0x14ab71=>{const _0x3daa36=_0x74ed62;if(_0x14ab71?.[_0x3daa36(0x1a2)])return _0x14ab71['processKey'];const _0x1db8b7=_0x14ab71?.['nodeKey'];return typeof _0x1db8b7===_0x3daa36(0x2c5)&&_0x1db8b7[_0x3daa36(0x2c1)]('#')?_0x1db8b7[_0x3daa36(0x14e)](0x0,_0x1db8b7['indexOf']('#')):_0x1db8b7;},_0x597476=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x5e39b4=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x1ca7f1=_0x597476*0x3,_0xd3c2ed=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x74ed62(0xf5)](0x927c0,_0x1ca7f1*0x14),_0x30bf17=[_0x74ed62(0x1c8),'processor:ready',_0x74ed62(0x309),_0x74ed62(0x1ab),'processor:paused','processor:resumed'];let _0x210cfa=null;function _0x2b0706(){const _0x167de8=_0x74ed62;if(_0x210cfa==null)_0x210cfa=Math[_0x167de8(0x24b)]((Date[_0x167de8(0x19d)]()-process[_0x167de8(0x215)]()*0x3e8)/0x3e8)*0x3e8;return _0x210cfa;}function _0x166076(_0x174cec){const _0x551640=_0x74ed62;if(process.env.OKDB_PROCESS_KILL===_0x551640(0x267))return![];if(_0x174cec?.[_0x551640(0xe0)]?.['processes']&&typeof _0x174cec[_0x551640(0xe0)][_0x551640(0xff)]===_0x551640(0x292)&&_0x174cec[_0x551640(0xe0)][_0x551640(0xff)][_0x551640(0x162)]===![])return![];return!![];}function _0xaa62dd(_0x449758,_0x37f610){const _0x5d0d44=_0x74ed62,_0x248af0=!!_0x37f610?.[_0x5d0d44(0x277)];switch(_0x449758){case _0x5d0d44(0x289):return{'controllable':_0x248af0,'decommissionable':![],'killable':!![],'killConfirm':'cluster-wide'};case _0x5d0d44(0x2ca):case _0x5d0d44(0x323):return{'controllable':_0x248af0,'decommissionable':![],'killable':!![],'killConfirm':_0x5d0d44(0x1fc)};case _0x5d0d44(0x2b0):return{'controllable':![],'decommissionable':![],'killable':![]};case'http-server':case'queue-worker':case _0x5d0d44(0x15a):case _0x5d0d44(0x27e):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x5d0d44(0x183)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x46fe23{constructor(_0x1aba01){const _0x5aca12=_0x74ed62;this[_0x5aca12(0x137)]=_0x1aba01,this['_statusEnv']=null,this[_0x5aca12(0x2c4)]=null,this[_0x5aca12(0x310)]=new Map(),this[_0x5aca12(0x204)]=null,this[_0x5aca12(0x26b)]=![],this[_0x5aca12(0x29c)]=![],this[_0x5aca12(0x23c)]=_0x2b0706(),this[_0x5aca12(0x13c)]=_0x4b7a3f(process['pid'],this[_0x5aca12(0x23c)]),this[_0x5aca12(0x124)]=_0x4717b4['randomUUID']()['slice'](0x0,0x8),this['_rowKey']=_0x2c1644(this['_selfKey'],this[_0x5aca12(0x124)]),this['_startedAt']=Date[_0x5aca12(0x19d)](),this[_0x5aca12(0x2e7)]=null,this[_0x5aca12(0x1fe)]=null,this[_0x5aca12(0x125)]=null,this[_0x5aca12(0x26e)]=null,this[_0x5aca12(0x312)]=null,this[_0x5aca12(0x222)]=null,this[_0x5aca12(0x12b)]=0x0,this[_0x5aca12(0x264)]={},this[_0x5aca12(0x242)]=new Map(),this['_lastCpuUsage']=process[_0x5aca12(0x1f2)](),this[_0x5aca12(0x159)]=Date[_0x5aca12(0x19d)](),this['_lastCpuPct']=0x0,this['_threadStats']=new Map();}get[_0x74ed62(0x11c)](){return this['_selfKey'];}get[_0x74ed62(0x1a0)](){return this['_rowKey'];}['_caps'](_0x4112f9,_0x3808b6){const _0x5e6fbb=_0x74ed62,_0x56ade8=_0xaa62dd(_0x4112f9,_0x3808b6);if(_0x56ade8[_0x5e6fbb(0x2d8)]&&!_0x166076(this[_0x5e6fbb(0x137)]))return{..._0x56ade8,'killable':![],'killConfirm':undefined};return _0x56ade8;}[_0x74ed62(0x1de)](){const _0xa6b50e=_0x74ed62;return!!this[_0xa6b50e(0x14d)];}[_0x74ed62(0x214)](_0x42d72b){const _0x5f2755=_0x74ed62;Object[_0x5f2755(0x22c)](this['_ownMeta'],_0x42d72b||{});}[_0x74ed62(0x235)](_0x360f39){if(_0x360f39)this['_listenAddr']=_0x360f39;}[_0x74ed62(0x10e)](_0x5a6a3f={}){const _0x1b2d7=_0x74ed62;return this[_0x1b2d7(0x137)][_0x1b2d7(0x15f)](_0x5a6a3f);}[_0x74ed62(0x17d)](){const _0x214f9a=_0x74ed62,_0x5c8b92={};let _0x179881=0x0,_0x6a9acd=0x0;const _0x1fe6fe=new Set();for(const _0x26070e of this[_0x214f9a(0x227)]()){_0x6a9acd++;const _0x140d96=_0x26070e[_0x214f9a(0x307)];if(!_0x140d96)continue;if(_0x140d96[_0x214f9a(0xef)])_0x179881++;for(const _0x56cc0d of _0x140d96[_0x214f9a(0x277)]||[]){if(![_0x214f9a(0x25a),'fanout'][_0x214f9a(0x2c1)](_0x56cc0d[_0x214f9a(0xf1)]))continue;(_0x56cc0d[_0x214f9a(0x2a0)]==='online'||_0x56cc0d[_0x214f9a(0x2a0)]==='building')&&_0x56cc0d[_0x214f9a(0x2be)]&&_0x1fe6fe[_0x214f9a(0x128)]((_0x56cc0d['env']||_0x214f9a(0x1ea))+':'+_0x56cc0d[_0x214f9a(0x2be)]);const _0x15b445=_0x56cc0d['env']||_0x214f9a(0x1ea);(_0x5c8b92[_0x15b445]||=[])[_0x214f9a(0x2a4)]({..._0x56cc0d,'env':_0x15b445,'owner':{'pid':_0x26070e[_0x214f9a(0x268)]??null,'kind':_0x26070e[_0x214f9a(0x25c)]??null}});}}for(const [_0x15b0e9,_0x1d4439]of Object[_0x214f9a(0x2e8)](_0x5c8b92)){for(const _0xce1387 of _0x1d4439){if(_0xce1387['mode']===_0x214f9a(0x25a)&&!_0xce1387[_0x214f9a(0x16f)]){const _0x1419ff=_0x15b0e9+':'+(_0xce1387[_0x214f9a(0x2be)]??'');if(!_0x1fe6fe[_0x214f9a(0x275)](_0x1419ff))_0xce1387[_0x214f9a(0x313)]=!![];}}}return{'envs':_0x5c8b92,'policy':null,'participation':{'participating':_0x179881,'total':_0x6a9acd},'source':_0x214f9a(0x189)};}[_0x74ed62(0x21b)](){const _0x579821=_0x74ed62,_0x4b056f=_0x3814e7=>{const _0x3a3314=_0x35c1;if(_0x3814e7[_0x3a3314(0x2a0)]==='online'||_0x3814e7[_0x3a3314(0x2a0)]===_0x3a3314(0x286)||_0x3814e7[_0x3a3314(0x2a0)]==='error')return 0x3;if(_0x3814e7[_0x3a3314(0x16f)])return 0x1;return 0x2;},_0xae7228=new Map();for(const _0xd90f85 of this[_0x579821(0x227)]()){for(const _0x5ab9ee of _0xd90f85[_0x579821(0x307)]?.[_0x579821(0x277)]||[]){const _0x3c2443={..._0x5ab9ee,'owner':{'pid':_0xd90f85[_0x579821(0x268)]??null,'kind':_0xd90f85[_0x579821(0x25c)]??null,'host':_0xd90f85['host']??null}},_0x12f001=_0x5ab9ee['mode']===_0x579821(0x25a)?_0x579821(0x29f)+(_0x5ab9ee[_0x579821(0xee)]??'')+'::'+(_0x5ab9ee[_0x579821(0x2be)]??_0x5ab9ee[_0x579821(0x16c)]??_0x5ab9ee['id']):_0x579821(0x1df)+(_0xd90f85[_0x579821(0x2a9)]??_0xd90f85[_0x579821(0x1a2)]??'')+'::'+(_0x5ab9ee[_0x579821(0xee)]??'')+'::'+_0x5ab9ee['id'],_0x1daa22=_0xae7228[_0x579821(0x106)](_0x12f001);if(!_0x1daa22||_0x4b056f(_0x3c2443)>_0x4b056f(_0x1daa22))_0xae7228[_0x579821(0x30d)](_0x12f001,_0x3c2443);}}return[..._0xae7228['values']()];}['clusterStatusView'](){const _0x35b51e=_0x74ed62,_0x2f422c=Date[_0x35b51e(0x19d)](),_0x415876=this[_0x35b51e(0x227)](),_0x24557e=_0x242366=>Math[_0x35b51e(0xf5)](0x0,Math[_0x35b51e(0x24b)]((_0x2f422c-(_0x242366[_0x35b51e(0x2e1)]||_0x2f422c))/0x3e8)),_0x5266f3=_0x415876[_0x35b51e(0xf9)](_0x13b6af=>_0x13b6af[_0x35b51e(0x25c)]===_0x35b51e(0x289)),_0x2e8bf8=_0x415876[_0x35b51e(0x2df)](_0x2a823a=>_0x2a823a[_0x35b51e(0x25c)]==='http-server');if(_0x5266f3||_0x2e8bf8[_0x35b51e(0x200)])return{'primary':_0x5266f3?{'pid':_0x5266f3[_0x35b51e(0x268)],'uptime':_0x24557e(_0x5266f3)}:null,'workers':_0x2e8bf8[_0x35b51e(0x2fe)](_0x2e4a22=>({'pid':_0x2e4a22['pid'],'uptime':_0x24557e(_0x2e4a22)})),'workersConfigured':_0x5266f3?.[_0x35b51e(0x241)]?.[_0x35b51e(0x207)]??_0x2e8bf8[_0x35b51e(0x200)],'mode':_0x35b51e(0x318)};const _0x3e7f79=_0x415876[_0x35b51e(0xf9)](_0x12c5a0=>_0x12c5a0[_0x35b51e(0x25c)]===_0x35b51e(0x2ca)||_0x12c5a0[_0x35b51e(0x25c)]===_0x35b51e(0x323)||_0x12c5a0['kind']===_0x35b51e(0x2b0)),_0xe7b03a=_0x3e7f79?{'pid':_0x3e7f79[_0x35b51e(0x268)],'uptime':_0x24557e(_0x3e7f79)}:{'pid':process[_0x35b51e(0x268)],'uptime':Math[_0x35b51e(0xf5)](0x0,Math[_0x35b51e(0x24b)](process[_0x35b51e(0x215)]()))};return{'primary':_0xe7b03a,'workers':[_0xe7b03a],'workersConfigured':0x1,'mode':_0x35b51e(0x25a)};}[_0x74ed62(0xdb)](){const _0x309636=_0x74ed62;return this[_0x309636(0x1f5)]();}[_0x74ed62(0x203)](){const _0x25c70d=_0x74ed62,_0x3e6809=new Map();for(const _0x2f19cd of this[_0x25c70d(0x1f5)]())_0x3e6809[_0x25c70d(0x30d)](_0x2f19cd[_0x25c70d(0x1a2)],{..._0x2f19cd,'children':[]});const _0x552fcb=[];for(const _0x497212 of _0x3e6809[_0x25c70d(0x1ae)]()){const _0x8480f=_0x497212[_0x25c70d(0x1a7)]?_0x3e6809[_0x25c70d(0x106)](_0x497212[_0x25c70d(0x1a7)]):null;if(_0x8480f&&_0x8480f!==_0x497212)_0x8480f[_0x25c70d(0x155)][_0x25c70d(0x2a4)](_0x497212);else _0x552fcb[_0x25c70d(0x2a4)](_0x497212);}const _0x10e54d=(_0xff9b9c,_0x193030)=>_0xff9b9c[_0x25c70d(0x25c)]===_0x193030['kind']?(_0xff9b9c[_0x25c70d(0x268)]||0x0)-(_0x193030[_0x25c70d(0x268)]||0x0):(_0xff9b9c[_0x25c70d(0x25c)]??'')<(_0x193030['kind']??'')?-0x1:0x1,_0x372176=_0x3648f6=>{const _0x5de719=_0x25c70d;_0x3648f6[_0x5de719(0x2ee)](_0x10e54d);for(const _0x2dd295 of _0x3648f6)if(_0x2dd295[_0x5de719(0x155)][_0x5de719(0x200)])_0x372176(_0x2dd295['children']);};return _0x372176(_0x552fcb),_0x552fcb;}[_0x74ed62(0x20e)](_0x4f8c3f){const _0x3d6bcd=_0x74ed62;return this[_0x3d6bcd(0x1f5)]()[_0x3d6bcd(0xf9)](_0x246b67=>_0x246b67[_0x3d6bcd(0x1a2)]===_0x4f8c3f)??null;}['_groupByProcess'](_0x4da618=Date[_0x74ed62(0x19d)]()){const _0x466267=_0x74ed62,_0x20a708=new Map();for(const _0x26b0e4 of this[_0x466267(0x227)]()){const _0x2b8be4=_0x246e60(_0x26b0e4);let _0x4ddb1a=_0x20a708[_0x466267(0x106)](_0x2b8be4);!_0x4ddb1a&&(_0x4ddb1a={'processKey':_0x2b8be4,'nodeKey':_0x2b8be4,'pid':_0x26b0e4[_0x466267(0x268)],'ppid':_0x26b0e4[_0x466267(0x230)]??null,'host':_0x26b0e4['host']??null,'kind':_0x26b0e4['kind'],'role':null,'supervisorKey':_0x26b0e4[_0x466267(0x1a7)]??null,'slot':_0x26b0e4[_0x466267(0x14b)]??null,'slotKey':_0x26b0e4[_0x466267(0x150)]??null,'caps':_0x26b0e4[_0x466267(0x28e)]??null,'lifecycle':_0x26b0e4[_0x466267(0x21f)]??null,'uptime':Math[_0x466267(0xf5)](0x0,Math['round']((_0x4da618-(_0x26b0e4[_0x466267(0x2e1)]||_0x4da618))/0x3e8)),'startedAt':_0x26b0e4[_0x466267(0x2e1)]??null,'meta':_0x26b0e4[_0x466267(0x241)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x20a708['set'](_0x2b8be4,_0x4ddb1a));_0x4ddb1a[_0x466267(0x12f)]['push']({'instanceId':_0x26b0e4['instanceId']??null,'role':_0x26b0e4[_0x466267(0x237)]??null,'listenAddr':_0x26b0e4[_0x466267(0x102)]??null,'lifecycle':_0x26b0e4[_0x466267(0x21f)]??null,'processing':_0x26b0e4[_0x466267(0x307)]??null});if(!_0x4ddb1a['role']&&_0x26b0e4[_0x466267(0x237)])_0x4ddb1a[_0x466267(0x237)]=_0x26b0e4[_0x466267(0x237)];if(!_0x4ddb1a[_0x466267(0x102)]&&_0x26b0e4['listenAddr'])_0x4ddb1a[_0x466267(0x102)]=_0x26b0e4['listenAddr'];if(!_0x4ddb1a[_0x466267(0x307)]&&_0x26b0e4[_0x466267(0x307)])_0x4ddb1a[_0x466267(0x307)]=_0x26b0e4[_0x466267(0x307)];if(!_0x4ddb1a[_0x466267(0x20c)]&&_0x26b0e4['engines'])_0x4ddb1a[_0x466267(0x20c)]=_0x26b0e4['engines'];if(!_0x4ddb1a[_0x466267(0x166)]&&_0x26b0e4[_0x466267(0x166)])_0x4ddb1a['singletonClaims']=_0x26b0e4['singletonClaims'];if(_0x4ddb1a['caps']==null&&_0x26b0e4[_0x466267(0x28e)])_0x4ddb1a[_0x466267(0x28e)]=_0x26b0e4[_0x466267(0x28e)];if(_0x26b0e4[_0x466267(0x1e5)]&&(!_0x4ddb1a[_0x466267(0x1e5)]||(_0x26b0e4['stats']['at']??0x0)>(_0x4ddb1a[_0x466267(0x1e5)]['at']??0x0)))_0x4ddb1a['stats']=_0x26b0e4[_0x466267(0x1e5)];}return[..._0x20a708[_0x466267(0x1ae)]()];}[_0x74ed62(0x2e2)](){const _0x5c55bc=_0x74ed62,_0x1f3e07=[],_0x4472ff={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x2cff10 of this[_0x5c55bc(0x1f5)]()){_0x1f3e07[_0x5c55bc(0x2a4)]({'processKey':_0x2cff10['processKey'],'kind':_0x2cff10[_0x5c55bc(0x25c)],'pid':_0x2cff10[_0x5c55bc(0x268)],'supervisorKey':_0x2cff10['supervisorKey'],'meta':_0x2cff10[_0x5c55bc(0x241)]??null,'uptime':_0x2cff10['uptime'],'stats':_0x2cff10['stats']??null}),_0x4472ff['processes']++;if(_0x2cff10[_0x5c55bc(0x1e5)]){_0x4472ff[_0x5c55bc(0x2b7)]+=_0x2cff10[_0x5c55bc(0x1e5)][_0x5c55bc(0x2b7)]||0x0,_0x4472ff[_0x5c55bc(0x304)]+=(_0x2cff10['stats'][_0x5c55bc(0x304)]||0x0)+(_0x2cff10[_0x5c55bc(0x1e5)][_0x5c55bc(0x108)]?.[_0x5c55bc(0x304)]||0x0);const _0xc7db99=_0x2cff10[_0x5c55bc(0x1e5)][_0x5c55bc(0x108)];_0xc7db99&&(_0x4472ff[_0x5c55bc(0x108)][_0x5c55bc(0x2ed)]+=_0xc7db99[_0x5c55bc(0x2ed)]||0x0,_0x4472ff[_0x5c55bc(0x108)]['sandbox']+=_0xc7db99[_0x5c55bc(0x1da)]||0x0,_0x4472ff[_0x5c55bc(0x108)]['busy']+=_0xc7db99[_0x5c55bc(0x2bf)]||0x0);}}return{'totals':_0x4472ff,'nodes':_0x1f3e07};}async[_0x74ed62(0x100)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x2e30e4=_0x74ed62;this[_0x2e30e4(0x26b)]=this[_0x2e30e4(0x26b)]||!!writer,this[_0x2e30e4(0x29c)]=this[_0x2e30e4(0x29c)]||!!reader,this['_kind']=kind||this[_0x2e30e4(0x2e7)]||(_0x45598d[_0x2e30e4(0x1b8)]?_0x2e30e4(0x259):_0x2e30e4(0x2ca)),this[_0x2e30e4(0x1fe)]=supervisorKey??this[_0x2e30e4(0x1fe)],this[_0x2e30e4(0x125)]=listenAddr??this[_0x2e30e4(0x125)],this['_ensureDesired'](),await this[_0x2e30e4(0x1ce)]();if(!writer&&!reader)return null;if(!this['_statusEnv']){const _0x2e96d9=await this[_0x2e30e4(0x137)]['createEnvironment'](_0x4c0b96,{'sync':![],'durability':_0x2e30e4(0x19f)});await _0x2e96d9[_0x2e30e4(0x228)](_0x4523cc),this[_0x2e30e4(0x14d)]=_0x2e96d9;}return this['_statusEnv'];}[_0x74ed62(0x1b9)](){const _0x53d673=_0x74ed62;return this['_nodeDbFor']!==this[_0x53d673(0x14d)]&&(this[_0x53d673(0x143)]=this[_0x53d673(0x14d)],this[_0x53d673(0x20d)]=this[_0x53d673(0x14d)]['_getType'](_0x4523cc)['data']),this[_0x53d673(0x20d)];}[_0x74ed62(0x24d)](_0x54b72e){const _0x544f64=_0x74ed62;if(_0x482b9f)return this[_0x544f64(0x1b9)]()[_0x544f64(0x27d)](_0x54b72e['nodeKey'],_0x54b72e,0x1);const _0x40ef8e=this[_0x544f64(0x1b9)]()[_0x544f64(0x2f3)](_0x54b72e[_0x544f64(0x2a9)],_0x54b72e,0x1);if(_0x40ef8e&&typeof _0x40ef8e['then']==='function')_0x40ef8e[_0x544f64(0x2b2)](undefined,()=>{});return _0x40ef8e;}[_0x74ed62(0x262)](_0x57b534){const _0x4bb715=_0x74ed62;return this['_nodeDb']()['putSync'](_0x57b534[_0x4bb715(0x2a9)],_0x57b534,0x1);}[_0x74ed62(0x25d)](_0x363935){const _0x5cbf1c=_0x74ed62;if(_0x482b9f)try{return this[_0x5cbf1c(0x1b9)]()['removeSync'](_0x363935);}catch{return![];}const _0x4fb643=this[_0x5cbf1c(0x1b9)]()[_0x5cbf1c(0x24f)](_0x363935);if(_0x4fb643&&typeof _0x4fb643[_0x5cbf1c(0x2b2)]===_0x5cbf1c(0x160))_0x4fb643[_0x5cbf1c(0x2b2)](undefined,()=>{});return _0x4fb643;}async[_0x74ed62(0x13a)](_0x36c7d6){const _0x13cb06=_0x74ed62;if(!this[_0x13cb06(0x14d)]||!this[_0x13cb06(0x26b)]||!_0x36c7d6?.['nodeKey'])return;return this[_0x13cb06(0x24d)](_0x36c7d6);}async[_0x74ed62(0x2e4)](_0x57af06){const _0x3865d1=_0x74ed62;if(!this[_0x3865d1(0x14d)]||!this[_0x3865d1(0x26b)]||!_0x57af06)return;const _0xe1c3dc=_0x57af06[_0x3865d1(0x2c1)]('#'),_0x5c0cfe=[];for(const {key:_0x20b277}of this['_statusEnv'][_0x3865d1(0xe7)](_0x4523cc)){if(_0x20b277===_0x57af06||!_0xe1c3dc&&typeof _0x20b277==='string'&&_0x20b277[_0x3865d1(0xda)](_0x57af06+'#'))_0x5c0cfe['push'](_0x20b277);}for(const _0x8f079a of _0x5c0cfe){try{this[_0x3865d1(0x1b9)]()[_0x3865d1(0x17a)](_0x8f079a);}catch{}}}['_nodeDead'](_0x1e0010){const _0x399008=_0x74ed62;if(typeof _0x1e0010?.['pid']!==_0x399008(0x15e))return![];if(_0x1e0010['host']!==_0x440a57[_0x399008(0x306)]())return![];if(_0x1e0010[_0x399008(0x268)]===process[_0x399008(0x268)])return![];if(_0x1e0010[_0x399008(0x149)]!=null&&_0x1e0010[_0x399008(0x149)]<Date[_0x399008(0x19d)]()-_0xd3c2ed)return!![];try{return process['kill'](_0x1e0010['pid'],0x0),![];}catch(_0x24ff19){return _0x24ff19[_0x399008(0x28b)]===_0x399008(0x15d);}}[_0x74ed62(0x227)](){const _0x3d5656=_0x74ed62;if(!this[_0x3d5656(0x14d)])return[];try{this[_0x3d5656(0x14d)]['db']?.[_0x3d5656(0x23a)]?.();}catch{}const _0x5507ee=Date[_0x3d5656(0x19d)](),_0x20ae45=_0x440a57[_0x3d5656(0x306)](),_0x4704e5=[];for(const {value:_0x1ad351}of this[_0x3d5656(0x14d)][_0x3d5656(0xe7)](_0x4523cc)){if(!_0x1ad351)continue;let _0x3c6299=null;_0x1ad351[_0x3d5656(0x302)]===_0x20ae45&&typeof _0x1ad351['pid']===_0x3d5656(0x15e)&&(_0x3c6299=!this[_0x3d5656(0x2fb)](_0x1ad351));if(_0x3c6299===![])continue;const _0x35ce38=_0x1ad351[_0x3d5656(0x149)]==null||_0x1ad351[_0x3d5656(0x149)]>=_0x5507ee;if(_0x3c6299===!![]||_0x35ce38)_0x4704e5[_0x3d5656(0x2a4)](_0x1ad351);}return _0x4704e5;}async[_0x74ed62(0x1e9)](_0x423756=0x0){const _0x569a3a=_0x74ed62;if(!this[_0x569a3a(0x14d)]||!this[_0x569a3a(0x26b)])return;const _0x5b806d=Date[_0x569a3a(0x19d)]()-_0x423756,_0x14af3a=new Set(),_0x5560dd=[],_0x16085e=_0x440a57['hostname'](),_0x22fbeb=require$$6[_0x569a3a(0x209)];for(const {key:_0x9da4bb,value:_0x4c19be}of this[_0x569a3a(0x14d)][_0x569a3a(0xe7)](_0x4523cc)){if(!_0x4c19be)continue;const _0x5f23a4=_0x4c19be['host']===_0x16085e&&typeof _0x4c19be[_0x569a3a(0x268)]===_0x569a3a(0x15e),_0x5a4898=_0x5f23a4?this[_0x569a3a(0x2fb)](_0x4c19be):_0x4c19be[_0x569a3a(0x149)]!=null&&_0x4c19be[_0x569a3a(0x149)]<_0x5b806d;if(_0x5a4898)_0x5560dd['push'](_0x9da4bb);else{_0x14af3a[_0x569a3a(0x128)](_0x246e60(_0x4c19be)??_0x9da4bb);if(_0x4c19be[_0x569a3a(0x209)]&&_0x4c19be[_0x569a3a(0x209)]!==_0x22fbeb){if(!this[_0x569a3a(0x12c)])this[_0x569a3a(0x12c)]=new Set();!this[_0x569a3a(0x12c)]['has'](_0x4c19be['version'])&&(this[_0x569a3a(0x12c)][_0x569a3a(0x128)](_0x4c19be[_0x569a3a(0x209)]),this[_0x569a3a(0x137)][_0x569a3a(0x210)]?.['warn']?.('process\x20'+(_0x4c19be[_0x569a3a(0x268)]??'?')+'\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20'+_0x4c19be[_0x569a3a(0x209)]+_0x569a3a(0x2eb)+_0x22fbeb+_0x569a3a(0x30e)+_0x569a3a(0x261),{'feature':_0x569a3a(0x300)}));}}}for(const _0x1b876a of _0x5560dd)this['_removeRowAsync'](_0x1b876a);if(this[_0x569a3a(0x1b5)]()){const _0x51d731=[];for(const {key:_0x17ee71}of this['listDesired'](_0x569a3a(0x127))){if(!_0x14af3a[_0x569a3a(0x275)](_0x17ee71)){if(_0x482b9f)try{this[_0x569a3a(0x2c4)][_0x569a3a(0x17a)]('node/'+_0x17ee71);}catch{}else _0x51d731[_0x569a3a(0x2a4)](this[_0x569a3a(0x2c4)][_0x569a3a(0x24f)]('node/'+_0x17ee71));}}if(_0x51d731[_0x569a3a(0x200)])await Promise[_0x569a3a(0x157)](_0x51d731);}}[_0x74ed62(0x22d)](_0x364176=null){const _0x598bd6=_0x74ed62;if(this[_0x598bd6(0x26e)])return;if(!this[_0x598bd6(0x26b)]||!this[_0x598bd6(0x14d)]){this[_0x598bd6(0x137)]?.[_0x598bd6(0x210)]?.[_0x598bd6(0x1ca)]?.(_0x598bd6(0x2a8)+this[_0x598bd6(0x26b)]+'\x20statusEnv='+!!this[_0x598bd6(0x14d)]+_0x598bd6(0x280),{'feature':_0x598bd6(0xff)});return;}this[_0x598bd6(0x222)]=_0x364176,this[_0x598bd6(0x312)]=()=>this[_0x598bd6(0x1af)]();for(const _0x42f74f of _0x30bf17)this[_0x598bd6(0x137)][_0x598bd6(0x20f)]['on'](_0x42f74f,this[_0x598bd6(0x312)]);this['_publishNow']();const _0x10bf0e=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x597476;this[_0x598bd6(0x26e)]=setInterval(()=>{const _0x16005a=_0x598bd6;if(this['_onTick'])try{this[_0x16005a(0x222)]();}catch{}this[_0x16005a(0x254)](),this[_0x16005a(0x1e9)]()[_0x16005a(0x223)](()=>{});},_0x10bf0e);if(this['_hbTimer'][_0x598bd6(0x2a3)])this[_0x598bd6(0x26e)][_0x598bd6(0x2a3)]();}[_0x74ed62(0x1af)](){const _0x4931f6=_0x74ed62;if(!this['_isWriter']||!this['_statusEnv'])return;if(Date['now']()-this['_lastPublishAt']<_0x5e39b4)return;this[_0x4931f6(0x254)]();}[_0x74ed62(0x254)](){const _0x4d198a=_0x74ed62;if(!this['_isWriter']||!this['_statusEnv'])return;this[_0x4d198a(0x12b)]=Date[_0x4d198a(0x19d)]();try{const _0x89c849=[this['_buildOwnRow']()];for(const _0x210b06 of this[_0x4d198a(0x242)]['values']())_0x89c849[_0x4d198a(0x2a4)](this[_0x4d198a(0x31e)](_0x210b06));const _0x9cba30=_0x309375[_0x4d198a(0x12a)]?_0x309375[_0x4d198a(0x19d)]():0x0;for(const _0x61a96b of _0x89c849){try{this[_0x4d198a(0x262)](_0x61a96b),this[_0x4d198a(0x2cc)]=![];}catch(_0x10e8b0){!this[_0x4d198a(0x2cc)]&&(this[_0x4d198a(0x2cc)]=!![],this['okdb']?.[_0x4d198a(0x210)]?.[_0x4d198a(0x1ca)]?.(_0x4d198a(0x14f)+_0x10e8b0[_0x4d198a(0x110)],{'feature':_0x4d198a(0xff)}));}}if(_0x309375['enabled'])_0x309375[_0x4d198a(0x1f8)](_0x4d198a(0xcf),_0x309375['now']()-_0x9cba30,_0x4d198a(0x218)+_0x89c849[_0x4d198a(0x200)]+'\x20sync');}catch(_0x49ffe5){!this[_0x4d198a(0x2cc)]&&(this[_0x4d198a(0x2cc)]=!![],this[_0x4d198a(0x137)]?.[_0x4d198a(0x210)]?.[_0x4d198a(0x1ca)]?.(_0x4d198a(0x14f)+_0x49ffe5[_0x4d198a(0x110)],{'feature':_0x4d198a(0xff)}));}}async[_0x74ed62(0x1ad)](){const _0x1e3175=_0x74ed62;if(this[_0x1e3175(0x312)]){for(const _0x4e2532 of _0x30bf17){try{this['okdb'][_0x1e3175(0x20f)][_0x1e3175(0x267)](_0x4e2532,this[_0x1e3175(0x312)]);}catch{}}this[_0x1e3175(0x312)]=null;}this[_0x1e3175(0x26e)]&&(clearInterval(this[_0x1e3175(0x26e)]),this['_hbTimer']=null);try{if(this['_statusEnv']&&this['_isWriter'])await this['removeNode'](this[_0x1e3175(0x1e3)]);}catch{}}async[_0x74ed62(0x2b3)](){const _0x1dfb47=_0x74ed62;if(!this[_0x1dfb47(0x14d)]||!this[_0x1dfb47(0x26b)])return;try{await this['removeNode'](this[_0x1dfb47(0x1e3)]);}catch{}try{const _0x34dada=[];for(const {value:_0x3f8ac6}of this[_0x1dfb47(0x14d)]['getRange'](_0x4523cc)){if(_0x3f8ac6?.[_0x1dfb47(0x230)]===process['pid']&&_0x3f8ac6[_0x1dfb47(0x2a9)])_0x34dada[_0x1dfb47(0x2a4)](_0x3f8ac6[_0x1dfb47(0x2a9)]);}for(const _0x4fcfae of _0x34dada){try{await this[_0x1dfb47(0x2e4)](_0x4fcfae);}catch{}}}catch{}}async[_0x74ed62(0x1b6)](){const _0x24ef47=_0x74ed62;return this[_0x24ef47(0x13a)](this[_0x24ef47(0x132)]());}async['publishChildRow'](_0x7d135f){const _0x27502d=_0x74ed62;if(!this[_0x27502d(0x14d)]||!this[_0x27502d(0x26b)])return;return this[_0x27502d(0x13a)](this['_buildChildRow'](_0x7d135f));}[_0x74ed62(0x31e)]({pid:_0x136bb7,startedAt:_0x546634,kind:_0x4bf41b,supervisorKey:_0x3afce9,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x74ed62(0x2c2),meta:meta=null,stats:stats=null}){const _0x5bf19e=_0x74ed62,_0xb19c66=Date[_0x5bf19e(0x19d)](),_0x448e77=_0x4b7a3f(_0x136bb7,_0x546634);return{'nodeKey':_0x2c1644(_0x448e77,'0'),'processKey':_0x448e77,'instanceId':'0','pid':_0x136bb7,'startedAt':_0x546634,'ppid':process[_0x5bf19e(0x268)],'host':_0x440a57[_0x5bf19e(0x306)](),'supervisorKey':_0x3afce9,'slot':slot,'slotKey':slotKey,'kind':_0x4bf41b,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0xb19c66,'expiresAt':_0xb19c66+_0x1ca7f1,'caps':this[_0x5bf19e(0x1cf)](_0x4bf41b,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x74ed62(0x25f)](_0x52105c){const _0x362d37=_0x74ed62;if(!_0x52105c?.['pid'])return null;const _0x1c8800=_0x4b7a3f(_0x52105c[_0x362d37(0x268)],_0x52105c['startedAt']);this['_children'][_0x362d37(0x30d)](_0x1c8800,{..._0x52105c,'supervisorKey':_0x52105c[_0x362d37(0x1a7)]??this['_selfKey']});if(this[_0x362d37(0x26b)])await this[_0x362d37(0x298)](this[_0x362d37(0x242)][_0x362d37(0x106)](_0x1c8800))[_0x362d37(0x223)]?.(()=>{});return _0x1c8800;}[_0x74ed62(0x1a6)](_0xbc1505){const _0x2f2b34=_0x74ed62;if(!_0xbc1505)return;return this[_0x2f2b34(0x242)][_0x2f2b34(0x1a3)](_0xbc1505),this[_0x2f2b34(0x2e4)](_0xbc1505);}[_0x74ed62(0x256)](){const _0x1ff2f0=_0x74ed62,_0x6ee32a=Date[_0x1ff2f0(0x19d)](),_0x4570ea=process['cpuUsage'](),_0x50d897=(_0x6ee32a-this['_lastCpuAt'])*0x3e8;if(_0x50d897>=0x3d090){const _0x4f963c=_0x4570ea['user']-this[_0x1ff2f0(0x260)][_0x1ff2f0(0x297)]+(_0x4570ea[_0x1ff2f0(0x10c)]-this['_lastCpuUsage']['system']),_0x4213dd=_0x440a57['cpus']()['length']||0x1;this[_0x1ff2f0(0x1f0)]=Math[_0x1ff2f0(0x2a1)](0x64,Math[_0x1ff2f0(0x24b)](_0x4f963c/(_0x50d897*_0x4213dd)*0x64)),this[_0x1ff2f0(0x152)]=Math[_0x1ff2f0(0x24b)](_0x50d897/0x3e8),this['_lastCpuUsage']=_0x4570ea,this[_0x1ff2f0(0x159)]=_0x6ee32a;}const _0xbaa34=process[_0x1ff2f0(0x24a)](),_0x3742db=this['_threadStats'][_0x1ff2f0(0x2bd)];let _0x6f157=0x0;if(_0x3742db>0x0){const _0x57c927=[this[_0x1ff2f0(0x137)],...this[_0x1ff2f0(0x137)][_0x1ff2f0(0xd4)]?.[_0x1ff2f0(0x1ae)]?.()??[]];for(const _0x58b23e of _0x57c927){const _0x22de57=_0x58b23e[_0x1ff2f0(0x119)]?.[_0x1ff2f0(0x2a6)];if(_0x22de57)_0x6f157+=_0x22de57[_0x1ff2f0(0x26d)]['busy'];}}let _0x131ce4=null;const _0x2e3f0e=_0x3742db;if(_0x2e3f0e>0x0){let _0x1a55c0=0x0;for(const _0x3b53fc of this['_threadStats']['values']())_0x1a55c0+=_0x3b53fc[_0x1ff2f0(0x304)]||0x0;_0x131ce4={'count':_0x2e3f0e,'heapUsed':_0x1a55c0,'sandbox':_0x3742db,'busy':_0x6f157};}return{'rss':_0xbaa34[_0x1ff2f0(0x2b7)],'heapUsed':_0xbaa34['heapUsed'],'heapTotal':_0xbaa34['heapTotal'],'external':_0xbaa34[_0x1ff2f0(0x269)],'cpuPct':this['_lastCpuPct'],'cpuWindowMs':this[_0x1ff2f0(0x152)]??null,'threads':_0x131ce4,'at':_0x6ee32a};}['reportThreadStats'](_0x31ef8f,_0x42f73b){const _0x288905=_0x74ed62;if(!_0x31ef8f||!_0x42f73b)return;this['_threadStats'][_0x288905(0x30d)](_0x31ef8f,_0x42f73b);}[_0x74ed62(0xec)](_0xa4c6a5){const _0x4fea1f=_0x74ed62;this[_0x4fea1f(0x308)]['delete'](_0xa4c6a5);}[_0x74ed62(0x238)](_0x42931a,_0x327da7,_0x493082=undefined){const _0x3688c0=_0x74ed62,_0x4afe09=this[_0x3688c0(0x242)][_0x3688c0(0x106)](_0x42931a);if(!_0x4afe09||!_0x327da7)return;if(_0x493082!==undefined)_0x4afe09['processing']=_0x493082;_0x4afe09[_0x3688c0(0x1e5)]={'rss':_0x327da7[_0x3688c0(0x2b7)]??null,'heapUsed':_0x327da7['heapUsed']??null,'heapTotal':_0x327da7[_0x3688c0(0x1e1)]??null,'external':_0x327da7[_0x3688c0(0x269)]??null,'cpuPct':_0x327da7['cpuPct']??null,'cpuWindowMs':_0x327da7[_0x3688c0(0x276)]??null,'threads':_0x327da7[_0x3688c0(0x108)]??null,'claims':_0x327da7['claims']??null,'envsOpen':_0x327da7[_0x3688c0(0x16b)]??null,'at':Date[_0x3688c0(0x19d)]()};}[_0x74ed62(0x132)](){const _0x44edb8=_0x74ed62,_0x23d3c8=Date['now'](),_0x3efbd3=this[_0x44edb8(0x137)][_0x44edb8(0x10a)]||{},_0x38ce73=this['_kind']||_0x44edb8(0x2ca);return{'nodeKey':this[_0x44edb8(0x1e3)],'processKey':this[_0x44edb8(0x13c)],'instanceId':this[_0x44edb8(0x124)],'pid':process['pid'],'startedAt':this['_processStartedAt'],'instanceStartedAt':this[_0x44edb8(0xd5)],'ppid':typeof process['ppid']===_0x44edb8(0x15e)?process[_0x44edb8(0x230)]:null,'host':_0x440a57[_0x44edb8(0x306)](),'supervisorKey':this[_0x44edb8(0x1fe)]??null,'version':require$$6[_0x44edb8(0x209)],'kind':_0x38ce73,'role':{'engines':!!_0x3efbd3[_0x44edb8(0x20c)],'processors':!!_0x3efbd3[_0x44edb8(0x277)],'compaction':_0x3efbd3[_0x44edb8(0x12d)],'http':_0x3efbd3[_0x44edb8(0x226)]},'listenAddr':this[_0x44edb8(0x125)]??null,'heartbeatAt':_0x23d3c8,'expiresAt':_0x23d3c8+_0x1ca7f1,'caps':this[_0x44edb8(0x1cf)](_0x38ce73,_0x3efbd3),'lifecycle':{'state':_0x44edb8(0x2c2),'desiredVersionApplied':null},'meta':{...this['_ownMeta']},'processing':_0x3efbd3['processors']?this[_0x44edb8(0x1f1)]():null,'engines':_0x3efbd3['engines']?[...this[_0x44edb8(0x137)]['_servingEngines']??[]]:null,'singletonClaims':this[_0x44edb8(0x1dd)](),'stats':this[_0x44edb8(0x256)](),'writers':this[_0x44edb8(0x1d3)]()};}[_0x74ed62(0x1d3)](){const _0x48e600=_0x74ed62,_0x2aafaa={};try{for(const [_0x2622d4,_0x1cedfe]of this['okdb'][_0x48e600(0xd4)]){try{const _0xf982f7=_0x1cedfe[_0x48e600(0x21c)]?.();if(!_0xf982f7)continue;if(!_0xf982f7[_0x48e600(0x165)]&&!_0xf982f7[_0x48e600(0x30a)]&&!(_0xf982f7[_0x48e600(0x156)]??0x0)&&!_0xf982f7[_0x48e600(0x2fa)])continue;_0x2aafaa[_0x2622d4]={'depth':_0xf982f7[_0x48e600(0x165)],'oldestPendingMs':_0xf982f7[_0x48e600(0x173)],'committed':_0xf982f7['committed'],'commitsPerSec':_0xf982f7[_0x48e600(0x1d8)],'commitP99Ms':_0xf982f7[_0x48e600(0x212)],'parkedNow':_0xf982f7[_0x48e600(0x156)]??0x0,'draining':!!_0xf982f7['draining']};}catch{}}}catch{}return Object[_0x48e600(0x172)](_0x2aafaa)[_0x48e600(0x200)]?_0x2aafaa:null;}[_0x74ed62(0x1dd)](){const _0x82a089=_0x74ed62,_0x435822=process[_0x82a089(0x268)],_0x298f31=Date[_0x82a089(0x19d)](),_0x2276c0=_0x1541a8=>{const _0x4be555=_0x82a089;if(!_0x1541a8)return[];const _0x365549=[];try{for(const {id:_0x524699,entry:_0x3777c1}of _0x1541a8[_0x4be555(0x2cf)]()){if(_0x3777c1?.['holder']?.[_0x4be555(0x268)]!==_0x435822)continue;const _0x12702=_0x3777c1['updatedAt']??_0x3777c1[_0x4be555(0x117)]??0x0;if(_0x12702+(_0x3777c1[_0x4be555(0x2d1)]??0x0)<_0x298f31)continue;_0x365549['push'](_0x524699);}}catch{}return _0x365549;},_0x21ee26=_0x2276c0(this['_singletonLock'](_0x82a089(0x281))),_0x302029=_0x2276c0(this[_0x82a089(0x13b)](_0x82a089(0x25e)));if(!_0x21ee26[_0x82a089(0x200)]&&!_0x302029[_0x82a089(0x200)])return null;return{'compact':_0x21ee26,'replicate':_0x302029};}['_singletonLock'](_0x2331e1){const _0x41878c=_0x74ed62;if(!this[_0x41878c(0x137)]?.['_rootDb'])return null;if(!this['_singletonLocks'])this[_0x41878c(0x1d4)]=new Map();let _0x415cf6=this[_0x41878c(0x1d4)][_0x41878c(0x106)](_0x2331e1);if(!_0x415cf6)try{_0x415cf6=new _0x564a3e(this['okdb'][_0x41878c(0x2ab)],{'namespace':_0x2331e1}),this[_0x41878c(0x1d4)]['set'](_0x2331e1,_0x415cf6);}catch{return null;}return _0x415cf6;}[_0x74ed62(0x1f1)](){const _0x2738a9=_0x74ed62,_0x24c46a=[];try{for(const [_0x29ab36,_0x3c8ffd]of this[_0x2738a9(0x137)]['_envs']){if(_0x29ab36[_0x2738a9(0xda)]('~'))continue;for(const _0x1b8dc5 of _0x3c8ffd['processor'][_0x2738a9(0x151)]())_0x24c46a[_0x2738a9(0x2a4)]({..._0x1b8dc5,'env':_0x29ab36});}}catch{}return{'participate':this[_0x2738a9(0x137)]['processors']?.[_0x2738a9(0xcd)]??![],'processors':_0x24c46a};}[_0x74ed62(0x1b5)](){const _0x419612=_0x74ed62;if(this['_desired'])return!![];const _0x2e44b1=this[_0x419612(0x137)][_0x419612(0x2ab)];if(!_0x2e44b1)return![];return this[_0x419612(0x2c4)]=_0x2e44b1['openDB'](_0x5794e4,{'dupSort':![]}),this[_0x419612(0x204)]=_0x2e44b1[_0x419612(0xe5)](_0x3d77f9,{'dupSort':![]}),!![];}async[_0x74ed62(0x1ce)](){const _0x569bda=_0x74ed62;if(!this[_0x569bda(0x1b5)]())return;const _0x47d2dc=_0x569bda(0x232),_0x182e65=0x1,_0x5cfc2d=this[_0x569bda(0x2c4)][_0x569bda(0x106)](_0x47d2dc)??0x0;if(_0x5cfc2d>=_0x182e65)return;const _0x421d02=_0x3d769e=>{const _0x295d3e=_0x569bda;if(_0x3d769e===_0x295d3e(0x27e))return _0x295d3e(0x25a);if(_0x3d769e===_0x295d3e(0x2b8))return _0x295d3e(0x258);return _0x3d769e;};await this[_0x569bda(0x137)]['_systemEnv'][_0x569bda(0x1d2)][_0x569bda(0x1bc)](()=>{const _0x2141a3=_0x569bda;for(const _0x4841ed of[_0x2141a3(0x116),_0x2141a3(0x314)]){for(const {key:_0x5c0b51,value:_0x5a3592}of this[_0x2141a3(0x2c4)][_0x2141a3(0xe7)]({'start':_0x4841ed,'end':_0x4841ed+'\xff'})){if(typeof _0x5c0b51!==_0x2141a3(0x2c5)||!_0x5c0b51[_0x2141a3(0xda)](_0x4841ed))break;const _0x89d8c9=_0x421d02(_0x5a3592[_0x2141a3(0xf1)]);if(_0x89d8c9!==_0x5a3592[_0x2141a3(0xf1)])this[_0x2141a3(0x2c4)][_0x2141a3(0x2f3)](_0x5c0b51,{..._0x5a3592,'mode':_0x89d8c9});}}this[_0x2141a3(0x2c4)][_0x2141a3(0x2f3)](_0x47d2dc,_0x182e65);});}['hasDesired'](){const _0x3ddb7e=_0x74ed62;return!!this[_0x3ddb7e(0x2c4)];}[_0x74ed62(0x320)](_0x49aa87,_0xd4fd87){const _0x5f26c8=_0x74ed62;if(!this[_0x5f26c8(0x1b5)]())return null;const _0x40d9ab=_0x49aa87+'/'+_0xd4fd87;return this['_refreshDesiredSnapshot'](),this['_desiredOverlay'][_0x5f26c8(0x106)](_0x40d9ab)??this['_desired'][_0x5f26c8(0x106)](_0x40d9ab)??null;}['_refreshDesiredSnapshot'](){const _0x450322=_0x74ed62;if(!_0x482b9f)return;try{this['okdb'][_0x450322(0x1c2)]?.['db']?.['resetReadTxn']?.();}catch{}}async[_0x74ed62(0x154)](_0x8298a,_0x2da25c,_0x23cd9d){const _0x35eb09=_0x74ed62;if(!this['_ensureDesired']())return null;const _0x5a0df8=_0x8298a+'/'+_0x2da25c;this[_0x35eb09(0x2da)]();const _0x3df7cb=this[_0x35eb09(0x310)][_0x35eb09(0x106)](_0x5a0df8)??this[_0x35eb09(0x2c4)][_0x35eb09(0x106)](_0x5a0df8)??{'version':0x0},_0x34255c=(_0x3df7cb['version']||0x0)+0x1,_0x25893e={..._0x3df7cb,..._0x23cd9d,'version':_0x34255c,'updatedAt':Date[_0x35eb09(0x19d)]()};this[_0x35eb09(0x310)]['set'](_0x5a0df8,_0x25893e);try{await this['okdb'][_0x35eb09(0x1c2)][_0x35eb09(0x1d2)][_0x35eb09(0x1bc)](()=>{const _0x547133=_0x35eb09;this['_desired'][_0x547133(0x2f3)](_0x5a0df8,_0x25893e);});}finally{if(this['_desiredOverlay'][_0x35eb09(0x106)](_0x5a0df8)===_0x25893e)this[_0x35eb09(0x310)][_0x35eb09(0x1a3)](_0x5a0df8);}return _0x34255c;}['listDesired'](_0x4223be){const _0x50a8de=_0x74ed62;if(!this[_0x50a8de(0x1b5)]())return[];this[_0x50a8de(0x2da)]();const _0x20cd38=_0x4223be+'/',_0x4cf9c3=[];for(const {key:_0x3bea73,value:_0x1f77c3}of this['_desired'][_0x50a8de(0xe7)]({'start':_0x20cd38,'end':_0x20cd38+'\xff'})){if(typeof _0x3bea73!=='string'||!_0x3bea73['startsWith'](_0x20cd38))break;_0x4cf9c3[_0x50a8de(0x2a4)]({'key':_0x3bea73['slice'](_0x20cd38[_0x50a8de(0x200)]),'value':_0x1f77c3});}return _0x4cf9c3;}[_0x74ed62(0x153)](_0x4401ab){const _0x1a53c1=_0x74ed62;if(!this[_0x1a53c1(0x1b5)]())return null;return this[_0x1a53c1(0x204)][_0x1a53c1(0x106)](_0x4401ab)??null;}async[_0x74ed62(0x16e)](_0x24aafa,_0x582cda,_0x33b46b={}){const _0x49d760=_0x74ed62;if(!this[_0x49d760(0x1b5)]())return null;let _0x5471b6;return await this[_0x49d760(0x137)][_0x49d760(0x1c2)]['_writer'][_0x49d760(0x1bc)](()=>{const _0x4858c6=_0x49d760,_0x1ab1aa=this[_0x4858c6(0x204)][_0x4858c6(0x106)](_0x24aafa)||{'epoch':0x0};_0x5471b6=(_0x1ab1aa[_0x4858c6(0x18b)]||0x0)+0x1,this['_cmd'][_0x4858c6(0x2f3)](_0x24aafa,{..._0x1ab1aa,..._0x33b46b,'cmd':_0x582cda,'epoch':_0x5471b6,'updatedAt':Date['now']()});}),_0x5471b6;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x46fe23,'nodeKey':_0x4b7a3f,'logicalKey':_0x312863,'slotKey':_0x1c35bb,'PROCESS_ENV':_0x4c0b96,'NODE_TYPE':_0x4523cc},okdbProcessRegistry;}function _0xef45(){const _0x24e50e=['_onTick','catch','resetFts','_handlePoke','http','listNodes','ensureType','toISOString','online','setSchema','assign','startHeartbeat','_held','_adminRelay','ppid','listen','__vocab/version','fts:drop','shift','noteListenAddr','(code=','role','updateSupervisedChildStats','_pendingLocal','resetReadTxn','stopping','_processStartedAt','value','dropIndex','_drainOne','fts:registered','meta','_children','exports','\x20writer{depth=','item:update','replace','\x20phase=','withPoolHold','~lock','memoryUsage','round','ORPHAN\x20(env-closed\x20write)','_putRowAsync','process','remove','ms\x20p99=','error','ITEM_REMOVE','1406232RStjkv','_publishNow','info','_sampleOwnStats','SYSTEM_POKE','fanout','http-server','single','waiting','kind','_removeRowAsync','sync','addSupervisedChild','_lastCpuUsage','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.','_putRowSync','--test','_ownMeta','item:remove','SYSTEM_PROC','off','pid','external','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','_isWriter','registerIndex','liveThreadStats','_hbTimer','field:resolver_registered','repeat','_bpParkedTotal','reduce','disable','_enqueuedAt','has','cpuWindowMs','processors','_nestedTotal','\x20in\x20','7YcioEg','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','(worst\x20','putSync','worker','_timer',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','compact','heldBy','txn:start','deaths','item:pending','building','_heartbeatInFlight','_wantDbOf','primary','extend','code','split','~processes:desired','caps','_holderDead','_onItem','system:bus_state_change','object','--watch','~processes','index:drop','okdb-lock:\x20env\x20closed','user','publishChildRow','3708mysbGQ','prependListener','type:registered','_isReader','_wantDb','okdb-writer:\x20env\x20closing\x20—\x20retry','1ofN:','state','min','getClock','unref','push','_heldTotal','_sandbox','29419oSoVzA','registry\x20heartbeat\x20skipped\x20(writer=','nodeKey','event','_rootDb','_changefeed',':want','feed:','release','embedded','dedupeMax','then','deregisterSelf','stopped','dead','\x20worker\x20slot=','rss','async','_flushTimer','_inflight',');\x20','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','size','cursorKey','busy','--inspect','includes','running','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','_desired','string','created','[okdb-cluster]\x20','ttl:set','ITEM_PENDING','cli','\x20parkedNow=','_publishFailWarned','firstTs','cpus','list','SWAP','ttlMs','bus:proc','reject','_key','write','ttl:expired','seq','killable','node:events','_refreshDesiredSnapshot','appendFileSync','start','uncaughtException','ms\x20on\x20env=','filter','\x20===','startedAt','runtimeProcessesView','closing','removeNode','\x20oldestPendingMs=','_committed','_kind','entries','loop-lag\x20','processor:resumed','\x20while\x20this\x20process\x20runs\x20','error:\x20','count','sort','_report','raw-remove','respawnTimer','schema:drop','put','emit','dumpedAt','--eval','processingSig','indexOf','offWindow','draining','_nodeDead','_released','all','map','processorId','migrations','4515bcjuas','host','1385351fzqKpz','heapUsed','SIGKILL','hostname','processing','_threadStats','processor:retry','committed','ephemeral','_rawDb','set','\x20—\x20','729054uhOxzS','_desiredOverlay','2.6.4','_onProcEvent','unclaimed','procmodeack/','type:drop','_nestedWarned','_quantum','cluster','send','_enableChangelog','decommission','~processes:cmd','[okdb-cluster]\x20respawning\x20worker\x20slot=','_buildChildRow','setTtl','getDesired','\x0a\x20\x20\x20\x20\x20\x20',')\x20exited\x20','standalone','system:env_release','\x20worker(s)\x20remaining','_participate','copy','registry-publish','heartbeatMs','some','_heartbeatTimer','schema:set','_envs','_startedAt','_draining','flushLmdb','_markSeen','true','startsWith','nodesView','decommissioning','status','crypto','_isStale','options','_done','http\x20worker\x20child\x20failed:\x20','_lockDbOf','exit','openDB','_bpWaiters','getRange','join','\x20times\x20in\x20','FTS_DROP','license:removed','clearThreadStats','\x20HTTP\x20server(s)\x20on\x20port\x20','env','participate','resetting','mode','_lockDb','_outstanding','toFixed','max','env:removed','CHANGEFEED_QUANTUM','_assertUsable','find','maxMs','stop','\x20died\x20','ms\x20max=','_log','processes','open','onWindow','listenAddr','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','_started','INDEX_READY','get','afterWrite','threads','bus:type_drop','_role','index:progress','system','race','register','decommissioned','message','_scheduleFlush','namespace','hasDesired','next','3ATxROk','procmode/','acquiredAt','--print','functions','listAll','execArgv','selfKey','label','quantum','unhandledRejection','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','_db','ttl:clear','_windowCbs','_instanceId','_listenAddr','disconnect','node','add','2598hVvmQe','enabled','_lastPublishAt','_versionSkewWarned','compaction','\x20pid=','instances','flushDebounce','creating','_buildOwnRow','fork','closed','_onPoke','_seen','okdb','_admissionTimer','_durs','putNode','_singletonLock','_selfKey','tryAcquire','setLogger','isHeld','_pending','listening','dropType','_nodeDbFor','childTransaction','load','okdb-diag.','txn:end','prototype','expiresAt','close','slot','index:registered','_statusEnv','slice','registry\x20publish\x20failing:\x20','slotKey','tierList','_lastCpuWindowMs','getCmd','setDesired','children','parkedNow','allSettled','commit','_lastCpuAt','fn-runner','markClosed','_closed','ESRCH','number','_activateProcesses','function','fts:reset','kill','connected','_drain','depth','singletonClaims','holder','dropFts','registerType','40xdmKua','envsOpen','type','call','bumpCmd','claimGated','view','consecutiveFailures','keys','oldestPendingMs','_flushDebounce','isEnabled','SYNC_COMMITS','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','isConnected','160TyfypD','removeSync','system:clock_change','REMOVE','processingStatusView','ITEM_UPDATE','\x20drainAge=','\x20│\x20','splice','fromEntries','force','resolve','_admissionStarted','_baselines','.log','attach','workers','detachConsole','epoch','system:type_drop','once','_dedupeKey','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','_coordinator','processor:paused','ms\x20env=','clearTtl','getChanges','_cursors','abs','license:activated','license:invalid','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','_wantDbHandle','MAX_POOL_HOLDS','name','now','_clusterWorkerAttached','fast','rowKey','_handleInProcess','processKey','delete','pushEphemeral','FTS_REGISTERED','removeSupervisedChild','supervisorKey','bus:poke','view:progress','_lock','processor:error','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','stopHeartbeat','values','_maybePublish','stderr','ingest','\x20(slot=','ENV_CLOSING_RETRY','_onPending','_ensureDesired','publishOwnRow','updatedAt','isWorker','_nodeDb','path','raw-put','transaction','_highWater','started','_startAdmission','hasOwnProperty','ITEM_CREATE','_systemEnv','_buckets','\x20@\x20','\x0a===\x20OKDB_DIAG\x20','VIEW_PROGRESS','signalWant','processor:progress','\x20ipc\x20error:\x20','warn','entry','attachFeed','dropping','_migrateVocab','_caps','test','mkdirSync','_writer','_collectWriterFacet','_singletonLocks','index:reset','reset','[okdb-cluster]\x20slot=','commitsPerSec','processor:ready','sandbox','dropSchema','[okdb-cluster]\x20worker\x20pid=','_collectSingletonClaims','isActive','inst:','616004FJYOlS','heapTotal','_onStop','_rowKey','_handlePending','stats','isDead','__okdbSlot','sync:apply','reap','default','unique:violation_resolved','percentile','ms\x20activeWriters=','clear','halted','_lastCpuPct','_buildProcessingFacet','cpuUsage','win32','index:ready','_groupByProcess','floor','transactionSync','note','\x20\x20#','node:perf_hooks',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','confirm','_dedupeMax','_supervisorKey','parse','length','null','enable','treeView','_cmd','recent\x20writes\x20(newest\x20first)','msg','workersConfigured','894ulpIbj','version','ready','maxExtra','engines','_nodeDbCache','getProcess','events','log','stack','commitP99Ms','\x20worker(s)\x20still\x20serving','setOwnMeta','uptime','FTS_RESET','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','rows=','bus:drain','setupPrimary','processorsView','writerStatus','stringify','perf_hooks','lifecycle','txn:rollback','_acquiredAt'];_0xef45=function(){return _0x24e50e;};return _0xef45();}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x27f9c8=_0x4abb0e;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x4476bf=require$$0$4,{clampTimerDelay:_0x38c169}=requireOkdbTimers(),{EVENTS:_0x5c30fa,CHANGE_ACTIONS:_0x5ba9fb}=requireOkdbEnums(),{LOOP:_0x26bffb}=requireOkdbLoopMonitor(),_0x40b252=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0xaf3231=0x5,_0x5c1e35=0x2710;class _0x41c6e3 extends _0x4476bf{constructor(_0x3c103a,_0x3dfff5={}){const _0x369b18=_0x35c1;super(),this[_0x369b18(0x137)]=_0x3c103a,this[_0x369b18(0x317)]=_0x3dfff5[_0x369b18(0x11e)]??_0x40b252,this[_0x369b18(0x174)]=_0x3dfff5[_0x369b18(0x130)]??_0xaf3231,this[_0x369b18(0x1fd)]=_0x3dfff5[_0x369b18(0x2b1)]??_0x5c1e35,this[_0x369b18(0x104)]=![],this['_cursors']=new Map(),this['_baselines']=new Map(),this[_0x369b18(0x140)]=new Map(),this[_0x369b18(0x2b9)]=null,this[_0x369b18(0xd6)]=![],this[_0x369b18(0x136)]=new Set(),this[_0x369b18(0x239)]=new Set(),this[_0x369b18(0x290)]=_0x42d370=>this[_0x369b18(0x1a1)](_0x42d370),this[_0x369b18(0x1b4)]=_0x47c521=>this['_handlePending'](_0x47c521),this[_0x369b18(0x135)]=_0xb423d1=>this[_0x369b18(0x225)](_0xb423d1),this[_0x369b18(0x1e2)]=()=>this['stop']();}[_0x27f9c8(0x2dc)](){const _0x5c1d05=_0x27f9c8;if(this[_0x5c1d05(0x104)])return;this[_0x5c1d05(0x104)]=!![];for(const [_0xf80502,_0x20d868]of this[_0x5c1d05(0x137)][_0x5c1d05(0xd4)]){if(_0xf80502[_0x5c1d05(0xda)]('~'))continue;try{_0x20d868[_0x5c1d05(0x31a)]();}catch{}}for(const [_0x25b6b4,_0x272fc5]of this[_0x5c1d05(0x137)][_0x5c1d05(0xd4)]){if(_0x25b6b4[_0x5c1d05(0xda)]('~'))continue;try{this[_0x5c1d05(0x186)][_0x5c1d05(0x30d)](_0x25b6b4,_0x272fc5['getClock']()||0x0);}catch{}}const {events:_0x19ef5c}=this[_0x5c1d05(0x137)];_0x19ef5c['on'](_0x5c30fa[_0x5c1d05(0x2c9)],this[_0x5c1d05(0x1b4)]),_0x19ef5c['on'](_0x5c30fa[_0x5c1d05(0x1c1)],this['_onItem']),_0x19ef5c['on'](_0x5c30fa[_0x5c1d05(0x17e)],this[_0x5c1d05(0x290)]),_0x19ef5c['on'](_0x5c30fa[_0x5c1d05(0x252)],this['_onItem']),_0x19ef5c['on'](_0x5c30fa[_0x5c1d05(0x257)],this['_onPoke']),_0x19ef5c[_0x5c1d05(0x18d)](_0x5c30fa['SYSTEM_STOPPED'],this['_onStop']);}[_0x27f9c8(0xfb)](){const _0x4f7363=_0x27f9c8;if(!this[_0x4f7363(0x104)])return;this[_0x4f7363(0x104)]=![];const {events:_0x1b9b65}=this['okdb'];_0x1b9b65[_0x4f7363(0x267)](_0x5c30fa[_0x4f7363(0x2c9)],this['_onPending']),_0x1b9b65[_0x4f7363(0x267)](_0x5c30fa[_0x4f7363(0x1c1)],this[_0x4f7363(0x290)]),_0x1b9b65[_0x4f7363(0x267)](_0x5c30fa[_0x4f7363(0x17e)],this['_onItem']),_0x1b9b65[_0x4f7363(0x267)](_0x5c30fa[_0x4f7363(0x252)],this['_onItem']),_0x1b9b65[_0x4f7363(0x267)](_0x5c30fa['SYSTEM_POKE'],this['_onPoke']);try{_0x1b9b65['off'](_0x5c30fa['SYSTEM_STOPPED'],this[_0x4f7363(0x1e2)]);}catch{}this[_0x4f7363(0x2b9)]&&(clearTimeout(this['_flushTimer']),this['_flushTimer']=null),this[_0x4f7363(0x140)]['clear'](),this[_0x4f7363(0x195)][_0x4f7363(0x1ee)](),this['_baselines']['clear'](),this[_0x4f7363(0x136)][_0x4f7363(0x1ee)](),this[_0x4f7363(0x239)]['clear']();}['_dedupeKey'](_0x5cdc72,_0x35ed12,_0xc447bc,_0x1be245){return _0x5cdc72+'\x00'+_0x35ed12+'\x00'+_0xc447bc+'\x00'+_0x1be245;}['_markSeen'](_0x4ecd77,_0x29bd2b,_0x3cef6c,_0x40656d){const _0x3469cf=_0x27f9c8,_0x2f1116=this['_dedupeKey'](_0x4ecd77,_0x29bd2b,_0x3cef6c,_0x40656d);if(this['_seen'][_0x3469cf(0x275)](_0x2f1116))return![];this[_0x3469cf(0x136)][_0x3469cf(0x128)](_0x2f1116);if(this['_seen'][_0x3469cf(0x2bd)]>this[_0x3469cf(0x1fd)]){const _0x5d7814=this[_0x3469cf(0x136)][_0x3469cf(0x1ae)]()['next']()[_0x3469cf(0x23d)];this[_0x3469cf(0x136)][_0x3469cf(0x1a3)](_0x5d7814);}return!![];}[_0x27f9c8(0x1e4)](_0x238a8a){const _0x1d9c74=_0x27f9c8;if(!this[_0x1d9c74(0x104)]||!_0x238a8a)return;const {env:_0x4305f6,type:_0x953780,key:_0x295c26,clock:_0x118397}=_0x238a8a;if(_0x4305f6==null||_0x953780==null||_0x295c26==null)return;if(typeof _0x4305f6==='string'&&_0x4305f6['startsWith']('~'))return;if(typeof _0x953780===_0x1d9c74(0x2c5)&&_0x953780[_0x1d9c74(0xda)]('~'))return;this[_0x1d9c74(0x239)][_0x1d9c74(0x128)](this[_0x1d9c74(0x18e)](_0x4305f6,_0x953780,_0x295c26,_0x118397)),this[_0x1d9c74(0x239)]['size']>this['_dedupeMax']&&this[_0x1d9c74(0x239)]['delete'](this[_0x1d9c74(0x239)]['values']()[_0x1d9c74(0x114)]()[_0x1d9c74(0x23d)]);}[_0x27f9c8(0x1a1)](_0x553466){const _0x521a1a=_0x27f9c8;if(!this[_0x521a1a(0x104)]||!_0x553466)return;const {env:_0x1c00a4,type:_0x207d08,key:_0x1ce124,clock:_0x21f78e,origin:_0x1cd990,action:_0x53489f,newValue:_0x16922d,oldValue:_0x13f597}=_0x553466;if(_0x1c00a4==null||_0x207d08==null||_0x1ce124==null)return;if(typeof _0x1c00a4===_0x521a1a(0x2c5)&&_0x1c00a4[_0x521a1a(0xda)]('~'))return;if(typeof _0x207d08===_0x521a1a(0x2c5)&&_0x207d08[_0x521a1a(0xda)]('~'))return;this['_pendingLocal'][_0x521a1a(0x1a3)](this['_dedupeKey'](_0x1c00a4,_0x207d08,_0x1ce124,_0x21f78e));if(!this[_0x521a1a(0xd8)](_0x1c00a4,_0x207d08,_0x1ce124,_0x21f78e))return;const _0xd9118c=_0x53489f===_0x5ba9fb[_0x521a1a(0x17c)]?_0x521a1a(0x24f):_0x521a1a(0x2f3);this[_0x521a1a(0x2f4)]('change',{'env':_0x1c00a4,'type':_0x207d08,'key':_0x1ce124,'op':_0xd9118c,'clock':_0x21f78e,'origin':_0x1cd990,'value':_0xd9118c===_0x521a1a(0x24f)?null:_0x16922d,'prevValue':_0x13f597});}[_0x27f9c8(0x225)](_0x38532a){const _0x41f791=_0x27f9c8;if(!this[_0x41f791(0x104)])return;if(!_0x38532a||typeof _0x38532a['env']!=='string'||typeof _0x38532a[_0x41f791(0x16c)]!==_0x41f791(0x2c5))return;const {env:_0x53c400,type:_0x4d53c7}=_0x38532a;if(_0x53c400[_0x41f791(0xda)]('~')||_0x4d53c7[_0x41f791(0xda)]('~'))return;this[_0x41f791(0x140)]['set'](_0x53c400+'\x00'+_0x4d53c7,{'env':_0x53c400,'type':_0x4d53c7}),this[_0x41f791(0x111)]();}['_scheduleFlush'](){const _0x328227=_0x27f9c8;if(this['_flushTimer'])return;const _0x4827c7=()=>{const _0x3a3655=_0x35c1;this[_0x3a3655(0x2b9)]=null,this['_drain']()['catch'](()=>{});};this[_0x328227(0x2b9)]=setTimeout(_0x4827c7,_0x38c169(this[_0x328227(0x174)]));}async[_0x27f9c8(0x164)](){const _0x27b0fd=_0x27f9c8;if(this[_0x27b0fd(0xd6)]){this['_scheduleFlush']();return;}this[_0x27b0fd(0xd6)]=!![];try{const _0x2f58c1=[...this[_0x27b0fd(0x140)][_0x27b0fd(0x1ae)]()];this[_0x27b0fd(0x140)][_0x27b0fd(0x1ee)]();let _0x5ef0dc=![];for(const {env:_0x2b2070,type:_0x3ca274}of _0x2f58c1){try{const _0x5040aa=await this[_0x27b0fd(0x23f)](_0x2b2070,_0x3ca274);if(_0x5040aa)_0x5ef0dc=!![];}catch{this[_0x27b0fd(0x140)][_0x27b0fd(0x30d)](_0x2b2070+'\x00'+_0x3ca274,{'env':_0x2b2070,'type':_0x3ca274}),_0x5ef0dc=!![];}}if(_0x5ef0dc||this['_pending'][_0x27b0fd(0x2bd)]>0x0)this[_0x27b0fd(0x111)]();}finally{this[_0x27b0fd(0xd6)]=![];}}async[_0x27f9c8(0x23f)](_0x27fd0e,_0x240aef){const _0x31172d=_0x27f9c8,_0x579bc8=await this['okdb']['_openEnvLazy'](_0x27fd0e),_0x3fb706=_0x27fd0e+'\x00'+_0x240aef;!this[_0x31172d(0x195)]['has'](_0x3fb706)&&(!this[_0x31172d(0x186)][_0x31172d(0x275)](_0x27fd0e)&&(_0x579bc8[_0x31172d(0x31a)](),this[_0x31172d(0x186)][_0x31172d(0x30d)](_0x27fd0e,_0x579bc8[_0x31172d(0x2a2)]()||0x0)),this[_0x31172d(0x195)]['set'](_0x3fb706,this[_0x31172d(0x186)][_0x31172d(0x106)](_0x27fd0e)));const _0x3b6267=this[_0x31172d(0x195)][_0x31172d(0x106)](_0x3fb706),_0x3e101b=_0x579bc8[_0x31172d(0x2a2)](_0x240aef)||0x0;if(_0x3e101b<=_0x3b6267)return![];const _0x1ec563=_0x3b6267+this[_0x31172d(0x317)],_0x2894bd=Math[_0x31172d(0x2a1)](_0x3e101b,_0x1ec563),_0x42e6e6=_0x26bffb['enabled']?_0x26bffb[_0x31172d(0x19d)]():0x0,_0x108e8f=Array['from'](_0x579bc8[_0x31172d(0x194)](_0x240aef,_0x3b6267+0x1,_0x2894bd));let _0x36f31e=_0x3b6267;for(const _0x10c79a of _0x108e8f){const {clock:_0x1bf790,key:_0x1cb651,action:_0x21ac55,origin:_0x55895e}=_0x10c79a;if(_0x1bf790>_0x36f31e)_0x36f31e=_0x1bf790;if(_0x1cb651==null)continue;if(this['_pendingLocal'][_0x31172d(0x275)](this[_0x31172d(0x18e)](_0x27fd0e,_0x240aef,_0x1cb651,_0x1bf790)))continue;if(!this[_0x31172d(0xd8)](_0x27fd0e,_0x240aef,_0x1cb651,_0x1bf790))continue;let _0x8e1839,_0x4d0ced;if(_0x21ac55===_0x5ba9fb[_0x31172d(0x17c)])_0x8e1839='remove',_0x4d0ced=null;else{const _0x9ea96a=_0x579bc8[_0x31172d(0x106)](_0x240aef,_0x1cb651);_0x9ea96a==null?(_0x8e1839=_0x31172d(0x24f),_0x4d0ced=null):(_0x8e1839=_0x31172d(0x2f3),_0x4d0ced=_0x9ea96a);}this[_0x31172d(0x2f4)]('change',{'env':_0x27fd0e,'type':_0x240aef,'key':_0x1cb651,'op':_0x8e1839,'clock':_0x1bf790,'origin':_0x55895e,'value':_0x4d0ced});}if(_0x26bffb[_0x31172d(0x12a)])_0x26bffb[_0x31172d(0x1f8)](_0x31172d(0x2ae)+_0x27fd0e+':'+_0x240aef,_0x26bffb[_0x31172d(0x19d)]()-_0x42e6e6,'n='+_0x108e8f[_0x31172d(0x200)]);return this[_0x31172d(0x195)][_0x31172d(0x30d)](_0x3fb706,Math['max'](_0x36f31e,_0x2894bd)),_0x579bc8['getClock'](_0x240aef)>_0x2894bd;}[_0x27f9c8(0xdd)](){const _0x5e24d8=_0x27f9c8;return{'started':this[_0x5e24d8(0x104)],'quantum':this[_0x5e24d8(0x317)],'flushDebounce':this[_0x5e24d8(0x174)],'cursors':Object[_0x5e24d8(0x182)]([...this[_0x5e24d8(0x195)][_0x5e24d8(0x2e8)]()]['map'](([_0x159e6d,_0x4b1662])=>[_0x159e6d[_0x5e24d8(0x246)]('\x00',':'),_0x4b1662])),'pending':this[_0x5e24d8(0x140)]['size'],'seen':this[_0x5e24d8(0x136)][_0x5e24d8(0x2bd)]};}}return _0x41c6e3[_0x27f9c8(0xf7)]=_0x40b252,okdbChangefeed={'OKDBChangefeed':_0x41c6e3},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x1de6aa=_0x4abb0e;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x494e9a=require$$1$1,_0x2fc879=require$$1,{EVENTS:_0xf6a2e9}=requireOkdbEnums(),_0xf122ec=require$$0$3,{slotKey:_0x15b762}=requireOkdbProcessRegistry(),_0x261c8e=Number(process.env.OKDB_CLUSTER_RESPAWN_BACKOFF_MS)||0xfa,_0x13b2f3=0xfa0,_0x33e8f0=0x5,_0x2d02b0=0x2710,_0x2ff266=0xbb8,_0x3cde3d=0x7d0,_0x42a0fa='__okdbCluster',_0x5f1669=_0x1de6aa(0x30b),_0x4ff7e5='log',_0x86c093='stats',_0x14583d=[_0xf6a2e9[_0x1de6aa(0x1c6)],_0xf6a2e9[_0x1de6aa(0x1a5)],_0xf6a2e9[_0x1de6aa(0xea)],_0xf6a2e9[_0x1de6aa(0x216)],_0xf6a2e9['INDEX_PROGRESS'],_0xf6a2e9[_0x1de6aa(0x105)],_0xf6a2e9['INDEX_RESET'],_0xf6a2e9['INDEX_REGISTERED'],_0x1de6aa(0x1d9),_0x1de6aa(0x1c8),_0x1de6aa(0x1ab),_0x1de6aa(0x191),_0x1de6aa(0x2ea),_0x1de6aa(0x309)],_0x4dff9f=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0,_0x3a25e7=0x64;function _0x412949(_0x45942f){const _0x641fd7=_0x1de6aa;if(!_0x45942f)return _0x641fd7(0x201);const _0x54abff=(_0x45942f['processors']||[])['map'](_0x17c071=>[_0x17c071[_0x641fd7(0xee)],_0x17c071['id'],_0x17c071[_0x641fd7(0xf1)],_0x17c071[_0x641fd7(0x2a0)],!!_0x17c071['paused'],!!_0x17c071[_0x641fd7(0x313)],!!_0x17c071[_0x641fd7(0x16f)],_0x17c071[_0x641fd7(0x282)]?.[_0x641fd7(0x268)]??null,_0x17c071[_0x641fd7(0x251)]?String(_0x17c071[_0x641fd7(0x251)]?.[_0x641fd7(0x110)]??_0x17c071[_0x641fd7(0x251)]):null]);return JSON[_0x641fd7(0x21d)]([!!_0x45942f['participate'],_0x54abff]);}function _0x1b6e78({workers:_0x220307,makeOkdb:_0x5b6798,port:_0x51e82e,primaryOkdb:_0x293f5d,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0x3bdffc=_0x1de6aa;if(_0x494e9a['isPrimary'])return childEntry&&_0x494e9a[_0x3bdffc(0x21a)]({'exec':_0x2fc879[_0x3bdffc(0xe8)](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0x17711a=_0x3bdffc,_0x59f1e8=[];for(let _0x44142e=0x0;_0x44142e<process[_0x17711a(0x11b)]['length'];_0x44142e++){const _0x3b3bbd=process['execArgv'][_0x44142e];if(_0x3b3bbd[_0x17711a(0xda)](_0x17711a(0x263))||_0x3b3bbd['startsWith'](_0x17711a(0x293))||_0x3b3bbd[_0x17711a(0xda)](_0x17711a(0x2c0)))continue;if(_0x3b3bbd==='-e'||_0x3b3bbd===_0x17711a(0x2f6)||_0x3b3bbd==='-p'||_0x3b3bbd===_0x17711a(0x118)){_0x44142e++;continue;}_0x59f1e8['push'](_0x3b3bbd);}return _0x59f1e8;})())}),_0x3af157({'workers':_0x220307,'port':_0x51e82e,'primaryOkdb':_0x293f5d,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x51e82e});return _0x1ff1ad({'makeOkdb':_0x5b6798,'port':_0x51e82e});}function _0x3af157({workers:_0x1d8313,port:_0x552855,primaryOkdb:_0x152b91,workerEnv:_0x34ae52,workerRole:_0x397248,listenAddr:_0x5822e1}){const _0x9a011d=_0x1de6aa,_0x2a96ac=new Map(),_0x484601=new Map();let _0x2a4b4d=![];const _0x434724=_0x9a1cb3=>_0x9a1cb3?.[_0x9a011d(0x1e7)],_0x5df398=_0x5bd288=>{const _0x15c518=_0x9a011d,_0x459148=_0x494e9a[_0x15c518(0x133)]({...process.env,..._0x34ae52||{},'OKDB_CLUSTER_SLOT':String(_0x5bd288)});return _0x459148[_0x15c518(0x1e7)]=_0x5bd288,_0x2a96ac['set'](_0x459148['process'][_0x15c518(0x268)],{'worker':_0x459148,'startedAt':Date[_0x15c518(0x19d)](),'slot':_0x5bd288}),_0x459148['on'](_0x15c518(0x251),_0x380cae=>{const _0x194ff4=_0x15c518;console['log'](_0x194ff4(0x1dc)+_0x459148['process'][_0x194ff4(0x268)]+_0x194ff4(0x1c9)+(_0x380cae?.[_0x194ff4(0x110)]??_0x380cae));}),_0x459148['on'](_0x15c518(0x22a),()=>_0x31870b()),_0x459148;},_0x2e2213=_0x492e59=>{const _0x42879e=_0x9a011d;for(const {worker:_0x48c42e}of _0x2a96ac[_0x42879e(0x1ae)]()){if(_0x48c42e[_0x42879e(0x1e6)]()||!_0x48c42e[_0x42879e(0x178)]())continue;try{_0x48c42e[_0x42879e(0x319)](_0x492e59);}catch{}}};_0x152b91?.['_activateProcesses']?.({'kind':_0x9a011d(0x289),'listenAddr':_0x5822e1})[_0x9a011d(0x223)](()=>{}),_0x152b91?.['processes']?.[_0x9a011d(0x214)]?.({'workersConfigured':_0x1d8313});const _0x34f6ca={'engines':!![],'processors':!![],'compaction':!![],..._0x397248,'http':!![]},_0x31870b=()=>{const _0x252268=_0x9a011d,_0x2c5fe8=_0x152b91?.['processes'];if(!_0x2c5fe8||!_0x2c5fe8['_isWriter'])return;const _0x5ca329=_0x2c5fe8['selfKey'];for(const {worker:_0x23b1fa,startedAt:_0x19bb69,slot:_0x42114a,stats:_0x359ba7,processing:_0x51a130}of _0x2a96ac[_0x252268(0x1ae)]()){if(_0x23b1fa[_0x252268(0x1e6)]())continue;const _0x4f8c2c=_0x2c5fe8[_0x252268(0x113)]?.()&&_0x2c5fe8['getDesired'](_0x252268(0x14b),_0x515752(_0x42114a))?.[_0x252268(0x31b)]===!![];_0x2c5fe8[_0x252268(0x298)]({'pid':_0x23b1fa[_0x252268(0x24e)][_0x252268(0x268)],'startedAt':_0x19bb69,'kind':_0x252268(0x259),'supervisorKey':_0x5ca329,'slot':_0x42114a,'slotKey':_0x515752(_0x42114a),'role':_0x34f6ca,'listenAddr':_0x5822e1,'lifecycle':_0x4f8c2c?_0x252268(0xdc):_0x252268(0x2c2),'processing':_0x51a130??null,'stats':_0x359ba7??null})[_0x252268(0x223)](()=>{});}},_0x515752=_0x5ecc41=>_0x15b762('cluster:'+_0x552855,_0x5ecc41),_0x360bfa=_0x59ed01=>{const _0x4f06c1=_0x9a011d,_0x501c5c=_0x152b91?.[_0x4f06c1(0xff)];if(!_0x501c5c?.['hasDesired']?.())return![];return _0x501c5c[_0x4f06c1(0x320)](_0x4f06c1(0x14b),_0x515752(_0x59ed01))?.[_0x4f06c1(0x31b)]===!![];};for(let _0x37ec0d=0x0;_0x37ec0d<_0x1d8313;_0x37ec0d++){const _0x11320d=_0x360bfa(_0x37ec0d);_0x484601[_0x9a011d(0x30d)](_0x37ec0d,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x11320d,'respawnTimer':null}),_0x11320d?console[_0x9a011d(0x210)](_0x9a011d(0x1d7)+_0x37ec0d+_0x9a011d(0x217)):_0x5df398(_0x37ec0d);}const _0xbb97ef=()=>{const _0x205f14=_0x9a011d,_0xd25650=_0x152b91?.[_0x205f14(0xff)];if(!_0xd25650?.['_isWriter']||!_0xd25650[_0x205f14(0x113)]?.())return;for(const [_0x571fed,_0x5724a8]of _0x484601[_0x205f14(0x2e8)]()){const _0x5e7a6b=_0xd25650['getDesired'](_0x205f14(0x14b),_0x515752(_0x571fed)),_0x331252=_0x5e7a6b?.[_0x205f14(0x31b)]===!![],_0x12d995=_0x5e7a6b?.['kill']===!![];if(_0x331252&&!_0x5724a8['dead']){_0x5724a8[_0x205f14(0x2b5)]=!![];_0x5724a8[_0x205f14(0x2f1)]&&(clearTimeout(_0x5724a8[_0x205f14(0x2f1)]),_0x5724a8['respawnTimer']=null);for(const {worker:_0x7ba998}of _0x2a96ac[_0x205f14(0x1ae)]()){if(_0x434724(_0x7ba998)!==_0x571fed||_0x7ba998[_0x205f14(0x1e6)]())continue;try{if(_0x12d995)_0x7ba998['process']['kill'](_0x205f14(0x305));else _0x7ba998['isConnected']()&&_0x7ba998[_0x205f14(0x126)]();}catch{}}console[_0x205f14(0x210)](_0x205f14(0x2c7)+(_0x12d995?'hard-killed':_0x205f14(0x10f))+_0x205f14(0x2b6)+_0x571fed+'\x20(durable\x20desired-state)');}else{if(!_0x331252&&_0x5724a8[_0x205f14(0x2b5)]&&_0x5e7a6b){_0x5724a8[_0x205f14(0x2b5)]=![],_0x5724a8['deaths']=[],_0x5724a8[_0x205f14(0x171)]=0x0;const _0x26761f=[..._0x2a96ac[_0x205f14(0x1ae)]()][_0x205f14(0xd1)](({worker:_0x1c9fb6})=>_0x434724(_0x1c9fb6)===_0x571fed&&!_0x1c9fb6['isDead']());!_0x26761f&&!_0x2a4b4d&&(_0x5df398(_0x571fed),console[_0x205f14(0x210)]('[okdb-cluster]\x20recommissioned\x20worker\x20slot='+_0x571fed));}}}},_0x5116a7=()=>{try{_0xbb97ef();}catch{}};_0x152b91?.['events']?.['on']?.(_0xf6a2e9[_0x9a011d(0x266)],_0x5116a7);const _0xccc1ff=[];if(_0x152b91?.['events']?.['on'])for(const _0x49793d of _0x14583d){const _0x329fa0=_0x572a72=>{_0x2e2213({[_0x42a0fa]:_0x5f1669,'event':_0x49793d,'data':_0x572a72??{}});};_0x152b91[_0x9a011d(0x20f)]['on'](_0x49793d,_0x329fa0),_0xccc1ff[_0x9a011d(0x2a4)]({'event':_0x49793d,'handler':_0x329fa0});}const _0x2eaf86=setInterval(()=>{_0xbb97ef(),_0x31870b();},_0x4dff9f);_0x2eaf86[_0x9a011d(0x2a3)]?.();const _0x57457e=(_0x5250c9,_0x7df8ae)=>{const _0x104915=_0x9a011d;if(!_0x7df8ae||typeof _0x7df8ae!=='object'||_0x7df8ae[_0x42a0fa]!==_0x4ff7e5)return;if(!_0x152b91?.[_0x104915(0x210)]?.[_0x104915(0x1b1)])return;const _0x5a907a=_0x7df8ae[_0x104915(0x1cb)]||{};_0x152b91['log'][_0x104915(0x1b1)]({..._0x5a907a,'msg':'[w'+_0x7df8ae[_0x104915(0x14b)]+']\x20'+(_0x5a907a[_0x104915(0x206)]??''),'meta':{..._0x5a907a[_0x104915(0x241)]||{},'worker':_0x7df8ae[_0x104915(0x14b)],'workerPid':_0x7df8ae[_0x104915(0x268)]}});};_0x494e9a['on'](_0x9a011d(0x110),_0x57457e);const _0x199479=(_0x64a6f0,_0x44d7e2)=>{const _0x10d686=_0x9a011d;if(!_0x44d7e2||typeof _0x44d7e2!=='object'||_0x44d7e2[_0x42a0fa]!==_0x86c093)return;const _0x397b00=_0x2a96ac[_0x10d686(0x106)](_0x64a6f0[_0x10d686(0x24e)]['pid']);if(_0x397b00){_0x397b00[_0x10d686(0x1e5)]={..._0x44d7e2[_0x10d686(0x1e5)],'at':Date[_0x10d686(0x19d)]()};if(_0x44d7e2[_0x10d686(0x307)]!==undefined){const _0x104b26=_0x412949(_0x44d7e2[_0x10d686(0x307)]);_0x104b26!==_0x397b00['processingSig']&&(_0x397b00[_0x10d686(0x2f7)]=_0x104b26,_0x797227()),_0x397b00['processing']=_0x44d7e2[_0x10d686(0x307)];}}};let _0x360761=null;const _0x797227=()=>{if(_0x360761||_0x2a4b4d)return;_0x360761=setTimeout(()=>{_0x360761=null;if(!_0x2a4b4d)_0x31870b();},_0x3a25e7),_0x360761['unref']?.();};_0x494e9a['on'](_0x9a011d(0x110),_0x199479),_0x494e9a['on'](_0x9a011d(0xe4),(_0x503173,_0x266955,_0x2dc7f8)=>{const _0x48b2ce=_0x9a011d,_0x298903=_0x503173[_0x48b2ce(0x24e)][_0x48b2ce(0x268)],_0x5df91b=_0x434724(_0x503173),_0x513f4d=_0x2a96ac[_0x48b2ce(0x106)](_0x298903);if(_0x513f4d&&_0x152b91?.[_0x48b2ce(0xff)])_0x152b91[_0x48b2ce(0xff)][_0x48b2ce(0x2e4)](_0x298903+':'+_0x513f4d['startedAt'])['catch'](()=>{});_0x2a96ac['delete'](_0x298903),console['log']('[okdb-cluster]\x20worker\x20pid='+_0x298903+_0x48b2ce(0x1b2)+(_0x5df91b??'?')+_0x48b2ce(0x322)+(_0x48b2ce(0x236)+_0x266955+',\x20signal='+(_0x2dc7f8??'none')+_0x48b2ce(0x2bb)+_0x2a96ac['size']+_0x48b2ce(0x325))),_0x31870b();if(_0x2a4b4d||_0x5df91b==null)return;const _0x59a77a=_0x484601[_0x48b2ce(0x106)](_0x5df91b);if(!_0x59a77a||_0x59a77a['dead'])return;const _0x2c3a75=Date['now']();_0x59a77a[_0x48b2ce(0x284)][_0x48b2ce(0x2a4)](_0x2c3a75),_0x59a77a['deaths']=_0x59a77a[_0x48b2ce(0x284)][_0x48b2ce(0x2df)](_0x48d4df=>_0x2c3a75-_0x48d4df<=_0x2d02b0);if(_0x59a77a[_0x48b2ce(0x284)][_0x48b2ce(0x200)]>=_0x33e8f0){_0x59a77a[_0x48b2ce(0x2b5)]=!![],console[_0x48b2ce(0x251)](_0x48b2ce(0x26a)+_0x5df91b+_0x48b2ce(0xfc)+_0x59a77a[_0x48b2ce(0x284)][_0x48b2ce(0x200)]+_0x48b2ce(0xe9)+(_0x2d02b0+_0x48b2ce(0x2bc)+_0x2a96ac['size']+_0x48b2ce(0x213)));return;}_0x59a77a[_0x48b2ce(0x171)]++;const _0x22c458=Math[_0x48b2ce(0x2a1)](_0x13b2f3,_0x261c8e*0x2**(_0x59a77a['consecutiveFailures']-0x1));console[_0x48b2ce(0x210)](_0x48b2ce(0x31d)+_0x5df91b+_0x48b2ce(0x279)+_0x22c458+'ms\x20(attempt\x20'+_0x59a77a['consecutiveFailures']+')'),_0x59a77a['respawnTimer']=setTimeout(()=>{const _0x4c07f8=_0x48b2ce;_0x59a77a[_0x4c07f8(0x2f1)]=null;if(_0x2a4b4d||_0x59a77a[_0x4c07f8(0x2b5)])return;const _0x55b9d1=_0x5df398(_0x5df91b);_0x55b9d1[_0x4c07f8(0x18d)](_0x4c07f8(0x141),()=>{const _0x215359=_0x4c07f8;if(_0x484601[_0x215359(0x106)](_0x5df91b)===_0x59a77a)_0x59a77a[_0x215359(0x171)]=0x0;});},_0x22c458),_0x59a77a[_0x48b2ce(0x2f1)][_0x48b2ce(0x2a3)]?.();});const _0x51d4d6=[..._0x2a96ac[_0x9a011d(0x172)]()];console[_0x9a011d(0x210)]('[okdb-cluster]\x20primary\x20pid='+process['pid']+'\x20forked\x20'+_0x1d8313+_0x9a011d(0xed)+_0x552855+':\x20'+('['+_0x51d4d6['join'](',\x20')+']'));const _0x59531a={'_isClusterController':!![],'port':_0x552855,'primaryOkdb':_0x152b91??null,'status'(){const _0x349df6=_0x9a011d;return{'clustered':!![],'primaryPid':process['pid'],'port':_0x552855,'primaryRole':_0x152b91?.[_0x349df6(0x237)]??null,'processorPid':null,'supervisorPid':process[_0x349df6(0x268)],'workers':[..._0x2a96ac[_0x349df6(0x1ae)]()]['map'](({worker:_0x3db2a8})=>({'pid':_0x3db2a8[_0x349df6(0x24e)][_0x349df6(0x268)],'id':_0x3db2a8['id'],'dead':_0x3db2a8[_0x349df6(0x1e6)]()}))};},async 'close'(){const _0x378492=_0x9a011d;_0x2a4b4d=!![];for(const _0x572c59 of _0x484601['values']()){_0x572c59['dead']=!![],_0x572c59[_0x378492(0x2f1)]&&(clearTimeout(_0x572c59[_0x378492(0x2f1)]),_0x572c59[_0x378492(0x2f1)]=null);}clearInterval(_0x2eaf86);_0x360761&&(clearTimeout(_0x360761),_0x360761=null);_0x494e9a[_0x378492(0x267)](_0x378492(0x110),_0x57457e),_0x494e9a[_0x378492(0x267)](_0x378492(0x110),_0x199479),_0x152b91?.[_0x378492(0x20f)]?.[_0x378492(0x267)]?.(_0xf6a2e9[_0x378492(0x266)],_0x5116a7);if(_0x152b91?.[_0x378492(0x20f)]?.['off'])for(const {event:_0x2d777a,handler:_0x1d0857}of _0xccc1ff){try{_0x152b91[_0x378492(0x20f)][_0x378492(0x267)](_0x2d777a,_0x1d0857);}catch{}}_0xccc1ff[_0x378492(0x200)]=0x0;const _0x38a5b2=[..._0x2a96ac['values']()][_0x378492(0x2fe)](({worker:_0x25f1a0})=>_0x25f1a0);if(_0x38a5b2[_0x378492(0x200)]===0x0)return;await Promise[_0x378492(0x2fd)](_0x38a5b2[_0x378492(0x2fe)](_0x1882f4=>new Promise(_0x2d8567=>{const _0x169f3a=_0x378492;if(_0x1882f4[_0x169f3a(0x1e6)]()){_0x2d8567();return;}let _0x1f98b2=![];const _0x4a7033=()=>{if(_0x1f98b2)return;_0x1f98b2=!![];if(_0xfbde6f)clearTimeout(_0xfbde6f);_0x2d8567();};_0x1882f4[_0x169f3a(0x18d)](_0x169f3a(0xe4),_0x4a7033);const _0xfbde6f=setTimeout(()=>{const _0x89a2b3=_0x169f3a;try{_0x1882f4[_0x89a2b3(0x24e)]['kill']();}catch{}},_0x2ff266+0x1f4);_0xfbde6f[_0x169f3a(0x2a3)]?.();try{_0x1882f4['disconnect']();}catch{try{_0x1882f4['process'][_0x169f3a(0x162)]();}catch{}}})));}};return _0x59531a;}async function _0x1ff1ad({makeOkdb:_0x15b447,port:_0x11d9ad}){const _0x271f62=_0x1de6aa,_0x3a598a=await _0x15b447();return _0x37bf53(_0x3a598a),_0x3a598a[_0x271f62(0x226)][_0x271f62(0x231)](_0x11d9ad);}function _0x37bf53(_0x585d50){const _0x6d188c=_0x1de6aa;if(!_0x585d50||_0x585d50[_0x6d188c(0x19e)])return;_0x585d50[_0x6d188c(0x19e)]=!![];try{const {OKDBChangefeed:_0x49058}=requireOkdbChangefeed(),_0x5bc8f7=_0x585d50[_0x6d188c(0x22f)];if(_0x5bc8f7&&typeof _0x5bc8f7[_0x6d188c(0x1cc)]==='function'){const _0x3d52ff=new _0x49058(_0x585d50);_0x3d52ff['start'](),_0x5bc8f7[_0x6d188c(0x1cc)](_0x3d52ff),_0x585d50[_0x6d188c(0x2ac)]=_0x3d52ff;}}catch(_0x5113a0){_0x585d50[_0x6d188c(0x210)]?.['warn']?.(_0x6d188c(0x1ac)+(_0x5113a0?.[_0x6d188c(0x110)]??_0x5113a0),{'feature':_0x6d188c(0x318)});}const _0x2bdb7a=_0xbd40c=>{const _0x5965de=_0x6d188c;if(!_0xbd40c||typeof _0xbd40c!==_0x5965de(0x292)||_0xbd40c[_0x42a0fa]==null)return;if(_0xbd40c[_0x42a0fa]===_0x5f1669)try{_0x585d50[_0x5965de(0x22f)]?.[_0x5965de(0x1a4)]?.(_0xbd40c[_0x5965de(0x2aa)],_0xbd40c['data']);}catch{}};process['on'](_0x6d188c(0x110),_0x2bdb7a),_0x585d50['_clusterOnMessage']=_0x2bdb7a;{let _0x53a823=process[_0x6d188c(0x1f2)](),_0x22a50c=Date[_0x6d188c(0x19d)]();const _0x1d8c07=()=>{const _0x56e6ec=_0x6d188c;if(typeof process[_0x56e6ec(0x319)]!==_0x56e6ec(0x160)||!process[_0x56e6ec(0x163)])return;const _0x97551c=Date['now'](),_0x2d950d=process[_0x56e6ec(0x1f2)](),_0x4c441a=(_0x97551c-_0x22a50c)*0x3e8,_0x5df831=_0x2d950d[_0x56e6ec(0x297)]-_0x53a823[_0x56e6ec(0x297)]+(_0x2d950d[_0x56e6ec(0x10c)]-_0x53a823['system']),_0x29b539=_0x4c441a>0x0?Math['min'](0x64,Math[_0x56e6ec(0x24b)](_0x5df831/(_0x4c441a*(_0xf122ec[_0x56e6ec(0x2ce)]()[_0x56e6ec(0x200)]||0x1))*0x64)):0x0;_0x53a823=_0x2d950d,_0x22a50c=_0x97551c;const _0x4f5b0a=process[_0x56e6ec(0x24a)]();let _0x46d999=null;try{_0x46d999=_0x585d50[_0x56e6ec(0x237)]?.[_0x56e6ec(0x277)]?_0x585d50['processes']?.['_buildProcessingFacet']?.()??null:null;}catch{}try{process[_0x56e6ec(0x319)]({[_0x42a0fa]:_0x86c093,'stats':{'rss':_0x4f5b0a[_0x56e6ec(0x2b7)],'heapUsed':_0x4f5b0a['heapUsed'],'heapTotal':_0x4f5b0a[_0x56e6ec(0x1e1)],'external':_0x4f5b0a[_0x56e6ec(0x269)],'cpuPct':_0x29b539,'cpuWindowMs':Math[_0x56e6ec(0x24b)](_0x4c441a/0x3e8)||null},'processing':_0x46d999});}catch{}},_0x4b0aed=Math['max'](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x203029=setInterval(_0x1d8c07,_0x4b0aed);_0x203029[_0x6d188c(0x2a3)]?.(),_0x1d8c07();for(const _0x3f8dd6 of[_0x6d188c(0x191),'processor:resumed']){_0x585d50[_0x6d188c(0x20f)]?.['on']?.(_0x3f8dd6,()=>{try{_0x1d8c07();}catch{}});}}let _0x3582a1=![];const _0x12666e=async _0x595958=>{const _0x438584=_0x6d188c;if(_0x3582a1)return;_0x3582a1=!![];const _0x4a9dea=setTimeout(()=>process[_0x438584(0xe4)](_0x595958),_0x2ff266);_0x4a9dea['unref']?.();try{await _0x585d50[_0x438584(0x14a)]?.();}catch{}process['exit'](_0x595958);};process['on']('disconnect',()=>_0x12666e(0x0));if(process['send']&&!process[_0x6d188c(0x163)])_0x12666e(0x0);if(process['platform']!==_0x6d188c(0x1f3)){const _0x598819=setInterval(()=>{const _0x70a5c1=_0x6d188c;if(process[_0x70a5c1(0x230)]===0x1)_0x12666e(0x0);},_0x3cde3d);_0x598819[_0x6d188c(0x2a3)]?.(),_0x585d50['_clusterOrphanWatch']=_0x598819;}}return okdbCluster={'runClustered':_0x1b6e78,'attachWorkerCluster':_0x37bf53},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0x37ec00=_0x4abb0e;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x51c57c=require$$0$5,{attachWorkerCluster:_0x4a0d93}=requireOkdbCluster();async function _0x3c2500(){const _0x10ea25=_0x35c1,_0x34eb84=process.env.OKDB_HTTP_CHILD;if(!_0x34eb84)throw new Error(_0x10ea25(0x120));const {rootPath:_0x597fdb,port:_0x4784f7,options:options={},logLevel:logLevel=_0x10ea25(0x255)}=JSON[_0x10ea25(0x1ff)](_0x34eb84);if(!_0x597fdb||!_0x4784f7)throw new Error(_0x10ea25(0x18f));const _0x54168e=new _0x51c57c(_0x597fdb,{...options,'engines':![],'processors':![],'compaction':![]});_0x54168e[_0x10ea25(0x210)][_0x10ea25(0x18a)]?.();const _0x48542c=process.env.OKDB_CLUSTER_SLOT??'?',_0x3a3d80={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x53f718=_0x3a3d80[logLevel]??_0x3a3d80[_0x10ea25(0x255)];_0x54168e['log'][_0x10ea25(0x188)](_0x3c7763=>{const _0x172cc0=_0x10ea25;if((_0x3a3d80[_0x3c7763['level']]??0x1)<_0x53f718)return;try{process[_0x172cc0(0x319)]?.({'__okdbCluster':'log','slot':_0x48542c,'pid':process[_0x172cc0(0x268)],'entry':_0x3c7763});}catch{}}),await _0x54168e[_0x10ea25(0x100)](),_0x4a0d93(_0x54168e),await _0x54168e['http'][_0x10ea25(0x231)](_0x4784f7);}return _0x3c2500()[_0x37ec00(0x223)](_0x31f4d3=>{const _0x1ad35e=_0x37ec00;try{process[_0x1ad35e(0x319)]?.({'__okdbCluster':_0x1ad35e(0x210),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x1ad35e(0x268)],'entry':{'level':_0x1ad35e(0x251),'msg':_0x1ad35e(0xe2)+(_0x31f4d3?.[_0x1ad35e(0x110)]??_0x31f4d3)}});}catch{}process[_0x1ad35e(0xe4)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module['exports']=okdbHttpWorkerChild;
1
+ 'use strict';const _0x2ee730=_0x302a;(function(_0x2b2da3,_0x43eeed){const _0x57079b=_0x302a,_0x45b680=_0x2b2da3();while(!![]){try{const _0x4296f3=parseInt(_0x57079b(0x16c))/0x1+-parseInt(_0x57079b(0x1cb))/0x2+-parseInt(_0x57079b(0x1f2))/0x3+parseInt(_0x57079b(0x14f))/0x4*(parseInt(_0x57079b(0x183))/0x5)+parseInt(_0x57079b(0xfc))/0x6+-parseInt(_0x57079b(0x222))/0x7+-parseInt(_0x57079b(0xbb))/0x8;if(_0x4296f3===_0x43eeed)break;else _0x45b680['push'](_0x45b680['shift']());}catch(_0x329e1d){_0x45b680['push'](_0x45b680['shift']());}}}(_0x4900,0x6c5ee));var require$$0$5=require('./okdb'),require$$1$1=require(_0x2ee730(0x265)),require$$1=require(_0x2ee730(0x2e4)),require$$0$3=require('os'),require$$2=require(_0x2ee730(0x107)),require$$0=require(_0x2ee730(0x269)),require$$0$2=require(_0x2ee730(0x271)),require$$0$1=require('fs'),require$$0$4=require(_0x2ee730(0xd4));function _0x302a(_0x4cb4a4,_0x23fc2e){_0x4cb4a4=_0x4cb4a4-0xac;const _0x490062=_0x4900();let _0x302a8b=_0x490062[_0x4cb4a4];return _0x302a8b;}function _0x4900(){const _0xe28a06=['epoch','external','instances','crypto','toISOString','ms\x20p99=','processor:ready','ms\x20busy=','dumpedAt','oldestPendingMs','trim','item:pending','_nodeDbCache','registerFts','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','_changefeed','detachConsole','publishOwnRow','_kind','getCmd','txn:start','_cmd','clearThreadStats','isHeld','mkdirSync','ensureType','_rawDb','_onItem','force','registry\x20heartbeat\x20skipped\x20(writer=','_onPoke','index:progress','null','_nodeDead','beforeWrite','ITEM_CREATE','reportThreadStats','okdb-writer:\x20env\x20closing\x20—\x20retry','isPrimary','drain','randomUUID','rows=','INDEX_REGISTERED','call','_onStop','_singletonLocks','extend','_durs','_instanceId','_supervisorKey','length','_singletonLock','\x20phase=','processingSig','_lastCpuPct','filter','fn-runner','nodesView','_wantDbHandle','_holderDead','_onTick','_ensureDesired','_assertUsable','~lock','object','\x20worker(s)\x20remaining','_outstanding','_lastCpuWindowMs','view','raw-remove','singletonClaims','some','keys','instanceId','allSettled','844ygmImh','execArgv','_buildChildRow','role','round','_writer','commitP99Ms','_processStartedAt','release','INDEX_RESET','_maybePublish','enable','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','\x20===','resetIndex','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','_wantDb','index:ready','_closed','processorId','_bpParkedTotal','closing','type:registered','_nodeDbFor','\x20times\x20in\x20','\x0a===\x20OKDB_DIAG\x20','procmodeack/','cursorKey','change','749119GYcHQu','stats','ESRCH','sort','race','recordWrite','getChanges','SWAP','\x20│\x20','ppid','ENV_CLOSING_RETRY','heartbeatMs','clearTtl','_activateProcesses','[okdb-cluster]\x20respawning\x20worker\x20slot=','from','version','process\x20','enabled','updateSupervisedChildStats','_enqueuedAt','supervisorKey','resetReadTxn','2005GYqUCt','events','ready','find','_key','shift','processor:paused','okdb-diag.','next','_report','ITEM_REMOVE','cpuUsage','ms\x20env=','_rootDb','_startedAt','claims','stopHeartbeat','entries','_quantum','isWorker','~processes','\x20while\x20this\x20process\x20runs\x20','okdb-writer[','system:clock_change','info','putNode','string','stderr','type','rss','putSync','schema:set','[okdb-cluster]\x20slot=','nodeKey','_selfKey','_refreshDesiredSnapshot','default','close','INDEX_READY','ingest','rowKey','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','push','getRange','[okdb-cluster]\x20','remove','options','meta','busy','_scheduleFlush','listenAddr','status','min','treeView','node/','_putRowSync','_buildProcessingFacet','deaths','transactionSync','floor','reject','now','user','online','none','embedded','setDesired','(worst\x20','_acquiredAt','CHANGEFEED_QUANTUM','stringify','_committed','524992QLItIq','_buckets','_participate','creating','hostname','_seen','standalone','processor:error','function','_enableChangelog','_statusEnv','startsWith','platform','ms\x20mean=','_drainOne','_lockDb','_dedupeKey','appendFileSync','memoryUsage','_listenAddr','disconnect','recent\x20writes\x20(newest\x20first)','_nodeDb','then','_putRowAsync','lifecycle','_nestedTotal','VIEW_PROGRESS','\x20\x20(no\x20env\x20draining)','_systemEnv','_hbTimer','_heartbeatTimer','emit','_groupByProcess','_draining','_lastCpuUsage','fromEntries','children','splice','81336EBfttr','processors','error','win32','listen','state','system:drain','index:drop','exports','running','percentile','item:remove','replace','add','closed','bumpCmd','_markSeen','schema:drop','process','SYSTEM_PROC','_desiredOverlay','_threadStats','slice','_db','uptime','startedAt','system:bus_state_change','ITEM_UPDATE','dropping','_isStale','listDesired','decommission','system','mode','setTtl','SIGKILL','resetting','_wantDbOf','_adoptPeerIndexes','getClock','host','building','reset','cli','_handlePending','bus:drain','stopping','updatedAt','3352265MwukRz','register','_flushDebounce','prototype','values','cluster-wide','_pendingLocal','procmode/','FTS_DROP','ttl:expired','registerType','REMOVE','\x20sync','\x20drainAge=','__okdbSlot','processor:retry','_sandbox','ttl:set','_transactionOnce','starting','assign','removeSync','_highWater','_servingEngines','send','writerStatus','abs','resolve','_heartbeatInFlight','sync:apply',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','namespace','stopped','note','log','_children','created','signalWant','ephemeral','_onProcEvent','max','number',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','_started','_collectWriterFacet','isConnected','error:\x20','fork','size','data','maxMs','--watch','\x20died\x20','_admissionTimer','heldBy','indexOf','FTS_REGISTERED','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','split','bus:proc','_role','dropIndex','processor:resumed','join','_lock','_held','inst:','cluster','ref:violation_resolved','registerIndex','childTransaction','node:perf_hooks','_flushTimer','count','entry','loop-lag','kind','license:invalid','afterWrite','perf_hooks','stop','[okdb-cluster]\x20worker\x20pid=','cpuWindowMs','put','listening','_timer','SYSTEM_STOPPED','map','_caps','_inflight','primary','_dedupeMax','fts:drop','http-server','registry\x20publish\x20failing:\x20','system:proc','off','parkedNow','processing','_isWriter','code','async','system:poke','includes','cpuPct','\x20\x20#','holder','sandbox','flushed','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','_versionSkewWarned','1ofN:','write','openDB','_clusterWorkerAttached','okdb','expiresAt','_handleInProcess','bus:poke','_released','\x20parkedNow=','_baselines','_rowKey','_pending','_publishNow','compaction','processes','heapUsed','_startHeartbeat','dedupeMax','fanout','attach','paused','system:ready','participate','__okdbCluster','_log','_ownMeta','workers','value','_envs','isActive','_buildOwnRow','catch','attachFeed','exit','unref','clusterStatusView','admitted','_sampleOwnStats','hasDesired','FTS_RESET','transaction','set','noteListenAddr','cpus','\x20ipc\x20error:\x20','--test','_removeRowAsync','__vocab/version','license:added','selfKey','_desired','warn','committed','message','uncaughtException','commitsPerSec','INDEX_SET_CHANGED','env','maxExtra','\x20forked\x20','kill','listNodes','registry-publish','license:activated','ttlMs','_isReader','reap','_nestedWarned','draining',');\x20','env:removed','single','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','fast','list','getDesired','processKey','_publishFailWarned','_windowCbs','respawnTimer','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','once','path','ms\x20activeWriters=','node','system:env_release','field:resolver_registered','_openEnvLazy','isDead','offWindow','http','engines','caps','pushEphemeral','mean','decommissioning','\x20@\x20','event','\x20pid=','_lastPublishAt','--inspect','inspect','connected','consecutiveFailures','stack','_drain','inflightAgesMs','_coordinator','366008DlPEkL','threads','removeNode','dropSchema','fts:registered','dead','setOwnMeta','_clusterOnMessage','repeat','~processes:cmd','has','\x0a\x20\x20\x20\x20\x20\x20','\x20\x20env=','start','envsOpen','worker','\x20writer{depth=','okdb-lock:\x20env\x20closed','loop-lag\x20','\x20(durable\x20desired-state)','_handlePoke','compact','toFixed','hasOwnProperty','delete','node:events','processor','\x20in\x20','sync','\x20worker(s)\x20still\x20serving','ms\x20on\x20env=','level','_admissionStarted','depth','SYSTEM_POKE','load','_heldTotal','pid','heapTotal','workersConfigured','index:registered','all','ms/','_bpWaiters','_startAdmission','started','_onPending','publishChildRow','acquiredAt','\x20—\x20','msg','resetFts','ms\x20(attempt\x20','--print','clear','get','_adminRelay','_collectSingletonClaims','slot','prependListener','claimGated','_done','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','bus:env_release','isEnabled','2546460UxRzIe','unique:violation_resolved','_lastCpuAt','(code=','license:removed',',\x20signal=','.log','_cursors'];_0x4900=function(){return _0xe28a06;};return _0x4900();}function getDefaultExportFromCjs(_0x326220){const _0x5bd55a=_0x2ee730;return _0x326220&&_0x326220['__esModule']&&Object[_0x5bd55a(0x225)][_0x5bd55a(0xd2)][_0x5bd55a(0x12f)](_0x326220,'default')?_0x326220[_0x5bd55a(0x1a7)]:_0x326220;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x36b714=_0x2ee730;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0xc2b2a0={'PUT':_0x36b714(0x275),'REMOVE':_0x36b714(0x1b0),'INDEX_DROP':_0x36b714(0x25f),'INDEX_REGISTER':_0x36b714(0x267),'INDEX_RESET':_0x36b714(0x15d),'TYPE_REGISTER':_0x36b714(0x22c),'TYPE_DROP':'dropType','FTS_REGISTER':_0x36b714(0x111),'FTS_DROP':'dropFts','FTS_RESET':_0x36b714(0xee),'SCHEMA_SET':'setSchema','SCHEMA_DROP':_0x36b714(0xbe),'TTL_SET':_0x36b714(0x214),'TTL_CLEAR':_0x36b714(0x178)},_0x11ba85={'SYSTEM_READY':_0x36b714(0x2a7),'FIELD_RESOLVER_REGISTERED':_0x36b714(0x2e8),'SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':_0x36b714(0x19a),'SYSTEM_POKE':_0x36b714(0x288),'SYSTEM_DRAIN':_0x36b714(0x1f8),'SYSTEM_TYPE_DROP':'system:type_drop','SYSTEM_PROC':_0x36b714(0x281),'SYSTEM_BUS_STATE_CHANGE':_0x36b714(0x20c),'ITEM_CREATE':'item:create','ITEM_UPDATE':'item:update','ITEM_REMOVE':_0x36b714(0x1fd),'ITEM_PENDING':_0x36b714(0x10f),'INDEX_RESET':'index:reset','INDEX_READY':_0x36b714(0x160),'INDEX_PROGRESS':_0x36b714(0x123),'VIEW_PROGRESS':'view:progress','INDEX_DROP':_0x36b714(0x1f9),'INDEX_REGISTERED':_0x36b714(0xe3),'FTS_REGISTERED':_0x36b714(0xbf),'FTS_DROP':_0x36b714(0x27e),'FTS_RESET':'fts:reset','SCHEMA_SET':_0x36b714(0x1a2),'SCHEMA_DROP':_0x36b714(0x203),'UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0x36b714(0xfd),'REF_VIOLATION':'ref:violation','REF_VIOLATION_RESOLVED':_0x36b714(0x266),'SYNC_APPLY':_0x36b714(0x23f),'TXN_START':_0x36b714(0x118),'TXN_END':'txn:end','TXN_ROLLBACK':'txn:rollback','TYPE_REGISTERED':_0x36b714(0x165),'TYPE_DROP':'type:drop','ENV_OPENED':'env:opened','ENV_REMOVED':_0x36b714(0x2d8),'SYSTEM_ENV_RELEASE':_0x36b714(0x2e7),'TTL_EXPIRED':_0x36b714(0x22b),'TTL_SET':_0x36b714(0x233),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x36b714(0x26f),'LICENSE_ADDED':_0x36b714(0x2c2),'LICENSE_ACTIVATED':_0x36b714(0x2d1),'LICENSE_REMOVED':_0x36b714(0x100)},_0x219d99={'CREATING':_0x36b714(0x1ce),'RESETTING':_0x36b714(0x216),'READY':_0x36b714(0x185),'DROPPING':_0x36b714(0x20e),'WAITING':'waiting','ERROR':_0x36b714(0x1f4)},_0x3c0950={'CREATED':_0x36b714(0x246),'STARTING':_0x36b714(0x235),'STARTED':_0x36b714(0xe8),'STOPPING':_0x36b714(0x220),'STOPPED':_0x36b714(0x242)},_0x320b66={'CREATING':_0x36b714(0x1ce),'READY':_0x36b714(0x185),'HALTED':'halted','STOPPED':_0x36b714(0x242),'RESETTING':_0x36b714(0x216)},_0x298f8a=Object['freeze']({'POKE':_0x36b714(0x298),'DRAIN':_0x36b714(0x21f),'TYPE_DROP':'bus:type_drop','PROC':_0x36b714(0x25d),'ENV_RELEASE':_0x36b714(0xfa)});return okdbEnums={'BUS_EVENTS':_0x298f8a,'CHANGE_ACTIONS':_0xc2b2a0,'EVENTS':_0x11ba85,'INDEX_STATE':_0x219d99,'OKDB_STATE':_0x3c0950,'VIEW_STATE':_0x320b66},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x43733e=_0x2ee730;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x2d9164,performance:_0x17e75b}=require$$0,_0x14c706=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG==='true',_0x33536a=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x3e1dc5=process.env.OKDB_LOOP_LAG_ALL==='1',_0x4c446e=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x18b744{constructor(){const _0x1a8737=_0x302a;this[_0x1a8737(0x17e)]=_0x14c706,this[_0x1a8737(0x1cc)]=new Map(),this['_h']=null,this[_0x1a8737(0x277)]=null,this[_0x1a8737(0x24d)]=![],this[_0x1a8737(0x2aa)]=(_0x2c915e,_0x4e5ce6)=>process[_0x1a8737(0x19e)][_0x1a8737(0x292)](_0x2c915e+(_0x4e5ce6?'\x20'+JSON[_0x1a8737(0x1c9)](_0x4e5ce6):'')+'\x0a');}['now'](){const _0x2e8090=_0x302a;return _0x17e75b[_0x2e8090(0x1c0)]();}['setLogger'](_0xf56bf8){const _0x171ffa=_0x302a;if(typeof _0xf56bf8==='function')this[_0x171ffa(0x2aa)]=_0xf56bf8;}['note'](_0x2b1337,_0xa7e578,_0x2267a4){const _0x26cbb4=_0x302a;if(!this['enabled'])return;let _0x3b0bef=this[_0x26cbb4(0x1cc)][_0x26cbb4(0xf2)](_0x2b1337);!_0x3b0bef&&(_0x3b0bef={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x26cbb4(0x1cc)][_0x26cbb4(0x2bb)](_0x2b1337,_0x3b0bef)),_0x3b0bef['ms']+=_0xa7e578,_0x3b0bef[_0x26cbb4(0x26b)]+=0x1,_0xa7e578>_0x3b0bef[_0x26cbb4(0x254)]&&(_0x3b0bef[_0x26cbb4(0x254)]=_0xa7e578,_0x3b0bef[_0x26cbb4(0x2cc)]=_0x2267a4||'');}[_0x43733e(0xc8)](_0xbb6e3c){const _0x4fde65=_0x43733e;if(!this[_0x4fde65(0x17e)]||this[_0x4fde65(0x24d)])return;this[_0x4fde65(0x24d)]=!![];if(_0xbb6e3c)this[_0x4fde65(0x2aa)]=_0xbb6e3c;this['_h']=_0x2d9164({'resolution':0xa}),this['_h'][_0x4fde65(0x15a)](),this['_timer']=setInterval(()=>this['_report'](),_0x33536a);if(this['_timer'][_0x4fde65(0x2b4)])this[_0x4fde65(0x277)]['unref']();}['onWindow'](_0x51f249){const _0x4c37b3=_0x43733e;if(!this[_0x4c37b3(0x2e0)])this[_0x4c37b3(0x2e0)]=new Set();this[_0x4c37b3(0x2e0)][_0x4c37b3(0x1ff)](_0x51f249);if(!this[_0x4c37b3(0x24d)])this[_0x4c37b3(0xe7)]();}[_0x43733e(0x2eb)](_0x15e42a){const _0x8e73f9=_0x43733e;this[_0x8e73f9(0x2e0)]?.['delete'](_0x15e42a);}[_0x43733e(0xe7)](){const _0xc39272=_0x43733e;if(this['_admissionStarted'])return;this[_0xc39272(0xdb)]=!![];!this['_h']&&(this['_h']=_0x2d9164({'resolution':0xa}),this['_h']['enable']());const _0x263b57=_0x33536a;this[_0xc39272(0x257)]=setInterval(()=>{const _0x2ba9e1=_0xc39272,_0x4bbffc=this['_h'];if(!_0x4bbffc)return;const _0x10ee84=_0x4bbffc[_0x2ba9e1(0x1fc)](0x63)/0xf4240,_0x1dc667=_0x4bbffc[_0x2ba9e1(0x24a)]/0xf4240,_0x31a79d=_0x4bbffc[_0x2ba9e1(0xad)]/0xf4240;_0x4bbffc[_0x2ba9e1(0x21c)]();if(this[_0x2ba9e1(0x2e0)])for(const _0x506645 of this[_0x2ba9e1(0x2e0)]){try{_0x506645({'p99Ms':_0x10ee84,'maxMs':_0x1dc667,'meanMs':_0x31a79d,'reportMs':_0x263b57});}catch{}}},_0x263b57);if(this[_0xc39272(0x257)][_0xc39272(0x2b4)])this[_0xc39272(0x257)][_0xc39272(0x2b4)]();}[_0x43733e(0x18c)](){const _0x125a03=_0x43733e,_0x1507c1=this['_h'],_0x106fc6=_0x1507c1['max']/0xf4240,_0x128893=_0x1507c1[_0x125a03(0x1fc)](0x63)/0xf4240,_0x25659e=_0x1507c1[_0x125a03(0xad)]/0xf4240;_0x1507c1[_0x125a03(0x21c)]();const _0x569834=[...this[_0x125a03(0x1cc)][_0x125a03(0x194)]()]['map'](([_0x49ba21,_0x548522])=>({'label':_0x49ba21,..._0x548522}))['sort']((_0x4d70e1,_0x24f462)=>_0x24f462['ms']-_0x4d70e1['ms'])['slice'](0x0,0x8);this['_buckets']['clear']();const _0x54a56c=_0x569834['reduce']((_0x31661d,_0x2f2934)=>_0x31661d+_0x2f2934['ms'],0x0),_0x5ec00c=_0x569834[_0x125a03(0x279)](_0x44752f=>_0x44752f['label']+'='+_0x44752f['ms']['toFixed'](0x0)+_0x125a03(0xe5)+_0x44752f[_0x125a03(0x26b)]+(_0x44752f[_0x125a03(0x254)]>0x5?_0x125a03(0x1c6)+_0x44752f[_0x125a03(0x254)][_0x125a03(0xd1)](0x0)+'ms'+(_0x44752f['maxExtra']?'\x20'+_0x44752f['maxExtra']:'')+')':''));(_0x3e1dc5||_0x106fc6>=_0x4c446e)&&this[_0x125a03(0x2aa)](_0x125a03(0xcd)+_0x33536a+'ms\x20max='+_0x106fc6[_0x125a03(0xd1)](0x0)+_0x125a03(0x109)+_0x128893['toFixed'](0x0)+_0x125a03(0x1d8)+_0x25659e['toFixed'](0x0)+_0x125a03(0x10b)+_0x54a56c[_0x125a03(0xd1)](0x0)+'ms'+(_0x5ec00c['length']?_0x125a03(0x174)+_0x5ec00c['join']('\x20\x20'):''),{'feature':_0x125a03(0x26d)});if(this[_0x125a03(0x2e0)])for(const _0x213877 of this[_0x125a03(0x2e0)]){try{_0x213877({'p99Ms':_0x128893,'maxMs':_0x106fc6,'meanMs':_0x25659e,'reportMs':_0x33536a});}catch{}}}[_0x43733e(0x272)](){const _0x10ae48=_0x43733e;if(this[_0x10ae48(0x277)])clearInterval(this['_timer']);if(this['_h'])this['_h']['disable']();this[_0x10ae48(0x277)]=null,this['_h']=null,this['_started']=![];}}const _0x5b3012=new _0x18b744();if(_0x5b3012[_0x43733e(0x17e)])_0x5b3012[_0x43733e(0xc8)]();return okdbLoopMonitor={'LOOP':_0x5b3012},okdbLoopMonitor;}var okdbTimers,hasRequiredOkdbTimers;function requireOkdbTimers(){if(hasRequiredOkdbTimers)return okdbTimers;hasRequiredOkdbTimers=0x1;const _0x39aa87=0x2**0x1f-0x1;function _0x2d33f9(_0x3e9989){if(!(_0x3e9989>0x0))return 0x0;return _0x3e9989>_0x39aa87?_0x39aa87:_0x3e9989;}function _0x38b4a9(_0x49869a){return _0x49869a===Infinity;}return okdbTimers={'MAX_TIMER_DELAY':_0x39aa87,'clampTimerDelay':_0x2d33f9,'isNeverDelay':_0x38b4a9},okdbTimers;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x1823e2=require$$0$1,_0x477dfb=require$$1;let _0xab9608,_0x37a234,_0x54a3be,_0x1a7505,_0x27787a,_0x1e87fd,_0x1a0afe,_0x165fbf=![];const _0x188677=new Set();let _0x107dad=null;const _0x59f596=new Map();function _0x2ffb54(){const _0x2dbe47=_0x302a;if(_0xab9608!==undefined)return _0xab9608;_0xab9608=process.env.OKDB_DIAG==='1';if(!_0xab9608)return![];_0x37a234=process.env.OKDB_DIAG_STACK==='1',_0x1a7505=Math['max'](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x54a3be=new Array(_0x1a7505),_0x27787a=0x0,_0x1e87fd=0x0,_0x1a0afe=process.env.OKDB_DIAG_DIR||null;if(_0x1a0afe)try{_0x1823e2[_0x2dbe47(0x11c)](_0x1a0afe,{'recursive':!![]});}catch{}return!![];}function _0xb9d7c0(){return _0xab9608===undefined?_0x2ffb54():_0xab9608;}function _0x1c8c5d(_0x3fe70d,_0x27d16d){const _0x55f919=_0x302a;if(_0xab9608===undefined?!_0x2ffb54():!_0xab9608)return;let _0xca30b0;if(_0x37a234){const _0xe34958=new Error()['stack']||'';_0xca30b0=_0xe34958[_0x55f919(0x25c)]('\x0a')['slice'](0x3)[_0x55f919(0x279)](_0x16ab08=>_0x16ab08[_0x55f919(0x10e)]())['filter'](Boolean)[_0x55f919(0x208)](0x0,0x8);}_0x54a3be[_0x27787a]={'seq':_0x1e87fd++,'t':Date[_0x55f919(0x1c0)](),'env':_0x3fe70d,'kind':_0x27d16d||'commit','stack':_0xca30b0},_0x27787a=(_0x27787a+0x1)%_0x1a7505;}function _0x4a3e8f(_0x45bd65){const _0x270cf7=_0x302a,_0x329df2=[];for(let _0x7e9f0e=0x0;_0x7e9f0e<_0x1a7505;_0x7e9f0e++){const _0x7e053f=_0x54a3be[(_0x27787a-0x1-_0x7e9f0e+_0x1a7505*0x2)%_0x1a7505];if(!_0x7e053f)continue;_0x329df2[_0x270cf7(0x1ad)](_0x7e053f);if(_0x329df2['length']>=_0x45bd65)break;}return _0x329df2;}function _0x50f8b5(_0x1742c5){const _0x2324ec=_0x302a;try{process[_0x2324ec(0x19e)]['write'](_0x1742c5+'\x0a');}catch{}if(_0x1a0afe)try{_0x1823e2[_0x2324ec(0x1dc)](_0x477dfb[_0x2324ec(0x261)](_0x1a0afe,_0x2324ec(0x18a)+process[_0x2324ec(0xe0)]+_0x2324ec(0x102)),_0x1742c5+'\x0a');}catch{}}function _0x26053c(_0x500deb){const _0x594209=_0x302a,_0x5daf25=_0x4a3e8f(_0x500deb);if(!_0x5daf25[_0x594209(0x136)])return _0x594209(0x1ac);const _0x274724=Date[_0x594209(0x1c0)]();return _0x5daf25[_0x594209(0x279)](_0x4c2cb9=>{const _0xe64326=_0x594209,_0x5997e2=_0xe64326(0x28b)+_0x4c2cb9['seq']+'\x20-'+(_0x274724-_0x4c2cb9['t'])+_0xe64326(0x18f)+_0x4c2cb9[_0xe64326(0x2cb)]+'\x20'+_0x4c2cb9[_0xe64326(0x26e)];return _0x4c2cb9['stack']&&_0x4c2cb9[_0xe64326(0xb7)][_0xe64326(0x136)]?_0x5997e2+'\x0a\x20\x20\x20\x20\x20\x20'+_0x4c2cb9[_0xe64326(0xb7)][_0xe64326(0x261)](_0xe64326(0xc6)):_0x5997e2;})['join']('\x0a');}function _0x4838d6(_0x4a9188,_0x1aa2ad){const _0x4e9c22=_0x302a,_0x5e522f=_0x4e9c22(0x168)+_0x4a9188+_0x4e9c22(0xaf)+new Date()[_0x4e9c22(0x108)]()+_0x4e9c22(0xb1)+process[_0x4e9c22(0xe0)]+'\x20===',_0x2b1d44=[_0x5e522f,_0x4e9c22(0x250)+(_0x1aa2ad&&_0x1aa2ad['stack']?_0x1aa2ad[_0x4e9c22(0xb7)]['split']('\x0a')[0x0]:_0x1aa2ad),_0x4e9c22(0x1e0)+(_0x37a234?'':_0x4e9c22(0x15b))+':',_0x26053c(0x18),_0x23c0fc(),'='['repeat'](_0x5e522f[_0x4e9c22(0x136)]-0x1)];_0x50f8b5(_0x2b1d44[_0x4e9c22(0x261)]('\x0a'));}function _0x32ea44(_0x4e7608){const _0x3b3769=_0x302a;if(!_0xb9d7c0())return;const _0x4a6a81=String(_0x4e7608&&_0x4e7608[_0x3b3769(0x2c7)]||_0x4e7608||''),_0x3e3edc=/already closed|environment is already|invalid read txn|reset an invalid/i['test'](_0x4a6a81);_0x4838d6(_0x3e3edc?'ORPHAN\x20(env-closed\x20write)':_0x3b3769(0x2c8),_0x4e7608);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x3e3edc)return;try{console[_0x3b3769(0x1f4)](_0x4e7608&&_0x4e7608[_0x3b3769(0xb7)]?_0x4e7608[_0x3b3769(0xb7)]:_0x4e7608);}catch{}process[_0x3b3769(0x2b3)](0x1);}function _0x143ade(_0x1ecc1c){const _0x5386ba=_0x302a;if(!_0xb9d7c0())return;const _0x1af2ee=String(_0x1ecc1c&&_0x1ecc1c[_0x5386ba(0x2c7)]||_0x1ecc1c||'');/already closed|environment is already|invalid read txn|reset an invalid/i['test'](_0x1af2ee)&&_0x4838d6(_0x5386ba(0x28f),_0x1ecc1c);}function _0x23c0fc(){const _0x259ad5=_0x302a,_0x466531=[_0x259ad5(0x2da)];let _0x20da5b=![];for(const _0xb449ab of _0x188677){const _0x254d7c=_0xb449ab&&_0xb449ab[_0x259ad5(0x2ae)];if(!_0x254d7c)continue;for(const [_0x459253,_0xd12d32]of _0x254d7c){const _0x5739dc=_0xd12d32&&_0xd12d32['_coordinator']&&_0xd12d32['_coordinator'][_0x259ad5(0x148)];if(!_0x5739dc)continue;let _0x292bb2,_0x24eb90;try{_0x292bb2=Atomics[_0x259ad5(0xde)](_0x5739dc,0x0),_0x24eb90=Atomics[_0x259ad5(0xde)](_0x5739dc,0x1);}catch{continue;}if(_0x292bb2===0x0)continue;_0x20da5b=!![];const _0x39f638=_0x292bb2>0x0?_0x259ad5(0x173):'copy',_0x52825c=Date[_0x259ad5(0x1c0)]()-Math[_0x259ad5(0x23c)](_0x292bb2)*0x3e8,_0x30cc30=((()=>{const _0x56fe84=_0x259ad5;try{return _0xd12d32[_0x56fe84(0x154)]&&_0xd12d32[_0x56fe84(0x154)][_0x56fe84(0x1b6)]?_0xd12d32[_0x56fe84(0x154)][_0x56fe84(0x1b6)]():null;}catch{return null;}})());_0x466531[_0x259ad5(0x1ad)](_0x259ad5(0xc7)+_0x459253+_0x259ad5(0x138)+_0x39f638+_0x259ad5(0x22f)+_0x52825c+_0x259ad5(0x2e5)+_0x24eb90+(_0x30cc30?_0x259ad5(0xcb)+_0x30cc30[_0x259ad5(0xdc)]+'\x20oldestPendingMs='+_0x30cc30[_0x259ad5(0x10d)]+_0x259ad5(0x29a)+_0x30cc30[_0x259ad5(0x283)]+'}':''));}}if(!_0x20da5b)_0x466531[_0x259ad5(0x1ad)](_0x259ad5(0x1e7));return _0x466531[_0x259ad5(0x261)]('\x0a');}function _0x382ef8(){const _0x43cf1f=_0x302a;if(!_0xb9d7c0())return;const _0x550e47=Math[_0x43cf1f(0x24a)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x23086a=Date['now']();for(const _0x30c023 of _0x188677){const _0x2dc33f=_0x30c023&&_0x30c023['_envs'];if(!_0x2dc33f)continue;for(const [_0x29e63c,_0x2a3027]of _0x2dc33f){const _0x4156a7=_0x2a3027&&_0x2a3027[_0x43cf1f(0xba)]&&_0x2a3027[_0x43cf1f(0xba)][_0x43cf1f(0x148)];if(!_0x4156a7)continue;let _0x33b245;try{_0x33b245=Atomics[_0x43cf1f(0xde)](_0x4156a7,0x0);}catch{continue;}const _0x204366=_0x30c023[_0x43cf1f(0x2e4)]+'|'+_0x29e63c;if(_0x33b245<=0x0){_0x59f596[_0x43cf1f(0xd3)](_0x204366);continue;}const _0xd0b29=_0x23086a-_0x33b245*0x3e8,_0x34fca9=_0x59f596[_0x43cf1f(0xf2)](_0x204366);if(_0xd0b29<_0x550e47)continue;if(_0x34fca9&&_0x23086a-_0x34fca9[_0x43cf1f(0x10c)]<_0x550e47)continue;_0x59f596[_0x43cf1f(0x2bb)](_0x204366,{'firstTs':_0x34fca9?_0x34fca9['firstTs']:_0x33b245,'dumpedAt':_0x23086a});const _0x518afc='\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20'+_0xd0b29+_0x43cf1f(0xd9)+_0x29e63c+_0x43cf1f(0xaf)+new Date()[_0x43cf1f(0x108)]()+'\x20pid='+process[_0x43cf1f(0xe0)]+_0x43cf1f(0x15c);_0x50f8b5([_0x518afc,_0x23c0fc(),'='[_0x43cf1f(0xc3)](_0x518afc[_0x43cf1f(0x136)]-0x1)][_0x43cf1f(0x261)]('\x0a'));}}}function _0x495d90(){const _0xe7ba1c=_0x302a;if(!_0xb9d7c0()||_0x165fbf)return;_0x165fbf=!![],process[_0xe7ba1c(0xf6)](_0xe7ba1c(0x2c8),_0x32ea44),process[_0xe7ba1c(0xf6)]('unhandledRejection',_0x143ade);const _0x2e876a=Math[_0xe7ba1c(0x24a)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x107dad=setInterval(_0x382ef8,_0x2e876a);if(_0x107dad[_0xe7ba1c(0x2b4)])_0x107dad['unref']();}function _0x7cc3c0(_0x55a122){const _0x11f82c=_0x302a;if(!_0xb9d7c0()||!_0x55a122)return;_0x188677[_0x11f82c(0x1ff)](_0x55a122),_0x495d90();}function _0xa57e6b(_0x2fd108){const _0x539064=_0x302a;_0x188677[_0x539064(0xd3)](_0x2fd108);}function _0x4a005e(){if(!_0xb9d7c0())return{'enabled':![],'hint':'set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)'};return{'enabled':!![],'stackCapture':!!_0x37a234,'recentWrites':_0x4a3e8f(0x10),'drain':_0x23c0fc()};}return okdbDiag={'isEnabled':_0xb9d7c0,'recordWrite':_0x1c8c5d,'installDiag':_0x495d90,'registerOkdb':_0x7cc3c0,'unregisterOkdb':_0xa57e6b,'snapshot':_0x4a005e},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0xc70012=_0x2ee730;if(hasRequiredOkdbWriter)return okdbWriter['exports'];hasRequiredOkdbWriter=0x1;const {performance:_0xeab2d3}=require$$0$2,_0x29b108=requireOkdbDiag(),_0x2b1a30=process.env.OKDB_COMMIT_MODE===_0xc70012(0xd7);class _0x2f64d8{constructor(_0x2302a8){const _0x3d3e53=_0xc70012;this[_0x3d3e53(0x2cb)]=_0x2302a8,this[_0x3d3e53(0x27b)]=new Set(),this[_0x3d3e53(0x180)]=new Map(),this[_0x3d3e53(0x1ca)]=0x0,this[_0x3d3e53(0x133)]=[],this[_0x3d3e53(0xf8)]=[],this['_highWater']=Math['max'](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this['_outstanding']=0x0,this['_bpWaiters']=[],this[_0x3d3e53(0x163)]=0x0,this['_held']=null,this[_0x3d3e53(0xdf)]=0x0,this[_0x3d3e53(0x1e5)]=0x0,this[_0x3d3e53(0x2d5)]=![];}async[_0xc70012(0x2ba)](_0x2e5ca0,_0x37a0da,_0x20b977={}){const _0x43c062=_0xc70012;for(let _0x4d2548=0x1;;_0x4d2548++){try{return await this[_0x43c062(0x234)](_0x2e5ca0,_0x37a0da,_0x20b977);}catch(_0x3db6){if(_0x3db6?.[_0x43c062(0x286)]!==_0x43c062(0x2ca)||_0x20b977[_0x43c062(0x2b6)]||_0x4d2548>=0x5)throw _0x3db6;this[_0x43c062(0x2cb)][_0x43c062(0x218)](_0x3db6['indexType']);}}}async[_0xc70012(0x234)](_0x266403,_0x54afd9,{admitted:admitted=![]}={}){const _0x355410=_0xc70012;if(_0x29b108[_0x355410(0xfb)]())_0x29b108[_0x355410(0x171)](this[_0x355410(0x2cb)]?.['name'],_0x54afd9);if(this['_closed']){const _0x21fd32=new Error(_0x355410(0x129));_0x21fd32['code']=_0x355410(0x176);throw _0x21fd32;}if(this[_0x355410(0x238)]>0x0){let _0x45c13b=![];while(this['_outstanding']>=this[_0x355410(0x238)]&&!this[_0x355410(0x161)]){!_0x45c13b&&(_0x45c13b=!![],this[_0x355410(0x163)]++),await new Promise(_0x7c5939=>this['_bpWaiters']['push'](_0x7c5939));}if(this[_0x355410(0x161)]){const _0x250d02=new Error(_0x355410(0x129));_0x250d02[_0x355410(0x286)]='ENV_CLOSING_RETRY';throw _0x250d02;}}this[_0x355410(0x146)]++;const _0x358e8c=admitted?null:this[_0x355410(0x2cb)][_0x355410(0xba)];for(;;){while(this['_held'])await this['_held'];if(_0x358e8c)try{await _0x358e8c[_0x355410(0x126)]();}catch(_0x477326){this['_outstanding']--;if(this[_0x355410(0xe6)]['length']&&this['_outstanding']<this['_highWater'])this[_0x355410(0xe6)][_0x355410(0x188)]()();throw _0x477326;}if(!this[_0x355410(0x263)])break;if(_0x358e8c)_0x358e8c[_0x355410(0x270)]();}if(this[_0x355410(0x161)]){if(_0x358e8c)_0x358e8c['afterWrite']();this['_outstanding']--;if(this[_0x355410(0xe6)]['length']&&this['_outstanding']<this['_highWater'])this[_0x355410(0xe6)][_0x355410(0x188)]()();const _0x5aeadb=new Error(_0x355410(0x129));_0x5aeadb[_0x355410(0x286)]=_0x355410(0x176);throw _0x5aeadb;}const _0x164fab=_0xeab2d3['now']();if(_0x2b1a30)try{const _0x85235d=this['env']['db'][_0x355410(0x1bd)](_0x266403);this[_0x355410(0x1ca)]++;if(this[_0x355410(0x133)][_0x355410(0x1ad)](_0xeab2d3[_0x355410(0x1c0)]()-_0x164fab)>0x100)this[_0x355410(0x133)][_0x355410(0x188)]();if(this['_done'][_0x355410(0x1ad)](_0xeab2d3['now']())>0x800)this['_done'][_0x355410(0x188)]();return _0x85235d;}finally{this[_0x355410(0x146)]--;if(this['_bpWaiters'][_0x355410(0x136)]&&this[_0x355410(0x146)]<this[_0x355410(0x238)])this[_0x355410(0xe6)]['shift']()();if(_0x358e8c)_0x358e8c['afterWrite']();}let _0x35309f=null;const _0x111f63=()=>{const _0x398e87=_0x355410,_0x2d772b=_0x266403();if(_0x2d772b&&typeof _0x2d772b[_0x398e87(0x1e2)]===_0x398e87(0x1d3)&&!_0x35309f){this[_0x398e87(0xdf)]++;let _0x4cf521;const _0x50525f=new Promise(_0x1c8e4e=>_0x4cf521=_0x1c8e4e);this[_0x398e87(0x263)]=_0x50525f,_0x35309f=()=>{const _0x349d77=_0x398e87;if(this[_0x349d77(0x263)]===_0x50525f)this[_0x349d77(0x263)]=null;_0x4cf521();};}return _0x2d772b;};let _0x236e5e;try{_0x236e5e=this[_0x355410(0x2cb)]['db'][_0x355410(0x268)](_0x111f63);}catch(_0x465872){_0x236e5e=Promise[_0x355410(0x1bf)](_0x465872);}(!_0x236e5e||typeof _0x236e5e[_0x355410(0x1e2)]!=='function')&&(this[_0x355410(0x1e5)]++,!this['_nestedWarned']&&(this[_0x355410(0x2d5)]=!![],console[_0x355410(0x2c5)](_0x355410(0x199)+(this['env']?.['name']??'?')+_0x355410(0x24c))),_0x236e5e=Promise[_0x355410(0x23d)](_0x236e5e));const _0x5c375c=()=>{if(_0x35309f)_0x35309f();};_0x236e5e[_0x355410(0x1e2)](_0x5c375c,_0x5c375c),this['_inflight'][_0x355410(0x1ff)](_0x236e5e),this['_enqueuedAt'][_0x355410(0x2bb)](_0x236e5e,_0x164fab);const _0x5bd24c=()=>{const _0x5d4e3e=_0x355410;this[_0x5d4e3e(0x27b)]['delete'](_0x236e5e),this[_0x5d4e3e(0x180)][_0x5d4e3e(0xd3)](_0x236e5e),this[_0x5d4e3e(0x1ca)]++,this[_0x5d4e3e(0x146)]--;this[_0x5d4e3e(0xe6)][_0x5d4e3e(0x136)]&&this[_0x5d4e3e(0x146)]<this['_highWater']&&this['_bpWaiters'][_0x5d4e3e(0x188)]()();if(this['_durs'][_0x5d4e3e(0x1ad)](_0xeab2d3[_0x5d4e3e(0x1c0)]()-_0x164fab)>0x100)this[_0x5d4e3e(0x133)][_0x5d4e3e(0x188)]();if(this[_0x5d4e3e(0xf8)][_0x5d4e3e(0x1ad)](_0xeab2d3[_0x5d4e3e(0x1c0)]())>0x800)this[_0x5d4e3e(0xf8)][_0x5d4e3e(0x188)]();};_0x236e5e[_0x355410(0x1e2)](_0x5bd24c,_0x5bd24c);try{return await _0x236e5e;}finally{if(_0x358e8c)_0x358e8c[_0x355410(0x270)]();}}[_0xc70012(0x1b6)](){const _0x51d022=_0xc70012,_0xcf67cb=_0xeab2d3[_0x51d022(0x1c0)]();let _0x33a118=0x0;for(const _0x5e38f1 of this['_enqueuedAt'][_0x51d022(0x226)]()){const _0x1fdff4=_0xcf67cb-_0x5e38f1;if(_0x1fdff4>_0x33a118)_0x33a118=_0x1fdff4;}let _0x38aa88=0x0;for(let _0x11bc46=this[_0x51d022(0xf8)][_0x51d022(0x136)]-0x1;_0x11bc46>=0x0;_0x11bc46--){if(_0xcf67cb-this[_0x51d022(0xf8)][_0x11bc46]>0x3e8)break;_0x38aa88++;}let _0xfe5ca7=0x0;if(this[_0x51d022(0x133)][_0x51d022(0x136)]){const _0x4eca0d=[...this['_durs']]['sort']((_0x509387,_0x5f5718)=>_0x509387-_0x5f5718);_0xfe5ca7=_0x4eca0d[Math[_0x51d022(0x1b7)](_0x4eca0d[_0x51d022(0x136)]-0x1,Math['floor'](_0x4eca0d[_0x51d022(0x136)]*0.99))];}return{'depth':this['_inflight'][_0x51d022(0x252)],'oldestPendingMs':Math[_0x51d022(0x153)](_0x33a118),'committed':this['_committed'],'commitsPerSec':_0x38aa88,'commitP99Ms':Math[_0x51d022(0x153)](_0xfe5ca7),'parkedNow':this[_0x51d022(0xe6)][_0x51d022(0x136)],'parkedTotal':this['_bpParkedTotal'],'highWater':this[_0x51d022(0x238)]};}[_0xc70012(0xb9)](){const _0x27eb49=_0xc70012,_0xed8b3e=_0xeab2d3[_0x27eb49(0x1c0)]();return[...this[_0x27eb49(0x180)][_0x27eb49(0x226)]()][_0x27eb49(0x279)](_0x2bc187=>Math[_0x27eb49(0x153)](_0xed8b3e-_0x2bc187))[_0x27eb49(0x16f)]((_0x535048,_0x52aed4)=>_0x52aed4-_0x535048);}['markClosed'](){const _0x28ec90=_0xc70012;this[_0x28ec90(0x161)]=!![];for(const _0x3d8eb7 of this[_0x28ec90(0xe6)][_0x28ec90(0x1f1)](0x0))_0x3d8eb7();}async[_0xc70012(0x12b)](){const _0xc1939c=_0xc70012;let _0x47a437=0x0;while(this['_inflight'][_0xc1939c(0x252)]&&_0x47a437++<0x3e8){await Promise[_0xc1939c(0x14e)]([...this[_0xc1939c(0x27b)]]);}}async[_0xc70012(0x275)](_0x31ee7d,_0x3d7f56,_0xcec828,_0x75bc14){const _0x15c3bf=_0xc70012;return this[_0x15c3bf(0x2ba)](()=>{const _0x188d1f=_0x15c3bf;if(_0x75bc14===undefined)_0x31ee7d[_0x188d1f(0x1a1)](_0x3d7f56,_0xcec828);else _0x31ee7d['putSync'](_0x3d7f56,_0xcec828,_0x75bc14);},'raw-put');}async[_0xc70012(0x1b0)](_0x5edc38,_0x27d165){const _0x2e7b1c=_0xc70012;return this[_0x2e7b1c(0x2ba)](()=>_0x5edc38['removeSync'](_0x27d165),_0x2e7b1c(0x149));}}async function _0x1a6f70(_0x44cb1b,_0x3d175b){const _0x26e74d=_0xc70012;if(_0x3d175b==null)_0x3d175b=Math[_0x26e74d(0x24a)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x487cef=_0x44cb1b?.[_0x26e74d(0x28e)];if(!_0x487cef||typeof _0x487cef['then']!==_0x26e74d(0x1d3))return;await Promise[_0x26e74d(0x170)]([Promise[_0x26e74d(0x23d)](_0x487cef)['catch'](()=>{}),new Promise(_0x40bfbf=>{const _0x1d13e3=_0x26e74d,_0x1dbac5=setTimeout(_0x40bfbf,_0x3d175b);if(_0x1dbac5[_0x1d13e3(0x2b4)])_0x1dbac5[_0x1d13e3(0x2b4)]();})]);}catch{}}function _0xa8e2fa(_0x2eba7b){const _0x1699dc=_0xc70012;if(_0x2b1a30)return Promise[_0x1699dc(0x23d)]();const _0x34b858=_0x2eba7b?.[_0x1699dc(0x2c6)];return _0x34b858&&typeof _0x34b858[_0x1699dc(0x1e2)]===_0x1699dc(0x1d3)?_0x34b858:Promise[_0x1699dc(0x23d)]();}const _0x2fab71=Math[_0xc70012(0x24a)](0x1,Math[_0xc70012(0x1be)](Number(process.env.UV_THREADPOOL_SIZE))||0x4),_0xd62e2=Math[_0xc70012(0x24a)](0x1,_0x2fab71-0x2);let _0x3f0914=0x0;const _0x41ade1=[];async function _0x4a2203(_0x1e3ade){const _0x1b79ff=_0xc70012;if(_0x3f0914<_0xd62e2)_0x3f0914++;else await new Promise(_0x55166e=>_0x41ade1['push'](_0x55166e));try{return await _0x1e3ade();}finally{const _0x545060=_0x41ade1[_0x1b79ff(0x188)]();if(_0x545060)_0x545060();else _0x3f0914--;}}return okdbWriter[_0xc70012(0x1fa)]=_0x2f64d8,okdbWriter[_0xc70012(0x1fa)]['withPoolHold']=_0x4a2203,okdbWriter['exports']['MAX_POOL_HOLDS']=_0xd62e2,okdbWriter['exports']['flushLmdb']=_0x1a6f70,okdbWriter['exports'][_0xc70012(0x2c6)]=_0xa8e2fa,okdbWriter[_0xc70012(0x1fa)]['SYNC_COMMITS']=_0x2b1a30,okdbWriter[_0xc70012(0x1fa)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x3d8dc7=_0x2ee730;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x4db2d0=require$$0$3,{clampTimerDelay:_0x39e3b0}=requireOkdbTimers(),{SYNC_COMMITS:_0x57c709}=requireOkdbWriter(),_0x11c8fd=_0x3d8dc7(0x143);class _0x374f4{constructor(_0x84cf0a,_0x2dd55a,_0x546427){const _0x4700bb=_0x3d8dc7;this['_lock']=_0x84cf0a,this['_key']=_0x2dd55a,this[_0x4700bb(0x1c7)]=_0x546427,this[_0x4700bb(0x299)]=![],this[_0x4700bb(0x1ea)]=null,this[_0x4700bb(0x23e)]=null;}[_0x3d8dc7(0x11b)](){const _0x5e1bd4=_0x3d8dc7;if(this[_0x5e1bd4(0x299)])return![];try{const _0x42316c=this['_lock']['_db']()[_0x5e1bd4(0xf2)](this['_key']);if(!_0x42316c||_0x42316c[_0x5e1bd4(0xeb)]!==this['_acquiredAt'])return![];const _0x39ed73=_0x42316c[_0x5e1bd4(0x221)]??_0x42316c['acquiredAt'];if(_0x39ed73+_0x42316c[_0x5e1bd4(0x2d2)]<Date[_0x5e1bd4(0x1c0)]())return![];return!![];}catch{return!this['_released'];}}['holder'](){const _0x30f089=_0x3d8dc7;if(this['_released'])return null;try{return this['_lock'][_0x30f089(0x209)]()[_0x30f089(0xf2)](this[_0x30f089(0x187)])??null;}catch{return null;}}async[_0x3d8dc7(0x132)](_0x38f1e4){const _0x1360e4=_0x3d8dc7;if(this[_0x1360e4(0x299)])return;try{if(this['_lock'][_0x1360e4(0x161)]())return;const _0x3c98bc=this[_0x1360e4(0x262)][_0x1360e4(0x209)]()['get'](this[_0x1360e4(0x187)]);if(!_0x3c98bc||_0x3c98bc[_0x1360e4(0xeb)]!==this[_0x1360e4(0x1c7)])return;if(_0x57c709)this['_lock']['_db']()[_0x1360e4(0x1a1)](this['_key'],{..._0x3c98bc,'ttlMs':_0x3c98bc[_0x1360e4(0x2d2)]+_0x38f1e4});else await this[_0x1360e4(0x262)][_0x1360e4(0x209)]()[_0x1360e4(0x275)](this[_0x1360e4(0x187)],{..._0x3c98bc,'ttlMs':_0x3c98bc[_0x1360e4(0x2d2)]+_0x38f1e4});}catch{}}async[_0x3d8dc7(0x157)](){const _0x27e34f=_0x3d8dc7;if(this[_0x27e34f(0x299)])return;if(this[_0x27e34f(0x23e)])try{await this[_0x27e34f(0x23e)];}catch{}clearInterval(this[_0x27e34f(0x1ea)]),this[_0x27e34f(0x1ea)]=null,this[_0x27e34f(0x299)]=!![];try{if(this[_0x27e34f(0x262)][_0x27e34f(0x161)]())return;const _0x5e503a=this[_0x27e34f(0x262)][_0x27e34f(0x209)]()[_0x27e34f(0xf2)](this['_key']);if(_0x5e503a&&_0x5e503a['acquiredAt']===this[_0x27e34f(0x1c7)]){if(_0x57c709)this['_lock']['_db']()[_0x27e34f(0x237)](this['_key']);else await this[_0x27e34f(0x262)]['_db']()[_0x27e34f(0x1b0)](this[_0x27e34f(0x187)]);}}catch{}}[_0x3d8dc7(0x2a2)](_0x46981c,_0x313b50){const _0x5b848d=_0x3d8dc7,_0x5a519e=_0x39e3b0(_0x313b50??Math[_0x5b848d(0x1be)](_0x46981c/0x3));this['_heartbeatTimer']=setInterval(()=>{const _0x2703ec=_0x5b848d;if(this[_0x2703ec(0x299)])return;this[_0x2703ec(0x23e)]=((async()=>{const _0x4d8b9f=_0x2703ec;try{if(this['_lock'][_0x4d8b9f(0x161)]())return;const _0x449921=this[_0x4d8b9f(0x262)][_0x4d8b9f(0x209)]()[_0x4d8b9f(0xf2)](this[_0x4d8b9f(0x187)]);if(!_0x449921||_0x449921['acquiredAt']!==this[_0x4d8b9f(0x1c7)]){this[_0x4d8b9f(0x299)]=!![],clearInterval(this[_0x4d8b9f(0x1ea)]),this[_0x4d8b9f(0x1ea)]=null;return;}if(_0x57c709)this[_0x4d8b9f(0x262)][_0x4d8b9f(0x209)]()[_0x4d8b9f(0x1a1)](this[_0x4d8b9f(0x187)],{..._0x449921,'updatedAt':Date[_0x4d8b9f(0x1c0)]()});else await this[_0x4d8b9f(0x262)]['_db']()[_0x4d8b9f(0x275)](this['_key'],{..._0x449921,'updatedAt':Date['now']()});}catch{}this[_0x4d8b9f(0x23e)]=null;})());},_0x5a519e);if(this[_0x5b848d(0x1ea)][_0x5b848d(0x2b4)])this[_0x5b848d(0x1ea)]['unref']();}}class _0x55f5ec{constructor(_0x4feee8,{namespace:_0x11d4b6,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x499e58=_0x3d8dc7;this[_0x499e58(0x11e)]=_0x4feee8,this[_0x499e58(0x241)]=_0x11d4b6,this[_0x499e58(0x2d2)]=ttlMs,this[_0x499e58(0x177)]=heartbeatMs,this[_0x499e58(0x1da)]=null;}['_db'](){const _0x1ba020=_0x3d8dc7;return this[_0x1ba020(0x142)](),(!this[_0x1ba020(0x1da)]||this['_lockDbOf']!==this['_rawDb'])&&(this[_0x1ba020(0x1da)]=this[_0x1ba020(0x11e)][_0x1ba020(0x293)](_0x11c8fd,{'dupSort':![]}),this['_lockDbOf']=this[_0x1ba020(0x11e)]),this['_lockDb'];}[_0x3d8dc7(0x15f)](){const _0x390578=_0x3d8dc7;return this[_0x390578(0x142)](),(!this[_0x390578(0x13e)]||this['_wantDbOf']!==this[_0x390578(0x11e)])&&(this[_0x390578(0x13e)]=this[_0x390578(0x11e)][_0x390578(0x293)](_0x11c8fd+':want',{'dupSort':![]}),this[_0x390578(0x217)]=this[_0x390578(0x11e)]),this[_0x390578(0x13e)];}[_0x3d8dc7(0x161)](){const _0x44c1b9=_0x3d8dc7,_0x3f649f=this[_0x44c1b9(0x11e)]?.[_0x44c1b9(0x1b6)];return _0x3f649f===_0x44c1b9(0x164)||_0x3f649f===_0x44c1b9(0x200);}[_0x3d8dc7(0x142)](){const _0x963650=_0x3d8dc7;if(this['_closed']())throw new Error(_0x963650(0xcc));}[_0x3d8dc7(0x187)](_0x5e2f9b){const _0x1ee85a=_0x3d8dc7;return this[_0x1ee85a(0x241)]+':'+_0x5e2f9b;}[_0x3d8dc7(0x247)](_0x438416){const _0x45182e=_0x3d8dc7;try{if(this[_0x45182e(0x161)]())return;_0x57c709?this[_0x45182e(0x15f)]()[_0x45182e(0x1a1)](this[_0x45182e(0x187)](_0x438416),Date['now']()):this[_0x45182e(0x15f)]()[_0x45182e(0x275)](this['_key'](_0x438416),Date[_0x45182e(0x1c0)]())?.[_0x45182e(0x2b1)]?.(()=>{});}catch{}}['isWanted'](_0x35249a,_0xdbdc3d=0x3e8){const _0xb8861e=_0x3d8dc7;try{const _0x959123=this[_0xb8861e(0x15f)]()[_0xb8861e(0xf2)](this[_0xb8861e(0x187)](_0x35249a));return typeof _0x959123==='number'&&Date[_0xb8861e(0x1c0)]()-_0x959123<_0xdbdc3d;}catch{return![];}}[_0x3d8dc7(0x20f)](_0x551b61){const _0x1c54be=_0x3d8dc7,_0x52f1b1=_0x551b61[_0x1c54be(0x221)]??_0x551b61[_0x1c54be(0xeb)];return _0x52f1b1+_0x551b61['ttlMs']<Date[_0x1c54be(0x1c0)]();}static['_holderDead'](_0x908ba5){const _0x4ad916=_0x3d8dc7,_0x1bc741=_0x908ba5?.[_0x4ad916(0x28c)];if(!_0x1bc741||typeof _0x1bc741[_0x4ad916(0xe0)]!==_0x4ad916(0x24b))return![];if(_0x1bc741[_0x4ad916(0x1cf)]!==_0x4db2d0[_0x4ad916(0x1cf)]())return![];if(_0x1bc741[_0x4ad916(0xe0)]===process[_0x4ad916(0xe0)])return![];try{return process[_0x4ad916(0x2ce)](_0x1bc741[_0x4ad916(0xe0)],0x0),![];}catch(_0x40143b){return _0x40143b[_0x4ad916(0x286)]===_0x4ad916(0x16e);}}async['tryAcquire'](_0x10c554,_0x20f641={},_0x3a677b={}){const _0x3c6415=_0x3d8dc7,_0x46d987=this[_0x3c6415(0x187)](_0x10c554),_0x1353d7=_0x3a677b['ttlMs']??this['ttlMs'],_0x48e7b5=Date[_0x3c6415(0x1c0)](),_0x5f273f={'holder':{'pid':process[_0x3c6415(0xe0)],'hostname':_0x4db2d0[_0x3c6415(0x1cf)](),..._0x20f641},'acquiredAt':_0x48e7b5,'updatedAt':_0x48e7b5,'ttlMs':_0x1353d7};let _0x148aec=![],_0xf4162f=null;if(this['_closed']())return{'acquired':![],'handle':null,'current':null};try{const _0x4c5968=()=>{const _0x82b009=_0x3c6415,_0x4782a9=this[_0x82b009(0x209)]()[_0x82b009(0xf2)](_0x46d987);if(_0x4782a9&&!this[_0x82b009(0x20f)](_0x4782a9)&&!_0x55f5ec[_0x82b009(0x13f)](_0x4782a9)){const _0x4688ed=_0x20f641[_0x82b009(0x162)]!=null&&_0x4782a9[_0x82b009(0x28c)][_0x82b009(0xe0)]===process[_0x82b009(0xe0)]&&_0x4782a9[_0x82b009(0x28c)][_0x82b009(0x162)]===_0x20f641[_0x82b009(0x162)];if(!_0x4688ed){_0x148aec=![],_0xf4162f=_0x4782a9;return;}_0x5f273f[_0x82b009(0xeb)]<=_0x4782a9['acquiredAt']&&(_0x5f273f['acquiredAt']=_0x4782a9['acquiredAt']+0x1,_0x5f273f['updatedAt']=_0x5f273f[_0x82b009(0xeb)]);}this['_db']()[_0x82b009(0x275)](_0x46d987,_0x5f273f),_0x148aec=!![],_0xf4162f=_0x5f273f;};if(_0x57c709)this['_db']()[_0x3c6415(0x1bd)](_0x4c5968);else await this[_0x3c6415(0x209)]()[_0x3c6415(0x268)](_0x4c5968);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x148aec)return{'acquired':![],'handle':null,'current':_0xf4162f};const _0x594e8e=new _0x374f4(this,_0x46d987,_0x5f273f[_0x3c6415(0xeb)]);return _0x594e8e[_0x3c6415(0x2a2)](_0x1353d7,this[_0x3c6415(0x177)]),{'acquired':!![],'handle':_0x594e8e,'current':_0xf4162f};}[_0x3d8dc7(0xb4)](_0x40accf){const _0x32c59d=_0x3d8dc7;try{return this[_0x32c59d(0x209)]()[_0x32c59d(0xf2)](this['_key'](_0x40accf))??null;}catch{return null;}}[_0x3d8dc7(0x2dc)](){const _0x331123=_0x3d8dc7,_0x2ed93a=this['namespace']+':',_0x45f04d=[];try{for(const {key:_0x212905,value:_0x39c1ba}of this['_db']()['getRange']({'start':_0x2ed93a,'end':_0x2ed93a+'\xff'})){typeof _0x212905===_0x331123(0x19d)&&_0x212905['startsWith'](_0x2ed93a)&&_0x45f04d[_0x331123(0x1ad)]({'id':_0x212905[_0x331123(0x208)](_0x2ed93a[_0x331123(0x136)]),'entry':_0x39c1ba});}}catch{}return _0x45f04d;}static['listAll'](_0x2542bd){const _0x4c6700=_0x3d8dc7,_0x5ec3a4=[];try{const _0x5bee02=_0x2542bd[_0x4c6700(0x293)](_0x11c8fd,{'dupSort':![]});for(const {key:_0x4db89e,value:_0x3a7444}of _0x5bee02[_0x4c6700(0x1ae)]({})){if(typeof _0x4db89e!==_0x4c6700(0x19d))continue;const _0x40f900=_0x4db89e[_0x4c6700(0x259)](':');if(_0x40f900<0x1)continue;_0x5ec3a4['push']({'namespace':_0x4db89e['slice'](0x0,_0x40f900),'id':_0x4db89e[_0x4c6700(0x208)](_0x40f900+0x1),'entry':_0x3a7444});}}catch{}return _0x5ec3a4;}}return okdbLock={'OKDBLock':_0x55f5ec},okdbLock;}var version='2.7.0',require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x4f806b=_0x2ee730;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x259d8d=require$$0$3,_0x330ec8=require$$1$1,_0x3b6071=require$$2,{LOOP:_0x2fe424}=requireOkdbLoopMonitor(),{OKDBLock:_0x29c247}=requireOkdbLock(),{SYNC_COMMITS:_0x5096c4}=requireOkdbWriter(),_0x2ef1f8=_0x4f806b(0x197),_0x5242e4=_0x4f806b(0x2e6),_0x5c3736='~processes:desired',_0x3989e7=_0x4f806b(0xc4),_0x1145fc=(_0x4e2311,_0x586323)=>_0x4e2311+':'+_0x586323,_0x286144=(_0x13e347,_0x286e42)=>_0x13e347+'::'+_0x286e42,_0x23b77e=(_0x39716c,_0x200b43)=>_0x39716c+'/'+_0x200b43,_0x10c28c=(_0x178c1e,_0xc1fccd)=>_0x178c1e+'#'+_0xc1fccd,_0x34c50f=_0x131e2e=>{const _0xc13b05=_0x4f806b;if(_0x131e2e?.[_0xc13b05(0x2de)])return _0x131e2e[_0xc13b05(0x2de)];const _0x40675e=_0x131e2e?.[_0xc13b05(0x1a4)];return typeof _0x40675e===_0xc13b05(0x19d)&&_0x40675e[_0xc13b05(0x289)]('#')?_0x40675e[_0xc13b05(0x208)](0x0,_0x40675e['indexOf']('#')):_0x40675e;},_0x15f37d=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x436944=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x3ccaff=_0x15f37d*0x3,_0x37f977=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math['max'](0x927c0,_0x3ccaff*0x14),_0x5b65af=['processor:progress',_0x4f806b(0x10a),'processor:retry','processor:error',_0x4f806b(0x189),'processor:resumed'];let _0x881118=null;function _0x4349fc(){const _0x8dc6d3=_0x4f806b;if(_0x881118==null)_0x881118=Math[_0x8dc6d3(0x153)]((Date[_0x8dc6d3(0x1c0)]()-process[_0x8dc6d3(0x20a)]()*0x3e8)/0x3e8)*0x3e8;return _0x881118;}function _0x58e3ef(_0x16b7da){const _0x408d3d=_0x4f806b;if(process.env.OKDB_PROCESS_KILL===_0x408d3d(0x282))return![];if(_0x16b7da?.[_0x408d3d(0x1b1)]?.['processes']&&typeof _0x16b7da[_0x408d3d(0x1b1)][_0x408d3d(0x2a0)]===_0x408d3d(0x144)&&_0x16b7da['options'][_0x408d3d(0x2a0)][_0x408d3d(0x2ce)]===![])return![];return!![];}function _0x2198aa(_0x1550f7,_0x108b9f){const _0x276f7f=_0x4f806b,_0x83bf5=!!_0x108b9f?.[_0x276f7f(0x1f3)];switch(_0x1550f7){case _0x276f7f(0x27c):return{'controllable':_0x83bf5,'decommissionable':![],'killable':!![],'killConfirm':_0x276f7f(0x227)};case _0x276f7f(0x21d):case _0x276f7f(0x1d1):return{'controllable':_0x83bf5,'decommissionable':![],'killable':!![],'killConfirm':'confirm'};case _0x276f7f(0x1c4):return{'controllable':![],'decommissionable':![],'killable':![]};case'http-server':case'queue-worker':case _0x276f7f(0x13c):case _0x276f7f(0xca):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x276f7f(0x120)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x3b0db9{constructor(_0x473e1e){const _0xfaa1e3=_0x4f806b;this[_0xfaa1e3(0x295)]=_0x473e1e,this['_statusEnv']=null,this['_desired']=null,this[_0xfaa1e3(0x206)]=new Map(),this[_0xfaa1e3(0x119)]=null,this[_0xfaa1e3(0x285)]=![],this['_isReader']=![],this[_0xfaa1e3(0x156)]=_0x4349fc(),this[_0xfaa1e3(0x1a5)]=_0x1145fc(process[_0xfaa1e3(0xe0)],this[_0xfaa1e3(0x156)]),this[_0xfaa1e3(0x134)]=_0x3b6071[_0xfaa1e3(0x12c)]()[_0xfaa1e3(0x208)](0x0,0x8),this['_rowKey']=_0x10c28c(this[_0xfaa1e3(0x1a5)],this[_0xfaa1e3(0x134)]),this[_0xfaa1e3(0x191)]=Date[_0xfaa1e3(0x1c0)](),this[_0xfaa1e3(0x116)]=null,this[_0xfaa1e3(0x135)]=null,this['_listenAddr']=null,this['_hbTimer']=null,this[_0xfaa1e3(0x249)]=null,this['_onTick']=null,this[_0xfaa1e3(0xb2)]=0x0,this[_0xfaa1e3(0x2ab)]={},this['_children']=new Map(),this[_0xfaa1e3(0x1ee)]=process['cpuUsage'](),this[_0xfaa1e3(0xfe)]=Date['now'](),this[_0xfaa1e3(0x13a)]=0x0,this[_0xfaa1e3(0x207)]=new Map();}get[_0x4f806b(0x2c3)](){const _0x4bc3c8=_0x4f806b;return this[_0x4bc3c8(0x1a5)];}get[_0x4f806b(0x1ab)](){const _0x272f96=_0x4f806b;return this[_0x272f96(0x29c)];}[_0x4f806b(0x27a)](_0x46b081,_0x577502){const _0x8a9d8e=_0x2198aa(_0x46b081,_0x577502);if(_0x8a9d8e['killable']&&!_0x58e3ef(this['okdb']))return{..._0x8a9d8e,'killable':![],'killConfirm':undefined};return _0x8a9d8e;}[_0x4f806b(0x2af)](){const _0x1c87cf=_0x4f806b;return!!this[_0x1c87cf(0x1d5)];}[_0x4f806b(0xc1)](_0x486713){const _0x386f6b=_0x4f806b;Object[_0x386f6b(0x236)](this['_ownMeta'],_0x486713||{});}[_0x4f806b(0x2bc)](_0x1b903e){const _0x12d764=_0x4f806b;if(_0x1b903e)this[_0x12d764(0x1de)]=_0x1b903e;}[_0x4f806b(0x223)](_0x1b8391={}){const _0x1c59a1=_0x4f806b;return this[_0x1c59a1(0x295)][_0x1c59a1(0x179)](_0x1b8391);}['processingStatusView'](){const _0x212d32=_0x4f806b,_0x6116a1={};let _0x3e086c=0x0,_0x166582=0x0;const _0x3b9d47=new Set();for(const _0x327555 of this[_0x212d32(0x2cf)]()){_0x166582++;const _0x1b736b=_0x327555[_0x212d32(0x284)];if(!_0x1b736b)continue;if(_0x1b736b[_0x212d32(0x2a8)])_0x3e086c++;for(const _0xd7ce5a of _0x1b736b['processors']||[]){if(![_0x212d32(0x2d9),_0x212d32(0x2a4)]['includes'](_0xd7ce5a[_0x212d32(0x213)]))continue;(_0xd7ce5a[_0x212d32(0x1f7)]===_0x212d32(0x1c2)||_0xd7ce5a[_0x212d32(0x1f7)]===_0x212d32(0x21b))&&_0xd7ce5a['cursorKey']&&_0x3b9d47[_0x212d32(0x1ff)]((_0xd7ce5a[_0x212d32(0x2cb)]||'default')+':'+_0xd7ce5a[_0x212d32(0x16a)]);const _0xa82f40=_0xd7ce5a['env']||_0x212d32(0x1a7);(_0x6116a1[_0xa82f40]||=[])['push']({..._0xd7ce5a,'env':_0xa82f40,'owner':{'pid':_0x327555[_0x212d32(0xe0)]??null,'kind':_0x327555[_0x212d32(0x26e)]??null}});}}for(const [_0x29c943,_0x16ad08]of Object['entries'](_0x6116a1)){for(const _0x6ecd69 of _0x16ad08){if(_0x6ecd69[_0x212d32(0x213)]===_0x212d32(0x2d9)&&!_0x6ecd69['claimGated']){const _0x3c9365=_0x29c943+':'+(_0x6ecd69[_0x212d32(0x16a)]??'');if(!_0x3b9d47[_0x212d32(0xc5)](_0x3c9365))_0x6ecd69['unclaimed']=!![];}}}return{'envs':_0x6116a1,'policy':null,'participation':{'participating':_0x3e086c,'total':_0x166582},'source':_0x212d32(0x2ac)};}['processorsView'](){const _0x2645df=_0x4f806b,_0x3e82f0=_0x1c6523=>{const _0x5d2ac6=_0x302a;if(_0x1c6523['state']===_0x5d2ac6(0x1c2)||_0x1c6523['state']===_0x5d2ac6(0x21b)||_0x1c6523[_0x5d2ac6(0x1f7)]===_0x5d2ac6(0x1f4))return 0x3;if(_0x1c6523['claimGated'])return 0x1;return 0x2;},_0x29e521=new Map();for(const _0x5e3094 of this['listNodes']()){for(const _0x839794 of _0x5e3094[_0x2645df(0x284)]?.[_0x2645df(0x1f3)]||[]){const _0xb07006={..._0x839794,'owner':{'pid':_0x5e3094[_0x2645df(0xe0)]??null,'kind':_0x5e3094[_0x2645df(0x26e)]??null,'host':_0x5e3094['host']??null}},_0xa3d0a7=_0x839794[_0x2645df(0x213)]==='single'?_0x2645df(0x291)+(_0x839794['env']??'')+'::'+(_0x839794[_0x2645df(0x16a)]??_0x839794[_0x2645df(0x19f)]??_0x839794['id']):_0x2645df(0x264)+(_0x5e3094[_0x2645df(0x1a4)]??_0x5e3094['processKey']??'')+'::'+(_0x839794['env']??'')+'::'+_0x839794['id'],_0x112897=_0x29e521[_0x2645df(0xf2)](_0xa3d0a7);if(!_0x112897||_0x3e82f0(_0xb07006)>_0x3e82f0(_0x112897))_0x29e521[_0x2645df(0x2bb)](_0xa3d0a7,_0xb07006);}}return[..._0x29e521[_0x2645df(0x226)]()];}[_0x4f806b(0x2b5)](){const _0x455601=_0x4f806b,_0x32d84e=Date[_0x455601(0x1c0)](),_0x1f7d99=this[_0x455601(0x2cf)](),_0x5d4efe=_0xdf9426=>Math[_0x455601(0x24a)](0x0,Math[_0x455601(0x153)]((_0x32d84e-(_0xdf9426[_0x455601(0x20b)]||_0x32d84e))/0x3e8)),_0x1b8ff4=_0x1f7d99[_0x455601(0x186)](_0x29a7e3=>_0x29a7e3['kind']===_0x455601(0x27c)),_0x7ea23b=_0x1f7d99[_0x455601(0x13b)](_0x5dd643=>_0x5dd643[_0x455601(0x26e)]===_0x455601(0x27f));if(_0x1b8ff4||_0x7ea23b[_0x455601(0x136)])return{'primary':_0x1b8ff4?{'pid':_0x1b8ff4[_0x455601(0xe0)],'uptime':_0x5d4efe(_0x1b8ff4)}:null,'workers':_0x7ea23b[_0x455601(0x279)](_0x3ebdff=>({'pid':_0x3ebdff[_0x455601(0xe0)],'uptime':_0x5d4efe(_0x3ebdff)})),'workersConfigured':_0x1b8ff4?.[_0x455601(0x1b2)]?.[_0x455601(0xe2)]??_0x7ea23b[_0x455601(0x136)],'mode':_0x455601(0x265)};const _0x3a782e=_0x1f7d99['find'](_0x23f0c4=>_0x23f0c4[_0x455601(0x26e)]===_0x455601(0x21d)||_0x23f0c4[_0x455601(0x26e)]===_0x455601(0x1d1)||_0x23f0c4[_0x455601(0x26e)]===_0x455601(0x1c4)),_0x3c9eff=_0x3a782e?{'pid':_0x3a782e['pid'],'uptime':_0x5d4efe(_0x3a782e)}:{'pid':process[_0x455601(0xe0)],'uptime':Math['max'](0x0,Math[_0x455601(0x153)](process[_0x455601(0x20a)]()))};return{'primary':_0x3c9eff,'workers':[_0x3c9eff],'workersConfigured':0x1,'mode':'single'};}[_0x4f806b(0x13d)](){const _0x1f5e0d=_0x4f806b;return this[_0x1f5e0d(0x1ec)]();}[_0x4f806b(0x1b8)](){const _0x190f53=_0x4f806b,_0x1383fc=new Map();for(const _0x2d1d21 of this[_0x190f53(0x1ec)]())_0x1383fc[_0x190f53(0x2bb)](_0x2d1d21[_0x190f53(0x2de)],{..._0x2d1d21,'children':[]});const _0x5716dd=[];for(const _0x59a0fc of _0x1383fc[_0x190f53(0x226)]()){const _0xa56d7e=_0x59a0fc[_0x190f53(0x181)]?_0x1383fc[_0x190f53(0xf2)](_0x59a0fc[_0x190f53(0x181)]):null;if(_0xa56d7e&&_0xa56d7e!==_0x59a0fc)_0xa56d7e[_0x190f53(0x1f0)][_0x190f53(0x1ad)](_0x59a0fc);else _0x5716dd[_0x190f53(0x1ad)](_0x59a0fc);}const _0x5c7816=(_0x148246,_0x1431e8)=>_0x148246[_0x190f53(0x26e)]===_0x1431e8[_0x190f53(0x26e)]?(_0x148246[_0x190f53(0xe0)]||0x0)-(_0x1431e8[_0x190f53(0xe0)]||0x0):(_0x148246[_0x190f53(0x26e)]??'')<(_0x1431e8[_0x190f53(0x26e)]??'')?-0x1:0x1,_0x161d71=_0x542e55=>{const _0x3d6043=_0x190f53;_0x542e55['sort'](_0x5c7816);for(const _0x78cc7c of _0x542e55)if(_0x78cc7c[_0x3d6043(0x1f0)][_0x3d6043(0x136)])_0x161d71(_0x78cc7c[_0x3d6043(0x1f0)]);};return _0x161d71(_0x5716dd),_0x5716dd;}['getProcess'](_0x3d88f3){const _0x2185ae=_0x4f806b;return this[_0x2185ae(0x1ec)]()[_0x2185ae(0x186)](_0x449a28=>_0x449a28['processKey']===_0x3d88f3)??null;}['_groupByProcess'](_0x5139eb=Date['now']()){const _0x2c5b63=_0x4f806b,_0x5eab69=new Map();for(const _0x35707a of this['listNodes']()){const _0x4d0c3c=_0x34c50f(_0x35707a);let _0x5eca99=_0x5eab69['get'](_0x4d0c3c);!_0x5eca99&&(_0x5eca99={'processKey':_0x4d0c3c,'nodeKey':_0x4d0c3c,'pid':_0x35707a[_0x2c5b63(0xe0)],'ppid':_0x35707a[_0x2c5b63(0x175)]??null,'host':_0x35707a[_0x2c5b63(0x21a)]??null,'kind':_0x35707a['kind'],'role':null,'supervisorKey':_0x35707a[_0x2c5b63(0x181)]??null,'slot':_0x35707a[_0x2c5b63(0xf5)]??null,'slotKey':_0x35707a['slotKey']??null,'caps':_0x35707a[_0x2c5b63(0x2ee)]??null,'lifecycle':_0x35707a['lifecycle']??null,'uptime':Math[_0x2c5b63(0x24a)](0x0,Math[_0x2c5b63(0x153)]((_0x5139eb-(_0x35707a[_0x2c5b63(0x20b)]||_0x5139eb))/0x3e8)),'startedAt':_0x35707a['startedAt']??null,'meta':_0x35707a[_0x2c5b63(0x1b2)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x5eab69[_0x2c5b63(0x2bb)](_0x4d0c3c,_0x5eca99));_0x5eca99[_0x2c5b63(0x106)][_0x2c5b63(0x1ad)]({'instanceId':_0x35707a[_0x2c5b63(0x14d)]??null,'role':_0x35707a[_0x2c5b63(0x152)]??null,'listenAddr':_0x35707a[_0x2c5b63(0x1b5)]??null,'lifecycle':_0x35707a[_0x2c5b63(0x1e4)]??null,'processing':_0x35707a[_0x2c5b63(0x284)]??null});if(!_0x5eca99[_0x2c5b63(0x152)]&&_0x35707a[_0x2c5b63(0x152)])_0x5eca99[_0x2c5b63(0x152)]=_0x35707a[_0x2c5b63(0x152)];if(!_0x5eca99[_0x2c5b63(0x1b5)]&&_0x35707a['listenAddr'])_0x5eca99[_0x2c5b63(0x1b5)]=_0x35707a['listenAddr'];if(!_0x5eca99[_0x2c5b63(0x284)]&&_0x35707a[_0x2c5b63(0x284)])_0x5eca99[_0x2c5b63(0x284)]=_0x35707a['processing'];if(!_0x5eca99[_0x2c5b63(0x2ed)]&&_0x35707a[_0x2c5b63(0x2ed)])_0x5eca99[_0x2c5b63(0x2ed)]=_0x35707a[_0x2c5b63(0x2ed)];if(!_0x5eca99['singletonClaims']&&_0x35707a[_0x2c5b63(0x14a)])_0x5eca99[_0x2c5b63(0x14a)]=_0x35707a['singletonClaims'];if(_0x5eca99[_0x2c5b63(0x2ee)]==null&&_0x35707a[_0x2c5b63(0x2ee)])_0x5eca99[_0x2c5b63(0x2ee)]=_0x35707a[_0x2c5b63(0x2ee)];if(_0x35707a[_0x2c5b63(0x16d)]&&(!_0x5eca99[_0x2c5b63(0x16d)]||(_0x35707a['stats']['at']??0x0)>(_0x5eca99['stats']['at']??0x0)))_0x5eca99[_0x2c5b63(0x16d)]=_0x35707a[_0x2c5b63(0x16d)];}return[..._0x5eab69[_0x2c5b63(0x226)]()];}['runtimeProcessesView'](){const _0x143154=_0x4f806b,_0x36f4d3=[],_0x493af5={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0xc46651 of this[_0x143154(0x1ec)]()){_0x36f4d3[_0x143154(0x1ad)]({'processKey':_0xc46651[_0x143154(0x2de)],'kind':_0xc46651['kind'],'pid':_0xc46651[_0x143154(0xe0)],'supervisorKey':_0xc46651['supervisorKey'],'meta':_0xc46651[_0x143154(0x1b2)]??null,'uptime':_0xc46651[_0x143154(0x20a)],'stats':_0xc46651['stats']??null}),_0x493af5['processes']++;if(_0xc46651['stats']){_0x493af5[_0x143154(0x1a0)]+=_0xc46651[_0x143154(0x16d)]['rss']||0x0,_0x493af5['heapUsed']+=(_0xc46651[_0x143154(0x16d)][_0x143154(0x2a1)]||0x0)+(_0xc46651[_0x143154(0x16d)][_0x143154(0xbc)]?.[_0x143154(0x2a1)]||0x0);const _0xc10c08=_0xc46651[_0x143154(0x16d)]['threads'];_0xc10c08&&(_0x493af5[_0x143154(0xbc)][_0x143154(0x26b)]+=_0xc10c08[_0x143154(0x26b)]||0x0,_0x493af5['threads'][_0x143154(0x28d)]+=_0xc10c08['sandbox']||0x0,_0x493af5[_0x143154(0xbc)][_0x143154(0x1b3)]+=_0xc10c08[_0x143154(0x1b3)]||0x0);}}return{'totals':_0x493af5,'nodes':_0x36f4d3};}async['open']({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x2aafc2=_0x4f806b;this[_0x2aafc2(0x285)]=this[_0x2aafc2(0x285)]||!!writer,this[_0x2aafc2(0x2d3)]=this['_isReader']||!!reader,this[_0x2aafc2(0x116)]=kind||this[_0x2aafc2(0x116)]||(_0x330ec8[_0x2aafc2(0x196)]?_0x2aafc2(0x27f):'cli'),this[_0x2aafc2(0x135)]=supervisorKey??this['_supervisorKey'],this[_0x2aafc2(0x1de)]=listenAddr??this['_listenAddr'],this['_ensureDesired'](),await this['_migrateVocab']();if(!writer&&!reader)return null;if(!this[_0x2aafc2(0x1d5)]){const _0x593a4c=await this['okdb']['createEnvironment'](_0x2ef1f8,{'sync':![],'durability':_0x2aafc2(0x2db)});await _0x593a4c[_0x2aafc2(0x11d)](_0x5242e4),this[_0x2aafc2(0x1d5)]=_0x593a4c;}return this[_0x2aafc2(0x1d5)];}[_0x4f806b(0x1e1)](){const _0x3b6cb5=_0x4f806b;return this[_0x3b6cb5(0x166)]!==this[_0x3b6cb5(0x1d5)]&&(this[_0x3b6cb5(0x166)]=this['_statusEnv'],this[_0x3b6cb5(0x110)]=this[_0x3b6cb5(0x1d5)]['_getType'](_0x5242e4)['data']),this[_0x3b6cb5(0x110)];}[_0x4f806b(0x1e3)](_0x3cbd5e){const _0x33765a=_0x4f806b;if(_0x5096c4)return this['_nodeDb']()[_0x33765a(0x1a1)](_0x3cbd5e[_0x33765a(0x1a4)],_0x3cbd5e,0x1);const _0x269d32=this['_nodeDb']()['put'](_0x3cbd5e[_0x33765a(0x1a4)],_0x3cbd5e,0x1);if(_0x269d32&&typeof _0x269d32[_0x33765a(0x1e2)]==='function')_0x269d32[_0x33765a(0x1e2)](undefined,()=>{});return _0x269d32;}[_0x4f806b(0x1ba)](_0x55a6bd){const _0x5db55a=_0x4f806b;return this[_0x5db55a(0x1e1)]()[_0x5db55a(0x1a1)](_0x55a6bd['nodeKey'],_0x55a6bd,0x1);}[_0x4f806b(0x2c0)](_0x43b40a){const _0x917420=_0x4f806b;if(_0x5096c4)try{return this[_0x917420(0x1e1)]()[_0x917420(0x237)](_0x43b40a);}catch{return![];}const _0x4bd690=this[_0x917420(0x1e1)]()[_0x917420(0x1b0)](_0x43b40a);if(_0x4bd690&&typeof _0x4bd690[_0x917420(0x1e2)]===_0x917420(0x1d3))_0x4bd690[_0x917420(0x1e2)](undefined,()=>{});return _0x4bd690;}async[_0x4f806b(0x19c)](_0x106af8){const _0x2bee1f=_0x4f806b;if(!this[_0x2bee1f(0x1d5)]||!this['_isWriter']||!_0x106af8?.['nodeKey'])return;return this[_0x2bee1f(0x1e3)](_0x106af8);}async[_0x4f806b(0xbd)](_0x28b152){const _0xf07894=_0x4f806b;if(!this['_statusEnv']||!this['_isWriter']||!_0x28b152)return;const _0x191be9=_0x28b152['includes']('#'),_0x4c8008=[];for(const {key:_0x280a7b}of this[_0xf07894(0x1d5)][_0xf07894(0x1ae)](_0x5242e4)){if(_0x280a7b===_0x28b152||!_0x191be9&&typeof _0x280a7b===_0xf07894(0x19d)&&_0x280a7b[_0xf07894(0x1d6)](_0x28b152+'#'))_0x4c8008[_0xf07894(0x1ad)](_0x280a7b);}for(const _0x396550 of _0x4c8008){try{this['_nodeDb']()[_0xf07894(0x237)](_0x396550);}catch{}}}[_0x4f806b(0x125)](_0x327e63){const _0x52c0bb=_0x4f806b;if(typeof _0x327e63?.['pid']!=='number')return![];if(_0x327e63[_0x52c0bb(0x21a)]!==_0x259d8d[_0x52c0bb(0x1cf)]())return![];if(_0x327e63[_0x52c0bb(0xe0)]===process['pid'])return![];if(_0x327e63[_0x52c0bb(0x296)]!=null&&_0x327e63[_0x52c0bb(0x296)]<Date['now']()-_0x37f977)return!![];try{return process[_0x52c0bb(0x2ce)](_0x327e63[_0x52c0bb(0xe0)],0x0),![];}catch(_0x481001){return _0x481001[_0x52c0bb(0x286)]===_0x52c0bb(0x16e);}}[_0x4f806b(0x2cf)](){const _0x5f221b=_0x4f806b;if(!this[_0x5f221b(0x1d5)])return[];try{this[_0x5f221b(0x1d5)]['db']?.[_0x5f221b(0x182)]?.();}catch{}const _0x468b51=Date['now'](),_0x466562=_0x259d8d[_0x5f221b(0x1cf)](),_0xcffc46=[];for(const {value:_0x5b8ab3}of this['_statusEnv']['getRange'](_0x5242e4)){if(!_0x5b8ab3)continue;let _0x5a3481=null;_0x5b8ab3[_0x5f221b(0x21a)]===_0x466562&&typeof _0x5b8ab3[_0x5f221b(0xe0)]===_0x5f221b(0x24b)&&(_0x5a3481=!this['_nodeDead'](_0x5b8ab3));if(_0x5a3481===![])continue;const _0x49da0b=_0x5b8ab3[_0x5f221b(0x296)]==null||_0x5b8ab3[_0x5f221b(0x296)]>=_0x468b51;if(_0x5a3481===!![]||_0x49da0b)_0xcffc46[_0x5f221b(0x1ad)](_0x5b8ab3);}return _0xcffc46;}async[_0x4f806b(0x2d4)](_0x5622cb=0x0){const _0x163d34=_0x4f806b;if(!this['_statusEnv']||!this['_isWriter'])return;const _0x455b20=Date['now']()-_0x5622cb,_0x3fc296=new Set(),_0x577faa=[],_0xf72263=_0x259d8d[_0x163d34(0x1cf)](),_0x42cba8=require$$6['version'];for(const {key:_0x1a3a97,value:_0x269f5a}of this[_0x163d34(0x1d5)][_0x163d34(0x1ae)](_0x5242e4)){if(!_0x269f5a)continue;const _0x4e9dbd=_0x269f5a[_0x163d34(0x21a)]===_0xf72263&&typeof _0x269f5a[_0x163d34(0xe0)]===_0x163d34(0x24b),_0x421275=_0x4e9dbd?this[_0x163d34(0x125)](_0x269f5a):_0x269f5a['expiresAt']!=null&&_0x269f5a['expiresAt']<_0x455b20;if(_0x421275)_0x577faa['push'](_0x1a3a97);else{_0x3fc296[_0x163d34(0x1ff)](_0x34c50f(_0x269f5a)??_0x1a3a97);if(_0x269f5a[_0x163d34(0x17c)]&&_0x269f5a['version']!==_0x42cba8){if(!this['_versionSkewWarned'])this[_0x163d34(0x290)]=new Set();!this[_0x163d34(0x290)][_0x163d34(0xc5)](_0x269f5a[_0x163d34(0x17c)])&&(this[_0x163d34(0x290)][_0x163d34(0x1ff)](_0x269f5a['version']),this[_0x163d34(0x295)][_0x163d34(0x244)]?.[_0x163d34(0x2c5)]?.(_0x163d34(0x17d)+(_0x269f5a[_0x163d34(0xe0)]??'?')+_0x163d34(0x2e2)+_0x269f5a[_0x163d34(0x17c)]+_0x163d34(0x198)+_0x42cba8+_0x163d34(0xec)+'mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.',{'feature':'migrations'}));}}}for(const _0x48383f of _0x577faa)this[_0x163d34(0x2c0)](_0x48383f);if(this['_ensureDesired']()){const _0x5040a2=[];for(const {key:_0xd945f3}of this[_0x163d34(0x210)](_0x163d34(0x2e6))){if(!_0x3fc296[_0x163d34(0xc5)](_0xd945f3)){if(_0x5096c4)try{this[_0x163d34(0x2c4)][_0x163d34(0x237)](_0x163d34(0x1b9)+_0xd945f3);}catch{}else _0x5040a2['push'](this[_0x163d34(0x2c4)]['remove'](_0x163d34(0x1b9)+_0xd945f3));}}if(_0x5040a2['length'])await Promise['allSettled'](_0x5040a2);}}['startHeartbeat'](_0x42bb41=null){const _0x4041ff=_0x4f806b;if(this[_0x4041ff(0x1e9)])return;if(!this[_0x4041ff(0x285)]||!this[_0x4041ff(0x1d5)]){this[_0x4041ff(0x295)]?.[_0x4041ff(0x244)]?.['warn']?.(_0x4041ff(0x121)+this[_0x4041ff(0x285)]+'\x20statusEnv='+!!this[_0x4041ff(0x1d5)]+_0x4041ff(0x240),{'feature':_0x4041ff(0x2a0)});return;}this['_onTick']=_0x42bb41,this[_0x4041ff(0x249)]=()=>this[_0x4041ff(0x159)]();for(const _0x374f13 of _0x5b65af)this[_0x4041ff(0x295)][_0x4041ff(0x184)]['on'](_0x374f13,this[_0x4041ff(0x249)]);this[_0x4041ff(0x29e)]();const _0x398570=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x15f37d;this[_0x4041ff(0x1e9)]=setInterval(()=>{const _0xb0f239=_0x4041ff;if(this['_onTick'])try{this[_0xb0f239(0x140)]();}catch{}this[_0xb0f239(0x29e)](),this['reap']()[_0xb0f239(0x2b1)](()=>{});},_0x398570);if(this[_0x4041ff(0x1e9)]['unref'])this['_hbTimer'][_0x4041ff(0x2b4)]();}['_maybePublish'](){const _0x2f0942=_0x4f806b;if(!this[_0x2f0942(0x285)]||!this['_statusEnv'])return;if(Date['now']()-this['_lastPublishAt']<_0x436944)return;this[_0x2f0942(0x29e)]();}[_0x4f806b(0x29e)](){const _0x450453=_0x4f806b;if(!this[_0x450453(0x285)]||!this[_0x450453(0x1d5)])return;this['_lastPublishAt']=Date[_0x450453(0x1c0)]();try{const _0x50ff32=[this['_buildOwnRow']()];for(const _0xbad18d of this['_children'][_0x450453(0x226)]())_0x50ff32[_0x450453(0x1ad)](this[_0x450453(0x151)](_0xbad18d));const _0x194914=_0x2fe424[_0x450453(0x17e)]?_0x2fe424[_0x450453(0x1c0)]():0x0;for(const _0x36c97e of _0x50ff32){try{this['_putRowSync'](_0x36c97e),this['_publishFailWarned']=![];}catch(_0xd9286d){!this[_0x450453(0x2df)]&&(this[_0x450453(0x2df)]=!![],this['okdb']?.[_0x450453(0x244)]?.[_0x450453(0x2c5)]?.(_0x450453(0x280)+_0xd9286d[_0x450453(0x2c7)],{'feature':_0x450453(0x2a0)}));}}if(_0x2fe424['enabled'])_0x2fe424['note'](_0x450453(0x2d0),_0x2fe424[_0x450453(0x1c0)]()-_0x194914,_0x450453(0x12d)+_0x50ff32[_0x450453(0x136)]+_0x450453(0x22e));}catch(_0x1350b1){!this[_0x450453(0x2df)]&&(this['_publishFailWarned']=!![],this[_0x450453(0x295)]?.['log']?.[_0x450453(0x2c5)]?.('registry\x20publish\x20failing:\x20'+_0x1350b1['message'],{'feature':_0x450453(0x2a0)}));}}async[_0x4f806b(0x193)](){const _0x5f4a1=_0x4f806b;if(this['_onProcEvent']){for(const _0x29cb0c of _0x5b65af){try{this[_0x5f4a1(0x295)][_0x5f4a1(0x184)][_0x5f4a1(0x282)](_0x29cb0c,this[_0x5f4a1(0x249)]);}catch{}}this[_0x5f4a1(0x249)]=null;}this['_hbTimer']&&(clearInterval(this['_hbTimer']),this[_0x5f4a1(0x1e9)]=null);try{if(this['_statusEnv']&&this[_0x5f4a1(0x285)])await this['removeNode'](this[_0x5f4a1(0x29c)]);}catch{}}async['deregisterSelf'](){const _0x1343a4=_0x4f806b;if(!this['_statusEnv']||!this[_0x1343a4(0x285)])return;try{await this['removeNode'](this['_rowKey']);}catch{}try{const _0x115c26=[];for(const {value:_0x34a34e}of this[_0x1343a4(0x1d5)]['getRange'](_0x5242e4)){if(_0x34a34e?.[_0x1343a4(0x175)]===process[_0x1343a4(0xe0)]&&_0x34a34e[_0x1343a4(0x1a4)])_0x115c26['push'](_0x34a34e[_0x1343a4(0x1a4)]);}for(const _0x4e0174 of _0x115c26){try{await this[_0x1343a4(0xbd)](_0x4e0174);}catch{}}}catch{}}async[_0x4f806b(0x115)](){const _0x5ed36e=_0x4f806b;return this[_0x5ed36e(0x19c)](this['_buildOwnRow']());}async['publishChildRow'](_0x5980db){const _0x534428=_0x4f806b;if(!this[_0x534428(0x1d5)]||!this[_0x534428(0x285)])return;return this['putNode'](this[_0x534428(0x151)](_0x5980db));}[_0x4f806b(0x151)]({pid:_0xd0afc6,startedAt:_0x483375,kind:_0xfcb33d,supervisorKey:_0x229373,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x4f806b(0x1fb),meta:meta=null,stats:stats=null}){const _0xeadcd2=_0x4f806b,_0x469a3d=Date[_0xeadcd2(0x1c0)](),_0x399c4d=_0x1145fc(_0xd0afc6,_0x483375);return{'nodeKey':_0x10c28c(_0x399c4d,'0'),'processKey':_0x399c4d,'instanceId':'0','pid':_0xd0afc6,'startedAt':_0x483375,'ppid':process[_0xeadcd2(0xe0)],'host':_0x259d8d[_0xeadcd2(0x1cf)](),'supervisorKey':_0x229373,'slot':slot,'slotKey':slotKey,'kind':_0xfcb33d,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x469a3d,'expiresAt':_0x469a3d+_0x3ccaff,'caps':this[_0xeadcd2(0x27a)](_0xfcb33d,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async['addSupervisedChild'](_0x31a59e){const _0x542cb0=_0x4f806b;if(!_0x31a59e?.['pid'])return null;const _0x56b52d=_0x1145fc(_0x31a59e[_0x542cb0(0xe0)],_0x31a59e[_0x542cb0(0x20b)]);this[_0x542cb0(0x245)][_0x542cb0(0x2bb)](_0x56b52d,{..._0x31a59e,'supervisorKey':_0x31a59e[_0x542cb0(0x181)]??this[_0x542cb0(0x1a5)]});if(this[_0x542cb0(0x285)])await this[_0x542cb0(0xea)](this['_children'][_0x542cb0(0xf2)](_0x56b52d))[_0x542cb0(0x2b1)]?.(()=>{});return _0x56b52d;}['removeSupervisedChild'](_0xe89ee9){const _0x3551d6=_0x4f806b;if(!_0xe89ee9)return;return this[_0x3551d6(0x245)][_0x3551d6(0xd3)](_0xe89ee9),this[_0x3551d6(0xbd)](_0xe89ee9);}[_0x4f806b(0x2b7)](){const _0x515501=_0x4f806b,_0x33e696=Date[_0x515501(0x1c0)](),_0x3287a7=process['cpuUsage'](),_0x28862d=(_0x33e696-this[_0x515501(0xfe)])*0x3e8;if(_0x28862d>=0x3d090){const _0x1b75b0=_0x3287a7[_0x515501(0x1c1)]-this[_0x515501(0x1ee)]['user']+(_0x3287a7[_0x515501(0x212)]-this['_lastCpuUsage']['system']),_0x5ab155=_0x259d8d['cpus']()['length']||0x1;this[_0x515501(0x13a)]=Math[_0x515501(0x1b7)](0x64,Math['round'](_0x1b75b0/(_0x28862d*_0x5ab155)*0x64)),this[_0x515501(0x147)]=Math[_0x515501(0x153)](_0x28862d/0x3e8),this[_0x515501(0x1ee)]=_0x3287a7,this[_0x515501(0xfe)]=_0x33e696;}const _0x4ba41a=process[_0x515501(0x1dd)](),_0x55b3ca=this['_threadStats']['size'];let _0x1e8dbd=0x0;if(_0x55b3ca>0x0){const _0x1c7a30=[this[_0x515501(0x295)],...this['okdb'][_0x515501(0x2ae)]?.['values']?.()??[]];for(const _0x21acb1 of _0x1c7a30){const _0x36a1ec=_0x21acb1['functions']?.[_0x515501(0x232)];if(_0x36a1ec)_0x1e8dbd+=_0x36a1ec['liveThreadStats'][_0x515501(0x1b3)];}}let _0x89072b=null;const _0x3bfac0=_0x55b3ca;if(_0x3bfac0>0x0){let _0x59dad9=0x0;for(const _0x57542f of this['_threadStats'][_0x515501(0x226)]())_0x59dad9+=_0x57542f['heapUsed']||0x0;_0x89072b={'count':_0x3bfac0,'heapUsed':_0x59dad9,'sandbox':_0x55b3ca,'busy':_0x1e8dbd};}return{'rss':_0x4ba41a['rss'],'heapUsed':_0x4ba41a['heapUsed'],'heapTotal':_0x4ba41a[_0x515501(0xe1)],'external':_0x4ba41a[_0x515501(0x105)],'cpuPct':this[_0x515501(0x13a)],'cpuWindowMs':this[_0x515501(0x147)]??null,'threads':_0x89072b,'at':_0x33e696};}[_0x4f806b(0x128)](_0x19243f,_0x1a832b){const _0x4eab99=_0x4f806b;if(!_0x19243f||!_0x1a832b)return;this[_0x4eab99(0x207)][_0x4eab99(0x2bb)](_0x19243f,_0x1a832b);}[_0x4f806b(0x11a)](_0x3edbcb){const _0x3c7cf4=_0x4f806b;this[_0x3c7cf4(0x207)][_0x3c7cf4(0xd3)](_0x3edbcb);}[_0x4f806b(0x17f)](_0x41dac8,_0x258175,_0x40bf4b=undefined){const _0x534c25=_0x4f806b,_0x432272=this[_0x534c25(0x245)][_0x534c25(0xf2)](_0x41dac8);if(!_0x432272||!_0x258175)return;if(_0x40bf4b!==undefined)_0x432272[_0x534c25(0x284)]=_0x40bf4b;_0x432272['stats']={'rss':_0x258175[_0x534c25(0x1a0)]??null,'heapUsed':_0x258175[_0x534c25(0x2a1)]??null,'heapTotal':_0x258175['heapTotal']??null,'external':_0x258175[_0x534c25(0x105)]??null,'cpuPct':_0x258175[_0x534c25(0x28a)]??null,'cpuWindowMs':_0x258175[_0x534c25(0x274)]??null,'threads':_0x258175['threads']??null,'claims':_0x258175[_0x534c25(0x192)]??null,'envsOpen':_0x258175[_0x534c25(0xc9)]??null,'at':Date[_0x534c25(0x1c0)]()};}[_0x4f806b(0x2b0)](){const _0x3218a8=_0x4f806b,_0x5e9697=Date[_0x3218a8(0x1c0)](),_0x1d3f5b=this[_0x3218a8(0x295)][_0x3218a8(0x25e)]||{},_0x20a87d=this['_kind']||_0x3218a8(0x21d);return{'nodeKey':this['_rowKey'],'processKey':this[_0x3218a8(0x1a5)],'instanceId':this[_0x3218a8(0x134)],'pid':process[_0x3218a8(0xe0)],'startedAt':this[_0x3218a8(0x156)],'instanceStartedAt':this['_startedAt'],'ppid':typeof process[_0x3218a8(0x175)]==='number'?process[_0x3218a8(0x175)]:null,'host':_0x259d8d[_0x3218a8(0x1cf)](),'supervisorKey':this[_0x3218a8(0x135)]??null,'version':require$$6[_0x3218a8(0x17c)],'kind':_0x20a87d,'role':{'engines':!!_0x1d3f5b['engines'],'processors':!!_0x1d3f5b[_0x3218a8(0x1f3)],'compaction':_0x1d3f5b[_0x3218a8(0x29f)],'http':_0x1d3f5b[_0x3218a8(0x2ec)]},'listenAddr':this['_listenAddr']??null,'heartbeatAt':_0x5e9697,'expiresAt':_0x5e9697+_0x3ccaff,'caps':this[_0x3218a8(0x27a)](_0x20a87d,_0x1d3f5b),'lifecycle':{'state':'running','desiredVersionApplied':null},'meta':{...this[_0x3218a8(0x2ab)]},'processing':_0x1d3f5b[_0x3218a8(0x1f3)]?this[_0x3218a8(0x1bb)]():null,'engines':_0x1d3f5b[_0x3218a8(0x2ed)]?[...this['okdb'][_0x3218a8(0x239)]??[]]:null,'singletonClaims':this[_0x3218a8(0xf4)](),'stats':this[_0x3218a8(0x2b7)](),'writers':this[_0x3218a8(0x24e)]()};}[_0x4f806b(0x24e)](){const _0x48c68f=_0x4f806b,_0x209acd={};try{for(const [_0x11a2e4,_0x3d4a9e]of this[_0x48c68f(0x295)][_0x48c68f(0x2ae)]){try{const _0x1f53be=_0x3d4a9e[_0x48c68f(0x23b)]?.();if(!_0x1f53be)continue;if(!_0x1f53be['depth']&&!_0x1f53be['committed']&&!(_0x1f53be[_0x48c68f(0x283)]??0x0)&&!_0x1f53be[_0x48c68f(0x2d6)])continue;_0x209acd[_0x11a2e4]={'depth':_0x1f53be[_0x48c68f(0xdc)],'oldestPendingMs':_0x1f53be[_0x48c68f(0x10d)],'committed':_0x1f53be[_0x48c68f(0x2c6)],'commitsPerSec':_0x1f53be[_0x48c68f(0x2c9)],'commitP99Ms':_0x1f53be[_0x48c68f(0x155)],'parkedNow':_0x1f53be['parkedNow']??0x0,'draining':!!_0x1f53be[_0x48c68f(0x2d6)]};}catch{}}}catch{}return Object[_0x48c68f(0x14c)](_0x209acd)[_0x48c68f(0x136)]?_0x209acd:null;}[_0x4f806b(0xf4)](){const _0x4cfa75=_0x4f806b,_0x3338a9=process[_0x4cfa75(0xe0)],_0x2d3de1=Date['now'](),_0x50b179=_0x4b6a53=>{const _0x5ba247=_0x4cfa75;if(!_0x4b6a53)return[];const _0x2ba054=[];try{for(const {id:_0x3b9375,entry:_0x4ddade}of _0x4b6a53[_0x5ba247(0x2dc)]()){if(_0x4ddade?.[_0x5ba247(0x28c)]?.[_0x5ba247(0xe0)]!==_0x3338a9)continue;const _0x38a71b=_0x4ddade[_0x5ba247(0x221)]??_0x4ddade[_0x5ba247(0xeb)]??0x0;if(_0x38a71b+(_0x4ddade[_0x5ba247(0x2d2)]??0x0)<_0x2d3de1)continue;_0x2ba054['push'](_0x3b9375);}}catch{}return _0x2ba054;},_0x3ab7f5=_0x50b179(this[_0x4cfa75(0x137)](_0x4cfa75(0xd0))),_0x56b3ad=_0x50b179(this[_0x4cfa75(0x137)](_0x4cfa75(0xd7)));if(!_0x3ab7f5['length']&&!_0x56b3ad[_0x4cfa75(0x136)])return null;return{'compact':_0x3ab7f5,'replicate':_0x56b3ad};}[_0x4f806b(0x137)](_0x1e415a){const _0xd25070=_0x4f806b;if(!this['okdb']?.[_0xd25070(0x190)])return null;if(!this[_0xd25070(0x131)])this[_0xd25070(0x131)]=new Map();let _0x54aa49=this['_singletonLocks'][_0xd25070(0xf2)](_0x1e415a);if(!_0x54aa49)try{_0x54aa49=new _0x29c247(this['okdb']['_rootDb'],{'namespace':_0x1e415a}),this[_0xd25070(0x131)][_0xd25070(0x2bb)](_0x1e415a,_0x54aa49);}catch{return null;}return _0x54aa49;}[_0x4f806b(0x1bb)](){const _0xc7803=_0x4f806b,_0x15f536=[];try{for(const [_0x2df790,_0x18cd16]of this[_0xc7803(0x295)]['_envs']){if(_0x2df790[_0xc7803(0x1d6)]('~'))continue;for(const _0x76dae0 of _0x18cd16[_0xc7803(0xd5)]['tierList']())_0x15f536[_0xc7803(0x1ad)]({..._0x76dae0,'env':_0x2df790});}}catch{}return{'participate':this[_0xc7803(0x295)]['processors']?.[_0xc7803(0x1cd)]??![],'processors':_0x15f536};}['_ensureDesired'](){const _0x325021=_0x4f806b;if(this[_0x325021(0x2c4)])return!![];const _0x1f8ffa=this[_0x325021(0x295)][_0x325021(0x190)];if(!_0x1f8ffa)return![];return this[_0x325021(0x2c4)]=_0x1f8ffa[_0x325021(0x293)](_0x5c3736,{'dupSort':![]}),this['_cmd']=_0x1f8ffa[_0x325021(0x293)](_0x3989e7,{'dupSort':![]}),!![];}async['_migrateVocab'](){const _0x147e75=_0x4f806b;if(!this[_0x147e75(0x141)]())return;const _0x5c653e=_0x147e75(0x2c1),_0x4a28c0=0x1,_0x2ebdc1=this[_0x147e75(0x2c4)]['get'](_0x5c653e)??0x0;if(_0x2ebdc1>=_0x4a28c0)return;const _0x44ac2b=_0xdc7920=>{const _0x161166=_0x147e75;if(_0xdc7920===_0x161166(0xca))return _0x161166(0x2d9);if(_0xdc7920===_0x161166(0x287))return _0x161166(0x2a4);return _0xdc7920;};await this[_0x147e75(0x295)][_0x147e75(0x1e8)][_0x147e75(0x154)]['transaction'](()=>{const _0x38920d=_0x147e75;for(const _0x5613a3 of[_0x38920d(0x229),_0x38920d(0x169)]){for(const {key:_0x54c63f,value:_0x48f341}of this[_0x38920d(0x2c4)]['getRange']({'start':_0x5613a3,'end':_0x5613a3+'\xff'})){if(typeof _0x54c63f!=='string'||!_0x54c63f[_0x38920d(0x1d6)](_0x5613a3))break;const _0x3ab485=_0x44ac2b(_0x48f341[_0x38920d(0x213)]);if(_0x3ab485!==_0x48f341[_0x38920d(0x213)])this[_0x38920d(0x2c4)]['put'](_0x54c63f,{..._0x48f341,'mode':_0x3ab485});}}this[_0x38920d(0x2c4)][_0x38920d(0x275)](_0x5c653e,_0x4a28c0);});}[_0x4f806b(0x2b8)](){const _0xd6e609=_0x4f806b;return!!this[_0xd6e609(0x2c4)];}[_0x4f806b(0x2dd)](_0xd3e61,_0x1d32db){const _0x2bf0c9=_0x4f806b;if(!this['_ensureDesired']())return null;const _0x27b406=_0xd3e61+'/'+_0x1d32db;return this[_0x2bf0c9(0x1a6)](),this[_0x2bf0c9(0x206)][_0x2bf0c9(0xf2)](_0x27b406)??this['_desired'][_0x2bf0c9(0xf2)](_0x27b406)??null;}[_0x4f806b(0x1a6)](){const _0x43d2ce=_0x4f806b;if(!_0x5096c4)return;try{this[_0x43d2ce(0x295)][_0x43d2ce(0x1e8)]?.['db']?.[_0x43d2ce(0x182)]?.();}catch{}}async[_0x4f806b(0x1c5)](_0x5a05b7,_0x3dbabf,_0x7452fa){const _0x749536=_0x4f806b;if(!this[_0x749536(0x141)]())return null;const _0x1da6fc=_0x5a05b7+'/'+_0x3dbabf;this[_0x749536(0x1a6)]();const _0x5e644d=this[_0x749536(0x206)]['get'](_0x1da6fc)??this[_0x749536(0x2c4)][_0x749536(0xf2)](_0x1da6fc)??{'version':0x0},_0x471f50=(_0x5e644d[_0x749536(0x17c)]||0x0)+0x1,_0x1694b1={..._0x5e644d,..._0x7452fa,'version':_0x471f50,'updatedAt':Date[_0x749536(0x1c0)]()};this[_0x749536(0x206)][_0x749536(0x2bb)](_0x1da6fc,_0x1694b1);try{await this[_0x749536(0x295)][_0x749536(0x1e8)]['_writer']['transaction'](()=>{const _0x4f402d=_0x749536;this[_0x4f402d(0x2c4)][_0x4f402d(0x275)](_0x1da6fc,_0x1694b1);});}finally{if(this['_desiredOverlay'][_0x749536(0xf2)](_0x1da6fc)===_0x1694b1)this[_0x749536(0x206)][_0x749536(0xd3)](_0x1da6fc);}return _0x471f50;}[_0x4f806b(0x210)](_0xd1f7f6){const _0x3150be=_0x4f806b;if(!this[_0x3150be(0x141)]())return[];this[_0x3150be(0x1a6)]();const _0x3c1f0f=_0xd1f7f6+'/',_0x42c7c4=[];for(const {key:_0x5215a2,value:_0x6cd990}of this[_0x3150be(0x2c4)][_0x3150be(0x1ae)]({'start':_0x3c1f0f,'end':_0x3c1f0f+'\xff'})){if(typeof _0x5215a2!==_0x3150be(0x19d)||!_0x5215a2[_0x3150be(0x1d6)](_0x3c1f0f))break;_0x42c7c4['push']({'key':_0x5215a2[_0x3150be(0x208)](_0x3c1f0f['length']),'value':_0x6cd990});}return _0x42c7c4;}[_0x4f806b(0x117)](_0x520357){const _0x18e6f9=_0x4f806b;if(!this['_ensureDesired']())return null;return this[_0x18e6f9(0x119)][_0x18e6f9(0xf2)](_0x520357)??null;}async[_0x4f806b(0x201)](_0x1a7303,_0xa1dc57,_0x4d6a7f={}){const _0x44806b=_0x4f806b;if(!this['_ensureDesired']())return null;let _0x454515;return await this[_0x44806b(0x295)]['_systemEnv'][_0x44806b(0x154)]['transaction'](()=>{const _0x2970fa=_0x44806b,_0x2495ea=this[_0x2970fa(0x119)][_0x2970fa(0xf2)](_0x1a7303)||{'epoch':0x0};_0x454515=(_0x2495ea[_0x2970fa(0x104)]||0x0)+0x1,this[_0x2970fa(0x119)]['put'](_0x1a7303,{..._0x2495ea,..._0x4d6a7f,'cmd':_0xa1dc57,'epoch':_0x454515,'updatedAt':Date['now']()});}),_0x454515;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x3b0db9,'nodeKey':_0x1145fc,'logicalKey':_0x286144,'slotKey':_0x23b77e,'PROCESS_ENV':_0x2ef1f8,'NODE_TYPE':_0x5242e4},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x393910=_0x2ee730;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x369774=require$$0$4,{clampTimerDelay:_0x2b9c88}=requireOkdbTimers(),{EVENTS:_0x765a0e,CHANGE_ACTIONS:_0x328390}=requireOkdbEnums(),{LOOP:_0x1008fb}=requireOkdbLoopMonitor(),_0xf0539c=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x582db5=0x5,_0x142353=0x2710;class _0x18ef68 extends _0x369774{constructor(_0x53192c,_0x22a864={}){const _0x255f53=_0x302a;super(),this['okdb']=_0x53192c,this[_0x255f53(0x195)]=_0x22a864['quantum']??_0xf0539c,this[_0x255f53(0x224)]=_0x22a864['flushDebounce']??_0x582db5,this[_0x255f53(0x27d)]=_0x22a864[_0x255f53(0x2a3)]??_0x142353,this[_0x255f53(0x24d)]=![],this[_0x255f53(0x103)]=new Map(),this['_baselines']=new Map(),this[_0x255f53(0x29d)]=new Map(),this[_0x255f53(0x26a)]=null,this['_draining']=![],this[_0x255f53(0x1d0)]=new Set(),this[_0x255f53(0x228)]=new Set(),this[_0x255f53(0x11f)]=_0x596ca3=>this[_0x255f53(0x297)](_0x596ca3),this[_0x255f53(0xe9)]=_0x56c75d=>this[_0x255f53(0x21e)](_0x56c75d),this[_0x255f53(0x122)]=_0x1809ad=>this[_0x255f53(0xcf)](_0x1809ad),this[_0x255f53(0x130)]=()=>this[_0x255f53(0x272)]();}[_0x393910(0xc8)](){const _0x321caa=_0x393910;if(this[_0x321caa(0x24d)])return;this[_0x321caa(0x24d)]=!![];for(const [_0x4a4272,_0x496373]of this['okdb'][_0x321caa(0x2ae)]){if(_0x4a4272['startsWith']('~'))continue;try{_0x496373[_0x321caa(0x1d4)]();}catch{}}for(const [_0x138ab5,_0x3b89bb]of this['okdb'][_0x321caa(0x2ae)]){if(_0x138ab5['startsWith']('~'))continue;try{this[_0x321caa(0x29b)][_0x321caa(0x2bb)](_0x138ab5,_0x3b89bb[_0x321caa(0x219)]()||0x0);}catch{}}const {events:_0x1aae8e}=this[_0x321caa(0x295)];_0x1aae8e['on'](_0x765a0e['ITEM_PENDING'],this[_0x321caa(0xe9)]),_0x1aae8e['on'](_0x765a0e['ITEM_CREATE'],this[_0x321caa(0x11f)]),_0x1aae8e['on'](_0x765a0e[_0x321caa(0x20d)],this[_0x321caa(0x11f)]),_0x1aae8e['on'](_0x765a0e[_0x321caa(0x18d)],this['_onItem']),_0x1aae8e['on'](_0x765a0e[_0x321caa(0xdd)],this[_0x321caa(0x122)]),_0x1aae8e['once'](_0x765a0e[_0x321caa(0x278)],this[_0x321caa(0x130)]);}[_0x393910(0x272)](){const _0x12cba7=_0x393910;if(!this[_0x12cba7(0x24d)])return;this[_0x12cba7(0x24d)]=![];const {events:_0x585a55}=this[_0x12cba7(0x295)];_0x585a55[_0x12cba7(0x282)](_0x765a0e['ITEM_PENDING'],this[_0x12cba7(0xe9)]),_0x585a55['off'](_0x765a0e[_0x12cba7(0x127)],this['_onItem']),_0x585a55[_0x12cba7(0x282)](_0x765a0e[_0x12cba7(0x20d)],this[_0x12cba7(0x11f)]),_0x585a55[_0x12cba7(0x282)](_0x765a0e[_0x12cba7(0x18d)],this['_onItem']),_0x585a55[_0x12cba7(0x282)](_0x765a0e[_0x12cba7(0xdd)],this['_onPoke']);try{_0x585a55['off'](_0x765a0e[_0x12cba7(0x278)],this['_onStop']);}catch{}this[_0x12cba7(0x26a)]&&(clearTimeout(this['_flushTimer']),this[_0x12cba7(0x26a)]=null),this[_0x12cba7(0x29d)][_0x12cba7(0xf1)](),this[_0x12cba7(0x103)]['clear'](),this[_0x12cba7(0x29b)][_0x12cba7(0xf1)](),this[_0x12cba7(0x1d0)]['clear'](),this[_0x12cba7(0x228)][_0x12cba7(0xf1)]();}['_dedupeKey'](_0x5dfca9,_0x307fbb,_0x1e67d4,_0x4b5fb0){return _0x5dfca9+'\x00'+_0x307fbb+'\x00'+_0x1e67d4+'\x00'+_0x4b5fb0;}[_0x393910(0x202)](_0xbb65c3,_0x250664,_0x1df466,_0x1e0ea4){const _0x4a00fd=_0x393910,_0x2cd684=this[_0x4a00fd(0x1db)](_0xbb65c3,_0x250664,_0x1df466,_0x1e0ea4);if(this['_seen'][_0x4a00fd(0xc5)](_0x2cd684))return![];this[_0x4a00fd(0x1d0)]['add'](_0x2cd684);if(this[_0x4a00fd(0x1d0)][_0x4a00fd(0x252)]>this[_0x4a00fd(0x27d)]){const _0x170917=this[_0x4a00fd(0x1d0)]['values']()[_0x4a00fd(0x18b)]()[_0x4a00fd(0x2ad)];this[_0x4a00fd(0x1d0)][_0x4a00fd(0xd3)](_0x170917);}return!![];}[_0x393910(0x21e)](_0x444177){const _0x1841a0=_0x393910;if(!this['_started']||!_0x444177)return;const {env:_0x32375e,type:_0x5cbb2b,key:_0x5cb844,clock:_0x4cd954}=_0x444177;if(_0x32375e==null||_0x5cbb2b==null||_0x5cb844==null)return;if(typeof _0x32375e==='string'&&_0x32375e[_0x1841a0(0x1d6)]('~'))return;if(typeof _0x5cbb2b===_0x1841a0(0x19d)&&_0x5cbb2b[_0x1841a0(0x1d6)]('~'))return;this[_0x1841a0(0x228)]['add'](this[_0x1841a0(0x1db)](_0x32375e,_0x5cbb2b,_0x5cb844,_0x4cd954)),this[_0x1841a0(0x228)][_0x1841a0(0x252)]>this[_0x1841a0(0x27d)]&&this[_0x1841a0(0x228)][_0x1841a0(0xd3)](this['_pendingLocal']['values']()[_0x1841a0(0x18b)]()[_0x1841a0(0x2ad)]);}[_0x393910(0x297)](_0x5ce488){const _0x468a9c=_0x393910;if(!this[_0x468a9c(0x24d)]||!_0x5ce488)return;const {env:_0x2429b0,type:_0x2a7ce8,key:_0x2eba8c,clock:_0x246bfc,origin:_0x20f50b,action:_0x9d09cc,newValue:_0xb43688,oldValue:_0x3c68cb}=_0x5ce488;if(_0x2429b0==null||_0x2a7ce8==null||_0x2eba8c==null)return;if(typeof _0x2429b0===_0x468a9c(0x19d)&&_0x2429b0[_0x468a9c(0x1d6)]('~'))return;if(typeof _0x2a7ce8===_0x468a9c(0x19d)&&_0x2a7ce8['startsWith']('~'))return;this[_0x468a9c(0x228)]['delete'](this[_0x468a9c(0x1db)](_0x2429b0,_0x2a7ce8,_0x2eba8c,_0x246bfc));if(!this[_0x468a9c(0x202)](_0x2429b0,_0x2a7ce8,_0x2eba8c,_0x246bfc))return;const _0x36e251=_0x9d09cc===_0x328390[_0x468a9c(0x22d)]?_0x468a9c(0x1b0):_0x468a9c(0x275);this[_0x468a9c(0x1eb)](_0x468a9c(0x16b),{'env':_0x2429b0,'type':_0x2a7ce8,'key':_0x2eba8c,'op':_0x36e251,'clock':_0x246bfc,'origin':_0x20f50b,'value':_0x36e251===_0x468a9c(0x1b0)?null:_0xb43688,'prevValue':_0x3c68cb});}[_0x393910(0xcf)](_0x19d8ff){const _0x7db704=_0x393910;if(!this['_started'])return;if(!_0x19d8ff||typeof _0x19d8ff['env']!=='string'||typeof _0x19d8ff[_0x7db704(0x19f)]!==_0x7db704(0x19d))return;const {env:_0xa32a2a,type:_0x5da1fb}=_0x19d8ff;if(_0xa32a2a['startsWith']('~')||_0x5da1fb[_0x7db704(0x1d6)]('~'))return;this[_0x7db704(0x29d)][_0x7db704(0x2bb)](_0xa32a2a+'\x00'+_0x5da1fb,{'env':_0xa32a2a,'type':_0x5da1fb}),this[_0x7db704(0x1b4)]();}[_0x393910(0x1b4)](){const _0x3e6361=_0x393910;if(this[_0x3e6361(0x26a)])return;const _0x291cfd=()=>{const _0x465a69=_0x3e6361;this['_flushTimer']=null,this[_0x465a69(0xb8)]()[_0x465a69(0x2b1)](()=>{});};this[_0x3e6361(0x26a)]=setTimeout(_0x291cfd,_0x2b9c88(this[_0x3e6361(0x224)]));}async['_drain'](){const _0x1c8e93=_0x393910;if(this[_0x1c8e93(0x1ed)]){this[_0x1c8e93(0x1b4)]();return;}this[_0x1c8e93(0x1ed)]=!![];try{const _0x4a28c4=[...this[_0x1c8e93(0x29d)][_0x1c8e93(0x226)]()];this[_0x1c8e93(0x29d)][_0x1c8e93(0xf1)]();let _0x13caf8=![];for(const {env:_0x2da8fd,type:_0x3f9d64}of _0x4a28c4){try{const _0x5cd8db=await this['_drainOne'](_0x2da8fd,_0x3f9d64);if(_0x5cd8db)_0x13caf8=!![];}catch{this[_0x1c8e93(0x29d)][_0x1c8e93(0x2bb)](_0x2da8fd+'\x00'+_0x3f9d64,{'env':_0x2da8fd,'type':_0x3f9d64}),_0x13caf8=!![];}}if(_0x13caf8||this['_pending'][_0x1c8e93(0x252)]>0x0)this[_0x1c8e93(0x1b4)]();}finally{this[_0x1c8e93(0x1ed)]=![];}}async[_0x393910(0x1d9)](_0x25ed13,_0x5a81ee){const _0x2a5531=_0x393910,_0x1d80e=await this[_0x2a5531(0x295)][_0x2a5531(0x2e9)](_0x25ed13),_0x3bc09c=_0x25ed13+'\x00'+_0x5a81ee;!this[_0x2a5531(0x103)]['has'](_0x3bc09c)&&(!this[_0x2a5531(0x29b)][_0x2a5531(0xc5)](_0x25ed13)&&(_0x1d80e[_0x2a5531(0x1d4)](),this[_0x2a5531(0x29b)][_0x2a5531(0x2bb)](_0x25ed13,_0x1d80e['getClock']()||0x0)),this['_cursors'][_0x2a5531(0x2bb)](_0x3bc09c,this[_0x2a5531(0x29b)][_0x2a5531(0xf2)](_0x25ed13)));const _0x3adeb7=this[_0x2a5531(0x103)][_0x2a5531(0xf2)](_0x3bc09c),_0x5926d3=_0x1d80e[_0x2a5531(0x219)](_0x5a81ee)||0x0;if(_0x5926d3<=_0x3adeb7)return![];const _0x43fa7b=_0x3adeb7+this['_quantum'],_0x4fd35d=Math['min'](_0x5926d3,_0x43fa7b),_0x5320e0=_0x1008fb[_0x2a5531(0x17e)]?_0x1008fb[_0x2a5531(0x1c0)]():0x0,_0x3b7d40=Array[_0x2a5531(0x17b)](_0x1d80e[_0x2a5531(0x172)](_0x5a81ee,_0x3adeb7+0x1,_0x4fd35d));let _0x3e55bd=_0x3adeb7;for(const _0x21586a of _0x3b7d40){const {clock:_0x1d4245,key:_0x46c46d,action:_0x282439,origin:_0x155864}=_0x21586a;if(_0x1d4245>_0x3e55bd)_0x3e55bd=_0x1d4245;if(_0x46c46d==null)continue;if(this['_pendingLocal'][_0x2a5531(0xc5)](this['_dedupeKey'](_0x25ed13,_0x5a81ee,_0x46c46d,_0x1d4245)))continue;if(!this['_markSeen'](_0x25ed13,_0x5a81ee,_0x46c46d,_0x1d4245))continue;let _0x5246eb,_0x41a565;if(_0x282439===_0x328390[_0x2a5531(0x22d)])_0x5246eb='remove',_0x41a565=null;else{const _0x87064=_0x1d80e[_0x2a5531(0xf2)](_0x5a81ee,_0x46c46d);_0x87064==null?(_0x5246eb=_0x2a5531(0x1b0),_0x41a565=null):(_0x5246eb=_0x2a5531(0x275),_0x41a565=_0x87064);}this[_0x2a5531(0x1eb)](_0x2a5531(0x16b),{'env':_0x25ed13,'type':_0x5a81ee,'key':_0x46c46d,'op':_0x5246eb,'clock':_0x1d4245,'origin':_0x155864,'value':_0x41a565});}if(_0x1008fb[_0x2a5531(0x17e)])_0x1008fb[_0x2a5531(0x243)]('feed:'+_0x25ed13+':'+_0x5a81ee,_0x1008fb[_0x2a5531(0x1c0)]()-_0x5320e0,'n='+_0x3b7d40[_0x2a5531(0x136)]);return this[_0x2a5531(0x103)][_0x2a5531(0x2bb)](_0x3bc09c,Math[_0x2a5531(0x24a)](_0x3e55bd,_0x4fd35d)),_0x1d80e['getClock'](_0x5a81ee)>_0x4fd35d;}['status'](){const _0x357880=_0x393910;return{'started':this[_0x357880(0x24d)],'quantum':this['_quantum'],'flushDebounce':this[_0x357880(0x224)],'cursors':Object[_0x357880(0x1ef)]([...this[_0x357880(0x103)][_0x357880(0x194)]()][_0x357880(0x279)](([_0x37e6f3,_0x2eb912])=>[_0x37e6f3[_0x357880(0x1fe)]('\x00',':'),_0x2eb912])),'pending':this[_0x357880(0x29d)][_0x357880(0x252)],'seen':this[_0x357880(0x1d0)][_0x357880(0x252)]};}}return _0x18ef68[_0x393910(0x1c8)]=_0xf0539c,okdbChangefeed={'OKDBChangefeed':_0x18ef68},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x17734b=_0x2ee730;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x31a090=require$$1$1,_0x3804be=require$$1,{EVENTS:_0x5dee7e}=requireOkdbEnums(),_0x513786=require$$0$3,{slotKey:_0x3b5bea}=requireOkdbProcessRegistry(),_0x4ec597=Number(process.env.OKDB_CLUSTER_RESPAWN_BACKOFF_MS)||0xfa,_0x7375bc=0xfa0,_0x10d4d0=0x5,_0x2cdbd5=0x2710,_0x109a3f=0xbb8,_0x3222bc=0x7d0,_0x3e395e=_0x17734b(0x2a9),_0x5d2aca=_0x17734b(0x248),_0x41c5ff=_0x17734b(0x244),_0x45f01f=_0x17734b(0x16d),_0x40afaa=[_0x5dee7e[_0x17734b(0x1e6)],_0x5dee7e[_0x17734b(0x25a)],_0x5dee7e[_0x17734b(0x22a)],_0x5dee7e[_0x17734b(0x2b9)],_0x5dee7e['INDEX_PROGRESS'],_0x5dee7e[_0x17734b(0x1a9)],_0x5dee7e[_0x17734b(0x158)],_0x5dee7e[_0x17734b(0x12e)],'processor:ready','processor:progress',_0x17734b(0x1d2),'processor:paused',_0x17734b(0x260),_0x17734b(0x231)],_0x4a0aba=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0,_0x87335a=0x64;function _0x4ea13c(_0x15fad9){const _0x1c09bd=_0x17734b;if(!_0x15fad9)return _0x1c09bd(0x124);const _0x29ebae=(_0x15fad9[_0x1c09bd(0x1f3)]||[])[_0x1c09bd(0x279)](_0x299cdf=>[_0x299cdf[_0x1c09bd(0x2cb)],_0x299cdf['id'],_0x299cdf[_0x1c09bd(0x213)],_0x299cdf[_0x1c09bd(0x1f7)],!!_0x299cdf[_0x1c09bd(0x2a6)],!!_0x299cdf['unclaimed'],!!_0x299cdf[_0x1c09bd(0xf7)],_0x299cdf[_0x1c09bd(0x258)]?.[_0x1c09bd(0xe0)]??null,_0x299cdf[_0x1c09bd(0x1f4)]?String(_0x299cdf['error']?.[_0x1c09bd(0x2c7)]??_0x299cdf['error']):null]);return JSON[_0x1c09bd(0x1c9)]([!!_0x15fad9['participate'],_0x29ebae]);}function _0x16df4e({workers:_0xa4affb,makeOkdb:_0x2459bb,port:_0x343fa9,primaryOkdb:_0x5ec691,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0x3f3a60=_0x17734b;if(_0x31a090[_0x3f3a60(0x12a)])return childEntry&&_0x31a090['setupPrimary']({'exec':_0x3804be[_0x3f3a60(0x261)](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0x5debee=_0x3f3a60,_0x25b551=[];for(let _0x1bb63e=0x0;_0x1bb63e<process[_0x5debee(0x150)]['length'];_0x1bb63e++){const _0x482d7b=process[_0x5debee(0x150)][_0x1bb63e];if(_0x482d7b['startsWith'](_0x5debee(0x2bf))||_0x482d7b[_0x5debee(0x1d6)](_0x5debee(0x255))||_0x482d7b[_0x5debee(0x1d6)](_0x5debee(0xb3)))continue;if(_0x482d7b==='-e'||_0x482d7b==='--eval'||_0x482d7b==='-p'||_0x482d7b===_0x5debee(0xf0)){_0x1bb63e++;continue;}_0x25b551[_0x5debee(0x1ad)](_0x482d7b);}return _0x25b551;})())}),_0x47822e({'workers':_0xa4affb,'port':_0x343fa9,'primaryOkdb':_0x5ec691,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x343fa9});return _0x986ec({'makeOkdb':_0x2459bb,'port':_0x343fa9});}function _0x47822e({workers:_0x6f30c1,port:_0x531411,primaryOkdb:_0x409b7e,workerEnv:_0x5691fb,workerRole:_0x5cf6eb,listenAddr:_0x5b046e}){const _0x3e2be8=_0x17734b,_0x25513d=new Map(),_0x316bba=new Map();let _0x58b644=![];const _0xbb050d=_0x3a539c=>_0x3a539c?.[_0x3e2be8(0x230)],_0x427c2f=_0x51aaea=>{const _0x4ec6cc=_0x3e2be8,_0x40c038=_0x31a090[_0x4ec6cc(0x251)]({...process.env,..._0x5691fb||{},'OKDB_CLUSTER_SLOT':String(_0x51aaea)});return _0x40c038['__okdbSlot']=_0x51aaea,_0x25513d['set'](_0x40c038[_0x4ec6cc(0x204)][_0x4ec6cc(0xe0)],{'worker':_0x40c038,'startedAt':Date[_0x4ec6cc(0x1c0)](),'slot':_0x51aaea}),_0x40c038['on'](_0x4ec6cc(0x1f4),_0x407733=>{const _0x227464=_0x4ec6cc;console[_0x227464(0x244)](_0x227464(0x273)+_0x40c038['process'][_0x227464(0xe0)]+_0x227464(0x2be)+(_0x407733?.['message']??_0x407733));}),_0x40c038['on'](_0x4ec6cc(0x1c2),()=>_0x52adc1()),_0x40c038;},_0x1578f8=_0xe0ee6d=>{const _0x50d0b0=_0x3e2be8;for(const {worker:_0x2a65eb}of _0x25513d['values']()){if(_0x2a65eb[_0x50d0b0(0x2ea)]()||!_0x2a65eb[_0x50d0b0(0x24f)]())continue;try{_0x2a65eb['send'](_0xe0ee6d);}catch{}}};_0x409b7e?.['_activateProcesses']?.({'kind':_0x3e2be8(0x27c),'listenAddr':_0x5b046e})[_0x3e2be8(0x2b1)](()=>{}),_0x409b7e?.[_0x3e2be8(0x2a0)]?.['setOwnMeta']?.({'workersConfigured':_0x6f30c1});const _0x23d0cf={'engines':!![],'processors':!![],'compaction':!![],..._0x5cf6eb,'http':!![]},_0x52adc1=()=>{const _0x12b245=_0x3e2be8,_0x3bf9fc=_0x409b7e?.[_0x12b245(0x2a0)];if(!_0x3bf9fc||!_0x3bf9fc[_0x12b245(0x285)])return;const _0x1bacd1=_0x3bf9fc['selfKey'];for(const {worker:_0xacd171,startedAt:_0xaf9688,slot:_0x1d9d9c,stats:_0x2c401e,processing:_0x56e6bd}of _0x25513d[_0x12b245(0x226)]()){if(_0xacd171[_0x12b245(0x2ea)]())continue;const _0x2cc5f8=_0x3bf9fc[_0x12b245(0x2b8)]?.()&&_0x3bf9fc[_0x12b245(0x2dd)](_0x12b245(0xf5),_0x173b42(_0x1d9d9c))?.[_0x12b245(0x211)]===!![];_0x3bf9fc[_0x12b245(0xea)]({'pid':_0xacd171['process'][_0x12b245(0xe0)],'startedAt':_0xaf9688,'kind':'http-server','supervisorKey':_0x1bacd1,'slot':_0x1d9d9c,'slotKey':_0x173b42(_0x1d9d9c),'role':_0x23d0cf,'listenAddr':_0x5b046e,'lifecycle':_0x2cc5f8?_0x12b245(0xae):'running','processing':_0x56e6bd??null,'stats':_0x2c401e??null})[_0x12b245(0x2b1)](()=>{});}},_0x173b42=_0x55c8f1=>_0x3b5bea('cluster:'+_0x531411,_0x55c8f1),_0x5ca2ad=_0x1df7d6=>{const _0x3db11e=_0x3e2be8,_0x2c5a84=_0x409b7e?.[_0x3db11e(0x2a0)];if(!_0x2c5a84?.['hasDesired']?.())return![];return _0x2c5a84['getDesired']('slot',_0x173b42(_0x1df7d6))?.[_0x3db11e(0x211)]===!![];};for(let _0xac3c2c=0x0;_0xac3c2c<_0x6f30c1;_0xac3c2c++){const _0x19c2fd=_0x5ca2ad(_0xac3c2c);_0x316bba[_0x3e2be8(0x2bb)](_0xac3c2c,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x19c2fd,'respawnTimer':null}),_0x19c2fd?console[_0x3e2be8(0x244)](_0x3e2be8(0x1a3)+_0xac3c2c+_0x3e2be8(0x15e)):_0x427c2f(_0xac3c2c);}const _0x5dfddd=()=>{const _0x14bad6=_0x3e2be8,_0x479806=_0x409b7e?.[_0x14bad6(0x2a0)];if(!_0x479806?.[_0x14bad6(0x285)]||!_0x479806[_0x14bad6(0x2b8)]?.())return;for(const [_0x5b3fae,_0x16f784]of _0x316bba[_0x14bad6(0x194)]()){const _0x1a3b74=_0x479806['getDesired'](_0x14bad6(0xf5),_0x173b42(_0x5b3fae)),_0x146e33=_0x1a3b74?.[_0x14bad6(0x211)]===!![],_0x99fd60=_0x1a3b74?.[_0x14bad6(0x2ce)]===!![];if(_0x146e33&&!_0x16f784[_0x14bad6(0xc0)]){_0x16f784['dead']=!![];_0x16f784['respawnTimer']&&(clearTimeout(_0x16f784['respawnTimer']),_0x16f784[_0x14bad6(0x2e1)]=null);for(const {worker:_0x44a9f5}of _0x25513d['values']()){if(_0xbb050d(_0x44a9f5)!==_0x5b3fae||_0x44a9f5[_0x14bad6(0x2ea)]())continue;try{if(_0x99fd60)_0x44a9f5[_0x14bad6(0x204)][_0x14bad6(0x2ce)](_0x14bad6(0x215));else _0x44a9f5[_0x14bad6(0x24f)]()&&_0x44a9f5[_0x14bad6(0x1df)]();}catch{}}console[_0x14bad6(0x244)](_0x14bad6(0x1af)+(_0x99fd60?'hard-killed':'decommissioned')+'\x20worker\x20slot='+_0x5b3fae+_0x14bad6(0xce));}else{if(!_0x146e33&&_0x16f784[_0x14bad6(0xc0)]&&_0x1a3b74){_0x16f784[_0x14bad6(0xc0)]=![],_0x16f784[_0x14bad6(0x1bc)]=[],_0x16f784[_0x14bad6(0xb6)]=0x0;const _0x5a900f=[..._0x25513d['values']()][_0x14bad6(0x14b)](({worker:_0x1792dd})=>_0xbb050d(_0x1792dd)===_0x5b3fae&&!_0x1792dd[_0x14bad6(0x2ea)]());!_0x5a900f&&!_0x58b644&&(_0x427c2f(_0x5b3fae),console[_0x14bad6(0x244)](_0x14bad6(0xf9)+_0x5b3fae));}}}},_0x362c6a=()=>{try{_0x5dfddd();}catch{}};_0x409b7e?.['events']?.['on']?.(_0x5dee7e['SYSTEM_PROC'],_0x362c6a);const _0x35a97e=[];if(_0x409b7e?.[_0x3e2be8(0x184)]?.['on'])for(const _0x221949 of _0x40afaa){const _0x33dddf=_0x3d945f=>{_0x1578f8({[_0x3e395e]:_0x5d2aca,'event':_0x221949,'data':_0x3d945f??{}});};_0x409b7e['events']['on'](_0x221949,_0x33dddf),_0x35a97e[_0x3e2be8(0x1ad)]({'event':_0x221949,'handler':_0x33dddf});}const _0x55bab0=setInterval(()=>{_0x5dfddd(),_0x52adc1();},_0x4a0aba);_0x55bab0['unref']?.();const _0x31de33=(_0x2c8b75,_0x2c65d5)=>{const _0x48b2d1=_0x3e2be8;if(!_0x2c65d5||typeof _0x2c65d5!==_0x48b2d1(0x144)||_0x2c65d5[_0x3e395e]!==_0x41c5ff)return;if(!_0x409b7e?.[_0x48b2d1(0x244)]?.[_0x48b2d1(0x1aa)])return;const _0x388d3b=_0x2c65d5[_0x48b2d1(0x26c)]||{};_0x409b7e[_0x48b2d1(0x244)][_0x48b2d1(0x1aa)]({..._0x388d3b,'msg':'[w'+_0x2c65d5[_0x48b2d1(0xf5)]+']\x20'+(_0x388d3b[_0x48b2d1(0xed)]??''),'meta':{..._0x388d3b[_0x48b2d1(0x1b2)]||{},'worker':_0x2c65d5['slot'],'workerPid':_0x2c65d5[_0x48b2d1(0xe0)]}});};_0x31a090['on'](_0x3e2be8(0x2c7),_0x31de33);const _0x4fe95a=(_0xb5bd46,_0x50d3bb)=>{const _0x91776f=_0x3e2be8;if(!_0x50d3bb||typeof _0x50d3bb!==_0x91776f(0x144)||_0x50d3bb[_0x3e395e]!==_0x45f01f)return;const _0x488576=_0x25513d[_0x91776f(0xf2)](_0xb5bd46[_0x91776f(0x204)][_0x91776f(0xe0)]);if(_0x488576){_0x488576['stats']={..._0x50d3bb[_0x91776f(0x16d)],'at':Date[_0x91776f(0x1c0)]()};if(_0x50d3bb['processing']!==undefined){const _0x590ee8=_0x4ea13c(_0x50d3bb[_0x91776f(0x284)]);_0x590ee8!==_0x488576[_0x91776f(0x139)]&&(_0x488576[_0x91776f(0x139)]=_0x590ee8,_0x1cdeff()),_0x488576[_0x91776f(0x284)]=_0x50d3bb[_0x91776f(0x284)];}}};let _0x5a8ab7=null;const _0x1cdeff=()=>{if(_0x5a8ab7||_0x58b644)return;_0x5a8ab7=setTimeout(()=>{_0x5a8ab7=null;if(!_0x58b644)_0x52adc1();},_0x87335a),_0x5a8ab7['unref']?.();};_0x31a090['on']('message',_0x4fe95a),_0x31a090['on'](_0x3e2be8(0x2b3),(_0x712835,_0x2fbea6,_0x375924)=>{const _0x56075e=_0x3e2be8,_0x28faee=_0x712835[_0x56075e(0x204)]['pid'],_0xc69efc=_0xbb050d(_0x712835),_0x16fffb=_0x25513d[_0x56075e(0xf2)](_0x28faee);if(_0x16fffb&&_0x409b7e?.[_0x56075e(0x2a0)])_0x409b7e[_0x56075e(0x2a0)]['removeNode'](_0x28faee+':'+_0x16fffb[_0x56075e(0x20b)])['catch'](()=>{});_0x25513d['delete'](_0x28faee),console[_0x56075e(0x244)](_0x56075e(0x273)+_0x28faee+'\x20(slot='+(_0xc69efc??'?')+')\x20exited\x20'+(_0x56075e(0xff)+_0x2fbea6+_0x56075e(0x101)+(_0x375924??_0x56075e(0x1c3))+_0x56075e(0x2d7)+_0x25513d[_0x56075e(0x252)]+_0x56075e(0x145))),_0x52adc1();if(_0x58b644||_0xc69efc==null)return;const _0x2c92aa=_0x316bba[_0x56075e(0xf2)](_0xc69efc);if(!_0x2c92aa||_0x2c92aa[_0x56075e(0xc0)])return;const _0x38a5eb=Date[_0x56075e(0x1c0)]();_0x2c92aa[_0x56075e(0x1bc)][_0x56075e(0x1ad)](_0x38a5eb),_0x2c92aa[_0x56075e(0x1bc)]=_0x2c92aa[_0x56075e(0x1bc)][_0x56075e(0x13b)](_0x1565a8=>_0x38a5eb-_0x1565a8<=_0x2cdbd5);if(_0x2c92aa[_0x56075e(0x1bc)][_0x56075e(0x136)]>=_0x10d4d0){_0x2c92aa[_0x56075e(0xc0)]=!![],console['error']('[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot='+_0xc69efc+_0x56075e(0x256)+_0x2c92aa[_0x56075e(0x1bc)][_0x56075e(0x136)]+_0x56075e(0x167)+(_0x2cdbd5+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x25513d['size']+_0x56075e(0xd8)));return;}_0x2c92aa[_0x56075e(0xb6)]++;const _0x2fd9ba=Math[_0x56075e(0x1b7)](_0x7375bc,_0x4ec597*0x2**(_0x2c92aa['consecutiveFailures']-0x1));console[_0x56075e(0x244)](_0x56075e(0x17a)+_0xc69efc+_0x56075e(0xd6)+_0x2fd9ba+_0x56075e(0xef)+_0x2c92aa[_0x56075e(0xb6)]+')'),_0x2c92aa['respawnTimer']=setTimeout(()=>{const _0x3a3e00=_0x56075e;_0x2c92aa['respawnTimer']=null;if(_0x58b644||_0x2c92aa[_0x3a3e00(0xc0)])return;const _0x178039=_0x427c2f(_0xc69efc);_0x178039[_0x3a3e00(0x2e3)](_0x3a3e00(0x276),()=>{const _0x230329=_0x3a3e00;if(_0x316bba[_0x230329(0xf2)](_0xc69efc)===_0x2c92aa)_0x2c92aa[_0x230329(0xb6)]=0x0;});},_0x2fd9ba),_0x2c92aa['respawnTimer'][_0x56075e(0x2b4)]?.();});const _0x24af15=[..._0x25513d[_0x3e2be8(0x14c)]()];console[_0x3e2be8(0x244)]('[okdb-cluster]\x20primary\x20pid='+process[_0x3e2be8(0xe0)]+_0x3e2be8(0x2cd)+_0x6f30c1+'\x20HTTP\x20server(s)\x20on\x20port\x20'+_0x531411+':\x20'+('['+_0x24af15[_0x3e2be8(0x261)](',\x20')+']'));const _0x2ccde3={'_isClusterController':!![],'port':_0x531411,'primaryOkdb':_0x409b7e??null,'status'(){const _0x58c843=_0x3e2be8;return{'clustered':!![],'primaryPid':process[_0x58c843(0xe0)],'port':_0x531411,'primaryRole':_0x409b7e?.[_0x58c843(0x152)]??null,'processorPid':null,'supervisorPid':process['pid'],'workers':[..._0x25513d[_0x58c843(0x226)]()]['map'](({worker:_0x585117})=>({'pid':_0x585117['process'][_0x58c843(0xe0)],'id':_0x585117['id'],'dead':_0x585117[_0x58c843(0x2ea)]()}))};},async 'close'(){const _0x35b679=_0x3e2be8;_0x58b644=!![];for(const _0xfd5213 of _0x316bba[_0x35b679(0x226)]()){_0xfd5213[_0x35b679(0xc0)]=!![],_0xfd5213['respawnTimer']&&(clearTimeout(_0xfd5213['respawnTimer']),_0xfd5213['respawnTimer']=null);}clearInterval(_0x55bab0);_0x5a8ab7&&(clearTimeout(_0x5a8ab7),_0x5a8ab7=null);_0x31a090[_0x35b679(0x282)](_0x35b679(0x2c7),_0x31de33),_0x31a090[_0x35b679(0x282)](_0x35b679(0x2c7),_0x4fe95a),_0x409b7e?.[_0x35b679(0x184)]?.[_0x35b679(0x282)]?.(_0x5dee7e[_0x35b679(0x205)],_0x362c6a);if(_0x409b7e?.[_0x35b679(0x184)]?.[_0x35b679(0x282)])for(const {event:_0x482d24,handler:_0x2e87b8}of _0x35a97e){try{_0x409b7e[_0x35b679(0x184)]['off'](_0x482d24,_0x2e87b8);}catch{}}_0x35a97e[_0x35b679(0x136)]=0x0;const _0x4656d0=[..._0x25513d[_0x35b679(0x226)]()][_0x35b679(0x279)](({worker:_0x32e0f5})=>_0x32e0f5);if(_0x4656d0[_0x35b679(0x136)]===0x0)return;await Promise[_0x35b679(0xe4)](_0x4656d0[_0x35b679(0x279)](_0x3d2fdb=>new Promise(_0x426b9e=>{const _0x361d9d=_0x35b679;if(_0x3d2fdb[_0x361d9d(0x2ea)]()){_0x426b9e();return;}let _0x16dc30=![];const _0x263787=()=>{if(_0x16dc30)return;_0x16dc30=!![];if(_0x1f1d20)clearTimeout(_0x1f1d20);_0x426b9e();};_0x3d2fdb[_0x361d9d(0x2e3)](_0x361d9d(0x2b3),_0x263787);const _0x1f1d20=setTimeout(()=>{const _0x1a88d1=_0x361d9d;try{_0x3d2fdb[_0x1a88d1(0x204)]['kill']();}catch{}},_0x109a3f+0x1f4);_0x1f1d20['unref']?.();try{_0x3d2fdb[_0x361d9d(0x1df)]();}catch{try{_0x3d2fdb[_0x361d9d(0x204)][_0x361d9d(0x2ce)]();}catch{}}})));}};return _0x2ccde3;}async function _0x986ec({makeOkdb:_0x4f1405,port:_0x2d3108}){const _0x116039=_0x17734b,_0x13b5a8=await _0x4f1405();return _0x20a886(_0x13b5a8),_0x13b5a8[_0x116039(0x2ec)]['listen'](_0x2d3108);}function _0x20a886(_0x4a61ab){const _0x43ec6a=_0x17734b;if(!_0x4a61ab||_0x4a61ab['_clusterWorkerAttached'])return;_0x4a61ab[_0x43ec6a(0x294)]=!![];try{const {OKDBChangefeed:_0x4ace2c}=requireOkdbChangefeed(),_0x1af256=_0x4a61ab[_0x43ec6a(0xf3)];if(_0x1af256&&typeof _0x1af256[_0x43ec6a(0x2b2)]===_0x43ec6a(0x1d3)){const _0x47bb21=new _0x4ace2c(_0x4a61ab);_0x47bb21[_0x43ec6a(0xc8)](),_0x1af256[_0x43ec6a(0x2b2)](_0x47bb21),_0x4a61ab[_0x43ec6a(0x113)]=_0x47bb21;}}catch(_0x193efd){_0x4a61ab['log']?.[_0x43ec6a(0x2c5)]?.(_0x43ec6a(0x112)+(_0x193efd?.[_0x43ec6a(0x2c7)]??_0x193efd),{'feature':_0x43ec6a(0x265)});}const _0x4fdd54=_0x3a9631=>{const _0x3819e7=_0x43ec6a;if(!_0x3a9631||typeof _0x3a9631!==_0x3819e7(0x144)||_0x3a9631[_0x3e395e]==null)return;if(_0x3a9631[_0x3e395e]===_0x5d2aca)try{_0x4a61ab[_0x3819e7(0xf3)]?.[_0x3819e7(0xac)]?.(_0x3a9631[_0x3819e7(0xb0)],_0x3a9631[_0x3819e7(0x253)]);}catch{}};process['on'](_0x43ec6a(0x2c7),_0x4fdd54),_0x4a61ab[_0x43ec6a(0xc2)]=_0x4fdd54;{let _0x9fb025=process[_0x43ec6a(0x18e)](),_0x3a012d=Date['now']();const _0x123089=()=>{const _0x4b7c3c=_0x43ec6a;if(typeof process[_0x4b7c3c(0x23a)]!==_0x4b7c3c(0x1d3)||!process[_0x4b7c3c(0xb5)])return;const _0x22e976=Date['now'](),_0x6a806b=process['cpuUsage'](),_0x4e0303=(_0x22e976-_0x3a012d)*0x3e8,_0x37b7cd=_0x6a806b['user']-_0x9fb025[_0x4b7c3c(0x1c1)]+(_0x6a806b['system']-_0x9fb025[_0x4b7c3c(0x212)]),_0x32ce8f=_0x4e0303>0x0?Math['min'](0x64,Math[_0x4b7c3c(0x153)](_0x37b7cd/(_0x4e0303*(_0x513786[_0x4b7c3c(0x2bd)]()[_0x4b7c3c(0x136)]||0x1))*0x64)):0x0;_0x9fb025=_0x6a806b,_0x3a012d=_0x22e976;const _0x4f3ad6=process[_0x4b7c3c(0x1dd)]();let _0x8f5402=null;try{_0x8f5402=_0x4a61ab[_0x4b7c3c(0x152)]?.[_0x4b7c3c(0x1f3)]?_0x4a61ab[_0x4b7c3c(0x2a0)]?.[_0x4b7c3c(0x1bb)]?.()??null:null;}catch{}try{process[_0x4b7c3c(0x23a)]({[_0x3e395e]:_0x45f01f,'stats':{'rss':_0x4f3ad6[_0x4b7c3c(0x1a0)],'heapUsed':_0x4f3ad6[_0x4b7c3c(0x2a1)],'heapTotal':_0x4f3ad6[_0x4b7c3c(0xe1)],'external':_0x4f3ad6[_0x4b7c3c(0x105)],'cpuPct':_0x32ce8f,'cpuWindowMs':Math[_0x4b7c3c(0x153)](_0x4e0303/0x3e8)||null},'processing':_0x8f5402});}catch{}},_0x2046c3=Math[_0x43ec6a(0x24a)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x4e8565=setInterval(_0x123089,_0x2046c3);_0x4e8565[_0x43ec6a(0x2b4)]?.(),_0x123089();for(const _0x1c8a8e of[_0x43ec6a(0x189),_0x43ec6a(0x260)]){_0x4a61ab[_0x43ec6a(0x184)]?.['on']?.(_0x1c8a8e,()=>{try{_0x123089();}catch{}});}}let _0xc223e7=![];const _0x2daa67=async _0x165046=>{const _0x3d6e50=_0x43ec6a;if(_0xc223e7)return;_0xc223e7=!![];const _0x1774ab=setTimeout(()=>process[_0x3d6e50(0x2b3)](_0x165046),_0x109a3f);_0x1774ab[_0x3d6e50(0x2b4)]?.();try{await _0x4a61ab[_0x3d6e50(0x1a8)]?.();}catch{}process[_0x3d6e50(0x2b3)](_0x165046);};process['on'](_0x43ec6a(0x1df),()=>_0x2daa67(0x0));if(process['send']&&!process['connected'])_0x2daa67(0x0);if(process[_0x43ec6a(0x1d7)]!==_0x43ec6a(0x1f5)){const _0x1b3766=setInterval(()=>{const _0x154079=_0x43ec6a;if(process[_0x154079(0x175)]===0x1)_0x2daa67(0x0);},_0x3222bc);_0x1b3766[_0x43ec6a(0x2b4)]?.(),_0x4a61ab['_clusterOrphanWatch']=_0x1b3766;}}return okdbCluster={'runClustered':_0x16df4e,'attachWorkerCluster':_0x20a886},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0x48c546=_0x2ee730;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x496c27=require$$0$5,{attachWorkerCluster:_0x523529}=requireOkdbCluster();async function _0x571855(){const _0x142d85=_0x302a,_0xaa0fe6=process.env.OKDB_HTTP_CHILD;if(!_0xaa0fe6)throw new Error(_0x142d85(0x25b));const {rootPath:_0x904889,port:_0x16d1a9,options:options={},logLevel:logLevel=_0x142d85(0x19b)}=JSON['parse'](_0xaa0fe6);if(!_0x904889||!_0x16d1a9)throw new Error('okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required');const _0xa04980=new _0x496c27(_0x904889,{...options,'engines':![],'processors':![],'compaction':![]});_0xa04980[_0x142d85(0x244)][_0x142d85(0x114)]?.();const _0x5be3f0=process.env.OKDB_CLUSTER_SLOT??'?',_0x162529={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x1a8eb2=_0x162529[logLevel]??_0x162529[_0x142d85(0x19b)];_0xa04980[_0x142d85(0x244)][_0x142d85(0x2a5)](_0x5acf98=>{const _0x133022=_0x142d85;if((_0x162529[_0x5acf98[_0x133022(0xda)]]??0x1)<_0x1a8eb2)return;try{process[_0x133022(0x23a)]?.({'__okdbCluster':'log','slot':_0x5be3f0,'pid':process[_0x133022(0xe0)],'entry':_0x5acf98});}catch{}}),await _0xa04980['open'](),_0x523529(_0xa04980),await _0xa04980[_0x142d85(0x2ec)][_0x142d85(0x1f6)](_0x16d1a9);}return _0x571855()[_0x48c546(0x2b1)](_0x1e5194=>{const _0x258944=_0x48c546;try{process[_0x258944(0x23a)]?.({'__okdbCluster':_0x258944(0x244),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x258944(0xe0)],'entry':{'level':_0x258944(0x1f4),'msg':'http\x20worker\x20child\x20failed:\x20'+(_0x1e5194?.[_0x258944(0x2c7)]??_0x1e5194)}});}catch{}process[_0x258944(0x2b3)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module[_0x2ee730(0x1fa)]=okdbHttpWorkerChild;