@kedem/okdb 2.1.1 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/algorithm-worker-thread.js +1 -1
- package/bin/okdb.js +1 -1
- package/docs/embeddings.md +3 -3
- package/docs/querying.md +20 -0
- package/docs/views.md +32 -32
- package/okdb-functions-sandbox-worker.js +1 -1
- package/okdb-http-worker-child.js +1 -1
- package/okdb-views-bootstrap-worker.js +1 -1
- package/okdb.js +1 -1
- package/package.json +1 -1
- package/public/sections/engines/index.ok.html +1 -1
- package/types/environment.d.ts +4 -2
- package/types/features/views.d.ts +38 -4
- package/types/index.d.ts +4 -2
- package/types/options.d.ts +25 -3
|
@@ -1 +1 @@
|
|
|
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
|
+
'use strict';const _0x1d447a=_0x39df;(function(_0x34c672,_0x23cb22){const _0x42555b=_0x39df,_0x1c90ad=_0x34c672();while(!![]){try{const _0x11d6fb=parseInt(_0x42555b(0x290))/0x1*(parseInt(_0x42555b(0x233))/0x2)+parseInt(_0x42555b(0x24f))/0x3*(-parseInt(_0x42555b(0x326))/0x4)+-parseInt(_0x42555b(0x152))/0x5+parseInt(_0x42555b(0x110))/0x6*(-parseInt(_0x42555b(0x255))/0x7)+-parseInt(_0x42555b(0x140))/0x8*(parseInt(_0x42555b(0x141))/0x9)+-parseInt(_0x42555b(0x146))/0xa+parseInt(_0x42555b(0x1c4))/0xb;if(_0x11d6fb===_0x23cb22)break;else _0x1c90ad['push'](_0x1c90ad['shift']());}catch(_0x4b3a1d){_0x1c90ad['push'](_0x1c90ad['shift']());}}}(_0x44de,0xab5f2));var require$$0$5=require(_0x1d447a(0x274)),require$$1$1=require(_0x1d447a(0x2eb)),require$$1=require(_0x1d447a(0x24a)),require$$0$3=require('os'),require$$2=require(_0x1d447a(0x30e)),require$$0=require(_0x1d447a(0x2c2)),require$$0$2=require(_0x1d447a(0x227)),require$$0$1=require('fs'),require$$0$4=require('node:events');function getDefaultExportFromCjs(_0x46f16d){const _0x22e569=_0x1d447a;return _0x46f16d&&_0x46f16d[_0x22e569(0x294)]&&Object['prototype']['hasOwnProperty'][_0x22e569(0x22d)](_0x46f16d,_0x22e569(0x206))?_0x46f16d[_0x22e569(0x206)]:_0x46f16d;}function _0x44de(){const _0xee9c63=['function','\x0a===\x20OKDB_DIAG\x20','updateSupervisedChildStats','processor:retry','_committed','draining','fromEntries','commit','listNodes','reset','register','clearThreadStats','[okdb-cluster]\x20respawning\x20worker\x20slot=','heapUsed','uncaughtException','schema:set','_released','then','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','index:drop','_outstanding','event','perf_hooks','liveThreadStats','worker','removeSupervisedChild','system:ready','_scheduleFlush','call','stopped','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','_flushDebounce','threads','halted','112624hcEMcz','version','workersConfigured','resetting','_pending','node/','registerType','freeze','code','registerFts','user','ms\x20activeWriters=','processes','nodesView','_nodeDb','_lastCpuAt','enable','_baselines','type:drop','_lock','FTS_RESET','set','_isWriter','path','_windowCbs','pushEphemeral','rows=','setLogger','3189Vdbfeh','includes','busy','events','index:progress','processKey','6982871yvjYnX','name','_report','_caps','flushLmdb','cursorKey','processorsView','disable','_desired','role','system:type_drop','\x20@\x20','_isStale','_cmd','supervisorKey','_lastCpuWindowMs',',\x20signal=','send','singletonClaims','error','\x20parkedNow=','enabled','writerStatus','isActive','_onProcEvent','expiresAt','firstTs','namespace','isEnabled','stack','entry','./okdb','label','ITEM_CREATE','raw-put','processor:ready','ESRCH','stop','_onPoke','meta','entries','_acquiredAt','--print','_holderDead','resetReadTxn','cpus','system','\x20HTTP\x20server(s)\x20on\x20port\x20','beforeWrite','setOwnMeta','\x20(slot=','count','acquiredAt','_dedupeMax','test','list','recordWrite','_durs','decommissioning','7NCrgik','engines','system:drain','remove','__esModule','_bpParkedTotal','_adminRelay','startedAt','isWorker','ttl:expired','inst:','processingStatusView','procmode/','_onStop','queue-worker','bumpCmd','INDEX_READY','_started','_isReader','_markSeen','clusterStatusView','primary','SYSTEM_PROC','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','_inflight','~processes:cmd','_listenAddr','min','raw-remove','_openEnvLazy','_key','object','_servingEngines','(worst\x20','write','change','listen','processor','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','standalone','slot','compact','status','putNode','log','nodeKey','addSupervisedChild','_statusEnv','map','ppid','node:perf_hooks','dropping','decommission','pid','\x20drainAge=','online','warn','stringify','flushDebounce','clear','2.2.0','_lockDb','license:removed','(code=','sync','type','_removeRowAsync','connected','abs','_lastCpuUsage','depth','consecutiveFailures','ingest','--test','single','_desiredOverlay','deregisterSelf','getClock','fts:registered','\x20\x20#','_maybePublish','shift','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','maxMs','epoch','processor:paused','hasDesired','has','holder','onWindow','add','cluster','heapTotal','reap','participate','level','markClosed','kill','next','\x20worker\x20slot=','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','compaction','bus:env_release','allSettled','_clusterOrphanWatch','listDesired','inspect','_cursors','maxExtra','okdb','setSchema','prependListener','dumpedAt','item:update','setupPrimary','_buildProcessingFacet','number','_selfKey','isConnected','txn:rollback','max','CHANGEFEED_QUANTUM','emit','ENV_CLOSING_RETRY','dedupeMax','env:opened','crypto','openDB','_coordinator','running','_timer','kind','createEnvironment','_highWater','updatedAt','system:proc','_supervisorKey','committed','_threadStats','ITEM_REMOVE','listAll','\x0a\x20\x20\x20\x20\x20\x20','childTransaction','bus:poke','hostname','exit','_onItem','[okdb-cluster]\x20worker\x20pid=','embedded','REMOVE','4428hbSPee','_seen','ms\x20(attempt\x20','_instanceId','cluster:','dead','view:progress','values','\x20phase=','_envs','now','processor:error','\x20worker(s)\x20remaining','fanout','rowKey','_children','procmodeack/',':want','_startAdmission','_startedAt','_log','loop-lag\x20','release','indexOf','6NoTPeI','seq','_sampleOwnStats','ms\x20mean=','_groupByProcess','disconnect','delete','\x20(durable\x20desired-state)','memoryUsage','publishChildRow','_admissionTimer','_activateProcesses','_dedupeKey','_singletonLocks','starting','catch','_nodeDead','isDead','slotKey','_closed','okdb-diag.','value','registry\x20heartbeat\x20skipped\x20(writer=','processor:progress','percentile','repeat','\x20writer{depth=','message','string','slice',');\x20','exports','setDesired','_kind','txn:start','ITEM_UPDATE','__vocab/version','fast','_lastCpuPct','started',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','open','_sandbox','getCmd','_publishNow','get','_onTick','offWindow','2500944fwGrRR','9NnyAmC','getDesired','listenAddr','ms\x20on\x20env=','all','1352640Oeskgo','flushed','replace','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','FTS_REGISTERED','attachFeed','process','resetFts','SYSTEM_STOPPED','license:activated','hasType','off','1393915mgxqmD','item:create','_handlePoke','process\x20','host','parkedNow','removeNode','cpuWindowMs','[okdb-cluster]\x20slot=','treeView','deaths','reduce','http-server','\x20—\x20','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','_refreshDesiredSnapshot','external','_bpWaiters','registry\x20publish\x20failing:\x20','getRange','parse','VIEW_PROGRESS','INDEX_RESET','respawnTimer','keys','1ofN:','sandbox','filter','transactionSync','_startHeartbeat','transaction','sort','_publishFailWarned','inflightAgesMs','randomUUID','join','mode','_collectWriterFacet','from','migrations','\x20forked\x20','ms\x20max=','children','stderr','cluster-wide','type:registered','_role','__okdbCluster','unclaimed','_done','_buckets','_quantum','http','~processes:desired','FTS_DROP','created','publishOwnRow','cli','some','waiting','round','resolve','_versionSkewWarned','trim','bus:type_drop','toFixed','building','_ownMeta','_hbTimer','copy','_rowKey','true','fts:reset','fn-runner','load','ORPHAN\x20(env-closed\x20write)','ready','note','processors','_putRowSync','env','appendFileSync','heartbeatMs','SYSTEM_POKE','none','_collectSingletonClaims',')\x20exited\x20','registerIndex','isPrimary','race','_db','item:remove','putSync','_draining','mkdirSync','_drain','--inspect','win32','data','once','push','oldestPendingMs','_processStartedAt','error:\x20','SYNC_COMMITS','system:env_release','noteListenAddr','_ensureDesired','rss','_changefeed','_buildOwnRow','_writer','\x20oldestPendingMs=','_rawDb','35295843JKjTNz','__okdbSlot','\x20===','start','_admissionStarted','_nodeDbFor','killable','bus:proc','\x20│\x20','_flushTimer','isHeld','_migrateVocab','view','index:reset','_heartbeatInFlight','node','cpuPct','cpuUsage','unique:violation_resolved','split','_participate','_rootDb','_buildChildRow','http\x20worker\x20child\x20failed:\x20','quantum','\x20\x20(no\x20env\x20draining)','extend','okdb-writer:\x20env\x20closing\x20—\x20retry','find','index:registered','creating','processorId','~processes','length','removeSync','put','toISOString','[okdb-cluster]\x20','\x20sync','stats','info','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','_heartbeatTimer','_enqueuedAt','startHeartbeat','_drainOne','processor:resumed','stopHeartbeat','recent\x20writes\x20(newest\x20first)','_clusterWorkerAttached','ms\x20busy=','floor','unref','isWanted','processing','_wantDb','~lock','selfKey','uptime','close','ttlMs','dropIndex','stopping','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','lifecycle','caps','default','resetIndex','\x20in\x20','size','system:bus_state_change','--watch','\x20statusEnv=','state','_lastPublishAt','_singletonLock','startsWith'];_0x44de=function(){return _0xee9c63;};return _0x44de();}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0xa327b1=_0x1d447a;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x23ec7b={'PUT':'put','REMOVE':_0xa327b1(0x293),'INDEX_DROP':_0xa327b1(0x201),'INDEX_REGISTER':_0xa327b1(0x1a9),'INDEX_RESET':_0xa327b1(0x207),'TYPE_REGISTER':_0xa327b1(0x239),'TYPE_DROP':'dropType','FTS_REGISTER':_0xa327b1(0x23c),'FTS_DROP':'dropFts','FTS_RESET':_0xa327b1(0x14d),'SCHEMA_SET':_0xa327b1(0x2fe),'SCHEMA_DROP':'dropSchema','TTL_SET':'setTtl','TTL_CLEAR':'clearTtl'},_0x5435fb={'SYSTEM_READY':_0xa327b1(0x22b),'SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':'system:poke','SYSTEM_DRAIN':_0xa327b1(0x292),'SYSTEM_TYPE_DROP':_0xa327b1(0x25f),'SYSTEM_PROC':_0xa327b1(0x317),'SYSTEM_BUS_STATE_CHANGE':_0xa327b1(0x20a),'ITEM_CREATE':_0xa327b1(0x153),'ITEM_UPDATE':_0xa327b1(0x301),'ITEM_REMOVE':_0xa327b1(0x1ad),'INDEX_RESET':_0xa327b1(0x1d1),'INDEX_READY':'index:ready','INDEX_PROGRESS':_0xa327b1(0x253),'VIEW_PROGRESS':_0xa327b1(0x32c),'INDEX_DROP':_0xa327b1(0x224),'INDEX_REGISTERED':_0xa327b1(0x1e1),'FTS_REGISTERED':_0xa327b1(0x2de),'FTS_DROP':'fts:drop','FTS_RESET':_0xa327b1(0x19a),'SCHEMA_SET':_0xa327b1(0x220),'SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0xa327b1(0x1d6),'REF_VIOLATION':'ref:violation','REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':'sync:apply','TXN_START':_0xa327b1(0x132),'TXN_END':'txn:end','TXN_ROLLBACK':_0xa327b1(0x307),'TYPE_REGISTERED':_0xa327b1(0x17f),'TYPE_DROP':_0xa327b1(0x245),'ENV_OPENED':_0xa327b1(0x30d),'ENV_REMOVED':'env:removed','SYSTEM_ENV_RELEASE':_0xa327b1(0x1bb),'TTL_EXPIRED':_0xa327b1(0x299),'TTL_SET':'ttl:set','TTL_CLEAR':'ttl:clear','LICENSE_INVALID':'license:invalid','LICENSE_ADDED':'license:added','LICENSE_ACTIVATED':_0xa327b1(0x14f),'LICENSE_REMOVED':_0xa327b1(0x2ce)},_0x2a717d={'CREATING':_0xa327b1(0x1e2),'RESETTING':_0xa327b1(0x236),'READY':'ready','DROPPING':_0xa327b1(0x2c3),'WAITING':_0xa327b1(0x18d)},_0x503abb={'CREATED':_0xa327b1(0x189),'STARTING':_0xa327b1(0x11e),'STARTED':_0xa327b1(0x137),'STOPPING':_0xa327b1(0x202),'STOPPED':_0xa327b1(0x22e)},_0x265d2f={'CREATING':_0xa327b1(0x1e2),'READY':_0xa327b1(0x19e),'HALTED':_0xa327b1(0x232),'STOPPED':_0xa327b1(0x22e),'RESETTING':'resetting'},_0xe7b45f=Object[_0xa327b1(0x23a)]({'POKE':_0xa327b1(0x31f),'DRAIN':'bus:drain','TYPE_DROP':_0xa327b1(0x192),'PROC':_0xa327b1(0x1cb),'ENV_RELEASE':_0xa327b1(0x2f6)});return okdbEnums={'BUS_EVENTS':_0xe7b45f,'CHANGE_ACTIONS':_0x23ec7b,'EVENTS':_0x5435fb,'INDEX_STATE':_0x2a717d,'OKDB_STATE':_0x503abb,'VIEW_STATE':_0x265d2f},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0xd5b191=_0x1d447a;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x1dc8e3,performance:_0x4f5dd9}=require$$0,_0x4b25ff=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0xd5b191(0x199),_0x17a189=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x107cc6=process.env.OKDB_LOOP_LAG_ALL==='1',_0x172cc6=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x24af83{constructor(){const _0x551671=_0xd5b191;this[_0x551671(0x26a)]=_0x4b25ff,this[_0x551671(0x184)]=new Map(),this['_h']=null,this[_0x551671(0x312)]=null,this[_0x551671(0x2a1)]=![],this[_0x551671(0x33a)]=(_0x527917,_0x4636c7)=>process[_0x551671(0x17d)]['write'](_0x527917+(_0x4636c7?'\x20'+JSON[_0x551671(0x2c9)](_0x4636c7):'')+'\x0a');}[_0xd5b191(0x330)](){const _0x2a168a=_0xd5b191;return _0x4f5dd9[_0x2a168a(0x330)]();}[_0xd5b191(0x24e)](_0x48f949){const _0x180734=_0xd5b191;if(typeof _0x48f949===_0x180734(0x211))this['_log']=_0x48f949;}['note'](_0x32b061,_0x4e1aa9,_0x23e7d8){const _0x3fb022=_0xd5b191;if(!this[_0x3fb022(0x26a)])return;let _0x12248d=this['_buckets'][_0x3fb022(0x13d)](_0x32b061);!_0x12248d&&(_0x12248d={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x3fb022(0x184)][_0x3fb022(0x248)](_0x32b061,_0x12248d)),_0x12248d['ms']+=_0x4e1aa9,_0x12248d['count']+=0x1,_0x4e1aa9>_0x12248d[_0x3fb022(0x2e3)]&&(_0x12248d[_0x3fb022(0x2e3)]=_0x4e1aa9,_0x12248d[_0x3fb022(0x2fc)]=_0x23e7d8||'');}[_0xd5b191(0x1c7)](_0x4fb210){const _0x1f16b4=_0xd5b191;if(!this['enabled']||this[_0x1f16b4(0x2a1)])return;this[_0x1f16b4(0x2a1)]=!![];if(_0x4fb210)this['_log']=_0x4fb210;this['_h']=_0x1dc8e3({'resolution':0xa}),this['_h'][_0x1f16b4(0x243)](),this['_timer']=setInterval(()=>this[_0x1f16b4(0x257)](),_0x17a189);if(this['_timer']['unref'])this[_0x1f16b4(0x312)]['unref']();}[_0xd5b191(0x2e9)](_0x459ffc){const _0x16db63=_0xd5b191;if(!this['_windowCbs'])this[_0x16db63(0x24b)]=new Set();this[_0x16db63(0x24b)][_0x16db63(0x2ea)](_0x459ffc);if(!this[_0x16db63(0x2a1)])this['_startAdmission']();}[_0xd5b191(0x13f)](_0x532c46){const _0x502c93=_0xd5b191;this[_0x502c93(0x24b)]?.[_0x502c93(0x116)](_0x532c46);}[_0xd5b191(0x338)](){const _0xe6f221=_0xd5b191;if(this[_0xe6f221(0x1c8)])return;this[_0xe6f221(0x1c8)]=!![];!this['_h']&&(this['_h']=_0x1dc8e3({'resolution':0xa}),this['_h'][_0xe6f221(0x243)]());const _0x52ff1e=_0x17a189;this[_0xe6f221(0x11a)]=setInterval(()=>{const _0x54ea16=_0xe6f221,_0x312a47=this['_h'];if(!_0x312a47)return;const _0x19cb2f=_0x312a47['percentile'](0x63)/0xf4240,_0x4f5781=_0x312a47[_0x54ea16(0x308)]/0xf4240,_0x1415f5=_0x312a47['mean']/0xf4240;_0x312a47[_0x54ea16(0x21a)]();if(this['_windowCbs'])for(const _0x1603da of this[_0x54ea16(0x24b)]){try{_0x1603da({'p99Ms':_0x19cb2f,'maxMs':_0x4f5781,'meanMs':_0x1415f5,'reportMs':_0x52ff1e});}catch{}}},_0x52ff1e);if(this[_0xe6f221(0x11a)]['unref'])this[_0xe6f221(0x11a)][_0xe6f221(0x1f8)]();}[_0xd5b191(0x257)](){const _0x53e370=_0xd5b191,_0x55ebef=this['_h'],_0x22d73f=_0x55ebef[_0x53e370(0x308)]/0xf4240,_0x3905a5=_0x55ebef[_0x53e370(0x128)](0x63)/0xf4240,_0xf95f4f=_0x55ebef['mean']/0xf4240;_0x55ebef['reset']();const _0x591404=[...this[_0x53e370(0x184)][_0x53e370(0x27d)]()][_0x53e370(0x2c0)](([_0x48b1d6,_0x2ca91c])=>({'label':_0x48b1d6,..._0x2ca91c}))[_0x53e370(0x171)]((_0x2becc2,_0x448761)=>_0x448761['ms']-_0x2becc2['ms'])[_0x53e370(0x12d)](0x0,0x8);this[_0x53e370(0x184)][_0x53e370(0x2cb)]();const _0x3b7826=_0x591404[_0x53e370(0x15d)]((_0x3207b0,_0x2fed4c)=>_0x3207b0+_0x2fed4c['ms'],0x0),_0x54a4f5=_0x591404[_0x53e370(0x2c0)](_0x278b12=>_0x278b12[_0x53e370(0x275)]+'='+_0x278b12['ms'][_0x53e370(0x193)](0x0)+'ms/'+_0x278b12[_0x53e370(0x288)]+(_0x278b12[_0x53e370(0x2e3)]>0x5?_0x53e370(0x2b1)+_0x278b12[_0x53e370(0x2e3)]['toFixed'](0x0)+'ms'+(_0x278b12[_0x53e370(0x2fc)]?'\x20'+_0x278b12[_0x53e370(0x2fc)]:'')+')':''));(_0x107cc6||_0x22d73f>=_0x172cc6)&&this[_0x53e370(0x33a)](_0x53e370(0x10d)+_0x17a189+_0x53e370(0x17b)+_0x22d73f[_0x53e370(0x193)](0x0)+'ms\x20p99='+_0x3905a5[_0x53e370(0x193)](0x0)+_0x53e370(0x113)+_0xf95f4f[_0x53e370(0x193)](0x0)+_0x53e370(0x1f6)+_0x3b7826[_0x53e370(0x193)](0x0)+'ms'+(_0x54a4f5[_0x53e370(0x1e5)]?_0x53e370(0x1cc)+_0x54a4f5['join']('\x20\x20'):''),{'feature':'loop-lag'});if(this[_0x53e370(0x24b)])for(const _0x1e3c62 of this[_0x53e370(0x24b)]){try{_0x1e3c62({'p99Ms':_0x3905a5,'maxMs':_0x22d73f,'meanMs':_0xf95f4f,'reportMs':_0x17a189});}catch{}}}[_0xd5b191(0x27a)](){const _0x5d7a47=_0xd5b191;if(this[_0x5d7a47(0x312)])clearInterval(this[_0x5d7a47(0x312)]);if(this['_h'])this['_h'][_0x5d7a47(0x25c)]();this[_0x5d7a47(0x312)]=null,this['_h']=null,this[_0x5d7a47(0x2a1)]=![];}}const _0x16dda7=new _0x24af83();if(_0x16dda7[_0xd5b191(0x26a)])_0x16dda7[_0xd5b191(0x1c7)]();return okdbLoopMonitor={'LOOP':_0x16dda7},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x4150c4=require$$0$1,_0x263117=require$$1;let _0x5eb94a,_0x355510,_0xd0a99e,_0x2df054,_0x50018a,_0x12856d,_0x41696f,_0x1fe615=![];const _0xb0837d=new Set();let _0x49af10=null;const _0x3c57b8=new Map();function _0x9abecd(){const _0x531f1f=_0x39df;if(_0x5eb94a!==undefined)return _0x5eb94a;_0x5eb94a=process.env.OKDB_DIAG==='1';if(!_0x5eb94a)return![];_0x355510=process.env.OKDB_DIAG_STACK==='1',_0x2df054=Math[_0x531f1f(0x308)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0xd0a99e=new Array(_0x2df054),_0x50018a=0x0,_0x12856d=0x0,_0x41696f=process.env.OKDB_DIAG_DIR||null;if(_0x41696f)try{_0x4150c4[_0x531f1f(0x1b0)](_0x41696f,{'recursive':!![]});}catch{}return!![];}function _0x55c164(){return _0x5eb94a===undefined?_0x9abecd():_0x5eb94a;}function _0x33a6d0(_0x2253aa,_0x50d9f6){const _0x247271=_0x39df;if(_0x5eb94a===undefined?!_0x9abecd():!_0x5eb94a)return;let _0x1a8471;if(_0x355510){const _0x3414e4=new Error()[_0x247271(0x272)]||'';_0x1a8471=_0x3414e4['split']('\x0a')['slice'](0x3)[_0x247271(0x2c0)](_0x35f5a5=>_0x35f5a5[_0x247271(0x191)]())[_0x247271(0x16d)](Boolean)[_0x247271(0x12d)](0x0,0x8);}_0xd0a99e[_0x50018a]={'seq':_0x12856d++,'t':Date[_0x247271(0x330)](),'env':_0x2253aa,'kind':_0x50d9f6||_0x247271(0x218),'stack':_0x1a8471},_0x50018a=(_0x50018a+0x1)%_0x2df054;}function _0x487b35(_0x52a0f4){const _0x3a25cb=_0x39df,_0x3aba00=[];for(let _0x13b1a7=0x0;_0x13b1a7<_0x2df054;_0x13b1a7++){const _0x18c147=_0xd0a99e[(_0x50018a-0x1-_0x13b1a7+_0x2df054*0x2)%_0x2df054];if(!_0x18c147)continue;_0x3aba00['push'](_0x18c147);if(_0x3aba00[_0x3a25cb(0x1e5)]>=_0x52a0f4)break;}return _0x3aba00;}function _0x4e003c(_0x5c25f4){const _0x52cd2c=_0x39df;try{process[_0x52cd2c(0x17d)][_0x52cd2c(0x2b2)](_0x5c25f4+'\x0a');}catch{}if(_0x41696f)try{_0x4150c4[_0x52cd2c(0x1a3)](_0x263117[_0x52cd2c(0x175)](_0x41696f,_0x52cd2c(0x124)+process[_0x52cd2c(0x2c5)]+'.log'),_0x5c25f4+'\x0a');}catch{}}function _0x19a519(_0x2ea86f){const _0xb3b914=_0x39df,_0x550839=_0x487b35(_0x2ea86f);if(!_0x550839[_0xb3b914(0x1e5)])return _0xb3b914(0x2f4);const _0x394443=Date[_0xb3b914(0x330)]();return _0x550839[_0xb3b914(0x2c0)](_0x289ecb=>{const _0x8c2d02=_0xb3b914,_0x504085=_0x8c2d02(0x2df)+_0x289ecb[_0x8c2d02(0x111)]+'\x20-'+(_0x394443-_0x289ecb['t'])+'ms\x20env='+_0x289ecb[_0x8c2d02(0x1a2)]+'\x20'+_0x289ecb['kind'];return _0x289ecb[_0x8c2d02(0x272)]&&_0x289ecb[_0x8c2d02(0x272)][_0x8c2d02(0x1e5)]?_0x504085+_0x8c2d02(0x31d)+_0x289ecb['stack']['join'](_0x8c2d02(0x31d)):_0x504085;})[_0xb3b914(0x175)]('\x0a');}function _0x1de1a4(_0x4f8d82,_0xca8b0e){const _0x2af7f0=_0x39df,_0x56f74c=_0x2af7f0(0x212)+_0x4f8d82+_0x2af7f0(0x260)+new Date()['toISOString']()+'\x20pid='+process['pid']+_0x2af7f0(0x1c6),_0x23fbc3=[_0x56f74c,_0x2af7f0(0x1b9)+(_0xca8b0e&&_0xca8b0e[_0x2af7f0(0x272)]?_0xca8b0e[_0x2af7f0(0x272)][_0x2af7f0(0x1d7)]('\x0a')[0x0]:_0xca8b0e),_0x2af7f0(0x1f4)+(_0x355510?'':_0x2af7f0(0x22f))+':',_0x19a519(0x18),_0x54e6da(),'='[_0x2af7f0(0x129)](_0x56f74c[_0x2af7f0(0x1e5)]-0x1)];_0x4e003c(_0x23fbc3['join']('\x0a'));}function _0x414713(_0xd53b1c){const _0x41710d=_0x39df;if(!_0x55c164())return;const _0x3dcbd5=String(_0xd53b1c&&_0xd53b1c['message']||_0xd53b1c||''),_0x177c1f=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x41710d(0x28b)](_0x3dcbd5);_0x1de1a4(_0x177c1f?_0x41710d(0x19d):_0x41710d(0x21f),_0xd53b1c);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x177c1f)return;try{console[_0x41710d(0x268)](_0xd53b1c&&_0xd53b1c[_0x41710d(0x272)]?_0xd53b1c[_0x41710d(0x272)]:_0xd53b1c);}catch{}process['exit'](0x1);}function _0x71956d(_0x125e08){const _0x18e8fa=_0x39df;if(!_0x55c164())return;const _0x441f5c=String(_0x125e08&&_0x125e08[_0x18e8fa(0x12b)]||_0x125e08||'');/already closed|environment is already|invalid read txn|reset an invalid/i['test'](_0x441f5c)&&_0x1de1a4(_0x18e8fa(0x2b6),_0x125e08);}function _0x54e6da(){const _0x1bd6a0=_0x39df,_0x2f1dec=[_0x1bd6a0(0x149)];let _0x31c533=![];for(const _0x34cbfc of _0xb0837d){const _0x164728=_0x34cbfc&&_0x34cbfc[_0x1bd6a0(0x32f)];if(!_0x164728)continue;for(const [_0x37b963,_0x2ba548]of _0x164728){const _0x590eed=_0x2ba548&&_0x2ba548[_0x1bd6a0(0x310)]&&_0x2ba548['_coordinator'][_0x1bd6a0(0x1d0)];if(!_0x590eed)continue;let _0x5069c9,_0x480d34;try{_0x5069c9=Atomics[_0x1bd6a0(0x19c)](_0x590eed,0x0),_0x480d34=Atomics[_0x1bd6a0(0x19c)](_0x590eed,0x1);}catch{continue;}if(_0x5069c9===0x0)continue;_0x31c533=!![];const _0x43c092=_0x5069c9>0x0?'SWAP':_0x1bd6a0(0x197),_0x3f9b22=Date[_0x1bd6a0(0x330)]()-Math[_0x1bd6a0(0x2d4)](_0x5069c9)*0x3e8,_0x44ca78=((()=>{const _0x3c1289=_0x1bd6a0;try{return _0x2ba548['_writer']&&_0x2ba548[_0x3c1289(0x1c1)][_0x3c1289(0x2ba)]?_0x2ba548[_0x3c1289(0x1c1)][_0x3c1289(0x2ba)]():null;}catch{return null;}})());_0x2f1dec['push']('\x20\x20env='+_0x37b963+_0x1bd6a0(0x32e)+_0x43c092+_0x1bd6a0(0x2c6)+_0x3f9b22+_0x1bd6a0(0x23e)+_0x480d34+(_0x44ca78?_0x1bd6a0(0x12a)+_0x44ca78[_0x1bd6a0(0x2d6)]+_0x1bd6a0(0x1c2)+_0x44ca78[_0x1bd6a0(0x1b7)]+_0x1bd6a0(0x269)+_0x44ca78[_0x1bd6a0(0x157)]+'}':''));}}if(!_0x31c533)_0x2f1dec[_0x1bd6a0(0x1b6)](_0x1bd6a0(0x1dd));return _0x2f1dec['join']('\x0a');}function _0x7be6e9(){const _0x1f07fe=_0x39df;if(!_0x55c164())return;const _0x4524ad=Math[_0x1f07fe(0x308)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x712173=Date[_0x1f07fe(0x330)]();for(const _0x341642 of _0xb0837d){const _0x5db2f5=_0x341642&&_0x341642[_0x1f07fe(0x32f)];if(!_0x5db2f5)continue;for(const [_0x669ec,_0x2fd32f]of _0x5db2f5){const _0x2a5406=_0x2fd32f&&_0x2fd32f[_0x1f07fe(0x310)]&&_0x2fd32f['_coordinator'][_0x1f07fe(0x1d0)];if(!_0x2a5406)continue;let _0xa351d4;try{_0xa351d4=Atomics['load'](_0x2a5406,0x0);}catch{continue;}const _0x636599=_0x341642['path']+'|'+_0x669ec;if(_0xa351d4<=0x0){_0x3c57b8['delete'](_0x636599);continue;}const _0x2ccaa4=_0x712173-_0xa351d4*0x3e8,_0x45eb8e=_0x3c57b8[_0x1f07fe(0x13d)](_0x636599);if(_0x2ccaa4<_0x4524ad)continue;if(_0x45eb8e&&_0x712173-_0x45eb8e[_0x1f07fe(0x300)]<_0x4524ad)continue;_0x3c57b8[_0x1f07fe(0x248)](_0x636599,{'firstTs':_0x45eb8e?_0x45eb8e[_0x1f07fe(0x26f)]:_0xa351d4,'dumpedAt':_0x712173});const _0x4ffd81='\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20'+_0x2ccaa4+_0x1f07fe(0x144)+_0x669ec+'\x20@\x20'+new Date()[_0x1f07fe(0x1e8)]()+'\x20pid='+process[_0x1f07fe(0x2c5)]+_0x1f07fe(0x1c6);_0x4e003c([_0x4ffd81,_0x54e6da(),'='['repeat'](_0x4ffd81[_0x1f07fe(0x1e5)]-0x1)][_0x1f07fe(0x175)]('\x0a'));}}}function _0xb78cb6(){const _0x516b39=_0x39df;if(!_0x55c164()||_0x1fe615)return;_0x1fe615=!![],process[_0x516b39(0x2ff)](_0x516b39(0x21f),_0x414713),process[_0x516b39(0x2ff)]('unhandledRejection',_0x71956d);const _0x27d066=Math[_0x516b39(0x308)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x49af10=setInterval(_0x7be6e9,_0x27d066);if(_0x49af10[_0x516b39(0x1f8)])_0x49af10[_0x516b39(0x1f8)]();}function _0x1b01c8(_0x325792){const _0x501825=_0x39df;if(!_0x55c164()||!_0x325792)return;_0xb0837d[_0x501825(0x2ea)](_0x325792),_0xb78cb6();}function _0x524632(_0x5d7786){const _0x32bd46=_0x39df;_0xb0837d[_0x32bd46(0x116)](_0x5d7786);}function _0x3b26c5(){if(!_0x55c164())return{'enabled':![],'hint':'set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)'};return{'enabled':!![],'stackCapture':!!_0x355510,'recentWrites':_0x487b35(0x10),'drain':_0x54e6da()};}return okdbDiag={'isEnabled':_0x55c164,'recordWrite':_0x33a6d0,'installDiag':_0xb78cb6,'registerOkdb':_0x1b01c8,'unregisterOkdb':_0x524632,'snapshot':_0x3b26c5},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x3ca037=_0x1d447a;if(hasRequiredOkdbWriter)return okdbWriter[_0x3ca037(0x12f)];hasRequiredOkdbWriter=0x1;const {performance:_0x25bcd1}=require$$0$2,_0x4062f3=requireOkdbDiag(),_0x1b43fe=process.env.OKDB_COMMIT_MODE==='sync';class _0x421d62{constructor(_0x200ae0){const _0x137999=_0x3ca037;this['env']=_0x200ae0,this['_inflight']=new Set(),this[_0x137999(0x1ef)]=new Map(),this[_0x137999(0x215)]=0x0,this['_durs']=[],this[_0x137999(0x183)]=[],this[_0x137999(0x315)]=Math[_0x137999(0x308)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x137999(0x225)]=0x0,this[_0x137999(0x163)]=[],this[_0x137999(0x295)]=0x0;}async['transaction'](_0x3f57e0,_0x1b061d){const _0x368c90=_0x3ca037;if(_0x4062f3[_0x368c90(0x271)]())_0x4062f3[_0x368c90(0x28d)](this[_0x368c90(0x1a2)]?.[_0x368c90(0x256)],_0x1b061d);if(this[_0x368c90(0x123)]){const _0x42ceaa=new Error(_0x368c90(0x1df));_0x42ceaa[_0x368c90(0x23b)]='ENV_CLOSING_RETRY';throw _0x42ceaa;}if(this['_highWater']>0x0){let _0x52d55e=![];while(this[_0x368c90(0x225)]>=this[_0x368c90(0x315)]&&!this[_0x368c90(0x123)]){!_0x52d55e&&(_0x52d55e=!![],this['_bpParkedTotal']++),await new Promise(_0x255108=>this['_bpWaiters'][_0x368c90(0x1b6)](_0x255108));}if(this['_closed']){const _0x58a8d3=new Error(_0x368c90(0x1df));_0x58a8d3[_0x368c90(0x23b)]=_0x368c90(0x30b);throw _0x58a8d3;}}this[_0x368c90(0x225)]++;const _0x58991c=this['env']['_coordinator'];if(_0x58991c)await _0x58991c[_0x368c90(0x285)]();if(this['_closed']){if(_0x58991c)_0x58991c['afterWrite']();this[_0x368c90(0x225)]--;if(this['_bpWaiters'][_0x368c90(0x1e5)]&&this[_0x368c90(0x225)]<this[_0x368c90(0x315)])this[_0x368c90(0x163)][_0x368c90(0x2e1)]()();const _0x51e625=new Error(_0x368c90(0x1df));_0x51e625[_0x368c90(0x23b)]=_0x368c90(0x30b);throw _0x51e625;}const _0x34d9f5=_0x25bcd1[_0x368c90(0x330)]();if(_0x1b43fe)try{const _0xff24b2=this[_0x368c90(0x1a2)]['db'][_0x368c90(0x16e)](_0x3f57e0);this['_committed']++;if(this['_durs'][_0x368c90(0x1b6)](_0x25bcd1[_0x368c90(0x330)]()-_0x34d9f5)>0x100)this[_0x368c90(0x28e)][_0x368c90(0x2e1)]();if(this['_done'][_0x368c90(0x1b6)](_0x25bcd1[_0x368c90(0x330)]())>0x800)this[_0x368c90(0x183)][_0x368c90(0x2e1)]();return _0xff24b2;}finally{this[_0x368c90(0x225)]--;if(this[_0x368c90(0x163)][_0x368c90(0x1e5)]&&this['_outstanding']<this['_highWater'])this[_0x368c90(0x163)]['shift']()();if(_0x58991c)_0x58991c['afterWrite']();}const _0x8f067a=this[_0x368c90(0x1a2)]['db'][_0x368c90(0x31e)](_0x3f57e0);this[_0x368c90(0x2a8)][_0x368c90(0x2ea)](_0x8f067a),this[_0x368c90(0x1ef)]['set'](_0x8f067a,_0x34d9f5);const _0x7ab6fb=()=>{const _0xe78689=_0x368c90;this[_0xe78689(0x2a8)][_0xe78689(0x116)](_0x8f067a),this[_0xe78689(0x1ef)]['delete'](_0x8f067a),this[_0xe78689(0x215)]++,this[_0xe78689(0x225)]--;this[_0xe78689(0x163)][_0xe78689(0x1e5)]&&this['_outstanding']<this[_0xe78689(0x315)]&&this['_bpWaiters']['shift']()();if(this[_0xe78689(0x28e)][_0xe78689(0x1b6)](_0x25bcd1[_0xe78689(0x330)]()-_0x34d9f5)>0x100)this[_0xe78689(0x28e)][_0xe78689(0x2e1)]();if(this[_0xe78689(0x183)][_0xe78689(0x1b6)](_0x25bcd1[_0xe78689(0x330)]())>0x800)this[_0xe78689(0x183)][_0xe78689(0x2e1)]();};_0x8f067a['then'](_0x7ab6fb,_0x7ab6fb);try{return await _0x8f067a;}finally{if(_0x58991c)_0x58991c['afterWrite']();}}[_0x3ca037(0x2ba)](){const _0xfeb65b=_0x3ca037,_0x3d623b=_0x25bcd1[_0xfeb65b(0x330)]();let _0x4a756f=0x0;for(const _0x21af5a of this['_enqueuedAt'][_0xfeb65b(0x32d)]()){const _0x591fd1=_0x3d623b-_0x21af5a;if(_0x591fd1>_0x4a756f)_0x4a756f=_0x591fd1;}let _0x32734c=0x0;for(let _0xc3ed8e=this[_0xfeb65b(0x183)][_0xfeb65b(0x1e5)]-0x1;_0xc3ed8e>=0x0;_0xc3ed8e--){if(_0x3d623b-this[_0xfeb65b(0x183)][_0xc3ed8e]>0x3e8)break;_0x32734c++;}let _0x2b177=0x0;if(this['_durs']['length']){const _0xead554=[...this[_0xfeb65b(0x28e)]][_0xfeb65b(0x171)]((_0x2c884b,_0x58b92f)=>_0x2c884b-_0x58b92f);_0x2b177=_0xead554[Math[_0xfeb65b(0x2ab)](_0xead554[_0xfeb65b(0x1e5)]-0x1,Math[_0xfeb65b(0x1f7)](_0xead554[_0xfeb65b(0x1e5)]*0.99))];}return{'depth':this[_0xfeb65b(0x2a8)][_0xfeb65b(0x209)],'oldestPendingMs':Math['round'](_0x4a756f),'committed':this[_0xfeb65b(0x215)],'commitsPerSec':_0x32734c,'commitP99Ms':Math['round'](_0x2b177),'parkedNow':this[_0xfeb65b(0x163)][_0xfeb65b(0x1e5)],'parkedTotal':this[_0xfeb65b(0x295)],'highWater':this['_highWater']};}[_0x3ca037(0x173)](){const _0x387780=_0x3ca037,_0x30f149=_0x25bcd1[_0x387780(0x330)]();return[...this['_enqueuedAt'][_0x387780(0x32d)]()][_0x387780(0x2c0)](_0x292061=>Math[_0x387780(0x18e)](_0x30f149-_0x292061))[_0x387780(0x171)]((_0x20b173,_0xb4f25)=>_0xb4f25-_0x20b173);}[_0x3ca037(0x2f0)](){const _0x2f87bf=_0x3ca037;this[_0x2f87bf(0x123)]=!![];for(const _0x33f5c1 of this[_0x2f87bf(0x163)]['splice'](0x0))_0x33f5c1();}async['drain'](){const _0x2b8b95=_0x3ca037;let _0x44e9ec=0x0;while(this[_0x2b8b95(0x2a8)]['size']&&_0x44e9ec++<0x3e8){await Promise[_0x2b8b95(0x2f7)]([...this['_inflight']]);}}async[_0x3ca037(0x1e7)](_0x5f30bc,_0x5f05d1,_0x28f50b,_0x46bde6){const _0x2b9a1e=_0x3ca037;return this[_0x2b9a1e(0x170)](()=>{const _0x2c5240=_0x2b9a1e;if(_0x46bde6===undefined)_0x5f30bc[_0x2c5240(0x1ae)](_0x5f05d1,_0x28f50b);else _0x5f30bc[_0x2c5240(0x1ae)](_0x5f05d1,_0x28f50b,_0x46bde6);},_0x2b9a1e(0x277));}async['remove'](_0x4e34d4,_0x316c51){const _0x1babab=_0x3ca037;return this[_0x1babab(0x170)](()=>_0x4e34d4[_0x1babab(0x1e6)](_0x316c51),_0x1babab(0x2ac));}}async function _0x2491cd(_0x53f0f0,_0x3c7b97){const _0x389651=_0x3ca037;if(_0x3c7b97==null)_0x3c7b97=Math['max'](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x39729e=_0x53f0f0?.[_0x389651(0x147)];if(!_0x39729e||typeof _0x39729e[_0x389651(0x222)]!=='function')return;await Promise[_0x389651(0x1ab)]([Promise['resolve'](_0x39729e)[_0x389651(0x11f)](()=>{}),new Promise(_0x405084=>{const _0x52381c=_0x389651,_0x45ac6e=setTimeout(_0x405084,_0x3c7b97);if(_0x45ac6e[_0x52381c(0x1f8)])_0x45ac6e[_0x52381c(0x1f8)]();})]);}catch{}}function _0x45d985(_0x534b1a){const _0x370d40=_0x3ca037;if(_0x1b43fe)return Promise[_0x370d40(0x18f)]();const _0x43ee31=_0x534b1a?.[_0x370d40(0x319)];return _0x43ee31&&typeof _0x43ee31['then']===_0x370d40(0x211)?_0x43ee31:Promise[_0x370d40(0x18f)]();}return okdbWriter[_0x3ca037(0x12f)]=_0x421d62,okdbWriter[_0x3ca037(0x12f)][_0x3ca037(0x259)]=_0x2491cd,okdbWriter['exports'][_0x3ca037(0x319)]=_0x45d985,okdbWriter[_0x3ca037(0x12f)][_0x3ca037(0x1ba)]=_0x1b43fe,okdbWriter[_0x3ca037(0x12f)];}function _0x39df(_0x3e837d,_0x390f00){_0x3e837d=_0x3e837d-0x10d;const _0x44def8=_0x44de();let _0x39df7e=_0x44def8[_0x3e837d];return _0x39df7e;}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x4d3431=_0x1d447a;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x4efae8=require$$0$3,{SYNC_COMMITS:_0x2ca26b}=requireOkdbWriter(),_0x5656ae=_0x4d3431(0x1fc);class _0x5d7784{constructor(_0x4bdb72,_0x11070a,_0x7d42ea){const _0x5cf8f4=_0x4d3431;this[_0x5cf8f4(0x246)]=_0x4bdb72,this[_0x5cf8f4(0x2ae)]=_0x11070a,this[_0x5cf8f4(0x27e)]=_0x7d42ea,this['_released']=![],this['_heartbeatTimer']=null,this['_heartbeatInFlight']=null;}[_0x4d3431(0x1ce)](){const _0x3a807b=_0x4d3431;if(this[_0x3a807b(0x221)])return![];try{const _0x558d21=this[_0x3a807b(0x246)]['_db']()['get'](this[_0x3a807b(0x2ae)]);if(!_0x558d21||_0x558d21[_0x3a807b(0x289)]!==this[_0x3a807b(0x27e)])return![];const _0x5ce1c9=_0x558d21['updatedAt']??_0x558d21[_0x3a807b(0x289)];if(_0x5ce1c9+_0x558d21[_0x3a807b(0x200)]<Date[_0x3a807b(0x330)]())return![];return!![];}catch{return!this['_released'];}}['holder'](){const _0x26d7b4=_0x4d3431;if(this['_released'])return null;try{return this[_0x26d7b4(0x246)]['_db']()[_0x26d7b4(0x13d)](this['_key'])??null;}catch{return null;}}async[_0x4d3431(0x1de)](_0x2213e7){const _0x397148=_0x4d3431;if(this[_0x397148(0x221)])return;try{const _0x2768ae=this[_0x397148(0x246)][_0x397148(0x1ac)]()['get'](this[_0x397148(0x2ae)]);if(!_0x2768ae||_0x2768ae[_0x397148(0x289)]!==this[_0x397148(0x27e)])return;if(_0x2ca26b)this[_0x397148(0x246)][_0x397148(0x1ac)]()[_0x397148(0x1ae)](this['_key'],{..._0x2768ae,'ttlMs':_0x2768ae[_0x397148(0x200)]+_0x2213e7});else await this[_0x397148(0x246)]['_db']()[_0x397148(0x1e7)](this['_key'],{..._0x2768ae,'ttlMs':_0x2768ae[_0x397148(0x200)]+_0x2213e7});}catch{}}async[_0x4d3431(0x10e)](){const _0x294473=_0x4d3431;if(this[_0x294473(0x221)])return;if(this['_heartbeatInFlight'])try{await this[_0x294473(0x1d2)];}catch{}clearInterval(this[_0x294473(0x1ee)]),this[_0x294473(0x1ee)]=null,this[_0x294473(0x221)]=!![];try{const _0x274625=this['_lock']['_db']()[_0x294473(0x13d)](this[_0x294473(0x2ae)]);if(_0x274625&&_0x274625[_0x294473(0x289)]===this['_acquiredAt']){if(_0x2ca26b)this['_lock'][_0x294473(0x1ac)]()[_0x294473(0x1e6)](this['_key']);else await this[_0x294473(0x246)][_0x294473(0x1ac)]()['remove'](this[_0x294473(0x2ae)]);}}catch{}}[_0x4d3431(0x16f)](_0x46d719,_0x209c5f){const _0x5e0197=_0x4d3431,_0x4917e4=_0x209c5f??Math['floor'](_0x46d719/0x3);this[_0x5e0197(0x1ee)]=setInterval(()=>{const _0x12ceb6=_0x5e0197;if(this['_released'])return;this[_0x12ceb6(0x1d2)]=((async()=>{const _0x3f44c8=_0x12ceb6;try{const _0x4c759e=this[_0x3f44c8(0x246)][_0x3f44c8(0x1ac)]()[_0x3f44c8(0x13d)](this[_0x3f44c8(0x2ae)]);if(!_0x4c759e||_0x4c759e[_0x3f44c8(0x289)]!==this[_0x3f44c8(0x27e)]){this[_0x3f44c8(0x221)]=!![],clearInterval(this[_0x3f44c8(0x1ee)]),this['_heartbeatTimer']=null;return;}if(_0x2ca26b)this[_0x3f44c8(0x246)][_0x3f44c8(0x1ac)]()[_0x3f44c8(0x1ae)](this['_key'],{..._0x4c759e,'updatedAt':Date[_0x3f44c8(0x330)]()});else await this['_lock'][_0x3f44c8(0x1ac)]()[_0x3f44c8(0x1e7)](this[_0x3f44c8(0x2ae)],{..._0x4c759e,'updatedAt':Date['now']()});}catch{}this[_0x3f44c8(0x1d2)]=null;})());},_0x4917e4);if(this[_0x5e0197(0x1ee)][_0x5e0197(0x1f8)])this[_0x5e0197(0x1ee)][_0x5e0197(0x1f8)]();}}class _0x2f8681{constructor(_0x425d8c,{namespace:_0x2ee420,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x19f3b4=_0x4d3431;this['_rawDb']=_0x425d8c,this[_0x19f3b4(0x270)]=_0x2ee420,this['ttlMs']=ttlMs,this[_0x19f3b4(0x1a4)]=heartbeatMs,this[_0x19f3b4(0x2cd)]=null;}[_0x4d3431(0x1ac)](){const _0x17204e=_0x4d3431;return!this['_lockDb']&&(this['_lockDb']=this[_0x17204e(0x1c3)]['openDB'](_0x5656ae,{'dupSort':![]})),this[_0x17204e(0x2cd)];}['_wantDb'](){const _0x1b301e=_0x4d3431;return!this['_wantDbHandle']&&(this['_wantDbHandle']=this[_0x1b301e(0x1c3)][_0x1b301e(0x30f)](_0x5656ae+_0x1b301e(0x337),{'dupSort':![]})),this['_wantDbHandle'];}[_0x4d3431(0x2ae)](_0x2fdb69){const _0x34f945=_0x4d3431;return this[_0x34f945(0x270)]+':'+_0x2fdb69;}['signalWant'](_0x1d3ca0){const _0x473dd5=_0x4d3431;try{_0x2ca26b?this['_wantDb']()['putSync'](this[_0x473dd5(0x2ae)](_0x1d3ca0),Date[_0x473dd5(0x330)]()):this[_0x473dd5(0x1fb)]()[_0x473dd5(0x1e7)](this[_0x473dd5(0x2ae)](_0x1d3ca0),Date[_0x473dd5(0x330)]())?.[_0x473dd5(0x11f)]?.(()=>{});}catch{}}[_0x4d3431(0x1f9)](_0x559ca9,_0x5f23a6=0x3e8){const _0x56da91=_0x4d3431;try{const _0x542885=this['_wantDb']()[_0x56da91(0x13d)](this[_0x56da91(0x2ae)](_0x559ca9));return typeof _0x542885==='number'&&Date[_0x56da91(0x330)]()-_0x542885<_0x5f23a6;}catch{return![];}}['_isStale'](_0x4b50b2){const _0x52126a=_0x4d3431,_0x3a513f=_0x4b50b2['updatedAt']??_0x4b50b2[_0x52126a(0x289)];return _0x3a513f+_0x4b50b2[_0x52126a(0x200)]<Date[_0x52126a(0x330)]();}static['_holderDead'](_0x4476ea){const _0x892024=_0x4d3431,_0x36e882=_0x4476ea?.[_0x892024(0x2e8)];if(!_0x36e882||typeof _0x36e882[_0x892024(0x2c5)]!==_0x892024(0x304))return![];if(_0x36e882[_0x892024(0x320)]!==_0x4efae8['hostname']())return![];if(_0x36e882[_0x892024(0x2c5)]===process[_0x892024(0x2c5)])return![];try{return process[_0x892024(0x2f1)](_0x36e882[_0x892024(0x2c5)],0x0),![];}catch(_0x4cd96c){return _0x4cd96c[_0x892024(0x23b)]===_0x892024(0x279);}}async['tryAcquire'](_0x247bd2,_0xea35aa={},_0x436f4a={}){const _0x11c7f5=_0x4d3431,_0xf611b5=this['_key'](_0x247bd2),_0x380ae5=_0x436f4a['ttlMs']??this[_0x11c7f5(0x200)],_0x51aab4=Date[_0x11c7f5(0x330)](),_0x1b6811={'holder':{'pid':process[_0x11c7f5(0x2c5)],'hostname':_0x4efae8[_0x11c7f5(0x320)](),..._0xea35aa},'acquiredAt':_0x51aab4,'updatedAt':_0x51aab4,'ttlMs':_0x380ae5};let _0x3ff87e=![],_0x499a6a=null;try{const _0x13e961=()=>{const _0x35a0d3=_0x11c7f5,_0x136f5a=this[_0x35a0d3(0x1ac)]()['get'](_0xf611b5);if(_0x136f5a&&!this[_0x35a0d3(0x261)](_0x136f5a)&&!_0x2f8681[_0x35a0d3(0x280)](_0x136f5a)){const _0x552aef=_0xea35aa['processorId']!=null&&_0x136f5a['holder'][_0x35a0d3(0x2c5)]===process[_0x35a0d3(0x2c5)]&&_0x136f5a['holder'][_0x35a0d3(0x1e3)]===_0xea35aa[_0x35a0d3(0x1e3)];if(!_0x552aef){_0x3ff87e=![],_0x499a6a=_0x136f5a;return;}_0x1b6811['acquiredAt']<=_0x136f5a['acquiredAt']&&(_0x1b6811[_0x35a0d3(0x289)]=_0x136f5a[_0x35a0d3(0x289)]+0x1,_0x1b6811[_0x35a0d3(0x316)]=_0x1b6811[_0x35a0d3(0x289)]);}this[_0x35a0d3(0x1ac)]()[_0x35a0d3(0x1e7)](_0xf611b5,_0x1b6811),_0x3ff87e=!![],_0x499a6a=_0x1b6811;};if(_0x2ca26b)this[_0x11c7f5(0x1ac)]()[_0x11c7f5(0x16e)](_0x13e961);else await this['_db']()[_0x11c7f5(0x31e)](_0x13e961);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x3ff87e)return{'acquired':![],'handle':null,'current':_0x499a6a};const _0x223b78=new _0x5d7784(this,_0xf611b5,_0x1b6811[_0x11c7f5(0x289)]);return _0x223b78[_0x11c7f5(0x16f)](_0x380ae5,this[_0x11c7f5(0x1a4)]),{'acquired':!![],'handle':_0x223b78,'current':_0x499a6a};}[_0x4d3431(0x2fa)](_0x526ae7){const _0x40aa0d=_0x4d3431;try{return this[_0x40aa0d(0x1ac)]()[_0x40aa0d(0x13d)](this[_0x40aa0d(0x2ae)](_0x526ae7))??null;}catch{return null;}}[_0x4d3431(0x28c)](){const _0x217e6f=_0x4d3431,_0x52f669=this[_0x217e6f(0x270)]+':',_0x5e3f6f=[];try{for(const {key:_0x277de6,value:_0x2cf1f2}of this['_db']()[_0x217e6f(0x165)]({'start':_0x52f669,'end':_0x52f669+'\xff'})){typeof _0x277de6===_0x217e6f(0x12c)&&_0x277de6[_0x217e6f(0x210)](_0x52f669)&&_0x5e3f6f[_0x217e6f(0x1b6)]({'id':_0x277de6[_0x217e6f(0x12d)](_0x52f669[_0x217e6f(0x1e5)]),'entry':_0x2cf1f2});}}catch{}return _0x5e3f6f;}static[_0x4d3431(0x31c)](_0x765420){const _0x1db7f7=_0x4d3431,_0x371a74=[];try{const _0x9b6be3=_0x765420['openDB'](_0x5656ae,{'dupSort':![]});for(const {key:_0x123215,value:_0x42639e}of _0x9b6be3[_0x1db7f7(0x165)]({})){if(typeof _0x123215!=='string')continue;const _0x1b30a6=_0x123215['indexOf'](':');if(_0x1b30a6<0x1)continue;_0x371a74[_0x1db7f7(0x1b6)]({'namespace':_0x123215[_0x1db7f7(0x12d)](0x0,_0x1b30a6),'id':_0x123215[_0x1db7f7(0x12d)](_0x1b30a6+0x1),'entry':_0x42639e});}}catch{}return _0x371a74;}}return okdbLock={'OKDBLock':_0x2f8681},okdbLock;}var version=_0x1d447a(0x2cc),require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x30fb52=_0x1d447a;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x44cbf8=require$$0$3,_0x2b0db5=require$$1$1,_0x5bf850=require$$2,{LOOP:_0x342044}=requireOkdbLoopMonitor(),{OKDBLock:_0x2ea6cc}=requireOkdbLock(),{SYNC_COMMITS:_0x1a9718}=requireOkdbWriter(),_0x15390f=_0x30fb52(0x1e4),_0x389b5b=_0x30fb52(0x1d3),_0x51b9fa=_0x30fb52(0x187),_0x33da17=_0x30fb52(0x2a9),_0x1371d8=(_0x3c9714,_0x303bd0)=>_0x3c9714+':'+_0x303bd0,_0xd01e71=(_0x5c76cb,_0x1efad1)=>_0x5c76cb+'::'+_0x1efad1,_0x13a6dd=(_0x5ec90e,_0x41ef15)=>_0x5ec90e+'/'+_0x41ef15,_0x587fa0=(_0x11a68a,_0x13a6fd)=>_0x11a68a+'#'+_0x13a6fd,_0x327e98=_0x2460ac=>{const _0x229194=_0x30fb52;if(_0x2460ac?.[_0x229194(0x254)])return _0x2460ac[_0x229194(0x254)];const _0x1dac39=_0x2460ac?.[_0x229194(0x2bd)];return typeof _0x1dac39===_0x229194(0x12c)&&_0x1dac39[_0x229194(0x250)]('#')?_0x1dac39['slice'](0x0,_0x1dac39[_0x229194(0x10f)]('#')):_0x1dac39;},_0x3fb8ea=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x27d9a3=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0xbb41e6=_0x3fb8ea*0x3,_0x1869b5=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x30fb52(0x308)](0x927c0,_0xbb41e6*0x14),_0x53ea89=[_0x30fb52(0x127),_0x30fb52(0x278),_0x30fb52(0x214),_0x30fb52(0x331),_0x30fb52(0x2e5),_0x30fb52(0x1f2)];let _0x343910=null;function _0x340f90(){const _0x58b5f5=_0x30fb52;if(_0x343910==null)_0x343910=Math[_0x58b5f5(0x18e)]((Date[_0x58b5f5(0x330)]()-process[_0x58b5f5(0x1fe)]()*0x3e8)/0x3e8)*0x3e8;return _0x343910;}function _0x40fbb8(_0x2b34a6){const _0x127a67=_0x30fb52;if(process.env.OKDB_PROCESS_KILL===_0x127a67(0x151))return![];if(_0x2b34a6?.['options']?.['processes']&&typeof _0x2b34a6['options'][_0x127a67(0x23f)]===_0x127a67(0x2af)&&_0x2b34a6['options'][_0x127a67(0x23f)][_0x127a67(0x2f1)]===![])return![];return!![];}function _0x577e06(_0x293669,_0x2edf05){const _0x5a8d70=_0x30fb52,_0x1e9f22=!!_0x2edf05?.[_0x5a8d70(0x1a0)];switch(_0x293669){case _0x5a8d70(0x2a5):return{'controllable':_0x1e9f22,'decommissionable':![],'killable':!![],'killConfirm':_0x5a8d70(0x17e)};case'cli':case _0x5a8d70(0x2b7):return{'controllable':_0x1e9f22,'decommissionable':![],'killable':!![],'killConfirm':'confirm'};case _0x5a8d70(0x324):return{'controllable':![],'decommissionable':![],'killable':![]};case'http-server':case _0x5a8d70(0x29e):case _0x5a8d70(0x19b):case _0x5a8d70(0x229):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':'force'};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x7a12dc{constructor(_0x2f082a){const _0x4c4e57=_0x30fb52;this[_0x4c4e57(0x2fd)]=_0x2f082a,this[_0x4c4e57(0x2bf)]=null,this[_0x4c4e57(0x25d)]=null,this[_0x4c4e57(0x2db)]=new Map(),this[_0x4c4e57(0x262)]=null,this[_0x4c4e57(0x249)]=![],this[_0x4c4e57(0x2a2)]=![],this[_0x4c4e57(0x1b8)]=_0x340f90(),this[_0x4c4e57(0x305)]=_0x1371d8(process['pid'],this[_0x4c4e57(0x1b8)]),this[_0x4c4e57(0x329)]=_0x5bf850[_0x4c4e57(0x174)]()[_0x4c4e57(0x12d)](0x0,0x8),this['_rowKey']=_0x587fa0(this[_0x4c4e57(0x305)],this[_0x4c4e57(0x329)]),this['_startedAt']=Date['now'](),this['_kind']=null,this[_0x4c4e57(0x318)]=null,this[_0x4c4e57(0x2aa)]=null,this[_0x4c4e57(0x196)]=null,this['_onProcEvent']=null,this[_0x4c4e57(0x13e)]=null,this[_0x4c4e57(0x20e)]=0x0,this[_0x4c4e57(0x195)]={},this[_0x4c4e57(0x335)]=new Map(),this[_0x4c4e57(0x2d5)]=process[_0x4c4e57(0x1d5)](),this[_0x4c4e57(0x242)]=Date[_0x4c4e57(0x330)](),this[_0x4c4e57(0x136)]=0x0,this[_0x4c4e57(0x31a)]=new Map();}get[_0x30fb52(0x1fd)](){const _0x5cb012=_0x30fb52;return this[_0x5cb012(0x305)];}get[_0x30fb52(0x334)](){const _0x5ce58f=_0x30fb52;return this[_0x5ce58f(0x198)];}[_0x30fb52(0x258)](_0x29a3db,_0x2f400c){const _0x57d2ab=_0x30fb52,_0x4eca7f=_0x577e06(_0x29a3db,_0x2f400c);if(_0x4eca7f[_0x57d2ab(0x1ca)]&&!_0x40fbb8(this[_0x57d2ab(0x2fd)]))return{..._0x4eca7f,'killable':![],'killConfirm':undefined};return _0x4eca7f;}[_0x30fb52(0x26c)](){const _0x31f010=_0x30fb52;return!!this[_0x31f010(0x2bf)];}[_0x30fb52(0x286)](_0x1901b6){Object['assign'](this['_ownMeta'],_0x1901b6||{});}[_0x30fb52(0x1bc)](_0x4c9a7){const _0x14b319=_0x30fb52;if(_0x4c9a7)this[_0x14b319(0x2aa)]=_0x4c9a7;}[_0x30fb52(0x21b)](_0x3617ac={}){const _0x2a9004=_0x30fb52;return this[_0x2a9004(0x2fd)][_0x2a9004(0x11b)](_0x3617ac);}[_0x30fb52(0x29b)](){const _0x5258d0=_0x30fb52,_0x236c70={};let _0x51c999=0x0,_0x477db2=0x0;const _0x4a22cd=new Set();for(const _0x1abb96 of this[_0x5258d0(0x219)]()){_0x477db2++;const _0x5d4af6=_0x1abb96[_0x5258d0(0x1fa)];if(!_0x5d4af6)continue;if(_0x5d4af6[_0x5258d0(0x2ee)])_0x51c999++;for(const _0x2502c0 of _0x5d4af6[_0x5258d0(0x1a0)]||[]){if(![_0x5258d0(0x2da),'fanout'][_0x5258d0(0x250)](_0x2502c0[_0x5258d0(0x176)]))continue;(_0x2502c0[_0x5258d0(0x20d)]===_0x5258d0(0x2c7)||_0x2502c0[_0x5258d0(0x20d)]===_0x5258d0(0x194))&&_0x2502c0[_0x5258d0(0x25a)]&&_0x4a22cd[_0x5258d0(0x2ea)]((_0x2502c0[_0x5258d0(0x1a2)]||_0x5258d0(0x206))+':'+_0x2502c0[_0x5258d0(0x25a)]);const _0x29aa9b=_0x2502c0[_0x5258d0(0x1a2)]||_0x5258d0(0x206);(_0x236c70[_0x29aa9b]||=[])[_0x5258d0(0x1b6)]({..._0x2502c0,'env':_0x29aa9b,'owner':{'pid':_0x1abb96[_0x5258d0(0x2c5)]??null,'kind':_0x1abb96[_0x5258d0(0x313)]??null}});}}for(const [_0x13610f,_0x287163]of Object[_0x5258d0(0x27d)](_0x236c70)){for(const _0x14c59b of _0x287163){if(_0x14c59b['mode']==='single'&&!_0x14c59b['claimGated']){const _0x9ed93=_0x13610f+':'+(_0x14c59b[_0x5258d0(0x25a)]??'');if(!_0x4a22cd[_0x5258d0(0x2e7)](_0x9ed93))_0x14c59b[_0x5258d0(0x182)]=!![];}}}return{'envs':_0x236c70,'policy':null,'participation':{'participating':_0x51c999,'total':_0x477db2},'source':'workers'};}[_0x30fb52(0x25b)](){const _0x24304b=_0x30fb52,_0x3b416c=_0x4bc6cf=>{const _0x11e735=_0x39df;if(_0x4bc6cf['state']==='online'||_0x4bc6cf[_0x11e735(0x20d)]==='building'||_0x4bc6cf[_0x11e735(0x20d)]===_0x11e735(0x268))return 0x3;if(_0x4bc6cf['claimGated'])return 0x1;return 0x2;},_0x4bbccd=new Map();for(const _0x3b9d0e of this[_0x24304b(0x219)]()){for(const _0x430198 of _0x3b9d0e[_0x24304b(0x1fa)]?.[_0x24304b(0x1a0)]||[]){const _0xdbcdd9={..._0x430198,'owner':{'pid':_0x3b9d0e[_0x24304b(0x2c5)]??null,'kind':_0x3b9d0e[_0x24304b(0x313)]??null,'host':_0x3b9d0e[_0x24304b(0x156)]??null}},_0x3075ee=_0x430198[_0x24304b(0x176)]===_0x24304b(0x2da)?_0x24304b(0x16b)+(_0x430198['env']??'')+'::'+(_0x430198[_0x24304b(0x25a)]??_0x430198['type']??_0x430198['id']):_0x24304b(0x29a)+(_0x3b9d0e[_0x24304b(0x2bd)]??_0x3b9d0e[_0x24304b(0x254)]??'')+'::'+(_0x430198['env']??'')+'::'+_0x430198['id'],_0x2aaafc=_0x4bbccd['get'](_0x3075ee);if(!_0x2aaafc||_0x3b416c(_0xdbcdd9)>_0x3b416c(_0x2aaafc))_0x4bbccd[_0x24304b(0x248)](_0x3075ee,_0xdbcdd9);}}return[..._0x4bbccd[_0x24304b(0x32d)]()];}[_0x30fb52(0x2a4)](){const _0x3228c2=_0x30fb52,_0x1f061c=Date['now'](),_0xcaeae8=this[_0x3228c2(0x219)](),_0xc712c0=_0x351da4=>Math[_0x3228c2(0x308)](0x0,Math[_0x3228c2(0x18e)]((_0x1f061c-(_0x351da4[_0x3228c2(0x297)]||_0x1f061c))/0x3e8)),_0xef8e47=_0xcaeae8['find'](_0x24daca=>_0x24daca[_0x3228c2(0x313)]===_0x3228c2(0x2a5)),_0x309d35=_0xcaeae8[_0x3228c2(0x16d)](_0x4f06a4=>_0x4f06a4['kind']===_0x3228c2(0x15e));if(_0xef8e47||_0x309d35['length'])return{'primary':_0xef8e47?{'pid':_0xef8e47[_0x3228c2(0x2c5)],'uptime':_0xc712c0(_0xef8e47)}:null,'workers':_0x309d35[_0x3228c2(0x2c0)](_0x4e6e7c=>({'pid':_0x4e6e7c[_0x3228c2(0x2c5)],'uptime':_0xc712c0(_0x4e6e7c)})),'workersConfigured':_0xef8e47?.['meta']?.[_0x3228c2(0x235)]??_0x309d35[_0x3228c2(0x1e5)],'mode':_0x3228c2(0x2eb)};const _0x2bf245=_0xcaeae8[_0x3228c2(0x1e0)](_0x2368cc=>_0x2368cc['kind']===_0x3228c2(0x18b)||_0x2368cc[_0x3228c2(0x313)]==='standalone'||_0x2368cc[_0x3228c2(0x313)]===_0x3228c2(0x324)),_0x4f61be=_0x2bf245?{'pid':_0x2bf245['pid'],'uptime':_0xc712c0(_0x2bf245)}:{'pid':process[_0x3228c2(0x2c5)],'uptime':Math[_0x3228c2(0x308)](0x0,Math[_0x3228c2(0x18e)](process[_0x3228c2(0x1fe)]()))};return{'primary':_0x4f61be,'workers':[_0x4f61be],'workersConfigured':0x1,'mode':_0x3228c2(0x2da)};}[_0x30fb52(0x240)](){const _0x2ebb9b=_0x30fb52;return this[_0x2ebb9b(0x114)]();}[_0x30fb52(0x15b)](){const _0x242c5a=_0x30fb52,_0x46aa6d=new Map();for(const _0x219db3 of this['_groupByProcess']())_0x46aa6d[_0x242c5a(0x248)](_0x219db3[_0x242c5a(0x254)],{..._0x219db3,'children':[]});const _0xab267c=[];for(const _0x2a8909 of _0x46aa6d['values']()){const _0x580f94=_0x2a8909['supervisorKey']?_0x46aa6d[_0x242c5a(0x13d)](_0x2a8909[_0x242c5a(0x263)]):null;if(_0x580f94&&_0x580f94!==_0x2a8909)_0x580f94[_0x242c5a(0x17c)][_0x242c5a(0x1b6)](_0x2a8909);else _0xab267c[_0x242c5a(0x1b6)](_0x2a8909);}const _0x413f92=(_0x1c110b,_0x2c985b)=>_0x1c110b['kind']===_0x2c985b[_0x242c5a(0x313)]?(_0x1c110b[_0x242c5a(0x2c5)]||0x0)-(_0x2c985b['pid']||0x0):(_0x1c110b[_0x242c5a(0x313)]??'')<(_0x2c985b[_0x242c5a(0x313)]??'')?-0x1:0x1,_0x506085=_0x1d5962=>{const _0xaa1103=_0x242c5a;_0x1d5962[_0xaa1103(0x171)](_0x413f92);for(const _0x809dfc of _0x1d5962)if(_0x809dfc[_0xaa1103(0x17c)][_0xaa1103(0x1e5)])_0x506085(_0x809dfc['children']);};return _0x506085(_0xab267c),_0xab267c;}['getProcess'](_0x7bf349){const _0x51dd2e=_0x30fb52;return this[_0x51dd2e(0x114)]()[_0x51dd2e(0x1e0)](_0x4a8cf7=>_0x4a8cf7[_0x51dd2e(0x254)]===_0x7bf349)??null;}[_0x30fb52(0x114)](_0x2bc349=Date[_0x30fb52(0x330)]()){const _0x3870f1=_0x30fb52,_0x1f8087=new Map();for(const _0x2bcf9a of this['listNodes']()){const _0x147c4e=_0x327e98(_0x2bcf9a);let _0x1b9264=_0x1f8087[_0x3870f1(0x13d)](_0x147c4e);!_0x1b9264&&(_0x1b9264={'processKey':_0x147c4e,'nodeKey':_0x147c4e,'pid':_0x2bcf9a[_0x3870f1(0x2c5)],'ppid':_0x2bcf9a[_0x3870f1(0x2c1)]??null,'host':_0x2bcf9a[_0x3870f1(0x156)]??null,'kind':_0x2bcf9a[_0x3870f1(0x313)],'role':null,'supervisorKey':_0x2bcf9a[_0x3870f1(0x263)]??null,'slot':_0x2bcf9a[_0x3870f1(0x2b8)]??null,'slotKey':_0x2bcf9a[_0x3870f1(0x122)]??null,'caps':_0x2bcf9a[_0x3870f1(0x205)]??null,'lifecycle':_0x2bcf9a[_0x3870f1(0x204)]??null,'uptime':Math[_0x3870f1(0x308)](0x0,Math[_0x3870f1(0x18e)]((_0x2bc349-(_0x2bcf9a[_0x3870f1(0x297)]||_0x2bc349))/0x3e8)),'startedAt':_0x2bcf9a['startedAt']??null,'meta':_0x2bcf9a[_0x3870f1(0x27c)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x1f8087['set'](_0x147c4e,_0x1b9264));_0x1b9264['instances'][_0x3870f1(0x1b6)]({'instanceId':_0x2bcf9a['instanceId']??null,'role':_0x2bcf9a['role']??null,'listenAddr':_0x2bcf9a[_0x3870f1(0x143)]??null,'lifecycle':_0x2bcf9a[_0x3870f1(0x204)]??null,'processing':_0x2bcf9a[_0x3870f1(0x1fa)]??null});if(!_0x1b9264['role']&&_0x2bcf9a[_0x3870f1(0x25e)])_0x1b9264[_0x3870f1(0x25e)]=_0x2bcf9a[_0x3870f1(0x25e)];if(!_0x1b9264[_0x3870f1(0x143)]&&_0x2bcf9a[_0x3870f1(0x143)])_0x1b9264[_0x3870f1(0x143)]=_0x2bcf9a['listenAddr'];if(!_0x1b9264[_0x3870f1(0x1fa)]&&_0x2bcf9a['processing'])_0x1b9264['processing']=_0x2bcf9a[_0x3870f1(0x1fa)];if(!_0x1b9264[_0x3870f1(0x291)]&&_0x2bcf9a[_0x3870f1(0x291)])_0x1b9264[_0x3870f1(0x291)]=_0x2bcf9a[_0x3870f1(0x291)];if(!_0x1b9264[_0x3870f1(0x267)]&&_0x2bcf9a[_0x3870f1(0x267)])_0x1b9264[_0x3870f1(0x267)]=_0x2bcf9a[_0x3870f1(0x267)];if(_0x1b9264['caps']==null&&_0x2bcf9a['caps'])_0x1b9264[_0x3870f1(0x205)]=_0x2bcf9a[_0x3870f1(0x205)];if(_0x2bcf9a[_0x3870f1(0x1eb)]&&(!_0x1b9264[_0x3870f1(0x1eb)]||(_0x2bcf9a[_0x3870f1(0x1eb)]['at']??0x0)>(_0x1b9264[_0x3870f1(0x1eb)]['at']??0x0)))_0x1b9264[_0x3870f1(0x1eb)]=_0x2bcf9a[_0x3870f1(0x1eb)];}return[..._0x1f8087[_0x3870f1(0x32d)]()];}['runtimeProcessesView'](){const _0x3583cb=_0x30fb52,_0x271300=[],_0x5245ad={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x273917 of this['_groupByProcess']()){_0x271300['push']({'processKey':_0x273917[_0x3583cb(0x254)],'kind':_0x273917[_0x3583cb(0x313)],'pid':_0x273917[_0x3583cb(0x2c5)],'supervisorKey':_0x273917[_0x3583cb(0x263)],'meta':_0x273917[_0x3583cb(0x27c)]??null,'uptime':_0x273917[_0x3583cb(0x1fe)],'stats':_0x273917['stats']??null}),_0x5245ad[_0x3583cb(0x23f)]++;if(_0x273917[_0x3583cb(0x1eb)]){_0x5245ad[_0x3583cb(0x1be)]+=_0x273917[_0x3583cb(0x1eb)]['rss']||0x0,_0x5245ad[_0x3583cb(0x21e)]+=(_0x273917['stats'][_0x3583cb(0x21e)]||0x0)+(_0x273917['stats']['threads']?.[_0x3583cb(0x21e)]||0x0);const _0x4df2c8=_0x273917[_0x3583cb(0x1eb)][_0x3583cb(0x231)];_0x4df2c8&&(_0x5245ad['threads'][_0x3583cb(0x288)]+=_0x4df2c8[_0x3583cb(0x288)]||0x0,_0x5245ad[_0x3583cb(0x231)]['sandbox']+=_0x4df2c8[_0x3583cb(0x16c)]||0x0,_0x5245ad[_0x3583cb(0x231)]['busy']+=_0x4df2c8['busy']||0x0);}}return{'totals':_0x5245ad,'nodes':_0x271300};}async[_0x30fb52(0x139)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x32e104=_0x30fb52;this['_isWriter']=this[_0x32e104(0x249)]||!!writer,this[_0x32e104(0x2a2)]=this[_0x32e104(0x2a2)]||!!reader,this[_0x32e104(0x131)]=kind||this['_kind']||(_0x2b0db5[_0x32e104(0x298)]?_0x32e104(0x15e):'cli'),this[_0x32e104(0x318)]=supervisorKey??this[_0x32e104(0x318)],this[_0x32e104(0x2aa)]=listenAddr??this[_0x32e104(0x2aa)],this[_0x32e104(0x1bd)](),await this[_0x32e104(0x1cf)]();if(!writer&&!reader)return null;if(!this[_0x32e104(0x2bf)]){const _0x377804=await this['okdb'][_0x32e104(0x314)](_0x15390f,{'sync':![],'durability':_0x32e104(0x135)});if(!_0x377804[_0x32e104(0x150)](_0x389b5b))await _0x377804[_0x32e104(0x239)](_0x389b5b);this[_0x32e104(0x2bf)]=_0x377804;}return this[_0x32e104(0x2bf)];}[_0x30fb52(0x241)](){const _0x3e81a0=_0x30fb52;return this[_0x3e81a0(0x1c9)]!==this[_0x3e81a0(0x2bf)]&&(this[_0x3e81a0(0x1c9)]=this['_statusEnv'],this['_nodeDbCache']=this[_0x3e81a0(0x2bf)]['_getType'](_0x389b5b)[_0x3e81a0(0x1b4)]),this['_nodeDbCache'];}['_putRowAsync'](_0x30b57e){const _0x158331=_0x30fb52;if(_0x1a9718)return this[_0x158331(0x241)]()[_0x158331(0x1ae)](_0x30b57e['nodeKey'],_0x30b57e,0x1);const _0x2e3ee2=this[_0x158331(0x241)]()[_0x158331(0x1e7)](_0x30b57e[_0x158331(0x2bd)],_0x30b57e,0x1);if(_0x2e3ee2&&typeof _0x2e3ee2['then']==='function')_0x2e3ee2['then'](undefined,()=>{});return _0x2e3ee2;}[_0x30fb52(0x1a1)](_0x180f4e){const _0x43afdd=_0x30fb52;return this[_0x43afdd(0x241)]()[_0x43afdd(0x1ae)](_0x180f4e[_0x43afdd(0x2bd)],_0x180f4e,0x1);}[_0x30fb52(0x2d2)](_0xa8a4a3){const _0x127f18=_0x30fb52;if(_0x1a9718)try{return this[_0x127f18(0x241)]()[_0x127f18(0x1e6)](_0xa8a4a3);}catch{return![];}const _0x12893f=this[_0x127f18(0x241)]()[_0x127f18(0x293)](_0xa8a4a3);if(_0x12893f&&typeof _0x12893f[_0x127f18(0x222)]===_0x127f18(0x211))_0x12893f['then'](undefined,()=>{});return _0x12893f;}async[_0x30fb52(0x2bb)](_0x3d9ec2){const _0x4216a6=_0x30fb52;if(!this['_statusEnv']||!this[_0x4216a6(0x249)]||!_0x3d9ec2?.[_0x4216a6(0x2bd)])return;return this['_putRowAsync'](_0x3d9ec2);}async[_0x30fb52(0x158)](_0x35c6be){const _0x1919e5=_0x30fb52;if(!this[_0x1919e5(0x2bf)]||!this[_0x1919e5(0x249)]||!_0x35c6be)return;const _0x42499e=_0x35c6be[_0x1919e5(0x250)]('#'),_0x3ee4a5=[];for(const {key:_0x16580c}of this[_0x1919e5(0x2bf)][_0x1919e5(0x165)](_0x389b5b)){if(_0x16580c===_0x35c6be||!_0x42499e&&typeof _0x16580c===_0x1919e5(0x12c)&&_0x16580c[_0x1919e5(0x210)](_0x35c6be+'#'))_0x3ee4a5[_0x1919e5(0x1b6)](_0x16580c);}for(const _0x42410c of _0x3ee4a5){try{this['_nodeDb']()['removeSync'](_0x42410c);}catch{}}}[_0x30fb52(0x120)](_0x1516a3){const _0x36de79=_0x30fb52;if(typeof _0x1516a3?.[_0x36de79(0x2c5)]!==_0x36de79(0x304))return![];if(_0x1516a3[_0x36de79(0x156)]!==_0x44cbf8[_0x36de79(0x320)]())return![];if(_0x1516a3[_0x36de79(0x2c5)]===process['pid'])return![];if(_0x1516a3['expiresAt']!=null&&_0x1516a3['expiresAt']<Date[_0x36de79(0x330)]()-_0x1869b5)return!![];try{return process['kill'](_0x1516a3['pid'],0x0),![];}catch(_0x30c837){return _0x30c837[_0x36de79(0x23b)]===_0x36de79(0x279);}}[_0x30fb52(0x219)](){const _0x2e6244=_0x30fb52;if(!this[_0x2e6244(0x2bf)])return[];try{this[_0x2e6244(0x2bf)]['db']?.[_0x2e6244(0x281)]?.();}catch{}const _0x334652=Date[_0x2e6244(0x330)](),_0x52d4bf=_0x44cbf8[_0x2e6244(0x320)](),_0x4887d5=[];for(const {value:_0x2cfebf}of this[_0x2e6244(0x2bf)][_0x2e6244(0x165)](_0x389b5b)){if(!_0x2cfebf)continue;let _0x4b3349=null;_0x2cfebf['host']===_0x52d4bf&&typeof _0x2cfebf[_0x2e6244(0x2c5)]===_0x2e6244(0x304)&&(_0x4b3349=!this[_0x2e6244(0x120)](_0x2cfebf));if(_0x4b3349===![])continue;const _0x597be8=_0x2cfebf['expiresAt']==null||_0x2cfebf['expiresAt']>=_0x334652;if(_0x4b3349===!![]||_0x597be8)_0x4887d5['push'](_0x2cfebf);}return _0x4887d5;}async[_0x30fb52(0x2ed)](_0x382c2d=0x0){const _0x336b53=_0x30fb52;if(!this[_0x336b53(0x2bf)]||!this[_0x336b53(0x249)])return;const _0xe59f8a=Date[_0x336b53(0x330)]()-_0x382c2d,_0x3f28ef=new Set(),_0xdd0eab=[],_0x2e96da=_0x44cbf8[_0x336b53(0x320)](),_0x51bd22=require$$6[_0x336b53(0x234)];for(const {key:_0x36a968,value:_0x345f59}of this[_0x336b53(0x2bf)][_0x336b53(0x165)](_0x389b5b)){if(!_0x345f59)continue;const _0x4780bf=_0x345f59[_0x336b53(0x156)]===_0x2e96da&&typeof _0x345f59[_0x336b53(0x2c5)]===_0x336b53(0x304),_0x5f1cb3=_0x4780bf?this[_0x336b53(0x120)](_0x345f59):_0x345f59[_0x336b53(0x26e)]!=null&&_0x345f59[_0x336b53(0x26e)]<_0xe59f8a;if(_0x5f1cb3)_0xdd0eab[_0x336b53(0x1b6)](_0x36a968);else{_0x3f28ef[_0x336b53(0x2ea)](_0x327e98(_0x345f59)??_0x36a968);if(_0x345f59[_0x336b53(0x234)]&&_0x345f59[_0x336b53(0x234)]!==_0x51bd22){if(!this[_0x336b53(0x190)])this['_versionSkewWarned']=new Set();!this[_0x336b53(0x190)][_0x336b53(0x2e7)](_0x345f59[_0x336b53(0x234)])&&(this[_0x336b53(0x190)][_0x336b53(0x2ea)](_0x345f59[_0x336b53(0x234)]),this[_0x336b53(0x2fd)][_0x336b53(0x2bc)]?.[_0x336b53(0x2c8)]?.(_0x336b53(0x155)+(_0x345f59[_0x336b53(0x2c5)]??'?')+_0x336b53(0x203)+_0x345f59[_0x336b53(0x234)]+'\x20while\x20this\x20process\x20runs\x20'+_0x51bd22+_0x336b53(0x15f)+'mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.',{'feature':_0x336b53(0x179)}));}}}for(const _0x2cf76d of _0xdd0eab)this[_0x336b53(0x2d2)](_0x2cf76d);if(this[_0x336b53(0x1bd)]()){const _0x465eea=[];for(const {key:_0x22d199}of this['listDesired'](_0x336b53(0x1d3))){if(!_0x3f28ef['has'](_0x22d199)){if(_0x1a9718)try{this[_0x336b53(0x25d)][_0x336b53(0x1e6)]('node/'+_0x22d199);}catch{}else _0x465eea[_0x336b53(0x1b6)](this[_0x336b53(0x25d)][_0x336b53(0x293)](_0x336b53(0x238)+_0x22d199));}}if(_0x465eea[_0x336b53(0x1e5)])await Promise[_0x336b53(0x2f7)](_0x465eea);}}[_0x30fb52(0x1f0)](_0x406a3b=null){const _0x5bd6a3=_0x30fb52;if(this[_0x5bd6a3(0x196)])return;if(!this['_isWriter']||!this[_0x5bd6a3(0x2bf)]){this['okdb']?.[_0x5bd6a3(0x2bc)]?.[_0x5bd6a3(0x2c8)]?.(_0x5bd6a3(0x126)+this['_isWriter']+_0x5bd6a3(0x20c)+!!this[_0x5bd6a3(0x2bf)]+_0x5bd6a3(0x138),{'feature':_0x5bd6a3(0x23f)});return;}this[_0x5bd6a3(0x13e)]=_0x406a3b,this[_0x5bd6a3(0x26d)]=()=>this[_0x5bd6a3(0x2e0)]();for(const _0x285f12 of _0x53ea89)this[_0x5bd6a3(0x2fd)][_0x5bd6a3(0x252)]['on'](_0x285f12,this[_0x5bd6a3(0x26d)]);this[_0x5bd6a3(0x13c)]();const _0x1184c4=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x3fb8ea;this['_hbTimer']=setInterval(()=>{const _0x1620f9=_0x5bd6a3;if(this[_0x1620f9(0x13e)])try{this[_0x1620f9(0x13e)]();}catch{}this[_0x1620f9(0x13c)](),this[_0x1620f9(0x2ed)]()[_0x1620f9(0x11f)](()=>{});},_0x1184c4);if(this[_0x5bd6a3(0x196)][_0x5bd6a3(0x1f8)])this[_0x5bd6a3(0x196)][_0x5bd6a3(0x1f8)]();}[_0x30fb52(0x2e0)](){const _0x340127=_0x30fb52;if(!this['_isWriter']||!this[_0x340127(0x2bf)])return;if(Date[_0x340127(0x330)]()-this[_0x340127(0x20e)]<_0x27d9a3)return;this[_0x340127(0x13c)]();}[_0x30fb52(0x13c)](){const _0x29e355=_0x30fb52;if(!this[_0x29e355(0x249)]||!this[_0x29e355(0x2bf)])return;this['_lastPublishAt']=Date[_0x29e355(0x330)]();try{const _0xef1a09=[this['_buildOwnRow']()];for(const _0x1ed508 of this[_0x29e355(0x335)][_0x29e355(0x32d)]())_0xef1a09[_0x29e355(0x1b6)](this[_0x29e355(0x1da)](_0x1ed508));const _0x2e3e09=_0x342044[_0x29e355(0x26a)]?_0x342044[_0x29e355(0x330)]():0x0;for(const _0x4535ab of _0xef1a09){try{this[_0x29e355(0x1a1)](_0x4535ab),this[_0x29e355(0x172)]=![];}catch(_0x23831e){!this['_publishFailWarned']&&(this[_0x29e355(0x172)]=!![],this['okdb']?.[_0x29e355(0x2bc)]?.[_0x29e355(0x2c8)]?.(_0x29e355(0x164)+_0x23831e[_0x29e355(0x12b)],{'feature':_0x29e355(0x23f)}));}}if(_0x342044['enabled'])_0x342044[_0x29e355(0x19f)]('registry-publish',_0x342044[_0x29e355(0x330)]()-_0x2e3e09,_0x29e355(0x24d)+_0xef1a09['length']+_0x29e355(0x1ea));}catch(_0x386bed){!this[_0x29e355(0x172)]&&(this[_0x29e355(0x172)]=!![],this[_0x29e355(0x2fd)]?.[_0x29e355(0x2bc)]?.['warn']?.(_0x29e355(0x164)+_0x386bed[_0x29e355(0x12b)],{'feature':_0x29e355(0x23f)}));}}async[_0x30fb52(0x1f3)](){const _0x30aeb3=_0x30fb52;if(this['_onProcEvent']){for(const _0x58f3bb of _0x53ea89){try{this[_0x30aeb3(0x2fd)][_0x30aeb3(0x252)][_0x30aeb3(0x151)](_0x58f3bb,this['_onProcEvent']);}catch{}}this[_0x30aeb3(0x26d)]=null;}this['_hbTimer']&&(clearInterval(this[_0x30aeb3(0x196)]),this['_hbTimer']=null);try{if(this['_statusEnv']&&this['_isWriter'])await this[_0x30aeb3(0x158)](this[_0x30aeb3(0x198)]);}catch{}}async[_0x30fb52(0x2dc)](){const _0x16fb31=_0x30fb52;if(!this[_0x16fb31(0x2bf)]||!this[_0x16fb31(0x249)])return;try{await this[_0x16fb31(0x158)](this[_0x16fb31(0x198)]);}catch{}try{const _0x4aebb7=[];for(const {value:_0x48ad5e}of this[_0x16fb31(0x2bf)][_0x16fb31(0x165)](_0x389b5b)){if(_0x48ad5e?.[_0x16fb31(0x2c1)]===process['pid']&&_0x48ad5e['nodeKey'])_0x4aebb7[_0x16fb31(0x1b6)](_0x48ad5e[_0x16fb31(0x2bd)]);}for(const _0x4e66ab of _0x4aebb7){try{await this[_0x16fb31(0x158)](_0x4e66ab);}catch{}}}catch{}}async[_0x30fb52(0x18a)](){const _0x5850af=_0x30fb52;return this[_0x5850af(0x2bb)](this[_0x5850af(0x1c0)]());}async['publishChildRow'](_0xb63759){const _0x252b16=_0x30fb52;if(!this['_statusEnv']||!this[_0x252b16(0x249)])return;return this[_0x252b16(0x2bb)](this[_0x252b16(0x1da)](_0xb63759));}[_0x30fb52(0x1da)]({pid:_0x8d2fa7,startedAt:_0x5300f9,kind:_0x38fb45,supervisorKey:_0x32e10e,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x30fb52(0x311),meta:meta=null,stats:stats=null}){const _0x4af825=_0x30fb52,_0x265f08=Date['now'](),_0x2e7331=_0x1371d8(_0x8d2fa7,_0x5300f9);return{'nodeKey':_0x587fa0(_0x2e7331,'0'),'processKey':_0x2e7331,'instanceId':'0','pid':_0x8d2fa7,'startedAt':_0x5300f9,'ppid':process[_0x4af825(0x2c5)],'host':_0x44cbf8[_0x4af825(0x320)](),'supervisorKey':_0x32e10e,'slot':slot,'slotKey':slotKey,'kind':_0x38fb45,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x265f08,'expiresAt':_0x265f08+_0xbb41e6,'caps':this[_0x4af825(0x258)](_0x38fb45,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x30fb52(0x2be)](_0x1432db){const _0x25672f=_0x30fb52;if(!_0x1432db?.[_0x25672f(0x2c5)])return null;const _0x33bf2f=_0x1371d8(_0x1432db[_0x25672f(0x2c5)],_0x1432db['startedAt']);this[_0x25672f(0x335)][_0x25672f(0x248)](_0x33bf2f,{..._0x1432db,'supervisorKey':_0x1432db[_0x25672f(0x263)]??this[_0x25672f(0x305)]});if(this['_isWriter'])await this[_0x25672f(0x119)](this[_0x25672f(0x335)][_0x25672f(0x13d)](_0x33bf2f))[_0x25672f(0x11f)]?.(()=>{});return _0x33bf2f;}[_0x30fb52(0x22a)](_0x79dba0){const _0x2fd241=_0x30fb52;if(!_0x79dba0)return;return this[_0x2fd241(0x335)][_0x2fd241(0x116)](_0x79dba0),this['removeNode'](_0x79dba0);}[_0x30fb52(0x112)](){const _0x462ff3=_0x30fb52,_0x3f5849=Date[_0x462ff3(0x330)](),_0x1c5f11=process[_0x462ff3(0x1d5)](),_0x4a3b2e=(_0x3f5849-this[_0x462ff3(0x242)])*0x3e8;if(_0x4a3b2e>=0x3d090){const _0x582dea=_0x1c5f11[_0x462ff3(0x23d)]-this[_0x462ff3(0x2d5)]['user']+(_0x1c5f11[_0x462ff3(0x283)]-this[_0x462ff3(0x2d5)][_0x462ff3(0x283)]),_0x30cc1f=_0x44cbf8[_0x462ff3(0x282)]()[_0x462ff3(0x1e5)]||0x1;this[_0x462ff3(0x136)]=Math['min'](0x64,Math[_0x462ff3(0x18e)](_0x582dea/(_0x4a3b2e*_0x30cc1f)*0x64)),this[_0x462ff3(0x264)]=Math[_0x462ff3(0x18e)](_0x4a3b2e/0x3e8),this[_0x462ff3(0x2d5)]=_0x1c5f11,this[_0x462ff3(0x242)]=_0x3f5849;}const _0x301966=process[_0x462ff3(0x118)](),_0x3faa1a=this[_0x462ff3(0x31a)][_0x462ff3(0x209)];let _0xf902e5=0x0;if(_0x3faa1a>0x0){const _0x5a32aa=[this[_0x462ff3(0x2fd)],...this['okdb'][_0x462ff3(0x32f)]?.[_0x462ff3(0x32d)]?.()??[]];for(const _0x291cc2 of _0x5a32aa){const _0x2fd0a5=_0x291cc2['functions']?.[_0x462ff3(0x13a)];if(_0x2fd0a5)_0xf902e5+=_0x2fd0a5[_0x462ff3(0x228)][_0x462ff3(0x251)];}}let _0xb53e43=null;const _0x30d974=_0x3faa1a;if(_0x30d974>0x0){let _0x49a54e=0x0;for(const _0x67395b of this[_0x462ff3(0x31a)][_0x462ff3(0x32d)]())_0x49a54e+=_0x67395b[_0x462ff3(0x21e)]||0x0;_0xb53e43={'count':_0x30d974,'heapUsed':_0x49a54e,'sandbox':_0x3faa1a,'busy':_0xf902e5};}return{'rss':_0x301966['rss'],'heapUsed':_0x301966[_0x462ff3(0x21e)],'heapTotal':_0x301966[_0x462ff3(0x2ec)],'external':_0x301966[_0x462ff3(0x162)],'cpuPct':this[_0x462ff3(0x136)],'cpuWindowMs':this[_0x462ff3(0x264)]??null,'threads':_0xb53e43,'at':_0x3f5849};}['reportThreadStats'](_0x526190,_0x49fbc6){if(!_0x526190||!_0x49fbc6)return;this['_threadStats']['set'](_0x526190,_0x49fbc6);}[_0x30fb52(0x21c)](_0x125666){const _0x3d86ac=_0x30fb52;this[_0x3d86ac(0x31a)][_0x3d86ac(0x116)](_0x125666);}[_0x30fb52(0x213)](_0x242715,_0x35af90,_0x596022=undefined){const _0x540e0e=_0x30fb52,_0x4f19f7=this['_children'][_0x540e0e(0x13d)](_0x242715);if(!_0x4f19f7||!_0x35af90)return;if(_0x596022!==undefined)_0x4f19f7[_0x540e0e(0x1fa)]=_0x596022;_0x4f19f7[_0x540e0e(0x1eb)]={'rss':_0x35af90[_0x540e0e(0x1be)]??null,'heapUsed':_0x35af90[_0x540e0e(0x21e)]??null,'heapTotal':_0x35af90['heapTotal']??null,'external':_0x35af90[_0x540e0e(0x162)]??null,'cpuPct':_0x35af90[_0x540e0e(0x1d4)]??null,'cpuWindowMs':_0x35af90[_0x540e0e(0x159)]??null,'threads':_0x35af90[_0x540e0e(0x231)]??null,'claims':_0x35af90['claims']??null,'envsOpen':_0x35af90['envsOpen']??null,'at':Date[_0x540e0e(0x330)]()};}[_0x30fb52(0x1c0)](){const _0x5b559a=_0x30fb52,_0x5d23ca=Date[_0x5b559a(0x330)](),_0x6d651f=this[_0x5b559a(0x2fd)][_0x5b559a(0x180)]||{},_0x6a9f5=this[_0x5b559a(0x131)]||_0x5b559a(0x18b);return{'nodeKey':this[_0x5b559a(0x198)],'processKey':this[_0x5b559a(0x305)],'instanceId':this[_0x5b559a(0x329)],'pid':process[_0x5b559a(0x2c5)],'startedAt':this[_0x5b559a(0x1b8)],'instanceStartedAt':this[_0x5b559a(0x339)],'ppid':typeof process[_0x5b559a(0x2c1)]==='number'?process[_0x5b559a(0x2c1)]:null,'host':_0x44cbf8['hostname'](),'supervisorKey':this[_0x5b559a(0x318)]??null,'version':require$$6[_0x5b559a(0x234)],'kind':_0x6a9f5,'role':{'engines':!!_0x6d651f['engines'],'processors':!!_0x6d651f[_0x5b559a(0x1a0)],'compaction':_0x6d651f[_0x5b559a(0x2f5)],'http':_0x6d651f[_0x5b559a(0x186)]},'listenAddr':this[_0x5b559a(0x2aa)]??null,'heartbeatAt':_0x5d23ca,'expiresAt':_0x5d23ca+_0xbb41e6,'caps':this[_0x5b559a(0x258)](_0x6a9f5,_0x6d651f),'lifecycle':{'state':'running','desiredVersionApplied':null},'meta':{...this[_0x5b559a(0x195)]},'processing':_0x6d651f['processors']?this[_0x5b559a(0x303)]():null,'engines':_0x6d651f['engines']?[...this[_0x5b559a(0x2fd)][_0x5b559a(0x2b0)]??[]]:null,'singletonClaims':this[_0x5b559a(0x1a7)](),'stats':this[_0x5b559a(0x112)](),'writers':this[_0x5b559a(0x177)]()};}[_0x30fb52(0x177)](){const _0x232498=_0x30fb52,_0x4be379={};try{for(const [_0x360d65,_0x5420b0]of this[_0x232498(0x2fd)][_0x232498(0x32f)]){try{const _0x4dbede=_0x5420b0[_0x232498(0x26b)]?.();if(!_0x4dbede)continue;if(!_0x4dbede['depth']&&!_0x4dbede[_0x232498(0x319)]&&!(_0x4dbede[_0x232498(0x157)]??0x0)&&!_0x4dbede[_0x232498(0x216)])continue;_0x4be379[_0x360d65]={'depth':_0x4dbede['depth'],'oldestPendingMs':_0x4dbede[_0x232498(0x1b7)],'committed':_0x4dbede['committed'],'commitsPerSec':_0x4dbede['commitsPerSec'],'commitP99Ms':_0x4dbede['commitP99Ms'],'parkedNow':_0x4dbede[_0x232498(0x157)]??0x0,'draining':!!_0x4dbede[_0x232498(0x216)]};}catch{}}}catch{}return Object[_0x232498(0x16a)](_0x4be379)[_0x232498(0x1e5)]?_0x4be379:null;}[_0x30fb52(0x1a7)](){const _0x3f4fb9=_0x30fb52,_0x553533=process[_0x3f4fb9(0x2c5)],_0x269872=Date['now'](),_0x283fc8=_0x43d02e=>{const _0x37f52e=_0x3f4fb9;if(!_0x43d02e)return[];const _0x588326=[];try{for(const {id:_0x397185,entry:_0x29c6cc}of _0x43d02e[_0x37f52e(0x28c)]()){if(_0x29c6cc?.['holder']?.['pid']!==_0x553533)continue;const _0x4ddc06=_0x29c6cc['updatedAt']??_0x29c6cc[_0x37f52e(0x289)]??0x0;if(_0x4ddc06+(_0x29c6cc[_0x37f52e(0x200)]??0x0)<_0x269872)continue;_0x588326[_0x37f52e(0x1b6)](_0x397185);}}catch{}return _0x588326;},_0x459960=_0x283fc8(this[_0x3f4fb9(0x20f)](_0x3f4fb9(0x2b9))),_0x2c34b2=_0x283fc8(this[_0x3f4fb9(0x20f)](_0x3f4fb9(0x2d0)));if(!_0x459960[_0x3f4fb9(0x1e5)]&&!_0x2c34b2[_0x3f4fb9(0x1e5)])return null;return{'compact':_0x459960,'replicate':_0x2c34b2};}['_singletonLock'](_0x49a2a9){const _0x1c768f=_0x30fb52;if(!this[_0x1c768f(0x2fd)]?.['_rootDb'])return null;if(!this[_0x1c768f(0x11d)])this[_0x1c768f(0x11d)]=new Map();let _0x5532af=this[_0x1c768f(0x11d)][_0x1c768f(0x13d)](_0x49a2a9);if(!_0x5532af)try{_0x5532af=new _0x2ea6cc(this[_0x1c768f(0x2fd)][_0x1c768f(0x1d9)],{'namespace':_0x49a2a9}),this[_0x1c768f(0x11d)][_0x1c768f(0x248)](_0x49a2a9,_0x5532af);}catch{return null;}return _0x5532af;}[_0x30fb52(0x303)](){const _0x38e975=_0x30fb52,_0x2539c2=[];try{for(const [_0x367364,_0x1a34c0]of this[_0x38e975(0x2fd)][_0x38e975(0x32f)]){if(_0x367364[_0x38e975(0x210)]('~'))continue;for(const _0x1fc0fa of _0x1a34c0[_0x38e975(0x2b5)]['tierList']())_0x2539c2[_0x38e975(0x1b6)]({..._0x1fc0fa,'env':_0x367364});}}catch{}return{'participate':this[_0x38e975(0x2fd)][_0x38e975(0x1a0)]?.[_0x38e975(0x1d8)]??![],'processors':_0x2539c2};}[_0x30fb52(0x1bd)](){const _0x4a47a4=_0x30fb52;if(this[_0x4a47a4(0x25d)])return!![];const _0x193b97=this[_0x4a47a4(0x2fd)][_0x4a47a4(0x1d9)];if(!_0x193b97)return![];return this['_desired']=_0x193b97[_0x4a47a4(0x30f)](_0x51b9fa,{'dupSort':![]}),this['_cmd']=_0x193b97[_0x4a47a4(0x30f)](_0x33da17,{'dupSort':![]}),!![];}async[_0x30fb52(0x1cf)](){const _0x8e0611=_0x30fb52;if(!this[_0x8e0611(0x1bd)]())return;const _0xfa3049=_0x8e0611(0x134),_0x2ea6b7=0x1,_0x255997=this[_0x8e0611(0x25d)][_0x8e0611(0x13d)](_0xfa3049)??0x0;if(_0x255997>=_0x2ea6b7)return;const _0x8bd7a=_0x4084e5=>{const _0x40ff3c=_0x8e0611;if(_0x4084e5==='worker')return _0x40ff3c(0x2da);if(_0x4084e5==='async')return _0x40ff3c(0x333);return _0x4084e5;};await this[_0x8e0611(0x2fd)]['_systemEnv']['_writer'][_0x8e0611(0x170)](()=>{const _0x1b9ffe=_0x8e0611;for(const _0x5e6d13 of[_0x1b9ffe(0x29c),_0x1b9ffe(0x336)]){for(const {key:_0x42824e,value:_0x57e269}of this[_0x1b9ffe(0x25d)][_0x1b9ffe(0x165)]({'start':_0x5e6d13,'end':_0x5e6d13+'\xff'})){if(typeof _0x42824e!=='string'||!_0x42824e['startsWith'](_0x5e6d13))break;const _0x40bf48=_0x8bd7a(_0x57e269['mode']);if(_0x40bf48!==_0x57e269[_0x1b9ffe(0x176)])this['_desired'][_0x1b9ffe(0x1e7)](_0x42824e,{..._0x57e269,'mode':_0x40bf48});}}this[_0x1b9ffe(0x25d)][_0x1b9ffe(0x1e7)](_0xfa3049,_0x2ea6b7);});}[_0x30fb52(0x2e6)](){return!!this['_desired'];}['getDesired'](_0x75b7c5,_0xf8febb){const _0x5c69e9=_0x30fb52;if(!this[_0x5c69e9(0x1bd)]())return null;const _0xeca801=_0x75b7c5+'/'+_0xf8febb;return this[_0x5c69e9(0x161)](),this[_0x5c69e9(0x2db)][_0x5c69e9(0x13d)](_0xeca801)??this[_0x5c69e9(0x25d)]['get'](_0xeca801)??null;}[_0x30fb52(0x161)](){const _0x24cd28=_0x30fb52;if(!_0x1a9718)return;try{this['okdb']['_systemEnv']?.['db']?.[_0x24cd28(0x281)]?.();}catch{}}async[_0x30fb52(0x130)](_0x3ac012,_0x4f0fa6,_0x469ab9){const _0xffb3cf=_0x30fb52;if(!this[_0xffb3cf(0x1bd)]())return null;const _0x5100fa=_0x3ac012+'/'+_0x4f0fa6;this[_0xffb3cf(0x161)]();const _0x5d7790=this[_0xffb3cf(0x2db)][_0xffb3cf(0x13d)](_0x5100fa)??this[_0xffb3cf(0x25d)][_0xffb3cf(0x13d)](_0x5100fa)??{'version':0x0},_0x4f8830=(_0x5d7790[_0xffb3cf(0x234)]||0x0)+0x1,_0x436b67={..._0x5d7790,..._0x469ab9,'version':_0x4f8830,'updatedAt':Date[_0xffb3cf(0x330)]()};this[_0xffb3cf(0x2db)]['set'](_0x5100fa,_0x436b67);try{await this[_0xffb3cf(0x2fd)]['_systemEnv'][_0xffb3cf(0x1c1)][_0xffb3cf(0x170)](()=>{const _0x5e5ee4=_0xffb3cf;this[_0x5e5ee4(0x25d)][_0x5e5ee4(0x1e7)](_0x5100fa,_0x436b67);});}finally{if(this[_0xffb3cf(0x2db)]['get'](_0x5100fa)===_0x436b67)this[_0xffb3cf(0x2db)][_0xffb3cf(0x116)](_0x5100fa);}return _0x4f8830;}[_0x30fb52(0x2f9)](_0x581d55){const _0x217f58=_0x30fb52;if(!this[_0x217f58(0x1bd)]())return[];this[_0x217f58(0x161)]();const _0x13a46d=_0x581d55+'/',_0x1bc816=[];for(const {key:_0x59c1fe,value:_0x395dde}of this[_0x217f58(0x25d)]['getRange']({'start':_0x13a46d,'end':_0x13a46d+'\xff'})){if(typeof _0x59c1fe!==_0x217f58(0x12c)||!_0x59c1fe[_0x217f58(0x210)](_0x13a46d))break;_0x1bc816[_0x217f58(0x1b6)]({'key':_0x59c1fe['slice'](_0x13a46d[_0x217f58(0x1e5)]),'value':_0x395dde});}return _0x1bc816;}[_0x30fb52(0x13b)](_0x23691a){const _0xc615a7=_0x30fb52;if(!this[_0xc615a7(0x1bd)]())return null;return this[_0xc615a7(0x262)][_0xc615a7(0x13d)](_0x23691a)??null;}async[_0x30fb52(0x29f)](_0x37223d,_0x364535,_0x34c2de={}){const _0x3ca15f=_0x30fb52;if(!this[_0x3ca15f(0x1bd)]())return null;let _0x377f84;return await this[_0x3ca15f(0x2fd)]['_systemEnv']['_writer'][_0x3ca15f(0x170)](()=>{const _0x16f8e8=_0x3ca15f,_0x274ea2=this['_cmd'][_0x16f8e8(0x13d)](_0x37223d)||{'epoch':0x0};_0x377f84=(_0x274ea2[_0x16f8e8(0x2e4)]||0x0)+0x1,this[_0x16f8e8(0x262)][_0x16f8e8(0x1e7)](_0x37223d,{..._0x274ea2,..._0x34c2de,'cmd':_0x364535,'epoch':_0x377f84,'updatedAt':Date[_0x16f8e8(0x330)]()});}),_0x377f84;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x7a12dc,'nodeKey':_0x1371d8,'logicalKey':_0xd01e71,'slotKey':_0x13a6dd,'PROCESS_ENV':_0x15390f,'NODE_TYPE':_0x389b5b},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x3b2539=_0x1d447a;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x52161a=require$$0$4,{EVENTS:_0x2753b9,CHANGE_ACTIONS:_0x4e8f4f}=requireOkdbEnums(),{LOOP:_0x8a4e2c}=requireOkdbLoopMonitor(),_0x4f2b5a=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x37608e=0x5,_0xec9cd6=0x2710;class _0x4c16ed extends _0x52161a{constructor(_0x3f2c0e,_0x4527ef={}){const _0x278b43=_0x39df;super(),this[_0x278b43(0x2fd)]=_0x3f2c0e,this['_quantum']=_0x4527ef[_0x278b43(0x1dc)]??_0x4f2b5a,this['_flushDebounce']=_0x4527ef[_0x278b43(0x2ca)]??_0x37608e,this[_0x278b43(0x28a)]=_0x4527ef[_0x278b43(0x30c)]??_0xec9cd6,this['_started']=![],this[_0x278b43(0x2fb)]=new Map(),this[_0x278b43(0x244)]=new Map(),this[_0x278b43(0x237)]=new Map(),this[_0x278b43(0x1cd)]=null,this[_0x278b43(0x1af)]=![],this['_seen']=new Set(),this[_0x278b43(0x322)]=_0x40d5c6=>this['_handleInProcess'](_0x40d5c6),this['_onPoke']=_0xdb9983=>this[_0x278b43(0x154)](_0xdb9983),this[_0x278b43(0x29d)]=()=>this[_0x278b43(0x27a)]();}['start'](){const _0xe385cf=_0x39df;if(this[_0xe385cf(0x2a1)])return;this[_0xe385cf(0x2a1)]=!![];for(const [_0x3287d8,_0x5aca5c]of this[_0xe385cf(0x2fd)][_0xe385cf(0x32f)]){if(_0x3287d8[_0xe385cf(0x210)]('~'))continue;try{_0x5aca5c['_enableChangelog']();}catch{}}for(const [_0x1dbca3,_0x508608]of this['okdb'][_0xe385cf(0x32f)]){if(_0x1dbca3[_0xe385cf(0x210)]('~'))continue;try{this['_baselines'][_0xe385cf(0x248)](_0x1dbca3,_0x508608[_0xe385cf(0x2dd)]()||0x0);}catch{}}const {events:_0x4b1401}=this[_0xe385cf(0x2fd)];_0x4b1401['on'](_0x2753b9[_0xe385cf(0x276)],this[_0xe385cf(0x322)]),_0x4b1401['on'](_0x2753b9[_0xe385cf(0x133)],this[_0xe385cf(0x322)]),_0x4b1401['on'](_0x2753b9['ITEM_REMOVE'],this['_onItem']),_0x4b1401['on'](_0x2753b9[_0xe385cf(0x1a5)],this['_onPoke']),_0x4b1401['once'](_0x2753b9[_0xe385cf(0x14e)],this[_0xe385cf(0x29d)]);}[_0x3b2539(0x27a)](){const _0x93bad=_0x3b2539;if(!this[_0x93bad(0x2a1)])return;this['_started']=![];const {events:_0x928da6}=this[_0x93bad(0x2fd)];_0x928da6[_0x93bad(0x151)](_0x2753b9[_0x93bad(0x276)],this[_0x93bad(0x322)]),_0x928da6[_0x93bad(0x151)](_0x2753b9[_0x93bad(0x133)],this[_0x93bad(0x322)]),_0x928da6[_0x93bad(0x151)](_0x2753b9[_0x93bad(0x31b)],this[_0x93bad(0x322)]),_0x928da6[_0x93bad(0x151)](_0x2753b9[_0x93bad(0x1a5)],this[_0x93bad(0x27b)]);try{_0x928da6['off'](_0x2753b9[_0x93bad(0x14e)],this[_0x93bad(0x29d)]);}catch{}this[_0x93bad(0x1cd)]&&(clearTimeout(this[_0x93bad(0x1cd)]),this[_0x93bad(0x1cd)]=null),this[_0x93bad(0x237)][_0x93bad(0x2cb)](),this[_0x93bad(0x2fb)][_0x93bad(0x2cb)](),this['_baselines']['clear'](),this[_0x93bad(0x327)][_0x93bad(0x2cb)]();}[_0x3b2539(0x11c)](_0x3c32dd,_0x17c3bf,_0x2767f4,_0x2ab0ea){return _0x3c32dd+'\x00'+_0x17c3bf+'\x00'+_0x2767f4+'\x00'+_0x2ab0ea;}[_0x3b2539(0x2a3)](_0xdf74b4,_0x55faa2,_0x28fac1,_0x273ca3){const _0x1f2080=_0x3b2539,_0x24fb60=this[_0x1f2080(0x11c)](_0xdf74b4,_0x55faa2,_0x28fac1,_0x273ca3);if(this[_0x1f2080(0x327)][_0x1f2080(0x2e7)](_0x24fb60))return![];this[_0x1f2080(0x327)][_0x1f2080(0x2ea)](_0x24fb60);if(this['_seen'][_0x1f2080(0x209)]>this[_0x1f2080(0x28a)]){const _0x990c94=this[_0x1f2080(0x327)][_0x1f2080(0x32d)]()[_0x1f2080(0x2f2)]()[_0x1f2080(0x125)];this[_0x1f2080(0x327)][_0x1f2080(0x116)](_0x990c94);}return!![];}['_handleInProcess'](_0x500d9d){const _0x28d1f7=_0x3b2539;if(!this[_0x28d1f7(0x2a1)]||!_0x500d9d)return;const {env:_0x27ed16,type:_0x42de09,key:_0x4eb907,clock:_0x46fff9,origin:_0x4d9180,action:_0x3b0eff,newValue:_0x452049,oldValue:_0x36f310}=_0x500d9d;if(_0x27ed16==null||_0x42de09==null||_0x4eb907==null)return;if(typeof _0x27ed16===_0x28d1f7(0x12c)&&_0x27ed16['startsWith']('~'))return;if(typeof _0x42de09===_0x28d1f7(0x12c)&&_0x42de09[_0x28d1f7(0x210)]('~'))return;if(!this[_0x28d1f7(0x2a3)](_0x27ed16,_0x42de09,_0x4eb907,_0x46fff9))return;const _0x13b9ff=_0x3b0eff===_0x4e8f4f[_0x28d1f7(0x325)]?'remove':_0x28d1f7(0x1e7);this[_0x28d1f7(0x30a)](_0x28d1f7(0x2b3),{'env':_0x27ed16,'type':_0x42de09,'key':_0x4eb907,'op':_0x13b9ff,'clock':_0x46fff9,'origin':_0x4d9180,'value':_0x13b9ff==='remove'?null:_0x452049,'prevValue':_0x36f310});}['_handlePoke'](_0x376349){const _0x580122=_0x3b2539;if(!this[_0x580122(0x2a1)])return;if(!_0x376349||typeof _0x376349[_0x580122(0x1a2)]!=='string'||typeof _0x376349[_0x580122(0x2d1)]!=='string')return;const {env:_0x199c28,type:_0x17a271}=_0x376349;if(_0x199c28[_0x580122(0x210)]('~')||_0x17a271['startsWith']('~'))return;this['_pending'][_0x580122(0x248)](_0x199c28+'\x00'+_0x17a271,{'env':_0x199c28,'type':_0x17a271}),this[_0x580122(0x22c)]();}[_0x3b2539(0x22c)](){const _0x4236b6=_0x3b2539;if(this['_flushTimer'])return;const _0x2a9f5f=()=>{const _0x27f7f4=_0x39df;this[_0x27f7f4(0x1cd)]=null,this[_0x27f7f4(0x1b1)]()[_0x27f7f4(0x11f)](()=>{});};this[_0x4236b6(0x1cd)]=setTimeout(_0x2a9f5f,this[_0x4236b6(0x230)]>0x0?this[_0x4236b6(0x230)]:0x0);}async[_0x3b2539(0x1b1)](){const _0x5cf096=_0x3b2539;if(this['_draining']){this[_0x5cf096(0x22c)]();return;}this[_0x5cf096(0x1af)]=!![];try{const _0x149c67=[...this[_0x5cf096(0x237)][_0x5cf096(0x32d)]()];this[_0x5cf096(0x237)][_0x5cf096(0x2cb)]();let _0x17f22b=![];for(const {env:_0x41adc4,type:_0xf0a155}of _0x149c67){try{const _0x3aec2c=await this[_0x5cf096(0x1f1)](_0x41adc4,_0xf0a155);if(_0x3aec2c)_0x17f22b=!![];}catch{this['_pending']['set'](_0x41adc4+'\x00'+_0xf0a155,{'env':_0x41adc4,'type':_0xf0a155}),_0x17f22b=!![];}}if(_0x17f22b||this[_0x5cf096(0x237)]['size']>0x0)this['_scheduleFlush']();}finally{this[_0x5cf096(0x1af)]=![];}}async[_0x3b2539(0x1f1)](_0x5a2ef8,_0xd28ea7){const _0x171027=_0x3b2539,_0x3040dc=await this[_0x171027(0x2fd)][_0x171027(0x2ad)](_0x5a2ef8),_0x290fb2=_0x5a2ef8+'\x00'+_0xd28ea7;!this['_cursors']['has'](_0x290fb2)&&(!this[_0x171027(0x244)]['has'](_0x5a2ef8)&&(_0x3040dc['_enableChangelog'](),this['_baselines']['set'](_0x5a2ef8,_0x3040dc['getClock']()||0x0)),this[_0x171027(0x2fb)][_0x171027(0x248)](_0x290fb2,this[_0x171027(0x244)][_0x171027(0x13d)](_0x5a2ef8)));const _0x303f97=this['_cursors'][_0x171027(0x13d)](_0x290fb2),_0x3aa169=_0x3040dc['getClock'](_0xd28ea7)||0x0;if(_0x3aa169<=_0x303f97)return![];const _0x334f20=_0x303f97+this[_0x171027(0x185)],_0x7eba74=Math[_0x171027(0x2ab)](_0x3aa169,_0x334f20),_0x40b951=_0x8a4e2c[_0x171027(0x26a)]?_0x8a4e2c[_0x171027(0x330)]():0x0,_0x53d4e3=Array[_0x171027(0x178)](_0x3040dc['getChanges'](_0xd28ea7,_0x303f97+0x1,_0x7eba74));let _0x4c4fa3=_0x303f97;for(const _0x40c737 of _0x53d4e3){const {clock:_0x529cff,key:_0xb2314,action:_0x41b3f5,origin:_0x21cdc5}=_0x40c737;if(_0x529cff>_0x4c4fa3)_0x4c4fa3=_0x529cff;if(_0xb2314==null)continue;if(!this[_0x171027(0x2a3)](_0x5a2ef8,_0xd28ea7,_0xb2314,_0x529cff))continue;let _0x403b8f,_0x321479;if(_0x41b3f5===_0x4e8f4f['REMOVE'])_0x403b8f=_0x171027(0x293),_0x321479=null;else{const _0x500f0d=_0x3040dc[_0x171027(0x13d)](_0xd28ea7,_0xb2314);_0x500f0d==null?(_0x403b8f=_0x171027(0x293),_0x321479=null):(_0x403b8f=_0x171027(0x1e7),_0x321479=_0x500f0d);}this[_0x171027(0x30a)](_0x171027(0x2b3),{'env':_0x5a2ef8,'type':_0xd28ea7,'key':_0xb2314,'op':_0x403b8f,'clock':_0x529cff,'origin':_0x21cdc5,'value':_0x321479});}if(_0x8a4e2c[_0x171027(0x26a)])_0x8a4e2c[_0x171027(0x19f)]('feed:'+_0x5a2ef8+':'+_0xd28ea7,_0x8a4e2c['now']()-_0x40b951,'n='+_0x53d4e3[_0x171027(0x1e5)]);return this['_cursors'][_0x171027(0x248)](_0x290fb2,Math['max'](_0x4c4fa3,_0x7eba74)),_0x3040dc[_0x171027(0x2dd)](_0xd28ea7)>_0x7eba74;}[_0x3b2539(0x2ba)](){const _0x27d862=_0x3b2539;return{'started':this['_started'],'quantum':this[_0x27d862(0x185)],'flushDebounce':this[_0x27d862(0x230)],'cursors':Object[_0x27d862(0x217)]([...this[_0x27d862(0x2fb)][_0x27d862(0x27d)]()][_0x27d862(0x2c0)](([_0x11b984,_0xcff37a])=>[_0x11b984[_0x27d862(0x148)]('\x00',':'),_0xcff37a])),'pending':this[_0x27d862(0x237)][_0x27d862(0x209)],'seen':this['_seen'][_0x27d862(0x209)]};}}return _0x4c16ed[_0x3b2539(0x309)]=_0x4f2b5a,okdbChangefeed={'OKDBChangefeed':_0x4c16ed},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x6c9dc6=_0x1d447a;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x5b6833=require$$1$1,_0x29bb48=require$$1,{EVENTS:_0x4b8e80}=requireOkdbEnums(),_0x5e068b=require$$0$3,{slotKey:_0x231f58}=requireOkdbProcessRegistry(),_0xca6b4e=0xfa,_0x21a8e0=0xfa0,_0x2fbd4b=0x5,_0x152d68=0x2710,_0x585704=0xbb8,_0xaef4e2=0x7d0,_0x62cb9d=_0x6c9dc6(0x181),_0x3af544='ephemeral',_0xd529bb=_0x6c9dc6(0x2bc),_0x451c3f=_0x6c9dc6(0x1eb),_0x3bfbd8=[_0x4b8e80[_0x6c9dc6(0x167)],_0x4b8e80[_0x6c9dc6(0x14a)],_0x4b8e80[_0x6c9dc6(0x188)],_0x4b8e80[_0x6c9dc6(0x247)],_0x4b8e80['INDEX_PROGRESS'],_0x4b8e80[_0x6c9dc6(0x2a0)],_0x4b8e80[_0x6c9dc6(0x168)],_0x4b8e80['INDEX_REGISTERED'],_0x6c9dc6(0x278),_0x6c9dc6(0x127),_0x6c9dc6(0x331),_0x6c9dc6(0x2e5),_0x6c9dc6(0x1f2),_0x6c9dc6(0x214)],_0x3a212a=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x5d2589({workers:_0x1deb5d,makeOkdb:_0x145681,port:_0x50e67a,primaryOkdb:_0x146943,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x475801=_0x6c9dc6;if(_0x5b6833[_0x475801(0x1aa)])return childEntry&&_0x5b6833[_0x475801(0x302)]({'exec':_0x29bb48[_0x475801(0x175)](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0x415615=_0x475801,_0x31f690=[];for(let _0x4cb02e=0x0;_0x4cb02e<process['execArgv']['length'];_0x4cb02e++){const _0xeba8fc=process['execArgv'][_0x4cb02e];if(_0xeba8fc[_0x415615(0x210)](_0x415615(0x2d9))||_0xeba8fc['startsWith'](_0x415615(0x20b))||_0xeba8fc[_0x415615(0x210)](_0x415615(0x1b2)))continue;if(_0xeba8fc==='-e'||_0xeba8fc==='--eval'||_0xeba8fc==='-p'||_0xeba8fc===_0x415615(0x27f)){_0x4cb02e++;continue;}_0x31f690[_0x415615(0x1b6)](_0xeba8fc);}return _0x31f690;})())}),_0x1a1e74({'workers':_0x1deb5d,'port':_0x50e67a,'primaryOkdb':_0x146943,'workerEnv':workerEnv});return _0x99a860({'makeOkdb':_0x145681,'port':_0x50e67a});}function _0x1a1e74({workers:_0x49cf06,port:_0x44bd80,primaryOkdb:_0x11dd37,workerEnv:_0x56d730}){const _0x3d2f83=_0x6c9dc6,_0xc6afc4=new Map(),_0x25c4b4=new Map();let _0x45c136=![];const _0x127299=_0x362480=>_0x362480?.[_0x3d2f83(0x1c5)],_0x128195=_0x371e7d=>{const _0x3cd8e9=_0x3d2f83,_0x3663d6=_0x5b6833['fork']({...process.env,..._0x56d730||{},'OKDB_CLUSTER_SLOT':String(_0x371e7d)});return _0x3663d6[_0x3cd8e9(0x1c5)]=_0x371e7d,_0xc6afc4[_0x3cd8e9(0x248)](_0x3663d6[_0x3cd8e9(0x14c)][_0x3cd8e9(0x2c5)],{'worker':_0x3663d6,'startedAt':Date['now'](),'slot':_0x371e7d}),_0x3663d6['on']('error',_0x333e13=>{const _0x2887ac=_0x3cd8e9;console['log'](_0x2887ac(0x323)+_0x3663d6[_0x2887ac(0x14c)][_0x2887ac(0x2c5)]+'\x20ipc\x20error:\x20'+(_0x333e13?.[_0x2887ac(0x12b)]??_0x333e13));}),_0x3663d6['on']('online',()=>_0xa85046()),_0x3663d6;},_0x3663eb=_0x176a94=>{const _0x3778da=_0x3d2f83;for(const {worker:_0x2dcb87}of _0xc6afc4['values']()){if(_0x2dcb87[_0x3778da(0x121)]()||!_0x2dcb87[_0x3778da(0x306)]())continue;try{_0x2dcb87[_0x3778da(0x266)](_0x176a94);}catch{}}};_0x11dd37?.[_0x3d2f83(0x11b)]?.({'kind':_0x3d2f83(0x2a5),'listenAddr':':'+_0x44bd80})[_0x3d2f83(0x11f)](()=>{}),_0x11dd37?.[_0x3d2f83(0x23f)]?.[_0x3d2f83(0x286)]?.({'workersConfigured':_0x49cf06});const _0x31be1a={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0xa85046=()=>{const _0x4e89d8=_0x3d2f83,_0x5aae68=_0x11dd37?.['processes'];if(!_0x5aae68||!_0x5aae68[_0x4e89d8(0x249)])return;const _0x486504=_0x5aae68[_0x4e89d8(0x1fd)];for(const {worker:_0x44d425,startedAt:_0x5d19a2,slot:_0x1faf37,stats:_0x3c8a33,processing:_0x14816b}of _0xc6afc4[_0x4e89d8(0x32d)]()){if(_0x44d425['isDead']())continue;const _0xd43ed1=_0x5aae68[_0x4e89d8(0x2e6)]?.()&&_0x5aae68['getDesired']('slot',_0x55daeb(_0x1faf37))?.['decommission']===!![];_0x5aae68[_0x4e89d8(0x119)]({'pid':_0x44d425['process'][_0x4e89d8(0x2c5)],'startedAt':_0x5d19a2,'kind':'http-server','supervisorKey':_0x486504,'slot':_0x1faf37,'slotKey':_0x55daeb(_0x1faf37),'role':_0x31be1a,'listenAddr':':'+_0x44bd80,'lifecycle':_0xd43ed1?_0x4e89d8(0x28f):_0x4e89d8(0x311),'processing':_0x14816b??null,'stats':_0x3c8a33??null})[_0x4e89d8(0x11f)](()=>{});}},_0x55daeb=_0x3f216d=>_0x231f58(_0x3d2f83(0x32a)+_0x44bd80,_0x3f216d),_0x4b602e=_0x42c1c6=>{const _0x5823ff=_0x3d2f83,_0x574845=_0x11dd37?.[_0x5823ff(0x23f)];if(!_0x574845?.[_0x5823ff(0x2e6)]?.())return![];return _0x574845[_0x5823ff(0x142)]('slot',_0x55daeb(_0x42c1c6))?.[_0x5823ff(0x2c4)]===!![];};for(let _0x4f3e59=0x0;_0x4f3e59<_0x49cf06;_0x4f3e59++){const _0x3d1659=_0x4b602e(_0x4f3e59);_0x25c4b4[_0x3d2f83(0x248)](_0x4f3e59,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x3d1659,'respawnTimer':null}),_0x3d1659?console['log'](_0x3d2f83(0x15a)+_0x4f3e59+_0x3d2f83(0x223)):_0x128195(_0x4f3e59);}const _0x24deac=()=>{const _0x15938=_0x3d2f83,_0xe31f9c=_0x11dd37?.[_0x15938(0x23f)];if(!_0xe31f9c?.['_isWriter']||!_0xe31f9c[_0x15938(0x2e6)]?.())return;for(const [_0xa0b5e7,_0x188882]of _0x25c4b4['entries']()){const _0x216264=_0xe31f9c['getDesired'](_0x15938(0x2b8),_0x55daeb(_0xa0b5e7)),_0xd8c9c3=_0x216264?.[_0x15938(0x2c4)]===!![],_0x40ac68=_0x216264?.[_0x15938(0x2f1)]===!![];if(_0xd8c9c3&&!_0x188882[_0x15938(0x32b)]){_0x188882[_0x15938(0x32b)]=!![];_0x188882[_0x15938(0x169)]&&(clearTimeout(_0x188882[_0x15938(0x169)]),_0x188882[_0x15938(0x169)]=null);for(const {worker:_0x4add7a}of _0xc6afc4[_0x15938(0x32d)]()){if(_0x127299(_0x4add7a)!==_0xa0b5e7||_0x4add7a[_0x15938(0x121)]())continue;try{if(_0x40ac68)_0x4add7a[_0x15938(0x14c)][_0x15938(0x2f1)]('SIGKILL');else _0x4add7a[_0x15938(0x306)]()&&_0x4add7a[_0x15938(0x115)]();}catch{}}console[_0x15938(0x2bc)](_0x15938(0x1e9)+(_0x40ac68?'hard-killed':'decommissioned')+_0x15938(0x2f3)+_0xa0b5e7+_0x15938(0x117));}else{if(!_0xd8c9c3&&_0x188882[_0x15938(0x32b)]&&_0x216264){_0x188882[_0x15938(0x32b)]=![],_0x188882[_0x15938(0x15c)]=[],_0x188882['consecutiveFailures']=0x0;const _0x499bf4=[..._0xc6afc4['values']()][_0x15938(0x18c)](({worker:_0x4fd096})=>_0x127299(_0x4fd096)===_0xa0b5e7&&!_0x4fd096[_0x15938(0x121)]());!_0x499bf4&&!_0x45c136&&(_0x128195(_0xa0b5e7),console['log']('[okdb-cluster]\x20recommissioned\x20worker\x20slot='+_0xa0b5e7));}}}},_0x2d57f4=()=>{try{_0x24deac();}catch{}};_0x11dd37?.[_0x3d2f83(0x252)]?.['on']?.(_0x4b8e80[_0x3d2f83(0x2a6)],_0x2d57f4);const _0x4de500=[];if(_0x11dd37?.[_0x3d2f83(0x252)]?.['on'])for(const _0x3701d9 of _0x3bfbd8){const _0x474dca=_0x3908eb=>{_0x3663eb({[_0x62cb9d]:_0x3af544,'event':_0x3701d9,'data':_0x3908eb??{}});};_0x11dd37[_0x3d2f83(0x252)]['on'](_0x3701d9,_0x474dca),_0x4de500[_0x3d2f83(0x1b6)]({'event':_0x3701d9,'handler':_0x474dca});}const _0x442611=setInterval(()=>{_0x24deac(),_0xa85046();},_0x3a212a);_0x442611['unref']?.();const _0x1f92e9=(_0x97d388,_0x85bb52)=>{const _0x1b696d=_0x3d2f83;if(!_0x85bb52||typeof _0x85bb52!==_0x1b696d(0x2af)||_0x85bb52[_0x62cb9d]!==_0xd529bb)return;if(!_0x11dd37?.['log']?.[_0x1b696d(0x2d8)])return;const _0x308770=_0x85bb52[_0x1b696d(0x273)]||{};_0x11dd37['log']['ingest']({..._0x308770,'msg':'[w'+_0x85bb52['slot']+']\x20'+(_0x308770['msg']??''),'meta':{..._0x308770[_0x1b696d(0x27c)]||{},'worker':_0x85bb52[_0x1b696d(0x2b8)],'workerPid':_0x85bb52[_0x1b696d(0x2c5)]}});};_0x5b6833['on'](_0x3d2f83(0x12b),_0x1f92e9);const _0x2da8b6=(_0x20b203,_0x506885)=>{const _0x383c24=_0x3d2f83;if(!_0x506885||typeof _0x506885!==_0x383c24(0x2af)||_0x506885[_0x62cb9d]!==_0x451c3f)return;const _0x58798f=_0xc6afc4[_0x383c24(0x13d)](_0x20b203[_0x383c24(0x14c)][_0x383c24(0x2c5)]);if(_0x58798f){_0x58798f[_0x383c24(0x1eb)]={..._0x506885[_0x383c24(0x1eb)],'at':Date[_0x383c24(0x330)]()};if(_0x506885['processing']!==undefined)_0x58798f[_0x383c24(0x1fa)]=_0x506885[_0x383c24(0x1fa)];}};_0x5b6833['on'](_0x3d2f83(0x12b),_0x2da8b6),_0x5b6833['on'](_0x3d2f83(0x321),(_0x58c4c8,_0x238d79,_0x35e83d)=>{const _0x362e88=_0x3d2f83,_0x179d65=_0x58c4c8[_0x362e88(0x14c)][_0x362e88(0x2c5)],_0x122c0f=_0x127299(_0x58c4c8),_0x2c7ac6=_0xc6afc4['get'](_0x179d65);if(_0x2c7ac6&&_0x11dd37?.[_0x362e88(0x23f)])_0x11dd37['processes'][_0x362e88(0x158)](_0x179d65+':'+_0x2c7ac6[_0x362e88(0x297)])[_0x362e88(0x11f)](()=>{});_0xc6afc4[_0x362e88(0x116)](_0x179d65),console['log'](_0x362e88(0x323)+_0x179d65+_0x362e88(0x287)+(_0x122c0f??'?')+_0x362e88(0x1a8)+(_0x362e88(0x2cf)+_0x238d79+_0x362e88(0x265)+(_0x35e83d??_0x362e88(0x1a6))+_0x362e88(0x12e)+_0xc6afc4['size']+_0x362e88(0x332))),_0xa85046();if(_0x45c136||_0x122c0f==null)return;const _0x5ba4f3=_0x25c4b4[_0x362e88(0x13d)](_0x122c0f);if(!_0x5ba4f3||_0x5ba4f3[_0x362e88(0x32b)])return;const _0x31b6da=Date[_0x362e88(0x330)]();_0x5ba4f3[_0x362e88(0x15c)][_0x362e88(0x1b6)](_0x31b6da),_0x5ba4f3[_0x362e88(0x15c)]=_0x5ba4f3['deaths']['filter'](_0x30e421=>_0x31b6da-_0x30e421<=_0x152d68);if(_0x5ba4f3[_0x362e88(0x15c)]['length']>=_0x2fbd4b){_0x5ba4f3['dead']=!![],console['error'](_0x362e88(0x160)+_0x122c0f+'\x20died\x20'+_0x5ba4f3[_0x362e88(0x15c)]['length']+'\x20times\x20in\x20'+(_0x152d68+_0x362e88(0x2e2)+_0xc6afc4[_0x362e88(0x209)]+'\x20worker(s)\x20still\x20serving'));return;}_0x5ba4f3[_0x362e88(0x2d7)]++;const _0x581306=Math[_0x362e88(0x2ab)](_0x21a8e0,_0xca6b4e*0x2**(_0x5ba4f3[_0x362e88(0x2d7)]-0x1));console[_0x362e88(0x2bc)](_0x362e88(0x21d)+_0x122c0f+_0x362e88(0x208)+_0x581306+_0x362e88(0x328)+_0x5ba4f3[_0x362e88(0x2d7)]+')'),_0x5ba4f3['respawnTimer']=setTimeout(()=>{const _0x4a4081=_0x362e88;_0x5ba4f3[_0x4a4081(0x169)]=null;if(_0x45c136||_0x5ba4f3['dead'])return;const _0x21e5e0=_0x128195(_0x122c0f);_0x21e5e0[_0x4a4081(0x1b5)]('listening',()=>{const _0x16f4cd=_0x4a4081;if(_0x25c4b4[_0x16f4cd(0x13d)](_0x122c0f)===_0x5ba4f3)_0x5ba4f3[_0x16f4cd(0x2d7)]=0x0;});},_0x581306),_0x5ba4f3[_0x362e88(0x169)][_0x362e88(0x1f8)]?.();});const _0x59d7fe=[..._0xc6afc4[_0x3d2f83(0x16a)]()];console['log']('[okdb-cluster]\x20primary\x20pid='+process[_0x3d2f83(0x2c5)]+_0x3d2f83(0x17a)+_0x49cf06+_0x3d2f83(0x284)+_0x44bd80+':\x20'+('['+_0x59d7fe['join'](',\x20')+']'));const _0x304917={'_isClusterController':!![],'port':_0x44bd80,'primaryOkdb':_0x11dd37??null,'status'(){const _0x3afa59=_0x3d2f83;return{'clustered':!![],'primaryPid':process['pid'],'port':_0x44bd80,'primaryRole':_0x11dd37?.['role']??null,'processorPid':null,'supervisorPid':process[_0x3afa59(0x2c5)],'workers':[..._0xc6afc4[_0x3afa59(0x32d)]()][_0x3afa59(0x2c0)](({worker:_0x3f0be9})=>({'pid':_0x3f0be9[_0x3afa59(0x14c)][_0x3afa59(0x2c5)],'id':_0x3f0be9['id'],'dead':_0x3f0be9[_0x3afa59(0x121)]()}))};},async 'close'(){const _0x26c091=_0x3d2f83;_0x45c136=!![];for(const _0x24f1bf of _0x25c4b4[_0x26c091(0x32d)]()){_0x24f1bf['dead']=!![],_0x24f1bf['respawnTimer']&&(clearTimeout(_0x24f1bf[_0x26c091(0x169)]),_0x24f1bf['respawnTimer']=null);}clearInterval(_0x442611),_0x5b6833[_0x26c091(0x151)](_0x26c091(0x12b),_0x1f92e9),_0x5b6833[_0x26c091(0x151)](_0x26c091(0x12b),_0x2da8b6),_0x11dd37?.[_0x26c091(0x252)]?.['off']?.(_0x4b8e80['SYSTEM_PROC'],_0x2d57f4);if(_0x11dd37?.[_0x26c091(0x252)]?.[_0x26c091(0x151)])for(const {event:_0x5c8649,handler:_0x249e4e}of _0x4de500){try{_0x11dd37[_0x26c091(0x252)][_0x26c091(0x151)](_0x5c8649,_0x249e4e);}catch{}}_0x4de500[_0x26c091(0x1e5)]=0x0;const _0x3c4528=[..._0xc6afc4[_0x26c091(0x32d)]()][_0x26c091(0x2c0)](({worker:_0x38742f})=>_0x38742f);if(_0x3c4528[_0x26c091(0x1e5)]===0x0)return;await Promise[_0x26c091(0x145)](_0x3c4528[_0x26c091(0x2c0)](_0x13f0ca=>new Promise(_0x5f3b98=>{const _0x5e03dd=_0x26c091;if(_0x13f0ca[_0x5e03dd(0x121)]()){_0x5f3b98();return;}let _0x5610b8=![];const _0x4b6cf6=()=>{if(_0x5610b8)return;_0x5610b8=!![];if(_0x1d9715)clearTimeout(_0x1d9715);_0x5f3b98();};_0x13f0ca[_0x5e03dd(0x1b5)](_0x5e03dd(0x321),_0x4b6cf6);const _0x1d9715=setTimeout(()=>{const _0x2c6a63=_0x5e03dd;try{_0x13f0ca[_0x2c6a63(0x14c)][_0x2c6a63(0x2f1)]();}catch{}},_0x585704+0x1f4);_0x1d9715[_0x5e03dd(0x1f8)]?.();try{_0x13f0ca['disconnect']();}catch{try{_0x13f0ca['process'][_0x5e03dd(0x2f1)]();}catch{}}})));}};return _0x304917;}async function _0x99a860({makeOkdb:_0x6550ae,port:_0x1b0105}){const _0x15a9bc=_0x6c9dc6,_0x57fc02=await _0x6550ae();return _0x50f589(_0x57fc02),_0x57fc02[_0x15a9bc(0x186)]['listen'](_0x1b0105);}function _0x50f589(_0x1ee062){const _0x4c12cd=_0x6c9dc6;if(!_0x1ee062||_0x1ee062[_0x4c12cd(0x1f5)])return;_0x1ee062[_0x4c12cd(0x1f5)]=!![];try{const {OKDBChangefeed:_0x58b203}=requireOkdbChangefeed(),_0x1b2141=_0x1ee062[_0x4c12cd(0x296)];if(_0x1b2141&&typeof _0x1b2141['attachFeed']===_0x4c12cd(0x211)){const _0x443c73=new _0x58b203(_0x1ee062);_0x443c73[_0x4c12cd(0x1c7)](),_0x1b2141[_0x4c12cd(0x14b)](_0x443c73),_0x1ee062[_0x4c12cd(0x1bf)]=_0x443c73;}}catch(_0x3cb767){_0x1ee062[_0x4c12cd(0x2bc)]?.[_0x4c12cd(0x2c8)]?.('[okdb-cluster]\x20change-feed\x20init\x20failed:\x20'+(_0x3cb767?.[_0x4c12cd(0x12b)]??_0x3cb767),{'feature':_0x4c12cd(0x2eb)});}const _0x46e003=_0x2b7bdb=>{const _0x3d333a=_0x4c12cd;if(!_0x2b7bdb||typeof _0x2b7bdb!==_0x3d333a(0x2af)||_0x2b7bdb[_0x62cb9d]==null)return;if(_0x2b7bdb[_0x62cb9d]===_0x3af544)try{_0x1ee062['_adminRelay']?.[_0x3d333a(0x24c)]?.(_0x2b7bdb[_0x3d333a(0x226)],_0x2b7bdb[_0x3d333a(0x1b4)]);}catch{}};process['on']('message',_0x46e003),_0x1ee062['_clusterOnMessage']=_0x46e003;{let _0x34f9eb=process[_0x4c12cd(0x1d5)](),_0x5b0ab6=Date[_0x4c12cd(0x330)]();const _0xa494fd=()=>{const _0x148c87=_0x4c12cd;if(typeof process[_0x148c87(0x266)]!==_0x148c87(0x211)||!process[_0x148c87(0x2d3)])return;const _0x58fc17=Date[_0x148c87(0x330)](),_0x42e0df=process[_0x148c87(0x1d5)](),_0x1ef192=(_0x58fc17-_0x5b0ab6)*0x3e8,_0x17105f=_0x42e0df[_0x148c87(0x23d)]-_0x34f9eb[_0x148c87(0x23d)]+(_0x42e0df[_0x148c87(0x283)]-_0x34f9eb[_0x148c87(0x283)]),_0x5750dc=_0x1ef192>0x0?Math[_0x148c87(0x2ab)](0x64,Math[_0x148c87(0x18e)](_0x17105f/(_0x1ef192*(_0x5e068b[_0x148c87(0x282)]()[_0x148c87(0x1e5)]||0x1))*0x64)):0x0;_0x34f9eb=_0x42e0df,_0x5b0ab6=_0x58fc17;const _0x347bd3=process[_0x148c87(0x118)]();let _0x29ca5e=null;try{_0x29ca5e=_0x1ee062[_0x148c87(0x25e)]?.[_0x148c87(0x1a0)]?_0x1ee062[_0x148c87(0x23f)]?.[_0x148c87(0x303)]?.()??null:null;}catch{}try{process[_0x148c87(0x266)]({[_0x62cb9d]:_0x451c3f,'stats':{'rss':_0x347bd3[_0x148c87(0x1be)],'heapUsed':_0x347bd3['heapUsed'],'heapTotal':_0x347bd3[_0x148c87(0x2ec)],'external':_0x347bd3['external'],'cpuPct':_0x5750dc,'cpuWindowMs':Math[_0x148c87(0x18e)](_0x1ef192/0x3e8)||null},'processing':_0x29ca5e});}catch{}},_0x2cec7f=Math[_0x4c12cd(0x308)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x41b51e=setInterval(_0xa494fd,_0x2cec7f);_0x41b51e['unref']?.(),_0xa494fd();for(const _0x614009 of['processor:paused',_0x4c12cd(0x1f2)]){_0x1ee062[_0x4c12cd(0x252)]?.['on']?.(_0x614009,()=>{try{_0xa494fd();}catch{}});}}let _0x2ce45b=![];const _0x383f7a=async _0x170d93=>{const _0x11d92e=_0x4c12cd;if(_0x2ce45b)return;_0x2ce45b=!![];const _0x29fd19=setTimeout(()=>process[_0x11d92e(0x321)](_0x170d93),_0x585704);_0x29fd19[_0x11d92e(0x1f8)]?.();try{await _0x1ee062[_0x11d92e(0x1ff)]?.();}catch{}process[_0x11d92e(0x321)](_0x170d93);};process['on']('disconnect',()=>_0x383f7a(0x0));if(process['platform']!==_0x4c12cd(0x1b3)){const _0xe01673=setInterval(()=>{const _0x4b47db=_0x4c12cd;if(process[_0x4b47db(0x2c1)]===0x1)_0x383f7a(0x0);},_0xaef4e2);_0xe01673[_0x4c12cd(0x1f8)]?.(),_0x1ee062[_0x4c12cd(0x2f8)]=_0xe01673;}}return okdbCluster={'runClustered':_0x5d2589,'attachWorkerCluster':_0x50f589},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0x4081f3=_0x1d447a;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x278402=require$$0$5,{attachWorkerCluster:_0x29f193}=requireOkdbCluster();async function _0x29ef25(){const _0x238f8f=_0x39df,_0x3dc09e=process.env.OKDB_HTTP_CHILD;if(!_0x3dc09e)throw new Error(_0x238f8f(0x1ed));const {rootPath:_0x52d1bd,port:_0x5a5e2a,options:options={},logLevel:logLevel='info'}=JSON[_0x238f8f(0x166)](_0x3dc09e);if(!_0x52d1bd||!_0x5a5e2a)throw new Error(_0x238f8f(0x2a7));const _0x21db62=new _0x278402(_0x52d1bd,{...options,'engines':![],'processors':![],'compaction':![]});_0x21db62[_0x238f8f(0x2bc)]['detachConsole']?.();const _0x53fc0d=process.env.OKDB_CLUSTER_SLOT??'?',_0x5b01a6={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x5d11b0=_0x5b01a6[logLevel]??_0x5b01a6[_0x238f8f(0x1ec)];_0x21db62[_0x238f8f(0x2bc)]['attach'](_0x58fbaf=>{const _0x6df01e=_0x238f8f;if((_0x5b01a6[_0x58fbaf[_0x6df01e(0x2ef)]]??0x1)<_0x5d11b0)return;try{process['send']?.({'__okdbCluster':_0x6df01e(0x2bc),'slot':_0x53fc0d,'pid':process[_0x6df01e(0x2c5)],'entry':_0x58fbaf});}catch{}}),await _0x21db62[_0x238f8f(0x139)](),_0x29f193(_0x21db62),await _0x21db62[_0x238f8f(0x186)][_0x238f8f(0x2b4)](_0x5a5e2a);}return _0x29ef25()[_0x4081f3(0x11f)](_0x59fb1d=>{const _0x3d9ccf=_0x4081f3;try{process[_0x3d9ccf(0x266)]?.({'__okdbCluster':_0x3d9ccf(0x2bc),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x3d9ccf(0x2c5)],'entry':{'level':_0x3d9ccf(0x268),'msg':_0x3d9ccf(0x1db)+(_0x59fb1d?.['message']??_0x59fb1d)}});}catch{}process['exit'](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module[_0x1d447a(0x12f)]=okdbHttpWorkerChild;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x411ba7=_0x41c2;(function(_0xe366b1,_0x1f87bc){const _0x57ef64=_0x41c2,_0x3e4c79=_0xe366b1();while(!![]){try{const _0x406f5b=-parseInt(_0x57ef64(0x1ce))/0x1*(-parseInt(_0x57ef64(0x1cd))/0x2)+-parseInt(_0x57ef64(0x1d6))/0x3+parseInt(_0x57ef64(0x1e8))/0x4*(-parseInt(_0x57ef64(0x1b1))/0x5)+parseInt(_0x57ef64(0x1de))/0x6+parseInt(_0x57ef64(0x1a1))/0x7+-parseInt(_0x57ef64(0x1e0))/0x8+parseInt(_0x57ef64(0x1cb))/0x9;if(_0x406f5b===_0x1f87bc)break;else _0x3e4c79['push'](_0x3e4c79['shift']());}catch(_0x411a45){_0x3e4c79['push'](_0x3e4c79['shift']());}}}(_0x4939,0xb9e18));function _0x4939(){const _0x51f83d=['resetIndex','remove','setTtl','type:registered','ref:violation_resolved','dropping','_activateViewStorage','dropIndex','catch','VIEW_PROGRESS','3725715JpWwoh','ttl:expired','txn:end','./okdb','error','worker_threads','ttl:set','fts:registered','resetFts','system:clock_change','created','creating','__esModule','exit','sync:apply','dropSchema','license:removed','fts:drop','view:progress','_prepareViewDict','unique:violation_resolved','system:poke','index:progress','system:stopped','default','progress','1199160lNLhXH','freeze','2104MNvHWi','1211GDfDNG','registerIndex','stopping','index:drop','events','waiting','resetting','ttl:clear','2280171cQlwbE','txn:rollback','halted','call','prototype','item:create','index:registered','_runBootstrapScanPhases','8697642JofEIM','exports','8556352XSPXlT','license:invalid','registerFts','dropType','index:reset','open','setSchema','ref:violation','4oQwtCV','unique:violation','started','stopped','system:type_drop','bus:drain','bus:env_release','registerType','bus:type_drop','3355051VEOZuS','txn:start','system:drain','system:proc','postMessage','stack'];_0x4939=function(){return _0x51f83d;};return _0x4939();}var require$$0=require(_0x411ba7(0x1b6)),require$$1=require(_0x411ba7(0x1b4));function _0x41c2(_0x25a698,_0x1ad571){_0x25a698=_0x25a698-0x19b;const _0x493935=_0x4939();let _0x41c2a2=_0x493935[_0x25a698];return _0x41c2a2;}function getDefaultExportFromCjs(_0x4170cc){const _0x5c1e3e=_0x411ba7;return _0x4170cc&&_0x4170cc[_0x5c1e3e(0x1bd)]&&Object[_0x5c1e3e(0x1da)]['hasOwnProperty'][_0x5c1e3e(0x1d9)](_0x4170cc,_0x5c1e3e(0x1c9))?_0x4170cc[_0x5c1e3e(0x1c9)]:_0x4170cc;}var okdbViewsBootstrapWorker$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x5de173=_0x411ba7;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x372b0c={'PUT':'put','REMOVE':_0x5de173(0x1a8),'INDEX_DROP':_0x5de173(0x1ae),'INDEX_REGISTER':_0x5de173(0x1cf),'INDEX_RESET':_0x5de173(0x1a7),'TYPE_REGISTER':_0x5de173(0x19f),'TYPE_DROP':_0x5de173(0x1e3),'FTS_REGISTER':_0x5de173(0x1e2),'FTS_DROP':'dropFts','FTS_RESET':_0x5de173(0x1b9),'SCHEMA_SET':_0x5de173(0x1e6),'SCHEMA_DROP':_0x5de173(0x1c0),'TTL_SET':_0x5de173(0x1a9),'TTL_CLEAR':'clearTtl'},_0x6d7481={'SYSTEM_READY':'system:ready','SYSTEM_STOPPED':_0x5de173(0x1c8),'SYSTEM_CLOCK_CHANGE':_0x5de173(0x1ba),'SYSTEM_POKE':_0x5de173(0x1c6),'SYSTEM_DRAIN':_0x5de173(0x1a3),'SYSTEM_TYPE_DROP':_0x5de173(0x19c),'SYSTEM_PROC':_0x5de173(0x1a4),'SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':_0x5de173(0x1db),'ITEM_UPDATE':'item:update','ITEM_REMOVE':'item:remove','INDEX_RESET':_0x5de173(0x1e4),'INDEX_READY':'index:ready','INDEX_PROGRESS':_0x5de173(0x1c7),'VIEW_PROGRESS':_0x5de173(0x1c3),'INDEX_DROP':_0x5de173(0x1d1),'INDEX_REGISTERED':_0x5de173(0x1dc),'FTS_REGISTERED':_0x5de173(0x1b8),'FTS_DROP':_0x5de173(0x1c2),'FTS_RESET':'fts:reset','SCHEMA_SET':'schema:set','SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':_0x5de173(0x1e9),'UNIQUE_VIOLATION_RESOLVED':_0x5de173(0x1c5),'REF_VIOLATION':_0x5de173(0x1e7),'REF_VIOLATION_RESOLVED':_0x5de173(0x1ab),'SYNC_APPLY':_0x5de173(0x1bf),'TXN_START':_0x5de173(0x1a2),'TXN_END':_0x5de173(0x1b3),'TXN_ROLLBACK':_0x5de173(0x1d7),'TYPE_REGISTERED':_0x5de173(0x1aa),'TYPE_DROP':'type:drop','ENV_OPENED':'env:opened','ENV_REMOVED':'env:removed','SYSTEM_ENV_RELEASE':'system:env_release','TTL_EXPIRED':_0x5de173(0x1b2),'TTL_SET':_0x5de173(0x1b7),'TTL_CLEAR':_0x5de173(0x1d5),'LICENSE_INVALID':_0x5de173(0x1e1),'LICENSE_ADDED':'license:added','LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':_0x5de173(0x1c1)},_0x2b2f63={'CREATING':_0x5de173(0x1bc),'RESETTING':_0x5de173(0x1d4),'READY':'ready','DROPPING':_0x5de173(0x1ac),'WAITING':_0x5de173(0x1d3)},_0x469a15={'CREATED':_0x5de173(0x1bb),'STARTING':'starting','STARTED':_0x5de173(0x1ea),'STOPPING':_0x5de173(0x1d0),'STOPPED':_0x5de173(0x19b)},_0x2afcff={'CREATING':'creating','READY':'ready','HALTED':_0x5de173(0x1d8),'STOPPED':_0x5de173(0x19b),'RESETTING':_0x5de173(0x1d4)},_0x146020=Object[_0x5de173(0x1cc)]({'POKE':'bus:poke','DRAIN':_0x5de173(0x19d),'TYPE_DROP':_0x5de173(0x1a0),'PROC':'bus:proc','ENV_RELEASE':_0x5de173(0x19e)});return okdbEnums={'BUS_EVENTS':_0x146020,'CHANGE_ACTIONS':_0x372b0c,'EVENTS':_0x6d7481,'INDEX_STATE':_0x2b2f63,'OKDB_STATE':_0x469a15,'VIEW_STATE':_0x2afcff},okdbEnums;}var hasRequiredOkdbViewsBootstrapWorker;function requireOkdbViewsBootstrapWorker(){const _0x5c0f6a=_0x411ba7;if(hasRequiredOkdbViewsBootstrapWorker)return okdbViewsBootstrapWorker$1;hasRequiredOkdbViewsBootstrapWorker=0x1;const {parentPort:_0x4f0844,workerData:_0x3b65c0}=require$$0,_0x26a40d=require$$1,{EVENTS:_0x374553}=requireOkdbEnums();async function _0x204b1d(){const _0x569ace=_0x41c2,{rootPath:_0x4555db,envName:_0x511fd1,viewName:_0x3184cc,definition:_0x38d0ec}=_0x3b65c0,_0x39c1b4=new _0x26a40d(_0x4555db,{'admin':![],'mcp':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],'processes':![]});await _0x39c1b4[_0x569ace(0x1e5)]();const _0x254a7c=_0x39c1b4['env'](_0x511fd1);_0x254a7c[_0x569ace(0x1d2)]['on'](_0x374553[_0x569ace(0x1b0)],_0x598ff5=>{const _0x5e2de4=_0x569ace;if(_0x598ff5?.['name']!==_0x3184cc)return;try{_0x4f0844['postMessage']({'type':_0x5e2de4(0x1ca),'event':_0x598ff5});}catch{}}),await _0x254a7c['views'][_0x569ace(0x1c4)](_0x38d0ec),await _0x254a7c['views'][_0x569ace(0x1ad)](_0x3184cc,_0x38d0ec),await _0x254a7c['views'][_0x569ace(0x1dd)](_0x3184cc,_0x38d0ec),_0x4f0844[_0x569ace(0x1a5)]({'type':'done'}),await _0x39c1b4['close'](),process['exit'](0x0);}return _0x204b1d()[_0x5c0f6a(0x1af)](_0xf3bd00=>{const _0x34d8a9=_0x5c0f6a;try{_0x4f0844[_0x34d8a9(0x1a5)]({'type':_0x34d8a9(0x1b5),'error':_0xf3bd00['message']??String(_0xf3bd00),'stack':_0xf3bd00[_0x34d8a9(0x1a6)]});}catch{}process[_0x34d8a9(0x1be)](0x1);}),okdbViewsBootstrapWorker$1;}var okdbViewsBootstrapWorkerExports=requireOkdbViewsBootstrapWorker(),okdbViewsBootstrapWorker=getDefaultExportFromCjs(okdbViewsBootstrapWorkerExports);module[_0x411ba7(0x1df)]=okdbViewsBootstrapWorker;
|