@kedem/okdb 2.6.4 → 2.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +80 -0
- package/algorithm-worker-thread.js +1 -1
- package/bin/okdb.js +1 -1
- package/docs/functions.md +27 -0
- package/okdb-functions-sandbox-worker.js +1 -1
- package/okdb-http-worker-child.js +1 -1
- package/okdb-views-bootstrap-worker.js +1 -1
- package/okdb.js +1 -1
- package/package.json +1 -1
|
@@ -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 _0x727d37=_0x1c29;(function(_0x267092,_0x13d3ff){const _0x10a35f=_0x1c29,_0x88bdd1=_0x267092();while(!![]){try{const _0x18ea21=parseInt(_0x10a35f(0x2b0))/0x1+parseInt(_0x10a35f(0x37b))/0x2*(-parseInt(_0x10a35f(0x295))/0x3)+-parseInt(_0x10a35f(0x267))/0x4+-parseInt(_0x10a35f(0x27d))/0x5+-parseInt(_0x10a35f(0x20f))/0x6+parseInt(_0x10a35f(0x23c))/0x7*(-parseInt(_0x10a35f(0x371))/0x8)+parseInt(_0x10a35f(0x2f1))/0x9*(parseInt(_0x10a35f(0x215))/0xa);if(_0x18ea21===_0x13d3ff)break;else _0x88bdd1['push'](_0x88bdd1['shift']());}catch(_0x505f54){_0x88bdd1['push'](_0x88bdd1['shift']());}}}(_0x1004,0xa7565));function _0x1c29(_0x488e63,_0x18824a){_0x488e63=_0x488e63-0x15d;const _0x1004fe=_0x1004();let _0x1c29f1=_0x1004fe[_0x488e63];return _0x1c29f1;}var require$$0$5=require(_0x727d37(0x33d)),require$$1$1=require(_0x727d37(0x24a)),require$$1=require('path'),require$$0$3=require('os'),require$$2=require('crypto'),require$$0=require(_0x727d37(0x283)),require$$0$2=require('perf_hooks'),require$$0$1=require('fs'),require$$0$4=require(_0x727d37(0x350));function getDefaultExportFromCjs(_0xb6b3be){const _0x26bad5=_0x727d37;return _0xb6b3be&&_0xb6b3be[_0x26bad5(0x384)]&&Object[_0x26bad5(0x38e)]['hasOwnProperty'][_0x26bad5(0x3a5)](_0xb6b3be,_0x26bad5(0x22d))?_0xb6b3be[_0x26bad5(0x22d)]:_0xb6b3be;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0xac20f1=_0x727d37;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x2bb0fc={'PUT':_0xac20f1(0x298),'REMOVE':_0xac20f1(0x31c),'INDEX_DROP':'dropIndex','INDEX_REGISTER':_0xac20f1(0x2a4),'INDEX_RESET':_0xac20f1(0x36b),'TYPE_REGISTER':_0xac20f1(0x222),'TYPE_DROP':'dropType','FTS_REGISTER':_0xac20f1(0x31f),'FTS_DROP':_0xac20f1(0x32f),'FTS_RESET':_0xac20f1(0x225),'SCHEMA_SET':'setSchema','SCHEMA_DROP':'dropSchema','TTL_SET':'setTtl','TTL_CLEAR':'clearTtl'},_0x5ac379={'SYSTEM_READY':_0xac20f1(0x2f4),'FIELD_RESOLVER_REGISTERED':'field:resolver_registered','SYSTEM_STOPPED':_0xac20f1(0x182),'SYSTEM_CLOCK_CHANGE':_0xac20f1(0x221),'SYSTEM_POKE':_0xac20f1(0x195),'SYSTEM_DRAIN':'system:drain','SYSTEM_TYPE_DROP':_0xac20f1(0x2e5),'SYSTEM_PROC':_0xac20f1(0x19b),'SYSTEM_BUS_STATE_CHANGE':_0xac20f1(0x176),'ITEM_CREATE':_0xac20f1(0x395),'ITEM_UPDATE':_0xac20f1(0x30b),'ITEM_REMOVE':_0xac20f1(0x39d),'ITEM_PENDING':'item:pending','INDEX_RESET':'index:reset','INDEX_READY':'index:ready','INDEX_PROGRESS':'index:progress','VIEW_PROGRESS':_0xac20f1(0x2bc),'INDEX_DROP':_0xac20f1(0x21a),'INDEX_REGISTERED':_0xac20f1(0x207),'FTS_REGISTERED':'fts:registered','FTS_DROP':'fts:drop','FTS_RESET':_0xac20f1(0x1e2),'SCHEMA_SET':_0xac20f1(0x1e1),'SCHEMA_DROP':_0xac20f1(0x2a3),'UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0xac20f1(0x34f),'REF_VIOLATION':_0xac20f1(0x2cf),'REF_VIOLATION_RESOLVED':_0xac20f1(0x349),'SYNC_APPLY':_0xac20f1(0x2b3),'TXN_START':_0xac20f1(0x1bb),'TXN_END':'txn:end','TXN_ROLLBACK':_0xac20f1(0x161),'TYPE_REGISTERED':_0xac20f1(0x2a5),'TYPE_DROP':_0xac20f1(0x22b),'ENV_OPENED':_0xac20f1(0x205),'ENV_REMOVED':_0xac20f1(0x1c5),'SYSTEM_ENV_RELEASE':_0xac20f1(0x261),'TTL_EXPIRED':_0xac20f1(0x211),'TTL_SET':_0xac20f1(0x329),'TTL_CLEAR':_0xac20f1(0x2f8),'LICENSE_INVALID':_0xac20f1(0x355),'LICENSE_ADDED':_0xac20f1(0x191),'LICENSE_ACTIVATED':_0xac20f1(0x377),'LICENSE_REMOVED':_0xac20f1(0x27f)},_0x1f336e={'CREATING':_0xac20f1(0x1f1),'RESETTING':_0xac20f1(0x26b),'READY':_0xac20f1(0x22a),'DROPPING':_0xac20f1(0x324),'WAITING':'waiting','ERROR':_0xac20f1(0x2fd)},_0x15dca2={'CREATED':'created','STARTING':'starting','STARTED':_0xac20f1(0x382),'STOPPING':'stopping','STOPPED':_0xac20f1(0x313)},_0x40944d={'CREATING':_0xac20f1(0x1f1),'READY':_0xac20f1(0x22a),'HALTED':_0xac20f1(0x250),'STOPPED':_0xac20f1(0x313),'RESETTING':_0xac20f1(0x26b)},_0x4889e6=Object[_0xac20f1(0x306)]({'POKE':_0xac20f1(0x2e3),'DRAIN':_0xac20f1(0x277),'TYPE_DROP':_0xac20f1(0x1af),'PROC':_0xac20f1(0x36f),'ENV_RELEASE':'bus:env_release'});return okdbEnums={'BUS_EVENTS':_0x4889e6,'CHANGE_ACTIONS':_0x2bb0fc,'EVENTS':_0x5ac379,'INDEX_STATE':_0x1f336e,'OKDB_STATE':_0x15dca2,'VIEW_STATE':_0x40944d},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x29c2f5=_0x727d37;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x360e27,performance:_0x544629}=require$$0,_0x59b424=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x29c2f5(0x399),_0x11bb98=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x4a73f8=process.env.OKDB_LOOP_LAG_ALL==='1',_0x1d1747=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x12adcb{constructor(){const _0x2f14ea=_0x29c2f5;this[_0x2f14ea(0x2ce)]=_0x59b424,this['_buckets']=new Map(),this['_h']=null,this[_0x2f14ea(0x1dc)]=null,this[_0x2f14ea(0x224)]=![],this['_log']=(_0x2940e,_0x54896e)=>process[_0x2f14ea(0x1ed)][_0x2f14ea(0x369)](_0x2940e+(_0x54896e?'\x20'+JSON[_0x2f14ea(0x2e8)](_0x54896e):'')+'\x0a');}[_0x29c2f5(0x299)](){return _0x544629['now']();}[_0x29c2f5(0x27c)](_0xea1167){const _0x13301a=_0x29c2f5;if(typeof _0xea1167===_0x13301a(0x2c1))this['_log']=_0xea1167;}['note'](_0x59576b,_0x29144f,_0x41d2a9){const _0x3fcee5=_0x29c2f5;if(!this[_0x3fcee5(0x2ce)])return;let _0x347ab2=this[_0x3fcee5(0x3a6)][_0x3fcee5(0x288)](_0x59576b);!_0x347ab2&&(_0x347ab2={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x3fcee5(0x3a6)][_0x3fcee5(0x1b7)](_0x59576b,_0x347ab2)),_0x347ab2['ms']+=_0x29144f,_0x347ab2[_0x3fcee5(0x1f9)]+=0x1,_0x29144f>_0x347ab2[_0x3fcee5(0x2c5)]&&(_0x347ab2[_0x3fcee5(0x2c5)]=_0x29144f,_0x347ab2[_0x3fcee5(0x2ac)]=_0x41d2a9||'');}[_0x29c2f5(0x265)](_0x2fc7b2){const _0x42108e=_0x29c2f5;if(!this[_0x42108e(0x2ce)]||this[_0x42108e(0x224)])return;this[_0x42108e(0x224)]=!![];if(_0x2fc7b2)this[_0x42108e(0x2b6)]=_0x2fc7b2;this['_h']=_0x360e27({'resolution':0xa}),this['_h'][_0x42108e(0x233)](),this[_0x42108e(0x1dc)]=setInterval(()=>this['_report'](),_0x11bb98);if(this[_0x42108e(0x1dc)][_0x42108e(0x2d7)])this[_0x42108e(0x1dc)]['unref']();}[_0x29c2f5(0x25b)](_0x58f988){const _0x43472d=_0x29c2f5;if(!this[_0x43472d(0x2ec)])this[_0x43472d(0x2ec)]=new Set();this['_windowCbs'][_0x43472d(0x273)](_0x58f988);if(!this['_started'])this[_0x43472d(0x26a)]();}[_0x29c2f5(0x302)](_0x5778b5){const _0x4d6950=_0x29c2f5;this['_windowCbs']?.[_0x4d6950(0x21f)](_0x5778b5);}[_0x29c2f5(0x26a)](){const _0x573dc6=_0x29c2f5;if(this[_0x573dc6(0x33c)])return;this[_0x573dc6(0x33c)]=!![];!this['_h']&&(this['_h']=_0x360e27({'resolution':0xa}),this['_h']['enable']());const _0x21aa09=_0x11bb98;this[_0x573dc6(0x17d)]=setInterval(()=>{const _0x3832a7=_0x573dc6,_0x7cefe3=this['_h'];if(!_0x7cefe3)return;const _0x27cffb=_0x7cefe3['percentile'](0x63)/0xf4240,_0x1015a4=_0x7cefe3['max']/0xf4240,_0x2c85ec=_0x7cefe3[_0x3832a7(0x1b0)]/0xf4240;_0x7cefe3[_0x3832a7(0x396)]();if(this[_0x3832a7(0x2ec)])for(const _0x48248a of this[_0x3832a7(0x2ec)]){try{_0x48248a({'p99Ms':_0x27cffb,'maxMs':_0x1015a4,'meanMs':_0x2c85ec,'reportMs':_0x21aa09});}catch{}}},_0x21aa09);if(this['_admissionTimer'][_0x573dc6(0x2d7)])this['_admissionTimer'][_0x573dc6(0x2d7)]();}[_0x29c2f5(0x22e)](){const _0x2bb7a5=_0x29c2f5,_0x4c9c7d=this['_h'],_0x32fc23=_0x4c9c7d[_0x2bb7a5(0x346)]/0xf4240,_0x1213c4=_0x4c9c7d[_0x2bb7a5(0x296)](0x63)/0xf4240,_0x3f8bb5=_0x4c9c7d[_0x2bb7a5(0x1b0)]/0xf4240;_0x4c9c7d[_0x2bb7a5(0x396)]();const _0x73a0d7=[...this[_0x2bb7a5(0x3a6)]['entries']()][_0x2bb7a5(0x249)](([_0x2bba12,_0x210e2a])=>({'label':_0x2bba12,..._0x210e2a}))[_0x2bb7a5(0x245)]((_0x33922d,_0x38e86c)=>_0x38e86c['ms']-_0x33922d['ms'])['slice'](0x0,0x8);this[_0x2bb7a5(0x3a6)][_0x2bb7a5(0x2c3)]();const _0x5cdeb3=_0x73a0d7[_0x2bb7a5(0x234)]((_0x30d795,_0x3a361f)=>_0x30d795+_0x3a361f['ms'],0x0),_0x508879=_0x73a0d7['map'](_0x18d81e=>_0x18d81e[_0x2bb7a5(0x229)]+'='+_0x18d81e['ms'][_0x2bb7a5(0x27b)](0x0)+'ms/'+_0x18d81e['count']+(_0x18d81e['maxMs']>0x5?_0x2bb7a5(0x39c)+_0x18d81e[_0x2bb7a5(0x2c5)][_0x2bb7a5(0x27b)](0x0)+'ms'+(_0x18d81e[_0x2bb7a5(0x2ac)]?'\x20'+_0x18d81e[_0x2bb7a5(0x2ac)]:'')+')':''));(_0x4a73f8||_0x32fc23>=_0x1d1747)&&this[_0x2bb7a5(0x2b6)](_0x2bb7a5(0x34d)+_0x11bb98+'ms\x20max='+_0x32fc23[_0x2bb7a5(0x27b)](0x0)+_0x2bb7a5(0x28d)+_0x1213c4[_0x2bb7a5(0x27b)](0x0)+_0x2bb7a5(0x16a)+_0x3f8bb5[_0x2bb7a5(0x27b)](0x0)+_0x2bb7a5(0x180)+_0x5cdeb3['toFixed'](0x0)+'ms'+(_0x508879[_0x2bb7a5(0x2de)]?_0x2bb7a5(0x20e)+_0x508879['join']('\x20\x20'):''),{'feature':_0x2bb7a5(0x32a)});if(this[_0x2bb7a5(0x2ec)])for(const _0x3db9f5 of this[_0x2bb7a5(0x2ec)]){try{_0x3db9f5({'p99Ms':_0x1213c4,'maxMs':_0x32fc23,'meanMs':_0x3f8bb5,'reportMs':_0x11bb98});}catch{}}}[_0x29c2f5(0x367)](){const _0x29b449=_0x29c2f5;if(this[_0x29b449(0x1dc)])clearInterval(this['_timer']);if(this['_h'])this['_h'][_0x29b449(0x230)]();this[_0x29b449(0x1dc)]=null,this['_h']=null,this[_0x29b449(0x224)]=![];}}const _0x5b317e=new _0x12adcb();if(_0x5b317e['enabled'])_0x5b317e[_0x29c2f5(0x265)]();return okdbLoopMonitor={'LOOP':_0x5b317e},okdbLoopMonitor;}var okdbTimers,hasRequiredOkdbTimers;function requireOkdbTimers(){if(hasRequiredOkdbTimers)return okdbTimers;hasRequiredOkdbTimers=0x1;const _0x3b2f5b=0x2**0x1f-0x1;function _0x58c5c7(_0x4bbb61){if(!(_0x4bbb61>0x0))return 0x0;return _0x4bbb61>_0x3b2f5b?_0x3b2f5b:_0x4bbb61;}function _0x94df40(_0x2f046f){return _0x2f046f===Infinity;}return okdbTimers={'MAX_TIMER_DELAY':_0x3b2f5b,'clampTimerDelay':_0x58c5c7,'isNeverDelay':_0x94df40},okdbTimers;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x2b32be=require$$0$1,_0x2d2225=require$$1;let _0x36217f,_0x5633e8,_0x21c4f1,_0x4f34bf,_0x41d354,_0x1be55f,_0x484e9e,_0x587c4e=![];const _0x646504=new Set();let _0x58eb88=null;const _0x10c708=new Map();function _0x2c9e20(){const _0x4b03b3=_0x1c29;if(_0x36217f!==undefined)return _0x36217f;_0x36217f=process.env.OKDB_DIAG==='1';if(!_0x36217f)return![];_0x5633e8=process.env.OKDB_DIAG_STACK==='1',_0x4f34bf=Math['max'](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x21c4f1=new Array(_0x4f34bf),_0x41d354=0x0,_0x1be55f=0x0,_0x484e9e=process.env.OKDB_DIAG_DIR||null;if(_0x484e9e)try{_0x2b32be[_0x4b03b3(0x29d)](_0x484e9e,{'recursive':!![]});}catch{}return!![];}function _0x4562ad(){return _0x36217f===undefined?_0x2c9e20():_0x36217f;}function _0x488fcb(_0x873372,_0x28bad9){const _0xf00aaa=_0x1c29;if(_0x36217f===undefined?!_0x2c9e20():!_0x36217f)return;let _0x1150f9;if(_0x5633e8){const _0xfbbc20=new Error()[_0xf00aaa(0x162)]||'';_0x1150f9=_0xfbbc20[_0xf00aaa(0x304)]('\x0a')['slice'](0x3)['map'](_0x11a35c=>_0x11a35c[_0xf00aaa(0x317)]())[_0xf00aaa(0x232)](Boolean)[_0xf00aaa(0x2f9)](0x0,0x8);}_0x21c4f1[_0x41d354]={'seq':_0x1be55f++,'t':Date[_0xf00aaa(0x299)](),'env':_0x873372,'kind':_0x28bad9||_0xf00aaa(0x2aa),'stack':_0x1150f9},_0x41d354=(_0x41d354+0x1)%_0x4f34bf;}function _0xe66bf9(_0x153549){const _0xa365c6=_0x1c29,_0x258dce=[];for(let _0x2ec5f2=0x0;_0x2ec5f2<_0x4f34bf;_0x2ec5f2++){const _0x55357f=_0x21c4f1[(_0x41d354-0x1-_0x2ec5f2+_0x4f34bf*0x2)%_0x4f34bf];if(!_0x55357f)continue;_0x258dce['push'](_0x55357f);if(_0x258dce[_0xa365c6(0x2de)]>=_0x153549)break;}return _0x258dce;}function _0x4e56df(_0x322574){const _0x13fbdf=_0x1c29;try{process[_0x13fbdf(0x1ed)][_0x13fbdf(0x369)](_0x322574+'\x0a');}catch{}if(_0x484e9e)try{_0x2b32be[_0x13fbdf(0x340)](_0x2d2225[_0x13fbdf(0x1c8)](_0x484e9e,_0x13fbdf(0x1d6)+process['pid']+_0x13fbdf(0x336)),_0x322574+'\x0a');}catch{}}function _0x56daac(_0x2dc505){const _0x3e8980=_0x1c29,_0x4994fc=_0xe66bf9(_0x2dc505);if(!_0x4994fc[_0x3e8980(0x2de)])return'\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)';const _0x5eb184=Date[_0x3e8980(0x299)]();return _0x4994fc[_0x3e8980(0x249)](_0x40290d=>{const _0x1cf440=_0x3e8980,_0x4c39a0='\x20\x20#'+_0x40290d[_0x1cf440(0x19f)]+'\x20-'+(_0x5eb184-_0x40290d['t'])+'ms\x20env='+_0x40290d[_0x1cf440(0x15d)]+'\x20'+_0x40290d[_0x1cf440(0x1cb)];return _0x40290d[_0x1cf440(0x162)]&&_0x40290d[_0x1cf440(0x162)]['length']?_0x4c39a0+'\x0a\x20\x20\x20\x20\x20\x20'+_0x40290d[_0x1cf440(0x162)][_0x1cf440(0x1c8)]('\x0a\x20\x20\x20\x20\x20\x20'):_0x4c39a0;})[_0x3e8980(0x1c8)]('\x0a');}function _0x1bb853(_0x429fcd,_0x1f609e){const _0x2e42e3=_0x1c29,_0x31d5a3=_0x2e42e3(0x197)+_0x429fcd+_0x2e42e3(0x2f6)+new Date()[_0x2e42e3(0x1fc)]()+_0x2e42e3(0x2bf)+process['pid']+_0x2e42e3(0x2e2),_0x4c45f7=[_0x31d5a3,_0x2e42e3(0x260)+(_0x1f609e&&_0x1f609e[_0x2e42e3(0x162)]?_0x1f609e['stack'][_0x2e42e3(0x304)]('\x0a')[0x0]:_0x1f609e),'recent\x20writes\x20(newest\x20first)'+(_0x5633e8?'':_0x2e42e3(0x379))+':',_0x56daac(0x18),_0x3b5147(),'='[_0x2e42e3(0x291)](_0x31d5a3[_0x2e42e3(0x2de)]-0x1)];_0x4e56df(_0x4c45f7['join']('\x0a'));}function _0x12e037(_0xaacdab){const _0x52dd80=_0x1c29;if(!_0x4562ad())return;const _0x4469c8=String(_0xaacdab&&_0xaacdab[_0x52dd80(0x1c4)]||_0xaacdab||''),_0x38845a=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x52dd80(0x338)](_0x4469c8);_0x1bb853(_0x38845a?_0x52dd80(0x25c):_0x52dd80(0x39b),_0xaacdab);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x38845a)return;try{console[_0x52dd80(0x2fd)](_0xaacdab&&_0xaacdab[_0x52dd80(0x162)]?_0xaacdab[_0x52dd80(0x162)]:_0xaacdab);}catch{}process[_0x52dd80(0x243)](0x1);}function _0x125997(_0x14766e){const _0x60e0ad=_0x1c29;if(!_0x4562ad())return;const _0x435428=String(_0x14766e&&_0x14766e[_0x60e0ad(0x1c4)]||_0x14766e||'');/already closed|environment is already|invalid read txn|reset an invalid/i['test'](_0x435428)&&_0x1bb853(_0x60e0ad(0x2e7),_0x14766e);}function _0x3b5147(){const _0x2ff475=_0x1c29,_0x40b5a2=['drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):'];let _0x3c0a7b=![];for(const _0x50aa9 of _0x646504){const _0x323d71=_0x50aa9&&_0x50aa9['_envs'];if(!_0x323d71)continue;for(const [_0x3c425b,_0x5f1874]of _0x323d71){const _0x530154=_0x5f1874&&_0x5f1874[_0x2ff475(0x16d)]&&_0x5f1874[_0x2ff475(0x16d)]['view'];if(!_0x530154)continue;let _0x1b4572,_0x3fd0a7;try{_0x1b4572=Atomics[_0x2ff475(0x2b9)](_0x530154,0x0),_0x3fd0a7=Atomics[_0x2ff475(0x2b9)](_0x530154,0x1);}catch{continue;}if(_0x1b4572===0x0)continue;_0x3c0a7b=!![];const _0x3383ad=_0x1b4572>0x0?_0x2ff475(0x1b1):_0x2ff475(0x35e),_0x1391bd=Date[_0x2ff475(0x299)]()-Math[_0x2ff475(0x38b)](_0x1b4572)*0x3e8,_0x3a8561=((()=>{const _0x5b94c6=_0x2ff475;try{return _0x5f1874[_0x5b94c6(0x362)]&&_0x5f1874[_0x5b94c6(0x362)][_0x5b94c6(0x1b6)]?_0x5f1874[_0x5b94c6(0x362)][_0x5b94c6(0x1b6)]():null;}catch{return null;}})());_0x40b5a2['push'](_0x2ff475(0x23f)+_0x3c425b+_0x2ff475(0x2e9)+_0x3383ad+_0x2ff475(0x165)+_0x1391bd+_0x2ff475(0x2a6)+_0x3fd0a7+(_0x3a8561?_0x2ff475(0x37f)+_0x3a8561[_0x2ff475(0x2bb)]+_0x2ff475(0x39a)+_0x3a8561[_0x2ff475(0x2dc)]+_0x2ff475(0x1ad)+_0x3a8561[_0x2ff475(0x2c0)]+'}':''));}}if(!_0x3c0a7b)_0x40b5a2[_0x2ff475(0x2d3)](_0x2ff475(0x1cf));return _0x40b5a2[_0x2ff475(0x1c8)]('\x0a');}function _0x5c34d2(){const _0x473833=_0x1c29;if(!_0x4562ad())return;const _0x3e02bf=Math['max'](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x154e1e=Date[_0x473833(0x299)]();for(const _0x247757 of _0x646504){const _0x321d78=_0x247757&&_0x247757[_0x473833(0x1a6)];if(!_0x321d78)continue;for(const [_0x5a6940,_0x2f40da]of _0x321d78){const _0x26933b=_0x2f40da&&_0x2f40da[_0x473833(0x16d)]&&_0x2f40da[_0x473833(0x16d)][_0x473833(0x246)];if(!_0x26933b)continue;let _0x1b3814;try{_0x1b3814=Atomics[_0x473833(0x2b9)](_0x26933b,0x0);}catch{continue;}const _0x3e3d6c=_0x247757[_0x473833(0x2b7)]+'|'+_0x5a6940;if(_0x1b3814<=0x0){_0x10c708[_0x473833(0x21f)](_0x3e3d6c);continue;}const _0x4c1bad=_0x154e1e-_0x1b3814*0x3e8,_0x4401fe=_0x10c708[_0x473833(0x288)](_0x3e3d6c);if(_0x4c1bad<_0x3e02bf)continue;if(_0x4401fe&&_0x154e1e-_0x4401fe[_0x473833(0x391)]<_0x3e02bf)continue;_0x10c708[_0x473833(0x1b7)](_0x3e3d6c,{'firstTs':_0x4401fe?_0x4401fe['firstTs']:_0x1b3814,'dumpedAt':_0x154e1e});const _0x587c5f=_0x473833(0x347)+_0x4c1bad+_0x473833(0x2fc)+_0x5a6940+_0x473833(0x2f6)+new Date()[_0x473833(0x1fc)]()+_0x473833(0x2bf)+process[_0x473833(0x1f0)]+_0x473833(0x2e2);_0x4e56df([_0x587c5f,_0x3b5147(),'='[_0x473833(0x291)](_0x587c5f['length']-0x1)][_0x473833(0x1c8)]('\x0a'));}}}function _0xb503f4(){const _0x34c4ab=_0x1c29;if(!_0x4562ad()||_0x587c4e)return;_0x587c4e=!![],process[_0x34c4ab(0x2f7)](_0x34c4ab(0x39b),_0x12e037),process[_0x34c4ab(0x2f7)](_0x34c4ab(0x323),_0x125997);const _0x374b54=Math['max'](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x58eb88=setInterval(_0x5c34d2,_0x374b54);if(_0x58eb88[_0x34c4ab(0x2d7)])_0x58eb88[_0x34c4ab(0x2d7)]();}function _0x743f8d(_0x594370){const _0x460d16=_0x1c29;if(!_0x4562ad()||!_0x594370)return;_0x646504[_0x460d16(0x273)](_0x594370),_0xb503f4();}function _0x5bf62a(_0xf20fde){const _0x1b081d=_0x1c29;_0x646504[_0x1b081d(0x21f)](_0xf20fde);}function _0x18a8f5(){if(!_0x4562ad())return{'enabled':![],'hint':'set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)'};return{'enabled':!![],'stackCapture':!!_0x5633e8,'recentWrites':_0xe66bf9(0x10),'drain':_0x3b5147()};}return okdbDiag={'isEnabled':_0x4562ad,'recordWrite':_0x488fcb,'installDiag':_0xb503f4,'registerOkdb':_0x743f8d,'unregisterOkdb':_0x5bf62a,'snapshot':_0x18a8f5},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x12f62d=_0x727d37;if(hasRequiredOkdbWriter)return okdbWriter[_0x12f62d(0x2a8)];hasRequiredOkdbWriter=0x1;const {performance:_0x4d1815}=require$$0$2,_0x376cbf=requireOkdbDiag(),_0x2bcc08=process.env.OKDB_COMMIT_MODE===_0x12f62d(0x181);class _0x3820d8{constructor(_0x46d9e8){const _0x13439a=_0x12f62d;this[_0x13439a(0x15d)]=_0x46d9e8,this[_0x13439a(0x35b)]=new Set(),this[_0x13439a(0x337)]=new Map(),this[_0x13439a(0x263)]=0x0,this[_0x13439a(0x2d9)]=[],this[_0x13439a(0x188)]=[],this[_0x13439a(0x17a)]=Math[_0x13439a(0x346)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this['_outstanding']=0x0,this[_0x13439a(0x1c0)]=[],this[_0x13439a(0x1c6)]=0x0,this[_0x13439a(0x1f7)]=null,this[_0x13439a(0x297)]=0x0,this[_0x13439a(0x2b1)]=0x0,this['_nestedWarned']=![];}async[_0x12f62d(0x1ba)](_0x338b00,_0x95d17d,_0x2720bc={}){const _0x5d39d3=_0x12f62d;for(let _0x342eba=0x1;;_0x342eba++){try{return await this[_0x5d39d3(0x269)](_0x338b00,_0x95d17d,_0x2720bc);}catch(_0x492756){if(_0x492756?.[_0x5d39d3(0x37a)]!=='INDEX_SET_CHANGED'||_0x2720bc[_0x5d39d3(0x330)]||_0x342eba>=0x5)throw _0x492756;this[_0x5d39d3(0x15d)]['_adoptPeerIndexes'](_0x492756[_0x5d39d3(0x1a9)]);}}}async[_0x12f62d(0x269)](_0x622ae0,_0x1aa7ba,{admitted:admitted=![]}={}){const _0x385a55=_0x12f62d;if(_0x376cbf[_0x385a55(0x26d)]())_0x376cbf[_0x385a55(0x316)](this[_0x385a55(0x15d)]?.[_0x385a55(0x37d)],_0x1aa7ba);if(this['_closed']){const _0x263cc1=new Error(_0x385a55(0x25a));_0x263cc1[_0x385a55(0x37a)]=_0x385a55(0x1fb);throw _0x263cc1;}if(this[_0x385a55(0x17a)]>0x0){let _0x1dbcf5=![];while(this[_0x385a55(0x20a)]>=this['_highWater']&&!this[_0x385a55(0x17b)]){!_0x1dbcf5&&(_0x1dbcf5=!![],this[_0x385a55(0x1c6)]++),await new Promise(_0x4d242c=>this['_bpWaiters']['push'](_0x4d242c));}if(this[_0x385a55(0x17b)]){const _0x2dc162=new Error(_0x385a55(0x25a));_0x2dc162[_0x385a55(0x37a)]=_0x385a55(0x1fb);throw _0x2dc162;}}this[_0x385a55(0x20a)]++;const _0x36df58=admitted?null:this[_0x385a55(0x15d)][_0x385a55(0x16d)];for(;;){while(this[_0x385a55(0x1f7)])await this[_0x385a55(0x1f7)];if(_0x36df58)try{await _0x36df58[_0x385a55(0x1c3)]();}catch(_0x4d56a1){this[_0x385a55(0x20a)]--;if(this[_0x385a55(0x1c0)][_0x385a55(0x2de)]&&this[_0x385a55(0x20a)]<this['_highWater'])this[_0x385a55(0x1c0)][_0x385a55(0x18f)]()();throw _0x4d56a1;}if(!this[_0x385a55(0x1f7)])break;if(_0x36df58)_0x36df58[_0x385a55(0x294)]();}if(this[_0x385a55(0x17b)]){if(_0x36df58)_0x36df58[_0x385a55(0x294)]();this['_outstanding']--;if(this['_bpWaiters'][_0x385a55(0x2de)]&&this[_0x385a55(0x20a)]<this[_0x385a55(0x17a)])this[_0x385a55(0x1c0)][_0x385a55(0x18f)]()();const _0x4c1a1c=new Error(_0x385a55(0x25a));_0x4c1a1c[_0x385a55(0x37a)]=_0x385a55(0x1fb);throw _0x4c1a1c;}const _0x2b7422=_0x4d1815[_0x385a55(0x299)]();if(_0x2bcc08)try{const _0x5ac48f=this[_0x385a55(0x15d)]['db'][_0x385a55(0x204)](_0x622ae0);this['_committed']++;if(this[_0x385a55(0x2d9)][_0x385a55(0x2d3)](_0x4d1815[_0x385a55(0x299)]()-_0x2b7422)>0x100)this[_0x385a55(0x2d9)][_0x385a55(0x18f)]();if(this[_0x385a55(0x188)][_0x385a55(0x2d3)](_0x4d1815[_0x385a55(0x299)]())>0x800)this[_0x385a55(0x188)][_0x385a55(0x18f)]();return _0x5ac48f;}finally{this[_0x385a55(0x20a)]--;if(this[_0x385a55(0x1c0)][_0x385a55(0x2de)]&&this['_outstanding']<this['_highWater'])this['_bpWaiters'][_0x385a55(0x18f)]()();if(_0x36df58)_0x36df58[_0x385a55(0x294)]();}let _0x5c3c27=null;const _0x3c0114=()=>{const _0x5d341e=_0x385a55,_0x45f7eb=_0x622ae0();if(_0x45f7eb&&typeof _0x45f7eb[_0x5d341e(0x365)]===_0x5d341e(0x2c1)&&!_0x5c3c27){this[_0x5d341e(0x297)]++;let _0x2ce116;const _0x2792f1=new Promise(_0x51ad48=>_0x2ce116=_0x51ad48);this[_0x5d341e(0x1f7)]=_0x2792f1,_0x5c3c27=()=>{const _0x3ef668=_0x5d341e;if(this['_held']===_0x2792f1)this[_0x3ef668(0x1f7)]=null;_0x2ce116();};}return _0x45f7eb;};let _0x347395;try{_0x347395=this[_0x385a55(0x15d)]['db'][_0x385a55(0x172)](_0x3c0114);}catch(_0x580853){_0x347395=Promise[_0x385a55(0x320)](_0x580853);}(!_0x347395||typeof _0x347395[_0x385a55(0x365)]!==_0x385a55(0x2c1))&&(this[_0x385a55(0x2b1)]++,!this['_nestedWarned']&&(this['_nestedWarned']=!![],console[_0x385a55(0x39f)](_0x385a55(0x2eb)+(this[_0x385a55(0x15d)]?.[_0x385a55(0x37d)]??'?')+_0x385a55(0x17c))),_0x347395=Promise[_0x385a55(0x348)](_0x347395));const _0x358ef3=()=>{if(_0x5c3c27)_0x5c3c27();};_0x347395[_0x385a55(0x365)](_0x358ef3,_0x358ef3),this[_0x385a55(0x35b)][_0x385a55(0x273)](_0x347395),this['_enqueuedAt'][_0x385a55(0x1b7)](_0x347395,_0x2b7422);const _0xf5518f=()=>{const _0x41c24b=_0x385a55;this[_0x41c24b(0x35b)][_0x41c24b(0x21f)](_0x347395),this[_0x41c24b(0x337)][_0x41c24b(0x21f)](_0x347395),this[_0x41c24b(0x263)]++,this['_outstanding']--;this[_0x41c24b(0x1c0)][_0x41c24b(0x2de)]&&this[_0x41c24b(0x20a)]<this['_highWater']&&this[_0x41c24b(0x1c0)][_0x41c24b(0x18f)]()();if(this['_durs'][_0x41c24b(0x2d3)](_0x4d1815['now']()-_0x2b7422)>0x100)this['_durs']['shift']();if(this[_0x41c24b(0x188)][_0x41c24b(0x2d3)](_0x4d1815['now']())>0x800)this[_0x41c24b(0x188)][_0x41c24b(0x18f)]();};_0x347395['then'](_0xf5518f,_0xf5518f);try{return await _0x347395;}finally{if(_0x36df58)_0x36df58[_0x385a55(0x294)]();}}['status'](){const _0x4ff5f6=_0x12f62d,_0x7a66ab=_0x4d1815[_0x4ff5f6(0x299)]();let _0x130fb9=0x0;for(const _0x13ca84 of this[_0x4ff5f6(0x337)][_0x4ff5f6(0x397)]()){const _0xa4bd3f=_0x7a66ab-_0x13ca84;if(_0xa4bd3f>_0x130fb9)_0x130fb9=_0xa4bd3f;}let _0x5e13d1=0x0;for(let _0x5cf04b=this[_0x4ff5f6(0x188)]['length']-0x1;_0x5cf04b>=0x0;_0x5cf04b--){if(_0x7a66ab-this[_0x4ff5f6(0x188)][_0x5cf04b]>0x3e8)break;_0x5e13d1++;}let _0x13edba=0x0;if(this[_0x4ff5f6(0x2d9)][_0x4ff5f6(0x2de)]){const _0x3d86dc=[...this[_0x4ff5f6(0x2d9)]]['sort']((_0x3503fd,_0xf58499)=>_0x3503fd-_0xf58499);_0x13edba=_0x3d86dc[Math['min'](_0x3d86dc[_0x4ff5f6(0x2de)]-0x1,Math[_0x4ff5f6(0x1ef)](_0x3d86dc[_0x4ff5f6(0x2de)]*0.99))];}return{'depth':this[_0x4ff5f6(0x35b)][_0x4ff5f6(0x214)],'oldestPendingMs':Math[_0x4ff5f6(0x358)](_0x130fb9),'committed':this[_0x4ff5f6(0x263)],'commitsPerSec':_0x5e13d1,'commitP99Ms':Math[_0x4ff5f6(0x358)](_0x13edba),'parkedNow':this[_0x4ff5f6(0x1c0)]['length'],'parkedTotal':this['_bpParkedTotal'],'highWater':this['_highWater']};}[_0x12f62d(0x37c)](){const _0x43e389=_0x12f62d,_0x1d79e9=_0x4d1815[_0x43e389(0x299)]();return[...this[_0x43e389(0x337)][_0x43e389(0x397)]()]['map'](_0x118ff4=>Math[_0x43e389(0x358)](_0x1d79e9-_0x118ff4))[_0x43e389(0x245)]((_0x9cc4d5,_0x384fb2)=>_0x384fb2-_0x9cc4d5);}[_0x12f62d(0x16c)](){const _0x51ed6b=_0x12f62d;this[_0x51ed6b(0x17b)]=!![];for(const _0x3b0287 of this['_bpWaiters'][_0x51ed6b(0x2d6)](0x0))_0x3b0287();}async[_0x12f62d(0x386)](){const _0x5532e9=_0x12f62d;let _0x34e86f=0x0;while(this[_0x5532e9(0x35b)][_0x5532e9(0x214)]&&_0x34e86f++<0x3e8){await Promise[_0x5532e9(0x38c)]([...this[_0x5532e9(0x35b)]]);}}async[_0x12f62d(0x298)](_0x4b203b,_0x4e5d3f,_0x178827,_0x233938){const _0x4e5117=_0x12f62d;return this[_0x4e5117(0x1ba)](()=>{const _0x4f5613=_0x4e5117;if(_0x233938===undefined)_0x4b203b['putSync'](_0x4e5d3f,_0x178827);else _0x4b203b[_0x4f5613(0x271)](_0x4e5d3f,_0x178827,_0x233938);},_0x4e5117(0x1cc));}async['remove'](_0x39af9f,_0x19b364){const _0x2cc1b1=_0x12f62d;return this[_0x2cc1b1(0x1ba)](()=>_0x39af9f['removeSync'](_0x19b364),_0x2cc1b1(0x310));}}async function _0x4d71b5(_0x122fdb,_0xf957b5){const _0x345a79=_0x12f62d;if(_0xf957b5==null)_0xf957b5=Math[_0x345a79(0x346)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x27a518=_0x122fdb?.['flushed'];if(!_0x27a518||typeof _0x27a518['then']!=='function')return;await Promise['race']([Promise[_0x345a79(0x348)](_0x27a518)[_0x345a79(0x373)](()=>{}),new Promise(_0x5bf86c=>{const _0x5c2f84=_0x345a79,_0xb0b573=setTimeout(_0x5bf86c,_0xf957b5);if(_0xb0b573['unref'])_0xb0b573[_0x5c2f84(0x2d7)]();})]);}catch{}}function _0x1d6a2d(_0x407d10){const _0xac8a6b=_0x12f62d;if(_0x2bcc08)return Promise['resolve']();const _0x11fd36=_0x407d10?.[_0xac8a6b(0x2b2)];return _0x11fd36&&typeof _0x11fd36['then']==='function'?_0x11fd36:Promise[_0xac8a6b(0x348)]();}const _0x540dcc=Math[_0x12f62d(0x346)](0x1,Math['floor'](Number(process.env.UV_THREADPOOL_SIZE))||0x4),_0x5b3720=Math[_0x12f62d(0x346)](0x1,_0x540dcc-0x2);let _0x501b41=0x0;const _0x53587d=[];async function _0x4b08bc(_0x181cda){const _0x25566e=_0x12f62d;if(_0x501b41<_0x5b3720)_0x501b41++;else await new Promise(_0x26eb42=>_0x53587d[_0x25566e(0x2d3)](_0x26eb42));try{return await _0x181cda();}finally{const _0x284795=_0x53587d[_0x25566e(0x18f)]();if(_0x284795)_0x284795();else _0x501b41--;}}return okdbWriter[_0x12f62d(0x2a8)]=_0x3820d8,okdbWriter[_0x12f62d(0x2a8)][_0x12f62d(0x344)]=_0x4b08bc,okdbWriter[_0x12f62d(0x2a8)]['MAX_POOL_HOLDS']=_0x5b3720,okdbWriter[_0x12f62d(0x2a8)][_0x12f62d(0x15f)]=_0x4d71b5,okdbWriter[_0x12f62d(0x2a8)][_0x12f62d(0x2b2)]=_0x1d6a2d,okdbWriter[_0x12f62d(0x2a8)]['SYNC_COMMITS']=_0x2bcc08,okdbWriter[_0x12f62d(0x2a8)];}var okdbLock,hasRequiredOkdbLock;function _0x1004(){const _0x56a0d9=['_openEnvLazy','reportThreadStats','size','9310hQBcWB','_singletonLock','external','namespace','processKey','index:drop','getCmd','ppid','removeNode','dedupeMax','delete','_cursors','system:clock_change','registerType','_kind','_started','resetFts','node/','closing','workers','label','ready','type:drop','rowKey','default','_report','_desiredOverlay','disable','instances','filter','enable','reduce','_caps','heartbeatMs','_heartbeatInFlight','_dedupeMax','listNodes','listening','async','4271141gsUisS','_clusterWorkerAttached','_baselines','\x20\x20env=','_collectSingletonClaims','deregisterSelf','participate','exit','process\x20','sort','view','_key','memoryUsage','map','cluster','_isReader','null','_enableChangelog','~processes','setupPrimary','halted','_adminRelay','setOwnMeta','number','dead','\x20worker\x20slot=','_lastCpuPct','_heartbeatTimer','ephemeral','[okdb-cluster]\x20worker\x20pid=','okdb-writer:\x20env\x20closing\x20—\x20retry','onWindow','ORPHAN\x20(env-closed\x20write)','_singletonLocks','includes','listDesired','error:\x20','system:env_release','_clusterOrphanWatch','_committed','_pendingLocal','start','decommission','1336536iNYuMo','claimGated','_transactionOnce','_startAdmission','resetting','rows=','isEnabled','closed','_drainOne','nodeKey','putSync',');\x20','add','_nodeDb','mode','unclaimed','bus:drain','putNode','inst:','_rootDb','toFixed','setLogger','1634435TruTOV','ttlMs','license:removed','state','fanout','force','node:perf_hooks','decommissioned','msg','_buildOwnRow','isConnected','get','single','some','_statusEnv','clusterStatusView','ms\x20p99=','updateSupervisedChildStats','INDEX_RESET','FTS_RESET','repeat','list',')\x20exited\x20','afterWrite','636xBPUzV','percentile','_heldTotal','put','now','slot','_wantDb','startedAt','mkdirSync','registry-publish','_getType','_ownMeta','_lastPublishAt','_isWriter','schema:drop','registerIndex','type:registered','ms\x20activeWriters=','replace','exports','ingest','commit','processor:resumed','maxExtra','fast','pushEphemeral','nodesView','1369299FFCcWy','_nestedTotal','committed','sync:apply','emit','_selfKey','_log','path','~processes:desired','load','inspect','depth','view:progress','role','host','\x20pid=','parkedNow','function','removeSync','clear','getRange','maxMs','entry','_changefeed','_versionSkewWarned','threads','ITEM_CREATE','indexOf','procmode/','updatedAt','enabled','ref:violation','_children','_flushTimer','__vocab/version','push','singletonClaims','primary','splice','unref','options','_durs','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','_sampleOwnStats','oldestPendingMs','\x20ipc\x20error:\x20','length','\x20(durable\x20desired-state)','running','_lastCpuAt','\x20===','bus:poke','draining','system:type_drop','~processes:cmd','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','stringify','\x20phase=','_activateProcesses','okdb-writer[','_windowCbs','processingSig','listen','_refreshDesiredSnapshot','_dedupeKey','11241NbmODQ','_rowKey','fromEntries','system:ready','platform','\x20@\x20','prependListener','ttl:clear','slice','cpuPct','SYSTEM_STOPPED','ms\x20on\x20env=','error','busy','\x20in\x20','note','http-server','offWindow','resetReadTxn','split','_groupByProcess','freeze','_scheduleFlush','standalone','_wantDbOf','selfKey','item:update','2.7.1','_db','feed:','bumpCmd','raw-remove','acquiredAt','execArgv','stopped','okdb','cpus','recordWrite','trim','cursorKey','string','_onTick','startsWith','remove','processing','SYSTEM_POKE','registerFts','reject','supervisorKey','quantum','unhandledRejection','dropping','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','registry\x20publish\x20failing:\x20','_handleInProcess','__okdbSlot','ttl:set','loop-lag','_threadStats','FTS_DROP','building','_clusterOnMessage','dropFts','admitted','deaths','SIGKILL','_buildProcessingFacet','clearThreadStats','fn-runner','.log','_enqueuedAt','test','online','_nodeDbFor',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','_admissionStarted','./okdb','embedded','SYSTEM_PROC','appendFileSync','kill','entries','consecutiveFailures','withPoolHold','_systemEnv','max','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','resolve','ref:violation_resolved','openDB','isDead','_lockDbOf','loop-lag\x20','\x20died\x20','unique:violation_resolved','node:events','_handlePoke','_maybePublish','_publishFailWarned','next','license:invalid','getClock',',\x20signal=','round','ms\x20(attempt\x20','[okdb-cluster]\x20slot=','_inflight','--test','processor:error','copy','\x20while\x20this\x20process\x20runs\x20','_draining','children','_writer','connected','once','then','1ofN:','stop','processor:retry','write','\x20statusEnv=','resetIndex','_startedAt','_released','_publishNow','bus:proc','okdb-http-worker-child.js','8qauRBg','process','catch','type','value','processes','license:activated','_putRowAsync','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','code','5020SzlbCm','inflightAgesMs','name','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','\x20writer{depth=','processors','_drain','started','tierList','__esModule','_supervisorKey','drain','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','\x20HTTP\x20server(s)\x20on\x20port\x20','_markSeen','stats','abs','allSettled','caps','prototype','data','respawnTimer','dumpedAt','expiresAt','_removeRowAsync','processor:ready','item:create','reset','values','[okdb-cluster]\x20respawning\x20worker\x20slot=','true','\x20oldestPendingMs=','uncaughtException','(worst\x20','item:remove','reap','warn','createEnvironment','listenAddr','_seen','uptime','holder','call','_buckets','ESRCH','compact','attachFeed','_nodeDbCache','env','(code=','flushLmdb','heldBy','txn:rollback','stack','randomUUID','_onPending','\x20drainAge=','_flushDebounce','object','noteListenAddr','rss','ms\x20mean=','engines','markClosed','_coordinator','_onPoke','instanceId','http\x20worker\x20child\x20failed:\x20','\x20forked\x20','childTransaction','fork','_role','_lastCpuUsage','system:bus_state_change','has','_migrateVocab','all','_highWater','_closed',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','_admissionTimer','_listenAddr','hostname','ms\x20busy=','sync','system:stopped','treeView','_instanceId','_cmd','_hbTimer','_nodeDead','_done','cluster:','_wantDbHandle','ITEM_PENDING','attach','_quantum','\x20worker(s)\x20remaining','shift','registry\x20heartbeat\x20skipped\x20(writer=','license:added','decommissioning','isPrimary','_processStartedAt','system:poke','cpuWindowMs','\x0a===\x20OKDB_DIAG\x20','_onItem','events','node','system:proc','_servingEngines','_holderDead','log','seq','ITEM_REMOVE','listAll','--eval','worker','version','register','_envs','epoch','INDEX_REGISTERED','indexType','cli','envsOpen','_ensureDesired','\x20parkedNow=','\x20sync','bus:type_drop','mean','SWAP','hard-killed','_acquiredAt','REMOVE','find','status','set','compaction','assign','transaction','txn:start','INDEX_PROGRESS','liveThreadStats','_collectWriterFacet','processingStatusView','_bpWaiters','cpuUsage','release','beforeWrite','message','env:removed','_bpParkedTotal','claims','join','setDesired','none','kind','raw-put','addSupervisedChild','processor:progress','\x20\x20(no\x20env\x20draining)','publishChildRow','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','INDEX_READY','slotKey','_onProcEvent','processor:paused','okdb-diag.','detachConsole','_handlePending','--inspect','--print','_onStop','_timer','disconnect','parse','_pending','tryAcquire','schema:set','fts:reset','_assertUsable','http','close','_desired','_buildChildRow',':want','_putRowSync','hasDesired','isActive','processorId','stderr','isHeld','floor','pid','creating','system','meta','_lastCpuWindowMs','isWanted','heapUsed','_held','keys','count','heapTotal','ENV_CLOSING_RETRY','toISOString','_startHeartbeat','ITEM_UPDATE','CHANGEFEED_QUANTUM','_lock','publishOwnRow','_lockDb','removeSupervisedChild','transactionSync','env:opened','cluster-wide','index:registered','user','processor','_outstanding','lifecycle','_rawDb','send','\x20│\x20','260406YtlWwU','off','ttl:expired'];_0x1004=function(){return _0x56a0d9;};return _0x1004();}function requireOkdbLock(){const _0x4495ee=_0x727d37;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x47cc92=require$$0$3,{clampTimerDelay:_0x36575c}=requireOkdbTimers(),{SYNC_COMMITS:_0x3b1d5c}=requireOkdbWriter(),_0x36801a='~lock';class _0x4ff552{constructor(_0x35318a,_0x545d89,_0x720fb6){const _0x28aca9=_0x1c29;this['_lock']=_0x35318a,this[_0x28aca9(0x247)]=_0x545d89,this[_0x28aca9(0x1b3)]=_0x720fb6,this[_0x28aca9(0x36d)]=![],this[_0x28aca9(0x257)]=null,this[_0x28aca9(0x237)]=null;}[_0x4495ee(0x1ee)](){const _0x508d48=_0x4495ee;if(this[_0x508d48(0x36d)])return![];try{const _0x4c904c=this[_0x508d48(0x200)][_0x508d48(0x30d)]()[_0x508d48(0x288)](this['_key']);if(!_0x4c904c||_0x4c904c['acquiredAt']!==this[_0x508d48(0x1b3)])return![];const _0x5d9604=_0x4c904c[_0x508d48(0x2cd)]??_0x4c904c[_0x508d48(0x311)];if(_0x5d9604+_0x4c904c['ttlMs']<Date[_0x508d48(0x299)]())return![];return!![];}catch{return!this[_0x508d48(0x36d)];}}[_0x4495ee(0x3a4)](){const _0x3ec1de=_0x4495ee;if(this[_0x3ec1de(0x36d)])return null;try{return this[_0x3ec1de(0x200)]['_db']()[_0x3ec1de(0x288)](this[_0x3ec1de(0x247)])??null;}catch{return null;}}async['extend'](_0x217c03){const _0x2d46ad=_0x4495ee;if(this['_released'])return;try{if(this['_lock'][_0x2d46ad(0x17b)]())return;const _0x578b68=this[_0x2d46ad(0x200)][_0x2d46ad(0x30d)]()[_0x2d46ad(0x288)](this['_key']);if(!_0x578b68||_0x578b68[_0x2d46ad(0x311)]!==this[_0x2d46ad(0x1b3)])return;if(_0x3b1d5c)this[_0x2d46ad(0x200)][_0x2d46ad(0x30d)]()[_0x2d46ad(0x271)](this[_0x2d46ad(0x247)],{..._0x578b68,'ttlMs':_0x578b68[_0x2d46ad(0x27e)]+_0x217c03});else await this['_lock'][_0x2d46ad(0x30d)]()[_0x2d46ad(0x298)](this[_0x2d46ad(0x247)],{..._0x578b68,'ttlMs':_0x578b68[_0x2d46ad(0x27e)]+_0x217c03});}catch{}}async[_0x4495ee(0x1c2)](){const _0x4f9390=_0x4495ee;if(this[_0x4f9390(0x36d)])return;if(this[_0x4f9390(0x237)])try{await this[_0x4f9390(0x237)];}catch{}clearInterval(this[_0x4f9390(0x257)]),this[_0x4f9390(0x257)]=null,this['_released']=!![];try{if(this[_0x4f9390(0x200)][_0x4f9390(0x17b)]())return;const _0x573a0f=this[_0x4f9390(0x200)][_0x4f9390(0x30d)]()['get'](this[_0x4f9390(0x247)]);if(_0x573a0f&&_0x573a0f[_0x4f9390(0x311)]===this[_0x4f9390(0x1b3)]){if(_0x3b1d5c)this[_0x4f9390(0x200)][_0x4f9390(0x30d)]()[_0x4f9390(0x2c2)](this[_0x4f9390(0x247)]);else await this[_0x4f9390(0x200)]['_db']()[_0x4f9390(0x31c)](this[_0x4f9390(0x247)]);}}catch{}}['_startHeartbeat'](_0x7ab775,_0x506bf2){const _0x5d8ce0=_0x4495ee,_0x292d68=_0x36575c(_0x506bf2??Math[_0x5d8ce0(0x1ef)](_0x7ab775/0x3));this[_0x5d8ce0(0x257)]=setInterval(()=>{const _0x13ebb5=_0x5d8ce0;if(this[_0x13ebb5(0x36d)])return;this[_0x13ebb5(0x237)]=((async()=>{const _0x19eef0=_0x13ebb5;try{if(this['_lock']['_closed']())return;const _0x5dad95=this['_lock'][_0x19eef0(0x30d)]()['get'](this['_key']);if(!_0x5dad95||_0x5dad95[_0x19eef0(0x311)]!==this[_0x19eef0(0x1b3)]){this[_0x19eef0(0x36d)]=!![],clearInterval(this[_0x19eef0(0x257)]),this[_0x19eef0(0x257)]=null;return;}if(_0x3b1d5c)this[_0x19eef0(0x200)]['_db']()['putSync'](this['_key'],{..._0x5dad95,'updatedAt':Date[_0x19eef0(0x299)]()});else await this[_0x19eef0(0x200)][_0x19eef0(0x30d)]()['put'](this['_key'],{..._0x5dad95,'updatedAt':Date[_0x19eef0(0x299)]()});}catch{}this[_0x19eef0(0x237)]=null;})());},_0x292d68);if(this[_0x5d8ce0(0x257)][_0x5d8ce0(0x2d7)])this[_0x5d8ce0(0x257)][_0x5d8ce0(0x2d7)]();}}class _0x32a428{constructor(_0xf5ecd4,{namespace:_0x56489a,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x4d7bab=_0x4495ee;this[_0x4d7bab(0x20c)]=_0xf5ecd4,this[_0x4d7bab(0x218)]=_0x56489a,this['ttlMs']=ttlMs,this[_0x4d7bab(0x236)]=heartbeatMs,this[_0x4d7bab(0x202)]=null;}[_0x4495ee(0x30d)](){const _0x291c6d=_0x4495ee;return this[_0x291c6d(0x1e3)](),(!this['_lockDb']||this[_0x291c6d(0x34c)]!==this[_0x291c6d(0x20c)])&&(this[_0x291c6d(0x202)]=this[_0x291c6d(0x20c)][_0x291c6d(0x34a)](_0x36801a,{'dupSort':![]}),this[_0x291c6d(0x34c)]=this[_0x291c6d(0x20c)]),this[_0x291c6d(0x202)];}['_wantDb'](){const _0x2e7baa=_0x4495ee;return this[_0x2e7baa(0x1e3)](),(!this[_0x2e7baa(0x18a)]||this[_0x2e7baa(0x309)]!==this[_0x2e7baa(0x20c)])&&(this[_0x2e7baa(0x18a)]=this[_0x2e7baa(0x20c)]['openDB'](_0x36801a+_0x2e7baa(0x1e8),{'dupSort':![]}),this['_wantDbOf']=this[_0x2e7baa(0x20c)]),this[_0x2e7baa(0x18a)];}[_0x4495ee(0x17b)](){const _0x321136=_0x4495ee,_0x46cdc9=this['_rawDb']?.['status'];return _0x46cdc9===_0x321136(0x227)||_0x46cdc9===_0x321136(0x26e);}[_0x4495ee(0x1e3)](){const _0x2d49da=_0x4495ee;if(this[_0x2d49da(0x17b)]())throw new Error('okdb-lock:\x20env\x20closed');}['_key'](_0x4e7bc3){const _0x5ce2e4=_0x4495ee;return this[_0x5ce2e4(0x218)]+':'+_0x4e7bc3;}['signalWant'](_0x260c9f){const _0x174b0e=_0x4495ee;try{if(this[_0x174b0e(0x17b)]())return;_0x3b1d5c?this[_0x174b0e(0x29b)]()[_0x174b0e(0x271)](this[_0x174b0e(0x247)](_0x260c9f),Date[_0x174b0e(0x299)]()):this[_0x174b0e(0x29b)]()[_0x174b0e(0x298)](this[_0x174b0e(0x247)](_0x260c9f),Date[_0x174b0e(0x299)]())?.[_0x174b0e(0x373)]?.(()=>{});}catch{}}[_0x4495ee(0x1f5)](_0x5817c0,_0x17a53a=0x3e8){const _0x33e5f0=_0x4495ee;try{const _0x20e408=this[_0x33e5f0(0x29b)]()[_0x33e5f0(0x288)](this[_0x33e5f0(0x247)](_0x5817c0));return typeof _0x20e408===_0x33e5f0(0x253)&&Date[_0x33e5f0(0x299)]()-_0x20e408<_0x17a53a;}catch{return![];}}['_isStale'](_0x261ecb){const _0x1668d2=_0x4495ee,_0x35cc4e=_0x261ecb['updatedAt']??_0x261ecb[_0x1668d2(0x311)];return _0x35cc4e+_0x261ecb[_0x1668d2(0x27e)]<Date[_0x1668d2(0x299)]();}static[_0x4495ee(0x19d)](_0x3a20cd){const _0x1040bb=_0x4495ee,_0x31ce39=_0x3a20cd?.[_0x1040bb(0x3a4)];if(!_0x31ce39||typeof _0x31ce39['pid']!==_0x1040bb(0x253))return![];if(_0x31ce39[_0x1040bb(0x17f)]!==_0x47cc92[_0x1040bb(0x17f)]())return![];if(_0x31ce39['pid']===process[_0x1040bb(0x1f0)])return![];try{return process['kill'](_0x31ce39[_0x1040bb(0x1f0)],0x0),![];}catch(_0x10aa00){return _0x10aa00[_0x1040bb(0x37a)]===_0x1040bb(0x3a7);}}async[_0x4495ee(0x1e0)](_0x451d7e,_0x564eb5={},_0x298beb={}){const _0x362b24=_0x4495ee,_0x59ac85=this[_0x362b24(0x247)](_0x451d7e),_0x1f6a8d=_0x298beb[_0x362b24(0x27e)]??this[_0x362b24(0x27e)],_0x59c214=Date[_0x362b24(0x299)](),_0x27d58f={'holder':{'pid':process[_0x362b24(0x1f0)],'hostname':_0x47cc92[_0x362b24(0x17f)](),..._0x564eb5},'acquiredAt':_0x59c214,'updatedAt':_0x59c214,'ttlMs':_0x1f6a8d};let _0xa8c337=![],_0x15a141=null;if(this[_0x362b24(0x17b)]())return{'acquired':![],'handle':null,'current':null};try{const _0x4ceeac=()=>{const _0x5966d3=_0x362b24,_0x42396f=this['_db']()[_0x5966d3(0x288)](_0x59ac85);if(_0x42396f&&!this['_isStale'](_0x42396f)&&!_0x32a428[_0x5966d3(0x19d)](_0x42396f)){const _0x49b416=_0x564eb5[_0x5966d3(0x1ec)]!=null&&_0x42396f[_0x5966d3(0x3a4)]['pid']===process[_0x5966d3(0x1f0)]&&_0x42396f[_0x5966d3(0x3a4)][_0x5966d3(0x1ec)]===_0x564eb5[_0x5966d3(0x1ec)];if(!_0x49b416){_0xa8c337=![],_0x15a141=_0x42396f;return;}_0x27d58f[_0x5966d3(0x311)]<=_0x42396f[_0x5966d3(0x311)]&&(_0x27d58f['acquiredAt']=_0x42396f[_0x5966d3(0x311)]+0x1,_0x27d58f[_0x5966d3(0x2cd)]=_0x27d58f[_0x5966d3(0x311)]);}this[_0x5966d3(0x30d)]()['put'](_0x59ac85,_0x27d58f),_0xa8c337=!![],_0x15a141=_0x27d58f;};if(_0x3b1d5c)this[_0x362b24(0x30d)]()['transactionSync'](_0x4ceeac);else await this['_db']()['childTransaction'](_0x4ceeac);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0xa8c337)return{'acquired':![],'handle':null,'current':_0x15a141};const _0x41cff5=new _0x4ff552(this,_0x59ac85,_0x27d58f[_0x362b24(0x311)]);return _0x41cff5[_0x362b24(0x1fd)](_0x1f6a8d,this[_0x362b24(0x236)]),{'acquired':!![],'handle':_0x41cff5,'current':_0x15a141};}[_0x4495ee(0x2ba)](_0x1bbfcc){const _0x438778=_0x4495ee;try{return this[_0x438778(0x30d)]()[_0x438778(0x288)](this[_0x438778(0x247)](_0x1bbfcc))??null;}catch{return null;}}[_0x4495ee(0x292)](){const _0x56d599=_0x4495ee,_0x553c74=this['namespace']+':',_0x1a768f=[];try{for(const {key:_0x3cb229,value:_0x13a2cd}of this['_db']()['getRange']({'start':_0x553c74,'end':_0x553c74+'\xff'})){typeof _0x3cb229==='string'&&_0x3cb229[_0x56d599(0x31b)](_0x553c74)&&_0x1a768f['push']({'id':_0x3cb229['slice'](_0x553c74[_0x56d599(0x2de)]),'entry':_0x13a2cd});}}catch{}return _0x1a768f;}static[_0x4495ee(0x1a1)](_0xeb7514){const _0x2ed8ac=_0x4495ee,_0x182b24=[];try{const _0x47f9da=_0xeb7514[_0x2ed8ac(0x34a)](_0x36801a,{'dupSort':![]});for(const {key:_0x13c4b9,value:_0x5c01b9}of _0x47f9da[_0x2ed8ac(0x2c4)]({})){if(typeof _0x13c4b9!==_0x2ed8ac(0x319))continue;const _0x5cc99d=_0x13c4b9[_0x2ed8ac(0x2cb)](':');if(_0x5cc99d<0x1)continue;_0x182b24[_0x2ed8ac(0x2d3)]({'namespace':_0x13c4b9['slice'](0x0,_0x5cc99d),'id':_0x13c4b9['slice'](_0x5cc99d+0x1),'entry':_0x5c01b9});}}catch{}return _0x182b24;}}return okdbLock={'OKDBLock':_0x32a428},okdbLock;}var version=_0x727d37(0x30c),require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x3a913f=_0x727d37;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x349a6f=require$$0$3,_0x16f5de=require$$1$1,_0xa0313a=require$$2,{LOOP:_0x241ad9}=requireOkdbLoopMonitor(),{OKDBLock:_0x510465}=requireOkdbLock(),{SYNC_COMMITS:_0x3a967c}=requireOkdbWriter(),_0x407848=_0x3a913f(0x24e),_0x50b9c2=_0x3a913f(0x19a),_0x6971f9=_0x3a913f(0x2b8),_0x4c49a5=_0x3a913f(0x2e6),_0x275e6c=(_0x251e9e,_0x338d15)=>_0x251e9e+':'+_0x338d15,_0x594c4c=(_0x3c66ad,_0x4bdbd3)=>_0x3c66ad+'::'+_0x4bdbd3,_0x3f7540=(_0x278076,_0x5e3782)=>_0x278076+'/'+_0x5e3782,_0x3fc114=(_0x324066,_0x564715)=>_0x324066+'#'+_0x564715,_0x356415=_0x24c53b=>{const _0x3fa2c1=_0x3a913f;if(_0x24c53b?.[_0x3fa2c1(0x219)])return _0x24c53b[_0x3fa2c1(0x219)];const _0x3fe6a5=_0x24c53b?.[_0x3fa2c1(0x270)];return typeof _0x3fe6a5===_0x3fa2c1(0x319)&&_0x3fe6a5[_0x3fa2c1(0x25e)]('#')?_0x3fe6a5[_0x3fa2c1(0x2f9)](0x0,_0x3fe6a5[_0x3fa2c1(0x2cb)]('#')):_0x3fe6a5;},_0x2bca3e=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x5642f5=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x515199=_0x2bca3e*0x3,_0x59d874=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x3a913f(0x346)](0x927c0,_0x515199*0x14),_0x26526e=[_0x3a913f(0x1ce),'processor:ready','processor:retry',_0x3a913f(0x35d),_0x3a913f(0x1d5),_0x3a913f(0x2ab)];let _0x1a320c=null;function _0x268ea7(){const _0x524d30=_0x3a913f;if(_0x1a320c==null)_0x1a320c=Math[_0x524d30(0x358)]((Date[_0x524d30(0x299)]()-process[_0x524d30(0x3a3)]()*0x3e8)/0x3e8)*0x3e8;return _0x1a320c;}function _0xea19e5(_0xee0dc){const _0x4267d3=_0x3a913f;if(process.env.OKDB_PROCESS_KILL===_0x4267d3(0x210))return![];if(_0xee0dc?.[_0x4267d3(0x2d8)]?.[_0x4267d3(0x376)]&&typeof _0xee0dc['options']['processes']===_0x4267d3(0x167)&&_0xee0dc[_0x4267d3(0x2d8)][_0x4267d3(0x376)][_0x4267d3(0x341)]===![])return![];return!![];}function _0x48a635(_0x26a2e4,_0x4c89e6){const _0x245da7=_0x3a913f,_0xd5c6df=!!_0x4c89e6?.['processors'];switch(_0x26a2e4){case _0x245da7(0x2d5):return{'controllable':_0xd5c6df,'decommissionable':![],'killable':!![],'killConfirm':_0x245da7(0x206)};case _0x245da7(0x1aa):case'standalone':return{'controllable':_0xd5c6df,'decommissionable':![],'killable':!![],'killConfirm':'confirm'};case _0x245da7(0x33e):return{'controllable':![],'decommissionable':![],'killable':![]};case _0x245da7(0x301):case'queue-worker':case _0x245da7(0x335):case _0x245da7(0x1a3):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x245da7(0x282)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x392c79{constructor(_0xb8728){const _0x4eca8b=_0x3a913f;this[_0x4eca8b(0x314)]=_0xb8728,this[_0x4eca8b(0x28b)]=null,this[_0x4eca8b(0x1e6)]=null,this['_desiredOverlay']=new Map(),this[_0x4eca8b(0x185)]=null,this[_0x4eca8b(0x2a2)]=![],this[_0x4eca8b(0x24b)]=![],this[_0x4eca8b(0x194)]=_0x268ea7(),this['_selfKey']=_0x275e6c(process['pid'],this[_0x4eca8b(0x194)]),this[_0x4eca8b(0x184)]=_0xa0313a[_0x4eca8b(0x163)]()[_0x4eca8b(0x2f9)](0x0,0x8),this[_0x4eca8b(0x2f2)]=_0x3fc114(this[_0x4eca8b(0x2b5)],this[_0x4eca8b(0x184)]),this[_0x4eca8b(0x36c)]=Date[_0x4eca8b(0x299)](),this[_0x4eca8b(0x223)]=null,this[_0x4eca8b(0x385)]=null,this['_listenAddr']=null,this[_0x4eca8b(0x186)]=null,this[_0x4eca8b(0x1d4)]=null,this['_onTick']=null,this[_0x4eca8b(0x2a1)]=0x0,this['_ownMeta']={},this[_0x4eca8b(0x2d0)]=new Map(),this['_lastCpuUsage']=process[_0x4eca8b(0x1c1)](),this[_0x4eca8b(0x2e1)]=Date[_0x4eca8b(0x299)](),this[_0x4eca8b(0x256)]=0x0,this['_threadStats']=new Map();}get[_0x3a913f(0x30a)](){const _0x54f99f=_0x3a913f;return this[_0x54f99f(0x2b5)];}get[_0x3a913f(0x22c)](){const _0x34d626=_0x3a913f;return this[_0x34d626(0x2f2)];}[_0x3a913f(0x235)](_0x3e226b,_0x4906d0){const _0x553a4c=_0x3a913f,_0x548f94=_0x48a635(_0x3e226b,_0x4906d0);if(_0x548f94['killable']&&!_0xea19e5(this[_0x553a4c(0x314)]))return{..._0x548f94,'killable':![],'killConfirm':undefined};return _0x548f94;}[_0x3a913f(0x1eb)](){return!!this['_statusEnv'];}[_0x3a913f(0x252)](_0x4dc54b){const _0x2ab4f8=_0x3a913f;Object[_0x2ab4f8(0x1b9)](this['_ownMeta'],_0x4dc54b||{});}[_0x3a913f(0x168)](_0xbaf869){const _0x1fd4d0=_0x3a913f;if(_0xbaf869)this[_0x1fd4d0(0x17e)]=_0xbaf869;}[_0x3a913f(0x1a5)](_0x269bc7={}){const _0x4f9119=_0x3a913f;return this[_0x4f9119(0x314)][_0x4f9119(0x2ea)](_0x269bc7);}[_0x3a913f(0x1bf)](){const _0x44063f=_0x3a913f,_0x322411={};let _0x1ab3b9=0x0,_0x5d6535=0x0;const _0x1558fb=new Set();for(const _0x4793f0 of this[_0x44063f(0x239)]()){_0x5d6535++;const _0x179b32=_0x4793f0[_0x44063f(0x31d)];if(!_0x179b32)continue;if(_0x179b32[_0x44063f(0x242)])_0x1ab3b9++;for(const _0x17821c of _0x179b32[_0x44063f(0x380)]||[]){if(![_0x44063f(0x289),'fanout'][_0x44063f(0x25e)](_0x17821c[_0x44063f(0x275)]))continue;(_0x17821c[_0x44063f(0x280)]===_0x44063f(0x339)||_0x17821c['state']===_0x44063f(0x32d))&&_0x17821c[_0x44063f(0x318)]&&_0x1558fb[_0x44063f(0x273)]((_0x17821c[_0x44063f(0x15d)]||'default')+':'+_0x17821c[_0x44063f(0x318)]);const _0x2328aa=_0x17821c['env']||_0x44063f(0x22d);(_0x322411[_0x2328aa]||=[])['push']({..._0x17821c,'env':_0x2328aa,'owner':{'pid':_0x4793f0['pid']??null,'kind':_0x4793f0['kind']??null}});}}for(const [_0x4e5f05,_0x43468e]of Object[_0x44063f(0x342)](_0x322411)){for(const _0x557419 of _0x43468e){if(_0x557419[_0x44063f(0x275)]===_0x44063f(0x289)&&!_0x557419[_0x44063f(0x268)]){const _0x416459=_0x4e5f05+':'+(_0x557419[_0x44063f(0x318)]??'');if(!_0x1558fb[_0x44063f(0x177)](_0x416459))_0x557419[_0x44063f(0x276)]=!![];}}}return{'envs':_0x322411,'policy':null,'participation':{'participating':_0x1ab3b9,'total':_0x5d6535},'source':_0x44063f(0x228)};}['processorsView'](){const _0x40fbde=_0x3a913f,_0x5f16e1=_0x5064aa=>{const _0x579173=_0x1c29;if(_0x5064aa[_0x579173(0x280)]===_0x579173(0x339)||_0x5064aa[_0x579173(0x280)]===_0x579173(0x32d)||_0x5064aa['state']===_0x579173(0x2fd))return 0x3;if(_0x5064aa[_0x579173(0x268)])return 0x1;return 0x2;},_0x6cee16=new Map();for(const _0x285e of this[_0x40fbde(0x239)]()){for(const _0x42ed61 of _0x285e[_0x40fbde(0x31d)]?.[_0x40fbde(0x380)]||[]){const _0x66c78c={..._0x42ed61,'owner':{'pid':_0x285e[_0x40fbde(0x1f0)]??null,'kind':_0x285e[_0x40fbde(0x1cb)]??null,'host':_0x285e['host']??null}},_0x37d8db=_0x42ed61[_0x40fbde(0x275)]==='single'?_0x40fbde(0x366)+(_0x42ed61[_0x40fbde(0x15d)]??'')+'::'+(_0x42ed61[_0x40fbde(0x318)]??_0x42ed61[_0x40fbde(0x374)]??_0x42ed61['id']):_0x40fbde(0x279)+(_0x285e['nodeKey']??_0x285e[_0x40fbde(0x219)]??'')+'::'+(_0x42ed61[_0x40fbde(0x15d)]??'')+'::'+_0x42ed61['id'],_0x239e38=_0x6cee16['get'](_0x37d8db);if(!_0x239e38||_0x5f16e1(_0x66c78c)>_0x5f16e1(_0x239e38))_0x6cee16[_0x40fbde(0x1b7)](_0x37d8db,_0x66c78c);}}return[..._0x6cee16[_0x40fbde(0x397)]()];}[_0x3a913f(0x28c)](){const _0x344f00=_0x3a913f,_0x3b5487=Date[_0x344f00(0x299)](),_0x5b23c0=this[_0x344f00(0x239)](),_0xad7a57=_0x89e240=>Math[_0x344f00(0x346)](0x0,Math[_0x344f00(0x358)]((_0x3b5487-(_0x89e240['startedAt']||_0x3b5487))/0x3e8)),_0x325638=_0x5b23c0[_0x344f00(0x1b5)](_0x40973b=>_0x40973b[_0x344f00(0x1cb)]===_0x344f00(0x2d5)),_0x487079=_0x5b23c0['filter'](_0x127c63=>_0x127c63[_0x344f00(0x1cb)]===_0x344f00(0x301));if(_0x325638||_0x487079[_0x344f00(0x2de)])return{'primary':_0x325638?{'pid':_0x325638[_0x344f00(0x1f0)],'uptime':_0xad7a57(_0x325638)}:null,'workers':_0x487079[_0x344f00(0x249)](_0x3771f5=>({'pid':_0x3771f5[_0x344f00(0x1f0)],'uptime':_0xad7a57(_0x3771f5)})),'workersConfigured':_0x325638?.['meta']?.['workersConfigured']??_0x487079[_0x344f00(0x2de)],'mode':_0x344f00(0x24a)};const _0x5cc90e=_0x5b23c0['find'](_0x10481d=>_0x10481d['kind']===_0x344f00(0x1aa)||_0x10481d[_0x344f00(0x1cb)]===_0x344f00(0x308)||_0x10481d[_0x344f00(0x1cb)]===_0x344f00(0x33e)),_0x6a5ca2=_0x5cc90e?{'pid':_0x5cc90e['pid'],'uptime':_0xad7a57(_0x5cc90e)}:{'pid':process[_0x344f00(0x1f0)],'uptime':Math[_0x344f00(0x346)](0x0,Math[_0x344f00(0x358)](process['uptime']()))};return{'primary':_0x6a5ca2,'workers':[_0x6a5ca2],'workersConfigured':0x1,'mode':_0x344f00(0x289)};}[_0x3a913f(0x2af)](){const _0x92baa8=_0x3a913f;return this[_0x92baa8(0x305)]();}[_0x3a913f(0x183)](){const _0x5ce663=_0x3a913f,_0x5ecf3c=new Map();for(const _0x1be6dc of this[_0x5ce663(0x305)]())_0x5ecf3c[_0x5ce663(0x1b7)](_0x1be6dc[_0x5ce663(0x219)],{..._0x1be6dc,'children':[]});const _0x1917eb=[];for(const _0x58e8cd of _0x5ecf3c['values']()){const _0x1cfdbf=_0x58e8cd[_0x5ce663(0x321)]?_0x5ecf3c[_0x5ce663(0x288)](_0x58e8cd[_0x5ce663(0x321)]):null;if(_0x1cfdbf&&_0x1cfdbf!==_0x58e8cd)_0x1cfdbf['children'][_0x5ce663(0x2d3)](_0x58e8cd);else _0x1917eb[_0x5ce663(0x2d3)](_0x58e8cd);}const _0x536075=(_0x2ddef6,_0x2d1467)=>_0x2ddef6[_0x5ce663(0x1cb)]===_0x2d1467[_0x5ce663(0x1cb)]?(_0x2ddef6[_0x5ce663(0x1f0)]||0x0)-(_0x2d1467['pid']||0x0):(_0x2ddef6[_0x5ce663(0x1cb)]??'')<(_0x2d1467['kind']??'')?-0x1:0x1,_0x36042c=_0x1c6cd9=>{const _0x3679e2=_0x5ce663;_0x1c6cd9[_0x3679e2(0x245)](_0x536075);for(const _0x5f03e5 of _0x1c6cd9)if(_0x5f03e5[_0x3679e2(0x361)][_0x3679e2(0x2de)])_0x36042c(_0x5f03e5[_0x3679e2(0x361)]);};return _0x36042c(_0x1917eb),_0x1917eb;}['getProcess'](_0x5f0204){const _0x597ff8=_0x3a913f;return this[_0x597ff8(0x305)]()[_0x597ff8(0x1b5)](_0x463c33=>_0x463c33[_0x597ff8(0x219)]===_0x5f0204)??null;}[_0x3a913f(0x305)](_0xfbd94c=Date[_0x3a913f(0x299)]()){const _0x59778f=_0x3a913f,_0x39e8d0=new Map();for(const _0x12c52a of this['listNodes']()){const _0x1be954=_0x356415(_0x12c52a);let _0x251820=_0x39e8d0[_0x59778f(0x288)](_0x1be954);!_0x251820&&(_0x251820={'processKey':_0x1be954,'nodeKey':_0x1be954,'pid':_0x12c52a[_0x59778f(0x1f0)],'ppid':_0x12c52a[_0x59778f(0x21c)]??null,'host':_0x12c52a[_0x59778f(0x2be)]??null,'kind':_0x12c52a[_0x59778f(0x1cb)],'role':null,'supervisorKey':_0x12c52a[_0x59778f(0x321)]??null,'slot':_0x12c52a[_0x59778f(0x29a)]??null,'slotKey':_0x12c52a[_0x59778f(0x1d3)]??null,'caps':_0x12c52a[_0x59778f(0x38d)]??null,'lifecycle':_0x12c52a[_0x59778f(0x20b)]??null,'uptime':Math[_0x59778f(0x346)](0x0,Math[_0x59778f(0x358)]((_0xfbd94c-(_0x12c52a[_0x59778f(0x29c)]||_0xfbd94c))/0x3e8)),'startedAt':_0x12c52a[_0x59778f(0x29c)]??null,'meta':_0x12c52a[_0x59778f(0x1f3)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x39e8d0[_0x59778f(0x1b7)](_0x1be954,_0x251820));_0x251820[_0x59778f(0x231)]['push']({'instanceId':_0x12c52a[_0x59778f(0x16f)]??null,'role':_0x12c52a[_0x59778f(0x2bd)]??null,'listenAddr':_0x12c52a[_0x59778f(0x3a1)]??null,'lifecycle':_0x12c52a[_0x59778f(0x20b)]??null,'processing':_0x12c52a[_0x59778f(0x31d)]??null});if(!_0x251820[_0x59778f(0x2bd)]&&_0x12c52a[_0x59778f(0x2bd)])_0x251820[_0x59778f(0x2bd)]=_0x12c52a[_0x59778f(0x2bd)];if(!_0x251820['listenAddr']&&_0x12c52a[_0x59778f(0x3a1)])_0x251820[_0x59778f(0x3a1)]=_0x12c52a[_0x59778f(0x3a1)];if(!_0x251820['processing']&&_0x12c52a['processing'])_0x251820[_0x59778f(0x31d)]=_0x12c52a[_0x59778f(0x31d)];if(!_0x251820[_0x59778f(0x16b)]&&_0x12c52a[_0x59778f(0x16b)])_0x251820[_0x59778f(0x16b)]=_0x12c52a[_0x59778f(0x16b)];if(!_0x251820['singletonClaims']&&_0x12c52a[_0x59778f(0x2d4)])_0x251820['singletonClaims']=_0x12c52a[_0x59778f(0x2d4)];if(_0x251820[_0x59778f(0x38d)]==null&&_0x12c52a[_0x59778f(0x38d)])_0x251820['caps']=_0x12c52a[_0x59778f(0x38d)];if(_0x12c52a[_0x59778f(0x38a)]&&(!_0x251820[_0x59778f(0x38a)]||(_0x12c52a['stats']['at']??0x0)>(_0x251820[_0x59778f(0x38a)]['at']??0x0)))_0x251820[_0x59778f(0x38a)]=_0x12c52a[_0x59778f(0x38a)];}return[..._0x39e8d0[_0x59778f(0x397)]()];}['runtimeProcessesView'](){const _0x1bd29c=_0x3a913f,_0x885995=[],_0x1c8dc1={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x56dc65 of this[_0x1bd29c(0x305)]()){_0x885995[_0x1bd29c(0x2d3)]({'processKey':_0x56dc65['processKey'],'kind':_0x56dc65[_0x1bd29c(0x1cb)],'pid':_0x56dc65[_0x1bd29c(0x1f0)],'supervisorKey':_0x56dc65[_0x1bd29c(0x321)],'meta':_0x56dc65[_0x1bd29c(0x1f3)]??null,'uptime':_0x56dc65[_0x1bd29c(0x3a3)],'stats':_0x56dc65[_0x1bd29c(0x38a)]??null}),_0x1c8dc1[_0x1bd29c(0x376)]++;if(_0x56dc65[_0x1bd29c(0x38a)]){_0x1c8dc1[_0x1bd29c(0x169)]+=_0x56dc65[_0x1bd29c(0x38a)][_0x1bd29c(0x169)]||0x0,_0x1c8dc1[_0x1bd29c(0x1f6)]+=(_0x56dc65['stats']['heapUsed']||0x0)+(_0x56dc65[_0x1bd29c(0x38a)][_0x1bd29c(0x2c9)]?.[_0x1bd29c(0x1f6)]||0x0);const _0x3206d8=_0x56dc65[_0x1bd29c(0x38a)]['threads'];_0x3206d8&&(_0x1c8dc1[_0x1bd29c(0x2c9)][_0x1bd29c(0x1f9)]+=_0x3206d8[_0x1bd29c(0x1f9)]||0x0,_0x1c8dc1[_0x1bd29c(0x2c9)]['sandbox']+=_0x3206d8['sandbox']||0x0,_0x1c8dc1['threads']['busy']+=_0x3206d8[_0x1bd29c(0x2fe)]||0x0);}}return{'totals':_0x1c8dc1,'nodes':_0x885995};}async['open']({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x243104=_0x3a913f;this[_0x243104(0x2a2)]=this[_0x243104(0x2a2)]||!!writer,this[_0x243104(0x24b)]=this[_0x243104(0x24b)]||!!reader,this[_0x243104(0x223)]=kind||this['_kind']||(_0x16f5de['isWorker']?_0x243104(0x301):_0x243104(0x1aa)),this['_supervisorKey']=supervisorKey??this['_supervisorKey'],this[_0x243104(0x17e)]=listenAddr??this[_0x243104(0x17e)],this[_0x243104(0x1ac)](),await this[_0x243104(0x178)]();if(!writer&&!reader)return null;if(!this['_statusEnv']){const _0x220a77=await this[_0x243104(0x314)][_0x243104(0x3a0)](_0x407848,{'sync':![],'durability':_0x243104(0x2ad)});await _0x220a77['ensureType'](_0x50b9c2),this['_statusEnv']=_0x220a77;}return this[_0x243104(0x28b)];}[_0x3a913f(0x274)](){const _0x286ab0=_0x3a913f;return this[_0x286ab0(0x33a)]!==this[_0x286ab0(0x28b)]&&(this['_nodeDbFor']=this[_0x286ab0(0x28b)],this[_0x286ab0(0x3aa)]=this['_statusEnv'][_0x286ab0(0x29f)](_0x50b9c2)[_0x286ab0(0x38f)]),this[_0x286ab0(0x3aa)];}[_0x3a913f(0x378)](_0x4212cb){const _0x51a0d7=_0x3a913f;if(_0x3a967c)return this['_nodeDb']()[_0x51a0d7(0x271)](_0x4212cb['nodeKey'],_0x4212cb,0x1);const _0x1ddbde=this[_0x51a0d7(0x274)]()['put'](_0x4212cb[_0x51a0d7(0x270)],_0x4212cb,0x1);if(_0x1ddbde&&typeof _0x1ddbde[_0x51a0d7(0x365)]===_0x51a0d7(0x2c1))_0x1ddbde[_0x51a0d7(0x365)](undefined,()=>{});return _0x1ddbde;}['_putRowSync'](_0x5220f2){const _0x307db5=_0x3a913f;return this[_0x307db5(0x274)]()[_0x307db5(0x271)](_0x5220f2[_0x307db5(0x270)],_0x5220f2,0x1);}[_0x3a913f(0x393)](_0x5725c2){const _0x51a10b=_0x3a913f;if(_0x3a967c)try{return this[_0x51a10b(0x274)]()[_0x51a10b(0x2c2)](_0x5725c2);}catch{return![];}const _0x573f94=this[_0x51a10b(0x274)]()[_0x51a10b(0x31c)](_0x5725c2);if(_0x573f94&&typeof _0x573f94['then']===_0x51a10b(0x2c1))_0x573f94[_0x51a10b(0x365)](undefined,()=>{});return _0x573f94;}async[_0x3a913f(0x278)](_0x53894a){const _0xea8ec2=_0x3a913f;if(!this[_0xea8ec2(0x28b)]||!this[_0xea8ec2(0x2a2)]||!_0x53894a?.[_0xea8ec2(0x270)])return;return this[_0xea8ec2(0x378)](_0x53894a);}async[_0x3a913f(0x21d)](_0x5f4015){const _0xfadb1d=_0x3a913f;if(!this[_0xfadb1d(0x28b)]||!this[_0xfadb1d(0x2a2)]||!_0x5f4015)return;const _0x9e2b85=_0x5f4015[_0xfadb1d(0x25e)]('#'),_0x3ed8bd=[];for(const {key:_0x2a628c}of this[_0xfadb1d(0x28b)][_0xfadb1d(0x2c4)](_0x50b9c2)){if(_0x2a628c===_0x5f4015||!_0x9e2b85&&typeof _0x2a628c===_0xfadb1d(0x319)&&_0x2a628c[_0xfadb1d(0x31b)](_0x5f4015+'#'))_0x3ed8bd['push'](_0x2a628c);}for(const _0x2b5c05 of _0x3ed8bd){try{this[_0xfadb1d(0x274)]()[_0xfadb1d(0x2c2)](_0x2b5c05);}catch{}}}[_0x3a913f(0x187)](_0x5d9fe3){const _0x4d98b6=_0x3a913f;if(typeof _0x5d9fe3?.[_0x4d98b6(0x1f0)]!==_0x4d98b6(0x253))return![];if(_0x5d9fe3['host']!==_0x349a6f[_0x4d98b6(0x17f)]())return![];if(_0x5d9fe3[_0x4d98b6(0x1f0)]===process[_0x4d98b6(0x1f0)])return![];if(_0x5d9fe3[_0x4d98b6(0x392)]!=null&&_0x5d9fe3[_0x4d98b6(0x392)]<Date[_0x4d98b6(0x299)]()-_0x59d874)return!![];try{return process[_0x4d98b6(0x341)](_0x5d9fe3[_0x4d98b6(0x1f0)],0x0),![];}catch(_0x232166){return _0x232166[_0x4d98b6(0x37a)]===_0x4d98b6(0x3a7);}}[_0x3a913f(0x239)](){const _0x486d89=_0x3a913f;if(!this[_0x486d89(0x28b)])return[];try{this[_0x486d89(0x28b)]['db']?.[_0x486d89(0x303)]?.();}catch{}const _0x4221cd=Date[_0x486d89(0x299)](),_0x2dfc9c=_0x349a6f[_0x486d89(0x17f)](),_0xb920fe=[];for(const {value:_0x233c60}of this[_0x486d89(0x28b)][_0x486d89(0x2c4)](_0x50b9c2)){if(!_0x233c60)continue;let _0x2ede9b=null;_0x233c60[_0x486d89(0x2be)]===_0x2dfc9c&&typeof _0x233c60['pid']===_0x486d89(0x253)&&(_0x2ede9b=!this[_0x486d89(0x187)](_0x233c60));if(_0x2ede9b===![])continue;const _0x10177b=_0x233c60[_0x486d89(0x392)]==null||_0x233c60['expiresAt']>=_0x4221cd;if(_0x2ede9b===!![]||_0x10177b)_0xb920fe['push'](_0x233c60);}return _0xb920fe;}async[_0x3a913f(0x39e)](_0x4e6d65=0x0){const _0x4dbd6c=_0x3a913f;if(!this[_0x4dbd6c(0x28b)]||!this[_0x4dbd6c(0x2a2)])return;const _0x270064=Date[_0x4dbd6c(0x299)]()-_0x4e6d65,_0x11853a=new Set(),_0x17f8c7=[],_0x18c342=_0x349a6f[_0x4dbd6c(0x17f)](),_0x1a5f83=require$$6[_0x4dbd6c(0x1a4)];for(const {key:_0x3bb17c,value:_0x507e60}of this[_0x4dbd6c(0x28b)][_0x4dbd6c(0x2c4)](_0x50b9c2)){if(!_0x507e60)continue;const _0x1565ba=_0x507e60[_0x4dbd6c(0x2be)]===_0x18c342&&typeof _0x507e60[_0x4dbd6c(0x1f0)]===_0x4dbd6c(0x253),_0x4c5cca=_0x1565ba?this['_nodeDead'](_0x507e60):_0x507e60['expiresAt']!=null&&_0x507e60[_0x4dbd6c(0x392)]<_0x270064;if(_0x4c5cca)_0x17f8c7[_0x4dbd6c(0x2d3)](_0x3bb17c);else{_0x11853a[_0x4dbd6c(0x273)](_0x356415(_0x507e60)??_0x3bb17c);if(_0x507e60[_0x4dbd6c(0x1a4)]&&_0x507e60[_0x4dbd6c(0x1a4)]!==_0x1a5f83){if(!this[_0x4dbd6c(0x2c8)])this[_0x4dbd6c(0x2c8)]=new Set();!this[_0x4dbd6c(0x2c8)][_0x4dbd6c(0x177)](_0x507e60['version'])&&(this[_0x4dbd6c(0x2c8)][_0x4dbd6c(0x273)](_0x507e60[_0x4dbd6c(0x1a4)]),this['okdb'][_0x4dbd6c(0x19e)]?.[_0x4dbd6c(0x39f)]?.(_0x4dbd6c(0x244)+(_0x507e60['pid']??'?')+_0x4dbd6c(0x325)+_0x507e60[_0x4dbd6c(0x1a4)]+_0x4dbd6c(0x35f)+_0x1a5f83+'\x20—\x20'+'mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.',{'feature':'migrations'}));}}}for(const _0x2070cf of _0x17f8c7)this[_0x4dbd6c(0x393)](_0x2070cf);if(this[_0x4dbd6c(0x1ac)]()){const _0x1c61de=[];for(const {key:_0x4d02c5}of this[_0x4dbd6c(0x25f)]('node')){if(!_0x11853a[_0x4dbd6c(0x177)](_0x4d02c5)){if(_0x3a967c)try{this['_desired']['removeSync'](_0x4dbd6c(0x226)+_0x4d02c5);}catch{}else _0x1c61de[_0x4dbd6c(0x2d3)](this[_0x4dbd6c(0x1e6)][_0x4dbd6c(0x31c)]('node/'+_0x4d02c5));}}if(_0x1c61de[_0x4dbd6c(0x2de)])await Promise['allSettled'](_0x1c61de);}}['startHeartbeat'](_0x2b7267=null){const _0xbe624=_0x3a913f;if(this[_0xbe624(0x186)])return;if(!this[_0xbe624(0x2a2)]||!this[_0xbe624(0x28b)]){this['okdb']?.[_0xbe624(0x19e)]?.[_0xbe624(0x39f)]?.(_0xbe624(0x190)+this[_0xbe624(0x2a2)]+_0xbe624(0x36a)+!!this[_0xbe624(0x28b)]+_0xbe624(0x33b),{'feature':_0xbe624(0x376)});return;}this['_onTick']=_0x2b7267,this['_onProcEvent']=()=>this[_0xbe624(0x352)]();for(const _0x36855e of _0x26526e)this['okdb']['events']['on'](_0x36855e,this[_0xbe624(0x1d4)]);this[_0xbe624(0x36e)]();const _0xc42416=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x2bca3e;this[_0xbe624(0x186)]=setInterval(()=>{const _0x394c9f=_0xbe624;if(this[_0x394c9f(0x31a)])try{this[_0x394c9f(0x31a)]();}catch{}this[_0x394c9f(0x36e)](),this[_0x394c9f(0x39e)]()['catch'](()=>{});},_0xc42416);if(this[_0xbe624(0x186)][_0xbe624(0x2d7)])this[_0xbe624(0x186)]['unref']();}[_0x3a913f(0x352)](){const _0x33afbf=_0x3a913f;if(!this['_isWriter']||!this[_0x33afbf(0x28b)])return;if(Date[_0x33afbf(0x299)]()-this[_0x33afbf(0x2a1)]<_0x5642f5)return;this[_0x33afbf(0x36e)]();}[_0x3a913f(0x36e)](){const _0x5245a2=_0x3a913f;if(!this[_0x5245a2(0x2a2)]||!this[_0x5245a2(0x28b)])return;this['_lastPublishAt']=Date[_0x5245a2(0x299)]();try{const _0x3d2ddf=[this[_0x5245a2(0x286)]()];for(const _0x5b93b0 of this[_0x5245a2(0x2d0)]['values']())_0x3d2ddf[_0x5245a2(0x2d3)](this[_0x5245a2(0x1e7)](_0x5b93b0));const _0x1fc8d3=_0x241ad9[_0x5245a2(0x2ce)]?_0x241ad9[_0x5245a2(0x299)]():0x0;for(const _0x510d54 of _0x3d2ddf){try{this[_0x5245a2(0x1e9)](_0x510d54),this[_0x5245a2(0x353)]=![];}catch(_0x21fcaf){!this[_0x5245a2(0x353)]&&(this[_0x5245a2(0x353)]=!![],this['okdb']?.[_0x5245a2(0x19e)]?.['warn']?.(_0x5245a2(0x326)+_0x21fcaf[_0x5245a2(0x1c4)],{'feature':_0x5245a2(0x376)}));}}if(_0x241ad9[_0x5245a2(0x2ce)])_0x241ad9['note'](_0x5245a2(0x29e),_0x241ad9[_0x5245a2(0x299)]()-_0x1fc8d3,_0x5245a2(0x26c)+_0x3d2ddf[_0x5245a2(0x2de)]+_0x5245a2(0x1ae));}catch(_0xea22f1){!this['_publishFailWarned']&&(this[_0x5245a2(0x353)]=!![],this[_0x5245a2(0x314)]?.[_0x5245a2(0x19e)]?.[_0x5245a2(0x39f)]?.(_0x5245a2(0x326)+_0xea22f1[_0x5245a2(0x1c4)],{'feature':_0x5245a2(0x376)}));}}async['stopHeartbeat'](){const _0x151a61=_0x3a913f;if(this['_onProcEvent']){for(const _0x188981 of _0x26526e){try{this[_0x151a61(0x314)][_0x151a61(0x199)][_0x151a61(0x210)](_0x188981,this[_0x151a61(0x1d4)]);}catch{}}this[_0x151a61(0x1d4)]=null;}this[_0x151a61(0x186)]&&(clearInterval(this[_0x151a61(0x186)]),this['_hbTimer']=null);try{if(this[_0x151a61(0x28b)]&&this[_0x151a61(0x2a2)])await this[_0x151a61(0x21d)](this[_0x151a61(0x2f2)]);}catch{}}async[_0x3a913f(0x241)](){const _0x165ccf=_0x3a913f;if(!this[_0x165ccf(0x28b)]||!this[_0x165ccf(0x2a2)])return;try{await this[_0x165ccf(0x21d)](this[_0x165ccf(0x2f2)]);}catch{}try{const _0x10d69d=[];for(const {value:_0x2c6fac}of this[_0x165ccf(0x28b)]['getRange'](_0x50b9c2)){if(_0x2c6fac?.[_0x165ccf(0x21c)]===process['pid']&&_0x2c6fac[_0x165ccf(0x270)])_0x10d69d[_0x165ccf(0x2d3)](_0x2c6fac[_0x165ccf(0x270)]);}for(const _0x325bba of _0x10d69d){try{await this[_0x165ccf(0x21d)](_0x325bba);}catch{}}}catch{}}async[_0x3a913f(0x201)](){const _0x5f41bc=_0x3a913f;return this[_0x5f41bc(0x278)](this[_0x5f41bc(0x286)]());}async[_0x3a913f(0x1d0)](_0x38f810){const _0x27504c=_0x3a913f;if(!this[_0x27504c(0x28b)]||!this[_0x27504c(0x2a2)])return;return this[_0x27504c(0x278)](this[_0x27504c(0x1e7)](_0x38f810));}[_0x3a913f(0x1e7)]({pid:_0x2f7ce2,startedAt:_0x4f7d4f,kind:_0x19d735,supervisorKey:_0x50770b,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x3a913f(0x2e0),meta:meta=null,stats:stats=null}){const _0x1c1dec=_0x3a913f,_0x5f56c0=Date[_0x1c1dec(0x299)](),_0xae6cde=_0x275e6c(_0x2f7ce2,_0x4f7d4f);return{'nodeKey':_0x3fc114(_0xae6cde,'0'),'processKey':_0xae6cde,'instanceId':'0','pid':_0x2f7ce2,'startedAt':_0x4f7d4f,'ppid':process[_0x1c1dec(0x1f0)],'host':_0x349a6f[_0x1c1dec(0x17f)](),'supervisorKey':_0x50770b,'slot':slot,'slotKey':slotKey,'kind':_0x19d735,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x5f56c0,'expiresAt':_0x5f56c0+_0x515199,'caps':this[_0x1c1dec(0x235)](_0x19d735,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x3a913f(0x1cd)](_0xbcdab){const _0x4afc77=_0x3a913f;if(!_0xbcdab?.[_0x4afc77(0x1f0)])return null;const _0x57af59=_0x275e6c(_0xbcdab['pid'],_0xbcdab[_0x4afc77(0x29c)]);this[_0x4afc77(0x2d0)][_0x4afc77(0x1b7)](_0x57af59,{..._0xbcdab,'supervisorKey':_0xbcdab[_0x4afc77(0x321)]??this[_0x4afc77(0x2b5)]});if(this['_isWriter'])await this['publishChildRow'](this['_children'][_0x4afc77(0x288)](_0x57af59))[_0x4afc77(0x373)]?.(()=>{});return _0x57af59;}[_0x3a913f(0x203)](_0x1082dc){const _0x2a58c1=_0x3a913f;if(!_0x1082dc)return;return this[_0x2a58c1(0x2d0)]['delete'](_0x1082dc),this[_0x2a58c1(0x21d)](_0x1082dc);}[_0x3a913f(0x2db)](){const _0x2b8ca4=_0x3a913f,_0x3be165=Date[_0x2b8ca4(0x299)](),_0x24ef06=process[_0x2b8ca4(0x1c1)](),_0x46a944=(_0x3be165-this['_lastCpuAt'])*0x3e8;if(_0x46a944>=0x3d090){const _0x4952f2=_0x24ef06[_0x2b8ca4(0x208)]-this[_0x2b8ca4(0x175)][_0x2b8ca4(0x208)]+(_0x24ef06['system']-this[_0x2b8ca4(0x175)]['system']),_0x53ff9e=_0x349a6f[_0x2b8ca4(0x315)]()[_0x2b8ca4(0x2de)]||0x1;this[_0x2b8ca4(0x256)]=Math['min'](0x64,Math[_0x2b8ca4(0x358)](_0x4952f2/(_0x46a944*_0x53ff9e)*0x64)),this['_lastCpuWindowMs']=Math[_0x2b8ca4(0x358)](_0x46a944/0x3e8),this[_0x2b8ca4(0x175)]=_0x24ef06,this['_lastCpuAt']=_0x3be165;}const _0x57f84e=process[_0x2b8ca4(0x248)](),_0x50d178=this[_0x2b8ca4(0x32b)][_0x2b8ca4(0x214)];let _0x4670a6=0x0;if(_0x50d178>0x0){const _0x412841=[this['okdb'],...this[_0x2b8ca4(0x314)]['_envs']?.[_0x2b8ca4(0x397)]?.()??[]];for(const _0x57cbe6 of _0x412841){const _0x285a18=_0x57cbe6['functions']?.['_sandbox'];if(_0x285a18)_0x4670a6+=_0x285a18[_0x2b8ca4(0x1bd)][_0x2b8ca4(0x2fe)];}}let _0x539e59=null;const _0x3b9b32=_0x50d178;if(_0x3b9b32>0x0){let _0x52ed09=0x0;for(const _0x1ed6c1 of this[_0x2b8ca4(0x32b)][_0x2b8ca4(0x397)]())_0x52ed09+=_0x1ed6c1[_0x2b8ca4(0x1f6)]||0x0;_0x539e59={'count':_0x3b9b32,'heapUsed':_0x52ed09,'sandbox':_0x50d178,'busy':_0x4670a6};}return{'rss':_0x57f84e[_0x2b8ca4(0x169)],'heapUsed':_0x57f84e['heapUsed'],'heapTotal':_0x57f84e[_0x2b8ca4(0x1fa)],'external':_0x57f84e[_0x2b8ca4(0x217)],'cpuPct':this['_lastCpuPct'],'cpuWindowMs':this[_0x2b8ca4(0x1f4)]??null,'threads':_0x539e59,'at':_0x3be165};}[_0x3a913f(0x213)](_0x4bfbff,_0x2f2b3e){const _0x17f786=_0x3a913f;if(!_0x4bfbff||!_0x2f2b3e)return;this['_threadStats'][_0x17f786(0x1b7)](_0x4bfbff,_0x2f2b3e);}[_0x3a913f(0x334)](_0x3bea8b){const _0x530b7a=_0x3a913f;this[_0x530b7a(0x32b)][_0x530b7a(0x21f)](_0x3bea8b);}[_0x3a913f(0x28e)](_0x62499e,_0x5b68a7,_0x5706c1=undefined){const _0x19999a=_0x3a913f,_0x496968=this[_0x19999a(0x2d0)][_0x19999a(0x288)](_0x62499e);if(!_0x496968||!_0x5b68a7)return;if(_0x5706c1!==undefined)_0x496968[_0x19999a(0x31d)]=_0x5706c1;_0x496968[_0x19999a(0x38a)]={'rss':_0x5b68a7[_0x19999a(0x169)]??null,'heapUsed':_0x5b68a7['heapUsed']??null,'heapTotal':_0x5b68a7['heapTotal']??null,'external':_0x5b68a7['external']??null,'cpuPct':_0x5b68a7[_0x19999a(0x2fa)]??null,'cpuWindowMs':_0x5b68a7[_0x19999a(0x196)]??null,'threads':_0x5b68a7[_0x19999a(0x2c9)]??null,'claims':_0x5b68a7[_0x19999a(0x1c7)]??null,'envsOpen':_0x5b68a7[_0x19999a(0x1ab)]??null,'at':Date[_0x19999a(0x299)]()};}['_buildOwnRow'](){const _0x5ec164=_0x3a913f,_0x398fa0=Date[_0x5ec164(0x299)](),_0xd8b3e0=this[_0x5ec164(0x314)][_0x5ec164(0x174)]||{},_0x711d63=this[_0x5ec164(0x223)]||_0x5ec164(0x1aa);return{'nodeKey':this[_0x5ec164(0x2f2)],'processKey':this[_0x5ec164(0x2b5)],'instanceId':this['_instanceId'],'pid':process[_0x5ec164(0x1f0)],'startedAt':this[_0x5ec164(0x194)],'instanceStartedAt':this[_0x5ec164(0x36c)],'ppid':typeof process[_0x5ec164(0x21c)]===_0x5ec164(0x253)?process[_0x5ec164(0x21c)]:null,'host':_0x349a6f['hostname'](),'supervisorKey':this[_0x5ec164(0x385)]??null,'version':require$$6[_0x5ec164(0x1a4)],'kind':_0x711d63,'role':{'engines':!!_0xd8b3e0[_0x5ec164(0x16b)],'processors':!!_0xd8b3e0['processors'],'compaction':_0xd8b3e0[_0x5ec164(0x1b8)],'http':_0xd8b3e0[_0x5ec164(0x1e4)]},'listenAddr':this[_0x5ec164(0x17e)]??null,'heartbeatAt':_0x398fa0,'expiresAt':_0x398fa0+_0x515199,'caps':this[_0x5ec164(0x235)](_0x711d63,_0xd8b3e0),'lifecycle':{'state':_0x5ec164(0x2e0),'desiredVersionApplied':null},'meta':{...this[_0x5ec164(0x2a0)]},'processing':_0xd8b3e0['processors']?this[_0x5ec164(0x333)]():null,'engines':_0xd8b3e0[_0x5ec164(0x16b)]?[...this[_0x5ec164(0x314)][_0x5ec164(0x19c)]??[]]:null,'singletonClaims':this[_0x5ec164(0x240)](),'stats':this[_0x5ec164(0x2db)](),'writers':this['_collectWriterFacet']()};}[_0x3a913f(0x1be)](){const _0x582c53=_0x3a913f,_0x371875={};try{for(const [_0x2fee34,_0x2879e4]of this[_0x582c53(0x314)]['_envs']){try{const _0x5c2afd=_0x2879e4['writerStatus']?.();if(!_0x5c2afd)continue;if(!_0x5c2afd[_0x582c53(0x2bb)]&&!_0x5c2afd['committed']&&!(_0x5c2afd[_0x582c53(0x2c0)]??0x0)&&!_0x5c2afd[_0x582c53(0x2e4)])continue;_0x371875[_0x2fee34]={'depth':_0x5c2afd[_0x582c53(0x2bb)],'oldestPendingMs':_0x5c2afd[_0x582c53(0x2dc)],'committed':_0x5c2afd['committed'],'commitsPerSec':_0x5c2afd['commitsPerSec'],'commitP99Ms':_0x5c2afd['commitP99Ms'],'parkedNow':_0x5c2afd[_0x582c53(0x2c0)]??0x0,'draining':!!_0x5c2afd[_0x582c53(0x2e4)]};}catch{}}}catch{}return Object[_0x582c53(0x1f8)](_0x371875)[_0x582c53(0x2de)]?_0x371875:null;}[_0x3a913f(0x240)](){const _0x423144=_0x3a913f,_0x6e22f5=process[_0x423144(0x1f0)],_0x46f261=Date[_0x423144(0x299)](),_0x4b525f=_0x2dfe13=>{const _0x2602a9=_0x423144;if(!_0x2dfe13)return[];const _0x5e936c=[];try{for(const {id:_0x39e9e4,entry:_0x2329be}of _0x2dfe13[_0x2602a9(0x292)]()){if(_0x2329be?.['holder']?.[_0x2602a9(0x1f0)]!==_0x6e22f5)continue;const _0x2d1a68=_0x2329be[_0x2602a9(0x2cd)]??_0x2329be[_0x2602a9(0x311)]??0x0;if(_0x2d1a68+(_0x2329be[_0x2602a9(0x27e)]??0x0)<_0x46f261)continue;_0x5e936c[_0x2602a9(0x2d3)](_0x39e9e4);}}catch{}return _0x5e936c;},_0x30914e=_0x4b525f(this[_0x423144(0x216)](_0x423144(0x3a8))),_0x524e96=_0x4b525f(this[_0x423144(0x216)](_0x423144(0x181)));if(!_0x30914e[_0x423144(0x2de)]&&!_0x524e96[_0x423144(0x2de)])return null;return{'compact':_0x30914e,'replicate':_0x524e96};}[_0x3a913f(0x216)](_0x277be6){const _0x248a46=_0x3a913f;if(!this[_0x248a46(0x314)]?.[_0x248a46(0x27a)])return null;if(!this[_0x248a46(0x25d)])this[_0x248a46(0x25d)]=new Map();let _0x5c5f87=this[_0x248a46(0x25d)]['get'](_0x277be6);if(!_0x5c5f87)try{_0x5c5f87=new _0x510465(this[_0x248a46(0x314)][_0x248a46(0x27a)],{'namespace':_0x277be6}),this[_0x248a46(0x25d)][_0x248a46(0x1b7)](_0x277be6,_0x5c5f87);}catch{return null;}return _0x5c5f87;}[_0x3a913f(0x333)](){const _0x224882=_0x3a913f,_0xade28a=[];try{for(const [_0x4b783a,_0x534a8a]of this['okdb'][_0x224882(0x1a6)]){if(_0x4b783a['startsWith']('~'))continue;for(const _0x1137a3 of _0x534a8a[_0x224882(0x209)][_0x224882(0x383)]())_0xade28a[_0x224882(0x2d3)]({..._0x1137a3,'env':_0x4b783a});}}catch{}return{'participate':this[_0x224882(0x314)][_0x224882(0x380)]?.['_participate']??![],'processors':_0xade28a};}[_0x3a913f(0x1ac)](){const _0x44cc9e=_0x3a913f;if(this[_0x44cc9e(0x1e6)])return!![];const _0x26a213=this['okdb'][_0x44cc9e(0x27a)];if(!_0x26a213)return![];return this[_0x44cc9e(0x1e6)]=_0x26a213[_0x44cc9e(0x34a)](_0x6971f9,{'dupSort':![]}),this[_0x44cc9e(0x185)]=_0x26a213[_0x44cc9e(0x34a)](_0x4c49a5,{'dupSort':![]}),!![];}async[_0x3a913f(0x178)](){const _0x498b94=_0x3a913f;if(!this[_0x498b94(0x1ac)]())return;const _0x35d118=_0x498b94(0x2d2),_0x5b44db=0x1,_0x2adc90=this[_0x498b94(0x1e6)][_0x498b94(0x288)](_0x35d118)??0x0;if(_0x2adc90>=_0x5b44db)return;const _0x4c817e=_0x4cf4f8=>{const _0xa16fe2=_0x498b94;if(_0x4cf4f8===_0xa16fe2(0x1a3))return _0xa16fe2(0x289);if(_0x4cf4f8===_0xa16fe2(0x23b))return _0xa16fe2(0x281);return _0x4cf4f8;};await this[_0x498b94(0x314)]['_systemEnv'][_0x498b94(0x362)][_0x498b94(0x1ba)](()=>{const _0x1b5545=_0x498b94;for(const _0x19a527 of[_0x1b5545(0x2cc),'procmodeack/']){for(const {key:_0x5e32b4,value:_0x46439e}of this[_0x1b5545(0x1e6)][_0x1b5545(0x2c4)]({'start':_0x19a527,'end':_0x19a527+'\xff'})){if(typeof _0x5e32b4!==_0x1b5545(0x319)||!_0x5e32b4[_0x1b5545(0x31b)](_0x19a527))break;const _0x749401=_0x4c817e(_0x46439e[_0x1b5545(0x275)]);if(_0x749401!==_0x46439e[_0x1b5545(0x275)])this[_0x1b5545(0x1e6)][_0x1b5545(0x298)](_0x5e32b4,{..._0x46439e,'mode':_0x749401});}}this[_0x1b5545(0x1e6)][_0x1b5545(0x298)](_0x35d118,_0x5b44db);});}[_0x3a913f(0x1ea)](){const _0x1c558b=_0x3a913f;return!!this[_0x1c558b(0x1e6)];}['getDesired'](_0x127900,_0x2aef71){const _0x332d12=_0x3a913f;if(!this[_0x332d12(0x1ac)]())return null;const _0x339dbb=_0x127900+'/'+_0x2aef71;return this['_refreshDesiredSnapshot'](),this[_0x332d12(0x22f)][_0x332d12(0x288)](_0x339dbb)??this[_0x332d12(0x1e6)][_0x332d12(0x288)](_0x339dbb)??null;}[_0x3a913f(0x2ef)](){const _0x4f56ed=_0x3a913f;if(!_0x3a967c)return;try{this[_0x4f56ed(0x314)][_0x4f56ed(0x345)]?.['db']?.[_0x4f56ed(0x303)]?.();}catch{}}async[_0x3a913f(0x1c9)](_0x3ab3fd,_0x3aa836,_0x57ffc6){const _0x33cb6c=_0x3a913f;if(!this[_0x33cb6c(0x1ac)]())return null;const _0x58eb2c=_0x3ab3fd+'/'+_0x3aa836;this[_0x33cb6c(0x2ef)]();const _0x272a74=this[_0x33cb6c(0x22f)][_0x33cb6c(0x288)](_0x58eb2c)??this[_0x33cb6c(0x1e6)][_0x33cb6c(0x288)](_0x58eb2c)??{'version':0x0},_0x9bc39b=(_0x272a74[_0x33cb6c(0x1a4)]||0x0)+0x1,_0x3e1d81={..._0x272a74,..._0x57ffc6,'version':_0x9bc39b,'updatedAt':Date[_0x33cb6c(0x299)]()};this[_0x33cb6c(0x22f)][_0x33cb6c(0x1b7)](_0x58eb2c,_0x3e1d81);try{await this['okdb'][_0x33cb6c(0x345)][_0x33cb6c(0x362)][_0x33cb6c(0x1ba)](()=>{const _0x2ed6c5=_0x33cb6c;this[_0x2ed6c5(0x1e6)][_0x2ed6c5(0x298)](_0x58eb2c,_0x3e1d81);});}finally{if(this[_0x33cb6c(0x22f)][_0x33cb6c(0x288)](_0x58eb2c)===_0x3e1d81)this[_0x33cb6c(0x22f)][_0x33cb6c(0x21f)](_0x58eb2c);}return _0x9bc39b;}[_0x3a913f(0x25f)](_0x4bd0ee){const _0x361099=_0x3a913f;if(!this[_0x361099(0x1ac)]())return[];this[_0x361099(0x2ef)]();const _0x110498=_0x4bd0ee+'/',_0x429d43=[];for(const {key:_0x5b9f37,value:_0x472e8b}of this[_0x361099(0x1e6)]['getRange']({'start':_0x110498,'end':_0x110498+'\xff'})){if(typeof _0x5b9f37!==_0x361099(0x319)||!_0x5b9f37[_0x361099(0x31b)](_0x110498))break;_0x429d43['push']({'key':_0x5b9f37[_0x361099(0x2f9)](_0x110498[_0x361099(0x2de)]),'value':_0x472e8b});}return _0x429d43;}[_0x3a913f(0x21b)](_0x4c52b0){const _0x5ee665=_0x3a913f;if(!this[_0x5ee665(0x1ac)]())return null;return this[_0x5ee665(0x185)][_0x5ee665(0x288)](_0x4c52b0)??null;}async[_0x3a913f(0x30f)](_0x17bd04,_0x2041b7,_0x1ca4bd={}){const _0x73be39=_0x3a913f;if(!this[_0x73be39(0x1ac)]())return null;let _0x1563b4;return await this['okdb'][_0x73be39(0x345)][_0x73be39(0x362)][_0x73be39(0x1ba)](()=>{const _0x58600d=_0x73be39,_0x4c4530=this[_0x58600d(0x185)][_0x58600d(0x288)](_0x17bd04)||{'epoch':0x0};_0x1563b4=(_0x4c4530[_0x58600d(0x1a7)]||0x0)+0x1,this[_0x58600d(0x185)]['put'](_0x17bd04,{..._0x4c4530,..._0x1ca4bd,'cmd':_0x2041b7,'epoch':_0x1563b4,'updatedAt':Date[_0x58600d(0x299)]()});}),_0x1563b4;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x392c79,'nodeKey':_0x275e6c,'logicalKey':_0x594c4c,'slotKey':_0x3f7540,'PROCESS_ENV':_0x407848,'NODE_TYPE':_0x50b9c2},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x18f3ad=_0x727d37;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x43bb71=require$$0$4,{clampTimerDelay:_0x10ad69}=requireOkdbTimers(),{EVENTS:_0x18e8f2,CHANGE_ACTIONS:_0x69fe55}=requireOkdbEnums(),{LOOP:_0x337628}=requireOkdbLoopMonitor(),_0x1b4b98=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x4cca66=0x5,_0x39fa5b=0x2710;class _0x19fa35 extends _0x43bb71{constructor(_0x2cd0e3,_0x23fbd4={}){const _0x38ff38=_0x1c29;super(),this[_0x38ff38(0x314)]=_0x2cd0e3,this[_0x38ff38(0x18d)]=_0x23fbd4[_0x38ff38(0x322)]??_0x1b4b98,this[_0x38ff38(0x166)]=_0x23fbd4['flushDebounce']??_0x4cca66,this['_dedupeMax']=_0x23fbd4[_0x38ff38(0x21e)]??_0x39fa5b,this[_0x38ff38(0x224)]=![],this[_0x38ff38(0x220)]=new Map(),this[_0x38ff38(0x23e)]=new Map(),this[_0x38ff38(0x1df)]=new Map(),this[_0x38ff38(0x2d1)]=null,this[_0x38ff38(0x360)]=![],this[_0x38ff38(0x3a2)]=new Set(),this[_0x38ff38(0x264)]=new Set(),this['_onItem']=_0x319dc2=>this[_0x38ff38(0x327)](_0x319dc2),this['_onPending']=_0x1092af=>this[_0x38ff38(0x1d8)](_0x1092af),this[_0x38ff38(0x16e)]=_0x130c04=>this[_0x38ff38(0x351)](_0x130c04),this[_0x38ff38(0x1db)]=()=>this['stop']();}['start'](){const _0x1b95b1=_0x1c29;if(this[_0x1b95b1(0x224)])return;this[_0x1b95b1(0x224)]=!![];for(const [_0xd8be08,_0x2efb51]of this[_0x1b95b1(0x314)][_0x1b95b1(0x1a6)]){if(_0xd8be08[_0x1b95b1(0x31b)]('~'))continue;try{_0x2efb51['_enableChangelog']();}catch{}}for(const [_0x319ee9,_0x3edf87]of this[_0x1b95b1(0x314)][_0x1b95b1(0x1a6)]){if(_0x319ee9[_0x1b95b1(0x31b)]('~'))continue;try{this['_baselines']['set'](_0x319ee9,_0x3edf87[_0x1b95b1(0x356)]()||0x0);}catch{}}const {events:_0x256062}=this[_0x1b95b1(0x314)];_0x256062['on'](_0x18e8f2[_0x1b95b1(0x18b)],this[_0x1b95b1(0x164)]),_0x256062['on'](_0x18e8f2[_0x1b95b1(0x2ca)],this[_0x1b95b1(0x198)]),_0x256062['on'](_0x18e8f2[_0x1b95b1(0x1fe)],this[_0x1b95b1(0x198)]),_0x256062['on'](_0x18e8f2[_0x1b95b1(0x1a0)],this[_0x1b95b1(0x198)]),_0x256062['on'](_0x18e8f2['SYSTEM_POKE'],this['_onPoke']),_0x256062[_0x1b95b1(0x364)](_0x18e8f2[_0x1b95b1(0x2fb)],this['_onStop']);}['stop'](){const _0xa9cc40=_0x1c29;if(!this[_0xa9cc40(0x224)])return;this[_0xa9cc40(0x224)]=![];const {events:_0x478fa8}=this['okdb'];_0x478fa8['off'](_0x18e8f2[_0xa9cc40(0x18b)],this['_onPending']),_0x478fa8[_0xa9cc40(0x210)](_0x18e8f2['ITEM_CREATE'],this[_0xa9cc40(0x198)]),_0x478fa8[_0xa9cc40(0x210)](_0x18e8f2[_0xa9cc40(0x1fe)],this[_0xa9cc40(0x198)]),_0x478fa8[_0xa9cc40(0x210)](_0x18e8f2[_0xa9cc40(0x1a0)],this[_0xa9cc40(0x198)]),_0x478fa8[_0xa9cc40(0x210)](_0x18e8f2[_0xa9cc40(0x31e)],this['_onPoke']);try{_0x478fa8[_0xa9cc40(0x210)](_0x18e8f2['SYSTEM_STOPPED'],this[_0xa9cc40(0x1db)]);}catch{}this[_0xa9cc40(0x2d1)]&&(clearTimeout(this[_0xa9cc40(0x2d1)]),this[_0xa9cc40(0x2d1)]=null),this[_0xa9cc40(0x1df)][_0xa9cc40(0x2c3)](),this['_cursors'][_0xa9cc40(0x2c3)](),this[_0xa9cc40(0x23e)][_0xa9cc40(0x2c3)](),this[_0xa9cc40(0x3a2)]['clear'](),this[_0xa9cc40(0x264)]['clear']();}['_dedupeKey'](_0x44a041,_0x4850ae,_0x5e3b8f,_0x33bcd4){return _0x44a041+'\x00'+_0x4850ae+'\x00'+_0x5e3b8f+'\x00'+_0x33bcd4;}[_0x18f3ad(0x389)](_0x5e2ed7,_0x4072e5,_0x364423,_0x392c80){const _0xd0ca21=_0x18f3ad,_0x478e2a=this['_dedupeKey'](_0x5e2ed7,_0x4072e5,_0x364423,_0x392c80);if(this['_seen']['has'](_0x478e2a))return![];this[_0xd0ca21(0x3a2)][_0xd0ca21(0x273)](_0x478e2a);if(this[_0xd0ca21(0x3a2)]['size']>this[_0xd0ca21(0x238)]){const _0x471494=this[_0xd0ca21(0x3a2)][_0xd0ca21(0x397)]()[_0xd0ca21(0x354)]()[_0xd0ca21(0x375)];this[_0xd0ca21(0x3a2)][_0xd0ca21(0x21f)](_0x471494);}return!![];}['_handlePending'](_0xdceca3){const _0x5c1fcb=_0x18f3ad;if(!this[_0x5c1fcb(0x224)]||!_0xdceca3)return;const {env:_0x575d2f,type:_0x5bef10,key:_0x88b544,clock:_0x1b4e64}=_0xdceca3;if(_0x575d2f==null||_0x5bef10==null||_0x88b544==null)return;if(typeof _0x575d2f==='string'&&_0x575d2f['startsWith']('~'))return;if(typeof _0x5bef10==='string'&&_0x5bef10[_0x5c1fcb(0x31b)]('~'))return;this[_0x5c1fcb(0x264)][_0x5c1fcb(0x273)](this['_dedupeKey'](_0x575d2f,_0x5bef10,_0x88b544,_0x1b4e64)),this[_0x5c1fcb(0x264)][_0x5c1fcb(0x214)]>this[_0x5c1fcb(0x238)]&&this[_0x5c1fcb(0x264)][_0x5c1fcb(0x21f)](this['_pendingLocal'][_0x5c1fcb(0x397)]()[_0x5c1fcb(0x354)]()[_0x5c1fcb(0x375)]);}[_0x18f3ad(0x327)](_0x43937f){const _0x410265=_0x18f3ad;if(!this[_0x410265(0x224)]||!_0x43937f)return;const {env:_0x42e523,type:_0x11136f,key:_0x1a9771,clock:_0x5c9fff,origin:_0xe01dff,action:_0x54c1ca,newValue:_0x3175d5,oldValue:_0x29bcbd}=_0x43937f;if(_0x42e523==null||_0x11136f==null||_0x1a9771==null)return;if(typeof _0x42e523==='string'&&_0x42e523[_0x410265(0x31b)]('~'))return;if(typeof _0x11136f==='string'&&_0x11136f['startsWith']('~'))return;this[_0x410265(0x264)][_0x410265(0x21f)](this[_0x410265(0x2f0)](_0x42e523,_0x11136f,_0x1a9771,_0x5c9fff));if(!this[_0x410265(0x389)](_0x42e523,_0x11136f,_0x1a9771,_0x5c9fff))return;const _0x40f00a=_0x54c1ca===_0x69fe55[_0x410265(0x1b4)]?_0x410265(0x31c):'put';this['emit']('change',{'env':_0x42e523,'type':_0x11136f,'key':_0x1a9771,'op':_0x40f00a,'clock':_0x5c9fff,'origin':_0xe01dff,'value':_0x40f00a==='remove'?null:_0x3175d5,'prevValue':_0x29bcbd});}[_0x18f3ad(0x351)](_0x43aa66){const _0xa72567=_0x18f3ad;if(!this[_0xa72567(0x224)])return;if(!_0x43aa66||typeof _0x43aa66[_0xa72567(0x15d)]!==_0xa72567(0x319)||typeof _0x43aa66[_0xa72567(0x374)]!=='string')return;const {env:_0x594468,type:_0x477ff8}=_0x43aa66;if(_0x594468['startsWith']('~')||_0x477ff8[_0xa72567(0x31b)]('~'))return;this[_0xa72567(0x1df)][_0xa72567(0x1b7)](_0x594468+'\x00'+_0x477ff8,{'env':_0x594468,'type':_0x477ff8}),this[_0xa72567(0x307)]();}[_0x18f3ad(0x307)](){const _0x3bf60e=_0x18f3ad;if(this[_0x3bf60e(0x2d1)])return;const _0x20f420=()=>{const _0x253441=_0x3bf60e;this[_0x253441(0x2d1)]=null,this['_drain']()[_0x253441(0x373)](()=>{});};this[_0x3bf60e(0x2d1)]=setTimeout(_0x20f420,_0x10ad69(this['_flushDebounce']));}async[_0x18f3ad(0x381)](){const _0x3b581c=_0x18f3ad;if(this['_draining']){this[_0x3b581c(0x307)]();return;}this[_0x3b581c(0x360)]=!![];try{const _0x464407=[...this[_0x3b581c(0x1df)][_0x3b581c(0x397)]()];this[_0x3b581c(0x1df)]['clear']();let _0x8d7d00=![];for(const {env:_0x286141,type:_0x4ec896}of _0x464407){try{const _0x519a07=await this['_drainOne'](_0x286141,_0x4ec896);if(_0x519a07)_0x8d7d00=!![];}catch{this[_0x3b581c(0x1df)][_0x3b581c(0x1b7)](_0x286141+'\x00'+_0x4ec896,{'env':_0x286141,'type':_0x4ec896}),_0x8d7d00=!![];}}if(_0x8d7d00||this['_pending'][_0x3b581c(0x214)]>0x0)this['_scheduleFlush']();}finally{this[_0x3b581c(0x360)]=![];}}async[_0x18f3ad(0x26f)](_0x34ea3a,_0x54afeb){const _0xc0e68f=_0x18f3ad,_0x1c0cd0=await this['okdb'][_0xc0e68f(0x212)](_0x34ea3a),_0x7114cb=_0x34ea3a+'\x00'+_0x54afeb;!this[_0xc0e68f(0x220)]['has'](_0x7114cb)&&(!this[_0xc0e68f(0x23e)][_0xc0e68f(0x177)](_0x34ea3a)&&(_0x1c0cd0[_0xc0e68f(0x24d)](),this[_0xc0e68f(0x23e)][_0xc0e68f(0x1b7)](_0x34ea3a,_0x1c0cd0[_0xc0e68f(0x356)]()||0x0)),this['_cursors'][_0xc0e68f(0x1b7)](_0x7114cb,this[_0xc0e68f(0x23e)][_0xc0e68f(0x288)](_0x34ea3a)));const _0x26e422=this[_0xc0e68f(0x220)][_0xc0e68f(0x288)](_0x7114cb),_0x3db7c8=_0x1c0cd0[_0xc0e68f(0x356)](_0x54afeb)||0x0;if(_0x3db7c8<=_0x26e422)return![];const _0xe31a2f=_0x26e422+this[_0xc0e68f(0x18d)],_0x2611ca=Math['min'](_0x3db7c8,_0xe31a2f),_0x1b9ffb=_0x337628[_0xc0e68f(0x2ce)]?_0x337628['now']():0x0,_0x3a3fc9=Array['from'](_0x1c0cd0['getChanges'](_0x54afeb,_0x26e422+0x1,_0x2611ca));let _0x25d100=_0x26e422;for(const _0xea5a1a of _0x3a3fc9){const {clock:_0x369621,key:_0x2464d5,action:_0xf12e,origin:_0x2f46c4}=_0xea5a1a;if(_0x369621>_0x25d100)_0x25d100=_0x369621;if(_0x2464d5==null)continue;if(this[_0xc0e68f(0x264)][_0xc0e68f(0x177)](this[_0xc0e68f(0x2f0)](_0x34ea3a,_0x54afeb,_0x2464d5,_0x369621)))continue;if(!this[_0xc0e68f(0x389)](_0x34ea3a,_0x54afeb,_0x2464d5,_0x369621))continue;let _0x1d22e0,_0x56007d;if(_0xf12e===_0x69fe55[_0xc0e68f(0x1b4)])_0x1d22e0=_0xc0e68f(0x31c),_0x56007d=null;else{const _0x293ccd=_0x1c0cd0[_0xc0e68f(0x288)](_0x54afeb,_0x2464d5);_0x293ccd==null?(_0x1d22e0=_0xc0e68f(0x31c),_0x56007d=null):(_0x1d22e0=_0xc0e68f(0x298),_0x56007d=_0x293ccd);}this[_0xc0e68f(0x2b4)]('change',{'env':_0x34ea3a,'type':_0x54afeb,'key':_0x2464d5,'op':_0x1d22e0,'clock':_0x369621,'origin':_0x2f46c4,'value':_0x56007d});}if(_0x337628[_0xc0e68f(0x2ce)])_0x337628[_0xc0e68f(0x300)](_0xc0e68f(0x30e)+_0x34ea3a+':'+_0x54afeb,_0x337628[_0xc0e68f(0x299)]()-_0x1b9ffb,'n='+_0x3a3fc9[_0xc0e68f(0x2de)]);return this[_0xc0e68f(0x220)][_0xc0e68f(0x1b7)](_0x7114cb,Math[_0xc0e68f(0x346)](_0x25d100,_0x2611ca)),_0x1c0cd0[_0xc0e68f(0x356)](_0x54afeb)>_0x2611ca;}['status'](){const _0x4ebcf5=_0x18f3ad;return{'started':this[_0x4ebcf5(0x224)],'quantum':this[_0x4ebcf5(0x18d)],'flushDebounce':this[_0x4ebcf5(0x166)],'cursors':Object[_0x4ebcf5(0x2f3)]([...this[_0x4ebcf5(0x220)][_0x4ebcf5(0x342)]()]['map'](([_0x1c25dd,_0x6cdf9e])=>[_0x1c25dd[_0x4ebcf5(0x2a7)]('\x00',':'),_0x6cdf9e])),'pending':this[_0x4ebcf5(0x1df)][_0x4ebcf5(0x214)],'seen':this[_0x4ebcf5(0x3a2)][_0x4ebcf5(0x214)]};}}return _0x19fa35[_0x18f3ad(0x1ff)]=_0x1b4b98,okdbChangefeed={'OKDBChangefeed':_0x19fa35},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x2cfb4c=_0x727d37;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x105af8=require$$1$1,_0x3c4d23=require$$1,{EVENTS:_0x1dc5b0}=requireOkdbEnums(),_0x5c7635=require$$0$3,{slotKey:_0x57be9e}=requireOkdbProcessRegistry(),_0x12e160=Number(process.env.OKDB_CLUSTER_RESPAWN_BACKOFF_MS)||0xfa,_0x34b5ec=0xfa0,_0x494eb3=0x5,_0x19d6df=0x2710,_0xc36303=0xbb8,_0x2a62a5=0x7d0,_0x5e5af7='__okdbCluster',_0x3db5e2=_0x2cfb4c(0x258),_0x2d1019=_0x2cfb4c(0x19e),_0x454deb=_0x2cfb4c(0x38a),_0x54a2aa=[_0x1dc5b0['VIEW_PROGRESS'],_0x1dc5b0['FTS_REGISTERED'],_0x1dc5b0[_0x2cfb4c(0x32c)],_0x1dc5b0[_0x2cfb4c(0x290)],_0x1dc5b0[_0x2cfb4c(0x1bc)],_0x1dc5b0[_0x2cfb4c(0x1d2)],_0x1dc5b0[_0x2cfb4c(0x28f)],_0x1dc5b0[_0x2cfb4c(0x1a8)],_0x2cfb4c(0x394),_0x2cfb4c(0x1ce),_0x2cfb4c(0x35d),_0x2cfb4c(0x1d5),_0x2cfb4c(0x2ab),_0x2cfb4c(0x368)],_0x1eb5de=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0,_0xfc75fe=0x64;function _0x1c6785(_0x3403a7){const _0x4f5561=_0x2cfb4c;if(!_0x3403a7)return _0x4f5561(0x24c);const _0x251ab8=(_0x3403a7['processors']||[])[_0x4f5561(0x249)](_0x11a127=>[_0x11a127['env'],_0x11a127['id'],_0x11a127['mode'],_0x11a127[_0x4f5561(0x280)],!!_0x11a127['paused'],!!_0x11a127[_0x4f5561(0x276)],!!_0x11a127[_0x4f5561(0x268)],_0x11a127[_0x4f5561(0x160)]?.['pid']??null,_0x11a127['error']?String(_0x11a127[_0x4f5561(0x2fd)]?.[_0x4f5561(0x1c4)]??_0x11a127[_0x4f5561(0x2fd)]):null]);return JSON[_0x4f5561(0x2e8)]([!!_0x3403a7[_0x4f5561(0x242)],_0x251ab8]);}function _0x3888e2({workers:_0x25cdae,makeOkdb:_0x48c061,port:_0x367af4,primaryOkdb:_0x2a363b,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0xa41e3a=_0x2cfb4c;if(_0x105af8[_0xa41e3a(0x193)])return childEntry&&_0x105af8[_0xa41e3a(0x24f)]({'exec':_0x3c4d23['join'](__dirname,_0xa41e3a(0x370)),'args':[],'execArgv':((()=>{const _0x55626d=_0xa41e3a,_0x4e0d8f=[];for(let _0x15fbbc=0x0;_0x15fbbc<process[_0x55626d(0x312)][_0x55626d(0x2de)];_0x15fbbc++){const _0x59ba3b=process['execArgv'][_0x15fbbc];if(_0x59ba3b['startsWith'](_0x55626d(0x35c))||_0x59ba3b['startsWith']('--watch')||_0x59ba3b['startsWith'](_0x55626d(0x1d9)))continue;if(_0x59ba3b==='-e'||_0x59ba3b===_0x55626d(0x1a2)||_0x59ba3b==='-p'||_0x59ba3b===_0x55626d(0x1da)){_0x15fbbc++;continue;}_0x4e0d8f[_0x55626d(0x2d3)](_0x59ba3b);}return _0x4e0d8f;})())}),_0x232c3a({'workers':_0x25cdae,'port':_0x367af4,'primaryOkdb':_0x2a363b,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x367af4});return _0x481ee8({'makeOkdb':_0x48c061,'port':_0x367af4});}function _0x232c3a({workers:_0x5ddfc1,port:_0x20ffbf,primaryOkdb:_0x2805af,workerEnv:_0x161e12,workerRole:_0x36323a,listenAddr:_0x2f1e3a}){const _0x2757eb=_0x2cfb4c,_0x457823=new Map(),_0x581ca0=new Map();let _0x38282f=![];const _0x5141b2=_0x6eaae2=>_0x6eaae2?.[_0x2757eb(0x328)],_0x1d59eb=_0x5c4a91=>{const _0x544c35=_0x2757eb,_0x6c5f5f=_0x105af8[_0x544c35(0x173)]({...process.env,..._0x161e12||{},'OKDB_CLUSTER_SLOT':String(_0x5c4a91)});return _0x6c5f5f['__okdbSlot']=_0x5c4a91,_0x457823[_0x544c35(0x1b7)](_0x6c5f5f[_0x544c35(0x372)][_0x544c35(0x1f0)],{'worker':_0x6c5f5f,'startedAt':Date[_0x544c35(0x299)](),'slot':_0x5c4a91}),_0x6c5f5f['on'](_0x544c35(0x2fd),_0x315b6a=>{const _0x35853b=_0x544c35;console[_0x35853b(0x19e)](_0x35853b(0x259)+_0x6c5f5f[_0x35853b(0x372)]['pid']+_0x35853b(0x2dd)+(_0x315b6a?.['message']??_0x315b6a));}),_0x6c5f5f['on'](_0x544c35(0x339),()=>_0x5e4968()),_0x6c5f5f;},_0x1617a6=_0x49dffc=>{const _0xdeef36=_0x2757eb;for(const {worker:_0x4d8620}of _0x457823[_0xdeef36(0x397)]()){if(_0x4d8620[_0xdeef36(0x34b)]()||!_0x4d8620['isConnected']())continue;try{_0x4d8620['send'](_0x49dffc);}catch{}}};_0x2805af?.[_0x2757eb(0x2ea)]?.({'kind':_0x2757eb(0x2d5),'listenAddr':_0x2f1e3a})['catch'](()=>{}),_0x2805af?.[_0x2757eb(0x376)]?.[_0x2757eb(0x252)]?.({'workersConfigured':_0x5ddfc1});const _0x3966b1={'engines':!![],'processors':!![],'compaction':!![],..._0x36323a,'http':!![]},_0x5e4968=()=>{const _0x3f0c45=_0x2757eb,_0x28352d=_0x2805af?.[_0x3f0c45(0x376)];if(!_0x28352d||!_0x28352d['_isWriter'])return;const _0x3f388f=_0x28352d[_0x3f0c45(0x30a)];for(const {worker:_0x4f08c3,startedAt:_0x1dc835,slot:_0x3c383c,stats:_0x427c0a,processing:_0x1bb074}of _0x457823[_0x3f0c45(0x397)]()){if(_0x4f08c3[_0x3f0c45(0x34b)]())continue;const _0x652c8a=_0x28352d[_0x3f0c45(0x1ea)]?.()&&_0x28352d['getDesired']('slot',_0x15fc42(_0x3c383c))?.[_0x3f0c45(0x266)]===!![];_0x28352d['publishChildRow']({'pid':_0x4f08c3[_0x3f0c45(0x372)][_0x3f0c45(0x1f0)],'startedAt':_0x1dc835,'kind':_0x3f0c45(0x301),'supervisorKey':_0x3f388f,'slot':_0x3c383c,'slotKey':_0x15fc42(_0x3c383c),'role':_0x3966b1,'listenAddr':_0x2f1e3a,'lifecycle':_0x652c8a?_0x3f0c45(0x192):'running','processing':_0x1bb074??null,'stats':_0x427c0a??null})[_0x3f0c45(0x373)](()=>{});}},_0x15fc42=_0x516d95=>_0x57be9e(_0x2757eb(0x189)+_0x20ffbf,_0x516d95),_0x3f181b=_0x1a255b=>{const _0x50597d=_0x2757eb,_0x135831=_0x2805af?.[_0x50597d(0x376)];if(!_0x135831?.['hasDesired']?.())return![];return _0x135831['getDesired'](_0x50597d(0x29a),_0x15fc42(_0x1a255b))?.[_0x50597d(0x266)]===!![];};for(let _0x7244d5=0x0;_0x7244d5<_0x5ddfc1;_0x7244d5++){const _0x3e6488=_0x3f181b(_0x7244d5);_0x581ca0[_0x2757eb(0x1b7)](_0x7244d5,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x3e6488,'respawnTimer':null}),_0x3e6488?console[_0x2757eb(0x19e)](_0x2757eb(0x35a)+_0x7244d5+_0x2757eb(0x1d1)):_0x1d59eb(_0x7244d5);}const _0x178d10=()=>{const _0x5d1352=_0x2757eb,_0x56f9fc=_0x2805af?.[_0x5d1352(0x376)];if(!_0x56f9fc?.['_isWriter']||!_0x56f9fc[_0x5d1352(0x1ea)]?.())return;for(const [_0x13b862,_0x4b373a]of _0x581ca0['entries']()){const _0x465bca=_0x56f9fc['getDesired'](_0x5d1352(0x29a),_0x15fc42(_0x13b862)),_0x3ace03=_0x465bca?.[_0x5d1352(0x266)]===!![],_0x1744f5=_0x465bca?.[_0x5d1352(0x341)]===!![];if(_0x3ace03&&!_0x4b373a[_0x5d1352(0x254)]){_0x4b373a['dead']=!![];_0x4b373a['respawnTimer']&&(clearTimeout(_0x4b373a[_0x5d1352(0x390)]),_0x4b373a[_0x5d1352(0x390)]=null);for(const {worker:_0x21f704}of _0x457823[_0x5d1352(0x397)]()){if(_0x5141b2(_0x21f704)!==_0x13b862||_0x21f704[_0x5d1352(0x34b)]())continue;try{if(_0x1744f5)_0x21f704[_0x5d1352(0x372)][_0x5d1352(0x341)](_0x5d1352(0x332));else _0x21f704[_0x5d1352(0x287)]()&&_0x21f704[_0x5d1352(0x1dd)]();}catch{}}console['log']('[okdb-cluster]\x20'+(_0x1744f5?_0x5d1352(0x1b2):_0x5d1352(0x284))+_0x5d1352(0x255)+_0x13b862+_0x5d1352(0x2df));}else{if(!_0x3ace03&&_0x4b373a['dead']&&_0x465bca){_0x4b373a['dead']=![],_0x4b373a[_0x5d1352(0x331)]=[],_0x4b373a[_0x5d1352(0x343)]=0x0;const _0x34d7df=[..._0x457823['values']()][_0x5d1352(0x28a)](({worker:_0x467366})=>_0x5141b2(_0x467366)===_0x13b862&&!_0x467366[_0x5d1352(0x34b)]());!_0x34d7df&&!_0x38282f&&(_0x1d59eb(_0x13b862),console[_0x5d1352(0x19e)]('[okdb-cluster]\x20recommissioned\x20worker\x20slot='+_0x13b862));}}}},_0x282fa5=()=>{try{_0x178d10();}catch{}};_0x2805af?.[_0x2757eb(0x199)]?.['on']?.(_0x1dc5b0[_0x2757eb(0x33f)],_0x282fa5);const _0x36e3b3=[];if(_0x2805af?.['events']?.['on'])for(const _0x58b59e of _0x54a2aa){const _0x2fda70=_0x42cf8f=>{_0x1617a6({[_0x5e5af7]:_0x3db5e2,'event':_0x58b59e,'data':_0x42cf8f??{}});};_0x2805af[_0x2757eb(0x199)]['on'](_0x58b59e,_0x2fda70),_0x36e3b3[_0x2757eb(0x2d3)]({'event':_0x58b59e,'handler':_0x2fda70});}const _0x5bde57=setInterval(()=>{_0x178d10(),_0x5e4968();},_0x1eb5de);_0x5bde57['unref']?.();const _0x3efb3c=(_0xa91eb0,_0x35aa1d)=>{const _0xf31ffe=_0x2757eb;if(!_0x35aa1d||typeof _0x35aa1d!==_0xf31ffe(0x167)||_0x35aa1d[_0x5e5af7]!==_0x2d1019)return;if(!_0x2805af?.[_0xf31ffe(0x19e)]?.[_0xf31ffe(0x2a9)])return;const _0x32c778=_0x35aa1d[_0xf31ffe(0x2c6)]||{};_0x2805af[_0xf31ffe(0x19e)]['ingest']({..._0x32c778,'msg':'[w'+_0x35aa1d[_0xf31ffe(0x29a)]+']\x20'+(_0x32c778[_0xf31ffe(0x285)]??''),'meta':{..._0x32c778['meta']||{},'worker':_0x35aa1d['slot'],'workerPid':_0x35aa1d[_0xf31ffe(0x1f0)]}});};_0x105af8['on'](_0x2757eb(0x1c4),_0x3efb3c);const _0x5cae28=(_0x39f437,_0x49cb75)=>{const _0x7c5dbc=_0x2757eb;if(!_0x49cb75||typeof _0x49cb75!==_0x7c5dbc(0x167)||_0x49cb75[_0x5e5af7]!==_0x454deb)return;const _0x20ae5f=_0x457823[_0x7c5dbc(0x288)](_0x39f437[_0x7c5dbc(0x372)][_0x7c5dbc(0x1f0)]);if(_0x20ae5f){_0x20ae5f[_0x7c5dbc(0x38a)]={..._0x49cb75[_0x7c5dbc(0x38a)],'at':Date[_0x7c5dbc(0x299)]()};if(_0x49cb75[_0x7c5dbc(0x31d)]!==undefined){const _0x5785ff=_0x1c6785(_0x49cb75[_0x7c5dbc(0x31d)]);_0x5785ff!==_0x20ae5f[_0x7c5dbc(0x2ed)]&&(_0x20ae5f[_0x7c5dbc(0x2ed)]=_0x5785ff,_0x29fe07()),_0x20ae5f[_0x7c5dbc(0x31d)]=_0x49cb75[_0x7c5dbc(0x31d)];}}};let _0x3f2ce2=null;const _0x29fe07=()=>{const _0xb7ed1c=_0x2757eb;if(_0x3f2ce2||_0x38282f)return;_0x3f2ce2=setTimeout(()=>{_0x3f2ce2=null;if(!_0x38282f)_0x5e4968();},_0xfc75fe),_0x3f2ce2[_0xb7ed1c(0x2d7)]?.();};_0x105af8['on']('message',_0x5cae28),_0x105af8['on'](_0x2757eb(0x243),(_0x164ab7,_0x3d1cc9,_0x5b447c)=>{const _0x41132a=_0x2757eb,_0x2f1b7c=_0x164ab7[_0x41132a(0x372)][_0x41132a(0x1f0)],_0x2a45ef=_0x5141b2(_0x164ab7),_0x24184e=_0x457823[_0x41132a(0x288)](_0x2f1b7c);if(_0x24184e&&_0x2805af?.['processes'])_0x2805af[_0x41132a(0x376)][_0x41132a(0x21d)](_0x2f1b7c+':'+_0x24184e[_0x41132a(0x29c)])['catch'](()=>{});_0x457823['delete'](_0x2f1b7c),console['log'](_0x41132a(0x259)+_0x2f1b7c+'\x20(slot='+(_0x2a45ef??'?')+_0x41132a(0x293)+(_0x41132a(0x15e)+_0x3d1cc9+_0x41132a(0x357)+(_0x5b447c??_0x41132a(0x1ca))+_0x41132a(0x272)+_0x457823['size']+_0x41132a(0x18e))),_0x5e4968();if(_0x38282f||_0x2a45ef==null)return;const _0x1fe8c5=_0x581ca0['get'](_0x2a45ef);if(!_0x1fe8c5||_0x1fe8c5[_0x41132a(0x254)])return;const _0x1ec483=Date[_0x41132a(0x299)]();_0x1fe8c5[_0x41132a(0x331)][_0x41132a(0x2d3)](_0x1ec483),_0x1fe8c5[_0x41132a(0x331)]=_0x1fe8c5[_0x41132a(0x331)][_0x41132a(0x232)](_0x593424=>_0x1ec483-_0x593424<=_0x19d6df);if(_0x1fe8c5[_0x41132a(0x331)][_0x41132a(0x2de)]>=_0x494eb3){_0x1fe8c5[_0x41132a(0x254)]=!![],console[_0x41132a(0x2fd)](_0x41132a(0x2da)+_0x2a45ef+_0x41132a(0x34e)+_0x1fe8c5[_0x41132a(0x331)][_0x41132a(0x2de)]+'\x20times\x20in\x20'+(_0x19d6df+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x457823[_0x41132a(0x214)]+'\x20worker(s)\x20still\x20serving'));return;}_0x1fe8c5[_0x41132a(0x343)]++;const _0x2cd895=Math['min'](_0x34b5ec,_0x12e160*0x2**(_0x1fe8c5[_0x41132a(0x343)]-0x1));console['log'](_0x41132a(0x398)+_0x2a45ef+_0x41132a(0x2ff)+_0x2cd895+_0x41132a(0x359)+_0x1fe8c5['consecutiveFailures']+')'),_0x1fe8c5[_0x41132a(0x390)]=setTimeout(()=>{const _0x389bb0=_0x41132a;_0x1fe8c5[_0x389bb0(0x390)]=null;if(_0x38282f||_0x1fe8c5['dead'])return;const _0x3ce59c=_0x1d59eb(_0x2a45ef);_0x3ce59c[_0x389bb0(0x364)](_0x389bb0(0x23a),()=>{const _0x3bbe2e=_0x389bb0;if(_0x581ca0[_0x3bbe2e(0x288)](_0x2a45ef)===_0x1fe8c5)_0x1fe8c5[_0x3bbe2e(0x343)]=0x0;});},_0x2cd895),_0x1fe8c5[_0x41132a(0x390)][_0x41132a(0x2d7)]?.();});const _0x37b2c1=[..._0x457823[_0x2757eb(0x1f8)]()];console[_0x2757eb(0x19e)]('[okdb-cluster]\x20primary\x20pid='+process[_0x2757eb(0x1f0)]+_0x2757eb(0x171)+_0x5ddfc1+_0x2757eb(0x388)+_0x20ffbf+':\x20'+('['+_0x37b2c1['join'](',\x20')+']'));const _0x3fb997={'_isClusterController':!![],'port':_0x20ffbf,'primaryOkdb':_0x2805af??null,'status'(){const _0x382239=_0x2757eb;return{'clustered':!![],'primaryPid':process[_0x382239(0x1f0)],'port':_0x20ffbf,'primaryRole':_0x2805af?.[_0x382239(0x2bd)]??null,'processorPid':null,'supervisorPid':process['pid'],'workers':[..._0x457823['values']()][_0x382239(0x249)](({worker:_0x5a8305})=>({'pid':_0x5a8305[_0x382239(0x372)][_0x382239(0x1f0)],'id':_0x5a8305['id'],'dead':_0x5a8305[_0x382239(0x34b)]()}))};},async 'close'(){const _0x41a22d=_0x2757eb;_0x38282f=!![];for(const _0x5c5247 of _0x581ca0[_0x41a22d(0x397)]()){_0x5c5247['dead']=!![],_0x5c5247[_0x41a22d(0x390)]&&(clearTimeout(_0x5c5247['respawnTimer']),_0x5c5247[_0x41a22d(0x390)]=null);}clearInterval(_0x5bde57);_0x3f2ce2&&(clearTimeout(_0x3f2ce2),_0x3f2ce2=null);_0x105af8[_0x41a22d(0x210)](_0x41a22d(0x1c4),_0x3efb3c),_0x105af8[_0x41a22d(0x210)](_0x41a22d(0x1c4),_0x5cae28),_0x2805af?.[_0x41a22d(0x199)]?.[_0x41a22d(0x210)]?.(_0x1dc5b0[_0x41a22d(0x33f)],_0x282fa5);if(_0x2805af?.['events']?.['off'])for(const {event:_0x4c28ab,handler:_0x2c3362}of _0x36e3b3){try{_0x2805af[_0x41a22d(0x199)][_0x41a22d(0x210)](_0x4c28ab,_0x2c3362);}catch{}}_0x36e3b3[_0x41a22d(0x2de)]=0x0;const _0x2a1527=[..._0x457823[_0x41a22d(0x397)]()]['map'](({worker:_0x5bd3f6})=>_0x5bd3f6);if(_0x2a1527[_0x41a22d(0x2de)]===0x0)return;await Promise[_0x41a22d(0x179)](_0x2a1527[_0x41a22d(0x249)](_0x33e49a=>new Promise(_0x452f83=>{const _0x76d239=_0x41a22d;if(_0x33e49a[_0x76d239(0x34b)]()){_0x452f83();return;}let _0x2bfa7c=![];const _0x406b08=()=>{if(_0x2bfa7c)return;_0x2bfa7c=!![];if(_0x2356c7)clearTimeout(_0x2356c7);_0x452f83();};_0x33e49a[_0x76d239(0x364)](_0x76d239(0x243),_0x406b08);const _0x2356c7=setTimeout(()=>{const _0x3afeab=_0x76d239;try{_0x33e49a[_0x3afeab(0x372)][_0x3afeab(0x341)]();}catch{}},_0xc36303+0x1f4);_0x2356c7['unref']?.();try{_0x33e49a['disconnect']();}catch{try{_0x33e49a[_0x76d239(0x372)][_0x76d239(0x341)]();}catch{}}})));}};return _0x3fb997;}async function _0x481ee8({makeOkdb:_0x6c111b,port:_0x5d1ff0}){const _0x51f5dd=_0x2cfb4c,_0x5eeb42=await _0x6c111b();return _0x122926(_0x5eeb42),_0x5eeb42[_0x51f5dd(0x1e4)][_0x51f5dd(0x2ee)](_0x5d1ff0);}function _0x122926(_0x441a8d){const _0x4b2389=_0x2cfb4c;if(!_0x441a8d||_0x441a8d[_0x4b2389(0x23d)])return;_0x441a8d[_0x4b2389(0x23d)]=!![];try{const {OKDBChangefeed:_0x5e0506}=requireOkdbChangefeed(),_0x1e2de0=_0x441a8d['_adminRelay'];if(_0x1e2de0&&typeof _0x1e2de0[_0x4b2389(0x3a9)]===_0x4b2389(0x2c1)){const _0x2b4b59=new _0x5e0506(_0x441a8d);_0x2b4b59['start'](),_0x1e2de0[_0x4b2389(0x3a9)](_0x2b4b59),_0x441a8d[_0x4b2389(0x2c7)]=_0x2b4b59;}}catch(_0x4f9304){_0x441a8d[_0x4b2389(0x19e)]?.[_0x4b2389(0x39f)]?.(_0x4b2389(0x37e)+(_0x4f9304?.[_0x4b2389(0x1c4)]??_0x4f9304),{'feature':'cluster'});}const _0x13863e=_0x1bfa90=>{const _0x44cc2b=_0x4b2389;if(!_0x1bfa90||typeof _0x1bfa90!==_0x44cc2b(0x167)||_0x1bfa90[_0x5e5af7]==null)return;if(_0x1bfa90[_0x5e5af7]===_0x3db5e2)try{_0x441a8d[_0x44cc2b(0x251)]?.[_0x44cc2b(0x2ae)]?.(_0x1bfa90['event'],_0x1bfa90['data']);}catch{}};process['on']('message',_0x13863e),_0x441a8d[_0x4b2389(0x32e)]=_0x13863e;{let _0x421009=process[_0x4b2389(0x1c1)](),_0x1012aa=Date['now']();const _0x17dd17=()=>{const _0x565ca1=_0x4b2389;if(typeof process[_0x565ca1(0x20d)]!=='function'||!process[_0x565ca1(0x363)])return;const _0x42cdce=Date['now'](),_0x5208a8=process[_0x565ca1(0x1c1)](),_0x264f59=(_0x42cdce-_0x1012aa)*0x3e8,_0x1c0adb=_0x5208a8[_0x565ca1(0x208)]-_0x421009[_0x565ca1(0x208)]+(_0x5208a8[_0x565ca1(0x1f2)]-_0x421009[_0x565ca1(0x1f2)]),_0x7260a8=_0x264f59>0x0?Math['min'](0x64,Math[_0x565ca1(0x358)](_0x1c0adb/(_0x264f59*(_0x5c7635[_0x565ca1(0x315)]()[_0x565ca1(0x2de)]||0x1))*0x64)):0x0;_0x421009=_0x5208a8,_0x1012aa=_0x42cdce;const _0x41577c=process[_0x565ca1(0x248)]();let _0x58f766=null;try{_0x58f766=_0x441a8d[_0x565ca1(0x2bd)]?.[_0x565ca1(0x380)]?_0x441a8d[_0x565ca1(0x376)]?.[_0x565ca1(0x333)]?.()??null:null;}catch{}try{process[_0x565ca1(0x20d)]({[_0x5e5af7]:_0x454deb,'stats':{'rss':_0x41577c[_0x565ca1(0x169)],'heapUsed':_0x41577c[_0x565ca1(0x1f6)],'heapTotal':_0x41577c[_0x565ca1(0x1fa)],'external':_0x41577c[_0x565ca1(0x217)],'cpuPct':_0x7260a8,'cpuWindowMs':Math[_0x565ca1(0x358)](_0x264f59/0x3e8)||null},'processing':_0x58f766});}catch{}},_0x4b69aa=Math[_0x4b2389(0x346)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x227721=setInterval(_0x17dd17,_0x4b69aa);_0x227721[_0x4b2389(0x2d7)]?.(),_0x17dd17();for(const _0x44a7a3 of[_0x4b2389(0x1d5),_0x4b2389(0x2ab)]){_0x441a8d['events']?.['on']?.(_0x44a7a3,()=>{try{_0x17dd17();}catch{}});}}let _0x1b3c49=![];const _0x561ae9=async _0x317e88=>{const _0x2cd77b=_0x4b2389;if(_0x1b3c49)return;_0x1b3c49=!![];const _0x2cb609=setTimeout(()=>process[_0x2cd77b(0x243)](_0x317e88),_0xc36303);_0x2cb609['unref']?.();try{await _0x441a8d[_0x2cd77b(0x1e5)]?.();}catch{}process['exit'](_0x317e88);};process['on']('disconnect',()=>_0x561ae9(0x0));if(process[_0x4b2389(0x20d)]&&!process[_0x4b2389(0x363)])_0x561ae9(0x0);if(process[_0x4b2389(0x2f5)]!=='win32'){const _0x55bf2b=setInterval(()=>{const _0x5ae62b=_0x4b2389;if(process[_0x5ae62b(0x21c)]===0x1)_0x561ae9(0x0);},_0x2a62a5);_0x55bf2b['unref']?.(),_0x441a8d[_0x4b2389(0x262)]=_0x55bf2b;}}return okdbCluster={'runClustered':_0x3888e2,'attachWorkerCluster':_0x122926},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x3ce07d=require$$0$5,{attachWorkerCluster:_0x430403}=requireOkdbCluster();async function _0x489492(){const _0x78c7dd=_0x1c29,_0x4a65ca=process.env.OKDB_HTTP_CHILD;if(!_0x4a65ca)throw new Error(_0x78c7dd(0x387));const {rootPath:_0x397d61,port:_0x46c0c9,options:options={},logLevel:logLevel='info'}=JSON[_0x78c7dd(0x1de)](_0x4a65ca);if(!_0x397d61||!_0x46c0c9)throw new Error('okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required');const _0x15a3fa=new _0x3ce07d(_0x397d61,{...options,'engines':![],'processors':![],'compaction':![]});_0x15a3fa['log'][_0x78c7dd(0x1d7)]?.();const _0x15f225=process.env.OKDB_CLUSTER_SLOT??'?',_0x34b835={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x1b84d0=_0x34b835[logLevel]??_0x34b835['info'];_0x15a3fa[_0x78c7dd(0x19e)][_0x78c7dd(0x18c)](_0x5b2515=>{const _0x2957ed=_0x78c7dd;if((_0x34b835[_0x5b2515['level']]??0x1)<_0x1b84d0)return;try{process[_0x2957ed(0x20d)]?.({'__okdbCluster':_0x2957ed(0x19e),'slot':_0x15f225,'pid':process['pid'],'entry':_0x5b2515});}catch{}}),await _0x15a3fa['open'](),_0x430403(_0x15a3fa),await _0x15a3fa[_0x78c7dd(0x1e4)][_0x78c7dd(0x2ee)](_0x46c0c9);}return _0x489492()['catch'](_0x2a6cdd=>{const _0x424fd2=_0x1c29;try{process[_0x424fd2(0x20d)]?.({'__okdbCluster':_0x424fd2(0x19e),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x424fd2(0x1f0)],'entry':{'level':_0x424fd2(0x2fd),'msg':_0x424fd2(0x170)+(_0x2a6cdd?.[_0x424fd2(0x1c4)]??_0x2a6cdd)}});}catch{}process[_0x424fd2(0x243)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module['exports']=okdbHttpWorkerChild;
|