@kedem/okdb 2.6.1 → 2.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/algorithm-worker-thread.js +1 -1
- package/bin/okdb.js +1 -1
- package/docs/queue.md +6 -0
- package/okdb-functions-sandbox-worker.js +1 -1
- package/okdb-http-worker-child.js +1 -1
- package/okdb-views-bootstrap-worker.js +1 -1
- package/okdb.js +1 -1
- package/package.json +1 -1
- package/types/features/queue.d.ts +4 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0xa5e620=_0x70ef;(function(_0x422392,_0x3ecc48){const _0x54e20a=_0x70ef,_0x53d6e4=_0x422392();while(!![]){try{const _0x2deac1=-parseInt(_0x54e20a(0x2a8))/0x1+-parseInt(_0x54e20a(0x13e))/0x2*(parseInt(_0x54e20a(0x13a))/0x3)+parseInt(_0x54e20a(0x236))/0x4*(parseInt(_0x54e20a(0x230))/0x5)+-parseInt(_0x54e20a(0x131))/0x6+-parseInt(_0x54e20a(0xae))/0x7+parseInt(_0x54e20a(0xdc))/0x8*(parseInt(_0x54e20a(0x170))/0x9)+parseInt(_0x54e20a(0x1e2))/0xa;if(_0x2deac1===_0x3ecc48)break;else _0x53d6e4['push'](_0x53d6e4['shift']());}catch(_0x27372b){_0x53d6e4['push'](_0x53d6e4['shift']());}}}(_0x1e20,0xbdce7));var require$$0$5=require(_0xa5e620(0x246)),require$$1$1=require(_0xa5e620(0xc4)),require$$1=require(_0xa5e620(0x26a)),require$$0$3=require('os'),require$$2=require(_0xa5e620(0x290)),require$$0=require(_0xa5e620(0x2bc)),require$$0$2=require(_0xa5e620(0x8c)),require$$0$1=require('fs'),require$$0$4=require('node:events');function _0x70ef(_0x3b0300,_0x43cca7){_0x3b0300=_0x3b0300-0x83;const _0x1e2005=_0x1e20();let _0x70ef97=_0x1e2005[_0x3b0300];return _0x70ef97;}function getDefaultExportFromCjs(_0xaa5154){const _0x372f0e=_0xa5e620;return _0xaa5154&&_0xaa5154[_0x372f0e(0x1f9)]&&Object[_0x372f0e(0x17d)]['hasOwnProperty']['call'](_0xaa5154,'default')?_0xaa5154[_0x372f0e(0x209)]:_0xaa5154;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x2734ea=_0xa5e620;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x2b024c={'PUT':_0x2734ea(0x1bf),'REMOVE':_0x2734ea(0x21b),'INDEX_DROP':_0x2734ea(0x2b8),'INDEX_REGISTER':_0x2734ea(0x29f),'INDEX_RESET':_0x2734ea(0x2c9),'TYPE_REGISTER':_0x2734ea(0x1cf),'TYPE_DROP':'dropType','FTS_REGISTER':_0x2734ea(0x193),'FTS_DROP':_0x2734ea(0x1a0),'FTS_RESET':_0x2734ea(0x1ae),'SCHEMA_SET':'setSchema','SCHEMA_DROP':_0x2734ea(0x207),'TTL_SET':_0x2734ea(0x148),'TTL_CLEAR':_0x2734ea(0xd0)},_0x71b2e2={'SYSTEM_READY':_0x2734ea(0x171),'FIELD_RESOLVER_REGISTERED':_0x2734ea(0x27a),'SYSTEM_STOPPED':_0x2734ea(0x127),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x2734ea(0x224),'SYSTEM_DRAIN':_0x2734ea(0x90),'SYSTEM_TYPE_DROP':'system:type_drop','SYSTEM_PROC':_0x2734ea(0xe2),'SYSTEM_BUS_STATE_CHANGE':_0x2734ea(0x19b),'ITEM_CREATE':_0x2734ea(0xb5),'ITEM_UPDATE':_0x2734ea(0xe6),'ITEM_REMOVE':_0x2734ea(0x208),'ITEM_PENDING':_0x2734ea(0x1db),'INDEX_RESET':_0x2734ea(0x1c8),'INDEX_READY':_0x2734ea(0x8b),'INDEX_PROGRESS':_0x2734ea(0x136),'VIEW_PROGRESS':_0x2734ea(0x26b),'INDEX_DROP':_0x2734ea(0x101),'INDEX_REGISTERED':'index:registered','FTS_REGISTERED':'fts:registered','FTS_DROP':'fts:drop','FTS_RESET':_0x2734ea(0x23b),'SCHEMA_SET':_0x2734ea(0x15e),'SCHEMA_DROP':_0x2734ea(0x260),'UNIQUE_VIOLATION':_0x2734ea(0x2ad),'UNIQUE_VIOLATION_RESOLVED':'unique:violation_resolved','REF_VIOLATION':_0x2734ea(0x11b),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x2734ea(0xaf),'TXN_START':_0x2734ea(0x103),'TXN_END':_0x2734ea(0x13c),'TXN_ROLLBACK':_0x2734ea(0x14d),'TYPE_REGISTERED':_0x2734ea(0x84),'TYPE_DROP':_0x2734ea(0x10e),'ENV_OPENED':_0x2734ea(0x227),'ENV_REMOVED':'env:removed','SYSTEM_ENV_RELEASE':_0x2734ea(0x146),'TTL_EXPIRED':_0x2734ea(0x26d),'TTL_SET':_0x2734ea(0x282),'TTL_CLEAR':_0x2734ea(0x243),'LICENSE_INVALID':_0x2734ea(0xa2),'LICENSE_ADDED':_0x2734ea(0x2c6),'LICENSE_ACTIVATED':_0x2734ea(0x270),'LICENSE_REMOVED':_0x2734ea(0x100)},_0xb0889a={'CREATING':'creating','RESETTING':'resetting','READY':'ready','DROPPING':_0x2734ea(0x27f),'WAITING':_0x2734ea(0x168),'ERROR':_0x2734ea(0x110)},_0x18a086={'CREATED':_0x2734ea(0x237),'STARTING':_0x2734ea(0x102),'STARTED':_0x2734ea(0x13b),'STOPPING':_0x2734ea(0xcd),'STOPPED':'stopped'},_0x428e21={'CREATING':'creating','READY':_0x2734ea(0x231),'HALTED':'halted','STOPPED':'stopped','RESETTING':_0x2734ea(0x2b7)},_0x20ca6c=Object[_0x2734ea(0x296)]({'POKE':_0x2734ea(0x145),'DRAIN':'bus:drain','TYPE_DROP':_0x2734ea(0xbe),'PROC':'bus:proc','ENV_RELEASE':_0x2734ea(0x2bb)});return okdbEnums={'BUS_EVENTS':_0x20ca6c,'CHANGE_ACTIONS':_0x2b024c,'EVENTS':_0x71b2e2,'INDEX_STATE':_0xb0889a,'OKDB_STATE':_0x18a086,'VIEW_STATE':_0x428e21},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x2ace7f=_0xa5e620;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x54a114,performance:_0x3ea5f3}=require$$0,_0x273706=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x2ace7f(0x1d3),_0xedfad5=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x2b783d=process.env.OKDB_LOOP_LAG_ALL==='1',_0x4ce7fc=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x3059fe{constructor(){const _0xcd274a=_0x2ace7f;this['enabled']=_0x273706,this[_0xcd274a(0xdf)]=new Map(),this['_h']=null,this[_0xcd274a(0x26f)]=null,this[_0xcd274a(0x2a0)]=![],this[_0xcd274a(0x17c)]=(_0x26ab77,_0x1d237e)=>process[_0xcd274a(0x114)][_0xcd274a(0x22a)](_0x26ab77+(_0x1d237e?'\x20'+JSON[_0xcd274a(0x279)](_0x1d237e):'')+'\x0a');}['now'](){const _0x48d61c=_0x2ace7f;return _0x3ea5f3[_0x48d61c(0x1a7)]();}[_0x2ace7f(0x167)](_0x49810c){const _0x1ded4b=_0x2ace7f;if(typeof _0x49810c===_0x1ded4b(0xc0))this['_log']=_0x49810c;}['note'](_0x1faa80,_0x70ac65,_0x2f9b08){const _0x4ba4c6=_0x2ace7f;if(!this[_0x4ba4c6(0x1a6)])return;let _0x140d56=this[_0x4ba4c6(0xdf)][_0x4ba4c6(0x10c)](_0x1faa80);!_0x140d56&&(_0x140d56={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x4ba4c6(0xdf)][_0x4ba4c6(0x198)](_0x1faa80,_0x140d56)),_0x140d56['ms']+=_0x70ac65,_0x140d56['count']+=0x1,_0x70ac65>_0x140d56[_0x4ba4c6(0x143)]&&(_0x140d56[_0x4ba4c6(0x143)]=_0x70ac65,_0x140d56[_0x4ba4c6(0x169)]=_0x2f9b08||'');}[_0x2ace7f(0xc3)](_0x27f0d8){const _0x19262e=_0x2ace7f;if(!this[_0x19262e(0x1a6)]||this[_0x19262e(0x2a0)])return;this[_0x19262e(0x2a0)]=!![];if(_0x27f0d8)this[_0x19262e(0x17c)]=_0x27f0d8;this['_h']=_0x54a114({'resolution':0xa}),this['_h'][_0x19262e(0x1ba)](),this[_0x19262e(0x26f)]=setInterval(()=>this['_report'](),_0xedfad5);if(this[_0x19262e(0x26f)][_0x19262e(0x187)])this[_0x19262e(0x26f)][_0x19262e(0x187)]();}['onWindow'](_0x38d8d8){const _0x3523c8=_0x2ace7f;if(!this['_windowCbs'])this['_windowCbs']=new Set();this[_0x3523c8(0x26c)][_0x3523c8(0x1f0)](_0x38d8d8);if(!this[_0x3523c8(0x2a0)])this['_startAdmission']();}['offWindow'](_0x2a7558){const _0x51bf44=_0x2ace7f;this[_0x51bf44(0x26c)]?.[_0x51bf44(0x200)](_0x2a7558);}[_0x2ace7f(0x205)](){const _0x78cf03=_0x2ace7f;if(this[_0x78cf03(0x1b5)])return;this[_0x78cf03(0x1b5)]=!![];!this['_h']&&(this['_h']=_0x54a114({'resolution':0xa}),this['_h']['enable']());const _0x1e1fc4=_0xedfad5;this[_0x78cf03(0x160)]=setInterval(()=>{const _0x3cdef1=_0x78cf03,_0x2b2125=this['_h'];if(!_0x2b2125)return;const _0x52b413=_0x2b2125[_0x3cdef1(0x26e)](0x63)/0xf4240,_0xe53e0c=_0x2b2125['max']/0xf4240,_0x39d109=_0x2b2125[_0x3cdef1(0x14f)]/0xf4240;_0x2b2125[_0x3cdef1(0xe7)]();if(this['_windowCbs'])for(const _0x291e36 of this[_0x3cdef1(0x26c)]){try{_0x291e36({'p99Ms':_0x52b413,'maxMs':_0xe53e0c,'meanMs':_0x39d109,'reportMs':_0x1e1fc4});}catch{}}},_0x1e1fc4);if(this[_0x78cf03(0x160)][_0x78cf03(0x187)])this[_0x78cf03(0x160)][_0x78cf03(0x187)]();}[_0x2ace7f(0x1ee)](){const _0x3e4b15=_0x2ace7f,_0x33fc37=this['_h'],_0x5a58f0=_0x33fc37['max']/0xf4240,_0x5254b4=_0x33fc37[_0x3e4b15(0x26e)](0x63)/0xf4240,_0x5c1dc9=_0x33fc37['mean']/0xf4240;_0x33fc37[_0x3e4b15(0xe7)]();const _0x2478fd=[...this[_0x3e4b15(0xdf)]['entries']()][_0x3e4b15(0xcc)](([_0x38121f,_0x57b5bd])=>({'label':_0x38121f,..._0x57b5bd}))[_0x3e4b15(0x117)]((_0x46fa05,_0x4c8aab)=>_0x4c8aab['ms']-_0x46fa05['ms'])['slice'](0x0,0x8);this['_buckets']['clear']();const _0x5e709f=_0x2478fd[_0x3e4b15(0x1d2)]((_0x23c1f4,_0x452924)=>_0x23c1f4+_0x452924['ms'],0x0),_0x368a70=_0x2478fd['map'](_0x3fe2e1=>_0x3fe2e1[_0x3e4b15(0x11a)]+'='+_0x3fe2e1['ms']['toFixed'](0x0)+_0x3e4b15(0xf5)+_0x3fe2e1['count']+(_0x3fe2e1[_0x3e4b15(0x143)]>0x5?_0x3e4b15(0xf8)+_0x3fe2e1[_0x3e4b15(0x143)][_0x3e4b15(0x177)](0x0)+'ms'+(_0x3fe2e1[_0x3e4b15(0x169)]?'\x20'+_0x3fe2e1[_0x3e4b15(0x169)]:'')+')':''));(_0x2b783d||_0x5a58f0>=_0x4ce7fc)&&this[_0x3e4b15(0x17c)](_0x3e4b15(0x154)+_0xedfad5+'ms\x20max='+_0x5a58f0[_0x3e4b15(0x177)](0x0)+_0x3e4b15(0x23f)+_0x5254b4['toFixed'](0x0)+_0x3e4b15(0x24a)+_0x5c1dc9[_0x3e4b15(0x177)](0x0)+'ms\x20busy='+_0x5e709f[_0x3e4b15(0x177)](0x0)+'ms'+(_0x368a70['length']?_0x3e4b15(0x252)+_0x368a70['join']('\x20\x20'):''),{'feature':_0x3e4b15(0x245)});if(this[_0x3e4b15(0x26c)])for(const _0x437f5c of this[_0x3e4b15(0x26c)]){try{_0x437f5c({'p99Ms':_0x5254b4,'maxMs':_0x5a58f0,'meanMs':_0x5c1dc9,'reportMs':_0xedfad5});}catch{}}}['stop'](){const _0x4163dc=_0x2ace7f;if(this[_0x4163dc(0x26f)])clearInterval(this[_0x4163dc(0x26f)]);if(this['_h'])this['_h'][_0x4163dc(0x9f)]();this['_timer']=null,this['_h']=null,this[_0x4163dc(0x2a0)]=![];}}const _0x2ce79c=new _0x3059fe();if(_0x2ce79c[_0x2ace7f(0x1a6)])_0x2ce79c[_0x2ace7f(0xc3)]();return okdbLoopMonitor={'LOOP':_0x2ce79c},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x4038f7=require$$0$1,_0x43ac5c=require$$1;let _0x76f68a,_0x759919,_0x43b536,_0x1b6922,_0x553a1d,_0x386e92,_0x5c90af,_0x2c24bf=![];const _0x2d987a=new Set();let _0x410411=null;const _0x1eb853=new Map();function _0x1b742e(){const _0x2de970=_0x70ef;if(_0x76f68a!==undefined)return _0x76f68a;_0x76f68a=process.env.OKDB_DIAG==='1';if(!_0x76f68a)return![];_0x759919=process.env.OKDB_DIAG_STACK==='1',_0x1b6922=Math[_0x2de970(0x293)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x43b536=new Array(_0x1b6922),_0x553a1d=0x0,_0x386e92=0x0,_0x5c90af=process.env.OKDB_DIAG_DIR||null;if(_0x5c90af)try{_0x4038f7[_0x2de970(0x272)](_0x5c90af,{'recursive':!![]});}catch{}return!![];}function _0x15bd6(){return _0x76f68a===undefined?_0x1b742e():_0x76f68a;}function _0x3991b1(_0x11e61e,_0x2d9e3e){const _0x562c82=_0x70ef;if(_0x76f68a===undefined?!_0x1b742e():!_0x76f68a)return;let _0x2fb1ec;if(_0x759919){const _0x448301=new Error()[_0x562c82(0xba)]||'';_0x2fb1ec=_0x448301[_0x562c82(0x2ba)]('\x0a')[_0x562c82(0x219)](0x3)[_0x562c82(0xcc)](_0x44cdb9=>_0x44cdb9[_0x562c82(0x1a1)]())[_0x562c82(0xda)](Boolean)[_0x562c82(0x219)](0x0,0x8);}_0x43b536[_0x553a1d]={'seq':_0x386e92++,'t':Date[_0x562c82(0x1a7)](),'env':_0x11e61e,'kind':_0x2d9e3e||_0x562c82(0x1ec),'stack':_0x2fb1ec},_0x553a1d=(_0x553a1d+0x1)%_0x1b6922;}function _0xfc425f(_0x18d13d){const _0xef527e=_0x70ef,_0x5bae21=[];for(let _0x48159f=0x0;_0x48159f<_0x1b6922;_0x48159f++){const _0x2d9ce0=_0x43b536[(_0x553a1d-0x1-_0x48159f+_0x1b6922*0x2)%_0x1b6922];if(!_0x2d9ce0)continue;_0x5bae21[_0xef527e(0x206)](_0x2d9ce0);if(_0x5bae21['length']>=_0x18d13d)break;}return _0x5bae21;}function _0x326abf(_0x50b74d){const _0x57d4de=_0x70ef;try{process[_0x57d4de(0x114)][_0x57d4de(0x22a)](_0x50b74d+'\x0a');}catch{}if(_0x5c90af)try{_0x4038f7[_0x57d4de(0xb8)](_0x43ac5c[_0x57d4de(0xf4)](_0x5c90af,_0x57d4de(0x2ae)+process[_0x57d4de(0x1c1)]+'.log'),_0x50b74d+'\x0a');}catch{}}function _0x162898(_0x2dd77e){const _0x51eed1=_0x70ef,_0x5a856b=_0xfc425f(_0x2dd77e);if(!_0x5a856b['length'])return _0x51eed1(0x226);const _0x2dcafc=Date['now']();return _0x5a856b[_0x51eed1(0xcc)](_0x482f60=>{const _0x5f0c59=_0x51eed1,_0x471420='\x20\x20#'+_0x482f60['seq']+'\x20-'+(_0x2dcafc-_0x482f60['t'])+_0x5f0c59(0xf7)+_0x482f60[_0x5f0c59(0x11d)]+'\x20'+_0x482f60[_0x5f0c59(0x194)];return _0x482f60[_0x5f0c59(0xba)]&&_0x482f60[_0x5f0c59(0xba)]['length']?_0x471420+_0x5f0c59(0x249)+_0x482f60['stack'][_0x5f0c59(0xf4)](_0x5f0c59(0x249)):_0x471420;})['join']('\x0a');}function _0x189f4e(_0x547fa9,_0x5e5f10){const _0x3093b3=_0x70ef,_0xc12f3d=_0x3093b3(0x1f4)+_0x547fa9+_0x3093b3(0x109)+new Date()['toISOString']()+_0x3093b3(0x116)+process[_0x3093b3(0x1c1)]+_0x3093b3(0x29e),_0x2ae2cb=[_0xc12f3d,'error:\x20'+(_0x5e5f10&&_0x5e5f10[_0x3093b3(0xba)]?_0x5e5f10['stack'][_0x3093b3(0x2ba)]('\x0a')[0x0]:_0x5e5f10),'recent\x20writes\x20(newest\x20first)'+(_0x759919?'':_0x3093b3(0x96))+':',_0x162898(0x18),_0x1b03cd(),'='['repeat'](_0xc12f3d[_0x3093b3(0x202)]-0x1)];_0x326abf(_0x2ae2cb[_0x3093b3(0xf4)]('\x0a'));}function _0x39fb6e(_0x6eae5f){const _0x8a6f79=_0x70ef;if(!_0x15bd6())return;const _0x5a824f=String(_0x6eae5f&&_0x6eae5f['message']||_0x6eae5f||''),_0x24a224=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x8a6f79(0x242)](_0x5a824f);_0x189f4e(_0x24a224?_0x8a6f79(0x204):_0x8a6f79(0x1e3),_0x6eae5f);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x24a224)return;try{console['error'](_0x6eae5f&&_0x6eae5f[_0x8a6f79(0xba)]?_0x6eae5f['stack']:_0x6eae5f);}catch{}process[_0x8a6f79(0x2bd)](0x1);}function _0xc1c6a4(_0x171252){const _0x4c40c8=_0x70ef;if(!_0x15bd6())return;const _0x572aa3=String(_0x171252&&_0x171252[_0x4c40c8(0x28a)]||_0x171252||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x4c40c8(0x242)](_0x572aa3)&&_0x189f4e(_0x4c40c8(0xe9),_0x171252);}function _0x1b03cd(){const _0x54c606=_0x70ef,_0x3fdb56=[_0x54c606(0xef)];let _0x111147=![];for(const _0x297589 of _0x2d987a){const _0xa7eebf=_0x297589&&_0x297589[_0x54c606(0x24d)];if(!_0xa7eebf)continue;for(const [_0x2cf157,_0x11d2ca]of _0xa7eebf){const _0xee905a=_0x11d2ca&&_0x11d2ca[_0x54c606(0x269)]&&_0x11d2ca[_0x54c606(0x269)][_0x54c606(0xde)];if(!_0xee905a)continue;let _0x46db2f,_0x296188;try{_0x46db2f=Atomics[_0x54c606(0x250)](_0xee905a,0x0),_0x296188=Atomics['load'](_0xee905a,0x1);}catch{continue;}if(_0x46db2f===0x0)continue;_0x111147=!![];const _0x2365e6=_0x46db2f>0x0?'SWAP':_0x54c606(0x186),_0x515231=Date[_0x54c606(0x1a7)]()-Math[_0x54c606(0x258)](_0x46db2f)*0x3e8,_0x352018=((()=>{const _0x107a36=_0x54c606;try{return _0x11d2ca[_0x107a36(0xb6)]&&_0x11d2ca[_0x107a36(0xb6)]['status']?_0x11d2ca[_0x107a36(0xb6)][_0x107a36(0x1a5)]():null;}catch{return null;}})());_0x3fdb56['push'](_0x54c606(0x1b7)+_0x2cf157+_0x54c606(0x1da)+_0x2365e6+_0x54c606(0x27b)+_0x515231+_0x54c606(0x149)+_0x296188+(_0x352018?_0x54c606(0x18f)+_0x352018[_0x54c606(0x2b1)]+'\x20oldestPendingMs='+_0x352018[_0x54c606(0x27e)]+_0x54c606(0xe1)+_0x352018[_0x54c606(0x2b2)]+'}':''));}}if(!_0x111147)_0x3fdb56[_0x54c606(0x206)](_0x54c606(0x180));return _0x3fdb56[_0x54c606(0xf4)]('\x0a');}function _0xf32f4a(){const _0x227f66=_0x70ef;if(!_0x15bd6())return;const _0x495b75=Math[_0x227f66(0x293)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x5d5473=Date[_0x227f66(0x1a7)]();for(const _0x120e1a of _0x2d987a){const _0x5304f9=_0x120e1a&&_0x120e1a[_0x227f66(0x24d)];if(!_0x5304f9)continue;for(const [_0x355526,_0x596773]of _0x5304f9){const _0x166463=_0x596773&&_0x596773[_0x227f66(0x269)]&&_0x596773[_0x227f66(0x269)][_0x227f66(0xde)];if(!_0x166463)continue;let _0x2b35f2;try{_0x2b35f2=Atomics[_0x227f66(0x250)](_0x166463,0x0);}catch{continue;}const _0x44ac70=_0x120e1a[_0x227f66(0x26a)]+'|'+_0x355526;if(_0x2b35f2<=0x0){_0x1eb853[_0x227f66(0x200)](_0x44ac70);continue;}const _0x35a2c3=_0x5d5473-_0x2b35f2*0x3e8,_0x2abeb9=_0x1eb853[_0x227f66(0x10c)](_0x44ac70);if(_0x35a2c3<_0x495b75)continue;if(_0x2abeb9&&_0x5d5473-_0x2abeb9[_0x227f66(0x29c)]<_0x495b75)continue;_0x1eb853[_0x227f66(0x198)](_0x44ac70,{'firstTs':_0x2abeb9?_0x2abeb9['firstTs']:_0x2b35f2,'dumpedAt':_0x5d5473});const _0x2c2c3f='\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20'+_0x35a2c3+_0x227f66(0x1fc)+_0x355526+_0x227f66(0x109)+new Date()['toISOString']()+_0x227f66(0x116)+process['pid']+_0x227f66(0x29e);_0x326abf([_0x2c2c3f,_0x1b03cd(),'='['repeat'](_0x2c2c3f[_0x227f66(0x202)]-0x1)]['join']('\x0a'));}}}function _0x5f4890(){const _0x517776=_0x70ef;if(!_0x15bd6()||_0x2c24bf)return;_0x2c24bf=!![],process[_0x517776(0x118)](_0x517776(0x1e3),_0x39fb6e),process[_0x517776(0x118)]('unhandledRejection',_0xc1c6a4);const _0x53027e=Math[_0x517776(0x293)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x410411=setInterval(_0xf32f4a,_0x53027e);if(_0x410411[_0x517776(0x187)])_0x410411['unref']();}function _0x2af6be(_0x18b034){if(!_0x15bd6()||!_0x18b034)return;_0x2d987a['add'](_0x18b034),_0x5f4890();}function _0x14cf5c(_0x1588d0){_0x2d987a['delete'](_0x1588d0);}function _0x5e1a9e(){if(!_0x15bd6())return{'enabled':![],'hint':'set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)'};return{'enabled':!![],'stackCapture':!!_0x759919,'recentWrites':_0xfc425f(0x10),'drain':_0x1b03cd()};}return okdbDiag={'isEnabled':_0x15bd6,'recordWrite':_0x3991b1,'installDiag':_0x5f4890,'registerOkdb':_0x2af6be,'unregisterOkdb':_0x14cf5c,'snapshot':_0x5e1a9e},okdbDiag;}function _0x1e20(){const _0x486d48=['allSettled','\x20│\x20','resetReadTxn','name','catch','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','_wantDbOf','abs','FTS_DROP','killable','_publishNow','extend','feed:','_buildProcessingFacet','clear','schema:drop','stopHeartbeat','putNode','selfKey','change','respawnTimer','[okdb-cluster]\x20','__vocab/version','http-server','_coordinator','path','view:progress','_windowCbs','ttl:expired','percentile','_timer','license:activated','[okdb-cluster]\x20worker\x20pid=','mkdirSync','_participate','has','FTS_REGISTERED','workersConfigured','noteListenAddr','\x20statusEnv=','stringify','field:resolver_registered','\x20drainAge=','role','value','oldestPendingMs','dropping','decommissioned','hard-killed','ttl:set','MAX_POOL_HOLDS','heldBy','_lock','transactionSync','startHeartbeat','_quantum','_collectSingletonClaims','message','VIEW_PROGRESS','race','FTS_RESET','_clusterOrphanWatch','putSync','crypto','reap','registry\x20publish\x20failing:\x20','max','_hbTimer','_putRowSync','freeze','_processStartedAt','ppid','ESRCH','~processes:desired','emit','dumpedAt','ENV_CLOSING_RETRY','\x20===','registerIndex','_started','_acquiredAt','_systemEnv','msg','namespace','_ownMeta','dead','SIGKILL','749790troJeP','okdb','\x20(slot=','cluster-wide','1ofN:','unique:violation','okdb-diag.','procmode/','_rowKey','depth','parkedNow','transaction','stats','_wantDbHandle','cpuWindowMs','resetting','dropIndex','_isStale','split','bus:env_release','node:perf_hooks','exit','_pendingLocal',')\x20exited\x20','REMOVE','_nestedWarned','_desired','_cmd','size','close','license:added','processing','lifecycle','resetIndex','_startHeartbeat','type:registered','_caps','_sandbox','draining','log','[okdb-cluster]\x20primary\x20pid=','holder','index:ready','perf_hooks','_bpWaiters','ITEM_CREATE','_enableChangelog','system:drain','_flushDebounce','round','_groupByProcess','SYNC_COMMITS','_buildOwnRow','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','okdb-writer[','none','okdb-writer:\x20env\x20closing\x20—\x20retry','_onProcEvent','_enqueuedAt','isPrimary','meta','_scheduleFlush','disable','engines','unclaimed','license:invalid','_lastPublishAt','processor:ready','publishChildRow','cpuUsage','stop','win32',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','raw-remove','_inflight','_highWater','external','4439491KxAuQr','sync:apply','reportThreadStats','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','process\x20','_markSeen','single','item:create','_writer','info','appendFileSync','workers','stack','node','mode','_getType','bus:type_drop','ms\x20(attempt\x20','function','shift','platform','start','cluster','all','listen','_maybePublish','processor:paused','list','decommissioning','raw-put','map','stopping','_servingEngines','splice','clearTtl','removeSync','drain','_clusterOnMessage','_pending','fanout','isWanted','markClosed','connected','hostname','filter','warn','3300616VXUidK','fast','view','_buckets','send','\x20parkedNow=','system:proc','_statusEnv','randomUUID','_versionSkewWarned','item:update','reset','processorsView','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','isEnabled','processes','_role','claimGated','\x20ipc\x20error:\x20','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','startsWith','note','_handlePending','off','join','ms/','version','ms\x20env=','(worst\x20','listenAddr','updatedAt','setDesired','\x20died\x20','beforeWrite','clearThreadStats','openDB','license:removed','index:drop','starting','txn:start','getProcess','_clusterWorkerAttached','_publishFailWarned','http','rss','\x20@\x20','_sampleOwnStats','acquiredAt','get','_drainOne','type:drop','_nodeDbFor','error','release','_heartbeatInFlight','_singletonLocks','stderr','--print','\x20pid=','sort','prependListener','childTransaction','label','ref:violation',',\x20signal=','env','SYSTEM_STOPPED','primary','pushEphemeral','find','_onPending','rows=','getChanges','nodeKey','instances','system:stopped',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','_adminRelay','_putRowAsync','worker','startedAt','ITEM_PENDING','slot','registry-publish','_lastCpuWindowMs','1052148xUYwHl','isActive','register','closing','_selfKey','index:progress','_listenAddr','_lockDb','_heldTotal','1549293iJVmpc','started','txn:end','async','6fEiJIq','\x20worker(s)\x20still\x20serving','_seen','processor:resumed','registry\x20heartbeat\x20skipped\x20(writer=','maxMs','standalone','bus:poke','system:env_release','--test','setTtl','ms\x20activeWriters=','busy','kill','object','txn:rollback','claims','mean',');\x20','exports','process','number','loop-lag\x20','_lastCpuUsage','runtimeProcessesView','entries','_assertUsable','children','type','then','heartbeatMs','_children','schema:set','_instanceId','_admissionTimer','instanceId','processingStatusView','_outstanding','quantum','_baselines','_singletonLock','setLogger','waiting','maxExtra','listening','_ensureDesired','listNodes','state','_lockDbOf','some','9slqqoV','system:ready','isWorker','_held','processingSig','_nestedTotal','dedupeMax','toFixed','_heartbeatTimer','values','_bpParkedTotal','min','_log','prototype','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.','expiresAt','\x20\x20(no\x20env\x20draining)','_kind','resolve','createEnvironment','~lock','_nodeDb','copy','unref','getClock','getCmd','CHANGEFEED_QUANTUM','sync','once','processor:progress','removeNode','\x20writer{depth=','running','user','uptime','registerFts','kind','processor:error','_migrateVocab','_draining','set','host','2.6.1','system:bus_state_change','ingest','_durs','isDead','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','dropFts','trim','[okdb-cluster]\x20slot=','execArgv','_refreshDesiredSnapshot','status','enabled','now','_collectWriterFacet','_rootDb','deaths','INDEX_READY','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','okdb-lock:\x20env\x20closed','resetFts','_activateProcesses','threads','options','ITEM_REMOVE','_handlePoke','_cursors','_admissionStarted','INDEX_PROGRESS','\x20\x20env=','_nodeDbCache','_dedupeMax','enable','SYSTEM_PROC','_rawDb','singletonClaims','code','put','_released','pid','processor:retry','parse','cursorKey','getDesired','getRange','_key','index:reset','_isReader','_supervisorKey','open','--inspect','queue-worker','processors','registerType','rowKey','next','reduce','true','_onTick','isConnected','\x20(durable\x20desired-state)','_db','setOwnMeta','_onPoke','\x20phase=','item:pending','fromEntries','_dedupeKey','_flushTimer','decommission','updateSupervisedChildStats','count','23736370jhRypV','uncaughtException','online','__okdbSlot','committed','tierList','participate','indexOf','_onStop','hasDesired','commit','_threadStats','_report','level','add',':want','commitsPerSec','--eval','\x0a===\x20OKDB_DIAG\x20','string','listDesired','fn-runner','sandbox','__esModule','[okdb-cluster]\x20respawning\x20worker\x20slot=','embedded','ms\x20on\x20env=','(code=','system','cli','delete','cpus','length','_nodeDead','ORPHAN\x20(env-closed\x20write)','_startAdmission','push','dropSchema','item:remove','default','\x20sync','processKey','disconnect','_removeRowAsync','afterWrite','listAll','attachFeed','_closed','ttlMs','migrations','fork','slotKey','_buildChildRow','clusterStatusView','_desiredOverlay','slice','signalWant','remove','__okdbCluster','heapUsed','_committed','floor','consecutiveFailures','procmodeack/','_isWriter','memoryUsage','system:poke','\x20times\x20in\x20','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','env:opened','includes','_wantDb','write','_drain','supervisorKey','building','SYSTEM_POKE','replace','5wJRexT','ready','epoch','_done','events','commitP99Ms','4399548ZEMsEI','created','confirm','withPoolHold','\x20in\x20','fts:reset','processorId','_lastCpuPct','setupPrimary','ms\x20p99=','_holderDead','okdb-http-worker-child.js','test','ttl:clear','nodesView','loop-lag','./okdb','caps','INDEX_RESET','\x0a\x20\x20\x20\x20\x20\x20','ms\x20mean=','~processes','_onItem','_envs','heapTotal','node/','load'];_0x1e20=function(){return _0x486d48;};return _0x1e20();}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x17b1f0=_0xa5e620;if(hasRequiredOkdbWriter)return okdbWriter[_0x17b1f0(0x151)];hasRequiredOkdbWriter=0x1;const {performance:_0x3c07f3}=require$$0$2,_0x4bf6cf=requireOkdbDiag(),_0x1f8797=process.env.OKDB_COMMIT_MODE===_0x17b1f0(0x18b);class _0x17da11{constructor(_0x136ab8){const _0x5c4faf=_0x17b1f0;this[_0x5c4faf(0x11d)]=_0x136ab8,this[_0x5c4faf(0xab)]=new Set(),this['_enqueuedAt']=new Map(),this[_0x5c4faf(0x21e)]=0x0,this[_0x5c4faf(0x19d)]=[],this[_0x5c4faf(0x233)]=[],this[_0x5c4faf(0xac)]=Math[_0x5c4faf(0x293)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x5c4faf(0x163)]=0x0,this[_0x5c4faf(0x8d)]=[],this[_0x5c4faf(0x17a)]=0x0,this[_0x5c4faf(0x173)]=null,this[_0x5c4faf(0x139)]=0x0,this[_0x5c4faf(0x175)]=0x0,this[_0x5c4faf(0x2c1)]=![];}async[_0x17b1f0(0x2b3)](_0x38f5b8,_0x50ebe6,{admitted:admitted=![]}={}){const _0xc6d478=_0x17b1f0;if(_0x4bf6cf[_0xc6d478(0xea)]())_0x4bf6cf['recordWrite'](this[_0xc6d478(0x11d)]?.[_0xc6d478(0x254)],_0x50ebe6);if(this[_0xc6d478(0x211)]){const _0x47d3c0=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x47d3c0[_0xc6d478(0x1be)]=_0xc6d478(0x29d);throw _0x47d3c0;}if(this[_0xc6d478(0xac)]>0x0){let _0x2d7d65=![];while(this[_0xc6d478(0x163)]>=this[_0xc6d478(0xac)]&&!this[_0xc6d478(0x211)]){!_0x2d7d65&&(_0x2d7d65=!![],this['_bpParkedTotal']++),await new Promise(_0x39cc00=>this['_bpWaiters'][_0xc6d478(0x206)](_0x39cc00));}if(this['_closed']){const _0xfd0cb5=new Error(_0xc6d478(0x99));_0xfd0cb5['code']=_0xc6d478(0x29d);throw _0xfd0cb5;}}this[_0xc6d478(0x163)]++;const _0x458f96=admitted?null:this[_0xc6d478(0x11d)]['_coordinator'];for(;;){while(this['_held'])await this[_0xc6d478(0x173)];if(_0x458f96)try{await _0x458f96[_0xc6d478(0xfd)]();}catch(_0x178eb9){this[_0xc6d478(0x163)]--;if(this['_bpWaiters'][_0xc6d478(0x202)]&&this[_0xc6d478(0x163)]<this[_0xc6d478(0xac)])this[_0xc6d478(0x8d)][_0xc6d478(0xc1)]()();throw _0x178eb9;}if(!this['_held'])break;if(_0x458f96)_0x458f96['afterWrite']();}if(this[_0xc6d478(0x211)]){if(_0x458f96)_0x458f96[_0xc6d478(0x20e)]();this['_outstanding']--;if(this[_0xc6d478(0x8d)][_0xc6d478(0x202)]&&this[_0xc6d478(0x163)]<this[_0xc6d478(0xac)])this[_0xc6d478(0x8d)][_0xc6d478(0xc1)]()();const _0x44233c=new Error(_0xc6d478(0x99));_0x44233c[_0xc6d478(0x1be)]='ENV_CLOSING_RETRY';throw _0x44233c;}const _0x2610d1=_0x3c07f3[_0xc6d478(0x1a7)]();if(_0x1f8797)try{const _0x2527c2=this[_0xc6d478(0x11d)]['db'][_0xc6d478(0x286)](_0x38f5b8);this[_0xc6d478(0x21e)]++;if(this[_0xc6d478(0x19d)][_0xc6d478(0x206)](_0x3c07f3[_0xc6d478(0x1a7)]()-_0x2610d1)>0x100)this[_0xc6d478(0x19d)][_0xc6d478(0xc1)]();if(this[_0xc6d478(0x233)][_0xc6d478(0x206)](_0x3c07f3[_0xc6d478(0x1a7)]())>0x800)this['_done'][_0xc6d478(0xc1)]();return _0x2527c2;}finally{this['_outstanding']--;if(this[_0xc6d478(0x8d)]['length']&&this['_outstanding']<this[_0xc6d478(0xac)])this[_0xc6d478(0x8d)][_0xc6d478(0xc1)]()();if(_0x458f96)_0x458f96[_0xc6d478(0x20e)]();}let _0x4f44e3=null;const _0x272a38=()=>{const _0x3b27e2=_0xc6d478,_0x10793a=_0x38f5b8();if(_0x10793a&&typeof _0x10793a[_0x3b27e2(0x15b)]===_0x3b27e2(0xc0)&&!_0x4f44e3){this[_0x3b27e2(0x139)]++;let _0xf7a95b;const _0x21a1b8=new Promise(_0x3da250=>_0xf7a95b=_0x3da250);this[_0x3b27e2(0x173)]=_0x21a1b8,_0x4f44e3=()=>{const _0x45b6c6=_0x3b27e2;if(this[_0x45b6c6(0x173)]===_0x21a1b8)this[_0x45b6c6(0x173)]=null;_0xf7a95b();};}return _0x10793a;};let _0x3d4967;try{_0x3d4967=this[_0xc6d478(0x11d)]['db']['childTransaction'](_0x272a38);}catch(_0x2a9b28){_0x3d4967=Promise['reject'](_0x2a9b28);}(!_0x3d4967||typeof _0x3d4967[_0xc6d478(0x15b)]!==_0xc6d478(0xc0))&&(this[_0xc6d478(0x175)]++,!this[_0xc6d478(0x2c1)]&&(this[_0xc6d478(0x2c1)]=!![],console[_0xc6d478(0xdb)](_0xc6d478(0x97)+(this[_0xc6d478(0x11d)]?.[_0xc6d478(0x254)]??'?')+_0xc6d478(0xa9))),_0x3d4967=Promise[_0xc6d478(0x182)](_0x3d4967));const _0x4fe6f8=()=>{if(_0x4f44e3)_0x4f44e3();};_0x3d4967['then'](_0x4fe6f8,_0x4fe6f8),this[_0xc6d478(0xab)][_0xc6d478(0x1f0)](_0x3d4967),this[_0xc6d478(0x9b)][_0xc6d478(0x198)](_0x3d4967,_0x2610d1);const _0x504604=()=>{const _0x5626ed=_0xc6d478;this[_0x5626ed(0xab)][_0x5626ed(0x200)](_0x3d4967),this[_0x5626ed(0x9b)][_0x5626ed(0x200)](_0x3d4967),this[_0x5626ed(0x21e)]++,this[_0x5626ed(0x163)]--;this[_0x5626ed(0x8d)][_0x5626ed(0x202)]&&this['_outstanding']<this[_0x5626ed(0xac)]&&this[_0x5626ed(0x8d)]['shift']()();if(this[_0x5626ed(0x19d)][_0x5626ed(0x206)](_0x3c07f3[_0x5626ed(0x1a7)]()-_0x2610d1)>0x100)this[_0x5626ed(0x19d)][_0x5626ed(0xc1)]();if(this['_done'][_0x5626ed(0x206)](_0x3c07f3[_0x5626ed(0x1a7)]())>0x800)this['_done'][_0x5626ed(0xc1)]();};_0x3d4967[_0xc6d478(0x15b)](_0x504604,_0x504604);try{return await _0x3d4967;}finally{if(_0x458f96)_0x458f96[_0xc6d478(0x20e)]();}}[_0x17b1f0(0x1a5)](){const _0x1e0450=_0x17b1f0,_0x3e6038=_0x3c07f3[_0x1e0450(0x1a7)]();let _0x263edb=0x0;for(const _0x3aaba7 of this[_0x1e0450(0x9b)]['values']()){const _0x306a10=_0x3e6038-_0x3aaba7;if(_0x306a10>_0x263edb)_0x263edb=_0x306a10;}let _0x4adf99=0x0;for(let _0x3be9e0=this[_0x1e0450(0x233)]['length']-0x1;_0x3be9e0>=0x0;_0x3be9e0--){if(_0x3e6038-this[_0x1e0450(0x233)][_0x3be9e0]>0x3e8)break;_0x4adf99++;}let _0x5024b7=0x0;if(this[_0x1e0450(0x19d)][_0x1e0450(0x202)]){const _0x51f147=[...this['_durs']][_0x1e0450(0x117)]((_0x427180,_0x296447)=>_0x427180-_0x296447);_0x5024b7=_0x51f147[Math['min'](_0x51f147[_0x1e0450(0x202)]-0x1,Math['floor'](_0x51f147[_0x1e0450(0x202)]*0.99))];}return{'depth':this[_0x1e0450(0xab)][_0x1e0450(0x2c4)],'oldestPendingMs':Math['round'](_0x263edb),'committed':this[_0x1e0450(0x21e)],'commitsPerSec':_0x4adf99,'commitP99Ms':Math[_0x1e0450(0x92)](_0x5024b7),'parkedNow':this[_0x1e0450(0x8d)][_0x1e0450(0x202)],'parkedTotal':this['_bpParkedTotal'],'highWater':this[_0x1e0450(0xac)]};}['inflightAgesMs'](){const _0xa7b08e=_0x17b1f0,_0x562700=_0x3c07f3[_0xa7b08e(0x1a7)]();return[...this[_0xa7b08e(0x9b)][_0xa7b08e(0x179)]()][_0xa7b08e(0xcc)](_0x467599=>Math[_0xa7b08e(0x92)](_0x562700-_0x467599))[_0xa7b08e(0x117)]((_0x1c0fe9,_0x1c1b19)=>_0x1c1b19-_0x1c0fe9);}[_0x17b1f0(0xd7)](){const _0x40d0cc=_0x17b1f0;this[_0x40d0cc(0x211)]=!![];for(const _0x296086 of this[_0x40d0cc(0x8d)][_0x40d0cc(0xcf)](0x0))_0x296086();}async[_0x17b1f0(0xd2)](){const _0x1dc79e=_0x17b1f0;let _0x43ee5b=0x0;while(this[_0x1dc79e(0xab)]['size']&&_0x43ee5b++<0x3e8){await Promise[_0x1dc79e(0x251)]([...this[_0x1dc79e(0xab)]]);}}async[_0x17b1f0(0x1bf)](_0x56a49e,_0x49b2b0,_0x4c49f5,_0x4ed679){const _0x59571c=_0x17b1f0;return this[_0x59571c(0x2b3)](()=>{const _0x10376f=_0x59571c;if(_0x4ed679===undefined)_0x56a49e[_0x10376f(0x28f)](_0x49b2b0,_0x4c49f5);else _0x56a49e[_0x10376f(0x28f)](_0x49b2b0,_0x4c49f5,_0x4ed679);},_0x59571c(0xcb));}async[_0x17b1f0(0x21b)](_0x3d0a41,_0x392ce4){const _0x580d8b=_0x17b1f0;return this[_0x580d8b(0x2b3)](()=>_0x3d0a41['removeSync'](_0x392ce4),_0x580d8b(0xaa));}}async function _0x71cff9(_0x5b663f,_0x3d4dff){const _0xf231fb=_0x17b1f0;if(_0x3d4dff==null)_0x3d4dff=Math[_0xf231fb(0x293)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0xf72d76=_0x5b663f?.['flushed'];if(!_0xf72d76||typeof _0xf72d76[_0xf231fb(0x15b)]!==_0xf231fb(0xc0))return;await Promise[_0xf231fb(0x28c)]([Promise[_0xf231fb(0x182)](_0xf72d76)[_0xf231fb(0x255)](()=>{}),new Promise(_0x2f6082=>{const _0x5ba987=_0xf231fb,_0x546f85=setTimeout(_0x2f6082,_0x3d4dff);if(_0x546f85[_0x5ba987(0x187)])_0x546f85[_0x5ba987(0x187)]();})]);}catch{}}function _0x393db2(_0x51de3e){const _0x927db5=_0x17b1f0;if(_0x1f8797)return Promise[_0x927db5(0x182)]();const _0x3d535a=_0x51de3e?.['committed'];return _0x3d535a&&typeof _0x3d535a[_0x927db5(0x15b)]==='function'?_0x3d535a:Promise['resolve']();}const _0xae5d35=Math[_0x17b1f0(0x293)](0x1,Math[_0x17b1f0(0x21f)](Number(process.env.UV_THREADPOOL_SIZE))||0x4),_0x5a5d26=Math[_0x17b1f0(0x293)](0x1,_0xae5d35-0x2);let _0x593dfd=0x0;const _0x57ee42=[];async function _0x2a0af0(_0x223e41){const _0x494c17=_0x17b1f0;if(_0x593dfd<_0x5a5d26)_0x593dfd++;else await new Promise(_0x3448d6=>_0x57ee42['push'](_0x3448d6));try{return await _0x223e41();}finally{const _0x460a2d=_0x57ee42[_0x494c17(0xc1)]();if(_0x460a2d)_0x460a2d();else _0x593dfd--;}}return okdbWriter['exports']=_0x17da11,okdbWriter[_0x17b1f0(0x151)][_0x17b1f0(0x239)]=_0x2a0af0,okdbWriter['exports'][_0x17b1f0(0x283)]=_0x5a5d26,okdbWriter[_0x17b1f0(0x151)]['flushLmdb']=_0x71cff9,okdbWriter[_0x17b1f0(0x151)]['committed']=_0x393db2,okdbWriter[_0x17b1f0(0x151)][_0x17b1f0(0x94)]=_0x1f8797,okdbWriter['exports'];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x282cc7=_0xa5e620;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x49b668=require$$0$3,{SYNC_COMMITS:_0x473a8f}=requireOkdbWriter(),_0x14bfa0=_0x282cc7(0x184);class _0x38fcbd{constructor(_0x151cd0,_0x368d80,_0x9d15){const _0x17789a=_0x282cc7;this['_lock']=_0x151cd0,this[_0x17789a(0x1c7)]=_0x368d80,this['_acquiredAt']=_0x9d15,this['_released']=![],this[_0x17789a(0x178)]=null,this[_0x17789a(0x112)]=null;}['isHeld'](){const _0x77652a=_0x282cc7;if(this['_released'])return![];try{const _0x19e55b=this[_0x77652a(0x285)][_0x77652a(0x1d7)]()['get'](this['_key']);if(!_0x19e55b||_0x19e55b[_0x77652a(0x10b)]!==this[_0x77652a(0x2a1)])return![];const _0x34c47d=_0x19e55b['updatedAt']??_0x19e55b[_0x77652a(0x10b)];if(_0x34c47d+_0x19e55b[_0x77652a(0x212)]<Date[_0x77652a(0x1a7)]())return![];return!![];}catch{return!this[_0x77652a(0x1c0)];}}[_0x282cc7(0x8a)](){const _0x4112a1=_0x282cc7;if(this['_released'])return null;try{return this[_0x4112a1(0x285)][_0x4112a1(0x1d7)]()[_0x4112a1(0x10c)](this['_key'])??null;}catch{return null;}}async[_0x282cc7(0x25c)](_0x450e52){const _0x391d44=_0x282cc7;if(this[_0x391d44(0x1c0)])return;try{if(this[_0x391d44(0x285)][_0x391d44(0x211)]())return;const _0x2f1a41=this[_0x391d44(0x285)][_0x391d44(0x1d7)]()[_0x391d44(0x10c)](this[_0x391d44(0x1c7)]);if(!_0x2f1a41||_0x2f1a41[_0x391d44(0x10b)]!==this['_acquiredAt'])return;if(_0x473a8f)this[_0x391d44(0x285)][_0x391d44(0x1d7)]()[_0x391d44(0x28f)](this[_0x391d44(0x1c7)],{..._0x2f1a41,'ttlMs':_0x2f1a41[_0x391d44(0x212)]+_0x450e52});else await this[_0x391d44(0x285)]['_db']()[_0x391d44(0x1bf)](this[_0x391d44(0x1c7)],{..._0x2f1a41,'ttlMs':_0x2f1a41['ttlMs']+_0x450e52});}catch{}}async[_0x282cc7(0x111)](){const _0xbfa140=_0x282cc7;if(this[_0xbfa140(0x1c0)])return;if(this[_0xbfa140(0x112)])try{await this[_0xbfa140(0x112)];}catch{}clearInterval(this['_heartbeatTimer']),this[_0xbfa140(0x178)]=null,this[_0xbfa140(0x1c0)]=!![];try{if(this['_lock'][_0xbfa140(0x211)]())return;const _0x3c03b6=this[_0xbfa140(0x285)][_0xbfa140(0x1d7)]()[_0xbfa140(0x10c)](this[_0xbfa140(0x1c7)]);if(_0x3c03b6&&_0x3c03b6[_0xbfa140(0x10b)]===this['_acquiredAt']){if(_0x473a8f)this[_0xbfa140(0x285)][_0xbfa140(0x1d7)]()[_0xbfa140(0xd1)](this[_0xbfa140(0x1c7)]);else await this[_0xbfa140(0x285)][_0xbfa140(0x1d7)]()[_0xbfa140(0x21b)](this[_0xbfa140(0x1c7)]);}}catch{}}[_0x282cc7(0x83)](_0x332a56,_0x317f20){const _0x357323=_0x282cc7,_0x386bb4=_0x317f20??Math[_0x357323(0x21f)](_0x332a56/0x3);this[_0x357323(0x178)]=setInterval(()=>{const _0x24fed6=_0x357323;if(this[_0x24fed6(0x1c0)])return;this[_0x24fed6(0x112)]=((async()=>{const _0x628069=_0x24fed6;try{if(this['_lock'][_0x628069(0x211)]())return;const _0x26923e=this[_0x628069(0x285)][_0x628069(0x1d7)]()[_0x628069(0x10c)](this[_0x628069(0x1c7)]);if(!_0x26923e||_0x26923e['acquiredAt']!==this[_0x628069(0x2a1)]){this[_0x628069(0x1c0)]=!![],clearInterval(this['_heartbeatTimer']),this['_heartbeatTimer']=null;return;}if(_0x473a8f)this[_0x628069(0x285)][_0x628069(0x1d7)]()[_0x628069(0x28f)](this['_key'],{..._0x26923e,'updatedAt':Date['now']()});else await this[_0x628069(0x285)][_0x628069(0x1d7)]()[_0x628069(0x1bf)](this[_0x628069(0x1c7)],{..._0x26923e,'updatedAt':Date[_0x628069(0x1a7)]()});}catch{}this['_heartbeatInFlight']=null;})());},_0x386bb4);if(this[_0x357323(0x178)][_0x357323(0x187)])this[_0x357323(0x178)]['unref']();}}class _0x143055{constructor(_0x377fb0,{namespace:_0x285b84,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x2e757d=_0x282cc7;this[_0x2e757d(0x1bc)]=_0x377fb0,this[_0x2e757d(0x2a4)]=_0x285b84,this['ttlMs']=ttlMs,this[_0x2e757d(0x15c)]=heartbeatMs,this[_0x2e757d(0x138)]=null;}['_db'](){const _0x2f2e48=_0x282cc7;return this[_0x2f2e48(0x158)](),(!this[_0x2f2e48(0x138)]||this[_0x2f2e48(0x16e)]!==this[_0x2f2e48(0x1bc)])&&(this[_0x2f2e48(0x138)]=this[_0x2f2e48(0x1bc)][_0x2f2e48(0xff)](_0x14bfa0,{'dupSort':![]}),this[_0x2f2e48(0x16e)]=this['_rawDb']),this[_0x2f2e48(0x138)];}[_0x282cc7(0x229)](){const _0x1c9e8f=_0x282cc7;return this[_0x1c9e8f(0x158)](),(!this[_0x1c9e8f(0x2b5)]||this[_0x1c9e8f(0x257)]!==this[_0x1c9e8f(0x1bc)])&&(this[_0x1c9e8f(0x2b5)]=this[_0x1c9e8f(0x1bc)]['openDB'](_0x14bfa0+_0x1c9e8f(0x1f1),{'dupSort':![]}),this[_0x1c9e8f(0x257)]=this[_0x1c9e8f(0x1bc)]),this[_0x1c9e8f(0x2b5)];}[_0x282cc7(0x211)](){const _0x45d407=_0x282cc7,_0x343f52=this[_0x45d407(0x1bc)]?.['status'];return _0x343f52===_0x45d407(0x134)||_0x343f52==='closed';}[_0x282cc7(0x158)](){const _0xec0554=_0x282cc7;if(this['_closed']())throw new Error(_0xec0554(0x1ad));}[_0x282cc7(0x1c7)](_0x302049){return this['namespace']+':'+_0x302049;}[_0x282cc7(0x21a)](_0x46bad0){const _0x2bfc46=_0x282cc7;try{if(this[_0x2bfc46(0x211)]())return;_0x473a8f?this[_0x2bfc46(0x229)]()[_0x2bfc46(0x28f)](this[_0x2bfc46(0x1c7)](_0x46bad0),Date['now']()):this[_0x2bfc46(0x229)]()[_0x2bfc46(0x1bf)](this[_0x2bfc46(0x1c7)](_0x46bad0),Date[_0x2bfc46(0x1a7)]())?.[_0x2bfc46(0x255)]?.(()=>{});}catch{}}[_0x282cc7(0xd6)](_0x3fcc9a,_0x42778f=0x3e8){const _0x723041=_0x282cc7;try{const _0x46d5f6=this[_0x723041(0x229)]()['get'](this[_0x723041(0x1c7)](_0x3fcc9a));return typeof _0x46d5f6==='number'&&Date[_0x723041(0x1a7)]()-_0x46d5f6<_0x42778f;}catch{return![];}}[_0x282cc7(0x2b9)](_0xb3de3){const _0xcc072c=_0x282cc7,_0x555490=_0xb3de3[_0xcc072c(0xfa)]??_0xb3de3[_0xcc072c(0x10b)];return _0x555490+_0xb3de3[_0xcc072c(0x212)]<Date['now']();}static[_0x282cc7(0x240)](_0x5de783){const _0x25fa57=_0x282cc7,_0x3a39ee=_0x5de783?.[_0x25fa57(0x8a)];if(!_0x3a39ee||typeof _0x3a39ee[_0x25fa57(0x1c1)]!==_0x25fa57(0x153))return![];if(_0x3a39ee[_0x25fa57(0xd9)]!==_0x49b668['hostname']())return![];if(_0x3a39ee['pid']===process[_0x25fa57(0x1c1)])return![];try{return process[_0x25fa57(0x14b)](_0x3a39ee[_0x25fa57(0x1c1)],0x0),![];}catch(_0xdb362d){return _0xdb362d['code']===_0x25fa57(0x299);}}async['tryAcquire'](_0x2e6697,_0x4e207b={},_0x3cb67e={}){const _0x122fa9=_0x282cc7,_0xb6f198=this[_0x122fa9(0x1c7)](_0x2e6697),_0x3082ec=_0x3cb67e[_0x122fa9(0x212)]??this['ttlMs'],_0x5419ed=Date[_0x122fa9(0x1a7)](),_0x44d857={'holder':{'pid':process[_0x122fa9(0x1c1)],'hostname':_0x49b668[_0x122fa9(0xd9)](),..._0x4e207b},'acquiredAt':_0x5419ed,'updatedAt':_0x5419ed,'ttlMs':_0x3082ec};let _0x45bb66=![],_0x1a62f4=null;if(this['_closed']())return{'acquired':![],'handle':null,'current':null};try{const _0x8a9ded=()=>{const _0x4b1717=_0x122fa9,_0x520e3f=this[_0x4b1717(0x1d7)]()[_0x4b1717(0x10c)](_0xb6f198);if(_0x520e3f&&!this[_0x4b1717(0x2b9)](_0x520e3f)&&!_0x143055[_0x4b1717(0x240)](_0x520e3f)){const _0x1b4092=_0x4e207b[_0x4b1717(0x23c)]!=null&&_0x520e3f['holder']['pid']===process['pid']&&_0x520e3f[_0x4b1717(0x8a)][_0x4b1717(0x23c)]===_0x4e207b[_0x4b1717(0x23c)];if(!_0x1b4092){_0x45bb66=![],_0x1a62f4=_0x520e3f;return;}_0x44d857[_0x4b1717(0x10b)]<=_0x520e3f['acquiredAt']&&(_0x44d857[_0x4b1717(0x10b)]=_0x520e3f[_0x4b1717(0x10b)]+0x1,_0x44d857[_0x4b1717(0xfa)]=_0x44d857['acquiredAt']);}this[_0x4b1717(0x1d7)]()[_0x4b1717(0x1bf)](_0xb6f198,_0x44d857),_0x45bb66=!![],_0x1a62f4=_0x44d857;};if(_0x473a8f)this[_0x122fa9(0x1d7)]()[_0x122fa9(0x286)](_0x8a9ded);else await this['_db']()[_0x122fa9(0x119)](_0x8a9ded);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x45bb66)return{'acquired':![],'handle':null,'current':_0x1a62f4};const _0x21221c=new _0x38fcbd(this,_0xb6f198,_0x44d857['acquiredAt']);return _0x21221c['_startHeartbeat'](_0x3082ec,this[_0x122fa9(0x15c)]),{'acquired':!![],'handle':_0x21221c,'current':_0x1a62f4};}['inspect'](_0x3c365c){const _0x1a6d34=_0x282cc7;try{return this[_0x1a6d34(0x1d7)]()[_0x1a6d34(0x10c)](this[_0x1a6d34(0x1c7)](_0x3c365c))??null;}catch{return null;}}[_0x282cc7(0xc9)](){const _0x51d477=_0x282cc7,_0x2940d5=this[_0x51d477(0x2a4)]+':',_0x3a3a27=[];try{for(const {key:_0x3b6746,value:_0x5c1e33}of this['_db']()['getRange']({'start':_0x2940d5,'end':_0x2940d5+'\xff'})){typeof _0x3b6746===_0x51d477(0x1f5)&&_0x3b6746['startsWith'](_0x2940d5)&&_0x3a3a27['push']({'id':_0x3b6746[_0x51d477(0x219)](_0x2940d5[_0x51d477(0x202)]),'entry':_0x5c1e33});}}catch{}return _0x3a3a27;}static[_0x282cc7(0x20f)](_0x55114e){const _0x58f3be=_0x282cc7,_0x142b07=[];try{const _0x1519ba=_0x55114e[_0x58f3be(0xff)](_0x14bfa0,{'dupSort':![]});for(const {key:_0x5d8ce0,value:_0x464747}of _0x1519ba[_0x58f3be(0x1c6)]({})){if(typeof _0x5d8ce0!==_0x58f3be(0x1f5))continue;const _0x266d4d=_0x5d8ce0['indexOf'](':');if(_0x266d4d<0x1)continue;_0x142b07[_0x58f3be(0x206)]({'namespace':_0x5d8ce0['slice'](0x0,_0x266d4d),'id':_0x5d8ce0[_0x58f3be(0x219)](_0x266d4d+0x1),'entry':_0x464747});}}catch{}return _0x142b07;}}return okdbLock={'OKDBLock':_0x143055},okdbLock;}var version=_0xa5e620(0x19a),require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x468433=_0xa5e620;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x596be7=require$$0$3,_0x4c308f=require$$1$1,_0x82104=require$$2,{LOOP:_0x2a1fe2}=requireOkdbLoopMonitor(),{OKDBLock:_0x5bf68e}=requireOkdbLock(),{SYNC_COMMITS:_0x3a4305}=requireOkdbWriter(),_0x3e9705=_0x468433(0x24b),_0x1f2a53=_0x468433(0xbb),_0x432641=_0x468433(0x29a),_0x4e0e8d='~processes:cmd',_0x4b3643=(_0x17355e,_0xb6cae0)=>_0x17355e+':'+_0xb6cae0,_0x50f8d3=(_0x4c2f0b,_0x44d808)=>_0x4c2f0b+'::'+_0x44d808,_0x5bab41=(_0x5b2e60,_0x4dd641)=>_0x5b2e60+'/'+_0x4dd641,_0x5a2ed8=(_0x374b44,_0x497725)=>_0x374b44+'#'+_0x497725,_0x46d951=_0x1b7090=>{const _0x5156ee=_0x468433;if(_0x1b7090?.[_0x5156ee(0x20b)])return _0x1b7090[_0x5156ee(0x20b)];const _0xd112b9=_0x1b7090?.['nodeKey'];return typeof _0xd112b9===_0x5156ee(0x1f5)&&_0xd112b9[_0x5156ee(0x228)]('#')?_0xd112b9[_0x5156ee(0x219)](0x0,_0xd112b9[_0x5156ee(0x1e9)]('#')):_0xd112b9;},_0x37d55a=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x1b0310=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x410fca=_0x37d55a*0x3,_0x27c1a3=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x468433(0x293)](0x927c0,_0x410fca*0x14),_0x47f7c3=[_0x468433(0x18d),'processor:ready','processor:retry',_0x468433(0x195),_0x468433(0xc8),_0x468433(0x141)];let _0x14d4f4=null;function _0x53fc56(){const _0x218651=_0x468433;if(_0x14d4f4==null)_0x14d4f4=Math['round']((Date[_0x218651(0x1a7)]()-process[_0x218651(0x192)]()*0x3e8)/0x3e8)*0x3e8;return _0x14d4f4;}function _0x53a4d6(_0x1c6b9c){const _0x3660ac=_0x468433;if(process.env.OKDB_PROCESS_KILL===_0x3660ac(0xf3))return![];if(_0x1c6b9c?.[_0x3660ac(0x1b1)]?.[_0x3660ac(0xeb)]&&typeof _0x1c6b9c[_0x3660ac(0x1b1)]['processes']===_0x3660ac(0x14c)&&_0x1c6b9c[_0x3660ac(0x1b1)][_0x3660ac(0xeb)][_0x3660ac(0x14b)]===![])return![];return!![];}function _0x26c283(_0x4ba61b,_0x591d4e){const _0x180b42=_0x468433,_0x1d2565=!!_0x591d4e?.[_0x180b42(0x1ce)];switch(_0x4ba61b){case'primary':return{'controllable':_0x1d2565,'decommissionable':![],'killable':!![],'killConfirm':_0x180b42(0x2ab)};case _0x180b42(0x1ff):case _0x180b42(0x144):return{'controllable':_0x1d2565,'decommissionable':![],'killable':!![],'killConfirm':_0x180b42(0x238)};case _0x180b42(0x1fb):return{'controllable':![],'decommissionable':![],'killable':![]};case'http-server':case _0x180b42(0x1cd):case _0x180b42(0x1f7):case _0x180b42(0x12b):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':'force'};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x1f04cf{constructor(_0x408dae){const _0x4e6207=_0x468433;this['okdb']=_0x408dae,this[_0x4e6207(0xe3)]=null,this['_desired']=null,this['_desiredOverlay']=new Map(),this[_0x4e6207(0x2c3)]=null,this[_0x4e6207(0x222)]=![],this[_0x4e6207(0x1c9)]=![],this[_0x4e6207(0x297)]=_0x53fc56(),this[_0x4e6207(0x135)]=_0x4b3643(process['pid'],this[_0x4e6207(0x297)]),this[_0x4e6207(0x15f)]=_0x82104[_0x4e6207(0xe4)]()['slice'](0x0,0x8),this['_rowKey']=_0x5a2ed8(this[_0x4e6207(0x135)],this[_0x4e6207(0x15f)]),this['_startedAt']=Date['now'](),this[_0x4e6207(0x181)]=null,this[_0x4e6207(0x1ca)]=null,this[_0x4e6207(0x137)]=null,this[_0x4e6207(0x294)]=null,this[_0x4e6207(0x9a)]=null,this['_onTick']=null,this[_0x4e6207(0xa3)]=0x0,this[_0x4e6207(0x2a5)]={},this[_0x4e6207(0x15d)]=new Map(),this[_0x4e6207(0x155)]=process[_0x4e6207(0xa6)](),this['_lastCpuAt']=Date[_0x4e6207(0x1a7)](),this['_lastCpuPct']=0x0,this['_threadStats']=new Map();}get[_0x468433(0x263)](){const _0x5e47db=_0x468433;return this[_0x5e47db(0x135)];}get[_0x468433(0x1d0)](){return this['_rowKey'];}[_0x468433(0x85)](_0x3894c5,_0x41dc76){const _0x2c55e6=_0x468433,_0x3d5bf3=_0x26c283(_0x3894c5,_0x41dc76);if(_0x3d5bf3[_0x2c55e6(0x25a)]&&!_0x53a4d6(this[_0x2c55e6(0x2a9)]))return{..._0x3d5bf3,'killable':![],'killConfirm':undefined};return _0x3d5bf3;}[_0x468433(0x132)](){return!!this['_statusEnv'];}[_0x468433(0x1d8)](_0x3c8a59){const _0x1791ed=_0x468433;Object['assign'](this[_0x1791ed(0x2a5)],_0x3c8a59||{});}[_0x468433(0x277)](_0x1f56cd){const _0x1b719d=_0x468433;if(_0x1f56cd)this[_0x1b719d(0x137)]=_0x1f56cd;}[_0x468433(0x133)](_0xd23189={}){const _0x4deb86=_0x468433;return this['okdb'][_0x4deb86(0x1af)](_0xd23189);}[_0x468433(0x162)](){const _0x11aada=_0x468433,_0x94bf62={};let _0x566d5b=0x0,_0x3f0f0c=0x0;const _0x5cb8ac=new Set();for(const _0x2070b7 of this['listNodes']()){_0x3f0f0c++;const _0xe19bca=_0x2070b7[_0x11aada(0x2c7)];if(!_0xe19bca)continue;if(_0xe19bca[_0x11aada(0x1e8)])_0x566d5b++;for(const _0xd3cc80 of _0xe19bca[_0x11aada(0x1ce)]||[]){if(![_0x11aada(0xb4),_0x11aada(0xd5)][_0x11aada(0x228)](_0xd3cc80[_0x11aada(0xbc)]))continue;(_0xd3cc80[_0x11aada(0x16d)]===_0x11aada(0x1e4)||_0xd3cc80[_0x11aada(0x16d)]===_0x11aada(0x22d))&&_0xd3cc80['cursorKey']&&_0x5cb8ac[_0x11aada(0x1f0)]((_0xd3cc80['env']||_0x11aada(0x209))+':'+_0xd3cc80[_0x11aada(0x1c4)]);const _0x22c7ed=_0xd3cc80['env']||_0x11aada(0x209);(_0x94bf62[_0x22c7ed]||=[])[_0x11aada(0x206)]({..._0xd3cc80,'env':_0x22c7ed,'owner':{'pid':_0x2070b7['pid']??null,'kind':_0x2070b7[_0x11aada(0x194)]??null}});}}for(const [_0x129b29,_0x3826f3]of Object[_0x11aada(0x157)](_0x94bf62)){for(const _0x27209a of _0x3826f3){if(_0x27209a['mode']==='single'&&!_0x27209a[_0x11aada(0xed)]){const _0xddee0b=_0x129b29+':'+(_0x27209a['cursorKey']??'');if(!_0x5cb8ac[_0x11aada(0x274)](_0xddee0b))_0x27209a['unclaimed']=!![];}}}return{'envs':_0x94bf62,'policy':null,'participation':{'participating':_0x566d5b,'total':_0x3f0f0c},'source':_0x11aada(0xb9)};}[_0x468433(0xe8)](){const _0xcbd480=_0x468433,_0x1ecce8=_0x35f9eb=>{const _0x31ea2c=_0x70ef;if(_0x35f9eb[_0x31ea2c(0x16d)]===_0x31ea2c(0x1e4)||_0x35f9eb[_0x31ea2c(0x16d)]==='building'||_0x35f9eb[_0x31ea2c(0x16d)]===_0x31ea2c(0x110))return 0x3;if(_0x35f9eb[_0x31ea2c(0xed)])return 0x1;return 0x2;},_0x25420c=new Map();for(const _0x3be3ac of this[_0xcbd480(0x16c)]()){for(const _0x93cc4e of _0x3be3ac[_0xcbd480(0x2c7)]?.[_0xcbd480(0x1ce)]||[]){const _0x47ab95={..._0x93cc4e,'owner':{'pid':_0x3be3ac['pid']??null,'kind':_0x3be3ac[_0xcbd480(0x194)]??null,'host':_0x3be3ac[_0xcbd480(0x199)]??null}},_0x1af738=_0x93cc4e['mode']==='single'?_0xcbd480(0x2ac)+(_0x93cc4e[_0xcbd480(0x11d)]??'')+'::'+(_0x93cc4e[_0xcbd480(0x1c4)]??_0x93cc4e[_0xcbd480(0x15a)]??_0x93cc4e['id']):'inst:'+(_0x3be3ac['nodeKey']??_0x3be3ac[_0xcbd480(0x20b)]??'')+'::'+(_0x93cc4e['env']??'')+'::'+_0x93cc4e['id'],_0x3d31f2=_0x25420c[_0xcbd480(0x10c)](_0x1af738);if(!_0x3d31f2||_0x1ecce8(_0x47ab95)>_0x1ecce8(_0x3d31f2))_0x25420c[_0xcbd480(0x198)](_0x1af738,_0x47ab95);}}return[..._0x25420c[_0xcbd480(0x179)]()];}[_0x468433(0x217)](){const _0x23a44b=_0x468433,_0x2b8899=Date['now'](),_0x2684dd=this['listNodes'](),_0x512197=_0x4716a7=>Math['max'](0x0,Math[_0x23a44b(0x92)]((_0x2b8899-(_0x4716a7[_0x23a44b(0x12c)]||_0x2b8899))/0x3e8)),_0x3098ef=_0x2684dd[_0x23a44b(0x121)](_0x37ce2b=>_0x37ce2b['kind']===_0x23a44b(0x11f)),_0x324361=_0x2684dd[_0x23a44b(0xda)](_0x18a890=>_0x18a890[_0x23a44b(0x194)]===_0x23a44b(0x268));if(_0x3098ef||_0x324361[_0x23a44b(0x202)])return{'primary':_0x3098ef?{'pid':_0x3098ef[_0x23a44b(0x1c1)],'uptime':_0x512197(_0x3098ef)}:null,'workers':_0x324361[_0x23a44b(0xcc)](_0x4ffc02=>({'pid':_0x4ffc02[_0x23a44b(0x1c1)],'uptime':_0x512197(_0x4ffc02)})),'workersConfigured':_0x3098ef?.[_0x23a44b(0x9d)]?.[_0x23a44b(0x276)]??_0x324361[_0x23a44b(0x202)],'mode':'cluster'};const _0x4eb923=_0x2684dd['find'](_0x460bde=>_0x460bde[_0x23a44b(0x194)]==='cli'||_0x460bde[_0x23a44b(0x194)]===_0x23a44b(0x144)||_0x460bde[_0x23a44b(0x194)]===_0x23a44b(0x1fb)),_0xc642bb=_0x4eb923?{'pid':_0x4eb923[_0x23a44b(0x1c1)],'uptime':_0x512197(_0x4eb923)}:{'pid':process['pid'],'uptime':Math[_0x23a44b(0x293)](0x0,Math['round'](process[_0x23a44b(0x192)]()))};return{'primary':_0xc642bb,'workers':[_0xc642bb],'workersConfigured':0x1,'mode':_0x23a44b(0xb4)};}[_0x468433(0x244)](){const _0x530d9c=_0x468433;return this[_0x530d9c(0x93)]();}['treeView'](){const _0x3f843f=_0x468433,_0x34dd30=new Map();for(const _0x59f8e2 of this[_0x3f843f(0x93)]())_0x34dd30[_0x3f843f(0x198)](_0x59f8e2[_0x3f843f(0x20b)],{..._0x59f8e2,'children':[]});const _0x34434e=[];for(const _0x1f2b4d of _0x34dd30['values']()){const _0x15b797=_0x1f2b4d['supervisorKey']?_0x34dd30[_0x3f843f(0x10c)](_0x1f2b4d[_0x3f843f(0x22c)]):null;if(_0x15b797&&_0x15b797!==_0x1f2b4d)_0x15b797[_0x3f843f(0x159)][_0x3f843f(0x206)](_0x1f2b4d);else _0x34434e['push'](_0x1f2b4d);}const _0x2bde8a=(_0x4545ba,_0x59238b)=>_0x4545ba[_0x3f843f(0x194)]===_0x59238b['kind']?(_0x4545ba['pid']||0x0)-(_0x59238b['pid']||0x0):(_0x4545ba['kind']??'')<(_0x59238b[_0x3f843f(0x194)]??'')?-0x1:0x1,_0x2cf9e4=_0x25f110=>{const _0x2772e0=_0x3f843f;_0x25f110[_0x2772e0(0x117)](_0x2bde8a);for(const _0x18f034 of _0x25f110)if(_0x18f034[_0x2772e0(0x159)][_0x2772e0(0x202)])_0x2cf9e4(_0x18f034['children']);};return _0x2cf9e4(_0x34434e),_0x34434e;}[_0x468433(0x104)](_0x4e1efb){const _0x368092=_0x468433;return this['_groupByProcess']()[_0x368092(0x121)](_0x3ad231=>_0x3ad231[_0x368092(0x20b)]===_0x4e1efb)??null;}['_groupByProcess'](_0x2a8292=Date[_0x468433(0x1a7)]()){const _0x4dbf84=_0x468433,_0x37ff39=new Map();for(const _0x4dc62f of this[_0x4dbf84(0x16c)]()){const _0x4ad93e=_0x46d951(_0x4dc62f);let _0x224fa0=_0x37ff39[_0x4dbf84(0x10c)](_0x4ad93e);!_0x224fa0&&(_0x224fa0={'processKey':_0x4ad93e,'nodeKey':_0x4ad93e,'pid':_0x4dc62f[_0x4dbf84(0x1c1)],'ppid':_0x4dc62f[_0x4dbf84(0x298)]??null,'host':_0x4dc62f[_0x4dbf84(0x199)]??null,'kind':_0x4dc62f[_0x4dbf84(0x194)],'role':null,'supervisorKey':_0x4dc62f[_0x4dbf84(0x22c)]??null,'slot':_0x4dc62f[_0x4dbf84(0x12e)]??null,'slotKey':_0x4dc62f[_0x4dbf84(0x215)]??null,'caps':_0x4dc62f[_0x4dbf84(0x247)]??null,'lifecycle':_0x4dc62f[_0x4dbf84(0x2c8)]??null,'uptime':Math[_0x4dbf84(0x293)](0x0,Math[_0x4dbf84(0x92)]((_0x2a8292-(_0x4dc62f[_0x4dbf84(0x12c)]||_0x2a8292))/0x3e8)),'startedAt':_0x4dc62f[_0x4dbf84(0x12c)]??null,'meta':_0x4dc62f[_0x4dbf84(0x9d)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x37ff39[_0x4dbf84(0x198)](_0x4ad93e,_0x224fa0));_0x224fa0[_0x4dbf84(0x126)][_0x4dbf84(0x206)]({'instanceId':_0x4dc62f[_0x4dbf84(0x161)]??null,'role':_0x4dc62f[_0x4dbf84(0x27c)]??null,'listenAddr':_0x4dc62f[_0x4dbf84(0xf9)]??null,'lifecycle':_0x4dc62f['lifecycle']??null,'processing':_0x4dc62f[_0x4dbf84(0x2c7)]??null});if(!_0x224fa0[_0x4dbf84(0x27c)]&&_0x4dc62f['role'])_0x224fa0[_0x4dbf84(0x27c)]=_0x4dc62f['role'];if(!_0x224fa0[_0x4dbf84(0xf9)]&&_0x4dc62f[_0x4dbf84(0xf9)])_0x224fa0[_0x4dbf84(0xf9)]=_0x4dc62f[_0x4dbf84(0xf9)];if(!_0x224fa0['processing']&&_0x4dc62f[_0x4dbf84(0x2c7)])_0x224fa0['processing']=_0x4dc62f[_0x4dbf84(0x2c7)];if(!_0x224fa0['engines']&&_0x4dc62f['engines'])_0x224fa0[_0x4dbf84(0xa0)]=_0x4dc62f['engines'];if(!_0x224fa0['singletonClaims']&&_0x4dc62f[_0x4dbf84(0x1bd)])_0x224fa0[_0x4dbf84(0x1bd)]=_0x4dc62f[_0x4dbf84(0x1bd)];if(_0x224fa0[_0x4dbf84(0x247)]==null&&_0x4dc62f['caps'])_0x224fa0[_0x4dbf84(0x247)]=_0x4dc62f[_0x4dbf84(0x247)];if(_0x4dc62f[_0x4dbf84(0x2b4)]&&(!_0x224fa0[_0x4dbf84(0x2b4)]||(_0x4dc62f[_0x4dbf84(0x2b4)]['at']??0x0)>(_0x224fa0[_0x4dbf84(0x2b4)]['at']??0x0)))_0x224fa0[_0x4dbf84(0x2b4)]=_0x4dc62f[_0x4dbf84(0x2b4)];}return[..._0x37ff39[_0x4dbf84(0x179)]()];}[_0x468433(0x156)](){const _0x2e31a9=_0x468433,_0x2b6221=[],_0x6d5cb={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x1f0697 of this[_0x2e31a9(0x93)]()){_0x2b6221[_0x2e31a9(0x206)]({'processKey':_0x1f0697['processKey'],'kind':_0x1f0697[_0x2e31a9(0x194)],'pid':_0x1f0697[_0x2e31a9(0x1c1)],'supervisorKey':_0x1f0697[_0x2e31a9(0x22c)],'meta':_0x1f0697[_0x2e31a9(0x9d)]??null,'uptime':_0x1f0697[_0x2e31a9(0x192)],'stats':_0x1f0697[_0x2e31a9(0x2b4)]??null}),_0x6d5cb[_0x2e31a9(0xeb)]++;if(_0x1f0697['stats']){_0x6d5cb[_0x2e31a9(0x108)]+=_0x1f0697['stats'][_0x2e31a9(0x108)]||0x0,_0x6d5cb[_0x2e31a9(0x21d)]+=(_0x1f0697[_0x2e31a9(0x2b4)][_0x2e31a9(0x21d)]||0x0)+(_0x1f0697[_0x2e31a9(0x2b4)]['threads']?.[_0x2e31a9(0x21d)]||0x0);const _0x2ff0b8=_0x1f0697[_0x2e31a9(0x2b4)]['threads'];_0x2ff0b8&&(_0x6d5cb[_0x2e31a9(0x1b0)][_0x2e31a9(0x1e1)]+=_0x2ff0b8[_0x2e31a9(0x1e1)]||0x0,_0x6d5cb[_0x2e31a9(0x1b0)][_0x2e31a9(0x1f8)]+=_0x2ff0b8[_0x2e31a9(0x1f8)]||0x0,_0x6d5cb[_0x2e31a9(0x1b0)]['busy']+=_0x2ff0b8[_0x2e31a9(0x14a)]||0x0);}}return{'totals':_0x6d5cb,'nodes':_0x2b6221};}async[_0x468433(0x1cb)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x1cc9ba=_0x468433;this[_0x1cc9ba(0x222)]=this[_0x1cc9ba(0x222)]||!!writer,this[_0x1cc9ba(0x1c9)]=this[_0x1cc9ba(0x1c9)]||!!reader,this[_0x1cc9ba(0x181)]=kind||this[_0x1cc9ba(0x181)]||(_0x4c308f[_0x1cc9ba(0x172)]?_0x1cc9ba(0x268):'cli'),this[_0x1cc9ba(0x1ca)]=supervisorKey??this[_0x1cc9ba(0x1ca)],this['_listenAddr']=listenAddr??this[_0x1cc9ba(0x137)],this[_0x1cc9ba(0x16b)](),await this[_0x1cc9ba(0x196)]();if(!writer&&!reader)return null;if(!this[_0x1cc9ba(0xe3)]){const _0x3b750a=await this[_0x1cc9ba(0x2a9)][_0x1cc9ba(0x183)](_0x3e9705,{'sync':![],'durability':_0x1cc9ba(0xdd)});await _0x3b750a['ensureType'](_0x1f2a53),this['_statusEnv']=_0x3b750a;}return this['_statusEnv'];}[_0x468433(0x185)](){const _0x23d6fb=_0x468433;return this[_0x23d6fb(0x10f)]!==this[_0x23d6fb(0xe3)]&&(this[_0x23d6fb(0x10f)]=this[_0x23d6fb(0xe3)],this[_0x23d6fb(0x1b8)]=this[_0x23d6fb(0xe3)][_0x23d6fb(0xbd)](_0x1f2a53)['data']),this[_0x23d6fb(0x1b8)];}[_0x468433(0x12a)](_0x3c699d){const _0xd04502=_0x468433;if(_0x3a4305)return this[_0xd04502(0x185)]()[_0xd04502(0x28f)](_0x3c699d[_0xd04502(0x125)],_0x3c699d,0x1);const _0x454a4d=this[_0xd04502(0x185)]()[_0xd04502(0x1bf)](_0x3c699d[_0xd04502(0x125)],_0x3c699d,0x1);if(_0x454a4d&&typeof _0x454a4d['then']===_0xd04502(0xc0))_0x454a4d['then'](undefined,()=>{});return _0x454a4d;}[_0x468433(0x295)](_0x179d00){const _0x543628=_0x468433;return this[_0x543628(0x185)]()[_0x543628(0x28f)](_0x179d00['nodeKey'],_0x179d00,0x1);}[_0x468433(0x20d)](_0x3611d3){const _0x3ae8fe=_0x468433;if(_0x3a4305)try{return this['_nodeDb']()['removeSync'](_0x3611d3);}catch{return![];}const _0x5cde65=this[_0x3ae8fe(0x185)]()[_0x3ae8fe(0x21b)](_0x3611d3);if(_0x5cde65&&typeof _0x5cde65[_0x3ae8fe(0x15b)]==='function')_0x5cde65[_0x3ae8fe(0x15b)](undefined,()=>{});return _0x5cde65;}async['putNode'](_0x1706c1){const _0x182c12=_0x468433;if(!this[_0x182c12(0xe3)]||!this[_0x182c12(0x222)]||!_0x1706c1?.['nodeKey'])return;return this[_0x182c12(0x12a)](_0x1706c1);}async[_0x468433(0x18e)](_0x1fd67d){const _0x27f8b4=_0x468433;if(!this['_statusEnv']||!this[_0x27f8b4(0x222)]||!_0x1fd67d)return;const _0x5f2896=_0x1fd67d['includes']('#'),_0x57a1de=[];for(const {key:_0x5e0299}of this[_0x27f8b4(0xe3)][_0x27f8b4(0x1c6)](_0x1f2a53)){if(_0x5e0299===_0x1fd67d||!_0x5f2896&&typeof _0x5e0299===_0x27f8b4(0x1f5)&&_0x5e0299[_0x27f8b4(0xf0)](_0x1fd67d+'#'))_0x57a1de[_0x27f8b4(0x206)](_0x5e0299);}for(const _0x12f6a1 of _0x57a1de){try{this[_0x27f8b4(0x185)]()[_0x27f8b4(0xd1)](_0x12f6a1);}catch{}}}[_0x468433(0x203)](_0x574772){const _0xf1c9cd=_0x468433;if(typeof _0x574772?.['pid']!==_0xf1c9cd(0x153))return![];if(_0x574772[_0xf1c9cd(0x199)]!==_0x596be7[_0xf1c9cd(0xd9)]())return![];if(_0x574772[_0xf1c9cd(0x1c1)]===process['pid'])return![];if(_0x574772[_0xf1c9cd(0x17f)]!=null&&_0x574772[_0xf1c9cd(0x17f)]<Date[_0xf1c9cd(0x1a7)]()-_0x27c1a3)return!![];try{return process[_0xf1c9cd(0x14b)](_0x574772[_0xf1c9cd(0x1c1)],0x0),![];}catch(_0x2cfcd6){return _0x2cfcd6[_0xf1c9cd(0x1be)]===_0xf1c9cd(0x299);}}[_0x468433(0x16c)](){const _0x4666ca=_0x468433;if(!this['_statusEnv'])return[];try{this['_statusEnv']['db']?.[_0x4666ca(0x253)]?.();}catch{}const _0x17c6fa=Date[_0x4666ca(0x1a7)](),_0x2007e1=_0x596be7[_0x4666ca(0xd9)](),_0x159afd=[];for(const {value:_0x3084de}of this[_0x4666ca(0xe3)][_0x4666ca(0x1c6)](_0x1f2a53)){if(!_0x3084de)continue;let _0x3f12e3=null;_0x3084de[_0x4666ca(0x199)]===_0x2007e1&&typeof _0x3084de[_0x4666ca(0x1c1)]===_0x4666ca(0x153)&&(_0x3f12e3=!this['_nodeDead'](_0x3084de));if(_0x3f12e3===![])continue;const _0x1039ca=_0x3084de[_0x4666ca(0x17f)]==null||_0x3084de['expiresAt']>=_0x17c6fa;if(_0x3f12e3===!![]||_0x1039ca)_0x159afd['push'](_0x3084de);}return _0x159afd;}async[_0x468433(0x291)](_0x1f48a6=0x0){const _0x267695=_0x468433;if(!this['_statusEnv']||!this[_0x267695(0x222)])return;const _0x3f43c5=Date['now']()-_0x1f48a6,_0x1a8ff8=new Set(),_0xec2674=[],_0xabc629=_0x596be7[_0x267695(0xd9)](),_0x4488e8=require$$6[_0x267695(0xf6)];for(const {key:_0x4d5a5e,value:_0x49e74c}of this['_statusEnv'][_0x267695(0x1c6)](_0x1f2a53)){if(!_0x49e74c)continue;const _0x2dd2d4=_0x49e74c[_0x267695(0x199)]===_0xabc629&&typeof _0x49e74c[_0x267695(0x1c1)]===_0x267695(0x153),_0x55103a=_0x2dd2d4?this[_0x267695(0x203)](_0x49e74c):_0x49e74c[_0x267695(0x17f)]!=null&&_0x49e74c['expiresAt']<_0x3f43c5;if(_0x55103a)_0xec2674['push'](_0x4d5a5e);else{_0x1a8ff8['add'](_0x46d951(_0x49e74c)??_0x4d5a5e);if(_0x49e74c[_0x267695(0xf6)]&&_0x49e74c[_0x267695(0xf6)]!==_0x4488e8){if(!this[_0x267695(0xe5)])this['_versionSkewWarned']=new Set();!this['_versionSkewWarned'][_0x267695(0x274)](_0x49e74c[_0x267695(0xf6)])&&(this['_versionSkewWarned'][_0x267695(0x1f0)](_0x49e74c[_0x267695(0xf6)]),this['okdb'][_0x267695(0x88)]?.[_0x267695(0xdb)]?.(_0x267695(0xb2)+(_0x49e74c['pid']??'?')+_0x267695(0xb1)+_0x49e74c[_0x267695(0xf6)]+'\x20while\x20this\x20process\x20runs\x20'+_0x4488e8+'\x20—\x20'+_0x267695(0x17e),{'feature':_0x267695(0x213)}));}}}for(const _0x47208c of _0xec2674)this[_0x267695(0x20d)](_0x47208c);if(this[_0x267695(0x16b)]()){const _0x4b9868=[];for(const {key:_0x42c794}of this[_0x267695(0x1f6)](_0x267695(0xbb))){if(!_0x1a8ff8[_0x267695(0x274)](_0x42c794)){if(_0x3a4305)try{this['_desired'][_0x267695(0xd1)](_0x267695(0x24f)+_0x42c794);}catch{}else _0x4b9868[_0x267695(0x206)](this['_desired'][_0x267695(0x21b)](_0x267695(0x24f)+_0x42c794));}}if(_0x4b9868[_0x267695(0x202)])await Promise['allSettled'](_0x4b9868);}}[_0x468433(0x287)](_0x1fa9d2=null){const _0x23aa61=_0x468433;if(this[_0x23aa61(0x294)])return;if(!this[_0x23aa61(0x222)]||!this[_0x23aa61(0xe3)]){this['okdb']?.['log']?.[_0x23aa61(0xdb)]?.(_0x23aa61(0x142)+this['_isWriter']+_0x23aa61(0x278)+!!this[_0x23aa61(0xe3)]+_0x23aa61(0x128),{'feature':_0x23aa61(0xeb)});return;}this[_0x23aa61(0x1d4)]=_0x1fa9d2,this[_0x23aa61(0x9a)]=()=>this[_0x23aa61(0xc7)]();for(const _0x451c9c of _0x47f7c3)this['okdb'][_0x23aa61(0x234)]['on'](_0x451c9c,this[_0x23aa61(0x9a)]);this['_publishNow']();const _0x4bd653=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x37d55a;this[_0x23aa61(0x294)]=setInterval(()=>{const _0x3e5a0f=_0x23aa61;if(this['_onTick'])try{this[_0x3e5a0f(0x1d4)]();}catch{}this[_0x3e5a0f(0x25b)](),this[_0x3e5a0f(0x291)]()[_0x3e5a0f(0x255)](()=>{});},_0x4bd653);if(this[_0x23aa61(0x294)][_0x23aa61(0x187)])this[_0x23aa61(0x294)]['unref']();}[_0x468433(0xc7)](){const _0x5287ca=_0x468433;if(!this['_isWriter']||!this[_0x5287ca(0xe3)])return;if(Date['now']()-this['_lastPublishAt']<_0x1b0310)return;this[_0x5287ca(0x25b)]();}[_0x468433(0x25b)](){const _0x5f0985=_0x468433;if(!this[_0x5f0985(0x222)]||!this[_0x5f0985(0xe3)])return;this[_0x5f0985(0xa3)]=Date[_0x5f0985(0x1a7)]();try{const _0x4dfd4a=[this[_0x5f0985(0x95)]()];for(const _0xce78a6 of this[_0x5f0985(0x15d)]['values']())_0x4dfd4a[_0x5f0985(0x206)](this['_buildChildRow'](_0xce78a6));const _0x4ba99b=_0x2a1fe2[_0x5f0985(0x1a6)]?_0x2a1fe2[_0x5f0985(0x1a7)]():0x0;for(const _0x1cb682 of _0x4dfd4a){try{this[_0x5f0985(0x295)](_0x1cb682),this[_0x5f0985(0x106)]=![];}catch(_0x27d4bf){!this[_0x5f0985(0x106)]&&(this[_0x5f0985(0x106)]=!![],this[_0x5f0985(0x2a9)]?.['log']?.[_0x5f0985(0xdb)]?.(_0x5f0985(0x292)+_0x27d4bf[_0x5f0985(0x28a)],{'feature':_0x5f0985(0xeb)}));}}if(_0x2a1fe2[_0x5f0985(0x1a6)])_0x2a1fe2[_0x5f0985(0xf1)](_0x5f0985(0x12f),_0x2a1fe2[_0x5f0985(0x1a7)]()-_0x4ba99b,_0x5f0985(0x123)+_0x4dfd4a[_0x5f0985(0x202)]+_0x5f0985(0x20a));}catch(_0x54e24e){!this[_0x5f0985(0x106)]&&(this[_0x5f0985(0x106)]=!![],this[_0x5f0985(0x2a9)]?.[_0x5f0985(0x88)]?.[_0x5f0985(0xdb)]?.('registry\x20publish\x20failing:\x20'+_0x54e24e['message'],{'feature':'processes'}));}}async[_0x468433(0x261)](){const _0x556ff5=_0x468433;if(this[_0x556ff5(0x9a)]){for(const _0x19fe99 of _0x47f7c3){try{this['okdb'][_0x556ff5(0x234)][_0x556ff5(0xf3)](_0x19fe99,this[_0x556ff5(0x9a)]);}catch{}}this[_0x556ff5(0x9a)]=null;}this['_hbTimer']&&(clearInterval(this[_0x556ff5(0x294)]),this[_0x556ff5(0x294)]=null);try{if(this['_statusEnv']&&this[_0x556ff5(0x222)])await this[_0x556ff5(0x18e)](this[_0x556ff5(0x2b0)]);}catch{}}async['deregisterSelf'](){const _0x4ea4fe=_0x468433;if(!this[_0x4ea4fe(0xe3)]||!this[_0x4ea4fe(0x222)])return;try{await this['removeNode'](this['_rowKey']);}catch{}try{const _0xdcae56=[];for(const {value:_0x313dd0}of this['_statusEnv'][_0x4ea4fe(0x1c6)](_0x1f2a53)){if(_0x313dd0?.['ppid']===process[_0x4ea4fe(0x1c1)]&&_0x313dd0[_0x4ea4fe(0x125)])_0xdcae56[_0x4ea4fe(0x206)](_0x313dd0['nodeKey']);}for(const _0x2e7e29 of _0xdcae56){try{await this['removeNode'](_0x2e7e29);}catch{}}}catch{}}async['publishOwnRow'](){const _0x595c8b=_0x468433;return this[_0x595c8b(0x262)](this[_0x595c8b(0x95)]());}async[_0x468433(0xa5)](_0x435459){const _0x5a09e4=_0x468433;if(!this[_0x5a09e4(0xe3)]||!this[_0x5a09e4(0x222)])return;return this[_0x5a09e4(0x262)](this[_0x5a09e4(0x216)](_0x435459));}['_buildChildRow']({pid:_0x226f28,startedAt:_0x40cf6d,kind:_0x53ae26,supervisorKey:_0x5acbd9,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x468433(0x190),meta:meta=null,stats:stats=null}){const _0x3f1b58=_0x468433,_0x55647a=Date[_0x3f1b58(0x1a7)](),_0x40fbd4=_0x4b3643(_0x226f28,_0x40cf6d);return{'nodeKey':_0x5a2ed8(_0x40fbd4,'0'),'processKey':_0x40fbd4,'instanceId':'0','pid':_0x226f28,'startedAt':_0x40cf6d,'ppid':process[_0x3f1b58(0x1c1)],'host':_0x596be7[_0x3f1b58(0xd9)](),'supervisorKey':_0x5acbd9,'slot':slot,'slotKey':slotKey,'kind':_0x53ae26,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x55647a,'expiresAt':_0x55647a+_0x410fca,'caps':this[_0x3f1b58(0x85)](_0x53ae26,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async['addSupervisedChild'](_0x284f0d){const _0x263c2b=_0x468433;if(!_0x284f0d?.[_0x263c2b(0x1c1)])return null;const _0x4ba729=_0x4b3643(_0x284f0d[_0x263c2b(0x1c1)],_0x284f0d[_0x263c2b(0x12c)]);this[_0x263c2b(0x15d)]['set'](_0x4ba729,{..._0x284f0d,'supervisorKey':_0x284f0d[_0x263c2b(0x22c)]??this[_0x263c2b(0x135)]});if(this[_0x263c2b(0x222)])await this[_0x263c2b(0xa5)](this[_0x263c2b(0x15d)]['get'](_0x4ba729))['catch']?.(()=>{});return _0x4ba729;}['removeSupervisedChild'](_0x2754f8){const _0x576e41=_0x468433;if(!_0x2754f8)return;return this[_0x576e41(0x15d)][_0x576e41(0x200)](_0x2754f8),this[_0x576e41(0x18e)](_0x2754f8);}['_sampleOwnStats'](){const _0xefab88=_0x468433,_0x3264e7=Date[_0xefab88(0x1a7)](),_0x52d41d=process[_0xefab88(0xa6)](),_0x5cd8f6=(_0x3264e7-this['_lastCpuAt'])*0x3e8;if(_0x5cd8f6>=0x3d090){const _0x17098e=_0x52d41d['user']-this[_0xefab88(0x155)][_0xefab88(0x191)]+(_0x52d41d[_0xefab88(0x1fe)]-this[_0xefab88(0x155)]['system']),_0x127786=_0x596be7[_0xefab88(0x201)]()[_0xefab88(0x202)]||0x1;this[_0xefab88(0x23d)]=Math[_0xefab88(0x17b)](0x64,Math[_0xefab88(0x92)](_0x17098e/(_0x5cd8f6*_0x127786)*0x64)),this[_0xefab88(0x130)]=Math[_0xefab88(0x92)](_0x5cd8f6/0x3e8),this[_0xefab88(0x155)]=_0x52d41d,this['_lastCpuAt']=_0x3264e7;}const _0xbd87b2=process['memoryUsage'](),_0x4ba1c0=this[_0xefab88(0x1ed)][_0xefab88(0x2c4)];let _0x281936=0x0;if(_0x4ba1c0>0x0){const _0x5ede69=[this['okdb'],...this[_0xefab88(0x2a9)][_0xefab88(0x24d)]?.['values']?.()??[]];for(const _0x14b363 of _0x5ede69){const _0x218c79=_0x14b363['functions']?.[_0xefab88(0x86)];if(_0x218c79)_0x281936+=_0x218c79['liveThreadStats'][_0xefab88(0x14a)];}}let _0x1d27f6=null;const _0x446c17=_0x4ba1c0;if(_0x446c17>0x0){let _0x2ab9bb=0x0;for(const _0x3d40f9 of this[_0xefab88(0x1ed)]['values']())_0x2ab9bb+=_0x3d40f9[_0xefab88(0x21d)]||0x0;_0x1d27f6={'count':_0x446c17,'heapUsed':_0x2ab9bb,'sandbox':_0x4ba1c0,'busy':_0x281936};}return{'rss':_0xbd87b2[_0xefab88(0x108)],'heapUsed':_0xbd87b2['heapUsed'],'heapTotal':_0xbd87b2['heapTotal'],'external':_0xbd87b2[_0xefab88(0xad)],'cpuPct':this[_0xefab88(0x23d)],'cpuWindowMs':this['_lastCpuWindowMs']??null,'threads':_0x1d27f6,'at':_0x3264e7};}[_0x468433(0xb0)](_0x58979e,_0x2f19cc){const _0x2323dd=_0x468433;if(!_0x58979e||!_0x2f19cc)return;this[_0x2323dd(0x1ed)][_0x2323dd(0x198)](_0x58979e,_0x2f19cc);}[_0x468433(0xfe)](_0x3e7dbe){const _0x2919cc=_0x468433;this[_0x2919cc(0x1ed)][_0x2919cc(0x200)](_0x3e7dbe);}[_0x468433(0x1e0)](_0x16dbb3,_0x4dd8f8,_0x23f17b=undefined){const _0x587a24=_0x468433,_0x1973aa=this['_children']['get'](_0x16dbb3);if(!_0x1973aa||!_0x4dd8f8)return;if(_0x23f17b!==undefined)_0x1973aa[_0x587a24(0x2c7)]=_0x23f17b;_0x1973aa[_0x587a24(0x2b4)]={'rss':_0x4dd8f8['rss']??null,'heapUsed':_0x4dd8f8[_0x587a24(0x21d)]??null,'heapTotal':_0x4dd8f8['heapTotal']??null,'external':_0x4dd8f8['external']??null,'cpuPct':_0x4dd8f8['cpuPct']??null,'cpuWindowMs':_0x4dd8f8[_0x587a24(0x2b6)]??null,'threads':_0x4dd8f8[_0x587a24(0x1b0)]??null,'claims':_0x4dd8f8[_0x587a24(0x14e)]??null,'envsOpen':_0x4dd8f8['envsOpen']??null,'at':Date[_0x587a24(0x1a7)]()};}['_buildOwnRow'](){const _0x1ee60f=_0x468433,_0x55116b=Date['now'](),_0x3d6fe7=this[_0x1ee60f(0x2a9)][_0x1ee60f(0xec)]||{},_0x3ce3d6=this[_0x1ee60f(0x181)]||_0x1ee60f(0x1ff);return{'nodeKey':this['_rowKey'],'processKey':this[_0x1ee60f(0x135)],'instanceId':this[_0x1ee60f(0x15f)],'pid':process['pid'],'startedAt':this[_0x1ee60f(0x297)],'instanceStartedAt':this['_startedAt'],'ppid':typeof process[_0x1ee60f(0x298)]===_0x1ee60f(0x153)?process[_0x1ee60f(0x298)]:null,'host':_0x596be7[_0x1ee60f(0xd9)](),'supervisorKey':this[_0x1ee60f(0x1ca)]??null,'version':require$$6[_0x1ee60f(0xf6)],'kind':_0x3ce3d6,'role':{'engines':!!_0x3d6fe7[_0x1ee60f(0xa0)],'processors':!!_0x3d6fe7['processors'],'compaction':_0x3d6fe7['compaction'],'http':_0x3d6fe7[_0x1ee60f(0x107)]},'listenAddr':this[_0x1ee60f(0x137)]??null,'heartbeatAt':_0x55116b,'expiresAt':_0x55116b+_0x410fca,'caps':this['_caps'](_0x3ce3d6,_0x3d6fe7),'lifecycle':{'state':_0x1ee60f(0x190),'desiredVersionApplied':null},'meta':{...this[_0x1ee60f(0x2a5)]},'processing':_0x3d6fe7[_0x1ee60f(0x1ce)]?this['_buildProcessingFacet']():null,'engines':_0x3d6fe7[_0x1ee60f(0xa0)]?[...this[_0x1ee60f(0x2a9)][_0x1ee60f(0xce)]??[]]:null,'singletonClaims':this[_0x1ee60f(0x289)](),'stats':this[_0x1ee60f(0x10a)](),'writers':this[_0x1ee60f(0x1a8)]()};}[_0x468433(0x1a8)](){const _0x3c57a3=_0x468433,_0x14da2d={};try{for(const [_0x4d0e79,_0x55e8e2]of this['okdb'][_0x3c57a3(0x24d)]){try{const _0x10457a=_0x55e8e2['writerStatus']?.();if(!_0x10457a)continue;if(!_0x10457a[_0x3c57a3(0x2b1)]&&!_0x10457a[_0x3c57a3(0x1e6)]&&!(_0x10457a['parkedNow']??0x0)&&!_0x10457a[_0x3c57a3(0x87)])continue;_0x14da2d[_0x4d0e79]={'depth':_0x10457a[_0x3c57a3(0x2b1)],'oldestPendingMs':_0x10457a[_0x3c57a3(0x27e)],'committed':_0x10457a[_0x3c57a3(0x1e6)],'commitsPerSec':_0x10457a[_0x3c57a3(0x1f2)],'commitP99Ms':_0x10457a[_0x3c57a3(0x235)],'parkedNow':_0x10457a[_0x3c57a3(0x2b2)]??0x0,'draining':!!_0x10457a[_0x3c57a3(0x87)]};}catch{}}}catch{}return Object['keys'](_0x14da2d)[_0x3c57a3(0x202)]?_0x14da2d:null;}[_0x468433(0x289)](){const _0x26c016=_0x468433,_0x25bc3d=process[_0x26c016(0x1c1)],_0x41c596=Date[_0x26c016(0x1a7)](),_0x4f2f07=_0x57ae5c=>{const _0x20014f=_0x26c016;if(!_0x57ae5c)return[];const _0x186d00=[];try{for(const {id:_0x4cefee,entry:_0x224b1d}of _0x57ae5c[_0x20014f(0xc9)]()){if(_0x224b1d?.[_0x20014f(0x8a)]?.[_0x20014f(0x1c1)]!==_0x25bc3d)continue;const _0x312540=_0x224b1d[_0x20014f(0xfa)]??_0x224b1d['acquiredAt']??0x0;if(_0x312540+(_0x224b1d[_0x20014f(0x212)]??0x0)<_0x41c596)continue;_0x186d00[_0x20014f(0x206)](_0x4cefee);}}catch{}return _0x186d00;},_0x58762c=_0x4f2f07(this[_0x26c016(0x166)]('compact')),_0x33cb39=_0x4f2f07(this[_0x26c016(0x166)](_0x26c016(0x18b)));if(!_0x58762c[_0x26c016(0x202)]&&!_0x33cb39['length'])return null;return{'compact':_0x58762c,'replicate':_0x33cb39};}['_singletonLock'](_0x2cb467){const _0x25144f=_0x468433;if(!this[_0x25144f(0x2a9)]?.[_0x25144f(0x1a9)])return null;if(!this[_0x25144f(0x113)])this[_0x25144f(0x113)]=new Map();let _0xe82aac=this[_0x25144f(0x113)][_0x25144f(0x10c)](_0x2cb467);if(!_0xe82aac)try{_0xe82aac=new _0x5bf68e(this['okdb']['_rootDb'],{'namespace':_0x2cb467}),this[_0x25144f(0x113)][_0x25144f(0x198)](_0x2cb467,_0xe82aac);}catch{return null;}return _0xe82aac;}['_buildProcessingFacet'](){const _0x511c69=_0x468433,_0x4f6ed4=[];try{for(const [_0x267b2d,_0x5e30bd]of this['okdb']['_envs']){if(_0x267b2d[_0x511c69(0xf0)]('~'))continue;for(const _0x236626 of _0x5e30bd['processor'][_0x511c69(0x1e7)]())_0x4f6ed4[_0x511c69(0x206)]({..._0x236626,'env':_0x267b2d});}}catch{}return{'participate':this[_0x511c69(0x2a9)][_0x511c69(0x1ce)]?.[_0x511c69(0x273)]??![],'processors':_0x4f6ed4};}[_0x468433(0x16b)](){const _0x28c202=_0x468433;if(this[_0x28c202(0x2c2)])return!![];const _0x23c7db=this[_0x28c202(0x2a9)]['_rootDb'];if(!_0x23c7db)return![];return this['_desired']=_0x23c7db[_0x28c202(0xff)](_0x432641,{'dupSort':![]}),this['_cmd']=_0x23c7db[_0x28c202(0xff)](_0x4e0e8d,{'dupSort':![]}),!![];}async[_0x468433(0x196)](){const _0x385ac0=_0x468433;if(!this[_0x385ac0(0x16b)]())return;const _0x5a0242=_0x385ac0(0x267),_0x5791c9=0x1,_0x1c56cd=this[_0x385ac0(0x2c2)][_0x385ac0(0x10c)](_0x5a0242)??0x0;if(_0x1c56cd>=_0x5791c9)return;const _0x35d1b0=_0x3bbda6=>{const _0xdf68e7=_0x385ac0;if(_0x3bbda6===_0xdf68e7(0x12b))return _0xdf68e7(0xb4);if(_0x3bbda6===_0xdf68e7(0x13d))return'fanout';return _0x3bbda6;};await this[_0x385ac0(0x2a9)][_0x385ac0(0x2a2)][_0x385ac0(0xb6)]['transaction'](()=>{const _0x24e69f=_0x385ac0;for(const _0x20feca of[_0x24e69f(0x2af),_0x24e69f(0x221)]){for(const {key:_0x580188,value:_0x1fb142}of this['_desired'][_0x24e69f(0x1c6)]({'start':_0x20feca,'end':_0x20feca+'\xff'})){if(typeof _0x580188!==_0x24e69f(0x1f5)||!_0x580188[_0x24e69f(0xf0)](_0x20feca))break;const _0x4557fb=_0x35d1b0(_0x1fb142[_0x24e69f(0xbc)]);if(_0x4557fb!==_0x1fb142[_0x24e69f(0xbc)])this[_0x24e69f(0x2c2)][_0x24e69f(0x1bf)](_0x580188,{..._0x1fb142,'mode':_0x4557fb});}}this[_0x24e69f(0x2c2)]['put'](_0x5a0242,_0x5791c9);});}[_0x468433(0x1eb)](){const _0xff7357=_0x468433;return!!this[_0xff7357(0x2c2)];}[_0x468433(0x1c5)](_0x5e10b4,_0xc0e80d){const _0x3a05d3=_0x468433;if(!this['_ensureDesired']())return null;const _0x5563da=_0x5e10b4+'/'+_0xc0e80d;return this[_0x3a05d3(0x1a4)](),this[_0x3a05d3(0x218)][_0x3a05d3(0x10c)](_0x5563da)??this[_0x3a05d3(0x2c2)][_0x3a05d3(0x10c)](_0x5563da)??null;}[_0x468433(0x1a4)](){const _0x5eb9f6=_0x468433;if(!_0x3a4305)return;try{this[_0x5eb9f6(0x2a9)][_0x5eb9f6(0x2a2)]?.['db']?.[_0x5eb9f6(0x253)]?.();}catch{}}async[_0x468433(0xfb)](_0x2387d0,_0x49c3bf,_0x3581c8){const _0x4a7422=_0x468433;if(!this[_0x4a7422(0x16b)]())return null;const _0x2e1c0b=_0x2387d0+'/'+_0x49c3bf;this['_refreshDesiredSnapshot']();const _0x44ab5f=this[_0x4a7422(0x218)][_0x4a7422(0x10c)](_0x2e1c0b)??this[_0x4a7422(0x2c2)][_0x4a7422(0x10c)](_0x2e1c0b)??{'version':0x0},_0x1a6dce=(_0x44ab5f[_0x4a7422(0xf6)]||0x0)+0x1,_0x53dab5={..._0x44ab5f,..._0x3581c8,'version':_0x1a6dce,'updatedAt':Date[_0x4a7422(0x1a7)]()};this[_0x4a7422(0x218)]['set'](_0x2e1c0b,_0x53dab5);try{await this[_0x4a7422(0x2a9)][_0x4a7422(0x2a2)][_0x4a7422(0xb6)][_0x4a7422(0x2b3)](()=>{const _0x1c2590=_0x4a7422;this['_desired'][_0x1c2590(0x1bf)](_0x2e1c0b,_0x53dab5);});}finally{if(this[_0x4a7422(0x218)][_0x4a7422(0x10c)](_0x2e1c0b)===_0x53dab5)this['_desiredOverlay']['delete'](_0x2e1c0b);}return _0x1a6dce;}[_0x468433(0x1f6)](_0x2bf554){const _0x151f21=_0x468433;if(!this[_0x151f21(0x16b)]())return[];this[_0x151f21(0x1a4)]();const _0x1645f3=_0x2bf554+'/',_0x5ebd0d=[];for(const {key:_0x2e7567,value:_0x5174f0}of this[_0x151f21(0x2c2)][_0x151f21(0x1c6)]({'start':_0x1645f3,'end':_0x1645f3+'\xff'})){if(typeof _0x2e7567!==_0x151f21(0x1f5)||!_0x2e7567[_0x151f21(0xf0)](_0x1645f3))break;_0x5ebd0d[_0x151f21(0x206)]({'key':_0x2e7567[_0x151f21(0x219)](_0x1645f3['length']),'value':_0x5174f0});}return _0x5ebd0d;}[_0x468433(0x189)](_0x202c98){const _0x4428cb=_0x468433;if(!this['_ensureDesired']())return null;return this[_0x4428cb(0x2c3)][_0x4428cb(0x10c)](_0x202c98)??null;}async['bumpCmd'](_0x23ff4b,_0x586c19,_0x26e55f={}){const _0x2dd0c=_0x468433;if(!this[_0x2dd0c(0x16b)]())return null;let _0x346f07;return await this['okdb'][_0x2dd0c(0x2a2)][_0x2dd0c(0xb6)][_0x2dd0c(0x2b3)](()=>{const _0x4e165f=_0x2dd0c,_0x1b2527=this[_0x4e165f(0x2c3)]['get'](_0x23ff4b)||{'epoch':0x0};_0x346f07=(_0x1b2527[_0x4e165f(0x232)]||0x0)+0x1,this[_0x4e165f(0x2c3)]['put'](_0x23ff4b,{..._0x1b2527,..._0x26e55f,'cmd':_0x586c19,'epoch':_0x346f07,'updatedAt':Date[_0x4e165f(0x1a7)]()});}),_0x346f07;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x1f04cf,'nodeKey':_0x4b3643,'logicalKey':_0x50f8d3,'slotKey':_0x5bab41,'PROCESS_ENV':_0x3e9705,'NODE_TYPE':_0x1f2a53},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x263001=_0xa5e620;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x2838d2=require$$0$4,{EVENTS:_0x666ad5,CHANGE_ACTIONS:_0x11ccc2}=requireOkdbEnums(),{LOOP:_0x1b786c}=requireOkdbLoopMonitor(),_0x2be887=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x500d7f=0x5,_0x4786fe=0x2710;class _0x18697d extends _0x2838d2{constructor(_0x4df425,_0x2b2f4a={}){const _0x52cb2c=_0x70ef;super(),this['okdb']=_0x4df425,this[_0x52cb2c(0x288)]=_0x2b2f4a[_0x52cb2c(0x164)]??_0x2be887,this[_0x52cb2c(0x91)]=_0x2b2f4a['flushDebounce']??_0x500d7f,this[_0x52cb2c(0x1b9)]=_0x2b2f4a[_0x52cb2c(0x176)]??_0x4786fe,this['_started']=![],this[_0x52cb2c(0x1b4)]=new Map(),this['_baselines']=new Map(),this['_pending']=new Map(),this[_0x52cb2c(0x1de)]=null,this['_draining']=![],this['_seen']=new Set(),this[_0x52cb2c(0x2be)]=new Set(),this[_0x52cb2c(0x24c)]=_0x2ac871=>this['_handleInProcess'](_0x2ac871),this[_0x52cb2c(0x122)]=_0x2b2b47=>this[_0x52cb2c(0xf2)](_0x2b2b47),this[_0x52cb2c(0x1d9)]=_0x4cc1c9=>this[_0x52cb2c(0x1b3)](_0x4cc1c9),this[_0x52cb2c(0x1ea)]=()=>this[_0x52cb2c(0xa7)]();}[_0x263001(0xc3)](){const _0x53235f=_0x263001;if(this['_started'])return;this[_0x53235f(0x2a0)]=!![];for(const [_0x1abbb9,_0x4591a]of this[_0x53235f(0x2a9)][_0x53235f(0x24d)]){if(_0x1abbb9[_0x53235f(0xf0)]('~'))continue;try{_0x4591a[_0x53235f(0x8f)]();}catch{}}for(const [_0x5d41fa,_0x154c2f]of this[_0x53235f(0x2a9)][_0x53235f(0x24d)]){if(_0x5d41fa[_0x53235f(0xf0)]('~'))continue;try{this[_0x53235f(0x165)][_0x53235f(0x198)](_0x5d41fa,_0x154c2f[_0x53235f(0x188)]()||0x0);}catch{}}const {events:_0x1c347a}=this[_0x53235f(0x2a9)];_0x1c347a['on'](_0x666ad5[_0x53235f(0x12d)],this[_0x53235f(0x122)]),_0x1c347a['on'](_0x666ad5['ITEM_CREATE'],this[_0x53235f(0x24c)]),_0x1c347a['on'](_0x666ad5['ITEM_UPDATE'],this['_onItem']),_0x1c347a['on'](_0x666ad5[_0x53235f(0x1b2)],this['_onItem']),_0x1c347a['on'](_0x666ad5[_0x53235f(0x22e)],this[_0x53235f(0x1d9)]),_0x1c347a['once'](_0x666ad5[_0x53235f(0x11e)],this[_0x53235f(0x1ea)]);}[_0x263001(0xa7)](){const _0x3d8b82=_0x263001;if(!this['_started'])return;this[_0x3d8b82(0x2a0)]=![];const {events:_0x2c5e7d}=this[_0x3d8b82(0x2a9)];_0x2c5e7d[_0x3d8b82(0xf3)](_0x666ad5[_0x3d8b82(0x12d)],this['_onPending']),_0x2c5e7d[_0x3d8b82(0xf3)](_0x666ad5[_0x3d8b82(0x8e)],this['_onItem']),_0x2c5e7d[_0x3d8b82(0xf3)](_0x666ad5['ITEM_UPDATE'],this[_0x3d8b82(0x24c)]),_0x2c5e7d['off'](_0x666ad5[_0x3d8b82(0x1b2)],this[_0x3d8b82(0x24c)]),_0x2c5e7d[_0x3d8b82(0xf3)](_0x666ad5['SYSTEM_POKE'],this[_0x3d8b82(0x1d9)]);try{_0x2c5e7d[_0x3d8b82(0xf3)](_0x666ad5[_0x3d8b82(0x11e)],this['_onStop']);}catch{}this[_0x3d8b82(0x1de)]&&(clearTimeout(this[_0x3d8b82(0x1de)]),this[_0x3d8b82(0x1de)]=null),this['_pending'][_0x3d8b82(0x25f)](),this['_cursors'][_0x3d8b82(0x25f)](),this[_0x3d8b82(0x165)]['clear'](),this[_0x3d8b82(0x140)][_0x3d8b82(0x25f)](),this[_0x3d8b82(0x2be)][_0x3d8b82(0x25f)]();}[_0x263001(0x1dd)](_0x3c8671,_0x27a6af,_0x33f7b4,_0x2eb1b3){return _0x3c8671+'\x00'+_0x27a6af+'\x00'+_0x33f7b4+'\x00'+_0x2eb1b3;}[_0x263001(0xb3)](_0x37739d,_0x448c4,_0x3f155b,_0x84b00d){const _0x4dc47a=_0x263001,_0x19a049=this['_dedupeKey'](_0x37739d,_0x448c4,_0x3f155b,_0x84b00d);if(this[_0x4dc47a(0x140)][_0x4dc47a(0x274)](_0x19a049))return![];this[_0x4dc47a(0x140)][_0x4dc47a(0x1f0)](_0x19a049);if(this['_seen'][_0x4dc47a(0x2c4)]>this['_dedupeMax']){const _0x2ce02a=this[_0x4dc47a(0x140)][_0x4dc47a(0x179)]()[_0x4dc47a(0x1d1)]()['value'];this[_0x4dc47a(0x140)]['delete'](_0x2ce02a);}return!![];}[_0x263001(0xf2)](_0xe44f5b){const _0x26cea7=_0x263001;if(!this[_0x26cea7(0x2a0)]||!_0xe44f5b)return;const {env:_0x7d0677,type:_0x46d89b,key:_0x583e3f,clock:_0x5541f5}=_0xe44f5b;if(_0x7d0677==null||_0x46d89b==null||_0x583e3f==null)return;if(typeof _0x7d0677==='string'&&_0x7d0677[_0x26cea7(0xf0)]('~'))return;if(typeof _0x46d89b===_0x26cea7(0x1f5)&&_0x46d89b[_0x26cea7(0xf0)]('~'))return;this[_0x26cea7(0x2be)][_0x26cea7(0x1f0)](this[_0x26cea7(0x1dd)](_0x7d0677,_0x46d89b,_0x583e3f,_0x5541f5)),this['_pendingLocal'][_0x26cea7(0x2c4)]>this[_0x26cea7(0x1b9)]&&this[_0x26cea7(0x2be)][_0x26cea7(0x200)](this[_0x26cea7(0x2be)][_0x26cea7(0x179)]()[_0x26cea7(0x1d1)]()[_0x26cea7(0x27d)]);}['_handleInProcess'](_0x3fdbe3){const _0x55ead7=_0x263001;if(!this[_0x55ead7(0x2a0)]||!_0x3fdbe3)return;const {env:_0x487841,type:_0x5ef9c5,key:_0x56519c,clock:_0x2b3250,origin:_0x57f0ad,action:_0x5075ce,newValue:_0x250438,oldValue:_0x374bb7}=_0x3fdbe3;if(_0x487841==null||_0x5ef9c5==null||_0x56519c==null)return;if(typeof _0x487841===_0x55ead7(0x1f5)&&_0x487841['startsWith']('~'))return;if(typeof _0x5ef9c5===_0x55ead7(0x1f5)&&_0x5ef9c5['startsWith']('~'))return;this[_0x55ead7(0x2be)][_0x55ead7(0x200)](this[_0x55ead7(0x1dd)](_0x487841,_0x5ef9c5,_0x56519c,_0x2b3250));if(!this[_0x55ead7(0xb3)](_0x487841,_0x5ef9c5,_0x56519c,_0x2b3250))return;const _0x520e6a=_0x5075ce===_0x11ccc2[_0x55ead7(0x2c0)]?_0x55ead7(0x21b):_0x55ead7(0x1bf);this[_0x55ead7(0x29b)](_0x55ead7(0x264),{'env':_0x487841,'type':_0x5ef9c5,'key':_0x56519c,'op':_0x520e6a,'clock':_0x2b3250,'origin':_0x57f0ad,'value':_0x520e6a===_0x55ead7(0x21b)?null:_0x250438,'prevValue':_0x374bb7});}[_0x263001(0x1b3)](_0x511796){const _0xdc811a=_0x263001;if(!this['_started'])return;if(!_0x511796||typeof _0x511796[_0xdc811a(0x11d)]!==_0xdc811a(0x1f5)||typeof _0x511796[_0xdc811a(0x15a)]!==_0xdc811a(0x1f5))return;const {env:_0x182d87,type:_0x384d00}=_0x511796;if(_0x182d87[_0xdc811a(0xf0)]('~')||_0x384d00[_0xdc811a(0xf0)]('~'))return;this['_pending'][_0xdc811a(0x198)](_0x182d87+'\x00'+_0x384d00,{'env':_0x182d87,'type':_0x384d00}),this[_0xdc811a(0x9e)]();}[_0x263001(0x9e)](){if(this['_flushTimer'])return;const _0x5b7a02=()=>{const _0x248a20=_0x70ef;this['_flushTimer']=null,this['_drain']()[_0x248a20(0x255)](()=>{});};this['_flushTimer']=setTimeout(_0x5b7a02,this['_flushDebounce']>0x0?this['_flushDebounce']:0x0);}async[_0x263001(0x22b)](){const _0x3b9fed=_0x263001;if(this[_0x3b9fed(0x197)]){this[_0x3b9fed(0x9e)]();return;}this['_draining']=!![];try{const _0x37ccf0=[...this[_0x3b9fed(0xd4)][_0x3b9fed(0x179)]()];this[_0x3b9fed(0xd4)]['clear']();let _0x4bea92=![];for(const {env:_0x5d60d7,type:_0x18bfcb}of _0x37ccf0){try{const _0x107baa=await this[_0x3b9fed(0x10d)](_0x5d60d7,_0x18bfcb);if(_0x107baa)_0x4bea92=!![];}catch{this[_0x3b9fed(0xd4)][_0x3b9fed(0x198)](_0x5d60d7+'\x00'+_0x18bfcb,{'env':_0x5d60d7,'type':_0x18bfcb}),_0x4bea92=!![];}}if(_0x4bea92||this[_0x3b9fed(0xd4)][_0x3b9fed(0x2c4)]>0x0)this[_0x3b9fed(0x9e)]();}finally{this[_0x3b9fed(0x197)]=![];}}async[_0x263001(0x10d)](_0x51b8ac,_0xc1bfb7){const _0x29afae=_0x263001,_0x1db3bf=await this['okdb']['_openEnvLazy'](_0x51b8ac),_0x5e0df2=_0x51b8ac+'\x00'+_0xc1bfb7;!this['_cursors'][_0x29afae(0x274)](_0x5e0df2)&&(!this[_0x29afae(0x165)]['has'](_0x51b8ac)&&(_0x1db3bf[_0x29afae(0x8f)](),this[_0x29afae(0x165)][_0x29afae(0x198)](_0x51b8ac,_0x1db3bf[_0x29afae(0x188)]()||0x0)),this[_0x29afae(0x1b4)]['set'](_0x5e0df2,this[_0x29afae(0x165)]['get'](_0x51b8ac)));const _0x8b79b5=this[_0x29afae(0x1b4)][_0x29afae(0x10c)](_0x5e0df2),_0x1bb7aa=_0x1db3bf[_0x29afae(0x188)](_0xc1bfb7)||0x0;if(_0x1bb7aa<=_0x8b79b5)return![];const _0x5e8d12=_0x8b79b5+this['_quantum'],_0x4299bc=Math[_0x29afae(0x17b)](_0x1bb7aa,_0x5e8d12),_0x456215=_0x1b786c[_0x29afae(0x1a6)]?_0x1b786c[_0x29afae(0x1a7)]():0x0,_0x9bf140=Array['from'](_0x1db3bf[_0x29afae(0x124)](_0xc1bfb7,_0x8b79b5+0x1,_0x4299bc));let _0xd95ca5=_0x8b79b5;for(const _0x230e5d of _0x9bf140){const {clock:_0x29939b,key:_0x50770e,action:_0x1f56b1,origin:_0x4ce635}=_0x230e5d;if(_0x29939b>_0xd95ca5)_0xd95ca5=_0x29939b;if(_0x50770e==null)continue;if(this[_0x29afae(0x2be)][_0x29afae(0x274)](this[_0x29afae(0x1dd)](_0x51b8ac,_0xc1bfb7,_0x50770e,_0x29939b)))continue;if(!this[_0x29afae(0xb3)](_0x51b8ac,_0xc1bfb7,_0x50770e,_0x29939b))continue;let _0x433f4b,_0x572f02;if(_0x1f56b1===_0x11ccc2[_0x29afae(0x2c0)])_0x433f4b=_0x29afae(0x21b),_0x572f02=null;else{const _0x17d2ec=_0x1db3bf[_0x29afae(0x10c)](_0xc1bfb7,_0x50770e);_0x17d2ec==null?(_0x433f4b=_0x29afae(0x21b),_0x572f02=null):(_0x433f4b=_0x29afae(0x1bf),_0x572f02=_0x17d2ec);}this[_0x29afae(0x29b)](_0x29afae(0x264),{'env':_0x51b8ac,'type':_0xc1bfb7,'key':_0x50770e,'op':_0x433f4b,'clock':_0x29939b,'origin':_0x4ce635,'value':_0x572f02});}if(_0x1b786c[_0x29afae(0x1a6)])_0x1b786c[_0x29afae(0xf1)](_0x29afae(0x25d)+_0x51b8ac+':'+_0xc1bfb7,_0x1b786c[_0x29afae(0x1a7)]()-_0x456215,'n='+_0x9bf140['length']);return this[_0x29afae(0x1b4)][_0x29afae(0x198)](_0x5e0df2,Math['max'](_0xd95ca5,_0x4299bc)),_0x1db3bf[_0x29afae(0x188)](_0xc1bfb7)>_0x4299bc;}[_0x263001(0x1a5)](){const _0x240d86=_0x263001;return{'started':this[_0x240d86(0x2a0)],'quantum':this[_0x240d86(0x288)],'flushDebounce':this[_0x240d86(0x91)],'cursors':Object[_0x240d86(0x1dc)]([...this[_0x240d86(0x1b4)][_0x240d86(0x157)]()][_0x240d86(0xcc)](([_0x1ed54f,_0x356a79])=>[_0x1ed54f[_0x240d86(0x22f)]('\x00',':'),_0x356a79])),'pending':this[_0x240d86(0xd4)][_0x240d86(0x2c4)],'seen':this['_seen']['size']};}}return _0x18697d[_0x263001(0x18a)]=_0x2be887,okdbChangefeed={'OKDBChangefeed':_0x18697d},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x317aa8=_0xa5e620;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x80b076=require$$1$1,_0x64d597=require$$1,{EVENTS:_0xd0c31c}=requireOkdbEnums(),_0x32ea33=require$$0$3,{slotKey:_0x3dd6f6}=requireOkdbProcessRegistry(),_0x233976=Number(process.env.OKDB_CLUSTER_RESPAWN_BACKOFF_MS)||0xfa,_0x102cf2=0xfa0,_0x289313=0x5,_0x4056b7=0x2710,_0x10c29d=0xbb8,_0x18d9d6=0x7d0,_0x1fc319=_0x317aa8(0x21c),_0x42616b='ephemeral',_0x37e59c='log',_0x3e61e5=_0x317aa8(0x2b4),_0x25d4d4=[_0xd0c31c[_0x317aa8(0x28b)],_0xd0c31c[_0x317aa8(0x275)],_0xd0c31c[_0x317aa8(0x259)],_0xd0c31c[_0x317aa8(0x28d)],_0xd0c31c[_0x317aa8(0x1b6)],_0xd0c31c[_0x317aa8(0x1ab)],_0xd0c31c[_0x317aa8(0x248)],_0xd0c31c['INDEX_REGISTERED'],_0x317aa8(0xa4),_0x317aa8(0x18d),_0x317aa8(0x195),_0x317aa8(0xc8),'processor:resumed',_0x317aa8(0x1c2)],_0x3d87f4=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0,_0x5e296b=0x64;function _0x2cbf3c(_0x2231e1){const _0x35dc6d=_0x317aa8;if(!_0x2231e1)return'null';const _0xfabaa6=(_0x2231e1[_0x35dc6d(0x1ce)]||[])[_0x35dc6d(0xcc)](_0x1ff793=>[_0x1ff793['env'],_0x1ff793['id'],_0x1ff793['mode'],_0x1ff793['state'],!!_0x1ff793['paused'],!!_0x1ff793[_0x35dc6d(0xa1)],!!_0x1ff793[_0x35dc6d(0xed)],_0x1ff793[_0x35dc6d(0x284)]?.[_0x35dc6d(0x1c1)]??null,_0x1ff793[_0x35dc6d(0x110)]?String(_0x1ff793[_0x35dc6d(0x110)]?.['message']??_0x1ff793[_0x35dc6d(0x110)]):null]);return JSON[_0x35dc6d(0x279)]([!!_0x2231e1[_0x35dc6d(0x1e8)],_0xfabaa6]);}function _0x51282b({workers:_0xf9207b,makeOkdb:_0x2b8f7f,port:_0x322e0c,primaryOkdb:_0xf3837c,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0x3cf267=_0x317aa8;if(_0x80b076[_0x3cf267(0x9c)])return childEntry&&_0x80b076[_0x3cf267(0x23e)]({'exec':_0x64d597[_0x3cf267(0xf4)](__dirname,_0x3cf267(0x241)),'args':[],'execArgv':((()=>{const _0x2519b8=_0x3cf267,_0x302f5a=[];for(let _0x589e00=0x0;_0x589e00<process['execArgv'][_0x2519b8(0x202)];_0x589e00++){const _0x2403de=process[_0x2519b8(0x1a3)][_0x589e00];if(_0x2403de[_0x2519b8(0xf0)](_0x2519b8(0x147))||_0x2403de[_0x2519b8(0xf0)]('--watch')||_0x2403de['startsWith'](_0x2519b8(0x1cc)))continue;if(_0x2403de==='-e'||_0x2403de===_0x2519b8(0x1f3)||_0x2403de==='-p'||_0x2403de===_0x2519b8(0x115)){_0x589e00++;continue;}_0x302f5a[_0x2519b8(0x206)](_0x2403de);}return _0x302f5a;})())}),_0x29cb18({'workers':_0xf9207b,'port':_0x322e0c,'primaryOkdb':_0xf3837c,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x322e0c});return _0x34eada({'makeOkdb':_0x2b8f7f,'port':_0x322e0c});}function _0x29cb18({workers:_0x4514a5,port:_0x37c795,primaryOkdb:_0xc3d945,workerEnv:_0x303f7e,workerRole:_0x2db5ca,listenAddr:_0x5efb45}){const _0x346bfb=_0x317aa8,_0x2ee090=new Map(),_0x24839c=new Map();let _0x1e9c5b=![];const _0x5aeedf=_0x44ec0d=>_0x44ec0d?.['__okdbSlot'],_0x444f58=_0x36efb5=>{const _0x2c2980=_0x70ef,_0x6ff3df=_0x80b076[_0x2c2980(0x214)]({...process.env,..._0x303f7e||{},'OKDB_CLUSTER_SLOT':String(_0x36efb5)});return _0x6ff3df[_0x2c2980(0x1e5)]=_0x36efb5,_0x2ee090[_0x2c2980(0x198)](_0x6ff3df[_0x2c2980(0x152)][_0x2c2980(0x1c1)],{'worker':_0x6ff3df,'startedAt':Date['now'](),'slot':_0x36efb5}),_0x6ff3df['on'](_0x2c2980(0x110),_0x2b25a8=>{const _0x4260b2=_0x2c2980;console[_0x4260b2(0x88)](_0x4260b2(0x271)+_0x6ff3df['process'][_0x4260b2(0x1c1)]+_0x4260b2(0xee)+(_0x2b25a8?.[_0x4260b2(0x28a)]??_0x2b25a8));}),_0x6ff3df['on'](_0x2c2980(0x1e4),()=>_0x4dd79c()),_0x6ff3df;},_0x53656e=_0x50d752=>{const _0x268635=_0x70ef;for(const {worker:_0x17d382}of _0x2ee090[_0x268635(0x179)]()){if(_0x17d382[_0x268635(0x19e)]()||!_0x17d382[_0x268635(0x1d5)]())continue;try{_0x17d382[_0x268635(0xe0)](_0x50d752);}catch{}}};_0xc3d945?.['_activateProcesses']?.({'kind':'primary','listenAddr':_0x5efb45})['catch'](()=>{}),_0xc3d945?.[_0x346bfb(0xeb)]?.[_0x346bfb(0x1d8)]?.({'workersConfigured':_0x4514a5});const _0x1b4955={'engines':!![],'processors':!![],'compaction':!![],..._0x2db5ca,'http':!![]},_0x4dd79c=()=>{const _0x38164c=_0x346bfb,_0x16e07c=_0xc3d945?.[_0x38164c(0xeb)];if(!_0x16e07c||!_0x16e07c[_0x38164c(0x222)])return;const _0xb6bf1a=_0x16e07c['selfKey'];for(const {worker:_0x73d12d,startedAt:_0x4deba5,slot:_0x47aadf,stats:_0x4ea64e,processing:_0x13f100}of _0x2ee090[_0x38164c(0x179)]()){if(_0x73d12d[_0x38164c(0x19e)]())continue;const _0x47202b=_0x16e07c[_0x38164c(0x1eb)]?.()&&_0x16e07c[_0x38164c(0x1c5)](_0x38164c(0x12e),_0x365488(_0x47aadf))?.[_0x38164c(0x1df)]===!![];_0x16e07c[_0x38164c(0xa5)]({'pid':_0x73d12d['process'][_0x38164c(0x1c1)],'startedAt':_0x4deba5,'kind':_0x38164c(0x268),'supervisorKey':_0xb6bf1a,'slot':_0x47aadf,'slotKey':_0x365488(_0x47aadf),'role':_0x1b4955,'listenAddr':_0x5efb45,'lifecycle':_0x47202b?_0x38164c(0xca):_0x38164c(0x190),'processing':_0x13f100??null,'stats':_0x4ea64e??null})[_0x38164c(0x255)](()=>{});}},_0x365488=_0x37370a=>_0x3dd6f6('cluster:'+_0x37c795,_0x37370a),_0x38f4fe=_0x8b41=>{const _0x2daa9d=_0x346bfb,_0x4572c1=_0xc3d945?.[_0x2daa9d(0xeb)];if(!_0x4572c1?.['hasDesired']?.())return![];return _0x4572c1['getDesired'](_0x2daa9d(0x12e),_0x365488(_0x8b41))?.[_0x2daa9d(0x1df)]===!![];};for(let _0x555ba3=0x0;_0x555ba3<_0x4514a5;_0x555ba3++){const _0x12af1c=_0x38f4fe(_0x555ba3);_0x24839c[_0x346bfb(0x198)](_0x555ba3,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x12af1c,'respawnTimer':null}),_0x12af1c?console['log'](_0x346bfb(0x1a2)+_0x555ba3+_0x346bfb(0x19f)):_0x444f58(_0x555ba3);}const _0x3d1f89=()=>{const _0x1ff0ed=_0x346bfb,_0x5f5a6=_0xc3d945?.[_0x1ff0ed(0xeb)];if(!_0x5f5a6?.['_isWriter']||!_0x5f5a6['hasDesired']?.())return;for(const [_0x8b7466,_0x4dfa78]of _0x24839c[_0x1ff0ed(0x157)]()){const _0x522625=_0x5f5a6['getDesired'](_0x1ff0ed(0x12e),_0x365488(_0x8b7466)),_0x5a591a=_0x522625?.[_0x1ff0ed(0x1df)]===!![],_0x493001=_0x522625?.[_0x1ff0ed(0x14b)]===!![];if(_0x5a591a&&!_0x4dfa78[_0x1ff0ed(0x2a6)]){_0x4dfa78[_0x1ff0ed(0x2a6)]=!![];_0x4dfa78['respawnTimer']&&(clearTimeout(_0x4dfa78[_0x1ff0ed(0x265)]),_0x4dfa78[_0x1ff0ed(0x265)]=null);for(const {worker:_0x2f0d8c}of _0x2ee090[_0x1ff0ed(0x179)]()){if(_0x5aeedf(_0x2f0d8c)!==_0x8b7466||_0x2f0d8c[_0x1ff0ed(0x19e)]())continue;try{if(_0x493001)_0x2f0d8c['process'][_0x1ff0ed(0x14b)](_0x1ff0ed(0x2a7));else _0x2f0d8c['isConnected']()&&_0x2f0d8c[_0x1ff0ed(0x20c)]();}catch{}}console[_0x1ff0ed(0x88)](_0x1ff0ed(0x266)+(_0x493001?_0x1ff0ed(0x281):_0x1ff0ed(0x280))+'\x20worker\x20slot='+_0x8b7466+_0x1ff0ed(0x1d6));}else{if(!_0x5a591a&&_0x4dfa78['dead']&&_0x522625){_0x4dfa78[_0x1ff0ed(0x2a6)]=![],_0x4dfa78[_0x1ff0ed(0x1aa)]=[],_0x4dfa78[_0x1ff0ed(0x220)]=0x0;const _0x56f2d1=[..._0x2ee090['values']()][_0x1ff0ed(0x16f)](({worker:_0x415bef})=>_0x5aeedf(_0x415bef)===_0x8b7466&&!_0x415bef[_0x1ff0ed(0x19e)]());!_0x56f2d1&&!_0x1e9c5b&&(_0x444f58(_0x8b7466),console[_0x1ff0ed(0x88)](_0x1ff0ed(0x256)+_0x8b7466));}}}},_0x404762=()=>{try{_0x3d1f89();}catch{}};_0xc3d945?.[_0x346bfb(0x234)]?.['on']?.(_0xd0c31c[_0x346bfb(0x1bb)],_0x404762);const _0xd25a57=[];if(_0xc3d945?.[_0x346bfb(0x234)]?.['on'])for(const _0x581c0e of _0x25d4d4){const _0x428650=_0x5c59d6=>{_0x53656e({[_0x1fc319]:_0x42616b,'event':_0x581c0e,'data':_0x5c59d6??{}});};_0xc3d945['events']['on'](_0x581c0e,_0x428650),_0xd25a57[_0x346bfb(0x206)]({'event':_0x581c0e,'handler':_0x428650});}const _0x10937d=setInterval(()=>{_0x3d1f89(),_0x4dd79c();},_0x3d87f4);_0x10937d[_0x346bfb(0x187)]?.();const _0x4b6e91=(_0x2475d9,_0x5826f0)=>{const _0x43723c=_0x346bfb;if(!_0x5826f0||typeof _0x5826f0!==_0x43723c(0x14c)||_0x5826f0[_0x1fc319]!==_0x37e59c)return;if(!_0xc3d945?.[_0x43723c(0x88)]?.['ingest'])return;const _0x5cdaa8=_0x5826f0['entry']||{};_0xc3d945[_0x43723c(0x88)][_0x43723c(0x19c)]({..._0x5cdaa8,'msg':'[w'+_0x5826f0[_0x43723c(0x12e)]+']\x20'+(_0x5cdaa8[_0x43723c(0x2a3)]??''),'meta':{..._0x5cdaa8[_0x43723c(0x9d)]||{},'worker':_0x5826f0[_0x43723c(0x12e)],'workerPid':_0x5826f0[_0x43723c(0x1c1)]}});};_0x80b076['on'](_0x346bfb(0x28a),_0x4b6e91);const _0x521625=(_0x5dc4da,_0xbb94da)=>{const _0x228113=_0x346bfb;if(!_0xbb94da||typeof _0xbb94da!==_0x228113(0x14c)||_0xbb94da[_0x1fc319]!==_0x3e61e5)return;const _0x40cdbe=_0x2ee090['get'](_0x5dc4da[_0x228113(0x152)][_0x228113(0x1c1)]);if(_0x40cdbe){_0x40cdbe[_0x228113(0x2b4)]={..._0xbb94da[_0x228113(0x2b4)],'at':Date[_0x228113(0x1a7)]()};if(_0xbb94da[_0x228113(0x2c7)]!==undefined){const _0x103eaa=_0x2cbf3c(_0xbb94da[_0x228113(0x2c7)]);_0x103eaa!==_0x40cdbe[_0x228113(0x174)]&&(_0x40cdbe[_0x228113(0x174)]=_0x103eaa,_0x15ca63()),_0x40cdbe[_0x228113(0x2c7)]=_0xbb94da['processing'];}}};let _0x5b3e33=null;const _0x15ca63=()=>{const _0x5eae3c=_0x346bfb;if(_0x5b3e33||_0x1e9c5b)return;_0x5b3e33=setTimeout(()=>{_0x5b3e33=null;if(!_0x1e9c5b)_0x4dd79c();},_0x5e296b),_0x5b3e33[_0x5eae3c(0x187)]?.();};_0x80b076['on']('message',_0x521625),_0x80b076['on'](_0x346bfb(0x2bd),(_0x45fcd7,_0x372318,_0xa97c9)=>{const _0x3d1c5d=_0x346bfb,_0x40204b=_0x45fcd7[_0x3d1c5d(0x152)][_0x3d1c5d(0x1c1)],_0x3a2711=_0x5aeedf(_0x45fcd7),_0xf1e413=_0x2ee090[_0x3d1c5d(0x10c)](_0x40204b);if(_0xf1e413&&_0xc3d945?.[_0x3d1c5d(0xeb)])_0xc3d945[_0x3d1c5d(0xeb)][_0x3d1c5d(0x18e)](_0x40204b+':'+_0xf1e413[_0x3d1c5d(0x12c)])[_0x3d1c5d(0x255)](()=>{});_0x2ee090[_0x3d1c5d(0x200)](_0x40204b),console[_0x3d1c5d(0x88)](_0x3d1c5d(0x271)+_0x40204b+_0x3d1c5d(0x2aa)+(_0x3a2711??'?')+_0x3d1c5d(0x2bf)+(_0x3d1c5d(0x1fd)+_0x372318+_0x3d1c5d(0x11c)+(_0xa97c9??_0x3d1c5d(0x98))+_0x3d1c5d(0x150)+_0x2ee090[_0x3d1c5d(0x2c4)]+'\x20worker(s)\x20remaining')),_0x4dd79c();if(_0x1e9c5b||_0x3a2711==null)return;const _0x274cdf=_0x24839c[_0x3d1c5d(0x10c)](_0x3a2711);if(!_0x274cdf||_0x274cdf[_0x3d1c5d(0x2a6)])return;const _0x5829ba=Date[_0x3d1c5d(0x1a7)]();_0x274cdf[_0x3d1c5d(0x1aa)][_0x3d1c5d(0x206)](_0x5829ba),_0x274cdf['deaths']=_0x274cdf[_0x3d1c5d(0x1aa)][_0x3d1c5d(0xda)](_0x5b6f66=>_0x5829ba-_0x5b6f66<=_0x4056b7);if(_0x274cdf[_0x3d1c5d(0x1aa)][_0x3d1c5d(0x202)]>=_0x289313){_0x274cdf[_0x3d1c5d(0x2a6)]=!![],console[_0x3d1c5d(0x110)]('[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot='+_0x3a2711+_0x3d1c5d(0xfc)+_0x274cdf['deaths'][_0x3d1c5d(0x202)]+_0x3d1c5d(0x225)+(_0x4056b7+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x2ee090['size']+_0x3d1c5d(0x13f)));return;}_0x274cdf['consecutiveFailures']++;const _0x18e6f8=Math['min'](_0x102cf2,_0x233976*0x2**(_0x274cdf['consecutiveFailures']-0x1));console['log'](_0x3d1c5d(0x1fa)+_0x3a2711+_0x3d1c5d(0x23a)+_0x18e6f8+_0x3d1c5d(0xbf)+_0x274cdf[_0x3d1c5d(0x220)]+')'),_0x274cdf[_0x3d1c5d(0x265)]=setTimeout(()=>{const _0x1d2408=_0x3d1c5d;_0x274cdf[_0x1d2408(0x265)]=null;if(_0x1e9c5b||_0x274cdf[_0x1d2408(0x2a6)])return;const _0x1555ec=_0x444f58(_0x3a2711);_0x1555ec['once'](_0x1d2408(0x16a),()=>{const _0xf46119=_0x1d2408;if(_0x24839c[_0xf46119(0x10c)](_0x3a2711)===_0x274cdf)_0x274cdf['consecutiveFailures']=0x0;});},_0x18e6f8),_0x274cdf['respawnTimer'][_0x3d1c5d(0x187)]?.();});const _0xd14ae5=[..._0x2ee090['keys']()];console['log'](_0x346bfb(0x89)+process[_0x346bfb(0x1c1)]+'\x20forked\x20'+_0x4514a5+'\x20HTTP\x20server(s)\x20on\x20port\x20'+_0x37c795+':\x20'+('['+_0xd14ae5[_0x346bfb(0xf4)](',\x20')+']'));const _0x165b3d={'_isClusterController':!![],'port':_0x37c795,'primaryOkdb':_0xc3d945??null,'status'(){const _0x36626e=_0x346bfb;return{'clustered':!![],'primaryPid':process[_0x36626e(0x1c1)],'port':_0x37c795,'primaryRole':_0xc3d945?.[_0x36626e(0x27c)]??null,'processorPid':null,'supervisorPid':process[_0x36626e(0x1c1)],'workers':[..._0x2ee090[_0x36626e(0x179)]()][_0x36626e(0xcc)](({worker:_0x30c3fc})=>({'pid':_0x30c3fc['process'][_0x36626e(0x1c1)],'id':_0x30c3fc['id'],'dead':_0x30c3fc[_0x36626e(0x19e)]()}))};},async 'close'(){const _0x90debb=_0x346bfb;_0x1e9c5b=!![];for(const _0x3c2a42 of _0x24839c[_0x90debb(0x179)]()){_0x3c2a42[_0x90debb(0x2a6)]=!![],_0x3c2a42[_0x90debb(0x265)]&&(clearTimeout(_0x3c2a42['respawnTimer']),_0x3c2a42[_0x90debb(0x265)]=null);}clearInterval(_0x10937d);_0x5b3e33&&(clearTimeout(_0x5b3e33),_0x5b3e33=null);_0x80b076[_0x90debb(0xf3)]('message',_0x4b6e91),_0x80b076[_0x90debb(0xf3)](_0x90debb(0x28a),_0x521625),_0xc3d945?.[_0x90debb(0x234)]?.['off']?.(_0xd0c31c[_0x90debb(0x1bb)],_0x404762);if(_0xc3d945?.['events']?.[_0x90debb(0xf3)])for(const {event:_0x2f9c0a,handler:_0x5f4835}of _0xd25a57){try{_0xc3d945['events']['off'](_0x2f9c0a,_0x5f4835);}catch{}}_0xd25a57['length']=0x0;const _0x3dc1af=[..._0x2ee090[_0x90debb(0x179)]()][_0x90debb(0xcc)](({worker:_0x1ab444})=>_0x1ab444);if(_0x3dc1af['length']===0x0)return;await Promise[_0x90debb(0xc5)](_0x3dc1af['map'](_0x14e4fe=>new Promise(_0x1d5683=>{const _0x362253=_0x90debb;if(_0x14e4fe[_0x362253(0x19e)]()){_0x1d5683();return;}let _0x4c891c=![];const _0x383242=()=>{if(_0x4c891c)return;_0x4c891c=!![];if(_0x3b5f57)clearTimeout(_0x3b5f57);_0x1d5683();};_0x14e4fe[_0x362253(0x18c)]('exit',_0x383242);const _0x3b5f57=setTimeout(()=>{const _0xd872f7=_0x362253;try{_0x14e4fe[_0xd872f7(0x152)]['kill']();}catch{}},_0x10c29d+0x1f4);_0x3b5f57[_0x362253(0x187)]?.();try{_0x14e4fe[_0x362253(0x20c)]();}catch{try{_0x14e4fe[_0x362253(0x152)][_0x362253(0x14b)]();}catch{}}})));}};return _0x165b3d;}async function _0x34eada({makeOkdb:_0x1d73fb,port:_0x1fbe00}){const _0x19424b=_0x317aa8,_0x74f8a7=await _0x1d73fb();return _0x5e428c(_0x74f8a7),_0x74f8a7[_0x19424b(0x107)][_0x19424b(0xc6)](_0x1fbe00);}function _0x5e428c(_0x2a28c0){const _0x856aed=_0x317aa8;if(!_0x2a28c0||_0x2a28c0[_0x856aed(0x105)])return;_0x2a28c0[_0x856aed(0x105)]=!![];try{const {OKDBChangefeed:_0x3a7621}=requireOkdbChangefeed(),_0x4aa191=_0x2a28c0[_0x856aed(0x129)];if(_0x4aa191&&typeof _0x4aa191['attachFeed']===_0x856aed(0xc0)){const _0xda48bc=new _0x3a7621(_0x2a28c0);_0xda48bc[_0x856aed(0xc3)](),_0x4aa191[_0x856aed(0x210)](_0xda48bc),_0x2a28c0['_changefeed']=_0xda48bc;}}catch(_0x4fbecc){_0x2a28c0[_0x856aed(0x88)]?.[_0x856aed(0xdb)]?.('[okdb-cluster]\x20change-feed\x20init\x20failed:\x20'+(_0x4fbecc?.[_0x856aed(0x28a)]??_0x4fbecc),{'feature':_0x856aed(0xc4)});}const _0x5006e6=_0x34d6d2=>{const _0xa6089d=_0x856aed;if(!_0x34d6d2||typeof _0x34d6d2!==_0xa6089d(0x14c)||_0x34d6d2[_0x1fc319]==null)return;if(_0x34d6d2[_0x1fc319]===_0x42616b)try{_0x2a28c0[_0xa6089d(0x129)]?.[_0xa6089d(0x120)]?.(_0x34d6d2['event'],_0x34d6d2['data']);}catch{}};process['on'](_0x856aed(0x28a),_0x5006e6),_0x2a28c0[_0x856aed(0xd3)]=_0x5006e6;{let _0x224157=process[_0x856aed(0xa6)](),_0x33cfb6=Date[_0x856aed(0x1a7)]();const _0x381e26=()=>{const _0x122e22=_0x856aed;if(typeof process[_0x122e22(0xe0)]!==_0x122e22(0xc0)||!process[_0x122e22(0xd8)])return;const _0x446377=Date[_0x122e22(0x1a7)](),_0x6100b=process[_0x122e22(0xa6)](),_0x260a82=(_0x446377-_0x33cfb6)*0x3e8,_0x4e06bc=_0x6100b[_0x122e22(0x191)]-_0x224157[_0x122e22(0x191)]+(_0x6100b[_0x122e22(0x1fe)]-_0x224157[_0x122e22(0x1fe)]),_0x243288=_0x260a82>0x0?Math[_0x122e22(0x17b)](0x64,Math[_0x122e22(0x92)](_0x4e06bc/(_0x260a82*(_0x32ea33[_0x122e22(0x201)]()[_0x122e22(0x202)]||0x1))*0x64)):0x0;_0x224157=_0x6100b,_0x33cfb6=_0x446377;const _0x17d297=process[_0x122e22(0x223)]();let _0x5d7c9a=null;try{_0x5d7c9a=_0x2a28c0['role']?.[_0x122e22(0x1ce)]?_0x2a28c0[_0x122e22(0xeb)]?.[_0x122e22(0x25e)]?.()??null:null;}catch{}try{process[_0x122e22(0xe0)]({[_0x1fc319]:_0x3e61e5,'stats':{'rss':_0x17d297[_0x122e22(0x108)],'heapUsed':_0x17d297[_0x122e22(0x21d)],'heapTotal':_0x17d297[_0x122e22(0x24e)],'external':_0x17d297[_0x122e22(0xad)],'cpuPct':_0x243288,'cpuWindowMs':Math[_0x122e22(0x92)](_0x260a82/0x3e8)||null},'processing':_0x5d7c9a});}catch{}},_0x34ad52=Math[_0x856aed(0x293)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x47c8ed=setInterval(_0x381e26,_0x34ad52);_0x47c8ed[_0x856aed(0x187)]?.(),_0x381e26();for(const _0x18b088 of[_0x856aed(0xc8),_0x856aed(0x141)]){_0x2a28c0[_0x856aed(0x234)]?.['on']?.(_0x18b088,()=>{try{_0x381e26();}catch{}});}}let _0x5093c1=![];const _0x4ec65b=async _0x468ca3=>{const _0x537c0a=_0x856aed;if(_0x5093c1)return;_0x5093c1=!![];const _0x56b5ca=setTimeout(()=>process[_0x537c0a(0x2bd)](_0x468ca3),_0x10c29d);_0x56b5ca['unref']?.();try{await _0x2a28c0[_0x537c0a(0x2c5)]?.();}catch{}process[_0x537c0a(0x2bd)](_0x468ca3);};process['on']('disconnect',()=>_0x4ec65b(0x0));if(process[_0x856aed(0xe0)]&&!process[_0x856aed(0xd8)])_0x4ec65b(0x0);if(process[_0x856aed(0xc2)]!==_0x856aed(0xa8)){const _0x54f451=setInterval(()=>{const _0x162724=_0x856aed;if(process[_0x162724(0x298)]===0x1)_0x4ec65b(0x0);},_0x18d9d6);_0x54f451[_0x856aed(0x187)]?.(),_0x2a28c0[_0x856aed(0x28e)]=_0x54f451;}}return okdbCluster={'runClustered':_0x51282b,'attachWorkerCluster':_0x5e428c},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0x3b8709=_0xa5e620;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x34734d=require$$0$5,{attachWorkerCluster:_0x15d14c}=requireOkdbCluster();async function _0x35e7fa(){const _0x20ae3e=_0x70ef,_0x5628d7=process.env.OKDB_HTTP_CHILD;if(!_0x5628d7)throw new Error(_0x20ae3e(0x1ac));const {rootPath:_0x32f438,port:_0x299fe8,options:options={},logLevel:logLevel=_0x20ae3e(0xb7)}=JSON[_0x20ae3e(0x1c3)](_0x5628d7);if(!_0x32f438||!_0x299fe8)throw new Error('okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required');const _0x4247f4=new _0x34734d(_0x32f438,{...options,'engines':![],'processors':![],'compaction':![]});_0x4247f4[_0x20ae3e(0x88)]['detachConsole']?.();const _0x6957fc=process.env.OKDB_CLUSTER_SLOT??'?',_0x25ca8c={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x168b81=_0x25ca8c[logLevel]??_0x25ca8c[_0x20ae3e(0xb7)];_0x4247f4[_0x20ae3e(0x88)]['attach'](_0x190be7=>{const _0x5f4e3c=_0x20ae3e;if((_0x25ca8c[_0x190be7[_0x5f4e3c(0x1ef)]]??0x1)<_0x168b81)return;try{process[_0x5f4e3c(0xe0)]?.({'__okdbCluster':_0x5f4e3c(0x88),'slot':_0x6957fc,'pid':process[_0x5f4e3c(0x1c1)],'entry':_0x190be7});}catch{}}),await _0x4247f4[_0x20ae3e(0x1cb)](),_0x15d14c(_0x4247f4),await _0x4247f4[_0x20ae3e(0x107)][_0x20ae3e(0xc6)](_0x299fe8);}return _0x35e7fa()[_0x3b8709(0x255)](_0x4721fa=>{const _0x640c42=_0x3b8709;try{process[_0x640c42(0xe0)]?.({'__okdbCluster':'log','slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x640c42(0x1c1)],'entry':{'level':'error','msg':'http\x20worker\x20child\x20failed:\x20'+(_0x4721fa?.['message']??_0x4721fa)}});}catch{}process[_0x640c42(0x2bd)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module[_0xa5e620(0x151)]=okdbHttpWorkerChild;
|
|
1
|
+
'use strict';const _0x1383d2=_0x2fe0;(function(_0x5c2333,_0x5f14c6){const _0x1a5f2e=_0x2fe0,_0x195a68=_0x5c2333();while(!![]){try{const _0x4938e0=parseInt(_0x1a5f2e(0x2ad))/0x1*(-parseInt(_0x1a5f2e(0x11f))/0x2)+-parseInt(_0x1a5f2e(0x16e))/0x3+-parseInt(_0x1a5f2e(0x112))/0x4*(-parseInt(_0x1a5f2e(0x9d))/0x5)+parseInt(_0x1a5f2e(0x2a3))/0x6+parseInt(_0x1a5f2e(0x202))/0x7+-parseInt(_0x1a5f2e(0x22f))/0x8+parseInt(_0x1a5f2e(0x152))/0x9;if(_0x4938e0===_0x5f14c6)break;else _0x195a68['push'](_0x195a68['shift']());}catch(_0x49e39f){_0x195a68['push'](_0x195a68['shift']());}}}(_0x2b1c,0x45fc3));var require$$0$5=require(_0x1383d2(0x27c)),require$$1$1=require(_0x1383d2(0x87)),require$$1=require(_0x1383d2(0x189)),require$$0$3=require('os'),require$$2=require(_0x1383d2(0x133)),require$$0=require(_0x1383d2(0xd0)),require$$0$2=require(_0x1383d2(0x1b5)),require$$0$1=require('fs'),require$$0$4=require(_0x1383d2(0x2b4));function _0x2b1c(){const _0x3886ba=['loop-lag','warn','[okdb-cluster]\x20respawning\x20worker\x20slot=','start','inflightAgesMs','cli','_baselines','all','selfKey','oldestPendingMs','_getType','instanceId','isHeld','closed','disable','reap','getDesired','env','txn:rollback','hard-killed','SYSTEM_STOPPED','parse','_wantDb','nodesView','_admissionTimer','halted','writerStatus','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','close','committed','okdb-diag.','replace','processor','mkdirSync','_participate','indexOf','attachFeed','transaction','commit','fanout','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','dropIndex','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','isEnabled','FTS_RESET','_clusterWorkerAttached','true','FTS_DROP','draining','ttl:set','license:activated','extend','processor:retry','\x20drainAge=','49148UahuFx','2.6.2','list','rowKey','_publishNow','_openEnvLazy','listen','_heartbeatTimer','busy','_enqueuedAt','isConnected','setupPrimary','functions','2jkHriA','fork','_servingEngines','win32','listAll','maxMs','filter','listDesired','type:drop','_isWriter','\x20statusEnv=','_key','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','starting','dedupeMax','unref','msg','keys','external','FTS_REGISTERED','crypto','publishChildRow','addSupervisedChild','SYSTEM_POKE','treeView','code','beforeWrite','force','queue-worker','stringify','\x20died\x20','\x20pid=','raw-remove','processes','async','_lastCpuAt','_log','stderr','slotKey','has','caps','ITEM_UPDATE','openDB','\x20(slot=','hasDesired','compaction','uptime','_db','resetReadTxn','_refreshDesiredSnapshot','--test','4324842vmHtdJ','lifecycle','dropping','license:added','type','_wantDbHandle','_sandbox','view','_startAdmission','_rowKey','call','allSettled','change','--print','system:env_release','getCmd','processKey','SWAP','_durs','INDEX_RESET','http\x20worker\x20child\x20failed:\x20','_processStartedAt','stopHeartbeat','_putRowAsync','_handleInProcess','removeSync','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','_buildProcessingFacet','525708JeWVWM','heartbeatMs','ms\x20busy=','fn-runner','processor:resumed','waiting','send','_removeRowAsync','index:drop','_rootDb','_cmd','trim','_lockDb','engines','_children','sandbox','_inflight','_outstanding','exports','ORPHAN\x20(env-closed\x20write)','registerFts','_done','reportThreadStats','setOwnMeta','_migrateVocab','bus:type_drop','processingSig','path','envsOpen','isDead','events','_onItem','heapUsed','_startHeartbeat','detachConsole','\x20oldestPendingMs=','prependListener','_buildChildRow','dropFts','label','__vocab/version','_released','_nestedTotal','license:invalid','exit','_ownMeta','index:registered','_acquiredAt','system:stopped','listNodes','once','getProcess','_writer','write','getChanges','ephemeral','ttlMs','memoryUsage','size','field:resolver_registered','error:\x20','node','emit','cpuWindowMs','processor:paused','slice','dropType','count','some','message','processors','perf_hooks','withPoolHold','okdb-lock:\x20env\x20closed','_held','mean','okdb-writer:\x20env\x20closing\x20—\x20retry',')\x20exited\x20','_onProcEvent','\x20sync','threads','repeat','_highWater','processor:progress','_seen','getRange','children','options','primary','item:update','ttl:expired','max','claims','_pendingLocal','deaths','isActive','enabled','isWorker','setSchema','INDEX_REGISTERED','cluster:','_selfKey','_startedAt','building','disconnect','bumpCmd','_nodeDb','_quantum','dropSchema','getClock','setTtl','resetIndex','_buckets','removeNode','_systemEnv','_publishFailWarned','system:drain','_timer','standalone','_lastCpuPct','\x20writer{depth=','entry','index:progress','killable','index:reset','_desired',');\x20','freeze','hasOwnProperty','startedAt','--inspect','ITEM_REMOVE','supervisorKey','note','schema:drop','SIGKILL','_onPending','registry\x20publish\x20failing:\x20','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','drain','confirm','add','level','log','_heldTotal','listenAddr','find','.log','2143169gkLOnY','_changefeed','transactionSync','CHANGEFEED_QUANTUM','default','registerType','_closed','process\x20','_draining','ms\x20max=','entries','\x0a\x20\x20\x20\x20\x20\x20','_hbTimer','off','view:progress','_cursors','_lockDbOf','noteListenAddr','unclaimed','host','_clusterOnMessage','stopping','fts:drop','_lastPublishAt','_isStale','_singletonLock','single','system:clock_change','running','state','toISOString','value','_nestedWarned','_drain','user','toFixed','_rawDb','nodeKey','_admissionStarted','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','reduce','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','_windowCbs','\x0a===\x20OKDB_DIAG\x20','randomUUID','3084888GdvEOo','_lastCpuUsage','stopped','online','flushLmdb','kind','_nodeDead','string','liveThreadStats','ensureType','env:opened','holder','_lock','processor:error','_kind','_buildOwnRow','test','creating','next','http-server','length','raw-put','maxExtra','shift','setDesired','_instanceId','SYSTEM_PROC','onWindow','bus:proc','ms\x20p99=','cursorKey','_threadStats','_wantDbOf','error','unhandledRejection','decommission','singletonClaims','_markSeen','_listenAddr','_role','rss','firstTs','\x20ipc\x20error:\x20','stack','consecutiveFailures','ms\x20on\x20env=','_desiredOverlay','none','workers','\x20forked\x20','_started','process','childTransaction','delete','http','commitsPerSec','catch','participate','paused','bus:env_release','system:bus_state_change','\x20\x20(no\x20env\x20draining)','putSync','embedded','now','started','migrations','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','object','~lock','heldBy','clusterStatusView','processor:ready','workersConfigured','version','heapTotal','respawnTimer','./okdb','dead','set','kill','ready','fromEntries','_adminRelay','sort','ITEM_CREATE','_drainOne','updatedAt','_nodeDbFor','stop','_onPoke','decommissioned','race','abs','system:poke','min','_ensureDesired','remove','_holderDead','status','_dedupeMax','_onTick','_statusEnv','_committed','uncaughtException','ESRCH','appendFileSync','data','removeSupervisedChild','MAX_POOL_HOLDS','pid','sync','join','execArgv','REMOVE','resetting','1862454kXvedg','commitP99Ms','role','get','map','enable','_heartbeatInFlight','updateSupervisedChildStats','VIEW_PROGRESS','_scheduleFlush','261895SVnmTq','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.','_assertUsable','\x20===','_sampleOwnStats','feed:','processorId','node:events','dumpedAt','ref:violation_resolved','clear','parkedNow','[okdb-cluster]\x20','okdb','startsWith',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','deregisterSelf','expiresAt','[okdb-cluster]\x20worker\x20pid=','_collectWriterFacet','_dedupeKey','startHeartbeat','_handlePoke','claimGated','recordWrite','registerIndex','_isReader','ENV_CLOSING_RETRY','_putRowSync','hostname','cpuPct','\x20\x20env=','\x20@\x20','env:removed','system','register','__esModule','_supervisorKey','cluster','info','seq','null','cpus','item:pending','then','reset','_lastCpuWindowMs','_envs','put','_maybePublish','load','fts:reset','ttl:clear','floor','ms\x20env=','runtimeProcessesView','ms\x20(attempt\x20','__okdbCluster','\x20\x20#','pushEphemeral','5JJJTCm','round','stats','_bpWaiters','name','schema:set','number','type:registered','release','_collectSingletonClaims','decommissioning','_caps','afterWrite','ppid','values','\x20HTTP\x20server(s)\x20on\x20port\x20','\x20│\x20','open','\x20(durable\x20desired-state)','_groupByProcess','push','_coordinator','_report','meta','\x20times\x20in\x20',',\x20signal=','connected','fast','slot','_handlePending','_bpParkedTotal','~processes','namespace','acquiredAt','cpuUsage','ingest','clearThreadStats','quantum','--eval','putNode','processingStatusView','_pending','_flushTimer','includes','\x20in\x20','_versionSkewWarned','split','closing','resolve','percentile','processing','node:perf_hooks','function',':want','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','mode','_onStop','_enableChangelog','_flushDebounce','item:create','depth','node/','_singletonLocks'];_0x2b1c=function(){return _0x3886ba;};return _0x2b1c();}function getDefaultExportFromCjs(_0x74629d){const _0x30cfe9=_0x1383d2;return _0x74629d&&_0x74629d[_0x30cfe9(0x85)]&&Object['prototype'][_0x30cfe9(0x1ee)][_0x30cfe9(0x15c)](_0x74629d,_0x30cfe9(0x206))?_0x74629d[_0x30cfe9(0x206)]:_0x74629d;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x5d88c7=_0x1383d2;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x2d7f3e={'PUT':_0x5d88c7(0x91),'REMOVE':_0x5d88c7(0x290),'INDEX_DROP':_0x5d88c7(0x105),'INDEX_REGISTER':_0x5d88c7(0x2c6),'INDEX_RESET':_0x5d88c7(0x1dd),'TYPE_REGISTER':_0x5d88c7(0x207),'TYPE_DROP':_0x5d88c7(0x1b0),'FTS_REGISTER':_0x5d88c7(0x182),'FTS_DROP':_0x5d88c7(0x194),'FTS_RESET':'resetFts','SCHEMA_SET':_0x5d88c7(0x1d0),'SCHEMA_DROP':_0x5d88c7(0x1da),'TTL_SET':_0x5d88c7(0x1dc),'TTL_CLEAR':'clearTtl'},_0x347b32={'SYSTEM_READY':'system:ready','FIELD_RESOLVER_REGISTERED':_0x5d88c7(0x1a9),'SYSTEM_STOPPED':_0x5d88c7(0x19e),'SYSTEM_CLOCK_CHANGE':_0x5d88c7(0x21d),'SYSTEM_POKE':_0x5d88c7(0x28d),'SYSTEM_DRAIN':_0x5d88c7(0x1e2),'SYSTEM_TYPE_DROP':'system:type_drop','SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x5d88c7(0x26b),'ITEM_CREATE':_0x5d88c7(0xd8),'ITEM_UPDATE':_0x5d88c7(0x1c7),'ITEM_REMOVE':'item:remove','ITEM_PENDING':_0x5d88c7(0x8c),'INDEX_RESET':_0x5d88c7(0x1ea),'INDEX_READY':'index:ready','INDEX_PROGRESS':_0x5d88c7(0x1e8),'VIEW_PROGRESS':_0x5d88c7(0x210),'INDEX_DROP':_0x5d88c7(0x176),'INDEX_REGISTERED':_0x5d88c7(0x19c),'FTS_REGISTERED':'fts:registered','FTS_DROP':_0x5d88c7(0x218),'FTS_RESET':_0x5d88c7(0x94),'SCHEMA_SET':_0x5d88c7(0xa2),'SCHEMA_DROP':_0x5d88c7(0x1f4),'UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':'unique:violation_resolved','REF_VIOLATION':'ref:violation','REF_VIOLATION_RESOLVED':_0x5d88c7(0x2b6),'SYNC_APPLY':'sync:apply','TXN_START':'txn:start','TXN_END':'txn:end','TXN_ROLLBACK':_0x5d88c7(0xee),'TYPE_REGISTERED':_0x5d88c7(0xa4),'TYPE_DROP':_0x5d88c7(0x127),'ENV_OPENED':_0x5d88c7(0x239),'ENV_REMOVED':_0x5d88c7(0x82),'SYSTEM_ENV_RELEASE':_0x5d88c7(0x160),'TTL_EXPIRED':_0x5d88c7(0x1c8),'TTL_SET':_0x5d88c7(0x10d),'TTL_CLEAR':_0x5d88c7(0x95),'LICENSE_INVALID':_0x5d88c7(0x199),'LICENSE_ADDED':_0x5d88c7(0x155),'LICENSE_ACTIVATED':_0x5d88c7(0x10e),'LICENSE_REMOVED':'license:removed'},_0x56a2d1={'CREATING':_0x5d88c7(0x240),'RESETTING':_0x5d88c7(0x2a2),'READY':_0x5d88c7(0x280),'DROPPING':_0x5d88c7(0x154),'WAITING':_0x5d88c7(0x173),'ERROR':_0x5d88c7(0x250)},_0x49596c={'CREATED':'created','STARTING':_0x5d88c7(0x12c),'STARTED':_0x5d88c7(0x270),'STOPPING':_0x5d88c7(0x217),'STOPPED':'stopped'},_0x4b2fad={'CREATING':_0x5d88c7(0x240),'READY':'ready','HALTED':_0x5d88c7(0xf5),'STOPPED':_0x5d88c7(0x231),'RESETTING':_0x5d88c7(0x2a2)},_0x4c6601=Object[_0x5d88c7(0x1ed)]({'POKE':'bus:poke','DRAIN':'bus:drain','TYPE_DROP':_0x5d88c7(0x187),'PROC':_0x5d88c7(0x24b),'ENV_RELEASE':_0x5d88c7(0x26a)});return okdbEnums={'BUS_EVENTS':_0x4c6601,'CHANGE_ACTIONS':_0x2d7f3e,'EVENTS':_0x347b32,'INDEX_STATE':_0x56a2d1,'OKDB_STATE':_0x49596c,'VIEW_STATE':_0x4b2fad},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x4f3b4a=_0x1383d2;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x2a1a5e,performance:_0x308b75}=require$$0,_0x1fe9fa=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x4f3b4a(0x10a),_0x5d2b2c=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x2e4b6f=process.env.OKDB_LOOP_LAG_ALL==='1',_0x465edc=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x4a99b0{constructor(){const _0x13a8cf=_0x4f3b4a;this[_0x13a8cf(0x1ce)]=_0x1fe9fa,this[_0x13a8cf(0x1de)]=new Map(),this['_h']=null,this['_timer']=null,this[_0x13a8cf(0x261)]=![],this[_0x13a8cf(0x143)]=(_0x1c7d7b,_0x2b8928)=>process[_0x13a8cf(0x144)][_0x13a8cf(0x1a3)](_0x1c7d7b+(_0x2b8928?'\x20'+JSON[_0x13a8cf(0x13c)](_0x2b8928):'')+'\x0a');}[_0x4f3b4a(0x26f)](){const _0x55a994=_0x4f3b4a;return _0x308b75[_0x55a994(0x26f)]();}['setLogger'](_0x1eae66){const _0x5064b4=_0x4f3b4a;if(typeof _0x1eae66==='function')this[_0x5064b4(0x143)]=_0x1eae66;}['note'](_0x4e9183,_0x38aa14,_0x331b1d){const _0x3b30bb=_0x4f3b4a;if(!this[_0x3b30bb(0x1ce)])return;let _0x1e8e71=this['_buckets'][_0x3b30bb(0x2a6)](_0x4e9183);!_0x1e8e71&&(_0x1e8e71={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this['_buckets'][_0x3b30bb(0x27e)](_0x4e9183,_0x1e8e71)),_0x1e8e71['ms']+=_0x38aa14,_0x1e8e71[_0x3b30bb(0x1b1)]+=0x1,_0x38aa14>_0x1e8e71[_0x3b30bb(0x124)]&&(_0x1e8e71[_0x3b30bb(0x124)]=_0x38aa14,_0x1e8e71['maxExtra']=_0x331b1d||'');}[_0x4f3b4a(0xdf)](_0x536abe){const _0x39b458=_0x4f3b4a;if(!this['enabled']||this[_0x39b458(0x261)])return;this[_0x39b458(0x261)]=!![];if(_0x536abe)this['_log']=_0x536abe;this['_h']=_0x2a1a5e({'resolution':0xa}),this['_h'][_0x39b458(0x2a8)](),this[_0x39b458(0x1e3)]=setInterval(()=>this[_0x39b458(0xb3)](),_0x5d2b2c);if(this[_0x39b458(0x1e3)]['unref'])this[_0x39b458(0x1e3)][_0x39b458(0x12e)]();}[_0x4f3b4a(0x24a)](_0x5ce18a){const _0xb86f69=_0x4f3b4a;if(!this['_windowCbs'])this[_0xb86f69(0x22c)]=new Set();this[_0xb86f69(0x22c)][_0xb86f69(0x1fb)](_0x5ce18a);if(!this[_0xb86f69(0x261)])this[_0xb86f69(0x15a)]();}['offWindow'](_0x5340ca){const _0x3099c7=_0x4f3b4a;this['_windowCbs']?.[_0x3099c7(0x264)](_0x5340ca);}[_0x4f3b4a(0x15a)](){const _0xf4cabe=_0x4f3b4a;if(this[_0xf4cabe(0x228)])return;this[_0xf4cabe(0x228)]=!![];!this['_h']&&(this['_h']=_0x2a1a5e({'resolution':0xa}),this['_h'][_0xf4cabe(0x2a8)]());const _0x1b468b=_0x5d2b2c;this[_0xf4cabe(0xf4)]=setInterval(()=>{const _0x2761f2=_0xf4cabe,_0x477886=this['_h'];if(!_0x477886)return;const _0x4bfa40=_0x477886[_0x2761f2(0xce)](0x63)/0xf4240,_0x5d2970=_0x477886[_0x2761f2(0x1c9)]/0xf4240,_0x48f5c4=_0x477886[_0x2761f2(0x1b9)]/0xf4240;_0x477886[_0x2761f2(0x8e)]();if(this[_0x2761f2(0x22c)])for(const _0x5872a2 of this['_windowCbs']){try{_0x5872a2({'p99Ms':_0x4bfa40,'maxMs':_0x5d2970,'meanMs':_0x48f5c4,'reportMs':_0x1b468b});}catch{}}},_0x1b468b);if(this[_0xf4cabe(0xf4)][_0xf4cabe(0x12e)])this['_admissionTimer'][_0xf4cabe(0x12e)]();}[_0x4f3b4a(0xb3)](){const _0x33f508=_0x4f3b4a,_0xd7706e=this['_h'],_0x80922=_0xd7706e['max']/0xf4240,_0x2d7fbc=_0xd7706e[_0x33f508(0xce)](0x63)/0xf4240,_0x3fb118=_0xd7706e[_0x33f508(0x1b9)]/0xf4240;_0xd7706e[_0x33f508(0x8e)]();const _0x5e3ac0=[...this[_0x33f508(0x1de)][_0x33f508(0x20c)]()][_0x33f508(0x2a7)](([_0x46108f,_0x19d38a])=>({'label':_0x46108f,..._0x19d38a}))[_0x33f508(0x283)]((_0x31d0fe,_0x44fc28)=>_0x44fc28['ms']-_0x31d0fe['ms'])[_0x33f508(0x1af)](0x0,0x8);this[_0x33f508(0x1de)][_0x33f508(0x2b7)]();const _0x38cad4=_0x5e3ac0[_0x33f508(0x22a)]((_0x4f4e21,_0xc1c24e)=>_0x4f4e21+_0xc1c24e['ms'],0x0),_0x3ddbd1=_0x5e3ac0[_0x33f508(0x2a7)](_0x5ed4ef=>_0x5ed4ef[_0x33f508(0x195)]+'='+_0x5ed4ef['ms']['toFixed'](0x0)+'ms/'+_0x5ed4ef[_0x33f508(0x1b1)]+(_0x5ed4ef[_0x33f508(0x124)]>0x5?'(worst\x20'+_0x5ed4ef[_0x33f508(0x124)][_0x33f508(0x225)](0x0)+'ms'+(_0x5ed4ef[_0x33f508(0x245)]?'\x20'+_0x5ed4ef[_0x33f508(0x245)]:'')+')':''));(_0x2e4b6f||_0x80922>=_0x465edc)&&this[_0x33f508(0x143)]('loop-lag\x20'+_0x5d2b2c+_0x33f508(0x20b)+_0x80922['toFixed'](0x0)+_0x33f508(0x24c)+_0x2d7fbc[_0x33f508(0x225)](0x0)+'ms\x20mean='+_0x3fb118['toFixed'](0x0)+_0x33f508(0x170)+_0x38cad4[_0x33f508(0x225)](0x0)+'ms'+(_0x3ddbd1[_0x33f508(0x243)]?_0x33f508(0xad)+_0x3ddbd1['join']('\x20\x20'):''),{'feature':_0x33f508(0xdc)});if(this[_0x33f508(0x22c)])for(const _0x168a43 of this[_0x33f508(0x22c)]){try{_0x168a43({'p99Ms':_0x2d7fbc,'maxMs':_0x80922,'meanMs':_0x3fb118,'reportMs':_0x5d2b2c});}catch{}}}[_0x4f3b4a(0x288)](){const _0x23b1af=_0x4f3b4a;if(this['_timer'])clearInterval(this[_0x23b1af(0x1e3)]);if(this['_h'])this['_h'][_0x23b1af(0xea)]();this[_0x23b1af(0x1e3)]=null,this['_h']=null,this['_started']=![];}}const _0x29cf64=new _0x4a99b0();if(_0x29cf64[_0x4f3b4a(0x1ce)])_0x29cf64[_0x4f3b4a(0xdf)]();return okdbLoopMonitor={'LOOP':_0x29cf64},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x5ac596=require$$0$1,_0x3f7c27=require$$1;let _0x423ae4,_0x3192a2,_0x12e525,_0x28d84c,_0x21637f,_0x122150,_0x58cab3,_0x2d7bdb=![];const _0x1bcbb3=new Set();let _0x3fd984=null;const _0x129f96=new Map();function _0xf2004b(){const _0x1f642f=_0x2fe0;if(_0x423ae4!==undefined)return _0x423ae4;_0x423ae4=process.env.OKDB_DIAG==='1';if(!_0x423ae4)return![];_0x3192a2=process.env.OKDB_DIAG_STACK==='1',_0x28d84c=Math[_0x1f642f(0x1c9)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x12e525=new Array(_0x28d84c),_0x21637f=0x0,_0x122150=0x0,_0x58cab3=process.env.OKDB_DIAG_DIR||null;if(_0x58cab3)try{_0x5ac596[_0x1f642f(0xfd)](_0x58cab3,{'recursive':!![]});}catch{}return!![];}function _0x146b36(){return _0x423ae4===undefined?_0xf2004b():_0x423ae4;}function _0x201422(_0xb08516,_0x132eb8){const _0x4f079d=_0x2fe0;if(_0x423ae4===undefined?!_0xf2004b():!_0x423ae4)return;let _0x3b4a83;if(_0x3192a2){const _0xc75c3f=new Error()['stack']||'';_0x3b4a83=_0xc75c3f[_0x4f079d(0xcb)]('\x0a')[_0x4f079d(0x1af)](0x3)['map'](_0x382fa4=>_0x382fa4[_0x4f079d(0x179)]())['filter'](Boolean)[_0x4f079d(0x1af)](0x0,0x8);}_0x12e525[_0x21637f]={'seq':_0x122150++,'t':Date['now'](),'env':_0xb08516,'kind':_0x132eb8||_0x4f079d(0x102),'stack':_0x3b4a83},_0x21637f=(_0x21637f+0x1)%_0x28d84c;}function _0x449182(_0x2ecd98){const _0x4828a4=[];for(let _0x56fc2b=0x0;_0x56fc2b<_0x28d84c;_0x56fc2b++){const _0x33a7c8=_0x12e525[(_0x21637f-0x1-_0x56fc2b+_0x28d84c*0x2)%_0x28d84c];if(!_0x33a7c8)continue;_0x4828a4['push'](_0x33a7c8);if(_0x4828a4['length']>=_0x2ecd98)break;}return _0x4828a4;}function _0x5b9e39(_0x2d153f){const _0x58a04b=_0x2fe0;try{process[_0x58a04b(0x144)]['write'](_0x2d153f+'\x0a');}catch{}if(_0x58cab3)try{_0x5ac596[_0x58a04b(0x299)](_0x3f7c27[_0x58a04b(0x29f)](_0x58cab3,_0x58a04b(0xfa)+process[_0x58a04b(0x29d)]+_0x58a04b(0x201)),_0x2d153f+'\x0a');}catch{}}function _0x13aad0(_0x669a6d){const _0x34b18d=_0x2fe0,_0x27b1b4=_0x449182(_0x669a6d);if(!_0x27b1b4[_0x34b18d(0x243)])return _0x34b18d(0x16c);const _0x674cf0=Date[_0x34b18d(0x26f)]();return _0x27b1b4['map'](_0x119efa=>{const _0x526c1d=_0x34b18d,_0x2ed6eb=_0x526c1d(0x9b)+_0x119efa[_0x526c1d(0x89)]+'\x20-'+(_0x674cf0-_0x119efa['t'])+_0x526c1d(0x97)+_0x119efa[_0x526c1d(0xed)]+'\x20'+_0x119efa[_0x526c1d(0x234)];return _0x119efa[_0x526c1d(0x25a)]&&_0x119efa['stack'][_0x526c1d(0x243)]?_0x2ed6eb+'\x0a\x20\x20\x20\x20\x20\x20'+_0x119efa[_0x526c1d(0x25a)][_0x526c1d(0x29f)](_0x526c1d(0x20d)):_0x2ed6eb;})[_0x34b18d(0x29f)]('\x0a');}function _0x29f1d4(_0x370f55,_0x5b4890){const _0x55b60c=_0x2fe0,_0x2555cb=_0x55b60c(0x22d)+_0x370f55+'\x20@\x20'+new Date()[_0x55b60c(0x220)]()+_0x55b60c(0x13e)+process[_0x55b60c(0x29d)]+_0x55b60c(0x2b0),_0x30df5e=[_0x2555cb,_0x55b60c(0x1aa)+(_0x5b4890&&_0x5b4890[_0x55b60c(0x25a)]?_0x5b4890[_0x55b60c(0x25a)][_0x55b60c(0xcb)]('\x0a')[0x0]:_0x5b4890),'recent\x20writes\x20(newest\x20first)'+(_0x3192a2?'':_0x55b60c(0x12b))+':',_0x13aad0(0x18),_0x3ea26b(),'='[_0x55b60c(0x1bf)](_0x2555cb['length']-0x1)];_0x5b9e39(_0x30df5e[_0x55b60c(0x29f)]('\x0a'));}function _0x2e7a6f(_0x3aa846){const _0x186c72=_0x2fe0;if(!_0x146b36())return;const _0x10a0f4=String(_0x3aa846&&_0x3aa846[_0x186c72(0x1b3)]||_0x3aa846||''),_0x151668=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x186c72(0x23f)](_0x10a0f4);_0x29f1d4(_0x151668?_0x186c72(0x181):_0x186c72(0x297),_0x3aa846);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x151668)return;try{console[_0x186c72(0x250)](_0x3aa846&&_0x3aa846['stack']?_0x3aa846[_0x186c72(0x25a)]:_0x3aa846);}catch{}process[_0x186c72(0x19a)](0x1);}function _0x5ea280(_0x2a01e1){const _0x724238=_0x2fe0;if(!_0x146b36())return;const _0x46384a=String(_0x2a01e1&&_0x2a01e1['message']||_0x2a01e1||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x724238(0x23f)](_0x46384a)&&_0x29f1d4(_0x724238(0xf7),_0x2a01e1);}function _0x3ea26b(){const _0x1492d6=_0x2fe0,_0x219486=['drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):'];let _0x5960f4=![];for(const _0x3c9e11 of _0x1bcbb3){const _0x29ba69=_0x3c9e11&&_0x3c9e11['_envs'];if(!_0x29ba69)continue;for(const [_0x313402,_0x15bdb7]of _0x29ba69){const _0x2a1829=_0x15bdb7&&_0x15bdb7[_0x1492d6(0xb2)]&&_0x15bdb7[_0x1492d6(0xb2)][_0x1492d6(0x159)];if(!_0x2a1829)continue;let _0x461cc2,_0x1fda55;try{_0x461cc2=Atomics[_0x1492d6(0x93)](_0x2a1829,0x0),_0x1fda55=Atomics[_0x1492d6(0x93)](_0x2a1829,0x1);}catch{continue;}if(_0x461cc2===0x0)continue;_0x5960f4=!![];const _0x5b6f83=_0x461cc2>0x0?_0x1492d6(0x163):'copy',_0x4ab0ce=Date[_0x1492d6(0x26f)]()-Math[_0x1492d6(0x28c)](_0x461cc2)*0x3e8,_0x11751b=((()=>{const _0x320057=_0x1492d6;try{return _0x15bdb7['_writer']&&_0x15bdb7['_writer'][_0x320057(0x292)]?_0x15bdb7[_0x320057(0x1a2)]['status']():null;}catch{return null;}})());_0x219486['push'](_0x1492d6(0x80)+_0x313402+'\x20phase='+_0x5b6f83+_0x1492d6(0x111)+_0x4ab0ce+'ms\x20activeWriters='+_0x1fda55+(_0x11751b?_0x1492d6(0x1e6)+_0x11751b[_0x1492d6(0xd9)]+_0x1492d6(0x191)+_0x11751b['oldestPendingMs']+'\x20parkedNow='+_0x11751b[_0x1492d6(0x2b8)]+'}':''));}}if(!_0x5960f4)_0x219486[_0x1492d6(0xb1)](_0x1492d6(0x26c));return _0x219486[_0x1492d6(0x29f)]('\x0a');}function _0x449e5c(){const _0x5d724f=_0x2fe0;if(!_0x146b36())return;const _0x2957bb=Math[_0x5d724f(0x1c9)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x57c5fd=Date[_0x5d724f(0x26f)]();for(const _0x3550cd of _0x1bcbb3){const _0x23ce32=_0x3550cd&&_0x3550cd['_envs'];if(!_0x23ce32)continue;for(const [_0x2485c2,_0x1688c7]of _0x23ce32){const _0x214ac7=_0x1688c7&&_0x1688c7[_0x5d724f(0xb2)]&&_0x1688c7['_coordinator'][_0x5d724f(0x159)];if(!_0x214ac7)continue;let _0x3c9903;try{_0x3c9903=Atomics[_0x5d724f(0x93)](_0x214ac7,0x0);}catch{continue;}const _0x37d6e7=_0x3550cd[_0x5d724f(0x189)]+'|'+_0x2485c2;if(_0x3c9903<=0x0){_0x129f96[_0x5d724f(0x264)](_0x37d6e7);continue;}const _0x4538be=_0x57c5fd-_0x3c9903*0x3e8,_0x526716=_0x129f96[_0x5d724f(0x2a6)](_0x37d6e7);if(_0x4538be<_0x2957bb)continue;if(_0x526716&&_0x57c5fd-_0x526716[_0x5d724f(0x2b5)]<_0x2957bb)continue;_0x129f96[_0x5d724f(0x27e)](_0x37d6e7,{'firstTs':_0x526716?_0x526716[_0x5d724f(0x258)]:_0x3c9903,'dumpedAt':_0x57c5fd});const _0x3ca92d=_0x5d724f(0x1f8)+_0x4538be+_0x5d724f(0x25c)+_0x2485c2+_0x5d724f(0x81)+new Date()[_0x5d724f(0x220)]()+_0x5d724f(0x13e)+process['pid']+_0x5d724f(0x2b0);_0x5b9e39([_0x3ca92d,_0x3ea26b(),'='[_0x5d724f(0x1bf)](_0x3ca92d['length']-0x1)]['join']('\x0a'));}}}function _0x14b00f(){const _0x47abd7=_0x2fe0;if(!_0x146b36()||_0x2d7bdb)return;_0x2d7bdb=!![],process[_0x47abd7(0x192)](_0x47abd7(0x297),_0x2e7a6f),process[_0x47abd7(0x192)](_0x47abd7(0x251),_0x5ea280);const _0x189803=Math[_0x47abd7(0x1c9)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x3fd984=setInterval(_0x449e5c,_0x189803);if(_0x3fd984[_0x47abd7(0x12e)])_0x3fd984[_0x47abd7(0x12e)]();}function _0x498b39(_0x242fa7){const _0x4a2093=_0x2fe0;if(!_0x146b36()||!_0x242fa7)return;_0x1bcbb3[_0x4a2093(0x1fb)](_0x242fa7),_0x14b00f();}function _0x19d505(_0x2c2b68){_0x1bcbb3['delete'](_0x2c2b68);}function _0x21e1b9(){if(!_0x146b36())return{'enabled':![],'hint':'set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)'};return{'enabled':!![],'stackCapture':!!_0x3192a2,'recentWrites':_0x449182(0x10),'drain':_0x3ea26b()};}return okdbDiag={'isEnabled':_0x146b36,'recordWrite':_0x201422,'installDiag':_0x14b00f,'registerOkdb':_0x498b39,'unregisterOkdb':_0x19d505,'snapshot':_0x21e1b9},okdbDiag;}function _0x2fe0(_0xc0320e,_0x2fce2b){_0xc0320e=_0xc0320e-0x7c;const _0x2b1c79=_0x2b1c();let _0x2fe061=_0x2b1c79[_0xc0320e];return _0x2fe061;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x1cad83=_0x1383d2;if(hasRequiredOkdbWriter)return okdbWriter[_0x1cad83(0x180)];hasRequiredOkdbWriter=0x1;const {performance:_0xd2cf61}=require$$0$2,_0x23f70a=requireOkdbDiag(),_0x1b7eb3=process.env.OKDB_COMMIT_MODE===_0x1cad83(0x29e);class _0x587c12{constructor(_0x479ac1){const _0x21ea1c=_0x1cad83;this['env']=_0x479ac1,this[_0x21ea1c(0x17e)]=new Set(),this[_0x21ea1c(0x11b)]=new Map(),this[_0x21ea1c(0x296)]=0x0,this[_0x21ea1c(0x164)]=[],this['_done']=[],this[_0x21ea1c(0x1c0)]=Math['max'](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x21ea1c(0x17f)]=0x0,this[_0x21ea1c(0xa0)]=[],this['_bpParkedTotal']=0x0,this['_held']=null,this[_0x21ea1c(0x1fe)]=0x0,this[_0x21ea1c(0x198)]=0x0,this[_0x21ea1c(0x222)]=![];}async[_0x1cad83(0x101)](_0x3477da,_0x1f31e8,{admitted:admitted=![]}={}){const _0x4bbac6=_0x1cad83;if(_0x23f70a[_0x4bbac6(0x107)]())_0x23f70a[_0x4bbac6(0x2c5)](this['env']?.['name'],_0x1f31e8);if(this[_0x4bbac6(0x208)]){const _0x322321=new Error(_0x4bbac6(0x1ba));_0x322321[_0x4bbac6(0x138)]=_0x4bbac6(0x7c);throw _0x322321;}if(this['_highWater']>0x0){let _0x40f3f6=![];while(this[_0x4bbac6(0x17f)]>=this[_0x4bbac6(0x1c0)]&&!this[_0x4bbac6(0x208)]){!_0x40f3f6&&(_0x40f3f6=!![],this['_bpParkedTotal']++),await new Promise(_0x28296c=>this[_0x4bbac6(0xa0)]['push'](_0x28296c));}if(this[_0x4bbac6(0x208)]){const _0x36816e=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x36816e[_0x4bbac6(0x138)]=_0x4bbac6(0x7c);throw _0x36816e;}}this[_0x4bbac6(0x17f)]++;const _0x410451=admitted?null:this['env'][_0x4bbac6(0xb2)];for(;;){while(this[_0x4bbac6(0x1b8)])await this[_0x4bbac6(0x1b8)];if(_0x410451)try{await _0x410451[_0x4bbac6(0x139)]();}catch(_0x4d9346){this[_0x4bbac6(0x17f)]--;if(this[_0x4bbac6(0xa0)][_0x4bbac6(0x243)]&&this[_0x4bbac6(0x17f)]<this[_0x4bbac6(0x1c0)])this['_bpWaiters'][_0x4bbac6(0x246)]()();throw _0x4d9346;}if(!this[_0x4bbac6(0x1b8)])break;if(_0x410451)_0x410451[_0x4bbac6(0xa9)]();}if(this['_closed']){if(_0x410451)_0x410451[_0x4bbac6(0xa9)]();this['_outstanding']--;if(this[_0x4bbac6(0xa0)][_0x4bbac6(0x243)]&&this[_0x4bbac6(0x17f)]<this[_0x4bbac6(0x1c0)])this[_0x4bbac6(0xa0)][_0x4bbac6(0x246)]()();const _0x19a865=new Error(_0x4bbac6(0x1ba));_0x19a865[_0x4bbac6(0x138)]='ENV_CLOSING_RETRY';throw _0x19a865;}const _0x4597fe=_0xd2cf61[_0x4bbac6(0x26f)]();if(_0x1b7eb3)try{const _0x4171e4=this[_0x4bbac6(0xed)]['db'][_0x4bbac6(0x204)](_0x3477da);this[_0x4bbac6(0x296)]++;if(this[_0x4bbac6(0x164)][_0x4bbac6(0xb1)](_0xd2cf61[_0x4bbac6(0x26f)]()-_0x4597fe)>0x100)this[_0x4bbac6(0x164)]['shift']();if(this[_0x4bbac6(0x183)][_0x4bbac6(0xb1)](_0xd2cf61[_0x4bbac6(0x26f)]())>0x800)this[_0x4bbac6(0x183)][_0x4bbac6(0x246)]();return _0x4171e4;}finally{this[_0x4bbac6(0x17f)]--;if(this['_bpWaiters'][_0x4bbac6(0x243)]&&this['_outstanding']<this[_0x4bbac6(0x1c0)])this[_0x4bbac6(0xa0)][_0x4bbac6(0x246)]()();if(_0x410451)_0x410451[_0x4bbac6(0xa9)]();}let _0x3bb020=null;const _0x3b04e8=()=>{const _0x44f4fb=_0x4bbac6,_0x5bc8c7=_0x3477da();if(_0x5bc8c7&&typeof _0x5bc8c7[_0x44f4fb(0x8d)]==='function'&&!_0x3bb020){this['_heldTotal']++;let _0x165da5;const _0x580d36=new Promise(_0x272dde=>_0x165da5=_0x272dde);this['_held']=_0x580d36,_0x3bb020=()=>{if(this['_held']===_0x580d36)this['_held']=null;_0x165da5();};}return _0x5bc8c7;};let _0x12613e;try{_0x12613e=this[_0x4bbac6(0xed)]['db'][_0x4bbac6(0x263)](_0x3b04e8);}catch(_0x1cacde){_0x12613e=Promise['reject'](_0x1cacde);}(!_0x12613e||typeof _0x12613e['then']!=='function')&&(this['_nestedTotal']++,!this[_0x4bbac6(0x222)]&&(this[_0x4bbac6(0x222)]=!![],console[_0x4bbac6(0xdd)]('okdb-writer['+(this['env']?.[_0x4bbac6(0xa1)]??'?')+']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller')),_0x12613e=Promise[_0x4bbac6(0xcd)](_0x12613e));const _0x3f3d06=()=>{if(_0x3bb020)_0x3bb020();};_0x12613e[_0x4bbac6(0x8d)](_0x3f3d06,_0x3f3d06),this[_0x4bbac6(0x17e)][_0x4bbac6(0x1fb)](_0x12613e),this[_0x4bbac6(0x11b)][_0x4bbac6(0x27e)](_0x12613e,_0x4597fe);const _0x782c1d=()=>{const _0x515bcb=_0x4bbac6;this[_0x515bcb(0x17e)]['delete'](_0x12613e),this[_0x515bcb(0x11b)]['delete'](_0x12613e),this[_0x515bcb(0x296)]++,this[_0x515bcb(0x17f)]--;this['_bpWaiters'][_0x515bcb(0x243)]&&this[_0x515bcb(0x17f)]<this[_0x515bcb(0x1c0)]&&this['_bpWaiters'][_0x515bcb(0x246)]()();if(this[_0x515bcb(0x164)]['push'](_0xd2cf61[_0x515bcb(0x26f)]()-_0x4597fe)>0x100)this[_0x515bcb(0x164)][_0x515bcb(0x246)]();if(this['_done'][_0x515bcb(0xb1)](_0xd2cf61['now']())>0x800)this[_0x515bcb(0x183)]['shift']();};_0x12613e[_0x4bbac6(0x8d)](_0x782c1d,_0x782c1d);try{return await _0x12613e;}finally{if(_0x410451)_0x410451[_0x4bbac6(0xa9)]();}}[_0x1cad83(0x292)](){const _0x3eebb2=_0x1cad83,_0x321f6a=_0xd2cf61[_0x3eebb2(0x26f)]();let _0x11d0bc=0x0;for(const _0x48b3a3 of this[_0x3eebb2(0x11b)][_0x3eebb2(0xab)]()){const _0x1db7f9=_0x321f6a-_0x48b3a3;if(_0x1db7f9>_0x11d0bc)_0x11d0bc=_0x1db7f9;}let _0x4dbe5d=0x0;for(let _0x5353a7=this[_0x3eebb2(0x183)]['length']-0x1;_0x5353a7>=0x0;_0x5353a7--){if(_0x321f6a-this[_0x3eebb2(0x183)][_0x5353a7]>0x3e8)break;_0x4dbe5d++;}let _0x3d68f3=0x0;if(this[_0x3eebb2(0x164)]['length']){const _0x440cfa=[...this[_0x3eebb2(0x164)]][_0x3eebb2(0x283)]((_0x3a1c79,_0x268c50)=>_0x3a1c79-_0x268c50);_0x3d68f3=_0x440cfa[Math[_0x3eebb2(0x28e)](_0x440cfa[_0x3eebb2(0x243)]-0x1,Math[_0x3eebb2(0x96)](_0x440cfa['length']*0.99))];}return{'depth':this[_0x3eebb2(0x17e)][_0x3eebb2(0x1a8)],'oldestPendingMs':Math[_0x3eebb2(0x9e)](_0x11d0bc),'committed':this[_0x3eebb2(0x296)],'commitsPerSec':_0x4dbe5d,'commitP99Ms':Math[_0x3eebb2(0x9e)](_0x3d68f3),'parkedNow':this[_0x3eebb2(0xa0)]['length'],'parkedTotal':this[_0x3eebb2(0xbb)],'highWater':this['_highWater']};}[_0x1cad83(0xe0)](){const _0x340bbc=_0x1cad83,_0x443186=_0xd2cf61[_0x340bbc(0x26f)]();return[...this['_enqueuedAt'][_0x340bbc(0xab)]()][_0x340bbc(0x2a7)](_0x3d31c6=>Math[_0x340bbc(0x9e)](_0x443186-_0x3d31c6))[_0x340bbc(0x283)]((_0x3d3dca,_0x1c87ad)=>_0x1c87ad-_0x3d3dca);}['markClosed'](){const _0x56fea1=_0x1cad83;this['_closed']=!![];for(const _0xc5a57b of this[_0x56fea1(0xa0)]['splice'](0x0))_0xc5a57b();}async[_0x1cad83(0x1f9)](){const _0x44a7ad=_0x1cad83;let _0x505298=0x0;while(this['_inflight'][_0x44a7ad(0x1a8)]&&_0x505298++<0x3e8){await Promise[_0x44a7ad(0x15d)]([...this['_inflight']]);}}async['put'](_0x58b2a1,_0x2db002,_0x526f8f,_0x489d45){const _0x28bf2f=_0x1cad83;return this[_0x28bf2f(0x101)](()=>{const _0x38b308=_0x28bf2f;if(_0x489d45===undefined)_0x58b2a1[_0x38b308(0x26d)](_0x2db002,_0x526f8f);else _0x58b2a1[_0x38b308(0x26d)](_0x2db002,_0x526f8f,_0x489d45);},_0x28bf2f(0x244));}async[_0x1cad83(0x290)](_0x264d57,_0x5795ba){const _0x35e248=_0x1cad83;return this[_0x35e248(0x101)](()=>_0x264d57[_0x35e248(0x16b)](_0x5795ba),_0x35e248(0x13f));}}async function _0x2b4714(_0x4d40fa,_0x59a054){const _0x3f4810=_0x1cad83;if(_0x59a054==null)_0x59a054=Math[_0x3f4810(0x1c9)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x20200c=_0x4d40fa?.['flushed'];if(!_0x20200c||typeof _0x20200c[_0x3f4810(0x8d)]!==_0x3f4810(0xd1))return;await Promise[_0x3f4810(0x28b)]([Promise['resolve'](_0x20200c)[_0x3f4810(0x267)](()=>{}),new Promise(_0x4db935=>{const _0x431a55=_0x3f4810,_0x4d8ec7=setTimeout(_0x4db935,_0x59a054);if(_0x4d8ec7['unref'])_0x4d8ec7[_0x431a55(0x12e)]();})]);}catch{}}function _0x5974cc(_0x1b0aca){const _0x4fd484=_0x1cad83;if(_0x1b7eb3)return Promise[_0x4fd484(0xcd)]();const _0x1144c5=_0x1b0aca?.[_0x4fd484(0xf9)];return _0x1144c5&&typeof _0x1144c5[_0x4fd484(0x8d)]==='function'?_0x1144c5:Promise[_0x4fd484(0xcd)]();}const _0x27462c=Math[_0x1cad83(0x1c9)](0x1,Math['floor'](Number(process.env.UV_THREADPOOL_SIZE))||0x4),_0x187185=Math[_0x1cad83(0x1c9)](0x1,_0x27462c-0x2);let _0x21b5c3=0x0;const _0xdb11df=[];async function _0x3dd99f(_0x5705ff){const _0x54af2b=_0x1cad83;if(_0x21b5c3<_0x187185)_0x21b5c3++;else await new Promise(_0x3e4d4d=>_0xdb11df[_0x54af2b(0xb1)](_0x3e4d4d));try{return await _0x5705ff();}finally{const _0xe7ace9=_0xdb11df[_0x54af2b(0x246)]();if(_0xe7ace9)_0xe7ace9();else _0x21b5c3--;}}return okdbWriter[_0x1cad83(0x180)]=_0x587c12,okdbWriter['exports'][_0x1cad83(0x1b6)]=_0x3dd99f,okdbWriter[_0x1cad83(0x180)][_0x1cad83(0x29c)]=_0x187185,okdbWriter['exports'][_0x1cad83(0x233)]=_0x2b4714,okdbWriter[_0x1cad83(0x180)][_0x1cad83(0xf9)]=_0x5974cc,okdbWriter[_0x1cad83(0x180)]['SYNC_COMMITS']=_0x1b7eb3,okdbWriter['exports'];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x3202ed=_0x1383d2;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x4cbc8c=require$$0$3,{SYNC_COMMITS:_0x5687fd}=requireOkdbWriter(),_0x48ddc8=_0x3202ed(0x274);class _0x3431a6{constructor(_0x408933,_0x5a4957,_0x1f2515){const _0x53c249=_0x3202ed;this[_0x53c249(0x23b)]=_0x408933,this[_0x53c249(0x12a)]=_0x5a4957,this['_acquiredAt']=_0x1f2515,this[_0x53c249(0x197)]=![],this[_0x53c249(0x119)]=null,this['_heartbeatInFlight']=null;}[_0x3202ed(0xe8)](){const _0x37aa26=_0x3202ed;if(this[_0x37aa26(0x197)])return![];try{const _0x22cc76=this[_0x37aa26(0x23b)][_0x37aa26(0x14e)]()[_0x37aa26(0x2a6)](this['_key']);if(!_0x22cc76||_0x22cc76['acquiredAt']!==this[_0x37aa26(0x19d)])return![];const _0x4460c6=_0x22cc76['updatedAt']??_0x22cc76[_0x37aa26(0xbe)];if(_0x4460c6+_0x22cc76[_0x37aa26(0x1a6)]<Date[_0x37aa26(0x26f)]())return![];return!![];}catch{return!this[_0x37aa26(0x197)];}}[_0x3202ed(0x23a)](){const _0x79336f=_0x3202ed;if(this[_0x79336f(0x197)])return null;try{return this['_lock'][_0x79336f(0x14e)]()[_0x79336f(0x2a6)](this[_0x79336f(0x12a)])??null;}catch{return null;}}async[_0x3202ed(0x10f)](_0x4bd86f){const _0x1efb97=_0x3202ed;if(this['_released'])return;try{if(this[_0x1efb97(0x23b)][_0x1efb97(0x208)]())return;const _0x187afa=this['_lock']['_db']()[_0x1efb97(0x2a6)](this[_0x1efb97(0x12a)]);if(!_0x187afa||_0x187afa[_0x1efb97(0xbe)]!==this[_0x1efb97(0x19d)])return;if(_0x5687fd)this[_0x1efb97(0x23b)]['_db']()['putSync'](this[_0x1efb97(0x12a)],{..._0x187afa,'ttlMs':_0x187afa[_0x1efb97(0x1a6)]+_0x4bd86f});else await this[_0x1efb97(0x23b)][_0x1efb97(0x14e)]()[_0x1efb97(0x91)](this['_key'],{..._0x187afa,'ttlMs':_0x187afa[_0x1efb97(0x1a6)]+_0x4bd86f});}catch{}}async[_0x3202ed(0xa5)](){const _0x58df2e=_0x3202ed;if(this['_released'])return;if(this['_heartbeatInFlight'])try{await this[_0x58df2e(0x2a9)];}catch{}clearInterval(this[_0x58df2e(0x119)]),this[_0x58df2e(0x119)]=null,this[_0x58df2e(0x197)]=!![];try{if(this[_0x58df2e(0x23b)][_0x58df2e(0x208)]())return;const _0x534d52=this[_0x58df2e(0x23b)]['_db']()[_0x58df2e(0x2a6)](this['_key']);if(_0x534d52&&_0x534d52[_0x58df2e(0xbe)]===this[_0x58df2e(0x19d)]){if(_0x5687fd)this[_0x58df2e(0x23b)]['_db']()[_0x58df2e(0x16b)](this[_0x58df2e(0x12a)]);else await this[_0x58df2e(0x23b)][_0x58df2e(0x14e)]()[_0x58df2e(0x290)](this[_0x58df2e(0x12a)]);}}catch{}}[_0x3202ed(0x18f)](_0x22351e,_0x3a5623){const _0x563e8d=_0x3202ed,_0x3b2c8a=_0x3a5623??Math[_0x563e8d(0x96)](_0x22351e/0x3);this['_heartbeatTimer']=setInterval(()=>{const _0x51fdb8=_0x563e8d;if(this[_0x51fdb8(0x197)])return;this[_0x51fdb8(0x2a9)]=((async()=>{const _0x415243=_0x51fdb8;try{if(this['_lock'][_0x415243(0x208)]())return;const _0x34c80c=this[_0x415243(0x23b)]['_db']()['get'](this['_key']);if(!_0x34c80c||_0x34c80c[_0x415243(0xbe)]!==this[_0x415243(0x19d)]){this[_0x415243(0x197)]=!![],clearInterval(this[_0x415243(0x119)]),this['_heartbeatTimer']=null;return;}if(_0x5687fd)this['_lock']['_db']()[_0x415243(0x26d)](this[_0x415243(0x12a)],{..._0x34c80c,'updatedAt':Date[_0x415243(0x26f)]()});else await this[_0x415243(0x23b)][_0x415243(0x14e)]()[_0x415243(0x91)](this[_0x415243(0x12a)],{..._0x34c80c,'updatedAt':Date[_0x415243(0x26f)]()});}catch{}this[_0x415243(0x2a9)]=null;})());},_0x3b2c8a);if(this[_0x563e8d(0x119)]['unref'])this[_0x563e8d(0x119)][_0x563e8d(0x12e)]();}}class _0x312597{constructor(_0x4434d8,{namespace:_0x306af2,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x1e5b81=_0x3202ed;this['_rawDb']=_0x4434d8,this['namespace']=_0x306af2,this[_0x1e5b81(0x1a6)]=ttlMs,this[_0x1e5b81(0x16f)]=heartbeatMs,this[_0x1e5b81(0x17a)]=null;}[_0x3202ed(0x14e)](){const _0x3c0763=_0x3202ed;return this[_0x3c0763(0x2af)](),(!this[_0x3c0763(0x17a)]||this[_0x3c0763(0x212)]!==this['_rawDb'])&&(this['_lockDb']=this[_0x3c0763(0x226)]['openDB'](_0x48ddc8,{'dupSort':![]}),this[_0x3c0763(0x212)]=this[_0x3c0763(0x226)]),this[_0x3c0763(0x17a)];}[_0x3202ed(0xf2)](){const _0x19a85e=_0x3202ed;return this['_assertUsable'](),(!this['_wantDbHandle']||this['_wantDbOf']!==this[_0x19a85e(0x226)])&&(this[_0x19a85e(0x157)]=this[_0x19a85e(0x226)]['openDB'](_0x48ddc8+_0x19a85e(0xd2),{'dupSort':![]}),this[_0x19a85e(0x24f)]=this[_0x19a85e(0x226)]),this['_wantDbHandle'];}[_0x3202ed(0x208)](){const _0x59e983=_0x3202ed,_0x2b2c4d=this[_0x59e983(0x226)]?.[_0x59e983(0x292)];return _0x2b2c4d===_0x59e983(0xcc)||_0x2b2c4d===_0x59e983(0xe9);}[_0x3202ed(0x2af)](){const _0xd9709a=_0x3202ed;if(this[_0xd9709a(0x208)]())throw new Error(_0xd9709a(0x1b7));}[_0x3202ed(0x12a)](_0x10493d){const _0x27d9e6=_0x3202ed;return this[_0x27d9e6(0xbd)]+':'+_0x10493d;}['signalWant'](_0x47367d){const _0x1f9127=_0x3202ed;try{if(this[_0x1f9127(0x208)]())return;_0x5687fd?this[_0x1f9127(0xf2)]()[_0x1f9127(0x26d)](this[_0x1f9127(0x12a)](_0x47367d),Date[_0x1f9127(0x26f)]()):this['_wantDb']()[_0x1f9127(0x91)](this[_0x1f9127(0x12a)](_0x47367d),Date['now']())?.[_0x1f9127(0x267)]?.(()=>{});}catch{}}['isWanted'](_0x2ba853,_0x2dd0d2=0x3e8){const _0x5858e2=_0x3202ed;try{const _0x1ab23f=this['_wantDb']()['get'](this[_0x5858e2(0x12a)](_0x2ba853));return typeof _0x1ab23f===_0x5858e2(0xa3)&&Date[_0x5858e2(0x26f)]()-_0x1ab23f<_0x2dd0d2;}catch{return![];}}[_0x3202ed(0x21a)](_0x30ab70){const _0x47158f=_0x3202ed,_0x6f1c4=_0x30ab70['updatedAt']??_0x30ab70[_0x47158f(0xbe)];return _0x6f1c4+_0x30ab70[_0x47158f(0x1a6)]<Date[_0x47158f(0x26f)]();}static[_0x3202ed(0x291)](_0x374c6b){const _0x4e064f=_0x3202ed,_0x5510f3=_0x374c6b?.[_0x4e064f(0x23a)];if(!_0x5510f3||typeof _0x5510f3[_0x4e064f(0x29d)]!=='number')return![];if(_0x5510f3[_0x4e064f(0x7e)]!==_0x4cbc8c['hostname']())return![];if(_0x5510f3[_0x4e064f(0x29d)]===process['pid'])return![];try{return process[_0x4e064f(0x27f)](_0x5510f3[_0x4e064f(0x29d)],0x0),![];}catch(_0x4f5b8){return _0x4f5b8[_0x4e064f(0x138)]===_0x4e064f(0x298);}}async['tryAcquire'](_0x495ffc,_0x2b7d12={},_0x4a35d8={}){const _0x5f25d6=_0x3202ed,_0x33674c=this['_key'](_0x495ffc),_0x1a1914=_0x4a35d8[_0x5f25d6(0x1a6)]??this[_0x5f25d6(0x1a6)],_0x72d2e2=Date[_0x5f25d6(0x26f)](),_0x785956={'holder':{'pid':process[_0x5f25d6(0x29d)],'hostname':_0x4cbc8c[_0x5f25d6(0x7e)](),..._0x2b7d12},'acquiredAt':_0x72d2e2,'updatedAt':_0x72d2e2,'ttlMs':_0x1a1914};let _0x20eb90=![],_0x10ff53=null;if(this[_0x5f25d6(0x208)]())return{'acquired':![],'handle':null,'current':null};try{const _0x35cdcc=()=>{const _0x5a724b=_0x5f25d6,_0x352f3a=this[_0x5a724b(0x14e)]()[_0x5a724b(0x2a6)](_0x33674c);if(_0x352f3a&&!this['_isStale'](_0x352f3a)&&!_0x312597[_0x5a724b(0x291)](_0x352f3a)){const _0x1b396c=_0x2b7d12[_0x5a724b(0x2b3)]!=null&&_0x352f3a[_0x5a724b(0x23a)][_0x5a724b(0x29d)]===process[_0x5a724b(0x29d)]&&_0x352f3a['holder'][_0x5a724b(0x2b3)]===_0x2b7d12[_0x5a724b(0x2b3)];if(!_0x1b396c){_0x20eb90=![],_0x10ff53=_0x352f3a;return;}_0x785956['acquiredAt']<=_0x352f3a[_0x5a724b(0xbe)]&&(_0x785956['acquiredAt']=_0x352f3a[_0x5a724b(0xbe)]+0x1,_0x785956[_0x5a724b(0x286)]=_0x785956[_0x5a724b(0xbe)]);}this[_0x5a724b(0x14e)]()[_0x5a724b(0x91)](_0x33674c,_0x785956),_0x20eb90=!![],_0x10ff53=_0x785956;};if(_0x5687fd)this[_0x5f25d6(0x14e)]()[_0x5f25d6(0x204)](_0x35cdcc);else await this[_0x5f25d6(0x14e)]()[_0x5f25d6(0x263)](_0x35cdcc);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x20eb90)return{'acquired':![],'handle':null,'current':_0x10ff53};const _0x287960=new _0x3431a6(this,_0x33674c,_0x785956[_0x5f25d6(0xbe)]);return _0x287960[_0x5f25d6(0x18f)](_0x1a1914,this[_0x5f25d6(0x16f)]),{'acquired':!![],'handle':_0x287960,'current':_0x10ff53};}['inspect'](_0x12d61e){const _0x5be763=_0x3202ed;try{return this['_db']()['get'](this[_0x5be763(0x12a)](_0x12d61e))??null;}catch{return null;}}['list'](){const _0x452f21=_0x3202ed,_0x48e7ba=this[_0x452f21(0xbd)]+':',_0x14721c=[];try{for(const {key:_0xd2ea04,value:_0x32a989}of this[_0x452f21(0x14e)]()[_0x452f21(0x1c3)]({'start':_0x48e7ba,'end':_0x48e7ba+'\xff'})){typeof _0xd2ea04==='string'&&_0xd2ea04[_0x452f21(0x2bb)](_0x48e7ba)&&_0x14721c[_0x452f21(0xb1)]({'id':_0xd2ea04[_0x452f21(0x1af)](_0x48e7ba[_0x452f21(0x243)]),'entry':_0x32a989});}}catch{}return _0x14721c;}static[_0x3202ed(0x123)](_0x441f8f){const _0x301bf7=_0x3202ed,_0x1e075b=[];try{const _0x5692c9=_0x441f8f[_0x301bf7(0x149)](_0x48ddc8,{'dupSort':![]});for(const {key:_0x2b1af3,value:_0x6f5540}of _0x5692c9[_0x301bf7(0x1c3)]({})){if(typeof _0x2b1af3!==_0x301bf7(0x236))continue;const _0x2192c1=_0x2b1af3[_0x301bf7(0xff)](':');if(_0x2192c1<0x1)continue;_0x1e075b[_0x301bf7(0xb1)]({'namespace':_0x2b1af3[_0x301bf7(0x1af)](0x0,_0x2192c1),'id':_0x2b1af3[_0x301bf7(0x1af)](_0x2192c1+0x1),'entry':_0x6f5540});}}catch{}return _0x1e075b;}}return okdbLock={'OKDBLock':_0x312597},okdbLock;}var version=_0x1383d2(0x113),require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x31854b=_0x1383d2;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x38474c=require$$0$3,_0x3c5db5=require$$1$1,_0x12e936=require$$2,{LOOP:_0x212f76}=requireOkdbLoopMonitor(),{OKDBLock:_0x5e0e06}=requireOkdbLock(),{SYNC_COMMITS:_0x4d57ac}=requireOkdbWriter(),_0x4181c5=_0x31854b(0xbc),_0x5f0107=_0x31854b(0x1ab),_0xd36915='~processes:desired',_0x404721='~processes:cmd',_0x5bb0f0=(_0x56bbd3,_0x2d9283)=>_0x56bbd3+':'+_0x2d9283,_0x53f064=(_0x325791,_0x231392)=>_0x325791+'::'+_0x231392,_0x10a4ca=(_0x45768f,_0xe3427e)=>_0x45768f+'/'+_0xe3427e,_0x155c92=(_0x3ec002,_0x38ce6b)=>_0x3ec002+'#'+_0x38ce6b,_0x113fc1=_0x292194=>{const _0x102bbe=_0x31854b;if(_0x292194?.[_0x102bbe(0x162)])return _0x292194[_0x102bbe(0x162)];const _0x142e49=_0x292194?.[_0x102bbe(0x227)];return typeof _0x142e49===_0x102bbe(0x236)&&_0x142e49[_0x102bbe(0xc8)]('#')?_0x142e49[_0x102bbe(0x1af)](0x0,_0x142e49[_0x102bbe(0xff)]('#')):_0x142e49;},_0x1cffbf=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x1d6332=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x5397d1=_0x1cffbf*0x3,_0x2f75bf=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x31854b(0x1c9)](0x927c0,_0x5397d1*0x14),_0x218a3d=[_0x31854b(0x1c1),_0x31854b(0x277),_0x31854b(0x110),_0x31854b(0x23c),_0x31854b(0x1ae),_0x31854b(0x172)];let _0x371ab4=null;function _0x3b877a(){const _0x14a56f=_0x31854b;if(_0x371ab4==null)_0x371ab4=Math[_0x14a56f(0x9e)]((Date[_0x14a56f(0x26f)]()-process[_0x14a56f(0x14d)]()*0x3e8)/0x3e8)*0x3e8;return _0x371ab4;}function _0x57b2dd(_0x5230df){const _0xb64131=_0x31854b;if(process.env.OKDB_PROCESS_KILL===_0xb64131(0x20f))return![];if(_0x5230df?.[_0xb64131(0x1c5)]?.[_0xb64131(0x140)]&&typeof _0x5230df['options'][_0xb64131(0x140)]===_0xb64131(0x273)&&_0x5230df['options']['processes']['kill']===![])return![];return!![];}function _0x52c120(_0x1469a8,_0x55ad77){const _0x5ecf50=_0x31854b,_0x32ac92=!!_0x55ad77?.[_0x5ecf50(0x1b4)];switch(_0x1469a8){case _0x5ecf50(0x1c6):return{'controllable':_0x32ac92,'decommissionable':![],'killable':!![],'killConfirm':'cluster-wide'};case _0x5ecf50(0xe1):case _0x5ecf50(0x1e4):return{'controllable':_0x32ac92,'decommissionable':![],'killable':!![],'killConfirm':_0x5ecf50(0x1fa)};case'embedded':return{'controllable':![],'decommissionable':![],'killable':![]};case _0x5ecf50(0x242):case _0x5ecf50(0x13b):case _0x5ecf50(0x171):case'worker':return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x5ecf50(0x13a)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x4b6f2f{constructor(_0x1d334b){const _0x502a1e=_0x31854b;this[_0x502a1e(0x2ba)]=_0x1d334b,this['_statusEnv']=null,this['_desired']=null,this[_0x502a1e(0x25d)]=new Map(),this['_cmd']=null,this[_0x502a1e(0x128)]=![],this[_0x502a1e(0x2c7)]=![],this[_0x502a1e(0x167)]=_0x3b877a(),this['_selfKey']=_0x5bb0f0(process[_0x502a1e(0x29d)],this[_0x502a1e(0x167)]),this['_instanceId']=_0x12e936[_0x502a1e(0x22e)]()[_0x502a1e(0x1af)](0x0,0x8),this['_rowKey']=_0x155c92(this[_0x502a1e(0x1d3)],this[_0x502a1e(0x248)]),this['_startedAt']=Date[_0x502a1e(0x26f)](),this[_0x502a1e(0x23d)]=null,this[_0x502a1e(0x86)]=null,this[_0x502a1e(0x255)]=null,this[_0x502a1e(0x20e)]=null,this[_0x502a1e(0x1bc)]=null,this['_onTick']=null,this[_0x502a1e(0x219)]=0x0,this['_ownMeta']={},this[_0x502a1e(0x17c)]=new Map(),this[_0x502a1e(0x230)]=process['cpuUsage'](),this[_0x502a1e(0x142)]=Date[_0x502a1e(0x26f)](),this[_0x502a1e(0x1e5)]=0x0,this[_0x502a1e(0x24e)]=new Map();}get[_0x31854b(0xe4)](){const _0x5b332c=_0x31854b;return this[_0x5b332c(0x1d3)];}get[_0x31854b(0x115)](){const _0x258c6d=_0x31854b;return this[_0x258c6d(0x15b)];}['_caps'](_0x548435,_0x4d4395){const _0x30718d=_0x31854b,_0x76ee07=_0x52c120(_0x548435,_0x4d4395);if(_0x76ee07[_0x30718d(0x1e9)]&&!_0x57b2dd(this[_0x30718d(0x2ba)]))return{..._0x76ee07,'killable':![],'killConfirm':undefined};return _0x76ee07;}[_0x31854b(0x1cd)](){const _0x5a9ce7=_0x31854b;return!!this[_0x5a9ce7(0x295)];}[_0x31854b(0x185)](_0x2a1cbb){Object['assign'](this['_ownMeta'],_0x2a1cbb||{});}[_0x31854b(0x213)](_0x480160){const _0x4b709e=_0x31854b;if(_0x480160)this[_0x4b709e(0x255)]=_0x480160;}[_0x31854b(0x84)](_0x77dee3={}){const _0x269bb3=_0x31854b;return this[_0x269bb3(0x2ba)]['_activateProcesses'](_0x77dee3);}[_0x31854b(0xc5)](){const _0x17bf96=_0x31854b,_0x49231d={};let _0x48f2d2=0x0,_0x3e5fe4=0x0;const _0x3102f5=new Set();for(const _0x221feb of this[_0x17bf96(0x19f)]()){_0x3e5fe4++;const _0x2dfcef=_0x221feb['processing'];if(!_0x2dfcef)continue;if(_0x2dfcef[_0x17bf96(0x268)])_0x48f2d2++;for(const _0x4f536a of _0x2dfcef[_0x17bf96(0x1b4)]||[]){if(![_0x17bf96(0x21c),_0x17bf96(0x103)][_0x17bf96(0xc8)](_0x4f536a[_0x17bf96(0xd4)]))continue;(_0x4f536a[_0x17bf96(0x21f)]===_0x17bf96(0x232)||_0x4f536a[_0x17bf96(0x21f)]===_0x17bf96(0x1d5))&&_0x4f536a[_0x17bf96(0x24d)]&&_0x3102f5[_0x17bf96(0x1fb)]((_0x4f536a[_0x17bf96(0xed)]||_0x17bf96(0x206))+':'+_0x4f536a[_0x17bf96(0x24d)]);const _0x17e4ed=_0x4f536a['env']||_0x17bf96(0x206);(_0x49231d[_0x17e4ed]||=[])[_0x17bf96(0xb1)]({..._0x4f536a,'env':_0x17e4ed,'owner':{'pid':_0x221feb['pid']??null,'kind':_0x221feb['kind']??null}});}}for(const [_0x1d8475,_0x25e5c2]of Object[_0x17bf96(0x20c)](_0x49231d)){for(const _0x541cf7 of _0x25e5c2){if(_0x541cf7['mode']==='single'&&!_0x541cf7[_0x17bf96(0x2c4)]){const _0x49e553=_0x1d8475+':'+(_0x541cf7[_0x17bf96(0x24d)]??'');if(!_0x3102f5[_0x17bf96(0x146)](_0x49e553))_0x541cf7[_0x17bf96(0x214)]=!![];}}}return{'envs':_0x49231d,'policy':null,'participation':{'participating':_0x48f2d2,'total':_0x3e5fe4},'source':_0x17bf96(0x25f)};}['processorsView'](){const _0xd69f27=_0x31854b,_0x1473e9=_0x24c753=>{const _0x461775=_0x2fe0;if(_0x24c753['state']===_0x461775(0x232)||_0x24c753[_0x461775(0x21f)]==='building'||_0x24c753[_0x461775(0x21f)]===_0x461775(0x250))return 0x3;if(_0x24c753[_0x461775(0x2c4)])return 0x1;return 0x2;},_0x9e4d4f=new Map();for(const _0x1896be of this[_0xd69f27(0x19f)]()){for(const _0x18e307 of _0x1896be[_0xd69f27(0xcf)]?.[_0xd69f27(0x1b4)]||[]){const _0x5145e4={..._0x18e307,'owner':{'pid':_0x1896be[_0xd69f27(0x29d)]??null,'kind':_0x1896be[_0xd69f27(0x234)]??null,'host':_0x1896be[_0xd69f27(0x215)]??null}},_0x2b048e=_0x18e307['mode']===_0xd69f27(0x21c)?'1ofN:'+(_0x18e307[_0xd69f27(0xed)]??'')+'::'+(_0x18e307[_0xd69f27(0x24d)]??_0x18e307[_0xd69f27(0x156)]??_0x18e307['id']):'inst:'+(_0x1896be['nodeKey']??_0x1896be[_0xd69f27(0x162)]??'')+'::'+(_0x18e307['env']??'')+'::'+_0x18e307['id'],_0x3d758f=_0x9e4d4f[_0xd69f27(0x2a6)](_0x2b048e);if(!_0x3d758f||_0x1473e9(_0x5145e4)>_0x1473e9(_0x3d758f))_0x9e4d4f[_0xd69f27(0x27e)](_0x2b048e,_0x5145e4);}}return[..._0x9e4d4f[_0xd69f27(0xab)]()];}[_0x31854b(0x276)](){const _0x30ad85=_0x31854b,_0x16915c=Date[_0x30ad85(0x26f)](),_0x2f505c=this[_0x30ad85(0x19f)](),_0x30cb45=_0x28d25f=>Math[_0x30ad85(0x1c9)](0x0,Math[_0x30ad85(0x9e)]((_0x16915c-(_0x28d25f[_0x30ad85(0x1ef)]||_0x16915c))/0x3e8)),_0x1836db=_0x2f505c[_0x30ad85(0x200)](_0x4c6756=>_0x4c6756[_0x30ad85(0x234)]===_0x30ad85(0x1c6)),_0x23f9a3=_0x2f505c[_0x30ad85(0x125)](_0x5251a1=>_0x5251a1['kind']===_0x30ad85(0x242));if(_0x1836db||_0x23f9a3[_0x30ad85(0x243)])return{'primary':_0x1836db?{'pid':_0x1836db[_0x30ad85(0x29d)],'uptime':_0x30cb45(_0x1836db)}:null,'workers':_0x23f9a3[_0x30ad85(0x2a7)](_0x47789f=>({'pid':_0x47789f[_0x30ad85(0x29d)],'uptime':_0x30cb45(_0x47789f)})),'workersConfigured':_0x1836db?.[_0x30ad85(0xb4)]?.[_0x30ad85(0x278)]??_0x23f9a3[_0x30ad85(0x243)],'mode':_0x30ad85(0x87)};const _0x4e58cc=_0x2f505c[_0x30ad85(0x200)](_0x1e00a1=>_0x1e00a1[_0x30ad85(0x234)]===_0x30ad85(0xe1)||_0x1e00a1[_0x30ad85(0x234)]==='standalone'||_0x1e00a1[_0x30ad85(0x234)]===_0x30ad85(0x26e)),_0x27b636=_0x4e58cc?{'pid':_0x4e58cc[_0x30ad85(0x29d)],'uptime':_0x30cb45(_0x4e58cc)}:{'pid':process[_0x30ad85(0x29d)],'uptime':Math[_0x30ad85(0x1c9)](0x0,Math[_0x30ad85(0x9e)](process['uptime']()))};return{'primary':_0x27b636,'workers':[_0x27b636],'workersConfigured':0x1,'mode':_0x30ad85(0x21c)};}[_0x31854b(0xf3)](){return this['_groupByProcess']();}[_0x31854b(0x137)](){const _0x2211d3=_0x31854b,_0x53e46e=new Map();for(const _0x51d27a of this[_0x2211d3(0xb0)]())_0x53e46e['set'](_0x51d27a['processKey'],{..._0x51d27a,'children':[]});const _0x29c698=[];for(const _0x227d29 of _0x53e46e[_0x2211d3(0xab)]()){const _0x48ff39=_0x227d29['supervisorKey']?_0x53e46e[_0x2211d3(0x2a6)](_0x227d29[_0x2211d3(0x1f2)]):null;if(_0x48ff39&&_0x48ff39!==_0x227d29)_0x48ff39['children']['push'](_0x227d29);else _0x29c698['push'](_0x227d29);}const _0x2ee7a0=(_0x50915f,_0x2bcc7c)=>_0x50915f[_0x2211d3(0x234)]===_0x2bcc7c['kind']?(_0x50915f['pid']||0x0)-(_0x2bcc7c['pid']||0x0):(_0x50915f[_0x2211d3(0x234)]??'')<(_0x2bcc7c[_0x2211d3(0x234)]??'')?-0x1:0x1,_0x4a3e1e=_0x367c1d=>{const _0x5b4eb9=_0x2211d3;_0x367c1d[_0x5b4eb9(0x283)](_0x2ee7a0);for(const _0x2c91da of _0x367c1d)if(_0x2c91da[_0x5b4eb9(0x1c4)]['length'])_0x4a3e1e(_0x2c91da[_0x5b4eb9(0x1c4)]);};return _0x4a3e1e(_0x29c698),_0x29c698;}[_0x31854b(0x1a1)](_0x1ba441){const _0x5ba1fe=_0x31854b;return this['_groupByProcess']()[_0x5ba1fe(0x200)](_0x4f4b9d=>_0x4f4b9d['processKey']===_0x1ba441)??null;}[_0x31854b(0xb0)](_0x253ae1=Date[_0x31854b(0x26f)]()){const _0x52a8d0=_0x31854b,_0x4a537e=new Map();for(const _0x53e4a0 of this[_0x52a8d0(0x19f)]()){const _0x311fd2=_0x113fc1(_0x53e4a0);let _0x377331=_0x4a537e[_0x52a8d0(0x2a6)](_0x311fd2);!_0x377331&&(_0x377331={'processKey':_0x311fd2,'nodeKey':_0x311fd2,'pid':_0x53e4a0[_0x52a8d0(0x29d)],'ppid':_0x53e4a0[_0x52a8d0(0xaa)]??null,'host':_0x53e4a0[_0x52a8d0(0x215)]??null,'kind':_0x53e4a0[_0x52a8d0(0x234)],'role':null,'supervisorKey':_0x53e4a0[_0x52a8d0(0x1f2)]??null,'slot':_0x53e4a0[_0x52a8d0(0xb9)]??null,'slotKey':_0x53e4a0[_0x52a8d0(0x145)]??null,'caps':_0x53e4a0['caps']??null,'lifecycle':_0x53e4a0['lifecycle']??null,'uptime':Math[_0x52a8d0(0x1c9)](0x0,Math[_0x52a8d0(0x9e)]((_0x253ae1-(_0x53e4a0['startedAt']||_0x253ae1))/0x3e8)),'startedAt':_0x53e4a0['startedAt']??null,'meta':_0x53e4a0[_0x52a8d0(0xb4)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x4a537e[_0x52a8d0(0x27e)](_0x311fd2,_0x377331));_0x377331['instances'][_0x52a8d0(0xb1)]({'instanceId':_0x53e4a0[_0x52a8d0(0xe7)]??null,'role':_0x53e4a0[_0x52a8d0(0x2a5)]??null,'listenAddr':_0x53e4a0['listenAddr']??null,'lifecycle':_0x53e4a0[_0x52a8d0(0x153)]??null,'processing':_0x53e4a0[_0x52a8d0(0xcf)]??null});if(!_0x377331[_0x52a8d0(0x2a5)]&&_0x53e4a0[_0x52a8d0(0x2a5)])_0x377331[_0x52a8d0(0x2a5)]=_0x53e4a0['role'];if(!_0x377331[_0x52a8d0(0x1ff)]&&_0x53e4a0[_0x52a8d0(0x1ff)])_0x377331[_0x52a8d0(0x1ff)]=_0x53e4a0[_0x52a8d0(0x1ff)];if(!_0x377331['processing']&&_0x53e4a0[_0x52a8d0(0xcf)])_0x377331['processing']=_0x53e4a0['processing'];if(!_0x377331[_0x52a8d0(0x17b)]&&_0x53e4a0[_0x52a8d0(0x17b)])_0x377331[_0x52a8d0(0x17b)]=_0x53e4a0[_0x52a8d0(0x17b)];if(!_0x377331[_0x52a8d0(0x253)]&&_0x53e4a0[_0x52a8d0(0x253)])_0x377331[_0x52a8d0(0x253)]=_0x53e4a0[_0x52a8d0(0x253)];if(_0x377331[_0x52a8d0(0x147)]==null&&_0x53e4a0[_0x52a8d0(0x147)])_0x377331['caps']=_0x53e4a0['caps'];if(_0x53e4a0[_0x52a8d0(0x9f)]&&(!_0x377331[_0x52a8d0(0x9f)]||(_0x53e4a0[_0x52a8d0(0x9f)]['at']??0x0)>(_0x377331['stats']['at']??0x0)))_0x377331[_0x52a8d0(0x9f)]=_0x53e4a0[_0x52a8d0(0x9f)];}return[..._0x4a537e['values']()];}[_0x31854b(0x98)](){const _0x26965b=_0x31854b,_0x2069e7=[],_0x247dcb={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x5d3945 of this['_groupByProcess']()){_0x2069e7[_0x26965b(0xb1)]({'processKey':_0x5d3945[_0x26965b(0x162)],'kind':_0x5d3945[_0x26965b(0x234)],'pid':_0x5d3945[_0x26965b(0x29d)],'supervisorKey':_0x5d3945[_0x26965b(0x1f2)],'meta':_0x5d3945['meta']??null,'uptime':_0x5d3945[_0x26965b(0x14d)],'stats':_0x5d3945[_0x26965b(0x9f)]??null}),_0x247dcb[_0x26965b(0x140)]++;if(_0x5d3945[_0x26965b(0x9f)]){_0x247dcb[_0x26965b(0x257)]+=_0x5d3945['stats'][_0x26965b(0x257)]||0x0,_0x247dcb[_0x26965b(0x18e)]+=(_0x5d3945[_0x26965b(0x9f)][_0x26965b(0x18e)]||0x0)+(_0x5d3945[_0x26965b(0x9f)][_0x26965b(0x1be)]?.[_0x26965b(0x18e)]||0x0);const _0x4c601c=_0x5d3945[_0x26965b(0x9f)][_0x26965b(0x1be)];_0x4c601c&&(_0x247dcb[_0x26965b(0x1be)][_0x26965b(0x1b1)]+=_0x4c601c[_0x26965b(0x1b1)]||0x0,_0x247dcb['threads'][_0x26965b(0x17d)]+=_0x4c601c[_0x26965b(0x17d)]||0x0,_0x247dcb['threads'][_0x26965b(0x11a)]+=_0x4c601c['busy']||0x0);}}return{'totals':_0x247dcb,'nodes':_0x2069e7};}async[_0x31854b(0xae)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x194036=_0x31854b;this[_0x194036(0x128)]=this[_0x194036(0x128)]||!!writer,this[_0x194036(0x2c7)]=this['_isReader']||!!reader,this['_kind']=kind||this[_0x194036(0x23d)]||(_0x3c5db5[_0x194036(0x1cf)]?_0x194036(0x242):_0x194036(0xe1)),this[_0x194036(0x86)]=supervisorKey??this[_0x194036(0x86)],this['_listenAddr']=listenAddr??this[_0x194036(0x255)],this[_0x194036(0x28f)](),await this[_0x194036(0x186)]();if(!writer&&!reader)return null;if(!this[_0x194036(0x295)]){const _0x1edc90=await this[_0x194036(0x2ba)]['createEnvironment'](_0x4181c5,{'sync':![],'durability':_0x194036(0xb8)});await _0x1edc90[_0x194036(0x238)](_0x5f0107),this[_0x194036(0x295)]=_0x1edc90;}return this['_statusEnv'];}[_0x31854b(0x1d8)](){const _0x365a89=_0x31854b;return this[_0x365a89(0x287)]!==this[_0x365a89(0x295)]&&(this['_nodeDbFor']=this[_0x365a89(0x295)],this['_nodeDbCache']=this[_0x365a89(0x295)][_0x365a89(0xe6)](_0x5f0107)[_0x365a89(0x29a)]),this['_nodeDbCache'];}[_0x31854b(0x169)](_0x41cc93){const _0x2fcbed=_0x31854b;if(_0x4d57ac)return this['_nodeDb']()[_0x2fcbed(0x26d)](_0x41cc93[_0x2fcbed(0x227)],_0x41cc93,0x1);const _0x3a0462=this[_0x2fcbed(0x1d8)]()[_0x2fcbed(0x91)](_0x41cc93['nodeKey'],_0x41cc93,0x1);if(_0x3a0462&&typeof _0x3a0462[_0x2fcbed(0x8d)]===_0x2fcbed(0xd1))_0x3a0462[_0x2fcbed(0x8d)](undefined,()=>{});return _0x3a0462;}[_0x31854b(0x7d)](_0x4c4e72){const _0x2b4d87=_0x31854b;return this['_nodeDb']()[_0x2b4d87(0x26d)](_0x4c4e72[_0x2b4d87(0x227)],_0x4c4e72,0x1);}[_0x31854b(0x175)](_0x97fb74){const _0x449114=_0x31854b;if(_0x4d57ac)try{return this['_nodeDb']()[_0x449114(0x16b)](_0x97fb74);}catch{return![];}const _0x135f18=this[_0x449114(0x1d8)]()[_0x449114(0x290)](_0x97fb74);if(_0x135f18&&typeof _0x135f18[_0x449114(0x8d)]===_0x449114(0xd1))_0x135f18[_0x449114(0x8d)](undefined,()=>{});return _0x135f18;}async[_0x31854b(0xc4)](_0x254c0d){const _0x78cf67=_0x31854b;if(!this[_0x78cf67(0x295)]||!this[_0x78cf67(0x128)]||!_0x254c0d?.[_0x78cf67(0x227)])return;return this['_putRowAsync'](_0x254c0d);}async[_0x31854b(0x1df)](_0x2a53eb){const _0x14ca3b=_0x31854b;if(!this[_0x14ca3b(0x295)]||!this[_0x14ca3b(0x128)]||!_0x2a53eb)return;const _0x107112=_0x2a53eb[_0x14ca3b(0xc8)]('#'),_0x256c5f=[];for(const {key:_0x4f2f1c}of this['_statusEnv']['getRange'](_0x5f0107)){if(_0x4f2f1c===_0x2a53eb||!_0x107112&&typeof _0x4f2f1c===_0x14ca3b(0x236)&&_0x4f2f1c['startsWith'](_0x2a53eb+'#'))_0x256c5f['push'](_0x4f2f1c);}for(const _0x171981 of _0x256c5f){try{this[_0x14ca3b(0x1d8)]()[_0x14ca3b(0x16b)](_0x171981);}catch{}}}[_0x31854b(0x235)](_0x4d6b03){const _0x40d85e=_0x31854b;if(typeof _0x4d6b03?.[_0x40d85e(0x29d)]!=='number')return![];if(_0x4d6b03[_0x40d85e(0x215)]!==_0x38474c[_0x40d85e(0x7e)]())return![];if(_0x4d6b03[_0x40d85e(0x29d)]===process[_0x40d85e(0x29d)])return![];if(_0x4d6b03[_0x40d85e(0x2be)]!=null&&_0x4d6b03[_0x40d85e(0x2be)]<Date[_0x40d85e(0x26f)]()-_0x2f75bf)return!![];try{return process['kill'](_0x4d6b03[_0x40d85e(0x29d)],0x0),![];}catch(_0x435a95){return _0x435a95[_0x40d85e(0x138)]===_0x40d85e(0x298);}}[_0x31854b(0x19f)](){const _0x494322=_0x31854b;if(!this[_0x494322(0x295)])return[];try{this['_statusEnv']['db']?.[_0x494322(0x14f)]?.();}catch{}const _0x450b4e=Date[_0x494322(0x26f)](),_0x5cdfac=_0x38474c[_0x494322(0x7e)](),_0x183078=[];for(const {value:_0x25d682}of this[_0x494322(0x295)][_0x494322(0x1c3)](_0x5f0107)){if(!_0x25d682)continue;let _0x4efeb1=null;_0x25d682['host']===_0x5cdfac&&typeof _0x25d682[_0x494322(0x29d)]===_0x494322(0xa3)&&(_0x4efeb1=!this['_nodeDead'](_0x25d682));if(_0x4efeb1===![])continue;const _0x163d41=_0x25d682[_0x494322(0x2be)]==null||_0x25d682[_0x494322(0x2be)]>=_0x450b4e;if(_0x4efeb1===!![]||_0x163d41)_0x183078[_0x494322(0xb1)](_0x25d682);}return _0x183078;}async[_0x31854b(0xeb)](_0x12ed7a=0x0){const _0x298716=_0x31854b;if(!this['_statusEnv']||!this[_0x298716(0x128)])return;const _0x287c6c=Date[_0x298716(0x26f)]()-_0x12ed7a,_0x387b45=new Set(),_0x43c0c1=[],_0x4a3e4e=_0x38474c[_0x298716(0x7e)](),_0x6daaf5=require$$6[_0x298716(0x279)];for(const {key:_0x1f6e50,value:_0x1d0179}of this[_0x298716(0x295)][_0x298716(0x1c3)](_0x5f0107)){if(!_0x1d0179)continue;const _0xcf5f1d=_0x1d0179[_0x298716(0x215)]===_0x4a3e4e&&typeof _0x1d0179['pid']===_0x298716(0xa3),_0x527a88=_0xcf5f1d?this[_0x298716(0x235)](_0x1d0179):_0x1d0179['expiresAt']!=null&&_0x1d0179[_0x298716(0x2be)]<_0x287c6c;if(_0x527a88)_0x43c0c1[_0x298716(0xb1)](_0x1f6e50);else{_0x387b45[_0x298716(0x1fb)](_0x113fc1(_0x1d0179)??_0x1f6e50);if(_0x1d0179[_0x298716(0x279)]&&_0x1d0179[_0x298716(0x279)]!==_0x6daaf5){if(!this['_versionSkewWarned'])this[_0x298716(0xca)]=new Set();!this['_versionSkewWarned'][_0x298716(0x146)](_0x1d0179['version'])&&(this[_0x298716(0xca)][_0x298716(0x1fb)](_0x1d0179[_0x298716(0x279)]),this[_0x298716(0x2ba)]['log']?.['warn']?.(_0x298716(0x209)+(_0x1d0179[_0x298716(0x29d)]??'?')+_0x298716(0x106)+_0x1d0179[_0x298716(0x279)]+'\x20while\x20this\x20process\x20runs\x20'+_0x6daaf5+'\x20—\x20'+_0x298716(0x2ae),{'feature':_0x298716(0x271)}));}}}for(const _0x26f968 of _0x43c0c1)this[_0x298716(0x175)](_0x26f968);if(this[_0x298716(0x28f)]()){const _0x14a278=[];for(const {key:_0x19c1ef}of this[_0x298716(0x126)]('node')){if(!_0x387b45[_0x298716(0x146)](_0x19c1ef)){if(_0x4d57ac)try{this[_0x298716(0x1eb)][_0x298716(0x16b)]('node/'+_0x19c1ef);}catch{}else _0x14a278[_0x298716(0xb1)](this[_0x298716(0x1eb)][_0x298716(0x290)](_0x298716(0xda)+_0x19c1ef));}}if(_0x14a278[_0x298716(0x243)])await Promise['allSettled'](_0x14a278);}}[_0x31854b(0x2c2)](_0x124452=null){const _0x5bcf4b=_0x31854b;if(this[_0x5bcf4b(0x20e)])return;if(!this[_0x5bcf4b(0x128)]||!this[_0x5bcf4b(0x295)]){this['okdb']?.[_0x5bcf4b(0x1fd)]?.[_0x5bcf4b(0xdd)]?.('registry\x20heartbeat\x20skipped\x20(writer='+this['_isWriter']+_0x5bcf4b(0x129)+!!this['_statusEnv']+_0x5bcf4b(0x2bc),{'feature':_0x5bcf4b(0x140)});return;}this['_onTick']=_0x124452,this[_0x5bcf4b(0x1bc)]=()=>this[_0x5bcf4b(0x92)]();for(const _0x2cf309 of _0x218a3d)this['okdb'][_0x5bcf4b(0x18c)]['on'](_0x2cf309,this[_0x5bcf4b(0x1bc)]);this['_publishNow']();const _0x1ffe2f=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x1cffbf;this['_hbTimer']=setInterval(()=>{const _0x5cb38e=_0x5bcf4b;if(this['_onTick'])try{this[_0x5cb38e(0x294)]();}catch{}this['_publishNow'](),this[_0x5cb38e(0xeb)]()[_0x5cb38e(0x267)](()=>{});},_0x1ffe2f);if(this[_0x5bcf4b(0x20e)]['unref'])this[_0x5bcf4b(0x20e)]['unref']();}['_maybePublish'](){const _0x17fd23=_0x31854b;if(!this[_0x17fd23(0x128)]||!this[_0x17fd23(0x295)])return;if(Date[_0x17fd23(0x26f)]()-this[_0x17fd23(0x219)]<_0x1d6332)return;this[_0x17fd23(0x116)]();}[_0x31854b(0x116)](){const _0x890c81=_0x31854b;if(!this[_0x890c81(0x128)]||!this[_0x890c81(0x295)])return;this[_0x890c81(0x219)]=Date[_0x890c81(0x26f)]();try{const _0x47fed5=[this['_buildOwnRow']()];for(const _0x4ebf6b of this[_0x890c81(0x17c)][_0x890c81(0xab)]())_0x47fed5['push'](this['_buildChildRow'](_0x4ebf6b));const _0x337b73=_0x212f76[_0x890c81(0x1ce)]?_0x212f76[_0x890c81(0x26f)]():0x0;for(const _0x4b672c of _0x47fed5){try{this[_0x890c81(0x7d)](_0x4b672c),this[_0x890c81(0x1e1)]=![];}catch(_0x1a3376){!this['_publishFailWarned']&&(this['_publishFailWarned']=!![],this[_0x890c81(0x2ba)]?.[_0x890c81(0x1fd)]?.[_0x890c81(0xdd)]?.('registry\x20publish\x20failing:\x20'+_0x1a3376[_0x890c81(0x1b3)],{'feature':_0x890c81(0x140)}));}}if(_0x212f76[_0x890c81(0x1ce)])_0x212f76[_0x890c81(0x1f3)]('registry-publish',_0x212f76[_0x890c81(0x26f)]()-_0x337b73,'rows='+_0x47fed5[_0x890c81(0x243)]+_0x890c81(0x1bd));}catch(_0x4558fb){!this['_publishFailWarned']&&(this[_0x890c81(0x1e1)]=!![],this['okdb']?.['log']?.[_0x890c81(0xdd)]?.(_0x890c81(0x1f7)+_0x4558fb[_0x890c81(0x1b3)],{'feature':_0x890c81(0x140)}));}}async[_0x31854b(0x168)](){const _0x4fb0b0=_0x31854b;if(this['_onProcEvent']){for(const _0x3e1eb8 of _0x218a3d){try{this['okdb'][_0x4fb0b0(0x18c)][_0x4fb0b0(0x20f)](_0x3e1eb8,this['_onProcEvent']);}catch{}}this[_0x4fb0b0(0x1bc)]=null;}this[_0x4fb0b0(0x20e)]&&(clearInterval(this['_hbTimer']),this[_0x4fb0b0(0x20e)]=null);try{if(this['_statusEnv']&&this[_0x4fb0b0(0x128)])await this[_0x4fb0b0(0x1df)](this[_0x4fb0b0(0x15b)]);}catch{}}async[_0x31854b(0x2bd)](){const _0x311966=_0x31854b;if(!this['_statusEnv']||!this['_isWriter'])return;try{await this['removeNode'](this[_0x311966(0x15b)]);}catch{}try{const _0x9f58e8=[];for(const {value:_0x53bbab}of this[_0x311966(0x295)][_0x311966(0x1c3)](_0x5f0107)){if(_0x53bbab?.[_0x311966(0xaa)]===process[_0x311966(0x29d)]&&_0x53bbab[_0x311966(0x227)])_0x9f58e8[_0x311966(0xb1)](_0x53bbab[_0x311966(0x227)]);}for(const _0x29f570 of _0x9f58e8){try{await this[_0x311966(0x1df)](_0x29f570);}catch{}}}catch{}}async['publishOwnRow'](){const _0x38f68c=_0x31854b;return this[_0x38f68c(0xc4)](this[_0x38f68c(0x23e)]());}async[_0x31854b(0x134)](_0x13ded6){const _0x148321=_0x31854b;if(!this[_0x148321(0x295)]||!this[_0x148321(0x128)])return;return this[_0x148321(0xc4)](this[_0x148321(0x193)](_0x13ded6));}[_0x31854b(0x193)]({pid:_0xc3a010,startedAt:_0x5a86e2,kind:_0x4527d4,supervisorKey:_0x3e950e,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle='running',meta:meta=null,stats:stats=null}){const _0x3cce98=_0x31854b,_0x367a18=Date[_0x3cce98(0x26f)](),_0x23534f=_0x5bb0f0(_0xc3a010,_0x5a86e2);return{'nodeKey':_0x155c92(_0x23534f,'0'),'processKey':_0x23534f,'instanceId':'0','pid':_0xc3a010,'startedAt':_0x5a86e2,'ppid':process[_0x3cce98(0x29d)],'host':_0x38474c['hostname'](),'supervisorKey':_0x3e950e,'slot':slot,'slotKey':slotKey,'kind':_0x4527d4,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x367a18,'expiresAt':_0x367a18+_0x5397d1,'caps':this[_0x3cce98(0xa8)](_0x4527d4,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x31854b(0x135)](_0x5b6f73){const _0x3a22c3=_0x31854b;if(!_0x5b6f73?.[_0x3a22c3(0x29d)])return null;const _0x5a5be5=_0x5bb0f0(_0x5b6f73[_0x3a22c3(0x29d)],_0x5b6f73[_0x3a22c3(0x1ef)]);this[_0x3a22c3(0x17c)][_0x3a22c3(0x27e)](_0x5a5be5,{..._0x5b6f73,'supervisorKey':_0x5b6f73[_0x3a22c3(0x1f2)]??this['_selfKey']});if(this[_0x3a22c3(0x128)])await this[_0x3a22c3(0x134)](this[_0x3a22c3(0x17c)][_0x3a22c3(0x2a6)](_0x5a5be5))['catch']?.(()=>{});return _0x5a5be5;}[_0x31854b(0x29b)](_0x513500){const _0xabfbf8=_0x31854b;if(!_0x513500)return;return this[_0xabfbf8(0x17c)][_0xabfbf8(0x264)](_0x513500),this[_0xabfbf8(0x1df)](_0x513500);}['_sampleOwnStats'](){const _0x3314a3=_0x31854b,_0x136783=Date['now'](),_0x2509aa=process['cpuUsage'](),_0x173efc=(_0x136783-this['_lastCpuAt'])*0x3e8;if(_0x173efc>=0x3d090){const _0x507f14=_0x2509aa[_0x3314a3(0x224)]-this['_lastCpuUsage'][_0x3314a3(0x224)]+(_0x2509aa[_0x3314a3(0x83)]-this[_0x3314a3(0x230)][_0x3314a3(0x83)]),_0x43bb6=_0x38474c[_0x3314a3(0x8b)]()[_0x3314a3(0x243)]||0x1;this[_0x3314a3(0x1e5)]=Math[_0x3314a3(0x28e)](0x64,Math['round'](_0x507f14/(_0x173efc*_0x43bb6)*0x64)),this[_0x3314a3(0x8f)]=Math['round'](_0x173efc/0x3e8),this[_0x3314a3(0x230)]=_0x2509aa,this[_0x3314a3(0x142)]=_0x136783;}const _0x32e4e2=process[_0x3314a3(0x1a7)](),_0x492822=this[_0x3314a3(0x24e)][_0x3314a3(0x1a8)];let _0x1c278b=0x0;if(_0x492822>0x0){const _0x5bffb0=[this['okdb'],...this['okdb'][_0x3314a3(0x90)]?.[_0x3314a3(0xab)]?.()??[]];for(const _0x4bb94d of _0x5bffb0){const _0x481507=_0x4bb94d[_0x3314a3(0x11e)]?.[_0x3314a3(0x158)];if(_0x481507)_0x1c278b+=_0x481507[_0x3314a3(0x237)]['busy'];}}let _0x242d2b=null;const _0x1949f6=_0x492822;if(_0x1949f6>0x0){let _0x5c922c=0x0;for(const _0x4b4bdd of this[_0x3314a3(0x24e)][_0x3314a3(0xab)]())_0x5c922c+=_0x4b4bdd[_0x3314a3(0x18e)]||0x0;_0x242d2b={'count':_0x1949f6,'heapUsed':_0x5c922c,'sandbox':_0x492822,'busy':_0x1c278b};}return{'rss':_0x32e4e2[_0x3314a3(0x257)],'heapUsed':_0x32e4e2[_0x3314a3(0x18e)],'heapTotal':_0x32e4e2[_0x3314a3(0x27a)],'external':_0x32e4e2[_0x3314a3(0x131)],'cpuPct':this[_0x3314a3(0x1e5)],'cpuWindowMs':this[_0x3314a3(0x8f)]??null,'threads':_0x242d2b,'at':_0x136783};}[_0x31854b(0x184)](_0x198b25,_0x5562e6){const _0x22db4b=_0x31854b;if(!_0x198b25||!_0x5562e6)return;this[_0x22db4b(0x24e)][_0x22db4b(0x27e)](_0x198b25,_0x5562e6);}[_0x31854b(0xc1)](_0x5c6a75){const _0x2cc844=_0x31854b;this[_0x2cc844(0x24e)][_0x2cc844(0x264)](_0x5c6a75);}[_0x31854b(0x2aa)](_0x346532,_0x11c138,_0x102338=undefined){const _0x2446fc=_0x31854b,_0x5726d2=this[_0x2446fc(0x17c)][_0x2446fc(0x2a6)](_0x346532);if(!_0x5726d2||!_0x11c138)return;if(_0x102338!==undefined)_0x5726d2[_0x2446fc(0xcf)]=_0x102338;_0x5726d2[_0x2446fc(0x9f)]={'rss':_0x11c138[_0x2446fc(0x257)]??null,'heapUsed':_0x11c138[_0x2446fc(0x18e)]??null,'heapTotal':_0x11c138[_0x2446fc(0x27a)]??null,'external':_0x11c138[_0x2446fc(0x131)]??null,'cpuPct':_0x11c138[_0x2446fc(0x7f)]??null,'cpuWindowMs':_0x11c138[_0x2446fc(0x1ad)]??null,'threads':_0x11c138[_0x2446fc(0x1be)]??null,'claims':_0x11c138[_0x2446fc(0x1ca)]??null,'envsOpen':_0x11c138[_0x2446fc(0x18a)]??null,'at':Date[_0x2446fc(0x26f)]()};}[_0x31854b(0x23e)](){const _0x29baa2=_0x31854b,_0x2ab6a1=Date[_0x29baa2(0x26f)](),_0x10661c=this['okdb'][_0x29baa2(0x256)]||{},_0x3c9f45=this[_0x29baa2(0x23d)]||'cli';return{'nodeKey':this[_0x29baa2(0x15b)],'processKey':this['_selfKey'],'instanceId':this[_0x29baa2(0x248)],'pid':process[_0x29baa2(0x29d)],'startedAt':this[_0x29baa2(0x167)],'instanceStartedAt':this[_0x29baa2(0x1d4)],'ppid':typeof process[_0x29baa2(0xaa)]===_0x29baa2(0xa3)?process['ppid']:null,'host':_0x38474c[_0x29baa2(0x7e)](),'supervisorKey':this[_0x29baa2(0x86)]??null,'version':require$$6[_0x29baa2(0x279)],'kind':_0x3c9f45,'role':{'engines':!!_0x10661c['engines'],'processors':!!_0x10661c[_0x29baa2(0x1b4)],'compaction':_0x10661c[_0x29baa2(0x14c)],'http':_0x10661c[_0x29baa2(0x265)]},'listenAddr':this[_0x29baa2(0x255)]??null,'heartbeatAt':_0x2ab6a1,'expiresAt':_0x2ab6a1+_0x5397d1,'caps':this[_0x29baa2(0xa8)](_0x3c9f45,_0x10661c),'lifecycle':{'state':_0x29baa2(0x21e),'desiredVersionApplied':null},'meta':{...this[_0x29baa2(0x19b)]},'processing':_0x10661c[_0x29baa2(0x1b4)]?this[_0x29baa2(0x16d)]():null,'engines':_0x10661c[_0x29baa2(0x17b)]?[...this[_0x29baa2(0x2ba)][_0x29baa2(0x121)]??[]]:null,'singletonClaims':this['_collectSingletonClaims'](),'stats':this[_0x29baa2(0x2b1)](),'writers':this[_0x29baa2(0x2c0)]()};}['_collectWriterFacet'](){const _0x32279a=_0x31854b,_0x4a120c={};try{for(const [_0x433197,_0x3e3fca]of this[_0x32279a(0x2ba)][_0x32279a(0x90)]){try{const _0x478ab9=_0x3e3fca[_0x32279a(0xf6)]?.();if(!_0x478ab9)continue;if(!_0x478ab9[_0x32279a(0xd9)]&&!_0x478ab9[_0x32279a(0xf9)]&&!(_0x478ab9['parkedNow']??0x0)&&!_0x478ab9[_0x32279a(0x10c)])continue;_0x4a120c[_0x433197]={'depth':_0x478ab9[_0x32279a(0xd9)],'oldestPendingMs':_0x478ab9[_0x32279a(0xe5)],'committed':_0x478ab9[_0x32279a(0xf9)],'commitsPerSec':_0x478ab9[_0x32279a(0x266)],'commitP99Ms':_0x478ab9[_0x32279a(0x2a4)],'parkedNow':_0x478ab9[_0x32279a(0x2b8)]??0x0,'draining':!!_0x478ab9[_0x32279a(0x10c)]};}catch{}}}catch{}return Object[_0x32279a(0x130)](_0x4a120c)[_0x32279a(0x243)]?_0x4a120c:null;}[_0x31854b(0xa6)](){const _0x42acc0=_0x31854b,_0x31524c=process[_0x42acc0(0x29d)],_0x331173=Date[_0x42acc0(0x26f)](),_0x2051b9=_0x1cc6c8=>{const _0x3c4d9a=_0x42acc0;if(!_0x1cc6c8)return[];const _0xcd88c8=[];try{for(const {id:_0x42ddb6,entry:_0x36bd34}of _0x1cc6c8[_0x3c4d9a(0x114)]()){if(_0x36bd34?.[_0x3c4d9a(0x23a)]?.[_0x3c4d9a(0x29d)]!==_0x31524c)continue;const _0xc65a42=_0x36bd34[_0x3c4d9a(0x286)]??_0x36bd34[_0x3c4d9a(0xbe)]??0x0;if(_0xc65a42+(_0x36bd34[_0x3c4d9a(0x1a6)]??0x0)<_0x331173)continue;_0xcd88c8[_0x3c4d9a(0xb1)](_0x42ddb6);}}catch{}return _0xcd88c8;},_0x1861d7=_0x2051b9(this['_singletonLock']('compact')),_0x4005c7=_0x2051b9(this[_0x42acc0(0x21b)](_0x42acc0(0x29e)));if(!_0x1861d7[_0x42acc0(0x243)]&&!_0x4005c7[_0x42acc0(0x243)])return null;return{'compact':_0x1861d7,'replicate':_0x4005c7};}['_singletonLock'](_0x4f9640){const _0x5265fd=_0x31854b;if(!this[_0x5265fd(0x2ba)]?.['_rootDb'])return null;if(!this[_0x5265fd(0xdb)])this[_0x5265fd(0xdb)]=new Map();let _0x54b411=this['_singletonLocks'][_0x5265fd(0x2a6)](_0x4f9640);if(!_0x54b411)try{_0x54b411=new _0x5e0e06(this[_0x5265fd(0x2ba)][_0x5265fd(0x177)],{'namespace':_0x4f9640}),this[_0x5265fd(0xdb)][_0x5265fd(0x27e)](_0x4f9640,_0x54b411);}catch{return null;}return _0x54b411;}[_0x31854b(0x16d)](){const _0x2ab542=_0x31854b,_0x281efb=[];try{for(const [_0x152cd2,_0x29472f]of this['okdb'][_0x2ab542(0x90)]){if(_0x152cd2[_0x2ab542(0x2bb)]('~'))continue;for(const _0x4597d0 of _0x29472f[_0x2ab542(0xfc)]['tierList']())_0x281efb[_0x2ab542(0xb1)]({..._0x4597d0,'env':_0x152cd2});}}catch{}return{'participate':this['okdb'][_0x2ab542(0x1b4)]?.[_0x2ab542(0xfe)]??![],'processors':_0x281efb};}[_0x31854b(0x28f)](){const _0x48d7c8=_0x31854b;if(this['_desired'])return!![];const _0x3aeda3=this[_0x48d7c8(0x2ba)][_0x48d7c8(0x177)];if(!_0x3aeda3)return![];return this[_0x48d7c8(0x1eb)]=_0x3aeda3[_0x48d7c8(0x149)](_0xd36915,{'dupSort':![]}),this[_0x48d7c8(0x178)]=_0x3aeda3['openDB'](_0x404721,{'dupSort':![]}),!![];}async[_0x31854b(0x186)](){const _0x299d32=_0x31854b;if(!this[_0x299d32(0x28f)]())return;const _0x2f0614=_0x299d32(0x196),_0x1996b2=0x1,_0x16105b=this[_0x299d32(0x1eb)]['get'](_0x2f0614)??0x0;if(_0x16105b>=_0x1996b2)return;const _0x228dfd=_0x65824d=>{const _0x2e714a=_0x299d32;if(_0x65824d==='worker')return _0x2e714a(0x21c);if(_0x65824d===_0x2e714a(0x141))return _0x2e714a(0x103);return _0x65824d;};await this['okdb'][_0x299d32(0x1e0)]['_writer'][_0x299d32(0x101)](()=>{const _0xe80766=_0x299d32;for(const _0x26f466 of['procmode/','procmodeack/']){for(const {key:_0x410e4b,value:_0xe5f3bf}of this[_0xe80766(0x1eb)][_0xe80766(0x1c3)]({'start':_0x26f466,'end':_0x26f466+'\xff'})){if(typeof _0x410e4b!=='string'||!_0x410e4b[_0xe80766(0x2bb)](_0x26f466))break;const _0x19586d=_0x228dfd(_0xe5f3bf[_0xe80766(0xd4)]);if(_0x19586d!==_0xe5f3bf['mode'])this[_0xe80766(0x1eb)][_0xe80766(0x91)](_0x410e4b,{..._0xe5f3bf,'mode':_0x19586d});}}this['_desired'][_0xe80766(0x91)](_0x2f0614,_0x1996b2);});}[_0x31854b(0x14b)](){const _0x4d7f20=_0x31854b;return!!this[_0x4d7f20(0x1eb)];}[_0x31854b(0xec)](_0x4c6122,_0x203f83){const _0x545b7b=_0x31854b;if(!this[_0x545b7b(0x28f)]())return null;const _0x373ae4=_0x4c6122+'/'+_0x203f83;return this[_0x545b7b(0x150)](),this['_desiredOverlay']['get'](_0x373ae4)??this[_0x545b7b(0x1eb)][_0x545b7b(0x2a6)](_0x373ae4)??null;}['_refreshDesiredSnapshot'](){const _0x46fe9a=_0x31854b;if(!_0x4d57ac)return;try{this[_0x46fe9a(0x2ba)]['_systemEnv']?.['db']?.['resetReadTxn']?.();}catch{}}async[_0x31854b(0x247)](_0x5d223d,_0x5911ac,_0x246586){const _0x161c47=_0x31854b;if(!this[_0x161c47(0x28f)]())return null;const _0x2d1111=_0x5d223d+'/'+_0x5911ac;this[_0x161c47(0x150)]();const _0x78a0c4=this[_0x161c47(0x25d)][_0x161c47(0x2a6)](_0x2d1111)??this[_0x161c47(0x1eb)][_0x161c47(0x2a6)](_0x2d1111)??{'version':0x0},_0x411d81=(_0x78a0c4[_0x161c47(0x279)]||0x0)+0x1,_0x5814ef={..._0x78a0c4,..._0x246586,'version':_0x411d81,'updatedAt':Date[_0x161c47(0x26f)]()};this[_0x161c47(0x25d)]['set'](_0x2d1111,_0x5814ef);try{await this['okdb'][_0x161c47(0x1e0)]['_writer'][_0x161c47(0x101)](()=>{const _0x52739a=_0x161c47;this[_0x52739a(0x1eb)][_0x52739a(0x91)](_0x2d1111,_0x5814ef);});}finally{if(this[_0x161c47(0x25d)][_0x161c47(0x2a6)](_0x2d1111)===_0x5814ef)this[_0x161c47(0x25d)][_0x161c47(0x264)](_0x2d1111);}return _0x411d81;}[_0x31854b(0x126)](_0x579b91){const _0x7ebcf2=_0x31854b;if(!this[_0x7ebcf2(0x28f)]())return[];this[_0x7ebcf2(0x150)]();const _0x289d46=_0x579b91+'/',_0x5152a0=[];for(const {key:_0x22bd2b,value:_0x1f3077}of this[_0x7ebcf2(0x1eb)][_0x7ebcf2(0x1c3)]({'start':_0x289d46,'end':_0x289d46+'\xff'})){if(typeof _0x22bd2b!==_0x7ebcf2(0x236)||!_0x22bd2b['startsWith'](_0x289d46))break;_0x5152a0[_0x7ebcf2(0xb1)]({'key':_0x22bd2b[_0x7ebcf2(0x1af)](_0x289d46['length']),'value':_0x1f3077});}return _0x5152a0;}[_0x31854b(0x161)](_0x138092){const _0x4ceb6f=_0x31854b;if(!this[_0x4ceb6f(0x28f)]())return null;return this[_0x4ceb6f(0x178)]['get'](_0x138092)??null;}async[_0x31854b(0x1d7)](_0x271c94,_0x39bdd8,_0x5e9162={}){const _0xd98464=_0x31854b;if(!this[_0xd98464(0x28f)]())return null;let _0x2b8f4b;return await this[_0xd98464(0x2ba)][_0xd98464(0x1e0)]['_writer'][_0xd98464(0x101)](()=>{const _0x11e6a3=_0xd98464,_0x1fa739=this[_0x11e6a3(0x178)][_0x11e6a3(0x2a6)](_0x271c94)||{'epoch':0x0};_0x2b8f4b=(_0x1fa739['epoch']||0x0)+0x1,this['_cmd'][_0x11e6a3(0x91)](_0x271c94,{..._0x1fa739,..._0x5e9162,'cmd':_0x39bdd8,'epoch':_0x2b8f4b,'updatedAt':Date['now']()});}),_0x2b8f4b;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x4b6f2f,'nodeKey':_0x5bb0f0,'logicalKey':_0x53f064,'slotKey':_0x10a4ca,'PROCESS_ENV':_0x4181c5,'NODE_TYPE':_0x5f0107},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x5988e7=_0x1383d2;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x5d4835=require$$0$4,{EVENTS:_0x312803,CHANGE_ACTIONS:_0xfb8d4c}=requireOkdbEnums(),{LOOP:_0x2dc572}=requireOkdbLoopMonitor(),_0x3ef022=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x4a19eb=0x5,_0x2a5675=0x2710;class _0x1b64a2 extends _0x5d4835{constructor(_0x287021,_0x51e35a={}){const _0x210495=_0x2fe0;super(),this[_0x210495(0x2ba)]=_0x287021,this['_quantum']=_0x51e35a[_0x210495(0xc2)]??_0x3ef022,this[_0x210495(0xd7)]=_0x51e35a['flushDebounce']??_0x4a19eb,this[_0x210495(0x293)]=_0x51e35a[_0x210495(0x12d)]??_0x2a5675,this['_started']=![],this[_0x210495(0x211)]=new Map(),this[_0x210495(0xe2)]=new Map(),this['_pending']=new Map(),this['_flushTimer']=null,this[_0x210495(0x20a)]=![],this[_0x210495(0x1c2)]=new Set(),this[_0x210495(0x1cb)]=new Set(),this['_onItem']=_0x51695b=>this['_handleInProcess'](_0x51695b),this[_0x210495(0x1f6)]=_0x37f863=>this[_0x210495(0xba)](_0x37f863),this[_0x210495(0x289)]=_0x24493d=>this[_0x210495(0x2c3)](_0x24493d),this[_0x210495(0xd5)]=()=>this[_0x210495(0x288)]();}[_0x5988e7(0xdf)](){const _0x50347d=_0x5988e7;if(this[_0x50347d(0x261)])return;this[_0x50347d(0x261)]=!![];for(const [_0x444f23,_0x6709b9]of this['okdb'][_0x50347d(0x90)]){if(_0x444f23[_0x50347d(0x2bb)]('~'))continue;try{_0x6709b9['_enableChangelog']();}catch{}}for(const [_0x367d24,_0x19e31c]of this[_0x50347d(0x2ba)][_0x50347d(0x90)]){if(_0x367d24[_0x50347d(0x2bb)]('~'))continue;try{this[_0x50347d(0xe2)][_0x50347d(0x27e)](_0x367d24,_0x19e31c[_0x50347d(0x1db)]()||0x0);}catch{}}const {events:_0x2d808f}=this[_0x50347d(0x2ba)];_0x2d808f['on'](_0x312803['ITEM_PENDING'],this['_onPending']),_0x2d808f['on'](_0x312803[_0x50347d(0x284)],this[_0x50347d(0x18d)]),_0x2d808f['on'](_0x312803[_0x50347d(0x148)],this[_0x50347d(0x18d)]),_0x2d808f['on'](_0x312803[_0x50347d(0x1f1)],this[_0x50347d(0x18d)]),_0x2d808f['on'](_0x312803[_0x50347d(0x136)],this['_onPoke']),_0x2d808f[_0x50347d(0x1a0)](_0x312803[_0x50347d(0xf0)],this['_onStop']);}[_0x5988e7(0x288)](){const _0x3bc802=_0x5988e7;if(!this['_started'])return;this[_0x3bc802(0x261)]=![];const {events:_0x58fc1c}=this[_0x3bc802(0x2ba)];_0x58fc1c[_0x3bc802(0x20f)](_0x312803['ITEM_PENDING'],this['_onPending']),_0x58fc1c[_0x3bc802(0x20f)](_0x312803[_0x3bc802(0x284)],this['_onItem']),_0x58fc1c[_0x3bc802(0x20f)](_0x312803[_0x3bc802(0x148)],this[_0x3bc802(0x18d)]),_0x58fc1c['off'](_0x312803[_0x3bc802(0x1f1)],this['_onItem']),_0x58fc1c[_0x3bc802(0x20f)](_0x312803['SYSTEM_POKE'],this['_onPoke']);try{_0x58fc1c[_0x3bc802(0x20f)](_0x312803['SYSTEM_STOPPED'],this['_onStop']);}catch{}this['_flushTimer']&&(clearTimeout(this['_flushTimer']),this['_flushTimer']=null),this['_pending']['clear'](),this[_0x3bc802(0x211)][_0x3bc802(0x2b7)](),this[_0x3bc802(0xe2)][_0x3bc802(0x2b7)](),this[_0x3bc802(0x1c2)][_0x3bc802(0x2b7)](),this['_pendingLocal'][_0x3bc802(0x2b7)]();}[_0x5988e7(0x2c1)](_0x1e77fd,_0x34579d,_0x5ce680,_0x4eb301){return _0x1e77fd+'\x00'+_0x34579d+'\x00'+_0x5ce680+'\x00'+_0x4eb301;}[_0x5988e7(0x254)](_0x11c739,_0x2f340d,_0xa865d6,_0x17cbb1){const _0x547b84=_0x5988e7,_0x594ea3=this[_0x547b84(0x2c1)](_0x11c739,_0x2f340d,_0xa865d6,_0x17cbb1);if(this['_seen']['has'](_0x594ea3))return![];this[_0x547b84(0x1c2)]['add'](_0x594ea3);if(this[_0x547b84(0x1c2)]['size']>this[_0x547b84(0x293)]){const _0x327cc=this[_0x547b84(0x1c2)][_0x547b84(0xab)]()['next']()[_0x547b84(0x221)];this[_0x547b84(0x1c2)][_0x547b84(0x264)](_0x327cc);}return!![];}[_0x5988e7(0xba)](_0x41fc67){const _0x359375=_0x5988e7;if(!this[_0x359375(0x261)]||!_0x41fc67)return;const {env:_0x1541e9,type:_0x4bed29,key:_0x1043d7,clock:_0x34417b}=_0x41fc67;if(_0x1541e9==null||_0x4bed29==null||_0x1043d7==null)return;if(typeof _0x1541e9===_0x359375(0x236)&&_0x1541e9[_0x359375(0x2bb)]('~'))return;if(typeof _0x4bed29===_0x359375(0x236)&&_0x4bed29[_0x359375(0x2bb)]('~'))return;this[_0x359375(0x1cb)][_0x359375(0x1fb)](this[_0x359375(0x2c1)](_0x1541e9,_0x4bed29,_0x1043d7,_0x34417b)),this[_0x359375(0x1cb)][_0x359375(0x1a8)]>this[_0x359375(0x293)]&&this[_0x359375(0x1cb)]['delete'](this[_0x359375(0x1cb)][_0x359375(0xab)]()[_0x359375(0x241)]()[_0x359375(0x221)]);}[_0x5988e7(0x16a)](_0x12f547){const _0x54aa94=_0x5988e7;if(!this[_0x54aa94(0x261)]||!_0x12f547)return;const {env:_0x5eb0a1,type:_0x1740ae,key:_0x52e9e1,clock:_0xd27cb,origin:_0xa309c7,action:_0x320e28,newValue:_0x2a2d69,oldValue:_0x5267d0}=_0x12f547;if(_0x5eb0a1==null||_0x1740ae==null||_0x52e9e1==null)return;if(typeof _0x5eb0a1==='string'&&_0x5eb0a1['startsWith']('~'))return;if(typeof _0x1740ae===_0x54aa94(0x236)&&_0x1740ae['startsWith']('~'))return;this[_0x54aa94(0x1cb)]['delete'](this[_0x54aa94(0x2c1)](_0x5eb0a1,_0x1740ae,_0x52e9e1,_0xd27cb));if(!this[_0x54aa94(0x254)](_0x5eb0a1,_0x1740ae,_0x52e9e1,_0xd27cb))return;const _0x5a1759=_0x320e28===_0xfb8d4c['REMOVE']?_0x54aa94(0x290):_0x54aa94(0x91);this[_0x54aa94(0x1ac)](_0x54aa94(0x15e),{'env':_0x5eb0a1,'type':_0x1740ae,'key':_0x52e9e1,'op':_0x5a1759,'clock':_0xd27cb,'origin':_0xa309c7,'value':_0x5a1759===_0x54aa94(0x290)?null:_0x2a2d69,'prevValue':_0x5267d0});}[_0x5988e7(0x2c3)](_0x5b278f){const _0x5eff9a=_0x5988e7;if(!this[_0x5eff9a(0x261)])return;if(!_0x5b278f||typeof _0x5b278f[_0x5eff9a(0xed)]!==_0x5eff9a(0x236)||typeof _0x5b278f['type']!==_0x5eff9a(0x236))return;const {env:_0x32d9aa,type:_0x526e02}=_0x5b278f;if(_0x32d9aa[_0x5eff9a(0x2bb)]('~')||_0x526e02[_0x5eff9a(0x2bb)]('~'))return;this['_pending'][_0x5eff9a(0x27e)](_0x32d9aa+'\x00'+_0x526e02,{'env':_0x32d9aa,'type':_0x526e02}),this[_0x5eff9a(0x2ac)]();}[_0x5988e7(0x2ac)](){const _0xca1bf3=_0x5988e7;if(this[_0xca1bf3(0xc7)])return;const _0x5ce295=()=>{const _0x26c20b=_0xca1bf3;this[_0x26c20b(0xc7)]=null,this[_0x26c20b(0x223)]()[_0x26c20b(0x267)](()=>{});};this[_0xca1bf3(0xc7)]=setTimeout(_0x5ce295,this[_0xca1bf3(0xd7)]>0x0?this[_0xca1bf3(0xd7)]:0x0);}async[_0x5988e7(0x223)](){const _0xd87ef7=_0x5988e7;if(this[_0xd87ef7(0x20a)]){this[_0xd87ef7(0x2ac)]();return;}this[_0xd87ef7(0x20a)]=!![];try{const _0x4ead8e=[...this[_0xd87ef7(0xc6)][_0xd87ef7(0xab)]()];this['_pending']['clear']();let _0x1391a2=![];for(const {env:_0x1b36aa,type:_0x3bc81b}of _0x4ead8e){try{const _0x4fb8dd=await this[_0xd87ef7(0x285)](_0x1b36aa,_0x3bc81b);if(_0x4fb8dd)_0x1391a2=!![];}catch{this[_0xd87ef7(0xc6)][_0xd87ef7(0x27e)](_0x1b36aa+'\x00'+_0x3bc81b,{'env':_0x1b36aa,'type':_0x3bc81b}),_0x1391a2=!![];}}if(_0x1391a2||this[_0xd87ef7(0xc6)][_0xd87ef7(0x1a8)]>0x0)this[_0xd87ef7(0x2ac)]();}finally{this[_0xd87ef7(0x20a)]=![];}}async[_0x5988e7(0x285)](_0x3d91a0,_0x58bd8e){const _0x491698=_0x5988e7,_0x8b8ef6=await this['okdb'][_0x491698(0x117)](_0x3d91a0),_0x3a2a96=_0x3d91a0+'\x00'+_0x58bd8e;!this['_cursors'][_0x491698(0x146)](_0x3a2a96)&&(!this[_0x491698(0xe2)][_0x491698(0x146)](_0x3d91a0)&&(_0x8b8ef6[_0x491698(0xd6)](),this[_0x491698(0xe2)][_0x491698(0x27e)](_0x3d91a0,_0x8b8ef6[_0x491698(0x1db)]()||0x0)),this[_0x491698(0x211)][_0x491698(0x27e)](_0x3a2a96,this[_0x491698(0xe2)]['get'](_0x3d91a0)));const _0x4b315b=this[_0x491698(0x211)][_0x491698(0x2a6)](_0x3a2a96),_0x554cb6=_0x8b8ef6['getClock'](_0x58bd8e)||0x0;if(_0x554cb6<=_0x4b315b)return![];const _0x372f3d=_0x4b315b+this[_0x491698(0x1d9)],_0x5b5bf3=Math['min'](_0x554cb6,_0x372f3d),_0x1be66d=_0x2dc572[_0x491698(0x1ce)]?_0x2dc572[_0x491698(0x26f)]():0x0,_0x5ada13=Array['from'](_0x8b8ef6[_0x491698(0x1a4)](_0x58bd8e,_0x4b315b+0x1,_0x5b5bf3));let _0x1ac508=_0x4b315b;for(const _0x2c02be of _0x5ada13){const {clock:_0x1d2f36,key:_0x180e85,action:_0x33d8e8,origin:_0x1b6b55}=_0x2c02be;if(_0x1d2f36>_0x1ac508)_0x1ac508=_0x1d2f36;if(_0x180e85==null)continue;if(this[_0x491698(0x1cb)][_0x491698(0x146)](this[_0x491698(0x2c1)](_0x3d91a0,_0x58bd8e,_0x180e85,_0x1d2f36)))continue;if(!this[_0x491698(0x254)](_0x3d91a0,_0x58bd8e,_0x180e85,_0x1d2f36))continue;let _0x5ee792,_0x2a8a36;if(_0x33d8e8===_0xfb8d4c[_0x491698(0x2a1)])_0x5ee792=_0x491698(0x290),_0x2a8a36=null;else{const _0xa10cb6=_0x8b8ef6['get'](_0x58bd8e,_0x180e85);_0xa10cb6==null?(_0x5ee792=_0x491698(0x290),_0x2a8a36=null):(_0x5ee792='put',_0x2a8a36=_0xa10cb6);}this['emit']('change',{'env':_0x3d91a0,'type':_0x58bd8e,'key':_0x180e85,'op':_0x5ee792,'clock':_0x1d2f36,'origin':_0x1b6b55,'value':_0x2a8a36});}if(_0x2dc572['enabled'])_0x2dc572['note'](_0x491698(0x2b2)+_0x3d91a0+':'+_0x58bd8e,_0x2dc572[_0x491698(0x26f)]()-_0x1be66d,'n='+_0x5ada13[_0x491698(0x243)]);return this[_0x491698(0x211)]['set'](_0x3a2a96,Math[_0x491698(0x1c9)](_0x1ac508,_0x5b5bf3)),_0x8b8ef6['getClock'](_0x58bd8e)>_0x5b5bf3;}[_0x5988e7(0x292)](){const _0x3a5643=_0x5988e7;return{'started':this[_0x3a5643(0x261)],'quantum':this[_0x3a5643(0x1d9)],'flushDebounce':this['_flushDebounce'],'cursors':Object[_0x3a5643(0x281)]([...this[_0x3a5643(0x211)][_0x3a5643(0x20c)]()]['map'](([_0x4a48e6,_0x53eaa5])=>[_0x4a48e6[_0x3a5643(0xfb)]('\x00',':'),_0x53eaa5])),'pending':this['_pending'][_0x3a5643(0x1a8)],'seen':this['_seen'][_0x3a5643(0x1a8)]};}}return _0x1b64a2[_0x5988e7(0x205)]=_0x3ef022,okdbChangefeed={'OKDBChangefeed':_0x1b64a2},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x3300c4=_0x1383d2;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x303525=require$$1$1,_0x48d93e=require$$1,{EVENTS:_0x375187}=requireOkdbEnums(),_0x59dbab=require$$0$3,{slotKey:_0x401d35}=requireOkdbProcessRegistry(),_0x544e97=Number(process.env.OKDB_CLUSTER_RESPAWN_BACKOFF_MS)||0xfa,_0x51ea7c=0xfa0,_0x3a6900=0x5,_0x486cf4=0x2710,_0x32feb6=0xbb8,_0x3e6003=0x7d0,_0x5646ec=_0x3300c4(0x9a),_0x15a485=_0x3300c4(0x1a5),_0x3ff8cd='log',_0x518df2=_0x3300c4(0x9f),_0x2d6394=[_0x375187[_0x3300c4(0x2ab)],_0x375187[_0x3300c4(0x132)],_0x375187[_0x3300c4(0x10b)],_0x375187[_0x3300c4(0x108)],_0x375187['INDEX_PROGRESS'],_0x375187['INDEX_READY'],_0x375187[_0x3300c4(0x165)],_0x375187[_0x3300c4(0x1d1)],_0x3300c4(0x277),_0x3300c4(0x1c1),_0x3300c4(0x23c),_0x3300c4(0x1ae),_0x3300c4(0x172),_0x3300c4(0x110)],_0x1d46f0=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0,_0x292a34=0x64;function _0x4d9dad(_0x36d010){const _0x530efc=_0x3300c4;if(!_0x36d010)return _0x530efc(0x8a);const _0x485f44=(_0x36d010[_0x530efc(0x1b4)]||[])['map'](_0x5a8d53=>[_0x5a8d53['env'],_0x5a8d53['id'],_0x5a8d53[_0x530efc(0xd4)],_0x5a8d53['state'],!!_0x5a8d53[_0x530efc(0x269)],!!_0x5a8d53[_0x530efc(0x214)],!!_0x5a8d53[_0x530efc(0x2c4)],_0x5a8d53[_0x530efc(0x275)]?.[_0x530efc(0x29d)]??null,_0x5a8d53[_0x530efc(0x250)]?String(_0x5a8d53['error']?.[_0x530efc(0x1b3)]??_0x5a8d53[_0x530efc(0x250)]):null]);return JSON['stringify']([!!_0x36d010[_0x530efc(0x268)],_0x485f44]);}function _0x2d53fb({workers:_0x47a331,makeOkdb:_0x54ea77,port:_0x3d60fe,primaryOkdb:_0x4eb198,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0x5ee63e=_0x3300c4;if(_0x303525['isPrimary'])return childEntry&&_0x303525[_0x5ee63e(0x11d)]({'exec':_0x48d93e[_0x5ee63e(0x29f)](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0x54b2af=_0x5ee63e,_0x24d809=[];for(let _0x3d43c6=0x0;_0x3d43c6<process[_0x54b2af(0x2a0)][_0x54b2af(0x243)];_0x3d43c6++){const _0x5810ad=process[_0x54b2af(0x2a0)][_0x3d43c6];if(_0x5810ad[_0x54b2af(0x2bb)](_0x54b2af(0x151))||_0x5810ad['startsWith']('--watch')||_0x5810ad[_0x54b2af(0x2bb)](_0x54b2af(0x1f0)))continue;if(_0x5810ad==='-e'||_0x5810ad===_0x54b2af(0xc3)||_0x5810ad==='-p'||_0x5810ad===_0x54b2af(0x15f)){_0x3d43c6++;continue;}_0x24d809[_0x54b2af(0xb1)](_0x5810ad);}return _0x24d809;})())}),_0x15fc5b({'workers':_0x47a331,'port':_0x3d60fe,'primaryOkdb':_0x4eb198,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x3d60fe});return _0x320482({'makeOkdb':_0x54ea77,'port':_0x3d60fe});}function _0x15fc5b({workers:_0x1d99a3,port:_0x56d99f,primaryOkdb:_0x1374e8,workerEnv:_0x4f800e,workerRole:_0x46bc6f,listenAddr:_0x155d63}){const _0x39ff7b=_0x3300c4,_0x5dbdd3=new Map(),_0x2568d5=new Map();let _0x18f01f=![];const _0x49a6e8=_0x18cec8=>_0x18cec8?.['__okdbSlot'],_0x25980d=_0x2ddfbd=>{const _0x3276cc=_0x2fe0,_0x2098b4=_0x303525[_0x3276cc(0x120)]({...process.env,..._0x4f800e||{},'OKDB_CLUSTER_SLOT':String(_0x2ddfbd)});return _0x2098b4['__okdbSlot']=_0x2ddfbd,_0x5dbdd3[_0x3276cc(0x27e)](_0x2098b4['process'][_0x3276cc(0x29d)],{'worker':_0x2098b4,'startedAt':Date[_0x3276cc(0x26f)](),'slot':_0x2ddfbd}),_0x2098b4['on'](_0x3276cc(0x250),_0x484d57=>{const _0x4c1253=_0x3276cc;console[_0x4c1253(0x1fd)](_0x4c1253(0x2bf)+_0x2098b4[_0x4c1253(0x262)][_0x4c1253(0x29d)]+_0x4c1253(0x259)+(_0x484d57?.[_0x4c1253(0x1b3)]??_0x484d57));}),_0x2098b4['on'](_0x3276cc(0x232),()=>_0x375f82()),_0x2098b4;},_0x556783=_0x15a76f=>{const _0x16bb9b=_0x2fe0;for(const {worker:_0x204497}of _0x5dbdd3[_0x16bb9b(0xab)]()){if(_0x204497[_0x16bb9b(0x18b)]()||!_0x204497[_0x16bb9b(0x11c)]())continue;try{_0x204497[_0x16bb9b(0x174)](_0x15a76f);}catch{}}};_0x1374e8?.['_activateProcesses']?.({'kind':'primary','listenAddr':_0x155d63})['catch'](()=>{}),_0x1374e8?.[_0x39ff7b(0x140)]?.['setOwnMeta']?.({'workersConfigured':_0x1d99a3});const _0x12a7ad={'engines':!![],'processors':!![],'compaction':!![],..._0x46bc6f,'http':!![]},_0x375f82=()=>{const _0x2e8535=_0x39ff7b,_0x3264f6=_0x1374e8?.[_0x2e8535(0x140)];if(!_0x3264f6||!_0x3264f6[_0x2e8535(0x128)])return;const _0x3656dd=_0x3264f6['selfKey'];for(const {worker:_0x351d82,startedAt:_0x27e729,slot:_0x527011,stats:_0x4ad251,processing:_0x4f495a}of _0x5dbdd3[_0x2e8535(0xab)]()){if(_0x351d82[_0x2e8535(0x18b)]())continue;const _0x38b47f=_0x3264f6[_0x2e8535(0x14b)]?.()&&_0x3264f6[_0x2e8535(0xec)](_0x2e8535(0xb9),_0x4532ae(_0x527011))?.[_0x2e8535(0x252)]===!![];_0x3264f6[_0x2e8535(0x134)]({'pid':_0x351d82[_0x2e8535(0x262)][_0x2e8535(0x29d)],'startedAt':_0x27e729,'kind':_0x2e8535(0x242),'supervisorKey':_0x3656dd,'slot':_0x527011,'slotKey':_0x4532ae(_0x527011),'role':_0x12a7ad,'listenAddr':_0x155d63,'lifecycle':_0x38b47f?_0x2e8535(0xa7):_0x2e8535(0x21e),'processing':_0x4f495a??null,'stats':_0x4ad251??null})['catch'](()=>{});}},_0x4532ae=_0x255f68=>_0x401d35(_0x39ff7b(0x1d2)+_0x56d99f,_0x255f68),_0xb176fb=_0x238537=>{const _0x3e7be6=_0x39ff7b,_0x1ab15c=_0x1374e8?.[_0x3e7be6(0x140)];if(!_0x1ab15c?.[_0x3e7be6(0x14b)]?.())return![];return _0x1ab15c[_0x3e7be6(0xec)]('slot',_0x4532ae(_0x238537))?.[_0x3e7be6(0x252)]===!![];};for(let _0x2c1032=0x0;_0x2c1032<_0x1d99a3;_0x2c1032++){const _0x1f94ea=_0xb176fb(_0x2c1032);_0x2568d5[_0x39ff7b(0x27e)](_0x2c1032,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x1f94ea,'respawnTimer':null}),_0x1f94ea?console[_0x39ff7b(0x1fd)]('[okdb-cluster]\x20slot='+_0x2c1032+_0x39ff7b(0x104)):_0x25980d(_0x2c1032);}const _0x389db2=()=>{const _0x536851=_0x39ff7b,_0x30bdca=_0x1374e8?.['processes'];if(!_0x30bdca?.['_isWriter']||!_0x30bdca['hasDesired']?.())return;for(const [_0x15bee4,_0x4b9923]of _0x2568d5[_0x536851(0x20c)]()){const _0x23a458=_0x30bdca['getDesired'](_0x536851(0xb9),_0x4532ae(_0x15bee4)),_0x2e357a=_0x23a458?.[_0x536851(0x252)]===!![],_0x58cdd8=_0x23a458?.[_0x536851(0x27f)]===!![];if(_0x2e357a&&!_0x4b9923[_0x536851(0x27d)]){_0x4b9923[_0x536851(0x27d)]=!![];_0x4b9923['respawnTimer']&&(clearTimeout(_0x4b9923[_0x536851(0x27b)]),_0x4b9923[_0x536851(0x27b)]=null);for(const {worker:_0x4c97eb}of _0x5dbdd3[_0x536851(0xab)]()){if(_0x49a6e8(_0x4c97eb)!==_0x15bee4||_0x4c97eb[_0x536851(0x18b)]())continue;try{if(_0x58cdd8)_0x4c97eb['process'][_0x536851(0x27f)](_0x536851(0x1f5));else _0x4c97eb['isConnected']()&&_0x4c97eb[_0x536851(0x1d6)]();}catch{}}console['log'](_0x536851(0x2b9)+(_0x58cdd8?_0x536851(0xef):_0x536851(0x28a))+'\x20worker\x20slot='+_0x15bee4+_0x536851(0xaf));}else{if(!_0x2e357a&&_0x4b9923['dead']&&_0x23a458){_0x4b9923[_0x536851(0x27d)]=![],_0x4b9923[_0x536851(0x1cc)]=[],_0x4b9923['consecutiveFailures']=0x0;const _0x31b770=[..._0x5dbdd3[_0x536851(0xab)]()][_0x536851(0x1b2)](({worker:_0x4cbf31})=>_0x49a6e8(_0x4cbf31)===_0x15bee4&&!_0x4cbf31[_0x536851(0x18b)]());!_0x31b770&&!_0x18f01f&&(_0x25980d(_0x15bee4),console['log']('[okdb-cluster]\x20recommissioned\x20worker\x20slot='+_0x15bee4));}}}},_0x377965=()=>{try{_0x389db2();}catch{}};_0x1374e8?.[_0x39ff7b(0x18c)]?.['on']?.(_0x375187[_0x39ff7b(0x249)],_0x377965);const _0x20fa91=[];if(_0x1374e8?.[_0x39ff7b(0x18c)]?.['on'])for(const _0x5e0bdd of _0x2d6394){const _0x5cb815=_0x4a1dc8=>{_0x556783({[_0x5646ec]:_0x15a485,'event':_0x5e0bdd,'data':_0x4a1dc8??{}});};_0x1374e8[_0x39ff7b(0x18c)]['on'](_0x5e0bdd,_0x5cb815),_0x20fa91[_0x39ff7b(0xb1)]({'event':_0x5e0bdd,'handler':_0x5cb815});}const _0x5e8ae6=setInterval(()=>{_0x389db2(),_0x375f82();},_0x1d46f0);_0x5e8ae6[_0x39ff7b(0x12e)]?.();const _0x42ab4b=(_0x3446e5,_0x372194)=>{const _0x37a7f4=_0x39ff7b;if(!_0x372194||typeof _0x372194!=='object'||_0x372194[_0x5646ec]!==_0x3ff8cd)return;if(!_0x1374e8?.['log']?.[_0x37a7f4(0xc0)])return;const _0x347481=_0x372194[_0x37a7f4(0x1e7)]||{};_0x1374e8[_0x37a7f4(0x1fd)]['ingest']({..._0x347481,'msg':'[w'+_0x372194[_0x37a7f4(0xb9)]+']\x20'+(_0x347481[_0x37a7f4(0x12f)]??''),'meta':{..._0x347481['meta']||{},'worker':_0x372194[_0x37a7f4(0xb9)],'workerPid':_0x372194[_0x37a7f4(0x29d)]}});};_0x303525['on']('message',_0x42ab4b);const _0x5aa13b=(_0x8028f7,_0x344ebc)=>{const _0x1b5438=_0x39ff7b;if(!_0x344ebc||typeof _0x344ebc!==_0x1b5438(0x273)||_0x344ebc[_0x5646ec]!==_0x518df2)return;const _0x1bfd37=_0x5dbdd3[_0x1b5438(0x2a6)](_0x8028f7[_0x1b5438(0x262)][_0x1b5438(0x29d)]);if(_0x1bfd37){_0x1bfd37['stats']={..._0x344ebc[_0x1b5438(0x9f)],'at':Date['now']()};if(_0x344ebc[_0x1b5438(0xcf)]!==undefined){const _0x26d243=_0x4d9dad(_0x344ebc[_0x1b5438(0xcf)]);_0x26d243!==_0x1bfd37[_0x1b5438(0x188)]&&(_0x1bfd37[_0x1b5438(0x188)]=_0x26d243,_0x38b12c()),_0x1bfd37[_0x1b5438(0xcf)]=_0x344ebc[_0x1b5438(0xcf)];}}};let _0x1a76b8=null;const _0x38b12c=()=>{if(_0x1a76b8||_0x18f01f)return;_0x1a76b8=setTimeout(()=>{_0x1a76b8=null;if(!_0x18f01f)_0x375f82();},_0x292a34),_0x1a76b8['unref']?.();};_0x303525['on'](_0x39ff7b(0x1b3),_0x5aa13b),_0x303525['on'](_0x39ff7b(0x19a),(_0x1e8bc2,_0x576e66,_0x4d4077)=>{const _0x2eb6cc=_0x39ff7b,_0x5c28ba=_0x1e8bc2[_0x2eb6cc(0x262)][_0x2eb6cc(0x29d)],_0x3e46db=_0x49a6e8(_0x1e8bc2),_0x39aaab=_0x5dbdd3['get'](_0x5c28ba);if(_0x39aaab&&_0x1374e8?.[_0x2eb6cc(0x140)])_0x1374e8['processes'][_0x2eb6cc(0x1df)](_0x5c28ba+':'+_0x39aaab['startedAt'])[_0x2eb6cc(0x267)](()=>{});_0x5dbdd3[_0x2eb6cc(0x264)](_0x5c28ba),console['log']('[okdb-cluster]\x20worker\x20pid='+_0x5c28ba+_0x2eb6cc(0x14a)+(_0x3e46db??'?')+_0x2eb6cc(0x1bb)+('(code='+_0x576e66+_0x2eb6cc(0xb6)+(_0x4d4077??_0x2eb6cc(0x25e))+_0x2eb6cc(0x1ec)+_0x5dbdd3['size']+'\x20worker(s)\x20remaining')),_0x375f82();if(_0x18f01f||_0x3e46db==null)return;const _0x2deae1=_0x2568d5[_0x2eb6cc(0x2a6)](_0x3e46db);if(!_0x2deae1||_0x2deae1[_0x2eb6cc(0x27d)])return;const _0x350dc4=Date['now']();_0x2deae1[_0x2eb6cc(0x1cc)]['push'](_0x350dc4),_0x2deae1[_0x2eb6cc(0x1cc)]=_0x2deae1['deaths'][_0x2eb6cc(0x125)](_0x1b1ae5=>_0x350dc4-_0x1b1ae5<=_0x486cf4);if(_0x2deae1[_0x2eb6cc(0x1cc)][_0x2eb6cc(0x243)]>=_0x3a6900){_0x2deae1[_0x2eb6cc(0x27d)]=!![],console[_0x2eb6cc(0x250)](_0x2eb6cc(0x272)+_0x3e46db+_0x2eb6cc(0x13d)+_0x2deae1[_0x2eb6cc(0x1cc)]['length']+_0x2eb6cc(0xb5)+(_0x486cf4+_0x2eb6cc(0xd3)+_0x5dbdd3[_0x2eb6cc(0x1a8)]+'\x20worker(s)\x20still\x20serving'));return;}_0x2deae1[_0x2eb6cc(0x25b)]++;const _0x23db14=Math[_0x2eb6cc(0x28e)](_0x51ea7c,_0x544e97*0x2**(_0x2deae1[_0x2eb6cc(0x25b)]-0x1));console[_0x2eb6cc(0x1fd)](_0x2eb6cc(0xde)+_0x3e46db+_0x2eb6cc(0xc9)+_0x23db14+_0x2eb6cc(0x99)+_0x2deae1[_0x2eb6cc(0x25b)]+')'),_0x2deae1[_0x2eb6cc(0x27b)]=setTimeout(()=>{const _0x3ed60f=_0x2eb6cc;_0x2deae1[_0x3ed60f(0x27b)]=null;if(_0x18f01f||_0x2deae1[_0x3ed60f(0x27d)])return;const _0x12443e=_0x25980d(_0x3e46db);_0x12443e[_0x3ed60f(0x1a0)]('listening',()=>{const _0xf4d123=_0x3ed60f;if(_0x2568d5[_0xf4d123(0x2a6)](_0x3e46db)===_0x2deae1)_0x2deae1[_0xf4d123(0x25b)]=0x0;});},_0x23db14),_0x2deae1[_0x2eb6cc(0x27b)][_0x2eb6cc(0x12e)]?.();});const _0x492dc0=[..._0x5dbdd3[_0x39ff7b(0x130)]()];console[_0x39ff7b(0x1fd)]('[okdb-cluster]\x20primary\x20pid='+process[_0x39ff7b(0x29d)]+_0x39ff7b(0x260)+_0x1d99a3+_0x39ff7b(0xac)+_0x56d99f+':\x20'+('['+_0x492dc0[_0x39ff7b(0x29f)](',\x20')+']'));const _0x4d78fe={'_isClusterController':!![],'port':_0x56d99f,'primaryOkdb':_0x1374e8??null,'status'(){const _0x243b74=_0x39ff7b;return{'clustered':!![],'primaryPid':process[_0x243b74(0x29d)],'port':_0x56d99f,'primaryRole':_0x1374e8?.[_0x243b74(0x2a5)]??null,'processorPid':null,'supervisorPid':process[_0x243b74(0x29d)],'workers':[..._0x5dbdd3[_0x243b74(0xab)]()]['map'](({worker:_0x19d70b})=>({'pid':_0x19d70b[_0x243b74(0x262)]['pid'],'id':_0x19d70b['id'],'dead':_0x19d70b[_0x243b74(0x18b)]()}))};},async 'close'(){const _0x13ad33=_0x39ff7b;_0x18f01f=!![];for(const _0x4deb1f of _0x2568d5[_0x13ad33(0xab)]()){_0x4deb1f[_0x13ad33(0x27d)]=!![],_0x4deb1f[_0x13ad33(0x27b)]&&(clearTimeout(_0x4deb1f[_0x13ad33(0x27b)]),_0x4deb1f['respawnTimer']=null);}clearInterval(_0x5e8ae6);_0x1a76b8&&(clearTimeout(_0x1a76b8),_0x1a76b8=null);_0x303525[_0x13ad33(0x20f)]('message',_0x42ab4b),_0x303525['off'](_0x13ad33(0x1b3),_0x5aa13b),_0x1374e8?.[_0x13ad33(0x18c)]?.[_0x13ad33(0x20f)]?.(_0x375187[_0x13ad33(0x249)],_0x377965);if(_0x1374e8?.[_0x13ad33(0x18c)]?.[_0x13ad33(0x20f)])for(const {event:_0x2c40d6,handler:_0x1e3a3a}of _0x20fa91){try{_0x1374e8[_0x13ad33(0x18c)][_0x13ad33(0x20f)](_0x2c40d6,_0x1e3a3a);}catch{}}_0x20fa91[_0x13ad33(0x243)]=0x0;const _0x54d4cf=[..._0x5dbdd3[_0x13ad33(0xab)]()][_0x13ad33(0x2a7)](({worker:_0x352402})=>_0x352402);if(_0x54d4cf[_0x13ad33(0x243)]===0x0)return;await Promise[_0x13ad33(0xe3)](_0x54d4cf[_0x13ad33(0x2a7)](_0x1dc333=>new Promise(_0xc4220e=>{const _0xb61f75=_0x13ad33;if(_0x1dc333[_0xb61f75(0x18b)]()){_0xc4220e();return;}let _0x21b08d=![];const _0x52dc02=()=>{if(_0x21b08d)return;_0x21b08d=!![];if(_0x2e0182)clearTimeout(_0x2e0182);_0xc4220e();};_0x1dc333[_0xb61f75(0x1a0)]('exit',_0x52dc02);const _0x2e0182=setTimeout(()=>{const _0x460ec9=_0xb61f75;try{_0x1dc333[_0x460ec9(0x262)][_0x460ec9(0x27f)]();}catch{}},_0x32feb6+0x1f4);_0x2e0182[_0xb61f75(0x12e)]?.();try{_0x1dc333['disconnect']();}catch{try{_0x1dc333[_0xb61f75(0x262)][_0xb61f75(0x27f)]();}catch{}}})));}};return _0x4d78fe;}async function _0x320482({makeOkdb:_0xe63f9,port:_0x1367bb}){const _0x26d252=_0x3300c4,_0x5989d1=await _0xe63f9();return _0x1beb5b(_0x5989d1),_0x5989d1[_0x26d252(0x265)][_0x26d252(0x118)](_0x1367bb);}function _0x1beb5b(_0x4a940a){const _0x4e0542=_0x3300c4;if(!_0x4a940a||_0x4a940a['_clusterWorkerAttached'])return;_0x4a940a[_0x4e0542(0x109)]=!![];try{const {OKDBChangefeed:_0x2bed63}=requireOkdbChangefeed(),_0x37af58=_0x4a940a['_adminRelay'];if(_0x37af58&&typeof _0x37af58[_0x4e0542(0x100)]===_0x4e0542(0xd1)){const _0x3b22be=new _0x2bed63(_0x4a940a);_0x3b22be[_0x4e0542(0xdf)](),_0x37af58[_0x4e0542(0x100)](_0x3b22be),_0x4a940a[_0x4e0542(0x203)]=_0x3b22be;}}catch(_0x4bf98a){_0x4a940a[_0x4e0542(0x1fd)]?.['warn']?.(_0x4e0542(0x229)+(_0x4bf98a?.[_0x4e0542(0x1b3)]??_0x4bf98a),{'feature':_0x4e0542(0x87)});}const _0x4ad3f2=_0x270629=>{const _0x5482b0=_0x4e0542;if(!_0x270629||typeof _0x270629!==_0x5482b0(0x273)||_0x270629[_0x5646ec]==null)return;if(_0x270629[_0x5646ec]===_0x15a485)try{_0x4a940a[_0x5482b0(0x282)]?.[_0x5482b0(0x9c)]?.(_0x270629['event'],_0x270629[_0x5482b0(0x29a)]);}catch{}};process['on'](_0x4e0542(0x1b3),_0x4ad3f2),_0x4a940a[_0x4e0542(0x216)]=_0x4ad3f2;{let _0x14d2a9=process[_0x4e0542(0xbf)](),_0x75035c=Date['now']();const _0x50f851=()=>{const _0x55655d=_0x4e0542;if(typeof process[_0x55655d(0x174)]!=='function'||!process[_0x55655d(0xb7)])return;const _0x47d054=Date[_0x55655d(0x26f)](),_0x49c70d=process[_0x55655d(0xbf)](),_0x2b1936=(_0x47d054-_0x75035c)*0x3e8,_0x12190e=_0x49c70d[_0x55655d(0x224)]-_0x14d2a9[_0x55655d(0x224)]+(_0x49c70d[_0x55655d(0x83)]-_0x14d2a9['system']),_0x31df54=_0x2b1936>0x0?Math[_0x55655d(0x28e)](0x64,Math[_0x55655d(0x9e)](_0x12190e/(_0x2b1936*(_0x59dbab[_0x55655d(0x8b)]()['length']||0x1))*0x64)):0x0;_0x14d2a9=_0x49c70d,_0x75035c=_0x47d054;const _0x446cfe=process[_0x55655d(0x1a7)]();let _0x25765a=null;try{_0x25765a=_0x4a940a[_0x55655d(0x2a5)]?.[_0x55655d(0x1b4)]?_0x4a940a[_0x55655d(0x140)]?.[_0x55655d(0x16d)]?.()??null:null;}catch{}try{process[_0x55655d(0x174)]({[_0x5646ec]:_0x518df2,'stats':{'rss':_0x446cfe[_0x55655d(0x257)],'heapUsed':_0x446cfe[_0x55655d(0x18e)],'heapTotal':_0x446cfe[_0x55655d(0x27a)],'external':_0x446cfe[_0x55655d(0x131)],'cpuPct':_0x31df54,'cpuWindowMs':Math[_0x55655d(0x9e)](_0x2b1936/0x3e8)||null},'processing':_0x25765a});}catch{}},_0x3e4db9=Math[_0x4e0542(0x1c9)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x246659=setInterval(_0x50f851,_0x3e4db9);_0x246659[_0x4e0542(0x12e)]?.(),_0x50f851();for(const _0x369d6b of[_0x4e0542(0x1ae),_0x4e0542(0x172)]){_0x4a940a[_0x4e0542(0x18c)]?.['on']?.(_0x369d6b,()=>{try{_0x50f851();}catch{}});}}let _0x16dbfc=![];const _0x39ce67=async _0x5c81a0=>{const _0x4f369f=_0x4e0542;if(_0x16dbfc)return;_0x16dbfc=!![];const _0x2893dd=setTimeout(()=>process[_0x4f369f(0x19a)](_0x5c81a0),_0x32feb6);_0x2893dd[_0x4f369f(0x12e)]?.();try{await _0x4a940a[_0x4f369f(0xf8)]?.();}catch{}process[_0x4f369f(0x19a)](_0x5c81a0);};process['on'](_0x4e0542(0x1d6),()=>_0x39ce67(0x0));if(process[_0x4e0542(0x174)]&&!process[_0x4e0542(0xb7)])_0x39ce67(0x0);if(process['platform']!==_0x4e0542(0x122)){const _0x1c4c75=setInterval(()=>{if(process['ppid']===0x1)_0x39ce67(0x0);},_0x3e6003);_0x1c4c75[_0x4e0542(0x12e)]?.(),_0x4a940a['_clusterOrphanWatch']=_0x1c4c75;}}return okdbCluster={'runClustered':_0x2d53fb,'attachWorkerCluster':_0x1beb5b},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x2f2539=require$$0$5,{attachWorkerCluster:_0x46b847}=requireOkdbCluster();async function _0x210b1f(){const _0x2ddb0e=_0x2fe0,_0x429dbb=process.env.OKDB_HTTP_CHILD;if(!_0x429dbb)throw new Error('okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing');const {rootPath:_0x3d04c6,port:_0x212127,options:options={},logLevel:logLevel=_0x2ddb0e(0x88)}=JSON[_0x2ddb0e(0xf1)](_0x429dbb);if(!_0x3d04c6||!_0x212127)throw new Error(_0x2ddb0e(0x22b));const _0x482ab7=new _0x2f2539(_0x3d04c6,{...options,'engines':![],'processors':![],'compaction':![]});_0x482ab7[_0x2ddb0e(0x1fd)][_0x2ddb0e(0x190)]?.();const _0x56f506=process.env.OKDB_CLUSTER_SLOT??'?',_0x52b646={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x3a9689=_0x52b646[logLevel]??_0x52b646[_0x2ddb0e(0x88)];_0x482ab7[_0x2ddb0e(0x1fd)]['attach'](_0x4f283d=>{const _0x4ee181=_0x2ddb0e;if((_0x52b646[_0x4f283d[_0x4ee181(0x1fc)]]??0x1)<_0x3a9689)return;try{process['send']?.({'__okdbCluster':'log','slot':_0x56f506,'pid':process[_0x4ee181(0x29d)],'entry':_0x4f283d});}catch{}}),await _0x482ab7['open'](),_0x46b847(_0x482ab7),await _0x482ab7['http']['listen'](_0x212127);}return _0x210b1f()['catch'](_0x1aa40a=>{const _0x24ec76=_0x2fe0;try{process[_0x24ec76(0x174)]?.({'__okdbCluster':_0x24ec76(0x1fd),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x24ec76(0x29d)],'entry':{'level':_0x24ec76(0x250),'msg':_0x24ec76(0x166)+(_0x1aa40a?.[_0x24ec76(0x1b3)]??_0x1aa40a)}});}catch{}process['exit'](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module['exports']=okdbHttpWorkerChild;
|