@kedem/okdb 2.6.3 → 2.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- 'use strict';const _0x5e06fa=_0x5881;(function(_0x167fb2,_0x2561f6){const _0x319a0e=_0x5881,_0x5cd7d1=_0x167fb2();while(!![]){try{const _0x310b57=-parseInt(_0x319a0e(0x287))/0x1+-parseInt(_0x319a0e(0x184))/0x2+parseInt(_0x319a0e(0x1c9))/0x3*(parseInt(_0x319a0e(0x122))/0x4)+-parseInt(_0x319a0e(0x151))/0x5+parseInt(_0x319a0e(0x2a9))/0x6*(parseInt(_0x319a0e(0x1c6))/0x7)+parseInt(_0x319a0e(0x192))/0x8*(parseInt(_0x319a0e(0x15c))/0x9)+parseInt(_0x319a0e(0x2d3))/0xa*(parseInt(_0x319a0e(0x2a0))/0xb);if(_0x310b57===_0x2561f6)break;else _0x5cd7d1['push'](_0x5cd7d1['shift']());}catch(_0x5df2fe){_0x5cd7d1['push'](_0x5cd7d1['shift']());}}}(_0x2913,0xc7b65));var require$$0$5=require(_0x5e06fa(0xd9)),require$$1$1=require(_0x5e06fa(0x1c7)),require$$1=require('path'),require$$0$3=require('os'),require$$2=require(_0x5e06fa(0x1d8)),require$$0=require(_0x5e06fa(0x1e4)),require$$0$2=require(_0x5e06fa(0x29e)),require$$0$1=require('fs'),require$$0$4=require(_0x5e06fa(0x205));function _0x5881(_0x39ddc,_0x17eac9){_0x39ddc=_0x39ddc-0xa5;const _0x291301=_0x2913();let _0x5881cc=_0x291301[_0x39ddc];return _0x5881cc;}function getDefaultExportFromCjs(_0x4671f9){const _0x3441ed=_0x5e06fa;return _0x4671f9&&_0x4671f9[_0x3441ed(0xdc)]&&Object[_0x3441ed(0xd0)]['hasOwnProperty'][_0x3441ed(0x1f5)](_0x4671f9,_0x3441ed(0x201))?_0x4671f9[_0x3441ed(0x201)]:_0x4671f9;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x4b98dc=_0x5e06fa;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x5ac31c={'PUT':'put','REMOVE':'remove','INDEX_DROP':'dropIndex','INDEX_REGISTER':_0x4b98dc(0x1aa),'INDEX_RESET':'resetIndex','TYPE_REGISTER':'registerType','TYPE_DROP':_0x4b98dc(0x263),'FTS_REGISTER':_0x4b98dc(0xfc),'FTS_DROP':'dropFts','FTS_RESET':'resetFts','SCHEMA_SET':'setSchema','SCHEMA_DROP':'dropSchema','TTL_SET':'setTtl','TTL_CLEAR':'clearTtl'},_0x5a29aa={'SYSTEM_READY':_0x4b98dc(0x1f0),'FIELD_RESOLVER_REGISTERED':_0x4b98dc(0x2e0),'SYSTEM_STOPPED':_0x4b98dc(0x219),'SYSTEM_CLOCK_CHANGE':_0x4b98dc(0x11c),'SYSTEM_POKE':_0x4b98dc(0x286),'SYSTEM_DRAIN':'system:drain','SYSTEM_TYPE_DROP':_0x4b98dc(0xf9),'SYSTEM_PROC':_0x4b98dc(0xf3),'SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':_0x4b98dc(0x2c2),'ITEM_UPDATE':_0x4b98dc(0x152),'ITEM_REMOVE':_0x4b98dc(0xe6),'ITEM_PENDING':'item:pending','INDEX_RESET':_0x4b98dc(0x241),'INDEX_READY':_0x4b98dc(0xd6),'INDEX_PROGRESS':_0x4b98dc(0x200),'VIEW_PROGRESS':'view:progress','INDEX_DROP':_0x4b98dc(0x1d9),'INDEX_REGISTERED':_0x4b98dc(0x1f1),'FTS_REGISTERED':_0x4b98dc(0x2d5),'FTS_DROP':_0x4b98dc(0x15e),'FTS_RESET':_0x4b98dc(0x1df),'SCHEMA_SET':_0x4b98dc(0x129),'SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':_0x4b98dc(0xc9),'UNIQUE_VIOLATION_RESOLVED':_0x4b98dc(0xf7),'REF_VIOLATION':_0x4b98dc(0x1b8),'REF_VIOLATION_RESOLVED':_0x4b98dc(0x26c),'SYNC_APPLY':_0x4b98dc(0x21f),'TXN_START':_0x4b98dc(0x249),'TXN_END':_0x4b98dc(0xd4),'TXN_ROLLBACK':_0x4b98dc(0x155),'TYPE_REGISTERED':_0x4b98dc(0x188),'TYPE_DROP':_0x4b98dc(0x10b),'ENV_OPENED':'env:opened','ENV_REMOVED':_0x4b98dc(0x145),'SYSTEM_ENV_RELEASE':'system:env_release','TTL_EXPIRED':_0x4b98dc(0x270),'TTL_SET':_0x4b98dc(0x22c),'TTL_CLEAR':_0x4b98dc(0x1fc),'LICENSE_INVALID':_0x4b98dc(0xba),'LICENSE_ADDED':_0x4b98dc(0x2d8),'LICENSE_ACTIVATED':_0x4b98dc(0x24e),'LICENSE_REMOVED':_0x4b98dc(0x12e)},_0x32f1be={'CREATING':_0x4b98dc(0xcb),'RESETTING':_0x4b98dc(0x29b),'READY':'ready','DROPPING':'dropping','WAITING':_0x4b98dc(0x2ca),'ERROR':_0x4b98dc(0x277)},_0x36a08d={'CREATED':'created','STARTING':'starting','STARTED':_0x4b98dc(0x29c),'STOPPING':_0x4b98dc(0xdd),'STOPPED':_0x4b98dc(0xa5)},_0x9beedc={'CREATING':_0x4b98dc(0xcb),'READY':'ready','HALTED':'halted','STOPPED':_0x4b98dc(0xa5),'RESETTING':_0x4b98dc(0x29b)},_0x10155f=Object[_0x4b98dc(0xb5)]({'POKE':_0x4b98dc(0x181),'DRAIN':'bus:drain','TYPE_DROP':_0x4b98dc(0xc6),'PROC':_0x4b98dc(0x21c),'ENV_RELEASE':_0x4b98dc(0xd1)});return okdbEnums={'BUS_EVENTS':_0x10155f,'CHANGE_ACTIONS':_0x5ac31c,'EVENTS':_0x5a29aa,'INDEX_STATE':_0x32f1be,'OKDB_STATE':_0x36a08d,'VIEW_STATE':_0x9beedc},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x51eba8=_0x5e06fa;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x250bd0,performance:_0x317f2c}=require$$0,_0x5b65d1=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG==='true',_0x39e5a7=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x4f6437=process.env.OKDB_LOOP_LAG_ALL==='1',_0x488830=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x353e76{constructor(){const _0x185889=_0x5881;this[_0x185889(0xcf)]=_0x5b65d1,this[_0x185889(0x1c8)]=new Map(),this['_h']=null,this['_timer']=null,this[_0x185889(0x2e1)]=![],this[_0x185889(0x25b)]=(_0x8cf10,_0x1b1c79)=>process[_0x185889(0xca)][_0x185889(0x21e)](_0x8cf10+(_0x1b1c79?'\x20'+JSON[_0x185889(0xd8)](_0x1b1c79):'')+'\x0a');}[_0x51eba8(0x24a)](){const _0x3d87ff=_0x51eba8;return _0x317f2c[_0x3d87ff(0x24a)]();}[_0x51eba8(0x23c)](_0x1aa61e){const _0x33c911=_0x51eba8;if(typeof _0x1aa61e===_0x33c911(0x18c))this[_0x33c911(0x25b)]=_0x1aa61e;}[_0x51eba8(0x1d2)](_0x5ae808,_0x3a8fc1,_0x38a688){const _0x5f5ac6=_0x51eba8;if(!this['enabled'])return;let _0x17aff7=this['_buckets'][_0x5f5ac6(0xec)](_0x5ae808);!_0x17aff7&&(_0x17aff7={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x5f5ac6(0x1c8)][_0x5f5ac6(0x17a)](_0x5ae808,_0x17aff7)),_0x17aff7['ms']+=_0x3a8fc1,_0x17aff7[_0x5f5ac6(0x235)]+=0x1,_0x3a8fc1>_0x17aff7['maxMs']&&(_0x17aff7[_0x5f5ac6(0x1b2)]=_0x3a8fc1,_0x17aff7[_0x5f5ac6(0x1b0)]=_0x38a688||'');}[_0x51eba8(0x177)](_0x425d76){const _0x5695dc=_0x51eba8;if(!this[_0x5695dc(0xcf)]||this[_0x5695dc(0x2e1)])return;this[_0x5695dc(0x2e1)]=!![];if(_0x425d76)this[_0x5695dc(0x25b)]=_0x425d76;this['_h']=_0x250bd0({'resolution':0xa}),this['_h'][_0x5695dc(0xbd)](),this[_0x5695dc(0xa7)]=setInterval(()=>this[_0x5695dc(0x128)](),_0x39e5a7);if(this[_0x5695dc(0xa7)][_0x5695dc(0x13e)])this[_0x5695dc(0xa7)][_0x5695dc(0x13e)]();}[_0x51eba8(0x186)](_0x1674a5){const _0x367dbf=_0x51eba8;if(!this[_0x367dbf(0x15a)])this[_0x367dbf(0x15a)]=new Set();this[_0x367dbf(0x15a)][_0x367dbf(0x25e)](_0x1674a5);if(!this['_started'])this['_startAdmission']();}[_0x51eba8(0x2b6)](_0x472136){const _0x47c89f=_0x51eba8;this[_0x47c89f(0x15a)]?.[_0x47c89f(0x2aa)](_0x472136);}[_0x51eba8(0x233)](){const _0x39c11e=_0x51eba8;if(this[_0x39c11e(0x1f3)])return;this[_0x39c11e(0x1f3)]=!![];!this['_h']&&(this['_h']=_0x250bd0({'resolution':0xa}),this['_h']['enable']());const _0x56d82b=_0x39e5a7;this['_admissionTimer']=setInterval(()=>{const _0x28f812=_0x39c11e,_0x2c9ebf=this['_h'];if(!_0x2c9ebf)return;const _0x7f7bbb=_0x2c9ebf['percentile'](0x63)/0xf4240,_0x6e0719=_0x2c9ebf['max']/0xf4240,_0x2b3028=_0x2c9ebf[_0x28f812(0x251)]/0xf4240;_0x2c9ebf[_0x28f812(0x1d4)]();if(this[_0x28f812(0x15a)])for(const _0x103f56 of this[_0x28f812(0x15a)]){try{_0x103f56({'p99Ms':_0x7f7bbb,'maxMs':_0x6e0719,'meanMs':_0x2b3028,'reportMs':_0x56d82b});}catch{}}},_0x56d82b);if(this['_admissionTimer'][_0x39c11e(0x13e)])this[_0x39c11e(0xe1)]['unref']();}[_0x51eba8(0x128)](){const _0x1579f4=_0x51eba8,_0xe21e6f=this['_h'],_0x3acd09=_0xe21e6f[_0x1579f4(0x2bc)]/0xf4240,_0x27b181=_0xe21e6f[_0x1579f4(0x295)](0x63)/0xf4240,_0x1a7d84=_0xe21e6f[_0x1579f4(0x251)]/0xf4240;_0xe21e6f['reset']();const _0x469d3c=[...this[_0x1579f4(0x1c8)][_0x1579f4(0x24c)]()]['map'](([_0x52bc5c,_0x2f3640])=>({'label':_0x52bc5c,..._0x2f3640}))['sort']((_0x1c0057,_0x3684ed)=>_0x3684ed['ms']-_0x1c0057['ms'])[_0x1579f4(0x272)](0x0,0x8);this[_0x1579f4(0x1c8)]['clear']();const _0x512a03=_0x469d3c[_0x1579f4(0x1fa)]((_0x4bdc43,_0x1e2add)=>_0x4bdc43+_0x1e2add['ms'],0x0),_0x32d924=_0x469d3c[_0x1579f4(0x173)](_0x5eeb24=>_0x5eeb24['label']+'='+_0x5eeb24['ms'][_0x1579f4(0x19f)](0x0)+_0x1579f4(0x208)+_0x5eeb24[_0x1579f4(0x235)]+(_0x5eeb24['maxMs']>0x5?'(worst\x20'+_0x5eeb24['maxMs'][_0x1579f4(0x19f)](0x0)+'ms'+(_0x5eeb24[_0x1579f4(0x1b0)]?'\x20'+_0x5eeb24['maxExtra']:'')+')':''));(_0x4f6437||_0x3acd09>=_0x488830)&&this[_0x1579f4(0x25b)]('loop-lag\x20'+_0x39e5a7+_0x1579f4(0x20b)+_0x3acd09[_0x1579f4(0x19f)](0x0)+_0x1579f4(0x140)+_0x27b181[_0x1579f4(0x19f)](0x0)+'ms\x20mean='+_0x1a7d84[_0x1579f4(0x19f)](0x0)+_0x1579f4(0xb7)+_0x512a03[_0x1579f4(0x19f)](0x0)+'ms'+(_0x32d924[_0x1579f4(0x17e)]?_0x1579f4(0x2b5)+_0x32d924[_0x1579f4(0x20d)]('\x20\x20'):''),{'feature':_0x1579f4(0x2d0)});if(this[_0x1579f4(0x15a)])for(const _0x59cdd7 of this[_0x1579f4(0x15a)]){try{_0x59cdd7({'p99Ms':_0x27b181,'maxMs':_0x3acd09,'meanMs':_0x1a7d84,'reportMs':_0x39e5a7});}catch{}}}[_0x51eba8(0x2d6)](){const _0x5a4bab=_0x51eba8;if(this[_0x5a4bab(0xa7)])clearInterval(this[_0x5a4bab(0xa7)]);if(this['_h'])this['_h'][_0x5a4bab(0x104)]();this['_timer']=null,this['_h']=null,this[_0x5a4bab(0x2e1)]=![];}}const _0x1e9376=new _0x353e76();if(_0x1e9376[_0x51eba8(0xcf)])_0x1e9376[_0x51eba8(0x177)]();return okdbLoopMonitor={'LOOP':_0x1e9376},okdbLoopMonitor;}var okdbTimers,hasRequiredOkdbTimers;function requireOkdbTimers(){if(hasRequiredOkdbTimers)return okdbTimers;hasRequiredOkdbTimers=0x1;const _0xe28128=0x2**0x1f-0x1;function _0xf2ee1b(_0x59e134){if(!(_0x59e134>0x0))return 0x0;return _0x59e134>_0xe28128?_0xe28128:_0x59e134;}function _0x9e6700(_0x3deb80){return _0x3deb80===Infinity;}return okdbTimers={'MAX_TIMER_DELAY':_0xe28128,'clampTimerDelay':_0xf2ee1b,'isNeverDelay':_0x9e6700},okdbTimers;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x2be06a=require$$0$1,_0x3e1b57=require$$1;let _0x55a92a,_0x4b2e27,_0x53e33a,_0x4c3fe3,_0x22e776,_0x17ea60,_0x46011a,_0x47c0d0=![];const _0x56b643=new Set();let _0x32e4b6=null;const _0x95dda7=new Map();function _0x45057b(){if(_0x55a92a!==undefined)return _0x55a92a;_0x55a92a=process.env.OKDB_DIAG==='1';if(!_0x55a92a)return![];_0x4b2e27=process.env.OKDB_DIAG_STACK==='1',_0x4c3fe3=Math['max'](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x53e33a=new Array(_0x4c3fe3),_0x22e776=0x0,_0x17ea60=0x0,_0x46011a=process.env.OKDB_DIAG_DIR||null;if(_0x46011a)try{_0x2be06a['mkdirSync'](_0x46011a,{'recursive':!![]});}catch{}return!![];}function _0x439df5(){return _0x55a92a===undefined?_0x45057b():_0x55a92a;}function _0x30b4ee(_0x23e943,_0x1d3fc0){const _0x4f6d78=_0x5881;if(_0x55a92a===undefined?!_0x45057b():!_0x55a92a)return;let _0x564c37;if(_0x4b2e27){const _0x100732=new Error()[_0x4f6d78(0x2d4)]||'';_0x564c37=_0x100732[_0x4f6d78(0x137)]('\x0a')[_0x4f6d78(0x272)](0x3)[_0x4f6d78(0x173)](_0x221d77=>_0x221d77[_0x4f6d78(0x289)]())[_0x4f6d78(0x2c0)](Boolean)[_0x4f6d78(0x272)](0x0,0x8);}_0x53e33a[_0x22e776]={'seq':_0x17ea60++,'t':Date[_0x4f6d78(0x24a)](),'env':_0x23e943,'kind':_0x1d3fc0||_0x4f6d78(0x158),'stack':_0x564c37},_0x22e776=(_0x22e776+0x1)%_0x4c3fe3;}function _0x271cfe(_0x5a8381){const _0x185ac2=[];for(let _0x28b93f=0x0;_0x28b93f<_0x4c3fe3;_0x28b93f++){const _0x4ef42b=_0x53e33a[(_0x22e776-0x1-_0x28b93f+_0x4c3fe3*0x2)%_0x4c3fe3];if(!_0x4ef42b)continue;_0x185ac2['push'](_0x4ef42b);if(_0x185ac2['length']>=_0x5a8381)break;}return _0x185ac2;}function _0x5616af(_0x433ff7){const _0x5416a1=_0x5881;try{process[_0x5416a1(0xca)][_0x5416a1(0x21e)](_0x433ff7+'\x0a');}catch{}if(_0x46011a)try{_0x2be06a[_0x5416a1(0x237)](_0x3e1b57[_0x5416a1(0x20d)](_0x46011a,_0x5416a1(0x268)+process[_0x5416a1(0x11d)]+_0x5416a1(0x134)),_0x433ff7+'\x0a');}catch{}}function _0x55b2ff(_0x4e252e){const _0x3b152f=_0x5881,_0x6e1ebf=_0x271cfe(_0x4e252e);if(!_0x6e1ebf[_0x3b152f(0x17e)])return _0x3b152f(0x1ef);const _0xf74ce4=Date['now']();return _0x6e1ebf[_0x3b152f(0x173)](_0x51d0c7=>{const _0x510dce=_0x3b152f,_0x13d802='\x20\x20#'+_0x51d0c7[_0x510dce(0x278)]+'\x20-'+(_0xf74ce4-_0x51d0c7['t'])+_0x510dce(0xfa)+_0x51d0c7[_0x510dce(0x136)]+'\x20'+_0x51d0c7['kind'];return _0x51d0c7[_0x510dce(0x2d4)]&&_0x51d0c7[_0x510dce(0x2d4)][_0x510dce(0x17e)]?_0x13d802+_0x510dce(0x1a7)+_0x51d0c7['stack']['join'](_0x510dce(0x1a7)):_0x13d802;})[_0x3b152f(0x20d)]('\x0a');}function _0xa4389e(_0x4ea8c3,_0x5f13fe){const _0x3bd1a8=_0x5881,_0x1e87b1=_0x3bd1a8(0x28b)+_0x4ea8c3+'\x20@\x20'+new Date()[_0x3bd1a8(0xb6)]()+_0x3bd1a8(0x27c)+process[_0x3bd1a8(0x11d)]+_0x3bd1a8(0x1bb),_0x478074=[_0x1e87b1,'error:\x20'+(_0x5f13fe&&_0x5f13fe[_0x3bd1a8(0x2d4)]?_0x5f13fe[_0x3bd1a8(0x2d4)][_0x3bd1a8(0x137)]('\x0a')[0x0]:_0x5f13fe),_0x3bd1a8(0x1ba)+(_0x4b2e27?'':'\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site')+':',_0x55b2ff(0x18),_0xff36e5(),'='[_0x3bd1a8(0x2b3)](_0x1e87b1['length']-0x1)];_0x5616af(_0x478074[_0x3bd1a8(0x20d)]('\x0a'));}function _0xd0f069(_0x2f2fef){const _0xbff4d8=_0x5881;if(!_0x439df5())return;const _0x58d8bd=String(_0x2f2fef&&_0x2f2fef[_0xbff4d8(0x25d)]||_0x2f2fef||''),_0x38ce3b=/already closed|environment is already|invalid read txn|reset an invalid/i[_0xbff4d8(0x160)](_0x58d8bd);_0xa4389e(_0x38ce3b?_0xbff4d8(0xbf):_0xbff4d8(0x299),_0x2f2fef);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x38ce3b)return;try{console[_0xbff4d8(0x277)](_0x2f2fef&&_0x2f2fef['stack']?_0x2f2fef[_0xbff4d8(0x2d4)]:_0x2f2fef);}catch{}process['exit'](0x1);}function _0x5e56c5(_0xa4e34a){const _0x46bdb3=_0x5881;if(!_0x439df5())return;const _0x49527e=String(_0xa4e34a&&_0xa4e34a[_0x46bdb3(0x25d)]||_0xa4e34a||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x46bdb3(0x160)](_0x49527e)&&_0xa4389e(_0x46bdb3(0x182),_0xa4e34a);}function _0xff36e5(){const _0x35c831=_0x5881,_0x11c091=[_0x35c831(0xef)];let _0x5c2b4b=![];for(const _0x32d308 of _0x56b643){const _0xb96b34=_0x32d308&&_0x32d308[_0x35c831(0x139)];if(!_0xb96b34)continue;for(const [_0x56d630,_0x396cc2]of _0xb96b34){const _0x2df2d2=_0x396cc2&&_0x396cc2[_0x35c831(0x1e1)]&&_0x396cc2[_0x35c831(0x1e1)][_0x35c831(0x22f)];if(!_0x2df2d2)continue;let _0x3c55ff,_0x5a7c42;try{_0x3c55ff=Atomics[_0x35c831(0x283)](_0x2df2d2,0x0),_0x5a7c42=Atomics['load'](_0x2df2d2,0x1);}catch{continue;}if(_0x3c55ff===0x0)continue;_0x5c2b4b=!![];const _0x202ff2=_0x3c55ff>0x0?'SWAP':'copy',_0x1082c5=Date['now']()-Math[_0x35c831(0xce)](_0x3c55ff)*0x3e8,_0x6e48b3=((()=>{const _0x3674ed=_0x35c831;try{return _0x396cc2['_writer']&&_0x396cc2[_0x3674ed(0x2da)][_0x3674ed(0x2cf)]?_0x396cc2['_writer'][_0x3674ed(0x2cf)]():null;}catch{return null;}})());_0x11c091[_0x35c831(0x1a0)]('\x20\x20env='+_0x56d630+'\x20phase='+_0x202ff2+_0x35c831(0x2b9)+_0x1082c5+_0x35c831(0xf6)+_0x5a7c42+(_0x6e48b3?_0x35c831(0x2a8)+_0x6e48b3[_0x35c831(0xcc)]+'\x20oldestPendingMs='+_0x6e48b3['oldestPendingMs']+_0x35c831(0xe0)+_0x6e48b3[_0x35c831(0x1c4)]+'}':''));}}if(!_0x5c2b4b)_0x11c091['push'](_0x35c831(0xe5));return _0x11c091[_0x35c831(0x20d)]('\x0a');}function _0x215fd4(){const _0x29e8bf=_0x5881;if(!_0x439df5())return;const _0x5ea374=Math['max'](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x38ddc8=Date[_0x29e8bf(0x24a)]();for(const _0x328ef8 of _0x56b643){const _0x2d7105=_0x328ef8&&_0x328ef8[_0x29e8bf(0x139)];if(!_0x2d7105)continue;for(const [_0x160141,_0x16442b]of _0x2d7105){const _0x4808df=_0x16442b&&_0x16442b['_coordinator']&&_0x16442b[_0x29e8bf(0x1e1)]['view'];if(!_0x4808df)continue;let _0x1f573c;try{_0x1f573c=Atomics[_0x29e8bf(0x283)](_0x4808df,0x0);}catch{continue;}const _0x362857=_0x328ef8[_0x29e8bf(0x1d7)]+'|'+_0x160141;if(_0x1f573c<=0x0){_0x95dda7['delete'](_0x362857);continue;}const _0x310f30=_0x38ddc8-_0x1f573c*0x3e8,_0x3c17bc=_0x95dda7[_0x29e8bf(0xec)](_0x362857);if(_0x310f30<_0x5ea374)continue;if(_0x3c17bc&&_0x38ddc8-_0x3c17bc[_0x29e8bf(0x28c)]<_0x5ea374)continue;_0x95dda7['set'](_0x362857,{'firstTs':_0x3c17bc?_0x3c17bc['firstTs']:_0x1f573c,'dumpedAt':_0x38ddc8});const _0x375e8c='\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20'+_0x310f30+_0x29e8bf(0xf0)+_0x160141+_0x29e8bf(0x275)+new Date()['toISOString']()+_0x29e8bf(0x27c)+process[_0x29e8bf(0x11d)]+_0x29e8bf(0x1bb);_0x5616af([_0x375e8c,_0xff36e5(),'='[_0x29e8bf(0x2b3)](_0x375e8c['length']-0x1)][_0x29e8bf(0x20d)]('\x0a'));}}}function _0x5dfea7(){const _0x5d915c=_0x5881;if(!_0x439df5()||_0x47c0d0)return;_0x47c0d0=!![],process['prependListener'](_0x5d915c(0x299),_0xd0f069),process[_0x5d915c(0x19a)]('unhandledRejection',_0x5e56c5);const _0x5a25ae=Math[_0x5d915c(0x2bc)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x32e4b6=setInterval(_0x215fd4,_0x5a25ae);if(_0x32e4b6[_0x5d915c(0x13e)])_0x32e4b6[_0x5d915c(0x13e)]();}function _0x5eee3f(_0x7ae850){const _0x43aafa=_0x5881;if(!_0x439df5()||!_0x7ae850)return;_0x56b643[_0x43aafa(0x25e)](_0x7ae850),_0x5dfea7();}function _0x551aa3(_0x18ff8e){const _0x14f1eb=_0x5881;_0x56b643[_0x14f1eb(0x2aa)](_0x18ff8e);}function _0x17181f(){const _0x4f4af2=_0x5881;if(!_0x439df5())return{'enabled':![],'hint':_0x4f4af2(0x16b)};return{'enabled':!![],'stackCapture':!!_0x4b2e27,'recentWrites':_0x271cfe(0x10),'drain':_0xff36e5()};}return okdbDiag={'isEnabled':_0x439df5,'recordWrite':_0x30b4ee,'installDiag':_0x5dfea7,'registerOkdb':_0x5eee3f,'unregisterOkdb':_0x551aa3,'snapshot':_0x17181f},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x44635e=_0x5e06fa;if(hasRequiredOkdbWriter)return okdbWriter[_0x44635e(0x16f)];hasRequiredOkdbWriter=0x1;const {performance:_0x1739b4}=require$$0$2,_0x2c04e4=requireOkdbDiag(),_0x52fb54=process.env.OKDB_COMMIT_MODE===_0x44635e(0x1d6);class _0x460fa7{constructor(_0x5659d9){const _0x3d69d3=_0x44635e;this[_0x3d69d3(0x136)]=_0x5659d9,this[_0x3d69d3(0x1f7)]=new Set(),this[_0x3d69d3(0x18d)]=new Map(),this[_0x3d69d3(0x18a)]=0x0,this['_durs']=[],this['_done']=[],this[_0x3d69d3(0x111)]=Math[_0x3d69d3(0x2bc)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x3d69d3(0x1ec)]=0x0,this['_bpWaiters']=[],this['_bpParkedTotal']=0x0,this[_0x3d69d3(0x232)]=null,this[_0x3d69d3(0x12c)]=0x0,this['_nestedTotal']=0x0,this[_0x3d69d3(0x14e)]=![];}async['transaction'](_0xd40a09,_0x231758,{admitted:admitted=![]}={}){const _0x2f8578=_0x44635e;if(_0x2c04e4[_0x2f8578(0xcd)]())_0x2c04e4[_0x2f8578(0x2b2)](this[_0x2f8578(0x136)]?.[_0x2f8578(0x178)],_0x231758);if(this['_closed']){const _0xfebe66=new Error(_0x2f8578(0x28e));_0xfebe66[_0x2f8578(0x2d9)]=_0x2f8578(0x228);throw _0xfebe66;}if(this[_0x2f8578(0x111)]>0x0){let _0x4fb87d=![];while(this[_0x2f8578(0x1ec)]>=this['_highWater']&&!this[_0x2f8578(0x2a7)]){!_0x4fb87d&&(_0x4fb87d=!![],this[_0x2f8578(0x29a)]++),await new Promise(_0x2c02cc=>this[_0x2f8578(0x2ab)][_0x2f8578(0x1a0)](_0x2c02cc));}if(this[_0x2f8578(0x2a7)]){const _0x52f821=new Error(_0x2f8578(0x28e));_0x52f821['code']=_0x2f8578(0x228);throw _0x52f821;}}this[_0x2f8578(0x1ec)]++;const _0x22ee90=admitted?null:this['env'][_0x2f8578(0x1e1)];for(;;){while(this['_held'])await this[_0x2f8578(0x232)];if(_0x22ee90)try{await _0x22ee90[_0x2f8578(0x26e)]();}catch(_0x1396a2){this[_0x2f8578(0x1ec)]--;if(this[_0x2f8578(0x2ab)]['length']&&this['_outstanding']<this[_0x2f8578(0x111)])this[_0x2f8578(0x2ab)][_0x2f8578(0x276)]()();throw _0x1396a2;}if(!this[_0x2f8578(0x232)])break;if(_0x22ee90)_0x22ee90[_0x2f8578(0x196)]();}if(this[_0x2f8578(0x2a7)]){if(_0x22ee90)_0x22ee90[_0x2f8578(0x196)]();this[_0x2f8578(0x1ec)]--;if(this[_0x2f8578(0x2ab)]['length']&&this['_outstanding']<this[_0x2f8578(0x111)])this[_0x2f8578(0x2ab)][_0x2f8578(0x276)]()();const _0x3f4af8=new Error(_0x2f8578(0x28e));_0x3f4af8[_0x2f8578(0x2d9)]=_0x2f8578(0x228);throw _0x3f4af8;}const _0x26bc17=_0x1739b4['now']();if(_0x52fb54)try{const _0x3de17d=this['env']['db'][_0x2f8578(0x2c6)](_0xd40a09);this[_0x2f8578(0x18a)]++;if(this['_durs'][_0x2f8578(0x1a0)](_0x1739b4[_0x2f8578(0x24a)]()-_0x26bc17)>0x100)this[_0x2f8578(0x1f4)][_0x2f8578(0x276)]();if(this['_done'][_0x2f8578(0x1a0)](_0x1739b4[_0x2f8578(0x24a)]())>0x800)this[_0x2f8578(0x2ac)][_0x2f8578(0x276)]();return _0x3de17d;}finally{this[_0x2f8578(0x1ec)]--;if(this['_bpWaiters'][_0x2f8578(0x17e)]&&this['_outstanding']<this[_0x2f8578(0x111)])this[_0x2f8578(0x2ab)]['shift']()();if(_0x22ee90)_0x22ee90['afterWrite']();}let _0x280a50=null;const _0x52bd02=()=>{const _0x43345b=_0x2f8578,_0x322fcf=_0xd40a09();if(_0x322fcf&&typeof _0x322fcf[_0x43345b(0xda)]==='function'&&!_0x280a50){this[_0x43345b(0x12c)]++;let _0x583119;const _0x14ff7c=new Promise(_0x5617a9=>_0x583119=_0x5617a9);this[_0x43345b(0x232)]=_0x14ff7c,_0x280a50=()=>{const _0x330526=_0x43345b;if(this[_0x330526(0x232)]===_0x14ff7c)this['_held']=null;_0x583119();};}return _0x322fcf;};let _0x152722;try{_0x152722=this[_0x2f8578(0x136)]['db'][_0x2f8578(0x24f)](_0x52bd02);}catch(_0x4237bb){_0x152722=Promise[_0x2f8578(0xf2)](_0x4237bb);}(!_0x152722||typeof _0x152722['then']!==_0x2f8578(0x18c))&&(this[_0x2f8578(0xdb)]++,!this['_nestedWarned']&&(this[_0x2f8578(0x14e)]=!![],console[_0x2f8578(0x26f)](_0x2f8578(0x185)+(this[_0x2f8578(0x136)]?.[_0x2f8578(0x178)]??'?')+_0x2f8578(0x17b))),_0x152722=Promise[_0x2f8578(0x1ce)](_0x152722));const _0xbeb51b=()=>{if(_0x280a50)_0x280a50();};_0x152722[_0x2f8578(0xda)](_0xbeb51b,_0xbeb51b),this[_0x2f8578(0x1f7)][_0x2f8578(0x25e)](_0x152722),this[_0x2f8578(0x18d)][_0x2f8578(0x17a)](_0x152722,_0x26bc17);const _0x33e2a0=()=>{const _0x4b163a=_0x2f8578;this[_0x4b163a(0x1f7)][_0x4b163a(0x2aa)](_0x152722),this[_0x4b163a(0x18d)][_0x4b163a(0x2aa)](_0x152722),this[_0x4b163a(0x18a)]++,this[_0x4b163a(0x1ec)]--;this['_bpWaiters']['length']&&this['_outstanding']<this[_0x4b163a(0x111)]&&this['_bpWaiters']['shift']()();if(this['_durs'][_0x4b163a(0x1a0)](_0x1739b4['now']()-_0x26bc17)>0x100)this['_durs'][_0x4b163a(0x276)]();if(this[_0x4b163a(0x2ac)][_0x4b163a(0x1a0)](_0x1739b4[_0x4b163a(0x24a)]())>0x800)this[_0x4b163a(0x2ac)][_0x4b163a(0x276)]();};_0x152722[_0x2f8578(0xda)](_0x33e2a0,_0x33e2a0);try{return await _0x152722;}finally{if(_0x22ee90)_0x22ee90[_0x2f8578(0x196)]();}}[_0x44635e(0x2cf)](){const _0x5e438b=_0x44635e,_0x120003=_0x1739b4[_0x5e438b(0x24a)]();let _0x33bfc7=0x0;for(const _0x26d40c of this['_enqueuedAt'][_0x5e438b(0x2e6)]()){const _0x5f2ef1=_0x120003-_0x26d40c;if(_0x5f2ef1>_0x33bfc7)_0x33bfc7=_0x5f2ef1;}let _0x5668f9=0x0;for(let _0x3a2ba8=this[_0x5e438b(0x2ac)][_0x5e438b(0x17e)]-0x1;_0x3a2ba8>=0x0;_0x3a2ba8--){if(_0x120003-this[_0x5e438b(0x2ac)][_0x3a2ba8]>0x3e8)break;_0x5668f9++;}let _0x20b527=0x0;if(this['_durs'][_0x5e438b(0x17e)]){const _0x2dcafc=[...this[_0x5e438b(0x1f4)]]['sort']((_0x14b21d,_0x37f6d2)=>_0x14b21d-_0x37f6d2);_0x20b527=_0x2dcafc[Math[_0x5e438b(0x22d)](_0x2dcafc[_0x5e438b(0x17e)]-0x1,Math[_0x5e438b(0x27a)](_0x2dcafc[_0x5e438b(0x17e)]*0.99))];}return{'depth':this[_0x5e438b(0x1f7)][_0x5e438b(0x2e3)],'oldestPendingMs':Math[_0x5e438b(0x24b)](_0x33bfc7),'committed':this[_0x5e438b(0x18a)],'commitsPerSec':_0x5668f9,'commitP99Ms':Math[_0x5e438b(0x24b)](_0x20b527),'parkedNow':this[_0x5e438b(0x2ab)]['length'],'parkedTotal':this[_0x5e438b(0x29a)],'highWater':this[_0x5e438b(0x111)]};}[_0x44635e(0x2c8)](){const _0x419b3f=_0x44635e,_0x4d11f7=_0x1739b4[_0x419b3f(0x24a)]();return[...this[_0x419b3f(0x18d)][_0x419b3f(0x2e6)]()][_0x419b3f(0x173)](_0x475ac3=>Math[_0x419b3f(0x24b)](_0x4d11f7-_0x475ac3))[_0x419b3f(0x101)]((_0x169f32,_0x1bd34f)=>_0x1bd34f-_0x169f32);}[_0x44635e(0x17c)](){const _0x576d3f=_0x44635e;this['_closed']=!![];for(const _0x55126c of this['_bpWaiters'][_0x576d3f(0x142)](0x0))_0x55126c();}async[_0x44635e(0x180)](){const _0x21c1e2=_0x44635e;let _0xf7c9b6=0x0;while(this[_0x21c1e2(0x1f7)][_0x21c1e2(0x2e3)]&&_0xf7c9b6++<0x3e8){await Promise[_0x21c1e2(0x138)]([...this['_inflight']]);}}async[_0x44635e(0x170)](_0x1f96e0,_0x461297,_0x26cc47,_0x2f1bad){const _0x339f56=_0x44635e;return this[_0x339f56(0x285)](()=>{const _0x37b012=_0x339f56;if(_0x2f1bad===undefined)_0x1f96e0[_0x37b012(0x156)](_0x461297,_0x26cc47);else _0x1f96e0[_0x37b012(0x156)](_0x461297,_0x26cc47,_0x2f1bad);},_0x339f56(0x2d7));}async[_0x44635e(0x2de)](_0x5ed422,_0x47d4f9){const _0x507850=_0x44635e;return this[_0x507850(0x285)](()=>_0x5ed422[_0x507850(0x20c)](_0x47d4f9),_0x507850(0xae));}}async function _0x18823b(_0x48e0c8,_0x5f526b){const _0x103c91=_0x44635e;if(_0x5f526b==null)_0x5f526b=Math['max'](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x7bbf3f=_0x48e0c8?.['flushed'];if(!_0x7bbf3f||typeof _0x7bbf3f[_0x103c91(0xda)]!==_0x103c91(0x18c))return;await Promise[_0x103c91(0xd7)]([Promise['resolve'](_0x7bbf3f)[_0x103c91(0x230)](()=>{}),new Promise(_0x529b8c=>{const _0x2b7d58=_0x103c91,_0xd62b10=setTimeout(_0x529b8c,_0x5f526b);if(_0xd62b10[_0x2b7d58(0x13e)])_0xd62b10['unref']();})]);}catch{}}function _0x18651e(_0x45dbd6){const _0x452a68=_0x44635e;if(_0x52fb54)return Promise[_0x452a68(0x1ce)]();const _0x5a93f5=_0x45dbd6?.[_0x452a68(0x121)];return _0x5a93f5&&typeof _0x5a93f5[_0x452a68(0xda)]===_0x452a68(0x18c)?_0x5a93f5:Promise['resolve']();}const _0x46f4df=Math[_0x44635e(0x2bc)](0x1,Math[_0x44635e(0x27a)](Number(process.env.UV_THREADPOOL_SIZE))||0x4),_0x1b08c2=Math[_0x44635e(0x2bc)](0x1,_0x46f4df-0x2);let _0x5be501=0x0;const _0x122216=[];async function _0x2e0bae(_0x4d949b){const _0x41b3d2=_0x44635e;if(_0x5be501<_0x1b08c2)_0x5be501++;else await new Promise(_0x33b8fb=>_0x122216[_0x41b3d2(0x1a0)](_0x33b8fb));try{return await _0x4d949b();}finally{const _0x21f502=_0x122216[_0x41b3d2(0x276)]();if(_0x21f502)_0x21f502();else _0x5be501--;}}return okdbWriter[_0x44635e(0x16f)]=_0x460fa7,okdbWriter['exports'][_0x44635e(0x2b4)]=_0x2e0bae,okdbWriter[_0x44635e(0x16f)][_0x44635e(0x1f8)]=_0x1b08c2,okdbWriter[_0x44635e(0x16f)]['flushLmdb']=_0x18823b,okdbWriter[_0x44635e(0x16f)][_0x44635e(0x121)]=_0x18651e,okdbWriter[_0x44635e(0x16f)]['SYNC_COMMITS']=_0x52fb54,okdbWriter['exports'];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x845a12=_0x5e06fa;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x389a49=require$$0$3,{clampTimerDelay:_0x10ffdb}=requireOkdbTimers(),{SYNC_COMMITS:_0x52c0f3}=requireOkdbWriter(),_0x497627=_0x845a12(0x2be);class _0x260cdf{constructor(_0x2c9e0f,_0x4d25c4,_0x5e9f19){const _0x46554a=_0x845a12;this[_0x46554a(0x211)]=_0x2c9e0f,this['_key']=_0x4d25c4,this[_0x46554a(0x15f)]=_0x5e9f19,this[_0x46554a(0x11a)]=![],this[_0x46554a(0x2e4)]=null,this[_0x46554a(0x2e7)]=null;}['isHeld'](){const _0xf34c5d=_0x845a12;if(this[_0xf34c5d(0x11a)])return![];try{const _0x3aa289=this[_0xf34c5d(0x211)][_0xf34c5d(0x2ae)]()['get'](this[_0xf34c5d(0x269)]);if(!_0x3aa289||_0x3aa289[_0xf34c5d(0x187)]!==this[_0xf34c5d(0x15f)])return![];const _0x57aac2=_0x3aa289['updatedAt']??_0x3aa289[_0xf34c5d(0x187)];if(_0x57aac2+_0x3aa289['ttlMs']<Date[_0xf34c5d(0x24a)]())return![];return!![];}catch{return!this[_0xf34c5d(0x11a)];}}['holder'](){const _0x28cef3=_0x845a12;if(this[_0x28cef3(0x11a)])return null;try{return this[_0x28cef3(0x211)][_0x28cef3(0x2ae)]()[_0x28cef3(0xec)](this[_0x28cef3(0x269)])??null;}catch{return null;}}async[_0x845a12(0xe2)](_0x195a06){const _0x391c48=_0x845a12;if(this['_released'])return;try{if(this[_0x391c48(0x211)][_0x391c48(0x2a7)]())return;const _0x342815=this[_0x391c48(0x211)][_0x391c48(0x2ae)]()[_0x391c48(0xec)](this[_0x391c48(0x269)]);if(!_0x342815||_0x342815[_0x391c48(0x187)]!==this[_0x391c48(0x15f)])return;if(_0x52c0f3)this[_0x391c48(0x211)][_0x391c48(0x2ae)]()[_0x391c48(0x156)](this['_key'],{..._0x342815,'ttlMs':_0x342815[_0x391c48(0x1bd)]+_0x195a06});else await this['_lock'][_0x391c48(0x2ae)]()['put'](this['_key'],{..._0x342815,'ttlMs':_0x342815[_0x391c48(0x1bd)]+_0x195a06});}catch{}}async[_0x845a12(0x1e8)](){const _0x1ecf35=_0x845a12;if(this['_released'])return;if(this[_0x1ecf35(0x2e7)])try{await this[_0x1ecf35(0x2e7)];}catch{}clearInterval(this[_0x1ecf35(0x2e4)]),this[_0x1ecf35(0x2e4)]=null,this['_released']=!![];try{if(this[_0x1ecf35(0x211)][_0x1ecf35(0x2a7)]())return;const _0x56bd85=this['_lock']['_db']()[_0x1ecf35(0xec)](this[_0x1ecf35(0x269)]);if(_0x56bd85&&_0x56bd85[_0x1ecf35(0x187)]===this[_0x1ecf35(0x15f)]){if(_0x52c0f3)this['_lock'][_0x1ecf35(0x2ae)]()[_0x1ecf35(0x20c)](this[_0x1ecf35(0x269)]);else await this['_lock'][_0x1ecf35(0x2ae)]()[_0x1ecf35(0x2de)](this['_key']);}}catch{}}[_0x845a12(0xaa)](_0x3b5373,_0x58b8a0){const _0x44ec45=_0x845a12,_0x23591d=_0x10ffdb(_0x58b8a0??Math[_0x44ec45(0x27a)](_0x3b5373/0x3));this[_0x44ec45(0x2e4)]=setInterval(()=>{if(this['_released'])return;this['_heartbeatInFlight']=((async()=>{const _0x2cd5e5=_0x5881;try{if(this[_0x2cd5e5(0x211)][_0x2cd5e5(0x2a7)]())return;const _0x3f14dd=this['_lock']['_db']()[_0x2cd5e5(0xec)](this[_0x2cd5e5(0x269)]);if(!_0x3f14dd||_0x3f14dd[_0x2cd5e5(0x187)]!==this[_0x2cd5e5(0x15f)]){this['_released']=!![],clearInterval(this['_heartbeatTimer']),this[_0x2cd5e5(0x2e4)]=null;return;}if(_0x52c0f3)this['_lock'][_0x2cd5e5(0x2ae)]()[_0x2cd5e5(0x156)](this[_0x2cd5e5(0x269)],{..._0x3f14dd,'updatedAt':Date[_0x2cd5e5(0x24a)]()});else await this[_0x2cd5e5(0x211)][_0x2cd5e5(0x2ae)]()[_0x2cd5e5(0x170)](this[_0x2cd5e5(0x269)],{..._0x3f14dd,'updatedAt':Date[_0x2cd5e5(0x24a)]()});}catch{}this[_0x2cd5e5(0x2e7)]=null;})());},_0x23591d);if(this['_heartbeatTimer']['unref'])this[_0x44ec45(0x2e4)][_0x44ec45(0x13e)]();}}class _0x2bb68f{constructor(_0x327b19,{namespace:_0x3da95a,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x5b48be=_0x845a12;this[_0x5b48be(0x242)]=_0x327b19,this[_0x5b48be(0x1be)]=_0x3da95a,this['ttlMs']=ttlMs,this[_0x5b48be(0x21b)]=heartbeatMs,this['_lockDb']=null;}[_0x845a12(0x2ae)](){const _0x54ca99=_0x845a12;return this['_assertUsable'](),(!this['_lockDb']||this['_lockDbOf']!==this[_0x54ca99(0x242)])&&(this['_lockDb']=this['_rawDb'][_0x54ca99(0x254)](_0x497627,{'dupSort':![]}),this[_0x54ca99(0xf5)]=this[_0x54ca99(0x242)]),this[_0x54ca99(0x297)];}[_0x845a12(0x115)](){const _0x14fee1=_0x845a12;return this[_0x14fee1(0x1bf)](),(!this['_wantDbHandle']||this[_0x14fee1(0x203)]!==this[_0x14fee1(0x242)])&&(this[_0x14fee1(0xee)]=this[_0x14fee1(0x242)]['openDB'](_0x497627+':want',{'dupSort':![]}),this[_0x14fee1(0x203)]=this[_0x14fee1(0x242)]),this[_0x14fee1(0xee)];}[_0x845a12(0x2a7)](){const _0x386be2=_0x845a12,_0x48bc9e=this[_0x386be2(0x242)]?.[_0x386be2(0x2cf)];return _0x48bc9e===_0x386be2(0x27d)||_0x48bc9e==='closed';}[_0x845a12(0x1bf)](){const _0x49cadb=_0x845a12;if(this[_0x49cadb(0x2a7)]())throw new Error(_0x49cadb(0x12d));}[_0x845a12(0x269)](_0x97de4f){const _0x38436e=_0x845a12;return this[_0x38436e(0x1be)]+':'+_0x97de4f;}['signalWant'](_0x10c1e6){const _0x523572=_0x845a12;try{if(this[_0x523572(0x2a7)]())return;_0x52c0f3?this[_0x523572(0x115)]()[_0x523572(0x156)](this[_0x523572(0x269)](_0x10c1e6),Date[_0x523572(0x24a)]()):this[_0x523572(0x115)]()[_0x523572(0x170)](this['_key'](_0x10c1e6),Date[_0x523572(0x24a)]())?.[_0x523572(0x230)]?.(()=>{});}catch{}}[_0x845a12(0x162)](_0x2108bd,_0x507b51=0x3e8){const _0xd0d138=_0x845a12;try{const _0x3c4c91=this[_0xd0d138(0x115)]()[_0xd0d138(0xec)](this[_0xd0d138(0x269)](_0x2108bd));return typeof _0x3c4c91==='number'&&Date[_0xd0d138(0x24a)]()-_0x3c4c91<_0x507b51;}catch{return![];}}['_isStale'](_0x2846ed){const _0xd15cd2=_0x845a12,_0x1f7345=_0x2846ed[_0xd15cd2(0xc7)]??_0x2846ed['acquiredAt'];return _0x1f7345+_0x2846ed[_0xd15cd2(0x1bd)]<Date['now']();}static['_holderDead'](_0x5539b0){const _0x21988d=_0x845a12,_0x383a4e=_0x5539b0?.[_0x21988d(0x27b)];if(!_0x383a4e||typeof _0x383a4e[_0x21988d(0x11d)]!==_0x21988d(0x2a4))return![];if(_0x383a4e['hostname']!==_0x389a49[_0x21988d(0x165)]())return![];if(_0x383a4e[_0x21988d(0x11d)]===process['pid'])return![];try{return process[_0x21988d(0x209)](_0x383a4e['pid'],0x0),![];}catch(_0x27d8dd){return _0x27d8dd['code']===_0x21988d(0x1de);}}async[_0x845a12(0x28f)](_0x374cd6,_0x52813a={},_0x5c30d4={}){const _0x5cf27d=_0x845a12,_0x5cbf3a=this['_key'](_0x374cd6),_0x239cad=_0x5c30d4[_0x5cf27d(0x1bd)]??this['ttlMs'],_0x1908c6=Date[_0x5cf27d(0x24a)](),_0x3d9c84={'holder':{'pid':process[_0x5cf27d(0x11d)],'hostname':_0x389a49['hostname'](),..._0x52813a},'acquiredAt':_0x1908c6,'updatedAt':_0x1908c6,'ttlMs':_0x239cad};let _0x26c417=![],_0x5c7bfc=null;if(this[_0x5cf27d(0x2a7)]())return{'acquired':![],'handle':null,'current':null};try{const _0x11dc9d=()=>{const _0x486264=_0x5cf27d,_0x280337=this[_0x486264(0x2ae)]()[_0x486264(0xec)](_0x5cbf3a);if(_0x280337&&!this[_0x486264(0x231)](_0x280337)&&!_0x2bb68f[_0x486264(0x105)](_0x280337)){const _0x101274=_0x52813a[_0x486264(0x10d)]!=null&&_0x280337[_0x486264(0x27b)][_0x486264(0x11d)]===process['pid']&&_0x280337[_0x486264(0x27b)][_0x486264(0x10d)]===_0x52813a[_0x486264(0x10d)];if(!_0x101274){_0x26c417=![],_0x5c7bfc=_0x280337;return;}_0x3d9c84[_0x486264(0x187)]<=_0x280337[_0x486264(0x187)]&&(_0x3d9c84[_0x486264(0x187)]=_0x280337[_0x486264(0x187)]+0x1,_0x3d9c84[_0x486264(0xc7)]=_0x3d9c84[_0x486264(0x187)]);}this[_0x486264(0x2ae)]()[_0x486264(0x170)](_0x5cbf3a,_0x3d9c84),_0x26c417=!![],_0x5c7bfc=_0x3d9c84;};if(_0x52c0f3)this[_0x5cf27d(0x2ae)]()[_0x5cf27d(0x2c6)](_0x11dc9d);else await this[_0x5cf27d(0x2ae)]()[_0x5cf27d(0x24f)](_0x11dc9d);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x26c417)return{'acquired':![],'handle':null,'current':_0x5c7bfc};const _0x2529bb=new _0x260cdf(this,_0x5cbf3a,_0x3d9c84[_0x5cf27d(0x187)]);return _0x2529bb['_startHeartbeat'](_0x239cad,this[_0x5cf27d(0x21b)]),{'acquired':!![],'handle':_0x2529bb,'current':_0x5c7bfc};}[_0x845a12(0x1cf)](_0x5e9456){const _0x474ebe=_0x845a12;try{return this[_0x474ebe(0x2ae)]()['get'](this[_0x474ebe(0x269)](_0x5e9456))??null;}catch{return null;}}[_0x845a12(0x1b4)](){const _0x5f5294=_0x845a12,_0x220bee=this['namespace']+':',_0x432413=[];try{for(const {key:_0x244164,value:_0x21cab9}of this[_0x5f5294(0x2ae)]()[_0x5f5294(0x1c1)]({'start':_0x220bee,'end':_0x220bee+'\xff'})){typeof _0x244164===_0x5f5294(0xa8)&&_0x244164[_0x5f5294(0x218)](_0x220bee)&&_0x432413[_0x5f5294(0x1a0)]({'id':_0x244164[_0x5f5294(0x272)](_0x220bee[_0x5f5294(0x17e)]),'entry':_0x21cab9});}}catch{}return _0x432413;}static['listAll'](_0x5159c3){const _0x579138=_0x845a12,_0x312d36=[];try{const _0x237cb8=_0x5159c3[_0x579138(0x254)](_0x497627,{'dupSort':![]});for(const {key:_0x1ea58c,value:_0x44d58a}of _0x237cb8['getRange']({})){if(typeof _0x1ea58c!=='string')continue;const _0x378b83=_0x1ea58c[_0x579138(0x2cb)](':');if(_0x378b83<0x1)continue;_0x312d36['push']({'namespace':_0x1ea58c[_0x579138(0x272)](0x0,_0x378b83),'id':_0x1ea58c['slice'](_0x378b83+0x1),'entry':_0x44d58a});}}catch{}return _0x312d36;}}return okdbLock={'OKDBLock':_0x2bb68f},okdbLock;}var version=_0x5e06fa(0x110),require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x3faefc=_0x5e06fa;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x5e8a97=require$$0$3,_0x4e3516=require$$1$1,_0x5706c7=require$$2,{LOOP:_0x23d241}=requireOkdbLoopMonitor(),{OKDBLock:_0x30fdf7}=requireOkdbLock(),{SYNC_COMMITS:_0x2e88d8}=requireOkdbWriter(),_0xc4a0da=_0x3faefc(0x2e9),_0x16f04c=_0x3faefc(0x1a4),_0x1f78d9=_0x3faefc(0x2d2),_0x1b0b76=_0x3faefc(0x168),_0x1f48f5=(_0x1383bc,_0x233411)=>_0x1383bc+':'+_0x233411,_0x394355=(_0x1e181f,_0xd2575d)=>_0x1e181f+'::'+_0xd2575d,_0x2204da=(_0x196df9,_0x5e80b)=>_0x196df9+'/'+_0x5e80b,_0xce4ca5=(_0x514bec,_0x5ce859)=>_0x514bec+'#'+_0x5ce859,_0x573832=_0x28e1b8=>{const _0x2a75eb=_0x3faefc;if(_0x28e1b8?.[_0x2a75eb(0x1a1)])return _0x28e1b8[_0x2a75eb(0x1a1)];const _0x3cb30e=_0x28e1b8?.[_0x2a75eb(0x253)];return typeof _0x3cb30e===_0x2a75eb(0xa8)&&_0x3cb30e['includes']('#')?_0x3cb30e[_0x2a75eb(0x272)](0x0,_0x3cb30e[_0x2a75eb(0x2cb)]('#')):_0x3cb30e;},_0x13a537=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x1f6e90=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x4b5ec0=_0x13a537*0x3,_0x1e5760=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x3faefc(0x2bc)](0x927c0,_0x4b5ec0*0x14),_0x53d213=[_0x3faefc(0x10e),_0x3faefc(0xed),_0x3faefc(0x1da),'processor:error',_0x3faefc(0xc8),_0x3faefc(0x221)];let _0x51077c=null;function _0x22a38e(){const _0x845372=_0x3faefc;if(_0x51077c==null)_0x51077c=Math[_0x845372(0x24b)]((Date['now']()-process[_0x845372(0x14f)]()*0x3e8)/0x3e8)*0x3e8;return _0x51077c;}function _0x3f99cb(_0x275b27){const _0x286524=_0x3faefc;if(process.env.OKDB_PROCESS_KILL==='off')return![];if(_0x275b27?.[_0x286524(0x118)]?.[_0x286524(0x2bd)]&&typeof _0x275b27[_0x286524(0x118)][_0x286524(0x2bd)]==='object'&&_0x275b27[_0x286524(0x118)][_0x286524(0x2bd)][_0x286524(0x209)]===![])return![];return!![];}function _0x56b357(_0x1e9a7d,_0x367863){const _0x257db4=_0x3faefc,_0xa3d395=!!_0x367863?.[_0x257db4(0x1a3)];switch(_0x1e9a7d){case _0x257db4(0x240):return{'controllable':_0xa3d395,'decommissionable':![],'killable':!![],'killConfirm':_0x257db4(0x197)};case'cli':case _0x257db4(0x26b):return{'controllable':_0xa3d395,'decommissionable':![],'killable':!![],'killConfirm':_0x257db4(0x11e)};case _0x257db4(0x1fe):return{'controllable':![],'decommissionable':![],'killable':![]};case _0x257db4(0xea):case'queue-worker':case _0x257db4(0x1d1):case _0x257db4(0x1b7):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x257db4(0x23b)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x33776{constructor(_0xcf4b7d){const _0x4739d4=_0x3faefc;this[_0x4739d4(0x1dc)]=_0xcf4b7d,this[_0x4739d4(0xb0)]=null,this['_desired']=null,this[_0x4739d4(0x116)]=new Map(),this[_0x4739d4(0x25c)]=null,this['_isWriter']=![],this['_isReader']=![],this[_0x4739d4(0x1af)]=_0x22a38e(),this[_0x4739d4(0x1db)]=_0x1f48f5(process[_0x4739d4(0x11d)],this['_processStartedAt']),this[_0x4739d4(0x171)]=_0x5706c7[_0x4739d4(0x1cb)]()['slice'](0x0,0x8),this[_0x4739d4(0x2c1)]=_0xce4ca5(this['_selfKey'],this[_0x4739d4(0x171)]),this['_startedAt']=Date[_0x4739d4(0x24a)](),this[_0x4739d4(0x14b)]=null,this['_supervisorKey']=null,this[_0x4739d4(0x2a3)]=null,this[_0x4739d4(0x175)]=null,this[_0x4739d4(0x103)]=null,this[_0x4739d4(0xb8)]=null,this[_0x4739d4(0x159)]=0x0,this[_0x4739d4(0x245)]={},this['_children']=new Map(),this[_0x4739d4(0x164)]=process['cpuUsage'](),this['_lastCpuAt']=Date[_0x4739d4(0x24a)](),this[_0x4739d4(0x123)]=0x0,this[_0x4739d4(0x250)]=new Map();}get[_0x3faefc(0x146)](){const _0x5c85b6=_0x3faefc;return this[_0x5c85b6(0x1db)];}get[_0x3faefc(0x108)](){return this['_rowKey'];}['_caps'](_0x2314e1,_0x79c352){const _0x3d7409=_0x3faefc,_0x5ceafd=_0x56b357(_0x2314e1,_0x79c352);if(_0x5ceafd[_0x3d7409(0x1a2)]&&!_0x3f99cb(this[_0x3d7409(0x1dc)]))return{..._0x5ceafd,'killable':![],'killConfirm':undefined};return _0x5ceafd;}[_0x3faefc(0xc4)](){return!!this['_statusEnv'];}[_0x3faefc(0x239)](_0x159a0f){const _0x48b9de=_0x3faefc;Object[_0x48b9de(0x174)](this['_ownMeta'],_0x159a0f||{});}[_0x3faefc(0x202)](_0x42af4a){const _0x4474f4=_0x3faefc;if(_0x42af4a)this[_0x4474f4(0x2a3)]=_0x42af4a;}[_0x3faefc(0x262)](_0x1a280f={}){const _0x5b9902=_0x3faefc;return this[_0x5b9902(0x1dc)][_0x5b9902(0x1d5)](_0x1a280f);}[_0x3faefc(0x161)](){const _0x2ab144=_0x3faefc,_0x7bc635={};let _0x532491=0x0,_0x3c6003=0x0;const _0x50ad80=new Set();for(const _0x497b66 of this[_0x2ab144(0x2a6)]()){_0x3c6003++;const _0x25a5b7=_0x497b66['processing'];if(!_0x25a5b7)continue;if(_0x25a5b7[_0x2ab144(0x23e)])_0x532491++;for(const _0x1f3395 of _0x25a5b7[_0x2ab144(0x1a3)]||[]){if(![_0x2ab144(0x157),_0x2ab144(0x2c9)][_0x2ab144(0x1a9)](_0x1f3395[_0x2ab144(0x220)]))continue;(_0x1f3395['state']===_0x2ab144(0x1c2)||_0x1f3395[_0x2ab144(0x29d)]===_0x2ab144(0x296))&&_0x1f3395[_0x2ab144(0x143)]&&_0x50ad80[_0x2ab144(0x25e)]((_0x1f3395['env']||_0x2ab144(0x201))+':'+_0x1f3395['cursorKey']);const _0x2016dc=_0x1f3395[_0x2ab144(0x136)]||'default';(_0x7bc635[_0x2016dc]||=[])['push']({..._0x1f3395,'env':_0x2016dc,'owner':{'pid':_0x497b66[_0x2ab144(0x11d)]??null,'kind':_0x497b66[_0x2ab144(0xb9)]??null}});}}for(const [_0x5be7e5,_0x5060af]of Object['entries'](_0x7bc635)){for(const _0x10adbb of _0x5060af){if(_0x10adbb[_0x2ab144(0x220)]===_0x2ab144(0x157)&&!_0x10adbb[_0x2ab144(0x1eb)]){const _0x3a2c01=_0x5be7e5+':'+(_0x10adbb['cursorKey']??'');if(!_0x50ad80[_0x2ab144(0xab)](_0x3a2c01))_0x10adbb[_0x2ab144(0x223)]=!![];}}}return{'envs':_0x7bc635,'policy':null,'participation':{'participating':_0x532491,'total':_0x3c6003},'source':_0x2ab144(0x102)};}['processorsView'](){const _0x30953c=_0x3faefc,_0x1f629b=_0x438142=>{const _0x362f95=_0x5881;if(_0x438142[_0x362f95(0x29d)]===_0x362f95(0x1c2)||_0x438142['state']==='building'||_0x438142['state']===_0x362f95(0x277))return 0x3;if(_0x438142[_0x362f95(0x1eb)])return 0x1;return 0x2;},_0x43cf73=new Map();for(const _0x25a4e9 of this[_0x30953c(0x2a6)]()){for(const _0xec1949 of _0x25a4e9[_0x30953c(0x106)]?.[_0x30953c(0x1a3)]||[]){const _0x145aad={..._0xec1949,'owner':{'pid':_0x25a4e9['pid']??null,'kind':_0x25a4e9[_0x30953c(0xb9)]??null,'host':_0x25a4e9[_0x30953c(0xfb)]??null}},_0x1a811c=_0xec1949['mode']==='single'?_0x30953c(0x1dd)+(_0xec1949['env']??'')+'::'+(_0xec1949['cursorKey']??_0xec1949[_0x30953c(0x22e)]??_0xec1949['id']):'inst:'+(_0x25a4e9['nodeKey']??_0x25a4e9['processKey']??'')+'::'+(_0xec1949[_0x30953c(0x136)]??'')+'::'+_0xec1949['id'],_0x37e89b=_0x43cf73[_0x30953c(0xec)](_0x1a811c);if(!_0x37e89b||_0x1f629b(_0x145aad)>_0x1f629b(_0x37e89b))_0x43cf73['set'](_0x1a811c,_0x145aad);}}return[..._0x43cf73[_0x30953c(0x2e6)]()];}[_0x3faefc(0xd2)](){const _0x5aac86=_0x3faefc,_0x3546f1=Date[_0x5aac86(0x24a)](),_0x318306=this['listNodes'](),_0x33389e=_0x58cc75=>Math[_0x5aac86(0x2bc)](0x0,Math['round']((_0x3546f1-(_0x58cc75[_0x5aac86(0x1ff)]||_0x3546f1))/0x3e8)),_0x15179f=_0x318306['find'](_0x32c567=>_0x32c567[_0x5aac86(0xb9)]===_0x5aac86(0x240)),_0xf30549=_0x318306['filter'](_0x2f584d=>_0x2f584d[_0x5aac86(0xb9)]==='http-server');if(_0x15179f||_0xf30549[_0x5aac86(0x17e)])return{'primary':_0x15179f?{'pid':_0x15179f[_0x5aac86(0x11d)],'uptime':_0x33389e(_0x15179f)}:null,'workers':_0xf30549['map'](_0x51c948=>({'pid':_0x51c948[_0x5aac86(0x11d)],'uptime':_0x33389e(_0x51c948)})),'workersConfigured':_0x15179f?.[_0x5aac86(0x1a8)]?.[_0x5aac86(0x292)]??_0xf30549[_0x5aac86(0x17e)],'mode':'cluster'};const _0x3bd38f=_0x318306[_0x5aac86(0x217)](_0x184276=>_0x184276[_0x5aac86(0xb9)]===_0x5aac86(0x23a)||_0x184276['kind']===_0x5aac86(0x26b)||_0x184276[_0x5aac86(0xb9)]===_0x5aac86(0x1fe)),_0x2b4113=_0x3bd38f?{'pid':_0x3bd38f[_0x5aac86(0x11d)],'uptime':_0x33389e(_0x3bd38f)}:{'pid':process['pid'],'uptime':Math[_0x5aac86(0x2bc)](0x0,Math[_0x5aac86(0x24b)](process[_0x5aac86(0x14f)]()))};return{'primary':_0x2b4113,'workers':[_0x2b4113],'workersConfigured':0x1,'mode':_0x5aac86(0x157)};}[_0x3faefc(0x264)](){const _0x43d82b=_0x3faefc;return this[_0x43d82b(0x131)]();}['treeView'](){const _0x2699c7=_0x3faefc,_0x3ede49=new Map();for(const _0x56ecd0 of this[_0x2699c7(0x131)]())_0x3ede49[_0x2699c7(0x17a)](_0x56ecd0['processKey'],{..._0x56ecd0,'children':[]});const _0x1b6edb=[];for(const _0x43469f of _0x3ede49['values']()){const _0x2038c1=_0x43469f[_0x2699c7(0x2a5)]?_0x3ede49[_0x2699c7(0xec)](_0x43469f[_0x2699c7(0x2a5)]):null;if(_0x2038c1&&_0x2038c1!==_0x43469f)_0x2038c1[_0x2699c7(0x148)][_0x2699c7(0x1a0)](_0x43469f);else _0x1b6edb[_0x2699c7(0x1a0)](_0x43469f);}const _0x4bf7a5=(_0xae704f,_0x2df507)=>_0xae704f[_0x2699c7(0xb9)]===_0x2df507[_0x2699c7(0xb9)]?(_0xae704f[_0x2699c7(0x11d)]||0x0)-(_0x2df507['pid']||0x0):(_0xae704f[_0x2699c7(0xb9)]??'')<(_0x2df507[_0x2699c7(0xb9)]??'')?-0x1:0x1,_0x5c8af8=_0x29e8a2=>{const _0xd811ba=_0x2699c7;_0x29e8a2[_0xd811ba(0x101)](_0x4bf7a5);for(const _0xaf54e4 of _0x29e8a2)if(_0xaf54e4[_0xd811ba(0x148)][_0xd811ba(0x17e)])_0x5c8af8(_0xaf54e4[_0xd811ba(0x148)]);};return _0x5c8af8(_0x1b6edb),_0x1b6edb;}[_0x3faefc(0x282)](_0x116212){const _0x40a9df=_0x3faefc;return this[_0x40a9df(0x131)]()[_0x40a9df(0x217)](_0x1c2929=>_0x1c2929['processKey']===_0x116212)??null;}[_0x3faefc(0x131)](_0x274932=Date[_0x3faefc(0x24a)]()){const _0x2ffbb6=_0x3faefc,_0x3b85ad=new Map();for(const _0x269d9d of this['listNodes']()){const _0x31623b=_0x573832(_0x269d9d);let _0xeb2c9b=_0x3b85ad['get'](_0x31623b);!_0xeb2c9b&&(_0xeb2c9b={'processKey':_0x31623b,'nodeKey':_0x31623b,'pid':_0x269d9d[_0x2ffbb6(0x11d)],'ppid':_0x269d9d[_0x2ffbb6(0xfe)]??null,'host':_0x269d9d['host']??null,'kind':_0x269d9d[_0x2ffbb6(0xb9)],'role':null,'supervisorKey':_0x269d9d[_0x2ffbb6(0x2a5)]??null,'slot':_0x269d9d[_0x2ffbb6(0x124)]??null,'slotKey':_0x269d9d[_0x2ffbb6(0x2c4)]??null,'caps':_0x269d9d[_0x2ffbb6(0x271)]??null,'lifecycle':_0x269d9d[_0x2ffbb6(0x19e)]??null,'uptime':Math[_0x2ffbb6(0x2bc)](0x0,Math[_0x2ffbb6(0x24b)]((_0x274932-(_0x269d9d[_0x2ffbb6(0x1ff)]||_0x274932))/0x3e8)),'startedAt':_0x269d9d[_0x2ffbb6(0x1ff)]??null,'meta':_0x269d9d[_0x2ffbb6(0x1a8)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x3b85ad['set'](_0x31623b,_0xeb2c9b));_0xeb2c9b[_0x2ffbb6(0x154)][_0x2ffbb6(0x1a0)]({'instanceId':_0x269d9d[_0x2ffbb6(0xbe)]??null,'role':_0x269d9d[_0x2ffbb6(0x119)]??null,'listenAddr':_0x269d9d[_0x2ffbb6(0x22b)]??null,'lifecycle':_0x269d9d['lifecycle']??null,'processing':_0x269d9d['processing']??null});if(!_0xeb2c9b[_0x2ffbb6(0x119)]&&_0x269d9d[_0x2ffbb6(0x119)])_0xeb2c9b[_0x2ffbb6(0x119)]=_0x269d9d[_0x2ffbb6(0x119)];if(!_0xeb2c9b[_0x2ffbb6(0x22b)]&&_0x269d9d[_0x2ffbb6(0x22b)])_0xeb2c9b['listenAddr']=_0x269d9d['listenAddr'];if(!_0xeb2c9b['processing']&&_0x269d9d[_0x2ffbb6(0x106)])_0xeb2c9b[_0x2ffbb6(0x106)]=_0x269d9d[_0x2ffbb6(0x106)];if(!_0xeb2c9b[_0x2ffbb6(0x1b3)]&&_0x269d9d[_0x2ffbb6(0x1b3)])_0xeb2c9b[_0x2ffbb6(0x1b3)]=_0x269d9d[_0x2ffbb6(0x1b3)];if(!_0xeb2c9b[_0x2ffbb6(0x21a)]&&_0x269d9d[_0x2ffbb6(0x21a)])_0xeb2c9b[_0x2ffbb6(0x21a)]=_0x269d9d[_0x2ffbb6(0x21a)];if(_0xeb2c9b['caps']==null&&_0x269d9d[_0x2ffbb6(0x271)])_0xeb2c9b['caps']=_0x269d9d[_0x2ffbb6(0x271)];if(_0x269d9d[_0x2ffbb6(0x215)]&&(!_0xeb2c9b['stats']||(_0x269d9d[_0x2ffbb6(0x215)]['at']??0x0)>(_0xeb2c9b[_0x2ffbb6(0x215)]['at']??0x0)))_0xeb2c9b['stats']=_0x269d9d['stats'];}return[..._0x3b85ad[_0x2ffbb6(0x2e6)]()];}[_0x3faefc(0x19d)](){const _0x141ab6=_0x3faefc,_0x27aabf=[],_0x55bc2c={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x278066 of this[_0x141ab6(0x131)]()){_0x27aabf[_0x141ab6(0x1a0)]({'processKey':_0x278066['processKey'],'kind':_0x278066[_0x141ab6(0xb9)],'pid':_0x278066[_0x141ab6(0x11d)],'supervisorKey':_0x278066[_0x141ab6(0x2a5)],'meta':_0x278066[_0x141ab6(0x1a8)]??null,'uptime':_0x278066['uptime'],'stats':_0x278066['stats']??null}),_0x55bc2c[_0x141ab6(0x2bd)]++;if(_0x278066[_0x141ab6(0x215)]){_0x55bc2c[_0x141ab6(0xd5)]+=_0x278066[_0x141ab6(0x215)][_0x141ab6(0xd5)]||0x0,_0x55bc2c[_0x141ab6(0x1f2)]+=(_0x278066[_0x141ab6(0x215)]['heapUsed']||0x0)+(_0x278066['stats']['threads']?.['heapUsed']||0x0);const _0x2c585f=_0x278066[_0x141ab6(0x215)][_0x141ab6(0x25f)];_0x2c585f&&(_0x55bc2c[_0x141ab6(0x25f)][_0x141ab6(0x235)]+=_0x2c585f[_0x141ab6(0x235)]||0x0,_0x55bc2c[_0x141ab6(0x25f)][_0x141ab6(0x293)]+=_0x2c585f['sandbox']||0x0,_0x55bc2c['threads']['busy']+=_0x2c585f['busy']||0x0);}}return{'totals':_0x55bc2c,'nodes':_0x27aabf};}async[_0x3faefc(0x2e5)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x19eb2f=_0x3faefc;this[_0x19eb2f(0x238)]=this[_0x19eb2f(0x238)]||!!writer,this[_0x19eb2f(0x2ea)]=this[_0x19eb2f(0x2ea)]||!!reader,this[_0x19eb2f(0x14b)]=kind||this[_0x19eb2f(0x14b)]||(_0x4e3516[_0x19eb2f(0x10a)]?'http-server':_0x19eb2f(0x23a)),this[_0x19eb2f(0x113)]=supervisorKey??this[_0x19eb2f(0x113)],this[_0x19eb2f(0x2a3)]=listenAddr??this[_0x19eb2f(0x2a3)],this['_ensureDesired'](),await this['_migrateVocab']();if(!writer&&!reader)return null;if(!this[_0x19eb2f(0xb0)]){const _0x11337c=await this[_0x19eb2f(0x1dc)][_0x19eb2f(0x166)](_0xc4a0da,{'sync':![],'durability':'fast'});await _0x11337c[_0x19eb2f(0x1c3)](_0x16f04c),this['_statusEnv']=_0x11337c;}return this[_0x19eb2f(0xb0)];}[_0x3faefc(0x15d)](){const _0x9780d4=_0x3faefc;return this[_0x9780d4(0x1ca)]!==this[_0x9780d4(0xb0)]&&(this[_0x9780d4(0x1ca)]=this[_0x9780d4(0xb0)],this[_0x9780d4(0x144)]=this[_0x9780d4(0xb0)][_0x9780d4(0x2ba)](_0x16f04c)[_0x9780d4(0xb3)]),this[_0x9780d4(0x144)];}[_0x3faefc(0x1d3)](_0x4349e2){const _0x37c67e=_0x3faefc;if(_0x2e88d8)return this[_0x37c67e(0x15d)]()[_0x37c67e(0x156)](_0x4349e2[_0x37c67e(0x253)],_0x4349e2,0x1);const _0x27e034=this[_0x37c67e(0x15d)]()[_0x37c67e(0x170)](_0x4349e2[_0x37c67e(0x253)],_0x4349e2,0x1);if(_0x27e034&&typeof _0x27e034[_0x37c67e(0xda)]===_0x37c67e(0x18c))_0x27e034['then'](undefined,()=>{});return _0x27e034;}[_0x3faefc(0x1b6)](_0x25f449){const _0x1254f3=_0x3faefc;return this[_0x1254f3(0x15d)]()[_0x1254f3(0x156)](_0x25f449['nodeKey'],_0x25f449,0x1);}[_0x3faefc(0x273)](_0x276bdc){const _0x521e1e=_0x3faefc;if(_0x2e88d8)try{return this[_0x521e1e(0x15d)]()[_0x521e1e(0x20c)](_0x276bdc);}catch{return![];}const _0x31b917=this['_nodeDb']()[_0x521e1e(0x2de)](_0x276bdc);if(_0x31b917&&typeof _0x31b917['then']===_0x521e1e(0x18c))_0x31b917[_0x521e1e(0xda)](undefined,()=>{});return _0x31b917;}async[_0x3faefc(0x120)](_0x2cac4f){const _0x153eec=_0x3faefc;if(!this[_0x153eec(0xb0)]||!this[_0x153eec(0x238)]||!_0x2cac4f?.['nodeKey'])return;return this[_0x153eec(0x1d3)](_0x2cac4f);}async[_0x3faefc(0x1fb)](_0x396e97){const _0x11fddd=_0x3faefc;if(!this[_0x11fddd(0xb0)]||!this[_0x11fddd(0x238)]||!_0x396e97)return;const _0xef3489=_0x396e97[_0x11fddd(0x1a9)]('#'),_0x787e39=[];for(const {key:_0x1f7a53}of this[_0x11fddd(0xb0)][_0x11fddd(0x1c1)](_0x16f04c)){if(_0x1f7a53===_0x396e97||!_0xef3489&&typeof _0x1f7a53==='string'&&_0x1f7a53[_0x11fddd(0x218)](_0x396e97+'#'))_0x787e39[_0x11fddd(0x1a0)](_0x1f7a53);}for(const _0x2328d5 of _0x787e39){try{this['_nodeDb']()[_0x11fddd(0x20c)](_0x2328d5);}catch{}}}[_0x3faefc(0x1c0)](_0x2ecd36){const _0x206dba=_0x3faefc;if(typeof _0x2ecd36?.[_0x206dba(0x11d)]!==_0x206dba(0x2a4))return![];if(_0x2ecd36[_0x206dba(0xfb)]!==_0x5e8a97[_0x206dba(0x165)]())return![];if(_0x2ecd36[_0x206dba(0x11d)]===process[_0x206dba(0x11d)])return![];if(_0x2ecd36[_0x206dba(0x16e)]!=null&&_0x2ecd36['expiresAt']<Date[_0x206dba(0x24a)]()-_0x1e5760)return!![];try{return process[_0x206dba(0x209)](_0x2ecd36['pid'],0x0),![];}catch(_0x59750f){return _0x59750f[_0x206dba(0x2d9)]===_0x206dba(0x1de);}}[_0x3faefc(0x2a6)](){const _0x2dab70=_0x3faefc;if(!this[_0x2dab70(0xb0)])return[];try{this[_0x2dab70(0xb0)]['db']?.[_0x2dab70(0x149)]?.();}catch{}const _0x3722a7=Date['now'](),_0x46933b=_0x5e8a97[_0x2dab70(0x165)](),_0x22fad4=[];for(const {value:_0x1d378f}of this[_0x2dab70(0xb0)][_0x2dab70(0x1c1)](_0x16f04c)){if(!_0x1d378f)continue;let _0x127daa=null;_0x1d378f[_0x2dab70(0xfb)]===_0x46933b&&typeof _0x1d378f[_0x2dab70(0x11d)]===_0x2dab70(0x2a4)&&(_0x127daa=!this[_0x2dab70(0x1c0)](_0x1d378f));if(_0x127daa===![])continue;const _0x36b82d=_0x1d378f[_0x2dab70(0x16e)]==null||_0x1d378f[_0x2dab70(0x16e)]>=_0x3722a7;if(_0x127daa===!![]||_0x36b82d)_0x22fad4['push'](_0x1d378f);}return _0x22fad4;}async[_0x3faefc(0xbb)](_0x549740=0x0){const _0x2a8760=_0x3faefc;if(!this[_0x2a8760(0xb0)]||!this[_0x2a8760(0x238)])return;const _0x393a83=Date[_0x2a8760(0x24a)]()-_0x549740,_0x54e37d=new Set(),_0x301290=[],_0x306507=_0x5e8a97[_0x2a8760(0x165)](),_0x89c1a5=require$$6[_0x2a8760(0x1e5)];for(const {key:_0x2c0326,value:_0x531c1c}of this[_0x2a8760(0xb0)]['getRange'](_0x16f04c)){if(!_0x531c1c)continue;const _0x280024=_0x531c1c[_0x2a8760(0xfb)]===_0x306507&&typeof _0x531c1c[_0x2a8760(0x11d)]==='number',_0x4b3251=_0x280024?this[_0x2a8760(0x1c0)](_0x531c1c):_0x531c1c[_0x2a8760(0x16e)]!=null&&_0x531c1c[_0x2a8760(0x16e)]<_0x393a83;if(_0x4b3251)_0x301290[_0x2a8760(0x1a0)](_0x2c0326);else{_0x54e37d[_0x2a8760(0x25e)](_0x573832(_0x531c1c)??_0x2c0326);if(_0x531c1c['version']&&_0x531c1c[_0x2a8760(0x1e5)]!==_0x89c1a5){if(!this['_versionSkewWarned'])this[_0x2a8760(0x288)]=new Set();!this[_0x2a8760(0x288)][_0x2a8760(0xab)](_0x531c1c[_0x2a8760(0x1e5)])&&(this[_0x2a8760(0x288)]['add'](_0x531c1c['version']),this['okdb'][_0x2a8760(0x2cd)]?.[_0x2a8760(0x26f)]?.('process\x20'+(_0x531c1c['pid']??'?')+'\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20'+_0x531c1c[_0x2a8760(0x1e5)]+_0x2a8760(0x176)+_0x89c1a5+_0x2a8760(0x257)+'mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.',{'feature':_0x2a8760(0x1cc)}));}}}for(const _0x21bc21 of _0x301290)this['_removeRowAsync'](_0x21bc21);if(this[_0x2a8760(0x100)]()){const _0x48d4d9=[];for(const {key:_0x3c1a62}of this['listDesired']('node')){if(!_0x54e37d[_0x2a8760(0xab)](_0x3c1a62)){if(_0x2e88d8)try{this[_0x2a8760(0x2a1)][_0x2a8760(0x20c)](_0x2a8760(0x16a)+_0x3c1a62);}catch{}else _0x48d4d9['push'](this['_desired'][_0x2a8760(0x2de)]('node/'+_0x3c1a62));}}if(_0x48d4d9[_0x2a8760(0x17e)])await Promise[_0x2a8760(0x138)](_0x48d4d9);}}[_0x3faefc(0x213)](_0x1e3773=null){const _0x55f6be=_0x3faefc;if(this[_0x55f6be(0x175)])return;if(!this['_isWriter']||!this[_0x55f6be(0xb0)]){this[_0x55f6be(0x1dc)]?.[_0x55f6be(0x2cd)]?.['warn']?.(_0x55f6be(0x1ed)+this[_0x55f6be(0x238)]+_0x55f6be(0xc0)+!!this[_0x55f6be(0xb0)]+_0x55f6be(0x244),{'feature':_0x55f6be(0x2bd)});return;}this['_onTick']=_0x1e3773,this[_0x55f6be(0x103)]=()=>this[_0x55f6be(0x265)]();for(const _0x5a8fa3 of _0x53d213)this['okdb'][_0x55f6be(0x1f9)]['on'](_0x5a8fa3,this[_0x55f6be(0x103)]);this[_0x55f6be(0x1d0)]();const _0x171b26=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x13a537;this[_0x55f6be(0x175)]=setInterval(()=>{const _0x2a3adf=_0x55f6be;if(this[_0x2a3adf(0xb8)])try{this[_0x2a3adf(0xb8)]();}catch{}this[_0x2a3adf(0x1d0)](),this[_0x2a3adf(0xbb)]()[_0x2a3adf(0x230)](()=>{});},_0x171b26);if(this[_0x55f6be(0x175)][_0x55f6be(0x13e)])this[_0x55f6be(0x175)][_0x55f6be(0x13e)]();}[_0x3faefc(0x265)](){const _0x100c77=_0x3faefc;if(!this['_isWriter']||!this['_statusEnv'])return;if(Date[_0x100c77(0x24a)]()-this[_0x100c77(0x159)]<_0x1f6e90)return;this[_0x100c77(0x1d0)]();}[_0x3faefc(0x1d0)](){const _0x19fa38=_0x3faefc;if(!this[_0x19fa38(0x238)]||!this[_0x19fa38(0xb0)])return;this[_0x19fa38(0x159)]=Date[_0x19fa38(0x24a)]();try{const _0x385e27=[this[_0x19fa38(0x133)]()];for(const _0x587bfd of this['_children'][_0x19fa38(0x2e6)]())_0x385e27[_0x19fa38(0x1a0)](this['_buildChildRow'](_0x587bfd));const _0x486889=_0x23d241['enabled']?_0x23d241[_0x19fa38(0x24a)]():0x0;for(const _0x354b8c of _0x385e27){try{this[_0x19fa38(0x1b6)](_0x354b8c),this[_0x19fa38(0x19c)]=![];}catch(_0x5a4fa4){!this[_0x19fa38(0x19c)]&&(this[_0x19fa38(0x19c)]=!![],this[_0x19fa38(0x1dc)]?.[_0x19fa38(0x2cd)]?.[_0x19fa38(0x26f)]?.(_0x19fa38(0x16d)+_0x5a4fa4[_0x19fa38(0x25d)],{'feature':_0x19fa38(0x2bd)}));}}if(_0x23d241[_0x19fa38(0xcf)])_0x23d241[_0x19fa38(0x1d2)]('registry-publish',_0x23d241[_0x19fa38(0x24a)]()-_0x486889,_0x19fa38(0xc1)+_0x385e27[_0x19fa38(0x17e)]+_0x19fa38(0x1ae));}catch(_0x24c84c){!this[_0x19fa38(0x19c)]&&(this['_publishFailWarned']=!![],this[_0x19fa38(0x1dc)]?.['log']?.[_0x19fa38(0x26f)]?.(_0x19fa38(0x16d)+_0x24c84c[_0x19fa38(0x25d)],{'feature':_0x19fa38(0x2bd)}));}}async[_0x3faefc(0x167)](){const _0x4175f6=_0x3faefc;if(this[_0x4175f6(0x103)]){for(const _0x484e6b of _0x53d213){try{this[_0x4175f6(0x1dc)][_0x4175f6(0x1f9)][_0x4175f6(0x191)](_0x484e6b,this[_0x4175f6(0x103)]);}catch{}}this['_onProcEvent']=null;}this[_0x4175f6(0x175)]&&(clearInterval(this[_0x4175f6(0x175)]),this[_0x4175f6(0x175)]=null);try{if(this['_statusEnv']&&this[_0x4175f6(0x238)])await this[_0x4175f6(0x1fb)](this[_0x4175f6(0x2c1)]);}catch{}}async[_0x3faefc(0x18e)](){const _0x4741f7=_0x3faefc;if(!this[_0x4741f7(0xb0)]||!this[_0x4741f7(0x238)])return;try{await this[_0x4741f7(0x1fb)](this[_0x4741f7(0x2c1)]);}catch{}try{const _0x5f1ea8=[];for(const {value:_0x4b00e2}of this['_statusEnv'][_0x4741f7(0x1c1)](_0x16f04c)){if(_0x4b00e2?.['ppid']===process[_0x4741f7(0x11d)]&&_0x4b00e2[_0x4741f7(0x253)])_0x5f1ea8[_0x4741f7(0x1a0)](_0x4b00e2[_0x4741f7(0x253)]);}for(const _0x27d7d8 of _0x5f1ea8){try{await this[_0x4741f7(0x1fb)](_0x27d7d8);}catch{}}}catch{}}async[_0x3faefc(0x26a)](){return this['putNode'](this['_buildOwnRow']());}async[_0x3faefc(0x2af)](_0x191c94){const _0x14f316=_0x3faefc;if(!this[_0x14f316(0xb0)]||!this[_0x14f316(0x238)])return;return this['putNode'](this[_0x14f316(0x2c5)](_0x191c94));}['_buildChildRow']({pid:_0x4fb122,startedAt:_0x3fab1a,kind:_0x50675d,supervisorKey:_0x4d1f14,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x3faefc(0xad),meta:meta=null,stats:stats=null}){const _0x1c31e3=_0x3faefc,_0x2789a2=Date[_0x1c31e3(0x24a)](),_0x4de7c6=_0x1f48f5(_0x4fb122,_0x3fab1a);return{'nodeKey':_0xce4ca5(_0x4de7c6,'0'),'processKey':_0x4de7c6,'instanceId':'0','pid':_0x4fb122,'startedAt':_0x3fab1a,'ppid':process['pid'],'host':_0x5e8a97[_0x1c31e3(0x165)](),'supervisorKey':_0x4d1f14,'slot':slot,'slotKey':slotKey,'kind':_0x50675d,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x2789a2,'expiresAt':_0x2789a2+_0x4b5ec0,'caps':this['_caps'](_0x50675d,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x3faefc(0x17f)](_0x1d801e){const _0x1cdf01=_0x3faefc;if(!_0x1d801e?.[_0x1cdf01(0x11d)])return null;const _0x2809ef=_0x1f48f5(_0x1d801e[_0x1cdf01(0x11d)],_0x1d801e[_0x1cdf01(0x1ff)]);this['_children'][_0x1cdf01(0x17a)](_0x2809ef,{..._0x1d801e,'supervisorKey':_0x1d801e[_0x1cdf01(0x2a5)]??this['_selfKey']});if(this[_0x1cdf01(0x238)])await this[_0x1cdf01(0x2af)](this[_0x1cdf01(0x252)][_0x1cdf01(0xec)](_0x2809ef))['catch']?.(()=>{});return _0x2809ef;}[_0x3faefc(0x222)](_0x1f16d7){const _0x17eaee=_0x3faefc;if(!_0x1f16d7)return;return this['_children'][_0x17eaee(0x2aa)](_0x1f16d7),this[_0x17eaee(0x1fb)](_0x1f16d7);}[_0x3faefc(0x195)](){const _0x5edaa3=_0x3faefc,_0x1b9ef4=Date[_0x5edaa3(0x24a)](),_0x122e58=process[_0x5edaa3(0x16c)](),_0x34265c=(_0x1b9ef4-this[_0x5edaa3(0x194)])*0x3e8;if(_0x34265c>=0x3d090){const _0x50edf3=_0x122e58[_0x5edaa3(0x10c)]-this[_0x5edaa3(0x164)]['user']+(_0x122e58[_0x5edaa3(0x1fd)]-this[_0x5edaa3(0x164)][_0x5edaa3(0x1fd)]),_0x4609f0=_0x5e8a97[_0x5edaa3(0x206)]()[_0x5edaa3(0x17e)]||0x1;this[_0x5edaa3(0x123)]=Math[_0x5edaa3(0x22d)](0x64,Math[_0x5edaa3(0x24b)](_0x50edf3/(_0x34265c*_0x4609f0)*0x64)),this[_0x5edaa3(0x172)]=Math[_0x5edaa3(0x24b)](_0x34265c/0x3e8),this[_0x5edaa3(0x164)]=_0x122e58,this[_0x5edaa3(0x194)]=_0x1b9ef4;}const _0x3c2ff8=process[_0x5edaa3(0xc2)](),_0x426aed=this[_0x5edaa3(0x250)]['size'];let _0x3658c4=0x0;if(_0x426aed>0x0){const _0x363840=[this[_0x5edaa3(0x1dc)],...this['okdb'][_0x5edaa3(0x139)]?.[_0x5edaa3(0x2e6)]?.()??[]];for(const _0x440f4c of _0x363840){const _0x933a99=_0x440f4c['functions']?.[_0x5edaa3(0xa6)];if(_0x933a99)_0x3658c4+=_0x933a99['liveThreadStats']['busy'];}}let _0x1a84f3=null;const _0x1873b8=_0x426aed;if(_0x1873b8>0x0){let _0x3e1da6=0x0;for(const _0x46cfd8 of this['_threadStats'][_0x5edaa3(0x2e6)]())_0x3e1da6+=_0x46cfd8[_0x5edaa3(0x1f2)]||0x0;_0x1a84f3={'count':_0x1873b8,'heapUsed':_0x3e1da6,'sandbox':_0x426aed,'busy':_0x3658c4};}return{'rss':_0x3c2ff8[_0x5edaa3(0xd5)],'heapUsed':_0x3c2ff8['heapUsed'],'heapTotal':_0x3c2ff8[_0x5edaa3(0x2dd)],'external':_0x3c2ff8[_0x5edaa3(0x189)],'cpuPct':this[_0x5edaa3(0x123)],'cpuWindowMs':this[_0x5edaa3(0x172)]??null,'threads':_0x1a84f3,'at':_0x1b9ef4};}[_0x3faefc(0x274)](_0x1e780e,_0x578c9c){const _0x4d879b=_0x3faefc;if(!_0x1e780e||!_0x578c9c)return;this[_0x4d879b(0x250)][_0x4d879b(0x17a)](_0x1e780e,_0x578c9c);}['clearThreadStats'](_0x470a10){const _0x154a19=_0x3faefc;this[_0x154a19(0x250)][_0x154a19(0x2aa)](_0x470a10);}[_0x3faefc(0x117)](_0x4230e1,_0x407371,_0xa7266c=undefined){const _0x456c20=_0x3faefc,_0x23171c=this['_children']['get'](_0x4230e1);if(!_0x23171c||!_0x407371)return;if(_0xa7266c!==undefined)_0x23171c[_0x456c20(0x106)]=_0xa7266c;_0x23171c[_0x456c20(0x215)]={'rss':_0x407371[_0x456c20(0xd5)]??null,'heapUsed':_0x407371[_0x456c20(0x1f2)]??null,'heapTotal':_0x407371[_0x456c20(0x2dd)]??null,'external':_0x407371['external']??null,'cpuPct':_0x407371[_0x456c20(0x294)]??null,'cpuWindowMs':_0x407371['cpuWindowMs']??null,'threads':_0x407371[_0x456c20(0x25f)]??null,'claims':_0x407371[_0x456c20(0x1e7)]??null,'envsOpen':_0x407371[_0x456c20(0x260)]??null,'at':Date[_0x456c20(0x24a)]()};}[_0x3faefc(0x133)](){const _0x4321a0=_0x3faefc,_0x209d09=Date[_0x4321a0(0x24a)](),_0x2da84d=this[_0x4321a0(0x1dc)][_0x4321a0(0x2b8)]||{},_0x3a6b4b=this[_0x4321a0(0x14b)]||_0x4321a0(0x23a);return{'nodeKey':this['_rowKey'],'processKey':this[_0x4321a0(0x1db)],'instanceId':this[_0x4321a0(0x171)],'pid':process[_0x4321a0(0x11d)],'startedAt':this[_0x4321a0(0x1af)],'instanceStartedAt':this[_0x4321a0(0x15b)],'ppid':typeof process[_0x4321a0(0xfe)]==='number'?process[_0x4321a0(0xfe)]:null,'host':_0x5e8a97[_0x4321a0(0x165)](),'supervisorKey':this[_0x4321a0(0x113)]??null,'version':require$$6['version'],'kind':_0x3a6b4b,'role':{'engines':!!_0x2da84d['engines'],'processors':!!_0x2da84d[_0x4321a0(0x1a3)],'compaction':_0x2da84d[_0x4321a0(0x12b)],'http':_0x2da84d[_0x4321a0(0x27f)]},'listenAddr':this[_0x4321a0(0x2a3)]??null,'heartbeatAt':_0x209d09,'expiresAt':_0x209d09+_0x4b5ec0,'caps':this['_caps'](_0x3a6b4b,_0x2da84d),'lifecycle':{'state':_0x4321a0(0xad),'desiredVersionApplied':null},'meta':{...this[_0x4321a0(0x245)]},'processing':_0x2da84d[_0x4321a0(0x1a3)]?this['_buildProcessingFacet']():null,'engines':_0x2da84d['engines']?[...this[_0x4321a0(0x1dc)]['_servingEngines']??[]]:null,'singletonClaims':this[_0x4321a0(0x14c)](),'stats':this[_0x4321a0(0x195)](),'writers':this[_0x4321a0(0x141)]()};}[_0x3faefc(0x141)](){const _0x1ff821=_0x3faefc,_0x53a88c={};try{for(const [_0x24e82b,_0x45bfaf]of this[_0x1ff821(0x1dc)][_0x1ff821(0x139)]){try{const _0x4f1b4c=_0x45bfaf[_0x1ff821(0x259)]?.();if(!_0x4f1b4c)continue;if(!_0x4f1b4c['depth']&&!_0x4f1b4c['committed']&&!(_0x4f1b4c[_0x1ff821(0x1c4)]??0x0)&&!_0x4f1b4c['draining'])continue;_0x53a88c[_0x24e82b]={'depth':_0x4f1b4c[_0x1ff821(0xcc)],'oldestPendingMs':_0x4f1b4c[_0x1ff821(0x163)],'committed':_0x4f1b4c[_0x1ff821(0x121)],'commitsPerSec':_0x4f1b4c['commitsPerSec'],'commitP99Ms':_0x4f1b4c[_0x1ff821(0x226)],'parkedNow':_0x4f1b4c['parkedNow']??0x0,'draining':!!_0x4f1b4c['draining']};}catch{}}}catch{}return Object[_0x1ff821(0x114)](_0x53a88c)[_0x1ff821(0x17e)]?_0x53a88c:null;}['_collectSingletonClaims'](){const _0x46ce49=_0x3faefc,_0x274089=process['pid'],_0x2802cf=Date[_0x46ce49(0x24a)](),_0x55575b=_0x5db560=>{const _0x4c3109=_0x46ce49;if(!_0x5db560)return[];const _0x15f935=[];try{for(const {id:_0x329816,entry:_0x429518}of _0x5db560[_0x4c3109(0x1b4)]()){if(_0x429518?.[_0x4c3109(0x27b)]?.[_0x4c3109(0x11d)]!==_0x274089)continue;const _0x427a76=_0x429518[_0x4c3109(0xc7)]??_0x429518[_0x4c3109(0x187)]??0x0;if(_0x427a76+(_0x429518[_0x4c3109(0x1bd)]??0x0)<_0x2802cf)continue;_0x15f935[_0x4c3109(0x1a0)](_0x329816);}}catch{}return _0x15f935;},_0x361097=_0x55575b(this[_0x46ce49(0x236)](_0x46ce49(0x1e2))),_0x25d3c8=_0x55575b(this[_0x46ce49(0x236)](_0x46ce49(0x1d6)));if(!_0x361097[_0x46ce49(0x17e)]&&!_0x25d3c8[_0x46ce49(0x17e)])return null;return{'compact':_0x361097,'replicate':_0x25d3c8};}[_0x3faefc(0x236)](_0x398ee6){const _0xad6f41=_0x3faefc;if(!this[_0xad6f41(0x1dc)]?.[_0xad6f41(0xac)])return null;if(!this[_0xad6f41(0x20f)])this[_0xad6f41(0x20f)]=new Map();let _0x1b983d=this[_0xad6f41(0x20f)][_0xad6f41(0xec)](_0x398ee6);if(!_0x1b983d)try{_0x1b983d=new _0x30fdf7(this['okdb'][_0xad6f41(0xac)],{'namespace':_0x398ee6}),this[_0xad6f41(0x20f)]['set'](_0x398ee6,_0x1b983d);}catch{return null;}return _0x1b983d;}['_buildProcessingFacet'](){const _0x34c6b3=_0x3faefc,_0x2f9269=[];try{for(const [_0x35c41b,_0x1dd3d5]of this['okdb'][_0x34c6b3(0x139)]){if(_0x35c41b['startsWith']('~'))continue;for(const _0x2fd2be of _0x1dd3d5[_0x34c6b3(0x207)]['tierList']())_0x2f9269['push']({..._0x2fd2be,'env':_0x35c41b});}}catch{}return{'participate':this[_0x34c6b3(0x1dc)][_0x34c6b3(0x1a3)]?.[_0x34c6b3(0x2bf)]??![],'processors':_0x2f9269};}['_ensureDesired'](){const _0x5d3e8d=_0x3faefc;if(this['_desired'])return!![];const _0x3cc796=this['okdb']['_rootDb'];if(!_0x3cc796)return![];return this['_desired']=_0x3cc796[_0x5d3e8d(0x254)](_0x1f78d9,{'dupSort':![]}),this['_cmd']=_0x3cc796['openDB'](_0x1b0b76,{'dupSort':![]}),!![];}async[_0x3faefc(0x20a)](){const _0x5e6973=_0x3faefc;if(!this[_0x5e6973(0x100)]())return;const _0x41a4f1=_0x5e6973(0x27e),_0x10783f=0x1,_0xf8a63a=this[_0x5e6973(0x2a1)][_0x5e6973(0xec)](_0x41a4f1)??0x0;if(_0xf8a63a>=_0x10783f)return;const _0x12ccec=_0x445a54=>{const _0x242788=_0x5e6973;if(_0x445a54===_0x242788(0x1b7))return _0x242788(0x157);if(_0x445a54===_0x242788(0x2e2))return _0x242788(0x2c9);return _0x445a54;};await this[_0x5e6973(0x1dc)]['_systemEnv']['_writer'][_0x5e6973(0x285)](()=>{const _0x38d50a=_0x5e6973;for(const _0x22cb9f of['procmode/',_0x38d50a(0x1b1)]){for(const {key:_0x405e44,value:_0x725421}of this[_0x38d50a(0x2a1)][_0x38d50a(0x1c1)]({'start':_0x22cb9f,'end':_0x22cb9f+'\xff'})){if(typeof _0x405e44!==_0x38d50a(0xa8)||!_0x405e44[_0x38d50a(0x218)](_0x22cb9f))break;const _0x5d70e9=_0x12ccec(_0x725421[_0x38d50a(0x220)]);if(_0x5d70e9!==_0x725421[_0x38d50a(0x220)])this[_0x38d50a(0x2a1)]['put'](_0x405e44,{..._0x725421,'mode':_0x5d70e9});}}this[_0x38d50a(0x2a1)][_0x38d50a(0x170)](_0x41a4f1,_0x10783f);});}[_0x3faefc(0x14a)](){const _0x261091=_0x3faefc;return!!this[_0x261091(0x2a1)];}[_0x3faefc(0x13c)](_0x431c4c,_0x5ca9a8){const _0x19943c=_0x3faefc;if(!this[_0x19943c(0x100)]())return null;const _0x59e1d1=_0x431c4c+'/'+_0x5ca9a8;return this['_refreshDesiredSnapshot'](),this[_0x19943c(0x116)][_0x19943c(0xec)](_0x59e1d1)??this[_0x19943c(0x2a1)][_0x19943c(0xec)](_0x59e1d1)??null;}['_refreshDesiredSnapshot'](){const _0x13ae6a=_0x3faefc;if(!_0x2e88d8)return;try{this[_0x13ae6a(0x1dc)]['_systemEnv']?.['db']?.[_0x13ae6a(0x149)]?.();}catch{}}async[_0x3faefc(0x2a2)](_0x302035,_0x25fe9d,_0x33521f){const _0x45c32c=_0x3faefc;if(!this[_0x45c32c(0x100)]())return null;const _0x4caa2c=_0x302035+'/'+_0x25fe9d;this[_0x45c32c(0x229)]();const _0x406658=this[_0x45c32c(0x116)][_0x45c32c(0xec)](_0x4caa2c)??this['_desired']['get'](_0x4caa2c)??{'version':0x0},_0x497acc=(_0x406658['version']||0x0)+0x1,_0x4e2356={..._0x406658,..._0x33521f,'version':_0x497acc,'updatedAt':Date[_0x45c32c(0x24a)]()};this[_0x45c32c(0x116)][_0x45c32c(0x17a)](_0x4caa2c,_0x4e2356);try{await this['okdb'][_0x45c32c(0x23d)][_0x45c32c(0x2da)][_0x45c32c(0x285)](()=>{const _0x1a5712=_0x45c32c;this[_0x1a5712(0x2a1)][_0x1a5712(0x170)](_0x4caa2c,_0x4e2356);});}finally{if(this[_0x45c32c(0x116)][_0x45c32c(0xec)](_0x4caa2c)===_0x4e2356)this['_desiredOverlay'][_0x45c32c(0x2aa)](_0x4caa2c);}return _0x497acc;}['listDesired'](_0x407b62){const _0x10d8c2=_0x3faefc;if(!this[_0x10d8c2(0x100)]())return[];this['_refreshDesiredSnapshot']();const _0x5550b4=_0x407b62+'/',_0x57d5e8=[];for(const {key:_0x8e1a6a,value:_0x18ba1e}of this['_desired'][_0x10d8c2(0x1c1)]({'start':_0x5550b4,'end':_0x5550b4+'\xff'})){if(typeof _0x8e1a6a!==_0x10d8c2(0xa8)||!_0x8e1a6a[_0x10d8c2(0x218)](_0x5550b4))break;_0x57d5e8[_0x10d8c2(0x1a0)]({'key':_0x8e1a6a[_0x10d8c2(0x272)](_0x5550b4[_0x10d8c2(0x17e)]),'value':_0x18ba1e});}return _0x57d5e8;}[_0x3faefc(0x183)](_0x36e79d){const _0x3fb7c3=_0x3faefc;if(!this[_0x3fb7c3(0x100)]())return null;return this[_0x3fb7c3(0x25c)]['get'](_0x36e79d)??null;}async[_0x3faefc(0x179)](_0x6c74c5,_0x1a4281,_0x527e82={}){const _0x1f8387=_0x3faefc;if(!this[_0x1f8387(0x100)]())return null;let _0xf8be6b;return await this[_0x1f8387(0x1dc)]['_systemEnv'][_0x1f8387(0x2da)]['transaction'](()=>{const _0x2088b9=_0x1f8387,_0xbd9f5b=this[_0x2088b9(0x25c)][_0x2088b9(0xec)](_0x6c74c5)||{'epoch':0x0};_0xf8be6b=(_0xbd9f5b[_0x2088b9(0x2d1)]||0x0)+0x1,this[_0x2088b9(0x25c)]['put'](_0x6c74c5,{..._0xbd9f5b,..._0x527e82,'cmd':_0x1a4281,'epoch':_0xf8be6b,'updatedAt':Date['now']()});}),_0xf8be6b;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x33776,'nodeKey':_0x1f48f5,'logicalKey':_0x394355,'slotKey':_0x2204da,'PROCESS_ENV':_0xc4a0da,'NODE_TYPE':_0x16f04c},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x537b61=_0x5e06fa;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x34ee6e=require$$0$4,{clampTimerDelay:_0x5395c8}=requireOkdbTimers(),{EVENTS:_0x10e255,CHANGE_ACTIONS:_0x491d12}=requireOkdbEnums(),{LOOP:_0x5365a8}=requireOkdbLoopMonitor(),_0x303d82=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x54c1bc=0x5,_0x212568=0x2710;class _0x40a8d4 extends _0x34ee6e{constructor(_0x437429,_0xc3a46c={}){const _0x1355b2=_0x5881;super(),this[_0x1355b2(0x1dc)]=_0x437429,this[_0x1355b2(0x1e9)]=_0xc3a46c[_0x1355b2(0x132)]??_0x303d82,this[_0x1355b2(0xdf)]=_0xc3a46c[_0x1355b2(0x147)]??_0x54c1bc,this[_0x1355b2(0x2e8)]=_0xc3a46c[_0x1355b2(0x29f)]??_0x212568,this['_started']=![],this[_0x1355b2(0x1b5)]=new Map(),this[_0x1355b2(0x169)]=new Map(),this['_pending']=new Map(),this[_0x1355b2(0x199)]=null,this['_draining']=![],this[_0x1355b2(0x2cc)]=new Set(),this[_0x1355b2(0x2b0)]=new Set(),this['_onItem']=_0x300f7c=>this[_0x1355b2(0x107)](_0x300f7c),this['_onPending']=_0x4edf60=>this[_0x1355b2(0x10f)](_0x4edf60),this[_0x1355b2(0xe7)]=_0x5b8a25=>this['_handlePoke'](_0x5b8a25),this['_onStop']=()=>this[_0x1355b2(0x2d6)]();}[_0x537b61(0x177)](){const _0x25b8dd=_0x537b61;if(this[_0x25b8dd(0x2e1)])return;this[_0x25b8dd(0x2e1)]=!![];for(const [_0x3e9665,_0x2c972b]of this[_0x25b8dd(0x1dc)][_0x25b8dd(0x139)]){if(_0x3e9665[_0x25b8dd(0x218)]('~'))continue;try{_0x2c972b[_0x25b8dd(0x1e3)]();}catch{}}for(const [_0x1cb73d,_0x5e47f1]of this[_0x25b8dd(0x1dc)][_0x25b8dd(0x139)]){if(_0x1cb73d[_0x25b8dd(0x218)]('~'))continue;try{this['_baselines'][_0x25b8dd(0x17a)](_0x1cb73d,_0x5e47f1[_0x25b8dd(0x2ad)]()||0x0);}catch{}}const {events:_0x238be7}=this[_0x25b8dd(0x1dc)];_0x238be7['on'](_0x10e255[_0x25b8dd(0x1cd)],this[_0x25b8dd(0x1c5)]),_0x238be7['on'](_0x10e255[_0x25b8dd(0x2dc)],this[_0x25b8dd(0x24d)]),_0x238be7['on'](_0x10e255[_0x25b8dd(0x284)],this[_0x25b8dd(0x24d)]),_0x238be7['on'](_0x10e255[_0x25b8dd(0x280)],this['_onItem']),_0x238be7['on'](_0x10e255[_0x25b8dd(0x1a5)],this[_0x25b8dd(0xe7)]),_0x238be7[_0x25b8dd(0x1a6)](_0x10e255[_0x25b8dd(0x1e0)],this[_0x25b8dd(0x12f)]);}[_0x537b61(0x2d6)](){const _0x14e790=_0x537b61;if(!this[_0x14e790(0x2e1)])return;this['_started']=![];const {events:_0x386ae3}=this[_0x14e790(0x1dc)];_0x386ae3['off'](_0x10e255['ITEM_PENDING'],this['_onPending']),_0x386ae3[_0x14e790(0x191)](_0x10e255['ITEM_CREATE'],this['_onItem']),_0x386ae3['off'](_0x10e255['ITEM_UPDATE'],this[_0x14e790(0x24d)]),_0x386ae3[_0x14e790(0x191)](_0x10e255[_0x14e790(0x280)],this[_0x14e790(0x24d)]),_0x386ae3[_0x14e790(0x191)](_0x10e255['SYSTEM_POKE'],this['_onPoke']);try{_0x386ae3[_0x14e790(0x191)](_0x10e255[_0x14e790(0x1e0)],this[_0x14e790(0x12f)]);}catch{}this[_0x14e790(0x199)]&&(clearTimeout(this[_0x14e790(0x199)]),this[_0x14e790(0x199)]=null),this[_0x14e790(0xb1)]['clear'](),this[_0x14e790(0x1b5)][_0x14e790(0xe3)](),this['_baselines'][_0x14e790(0xe3)](),this['_seen'][_0x14e790(0xe3)](),this[_0x14e790(0x2b0)]['clear']();}[_0x537b61(0x112)](_0x5570c5,_0x20fdf6,_0x3bcb30,_0x2f19bf){return _0x5570c5+'\x00'+_0x20fdf6+'\x00'+_0x3bcb30+'\x00'+_0x2f19bf;}[_0x537b61(0x212)](_0x57d2b3,_0x276cb3,_0x1cfce2,_0x58644c){const _0x2d264a=_0x537b61,_0x28a1d9=this[_0x2d264a(0x112)](_0x57d2b3,_0x276cb3,_0x1cfce2,_0x58644c);if(this[_0x2d264a(0x2cc)][_0x2d264a(0xab)](_0x28a1d9))return![];this[_0x2d264a(0x2cc)][_0x2d264a(0x25e)](_0x28a1d9);if(this['_seen'][_0x2d264a(0x2e3)]>this[_0x2d264a(0x2e8)]){const _0x1e052b=this['_seen'][_0x2d264a(0x2e6)]()[_0x2d264a(0x2bb)]()[_0x2d264a(0x248)];this[_0x2d264a(0x2cc)]['delete'](_0x1e052b);}return!![];}[_0x537b61(0x10f)](_0x65f5f5){const _0xb81209=_0x537b61;if(!this[_0xb81209(0x2e1)]||!_0x65f5f5)return;const {env:_0x300732,type:_0x26f062,key:_0x22e0c5,clock:_0xa9e774}=_0x65f5f5;if(_0x300732==null||_0x26f062==null||_0x22e0c5==null)return;if(typeof _0x300732===_0xb81209(0xa8)&&_0x300732[_0xb81209(0x218)]('~'))return;if(typeof _0x26f062==='string'&&_0x26f062[_0xb81209(0x218)]('~'))return;this[_0xb81209(0x2b0)]['add'](this['_dedupeKey'](_0x300732,_0x26f062,_0x22e0c5,_0xa9e774)),this[_0xb81209(0x2b0)][_0xb81209(0x2e3)]>this[_0xb81209(0x2e8)]&&this[_0xb81209(0x2b0)]['delete'](this['_pendingLocal']['values']()[_0xb81209(0x2bb)]()[_0xb81209(0x248)]);}['_handleInProcess'](_0x40ef4a){const _0x56f217=_0x537b61;if(!this[_0x56f217(0x2e1)]||!_0x40ef4a)return;const {env:_0x44f217,type:_0x293ab6,key:_0x47a12f,clock:_0x2d09ea,origin:_0x4314c3,action:_0x162925,newValue:_0x1ee018,oldValue:_0x3dcedd}=_0x40ef4a;if(_0x44f217==null||_0x293ab6==null||_0x47a12f==null)return;if(typeof _0x44f217===_0x56f217(0xa8)&&_0x44f217[_0x56f217(0x218)]('~'))return;if(typeof _0x293ab6===_0x56f217(0xa8)&&_0x293ab6[_0x56f217(0x218)]('~'))return;this['_pendingLocal'][_0x56f217(0x2aa)](this[_0x56f217(0x112)](_0x44f217,_0x293ab6,_0x47a12f,_0x2d09ea));if(!this[_0x56f217(0x212)](_0x44f217,_0x293ab6,_0x47a12f,_0x2d09ea))return;const _0x53faa1=_0x162925===_0x491d12['REMOVE']?'remove':_0x56f217(0x170);this[_0x56f217(0x126)](_0x56f217(0xde),{'env':_0x44f217,'type':_0x293ab6,'key':_0x47a12f,'op':_0x53faa1,'clock':_0x2d09ea,'origin':_0x4314c3,'value':_0x53faa1===_0x56f217(0x2de)?null:_0x1ee018,'prevValue':_0x3dcedd});}[_0x537b61(0x1ad)](_0x183d3a){const _0x9af8eb=_0x537b61;if(!this['_started'])return;if(!_0x183d3a||typeof _0x183d3a['env']!=='string'||typeof _0x183d3a['type']!==_0x9af8eb(0xa8))return;const {env:_0x2b09d4,type:_0x8837cc}=_0x183d3a;if(_0x2b09d4[_0x9af8eb(0x218)]('~')||_0x8837cc[_0x9af8eb(0x218)]('~'))return;this[_0x9af8eb(0xb1)][_0x9af8eb(0x17a)](_0x2b09d4+'\x00'+_0x8837cc,{'env':_0x2b09d4,'type':_0x8837cc}),this[_0x9af8eb(0xf1)]();}[_0x537b61(0xf1)](){const _0x48afdc=_0x537b61;if(this[_0x48afdc(0x199)])return;const _0x510515=()=>{const _0xc50e06=_0x48afdc;this[_0xc50e06(0x199)]=null,this[_0xc50e06(0x2b7)]()[_0xc50e06(0x230)](()=>{});};this[_0x48afdc(0x199)]=setTimeout(_0x510515,_0x5395c8(this[_0x48afdc(0xdf)]));}async[_0x537b61(0x2b7)](){const _0x269ad4=_0x537b61;if(this[_0x269ad4(0x127)]){this[_0x269ad4(0xf1)]();return;}this[_0x269ad4(0x127)]=!![];try{const _0xf370eb=[...this[_0x269ad4(0xb1)][_0x269ad4(0x2e6)]()];this['_pending'][_0x269ad4(0xe3)]();let _0xea247d=![];for(const {env:_0x23c80a,type:_0x43e4c4}of _0xf370eb){try{const _0x4bc5df=await this[_0x269ad4(0x2ce)](_0x23c80a,_0x43e4c4);if(_0x4bc5df)_0xea247d=!![];}catch{this[_0x269ad4(0xb1)][_0x269ad4(0x17a)](_0x23c80a+'\x00'+_0x43e4c4,{'env':_0x23c80a,'type':_0x43e4c4}),_0xea247d=!![];}}if(_0xea247d||this[_0x269ad4(0xb1)][_0x269ad4(0x2e3)]>0x0)this['_scheduleFlush']();}finally{this[_0x269ad4(0x127)]=![];}}async[_0x537b61(0x2ce)](_0x273162,_0x142567){const _0x15803a=_0x537b61,_0x42f0a0=await this[_0x15803a(0x1dc)][_0x15803a(0x21d)](_0x273162),_0x1b2ff9=_0x273162+'\x00'+_0x142567;!this['_cursors'][_0x15803a(0xab)](_0x1b2ff9)&&(!this[_0x15803a(0x169)][_0x15803a(0xab)](_0x273162)&&(_0x42f0a0[_0x15803a(0x1e3)](),this[_0x15803a(0x169)][_0x15803a(0x17a)](_0x273162,_0x42f0a0[_0x15803a(0x2ad)]()||0x0)),this[_0x15803a(0x1b5)][_0x15803a(0x17a)](_0x1b2ff9,this['_baselines']['get'](_0x273162)));const _0x26912d=this[_0x15803a(0x1b5)][_0x15803a(0xec)](_0x1b2ff9),_0x2ce4ad=_0x42f0a0[_0x15803a(0x2ad)](_0x142567)||0x0;if(_0x2ce4ad<=_0x26912d)return![];const _0x26bbe5=_0x26912d+this['_quantum'],_0x273dfa=Math['min'](_0x2ce4ad,_0x26bbe5),_0x1f53cf=_0x5365a8[_0x15803a(0xcf)]?_0x5365a8[_0x15803a(0x24a)]():0x0,_0x59fada=Array['from'](_0x42f0a0[_0x15803a(0x153)](_0x142567,_0x26912d+0x1,_0x273dfa));let _0x85399=_0x26912d;for(const _0x8664de of _0x59fada){const {clock:_0x33ad36,key:_0x34add1,action:_0x58498f,origin:_0x130f8d}=_0x8664de;if(_0x33ad36>_0x85399)_0x85399=_0x33ad36;if(_0x34add1==null)continue;if(this['_pendingLocal'][_0x15803a(0xab)](this[_0x15803a(0x112)](_0x273162,_0x142567,_0x34add1,_0x33ad36)))continue;if(!this[_0x15803a(0x212)](_0x273162,_0x142567,_0x34add1,_0x33ad36))continue;let _0x34fed5,_0xf62f5;if(_0x58498f===_0x491d12[_0x15803a(0x20e)])_0x34fed5='remove',_0xf62f5=null;else{const _0x160a92=_0x42f0a0[_0x15803a(0xec)](_0x142567,_0x34add1);_0x160a92==null?(_0x34fed5='remove',_0xf62f5=null):(_0x34fed5=_0x15803a(0x170),_0xf62f5=_0x160a92);}this[_0x15803a(0x126)](_0x15803a(0xde),{'env':_0x273162,'type':_0x142567,'key':_0x34add1,'op':_0x34fed5,'clock':_0x33ad36,'origin':_0x130f8d,'value':_0xf62f5});}if(_0x5365a8[_0x15803a(0xcf)])_0x5365a8[_0x15803a(0x1d2)](_0x15803a(0x258)+_0x273162+':'+_0x142567,_0x5365a8[_0x15803a(0x24a)]()-_0x1f53cf,'n='+_0x59fada[_0x15803a(0x17e)]);return this[_0x15803a(0x1b5)][_0x15803a(0x17a)](_0x1b2ff9,Math[_0x15803a(0x2bc)](_0x85399,_0x273dfa)),_0x42f0a0[_0x15803a(0x2ad)](_0x142567)>_0x273dfa;}[_0x537b61(0x2cf)](){const _0x43de51=_0x537b61;return{'started':this['_started'],'quantum':this['_quantum'],'flushDebounce':this[_0x43de51(0xdf)],'cursors':Object['fromEntries']([...this[_0x43de51(0x1b5)][_0x43de51(0x24c)]()][_0x43de51(0x173)](([_0x49102a,_0x400d3c])=>[_0x49102a[_0x43de51(0x193)]('\x00',':'),_0x400d3c])),'pending':this['_pending'][_0x43de51(0x2e3)],'seen':this[_0x43de51(0x2cc)]['size']};}}return _0x40a8d4['CHANGEFEED_QUANTUM']=_0x303d82,okdbChangefeed={'OKDBChangefeed':_0x40a8d4},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x3c1326=_0x5e06fa;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x4107ac=require$$1$1,_0x2f3343=require$$1,{EVENTS:_0x10044b}=requireOkdbEnums(),_0x623a23=require$$0$3,{slotKey:_0x3b112d}=requireOkdbProcessRegistry(),_0x298871=Number(process.env.OKDB_CLUSTER_RESPAWN_BACKOFF_MS)||0xfa,_0x112ca3=0xfa0,_0x2ba25e=0x5,_0x11cbb8=0x2710,_0x23daec=0xbb8,_0x43acc7=0x7d0,_0xa47e1c=_0x3c1326(0x26d),_0x9715ae=_0x3c1326(0x135),_0x2e3060=_0x3c1326(0x2cd),_0x477b24=_0x3c1326(0x215),_0xf34cfb=[_0x10044b['VIEW_PROGRESS'],_0x10044b[_0x3c1326(0x198)],_0x10044b['FTS_DROP'],_0x10044b[_0x3c1326(0x1ee)],_0x10044b[_0x3c1326(0xe4)],_0x10044b[_0x3c1326(0x204)],_0x10044b[_0x3c1326(0x261)],_0x10044b[_0x3c1326(0x243)],'processor:ready','processor:progress',_0x3c1326(0x23f),_0x3c1326(0xc8),_0x3c1326(0x221),_0x3c1326(0x1da)],_0x4632dd=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0,_0x5375e1=0x64;function _0x259dbf(_0x37dcea){const _0x2474a2=_0x3c1326;if(!_0x37dcea)return _0x2474a2(0x298);const _0x24576a=(_0x37dcea[_0x2474a2(0x1a3)]||[])['map'](_0x2bd169=>[_0x2bd169[_0x2474a2(0x136)],_0x2bd169['id'],_0x2bd169[_0x2474a2(0x220)],_0x2bd169[_0x2474a2(0x29d)],!!_0x2bd169['paused'],!!_0x2bd169[_0x2474a2(0x223)],!!_0x2bd169[_0x2474a2(0x1eb)],_0x2bd169[_0x2474a2(0x291)]?.['pid']??null,_0x2bd169[_0x2474a2(0x277)]?String(_0x2bd169[_0x2474a2(0x277)]?.[_0x2474a2(0x25d)]??_0x2bd169[_0x2474a2(0x277)]):null]);return JSON[_0x2474a2(0xd8)]([!!_0x37dcea[_0x2474a2(0x23e)],_0x24576a]);}function _0x40dc2f({workers:_0x5a06ae,makeOkdb:_0x410ca6,port:_0x36c3c4,primaryOkdb:_0x551112,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0x1c2358=_0x3c1326;if(_0x4107ac[_0x1c2358(0x281)])return childEntry&&_0x4107ac[_0x1c2358(0xd3)]({'exec':_0x2f3343[_0x1c2358(0x20d)](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0xbb9685=_0x1c2358,_0x29d39a=[];for(let _0x5b1915=0x0;_0x5b1915<process[_0xbb9685(0x11f)][_0xbb9685(0x17e)];_0x5b1915++){const _0x9f0363=process[_0xbb9685(0x11f)][_0x5b1915];if(_0x9f0363[_0xbb9685(0x218)](_0xbb9685(0x13f))||_0x9f0363['startsWith'](_0xbb9685(0x1bc))||_0x9f0363[_0xbb9685(0x218)]('--inspect'))continue;if(_0x9f0363==='-e'||_0x9f0363===_0xbb9685(0x190)||_0x9f0363==='-p'||_0x9f0363===_0xbb9685(0xeb)){_0x5b1915++;continue;}_0x29d39a[_0xbb9685(0x1a0)](_0x9f0363);}return _0x29d39a;})())}),_0x7308f3({'workers':_0x5a06ae,'port':_0x36c3c4,'primaryOkdb':_0x551112,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x36c3c4});return _0x49ca77({'makeOkdb':_0x410ca6,'port':_0x36c3c4});}function _0x7308f3({workers:_0xfd60e9,port:_0x3eae0a,primaryOkdb:_0x4720a9,workerEnv:_0x1671e1,workerRole:_0x5e3bde,listenAddr:_0x1617d5}){const _0xf4cfb0=_0x3c1326,_0x1211c1=new Map(),_0x2524f7=new Map();let _0x3fe2c6=![];const _0x50acb4=_0x1d64d5=>_0x1d64d5?.[_0xf4cfb0(0x2c7)],_0x583836=_0x4bbc79=>{const _0x12fdc1=_0xf4cfb0,_0x314621=_0x4107ac[_0x12fdc1(0x234)]({...process.env,..._0x1671e1||{},'OKDB_CLUSTER_SLOT':String(_0x4bbc79)});return _0x314621[_0x12fdc1(0x2c7)]=_0x4bbc79,_0x1211c1[_0x12fdc1(0x17a)](_0x314621[_0x12fdc1(0x13a)]['pid'],{'worker':_0x314621,'startedAt':Date[_0x12fdc1(0x24a)](),'slot':_0x4bbc79}),_0x314621['on'](_0x12fdc1(0x277),_0xb8f408=>{const _0x383e19=_0x12fdc1;console[_0x383e19(0x2cd)](_0x383e19(0x28d)+_0x314621[_0x383e19(0x13a)][_0x383e19(0x11d)]+_0x383e19(0xff)+(_0xb8f408?.[_0x383e19(0x25d)]??_0xb8f408));}),_0x314621['on'](_0x12fdc1(0x1c2),()=>_0x2f5b63()),_0x314621;},_0x1f46ca=_0x2ba09c=>{const _0x56a4=_0xf4cfb0;for(const {worker:_0x21ecef}of _0x1211c1[_0x56a4(0x2e6)]()){if(_0x21ecef[_0x56a4(0x267)]()||!_0x21ecef[_0x56a4(0x18f)]())continue;try{_0x21ecef['send'](_0x2ba09c);}catch{}}};_0x4720a9?.['_activateProcesses']?.({'kind':_0xf4cfb0(0x240),'listenAddr':_0x1617d5})[_0xf4cfb0(0x230)](()=>{}),_0x4720a9?.['processes']?.[_0xf4cfb0(0x239)]?.({'workersConfigured':_0xfd60e9});const _0x333b8f={'engines':!![],'processors':!![],'compaction':!![],..._0x5e3bde,'http':!![]},_0x2f5b63=()=>{const _0x48a4ac=_0xf4cfb0,_0x12d3e4=_0x4720a9?.[_0x48a4ac(0x2bd)];if(!_0x12d3e4||!_0x12d3e4[_0x48a4ac(0x238)])return;const _0xe25ed=_0x12d3e4[_0x48a4ac(0x146)];for(const {worker:_0x59296f,startedAt:_0x281bf5,slot:_0x2a5d80,stats:_0x4d0e32,processing:_0xc10360}of _0x1211c1[_0x48a4ac(0x2e6)]()){if(_0x59296f['isDead']())continue;const _0x179d31=_0x12d3e4[_0x48a4ac(0x14a)]?.()&&_0x12d3e4['getDesired'](_0x48a4ac(0x124),_0x4dd95a(_0x2a5d80))?.['decommission']===!![];_0x12d3e4['publishChildRow']({'pid':_0x59296f[_0x48a4ac(0x13a)][_0x48a4ac(0x11d)],'startedAt':_0x281bf5,'kind':_0x48a4ac(0xea),'supervisorKey':_0xe25ed,'slot':_0x2a5d80,'slotKey':_0x4dd95a(_0x2a5d80),'role':_0x333b8f,'listenAddr':_0x1617d5,'lifecycle':_0x179d31?_0x48a4ac(0x279):'running','processing':_0xc10360??null,'stats':_0x4d0e32??null})[_0x48a4ac(0x230)](()=>{});}},_0x4dd95a=_0x351de8=>_0x3b112d('cluster:'+_0x3eae0a,_0x351de8),_0x2c5ba0=_0x53d00e=>{const _0x511047=_0xf4cfb0,_0x183250=_0x4720a9?.[_0x511047(0x2bd)];if(!_0x183250?.['hasDesired']?.())return![];return _0x183250[_0x511047(0x13c)](_0x511047(0x124),_0x4dd95a(_0x53d00e))?.['decommission']===!![];};for(let _0x1ab215=0x0;_0x1ab215<_0xfd60e9;_0x1ab215++){const _0x485e57=_0x2c5ba0(_0x1ab215);_0x2524f7[_0xf4cfb0(0x17a)](_0x1ab215,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x485e57,'respawnTimer':null}),_0x485e57?console[_0xf4cfb0(0x2cd)]('[okdb-cluster]\x20slot='+_0x1ab215+_0xf4cfb0(0x266)):_0x583836(_0x1ab215);}const _0x43cff=()=>{const _0x1d0976=_0xf4cfb0,_0x1f32b6=_0x4720a9?.[_0x1d0976(0x2bd)];if(!_0x1f32b6?.[_0x1d0976(0x238)]||!_0x1f32b6['hasDesired']?.())return;for(const [_0x47e387,_0x3f752e]of _0x2524f7[_0x1d0976(0x24c)]()){const _0x9e52ba=_0x1f32b6['getDesired'](_0x1d0976(0x124),_0x4dd95a(_0x47e387)),_0x1147d2=_0x9e52ba?.[_0x1d0976(0x11b)]===!![],_0x157d86=_0x9e52ba?.[_0x1d0976(0x209)]===!![];if(_0x1147d2&&!_0x3f752e[_0x1d0976(0x290)]){_0x3f752e['dead']=!![];_0x3f752e[_0x1d0976(0x1f6)]&&(clearTimeout(_0x3f752e[_0x1d0976(0x1f6)]),_0x3f752e[_0x1d0976(0x1f6)]=null);for(const {worker:_0x6e0175}of _0x1211c1['values']()){if(_0x50acb4(_0x6e0175)!==_0x47e387||_0x6e0175[_0x1d0976(0x267)]())continue;try{if(_0x157d86)_0x6e0175[_0x1d0976(0x13a)]['kill'](_0x1d0976(0x247));else _0x6e0175[_0x1d0976(0x18f)]()&&_0x6e0175[_0x1d0976(0x17d)]();}catch{}}console['log'](_0x1d0976(0x2df)+(_0x157d86?'hard-killed':'decommissioned')+_0x1d0976(0x19b)+_0x47e387+'\x20(durable\x20desired-state)');}else{if(!_0x1147d2&&_0x3f752e[_0x1d0976(0x290)]&&_0x9e52ba){_0x3f752e[_0x1d0976(0x290)]=![],_0x3f752e['deaths']=[],_0x3f752e['consecutiveFailures']=0x0;const _0x177ba1=[..._0x1211c1[_0x1d0976(0x2e6)]()][_0x1d0976(0x210)](({worker:_0x4c5518})=>_0x50acb4(_0x4c5518)===_0x47e387&&!_0x4c5518[_0x1d0976(0x267)]());!_0x177ba1&&!_0x3fe2c6&&(_0x583836(_0x47e387),console[_0x1d0976(0x2cd)](_0x1d0976(0x216)+_0x47e387));}}}},_0x5b32d7=()=>{try{_0x43cff();}catch{}};_0x4720a9?.['events']?.['on']?.(_0x10044b[_0xf4cfb0(0x1ab)],_0x5b32d7);const _0xbdb097=[];if(_0x4720a9?.[_0xf4cfb0(0x1f9)]?.['on'])for(const _0x3c2d3d of _0xf34cfb){const _0x3eaac3=_0x10aebd=>{_0x1f46ca({[_0xa47e1c]:_0x9715ae,'event':_0x3c2d3d,'data':_0x10aebd??{}});};_0x4720a9[_0xf4cfb0(0x1f9)]['on'](_0x3c2d3d,_0x3eaac3),_0xbdb097[_0xf4cfb0(0x1a0)]({'event':_0x3c2d3d,'handler':_0x3eaac3});}const _0x4e6e77=setInterval(()=>{_0x43cff(),_0x2f5b63();},_0x4632dd);_0x4e6e77['unref']?.();const _0x550f66=(_0x32908d,_0x13d6d7)=>{const _0x474666=_0xf4cfb0;if(!_0x13d6d7||typeof _0x13d6d7!==_0x474666(0x1ea)||_0x13d6d7[_0xa47e1c]!==_0x2e3060)return;if(!_0x4720a9?.[_0x474666(0x2cd)]?.[_0x474666(0x12a)])return;const _0x493c08=_0x13d6d7[_0x474666(0x224)]||{};_0x4720a9['log']['ingest']({..._0x493c08,'msg':'[w'+_0x13d6d7[_0x474666(0x124)]+']\x20'+(_0x493c08['msg']??''),'meta':{..._0x493c08[_0x474666(0x1a8)]||{},'worker':_0x13d6d7['slot'],'workerPid':_0x13d6d7[_0x474666(0x11d)]}});};_0x4107ac['on'](_0xf4cfb0(0x25d),_0x550f66);const _0xcd6a45=(_0x373b8a,_0x53829f)=>{const _0xa72ab8=_0xf4cfb0;if(!_0x53829f||typeof _0x53829f!=='object'||_0x53829f[_0xa47e1c]!==_0x477b24)return;const _0x6e13f5=_0x1211c1['get'](_0x373b8a[_0xa72ab8(0x13a)][_0xa72ab8(0x11d)]);if(_0x6e13f5){_0x6e13f5[_0xa72ab8(0x215)]={..._0x53829f[_0xa72ab8(0x215)],'at':Date[_0xa72ab8(0x24a)]()};if(_0x53829f['processing']!==undefined){const _0x564665=_0x259dbf(_0x53829f[_0xa72ab8(0x106)]);_0x564665!==_0x6e13f5[_0xa72ab8(0x150)]&&(_0x6e13f5[_0xa72ab8(0x150)]=_0x564665,_0x58225e()),_0x6e13f5['processing']=_0x53829f['processing'];}}};let _0x18d9d7=null;const _0x58225e=()=>{if(_0x18d9d7||_0x3fe2c6)return;_0x18d9d7=setTimeout(()=>{_0x18d9d7=null;if(!_0x3fe2c6)_0x2f5b63();},_0x5375e1),_0x18d9d7['unref']?.();};_0x4107ac['on'](_0xf4cfb0(0x25d),_0xcd6a45),_0x4107ac['on']('exit',(_0x384d7d,_0x157ccc,_0x50625d)=>{const _0x58fa31=_0xf4cfb0,_0x456e52=_0x384d7d[_0x58fa31(0x13a)][_0x58fa31(0x11d)],_0x3d25c3=_0x50acb4(_0x384d7d),_0x22ae4e=_0x1211c1[_0x58fa31(0xec)](_0x456e52);if(_0x22ae4e&&_0x4720a9?.['processes'])_0x4720a9['processes'][_0x58fa31(0x1fb)](_0x456e52+':'+_0x22ae4e[_0x58fa31(0x1ff)])[_0x58fa31(0x230)](()=>{});_0x1211c1[_0x58fa31(0x2aa)](_0x456e52),console[_0x58fa31(0x2cd)]('[okdb-cluster]\x20worker\x20pid='+_0x456e52+_0x58fa31(0xf8)+(_0x3d25c3??'?')+_0x58fa31(0x109)+(_0x58fa31(0xbc)+_0x157ccc+_0x58fa31(0xe8)+(_0x50625d??_0x58fa31(0x256))+_0x58fa31(0x1e6)+_0x1211c1[_0x58fa31(0x2e3)]+_0x58fa31(0xb2))),_0x2f5b63();if(_0x3fe2c6||_0x3d25c3==null)return;const _0x449a0d=_0x2524f7['get'](_0x3d25c3);if(!_0x449a0d||_0x449a0d['dead'])return;const _0x3d62f2=Date[_0x58fa31(0x24a)]();_0x449a0d['deaths'][_0x58fa31(0x1a0)](_0x3d62f2),_0x449a0d['deaths']=_0x449a0d[_0x58fa31(0x214)][_0x58fa31(0x2c0)](_0x29bb21=>_0x3d62f2-_0x29bb21<=_0x11cbb8);if(_0x449a0d[_0x58fa31(0x214)][_0x58fa31(0x17e)]>=_0x2ba25e){_0x449a0d[_0x58fa31(0x290)]=!![],console[_0x58fa31(0x277)]('[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot='+_0x3d25c3+_0x58fa31(0x22a)+_0x449a0d[_0x58fa31(0x214)][_0x58fa31(0x17e)]+'\x20times\x20in\x20'+(_0x11cbb8+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x1211c1[_0x58fa31(0x2e3)]+'\x20worker(s)\x20still\x20serving'));return;}_0x449a0d['consecutiveFailures']++;const _0x4eb1ad=Math['min'](_0x112ca3,_0x298871*0x2**(_0x449a0d['consecutiveFailures']-0x1));console[_0x58fa31(0x2cd)](_0x58fa31(0x1b9)+_0x3d25c3+'\x20in\x20'+_0x4eb1ad+'ms\x20(attempt\x20'+_0x449a0d[_0x58fa31(0xa9)]+')'),_0x449a0d[_0x58fa31(0x1f6)]=setTimeout(()=>{const _0x5cd895=_0x58fa31;_0x449a0d['respawnTimer']=null;if(_0x3fe2c6||_0x449a0d[_0x5cd895(0x290)])return;const _0xca6bab=_0x583836(_0x3d25c3);_0xca6bab[_0x5cd895(0x1a6)](_0x5cd895(0xb4),()=>{const _0x4c20bc=_0x5cd895;if(_0x2524f7['get'](_0x3d25c3)===_0x449a0d)_0x449a0d[_0x4c20bc(0xa9)]=0x0;});},_0x4eb1ad),_0x449a0d[_0x58fa31(0x1f6)][_0x58fa31(0x13e)]?.();});const _0x7b7f11=[..._0x1211c1[_0xf4cfb0(0x114)]()];console[_0xf4cfb0(0x2cd)]('[okdb-cluster]\x20primary\x20pid='+process['pid']+_0xf4cfb0(0x2c3)+_0xfd60e9+_0xf4cfb0(0x1ac)+_0x3eae0a+':\x20'+('['+_0x7b7f11[_0xf4cfb0(0x20d)](',\x20')+']'));const _0x5c79fe={'_isClusterController':!![],'port':_0x3eae0a,'primaryOkdb':_0x4720a9??null,'status'(){const _0x2d70a1=_0xf4cfb0;return{'clustered':!![],'primaryPid':process[_0x2d70a1(0x11d)],'port':_0x3eae0a,'primaryRole':_0x4720a9?.[_0x2d70a1(0x119)]??null,'processorPid':null,'supervisorPid':process[_0x2d70a1(0x11d)],'workers':[..._0x1211c1[_0x2d70a1(0x2e6)]()]['map'](({worker:_0x4169de})=>({'pid':_0x4169de[_0x2d70a1(0x13a)][_0x2d70a1(0x11d)],'id':_0x4169de['id'],'dead':_0x4169de[_0x2d70a1(0x267)]()}))};},async 'close'(){const _0xf95f80=_0xf4cfb0;_0x3fe2c6=!![];for(const _0x182306 of _0x2524f7[_0xf95f80(0x2e6)]()){_0x182306[_0xf95f80(0x290)]=!![],_0x182306['respawnTimer']&&(clearTimeout(_0x182306[_0xf95f80(0x1f6)]),_0x182306[_0xf95f80(0x1f6)]=null);}clearInterval(_0x4e6e77);_0x18d9d7&&(clearTimeout(_0x18d9d7),_0x18d9d7=null);_0x4107ac[_0xf95f80(0x191)]('message',_0x550f66),_0x4107ac[_0xf95f80(0x191)](_0xf95f80(0x25d),_0xcd6a45),_0x4720a9?.['events']?.[_0xf95f80(0x191)]?.(_0x10044b[_0xf95f80(0x1ab)],_0x5b32d7);if(_0x4720a9?.[_0xf95f80(0x1f9)]?.[_0xf95f80(0x191)])for(const {event:_0x1fb7f5,handler:_0x35723a}of _0xbdb097){try{_0x4720a9[_0xf95f80(0x1f9)][_0xf95f80(0x191)](_0x1fb7f5,_0x35723a);}catch{}}_0xbdb097[_0xf95f80(0x17e)]=0x0;const _0x1795d2=[..._0x1211c1[_0xf95f80(0x2e6)]()][_0xf95f80(0x173)](({worker:_0x14d71c})=>_0x14d71c);if(_0x1795d2[_0xf95f80(0x17e)]===0x0)return;await Promise[_0xf95f80(0xc5)](_0x1795d2[_0xf95f80(0x173)](_0x3cc97b=>new Promise(_0xc376e1=>{const _0x22757a=_0xf95f80;if(_0x3cc97b[_0x22757a(0x267)]()){_0xc376e1();return;}let _0x327ac1=![];const _0x32bd53=()=>{if(_0x327ac1)return;_0x327ac1=!![];if(_0x3442c9)clearTimeout(_0x3442c9);_0xc376e1();};_0x3cc97b[_0x22757a(0x1a6)](_0x22757a(0x13b),_0x32bd53);const _0x3442c9=setTimeout(()=>{const _0x2f41bb=_0x22757a;try{_0x3cc97b[_0x2f41bb(0x13a)][_0x2f41bb(0x209)]();}catch{}},_0x23daec+0x1f4);_0x3442c9['unref']?.();try{_0x3cc97b[_0x22757a(0x17d)]();}catch{try{_0x3cc97b[_0x22757a(0x13a)][_0x22757a(0x209)]();}catch{}}})));}};return _0x5c79fe;}async function _0x49ca77({makeOkdb:_0x3d8fa2,port:_0x2aa4b3}){const _0x5edcd4=_0x3c1326,_0x2c167b=await _0x3d8fa2();return _0x5a181e(_0x2c167b),_0x2c167b['http'][_0x5edcd4(0xf4)](_0x2aa4b3);}function _0x5a181e(_0x324f28){const _0x5a02d5=_0x3c1326;if(!_0x324f28||_0x324f28['_clusterWorkerAttached'])return;_0x324f28['_clusterWorkerAttached']=!![];try{const {OKDBChangefeed:_0x514158}=requireOkdbChangefeed(),_0x5ba487=_0x324f28[_0x5a02d5(0xc3)];if(_0x5ba487&&typeof _0x5ba487[_0x5a02d5(0x130)]===_0x5a02d5(0x18c)){const _0x4504ca=new _0x514158(_0x324f28);_0x4504ca[_0x5a02d5(0x177)](),_0x5ba487[_0x5a02d5(0x130)](_0x4504ca),_0x324f28[_0x5a02d5(0x2db)]=_0x4504ca;}}catch(_0x567922){_0x324f28[_0x5a02d5(0x2cd)]?.[_0x5a02d5(0x26f)]?.('[okdb-cluster]\x20change-feed\x20init\x20failed:\x20'+(_0x567922?.[_0x5a02d5(0x25d)]??_0x567922),{'feature':_0x5a02d5(0x1c7)});}const _0x4d37b0=_0x4fff9c=>{const _0x19c4f2=_0x5a02d5;if(!_0x4fff9c||typeof _0x4fff9c!=='object'||_0x4fff9c[_0xa47e1c]==null)return;if(_0x4fff9c[_0xa47e1c]===_0x9715ae)try{_0x324f28['_adminRelay']?.['pushEphemeral']?.(_0x4fff9c[_0x19c4f2(0x227)],_0x4fff9c[_0x19c4f2(0xb3)]);}catch{}};process['on'](_0x5a02d5(0x25d),_0x4d37b0),_0x324f28[_0x5a02d5(0x28a)]=_0x4d37b0;{let _0x44dd92=process[_0x5a02d5(0x16c)](),_0x1d911d=Date[_0x5a02d5(0x24a)]();const _0x30b52b=()=>{const _0x4b4a6a=_0x5a02d5;if(typeof process[_0x4b4a6a(0xe9)]!==_0x4b4a6a(0x18c)||!process['connected'])return;const _0x4c8194=Date[_0x4b4a6a(0x24a)](),_0x455284=process[_0x4b4a6a(0x16c)](),_0x4cedeb=(_0x4c8194-_0x1d911d)*0x3e8,_0xa92649=_0x455284['user']-_0x44dd92[_0x4b4a6a(0x10c)]+(_0x455284['system']-_0x44dd92[_0x4b4a6a(0x1fd)]),_0x1f9d33=_0x4cedeb>0x0?Math[_0x4b4a6a(0x22d)](0x64,Math['round'](_0xa92649/(_0x4cedeb*(_0x623a23[_0x4b4a6a(0x206)]()[_0x4b4a6a(0x17e)]||0x1))*0x64)):0x0;_0x44dd92=_0x455284,_0x1d911d=_0x4c8194;const _0x209d07=process[_0x4b4a6a(0xc2)]();let _0x48ae1b=null;try{_0x48ae1b=_0x324f28[_0x4b4a6a(0x119)]?.['processors']?_0x324f28[_0x4b4a6a(0x2bd)]?.[_0x4b4a6a(0x13d)]?.()??null:null;}catch{}try{process['send']({[_0xa47e1c]:_0x477b24,'stats':{'rss':_0x209d07[_0x4b4a6a(0xd5)],'heapUsed':_0x209d07[_0x4b4a6a(0x1f2)],'heapTotal':_0x209d07[_0x4b4a6a(0x2dd)],'external':_0x209d07[_0x4b4a6a(0x189)],'cpuPct':_0x1f9d33,'cpuWindowMs':Math[_0x4b4a6a(0x24b)](_0x4cedeb/0x3e8)||null},'processing':_0x48ae1b});}catch{}},_0x199968=Math[_0x5a02d5(0x2bc)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x1bc8c2=setInterval(_0x30b52b,_0x199968);_0x1bc8c2[_0x5a02d5(0x13e)]?.(),_0x30b52b();for(const _0x2ff64b of[_0x5a02d5(0xc8),'processor:resumed']){_0x324f28[_0x5a02d5(0x1f9)]?.['on']?.(_0x2ff64b,()=>{try{_0x30b52b();}catch{}});}}let _0x26d306=![];const _0x4a3e2d=async _0x4c500d=>{const _0x433aa5=_0x5a02d5;if(_0x26d306)return;_0x26d306=!![];const _0x4eba93=setTimeout(()=>process[_0x433aa5(0x13b)](_0x4c500d),_0x23daec);_0x4eba93[_0x433aa5(0x13e)]?.();try{await _0x324f28[_0x433aa5(0x2b1)]?.();}catch{}process[_0x433aa5(0x13b)](_0x4c500d);};process['on'](_0x5a02d5(0x17d),()=>_0x4a3e2d(0x0));if(process[_0x5a02d5(0xe9)]&&!process[_0x5a02d5(0xfd)])_0x4a3e2d(0x0);if(process[_0x5a02d5(0x125)]!==_0x5a02d5(0x225)){const _0x4a3f5a=setInterval(()=>{const _0x332d46=_0x5a02d5;if(process[_0x332d46(0xfe)]===0x1)_0x4a3e2d(0x0);},_0x43acc7);_0x4a3f5a[_0x5a02d5(0x13e)]?.(),_0x324f28['_clusterOrphanWatch']=_0x4a3f5a;}}return okdbCluster={'runClustered':_0x40dc2f,'attachWorkerCluster':_0x5a181e},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0x4ed60c=_0x5e06fa;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x4e679c=require$$0$5,{attachWorkerCluster:_0x524c2b}=requireOkdbCluster();async function _0x52b2d3(){const _0x2822b9=_0x5881,_0x4c6fbd=process.env.OKDB_HTTP_CHILD;if(!_0x4c6fbd)throw new Error(_0x2822b9(0x255));const {rootPath:_0xd9ac6f,port:_0x45ca6c,options:options={},logLevel:logLevel='info'}=JSON[_0x2822b9(0x14d)](_0x4c6fbd);if(!_0xd9ac6f||!_0x45ca6c)throw new Error(_0x2822b9(0x18b));const _0x194504=new _0x4e679c(_0xd9ac6f,{...options,'engines':![],'processors':![],'compaction':![]});_0x194504[_0x2822b9(0x2cd)][_0x2822b9(0x25a)]?.();const _0x3e8c05=process.env.OKDB_CLUSTER_SLOT??'?',_0x27805e={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x324eb4=_0x27805e[logLevel]??_0x27805e['info'];_0x194504[_0x2822b9(0x2cd)][_0x2822b9(0xaf)](_0xca5fe6=>{const _0x560092=_0x2822b9;if((_0x27805e[_0xca5fe6['level']]??0x1)<_0x324eb4)return;try{process[_0x560092(0xe9)]?.({'__okdbCluster':_0x560092(0x2cd),'slot':_0x3e8c05,'pid':process[_0x560092(0x11d)],'entry':_0xca5fe6});}catch{}}),await _0x194504[_0x2822b9(0x2e5)](),_0x524c2b(_0x194504),await _0x194504[_0x2822b9(0x27f)][_0x2822b9(0xf4)](_0x45ca6c);}return _0x52b2d3()[_0x4ed60c(0x230)](_0x3389f3=>{const _0x38d7ae=_0x4ed60c;try{process[_0x38d7ae(0xe9)]?.({'__okdbCluster':_0x38d7ae(0x2cd),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x38d7ae(0x11d)],'entry':{'level':_0x38d7ae(0x277),'msg':_0x38d7ae(0x246)+(_0x3389f3?.[_0x38d7ae(0x25d)]??_0x3389f3)}});}catch{}process[_0x38d7ae(0x13b)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);function _0x2913(){const _0x1063da=['cluster-wide','FTS_REGISTERED','_flushTimer','prependListener','\x20worker\x20slot=','_publishFailWarned','runtimeProcessesView','lifecycle','toFixed','push','processKey','killable','processors','node','SYSTEM_POKE','once','\x0a\x20\x20\x20\x20\x20\x20','meta','includes','registerIndex','SYSTEM_PROC','\x20HTTP\x20server(s)\x20on\x20port\x20','_handlePoke','\x20sync','_processStartedAt','maxExtra','procmodeack/','maxMs','engines','list','_cursors','_putRowSync','worker','ref:violation','[okdb-cluster]\x20respawning\x20worker\x20slot=','recent\x20writes\x20(newest\x20first)','\x20===','--watch','ttlMs','namespace','_assertUsable','_nodeDead','getRange','online','ensureType','parkedNow','_onPending','135947ifukcg','cluster','_buckets','3QbjGpM','_nodeDbFor','randomUUID','migrations','ITEM_PENDING','resolve','inspect','_publishNow','fn-runner','note','_putRowAsync','reset','_activateProcesses','sync','path','crypto','index:drop','processor:retry','_selfKey','okdb','1ofN:','ESRCH','fts:reset','SYSTEM_STOPPED','_coordinator','compact','_enableChangelog','node:perf_hooks','version',');\x20','claims','release','_quantum','object','claimGated','_outstanding','registry\x20heartbeat\x20skipped\x20(writer=','FTS_RESET','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','system:ready','index:registered','heapUsed','_admissionStarted','_durs','call','respawnTimer','_inflight','MAX_POOL_HOLDS','events','reduce','removeNode','ttl:clear','system','embedded','startedAt','index:progress','default','noteListenAddr','_wantDbOf','INDEX_READY','node:events','cpus','processor','ms/','kill','_migrateVocab','ms\x20max=','removeSync','join','REMOVE','_singletonLocks','some','_lock','_markSeen','startHeartbeat','deaths','stats','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','find','startsWith','system:stopped','singletonClaims','heartbeatMs','bus:proc','_openEnvLazy','write','sync:apply','mode','processor:resumed','removeSupervisedChild','unclaimed','entry','win32','commitP99Ms','event','ENV_CLOSING_RETRY','_refreshDesiredSnapshot','\x20died\x20','listenAddr','ttl:set','min','type','view','catch','_isStale','_held','_startAdmission','fork','count','_singletonLock','appendFileSync','_isWriter','setOwnMeta','cli','force','setLogger','_systemEnv','participate','processor:error','primary','index:reset','_rawDb','INDEX_REGISTERED',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','_ownMeta','http\x20worker\x20child\x20failed:\x20','SIGKILL','value','txn:start','now','round','entries','_onItem','license:activated','childTransaction','_threadStats','mean','_children','nodeKey','openDB','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','none','\x20—\x20','feed:','writerStatus','detachConsole','_log','_cmd','message','add','threads','envsOpen','INDEX_RESET','register','dropType','nodesView','_maybePublish','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','isDead','okdb-diag.','_key','publishOwnRow','standalone','ref:violation_resolved','__okdbCluster','beforeWrite','warn','ttl:expired','caps','slice','_removeRowAsync','reportThreadStats','\x20@\x20','shift','error','seq','decommissioning','floor','holder','\x20pid=','closing','__vocab/version','http','ITEM_REMOVE','isPrimary','getProcess','load','ITEM_UPDATE','transaction','system:poke','1295802EPkkDl','_versionSkewWarned','trim','_clusterOnMessage','\x0a===\x20OKDB_DIAG\x20','dumpedAt','[okdb-cluster]\x20worker\x20pid=','okdb-writer:\x20env\x20closing\x20—\x20retry','tryAcquire','dead','heldBy','workersConfigured','sandbox','cpuPct','percentile','building','_lockDb','null','uncaughtException','_bpParkedTotal','resetting','started','state','perf_hooks','dedupeMax','11reTRmR','_desired','setDesired','_listenAddr','number','supervisorKey','listNodes','_closed','\x20writer{depth=','258NpDLFV','delete','_bpWaiters','_done','getClock','_db','publishChildRow','_pendingLocal','close','recordWrite','repeat','withPoolHold','\x20│\x20','offWindow','_drain','_role','\x20drainAge=','_getType','next','max','processes','~lock','_participate','filter','_rowKey','item:create','\x20forked\x20','slotKey','_buildChildRow','transactionSync','__okdbSlot','inflightAgesMs','fanout','waiting','indexOf','_seen','log','_drainOne','status','loop-lag','epoch','~processes:desired','12968000mFTCOi','stack','fts:registered','stop','raw-put','license:added','code','_writer','_changefeed','ITEM_CREATE','heapTotal','remove','[okdb-cluster]\x20','field:resolver_registered','_started','async','size','_heartbeatTimer','open','values','_heartbeatInFlight','_dedupeMax','~processes','_isReader','stopped','_sandbox','_timer','string','consecutiveFailures','_startHeartbeat','has','_rootDb','running','raw-remove','attach','_statusEnv','_pending','\x20worker(s)\x20remaining','data','listening','freeze','toISOString','ms\x20busy=','_onTick','kind','license:invalid','reap','(code=','enable','instanceId','ORPHAN\x20(env-closed\x20write)','\x20statusEnv=','rows=','memoryUsage','_adminRelay','isActive','all','bus:type_drop','updatedAt','processor:paused','unique:violation','stderr','creating','depth','isEnabled','abs','enabled','prototype','bus:env_release','clusterStatusView','setupPrimary','txn:end','rss','index:ready','race','stringify','./okdb','then','_nestedTotal','__esModule','stopping','change','_flushDebounce','\x20parkedNow=','_admissionTimer','extend','clear','INDEX_PROGRESS','\x20\x20(no\x20env\x20draining)','item:remove','_onPoke',',\x20signal=','send','http-server','--print','get','processor:ready','_wantDbHandle','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','ms\x20on\x20env=','_scheduleFlush','reject','system:proc','listen','_lockDbOf','ms\x20activeWriters=','unique:violation_resolved','\x20(slot=','system:type_drop','ms\x20env=','host','registerFts','connected','ppid','\x20ipc\x20error:\x20','_ensureDesired','sort','workers','_onProcEvent','disable','_holderDead','processing','_handleInProcess','rowKey',')\x20exited\x20','isWorker','type:drop','user','processorId','processor:progress','_handlePending','2.6.3','_highWater','_dedupeKey','_supervisorKey','keys','_wantDb','_desiredOverlay','updateSupervisedChildStats','options','role','_released','decommission','system:clock_change','pid','confirm','execArgv','putNode','committed','4301284qVUrRl','_lastCpuPct','slot','platform','emit','_draining','_report','schema:set','ingest','compaction','_heldTotal','okdb-lock:\x20env\x20closed','license:removed','_onStop','attachFeed','_groupByProcess','quantum','_buildOwnRow','.log','ephemeral','env','split','allSettled','_envs','process','exit','getDesired','_buildProcessingFacet','unref','--test','ms\x20p99=','_collectWriterFacet','splice','cursorKey','_nodeDbCache','env:removed','selfKey','flushDebounce','children','resetReadTxn','hasDesired','_kind','_collectSingletonClaims','parse','_nestedWarned','uptime','processingSig','1548080gHqGOr','item:update','getChanges','instances','txn:rollback','putSync','single','commit','_lastPublishAt','_windowCbs','_startedAt','144epwLBv','_nodeDb','fts:drop','_acquiredAt','test','processingStatusView','isWanted','oldestPendingMs','_lastCpuUsage','hostname','createEnvironment','stopHeartbeat','~processes:cmd','_baselines','node/','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','cpuUsage','registry\x20publish\x20failing:\x20','expiresAt','exports','put','_instanceId','_lastCpuWindowMs','map','assign','_hbTimer','\x20while\x20this\x20process\x20runs\x20','start','name','bumpCmd','set',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','markClosed','disconnect','length','addSupervisedChild','drain','bus:poke','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','getCmd','3131346xWfIkY','okdb-writer[','onWindow','acquiredAt','type:registered','external','_committed','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','function','_enqueuedAt','deregisterSelf','isConnected','--eval','off','390944NcnhAE','replace','_lastCpuAt','_sampleOwnStats','afterWrite'];_0x2913=function(){return _0x1063da;};return _0x2913();}module[_0x5e06fa(0x16f)]=okdbHttpWorkerChild;
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;