@kedem/okdb 2.0.4 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- 'use strict';const _0x337619=_0x58e7;(function(_0x45e061,_0x1e302d){const _0x296fd0=_0x58e7,_0x14e8a5=_0x45e061();while(!![]){try{const _0x1d39e4=-parseInt(_0x296fd0(0x289))/0x1+-parseInt(_0x296fd0(0x2aa))/0x2*(-parseInt(_0x296fd0(0x187))/0x3)+parseInt(_0x296fd0(0x13f))/0x4+parseInt(_0x296fd0(0x282))/0x5+parseInt(_0x296fd0(0x2dd))/0x6*(parseInt(_0x296fd0(0x24b))/0x7)+-parseInt(_0x296fd0(0x20a))/0x8*(-parseInt(_0x296fd0(0x1a2))/0x9)+-parseInt(_0x296fd0(0x1d4))/0xa;if(_0x1d39e4===_0x1e302d)break;else _0x14e8a5['push'](_0x14e8a5['shift']());}catch(_0x13d360){_0x14e8a5['push'](_0x14e8a5['shift']());}}}(_0x1400,0xc119a));var require$$0$5=require('./okdb'),require$$1$1=require(_0x337619(0x210)),require$$1=require('path'),require$$0$3=require('os'),require$$2=require(_0x337619(0x134)),require$$0=require(_0x337619(0x1bf)),require$$0$2=require('perf_hooks'),require$$0$1=require('fs'),require$$0$4=require(_0x337619(0x1be));function getDefaultExportFromCjs(_0x14d3fa){const _0x568c5d=_0x337619;return _0x14d3fa&&_0x14d3fa[_0x568c5d(0x350)]&&Object[_0x568c5d(0x239)]['hasOwnProperty'][_0x568c5d(0x146)](_0x14d3fa,'default')?_0x14d3fa[_0x568c5d(0x285)]:_0x14d3fa;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x36ab67=_0x337619;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x167ac9={'PUT':_0x36ab67(0x129),'REMOVE':'remove','INDEX_DROP':'dropIndex','INDEX_REGISTER':'registerIndex','INDEX_RESET':_0x36ab67(0x234),'TYPE_REGISTER':'registerType','TYPE_DROP':_0x36ab67(0x1af),'FTS_REGISTER':_0x36ab67(0x236),'FTS_DROP':_0x36ab67(0x272),'FTS_RESET':_0x36ab67(0x18b),'SCHEMA_SET':_0x36ab67(0x1e9),'SCHEMA_DROP':_0x36ab67(0x14e),'TTL_SET':_0x36ab67(0x1fb),'TTL_CLEAR':_0x36ab67(0x1ce)},_0x324657={'SYSTEM_READY':_0x36ab67(0x2cc),'SYSTEM_STOPPED':_0x36ab67(0x34a),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x36ab67(0x307),'SYSTEM_DRAIN':_0x36ab67(0x16b),'SYSTEM_TYPE_DROP':_0x36ab67(0x26c),'SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x36ab67(0x265),'ITEM_CREATE':'item:create','ITEM_UPDATE':'item:update','ITEM_REMOVE':'item:remove','INDEX_RESET':'index:reset','INDEX_READY':_0x36ab67(0x153),'INDEX_PROGRESS':_0x36ab67(0x221),'VIEW_PROGRESS':_0x36ab67(0x309),'INDEX_DROP':_0x36ab67(0x27d),'INDEX_REGISTERED':_0x36ab67(0x209),'FTS_REGISTERED':_0x36ab67(0x1bd),'FTS_DROP':_0x36ab67(0x180),'FTS_RESET':'fts:reset','SCHEMA_SET':_0x36ab67(0x2db),'SCHEMA_DROP':_0x36ab67(0x1b2),'UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':'unique:violation_resolved','REF_VIOLATION':'ref:violation','REF_VIOLATION_RESOLVED':_0x36ab67(0x29e),'SYNC_APPLY':_0x36ab67(0x15e),'TXN_START':_0x36ab67(0x18e),'TXN_END':'txn:end','TXN_ROLLBACK':'txn:rollback','TYPE_REGISTERED':_0x36ab67(0x337),'TYPE_DROP':_0x36ab67(0x255),'ENV_OPENED':_0x36ab67(0x1f7),'ENV_REMOVED':_0x36ab67(0x2e9),'SYSTEM_ENV_RELEASE':_0x36ab67(0x31c),'TTL_EXPIRED':'ttl:expired','TTL_SET':_0x36ab67(0x2d0),'TTL_CLEAR':_0x36ab67(0x179),'LICENSE_INVALID':'license:invalid','LICENSE_ADDED':_0x36ab67(0x28c),'LICENSE_ACTIVATED':_0x36ab67(0x206),'LICENSE_REMOVED':_0x36ab67(0x235)},_0xc8eca3={'CREATING':_0x36ab67(0x16c),'RESETTING':_0x36ab67(0x271),'READY':_0x36ab67(0x243),'DROPPING':_0x36ab67(0x1e6),'WAITING':_0x36ab67(0x185)},_0x56375b={'CREATED':_0x36ab67(0x25c),'STARTING':'starting','STARTED':_0x36ab67(0x1aa),'STOPPING':_0x36ab67(0x1cd),'STOPPED':'stopped'},_0x38316d={'CREATING':_0x36ab67(0x16c),'READY':_0x36ab67(0x243),'HALTED':_0x36ab67(0x1cf),'STOPPED':_0x36ab67(0x204),'RESETTING':_0x36ab67(0x271)},_0x514fa7=Object[_0x36ab67(0x214)]({'POKE':_0x36ab67(0x2ec),'DRAIN':_0x36ab67(0x16f),'TYPE_DROP':_0x36ab67(0x335),'PROC':_0x36ab67(0x29c),'ENV_RELEASE':_0x36ab67(0x2f1)});return okdbEnums={'BUS_EVENTS':_0x514fa7,'CHANGE_ACTIONS':_0x167ac9,'EVENTS':_0x324657,'INDEX_STATE':_0xc8eca3,'OKDB_STATE':_0x56375b,'VIEW_STATE':_0x38316d},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x2af6e2=_0x337619;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x538b4c,performance:_0x4ea8b4}=require$$0,_0x341ffd=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x2af6e2(0x325),_0x121401=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x1ee0dd=process.env.OKDB_LOOP_LAG_ALL==='1',_0x1137c8=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x2b7252{constructor(){const _0x40f9ab=_0x2af6e2;this[_0x40f9ab(0x2fb)]=_0x341ffd,this[_0x40f9ab(0x287)]=new Map(),this['_h']=null,this[_0x40f9ab(0x178)]=null,this[_0x40f9ab(0x227)]=![],this[_0x40f9ab(0x19d)]=(_0x344409,_0x253d52)=>process[_0x40f9ab(0x12f)][_0x40f9ab(0x1c7)](_0x344409+(_0x253d52?'\x20'+JSON[_0x40f9ab(0x15a)](_0x253d52):'')+'\x0a');}[_0x2af6e2(0x348)](){const _0x2badc2=_0x2af6e2;return _0x4ea8b4[_0x2badc2(0x348)]();}[_0x2af6e2(0x208)](_0x517a5d){const _0x41c2e4=_0x2af6e2;if(typeof _0x517a5d===_0x41c2e4(0x1b8))this['_log']=_0x517a5d;}[_0x2af6e2(0x30f)](_0x333b28,_0x751e6c,_0x16bb27){const _0x45e8e9=_0x2af6e2;if(!this[_0x45e8e9(0x2fb)])return;let _0x559f57=this[_0x45e8e9(0x287)][_0x45e8e9(0x1fd)](_0x333b28);!_0x559f57&&(_0x559f57={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x45e8e9(0x287)][_0x45e8e9(0x217)](_0x333b28,_0x559f57)),_0x559f57['ms']+=_0x751e6c,_0x559f57['count']+=0x1,_0x751e6c>_0x559f57[_0x45e8e9(0x219)]&&(_0x559f57['maxMs']=_0x751e6c,_0x559f57[_0x45e8e9(0x124)]=_0x16bb27||'');}[_0x2af6e2(0x1e1)](_0x15f688){const _0x4c1e29=_0x2af6e2;if(!this[_0x4c1e29(0x2fb)]||this[_0x4c1e29(0x227)])return;this['_started']=!![];if(_0x15f688)this[_0x4c1e29(0x19d)]=_0x15f688;this['_h']=_0x538b4c({'resolution':0xa}),this['_h']['enable'](),this['_timer']=setInterval(()=>this[_0x4c1e29(0x2b2)](),_0x121401);if(this['_timer']['unref'])this[_0x4c1e29(0x178)][_0x4c1e29(0x195)]();}[_0x2af6e2(0x24f)](_0x43a1ec){const _0x3e6671=_0x2af6e2;if(!this[_0x3e6671(0x2f6)])this['_windowCbs']=new Set();this[_0x3e6671(0x2f6)][_0x3e6671(0x1ff)](_0x43a1ec);if(!this['_started'])this[_0x3e6671(0x2e7)]();}[_0x2af6e2(0x19b)](_0xd69815){const _0x5eb90f=_0x2af6e2;this[_0x5eb90f(0x2f6)]?.['delete'](_0xd69815);}[_0x2af6e2(0x2e7)](){const _0x1231f2=_0x2af6e2;if(this[_0x1231f2(0x2d5)])return;this[_0x1231f2(0x2d5)]=!![];!this['_h']&&(this['_h']=_0x538b4c({'resolution':0xa}),this['_h'][_0x1231f2(0x298)]());const _0x541615=_0x121401;this[_0x1231f2(0x224)]=setInterval(()=>{const _0x29c3ec=_0x1231f2,_0x5eeb32=this['_h'];if(!_0x5eeb32)return;const _0x58f037=_0x5eeb32[_0x29c3ec(0x154)](0x63)/0xf4240,_0x1f060=_0x5eeb32['max']/0xf4240,_0x47f166=_0x5eeb32[_0x29c3ec(0x173)]/0xf4240;_0x5eeb32[_0x29c3ec(0x190)]();if(this[_0x29c3ec(0x2f6)])for(const _0x32a2eb of this[_0x29c3ec(0x2f6)]){try{_0x32a2eb({'p99Ms':_0x58f037,'maxMs':_0x1f060,'meanMs':_0x47f166,'reportMs':_0x541615});}catch{}}},_0x541615);if(this[_0x1231f2(0x224)][_0x1231f2(0x195)])this['_admissionTimer']['unref']();}[_0x2af6e2(0x2b2)](){const _0x7d9d3b=_0x2af6e2,_0x5a03b2=this['_h'],_0x2aceab=_0x5a03b2[_0x7d9d3b(0x17a)]/0xf4240,_0x1bedb6=_0x5a03b2['percentile'](0x63)/0xf4240,_0x3d44b5=_0x5a03b2[_0x7d9d3b(0x173)]/0xf4240;_0x5a03b2['reset']();const _0xebe30b=[...this[_0x7d9d3b(0x287)]['entries']()]['map'](([_0x225611,_0x34b840])=>({'label':_0x225611,..._0x34b840}))[_0x7d9d3b(0x192)]((_0x40cf07,_0x110697)=>_0x110697['ms']-_0x40cf07['ms'])[_0x7d9d3b(0x244)](0x0,0x8);this[_0x7d9d3b(0x287)][_0x7d9d3b(0x326)]();const _0x392bcd=_0xebe30b[_0x7d9d3b(0x142)]((_0x5dd604,_0x1629c2)=>_0x5dd604+_0x1629c2['ms'],0x0),_0x4333f9=_0xebe30b['map'](_0x5b7282=>_0x5b7282[_0x7d9d3b(0x17d)]+'='+_0x5b7282['ms'][_0x7d9d3b(0x186)](0x0)+_0x7d9d3b(0x1ac)+_0x5b7282[_0x7d9d3b(0x2a1)]+(_0x5b7282['maxMs']>0x5?_0x7d9d3b(0x34d)+_0x5b7282[_0x7d9d3b(0x219)][_0x7d9d3b(0x186)](0x0)+'ms'+(_0x5b7282['maxExtra']?'\x20'+_0x5b7282[_0x7d9d3b(0x124)]:'')+')':''));(_0x1ee0dd||_0x2aceab>=_0x1137c8)&&this['_log']('loop-lag\x20'+_0x121401+_0x7d9d3b(0x21d)+_0x2aceab[_0x7d9d3b(0x186)](0x0)+_0x7d9d3b(0x299)+_0x1bedb6[_0x7d9d3b(0x186)](0x0)+'ms\x20mean='+_0x3d44b5[_0x7d9d3b(0x186)](0x0)+_0x7d9d3b(0x14f)+_0x392bcd['toFixed'](0x0)+'ms'+(_0x4333f9['length']?_0x7d9d3b(0x1ee)+_0x4333f9[_0x7d9d3b(0x159)]('\x20\x20'):''),{'feature':_0x7d9d3b(0x18c)});if(this[_0x7d9d3b(0x2f6)])for(const _0x53d4f0 of this['_windowCbs']){try{_0x53d4f0({'p99Ms':_0x1bedb6,'maxMs':_0x2aceab,'meanMs':_0x3d44b5,'reportMs':_0x121401});}catch{}}}['stop'](){const _0x195130=_0x2af6e2;if(this[_0x195130(0x178)])clearInterval(this['_timer']);if(this['_h'])this['_h'][_0x195130(0x156)]();this[_0x195130(0x178)]=null,this['_h']=null,this['_started']=![];}}const _0x5e06b6=new _0x2b7252();if(_0x5e06b6[_0x2af6e2(0x2fb)])_0x5e06b6[_0x2af6e2(0x1e1)]();return okdbLoopMonitor={'LOOP':_0x5e06b6},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x2d4dc4=require$$0$1,_0x6870d2=require$$1;let _0x5e4d7b,_0x277110,_0x581192,_0xca298e,_0x2d9e04,_0x466fe8,_0x2151c3,_0x583a56=![];const _0x446276=new Set();let _0x5e5a17=null;const _0x4e4fb4=new Map();function _0x299311(){const _0x42e5f8=_0x58e7;if(_0x5e4d7b!==undefined)return _0x5e4d7b;_0x5e4d7b=process.env.OKDB_DIAG==='1';if(!_0x5e4d7b)return![];_0x277110=process.env.OKDB_DIAG_STACK==='1',_0xca298e=Math[_0x42e5f8(0x17a)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x581192=new Array(_0xca298e),_0x2d9e04=0x0,_0x466fe8=0x0,_0x2151c3=process.env.OKDB_DIAG_DIR||null;if(_0x2151c3)try{_0x2d4dc4[_0x42e5f8(0x20f)](_0x2151c3,{'recursive':!![]});}catch{}return!![];}function _0x57d88c(){return _0x5e4d7b===undefined?_0x299311():_0x5e4d7b;}function _0x4c72a3(_0x4ebd77,_0x33bee8){const _0x5f4b98=_0x58e7;if(_0x5e4d7b===undefined?!_0x299311():!_0x5e4d7b)return;let _0x5f3c48;if(_0x277110){const _0x3b0a7f=new Error()['stack']||'';_0x5f3c48=_0x3b0a7f[_0x5f4b98(0x16a)]('\x0a')[_0x5f4b98(0x244)](0x3)[_0x5f4b98(0x33e)](_0x388b57=>_0x388b57[_0x5f4b98(0x1d0)]())['filter'](Boolean)[_0x5f4b98(0x244)](0x0,0x8);}_0x581192[_0x2d9e04]={'seq':_0x466fe8++,'t':Date[_0x5f4b98(0x348)](),'env':_0x4ebd77,'kind':_0x33bee8||_0x5f4b98(0x160),'stack':_0x5f3c48},_0x2d9e04=(_0x2d9e04+0x1)%_0xca298e;}function _0x54b482(_0x48fbfe){const _0x4f1eaa=_0x58e7,_0x2e15a2=[];for(let _0x2c5124=0x0;_0x2c5124<_0xca298e;_0x2c5124++){const _0xbbb62a=_0x581192[(_0x2d9e04-0x1-_0x2c5124+_0xca298e*0x2)%_0xca298e];if(!_0xbbb62a)continue;_0x2e15a2['push'](_0xbbb62a);if(_0x2e15a2[_0x4f1eaa(0x149)]>=_0x48fbfe)break;}return _0x2e15a2;}function _0x1aedc5(_0x196d53){const _0x39ba36=_0x58e7;try{process[_0x39ba36(0x12f)]['write'](_0x196d53+'\x0a');}catch{}if(_0x2151c3)try{_0x2d4dc4[_0x39ba36(0x176)](_0x6870d2[_0x39ba36(0x159)](_0x2151c3,_0x39ba36(0x1c3)+process[_0x39ba36(0x1a8)]+_0x39ba36(0x128)),_0x196d53+'\x0a');}catch{}}function _0x5c0a02(_0x157321){const _0x4eb39c=_0x58e7,_0x57e84c=_0x54b482(_0x157321);if(!_0x57e84c[_0x4eb39c(0x149)])return _0x4eb39c(0x1f5);const _0x4f622f=Date[_0x4eb39c(0x348)]();return _0x57e84c[_0x4eb39c(0x33e)](_0x28e26f=>{const _0x51f7c1=_0x4eb39c,_0xf03f19=_0x51f7c1(0x2a4)+_0x28e26f[_0x51f7c1(0x31b)]+'\x20-'+(_0x4f622f-_0x28e26f['t'])+_0x51f7c1(0x26e)+_0x28e26f[_0x51f7c1(0x21a)]+'\x20'+_0x28e26f[_0x51f7c1(0x250)];return _0x28e26f['stack']&&_0x28e26f['stack'][_0x51f7c1(0x149)]?_0xf03f19+_0x51f7c1(0x13d)+_0x28e26f['stack'][_0x51f7c1(0x159)](_0x51f7c1(0x13d)):_0xf03f19;})['join']('\x0a');}function _0x1b7281(_0x125853,_0x57a549){const _0x35af9b=_0x58e7,_0x2fc6e5=_0x35af9b(0x2c8)+_0x125853+_0x35af9b(0x31d)+new Date()[_0x35af9b(0x189)]()+_0x35af9b(0x151)+process['pid']+_0x35af9b(0x194),_0x32bc05=[_0x2fc6e5,'error:\x20'+(_0x57a549&&_0x57a549[_0x35af9b(0x220)]?_0x57a549[_0x35af9b(0x220)][_0x35af9b(0x16a)]('\x0a')[0x0]:_0x57a549),'recent\x20writes\x20(newest\x20first)'+(_0x277110?'':_0x35af9b(0x172))+':',_0x5c0a02(0x18),_0x5f4520(),'='[_0x35af9b(0x344)](_0x2fc6e5['length']-0x1)];_0x1aedc5(_0x32bc05[_0x35af9b(0x159)]('\x0a'));}function _0x45f666(_0x2f09bb){const _0x15ffbd=_0x58e7;if(!_0x57d88c())return;const _0xf9c496=String(_0x2f09bb&&_0x2f09bb['message']||_0x2f09bb||''),_0x444a8e=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x15ffbd(0x34c)](_0xf9c496);_0x1b7281(_0x444a8e?_0x15ffbd(0x20d):_0x15ffbd(0x1b9),_0x2f09bb);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x444a8e)return;try{console[_0x15ffbd(0x2c5)](_0x2f09bb&&_0x2f09bb[_0x15ffbd(0x220)]?_0x2f09bb[_0x15ffbd(0x220)]:_0x2f09bb);}catch{}process[_0x15ffbd(0x2c3)](0x1);}function _0x31aac3(_0x4475f2){const _0x587de2=_0x58e7;if(!_0x57d88c())return;const _0xb0dd4d=String(_0x4475f2&&_0x4475f2[_0x587de2(0x188)]||_0x4475f2||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x587de2(0x34c)](_0xb0dd4d)&&_0x1b7281('ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)',_0x4475f2);}function _0x5f4520(){const _0x20c330=_0x58e7,_0x18e5b1=['drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):'];let _0x4de020=![];for(const _0x24aace of _0x446276){const _0x44ff57=_0x24aace&&_0x24aace[_0x20c330(0x31a)];if(!_0x44ff57)continue;for(const [_0x51ae09,_0x1e8921]of _0x44ff57){const _0x2cb115=_0x1e8921&&_0x1e8921[_0x20c330(0x27c)]&&_0x1e8921['_coordinator'][_0x20c330(0x148)];if(!_0x2cb115)continue;let _0x4cbce6,_0x3a8e53;try{_0x4cbce6=Atomics['load'](_0x2cb115,0x0),_0x3a8e53=Atomics[_0x20c330(0x169)](_0x2cb115,0x1);}catch{continue;}if(_0x4cbce6===0x0)continue;_0x4de020=!![];const _0x315739=_0x4cbce6>0x0?_0x20c330(0x34b):_0x20c330(0x2c7),_0x1fb8f8=Date[_0x20c330(0x348)]()-Math[_0x20c330(0x2b8)](_0x4cbce6)*0x3e8,_0x2ae27c=((()=>{const _0x35f657=_0x20c330;try{return _0x1e8921[_0x35f657(0x30d)]&&_0x1e8921[_0x35f657(0x30d)]['status']?_0x1e8921[_0x35f657(0x30d)][_0x35f657(0x29d)]():null;}catch{return null;}})());_0x18e5b1[_0x20c330(0x1b4)](_0x20c330(0x2bd)+_0x51ae09+'\x20phase='+_0x315739+_0x20c330(0x1a0)+_0x1fb8f8+_0x20c330(0x319)+_0x3a8e53+(_0x2ae27c?_0x20c330(0x2af)+_0x2ae27c[_0x20c330(0x196)]+'\x20oldestPendingMs='+_0x2ae27c[_0x20c330(0x203)]+'\x20parkedNow='+_0x2ae27c[_0x20c330(0x33d)]+'}':''));}}if(!_0x4de020)_0x18e5b1[_0x20c330(0x1b4)](_0x20c330(0x25f));return _0x18e5b1[_0x20c330(0x159)]('\x0a');}function _0x32205b(){const _0x23cb3a=_0x58e7;if(!_0x57d88c())return;const _0x388ab1=Math[_0x23cb3a(0x17a)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x412565=Date[_0x23cb3a(0x348)]();for(const _0x226daa of _0x446276){const _0x355e14=_0x226daa&&_0x226daa['_envs'];if(!_0x355e14)continue;for(const [_0x4f67ad,_0x14fdaa]of _0x355e14){const _0x316813=_0x14fdaa&&_0x14fdaa[_0x23cb3a(0x27c)]&&_0x14fdaa[_0x23cb3a(0x27c)][_0x23cb3a(0x148)];if(!_0x316813)continue;let _0x4b08ce;try{_0x4b08ce=Atomics[_0x23cb3a(0x169)](_0x316813,0x0);}catch{continue;}const _0x2037e6=_0x226daa['path']+'|'+_0x4f67ad;if(_0x4b08ce<=0x0){_0x4e4fb4[_0x23cb3a(0x23f)](_0x2037e6);continue;}const _0x67798f=_0x412565-_0x4b08ce*0x3e8,_0x454d54=_0x4e4fb4[_0x23cb3a(0x1fd)](_0x2037e6);if(_0x67798f<_0x388ab1)continue;if(_0x454d54&&_0x412565-_0x454d54[_0x23cb3a(0x167)]<_0x388ab1)continue;_0x4e4fb4['set'](_0x2037e6,{'firstTs':_0x454d54?_0x454d54[_0x23cb3a(0x1dc)]:_0x4b08ce,'dumpedAt':_0x412565});const _0x4cd9ac=_0x23cb3a(0x12b)+_0x67798f+_0x23cb3a(0x308)+_0x4f67ad+_0x23cb3a(0x31d)+new Date()['toISOString']()+_0x23cb3a(0x151)+process[_0x23cb3a(0x1a8)]+_0x23cb3a(0x194);_0x1aedc5([_0x4cd9ac,_0x5f4520(),'='['repeat'](_0x4cd9ac[_0x23cb3a(0x149)]-0x1)][_0x23cb3a(0x159)]('\x0a'));}}}function _0x495287(){const _0x33a4dc=_0x58e7;if(!_0x57d88c()||_0x583a56)return;_0x583a56=!![],process[_0x33a4dc(0x135)](_0x33a4dc(0x1b9),_0x45f666),process[_0x33a4dc(0x135)](_0x33a4dc(0x33b),_0x31aac3);const _0x358611=Math[_0x33a4dc(0x17a)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x5e5a17=setInterval(_0x32205b,_0x358611);if(_0x5e5a17[_0x33a4dc(0x195)])_0x5e5a17[_0x33a4dc(0x195)]();}function _0x287da8(_0x448882){const _0x38eb16=_0x58e7;if(!_0x57d88c()||!_0x448882)return;_0x446276[_0x38eb16(0x1ff)](_0x448882),_0x495287();}function _0xc9ec48(_0x1bcd3c){_0x446276['delete'](_0x1bcd3c);}function _0x145cbd(){if(!_0x57d88c())return{'enabled':![],'hint':'set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)'};return{'enabled':!![],'stackCapture':!!_0x277110,'recentWrites':_0x54b482(0x10),'drain':_0x5f4520()};}return okdbDiag={'isEnabled':_0x57d88c,'recordWrite':_0x4c72a3,'installDiag':_0x495287,'registerOkdb':_0x287da8,'unregisterOkdb':_0xc9ec48,'snapshot':_0x145cbd},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x1742db=_0x337619;if(hasRequiredOkdbWriter)return okdbWriter[_0x1742db(0x2c1)];hasRequiredOkdbWriter=0x1;const {performance:_0x3dadb0}=require$$0$2,_0x4e249d=requireOkdbDiag(),_0xf8fd77=process.env.OKDB_COMMIT_MODE===_0x1742db(0x174);class _0x3fd337{constructor(_0x394a11){const _0x548ed9=_0x1742db;this[_0x548ed9(0x21a)]=_0x394a11,this[_0x548ed9(0x15f)]=new Set(),this[_0x548ed9(0x1db)]=new Map(),this[_0x548ed9(0x131)]=0x0,this[_0x548ed9(0x1b0)]=[],this['_done']=[],this[_0x548ed9(0x2da)]=Math[_0x548ed9(0x17a)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x548ed9(0x293)]=0x0,this['_bpWaiters']=[],this[_0x548ed9(0x263)]=0x0;}async[_0x1742db(0x32a)](_0xd16f75,_0x2b5009){const _0x4514ac=_0x1742db;if(_0x4e249d['isEnabled']())_0x4e249d['recordWrite'](this[_0x4514ac(0x21a)]?.['name'],_0x2b5009);if(this[_0x4514ac(0x339)]){const _0x1041c7=new Error(_0x4514ac(0x14d));_0x1041c7[_0x4514ac(0x1c0)]=_0x4514ac(0x158);throw _0x1041c7;}if(this[_0x4514ac(0x2da)]>0x0){let _0x2faf8e=![];while(this[_0x4514ac(0x293)]>=this[_0x4514ac(0x2da)]&&!this[_0x4514ac(0x339)]){!_0x2faf8e&&(_0x2faf8e=!![],this[_0x4514ac(0x263)]++),await new Promise(_0x21353d=>this[_0x4514ac(0x27b)][_0x4514ac(0x1b4)](_0x21353d));}if(this[_0x4514ac(0x339)]){const _0x4bfdc7=new Error(_0x4514ac(0x14d));_0x4bfdc7['code']=_0x4514ac(0x158);throw _0x4bfdc7;}}this[_0x4514ac(0x293)]++;const _0x287aa3=this['env'][_0x4514ac(0x27c)];if(_0x287aa3)await _0x287aa3[_0x4514ac(0x164)]();if(this[_0x4514ac(0x339)]){if(_0x287aa3)_0x287aa3[_0x4514ac(0x2c9)]();this[_0x4514ac(0x293)]--;if(this[_0x4514ac(0x27b)]['length']&&this[_0x4514ac(0x293)]<this[_0x4514ac(0x2da)])this[_0x4514ac(0x27b)][_0x4514ac(0x294)]()();const _0x547b5d=new Error(_0x4514ac(0x14d));_0x547b5d[_0x4514ac(0x1c0)]=_0x4514ac(0x158);throw _0x547b5d;}const _0x1f1016=_0x3dadb0[_0x4514ac(0x348)]();if(_0xf8fd77)try{const _0x15a179=this[_0x4514ac(0x21a)]['db'][_0x4514ac(0x20c)](_0xd16f75);this['_committed']++;if(this['_durs'][_0x4514ac(0x1b4)](_0x3dadb0[_0x4514ac(0x348)]()-_0x1f1016)>0x100)this[_0x4514ac(0x1b0)][_0x4514ac(0x294)]();if(this[_0x4514ac(0x15c)][_0x4514ac(0x1b4)](_0x3dadb0[_0x4514ac(0x348)]())>0x800)this['_done'][_0x4514ac(0x294)]();return _0x15a179;}finally{this['_outstanding']--;if(this[_0x4514ac(0x27b)][_0x4514ac(0x149)]&&this['_outstanding']<this[_0x4514ac(0x2da)])this[_0x4514ac(0x27b)][_0x4514ac(0x294)]()();if(_0x287aa3)_0x287aa3[_0x4514ac(0x2c9)]();}const _0x257e8b=this[_0x4514ac(0x21a)]['db']['childTransaction'](_0xd16f75);this['_inflight'][_0x4514ac(0x1ff)](_0x257e8b),this[_0x4514ac(0x1db)][_0x4514ac(0x217)](_0x257e8b,_0x1f1016);const _0x2e8f73=()=>{const _0x41ac27=_0x4514ac;this['_inflight'][_0x41ac27(0x23f)](_0x257e8b),this['_enqueuedAt'][_0x41ac27(0x23f)](_0x257e8b),this[_0x41ac27(0x131)]++,this['_outstanding']--;this[_0x41ac27(0x27b)]['length']&&this[_0x41ac27(0x293)]<this[_0x41ac27(0x2da)]&&this['_bpWaiters'][_0x41ac27(0x294)]()();if(this[_0x41ac27(0x1b0)]['push'](_0x3dadb0['now']()-_0x1f1016)>0x100)this[_0x41ac27(0x1b0)]['shift']();if(this['_done'][_0x41ac27(0x1b4)](_0x3dadb0[_0x41ac27(0x348)]())>0x800)this[_0x41ac27(0x15c)][_0x41ac27(0x294)]();};_0x257e8b[_0x4514ac(0x248)](_0x2e8f73,_0x2e8f73);try{return await _0x257e8b;}finally{if(_0x287aa3)_0x287aa3[_0x4514ac(0x2c9)]();}}['status'](){const _0x4328f4=_0x1742db,_0x30fb28=_0x3dadb0['now']();let _0xce9a81=0x0;for(const _0x5ea3f2 of this[_0x4328f4(0x1db)]['values']()){const _0x4d145e=_0x30fb28-_0x5ea3f2;if(_0x4d145e>_0xce9a81)_0xce9a81=_0x4d145e;}let _0x351817=0x0;for(let _0x26a9ad=this[_0x4328f4(0x15c)][_0x4328f4(0x149)]-0x1;_0x26a9ad>=0x0;_0x26a9ad--){if(_0x30fb28-this[_0x4328f4(0x15c)][_0x26a9ad]>0x3e8)break;_0x351817++;}let _0x134abb=0x0;if(this['_durs'][_0x4328f4(0x149)]){const _0x5c4ea2=[...this[_0x4328f4(0x1b0)]]['sort']((_0x1cd7ec,_0x3184a5)=>_0x1cd7ec-_0x3184a5);_0x134abb=_0x5c4ea2[Math[_0x4328f4(0x278)](_0x5c4ea2['length']-0x1,Math[_0x4328f4(0x1e4)](_0x5c4ea2[_0x4328f4(0x149)]*0.99))];}return{'depth':this['_inflight']['size'],'oldestPendingMs':Math[_0x4328f4(0x143)](_0xce9a81),'committed':this[_0x4328f4(0x131)],'commitsPerSec':_0x351817,'commitP99Ms':Math[_0x4328f4(0x143)](_0x134abb),'parkedNow':this['_bpWaiters'][_0x4328f4(0x149)],'parkedTotal':this[_0x4328f4(0x263)],'highWater':this[_0x4328f4(0x2da)]};}[_0x1742db(0x2c6)](){const _0xbefbe1=_0x1742db,_0x4b0e85=_0x3dadb0[_0xbefbe1(0x348)]();return[...this[_0xbefbe1(0x1db)][_0xbefbe1(0x1c9)]()][_0xbefbe1(0x33e)](_0x4fd91c=>Math[_0xbefbe1(0x143)](_0x4b0e85-_0x4fd91c))[_0xbefbe1(0x192)]((_0x12cefa,_0x5e4762)=>_0x5e4762-_0x12cefa);}[_0x1742db(0x316)](){const _0x549605=_0x1742db;this['_closed']=!![];for(const _0x40fb4a of this[_0x549605(0x27b)]['splice'](0x0))_0x40fb4a();}async[_0x1742db(0x1c1)](){const _0x31cd6f=_0x1742db;let _0x51e7ed=0x0;while(this['_inflight'][_0x31cd6f(0x1e8)]&&_0x51e7ed++<0x3e8){await Promise[_0x31cd6f(0x32c)]([...this[_0x31cd6f(0x15f)]]);}}async[_0x1742db(0x129)](_0x120392,_0x4d932b,_0x112380,_0x517140){const _0x515344=_0x1742db;return this[_0x515344(0x32a)](()=>{const _0x5711b1=_0x515344;if(_0x517140===undefined)_0x120392['putSync'](_0x4d932b,_0x112380);else _0x120392[_0x5711b1(0x300)](_0x4d932b,_0x112380,_0x517140);},_0x515344(0x170));}async[_0x1742db(0x1f2)](_0x1f0836,_0x5c3025){const _0x321334=_0x1742db;return this[_0x321334(0x32a)](()=>_0x1f0836[_0x321334(0x29a)](_0x5c3025),_0x321334(0x313));}}async function _0x39d50d(_0x44e52b,_0x5ae566){const _0x147a14=_0x1742db;if(_0x5ae566==null)_0x5ae566=Math['max'](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x726599=_0x44e52b?.[_0x147a14(0x1d5)];if(!_0x726599||typeof _0x726599[_0x147a14(0x248)]!==_0x147a14(0x1b8))return;await Promise[_0x147a14(0x152)]([Promise[_0x147a14(0x21e)](_0x726599)[_0x147a14(0x183)](()=>{}),new Promise(_0x16fca0=>{const _0x17fbf0=_0x147a14,_0x1196f8=setTimeout(_0x16fca0,_0x5ae566);if(_0x1196f8[_0x17fbf0(0x195)])_0x1196f8[_0x17fbf0(0x195)]();})]);}catch{}}function _0x218c67(_0x50dd47){const _0x3caced=_0x1742db;if(_0xf8fd77)return Promise[_0x3caced(0x21e)]();const _0x3da6cb=_0x50dd47?.[_0x3caced(0x304)];return _0x3da6cb&&typeof _0x3da6cb[_0x3caced(0x248)]===_0x3caced(0x1b8)?_0x3da6cb:Promise[_0x3caced(0x21e)]();}return okdbWriter['exports']=_0x3fd337,okdbWriter[_0x1742db(0x2c1)][_0x1742db(0x266)]=_0x39d50d,okdbWriter['exports']['committed']=_0x218c67,okdbWriter[_0x1742db(0x2c1)]['SYNC_COMMITS']=_0xf8fd77,okdbWriter['exports'];}var okdbLock,hasRequiredOkdbLock;function _0x1400(){const _0x2dd809=['single','putNode','pid','deaths','started','_collectWriterFacet','ms/','SYSTEM_PROC','\x20ipc\x20error:\x20','dropType','_durs','cursorKey','schema:drop','inspect','push','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','workers','online','function','uncaughtException','draining','openDB','_dedupeKey','fts:registered','node:events','node:perf_hooks','code','drain','external','okdb-diag.',':want','release','envsOpen','write','process','values','_lastPublishAt','processKey','running','stopping','clearTtl','halted','trim','_putRowSync','_scheduleFlush','_selfKey','10597430Xetxub','flushed','decommissioned','processor:resumed','processor:progress','_onItem','_instanceId','_enqueuedAt','firstTs','_wantDb','list','processor:ready','claimGated','start','entries','_removeRowAsync','floor','string','dropping','system','size','setSchema','~processes','respawnTimer','_released','removeNode','\x20│\x20','signalWant','object','replace','remove','epoch','caps','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','INDEX_READY','env:opened','_publishNow','_startedAt','off','setTtl','lifecycle','get','getChanges','add','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','processing','keys','oldestPendingMs','stopped','_drainOne','license:activated','slot','setLogger','index:registered','30152ebeuaz','_quantum','transactionSync','ORPHAN\x20(env-closed\x20write)','FTS_RESET','mkdirSync','cluster','cpuWindowMs','processor:retry','fromEntries','freeze','_singletonLocks','publishOwnRow','set','_nodeDead','maxMs','env','warn','value','ms\x20max=','resolve','_adminRelay','stack','index:progress','has','assign','_admissionTimer','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','processorsView','_started','functions','FTS_DROP','listAll','participate','_holderDead','send','--inspect','procmodeack/','extend','\x20(slot=','~lock','_openEnvLazy','resetIndex','license:removed','registerFts','primary','_drain','prototype','_isReader','_maybePublish','building','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','http','delete','_startHeartbeat','_threadStats','INDEX_RESET','ready','slice','filter','win32','_isWriter','then','runtimeProcessesView','ttlMs','2361611kPsqFv','_versionSkewWarned','_lastCpuPct','force','onWindow','kind','consecutiveFailures','user','rows=','busy','type:drop',')\x20exited\x20','slotKey','\x20HTTP\x20server(s)\x20on\x20port\x20','isWorker','reportThreadStats','events','created','ITEM_REMOVE','acquiredAt','\x20\x20(no\x20env\x20draining)','_lockDb','feed:','_lastCpuAt','_bpParkedTotal','reap','system:bus_state_change','flushLmdb','node','stopHeartbeat','_nodeDbFor','async','confirm','system:type_drop','registry-publish','ms\x20env=','_draining','_handleInProcess','resetting','dropFts','ms\x20(attempt\x20','REMOVE','standalone','meta','pushEphemeral','min','_lock','find','_bpWaiters','_coordinator','index:drop','removeSupervisedChild','holder','_participate','_onPoke','2687440jbvuFp','ESRCH','cli','default','startHeartbeat','_buckets','--test','1512846PNFSoO','_onProcEvent','stats','license:added','instanceId','open','SYSTEM_STOPPED','_putRowAsync','updateSupervisedChildStats','decommission','_outstanding','shift','children','listDesired','_desiredOverlay','enable','ms\x20p99=','removeSync','_cursors','bus:proc','status','ref:violation_resolved','[okdb-cluster]\x20','attachFeed','count','--print','deregisterSelf','\x20\x20#','noteListenAddr','kill','_servingEngines','_role','emit','128PVDXyD','once','_publishFailWarned','_activateProcesses','_clusterOnMessage','\x20writer{depth=','_refreshDesiredSnapshot','isConnected','_report','_flushDebounce','threads','_cmd','_caps','host','abs','(code=','flushDebounce','listNodes','hasDesired','\x20\x20env=','_key','getRange','rss','exports','includes','exit','expiresAt','error','inflightAgesMs','copy','\x0a===\x20OKDB_DIAG\x20','afterWrite','tryAcquire','listenAddr','system:ready','_db','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','_rawDb','ttl:set','msg','stop','processors','registry\x20heartbeat\x20skipped\x20(writer=','_admissionStarted','execArgv','_changefeed','getProcess','_statusEnv','_highWater','schema:set','role','24OMOUlN','_heartbeatInFlight','_baselines','isWanted','\x20forked\x20','memoryUsage','_onStop','registerType','clusterStatusView','processingStatusView','_startAdmission','compaction','env:removed','publishChildRow','singletonClaims','bus:poke','_acquiredAt',');\x20','disconnect','hasType','bus:env_release','isPrimary','ppid','unclaimed','processor:paused','_windowCbs','resetReadTxn','_wantDbHandle','setOwnMeta','_handlePoke','enabled','_seen','http\x20worker\x20child\x20failed:\x20','randomUUID','_buildProcessingFacet','putSync','fanout','_rootDb','ephemeral','committed','_buildChildRow','dedupeMax','system:poke','ms\x20on\x20env=','view:progress','ITEM_UPDATE','all','options','_writer','_singletonLock','note','\x20in\x20','cluster:','close','raw-remove','log','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','markClosed','--watch','workersConfigured','ms\x20activeWriters=','_envs','seq','system:env_release','\x20@\x20','_dedupeMax','dead','clearThreadStats','CHANGEFEED_QUANTUM','some','_sampleOwnStats','heartbeatMs','true','clear','\x20while\x20this\x20process\x20runs\x20','_getType','_isStale','transaction','\x20statusEnv=','allSettled','_enableChangelog','SYSTEM_POKE','platform','next','_sandbox','supervisorKey','_desired','okdb-http-worker-child.js','bus:type_drop','_children','type:registered','sandbox','_closed','_nodeDbCache','unhandledRejection','_clusterWorkerAttached','parkedNow','map','engines','processes','_collectSingletonClaims','version','_processStartedAt','repeat','treeView','SIGKILL','heapUsed','now','_groupByProcess','system:stopped','SWAP','test','(worst\x20','compact','\x20sync','__esModule','worker','setDesired','childTransaction','updatedAt','node/','_kind','parse','cpuUsage','_hbTimer','from','maxExtra','heapTotal','writerStatus','_ownMeta','.log','put','process\x20','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','_migrateVocab','cpus','okdb','stderr','[okdb-cluster]\x20primary\x20pid=','_committed','info','~processes:desired','crypto','prependListener','connected','processor','getClock','rowKey','_onTick','entry','inst:','\x0a\x20\x20\x20\x20\x20\x20','uptime','325496ZOrlre','nodesView','processorId','reduce','round','namespace','[okdb-cluster]\x20respawning\x20worker\x20slot=','call','attach','view','length','_systemEnv','__okdbSlot','\x20(durable\x20desired-state)','okdb-writer:\x20env\x20closing\x20—\x20retry','dropSchema','ms\x20busy=','cluster-wide','\x20pid=','race','index:ready','percentile','_listenAddr','disable','fn-runner','ENV_CLOSING_RETRY','join','stringify','hostname','_done','INDEX_REGISTERED','sync:apply','_inflight','commit','__okdbCluster','_flushTimer','_buildOwnRow','beforeWrite','getCmd','ITEM_CREATE','dumpedAt','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','load','split','system:drain','creating','selfKey','isDead','bus:drain','raw-put','type','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','mean','sync','nodeKey','appendFileSync','embedded','_timer','ttl:clear','max','_ensureDesired','_lastCpuUsage','label','processor:error','mode','fts:drop','_nodeDb','_markSeen','catch','_heartbeatTimer','waiting','toFixed','29181FXAbNV','message','toISOString','migrations','resetFts','loop-lag','indexOf','txn:start','change','reset','_rowKey','sort','state','\x20===','unref','depth','commitP99Ms','startsWith','_supervisorKey','http-server','offWindow','_pending','_log','startedAt','\x20times\x20in\x20','\x20drainAge=','getDesired','1845DEnGEc','number','claims',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census'];_0x1400=function(){return _0x2dd809;};return _0x1400();}function requireOkdbLock(){const _0x4ee260=_0x337619;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x4c4997=require$$0$3,{SYNC_COMMITS:_0x49c9f1}=requireOkdbWriter(),_0x1b821b=_0x4ee260(0x232);class _0x518c10{constructor(_0x5c8a2b,_0x12dc01,_0x2a8480){const _0x4fcbf4=_0x4ee260;this[_0x4fcbf4(0x279)]=_0x5c8a2b,this[_0x4fcbf4(0x2be)]=_0x12dc01,this[_0x4fcbf4(0x2ed)]=_0x2a8480,this[_0x4fcbf4(0x1ec)]=![],this['_heartbeatTimer']=null,this['_heartbeatInFlight']=null;}['isHeld'](){const _0x5b59e2=_0x4ee260;if(this[_0x5b59e2(0x1ec)])return![];try{const _0x2f28cb=this[_0x5b59e2(0x279)][_0x5b59e2(0x2cd)]()[_0x5b59e2(0x1fd)](this[_0x5b59e2(0x2be)]);if(!_0x2f28cb||_0x2f28cb['acquiredAt']!==this[_0x5b59e2(0x2ed)])return![];const _0x165d26=_0x2f28cb[_0x5b59e2(0x354)]??_0x2f28cb[_0x5b59e2(0x25e)];if(_0x165d26+_0x2f28cb[_0x5b59e2(0x24a)]<Date[_0x5b59e2(0x348)]())return![];return!![];}catch{return!this['_released'];}}['holder'](){const _0x4a4c85=_0x4ee260;if(this[_0x4a4c85(0x1ec)])return null;try{return this['_lock'][_0x4a4c85(0x2cd)]()[_0x4a4c85(0x1fd)](this[_0x4a4c85(0x2be)])??null;}catch{return null;}}async[_0x4ee260(0x230)](_0x435d6c){const _0x50455f=_0x4ee260;if(this[_0x50455f(0x1ec)])return;try{const _0x2cb2f7=this[_0x50455f(0x279)][_0x50455f(0x2cd)]()[_0x50455f(0x1fd)](this['_key']);if(!_0x2cb2f7||_0x2cb2f7[_0x50455f(0x25e)]!==this[_0x50455f(0x2ed)])return;if(_0x49c9f1)this[_0x50455f(0x279)][_0x50455f(0x2cd)]()['putSync'](this['_key'],{..._0x2cb2f7,'ttlMs':_0x2cb2f7['ttlMs']+_0x435d6c});else await this[_0x50455f(0x279)][_0x50455f(0x2cd)]()[_0x50455f(0x129)](this['_key'],{..._0x2cb2f7,'ttlMs':_0x2cb2f7[_0x50455f(0x24a)]+_0x435d6c});}catch{}}async[_0x4ee260(0x1c5)](){const _0x54a188=_0x4ee260;if(this[_0x54a188(0x1ec)])return;if(this[_0x54a188(0x2de)])try{await this['_heartbeatInFlight'];}catch{}clearInterval(this[_0x54a188(0x184)]),this['_heartbeatTimer']=null,this['_released']=!![];try{const _0xb90529=this['_lock'][_0x54a188(0x2cd)]()['get'](this['_key']);if(_0xb90529&&_0xb90529['acquiredAt']===this['_acquiredAt']){if(_0x49c9f1)this[_0x54a188(0x279)]['_db']()[_0x54a188(0x29a)](this[_0x54a188(0x2be)]);else await this[_0x54a188(0x279)][_0x54a188(0x2cd)]()[_0x54a188(0x1f2)](this['_key']);}}catch{}}[_0x4ee260(0x240)](_0x59b8a2,_0x29face){const _0x5801dc=_0x4ee260,_0x2d9aa3=_0x29face??Math[_0x5801dc(0x1e4)](_0x59b8a2/0x3);this['_heartbeatTimer']=setInterval(()=>{const _0x47b292=_0x5801dc;if(this['_released'])return;this[_0x47b292(0x2de)]=((async()=>{const _0x51af62=_0x47b292;try{const _0xccfdce=this[_0x51af62(0x279)]['_db']()[_0x51af62(0x1fd)](this[_0x51af62(0x2be)]);if(!_0xccfdce||_0xccfdce[_0x51af62(0x25e)]!==this[_0x51af62(0x2ed)]){this[_0x51af62(0x1ec)]=!![],clearInterval(this['_heartbeatTimer']),this[_0x51af62(0x184)]=null;return;}if(_0x49c9f1)this[_0x51af62(0x279)][_0x51af62(0x2cd)]()[_0x51af62(0x300)](this[_0x51af62(0x2be)],{..._0xccfdce,'updatedAt':Date[_0x51af62(0x348)]()});else await this[_0x51af62(0x279)]['_db']()[_0x51af62(0x129)](this[_0x51af62(0x2be)],{..._0xccfdce,'updatedAt':Date['now']()});}catch{}this[_0x51af62(0x2de)]=null;})());},_0x2d9aa3);if(this[_0x5801dc(0x184)][_0x5801dc(0x195)])this[_0x5801dc(0x184)]['unref']();}}class _0x36751e{constructor(_0x2c9c7f,{namespace:_0x18f445,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x64bedf=_0x4ee260;this[_0x64bedf(0x2cf)]=_0x2c9c7f,this['namespace']=_0x18f445,this['ttlMs']=ttlMs,this[_0x64bedf(0x324)]=heartbeatMs,this[_0x64bedf(0x260)]=null;}[_0x4ee260(0x2cd)](){const _0x430c88=_0x4ee260;return!this['_lockDb']&&(this[_0x430c88(0x260)]=this['_rawDb'][_0x430c88(0x1bb)](_0x1b821b,{'dupSort':![]})),this[_0x430c88(0x260)];}['_wantDb'](){const _0x29429e=_0x4ee260;return!this[_0x29429e(0x2f8)]&&(this[_0x29429e(0x2f8)]=this[_0x29429e(0x2cf)][_0x29429e(0x1bb)](_0x1b821b+_0x29429e(0x1c4),{'dupSort':![]})),this['_wantDbHandle'];}[_0x4ee260(0x2be)](_0x27b2f6){const _0x539865=_0x4ee260;return this[_0x539865(0x144)]+':'+_0x27b2f6;}[_0x4ee260(0x1ef)](_0x34ed6e){const _0x68e404=_0x4ee260;try{_0x49c9f1?this['_wantDb']()['putSync'](this[_0x68e404(0x2be)](_0x34ed6e),Date[_0x68e404(0x348)]()):this['_wantDb']()[_0x68e404(0x129)](this['_key'](_0x34ed6e),Date['now']())?.['catch']?.(()=>{});}catch{}}[_0x4ee260(0x2e0)](_0x1ca297,_0x378b01=0x3e8){const _0x1a7fcc=_0x4ee260;try{const _0x4b2872=this[_0x1a7fcc(0x1dd)]()[_0x1a7fcc(0x1fd)](this['_key'](_0x1ca297));return typeof _0x4b2872===_0x1a7fcc(0x1a3)&&Date[_0x1a7fcc(0x348)]()-_0x4b2872<_0x378b01;}catch{return![];}}['_isStale'](_0x1a394f){const _0x1f96d2=_0x4ee260,_0x449ca4=_0x1a394f[_0x1f96d2(0x354)]??_0x1a394f[_0x1f96d2(0x25e)];return _0x449ca4+_0x1a394f[_0x1f96d2(0x24a)]<Date[_0x1f96d2(0x348)]();}static[_0x4ee260(0x22c)](_0x18d068){const _0x254daf=_0x4ee260,_0x26b2cb=_0x18d068?.[_0x254daf(0x27f)];if(!_0x26b2cb||typeof _0x26b2cb['pid']!=='number')return![];if(_0x26b2cb['hostname']!==_0x4c4997[_0x254daf(0x15b)]())return![];if(_0x26b2cb['pid']===process[_0x254daf(0x1a8)])return![];try{return process[_0x254daf(0x2a6)](_0x26b2cb[_0x254daf(0x1a8)],0x0),![];}catch(_0x47f36e){return _0x47f36e['code']===_0x254daf(0x283);}}async[_0x4ee260(0x2ca)](_0x2a18da,_0x5e825d={},_0x3f17e0={}){const _0x4b26ca=_0x4ee260,_0x40524b=this[_0x4b26ca(0x2be)](_0x2a18da),_0x1b5100=_0x3f17e0[_0x4b26ca(0x24a)]??this['ttlMs'],_0x562575=Date[_0x4b26ca(0x348)](),_0x98e8f5={'holder':{'pid':process[_0x4b26ca(0x1a8)],'hostname':_0x4c4997[_0x4b26ca(0x15b)](),..._0x5e825d},'acquiredAt':_0x562575,'updatedAt':_0x562575,'ttlMs':_0x1b5100};let _0x55e98e=![],_0x523508=null;try{const _0x58167e=()=>{const _0x2cd83b=_0x4b26ca,_0x410751=this[_0x2cd83b(0x2cd)]()[_0x2cd83b(0x1fd)](_0x40524b);if(_0x410751&&!this[_0x2cd83b(0x329)](_0x410751)&&!_0x36751e[_0x2cd83b(0x22c)](_0x410751)){const _0x32272d=_0x5e825d['processorId']!=null&&_0x410751[_0x2cd83b(0x27f)][_0x2cd83b(0x1a8)]===process[_0x2cd83b(0x1a8)]&&_0x410751[_0x2cd83b(0x27f)][_0x2cd83b(0x141)]===_0x5e825d[_0x2cd83b(0x141)];if(!_0x32272d){_0x55e98e=![],_0x523508=_0x410751;return;}_0x98e8f5[_0x2cd83b(0x25e)]<=_0x410751['acquiredAt']&&(_0x98e8f5[_0x2cd83b(0x25e)]=_0x410751[_0x2cd83b(0x25e)]+0x1,_0x98e8f5[_0x2cd83b(0x354)]=_0x98e8f5[_0x2cd83b(0x25e)]);}this['_db']()[_0x2cd83b(0x129)](_0x40524b,_0x98e8f5),_0x55e98e=!![],_0x523508=_0x98e8f5;};if(_0x49c9f1)this[_0x4b26ca(0x2cd)]()[_0x4b26ca(0x20c)](_0x58167e);else await this[_0x4b26ca(0x2cd)]()[_0x4b26ca(0x353)](_0x58167e);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x55e98e)return{'acquired':![],'handle':null,'current':_0x523508};const _0x38003b=new _0x518c10(this,_0x40524b,_0x98e8f5[_0x4b26ca(0x25e)]);return _0x38003b[_0x4b26ca(0x240)](_0x1b5100,this[_0x4b26ca(0x324)]),{'acquired':!![],'handle':_0x38003b,'current':_0x523508};}[_0x4ee260(0x1b3)](_0x19dcb1){const _0xa949dc=_0x4ee260;try{return this[_0xa949dc(0x2cd)]()[_0xa949dc(0x1fd)](this['_key'](_0x19dcb1))??null;}catch{return null;}}[_0x4ee260(0x1de)](){const _0x559c4d=_0x4ee260,_0x1a521d=this[_0x559c4d(0x144)]+':',_0x344442=[];try{for(const {key:_0x307ad3,value:_0x45cbed}of this[_0x559c4d(0x2cd)]()[_0x559c4d(0x2bf)]({'start':_0x1a521d,'end':_0x1a521d+'ÿ'})){typeof _0x307ad3===_0x559c4d(0x1e5)&&_0x307ad3['startsWith'](_0x1a521d)&&_0x344442[_0x559c4d(0x1b4)]({'id':_0x307ad3[_0x559c4d(0x244)](_0x1a521d['length']),'entry':_0x45cbed});}}catch{}return _0x344442;}static[_0x4ee260(0x22a)](_0x50c109){const _0x5b801f=_0x4ee260,_0x2a3360=[];try{const _0x2de914=_0x50c109[_0x5b801f(0x1bb)](_0x1b821b,{'dupSort':![]});for(const {key:_0x34a7a9,value:_0x5ebe27}of _0x2de914[_0x5b801f(0x2bf)]({})){if(typeof _0x34a7a9!==_0x5b801f(0x1e5))continue;const _0x48fa81=_0x34a7a9[_0x5b801f(0x18d)](':');if(_0x48fa81<0x1)continue;_0x2a3360[_0x5b801f(0x1b4)]({'namespace':_0x34a7a9[_0x5b801f(0x244)](0x0,_0x48fa81),'id':_0x34a7a9[_0x5b801f(0x244)](_0x48fa81+0x1),'entry':_0x5ebe27});}}catch{}return _0x2a3360;}}return okdbLock={'OKDBLock':_0x36751e},okdbLock;}var version='2.0.4',require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x2abc23=_0x337619;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0xf1a56e=require$$0$3,_0x53c1ad=require$$1$1,_0x4c6dda=require$$2,{LOOP:_0x844ebf}=requireOkdbLoopMonitor(),{OKDBLock:_0x26ca52}=requireOkdbLock(),{SYNC_COMMITS:_0x2e020a}=requireOkdbWriter(),_0x204a5a=_0x2abc23(0x1ea),_0x326745=_0x2abc23(0x267),_0x4ab62b=_0x2abc23(0x133),_0x291776='~processes:cmd',_0x3a50de=(_0x3880d1,_0x455108)=>_0x3880d1+':'+_0x455108,_0x5ef476=(_0x13b5a7,_0x574c50)=>_0x13b5a7+'::'+_0x574c50,_0x231cb9=(_0x20fbaf,_0xb772c8)=>_0x20fbaf+'/'+_0xb772c8,_0xaad60e=(_0x28bfe8,_0x2f0c79)=>_0x28bfe8+'#'+_0x2f0c79,_0xc7b3a9=_0x3b2e5c=>{const _0x3ca774=_0x2abc23;if(_0x3b2e5c?.[_0x3ca774(0x1cb)])return _0x3b2e5c['processKey'];const _0x48ed51=_0x3b2e5c?.[_0x3ca774(0x175)];return typeof _0x48ed51===_0x3ca774(0x1e5)&&_0x48ed51['includes']('#')?_0x48ed51[_0x3ca774(0x244)](0x0,_0x48ed51['indexOf']('#')):_0x48ed51;},_0x5277c3=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x57d7ff=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x1da1ba=_0x5277c3*0x3,_0x50c0ba=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math['max'](0x927c0,_0x1da1ba*0x14),_0xffa4ec=[_0x2abc23(0x1d8),'processor:ready',_0x2abc23(0x212),_0x2abc23(0x17e),'processor:paused',_0x2abc23(0x1d7)];let _0x505fc1=null;function _0x200371(){const _0x502843=_0x2abc23;if(_0x505fc1==null)_0x505fc1=Math[_0x502843(0x143)]((Date[_0x502843(0x348)]()-process[_0x502843(0x13e)]()*0x3e8)/0x3e8)*0x3e8;return _0x505fc1;}function _0x2d8b92(_0x28a1fb){const _0x31737d=_0x2abc23;if(process.env.OKDB_PROCESS_KILL==='off')return![];if(_0x28a1fb?.['options']?.[_0x31737d(0x340)]&&typeof _0x28a1fb[_0x31737d(0x30c)][_0x31737d(0x340)]===_0x31737d(0x1f0)&&_0x28a1fb[_0x31737d(0x30c)][_0x31737d(0x340)]['kill']===![])return![];return!![];}function _0x553ea3(_0xc249ee,_0x42aa7f){const _0x606a72=_0x2abc23,_0x342d88=!!_0x42aa7f?.[_0x606a72(0x2d3)];switch(_0xc249ee){case _0x606a72(0x237):return{'controllable':_0x342d88,'decommissionable':![],'killable':!![],'killConfirm':_0x606a72(0x150)};case _0x606a72(0x284):case _0x606a72(0x275):return{'controllable':_0x342d88,'decommissionable':![],'killable':!![],'killConfirm':_0x606a72(0x26b)};case _0x606a72(0x177):return{'controllable':![],'decommissionable':![],'killable':![]};case'http-server':case'queue-worker':case _0x606a72(0x157):case _0x606a72(0x351):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x606a72(0x24e)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x4c501d{constructor(_0x1b2ebd){const _0x55352f=_0x2abc23;this['okdb']=_0x1b2ebd,this['_statusEnv']=null,this[_0x55352f(0x333)]=null,this[_0x55352f(0x297)]=new Map(),this[_0x55352f(0x2b5)]=null,this[_0x55352f(0x247)]=![],this[_0x55352f(0x23a)]=![],this['_processStartedAt']=_0x200371(),this['_selfKey']=_0x3a50de(process[_0x55352f(0x1a8)],this[_0x55352f(0x343)]),this[_0x55352f(0x1da)]=_0x4c6dda[_0x55352f(0x2fe)]()['slice'](0x0,0x8),this[_0x55352f(0x191)]=_0xaad60e(this[_0x55352f(0x1d3)],this[_0x55352f(0x1da)]),this['_startedAt']=Date[_0x55352f(0x348)](),this[_0x55352f(0x356)]=null,this['_supervisorKey']=null,this[_0x55352f(0x155)]=null,this[_0x55352f(0x359)]=null,this['_onProcEvent']=null,this[_0x55352f(0x13a)]=null,this[_0x55352f(0x1ca)]=0x0,this[_0x55352f(0x127)]={},this['_children']=new Map(),this[_0x55352f(0x17c)]=process['cpuUsage'](),this[_0x55352f(0x262)]=Date[_0x55352f(0x348)](),this[_0x55352f(0x24d)]=0x0,this[_0x55352f(0x241)]=new Map();}get[_0x2abc23(0x16d)](){return this['_selfKey'];}get[_0x2abc23(0x139)](){const _0x31b1da=_0x2abc23;return this[_0x31b1da(0x191)];}[_0x2abc23(0x2b6)](_0x4f28d9,_0x53fe79){const _0x5ec36c=_0x2abc23,_0x39072d=_0x553ea3(_0x4f28d9,_0x53fe79);if(_0x39072d['killable']&&!_0x2d8b92(this[_0x5ec36c(0x12e)]))return{..._0x39072d,'killable':![],'killConfirm':undefined};return _0x39072d;}['isActive'](){return!!this['_statusEnv'];}[_0x2abc23(0x2f9)](_0x5ef079){const _0x53f2f9=_0x2abc23;Object[_0x53f2f9(0x223)](this[_0x53f2f9(0x127)],_0x5ef079||{});}[_0x2abc23(0x2a5)](_0x99d47d){const _0x85a7e2=_0x2abc23;if(_0x99d47d)this[_0x85a7e2(0x155)]=_0x99d47d;}['register'](_0xb2e818={}){const _0x49411b=_0x2abc23;return this[_0x49411b(0x12e)][_0x49411b(0x2ad)](_0xb2e818);}[_0x2abc23(0x2e6)](){const _0x4f0a45=_0x2abc23,_0x56efce={};let _0x22aa7a=0x0,_0x303619=0x0;const _0x51e393=new Set();for(const _0x5bf94e of this['listNodes']()){_0x303619++;const _0x38f79b=_0x5bf94e[_0x4f0a45(0x201)];if(!_0x38f79b)continue;if(_0x38f79b[_0x4f0a45(0x22b)])_0x22aa7a++;for(const _0xb33d4c of _0x38f79b[_0x4f0a45(0x2d3)]||[]){if(!['single',_0x4f0a45(0x301)][_0x4f0a45(0x2c2)](_0xb33d4c['mode']))continue;(_0xb33d4c[_0x4f0a45(0x193)]===_0x4f0a45(0x1b7)||_0xb33d4c[_0x4f0a45(0x193)]===_0x4f0a45(0x23c))&&_0xb33d4c['cursorKey']&&_0x51e393['add']((_0xb33d4c[_0x4f0a45(0x21a)]||'default')+':'+_0xb33d4c[_0x4f0a45(0x1b1)]);const _0x4a80a0=_0xb33d4c[_0x4f0a45(0x21a)]||'default';(_0x56efce[_0x4a80a0]||=[])[_0x4f0a45(0x1b4)]({..._0xb33d4c,'env':_0x4a80a0,'owner':{'pid':_0x5bf94e['pid']??null,'kind':_0x5bf94e['kind']??null}});}}for(const [_0x2c37dd,_0x3777bf]of Object[_0x4f0a45(0x1e2)](_0x56efce)){for(const _0x3ed170 of _0x3777bf){if(_0x3ed170['mode']===_0x4f0a45(0x1a6)&&!_0x3ed170[_0x4f0a45(0x1e0)]){const _0x608b2b=_0x2c37dd+':'+(_0x3ed170[_0x4f0a45(0x1b1)]??'');if(!_0x51e393[_0x4f0a45(0x222)](_0x608b2b))_0x3ed170[_0x4f0a45(0x2f4)]=!![];}}}return{'envs':_0x56efce,'policy':null,'participation':{'participating':_0x22aa7a,'total':_0x303619},'source':_0x4f0a45(0x1b6)};}[_0x2abc23(0x226)](){const _0x1f822e=_0x2abc23,_0x44f59d=_0x35a7a5=>{const _0x3610a8=_0x58e7;if(_0x35a7a5[_0x3610a8(0x193)]==='online'||_0x35a7a5[_0x3610a8(0x193)]==='building'||_0x35a7a5[_0x3610a8(0x193)]===_0x3610a8(0x2c5))return 0x3;if(_0x35a7a5[_0x3610a8(0x1e0)])return 0x1;return 0x2;},_0xed7f63=new Map();for(const _0xdfa7ec of this[_0x1f822e(0x2bb)]()){for(const _0x3641a7 of _0xdfa7ec[_0x1f822e(0x201)]?.[_0x1f822e(0x2d3)]||[]){const _0x4c1e00={..._0x3641a7,'owner':{'pid':_0xdfa7ec['pid']??null,'kind':_0xdfa7ec['kind']??null,'host':_0xdfa7ec[_0x1f822e(0x2b7)]??null}},_0x3da4bb=_0x3641a7[_0x1f822e(0x17f)]==='single'?'1ofN:'+(_0x3641a7[_0x1f822e(0x21a)]??'')+'::'+(_0x3641a7[_0x1f822e(0x1b1)]??_0x3641a7[_0x1f822e(0x171)]??_0x3641a7['id']):_0x1f822e(0x13c)+(_0xdfa7ec[_0x1f822e(0x175)]??_0xdfa7ec[_0x1f822e(0x1cb)]??'')+'::'+(_0x3641a7[_0x1f822e(0x21a)]??'')+'::'+_0x3641a7['id'],_0x5ae882=_0xed7f63['get'](_0x3da4bb);if(!_0x5ae882||_0x44f59d(_0x4c1e00)>_0x44f59d(_0x5ae882))_0xed7f63[_0x1f822e(0x217)](_0x3da4bb,_0x4c1e00);}}return[..._0xed7f63[_0x1f822e(0x1c9)]()];}[_0x2abc23(0x2e5)](){const _0x14f8da=_0x2abc23,_0x15d0bd=Date[_0x14f8da(0x348)](),_0x962f8f=this[_0x14f8da(0x2bb)](),_0x126c10=_0x42b50f=>Math[_0x14f8da(0x17a)](0x0,Math['round']((_0x15d0bd-(_0x42b50f[_0x14f8da(0x19e)]||_0x15d0bd))/0x3e8)),_0xb3b78b=_0x962f8f['find'](_0x14c432=>_0x14c432[_0x14f8da(0x250)]===_0x14f8da(0x237)),_0x3cf30b=_0x962f8f[_0x14f8da(0x245)](_0x54a317=>_0x54a317['kind']===_0x14f8da(0x19a));if(_0xb3b78b||_0x3cf30b['length'])return{'primary':_0xb3b78b?{'pid':_0xb3b78b['pid'],'uptime':_0x126c10(_0xb3b78b)}:null,'workers':_0x3cf30b[_0x14f8da(0x33e)](_0x54ae71=>({'pid':_0x54ae71[_0x14f8da(0x1a8)],'uptime':_0x126c10(_0x54ae71)})),'workersConfigured':_0xb3b78b?.[_0x14f8da(0x276)]?.[_0x14f8da(0x318)]??_0x3cf30b['length'],'mode':'cluster'};const _0x1c963f=_0x962f8f[_0x14f8da(0x27a)](_0x499ace=>_0x499ace['kind']===_0x14f8da(0x284)||_0x499ace[_0x14f8da(0x250)]===_0x14f8da(0x275)||_0x499ace[_0x14f8da(0x250)]===_0x14f8da(0x177)),_0x14ab60=_0x1c963f?{'pid':_0x1c963f[_0x14f8da(0x1a8)],'uptime':_0x126c10(_0x1c963f)}:{'pid':process['pid'],'uptime':Math[_0x14f8da(0x17a)](0x0,Math[_0x14f8da(0x143)](process[_0x14f8da(0x13e)]()))};return{'primary':_0x14ab60,'workers':[_0x14ab60],'workersConfigured':0x1,'mode':_0x14f8da(0x1a6)};}[_0x2abc23(0x140)](){return this['_groupByProcess']();}[_0x2abc23(0x345)](){const _0x6af44c=_0x2abc23,_0x50ab0e=new Map();for(const _0x5c3f2b of this[_0x6af44c(0x349)]())_0x50ab0e[_0x6af44c(0x217)](_0x5c3f2b[_0x6af44c(0x1cb)],{..._0x5c3f2b,'children':[]});const _0x204ae5=[];for(const _0x5428eb of _0x50ab0e[_0x6af44c(0x1c9)]()){const _0x4152d6=_0x5428eb[_0x6af44c(0x332)]?_0x50ab0e['get'](_0x5428eb[_0x6af44c(0x332)]):null;if(_0x4152d6&&_0x4152d6!==_0x5428eb)_0x4152d6[_0x6af44c(0x295)]['push'](_0x5428eb);else _0x204ae5[_0x6af44c(0x1b4)](_0x5428eb);}const _0x4d1e1c=(_0x2d047b,_0x3a6dc8)=>_0x2d047b['kind']===_0x3a6dc8[_0x6af44c(0x250)]?(_0x2d047b[_0x6af44c(0x1a8)]||0x0)-(_0x3a6dc8[_0x6af44c(0x1a8)]||0x0):(_0x2d047b[_0x6af44c(0x250)]??'')<(_0x3a6dc8[_0x6af44c(0x250)]??'')?-0x1:0x1,_0x5b847e=_0x2fdb2b=>{const _0x251cc1=_0x6af44c;_0x2fdb2b['sort'](_0x4d1e1c);for(const _0x35ab48 of _0x2fdb2b)if(_0x35ab48[_0x251cc1(0x295)][_0x251cc1(0x149)])_0x5b847e(_0x35ab48['children']);};return _0x5b847e(_0x204ae5),_0x204ae5;}[_0x2abc23(0x2d8)](_0x2bbdf2){const _0x538624=_0x2abc23;return this[_0x538624(0x349)]()[_0x538624(0x27a)](_0x50db95=>_0x50db95['processKey']===_0x2bbdf2)??null;}['_groupByProcess'](_0x32ece7=Date['now']()){const _0x190cf3=_0x2abc23,_0x28ba67=new Map();for(const _0x540394 of this[_0x190cf3(0x2bb)]()){const _0x8141df=_0xc7b3a9(_0x540394);let _0x1b7185=_0x28ba67['get'](_0x8141df);!_0x1b7185&&(_0x1b7185={'processKey':_0x8141df,'nodeKey':_0x8141df,'pid':_0x540394['pid'],'ppid':_0x540394[_0x190cf3(0x2f3)]??null,'host':_0x540394[_0x190cf3(0x2b7)]??null,'kind':_0x540394[_0x190cf3(0x250)],'role':null,'supervisorKey':_0x540394['supervisorKey']??null,'slot':_0x540394['slot']??null,'slotKey':_0x540394[_0x190cf3(0x257)]??null,'caps':_0x540394[_0x190cf3(0x1f4)]??null,'lifecycle':_0x540394[_0x190cf3(0x1fc)]??null,'uptime':Math[_0x190cf3(0x17a)](0x0,Math[_0x190cf3(0x143)]((_0x32ece7-(_0x540394['startedAt']||_0x32ece7))/0x3e8)),'startedAt':_0x540394[_0x190cf3(0x19e)]??null,'meta':_0x540394[_0x190cf3(0x276)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x28ba67['set'](_0x8141df,_0x1b7185));_0x1b7185['instances']['push']({'instanceId':_0x540394[_0x190cf3(0x28d)]??null,'role':_0x540394[_0x190cf3(0x2dc)]??null,'listenAddr':_0x540394[_0x190cf3(0x2cb)]??null,'lifecycle':_0x540394['lifecycle']??null,'processing':_0x540394['processing']??null});if(!_0x1b7185[_0x190cf3(0x2dc)]&&_0x540394[_0x190cf3(0x2dc)])_0x1b7185[_0x190cf3(0x2dc)]=_0x540394[_0x190cf3(0x2dc)];if(!_0x1b7185['listenAddr']&&_0x540394[_0x190cf3(0x2cb)])_0x1b7185[_0x190cf3(0x2cb)]=_0x540394['listenAddr'];if(!_0x1b7185[_0x190cf3(0x201)]&&_0x540394[_0x190cf3(0x201)])_0x1b7185['processing']=_0x540394['processing'];if(!_0x1b7185['engines']&&_0x540394[_0x190cf3(0x33f)])_0x1b7185['engines']=_0x540394[_0x190cf3(0x33f)];if(!_0x1b7185['singletonClaims']&&_0x540394[_0x190cf3(0x2eb)])_0x1b7185[_0x190cf3(0x2eb)]=_0x540394[_0x190cf3(0x2eb)];if(_0x1b7185[_0x190cf3(0x1f4)]==null&&_0x540394[_0x190cf3(0x1f4)])_0x1b7185[_0x190cf3(0x1f4)]=_0x540394[_0x190cf3(0x1f4)];if(_0x540394[_0x190cf3(0x28b)]&&(!_0x1b7185[_0x190cf3(0x28b)]||(_0x540394['stats']['at']??0x0)>(_0x1b7185['stats']['at']??0x0)))_0x1b7185[_0x190cf3(0x28b)]=_0x540394[_0x190cf3(0x28b)];}return[..._0x28ba67[_0x190cf3(0x1c9)]()];}[_0x2abc23(0x249)](){const _0x3c2dfc=_0x2abc23,_0x4a03d3=[],_0x2d78d3={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x55a5ff of this['_groupByProcess']()){_0x4a03d3[_0x3c2dfc(0x1b4)]({'processKey':_0x55a5ff[_0x3c2dfc(0x1cb)],'kind':_0x55a5ff[_0x3c2dfc(0x250)],'pid':_0x55a5ff[_0x3c2dfc(0x1a8)],'supervisorKey':_0x55a5ff[_0x3c2dfc(0x332)],'meta':_0x55a5ff[_0x3c2dfc(0x276)]??null,'uptime':_0x55a5ff['uptime'],'stats':_0x55a5ff[_0x3c2dfc(0x28b)]??null}),_0x2d78d3['processes']++;if(_0x55a5ff['stats']){_0x2d78d3[_0x3c2dfc(0x2c0)]+=_0x55a5ff[_0x3c2dfc(0x28b)]['rss']||0x0,_0x2d78d3[_0x3c2dfc(0x347)]+=(_0x55a5ff['stats'][_0x3c2dfc(0x347)]||0x0)+(_0x55a5ff[_0x3c2dfc(0x28b)][_0x3c2dfc(0x2b4)]?.[_0x3c2dfc(0x347)]||0x0);const _0x3ed440=_0x55a5ff['stats']['threads'];_0x3ed440&&(_0x2d78d3['threads'][_0x3c2dfc(0x2a1)]+=_0x3ed440['count']||0x0,_0x2d78d3[_0x3c2dfc(0x2b4)][_0x3c2dfc(0x338)]+=_0x3ed440[_0x3c2dfc(0x338)]||0x0,_0x2d78d3[_0x3c2dfc(0x2b4)][_0x3c2dfc(0x254)]+=_0x3ed440['busy']||0x0);}}return{'totals':_0x2d78d3,'nodes':_0x4a03d3};}async['open']({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x262d92=_0x2abc23;this[_0x262d92(0x247)]=this['_isWriter']||!!writer,this['_isReader']=this['_isReader']||!!reader,this[_0x262d92(0x356)]=kind||this[_0x262d92(0x356)]||(_0x53c1ad[_0x262d92(0x259)]?_0x262d92(0x19a):'cli'),this['_supervisorKey']=supervisorKey??this[_0x262d92(0x199)],this[_0x262d92(0x155)]=listenAddr??this[_0x262d92(0x155)],this['_ensureDesired'](),await this['_migrateVocab']();if(!writer&&!reader)return null;if(!this[_0x262d92(0x2d9)]){const _0x26f4b8=await this[_0x262d92(0x12e)]['createEnvironment'](_0x204a5a,{'sync':![],'durability':'fast'});if(!_0x26f4b8[_0x262d92(0x2f0)](_0x326745))await _0x26f4b8[_0x262d92(0x2e4)](_0x326745);this['_statusEnv']=_0x26f4b8;}return this[_0x262d92(0x2d9)];}[_0x2abc23(0x181)](){const _0x475f02=_0x2abc23;return this[_0x475f02(0x269)]!==this[_0x475f02(0x2d9)]&&(this[_0x475f02(0x269)]=this[_0x475f02(0x2d9)],this['_nodeDbCache']=this[_0x475f02(0x2d9)][_0x475f02(0x328)](_0x326745)['data']),this[_0x475f02(0x33a)];}['_putRowAsync'](_0xea74e8){const _0x9caa8f=_0x2abc23;if(_0x2e020a)return this['_nodeDb']()[_0x9caa8f(0x300)](_0xea74e8[_0x9caa8f(0x175)],_0xea74e8,0x1);const _0x12f135=this[_0x9caa8f(0x181)]()['put'](_0xea74e8[_0x9caa8f(0x175)],_0xea74e8,0x1);if(_0x12f135&&typeof _0x12f135['then']==='function')_0x12f135['then'](undefined,()=>{});return _0x12f135;}[_0x2abc23(0x1d1)](_0x5f4fcd){const _0x5aec8b=_0x2abc23;return this[_0x5aec8b(0x181)]()['putSync'](_0x5f4fcd['nodeKey'],_0x5f4fcd,0x1);}[_0x2abc23(0x1e3)](_0x3bb98d){const _0x3914ba=_0x2abc23;if(_0x2e020a)try{return this[_0x3914ba(0x181)]()[_0x3914ba(0x29a)](_0x3bb98d);}catch{return![];}const _0x27ebf9=this[_0x3914ba(0x181)]()[_0x3914ba(0x1f2)](_0x3bb98d);if(_0x27ebf9&&typeof _0x27ebf9[_0x3914ba(0x248)]===_0x3914ba(0x1b8))_0x27ebf9[_0x3914ba(0x248)](undefined,()=>{});return _0x27ebf9;}async[_0x2abc23(0x1a7)](_0x7cb5af){const _0x20e54d=_0x2abc23;if(!this['_statusEnv']||!this[_0x20e54d(0x247)]||!_0x7cb5af?.[_0x20e54d(0x175)])return;return this[_0x20e54d(0x290)](_0x7cb5af);}async[_0x2abc23(0x1ed)](_0x5af85a){const _0x44f279=_0x2abc23;if(!this[_0x44f279(0x2d9)]||!this[_0x44f279(0x247)]||!_0x5af85a)return;const _0x404291=_0x5af85a[_0x44f279(0x2c2)]('#'),_0x5c3eca=[];for(const {key:_0x598ca5}of this[_0x44f279(0x2d9)][_0x44f279(0x2bf)](_0x326745)){if(_0x598ca5===_0x5af85a||!_0x404291&&typeof _0x598ca5==='string'&&_0x598ca5[_0x44f279(0x198)](_0x5af85a+'#'))_0x5c3eca[_0x44f279(0x1b4)](_0x598ca5);}for(const _0x4ed4a6 of _0x5c3eca){try{this[_0x44f279(0x181)]()['removeSync'](_0x4ed4a6);}catch{}}}[_0x2abc23(0x218)](_0xfb6683){const _0x4d29a1=_0x2abc23;if(typeof _0xfb6683?.['pid']!==_0x4d29a1(0x1a3))return![];if(_0xfb6683[_0x4d29a1(0x2b7)]!==_0xf1a56e[_0x4d29a1(0x15b)]())return![];if(_0xfb6683['pid']===process['pid'])return![];if(_0xfb6683[_0x4d29a1(0x2c4)]!=null&&_0xfb6683[_0x4d29a1(0x2c4)]<Date[_0x4d29a1(0x348)]()-_0x50c0ba)return!![];try{return process[_0x4d29a1(0x2a6)](_0xfb6683[_0x4d29a1(0x1a8)],0x0),![];}catch(_0x753dac){return _0x753dac[_0x4d29a1(0x1c0)]==='ESRCH';}}[_0x2abc23(0x2bb)](){const _0x340efc=_0x2abc23;if(!this[_0x340efc(0x2d9)])return[];try{this[_0x340efc(0x2d9)]['db']?.[_0x340efc(0x2f7)]?.();}catch{}const _0x2739c8=Date['now'](),_0x1b9a4c=_0xf1a56e[_0x340efc(0x15b)](),_0xcf21b9=[];for(const {value:_0x5eb215}of this[_0x340efc(0x2d9)][_0x340efc(0x2bf)](_0x326745)){if(!_0x5eb215)continue;let _0x1fb45a=null;_0x5eb215[_0x340efc(0x2b7)]===_0x1b9a4c&&typeof _0x5eb215[_0x340efc(0x1a8)]===_0x340efc(0x1a3)&&(_0x1fb45a=!this['_nodeDead'](_0x5eb215));if(_0x1fb45a===![])continue;const _0x17fa5e=_0x5eb215['expiresAt']==null||_0x5eb215[_0x340efc(0x2c4)]>=_0x2739c8;if(_0x1fb45a===!![]||_0x17fa5e)_0xcf21b9['push'](_0x5eb215);}return _0xcf21b9;}async[_0x2abc23(0x264)](_0x25d023=0x0){const _0x154c09=_0x2abc23;if(!this[_0x154c09(0x2d9)]||!this[_0x154c09(0x247)])return;const _0xeadc80=Date['now']()-_0x25d023,_0x7690b1=new Set(),_0x9ab315=[],_0x4128bb=_0xf1a56e['hostname'](),_0x407f0b=require$$6[_0x154c09(0x342)];for(const {key:_0x519756,value:_0xf8d4c6}of this[_0x154c09(0x2d9)]['getRange'](_0x326745)){if(!_0xf8d4c6)continue;const _0x414e20=_0xf8d4c6[_0x154c09(0x2b7)]===_0x4128bb&&typeof _0xf8d4c6[_0x154c09(0x1a8)]===_0x154c09(0x1a3),_0x207856=_0x414e20?this[_0x154c09(0x218)](_0xf8d4c6):_0xf8d4c6[_0x154c09(0x2c4)]!=null&&_0xf8d4c6[_0x154c09(0x2c4)]<_0xeadc80;if(_0x207856)_0x9ab315[_0x154c09(0x1b4)](_0x519756);else{_0x7690b1['add'](_0xc7b3a9(_0xf8d4c6)??_0x519756);if(_0xf8d4c6['version']&&_0xf8d4c6[_0x154c09(0x342)]!==_0x407f0b){if(!this[_0x154c09(0x24c)])this['_versionSkewWarned']=new Set();!this[_0x154c09(0x24c)][_0x154c09(0x222)](_0xf8d4c6[_0x154c09(0x342)])&&(this[_0x154c09(0x24c)][_0x154c09(0x1ff)](_0xf8d4c6[_0x154c09(0x342)]),this['okdb'][_0x154c09(0x314)]?.[_0x154c09(0x21b)]?.(_0x154c09(0x12a)+(_0xf8d4c6['pid']??'?')+'\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20'+_0xf8d4c6[_0x154c09(0x342)]+_0x154c09(0x327)+_0x407f0b+'\x20—\x20'+'mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.',{'feature':_0x154c09(0x18a)}));}}}for(const _0x1c2239 of _0x9ab315)this[_0x154c09(0x1e3)](_0x1c2239);if(this[_0x154c09(0x17b)]()){const _0x3942c5=[];for(const {key:_0x4b9ac2}of this[_0x154c09(0x296)](_0x154c09(0x267))){if(!_0x7690b1[_0x154c09(0x222)](_0x4b9ac2)){if(_0x2e020a)try{this['_desired'][_0x154c09(0x29a)](_0x154c09(0x355)+_0x4b9ac2);}catch{}else _0x3942c5['push'](this[_0x154c09(0x333)]['remove']('node/'+_0x4b9ac2));}}if(_0x3942c5[_0x154c09(0x149)])await Promise[_0x154c09(0x32c)](_0x3942c5);}}[_0x2abc23(0x286)](_0x3dc388=null){const _0x247867=_0x2abc23;if(this['_hbTimer'])return;if(!this[_0x247867(0x247)]||!this['_statusEnv']){this[_0x247867(0x12e)]?.['log']?.[_0x247867(0x21b)]?.(_0x247867(0x2d4)+this[_0x247867(0x247)]+_0x247867(0x32b)+!!this[_0x247867(0x2d9)]+_0x247867(0x1a5),{'feature':_0x247867(0x340)});return;}this[_0x247867(0x13a)]=_0x3dc388,this[_0x247867(0x28a)]=()=>this['_maybePublish']();for(const _0x51958f of _0xffa4ec)this['okdb'][_0x247867(0x25b)]['on'](_0x51958f,this[_0x247867(0x28a)]);this[_0x247867(0x1f8)]();const _0x46df2c=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x5277c3;this[_0x247867(0x359)]=setInterval(()=>{const _0x337589=_0x247867;if(this['_onTick'])try{this[_0x337589(0x13a)]();}catch{}this[_0x337589(0x1f8)](),this[_0x337589(0x264)]()['catch'](()=>{});},_0x46df2c);if(this['_hbTimer'][_0x247867(0x195)])this[_0x247867(0x359)][_0x247867(0x195)]();}[_0x2abc23(0x23b)](){const _0x551aab=_0x2abc23;if(!this[_0x551aab(0x247)]||!this[_0x551aab(0x2d9)])return;if(Date[_0x551aab(0x348)]()-this['_lastPublishAt']<_0x57d7ff)return;this['_publishNow']();}[_0x2abc23(0x1f8)](){const _0x565618=_0x2abc23;if(!this[_0x565618(0x247)]||!this[_0x565618(0x2d9)])return;this[_0x565618(0x1ca)]=Date[_0x565618(0x348)]();try{const _0x4aa3a8=[this[_0x565618(0x163)]()];for(const _0x310676 of this['_children'][_0x565618(0x1c9)]())_0x4aa3a8[_0x565618(0x1b4)](this[_0x565618(0x305)](_0x310676));const _0x109773=_0x844ebf[_0x565618(0x2fb)]?_0x844ebf[_0x565618(0x348)]():0x0;for(const _0xa3b1b5 of _0x4aa3a8){try{this[_0x565618(0x1d1)](_0xa3b1b5),this['_publishFailWarned']=![];}catch(_0x32740c){!this[_0x565618(0x2ac)]&&(this[_0x565618(0x2ac)]=!![],this['okdb']?.['log']?.[_0x565618(0x21b)]?.('registry\x20publish\x20failing:\x20'+_0x32740c[_0x565618(0x188)],{'feature':_0x565618(0x340)}));}}if(_0x844ebf[_0x565618(0x2fb)])_0x844ebf[_0x565618(0x30f)](_0x565618(0x26d),_0x844ebf[_0x565618(0x348)]()-_0x109773,_0x565618(0x253)+_0x4aa3a8[_0x565618(0x149)]+_0x565618(0x34f));}catch(_0xa0e5af){!this[_0x565618(0x2ac)]&&(this['_publishFailWarned']=!![],this[_0x565618(0x12e)]?.[_0x565618(0x314)]?.[_0x565618(0x21b)]?.('registry\x20publish\x20failing:\x20'+_0xa0e5af[_0x565618(0x188)],{'feature':'processes'}));}}async[_0x2abc23(0x268)](){const _0xdb59a7=_0x2abc23;if(this[_0xdb59a7(0x28a)]){for(const _0x19f08a of _0xffa4ec){try{this[_0xdb59a7(0x12e)][_0xdb59a7(0x25b)][_0xdb59a7(0x1fa)](_0x19f08a,this['_onProcEvent']);}catch{}}this['_onProcEvent']=null;}this[_0xdb59a7(0x359)]&&(clearInterval(this[_0xdb59a7(0x359)]),this[_0xdb59a7(0x359)]=null);try{if(this[_0xdb59a7(0x2d9)]&&this[_0xdb59a7(0x247)])await this['removeNode'](this[_0xdb59a7(0x191)]);}catch{}}async[_0x2abc23(0x2a3)](){const _0x3ef69d=_0x2abc23;if(!this[_0x3ef69d(0x2d9)]||!this[_0x3ef69d(0x247)])return;try{await this[_0x3ef69d(0x1ed)](this['_rowKey']);}catch{}try{const _0x563a36=[];for(const {value:_0x5b1ff0}of this[_0x3ef69d(0x2d9)][_0x3ef69d(0x2bf)](_0x326745)){if(_0x5b1ff0?.[_0x3ef69d(0x2f3)]===process[_0x3ef69d(0x1a8)]&&_0x5b1ff0[_0x3ef69d(0x175)])_0x563a36[_0x3ef69d(0x1b4)](_0x5b1ff0[_0x3ef69d(0x175)]);}for(const _0x19510c of _0x563a36){try{await this[_0x3ef69d(0x1ed)](_0x19510c);}catch{}}}catch{}}async[_0x2abc23(0x216)](){const _0x4ab793=_0x2abc23;return this[_0x4ab793(0x1a7)](this[_0x4ab793(0x163)]());}async[_0x2abc23(0x2ea)](_0x215a75){const _0x16e7ee=_0x2abc23;if(!this[_0x16e7ee(0x2d9)]||!this[_0x16e7ee(0x247)])return;return this[_0x16e7ee(0x1a7)](this[_0x16e7ee(0x305)](_0x215a75));}[_0x2abc23(0x305)]({pid:_0x15c0ea,startedAt:_0x4844d1,kind:_0xde9ef8,supervisorKey:_0x2ad019,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x2abc23(0x1cc),meta:meta=null,stats:stats=null}){const _0xed0368=_0x2abc23,_0x44f7df=Date[_0xed0368(0x348)](),_0x2cfaa7=_0x3a50de(_0x15c0ea,_0x4844d1);return{'nodeKey':_0xaad60e(_0x2cfaa7,'0'),'processKey':_0x2cfaa7,'instanceId':'0','pid':_0x15c0ea,'startedAt':_0x4844d1,'ppid':process[_0xed0368(0x1a8)],'host':_0xf1a56e[_0xed0368(0x15b)](),'supervisorKey':_0x2ad019,'slot':slot,'slotKey':slotKey,'kind':_0xde9ef8,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x44f7df,'expiresAt':_0x44f7df+_0x1da1ba,'caps':this['_caps'](_0xde9ef8,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async['addSupervisedChild'](_0x55bebc){const _0x230d22=_0x2abc23;if(!_0x55bebc?.[_0x230d22(0x1a8)])return null;const _0x84d932=_0x3a50de(_0x55bebc['pid'],_0x55bebc[_0x230d22(0x19e)]);this[_0x230d22(0x336)][_0x230d22(0x217)](_0x84d932,{..._0x55bebc,'supervisorKey':_0x55bebc[_0x230d22(0x332)]??this['_selfKey']});if(this[_0x230d22(0x247)])await this['publishChildRow'](this[_0x230d22(0x336)][_0x230d22(0x1fd)](_0x84d932))[_0x230d22(0x183)]?.(()=>{});return _0x84d932;}[_0x2abc23(0x27e)](_0x146829){const _0x4429d6=_0x2abc23;if(!_0x146829)return;return this[_0x4429d6(0x336)][_0x4429d6(0x23f)](_0x146829),this[_0x4429d6(0x1ed)](_0x146829);}[_0x2abc23(0x323)](){const _0x28a257=_0x2abc23,_0xcced42=Date[_0x28a257(0x348)](),_0x5f1ef9=process[_0x28a257(0x358)](),_0x191302=(_0xcced42-this[_0x28a257(0x262)])*0x3e8;if(_0x191302>=0x3d090){const _0x1f9040=_0x5f1ef9[_0x28a257(0x252)]-this['_lastCpuUsage'][_0x28a257(0x252)]+(_0x5f1ef9['system']-this['_lastCpuUsage'][_0x28a257(0x1e7)]),_0xafe818=_0xf1a56e[_0x28a257(0x12d)]()[_0x28a257(0x149)]||0x1;this[_0x28a257(0x24d)]=Math[_0x28a257(0x278)](0x64,Math[_0x28a257(0x143)](_0x1f9040/(_0x191302*_0xafe818)*0x64)),this['_lastCpuWindowMs']=Math[_0x28a257(0x143)](_0x191302/0x3e8),this[_0x28a257(0x17c)]=_0x5f1ef9,this[_0x28a257(0x262)]=_0xcced42;}const _0x384717=process[_0x28a257(0x2e2)](),_0x3c7cac=this['_threadStats']['size'];let _0x315e58=0x0;if(_0x3c7cac>0x0){const _0x5c1934=[this[_0x28a257(0x12e)],...this[_0x28a257(0x12e)][_0x28a257(0x31a)]?.[_0x28a257(0x1c9)]?.()??[]];for(const _0xa227e9 of _0x5c1934){const _0x38b258=_0xa227e9[_0x28a257(0x228)]?.[_0x28a257(0x331)];if(_0x38b258)_0x315e58+=_0x38b258['liveThreadStats']['busy'];}}let _0x2808dc=null;const _0x54dfd5=_0x3c7cac;if(_0x54dfd5>0x0){let _0x41684c=0x0;for(const _0x37a140 of this[_0x28a257(0x241)][_0x28a257(0x1c9)]())_0x41684c+=_0x37a140[_0x28a257(0x347)]||0x0;_0x2808dc={'count':_0x54dfd5,'heapUsed':_0x41684c,'sandbox':_0x3c7cac,'busy':_0x315e58};}return{'rss':_0x384717[_0x28a257(0x2c0)],'heapUsed':_0x384717[_0x28a257(0x347)],'heapTotal':_0x384717[_0x28a257(0x125)],'external':_0x384717[_0x28a257(0x1c2)],'cpuPct':this[_0x28a257(0x24d)],'cpuWindowMs':this['_lastCpuWindowMs']??null,'threads':_0x2808dc,'at':_0xcced42};}[_0x2abc23(0x25a)](_0x5bae26,_0x59e905){const _0x41bd74=_0x2abc23;if(!_0x5bae26||!_0x59e905)return;this[_0x41bd74(0x241)]['set'](_0x5bae26,_0x59e905);}[_0x2abc23(0x320)](_0x446857){const _0xf7fc49=_0x2abc23;this[_0xf7fc49(0x241)]['delete'](_0x446857);}[_0x2abc23(0x291)](_0x5e6f7c,_0x23cc4d,_0x42b24b=undefined){const _0xa4ee10=_0x2abc23,_0x17f566=this[_0xa4ee10(0x336)][_0xa4ee10(0x1fd)](_0x5e6f7c);if(!_0x17f566||!_0x23cc4d)return;if(_0x42b24b!==undefined)_0x17f566[_0xa4ee10(0x201)]=_0x42b24b;_0x17f566['stats']={'rss':_0x23cc4d[_0xa4ee10(0x2c0)]??null,'heapUsed':_0x23cc4d[_0xa4ee10(0x347)]??null,'heapTotal':_0x23cc4d[_0xa4ee10(0x125)]??null,'external':_0x23cc4d[_0xa4ee10(0x1c2)]??null,'cpuPct':_0x23cc4d['cpuPct']??null,'cpuWindowMs':_0x23cc4d[_0xa4ee10(0x211)]??null,'threads':_0x23cc4d['threads']??null,'claims':_0x23cc4d[_0xa4ee10(0x1a4)]??null,'envsOpen':_0x23cc4d[_0xa4ee10(0x1c6)]??null,'at':Date['now']()};}['_buildOwnRow'](){const _0x172d88=_0x2abc23,_0x3a4a4e=Date[_0x172d88(0x348)](),_0x1c7b2b=this[_0x172d88(0x12e)][_0x172d88(0x2a8)]||{},_0x277e52=this[_0x172d88(0x356)]||'cli';return{'nodeKey':this['_rowKey'],'processKey':this['_selfKey'],'instanceId':this[_0x172d88(0x1da)],'pid':process[_0x172d88(0x1a8)],'startedAt':this[_0x172d88(0x343)],'instanceStartedAt':this[_0x172d88(0x1f9)],'ppid':typeof process['ppid']==='number'?process[_0x172d88(0x2f3)]:null,'host':_0xf1a56e[_0x172d88(0x15b)](),'supervisorKey':this[_0x172d88(0x199)]??null,'version':require$$6[_0x172d88(0x342)],'kind':_0x277e52,'role':{'engines':!!_0x1c7b2b[_0x172d88(0x33f)],'processors':!!_0x1c7b2b['processors'],'compaction':_0x1c7b2b[_0x172d88(0x2e8)],'http':_0x1c7b2b['http']},'listenAddr':this[_0x172d88(0x155)]??null,'heartbeatAt':_0x3a4a4e,'expiresAt':_0x3a4a4e+_0x1da1ba,'caps':this['_caps'](_0x277e52,_0x1c7b2b),'lifecycle':{'state':_0x172d88(0x1cc),'desiredVersionApplied':null},'meta':{...this['_ownMeta']},'processing':_0x1c7b2b[_0x172d88(0x2d3)]?this[_0x172d88(0x2ff)]():null,'engines':_0x1c7b2b[_0x172d88(0x33f)]?[...this[_0x172d88(0x12e)][_0x172d88(0x2a7)]??[]]:null,'singletonClaims':this[_0x172d88(0x341)](),'stats':this[_0x172d88(0x323)](),'writers':this[_0x172d88(0x1ab)]()};}[_0x2abc23(0x1ab)](){const _0x82df5e=_0x2abc23,_0x504d43={};try{for(const [_0x52f9ae,_0x606240]of this['okdb']['_envs']){try{const _0x3ce7b5=_0x606240[_0x82df5e(0x126)]?.();if(!_0x3ce7b5)continue;if(!_0x3ce7b5['depth']&&!_0x3ce7b5[_0x82df5e(0x304)]&&!(_0x3ce7b5[_0x82df5e(0x33d)]??0x0)&&!_0x3ce7b5[_0x82df5e(0x1ba)])continue;_0x504d43[_0x52f9ae]={'depth':_0x3ce7b5[_0x82df5e(0x196)],'oldestPendingMs':_0x3ce7b5[_0x82df5e(0x203)],'committed':_0x3ce7b5[_0x82df5e(0x304)],'commitsPerSec':_0x3ce7b5['commitsPerSec'],'commitP99Ms':_0x3ce7b5[_0x82df5e(0x197)],'parkedNow':_0x3ce7b5[_0x82df5e(0x33d)]??0x0,'draining':!!_0x3ce7b5[_0x82df5e(0x1ba)]};}catch{}}}catch{}return Object['keys'](_0x504d43)['length']?_0x504d43:null;}[_0x2abc23(0x341)](){const _0x3a9bee=_0x2abc23,_0x117ac4=process[_0x3a9bee(0x1a8)],_0x13a890=Date[_0x3a9bee(0x348)](),_0x31bb56=_0x3fac23=>{const _0x3f32e4=_0x3a9bee;if(!_0x3fac23)return[];const _0x2e0608=[];try{for(const {id:_0x2c81ed,entry:_0x5a191a}of _0x3fac23[_0x3f32e4(0x1de)]()){if(_0x5a191a?.[_0x3f32e4(0x27f)]?.[_0x3f32e4(0x1a8)]!==_0x117ac4)continue;const _0xfb895b=_0x5a191a[_0x3f32e4(0x354)]??_0x5a191a['acquiredAt']??0x0;if(_0xfb895b+(_0x5a191a[_0x3f32e4(0x24a)]??0x0)<_0x13a890)continue;_0x2e0608[_0x3f32e4(0x1b4)](_0x2c81ed);}}catch{}return _0x2e0608;},_0x1307f0=_0x31bb56(this['_singletonLock'](_0x3a9bee(0x34e))),_0x4b23ef=_0x31bb56(this[_0x3a9bee(0x30e)]('sync'));if(!_0x1307f0[_0x3a9bee(0x149)]&&!_0x4b23ef[_0x3a9bee(0x149)])return null;return{'compact':_0x1307f0,'replicate':_0x4b23ef};}[_0x2abc23(0x30e)](_0x31f459){const _0x44734b=_0x2abc23;if(!this[_0x44734b(0x12e)]?.['_rootDb'])return null;if(!this['_singletonLocks'])this[_0x44734b(0x215)]=new Map();let _0x114309=this[_0x44734b(0x215)][_0x44734b(0x1fd)](_0x31f459);if(!_0x114309)try{_0x114309=new _0x26ca52(this[_0x44734b(0x12e)][_0x44734b(0x302)],{'namespace':_0x31f459}),this[_0x44734b(0x215)]['set'](_0x31f459,_0x114309);}catch{return null;}return _0x114309;}[_0x2abc23(0x2ff)](){const _0x36c02a=_0x2abc23,_0x3a76d2=[];try{for(const [_0x3d550f,_0x353947]of this[_0x36c02a(0x12e)][_0x36c02a(0x31a)]){if(_0x3d550f[_0x36c02a(0x198)]('~'))continue;for(const _0x1b417d of _0x353947[_0x36c02a(0x137)]['tierList']())_0x3a76d2[_0x36c02a(0x1b4)]({..._0x1b417d,'env':_0x3d550f});}}catch{}return{'participate':this['okdb'][_0x36c02a(0x2d3)]?.[_0x36c02a(0x280)]??![],'processors':_0x3a76d2};}['_ensureDesired'](){const _0x4944f4=_0x2abc23;if(this[_0x4944f4(0x333)])return!![];const _0x28b99c=this[_0x4944f4(0x12e)][_0x4944f4(0x302)];if(!_0x28b99c)return![];return this['_desired']=_0x28b99c[_0x4944f4(0x1bb)](_0x4ab62b,{'dupSort':![]}),this['_cmd']=_0x28b99c[_0x4944f4(0x1bb)](_0x291776,{'dupSort':![]}),!![];}async[_0x2abc23(0x12c)](){const _0x5dabc8=_0x2abc23;if(!this[_0x5dabc8(0x17b)]())return;const _0x4278d0='__vocab/version',_0x41f536=0x1,_0x526a0e=this[_0x5dabc8(0x333)][_0x5dabc8(0x1fd)](_0x4278d0)??0x0;if(_0x526a0e>=_0x41f536)return;const _0x276765=_0xf4a593=>{const _0x506f89=_0x5dabc8;if(_0xf4a593===_0x506f89(0x351))return'single';if(_0xf4a593===_0x506f89(0x26a))return _0x506f89(0x301);return _0xf4a593;};await this[_0x5dabc8(0x12e)][_0x5dabc8(0x14a)][_0x5dabc8(0x30d)]['transaction'](()=>{const _0x3125c8=_0x5dabc8;for(const _0x3dc836 of['procmode/',_0x3125c8(0x22f)]){for(const {key:_0x39318,value:_0x2bfe26}of this[_0x3125c8(0x333)][_0x3125c8(0x2bf)]({'start':_0x3dc836,'end':_0x3dc836+'ÿ'})){if(typeof _0x39318!=='string'||!_0x39318[_0x3125c8(0x198)](_0x3dc836))break;const _0x300e21=_0x276765(_0x2bfe26[_0x3125c8(0x17f)]);if(_0x300e21!==_0x2bfe26[_0x3125c8(0x17f)])this[_0x3125c8(0x333)][_0x3125c8(0x129)](_0x39318,{..._0x2bfe26,'mode':_0x300e21});}}this[_0x3125c8(0x333)][_0x3125c8(0x129)](_0x4278d0,_0x41f536);});}[_0x2abc23(0x2bc)](){const _0x40c81f=_0x2abc23;return!!this[_0x40c81f(0x333)];}[_0x2abc23(0x1a1)](_0x320609,_0x50ed33){const _0x6acf67=_0x2abc23;if(!this[_0x6acf67(0x17b)]())return null;const _0x1d8b2b=_0x320609+'/'+_0x50ed33;return this[_0x6acf67(0x2b0)](),this['_desiredOverlay'][_0x6acf67(0x1fd)](_0x1d8b2b)??this[_0x6acf67(0x333)][_0x6acf67(0x1fd)](_0x1d8b2b)??null;}[_0x2abc23(0x2b0)](){const _0x3f9bd8=_0x2abc23;if(!_0x2e020a)return;try{this[_0x3f9bd8(0x12e)][_0x3f9bd8(0x14a)]?.['db']?.[_0x3f9bd8(0x2f7)]?.();}catch{}}async[_0x2abc23(0x352)](_0x1ae24c,_0x44324c,_0x2dc7d0){const _0x92488d=_0x2abc23;if(!this[_0x92488d(0x17b)]())return null;const _0x551fb4=_0x1ae24c+'/'+_0x44324c;this[_0x92488d(0x2b0)]();const _0x2e5573=this[_0x92488d(0x297)][_0x92488d(0x1fd)](_0x551fb4)??this[_0x92488d(0x333)][_0x92488d(0x1fd)](_0x551fb4)??{'version':0x0},_0x44cb2e=(_0x2e5573[_0x92488d(0x342)]||0x0)+0x1,_0x13d351={..._0x2e5573,..._0x2dc7d0,'version':_0x44cb2e,'updatedAt':Date['now']()};this[_0x92488d(0x297)]['set'](_0x551fb4,_0x13d351);try{await this[_0x92488d(0x12e)]['_systemEnv']['_writer']['transaction'](()=>{const _0x4f3f3b=_0x92488d;this[_0x4f3f3b(0x333)][_0x4f3f3b(0x129)](_0x551fb4,_0x13d351);});}finally{if(this[_0x92488d(0x297)][_0x92488d(0x1fd)](_0x551fb4)===_0x13d351)this[_0x92488d(0x297)][_0x92488d(0x23f)](_0x551fb4);}return _0x44cb2e;}[_0x2abc23(0x296)](_0xd1114f){const _0x358afe=_0x2abc23;if(!this[_0x358afe(0x17b)]())return[];this[_0x358afe(0x2b0)]();const _0x394cdb=_0xd1114f+'/',_0x1357bd=[];for(const {key:_0x41eb4c,value:_0x1bea9b}of this[_0x358afe(0x333)][_0x358afe(0x2bf)]({'start':_0x394cdb,'end':_0x394cdb+'ÿ'})){if(typeof _0x41eb4c!==_0x358afe(0x1e5)||!_0x41eb4c[_0x358afe(0x198)](_0x394cdb))break;_0x1357bd[_0x358afe(0x1b4)]({'key':_0x41eb4c[_0x358afe(0x244)](_0x394cdb['length']),'value':_0x1bea9b});}return _0x1357bd;}[_0x2abc23(0x165)](_0x393d36){const _0x3fbb67=_0x2abc23;if(!this[_0x3fbb67(0x17b)]())return null;return this['_cmd'][_0x3fbb67(0x1fd)](_0x393d36)??null;}async['bumpCmd'](_0x5ca974,_0xc34318,_0x2c6738={}){const _0x5dfda7=_0x2abc23;if(!this[_0x5dfda7(0x17b)]())return null;let _0x42ce19;return await this[_0x5dfda7(0x12e)][_0x5dfda7(0x14a)][_0x5dfda7(0x30d)]['transaction'](()=>{const _0x4962fe=_0x5dfda7,_0x4d41d1=this[_0x4962fe(0x2b5)][_0x4962fe(0x1fd)](_0x5ca974)||{'epoch':0x0};_0x42ce19=(_0x4d41d1[_0x4962fe(0x1f3)]||0x0)+0x1,this[_0x4962fe(0x2b5)][_0x4962fe(0x129)](_0x5ca974,{..._0x4d41d1,..._0x2c6738,'cmd':_0xc34318,'epoch':_0x42ce19,'updatedAt':Date['now']()});}),_0x42ce19;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x4c501d,'nodeKey':_0x3a50de,'logicalKey':_0x5ef476,'slotKey':_0x231cb9,'PROCESS_ENV':_0x204a5a,'NODE_TYPE':_0x326745},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x201e9b=_0x337619;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x367271=require$$0$4,{EVENTS:_0x4cfdfb,CHANGE_ACTIONS:_0x486c1b}=requireOkdbEnums(),{LOOP:_0x482767}=requireOkdbLoopMonitor(),_0x34e1ae=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x5628c9=0x5,_0xbdb910=0x2710;class _0x15d904 extends _0x367271{constructor(_0x484737,_0x1045da={}){const _0x57b48f=_0x58e7;super(),this['okdb']=_0x484737,this[_0x57b48f(0x20b)]=_0x1045da['quantum']??_0x34e1ae,this['_flushDebounce']=_0x1045da[_0x57b48f(0x2ba)]??_0x5628c9,this[_0x57b48f(0x31e)]=_0x1045da[_0x57b48f(0x306)]??_0xbdb910,this['_started']=![],this[_0x57b48f(0x29b)]=new Map(),this[_0x57b48f(0x2df)]=new Map(),this[_0x57b48f(0x19c)]=new Map(),this[_0x57b48f(0x162)]=null,this[_0x57b48f(0x26f)]=![],this[_0x57b48f(0x2fc)]=new Set(),this[_0x57b48f(0x1d9)]=_0x536b5c=>this[_0x57b48f(0x270)](_0x536b5c),this[_0x57b48f(0x281)]=_0x3a0003=>this[_0x57b48f(0x2fa)](_0x3a0003),this[_0x57b48f(0x2e3)]=()=>this[_0x57b48f(0x2d2)]();}['start'](){const _0x966cd2=_0x58e7;if(this[_0x966cd2(0x227)])return;this[_0x966cd2(0x227)]=!![];for(const [_0x2eceaa,_0x132524]of this[_0x966cd2(0x12e)][_0x966cd2(0x31a)]){if(_0x2eceaa['startsWith']('~'))continue;try{_0x132524[_0x966cd2(0x32d)]();}catch{}}for(const [_0x891ce9,_0x4db207]of this[_0x966cd2(0x12e)][_0x966cd2(0x31a)]){if(_0x891ce9['startsWith']('~'))continue;try{this[_0x966cd2(0x2df)][_0x966cd2(0x217)](_0x891ce9,_0x4db207['getClock']()||0x0);}catch{}}const {events:_0x1f0458}=this[_0x966cd2(0x12e)];_0x1f0458['on'](_0x4cfdfb[_0x966cd2(0x166)],this[_0x966cd2(0x1d9)]),_0x1f0458['on'](_0x4cfdfb['ITEM_UPDATE'],this[_0x966cd2(0x1d9)]),_0x1f0458['on'](_0x4cfdfb[_0x966cd2(0x25d)],this[_0x966cd2(0x1d9)]),_0x1f0458['on'](_0x4cfdfb[_0x966cd2(0x32e)],this[_0x966cd2(0x281)]),_0x1f0458[_0x966cd2(0x2ab)](_0x4cfdfb[_0x966cd2(0x28f)],this[_0x966cd2(0x2e3)]);}[_0x201e9b(0x2d2)](){const _0xc875df=_0x201e9b;if(!this['_started'])return;this[_0xc875df(0x227)]=![];const {events:_0x5b7503}=this[_0xc875df(0x12e)];_0x5b7503['off'](_0x4cfdfb['ITEM_CREATE'],this['_onItem']),_0x5b7503[_0xc875df(0x1fa)](_0x4cfdfb[_0xc875df(0x30a)],this['_onItem']),_0x5b7503[_0xc875df(0x1fa)](_0x4cfdfb[_0xc875df(0x25d)],this[_0xc875df(0x1d9)]),_0x5b7503['off'](_0x4cfdfb[_0xc875df(0x32e)],this[_0xc875df(0x281)]);try{_0x5b7503[_0xc875df(0x1fa)](_0x4cfdfb[_0xc875df(0x28f)],this[_0xc875df(0x2e3)]);}catch{}this['_flushTimer']&&(clearTimeout(this['_flushTimer']),this[_0xc875df(0x162)]=null),this[_0xc875df(0x19c)][_0xc875df(0x326)](),this[_0xc875df(0x29b)][_0xc875df(0x326)](),this[_0xc875df(0x2df)][_0xc875df(0x326)](),this[_0xc875df(0x2fc)][_0xc875df(0x326)]();}[_0x201e9b(0x1bc)](_0x157ba5,_0x39d049,_0x27a8f6,_0xe50fba){return _0x157ba5+'\x00'+_0x39d049+'\x00'+_0x27a8f6+'\x00'+_0xe50fba;}['_markSeen'](_0xbf50b6,_0x53ea92,_0x3f2b,_0x3b0c7a){const _0x2446b0=_0x201e9b,_0x8931d5=this[_0x2446b0(0x1bc)](_0xbf50b6,_0x53ea92,_0x3f2b,_0x3b0c7a);if(this[_0x2446b0(0x2fc)]['has'](_0x8931d5))return![];this[_0x2446b0(0x2fc)]['add'](_0x8931d5);if(this[_0x2446b0(0x2fc)][_0x2446b0(0x1e8)]>this[_0x2446b0(0x31e)]){const _0x1d70cc=this[_0x2446b0(0x2fc)][_0x2446b0(0x1c9)]()[_0x2446b0(0x330)]()[_0x2446b0(0x21c)];this['_seen'][_0x2446b0(0x23f)](_0x1d70cc);}return!![];}['_handleInProcess'](_0xcc2711){const _0x532c50=_0x201e9b;if(!this[_0x532c50(0x227)]||!_0xcc2711)return;const {env:_0x4af93c,type:_0x31d2c2,key:_0x424fe3,clock:_0x8c409d,origin:_0x219dd1,action:_0x58e695,newValue:_0x531c19,oldValue:_0x39058d}=_0xcc2711;if(_0x4af93c==null||_0x31d2c2==null||_0x424fe3==null)return;if(typeof _0x4af93c===_0x532c50(0x1e5)&&_0x4af93c[_0x532c50(0x198)]('~'))return;if(typeof _0x31d2c2===_0x532c50(0x1e5)&&_0x31d2c2['startsWith']('~'))return;if(!this[_0x532c50(0x182)](_0x4af93c,_0x31d2c2,_0x424fe3,_0x8c409d))return;const _0x5ccf40=_0x58e695===_0x486c1b[_0x532c50(0x274)]?_0x532c50(0x1f2):_0x532c50(0x129);this[_0x532c50(0x2a9)](_0x532c50(0x18f),{'env':_0x4af93c,'type':_0x31d2c2,'key':_0x424fe3,'op':_0x5ccf40,'clock':_0x8c409d,'origin':_0x219dd1,'value':_0x5ccf40===_0x532c50(0x1f2)?null:_0x531c19,'prevValue':_0x39058d});}[_0x201e9b(0x2fa)](_0x14f3af){const _0x10430e=_0x201e9b;if(!this['_started'])return;if(!_0x14f3af||typeof _0x14f3af[_0x10430e(0x21a)]!=='string'||typeof _0x14f3af[_0x10430e(0x171)]!==_0x10430e(0x1e5))return;const {env:_0x1ff18c,type:_0x19b880}=_0x14f3af;if(_0x1ff18c['startsWith']('~')||_0x19b880[_0x10430e(0x198)]('~'))return;this[_0x10430e(0x19c)][_0x10430e(0x217)](_0x1ff18c+'\x00'+_0x19b880,{'env':_0x1ff18c,'type':_0x19b880}),this[_0x10430e(0x1d2)]();}[_0x201e9b(0x1d2)](){const _0x2da8f7=_0x201e9b;if(this['_flushTimer'])return;const _0x173b18=()=>{const _0x12c4b6=_0x58e7;this[_0x12c4b6(0x162)]=null,this[_0x12c4b6(0x238)]()['catch'](()=>{});};this[_0x2da8f7(0x162)]=setTimeout(_0x173b18,this[_0x2da8f7(0x2b3)]>0x0?this[_0x2da8f7(0x2b3)]:0x0);}async['_drain'](){const _0xa9de0b=_0x201e9b;if(this[_0xa9de0b(0x26f)]){this[_0xa9de0b(0x1d2)]();return;}this[_0xa9de0b(0x26f)]=!![];try{const _0x3c1ec3=[...this[_0xa9de0b(0x19c)][_0xa9de0b(0x1c9)]()];this[_0xa9de0b(0x19c)][_0xa9de0b(0x326)]();let _0x34606e=![];for(const {env:_0x51b42e,type:_0x2e8bd7}of _0x3c1ec3){try{const _0x24baa9=await this['_drainOne'](_0x51b42e,_0x2e8bd7);if(_0x24baa9)_0x34606e=!![];}catch{this[_0xa9de0b(0x19c)]['set'](_0x51b42e+'\x00'+_0x2e8bd7,{'env':_0x51b42e,'type':_0x2e8bd7}),_0x34606e=!![];}}if(_0x34606e||this[_0xa9de0b(0x19c)][_0xa9de0b(0x1e8)]>0x0)this[_0xa9de0b(0x1d2)]();}finally{this[_0xa9de0b(0x26f)]=![];}}async[_0x201e9b(0x205)](_0x5b07fc,_0x3fcdeb){const _0x1fe932=_0x201e9b,_0x4434e5=await this['okdb'][_0x1fe932(0x233)](_0x5b07fc),_0x29c65b=_0x5b07fc+'\x00'+_0x3fcdeb;!this['_cursors'][_0x1fe932(0x222)](_0x29c65b)&&(!this[_0x1fe932(0x2df)]['has'](_0x5b07fc)&&(_0x4434e5[_0x1fe932(0x32d)](),this['_baselines'][_0x1fe932(0x217)](_0x5b07fc,_0x4434e5[_0x1fe932(0x138)]()||0x0)),this[_0x1fe932(0x29b)]['set'](_0x29c65b,this[_0x1fe932(0x2df)][_0x1fe932(0x1fd)](_0x5b07fc)));const _0x339b59=this[_0x1fe932(0x29b)]['get'](_0x29c65b),_0x3c70fe=_0x4434e5[_0x1fe932(0x138)](_0x3fcdeb)||0x0;if(_0x3c70fe<=_0x339b59)return![];const _0x3c2826=_0x339b59+this[_0x1fe932(0x20b)],_0x2e3493=Math[_0x1fe932(0x278)](_0x3c70fe,_0x3c2826),_0x443275=_0x482767[_0x1fe932(0x2fb)]?_0x482767[_0x1fe932(0x348)]():0x0,_0x5435e=Array[_0x1fe932(0x123)](_0x4434e5[_0x1fe932(0x1fe)](_0x3fcdeb,_0x339b59+0x1,_0x2e3493));let _0x1f77cc=_0x339b59;for(const _0x54e4d7 of _0x5435e){const {clock:_0x3a085e,key:_0x498063,action:_0x3a5c6e,origin:_0x57ed4a}=_0x54e4d7;if(_0x3a085e>_0x1f77cc)_0x1f77cc=_0x3a085e;if(_0x498063==null)continue;if(!this[_0x1fe932(0x182)](_0x5b07fc,_0x3fcdeb,_0x498063,_0x3a085e))continue;let _0x14a572,_0x44b6f4;if(_0x3a5c6e===_0x486c1b[_0x1fe932(0x274)])_0x14a572=_0x1fe932(0x1f2),_0x44b6f4=null;else{const _0x40bd08=_0x4434e5['get'](_0x3fcdeb,_0x498063);_0x40bd08==null?(_0x14a572='remove',_0x44b6f4=null):(_0x14a572='put',_0x44b6f4=_0x40bd08);}this[_0x1fe932(0x2a9)](_0x1fe932(0x18f),{'env':_0x5b07fc,'type':_0x3fcdeb,'key':_0x498063,'op':_0x14a572,'clock':_0x3a085e,'origin':_0x57ed4a,'value':_0x44b6f4});}if(_0x482767['enabled'])_0x482767[_0x1fe932(0x30f)](_0x1fe932(0x261)+_0x5b07fc+':'+_0x3fcdeb,_0x482767[_0x1fe932(0x348)]()-_0x443275,'n='+_0x5435e['length']);return this[_0x1fe932(0x29b)]['set'](_0x29c65b,Math[_0x1fe932(0x17a)](_0x1f77cc,_0x2e3493)),_0x4434e5[_0x1fe932(0x138)](_0x3fcdeb)>_0x2e3493;}[_0x201e9b(0x29d)](){const _0x164c0b=_0x201e9b;return{'started':this[_0x164c0b(0x227)],'quantum':this['_quantum'],'flushDebounce':this['_flushDebounce'],'cursors':Object[_0x164c0b(0x213)]([...this[_0x164c0b(0x29b)]['entries']()][_0x164c0b(0x33e)](([_0x1327ee,_0x3162df])=>[_0x1327ee[_0x164c0b(0x1f1)]('\x00',':'),_0x3162df])),'pending':this[_0x164c0b(0x19c)][_0x164c0b(0x1e8)],'seen':this[_0x164c0b(0x2fc)][_0x164c0b(0x1e8)]};}}return _0x15d904[_0x201e9b(0x321)]=_0x34e1ae,okdbChangefeed={'OKDBChangefeed':_0x15d904},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x17ad02=_0x337619;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x3406f1=require$$1$1,_0x5508c2=require$$1,{EVENTS:_0x21bf8f}=requireOkdbEnums(),_0x38f0f9=require$$0$3,{slotKey:_0x2f92be}=requireOkdbProcessRegistry(),_0x5ced5d=0xfa,_0x4887e5=0xfa0,_0x4652fb=0x5,_0x2da6a2=0x2710,_0x43babd=0xbb8,_0x1a1558=0x7d0,_0x2f36c8=_0x17ad02(0x161),_0x331222=_0x17ad02(0x303),_0x5309fd=_0x17ad02(0x314),_0x57a3dd=_0x17ad02(0x28b),_0x629c24=[_0x21bf8f['VIEW_PROGRESS'],_0x21bf8f['FTS_REGISTERED'],_0x21bf8f[_0x17ad02(0x229)],_0x21bf8f[_0x17ad02(0x20e)],_0x21bf8f['INDEX_PROGRESS'],_0x21bf8f[_0x17ad02(0x1f6)],_0x21bf8f[_0x17ad02(0x242)],_0x21bf8f[_0x17ad02(0x15d)],_0x17ad02(0x1df),'processor:progress','processor:error',_0x17ad02(0x2f5),'processor:resumed',_0x17ad02(0x212)],_0x551a7d=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x58d000({workers:_0x5dd4b5,makeOkdb:_0x39cf0e,port:_0x88ad02,primaryOkdb:_0x47dea6,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0xd203f1=_0x17ad02;if(_0x3406f1[_0xd203f1(0x2f2)])return childEntry&&_0x3406f1['setupPrimary']({'exec':_0x5508c2[_0xd203f1(0x159)](__dirname,_0xd203f1(0x334)),'args':[],'execArgv':((()=>{const _0xe7aae5=_0xd203f1,_0x4c5b1f=[];for(let _0x442c02=0x0;_0x442c02<process[_0xe7aae5(0x2d6)][_0xe7aae5(0x149)];_0x442c02++){const _0x268fd8=process[_0xe7aae5(0x2d6)][_0x442c02];if(_0x268fd8[_0xe7aae5(0x198)](_0xe7aae5(0x288))||_0x268fd8[_0xe7aae5(0x198)](_0xe7aae5(0x317))||_0x268fd8[_0xe7aae5(0x198)](_0xe7aae5(0x22e)))continue;if(_0x268fd8==='-e'||_0x268fd8==='--eval'||_0x268fd8==='-p'||_0x268fd8===_0xe7aae5(0x2a2)){_0x442c02++;continue;}_0x4c5b1f[_0xe7aae5(0x1b4)](_0x268fd8);}return _0x4c5b1f;})())}),_0x522c0f({'workers':_0x5dd4b5,'port':_0x88ad02,'primaryOkdb':_0x47dea6,'workerEnv':workerEnv});return _0x4957d1({'makeOkdb':_0x39cf0e,'port':_0x88ad02});}function _0x522c0f({workers:_0x1ae110,port:_0x1933ff,primaryOkdb:_0xd416eb,workerEnv:_0x34caae}){const _0x84c327=_0x17ad02,_0x5493d9=new Map(),_0x1c0b33=new Map();let _0x58c0ae=![];const _0x58380d=_0x5beb77=>_0x5beb77?.[_0x84c327(0x14b)],_0x30e316=_0x48cf0d=>{const _0x522de6=_0x84c327,_0x4db195=_0x3406f1['fork']({...process.env,..._0x34caae||{},'OKDB_CLUSTER_SLOT':String(_0x48cf0d)});return _0x4db195[_0x522de6(0x14b)]=_0x48cf0d,_0x5493d9[_0x522de6(0x217)](_0x4db195[_0x522de6(0x1c8)]['pid'],{'worker':_0x4db195,'startedAt':Date[_0x522de6(0x348)](),'slot':_0x48cf0d}),_0x4db195['on']('error',_0x2e8294=>{const _0x58d681=_0x522de6;console['log']('[okdb-cluster]\x20worker\x20pid='+_0x4db195[_0x58d681(0x1c8)]['pid']+_0x58d681(0x1ae)+(_0x2e8294?.[_0x58d681(0x188)]??_0x2e8294));}),_0x4db195['on'](_0x522de6(0x1b7),()=>_0x1a24d0()),_0x4db195;},_0x277923=_0x549bbe=>{const _0x2ddfde=_0x84c327;for(const {worker:_0x1c1d2f}of _0x5493d9[_0x2ddfde(0x1c9)]()){if(_0x1c1d2f['isDead']()||!_0x1c1d2f[_0x2ddfde(0x2b1)]())continue;try{_0x1c1d2f[_0x2ddfde(0x22d)](_0x549bbe);}catch{}}};_0xd416eb?.[_0x84c327(0x2ad)]?.({'kind':'primary','listenAddr':':'+_0x1933ff})[_0x84c327(0x183)](()=>{}),_0xd416eb?.[_0x84c327(0x340)]?.[_0x84c327(0x2f9)]?.({'workersConfigured':_0x1ae110});const _0x1e0d08={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x1a24d0=()=>{const _0x116998=_0x84c327,_0x5d4832=_0xd416eb?.[_0x116998(0x340)];if(!_0x5d4832||!_0x5d4832['_isWriter'])return;const _0x3b7095=_0x5d4832[_0x116998(0x16d)];for(const {worker:_0x2ed09a,startedAt:_0xb24dc4,slot:_0x3f8bc6,stats:_0x47ed85,processing:_0x2469cf}of _0x5493d9[_0x116998(0x1c9)]()){if(_0x2ed09a[_0x116998(0x16e)]())continue;const _0x3d00dc=_0x5d4832[_0x116998(0x2bc)]?.()&&_0x5d4832['getDesired'](_0x116998(0x207),_0xfb7d35(_0x3f8bc6))?.[_0x116998(0x292)]===!![];_0x5d4832[_0x116998(0x2ea)]({'pid':_0x2ed09a[_0x116998(0x1c8)][_0x116998(0x1a8)],'startedAt':_0xb24dc4,'kind':_0x116998(0x19a),'supervisorKey':_0x3b7095,'slot':_0x3f8bc6,'slotKey':_0xfb7d35(_0x3f8bc6),'role':_0x1e0d08,'listenAddr':':'+_0x1933ff,'lifecycle':_0x3d00dc?'decommissioning':'running','processing':_0x2469cf??null,'stats':_0x47ed85??null})['catch'](()=>{});}},_0xfb7d35=_0x2031cf=>_0x2f92be(_0x84c327(0x311)+_0x1933ff,_0x2031cf),_0x201bfc=_0x5ec35d=>{const _0x42e54f=_0x84c327,_0x328ea3=_0xd416eb?.['processes'];if(!_0x328ea3?.[_0x42e54f(0x2bc)]?.())return![];return _0x328ea3[_0x42e54f(0x1a1)](_0x42e54f(0x207),_0xfb7d35(_0x5ec35d))?.[_0x42e54f(0x292)]===!![];};for(let _0x3b64c4=0x0;_0x3b64c4<_0x1ae110;_0x3b64c4++){const _0x2168d6=_0x201bfc(_0x3b64c4);_0x1c0b33[_0x84c327(0x217)](_0x3b64c4,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x2168d6,'respawnTimer':null}),_0x2168d6?console['log']('[okdb-cluster]\x20slot='+_0x3b64c4+_0x84c327(0x225)):_0x30e316(_0x3b64c4);}const _0x116a8c=()=>{const _0x25827d=_0x84c327,_0x5ce327=_0xd416eb?.[_0x25827d(0x340)];if(!_0x5ce327?.[_0x25827d(0x247)]||!_0x5ce327['hasDesired']?.())return;for(const [_0x322df9,_0x3dd6f8]of _0x1c0b33[_0x25827d(0x1e2)]()){const _0x22e4c8=_0x5ce327[_0x25827d(0x1a1)]('slot',_0xfb7d35(_0x322df9)),_0x15872d=_0x22e4c8?.[_0x25827d(0x292)]===!![],_0x62fac5=_0x22e4c8?.['kill']===!![];if(_0x15872d&&!_0x3dd6f8[_0x25827d(0x31f)]){_0x3dd6f8[_0x25827d(0x31f)]=!![];_0x3dd6f8['respawnTimer']&&(clearTimeout(_0x3dd6f8[_0x25827d(0x1eb)]),_0x3dd6f8[_0x25827d(0x1eb)]=null);for(const {worker:_0x4e6e8e}of _0x5493d9[_0x25827d(0x1c9)]()){if(_0x58380d(_0x4e6e8e)!==_0x322df9||_0x4e6e8e[_0x25827d(0x16e)]())continue;try{if(_0x62fac5)_0x4e6e8e[_0x25827d(0x1c8)]['kill'](_0x25827d(0x346));else _0x4e6e8e[_0x25827d(0x2b1)]()&&_0x4e6e8e['disconnect']();}catch{}}console[_0x25827d(0x314)](_0x25827d(0x29f)+(_0x62fac5?'hard-killed':_0x25827d(0x1d6))+'\x20worker\x20slot='+_0x322df9+_0x25827d(0x14c));}else{if(!_0x15872d&&_0x3dd6f8[_0x25827d(0x31f)]&&_0x22e4c8){_0x3dd6f8['dead']=![],_0x3dd6f8['deaths']=[],_0x3dd6f8['consecutiveFailures']=0x0;const _0xa7b2b4=[..._0x5493d9[_0x25827d(0x1c9)]()][_0x25827d(0x322)](({worker:_0x2bcc0b})=>_0x58380d(_0x2bcc0b)===_0x322df9&&!_0x2bcc0b[_0x25827d(0x16e)]());!_0xa7b2b4&&!_0x58c0ae&&(_0x30e316(_0x322df9),console[_0x25827d(0x314)](_0x25827d(0x168)+_0x322df9));}}}},_0x4dea58=()=>{try{_0x116a8c();}catch{}};_0xd416eb?.[_0x84c327(0x25b)]?.['on']?.(_0x21bf8f[_0x84c327(0x1ad)],_0x4dea58);const _0x4de447=[];if(_0xd416eb?.[_0x84c327(0x25b)]?.['on'])for(const _0x3cbdc0 of _0x629c24){const _0xdb1f71=_0x4bbb54=>{_0x277923({[_0x2f36c8]:_0x331222,'event':_0x3cbdc0,'data':_0x4bbb54??{}});};_0xd416eb[_0x84c327(0x25b)]['on'](_0x3cbdc0,_0xdb1f71),_0x4de447['push']({'event':_0x3cbdc0,'handler':_0xdb1f71});}const _0x5893a9=setInterval(()=>{_0x116a8c(),_0x1a24d0();},_0x551a7d);_0x5893a9[_0x84c327(0x195)]?.();const _0x26d1de=(_0x49eab5,_0x27f351)=>{const _0xec4989=_0x84c327;if(!_0x27f351||typeof _0x27f351!==_0xec4989(0x1f0)||_0x27f351[_0x2f36c8]!==_0x5309fd)return;if(!_0xd416eb?.[_0xec4989(0x314)]?.['ingest'])return;const _0x507573=_0x27f351[_0xec4989(0x13b)]||{};_0xd416eb[_0xec4989(0x314)]['ingest']({..._0x507573,'msg':'[w'+_0x27f351[_0xec4989(0x207)]+']\x20'+(_0x507573[_0xec4989(0x2d1)]??''),'meta':{..._0x507573[_0xec4989(0x276)]||{},'worker':_0x27f351[_0xec4989(0x207)],'workerPid':_0x27f351[_0xec4989(0x1a8)]}});};_0x3406f1['on'](_0x84c327(0x188),_0x26d1de);const _0x151f9e=(_0x1a5885,_0x7fd078)=>{const _0x21e393=_0x84c327;if(!_0x7fd078||typeof _0x7fd078!==_0x21e393(0x1f0)||_0x7fd078[_0x2f36c8]!==_0x57a3dd)return;const _0x2973b3=_0x5493d9['get'](_0x1a5885['process'][_0x21e393(0x1a8)]);if(_0x2973b3){_0x2973b3['stats']={..._0x7fd078[_0x21e393(0x28b)],'at':Date[_0x21e393(0x348)]()};if(_0x7fd078[_0x21e393(0x201)]!==undefined)_0x2973b3['processing']=_0x7fd078[_0x21e393(0x201)];}};_0x3406f1['on'](_0x84c327(0x188),_0x151f9e),_0x3406f1['on'](_0x84c327(0x2c3),(_0xecc9a7,_0x366a8f,_0x512c54)=>{const _0x3fb9f6=_0x84c327,_0x7a4375=_0xecc9a7['process'][_0x3fb9f6(0x1a8)],_0x23363c=_0x58380d(_0xecc9a7),_0x5d5a39=_0x5493d9['get'](_0x7a4375);if(_0x5d5a39&&_0xd416eb?.[_0x3fb9f6(0x340)])_0xd416eb[_0x3fb9f6(0x340)][_0x3fb9f6(0x1ed)](_0x7a4375+':'+_0x5d5a39[_0x3fb9f6(0x19e)])[_0x3fb9f6(0x183)](()=>{});_0x5493d9[_0x3fb9f6(0x23f)](_0x7a4375),console[_0x3fb9f6(0x314)]('[okdb-cluster]\x20worker\x20pid='+_0x7a4375+_0x3fb9f6(0x231)+(_0x23363c??'?')+_0x3fb9f6(0x256)+(_0x3fb9f6(0x2b9)+_0x366a8f+',\x20signal='+(_0x512c54??'none')+_0x3fb9f6(0x2ee)+_0x5493d9[_0x3fb9f6(0x1e8)]+'\x20worker(s)\x20remaining')),_0x1a24d0();if(_0x58c0ae||_0x23363c==null)return;const _0x11265f=_0x1c0b33[_0x3fb9f6(0x1fd)](_0x23363c);if(!_0x11265f||_0x11265f[_0x3fb9f6(0x31f)])return;const _0xb0b60f=Date[_0x3fb9f6(0x348)]();_0x11265f[_0x3fb9f6(0x1a9)][_0x3fb9f6(0x1b4)](_0xb0b60f),_0x11265f[_0x3fb9f6(0x1a9)]=_0x11265f[_0x3fb9f6(0x1a9)][_0x3fb9f6(0x245)](_0x592567=>_0xb0b60f-_0x592567<=_0x2da6a2);if(_0x11265f['deaths']['length']>=_0x4652fb){_0x11265f[_0x3fb9f6(0x31f)]=!![],console['error'](_0x3fb9f6(0x200)+_0x23363c+'\x20died\x20'+_0x11265f['deaths'][_0x3fb9f6(0x149)]+_0x3fb9f6(0x19f)+(_0x2da6a2+_0x3fb9f6(0x23d)+_0x5493d9[_0x3fb9f6(0x1e8)]+'\x20worker(s)\x20still\x20serving'));return;}_0x11265f[_0x3fb9f6(0x251)]++;const _0xd2f0e1=Math[_0x3fb9f6(0x278)](_0x4887e5,_0x5ced5d*0x2**(_0x11265f['consecutiveFailures']-0x1));console[_0x3fb9f6(0x314)](_0x3fb9f6(0x145)+_0x23363c+_0x3fb9f6(0x310)+_0xd2f0e1+_0x3fb9f6(0x273)+_0x11265f[_0x3fb9f6(0x251)]+')'),_0x11265f[_0x3fb9f6(0x1eb)]=setTimeout(()=>{const _0x548aa8=_0x3fb9f6;_0x11265f[_0x548aa8(0x1eb)]=null;if(_0x58c0ae||_0x11265f[_0x548aa8(0x31f)])return;const _0x520418=_0x30e316(_0x23363c);_0x520418[_0x548aa8(0x2ab)]('listening',()=>{const _0xef4de4=_0x548aa8;if(_0x1c0b33[_0xef4de4(0x1fd)](_0x23363c)===_0x11265f)_0x11265f[_0xef4de4(0x251)]=0x0;});},_0xd2f0e1),_0x11265f[_0x3fb9f6(0x1eb)][_0x3fb9f6(0x195)]?.();});const _0x5ea6e4=[..._0x5493d9[_0x84c327(0x202)]()];console[_0x84c327(0x314)](_0x84c327(0x130)+process[_0x84c327(0x1a8)]+_0x84c327(0x2e1)+_0x1ae110+_0x84c327(0x258)+_0x1933ff+':\x20'+('['+_0x5ea6e4[_0x84c327(0x159)](',\x20')+']'));const _0x3f2d90={'_isClusterController':!![],'port':_0x1933ff,'primaryOkdb':_0xd416eb??null,'status'(){const _0x397460=_0x84c327;return{'clustered':!![],'primaryPid':process[_0x397460(0x1a8)],'port':_0x1933ff,'primaryRole':_0xd416eb?.[_0x397460(0x2dc)]??null,'processorPid':null,'supervisorPid':process[_0x397460(0x1a8)],'workers':[..._0x5493d9[_0x397460(0x1c9)]()][_0x397460(0x33e)](({worker:_0x1f664f})=>({'pid':_0x1f664f['process'][_0x397460(0x1a8)],'id':_0x1f664f['id'],'dead':_0x1f664f['isDead']()}))};},async 'close'(){const _0x7539f7=_0x84c327;_0x58c0ae=!![];for(const _0x41acab of _0x1c0b33['values']()){_0x41acab['dead']=!![],_0x41acab['respawnTimer']&&(clearTimeout(_0x41acab[_0x7539f7(0x1eb)]),_0x41acab[_0x7539f7(0x1eb)]=null);}clearInterval(_0x5893a9),_0x3406f1['off']('message',_0x26d1de),_0x3406f1[_0x7539f7(0x1fa)]('message',_0x151f9e),_0xd416eb?.[_0x7539f7(0x25b)]?.[_0x7539f7(0x1fa)]?.(_0x21bf8f[_0x7539f7(0x1ad)],_0x4dea58);if(_0xd416eb?.[_0x7539f7(0x25b)]?.[_0x7539f7(0x1fa)])for(const {event:_0x22f9f1,handler:_0x4feeef}of _0x4de447){try{_0xd416eb[_0x7539f7(0x25b)][_0x7539f7(0x1fa)](_0x22f9f1,_0x4feeef);}catch{}}_0x4de447[_0x7539f7(0x149)]=0x0;const _0x583f92=[..._0x5493d9['values']()]['map'](({worker:_0x3f8406})=>_0x3f8406);if(_0x583f92[_0x7539f7(0x149)]===0x0)return;await Promise[_0x7539f7(0x30b)](_0x583f92[_0x7539f7(0x33e)](_0x55bafb=>new Promise(_0x4198db=>{const _0x61e9f9=_0x7539f7;if(_0x55bafb[_0x61e9f9(0x16e)]()){_0x4198db();return;}let _0x19fd95=![];const _0x2db60e=()=>{if(_0x19fd95)return;_0x19fd95=!![];if(_0x56d94d)clearTimeout(_0x56d94d);_0x4198db();};_0x55bafb[_0x61e9f9(0x2ab)](_0x61e9f9(0x2c3),_0x2db60e);const _0x56d94d=setTimeout(()=>{const _0x1e99cf=_0x61e9f9;try{_0x55bafb[_0x1e99cf(0x1c8)]['kill']();}catch{}},_0x43babd+0x1f4);_0x56d94d[_0x61e9f9(0x195)]?.();try{_0x55bafb[_0x61e9f9(0x2ef)]();}catch{try{_0x55bafb[_0x61e9f9(0x1c8)]['kill']();}catch{}}})));}};return _0x3f2d90;}async function _0x4957d1({makeOkdb:_0x229098,port:_0x2f4161}){const _0x4b5270=_0x17ad02,_0x389f86=await _0x229098();return _0x374111(_0x389f86),_0x389f86[_0x4b5270(0x23e)]['listen'](_0x2f4161);}function _0x374111(_0x1a5bf2){const _0x26609b=_0x17ad02;if(!_0x1a5bf2||_0x1a5bf2[_0x26609b(0x33c)])return;_0x1a5bf2[_0x26609b(0x33c)]=!![];try{const {OKDBChangefeed:_0x57c516}=requireOkdbChangefeed(),_0x37870f=_0x1a5bf2['_adminRelay'];if(_0x37870f&&typeof _0x37870f[_0x26609b(0x2a0)]===_0x26609b(0x1b8)){const _0x54b144=new _0x57c516(_0x1a5bf2);_0x54b144[_0x26609b(0x1e1)](),_0x37870f[_0x26609b(0x2a0)](_0x54b144),_0x1a5bf2[_0x26609b(0x2d7)]=_0x54b144;}}catch(_0x3dded5){_0x1a5bf2[_0x26609b(0x314)]?.[_0x26609b(0x21b)]?.(_0x26609b(0x315)+(_0x3dded5?.['message']??_0x3dded5),{'feature':_0x26609b(0x210)});}const _0x4d9161=_0x2dd6f7=>{const _0x511e7e=_0x26609b;if(!_0x2dd6f7||typeof _0x2dd6f7!==_0x511e7e(0x1f0)||_0x2dd6f7[_0x2f36c8]==null)return;if(_0x2dd6f7[_0x2f36c8]===_0x331222)try{_0x1a5bf2[_0x511e7e(0x21f)]?.[_0x511e7e(0x277)]?.(_0x2dd6f7['event'],_0x2dd6f7['data']);}catch{}};process['on'](_0x26609b(0x188),_0x4d9161),_0x1a5bf2[_0x26609b(0x2ae)]=_0x4d9161;{let _0x37ccb5=process['cpuUsage'](),_0xde2308=Date['now']();const _0x280abc=()=>{const _0x22a1b8=_0x26609b;if(typeof process[_0x22a1b8(0x22d)]!==_0x22a1b8(0x1b8)||!process[_0x22a1b8(0x136)])return;const _0x3c9854=Date[_0x22a1b8(0x348)](),_0x4e60e1=process[_0x22a1b8(0x358)](),_0x3527fc=(_0x3c9854-_0xde2308)*0x3e8,_0x183747=_0x4e60e1['user']-_0x37ccb5[_0x22a1b8(0x252)]+(_0x4e60e1['system']-_0x37ccb5['system']),_0x3cf10d=_0x3527fc>0x0?Math[_0x22a1b8(0x278)](0x64,Math[_0x22a1b8(0x143)](_0x183747/(_0x3527fc*(_0x38f0f9[_0x22a1b8(0x12d)]()[_0x22a1b8(0x149)]||0x1))*0x64)):0x0;_0x37ccb5=_0x4e60e1,_0xde2308=_0x3c9854;const _0x4ce636=process[_0x22a1b8(0x2e2)]();let _0x399315=null;try{_0x399315=_0x1a5bf2[_0x22a1b8(0x2dc)]?.[_0x22a1b8(0x2d3)]?_0x1a5bf2['processes']?.[_0x22a1b8(0x2ff)]?.()??null:null;}catch{}try{process[_0x22a1b8(0x22d)]({[_0x2f36c8]:_0x57a3dd,'stats':{'rss':_0x4ce636[_0x22a1b8(0x2c0)],'heapUsed':_0x4ce636['heapUsed'],'heapTotal':_0x4ce636[_0x22a1b8(0x125)],'external':_0x4ce636[_0x22a1b8(0x1c2)],'cpuPct':_0x3cf10d,'cpuWindowMs':Math['round'](_0x3527fc/0x3e8)||null},'processing':_0x399315});}catch{}},_0x2b8d10=Math[_0x26609b(0x17a)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x20c037=setInterval(_0x280abc,_0x2b8d10);_0x20c037[_0x26609b(0x195)]?.(),_0x280abc();for(const _0x5c0c5e of['processor:paused',_0x26609b(0x1d7)]){_0x1a5bf2[_0x26609b(0x25b)]?.['on']?.(_0x5c0c5e,()=>{try{_0x280abc();}catch{}});}}let _0xe5cde0=![];const _0x29f573=async _0x34bcb9=>{const _0x1c36ab=_0x26609b;if(_0xe5cde0)return;_0xe5cde0=!![];const _0x3be390=setTimeout(()=>process['exit'](_0x34bcb9),_0x43babd);_0x3be390[_0x1c36ab(0x195)]?.();try{await _0x1a5bf2[_0x1c36ab(0x312)]?.();}catch{}process[_0x1c36ab(0x2c3)](_0x34bcb9);};process['on'](_0x26609b(0x2ef),()=>_0x29f573(0x0));if(process[_0x26609b(0x32f)]!==_0x26609b(0x246)){const _0x354ff9=setInterval(()=>{const _0x36475d=_0x26609b;if(process[_0x36475d(0x2f3)]===0x1)_0x29f573(0x0);},_0x1a1558);_0x354ff9[_0x26609b(0x195)]?.(),_0x1a5bf2['_clusterOrphanWatch']=_0x354ff9;}}return okdbCluster={'runClustered':_0x58d000,'attachWorkerCluster':_0x374111},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0xaee61=_0x337619;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x4fb85d=require$$0$5,{attachWorkerCluster:_0x3a5458}=requireOkdbCluster();async function _0x400944(){const _0x2934e5=_0x58e7,_0x4a10d0=process.env.OKDB_HTTP_CHILD;if(!_0x4a10d0)throw new Error(_0x2934e5(0x1b5));const {rootPath:_0x4f97a4,port:_0x1a1525,options:options={},logLevel:logLevel=_0x2934e5(0x132)}=JSON[_0x2934e5(0x357)](_0x4a10d0);if(!_0x4f97a4||!_0x1a1525)throw new Error(_0x2934e5(0x2ce));const _0x29c4b3=new _0x4fb85d(_0x4f97a4,{...options,'engines':![],'processors':![],'compaction':![]});_0x29c4b3[_0x2934e5(0x314)]['detachConsole']?.();const _0xac07a2=process.env.OKDB_CLUSTER_SLOT??'?',_0x471fd2={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x1c5b3e=_0x471fd2[logLevel]??_0x471fd2[_0x2934e5(0x132)];_0x29c4b3[_0x2934e5(0x314)][_0x2934e5(0x147)](_0xdcf1f2=>{const _0x57c010=_0x2934e5;if((_0x471fd2[_0xdcf1f2['level']]??0x1)<_0x1c5b3e)return;try{process[_0x57c010(0x22d)]?.({'__okdbCluster':_0x57c010(0x314),'slot':_0xac07a2,'pid':process[_0x57c010(0x1a8)],'entry':_0xdcf1f2});}catch{}}),await _0x29c4b3[_0x2934e5(0x28e)](),_0x3a5458(_0x29c4b3),await _0x29c4b3[_0x2934e5(0x23e)]['listen'](_0x1a1525);}return _0x400944()[_0xaee61(0x183)](_0x53b45d=>{const _0x44da2d=_0xaee61;try{process[_0x44da2d(0x22d)]?.({'__okdbCluster':_0x44da2d(0x314),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x44da2d(0x1a8)],'entry':{'level':_0x44da2d(0x2c5),'msg':_0x44da2d(0x2fd)+(_0x53b45d?.[_0x44da2d(0x188)]??_0x53b45d)}});}catch{}process['exit'](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);function _0x58e7(_0x6ec921,_0x2719d9){_0x6ec921=_0x6ec921-0x123;const _0x140067=_0x1400();let _0x58e7ac=_0x140067[_0x6ec921];return _0x58e7ac;}module[_0x337619(0x2c1)]=okdbHttpWorkerChild;
1
+ 'use strict';function _0x5e6c(_0x241df7,_0x3d3c2c){_0x241df7=_0x241df7-0x163;const _0x7d069e=_0x7d06();let _0x5e6cec=_0x7d069e[_0x241df7];return _0x5e6cec;}const _0x37b856=_0x5e6c;(function(_0x54eb52,_0x99b820){const _0x37001e=_0x5e6c,_0x338129=_0x54eb52();while(!![]){try{const _0x505e73=-parseInt(_0x37001e(0x16a))/0x1*(parseInt(_0x37001e(0x1bd))/0x2)+parseInt(_0x37001e(0x2ca))/0x3+-parseInt(_0x37001e(0x164))/0x4+-parseInt(_0x37001e(0x2a2))/0x5*(-parseInt(_0x37001e(0x23f))/0x6)+parseInt(_0x37001e(0x21e))/0x7+parseInt(_0x37001e(0x34a))/0x8*(-parseInt(_0x37001e(0x252))/0x9)+-parseInt(_0x37001e(0x301))/0xa*(-parseInt(_0x37001e(0x22e))/0xb);if(_0x505e73===_0x99b820)break;else _0x338129['push'](_0x338129['shift']());}catch(_0xabe90e){_0x338129['push'](_0x338129['shift']());}}}(_0x7d06,0x74606));var require$$0$5=require(_0x37b856(0x206)),require$$1$1=require(_0x37b856(0x31d)),require$$1=require(_0x37b856(0x291)),require$$0$3=require('os'),require$$2=require(_0x37b856(0x2e1)),require$$0=require(_0x37b856(0x190)),require$$0$2=require('perf_hooks'),require$$0$1=require('fs'),require$$0$4=require(_0x37b856(0x396));function getDefaultExportFromCjs(_0x1a47e9){const _0x3e6b57=_0x37b856;return _0x1a47e9&&_0x1a47e9[_0x3e6b57(0x384)]&&Object[_0x3e6b57(0x34b)][_0x3e6b57(0x239)]['call'](_0x1a47e9,'default')?_0x1a47e9[_0x3e6b57(0x2a1)]:_0x1a47e9;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x57ddda=_0x37b856;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x7aef76={'PUT':_0x57ddda(0x25d),'REMOVE':'remove','INDEX_DROP':_0x57ddda(0x381),'INDEX_REGISTER':_0x57ddda(0x338),'INDEX_RESET':'resetIndex','TYPE_REGISTER':_0x57ddda(0x32a),'TYPE_DROP':_0x57ddda(0x279),'FTS_REGISTER':_0x57ddda(0x24b),'FTS_DROP':_0x57ddda(0x1e8),'FTS_RESET':_0x57ddda(0x26f),'SCHEMA_SET':_0x57ddda(0x2fa),'SCHEMA_DROP':_0x57ddda(0x1a6),'TTL_SET':'setTtl','TTL_CLEAR':_0x57ddda(0x315)},_0x43bf74={'SYSTEM_READY':'system:ready','SYSTEM_STOPPED':_0x57ddda(0x2b3),'SYSTEM_CLOCK_CHANGE':_0x57ddda(0x236),'SYSTEM_POKE':_0x57ddda(0x1e6),'SYSTEM_DRAIN':_0x57ddda(0x28e),'SYSTEM_TYPE_DROP':_0x57ddda(0x25e),'SYSTEM_PROC':_0x57ddda(0x30c),'SYSTEM_BUS_STATE_CHANGE':_0x57ddda(0x2e2),'ITEM_CREATE':_0x57ddda(0x2fd),'ITEM_UPDATE':'item:update','ITEM_REMOVE':_0x57ddda(0x358),'INDEX_RESET':'index:reset','INDEX_READY':'index:ready','INDEX_PROGRESS':_0x57ddda(0x177),'VIEW_PROGRESS':_0x57ddda(0x243),'INDEX_DROP':_0x57ddda(0x281),'INDEX_REGISTERED':'index:registered','FTS_REGISTERED':_0x57ddda(0x2e9),'FTS_DROP':'fts:drop','FTS_RESET':'fts:reset','SCHEMA_SET':'schema:set','SCHEMA_DROP':_0x57ddda(0x17e),'UNIQUE_VIOLATION':_0x57ddda(0x1ba),'UNIQUE_VIOLATION_RESOLVED':_0x57ddda(0x20c),'REF_VIOLATION':_0x57ddda(0x226),'REF_VIOLATION_RESOLVED':_0x57ddda(0x196),'SYNC_APPLY':_0x57ddda(0x2bd),'TXN_START':_0x57ddda(0x272),'TXN_END':_0x57ddda(0x21d),'TXN_ROLLBACK':_0x57ddda(0x354),'TYPE_REGISTERED':_0x57ddda(0x2d2),'TYPE_DROP':_0x57ddda(0x37a),'ENV_OPENED':'env:opened','ENV_REMOVED':_0x57ddda(0x1dc),'SYSTEM_ENV_RELEASE':_0x57ddda(0x251),'TTL_EXPIRED':_0x57ddda(0x35b),'TTL_SET':_0x57ddda(0x308),'TTL_CLEAR':_0x57ddda(0x2ff),'LICENSE_INVALID':_0x57ddda(0x391),'LICENSE_ADDED':_0x57ddda(0x35d),'LICENSE_ACTIVATED':_0x57ddda(0x36e),'LICENSE_REMOVED':_0x57ddda(0x1fb)},_0x344b0f={'CREATING':'creating','RESETTING':_0x57ddda(0x1c2),'READY':_0x57ddda(0x180),'DROPPING':_0x57ddda(0x38e),'WAITING':_0x57ddda(0x18a)},_0x4f9e3e={'CREATED':_0x57ddda(0x389),'STARTING':'starting','STARTED':_0x57ddda(0x35c),'STOPPING':'stopping','STOPPED':_0x57ddda(0x2d7)},_0x35d611={'CREATING':_0x57ddda(0x361),'READY':_0x57ddda(0x180),'HALTED':'halted','STOPPED':_0x57ddda(0x2d7),'RESETTING':_0x57ddda(0x1c2)},_0x7a3d41=Object[_0x57ddda(0x332)]({'POKE':_0x57ddda(0x2de),'DRAIN':_0x57ddda(0x33d),'TYPE_DROP':'bus:type_drop','PROC':_0x57ddda(0x2a0),'ENV_RELEASE':'bus:env_release'});return okdbEnums={'BUS_EVENTS':_0x7a3d41,'CHANGE_ACTIONS':_0x7aef76,'EVENTS':_0x43bf74,'INDEX_STATE':_0x344b0f,'OKDB_STATE':_0x4f9e3e,'VIEW_STATE':_0x35d611},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x34608e=_0x37b856;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x57c551,performance:_0x468338}=require$$0,_0x4a41a2=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x34608e(0x2b8),_0x4611f1=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x672ed4=process.env.OKDB_LOOP_LAG_ALL==='1',_0x5d778c=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x374f2d{constructor(){const _0x367b86=_0x34608e;this['enabled']=_0x4a41a2,this[_0x367b86(0x32d)]=new Map(),this['_h']=null,this[_0x367b86(0x2c0)]=null,this[_0x367b86(0x2ea)]=![],this[_0x367b86(0x1d2)]=(_0x58dedb,_0xdbf3ca)=>process[_0x367b86(0x1b9)][_0x367b86(0x25a)](_0x58dedb+(_0xdbf3ca?'\x20'+JSON['stringify'](_0xdbf3ca):'')+'\x0a');}[_0x34608e(0x309)](){const _0x591b1d=_0x34608e;return _0x468338[_0x591b1d(0x309)]();}[_0x34608e(0x17f)](_0x5b9a2a){if(typeof _0x5b9a2a==='function')this['_log']=_0x5b9a2a;}[_0x34608e(0x1bf)](_0x43accc,_0x5df42e,_0x3a72cd){const _0x56c2ba=_0x34608e;if(!this['enabled'])return;let _0x2474f6=this[_0x56c2ba(0x32d)][_0x56c2ba(0x2d9)](_0x43accc);!_0x2474f6&&(_0x2474f6={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x56c2ba(0x32d)]['set'](_0x43accc,_0x2474f6)),_0x2474f6['ms']+=_0x5df42e,_0x2474f6['count']+=0x1,_0x5df42e>_0x2474f6[_0x56c2ba(0x349)]&&(_0x2474f6['maxMs']=_0x5df42e,_0x2474f6['maxExtra']=_0x3a72cd||'');}['start'](_0x4d70c6){const _0x5ed103=_0x34608e;if(!this['enabled']||this[_0x5ed103(0x2ea)])return;this['_started']=!![];if(_0x4d70c6)this[_0x5ed103(0x1d2)]=_0x4d70c6;this['_h']=_0x57c551({'resolution':0xa}),this['_h'][_0x5ed103(0x25c)](),this['_timer']=setInterval(()=>this['_report'](),_0x4611f1);if(this['_timer']['unref'])this[_0x5ed103(0x2c0)][_0x5ed103(0x38b)]();}[_0x34608e(0x2eb)](_0x49295a){const _0x54c951=_0x34608e;if(!this['_windowCbs'])this['_windowCbs']=new Set();this[_0x54c951(0x254)][_0x54c951(0x23c)](_0x49295a);if(!this[_0x54c951(0x2ea)])this['_startAdmission']();}[_0x34608e(0x172)](_0x55aeaf){const _0x2b0968=_0x34608e;this[_0x2b0968(0x254)]?.[_0x2b0968(0x18b)](_0x55aeaf);}[_0x34608e(0x205)](){const _0x43b80a=_0x34608e;if(this[_0x43b80a(0x2f0)])return;this['_admissionStarted']=!![];!this['_h']&&(this['_h']=_0x57c551({'resolution':0xa}),this['_h'][_0x43b80a(0x25c)]());const _0x5d66d0=_0x4611f1;this[_0x43b80a(0x357)]=setInterval(()=>{const _0x4370c0=_0x43b80a,_0x1cf234=this['_h'];if(!_0x1cf234)return;const _0x308f80=_0x1cf234[_0x4370c0(0x277)](0x63)/0xf4240,_0x4fa44d=_0x1cf234[_0x4370c0(0x1b4)]/0xf4240,_0x15ec2a=_0x1cf234[_0x4370c0(0x34c)]/0xf4240;_0x1cf234[_0x4370c0(0x1f3)]();if(this[_0x4370c0(0x254)])for(const _0x58bdbc of this[_0x4370c0(0x254)]){try{_0x58bdbc({'p99Ms':_0x308f80,'maxMs':_0x4fa44d,'meanMs':_0x15ec2a,'reportMs':_0x5d66d0});}catch{}}},_0x5d66d0);if(this[_0x43b80a(0x357)]['unref'])this[_0x43b80a(0x357)][_0x43b80a(0x38b)]();}[_0x34608e(0x217)](){const _0x56f118=_0x34608e,_0x305110=this['_h'],_0x488101=_0x305110[_0x56f118(0x1b4)]/0xf4240,_0x69b06e=_0x305110['percentile'](0x63)/0xf4240,_0x4bcdfa=_0x305110[_0x56f118(0x34c)]/0xf4240;_0x305110[_0x56f118(0x1f3)]();const _0x5f4ead=[...this['_buckets'][_0x56f118(0x2f1)]()]['map'](([_0x4106ed,_0x1029ef])=>({'label':_0x4106ed,..._0x1029ef}))[_0x56f118(0x25b)]((_0x2e888e,_0x6ddc9)=>_0x6ddc9['ms']-_0x2e888e['ms'])[_0x56f118(0x26d)](0x0,0x8);this[_0x56f118(0x32d)][_0x56f118(0x1c7)]();const _0x3f84ef=_0x5f4ead[_0x56f118(0x16d)]((_0x46cc93,_0x3a50ae)=>_0x46cc93+_0x3a50ae['ms'],0x0),_0x52d7d=_0x5f4ead[_0x56f118(0x2b2)](_0x1ad017=>_0x1ad017[_0x56f118(0x36c)]+'='+_0x1ad017['ms'][_0x56f118(0x19b)](0x0)+_0x56f118(0x29c)+_0x1ad017['count']+(_0x1ad017[_0x56f118(0x349)]>0x5?_0x56f118(0x17c)+_0x1ad017[_0x56f118(0x349)][_0x56f118(0x19b)](0x0)+'ms'+(_0x1ad017[_0x56f118(0x302)]?'\x20'+_0x1ad017[_0x56f118(0x302)]:'')+')':''));(_0x672ed4||_0x488101>=_0x5d778c)&&this[_0x56f118(0x1d2)]('loop-lag\x20'+_0x4611f1+'ms\x20max='+_0x488101[_0x56f118(0x19b)](0x0)+_0x56f118(0x346)+_0x69b06e[_0x56f118(0x19b)](0x0)+_0x56f118(0x249)+_0x4bcdfa[_0x56f118(0x19b)](0x0)+_0x56f118(0x225)+_0x3f84ef['toFixed'](0x0)+'ms'+(_0x52d7d[_0x56f118(0x330)]?_0x56f118(0x297)+_0x52d7d[_0x56f118(0x280)]('\x20\x20'):''),{'feature':'loop-lag'});if(this[_0x56f118(0x254)])for(const _0x4b811c of this['_windowCbs']){try{_0x4b811c({'p99Ms':_0x69b06e,'maxMs':_0x488101,'meanMs':_0x4bcdfa,'reportMs':_0x4611f1});}catch{}}}[_0x34608e(0x294)](){const _0x3c7ffd=_0x34608e;if(this[_0x3c7ffd(0x2c0)])clearInterval(this['_timer']);if(this['_h'])this['_h'][_0x3c7ffd(0x18d)]();this[_0x3c7ffd(0x2c0)]=null,this['_h']=null,this[_0x3c7ffd(0x2ea)]=![];}}const _0x59ec1d=new _0x374f2d();if(_0x59ec1d[_0x34608e(0x1d8)])_0x59ec1d[_0x34608e(0x2c5)]();return okdbLoopMonitor={'LOOP':_0x59ec1d},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x44b11f=require$$0$1,_0x49fed4=require$$1;let _0x193dd0,_0x423dd9,_0x1c11cb,_0x414559,_0x6ba238,_0x5c2ca0,_0x144a8a,_0x4f3711=![];const _0x511f13=new Set();let _0x526c89=null;const _0x8f176b=new Map();function _0x21f4d6(){const _0x118dd1=_0x5e6c;if(_0x193dd0!==undefined)return _0x193dd0;_0x193dd0=process.env.OKDB_DIAG==='1';if(!_0x193dd0)return![];_0x423dd9=process.env.OKDB_DIAG_STACK==='1',_0x414559=Math[_0x118dd1(0x1b4)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x1c11cb=new Array(_0x414559),_0x6ba238=0x0,_0x5c2ca0=0x0,_0x144a8a=process.env.OKDB_DIAG_DIR||null;if(_0x144a8a)try{_0x44b11f[_0x118dd1(0x2dd)](_0x144a8a,{'recursive':!![]});}catch{}return!![];}function _0x556509(){return _0x193dd0===undefined?_0x21f4d6():_0x193dd0;}function _0x49ca18(_0x477bf1,_0x521b57){const _0x4b989c=_0x5e6c;if(_0x193dd0===undefined?!_0x21f4d6():!_0x193dd0)return;let _0xeb322f;if(_0x423dd9){const _0x4b8b7c=new Error()[_0x4b989c(0x26b)]||'';_0xeb322f=_0x4b8b7c['split']('\x0a')[_0x4b989c(0x26d)](0x3)[_0x4b989c(0x2b2)](_0x1f6524=>_0x1f6524[_0x4b989c(0x199)]())[_0x4b989c(0x255)](Boolean)['slice'](0x0,0x8);}_0x1c11cb[_0x6ba238]={'seq':_0x5c2ca0++,'t':Date[_0x4b989c(0x309)](),'env':_0x477bf1,'kind':_0x521b57||_0x4b989c(0x20b),'stack':_0xeb322f},_0x6ba238=(_0x6ba238+0x1)%_0x414559;}function _0x3938ad(_0x529aa5){const _0x296bb7=_0x5e6c,_0x1484a2=[];for(let _0x3050aa=0x0;_0x3050aa<_0x414559;_0x3050aa++){const _0x5b1306=_0x1c11cb[(_0x6ba238-0x1-_0x3050aa+_0x414559*0x2)%_0x414559];if(!_0x5b1306)continue;_0x1484a2[_0x296bb7(0x31c)](_0x5b1306);if(_0x1484a2['length']>=_0x529aa5)break;}return _0x1484a2;}function _0x51283a(_0x922120){const _0x4e0d0f=_0x5e6c;try{process[_0x4e0d0f(0x1b9)][_0x4e0d0f(0x25a)](_0x922120+'\x0a');}catch{}if(_0x144a8a)try{_0x44b11f[_0x4e0d0f(0x2f8)](_0x49fed4['join'](_0x144a8a,'okdb-diag.'+process[_0x4e0d0f(0x174)]+'.log'),_0x922120+'\x0a');}catch{}}function _0x56fb46(_0x3e2d21){const _0x4b072e=_0x5e6c,_0x3fb05f=_0x3938ad(_0x3e2d21);if(!_0x3fb05f[_0x4b072e(0x330)])return _0x4b072e(0x393);const _0x68c074=Date[_0x4b072e(0x309)]();return _0x3fb05f[_0x4b072e(0x2b2)](_0x4451b1=>{const _0x2e208d=_0x4b072e,_0x2e0d7e='\x20\x20#'+_0x4451b1['seq']+'\x20-'+(_0x68c074-_0x4451b1['t'])+_0x2e208d(0x22f)+_0x4451b1[_0x2e208d(0x377)]+'\x20'+_0x4451b1[_0x2e208d(0x341)];return _0x4451b1[_0x2e208d(0x26b)]&&_0x4451b1[_0x2e208d(0x26b)][_0x2e208d(0x330)]?_0x2e0d7e+_0x2e208d(0x2ce)+_0x4451b1[_0x2e208d(0x26b)][_0x2e208d(0x280)]('\x0a\x20\x20\x20\x20\x20\x20'):_0x2e0d7e;})[_0x4b072e(0x280)]('\x0a');}function _0x78e000(_0x50148e,_0xb84476){const _0x11a169=_0x5e6c,_0x7a4bef=_0x11a169(0x324)+_0x50148e+_0x11a169(0x286)+new Date()[_0x11a169(0x285)]()+_0x11a169(0x2f3)+process[_0x11a169(0x174)]+_0x11a169(0x233),_0x5e2d23=[_0x7a4bef,_0x11a169(0x351)+(_0xb84476&&_0xb84476[_0x11a169(0x26b)]?_0xb84476['stack'][_0x11a169(0x321)]('\x0a')[0x0]:_0xb84476),_0x11a169(0x322)+(_0x423dd9?'':_0x11a169(0x366))+':',_0x56fb46(0x18),_0x4df24b(),'='['repeat'](_0x7a4bef[_0x11a169(0x330)]-0x1)];_0x51283a(_0x5e2d23['join']('\x0a'));}function _0x1d737c(_0x591698){const _0x5bb78a=_0x5e6c;if(!_0x556509())return;const _0x408c1d=String(_0x591698&&_0x591698['message']||_0x591698||''),_0x583941=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x5bb78a(0x36d)](_0x408c1d);_0x78e000(_0x583941?_0x5bb78a(0x369):'uncaughtException',_0x591698);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x583941)return;try{console[_0x5bb78a(0x326)](_0x591698&&_0x591698[_0x5bb78a(0x26b)]?_0x591698[_0x5bb78a(0x26b)]:_0x591698);}catch{}process[_0x5bb78a(0x382)](0x1);}function _0x5e8a15(_0x39d0df){const _0x30b717=_0x5e6c;if(!_0x556509())return;const _0x4b5b3c=String(_0x39d0df&&_0x39d0df[_0x30b717(0x16c)]||_0x39d0df||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x30b717(0x36d)](_0x4b5b3c)&&_0x78e000(_0x30b717(0x1db),_0x39d0df);}function _0x4df24b(){const _0x1fe731=_0x5e6c,_0x1ad4fa=[_0x1fe731(0x1e0)];let _0x224e06=![];for(const _0x3f9995 of _0x511f13){const _0x53b1c2=_0x3f9995&&_0x3f9995[_0x1fe731(0x238)];if(!_0x53b1c2)continue;for(const [_0x15c0bc,_0x3c015b]of _0x53b1c2){const _0x507a0f=_0x3c015b&&_0x3c015b[_0x1fe731(0x317)]&&_0x3c015b[_0x1fe731(0x317)]['view'];if(!_0x507a0f)continue;let _0x5c854b,_0x4b4dce;try{_0x5c854b=Atomics[_0x1fe731(0x260)](_0x507a0f,0x0),_0x4b4dce=Atomics['load'](_0x507a0f,0x1);}catch{continue;}if(_0x5c854b===0x0)continue;_0x224e06=!![];const _0x7a9bac=_0x5c854b>0x0?_0x1fe731(0x2c6):_0x1fe731(0x333),_0x4a085c=Date['now']()-Math[_0x1fe731(0x215)](_0x5c854b)*0x3e8,_0x52f7cb=((()=>{const _0x256694=_0x1fe731;try{return _0x3c015b['_writer']&&_0x3c015b['_writer'][_0x256694(0x319)]?_0x3c015b[_0x256694(0x179)]['status']():null;}catch{return null;}})());_0x1ad4fa[_0x1fe731(0x31c)]('\x20\x20env='+_0x15c0bc+_0x1fe731(0x1fa)+_0x7a9bac+_0x1fe731(0x278)+_0x4a085c+_0x1fe731(0x1dd)+_0x4b4dce+(_0x52f7cb?'\x20writer{depth='+_0x52f7cb[_0x1fe731(0x24a)]+_0x1fe731(0x231)+_0x52f7cb['oldestPendingMs']+_0x1fe731(0x22c)+_0x52f7cb[_0x1fe731(0x323)]+'}':''));}}if(!_0x224e06)_0x1ad4fa[_0x1fe731(0x31c)]('\x20\x20(no\x20env\x20draining)');return _0x1ad4fa[_0x1fe731(0x280)]('\x0a');}function _0x3db488(){const _0x3f85b0=_0x5e6c;if(!_0x556509())return;const _0x2a342e=Math[_0x3f85b0(0x1b4)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x11f518=Date[_0x3f85b0(0x309)]();for(const _0x1454e2 of _0x511f13){const _0x53705c=_0x1454e2&&_0x1454e2[_0x3f85b0(0x238)];if(!_0x53705c)continue;for(const [_0xbb6da6,_0x522bef]of _0x53705c){const _0xd29ce5=_0x522bef&&_0x522bef['_coordinator']&&_0x522bef[_0x3f85b0(0x317)][_0x3f85b0(0x38d)];if(!_0xd29ce5)continue;let _0x27ac89;try{_0x27ac89=Atomics[_0x3f85b0(0x260)](_0xd29ce5,0x0);}catch{continue;}const _0x1dbee3=_0x1454e2['path']+'|'+_0xbb6da6;if(_0x27ac89<=0x0){_0x8f176b[_0x3f85b0(0x18b)](_0x1dbee3);continue;}const _0x43af8e=_0x11f518-_0x27ac89*0x3e8,_0x26dfd0=_0x8f176b[_0x3f85b0(0x2d9)](_0x1dbee3);if(_0x43af8e<_0x2a342e)continue;if(_0x26dfd0&&_0x11f518-_0x26dfd0[_0x3f85b0(0x2f7)]<_0x2a342e)continue;_0x8f176b['set'](_0x1dbee3,{'firstTs':_0x26dfd0?_0x26dfd0['firstTs']:_0x27ac89,'dumpedAt':_0x11f518});const _0x2f16a1=_0x3f85b0(0x37e)+_0x43af8e+_0x3f85b0(0x216)+_0xbb6da6+_0x3f85b0(0x286)+new Date()['toISOString']()+'\x20pid='+process['pid']+_0x3f85b0(0x233);_0x51283a([_0x2f16a1,_0x4df24b(),'='[_0x3f85b0(0x365)](_0x2f16a1[_0x3f85b0(0x330)]-0x1)][_0x3f85b0(0x280)]('\x0a'));}}}function _0x2d09d2(){const _0x2e83c0=_0x5e6c;if(!_0x556509()||_0x4f3711)return;_0x4f3711=!![],process['prependListener'](_0x2e83c0(0x299),_0x1d737c),process[_0x2e83c0(0x165)](_0x2e83c0(0x20d),_0x5e8a15);const _0x527b14=Math['max'](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x526c89=setInterval(_0x3db488,_0x527b14);if(_0x526c89[_0x2e83c0(0x38b)])_0x526c89['unref']();}function _0x5c8da7(_0x870d27){const _0x3fd057=_0x5e6c;if(!_0x556509()||!_0x870d27)return;_0x511f13[_0x3fd057(0x23c)](_0x870d27),_0x2d09d2();}function _0x29be90(_0x465619){_0x511f13['delete'](_0x465619);}function _0x4a3f26(){const _0x38327e=_0x5e6c;if(!_0x556509())return{'enabled':![],'hint':_0x38327e(0x268)};return{'enabled':!![],'stackCapture':!!_0x423dd9,'recentWrites':_0x3938ad(0x10),'drain':_0x4df24b()};}return okdbDiag={'isEnabled':_0x556509,'recordWrite':_0x49ca18,'installDiag':_0x2d09d2,'registerOkdb':_0x5c8da7,'unregisterOkdb':_0x29be90,'snapshot':_0x4a3f26},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x3068cd=_0x37b856;if(hasRequiredOkdbWriter)return okdbWriter[_0x3068cd(0x1df)];hasRequiredOkdbWriter=0x1;const {performance:_0xbbd563}=require$$0$2,_0x383fcd=requireOkdbDiag(),_0x534a0d=process.env.OKDB_COMMIT_MODE===_0x3068cd(0x328);class _0x3e857e{constructor(_0x26f0be){const _0x2067c8=_0x3068cd;this[_0x2067c8(0x377)]=_0x26f0be,this[_0x2067c8(0x337)]=new Set(),this[_0x2067c8(0x2ae)]=new Map(),this[_0x2067c8(0x27c)]=0x0,this[_0x2067c8(0x192)]=[],this[_0x2067c8(0x31a)]=[],this[_0x2067c8(0x186)]=Math[_0x2067c8(0x1b4)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this['_outstanding']=0x0,this[_0x2067c8(0x2a4)]=[],this[_0x2067c8(0x2a8)]=0x0;}async[_0x3068cd(0x2a3)](_0xd053f4,_0x55f441){const _0x13cd9f=_0x3068cd;if(_0x383fcd[_0x13cd9f(0x1aa)]())_0x383fcd['recordWrite'](this['env']?.['name'],_0x55f441);if(this[_0x13cd9f(0x313)]){const _0x8bbc3e=new Error(_0x13cd9f(0x220));_0x8bbc3e[_0x13cd9f(0x2cf)]=_0x13cd9f(0x34f);throw _0x8bbc3e;}if(this['_highWater']>0x0){let _0x2a35ce=![];while(this[_0x13cd9f(0x166)]>=this['_highWater']&&!this[_0x13cd9f(0x313)]){!_0x2a35ce&&(_0x2a35ce=!![],this[_0x13cd9f(0x2a8)]++),await new Promise(_0x371d48=>this[_0x13cd9f(0x2a4)][_0x13cd9f(0x31c)](_0x371d48));}if(this[_0x13cd9f(0x313)]){const _0x51e93c=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x51e93c[_0x13cd9f(0x2cf)]=_0x13cd9f(0x34f);throw _0x51e93c;}}this[_0x13cd9f(0x166)]++;const _0x13c627=this[_0x13cd9f(0x377)][_0x13cd9f(0x317)];if(_0x13c627)await _0x13c627[_0x13cd9f(0x292)]();if(this[_0x13cd9f(0x313)]){if(_0x13c627)_0x13c627['afterWrite']();this[_0x13cd9f(0x166)]--;if(this[_0x13cd9f(0x2a4)][_0x13cd9f(0x330)]&&this[_0x13cd9f(0x166)]<this[_0x13cd9f(0x186)])this[_0x13cd9f(0x2a4)][_0x13cd9f(0x2ab)]()();const _0xa7b1e9=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0xa7b1e9[_0x13cd9f(0x2cf)]=_0x13cd9f(0x34f);throw _0xa7b1e9;}const _0x2757a2=_0xbbd563['now']();if(_0x534a0d)try{const _0x1601f1=this[_0x13cd9f(0x377)]['db'][_0x13cd9f(0x27b)](_0xd053f4);this[_0x13cd9f(0x27c)]++;if(this['_durs']['push'](_0xbbd563['now']()-_0x2757a2)>0x100)this[_0x13cd9f(0x192)]['shift']();if(this['_done'][_0x13cd9f(0x31c)](_0xbbd563[_0x13cd9f(0x309)]())>0x800)this[_0x13cd9f(0x31a)]['shift']();return _0x1601f1;}finally{this[_0x13cd9f(0x166)]--;if(this[_0x13cd9f(0x2a4)]['length']&&this['_outstanding']<this['_highWater'])this[_0x13cd9f(0x2a4)][_0x13cd9f(0x2ab)]()();if(_0x13c627)_0x13c627['afterWrite']();}const _0xe717c4=this[_0x13cd9f(0x377)]['db'][_0x13cd9f(0x270)](_0xd053f4);this[_0x13cd9f(0x337)][_0x13cd9f(0x23c)](_0xe717c4),this['_enqueuedAt'][_0x13cd9f(0x335)](_0xe717c4,_0x2757a2);const _0x168bb3=()=>{const _0x220d5d=_0x13cd9f;this[_0x220d5d(0x337)][_0x220d5d(0x18b)](_0xe717c4),this['_enqueuedAt']['delete'](_0xe717c4),this[_0x220d5d(0x27c)]++,this[_0x220d5d(0x166)]--;this[_0x220d5d(0x2a4)]['length']&&this[_0x220d5d(0x166)]<this[_0x220d5d(0x186)]&&this[_0x220d5d(0x2a4)][_0x220d5d(0x2ab)]()();if(this['_durs']['push'](_0xbbd563[_0x220d5d(0x309)]()-_0x2757a2)>0x100)this[_0x220d5d(0x192)][_0x220d5d(0x2ab)]();if(this[_0x220d5d(0x31a)][_0x220d5d(0x31c)](_0xbbd563[_0x220d5d(0x309)]())>0x800)this[_0x220d5d(0x31a)][_0x220d5d(0x2ab)]();};_0xe717c4[_0x13cd9f(0x373)](_0x168bb3,_0x168bb3);try{return await _0xe717c4;}finally{if(_0x13c627)_0x13c627[_0x13cd9f(0x31e)]();}}[_0x3068cd(0x319)](){const _0x4ec026=_0x3068cd,_0xcf427c=_0xbbd563[_0x4ec026(0x309)]();let _0x2329f1=0x0;for(const _0x3d34a9 of this[_0x4ec026(0x2ae)][_0x4ec026(0x344)]()){const _0x4878b2=_0xcf427c-_0x3d34a9;if(_0x4878b2>_0x2329f1)_0x2329f1=_0x4878b2;}let _0x26aded=0x0;for(let _0x589e50=this[_0x4ec026(0x31a)][_0x4ec026(0x330)]-0x1;_0x589e50>=0x0;_0x589e50--){if(_0xcf427c-this[_0x4ec026(0x31a)][_0x589e50]>0x3e8)break;_0x26aded++;}let _0x53acaf=0x0;if(this[_0x4ec026(0x192)][_0x4ec026(0x330)]){const _0x229772=[...this['_durs']][_0x4ec026(0x25b)]((_0x25ee47,_0x4ab352)=>_0x25ee47-_0x4ab352);_0x53acaf=_0x229772[Math[_0x4ec026(0x1e4)](_0x229772[_0x4ec026(0x330)]-0x1,Math[_0x4ec026(0x2db)](_0x229772[_0x4ec026(0x330)]*0.99))];}return{'depth':this[_0x4ec026(0x337)][_0x4ec026(0x33c)],'oldestPendingMs':Math[_0x4ec026(0x2aa)](_0x2329f1),'committed':this[_0x4ec026(0x27c)],'commitsPerSec':_0x26aded,'commitP99Ms':Math['round'](_0x53acaf),'parkedNow':this[_0x4ec026(0x2a4)][_0x4ec026(0x330)],'parkedTotal':this[_0x4ec026(0x2a8)],'highWater':this[_0x4ec026(0x186)]};}[_0x3068cd(0x1bb)](){const _0x25a7b0=_0x3068cd,_0x2b91d0=_0xbbd563[_0x25a7b0(0x309)]();return[...this[_0x25a7b0(0x2ae)]['values']()][_0x25a7b0(0x2b2)](_0x5622ae=>Math['round'](_0x2b91d0-_0x5622ae))['sort']((_0x41338f,_0x4fcde6)=>_0x4fcde6-_0x41338f);}[_0x3068cd(0x32c)](){const _0x592973=_0x3068cd;this['_closed']=!![];for(const _0x5ddd45 of this[_0x592973(0x2a4)]['splice'](0x0))_0x5ddd45();}async[_0x3068cd(0x1a0)](){const _0x10d025=_0x3068cd;let _0x268e95=0x0;while(this[_0x10d025(0x337)][_0x10d025(0x33c)]&&_0x268e95++<0x3e8){await Promise[_0x10d025(0x1a8)]([...this[_0x10d025(0x337)]]);}}async[_0x3068cd(0x25d)](_0x16f715,_0x334f22,_0x5c5988,_0xe56cbb){const _0x2a725c=_0x3068cd;return this[_0x2a725c(0x2a3)](()=>{const _0x1b0280=_0x2a725c;if(_0xe56cbb===undefined)_0x16f715['putSync'](_0x334f22,_0x5c5988);else _0x16f715[_0x1b0280(0x1b8)](_0x334f22,_0x5c5988,_0xe56cbb);},'raw-put');}async['remove'](_0x503859,_0x5d0287){const _0x3bcafa=_0x3068cd;return this[_0x3bcafa(0x2a3)](()=>_0x503859[_0x3bcafa(0x1d6)](_0x5d0287),_0x3bcafa(0x2ee));}}async function _0x4b002b(_0x3910df,_0x1a3d7e){const _0x3e13f2=_0x3068cd;if(_0x1a3d7e==null)_0x1a3d7e=Math[_0x3e13f2(0x1b4)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0xb0d471=_0x3910df?.['flushed'];if(!_0xb0d471||typeof _0xb0d471[_0x3e13f2(0x373)]!==_0x3e13f2(0x306))return;await Promise[_0x3e13f2(0x29e)]([Promise[_0x3e13f2(0x2ed)](_0xb0d471)[_0x3e13f2(0x28b)](()=>{}),new Promise(_0x82774c=>{const _0x5ee37b=_0x3e13f2,_0x58b2e4=setTimeout(_0x82774c,_0x1a3d7e);if(_0x58b2e4[_0x5ee37b(0x38b)])_0x58b2e4['unref']();})]);}catch{}}function _0x4549e3(_0x20b0d3){const _0x3a9afe=_0x3068cd;if(_0x534a0d)return Promise['resolve']();const _0x18d92b=_0x20b0d3?.['committed'];return _0x18d92b&&typeof _0x18d92b[_0x3a9afe(0x373)]===_0x3a9afe(0x306)?_0x18d92b:Promise[_0x3a9afe(0x2ed)]();}return okdbWriter[_0x3068cd(0x1df)]=_0x3e857e,okdbWriter[_0x3068cd(0x1df)][_0x3068cd(0x2c7)]=_0x4b002b,okdbWriter['exports'][_0x3068cd(0x2e7)]=_0x4549e3,okdbWriter['exports'][_0x3068cd(0x212)]=_0x534a0d,okdbWriter[_0x3068cd(0x1df)];}function _0x7d06(){const _0x4eaae5=['pushEphemeral','_dedupeKey','_ownMeta','_onPoke','_acquiredAt','SYSTEM_PROC','_startAdmission','./okdb','ingest','remove','_onProcEvent','_kind','commit','unique:violation_resolved','unhandledRejection','once','_singletonLock','deaths','\x20—\x20','SYNC_COMMITS','msg','INDEX_REGISTERED','abs','ms\x20on\x20env=','_report','_lastCpuWindowMs','entry','cpus','getDesired','_quantum','txn:end','881321xtqLAC','\x20forked\x20','okdb-writer:\x20env\x20closing\x20—\x20retry','_wantDbHandle','getProcess','singletonClaims','uptime','ms\x20busy=','ref:violation','processorId','ESRCH','epoch','state','_lastCpuAt','\x20parkedNow=','commitP99Ms','517hOnbjz','ms\x20env=','_dedupeMax','\x20oldestPendingMs=','heartbeatMs','\x20===','_wantDb','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.','system:clock_change','dead','_envs','hasOwnProperty','fast','external','add','children','nodesView','966lWUSfm','_seen','data','registry\x20heartbeat\x20skipped\x20(writer=','view:progress','ITEM_UPDATE','_buildChildRow','isConnected','_desired','cluster-wide','ms\x20mean=','depth','registerFts','parse','processor:retry','mode','level','\x20died\x20','system:env_release','173115YuBCRX',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','_windowCbs','filter','stats','includes','fork','\x20worker(s)\x20still\x20serving','write','sort','enable','put','system:type_drop','_instanceId','load','_statusEnv','_removeRowAsync','acquiredAt','close','all','connected','heapTotal','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','okdb','updatedAt','stack','expiresAt','slice','processor','resetFts','childTransaction','building','txn:start','--inspect','reportThreadStats','win32','resetReadTxn','percentile','\x20drainAge=','dropType','getCmd','transactionSync','_committed','instances','listening','single','join','index:drop','_singletonLocks','[okdb-cluster]\x20respawning\x20worker\x20slot=',')\x20exited\x20','toISOString','\x20@\x20','claims','type','change','ttlMs','catch','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','_lock','system:drain','nodeKey','2.1.1','path','beforeWrite','_publishNow','stop','processingStatusView','processorsView','\x20│\x20','_rowKey','uncaughtException','[okdb-cluster]\x20','getChanges','ms/','system','race','kill','bus:proc','default','24420PDdrBu','transaction','_bpWaiters','runtimeProcessesView','CHANGEFEED_QUANTUM','openDB','_bpParkedTotal','__okdbSlot','round','shift','cli','_caps','_enqueuedAt','cursorKey','consecutiveFailures','_putRowAsync','map','system:stopped','has','ITEM_CREATE','FTS_DROP','_clusterWorkerAttached','true','rss','primary','listNodes','queue-worker','sync:apply','_role','find','_timer','_openEnvLazy','_flushDebounce','_handlePoke','listDesired','start','SWAP','flushLmdb','process\x20','addSupervisedChild','1008840GijaUd','processor:paused','_flushTimer','INDEX_READY','\x0a\x20\x20\x20\x20\x20\x20','code','claimGated','ppid','type:registered','standalone','processor:progress','number','count','stopped','_buildProcessingFacet','get','instanceId','floor','_heartbeatInFlight','mkdirSync','bus:poke','_db','_children','crypto','system:bus_state_change','sandbox','INDEX_RESET','_baselines','_migrateVocab','committed','_drain','fts:registered','_started','onWindow','cpuWindowMs','resolve','raw-remove','list','_admissionStarted','entries','INDEX_PROGRESS','\x20pid=','busy','memoryUsage','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','dumpedAt','appendFileSync','publishChildRow','setSchema','VIEW_PROGRESS','respawnTimer','item:create','draining','ttl:clear','_isReader','149960ZCsbpX','maxExtra','~lock','namespace','keys','function','_servingEngines','ttl:set','now','fanout','ms\x20(attempt\x20','system:proc','holder','ITEM_REMOVE','registry\x20publish\x20failing:\x20','from','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','events','_closed','host','clearTtl','--eval','_coordinator','_desiredOverlay','status','_done','setDesired','push','cluster','afterWrite','slot','tryAcquire','split','recent\x20writes\x20(newest\x20first)','parkedNow','\x0a===\x20OKDB_DIAG\x20','~processes:desired','error','~processes:cmd','sync','(code=','registerType','rowKey','markClosed','_buckets','_lockDb','_cursors','length','event','freeze','copy',',\x20signal=','set','dedupeMax','_inflight','registerIndex','processes','next','randomUUID','size','bus:drain','user','decommission','_heartbeatTimer','kind','_released','REMOVE','values','http-server','ms\x20p99=','isWanted','_lastCpuUsage','maxMs','16wUndHX','prototype','mean','_isWriter','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','ENV_CLOSING_RETRY','removeNode','error:\x20','_onItem','release','txn:rollback','_refreshDesiredSnapshot','http\x20worker\x20child\x20failed:\x20','_admissionTimer','item:remove','quantum','_systemEnv','ttl:expired','started','license:added','_publishFailWarned','worker','engines','creating','_selfKey','_draining','_groupByProcess','repeat','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','removeSupervisedChild','_versionSkewWarned','ORPHAN\x20(env-closed\x20write)','_onStop','options','label','test','license:activated','off','inst:','http',':want','then','listen','version','processor:ready','env','clearThreadStats','workersConfigured','type:drop','startedAt','_clusterOnMessage','commitsPerSec','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','getRange','_getType','dropIndex','exit','listenAddr','__esModule','createEnvironment','attach','execArgv','SYSTEM_POKE','created','_holderDead','unref','_enableChangelog','view','dropping','emit','flushDebounce','license:invalid','unclaimed','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','attachFeed','[okdb-cluster]\x20worker\x20pid=','node:events','_ensureDesired','assign','2455536MSkbqW','prependListener','_outstanding','SYSTEM_STOPPED','_supervisorKey','_sandbox','824287unaINm','_nodeDb','message','reduce','_scheduleFlush','processing','signalWant','slotKey','offWindow','workers','pid','_clusterOrphanWatch','treeView','index:progress','putNode','_writer','info','noteListenAddr','(worst\x20','_putRowSync','schema:drop','setLogger','ready','_listenAddr','ephemeral','_processStartedAt','_rawDb','_collectWriterFacet','_highWater','participate','\x20statusEnv=','processKey','waiting','delete','cpuUsage','disable','processor:resumed','--test','node:perf_hooks','heapUsed','_durs','_lastCpuPct','_pending','_adminRelay','ref:violation_resolved','killable','\x20(slot=','trim','cpuPct','toFixed','warn','feed:','string','role','drain','_lastPublishAt','lifecycle','FTS_RESET','registry-publish','log','dropSchema','disconnect','allSettled','object','isEnabled','_key','hostname','bumpCmd','isDead','reap','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','_cmd','threads','rows=','max','SIGKILL','_buildOwnRow','isWorker','putSync','stderr','unique:violation','inflightAgesMs','node','2Gleanh','isHeld','note','1ofN:','running','resetting','extend','\x20HTTP\x20server(s)\x20on\x20port\x20','embedded','hasDesired','clear','\x20times\x20in\x20','compact','indexOf','_changefeed','_isStale','startsWith','async','caps','\x20in\x20','_nodeDead','_log','processors','_nodeDbFor','send','removeSync','replace','enabled','online','_threadStats','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','env:removed','ms\x20activeWriters=','hasType','exports','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','_markSeen','_startHeartbeat','__vocab/version','min','_collectSingletonClaims','system:poke','isPrimary','dropFts','open','processor:error','node/','_startedAt','_rootDb','_onTick','getClock','selfKey','\x20sync','writerStatus','reset','process','procmodeack/','supervisorKey','\x20(durable\x20desired-state)','meta','_handleInProcess','\x20phase=','license:removed','_sampleOwnStats','__okdbCluster','_hbTimer'];_0x7d06=function(){return _0x4eaae5;};return _0x7d06();}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x213d45=_0x37b856;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x3623d8=require$$0$3,{SYNC_COMMITS:_0x576287}=requireOkdbWriter(),_0x7954db=_0x213d45(0x303);class _0x1437e9{constructor(_0x16ca90,_0x451610,_0x598dcc){const _0x10e14e=_0x213d45;this[_0x10e14e(0x28d)]=_0x16ca90,this[_0x10e14e(0x1ab)]=_0x451610,this[_0x10e14e(0x203)]=_0x598dcc,this[_0x10e14e(0x342)]=![],this[_0x10e14e(0x340)]=null,this[_0x10e14e(0x2dc)]=null;}[_0x213d45(0x1be)](){const _0x144b67=_0x213d45;if(this[_0x144b67(0x342)])return![];try{const _0x59d8a2=this['_lock'][_0x144b67(0x2df)]()['get'](this[_0x144b67(0x1ab)]);if(!_0x59d8a2||_0x59d8a2[_0x144b67(0x263)]!==this[_0x144b67(0x203)])return![];const _0x9ca2d4=_0x59d8a2['updatedAt']??_0x59d8a2[_0x144b67(0x263)];if(_0x9ca2d4+_0x59d8a2[_0x144b67(0x28a)]<Date[_0x144b67(0x309)]())return![];return!![];}catch{return!this['_released'];}}[_0x213d45(0x30d)](){const _0xcc760f=_0x213d45;if(this[_0xcc760f(0x342)])return null;try{return this[_0xcc760f(0x28d)][_0xcc760f(0x2df)]()[_0xcc760f(0x2d9)](this[_0xcc760f(0x1ab)])??null;}catch{return null;}}async[_0x213d45(0x1c3)](_0x50dfc7){const _0x2109d9=_0x213d45;if(this[_0x2109d9(0x342)])return;try{const _0x1bc4aa=this[_0x2109d9(0x28d)][_0x2109d9(0x2df)]()[_0x2109d9(0x2d9)](this['_key']);if(!_0x1bc4aa||_0x1bc4aa[_0x2109d9(0x263)]!==this['_acquiredAt'])return;if(_0x576287)this['_lock'][_0x2109d9(0x2df)]()['putSync'](this[_0x2109d9(0x1ab)],{..._0x1bc4aa,'ttlMs':_0x1bc4aa['ttlMs']+_0x50dfc7});else await this[_0x2109d9(0x28d)][_0x2109d9(0x2df)]()[_0x2109d9(0x25d)](this[_0x2109d9(0x1ab)],{..._0x1bc4aa,'ttlMs':_0x1bc4aa[_0x2109d9(0x28a)]+_0x50dfc7});}catch{}}async[_0x213d45(0x353)](){const _0x335b5a=_0x213d45;if(this[_0x335b5a(0x342)])return;if(this[_0x335b5a(0x2dc)])try{await this[_0x335b5a(0x2dc)];}catch{}clearInterval(this['_heartbeatTimer']),this['_heartbeatTimer']=null,this[_0x335b5a(0x342)]=!![];try{const _0x5bb24f=this[_0x335b5a(0x28d)][_0x335b5a(0x2df)]()[_0x335b5a(0x2d9)](this['_key']);if(_0x5bb24f&&_0x5bb24f[_0x335b5a(0x263)]===this['_acquiredAt']){if(_0x576287)this[_0x335b5a(0x28d)][_0x335b5a(0x2df)]()[_0x335b5a(0x1d6)](this[_0x335b5a(0x1ab)]);else await this[_0x335b5a(0x28d)][_0x335b5a(0x2df)]()[_0x335b5a(0x208)](this['_key']);}}catch{}}['_startHeartbeat'](_0xd8eb5f,_0x3c37ce){const _0x38e973=_0x213d45,_0x346dd1=_0x3c37ce??Math['floor'](_0xd8eb5f/0x3);this[_0x38e973(0x340)]=setInterval(()=>{const _0x5dfcab=_0x38e973;if(this[_0x5dfcab(0x342)])return;this[_0x5dfcab(0x2dc)]=((async()=>{const _0x199e8c=_0x5dfcab;try{const _0x328dbc=this[_0x199e8c(0x28d)][_0x199e8c(0x2df)]()['get'](this[_0x199e8c(0x1ab)]);if(!_0x328dbc||_0x328dbc['acquiredAt']!==this[_0x199e8c(0x203)]){this[_0x199e8c(0x342)]=!![],clearInterval(this[_0x199e8c(0x340)]),this['_heartbeatTimer']=null;return;}if(_0x576287)this[_0x199e8c(0x28d)][_0x199e8c(0x2df)]()[_0x199e8c(0x1b8)](this['_key'],{..._0x328dbc,'updatedAt':Date[_0x199e8c(0x309)]()});else await this[_0x199e8c(0x28d)][_0x199e8c(0x2df)]()['put'](this['_key'],{..._0x328dbc,'updatedAt':Date[_0x199e8c(0x309)]()});}catch{}this[_0x199e8c(0x2dc)]=null;})());},_0x346dd1);if(this['_heartbeatTimer'][_0x38e973(0x38b)])this[_0x38e973(0x340)][_0x38e973(0x38b)]();}}class _0x1fc7b9{constructor(_0x5e0761,{namespace:_0x1923d2,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x3dad2d=_0x213d45;this[_0x3dad2d(0x184)]=_0x5e0761,this['namespace']=_0x1923d2,this[_0x3dad2d(0x28a)]=ttlMs,this['heartbeatMs']=heartbeatMs,this['_lockDb']=null;}[_0x213d45(0x2df)](){const _0x1bb936=_0x213d45;return!this[_0x1bb936(0x32e)]&&(this[_0x1bb936(0x32e)]=this[_0x1bb936(0x184)][_0x1bb936(0x2a7)](_0x7954db,{'dupSort':![]})),this[_0x1bb936(0x32e)];}[_0x213d45(0x234)](){const _0x3c9ec2=_0x213d45;return!this[_0x3c9ec2(0x221)]&&(this[_0x3c9ec2(0x221)]=this[_0x3c9ec2(0x184)][_0x3c9ec2(0x2a7)](_0x7954db+_0x3c9ec2(0x372),{'dupSort':![]})),this[_0x3c9ec2(0x221)];}[_0x213d45(0x1ab)](_0x3ec7b8){const _0x4aa5b6=_0x213d45;return this[_0x4aa5b6(0x304)]+':'+_0x3ec7b8;}[_0x213d45(0x170)](_0x2469c1){const _0x5dcf92=_0x213d45;try{_0x576287?this[_0x5dcf92(0x234)]()[_0x5dcf92(0x1b8)](this['_key'](_0x2469c1),Date['now']()):this[_0x5dcf92(0x234)]()['put'](this[_0x5dcf92(0x1ab)](_0x2469c1),Date[_0x5dcf92(0x309)]())?.[_0x5dcf92(0x28b)]?.(()=>{});}catch{}}[_0x213d45(0x347)](_0x10f4e3,_0x264305=0x3e8){const _0xd36dfb=_0x213d45;try{const _0x1de2cd=this[_0xd36dfb(0x234)]()[_0xd36dfb(0x2d9)](this['_key'](_0x10f4e3));return typeof _0x1de2cd==='number'&&Date[_0xd36dfb(0x309)]()-_0x1de2cd<_0x264305;}catch{return![];}}[_0x213d45(0x1cc)](_0x555305){const _0x47c544=_0x213d45,_0x330107=_0x555305[_0x47c544(0x26a)]??_0x555305[_0x47c544(0x263)];return _0x330107+_0x555305[_0x47c544(0x28a)]<Date[_0x47c544(0x309)]();}static[_0x213d45(0x38a)](_0x35cc59){const _0x45c116=_0x213d45,_0x32ec59=_0x35cc59?.[_0x45c116(0x30d)];if(!_0x32ec59||typeof _0x32ec59[_0x45c116(0x174)]!=='number')return![];if(_0x32ec59[_0x45c116(0x1ac)]!==_0x3623d8[_0x45c116(0x1ac)]())return![];if(_0x32ec59[_0x45c116(0x174)]===process[_0x45c116(0x174)])return![];try{return process['kill'](_0x32ec59[_0x45c116(0x174)],0x0),![];}catch(_0x1d7dac){return _0x1d7dac[_0x45c116(0x2cf)]===_0x45c116(0x228);}}async[_0x213d45(0x320)](_0x2e730d,_0x580365={},_0x5116ea={}){const _0x4af130=_0x213d45,_0x32f425=this[_0x4af130(0x1ab)](_0x2e730d),_0x383531=_0x5116ea[_0x4af130(0x28a)]??this['ttlMs'],_0x1e9a97=Date[_0x4af130(0x309)](),_0x472bc5={'holder':{'pid':process[_0x4af130(0x174)],'hostname':_0x3623d8['hostname'](),..._0x580365},'acquiredAt':_0x1e9a97,'updatedAt':_0x1e9a97,'ttlMs':_0x383531};let _0x5ac347=![],_0x1a020e=null;try{const _0x505a11=()=>{const _0x21cff5=_0x4af130,_0x31769f=this['_db']()['get'](_0x32f425);if(_0x31769f&&!this[_0x21cff5(0x1cc)](_0x31769f)&&!_0x1fc7b9['_holderDead'](_0x31769f)){const _0x4b1f71=_0x580365[_0x21cff5(0x227)]!=null&&_0x31769f[_0x21cff5(0x30d)][_0x21cff5(0x174)]===process[_0x21cff5(0x174)]&&_0x31769f[_0x21cff5(0x30d)][_0x21cff5(0x227)]===_0x580365['processorId'];if(!_0x4b1f71){_0x5ac347=![],_0x1a020e=_0x31769f;return;}_0x472bc5['acquiredAt']<=_0x31769f['acquiredAt']&&(_0x472bc5[_0x21cff5(0x263)]=_0x31769f[_0x21cff5(0x263)]+0x1,_0x472bc5['updatedAt']=_0x472bc5[_0x21cff5(0x263)]);}this[_0x21cff5(0x2df)]()[_0x21cff5(0x25d)](_0x32f425,_0x472bc5),_0x5ac347=!![],_0x1a020e=_0x472bc5;};if(_0x576287)this[_0x4af130(0x2df)]()['transactionSync'](_0x505a11);else await this[_0x4af130(0x2df)]()[_0x4af130(0x270)](_0x505a11);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x5ac347)return{'acquired':![],'handle':null,'current':_0x1a020e};const _0x1cbd3b=new _0x1437e9(this,_0x32f425,_0x472bc5['acquiredAt']);return _0x1cbd3b[_0x4af130(0x1e2)](_0x383531,this[_0x4af130(0x232)]),{'acquired':!![],'handle':_0x1cbd3b,'current':_0x1a020e};}['inspect'](_0x286b2b){const _0x306b0e=_0x213d45;try{return this[_0x306b0e(0x2df)]()[_0x306b0e(0x2d9)](this[_0x306b0e(0x1ab)](_0x286b2b))??null;}catch{return null;}}['list'](){const _0x53a125=_0x213d45,_0x134dc7=this[_0x53a125(0x304)]+':',_0x44df0d=[];try{for(const {key:_0x58fac8,value:_0x3fab8e}of this[_0x53a125(0x2df)]()[_0x53a125(0x37f)]({'start':_0x134dc7,'end':_0x134dc7+'\xff'})){typeof _0x58fac8===_0x53a125(0x19e)&&_0x58fac8[_0x53a125(0x1cd)](_0x134dc7)&&_0x44df0d[_0x53a125(0x31c)]({'id':_0x58fac8[_0x53a125(0x26d)](_0x134dc7['length']),'entry':_0x3fab8e});}}catch{}return _0x44df0d;}static['listAll'](_0x569af9){const _0x59e5ba=_0x213d45,_0x36a077=[];try{const _0x29a170=_0x569af9[_0x59e5ba(0x2a7)](_0x7954db,{'dupSort':![]});for(const {key:_0x321f36,value:_0x12b88b}of _0x29a170[_0x59e5ba(0x37f)]({})){if(typeof _0x321f36!==_0x59e5ba(0x19e))continue;const _0x3de917=_0x321f36['indexOf'](':');if(_0x3de917<0x1)continue;_0x36a077[_0x59e5ba(0x31c)]({'namespace':_0x321f36[_0x59e5ba(0x26d)](0x0,_0x3de917),'id':_0x321f36['slice'](_0x3de917+0x1),'entry':_0x12b88b});}}catch{}return _0x36a077;}}return okdbLock={'OKDBLock':_0x1fc7b9},okdbLock;}var version=_0x37b856(0x290),require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x5799d2=_0x37b856;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x3929a3=require$$0$3,_0x374a0d=require$$1$1,_0x3de86e=require$$2,{LOOP:_0x415ae2}=requireOkdbLoopMonitor(),{OKDBLock:_0x3fea87}=requireOkdbLock(),{SYNC_COMMITS:_0x3d246f}=requireOkdbWriter(),_0x45a41f='~processes',_0x5919ed=_0x5799d2(0x1bc),_0x3cbef9=_0x5799d2(0x325),_0x2b9a46=_0x5799d2(0x327),_0x5d6437=(_0x451cd6,_0xa6b47e)=>_0x451cd6+':'+_0xa6b47e,_0x29c110=(_0x31096c,_0x4e1900)=>_0x31096c+'::'+_0x4e1900,_0x1453c9=(_0x13d478,_0x2c15ab)=>_0x13d478+'/'+_0x2c15ab,_0x6e86fb=(_0x2ee770,_0x468afb)=>_0x2ee770+'#'+_0x468afb,_0xce368e=_0x523563=>{const _0x2a9e4e=_0x5799d2;if(_0x523563?.['processKey'])return _0x523563[_0x2a9e4e(0x189)];const _0x4337d2=_0x523563?.[_0x2a9e4e(0x28f)];return typeof _0x4337d2===_0x2a9e4e(0x19e)&&_0x4337d2[_0x2a9e4e(0x257)]('#')?_0x4337d2['slice'](0x0,_0x4337d2[_0x2a9e4e(0x1ca)]('#')):_0x4337d2;},_0x3c3978=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x4f56a6=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x10928f=_0x3c3978*0x3,_0x436ff4=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math['max'](0x927c0,_0x10928f*0x14),_0x48ceff=[_0x5799d2(0x2d4),_0x5799d2(0x376),_0x5799d2(0x24d),'processor:error',_0x5799d2(0x2cb),_0x5799d2(0x18e)];let _0x1b7637=null;function _0x690b6f(){const _0x3c15e9=_0x5799d2;if(_0x1b7637==null)_0x1b7637=Math['round']((Date[_0x3c15e9(0x309)]()-process[_0x3c15e9(0x224)]()*0x3e8)/0x3e8)*0x3e8;return _0x1b7637;}function _0x502c0c(_0x84d844){const _0x593324=_0x5799d2;if(process.env.OKDB_PROCESS_KILL===_0x593324(0x36f))return![];if(_0x84d844?.[_0x593324(0x36b)]?.[_0x593324(0x339)]&&typeof _0x84d844[_0x593324(0x36b)]['processes']==='object'&&_0x84d844[_0x593324(0x36b)][_0x593324(0x339)][_0x593324(0x29f)]===![])return![];return!![];}function _0x2f7007(_0x5e0b5d,_0x2f4c3a){const _0x1fecf4=_0x5799d2,_0x1e72d3=!!_0x2f4c3a?.[_0x1fecf4(0x1d3)];switch(_0x5e0b5d){case _0x1fecf4(0x2ba):return{'controllable':_0x1e72d3,'decommissionable':![],'killable':!![],'killConfirm':_0x1fecf4(0x248)};case _0x1fecf4(0x2ac):case _0x1fecf4(0x2d3):return{'controllable':_0x1e72d3,'decommissionable':![],'killable':!![],'killConfirm':'confirm'};case'embedded':return{'controllable':![],'decommissionable':![],'killable':![]};case _0x1fecf4(0x345):case _0x1fecf4(0x2bc):case'fn-runner':case'worker':return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':'force'};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x57ebda{constructor(_0x3310ca){const _0x6c03ad=_0x5799d2;this[_0x6c03ad(0x269)]=_0x3310ca,this[_0x6c03ad(0x261)]=null,this[_0x6c03ad(0x247)]=null,this[_0x6c03ad(0x318)]=new Map(),this['_cmd']=null,this['_isWriter']=![],this['_isReader']=![],this[_0x6c03ad(0x183)]=_0x690b6f(),this['_selfKey']=_0x5d6437(process[_0x6c03ad(0x174)],this[_0x6c03ad(0x183)]),this[_0x6c03ad(0x25f)]=_0x3de86e[_0x6c03ad(0x33b)]()[_0x6c03ad(0x26d)](0x0,0x8),this['_rowKey']=_0x6e86fb(this[_0x6c03ad(0x362)],this[_0x6c03ad(0x25f)]),this['_startedAt']=Date[_0x6c03ad(0x309)](),this['_kind']=null,this[_0x6c03ad(0x168)]=null,this[_0x6c03ad(0x181)]=null,this['_hbTimer']=null,this['_onProcEvent']=null,this['_onTick']=null,this[_0x6c03ad(0x1a1)]=0x0,this['_ownMeta']={},this[_0x6c03ad(0x2e0)]=new Map(),this['_lastCpuUsage']=process[_0x6c03ad(0x18c)](),this['_lastCpuAt']=Date[_0x6c03ad(0x309)](),this[_0x6c03ad(0x193)]=0x0,this['_threadStats']=new Map();}get[_0x5799d2(0x1f0)](){return this['_selfKey'];}get[_0x5799d2(0x32b)](){const _0x3454d9=_0x5799d2;return this[_0x3454d9(0x298)];}[_0x5799d2(0x2ad)](_0x1c3be0,_0x30e3db){const _0x1d6d04=_0x5799d2,_0x41e96d=_0x2f7007(_0x1c3be0,_0x30e3db);if(_0x41e96d[_0x1d6d04(0x197)]&&!_0x502c0c(this[_0x1d6d04(0x269)]))return{..._0x41e96d,'killable':![],'killConfirm':undefined};return _0x41e96d;}['isActive'](){const _0x2a4587=_0x5799d2;return!!this[_0x2a4587(0x261)];}['setOwnMeta'](_0x37f176){const _0xbf34d3=_0x5799d2;Object[_0xbf34d3(0x163)](this['_ownMeta'],_0x37f176||{});}[_0x5799d2(0x17b)](_0x1a6f20){const _0x4e1ed7=_0x5799d2;if(_0x1a6f20)this[_0x4e1ed7(0x181)]=_0x1a6f20;}['register'](_0x24c2c9={}){const _0xbc6749=_0x5799d2;return this[_0xbc6749(0x269)]['_activateProcesses'](_0x24c2c9);}[_0x5799d2(0x295)](){const _0xfa686=_0x5799d2,_0x4621af={};let _0x4c1375=0x0,_0x51b009=0x0;const _0x627726=new Set();for(const _0x57b714 of this['listNodes']()){_0x51b009++;const _0x2f17f3=_0x57b714[_0xfa686(0x16f)];if(!_0x2f17f3)continue;if(_0x2f17f3[_0xfa686(0x187)])_0x4c1375++;for(const _0x4009b6 of _0x2f17f3[_0xfa686(0x1d3)]||[]){if(![_0xfa686(0x27f),_0xfa686(0x30a)][_0xfa686(0x257)](_0x4009b6[_0xfa686(0x24e)]))continue;(_0x4009b6['state']===_0xfa686(0x1d9)||_0x4009b6[_0xfa686(0x22a)]==='building')&&_0x4009b6[_0xfa686(0x2af)]&&_0x627726['add']((_0x4009b6[_0xfa686(0x377)]||_0xfa686(0x2a1))+':'+_0x4009b6[_0xfa686(0x2af)]);const _0x502455=_0x4009b6[_0xfa686(0x377)]||_0xfa686(0x2a1);(_0x4621af[_0x502455]||=[])[_0xfa686(0x31c)]({..._0x4009b6,'env':_0x502455,'owner':{'pid':_0x57b714[_0xfa686(0x174)]??null,'kind':_0x57b714[_0xfa686(0x341)]??null}});}}for(const [_0x2766e8,_0xd7ddbd]of Object['entries'](_0x4621af)){for(const _0x529e41 of _0xd7ddbd){if(_0x529e41[_0xfa686(0x24e)]==='single'&&!_0x529e41[_0xfa686(0x2d0)]){const _0x2dce4f=_0x2766e8+':'+(_0x529e41[_0xfa686(0x2af)]??'');if(!_0x627726[_0xfa686(0x2b4)](_0x2dce4f))_0x529e41[_0xfa686(0x392)]=!![];}}}return{'envs':_0x4621af,'policy':null,'participation':{'participating':_0x4c1375,'total':_0x51b009},'source':_0xfa686(0x173)};}[_0x5799d2(0x296)](){const _0x493dd1=_0x5799d2,_0x323c3c=_0x3f39cd=>{const _0x32b815=_0x5e6c;if(_0x3f39cd[_0x32b815(0x22a)]===_0x32b815(0x1d9)||_0x3f39cd['state']===_0x32b815(0x271)||_0x3f39cd[_0x32b815(0x22a)]===_0x32b815(0x326))return 0x3;if(_0x3f39cd['claimGated'])return 0x1;return 0x2;},_0x53b1e4=new Map();for(const _0x3c8f81 of this[_0x493dd1(0x2bb)]()){for(const _0x30bcc2 of _0x3c8f81[_0x493dd1(0x16f)]?.[_0x493dd1(0x1d3)]||[]){const _0x25622e={..._0x30bcc2,'owner':{'pid':_0x3c8f81[_0x493dd1(0x174)]??null,'kind':_0x3c8f81[_0x493dd1(0x341)]??null,'host':_0x3c8f81[_0x493dd1(0x314)]??null}},_0x487d47=_0x30bcc2['mode']===_0x493dd1(0x27f)?_0x493dd1(0x1c0)+(_0x30bcc2[_0x493dd1(0x377)]??'')+'::'+(_0x30bcc2[_0x493dd1(0x2af)]??_0x30bcc2[_0x493dd1(0x288)]??_0x30bcc2['id']):_0x493dd1(0x370)+(_0x3c8f81['nodeKey']??_0x3c8f81[_0x493dd1(0x189)]??'')+'::'+(_0x30bcc2[_0x493dd1(0x377)]??'')+'::'+_0x30bcc2['id'],_0x119ec1=_0x53b1e4['get'](_0x487d47);if(!_0x119ec1||_0x323c3c(_0x25622e)>_0x323c3c(_0x119ec1))_0x53b1e4[_0x493dd1(0x335)](_0x487d47,_0x25622e);}}return[..._0x53b1e4[_0x493dd1(0x344)]()];}['clusterStatusView'](){const _0x4a2824=_0x5799d2,_0x523269=Date[_0x4a2824(0x309)](),_0x4399b7=this[_0x4a2824(0x2bb)](),_0x103939=_0x5b5cd4=>Math[_0x4a2824(0x1b4)](0x0,Math['round']((_0x523269-(_0x5b5cd4[_0x4a2824(0x37b)]||_0x523269))/0x3e8)),_0x487634=_0x4399b7[_0x4a2824(0x2bf)](_0x42526c=>_0x42526c[_0x4a2824(0x341)]===_0x4a2824(0x2ba)),_0x1b1b69=_0x4399b7[_0x4a2824(0x255)](_0x2d3d86=>_0x2d3d86[_0x4a2824(0x341)]===_0x4a2824(0x345));if(_0x487634||_0x1b1b69[_0x4a2824(0x330)])return{'primary':_0x487634?{'pid':_0x487634[_0x4a2824(0x174)],'uptime':_0x103939(_0x487634)}:null,'workers':_0x1b1b69[_0x4a2824(0x2b2)](_0x42d58a=>({'pid':_0x42d58a['pid'],'uptime':_0x103939(_0x42d58a)})),'workersConfigured':_0x487634?.[_0x4a2824(0x1f8)]?.[_0x4a2824(0x379)]??_0x1b1b69[_0x4a2824(0x330)],'mode':_0x4a2824(0x31d)};const _0x2cab0c=_0x4399b7['find'](_0x5f0283=>_0x5f0283['kind']===_0x4a2824(0x2ac)||_0x5f0283[_0x4a2824(0x341)]===_0x4a2824(0x2d3)||_0x5f0283[_0x4a2824(0x341)]===_0x4a2824(0x1c5)),_0x2a91b3=_0x2cab0c?{'pid':_0x2cab0c['pid'],'uptime':_0x103939(_0x2cab0c)}:{'pid':process['pid'],'uptime':Math[_0x4a2824(0x1b4)](0x0,Math[_0x4a2824(0x2aa)](process[_0x4a2824(0x224)]()))};return{'primary':_0x2a91b3,'workers':[_0x2a91b3],'workersConfigured':0x1,'mode':_0x4a2824(0x27f)};}[_0x5799d2(0x23e)](){const _0x5bb20c=_0x5799d2;return this[_0x5bb20c(0x364)]();}[_0x5799d2(0x176)](){const _0x5f5444=_0x5799d2,_0x32a938=new Map();for(const _0x51bacc of this[_0x5f5444(0x364)]())_0x32a938[_0x5f5444(0x335)](_0x51bacc[_0x5f5444(0x189)],{..._0x51bacc,'children':[]});const _0x3c1ab8=[];for(const _0x44d2f5 of _0x32a938[_0x5f5444(0x344)]()){const _0x8c293c=_0x44d2f5[_0x5f5444(0x1f6)]?_0x32a938['get'](_0x44d2f5[_0x5f5444(0x1f6)]):null;if(_0x8c293c&&_0x8c293c!==_0x44d2f5)_0x8c293c['children']['push'](_0x44d2f5);else _0x3c1ab8[_0x5f5444(0x31c)](_0x44d2f5);}const _0x1436f3=(_0x3222e5,_0x579450)=>_0x3222e5[_0x5f5444(0x341)]===_0x579450[_0x5f5444(0x341)]?(_0x3222e5['pid']||0x0)-(_0x579450['pid']||0x0):(_0x3222e5['kind']??'')<(_0x579450['kind']??'')?-0x1:0x1,_0x3ca018=_0x37d4e2=>{const _0x2a3c65=_0x5f5444;_0x37d4e2[_0x2a3c65(0x25b)](_0x1436f3);for(const _0xe710df of _0x37d4e2)if(_0xe710df[_0x2a3c65(0x23d)][_0x2a3c65(0x330)])_0x3ca018(_0xe710df[_0x2a3c65(0x23d)]);};return _0x3ca018(_0x3c1ab8),_0x3c1ab8;}[_0x5799d2(0x222)](_0x545466){const _0xe718e=_0x5799d2;return this[_0xe718e(0x364)]()[_0xe718e(0x2bf)](_0x26b122=>_0x26b122[_0xe718e(0x189)]===_0x545466)??null;}[_0x5799d2(0x364)](_0x57ccab=Date[_0x5799d2(0x309)]()){const _0x33e218=_0x5799d2,_0x1fd756=new Map();for(const _0x2f155e of this[_0x33e218(0x2bb)]()){const _0x21fabb=_0xce368e(_0x2f155e);let _0x17eb3f=_0x1fd756[_0x33e218(0x2d9)](_0x21fabb);!_0x17eb3f&&(_0x17eb3f={'processKey':_0x21fabb,'nodeKey':_0x21fabb,'pid':_0x2f155e[_0x33e218(0x174)],'ppid':_0x2f155e['ppid']??null,'host':_0x2f155e[_0x33e218(0x314)]??null,'kind':_0x2f155e[_0x33e218(0x341)],'role':null,'supervisorKey':_0x2f155e[_0x33e218(0x1f6)]??null,'slot':_0x2f155e[_0x33e218(0x31f)]??null,'slotKey':_0x2f155e[_0x33e218(0x171)]??null,'caps':_0x2f155e['caps']??null,'lifecycle':_0x2f155e[_0x33e218(0x1a2)]??null,'uptime':Math[_0x33e218(0x1b4)](0x0,Math['round']((_0x57ccab-(_0x2f155e['startedAt']||_0x57ccab))/0x3e8)),'startedAt':_0x2f155e[_0x33e218(0x37b)]??null,'meta':_0x2f155e['meta']??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x1fd756[_0x33e218(0x335)](_0x21fabb,_0x17eb3f));_0x17eb3f[_0x33e218(0x27d)][_0x33e218(0x31c)]({'instanceId':_0x2f155e[_0x33e218(0x2da)]??null,'role':_0x2f155e[_0x33e218(0x19f)]??null,'listenAddr':_0x2f155e[_0x33e218(0x383)]??null,'lifecycle':_0x2f155e[_0x33e218(0x1a2)]??null,'processing':_0x2f155e[_0x33e218(0x16f)]??null});if(!_0x17eb3f[_0x33e218(0x19f)]&&_0x2f155e[_0x33e218(0x19f)])_0x17eb3f[_0x33e218(0x19f)]=_0x2f155e['role'];if(!_0x17eb3f[_0x33e218(0x383)]&&_0x2f155e[_0x33e218(0x383)])_0x17eb3f[_0x33e218(0x383)]=_0x2f155e[_0x33e218(0x383)];if(!_0x17eb3f['processing']&&_0x2f155e[_0x33e218(0x16f)])_0x17eb3f['processing']=_0x2f155e[_0x33e218(0x16f)];if(!_0x17eb3f['engines']&&_0x2f155e[_0x33e218(0x360)])_0x17eb3f['engines']=_0x2f155e['engines'];if(!_0x17eb3f[_0x33e218(0x223)]&&_0x2f155e[_0x33e218(0x223)])_0x17eb3f[_0x33e218(0x223)]=_0x2f155e[_0x33e218(0x223)];if(_0x17eb3f[_0x33e218(0x1cf)]==null&&_0x2f155e[_0x33e218(0x1cf)])_0x17eb3f[_0x33e218(0x1cf)]=_0x2f155e[_0x33e218(0x1cf)];if(_0x2f155e[_0x33e218(0x256)]&&(!_0x17eb3f[_0x33e218(0x256)]||(_0x2f155e[_0x33e218(0x256)]['at']??0x0)>(_0x17eb3f['stats']['at']??0x0)))_0x17eb3f[_0x33e218(0x256)]=_0x2f155e[_0x33e218(0x256)];}return[..._0x1fd756['values']()];}[_0x5799d2(0x2a5)](){const _0x543f88=_0x5799d2,_0x6d5dcf=[],_0x1406b2={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x1b9dda of this[_0x543f88(0x364)]()){_0x6d5dcf[_0x543f88(0x31c)]({'processKey':_0x1b9dda[_0x543f88(0x189)],'kind':_0x1b9dda[_0x543f88(0x341)],'pid':_0x1b9dda[_0x543f88(0x174)],'supervisorKey':_0x1b9dda[_0x543f88(0x1f6)],'meta':_0x1b9dda[_0x543f88(0x1f8)]??null,'uptime':_0x1b9dda['uptime'],'stats':_0x1b9dda[_0x543f88(0x256)]??null}),_0x1406b2[_0x543f88(0x339)]++;if(_0x1b9dda['stats']){_0x1406b2[_0x543f88(0x2b9)]+=_0x1b9dda[_0x543f88(0x256)][_0x543f88(0x2b9)]||0x0,_0x1406b2[_0x543f88(0x191)]+=(_0x1b9dda['stats'][_0x543f88(0x191)]||0x0)+(_0x1b9dda[_0x543f88(0x256)]['threads']?.[_0x543f88(0x191)]||0x0);const _0x5b2621=_0x1b9dda[_0x543f88(0x256)]['threads'];_0x5b2621&&(_0x1406b2[_0x543f88(0x1b2)][_0x543f88(0x2d6)]+=_0x5b2621[_0x543f88(0x2d6)]||0x0,_0x1406b2[_0x543f88(0x1b2)][_0x543f88(0x2e3)]+=_0x5b2621['sandbox']||0x0,_0x1406b2['threads'][_0x543f88(0x2f4)]+=_0x5b2621[_0x543f88(0x2f4)]||0x0);}}return{'totals':_0x1406b2,'nodes':_0x6d5dcf};}async[_0x5799d2(0x1e9)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x5c6fbc=_0x5799d2;this[_0x5c6fbc(0x34d)]=this['_isWriter']||!!writer,this[_0x5c6fbc(0x300)]=this[_0x5c6fbc(0x300)]||!!reader,this['_kind']=kind||this[_0x5c6fbc(0x20a)]||(_0x374a0d[_0x5c6fbc(0x1b7)]?_0x5c6fbc(0x345):_0x5c6fbc(0x2ac)),this[_0x5c6fbc(0x168)]=supervisorKey??this[_0x5c6fbc(0x168)],this[_0x5c6fbc(0x181)]=listenAddr??this[_0x5c6fbc(0x181)],this[_0x5c6fbc(0x397)](),await this[_0x5c6fbc(0x2e6)]();if(!writer&&!reader)return null;if(!this[_0x5c6fbc(0x261)]){const _0x7cf7a0=await this[_0x5c6fbc(0x269)][_0x5c6fbc(0x385)](_0x45a41f,{'sync':![],'durability':_0x5c6fbc(0x23a)});if(!_0x7cf7a0[_0x5c6fbc(0x1de)](_0x5919ed))await _0x7cf7a0[_0x5c6fbc(0x32a)](_0x5919ed);this[_0x5c6fbc(0x261)]=_0x7cf7a0;}return this['_statusEnv'];}[_0x5799d2(0x16b)](){const _0x52a2d9=_0x5799d2;return this[_0x52a2d9(0x1d4)]!==this[_0x52a2d9(0x261)]&&(this[_0x52a2d9(0x1d4)]=this[_0x52a2d9(0x261)],this['_nodeDbCache']=this['_statusEnv'][_0x52a2d9(0x380)](_0x5919ed)[_0x52a2d9(0x241)]),this['_nodeDbCache'];}[_0x5799d2(0x2b1)](_0x39994f){const _0x3f2886=_0x5799d2;if(_0x3d246f)return this[_0x3f2886(0x16b)]()[_0x3f2886(0x1b8)](_0x39994f['nodeKey'],_0x39994f,0x1);const _0x3dccf7=this[_0x3f2886(0x16b)]()['put'](_0x39994f[_0x3f2886(0x28f)],_0x39994f,0x1);if(_0x3dccf7&&typeof _0x3dccf7[_0x3f2886(0x373)]===_0x3f2886(0x306))_0x3dccf7['then'](undefined,()=>{});return _0x3dccf7;}['_putRowSync'](_0x24da66){const _0x339724=_0x5799d2;return this[_0x339724(0x16b)]()['putSync'](_0x24da66['nodeKey'],_0x24da66,0x1);}[_0x5799d2(0x262)](_0x1cd927){const _0x140e5c=_0x5799d2;if(_0x3d246f)try{return this['_nodeDb']()[_0x140e5c(0x1d6)](_0x1cd927);}catch{return![];}const _0x1ff357=this[_0x140e5c(0x16b)]()[_0x140e5c(0x208)](_0x1cd927);if(_0x1ff357&&typeof _0x1ff357[_0x140e5c(0x373)]===_0x140e5c(0x306))_0x1ff357[_0x140e5c(0x373)](undefined,()=>{});return _0x1ff357;}async[_0x5799d2(0x178)](_0x4abd84){const _0x514821=_0x5799d2;if(!this[_0x514821(0x261)]||!this[_0x514821(0x34d)]||!_0x4abd84?.[_0x514821(0x28f)])return;return this[_0x514821(0x2b1)](_0x4abd84);}async[_0x5799d2(0x350)](_0x881ba8){const _0x1ddcbb=_0x5799d2;if(!this['_statusEnv']||!this[_0x1ddcbb(0x34d)]||!_0x881ba8)return;const _0x4d8130=_0x881ba8['includes']('#'),_0x534d0b=[];for(const {key:_0x34ce7c}of this[_0x1ddcbb(0x261)][_0x1ddcbb(0x37f)](_0x5919ed)){if(_0x34ce7c===_0x881ba8||!_0x4d8130&&typeof _0x34ce7c==='string'&&_0x34ce7c['startsWith'](_0x881ba8+'#'))_0x534d0b[_0x1ddcbb(0x31c)](_0x34ce7c);}for(const _0x22b5a7 of _0x534d0b){try{this['_nodeDb']()[_0x1ddcbb(0x1d6)](_0x22b5a7);}catch{}}}[_0x5799d2(0x1d1)](_0x14651a){const _0x54dea9=_0x5799d2;if(typeof _0x14651a?.[_0x54dea9(0x174)]!=='number')return![];if(_0x14651a['host']!==_0x3929a3[_0x54dea9(0x1ac)]())return![];if(_0x14651a[_0x54dea9(0x174)]===process[_0x54dea9(0x174)])return![];if(_0x14651a[_0x54dea9(0x26c)]!=null&&_0x14651a['expiresAt']<Date[_0x54dea9(0x309)]()-_0x436ff4)return!![];try{return process[_0x54dea9(0x29f)](_0x14651a[_0x54dea9(0x174)],0x0),![];}catch(_0x2d4d72){return _0x2d4d72[_0x54dea9(0x2cf)]==='ESRCH';}}[_0x5799d2(0x2bb)](){const _0x2aaf77=_0x5799d2;if(!this[_0x2aaf77(0x261)])return[];try{this[_0x2aaf77(0x261)]['db']?.[_0x2aaf77(0x276)]?.();}catch{}const _0x303cad=Date[_0x2aaf77(0x309)](),_0x320240=_0x3929a3['hostname'](),_0x3e67b6=[];for(const {value:_0x493fac}of this[_0x2aaf77(0x261)]['getRange'](_0x5919ed)){if(!_0x493fac)continue;let _0xff9ce8=null;_0x493fac[_0x2aaf77(0x314)]===_0x320240&&typeof _0x493fac[_0x2aaf77(0x174)]===_0x2aaf77(0x2d5)&&(_0xff9ce8=!this[_0x2aaf77(0x1d1)](_0x493fac));if(_0xff9ce8===![])continue;const _0x2277b6=_0x493fac[_0x2aaf77(0x26c)]==null||_0x493fac[_0x2aaf77(0x26c)]>=_0x303cad;if(_0xff9ce8===!![]||_0x2277b6)_0x3e67b6[_0x2aaf77(0x31c)](_0x493fac);}return _0x3e67b6;}async[_0x5799d2(0x1af)](_0x121e92=0x0){const _0x20e907=_0x5799d2;if(!this[_0x20e907(0x261)]||!this[_0x20e907(0x34d)])return;const _0x21037a=Date[_0x20e907(0x309)]()-_0x121e92,_0x11ac14=new Set(),_0x2111cb=[],_0x2e07f0=_0x3929a3[_0x20e907(0x1ac)](),_0x4772d9=require$$6['version'];for(const {key:_0x37392a,value:_0x35beab}of this[_0x20e907(0x261)]['getRange'](_0x5919ed)){if(!_0x35beab)continue;const _0x5425d6=_0x35beab['host']===_0x2e07f0&&typeof _0x35beab[_0x20e907(0x174)]===_0x20e907(0x2d5),_0x49d559=_0x5425d6?this[_0x20e907(0x1d1)](_0x35beab):_0x35beab[_0x20e907(0x26c)]!=null&&_0x35beab[_0x20e907(0x26c)]<_0x21037a;if(_0x49d559)_0x2111cb[_0x20e907(0x31c)](_0x37392a);else{_0x11ac14[_0x20e907(0x23c)](_0xce368e(_0x35beab)??_0x37392a);if(_0x35beab[_0x20e907(0x375)]&&_0x35beab['version']!==_0x4772d9){if(!this[_0x20e907(0x368)])this[_0x20e907(0x368)]=new Set();!this[_0x20e907(0x368)][_0x20e907(0x2b4)](_0x35beab[_0x20e907(0x375)])&&(this['_versionSkewWarned']['add'](_0x35beab[_0x20e907(0x375)]),this[_0x20e907(0x269)][_0x20e907(0x1a5)]?.[_0x20e907(0x19c)]?.(_0x20e907(0x2c8)+(_0x35beab[_0x20e907(0x174)]??'?')+_0x20e907(0x1b0)+_0x35beab[_0x20e907(0x375)]+'\x20while\x20this\x20process\x20runs\x20'+_0x4772d9+_0x20e907(0x211)+_0x20e907(0x235),{'feature':'migrations'}));}}}for(const _0x331b63 of _0x2111cb)this[_0x20e907(0x262)](_0x331b63);if(this[_0x20e907(0x397)]()){const _0x554198=[];for(const {key:_0x51cbb5}of this[_0x20e907(0x2c4)](_0x20e907(0x1bc))){if(!_0x11ac14[_0x20e907(0x2b4)](_0x51cbb5)){if(_0x3d246f)try{this[_0x20e907(0x247)][_0x20e907(0x1d6)](_0x20e907(0x1eb)+_0x51cbb5);}catch{}else _0x554198[_0x20e907(0x31c)](this['_desired'][_0x20e907(0x208)](_0x20e907(0x1eb)+_0x51cbb5));}}if(_0x554198['length'])await Promise['allSettled'](_0x554198);}}['startHeartbeat'](_0x3d3aa0=null){const _0x583f3b=_0x5799d2;if(this[_0x583f3b(0x1fe)])return;if(!this['_isWriter']||!this['_statusEnv']){this[_0x583f3b(0x269)]?.[_0x583f3b(0x1a5)]?.[_0x583f3b(0x19c)]?.(_0x583f3b(0x242)+this[_0x583f3b(0x34d)]+_0x583f3b(0x188)+!!this[_0x583f3b(0x261)]+_0x583f3b(0x253),{'feature':_0x583f3b(0x339)});return;}this['_onTick']=_0x3d3aa0,this[_0x583f3b(0x209)]=()=>this['_maybePublish']();for(const _0x33c61a of _0x48ceff)this[_0x583f3b(0x269)][_0x583f3b(0x312)]['on'](_0x33c61a,this['_onProcEvent']);this['_publishNow']();const _0x3f011b=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x3c3978;this['_hbTimer']=setInterval(()=>{const _0x956444=_0x583f3b;if(this[_0x956444(0x1ee)])try{this[_0x956444(0x1ee)]();}catch{}this[_0x956444(0x293)](),this['reap']()[_0x956444(0x28b)](()=>{});},_0x3f011b);if(this[_0x583f3b(0x1fe)][_0x583f3b(0x38b)])this[_0x583f3b(0x1fe)][_0x583f3b(0x38b)]();}['_maybePublish'](){const _0xa94265=_0x5799d2;if(!this[_0xa94265(0x34d)]||!this[_0xa94265(0x261)])return;if(Date[_0xa94265(0x309)]()-this[_0xa94265(0x1a1)]<_0x4f56a6)return;this[_0xa94265(0x293)]();}[_0x5799d2(0x293)](){const _0x157b44=_0x5799d2;if(!this[_0x157b44(0x34d)]||!this[_0x157b44(0x261)])return;this[_0x157b44(0x1a1)]=Date[_0x157b44(0x309)]();try{const _0x2b8834=[this[_0x157b44(0x1b6)]()];for(const _0x17d3fc of this[_0x157b44(0x2e0)][_0x157b44(0x344)]())_0x2b8834['push'](this[_0x157b44(0x245)](_0x17d3fc));const _0x456b6b=_0x415ae2[_0x157b44(0x1d8)]?_0x415ae2[_0x157b44(0x309)]():0x0;for(const _0x28ce24 of _0x2b8834){try{this[_0x157b44(0x17d)](_0x28ce24),this[_0x157b44(0x35e)]=![];}catch(_0x3fd06){!this['_publishFailWarned']&&(this['_publishFailWarned']=!![],this[_0x157b44(0x269)]?.[_0x157b44(0x1a5)]?.['warn']?.(_0x157b44(0x30f)+_0x3fd06[_0x157b44(0x16c)],{'feature':_0x157b44(0x339)}));}}if(_0x415ae2['enabled'])_0x415ae2[_0x157b44(0x1bf)](_0x157b44(0x1a4),_0x415ae2[_0x157b44(0x309)]()-_0x456b6b,_0x157b44(0x1b3)+_0x2b8834[_0x157b44(0x330)]+_0x157b44(0x1f1));}catch(_0x2d2ce7){!this[_0x157b44(0x35e)]&&(this[_0x157b44(0x35e)]=!![],this[_0x157b44(0x269)]?.[_0x157b44(0x1a5)]?.[_0x157b44(0x19c)]?.(_0x157b44(0x30f)+_0x2d2ce7[_0x157b44(0x16c)],{'feature':_0x157b44(0x339)}));}}async['stopHeartbeat'](){const _0x2d250f=_0x5799d2;if(this['_onProcEvent']){for(const _0x63d993 of _0x48ceff){try{this[_0x2d250f(0x269)]['events']['off'](_0x63d993,this[_0x2d250f(0x209)]);}catch{}}this[_0x2d250f(0x209)]=null;}this[_0x2d250f(0x1fe)]&&(clearInterval(this[_0x2d250f(0x1fe)]),this[_0x2d250f(0x1fe)]=null);try{if(this['_statusEnv']&&this[_0x2d250f(0x34d)])await this[_0x2d250f(0x350)](this[_0x2d250f(0x298)]);}catch{}}async['deregisterSelf'](){const _0x3698a7=_0x5799d2;if(!this[_0x3698a7(0x261)]||!this[_0x3698a7(0x34d)])return;try{await this[_0x3698a7(0x350)](this[_0x3698a7(0x298)]);}catch{}try{const _0x67d76b=[];for(const {value:_0x135bd7}of this['_statusEnv'][_0x3698a7(0x37f)](_0x5919ed)){if(_0x135bd7?.[_0x3698a7(0x2d1)]===process[_0x3698a7(0x174)]&&_0x135bd7[_0x3698a7(0x28f)])_0x67d76b['push'](_0x135bd7[_0x3698a7(0x28f)]);}for(const _0x175c26 of _0x67d76b){try{await this['removeNode'](_0x175c26);}catch{}}}catch{}}async['publishOwnRow'](){const _0x233ec5=_0x5799d2;return this[_0x233ec5(0x178)](this[_0x233ec5(0x1b6)]());}async[_0x5799d2(0x2f9)](_0x30042f){const _0x104913=_0x5799d2;if(!this[_0x104913(0x261)]||!this[_0x104913(0x34d)])return;return this[_0x104913(0x178)](this['_buildChildRow'](_0x30042f));}[_0x5799d2(0x245)]({pid:_0x50397f,startedAt:_0x2dd67d,kind:_0x485fcd,supervisorKey:_0x13cf95,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x5799d2(0x1c1),meta:meta=null,stats:stats=null}){const _0x43d64e=_0x5799d2,_0x305c14=Date['now'](),_0x21ca61=_0x5d6437(_0x50397f,_0x2dd67d);return{'nodeKey':_0x6e86fb(_0x21ca61,'0'),'processKey':_0x21ca61,'instanceId':'0','pid':_0x50397f,'startedAt':_0x2dd67d,'ppid':process[_0x43d64e(0x174)],'host':_0x3929a3[_0x43d64e(0x1ac)](),'supervisorKey':_0x13cf95,'slot':slot,'slotKey':slotKey,'kind':_0x485fcd,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x305c14,'expiresAt':_0x305c14+_0x10928f,'caps':this[_0x43d64e(0x2ad)](_0x485fcd,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x5799d2(0x2c9)](_0x6b03af){const _0x521ee3=_0x5799d2;if(!_0x6b03af?.[_0x521ee3(0x174)])return null;const _0x1c61d2=_0x5d6437(_0x6b03af['pid'],_0x6b03af[_0x521ee3(0x37b)]);this[_0x521ee3(0x2e0)]['set'](_0x1c61d2,{..._0x6b03af,'supervisorKey':_0x6b03af[_0x521ee3(0x1f6)]??this[_0x521ee3(0x362)]});if(this[_0x521ee3(0x34d)])await this[_0x521ee3(0x2f9)](this[_0x521ee3(0x2e0)]['get'](_0x1c61d2))[_0x521ee3(0x28b)]?.(()=>{});return _0x1c61d2;}[_0x5799d2(0x367)](_0x52022e){const _0x1c63c9=_0x5799d2;if(!_0x52022e)return;return this[_0x1c63c9(0x2e0)][_0x1c63c9(0x18b)](_0x52022e),this['removeNode'](_0x52022e);}[_0x5799d2(0x1fc)](){const _0x158bb0=_0x5799d2,_0x12f57e=Date[_0x158bb0(0x309)](),_0x39c378=process[_0x158bb0(0x18c)](),_0x50d167=(_0x12f57e-this[_0x158bb0(0x22b)])*0x3e8;if(_0x50d167>=0x3d090){const _0xd20142=_0x39c378[_0x158bb0(0x33e)]-this[_0x158bb0(0x348)][_0x158bb0(0x33e)]+(_0x39c378[_0x158bb0(0x29d)]-this[_0x158bb0(0x348)][_0x158bb0(0x29d)]),_0xa20ed4=_0x3929a3[_0x158bb0(0x21a)]()['length']||0x1;this[_0x158bb0(0x193)]=Math[_0x158bb0(0x1e4)](0x64,Math[_0x158bb0(0x2aa)](_0xd20142/(_0x50d167*_0xa20ed4)*0x64)),this[_0x158bb0(0x218)]=Math[_0x158bb0(0x2aa)](_0x50d167/0x3e8),this['_lastCpuUsage']=_0x39c378,this[_0x158bb0(0x22b)]=_0x12f57e;}const _0x1adcdd=process[_0x158bb0(0x2f5)](),_0x149a9b=this[_0x158bb0(0x1da)][_0x158bb0(0x33c)];let _0x47b82c=0x0;if(_0x149a9b>0x0){const _0x3b2dd8=[this['okdb'],...this[_0x158bb0(0x269)][_0x158bb0(0x238)]?.[_0x158bb0(0x344)]?.()??[]];for(const _0x118ba6 of _0x3b2dd8){const _0x1b0ac5=_0x118ba6['functions']?.[_0x158bb0(0x169)];if(_0x1b0ac5)_0x47b82c+=_0x1b0ac5['liveThreadStats'][_0x158bb0(0x2f4)];}}let _0x169738=null;const _0x357b25=_0x149a9b;if(_0x357b25>0x0){let _0x1acb2e=0x0;for(const _0x5cbb20 of this['_threadStats']['values']())_0x1acb2e+=_0x5cbb20[_0x158bb0(0x191)]||0x0;_0x169738={'count':_0x357b25,'heapUsed':_0x1acb2e,'sandbox':_0x149a9b,'busy':_0x47b82c};}return{'rss':_0x1adcdd[_0x158bb0(0x2b9)],'heapUsed':_0x1adcdd[_0x158bb0(0x191)],'heapTotal':_0x1adcdd[_0x158bb0(0x267)],'external':_0x1adcdd[_0x158bb0(0x23b)],'cpuPct':this[_0x158bb0(0x193)],'cpuWindowMs':this[_0x158bb0(0x218)]??null,'threads':_0x169738,'at':_0x12f57e};}[_0x5799d2(0x274)](_0x1fee77,_0x1639c3){const _0x19c8de=_0x5799d2;if(!_0x1fee77||!_0x1639c3)return;this[_0x19c8de(0x1da)]['set'](_0x1fee77,_0x1639c3);}[_0x5799d2(0x378)](_0x4aa777){const _0x56e9ff=_0x5799d2;this[_0x56e9ff(0x1da)]['delete'](_0x4aa777);}['updateSupervisedChildStats'](_0x526295,_0x17042d,_0x5df8f9=undefined){const _0x377c40=_0x5799d2,_0x251d7a=this[_0x377c40(0x2e0)]['get'](_0x526295);if(!_0x251d7a||!_0x17042d)return;if(_0x5df8f9!==undefined)_0x251d7a[_0x377c40(0x16f)]=_0x5df8f9;_0x251d7a['stats']={'rss':_0x17042d[_0x377c40(0x2b9)]??null,'heapUsed':_0x17042d[_0x377c40(0x191)]??null,'heapTotal':_0x17042d[_0x377c40(0x267)]??null,'external':_0x17042d[_0x377c40(0x23b)]??null,'cpuPct':_0x17042d[_0x377c40(0x19a)]??null,'cpuWindowMs':_0x17042d[_0x377c40(0x2ec)]??null,'threads':_0x17042d[_0x377c40(0x1b2)]??null,'claims':_0x17042d[_0x377c40(0x287)]??null,'envsOpen':_0x17042d['envsOpen']??null,'at':Date[_0x377c40(0x309)]()};}[_0x5799d2(0x1b6)](){const _0xca4f18=_0x5799d2,_0x8d5f40=Date[_0xca4f18(0x309)](),_0xecfaeb=this[_0xca4f18(0x269)][_0xca4f18(0x2be)]||{},_0x1aa782=this['_kind']||_0xca4f18(0x2ac);return{'nodeKey':this[_0xca4f18(0x298)],'processKey':this['_selfKey'],'instanceId':this['_instanceId'],'pid':process[_0xca4f18(0x174)],'startedAt':this[_0xca4f18(0x183)],'instanceStartedAt':this[_0xca4f18(0x1ec)],'ppid':typeof process[_0xca4f18(0x2d1)]===_0xca4f18(0x2d5)?process[_0xca4f18(0x2d1)]:null,'host':_0x3929a3[_0xca4f18(0x1ac)](),'supervisorKey':this[_0xca4f18(0x168)]??null,'version':require$$6['version'],'kind':_0x1aa782,'role':{'engines':!!_0xecfaeb[_0xca4f18(0x360)],'processors':!!_0xecfaeb[_0xca4f18(0x1d3)],'compaction':_0xecfaeb['compaction'],'http':_0xecfaeb[_0xca4f18(0x371)]},'listenAddr':this[_0xca4f18(0x181)]??null,'heartbeatAt':_0x8d5f40,'expiresAt':_0x8d5f40+_0x10928f,'caps':this[_0xca4f18(0x2ad)](_0x1aa782,_0xecfaeb),'lifecycle':{'state':_0xca4f18(0x1c1),'desiredVersionApplied':null},'meta':{...this[_0xca4f18(0x201)]},'processing':_0xecfaeb[_0xca4f18(0x1d3)]?this['_buildProcessingFacet']():null,'engines':_0xecfaeb[_0xca4f18(0x360)]?[...this[_0xca4f18(0x269)][_0xca4f18(0x307)]??[]]:null,'singletonClaims':this[_0xca4f18(0x1e5)](),'stats':this[_0xca4f18(0x1fc)](),'writers':this[_0xca4f18(0x185)]()};}[_0x5799d2(0x185)](){const _0x12c287=_0x5799d2,_0x5e482a={};try{for(const [_0x4a48f9,_0x25d25c]of this[_0x12c287(0x269)][_0x12c287(0x238)]){try{const _0x2a4f15=_0x25d25c[_0x12c287(0x1f2)]?.();if(!_0x2a4f15)continue;if(!_0x2a4f15[_0x12c287(0x24a)]&&!_0x2a4f15['committed']&&!(_0x2a4f15[_0x12c287(0x323)]??0x0)&&!_0x2a4f15[_0x12c287(0x2fe)])continue;_0x5e482a[_0x4a48f9]={'depth':_0x2a4f15['depth'],'oldestPendingMs':_0x2a4f15['oldestPendingMs'],'committed':_0x2a4f15[_0x12c287(0x2e7)],'commitsPerSec':_0x2a4f15[_0x12c287(0x37d)],'commitP99Ms':_0x2a4f15[_0x12c287(0x22d)],'parkedNow':_0x2a4f15['parkedNow']??0x0,'draining':!!_0x2a4f15[_0x12c287(0x2fe)]};}catch{}}}catch{}return Object[_0x12c287(0x305)](_0x5e482a)[_0x12c287(0x330)]?_0x5e482a:null;}[_0x5799d2(0x1e5)](){const _0x205fc4=_0x5799d2,_0x56f46e=process[_0x205fc4(0x174)],_0x439250=Date[_0x205fc4(0x309)](),_0x471af0=_0x33f1de=>{const _0x422cb8=_0x205fc4;if(!_0x33f1de)return[];const _0x18ca92=[];try{for(const {id:_0x28bb6f,entry:_0x532a2b}of _0x33f1de[_0x422cb8(0x2ef)]()){if(_0x532a2b?.['holder']?.[_0x422cb8(0x174)]!==_0x56f46e)continue;const _0x88f56b=_0x532a2b[_0x422cb8(0x26a)]??_0x532a2b[_0x422cb8(0x263)]??0x0;if(_0x88f56b+(_0x532a2b[_0x422cb8(0x28a)]??0x0)<_0x439250)continue;_0x18ca92['push'](_0x28bb6f);}}catch{}return _0x18ca92;},_0x28a3d3=_0x471af0(this['_singletonLock'](_0x205fc4(0x1c9))),_0x3e0fc7=_0x471af0(this[_0x205fc4(0x20f)](_0x205fc4(0x328)));if(!_0x28a3d3['length']&&!_0x3e0fc7[_0x205fc4(0x330)])return null;return{'compact':_0x28a3d3,'replicate':_0x3e0fc7};}[_0x5799d2(0x20f)](_0x57dbf8){const _0x21c26b=_0x5799d2;if(!this[_0x21c26b(0x269)]?.[_0x21c26b(0x1ed)])return null;if(!this[_0x21c26b(0x282)])this[_0x21c26b(0x282)]=new Map();let _0x589f91=this['_singletonLocks'][_0x21c26b(0x2d9)](_0x57dbf8);if(!_0x589f91)try{_0x589f91=new _0x3fea87(this[_0x21c26b(0x269)]['_rootDb'],{'namespace':_0x57dbf8}),this['_singletonLocks']['set'](_0x57dbf8,_0x589f91);}catch{return null;}return _0x589f91;}[_0x5799d2(0x2d8)](){const _0x54792b=_0x5799d2,_0x307c7e=[];try{for(const [_0x49f4c8,_0xa758fe]of this[_0x54792b(0x269)][_0x54792b(0x238)]){if(_0x49f4c8[_0x54792b(0x1cd)]('~'))continue;for(const _0x1a9f46 of _0xa758fe[_0x54792b(0x26e)]['tierList']())_0x307c7e[_0x54792b(0x31c)]({..._0x1a9f46,'env':_0x49f4c8});}}catch{}return{'participate':this[_0x54792b(0x269)][_0x54792b(0x1d3)]?.['_participate']??![],'processors':_0x307c7e};}['_ensureDesired'](){const _0x877f23=_0x5799d2;if(this[_0x877f23(0x247)])return!![];const _0x46b9b2=this[_0x877f23(0x269)][_0x877f23(0x1ed)];if(!_0x46b9b2)return![];return this['_desired']=_0x46b9b2[_0x877f23(0x2a7)](_0x3cbef9,{'dupSort':![]}),this['_cmd']=_0x46b9b2[_0x877f23(0x2a7)](_0x2b9a46,{'dupSort':![]}),!![];}async[_0x5799d2(0x2e6)](){const _0x197d2e=_0x5799d2;if(!this[_0x197d2e(0x397)]())return;const _0x3c69b3=_0x197d2e(0x1e3),_0x1d41d7=0x1,_0x2636e3=this[_0x197d2e(0x247)]['get'](_0x3c69b3)??0x0;if(_0x2636e3>=_0x1d41d7)return;const _0x395d01=_0x3cbff9=>{const _0x1f91aa=_0x197d2e;if(_0x3cbff9===_0x1f91aa(0x35f))return _0x1f91aa(0x27f);if(_0x3cbff9===_0x1f91aa(0x1ce))return _0x1f91aa(0x30a);return _0x3cbff9;};await this['okdb'][_0x197d2e(0x35a)][_0x197d2e(0x179)][_0x197d2e(0x2a3)](()=>{const _0x3c44bc=_0x197d2e;for(const _0x4d3fe3 of['procmode/',_0x3c44bc(0x1f5)]){for(const {key:_0x180fc6,value:_0x2cabbf}of this[_0x3c44bc(0x247)][_0x3c44bc(0x37f)]({'start':_0x4d3fe3,'end':_0x4d3fe3+'\xff'})){if(typeof _0x180fc6!==_0x3c44bc(0x19e)||!_0x180fc6[_0x3c44bc(0x1cd)](_0x4d3fe3))break;const _0x51880b=_0x395d01(_0x2cabbf[_0x3c44bc(0x24e)]);if(_0x51880b!==_0x2cabbf[_0x3c44bc(0x24e)])this['_desired'][_0x3c44bc(0x25d)](_0x180fc6,{..._0x2cabbf,'mode':_0x51880b});}}this[_0x3c44bc(0x247)][_0x3c44bc(0x25d)](_0x3c69b3,_0x1d41d7);});}['hasDesired'](){const _0x27089b=_0x5799d2;return!!this[_0x27089b(0x247)];}[_0x5799d2(0x21b)](_0x3e9b63,_0x12f836){const _0x21173a=_0x5799d2;if(!this[_0x21173a(0x397)]())return null;const _0x1333b1=_0x3e9b63+'/'+_0x12f836;return this['_refreshDesiredSnapshot'](),this[_0x21173a(0x318)][_0x21173a(0x2d9)](_0x1333b1)??this['_desired'][_0x21173a(0x2d9)](_0x1333b1)??null;}[_0x5799d2(0x355)](){const _0x3efe10=_0x5799d2;if(!_0x3d246f)return;try{this['okdb'][_0x3efe10(0x35a)]?.['db']?.[_0x3efe10(0x276)]?.();}catch{}}async[_0x5799d2(0x31b)](_0x5a397c,_0x54b360,_0x22d230){const _0x349f72=_0x5799d2;if(!this[_0x349f72(0x397)]())return null;const _0x3de363=_0x5a397c+'/'+_0x54b360;this[_0x349f72(0x355)]();const _0x5b5200=this[_0x349f72(0x318)][_0x349f72(0x2d9)](_0x3de363)??this[_0x349f72(0x247)]['get'](_0x3de363)??{'version':0x0},_0x5d5126=(_0x5b5200[_0x349f72(0x375)]||0x0)+0x1,_0x3a3491={..._0x5b5200,..._0x22d230,'version':_0x5d5126,'updatedAt':Date[_0x349f72(0x309)]()};this[_0x349f72(0x318)][_0x349f72(0x335)](_0x3de363,_0x3a3491);try{await this[_0x349f72(0x269)][_0x349f72(0x35a)][_0x349f72(0x179)][_0x349f72(0x2a3)](()=>{const _0x4a25d7=_0x349f72;this[_0x4a25d7(0x247)][_0x4a25d7(0x25d)](_0x3de363,_0x3a3491);});}finally{if(this[_0x349f72(0x318)][_0x349f72(0x2d9)](_0x3de363)===_0x3a3491)this[_0x349f72(0x318)][_0x349f72(0x18b)](_0x3de363);}return _0x5d5126;}[_0x5799d2(0x2c4)](_0x17bacf){const _0x3c30ff=_0x5799d2;if(!this['_ensureDesired']())return[];this[_0x3c30ff(0x355)]();const _0x58a82c=_0x17bacf+'/',_0x508531=[];for(const {key:_0x3270f1,value:_0x3bf6c6}of this[_0x3c30ff(0x247)][_0x3c30ff(0x37f)]({'start':_0x58a82c,'end':_0x58a82c+'\xff'})){if(typeof _0x3270f1!=='string'||!_0x3270f1[_0x3c30ff(0x1cd)](_0x58a82c))break;_0x508531['push']({'key':_0x3270f1[_0x3c30ff(0x26d)](_0x58a82c[_0x3c30ff(0x330)]),'value':_0x3bf6c6});}return _0x508531;}[_0x5799d2(0x27a)](_0x1af053){const _0x2e753d=_0x5799d2;if(!this[_0x2e753d(0x397)]())return null;return this[_0x2e753d(0x1b1)][_0x2e753d(0x2d9)](_0x1af053)??null;}async[_0x5799d2(0x1ad)](_0x24b56d,_0x35e0e3,_0xacc9f9={}){const _0x1546a8=_0x5799d2;if(!this[_0x1546a8(0x397)]())return null;let _0x3cbabe;return await this[_0x1546a8(0x269)][_0x1546a8(0x35a)][_0x1546a8(0x179)]['transaction'](()=>{const _0x4a56e0=_0x1546a8,_0x3dc966=this[_0x4a56e0(0x1b1)][_0x4a56e0(0x2d9)](_0x24b56d)||{'epoch':0x0};_0x3cbabe=(_0x3dc966[_0x4a56e0(0x229)]||0x0)+0x1,this['_cmd'][_0x4a56e0(0x25d)](_0x24b56d,{..._0x3dc966,..._0xacc9f9,'cmd':_0x35e0e3,'epoch':_0x3cbabe,'updatedAt':Date[_0x4a56e0(0x309)]()});}),_0x3cbabe;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x57ebda,'nodeKey':_0x5d6437,'logicalKey':_0x29c110,'slotKey':_0x1453c9,'PROCESS_ENV':_0x45a41f,'NODE_TYPE':_0x5919ed},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x13b021=_0x37b856;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x8cb31c=require$$0$4,{EVENTS:_0x5a527d,CHANGE_ACTIONS:_0x49e9bc}=requireOkdbEnums(),{LOOP:_0x532388}=requireOkdbLoopMonitor(),_0x594125=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x47a1b8=0x5,_0x50e254=0x2710;class _0x4f0f5b extends _0x8cb31c{constructor(_0x2f53f8,_0x20c55e={}){const _0x33eebd=_0x5e6c;super(),this[_0x33eebd(0x269)]=_0x2f53f8,this['_quantum']=_0x20c55e[_0x33eebd(0x359)]??_0x594125,this[_0x33eebd(0x2c2)]=_0x20c55e[_0x33eebd(0x390)]??_0x47a1b8,this[_0x33eebd(0x230)]=_0x20c55e[_0x33eebd(0x336)]??_0x50e254,this[_0x33eebd(0x2ea)]=![],this[_0x33eebd(0x32f)]=new Map(),this['_baselines']=new Map(),this[_0x33eebd(0x194)]=new Map(),this[_0x33eebd(0x2cc)]=null,this['_draining']=![],this[_0x33eebd(0x240)]=new Set(),this[_0x33eebd(0x352)]=_0x3e8934=>this[_0x33eebd(0x1f9)](_0x3e8934),this[_0x33eebd(0x202)]=_0x12a4a6=>this['_handlePoke'](_0x12a4a6),this[_0x33eebd(0x36a)]=()=>this[_0x33eebd(0x294)]();}[_0x13b021(0x2c5)](){const _0x41c0b3=_0x13b021;if(this[_0x41c0b3(0x2ea)])return;this[_0x41c0b3(0x2ea)]=!![];for(const [_0x4358cf,_0x5782ec]of this[_0x41c0b3(0x269)]['_envs']){if(_0x4358cf['startsWith']('~'))continue;try{_0x5782ec['_enableChangelog']();}catch{}}for(const [_0xf464b4,_0x2ebde9]of this[_0x41c0b3(0x269)]['_envs']){if(_0xf464b4[_0x41c0b3(0x1cd)]('~'))continue;try{this[_0x41c0b3(0x2e5)][_0x41c0b3(0x335)](_0xf464b4,_0x2ebde9[_0x41c0b3(0x1ef)]()||0x0);}catch{}}const {events:_0x4588c2}=this[_0x41c0b3(0x269)];_0x4588c2['on'](_0x5a527d['ITEM_CREATE'],this['_onItem']),_0x4588c2['on'](_0x5a527d['ITEM_UPDATE'],this[_0x41c0b3(0x352)]),_0x4588c2['on'](_0x5a527d[_0x41c0b3(0x30e)],this[_0x41c0b3(0x352)]),_0x4588c2['on'](_0x5a527d[_0x41c0b3(0x388)],this[_0x41c0b3(0x202)]),_0x4588c2['once'](_0x5a527d['SYSTEM_STOPPED'],this[_0x41c0b3(0x36a)]);}[_0x13b021(0x294)](){const _0x23a3d3=_0x13b021;if(!this[_0x23a3d3(0x2ea)])return;this[_0x23a3d3(0x2ea)]=![];const {events:_0x520caa}=this[_0x23a3d3(0x269)];_0x520caa[_0x23a3d3(0x36f)](_0x5a527d[_0x23a3d3(0x2b5)],this[_0x23a3d3(0x352)]),_0x520caa[_0x23a3d3(0x36f)](_0x5a527d[_0x23a3d3(0x244)],this[_0x23a3d3(0x352)]),_0x520caa['off'](_0x5a527d[_0x23a3d3(0x30e)],this[_0x23a3d3(0x352)]),_0x520caa[_0x23a3d3(0x36f)](_0x5a527d[_0x23a3d3(0x388)],this['_onPoke']);try{_0x520caa[_0x23a3d3(0x36f)](_0x5a527d[_0x23a3d3(0x167)],this[_0x23a3d3(0x36a)]);}catch{}this[_0x23a3d3(0x2cc)]&&(clearTimeout(this[_0x23a3d3(0x2cc)]),this['_flushTimer']=null),this['_pending']['clear'](),this[_0x23a3d3(0x32f)][_0x23a3d3(0x1c7)](),this[_0x23a3d3(0x2e5)][_0x23a3d3(0x1c7)](),this['_seen'][_0x23a3d3(0x1c7)]();}[_0x13b021(0x200)](_0x108f42,_0x1945c5,_0x3aea4a,_0x33e303){return _0x108f42+'\x00'+_0x1945c5+'\x00'+_0x3aea4a+'\x00'+_0x33e303;}[_0x13b021(0x1e1)](_0x24cbaf,_0x32ad2d,_0xe8a6fa,_0x52dba3){const _0x3d98f3=_0x13b021,_0x52b1c8=this[_0x3d98f3(0x200)](_0x24cbaf,_0x32ad2d,_0xe8a6fa,_0x52dba3);if(this['_seen']['has'](_0x52b1c8))return![];this[_0x3d98f3(0x240)][_0x3d98f3(0x23c)](_0x52b1c8);if(this['_seen'][_0x3d98f3(0x33c)]>this['_dedupeMax']){const _0xdf91d8=this[_0x3d98f3(0x240)][_0x3d98f3(0x344)]()[_0x3d98f3(0x33a)]()['value'];this[_0x3d98f3(0x240)]['delete'](_0xdf91d8);}return!![];}['_handleInProcess'](_0x57d7a0){const _0x57fd36=_0x13b021;if(!this[_0x57fd36(0x2ea)]||!_0x57d7a0)return;const {env:_0x5d35f8,type:_0x5d58bb,key:_0x23f16b,clock:_0x36af5b,origin:_0x4c8db1,action:_0x1cbdb9,newValue:_0xd979f9,oldValue:_0x8398b6}=_0x57d7a0;if(_0x5d35f8==null||_0x5d58bb==null||_0x23f16b==null)return;if(typeof _0x5d35f8==='string'&&_0x5d35f8[_0x57fd36(0x1cd)]('~'))return;if(typeof _0x5d58bb===_0x57fd36(0x19e)&&_0x5d58bb[_0x57fd36(0x1cd)]('~'))return;if(!this['_markSeen'](_0x5d35f8,_0x5d58bb,_0x23f16b,_0x36af5b))return;const _0x230a42=_0x1cbdb9===_0x49e9bc[_0x57fd36(0x343)]?_0x57fd36(0x208):_0x57fd36(0x25d);this[_0x57fd36(0x38f)](_0x57fd36(0x289),{'env':_0x5d35f8,'type':_0x5d58bb,'key':_0x23f16b,'op':_0x230a42,'clock':_0x36af5b,'origin':_0x4c8db1,'value':_0x230a42==='remove'?null:_0xd979f9,'prevValue':_0x8398b6});}[_0x13b021(0x2c3)](_0x2e7051){const _0x485a6a=_0x13b021;if(!this[_0x485a6a(0x2ea)])return;if(!_0x2e7051||typeof _0x2e7051[_0x485a6a(0x377)]!==_0x485a6a(0x19e)||typeof _0x2e7051[_0x485a6a(0x288)]!=='string')return;const {env:_0x1dc826,type:_0x42c6ae}=_0x2e7051;if(_0x1dc826[_0x485a6a(0x1cd)]('~')||_0x42c6ae[_0x485a6a(0x1cd)]('~'))return;this[_0x485a6a(0x194)][_0x485a6a(0x335)](_0x1dc826+'\x00'+_0x42c6ae,{'env':_0x1dc826,'type':_0x42c6ae}),this[_0x485a6a(0x16e)]();}['_scheduleFlush'](){const _0x34bc55=_0x13b021;if(this[_0x34bc55(0x2cc)])return;const _0x37d339=()=>{const _0x1eaf60=_0x34bc55;this['_flushTimer']=null,this['_drain']()[_0x1eaf60(0x28b)](()=>{});};this[_0x34bc55(0x2cc)]=setTimeout(_0x37d339,this[_0x34bc55(0x2c2)]>0x0?this[_0x34bc55(0x2c2)]:0x0);}async[_0x13b021(0x2e8)](){const _0x47d4b5=_0x13b021;if(this[_0x47d4b5(0x363)]){this[_0x47d4b5(0x16e)]();return;}this[_0x47d4b5(0x363)]=!![];try{const _0x21faa9=[...this[_0x47d4b5(0x194)][_0x47d4b5(0x344)]()];this[_0x47d4b5(0x194)][_0x47d4b5(0x1c7)]();let _0x170aa4=![];for(const {env:_0x18b8da,type:_0x358b83}of _0x21faa9){try{const _0x13aec5=await this['_drainOne'](_0x18b8da,_0x358b83);if(_0x13aec5)_0x170aa4=!![];}catch{this[_0x47d4b5(0x194)][_0x47d4b5(0x335)](_0x18b8da+'\x00'+_0x358b83,{'env':_0x18b8da,'type':_0x358b83}),_0x170aa4=!![];}}if(_0x170aa4||this[_0x47d4b5(0x194)][_0x47d4b5(0x33c)]>0x0)this[_0x47d4b5(0x16e)]();}finally{this[_0x47d4b5(0x363)]=![];}}async['_drainOne'](_0x16eab2,_0x55bd27){const _0x121c24=_0x13b021,_0xb68b38=await this[_0x121c24(0x269)][_0x121c24(0x2c1)](_0x16eab2),_0x9f7dc9=_0x16eab2+'\x00'+_0x55bd27;!this[_0x121c24(0x32f)][_0x121c24(0x2b4)](_0x9f7dc9)&&(!this['_baselines'][_0x121c24(0x2b4)](_0x16eab2)&&(_0xb68b38[_0x121c24(0x38c)](),this[_0x121c24(0x2e5)][_0x121c24(0x335)](_0x16eab2,_0xb68b38[_0x121c24(0x1ef)]()||0x0)),this[_0x121c24(0x32f)][_0x121c24(0x335)](_0x9f7dc9,this[_0x121c24(0x2e5)][_0x121c24(0x2d9)](_0x16eab2)));const _0x1f5c56=this[_0x121c24(0x32f)][_0x121c24(0x2d9)](_0x9f7dc9),_0x3b5eb7=_0xb68b38['getClock'](_0x55bd27)||0x0;if(_0x3b5eb7<=_0x1f5c56)return![];const _0xc8f920=_0x1f5c56+this[_0x121c24(0x21c)],_0xf39c99=Math['min'](_0x3b5eb7,_0xc8f920),_0x47d38e=_0x532388[_0x121c24(0x1d8)]?_0x532388[_0x121c24(0x309)]():0x0,_0x463ce9=Array[_0x121c24(0x310)](_0xb68b38[_0x121c24(0x29b)](_0x55bd27,_0x1f5c56+0x1,_0xf39c99));let _0x3ec647=_0x1f5c56;for(const _0xd6c0d6 of _0x463ce9){const {clock:_0x66845e,key:_0x4b9f48,action:_0x560b09,origin:_0x5821ad}=_0xd6c0d6;if(_0x66845e>_0x3ec647)_0x3ec647=_0x66845e;if(_0x4b9f48==null)continue;if(!this['_markSeen'](_0x16eab2,_0x55bd27,_0x4b9f48,_0x66845e))continue;let _0x1ef202,_0x3b7be0;if(_0x560b09===_0x49e9bc[_0x121c24(0x343)])_0x1ef202=_0x121c24(0x208),_0x3b7be0=null;else{const _0xc36658=_0xb68b38[_0x121c24(0x2d9)](_0x55bd27,_0x4b9f48);_0xc36658==null?(_0x1ef202='remove',_0x3b7be0=null):(_0x1ef202=_0x121c24(0x25d),_0x3b7be0=_0xc36658);}this[_0x121c24(0x38f)](_0x121c24(0x289),{'env':_0x16eab2,'type':_0x55bd27,'key':_0x4b9f48,'op':_0x1ef202,'clock':_0x66845e,'origin':_0x5821ad,'value':_0x3b7be0});}if(_0x532388['enabled'])_0x532388[_0x121c24(0x1bf)](_0x121c24(0x19d)+_0x16eab2+':'+_0x55bd27,_0x532388[_0x121c24(0x309)]()-_0x47d38e,'n='+_0x463ce9[_0x121c24(0x330)]);return this[_0x121c24(0x32f)][_0x121c24(0x335)](_0x9f7dc9,Math[_0x121c24(0x1b4)](_0x3ec647,_0xf39c99)),_0xb68b38[_0x121c24(0x1ef)](_0x55bd27)>_0xf39c99;}[_0x13b021(0x319)](){const _0x232658=_0x13b021;return{'started':this[_0x232658(0x2ea)],'quantum':this[_0x232658(0x21c)],'flushDebounce':this[_0x232658(0x2c2)],'cursors':Object['fromEntries']([...this[_0x232658(0x32f)][_0x232658(0x2f1)]()][_0x232658(0x2b2)](([_0xcd804a,_0x5101f0])=>[_0xcd804a[_0x232658(0x1d7)]('\x00',':'),_0x5101f0])),'pending':this['_pending']['size'],'seen':this[_0x232658(0x240)]['size']};}}return _0x4f0f5b[_0x13b021(0x2a6)]=_0x594125,okdbChangefeed={'OKDBChangefeed':_0x4f0f5b},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x5a63ba=_0x37b856;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x3f2a8c=require$$1$1,_0x4fa879=require$$1,{EVENTS:_0x371daa}=requireOkdbEnums(),_0x31e10c=require$$0$3,{slotKey:_0x83092e}=requireOkdbProcessRegistry(),_0x39d48e=0xfa,_0x1c105c=0xfa0,_0x23e868=0x5,_0x542b9f=0x2710,_0x515b32=0xbb8,_0x20aad3=0x7d0,_0x541d5c=_0x5a63ba(0x1fd),_0x27ae24=_0x5a63ba(0x182),_0x13e283=_0x5a63ba(0x1a5),_0x46180a=_0x5a63ba(0x256),_0x49c777=[_0x371daa[_0x5a63ba(0x2fb)],_0x371daa['FTS_REGISTERED'],_0x371daa[_0x5a63ba(0x2b6)],_0x371daa[_0x5a63ba(0x1a3)],_0x371daa[_0x5a63ba(0x2f2)],_0x371daa[_0x5a63ba(0x2cd)],_0x371daa[_0x5a63ba(0x2e4)],_0x371daa[_0x5a63ba(0x214)],'processor:ready',_0x5a63ba(0x2d4),_0x5a63ba(0x1ea),_0x5a63ba(0x2cb),_0x5a63ba(0x18e),_0x5a63ba(0x24d)],_0x56ec29=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x21b5b1({workers:_0x2a7023,makeOkdb:_0x17b2e9,port:_0x4ebc79,primaryOkdb:_0x28f706,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x401ef3=_0x5a63ba;if(_0x3f2a8c[_0x401ef3(0x1e7)])return childEntry&&_0x3f2a8c['setupPrimary']({'exec':_0x4fa879['join'](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0xebedd6=_0x401ef3,_0x19c7cc=[];for(let _0x5a0515=0x0;_0x5a0515<process[_0xebedd6(0x387)]['length'];_0x5a0515++){const _0x946989=process[_0xebedd6(0x387)][_0x5a0515];if(_0x946989[_0xebedd6(0x1cd)](_0xebedd6(0x18f))||_0x946989[_0xebedd6(0x1cd)]('--watch')||_0x946989[_0xebedd6(0x1cd)](_0xebedd6(0x273)))continue;if(_0x946989==='-e'||_0x946989===_0xebedd6(0x316)||_0x946989==='-p'||_0x946989==='--print'){_0x5a0515++;continue;}_0x19c7cc[_0xebedd6(0x31c)](_0x946989);}return _0x19c7cc;})())}),_0x1cc9c4({'workers':_0x2a7023,'port':_0x4ebc79,'primaryOkdb':_0x28f706,'workerEnv':workerEnv});return _0x23abbb({'makeOkdb':_0x17b2e9,'port':_0x4ebc79});}function _0x1cc9c4({workers:_0x3574a2,port:_0x5a3e52,primaryOkdb:_0x415a24,workerEnv:_0x294d09}){const _0x184286=_0x5a63ba,_0x410883=new Map(),_0x43af35=new Map();let _0x365a7c=![];const _0x332977=_0x145763=>_0x145763?.['__okdbSlot'],_0x245e6b=_0x769ec9=>{const _0x2e891f=_0x5e6c,_0x28f6d4=_0x3f2a8c[_0x2e891f(0x258)]({...process.env,..._0x294d09||{},'OKDB_CLUSTER_SLOT':String(_0x769ec9)});return _0x28f6d4[_0x2e891f(0x2a9)]=_0x769ec9,_0x410883[_0x2e891f(0x335)](_0x28f6d4[_0x2e891f(0x1f4)][_0x2e891f(0x174)],{'worker':_0x28f6d4,'startedAt':Date[_0x2e891f(0x309)](),'slot':_0x769ec9}),_0x28f6d4['on'](_0x2e891f(0x326),_0x354a96=>{const _0x1481ca=_0x2e891f;console[_0x1481ca(0x1a5)](_0x1481ca(0x395)+_0x28f6d4['process'][_0x1481ca(0x174)]+'\x20ipc\x20error:\x20'+(_0x354a96?.[_0x1481ca(0x16c)]??_0x354a96));}),_0x28f6d4['on'](_0x2e891f(0x1d9),()=>_0x333d4c()),_0x28f6d4;},_0x4f51a5=_0x576f01=>{const _0x18375e=_0x5e6c;for(const {worker:_0x577f98}of _0x410883[_0x18375e(0x344)]()){if(_0x577f98[_0x18375e(0x1ae)]()||!_0x577f98[_0x18375e(0x246)]())continue;try{_0x577f98[_0x18375e(0x1d5)](_0x576f01);}catch{}}};_0x415a24?.['_activateProcesses']?.({'kind':'primary','listenAddr':':'+_0x5a3e52})[_0x184286(0x28b)](()=>{}),_0x415a24?.[_0x184286(0x339)]?.['setOwnMeta']?.({'workersConfigured':_0x3574a2});const _0x217ea5={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x333d4c=()=>{const _0x53e063=_0x184286,_0x58f481=_0x415a24?.[_0x53e063(0x339)];if(!_0x58f481||!_0x58f481[_0x53e063(0x34d)])return;const _0x4cdee1=_0x58f481[_0x53e063(0x1f0)];for(const {worker:_0x4129ad,startedAt:_0xd6019e,slot:_0x4697ba,stats:_0xd2eb8f,processing:_0x328aa6}of _0x410883[_0x53e063(0x344)]()){if(_0x4129ad[_0x53e063(0x1ae)]())continue;const _0x3454c3=_0x58f481[_0x53e063(0x1c6)]?.()&&_0x58f481['getDesired'](_0x53e063(0x31f),_0x1d7fc0(_0x4697ba))?.[_0x53e063(0x33f)]===!![];_0x58f481[_0x53e063(0x2f9)]({'pid':_0x4129ad[_0x53e063(0x1f4)][_0x53e063(0x174)],'startedAt':_0xd6019e,'kind':_0x53e063(0x345),'supervisorKey':_0x4cdee1,'slot':_0x4697ba,'slotKey':_0x1d7fc0(_0x4697ba),'role':_0x217ea5,'listenAddr':':'+_0x5a3e52,'lifecycle':_0x3454c3?'decommissioning':_0x53e063(0x1c1),'processing':_0x328aa6??null,'stats':_0xd2eb8f??null})[_0x53e063(0x28b)](()=>{});}},_0x1d7fc0=_0x4540a8=>_0x83092e('cluster:'+_0x5a3e52,_0x4540a8),_0x279923=_0x2e6136=>{const _0x3a4e0f=_0x184286,_0x34f15c=_0x415a24?.['processes'];if(!_0x34f15c?.[_0x3a4e0f(0x1c6)]?.())return![];return _0x34f15c['getDesired'](_0x3a4e0f(0x31f),_0x1d7fc0(_0x2e6136))?.[_0x3a4e0f(0x33f)]===!![];};for(let _0x1639bc=0x0;_0x1639bc<_0x3574a2;_0x1639bc++){const _0x99690d=_0x279923(_0x1639bc);_0x43af35[_0x184286(0x335)](_0x1639bc,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x99690d,'respawnTimer':null}),_0x99690d?console[_0x184286(0x1a5)]('[okdb-cluster]\x20slot='+_0x1639bc+_0x184286(0x34e)):_0x245e6b(_0x1639bc);}const _0x52680d=()=>{const _0xa92aee=_0x184286,_0x5a81bf=_0x415a24?.[_0xa92aee(0x339)];if(!_0x5a81bf?.['_isWriter']||!_0x5a81bf[_0xa92aee(0x1c6)]?.())return;for(const [_0x4f0675,_0x5545c8]of _0x43af35['entries']()){const _0x1554ce=_0x5a81bf[_0xa92aee(0x21b)]('slot',_0x1d7fc0(_0x4f0675)),_0x3f0eb6=_0x1554ce?.[_0xa92aee(0x33f)]===!![],_0x2d4cd5=_0x1554ce?.[_0xa92aee(0x29f)]===!![];if(_0x3f0eb6&&!_0x5545c8[_0xa92aee(0x237)]){_0x5545c8['dead']=!![];_0x5545c8['respawnTimer']&&(clearTimeout(_0x5545c8[_0xa92aee(0x2fc)]),_0x5545c8[_0xa92aee(0x2fc)]=null);for(const {worker:_0x214e67}of _0x410883[_0xa92aee(0x344)]()){if(_0x332977(_0x214e67)!==_0x4f0675||_0x214e67[_0xa92aee(0x1ae)]())continue;try{if(_0x2d4cd5)_0x214e67[_0xa92aee(0x1f4)][_0xa92aee(0x29f)](_0xa92aee(0x1b5));else _0x214e67[_0xa92aee(0x246)]()&&_0x214e67['disconnect']();}catch{}}console[_0xa92aee(0x1a5)](_0xa92aee(0x29a)+(_0x2d4cd5?'hard-killed':'decommissioned')+'\x20worker\x20slot='+_0x4f0675+_0xa92aee(0x1f7));}else{if(!_0x3f0eb6&&_0x5545c8['dead']&&_0x1554ce){_0x5545c8[_0xa92aee(0x237)]=![],_0x5545c8[_0xa92aee(0x210)]=[],_0x5545c8[_0xa92aee(0x2b0)]=0x0;const _0x3ddffc=[..._0x410883[_0xa92aee(0x344)]()]['some'](({worker:_0x262376})=>_0x332977(_0x262376)===_0x4f0675&&!_0x262376[_0xa92aee(0x1ae)]());!_0x3ddffc&&!_0x365a7c&&(_0x245e6b(_0x4f0675),console[_0xa92aee(0x1a5)]('[okdb-cluster]\x20recommissioned\x20worker\x20slot='+_0x4f0675));}}}},_0x4d2f4f=()=>{try{_0x52680d();}catch{}};_0x415a24?.[_0x184286(0x312)]?.['on']?.(_0x371daa[_0x184286(0x204)],_0x4d2f4f);const _0x5ad64d=[];if(_0x415a24?.[_0x184286(0x312)]?.['on'])for(const _0x13bf74 of _0x49c777){const _0x45b483=_0x40cc9b=>{_0x4f51a5({[_0x541d5c]:_0x27ae24,'event':_0x13bf74,'data':_0x40cc9b??{}});};_0x415a24[_0x184286(0x312)]['on'](_0x13bf74,_0x45b483),_0x5ad64d[_0x184286(0x31c)]({'event':_0x13bf74,'handler':_0x45b483});}const _0x5c0d12=setInterval(()=>{_0x52680d(),_0x333d4c();},_0x56ec29);_0x5c0d12[_0x184286(0x38b)]?.();const _0x29098a=(_0x54350f,_0x3918ac)=>{const _0x43cd7a=_0x184286;if(!_0x3918ac||typeof _0x3918ac!==_0x43cd7a(0x1a9)||_0x3918ac[_0x541d5c]!==_0x13e283)return;if(!_0x415a24?.['log']?.[_0x43cd7a(0x207)])return;const _0x1d6723=_0x3918ac[_0x43cd7a(0x219)]||{};_0x415a24[_0x43cd7a(0x1a5)]['ingest']({..._0x1d6723,'msg':'[w'+_0x3918ac[_0x43cd7a(0x31f)]+']\x20'+(_0x1d6723[_0x43cd7a(0x213)]??''),'meta':{..._0x1d6723[_0x43cd7a(0x1f8)]||{},'worker':_0x3918ac[_0x43cd7a(0x31f)],'workerPid':_0x3918ac[_0x43cd7a(0x174)]}});};_0x3f2a8c['on'](_0x184286(0x16c),_0x29098a);const _0x3601c7=(_0x35e1d1,_0x3cf646)=>{const _0x6b1558=_0x184286;if(!_0x3cf646||typeof _0x3cf646!==_0x6b1558(0x1a9)||_0x3cf646[_0x541d5c]!==_0x46180a)return;const _0x41a4dc=_0x410883[_0x6b1558(0x2d9)](_0x35e1d1[_0x6b1558(0x1f4)][_0x6b1558(0x174)]);if(_0x41a4dc){_0x41a4dc['stats']={..._0x3cf646['stats'],'at':Date[_0x6b1558(0x309)]()};if(_0x3cf646[_0x6b1558(0x16f)]!==undefined)_0x41a4dc[_0x6b1558(0x16f)]=_0x3cf646[_0x6b1558(0x16f)];}};_0x3f2a8c['on'](_0x184286(0x16c),_0x3601c7),_0x3f2a8c['on'](_0x184286(0x382),(_0x354c31,_0x2b8057,_0x5250d6)=>{const _0x5e12ea=_0x184286,_0x1ae538=_0x354c31[_0x5e12ea(0x1f4)][_0x5e12ea(0x174)],_0x3b2557=_0x332977(_0x354c31),_0x554eb2=_0x410883[_0x5e12ea(0x2d9)](_0x1ae538);if(_0x554eb2&&_0x415a24?.[_0x5e12ea(0x339)])_0x415a24[_0x5e12ea(0x339)][_0x5e12ea(0x350)](_0x1ae538+':'+_0x554eb2['startedAt'])[_0x5e12ea(0x28b)](()=>{});_0x410883[_0x5e12ea(0x18b)](_0x1ae538),console[_0x5e12ea(0x1a5)](_0x5e12ea(0x395)+_0x1ae538+_0x5e12ea(0x198)+(_0x3b2557??'?')+_0x5e12ea(0x284)+(_0x5e12ea(0x329)+_0x2b8057+_0x5e12ea(0x334)+(_0x5250d6??'none')+');\x20'+_0x410883[_0x5e12ea(0x33c)]+'\x20worker(s)\x20remaining')),_0x333d4c();if(_0x365a7c||_0x3b2557==null)return;const _0x388f58=_0x43af35[_0x5e12ea(0x2d9)](_0x3b2557);if(!_0x388f58||_0x388f58[_0x5e12ea(0x237)])return;const _0x76cd72=Date[_0x5e12ea(0x309)]();_0x388f58[_0x5e12ea(0x210)][_0x5e12ea(0x31c)](_0x76cd72),_0x388f58['deaths']=_0x388f58['deaths'][_0x5e12ea(0x255)](_0x50d09e=>_0x76cd72-_0x50d09e<=_0x542b9f);if(_0x388f58[_0x5e12ea(0x210)][_0x5e12ea(0x330)]>=_0x23e868){_0x388f58[_0x5e12ea(0x237)]=!![],console[_0x5e12ea(0x326)](_0x5e12ea(0x2f6)+_0x3b2557+_0x5e12ea(0x250)+_0x388f58[_0x5e12ea(0x210)][_0x5e12ea(0x330)]+_0x5e12ea(0x1c8)+(_0x542b9f+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x410883[_0x5e12ea(0x33c)]+_0x5e12ea(0x259)));return;}_0x388f58[_0x5e12ea(0x2b0)]++;const _0x36c79c=Math[_0x5e12ea(0x1e4)](_0x1c105c,_0x39d48e*0x2**(_0x388f58['consecutiveFailures']-0x1));console[_0x5e12ea(0x1a5)](_0x5e12ea(0x283)+_0x3b2557+_0x5e12ea(0x1d0)+_0x36c79c+_0x5e12ea(0x30b)+_0x388f58[_0x5e12ea(0x2b0)]+')'),_0x388f58[_0x5e12ea(0x2fc)]=setTimeout(()=>{const _0x18eb9a=_0x5e12ea;_0x388f58[_0x18eb9a(0x2fc)]=null;if(_0x365a7c||_0x388f58[_0x18eb9a(0x237)])return;const _0x517639=_0x245e6b(_0x3b2557);_0x517639[_0x18eb9a(0x20e)](_0x18eb9a(0x27e),()=>{const _0x18cfce=_0x18eb9a;if(_0x43af35[_0x18cfce(0x2d9)](_0x3b2557)===_0x388f58)_0x388f58[_0x18cfce(0x2b0)]=0x0;});},_0x36c79c),_0x388f58[_0x5e12ea(0x2fc)][_0x5e12ea(0x38b)]?.();});const _0x27297d=[..._0x410883[_0x184286(0x305)]()];console['log']('[okdb-cluster]\x20primary\x20pid='+process[_0x184286(0x174)]+_0x184286(0x21f)+_0x3574a2+_0x184286(0x1c4)+_0x5a3e52+':\x20'+('['+_0x27297d[_0x184286(0x280)](',\x20')+']'));const _0x548912={'_isClusterController':!![],'port':_0x5a3e52,'primaryOkdb':_0x415a24??null,'status'(){const _0x5a9605=_0x184286;return{'clustered':!![],'primaryPid':process['pid'],'port':_0x5a3e52,'primaryRole':_0x415a24?.[_0x5a9605(0x19f)]??null,'processorPid':null,'supervisorPid':process[_0x5a9605(0x174)],'workers':[..._0x410883[_0x5a9605(0x344)]()][_0x5a9605(0x2b2)](({worker:_0x2a90ef})=>({'pid':_0x2a90ef['process'][_0x5a9605(0x174)],'id':_0x2a90ef['id'],'dead':_0x2a90ef['isDead']()}))};},async 'close'(){const _0x16692c=_0x184286;_0x365a7c=!![];for(const _0x5bb517 of _0x43af35[_0x16692c(0x344)]()){_0x5bb517['dead']=!![],_0x5bb517[_0x16692c(0x2fc)]&&(clearTimeout(_0x5bb517['respawnTimer']),_0x5bb517[_0x16692c(0x2fc)]=null);}clearInterval(_0x5c0d12),_0x3f2a8c[_0x16692c(0x36f)]('message',_0x29098a),_0x3f2a8c[_0x16692c(0x36f)](_0x16692c(0x16c),_0x3601c7),_0x415a24?.[_0x16692c(0x312)]?.[_0x16692c(0x36f)]?.(_0x371daa['SYSTEM_PROC'],_0x4d2f4f);if(_0x415a24?.[_0x16692c(0x312)]?.[_0x16692c(0x36f)])for(const {event:_0x35c978,handler:_0x5cda3c}of _0x5ad64d){try{_0x415a24[_0x16692c(0x312)][_0x16692c(0x36f)](_0x35c978,_0x5cda3c);}catch{}}_0x5ad64d['length']=0x0;const _0x4fded8=[..._0x410883['values']()]['map'](({worker:_0x43eb7c})=>_0x43eb7c);if(_0x4fded8[_0x16692c(0x330)]===0x0)return;await Promise[_0x16692c(0x265)](_0x4fded8[_0x16692c(0x2b2)](_0x562e8c=>new Promise(_0x277368=>{const _0x4073d6=_0x16692c;if(_0x562e8c[_0x4073d6(0x1ae)]()){_0x277368();return;}let _0x3c968b=![];const _0x1ed0b0=()=>{if(_0x3c968b)return;_0x3c968b=!![];if(_0x63a91c)clearTimeout(_0x63a91c);_0x277368();};_0x562e8c['once'](_0x4073d6(0x382),_0x1ed0b0);const _0x63a91c=setTimeout(()=>{const _0x15c2ae=_0x4073d6;try{_0x562e8c[_0x15c2ae(0x1f4)][_0x15c2ae(0x29f)]();}catch{}},_0x515b32+0x1f4);_0x63a91c['unref']?.();try{_0x562e8c[_0x4073d6(0x1a7)]();}catch{try{_0x562e8c[_0x4073d6(0x1f4)]['kill']();}catch{}}})));}};return _0x548912;}async function _0x23abbb({makeOkdb:_0x26fbe4,port:_0x4a3e89}){const _0x189b1a=await _0x26fbe4();return _0x53ab33(_0x189b1a),_0x189b1a['http']['listen'](_0x4a3e89);}function _0x53ab33(_0x20c3fd){const _0x322e4e=_0x5a63ba;if(!_0x20c3fd||_0x20c3fd[_0x322e4e(0x2b7)])return;_0x20c3fd[_0x322e4e(0x2b7)]=!![];try{const {OKDBChangefeed:_0x3186fd}=requireOkdbChangefeed(),_0x3516ed=_0x20c3fd[_0x322e4e(0x195)];if(_0x3516ed&&typeof _0x3516ed[_0x322e4e(0x394)]==='function'){const _0x1485cb=new _0x3186fd(_0x20c3fd);_0x1485cb[_0x322e4e(0x2c5)](),_0x3516ed[_0x322e4e(0x394)](_0x1485cb),_0x20c3fd[_0x322e4e(0x1cb)]=_0x1485cb;}}catch(_0x34086){_0x20c3fd[_0x322e4e(0x1a5)]?.[_0x322e4e(0x19c)]?.(_0x322e4e(0x28c)+(_0x34086?.[_0x322e4e(0x16c)]??_0x34086),{'feature':'cluster'});}const _0x3d352f=_0x5ed72e=>{const _0x413dad=_0x322e4e;if(!_0x5ed72e||typeof _0x5ed72e!==_0x413dad(0x1a9)||_0x5ed72e[_0x541d5c]==null)return;if(_0x5ed72e[_0x541d5c]===_0x27ae24)try{_0x20c3fd['_adminRelay']?.[_0x413dad(0x1ff)]?.(_0x5ed72e[_0x413dad(0x331)],_0x5ed72e[_0x413dad(0x241)]);}catch{}};process['on'](_0x322e4e(0x16c),_0x3d352f),_0x20c3fd[_0x322e4e(0x37c)]=_0x3d352f;{let _0xc2c523=process[_0x322e4e(0x18c)](),_0x2d861c=Date['now']();const _0x20302c=()=>{const _0x2bb12d=_0x322e4e;if(typeof process[_0x2bb12d(0x1d5)]!==_0x2bb12d(0x306)||!process[_0x2bb12d(0x266)])return;const _0x1ce551=Date[_0x2bb12d(0x309)](),_0x2c3b7e=process[_0x2bb12d(0x18c)](),_0x5f16f2=(_0x1ce551-_0x2d861c)*0x3e8,_0x3536c4=_0x2c3b7e['user']-_0xc2c523['user']+(_0x2c3b7e[_0x2bb12d(0x29d)]-_0xc2c523['system']),_0x217898=_0x5f16f2>0x0?Math[_0x2bb12d(0x1e4)](0x64,Math[_0x2bb12d(0x2aa)](_0x3536c4/(_0x5f16f2*(_0x31e10c[_0x2bb12d(0x21a)]()[_0x2bb12d(0x330)]||0x1))*0x64)):0x0;_0xc2c523=_0x2c3b7e,_0x2d861c=_0x1ce551;const _0x42ec4d=process[_0x2bb12d(0x2f5)]();let _0x553f8f=null;try{_0x553f8f=_0x20c3fd['role']?.[_0x2bb12d(0x1d3)]?_0x20c3fd['processes']?.[_0x2bb12d(0x2d8)]?.()??null:null;}catch{}try{process[_0x2bb12d(0x1d5)]({[_0x541d5c]:_0x46180a,'stats':{'rss':_0x42ec4d[_0x2bb12d(0x2b9)],'heapUsed':_0x42ec4d[_0x2bb12d(0x191)],'heapTotal':_0x42ec4d[_0x2bb12d(0x267)],'external':_0x42ec4d[_0x2bb12d(0x23b)],'cpuPct':_0x217898,'cpuWindowMs':Math[_0x2bb12d(0x2aa)](_0x5f16f2/0x3e8)||null},'processing':_0x553f8f});}catch{}},_0x206663=Math[_0x322e4e(0x1b4)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x4f6575=setInterval(_0x20302c,_0x206663);_0x4f6575[_0x322e4e(0x38b)]?.(),_0x20302c();for(const _0x3ff5a1 of[_0x322e4e(0x2cb),_0x322e4e(0x18e)]){_0x20c3fd['events']?.['on']?.(_0x3ff5a1,()=>{try{_0x20302c();}catch{}});}}let _0x44a480=![];const _0x1ab060=async _0x2753d3=>{const _0x51675c=_0x322e4e;if(_0x44a480)return;_0x44a480=!![];const _0x386dff=setTimeout(()=>process[_0x51675c(0x382)](_0x2753d3),_0x515b32);_0x386dff['unref']?.();try{await _0x20c3fd[_0x51675c(0x264)]?.();}catch{}process[_0x51675c(0x382)](_0x2753d3);};process['on'](_0x322e4e(0x1a7),()=>_0x1ab060(0x0));if(process['platform']!==_0x322e4e(0x275)){const _0x1c33fe=setInterval(()=>{const _0x581411=_0x322e4e;if(process[_0x581411(0x2d1)]===0x1)_0x1ab060(0x0);},_0x20aad3);_0x1c33fe[_0x322e4e(0x38b)]?.(),_0x20c3fd[_0x322e4e(0x175)]=_0x1c33fe;}}return okdbCluster={'runClustered':_0x21b5b1,'attachWorkerCluster':_0x53ab33},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0x45362d=_0x37b856;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x1d16d2=require$$0$5,{attachWorkerCluster:_0x1690ca}=requireOkdbCluster();async function _0x3dfcd1(){const _0x5d246f=_0x5e6c,_0x3b8c8f=process.env.OKDB_HTTP_CHILD;if(!_0x3b8c8f)throw new Error(_0x5d246f(0x311));const {rootPath:_0x16f999,port:_0x24c8a0,options:options={},logLevel:logLevel=_0x5d246f(0x17a)}=JSON[_0x5d246f(0x24c)](_0x3b8c8f);if(!_0x16f999||!_0x24c8a0)throw new Error('okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required');const _0x62146c=new _0x1d16d2(_0x16f999,{...options,'engines':![],'processors':![],'compaction':![]});_0x62146c[_0x5d246f(0x1a5)]['detachConsole']?.();const _0x9b8505=process.env.OKDB_CLUSTER_SLOT??'?',_0x3e6fa5={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x1e0f4d=_0x3e6fa5[logLevel]??_0x3e6fa5[_0x5d246f(0x17a)];_0x62146c[_0x5d246f(0x1a5)][_0x5d246f(0x386)](_0xcc540f=>{const _0x2b7a3e=_0x5d246f;if((_0x3e6fa5[_0xcc540f[_0x2b7a3e(0x24f)]]??0x1)<_0x1e0f4d)return;try{process[_0x2b7a3e(0x1d5)]?.({'__okdbCluster':_0x2b7a3e(0x1a5),'slot':_0x9b8505,'pid':process[_0x2b7a3e(0x174)],'entry':_0xcc540f});}catch{}}),await _0x62146c[_0x5d246f(0x1e9)](),_0x1690ca(_0x62146c),await _0x62146c[_0x5d246f(0x371)][_0x5d246f(0x374)](_0x24c8a0);}return _0x3dfcd1()[_0x45362d(0x28b)](_0x60e9b=>{const _0x443beb=_0x45362d;try{process[_0x443beb(0x1d5)]?.({'__okdbCluster':_0x443beb(0x1a5),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x443beb(0x174)],'entry':{'level':_0x443beb(0x326),'msg':_0x443beb(0x356)+(_0x60e9b?.[_0x443beb(0x16c)]??_0x60e9b)}});}catch{}process[_0x443beb(0x382)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module[_0x37b856(0x1df)]=okdbHttpWorkerChild;
@@ -1 +1 @@
1
- 'use strict';const _0x3a34f0=_0x4478;(function(_0x29839d,_0x2e3de3){const _0x347b88=_0x4478,_0x307f90=_0x29839d();while(!![]){try{const _0xe9b08d=-parseInt(_0x347b88(0xd9))/0x1*(-parseInt(_0x347b88(0xb4))/0x2)+-parseInt(_0x347b88(0xad))/0x3+parseInt(_0x347b88(0xa3))/0x4*(parseInt(_0x347b88(0x96))/0x5)+-parseInt(_0x347b88(0xa7))/0x6+parseInt(_0x347b88(0xc3))/0x7*(parseInt(_0x347b88(0xd6))/0x8)+-parseInt(_0x347b88(0xd7))/0x9*(parseInt(_0x347b88(0xe4))/0xa)+parseInt(_0x347b88(0xcd))/0xb;if(_0xe9b08d===_0x2e3de3)break;else _0x307f90['push'](_0x307f90['shift']());}catch(_0x423076){_0x307f90['push'](_0x307f90['shift']());}}}(_0x13d7,0xefe8c));var require$$0=require(_0x3a34f0(0xbb)),require$$1=require(_0x3a34f0(0xa2));function getDefaultExportFromCjs(_0x31cd5f){const _0xc0deb0=_0x3a34f0;return _0x31cd5f&&_0x31cd5f[_0xc0deb0(0xe2)]&&Object[_0xc0deb0(0xb2)][_0xc0deb0(0xa6)][_0xc0deb0(0xe0)](_0x31cd5f,_0xc0deb0(0xdb))?_0x31cd5f[_0xc0deb0(0xdb)]:_0x31cd5f;}var okdbViewsBootstrapWorker$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x1f54ee=_0x3a34f0;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x44c77f={'PUT':_0x1f54ee(0xa4),'REMOVE':'remove','INDEX_DROP':_0x1f54ee(0xdd),'INDEX_REGISTER':_0x1f54ee(0xa8),'INDEX_RESET':_0x1f54ee(0xa0),'TYPE_REGISTER':_0x1f54ee(0xd2),'TYPE_DROP':_0x1f54ee(0x99),'FTS_REGISTER':_0x1f54ee(0xbd),'FTS_DROP':_0x1f54ee(0xa9),'FTS_RESET':_0x1f54ee(0x9f),'SCHEMA_SET':_0x1f54ee(0xb6),'SCHEMA_DROP':_0x1f54ee(0x9d),'TTL_SET':_0x1f54ee(0xba),'TTL_CLEAR':'clearTtl'},_0x537b6f={'SYSTEM_READY':'system:ready','SYSTEM_STOPPED':_0x1f54ee(0xb8),'SYSTEM_CLOCK_CHANGE':_0x1f54ee(0x97),'SYSTEM_POKE':_0x1f54ee(0xb5),'SYSTEM_DRAIN':'system:drain','SYSTEM_TYPE_DROP':_0x1f54ee(0xd5),'SYSTEM_PROC':_0x1f54ee(0xae),'SYSTEM_BUS_STATE_CHANGE':_0x1f54ee(0xdc),'ITEM_CREATE':'item:create','ITEM_UPDATE':'item:update','ITEM_REMOVE':_0x1f54ee(0xd8),'INDEX_RESET':'index:reset','INDEX_READY':_0x1f54ee(0xe9),'INDEX_PROGRESS':_0x1f54ee(0x94),'VIEW_PROGRESS':_0x1f54ee(0xca),'INDEX_DROP':_0x1f54ee(0xd3),'INDEX_REGISTERED':_0x1f54ee(0x98),'FTS_REGISTERED':_0x1f54ee(0x92),'FTS_DROP':_0x1f54ee(0xc5),'FTS_RESET':'fts:reset','SCHEMA_SET':'schema:set','SCHEMA_DROP':_0x1f54ee(0xa5),'UNIQUE_VIOLATION':_0x1f54ee(0xcc),'UNIQUE_VIOLATION_RESOLVED':_0x1f54ee(0x9c),'REF_VIOLATION':_0x1f54ee(0xbc),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x1f54ee(0xc9),'TXN_START':_0x1f54ee(0xc4),'TXN_END':_0x1f54ee(0xe1),'TXN_ROLLBACK':_0x1f54ee(0x93),'TYPE_REGISTERED':_0x1f54ee(0xab),'TYPE_DROP':_0x1f54ee(0xe3),'ENV_OPENED':'env:opened','ENV_REMOVED':_0x1f54ee(0xaf),'SYSTEM_ENV_RELEASE':'system:env_release','TTL_EXPIRED':_0x1f54ee(0xc7),'TTL_SET':_0x1f54ee(0xac),'TTL_CLEAR':_0x1f54ee(0xc1),'LICENSE_INVALID':_0x1f54ee(0xd4),'LICENSE_ADDED':_0x1f54ee(0xb3),'LICENSE_ACTIVATED':_0x1f54ee(0xda),'LICENSE_REMOVED':'license:removed'},_0x5940da={'CREATING':_0x1f54ee(0xa1),'RESETTING':'resetting','READY':'ready','DROPPING':'dropping','WAITING':_0x1f54ee(0x9a)},_0x111564={'CREATED':_0x1f54ee(0xdf),'STARTING':_0x1f54ee(0xe8),'STARTED':_0x1f54ee(0xe6),'STOPPING':'stopping','STOPPED':_0x1f54ee(0xc8)},_0x24c7a8={'CREATING':_0x1f54ee(0xa1),'READY':_0x1f54ee(0xcf),'HALTED':_0x1f54ee(0xce),'STOPPED':'stopped','RESETTING':_0x1f54ee(0xc2)},_0x1f0420=Object[_0x1f54ee(0xbf)]({'POKE':_0x1f54ee(0xd1),'DRAIN':_0x1f54ee(0xbe),'TYPE_DROP':_0x1f54ee(0xde),'PROC':'bus:proc','ENV_RELEASE':_0x1f54ee(0xe7)});return okdbEnums={'BUS_EVENTS':_0x1f0420,'CHANGE_ACTIONS':_0x44c77f,'EVENTS':_0x537b6f,'INDEX_STATE':_0x5940da,'OKDB_STATE':_0x111564,'VIEW_STATE':_0x24c7a8},okdbEnums;}var hasRequiredOkdbViewsBootstrapWorker;function _0x13d7(){const _0x3ff78f=['bus:env_release','starting','index:ready','fts:registered','txn:rollback','index:progress','error','8640935XfRIJc','system:clock_change','index:registered','dropType','waiting','catch','unique:violation_resolved','dropSchema','progress','resetFts','resetIndex','creating','./okdb','4pQdkaA','put','schema:drop','hasOwnProperty','10904568TUuvJw','registerIndex','dropFts','events','type:registered','ttl:set','3546507mgVGjC','system:proc','env:removed','_activateViewStorage','views','prototype','license:added','2HeDHbg','system:poke','setSchema','exit','system:stopped','_runBootstrapScanPhases','setTtl','worker_threads','ref:violation','registerFts','bus:drain','freeze','postMessage','ttl:clear','resetting','98mdXldY','txn:start','fts:drop','VIEW_PROGRESS','ttl:expired','stopped','sync:apply','view:progress','exports','unique:violation','26988269REIFDd','halted','ready','stack','bus:poke','registerType','index:drop','license:invalid','system:type_drop','597560YSOcUX','90tfyHDW','item:remove','313259ANhzGo','license:activated','default','system:bus_state_change','dropIndex','bus:type_drop','created','call','txn:end','__esModule','type:drop','1558390pkddlc','env','started'];_0x13d7=function(){return _0x3ff78f;};return _0x13d7();}function requireOkdbViewsBootstrapWorker(){const _0x32d029=_0x3a34f0;if(hasRequiredOkdbViewsBootstrapWorker)return okdbViewsBootstrapWorker$1;hasRequiredOkdbViewsBootstrapWorker=0x1;const {parentPort:_0x3ab872,workerData:_0x15e753}=require$$0,_0x337622=require$$1,{EVENTS:_0x440131}=requireOkdbEnums();async function _0x48552b(){const _0x2373a0=_0x4478,{rootPath:_0x12e2d0,envName:_0xe558ab,viewName:_0x6c0eaf,definition:_0x2a1841}=_0x15e753,_0x23fe3d=new _0x337622(_0x12e2d0,{'admin':![],'mcp':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],'processes':![]});await _0x23fe3d['open']();const _0x478560=_0x23fe3d[_0x2373a0(0xe5)](_0xe558ab);_0x478560[_0x2373a0(0xaa)]['on'](_0x440131[_0x2373a0(0xc6)],_0xfbe5c2=>{const _0x8a9444=_0x2373a0;if(_0xfbe5c2?.['name']!==_0x6c0eaf)return;try{_0x3ab872['postMessage']({'type':_0x8a9444(0x9e),'event':_0xfbe5c2});}catch{}}),await _0x478560[_0x2373a0(0xb1)]['_prepareViewDict'](_0x2a1841),await _0x478560[_0x2373a0(0xb1)][_0x2373a0(0xb0)](_0x6c0eaf,_0x2a1841),await _0x478560[_0x2373a0(0xb1)][_0x2373a0(0xb9)](_0x6c0eaf,_0x2a1841),_0x3ab872[_0x2373a0(0xc0)]({'type':'done'}),await _0x23fe3d['close'](),process['exit'](0x0);}return _0x48552b()[_0x32d029(0x9b)](_0x14f370=>{const _0x38aa02=_0x32d029;try{_0x3ab872[_0x38aa02(0xc0)]({'type':_0x38aa02(0x95),'error':_0x14f370['message']??String(_0x14f370),'stack':_0x14f370[_0x38aa02(0xd0)]});}catch{}process[_0x38aa02(0xb7)](0x1);}),okdbViewsBootstrapWorker$1;}function _0x4478(_0xec293,_0x23ce65){_0xec293=_0xec293-0x92;const _0x13d74=_0x13d7();let _0x44782a=_0x13d74[_0xec293];return _0x44782a;}var okdbViewsBootstrapWorkerExports=requireOkdbViewsBootstrapWorker(),okdbViewsBootstrapWorker=getDefaultExportFromCjs(okdbViewsBootstrapWorkerExports);module[_0x3a34f0(0xcb)]=okdbViewsBootstrapWorker;
1
+ 'use strict';const _0x36def4=_0x22b5;(function(_0x224d7f,_0x187b99){const _0x135d78=_0x22b5,_0x4526ef=_0x224d7f();while(!![]){try{const _0x8b81db=parseInt(_0x135d78(0xb7))/0x1+-parseInt(_0x135d78(0x89))/0x2+parseInt(_0x135d78(0x8d))/0x3+-parseInt(_0x135d78(0x92))/0x4+-parseInt(_0x135d78(0x77))/0x5*(parseInt(_0x135d78(0x6f))/0x6)+-parseInt(_0x135d78(0x86))/0x7+-parseInt(_0x135d78(0x79))/0x8*(-parseInt(_0x135d78(0x82))/0x9);if(_0x8b81db===_0x187b99)break;else _0x4526ef['push'](_0x4526ef['shift']());}catch(_0x2b02b9){_0x4526ef['push'](_0x4526ef['shift']());}}}(_0x26e1,0x58769));function _0x26e1(){const _0x2518a6=['stopping','name','remove','index:reset','exit','type:registered','unique:violation','ready','system:poke','freeze','done','dropFts','item:create','bus:proc','system:type_drop','halted','clearTtl','index:ready','prototype','resetFts','system:drain','put','starting','73996ozZpmL','VIEW_PROGRESS','resetting','fts:reset','setTtl','item:remove','_prepareViewDict','189786RFTieO','bus:env_release','__esModule','txn:start','dropIndex','setSchema','env:removed','resetIndex','75lFheFV','registerIndex','8tpLPsP','registerFts','index:drop','bus:poke','bus:type_drop','started','catch','message','bus:drain','13387320Aqbrfd','exports','stopped','system:env_release','499156vyLhYd','index:progress','txn:end','894196paNMth','license:removed','system:stopped','schema:set','623130AGwlht','license:invalid','txn:rollback','ttl:clear','license:added','1655880NbwCmk','type:drop','unique:violation_resolved','env:opened','fts:drop','ref:violation','views','open','_runBootstrapScanPhases','waiting','env','system:ready','postMessage','default'];_0x26e1=function(){return _0x2518a6;};return _0x26e1();}function _0x22b5(_0x4dfa6c,_0x4ef16b){_0x4dfa6c=_0x4dfa6c-0x69;const _0x26e18a=_0x26e1();let _0x22b502=_0x26e18a[_0x4dfa6c];return _0x22b502;}var require$$0=require('worker_threads'),require$$1=require('./okdb');function getDefaultExportFromCjs(_0x562ee5){const _0x505d69=_0x22b5;return _0x562ee5&&_0x562ee5[_0x505d69(0x71)]&&Object[_0x505d69(0xb2)]['hasOwnProperty']['call'](_0x562ee5,_0x505d69(0x9f))?_0x562ee5[_0x505d69(0x9f)]:_0x562ee5;}var okdbViewsBootstrapWorker$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x4e3175=_0x22b5;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x4ce4cc={'PUT':_0x4e3175(0xb5),'REMOVE':_0x4e3175(0xa2),'INDEX_DROP':_0x4e3175(0x73),'INDEX_REGISTER':_0x4e3175(0x78),'INDEX_RESET':_0x4e3175(0x76),'TYPE_REGISTER':'registerType','TYPE_DROP':'dropType','FTS_REGISTER':_0x4e3175(0x7a),'FTS_DROP':_0x4e3175(0xab),'FTS_RESET':_0x4e3175(0xb3),'SCHEMA_SET':_0x4e3175(0x74),'SCHEMA_DROP':'dropSchema','TTL_SET':_0x4e3175(0x6c),'TTL_CLEAR':_0x4e3175(0xb0)},_0x5d2aef={'SYSTEM_READY':_0x4e3175(0x9d),'SYSTEM_STOPPED':_0x4e3175(0x8b),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x4e3175(0xa8),'SYSTEM_DRAIN':_0x4e3175(0xb4),'SYSTEM_TYPE_DROP':_0x4e3175(0xae),'SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':_0x4e3175(0xac),'ITEM_UPDATE':'item:update','ITEM_REMOVE':_0x4e3175(0x6d),'INDEX_RESET':_0x4e3175(0xa3),'INDEX_READY':_0x4e3175(0xb1),'INDEX_PROGRESS':_0x4e3175(0x87),'VIEW_PROGRESS':'view:progress','INDEX_DROP':_0x4e3175(0x7b),'INDEX_REGISTERED':'index:registered','FTS_REGISTERED':'fts:registered','FTS_DROP':_0x4e3175(0x96),'FTS_RESET':_0x4e3175(0x6b),'SCHEMA_SET':_0x4e3175(0x8c),'SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':_0x4e3175(0xa6),'UNIQUE_VIOLATION_RESOLVED':_0x4e3175(0x94),'REF_VIOLATION':_0x4e3175(0x97),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':'sync:apply','TXN_START':_0x4e3175(0x72),'TXN_END':_0x4e3175(0x88),'TXN_ROLLBACK':_0x4e3175(0x8f),'TYPE_REGISTERED':_0x4e3175(0xa5),'TYPE_DROP':_0x4e3175(0x93),'ENV_OPENED':_0x4e3175(0x95),'ENV_REMOVED':_0x4e3175(0x75),'SYSTEM_ENV_RELEASE':_0x4e3175(0x85),'TTL_EXPIRED':'ttl:expired','TTL_SET':'ttl:set','TTL_CLEAR':_0x4e3175(0x90),'LICENSE_INVALID':_0x4e3175(0x8e),'LICENSE_ADDED':_0x4e3175(0x91),'LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':_0x4e3175(0x8a)},_0xca92db={'CREATING':'creating','RESETTING':_0x4e3175(0x6a),'READY':_0x4e3175(0xa7),'DROPPING':'dropping','WAITING':_0x4e3175(0x9b)},_0x100bf1={'CREATED':'created','STARTING':_0x4e3175(0xb6),'STARTED':_0x4e3175(0x7e),'STOPPING':_0x4e3175(0xa0),'STOPPED':'stopped'},_0x1ae804={'CREATING':'creating','READY':_0x4e3175(0xa7),'HALTED':_0x4e3175(0xaf),'STOPPED':_0x4e3175(0x84),'RESETTING':_0x4e3175(0x6a)},_0x315d30=Object[_0x4e3175(0xa9)]({'POKE':_0x4e3175(0x7c),'DRAIN':_0x4e3175(0x81),'TYPE_DROP':_0x4e3175(0x7d),'PROC':_0x4e3175(0xad),'ENV_RELEASE':_0x4e3175(0x70)});return okdbEnums={'BUS_EVENTS':_0x315d30,'CHANGE_ACTIONS':_0x4ce4cc,'EVENTS':_0x5d2aef,'INDEX_STATE':_0xca92db,'OKDB_STATE':_0x100bf1,'VIEW_STATE':_0x1ae804},okdbEnums;}var hasRequiredOkdbViewsBootstrapWorker;function requireOkdbViewsBootstrapWorker(){const _0x17b435=_0x22b5;if(hasRequiredOkdbViewsBootstrapWorker)return okdbViewsBootstrapWorker$1;hasRequiredOkdbViewsBootstrapWorker=0x1;const {parentPort:_0x5ba29d,workerData:_0x515a04}=require$$0,_0x138d62=require$$1,{EVENTS:_0x170abe}=requireOkdbEnums();async function _0x5ec6a6(){const _0x17043a=_0x22b5,{rootPath:_0x49ee0d,envName:_0x8b5fce,viewName:_0x17902f,definition:_0x13ce3c}=_0x515a04,_0x3e63d4=new _0x138d62(_0x49ee0d,{'admin':![],'mcp':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],'processes':![]});await _0x3e63d4[_0x17043a(0x99)]();const _0x2e872e=_0x3e63d4[_0x17043a(0x9c)](_0x8b5fce);_0x2e872e['events']['on'](_0x170abe[_0x17043a(0x69)],_0x30eb60=>{const _0x1f82b4=_0x17043a;if(_0x30eb60?.[_0x1f82b4(0xa1)]!==_0x17902f)return;try{_0x5ba29d['postMessage']({'type':'progress','event':_0x30eb60});}catch{}}),await _0x2e872e['views'][_0x17043a(0x6e)](_0x13ce3c),await _0x2e872e[_0x17043a(0x98)]['_activateViewStorage'](_0x17902f,_0x13ce3c),await _0x2e872e[_0x17043a(0x98)][_0x17043a(0x9a)](_0x17902f,_0x13ce3c),_0x5ba29d[_0x17043a(0x9e)]({'type':_0x17043a(0xaa)}),await _0x3e63d4['close'](),process[_0x17043a(0xa4)](0x0);}return _0x5ec6a6()[_0x17b435(0x7f)](_0x126eb5=>{const _0x209652=_0x17b435;try{_0x5ba29d[_0x209652(0x9e)]({'type':'error','error':_0x126eb5[_0x209652(0x80)]??String(_0x126eb5),'stack':_0x126eb5['stack']});}catch{}process[_0x209652(0xa4)](0x1);}),okdbViewsBootstrapWorker$1;}var okdbViewsBootstrapWorkerExports=requireOkdbViewsBootstrapWorker(),okdbViewsBootstrapWorker=getDefaultExportFromCjs(okdbViewsBootstrapWorkerExports);module[_0x36def4(0x83)]=okdbViewsBootstrapWorker;