@kedem/okdb 2.7.0 → 2.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -1
- package/algorithm-worker-thread.js +1 -1
- package/bin/okdb.js +1 -1
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x2ee730=_0x302a;(function(_0x2b2da3,_0x43eeed){const _0x57079b=_0x302a,_0x45b680=_0x2b2da3();while(!![]){try{const _0x4296f3=parseInt(_0x57079b(0x16c))/0x1+-parseInt(_0x57079b(0x1cb))/0x2+-parseInt(_0x57079b(0x1f2))/0x3+parseInt(_0x57079b(0x14f))/0x4*(parseInt(_0x57079b(0x183))/0x5)+parseInt(_0x57079b(0xfc))/0x6+-parseInt(_0x57079b(0x222))/0x7+-parseInt(_0x57079b(0xbb))/0x8;if(_0x4296f3===_0x43eeed)break;else _0x45b680['push'](_0x45b680['shift']());}catch(_0x329e1d){_0x45b680['push'](_0x45b680['shift']());}}}(_0x4900,0x6c5ee));var require$$0$5=require('./okdb'),require$$1$1=require(_0x2ee730(0x265)),require$$1=require(_0x2ee730(0x2e4)),require$$0$3=require('os'),require$$2=require(_0x2ee730(0x107)),require$$0=require(_0x2ee730(0x269)),require$$0$2=require(_0x2ee730(0x271)),require$$0$1=require('fs'),require$$0$4=require(_0x2ee730(0xd4));function _0x302a(_0x4cb4a4,_0x23fc2e){_0x4cb4a4=_0x4cb4a4-0xac;const _0x490062=_0x4900();let _0x302a8b=_0x490062[_0x4cb4a4];return _0x302a8b;}function _0x4900(){const _0xe28a06=['epoch','external','instances','crypto','toISOString','ms\x20p99=','processor:ready','ms\x20busy=','dumpedAt','oldestPendingMs','trim','item:pending','_nodeDbCache','registerFts','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','_changefeed','detachConsole','publishOwnRow','_kind','getCmd','txn:start','_cmd','clearThreadStats','isHeld','mkdirSync','ensureType','_rawDb','_onItem','force','registry\x20heartbeat\x20skipped\x20(writer=','_onPoke','index:progress','null','_nodeDead','beforeWrite','ITEM_CREATE','reportThreadStats','okdb-writer:\x20env\x20closing\x20—\x20retry','isPrimary','drain','randomUUID','rows=','INDEX_REGISTERED','call','_onStop','_singletonLocks','extend','_durs','_instanceId','_supervisorKey','length','_singletonLock','\x20phase=','processingSig','_lastCpuPct','filter','fn-runner','nodesView','_wantDbHandle','_holderDead','_onTick','_ensureDesired','_assertUsable','~lock','object','\x20worker(s)\x20remaining','_outstanding','_lastCpuWindowMs','view','raw-remove','singletonClaims','some','keys','instanceId','allSettled','844ygmImh','execArgv','_buildChildRow','role','round','_writer','commitP99Ms','_processStartedAt','release','INDEX_RESET','_maybePublish','enable','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','\x20===','resetIndex','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','_wantDb','index:ready','_closed','processorId','_bpParkedTotal','closing','type:registered','_nodeDbFor','\x20times\x20in\x20','\x0a===\x20OKDB_DIAG\x20','procmodeack/','cursorKey','change','749119GYcHQu','stats','ESRCH','sort','race','recordWrite','getChanges','SWAP','\x20│\x20','ppid','ENV_CLOSING_RETRY','heartbeatMs','clearTtl','_activateProcesses','[okdb-cluster]\x20respawning\x20worker\x20slot=','from','version','process\x20','enabled','updateSupervisedChildStats','_enqueuedAt','supervisorKey','resetReadTxn','2005GYqUCt','events','ready','find','_key','shift','processor:paused','okdb-diag.','next','_report','ITEM_REMOVE','cpuUsage','ms\x20env=','_rootDb','_startedAt','claims','stopHeartbeat','entries','_quantum','isWorker','~processes','\x20while\x20this\x20process\x20runs\x20','okdb-writer[','system:clock_change','info','putNode','string','stderr','type','rss','putSync','schema:set','[okdb-cluster]\x20slot=','nodeKey','_selfKey','_refreshDesiredSnapshot','default','close','INDEX_READY','ingest','rowKey','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','push','getRange','[okdb-cluster]\x20','remove','options','meta','busy','_scheduleFlush','listenAddr','status','min','treeView','node/','_putRowSync','_buildProcessingFacet','deaths','transactionSync','floor','reject','now','user','online','none','embedded','setDesired','(worst\x20','_acquiredAt','CHANGEFEED_QUANTUM','stringify','_committed','524992QLItIq','_buckets','_participate','creating','hostname','_seen','standalone','processor:error','function','_enableChangelog','_statusEnv','startsWith','platform','ms\x20mean=','_drainOne','_lockDb','_dedupeKey','appendFileSync','memoryUsage','_listenAddr','disconnect','recent\x20writes\x20(newest\x20first)','_nodeDb','then','_putRowAsync','lifecycle','_nestedTotal','VIEW_PROGRESS','\x20\x20(no\x20env\x20draining)','_systemEnv','_hbTimer','_heartbeatTimer','emit','_groupByProcess','_draining','_lastCpuUsage','fromEntries','children','splice','81336EBfttr','processors','error','win32','listen','state','system:drain','index:drop','exports','running','percentile','item:remove','replace','add','closed','bumpCmd','_markSeen','schema:drop','process','SYSTEM_PROC','_desiredOverlay','_threadStats','slice','_db','uptime','startedAt','system:bus_state_change','ITEM_UPDATE','dropping','_isStale','listDesired','decommission','system','mode','setTtl','SIGKILL','resetting','_wantDbOf','_adoptPeerIndexes','getClock','host','building','reset','cli','_handlePending','bus:drain','stopping','updatedAt','3352265MwukRz','register','_flushDebounce','prototype','values','cluster-wide','_pendingLocal','procmode/','FTS_DROP','ttl:expired','registerType','REMOVE','\x20sync','\x20drainAge=','__okdbSlot','processor:retry','_sandbox','ttl:set','_transactionOnce','starting','assign','removeSync','_highWater','_servingEngines','send','writerStatus','abs','resolve','_heartbeatInFlight','sync:apply',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','namespace','stopped','note','log','_children','created','signalWant','ephemeral','_onProcEvent','max','number',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','_started','_collectWriterFacet','isConnected','error:\x20','fork','size','data','maxMs','--watch','\x20died\x20','_admissionTimer','heldBy','indexOf','FTS_REGISTERED','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','split','bus:proc','_role','dropIndex','processor:resumed','join','_lock','_held','inst:','cluster','ref:violation_resolved','registerIndex','childTransaction','node:perf_hooks','_flushTimer','count','entry','loop-lag','kind','license:invalid','afterWrite','perf_hooks','stop','[okdb-cluster]\x20worker\x20pid=','cpuWindowMs','put','listening','_timer','SYSTEM_STOPPED','map','_caps','_inflight','primary','_dedupeMax','fts:drop','http-server','registry\x20publish\x20failing:\x20','system:proc','off','parkedNow','processing','_isWriter','code','async','system:poke','includes','cpuPct','\x20\x20#','holder','sandbox','flushed','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','_versionSkewWarned','1ofN:','write','openDB','_clusterWorkerAttached','okdb','expiresAt','_handleInProcess','bus:poke','_released','\x20parkedNow=','_baselines','_rowKey','_pending','_publishNow','compaction','processes','heapUsed','_startHeartbeat','dedupeMax','fanout','attach','paused','system:ready','participate','__okdbCluster','_log','_ownMeta','workers','value','_envs','isActive','_buildOwnRow','catch','attachFeed','exit','unref','clusterStatusView','admitted','_sampleOwnStats','hasDesired','FTS_RESET','transaction','set','noteListenAddr','cpus','\x20ipc\x20error:\x20','--test','_removeRowAsync','__vocab/version','license:added','selfKey','_desired','warn','committed','message','uncaughtException','commitsPerSec','INDEX_SET_CHANGED','env','maxExtra','\x20forked\x20','kill','listNodes','registry-publish','license:activated','ttlMs','_isReader','reap','_nestedWarned','draining',');\x20','env:removed','single','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','fast','list','getDesired','processKey','_publishFailWarned','_windowCbs','respawnTimer','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','once','path','ms\x20activeWriters=','node','system:env_release','field:resolver_registered','_openEnvLazy','isDead','offWindow','http','engines','caps','pushEphemeral','mean','decommissioning','\x20@\x20','event','\x20pid=','_lastPublishAt','--inspect','inspect','connected','consecutiveFailures','stack','_drain','inflightAgesMs','_coordinator','366008DlPEkL','threads','removeNode','dropSchema','fts:registered','dead','setOwnMeta','_clusterOnMessage','repeat','~processes:cmd','has','\x0a\x20\x20\x20\x20\x20\x20','\x20\x20env=','start','envsOpen','worker','\x20writer{depth=','okdb-lock:\x20env\x20closed','loop-lag\x20','\x20(durable\x20desired-state)','_handlePoke','compact','toFixed','hasOwnProperty','delete','node:events','processor','\x20in\x20','sync','\x20worker(s)\x20still\x20serving','ms\x20on\x20env=','level','_admissionStarted','depth','SYSTEM_POKE','load','_heldTotal','pid','heapTotal','workersConfigured','index:registered','all','ms/','_bpWaiters','_startAdmission','started','_onPending','publishChildRow','acquiredAt','\x20—\x20','msg','resetFts','ms\x20(attempt\x20','--print','clear','get','_adminRelay','_collectSingletonClaims','slot','prependListener','claimGated','_done','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','bus:env_release','isEnabled','2546460UxRzIe','unique:violation_resolved','_lastCpuAt','(code=','license:removed',',\x20signal=','.log','_cursors'];_0x4900=function(){return _0xe28a06;};return _0x4900();}function getDefaultExportFromCjs(_0x326220){const _0x5bd55a=_0x2ee730;return _0x326220&&_0x326220['__esModule']&&Object[_0x5bd55a(0x225)][_0x5bd55a(0xd2)][_0x5bd55a(0x12f)](_0x326220,'default')?_0x326220[_0x5bd55a(0x1a7)]:_0x326220;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x36b714=_0x2ee730;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0xc2b2a0={'PUT':_0x36b714(0x275),'REMOVE':_0x36b714(0x1b0),'INDEX_DROP':_0x36b714(0x25f),'INDEX_REGISTER':_0x36b714(0x267),'INDEX_RESET':_0x36b714(0x15d),'TYPE_REGISTER':_0x36b714(0x22c),'TYPE_DROP':'dropType','FTS_REGISTER':_0x36b714(0x111),'FTS_DROP':'dropFts','FTS_RESET':_0x36b714(0xee),'SCHEMA_SET':'setSchema','SCHEMA_DROP':_0x36b714(0xbe),'TTL_SET':_0x36b714(0x214),'TTL_CLEAR':_0x36b714(0x178)},_0x11ba85={'SYSTEM_READY':_0x36b714(0x2a7),'FIELD_RESOLVER_REGISTERED':_0x36b714(0x2e8),'SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':_0x36b714(0x19a),'SYSTEM_POKE':_0x36b714(0x288),'SYSTEM_DRAIN':_0x36b714(0x1f8),'SYSTEM_TYPE_DROP':'system:type_drop','SYSTEM_PROC':_0x36b714(0x281),'SYSTEM_BUS_STATE_CHANGE':_0x36b714(0x20c),'ITEM_CREATE':'item:create','ITEM_UPDATE':'item:update','ITEM_REMOVE':_0x36b714(0x1fd),'ITEM_PENDING':_0x36b714(0x10f),'INDEX_RESET':'index:reset','INDEX_READY':_0x36b714(0x160),'INDEX_PROGRESS':_0x36b714(0x123),'VIEW_PROGRESS':'view:progress','INDEX_DROP':_0x36b714(0x1f9),'INDEX_REGISTERED':_0x36b714(0xe3),'FTS_REGISTERED':_0x36b714(0xbf),'FTS_DROP':_0x36b714(0x27e),'FTS_RESET':'fts:reset','SCHEMA_SET':_0x36b714(0x1a2),'SCHEMA_DROP':_0x36b714(0x203),'UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0x36b714(0xfd),'REF_VIOLATION':'ref:violation','REF_VIOLATION_RESOLVED':_0x36b714(0x266),'SYNC_APPLY':_0x36b714(0x23f),'TXN_START':_0x36b714(0x118),'TXN_END':'txn:end','TXN_ROLLBACK':'txn:rollback','TYPE_REGISTERED':_0x36b714(0x165),'TYPE_DROP':'type:drop','ENV_OPENED':'env:opened','ENV_REMOVED':_0x36b714(0x2d8),'SYSTEM_ENV_RELEASE':_0x36b714(0x2e7),'TTL_EXPIRED':_0x36b714(0x22b),'TTL_SET':_0x36b714(0x233),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x36b714(0x26f),'LICENSE_ADDED':_0x36b714(0x2c2),'LICENSE_ACTIVATED':_0x36b714(0x2d1),'LICENSE_REMOVED':_0x36b714(0x100)},_0x219d99={'CREATING':_0x36b714(0x1ce),'RESETTING':_0x36b714(0x216),'READY':_0x36b714(0x185),'DROPPING':_0x36b714(0x20e),'WAITING':'waiting','ERROR':_0x36b714(0x1f4)},_0x3c0950={'CREATED':_0x36b714(0x246),'STARTING':_0x36b714(0x235),'STARTED':_0x36b714(0xe8),'STOPPING':_0x36b714(0x220),'STOPPED':_0x36b714(0x242)},_0x320b66={'CREATING':_0x36b714(0x1ce),'READY':_0x36b714(0x185),'HALTED':'halted','STOPPED':_0x36b714(0x242),'RESETTING':_0x36b714(0x216)},_0x298f8a=Object['freeze']({'POKE':_0x36b714(0x298),'DRAIN':_0x36b714(0x21f),'TYPE_DROP':'bus:type_drop','PROC':_0x36b714(0x25d),'ENV_RELEASE':_0x36b714(0xfa)});return okdbEnums={'BUS_EVENTS':_0x298f8a,'CHANGE_ACTIONS':_0xc2b2a0,'EVENTS':_0x11ba85,'INDEX_STATE':_0x219d99,'OKDB_STATE':_0x3c0950,'VIEW_STATE':_0x320b66},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x43733e=_0x2ee730;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x2d9164,performance:_0x17e75b}=require$$0,_0x14c706=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG==='true',_0x33536a=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x3e1dc5=process.env.OKDB_LOOP_LAG_ALL==='1',_0x4c446e=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x18b744{constructor(){const _0x1a8737=_0x302a;this[_0x1a8737(0x17e)]=_0x14c706,this[_0x1a8737(0x1cc)]=new Map(),this['_h']=null,this[_0x1a8737(0x277)]=null,this[_0x1a8737(0x24d)]=![],this[_0x1a8737(0x2aa)]=(_0x2c915e,_0x4e5ce6)=>process[_0x1a8737(0x19e)][_0x1a8737(0x292)](_0x2c915e+(_0x4e5ce6?'\x20'+JSON[_0x1a8737(0x1c9)](_0x4e5ce6):'')+'\x0a');}['now'](){const _0x2e8090=_0x302a;return _0x17e75b[_0x2e8090(0x1c0)]();}['setLogger'](_0xf56bf8){const _0x171ffa=_0x302a;if(typeof _0xf56bf8==='function')this[_0x171ffa(0x2aa)]=_0xf56bf8;}['note'](_0x2b1337,_0xa7e578,_0x2267a4){const _0x26cbb4=_0x302a;if(!this['enabled'])return;let _0x3b0bef=this[_0x26cbb4(0x1cc)][_0x26cbb4(0xf2)](_0x2b1337);!_0x3b0bef&&(_0x3b0bef={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x26cbb4(0x1cc)][_0x26cbb4(0x2bb)](_0x2b1337,_0x3b0bef)),_0x3b0bef['ms']+=_0xa7e578,_0x3b0bef[_0x26cbb4(0x26b)]+=0x1,_0xa7e578>_0x3b0bef[_0x26cbb4(0x254)]&&(_0x3b0bef[_0x26cbb4(0x254)]=_0xa7e578,_0x3b0bef[_0x26cbb4(0x2cc)]=_0x2267a4||'');}[_0x43733e(0xc8)](_0xbb6e3c){const _0x4fde65=_0x43733e;if(!this[_0x4fde65(0x17e)]||this[_0x4fde65(0x24d)])return;this[_0x4fde65(0x24d)]=!![];if(_0xbb6e3c)this[_0x4fde65(0x2aa)]=_0xbb6e3c;this['_h']=_0x2d9164({'resolution':0xa}),this['_h'][_0x4fde65(0x15a)](),this['_timer']=setInterval(()=>this['_report'](),_0x33536a);if(this['_timer'][_0x4fde65(0x2b4)])this[_0x4fde65(0x277)]['unref']();}['onWindow'](_0x51f249){const _0x4c37b3=_0x43733e;if(!this[_0x4c37b3(0x2e0)])this[_0x4c37b3(0x2e0)]=new Set();this[_0x4c37b3(0x2e0)][_0x4c37b3(0x1ff)](_0x51f249);if(!this[_0x4c37b3(0x24d)])this[_0x4c37b3(0xe7)]();}[_0x43733e(0x2eb)](_0x15e42a){const _0x8e73f9=_0x43733e;this[_0x8e73f9(0x2e0)]?.['delete'](_0x15e42a);}[_0x43733e(0xe7)](){const _0xc39272=_0x43733e;if(this['_admissionStarted'])return;this[_0xc39272(0xdb)]=!![];!this['_h']&&(this['_h']=_0x2d9164({'resolution':0xa}),this['_h']['enable']());const _0x263b57=_0x33536a;this[_0xc39272(0x257)]=setInterval(()=>{const _0x2ba9e1=_0xc39272,_0x4bbffc=this['_h'];if(!_0x4bbffc)return;const _0x10ee84=_0x4bbffc[_0x2ba9e1(0x1fc)](0x63)/0xf4240,_0x1dc667=_0x4bbffc[_0x2ba9e1(0x24a)]/0xf4240,_0x31a79d=_0x4bbffc[_0x2ba9e1(0xad)]/0xf4240;_0x4bbffc[_0x2ba9e1(0x21c)]();if(this[_0x2ba9e1(0x2e0)])for(const _0x506645 of this[_0x2ba9e1(0x2e0)]){try{_0x506645({'p99Ms':_0x10ee84,'maxMs':_0x1dc667,'meanMs':_0x31a79d,'reportMs':_0x263b57});}catch{}}},_0x263b57);if(this[_0xc39272(0x257)][_0xc39272(0x2b4)])this[_0xc39272(0x257)][_0xc39272(0x2b4)]();}[_0x43733e(0x18c)](){const _0x125a03=_0x43733e,_0x1507c1=this['_h'],_0x106fc6=_0x1507c1['max']/0xf4240,_0x128893=_0x1507c1[_0x125a03(0x1fc)](0x63)/0xf4240,_0x25659e=_0x1507c1[_0x125a03(0xad)]/0xf4240;_0x1507c1[_0x125a03(0x21c)]();const _0x569834=[...this[_0x125a03(0x1cc)][_0x125a03(0x194)]()]['map'](([_0x49ba21,_0x548522])=>({'label':_0x49ba21,..._0x548522}))['sort']((_0x4d70e1,_0x24f462)=>_0x24f462['ms']-_0x4d70e1['ms'])['slice'](0x0,0x8);this['_buckets']['clear']();const _0x54a56c=_0x569834['reduce']((_0x31661d,_0x2f2934)=>_0x31661d+_0x2f2934['ms'],0x0),_0x5ec00c=_0x569834[_0x125a03(0x279)](_0x44752f=>_0x44752f['label']+'='+_0x44752f['ms']['toFixed'](0x0)+_0x125a03(0xe5)+_0x44752f[_0x125a03(0x26b)]+(_0x44752f[_0x125a03(0x254)]>0x5?_0x125a03(0x1c6)+_0x44752f[_0x125a03(0x254)][_0x125a03(0xd1)](0x0)+'ms'+(_0x44752f['maxExtra']?'\x20'+_0x44752f['maxExtra']:'')+')':''));(_0x3e1dc5||_0x106fc6>=_0x4c446e)&&this[_0x125a03(0x2aa)](_0x125a03(0xcd)+_0x33536a+'ms\x20max='+_0x106fc6[_0x125a03(0xd1)](0x0)+_0x125a03(0x109)+_0x128893['toFixed'](0x0)+_0x125a03(0x1d8)+_0x25659e['toFixed'](0x0)+_0x125a03(0x10b)+_0x54a56c[_0x125a03(0xd1)](0x0)+'ms'+(_0x5ec00c['length']?_0x125a03(0x174)+_0x5ec00c['join']('\x20\x20'):''),{'feature':_0x125a03(0x26d)});if(this[_0x125a03(0x2e0)])for(const _0x213877 of this[_0x125a03(0x2e0)]){try{_0x213877({'p99Ms':_0x128893,'maxMs':_0x106fc6,'meanMs':_0x25659e,'reportMs':_0x33536a});}catch{}}}[_0x43733e(0x272)](){const _0x10ae48=_0x43733e;if(this[_0x10ae48(0x277)])clearInterval(this['_timer']);if(this['_h'])this['_h']['disable']();this[_0x10ae48(0x277)]=null,this['_h']=null,this['_started']=![];}}const _0x5b3012=new _0x18b744();if(_0x5b3012[_0x43733e(0x17e)])_0x5b3012[_0x43733e(0xc8)]();return okdbLoopMonitor={'LOOP':_0x5b3012},okdbLoopMonitor;}var okdbTimers,hasRequiredOkdbTimers;function requireOkdbTimers(){if(hasRequiredOkdbTimers)return okdbTimers;hasRequiredOkdbTimers=0x1;const _0x39aa87=0x2**0x1f-0x1;function _0x2d33f9(_0x3e9989){if(!(_0x3e9989>0x0))return 0x0;return _0x3e9989>_0x39aa87?_0x39aa87:_0x3e9989;}function _0x38b4a9(_0x49869a){return _0x49869a===Infinity;}return okdbTimers={'MAX_TIMER_DELAY':_0x39aa87,'clampTimerDelay':_0x2d33f9,'isNeverDelay':_0x38b4a9},okdbTimers;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x1823e2=require$$0$1,_0x477dfb=require$$1;let _0xab9608,_0x37a234,_0x54a3be,_0x1a7505,_0x27787a,_0x1e87fd,_0x1a0afe,_0x165fbf=![];const _0x188677=new Set();let _0x107dad=null;const _0x59f596=new Map();function _0x2ffb54(){const _0x2dbe47=_0x302a;if(_0xab9608!==undefined)return _0xab9608;_0xab9608=process.env.OKDB_DIAG==='1';if(!_0xab9608)return![];_0x37a234=process.env.OKDB_DIAG_STACK==='1',_0x1a7505=Math['max'](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x54a3be=new Array(_0x1a7505),_0x27787a=0x0,_0x1e87fd=0x0,_0x1a0afe=process.env.OKDB_DIAG_DIR||null;if(_0x1a0afe)try{_0x1823e2[_0x2dbe47(0x11c)](_0x1a0afe,{'recursive':!![]});}catch{}return!![];}function _0xb9d7c0(){return _0xab9608===undefined?_0x2ffb54():_0xab9608;}function _0x1c8c5d(_0x3fe70d,_0x27d16d){const _0x55f919=_0x302a;if(_0xab9608===undefined?!_0x2ffb54():!_0xab9608)return;let _0xca30b0;if(_0x37a234){const _0xe34958=new Error()['stack']||'';_0xca30b0=_0xe34958[_0x55f919(0x25c)]('\x0a')['slice'](0x3)[_0x55f919(0x279)](_0x16ab08=>_0x16ab08[_0x55f919(0x10e)]())['filter'](Boolean)[_0x55f919(0x208)](0x0,0x8);}_0x54a3be[_0x27787a]={'seq':_0x1e87fd++,'t':Date[_0x55f919(0x1c0)](),'env':_0x3fe70d,'kind':_0x27d16d||'commit','stack':_0xca30b0},_0x27787a=(_0x27787a+0x1)%_0x1a7505;}function _0x4a3e8f(_0x45bd65){const _0x270cf7=_0x302a,_0x329df2=[];for(let _0x7e9f0e=0x0;_0x7e9f0e<_0x1a7505;_0x7e9f0e++){const _0x7e053f=_0x54a3be[(_0x27787a-0x1-_0x7e9f0e+_0x1a7505*0x2)%_0x1a7505];if(!_0x7e053f)continue;_0x329df2[_0x270cf7(0x1ad)](_0x7e053f);if(_0x329df2['length']>=_0x45bd65)break;}return _0x329df2;}function _0x50f8b5(_0x1742c5){const _0x2324ec=_0x302a;try{process[_0x2324ec(0x19e)]['write'](_0x1742c5+'\x0a');}catch{}if(_0x1a0afe)try{_0x1823e2[_0x2324ec(0x1dc)](_0x477dfb[_0x2324ec(0x261)](_0x1a0afe,_0x2324ec(0x18a)+process[_0x2324ec(0xe0)]+_0x2324ec(0x102)),_0x1742c5+'\x0a');}catch{}}function _0x26053c(_0x500deb){const _0x594209=_0x302a,_0x5daf25=_0x4a3e8f(_0x500deb);if(!_0x5daf25[_0x594209(0x136)])return _0x594209(0x1ac);const _0x274724=Date[_0x594209(0x1c0)]();return _0x5daf25[_0x594209(0x279)](_0x4c2cb9=>{const _0xe64326=_0x594209,_0x5997e2=_0xe64326(0x28b)+_0x4c2cb9['seq']+'\x20-'+(_0x274724-_0x4c2cb9['t'])+_0xe64326(0x18f)+_0x4c2cb9[_0xe64326(0x2cb)]+'\x20'+_0x4c2cb9[_0xe64326(0x26e)];return _0x4c2cb9['stack']&&_0x4c2cb9[_0xe64326(0xb7)][_0xe64326(0x136)]?_0x5997e2+'\x0a\x20\x20\x20\x20\x20\x20'+_0x4c2cb9[_0xe64326(0xb7)][_0xe64326(0x261)](_0xe64326(0xc6)):_0x5997e2;})['join']('\x0a');}function _0x4838d6(_0x4a9188,_0x1aa2ad){const _0x4e9c22=_0x302a,_0x5e522f=_0x4e9c22(0x168)+_0x4a9188+_0x4e9c22(0xaf)+new Date()[_0x4e9c22(0x108)]()+_0x4e9c22(0xb1)+process[_0x4e9c22(0xe0)]+'\x20===',_0x2b1d44=[_0x5e522f,_0x4e9c22(0x250)+(_0x1aa2ad&&_0x1aa2ad['stack']?_0x1aa2ad[_0x4e9c22(0xb7)]['split']('\x0a')[0x0]:_0x1aa2ad),_0x4e9c22(0x1e0)+(_0x37a234?'':_0x4e9c22(0x15b))+':',_0x26053c(0x18),_0x23c0fc(),'='['repeat'](_0x5e522f[_0x4e9c22(0x136)]-0x1)];_0x50f8b5(_0x2b1d44[_0x4e9c22(0x261)]('\x0a'));}function _0x32ea44(_0x4e7608){const _0x3b3769=_0x302a;if(!_0xb9d7c0())return;const _0x4a6a81=String(_0x4e7608&&_0x4e7608[_0x3b3769(0x2c7)]||_0x4e7608||''),_0x3e3edc=/already closed|environment is already|invalid read txn|reset an invalid/i['test'](_0x4a6a81);_0x4838d6(_0x3e3edc?'ORPHAN\x20(env-closed\x20write)':_0x3b3769(0x2c8),_0x4e7608);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x3e3edc)return;try{console[_0x3b3769(0x1f4)](_0x4e7608&&_0x4e7608[_0x3b3769(0xb7)]?_0x4e7608[_0x3b3769(0xb7)]:_0x4e7608);}catch{}process[_0x3b3769(0x2b3)](0x1);}function _0x143ade(_0x1ecc1c){const _0x5386ba=_0x302a;if(!_0xb9d7c0())return;const _0x1af2ee=String(_0x1ecc1c&&_0x1ecc1c[_0x5386ba(0x2c7)]||_0x1ecc1c||'');/already closed|environment is already|invalid read txn|reset an invalid/i['test'](_0x1af2ee)&&_0x4838d6(_0x5386ba(0x28f),_0x1ecc1c);}function _0x23c0fc(){const _0x259ad5=_0x302a,_0x466531=[_0x259ad5(0x2da)];let _0x20da5b=![];for(const _0xb449ab of _0x188677){const _0x254d7c=_0xb449ab&&_0xb449ab[_0x259ad5(0x2ae)];if(!_0x254d7c)continue;for(const [_0x459253,_0xd12d32]of _0x254d7c){const _0x5739dc=_0xd12d32&&_0xd12d32['_coordinator']&&_0xd12d32['_coordinator'][_0x259ad5(0x148)];if(!_0x5739dc)continue;let _0x292bb2,_0x24eb90;try{_0x292bb2=Atomics[_0x259ad5(0xde)](_0x5739dc,0x0),_0x24eb90=Atomics[_0x259ad5(0xde)](_0x5739dc,0x1);}catch{continue;}if(_0x292bb2===0x0)continue;_0x20da5b=!![];const _0x39f638=_0x292bb2>0x0?_0x259ad5(0x173):'copy',_0x52825c=Date[_0x259ad5(0x1c0)]()-Math[_0x259ad5(0x23c)](_0x292bb2)*0x3e8,_0x30cc30=((()=>{const _0x56fe84=_0x259ad5;try{return _0xd12d32[_0x56fe84(0x154)]&&_0xd12d32[_0x56fe84(0x154)][_0x56fe84(0x1b6)]?_0xd12d32[_0x56fe84(0x154)][_0x56fe84(0x1b6)]():null;}catch{return null;}})());_0x466531[_0x259ad5(0x1ad)](_0x259ad5(0xc7)+_0x459253+_0x259ad5(0x138)+_0x39f638+_0x259ad5(0x22f)+_0x52825c+_0x259ad5(0x2e5)+_0x24eb90+(_0x30cc30?_0x259ad5(0xcb)+_0x30cc30[_0x259ad5(0xdc)]+'\x20oldestPendingMs='+_0x30cc30[_0x259ad5(0x10d)]+_0x259ad5(0x29a)+_0x30cc30[_0x259ad5(0x283)]+'}':''));}}if(!_0x20da5b)_0x466531[_0x259ad5(0x1ad)](_0x259ad5(0x1e7));return _0x466531[_0x259ad5(0x261)]('\x0a');}function _0x382ef8(){const _0x43cf1f=_0x302a;if(!_0xb9d7c0())return;const _0x550e47=Math[_0x43cf1f(0x24a)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x23086a=Date['now']();for(const _0x30c023 of _0x188677){const _0x2dc33f=_0x30c023&&_0x30c023['_envs'];if(!_0x2dc33f)continue;for(const [_0x29e63c,_0x2a3027]of _0x2dc33f){const _0x4156a7=_0x2a3027&&_0x2a3027[_0x43cf1f(0xba)]&&_0x2a3027[_0x43cf1f(0xba)][_0x43cf1f(0x148)];if(!_0x4156a7)continue;let _0x33b245;try{_0x33b245=Atomics[_0x43cf1f(0xde)](_0x4156a7,0x0);}catch{continue;}const _0x204366=_0x30c023[_0x43cf1f(0x2e4)]+'|'+_0x29e63c;if(_0x33b245<=0x0){_0x59f596[_0x43cf1f(0xd3)](_0x204366);continue;}const _0xd0b29=_0x23086a-_0x33b245*0x3e8,_0x34fca9=_0x59f596[_0x43cf1f(0xf2)](_0x204366);if(_0xd0b29<_0x550e47)continue;if(_0x34fca9&&_0x23086a-_0x34fca9[_0x43cf1f(0x10c)]<_0x550e47)continue;_0x59f596[_0x43cf1f(0x2bb)](_0x204366,{'firstTs':_0x34fca9?_0x34fca9['firstTs']:_0x33b245,'dumpedAt':_0x23086a});const _0x518afc='\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20'+_0xd0b29+_0x43cf1f(0xd9)+_0x29e63c+_0x43cf1f(0xaf)+new Date()[_0x43cf1f(0x108)]()+'\x20pid='+process[_0x43cf1f(0xe0)]+_0x43cf1f(0x15c);_0x50f8b5([_0x518afc,_0x23c0fc(),'='[_0x43cf1f(0xc3)](_0x518afc[_0x43cf1f(0x136)]-0x1)][_0x43cf1f(0x261)]('\x0a'));}}}function _0x495d90(){const _0xe7ba1c=_0x302a;if(!_0xb9d7c0()||_0x165fbf)return;_0x165fbf=!![],process[_0xe7ba1c(0xf6)](_0xe7ba1c(0x2c8),_0x32ea44),process[_0xe7ba1c(0xf6)]('unhandledRejection',_0x143ade);const _0x2e876a=Math[_0xe7ba1c(0x24a)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x107dad=setInterval(_0x382ef8,_0x2e876a);if(_0x107dad[_0xe7ba1c(0x2b4)])_0x107dad['unref']();}function _0x7cc3c0(_0x55a122){const _0x11f82c=_0x302a;if(!_0xb9d7c0()||!_0x55a122)return;_0x188677[_0x11f82c(0x1ff)](_0x55a122),_0x495d90();}function _0xa57e6b(_0x2fd108){const _0x539064=_0x302a;_0x188677[_0x539064(0xd3)](_0x2fd108);}function _0x4a005e(){if(!_0xb9d7c0())return{'enabled':![],'hint':'set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)'};return{'enabled':!![],'stackCapture':!!_0x37a234,'recentWrites':_0x4a3e8f(0x10),'drain':_0x23c0fc()};}return okdbDiag={'isEnabled':_0xb9d7c0,'recordWrite':_0x1c8c5d,'installDiag':_0x495d90,'registerOkdb':_0x7cc3c0,'unregisterOkdb':_0xa57e6b,'snapshot':_0x4a005e},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0xc70012=_0x2ee730;if(hasRequiredOkdbWriter)return okdbWriter['exports'];hasRequiredOkdbWriter=0x1;const {performance:_0xeab2d3}=require$$0$2,_0x29b108=requireOkdbDiag(),_0x2b1a30=process.env.OKDB_COMMIT_MODE===_0xc70012(0xd7);class _0x2f64d8{constructor(_0x2302a8){const _0x3d3e53=_0xc70012;this[_0x3d3e53(0x2cb)]=_0x2302a8,this[_0x3d3e53(0x27b)]=new Set(),this[_0x3d3e53(0x180)]=new Map(),this[_0x3d3e53(0x1ca)]=0x0,this[_0x3d3e53(0x133)]=[],this[_0x3d3e53(0xf8)]=[],this['_highWater']=Math['max'](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this['_outstanding']=0x0,this['_bpWaiters']=[],this[_0x3d3e53(0x163)]=0x0,this['_held']=null,this[_0x3d3e53(0xdf)]=0x0,this[_0x3d3e53(0x1e5)]=0x0,this[_0x3d3e53(0x2d5)]=![];}async[_0xc70012(0x2ba)](_0x2e5ca0,_0x37a0da,_0x20b977={}){const _0x43c062=_0xc70012;for(let _0x4d2548=0x1;;_0x4d2548++){try{return await this[_0x43c062(0x234)](_0x2e5ca0,_0x37a0da,_0x20b977);}catch(_0x3db6){if(_0x3db6?.[_0x43c062(0x286)]!==_0x43c062(0x2ca)||_0x20b977[_0x43c062(0x2b6)]||_0x4d2548>=0x5)throw _0x3db6;this[_0x43c062(0x2cb)][_0x43c062(0x218)](_0x3db6['indexType']);}}}async[_0xc70012(0x234)](_0x266403,_0x54afd9,{admitted:admitted=![]}={}){const _0x355410=_0xc70012;if(_0x29b108[_0x355410(0xfb)]())_0x29b108[_0x355410(0x171)](this[_0x355410(0x2cb)]?.['name'],_0x54afd9);if(this['_closed']){const _0x21fd32=new Error(_0x355410(0x129));_0x21fd32['code']=_0x355410(0x176);throw _0x21fd32;}if(this[_0x355410(0x238)]>0x0){let _0x45c13b=![];while(this['_outstanding']>=this[_0x355410(0x238)]&&!this[_0x355410(0x161)]){!_0x45c13b&&(_0x45c13b=!![],this[_0x355410(0x163)]++),await new Promise(_0x7c5939=>this['_bpWaiters']['push'](_0x7c5939));}if(this[_0x355410(0x161)]){const _0x250d02=new Error(_0x355410(0x129));_0x250d02[_0x355410(0x286)]='ENV_CLOSING_RETRY';throw _0x250d02;}}this[_0x355410(0x146)]++;const _0x358e8c=admitted?null:this[_0x355410(0x2cb)][_0x355410(0xba)];for(;;){while(this['_held'])await this['_held'];if(_0x358e8c)try{await _0x358e8c[_0x355410(0x126)]();}catch(_0x477326){this['_outstanding']--;if(this[_0x355410(0xe6)]['length']&&this['_outstanding']<this['_highWater'])this[_0x355410(0xe6)][_0x355410(0x188)]()();throw _0x477326;}if(!this[_0x355410(0x263)])break;if(_0x358e8c)_0x358e8c[_0x355410(0x270)]();}if(this[_0x355410(0x161)]){if(_0x358e8c)_0x358e8c['afterWrite']();this['_outstanding']--;if(this[_0x355410(0xe6)]['length']&&this['_outstanding']<this['_highWater'])this[_0x355410(0xe6)][_0x355410(0x188)]()();const _0x5aeadb=new Error(_0x355410(0x129));_0x5aeadb[_0x355410(0x286)]=_0x355410(0x176);throw _0x5aeadb;}const _0x164fab=_0xeab2d3['now']();if(_0x2b1a30)try{const _0x85235d=this['env']['db'][_0x355410(0x1bd)](_0x266403);this[_0x355410(0x1ca)]++;if(this[_0x355410(0x133)][_0x355410(0x1ad)](_0xeab2d3[_0x355410(0x1c0)]()-_0x164fab)>0x100)this[_0x355410(0x133)][_0x355410(0x188)]();if(this['_done'][_0x355410(0x1ad)](_0xeab2d3['now']())>0x800)this['_done'][_0x355410(0x188)]();return _0x85235d;}finally{this[_0x355410(0x146)]--;if(this['_bpWaiters'][_0x355410(0x136)]&&this[_0x355410(0x146)]<this[_0x355410(0x238)])this[_0x355410(0xe6)]['shift']()();if(_0x358e8c)_0x358e8c['afterWrite']();}let _0x35309f=null;const _0x111f63=()=>{const _0x398e87=_0x355410,_0x2d772b=_0x266403();if(_0x2d772b&&typeof _0x2d772b[_0x398e87(0x1e2)]===_0x398e87(0x1d3)&&!_0x35309f){this[_0x398e87(0xdf)]++;let _0x4cf521;const _0x50525f=new Promise(_0x1c8e4e=>_0x4cf521=_0x1c8e4e);this[_0x398e87(0x263)]=_0x50525f,_0x35309f=()=>{const _0x349d77=_0x398e87;if(this[_0x349d77(0x263)]===_0x50525f)this[_0x349d77(0x263)]=null;_0x4cf521();};}return _0x2d772b;};let _0x236e5e;try{_0x236e5e=this[_0x355410(0x2cb)]['db'][_0x355410(0x268)](_0x111f63);}catch(_0x465872){_0x236e5e=Promise[_0x355410(0x1bf)](_0x465872);}(!_0x236e5e||typeof _0x236e5e[_0x355410(0x1e2)]!=='function')&&(this[_0x355410(0x1e5)]++,!this['_nestedWarned']&&(this[_0x355410(0x2d5)]=!![],console[_0x355410(0x2c5)](_0x355410(0x199)+(this['env']?.['name']??'?')+_0x355410(0x24c))),_0x236e5e=Promise[_0x355410(0x23d)](_0x236e5e));const _0x5c375c=()=>{if(_0x35309f)_0x35309f();};_0x236e5e[_0x355410(0x1e2)](_0x5c375c,_0x5c375c),this['_inflight'][_0x355410(0x1ff)](_0x236e5e),this['_enqueuedAt'][_0x355410(0x2bb)](_0x236e5e,_0x164fab);const _0x5bd24c=()=>{const _0x5d4e3e=_0x355410;this[_0x5d4e3e(0x27b)]['delete'](_0x236e5e),this[_0x5d4e3e(0x180)][_0x5d4e3e(0xd3)](_0x236e5e),this[_0x5d4e3e(0x1ca)]++,this[_0x5d4e3e(0x146)]--;this[_0x5d4e3e(0xe6)][_0x5d4e3e(0x136)]&&this[_0x5d4e3e(0x146)]<this['_highWater']&&this['_bpWaiters'][_0x5d4e3e(0x188)]()();if(this['_durs'][_0x5d4e3e(0x1ad)](_0xeab2d3[_0x5d4e3e(0x1c0)]()-_0x164fab)>0x100)this[_0x5d4e3e(0x133)][_0x5d4e3e(0x188)]();if(this[_0x5d4e3e(0xf8)][_0x5d4e3e(0x1ad)](_0xeab2d3[_0x5d4e3e(0x1c0)]())>0x800)this[_0x5d4e3e(0xf8)][_0x5d4e3e(0x188)]();};_0x236e5e[_0x355410(0x1e2)](_0x5bd24c,_0x5bd24c);try{return await _0x236e5e;}finally{if(_0x358e8c)_0x358e8c[_0x355410(0x270)]();}}[_0xc70012(0x1b6)](){const _0x51d022=_0xc70012,_0xcf67cb=_0xeab2d3[_0x51d022(0x1c0)]();let _0x33a118=0x0;for(const _0x5e38f1 of this['_enqueuedAt'][_0x51d022(0x226)]()){const _0x1fdff4=_0xcf67cb-_0x5e38f1;if(_0x1fdff4>_0x33a118)_0x33a118=_0x1fdff4;}let _0x38aa88=0x0;for(let _0x11bc46=this[_0x51d022(0xf8)][_0x51d022(0x136)]-0x1;_0x11bc46>=0x0;_0x11bc46--){if(_0xcf67cb-this[_0x51d022(0xf8)][_0x11bc46]>0x3e8)break;_0x38aa88++;}let _0xfe5ca7=0x0;if(this[_0x51d022(0x133)][_0x51d022(0x136)]){const _0x4eca0d=[...this['_durs']]['sort']((_0x509387,_0x5f5718)=>_0x509387-_0x5f5718);_0xfe5ca7=_0x4eca0d[Math[_0x51d022(0x1b7)](_0x4eca0d[_0x51d022(0x136)]-0x1,Math['floor'](_0x4eca0d[_0x51d022(0x136)]*0.99))];}return{'depth':this['_inflight'][_0x51d022(0x252)],'oldestPendingMs':Math[_0x51d022(0x153)](_0x33a118),'committed':this['_committed'],'commitsPerSec':_0x38aa88,'commitP99Ms':Math[_0x51d022(0x153)](_0xfe5ca7),'parkedNow':this[_0x51d022(0xe6)][_0x51d022(0x136)],'parkedTotal':this['_bpParkedTotal'],'highWater':this[_0x51d022(0x238)]};}[_0xc70012(0xb9)](){const _0x27eb49=_0xc70012,_0xed8b3e=_0xeab2d3[_0x27eb49(0x1c0)]();return[...this[_0x27eb49(0x180)][_0x27eb49(0x226)]()][_0x27eb49(0x279)](_0x2bc187=>Math[_0x27eb49(0x153)](_0xed8b3e-_0x2bc187))[_0x27eb49(0x16f)]((_0x535048,_0x52aed4)=>_0x52aed4-_0x535048);}['markClosed'](){const _0x28ec90=_0xc70012;this[_0x28ec90(0x161)]=!![];for(const _0x3d8eb7 of this[_0x28ec90(0xe6)][_0x28ec90(0x1f1)](0x0))_0x3d8eb7();}async[_0xc70012(0x12b)](){const _0xc1939c=_0xc70012;let _0x47a437=0x0;while(this['_inflight'][_0xc1939c(0x252)]&&_0x47a437++<0x3e8){await Promise[_0xc1939c(0x14e)]([...this[_0xc1939c(0x27b)]]);}}async[_0xc70012(0x275)](_0x31ee7d,_0x3d7f56,_0xcec828,_0x75bc14){const _0x15c3bf=_0xc70012;return this[_0x15c3bf(0x2ba)](()=>{const _0x188d1f=_0x15c3bf;if(_0x75bc14===undefined)_0x31ee7d[_0x188d1f(0x1a1)](_0x3d7f56,_0xcec828);else _0x31ee7d['putSync'](_0x3d7f56,_0xcec828,_0x75bc14);},'raw-put');}async[_0xc70012(0x1b0)](_0x5edc38,_0x27d165){const _0x2e7b1c=_0xc70012;return this[_0x2e7b1c(0x2ba)](()=>_0x5edc38['removeSync'](_0x27d165),_0x2e7b1c(0x149));}}async function _0x1a6f70(_0x44cb1b,_0x3d175b){const _0x26e74d=_0xc70012;if(_0x3d175b==null)_0x3d175b=Math[_0x26e74d(0x24a)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x487cef=_0x44cb1b?.[_0x26e74d(0x28e)];if(!_0x487cef||typeof _0x487cef['then']!==_0x26e74d(0x1d3))return;await Promise[_0x26e74d(0x170)]([Promise[_0x26e74d(0x23d)](_0x487cef)['catch'](()=>{}),new Promise(_0x40bfbf=>{const _0x1d13e3=_0x26e74d,_0x1dbac5=setTimeout(_0x40bfbf,_0x3d175b);if(_0x1dbac5[_0x1d13e3(0x2b4)])_0x1dbac5[_0x1d13e3(0x2b4)]();})]);}catch{}}function _0xa8e2fa(_0x2eba7b){const _0x1699dc=_0xc70012;if(_0x2b1a30)return Promise[_0x1699dc(0x23d)]();const _0x34b858=_0x2eba7b?.[_0x1699dc(0x2c6)];return _0x34b858&&typeof _0x34b858[_0x1699dc(0x1e2)]===_0x1699dc(0x1d3)?_0x34b858:Promise[_0x1699dc(0x23d)]();}const _0x2fab71=Math[_0xc70012(0x24a)](0x1,Math[_0xc70012(0x1be)](Number(process.env.UV_THREADPOOL_SIZE))||0x4),_0xd62e2=Math[_0xc70012(0x24a)](0x1,_0x2fab71-0x2);let _0x3f0914=0x0;const _0x41ade1=[];async function _0x4a2203(_0x1e3ade){const _0x1b79ff=_0xc70012;if(_0x3f0914<_0xd62e2)_0x3f0914++;else await new Promise(_0x55166e=>_0x41ade1['push'](_0x55166e));try{return await _0x1e3ade();}finally{const _0x545060=_0x41ade1[_0x1b79ff(0x188)]();if(_0x545060)_0x545060();else _0x3f0914--;}}return okdbWriter[_0xc70012(0x1fa)]=_0x2f64d8,okdbWriter[_0xc70012(0x1fa)]['withPoolHold']=_0x4a2203,okdbWriter['exports']['MAX_POOL_HOLDS']=_0xd62e2,okdbWriter['exports']['flushLmdb']=_0x1a6f70,okdbWriter['exports'][_0xc70012(0x2c6)]=_0xa8e2fa,okdbWriter[_0xc70012(0x1fa)]['SYNC_COMMITS']=_0x2b1a30,okdbWriter[_0xc70012(0x1fa)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x3d8dc7=_0x2ee730;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x4db2d0=require$$0$3,{clampTimerDelay:_0x39e3b0}=requireOkdbTimers(),{SYNC_COMMITS:_0x57c709}=requireOkdbWriter(),_0x11c8fd=_0x3d8dc7(0x143);class _0x374f4{constructor(_0x84cf0a,_0x2dd55a,_0x546427){const _0x4700bb=_0x3d8dc7;this['_lock']=_0x84cf0a,this['_key']=_0x2dd55a,this[_0x4700bb(0x1c7)]=_0x546427,this[_0x4700bb(0x299)]=![],this[_0x4700bb(0x1ea)]=null,this[_0x4700bb(0x23e)]=null;}[_0x3d8dc7(0x11b)](){const _0x5e1bd4=_0x3d8dc7;if(this[_0x5e1bd4(0x299)])return![];try{const _0x42316c=this['_lock']['_db']()[_0x5e1bd4(0xf2)](this['_key']);if(!_0x42316c||_0x42316c[_0x5e1bd4(0xeb)]!==this['_acquiredAt'])return![];const _0x39ed73=_0x42316c[_0x5e1bd4(0x221)]??_0x42316c['acquiredAt'];if(_0x39ed73+_0x42316c[_0x5e1bd4(0x2d2)]<Date[_0x5e1bd4(0x1c0)]())return![];return!![];}catch{return!this['_released'];}}['holder'](){const _0x30f089=_0x3d8dc7;if(this['_released'])return null;try{return this['_lock'][_0x30f089(0x209)]()[_0x30f089(0xf2)](this[_0x30f089(0x187)])??null;}catch{return null;}}async[_0x3d8dc7(0x132)](_0x38f1e4){const _0x1360e4=_0x3d8dc7;if(this[_0x1360e4(0x299)])return;try{if(this['_lock'][_0x1360e4(0x161)]())return;const _0x3c98bc=this[_0x1360e4(0x262)][_0x1360e4(0x209)]()['get'](this[_0x1360e4(0x187)]);if(!_0x3c98bc||_0x3c98bc[_0x1360e4(0xeb)]!==this[_0x1360e4(0x1c7)])return;if(_0x57c709)this['_lock']['_db']()[_0x1360e4(0x1a1)](this['_key'],{..._0x3c98bc,'ttlMs':_0x3c98bc[_0x1360e4(0x2d2)]+_0x38f1e4});else await this[_0x1360e4(0x262)][_0x1360e4(0x209)]()[_0x1360e4(0x275)](this[_0x1360e4(0x187)],{..._0x3c98bc,'ttlMs':_0x3c98bc[_0x1360e4(0x2d2)]+_0x38f1e4});}catch{}}async[_0x3d8dc7(0x157)](){const _0x27e34f=_0x3d8dc7;if(this[_0x27e34f(0x299)])return;if(this[_0x27e34f(0x23e)])try{await this[_0x27e34f(0x23e)];}catch{}clearInterval(this[_0x27e34f(0x1ea)]),this[_0x27e34f(0x1ea)]=null,this[_0x27e34f(0x299)]=!![];try{if(this[_0x27e34f(0x262)][_0x27e34f(0x161)]())return;const _0x5e503a=this[_0x27e34f(0x262)][_0x27e34f(0x209)]()[_0x27e34f(0xf2)](this['_key']);if(_0x5e503a&&_0x5e503a['acquiredAt']===this[_0x27e34f(0x1c7)]){if(_0x57c709)this['_lock']['_db']()[_0x27e34f(0x237)](this['_key']);else await this[_0x27e34f(0x262)]['_db']()[_0x27e34f(0x1b0)](this[_0x27e34f(0x187)]);}}catch{}}[_0x3d8dc7(0x2a2)](_0x46981c,_0x313b50){const _0x5b848d=_0x3d8dc7,_0x5a519e=_0x39e3b0(_0x313b50??Math[_0x5b848d(0x1be)](_0x46981c/0x3));this['_heartbeatTimer']=setInterval(()=>{const _0x2703ec=_0x5b848d;if(this[_0x2703ec(0x299)])return;this[_0x2703ec(0x23e)]=((async()=>{const _0x4d8b9f=_0x2703ec;try{if(this['_lock'][_0x4d8b9f(0x161)]())return;const _0x449921=this[_0x4d8b9f(0x262)][_0x4d8b9f(0x209)]()[_0x4d8b9f(0xf2)](this[_0x4d8b9f(0x187)]);if(!_0x449921||_0x449921['acquiredAt']!==this[_0x4d8b9f(0x1c7)]){this[_0x4d8b9f(0x299)]=!![],clearInterval(this[_0x4d8b9f(0x1ea)]),this[_0x4d8b9f(0x1ea)]=null;return;}if(_0x57c709)this[_0x4d8b9f(0x262)][_0x4d8b9f(0x209)]()[_0x4d8b9f(0x1a1)](this[_0x4d8b9f(0x187)],{..._0x449921,'updatedAt':Date[_0x4d8b9f(0x1c0)]()});else await this[_0x4d8b9f(0x262)]['_db']()[_0x4d8b9f(0x275)](this['_key'],{..._0x449921,'updatedAt':Date['now']()});}catch{}this[_0x4d8b9f(0x23e)]=null;})());},_0x5a519e);if(this[_0x5b848d(0x1ea)][_0x5b848d(0x2b4)])this[_0x5b848d(0x1ea)]['unref']();}}class _0x55f5ec{constructor(_0x4feee8,{namespace:_0x11d4b6,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x499e58=_0x3d8dc7;this[_0x499e58(0x11e)]=_0x4feee8,this[_0x499e58(0x241)]=_0x11d4b6,this[_0x499e58(0x2d2)]=ttlMs,this[_0x499e58(0x177)]=heartbeatMs,this[_0x499e58(0x1da)]=null;}['_db'](){const _0x1ba020=_0x3d8dc7;return this[_0x1ba020(0x142)](),(!this[_0x1ba020(0x1da)]||this['_lockDbOf']!==this['_rawDb'])&&(this[_0x1ba020(0x1da)]=this[_0x1ba020(0x11e)][_0x1ba020(0x293)](_0x11c8fd,{'dupSort':![]}),this['_lockDbOf']=this[_0x1ba020(0x11e)]),this['_lockDb'];}[_0x3d8dc7(0x15f)](){const _0x390578=_0x3d8dc7;return this[_0x390578(0x142)](),(!this[_0x390578(0x13e)]||this['_wantDbOf']!==this[_0x390578(0x11e)])&&(this[_0x390578(0x13e)]=this[_0x390578(0x11e)][_0x390578(0x293)](_0x11c8fd+':want',{'dupSort':![]}),this[_0x390578(0x217)]=this[_0x390578(0x11e)]),this[_0x390578(0x13e)];}[_0x3d8dc7(0x161)](){const _0x44c1b9=_0x3d8dc7,_0x3f649f=this[_0x44c1b9(0x11e)]?.[_0x44c1b9(0x1b6)];return _0x3f649f===_0x44c1b9(0x164)||_0x3f649f===_0x44c1b9(0x200);}[_0x3d8dc7(0x142)](){const _0x963650=_0x3d8dc7;if(this['_closed']())throw new Error(_0x963650(0xcc));}[_0x3d8dc7(0x187)](_0x5e2f9b){const _0x1ee85a=_0x3d8dc7;return this[_0x1ee85a(0x241)]+':'+_0x5e2f9b;}[_0x3d8dc7(0x247)](_0x438416){const _0x45182e=_0x3d8dc7;try{if(this[_0x45182e(0x161)]())return;_0x57c709?this[_0x45182e(0x15f)]()[_0x45182e(0x1a1)](this[_0x45182e(0x187)](_0x438416),Date['now']()):this[_0x45182e(0x15f)]()[_0x45182e(0x275)](this['_key'](_0x438416),Date[_0x45182e(0x1c0)]())?.[_0x45182e(0x2b1)]?.(()=>{});}catch{}}['isWanted'](_0x35249a,_0xdbdc3d=0x3e8){const _0xb8861e=_0x3d8dc7;try{const _0x959123=this[_0xb8861e(0x15f)]()[_0xb8861e(0xf2)](this[_0xb8861e(0x187)](_0x35249a));return typeof _0x959123==='number'&&Date[_0xb8861e(0x1c0)]()-_0x959123<_0xdbdc3d;}catch{return![];}}[_0x3d8dc7(0x20f)](_0x551b61){const _0x1c54be=_0x3d8dc7,_0x52f1b1=_0x551b61[_0x1c54be(0x221)]??_0x551b61[_0x1c54be(0xeb)];return _0x52f1b1+_0x551b61['ttlMs']<Date[_0x1c54be(0x1c0)]();}static['_holderDead'](_0x908ba5){const _0x4ad916=_0x3d8dc7,_0x1bc741=_0x908ba5?.[_0x4ad916(0x28c)];if(!_0x1bc741||typeof _0x1bc741[_0x4ad916(0xe0)]!==_0x4ad916(0x24b))return![];if(_0x1bc741[_0x4ad916(0x1cf)]!==_0x4db2d0[_0x4ad916(0x1cf)]())return![];if(_0x1bc741[_0x4ad916(0xe0)]===process[_0x4ad916(0xe0)])return![];try{return process[_0x4ad916(0x2ce)](_0x1bc741[_0x4ad916(0xe0)],0x0),![];}catch(_0x40143b){return _0x40143b[_0x4ad916(0x286)]===_0x4ad916(0x16e);}}async['tryAcquire'](_0x10c554,_0x20f641={},_0x3a677b={}){const _0x3c6415=_0x3d8dc7,_0x46d987=this[_0x3c6415(0x187)](_0x10c554),_0x1353d7=_0x3a677b['ttlMs']??this['ttlMs'],_0x48e7b5=Date[_0x3c6415(0x1c0)](),_0x5f273f={'holder':{'pid':process[_0x3c6415(0xe0)],'hostname':_0x4db2d0[_0x3c6415(0x1cf)](),..._0x20f641},'acquiredAt':_0x48e7b5,'updatedAt':_0x48e7b5,'ttlMs':_0x1353d7};let _0x148aec=![],_0xf4162f=null;if(this['_closed']())return{'acquired':![],'handle':null,'current':null};try{const _0x4c5968=()=>{const _0x82b009=_0x3c6415,_0x4782a9=this[_0x82b009(0x209)]()[_0x82b009(0xf2)](_0x46d987);if(_0x4782a9&&!this[_0x82b009(0x20f)](_0x4782a9)&&!_0x55f5ec[_0x82b009(0x13f)](_0x4782a9)){const _0x4688ed=_0x20f641[_0x82b009(0x162)]!=null&&_0x4782a9[_0x82b009(0x28c)][_0x82b009(0xe0)]===process[_0x82b009(0xe0)]&&_0x4782a9[_0x82b009(0x28c)][_0x82b009(0x162)]===_0x20f641[_0x82b009(0x162)];if(!_0x4688ed){_0x148aec=![],_0xf4162f=_0x4782a9;return;}_0x5f273f[_0x82b009(0xeb)]<=_0x4782a9['acquiredAt']&&(_0x5f273f['acquiredAt']=_0x4782a9['acquiredAt']+0x1,_0x5f273f['updatedAt']=_0x5f273f[_0x82b009(0xeb)]);}this['_db']()[_0x82b009(0x275)](_0x46d987,_0x5f273f),_0x148aec=!![],_0xf4162f=_0x5f273f;};if(_0x57c709)this['_db']()[_0x3c6415(0x1bd)](_0x4c5968);else await this[_0x3c6415(0x209)]()[_0x3c6415(0x268)](_0x4c5968);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x148aec)return{'acquired':![],'handle':null,'current':_0xf4162f};const _0x594e8e=new _0x374f4(this,_0x46d987,_0x5f273f[_0x3c6415(0xeb)]);return _0x594e8e[_0x3c6415(0x2a2)](_0x1353d7,this[_0x3c6415(0x177)]),{'acquired':!![],'handle':_0x594e8e,'current':_0xf4162f};}[_0x3d8dc7(0xb4)](_0x40accf){const _0x32c59d=_0x3d8dc7;try{return this[_0x32c59d(0x209)]()[_0x32c59d(0xf2)](this['_key'](_0x40accf))??null;}catch{return null;}}[_0x3d8dc7(0x2dc)](){const _0x331123=_0x3d8dc7,_0x2ed93a=this['namespace']+':',_0x45f04d=[];try{for(const {key:_0x212905,value:_0x39c1ba}of this['_db']()['getRange']({'start':_0x2ed93a,'end':_0x2ed93a+'\xff'})){typeof _0x212905===_0x331123(0x19d)&&_0x212905['startsWith'](_0x2ed93a)&&_0x45f04d[_0x331123(0x1ad)]({'id':_0x212905[_0x331123(0x208)](_0x2ed93a[_0x331123(0x136)]),'entry':_0x39c1ba});}}catch{}return _0x45f04d;}static['listAll'](_0x2542bd){const _0x4c6700=_0x3d8dc7,_0x5ec3a4=[];try{const _0x5bee02=_0x2542bd[_0x4c6700(0x293)](_0x11c8fd,{'dupSort':![]});for(const {key:_0x4db89e,value:_0x3a7444}of _0x5bee02[_0x4c6700(0x1ae)]({})){if(typeof _0x4db89e!==_0x4c6700(0x19d))continue;const _0x40f900=_0x4db89e[_0x4c6700(0x259)](':');if(_0x40f900<0x1)continue;_0x5ec3a4['push']({'namespace':_0x4db89e['slice'](0x0,_0x40f900),'id':_0x4db89e[_0x4c6700(0x208)](_0x40f900+0x1),'entry':_0x3a7444});}}catch{}return _0x5ec3a4;}}return okdbLock={'OKDBLock':_0x55f5ec},okdbLock;}var version='2.7.0',require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x4f806b=_0x2ee730;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x259d8d=require$$0$3,_0x330ec8=require$$1$1,_0x3b6071=require$$2,{LOOP:_0x2fe424}=requireOkdbLoopMonitor(),{OKDBLock:_0x29c247}=requireOkdbLock(),{SYNC_COMMITS:_0x5096c4}=requireOkdbWriter(),_0x2ef1f8=_0x4f806b(0x197),_0x5242e4=_0x4f806b(0x2e6),_0x5c3736='~processes:desired',_0x3989e7=_0x4f806b(0xc4),_0x1145fc=(_0x4e2311,_0x586323)=>_0x4e2311+':'+_0x586323,_0x286144=(_0x13e347,_0x286e42)=>_0x13e347+'::'+_0x286e42,_0x23b77e=(_0x39716c,_0x200b43)=>_0x39716c+'/'+_0x200b43,_0x10c28c=(_0x178c1e,_0xc1fccd)=>_0x178c1e+'#'+_0xc1fccd,_0x34c50f=_0x131e2e=>{const _0xc13b05=_0x4f806b;if(_0x131e2e?.[_0xc13b05(0x2de)])return _0x131e2e[_0xc13b05(0x2de)];const _0x40675e=_0x131e2e?.[_0xc13b05(0x1a4)];return typeof _0x40675e===_0xc13b05(0x19d)&&_0x40675e[_0xc13b05(0x289)]('#')?_0x40675e[_0xc13b05(0x208)](0x0,_0x40675e['indexOf']('#')):_0x40675e;},_0x15f37d=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x436944=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x3ccaff=_0x15f37d*0x3,_0x37f977=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math['max'](0x927c0,_0x3ccaff*0x14),_0x5b65af=['processor:progress',_0x4f806b(0x10a),'processor:retry','processor:error',_0x4f806b(0x189),'processor:resumed'];let _0x881118=null;function _0x4349fc(){const _0x8dc6d3=_0x4f806b;if(_0x881118==null)_0x881118=Math[_0x8dc6d3(0x153)]((Date[_0x8dc6d3(0x1c0)]()-process[_0x8dc6d3(0x20a)]()*0x3e8)/0x3e8)*0x3e8;return _0x881118;}function _0x58e3ef(_0x16b7da){const _0x408d3d=_0x4f806b;if(process.env.OKDB_PROCESS_KILL===_0x408d3d(0x282))return![];if(_0x16b7da?.[_0x408d3d(0x1b1)]?.['processes']&&typeof _0x16b7da[_0x408d3d(0x1b1)][_0x408d3d(0x2a0)]===_0x408d3d(0x144)&&_0x16b7da['options'][_0x408d3d(0x2a0)][_0x408d3d(0x2ce)]===![])return![];return!![];}function _0x2198aa(_0x1550f7,_0x108b9f){const _0x276f7f=_0x4f806b,_0x83bf5=!!_0x108b9f?.[_0x276f7f(0x1f3)];switch(_0x1550f7){case _0x276f7f(0x27c):return{'controllable':_0x83bf5,'decommissionable':![],'killable':!![],'killConfirm':_0x276f7f(0x227)};case _0x276f7f(0x21d):case _0x276f7f(0x1d1):return{'controllable':_0x83bf5,'decommissionable':![],'killable':!![],'killConfirm':'confirm'};case _0x276f7f(0x1c4):return{'controllable':![],'decommissionable':![],'killable':![]};case'http-server':case'queue-worker':case _0x276f7f(0x13c):case _0x276f7f(0xca):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x276f7f(0x120)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x3b0db9{constructor(_0x473e1e){const _0xfaa1e3=_0x4f806b;this[_0xfaa1e3(0x295)]=_0x473e1e,this['_statusEnv']=null,this['_desired']=null,this[_0xfaa1e3(0x206)]=new Map(),this[_0xfaa1e3(0x119)]=null,this[_0xfaa1e3(0x285)]=![],this['_isReader']=![],this[_0xfaa1e3(0x156)]=_0x4349fc(),this[_0xfaa1e3(0x1a5)]=_0x1145fc(process[_0xfaa1e3(0xe0)],this[_0xfaa1e3(0x156)]),this[_0xfaa1e3(0x134)]=_0x3b6071[_0xfaa1e3(0x12c)]()[_0xfaa1e3(0x208)](0x0,0x8),this['_rowKey']=_0x10c28c(this[_0xfaa1e3(0x1a5)],this[_0xfaa1e3(0x134)]),this[_0xfaa1e3(0x191)]=Date[_0xfaa1e3(0x1c0)](),this[_0xfaa1e3(0x116)]=null,this[_0xfaa1e3(0x135)]=null,this['_listenAddr']=null,this['_hbTimer']=null,this[_0xfaa1e3(0x249)]=null,this['_onTick']=null,this[_0xfaa1e3(0xb2)]=0x0,this[_0xfaa1e3(0x2ab)]={},this['_children']=new Map(),this[_0xfaa1e3(0x1ee)]=process['cpuUsage'](),this[_0xfaa1e3(0xfe)]=Date['now'](),this[_0xfaa1e3(0x13a)]=0x0,this[_0xfaa1e3(0x207)]=new Map();}get[_0x4f806b(0x2c3)](){const _0x4bc3c8=_0x4f806b;return this[_0x4bc3c8(0x1a5)];}get[_0x4f806b(0x1ab)](){const _0x272f96=_0x4f806b;return this[_0x272f96(0x29c)];}[_0x4f806b(0x27a)](_0x46b081,_0x577502){const _0x8a9d8e=_0x2198aa(_0x46b081,_0x577502);if(_0x8a9d8e['killable']&&!_0x58e3ef(this['okdb']))return{..._0x8a9d8e,'killable':![],'killConfirm':undefined};return _0x8a9d8e;}[_0x4f806b(0x2af)](){const _0x1c87cf=_0x4f806b;return!!this[_0x1c87cf(0x1d5)];}[_0x4f806b(0xc1)](_0x486713){const _0x386f6b=_0x4f806b;Object[_0x386f6b(0x236)](this['_ownMeta'],_0x486713||{});}[_0x4f806b(0x2bc)](_0x1b903e){const _0x12d764=_0x4f806b;if(_0x1b903e)this[_0x12d764(0x1de)]=_0x1b903e;}[_0x4f806b(0x223)](_0x1b8391={}){const _0x1c59a1=_0x4f806b;return this[_0x1c59a1(0x295)][_0x1c59a1(0x179)](_0x1b8391);}['processingStatusView'](){const _0x212d32=_0x4f806b,_0x6116a1={};let _0x3e086c=0x0,_0x166582=0x0;const _0x3b9d47=new Set();for(const _0x327555 of this[_0x212d32(0x2cf)]()){_0x166582++;const _0x1b736b=_0x327555[_0x212d32(0x284)];if(!_0x1b736b)continue;if(_0x1b736b[_0x212d32(0x2a8)])_0x3e086c++;for(const _0xd7ce5a of _0x1b736b['processors']||[]){if(![_0x212d32(0x2d9),_0x212d32(0x2a4)]['includes'](_0xd7ce5a[_0x212d32(0x213)]))continue;(_0xd7ce5a[_0x212d32(0x1f7)]===_0x212d32(0x1c2)||_0xd7ce5a[_0x212d32(0x1f7)]===_0x212d32(0x21b))&&_0xd7ce5a['cursorKey']&&_0x3b9d47[_0x212d32(0x1ff)]((_0xd7ce5a[_0x212d32(0x2cb)]||'default')+':'+_0xd7ce5a[_0x212d32(0x16a)]);const _0xa82f40=_0xd7ce5a['env']||_0x212d32(0x1a7);(_0x6116a1[_0xa82f40]||=[])['push']({..._0xd7ce5a,'env':_0xa82f40,'owner':{'pid':_0x327555[_0x212d32(0xe0)]??null,'kind':_0x327555[_0x212d32(0x26e)]??null}});}}for(const [_0x29c943,_0x16ad08]of Object['entries'](_0x6116a1)){for(const _0x6ecd69 of _0x16ad08){if(_0x6ecd69[_0x212d32(0x213)]===_0x212d32(0x2d9)&&!_0x6ecd69['claimGated']){const _0x3c9365=_0x29c943+':'+(_0x6ecd69[_0x212d32(0x16a)]??'');if(!_0x3b9d47[_0x212d32(0xc5)](_0x3c9365))_0x6ecd69['unclaimed']=!![];}}}return{'envs':_0x6116a1,'policy':null,'participation':{'participating':_0x3e086c,'total':_0x166582},'source':_0x212d32(0x2ac)};}['processorsView'](){const _0x2645df=_0x4f806b,_0x3e82f0=_0x1c6523=>{const _0x5d2ac6=_0x302a;if(_0x1c6523['state']===_0x5d2ac6(0x1c2)||_0x1c6523['state']===_0x5d2ac6(0x21b)||_0x1c6523[_0x5d2ac6(0x1f7)]===_0x5d2ac6(0x1f4))return 0x3;if(_0x1c6523['claimGated'])return 0x1;return 0x2;},_0x29e521=new Map();for(const _0x5e3094 of this['listNodes']()){for(const _0x839794 of _0x5e3094[_0x2645df(0x284)]?.[_0x2645df(0x1f3)]||[]){const _0xb07006={..._0x839794,'owner':{'pid':_0x5e3094[_0x2645df(0xe0)]??null,'kind':_0x5e3094[_0x2645df(0x26e)]??null,'host':_0x5e3094['host']??null}},_0xa3d0a7=_0x839794[_0x2645df(0x213)]==='single'?_0x2645df(0x291)+(_0x839794['env']??'')+'::'+(_0x839794[_0x2645df(0x16a)]??_0x839794[_0x2645df(0x19f)]??_0x839794['id']):_0x2645df(0x264)+(_0x5e3094[_0x2645df(0x1a4)]??_0x5e3094['processKey']??'')+'::'+(_0x839794['env']??'')+'::'+_0x839794['id'],_0x112897=_0x29e521[_0x2645df(0xf2)](_0xa3d0a7);if(!_0x112897||_0x3e82f0(_0xb07006)>_0x3e82f0(_0x112897))_0x29e521[_0x2645df(0x2bb)](_0xa3d0a7,_0xb07006);}}return[..._0x29e521[_0x2645df(0x226)]()];}[_0x4f806b(0x2b5)](){const _0x455601=_0x4f806b,_0x32d84e=Date[_0x455601(0x1c0)](),_0x1f7d99=this[_0x455601(0x2cf)](),_0x5d4efe=_0xdf9426=>Math[_0x455601(0x24a)](0x0,Math[_0x455601(0x153)]((_0x32d84e-(_0xdf9426[_0x455601(0x20b)]||_0x32d84e))/0x3e8)),_0x1b8ff4=_0x1f7d99[_0x455601(0x186)](_0x29a7e3=>_0x29a7e3['kind']===_0x455601(0x27c)),_0x7ea23b=_0x1f7d99[_0x455601(0x13b)](_0x5dd643=>_0x5dd643[_0x455601(0x26e)]===_0x455601(0x27f));if(_0x1b8ff4||_0x7ea23b[_0x455601(0x136)])return{'primary':_0x1b8ff4?{'pid':_0x1b8ff4[_0x455601(0xe0)],'uptime':_0x5d4efe(_0x1b8ff4)}:null,'workers':_0x7ea23b[_0x455601(0x279)](_0x3ebdff=>({'pid':_0x3ebdff[_0x455601(0xe0)],'uptime':_0x5d4efe(_0x3ebdff)})),'workersConfigured':_0x1b8ff4?.[_0x455601(0x1b2)]?.[_0x455601(0xe2)]??_0x7ea23b[_0x455601(0x136)],'mode':_0x455601(0x265)};const _0x3a782e=_0x1f7d99['find'](_0x23f0c4=>_0x23f0c4[_0x455601(0x26e)]===_0x455601(0x21d)||_0x23f0c4[_0x455601(0x26e)]===_0x455601(0x1d1)||_0x23f0c4[_0x455601(0x26e)]===_0x455601(0x1c4)),_0x3c9eff=_0x3a782e?{'pid':_0x3a782e['pid'],'uptime':_0x5d4efe(_0x3a782e)}:{'pid':process[_0x455601(0xe0)],'uptime':Math['max'](0x0,Math[_0x455601(0x153)](process[_0x455601(0x20a)]()))};return{'primary':_0x3c9eff,'workers':[_0x3c9eff],'workersConfigured':0x1,'mode':'single'};}[_0x4f806b(0x13d)](){const _0x1f5e0d=_0x4f806b;return this[_0x1f5e0d(0x1ec)]();}[_0x4f806b(0x1b8)](){const _0x190f53=_0x4f806b,_0x1383fc=new Map();for(const _0x2d1d21 of this[_0x190f53(0x1ec)]())_0x1383fc[_0x190f53(0x2bb)](_0x2d1d21[_0x190f53(0x2de)],{..._0x2d1d21,'children':[]});const _0x5716dd=[];for(const _0x59a0fc of _0x1383fc[_0x190f53(0x226)]()){const _0xa56d7e=_0x59a0fc[_0x190f53(0x181)]?_0x1383fc[_0x190f53(0xf2)](_0x59a0fc[_0x190f53(0x181)]):null;if(_0xa56d7e&&_0xa56d7e!==_0x59a0fc)_0xa56d7e[_0x190f53(0x1f0)][_0x190f53(0x1ad)](_0x59a0fc);else _0x5716dd[_0x190f53(0x1ad)](_0x59a0fc);}const _0x5c7816=(_0x148246,_0x1431e8)=>_0x148246[_0x190f53(0x26e)]===_0x1431e8[_0x190f53(0x26e)]?(_0x148246[_0x190f53(0xe0)]||0x0)-(_0x1431e8[_0x190f53(0xe0)]||0x0):(_0x148246[_0x190f53(0x26e)]??'')<(_0x1431e8[_0x190f53(0x26e)]??'')?-0x1:0x1,_0x161d71=_0x542e55=>{const _0x3d6043=_0x190f53;_0x542e55['sort'](_0x5c7816);for(const _0x78cc7c of _0x542e55)if(_0x78cc7c[_0x3d6043(0x1f0)][_0x3d6043(0x136)])_0x161d71(_0x78cc7c[_0x3d6043(0x1f0)]);};return _0x161d71(_0x5716dd),_0x5716dd;}['getProcess'](_0x3d88f3){const _0x2185ae=_0x4f806b;return this[_0x2185ae(0x1ec)]()[_0x2185ae(0x186)](_0x449a28=>_0x449a28['processKey']===_0x3d88f3)??null;}['_groupByProcess'](_0x5139eb=Date['now']()){const _0x2c5b63=_0x4f806b,_0x5eab69=new Map();for(const _0x35707a of this['listNodes']()){const _0x4d0c3c=_0x34c50f(_0x35707a);let _0x5eca99=_0x5eab69['get'](_0x4d0c3c);!_0x5eca99&&(_0x5eca99={'processKey':_0x4d0c3c,'nodeKey':_0x4d0c3c,'pid':_0x35707a[_0x2c5b63(0xe0)],'ppid':_0x35707a[_0x2c5b63(0x175)]??null,'host':_0x35707a[_0x2c5b63(0x21a)]??null,'kind':_0x35707a['kind'],'role':null,'supervisorKey':_0x35707a[_0x2c5b63(0x181)]??null,'slot':_0x35707a[_0x2c5b63(0xf5)]??null,'slotKey':_0x35707a['slotKey']??null,'caps':_0x35707a[_0x2c5b63(0x2ee)]??null,'lifecycle':_0x35707a['lifecycle']??null,'uptime':Math[_0x2c5b63(0x24a)](0x0,Math[_0x2c5b63(0x153)]((_0x5139eb-(_0x35707a[_0x2c5b63(0x20b)]||_0x5139eb))/0x3e8)),'startedAt':_0x35707a['startedAt']??null,'meta':_0x35707a[_0x2c5b63(0x1b2)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x5eab69[_0x2c5b63(0x2bb)](_0x4d0c3c,_0x5eca99));_0x5eca99[_0x2c5b63(0x106)][_0x2c5b63(0x1ad)]({'instanceId':_0x35707a[_0x2c5b63(0x14d)]??null,'role':_0x35707a[_0x2c5b63(0x152)]??null,'listenAddr':_0x35707a[_0x2c5b63(0x1b5)]??null,'lifecycle':_0x35707a[_0x2c5b63(0x1e4)]??null,'processing':_0x35707a[_0x2c5b63(0x284)]??null});if(!_0x5eca99[_0x2c5b63(0x152)]&&_0x35707a[_0x2c5b63(0x152)])_0x5eca99[_0x2c5b63(0x152)]=_0x35707a[_0x2c5b63(0x152)];if(!_0x5eca99[_0x2c5b63(0x1b5)]&&_0x35707a['listenAddr'])_0x5eca99[_0x2c5b63(0x1b5)]=_0x35707a['listenAddr'];if(!_0x5eca99[_0x2c5b63(0x284)]&&_0x35707a[_0x2c5b63(0x284)])_0x5eca99[_0x2c5b63(0x284)]=_0x35707a['processing'];if(!_0x5eca99[_0x2c5b63(0x2ed)]&&_0x35707a[_0x2c5b63(0x2ed)])_0x5eca99[_0x2c5b63(0x2ed)]=_0x35707a[_0x2c5b63(0x2ed)];if(!_0x5eca99['singletonClaims']&&_0x35707a[_0x2c5b63(0x14a)])_0x5eca99[_0x2c5b63(0x14a)]=_0x35707a['singletonClaims'];if(_0x5eca99[_0x2c5b63(0x2ee)]==null&&_0x35707a[_0x2c5b63(0x2ee)])_0x5eca99[_0x2c5b63(0x2ee)]=_0x35707a[_0x2c5b63(0x2ee)];if(_0x35707a[_0x2c5b63(0x16d)]&&(!_0x5eca99[_0x2c5b63(0x16d)]||(_0x35707a['stats']['at']??0x0)>(_0x5eca99['stats']['at']??0x0)))_0x5eca99[_0x2c5b63(0x16d)]=_0x35707a[_0x2c5b63(0x16d)];}return[..._0x5eab69[_0x2c5b63(0x226)]()];}['runtimeProcessesView'](){const _0x143154=_0x4f806b,_0x36f4d3=[],_0x493af5={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0xc46651 of this[_0x143154(0x1ec)]()){_0x36f4d3[_0x143154(0x1ad)]({'processKey':_0xc46651[_0x143154(0x2de)],'kind':_0xc46651['kind'],'pid':_0xc46651[_0x143154(0xe0)],'supervisorKey':_0xc46651['supervisorKey'],'meta':_0xc46651[_0x143154(0x1b2)]??null,'uptime':_0xc46651[_0x143154(0x20a)],'stats':_0xc46651['stats']??null}),_0x493af5['processes']++;if(_0xc46651['stats']){_0x493af5[_0x143154(0x1a0)]+=_0xc46651[_0x143154(0x16d)]['rss']||0x0,_0x493af5['heapUsed']+=(_0xc46651[_0x143154(0x16d)][_0x143154(0x2a1)]||0x0)+(_0xc46651[_0x143154(0x16d)][_0x143154(0xbc)]?.[_0x143154(0x2a1)]||0x0);const _0xc10c08=_0xc46651[_0x143154(0x16d)]['threads'];_0xc10c08&&(_0x493af5[_0x143154(0xbc)][_0x143154(0x26b)]+=_0xc10c08[_0x143154(0x26b)]||0x0,_0x493af5['threads'][_0x143154(0x28d)]+=_0xc10c08['sandbox']||0x0,_0x493af5[_0x143154(0xbc)][_0x143154(0x1b3)]+=_0xc10c08[_0x143154(0x1b3)]||0x0);}}return{'totals':_0x493af5,'nodes':_0x36f4d3};}async['open']({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x2aafc2=_0x4f806b;this[_0x2aafc2(0x285)]=this[_0x2aafc2(0x285)]||!!writer,this[_0x2aafc2(0x2d3)]=this['_isReader']||!!reader,this[_0x2aafc2(0x116)]=kind||this[_0x2aafc2(0x116)]||(_0x330ec8[_0x2aafc2(0x196)]?_0x2aafc2(0x27f):'cli'),this[_0x2aafc2(0x135)]=supervisorKey??this['_supervisorKey'],this[_0x2aafc2(0x1de)]=listenAddr??this['_listenAddr'],this['_ensureDesired'](),await this['_migrateVocab']();if(!writer&&!reader)return null;if(!this[_0x2aafc2(0x1d5)]){const _0x593a4c=await this['okdb']['createEnvironment'](_0x2ef1f8,{'sync':![],'durability':_0x2aafc2(0x2db)});await _0x593a4c[_0x2aafc2(0x11d)](_0x5242e4),this[_0x2aafc2(0x1d5)]=_0x593a4c;}return this[_0x2aafc2(0x1d5)];}[_0x4f806b(0x1e1)](){const _0x3b6cb5=_0x4f806b;return this[_0x3b6cb5(0x166)]!==this[_0x3b6cb5(0x1d5)]&&(this[_0x3b6cb5(0x166)]=this['_statusEnv'],this[_0x3b6cb5(0x110)]=this[_0x3b6cb5(0x1d5)]['_getType'](_0x5242e4)['data']),this[_0x3b6cb5(0x110)];}[_0x4f806b(0x1e3)](_0x3cbd5e){const _0x33765a=_0x4f806b;if(_0x5096c4)return this['_nodeDb']()[_0x33765a(0x1a1)](_0x3cbd5e[_0x33765a(0x1a4)],_0x3cbd5e,0x1);const _0x269d32=this['_nodeDb']()['put'](_0x3cbd5e[_0x33765a(0x1a4)],_0x3cbd5e,0x1);if(_0x269d32&&typeof _0x269d32[_0x33765a(0x1e2)]==='function')_0x269d32[_0x33765a(0x1e2)](undefined,()=>{});return _0x269d32;}[_0x4f806b(0x1ba)](_0x55a6bd){const _0x5db55a=_0x4f806b;return this[_0x5db55a(0x1e1)]()[_0x5db55a(0x1a1)](_0x55a6bd['nodeKey'],_0x55a6bd,0x1);}[_0x4f806b(0x2c0)](_0x43b40a){const _0x917420=_0x4f806b;if(_0x5096c4)try{return this[_0x917420(0x1e1)]()[_0x917420(0x237)](_0x43b40a);}catch{return![];}const _0x4bd690=this[_0x917420(0x1e1)]()[_0x917420(0x1b0)](_0x43b40a);if(_0x4bd690&&typeof _0x4bd690[_0x917420(0x1e2)]===_0x917420(0x1d3))_0x4bd690[_0x917420(0x1e2)](undefined,()=>{});return _0x4bd690;}async[_0x4f806b(0x19c)](_0x106af8){const _0x2bee1f=_0x4f806b;if(!this[_0x2bee1f(0x1d5)]||!this['_isWriter']||!_0x106af8?.['nodeKey'])return;return this[_0x2bee1f(0x1e3)](_0x106af8);}async[_0x4f806b(0xbd)](_0x28b152){const _0xf07894=_0x4f806b;if(!this['_statusEnv']||!this['_isWriter']||!_0x28b152)return;const _0x191be9=_0x28b152['includes']('#'),_0x4c8008=[];for(const {key:_0x280a7b}of this[_0xf07894(0x1d5)][_0xf07894(0x1ae)](_0x5242e4)){if(_0x280a7b===_0x28b152||!_0x191be9&&typeof _0x280a7b===_0xf07894(0x19d)&&_0x280a7b[_0xf07894(0x1d6)](_0x28b152+'#'))_0x4c8008[_0xf07894(0x1ad)](_0x280a7b);}for(const _0x396550 of _0x4c8008){try{this['_nodeDb']()[_0xf07894(0x237)](_0x396550);}catch{}}}[_0x4f806b(0x125)](_0x327e63){const _0x52c0bb=_0x4f806b;if(typeof _0x327e63?.['pid']!=='number')return![];if(_0x327e63[_0x52c0bb(0x21a)]!==_0x259d8d[_0x52c0bb(0x1cf)]())return![];if(_0x327e63[_0x52c0bb(0xe0)]===process['pid'])return![];if(_0x327e63[_0x52c0bb(0x296)]!=null&&_0x327e63[_0x52c0bb(0x296)]<Date['now']()-_0x37f977)return!![];try{return process[_0x52c0bb(0x2ce)](_0x327e63[_0x52c0bb(0xe0)],0x0),![];}catch(_0x481001){return _0x481001[_0x52c0bb(0x286)]===_0x52c0bb(0x16e);}}[_0x4f806b(0x2cf)](){const _0x5f221b=_0x4f806b;if(!this[_0x5f221b(0x1d5)])return[];try{this[_0x5f221b(0x1d5)]['db']?.[_0x5f221b(0x182)]?.();}catch{}const _0x468b51=Date['now'](),_0x466562=_0x259d8d[_0x5f221b(0x1cf)](),_0xcffc46=[];for(const {value:_0x5b8ab3}of this['_statusEnv']['getRange'](_0x5242e4)){if(!_0x5b8ab3)continue;let _0x5a3481=null;_0x5b8ab3[_0x5f221b(0x21a)]===_0x466562&&typeof _0x5b8ab3[_0x5f221b(0xe0)]===_0x5f221b(0x24b)&&(_0x5a3481=!this['_nodeDead'](_0x5b8ab3));if(_0x5a3481===![])continue;const _0x49da0b=_0x5b8ab3[_0x5f221b(0x296)]==null||_0x5b8ab3[_0x5f221b(0x296)]>=_0x468b51;if(_0x5a3481===!![]||_0x49da0b)_0xcffc46[_0x5f221b(0x1ad)](_0x5b8ab3);}return _0xcffc46;}async[_0x4f806b(0x2d4)](_0x5622cb=0x0){const _0x163d34=_0x4f806b;if(!this['_statusEnv']||!this['_isWriter'])return;const _0x455b20=Date['now']()-_0x5622cb,_0x3fc296=new Set(),_0x577faa=[],_0xf72263=_0x259d8d[_0x163d34(0x1cf)](),_0x42cba8=require$$6['version'];for(const {key:_0x1a3a97,value:_0x269f5a}of this[_0x163d34(0x1d5)][_0x163d34(0x1ae)](_0x5242e4)){if(!_0x269f5a)continue;const _0x4e9dbd=_0x269f5a[_0x163d34(0x21a)]===_0xf72263&&typeof _0x269f5a[_0x163d34(0xe0)]===_0x163d34(0x24b),_0x421275=_0x4e9dbd?this[_0x163d34(0x125)](_0x269f5a):_0x269f5a['expiresAt']!=null&&_0x269f5a['expiresAt']<_0x455b20;if(_0x421275)_0x577faa['push'](_0x1a3a97);else{_0x3fc296[_0x163d34(0x1ff)](_0x34c50f(_0x269f5a)??_0x1a3a97);if(_0x269f5a[_0x163d34(0x17c)]&&_0x269f5a['version']!==_0x42cba8){if(!this['_versionSkewWarned'])this[_0x163d34(0x290)]=new Set();!this[_0x163d34(0x290)][_0x163d34(0xc5)](_0x269f5a[_0x163d34(0x17c)])&&(this[_0x163d34(0x290)][_0x163d34(0x1ff)](_0x269f5a['version']),this[_0x163d34(0x295)][_0x163d34(0x244)]?.[_0x163d34(0x2c5)]?.(_0x163d34(0x17d)+(_0x269f5a[_0x163d34(0xe0)]??'?')+_0x163d34(0x2e2)+_0x269f5a[_0x163d34(0x17c)]+_0x163d34(0x198)+_0x42cba8+_0x163d34(0xec)+'mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.',{'feature':'migrations'}));}}}for(const _0x48383f of _0x577faa)this[_0x163d34(0x2c0)](_0x48383f);if(this['_ensureDesired']()){const _0x5040a2=[];for(const {key:_0xd945f3}of this[_0x163d34(0x210)](_0x163d34(0x2e6))){if(!_0x3fc296[_0x163d34(0xc5)](_0xd945f3)){if(_0x5096c4)try{this[_0x163d34(0x2c4)][_0x163d34(0x237)](_0x163d34(0x1b9)+_0xd945f3);}catch{}else _0x5040a2['push'](this[_0x163d34(0x2c4)]['remove'](_0x163d34(0x1b9)+_0xd945f3));}}if(_0x5040a2['length'])await Promise['allSettled'](_0x5040a2);}}['startHeartbeat'](_0x42bb41=null){const _0x4041ff=_0x4f806b;if(this[_0x4041ff(0x1e9)])return;if(!this[_0x4041ff(0x285)]||!this[_0x4041ff(0x1d5)]){this[_0x4041ff(0x295)]?.[_0x4041ff(0x244)]?.['warn']?.(_0x4041ff(0x121)+this[_0x4041ff(0x285)]+'\x20statusEnv='+!!this[_0x4041ff(0x1d5)]+_0x4041ff(0x240),{'feature':_0x4041ff(0x2a0)});return;}this['_onTick']=_0x42bb41,this[_0x4041ff(0x249)]=()=>this[_0x4041ff(0x159)]();for(const _0x374f13 of _0x5b65af)this[_0x4041ff(0x295)][_0x4041ff(0x184)]['on'](_0x374f13,this[_0x4041ff(0x249)]);this[_0x4041ff(0x29e)]();const _0x398570=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x15f37d;this[_0x4041ff(0x1e9)]=setInterval(()=>{const _0xb0f239=_0x4041ff;if(this['_onTick'])try{this[_0xb0f239(0x140)]();}catch{}this[_0xb0f239(0x29e)](),this['reap']()[_0xb0f239(0x2b1)](()=>{});},_0x398570);if(this[_0x4041ff(0x1e9)]['unref'])this['_hbTimer'][_0x4041ff(0x2b4)]();}['_maybePublish'](){const _0x2f0942=_0x4f806b;if(!this[_0x2f0942(0x285)]||!this['_statusEnv'])return;if(Date['now']()-this['_lastPublishAt']<_0x436944)return;this[_0x2f0942(0x29e)]();}[_0x4f806b(0x29e)](){const _0x450453=_0x4f806b;if(!this[_0x450453(0x285)]||!this[_0x450453(0x1d5)])return;this['_lastPublishAt']=Date[_0x450453(0x1c0)]();try{const _0x50ff32=[this['_buildOwnRow']()];for(const _0xbad18d of this['_children'][_0x450453(0x226)]())_0x50ff32[_0x450453(0x1ad)](this[_0x450453(0x151)](_0xbad18d));const _0x194914=_0x2fe424[_0x450453(0x17e)]?_0x2fe424[_0x450453(0x1c0)]():0x0;for(const _0x36c97e of _0x50ff32){try{this['_putRowSync'](_0x36c97e),this['_publishFailWarned']=![];}catch(_0xd9286d){!this[_0x450453(0x2df)]&&(this[_0x450453(0x2df)]=!![],this['okdb']?.[_0x450453(0x244)]?.[_0x450453(0x2c5)]?.(_0x450453(0x280)+_0xd9286d[_0x450453(0x2c7)],{'feature':_0x450453(0x2a0)}));}}if(_0x2fe424['enabled'])_0x2fe424['note'](_0x450453(0x2d0),_0x2fe424[_0x450453(0x1c0)]()-_0x194914,_0x450453(0x12d)+_0x50ff32[_0x450453(0x136)]+_0x450453(0x22e));}catch(_0x1350b1){!this[_0x450453(0x2df)]&&(this['_publishFailWarned']=!![],this[_0x450453(0x295)]?.['log']?.[_0x450453(0x2c5)]?.('registry\x20publish\x20failing:\x20'+_0x1350b1['message'],{'feature':_0x450453(0x2a0)}));}}async[_0x4f806b(0x193)](){const _0x5f4a1=_0x4f806b;if(this['_onProcEvent']){for(const _0x29cb0c of _0x5b65af){try{this[_0x5f4a1(0x295)][_0x5f4a1(0x184)][_0x5f4a1(0x282)](_0x29cb0c,this[_0x5f4a1(0x249)]);}catch{}}this[_0x5f4a1(0x249)]=null;}this['_hbTimer']&&(clearInterval(this['_hbTimer']),this[_0x5f4a1(0x1e9)]=null);try{if(this['_statusEnv']&&this[_0x5f4a1(0x285)])await this['removeNode'](this[_0x5f4a1(0x29c)]);}catch{}}async['deregisterSelf'](){const _0x1343a4=_0x4f806b;if(!this['_statusEnv']||!this[_0x1343a4(0x285)])return;try{await this['removeNode'](this['_rowKey']);}catch{}try{const _0x115c26=[];for(const {value:_0x34a34e}of this[_0x1343a4(0x1d5)]['getRange'](_0x5242e4)){if(_0x34a34e?.[_0x1343a4(0x175)]===process[_0x1343a4(0xe0)]&&_0x34a34e[_0x1343a4(0x1a4)])_0x115c26['push'](_0x34a34e[_0x1343a4(0x1a4)]);}for(const _0x4e0174 of _0x115c26){try{await this[_0x1343a4(0xbd)](_0x4e0174);}catch{}}}catch{}}async[_0x4f806b(0x115)](){const _0x5ed36e=_0x4f806b;return this[_0x5ed36e(0x19c)](this['_buildOwnRow']());}async['publishChildRow'](_0x5980db){const _0x534428=_0x4f806b;if(!this[_0x534428(0x1d5)]||!this[_0x534428(0x285)])return;return this['putNode'](this[_0x534428(0x151)](_0x5980db));}[_0x4f806b(0x151)]({pid:_0xd0afc6,startedAt:_0x483375,kind:_0xfcb33d,supervisorKey:_0x229373,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x4f806b(0x1fb),meta:meta=null,stats:stats=null}){const _0xeadcd2=_0x4f806b,_0x469a3d=Date[_0xeadcd2(0x1c0)](),_0x399c4d=_0x1145fc(_0xd0afc6,_0x483375);return{'nodeKey':_0x10c28c(_0x399c4d,'0'),'processKey':_0x399c4d,'instanceId':'0','pid':_0xd0afc6,'startedAt':_0x483375,'ppid':process[_0xeadcd2(0xe0)],'host':_0x259d8d[_0xeadcd2(0x1cf)](),'supervisorKey':_0x229373,'slot':slot,'slotKey':slotKey,'kind':_0xfcb33d,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x469a3d,'expiresAt':_0x469a3d+_0x3ccaff,'caps':this[_0xeadcd2(0x27a)](_0xfcb33d,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async['addSupervisedChild'](_0x31a59e){const _0x542cb0=_0x4f806b;if(!_0x31a59e?.['pid'])return null;const _0x56b52d=_0x1145fc(_0x31a59e[_0x542cb0(0xe0)],_0x31a59e[_0x542cb0(0x20b)]);this[_0x542cb0(0x245)][_0x542cb0(0x2bb)](_0x56b52d,{..._0x31a59e,'supervisorKey':_0x31a59e[_0x542cb0(0x181)]??this[_0x542cb0(0x1a5)]});if(this[_0x542cb0(0x285)])await this[_0x542cb0(0xea)](this['_children'][_0x542cb0(0xf2)](_0x56b52d))[_0x542cb0(0x2b1)]?.(()=>{});return _0x56b52d;}['removeSupervisedChild'](_0xe89ee9){const _0x3551d6=_0x4f806b;if(!_0xe89ee9)return;return this[_0x3551d6(0x245)][_0x3551d6(0xd3)](_0xe89ee9),this[_0x3551d6(0xbd)](_0xe89ee9);}[_0x4f806b(0x2b7)](){const _0x515501=_0x4f806b,_0x33e696=Date[_0x515501(0x1c0)](),_0x3287a7=process['cpuUsage'](),_0x28862d=(_0x33e696-this[_0x515501(0xfe)])*0x3e8;if(_0x28862d>=0x3d090){const _0x1b75b0=_0x3287a7[_0x515501(0x1c1)]-this[_0x515501(0x1ee)]['user']+(_0x3287a7[_0x515501(0x212)]-this['_lastCpuUsage']['system']),_0x5ab155=_0x259d8d['cpus']()['length']||0x1;this[_0x515501(0x13a)]=Math[_0x515501(0x1b7)](0x64,Math['round'](_0x1b75b0/(_0x28862d*_0x5ab155)*0x64)),this[_0x515501(0x147)]=Math[_0x515501(0x153)](_0x28862d/0x3e8),this[_0x515501(0x1ee)]=_0x3287a7,this[_0x515501(0xfe)]=_0x33e696;}const _0x4ba41a=process[_0x515501(0x1dd)](),_0x55b3ca=this['_threadStats']['size'];let _0x1e8dbd=0x0;if(_0x55b3ca>0x0){const _0x1c7a30=[this[_0x515501(0x295)],...this['okdb'][_0x515501(0x2ae)]?.['values']?.()??[]];for(const _0x21acb1 of _0x1c7a30){const _0x36a1ec=_0x21acb1['functions']?.[_0x515501(0x232)];if(_0x36a1ec)_0x1e8dbd+=_0x36a1ec['liveThreadStats'][_0x515501(0x1b3)];}}let _0x89072b=null;const _0x3bfac0=_0x55b3ca;if(_0x3bfac0>0x0){let _0x59dad9=0x0;for(const _0x57542f of this['_threadStats'][_0x515501(0x226)]())_0x59dad9+=_0x57542f['heapUsed']||0x0;_0x89072b={'count':_0x3bfac0,'heapUsed':_0x59dad9,'sandbox':_0x55b3ca,'busy':_0x1e8dbd};}return{'rss':_0x4ba41a['rss'],'heapUsed':_0x4ba41a['heapUsed'],'heapTotal':_0x4ba41a[_0x515501(0xe1)],'external':_0x4ba41a[_0x515501(0x105)],'cpuPct':this[_0x515501(0x13a)],'cpuWindowMs':this[_0x515501(0x147)]??null,'threads':_0x89072b,'at':_0x33e696};}[_0x4f806b(0x128)](_0x19243f,_0x1a832b){const _0x4eab99=_0x4f806b;if(!_0x19243f||!_0x1a832b)return;this[_0x4eab99(0x207)][_0x4eab99(0x2bb)](_0x19243f,_0x1a832b);}[_0x4f806b(0x11a)](_0x3edbcb){const _0x3c7cf4=_0x4f806b;this[_0x3c7cf4(0x207)][_0x3c7cf4(0xd3)](_0x3edbcb);}[_0x4f806b(0x17f)](_0x41dac8,_0x258175,_0x40bf4b=undefined){const _0x534c25=_0x4f806b,_0x432272=this[_0x534c25(0x245)][_0x534c25(0xf2)](_0x41dac8);if(!_0x432272||!_0x258175)return;if(_0x40bf4b!==undefined)_0x432272[_0x534c25(0x284)]=_0x40bf4b;_0x432272['stats']={'rss':_0x258175[_0x534c25(0x1a0)]??null,'heapUsed':_0x258175[_0x534c25(0x2a1)]??null,'heapTotal':_0x258175['heapTotal']??null,'external':_0x258175[_0x534c25(0x105)]??null,'cpuPct':_0x258175[_0x534c25(0x28a)]??null,'cpuWindowMs':_0x258175[_0x534c25(0x274)]??null,'threads':_0x258175['threads']??null,'claims':_0x258175[_0x534c25(0x192)]??null,'envsOpen':_0x258175[_0x534c25(0xc9)]??null,'at':Date[_0x534c25(0x1c0)]()};}[_0x4f806b(0x2b0)](){const _0x3218a8=_0x4f806b,_0x5e9697=Date[_0x3218a8(0x1c0)](),_0x1d3f5b=this[_0x3218a8(0x295)][_0x3218a8(0x25e)]||{},_0x20a87d=this['_kind']||_0x3218a8(0x21d);return{'nodeKey':this['_rowKey'],'processKey':this[_0x3218a8(0x1a5)],'instanceId':this[_0x3218a8(0x134)],'pid':process[_0x3218a8(0xe0)],'startedAt':this[_0x3218a8(0x156)],'instanceStartedAt':this['_startedAt'],'ppid':typeof process[_0x3218a8(0x175)]==='number'?process[_0x3218a8(0x175)]:null,'host':_0x259d8d[_0x3218a8(0x1cf)](),'supervisorKey':this[_0x3218a8(0x135)]??null,'version':require$$6[_0x3218a8(0x17c)],'kind':_0x20a87d,'role':{'engines':!!_0x1d3f5b['engines'],'processors':!!_0x1d3f5b[_0x3218a8(0x1f3)],'compaction':_0x1d3f5b[_0x3218a8(0x29f)],'http':_0x1d3f5b[_0x3218a8(0x2ec)]},'listenAddr':this['_listenAddr']??null,'heartbeatAt':_0x5e9697,'expiresAt':_0x5e9697+_0x3ccaff,'caps':this[_0x3218a8(0x27a)](_0x20a87d,_0x1d3f5b),'lifecycle':{'state':'running','desiredVersionApplied':null},'meta':{...this[_0x3218a8(0x2ab)]},'processing':_0x1d3f5b[_0x3218a8(0x1f3)]?this[_0x3218a8(0x1bb)]():null,'engines':_0x1d3f5b[_0x3218a8(0x2ed)]?[...this['okdb'][_0x3218a8(0x239)]??[]]:null,'singletonClaims':this[_0x3218a8(0xf4)](),'stats':this[_0x3218a8(0x2b7)](),'writers':this[_0x3218a8(0x24e)]()};}[_0x4f806b(0x24e)](){const _0x48c68f=_0x4f806b,_0x209acd={};try{for(const [_0x11a2e4,_0x3d4a9e]of this[_0x48c68f(0x295)][_0x48c68f(0x2ae)]){try{const _0x1f53be=_0x3d4a9e[_0x48c68f(0x23b)]?.();if(!_0x1f53be)continue;if(!_0x1f53be['depth']&&!_0x1f53be['committed']&&!(_0x1f53be[_0x48c68f(0x283)]??0x0)&&!_0x1f53be[_0x48c68f(0x2d6)])continue;_0x209acd[_0x11a2e4]={'depth':_0x1f53be[_0x48c68f(0xdc)],'oldestPendingMs':_0x1f53be[_0x48c68f(0x10d)],'committed':_0x1f53be[_0x48c68f(0x2c6)],'commitsPerSec':_0x1f53be[_0x48c68f(0x2c9)],'commitP99Ms':_0x1f53be[_0x48c68f(0x155)],'parkedNow':_0x1f53be['parkedNow']??0x0,'draining':!!_0x1f53be[_0x48c68f(0x2d6)]};}catch{}}}catch{}return Object[_0x48c68f(0x14c)](_0x209acd)[_0x48c68f(0x136)]?_0x209acd:null;}[_0x4f806b(0xf4)](){const _0x4cfa75=_0x4f806b,_0x3338a9=process[_0x4cfa75(0xe0)],_0x2d3de1=Date['now'](),_0x50b179=_0x4b6a53=>{const _0x5ba247=_0x4cfa75;if(!_0x4b6a53)return[];const _0x2ba054=[];try{for(const {id:_0x3b9375,entry:_0x4ddade}of _0x4b6a53[_0x5ba247(0x2dc)]()){if(_0x4ddade?.[_0x5ba247(0x28c)]?.[_0x5ba247(0xe0)]!==_0x3338a9)continue;const _0x38a71b=_0x4ddade[_0x5ba247(0x221)]??_0x4ddade[_0x5ba247(0xeb)]??0x0;if(_0x38a71b+(_0x4ddade[_0x5ba247(0x2d2)]??0x0)<_0x2d3de1)continue;_0x2ba054['push'](_0x3b9375);}}catch{}return _0x2ba054;},_0x3ab7f5=_0x50b179(this[_0x4cfa75(0x137)](_0x4cfa75(0xd0))),_0x56b3ad=_0x50b179(this[_0x4cfa75(0x137)](_0x4cfa75(0xd7)));if(!_0x3ab7f5['length']&&!_0x56b3ad[_0x4cfa75(0x136)])return null;return{'compact':_0x3ab7f5,'replicate':_0x56b3ad};}[_0x4f806b(0x137)](_0x1e415a){const _0xd25070=_0x4f806b;if(!this['okdb']?.[_0xd25070(0x190)])return null;if(!this[_0xd25070(0x131)])this[_0xd25070(0x131)]=new Map();let _0x54aa49=this['_singletonLocks'][_0xd25070(0xf2)](_0x1e415a);if(!_0x54aa49)try{_0x54aa49=new _0x29c247(this['okdb']['_rootDb'],{'namespace':_0x1e415a}),this[_0xd25070(0x131)][_0xd25070(0x2bb)](_0x1e415a,_0x54aa49);}catch{return null;}return _0x54aa49;}[_0x4f806b(0x1bb)](){const _0xc7803=_0x4f806b,_0x15f536=[];try{for(const [_0x2df790,_0x18cd16]of this[_0xc7803(0x295)]['_envs']){if(_0x2df790[_0xc7803(0x1d6)]('~'))continue;for(const _0x76dae0 of _0x18cd16[_0xc7803(0xd5)]['tierList']())_0x15f536[_0xc7803(0x1ad)]({..._0x76dae0,'env':_0x2df790});}}catch{}return{'participate':this[_0xc7803(0x295)]['processors']?.[_0xc7803(0x1cd)]??![],'processors':_0x15f536};}['_ensureDesired'](){const _0x325021=_0x4f806b;if(this[_0x325021(0x2c4)])return!![];const _0x1f8ffa=this[_0x325021(0x295)][_0x325021(0x190)];if(!_0x1f8ffa)return![];return this[_0x325021(0x2c4)]=_0x1f8ffa[_0x325021(0x293)](_0x5c3736,{'dupSort':![]}),this['_cmd']=_0x1f8ffa[_0x325021(0x293)](_0x3989e7,{'dupSort':![]}),!![];}async['_migrateVocab'](){const _0x147e75=_0x4f806b;if(!this[_0x147e75(0x141)]())return;const _0x5c653e=_0x147e75(0x2c1),_0x4a28c0=0x1,_0x2ebdc1=this[_0x147e75(0x2c4)]['get'](_0x5c653e)??0x0;if(_0x2ebdc1>=_0x4a28c0)return;const _0x44ac2b=_0xdc7920=>{const _0x161166=_0x147e75;if(_0xdc7920===_0x161166(0xca))return _0x161166(0x2d9);if(_0xdc7920===_0x161166(0x287))return _0x161166(0x2a4);return _0xdc7920;};await this[_0x147e75(0x295)][_0x147e75(0x1e8)][_0x147e75(0x154)]['transaction'](()=>{const _0x38920d=_0x147e75;for(const _0x5613a3 of[_0x38920d(0x229),_0x38920d(0x169)]){for(const {key:_0x54c63f,value:_0x48f341}of this[_0x38920d(0x2c4)]['getRange']({'start':_0x5613a3,'end':_0x5613a3+'\xff'})){if(typeof _0x54c63f!=='string'||!_0x54c63f[_0x38920d(0x1d6)](_0x5613a3))break;const _0x3ab485=_0x44ac2b(_0x48f341[_0x38920d(0x213)]);if(_0x3ab485!==_0x48f341[_0x38920d(0x213)])this[_0x38920d(0x2c4)]['put'](_0x54c63f,{..._0x48f341,'mode':_0x3ab485});}}this[_0x38920d(0x2c4)][_0x38920d(0x275)](_0x5c653e,_0x4a28c0);});}[_0x4f806b(0x2b8)](){const _0xd6e609=_0x4f806b;return!!this[_0xd6e609(0x2c4)];}[_0x4f806b(0x2dd)](_0xd3e61,_0x1d32db){const _0x2bf0c9=_0x4f806b;if(!this['_ensureDesired']())return null;const _0x27b406=_0xd3e61+'/'+_0x1d32db;return this[_0x2bf0c9(0x1a6)](),this[_0x2bf0c9(0x206)][_0x2bf0c9(0xf2)](_0x27b406)??this['_desired'][_0x2bf0c9(0xf2)](_0x27b406)??null;}[_0x4f806b(0x1a6)](){const _0x43d2ce=_0x4f806b;if(!_0x5096c4)return;try{this[_0x43d2ce(0x295)][_0x43d2ce(0x1e8)]?.['db']?.[_0x43d2ce(0x182)]?.();}catch{}}async[_0x4f806b(0x1c5)](_0x5a05b7,_0x3dbabf,_0x7452fa){const _0x749536=_0x4f806b;if(!this[_0x749536(0x141)]())return null;const _0x1da6fc=_0x5a05b7+'/'+_0x3dbabf;this[_0x749536(0x1a6)]();const _0x5e644d=this[_0x749536(0x206)]['get'](_0x1da6fc)??this[_0x749536(0x2c4)][_0x749536(0xf2)](_0x1da6fc)??{'version':0x0},_0x471f50=(_0x5e644d[_0x749536(0x17c)]||0x0)+0x1,_0x1694b1={..._0x5e644d,..._0x7452fa,'version':_0x471f50,'updatedAt':Date[_0x749536(0x1c0)]()};this[_0x749536(0x206)][_0x749536(0x2bb)](_0x1da6fc,_0x1694b1);try{await this[_0x749536(0x295)][_0x749536(0x1e8)]['_writer']['transaction'](()=>{const _0x4f402d=_0x749536;this[_0x4f402d(0x2c4)][_0x4f402d(0x275)](_0x1da6fc,_0x1694b1);});}finally{if(this['_desiredOverlay'][_0x749536(0xf2)](_0x1da6fc)===_0x1694b1)this[_0x749536(0x206)][_0x749536(0xd3)](_0x1da6fc);}return _0x471f50;}[_0x4f806b(0x210)](_0xd1f7f6){const _0x3150be=_0x4f806b;if(!this[_0x3150be(0x141)]())return[];this[_0x3150be(0x1a6)]();const _0x3c1f0f=_0xd1f7f6+'/',_0x42c7c4=[];for(const {key:_0x5215a2,value:_0x6cd990}of this[_0x3150be(0x2c4)][_0x3150be(0x1ae)]({'start':_0x3c1f0f,'end':_0x3c1f0f+'\xff'})){if(typeof _0x5215a2!==_0x3150be(0x19d)||!_0x5215a2[_0x3150be(0x1d6)](_0x3c1f0f))break;_0x42c7c4['push']({'key':_0x5215a2[_0x3150be(0x208)](_0x3c1f0f['length']),'value':_0x6cd990});}return _0x42c7c4;}[_0x4f806b(0x117)](_0x520357){const _0x18e6f9=_0x4f806b;if(!this['_ensureDesired']())return null;return this[_0x18e6f9(0x119)][_0x18e6f9(0xf2)](_0x520357)??null;}async[_0x4f806b(0x201)](_0x1a7303,_0xa1dc57,_0x4d6a7f={}){const _0x44806b=_0x4f806b;if(!this['_ensureDesired']())return null;let _0x454515;return await this[_0x44806b(0x295)]['_systemEnv'][_0x44806b(0x154)]['transaction'](()=>{const _0x2970fa=_0x44806b,_0x2495ea=this[_0x2970fa(0x119)][_0x2970fa(0xf2)](_0x1a7303)||{'epoch':0x0};_0x454515=(_0x2495ea[_0x2970fa(0x104)]||0x0)+0x1,this[_0x2970fa(0x119)]['put'](_0x1a7303,{..._0x2495ea,..._0x4d6a7f,'cmd':_0xa1dc57,'epoch':_0x454515,'updatedAt':Date['now']()});}),_0x454515;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x3b0db9,'nodeKey':_0x1145fc,'logicalKey':_0x286144,'slotKey':_0x23b77e,'PROCESS_ENV':_0x2ef1f8,'NODE_TYPE':_0x5242e4},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x393910=_0x2ee730;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x369774=require$$0$4,{clampTimerDelay:_0x2b9c88}=requireOkdbTimers(),{EVENTS:_0x765a0e,CHANGE_ACTIONS:_0x328390}=requireOkdbEnums(),{LOOP:_0x1008fb}=requireOkdbLoopMonitor(),_0xf0539c=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x582db5=0x5,_0x142353=0x2710;class _0x18ef68 extends _0x369774{constructor(_0x53192c,_0x22a864={}){const _0x255f53=_0x302a;super(),this['okdb']=_0x53192c,this[_0x255f53(0x195)]=_0x22a864['quantum']??_0xf0539c,this[_0x255f53(0x224)]=_0x22a864['flushDebounce']??_0x582db5,this[_0x255f53(0x27d)]=_0x22a864[_0x255f53(0x2a3)]??_0x142353,this[_0x255f53(0x24d)]=![],this[_0x255f53(0x103)]=new Map(),this['_baselines']=new Map(),this[_0x255f53(0x29d)]=new Map(),this[_0x255f53(0x26a)]=null,this['_draining']=![],this[_0x255f53(0x1d0)]=new Set(),this[_0x255f53(0x228)]=new Set(),this[_0x255f53(0x11f)]=_0x596ca3=>this[_0x255f53(0x297)](_0x596ca3),this[_0x255f53(0xe9)]=_0x56c75d=>this[_0x255f53(0x21e)](_0x56c75d),this[_0x255f53(0x122)]=_0x1809ad=>this[_0x255f53(0xcf)](_0x1809ad),this[_0x255f53(0x130)]=()=>this[_0x255f53(0x272)]();}[_0x393910(0xc8)](){const _0x321caa=_0x393910;if(this[_0x321caa(0x24d)])return;this[_0x321caa(0x24d)]=!![];for(const [_0x4a4272,_0x496373]of this['okdb'][_0x321caa(0x2ae)]){if(_0x4a4272['startsWith']('~'))continue;try{_0x496373[_0x321caa(0x1d4)]();}catch{}}for(const [_0x138ab5,_0x3b89bb]of this['okdb'][_0x321caa(0x2ae)]){if(_0x138ab5['startsWith']('~'))continue;try{this[_0x321caa(0x29b)][_0x321caa(0x2bb)](_0x138ab5,_0x3b89bb[_0x321caa(0x219)]()||0x0);}catch{}}const {events:_0x1aae8e}=this[_0x321caa(0x295)];_0x1aae8e['on'](_0x765a0e['ITEM_PENDING'],this[_0x321caa(0xe9)]),_0x1aae8e['on'](_0x765a0e['ITEM_CREATE'],this[_0x321caa(0x11f)]),_0x1aae8e['on'](_0x765a0e[_0x321caa(0x20d)],this[_0x321caa(0x11f)]),_0x1aae8e['on'](_0x765a0e[_0x321caa(0x18d)],this['_onItem']),_0x1aae8e['on'](_0x765a0e[_0x321caa(0xdd)],this[_0x321caa(0x122)]),_0x1aae8e['once'](_0x765a0e[_0x321caa(0x278)],this[_0x321caa(0x130)]);}[_0x393910(0x272)](){const _0x12cba7=_0x393910;if(!this[_0x12cba7(0x24d)])return;this[_0x12cba7(0x24d)]=![];const {events:_0x585a55}=this[_0x12cba7(0x295)];_0x585a55[_0x12cba7(0x282)](_0x765a0e['ITEM_PENDING'],this[_0x12cba7(0xe9)]),_0x585a55['off'](_0x765a0e[_0x12cba7(0x127)],this['_onItem']),_0x585a55[_0x12cba7(0x282)](_0x765a0e[_0x12cba7(0x20d)],this[_0x12cba7(0x11f)]),_0x585a55[_0x12cba7(0x282)](_0x765a0e[_0x12cba7(0x18d)],this['_onItem']),_0x585a55[_0x12cba7(0x282)](_0x765a0e[_0x12cba7(0xdd)],this['_onPoke']);try{_0x585a55['off'](_0x765a0e[_0x12cba7(0x278)],this['_onStop']);}catch{}this[_0x12cba7(0x26a)]&&(clearTimeout(this['_flushTimer']),this[_0x12cba7(0x26a)]=null),this[_0x12cba7(0x29d)][_0x12cba7(0xf1)](),this[_0x12cba7(0x103)]['clear'](),this[_0x12cba7(0x29b)][_0x12cba7(0xf1)](),this[_0x12cba7(0x1d0)]['clear'](),this[_0x12cba7(0x228)][_0x12cba7(0xf1)]();}['_dedupeKey'](_0x5dfca9,_0x307fbb,_0x1e67d4,_0x4b5fb0){return _0x5dfca9+'\x00'+_0x307fbb+'\x00'+_0x1e67d4+'\x00'+_0x4b5fb0;}[_0x393910(0x202)](_0xbb65c3,_0x250664,_0x1df466,_0x1e0ea4){const _0x4a00fd=_0x393910,_0x2cd684=this[_0x4a00fd(0x1db)](_0xbb65c3,_0x250664,_0x1df466,_0x1e0ea4);if(this['_seen'][_0x4a00fd(0xc5)](_0x2cd684))return![];this[_0x4a00fd(0x1d0)]['add'](_0x2cd684);if(this[_0x4a00fd(0x1d0)][_0x4a00fd(0x252)]>this[_0x4a00fd(0x27d)]){const _0x170917=this[_0x4a00fd(0x1d0)]['values']()[_0x4a00fd(0x18b)]()[_0x4a00fd(0x2ad)];this[_0x4a00fd(0x1d0)][_0x4a00fd(0xd3)](_0x170917);}return!![];}[_0x393910(0x21e)](_0x444177){const _0x1841a0=_0x393910;if(!this['_started']||!_0x444177)return;const {env:_0x32375e,type:_0x5cbb2b,key:_0x5cb844,clock:_0x4cd954}=_0x444177;if(_0x32375e==null||_0x5cbb2b==null||_0x5cb844==null)return;if(typeof _0x32375e==='string'&&_0x32375e[_0x1841a0(0x1d6)]('~'))return;if(typeof _0x5cbb2b===_0x1841a0(0x19d)&&_0x5cbb2b[_0x1841a0(0x1d6)]('~'))return;this[_0x1841a0(0x228)]['add'](this[_0x1841a0(0x1db)](_0x32375e,_0x5cbb2b,_0x5cb844,_0x4cd954)),this[_0x1841a0(0x228)][_0x1841a0(0x252)]>this[_0x1841a0(0x27d)]&&this[_0x1841a0(0x228)][_0x1841a0(0xd3)](this['_pendingLocal']['values']()[_0x1841a0(0x18b)]()[_0x1841a0(0x2ad)]);}[_0x393910(0x297)](_0x5ce488){const _0x468a9c=_0x393910;if(!this[_0x468a9c(0x24d)]||!_0x5ce488)return;const {env:_0x2429b0,type:_0x2a7ce8,key:_0x2eba8c,clock:_0x246bfc,origin:_0x20f50b,action:_0x9d09cc,newValue:_0xb43688,oldValue:_0x3c68cb}=_0x5ce488;if(_0x2429b0==null||_0x2a7ce8==null||_0x2eba8c==null)return;if(typeof _0x2429b0===_0x468a9c(0x19d)&&_0x2429b0[_0x468a9c(0x1d6)]('~'))return;if(typeof _0x2a7ce8===_0x468a9c(0x19d)&&_0x2a7ce8['startsWith']('~'))return;this[_0x468a9c(0x228)]['delete'](this[_0x468a9c(0x1db)](_0x2429b0,_0x2a7ce8,_0x2eba8c,_0x246bfc));if(!this[_0x468a9c(0x202)](_0x2429b0,_0x2a7ce8,_0x2eba8c,_0x246bfc))return;const _0x36e251=_0x9d09cc===_0x328390[_0x468a9c(0x22d)]?_0x468a9c(0x1b0):_0x468a9c(0x275);this[_0x468a9c(0x1eb)](_0x468a9c(0x16b),{'env':_0x2429b0,'type':_0x2a7ce8,'key':_0x2eba8c,'op':_0x36e251,'clock':_0x246bfc,'origin':_0x20f50b,'value':_0x36e251===_0x468a9c(0x1b0)?null:_0xb43688,'prevValue':_0x3c68cb});}[_0x393910(0xcf)](_0x19d8ff){const _0x7db704=_0x393910;if(!this['_started'])return;if(!_0x19d8ff||typeof _0x19d8ff['env']!=='string'||typeof _0x19d8ff[_0x7db704(0x19f)]!==_0x7db704(0x19d))return;const {env:_0xa32a2a,type:_0x5da1fb}=_0x19d8ff;if(_0xa32a2a['startsWith']('~')||_0x5da1fb[_0x7db704(0x1d6)]('~'))return;this[_0x7db704(0x29d)][_0x7db704(0x2bb)](_0xa32a2a+'\x00'+_0x5da1fb,{'env':_0xa32a2a,'type':_0x5da1fb}),this[_0x7db704(0x1b4)]();}[_0x393910(0x1b4)](){const _0x3e6361=_0x393910;if(this[_0x3e6361(0x26a)])return;const _0x291cfd=()=>{const _0x465a69=_0x3e6361;this['_flushTimer']=null,this[_0x465a69(0xb8)]()[_0x465a69(0x2b1)](()=>{});};this[_0x3e6361(0x26a)]=setTimeout(_0x291cfd,_0x2b9c88(this[_0x3e6361(0x224)]));}async['_drain'](){const _0x1c8e93=_0x393910;if(this[_0x1c8e93(0x1ed)]){this[_0x1c8e93(0x1b4)]();return;}this[_0x1c8e93(0x1ed)]=!![];try{const _0x4a28c4=[...this[_0x1c8e93(0x29d)][_0x1c8e93(0x226)]()];this[_0x1c8e93(0x29d)][_0x1c8e93(0xf1)]();let _0x13caf8=![];for(const {env:_0x2da8fd,type:_0x3f9d64}of _0x4a28c4){try{const _0x5cd8db=await this['_drainOne'](_0x2da8fd,_0x3f9d64);if(_0x5cd8db)_0x13caf8=!![];}catch{this[_0x1c8e93(0x29d)][_0x1c8e93(0x2bb)](_0x2da8fd+'\x00'+_0x3f9d64,{'env':_0x2da8fd,'type':_0x3f9d64}),_0x13caf8=!![];}}if(_0x13caf8||this['_pending'][_0x1c8e93(0x252)]>0x0)this[_0x1c8e93(0x1b4)]();}finally{this[_0x1c8e93(0x1ed)]=![];}}async[_0x393910(0x1d9)](_0x25ed13,_0x5a81ee){const _0x2a5531=_0x393910,_0x1d80e=await this[_0x2a5531(0x295)][_0x2a5531(0x2e9)](_0x25ed13),_0x3bc09c=_0x25ed13+'\x00'+_0x5a81ee;!this[_0x2a5531(0x103)]['has'](_0x3bc09c)&&(!this[_0x2a5531(0x29b)][_0x2a5531(0xc5)](_0x25ed13)&&(_0x1d80e[_0x2a5531(0x1d4)](),this[_0x2a5531(0x29b)][_0x2a5531(0x2bb)](_0x25ed13,_0x1d80e['getClock']()||0x0)),this['_cursors'][_0x2a5531(0x2bb)](_0x3bc09c,this[_0x2a5531(0x29b)][_0x2a5531(0xf2)](_0x25ed13)));const _0x3adeb7=this[_0x2a5531(0x103)][_0x2a5531(0xf2)](_0x3bc09c),_0x5926d3=_0x1d80e[_0x2a5531(0x219)](_0x5a81ee)||0x0;if(_0x5926d3<=_0x3adeb7)return![];const _0x43fa7b=_0x3adeb7+this['_quantum'],_0x4fd35d=Math['min'](_0x5926d3,_0x43fa7b),_0x5320e0=_0x1008fb[_0x2a5531(0x17e)]?_0x1008fb[_0x2a5531(0x1c0)]():0x0,_0x3b7d40=Array[_0x2a5531(0x17b)](_0x1d80e[_0x2a5531(0x172)](_0x5a81ee,_0x3adeb7+0x1,_0x4fd35d));let _0x3e55bd=_0x3adeb7;for(const _0x21586a of _0x3b7d40){const {clock:_0x1d4245,key:_0x46c46d,action:_0x282439,origin:_0x155864}=_0x21586a;if(_0x1d4245>_0x3e55bd)_0x3e55bd=_0x1d4245;if(_0x46c46d==null)continue;if(this['_pendingLocal'][_0x2a5531(0xc5)](this['_dedupeKey'](_0x25ed13,_0x5a81ee,_0x46c46d,_0x1d4245)))continue;if(!this['_markSeen'](_0x25ed13,_0x5a81ee,_0x46c46d,_0x1d4245))continue;let _0x5246eb,_0x41a565;if(_0x282439===_0x328390[_0x2a5531(0x22d)])_0x5246eb='remove',_0x41a565=null;else{const _0x87064=_0x1d80e[_0x2a5531(0xf2)](_0x5a81ee,_0x46c46d);_0x87064==null?(_0x5246eb=_0x2a5531(0x1b0),_0x41a565=null):(_0x5246eb=_0x2a5531(0x275),_0x41a565=_0x87064);}this[_0x2a5531(0x1eb)](_0x2a5531(0x16b),{'env':_0x25ed13,'type':_0x5a81ee,'key':_0x46c46d,'op':_0x5246eb,'clock':_0x1d4245,'origin':_0x155864,'value':_0x41a565});}if(_0x1008fb[_0x2a5531(0x17e)])_0x1008fb[_0x2a5531(0x243)]('feed:'+_0x25ed13+':'+_0x5a81ee,_0x1008fb[_0x2a5531(0x1c0)]()-_0x5320e0,'n='+_0x3b7d40[_0x2a5531(0x136)]);return this[_0x2a5531(0x103)][_0x2a5531(0x2bb)](_0x3bc09c,Math[_0x2a5531(0x24a)](_0x3e55bd,_0x4fd35d)),_0x1d80e['getClock'](_0x5a81ee)>_0x4fd35d;}['status'](){const _0x357880=_0x393910;return{'started':this[_0x357880(0x24d)],'quantum':this['_quantum'],'flushDebounce':this[_0x357880(0x224)],'cursors':Object[_0x357880(0x1ef)]([...this[_0x357880(0x103)][_0x357880(0x194)]()][_0x357880(0x279)](([_0x37e6f3,_0x2eb912])=>[_0x37e6f3[_0x357880(0x1fe)]('\x00',':'),_0x2eb912])),'pending':this[_0x357880(0x29d)][_0x357880(0x252)],'seen':this[_0x357880(0x1d0)][_0x357880(0x252)]};}}return _0x18ef68[_0x393910(0x1c8)]=_0xf0539c,okdbChangefeed={'OKDBChangefeed':_0x18ef68},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x17734b=_0x2ee730;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x31a090=require$$1$1,_0x3804be=require$$1,{EVENTS:_0x5dee7e}=requireOkdbEnums(),_0x513786=require$$0$3,{slotKey:_0x3b5bea}=requireOkdbProcessRegistry(),_0x4ec597=Number(process.env.OKDB_CLUSTER_RESPAWN_BACKOFF_MS)||0xfa,_0x7375bc=0xfa0,_0x10d4d0=0x5,_0x2cdbd5=0x2710,_0x109a3f=0xbb8,_0x3222bc=0x7d0,_0x3e395e=_0x17734b(0x2a9),_0x5d2aca=_0x17734b(0x248),_0x41c5ff=_0x17734b(0x244),_0x45f01f=_0x17734b(0x16d),_0x40afaa=[_0x5dee7e[_0x17734b(0x1e6)],_0x5dee7e[_0x17734b(0x25a)],_0x5dee7e[_0x17734b(0x22a)],_0x5dee7e[_0x17734b(0x2b9)],_0x5dee7e['INDEX_PROGRESS'],_0x5dee7e[_0x17734b(0x1a9)],_0x5dee7e[_0x17734b(0x158)],_0x5dee7e[_0x17734b(0x12e)],'processor:ready','processor:progress',_0x17734b(0x1d2),'processor:paused',_0x17734b(0x260),_0x17734b(0x231)],_0x4a0aba=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0,_0x87335a=0x64;function _0x4ea13c(_0x15fad9){const _0x1c09bd=_0x17734b;if(!_0x15fad9)return _0x1c09bd(0x124);const _0x29ebae=(_0x15fad9[_0x1c09bd(0x1f3)]||[])[_0x1c09bd(0x279)](_0x299cdf=>[_0x299cdf[_0x1c09bd(0x2cb)],_0x299cdf['id'],_0x299cdf[_0x1c09bd(0x213)],_0x299cdf[_0x1c09bd(0x1f7)],!!_0x299cdf[_0x1c09bd(0x2a6)],!!_0x299cdf['unclaimed'],!!_0x299cdf[_0x1c09bd(0xf7)],_0x299cdf[_0x1c09bd(0x258)]?.[_0x1c09bd(0xe0)]??null,_0x299cdf[_0x1c09bd(0x1f4)]?String(_0x299cdf['error']?.[_0x1c09bd(0x2c7)]??_0x299cdf['error']):null]);return JSON[_0x1c09bd(0x1c9)]([!!_0x15fad9['participate'],_0x29ebae]);}function _0x16df4e({workers:_0xa4affb,makeOkdb:_0x2459bb,port:_0x343fa9,primaryOkdb:_0x5ec691,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0x3f3a60=_0x17734b;if(_0x31a090[_0x3f3a60(0x12a)])return childEntry&&_0x31a090['setupPrimary']({'exec':_0x3804be[_0x3f3a60(0x261)](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0x5debee=_0x3f3a60,_0x25b551=[];for(let _0x1bb63e=0x0;_0x1bb63e<process[_0x5debee(0x150)]['length'];_0x1bb63e++){const _0x482d7b=process[_0x5debee(0x150)][_0x1bb63e];if(_0x482d7b['startsWith'](_0x5debee(0x2bf))||_0x482d7b[_0x5debee(0x1d6)](_0x5debee(0x255))||_0x482d7b[_0x5debee(0x1d6)](_0x5debee(0xb3)))continue;if(_0x482d7b==='-e'||_0x482d7b==='--eval'||_0x482d7b==='-p'||_0x482d7b===_0x5debee(0xf0)){_0x1bb63e++;continue;}_0x25b551[_0x5debee(0x1ad)](_0x482d7b);}return _0x25b551;})())}),_0x47822e({'workers':_0xa4affb,'port':_0x343fa9,'primaryOkdb':_0x5ec691,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x343fa9});return _0x986ec({'makeOkdb':_0x2459bb,'port':_0x343fa9});}function _0x47822e({workers:_0x6f30c1,port:_0x531411,primaryOkdb:_0x409b7e,workerEnv:_0x5691fb,workerRole:_0x5cf6eb,listenAddr:_0x5b046e}){const _0x3e2be8=_0x17734b,_0x25513d=new Map(),_0x316bba=new Map();let _0x58b644=![];const _0xbb050d=_0x3a539c=>_0x3a539c?.[_0x3e2be8(0x230)],_0x427c2f=_0x51aaea=>{const _0x4ec6cc=_0x3e2be8,_0x40c038=_0x31a090[_0x4ec6cc(0x251)]({...process.env,..._0x5691fb||{},'OKDB_CLUSTER_SLOT':String(_0x51aaea)});return _0x40c038['__okdbSlot']=_0x51aaea,_0x25513d['set'](_0x40c038[_0x4ec6cc(0x204)][_0x4ec6cc(0xe0)],{'worker':_0x40c038,'startedAt':Date[_0x4ec6cc(0x1c0)](),'slot':_0x51aaea}),_0x40c038['on'](_0x4ec6cc(0x1f4),_0x407733=>{const _0x227464=_0x4ec6cc;console[_0x227464(0x244)](_0x227464(0x273)+_0x40c038['process'][_0x227464(0xe0)]+_0x227464(0x2be)+(_0x407733?.['message']??_0x407733));}),_0x40c038['on'](_0x4ec6cc(0x1c2),()=>_0x52adc1()),_0x40c038;},_0x1578f8=_0xe0ee6d=>{const _0x50d0b0=_0x3e2be8;for(const {worker:_0x2a65eb}of _0x25513d['values']()){if(_0x2a65eb[_0x50d0b0(0x2ea)]()||!_0x2a65eb[_0x50d0b0(0x24f)]())continue;try{_0x2a65eb['send'](_0xe0ee6d);}catch{}}};_0x409b7e?.['_activateProcesses']?.({'kind':_0x3e2be8(0x27c),'listenAddr':_0x5b046e})[_0x3e2be8(0x2b1)](()=>{}),_0x409b7e?.[_0x3e2be8(0x2a0)]?.['setOwnMeta']?.({'workersConfigured':_0x6f30c1});const _0x23d0cf={'engines':!![],'processors':!![],'compaction':!![],..._0x5cf6eb,'http':!![]},_0x52adc1=()=>{const _0x12b245=_0x3e2be8,_0x3bf9fc=_0x409b7e?.[_0x12b245(0x2a0)];if(!_0x3bf9fc||!_0x3bf9fc[_0x12b245(0x285)])return;const _0x1bacd1=_0x3bf9fc['selfKey'];for(const {worker:_0xacd171,startedAt:_0xaf9688,slot:_0x1d9d9c,stats:_0x2c401e,processing:_0x56e6bd}of _0x25513d[_0x12b245(0x226)]()){if(_0xacd171[_0x12b245(0x2ea)]())continue;const _0x2cc5f8=_0x3bf9fc[_0x12b245(0x2b8)]?.()&&_0x3bf9fc[_0x12b245(0x2dd)](_0x12b245(0xf5),_0x173b42(_0x1d9d9c))?.[_0x12b245(0x211)]===!![];_0x3bf9fc[_0x12b245(0xea)]({'pid':_0xacd171['process'][_0x12b245(0xe0)],'startedAt':_0xaf9688,'kind':'http-server','supervisorKey':_0x1bacd1,'slot':_0x1d9d9c,'slotKey':_0x173b42(_0x1d9d9c),'role':_0x23d0cf,'listenAddr':_0x5b046e,'lifecycle':_0x2cc5f8?_0x12b245(0xae):'running','processing':_0x56e6bd??null,'stats':_0x2c401e??null})[_0x12b245(0x2b1)](()=>{});}},_0x173b42=_0x55c8f1=>_0x3b5bea('cluster:'+_0x531411,_0x55c8f1),_0x5ca2ad=_0x1df7d6=>{const _0x3db11e=_0x3e2be8,_0x2c5a84=_0x409b7e?.[_0x3db11e(0x2a0)];if(!_0x2c5a84?.['hasDesired']?.())return![];return _0x2c5a84['getDesired']('slot',_0x173b42(_0x1df7d6))?.[_0x3db11e(0x211)]===!![];};for(let _0xac3c2c=0x0;_0xac3c2c<_0x6f30c1;_0xac3c2c++){const _0x19c2fd=_0x5ca2ad(_0xac3c2c);_0x316bba[_0x3e2be8(0x2bb)](_0xac3c2c,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x19c2fd,'respawnTimer':null}),_0x19c2fd?console[_0x3e2be8(0x244)](_0x3e2be8(0x1a3)+_0xac3c2c+_0x3e2be8(0x15e)):_0x427c2f(_0xac3c2c);}const _0x5dfddd=()=>{const _0x14bad6=_0x3e2be8,_0x479806=_0x409b7e?.[_0x14bad6(0x2a0)];if(!_0x479806?.[_0x14bad6(0x285)]||!_0x479806[_0x14bad6(0x2b8)]?.())return;for(const [_0x5b3fae,_0x16f784]of _0x316bba[_0x14bad6(0x194)]()){const _0x1a3b74=_0x479806['getDesired'](_0x14bad6(0xf5),_0x173b42(_0x5b3fae)),_0x146e33=_0x1a3b74?.[_0x14bad6(0x211)]===!![],_0x99fd60=_0x1a3b74?.[_0x14bad6(0x2ce)]===!![];if(_0x146e33&&!_0x16f784[_0x14bad6(0xc0)]){_0x16f784['dead']=!![];_0x16f784['respawnTimer']&&(clearTimeout(_0x16f784['respawnTimer']),_0x16f784[_0x14bad6(0x2e1)]=null);for(const {worker:_0x44a9f5}of _0x25513d['values']()){if(_0xbb050d(_0x44a9f5)!==_0x5b3fae||_0x44a9f5[_0x14bad6(0x2ea)]())continue;try{if(_0x99fd60)_0x44a9f5[_0x14bad6(0x204)][_0x14bad6(0x2ce)](_0x14bad6(0x215));else _0x44a9f5[_0x14bad6(0x24f)]()&&_0x44a9f5[_0x14bad6(0x1df)]();}catch{}}console[_0x14bad6(0x244)](_0x14bad6(0x1af)+(_0x99fd60?'hard-killed':'decommissioned')+'\x20worker\x20slot='+_0x5b3fae+_0x14bad6(0xce));}else{if(!_0x146e33&&_0x16f784[_0x14bad6(0xc0)]&&_0x1a3b74){_0x16f784[_0x14bad6(0xc0)]=![],_0x16f784[_0x14bad6(0x1bc)]=[],_0x16f784[_0x14bad6(0xb6)]=0x0;const _0x5a900f=[..._0x25513d['values']()][_0x14bad6(0x14b)](({worker:_0x1792dd})=>_0xbb050d(_0x1792dd)===_0x5b3fae&&!_0x1792dd[_0x14bad6(0x2ea)]());!_0x5a900f&&!_0x58b644&&(_0x427c2f(_0x5b3fae),console[_0x14bad6(0x244)](_0x14bad6(0xf9)+_0x5b3fae));}}}},_0x362c6a=()=>{try{_0x5dfddd();}catch{}};_0x409b7e?.['events']?.['on']?.(_0x5dee7e['SYSTEM_PROC'],_0x362c6a);const _0x35a97e=[];if(_0x409b7e?.[_0x3e2be8(0x184)]?.['on'])for(const _0x221949 of _0x40afaa){const _0x33dddf=_0x3d945f=>{_0x1578f8({[_0x3e395e]:_0x5d2aca,'event':_0x221949,'data':_0x3d945f??{}});};_0x409b7e['events']['on'](_0x221949,_0x33dddf),_0x35a97e[_0x3e2be8(0x1ad)]({'event':_0x221949,'handler':_0x33dddf});}const _0x55bab0=setInterval(()=>{_0x5dfddd(),_0x52adc1();},_0x4a0aba);_0x55bab0['unref']?.();const _0x31de33=(_0x2c8b75,_0x2c65d5)=>{const _0x48b2d1=_0x3e2be8;if(!_0x2c65d5||typeof _0x2c65d5!==_0x48b2d1(0x144)||_0x2c65d5[_0x3e395e]!==_0x41c5ff)return;if(!_0x409b7e?.[_0x48b2d1(0x244)]?.[_0x48b2d1(0x1aa)])return;const _0x388d3b=_0x2c65d5[_0x48b2d1(0x26c)]||{};_0x409b7e[_0x48b2d1(0x244)][_0x48b2d1(0x1aa)]({..._0x388d3b,'msg':'[w'+_0x2c65d5[_0x48b2d1(0xf5)]+']\x20'+(_0x388d3b[_0x48b2d1(0xed)]??''),'meta':{..._0x388d3b[_0x48b2d1(0x1b2)]||{},'worker':_0x2c65d5['slot'],'workerPid':_0x2c65d5[_0x48b2d1(0xe0)]}});};_0x31a090['on'](_0x3e2be8(0x2c7),_0x31de33);const _0x4fe95a=(_0xb5bd46,_0x50d3bb)=>{const _0x91776f=_0x3e2be8;if(!_0x50d3bb||typeof _0x50d3bb!==_0x91776f(0x144)||_0x50d3bb[_0x3e395e]!==_0x45f01f)return;const _0x488576=_0x25513d[_0x91776f(0xf2)](_0xb5bd46[_0x91776f(0x204)][_0x91776f(0xe0)]);if(_0x488576){_0x488576['stats']={..._0x50d3bb[_0x91776f(0x16d)],'at':Date[_0x91776f(0x1c0)]()};if(_0x50d3bb['processing']!==undefined){const _0x590ee8=_0x4ea13c(_0x50d3bb[_0x91776f(0x284)]);_0x590ee8!==_0x488576[_0x91776f(0x139)]&&(_0x488576[_0x91776f(0x139)]=_0x590ee8,_0x1cdeff()),_0x488576[_0x91776f(0x284)]=_0x50d3bb[_0x91776f(0x284)];}}};let _0x5a8ab7=null;const _0x1cdeff=()=>{if(_0x5a8ab7||_0x58b644)return;_0x5a8ab7=setTimeout(()=>{_0x5a8ab7=null;if(!_0x58b644)_0x52adc1();},_0x87335a),_0x5a8ab7['unref']?.();};_0x31a090['on']('message',_0x4fe95a),_0x31a090['on'](_0x3e2be8(0x2b3),(_0x712835,_0x2fbea6,_0x375924)=>{const _0x56075e=_0x3e2be8,_0x28faee=_0x712835[_0x56075e(0x204)]['pid'],_0xc69efc=_0xbb050d(_0x712835),_0x16fffb=_0x25513d[_0x56075e(0xf2)](_0x28faee);if(_0x16fffb&&_0x409b7e?.[_0x56075e(0x2a0)])_0x409b7e[_0x56075e(0x2a0)]['removeNode'](_0x28faee+':'+_0x16fffb[_0x56075e(0x20b)])['catch'](()=>{});_0x25513d['delete'](_0x28faee),console[_0x56075e(0x244)](_0x56075e(0x273)+_0x28faee+'\x20(slot='+(_0xc69efc??'?')+')\x20exited\x20'+(_0x56075e(0xff)+_0x2fbea6+_0x56075e(0x101)+(_0x375924??_0x56075e(0x1c3))+_0x56075e(0x2d7)+_0x25513d[_0x56075e(0x252)]+_0x56075e(0x145))),_0x52adc1();if(_0x58b644||_0xc69efc==null)return;const _0x2c92aa=_0x316bba[_0x56075e(0xf2)](_0xc69efc);if(!_0x2c92aa||_0x2c92aa[_0x56075e(0xc0)])return;const _0x38a5eb=Date[_0x56075e(0x1c0)]();_0x2c92aa[_0x56075e(0x1bc)][_0x56075e(0x1ad)](_0x38a5eb),_0x2c92aa[_0x56075e(0x1bc)]=_0x2c92aa[_0x56075e(0x1bc)][_0x56075e(0x13b)](_0x1565a8=>_0x38a5eb-_0x1565a8<=_0x2cdbd5);if(_0x2c92aa[_0x56075e(0x1bc)][_0x56075e(0x136)]>=_0x10d4d0){_0x2c92aa[_0x56075e(0xc0)]=!![],console['error']('[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot='+_0xc69efc+_0x56075e(0x256)+_0x2c92aa[_0x56075e(0x1bc)][_0x56075e(0x136)]+_0x56075e(0x167)+(_0x2cdbd5+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x25513d['size']+_0x56075e(0xd8)));return;}_0x2c92aa[_0x56075e(0xb6)]++;const _0x2fd9ba=Math[_0x56075e(0x1b7)](_0x7375bc,_0x4ec597*0x2**(_0x2c92aa['consecutiveFailures']-0x1));console[_0x56075e(0x244)](_0x56075e(0x17a)+_0xc69efc+_0x56075e(0xd6)+_0x2fd9ba+_0x56075e(0xef)+_0x2c92aa[_0x56075e(0xb6)]+')'),_0x2c92aa['respawnTimer']=setTimeout(()=>{const _0x3a3e00=_0x56075e;_0x2c92aa['respawnTimer']=null;if(_0x58b644||_0x2c92aa[_0x3a3e00(0xc0)])return;const _0x178039=_0x427c2f(_0xc69efc);_0x178039[_0x3a3e00(0x2e3)](_0x3a3e00(0x276),()=>{const _0x230329=_0x3a3e00;if(_0x316bba[_0x230329(0xf2)](_0xc69efc)===_0x2c92aa)_0x2c92aa[_0x230329(0xb6)]=0x0;});},_0x2fd9ba),_0x2c92aa['respawnTimer'][_0x56075e(0x2b4)]?.();});const _0x24af15=[..._0x25513d[_0x3e2be8(0x14c)]()];console[_0x3e2be8(0x244)]('[okdb-cluster]\x20primary\x20pid='+process[_0x3e2be8(0xe0)]+_0x3e2be8(0x2cd)+_0x6f30c1+'\x20HTTP\x20server(s)\x20on\x20port\x20'+_0x531411+':\x20'+('['+_0x24af15[_0x3e2be8(0x261)](',\x20')+']'));const _0x2ccde3={'_isClusterController':!![],'port':_0x531411,'primaryOkdb':_0x409b7e??null,'status'(){const _0x58c843=_0x3e2be8;return{'clustered':!![],'primaryPid':process[_0x58c843(0xe0)],'port':_0x531411,'primaryRole':_0x409b7e?.[_0x58c843(0x152)]??null,'processorPid':null,'supervisorPid':process['pid'],'workers':[..._0x25513d[_0x58c843(0x226)]()]['map'](({worker:_0x585117})=>({'pid':_0x585117['process'][_0x58c843(0xe0)],'id':_0x585117['id'],'dead':_0x585117[_0x58c843(0x2ea)]()}))};},async 'close'(){const _0x35b679=_0x3e2be8;_0x58b644=!![];for(const _0xfd5213 of _0x316bba[_0x35b679(0x226)]()){_0xfd5213[_0x35b679(0xc0)]=!![],_0xfd5213['respawnTimer']&&(clearTimeout(_0xfd5213['respawnTimer']),_0xfd5213['respawnTimer']=null);}clearInterval(_0x55bab0);_0x5a8ab7&&(clearTimeout(_0x5a8ab7),_0x5a8ab7=null);_0x31a090[_0x35b679(0x282)](_0x35b679(0x2c7),_0x31de33),_0x31a090[_0x35b679(0x282)](_0x35b679(0x2c7),_0x4fe95a),_0x409b7e?.[_0x35b679(0x184)]?.[_0x35b679(0x282)]?.(_0x5dee7e[_0x35b679(0x205)],_0x362c6a);if(_0x409b7e?.[_0x35b679(0x184)]?.[_0x35b679(0x282)])for(const {event:_0x482d24,handler:_0x2e87b8}of _0x35a97e){try{_0x409b7e[_0x35b679(0x184)]['off'](_0x482d24,_0x2e87b8);}catch{}}_0x35a97e[_0x35b679(0x136)]=0x0;const _0x4656d0=[..._0x25513d[_0x35b679(0x226)]()][_0x35b679(0x279)](({worker:_0x32e0f5})=>_0x32e0f5);if(_0x4656d0[_0x35b679(0x136)]===0x0)return;await Promise[_0x35b679(0xe4)](_0x4656d0[_0x35b679(0x279)](_0x3d2fdb=>new Promise(_0x426b9e=>{const _0x361d9d=_0x35b679;if(_0x3d2fdb[_0x361d9d(0x2ea)]()){_0x426b9e();return;}let _0x16dc30=![];const _0x263787=()=>{if(_0x16dc30)return;_0x16dc30=!![];if(_0x1f1d20)clearTimeout(_0x1f1d20);_0x426b9e();};_0x3d2fdb[_0x361d9d(0x2e3)](_0x361d9d(0x2b3),_0x263787);const _0x1f1d20=setTimeout(()=>{const _0x1a88d1=_0x361d9d;try{_0x3d2fdb[_0x1a88d1(0x204)]['kill']();}catch{}},_0x109a3f+0x1f4);_0x1f1d20['unref']?.();try{_0x3d2fdb[_0x361d9d(0x1df)]();}catch{try{_0x3d2fdb[_0x361d9d(0x204)][_0x361d9d(0x2ce)]();}catch{}}})));}};return _0x2ccde3;}async function _0x986ec({makeOkdb:_0x4f1405,port:_0x2d3108}){const _0x116039=_0x17734b,_0x13b5a8=await _0x4f1405();return _0x20a886(_0x13b5a8),_0x13b5a8[_0x116039(0x2ec)]['listen'](_0x2d3108);}function _0x20a886(_0x4a61ab){const _0x43ec6a=_0x17734b;if(!_0x4a61ab||_0x4a61ab['_clusterWorkerAttached'])return;_0x4a61ab[_0x43ec6a(0x294)]=!![];try{const {OKDBChangefeed:_0x4ace2c}=requireOkdbChangefeed(),_0x1af256=_0x4a61ab[_0x43ec6a(0xf3)];if(_0x1af256&&typeof _0x1af256[_0x43ec6a(0x2b2)]===_0x43ec6a(0x1d3)){const _0x47bb21=new _0x4ace2c(_0x4a61ab);_0x47bb21[_0x43ec6a(0xc8)](),_0x1af256[_0x43ec6a(0x2b2)](_0x47bb21),_0x4a61ab[_0x43ec6a(0x113)]=_0x47bb21;}}catch(_0x193efd){_0x4a61ab['log']?.[_0x43ec6a(0x2c5)]?.(_0x43ec6a(0x112)+(_0x193efd?.[_0x43ec6a(0x2c7)]??_0x193efd),{'feature':_0x43ec6a(0x265)});}const _0x4fdd54=_0x3a9631=>{const _0x3819e7=_0x43ec6a;if(!_0x3a9631||typeof _0x3a9631!==_0x3819e7(0x144)||_0x3a9631[_0x3e395e]==null)return;if(_0x3a9631[_0x3e395e]===_0x5d2aca)try{_0x4a61ab[_0x3819e7(0xf3)]?.[_0x3819e7(0xac)]?.(_0x3a9631[_0x3819e7(0xb0)],_0x3a9631[_0x3819e7(0x253)]);}catch{}};process['on'](_0x43ec6a(0x2c7),_0x4fdd54),_0x4a61ab[_0x43ec6a(0xc2)]=_0x4fdd54;{let _0x9fb025=process[_0x43ec6a(0x18e)](),_0x3a012d=Date['now']();const _0x123089=()=>{const _0x4b7c3c=_0x43ec6a;if(typeof process[_0x4b7c3c(0x23a)]!==_0x4b7c3c(0x1d3)||!process[_0x4b7c3c(0xb5)])return;const _0x22e976=Date['now'](),_0x6a806b=process['cpuUsage'](),_0x4e0303=(_0x22e976-_0x3a012d)*0x3e8,_0x37b7cd=_0x6a806b['user']-_0x9fb025[_0x4b7c3c(0x1c1)]+(_0x6a806b['system']-_0x9fb025[_0x4b7c3c(0x212)]),_0x32ce8f=_0x4e0303>0x0?Math['min'](0x64,Math[_0x4b7c3c(0x153)](_0x37b7cd/(_0x4e0303*(_0x513786[_0x4b7c3c(0x2bd)]()[_0x4b7c3c(0x136)]||0x1))*0x64)):0x0;_0x9fb025=_0x6a806b,_0x3a012d=_0x22e976;const _0x4f3ad6=process[_0x4b7c3c(0x1dd)]();let _0x8f5402=null;try{_0x8f5402=_0x4a61ab[_0x4b7c3c(0x152)]?.[_0x4b7c3c(0x1f3)]?_0x4a61ab[_0x4b7c3c(0x2a0)]?.[_0x4b7c3c(0x1bb)]?.()??null:null;}catch{}try{process[_0x4b7c3c(0x23a)]({[_0x3e395e]:_0x45f01f,'stats':{'rss':_0x4f3ad6[_0x4b7c3c(0x1a0)],'heapUsed':_0x4f3ad6[_0x4b7c3c(0x2a1)],'heapTotal':_0x4f3ad6[_0x4b7c3c(0xe1)],'external':_0x4f3ad6[_0x4b7c3c(0x105)],'cpuPct':_0x32ce8f,'cpuWindowMs':Math[_0x4b7c3c(0x153)](_0x4e0303/0x3e8)||null},'processing':_0x8f5402});}catch{}},_0x2046c3=Math[_0x43ec6a(0x24a)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x4e8565=setInterval(_0x123089,_0x2046c3);_0x4e8565[_0x43ec6a(0x2b4)]?.(),_0x123089();for(const _0x1c8a8e of[_0x43ec6a(0x189),_0x43ec6a(0x260)]){_0x4a61ab[_0x43ec6a(0x184)]?.['on']?.(_0x1c8a8e,()=>{try{_0x123089();}catch{}});}}let _0xc223e7=![];const _0x2daa67=async _0x165046=>{const _0x3d6e50=_0x43ec6a;if(_0xc223e7)return;_0xc223e7=!![];const _0x1774ab=setTimeout(()=>process[_0x3d6e50(0x2b3)](_0x165046),_0x109a3f);_0x1774ab[_0x3d6e50(0x2b4)]?.();try{await _0x4a61ab[_0x3d6e50(0x1a8)]?.();}catch{}process[_0x3d6e50(0x2b3)](_0x165046);};process['on'](_0x43ec6a(0x1df),()=>_0x2daa67(0x0));if(process['send']&&!process['connected'])_0x2daa67(0x0);if(process[_0x43ec6a(0x1d7)]!==_0x43ec6a(0x1f5)){const _0x1b3766=setInterval(()=>{const _0x154079=_0x43ec6a;if(process[_0x154079(0x175)]===0x1)_0x2daa67(0x0);},_0x3222bc);_0x1b3766[_0x43ec6a(0x2b4)]?.(),_0x4a61ab['_clusterOrphanWatch']=_0x1b3766;}}return okdbCluster={'runClustered':_0x16df4e,'attachWorkerCluster':_0x20a886},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0x48c546=_0x2ee730;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x496c27=require$$0$5,{attachWorkerCluster:_0x523529}=requireOkdbCluster();async function _0x571855(){const _0x142d85=_0x302a,_0xaa0fe6=process.env.OKDB_HTTP_CHILD;if(!_0xaa0fe6)throw new Error(_0x142d85(0x25b));const {rootPath:_0x904889,port:_0x16d1a9,options:options={},logLevel:logLevel=_0x142d85(0x19b)}=JSON['parse'](_0xaa0fe6);if(!_0x904889||!_0x16d1a9)throw new Error('okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required');const _0xa04980=new _0x496c27(_0x904889,{...options,'engines':![],'processors':![],'compaction':![]});_0xa04980[_0x142d85(0x244)][_0x142d85(0x114)]?.();const _0x5be3f0=process.env.OKDB_CLUSTER_SLOT??'?',_0x162529={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x1a8eb2=_0x162529[logLevel]??_0x162529[_0x142d85(0x19b)];_0xa04980[_0x142d85(0x244)][_0x142d85(0x2a5)](_0x5acf98=>{const _0x133022=_0x142d85;if((_0x162529[_0x5acf98[_0x133022(0xda)]]??0x1)<_0x1a8eb2)return;try{process[_0x133022(0x23a)]?.({'__okdbCluster':'log','slot':_0x5be3f0,'pid':process[_0x133022(0xe0)],'entry':_0x5acf98});}catch{}}),await _0xa04980['open'](),_0x523529(_0xa04980),await _0xa04980[_0x142d85(0x2ec)][_0x142d85(0x1f6)](_0x16d1a9);}return _0x571855()[_0x48c546(0x2b1)](_0x1e5194=>{const _0x258944=_0x48c546;try{process[_0x258944(0x23a)]?.({'__okdbCluster':_0x258944(0x244),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x258944(0xe0)],'entry':{'level':_0x258944(0x1f4),'msg':'http\x20worker\x20child\x20failed:\x20'+(_0x1e5194?.[_0x258944(0x2c7)]??_0x1e5194)}});}catch{}process[_0x258944(0x2b3)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module[_0x2ee730(0x1fa)]=okdbHttpWorkerChild;
|
|
1
|
+
'use strict';const _0x727d37=_0x1c29;(function(_0x267092,_0x13d3ff){const _0x10a35f=_0x1c29,_0x88bdd1=_0x267092();while(!![]){try{const _0x18ea21=parseInt(_0x10a35f(0x2b0))/0x1+parseInt(_0x10a35f(0x37b))/0x2*(-parseInt(_0x10a35f(0x295))/0x3)+-parseInt(_0x10a35f(0x267))/0x4+-parseInt(_0x10a35f(0x27d))/0x5+-parseInt(_0x10a35f(0x20f))/0x6+parseInt(_0x10a35f(0x23c))/0x7*(-parseInt(_0x10a35f(0x371))/0x8)+parseInt(_0x10a35f(0x2f1))/0x9*(parseInt(_0x10a35f(0x215))/0xa);if(_0x18ea21===_0x13d3ff)break;else _0x88bdd1['push'](_0x88bdd1['shift']());}catch(_0x505f54){_0x88bdd1['push'](_0x88bdd1['shift']());}}}(_0x1004,0xa7565));function _0x1c29(_0x488e63,_0x18824a){_0x488e63=_0x488e63-0x15d;const _0x1004fe=_0x1004();let _0x1c29f1=_0x1004fe[_0x488e63];return _0x1c29f1;}var require$$0$5=require(_0x727d37(0x33d)),require$$1$1=require(_0x727d37(0x24a)),require$$1=require('path'),require$$0$3=require('os'),require$$2=require('crypto'),require$$0=require(_0x727d37(0x283)),require$$0$2=require('perf_hooks'),require$$0$1=require('fs'),require$$0$4=require(_0x727d37(0x350));function getDefaultExportFromCjs(_0xb6b3be){const _0x26bad5=_0x727d37;return _0xb6b3be&&_0xb6b3be[_0x26bad5(0x384)]&&Object[_0x26bad5(0x38e)]['hasOwnProperty'][_0x26bad5(0x3a5)](_0xb6b3be,_0x26bad5(0x22d))?_0xb6b3be[_0x26bad5(0x22d)]:_0xb6b3be;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0xac20f1=_0x727d37;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x2bb0fc={'PUT':_0xac20f1(0x298),'REMOVE':_0xac20f1(0x31c),'INDEX_DROP':'dropIndex','INDEX_REGISTER':_0xac20f1(0x2a4),'INDEX_RESET':_0xac20f1(0x36b),'TYPE_REGISTER':_0xac20f1(0x222),'TYPE_DROP':'dropType','FTS_REGISTER':_0xac20f1(0x31f),'FTS_DROP':_0xac20f1(0x32f),'FTS_RESET':_0xac20f1(0x225),'SCHEMA_SET':'setSchema','SCHEMA_DROP':'dropSchema','TTL_SET':'setTtl','TTL_CLEAR':'clearTtl'},_0x5ac379={'SYSTEM_READY':_0xac20f1(0x2f4),'FIELD_RESOLVER_REGISTERED':'field:resolver_registered','SYSTEM_STOPPED':_0xac20f1(0x182),'SYSTEM_CLOCK_CHANGE':_0xac20f1(0x221),'SYSTEM_POKE':_0xac20f1(0x195),'SYSTEM_DRAIN':'system:drain','SYSTEM_TYPE_DROP':_0xac20f1(0x2e5),'SYSTEM_PROC':_0xac20f1(0x19b),'SYSTEM_BUS_STATE_CHANGE':_0xac20f1(0x176),'ITEM_CREATE':_0xac20f1(0x395),'ITEM_UPDATE':_0xac20f1(0x30b),'ITEM_REMOVE':_0xac20f1(0x39d),'ITEM_PENDING':'item:pending','INDEX_RESET':'index:reset','INDEX_READY':'index:ready','INDEX_PROGRESS':'index:progress','VIEW_PROGRESS':_0xac20f1(0x2bc),'INDEX_DROP':_0xac20f1(0x21a),'INDEX_REGISTERED':_0xac20f1(0x207),'FTS_REGISTERED':'fts:registered','FTS_DROP':'fts:drop','FTS_RESET':_0xac20f1(0x1e2),'SCHEMA_SET':_0xac20f1(0x1e1),'SCHEMA_DROP':_0xac20f1(0x2a3),'UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0xac20f1(0x34f),'REF_VIOLATION':_0xac20f1(0x2cf),'REF_VIOLATION_RESOLVED':_0xac20f1(0x349),'SYNC_APPLY':_0xac20f1(0x2b3),'TXN_START':_0xac20f1(0x1bb),'TXN_END':'txn:end','TXN_ROLLBACK':_0xac20f1(0x161),'TYPE_REGISTERED':_0xac20f1(0x2a5),'TYPE_DROP':_0xac20f1(0x22b),'ENV_OPENED':_0xac20f1(0x205),'ENV_REMOVED':_0xac20f1(0x1c5),'SYSTEM_ENV_RELEASE':_0xac20f1(0x261),'TTL_EXPIRED':_0xac20f1(0x211),'TTL_SET':_0xac20f1(0x329),'TTL_CLEAR':_0xac20f1(0x2f8),'LICENSE_INVALID':_0xac20f1(0x355),'LICENSE_ADDED':_0xac20f1(0x191),'LICENSE_ACTIVATED':_0xac20f1(0x377),'LICENSE_REMOVED':_0xac20f1(0x27f)},_0x1f336e={'CREATING':_0xac20f1(0x1f1),'RESETTING':_0xac20f1(0x26b),'READY':_0xac20f1(0x22a),'DROPPING':_0xac20f1(0x324),'WAITING':'waiting','ERROR':_0xac20f1(0x2fd)},_0x15dca2={'CREATED':'created','STARTING':'starting','STARTED':_0xac20f1(0x382),'STOPPING':'stopping','STOPPED':_0xac20f1(0x313)},_0x40944d={'CREATING':_0xac20f1(0x1f1),'READY':_0xac20f1(0x22a),'HALTED':_0xac20f1(0x250),'STOPPED':_0xac20f1(0x313),'RESETTING':_0xac20f1(0x26b)},_0x4889e6=Object[_0xac20f1(0x306)]({'POKE':_0xac20f1(0x2e3),'DRAIN':_0xac20f1(0x277),'TYPE_DROP':_0xac20f1(0x1af),'PROC':_0xac20f1(0x36f),'ENV_RELEASE':'bus:env_release'});return okdbEnums={'BUS_EVENTS':_0x4889e6,'CHANGE_ACTIONS':_0x2bb0fc,'EVENTS':_0x5ac379,'INDEX_STATE':_0x1f336e,'OKDB_STATE':_0x15dca2,'VIEW_STATE':_0x40944d},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x29c2f5=_0x727d37;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x360e27,performance:_0x544629}=require$$0,_0x59b424=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x29c2f5(0x399),_0x11bb98=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x4a73f8=process.env.OKDB_LOOP_LAG_ALL==='1',_0x1d1747=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x12adcb{constructor(){const _0x2f14ea=_0x29c2f5;this[_0x2f14ea(0x2ce)]=_0x59b424,this['_buckets']=new Map(),this['_h']=null,this[_0x2f14ea(0x1dc)]=null,this[_0x2f14ea(0x224)]=![],this['_log']=(_0x2940e,_0x54896e)=>process[_0x2f14ea(0x1ed)][_0x2f14ea(0x369)](_0x2940e+(_0x54896e?'\x20'+JSON[_0x2f14ea(0x2e8)](_0x54896e):'')+'\x0a');}[_0x29c2f5(0x299)](){return _0x544629['now']();}[_0x29c2f5(0x27c)](_0xea1167){const _0x13301a=_0x29c2f5;if(typeof _0xea1167===_0x13301a(0x2c1))this['_log']=_0xea1167;}['note'](_0x59576b,_0x29144f,_0x41d2a9){const _0x3fcee5=_0x29c2f5;if(!this[_0x3fcee5(0x2ce)])return;let _0x347ab2=this[_0x3fcee5(0x3a6)][_0x3fcee5(0x288)](_0x59576b);!_0x347ab2&&(_0x347ab2={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x3fcee5(0x3a6)][_0x3fcee5(0x1b7)](_0x59576b,_0x347ab2)),_0x347ab2['ms']+=_0x29144f,_0x347ab2[_0x3fcee5(0x1f9)]+=0x1,_0x29144f>_0x347ab2[_0x3fcee5(0x2c5)]&&(_0x347ab2[_0x3fcee5(0x2c5)]=_0x29144f,_0x347ab2[_0x3fcee5(0x2ac)]=_0x41d2a9||'');}[_0x29c2f5(0x265)](_0x2fc7b2){const _0x42108e=_0x29c2f5;if(!this[_0x42108e(0x2ce)]||this[_0x42108e(0x224)])return;this[_0x42108e(0x224)]=!![];if(_0x2fc7b2)this[_0x42108e(0x2b6)]=_0x2fc7b2;this['_h']=_0x360e27({'resolution':0xa}),this['_h'][_0x42108e(0x233)](),this[_0x42108e(0x1dc)]=setInterval(()=>this['_report'](),_0x11bb98);if(this[_0x42108e(0x1dc)][_0x42108e(0x2d7)])this[_0x42108e(0x1dc)]['unref']();}[_0x29c2f5(0x25b)](_0x58f988){const _0x43472d=_0x29c2f5;if(!this[_0x43472d(0x2ec)])this[_0x43472d(0x2ec)]=new Set();this['_windowCbs'][_0x43472d(0x273)](_0x58f988);if(!this['_started'])this[_0x43472d(0x26a)]();}[_0x29c2f5(0x302)](_0x5778b5){const _0x4d6950=_0x29c2f5;this['_windowCbs']?.[_0x4d6950(0x21f)](_0x5778b5);}[_0x29c2f5(0x26a)](){const _0x573dc6=_0x29c2f5;if(this[_0x573dc6(0x33c)])return;this[_0x573dc6(0x33c)]=!![];!this['_h']&&(this['_h']=_0x360e27({'resolution':0xa}),this['_h']['enable']());const _0x21aa09=_0x11bb98;this[_0x573dc6(0x17d)]=setInterval(()=>{const _0x3832a7=_0x573dc6,_0x7cefe3=this['_h'];if(!_0x7cefe3)return;const _0x27cffb=_0x7cefe3['percentile'](0x63)/0xf4240,_0x1015a4=_0x7cefe3['max']/0xf4240,_0x2c85ec=_0x7cefe3[_0x3832a7(0x1b0)]/0xf4240;_0x7cefe3[_0x3832a7(0x396)]();if(this[_0x3832a7(0x2ec)])for(const _0x48248a of this[_0x3832a7(0x2ec)]){try{_0x48248a({'p99Ms':_0x27cffb,'maxMs':_0x1015a4,'meanMs':_0x2c85ec,'reportMs':_0x21aa09});}catch{}}},_0x21aa09);if(this['_admissionTimer'][_0x573dc6(0x2d7)])this['_admissionTimer'][_0x573dc6(0x2d7)]();}[_0x29c2f5(0x22e)](){const _0x2bb7a5=_0x29c2f5,_0x4c9c7d=this['_h'],_0x32fc23=_0x4c9c7d[_0x2bb7a5(0x346)]/0xf4240,_0x1213c4=_0x4c9c7d[_0x2bb7a5(0x296)](0x63)/0xf4240,_0x3f8bb5=_0x4c9c7d[_0x2bb7a5(0x1b0)]/0xf4240;_0x4c9c7d[_0x2bb7a5(0x396)]();const _0x73a0d7=[...this[_0x2bb7a5(0x3a6)]['entries']()][_0x2bb7a5(0x249)](([_0x2bba12,_0x210e2a])=>({'label':_0x2bba12,..._0x210e2a}))[_0x2bb7a5(0x245)]((_0x33922d,_0x38e86c)=>_0x38e86c['ms']-_0x33922d['ms'])['slice'](0x0,0x8);this[_0x2bb7a5(0x3a6)][_0x2bb7a5(0x2c3)]();const _0x5cdeb3=_0x73a0d7[_0x2bb7a5(0x234)]((_0x30d795,_0x3a361f)=>_0x30d795+_0x3a361f['ms'],0x0),_0x508879=_0x73a0d7['map'](_0x18d81e=>_0x18d81e[_0x2bb7a5(0x229)]+'='+_0x18d81e['ms'][_0x2bb7a5(0x27b)](0x0)+'ms/'+_0x18d81e['count']+(_0x18d81e['maxMs']>0x5?_0x2bb7a5(0x39c)+_0x18d81e[_0x2bb7a5(0x2c5)][_0x2bb7a5(0x27b)](0x0)+'ms'+(_0x18d81e[_0x2bb7a5(0x2ac)]?'\x20'+_0x18d81e[_0x2bb7a5(0x2ac)]:'')+')':''));(_0x4a73f8||_0x32fc23>=_0x1d1747)&&this[_0x2bb7a5(0x2b6)](_0x2bb7a5(0x34d)+_0x11bb98+'ms\x20max='+_0x32fc23[_0x2bb7a5(0x27b)](0x0)+_0x2bb7a5(0x28d)+_0x1213c4[_0x2bb7a5(0x27b)](0x0)+_0x2bb7a5(0x16a)+_0x3f8bb5[_0x2bb7a5(0x27b)](0x0)+_0x2bb7a5(0x180)+_0x5cdeb3['toFixed'](0x0)+'ms'+(_0x508879[_0x2bb7a5(0x2de)]?_0x2bb7a5(0x20e)+_0x508879['join']('\x20\x20'):''),{'feature':_0x2bb7a5(0x32a)});if(this[_0x2bb7a5(0x2ec)])for(const _0x3db9f5 of this[_0x2bb7a5(0x2ec)]){try{_0x3db9f5({'p99Ms':_0x1213c4,'maxMs':_0x32fc23,'meanMs':_0x3f8bb5,'reportMs':_0x11bb98});}catch{}}}[_0x29c2f5(0x367)](){const _0x29b449=_0x29c2f5;if(this[_0x29b449(0x1dc)])clearInterval(this['_timer']);if(this['_h'])this['_h'][_0x29b449(0x230)]();this[_0x29b449(0x1dc)]=null,this['_h']=null,this[_0x29b449(0x224)]=![];}}const _0x5b317e=new _0x12adcb();if(_0x5b317e['enabled'])_0x5b317e[_0x29c2f5(0x265)]();return okdbLoopMonitor={'LOOP':_0x5b317e},okdbLoopMonitor;}var okdbTimers,hasRequiredOkdbTimers;function requireOkdbTimers(){if(hasRequiredOkdbTimers)return okdbTimers;hasRequiredOkdbTimers=0x1;const _0x3b2f5b=0x2**0x1f-0x1;function _0x58c5c7(_0x4bbb61){if(!(_0x4bbb61>0x0))return 0x0;return _0x4bbb61>_0x3b2f5b?_0x3b2f5b:_0x4bbb61;}function _0x94df40(_0x2f046f){return _0x2f046f===Infinity;}return okdbTimers={'MAX_TIMER_DELAY':_0x3b2f5b,'clampTimerDelay':_0x58c5c7,'isNeverDelay':_0x94df40},okdbTimers;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x2b32be=require$$0$1,_0x2d2225=require$$1;let _0x36217f,_0x5633e8,_0x21c4f1,_0x4f34bf,_0x41d354,_0x1be55f,_0x484e9e,_0x587c4e=![];const _0x646504=new Set();let _0x58eb88=null;const _0x10c708=new Map();function _0x2c9e20(){const _0x4b03b3=_0x1c29;if(_0x36217f!==undefined)return _0x36217f;_0x36217f=process.env.OKDB_DIAG==='1';if(!_0x36217f)return![];_0x5633e8=process.env.OKDB_DIAG_STACK==='1',_0x4f34bf=Math['max'](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x21c4f1=new Array(_0x4f34bf),_0x41d354=0x0,_0x1be55f=0x0,_0x484e9e=process.env.OKDB_DIAG_DIR||null;if(_0x484e9e)try{_0x2b32be[_0x4b03b3(0x29d)](_0x484e9e,{'recursive':!![]});}catch{}return!![];}function _0x4562ad(){return _0x36217f===undefined?_0x2c9e20():_0x36217f;}function _0x488fcb(_0x873372,_0x28bad9){const _0xf00aaa=_0x1c29;if(_0x36217f===undefined?!_0x2c9e20():!_0x36217f)return;let _0x1150f9;if(_0x5633e8){const _0xfbbc20=new Error()[_0xf00aaa(0x162)]||'';_0x1150f9=_0xfbbc20[_0xf00aaa(0x304)]('\x0a')['slice'](0x3)['map'](_0x11a35c=>_0x11a35c[_0xf00aaa(0x317)]())[_0xf00aaa(0x232)](Boolean)[_0xf00aaa(0x2f9)](0x0,0x8);}_0x21c4f1[_0x41d354]={'seq':_0x1be55f++,'t':Date[_0xf00aaa(0x299)](),'env':_0x873372,'kind':_0x28bad9||_0xf00aaa(0x2aa),'stack':_0x1150f9},_0x41d354=(_0x41d354+0x1)%_0x4f34bf;}function _0xe66bf9(_0x153549){const _0xa365c6=_0x1c29,_0x258dce=[];for(let _0x2ec5f2=0x0;_0x2ec5f2<_0x4f34bf;_0x2ec5f2++){const _0x55357f=_0x21c4f1[(_0x41d354-0x1-_0x2ec5f2+_0x4f34bf*0x2)%_0x4f34bf];if(!_0x55357f)continue;_0x258dce['push'](_0x55357f);if(_0x258dce[_0xa365c6(0x2de)]>=_0x153549)break;}return _0x258dce;}function _0x4e56df(_0x322574){const _0x13fbdf=_0x1c29;try{process[_0x13fbdf(0x1ed)][_0x13fbdf(0x369)](_0x322574+'\x0a');}catch{}if(_0x484e9e)try{_0x2b32be[_0x13fbdf(0x340)](_0x2d2225[_0x13fbdf(0x1c8)](_0x484e9e,_0x13fbdf(0x1d6)+process['pid']+_0x13fbdf(0x336)),_0x322574+'\x0a');}catch{}}function _0x56daac(_0x2dc505){const _0x3e8980=_0x1c29,_0x4994fc=_0xe66bf9(_0x2dc505);if(!_0x4994fc[_0x3e8980(0x2de)])return'\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)';const _0x5eb184=Date[_0x3e8980(0x299)]();return _0x4994fc[_0x3e8980(0x249)](_0x40290d=>{const _0x1cf440=_0x3e8980,_0x4c39a0='\x20\x20#'+_0x40290d[_0x1cf440(0x19f)]+'\x20-'+(_0x5eb184-_0x40290d['t'])+'ms\x20env='+_0x40290d[_0x1cf440(0x15d)]+'\x20'+_0x40290d[_0x1cf440(0x1cb)];return _0x40290d[_0x1cf440(0x162)]&&_0x40290d[_0x1cf440(0x162)]['length']?_0x4c39a0+'\x0a\x20\x20\x20\x20\x20\x20'+_0x40290d[_0x1cf440(0x162)][_0x1cf440(0x1c8)]('\x0a\x20\x20\x20\x20\x20\x20'):_0x4c39a0;})[_0x3e8980(0x1c8)]('\x0a');}function _0x1bb853(_0x429fcd,_0x1f609e){const _0x2e42e3=_0x1c29,_0x31d5a3=_0x2e42e3(0x197)+_0x429fcd+_0x2e42e3(0x2f6)+new Date()[_0x2e42e3(0x1fc)]()+_0x2e42e3(0x2bf)+process['pid']+_0x2e42e3(0x2e2),_0x4c45f7=[_0x31d5a3,_0x2e42e3(0x260)+(_0x1f609e&&_0x1f609e[_0x2e42e3(0x162)]?_0x1f609e['stack'][_0x2e42e3(0x304)]('\x0a')[0x0]:_0x1f609e),'recent\x20writes\x20(newest\x20first)'+(_0x5633e8?'':_0x2e42e3(0x379))+':',_0x56daac(0x18),_0x3b5147(),'='[_0x2e42e3(0x291)](_0x31d5a3[_0x2e42e3(0x2de)]-0x1)];_0x4e56df(_0x4c45f7['join']('\x0a'));}function _0x12e037(_0xaacdab){const _0x52dd80=_0x1c29;if(!_0x4562ad())return;const _0x4469c8=String(_0xaacdab&&_0xaacdab[_0x52dd80(0x1c4)]||_0xaacdab||''),_0x38845a=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x52dd80(0x338)](_0x4469c8);_0x1bb853(_0x38845a?_0x52dd80(0x25c):_0x52dd80(0x39b),_0xaacdab);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x38845a)return;try{console[_0x52dd80(0x2fd)](_0xaacdab&&_0xaacdab[_0x52dd80(0x162)]?_0xaacdab[_0x52dd80(0x162)]:_0xaacdab);}catch{}process[_0x52dd80(0x243)](0x1);}function _0x125997(_0x14766e){const _0x60e0ad=_0x1c29;if(!_0x4562ad())return;const _0x435428=String(_0x14766e&&_0x14766e[_0x60e0ad(0x1c4)]||_0x14766e||'');/already closed|environment is already|invalid read txn|reset an invalid/i['test'](_0x435428)&&_0x1bb853(_0x60e0ad(0x2e7),_0x14766e);}function _0x3b5147(){const _0x2ff475=_0x1c29,_0x40b5a2=['drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):'];let _0x3c0a7b=![];for(const _0x50aa9 of _0x646504){const _0x323d71=_0x50aa9&&_0x50aa9['_envs'];if(!_0x323d71)continue;for(const [_0x3c425b,_0x5f1874]of _0x323d71){const _0x530154=_0x5f1874&&_0x5f1874[_0x2ff475(0x16d)]&&_0x5f1874[_0x2ff475(0x16d)]['view'];if(!_0x530154)continue;let _0x1b4572,_0x3fd0a7;try{_0x1b4572=Atomics[_0x2ff475(0x2b9)](_0x530154,0x0),_0x3fd0a7=Atomics[_0x2ff475(0x2b9)](_0x530154,0x1);}catch{continue;}if(_0x1b4572===0x0)continue;_0x3c0a7b=!![];const _0x3383ad=_0x1b4572>0x0?_0x2ff475(0x1b1):_0x2ff475(0x35e),_0x1391bd=Date[_0x2ff475(0x299)]()-Math[_0x2ff475(0x38b)](_0x1b4572)*0x3e8,_0x3a8561=((()=>{const _0x5b94c6=_0x2ff475;try{return _0x5f1874[_0x5b94c6(0x362)]&&_0x5f1874[_0x5b94c6(0x362)][_0x5b94c6(0x1b6)]?_0x5f1874[_0x5b94c6(0x362)][_0x5b94c6(0x1b6)]():null;}catch{return null;}})());_0x40b5a2['push'](_0x2ff475(0x23f)+_0x3c425b+_0x2ff475(0x2e9)+_0x3383ad+_0x2ff475(0x165)+_0x1391bd+_0x2ff475(0x2a6)+_0x3fd0a7+(_0x3a8561?_0x2ff475(0x37f)+_0x3a8561[_0x2ff475(0x2bb)]+_0x2ff475(0x39a)+_0x3a8561[_0x2ff475(0x2dc)]+_0x2ff475(0x1ad)+_0x3a8561[_0x2ff475(0x2c0)]+'}':''));}}if(!_0x3c0a7b)_0x40b5a2[_0x2ff475(0x2d3)](_0x2ff475(0x1cf));return _0x40b5a2[_0x2ff475(0x1c8)]('\x0a');}function _0x5c34d2(){const _0x473833=_0x1c29;if(!_0x4562ad())return;const _0x3e02bf=Math['max'](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x154e1e=Date[_0x473833(0x299)]();for(const _0x247757 of _0x646504){const _0x321d78=_0x247757&&_0x247757[_0x473833(0x1a6)];if(!_0x321d78)continue;for(const [_0x5a6940,_0x2f40da]of _0x321d78){const _0x26933b=_0x2f40da&&_0x2f40da[_0x473833(0x16d)]&&_0x2f40da[_0x473833(0x16d)][_0x473833(0x246)];if(!_0x26933b)continue;let _0x1b3814;try{_0x1b3814=Atomics[_0x473833(0x2b9)](_0x26933b,0x0);}catch{continue;}const _0x3e3d6c=_0x247757[_0x473833(0x2b7)]+'|'+_0x5a6940;if(_0x1b3814<=0x0){_0x10c708[_0x473833(0x21f)](_0x3e3d6c);continue;}const _0x4c1bad=_0x154e1e-_0x1b3814*0x3e8,_0x4401fe=_0x10c708[_0x473833(0x288)](_0x3e3d6c);if(_0x4c1bad<_0x3e02bf)continue;if(_0x4401fe&&_0x154e1e-_0x4401fe[_0x473833(0x391)]<_0x3e02bf)continue;_0x10c708[_0x473833(0x1b7)](_0x3e3d6c,{'firstTs':_0x4401fe?_0x4401fe['firstTs']:_0x1b3814,'dumpedAt':_0x154e1e});const _0x587c5f=_0x473833(0x347)+_0x4c1bad+_0x473833(0x2fc)+_0x5a6940+_0x473833(0x2f6)+new Date()[_0x473833(0x1fc)]()+_0x473833(0x2bf)+process[_0x473833(0x1f0)]+_0x473833(0x2e2);_0x4e56df([_0x587c5f,_0x3b5147(),'='[_0x473833(0x291)](_0x587c5f['length']-0x1)][_0x473833(0x1c8)]('\x0a'));}}}function _0xb503f4(){const _0x34c4ab=_0x1c29;if(!_0x4562ad()||_0x587c4e)return;_0x587c4e=!![],process[_0x34c4ab(0x2f7)](_0x34c4ab(0x39b),_0x12e037),process[_0x34c4ab(0x2f7)](_0x34c4ab(0x323),_0x125997);const _0x374b54=Math['max'](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x58eb88=setInterval(_0x5c34d2,_0x374b54);if(_0x58eb88[_0x34c4ab(0x2d7)])_0x58eb88[_0x34c4ab(0x2d7)]();}function _0x743f8d(_0x594370){const _0x460d16=_0x1c29;if(!_0x4562ad()||!_0x594370)return;_0x646504[_0x460d16(0x273)](_0x594370),_0xb503f4();}function _0x5bf62a(_0xf20fde){const _0x1b081d=_0x1c29;_0x646504[_0x1b081d(0x21f)](_0xf20fde);}function _0x18a8f5(){if(!_0x4562ad())return{'enabled':![],'hint':'set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)'};return{'enabled':!![],'stackCapture':!!_0x5633e8,'recentWrites':_0xe66bf9(0x10),'drain':_0x3b5147()};}return okdbDiag={'isEnabled':_0x4562ad,'recordWrite':_0x488fcb,'installDiag':_0xb503f4,'registerOkdb':_0x743f8d,'unregisterOkdb':_0x5bf62a,'snapshot':_0x18a8f5},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x12f62d=_0x727d37;if(hasRequiredOkdbWriter)return okdbWriter[_0x12f62d(0x2a8)];hasRequiredOkdbWriter=0x1;const {performance:_0x4d1815}=require$$0$2,_0x376cbf=requireOkdbDiag(),_0x2bcc08=process.env.OKDB_COMMIT_MODE===_0x12f62d(0x181);class _0x3820d8{constructor(_0x46d9e8){const _0x13439a=_0x12f62d;this[_0x13439a(0x15d)]=_0x46d9e8,this[_0x13439a(0x35b)]=new Set(),this[_0x13439a(0x337)]=new Map(),this[_0x13439a(0x263)]=0x0,this[_0x13439a(0x2d9)]=[],this[_0x13439a(0x188)]=[],this[_0x13439a(0x17a)]=Math[_0x13439a(0x346)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this['_outstanding']=0x0,this[_0x13439a(0x1c0)]=[],this[_0x13439a(0x1c6)]=0x0,this[_0x13439a(0x1f7)]=null,this[_0x13439a(0x297)]=0x0,this[_0x13439a(0x2b1)]=0x0,this['_nestedWarned']=![];}async[_0x12f62d(0x1ba)](_0x338b00,_0x95d17d,_0x2720bc={}){const _0x5d39d3=_0x12f62d;for(let _0x342eba=0x1;;_0x342eba++){try{return await this[_0x5d39d3(0x269)](_0x338b00,_0x95d17d,_0x2720bc);}catch(_0x492756){if(_0x492756?.[_0x5d39d3(0x37a)]!=='INDEX_SET_CHANGED'||_0x2720bc[_0x5d39d3(0x330)]||_0x342eba>=0x5)throw _0x492756;this[_0x5d39d3(0x15d)]['_adoptPeerIndexes'](_0x492756[_0x5d39d3(0x1a9)]);}}}async[_0x12f62d(0x269)](_0x622ae0,_0x1aa7ba,{admitted:admitted=![]}={}){const _0x385a55=_0x12f62d;if(_0x376cbf[_0x385a55(0x26d)]())_0x376cbf[_0x385a55(0x316)](this[_0x385a55(0x15d)]?.[_0x385a55(0x37d)],_0x1aa7ba);if(this['_closed']){const _0x263cc1=new Error(_0x385a55(0x25a));_0x263cc1[_0x385a55(0x37a)]=_0x385a55(0x1fb);throw _0x263cc1;}if(this[_0x385a55(0x17a)]>0x0){let _0x1dbcf5=![];while(this[_0x385a55(0x20a)]>=this['_highWater']&&!this[_0x385a55(0x17b)]){!_0x1dbcf5&&(_0x1dbcf5=!![],this[_0x385a55(0x1c6)]++),await new Promise(_0x4d242c=>this['_bpWaiters']['push'](_0x4d242c));}if(this[_0x385a55(0x17b)]){const _0x2dc162=new Error(_0x385a55(0x25a));_0x2dc162[_0x385a55(0x37a)]=_0x385a55(0x1fb);throw _0x2dc162;}}this[_0x385a55(0x20a)]++;const _0x36df58=admitted?null:this[_0x385a55(0x15d)][_0x385a55(0x16d)];for(;;){while(this[_0x385a55(0x1f7)])await this[_0x385a55(0x1f7)];if(_0x36df58)try{await _0x36df58[_0x385a55(0x1c3)]();}catch(_0x4d56a1){this[_0x385a55(0x20a)]--;if(this[_0x385a55(0x1c0)][_0x385a55(0x2de)]&&this[_0x385a55(0x20a)]<this['_highWater'])this[_0x385a55(0x1c0)][_0x385a55(0x18f)]()();throw _0x4d56a1;}if(!this[_0x385a55(0x1f7)])break;if(_0x36df58)_0x36df58[_0x385a55(0x294)]();}if(this[_0x385a55(0x17b)]){if(_0x36df58)_0x36df58[_0x385a55(0x294)]();this['_outstanding']--;if(this['_bpWaiters'][_0x385a55(0x2de)]&&this[_0x385a55(0x20a)]<this[_0x385a55(0x17a)])this[_0x385a55(0x1c0)][_0x385a55(0x18f)]()();const _0x4c1a1c=new Error(_0x385a55(0x25a));_0x4c1a1c[_0x385a55(0x37a)]=_0x385a55(0x1fb);throw _0x4c1a1c;}const _0x2b7422=_0x4d1815[_0x385a55(0x299)]();if(_0x2bcc08)try{const _0x5ac48f=this[_0x385a55(0x15d)]['db'][_0x385a55(0x204)](_0x622ae0);this['_committed']++;if(this[_0x385a55(0x2d9)][_0x385a55(0x2d3)](_0x4d1815[_0x385a55(0x299)]()-_0x2b7422)>0x100)this[_0x385a55(0x2d9)][_0x385a55(0x18f)]();if(this[_0x385a55(0x188)][_0x385a55(0x2d3)](_0x4d1815[_0x385a55(0x299)]())>0x800)this[_0x385a55(0x188)][_0x385a55(0x18f)]();return _0x5ac48f;}finally{this[_0x385a55(0x20a)]--;if(this[_0x385a55(0x1c0)][_0x385a55(0x2de)]&&this['_outstanding']<this['_highWater'])this['_bpWaiters'][_0x385a55(0x18f)]()();if(_0x36df58)_0x36df58[_0x385a55(0x294)]();}let _0x5c3c27=null;const _0x3c0114=()=>{const _0x5d341e=_0x385a55,_0x45f7eb=_0x622ae0();if(_0x45f7eb&&typeof _0x45f7eb[_0x5d341e(0x365)]===_0x5d341e(0x2c1)&&!_0x5c3c27){this[_0x5d341e(0x297)]++;let _0x2ce116;const _0x2792f1=new Promise(_0x51ad48=>_0x2ce116=_0x51ad48);this[_0x5d341e(0x1f7)]=_0x2792f1,_0x5c3c27=()=>{const _0x3ef668=_0x5d341e;if(this['_held']===_0x2792f1)this[_0x3ef668(0x1f7)]=null;_0x2ce116();};}return _0x45f7eb;};let _0x347395;try{_0x347395=this[_0x385a55(0x15d)]['db'][_0x385a55(0x172)](_0x3c0114);}catch(_0x580853){_0x347395=Promise[_0x385a55(0x320)](_0x580853);}(!_0x347395||typeof _0x347395[_0x385a55(0x365)]!==_0x385a55(0x2c1))&&(this[_0x385a55(0x2b1)]++,!this['_nestedWarned']&&(this['_nestedWarned']=!![],console[_0x385a55(0x39f)](_0x385a55(0x2eb)+(this[_0x385a55(0x15d)]?.[_0x385a55(0x37d)]??'?')+_0x385a55(0x17c))),_0x347395=Promise[_0x385a55(0x348)](_0x347395));const _0x358ef3=()=>{if(_0x5c3c27)_0x5c3c27();};_0x347395[_0x385a55(0x365)](_0x358ef3,_0x358ef3),this[_0x385a55(0x35b)][_0x385a55(0x273)](_0x347395),this['_enqueuedAt'][_0x385a55(0x1b7)](_0x347395,_0x2b7422);const _0xf5518f=()=>{const _0x41c24b=_0x385a55;this[_0x41c24b(0x35b)][_0x41c24b(0x21f)](_0x347395),this[_0x41c24b(0x337)][_0x41c24b(0x21f)](_0x347395),this[_0x41c24b(0x263)]++,this['_outstanding']--;this[_0x41c24b(0x1c0)][_0x41c24b(0x2de)]&&this[_0x41c24b(0x20a)]<this['_highWater']&&this[_0x41c24b(0x1c0)][_0x41c24b(0x18f)]()();if(this['_durs'][_0x41c24b(0x2d3)](_0x4d1815['now']()-_0x2b7422)>0x100)this['_durs']['shift']();if(this[_0x41c24b(0x188)][_0x41c24b(0x2d3)](_0x4d1815['now']())>0x800)this[_0x41c24b(0x188)][_0x41c24b(0x18f)]();};_0x347395['then'](_0xf5518f,_0xf5518f);try{return await _0x347395;}finally{if(_0x36df58)_0x36df58[_0x385a55(0x294)]();}}['status'](){const _0x4ff5f6=_0x12f62d,_0x7a66ab=_0x4d1815[_0x4ff5f6(0x299)]();let _0x130fb9=0x0;for(const _0x13ca84 of this[_0x4ff5f6(0x337)][_0x4ff5f6(0x397)]()){const _0xa4bd3f=_0x7a66ab-_0x13ca84;if(_0xa4bd3f>_0x130fb9)_0x130fb9=_0xa4bd3f;}let _0x5e13d1=0x0;for(let _0x5cf04b=this[_0x4ff5f6(0x188)]['length']-0x1;_0x5cf04b>=0x0;_0x5cf04b--){if(_0x7a66ab-this[_0x4ff5f6(0x188)][_0x5cf04b]>0x3e8)break;_0x5e13d1++;}let _0x13edba=0x0;if(this[_0x4ff5f6(0x2d9)][_0x4ff5f6(0x2de)]){const _0x3d86dc=[...this[_0x4ff5f6(0x2d9)]]['sort']((_0x3503fd,_0xf58499)=>_0x3503fd-_0xf58499);_0x13edba=_0x3d86dc[Math['min'](_0x3d86dc[_0x4ff5f6(0x2de)]-0x1,Math[_0x4ff5f6(0x1ef)](_0x3d86dc[_0x4ff5f6(0x2de)]*0.99))];}return{'depth':this[_0x4ff5f6(0x35b)][_0x4ff5f6(0x214)],'oldestPendingMs':Math[_0x4ff5f6(0x358)](_0x130fb9),'committed':this[_0x4ff5f6(0x263)],'commitsPerSec':_0x5e13d1,'commitP99Ms':Math[_0x4ff5f6(0x358)](_0x13edba),'parkedNow':this[_0x4ff5f6(0x1c0)]['length'],'parkedTotal':this['_bpParkedTotal'],'highWater':this['_highWater']};}[_0x12f62d(0x37c)](){const _0x43e389=_0x12f62d,_0x1d79e9=_0x4d1815[_0x43e389(0x299)]();return[...this[_0x43e389(0x337)][_0x43e389(0x397)]()]['map'](_0x118ff4=>Math[_0x43e389(0x358)](_0x1d79e9-_0x118ff4))[_0x43e389(0x245)]((_0x9cc4d5,_0x384fb2)=>_0x384fb2-_0x9cc4d5);}[_0x12f62d(0x16c)](){const _0x51ed6b=_0x12f62d;this[_0x51ed6b(0x17b)]=!![];for(const _0x3b0287 of this['_bpWaiters'][_0x51ed6b(0x2d6)](0x0))_0x3b0287();}async[_0x12f62d(0x386)](){const _0x5532e9=_0x12f62d;let _0x34e86f=0x0;while(this[_0x5532e9(0x35b)][_0x5532e9(0x214)]&&_0x34e86f++<0x3e8){await Promise[_0x5532e9(0x38c)]([...this[_0x5532e9(0x35b)]]);}}async[_0x12f62d(0x298)](_0x4b203b,_0x4e5d3f,_0x178827,_0x233938){const _0x4e5117=_0x12f62d;return this[_0x4e5117(0x1ba)](()=>{const _0x4f5613=_0x4e5117;if(_0x233938===undefined)_0x4b203b['putSync'](_0x4e5d3f,_0x178827);else _0x4b203b[_0x4f5613(0x271)](_0x4e5d3f,_0x178827,_0x233938);},_0x4e5117(0x1cc));}async['remove'](_0x39af9f,_0x19b364){const _0x2cc1b1=_0x12f62d;return this[_0x2cc1b1(0x1ba)](()=>_0x39af9f['removeSync'](_0x19b364),_0x2cc1b1(0x310));}}async function _0x4d71b5(_0x122fdb,_0xf957b5){const _0x345a79=_0x12f62d;if(_0xf957b5==null)_0xf957b5=Math[_0x345a79(0x346)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x27a518=_0x122fdb?.['flushed'];if(!_0x27a518||typeof _0x27a518['then']!=='function')return;await Promise['race']([Promise[_0x345a79(0x348)](_0x27a518)[_0x345a79(0x373)](()=>{}),new Promise(_0x5bf86c=>{const _0x5c2f84=_0x345a79,_0xb0b573=setTimeout(_0x5bf86c,_0xf957b5);if(_0xb0b573['unref'])_0xb0b573[_0x5c2f84(0x2d7)]();})]);}catch{}}function _0x1d6a2d(_0x407d10){const _0xac8a6b=_0x12f62d;if(_0x2bcc08)return Promise['resolve']();const _0x11fd36=_0x407d10?.[_0xac8a6b(0x2b2)];return _0x11fd36&&typeof _0x11fd36['then']==='function'?_0x11fd36:Promise[_0xac8a6b(0x348)]();}const _0x540dcc=Math[_0x12f62d(0x346)](0x1,Math['floor'](Number(process.env.UV_THREADPOOL_SIZE))||0x4),_0x5b3720=Math[_0x12f62d(0x346)](0x1,_0x540dcc-0x2);let _0x501b41=0x0;const _0x53587d=[];async function _0x4b08bc(_0x181cda){const _0x25566e=_0x12f62d;if(_0x501b41<_0x5b3720)_0x501b41++;else await new Promise(_0x26eb42=>_0x53587d[_0x25566e(0x2d3)](_0x26eb42));try{return await _0x181cda();}finally{const _0x284795=_0x53587d[_0x25566e(0x18f)]();if(_0x284795)_0x284795();else _0x501b41--;}}return okdbWriter[_0x12f62d(0x2a8)]=_0x3820d8,okdbWriter[_0x12f62d(0x2a8)][_0x12f62d(0x344)]=_0x4b08bc,okdbWriter[_0x12f62d(0x2a8)]['MAX_POOL_HOLDS']=_0x5b3720,okdbWriter[_0x12f62d(0x2a8)][_0x12f62d(0x15f)]=_0x4d71b5,okdbWriter[_0x12f62d(0x2a8)][_0x12f62d(0x2b2)]=_0x1d6a2d,okdbWriter[_0x12f62d(0x2a8)]['SYNC_COMMITS']=_0x2bcc08,okdbWriter[_0x12f62d(0x2a8)];}var okdbLock,hasRequiredOkdbLock;function _0x1004(){const _0x56a0d9=['_openEnvLazy','reportThreadStats','size','9310hQBcWB','_singletonLock','external','namespace','processKey','index:drop','getCmd','ppid','removeNode','dedupeMax','delete','_cursors','system:clock_change','registerType','_kind','_started','resetFts','node/','closing','workers','label','ready','type:drop','rowKey','default','_report','_desiredOverlay','disable','instances','filter','enable','reduce','_caps','heartbeatMs','_heartbeatInFlight','_dedupeMax','listNodes','listening','async','4271141gsUisS','_clusterWorkerAttached','_baselines','\x20\x20env=','_collectSingletonClaims','deregisterSelf','participate','exit','process\x20','sort','view','_key','memoryUsage','map','cluster','_isReader','null','_enableChangelog','~processes','setupPrimary','halted','_adminRelay','setOwnMeta','number','dead','\x20worker\x20slot=','_lastCpuPct','_heartbeatTimer','ephemeral','[okdb-cluster]\x20worker\x20pid=','okdb-writer:\x20env\x20closing\x20—\x20retry','onWindow','ORPHAN\x20(env-closed\x20write)','_singletonLocks','includes','listDesired','error:\x20','system:env_release','_clusterOrphanWatch','_committed','_pendingLocal','start','decommission','1336536iNYuMo','claimGated','_transactionOnce','_startAdmission','resetting','rows=','isEnabled','closed','_drainOne','nodeKey','putSync',');\x20','add','_nodeDb','mode','unclaimed','bus:drain','putNode','inst:','_rootDb','toFixed','setLogger','1634435TruTOV','ttlMs','license:removed','state','fanout','force','node:perf_hooks','decommissioned','msg','_buildOwnRow','isConnected','get','single','some','_statusEnv','clusterStatusView','ms\x20p99=','updateSupervisedChildStats','INDEX_RESET','FTS_RESET','repeat','list',')\x20exited\x20','afterWrite','636xBPUzV','percentile','_heldTotal','put','now','slot','_wantDb','startedAt','mkdirSync','registry-publish','_getType','_ownMeta','_lastPublishAt','_isWriter','schema:drop','registerIndex','type:registered','ms\x20activeWriters=','replace','exports','ingest','commit','processor:resumed','maxExtra','fast','pushEphemeral','nodesView','1369299FFCcWy','_nestedTotal','committed','sync:apply','emit','_selfKey','_log','path','~processes:desired','load','inspect','depth','view:progress','role','host','\x20pid=','parkedNow','function','removeSync','clear','getRange','maxMs','entry','_changefeed','_versionSkewWarned','threads','ITEM_CREATE','indexOf','procmode/','updatedAt','enabled','ref:violation','_children','_flushTimer','__vocab/version','push','singletonClaims','primary','splice','unref','options','_durs','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','_sampleOwnStats','oldestPendingMs','\x20ipc\x20error:\x20','length','\x20(durable\x20desired-state)','running','_lastCpuAt','\x20===','bus:poke','draining','system:type_drop','~processes:cmd','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','stringify','\x20phase=','_activateProcesses','okdb-writer[','_windowCbs','processingSig','listen','_refreshDesiredSnapshot','_dedupeKey','11241NbmODQ','_rowKey','fromEntries','system:ready','platform','\x20@\x20','prependListener','ttl:clear','slice','cpuPct','SYSTEM_STOPPED','ms\x20on\x20env=','error','busy','\x20in\x20','note','http-server','offWindow','resetReadTxn','split','_groupByProcess','freeze','_scheduleFlush','standalone','_wantDbOf','selfKey','item:update','2.7.1','_db','feed:','bumpCmd','raw-remove','acquiredAt','execArgv','stopped','okdb','cpus','recordWrite','trim','cursorKey','string','_onTick','startsWith','remove','processing','SYSTEM_POKE','registerFts','reject','supervisorKey','quantum','unhandledRejection','dropping','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','registry\x20publish\x20failing:\x20','_handleInProcess','__okdbSlot','ttl:set','loop-lag','_threadStats','FTS_DROP','building','_clusterOnMessage','dropFts','admitted','deaths','SIGKILL','_buildProcessingFacet','clearThreadStats','fn-runner','.log','_enqueuedAt','test','online','_nodeDbFor',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','_admissionStarted','./okdb','embedded','SYSTEM_PROC','appendFileSync','kill','entries','consecutiveFailures','withPoolHold','_systemEnv','max','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','resolve','ref:violation_resolved','openDB','isDead','_lockDbOf','loop-lag\x20','\x20died\x20','unique:violation_resolved','node:events','_handlePoke','_maybePublish','_publishFailWarned','next','license:invalid','getClock',',\x20signal=','round','ms\x20(attempt\x20','[okdb-cluster]\x20slot=','_inflight','--test','processor:error','copy','\x20while\x20this\x20process\x20runs\x20','_draining','children','_writer','connected','once','then','1ofN:','stop','processor:retry','write','\x20statusEnv=','resetIndex','_startedAt','_released','_publishNow','bus:proc','okdb-http-worker-child.js','8qauRBg','process','catch','type','value','processes','license:activated','_putRowAsync','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','code','5020SzlbCm','inflightAgesMs','name','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','\x20writer{depth=','processors','_drain','started','tierList','__esModule','_supervisorKey','drain','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','\x20HTTP\x20server(s)\x20on\x20port\x20','_markSeen','stats','abs','allSettled','caps','prototype','data','respawnTimer','dumpedAt','expiresAt','_removeRowAsync','processor:ready','item:create','reset','values','[okdb-cluster]\x20respawning\x20worker\x20slot=','true','\x20oldestPendingMs=','uncaughtException','(worst\x20','item:remove','reap','warn','createEnvironment','listenAddr','_seen','uptime','holder','call','_buckets','ESRCH','compact','attachFeed','_nodeDbCache','env','(code=','flushLmdb','heldBy','txn:rollback','stack','randomUUID','_onPending','\x20drainAge=','_flushDebounce','object','noteListenAddr','rss','ms\x20mean=','engines','markClosed','_coordinator','_onPoke','instanceId','http\x20worker\x20child\x20failed:\x20','\x20forked\x20','childTransaction','fork','_role','_lastCpuUsage','system:bus_state_change','has','_migrateVocab','all','_highWater','_closed',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','_admissionTimer','_listenAddr','hostname','ms\x20busy=','sync','system:stopped','treeView','_instanceId','_cmd','_hbTimer','_nodeDead','_done','cluster:','_wantDbHandle','ITEM_PENDING','attach','_quantum','\x20worker(s)\x20remaining','shift','registry\x20heartbeat\x20skipped\x20(writer=','license:added','decommissioning','isPrimary','_processStartedAt','system:poke','cpuWindowMs','\x0a===\x20OKDB_DIAG\x20','_onItem','events','node','system:proc','_servingEngines','_holderDead','log','seq','ITEM_REMOVE','listAll','--eval','worker','version','register','_envs','epoch','INDEX_REGISTERED','indexType','cli','envsOpen','_ensureDesired','\x20parkedNow=','\x20sync','bus:type_drop','mean','SWAP','hard-killed','_acquiredAt','REMOVE','find','status','set','compaction','assign','transaction','txn:start','INDEX_PROGRESS','liveThreadStats','_collectWriterFacet','processingStatusView','_bpWaiters','cpuUsage','release','beforeWrite','message','env:removed','_bpParkedTotal','claims','join','setDesired','none','kind','raw-put','addSupervisedChild','processor:progress','\x20\x20(no\x20env\x20draining)','publishChildRow','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','INDEX_READY','slotKey','_onProcEvent','processor:paused','okdb-diag.','detachConsole','_handlePending','--inspect','--print','_onStop','_timer','disconnect','parse','_pending','tryAcquire','schema:set','fts:reset','_assertUsable','http','close','_desired','_buildChildRow',':want','_putRowSync','hasDesired','isActive','processorId','stderr','isHeld','floor','pid','creating','system','meta','_lastCpuWindowMs','isWanted','heapUsed','_held','keys','count','heapTotal','ENV_CLOSING_RETRY','toISOString','_startHeartbeat','ITEM_UPDATE','CHANGEFEED_QUANTUM','_lock','publishOwnRow','_lockDb','removeSupervisedChild','transactionSync','env:opened','cluster-wide','index:registered','user','processor','_outstanding','lifecycle','_rawDb','send','\x20│\x20','260406YtlWwU','off','ttl:expired'];_0x1004=function(){return _0x56a0d9;};return _0x1004();}function requireOkdbLock(){const _0x4495ee=_0x727d37;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x47cc92=require$$0$3,{clampTimerDelay:_0x36575c}=requireOkdbTimers(),{SYNC_COMMITS:_0x3b1d5c}=requireOkdbWriter(),_0x36801a='~lock';class _0x4ff552{constructor(_0x35318a,_0x545d89,_0x720fb6){const _0x28aca9=_0x1c29;this['_lock']=_0x35318a,this[_0x28aca9(0x247)]=_0x545d89,this[_0x28aca9(0x1b3)]=_0x720fb6,this[_0x28aca9(0x36d)]=![],this[_0x28aca9(0x257)]=null,this[_0x28aca9(0x237)]=null;}[_0x4495ee(0x1ee)](){const _0x508d48=_0x4495ee;if(this[_0x508d48(0x36d)])return![];try{const _0x4c904c=this[_0x508d48(0x200)][_0x508d48(0x30d)]()[_0x508d48(0x288)](this['_key']);if(!_0x4c904c||_0x4c904c['acquiredAt']!==this[_0x508d48(0x1b3)])return![];const _0x5d9604=_0x4c904c[_0x508d48(0x2cd)]??_0x4c904c[_0x508d48(0x311)];if(_0x5d9604+_0x4c904c['ttlMs']<Date[_0x508d48(0x299)]())return![];return!![];}catch{return!this[_0x508d48(0x36d)];}}[_0x4495ee(0x3a4)](){const _0x3ec1de=_0x4495ee;if(this[_0x3ec1de(0x36d)])return null;try{return this[_0x3ec1de(0x200)]['_db']()[_0x3ec1de(0x288)](this[_0x3ec1de(0x247)])??null;}catch{return null;}}async['extend'](_0x217c03){const _0x2d46ad=_0x4495ee;if(this['_released'])return;try{if(this['_lock'][_0x2d46ad(0x17b)]())return;const _0x578b68=this[_0x2d46ad(0x200)][_0x2d46ad(0x30d)]()[_0x2d46ad(0x288)](this['_key']);if(!_0x578b68||_0x578b68[_0x2d46ad(0x311)]!==this[_0x2d46ad(0x1b3)])return;if(_0x3b1d5c)this[_0x2d46ad(0x200)][_0x2d46ad(0x30d)]()[_0x2d46ad(0x271)](this[_0x2d46ad(0x247)],{..._0x578b68,'ttlMs':_0x578b68[_0x2d46ad(0x27e)]+_0x217c03});else await this['_lock'][_0x2d46ad(0x30d)]()[_0x2d46ad(0x298)](this[_0x2d46ad(0x247)],{..._0x578b68,'ttlMs':_0x578b68[_0x2d46ad(0x27e)]+_0x217c03});}catch{}}async[_0x4495ee(0x1c2)](){const _0x4f9390=_0x4495ee;if(this[_0x4f9390(0x36d)])return;if(this[_0x4f9390(0x237)])try{await this[_0x4f9390(0x237)];}catch{}clearInterval(this[_0x4f9390(0x257)]),this[_0x4f9390(0x257)]=null,this['_released']=!![];try{if(this[_0x4f9390(0x200)][_0x4f9390(0x17b)]())return;const _0x573a0f=this[_0x4f9390(0x200)][_0x4f9390(0x30d)]()['get'](this[_0x4f9390(0x247)]);if(_0x573a0f&&_0x573a0f[_0x4f9390(0x311)]===this[_0x4f9390(0x1b3)]){if(_0x3b1d5c)this[_0x4f9390(0x200)][_0x4f9390(0x30d)]()[_0x4f9390(0x2c2)](this[_0x4f9390(0x247)]);else await this[_0x4f9390(0x200)]['_db']()[_0x4f9390(0x31c)](this[_0x4f9390(0x247)]);}}catch{}}['_startHeartbeat'](_0x7ab775,_0x506bf2){const _0x5d8ce0=_0x4495ee,_0x292d68=_0x36575c(_0x506bf2??Math[_0x5d8ce0(0x1ef)](_0x7ab775/0x3));this[_0x5d8ce0(0x257)]=setInterval(()=>{const _0x13ebb5=_0x5d8ce0;if(this[_0x13ebb5(0x36d)])return;this[_0x13ebb5(0x237)]=((async()=>{const _0x19eef0=_0x13ebb5;try{if(this['_lock']['_closed']())return;const _0x5dad95=this['_lock'][_0x19eef0(0x30d)]()['get'](this['_key']);if(!_0x5dad95||_0x5dad95[_0x19eef0(0x311)]!==this[_0x19eef0(0x1b3)]){this[_0x19eef0(0x36d)]=!![],clearInterval(this[_0x19eef0(0x257)]),this[_0x19eef0(0x257)]=null;return;}if(_0x3b1d5c)this[_0x19eef0(0x200)]['_db']()['putSync'](this['_key'],{..._0x5dad95,'updatedAt':Date[_0x19eef0(0x299)]()});else await this[_0x19eef0(0x200)][_0x19eef0(0x30d)]()['put'](this['_key'],{..._0x5dad95,'updatedAt':Date[_0x19eef0(0x299)]()});}catch{}this[_0x19eef0(0x237)]=null;})());},_0x292d68);if(this[_0x5d8ce0(0x257)][_0x5d8ce0(0x2d7)])this[_0x5d8ce0(0x257)][_0x5d8ce0(0x2d7)]();}}class _0x32a428{constructor(_0xf5ecd4,{namespace:_0x56489a,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x4d7bab=_0x4495ee;this[_0x4d7bab(0x20c)]=_0xf5ecd4,this[_0x4d7bab(0x218)]=_0x56489a,this['ttlMs']=ttlMs,this[_0x4d7bab(0x236)]=heartbeatMs,this[_0x4d7bab(0x202)]=null;}[_0x4495ee(0x30d)](){const _0x291c6d=_0x4495ee;return this[_0x291c6d(0x1e3)](),(!this['_lockDb']||this[_0x291c6d(0x34c)]!==this[_0x291c6d(0x20c)])&&(this[_0x291c6d(0x202)]=this[_0x291c6d(0x20c)][_0x291c6d(0x34a)](_0x36801a,{'dupSort':![]}),this[_0x291c6d(0x34c)]=this[_0x291c6d(0x20c)]),this[_0x291c6d(0x202)];}['_wantDb'](){const _0x2e7baa=_0x4495ee;return this[_0x2e7baa(0x1e3)](),(!this[_0x2e7baa(0x18a)]||this[_0x2e7baa(0x309)]!==this[_0x2e7baa(0x20c)])&&(this[_0x2e7baa(0x18a)]=this[_0x2e7baa(0x20c)]['openDB'](_0x36801a+_0x2e7baa(0x1e8),{'dupSort':![]}),this['_wantDbOf']=this[_0x2e7baa(0x20c)]),this[_0x2e7baa(0x18a)];}[_0x4495ee(0x17b)](){const _0x321136=_0x4495ee,_0x46cdc9=this['_rawDb']?.['status'];return _0x46cdc9===_0x321136(0x227)||_0x46cdc9===_0x321136(0x26e);}[_0x4495ee(0x1e3)](){const _0x2d49da=_0x4495ee;if(this[_0x2d49da(0x17b)]())throw new Error('okdb-lock:\x20env\x20closed');}['_key'](_0x4e7bc3){const _0x5ce2e4=_0x4495ee;return this[_0x5ce2e4(0x218)]+':'+_0x4e7bc3;}['signalWant'](_0x260c9f){const _0x174b0e=_0x4495ee;try{if(this[_0x174b0e(0x17b)]())return;_0x3b1d5c?this[_0x174b0e(0x29b)]()[_0x174b0e(0x271)](this[_0x174b0e(0x247)](_0x260c9f),Date[_0x174b0e(0x299)]()):this[_0x174b0e(0x29b)]()[_0x174b0e(0x298)](this[_0x174b0e(0x247)](_0x260c9f),Date[_0x174b0e(0x299)]())?.[_0x174b0e(0x373)]?.(()=>{});}catch{}}[_0x4495ee(0x1f5)](_0x5817c0,_0x17a53a=0x3e8){const _0x33e5f0=_0x4495ee;try{const _0x20e408=this[_0x33e5f0(0x29b)]()[_0x33e5f0(0x288)](this[_0x33e5f0(0x247)](_0x5817c0));return typeof _0x20e408===_0x33e5f0(0x253)&&Date[_0x33e5f0(0x299)]()-_0x20e408<_0x17a53a;}catch{return![];}}['_isStale'](_0x261ecb){const _0x1668d2=_0x4495ee,_0x35cc4e=_0x261ecb['updatedAt']??_0x261ecb[_0x1668d2(0x311)];return _0x35cc4e+_0x261ecb[_0x1668d2(0x27e)]<Date[_0x1668d2(0x299)]();}static[_0x4495ee(0x19d)](_0x3a20cd){const _0x1040bb=_0x4495ee,_0x31ce39=_0x3a20cd?.[_0x1040bb(0x3a4)];if(!_0x31ce39||typeof _0x31ce39['pid']!==_0x1040bb(0x253))return![];if(_0x31ce39[_0x1040bb(0x17f)]!==_0x47cc92[_0x1040bb(0x17f)]())return![];if(_0x31ce39['pid']===process[_0x1040bb(0x1f0)])return![];try{return process['kill'](_0x31ce39[_0x1040bb(0x1f0)],0x0),![];}catch(_0x10aa00){return _0x10aa00[_0x1040bb(0x37a)]===_0x1040bb(0x3a7);}}async[_0x4495ee(0x1e0)](_0x451d7e,_0x564eb5={},_0x298beb={}){const _0x362b24=_0x4495ee,_0x59ac85=this[_0x362b24(0x247)](_0x451d7e),_0x1f6a8d=_0x298beb[_0x362b24(0x27e)]??this[_0x362b24(0x27e)],_0x59c214=Date[_0x362b24(0x299)](),_0x27d58f={'holder':{'pid':process[_0x362b24(0x1f0)],'hostname':_0x47cc92[_0x362b24(0x17f)](),..._0x564eb5},'acquiredAt':_0x59c214,'updatedAt':_0x59c214,'ttlMs':_0x1f6a8d};let _0xa8c337=![],_0x15a141=null;if(this[_0x362b24(0x17b)]())return{'acquired':![],'handle':null,'current':null};try{const _0x4ceeac=()=>{const _0x5966d3=_0x362b24,_0x42396f=this['_db']()[_0x5966d3(0x288)](_0x59ac85);if(_0x42396f&&!this['_isStale'](_0x42396f)&&!_0x32a428[_0x5966d3(0x19d)](_0x42396f)){const _0x49b416=_0x564eb5[_0x5966d3(0x1ec)]!=null&&_0x42396f[_0x5966d3(0x3a4)]['pid']===process[_0x5966d3(0x1f0)]&&_0x42396f[_0x5966d3(0x3a4)][_0x5966d3(0x1ec)]===_0x564eb5[_0x5966d3(0x1ec)];if(!_0x49b416){_0xa8c337=![],_0x15a141=_0x42396f;return;}_0x27d58f[_0x5966d3(0x311)]<=_0x42396f[_0x5966d3(0x311)]&&(_0x27d58f['acquiredAt']=_0x42396f[_0x5966d3(0x311)]+0x1,_0x27d58f[_0x5966d3(0x2cd)]=_0x27d58f[_0x5966d3(0x311)]);}this[_0x5966d3(0x30d)]()['put'](_0x59ac85,_0x27d58f),_0xa8c337=!![],_0x15a141=_0x27d58f;};if(_0x3b1d5c)this[_0x362b24(0x30d)]()['transactionSync'](_0x4ceeac);else await this['_db']()['childTransaction'](_0x4ceeac);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0xa8c337)return{'acquired':![],'handle':null,'current':_0x15a141};const _0x41cff5=new _0x4ff552(this,_0x59ac85,_0x27d58f[_0x362b24(0x311)]);return _0x41cff5[_0x362b24(0x1fd)](_0x1f6a8d,this[_0x362b24(0x236)]),{'acquired':!![],'handle':_0x41cff5,'current':_0x15a141};}[_0x4495ee(0x2ba)](_0x1bbfcc){const _0x438778=_0x4495ee;try{return this[_0x438778(0x30d)]()[_0x438778(0x288)](this[_0x438778(0x247)](_0x1bbfcc))??null;}catch{return null;}}[_0x4495ee(0x292)](){const _0x56d599=_0x4495ee,_0x553c74=this['namespace']+':',_0x1a768f=[];try{for(const {key:_0x3cb229,value:_0x13a2cd}of this['_db']()['getRange']({'start':_0x553c74,'end':_0x553c74+'\xff'})){typeof _0x3cb229==='string'&&_0x3cb229[_0x56d599(0x31b)](_0x553c74)&&_0x1a768f['push']({'id':_0x3cb229['slice'](_0x553c74[_0x56d599(0x2de)]),'entry':_0x13a2cd});}}catch{}return _0x1a768f;}static[_0x4495ee(0x1a1)](_0xeb7514){const _0x2ed8ac=_0x4495ee,_0x182b24=[];try{const _0x47f9da=_0xeb7514[_0x2ed8ac(0x34a)](_0x36801a,{'dupSort':![]});for(const {key:_0x13c4b9,value:_0x5c01b9}of _0x47f9da[_0x2ed8ac(0x2c4)]({})){if(typeof _0x13c4b9!==_0x2ed8ac(0x319))continue;const _0x5cc99d=_0x13c4b9[_0x2ed8ac(0x2cb)](':');if(_0x5cc99d<0x1)continue;_0x182b24[_0x2ed8ac(0x2d3)]({'namespace':_0x13c4b9['slice'](0x0,_0x5cc99d),'id':_0x13c4b9['slice'](_0x5cc99d+0x1),'entry':_0x5c01b9});}}catch{}return _0x182b24;}}return okdbLock={'OKDBLock':_0x32a428},okdbLock;}var version=_0x727d37(0x30c),require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x3a913f=_0x727d37;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x349a6f=require$$0$3,_0x16f5de=require$$1$1,_0xa0313a=require$$2,{LOOP:_0x241ad9}=requireOkdbLoopMonitor(),{OKDBLock:_0x510465}=requireOkdbLock(),{SYNC_COMMITS:_0x3a967c}=requireOkdbWriter(),_0x407848=_0x3a913f(0x24e),_0x50b9c2=_0x3a913f(0x19a),_0x6971f9=_0x3a913f(0x2b8),_0x4c49a5=_0x3a913f(0x2e6),_0x275e6c=(_0x251e9e,_0x338d15)=>_0x251e9e+':'+_0x338d15,_0x594c4c=(_0x3c66ad,_0x4bdbd3)=>_0x3c66ad+'::'+_0x4bdbd3,_0x3f7540=(_0x278076,_0x5e3782)=>_0x278076+'/'+_0x5e3782,_0x3fc114=(_0x324066,_0x564715)=>_0x324066+'#'+_0x564715,_0x356415=_0x24c53b=>{const _0x3fa2c1=_0x3a913f;if(_0x24c53b?.[_0x3fa2c1(0x219)])return _0x24c53b[_0x3fa2c1(0x219)];const _0x3fe6a5=_0x24c53b?.[_0x3fa2c1(0x270)];return typeof _0x3fe6a5===_0x3fa2c1(0x319)&&_0x3fe6a5[_0x3fa2c1(0x25e)]('#')?_0x3fe6a5[_0x3fa2c1(0x2f9)](0x0,_0x3fe6a5[_0x3fa2c1(0x2cb)]('#')):_0x3fe6a5;},_0x2bca3e=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x5642f5=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x515199=_0x2bca3e*0x3,_0x59d874=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x3a913f(0x346)](0x927c0,_0x515199*0x14),_0x26526e=[_0x3a913f(0x1ce),'processor:ready','processor:retry',_0x3a913f(0x35d),_0x3a913f(0x1d5),_0x3a913f(0x2ab)];let _0x1a320c=null;function _0x268ea7(){const _0x524d30=_0x3a913f;if(_0x1a320c==null)_0x1a320c=Math[_0x524d30(0x358)]((Date[_0x524d30(0x299)]()-process[_0x524d30(0x3a3)]()*0x3e8)/0x3e8)*0x3e8;return _0x1a320c;}function _0xea19e5(_0xee0dc){const _0x4267d3=_0x3a913f;if(process.env.OKDB_PROCESS_KILL===_0x4267d3(0x210))return![];if(_0xee0dc?.[_0x4267d3(0x2d8)]?.[_0x4267d3(0x376)]&&typeof _0xee0dc['options']['processes']===_0x4267d3(0x167)&&_0xee0dc[_0x4267d3(0x2d8)][_0x4267d3(0x376)][_0x4267d3(0x341)]===![])return![];return!![];}function _0x48a635(_0x26a2e4,_0x4c89e6){const _0x245da7=_0x3a913f,_0xd5c6df=!!_0x4c89e6?.['processors'];switch(_0x26a2e4){case _0x245da7(0x2d5):return{'controllable':_0xd5c6df,'decommissionable':![],'killable':!![],'killConfirm':_0x245da7(0x206)};case _0x245da7(0x1aa):case'standalone':return{'controllable':_0xd5c6df,'decommissionable':![],'killable':!![],'killConfirm':'confirm'};case _0x245da7(0x33e):return{'controllable':![],'decommissionable':![],'killable':![]};case _0x245da7(0x301):case'queue-worker':case _0x245da7(0x335):case _0x245da7(0x1a3):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x245da7(0x282)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x392c79{constructor(_0xb8728){const _0x4eca8b=_0x3a913f;this[_0x4eca8b(0x314)]=_0xb8728,this[_0x4eca8b(0x28b)]=null,this[_0x4eca8b(0x1e6)]=null,this['_desiredOverlay']=new Map(),this[_0x4eca8b(0x185)]=null,this[_0x4eca8b(0x2a2)]=![],this[_0x4eca8b(0x24b)]=![],this[_0x4eca8b(0x194)]=_0x268ea7(),this['_selfKey']=_0x275e6c(process['pid'],this[_0x4eca8b(0x194)]),this[_0x4eca8b(0x184)]=_0xa0313a[_0x4eca8b(0x163)]()[_0x4eca8b(0x2f9)](0x0,0x8),this[_0x4eca8b(0x2f2)]=_0x3fc114(this[_0x4eca8b(0x2b5)],this[_0x4eca8b(0x184)]),this[_0x4eca8b(0x36c)]=Date[_0x4eca8b(0x299)](),this[_0x4eca8b(0x223)]=null,this[_0x4eca8b(0x385)]=null,this['_listenAddr']=null,this[_0x4eca8b(0x186)]=null,this[_0x4eca8b(0x1d4)]=null,this['_onTick']=null,this[_0x4eca8b(0x2a1)]=0x0,this['_ownMeta']={},this[_0x4eca8b(0x2d0)]=new Map(),this['_lastCpuUsage']=process[_0x4eca8b(0x1c1)](),this[_0x4eca8b(0x2e1)]=Date[_0x4eca8b(0x299)](),this[_0x4eca8b(0x256)]=0x0,this['_threadStats']=new Map();}get[_0x3a913f(0x30a)](){const _0x54f99f=_0x3a913f;return this[_0x54f99f(0x2b5)];}get[_0x3a913f(0x22c)](){const _0x34d626=_0x3a913f;return this[_0x34d626(0x2f2)];}[_0x3a913f(0x235)](_0x3e226b,_0x4906d0){const _0x553a4c=_0x3a913f,_0x548f94=_0x48a635(_0x3e226b,_0x4906d0);if(_0x548f94['killable']&&!_0xea19e5(this[_0x553a4c(0x314)]))return{..._0x548f94,'killable':![],'killConfirm':undefined};return _0x548f94;}[_0x3a913f(0x1eb)](){return!!this['_statusEnv'];}[_0x3a913f(0x252)](_0x4dc54b){const _0x2ab4f8=_0x3a913f;Object[_0x2ab4f8(0x1b9)](this['_ownMeta'],_0x4dc54b||{});}[_0x3a913f(0x168)](_0xbaf869){const _0x1fd4d0=_0x3a913f;if(_0xbaf869)this[_0x1fd4d0(0x17e)]=_0xbaf869;}[_0x3a913f(0x1a5)](_0x269bc7={}){const _0x4f9119=_0x3a913f;return this[_0x4f9119(0x314)][_0x4f9119(0x2ea)](_0x269bc7);}[_0x3a913f(0x1bf)](){const _0x44063f=_0x3a913f,_0x322411={};let _0x1ab3b9=0x0,_0x5d6535=0x0;const _0x1558fb=new Set();for(const _0x4793f0 of this[_0x44063f(0x239)]()){_0x5d6535++;const _0x179b32=_0x4793f0[_0x44063f(0x31d)];if(!_0x179b32)continue;if(_0x179b32[_0x44063f(0x242)])_0x1ab3b9++;for(const _0x17821c of _0x179b32[_0x44063f(0x380)]||[]){if(![_0x44063f(0x289),'fanout'][_0x44063f(0x25e)](_0x17821c[_0x44063f(0x275)]))continue;(_0x17821c[_0x44063f(0x280)]===_0x44063f(0x339)||_0x17821c['state']===_0x44063f(0x32d))&&_0x17821c[_0x44063f(0x318)]&&_0x1558fb[_0x44063f(0x273)]((_0x17821c[_0x44063f(0x15d)]||'default')+':'+_0x17821c[_0x44063f(0x318)]);const _0x2328aa=_0x17821c['env']||_0x44063f(0x22d);(_0x322411[_0x2328aa]||=[])['push']({..._0x17821c,'env':_0x2328aa,'owner':{'pid':_0x4793f0['pid']??null,'kind':_0x4793f0['kind']??null}});}}for(const [_0x4e5f05,_0x43468e]of Object[_0x44063f(0x342)](_0x322411)){for(const _0x557419 of _0x43468e){if(_0x557419[_0x44063f(0x275)]===_0x44063f(0x289)&&!_0x557419[_0x44063f(0x268)]){const _0x416459=_0x4e5f05+':'+(_0x557419[_0x44063f(0x318)]??'');if(!_0x1558fb[_0x44063f(0x177)](_0x416459))_0x557419[_0x44063f(0x276)]=!![];}}}return{'envs':_0x322411,'policy':null,'participation':{'participating':_0x1ab3b9,'total':_0x5d6535},'source':_0x44063f(0x228)};}['processorsView'](){const _0x40fbde=_0x3a913f,_0x5f16e1=_0x5064aa=>{const _0x579173=_0x1c29;if(_0x5064aa[_0x579173(0x280)]===_0x579173(0x339)||_0x5064aa[_0x579173(0x280)]===_0x579173(0x32d)||_0x5064aa['state']===_0x579173(0x2fd))return 0x3;if(_0x5064aa[_0x579173(0x268)])return 0x1;return 0x2;},_0x6cee16=new Map();for(const _0x285e of this[_0x40fbde(0x239)]()){for(const _0x42ed61 of _0x285e[_0x40fbde(0x31d)]?.[_0x40fbde(0x380)]||[]){const _0x66c78c={..._0x42ed61,'owner':{'pid':_0x285e[_0x40fbde(0x1f0)]??null,'kind':_0x285e[_0x40fbde(0x1cb)]??null,'host':_0x285e['host']??null}},_0x37d8db=_0x42ed61[_0x40fbde(0x275)]==='single'?_0x40fbde(0x366)+(_0x42ed61[_0x40fbde(0x15d)]??'')+'::'+(_0x42ed61[_0x40fbde(0x318)]??_0x42ed61[_0x40fbde(0x374)]??_0x42ed61['id']):_0x40fbde(0x279)+(_0x285e['nodeKey']??_0x285e[_0x40fbde(0x219)]??'')+'::'+(_0x42ed61[_0x40fbde(0x15d)]??'')+'::'+_0x42ed61['id'],_0x239e38=_0x6cee16['get'](_0x37d8db);if(!_0x239e38||_0x5f16e1(_0x66c78c)>_0x5f16e1(_0x239e38))_0x6cee16[_0x40fbde(0x1b7)](_0x37d8db,_0x66c78c);}}return[..._0x6cee16[_0x40fbde(0x397)]()];}[_0x3a913f(0x28c)](){const _0x344f00=_0x3a913f,_0x3b5487=Date[_0x344f00(0x299)](),_0x5b23c0=this[_0x344f00(0x239)](),_0xad7a57=_0x89e240=>Math[_0x344f00(0x346)](0x0,Math[_0x344f00(0x358)]((_0x3b5487-(_0x89e240['startedAt']||_0x3b5487))/0x3e8)),_0x325638=_0x5b23c0[_0x344f00(0x1b5)](_0x40973b=>_0x40973b[_0x344f00(0x1cb)]===_0x344f00(0x2d5)),_0x487079=_0x5b23c0['filter'](_0x127c63=>_0x127c63[_0x344f00(0x1cb)]===_0x344f00(0x301));if(_0x325638||_0x487079[_0x344f00(0x2de)])return{'primary':_0x325638?{'pid':_0x325638[_0x344f00(0x1f0)],'uptime':_0xad7a57(_0x325638)}:null,'workers':_0x487079[_0x344f00(0x249)](_0x3771f5=>({'pid':_0x3771f5[_0x344f00(0x1f0)],'uptime':_0xad7a57(_0x3771f5)})),'workersConfigured':_0x325638?.['meta']?.['workersConfigured']??_0x487079[_0x344f00(0x2de)],'mode':_0x344f00(0x24a)};const _0x5cc90e=_0x5b23c0['find'](_0x10481d=>_0x10481d['kind']===_0x344f00(0x1aa)||_0x10481d[_0x344f00(0x1cb)]===_0x344f00(0x308)||_0x10481d[_0x344f00(0x1cb)]===_0x344f00(0x33e)),_0x6a5ca2=_0x5cc90e?{'pid':_0x5cc90e['pid'],'uptime':_0xad7a57(_0x5cc90e)}:{'pid':process[_0x344f00(0x1f0)],'uptime':Math[_0x344f00(0x346)](0x0,Math[_0x344f00(0x358)](process['uptime']()))};return{'primary':_0x6a5ca2,'workers':[_0x6a5ca2],'workersConfigured':0x1,'mode':_0x344f00(0x289)};}[_0x3a913f(0x2af)](){const _0x92baa8=_0x3a913f;return this[_0x92baa8(0x305)]();}[_0x3a913f(0x183)](){const _0x5ce663=_0x3a913f,_0x5ecf3c=new Map();for(const _0x1be6dc of this[_0x5ce663(0x305)]())_0x5ecf3c[_0x5ce663(0x1b7)](_0x1be6dc[_0x5ce663(0x219)],{..._0x1be6dc,'children':[]});const _0x1917eb=[];for(const _0x58e8cd of _0x5ecf3c['values']()){const _0x1cfdbf=_0x58e8cd[_0x5ce663(0x321)]?_0x5ecf3c[_0x5ce663(0x288)](_0x58e8cd[_0x5ce663(0x321)]):null;if(_0x1cfdbf&&_0x1cfdbf!==_0x58e8cd)_0x1cfdbf['children'][_0x5ce663(0x2d3)](_0x58e8cd);else _0x1917eb[_0x5ce663(0x2d3)](_0x58e8cd);}const _0x536075=(_0x2ddef6,_0x2d1467)=>_0x2ddef6[_0x5ce663(0x1cb)]===_0x2d1467[_0x5ce663(0x1cb)]?(_0x2ddef6[_0x5ce663(0x1f0)]||0x0)-(_0x2d1467['pid']||0x0):(_0x2ddef6[_0x5ce663(0x1cb)]??'')<(_0x2d1467['kind']??'')?-0x1:0x1,_0x36042c=_0x1c6cd9=>{const _0x3679e2=_0x5ce663;_0x1c6cd9[_0x3679e2(0x245)](_0x536075);for(const _0x5f03e5 of _0x1c6cd9)if(_0x5f03e5[_0x3679e2(0x361)][_0x3679e2(0x2de)])_0x36042c(_0x5f03e5[_0x3679e2(0x361)]);};return _0x36042c(_0x1917eb),_0x1917eb;}['getProcess'](_0x5f0204){const _0x597ff8=_0x3a913f;return this[_0x597ff8(0x305)]()[_0x597ff8(0x1b5)](_0x463c33=>_0x463c33[_0x597ff8(0x219)]===_0x5f0204)??null;}[_0x3a913f(0x305)](_0xfbd94c=Date[_0x3a913f(0x299)]()){const _0x59778f=_0x3a913f,_0x39e8d0=new Map();for(const _0x12c52a of this['listNodes']()){const _0x1be954=_0x356415(_0x12c52a);let _0x251820=_0x39e8d0[_0x59778f(0x288)](_0x1be954);!_0x251820&&(_0x251820={'processKey':_0x1be954,'nodeKey':_0x1be954,'pid':_0x12c52a[_0x59778f(0x1f0)],'ppid':_0x12c52a[_0x59778f(0x21c)]??null,'host':_0x12c52a[_0x59778f(0x2be)]??null,'kind':_0x12c52a[_0x59778f(0x1cb)],'role':null,'supervisorKey':_0x12c52a[_0x59778f(0x321)]??null,'slot':_0x12c52a[_0x59778f(0x29a)]??null,'slotKey':_0x12c52a[_0x59778f(0x1d3)]??null,'caps':_0x12c52a[_0x59778f(0x38d)]??null,'lifecycle':_0x12c52a[_0x59778f(0x20b)]??null,'uptime':Math[_0x59778f(0x346)](0x0,Math[_0x59778f(0x358)]((_0xfbd94c-(_0x12c52a[_0x59778f(0x29c)]||_0xfbd94c))/0x3e8)),'startedAt':_0x12c52a[_0x59778f(0x29c)]??null,'meta':_0x12c52a[_0x59778f(0x1f3)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x39e8d0[_0x59778f(0x1b7)](_0x1be954,_0x251820));_0x251820[_0x59778f(0x231)]['push']({'instanceId':_0x12c52a[_0x59778f(0x16f)]??null,'role':_0x12c52a[_0x59778f(0x2bd)]??null,'listenAddr':_0x12c52a[_0x59778f(0x3a1)]??null,'lifecycle':_0x12c52a[_0x59778f(0x20b)]??null,'processing':_0x12c52a[_0x59778f(0x31d)]??null});if(!_0x251820[_0x59778f(0x2bd)]&&_0x12c52a[_0x59778f(0x2bd)])_0x251820[_0x59778f(0x2bd)]=_0x12c52a[_0x59778f(0x2bd)];if(!_0x251820['listenAddr']&&_0x12c52a[_0x59778f(0x3a1)])_0x251820[_0x59778f(0x3a1)]=_0x12c52a[_0x59778f(0x3a1)];if(!_0x251820['processing']&&_0x12c52a['processing'])_0x251820[_0x59778f(0x31d)]=_0x12c52a[_0x59778f(0x31d)];if(!_0x251820[_0x59778f(0x16b)]&&_0x12c52a[_0x59778f(0x16b)])_0x251820[_0x59778f(0x16b)]=_0x12c52a[_0x59778f(0x16b)];if(!_0x251820['singletonClaims']&&_0x12c52a[_0x59778f(0x2d4)])_0x251820['singletonClaims']=_0x12c52a[_0x59778f(0x2d4)];if(_0x251820[_0x59778f(0x38d)]==null&&_0x12c52a[_0x59778f(0x38d)])_0x251820['caps']=_0x12c52a[_0x59778f(0x38d)];if(_0x12c52a[_0x59778f(0x38a)]&&(!_0x251820[_0x59778f(0x38a)]||(_0x12c52a['stats']['at']??0x0)>(_0x251820[_0x59778f(0x38a)]['at']??0x0)))_0x251820[_0x59778f(0x38a)]=_0x12c52a[_0x59778f(0x38a)];}return[..._0x39e8d0[_0x59778f(0x397)]()];}['runtimeProcessesView'](){const _0x1bd29c=_0x3a913f,_0x885995=[],_0x1c8dc1={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x56dc65 of this[_0x1bd29c(0x305)]()){_0x885995[_0x1bd29c(0x2d3)]({'processKey':_0x56dc65['processKey'],'kind':_0x56dc65[_0x1bd29c(0x1cb)],'pid':_0x56dc65[_0x1bd29c(0x1f0)],'supervisorKey':_0x56dc65[_0x1bd29c(0x321)],'meta':_0x56dc65[_0x1bd29c(0x1f3)]??null,'uptime':_0x56dc65[_0x1bd29c(0x3a3)],'stats':_0x56dc65[_0x1bd29c(0x38a)]??null}),_0x1c8dc1[_0x1bd29c(0x376)]++;if(_0x56dc65[_0x1bd29c(0x38a)]){_0x1c8dc1[_0x1bd29c(0x169)]+=_0x56dc65[_0x1bd29c(0x38a)][_0x1bd29c(0x169)]||0x0,_0x1c8dc1[_0x1bd29c(0x1f6)]+=(_0x56dc65['stats']['heapUsed']||0x0)+(_0x56dc65[_0x1bd29c(0x38a)][_0x1bd29c(0x2c9)]?.[_0x1bd29c(0x1f6)]||0x0);const _0x3206d8=_0x56dc65[_0x1bd29c(0x38a)]['threads'];_0x3206d8&&(_0x1c8dc1[_0x1bd29c(0x2c9)][_0x1bd29c(0x1f9)]+=_0x3206d8[_0x1bd29c(0x1f9)]||0x0,_0x1c8dc1[_0x1bd29c(0x2c9)]['sandbox']+=_0x3206d8['sandbox']||0x0,_0x1c8dc1['threads']['busy']+=_0x3206d8[_0x1bd29c(0x2fe)]||0x0);}}return{'totals':_0x1c8dc1,'nodes':_0x885995};}async['open']({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x243104=_0x3a913f;this[_0x243104(0x2a2)]=this[_0x243104(0x2a2)]||!!writer,this[_0x243104(0x24b)]=this[_0x243104(0x24b)]||!!reader,this[_0x243104(0x223)]=kind||this['_kind']||(_0x16f5de['isWorker']?_0x243104(0x301):_0x243104(0x1aa)),this['_supervisorKey']=supervisorKey??this['_supervisorKey'],this[_0x243104(0x17e)]=listenAddr??this[_0x243104(0x17e)],this[_0x243104(0x1ac)](),await this[_0x243104(0x178)]();if(!writer&&!reader)return null;if(!this['_statusEnv']){const _0x220a77=await this[_0x243104(0x314)][_0x243104(0x3a0)](_0x407848,{'sync':![],'durability':_0x243104(0x2ad)});await _0x220a77['ensureType'](_0x50b9c2),this['_statusEnv']=_0x220a77;}return this[_0x243104(0x28b)];}[_0x3a913f(0x274)](){const _0x286ab0=_0x3a913f;return this[_0x286ab0(0x33a)]!==this[_0x286ab0(0x28b)]&&(this['_nodeDbFor']=this[_0x286ab0(0x28b)],this[_0x286ab0(0x3aa)]=this['_statusEnv'][_0x286ab0(0x29f)](_0x50b9c2)[_0x286ab0(0x38f)]),this[_0x286ab0(0x3aa)];}[_0x3a913f(0x378)](_0x4212cb){const _0x51a0d7=_0x3a913f;if(_0x3a967c)return this['_nodeDb']()[_0x51a0d7(0x271)](_0x4212cb['nodeKey'],_0x4212cb,0x1);const _0x1ddbde=this[_0x51a0d7(0x274)]()['put'](_0x4212cb[_0x51a0d7(0x270)],_0x4212cb,0x1);if(_0x1ddbde&&typeof _0x1ddbde[_0x51a0d7(0x365)]===_0x51a0d7(0x2c1))_0x1ddbde[_0x51a0d7(0x365)](undefined,()=>{});return _0x1ddbde;}['_putRowSync'](_0x5220f2){const _0x307db5=_0x3a913f;return this[_0x307db5(0x274)]()[_0x307db5(0x271)](_0x5220f2[_0x307db5(0x270)],_0x5220f2,0x1);}[_0x3a913f(0x393)](_0x5725c2){const _0x51a10b=_0x3a913f;if(_0x3a967c)try{return this[_0x51a10b(0x274)]()[_0x51a10b(0x2c2)](_0x5725c2);}catch{return![];}const _0x573f94=this[_0x51a10b(0x274)]()[_0x51a10b(0x31c)](_0x5725c2);if(_0x573f94&&typeof _0x573f94['then']===_0x51a10b(0x2c1))_0x573f94[_0x51a10b(0x365)](undefined,()=>{});return _0x573f94;}async[_0x3a913f(0x278)](_0x53894a){const _0xea8ec2=_0x3a913f;if(!this[_0xea8ec2(0x28b)]||!this[_0xea8ec2(0x2a2)]||!_0x53894a?.[_0xea8ec2(0x270)])return;return this[_0xea8ec2(0x378)](_0x53894a);}async[_0x3a913f(0x21d)](_0x5f4015){const _0xfadb1d=_0x3a913f;if(!this[_0xfadb1d(0x28b)]||!this[_0xfadb1d(0x2a2)]||!_0x5f4015)return;const _0x9e2b85=_0x5f4015[_0xfadb1d(0x25e)]('#'),_0x3ed8bd=[];for(const {key:_0x2a628c}of this[_0xfadb1d(0x28b)][_0xfadb1d(0x2c4)](_0x50b9c2)){if(_0x2a628c===_0x5f4015||!_0x9e2b85&&typeof _0x2a628c===_0xfadb1d(0x319)&&_0x2a628c[_0xfadb1d(0x31b)](_0x5f4015+'#'))_0x3ed8bd['push'](_0x2a628c);}for(const _0x2b5c05 of _0x3ed8bd){try{this[_0xfadb1d(0x274)]()[_0xfadb1d(0x2c2)](_0x2b5c05);}catch{}}}[_0x3a913f(0x187)](_0x5d9fe3){const _0x4d98b6=_0x3a913f;if(typeof _0x5d9fe3?.[_0x4d98b6(0x1f0)]!==_0x4d98b6(0x253))return![];if(_0x5d9fe3['host']!==_0x349a6f[_0x4d98b6(0x17f)]())return![];if(_0x5d9fe3[_0x4d98b6(0x1f0)]===process[_0x4d98b6(0x1f0)])return![];if(_0x5d9fe3[_0x4d98b6(0x392)]!=null&&_0x5d9fe3[_0x4d98b6(0x392)]<Date[_0x4d98b6(0x299)]()-_0x59d874)return!![];try{return process[_0x4d98b6(0x341)](_0x5d9fe3[_0x4d98b6(0x1f0)],0x0),![];}catch(_0x232166){return _0x232166[_0x4d98b6(0x37a)]===_0x4d98b6(0x3a7);}}[_0x3a913f(0x239)](){const _0x486d89=_0x3a913f;if(!this[_0x486d89(0x28b)])return[];try{this[_0x486d89(0x28b)]['db']?.[_0x486d89(0x303)]?.();}catch{}const _0x4221cd=Date[_0x486d89(0x299)](),_0x2dfc9c=_0x349a6f[_0x486d89(0x17f)](),_0xb920fe=[];for(const {value:_0x233c60}of this[_0x486d89(0x28b)][_0x486d89(0x2c4)](_0x50b9c2)){if(!_0x233c60)continue;let _0x2ede9b=null;_0x233c60[_0x486d89(0x2be)]===_0x2dfc9c&&typeof _0x233c60['pid']===_0x486d89(0x253)&&(_0x2ede9b=!this[_0x486d89(0x187)](_0x233c60));if(_0x2ede9b===![])continue;const _0x10177b=_0x233c60[_0x486d89(0x392)]==null||_0x233c60['expiresAt']>=_0x4221cd;if(_0x2ede9b===!![]||_0x10177b)_0xb920fe['push'](_0x233c60);}return _0xb920fe;}async[_0x3a913f(0x39e)](_0x4e6d65=0x0){const _0x4dbd6c=_0x3a913f;if(!this[_0x4dbd6c(0x28b)]||!this[_0x4dbd6c(0x2a2)])return;const _0x270064=Date[_0x4dbd6c(0x299)]()-_0x4e6d65,_0x11853a=new Set(),_0x17f8c7=[],_0x18c342=_0x349a6f[_0x4dbd6c(0x17f)](),_0x1a5f83=require$$6[_0x4dbd6c(0x1a4)];for(const {key:_0x3bb17c,value:_0x507e60}of this[_0x4dbd6c(0x28b)][_0x4dbd6c(0x2c4)](_0x50b9c2)){if(!_0x507e60)continue;const _0x1565ba=_0x507e60[_0x4dbd6c(0x2be)]===_0x18c342&&typeof _0x507e60[_0x4dbd6c(0x1f0)]===_0x4dbd6c(0x253),_0x4c5cca=_0x1565ba?this['_nodeDead'](_0x507e60):_0x507e60['expiresAt']!=null&&_0x507e60[_0x4dbd6c(0x392)]<_0x270064;if(_0x4c5cca)_0x17f8c7[_0x4dbd6c(0x2d3)](_0x3bb17c);else{_0x11853a[_0x4dbd6c(0x273)](_0x356415(_0x507e60)??_0x3bb17c);if(_0x507e60[_0x4dbd6c(0x1a4)]&&_0x507e60[_0x4dbd6c(0x1a4)]!==_0x1a5f83){if(!this[_0x4dbd6c(0x2c8)])this[_0x4dbd6c(0x2c8)]=new Set();!this[_0x4dbd6c(0x2c8)][_0x4dbd6c(0x177)](_0x507e60['version'])&&(this[_0x4dbd6c(0x2c8)][_0x4dbd6c(0x273)](_0x507e60[_0x4dbd6c(0x1a4)]),this['okdb'][_0x4dbd6c(0x19e)]?.[_0x4dbd6c(0x39f)]?.(_0x4dbd6c(0x244)+(_0x507e60['pid']??'?')+_0x4dbd6c(0x325)+_0x507e60[_0x4dbd6c(0x1a4)]+_0x4dbd6c(0x35f)+_0x1a5f83+'\x20—\x20'+'mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.',{'feature':'migrations'}));}}}for(const _0x2070cf of _0x17f8c7)this[_0x4dbd6c(0x393)](_0x2070cf);if(this[_0x4dbd6c(0x1ac)]()){const _0x1c61de=[];for(const {key:_0x4d02c5}of this[_0x4dbd6c(0x25f)]('node')){if(!_0x11853a[_0x4dbd6c(0x177)](_0x4d02c5)){if(_0x3a967c)try{this['_desired']['removeSync'](_0x4dbd6c(0x226)+_0x4d02c5);}catch{}else _0x1c61de[_0x4dbd6c(0x2d3)](this[_0x4dbd6c(0x1e6)][_0x4dbd6c(0x31c)]('node/'+_0x4d02c5));}}if(_0x1c61de[_0x4dbd6c(0x2de)])await Promise['allSettled'](_0x1c61de);}}['startHeartbeat'](_0x2b7267=null){const _0xbe624=_0x3a913f;if(this[_0xbe624(0x186)])return;if(!this[_0xbe624(0x2a2)]||!this[_0xbe624(0x28b)]){this['okdb']?.[_0xbe624(0x19e)]?.[_0xbe624(0x39f)]?.(_0xbe624(0x190)+this[_0xbe624(0x2a2)]+_0xbe624(0x36a)+!!this[_0xbe624(0x28b)]+_0xbe624(0x33b),{'feature':_0xbe624(0x376)});return;}this['_onTick']=_0x2b7267,this['_onProcEvent']=()=>this[_0xbe624(0x352)]();for(const _0x36855e of _0x26526e)this['okdb']['events']['on'](_0x36855e,this[_0xbe624(0x1d4)]);this[_0xbe624(0x36e)]();const _0xc42416=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x2bca3e;this[_0xbe624(0x186)]=setInterval(()=>{const _0x394c9f=_0xbe624;if(this[_0x394c9f(0x31a)])try{this[_0x394c9f(0x31a)]();}catch{}this[_0x394c9f(0x36e)](),this[_0x394c9f(0x39e)]()['catch'](()=>{});},_0xc42416);if(this[_0xbe624(0x186)][_0xbe624(0x2d7)])this[_0xbe624(0x186)]['unref']();}[_0x3a913f(0x352)](){const _0x33afbf=_0x3a913f;if(!this['_isWriter']||!this[_0x33afbf(0x28b)])return;if(Date[_0x33afbf(0x299)]()-this[_0x33afbf(0x2a1)]<_0x5642f5)return;this[_0x33afbf(0x36e)]();}[_0x3a913f(0x36e)](){const _0x5245a2=_0x3a913f;if(!this[_0x5245a2(0x2a2)]||!this[_0x5245a2(0x28b)])return;this['_lastPublishAt']=Date[_0x5245a2(0x299)]();try{const _0x3d2ddf=[this[_0x5245a2(0x286)]()];for(const _0x5b93b0 of this[_0x5245a2(0x2d0)]['values']())_0x3d2ddf[_0x5245a2(0x2d3)](this[_0x5245a2(0x1e7)](_0x5b93b0));const _0x1fc8d3=_0x241ad9[_0x5245a2(0x2ce)]?_0x241ad9[_0x5245a2(0x299)]():0x0;for(const _0x510d54 of _0x3d2ddf){try{this[_0x5245a2(0x1e9)](_0x510d54),this[_0x5245a2(0x353)]=![];}catch(_0x21fcaf){!this[_0x5245a2(0x353)]&&(this[_0x5245a2(0x353)]=!![],this['okdb']?.[_0x5245a2(0x19e)]?.['warn']?.(_0x5245a2(0x326)+_0x21fcaf[_0x5245a2(0x1c4)],{'feature':_0x5245a2(0x376)}));}}if(_0x241ad9[_0x5245a2(0x2ce)])_0x241ad9['note'](_0x5245a2(0x29e),_0x241ad9[_0x5245a2(0x299)]()-_0x1fc8d3,_0x5245a2(0x26c)+_0x3d2ddf[_0x5245a2(0x2de)]+_0x5245a2(0x1ae));}catch(_0xea22f1){!this['_publishFailWarned']&&(this[_0x5245a2(0x353)]=!![],this[_0x5245a2(0x314)]?.[_0x5245a2(0x19e)]?.[_0x5245a2(0x39f)]?.(_0x5245a2(0x326)+_0xea22f1[_0x5245a2(0x1c4)],{'feature':_0x5245a2(0x376)}));}}async['stopHeartbeat'](){const _0x151a61=_0x3a913f;if(this['_onProcEvent']){for(const _0x188981 of _0x26526e){try{this[_0x151a61(0x314)][_0x151a61(0x199)][_0x151a61(0x210)](_0x188981,this[_0x151a61(0x1d4)]);}catch{}}this[_0x151a61(0x1d4)]=null;}this[_0x151a61(0x186)]&&(clearInterval(this[_0x151a61(0x186)]),this['_hbTimer']=null);try{if(this[_0x151a61(0x28b)]&&this[_0x151a61(0x2a2)])await this[_0x151a61(0x21d)](this[_0x151a61(0x2f2)]);}catch{}}async[_0x3a913f(0x241)](){const _0x165ccf=_0x3a913f;if(!this[_0x165ccf(0x28b)]||!this[_0x165ccf(0x2a2)])return;try{await this[_0x165ccf(0x21d)](this[_0x165ccf(0x2f2)]);}catch{}try{const _0x10d69d=[];for(const {value:_0x2c6fac}of this[_0x165ccf(0x28b)]['getRange'](_0x50b9c2)){if(_0x2c6fac?.[_0x165ccf(0x21c)]===process['pid']&&_0x2c6fac[_0x165ccf(0x270)])_0x10d69d[_0x165ccf(0x2d3)](_0x2c6fac[_0x165ccf(0x270)]);}for(const _0x325bba of _0x10d69d){try{await this[_0x165ccf(0x21d)](_0x325bba);}catch{}}}catch{}}async[_0x3a913f(0x201)](){const _0x5f41bc=_0x3a913f;return this[_0x5f41bc(0x278)](this[_0x5f41bc(0x286)]());}async[_0x3a913f(0x1d0)](_0x38f810){const _0x27504c=_0x3a913f;if(!this[_0x27504c(0x28b)]||!this[_0x27504c(0x2a2)])return;return this[_0x27504c(0x278)](this[_0x27504c(0x1e7)](_0x38f810));}[_0x3a913f(0x1e7)]({pid:_0x2f7ce2,startedAt:_0x4f7d4f,kind:_0x19d735,supervisorKey:_0x50770b,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x3a913f(0x2e0),meta:meta=null,stats:stats=null}){const _0x1c1dec=_0x3a913f,_0x5f56c0=Date[_0x1c1dec(0x299)](),_0xae6cde=_0x275e6c(_0x2f7ce2,_0x4f7d4f);return{'nodeKey':_0x3fc114(_0xae6cde,'0'),'processKey':_0xae6cde,'instanceId':'0','pid':_0x2f7ce2,'startedAt':_0x4f7d4f,'ppid':process[_0x1c1dec(0x1f0)],'host':_0x349a6f[_0x1c1dec(0x17f)](),'supervisorKey':_0x50770b,'slot':slot,'slotKey':slotKey,'kind':_0x19d735,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x5f56c0,'expiresAt':_0x5f56c0+_0x515199,'caps':this[_0x1c1dec(0x235)](_0x19d735,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x3a913f(0x1cd)](_0xbcdab){const _0x4afc77=_0x3a913f;if(!_0xbcdab?.[_0x4afc77(0x1f0)])return null;const _0x57af59=_0x275e6c(_0xbcdab['pid'],_0xbcdab[_0x4afc77(0x29c)]);this[_0x4afc77(0x2d0)][_0x4afc77(0x1b7)](_0x57af59,{..._0xbcdab,'supervisorKey':_0xbcdab[_0x4afc77(0x321)]??this[_0x4afc77(0x2b5)]});if(this['_isWriter'])await this['publishChildRow'](this['_children'][_0x4afc77(0x288)](_0x57af59))[_0x4afc77(0x373)]?.(()=>{});return _0x57af59;}[_0x3a913f(0x203)](_0x1082dc){const _0x2a58c1=_0x3a913f;if(!_0x1082dc)return;return this[_0x2a58c1(0x2d0)]['delete'](_0x1082dc),this[_0x2a58c1(0x21d)](_0x1082dc);}[_0x3a913f(0x2db)](){const _0x2b8ca4=_0x3a913f,_0x3be165=Date[_0x2b8ca4(0x299)](),_0x24ef06=process[_0x2b8ca4(0x1c1)](),_0x46a944=(_0x3be165-this['_lastCpuAt'])*0x3e8;if(_0x46a944>=0x3d090){const _0x4952f2=_0x24ef06[_0x2b8ca4(0x208)]-this[_0x2b8ca4(0x175)][_0x2b8ca4(0x208)]+(_0x24ef06['system']-this[_0x2b8ca4(0x175)]['system']),_0x53ff9e=_0x349a6f[_0x2b8ca4(0x315)]()[_0x2b8ca4(0x2de)]||0x1;this[_0x2b8ca4(0x256)]=Math['min'](0x64,Math[_0x2b8ca4(0x358)](_0x4952f2/(_0x46a944*_0x53ff9e)*0x64)),this['_lastCpuWindowMs']=Math[_0x2b8ca4(0x358)](_0x46a944/0x3e8),this[_0x2b8ca4(0x175)]=_0x24ef06,this['_lastCpuAt']=_0x3be165;}const _0x57f84e=process[_0x2b8ca4(0x248)](),_0x50d178=this[_0x2b8ca4(0x32b)][_0x2b8ca4(0x214)];let _0x4670a6=0x0;if(_0x50d178>0x0){const _0x412841=[this['okdb'],...this[_0x2b8ca4(0x314)]['_envs']?.[_0x2b8ca4(0x397)]?.()??[]];for(const _0x57cbe6 of _0x412841){const _0x285a18=_0x57cbe6['functions']?.['_sandbox'];if(_0x285a18)_0x4670a6+=_0x285a18[_0x2b8ca4(0x1bd)][_0x2b8ca4(0x2fe)];}}let _0x539e59=null;const _0x3b9b32=_0x50d178;if(_0x3b9b32>0x0){let _0x52ed09=0x0;for(const _0x1ed6c1 of this[_0x2b8ca4(0x32b)][_0x2b8ca4(0x397)]())_0x52ed09+=_0x1ed6c1[_0x2b8ca4(0x1f6)]||0x0;_0x539e59={'count':_0x3b9b32,'heapUsed':_0x52ed09,'sandbox':_0x50d178,'busy':_0x4670a6};}return{'rss':_0x57f84e[_0x2b8ca4(0x169)],'heapUsed':_0x57f84e['heapUsed'],'heapTotal':_0x57f84e[_0x2b8ca4(0x1fa)],'external':_0x57f84e[_0x2b8ca4(0x217)],'cpuPct':this['_lastCpuPct'],'cpuWindowMs':this[_0x2b8ca4(0x1f4)]??null,'threads':_0x539e59,'at':_0x3be165};}[_0x3a913f(0x213)](_0x4bfbff,_0x2f2b3e){const _0x17f786=_0x3a913f;if(!_0x4bfbff||!_0x2f2b3e)return;this['_threadStats'][_0x17f786(0x1b7)](_0x4bfbff,_0x2f2b3e);}[_0x3a913f(0x334)](_0x3bea8b){const _0x530b7a=_0x3a913f;this[_0x530b7a(0x32b)][_0x530b7a(0x21f)](_0x3bea8b);}[_0x3a913f(0x28e)](_0x62499e,_0x5b68a7,_0x5706c1=undefined){const _0x19999a=_0x3a913f,_0x496968=this[_0x19999a(0x2d0)][_0x19999a(0x288)](_0x62499e);if(!_0x496968||!_0x5b68a7)return;if(_0x5706c1!==undefined)_0x496968[_0x19999a(0x31d)]=_0x5706c1;_0x496968[_0x19999a(0x38a)]={'rss':_0x5b68a7[_0x19999a(0x169)]??null,'heapUsed':_0x5b68a7['heapUsed']??null,'heapTotal':_0x5b68a7['heapTotal']??null,'external':_0x5b68a7['external']??null,'cpuPct':_0x5b68a7[_0x19999a(0x2fa)]??null,'cpuWindowMs':_0x5b68a7[_0x19999a(0x196)]??null,'threads':_0x5b68a7[_0x19999a(0x2c9)]??null,'claims':_0x5b68a7[_0x19999a(0x1c7)]??null,'envsOpen':_0x5b68a7[_0x19999a(0x1ab)]??null,'at':Date[_0x19999a(0x299)]()};}['_buildOwnRow'](){const _0x5ec164=_0x3a913f,_0x398fa0=Date[_0x5ec164(0x299)](),_0xd8b3e0=this[_0x5ec164(0x314)][_0x5ec164(0x174)]||{},_0x711d63=this[_0x5ec164(0x223)]||_0x5ec164(0x1aa);return{'nodeKey':this[_0x5ec164(0x2f2)],'processKey':this[_0x5ec164(0x2b5)],'instanceId':this['_instanceId'],'pid':process[_0x5ec164(0x1f0)],'startedAt':this[_0x5ec164(0x194)],'instanceStartedAt':this[_0x5ec164(0x36c)],'ppid':typeof process[_0x5ec164(0x21c)]===_0x5ec164(0x253)?process[_0x5ec164(0x21c)]:null,'host':_0x349a6f['hostname'](),'supervisorKey':this[_0x5ec164(0x385)]??null,'version':require$$6[_0x5ec164(0x1a4)],'kind':_0x711d63,'role':{'engines':!!_0xd8b3e0[_0x5ec164(0x16b)],'processors':!!_0xd8b3e0['processors'],'compaction':_0xd8b3e0[_0x5ec164(0x1b8)],'http':_0xd8b3e0[_0x5ec164(0x1e4)]},'listenAddr':this[_0x5ec164(0x17e)]??null,'heartbeatAt':_0x398fa0,'expiresAt':_0x398fa0+_0x515199,'caps':this[_0x5ec164(0x235)](_0x711d63,_0xd8b3e0),'lifecycle':{'state':_0x5ec164(0x2e0),'desiredVersionApplied':null},'meta':{...this[_0x5ec164(0x2a0)]},'processing':_0xd8b3e0['processors']?this[_0x5ec164(0x333)]():null,'engines':_0xd8b3e0[_0x5ec164(0x16b)]?[...this[_0x5ec164(0x314)][_0x5ec164(0x19c)]??[]]:null,'singletonClaims':this[_0x5ec164(0x240)](),'stats':this[_0x5ec164(0x2db)](),'writers':this['_collectWriterFacet']()};}[_0x3a913f(0x1be)](){const _0x582c53=_0x3a913f,_0x371875={};try{for(const [_0x2fee34,_0x2879e4]of this[_0x582c53(0x314)]['_envs']){try{const _0x5c2afd=_0x2879e4['writerStatus']?.();if(!_0x5c2afd)continue;if(!_0x5c2afd[_0x582c53(0x2bb)]&&!_0x5c2afd['committed']&&!(_0x5c2afd[_0x582c53(0x2c0)]??0x0)&&!_0x5c2afd[_0x582c53(0x2e4)])continue;_0x371875[_0x2fee34]={'depth':_0x5c2afd[_0x582c53(0x2bb)],'oldestPendingMs':_0x5c2afd[_0x582c53(0x2dc)],'committed':_0x5c2afd['committed'],'commitsPerSec':_0x5c2afd['commitsPerSec'],'commitP99Ms':_0x5c2afd['commitP99Ms'],'parkedNow':_0x5c2afd[_0x582c53(0x2c0)]??0x0,'draining':!!_0x5c2afd[_0x582c53(0x2e4)]};}catch{}}}catch{}return Object[_0x582c53(0x1f8)](_0x371875)[_0x582c53(0x2de)]?_0x371875:null;}[_0x3a913f(0x240)](){const _0x423144=_0x3a913f,_0x6e22f5=process[_0x423144(0x1f0)],_0x46f261=Date[_0x423144(0x299)](),_0x4b525f=_0x2dfe13=>{const _0x2602a9=_0x423144;if(!_0x2dfe13)return[];const _0x5e936c=[];try{for(const {id:_0x39e9e4,entry:_0x2329be}of _0x2dfe13[_0x2602a9(0x292)]()){if(_0x2329be?.['holder']?.[_0x2602a9(0x1f0)]!==_0x6e22f5)continue;const _0x2d1a68=_0x2329be[_0x2602a9(0x2cd)]??_0x2329be[_0x2602a9(0x311)]??0x0;if(_0x2d1a68+(_0x2329be[_0x2602a9(0x27e)]??0x0)<_0x46f261)continue;_0x5e936c[_0x2602a9(0x2d3)](_0x39e9e4);}}catch{}return _0x5e936c;},_0x30914e=_0x4b525f(this[_0x423144(0x216)](_0x423144(0x3a8))),_0x524e96=_0x4b525f(this[_0x423144(0x216)](_0x423144(0x181)));if(!_0x30914e[_0x423144(0x2de)]&&!_0x524e96[_0x423144(0x2de)])return null;return{'compact':_0x30914e,'replicate':_0x524e96};}[_0x3a913f(0x216)](_0x277be6){const _0x248a46=_0x3a913f;if(!this[_0x248a46(0x314)]?.[_0x248a46(0x27a)])return null;if(!this[_0x248a46(0x25d)])this[_0x248a46(0x25d)]=new Map();let _0x5c5f87=this[_0x248a46(0x25d)]['get'](_0x277be6);if(!_0x5c5f87)try{_0x5c5f87=new _0x510465(this[_0x248a46(0x314)][_0x248a46(0x27a)],{'namespace':_0x277be6}),this[_0x248a46(0x25d)][_0x248a46(0x1b7)](_0x277be6,_0x5c5f87);}catch{return null;}return _0x5c5f87;}[_0x3a913f(0x333)](){const _0x224882=_0x3a913f,_0xade28a=[];try{for(const [_0x4b783a,_0x534a8a]of this['okdb'][_0x224882(0x1a6)]){if(_0x4b783a['startsWith']('~'))continue;for(const _0x1137a3 of _0x534a8a[_0x224882(0x209)][_0x224882(0x383)]())_0xade28a[_0x224882(0x2d3)]({..._0x1137a3,'env':_0x4b783a});}}catch{}return{'participate':this[_0x224882(0x314)][_0x224882(0x380)]?.['_participate']??![],'processors':_0xade28a};}[_0x3a913f(0x1ac)](){const _0x44cc9e=_0x3a913f;if(this[_0x44cc9e(0x1e6)])return!![];const _0x26a213=this['okdb'][_0x44cc9e(0x27a)];if(!_0x26a213)return![];return this[_0x44cc9e(0x1e6)]=_0x26a213[_0x44cc9e(0x34a)](_0x6971f9,{'dupSort':![]}),this[_0x44cc9e(0x185)]=_0x26a213[_0x44cc9e(0x34a)](_0x4c49a5,{'dupSort':![]}),!![];}async[_0x3a913f(0x178)](){const _0x498b94=_0x3a913f;if(!this[_0x498b94(0x1ac)]())return;const _0x35d118=_0x498b94(0x2d2),_0x5b44db=0x1,_0x2adc90=this[_0x498b94(0x1e6)][_0x498b94(0x288)](_0x35d118)??0x0;if(_0x2adc90>=_0x5b44db)return;const _0x4c817e=_0x4cf4f8=>{const _0xa16fe2=_0x498b94;if(_0x4cf4f8===_0xa16fe2(0x1a3))return _0xa16fe2(0x289);if(_0x4cf4f8===_0xa16fe2(0x23b))return _0xa16fe2(0x281);return _0x4cf4f8;};await this[_0x498b94(0x314)]['_systemEnv'][_0x498b94(0x362)][_0x498b94(0x1ba)](()=>{const _0x1b5545=_0x498b94;for(const _0x19a527 of[_0x1b5545(0x2cc),'procmodeack/']){for(const {key:_0x5e32b4,value:_0x46439e}of this[_0x1b5545(0x1e6)][_0x1b5545(0x2c4)]({'start':_0x19a527,'end':_0x19a527+'\xff'})){if(typeof _0x5e32b4!==_0x1b5545(0x319)||!_0x5e32b4[_0x1b5545(0x31b)](_0x19a527))break;const _0x749401=_0x4c817e(_0x46439e[_0x1b5545(0x275)]);if(_0x749401!==_0x46439e[_0x1b5545(0x275)])this[_0x1b5545(0x1e6)][_0x1b5545(0x298)](_0x5e32b4,{..._0x46439e,'mode':_0x749401});}}this[_0x1b5545(0x1e6)][_0x1b5545(0x298)](_0x35d118,_0x5b44db);});}[_0x3a913f(0x1ea)](){const _0x1c558b=_0x3a913f;return!!this[_0x1c558b(0x1e6)];}['getDesired'](_0x127900,_0x2aef71){const _0x332d12=_0x3a913f;if(!this[_0x332d12(0x1ac)]())return null;const _0x339dbb=_0x127900+'/'+_0x2aef71;return this['_refreshDesiredSnapshot'](),this[_0x332d12(0x22f)][_0x332d12(0x288)](_0x339dbb)??this[_0x332d12(0x1e6)][_0x332d12(0x288)](_0x339dbb)??null;}[_0x3a913f(0x2ef)](){const _0x4f56ed=_0x3a913f;if(!_0x3a967c)return;try{this[_0x4f56ed(0x314)][_0x4f56ed(0x345)]?.['db']?.[_0x4f56ed(0x303)]?.();}catch{}}async[_0x3a913f(0x1c9)](_0x3ab3fd,_0x3aa836,_0x57ffc6){const _0x33cb6c=_0x3a913f;if(!this[_0x33cb6c(0x1ac)]())return null;const _0x58eb2c=_0x3ab3fd+'/'+_0x3aa836;this[_0x33cb6c(0x2ef)]();const _0x272a74=this[_0x33cb6c(0x22f)][_0x33cb6c(0x288)](_0x58eb2c)??this[_0x33cb6c(0x1e6)][_0x33cb6c(0x288)](_0x58eb2c)??{'version':0x0},_0x9bc39b=(_0x272a74[_0x33cb6c(0x1a4)]||0x0)+0x1,_0x3e1d81={..._0x272a74,..._0x57ffc6,'version':_0x9bc39b,'updatedAt':Date[_0x33cb6c(0x299)]()};this[_0x33cb6c(0x22f)][_0x33cb6c(0x1b7)](_0x58eb2c,_0x3e1d81);try{await this['okdb'][_0x33cb6c(0x345)][_0x33cb6c(0x362)][_0x33cb6c(0x1ba)](()=>{const _0x2ed6c5=_0x33cb6c;this[_0x2ed6c5(0x1e6)][_0x2ed6c5(0x298)](_0x58eb2c,_0x3e1d81);});}finally{if(this[_0x33cb6c(0x22f)][_0x33cb6c(0x288)](_0x58eb2c)===_0x3e1d81)this[_0x33cb6c(0x22f)][_0x33cb6c(0x21f)](_0x58eb2c);}return _0x9bc39b;}[_0x3a913f(0x25f)](_0x4bd0ee){const _0x361099=_0x3a913f;if(!this[_0x361099(0x1ac)]())return[];this[_0x361099(0x2ef)]();const _0x110498=_0x4bd0ee+'/',_0x429d43=[];for(const {key:_0x5b9f37,value:_0x472e8b}of this[_0x361099(0x1e6)]['getRange']({'start':_0x110498,'end':_0x110498+'\xff'})){if(typeof _0x5b9f37!==_0x361099(0x319)||!_0x5b9f37[_0x361099(0x31b)](_0x110498))break;_0x429d43['push']({'key':_0x5b9f37[_0x361099(0x2f9)](_0x110498[_0x361099(0x2de)]),'value':_0x472e8b});}return _0x429d43;}[_0x3a913f(0x21b)](_0x4c52b0){const _0x5ee665=_0x3a913f;if(!this[_0x5ee665(0x1ac)]())return null;return this[_0x5ee665(0x185)][_0x5ee665(0x288)](_0x4c52b0)??null;}async[_0x3a913f(0x30f)](_0x17bd04,_0x2041b7,_0x1ca4bd={}){const _0x73be39=_0x3a913f;if(!this[_0x73be39(0x1ac)]())return null;let _0x1563b4;return await this['okdb'][_0x73be39(0x345)][_0x73be39(0x362)][_0x73be39(0x1ba)](()=>{const _0x58600d=_0x73be39,_0x4c4530=this[_0x58600d(0x185)][_0x58600d(0x288)](_0x17bd04)||{'epoch':0x0};_0x1563b4=(_0x4c4530[_0x58600d(0x1a7)]||0x0)+0x1,this[_0x58600d(0x185)]['put'](_0x17bd04,{..._0x4c4530,..._0x1ca4bd,'cmd':_0x2041b7,'epoch':_0x1563b4,'updatedAt':Date[_0x58600d(0x299)]()});}),_0x1563b4;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x392c79,'nodeKey':_0x275e6c,'logicalKey':_0x594c4c,'slotKey':_0x3f7540,'PROCESS_ENV':_0x407848,'NODE_TYPE':_0x50b9c2},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x18f3ad=_0x727d37;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x43bb71=require$$0$4,{clampTimerDelay:_0x10ad69}=requireOkdbTimers(),{EVENTS:_0x18e8f2,CHANGE_ACTIONS:_0x69fe55}=requireOkdbEnums(),{LOOP:_0x337628}=requireOkdbLoopMonitor(),_0x1b4b98=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x4cca66=0x5,_0x39fa5b=0x2710;class _0x19fa35 extends _0x43bb71{constructor(_0x2cd0e3,_0x23fbd4={}){const _0x38ff38=_0x1c29;super(),this[_0x38ff38(0x314)]=_0x2cd0e3,this[_0x38ff38(0x18d)]=_0x23fbd4[_0x38ff38(0x322)]??_0x1b4b98,this[_0x38ff38(0x166)]=_0x23fbd4['flushDebounce']??_0x4cca66,this['_dedupeMax']=_0x23fbd4[_0x38ff38(0x21e)]??_0x39fa5b,this[_0x38ff38(0x224)]=![],this[_0x38ff38(0x220)]=new Map(),this[_0x38ff38(0x23e)]=new Map(),this[_0x38ff38(0x1df)]=new Map(),this[_0x38ff38(0x2d1)]=null,this[_0x38ff38(0x360)]=![],this[_0x38ff38(0x3a2)]=new Set(),this[_0x38ff38(0x264)]=new Set(),this['_onItem']=_0x319dc2=>this[_0x38ff38(0x327)](_0x319dc2),this['_onPending']=_0x1092af=>this[_0x38ff38(0x1d8)](_0x1092af),this[_0x38ff38(0x16e)]=_0x130c04=>this[_0x38ff38(0x351)](_0x130c04),this[_0x38ff38(0x1db)]=()=>this['stop']();}['start'](){const _0x1b95b1=_0x1c29;if(this[_0x1b95b1(0x224)])return;this[_0x1b95b1(0x224)]=!![];for(const [_0xd8be08,_0x2efb51]of this[_0x1b95b1(0x314)][_0x1b95b1(0x1a6)]){if(_0xd8be08[_0x1b95b1(0x31b)]('~'))continue;try{_0x2efb51['_enableChangelog']();}catch{}}for(const [_0x319ee9,_0x3edf87]of this[_0x1b95b1(0x314)][_0x1b95b1(0x1a6)]){if(_0x319ee9[_0x1b95b1(0x31b)]('~'))continue;try{this['_baselines']['set'](_0x319ee9,_0x3edf87[_0x1b95b1(0x356)]()||0x0);}catch{}}const {events:_0x256062}=this[_0x1b95b1(0x314)];_0x256062['on'](_0x18e8f2[_0x1b95b1(0x18b)],this[_0x1b95b1(0x164)]),_0x256062['on'](_0x18e8f2[_0x1b95b1(0x2ca)],this[_0x1b95b1(0x198)]),_0x256062['on'](_0x18e8f2[_0x1b95b1(0x1fe)],this[_0x1b95b1(0x198)]),_0x256062['on'](_0x18e8f2[_0x1b95b1(0x1a0)],this[_0x1b95b1(0x198)]),_0x256062['on'](_0x18e8f2['SYSTEM_POKE'],this['_onPoke']),_0x256062[_0x1b95b1(0x364)](_0x18e8f2[_0x1b95b1(0x2fb)],this['_onStop']);}['stop'](){const _0xa9cc40=_0x1c29;if(!this[_0xa9cc40(0x224)])return;this[_0xa9cc40(0x224)]=![];const {events:_0x478fa8}=this['okdb'];_0x478fa8['off'](_0x18e8f2[_0xa9cc40(0x18b)],this['_onPending']),_0x478fa8[_0xa9cc40(0x210)](_0x18e8f2['ITEM_CREATE'],this[_0xa9cc40(0x198)]),_0x478fa8[_0xa9cc40(0x210)](_0x18e8f2[_0xa9cc40(0x1fe)],this[_0xa9cc40(0x198)]),_0x478fa8[_0xa9cc40(0x210)](_0x18e8f2[_0xa9cc40(0x1a0)],this[_0xa9cc40(0x198)]),_0x478fa8[_0xa9cc40(0x210)](_0x18e8f2[_0xa9cc40(0x31e)],this['_onPoke']);try{_0x478fa8[_0xa9cc40(0x210)](_0x18e8f2['SYSTEM_STOPPED'],this[_0xa9cc40(0x1db)]);}catch{}this[_0xa9cc40(0x2d1)]&&(clearTimeout(this[_0xa9cc40(0x2d1)]),this[_0xa9cc40(0x2d1)]=null),this[_0xa9cc40(0x1df)][_0xa9cc40(0x2c3)](),this['_cursors'][_0xa9cc40(0x2c3)](),this[_0xa9cc40(0x23e)][_0xa9cc40(0x2c3)](),this[_0xa9cc40(0x3a2)]['clear'](),this[_0xa9cc40(0x264)]['clear']();}['_dedupeKey'](_0x44a041,_0x4850ae,_0x5e3b8f,_0x33bcd4){return _0x44a041+'\x00'+_0x4850ae+'\x00'+_0x5e3b8f+'\x00'+_0x33bcd4;}[_0x18f3ad(0x389)](_0x5e2ed7,_0x4072e5,_0x364423,_0x392c80){const _0xd0ca21=_0x18f3ad,_0x478e2a=this['_dedupeKey'](_0x5e2ed7,_0x4072e5,_0x364423,_0x392c80);if(this['_seen']['has'](_0x478e2a))return![];this[_0xd0ca21(0x3a2)][_0xd0ca21(0x273)](_0x478e2a);if(this[_0xd0ca21(0x3a2)]['size']>this[_0xd0ca21(0x238)]){const _0x471494=this[_0xd0ca21(0x3a2)][_0xd0ca21(0x397)]()[_0xd0ca21(0x354)]()[_0xd0ca21(0x375)];this[_0xd0ca21(0x3a2)][_0xd0ca21(0x21f)](_0x471494);}return!![];}['_handlePending'](_0xdceca3){const _0x5c1fcb=_0x18f3ad;if(!this[_0x5c1fcb(0x224)]||!_0xdceca3)return;const {env:_0x575d2f,type:_0x5bef10,key:_0x88b544,clock:_0x1b4e64}=_0xdceca3;if(_0x575d2f==null||_0x5bef10==null||_0x88b544==null)return;if(typeof _0x575d2f==='string'&&_0x575d2f['startsWith']('~'))return;if(typeof _0x5bef10==='string'&&_0x5bef10[_0x5c1fcb(0x31b)]('~'))return;this[_0x5c1fcb(0x264)][_0x5c1fcb(0x273)](this['_dedupeKey'](_0x575d2f,_0x5bef10,_0x88b544,_0x1b4e64)),this[_0x5c1fcb(0x264)][_0x5c1fcb(0x214)]>this[_0x5c1fcb(0x238)]&&this[_0x5c1fcb(0x264)][_0x5c1fcb(0x21f)](this['_pendingLocal'][_0x5c1fcb(0x397)]()[_0x5c1fcb(0x354)]()[_0x5c1fcb(0x375)]);}[_0x18f3ad(0x327)](_0x43937f){const _0x410265=_0x18f3ad;if(!this[_0x410265(0x224)]||!_0x43937f)return;const {env:_0x42e523,type:_0x11136f,key:_0x1a9771,clock:_0x5c9fff,origin:_0xe01dff,action:_0x54c1ca,newValue:_0x3175d5,oldValue:_0x29bcbd}=_0x43937f;if(_0x42e523==null||_0x11136f==null||_0x1a9771==null)return;if(typeof _0x42e523==='string'&&_0x42e523[_0x410265(0x31b)]('~'))return;if(typeof _0x11136f==='string'&&_0x11136f['startsWith']('~'))return;this[_0x410265(0x264)][_0x410265(0x21f)](this[_0x410265(0x2f0)](_0x42e523,_0x11136f,_0x1a9771,_0x5c9fff));if(!this[_0x410265(0x389)](_0x42e523,_0x11136f,_0x1a9771,_0x5c9fff))return;const _0x40f00a=_0x54c1ca===_0x69fe55[_0x410265(0x1b4)]?_0x410265(0x31c):'put';this['emit']('change',{'env':_0x42e523,'type':_0x11136f,'key':_0x1a9771,'op':_0x40f00a,'clock':_0x5c9fff,'origin':_0xe01dff,'value':_0x40f00a==='remove'?null:_0x3175d5,'prevValue':_0x29bcbd});}[_0x18f3ad(0x351)](_0x43aa66){const _0xa72567=_0x18f3ad;if(!this[_0xa72567(0x224)])return;if(!_0x43aa66||typeof _0x43aa66[_0xa72567(0x15d)]!==_0xa72567(0x319)||typeof _0x43aa66[_0xa72567(0x374)]!=='string')return;const {env:_0x594468,type:_0x477ff8}=_0x43aa66;if(_0x594468['startsWith']('~')||_0x477ff8[_0xa72567(0x31b)]('~'))return;this[_0xa72567(0x1df)][_0xa72567(0x1b7)](_0x594468+'\x00'+_0x477ff8,{'env':_0x594468,'type':_0x477ff8}),this[_0xa72567(0x307)]();}[_0x18f3ad(0x307)](){const _0x3bf60e=_0x18f3ad;if(this[_0x3bf60e(0x2d1)])return;const _0x20f420=()=>{const _0x253441=_0x3bf60e;this[_0x253441(0x2d1)]=null,this['_drain']()[_0x253441(0x373)](()=>{});};this[_0x3bf60e(0x2d1)]=setTimeout(_0x20f420,_0x10ad69(this['_flushDebounce']));}async[_0x18f3ad(0x381)](){const _0x3b581c=_0x18f3ad;if(this['_draining']){this[_0x3b581c(0x307)]();return;}this[_0x3b581c(0x360)]=!![];try{const _0x464407=[...this[_0x3b581c(0x1df)][_0x3b581c(0x397)]()];this[_0x3b581c(0x1df)]['clear']();let _0x8d7d00=![];for(const {env:_0x286141,type:_0x4ec896}of _0x464407){try{const _0x519a07=await this['_drainOne'](_0x286141,_0x4ec896);if(_0x519a07)_0x8d7d00=!![];}catch{this[_0x3b581c(0x1df)][_0x3b581c(0x1b7)](_0x286141+'\x00'+_0x4ec896,{'env':_0x286141,'type':_0x4ec896}),_0x8d7d00=!![];}}if(_0x8d7d00||this['_pending'][_0x3b581c(0x214)]>0x0)this['_scheduleFlush']();}finally{this[_0x3b581c(0x360)]=![];}}async[_0x18f3ad(0x26f)](_0x34ea3a,_0x54afeb){const _0xc0e68f=_0x18f3ad,_0x1c0cd0=await this['okdb'][_0xc0e68f(0x212)](_0x34ea3a),_0x7114cb=_0x34ea3a+'\x00'+_0x54afeb;!this[_0xc0e68f(0x220)]['has'](_0x7114cb)&&(!this[_0xc0e68f(0x23e)][_0xc0e68f(0x177)](_0x34ea3a)&&(_0x1c0cd0[_0xc0e68f(0x24d)](),this[_0xc0e68f(0x23e)][_0xc0e68f(0x1b7)](_0x34ea3a,_0x1c0cd0[_0xc0e68f(0x356)]()||0x0)),this['_cursors'][_0xc0e68f(0x1b7)](_0x7114cb,this[_0xc0e68f(0x23e)][_0xc0e68f(0x288)](_0x34ea3a)));const _0x26e422=this[_0xc0e68f(0x220)][_0xc0e68f(0x288)](_0x7114cb),_0x3db7c8=_0x1c0cd0[_0xc0e68f(0x356)](_0x54afeb)||0x0;if(_0x3db7c8<=_0x26e422)return![];const _0xe31a2f=_0x26e422+this[_0xc0e68f(0x18d)],_0x2611ca=Math['min'](_0x3db7c8,_0xe31a2f),_0x1b9ffb=_0x337628[_0xc0e68f(0x2ce)]?_0x337628['now']():0x0,_0x3a3fc9=Array['from'](_0x1c0cd0['getChanges'](_0x54afeb,_0x26e422+0x1,_0x2611ca));let _0x25d100=_0x26e422;for(const _0xea5a1a of _0x3a3fc9){const {clock:_0x369621,key:_0x2464d5,action:_0xf12e,origin:_0x2f46c4}=_0xea5a1a;if(_0x369621>_0x25d100)_0x25d100=_0x369621;if(_0x2464d5==null)continue;if(this[_0xc0e68f(0x264)][_0xc0e68f(0x177)](this[_0xc0e68f(0x2f0)](_0x34ea3a,_0x54afeb,_0x2464d5,_0x369621)))continue;if(!this[_0xc0e68f(0x389)](_0x34ea3a,_0x54afeb,_0x2464d5,_0x369621))continue;let _0x1d22e0,_0x56007d;if(_0xf12e===_0x69fe55[_0xc0e68f(0x1b4)])_0x1d22e0=_0xc0e68f(0x31c),_0x56007d=null;else{const _0x293ccd=_0x1c0cd0[_0xc0e68f(0x288)](_0x54afeb,_0x2464d5);_0x293ccd==null?(_0x1d22e0=_0xc0e68f(0x31c),_0x56007d=null):(_0x1d22e0=_0xc0e68f(0x298),_0x56007d=_0x293ccd);}this[_0xc0e68f(0x2b4)]('change',{'env':_0x34ea3a,'type':_0x54afeb,'key':_0x2464d5,'op':_0x1d22e0,'clock':_0x369621,'origin':_0x2f46c4,'value':_0x56007d});}if(_0x337628[_0xc0e68f(0x2ce)])_0x337628[_0xc0e68f(0x300)](_0xc0e68f(0x30e)+_0x34ea3a+':'+_0x54afeb,_0x337628[_0xc0e68f(0x299)]()-_0x1b9ffb,'n='+_0x3a3fc9[_0xc0e68f(0x2de)]);return this[_0xc0e68f(0x220)][_0xc0e68f(0x1b7)](_0x7114cb,Math[_0xc0e68f(0x346)](_0x25d100,_0x2611ca)),_0x1c0cd0[_0xc0e68f(0x356)](_0x54afeb)>_0x2611ca;}['status'](){const _0x4ebcf5=_0x18f3ad;return{'started':this[_0x4ebcf5(0x224)],'quantum':this[_0x4ebcf5(0x18d)],'flushDebounce':this[_0x4ebcf5(0x166)],'cursors':Object[_0x4ebcf5(0x2f3)]([...this[_0x4ebcf5(0x220)][_0x4ebcf5(0x342)]()]['map'](([_0x1c25dd,_0x6cdf9e])=>[_0x1c25dd[_0x4ebcf5(0x2a7)]('\x00',':'),_0x6cdf9e])),'pending':this[_0x4ebcf5(0x1df)][_0x4ebcf5(0x214)],'seen':this[_0x4ebcf5(0x3a2)][_0x4ebcf5(0x214)]};}}return _0x19fa35[_0x18f3ad(0x1ff)]=_0x1b4b98,okdbChangefeed={'OKDBChangefeed':_0x19fa35},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x2cfb4c=_0x727d37;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x105af8=require$$1$1,_0x3c4d23=require$$1,{EVENTS:_0x1dc5b0}=requireOkdbEnums(),_0x5c7635=require$$0$3,{slotKey:_0x57be9e}=requireOkdbProcessRegistry(),_0x12e160=Number(process.env.OKDB_CLUSTER_RESPAWN_BACKOFF_MS)||0xfa,_0x34b5ec=0xfa0,_0x494eb3=0x5,_0x19d6df=0x2710,_0xc36303=0xbb8,_0x2a62a5=0x7d0,_0x5e5af7='__okdbCluster',_0x3db5e2=_0x2cfb4c(0x258),_0x2d1019=_0x2cfb4c(0x19e),_0x454deb=_0x2cfb4c(0x38a),_0x54a2aa=[_0x1dc5b0['VIEW_PROGRESS'],_0x1dc5b0['FTS_REGISTERED'],_0x1dc5b0[_0x2cfb4c(0x32c)],_0x1dc5b0[_0x2cfb4c(0x290)],_0x1dc5b0[_0x2cfb4c(0x1bc)],_0x1dc5b0[_0x2cfb4c(0x1d2)],_0x1dc5b0[_0x2cfb4c(0x28f)],_0x1dc5b0[_0x2cfb4c(0x1a8)],_0x2cfb4c(0x394),_0x2cfb4c(0x1ce),_0x2cfb4c(0x35d),_0x2cfb4c(0x1d5),_0x2cfb4c(0x2ab),_0x2cfb4c(0x368)],_0x1eb5de=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0,_0xfc75fe=0x64;function _0x1c6785(_0x3403a7){const _0x4f5561=_0x2cfb4c;if(!_0x3403a7)return _0x4f5561(0x24c);const _0x251ab8=(_0x3403a7['processors']||[])[_0x4f5561(0x249)](_0x11a127=>[_0x11a127['env'],_0x11a127['id'],_0x11a127['mode'],_0x11a127[_0x4f5561(0x280)],!!_0x11a127['paused'],!!_0x11a127[_0x4f5561(0x276)],!!_0x11a127[_0x4f5561(0x268)],_0x11a127[_0x4f5561(0x160)]?.['pid']??null,_0x11a127['error']?String(_0x11a127[_0x4f5561(0x2fd)]?.[_0x4f5561(0x1c4)]??_0x11a127[_0x4f5561(0x2fd)]):null]);return JSON[_0x4f5561(0x2e8)]([!!_0x3403a7[_0x4f5561(0x242)],_0x251ab8]);}function _0x3888e2({workers:_0x25cdae,makeOkdb:_0x48c061,port:_0x367af4,primaryOkdb:_0x2a363b,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0xa41e3a=_0x2cfb4c;if(_0x105af8[_0xa41e3a(0x193)])return childEntry&&_0x105af8[_0xa41e3a(0x24f)]({'exec':_0x3c4d23['join'](__dirname,_0xa41e3a(0x370)),'args':[],'execArgv':((()=>{const _0x55626d=_0xa41e3a,_0x4e0d8f=[];for(let _0x15fbbc=0x0;_0x15fbbc<process[_0x55626d(0x312)][_0x55626d(0x2de)];_0x15fbbc++){const _0x59ba3b=process['execArgv'][_0x15fbbc];if(_0x59ba3b['startsWith'](_0x55626d(0x35c))||_0x59ba3b['startsWith']('--watch')||_0x59ba3b['startsWith'](_0x55626d(0x1d9)))continue;if(_0x59ba3b==='-e'||_0x59ba3b===_0x55626d(0x1a2)||_0x59ba3b==='-p'||_0x59ba3b===_0x55626d(0x1da)){_0x15fbbc++;continue;}_0x4e0d8f[_0x55626d(0x2d3)](_0x59ba3b);}return _0x4e0d8f;})())}),_0x232c3a({'workers':_0x25cdae,'port':_0x367af4,'primaryOkdb':_0x2a363b,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x367af4});return _0x481ee8({'makeOkdb':_0x48c061,'port':_0x367af4});}function _0x232c3a({workers:_0x5ddfc1,port:_0x20ffbf,primaryOkdb:_0x2805af,workerEnv:_0x161e12,workerRole:_0x36323a,listenAddr:_0x2f1e3a}){const _0x2757eb=_0x2cfb4c,_0x457823=new Map(),_0x581ca0=new Map();let _0x38282f=![];const _0x5141b2=_0x6eaae2=>_0x6eaae2?.[_0x2757eb(0x328)],_0x1d59eb=_0x5c4a91=>{const _0x544c35=_0x2757eb,_0x6c5f5f=_0x105af8[_0x544c35(0x173)]({...process.env,..._0x161e12||{},'OKDB_CLUSTER_SLOT':String(_0x5c4a91)});return _0x6c5f5f['__okdbSlot']=_0x5c4a91,_0x457823[_0x544c35(0x1b7)](_0x6c5f5f[_0x544c35(0x372)][_0x544c35(0x1f0)],{'worker':_0x6c5f5f,'startedAt':Date[_0x544c35(0x299)](),'slot':_0x5c4a91}),_0x6c5f5f['on'](_0x544c35(0x2fd),_0x315b6a=>{const _0x35853b=_0x544c35;console[_0x35853b(0x19e)](_0x35853b(0x259)+_0x6c5f5f[_0x35853b(0x372)]['pid']+_0x35853b(0x2dd)+(_0x315b6a?.['message']??_0x315b6a));}),_0x6c5f5f['on'](_0x544c35(0x339),()=>_0x5e4968()),_0x6c5f5f;},_0x1617a6=_0x49dffc=>{const _0xdeef36=_0x2757eb;for(const {worker:_0x4d8620}of _0x457823[_0xdeef36(0x397)]()){if(_0x4d8620[_0xdeef36(0x34b)]()||!_0x4d8620['isConnected']())continue;try{_0x4d8620['send'](_0x49dffc);}catch{}}};_0x2805af?.[_0x2757eb(0x2ea)]?.({'kind':_0x2757eb(0x2d5),'listenAddr':_0x2f1e3a})['catch'](()=>{}),_0x2805af?.[_0x2757eb(0x376)]?.[_0x2757eb(0x252)]?.({'workersConfigured':_0x5ddfc1});const _0x3966b1={'engines':!![],'processors':!![],'compaction':!![],..._0x36323a,'http':!![]},_0x5e4968=()=>{const _0x3f0c45=_0x2757eb,_0x28352d=_0x2805af?.[_0x3f0c45(0x376)];if(!_0x28352d||!_0x28352d['_isWriter'])return;const _0x3f388f=_0x28352d[_0x3f0c45(0x30a)];for(const {worker:_0x4f08c3,startedAt:_0x1dc835,slot:_0x3c383c,stats:_0x427c0a,processing:_0x1bb074}of _0x457823[_0x3f0c45(0x397)]()){if(_0x4f08c3[_0x3f0c45(0x34b)]())continue;const _0x652c8a=_0x28352d[_0x3f0c45(0x1ea)]?.()&&_0x28352d['getDesired']('slot',_0x15fc42(_0x3c383c))?.[_0x3f0c45(0x266)]===!![];_0x28352d['publishChildRow']({'pid':_0x4f08c3[_0x3f0c45(0x372)][_0x3f0c45(0x1f0)],'startedAt':_0x1dc835,'kind':_0x3f0c45(0x301),'supervisorKey':_0x3f388f,'slot':_0x3c383c,'slotKey':_0x15fc42(_0x3c383c),'role':_0x3966b1,'listenAddr':_0x2f1e3a,'lifecycle':_0x652c8a?_0x3f0c45(0x192):'running','processing':_0x1bb074??null,'stats':_0x427c0a??null})[_0x3f0c45(0x373)](()=>{});}},_0x15fc42=_0x516d95=>_0x57be9e(_0x2757eb(0x189)+_0x20ffbf,_0x516d95),_0x3f181b=_0x1a255b=>{const _0x50597d=_0x2757eb,_0x135831=_0x2805af?.[_0x50597d(0x376)];if(!_0x135831?.['hasDesired']?.())return![];return _0x135831['getDesired'](_0x50597d(0x29a),_0x15fc42(_0x1a255b))?.[_0x50597d(0x266)]===!![];};for(let _0x7244d5=0x0;_0x7244d5<_0x5ddfc1;_0x7244d5++){const _0x3e6488=_0x3f181b(_0x7244d5);_0x581ca0[_0x2757eb(0x1b7)](_0x7244d5,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x3e6488,'respawnTimer':null}),_0x3e6488?console[_0x2757eb(0x19e)](_0x2757eb(0x35a)+_0x7244d5+_0x2757eb(0x1d1)):_0x1d59eb(_0x7244d5);}const _0x178d10=()=>{const _0x5d1352=_0x2757eb,_0x56f9fc=_0x2805af?.[_0x5d1352(0x376)];if(!_0x56f9fc?.['_isWriter']||!_0x56f9fc[_0x5d1352(0x1ea)]?.())return;for(const [_0x13b862,_0x4b373a]of _0x581ca0['entries']()){const _0x465bca=_0x56f9fc['getDesired'](_0x5d1352(0x29a),_0x15fc42(_0x13b862)),_0x3ace03=_0x465bca?.[_0x5d1352(0x266)]===!![],_0x1744f5=_0x465bca?.[_0x5d1352(0x341)]===!![];if(_0x3ace03&&!_0x4b373a[_0x5d1352(0x254)]){_0x4b373a['dead']=!![];_0x4b373a['respawnTimer']&&(clearTimeout(_0x4b373a[_0x5d1352(0x390)]),_0x4b373a[_0x5d1352(0x390)]=null);for(const {worker:_0x21f704}of _0x457823[_0x5d1352(0x397)]()){if(_0x5141b2(_0x21f704)!==_0x13b862||_0x21f704[_0x5d1352(0x34b)]())continue;try{if(_0x1744f5)_0x21f704[_0x5d1352(0x372)][_0x5d1352(0x341)](_0x5d1352(0x332));else _0x21f704[_0x5d1352(0x287)]()&&_0x21f704[_0x5d1352(0x1dd)]();}catch{}}console['log']('[okdb-cluster]\x20'+(_0x1744f5?_0x5d1352(0x1b2):_0x5d1352(0x284))+_0x5d1352(0x255)+_0x13b862+_0x5d1352(0x2df));}else{if(!_0x3ace03&&_0x4b373a['dead']&&_0x465bca){_0x4b373a['dead']=![],_0x4b373a[_0x5d1352(0x331)]=[],_0x4b373a[_0x5d1352(0x343)]=0x0;const _0x34d7df=[..._0x457823['values']()][_0x5d1352(0x28a)](({worker:_0x467366})=>_0x5141b2(_0x467366)===_0x13b862&&!_0x467366[_0x5d1352(0x34b)]());!_0x34d7df&&!_0x38282f&&(_0x1d59eb(_0x13b862),console[_0x5d1352(0x19e)]('[okdb-cluster]\x20recommissioned\x20worker\x20slot='+_0x13b862));}}}},_0x282fa5=()=>{try{_0x178d10();}catch{}};_0x2805af?.[_0x2757eb(0x199)]?.['on']?.(_0x1dc5b0[_0x2757eb(0x33f)],_0x282fa5);const _0x36e3b3=[];if(_0x2805af?.['events']?.['on'])for(const _0x58b59e of _0x54a2aa){const _0x2fda70=_0x42cf8f=>{_0x1617a6({[_0x5e5af7]:_0x3db5e2,'event':_0x58b59e,'data':_0x42cf8f??{}});};_0x2805af[_0x2757eb(0x199)]['on'](_0x58b59e,_0x2fda70),_0x36e3b3[_0x2757eb(0x2d3)]({'event':_0x58b59e,'handler':_0x2fda70});}const _0x5bde57=setInterval(()=>{_0x178d10(),_0x5e4968();},_0x1eb5de);_0x5bde57['unref']?.();const _0x3efb3c=(_0xa91eb0,_0x35aa1d)=>{const _0xf31ffe=_0x2757eb;if(!_0x35aa1d||typeof _0x35aa1d!==_0xf31ffe(0x167)||_0x35aa1d[_0x5e5af7]!==_0x2d1019)return;if(!_0x2805af?.[_0xf31ffe(0x19e)]?.[_0xf31ffe(0x2a9)])return;const _0x32c778=_0x35aa1d[_0xf31ffe(0x2c6)]||{};_0x2805af[_0xf31ffe(0x19e)]['ingest']({..._0x32c778,'msg':'[w'+_0x35aa1d[_0xf31ffe(0x29a)]+']\x20'+(_0x32c778[_0xf31ffe(0x285)]??''),'meta':{..._0x32c778['meta']||{},'worker':_0x35aa1d['slot'],'workerPid':_0x35aa1d[_0xf31ffe(0x1f0)]}});};_0x105af8['on'](_0x2757eb(0x1c4),_0x3efb3c);const _0x5cae28=(_0x39f437,_0x49cb75)=>{const _0x7c5dbc=_0x2757eb;if(!_0x49cb75||typeof _0x49cb75!==_0x7c5dbc(0x167)||_0x49cb75[_0x5e5af7]!==_0x454deb)return;const _0x20ae5f=_0x457823[_0x7c5dbc(0x288)](_0x39f437[_0x7c5dbc(0x372)][_0x7c5dbc(0x1f0)]);if(_0x20ae5f){_0x20ae5f[_0x7c5dbc(0x38a)]={..._0x49cb75[_0x7c5dbc(0x38a)],'at':Date[_0x7c5dbc(0x299)]()};if(_0x49cb75[_0x7c5dbc(0x31d)]!==undefined){const _0x5785ff=_0x1c6785(_0x49cb75[_0x7c5dbc(0x31d)]);_0x5785ff!==_0x20ae5f[_0x7c5dbc(0x2ed)]&&(_0x20ae5f[_0x7c5dbc(0x2ed)]=_0x5785ff,_0x29fe07()),_0x20ae5f[_0x7c5dbc(0x31d)]=_0x49cb75[_0x7c5dbc(0x31d)];}}};let _0x3f2ce2=null;const _0x29fe07=()=>{const _0xb7ed1c=_0x2757eb;if(_0x3f2ce2||_0x38282f)return;_0x3f2ce2=setTimeout(()=>{_0x3f2ce2=null;if(!_0x38282f)_0x5e4968();},_0xfc75fe),_0x3f2ce2[_0xb7ed1c(0x2d7)]?.();};_0x105af8['on']('message',_0x5cae28),_0x105af8['on'](_0x2757eb(0x243),(_0x164ab7,_0x3d1cc9,_0x5b447c)=>{const _0x41132a=_0x2757eb,_0x2f1b7c=_0x164ab7[_0x41132a(0x372)][_0x41132a(0x1f0)],_0x2a45ef=_0x5141b2(_0x164ab7),_0x24184e=_0x457823[_0x41132a(0x288)](_0x2f1b7c);if(_0x24184e&&_0x2805af?.['processes'])_0x2805af[_0x41132a(0x376)][_0x41132a(0x21d)](_0x2f1b7c+':'+_0x24184e[_0x41132a(0x29c)])['catch'](()=>{});_0x457823['delete'](_0x2f1b7c),console['log'](_0x41132a(0x259)+_0x2f1b7c+'\x20(slot='+(_0x2a45ef??'?')+_0x41132a(0x293)+(_0x41132a(0x15e)+_0x3d1cc9+_0x41132a(0x357)+(_0x5b447c??_0x41132a(0x1ca))+_0x41132a(0x272)+_0x457823['size']+_0x41132a(0x18e))),_0x5e4968();if(_0x38282f||_0x2a45ef==null)return;const _0x1fe8c5=_0x581ca0['get'](_0x2a45ef);if(!_0x1fe8c5||_0x1fe8c5[_0x41132a(0x254)])return;const _0x1ec483=Date[_0x41132a(0x299)]();_0x1fe8c5[_0x41132a(0x331)][_0x41132a(0x2d3)](_0x1ec483),_0x1fe8c5[_0x41132a(0x331)]=_0x1fe8c5[_0x41132a(0x331)][_0x41132a(0x232)](_0x593424=>_0x1ec483-_0x593424<=_0x19d6df);if(_0x1fe8c5[_0x41132a(0x331)][_0x41132a(0x2de)]>=_0x494eb3){_0x1fe8c5[_0x41132a(0x254)]=!![],console[_0x41132a(0x2fd)](_0x41132a(0x2da)+_0x2a45ef+_0x41132a(0x34e)+_0x1fe8c5[_0x41132a(0x331)][_0x41132a(0x2de)]+'\x20times\x20in\x20'+(_0x19d6df+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x457823[_0x41132a(0x214)]+'\x20worker(s)\x20still\x20serving'));return;}_0x1fe8c5[_0x41132a(0x343)]++;const _0x2cd895=Math['min'](_0x34b5ec,_0x12e160*0x2**(_0x1fe8c5[_0x41132a(0x343)]-0x1));console['log'](_0x41132a(0x398)+_0x2a45ef+_0x41132a(0x2ff)+_0x2cd895+_0x41132a(0x359)+_0x1fe8c5['consecutiveFailures']+')'),_0x1fe8c5[_0x41132a(0x390)]=setTimeout(()=>{const _0x389bb0=_0x41132a;_0x1fe8c5[_0x389bb0(0x390)]=null;if(_0x38282f||_0x1fe8c5['dead'])return;const _0x3ce59c=_0x1d59eb(_0x2a45ef);_0x3ce59c[_0x389bb0(0x364)](_0x389bb0(0x23a),()=>{const _0x3bbe2e=_0x389bb0;if(_0x581ca0[_0x3bbe2e(0x288)](_0x2a45ef)===_0x1fe8c5)_0x1fe8c5[_0x3bbe2e(0x343)]=0x0;});},_0x2cd895),_0x1fe8c5[_0x41132a(0x390)][_0x41132a(0x2d7)]?.();});const _0x37b2c1=[..._0x457823[_0x2757eb(0x1f8)]()];console[_0x2757eb(0x19e)]('[okdb-cluster]\x20primary\x20pid='+process[_0x2757eb(0x1f0)]+_0x2757eb(0x171)+_0x5ddfc1+_0x2757eb(0x388)+_0x20ffbf+':\x20'+('['+_0x37b2c1['join'](',\x20')+']'));const _0x3fb997={'_isClusterController':!![],'port':_0x20ffbf,'primaryOkdb':_0x2805af??null,'status'(){const _0x382239=_0x2757eb;return{'clustered':!![],'primaryPid':process[_0x382239(0x1f0)],'port':_0x20ffbf,'primaryRole':_0x2805af?.[_0x382239(0x2bd)]??null,'processorPid':null,'supervisorPid':process['pid'],'workers':[..._0x457823['values']()][_0x382239(0x249)](({worker:_0x5a8305})=>({'pid':_0x5a8305[_0x382239(0x372)][_0x382239(0x1f0)],'id':_0x5a8305['id'],'dead':_0x5a8305[_0x382239(0x34b)]()}))};},async 'close'(){const _0x41a22d=_0x2757eb;_0x38282f=!![];for(const _0x5c5247 of _0x581ca0[_0x41a22d(0x397)]()){_0x5c5247['dead']=!![],_0x5c5247[_0x41a22d(0x390)]&&(clearTimeout(_0x5c5247['respawnTimer']),_0x5c5247[_0x41a22d(0x390)]=null);}clearInterval(_0x5bde57);_0x3f2ce2&&(clearTimeout(_0x3f2ce2),_0x3f2ce2=null);_0x105af8[_0x41a22d(0x210)](_0x41a22d(0x1c4),_0x3efb3c),_0x105af8[_0x41a22d(0x210)](_0x41a22d(0x1c4),_0x5cae28),_0x2805af?.[_0x41a22d(0x199)]?.[_0x41a22d(0x210)]?.(_0x1dc5b0[_0x41a22d(0x33f)],_0x282fa5);if(_0x2805af?.['events']?.['off'])for(const {event:_0x4c28ab,handler:_0x2c3362}of _0x36e3b3){try{_0x2805af[_0x41a22d(0x199)][_0x41a22d(0x210)](_0x4c28ab,_0x2c3362);}catch{}}_0x36e3b3[_0x41a22d(0x2de)]=0x0;const _0x2a1527=[..._0x457823[_0x41a22d(0x397)]()]['map'](({worker:_0x5bd3f6})=>_0x5bd3f6);if(_0x2a1527[_0x41a22d(0x2de)]===0x0)return;await Promise[_0x41a22d(0x179)](_0x2a1527[_0x41a22d(0x249)](_0x33e49a=>new Promise(_0x452f83=>{const _0x76d239=_0x41a22d;if(_0x33e49a[_0x76d239(0x34b)]()){_0x452f83();return;}let _0x2bfa7c=![];const _0x406b08=()=>{if(_0x2bfa7c)return;_0x2bfa7c=!![];if(_0x2356c7)clearTimeout(_0x2356c7);_0x452f83();};_0x33e49a[_0x76d239(0x364)](_0x76d239(0x243),_0x406b08);const _0x2356c7=setTimeout(()=>{const _0x3afeab=_0x76d239;try{_0x33e49a[_0x3afeab(0x372)][_0x3afeab(0x341)]();}catch{}},_0xc36303+0x1f4);_0x2356c7['unref']?.();try{_0x33e49a['disconnect']();}catch{try{_0x33e49a[_0x76d239(0x372)][_0x76d239(0x341)]();}catch{}}})));}};return _0x3fb997;}async function _0x481ee8({makeOkdb:_0x6c111b,port:_0x5d1ff0}){const _0x51f5dd=_0x2cfb4c,_0x5eeb42=await _0x6c111b();return _0x122926(_0x5eeb42),_0x5eeb42[_0x51f5dd(0x1e4)][_0x51f5dd(0x2ee)](_0x5d1ff0);}function _0x122926(_0x441a8d){const _0x4b2389=_0x2cfb4c;if(!_0x441a8d||_0x441a8d[_0x4b2389(0x23d)])return;_0x441a8d[_0x4b2389(0x23d)]=!![];try{const {OKDBChangefeed:_0x5e0506}=requireOkdbChangefeed(),_0x1e2de0=_0x441a8d['_adminRelay'];if(_0x1e2de0&&typeof _0x1e2de0[_0x4b2389(0x3a9)]===_0x4b2389(0x2c1)){const _0x2b4b59=new _0x5e0506(_0x441a8d);_0x2b4b59['start'](),_0x1e2de0[_0x4b2389(0x3a9)](_0x2b4b59),_0x441a8d[_0x4b2389(0x2c7)]=_0x2b4b59;}}catch(_0x4f9304){_0x441a8d[_0x4b2389(0x19e)]?.[_0x4b2389(0x39f)]?.(_0x4b2389(0x37e)+(_0x4f9304?.[_0x4b2389(0x1c4)]??_0x4f9304),{'feature':'cluster'});}const _0x13863e=_0x1bfa90=>{const _0x44cc2b=_0x4b2389;if(!_0x1bfa90||typeof _0x1bfa90!==_0x44cc2b(0x167)||_0x1bfa90[_0x5e5af7]==null)return;if(_0x1bfa90[_0x5e5af7]===_0x3db5e2)try{_0x441a8d[_0x44cc2b(0x251)]?.[_0x44cc2b(0x2ae)]?.(_0x1bfa90['event'],_0x1bfa90['data']);}catch{}};process['on']('message',_0x13863e),_0x441a8d[_0x4b2389(0x32e)]=_0x13863e;{let _0x421009=process[_0x4b2389(0x1c1)](),_0x1012aa=Date['now']();const _0x17dd17=()=>{const _0x565ca1=_0x4b2389;if(typeof process[_0x565ca1(0x20d)]!=='function'||!process[_0x565ca1(0x363)])return;const _0x42cdce=Date['now'](),_0x5208a8=process[_0x565ca1(0x1c1)](),_0x264f59=(_0x42cdce-_0x1012aa)*0x3e8,_0x1c0adb=_0x5208a8[_0x565ca1(0x208)]-_0x421009[_0x565ca1(0x208)]+(_0x5208a8[_0x565ca1(0x1f2)]-_0x421009[_0x565ca1(0x1f2)]),_0x7260a8=_0x264f59>0x0?Math['min'](0x64,Math[_0x565ca1(0x358)](_0x1c0adb/(_0x264f59*(_0x5c7635[_0x565ca1(0x315)]()[_0x565ca1(0x2de)]||0x1))*0x64)):0x0;_0x421009=_0x5208a8,_0x1012aa=_0x42cdce;const _0x41577c=process[_0x565ca1(0x248)]();let _0x58f766=null;try{_0x58f766=_0x441a8d[_0x565ca1(0x2bd)]?.[_0x565ca1(0x380)]?_0x441a8d[_0x565ca1(0x376)]?.[_0x565ca1(0x333)]?.()??null:null;}catch{}try{process[_0x565ca1(0x20d)]({[_0x5e5af7]:_0x454deb,'stats':{'rss':_0x41577c[_0x565ca1(0x169)],'heapUsed':_0x41577c[_0x565ca1(0x1f6)],'heapTotal':_0x41577c[_0x565ca1(0x1fa)],'external':_0x41577c[_0x565ca1(0x217)],'cpuPct':_0x7260a8,'cpuWindowMs':Math[_0x565ca1(0x358)](_0x264f59/0x3e8)||null},'processing':_0x58f766});}catch{}},_0x4b69aa=Math[_0x4b2389(0x346)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x227721=setInterval(_0x17dd17,_0x4b69aa);_0x227721[_0x4b2389(0x2d7)]?.(),_0x17dd17();for(const _0x44a7a3 of[_0x4b2389(0x1d5),_0x4b2389(0x2ab)]){_0x441a8d['events']?.['on']?.(_0x44a7a3,()=>{try{_0x17dd17();}catch{}});}}let _0x1b3c49=![];const _0x561ae9=async _0x317e88=>{const _0x2cd77b=_0x4b2389;if(_0x1b3c49)return;_0x1b3c49=!![];const _0x2cb609=setTimeout(()=>process[_0x2cd77b(0x243)](_0x317e88),_0xc36303);_0x2cb609['unref']?.();try{await _0x441a8d[_0x2cd77b(0x1e5)]?.();}catch{}process['exit'](_0x317e88);};process['on']('disconnect',()=>_0x561ae9(0x0));if(process[_0x4b2389(0x20d)]&&!process[_0x4b2389(0x363)])_0x561ae9(0x0);if(process[_0x4b2389(0x2f5)]!=='win32'){const _0x55bf2b=setInterval(()=>{const _0x5ae62b=_0x4b2389;if(process[_0x5ae62b(0x21c)]===0x1)_0x561ae9(0x0);},_0x2a62a5);_0x55bf2b['unref']?.(),_0x441a8d[_0x4b2389(0x262)]=_0x55bf2b;}}return okdbCluster={'runClustered':_0x3888e2,'attachWorkerCluster':_0x122926},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x3ce07d=require$$0$5,{attachWorkerCluster:_0x430403}=requireOkdbCluster();async function _0x489492(){const _0x78c7dd=_0x1c29,_0x4a65ca=process.env.OKDB_HTTP_CHILD;if(!_0x4a65ca)throw new Error(_0x78c7dd(0x387));const {rootPath:_0x397d61,port:_0x46c0c9,options:options={},logLevel:logLevel='info'}=JSON[_0x78c7dd(0x1de)](_0x4a65ca);if(!_0x397d61||!_0x46c0c9)throw new Error('okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required');const _0x15a3fa=new _0x3ce07d(_0x397d61,{...options,'engines':![],'processors':![],'compaction':![]});_0x15a3fa['log'][_0x78c7dd(0x1d7)]?.();const _0x15f225=process.env.OKDB_CLUSTER_SLOT??'?',_0x34b835={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x1b84d0=_0x34b835[logLevel]??_0x34b835['info'];_0x15a3fa[_0x78c7dd(0x19e)][_0x78c7dd(0x18c)](_0x5b2515=>{const _0x2957ed=_0x78c7dd;if((_0x34b835[_0x5b2515['level']]??0x1)<_0x1b84d0)return;try{process[_0x2957ed(0x20d)]?.({'__okdbCluster':_0x2957ed(0x19e),'slot':_0x15f225,'pid':process['pid'],'entry':_0x5b2515});}catch{}}),await _0x15a3fa['open'](),_0x430403(_0x15a3fa),await _0x15a3fa[_0x78c7dd(0x1e4)][_0x78c7dd(0x2ee)](_0x46c0c9);}return _0x489492()['catch'](_0x2a6cdd=>{const _0x424fd2=_0x1c29;try{process[_0x424fd2(0x20d)]?.({'__okdbCluster':_0x424fd2(0x19e),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x424fd2(0x1f0)],'entry':{'level':_0x424fd2(0x2fd),'msg':_0x424fd2(0x170)+(_0x2a6cdd?.[_0x424fd2(0x1c4)]??_0x2a6cdd)}});}catch{}process[_0x424fd2(0x243)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module['exports']=okdbHttpWorkerChild;
|