@kedem/okdb 1.9.0 → 1.9.2
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 _0x25047a=_0x423a;(function(_0x511dd8,_0x24c5b4){const _0x5b6006=_0x423a,_0x3e9f53=_0x511dd8();while(!![]){try{const _0x4c0b95=parseInt(_0x5b6006(0x2af))/0x1+parseInt(_0x5b6006(0x29a))/0x2+parseInt(_0x5b6006(0x2de))/0x3*(-parseInt(_0x5b6006(0x2ba))/0x4)+parseInt(_0x5b6006(0x24f))/0x5*(parseInt(_0x5b6006(0x29d))/0x6)+parseInt(_0x5b6006(0x2c1))/0x7+parseInt(_0x5b6006(0x1f9))/0x8*(-parseInt(_0x5b6006(0x302))/0x9)+-parseInt(_0x5b6006(0x26c))/0xa;if(_0x4c0b95===_0x24c5b4)break;else _0x3e9f53['push'](_0x3e9f53['shift']());}catch(_0x45c663){_0x3e9f53['push'](_0x3e9f53['shift']());}}}(_0x5cb1,0xaac51));var require$$0$3=require(_0x25047a(0x1dc)),require$$1=require(_0x25047a(0x1e5)),require$$1$1=require(_0x25047a(0x21d)),require$$0$1=require('os'),require$$2=require(_0x25047a(0x32b)),require$$0=require(_0x25047a(0x2a0)),require$$0$2=require(_0x25047a(0x363));function getDefaultExportFromCjs(_0xce993b){const _0x323c0e=_0x25047a;return _0xce993b&&_0xce993b[_0x323c0e(0x2df)]&&Object[_0x323c0e(0x2e3)][_0x323c0e(0x2b5)][_0x323c0e(0x227)](_0xce993b,_0x323c0e(0x326))?_0xce993b[_0x323c0e(0x326)]:_0xce993b;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x85acdc=_0x25047a;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x3d972f={'PUT':_0x85acdc(0x299),'REMOVE':_0x85acdc(0x1e3),'INDEX_DROP':_0x85acdc(0x340),'INDEX_REGISTER':_0x85acdc(0x2e5),'INDEX_RESET':_0x85acdc(0x304),'TYPE_REGISTER':_0x85acdc(0x2b2),'TYPE_DROP':'dropType','FTS_REGISTER':_0x85acdc(0x2c9),'FTS_DROP':_0x85acdc(0x359),'FTS_RESET':'resetFts','SCHEMA_SET':_0x85acdc(0x208),'SCHEMA_DROP':_0x85acdc(0x1bd),'TTL_SET':_0x85acdc(0x29e),'TTL_CLEAR':_0x85acdc(0x224)},_0x5f1795={'SYSTEM_READY':'system:ready','SYSTEM_STOPPED':_0x85acdc(0x277),'SYSTEM_CLOCK_CHANGE':_0x85acdc(0x1c5),'SYSTEM_POKE':_0x85acdc(0x284),'SYSTEM_DRAIN':_0x85acdc(0x249),'SYSTEM_TYPE_DROP':_0x85acdc(0x33f),'SYSTEM_PROC':_0x85acdc(0x2aa),'SYSTEM_BUS_STATE_CHANGE':_0x85acdc(0x27e),'ITEM_CREATE':_0x85acdc(0x255),'ITEM_UPDATE':'item:update','ITEM_REMOVE':'item:remove','INDEX_RESET':'index:reset','INDEX_READY':_0x85acdc(0x334),'INDEX_PROGRESS':_0x85acdc(0x342),'VIEW_PROGRESS':_0x85acdc(0x2a8),'INDEX_DROP':_0x85acdc(0x2c6),'INDEX_REGISTERED':_0x85acdc(0x223),'FTS_REGISTERED':'fts:registered','FTS_DROP':_0x85acdc(0x365),'FTS_RESET':_0x85acdc(0x2d8),'SCHEMA_SET':_0x85acdc(0x35a),'SCHEMA_DROP':_0x85acdc(0x356),'UNIQUE_VIOLATION':_0x85acdc(0x2eb),'UNIQUE_VIOLATION_RESOLVED':_0x85acdc(0x24c),'REF_VIOLATION':_0x85acdc(0x28d),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':'sync:apply','TXN_START':_0x85acdc(0x260),'TXN_END':_0x85acdc(0x1c3),'TXN_ROLLBACK':_0x85acdc(0x218),'TYPE_REGISTERED':_0x85acdc(0x288),'TYPE_DROP':'type:drop','ENV_OPENED':_0x85acdc(0x1e4),'ENV_REMOVED':'env:removed','TTL_EXPIRED':_0x85acdc(0x1e7),'TTL_SET':_0x85acdc(0x22e),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x85acdc(0x27a),'LICENSE_ADDED':_0x85acdc(0x339),'LICENSE_ACTIVATED':_0x85acdc(0x1ec),'LICENSE_REMOVED':_0x85acdc(0x263)},_0x1f4c93={'CREATING':'creating','RESETTING':_0x85acdc(0x262),'READY':'ready','DROPPING':'dropping','WAITING':_0x85acdc(0x333)},_0x5154ec={'CREATED':'created','STARTING':_0x85acdc(0x1df),'STARTED':_0x85acdc(0x293),'STOPPING':_0x85acdc(0x1c2),'STOPPED':_0x85acdc(0x343)},_0x18ae52={'CREATING':_0x85acdc(0x32c),'READY':_0x85acdc(0x30b),'HALTED':_0x85acdc(0x2a4),'STOPPED':_0x85acdc(0x343),'RESETTING':_0x85acdc(0x262)},_0x5f06a4=Object[_0x85acdc(0x30a)]({'POKE':_0x85acdc(0x32e),'DRAIN':_0x85acdc(0x34f),'TYPE_DROP':'bus:type_drop','PROC':_0x85acdc(0x355)});return okdbEnums={'BUS_EVENTS':_0x5f06a4,'CHANGE_ACTIONS':_0x3d972f,'EVENTS':_0x5f1795,'INDEX_STATE':_0x1f4c93,'OKDB_STATE':_0x5154ec,'VIEW_STATE':_0x18ae52},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x3a5058=_0x25047a;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x2f6cd8,performance:_0x2f5493}=require$$0,_0x7a8f2b=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x3a5058(0x287),_0x101051=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x2e3c46=process.env.OKDB_LOOP_LAG_ALL==='1',_0x1be642=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x230346{constructor(){const _0x589f78=_0x3a5058;this[_0x589f78(0x2dd)]=_0x7a8f2b,this[_0x589f78(0x1e6)]=new Map(),this['_h']=null,this[_0x589f78(0x28f)]=null,this[_0x589f78(0x2c3)]=![],this[_0x589f78(0x243)]=(_0x33b71d,_0xa47a96)=>process[_0x589f78(0x2e9)]['write'](_0x33b71d+(_0xa47a96?'\x20'+JSON[_0x589f78(0x259)](_0xa47a96):'')+'\x0a');}[_0x3a5058(0x360)](){const _0x522a37=_0x3a5058;return _0x2f5493[_0x522a37(0x360)]();}[_0x3a5058(0x1e0)](_0x452ede){const _0xabe668=_0x3a5058;if(typeof _0x452ede===_0xabe668(0x1d3))this['_log']=_0x452ede;}[_0x3a5058(0x2cb)](_0x53d3e3,_0x435458,_0x29e36a){const _0x152648=_0x3a5058;if(!this[_0x152648(0x2dd)])return;let _0xef692e=this[_0x152648(0x1e6)]['get'](_0x53d3e3);!_0xef692e&&(_0xef692e={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x152648(0x1e6)][_0x152648(0x345)](_0x53d3e3,_0xef692e)),_0xef692e['ms']+=_0x435458,_0xef692e[_0x152648(0x2bb)]+=0x1,_0x435458>_0xef692e[_0x152648(0x20f)]&&(_0xef692e[_0x152648(0x20f)]=_0x435458,_0xef692e[_0x152648(0x298)]=_0x29e36a||'');}[_0x3a5058(0x252)](_0x4a8327){const _0x7646ff=_0x3a5058;if(!this[_0x7646ff(0x2dd)]||this[_0x7646ff(0x2c3)])return;this['_started']=!![];if(_0x4a8327)this[_0x7646ff(0x243)]=_0x4a8327;this['_h']=_0x2f6cd8({'resolution':0xa}),this['_h']['enable'](),this['_timer']=setInterval(()=>this[_0x7646ff(0x221)](),_0x101051);if(this[_0x7646ff(0x28f)][_0x7646ff(0x337)])this['_timer'][_0x7646ff(0x337)]();}[_0x3a5058(0x310)](_0x2cbca8){const _0x59bfe4=_0x3a5058;if(!this[_0x59bfe4(0x257)])this['_windowCbs']=new Set();this[_0x59bfe4(0x257)][_0x59bfe4(0x2b0)](_0x2cbca8);if(!this['_started'])this['_startAdmission']();}[_0x3a5058(0x318)](_0x22e990){const _0x4e9394=_0x3a5058;this[_0x4e9394(0x257)]?.['delete'](_0x22e990);}['_startAdmission'](){const _0x2d5213=_0x3a5058;if(this[_0x2d5213(0x2e8)])return;this['_admissionStarted']=!![];!this['_h']&&(this['_h']=_0x2f6cd8({'resolution':0xa}),this['_h'][_0x2d5213(0x1c9)]());const _0x3dfce5=_0x101051;this[_0x2d5213(0x328)]=setInterval(()=>{const _0x503493=_0x2d5213,_0x1e27f3=this['_h'];if(!_0x1e27f3)return;const _0x3898cc=_0x1e27f3[_0x503493(0x33b)](0x63)/0xf4240,_0x519725=_0x1e27f3[_0x503493(0x322)]/0xf4240,_0x8057ab=_0x1e27f3['mean']/0xf4240;_0x1e27f3[_0x503493(0x30f)]();if(this[_0x503493(0x257)])for(const _0x1d4eee of this[_0x503493(0x257)]){try{_0x1d4eee({'p99Ms':_0x3898cc,'maxMs':_0x519725,'meanMs':_0x8057ab,'reportMs':_0x3dfce5});}catch{}}},_0x3dfce5);if(this['_admissionTimer'][_0x2d5213(0x337)])this[_0x2d5213(0x328)][_0x2d5213(0x337)]();}[_0x3a5058(0x221)](){const _0x4814d4=_0x3a5058,_0x349b5b=this['_h'],_0x3b042b=_0x349b5b['max']/0xf4240,_0x3aa825=_0x349b5b[_0x4814d4(0x33b)](0x63)/0xf4240,_0x5e890d=_0x349b5b['mean']/0xf4240;_0x349b5b[_0x4814d4(0x30f)]();const _0x281a6f=[...this[_0x4814d4(0x1e6)][_0x4814d4(0x350)]()][_0x4814d4(0x25c)](([_0xb12fcc,_0x41cdfb])=>({'label':_0xb12fcc,..._0x41cdfb}))[_0x4814d4(0x27f)]((_0x2f249b,_0x58e77c)=>_0x58e77c['ms']-_0x2f249b['ms'])[_0x4814d4(0x33c)](0x0,0x8);this[_0x4814d4(0x1e6)][_0x4814d4(0x210)]();const _0x27847a=_0x281a6f[_0x4814d4(0x273)]((_0x387f82,_0x389211)=>_0x387f82+_0x389211['ms'],0x0),_0x45a184=_0x281a6f[_0x4814d4(0x25c)](_0x4f323c=>_0x4f323c[_0x4814d4(0x327)]+'='+_0x4f323c['ms'][_0x4814d4(0x28a)](0x0)+_0x4814d4(0x357)+_0x4f323c[_0x4814d4(0x2bb)]+(_0x4f323c[_0x4814d4(0x20f)]>0x5?_0x4814d4(0x28b)+_0x4f323c[_0x4814d4(0x20f)]['toFixed'](0x0)+'ms'+(_0x4f323c[_0x4814d4(0x298)]?'\x20'+_0x4f323c[_0x4814d4(0x298)]:'')+')':''));(_0x2e3c46||_0x3b042b>=_0x1be642)&&this['_log'](_0x4814d4(0x366)+_0x101051+_0x4814d4(0x2e1)+_0x3b042b[_0x4814d4(0x28a)](0x0)+_0x4814d4(0x341)+_0x3aa825[_0x4814d4(0x28a)](0x0)+_0x4814d4(0x1f6)+_0x5e890d[_0x4814d4(0x28a)](0x0)+_0x4814d4(0x29b)+_0x27847a[_0x4814d4(0x28a)](0x0)+'ms'+(_0x45a184[_0x4814d4(0x2bd)]?_0x4814d4(0x323)+_0x45a184[_0x4814d4(0x21f)]('\x20\x20'):''),{'feature':_0x4814d4(0x22b)});if(this[_0x4814d4(0x257)])for(const _0x54fdd1 of this[_0x4814d4(0x257)]){try{_0x54fdd1({'p99Ms':_0x3aa825,'maxMs':_0x3b042b,'meanMs':_0x5e890d,'reportMs':_0x101051});}catch{}}}['stop'](){const _0x211da0=_0x3a5058;if(this[_0x211da0(0x28f)])clearInterval(this[_0x211da0(0x28f)]);if(this['_h'])this['_h']['disable']();this[_0x211da0(0x28f)]=null,this['_h']=null,this['_started']=![];}}const _0x44b9cf=new _0x230346();if(_0x44b9cf['enabled'])_0x44b9cf[_0x3a5058(0x252)]();return okdbLoopMonitor={'LOOP':_0x44b9cf},okdbLoopMonitor;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x596ac4=_0x25047a;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x453e18=require$$0$1,_0x2b1529=require$$1,_0x2f0c36=require$$2,{LOOP:_0xcb4ae5}=requireOkdbLoopMonitor(),_0x52e4ca='~processes',_0x500fe7=_0x596ac4(0x26e),_0x391f91=_0x596ac4(0x2ce),_0x12c168=_0x596ac4(0x332),_0x1c89d7=(_0x22fb46,_0x14726f)=>_0x22fb46+':'+_0x14726f,_0x2caf82=(_0x186ace,_0x41617c)=>_0x186ace+'::'+_0x41617c,_0x319f85=(_0x3d3df9,_0x46913f)=>_0x3d3df9+'/'+_0x46913f,_0x42f22d=(_0x3f5032,_0x5180a3)=>_0x3f5032+'#'+_0x5180a3,_0x5f04b9=_0x30c20c=>{const _0x478e6d=_0x596ac4;if(_0x30c20c?.[_0x478e6d(0x2a1)])return _0x30c20c['processKey'];const _0x45d877=_0x30c20c?.[_0x478e6d(0x2e2)];return typeof _0x45d877===_0x478e6d(0x1ce)&&_0x45d877[_0x478e6d(0x31d)]('#')?_0x45d877[_0x478e6d(0x33c)](0x0,_0x45d877['indexOf']('#')):_0x45d877;},_0x2f1319=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x202444=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x59f590=_0x2f1319*0x3,_0x3210c0=[_0x596ac4(0x29c),_0x596ac4(0x25f),_0x596ac4(0x211),'processor:error'];let _0x14b48d=null;function _0x5ca4f7(){const _0xfd79b0=_0x596ac4;if(_0x14b48d==null)_0x14b48d=Math[_0xfd79b0(0x2ae)]((Date[_0xfd79b0(0x360)]()-process[_0xfd79b0(0x308)]()*0x3e8)/0x3e8)*0x3e8;return _0x14b48d;}function _0xf9307b(_0x1787c5){const _0x228683=_0x596ac4;if(process.env.OKDB_PROCESS_KILL===_0x228683(0x2d7))return![];if(_0x1787c5?.[_0x228683(0x28e)]?.[_0x228683(0x311)]&&typeof _0x1787c5['options'][_0x228683(0x311)]===_0x228683(0x1ee)&&_0x1787c5[_0x228683(0x28e)]['processes'][_0x228683(0x1e8)]===![])return![];return!![];}function _0x234c1f(_0x484360,_0x169877){const _0x1d6045=_0x596ac4,_0x4f8b53=!!_0x169877?.[_0x1d6045(0x2a5)];switch(_0x484360){case _0x1d6045(0x324):return{'controllable':_0x4f8b53,'decommissionable':![],'killable':!![],'killConfirm':_0x1d6045(0x250)};case _0x1d6045(0x2ec):case _0x1d6045(0x1e9):return{'controllable':_0x4f8b53,'decommissionable':![],'killable':!![],'killConfirm':'confirm'};case _0x1d6045(0x22d):return{'controllable':![],'decommissionable':![],'killable':![]};case'http-server':case _0x1d6045(0x26b):case _0x1d6045(0x215):case _0x1d6045(0x30e):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x1d6045(0x228)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x5a224a{constructor(_0x3702a7){const _0x52e183=_0x596ac4;this[_0x52e183(0x33a)]=_0x3702a7,this['_statusEnv']=null,this['_desired']=null,this[_0x52e183(0x1f0)]=null,this['_isWriter']=![],this['_isReader']=![],this['_processStartedAt']=_0x5ca4f7(),this[_0x52e183(0x1d7)]=_0x1c89d7(process[_0x52e183(0x2e0)],this[_0x52e183(0x2f7)]),this[_0x52e183(0x317)]=_0x2f0c36[_0x52e183(0x1fd)]()[_0x52e183(0x33c)](0x0,0x8),this['_rowKey']=_0x42f22d(this[_0x52e183(0x1d7)],this[_0x52e183(0x317)]),this[_0x52e183(0x315)]=Date[_0x52e183(0x360)](),this['_kind']=null,this[_0x52e183(0x225)]=null,this[_0x52e183(0x20e)]=null,this['_hbTimer']=null,this[_0x52e183(0x1cc)]=null,this[_0x52e183(0x1eb)]=null,this[_0x52e183(0x2be)]=0x0,this[_0x52e183(0x1fa)]={},this[_0x52e183(0x1ea)]=new Map(),this['_lastCpuUsage']=process['cpuUsage'](),this[_0x52e183(0x2d3)]=Date['now'](),this[_0x52e183(0x291)]=0x0,this[_0x52e183(0x254)]=new Map();}get[_0x596ac4(0x336)](){const _0x310bf4=_0x596ac4;return this[_0x310bf4(0x1d7)];}get[_0x596ac4(0x2ff)](){const _0x362f39=_0x596ac4;return this[_0x362f39(0x309)];}[_0x596ac4(0x2ca)](_0x7d9cc3,_0x5f23dd){const _0x2e186a=_0x596ac4,_0x3918d1=_0x234c1f(_0x7d9cc3,_0x5f23dd);if(_0x3918d1[_0x2e186a(0x31e)]&&!_0xf9307b(this[_0x2e186a(0x33a)]))return{..._0x3918d1,'killable':![],'killConfirm':undefined};return _0x3918d1;}['isActive'](){const _0x37b7cc=_0x596ac4;return!!this[_0x37b7cc(0x307)];}[_0x596ac4(0x319)](_0x4137e2){const _0x303f1e=_0x596ac4;Object[_0x303f1e(0x2da)](this[_0x303f1e(0x1fa)],_0x4137e2||{});}[_0x596ac4(0x1ef)](_0x379368){const _0x1573b7=_0x596ac4;if(_0x379368)this[_0x1573b7(0x20e)]=_0x379368;}[_0x596ac4(0x331)](_0x12978d={}){const _0x3da144=_0x596ac4;return this[_0x3da144(0x33a)][_0x3da144(0x2f0)](_0x12978d);}['processingStatusView'](){const _0x576b9e=_0x596ac4;let _0x389eef=null;const _0x3e4142={};for(const _0x325aff of this[_0x576b9e(0x265)]()){const _0x17466d=_0x325aff[_0x576b9e(0x22c)];if(!_0x17466d)continue;if(_0x389eef==null)_0x389eef=_0x17466d[_0x576b9e(0x34e)];for(const _0x3d5a96 of _0x17466d['processors']||[]){if(![_0x576b9e(0x2fc),'fanout',_0x576b9e(0x30e),_0x576b9e(0x2c4)]['includes'](_0x3d5a96['mode']))continue;const _0x570948=_0x3d5a96[_0x576b9e(0x294)]||_0x576b9e(0x326);(_0x3e4142[_0x570948]||=[])['push']({'type':_0x3d5a96['type'],'mode':_0x3d5a96[_0x576b9e(0x25a)],'state':_0x3d5a96[_0x576b9e(0x1d4)],'lastClock':_0x3d5a96[_0x576b9e(0x1be)],'headClock':_0x3d5a96[_0x576b9e(0x27d)],'lag':_0x3d5a96[_0x576b9e(0x2a2)]});}}return{'envs':_0x3e4142,'policy':_0x389eef,'source':_0x576b9e(0x1fe)};}[_0x596ac4(0x2b9)](){const _0x49aea8=_0x596ac4,_0xdfc117=_0x53522a=>{const _0x5f154e=_0x423a;if(_0x53522a[_0x5f154e(0x1d4)]===_0x5f154e(0x226)||_0x53522a[_0x5f154e(0x1d4)]===_0x5f154e(0x2dc)||_0x53522a[_0x5f154e(0x1d4)]==='error')return 0x3;if(_0x53522a[_0x5f154e(0x213)])return 0x1;return 0x2;},_0x1d8d00=new Map();for(const _0x493945 of this[_0x49aea8(0x265)]()){for(const _0x4497cf of _0x493945[_0x49aea8(0x22c)]?.['processors']||[]){const _0x3b54f8={..._0x4497cf,'owner':{'pid':_0x493945[_0x49aea8(0x2e0)]??null,'kind':_0x493945['kind']??null,'host':_0x493945[_0x49aea8(0x248)]??null}},_0x4cf61a=_0x4497cf[_0x49aea8(0x25a)]===_0x49aea8(0x2fc)?_0x49aea8(0x279)+(_0x4497cf['env']??'')+'::'+(_0x4497cf[_0x49aea8(0x20a)]??_0x4497cf[_0x49aea8(0x2cf)]??_0x4497cf['id']):_0x49aea8(0x35f)+(_0x493945[_0x49aea8(0x2e2)]??_0x493945['processKey']??'')+'::'+(_0x4497cf['env']??'')+'::'+_0x4497cf['id'],_0x570e5a=_0x1d8d00['get'](_0x4cf61a);if(!_0x570e5a||_0xdfc117(_0x3b54f8)>_0xdfc117(_0x570e5a))_0x1d8d00[_0x49aea8(0x345)](_0x4cf61a,_0x3b54f8);}}return[..._0x1d8d00['values']()];}['clusterStatusView'](){const _0x8440d6=_0x596ac4,_0x55e0fb=Date[_0x8440d6(0x360)](),_0x175850=this['listNodes'](),_0xcd71d6=_0x40735b=>Math[_0x8440d6(0x322)](0x0,Math['round']((_0x55e0fb-(_0x40735b[_0x8440d6(0x268)]||_0x55e0fb))/0x3e8)),_0x454db2=_0x175850[_0x8440d6(0x2ea)](_0x4f7f9d=>_0x4f7f9d[_0x8440d6(0x27c)]===_0x8440d6(0x324)),_0xc8b164=_0x175850[_0x8440d6(0x2ab)](_0x128055=>_0x128055[_0x8440d6(0x27c)]===_0x8440d6(0x346));if(_0x454db2||_0xc8b164[_0x8440d6(0x2bd)])return{'primary':_0x454db2?{'pid':_0x454db2[_0x8440d6(0x2e0)],'uptime':_0xcd71d6(_0x454db2)}:null,'workers':_0xc8b164[_0x8440d6(0x25c)](_0x392199=>({'pid':_0x392199['pid'],'uptime':_0xcd71d6(_0x392199)})),'workersConfigured':_0x454db2?.[_0x8440d6(0x33d)]?.[_0x8440d6(0x233)]??_0xc8b164[_0x8440d6(0x2bd)],'mode':_0x8440d6(0x1e5)};const _0x5dc22c=_0x175850[_0x8440d6(0x2ea)](_0x3ba608=>_0x3ba608[_0x8440d6(0x27c)]===_0x8440d6(0x2ec)||_0x3ba608[_0x8440d6(0x27c)]===_0x8440d6(0x1e9)||_0x3ba608[_0x8440d6(0x27c)]===_0x8440d6(0x22d)),_0x50ba05=_0x5dc22c?{'pid':_0x5dc22c['pid'],'uptime':_0xcd71d6(_0x5dc22c)}:{'pid':process[_0x8440d6(0x2e0)],'uptime':Math[_0x8440d6(0x322)](0x0,Math[_0x8440d6(0x2ae)](process[_0x8440d6(0x308)]()))};return{'primary':_0x50ba05,'workers':[_0x50ba05],'workersConfigured':0x1,'mode':'single'};}['nodesView'](){const _0x5197a3=_0x596ac4;return this[_0x5197a3(0x2d6)]();}[_0x596ac4(0x1c6)](){const _0x56a377=_0x596ac4,_0x28fd7d=new Map();for(const _0x4b5298 of this[_0x56a377(0x2d6)]())_0x28fd7d['set'](_0x4b5298['processKey'],{..._0x4b5298,'children':[]});const _0x56ea54=[];for(const _0x6e378b of _0x28fd7d[_0x56a377(0x22a)]()){const _0x4e6c1f=_0x6e378b[_0x56a377(0x281)]?_0x28fd7d[_0x56a377(0x2bf)](_0x6e378b[_0x56a377(0x281)]):null;if(_0x4e6c1f&&_0x4e6c1f!==_0x6e378b)_0x4e6c1f[_0x56a377(0x286)]['push'](_0x6e378b);else _0x56ea54['push'](_0x6e378b);}const _0x8b2f3=(_0x298bc1,_0x4c4055)=>_0x298bc1[_0x56a377(0x27c)]===_0x4c4055[_0x56a377(0x27c)]?(_0x298bc1['pid']||0x0)-(_0x4c4055[_0x56a377(0x2e0)]||0x0):(_0x298bc1['kind']??'')<(_0x4c4055[_0x56a377(0x27c)]??'')?-0x1:0x1,_0x3dfc04=_0x272527=>{const _0x1be498=_0x56a377;_0x272527[_0x1be498(0x27f)](_0x8b2f3);for(const _0x557c4e of _0x272527)if(_0x557c4e[_0x1be498(0x286)][_0x1be498(0x2bd)])_0x3dfc04(_0x557c4e['children']);};return _0x3dfc04(_0x56ea54),_0x56ea54;}[_0x596ac4(0x23f)](_0xf8feb4){const _0xe7adaa=_0x596ac4;return this['_groupByProcess']()[_0xe7adaa(0x2ea)](_0x19328d=>_0x19328d[_0xe7adaa(0x2a1)]===_0xf8feb4)??null;}[_0x596ac4(0x2d6)](_0x52eea0=Date[_0x596ac4(0x360)]()){const _0x251bf2=_0x596ac4,_0x564c68=new Map();for(const _0x379341 of this['listNodes']()){const _0x2c1260=_0x5f04b9(_0x379341);let _0x3b4708=_0x564c68[_0x251bf2(0x2bf)](_0x2c1260);!_0x3b4708&&(_0x3b4708={'processKey':_0x2c1260,'nodeKey':_0x2c1260,'pid':_0x379341['pid'],'ppid':_0x379341['ppid']??null,'host':_0x379341[_0x251bf2(0x248)]??null,'kind':_0x379341[_0x251bf2(0x27c)],'role':null,'supervisorKey':_0x379341['supervisorKey']??null,'slot':_0x379341[_0x251bf2(0x1c1)]??null,'slotKey':_0x379341['slotKey']??null,'caps':_0x379341[_0x251bf2(0x209)]??null,'lifecycle':_0x379341['lifecycle']??null,'uptime':Math[_0x251bf2(0x322)](0x0,Math[_0x251bf2(0x2ae)]((_0x52eea0-(_0x379341['startedAt']||_0x52eea0))/0x3e8)),'startedAt':_0x379341['startedAt']??null,'meta':_0x379341['meta']??null,'listenAddr':null,'processing':null,'stats':null,'instances':[]},_0x564c68[_0x251bf2(0x345)](_0x2c1260,_0x3b4708));_0x3b4708['instances'][_0x251bf2(0x276)]({'instanceId':_0x379341[_0x251bf2(0x271)]??null,'role':_0x379341[_0x251bf2(0x2ee)]??null,'listenAddr':_0x379341[_0x251bf2(0x354)]??null,'lifecycle':_0x379341['lifecycle']??null,'processing':_0x379341[_0x251bf2(0x22c)]??null});if(!_0x3b4708['role']&&_0x379341[_0x251bf2(0x2ee)])_0x3b4708[_0x251bf2(0x2ee)]=_0x379341['role'];if(!_0x3b4708[_0x251bf2(0x354)]&&_0x379341[_0x251bf2(0x354)])_0x3b4708[_0x251bf2(0x354)]=_0x379341['listenAddr'];if(!_0x3b4708[_0x251bf2(0x22c)]&&_0x379341[_0x251bf2(0x22c)])_0x3b4708['processing']=_0x379341[_0x251bf2(0x22c)];if(_0x3b4708['caps']==null&&_0x379341[_0x251bf2(0x209)])_0x3b4708['caps']=_0x379341[_0x251bf2(0x209)];if(_0x379341['stats']&&(!_0x3b4708[_0x251bf2(0x247)]||(_0x379341[_0x251bf2(0x247)]['at']??0x0)>(_0x3b4708['stats']['at']??0x0)))_0x3b4708['stats']=_0x379341['stats'];}return[..._0x564c68[_0x251bf2(0x22a)]()];}[_0x596ac4(0x33e)](){const _0x5dbe34=_0x596ac4,_0x2ac7a4=[],_0x1a9434={'rss':0x0,'heapUsed':0x0,'processes':0x0};for(const _0x33884d of this[_0x5dbe34(0x2d6)]()){_0x2ac7a4[_0x5dbe34(0x276)]({'processKey':_0x33884d[_0x5dbe34(0x2a1)],'kind':_0x33884d[_0x5dbe34(0x27c)],'pid':_0x33884d[_0x5dbe34(0x2e0)],'supervisorKey':_0x33884d[_0x5dbe34(0x281)],'meta':_0x33884d[_0x5dbe34(0x33d)]??null,'uptime':_0x33884d[_0x5dbe34(0x308)],'stats':_0x33884d[_0x5dbe34(0x247)]??null}),_0x1a9434[_0x5dbe34(0x311)]++,_0x33884d[_0x5dbe34(0x247)]&&(_0x1a9434['rss']+=_0x33884d[_0x5dbe34(0x247)][_0x5dbe34(0x1d5)]||0x0,_0x1a9434[_0x5dbe34(0x204)]+=(_0x33884d[_0x5dbe34(0x247)][_0x5dbe34(0x204)]||0x0)+(_0x33884d[_0x5dbe34(0x247)][_0x5dbe34(0x2c8)]?.[_0x5dbe34(0x204)]||0x0));}return{'totals':_0x1a9434,'nodes':_0x2ac7a4};}async[_0x596ac4(0x344)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x1b21d4=_0x596ac4;this['_isWriter']=this[_0x1b21d4(0x242)]||!!writer,this['_isReader']=this[_0x1b21d4(0x1e2)]||!!reader,this['_kind']=kind||this[_0x1b21d4(0x2f2)]||(_0x2b1529[_0x1b21d4(0x28c)]?_0x1b21d4(0x346):_0x1b21d4(0x2ec)),this[_0x1b21d4(0x225)]=supervisorKey??this[_0x1b21d4(0x225)],this['_listenAddr']=listenAddr??this[_0x1b21d4(0x20e)],this[_0x1b21d4(0x2d1)]();if(!writer&&!reader)return null;if(!this['_statusEnv']){const _0x3b9e69=await this[_0x1b21d4(0x33a)][_0x1b21d4(0x256)](_0x52e4ca,{'sync':![],'durability':_0x1b21d4(0x24e)});if(!_0x3b9e69[_0x1b21d4(0x235)](_0x500fe7))await _0x3b9e69['registerType'](_0x500fe7);this[_0x1b21d4(0x307)]=_0x3b9e69;}return this[_0x1b21d4(0x307)];}[_0x596ac4(0x2a9)](){const _0x27a54a=_0x596ac4;return this[_0x27a54a(0x20d)]!==this[_0x27a54a(0x307)]&&(this[_0x27a54a(0x20d)]=this[_0x27a54a(0x307)],this[_0x27a54a(0x283)]=this['_statusEnv'][_0x27a54a(0x338)](_0x500fe7)[_0x27a54a(0x26f)]),this[_0x27a54a(0x283)];}['_putRowAsync'](_0x4d37b3){const _0x57eb30=_0x596ac4,_0x507fe4=this[_0x57eb30(0x2a9)]()['put'](_0x4d37b3[_0x57eb30(0x2e2)],_0x4d37b3,0x1);if(_0x507fe4&&typeof _0x507fe4['then']===_0x57eb30(0x1d3))_0x507fe4[_0x57eb30(0x316)](undefined,()=>{});return _0x507fe4;}[_0x596ac4(0x1c0)](_0x436207){const _0x36b21e=_0x596ac4,_0x583374=this[_0x36b21e(0x2a9)]()[_0x36b21e(0x1e3)](_0x436207);if(_0x583374&&typeof _0x583374[_0x36b21e(0x316)]==='function')_0x583374['then'](undefined,()=>{});return _0x583374;}async['putNode'](_0x9d5069){const _0x3b58fe=_0x596ac4;if(!this[_0x3b58fe(0x307)]||!this[_0x3b58fe(0x242)]||!_0x9d5069?.[_0x3b58fe(0x2e2)])return;return this[_0x3b58fe(0x2d5)](_0x9d5069);}async[_0x596ac4(0x1db)](_0x1c836c){const _0xbadbe9=_0x596ac4;if(!this['_statusEnv']||!this['_isWriter']||!_0x1c836c)return;const _0x598cae=_0x1c836c['includes']('#'),_0x3c474c=[];for(const {key:_0x41d6e3}of this[_0xbadbe9(0x307)][_0xbadbe9(0x30d)](_0x500fe7)){if(_0x41d6e3===_0x1c836c||!_0x598cae&&typeof _0x41d6e3==='string'&&_0x41d6e3[_0xbadbe9(0x301)](_0x1c836c+'#'))_0x3c474c[_0xbadbe9(0x276)](_0x41d6e3);}return Promise[_0xbadbe9(0x296)](_0x3c474c['map'](_0x1af24d=>this[_0xbadbe9(0x1c0)](_0x1af24d)));}[_0x596ac4(0x26a)](_0xa302e4){const _0x3d8145=_0x596ac4;if(typeof _0xa302e4?.[_0x3d8145(0x2e0)]!=='number')return![];if(_0xa302e4[_0x3d8145(0x248)]!==_0x453e18['hostname']())return![];if(_0xa302e4[_0x3d8145(0x2e0)]===process[_0x3d8145(0x2e0)])return![];try{return process[_0x3d8145(0x1e8)](_0xa302e4[_0x3d8145(0x2e0)],0x0),![];}catch(_0x494c68){return _0x494c68[_0x3d8145(0x2e6)]===_0x3d8145(0x205);}}[_0x596ac4(0x265)](){const _0x19315d=_0x596ac4;if(!this[_0x19315d(0x307)])return[];const _0x57afb3=Date[_0x19315d(0x360)](),_0x574534=[];for(const {value:_0x370a18}of this[_0x19315d(0x307)][_0x19315d(0x30d)](_0x500fe7)){if(_0x370a18&&(_0x370a18[_0x19315d(0x31c)]==null||_0x370a18[_0x19315d(0x31c)]>=_0x57afb3)&&!this[_0x19315d(0x26a)](_0x370a18))_0x574534['push'](_0x370a18);}return _0x574534;}[_0x596ac4(0x1f7)](_0x304558=0x0){const _0x30aead=_0x596ac4;if(!this[_0x30aead(0x307)]||!this[_0x30aead(0x242)])return;const _0xf53c5b=Date[_0x30aead(0x360)]()-_0x304558,_0x45f48c=new Set(),_0x4b2da2=[];for(const {key:_0x438742,value:_0x172cee}of this[_0x30aead(0x307)][_0x30aead(0x30d)](_0x500fe7)){if(_0x172cee&&(_0x172cee[_0x30aead(0x31c)]!=null&&_0x172cee[_0x30aead(0x31c)]<_0xf53c5b||this[_0x30aead(0x26a)](_0x172cee)))_0x4b2da2[_0x30aead(0x276)](_0x438742);else _0x45f48c[_0x30aead(0x2b0)](_0x5f04b9(_0x172cee)??_0x438742);}for(const _0x4b62fe of _0x4b2da2)this[_0x30aead(0x1c0)](_0x4b62fe);if(this[_0x30aead(0x2d1)]())for(const {key:_0x171b5b}of this[_0x30aead(0x1d0)](_0x30aead(0x26e))){if(!_0x45f48c['has'](_0x171b5b))this['_desired'][_0x30aead(0x2e4)](_0x30aead(0x2b4)+_0x171b5b);}}[_0x596ac4(0x222)](_0x157995=null){const _0x577d60=_0x596ac4;if(this[_0x577d60(0x274)]||!this[_0x577d60(0x242)]||!this[_0x577d60(0x307)])return;this[_0x577d60(0x1eb)]=_0x157995,this[_0x577d60(0x1cc)]=()=>this[_0x577d60(0x229)]();for(const _0x119a1b of _0x3210c0)this['okdb'][_0x577d60(0x1c7)]['on'](_0x119a1b,this[_0x577d60(0x1cc)]);this[_0x577d60(0x1c4)]();const _0x5a14f0=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x2f1319;this[_0x577d60(0x274)]=setInterval(()=>{const _0x393a03=_0x577d60;if(this['_onTick'])try{this[_0x393a03(0x1eb)]();}catch{}this[_0x393a03(0x1c4)](),this['reap']();},_0x5a14f0);if(this['_hbTimer'][_0x577d60(0x337)])this['_hbTimer'][_0x577d60(0x337)]();}[_0x596ac4(0x229)](){const _0x5ee00b=_0x596ac4;if(!this[_0x5ee00b(0x242)]||!this[_0x5ee00b(0x307)])return;if(Date[_0x5ee00b(0x360)]()-this[_0x5ee00b(0x2be)]<_0x202444)return;this[_0x5ee00b(0x1c4)]();}[_0x596ac4(0x1c4)](){const _0x43ab3b=_0x596ac4;if(!this[_0x43ab3b(0x242)]||!this['_statusEnv'])return;this['_lastPublishAt']=Date['now']();try{const _0x2cfbea=[this[_0x43ab3b(0x2f9)]()];for(const _0x3dd657 of this[_0x43ab3b(0x1ea)][_0x43ab3b(0x22a)]())_0x2cfbea[_0x43ab3b(0x276)](this['_buildChildRow'](_0x3dd657));const _0x12ed4a=_0xcb4ae5[_0x43ab3b(0x2dd)]?_0xcb4ae5[_0x43ab3b(0x360)]():0x0,_0x24dc57=Promise[_0x43ab3b(0x296)](_0x2cfbea['map'](_0x41804c=>this[_0x43ab3b(0x2d5)](_0x41804c)))[_0x43ab3b(0x2fa)](()=>{});if(_0xcb4ae5[_0x43ab3b(0x2dd)])_0xcb4ae5[_0x43ab3b(0x2cb)](_0x43ab3b(0x2ac),_0xcb4ae5[_0x43ab3b(0x360)]()-_0x12ed4a,'rows='+_0x2cfbea[_0x43ab3b(0x2bd)]);return _0x24dc57;}catch{}}async[_0x596ac4(0x35b)](){const _0x160dc4=_0x596ac4;if(this[_0x160dc4(0x1cc)]){for(const _0x2cdc77 of _0x3210c0){try{this[_0x160dc4(0x33a)][_0x160dc4(0x1c7)][_0x160dc4(0x2d7)](_0x2cdc77,this[_0x160dc4(0x1cc)]);}catch{}}this['_onProcEvent']=null;}this['_hbTimer']&&(clearInterval(this['_hbTimer']),this[_0x160dc4(0x274)]=null);try{if(this[_0x160dc4(0x307)]&&this[_0x160dc4(0x242)])await this['removeNode'](this['_rowKey']);}catch{}}async[_0x596ac4(0x269)](){const _0xf523e7=_0x596ac4;if(!this[_0xf523e7(0x307)]||!this[_0xf523e7(0x242)])return;try{await this[_0xf523e7(0x1db)](this[_0xf523e7(0x309)]);}catch{}try{const _0x5d470b=[];for(const {value:_0x10a812}of this['_statusEnv']['getRange'](_0x500fe7)){if(_0x10a812?.['ppid']===process['pid']&&_0x10a812['nodeKey'])_0x5d470b[_0xf523e7(0x276)](_0x10a812[_0xf523e7(0x2e2)]);}for(const _0x53ce6a of _0x5d470b){try{await this[_0xf523e7(0x1db)](_0x53ce6a);}catch{}}}catch{}}async['publishOwnRow'](){const _0x468ce8=_0x596ac4;return this['putNode'](this[_0x468ce8(0x2f9)]());}async[_0x596ac4(0x1f8)](_0x25a60e){const _0x2dc5ae=_0x596ac4;if(!this['_statusEnv']||!this[_0x2dc5ae(0x242)])return;return this[_0x2dc5ae(0x305)](this[_0x2dc5ae(0x25e)](_0x25a60e));}[_0x596ac4(0x25e)]({pid:_0x3c8938,startedAt:_0x2395bc,kind:_0x11a4a5,supervisorKey:_0x2196d1,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x596ac4(0x1da),meta:meta=null,stats:stats=null}){const _0x5b5b28=_0x596ac4,_0x1e1cf8=Date[_0x5b5b28(0x360)](),_0x29b133=_0x1c89d7(_0x3c8938,_0x2395bc);return{'nodeKey':_0x42f22d(_0x29b133,'0'),'processKey':_0x29b133,'instanceId':'0','pid':_0x3c8938,'startedAt':_0x2395bc,'ppid':process[_0x5b5b28(0x2e0)],'host':_0x453e18[_0x5b5b28(0x23c)](),'supervisorKey':_0x2196d1,'slot':slot,'slotKey':slotKey,'kind':_0x11a4a5,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x1e1cf8,'expiresAt':_0x1e1cf8+_0x59f590,'caps':this['_caps'](_0x11a4a5,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x596ac4(0x1d2)](_0x579c32){const _0x3475ab=_0x596ac4;if(!_0x579c32?.[_0x3475ab(0x2e0)])return null;const _0xdabb8a=_0x1c89d7(_0x579c32[_0x3475ab(0x2e0)],_0x579c32[_0x3475ab(0x268)]);this[_0x3475ab(0x1ea)][_0x3475ab(0x345)](_0xdabb8a,{..._0x579c32,'supervisorKey':_0x579c32[_0x3475ab(0x281)]??this[_0x3475ab(0x1d7)]});if(this['_isWriter'])await this[_0x3475ab(0x1f8)](this[_0x3475ab(0x1ea)]['get'](_0xdabb8a))['catch']?.(()=>{});return _0xdabb8a;}[_0x596ac4(0x240)](_0x46d941){const _0x507528=_0x596ac4;if(!_0x46d941)return;return this[_0x507528(0x1ea)][_0x507528(0x251)](_0x46d941),this[_0x507528(0x1db)](_0x46d941);}['_sampleOwnStats'](){const _0x2220c3=_0x596ac4,_0x11dbe4=Date['now'](),_0x435e8f=process[_0x2220c3(0x2d2)](),_0x504f78=(_0x11dbe4-this['_lastCpuAt'])*0x3e8;if(_0x504f78>=0x3d090){const _0x559c4b=_0x435e8f[_0x2220c3(0x1fb)]-this[_0x2220c3(0x34b)][_0x2220c3(0x1fb)]+(_0x435e8f[_0x2220c3(0x212)]-this[_0x2220c3(0x34b)][_0x2220c3(0x212)]),_0x5bb629=_0x453e18[_0x2220c3(0x214)]()[_0x2220c3(0x2bd)]||0x1;this[_0x2220c3(0x291)]=Math[_0x2220c3(0x2bc)](0x64,Math['round'](_0x559c4b/(_0x504f78*_0x5bb629)*0x64)),this['_lastCpuWindowMs']=Math[_0x2220c3(0x2ae)](_0x504f78/0x3e8),this[_0x2220c3(0x34b)]=_0x435e8f,this[_0x2220c3(0x2d3)]=_0x11dbe4;}const _0x4f1db9=process['memoryUsage']();let _0x47b7a3=null;if(this[_0x2220c3(0x254)][_0x2220c3(0x24a)]>0x0){let _0x1fc091=0x0;for(const _0x14af86 of this[_0x2220c3(0x254)][_0x2220c3(0x22a)]())_0x1fc091+=_0x14af86[_0x2220c3(0x204)]||0x0;_0x47b7a3={'count':this[_0x2220c3(0x254)][_0x2220c3(0x24a)],'heapUsed':_0x1fc091};}return{'rss':_0x4f1db9[_0x2220c3(0x1d5)],'heapUsed':_0x4f1db9[_0x2220c3(0x204)],'heapTotal':_0x4f1db9['heapTotal'],'external':_0x4f1db9[_0x2220c3(0x266)],'cpuPct':this[_0x2220c3(0x291)],'cpuWindowMs':this[_0x2220c3(0x349)]??null,'threads':_0x47b7a3,'at':_0x11dbe4};}[_0x596ac4(0x24d)](_0x47a11a,_0x39ff80){if(!_0x47a11a||!_0x39ff80)return;this['_threadStats']['set'](_0x47a11a,_0x39ff80);}['clearThreadStats'](_0x47f226){this['_threadStats']['delete'](_0x47f226);}[_0x596ac4(0x234)](_0xce6459,_0x153c7f,_0x1f9443=undefined){const _0x4f7440=_0x596ac4,_0x5bdaf2=this[_0x4f7440(0x1ea)]['get'](_0xce6459);if(!_0x5bdaf2||!_0x153c7f)return;if(_0x1f9443!==undefined)_0x5bdaf2[_0x4f7440(0x22c)]=_0x1f9443;_0x5bdaf2['stats']={'rss':_0x153c7f['rss']??null,'heapUsed':_0x153c7f['heapUsed']??null,'heapTotal':_0x153c7f[_0x4f7440(0x203)]??null,'external':_0x153c7f[_0x4f7440(0x266)]??null,'cpuPct':_0x153c7f[_0x4f7440(0x2db)]??null,'cpuWindowMs':_0x153c7f[_0x4f7440(0x313)]??null,'threads':_0x153c7f[_0x4f7440(0x2c8)]??null,'claims':_0x153c7f[_0x4f7440(0x320)]??null,'envsOpen':_0x153c7f[_0x4f7440(0x31a)]??null,'at':Date['now']()};}[_0x596ac4(0x2f9)](){const _0x403c60=_0x596ac4,_0x2bc253=Date[_0x403c60(0x360)](),_0x2a99fd=this['okdb']['_role']||{},_0x57e22a=this['_kind']||_0x403c60(0x2ec);return{'nodeKey':this[_0x403c60(0x309)],'processKey':this['_selfKey'],'instanceId':this[_0x403c60(0x317)],'pid':process[_0x403c60(0x2e0)],'startedAt':this[_0x403c60(0x2f7)],'instanceStartedAt':this[_0x403c60(0x315)],'ppid':typeof process[_0x403c60(0x2fb)]===_0x403c60(0x238)?process['ppid']:null,'host':_0x453e18[_0x403c60(0x23c)](),'supervisorKey':this[_0x403c60(0x225)]??null,'kind':_0x57e22a,'role':{'engines':!!_0x2a99fd[_0x403c60(0x23d)],'asyncProcessors':!!_0x2a99fd[_0x403c60(0x2a5)],'compaction':_0x2a99fd[_0x403c60(0x202)],'http':_0x2a99fd[_0x403c60(0x1f5)]},'listenAddr':this[_0x403c60(0x20e)]??null,'heartbeatAt':_0x2bc253,'expiresAt':_0x2bc253+_0x59f590,'caps':this[_0x403c60(0x2ca)](_0x57e22a,_0x2a99fd),'lifecycle':{'state':_0x403c60(0x1da),'desiredVersionApplied':null},'meta':{...this['_ownMeta']},'processing':_0x2a99fd[_0x403c60(0x2a5)]?this['_buildProcessingFacet']():null,'stats':this[_0x403c60(0x244)]()};}[_0x596ac4(0x2ef)](){const _0x5432e9=_0x596ac4,_0x500beb=[];try{for(const [_0x9e49b1,_0x2ec64d]of this[_0x5432e9(0x33a)]['_envs']){if(_0x9e49b1[_0x5432e9(0x301)]('~'))continue;for(const _0x56c5fe of _0x2ec64d[_0x5432e9(0x34a)][_0x5432e9(0x237)]())_0x500beb['push']({..._0x56c5fe,'env':_0x9e49b1});}}catch{}return{'policy':this[_0x5432e9(0x33a)][_0x5432e9(0x2e7)]??null,'processors':_0x500beb};}['_ensureDesired'](){const _0x5c62b4=_0x596ac4;if(this[_0x5c62b4(0x24b)])return!![];const _0x352bac=this[_0x5c62b4(0x33a)]['_rootDb'];if(!_0x352bac)return![];return this[_0x5c62b4(0x24b)]=_0x352bac[_0x5c62b4(0x35c)](_0x391f91,{'dupSort':![]}),this[_0x5c62b4(0x1f0)]=_0x352bac['openDB'](_0x12c168,{'dupSort':![]}),!![];}[_0x596ac4(0x29f)](){return!!this['_desired'];}[_0x596ac4(0x32a)](_0x5d90b6,_0x4b1c91){const _0x49d74b=_0x596ac4;if(!this[_0x49d74b(0x2d1)]())return null;return this[_0x49d74b(0x24b)][_0x49d74b(0x2bf)](_0x5d90b6+'/'+_0x4b1c91)??null;}[_0x596ac4(0x2cc)](_0x37b3af,_0x35cc32,_0x2a1591){const _0x82a5af=_0x596ac4;if(!this[_0x82a5af(0x2d1)]())return null;const _0x5addbb=_0x37b3af+'/'+_0x35cc32;let _0x68f1b7;return this[_0x82a5af(0x24b)]['transactionSync'](()=>{const _0x1252bb=_0x82a5af,_0x592873=this[_0x1252bb(0x24b)][_0x1252bb(0x2bf)](_0x5addbb)||{'version':0x0};_0x68f1b7=(_0x592873[_0x1252bb(0x300)]||0x0)+0x1,this['_desired'][_0x1252bb(0x299)](_0x5addbb,{..._0x592873,..._0x2a1591,'version':_0x68f1b7,'updatedAt':Date[_0x1252bb(0x360)]()});}),_0x68f1b7;}[_0x596ac4(0x1d0)](_0x29ab2e){const _0x24ff24=_0x596ac4;if(!this['_ensureDesired']())return[];const _0x25833a=_0x29ab2e+'/',_0x308c37=[];for(const {key:_0xfe04ed,value:_0xa954af}of this[_0x24ff24(0x24b)]['getRange']({'start':_0x25833a,'end':_0x25833a+'ÿ'})){if(typeof _0xfe04ed!==_0x24ff24(0x1ce)||!_0xfe04ed[_0x24ff24(0x301)](_0x25833a))break;_0x308c37[_0x24ff24(0x276)]({'key':_0xfe04ed['slice'](_0x25833a['length']),'value':_0xa954af});}return _0x308c37;}['getCmd'](_0x5f1b54){const _0x959de1=_0x596ac4;if(!this[_0x959de1(0x2d1)]())return null;return this[_0x959de1(0x1f0)][_0x959de1(0x2bf)](_0x5f1b54)??null;}[_0x596ac4(0x351)](_0x2d6307,_0x3aaec1,_0x1ceee3={}){const _0x193d8d=_0x596ac4;if(!this[_0x193d8d(0x2d1)]())return null;let _0x397fa5;return this[_0x193d8d(0x1f0)][_0x193d8d(0x34c)](()=>{const _0x3f52da=_0x193d8d,_0x2997d4=this[_0x3f52da(0x1f0)][_0x3f52da(0x2bf)](_0x2d6307)||{'epoch':0x0};_0x397fa5=(_0x2997d4['epoch']||0x0)+0x1,this[_0x3f52da(0x1f0)][_0x3f52da(0x299)](_0x2d6307,{..._0x2997d4,..._0x1ceee3,'cmd':_0x3aaec1,'epoch':_0x397fa5,'updatedAt':Date[_0x3f52da(0x360)]()});}),_0x397fa5;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x5a224a,'nodeKey':_0x1c89d7,'logicalKey':_0x2caf82,'slotKey':_0x319f85,'PROCESS_ENV':_0x52e4ca,'NODE_TYPE':_0x500fe7},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x3bc899=_0x25047a;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x183737=require$$0$2,{EVENTS:_0x26493e,CHANGE_ACTIONS:_0x34caee}=requireOkdbEnums(),{LOOP:_0x801754}=requireOkdbLoopMonitor(),_0x24a446=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x54c468=0x5,_0x60d40e=0x2710;class _0x4be66e extends _0x183737{constructor(_0x4073ae,_0x16de58={}){const _0x513cb4=_0x423a;super(),this[_0x513cb4(0x33a)]=_0x4073ae,this[_0x513cb4(0x272)]=_0x16de58[_0x513cb4(0x2cd)]??_0x24a446,this[_0x513cb4(0x2c2)]=_0x16de58['flushDebounce']??_0x54c468,this['_dedupeMax']=_0x16de58[_0x513cb4(0x1f1)]??_0x60d40e,this[_0x513cb4(0x2c3)]=![],this['_cursors']=new Map(),this[_0x513cb4(0x282)]=new Map(),this['_pending']=new Map(),this[_0x513cb4(0x1d9)]=null,this[_0x513cb4(0x362)]=![],this['_seen']=new Set(),this[_0x513cb4(0x1f4)]=_0x50e7ce=>this[_0x513cb4(0x217)](_0x50e7ce),this[_0x513cb4(0x1ed)]=_0x325efd=>this[_0x513cb4(0x31f)](_0x325efd),this[_0x513cb4(0x270)]=()=>this[_0x513cb4(0x1de)]();}[_0x3bc899(0x252)](){const _0x3f7ab7=_0x3bc899;if(this['_started'])return;this['_started']=!![];for(const [_0x3800bb,_0x236673]of this[_0x3f7ab7(0x33a)][_0x3f7ab7(0x1e1)]){if(_0x3800bb[_0x3f7ab7(0x301)]('~'))continue;try{this[_0x3f7ab7(0x282)][_0x3f7ab7(0x345)](_0x3800bb,_0x236673[_0x3f7ab7(0x236)]()||0x0);}catch{}}const {events:_0x3c347e}=this[_0x3f7ab7(0x33a)];_0x3c347e['on'](_0x26493e[_0x3f7ab7(0x26d)],this['_onItem']),_0x3c347e['on'](_0x26493e[_0x3f7ab7(0x20c)],this[_0x3f7ab7(0x1f4)]),_0x3c347e['on'](_0x26493e[_0x3f7ab7(0x2ad)],this[_0x3f7ab7(0x1f4)]),_0x3c347e['on'](_0x26493e[_0x3f7ab7(0x1cf)],this[_0x3f7ab7(0x1ed)]),_0x3c347e[_0x3f7ab7(0x2c0)](_0x26493e[_0x3f7ab7(0x335)],this[_0x3f7ab7(0x270)]);}[_0x3bc899(0x1de)](){const _0x50debc=_0x3bc899;if(!this[_0x50debc(0x2c3)])return;this[_0x50debc(0x2c3)]=![];const {events:_0x3d64b4}=this[_0x50debc(0x33a)];_0x3d64b4[_0x50debc(0x2d7)](_0x26493e[_0x50debc(0x26d)],this[_0x50debc(0x1f4)]),_0x3d64b4['off'](_0x26493e[_0x50debc(0x20c)],this['_onItem']),_0x3d64b4['off'](_0x26493e['ITEM_REMOVE'],this[_0x50debc(0x1f4)]),_0x3d64b4[_0x50debc(0x2d7)](_0x26493e[_0x50debc(0x1cf)],this[_0x50debc(0x1ed)]);try{_0x3d64b4[_0x50debc(0x2d7)](_0x26493e[_0x50debc(0x335)],this[_0x50debc(0x270)]);}catch{}this[_0x50debc(0x1d9)]&&(clearTimeout(this[_0x50debc(0x1d9)]),this[_0x50debc(0x1d9)]=null),this[_0x50debc(0x207)]['clear'](),this['_cursors'][_0x50debc(0x210)](),this[_0x50debc(0x282)][_0x50debc(0x210)](),this[_0x50debc(0x285)][_0x50debc(0x210)]();}['_dedupeKey'](_0x5c3dfe,_0x378cfc,_0x2e7f87,_0x4ae4fb){return _0x5c3dfe+'\x00'+_0x378cfc+'\x00'+_0x2e7f87+'\x00'+_0x4ae4fb;}[_0x3bc899(0x1d1)](_0xa898e0,_0x3a667d,_0x510323,_0x374a46){const _0x23d36e=_0x3bc899,_0x387acc=this['_dedupeKey'](_0xa898e0,_0x3a667d,_0x510323,_0x374a46);if(this['_seen']['has'](_0x387acc))return![];this[_0x23d36e(0x285)]['add'](_0x387acc);if(this[_0x23d36e(0x285)][_0x23d36e(0x24a)]>this[_0x23d36e(0x347)]){const _0xeeea72=this[_0x23d36e(0x285)][_0x23d36e(0x22a)]()['next']()[_0x23d36e(0x358)];this[_0x23d36e(0x285)]['delete'](_0xeeea72);}return!![];}[_0x3bc899(0x217)](_0x2b910d){const _0x4af434=_0x3bc899;if(!this[_0x4af434(0x2c3)]||!_0x2b910d)return;const {env:_0x12cc2d,type:_0x492211,key:_0x122d01,clock:_0x100b15,origin:_0x5cb308,action:_0x9ca217,newValue:_0x4dac0a,oldValue:_0x4496aa}=_0x2b910d;if(_0x12cc2d==null||_0x492211==null||_0x122d01==null)return;if(typeof _0x12cc2d===_0x4af434(0x1ce)&&_0x12cc2d[_0x4af434(0x301)]('~'))return;if(typeof _0x492211===_0x4af434(0x1ce)&&_0x492211[_0x4af434(0x301)]('~'))return;if(!this[_0x4af434(0x1d1)](_0x12cc2d,_0x492211,_0x122d01,_0x100b15))return;const _0xc83284=_0x9ca217===_0x34caee['REMOVE']?_0x4af434(0x1e3):'put';this[_0x4af434(0x2a6)]('change',{'env':_0x12cc2d,'type':_0x492211,'key':_0x122d01,'op':_0xc83284,'clock':_0x100b15,'origin':_0x5cb308,'value':_0xc83284===_0x4af434(0x1e3)?null:_0x4dac0a,'prevValue':_0x4496aa});}[_0x3bc899(0x31f)](_0x463b85){const _0x1f4105=_0x3bc899;if(!this['_started'])return;if(!_0x463b85||typeof _0x463b85[_0x1f4105(0x294)]!==_0x1f4105(0x1ce)||typeof _0x463b85[_0x1f4105(0x2cf)]!==_0x1f4105(0x1ce))return;const {env:_0x395962,type:_0x3c322a}=_0x463b85;if(_0x395962['startsWith']('~')||_0x3c322a[_0x1f4105(0x301)]('~'))return;this[_0x1f4105(0x207)][_0x1f4105(0x345)](_0x395962+'\x00'+_0x3c322a,{'env':_0x395962,'type':_0x3c322a}),this[_0x1f4105(0x295)]();}[_0x3bc899(0x295)](){const _0x3d01e9=_0x3bc899;if(this['_flushTimer'])return;const _0x59d2fb=()=>{const _0x166b5d=_0x423a;this['_flushTimer']=null,this[_0x166b5d(0x230)]()[_0x166b5d(0x2fa)](()=>{});};this['_flushTimer']=setTimeout(_0x59d2fb,this['_flushDebounce']>0x0?this[_0x3d01e9(0x2c2)]:0x0);}async[_0x3bc899(0x230)](){const _0x51ac33=_0x3bc899;if(this[_0x51ac33(0x362)]){this[_0x51ac33(0x295)]();return;}this[_0x51ac33(0x362)]=!![];try{const _0x1722fd=[...this[_0x51ac33(0x207)]['values']()];this[_0x51ac33(0x207)][_0x51ac33(0x210)]();let _0x3a7364=![];for(const {env:_0x4cfd6d,type:_0x5e28fe}of _0x1722fd){try{const _0x3cd6bf=await this[_0x51ac33(0x21a)](_0x4cfd6d,_0x5e28fe);if(_0x3cd6bf)_0x3a7364=!![];}catch{this['_pending'][_0x51ac33(0x345)](_0x4cfd6d+'\x00'+_0x5e28fe,{'env':_0x4cfd6d,'type':_0x5e28fe}),_0x3a7364=!![];}}if(_0x3a7364||this[_0x51ac33(0x207)][_0x51ac33(0x24a)]>0x0)this[_0x51ac33(0x295)]();}finally{this[_0x51ac33(0x362)]=![];}}async['_drainOne'](_0x2c2f3e,_0x1f54ef){const _0x4db0c8=_0x3bc899,_0x5bc6b1=await this[_0x4db0c8(0x33a)][_0x4db0c8(0x2c5)](_0x2c2f3e),_0x431889=_0x2c2f3e+'\x00'+_0x1f54ef;!this[_0x4db0c8(0x25b)][_0x4db0c8(0x2f4)](_0x431889)&&(!this[_0x4db0c8(0x282)]['has'](_0x2c2f3e)&&this[_0x4db0c8(0x282)][_0x4db0c8(0x345)](_0x2c2f3e,_0x5bc6b1[_0x4db0c8(0x236)]()||0x0),this[_0x4db0c8(0x25b)]['set'](_0x431889,this[_0x4db0c8(0x282)][_0x4db0c8(0x2bf)](_0x2c2f3e)));const _0x4c6e2b=this[_0x4db0c8(0x25b)]['get'](_0x431889),_0x1eecad=_0x5bc6b1['getClock'](_0x1f54ef)||0x0;if(_0x1eecad<=_0x4c6e2b)return![];const _0x469b48=_0x4c6e2b+this[_0x4db0c8(0x272)],_0x480970=Math[_0x4db0c8(0x2bc)](_0x1eecad,_0x469b48),_0x43cb7b=_0x801754['enabled']?_0x801754[_0x4db0c8(0x360)]():0x0,_0x2fc4bf=Array['from'](_0x5bc6b1[_0x4db0c8(0x267)](_0x1f54ef,_0x4c6e2b+0x1,_0x480970));let _0x1dd5df=_0x4c6e2b;for(const _0x59c9a4 of _0x2fc4bf){const {clock:_0x5bf7d9,key:_0x38d050,action:_0x133b98,origin:_0x3810c5}=_0x59c9a4;if(_0x5bf7d9>_0x1dd5df)_0x1dd5df=_0x5bf7d9;if(_0x38d050==null)continue;if(!this[_0x4db0c8(0x1d1)](_0x2c2f3e,_0x1f54ef,_0x38d050,_0x5bf7d9))continue;let _0x293fcd,_0xb61736;if(_0x133b98===_0x34caee['REMOVE'])_0x293fcd=_0x4db0c8(0x1e3),_0xb61736=null;else{const _0x258c19=_0x5bc6b1[_0x4db0c8(0x2bf)](_0x1f54ef,_0x38d050);_0x258c19==null?(_0x293fcd=_0x4db0c8(0x1e3),_0xb61736=null):(_0x293fcd='put',_0xb61736=_0x258c19);}this[_0x4db0c8(0x2a6)](_0x4db0c8(0x21b),{'env':_0x2c2f3e,'type':_0x1f54ef,'key':_0x38d050,'op':_0x293fcd,'clock':_0x5bf7d9,'origin':_0x3810c5,'value':_0xb61736});}if(_0x801754[_0x4db0c8(0x2dd)])_0x801754['note'](_0x4db0c8(0x297)+_0x2c2f3e+':'+_0x1f54ef,_0x801754[_0x4db0c8(0x360)]()-_0x43cb7b,'n='+_0x2fc4bf[_0x4db0c8(0x2bd)]);return this[_0x4db0c8(0x25b)][_0x4db0c8(0x345)](_0x431889,Math[_0x4db0c8(0x322)](_0x1dd5df,_0x480970)),_0x5bc6b1[_0x4db0c8(0x236)](_0x1f54ef)>_0x480970;}[_0x3bc899(0x258)](){const _0xcd021b=_0x3bc899;return{'started':this['_started'],'quantum':this['_quantum'],'flushDebounce':this[_0xcd021b(0x2c2)],'cursors':Object[_0xcd021b(0x352)]([...this[_0xcd021b(0x25b)][_0xcd021b(0x350)]()][_0xcd021b(0x25c)](([_0x40155a,_0x28bdc7])=>[_0x40155a[_0xcd021b(0x239)]('\x00',':'),_0x28bdc7])),'pending':this[_0xcd021b(0x207)][_0xcd021b(0x24a)],'seen':this['_seen'][_0xcd021b(0x24a)]};}}return _0x4be66e[_0x3bc899(0x245)]=_0x24a446,okdbChangefeed={'OKDBChangefeed':_0x4be66e},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x44f8e5=_0x25047a;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x55e73a=require$$1,_0x364d82=require$$1$1,{EVENTS:_0x2c7010}=requireOkdbEnums(),_0x47ad5d=require$$0$1,{slotKey:_0x37f9f9}=requireOkdbProcessRegistry(),_0x39cc17=0xfa,_0x3d0880=0xfa0,_0x59017f=0x5,_0x49b66b=0x2710,_0x47beae=0xbb8,_0x3ab5d8=0x7d0,_0x450b1b=_0x44f8e5(0x2b3),_0x3bf429=_0x44f8e5(0x278),_0x5d6a66='log',_0x44a661=_0x44f8e5(0x247),_0x161577=[_0x2c7010[_0x44f8e5(0x321)],_0x2c7010[_0x44f8e5(0x1bf)],_0x2c7010[_0x44f8e5(0x34d)],_0x2c7010[_0x44f8e5(0x23b)],_0x2c7010[_0x44f8e5(0x2a7)],_0x2c7010['INDEX_READY'],_0x2c7010['INDEX_RESET'],_0x2c7010['INDEX_REGISTERED'],_0x44f8e5(0x25f),_0x44f8e5(0x29c),'processor:error','processor:paused',_0x44f8e5(0x2f3),_0x44f8e5(0x211)],_0x4e0541=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x39a46e({workers:_0x30ffe6,makeOkdb:_0x30888f,port:_0x3a97b4,primaryOkdb:_0x160ee2,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x56ddfd=_0x44f8e5;if(_0x55e73a[_0x56ddfd(0x2b7)])return childEntry&&_0x55e73a[_0x56ddfd(0x2a3)]({'exec':_0x364d82[_0x56ddfd(0x21f)](__dirname,_0x56ddfd(0x32f)),'args':[],'execArgv':((()=>{const _0x401b44=_0x56ddfd,_0x62e4a=[];for(let _0x1a18c0=0x0;_0x1a18c0<process['execArgv']['length'];_0x1a18c0++){const _0x5d9f93=process[_0x401b44(0x353)][_0x1a18c0];if(_0x5d9f93[_0x401b44(0x301)](_0x401b44(0x201))||_0x5d9f93[_0x401b44(0x301)](_0x401b44(0x292))||_0x5d9f93[_0x401b44(0x301)](_0x401b44(0x2d4)))continue;if(_0x5d9f93==='-e'||_0x5d9f93===_0x401b44(0x216)||_0x5d9f93==='-p'||_0x5d9f93===_0x401b44(0x330)){_0x1a18c0++;continue;}_0x62e4a[_0x401b44(0x276)](_0x5d9f93);}return _0x62e4a;})())}),_0x5a7778({'workers':_0x30ffe6,'port':_0x3a97b4,'primaryOkdb':_0x160ee2,'workerEnv':workerEnv});return _0xf0ec91({'makeOkdb':_0x30888f,'port':_0x3a97b4});}function _0x5a7778({workers:_0x27206e,port:_0x47d32b,primaryOkdb:_0x404836,workerEnv:_0x5300e2}){const _0x3f1bf7=_0x44f8e5,_0x496c00=new Map(),_0x406df4=new Map();let _0x23da75=![];const _0x28c478=_0x3ebd76=>_0x3ebd76?.['__okdbSlot'],_0x2df735=_0x3e8aaf=>{const _0x249b9c=_0x423a,_0x2d5719=_0x55e73a[_0x249b9c(0x1c8)]({...process.env,..._0x5300e2||{},'OKDB_CLUSTER_SLOT':String(_0x3e8aaf)});return _0x2d5719['__okdbSlot']=_0x3e8aaf,_0x496c00[_0x249b9c(0x345)](_0x2d5719[_0x249b9c(0x220)]['pid'],{'worker':_0x2d5719,'startedAt':Date[_0x249b9c(0x360)](),'slot':_0x3e8aaf}),_0x2d5719['on'](_0x249b9c(0x2f8),_0x120b1c=>{const _0x4b9272=_0x249b9c;console[_0x4b9272(0x1f2)](_0x4b9272(0x303)+_0x2d5719[_0x4b9272(0x220)]['pid']+_0x4b9272(0x231)+(_0x120b1c?.[_0x4b9272(0x1ff)]??_0x120b1c));}),_0x2d5719['on'](_0x249b9c(0x226),()=>_0x2e7004()),_0x2d5719;},_0xcc9649=_0x3226b6=>{const _0x54c0c0=_0x423a;for(const {worker:_0x566db9}of _0x496c00['values']()){if(_0x566db9['isDead']()||!_0x566db9[_0x54c0c0(0x1f3)]())continue;try{_0x566db9[_0x54c0c0(0x1cb)](_0x3226b6);}catch{}}};_0x404836?.[_0x3f1bf7(0x2f0)]?.({'kind':_0x3f1bf7(0x324),'listenAddr':':'+_0x47d32b})[_0x3f1bf7(0x2fa)](()=>{}),_0x404836?.[_0x3f1bf7(0x311)]?.[_0x3f1bf7(0x319)]?.({'workersConfigured':_0x27206e});const _0xe0d9d3={'engines':![],'asyncProcessors':![],'compaction':_0x3f1bf7(0x32d),'http':!![]},_0x2e7004=()=>{const _0x433e5c=_0x3f1bf7,_0x124572=_0x404836?.[_0x433e5c(0x311)];if(!_0x124572||!_0x124572['_isWriter'])return;const _0x461c68=_0x124572[_0x433e5c(0x336)];for(const {worker:_0x19c8fd,startedAt:_0x3659d7,slot:_0x19c78a,stats:_0x519170}of _0x496c00[_0x433e5c(0x22a)]()){if(_0x19c8fd[_0x433e5c(0x2b1)]())continue;const _0xfd1dc7=_0x124572['hasDesired']?.()&&_0x124572['getDesired'](_0x433e5c(0x1c1),_0x1740d5(_0x19c78a))?.[_0x433e5c(0x275)]===!![];_0x124572[_0x433e5c(0x1f8)]({'pid':_0x19c8fd[_0x433e5c(0x220)][_0x433e5c(0x2e0)],'startedAt':_0x3659d7,'kind':_0x433e5c(0x346),'supervisorKey':_0x461c68,'slot':_0x19c78a,'slotKey':_0x1740d5(_0x19c78a),'role':_0xe0d9d3,'listenAddr':':'+_0x47d32b,'lifecycle':_0xfd1dc7?_0x433e5c(0x1bc):'running','stats':_0x519170??null})[_0x433e5c(0x2fa)](()=>{});}},_0x1740d5=_0x2bb137=>_0x37f9f9(_0x3f1bf7(0x264)+_0x47d32b,_0x2bb137),_0xd702c=_0x47536a=>{const _0x19173b=_0x3f1bf7,_0x2dbb82=_0x404836?.[_0x19173b(0x311)];if(!_0x2dbb82?.[_0x19173b(0x29f)]?.())return![];return _0x2dbb82['getDesired'](_0x19173b(0x1c1),_0x1740d5(_0x47536a))?.['decommission']===!![];};for(let _0xf33742=0x0;_0xf33742<_0x27206e;_0xf33742++){const _0x1a2989=_0xd702c(_0xf33742);_0x406df4[_0x3f1bf7(0x345)](_0xf33742,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x1a2989,'respawnTimer':null}),_0x1a2989?console[_0x3f1bf7(0x1f2)](_0x3f1bf7(0x261)+_0xf33742+_0x3f1bf7(0x31b)):_0x2df735(_0xf33742);}const _0x6ad98b=()=>{const _0xfe8163=_0x3f1bf7,_0x484fc7=_0x404836?.['processes'];if(!_0x484fc7?.[_0xfe8163(0x242)]||!_0x484fc7[_0xfe8163(0x29f)]?.())return;for(const [_0x144966,_0x4ae323]of _0x406df4['entries']()){const _0x1e133d=_0x484fc7['getDesired']('slot',_0x1740d5(_0x144966)),_0x3d9033=_0x1e133d?.['decommission']===!![],_0x2725a0=_0x1e133d?.['kill']===!![];if(_0x3d9033&&!_0x4ae323[_0xfe8163(0x314)]){_0x4ae323[_0xfe8163(0x314)]=!![];_0x4ae323[_0xfe8163(0x22f)]&&(clearTimeout(_0x4ae323['respawnTimer']),_0x4ae323[_0xfe8163(0x22f)]=null);for(const {worker:_0x196075}of _0x496c00[_0xfe8163(0x22a)]()){if(_0x28c478(_0x196075)!==_0x144966||_0x196075[_0xfe8163(0x2b1)]())continue;try{if(_0x2725a0)_0x196075[_0xfe8163(0x220)][_0xfe8163(0x1e8)](_0xfe8163(0x2c7));else _0x196075['isConnected']()&&_0x196075['disconnect']();}catch{}}console['log'](_0xfe8163(0x2d0)+(_0x2725a0?'hard-killed':_0xfe8163(0x35d))+_0xfe8163(0x232)+_0x144966+_0xfe8163(0x2d9));}else{if(!_0x3d9033&&_0x4ae323[_0xfe8163(0x314)]&&_0x1e133d){_0x4ae323[_0xfe8163(0x314)]=![],_0x4ae323[_0xfe8163(0x241)]=[],_0x4ae323['consecutiveFailures']=0x0;const _0x4b879b=[..._0x496c00['values']()]['some'](({worker:_0x3cb879})=>_0x28c478(_0x3cb879)===_0x144966&&!_0x3cb879[_0xfe8163(0x2b1)]());!_0x4b879b&&!_0x23da75&&(_0x2df735(_0x144966),console[_0xfe8163(0x1f2)]('[okdb-cluster]\x20recommissioned\x20worker\x20slot='+_0x144966));}}}},_0x517c9=()=>{try{_0x6ad98b();}catch{}};_0x404836?.[_0x3f1bf7(0x1c7)]?.['on']?.(_0x2c7010[_0x3f1bf7(0x35e)],_0x517c9);const _0x1bd0cc=[];if(_0x404836?.[_0x3f1bf7(0x1c7)]?.['on'])for(const _0x21cb63 of _0x161577){const _0x1cb636=_0x4d1f1e=>{_0xcc9649({[_0x450b1b]:_0x3bf429,'event':_0x21cb63,'data':_0x4d1f1e??{}});};_0x404836[_0x3f1bf7(0x1c7)]['on'](_0x21cb63,_0x1cb636),_0x1bd0cc['push']({'event':_0x21cb63,'handler':_0x1cb636});}const _0x65dc14=setInterval(()=>{_0x6ad98b(),_0x2e7004();},_0x4e0541);_0x65dc14[_0x3f1bf7(0x337)]?.();const _0x1b0041=(_0x5de2bd,_0x1fd03d)=>{const _0x2aae62=_0x3f1bf7;if(!_0x1fd03d||typeof _0x1fd03d!==_0x2aae62(0x1ee)||_0x1fd03d[_0x450b1b]!==_0x5d6a66)return;if(!_0x404836?.['log']?.['ingest'])return;const _0xae4243=_0x1fd03d['entry']||{};_0x404836[_0x2aae62(0x1f2)]['ingest']({..._0xae4243,'msg':'[w'+_0x1fd03d['slot']+']\x20'+(_0xae4243[_0x2aae62(0x280)]??''),'meta':{..._0xae4243['meta']||{},'worker':_0x1fd03d['slot'],'workerPid':_0x1fd03d[_0x2aae62(0x2e0)]}});};_0x55e73a['on']('message',_0x1b0041);const _0x549d0f=(_0x3c9df6,_0x293f3c)=>{const _0x4cef6d=_0x3f1bf7;if(!_0x293f3c||typeof _0x293f3c!=='object'||_0x293f3c[_0x450b1b]!==_0x44a661)return;const _0x1e1e1e=_0x496c00['get'](_0x3c9df6[_0x4cef6d(0x220)]['pid']);if(_0x1e1e1e)_0x1e1e1e[_0x4cef6d(0x247)]={..._0x293f3c[_0x4cef6d(0x247)],'at':Date['now']()};};_0x55e73a['on'](_0x3f1bf7(0x1ff),_0x549d0f),_0x55e73a['on']('exit',(_0x404e13,_0x51edd8,_0xb11205)=>{const _0x2fdc80=_0x3f1bf7,_0x550332=_0x404e13[_0x2fdc80(0x220)]['pid'],_0x53359b=_0x28c478(_0x404e13),_0x5a318d=_0x496c00[_0x2fdc80(0x2bf)](_0x550332);if(_0x5a318d&&_0x404836?.[_0x2fdc80(0x311)])_0x404836['processes'][_0x2fdc80(0x1db)](_0x550332+':'+_0x5a318d['startedAt'])['catch'](()=>{});_0x496c00['delete'](_0x550332),console[_0x2fdc80(0x1f2)]('[okdb-cluster]\x20worker\x20pid='+_0x550332+'\x20(slot='+(_0x53359b??'?')+')\x20exited\x20'+(_0x2fdc80(0x290)+_0x51edd8+_0x2fdc80(0x30c)+(_0xb11205??_0x2fdc80(0x2fe))+_0x2fdc80(0x2b6)+_0x496c00[_0x2fdc80(0x24a)]+'\x20worker(s)\x20remaining')),_0x2e7004();if(_0x23da75||_0x53359b==null)return;const _0x386e77=_0x406df4['get'](_0x53359b);if(!_0x386e77||_0x386e77[_0x2fdc80(0x314)])return;const _0x4e4fc2=Date[_0x2fdc80(0x360)]();_0x386e77['deaths'][_0x2fdc80(0x276)](_0x4e4fc2),_0x386e77[_0x2fdc80(0x241)]=_0x386e77['deaths']['filter'](_0x57bf63=>_0x4e4fc2-_0x57bf63<=_0x49b66b);if(_0x386e77[_0x2fdc80(0x241)][_0x2fdc80(0x2bd)]>=_0x59017f){_0x386e77[_0x2fdc80(0x314)]=!![],console['error'](_0x2fdc80(0x2fd)+_0x53359b+'\x20died\x20'+_0x386e77[_0x2fdc80(0x241)]['length']+_0x2fdc80(0x1d6)+(_0x49b66b+_0x2fdc80(0x20b)+_0x496c00[_0x2fdc80(0x24a)]+'\x20worker(s)\x20still\x20serving'));return;}_0x386e77['consecutiveFailures']++;const _0x4938ad=Math['min'](_0x3d0880,_0x39cc17*0x2**(_0x386e77['consecutiveFailures']-0x1));console[_0x2fdc80(0x1f2)](_0x2fdc80(0x289)+_0x53359b+'\x20in\x20'+_0x4938ad+_0x2fdc80(0x306)+_0x386e77[_0x2fdc80(0x23a)]+')'),_0x386e77['respawnTimer']=setTimeout(()=>{const _0x1ce95b=_0x2fdc80;_0x386e77[_0x1ce95b(0x22f)]=null;if(_0x23da75||_0x386e77[_0x1ce95b(0x314)])return;const _0x5cf3e3=_0x2df735(_0x53359b);_0x5cf3e3[_0x1ce95b(0x2c0)](_0x1ce95b(0x2b8),()=>{const _0x1dbe3b=_0x1ce95b;if(_0x406df4['get'](_0x53359b)===_0x386e77)_0x386e77[_0x1dbe3b(0x23a)]=0x0;});},_0x4938ad),_0x386e77[_0x2fdc80(0x22f)][_0x2fdc80(0x337)]?.();});const _0x4961d4=[..._0x496c00[_0x3f1bf7(0x364)]()];console[_0x3f1bf7(0x1f2)](_0x3f1bf7(0x2f6)+process[_0x3f1bf7(0x2e0)]+_0x3f1bf7(0x361)+_0x27206e+'\x20HTTP\x20server(s)\x20on\x20port\x20'+_0x47d32b+':\x20'+('['+_0x4961d4[_0x3f1bf7(0x21f)](',\x20')+']'));const _0x3359ff={'_isClusterController':!![],'port':_0x47d32b,'primaryOkdb':_0x404836??null,'status'(){const _0x533fcb=_0x3f1bf7;return{'clustered':!![],'primaryPid':process['pid'],'port':_0x47d32b,'primaryRole':_0x404836?.[_0x533fcb(0x2ee)]??null,'processorPid':_0x404836?process[_0x533fcb(0x2e0)]:null,'workers':[..._0x496c00[_0x533fcb(0x22a)]()]['map'](({worker:_0x2033b8})=>({'pid':_0x2033b8[_0x533fcb(0x220)][_0x533fcb(0x2e0)],'id':_0x2033b8['id'],'dead':_0x2033b8[_0x533fcb(0x2b1)]()}))};},async 'close'(){const _0x3836b9=_0x3f1bf7;_0x23da75=!![];for(const _0x116025 of _0x406df4[_0x3836b9(0x22a)]()){_0x116025[_0x3836b9(0x314)]=!![],_0x116025[_0x3836b9(0x22f)]&&(clearTimeout(_0x116025['respawnTimer']),_0x116025['respawnTimer']=null);}clearInterval(_0x65dc14),_0x55e73a[_0x3836b9(0x2d7)]('message',_0x1b0041),_0x55e73a[_0x3836b9(0x2d7)](_0x3836b9(0x1ff),_0x549d0f),_0x404836?.[_0x3836b9(0x1c7)]?.[_0x3836b9(0x2d7)]?.(_0x2c7010[_0x3836b9(0x35e)],_0x517c9);if(_0x404836?.[_0x3836b9(0x1c7)]?.[_0x3836b9(0x2d7)])for(const {event:_0x2dd3c2,handler:_0x3ff8e5}of _0x1bd0cc){try{_0x404836[_0x3836b9(0x1c7)][_0x3836b9(0x2d7)](_0x2dd3c2,_0x3ff8e5);}catch{}}_0x1bd0cc['length']=0x0;const _0x2d7b63=[..._0x496c00[_0x3836b9(0x22a)]()][_0x3836b9(0x25c)](({worker:_0x1e6259})=>_0x1e6259);if(_0x2d7b63['length']===0x0)return;await Promise[_0x3836b9(0x296)](_0x2d7b63[_0x3836b9(0x25c)](_0x1d6d56=>new Promise(_0x273b36=>{const _0x283d7b=_0x3836b9;if(_0x1d6d56[_0x283d7b(0x2b1)]()){_0x273b36();return;}let _0x3fe0cd=![];const _0x5c602e=()=>{if(_0x3fe0cd)return;_0x3fe0cd=!![];if(_0x3b3b76)clearTimeout(_0x3b3b76);_0x273b36();};_0x1d6d56['once'](_0x283d7b(0x325),_0x5c602e);const _0x3b3b76=setTimeout(()=>{const _0x168dc8=_0x283d7b;try{_0x1d6d56[_0x168dc8(0x220)]['kill']();}catch{}},_0x47beae+0x1f4);_0x3b3b76[_0x283d7b(0x337)]?.();try{_0x1d6d56['disconnect']();}catch{try{_0x1d6d56[_0x283d7b(0x220)][_0x283d7b(0x1e8)]();}catch{}}})));}};return _0x3359ff;}async function _0xf0ec91({makeOkdb:_0x5e51f3,port:_0xcf1592}){const _0x4cf811=_0x44f8e5,_0x47a485=await _0x5e51f3();return _0x1c9900(_0x47a485),_0x47a485[_0x4cf811(0x1f5)]['listen'](_0xcf1592);}function _0x1c9900(_0x285a24){const _0x5815b1=_0x44f8e5;if(!_0x285a24||_0x285a24['_clusterWorkerAttached'])return;_0x285a24[_0x5815b1(0x348)]=!![];try{const {OKDBChangefeed:_0x382010}=requireOkdbChangefeed(),_0xa0c3b9=_0x285a24[_0x5815b1(0x1fc)];if(_0xa0c3b9&&typeof _0xa0c3b9[_0x5815b1(0x21c)]===_0x5815b1(0x1d3)){const _0x5b1b7d=new _0x382010(_0x285a24);_0x5b1b7d[_0x5815b1(0x252)](),_0xa0c3b9['attachFeed'](_0x5b1b7d),_0x285a24[_0x5815b1(0x219)]=_0x5b1b7d;}}catch(_0x39adf1){_0x285a24['log']?.['warn']?.('[okdb-cluster]\x20change-feed\x20init\x20failed:\x20'+(_0x39adf1?.[_0x5815b1(0x1ff)]??_0x39adf1),{'feature':_0x5815b1(0x1e5)});}const _0x82f5ed=_0x2d188c=>{const _0x821fc1=_0x5815b1;if(!_0x2d188c||typeof _0x2d188c!==_0x821fc1(0x1ee)||_0x2d188c[_0x450b1b]==null)return;if(_0x2d188c[_0x450b1b]===_0x3bf429)try{_0x285a24[_0x821fc1(0x1fc)]?.[_0x821fc1(0x27b)]?.(_0x2d188c[_0x821fc1(0x23e)],_0x2d188c[_0x821fc1(0x26f)]);}catch{}};process['on'](_0x5815b1(0x1ff),_0x82f5ed),_0x285a24[_0x5815b1(0x246)]=_0x82f5ed;{let _0x498b47=process[_0x5815b1(0x2d2)](),_0x5ae0db=Date[_0x5815b1(0x360)]();const _0x47d9a4=()=>{const _0x385b1a=_0x5815b1;if(typeof process['send']!=='function'||!process[_0x385b1a(0x312)])return;const _0x236403=Date[_0x385b1a(0x360)](),_0x31ea64=process['cpuUsage'](),_0x5f5852=(_0x236403-_0x5ae0db)*0x3e8,_0x490ccc=_0x31ea64['user']-_0x498b47[_0x385b1a(0x1fb)]+(_0x31ea64[_0x385b1a(0x212)]-_0x498b47[_0x385b1a(0x212)]),_0x3ee6a7=_0x5f5852>0x0?Math[_0x385b1a(0x2bc)](0x64,Math[_0x385b1a(0x2ae)](_0x490ccc/(_0x5f5852*(_0x47ad5d[_0x385b1a(0x214)]()[_0x385b1a(0x2bd)]||0x1))*0x64)):0x0;_0x498b47=_0x31ea64,_0x5ae0db=_0x236403;const _0x5768d0=process[_0x385b1a(0x206)]();try{process['send']({[_0x450b1b]:_0x44a661,'stats':{'rss':_0x5768d0[_0x385b1a(0x1d5)],'heapUsed':_0x5768d0['heapUsed'],'heapTotal':_0x5768d0['heapTotal'],'external':_0x5768d0[_0x385b1a(0x266)],'cpuPct':_0x3ee6a7,'cpuWindowMs':Math[_0x385b1a(0x2ae)](_0x5f5852/0x3e8)||null}});}catch{}},_0xfb307d=Math[_0x5815b1(0x322)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x3fd16a=setInterval(_0x47d9a4,_0xfb307d);_0x3fd16a[_0x5815b1(0x337)]?.(),_0x47d9a4();}let _0x787d2e=![];const _0x3c1391=async _0x2ba56a=>{const _0x241dab=_0x5815b1;if(_0x787d2e)return;_0x787d2e=!![];const _0x18e381=setTimeout(()=>process[_0x241dab(0x325)](_0x2ba56a),_0x47beae);_0x18e381[_0x241dab(0x337)]?.();try{await _0x285a24[_0x241dab(0x21e)]?.();}catch{}process[_0x241dab(0x325)](_0x2ba56a);};process['on'](_0x5815b1(0x1cd),()=>_0x3c1391(0x0));if(process['platform']!=='win32'){const _0x264318=setInterval(()=>{const _0x16998c=_0x5815b1;if(process[_0x16998c(0x2fb)]===0x1)_0x3c1391(0x0);},_0x3ab5d8);_0x264318[_0x5815b1(0x337)]?.(),_0x285a24['_clusterOrphanWatch']=_0x264318;}}return okdbCluster={'runClustered':_0x39a46e,'attachWorkerCluster':_0x1c9900},okdbCluster;}function _0x5cb1(){const _0x99a941=['started','env','_scheduleFlush','all','feed:','maxExtra','put','1269460NNePMD','ms\x20busy=','processor:progress','20178sMeoHt','setTtl','hasDesired','node:perf_hooks','processKey','lag','setupPrimary','halted','asyncProcessors','emit','INDEX_PROGRESS','view:progress','_nodeDb','system:proc','filter','registry-publish','ITEM_REMOVE','round','1086585IfaMKt','add','isDead','registerType','__okdbCluster','node/','hasOwnProperty',');\x20','isPrimary','listening','processorsView','124556Hqcptv','count','min','length','_lastPublishAt','get','once','1756958ZfLEjr','_flushDebounce','_started','async','_openEnvLazy','index:drop','SIGKILL','threads','registerFts','_caps','note','setDesired','quantum','~processes:desired','type','[okdb-cluster]\x20','_ensureDesired','cpuUsage','_lastCpuAt','--inspect','_putRowAsync','_groupByProcess','off','fts:reset','\x20(durable\x20desired-state)','assign','cpuPct','building','enabled','3jZUxsv','__esModule','pid','ms\x20max=','nodeKey','prototype','removeSync','registerIndex','code','_processingPolicy','_admissionStarted','stderr','find','unique:violation','cli','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','role','_buildProcessingFacet','_activateProcesses','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','_kind','processor:resumed','has','attach','[okdb-cluster]\x20primary\x20pid=','_processStartedAt','error','_buildOwnRow','catch','ppid','single','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','none','rowKey','version','startsWith','9MycWIe','[okdb-cluster]\x20worker\x20pid=','resetIndex','putNode','ms\x20(attempt\x20','_statusEnv','uptime','_rowKey','freeze','ready',',\x20signal=','getRange','worker','reset','onWindow','processes','connected','cpuWindowMs','dead','_startedAt','then','_instanceId','offWindow','setOwnMeta','envsOpen','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','expiresAt','includes','killable','_handlePoke','claims','VIEW_PROGRESS','max','\x20│\x20','primary','exit','default','label','_admissionTimer','detachConsole','getDesired','crypto','creating','passive','bus:poke','okdb-http-worker-child.js','--print','register','~processes:cmd','waiting','index:ready','SYSTEM_STOPPED','selfKey','unref','_getType','license:added','okdb','percentile','slice','meta','runtimeProcessesView','system:type_drop','dropIndex','ms\x20p99=','index:progress','stopped','open','set','http-server','_dedupeMax','_clusterWorkerAttached','_lastCpuWindowMs','processor','_lastCpuUsage','transactionSync','FTS_DROP','policy','bus:drain','entries','bumpCmd','fromEntries','execArgv','listenAddr','bus:proc','schema:drop','ms/','value','dropFts','schema:set','stopHeartbeat','openDB','decommissioned','SYSTEM_PROC','inst:','now','\x20forked\x20','_draining','node:events','keys','fts:drop','loop-lag\x20','decommissioning','dropSchema','lastClock','FTS_REGISTERED','_removeRowAsync','slot','stopping','txn:end','_publishNow','system:clock_change','treeView','events','fork','enable','exports','send','_onProcEvent','disconnect','string','SYSTEM_POKE','listDesired','_markSeen','addSupervisedChild','function','state','rss','\x20times\x20in\x20','_selfKey','parse','_flushTimer','running','removeNode','./okdb','http\x20worker\x20child\x20failed:\x20','stop','starting','setLogger','_envs','_isReader','remove','env:opened','cluster','_buckets','ttl:expired','kill','standalone','_children','_onTick','license:activated','_onPoke','object','noteListenAddr','_cmd','dedupeMax','log','isConnected','_onItem','http','ms\x20mean=','reap','publishChildRow','5947208CczHHd','_ownMeta','user','_adminRelay','randomUUID','workers','message','info','--test','compaction','heapTotal','heapUsed','ESRCH','memoryUsage','_pending','setSchema','caps','cursorKey','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','ITEM_UPDATE','_nodeDbFor','_listenAddr','maxMs','clear','processor:retry','system','claimGated','cpus','fn-runner','--eval','_handleInProcess','txn:rollback','_changefeed','_drainOne','change','attachFeed','path','close','join','process','_report','startHeartbeat','index:registered','clearTtl','_supervisorKey','online','call','force','_maybePublish','values','loop-lag','processing','embedded','ttl:set','respawnTimer','_drain','\x20ipc\x20error:\x20','\x20worker\x20slot=','workersConfigured','updateSupervisedChildStats','hasType','getClock','tierList','number','replace','consecutiveFailures','FTS_RESET','hostname','engines','event','getProcess','removeSupervisedChild','deaths','_isWriter','_log','_sampleOwnStats','CHANGEFEED_QUANTUM','_clusterOnMessage','stats','host','system:drain','size','_desired','unique:violation_resolved','reportThreadStats','fast','1035nJHIPp','cluster-wide','delete','start','level','_threadStats','item:create','createEnvironment','_windowCbs','status','stringify','mode','_cursors','map','listen','_buildChildRow','processor:ready','txn:start','[okdb-cluster]\x20slot=','resetting','license:removed','cluster:','listNodes','external','getChanges','startedAt','deregisterSelf','_nodeDead','queue-worker','11944370jFcNRL','ITEM_CREATE','node','data','_onStop','instanceId','_quantum','reduce','_hbTimer','decommission','push','system:stopped','ephemeral','1ofN:','license:invalid','pushEphemeral','kind','headClock','system:bus_state_change','sort','msg','supervisorKey','_baselines','_nodeDbCache','system:poke','_seen','children','true','type:registered','[okdb-cluster]\x20respawning\x20worker\x20slot=','toFixed','(worst\x20','isWorker','ref:violation','options','_timer','(code=','_lastCpuPct','--watch'];_0x5cb1=function(){return _0x99a941;};return _0x5cb1();}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x47ed1d=require$$0$3,{attachWorkerCluster:_0x1db6e1}=requireOkdbCluster();async function _0x5a49db(){const _0x1f2d9d=_0x423a,_0x1bb552=process.env.OKDB_HTTP_CHILD;if(!_0x1bb552)throw new Error(_0x1f2d9d(0x2ed));const {rootPath:_0x59cf87,port:_0x4b5f8b,options:options={},logLevel:logLevel=_0x1f2d9d(0x200)}=JSON[_0x1f2d9d(0x1d8)](_0x1bb552);if(!_0x59cf87||!_0x4b5f8b)throw new Error(_0x1f2d9d(0x2f1));const _0x599654=new _0x47ed1d(_0x59cf87,{...options,'engines':![],'asyncProcessors':![],'compaction':_0x1f2d9d(0x32d),'bus':!![]});_0x599654['log'][_0x1f2d9d(0x329)]?.();const _0x442b4b=process.env.OKDB_CLUSTER_SLOT??'?',_0x3a1841={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x40c991=_0x3a1841[logLevel]??_0x3a1841['info'];_0x599654['log'][_0x1f2d9d(0x2f5)](_0x17b050=>{const _0x285233=_0x1f2d9d;if((_0x3a1841[_0x17b050[_0x285233(0x253)]]??0x1)<_0x40c991)return;try{process['send']?.({'__okdbCluster':_0x285233(0x1f2),'slot':_0x442b4b,'pid':process[_0x285233(0x2e0)],'entry':_0x17b050});}catch{}}),await _0x599654[_0x1f2d9d(0x344)](),_0x1db6e1(_0x599654),await _0x599654[_0x1f2d9d(0x1f5)][_0x1f2d9d(0x25d)](_0x4b5f8b);}return _0x5a49db()['catch'](_0x4c2d02=>{const _0x5b2d29=_0x423a;try{process[_0x5b2d29(0x1cb)]?.({'__okdbCluster':_0x5b2d29(0x1f2),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x5b2d29(0x2e0)],'entry':{'level':_0x5b2d29(0x2f8),'msg':_0x5b2d29(0x1dd)+(_0x4c2d02?.[_0x5b2d29(0x1ff)]??_0x4c2d02)}});}catch{}process['exit'](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);function _0x423a(_0x2ff881,_0x21a927){_0x2ff881=_0x2ff881-0x1bc;const _0x5cb1b5=_0x5cb1();let _0x423a90=_0x5cb1b5[_0x2ff881];return _0x423a90;}module[_0x25047a(0x1ca)]=okdbHttpWorkerChild;
|
|
1
|
+
'use strict';const _0x4f3d84=_0x1df0;(function(_0x4f3b2b,_0x3e4b77){const _0x1418b3=_0x1df0,_0x401f33=_0x4f3b2b();while(!![]){try{const _0x3af10e=-parseInt(_0x1418b3(0x35c))/0x1+parseInt(_0x1418b3(0x212))/0x2+-parseInt(_0x1418b3(0x28e))/0x3+-parseInt(_0x1418b3(0x257))/0x4+-parseInt(_0x1418b3(0x315))/0x5*(parseInt(_0x1418b3(0x33e))/0x6)+parseInt(_0x1418b3(0x375))/0x7*(parseInt(_0x1418b3(0x276))/0x8)+parseInt(_0x1418b3(0x1ee))/0x9;if(_0x3af10e===_0x3e4b77)break;else _0x401f33['push'](_0x401f33['shift']());}catch(_0x244bcc){_0x401f33['push'](_0x401f33['shift']());}}}(_0x5581,0x1f005));var require$$0$3=require('./okdb'),require$$1=require(_0x4f3d84(0x211)),require$$1$1=require(_0x4f3d84(0x213)),require$$0$1=require('os'),require$$2=require('crypto'),require$$0=require(_0x4f3d84(0x31a)),require$$0$2=require(_0x4f3d84(0x2d4));function getDefaultExportFromCjs(_0x4afc50){const _0x1fe366=_0x4f3d84;return _0x4afc50&&_0x4afc50[_0x1fe366(0x328)]&&Object[_0x1fe366(0x2be)][_0x1fe366(0x31b)]['call'](_0x4afc50,_0x1fe366(0x336))?_0x4afc50['default']:_0x4afc50;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x4eedee=_0x4f3d84;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x4c0205={'PUT':_0x4eedee(0x1e1),'REMOVE':_0x4eedee(0x320),'INDEX_DROP':'dropIndex','INDEX_REGISTER':'registerIndex','INDEX_RESET':_0x4eedee(0x2b9),'TYPE_REGISTER':_0x4eedee(0x1e0),'TYPE_DROP':'dropType','FTS_REGISTER':'registerFts','FTS_DROP':_0x4eedee(0x2b2),'FTS_RESET':_0x4eedee(0x208),'SCHEMA_SET':_0x4eedee(0x370),'SCHEMA_DROP':_0x4eedee(0x309),'TTL_SET':_0x4eedee(0x33f),'TTL_CLEAR':_0x4eedee(0x23f)},_0x2da9bc={'SYSTEM_READY':'system:ready','SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':_0x4eedee(0x21d),'SYSTEM_POKE':_0x4eedee(0x34e),'SYSTEM_DRAIN':_0x4eedee(0x239),'SYSTEM_TYPE_DROP':_0x4eedee(0x2bc),'SYSTEM_PROC':_0x4eedee(0x348),'SYSTEM_BUS_STATE_CHANGE':_0x4eedee(0x2f2),'ITEM_CREATE':'item:create','ITEM_UPDATE':'item:update','ITEM_REMOVE':_0x4eedee(0x1de),'INDEX_RESET':_0x4eedee(0x341),'INDEX_READY':'index:ready','INDEX_PROGRESS':_0x4eedee(0x277),'VIEW_PROGRESS':_0x4eedee(0x267),'INDEX_DROP':'index:drop','INDEX_REGISTERED':_0x4eedee(0x23a),'FTS_REGISTERED':'fts:registered','FTS_DROP':_0x4eedee(0x23c),'FTS_RESET':_0x4eedee(0x2f7),'SCHEMA_SET':_0x4eedee(0x271),'SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':_0x4eedee(0x2b3),'UNIQUE_VIOLATION_RESOLVED':_0x4eedee(0x2a7),'REF_VIOLATION':_0x4eedee(0x345),'REF_VIOLATION_RESOLVED':_0x4eedee(0x331),'SYNC_APPLY':'sync:apply','TXN_START':_0x4eedee(0x361),'TXN_END':'txn:end','TXN_ROLLBACK':_0x4eedee(0x2e0),'TYPE_REGISTERED':'type:registered','TYPE_DROP':_0x4eedee(0x2eb),'ENV_OPENED':_0x4eedee(0x31d),'ENV_REMOVED':'env:removed','TTL_EXPIRED':_0x4eedee(0x30e),'TTL_SET':'ttl:set','TTL_CLEAR':_0x4eedee(0x29e),'LICENSE_INVALID':'license:invalid','LICENSE_ADDED':_0x4eedee(0x209),'LICENSE_ACTIVATED':_0x4eedee(0x34b),'LICENSE_REMOVED':'license:removed'},_0x433b62={'CREATING':'creating','RESETTING':_0x4eedee(0x24f),'READY':_0x4eedee(0x2ec),'DROPPING':'dropping','WAITING':_0x4eedee(0x229)},_0x9098b2={'CREATED':_0x4eedee(0x264),'STARTING':_0x4eedee(0x30b),'STARTED':'started','STOPPING':_0x4eedee(0x2ed),'STOPPED':'stopped'},_0x55e98a={'CREATING':_0x4eedee(0x225),'READY':'ready','HALTED':_0x4eedee(0x205),'STOPPED':_0x4eedee(0x325),'RESETTING':_0x4eedee(0x24f)},_0x34ffb2=Object['freeze']({'POKE':_0x4eedee(0x286),'DRAIN':_0x4eedee(0x33b),'TYPE_DROP':_0x4eedee(0x1e3),'PROC':'bus:proc'});return okdbEnums={'BUS_EVENTS':_0x34ffb2,'CHANGE_ACTIONS':_0x4c0205,'EVENTS':_0x2da9bc,'INDEX_STATE':_0x433b62,'OKDB_STATE':_0x9098b2,'VIEW_STATE':_0x55e98a},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x30ef63=_0x4f3d84;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x5d4925,performance:_0x68b712}=require$$0,_0x3ada88=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x30ef63(0x1e6),_0x4da524=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x47ea35=process.env.OKDB_LOOP_LAG_ALL==='1',_0x5712ec=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0xfed1d1{constructor(){const _0x3bd406=_0x30ef63;this[_0x3bd406(0x2a8)]=_0x3ada88,this[_0x3bd406(0x2e2)]=new Map(),this['_h']=null,this[_0x3bd406(0x28d)]=null,this[_0x3bd406(0x32a)]=![],this[_0x3bd406(0x259)]=(_0x35bfef,_0x47843b)=>process[_0x3bd406(0x368)][_0x3bd406(0x21e)](_0x35bfef+(_0x47843b?'\x20'+JSON[_0x3bd406(0x2af)](_0x47843b):'')+'\x0a');}[_0x30ef63(0x260)](){const _0x121062=_0x30ef63;return _0x68b712[_0x121062(0x260)]();}[_0x30ef63(0x2d3)](_0x4a62c8){const _0x5cbbed=_0x30ef63;if(typeof _0x4a62c8===_0x5cbbed(0x270))this[_0x5cbbed(0x259)]=_0x4a62c8;}[_0x30ef63(0x2bb)](_0x392980,_0x98feac,_0x44ae84){const _0x29bfee=_0x30ef63;if(!this[_0x29bfee(0x2a8)])return;let _0x5e819b=this[_0x29bfee(0x2e2)]['get'](_0x392980);!_0x5e819b&&(_0x5e819b={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x29bfee(0x2e2)]['set'](_0x392980,_0x5e819b)),_0x5e819b['ms']+=_0x98feac,_0x5e819b[_0x29bfee(0x347)]+=0x1,_0x98feac>_0x5e819b[_0x29bfee(0x2ff)]&&(_0x5e819b[_0x29bfee(0x2ff)]=_0x98feac,_0x5e819b[_0x29bfee(0x2d8)]=_0x44ae84||'');}['start'](_0x1aba88){const _0x5adc2e=_0x30ef63;if(!this[_0x5adc2e(0x2a8)]||this[_0x5adc2e(0x32a)])return;this[_0x5adc2e(0x32a)]=!![];if(_0x1aba88)this[_0x5adc2e(0x259)]=_0x1aba88;this['_h']=_0x5d4925({'resolution':0xa}),this['_h']['enable'](),this[_0x5adc2e(0x28d)]=setInterval(()=>this[_0x5adc2e(0x24b)](),_0x4da524);if(this[_0x5adc2e(0x28d)][_0x5adc2e(0x2d6)])this[_0x5adc2e(0x28d)]['unref']();}['onWindow'](_0x180b3e){const _0x1e924d=_0x30ef63;if(!this[_0x1e924d(0x292)])this[_0x1e924d(0x292)]=new Set();this[_0x1e924d(0x292)][_0x1e924d(0x25f)](_0x180b3e);if(!this['_started'])this[_0x1e924d(0x27d)]();}[_0x30ef63(0x2c4)](_0xc62952){const _0x76316e=_0x30ef63;this['_windowCbs']?.[_0x76316e(0x27a)](_0xc62952);}[_0x30ef63(0x27d)](){const _0x2fd98d=_0x30ef63;if(this['_admissionStarted'])return;this[_0x2fd98d(0x322)]=!![];!this['_h']&&(this['_h']=_0x5d4925({'resolution':0xa}),this['_h'][_0x2fd98d(0x295)]());const _0x3ba6c0=_0x4da524;this[_0x2fd98d(0x26b)]=setInterval(()=>{const _0x567583=_0x2fd98d,_0x684aaa=this['_h'];if(!_0x684aaa)return;const _0x1943f2=_0x684aaa['percentile'](0x63)/0xf4240,_0x3180b4=_0x684aaa[_0x567583(0x2fb)]/0xf4240,_0x3fb574=_0x684aaa[_0x567583(0x2ae)]/0xf4240;_0x684aaa[_0x567583(0x337)]();if(this[_0x567583(0x292)])for(const _0x33a67f of this[_0x567583(0x292)]){try{_0x33a67f({'p99Ms':_0x1943f2,'maxMs':_0x3180b4,'meanMs':_0x3fb574,'reportMs':_0x3ba6c0});}catch{}}},_0x3ba6c0);if(this[_0x2fd98d(0x26b)]['unref'])this[_0x2fd98d(0x26b)][_0x2fd98d(0x2d6)]();}['_report'](){const _0x574ccc=_0x30ef63,_0x17b13d=this['_h'],_0x56a7a9=_0x17b13d['max']/0xf4240,_0x3113d7=_0x17b13d[_0x574ccc(0x234)](0x63)/0xf4240,_0x5716e3=_0x17b13d[_0x574ccc(0x2ae)]/0xf4240;_0x17b13d[_0x574ccc(0x337)]();const _0x1b54da=[...this[_0x574ccc(0x2e2)]['entries']()][_0x574ccc(0x263)](([_0x3109d3,_0x10cfe3])=>({'label':_0x3109d3,..._0x10cfe3}))[_0x574ccc(0x2e7)]((_0x3ec2ff,_0x55943a)=>_0x55943a['ms']-_0x3ec2ff['ms'])[_0x574ccc(0x33a)](0x0,0x8);this['_buckets'][_0x574ccc(0x2f0)]();const _0x3ff8f3=_0x1b54da[_0x574ccc(0x283)]((_0x43f54f,_0x24d632)=>_0x43f54f+_0x24d632['ms'],0x0),_0xa0242f=_0x1b54da[_0x574ccc(0x263)](_0x5741d5=>_0x5741d5[_0x574ccc(0x2da)]+'='+_0x5741d5['ms'][_0x574ccc(0x378)](0x0)+_0x574ccc(0x329)+_0x5741d5['count']+(_0x5741d5[_0x574ccc(0x2ff)]>0x5?_0x574ccc(0x265)+_0x5741d5[_0x574ccc(0x2ff)]['toFixed'](0x0)+'ms'+(_0x5741d5['maxExtra']?'\x20'+_0x5741d5[_0x574ccc(0x2d8)]:'')+')':''));(_0x47ea35||_0x56a7a9>=_0x5712ec)&&this[_0x574ccc(0x259)](_0x574ccc(0x2e3)+_0x4da524+'ms\x20max='+_0x56a7a9['toFixed'](0x0)+_0x574ccc(0x281)+_0x3113d7[_0x574ccc(0x378)](0x0)+'ms\x20mean='+_0x5716e3['toFixed'](0x0)+_0x574ccc(0x27b)+_0x3ff8f3[_0x574ccc(0x378)](0x0)+'ms'+(_0xa0242f[_0x574ccc(0x360)]?_0x574ccc(0x303)+_0xa0242f[_0x574ccc(0x296)]('\x20\x20'):''),{'feature':_0x574ccc(0x25e)});if(this[_0x574ccc(0x292)])for(const _0x52f6f4 of this[_0x574ccc(0x292)]){try{_0x52f6f4({'p99Ms':_0x3113d7,'maxMs':_0x56a7a9,'meanMs':_0x5716e3,'reportMs':_0x4da524});}catch{}}}[_0x30ef63(0x308)](){const _0x17ac95=_0x30ef63;if(this['_timer'])clearInterval(this[_0x17ac95(0x28d)]);if(this['_h'])this['_h'][_0x17ac95(0x26a)]();this[_0x17ac95(0x28d)]=null,this['_h']=null,this[_0x17ac95(0x32a)]=![];}}const _0x246fe9=new _0xfed1d1();if(_0x246fe9[_0x30ef63(0x2a8)])_0x246fe9[_0x30ef63(0x35e)]();return okdbLoopMonitor={'LOOP':_0x246fe9},okdbLoopMonitor;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x126601=_0x4f3d84;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x4a0674=require$$0$1,_0x218a88=require$$1,_0x47a4f6=require$$2,{LOOP:_0x6faa04}=requireOkdbLoopMonitor(),_0x47b47f=_0x126601(0x254),_0x31cc43=_0x126601(0x31e),_0x105601=_0x126601(0x26d),_0x5f2542=_0x126601(0x2aa),_0x2c50c0=(_0x18b1fd,_0x2c67c8)=>_0x18b1fd+':'+_0x2c67c8,_0x16798c=(_0x3c6fe4,_0x351763)=>_0x3c6fe4+'::'+_0x351763,_0x57116d=(_0x2cc699,_0x340d1a)=>_0x2cc699+'/'+_0x340d1a,_0xa7363c=(_0x4fb486,_0x5852ac)=>_0x4fb486+'#'+_0x5852ac,_0x345f6d=_0x43c837=>{const _0x1f2076=_0x126601;if(_0x43c837?.['processKey'])return _0x43c837[_0x1f2076(0x230)];const _0x202d78=_0x43c837?.[_0x1f2076(0x2e5)];return typeof _0x202d78===_0x1f2076(0x266)&&_0x202d78[_0x1f2076(0x27c)]('#')?_0x202d78[_0x1f2076(0x33a)](0x0,_0x202d78['indexOf']('#')):_0x202d78;},_0x10da44=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x5d6e4d=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x4a8e16=_0x10da44*0x3,_0x243e9b=[_0x126601(0x2ab),_0x126601(0x2a6),_0x126601(0x2b1),'processor:error'];let _0x3b5b50=null;function _0x4dd89b(){const _0x327e30=_0x126601;if(_0x3b5b50==null)_0x3b5b50=Math[_0x327e30(0x2ba)]((Date[_0x327e30(0x260)]()-process['uptime']()*0x3e8)/0x3e8)*0x3e8;return _0x3b5b50;}function _0x317d39(_0x2c576b){const _0x3739c6=_0x126601;if(process.env.OKDB_PROCESS_KILL===_0x3739c6(0x1ff))return![];if(_0x2c576b?.[_0x3739c6(0x293)]?.[_0x3739c6(0x218)]&&typeof _0x2c576b[_0x3739c6(0x293)]['processes']===_0x3739c6(0x2cc)&&_0x2c576b['options'][_0x3739c6(0x218)][_0x3739c6(0x350)]===![])return![];return!![];}function _0x3eae2c(_0x1342d5,_0xea4ff6){const _0x3ca4aa=_0x126601,_0x41a924=!!_0xea4ff6?.[_0x3ca4aa(0x1f6)];switch(_0x1342d5){case _0x3ca4aa(0x358):return{'controllable':_0x41a924,'decommissionable':![],'killable':!![],'killConfirm':_0x3ca4aa(0x26c)};case _0x3ca4aa(0x338):case _0x3ca4aa(0x25b):return{'controllable':_0x41a924,'decommissionable':![],'killable':!![],'killConfirm':_0x3ca4aa(0x306)};case'embedded':return{'controllable':![],'decommissionable':![],'killable':![]};case _0x3ca4aa(0x20d):case _0x3ca4aa(0x1e5):case _0x3ca4aa(0x22b):case _0x3ca4aa(0x228):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x3ca4aa(0x35a)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x4c16ca{constructor(_0x116368){const _0x4236bb=_0x126601;this[_0x4236bb(0x20c)]=_0x116368,this['_statusEnv']=null,this[_0x4236bb(0x25a)]=null,this[_0x4236bb(0x2ea)]=null,this[_0x4236bb(0x354)]=![],this[_0x4236bb(0x317)]=![],this[_0x4236bb(0x2ad)]=_0x4dd89b(),this['_selfKey']=_0x2c50c0(process['pid'],this['_processStartedAt']),this['_instanceId']=_0x47a4f6[_0x4236bb(0x1fc)]()[_0x4236bb(0x33a)](0x0,0x8),this[_0x4236bb(0x2fd)]=_0xa7363c(this[_0x4236bb(0x2bf)],this[_0x4236bb(0x32e)]),this[_0x4236bb(0x346)]=Date['now'](),this[_0x4236bb(0x313)]=null,this[_0x4236bb(0x23e)]=null,this[_0x4236bb(0x2c0)]=null,this[_0x4236bb(0x28f)]=null,this[_0x4236bb(0x2c2)]=null,this[_0x4236bb(0x2e8)]=null,this['_lastPublishAt']=0x0,this['_ownMeta']={},this[_0x4236bb(0x355)]=new Map(),this[_0x4236bb(0x2a0)]=process['cpuUsage'](),this[_0x4236bb(0x302)]=Date[_0x4236bb(0x260)](),this[_0x4236bb(0x2b4)]=0x0,this[_0x4236bb(0x1f7)]=new Map();}get[_0x126601(0x22d)](){return this['_selfKey'];}get[_0x126601(0x340)](){const _0x14593f=_0x126601;return this[_0x14593f(0x2fd)];}['_caps'](_0x27da6a,_0x4f0603){const _0x5e46d9=_0x126601,_0x329770=_0x3eae2c(_0x27da6a,_0x4f0603);if(_0x329770['killable']&&!_0x317d39(this[_0x5e46d9(0x20c)]))return{..._0x329770,'killable':![],'killConfirm':undefined};return _0x329770;}[_0x126601(0x1dc)](){const _0x12670c=_0x126601;return!!this[_0x12670c(0x1fd)];}[_0x126601(0x2fc)](_0x1699aa){Object['assign'](this['_ownMeta'],_0x1699aa||{});}[_0x126601(0x359)](_0x4d7fce){if(_0x4d7fce)this['_listenAddr']=_0x4d7fce;}[_0x126601(0x314)](_0x1e0630={}){const _0x44ff30=_0x126601;return this[_0x44ff30(0x20c)][_0x44ff30(0x2cb)](_0x1e0630);}['processingStatusView'](){const _0x732cfc=_0x126601;let _0x61688c=null;const _0x42f6b1={};for(const _0x3cc396 of this[_0x732cfc(0x310)]()){const _0x4fa409=_0x3cc396[_0x732cfc(0x2e9)];if(!_0x4fa409)continue;if(_0x61688c==null)_0x61688c=_0x4fa409[_0x732cfc(0x253)];for(const _0x29cd0c of _0x4fa409['processors']||[]){if(![_0x732cfc(0x29b),_0x732cfc(0x37c),'worker','async'][_0x732cfc(0x27c)](_0x29cd0c[_0x732cfc(0x2f6)]))continue;const _0x5ddef5=_0x29cd0c['env']||_0x732cfc(0x336);(_0x42f6b1[_0x5ddef5]||=[])[_0x732cfc(0x27f)]({'type':_0x29cd0c[_0x732cfc(0x34f)],'mode':_0x29cd0c[_0x732cfc(0x2f6)],'state':_0x29cd0c[_0x732cfc(0x203)],'lastClock':_0x29cd0c[_0x732cfc(0x376)],'headClock':_0x29cd0c[_0x732cfc(0x25c)],'lag':_0x29cd0c[_0x732cfc(0x34a)]});}}return{'envs':_0x42f6b1,'policy':_0x61688c,'source':'workers'};}[_0x126601(0x235)](){const _0x5552cf=_0x126601,_0x1dce57=_0x3e6172=>{const _0x3ac5ba=_0x1df0;if(_0x3e6172[_0x3ac5ba(0x203)]===_0x3ac5ba(0x2fe)||_0x3e6172[_0x3ac5ba(0x203)]===_0x3ac5ba(0x2c1)||_0x3e6172[_0x3ac5ba(0x203)]===_0x3ac5ba(0x1f1))return 0x3;if(_0x3e6172[_0x3ac5ba(0x2a3)])return 0x1;return 0x2;},_0x1235e4=new Map();for(const _0x23f6b9 of this[_0x5552cf(0x310)]()){for(const _0x59e04a of _0x23f6b9[_0x5552cf(0x2e9)]?.[_0x5552cf(0x214)]||[]){const _0x5ac27d={..._0x59e04a,'owner':{'pid':_0x23f6b9[_0x5552cf(0x2b0)]??null,'kind':_0x23f6b9[_0x5552cf(0x35b)]??null,'host':_0x23f6b9[_0x5552cf(0x240)]??null}},_0x4e50af=_0x59e04a[_0x5552cf(0x2f6)]==='single'?_0x5552cf(0x250)+(_0x59e04a[_0x5552cf(0x2dc)]??'')+'::'+(_0x59e04a['cursorKey']??_0x59e04a['type']??_0x59e04a['id']):_0x5552cf(0x255)+(_0x23f6b9[_0x5552cf(0x2e5)]??_0x23f6b9[_0x5552cf(0x230)]??'')+'::'+(_0x59e04a[_0x5552cf(0x2dc)]??'')+'::'+_0x59e04a['id'],_0x1cdc30=_0x1235e4[_0x5552cf(0x332)](_0x4e50af);if(!_0x1cdc30||_0x1dce57(_0x5ac27d)>_0x1dce57(_0x1cdc30))_0x1235e4['set'](_0x4e50af,_0x5ac27d);}}return[..._0x1235e4[_0x5552cf(0x1df)]()];}[_0x126601(0x2f8)](){const _0xebc3f7=_0x126601,_0x25223a=Date['now'](),_0x8185fe=this[_0xebc3f7(0x310)](),_0x501a47=_0x4534be=>Math[_0xebc3f7(0x2fb)](0x0,Math[_0xebc3f7(0x2ba)]((_0x25223a-(_0x4534be[_0xebc3f7(0x32d)]||_0x25223a))/0x3e8)),_0x284ba2=_0x8185fe[_0xebc3f7(0x30f)](_0x26275b=>_0x26275b[_0xebc3f7(0x35b)]===_0xebc3f7(0x358)),_0x255a6c=_0x8185fe[_0xebc3f7(0x304)](_0x3950bb=>_0x3950bb[_0xebc3f7(0x35b)]===_0xebc3f7(0x20d));if(_0x284ba2||_0x255a6c['length'])return{'primary':_0x284ba2?{'pid':_0x284ba2['pid'],'uptime':_0x501a47(_0x284ba2)}:null,'workers':_0x255a6c[_0xebc3f7(0x263)](_0x1a4731=>({'pid':_0x1a4731[_0xebc3f7(0x2b0)],'uptime':_0x501a47(_0x1a4731)})),'workersConfigured':_0x284ba2?.[_0xebc3f7(0x339)]?.[_0xebc3f7(0x321)]??_0x255a6c['length'],'mode':_0xebc3f7(0x211)};const _0x3d0cd4=_0x8185fe['find'](_0x1f44eb=>_0x1f44eb[_0xebc3f7(0x35b)]===_0xebc3f7(0x338)||_0x1f44eb[_0xebc3f7(0x35b)]==='standalone'||_0x1f44eb[_0xebc3f7(0x35b)]===_0xebc3f7(0x333)),_0x9f0529=_0x3d0cd4?{'pid':_0x3d0cd4['pid'],'uptime':_0x501a47(_0x3d0cd4)}:{'pid':process[_0xebc3f7(0x2b0)],'uptime':Math[_0xebc3f7(0x2fb)](0x0,Math[_0xebc3f7(0x2ba)](process[_0xebc3f7(0x232)]()))};return{'primary':_0x9f0529,'workers':[_0x9f0529],'workersConfigured':0x1,'mode':'single'};}[_0x126601(0x30c)](){return this['_groupByProcess']();}['treeView'](){const _0x3576cb=_0x126601,_0x138151=new Map();for(const _0x2dcdc8 of this['_groupByProcess']())_0x138151[_0x3576cb(0x24c)](_0x2dcdc8[_0x3576cb(0x230)],{..._0x2dcdc8,'children':[]});const _0x41ac65=[];for(const _0x15d933 of _0x138151['values']()){const _0x316191=_0x15d933[_0x3576cb(0x2d7)]?_0x138151[_0x3576cb(0x332)](_0x15d933['supervisorKey']):null;if(_0x316191&&_0x316191!==_0x15d933)_0x316191['children'][_0x3576cb(0x27f)](_0x15d933);else _0x41ac65[_0x3576cb(0x27f)](_0x15d933);}const _0x1e9225=(_0x30497f,_0x397702)=>_0x30497f['kind']===_0x397702[_0x3576cb(0x35b)]?(_0x30497f[_0x3576cb(0x2b0)]||0x0)-(_0x397702[_0x3576cb(0x2b0)]||0x0):(_0x30497f[_0x3576cb(0x35b)]??'')<(_0x397702[_0x3576cb(0x35b)]??'')?-0x1:0x1,_0x262aee=_0x125d96=>{const _0x320e6f=_0x3576cb;_0x125d96[_0x320e6f(0x2e7)](_0x1e9225);for(const _0x330174 of _0x125d96)if(_0x330174[_0x320e6f(0x1f9)][_0x320e6f(0x360)])_0x262aee(_0x330174[_0x320e6f(0x1f9)]);};return _0x262aee(_0x41ac65),_0x41ac65;}[_0x126601(0x334)](_0x571b19){const _0x2c35a9=_0x126601;return this[_0x2c35a9(0x280)]()[_0x2c35a9(0x30f)](_0xd4f80f=>_0xd4f80f[_0x2c35a9(0x230)]===_0x571b19)??null;}[_0x126601(0x280)](_0x30cdde=Date['now']()){const _0x187b1b=_0x126601,_0x331190=new Map();for(const _0xfa7253 of this[_0x187b1b(0x310)]()){const _0x19e7be=_0x345f6d(_0xfa7253);let _0x34b453=_0x331190[_0x187b1b(0x332)](_0x19e7be);!_0x34b453&&(_0x34b453={'processKey':_0x19e7be,'nodeKey':_0x19e7be,'pid':_0xfa7253['pid'],'ppid':_0xfa7253['ppid']??null,'host':_0xfa7253[_0x187b1b(0x240)]??null,'kind':_0xfa7253[_0x187b1b(0x35b)],'role':null,'supervisorKey':_0xfa7253[_0x187b1b(0x2d7)]??null,'slot':_0xfa7253[_0x187b1b(0x1f2)]??null,'slotKey':_0xfa7253[_0x187b1b(0x224)]??null,'caps':_0xfa7253['caps']??null,'lifecycle':_0xfa7253[_0x187b1b(0x2c6)]??null,'uptime':Math[_0x187b1b(0x2fb)](0x0,Math[_0x187b1b(0x2ba)]((_0x30cdde-(_0xfa7253[_0x187b1b(0x32d)]||_0x30cdde))/0x3e8)),'startedAt':_0xfa7253[_0x187b1b(0x32d)]??null,'meta':_0xfa7253[_0x187b1b(0x339)]??null,'listenAddr':null,'processing':null,'stats':null,'instances':[]},_0x331190[_0x187b1b(0x24c)](_0x19e7be,_0x34b453));_0x34b453[_0x187b1b(0x2db)][_0x187b1b(0x27f)]({'instanceId':_0xfa7253[_0x187b1b(0x29f)]??null,'role':_0xfa7253[_0x187b1b(0x1ef)]??null,'listenAddr':_0xfa7253['listenAddr']??null,'lifecycle':_0xfa7253[_0x187b1b(0x2c6)]??null,'processing':_0xfa7253[_0x187b1b(0x2e9)]??null});if(!_0x34b453[_0x187b1b(0x1ef)]&&_0xfa7253['role'])_0x34b453[_0x187b1b(0x1ef)]=_0xfa7253[_0x187b1b(0x1ef)];if(!_0x34b453[_0x187b1b(0x2e4)]&&_0xfa7253[_0x187b1b(0x2e4)])_0x34b453[_0x187b1b(0x2e4)]=_0xfa7253[_0x187b1b(0x2e4)];if(!_0x34b453['processing']&&_0xfa7253['processing'])_0x34b453[_0x187b1b(0x2e9)]=_0xfa7253[_0x187b1b(0x2e9)];if(_0x34b453[_0x187b1b(0x2fa)]==null&&_0xfa7253['caps'])_0x34b453[_0x187b1b(0x2fa)]=_0xfa7253[_0x187b1b(0x2fa)];if(_0xfa7253[_0x187b1b(0x2c7)]&&(!_0x34b453[_0x187b1b(0x2c7)]||(_0xfa7253['stats']['at']??0x0)>(_0x34b453[_0x187b1b(0x2c7)]['at']??0x0)))_0x34b453[_0x187b1b(0x2c7)]=_0xfa7253['stats'];}return[..._0x331190[_0x187b1b(0x1df)]()];}['runtimeProcessesView'](){const _0x29aba2=_0x126601,_0x3d99e6=[],_0x5cdf4a={'rss':0x0,'heapUsed':0x0,'processes':0x0};for(const _0x1f5292 of this['_groupByProcess']()){_0x3d99e6[_0x29aba2(0x27f)]({'processKey':_0x1f5292[_0x29aba2(0x230)],'kind':_0x1f5292[_0x29aba2(0x35b)],'pid':_0x1f5292[_0x29aba2(0x2b0)],'supervisorKey':_0x1f5292['supervisorKey'],'meta':_0x1f5292[_0x29aba2(0x339)]??null,'uptime':_0x1f5292[_0x29aba2(0x232)],'stats':_0x1f5292[_0x29aba2(0x2c7)]??null}),_0x5cdf4a['processes']++,_0x1f5292['stats']&&(_0x5cdf4a['rss']+=_0x1f5292['stats']['rss']||0x0,_0x5cdf4a['heapUsed']+=(_0x1f5292['stats'][_0x29aba2(0x377)]||0x0)+(_0x1f5292['stats']['threads']?.[_0x29aba2(0x377)]||0x0));}return{'totals':_0x5cdf4a,'nodes':_0x3d99e6};}async[_0x126601(0x28b)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x463da7=_0x126601;this[_0x463da7(0x354)]=this[_0x463da7(0x354)]||!!writer,this[_0x463da7(0x317)]=this['_isReader']||!!reader,this[_0x463da7(0x313)]=kind||this[_0x463da7(0x313)]||(_0x218a88[_0x463da7(0x323)]?_0x463da7(0x20d):'cli'),this[_0x463da7(0x23e)]=supervisorKey??this[_0x463da7(0x23e)],this[_0x463da7(0x2c0)]=listenAddr??this[_0x463da7(0x2c0)],this[_0x463da7(0x2d2)]();if(!writer&&!reader)return null;if(!this[_0x463da7(0x1fd)]){const _0x5ca495=await this['okdb'][_0x463da7(0x2a2)](_0x47b47f,{'sync':![],'durability':'fast'});if(!_0x5ca495[_0x463da7(0x33c)](_0x31cc43))await _0x5ca495['registerType'](_0x31cc43);this[_0x463da7(0x1fd)]=_0x5ca495;}return this[_0x463da7(0x1fd)];}[_0x126601(0x1f0)](){const _0x4234b2=_0x126601;return this[_0x4234b2(0x237)]!==this[_0x4234b2(0x1fd)]&&(this[_0x4234b2(0x237)]=this[_0x4234b2(0x1fd)],this[_0x4234b2(0x2a4)]=this[_0x4234b2(0x1fd)][_0x4234b2(0x2b6)](_0x31cc43)[_0x4234b2(0x1e7)]),this[_0x4234b2(0x2a4)];}[_0x126601(0x294)](_0x74441c){const _0x2119cc=_0x126601,_0x2db86e=this[_0x2119cc(0x1f0)]()[_0x2119cc(0x1e1)](_0x74441c[_0x2119cc(0x2e5)],_0x74441c,0x1);if(_0x2db86e&&typeof _0x2db86e['then']===_0x2119cc(0x270))_0x2db86e[_0x2119cc(0x353)](undefined,()=>{});return _0x2db86e;}['_removeRowAsync'](_0x29fc42){const _0x37b4ed=_0x126601,_0x3c8cb8=this[_0x37b4ed(0x1f0)]()[_0x37b4ed(0x320)](_0x29fc42);if(_0x3c8cb8&&typeof _0x3c8cb8[_0x37b4ed(0x353)]===_0x37b4ed(0x270))_0x3c8cb8[_0x37b4ed(0x353)](undefined,()=>{});return _0x3c8cb8;}async[_0x126601(0x366)](_0x20ca9a){const _0x429c46=_0x126601;if(!this[_0x429c46(0x1fd)]||!this[_0x429c46(0x354)]||!_0x20ca9a?.[_0x429c46(0x2e5)])return;return this[_0x429c46(0x294)](_0x20ca9a);}async[_0x126601(0x22a)](_0x2d4736){const _0x56b33a=_0x126601;if(!this[_0x56b33a(0x1fd)]||!this[_0x56b33a(0x354)]||!_0x2d4736)return;const _0x464a31=_0x2d4736[_0x56b33a(0x27c)]('#'),_0x3a07ec=[];for(const {key:_0x1ce5d5}of this['_statusEnv']['getRange'](_0x31cc43)){if(_0x1ce5d5===_0x2d4736||!_0x464a31&&typeof _0x1ce5d5===_0x56b33a(0x266)&&_0x1ce5d5[_0x56b33a(0x362)](_0x2d4736+'#'))_0x3a07ec['push'](_0x1ce5d5);}return Promise['all'](_0x3a07ec[_0x56b33a(0x263)](_0x40d571=>this[_0x56b33a(0x318)](_0x40d571)));}[_0x126601(0x249)](_0xe9866e){const _0x172637=_0x126601;if(typeof _0xe9866e?.[_0x172637(0x2b0)]!=='number')return![];if(_0xe9866e[_0x172637(0x240)]!==_0x4a0674[_0x172637(0x279)]())return![];if(_0xe9866e['pid']===process[_0x172637(0x2b0)])return![];try{return process['kill'](_0xe9866e[_0x172637(0x2b0)],0x0),![];}catch(_0x3816d1){return _0x3816d1[_0x172637(0x21f)]==='ESRCH';}}[_0x126601(0x310)](){const _0xdafcae=_0x126601;if(!this[_0xdafcae(0x1fd)])return[];const _0x1ea607=Date[_0xdafcae(0x260)](),_0x4044f9=[];for(const {value:_0x4ddea4}of this[_0xdafcae(0x1fd)][_0xdafcae(0x285)](_0x31cc43)){if(_0x4ddea4&&(_0x4ddea4[_0xdafcae(0x227)]==null||_0x4ddea4[_0xdafcae(0x227)]>=_0x1ea607)&&!this[_0xdafcae(0x249)](_0x4ddea4))_0x4044f9[_0xdafcae(0x27f)](_0x4ddea4);}return _0x4044f9;}[_0x126601(0x36e)](_0xc170a1=0x0){const _0x526dea=_0x126601;if(!this[_0x526dea(0x1fd)]||!this['_isWriter'])return;const _0x297b5c=Date[_0x526dea(0x260)]()-_0xc170a1,_0x3601e3=new Set(),_0x1ed5ee=[];for(const {key:_0x4de1f0,value:_0x2919ee}of this['_statusEnv'][_0x526dea(0x285)](_0x31cc43)){if(_0x2919ee&&(_0x2919ee[_0x526dea(0x227)]!=null&&_0x2919ee['expiresAt']<_0x297b5c||this[_0x526dea(0x249)](_0x2919ee)))_0x1ed5ee[_0x526dea(0x27f)](_0x4de1f0);else _0x3601e3['add'](_0x345f6d(_0x2919ee)??_0x4de1f0);}for(const _0x583afd of _0x1ed5ee)this['_removeRowAsync'](_0x583afd);if(this['_ensureDesired']())for(const {key:_0x4f029b}of this[_0x526dea(0x20e)]('node')){if(!_0x3601e3[_0x526dea(0x2df)](_0x4f029b))this['_desired'][_0x526dea(0x1f3)]('node/'+_0x4f029b);}}[_0x126601(0x1e9)](_0x4a6344=null){const _0x356c17=_0x126601;if(this[_0x356c17(0x28f)]||!this['_isWriter']||!this[_0x356c17(0x1fd)])return;this[_0x356c17(0x2e8)]=_0x4a6344,this[_0x356c17(0x2c2)]=()=>this[_0x356c17(0x268)]();for(const _0x105b06 of _0x243e9b)this[_0x356c17(0x20c)][_0x356c17(0x300)]['on'](_0x105b06,this['_onProcEvent']);this['_publishNow']();const _0x3cdae7=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x10da44;this[_0x356c17(0x28f)]=setInterval(()=>{const _0x18599c=_0x356c17;if(this['_onTick'])try{this[_0x18599c(0x2e8)]();}catch{}this['_publishNow'](),this[_0x18599c(0x36e)]();},_0x3cdae7);if(this[_0x356c17(0x28f)][_0x356c17(0x2d6)])this[_0x356c17(0x28f)][_0x356c17(0x2d6)]();}[_0x126601(0x268)](){const _0x30e9b9=_0x126601;if(!this['_isWriter']||!this['_statusEnv'])return;if(Date[_0x30e9b9(0x260)]()-this[_0x30e9b9(0x1dd)]<_0x5d6e4d)return;this[_0x30e9b9(0x207)]();}[_0x126601(0x207)](){const _0x5075c3=_0x126601;if(!this[_0x5075c3(0x354)]||!this['_statusEnv'])return;this['_lastPublishAt']=Date[_0x5075c3(0x260)]();try{const _0x2b86f7=[this[_0x5075c3(0x23b)]()];for(const _0x113eba of this[_0x5075c3(0x355)][_0x5075c3(0x1df)]())_0x2b86f7[_0x5075c3(0x27f)](this[_0x5075c3(0x220)](_0x113eba));const _0xe40ce1=_0x6faa04[_0x5075c3(0x2a8)]?_0x6faa04[_0x5075c3(0x260)]():0x0,_0x194e99=Promise[_0x5075c3(0x248)](_0x2b86f7['map'](_0x34d796=>this[_0x5075c3(0x294)](_0x34d796)))[_0x5075c3(0x36b)](()=>{});if(_0x6faa04[_0x5075c3(0x2a8)])_0x6faa04[_0x5075c3(0x2bb)]('registry-publish',_0x6faa04[_0x5075c3(0x260)]()-_0xe40ce1,_0x5075c3(0x2ee)+_0x2b86f7[_0x5075c3(0x360)]);return _0x194e99;}catch{}}async['stopHeartbeat'](){const _0xa47b5e=_0x126601;if(this[_0xa47b5e(0x2c2)]){for(const _0x412bb9 of _0x243e9b){try{this[_0xa47b5e(0x20c)][_0xa47b5e(0x300)][_0xa47b5e(0x1ff)](_0x412bb9,this[_0xa47b5e(0x2c2)]);}catch{}}this['_onProcEvent']=null;}this['_hbTimer']&&(clearInterval(this['_hbTimer']),this['_hbTimer']=null);try{if(this[_0xa47b5e(0x1fd)]&&this[_0xa47b5e(0x354)])await this[_0xa47b5e(0x22a)](this['_rowKey']);}catch{}}async[_0x126601(0x20a)](){const _0x202709=_0x126601;if(!this[_0x202709(0x1fd)]||!this[_0x202709(0x354)])return;try{await this[_0x202709(0x22a)](this[_0x202709(0x2fd)]);}catch{}try{const _0x574958=[];for(const {value:_0x3cf981}of this['_statusEnv'][_0x202709(0x285)](_0x31cc43)){if(_0x3cf981?.['ppid']===process[_0x202709(0x2b0)]&&_0x3cf981[_0x202709(0x2e5)])_0x574958[_0x202709(0x27f)](_0x3cf981[_0x202709(0x2e5)]);}for(const _0x53bd3d of _0x574958){try{await this[_0x202709(0x22a)](_0x53bd3d);}catch{}}}catch{}}async[_0x126601(0x1f5)](){const _0x4a53df=_0x126601;return this[_0x4a53df(0x366)](this[_0x4a53df(0x23b)]());}async[_0x126601(0x288)](_0x5e7dd8){const _0x3dd782=_0x126601;if(!this[_0x3dd782(0x1fd)]||!this[_0x3dd782(0x354)])return;return this[_0x3dd782(0x366)](this[_0x3dd782(0x220)](_0x5e7dd8));}[_0x126601(0x220)]({pid:_0x15d7f7,startedAt:_0x24c587,kind:_0x4002d1,supervisorKey:_0x53bbf1,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle='running',meta:meta=null,stats:stats=null}){const _0x294f54=_0x126601,_0x77c4ab=Date['now'](),_0x26ad9c=_0x2c50c0(_0x15d7f7,_0x24c587);return{'nodeKey':_0xa7363c(_0x26ad9c,'0'),'processKey':_0x26ad9c,'instanceId':'0','pid':_0x15d7f7,'startedAt':_0x24c587,'ppid':process[_0x294f54(0x2b0)],'host':_0x4a0674[_0x294f54(0x279)](),'supervisorKey':_0x53bbf1,'slot':slot,'slotKey':slotKey,'kind':_0x4002d1,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x77c4ab,'expiresAt':_0x77c4ab+_0x4a8e16,'caps':this[_0x294f54(0x2d1)](_0x4002d1,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x126601(0x36a)](_0x4e697a){const _0x46112d=_0x126601;if(!_0x4e697a?.['pid'])return null;const _0x1d4f4e=_0x2c50c0(_0x4e697a[_0x46112d(0x2b0)],_0x4e697a[_0x46112d(0x32d)]);this[_0x46112d(0x355)][_0x46112d(0x24c)](_0x1d4f4e,{..._0x4e697a,'supervisorKey':_0x4e697a['supervisorKey']??this['_selfKey']});if(this[_0x46112d(0x354)])await this[_0x46112d(0x288)](this['_children'][_0x46112d(0x332)](_0x1d4f4e))['catch']?.(()=>{});return _0x1d4f4e;}[_0x126601(0x278)](_0x4cccba){const _0x104a3d=_0x126601;if(!_0x4cccba)return;return this['_children'][_0x104a3d(0x27a)](_0x4cccba),this['removeNode'](_0x4cccba);}[_0x126601(0x2f1)](){const _0x249120=_0x126601,_0x2531fb=Date[_0x249120(0x260)](),_0x38641f=process['cpuUsage'](),_0x10316e=(_0x2531fb-this[_0x249120(0x302)])*0x3e8;if(_0x10316e>=0x3d090){const _0x556d7e=_0x38641f['user']-this['_lastCpuUsage'][_0x249120(0x312)]+(_0x38641f['system']-this[_0x249120(0x2a0)][_0x249120(0x297)]),_0x3e9557=_0x4a0674[_0x249120(0x204)]()[_0x249120(0x360)]||0x1;this[_0x249120(0x2b4)]=Math[_0x249120(0x349)](0x64,Math[_0x249120(0x2ba)](_0x556d7e/(_0x10316e*_0x3e9557)*0x64)),this[_0x249120(0x242)]=Math[_0x249120(0x2ba)](_0x10316e/0x3e8),this[_0x249120(0x2a0)]=_0x38641f,this[_0x249120(0x302)]=_0x2531fb;}const _0x484ab0=process['memoryUsage']();let _0x37bc5b=null;if(this[_0x249120(0x1f7)][_0x249120(0x23d)]>0x0){let _0x4feb99=0x0;for(const _0x3ec48b of this[_0x249120(0x1f7)][_0x249120(0x1df)]())_0x4feb99+=_0x3ec48b[_0x249120(0x377)]||0x0;_0x37bc5b={'count':this[_0x249120(0x1f7)][_0x249120(0x23d)],'heapUsed':_0x4feb99};}return{'rss':_0x484ab0[_0x249120(0x1ed)],'heapUsed':_0x484ab0[_0x249120(0x377)],'heapTotal':_0x484ab0[_0x249120(0x298)],'external':_0x484ab0[_0x249120(0x330)],'cpuPct':this[_0x249120(0x2b4)],'cpuWindowMs':this[_0x249120(0x242)]??null,'threads':_0x37bc5b,'at':_0x2531fb};}[_0x126601(0x247)](_0x479ef1,_0x41b005){const _0x43a030=_0x126601;if(!_0x479ef1||!_0x41b005)return;this[_0x43a030(0x1f7)][_0x43a030(0x24c)](_0x479ef1,_0x41b005);}['clearThreadStats'](_0x355ba4){const _0x1c7888=_0x126601;this['_threadStats'][_0x1c7888(0x27a)](_0x355ba4);}[_0x126601(0x2c9)](_0xdd1362,_0xc2968c,_0x1d36a9=undefined){const _0x45c6cd=_0x126601,_0x38bb3d=this[_0x45c6cd(0x355)][_0x45c6cd(0x332)](_0xdd1362);if(!_0x38bb3d||!_0xc2968c)return;if(_0x1d36a9!==undefined)_0x38bb3d[_0x45c6cd(0x2e9)]=_0x1d36a9;_0x38bb3d[_0x45c6cd(0x2c7)]={'rss':_0xc2968c[_0x45c6cd(0x1ed)]??null,'heapUsed':_0xc2968c['heapUsed']??null,'heapTotal':_0xc2968c[_0x45c6cd(0x298)]??null,'external':_0xc2968c['external']??null,'cpuPct':_0xc2968c[_0x45c6cd(0x30d)]??null,'cpuWindowMs':_0xc2968c[_0x45c6cd(0x2e6)]??null,'threads':_0xc2968c['threads']??null,'claims':_0xc2968c[_0x45c6cd(0x2a9)]??null,'envsOpen':_0xc2968c[_0x45c6cd(0x319)]??null,'at':Date[_0x45c6cd(0x260)]()};}[_0x126601(0x23b)](){const _0x401ca6=_0x126601,_0x241cac=Date[_0x401ca6(0x260)](),_0x5d8ed5=this['okdb'][_0x401ca6(0x2b5)]||{},_0x405d8f=this['_kind']||_0x401ca6(0x338);return{'nodeKey':this['_rowKey'],'processKey':this['_selfKey'],'instanceId':this[_0x401ca6(0x32e)],'pid':process[_0x401ca6(0x2b0)],'startedAt':this[_0x401ca6(0x2ad)],'instanceStartedAt':this[_0x401ca6(0x346)],'ppid':typeof process[_0x401ca6(0x356)]===_0x401ca6(0x305)?process['ppid']:null,'host':_0x4a0674[_0x401ca6(0x279)](),'supervisorKey':this['_supervisorKey']??null,'kind':_0x405d8f,'role':{'engines':!!_0x5d8ed5[_0x401ca6(0x301)],'asyncProcessors':!!_0x5d8ed5[_0x401ca6(0x1f6)],'compaction':_0x5d8ed5[_0x401ca6(0x2bd)],'http':_0x5d8ed5['http']},'listenAddr':this[_0x401ca6(0x2c0)]??null,'heartbeatAt':_0x241cac,'expiresAt':_0x241cac+_0x4a8e16,'caps':this[_0x401ca6(0x2d1)](_0x405d8f,_0x5d8ed5),'lifecycle':{'state':_0x401ca6(0x236),'desiredVersionApplied':null},'meta':{...this[_0x401ca6(0x258)]},'processing':_0x5d8ed5[_0x401ca6(0x1f6)]?this[_0x401ca6(0x244)]():null,'stats':this['_sampleOwnStats']()};}[_0x126601(0x244)](){const _0x3c93bc=_0x126601,_0x59dca4=[];try{for(const [_0x4992db,_0x25f70b]of this[_0x3c93bc(0x20c)]['_envs']){if(_0x4992db[_0x3c93bc(0x362)]('~'))continue;for(const _0x45d700 of _0x25f70b[_0x3c93bc(0x31c)][_0x3c93bc(0x372)]())_0x59dca4[_0x3c93bc(0x27f)]({..._0x45d700,'env':_0x4992db});}}catch{}return{'policy':this[_0x3c93bc(0x20c)][_0x3c93bc(0x352)]??null,'processors':_0x59dca4};}['_ensureDesired'](){const _0x345df7=_0x126601;if(this[_0x345df7(0x25a)])return!![];const _0x59feae=this[_0x345df7(0x20c)]['_rootDb'];if(!_0x59feae)return![];return this[_0x345df7(0x25a)]=_0x59feae[_0x345df7(0x22c)](_0x105601,{'dupSort':![]}),this[_0x345df7(0x2ea)]=_0x59feae[_0x345df7(0x22c)](_0x5f2542,{'dupSort':![]}),!![];}[_0x126601(0x28c)](){const _0x4d6a2e=_0x126601;return!!this[_0x4d6a2e(0x25a)];}['getDesired'](_0x3bada3,_0x4b8483){const _0x285ab7=_0x126601;if(!this[_0x285ab7(0x2d2)]())return null;return this[_0x285ab7(0x25a)][_0x285ab7(0x332)](_0x3bada3+'/'+_0x4b8483)??null;}[_0x126601(0x2c5)](_0x2f8a28,_0x516138,_0xb82df1){const _0x29dca2=_0x126601;if(!this[_0x29dca2(0x2d2)]())return null;const _0xa47584=_0x2f8a28+'/'+_0x516138;let _0x2f0173;return this[_0x29dca2(0x25a)][_0x29dca2(0x373)](()=>{const _0x26b045=_0x29dca2,_0x5ef0b1=this[_0x26b045(0x25a)][_0x26b045(0x332)](_0xa47584)||{'version':0x0};_0x2f0173=(_0x5ef0b1[_0x26b045(0x2d9)]||0x0)+0x1,this[_0x26b045(0x25a)][_0x26b045(0x1e1)](_0xa47584,{..._0x5ef0b1,..._0xb82df1,'version':_0x2f0173,'updatedAt':Date['now']()});}),_0x2f0173;}[_0x126601(0x20e)](_0x358ef4){const _0x2a0216=_0x126601;if(!this[_0x2a0216(0x2d2)]())return[];const _0x175014=_0x358ef4+'/',_0x48c55d=[];for(const {key:_0xa9662e,value:_0x2ee6da}of this[_0x2a0216(0x25a)]['getRange']({'start':_0x175014,'end':_0x175014+'ÿ'})){if(typeof _0xa9662e!==_0x2a0216(0x266)||!_0xa9662e['startsWith'](_0x175014))break;_0x48c55d[_0x2a0216(0x27f)]({'key':_0xa9662e['slice'](_0x175014[_0x2a0216(0x360)]),'value':_0x2ee6da});}return _0x48c55d;}[_0x126601(0x2de)](_0x259559){const _0x110b02=_0x126601;if(!this[_0x110b02(0x2d2)]())return null;return this[_0x110b02(0x2ea)][_0x110b02(0x332)](_0x259559)??null;}[_0x126601(0x222)](_0xf1f3d3,_0x341742,_0x56c717={}){const _0x46cf1b=_0x126601;if(!this['_ensureDesired']())return null;let _0x36f21f;return this[_0x46cf1b(0x2ea)][_0x46cf1b(0x373)](()=>{const _0x563dfa=_0x46cf1b,_0x1db86b=this['_cmd'][_0x563dfa(0x332)](_0xf1f3d3)||{'epoch':0x0};_0x36f21f=(_0x1db86b[_0x563dfa(0x374)]||0x0)+0x1,this[_0x563dfa(0x2ea)][_0x563dfa(0x1e1)](_0xf1f3d3,{..._0x1db86b,..._0x56c717,'cmd':_0x341742,'epoch':_0x36f21f,'updatedAt':Date[_0x563dfa(0x260)]()});}),_0x36f21f;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x4c16ca,'nodeKey':_0x2c50c0,'logicalKey':_0x16798c,'slotKey':_0x57116d,'PROCESS_ENV':_0x47b47f,'NODE_TYPE':_0x31cc43},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function _0x5581(){const _0x21f7df=['_timer','710805aqjMtf','_hbTimer','change','INDEX_RESET','_windowCbs','options','_putRowAsync','enable','join','system','heapTotal','none','_scheduleFlush','single','REMOVE','decommissioned','ttl:clear','instanceId','_lastCpuUsage','VIEW_PROGRESS','createEnvironment','claimGated','_nodeDbCache','_flushTimer','processor:ready','unique:violation_resolved','enabled','claims','~processes:cmd','processor:progress','_adminRelay','_processStartedAt','mean','stringify','pid','processor:retry','dropFts','unique:violation','_lastCpuPct','_role','_getType','\x20died\x20','SYSTEM_PROC','resetIndex','round','note','system:type_drop','compaction','prototype','_selfKey','_listenAddr','building','_onProcEvent','_drain','offWindow','setDesired','lifecycle','stats','--print','updateSupervisedChildStats','SYSTEM_STOPPED','_activateProcesses','object','dedupeMax','respawnTimer','--inspect','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','_caps','_ensureDesired','setLogger','node:events','_quantum','unref','supervisorKey','maxExtra','version','label','instances','env','ephemeral','getCmd','has','txn:rollback','[okdb-cluster]\x20primary\x20pid=','_buckets','loop-lag\x20','listenAddr','nodeKey','cpuWindowMs','sort','_onTick','processing','_cmd','type:drop','ready','stopping','rows=','parse','clear','_sampleOwnStats','system:bus_state_change','getClock','(code=','fork','mode','fts:reset','clusterStatusView','execArgv','caps','max','setOwnMeta','_rowKey','online','maxMs','events','engines','_lastCpuAt','\x20│\x20','filter','number','confirm','SYSTEM_POKE','stop','dropSchema','dead','starting','nodesView','cpuPct','ttl:expired','find','listNodes','once','user','_kind','register','995KjVaLv','emit','_isReader','_removeRowAsync','envsOpen','node:perf_hooks','hasOwnProperty','processor','env:opened','node','_markSeen','remove','workersConfigured','_admissionStarted','isWorker','_draining','stopped','hard-killed','win32','__esModule','ms/','_started','send','attach','startedAt','_instanceId','_clusterOrphanWatch','external','ref:violation_resolved','get','embedded','getProcess','CHANGEFEED_QUANTUM','default','reset','cli','meta','slice','bus:drain','hasType','FTS_DROP','5316PWuPkP','setTtl','rowKey','index:reset','keys','info','\x20worker(s)\x20still\x20serving','ref:violation','_startedAt','count','system:proc','min','lag','license:activated','\x20times\x20in\x20','\x20HTTP\x20server(s)\x20on\x20port\x20','system:poke','type','kill','isDead','_processingPolicy','then','_isWriter','_children','ppid','consecutiveFailures','primary','noteListenAddr','force','kind','104808SHouSk','level','start','close','length','txn:start','startsWith','isConnected','_clusterWorkerAttached','getDesired','putNode','passive','stderr','event','addSupervisedChild','catch','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','decommission','reap','_onItem','setSchema','[okdb-cluster]\x20worker\x20pid=','tierList','transactionSync','epoch','1082487khoIWP','lastClock','heapUsed','toFixed','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','listen','decommissioning','fanout','platform','\x20(durable\x20desired-state)','isActive','_lastPublishAt','item:remove','values','registerType','put','disconnect','bus:type_drop','_dedupeKey','queue-worker','true','data','--eval','startHeartbeat','feed:','_drainOne','log','rss','4316841GcZhzb','role','_nodeDb','error','slot','removeSync','from','publishOwnRow','asyncProcessors','_threadStats','cluster:','children','deaths','processor:paused','randomUUID','_statusEnv','_cursors','off','detachConsole','_envs','[okdb-cluster]\x20slot=','state','cpus','halted','__okdbCluster','_publishNow','resetFts','license:added','deregisterSelf','_onPoke','okdb','http-server','listDesired','_onStop','exit','cluster','419728AofWre','path','processors','setupPrimary','_dedupeMax','exports','processes','entry','message','_flushDebounce','process','system:clock_change','write','code','_buildChildRow','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','bumpCmd','_seen','slotKey','creating','\x20(slot=','expiresAt','worker','waiting','removeNode','fn-runner','openDB','selfKey','ITEM_UPDATE','--watch','processKey','ms\x20(attempt\x20','uptime','pushEphemeral','percentile','processorsView','running','_nodeDbFor','cpuUsage','system:drain','index:registered','_buildOwnRow','fts:drop','size','_supervisorKey','clearTtl','host','\x20ipc\x20error:\x20','_lastCpuWindowMs','flushDebounce','_buildProcessingFacet','\x20worker\x20slot=','isPrimary','reportThreadStats','all','_nodeDead','quantum','_report','set','_handlePoke','__okdbSlot','resetting','1ofN:','_handleInProcess','--test','policy','~processes','inst:','listening','796464MgwSQj','_ownMeta','_log','_desired','standalone','headClock','_changefeed','loop-lag','add','now','msg','_pending','map','created','(worst\x20','string','view:progress','_maybePublish','FTS_RESET','disable','_admissionTimer','cluster-wide','~processes:desired','some','ingest','function','schema:set','next','ITEM_CREATE','http\x20worker\x20child\x20failed:\x20','_baselines','8BknfJZ','index:progress','removeSupervisedChild','hostname','delete','ms\x20busy=','includes','_startAdmission','FTS_REGISTERED','push','_groupByProcess','ms\x20p99=','_clusterOnMessage','reduce','entries','getRange','bus:poke','connected','publishChildRow','INDEX_READY','attachFeed','open','hasDesired'];_0x5581=function(){return _0x21f7df;};return _0x5581();}function requireOkdbChangefeed(){const _0x36e2c6=_0x4f3d84;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x4efa84=require$$0$2,{EVENTS:_0x24c7e3,CHANGE_ACTIONS:_0x12d305}=requireOkdbEnums(),{LOOP:_0x542dcf}=requireOkdbLoopMonitor(),_0x53ae95=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x397244=0x5,_0x4338c7=0x2710;class _0x58ad09 extends _0x4efa84{constructor(_0x2f395b,_0x1686a4={}){const _0x330dcc=_0x1df0;super(),this['okdb']=_0x2f395b,this[_0x330dcc(0x2d5)]=_0x1686a4[_0x330dcc(0x24a)]??_0x53ae95,this[_0x330dcc(0x21b)]=_0x1686a4[_0x330dcc(0x243)]??_0x397244,this[_0x330dcc(0x216)]=_0x1686a4[_0x330dcc(0x2cd)]??_0x4338c7,this[_0x330dcc(0x32a)]=![],this[_0x330dcc(0x1fe)]=new Map(),this[_0x330dcc(0x275)]=new Map(),this[_0x330dcc(0x262)]=new Map(),this[_0x330dcc(0x2a5)]=null,this[_0x330dcc(0x324)]=![],this['_seen']=new Set(),this['_onItem']=_0x4f26e7=>this[_0x330dcc(0x251)](_0x4f26e7),this[_0x330dcc(0x20b)]=_0x44ed06=>this[_0x330dcc(0x24d)](_0x44ed06),this[_0x330dcc(0x20f)]=()=>this[_0x330dcc(0x308)]();}['start'](){const _0x243518=_0x1df0;if(this[_0x243518(0x32a)])return;this[_0x243518(0x32a)]=!![];for(const [_0x31f7dc,_0x2681cd]of this[_0x243518(0x20c)][_0x243518(0x201)]){if(_0x31f7dc[_0x243518(0x362)]('~'))continue;try{this['_baselines'][_0x243518(0x24c)](_0x31f7dc,_0x2681cd[_0x243518(0x2f3)]()||0x0);}catch{}}const {events:_0x346e26}=this[_0x243518(0x20c)];_0x346e26['on'](_0x24c7e3[_0x243518(0x273)],this[_0x243518(0x36f)]),_0x346e26['on'](_0x24c7e3[_0x243518(0x22e)],this[_0x243518(0x36f)]),_0x346e26['on'](_0x24c7e3['ITEM_REMOVE'],this['_onItem']),_0x346e26['on'](_0x24c7e3[_0x243518(0x307)],this[_0x243518(0x20b)]),_0x346e26[_0x243518(0x311)](_0x24c7e3[_0x243518(0x2ca)],this['_onStop']);}[_0x36e2c6(0x308)](){const _0x279c40=_0x36e2c6;if(!this[_0x279c40(0x32a)])return;this[_0x279c40(0x32a)]=![];const {events:_0x67005e}=this[_0x279c40(0x20c)];_0x67005e['off'](_0x24c7e3[_0x279c40(0x273)],this[_0x279c40(0x36f)]),_0x67005e[_0x279c40(0x1ff)](_0x24c7e3[_0x279c40(0x22e)],this[_0x279c40(0x36f)]),_0x67005e[_0x279c40(0x1ff)](_0x24c7e3['ITEM_REMOVE'],this[_0x279c40(0x36f)]),_0x67005e[_0x279c40(0x1ff)](_0x24c7e3['SYSTEM_POKE'],this[_0x279c40(0x20b)]);try{_0x67005e[_0x279c40(0x1ff)](_0x24c7e3['SYSTEM_STOPPED'],this['_onStop']);}catch{}this[_0x279c40(0x2a5)]&&(clearTimeout(this[_0x279c40(0x2a5)]),this[_0x279c40(0x2a5)]=null),this[_0x279c40(0x262)][_0x279c40(0x2f0)](),this[_0x279c40(0x1fe)]['clear'](),this['_baselines']['clear'](),this['_seen'][_0x279c40(0x2f0)]();}['_dedupeKey'](_0x15ef38,_0x57406e,_0x2707cd,_0x1ef70e){return _0x15ef38+'\x00'+_0x57406e+'\x00'+_0x2707cd+'\x00'+_0x1ef70e;}[_0x36e2c6(0x31f)](_0x2e30d2,_0x5ae096,_0x310f7a,_0x52adf4){const _0x13a94d=_0x36e2c6,_0x2f4f45=this[_0x13a94d(0x1e4)](_0x2e30d2,_0x5ae096,_0x310f7a,_0x52adf4);if(this[_0x13a94d(0x223)]['has'](_0x2f4f45))return![];this[_0x13a94d(0x223)][_0x13a94d(0x25f)](_0x2f4f45);if(this[_0x13a94d(0x223)]['size']>this['_dedupeMax']){const _0x58c6cf=this[_0x13a94d(0x223)][_0x13a94d(0x1df)]()[_0x13a94d(0x272)]()['value'];this[_0x13a94d(0x223)]['delete'](_0x58c6cf);}return!![];}[_0x36e2c6(0x251)](_0x184229){const _0x2a2f41=_0x36e2c6;if(!this[_0x2a2f41(0x32a)]||!_0x184229)return;const {env:_0x5614a1,type:_0x580b77,key:_0x2fb065,clock:_0x2b41d7,origin:_0x2a496b,action:_0x60b0e6,newValue:_0x268a95,oldValue:_0x17fc62}=_0x184229;if(_0x5614a1==null||_0x580b77==null||_0x2fb065==null)return;if(typeof _0x5614a1===_0x2a2f41(0x266)&&_0x5614a1[_0x2a2f41(0x362)]('~'))return;if(typeof _0x580b77===_0x2a2f41(0x266)&&_0x580b77['startsWith']('~'))return;if(!this[_0x2a2f41(0x31f)](_0x5614a1,_0x580b77,_0x2fb065,_0x2b41d7))return;const _0x44c3ed=_0x60b0e6===_0x12d305[_0x2a2f41(0x29c)]?'remove':'put';this[_0x2a2f41(0x316)](_0x2a2f41(0x290),{'env':_0x5614a1,'type':_0x580b77,'key':_0x2fb065,'op':_0x44c3ed,'clock':_0x2b41d7,'origin':_0x2a496b,'value':_0x44c3ed===_0x2a2f41(0x320)?null:_0x268a95,'prevValue':_0x17fc62});}[_0x36e2c6(0x24d)](_0x594ce4){const _0xf49f0=_0x36e2c6;if(!this[_0xf49f0(0x32a)])return;if(!_0x594ce4||typeof _0x594ce4[_0xf49f0(0x2dc)]!==_0xf49f0(0x266)||typeof _0x594ce4[_0xf49f0(0x34f)]!==_0xf49f0(0x266))return;const {env:_0x284cd0,type:_0x17f5b9}=_0x594ce4;if(_0x284cd0[_0xf49f0(0x362)]('~')||_0x17f5b9[_0xf49f0(0x362)]('~'))return;this['_pending'][_0xf49f0(0x24c)](_0x284cd0+'\x00'+_0x17f5b9,{'env':_0x284cd0,'type':_0x17f5b9}),this[_0xf49f0(0x29a)]();}[_0x36e2c6(0x29a)](){const _0x196be3=_0x36e2c6;if(this[_0x196be3(0x2a5)])return;const _0x5b32fe=()=>{const _0x2e211c=_0x196be3;this[_0x2e211c(0x2a5)]=null,this[_0x2e211c(0x2c3)]()[_0x2e211c(0x36b)](()=>{});};this[_0x196be3(0x2a5)]=setTimeout(_0x5b32fe,this['_flushDebounce']>0x0?this[_0x196be3(0x21b)]:0x0);}async['_drain'](){const _0x124c3b=_0x36e2c6;if(this[_0x124c3b(0x324)]){this[_0x124c3b(0x29a)]();return;}this['_draining']=!![];try{const _0x53e249=[...this[_0x124c3b(0x262)][_0x124c3b(0x1df)]()];this[_0x124c3b(0x262)]['clear']();let _0x3bbef2=![];for(const {env:_0x5effbd,type:_0x36c857}of _0x53e249){try{const _0x419da9=await this[_0x124c3b(0x1eb)](_0x5effbd,_0x36c857);if(_0x419da9)_0x3bbef2=!![];}catch{this[_0x124c3b(0x262)]['set'](_0x5effbd+'\x00'+_0x36c857,{'env':_0x5effbd,'type':_0x36c857}),_0x3bbef2=!![];}}if(_0x3bbef2||this['_pending'][_0x124c3b(0x23d)]>0x0)this[_0x124c3b(0x29a)]();}finally{this[_0x124c3b(0x324)]=![];}}async[_0x36e2c6(0x1eb)](_0x75a2fa,_0xf4151c){const _0xb94c8c=_0x36e2c6,_0x3da5cc=await this[_0xb94c8c(0x20c)]['_openEnvLazy'](_0x75a2fa),_0x3ce0d7=_0x75a2fa+'\x00'+_0xf4151c;!this[_0xb94c8c(0x1fe)][_0xb94c8c(0x2df)](_0x3ce0d7)&&(!this[_0xb94c8c(0x275)]['has'](_0x75a2fa)&&this[_0xb94c8c(0x275)][_0xb94c8c(0x24c)](_0x75a2fa,_0x3da5cc[_0xb94c8c(0x2f3)]()||0x0),this[_0xb94c8c(0x1fe)]['set'](_0x3ce0d7,this['_baselines'][_0xb94c8c(0x332)](_0x75a2fa)));const _0x55acbe=this[_0xb94c8c(0x1fe)][_0xb94c8c(0x332)](_0x3ce0d7),_0x25a00d=_0x3da5cc[_0xb94c8c(0x2f3)](_0xf4151c)||0x0;if(_0x25a00d<=_0x55acbe)return![];const _0x5efdcf=_0x55acbe+this['_quantum'],_0x3b391d=Math['min'](_0x25a00d,_0x5efdcf),_0x50534a=_0x542dcf[_0xb94c8c(0x2a8)]?_0x542dcf[_0xb94c8c(0x260)]():0x0,_0x34fc55=Array[_0xb94c8c(0x1f4)](_0x3da5cc['getChanges'](_0xf4151c,_0x55acbe+0x1,_0x3b391d));let _0x2677f7=_0x55acbe;for(const _0x908efc of _0x34fc55){const {clock:_0x5be04f,key:_0x16c207,action:_0x223514,origin:_0x2f696f}=_0x908efc;if(_0x5be04f>_0x2677f7)_0x2677f7=_0x5be04f;if(_0x16c207==null)continue;if(!this[_0xb94c8c(0x31f)](_0x75a2fa,_0xf4151c,_0x16c207,_0x5be04f))continue;let _0x377f6a,_0x1a92c9;if(_0x223514===_0x12d305[_0xb94c8c(0x29c)])_0x377f6a=_0xb94c8c(0x320),_0x1a92c9=null;else{const _0x25103d=_0x3da5cc[_0xb94c8c(0x332)](_0xf4151c,_0x16c207);_0x25103d==null?(_0x377f6a='remove',_0x1a92c9=null):(_0x377f6a=_0xb94c8c(0x1e1),_0x1a92c9=_0x25103d);}this['emit'](_0xb94c8c(0x290),{'env':_0x75a2fa,'type':_0xf4151c,'key':_0x16c207,'op':_0x377f6a,'clock':_0x5be04f,'origin':_0x2f696f,'value':_0x1a92c9});}if(_0x542dcf['enabled'])_0x542dcf[_0xb94c8c(0x2bb)](_0xb94c8c(0x1ea)+_0x75a2fa+':'+_0xf4151c,_0x542dcf[_0xb94c8c(0x260)]()-_0x50534a,'n='+_0x34fc55[_0xb94c8c(0x360)]);return this[_0xb94c8c(0x1fe)]['set'](_0x3ce0d7,Math['max'](_0x2677f7,_0x3b391d)),_0x3da5cc[_0xb94c8c(0x2f3)](_0xf4151c)>_0x3b391d;}['status'](){const _0xa1a525=_0x36e2c6;return{'started':this[_0xa1a525(0x32a)],'quantum':this[_0xa1a525(0x2d5)],'flushDebounce':this[_0xa1a525(0x21b)],'cursors':Object['fromEntries']([...this[_0xa1a525(0x1fe)][_0xa1a525(0x284)]()][_0xa1a525(0x263)](([_0xa765b,_0x24ee44])=>[_0xa765b['replace']('\x00',':'),_0x24ee44])),'pending':this['_pending'][_0xa1a525(0x23d)],'seen':this[_0xa1a525(0x223)][_0xa1a525(0x23d)]};}}return _0x58ad09[_0x36e2c6(0x335)]=_0x53ae95,okdbChangefeed={'OKDBChangefeed':_0x58ad09},okdbChangefeed;}function _0x1df0(_0x53cb89,_0x4bc908){_0x53cb89=_0x53cb89-0x1dc;const _0x558152=_0x5581();let _0x1df096=_0x558152[_0x53cb89];return _0x1df096;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x527eb9=_0x4f3d84;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x2707b8=require$$1,_0x272bff=require$$1$1,{EVENTS:_0x12fead}=requireOkdbEnums(),_0xaf4999=require$$0$1,{slotKey:_0xc930cc}=requireOkdbProcessRegistry(),_0x42ceb0=0xfa,_0x50e818=0xfa0,_0x251b46=0x5,_0x1c07d8=0x2710,_0x553472=0xbb8,_0x274e21=0x7d0,_0x1675df=_0x527eb9(0x206),_0xb3311a=_0x527eb9(0x2dd),_0x8d0eb0='log',_0x2a3aa2=_0x527eb9(0x2c7),_0x2655c6=[_0x12fead[_0x527eb9(0x2a1)],_0x12fead[_0x527eb9(0x27e)],_0x12fead[_0x527eb9(0x33d)],_0x12fead[_0x527eb9(0x269)],_0x12fead['INDEX_PROGRESS'],_0x12fead[_0x527eb9(0x289)],_0x12fead[_0x527eb9(0x291)],_0x12fead['INDEX_REGISTERED'],_0x527eb9(0x2a6),_0x527eb9(0x2ab),'processor:error',_0x527eb9(0x1fb),'processor:resumed','processor:retry'],_0x525228=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x48ceb7({workers:_0x5d4f62,makeOkdb:_0x1bba1d,port:_0x317c5c,primaryOkdb:_0x4c69cd,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x57c695=_0x527eb9;if(_0x2707b8[_0x57c695(0x246)])return childEntry&&_0x2707b8[_0x57c695(0x215)]({'exec':_0x272bff[_0x57c695(0x296)](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0x1544c1=_0x57c695,_0x55f205=[];for(let _0x478709=0x0;_0x478709<process[_0x1544c1(0x2f9)][_0x1544c1(0x360)];_0x478709++){const _0x2e473a=process['execArgv'][_0x478709];if(_0x2e473a['startsWith'](_0x1544c1(0x252))||_0x2e473a['startsWith'](_0x1544c1(0x22f))||_0x2e473a[_0x1544c1(0x362)](_0x1544c1(0x2cf)))continue;if(_0x2e473a==='-e'||_0x2e473a===_0x1544c1(0x1e8)||_0x2e473a==='-p'||_0x2e473a===_0x1544c1(0x2c8)){_0x478709++;continue;}_0x55f205[_0x1544c1(0x27f)](_0x2e473a);}return _0x55f205;})())}),_0x10f9fb({'workers':_0x5d4f62,'port':_0x317c5c,'primaryOkdb':_0x4c69cd,'workerEnv':workerEnv});return _0x488486({'makeOkdb':_0x1bba1d,'port':_0x317c5c});}function _0x10f9fb({workers:_0x5ccd7c,port:_0x4e7153,primaryOkdb:_0x521ece,workerEnv:_0x5f1f42}){const _0x59847b=_0x527eb9,_0x2f5530=new Map(),_0x33b74d=new Map();let _0x1c18e4=![];const _0x5f38e3=_0x494e36=>_0x494e36?.[_0x59847b(0x24e)],_0x92b1ff=_0x3d9109=>{const _0x2586dc=_0x59847b,_0x3961cd=_0x2707b8[_0x2586dc(0x2f5)]({...process.env,..._0x5f1f42||{},'OKDB_CLUSTER_SLOT':String(_0x3d9109)});return _0x3961cd['__okdbSlot']=_0x3d9109,_0x2f5530['set'](_0x3961cd[_0x2586dc(0x21c)]['pid'],{'worker':_0x3961cd,'startedAt':Date[_0x2586dc(0x260)](),'slot':_0x3d9109}),_0x3961cd['on']('error',_0x2b8a99=>{const _0x116b61=_0x2586dc;console[_0x116b61(0x1ec)](_0x116b61(0x371)+_0x3961cd['process'][_0x116b61(0x2b0)]+_0x116b61(0x241)+(_0x2b8a99?.[_0x116b61(0x21a)]??_0x2b8a99));}),_0x3961cd['on']('online',()=>_0x5aed95()),_0x3961cd;},_0x26bd47=_0x25b43a=>{const _0x18d424=_0x59847b;for(const {worker:_0xe46b54}of _0x2f5530['values']()){if(_0xe46b54[_0x18d424(0x351)]()||!_0xe46b54[_0x18d424(0x363)]())continue;try{_0xe46b54[_0x18d424(0x32b)](_0x25b43a);}catch{}}};_0x521ece?.[_0x59847b(0x2cb)]?.({'kind':_0x59847b(0x358),'listenAddr':':'+_0x4e7153})['catch'](()=>{}),_0x521ece?.[_0x59847b(0x218)]?.[_0x59847b(0x2fc)]?.({'workersConfigured':_0x5ccd7c});const _0x529217={'engines':![],'asyncProcessors':![],'compaction':_0x59847b(0x367),'http':!![]},_0x5aed95=()=>{const _0x36b564=_0x59847b,_0xfdec7=_0x521ece?.[_0x36b564(0x218)];if(!_0xfdec7||!_0xfdec7['_isWriter'])return;const _0x54d245=_0xfdec7[_0x36b564(0x22d)];for(const {worker:_0x5bfe42,startedAt:_0x8ab87f,slot:_0x5ee60c,stats:_0x257a10}of _0x2f5530[_0x36b564(0x1df)]()){if(_0x5bfe42[_0x36b564(0x351)]())continue;const _0x33196e=_0xfdec7[_0x36b564(0x28c)]?.()&&_0xfdec7[_0x36b564(0x365)](_0x36b564(0x1f2),_0x10b490(_0x5ee60c))?.[_0x36b564(0x36d)]===!![];_0xfdec7[_0x36b564(0x288)]({'pid':_0x5bfe42[_0x36b564(0x21c)][_0x36b564(0x2b0)],'startedAt':_0x8ab87f,'kind':_0x36b564(0x20d),'supervisorKey':_0x54d245,'slot':_0x5ee60c,'slotKey':_0x10b490(_0x5ee60c),'role':_0x529217,'listenAddr':':'+_0x4e7153,'lifecycle':_0x33196e?_0x36b564(0x37b):_0x36b564(0x236),'stats':_0x257a10??null})[_0x36b564(0x36b)](()=>{});}},_0x10b490=_0x390e64=>_0xc930cc(_0x59847b(0x1f8)+_0x4e7153,_0x390e64),_0x4d6e78=_0x5d5dde=>{const _0x2706da=_0x59847b,_0x1367aa=_0x521ece?.['processes'];if(!_0x1367aa?.[_0x2706da(0x28c)]?.())return![];return _0x1367aa[_0x2706da(0x365)]('slot',_0x10b490(_0x5d5dde))?.[_0x2706da(0x36d)]===!![];};for(let _0x2f7a92=0x0;_0x2f7a92<_0x5ccd7c;_0x2f7a92++){const _0x3b2283=_0x4d6e78(_0x2f7a92);_0x33b74d[_0x59847b(0x24c)](_0x2f7a92,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x3b2283,'respawnTimer':null}),_0x3b2283?console[_0x59847b(0x1ec)](_0x59847b(0x202)+_0x2f7a92+'\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)'):_0x92b1ff(_0x2f7a92);}const _0x4578b9=()=>{const _0x36df3e=_0x59847b,_0x52374e=_0x521ece?.[_0x36df3e(0x218)];if(!_0x52374e?.[_0x36df3e(0x354)]||!_0x52374e[_0x36df3e(0x28c)]?.())return;for(const [_0x58fb35,_0x458d8a]of _0x33b74d[_0x36df3e(0x284)]()){const _0x53cba7=_0x52374e['getDesired']('slot',_0x10b490(_0x58fb35)),_0x39013d=_0x53cba7?.['decommission']===!![],_0x3cea9e=_0x53cba7?.[_0x36df3e(0x350)]===!![];if(_0x39013d&&!_0x458d8a[_0x36df3e(0x30a)]){_0x458d8a[_0x36df3e(0x30a)]=!![];_0x458d8a['respawnTimer']&&(clearTimeout(_0x458d8a[_0x36df3e(0x2ce)]),_0x458d8a['respawnTimer']=null);for(const {worker:_0x381bb7}of _0x2f5530[_0x36df3e(0x1df)]()){if(_0x5f38e3(_0x381bb7)!==_0x58fb35||_0x381bb7['isDead']())continue;try{if(_0x3cea9e)_0x381bb7['process'][_0x36df3e(0x350)]('SIGKILL');else _0x381bb7[_0x36df3e(0x363)]()&&_0x381bb7[_0x36df3e(0x1e2)]();}catch{}}console['log']('[okdb-cluster]\x20'+(_0x3cea9e?_0x36df3e(0x326):_0x36df3e(0x29d))+_0x36df3e(0x245)+_0x58fb35+_0x36df3e(0x37e));}else{if(!_0x39013d&&_0x458d8a[_0x36df3e(0x30a)]&&_0x53cba7){_0x458d8a[_0x36df3e(0x30a)]=![],_0x458d8a['deaths']=[],_0x458d8a['consecutiveFailures']=0x0;const _0x3ae861=[..._0x2f5530[_0x36df3e(0x1df)]()][_0x36df3e(0x26e)](({worker:_0x2e6837})=>_0x5f38e3(_0x2e6837)===_0x58fb35&&!_0x2e6837[_0x36df3e(0x351)]());!_0x3ae861&&!_0x1c18e4&&(_0x92b1ff(_0x58fb35),console['log']('[okdb-cluster]\x20recommissioned\x20worker\x20slot='+_0x58fb35));}}}},_0x4440f0=()=>{try{_0x4578b9();}catch{}};_0x521ece?.[_0x59847b(0x300)]?.['on']?.(_0x12fead['SYSTEM_PROC'],_0x4440f0);const _0x5a9fc1=[];if(_0x521ece?.[_0x59847b(0x300)]?.['on'])for(const _0x30ab24 of _0x2655c6){const _0x30f0d9=_0x5a093c=>{_0x26bd47({[_0x1675df]:_0xb3311a,'event':_0x30ab24,'data':_0x5a093c??{}});};_0x521ece[_0x59847b(0x300)]['on'](_0x30ab24,_0x30f0d9),_0x5a9fc1[_0x59847b(0x27f)]({'event':_0x30ab24,'handler':_0x30f0d9});}const _0x195508=setInterval(()=>{_0x4578b9(),_0x5aed95();},_0x525228);_0x195508[_0x59847b(0x2d6)]?.();const _0xe44086=(_0x53505f,_0x2b3f23)=>{const _0x146652=_0x59847b;if(!_0x2b3f23||typeof _0x2b3f23!==_0x146652(0x2cc)||_0x2b3f23[_0x1675df]!==_0x8d0eb0)return;if(!_0x521ece?.['log']?.[_0x146652(0x26f)])return;const _0x5ad4cc=_0x2b3f23[_0x146652(0x219)]||{};_0x521ece['log'][_0x146652(0x26f)]({..._0x5ad4cc,'msg':'[w'+_0x2b3f23['slot']+']\x20'+(_0x5ad4cc[_0x146652(0x261)]??''),'meta':{..._0x5ad4cc[_0x146652(0x339)]||{},'worker':_0x2b3f23[_0x146652(0x1f2)],'workerPid':_0x2b3f23[_0x146652(0x2b0)]}});};_0x2707b8['on'](_0x59847b(0x21a),_0xe44086);const _0xcb7538=(_0x24b63b,_0x57a620)=>{const _0x5e61a1=_0x59847b;if(!_0x57a620||typeof _0x57a620!==_0x5e61a1(0x2cc)||_0x57a620[_0x1675df]!==_0x2a3aa2)return;const _0x45bf1a=_0x2f5530['get'](_0x24b63b['process'][_0x5e61a1(0x2b0)]);if(_0x45bf1a)_0x45bf1a[_0x5e61a1(0x2c7)]={..._0x57a620[_0x5e61a1(0x2c7)],'at':Date[_0x5e61a1(0x260)]()};};_0x2707b8['on'](_0x59847b(0x21a),_0xcb7538),_0x2707b8['on'](_0x59847b(0x210),(_0x2fb421,_0x48d712,_0x310228)=>{const _0x574d94=_0x59847b,_0x2802cc=_0x2fb421[_0x574d94(0x21c)][_0x574d94(0x2b0)],_0x22b6f5=_0x5f38e3(_0x2fb421),_0x57cc4e=_0x2f5530[_0x574d94(0x332)](_0x2802cc);if(_0x57cc4e&&_0x521ece?.[_0x574d94(0x218)])_0x521ece['processes'][_0x574d94(0x22a)](_0x2802cc+':'+_0x57cc4e[_0x574d94(0x32d)])[_0x574d94(0x36b)](()=>{});_0x2f5530['delete'](_0x2802cc),console['log']('[okdb-cluster]\x20worker\x20pid='+_0x2802cc+_0x574d94(0x226)+(_0x22b6f5??'?')+')\x20exited\x20'+(_0x574d94(0x2f4)+_0x48d712+',\x20signal='+(_0x310228??_0x574d94(0x299))+');\x20'+_0x2f5530[_0x574d94(0x23d)]+'\x20worker(s)\x20remaining')),_0x5aed95();if(_0x1c18e4||_0x22b6f5==null)return;const _0x4d47d8=_0x33b74d[_0x574d94(0x332)](_0x22b6f5);if(!_0x4d47d8||_0x4d47d8[_0x574d94(0x30a)])return;const _0x2fd554=Date[_0x574d94(0x260)]();_0x4d47d8[_0x574d94(0x1fa)]['push'](_0x2fd554),_0x4d47d8[_0x574d94(0x1fa)]=_0x4d47d8[_0x574d94(0x1fa)][_0x574d94(0x304)](_0x2acd40=>_0x2fd554-_0x2acd40<=_0x1c07d8);if(_0x4d47d8[_0x574d94(0x1fa)][_0x574d94(0x360)]>=_0x251b46){_0x4d47d8[_0x574d94(0x30a)]=!![],console[_0x574d94(0x1f1)](_0x574d94(0x379)+_0x22b6f5+_0x574d94(0x2b7)+_0x4d47d8[_0x574d94(0x1fa)][_0x574d94(0x360)]+_0x574d94(0x34c)+(_0x1c07d8+_0x574d94(0x2d0)+_0x2f5530[_0x574d94(0x23d)]+_0x574d94(0x344)));return;}_0x4d47d8['consecutiveFailures']++;const _0x27e624=Math[_0x574d94(0x349)](_0x50e818,_0x42ceb0*0x2**(_0x4d47d8[_0x574d94(0x357)]-0x1));console[_0x574d94(0x1ec)]('[okdb-cluster]\x20respawning\x20worker\x20slot='+_0x22b6f5+'\x20in\x20'+_0x27e624+_0x574d94(0x231)+_0x4d47d8[_0x574d94(0x357)]+')'),_0x4d47d8[_0x574d94(0x2ce)]=setTimeout(()=>{const _0x5181cd=_0x574d94;_0x4d47d8[_0x5181cd(0x2ce)]=null;if(_0x1c18e4||_0x4d47d8[_0x5181cd(0x30a)])return;const _0x327520=_0x92b1ff(_0x22b6f5);_0x327520[_0x5181cd(0x311)](_0x5181cd(0x256),()=>{const _0xd40552=_0x5181cd;if(_0x33b74d[_0xd40552(0x332)](_0x22b6f5)===_0x4d47d8)_0x4d47d8[_0xd40552(0x357)]=0x0;});},_0x27e624),_0x4d47d8[_0x574d94(0x2ce)]['unref']?.();});const _0x2c03ab=[..._0x2f5530[_0x59847b(0x342)]()];console[_0x59847b(0x1ec)](_0x59847b(0x2e1)+process['pid']+'\x20forked\x20'+_0x5ccd7c+_0x59847b(0x34d)+_0x4e7153+':\x20'+('['+_0x2c03ab['join'](',\x20')+']'));const _0x5e42e1={'_isClusterController':!![],'port':_0x4e7153,'primaryOkdb':_0x521ece??null,'status'(){const _0x117c44=_0x59847b;return{'clustered':!![],'primaryPid':process[_0x117c44(0x2b0)],'port':_0x4e7153,'primaryRole':_0x521ece?.[_0x117c44(0x1ef)]??null,'processorPid':_0x521ece?process[_0x117c44(0x2b0)]:null,'workers':[..._0x2f5530[_0x117c44(0x1df)]()]['map'](({worker:_0x4779c3})=>({'pid':_0x4779c3[_0x117c44(0x21c)][_0x117c44(0x2b0)],'id':_0x4779c3['id'],'dead':_0x4779c3[_0x117c44(0x351)]()}))};},async 'close'(){const _0x43c8d4=_0x59847b;_0x1c18e4=!![];for(const _0x28cdef of _0x33b74d[_0x43c8d4(0x1df)]()){_0x28cdef['dead']=!![],_0x28cdef['respawnTimer']&&(clearTimeout(_0x28cdef['respawnTimer']),_0x28cdef[_0x43c8d4(0x2ce)]=null);}clearInterval(_0x195508),_0x2707b8[_0x43c8d4(0x1ff)](_0x43c8d4(0x21a),_0xe44086),_0x2707b8[_0x43c8d4(0x1ff)]('message',_0xcb7538),_0x521ece?.[_0x43c8d4(0x300)]?.[_0x43c8d4(0x1ff)]?.(_0x12fead[_0x43c8d4(0x2b8)],_0x4440f0);if(_0x521ece?.['events']?.[_0x43c8d4(0x1ff)])for(const {event:_0x5b493e,handler:_0x41f1c4}of _0x5a9fc1){try{_0x521ece[_0x43c8d4(0x300)][_0x43c8d4(0x1ff)](_0x5b493e,_0x41f1c4);}catch{}}_0x5a9fc1[_0x43c8d4(0x360)]=0x0;const _0xb15fd8=[..._0x2f5530[_0x43c8d4(0x1df)]()][_0x43c8d4(0x263)](({worker:_0x268229})=>_0x268229);if(_0xb15fd8['length']===0x0)return;await Promise[_0x43c8d4(0x248)](_0xb15fd8[_0x43c8d4(0x263)](_0x180097=>new Promise(_0x28d657=>{const _0x5ce2e1=_0x43c8d4;if(_0x180097[_0x5ce2e1(0x351)]()){_0x28d657();return;}let _0x5b185b=![];const _0x355212=()=>{if(_0x5b185b)return;_0x5b185b=!![];if(_0xd2cb5a)clearTimeout(_0xd2cb5a);_0x28d657();};_0x180097[_0x5ce2e1(0x311)](_0x5ce2e1(0x210),_0x355212);const _0xd2cb5a=setTimeout(()=>{const _0x1ae9c8=_0x5ce2e1;try{_0x180097[_0x1ae9c8(0x21c)][_0x1ae9c8(0x350)]();}catch{}},_0x553472+0x1f4);_0xd2cb5a[_0x5ce2e1(0x2d6)]?.();try{_0x180097[_0x5ce2e1(0x1e2)]();}catch{try{_0x180097[_0x5ce2e1(0x21c)][_0x5ce2e1(0x350)]();}catch{}}})));}};return _0x5e42e1;}async function _0x488486({makeOkdb:_0x105238,port:_0x5f0b56}){const _0x11149c=_0x527eb9,_0x2aefe2=await _0x105238();return _0x50e96e(_0x2aefe2),_0x2aefe2['http'][_0x11149c(0x37a)](_0x5f0b56);}function _0x50e96e(_0x2491a8){const _0x51c7d9=_0x527eb9;if(!_0x2491a8||_0x2491a8[_0x51c7d9(0x364)])return;_0x2491a8[_0x51c7d9(0x364)]=!![];try{const {OKDBChangefeed:_0x441d36}=requireOkdbChangefeed(),_0x19f495=_0x2491a8['_adminRelay'];if(_0x19f495&&typeof _0x19f495[_0x51c7d9(0x28a)]==='function'){const _0x1b3cdf=new _0x441d36(_0x2491a8);_0x1b3cdf['start'](),_0x19f495['attachFeed'](_0x1b3cdf),_0x2491a8[_0x51c7d9(0x25d)]=_0x1b3cdf;}}catch(_0xec4509){_0x2491a8[_0x51c7d9(0x1ec)]?.['warn']?.(_0x51c7d9(0x221)+(_0xec4509?.[_0x51c7d9(0x21a)]??_0xec4509),{'feature':_0x51c7d9(0x211)});}const _0x3431d6=_0x59a68e=>{const _0xb72159=_0x51c7d9;if(!_0x59a68e||typeof _0x59a68e!=='object'||_0x59a68e[_0x1675df]==null)return;if(_0x59a68e[_0x1675df]===_0xb3311a)try{_0x2491a8[_0xb72159(0x2ac)]?.[_0xb72159(0x233)]?.(_0x59a68e[_0xb72159(0x369)],_0x59a68e[_0xb72159(0x1e7)]);}catch{}};process['on'](_0x51c7d9(0x21a),_0x3431d6),_0x2491a8[_0x51c7d9(0x282)]=_0x3431d6;{let _0xc9ce80=process['cpuUsage'](),_0x140637=Date[_0x51c7d9(0x260)]();const _0x10f08d=()=>{const _0x188937=_0x51c7d9;if(typeof process['send']!==_0x188937(0x270)||!process[_0x188937(0x287)])return;const _0xa5393c=Date[_0x188937(0x260)](),_0x552342=process[_0x188937(0x238)](),_0x5bf02b=(_0xa5393c-_0x140637)*0x3e8,_0x2c6060=_0x552342[_0x188937(0x312)]-_0xc9ce80[_0x188937(0x312)]+(_0x552342[_0x188937(0x297)]-_0xc9ce80[_0x188937(0x297)]),_0x1a1627=_0x5bf02b>0x0?Math['min'](0x64,Math[_0x188937(0x2ba)](_0x2c6060/(_0x5bf02b*(_0xaf4999['cpus']()[_0x188937(0x360)]||0x1))*0x64)):0x0;_0xc9ce80=_0x552342,_0x140637=_0xa5393c;const _0x376b43=process['memoryUsage']();try{process['send']({[_0x1675df]:_0x2a3aa2,'stats':{'rss':_0x376b43[_0x188937(0x1ed)],'heapUsed':_0x376b43[_0x188937(0x377)],'heapTotal':_0x376b43[_0x188937(0x298)],'external':_0x376b43[_0x188937(0x330)],'cpuPct':_0x1a1627,'cpuWindowMs':Math['round'](_0x5bf02b/0x3e8)||null}});}catch{}},_0x198862=Math[_0x51c7d9(0x2fb)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x463d8e=setInterval(_0x10f08d,_0x198862);_0x463d8e[_0x51c7d9(0x2d6)]?.(),_0x10f08d();}let _0x48d4bd=![];const _0xad2cb3=async _0x2282c3=>{const _0x20e1d5=_0x51c7d9;if(_0x48d4bd)return;_0x48d4bd=!![];const _0x1b4632=setTimeout(()=>process[_0x20e1d5(0x210)](_0x2282c3),_0x553472);_0x1b4632[_0x20e1d5(0x2d6)]?.();try{await _0x2491a8[_0x20e1d5(0x35f)]?.();}catch{}process['exit'](_0x2282c3);};process['on'](_0x51c7d9(0x1e2),()=>_0xad2cb3(0x0));if(process[_0x51c7d9(0x37d)]!==_0x51c7d9(0x327)){const _0x31dfa7=setInterval(()=>{if(process['ppid']===0x1)_0xad2cb3(0x0);},_0x274e21);_0x31dfa7[_0x51c7d9(0x2d6)]?.(),_0x2491a8[_0x51c7d9(0x32f)]=_0x31dfa7;}}return okdbCluster={'runClustered':_0x48ceb7,'attachWorkerCluster':_0x50e96e},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0x1df075=_0x4f3d84;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x1d8cc0=require$$0$3,{attachWorkerCluster:_0x2f62a5}=requireOkdbCluster();async function _0x1747c0(){const _0x4dc3fe=_0x1df0,_0x3202e0=process.env.OKDB_HTTP_CHILD;if(!_0x3202e0)throw new Error('okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing');const {rootPath:_0x550806,port:_0x201d8c,options:options={},logLevel:logLevel='info'}=JSON[_0x4dc3fe(0x2ef)](_0x3202e0);if(!_0x550806||!_0x201d8c)throw new Error(_0x4dc3fe(0x36c));const _0x2ba761=new _0x1d8cc0(_0x550806,{...options,'engines':![],'asyncProcessors':![],'compaction':_0x4dc3fe(0x367),'bus':!![]});_0x2ba761[_0x4dc3fe(0x1ec)][_0x4dc3fe(0x200)]?.();const _0x27ff00=process.env.OKDB_CLUSTER_SLOT??'?',_0x334df4={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x5929fd=_0x334df4[logLevel]??_0x334df4[_0x4dc3fe(0x343)];_0x2ba761[_0x4dc3fe(0x1ec)][_0x4dc3fe(0x32c)](_0x5c5897=>{const _0x1df4c8=_0x4dc3fe;if((_0x334df4[_0x5c5897[_0x1df4c8(0x35d)]]??0x1)<_0x5929fd)return;try{process[_0x1df4c8(0x32b)]?.({'__okdbCluster':_0x1df4c8(0x1ec),'slot':_0x27ff00,'pid':process[_0x1df4c8(0x2b0)],'entry':_0x5c5897});}catch{}}),await _0x2ba761['open'](),_0x2f62a5(_0x2ba761),await _0x2ba761['http'][_0x4dc3fe(0x37a)](_0x201d8c);}return _0x1747c0()[_0x1df075(0x36b)](_0x15e773=>{const _0x305747=_0x1df075;try{process[_0x305747(0x32b)]?.({'__okdbCluster':_0x305747(0x1ec),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x305747(0x2b0)],'entry':{'level':_0x305747(0x1f1),'msg':_0x305747(0x274)+(_0x15e773?.['message']??_0x15e773)}});}catch{}process[_0x305747(0x210)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module[_0x4f3d84(0x217)]=okdbHttpWorkerChild;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x1fafae=_0x2b82;(function(_0x791100,_0x104edd){const _0x225032=_0x2b82,_0x2fbb76=_0x791100();while(!![]){try{const _0x2a7745=parseInt(_0x225032(0xe0))/0x1+parseInt(_0x225032(0xd7))/0x2*(parseInt(_0x225032(0xeb))/0x3)+-parseInt(_0x225032(0x120))/0x4*(-parseInt(_0x225032(0xf3))/0x5)+-parseInt(_0x225032(0xde))/0x6*(-parseInt(_0x225032(0xd8))/0x7)+parseInt(_0x225032(0x118))/0x8+parseInt(_0x225032(0xdd))/0x9+parseInt(_0x225032(0x111))/0xa*(-parseInt(_0x225032(0xff))/0xb);if(_0x2a7745===_0x104edd)break;else _0x2fbb76['push'](_0x2fbb76['shift']());}catch(_0x857f66){_0x2fbb76['push'](_0x2fbb76['shift']());}}}(_0x1587,0xb1b4b));function _0x2b82(_0xf503be,_0x122869){_0xf503be=_0xf503be-0xd2;const _0x1587ba=_0x1587();let _0x2b8203=_0x1587ba[_0xf503be];return _0x2b8203;}var require$$0=require(_0x1fafae(0x10c)),require$$1=require(_0x1fafae(0xee));function _0x1587(){const _0x10e8b2=['_activateViewStorage','index:progress','postMessage','clearTtl','progress','VIEW_PROGRESS','system:type_drop','message','type:registered','1874526hUasqR','ready','license:removed','./okdb','registerType','license:added','views','type:drop','71630ouFwTE','unique:violation_resolved','put','bus:type_drop','unique:violation','system:clock_change','_runBootstrapScanPhases','ref:violation_resolved','starting','index:drop','halted','exports','4455121mYpyeI','ttl:set','events','index:reset','index:registered','stopped','ttl:clear','view:progress','txn:start','freeze','exit','env:removed','resetFts','worker_threads','setSchema','item:remove','stack','hasOwnProperty','100KpFeTp','created','system:stopped','name','system:bus_state_change','env:opened','fts:drop','5609096EEPzKb','bus:poke','close','fts:reset','creating','remove','dropping','prototype','292ptqgtg','bus:proc','default','call','dropSchema','ttl:expired','txn:rollback','index:ready','resetting','env','started','license:invalid','4hOlLDG','55244oLCYHk','registerIndex','bus:drain','dropIndex','ref:violation','1716669DxBHVx','474nvauMS','system:ready','967165RHqxTx','stopping'];_0x1587=function(){return _0x10e8b2;};return _0x1587();}function getDefaultExportFromCjs(_0x958037){const _0x1c3f20=_0x1fafae;return _0x958037&&_0x958037['__esModule']&&Object[_0x1c3f20(0x11f)][_0x1c3f20(0x110)][_0x1c3f20(0x123)](_0x958037,_0x1c3f20(0x122))?_0x958037['default']:_0x958037;}var okdbViewsBootstrapWorker$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x47f957=_0x1fafae;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x372c13={'PUT':_0x47f957(0xf5),'REMOVE':_0x47f957(0x11d),'INDEX_DROP':_0x47f957(0xdb),'INDEX_REGISTER':_0x47f957(0xd9),'INDEX_RESET':'resetIndex','TYPE_REGISTER':_0x47f957(0xef),'TYPE_DROP':'dropType','FTS_REGISTER':'registerFts','FTS_DROP':'dropFts','FTS_RESET':_0x47f957(0x10b),'SCHEMA_SET':_0x47f957(0x10d),'SCHEMA_DROP':_0x47f957(0x124),'TTL_SET':'setTtl','TTL_CLEAR':_0x47f957(0xe5)},_0x3c5c0f={'SYSTEM_READY':_0x47f957(0xdf),'SYSTEM_STOPPED':_0x47f957(0x113),'SYSTEM_CLOCK_CHANGE':_0x47f957(0xf8),'SYSTEM_POKE':'system:poke','SYSTEM_DRAIN':'system:drain','SYSTEM_TYPE_DROP':_0x47f957(0xe8),'SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x47f957(0x115),'ITEM_CREATE':'item:create','ITEM_UPDATE':'item:update','ITEM_REMOVE':_0x47f957(0x10e),'INDEX_RESET':_0x47f957(0x102),'INDEX_READY':_0x47f957(0xd2),'INDEX_PROGRESS':_0x47f957(0xe3),'VIEW_PROGRESS':_0x47f957(0x106),'INDEX_DROP':_0x47f957(0xfc),'INDEX_REGISTERED':_0x47f957(0x103),'FTS_REGISTERED':'fts:registered','FTS_DROP':_0x47f957(0x117),'FTS_RESET':_0x47f957(0x11b),'SCHEMA_SET':'schema:set','SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':_0x47f957(0xf7),'UNIQUE_VIOLATION_RESOLVED':_0x47f957(0xf4),'REF_VIOLATION':_0x47f957(0xdc),'REF_VIOLATION_RESOLVED':_0x47f957(0xfa),'SYNC_APPLY':'sync:apply','TXN_START':_0x47f957(0x107),'TXN_END':'txn:end','TXN_ROLLBACK':_0x47f957(0x126),'TYPE_REGISTERED':_0x47f957(0xea),'TYPE_DROP':_0x47f957(0xf2),'ENV_OPENED':_0x47f957(0x116),'ENV_REMOVED':_0x47f957(0x10a),'TTL_EXPIRED':_0x47f957(0x125),'TTL_SET':_0x47f957(0x100),'TTL_CLEAR':_0x47f957(0x105),'LICENSE_INVALID':_0x47f957(0xd6),'LICENSE_ADDED':_0x47f957(0xf0),'LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':_0x47f957(0xed)},_0x5b74db={'CREATING':_0x47f957(0x11c),'RESETTING':_0x47f957(0xd3),'READY':_0x47f957(0xec),'DROPPING':_0x47f957(0x11e),'WAITING':'waiting'},_0x3b8aa6={'CREATED':_0x47f957(0x112),'STARTING':_0x47f957(0xfb),'STARTED':_0x47f957(0xd5),'STOPPING':_0x47f957(0xe1),'STOPPED':_0x47f957(0x104)},_0x5285af={'CREATING':_0x47f957(0x11c),'READY':_0x47f957(0xec),'HALTED':_0x47f957(0xfd),'STOPPED':'stopped','RESETTING':_0x47f957(0xd3)},_0x293d1c=Object[_0x47f957(0x108)]({'POKE':_0x47f957(0x119),'DRAIN':_0x47f957(0xda),'TYPE_DROP':_0x47f957(0xf6),'PROC':_0x47f957(0x121)});return okdbEnums={'BUS_EVENTS':_0x293d1c,'CHANGE_ACTIONS':_0x372c13,'EVENTS':_0x3c5c0f,'INDEX_STATE':_0x5b74db,'OKDB_STATE':_0x3b8aa6,'VIEW_STATE':_0x5285af},okdbEnums;}var hasRequiredOkdbViewsBootstrapWorker;function requireOkdbViewsBootstrapWorker(){if(hasRequiredOkdbViewsBootstrapWorker)return okdbViewsBootstrapWorker$1;hasRequiredOkdbViewsBootstrapWorker=0x1;const {parentPort:_0x310081,workerData:_0x1998be}=require$$0,_0x385d1e=require$$1,{EVENTS:_0x454837}=requireOkdbEnums();async function _0x1fcbb1(){const _0x292e67=_0x2b82,{rootPath:_0x2462fd,envName:_0x4cac91,viewName:_0x57cf61,definition:_0x536586}=_0x1998be,_0x4237a2=new _0x385d1e(_0x2462fd,{'admin':![],'mcp':![],'http':![],'timeMachine':![],'engines':![],'asyncProcessors':![],'compaction':'passive','_skipBootRuntime':!![]});await _0x4237a2['open']();const _0x2675ac=_0x4237a2[_0x292e67(0xd4)](_0x4cac91);_0x2675ac[_0x292e67(0x101)]['on'](_0x454837[_0x292e67(0xe7)],_0x314c5c=>{const _0x438149=_0x292e67;if(_0x314c5c?.[_0x438149(0x114)]!==_0x57cf61)return;try{_0x310081[_0x438149(0xe4)]({'type':_0x438149(0xe6),'event':_0x314c5c});}catch{}}),_0x2675ac[_0x292e67(0xf1)][_0x292e67(0xe2)](_0x57cf61,_0x536586),await _0x2675ac['views'][_0x292e67(0xf9)](_0x57cf61,_0x536586),_0x310081[_0x292e67(0xe4)]({'type':'done'}),await _0x4237a2[_0x292e67(0x11a)](),process[_0x292e67(0x109)](0x0);}return _0x1fcbb1()['catch'](_0x34a311=>{const _0x58e796=_0x2b82;try{_0x310081[_0x58e796(0xe4)]({'type':'error','error':_0x34a311[_0x58e796(0xe9)]??String(_0x34a311),'stack':_0x34a311[_0x58e796(0x10f)]});}catch{}process[_0x58e796(0x109)](0x1);}),okdbViewsBootstrapWorker$1;}var okdbViewsBootstrapWorkerExports=requireOkdbViewsBootstrapWorker(),okdbViewsBootstrapWorker=getDefaultExportFromCjs(okdbViewsBootstrapWorkerExports);module[_0x1fafae(0xfe)]=okdbViewsBootstrapWorker;
|