@kedem/okdb 2.1.2 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- 'use strict';const _0x24af3f=_0x5df3;(function(_0x4cb39a,_0x1ecc8c){const _0x4f5260=_0x5df3,_0x4e03e8=_0x4cb39a();while(!![]){try{const _0x5429ad=parseInt(_0x4f5260(0x1a8))/0x1*(-parseInt(_0x4f5260(0x289))/0x2)+-parseInt(_0x4f5260(0x1a2))/0x3+parseInt(_0x4f5260(0x1f5))/0x4*(-parseInt(_0x4f5260(0x305))/0x5)+-parseInt(_0x4f5260(0x32e))/0x6+-parseInt(_0x4f5260(0x1e2))/0x7*(-parseInt(_0x4f5260(0x1c2))/0x8)+parseInt(_0x4f5260(0x373))/0x9*(-parseInt(_0x4f5260(0x1cd))/0xa)+parseInt(_0x4f5260(0x36f))/0xb;if(_0x5429ad===_0x1ecc8c)break;else _0x4e03e8['push'](_0x4e03e8['shift']());}catch(_0x3b2e45){_0x4e03e8['push'](_0x4e03e8['shift']());}}}(_0x17bb,0x530cb));var require$$0$5=require(_0x24af3f(0x320)),require$$1$1=require(_0x24af3f(0x311)),require$$1=require(_0x24af3f(0x2bb)),require$$0$3=require('os'),require$$2=require(_0x24af3f(0x369)),require$$0=require(_0x24af3f(0x244)),require$$0$2=require(_0x24af3f(0x2c5)),require$$0$1=require('fs'),require$$0$4=require(_0x24af3f(0x1ee));function getDefaultExportFromCjs(_0x7264c){const _0x32c753=_0x24af3f;return _0x7264c&&_0x7264c['__esModule']&&Object['prototype'][_0x32c753(0x36d)]['call'](_0x7264c,_0x32c753(0x279))?_0x7264c[_0x32c753(0x279)]:_0x7264c;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x4dc4d4=_0x24af3f;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x3c517b={'PUT':_0x4dc4d4(0x1dc),'REMOVE':_0x4dc4d4(0x39b),'INDEX_DROP':_0x4dc4d4(0x371),'INDEX_REGISTER':_0x4dc4d4(0x187),'INDEX_RESET':'resetIndex','TYPE_REGISTER':'registerType','TYPE_DROP':_0x4dc4d4(0x189),'FTS_REGISTER':_0x4dc4d4(0x2fa),'FTS_DROP':_0x4dc4d4(0x381),'FTS_RESET':'resetFts','SCHEMA_SET':'setSchema','SCHEMA_DROP':_0x4dc4d4(0x190),'TTL_SET':_0x4dc4d4(0x345),'TTL_CLEAR':'clearTtl'},_0x52ffd8={'SYSTEM_READY':_0x4dc4d4(0x1b1),'SYSTEM_STOPPED':_0x4dc4d4(0x29d),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x4dc4d4(0x227),'SYSTEM_DRAIN':_0x4dc4d4(0x284),'SYSTEM_TYPE_DROP':_0x4dc4d4(0x380),'SYSTEM_PROC':_0x4dc4d4(0x1d7),'SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':_0x4dc4d4(0x19d),'ITEM_UPDATE':_0x4dc4d4(0x30e),'ITEM_REMOVE':_0x4dc4d4(0x3b2),'INDEX_RESET':_0x4dc4d4(0x297),'INDEX_READY':'index:ready','INDEX_PROGRESS':_0x4dc4d4(0x2b1),'VIEW_PROGRESS':'view:progress','INDEX_DROP':_0x4dc4d4(0x390),'INDEX_REGISTERED':_0x4dc4d4(0x27c),'FTS_REGISTERED':'fts:registered','FTS_DROP':_0x4dc4d4(0x2a2),'FTS_RESET':_0x4dc4d4(0x192),'SCHEMA_SET':_0x4dc4d4(0x2ea),'SCHEMA_DROP':_0x4dc4d4(0x1f2),'UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0x4dc4d4(0x376),'REF_VIOLATION':'ref:violation','REF_VIOLATION_RESOLVED':_0x4dc4d4(0x20e),'SYNC_APPLY':_0x4dc4d4(0x257),'TXN_START':'txn:start','TXN_END':'txn:end','TXN_ROLLBACK':_0x4dc4d4(0x2ce),'TYPE_REGISTERED':_0x4dc4d4(0x341),'TYPE_DROP':_0x4dc4d4(0x1a0),'ENV_OPENED':_0x4dc4d4(0x37d),'ENV_REMOVED':_0x4dc4d4(0x383),'SYSTEM_ENV_RELEASE':_0x4dc4d4(0x1a3),'TTL_EXPIRED':_0x4dc4d4(0x348),'TTL_SET':_0x4dc4d4(0x334),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':'license:invalid','LICENSE_ADDED':_0x4dc4d4(0x1f3),'LICENSE_ACTIVATED':_0x4dc4d4(0x31e),'LICENSE_REMOVED':_0x4dc4d4(0x24e)},_0xef4c05={'CREATING':'creating','RESETTING':_0x4dc4d4(0x2b0),'READY':_0x4dc4d4(0x38a),'DROPPING':_0x4dc4d4(0x34b),'WAITING':_0x4dc4d4(0x3ac)},_0x31b495={'CREATED':_0x4dc4d4(0x208),'STARTING':'starting','STARTED':_0x4dc4d4(0x393),'STOPPING':_0x4dc4d4(0x223),'STOPPED':_0x4dc4d4(0x1ae)},_0x35388c={'CREATING':_0x4dc4d4(0x2aa),'READY':_0x4dc4d4(0x38a),'HALTED':_0x4dc4d4(0x207),'STOPPED':_0x4dc4d4(0x1ae),'RESETTING':_0x4dc4d4(0x2b0)},_0x1b9bae=Object[_0x4dc4d4(0x307)]({'POKE':'bus:poke','DRAIN':_0x4dc4d4(0x247),'TYPE_DROP':_0x4dc4d4(0x204),'PROC':_0x4dc4d4(0x382),'ENV_RELEASE':_0x4dc4d4(0x33f)});return okdbEnums={'BUS_EVENTS':_0x1b9bae,'CHANGE_ACTIONS':_0x3c517b,'EVENTS':_0x52ffd8,'INDEX_STATE':_0xef4c05,'OKDB_STATE':_0x31b495,'VIEW_STATE':_0x35388c},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x111874=_0x24af3f;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x149321,performance:_0x2692d3}=require$$0,_0x3d63a7=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG==='true',_0x200265=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x2b3600=process.env.OKDB_LOOP_LAG_ALL==='1',_0x5b7475=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x2385d0{constructor(){const _0x2718ff=_0x5df3;this[_0x2718ff(0x2c6)]=_0x3d63a7,this[_0x2718ff(0x20d)]=new Map(),this['_h']=null,this[_0x2718ff(0x386)]=null,this[_0x2718ff(0x2a9)]=![],this[_0x2718ff(0x28b)]=(_0x1fc0de,_0x315245)=>process[_0x2718ff(0x1b3)][_0x2718ff(0x368)](_0x1fc0de+(_0x315245?'\x20'+JSON[_0x2718ff(0x27a)](_0x315245):'')+'\x0a');}['now'](){const _0x2bbc75=_0x5df3;return _0x2692d3[_0x2bbc75(0x353)]();}['setLogger'](_0xa9e8f0){const _0x21035e=_0x5df3;if(typeof _0xa9e8f0===_0x21035e(0x22c))this[_0x21035e(0x28b)]=_0xa9e8f0;}[_0x111874(0x209)](_0x1aa285,_0x30ac3a,_0x41f3b4){const _0x4db4be=_0x111874;if(!this[_0x4db4be(0x2c6)])return;let _0x53539a=this[_0x4db4be(0x20d)]['get'](_0x1aa285);!_0x53539a&&(_0x53539a={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this['_buckets'][_0x4db4be(0x2b3)](_0x1aa285,_0x53539a)),_0x53539a['ms']+=_0x30ac3a,_0x53539a[_0x4db4be(0x309)]+=0x1,_0x30ac3a>_0x53539a[_0x4db4be(0x275)]&&(_0x53539a[_0x4db4be(0x275)]=_0x30ac3a,_0x53539a['maxExtra']=_0x41f3b4||'');}[_0x111874(0x2b4)](_0x55b330){const _0x3cb63a=_0x111874;if(!this['enabled']||this[_0x3cb63a(0x2a9)])return;this[_0x3cb63a(0x2a9)]=!![];if(_0x55b330)this[_0x3cb63a(0x28b)]=_0x55b330;this['_h']=_0x149321({'resolution':0xa}),this['_h'][_0x3cb63a(0x3aa)](),this[_0x3cb63a(0x386)]=setInterval(()=>this[_0x3cb63a(0x2d6)](),_0x200265);if(this['_timer'][_0x3cb63a(0x36e)])this[_0x3cb63a(0x386)][_0x3cb63a(0x36e)]();}[_0x111874(0x22a)](_0x1fd3bf){const _0xce976f=_0x111874;if(!this[_0xce976f(0x1f9)])this[_0xce976f(0x1f9)]=new Set();this[_0xce976f(0x1f9)][_0xce976f(0x281)](_0x1fd3bf);if(!this[_0xce976f(0x2a9)])this[_0xce976f(0x260)]();}['offWindow'](_0x34a0c0){const _0x5c64fe=_0x111874;this[_0x5c64fe(0x1f9)]?.['delete'](_0x34a0c0);}['_startAdmission'](){const _0x1f2a85=_0x111874;if(this['_admissionStarted'])return;this[_0x1f2a85(0x354)]=!![];!this['_h']&&(this['_h']=_0x149321({'resolution':0xa}),this['_h'][_0x1f2a85(0x3aa)]());const _0x40b979=_0x200265;this[_0x1f2a85(0x38c)]=setInterval(()=>{const _0x2ea680=_0x1f2a85,_0x5c96b5=this['_h'];if(!_0x5c96b5)return;const _0x85abe=_0x5c96b5[_0x2ea680(0x37f)](0x63)/0xf4240,_0x482505=_0x5c96b5[_0x2ea680(0x1fd)]/0xf4240,_0x335e7a=_0x5c96b5[_0x2ea680(0x346)]/0xf4240;_0x5c96b5[_0x2ea680(0x2ee)]();if(this[_0x2ea680(0x1f9)])for(const _0x1eec19 of this[_0x2ea680(0x1f9)]){try{_0x1eec19({'p99Ms':_0x85abe,'maxMs':_0x482505,'meanMs':_0x335e7a,'reportMs':_0x40b979});}catch{}}},_0x40b979);if(this[_0x1f2a85(0x38c)][_0x1f2a85(0x36e)])this['_admissionTimer']['unref']();}[_0x111874(0x2d6)](){const _0x22f5f6=_0x111874,_0x11b683=this['_h'],_0x566fd5=_0x11b683['max']/0xf4240,_0x5991de=_0x11b683[_0x22f5f6(0x37f)](0x63)/0xf4240,_0x45c70d=_0x11b683['mean']/0xf4240;_0x11b683['reset']();const _0xc94d94=[...this[_0x22f5f6(0x20d)][_0x22f5f6(0x3a6)]()][_0x22f5f6(0x28d)](([_0x523c8c,_0x69d9d0])=>({'label':_0x523c8c,..._0x69d9d0}))['sort']((_0x1d619d,_0xe7b0ea)=>_0xe7b0ea['ms']-_0x1d619d['ms'])['slice'](0x0,0x8);this['_buckets'][_0x22f5f6(0x1bc)]();const _0x557585=_0xc94d94[_0x22f5f6(0x2f5)]((_0x27937e,_0x1ff1b1)=>_0x27937e+_0x1ff1b1['ms'],0x0),_0x2de35d=_0xc94d94[_0x22f5f6(0x28d)](_0x4fc215=>_0x4fc215[_0x22f5f6(0x231)]+'='+_0x4fc215['ms'][_0x22f5f6(0x38b)](0x0)+_0x22f5f6(0x211)+_0x4fc215['count']+(_0x4fc215[_0x22f5f6(0x275)]>0x5?'(worst\x20'+_0x4fc215[_0x22f5f6(0x275)][_0x22f5f6(0x38b)](0x0)+'ms'+(_0x4fc215['maxExtra']?'\x20'+_0x4fc215[_0x22f5f6(0x28a)]:'')+')':''));(_0x2b3600||_0x566fd5>=_0x5b7475)&&this[_0x22f5f6(0x28b)](_0x22f5f6(0x1a5)+_0x200265+_0x22f5f6(0x28f)+_0x566fd5[_0x22f5f6(0x38b)](0x0)+'ms\x20p99='+_0x5991de[_0x22f5f6(0x38b)](0x0)+_0x22f5f6(0x32a)+_0x45c70d[_0x22f5f6(0x38b)](0x0)+_0x22f5f6(0x337)+_0x557585['toFixed'](0x0)+'ms'+(_0x2de35d[_0x22f5f6(0x2d8)]?_0x22f5f6(0x310)+_0x2de35d[_0x22f5f6(0x258)]('\x20\x20'):''),{'feature':_0x22f5f6(0x2ff)});if(this[_0x22f5f6(0x1f9)])for(const _0x3184aa of this[_0x22f5f6(0x1f9)]){try{_0x3184aa({'p99Ms':_0x5991de,'maxMs':_0x566fd5,'meanMs':_0x45c70d,'reportMs':_0x200265});}catch{}}}[_0x111874(0x224)](){const _0x3e7887=_0x111874;if(this['_timer'])clearInterval(this['_timer']);if(this['_h'])this['_h'][_0x3e7887(0x1f0)]();this[_0x3e7887(0x386)]=null,this['_h']=null,this[_0x3e7887(0x2a9)]=![];}}const _0x154c79=new _0x2385d0();if(_0x154c79['enabled'])_0x154c79[_0x111874(0x2b4)]();return okdbLoopMonitor={'LOOP':_0x154c79},okdbLoopMonitor;}function _0x17bb(){const _0x50a005=['processor:progress','lifecycle','cluster:','isPrimary','openDB','INDEX_READY','_clusterOrphanWatch','ms\x20mean=','draining','_heartbeatTimer','cpuUsage','2836554kHaVOg','[okdb-cluster]\x20worker\x20pid=','processor:resumed','_inflight','filter','INDEX_RESET','ttl:set','_coordinator','~processes:desired','ms\x20busy=','_committed','disconnect','info','_removeRowAsync','emit','isWanted','find','bus:env_release','parkedNow','type:registered','has','_collectWriterFacet','\x20pid=','setTtl','mean','processors','ttl:expired','_kind','connected','dropping','okdb-http-worker-child.js','workers','pid','_migrateVocab','process','view','nodeKey','now','_admissionStarted','ttlMs','deregisterSelf','_onItem','.log','stopHeartbeat','uncaughtException','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','ingest','_drain','_adminRelay','delete','_bpWaiters','compact','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','prependListener','_holderDead','supervisorKey','user','_nodeDbFor','write','crypto','cpuPct','removeNode','meta','hasOwnProperty','unref','23016620UyBwIx','resetReadTxn','dropIndex','_processStartedAt','36198zykWRH','get','_baselines','unique:violation_resolved','attach','inst:','http','_isWriter','once','indexOf','env:opened','_changefeed','percentile','system:type_drop','dropFts','bus:proc','env:removed','embedded','attachFeed','_timer','_selfKey','flushLmdb','writerStatus','ready','toFixed','_admissionTimer','_maybePublish','exit','\x20@\x20','index:drop','_activateProcesses','noteListenAddr','started','flushDebounce','ms\x20env=','_cursors','registry\x20heartbeat\x20skipped\x20(writer=','startedAt','_dedupeMax','split','remove','_lastCpuUsage','getRange','selfKey',':want','error','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','ENV_CLOSING_RETRY','slot','memoryUsage','1ofN:','entries','_desired','_clusterWorkerAttached','caps','enable','fast','waiting','hostname','holder','inspect','_wantDb','_outstanding','item:remove','respawnTimer','2.1.2','_onTick','listNodes','ITEM_UPDATE','http\x20worker\x20child\x20failed:\x20','off','clearThreadStats','registerIndex','_key','dropType','_flushTimer','standalone','setDesired','isEnabled','REMOVE','_draining','dropSchema','heartbeatMs','fts:reset','assign','node/','_rowKey','cursorKey','heapTotal','_acquiredAt','expiresAt','allSettled','execArgv','dedupeMax','item:create','_children','transaction','type:drop','message','1368105VjifpG','system:env_release','_singletonLock','loop-lag\x20','randomUUID','listDesired','13kYZPzg','listening','_bpParkedTotal','copy','procmode/','_groupByProcess','stopped','cpus','fn-runner','system:ready','_onPoke','stderr','sandbox','_caps','_dedupeKey','catch','_nodeDb','\x20worker(s)\x20still\x20serving','resolve','repeat','clear','uptime','fanout','FTS_REGISTERED','ESRCH','processing','270680WHPogo','SWAP','inflightAgesMs','parse','[okdb-cluster]\x20slot=','_publishFailWarned','open','cli','rowKey','_putRowAsync','__okdbSlot','760gMtDoP','_onStop','level','okdb-diag.','_hbTimer','includes','_lock','_drainOne','okdb-writer:\x20env\x20closing\x20—\x20retry','deaths','system:proc','\x20statusEnv=','win32','__okdbCluster','_collectSingletonClaims','put','busy','singletonClaims',',\x20signal=','_heartbeatInFlight',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','49WHQhjl','VIEW_PROGRESS','values','registerType','external','_wantDbHandle','\x20worker\x20slot=','_rootDb','queue-worker','functions','tierList','_statusEnv','node:events','_nodeDead','disable','raw-put','schema:drop','license:added','splice','938356VrYISf','slice','getProcess','isConnected','_windowCbs','INDEX_REGISTERED','code','_markSeen','max','updatedAt','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','mode','single','push','\x20oldestPendingMs=','bus:type_drop','isDead','consecutiveFailures','halted','created','note','\x20phase=','warn','\x20===','_buckets','ref:violation_resolved','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','mkdirSync','ms/','isHeld','_putRowSync','value','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','isActive','_lastCpuPct','_cmd','slotKey','status','\x20\x20#','processor','flushed','number','processorId','getCmd','_threadStats','removeSync','stopping','stop','processor:paused','host','system:poke','abs','_versionSkewWarned','onWindow','_isStale','function','error:\x20',');\x20','send','_supervisorKey','label','_lockDb','_startHeartbeat','feed:','engines','_buildChildRow','removeSupervisedChild','size','all','processorsView','_flushDebounce','load','_handleInProcess','INDEX_PROGRESS','startsWith','ms\x20(attempt\x20','_highWater','oldestPendingMs','ITEM_REMOVE','node:perf_hooks','_getType','decommissioned','bus:drain','childTransaction','unclaimed','system','toISOString','_systemEnv','recordWrite','license:removed','_lastCpuWindowMs','next','putSync','round','extend','--test','\x0a\x20\x20\x20\x20\x20\x20','events','sync:apply','join','_enqueuedAt','running','stats','kill','[okdb-cluster]\x20primary\x20pid=','\x20HTTP\x20server(s)\x20on\x20port\x20','_quantum','_startAdmission','_isReader','name','markClosed','_handlePoke','decommissioning','_servingEngines','release','SYSTEM_PROC','rss','_seen','\x0a===\x20OKDB_DIAG\x20','~processes:cmd','\x20parkedNow=','_pending','close','role','[okdb-cluster]\x20','\x20\x20env=','publishOwnRow','list','maxMs','sync','SYNC_COMMITS','log','default','stringify','ppid','index:registered','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','envsOpen','quantum','putNode','add','bumpCmd','kind','system:drain','depth','_scheduleFlush','recent\x20writes\x20(newest\x20first)','committed','80006rLwAMX','maxExtra','_log','namespace','map','_role','ms\x20max=','getDesired','\x20(durable\x20desired-state)','keys','beforeWrite','dumpedAt','\x20died\x20','\x20times\x20in\x20','index:reset','decommission','data','instances','listenAddr','exports','system:stopped','processes','registry\x20publish\x20failing:\x20','processor:error','confirm','fts:drop','commitP99Ms','threads','building','publishChildRow','change','children','_started','creating','_desiredOverlay','acquiredAt','_envs','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','floor','resetting','index:progress','seq','set','start','online','options','processor:retry','ms\x20on\x20env=','setOwnMeta','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','path','SIGKILL','claims','state','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','createEnvironment','async','sort','_participate','version','perf_hooks','enabled','min','--inspect','appendFileSync','ORPHAN\x20(env-closed\x20write)','epoch','_refreshDesiredSnapshot','_buildOwnRow','txn:rollback','http-server','type','dead','shift','ITEM_CREATE','primary','_closed','_report','_buildProcessingFacet','length','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.','processor:ready','stack','reap','_lastCpuAt','env','process\x20','\x20ipc\x20error:\x20','from','_instanceId','_sandbox','processKey','then','\x20in\x20','_publishNow','claimGated','_onProcEvent','schema:set','object','_durs','_startedAt','reset','startHeartbeat',')\x20exited\x20','_done','addSupervisedChild','node','runtimeProcessesView','reduce','listen','participate','getChanges','~lock','registerFts','--print','event','_lastPublishAt','afterWrite','loop-lag','_writer','\x20worker(s)\x20remaining','okdb','_ownMeta','_db','5RRhotu','string','freeze','commit','count','SYSTEM_POKE','\x20forked\x20','getClock','tryAcquire','item:update','transactionSync','\x20│\x20','cluster','_listenAddr','_singletonLocks','_enableChangelog','SYSTEM_STOPPED','worker','updateSupervisedChildStats','hasDesired','_ensureDesired','heapUsed','_released','--watch','_nodeDbCache','license:activated','cpuWindowMs','./okdb','FTS_DROP','fork'];_0x17bb=function(){return _0x50a005;};return _0x17bb();}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x2daff2=require$$0$1,_0x3c31e2=require$$1;let _0x5d48db,_0x44522a,_0x4bf118,_0x133cb5,_0x5c28b4,_0x416290,_0x2f4cd8,_0x47f1c9=![];const _0x216139=new Set();let _0x260ead=null;const _0x552eba=new Map();function _0x5a8162(){const _0x34204b=_0x5df3;if(_0x5d48db!==undefined)return _0x5d48db;_0x5d48db=process.env.OKDB_DIAG==='1';if(!_0x5d48db)return![];_0x44522a=process.env.OKDB_DIAG_STACK==='1',_0x133cb5=Math[_0x34204b(0x1fd)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x4bf118=new Array(_0x133cb5),_0x5c28b4=0x0,_0x416290=0x0,_0x2f4cd8=process.env.OKDB_DIAG_DIR||null;if(_0x2f4cd8)try{_0x2daff2[_0x34204b(0x210)](_0x2f4cd8,{'recursive':!![]});}catch{}return!![];}function _0xedb912(){return _0x5d48db===undefined?_0x5a8162():_0x5d48db;}function _0x29471e(_0x52d47c,_0x2c9188){const _0x1d0cd2=_0x5df3;if(_0x5d48db===undefined?!_0x5a8162():!_0x5d48db)return;let _0x546946;if(_0x44522a){const _0xe93842=new Error()[_0x1d0cd2(0x2db)]||'';_0x546946=_0xe93842[_0x1d0cd2(0x39a)]('\x0a')[_0x1d0cd2(0x1f6)](0x3)[_0x1d0cd2(0x28d)](_0x5bcdd7=>_0x5bcdd7['trim']())[_0x1d0cd2(0x332)](Boolean)[_0x1d0cd2(0x1f6)](0x0,0x8);}_0x4bf118[_0x5c28b4]={'seq':_0x416290++,'t':Date[_0x1d0cd2(0x353)](),'env':_0x52d47c,'kind':_0x2c9188||_0x1d0cd2(0x308),'stack':_0x546946},_0x5c28b4=(_0x5c28b4+0x1)%_0x133cb5;}function _0x926dad(_0x5f58dc){const _0xcee69b=_0x5df3,_0x2e1c12=[];for(let _0xb4299c=0x0;_0xb4299c<_0x133cb5;_0xb4299c++){const _0x1027d8=_0x4bf118[(_0x5c28b4-0x1-_0xb4299c+_0x133cb5*0x2)%_0x133cb5];if(!_0x1027d8)continue;_0x2e1c12[_0xcee69b(0x202)](_0x1027d8);if(_0x2e1c12['length']>=_0x5f58dc)break;}return _0x2e1c12;}function _0x4d89a2(_0x4df45f){const _0x566966=_0x5df3;try{process['stderr'][_0x566966(0x368)](_0x4df45f+'\x0a');}catch{}if(_0x2f4cd8)try{_0x2daff2[_0x566966(0x2c9)](_0x3c31e2[_0x566966(0x258)](_0x2f4cd8,_0x566966(0x1d0)+process[_0x566966(0x34e)]+_0x566966(0x358)),_0x4df45f+'\x0a');}catch{}}function _0x244490(_0x9e9315){const _0x29e0f6=_0x5df3,_0x594fdf=_0x926dad(_0x9e9315);if(!_0x594fdf[_0x29e0f6(0x2d8)])return _0x29e0f6(0x362);const _0x3a1bae=Date[_0x29e0f6(0x353)]();return _0x594fdf[_0x29e0f6(0x28d)](_0x4c5e3d=>{const _0x23cc28=_0x29e0f6,_0x208e8a=_0x23cc28(0x21b)+_0x4c5e3d[_0x23cc28(0x2b2)]+'\x20-'+(_0x3a1bae-_0x4c5e3d['t'])+_0x23cc28(0x395)+_0x4c5e3d[_0x23cc28(0x2de)]+'\x20'+_0x4c5e3d[_0x23cc28(0x283)];return _0x4c5e3d[_0x23cc28(0x2db)]&&_0x4c5e3d[_0x23cc28(0x2db)]['length']?_0x208e8a+_0x23cc28(0x255)+_0x4c5e3d[_0x23cc28(0x2db)][_0x23cc28(0x258)](_0x23cc28(0x255)):_0x208e8a;})['join']('\x0a');}function _0x570d5f(_0x355c8b,_0x183355){const _0x375da3=_0x5df3,_0x309279=_0x375da3(0x26b)+_0x355c8b+_0x375da3(0x38f)+new Date()[_0x375da3(0x24b)]()+_0x375da3(0x344)+process[_0x375da3(0x34e)]+'\x20===',_0xbacde=[_0x309279,_0x375da3(0x22d)+(_0x183355&&_0x183355[_0x375da3(0x2db)]?_0x183355[_0x375da3(0x2db)]['split']('\x0a')[0x0]:_0x183355),_0x375da3(0x287)+(_0x44522a?'':_0x375da3(0x27d))+':',_0x244490(0x18),_0x4fac0c(),'='[_0x375da3(0x1bb)](_0x309279[_0x375da3(0x2d8)]-0x1)];_0x4d89a2(_0xbacde[_0x375da3(0x258)]('\x0a'));}function _0x1d557c(_0x362b4c){const _0x360ac8=_0x5df3;if(!_0xedb912())return;const _0x75803b=String(_0x362b4c&&_0x362b4c[_0x360ac8(0x1a1)]||_0x362b4c||''),_0x5174b9=/already closed|environment is already|invalid read txn|reset an invalid/i['test'](_0x75803b);_0x570d5f(_0x5174b9?_0x360ac8(0x2ca):_0x360ac8(0x35a),_0x362b4c);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x5174b9)return;try{console[_0x360ac8(0x3a0)](_0x362b4c&&_0x362b4c[_0x360ac8(0x2db)]?_0x362b4c['stack']:_0x362b4c);}catch{}process[_0x360ac8(0x38e)](0x1);}function _0x4c7ea7(_0x433f14){const _0x3e7f18=_0x5df3;if(!_0xedb912())return;const _0x39a5fb=String(_0x433f14&&_0x433f14[_0x3e7f18(0x1a1)]||_0x433f14||'');/already closed|environment is already|invalid read txn|reset an invalid/i['test'](_0x39a5fb)&&_0x570d5f(_0x3e7f18(0x215),_0x433f14);}function _0x4fac0c(){const _0x3079d8=_0x5df3,_0x48f95e=[_0x3079d8(0x20f)];let _0x7f8093=![];for(const _0x129b52 of _0x216139){const _0xf3a7d6=_0x129b52&&_0x129b52[_0x3079d8(0x2ad)];if(!_0xf3a7d6)continue;for(const [_0x5b710a,_0x4f0e5f]of _0xf3a7d6){const _0x5aa492=_0x4f0e5f&&_0x4f0e5f[_0x3079d8(0x335)]&&_0x4f0e5f[_0x3079d8(0x335)]['view'];if(!_0x5aa492)continue;let _0x2111e5,_0x18c63c;try{_0x2111e5=Atomics[_0x3079d8(0x23c)](_0x5aa492,0x0),_0x18c63c=Atomics[_0x3079d8(0x23c)](_0x5aa492,0x1);}catch{continue;}if(_0x2111e5===0x0)continue;_0x7f8093=!![];const _0x17067e=_0x2111e5>0x0?_0x3079d8(0x1c3):_0x3079d8(0x1ab),_0x32a4a2=Date[_0x3079d8(0x353)]()-Math[_0x3079d8(0x228)](_0x2111e5)*0x3e8,_0x11d194=((()=>{const _0xced5e9=_0x3079d8;try{return _0x4f0e5f['_writer']&&_0x4f0e5f[_0xced5e9(0x300)][_0xced5e9(0x21a)]?_0x4f0e5f[_0xced5e9(0x300)][_0xced5e9(0x21a)]():null;}catch{return null;}})());_0x48f95e[_0x3079d8(0x202)](_0x3079d8(0x272)+_0x5b710a+_0x3079d8(0x20a)+_0x17067e+'\x20drainAge='+_0x32a4a2+'ms\x20activeWriters='+_0x18c63c+(_0x11d194?'\x20writer{depth='+_0x11d194[_0x3079d8(0x285)]+_0x3079d8(0x203)+_0x11d194['oldestPendingMs']+_0x3079d8(0x26d)+_0x11d194[_0x3079d8(0x340)]+'}':''));}}if(!_0x7f8093)_0x48f95e[_0x3079d8(0x202)]('\x20\x20(no\x20env\x20draining)');return _0x48f95e[_0x3079d8(0x258)]('\x0a');}function _0x351391(){const _0x3fb0a8=_0x5df3;if(!_0xedb912())return;const _0x2a0a42=Math[_0x3fb0a8(0x1fd)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x279e91=Date[_0x3fb0a8(0x353)]();for(const _0x17f4c2 of _0x216139){const _0x45f884=_0x17f4c2&&_0x17f4c2[_0x3fb0a8(0x2ad)];if(!_0x45f884)continue;for(const [_0x274e92,_0x22ecfe]of _0x45f884){const _0x4c9f1c=_0x22ecfe&&_0x22ecfe[_0x3fb0a8(0x335)]&&_0x22ecfe['_coordinator'][_0x3fb0a8(0x351)];if(!_0x4c9f1c)continue;let _0x563f96;try{_0x563f96=Atomics['load'](_0x4c9f1c,0x0);}catch{continue;}const _0x1592ad=_0x17f4c2[_0x3fb0a8(0x2bb)]+'|'+_0x274e92;if(_0x563f96<=0x0){_0x552eba[_0x3fb0a8(0x35f)](_0x1592ad);continue;}const _0xa2da14=_0x279e91-_0x563f96*0x3e8,_0xd4cf5f=_0x552eba[_0x3fb0a8(0x374)](_0x1592ad);if(_0xa2da14<_0x2a0a42)continue;if(_0xd4cf5f&&_0x279e91-_0xd4cf5f[_0x3fb0a8(0x294)]<_0x2a0a42)continue;_0x552eba[_0x3fb0a8(0x2b3)](_0x1592ad,{'firstTs':_0xd4cf5f?_0xd4cf5f['firstTs']:_0x563f96,'dumpedAt':_0x279e91});const _0x440074=_0x3fb0a8(0x35b)+_0xa2da14+_0x3fb0a8(0x2b8)+_0x274e92+'\x20@\x20'+new Date()['toISOString']()+_0x3fb0a8(0x344)+process[_0x3fb0a8(0x34e)]+_0x3fb0a8(0x20c);_0x4d89a2([_0x440074,_0x4fac0c(),'='['repeat'](_0x440074[_0x3fb0a8(0x2d8)]-0x1)]['join']('\x0a'));}}}function _0x1f282a(){const _0x43d4a7=_0x5df3;if(!_0xedb912()||_0x47f1c9)return;_0x47f1c9=!![],process['prependListener'](_0x43d4a7(0x35a),_0x1d557c),process[_0x43d4a7(0x363)]('unhandledRejection',_0x4c7ea7);const _0x11acd3=Math[_0x43d4a7(0x1fd)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x260ead=setInterval(_0x351391,_0x11acd3);if(_0x260ead['unref'])_0x260ead['unref']();}function _0x1d34a0(_0xd7df14){const _0x3dc037=_0x5df3;if(!_0xedb912()||!_0xd7df14)return;_0x216139[_0x3dc037(0x281)](_0xd7df14),_0x1f282a();}function _0x1a75a6(_0x4e49aa){const _0x5c623f=_0x5df3;_0x216139[_0x5c623f(0x35f)](_0x4e49aa);}function _0x3ceb19(){const _0x2afab4=_0x5df3;if(!_0xedb912())return{'enabled':![],'hint':_0x2afab4(0x2ae)};return{'enabled':!![],'stackCapture':!!_0x44522a,'recentWrites':_0x926dad(0x10),'drain':_0x4fac0c()};}return okdbDiag={'isEnabled':_0xedb912,'recordWrite':_0x29471e,'installDiag':_0x1f282a,'registerOkdb':_0x1d34a0,'unregisterOkdb':_0x1a75a6,'snapshot':_0x3ceb19},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x18cfbe=_0x24af3f;if(hasRequiredOkdbWriter)return okdbWriter[_0x18cfbe(0x29c)];hasRequiredOkdbWriter=0x1;const {performance:_0x5c6726}=require$$0$2,_0x434b6a=requireOkdbDiag(),_0x5a99c=process.env.OKDB_COMMIT_MODE===_0x18cfbe(0x276);class _0x500f45{constructor(_0x90e9c){const _0x2c8950=_0x18cfbe;this['env']=_0x90e9c,this[_0x2c8950(0x331)]=new Set(),this[_0x2c8950(0x259)]=new Map(),this[_0x2c8950(0x338)]=0x0,this['_durs']=[],this[_0x2c8950(0x2f1)]=[],this[_0x2c8950(0x241)]=Math[_0x2c8950(0x1fd)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x2c8950(0x3b1)]=0x0,this[_0x2c8950(0x360)]=[],this[_0x2c8950(0x1aa)]=0x0;}async[_0x18cfbe(0x19f)](_0x30b9b2,_0x2da728){const _0x49542b=_0x18cfbe;if(_0x434b6a[_0x49542b(0x18d)]())_0x434b6a[_0x49542b(0x24d)](this[_0x49542b(0x2de)]?.[_0x49542b(0x262)],_0x2da728);if(this[_0x49542b(0x2d5)]){const _0x56dc65=new Error(_0x49542b(0x1d5));_0x56dc65[_0x49542b(0x1fb)]=_0x49542b(0x3a2);throw _0x56dc65;}if(this[_0x49542b(0x241)]>0x0){let _0x49bb35=![];while(this[_0x49542b(0x3b1)]>=this[_0x49542b(0x241)]&&!this[_0x49542b(0x2d5)]){!_0x49bb35&&(_0x49bb35=!![],this[_0x49542b(0x1aa)]++),await new Promise(_0x569a98=>this['_bpWaiters'][_0x49542b(0x202)](_0x569a98));}if(this[_0x49542b(0x2d5)]){const _0x424f08=new Error(_0x49542b(0x1d5));_0x424f08['code']=_0x49542b(0x3a2);throw _0x424f08;}}this[_0x49542b(0x3b1)]++;const _0x12a279=this[_0x49542b(0x2de)][_0x49542b(0x335)];if(_0x12a279)await _0x12a279[_0x49542b(0x293)]();if(this[_0x49542b(0x2d5)]){if(_0x12a279)_0x12a279['afterWrite']();this[_0x49542b(0x3b1)]--;if(this[_0x49542b(0x360)][_0x49542b(0x2d8)]&&this['_outstanding']<this['_highWater'])this[_0x49542b(0x360)]['shift']()();const _0x14d9d9=new Error(_0x49542b(0x1d5));_0x14d9d9[_0x49542b(0x1fb)]='ENV_CLOSING_RETRY';throw _0x14d9d9;}const _0x337354=_0x5c6726['now']();if(_0x5a99c)try{const _0x2ae5fb=this[_0x49542b(0x2de)]['db'][_0x49542b(0x30f)](_0x30b9b2);this[_0x49542b(0x338)]++;if(this[_0x49542b(0x2ec)][_0x49542b(0x202)](_0x5c6726['now']()-_0x337354)>0x100)this[_0x49542b(0x2ec)][_0x49542b(0x2d2)]();if(this[_0x49542b(0x2f1)][_0x49542b(0x202)](_0x5c6726[_0x49542b(0x353)]())>0x800)this['_done'][_0x49542b(0x2d2)]();return _0x2ae5fb;}finally{this['_outstanding']--;if(this[_0x49542b(0x360)]['length']&&this[_0x49542b(0x3b1)]<this['_highWater'])this[_0x49542b(0x360)][_0x49542b(0x2d2)]()();if(_0x12a279)_0x12a279[_0x49542b(0x2fe)]();}const _0xc30d6c=this['env']['db'][_0x49542b(0x248)](_0x30b9b2);this['_inflight'][_0x49542b(0x281)](_0xc30d6c),this[_0x49542b(0x259)][_0x49542b(0x2b3)](_0xc30d6c,_0x337354);const _0x257f3a=()=>{const _0x41633a=_0x49542b;this[_0x41633a(0x331)][_0x41633a(0x35f)](_0xc30d6c),this[_0x41633a(0x259)][_0x41633a(0x35f)](_0xc30d6c),this['_committed']++,this['_outstanding']--;this['_bpWaiters'][_0x41633a(0x2d8)]&&this[_0x41633a(0x3b1)]<this[_0x41633a(0x241)]&&this['_bpWaiters']['shift']()();if(this[_0x41633a(0x2ec)][_0x41633a(0x202)](_0x5c6726['now']()-_0x337354)>0x100)this[_0x41633a(0x2ec)][_0x41633a(0x2d2)]();if(this['_done'][_0x41633a(0x202)](_0x5c6726[_0x41633a(0x353)]())>0x800)this['_done'][_0x41633a(0x2d2)]();};_0xc30d6c[_0x49542b(0x2e5)](_0x257f3a,_0x257f3a);try{return await _0xc30d6c;}finally{if(_0x12a279)_0x12a279[_0x49542b(0x2fe)]();}}[_0x18cfbe(0x21a)](){const _0x2dcb18=_0x18cfbe,_0x2e44a0=_0x5c6726['now']();let _0x33597b=0x0;for(const _0x122968 of this['_enqueuedAt'][_0x2dcb18(0x1e4)]()){const _0x1bb259=_0x2e44a0-_0x122968;if(_0x1bb259>_0x33597b)_0x33597b=_0x1bb259;}let _0xd633cb=0x0;for(let _0x533bc1=this['_done']['length']-0x1;_0x533bc1>=0x0;_0x533bc1--){if(_0x2e44a0-this[_0x2dcb18(0x2f1)][_0x533bc1]>0x3e8)break;_0xd633cb++;}let _0x11fd92=0x0;if(this[_0x2dcb18(0x2ec)]['length']){const _0x4be68b=[...this[_0x2dcb18(0x2ec)]][_0x2dcb18(0x2c2)]((_0x6f199f,_0xa7cd7d)=>_0x6f199f-_0xa7cd7d);_0x11fd92=_0x4be68b[Math['min'](_0x4be68b[_0x2dcb18(0x2d8)]-0x1,Math[_0x2dcb18(0x2af)](_0x4be68b['length']*0.99))];}return{'depth':this[_0x2dcb18(0x331)][_0x2dcb18(0x238)],'oldestPendingMs':Math['round'](_0x33597b),'committed':this[_0x2dcb18(0x338)],'commitsPerSec':_0xd633cb,'commitP99Ms':Math[_0x2dcb18(0x252)](_0x11fd92),'parkedNow':this['_bpWaiters'][_0x2dcb18(0x2d8)],'parkedTotal':this[_0x2dcb18(0x1aa)],'highWater':this[_0x2dcb18(0x241)]};}[_0x18cfbe(0x1c4)](){const _0x249476=_0x18cfbe,_0x4f98c5=_0x5c6726[_0x249476(0x353)]();return[...this['_enqueuedAt'][_0x249476(0x1e4)]()][_0x249476(0x28d)](_0x24242e=>Math[_0x249476(0x252)](_0x4f98c5-_0x24242e))['sort']((_0x2961e4,_0x3d4046)=>_0x3d4046-_0x2961e4);}[_0x18cfbe(0x263)](){const _0x7d22de=_0x18cfbe;this[_0x7d22de(0x2d5)]=!![];for(const _0x29d1ed of this[_0x7d22de(0x360)][_0x7d22de(0x1f4)](0x0))_0x29d1ed();}async['drain'](){const _0x3adf92=_0x18cfbe;let _0x29ac37=0x0;while(this[_0x3adf92(0x331)][_0x3adf92(0x238)]&&_0x29ac37++<0x3e8){await Promise[_0x3adf92(0x19a)]([...this[_0x3adf92(0x331)]]);}}async['put'](_0x14b031,_0x37ff82,_0x408793,_0xf8a836){const _0x1232c9=_0x18cfbe;return this[_0x1232c9(0x19f)](()=>{const _0x5350ad=_0x1232c9;if(_0xf8a836===undefined)_0x14b031['putSync'](_0x37ff82,_0x408793);else _0x14b031[_0x5350ad(0x251)](_0x37ff82,_0x408793,_0xf8a836);},_0x1232c9(0x1f1));}async[_0x18cfbe(0x39b)](_0x2048d7,_0x2064a9){const _0x46d06e=_0x18cfbe;return this[_0x46d06e(0x19f)](()=>_0x2048d7['removeSync'](_0x2064a9),'raw-remove');}}async function _0xcfd164(_0x1653d5,_0x1ee94d){const _0x153d14=_0x18cfbe;if(_0x1ee94d==null)_0x1ee94d=Math[_0x153d14(0x1fd)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x436132=_0x1653d5?.[_0x153d14(0x21d)];if(!_0x436132||typeof _0x436132[_0x153d14(0x2e5)]!==_0x153d14(0x22c))return;await Promise['race']([Promise[_0x153d14(0x1ba)](_0x436132)[_0x153d14(0x1b7)](()=>{}),new Promise(_0x286cdc=>{const _0x5af94d=_0x153d14,_0x525151=setTimeout(_0x286cdc,_0x1ee94d);if(_0x525151[_0x5af94d(0x36e)])_0x525151[_0x5af94d(0x36e)]();})]);}catch{}}function _0x449c83(_0xf7b397){const _0x35e1cf=_0x18cfbe;if(_0x5a99c)return Promise['resolve']();const _0x3ab2de=_0xf7b397?.[_0x35e1cf(0x288)];return _0x3ab2de&&typeof _0x3ab2de[_0x35e1cf(0x2e5)]===_0x35e1cf(0x22c)?_0x3ab2de:Promise[_0x35e1cf(0x1ba)]();}return okdbWriter[_0x18cfbe(0x29c)]=_0x500f45,okdbWriter['exports'][_0x18cfbe(0x388)]=_0xcfd164,okdbWriter[_0x18cfbe(0x29c)][_0x18cfbe(0x288)]=_0x449c83,okdbWriter[_0x18cfbe(0x29c)][_0x18cfbe(0x277)]=_0x5a99c,okdbWriter[_0x18cfbe(0x29c)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x4bf4de=_0x24af3f;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x42cc65=require$$0$3,{SYNC_COMMITS:_0x365f91}=requireOkdbWriter(),_0x35c186=_0x4bf4de(0x2f9);class _0x19e39a{constructor(_0x20924e,_0x3c5f4a,_0xd490a0){const _0x440271=_0x4bf4de;this[_0x440271(0x1d3)]=_0x20924e,this[_0x440271(0x188)]=_0x3c5f4a,this['_acquiredAt']=_0xd490a0,this[_0x440271(0x31b)]=![],this['_heartbeatTimer']=null,this[_0x440271(0x1e0)]=null;}[_0x4bf4de(0x212)](){const _0x2d1e37=_0x4bf4de;if(this[_0x2d1e37(0x31b)])return![];try{const _0x35ed91=this['_lock']['_db']()[_0x2d1e37(0x374)](this[_0x2d1e37(0x188)]);if(!_0x35ed91||_0x35ed91[_0x2d1e37(0x2ac)]!==this[_0x2d1e37(0x198)])return![];const _0x4c127e=_0x35ed91[_0x2d1e37(0x1fe)]??_0x35ed91['acquiredAt'];if(_0x4c127e+_0x35ed91[_0x2d1e37(0x355)]<Date[_0x2d1e37(0x353)]())return![];return!![];}catch{return!this['_released'];}}[_0x4bf4de(0x3ae)](){const _0x33000f=_0x4bf4de;if(this[_0x33000f(0x31b)])return null;try{return this[_0x33000f(0x1d3)][_0x33000f(0x304)]()[_0x33000f(0x374)](this[_0x33000f(0x188)])??null;}catch{return null;}}async[_0x4bf4de(0x253)](_0x4a2337){const _0x19f507=_0x4bf4de;if(this[_0x19f507(0x31b)])return;try{const _0x26649c=this[_0x19f507(0x1d3)]['_db']()[_0x19f507(0x374)](this[_0x19f507(0x188)]);if(!_0x26649c||_0x26649c[_0x19f507(0x2ac)]!==this[_0x19f507(0x198)])return;if(_0x365f91)this[_0x19f507(0x1d3)][_0x19f507(0x304)]()[_0x19f507(0x251)](this[_0x19f507(0x188)],{..._0x26649c,'ttlMs':_0x26649c[_0x19f507(0x355)]+_0x4a2337});else await this[_0x19f507(0x1d3)][_0x19f507(0x304)]()['put'](this[_0x19f507(0x188)],{..._0x26649c,'ttlMs':_0x26649c[_0x19f507(0x355)]+_0x4a2337});}catch{}}async[_0x4bf4de(0x267)](){const _0x2c2342=_0x4bf4de;if(this[_0x2c2342(0x31b)])return;if(this[_0x2c2342(0x1e0)])try{await this[_0x2c2342(0x1e0)];}catch{}clearInterval(this[_0x2c2342(0x32c)]),this[_0x2c2342(0x32c)]=null,this[_0x2c2342(0x31b)]=!![];try{const _0x9550c5=this['_lock'][_0x2c2342(0x304)]()[_0x2c2342(0x374)](this[_0x2c2342(0x188)]);if(_0x9550c5&&_0x9550c5[_0x2c2342(0x2ac)]===this[_0x2c2342(0x198)]){if(_0x365f91)this[_0x2c2342(0x1d3)]['_db']()['removeSync'](this[_0x2c2342(0x188)]);else await this[_0x2c2342(0x1d3)][_0x2c2342(0x304)]()[_0x2c2342(0x39b)](this['_key']);}}catch{}}['_startHeartbeat'](_0x3751ae,_0x56ac25){const _0x2acb91=_0x4bf4de,_0x5e66ba=_0x56ac25??Math[_0x2acb91(0x2af)](_0x3751ae/0x3);this[_0x2acb91(0x32c)]=setInterval(()=>{const _0x308372=_0x2acb91;if(this[_0x308372(0x31b)])return;this[_0x308372(0x1e0)]=((async()=>{const _0xe8fbc0=_0x308372;try{const _0x4e89f3=this[_0xe8fbc0(0x1d3)]['_db']()[_0xe8fbc0(0x374)](this[_0xe8fbc0(0x188)]);if(!_0x4e89f3||_0x4e89f3['acquiredAt']!==this[_0xe8fbc0(0x198)]){this[_0xe8fbc0(0x31b)]=!![],clearInterval(this[_0xe8fbc0(0x32c)]),this[_0xe8fbc0(0x32c)]=null;return;}if(_0x365f91)this[_0xe8fbc0(0x1d3)]['_db']()[_0xe8fbc0(0x251)](this[_0xe8fbc0(0x188)],{..._0x4e89f3,'updatedAt':Date['now']()});else await this[_0xe8fbc0(0x1d3)][_0xe8fbc0(0x304)]()[_0xe8fbc0(0x1dc)](this['_key'],{..._0x4e89f3,'updatedAt':Date[_0xe8fbc0(0x353)]()});}catch{}this[_0xe8fbc0(0x1e0)]=null;})());},_0x5e66ba);if(this[_0x2acb91(0x32c)]['unref'])this[_0x2acb91(0x32c)][_0x2acb91(0x36e)]();}}class _0x55192f{constructor(_0x4ad7d1,{namespace:_0x8a8ac6,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x1cbfda=_0x4bf4de;this['_rawDb']=_0x4ad7d1,this['namespace']=_0x8a8ac6,this[_0x1cbfda(0x355)]=ttlMs,this[_0x1cbfda(0x191)]=heartbeatMs,this[_0x1cbfda(0x232)]=null;}[_0x4bf4de(0x304)](){const _0x3a11e4=_0x4bf4de;return!this[_0x3a11e4(0x232)]&&(this['_lockDb']=this['_rawDb'][_0x3a11e4(0x327)](_0x35c186,{'dupSort':![]})),this[_0x3a11e4(0x232)];}[_0x4bf4de(0x3b0)](){const _0xab8d52=_0x4bf4de;return!this[_0xab8d52(0x1e7)]&&(this[_0xab8d52(0x1e7)]=this['_rawDb']['openDB'](_0x35c186+_0xab8d52(0x39f),{'dupSort':![]})),this[_0xab8d52(0x1e7)];}[_0x4bf4de(0x188)](_0x56f5c3){const _0x13f8a2=_0x4bf4de;return this[_0x13f8a2(0x28c)]+':'+_0x56f5c3;}['signalWant'](_0x130008){const _0x147a95=_0x4bf4de;try{_0x365f91?this[_0x147a95(0x3b0)]()['putSync'](this[_0x147a95(0x188)](_0x130008),Date[_0x147a95(0x353)]()):this[_0x147a95(0x3b0)]()[_0x147a95(0x1dc)](this[_0x147a95(0x188)](_0x130008),Date['now']())?.['catch']?.(()=>{});}catch{}}[_0x4bf4de(0x33d)](_0x1d3b47,_0x581a24=0x3e8){const _0x449bca=_0x4bf4de;try{const _0x313292=this[_0x449bca(0x3b0)]()['get'](this[_0x449bca(0x188)](_0x1d3b47));return typeof _0x313292===_0x449bca(0x21e)&&Date['now']()-_0x313292<_0x581a24;}catch{return![];}}[_0x4bf4de(0x22b)](_0x19d9de){const _0x1eab43=_0x4bf4de,_0x497dbf=_0x19d9de[_0x1eab43(0x1fe)]??_0x19d9de[_0x1eab43(0x2ac)];return _0x497dbf+_0x19d9de[_0x1eab43(0x355)]<Date[_0x1eab43(0x353)]();}static[_0x4bf4de(0x364)](_0x11070e){const _0x1d4215=_0x4bf4de,_0x3c880a=_0x11070e?.[_0x1d4215(0x3ae)];if(!_0x3c880a||typeof _0x3c880a[_0x1d4215(0x34e)]!=='number')return![];if(_0x3c880a[_0x1d4215(0x3ad)]!==_0x42cc65[_0x1d4215(0x3ad)]())return![];if(_0x3c880a['pid']===process['pid'])return![];try{return process[_0x1d4215(0x25c)](_0x3c880a['pid'],0x0),![];}catch(_0x4567b7){return _0x4567b7[_0x1d4215(0x1fb)]==='ESRCH';}}async[_0x4bf4de(0x30d)](_0xd9e609,_0x1819fa={},_0x3328b0={}){const _0x3d914f=_0x4bf4de,_0x262f0a=this[_0x3d914f(0x188)](_0xd9e609),_0x535200=_0x3328b0[_0x3d914f(0x355)]??this['ttlMs'],_0x50c442=Date[_0x3d914f(0x353)](),_0x4ab55c={'holder':{'pid':process[_0x3d914f(0x34e)],'hostname':_0x42cc65[_0x3d914f(0x3ad)](),..._0x1819fa},'acquiredAt':_0x50c442,'updatedAt':_0x50c442,'ttlMs':_0x535200};let _0x4c312f=![],_0x25b3b1=null;try{const _0x4cd1fa=()=>{const _0x3a6e97=_0x3d914f,_0x4ec53d=this[_0x3a6e97(0x304)]()['get'](_0x262f0a);if(_0x4ec53d&&!this[_0x3a6e97(0x22b)](_0x4ec53d)&&!_0x55192f[_0x3a6e97(0x364)](_0x4ec53d)){const _0x59645b=_0x1819fa[_0x3a6e97(0x21f)]!=null&&_0x4ec53d[_0x3a6e97(0x3ae)][_0x3a6e97(0x34e)]===process[_0x3a6e97(0x34e)]&&_0x4ec53d[_0x3a6e97(0x3ae)][_0x3a6e97(0x21f)]===_0x1819fa['processorId'];if(!_0x59645b){_0x4c312f=![],_0x25b3b1=_0x4ec53d;return;}_0x4ab55c[_0x3a6e97(0x2ac)]<=_0x4ec53d[_0x3a6e97(0x2ac)]&&(_0x4ab55c['acquiredAt']=_0x4ec53d['acquiredAt']+0x1,_0x4ab55c[_0x3a6e97(0x1fe)]=_0x4ab55c[_0x3a6e97(0x2ac)]);}this[_0x3a6e97(0x304)]()[_0x3a6e97(0x1dc)](_0x262f0a,_0x4ab55c),_0x4c312f=!![],_0x25b3b1=_0x4ab55c;};if(_0x365f91)this[_0x3d914f(0x304)]()[_0x3d914f(0x30f)](_0x4cd1fa);else await this[_0x3d914f(0x304)]()[_0x3d914f(0x248)](_0x4cd1fa);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x4c312f)return{'acquired':![],'handle':null,'current':_0x25b3b1};const _0x5948c8=new _0x19e39a(this,_0x262f0a,_0x4ab55c[_0x3d914f(0x2ac)]);return _0x5948c8[_0x3d914f(0x233)](_0x535200,this[_0x3d914f(0x191)]),{'acquired':!![],'handle':_0x5948c8,'current':_0x25b3b1};}[_0x4bf4de(0x3af)](_0x5ea255){const _0x4dc96d=_0x4bf4de;try{return this[_0x4dc96d(0x304)]()[_0x4dc96d(0x374)](this[_0x4dc96d(0x188)](_0x5ea255))??null;}catch{return null;}}[_0x4bf4de(0x274)](){const _0xf26ee=_0x4bf4de,_0x1f2f53=this[_0xf26ee(0x28c)]+':',_0x59bbd8=[];try{for(const {key:_0xdd0e3f,value:_0x10f266}of this[_0xf26ee(0x304)]()['getRange']({'start':_0x1f2f53,'end':_0x1f2f53+'\xff'})){typeof _0xdd0e3f===_0xf26ee(0x306)&&_0xdd0e3f[_0xf26ee(0x23f)](_0x1f2f53)&&_0x59bbd8['push']({'id':_0xdd0e3f[_0xf26ee(0x1f6)](_0x1f2f53['length']),'entry':_0x10f266});}}catch{}return _0x59bbd8;}static['listAll'](_0x9e0108){const _0x215dc2=_0x4bf4de,_0x578445=[];try{const _0x2da8c1=_0x9e0108[_0x215dc2(0x327)](_0x35c186,{'dupSort':![]});for(const {key:_0x26f155,value:_0x391bf8}of _0x2da8c1[_0x215dc2(0x39d)]({})){if(typeof _0x26f155!==_0x215dc2(0x306))continue;const _0x24c46a=_0x26f155[_0x215dc2(0x37c)](':');if(_0x24c46a<0x1)continue;_0x578445['push']({'namespace':_0x26f155[_0x215dc2(0x1f6)](0x0,_0x24c46a),'id':_0x26f155[_0x215dc2(0x1f6)](_0x24c46a+0x1),'entry':_0x391bf8});}}catch{}return _0x578445;}}return okdbLock={'OKDBLock':_0x55192f},okdbLock;}function _0x5df3(_0x34a4ae,_0x52de06){_0x34a4ae=_0x34a4ae-0x180;const _0x17bb45=_0x17bb();let _0x5df359=_0x17bb45[_0x34a4ae];return _0x5df359;}var version=_0x24af3f(0x180),require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x4451d0=_0x24af3f;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x49589f=require$$0$3,_0x4d9f44=require$$1$1,_0x28971e=require$$2,{LOOP:_0x3ae377}=requireOkdbLoopMonitor(),{OKDBLock:_0x3b7fe6}=requireOkdbLock(),{SYNC_COMMITS:_0xc823f8}=requireOkdbWriter(),_0x5af0dc='~processes',_0x213036=_0x4451d0(0x2f3),_0x565ece=_0x4451d0(0x336),_0x440793=_0x4451d0(0x26c),_0x3440c9=(_0x4731ef,_0x336c8f)=>_0x4731ef+':'+_0x336c8f,_0x4da6de=(_0x4ce4d7,_0x181e3b)=>_0x4ce4d7+'::'+_0x181e3b,_0x5dfe88=(_0x5ea556,_0x3df399)=>_0x5ea556+'/'+_0x3df399,_0x33f46c=(_0x5ae875,_0x13e287)=>_0x5ae875+'#'+_0x13e287,_0x9f1bb3=_0x498a93=>{const _0xdc8044=_0x4451d0;if(_0x498a93?.['processKey'])return _0x498a93[_0xdc8044(0x2e4)];const _0x26cfb4=_0x498a93?.[_0xdc8044(0x352)];return typeof _0x26cfb4===_0xdc8044(0x306)&&_0x26cfb4[_0xdc8044(0x1d2)]('#')?_0x26cfb4['slice'](0x0,_0x26cfb4['indexOf']('#')):_0x26cfb4;},_0x555a3e=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x55e38e=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0xd26b41=_0x555a3e*0x3,_0x11a1f1=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x4451d0(0x1fd)](0x927c0,_0xd26b41*0x14),_0x6a5762=[_0x4451d0(0x323),_0x4451d0(0x2da),_0x4451d0(0x2b7),_0x4451d0(0x2a0),_0x4451d0(0x225),_0x4451d0(0x330)];let _0x18f260=null;function _0x18ffde(){const _0x23ac5d=_0x4451d0;if(_0x18f260==null)_0x18f260=Math[_0x23ac5d(0x252)]((Date[_0x23ac5d(0x353)]()-process['uptime']()*0x3e8)/0x3e8)*0x3e8;return _0x18f260;}function _0x5c2c0b(_0x437179){const _0x35a85e=_0x4451d0;if(process.env.OKDB_PROCESS_KILL===_0x35a85e(0x185))return![];if(_0x437179?.[_0x35a85e(0x2b6)]?.[_0x35a85e(0x29e)]&&typeof _0x437179['options'][_0x35a85e(0x29e)]==='object'&&_0x437179[_0x35a85e(0x2b6)][_0x35a85e(0x29e)][_0x35a85e(0x25c)]===![])return![];return!![];}function _0x501db6(_0x32756f,_0x56f2b4){const _0x2a6806=_0x4451d0,_0x276129=!!_0x56f2b4?.['processors'];switch(_0x32756f){case _0x2a6806(0x2d4):return{'controllable':_0x276129,'decommissionable':![],'killable':!![],'killConfirm':'cluster-wide'};case _0x2a6806(0x1c9):case _0x2a6806(0x18b):return{'controllable':_0x276129,'decommissionable':![],'killable':!![],'killConfirm':_0x2a6806(0x2a1)};case _0x2a6806(0x384):return{'controllable':![],'decommissionable':![],'killable':![]};case _0x2a6806(0x2cf):case _0x2a6806(0x1ea):case _0x2a6806(0x1b0):case'worker':return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':'force'};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x1dc7cd{constructor(_0x5ba7a2){const _0x47c726=_0x4451d0;this['okdb']=_0x5ba7a2,this['_statusEnv']=null,this[_0x47c726(0x3a7)]=null,this['_desiredOverlay']=new Map(),this[_0x47c726(0x218)]=null,this['_isWriter']=![],this[_0x47c726(0x261)]=![],this[_0x47c726(0x372)]=_0x18ffde(),this[_0x47c726(0x387)]=_0x3440c9(process[_0x47c726(0x34e)],this['_processStartedAt']),this['_instanceId']=_0x28971e[_0x47c726(0x1a6)]()[_0x47c726(0x1f6)](0x0,0x8),this[_0x47c726(0x195)]=_0x33f46c(this[_0x47c726(0x387)],this[_0x47c726(0x2e2)]),this[_0x47c726(0x2ed)]=Date[_0x47c726(0x353)](),this[_0x47c726(0x349)]=null,this[_0x47c726(0x230)]=null,this[_0x47c726(0x312)]=null,this[_0x47c726(0x1d1)]=null,this[_0x47c726(0x2e9)]=null,this[_0x47c726(0x181)]=null,this[_0x47c726(0x2fd)]=0x0,this[_0x47c726(0x303)]={},this[_0x47c726(0x19e)]=new Map(),this[_0x47c726(0x39c)]=process['cpuUsage'](),this[_0x47c726(0x2dd)]=Date[_0x47c726(0x353)](),this[_0x47c726(0x217)]=0x0,this[_0x47c726(0x221)]=new Map();}get[_0x4451d0(0x39e)](){const _0x11b457=_0x4451d0;return this[_0x11b457(0x387)];}get[_0x4451d0(0x1ca)](){const _0x25e34e=_0x4451d0;return this[_0x25e34e(0x195)];}[_0x4451d0(0x1b5)](_0x51944b,_0x278aca){const _0x20ce1e=_0x4451d0,_0x549330=_0x501db6(_0x51944b,_0x278aca);if(_0x549330['killable']&&!_0x5c2c0b(this[_0x20ce1e(0x302)]))return{..._0x549330,'killable':![],'killConfirm':undefined};return _0x549330;}[_0x4451d0(0x216)](){const _0x27067f=_0x4451d0;return!!this[_0x27067f(0x1ed)];}[_0x4451d0(0x2b9)](_0x11745b){const _0x575e27=_0x4451d0;Object[_0x575e27(0x193)](this['_ownMeta'],_0x11745b||{});}[_0x4451d0(0x392)](_0x1a4ce1){const _0x4cf6f2=_0x4451d0;if(_0x1a4ce1)this[_0x4cf6f2(0x312)]=_0x1a4ce1;}['register'](_0x4eb221={}){const _0x4ad818=_0x4451d0;return this['okdb'][_0x4ad818(0x391)](_0x4eb221);}['processingStatusView'](){const _0x1ff6d3=_0x4451d0,_0x1e6cb8={};let _0x4dcfed=0x0,_0x52fb6b=0x0;const _0x28a88c=new Set();for(const _0x260205 of this['listNodes']()){_0x52fb6b++;const _0x5aeeb4=_0x260205[_0x1ff6d3(0x1c1)];if(!_0x5aeeb4)continue;if(_0x5aeeb4[_0x1ff6d3(0x2f7)])_0x4dcfed++;for(const _0x2d9344 of _0x5aeeb4[_0x1ff6d3(0x347)]||[]){if(![_0x1ff6d3(0x201),_0x1ff6d3(0x1be)][_0x1ff6d3(0x1d2)](_0x2d9344[_0x1ff6d3(0x200)]))continue;(_0x2d9344[_0x1ff6d3(0x2be)]===_0x1ff6d3(0x2b5)||_0x2d9344['state']===_0x1ff6d3(0x2a5))&&_0x2d9344[_0x1ff6d3(0x196)]&&_0x28a88c['add']((_0x2d9344[_0x1ff6d3(0x2de)]||_0x1ff6d3(0x279))+':'+_0x2d9344[_0x1ff6d3(0x196)]);const _0x51f108=_0x2d9344[_0x1ff6d3(0x2de)]||'default';(_0x1e6cb8[_0x51f108]||=[])[_0x1ff6d3(0x202)]({..._0x2d9344,'env':_0x51f108,'owner':{'pid':_0x260205[_0x1ff6d3(0x34e)]??null,'kind':_0x260205[_0x1ff6d3(0x283)]??null}});}}for(const [_0x2ac182,_0x496845]of Object['entries'](_0x1e6cb8)){for(const _0x252f1e of _0x496845){if(_0x252f1e[_0x1ff6d3(0x200)]===_0x1ff6d3(0x201)&&!_0x252f1e[_0x1ff6d3(0x2e8)]){const _0x78821e=_0x2ac182+':'+(_0x252f1e['cursorKey']??'');if(!_0x28a88c['has'](_0x78821e))_0x252f1e[_0x1ff6d3(0x249)]=!![];}}}return{'envs':_0x1e6cb8,'policy':null,'participation':{'participating':_0x4dcfed,'total':_0x52fb6b},'source':_0x1ff6d3(0x34d)};}[_0x4451d0(0x23a)](){const _0x5dc945=_0x4451d0,_0x1e3784=_0xb2e71d=>{const _0x4ac2d5=_0x5df3;if(_0xb2e71d[_0x4ac2d5(0x2be)]===_0x4ac2d5(0x2b5)||_0xb2e71d[_0x4ac2d5(0x2be)]===_0x4ac2d5(0x2a5)||_0xb2e71d['state']===_0x4ac2d5(0x3a0))return 0x3;if(_0xb2e71d['claimGated'])return 0x1;return 0x2;},_0x299701=new Map();for(const _0x4b231b of this[_0x5dc945(0x182)]()){for(const _0x1eab8a of _0x4b231b[_0x5dc945(0x1c1)]?.[_0x5dc945(0x347)]||[]){const _0x4aef61={..._0x1eab8a,'owner':{'pid':_0x4b231b[_0x5dc945(0x34e)]??null,'kind':_0x4b231b[_0x5dc945(0x283)]??null,'host':_0x4b231b[_0x5dc945(0x226)]??null}},_0x39f9f1=_0x1eab8a[_0x5dc945(0x200)]===_0x5dc945(0x201)?_0x5dc945(0x3a5)+(_0x1eab8a[_0x5dc945(0x2de)]??'')+'::'+(_0x1eab8a[_0x5dc945(0x196)]??_0x1eab8a['type']??_0x1eab8a['id']):_0x5dc945(0x378)+(_0x4b231b['nodeKey']??_0x4b231b[_0x5dc945(0x2e4)]??'')+'::'+(_0x1eab8a[_0x5dc945(0x2de)]??'')+'::'+_0x1eab8a['id'],_0x1a2e00=_0x299701['get'](_0x39f9f1);if(!_0x1a2e00||_0x1e3784(_0x4aef61)>_0x1e3784(_0x1a2e00))_0x299701['set'](_0x39f9f1,_0x4aef61);}}return[..._0x299701['values']()];}['clusterStatusView'](){const _0x173be6=_0x4451d0,_0x186f7b=Date[_0x173be6(0x353)](),_0x4ba328=this[_0x173be6(0x182)](),_0x3a95b7=_0x55a032=>Math[_0x173be6(0x1fd)](0x0,Math[_0x173be6(0x252)]((_0x186f7b-(_0x55a032[_0x173be6(0x398)]||_0x186f7b))/0x3e8)),_0x20a1ec=_0x4ba328['find'](_0x4f1566=>_0x4f1566['kind']===_0x173be6(0x2d4)),_0x3f70a3=_0x4ba328['filter'](_0x5b10a0=>_0x5b10a0[_0x173be6(0x283)]==='http-server');if(_0x20a1ec||_0x3f70a3['length'])return{'primary':_0x20a1ec?{'pid':_0x20a1ec['pid'],'uptime':_0x3a95b7(_0x20a1ec)}:null,'workers':_0x3f70a3[_0x173be6(0x28d)](_0x364f0d=>({'pid':_0x364f0d[_0x173be6(0x34e)],'uptime':_0x3a95b7(_0x364f0d)})),'workersConfigured':_0x20a1ec?.['meta']?.['workersConfigured']??_0x3f70a3['length'],'mode':'cluster'};const _0x561e54=_0x4ba328[_0x173be6(0x33e)](_0x35c593=>_0x35c593[_0x173be6(0x283)]===_0x173be6(0x1c9)||_0x35c593['kind']==='standalone'||_0x35c593['kind']===_0x173be6(0x384)),_0x319ce5=_0x561e54?{'pid':_0x561e54[_0x173be6(0x34e)],'uptime':_0x3a95b7(_0x561e54)}:{'pid':process['pid'],'uptime':Math[_0x173be6(0x1fd)](0x0,Math[_0x173be6(0x252)](process['uptime']()))};return{'primary':_0x319ce5,'workers':[_0x319ce5],'workersConfigured':0x1,'mode':_0x173be6(0x201)};}['nodesView'](){const _0x2a35c1=_0x4451d0;return this[_0x2a35c1(0x1ad)]();}['treeView'](){const _0x426dc0=_0x4451d0,_0x5e1a38=new Map();for(const _0x251918 of this['_groupByProcess']())_0x5e1a38['set'](_0x251918['processKey'],{..._0x251918,'children':[]});const _0x66ff59=[];for(const _0x1b9f90 of _0x5e1a38['values']()){const _0x49a685=_0x1b9f90[_0x426dc0(0x365)]?_0x5e1a38[_0x426dc0(0x374)](_0x1b9f90[_0x426dc0(0x365)]):null;if(_0x49a685&&_0x49a685!==_0x1b9f90)_0x49a685[_0x426dc0(0x2a8)][_0x426dc0(0x202)](_0x1b9f90);else _0x66ff59[_0x426dc0(0x202)](_0x1b9f90);}const _0x59506b=(_0x5c6d15,_0x457ba9)=>_0x5c6d15['kind']===_0x457ba9[_0x426dc0(0x283)]?(_0x5c6d15[_0x426dc0(0x34e)]||0x0)-(_0x457ba9['pid']||0x0):(_0x5c6d15[_0x426dc0(0x283)]??'')<(_0x457ba9[_0x426dc0(0x283)]??'')?-0x1:0x1,_0x4fee0a=_0x1c8878=>{const _0x28b18d=_0x426dc0;_0x1c8878['sort'](_0x59506b);for(const _0x2c2afa of _0x1c8878)if(_0x2c2afa[_0x28b18d(0x2a8)][_0x28b18d(0x2d8)])_0x4fee0a(_0x2c2afa[_0x28b18d(0x2a8)]);};return _0x4fee0a(_0x66ff59),_0x66ff59;}[_0x4451d0(0x1f7)](_0x57e93d){const _0x1e4296=_0x4451d0;return this[_0x1e4296(0x1ad)]()['find'](_0xf8e9b0=>_0xf8e9b0['processKey']===_0x57e93d)??null;}['_groupByProcess'](_0x2fcaed=Date[_0x4451d0(0x353)]()){const _0x2d3b04=_0x4451d0,_0x674cd1=new Map();for(const _0x33eb92 of this[_0x2d3b04(0x182)]()){const _0x38573f=_0x9f1bb3(_0x33eb92);let _0x1726a5=_0x674cd1[_0x2d3b04(0x374)](_0x38573f);!_0x1726a5&&(_0x1726a5={'processKey':_0x38573f,'nodeKey':_0x38573f,'pid':_0x33eb92[_0x2d3b04(0x34e)],'ppid':_0x33eb92['ppid']??null,'host':_0x33eb92['host']??null,'kind':_0x33eb92['kind'],'role':null,'supervisorKey':_0x33eb92[_0x2d3b04(0x365)]??null,'slot':_0x33eb92[_0x2d3b04(0x3a3)]??null,'slotKey':_0x33eb92[_0x2d3b04(0x219)]??null,'caps':_0x33eb92[_0x2d3b04(0x3a9)]??null,'lifecycle':_0x33eb92[_0x2d3b04(0x324)]??null,'uptime':Math[_0x2d3b04(0x1fd)](0x0,Math[_0x2d3b04(0x252)]((_0x2fcaed-(_0x33eb92[_0x2d3b04(0x398)]||_0x2fcaed))/0x3e8)),'startedAt':_0x33eb92['startedAt']??null,'meta':_0x33eb92[_0x2d3b04(0x36c)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x674cd1['set'](_0x38573f,_0x1726a5));_0x1726a5[_0x2d3b04(0x29a)][_0x2d3b04(0x202)]({'instanceId':_0x33eb92['instanceId']??null,'role':_0x33eb92[_0x2d3b04(0x270)]??null,'listenAddr':_0x33eb92[_0x2d3b04(0x29b)]??null,'lifecycle':_0x33eb92[_0x2d3b04(0x324)]??null,'processing':_0x33eb92[_0x2d3b04(0x1c1)]??null});if(!_0x1726a5[_0x2d3b04(0x270)]&&_0x33eb92[_0x2d3b04(0x270)])_0x1726a5[_0x2d3b04(0x270)]=_0x33eb92[_0x2d3b04(0x270)];if(!_0x1726a5[_0x2d3b04(0x29b)]&&_0x33eb92[_0x2d3b04(0x29b)])_0x1726a5[_0x2d3b04(0x29b)]=_0x33eb92[_0x2d3b04(0x29b)];if(!_0x1726a5[_0x2d3b04(0x1c1)]&&_0x33eb92[_0x2d3b04(0x1c1)])_0x1726a5[_0x2d3b04(0x1c1)]=_0x33eb92[_0x2d3b04(0x1c1)];if(!_0x1726a5['engines']&&_0x33eb92[_0x2d3b04(0x235)])_0x1726a5['engines']=_0x33eb92['engines'];if(!_0x1726a5[_0x2d3b04(0x1de)]&&_0x33eb92[_0x2d3b04(0x1de)])_0x1726a5[_0x2d3b04(0x1de)]=_0x33eb92[_0x2d3b04(0x1de)];if(_0x1726a5[_0x2d3b04(0x3a9)]==null&&_0x33eb92['caps'])_0x1726a5[_0x2d3b04(0x3a9)]=_0x33eb92[_0x2d3b04(0x3a9)];if(_0x33eb92[_0x2d3b04(0x25b)]&&(!_0x1726a5[_0x2d3b04(0x25b)]||(_0x33eb92[_0x2d3b04(0x25b)]['at']??0x0)>(_0x1726a5['stats']['at']??0x0)))_0x1726a5[_0x2d3b04(0x25b)]=_0x33eb92[_0x2d3b04(0x25b)];}return[..._0x674cd1['values']()];}[_0x4451d0(0x2f4)](){const _0x3e2839=_0x4451d0,_0x1501db=[],_0x146ca9={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x5cdda8 of this[_0x3e2839(0x1ad)]()){_0x1501db[_0x3e2839(0x202)]({'processKey':_0x5cdda8[_0x3e2839(0x2e4)],'kind':_0x5cdda8['kind'],'pid':_0x5cdda8['pid'],'supervisorKey':_0x5cdda8[_0x3e2839(0x365)],'meta':_0x5cdda8['meta']??null,'uptime':_0x5cdda8[_0x3e2839(0x1bd)],'stats':_0x5cdda8['stats']??null}),_0x146ca9[_0x3e2839(0x29e)]++;if(_0x5cdda8[_0x3e2839(0x25b)]){_0x146ca9['rss']+=_0x5cdda8[_0x3e2839(0x25b)]['rss']||0x0,_0x146ca9[_0x3e2839(0x31a)]+=(_0x5cdda8['stats'][_0x3e2839(0x31a)]||0x0)+(_0x5cdda8[_0x3e2839(0x25b)][_0x3e2839(0x2a4)]?.['heapUsed']||0x0);const _0x5d6979=_0x5cdda8['stats']['threads'];_0x5d6979&&(_0x146ca9[_0x3e2839(0x2a4)][_0x3e2839(0x309)]+=_0x5d6979[_0x3e2839(0x309)]||0x0,_0x146ca9[_0x3e2839(0x2a4)][_0x3e2839(0x1b4)]+=_0x5d6979[_0x3e2839(0x1b4)]||0x0,_0x146ca9['threads'][_0x3e2839(0x1dd)]+=_0x5d6979[_0x3e2839(0x1dd)]||0x0);}}return{'totals':_0x146ca9,'nodes':_0x1501db};}async['open']({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x4e15b1=_0x4451d0;this[_0x4e15b1(0x37a)]=this[_0x4e15b1(0x37a)]||!!writer,this[_0x4e15b1(0x261)]=this[_0x4e15b1(0x261)]||!!reader,this[_0x4e15b1(0x349)]=kind||this[_0x4e15b1(0x349)]||(_0x4d9f44['isWorker']?'http-server':_0x4e15b1(0x1c9)),this[_0x4e15b1(0x230)]=supervisorKey??this['_supervisorKey'],this[_0x4e15b1(0x312)]=listenAddr??this[_0x4e15b1(0x312)],this['_ensureDesired'](),await this[_0x4e15b1(0x34f)]();if(!writer&&!reader)return null;if(!this[_0x4e15b1(0x1ed)]){const _0x425c16=await this[_0x4e15b1(0x302)][_0x4e15b1(0x2c0)](_0x5af0dc,{'sync':![],'durability':_0x4e15b1(0x3ab)});if(!_0x425c16['hasType'](_0x213036))await _0x425c16[_0x4e15b1(0x1e5)](_0x213036);this['_statusEnv']=_0x425c16;}return this[_0x4e15b1(0x1ed)];}[_0x4451d0(0x1b8)](){const _0x58f332=_0x4451d0;return this['_nodeDbFor']!==this[_0x58f332(0x1ed)]&&(this[_0x58f332(0x367)]=this[_0x58f332(0x1ed)],this[_0x58f332(0x31d)]=this['_statusEnv'][_0x58f332(0x245)](_0x213036)[_0x58f332(0x299)]),this[_0x58f332(0x31d)];}[_0x4451d0(0x1cb)](_0x174f2c){const _0x37ef78=_0x4451d0;if(_0xc823f8)return this[_0x37ef78(0x1b8)]()[_0x37ef78(0x251)](_0x174f2c[_0x37ef78(0x352)],_0x174f2c,0x1);const _0x380ebb=this['_nodeDb']()[_0x37ef78(0x1dc)](_0x174f2c['nodeKey'],_0x174f2c,0x1);if(_0x380ebb&&typeof _0x380ebb[_0x37ef78(0x2e5)]===_0x37ef78(0x22c))_0x380ebb[_0x37ef78(0x2e5)](undefined,()=>{});return _0x380ebb;}[_0x4451d0(0x213)](_0x5a5060){const _0x47276f=_0x4451d0;return this['_nodeDb']()[_0x47276f(0x251)](_0x5a5060[_0x47276f(0x352)],_0x5a5060,0x1);}[_0x4451d0(0x33b)](_0x113290){const _0x568250=_0x4451d0;if(_0xc823f8)try{return this[_0x568250(0x1b8)]()['removeSync'](_0x113290);}catch{return![];}const _0x4ce189=this[_0x568250(0x1b8)]()[_0x568250(0x39b)](_0x113290);if(_0x4ce189&&typeof _0x4ce189['then']===_0x568250(0x22c))_0x4ce189[_0x568250(0x2e5)](undefined,()=>{});return _0x4ce189;}async[_0x4451d0(0x280)](_0x2e5e1b){const _0x133c87=_0x4451d0;if(!this[_0x133c87(0x1ed)]||!this[_0x133c87(0x37a)]||!_0x2e5e1b?.['nodeKey'])return;return this[_0x133c87(0x1cb)](_0x2e5e1b);}async[_0x4451d0(0x36b)](_0x609ee8){const _0x148892=_0x4451d0;if(!this['_statusEnv']||!this[_0x148892(0x37a)]||!_0x609ee8)return;const _0x5c36ac=_0x609ee8[_0x148892(0x1d2)]('#'),_0x286333=[];for(const {key:_0x49fd69}of this[_0x148892(0x1ed)][_0x148892(0x39d)](_0x213036)){if(_0x49fd69===_0x609ee8||!_0x5c36ac&&typeof _0x49fd69===_0x148892(0x306)&&_0x49fd69[_0x148892(0x23f)](_0x609ee8+'#'))_0x286333[_0x148892(0x202)](_0x49fd69);}for(const _0xf3921f of _0x286333){try{this[_0x148892(0x1b8)]()[_0x148892(0x222)](_0xf3921f);}catch{}}}['_nodeDead'](_0xdc5f63){const _0x25007a=_0x4451d0;if(typeof _0xdc5f63?.['pid']!==_0x25007a(0x21e))return![];if(_0xdc5f63[_0x25007a(0x226)]!==_0x49589f[_0x25007a(0x3ad)]())return![];if(_0xdc5f63[_0x25007a(0x34e)]===process[_0x25007a(0x34e)])return![];if(_0xdc5f63['expiresAt']!=null&&_0xdc5f63[_0x25007a(0x199)]<Date[_0x25007a(0x353)]()-_0x11a1f1)return!![];try{return process[_0x25007a(0x25c)](_0xdc5f63['pid'],0x0),![];}catch(_0x32b50e){return _0x32b50e[_0x25007a(0x1fb)]===_0x25007a(0x1c0);}}[_0x4451d0(0x182)](){const _0x39fad9=_0x4451d0;if(!this[_0x39fad9(0x1ed)])return[];try{this[_0x39fad9(0x1ed)]['db']?.[_0x39fad9(0x370)]?.();}catch{}const _0x174b7e=Date['now'](),_0x582989=_0x49589f[_0x39fad9(0x3ad)](),_0x4402c4=[];for(const {value:_0x15e981}of this[_0x39fad9(0x1ed)][_0x39fad9(0x39d)](_0x213036)){if(!_0x15e981)continue;let _0x16c0d3=null;_0x15e981[_0x39fad9(0x226)]===_0x582989&&typeof _0x15e981['pid']===_0x39fad9(0x21e)&&(_0x16c0d3=!this['_nodeDead'](_0x15e981));if(_0x16c0d3===![])continue;const _0x3464cd=_0x15e981[_0x39fad9(0x199)]==null||_0x15e981[_0x39fad9(0x199)]>=_0x174b7e;if(_0x16c0d3===!![]||_0x3464cd)_0x4402c4['push'](_0x15e981);}return _0x4402c4;}async[_0x4451d0(0x2dc)](_0x2c2066=0x0){const _0x52e4bf=_0x4451d0;if(!this['_statusEnv']||!this['_isWriter'])return;const _0x592a2a=Date[_0x52e4bf(0x353)]()-_0x2c2066,_0x58efdd=new Set(),_0x46e5c0=[],_0x54b628=_0x49589f[_0x52e4bf(0x3ad)](),_0x15c482=require$$6[_0x52e4bf(0x2c4)];for(const {key:_0x545e2b,value:_0x89e9c5}of this[_0x52e4bf(0x1ed)][_0x52e4bf(0x39d)](_0x213036)){if(!_0x89e9c5)continue;const _0x3bf8cd=_0x89e9c5[_0x52e4bf(0x226)]===_0x54b628&&typeof _0x89e9c5[_0x52e4bf(0x34e)]===_0x52e4bf(0x21e),_0xd0ad9a=_0x3bf8cd?this[_0x52e4bf(0x1ef)](_0x89e9c5):_0x89e9c5['expiresAt']!=null&&_0x89e9c5['expiresAt']<_0x592a2a;if(_0xd0ad9a)_0x46e5c0[_0x52e4bf(0x202)](_0x545e2b);else{_0x58efdd[_0x52e4bf(0x281)](_0x9f1bb3(_0x89e9c5)??_0x545e2b);if(_0x89e9c5['version']&&_0x89e9c5[_0x52e4bf(0x2c4)]!==_0x15c482){if(!this[_0x52e4bf(0x229)])this[_0x52e4bf(0x229)]=new Set();!this[_0x52e4bf(0x229)]['has'](_0x89e9c5['version'])&&(this[_0x52e4bf(0x229)]['add'](_0x89e9c5[_0x52e4bf(0x2c4)]),this[_0x52e4bf(0x302)][_0x52e4bf(0x278)]?.['warn']?.(_0x52e4bf(0x2df)+(_0x89e9c5[_0x52e4bf(0x34e)]??'?')+'\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20'+_0x89e9c5[_0x52e4bf(0x2c4)]+'\x20while\x20this\x20process\x20runs\x20'+_0x15c482+'\x20—\x20'+_0x52e4bf(0x2d9),{'feature':'migrations'}));}}}for(const _0x4adce3 of _0x46e5c0)this[_0x52e4bf(0x33b)](_0x4adce3);if(this[_0x52e4bf(0x319)]()){const _0x1eeb87=[];for(const {key:_0x320a6e}of this['listDesired'](_0x52e4bf(0x2f3))){if(!_0x58efdd[_0x52e4bf(0x342)](_0x320a6e)){if(_0xc823f8)try{this['_desired'][_0x52e4bf(0x222)]('node/'+_0x320a6e);}catch{}else _0x1eeb87[_0x52e4bf(0x202)](this[_0x52e4bf(0x3a7)][_0x52e4bf(0x39b)](_0x52e4bf(0x194)+_0x320a6e));}}if(_0x1eeb87[_0x52e4bf(0x2d8)])await Promise[_0x52e4bf(0x19a)](_0x1eeb87);}}[_0x4451d0(0x2ef)](_0x4c038c=null){const _0xf9d9b6=_0x4451d0;if(this[_0xf9d9b6(0x1d1)])return;if(!this['_isWriter']||!this[_0xf9d9b6(0x1ed)]){this[_0xf9d9b6(0x302)]?.[_0xf9d9b6(0x278)]?.[_0xf9d9b6(0x20b)]?.(_0xf9d9b6(0x397)+this[_0xf9d9b6(0x37a)]+_0xf9d9b6(0x1d8)+!!this[_0xf9d9b6(0x1ed)]+_0xf9d9b6(0x1e1),{'feature':'processes'});return;}this[_0xf9d9b6(0x181)]=_0x4c038c,this[_0xf9d9b6(0x2e9)]=()=>this[_0xf9d9b6(0x38d)]();for(const _0x489753 of _0x6a5762)this[_0xf9d9b6(0x302)][_0xf9d9b6(0x256)]['on'](_0x489753,this['_onProcEvent']);this['_publishNow']();const _0x5545bb=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x555a3e;this[_0xf9d9b6(0x1d1)]=setInterval(()=>{const _0x280564=_0xf9d9b6;if(this[_0x280564(0x181)])try{this['_onTick']();}catch{}this['_publishNow'](),this['reap']()[_0x280564(0x1b7)](()=>{});},_0x5545bb);if(this[_0xf9d9b6(0x1d1)]['unref'])this[_0xf9d9b6(0x1d1)]['unref']();}['_maybePublish'](){const _0x562f90=_0x4451d0;if(!this[_0x562f90(0x37a)]||!this['_statusEnv'])return;if(Date[_0x562f90(0x353)]()-this[_0x562f90(0x2fd)]<_0x55e38e)return;this[_0x562f90(0x2e7)]();}[_0x4451d0(0x2e7)](){const _0x2dfc21=_0x4451d0;if(!this['_isWriter']||!this[_0x2dfc21(0x1ed)])return;this[_0x2dfc21(0x2fd)]=Date['now']();try{const _0x5b7880=[this[_0x2dfc21(0x2cd)]()];for(const _0x38a587 of this['_children']['values']())_0x5b7880[_0x2dfc21(0x202)](this['_buildChildRow'](_0x38a587));const _0x2d9223=_0x3ae377[_0x2dfc21(0x2c6)]?_0x3ae377['now']():0x0;for(const _0x4ecad5 of _0x5b7880){try{this['_putRowSync'](_0x4ecad5),this[_0x2dfc21(0x1c7)]=![];}catch(_0x440e1e){!this['_publishFailWarned']&&(this[_0x2dfc21(0x1c7)]=!![],this[_0x2dfc21(0x302)]?.[_0x2dfc21(0x278)]?.[_0x2dfc21(0x20b)]?.(_0x2dfc21(0x29f)+_0x440e1e['message'],{'feature':_0x2dfc21(0x29e)}));}}if(_0x3ae377['enabled'])_0x3ae377[_0x2dfc21(0x209)]('registry-publish',_0x3ae377[_0x2dfc21(0x353)]()-_0x2d9223,'rows='+_0x5b7880[_0x2dfc21(0x2d8)]+'\x20sync');}catch(_0x3544d2){!this[_0x2dfc21(0x1c7)]&&(this[_0x2dfc21(0x1c7)]=!![],this[_0x2dfc21(0x302)]?.['log']?.[_0x2dfc21(0x20b)]?.(_0x2dfc21(0x29f)+_0x3544d2[_0x2dfc21(0x1a1)],{'feature':_0x2dfc21(0x29e)}));}}async[_0x4451d0(0x359)](){const _0x4309e0=_0x4451d0;if(this['_onProcEvent']){for(const _0x2ec607 of _0x6a5762){try{this[_0x4309e0(0x302)][_0x4309e0(0x256)][_0x4309e0(0x185)](_0x2ec607,this[_0x4309e0(0x2e9)]);}catch{}}this['_onProcEvent']=null;}this['_hbTimer']&&(clearInterval(this['_hbTimer']),this[_0x4309e0(0x1d1)]=null);try{if(this[_0x4309e0(0x1ed)]&&this[_0x4309e0(0x37a)])await this[_0x4309e0(0x36b)](this[_0x4309e0(0x195)]);}catch{}}async[_0x4451d0(0x356)](){const _0x19b6f9=_0x4451d0;if(!this[_0x19b6f9(0x1ed)]||!this['_isWriter'])return;try{await this[_0x19b6f9(0x36b)](this[_0x19b6f9(0x195)]);}catch{}try{const _0x58ee8c=[];for(const {value:_0x38e0a2}of this[_0x19b6f9(0x1ed)][_0x19b6f9(0x39d)](_0x213036)){if(_0x38e0a2?.[_0x19b6f9(0x27b)]===process[_0x19b6f9(0x34e)]&&_0x38e0a2[_0x19b6f9(0x352)])_0x58ee8c[_0x19b6f9(0x202)](_0x38e0a2[_0x19b6f9(0x352)]);}for(const _0x385fb9 of _0x58ee8c){try{await this[_0x19b6f9(0x36b)](_0x385fb9);}catch{}}}catch{}}async[_0x4451d0(0x273)](){const _0x2c124c=_0x4451d0;return this[_0x2c124c(0x280)](this[_0x2c124c(0x2cd)]());}async[_0x4451d0(0x2a6)](_0x221716){const _0x3338a7=_0x4451d0;if(!this[_0x3338a7(0x1ed)]||!this[_0x3338a7(0x37a)])return;return this[_0x3338a7(0x280)](this['_buildChildRow'](_0x221716));}[_0x4451d0(0x236)]({pid:_0x4e6428,startedAt:_0x5daa2a,kind:_0x531609,supervisorKey:_0x118cc1,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x4451d0(0x25a),meta:meta=null,stats:stats=null}){const _0x380970=_0x4451d0,_0x506d2c=Date['now'](),_0x272867=_0x3440c9(_0x4e6428,_0x5daa2a);return{'nodeKey':_0x33f46c(_0x272867,'0'),'processKey':_0x272867,'instanceId':'0','pid':_0x4e6428,'startedAt':_0x5daa2a,'ppid':process[_0x380970(0x34e)],'host':_0x49589f[_0x380970(0x3ad)](),'supervisorKey':_0x118cc1,'slot':slot,'slotKey':slotKey,'kind':_0x531609,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x506d2c,'expiresAt':_0x506d2c+_0xd26b41,'caps':this[_0x380970(0x1b5)](_0x531609,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x4451d0(0x2f2)](_0x2ce191){const _0x5c3517=_0x4451d0;if(!_0x2ce191?.[_0x5c3517(0x34e)])return null;const _0x1bda21=_0x3440c9(_0x2ce191[_0x5c3517(0x34e)],_0x2ce191[_0x5c3517(0x398)]);this[_0x5c3517(0x19e)]['set'](_0x1bda21,{..._0x2ce191,'supervisorKey':_0x2ce191['supervisorKey']??this[_0x5c3517(0x387)]});if(this[_0x5c3517(0x37a)])await this[_0x5c3517(0x2a6)](this[_0x5c3517(0x19e)][_0x5c3517(0x374)](_0x1bda21))[_0x5c3517(0x1b7)]?.(()=>{});return _0x1bda21;}[_0x4451d0(0x237)](_0x4f5197){const _0x4c1d4=_0x4451d0;if(!_0x4f5197)return;return this[_0x4c1d4(0x19e)][_0x4c1d4(0x35f)](_0x4f5197),this[_0x4c1d4(0x36b)](_0x4f5197);}['_sampleOwnStats'](){const _0x1b5f6f=_0x4451d0,_0x396db4=Date[_0x1b5f6f(0x353)](),_0x132f3b=process[_0x1b5f6f(0x32d)](),_0x33d993=(_0x396db4-this[_0x1b5f6f(0x2dd)])*0x3e8;if(_0x33d993>=0x3d090){const _0x2eb0b3=_0x132f3b[_0x1b5f6f(0x366)]-this['_lastCpuUsage'][_0x1b5f6f(0x366)]+(_0x132f3b[_0x1b5f6f(0x24a)]-this['_lastCpuUsage'][_0x1b5f6f(0x24a)]),_0xc1bad8=_0x49589f[_0x1b5f6f(0x1af)]()[_0x1b5f6f(0x2d8)]||0x1;this['_lastCpuPct']=Math[_0x1b5f6f(0x2c7)](0x64,Math[_0x1b5f6f(0x252)](_0x2eb0b3/(_0x33d993*_0xc1bad8)*0x64)),this[_0x1b5f6f(0x24f)]=Math[_0x1b5f6f(0x252)](_0x33d993/0x3e8),this['_lastCpuUsage']=_0x132f3b,this[_0x1b5f6f(0x2dd)]=_0x396db4;}const _0x4db5ec=process[_0x1b5f6f(0x3a4)](),_0x286a5a=this['_threadStats']['size'];let _0x3909df=0x0;if(_0x286a5a>0x0){const _0x3fdd91=[this['okdb'],...this[_0x1b5f6f(0x302)][_0x1b5f6f(0x2ad)]?.[_0x1b5f6f(0x1e4)]?.()??[]];for(const _0x3f54dc of _0x3fdd91){const _0x33dfac=_0x3f54dc[_0x1b5f6f(0x1eb)]?.[_0x1b5f6f(0x2e3)];if(_0x33dfac)_0x3909df+=_0x33dfac['liveThreadStats'][_0x1b5f6f(0x1dd)];}}let _0x55206f=null;const _0x38ac96=_0x286a5a;if(_0x38ac96>0x0){let _0x3d04e6=0x0;for(const _0x12118e of this[_0x1b5f6f(0x221)]['values']())_0x3d04e6+=_0x12118e['heapUsed']||0x0;_0x55206f={'count':_0x38ac96,'heapUsed':_0x3d04e6,'sandbox':_0x286a5a,'busy':_0x3909df};}return{'rss':_0x4db5ec['rss'],'heapUsed':_0x4db5ec['heapUsed'],'heapTotal':_0x4db5ec[_0x1b5f6f(0x197)],'external':_0x4db5ec[_0x1b5f6f(0x1e6)],'cpuPct':this[_0x1b5f6f(0x217)],'cpuWindowMs':this['_lastCpuWindowMs']??null,'threads':_0x55206f,'at':_0x396db4};}['reportThreadStats'](_0x30aed5,_0x1725b5){const _0x280a03=_0x4451d0;if(!_0x30aed5||!_0x1725b5)return;this['_threadStats'][_0x280a03(0x2b3)](_0x30aed5,_0x1725b5);}[_0x4451d0(0x186)](_0x415788){const _0x380d74=_0x4451d0;this[_0x380d74(0x221)][_0x380d74(0x35f)](_0x415788);}[_0x4451d0(0x317)](_0x2665ac,_0x7e09bb,_0xfb68c6=undefined){const _0x3f787a=_0x4451d0,_0x4d161f=this[_0x3f787a(0x19e)][_0x3f787a(0x374)](_0x2665ac);if(!_0x4d161f||!_0x7e09bb)return;if(_0xfb68c6!==undefined)_0x4d161f['processing']=_0xfb68c6;_0x4d161f[_0x3f787a(0x25b)]={'rss':_0x7e09bb[_0x3f787a(0x269)]??null,'heapUsed':_0x7e09bb[_0x3f787a(0x31a)]??null,'heapTotal':_0x7e09bb['heapTotal']??null,'external':_0x7e09bb[_0x3f787a(0x1e6)]??null,'cpuPct':_0x7e09bb[_0x3f787a(0x36a)]??null,'cpuWindowMs':_0x7e09bb[_0x3f787a(0x31f)]??null,'threads':_0x7e09bb[_0x3f787a(0x2a4)]??null,'claims':_0x7e09bb[_0x3f787a(0x2bd)]??null,'envsOpen':_0x7e09bb[_0x3f787a(0x27e)]??null,'at':Date[_0x3f787a(0x353)]()};}['_buildOwnRow'](){const _0x3f1f63=_0x4451d0,_0x2ab0ae=Date[_0x3f1f63(0x353)](),_0x42fafb=this[_0x3f1f63(0x302)][_0x3f1f63(0x28e)]||{},_0x46384b=this[_0x3f1f63(0x349)]||_0x3f1f63(0x1c9);return{'nodeKey':this[_0x3f1f63(0x195)],'processKey':this[_0x3f1f63(0x387)],'instanceId':this[_0x3f1f63(0x2e2)],'pid':process[_0x3f1f63(0x34e)],'startedAt':this['_processStartedAt'],'instanceStartedAt':this[_0x3f1f63(0x2ed)],'ppid':typeof process[_0x3f1f63(0x27b)]===_0x3f1f63(0x21e)?process[_0x3f1f63(0x27b)]:null,'host':_0x49589f['hostname'](),'supervisorKey':this[_0x3f1f63(0x230)]??null,'version':require$$6['version'],'kind':_0x46384b,'role':{'engines':!!_0x42fafb[_0x3f1f63(0x235)],'processors':!!_0x42fafb[_0x3f1f63(0x347)],'compaction':_0x42fafb['compaction'],'http':_0x42fafb[_0x3f1f63(0x379)]},'listenAddr':this[_0x3f1f63(0x312)]??null,'heartbeatAt':_0x2ab0ae,'expiresAt':_0x2ab0ae+_0xd26b41,'caps':this[_0x3f1f63(0x1b5)](_0x46384b,_0x42fafb),'lifecycle':{'state':_0x3f1f63(0x25a),'desiredVersionApplied':null},'meta':{...this[_0x3f1f63(0x303)]},'processing':_0x42fafb[_0x3f1f63(0x347)]?this['_buildProcessingFacet']():null,'engines':_0x42fafb['engines']?[...this[_0x3f1f63(0x302)][_0x3f1f63(0x266)]??[]]:null,'singletonClaims':this[_0x3f1f63(0x1db)](),'stats':this['_sampleOwnStats'](),'writers':this[_0x3f1f63(0x343)]()};}[_0x4451d0(0x343)](){const _0x296b42=_0x4451d0,_0x13778e={};try{for(const [_0x57fa9c,_0x2727af]of this['okdb'][_0x296b42(0x2ad)]){try{const _0x4180a1=_0x2727af[_0x296b42(0x389)]?.();if(!_0x4180a1)continue;if(!_0x4180a1['depth']&&!_0x4180a1[_0x296b42(0x288)]&&!(_0x4180a1[_0x296b42(0x340)]??0x0)&&!_0x4180a1[_0x296b42(0x32b)])continue;_0x13778e[_0x57fa9c]={'depth':_0x4180a1[_0x296b42(0x285)],'oldestPendingMs':_0x4180a1[_0x296b42(0x242)],'committed':_0x4180a1[_0x296b42(0x288)],'commitsPerSec':_0x4180a1['commitsPerSec'],'commitP99Ms':_0x4180a1[_0x296b42(0x2a3)],'parkedNow':_0x4180a1[_0x296b42(0x340)]??0x0,'draining':!!_0x4180a1[_0x296b42(0x32b)]};}catch{}}}catch{}return Object[_0x296b42(0x292)](_0x13778e)[_0x296b42(0x2d8)]?_0x13778e:null;}[_0x4451d0(0x1db)](){const _0x2d3566=_0x4451d0,_0x28c618=process[_0x2d3566(0x34e)],_0x190a3d=Date[_0x2d3566(0x353)](),_0x4ea4f3=_0x47aca9=>{const _0x2b543c=_0x2d3566;if(!_0x47aca9)return[];const _0x1e5c16=[];try{for(const {id:_0x3d0def,entry:_0x42bcc4}of _0x47aca9['list']()){if(_0x42bcc4?.['holder']?.[_0x2b543c(0x34e)]!==_0x28c618)continue;const _0x38ebb3=_0x42bcc4['updatedAt']??_0x42bcc4[_0x2b543c(0x2ac)]??0x0;if(_0x38ebb3+(_0x42bcc4[_0x2b543c(0x355)]??0x0)<_0x190a3d)continue;_0x1e5c16[_0x2b543c(0x202)](_0x3d0def);}}catch{}return _0x1e5c16;},_0x4cac2e=_0x4ea4f3(this[_0x2d3566(0x1a4)](_0x2d3566(0x361))),_0x1cb29c=_0x4ea4f3(this['_singletonLock'](_0x2d3566(0x276)));if(!_0x4cac2e[_0x2d3566(0x2d8)]&&!_0x1cb29c[_0x2d3566(0x2d8)])return null;return{'compact':_0x4cac2e,'replicate':_0x1cb29c};}[_0x4451d0(0x1a4)](_0x5b1c10){const _0x54374c=_0x4451d0;if(!this[_0x54374c(0x302)]?.['_rootDb'])return null;if(!this[_0x54374c(0x313)])this['_singletonLocks']=new Map();let _0x52f67d=this[_0x54374c(0x313)]['get'](_0x5b1c10);if(!_0x52f67d)try{_0x52f67d=new _0x3b7fe6(this['okdb'][_0x54374c(0x1e9)],{'namespace':_0x5b1c10}),this[_0x54374c(0x313)][_0x54374c(0x2b3)](_0x5b1c10,_0x52f67d);}catch{return null;}return _0x52f67d;}[_0x4451d0(0x2d7)](){const _0x51a964=_0x4451d0,_0x29d2de=[];try{for(const [_0x53cbb2,_0x5417fe]of this['okdb'][_0x51a964(0x2ad)]){if(_0x53cbb2[_0x51a964(0x23f)]('~'))continue;for(const _0x4d3b34 of _0x5417fe[_0x51a964(0x21c)][_0x51a964(0x1ec)]())_0x29d2de[_0x51a964(0x202)]({..._0x4d3b34,'env':_0x53cbb2});}}catch{}return{'participate':this[_0x51a964(0x302)][_0x51a964(0x347)]?.[_0x51a964(0x2c3)]??![],'processors':_0x29d2de};}['_ensureDesired'](){const _0x1486ba=_0x4451d0;if(this[_0x1486ba(0x3a7)])return!![];const _0x3392cd=this[_0x1486ba(0x302)][_0x1486ba(0x1e9)];if(!_0x3392cd)return![];return this[_0x1486ba(0x3a7)]=_0x3392cd[_0x1486ba(0x327)](_0x565ece,{'dupSort':![]}),this[_0x1486ba(0x218)]=_0x3392cd[_0x1486ba(0x327)](_0x440793,{'dupSort':![]}),!![];}async[_0x4451d0(0x34f)](){const _0x597eaf=_0x4451d0;if(!this[_0x597eaf(0x319)]())return;const _0x58a433='__vocab/version',_0xdd67d3=0x1,_0x27c6c5=this[_0x597eaf(0x3a7)]['get'](_0x58a433)??0x0;if(_0x27c6c5>=_0xdd67d3)return;const _0x372925=_0x38c196=>{const _0xbd9410=_0x597eaf;if(_0x38c196===_0xbd9410(0x316))return _0xbd9410(0x201);if(_0x38c196===_0xbd9410(0x2c1))return _0xbd9410(0x1be);return _0x38c196;};await this[_0x597eaf(0x302)]['_systemEnv'][_0x597eaf(0x300)]['transaction'](()=>{const _0x2af6cb=_0x597eaf;for(const _0x457f87 of[_0x2af6cb(0x1ac),'procmodeack/']){for(const {key:_0x54cae5,value:_0x16e38c}of this[_0x2af6cb(0x3a7)][_0x2af6cb(0x39d)]({'start':_0x457f87,'end':_0x457f87+'\xff'})){if(typeof _0x54cae5!==_0x2af6cb(0x306)||!_0x54cae5['startsWith'](_0x457f87))break;const _0x5b2bb6=_0x372925(_0x16e38c[_0x2af6cb(0x200)]);if(_0x5b2bb6!==_0x16e38c[_0x2af6cb(0x200)])this['_desired'][_0x2af6cb(0x1dc)](_0x54cae5,{..._0x16e38c,'mode':_0x5b2bb6});}}this[_0x2af6cb(0x3a7)][_0x2af6cb(0x1dc)](_0x58a433,_0xdd67d3);});}[_0x4451d0(0x318)](){const _0x13f362=_0x4451d0;return!!this[_0x13f362(0x3a7)];}[_0x4451d0(0x290)](_0x2cd75f,_0x3c9408){const _0x52d003=_0x4451d0;if(!this['_ensureDesired']())return null;const _0x1769d9=_0x2cd75f+'/'+_0x3c9408;return this[_0x52d003(0x2cc)](),this['_desiredOverlay'][_0x52d003(0x374)](_0x1769d9)??this['_desired']['get'](_0x1769d9)??null;}[_0x4451d0(0x2cc)](){const _0x11e962=_0x4451d0;if(!_0xc823f8)return;try{this[_0x11e962(0x302)]['_systemEnv']?.['db']?.[_0x11e962(0x370)]?.();}catch{}}async[_0x4451d0(0x18c)](_0x3c61e7,_0x560457,_0x47b4cc){const _0x4f25a2=_0x4451d0;if(!this[_0x4f25a2(0x319)]())return null;const _0x50d091=_0x3c61e7+'/'+_0x560457;this['_refreshDesiredSnapshot']();const _0x35e830=this[_0x4f25a2(0x2ab)][_0x4f25a2(0x374)](_0x50d091)??this[_0x4f25a2(0x3a7)][_0x4f25a2(0x374)](_0x50d091)??{'version':0x0},_0x51a965=(_0x35e830[_0x4f25a2(0x2c4)]||0x0)+0x1,_0x595882={..._0x35e830,..._0x47b4cc,'version':_0x51a965,'updatedAt':Date[_0x4f25a2(0x353)]()};this[_0x4f25a2(0x2ab)][_0x4f25a2(0x2b3)](_0x50d091,_0x595882);try{await this[_0x4f25a2(0x302)][_0x4f25a2(0x24c)]['_writer']['transaction'](()=>{const _0x3441f5=_0x4f25a2;this['_desired'][_0x3441f5(0x1dc)](_0x50d091,_0x595882);});}finally{if(this['_desiredOverlay']['get'](_0x50d091)===_0x595882)this[_0x4f25a2(0x2ab)][_0x4f25a2(0x35f)](_0x50d091);}return _0x51a965;}[_0x4451d0(0x1a7)](_0x9ab071){const _0x199aa6=_0x4451d0;if(!this[_0x199aa6(0x319)]())return[];this['_refreshDesiredSnapshot']();const _0x8f4ef1=_0x9ab071+'/',_0x18466b=[];for(const {key:_0x267963,value:_0x44a5d8}of this[_0x199aa6(0x3a7)][_0x199aa6(0x39d)]({'start':_0x8f4ef1,'end':_0x8f4ef1+'\xff'})){if(typeof _0x267963!==_0x199aa6(0x306)||!_0x267963[_0x199aa6(0x23f)](_0x8f4ef1))break;_0x18466b['push']({'key':_0x267963[_0x199aa6(0x1f6)](_0x8f4ef1[_0x199aa6(0x2d8)]),'value':_0x44a5d8});}return _0x18466b;}[_0x4451d0(0x220)](_0x4285bb){const _0x2825f0=_0x4451d0;if(!this[_0x2825f0(0x319)]())return null;return this[_0x2825f0(0x218)][_0x2825f0(0x374)](_0x4285bb)??null;}async[_0x4451d0(0x282)](_0x5602ad,_0x275829,_0x4736da={}){const _0x5d2077=_0x4451d0;if(!this[_0x5d2077(0x319)]())return null;let _0x31dd25;return await this[_0x5d2077(0x302)][_0x5d2077(0x24c)][_0x5d2077(0x300)]['transaction'](()=>{const _0x45bf92=_0x5d2077,_0x537991=this[_0x45bf92(0x218)][_0x45bf92(0x374)](_0x5602ad)||{'epoch':0x0};_0x31dd25=(_0x537991[_0x45bf92(0x2cb)]||0x0)+0x1,this[_0x45bf92(0x218)][_0x45bf92(0x1dc)](_0x5602ad,{..._0x537991,..._0x4736da,'cmd':_0x275829,'epoch':_0x31dd25,'updatedAt':Date[_0x45bf92(0x353)]()});}),_0x31dd25;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x1dc7cd,'nodeKey':_0x3440c9,'logicalKey':_0x4da6de,'slotKey':_0x5dfe88,'PROCESS_ENV':_0x5af0dc,'NODE_TYPE':_0x213036},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x171fd7=_0x24af3f;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x2ff0e9=require$$0$4,{EVENTS:_0x1ebd9c,CHANGE_ACTIONS:_0x380a0f}=requireOkdbEnums(),{LOOP:_0x11db2c}=requireOkdbLoopMonitor(),_0x21dc78=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x29f725=0x5,_0x17c427=0x2710;class _0x444ac3 extends _0x2ff0e9{constructor(_0x2f20df,_0x39556a={}){const _0x4f2c85=_0x5df3;super(),this[_0x4f2c85(0x302)]=_0x2f20df,this['_quantum']=_0x39556a[_0x4f2c85(0x27f)]??_0x21dc78,this[_0x4f2c85(0x23b)]=_0x39556a[_0x4f2c85(0x394)]??_0x29f725,this['_dedupeMax']=_0x39556a[_0x4f2c85(0x19c)]??_0x17c427,this[_0x4f2c85(0x2a9)]=![],this['_cursors']=new Map(),this[_0x4f2c85(0x375)]=new Map(),this['_pending']=new Map(),this[_0x4f2c85(0x18a)]=null,this[_0x4f2c85(0x18f)]=![],this[_0x4f2c85(0x26a)]=new Set(),this[_0x4f2c85(0x357)]=_0x37b65d=>this[_0x4f2c85(0x23d)](_0x37b65d),this[_0x4f2c85(0x1b2)]=_0x510202=>this[_0x4f2c85(0x264)](_0x510202),this['_onStop']=()=>this['stop']();}[_0x171fd7(0x2b4)](){const _0x54ddf3=_0x171fd7;if(this[_0x54ddf3(0x2a9)])return;this[_0x54ddf3(0x2a9)]=!![];for(const [_0x5b0208,_0x36bcb3]of this['okdb'][_0x54ddf3(0x2ad)]){if(_0x5b0208[_0x54ddf3(0x23f)]('~'))continue;try{_0x36bcb3['_enableChangelog']();}catch{}}for(const [_0x12dc98,_0x241c6b]of this[_0x54ddf3(0x302)]['_envs']){if(_0x12dc98[_0x54ddf3(0x23f)]('~'))continue;try{this['_baselines']['set'](_0x12dc98,_0x241c6b[_0x54ddf3(0x30c)]()||0x0);}catch{}}const {events:_0x34ec85}=this[_0x54ddf3(0x302)];_0x34ec85['on'](_0x1ebd9c['ITEM_CREATE'],this[_0x54ddf3(0x357)]),_0x34ec85['on'](_0x1ebd9c[_0x54ddf3(0x183)],this[_0x54ddf3(0x357)]),_0x34ec85['on'](_0x1ebd9c[_0x54ddf3(0x243)],this[_0x54ddf3(0x357)]),_0x34ec85['on'](_0x1ebd9c['SYSTEM_POKE'],this[_0x54ddf3(0x1b2)]),_0x34ec85[_0x54ddf3(0x37b)](_0x1ebd9c[_0x54ddf3(0x315)],this[_0x54ddf3(0x1ce)]);}['stop'](){const _0x2cf671=_0x171fd7;if(!this[_0x2cf671(0x2a9)])return;this[_0x2cf671(0x2a9)]=![];const {events:_0x60412b}=this[_0x2cf671(0x302)];_0x60412b[_0x2cf671(0x185)](_0x1ebd9c[_0x2cf671(0x2d3)],this[_0x2cf671(0x357)]),_0x60412b['off'](_0x1ebd9c[_0x2cf671(0x183)],this[_0x2cf671(0x357)]),_0x60412b[_0x2cf671(0x185)](_0x1ebd9c[_0x2cf671(0x243)],this[_0x2cf671(0x357)]),_0x60412b[_0x2cf671(0x185)](_0x1ebd9c[_0x2cf671(0x30a)],this[_0x2cf671(0x1b2)]);try{_0x60412b[_0x2cf671(0x185)](_0x1ebd9c[_0x2cf671(0x315)],this[_0x2cf671(0x1ce)]);}catch{}this[_0x2cf671(0x18a)]&&(clearTimeout(this['_flushTimer']),this[_0x2cf671(0x18a)]=null),this[_0x2cf671(0x26e)][_0x2cf671(0x1bc)](),this[_0x2cf671(0x396)]['clear'](),this[_0x2cf671(0x375)]['clear'](),this[_0x2cf671(0x26a)][_0x2cf671(0x1bc)]();}[_0x171fd7(0x1b6)](_0x442948,_0x13d5eb,_0x12a922,_0x154c1b){return _0x442948+'\x00'+_0x13d5eb+'\x00'+_0x12a922+'\x00'+_0x154c1b;}['_markSeen'](_0x20daa0,_0x2662f4,_0x4ccc47,_0x35509a){const _0x265f8a=_0x171fd7,_0x5a5441=this[_0x265f8a(0x1b6)](_0x20daa0,_0x2662f4,_0x4ccc47,_0x35509a);if(this[_0x265f8a(0x26a)][_0x265f8a(0x342)](_0x5a5441))return![];this[_0x265f8a(0x26a)][_0x265f8a(0x281)](_0x5a5441);if(this[_0x265f8a(0x26a)][_0x265f8a(0x238)]>this[_0x265f8a(0x399)]){const _0x2e8163=this[_0x265f8a(0x26a)][_0x265f8a(0x1e4)]()[_0x265f8a(0x250)]()[_0x265f8a(0x214)];this[_0x265f8a(0x26a)][_0x265f8a(0x35f)](_0x2e8163);}return!![];}[_0x171fd7(0x23d)](_0x233a1f){const _0x543379=_0x171fd7;if(!this['_started']||!_0x233a1f)return;const {env:_0x4ad50a,type:_0x527eee,key:_0x2b882e,clock:_0x3f4cc3,origin:_0x4f1075,action:_0x37c43d,newValue:_0x31bcfd,oldValue:_0x3d4909}=_0x233a1f;if(_0x4ad50a==null||_0x527eee==null||_0x2b882e==null)return;if(typeof _0x4ad50a===_0x543379(0x306)&&_0x4ad50a[_0x543379(0x23f)]('~'))return;if(typeof _0x527eee===_0x543379(0x306)&&_0x527eee[_0x543379(0x23f)]('~'))return;if(!this['_markSeen'](_0x4ad50a,_0x527eee,_0x2b882e,_0x3f4cc3))return;const _0x797081=_0x37c43d===_0x380a0f[_0x543379(0x18e)]?_0x543379(0x39b):_0x543379(0x1dc);this[_0x543379(0x33c)](_0x543379(0x2a7),{'env':_0x4ad50a,'type':_0x527eee,'key':_0x2b882e,'op':_0x797081,'clock':_0x3f4cc3,'origin':_0x4f1075,'value':_0x797081===_0x543379(0x39b)?null:_0x31bcfd,'prevValue':_0x3d4909});}[_0x171fd7(0x264)](_0x308ff9){const _0x3b3ec1=_0x171fd7;if(!this[_0x3b3ec1(0x2a9)])return;if(!_0x308ff9||typeof _0x308ff9[_0x3b3ec1(0x2de)]!==_0x3b3ec1(0x306)||typeof _0x308ff9[_0x3b3ec1(0x2d0)]!==_0x3b3ec1(0x306))return;const {env:_0x2f649f,type:_0x315219}=_0x308ff9;if(_0x2f649f[_0x3b3ec1(0x23f)]('~')||_0x315219[_0x3b3ec1(0x23f)]('~'))return;this[_0x3b3ec1(0x26e)][_0x3b3ec1(0x2b3)](_0x2f649f+'\x00'+_0x315219,{'env':_0x2f649f,'type':_0x315219}),this['_scheduleFlush']();}['_scheduleFlush'](){const _0x3cd710=_0x171fd7;if(this['_flushTimer'])return;const _0x44c472=()=>{const _0x2f88d3=_0x5df3;this[_0x2f88d3(0x18a)]=null,this[_0x2f88d3(0x35d)]()[_0x2f88d3(0x1b7)](()=>{});};this['_flushTimer']=setTimeout(_0x44c472,this[_0x3cd710(0x23b)]>0x0?this['_flushDebounce']:0x0);}async[_0x171fd7(0x35d)](){const _0x163f5d=_0x171fd7;if(this[_0x163f5d(0x18f)]){this[_0x163f5d(0x286)]();return;}this['_draining']=!![];try{const _0x3b9256=[...this['_pending']['values']()];this['_pending'][_0x163f5d(0x1bc)]();let _0x4bcf20=![];for(const {env:_0x8b722,type:_0x120d5a}of _0x3b9256){try{const _0x308a27=await this[_0x163f5d(0x1d4)](_0x8b722,_0x120d5a);if(_0x308a27)_0x4bcf20=!![];}catch{this[_0x163f5d(0x26e)][_0x163f5d(0x2b3)](_0x8b722+'\x00'+_0x120d5a,{'env':_0x8b722,'type':_0x120d5a}),_0x4bcf20=!![];}}if(_0x4bcf20||this[_0x163f5d(0x26e)][_0x163f5d(0x238)]>0x0)this[_0x163f5d(0x286)]();}finally{this[_0x163f5d(0x18f)]=![];}}async[_0x171fd7(0x1d4)](_0x1011b0,_0x39b7ee){const _0x33b0f8=_0x171fd7,_0x1a1c9f=await this[_0x33b0f8(0x302)]['_openEnvLazy'](_0x1011b0),_0x21087b=_0x1011b0+'\x00'+_0x39b7ee;!this[_0x33b0f8(0x396)][_0x33b0f8(0x342)](_0x21087b)&&(!this[_0x33b0f8(0x375)]['has'](_0x1011b0)&&(_0x1a1c9f[_0x33b0f8(0x314)](),this[_0x33b0f8(0x375)]['set'](_0x1011b0,_0x1a1c9f['getClock']()||0x0)),this['_cursors'][_0x33b0f8(0x2b3)](_0x21087b,this[_0x33b0f8(0x375)][_0x33b0f8(0x374)](_0x1011b0)));const _0x1949ff=this[_0x33b0f8(0x396)]['get'](_0x21087b),_0x374562=_0x1a1c9f[_0x33b0f8(0x30c)](_0x39b7ee)||0x0;if(_0x374562<=_0x1949ff)return![];const _0x26f37c=_0x1949ff+this['_quantum'],_0x1c591b=Math[_0x33b0f8(0x2c7)](_0x374562,_0x26f37c),_0x212c3a=_0x11db2c[_0x33b0f8(0x2c6)]?_0x11db2c[_0x33b0f8(0x353)]():0x0,_0x4f9973=Array[_0x33b0f8(0x2e1)](_0x1a1c9f[_0x33b0f8(0x2f8)](_0x39b7ee,_0x1949ff+0x1,_0x1c591b));let _0x4c4e03=_0x1949ff;for(const _0x4d481b of _0x4f9973){const {clock:_0x2e57cf,key:_0x206e45,action:_0x37ea75,origin:_0x111f04}=_0x4d481b;if(_0x2e57cf>_0x4c4e03)_0x4c4e03=_0x2e57cf;if(_0x206e45==null)continue;if(!this[_0x33b0f8(0x1fc)](_0x1011b0,_0x39b7ee,_0x206e45,_0x2e57cf))continue;let _0x163421,_0x2df0b7;if(_0x37ea75===_0x380a0f['REMOVE'])_0x163421='remove',_0x2df0b7=null;else{const _0x23fc28=_0x1a1c9f[_0x33b0f8(0x374)](_0x39b7ee,_0x206e45);_0x23fc28==null?(_0x163421=_0x33b0f8(0x39b),_0x2df0b7=null):(_0x163421=_0x33b0f8(0x1dc),_0x2df0b7=_0x23fc28);}this[_0x33b0f8(0x33c)]('change',{'env':_0x1011b0,'type':_0x39b7ee,'key':_0x206e45,'op':_0x163421,'clock':_0x2e57cf,'origin':_0x111f04,'value':_0x2df0b7});}if(_0x11db2c[_0x33b0f8(0x2c6)])_0x11db2c[_0x33b0f8(0x209)](_0x33b0f8(0x234)+_0x1011b0+':'+_0x39b7ee,_0x11db2c[_0x33b0f8(0x353)]()-_0x212c3a,'n='+_0x4f9973[_0x33b0f8(0x2d8)]);return this[_0x33b0f8(0x396)][_0x33b0f8(0x2b3)](_0x21087b,Math[_0x33b0f8(0x1fd)](_0x4c4e03,_0x1c591b)),_0x1a1c9f['getClock'](_0x39b7ee)>_0x1c591b;}['status'](){const _0x2ea574=_0x171fd7;return{'started':this['_started'],'quantum':this[_0x2ea574(0x25f)],'flushDebounce':this['_flushDebounce'],'cursors':Object['fromEntries']([...this[_0x2ea574(0x396)]['entries']()][_0x2ea574(0x28d)](([_0x279a1d,_0x4562b7])=>[_0x279a1d['replace']('\x00',':'),_0x4562b7])),'pending':this[_0x2ea574(0x26e)]['size'],'seen':this[_0x2ea574(0x26a)]['size']};}}return _0x444ac3['CHANGEFEED_QUANTUM']=_0x21dc78,okdbChangefeed={'OKDBChangefeed':_0x444ac3},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x40d8a0=_0x24af3f;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x5e96ec=require$$1$1,_0x4e7019=require$$1,{EVENTS:_0x2aa535}=requireOkdbEnums(),_0x347e78=require$$0$3,{slotKey:_0x54d73c}=requireOkdbProcessRegistry(),_0x21cc89=0xfa,_0x424dbe=0xfa0,_0x1ceab0=0x5,_0x160d59=0x2710,_0x51dba2=0xbb8,_0x478057=0x7d0,_0x186481=_0x40d8a0(0x1da),_0x3b21e0='ephemeral',_0x5be760=_0x40d8a0(0x278),_0x27e42a=_0x40d8a0(0x25b),_0x6b2cee=[_0x2aa535[_0x40d8a0(0x1e3)],_0x2aa535[_0x40d8a0(0x1bf)],_0x2aa535[_0x40d8a0(0x321)],_0x2aa535['FTS_RESET'],_0x2aa535[_0x40d8a0(0x23e)],_0x2aa535[_0x40d8a0(0x328)],_0x2aa535[_0x40d8a0(0x333)],_0x2aa535[_0x40d8a0(0x1fa)],_0x40d8a0(0x2da),'processor:progress','processor:error',_0x40d8a0(0x225),_0x40d8a0(0x330),_0x40d8a0(0x2b7)],_0x2b2c5a=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x3a08ca({workers:_0x5630e6,makeOkdb:_0x218d16,port:_0x4e81cb,primaryOkdb:_0x151a51,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x533439=_0x40d8a0;if(_0x5e96ec[_0x533439(0x326)])return childEntry&&_0x5e96ec['setupPrimary']({'exec':_0x4e7019[_0x533439(0x258)](__dirname,_0x533439(0x34c)),'args':[],'execArgv':((()=>{const _0x42309e=_0x533439,_0x252ae3=[];for(let _0xbce29=0x0;_0xbce29<process[_0x42309e(0x19b)][_0x42309e(0x2d8)];_0xbce29++){const _0x5c0f37=process['execArgv'][_0xbce29];if(_0x5c0f37[_0x42309e(0x23f)](_0x42309e(0x254))||_0x5c0f37['startsWith'](_0x42309e(0x31c))||_0x5c0f37[_0x42309e(0x23f)](_0x42309e(0x2c8)))continue;if(_0x5c0f37==='-e'||_0x5c0f37==='--eval'||_0x5c0f37==='-p'||_0x5c0f37===_0x42309e(0x2fb)){_0xbce29++;continue;}_0x252ae3[_0x42309e(0x202)](_0x5c0f37);}return _0x252ae3;})())}),_0x3cc145({'workers':_0x5630e6,'port':_0x4e81cb,'primaryOkdb':_0x151a51,'workerEnv':workerEnv});return _0x2731f6({'makeOkdb':_0x218d16,'port':_0x4e81cb});}function _0x3cc145({workers:_0x3fe9f5,port:_0x284077,primaryOkdb:_0x2d7c62,workerEnv:_0x599f49}){const _0x58a705=_0x40d8a0,_0x5152e7=new Map(),_0x18376e=new Map();let _0x5b1f86=![];const _0x16153f=_0x262482=>_0x262482?.[_0x58a705(0x1cc)],_0x5e2d76=_0x524b02=>{const _0x21e22a=_0x58a705,_0x32b66c=_0x5e96ec[_0x21e22a(0x322)]({...process.env,..._0x599f49||{},'OKDB_CLUSTER_SLOT':String(_0x524b02)});return _0x32b66c[_0x21e22a(0x1cc)]=_0x524b02,_0x5152e7[_0x21e22a(0x2b3)](_0x32b66c[_0x21e22a(0x350)][_0x21e22a(0x34e)],{'worker':_0x32b66c,'startedAt':Date['now'](),'slot':_0x524b02}),_0x32b66c['on']('error',_0x4b2cc4=>{const _0x4355c6=_0x21e22a;console['log']('[okdb-cluster]\x20worker\x20pid='+_0x32b66c['process']['pid']+_0x4355c6(0x2e0)+(_0x4b2cc4?.['message']??_0x4b2cc4));}),_0x32b66c['on'](_0x21e22a(0x2b5),()=>_0x1470f8()),_0x32b66c;},_0x1d0fd4=_0x1f22f9=>{const _0x35c09a=_0x58a705;for(const {worker:_0x28ee91}of _0x5152e7[_0x35c09a(0x1e4)]()){if(_0x28ee91[_0x35c09a(0x205)]()||!_0x28ee91[_0x35c09a(0x1f8)]())continue;try{_0x28ee91['send'](_0x1f22f9);}catch{}}};_0x2d7c62?.[_0x58a705(0x391)]?.({'kind':_0x58a705(0x2d4),'listenAddr':':'+_0x284077})[_0x58a705(0x1b7)](()=>{}),_0x2d7c62?.[_0x58a705(0x29e)]?.['setOwnMeta']?.({'workersConfigured':_0x3fe9f5});const _0x2c0584={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x1470f8=()=>{const _0xa635cf=_0x58a705,_0x395e05=_0x2d7c62?.[_0xa635cf(0x29e)];if(!_0x395e05||!_0x395e05[_0xa635cf(0x37a)])return;const _0x30ef40=_0x395e05[_0xa635cf(0x39e)];for(const {worker:_0x15c30a,startedAt:_0x1f88f5,slot:_0x3ddd1b,stats:_0x50dfc1,processing:_0x24a097}of _0x5152e7[_0xa635cf(0x1e4)]()){if(_0x15c30a[_0xa635cf(0x205)]())continue;const _0x3395f4=_0x395e05[_0xa635cf(0x318)]?.()&&_0x395e05['getDesired']('slot',_0xc6df5a(_0x3ddd1b))?.[_0xa635cf(0x298)]===!![];_0x395e05[_0xa635cf(0x2a6)]({'pid':_0x15c30a[_0xa635cf(0x350)][_0xa635cf(0x34e)],'startedAt':_0x1f88f5,'kind':_0xa635cf(0x2cf),'supervisorKey':_0x30ef40,'slot':_0x3ddd1b,'slotKey':_0xc6df5a(_0x3ddd1b),'role':_0x2c0584,'listenAddr':':'+_0x284077,'lifecycle':_0x3395f4?_0xa635cf(0x265):_0xa635cf(0x25a),'processing':_0x24a097??null,'stats':_0x50dfc1??null})['catch'](()=>{});}},_0xc6df5a=_0x283799=>_0x54d73c(_0x58a705(0x325)+_0x284077,_0x283799),_0x45f4ff=_0x4b28e6=>{const _0x434827=_0x58a705,_0x4bede0=_0x2d7c62?.[_0x434827(0x29e)];if(!_0x4bede0?.[_0x434827(0x318)]?.())return![];return _0x4bede0['getDesired'](_0x434827(0x3a3),_0xc6df5a(_0x4b28e6))?.[_0x434827(0x298)]===!![];};for(let _0x419991=0x0;_0x419991<_0x3fe9f5;_0x419991++){const _0x56148d=_0x45f4ff(_0x419991);_0x18376e[_0x58a705(0x2b3)](_0x419991,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x56148d,'respawnTimer':null}),_0x56148d?console[_0x58a705(0x278)](_0x58a705(0x1c6)+_0x419991+'\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)'):_0x5e2d76(_0x419991);}const _0x3d0bfd=()=>{const _0x29b01e=_0x58a705,_0x23e3e6=_0x2d7c62?.[_0x29b01e(0x29e)];if(!_0x23e3e6?.[_0x29b01e(0x37a)]||!_0x23e3e6[_0x29b01e(0x318)]?.())return;for(const [_0x3acae2,_0x5629b6]of _0x18376e[_0x29b01e(0x3a6)]()){const _0x3f618d=_0x23e3e6[_0x29b01e(0x290)](_0x29b01e(0x3a3),_0xc6df5a(_0x3acae2)),_0x394328=_0x3f618d?.['decommission']===!![],_0x254011=_0x3f618d?.[_0x29b01e(0x25c)]===!![];if(_0x394328&&!_0x5629b6[_0x29b01e(0x2d1)]){_0x5629b6[_0x29b01e(0x2d1)]=!![];_0x5629b6['respawnTimer']&&(clearTimeout(_0x5629b6[_0x29b01e(0x3b3)]),_0x5629b6['respawnTimer']=null);for(const {worker:_0x15f8a7}of _0x5152e7[_0x29b01e(0x1e4)]()){if(_0x16153f(_0x15f8a7)!==_0x3acae2||_0x15f8a7[_0x29b01e(0x205)]())continue;try{if(_0x254011)_0x15f8a7[_0x29b01e(0x350)][_0x29b01e(0x25c)](_0x29b01e(0x2bc));else _0x15f8a7[_0x29b01e(0x1f8)]()&&_0x15f8a7[_0x29b01e(0x339)]();}catch{}}console['log'](_0x29b01e(0x271)+(_0x254011?'hard-killed':_0x29b01e(0x246))+_0x29b01e(0x1e8)+_0x3acae2+_0x29b01e(0x291));}else{if(!_0x394328&&_0x5629b6[_0x29b01e(0x2d1)]&&_0x3f618d){_0x5629b6[_0x29b01e(0x2d1)]=![],_0x5629b6[_0x29b01e(0x1d6)]=[],_0x5629b6[_0x29b01e(0x206)]=0x0;const _0x29e143=[..._0x5152e7[_0x29b01e(0x1e4)]()]['some'](({worker:_0x363c5d})=>_0x16153f(_0x363c5d)===_0x3acae2&&!_0x363c5d[_0x29b01e(0x205)]());!_0x29e143&&!_0x5b1f86&&(_0x5e2d76(_0x3acae2),console[_0x29b01e(0x278)](_0x29b01e(0x1ff)+_0x3acae2));}}}},_0x2207cf=()=>{try{_0x3d0bfd();}catch{}};_0x2d7c62?.[_0x58a705(0x256)]?.['on']?.(_0x2aa535['SYSTEM_PROC'],_0x2207cf);const _0x3de86d=[];if(_0x2d7c62?.['events']?.['on'])for(const _0x3fe6b1 of _0x6b2cee){const _0x247d6c=_0x58b1a9=>{_0x1d0fd4({[_0x186481]:_0x3b21e0,'event':_0x3fe6b1,'data':_0x58b1a9??{}});};_0x2d7c62[_0x58a705(0x256)]['on'](_0x3fe6b1,_0x247d6c),_0x3de86d[_0x58a705(0x202)]({'event':_0x3fe6b1,'handler':_0x247d6c});}const _0x3691d0=setInterval(()=>{_0x3d0bfd(),_0x1470f8();},_0x2b2c5a);_0x3691d0[_0x58a705(0x36e)]?.();const _0x53b3d1=(_0x4dc78d,_0x1d55b5)=>{const _0x467e3d=_0x58a705;if(!_0x1d55b5||typeof _0x1d55b5!==_0x467e3d(0x2eb)||_0x1d55b5[_0x186481]!==_0x5be760)return;if(!_0x2d7c62?.['log']?.[_0x467e3d(0x35c)])return;const _0x422290=_0x1d55b5['entry']||{};_0x2d7c62[_0x467e3d(0x278)][_0x467e3d(0x35c)]({..._0x422290,'msg':'[w'+_0x1d55b5[_0x467e3d(0x3a3)]+']\x20'+(_0x422290['msg']??''),'meta':{..._0x422290[_0x467e3d(0x36c)]||{},'worker':_0x1d55b5[_0x467e3d(0x3a3)],'workerPid':_0x1d55b5[_0x467e3d(0x34e)]}});};_0x5e96ec['on'](_0x58a705(0x1a1),_0x53b3d1);const _0x31d417=(_0x79c87a,_0x39f4f6)=>{const _0x139cac=_0x58a705;if(!_0x39f4f6||typeof _0x39f4f6!==_0x139cac(0x2eb)||_0x39f4f6[_0x186481]!==_0x27e42a)return;const _0x40957f=_0x5152e7[_0x139cac(0x374)](_0x79c87a[_0x139cac(0x350)]['pid']);if(_0x40957f){_0x40957f[_0x139cac(0x25b)]={..._0x39f4f6['stats'],'at':Date[_0x139cac(0x353)]()};if(_0x39f4f6['processing']!==undefined)_0x40957f['processing']=_0x39f4f6['processing'];}};_0x5e96ec['on'](_0x58a705(0x1a1),_0x31d417),_0x5e96ec['on'](_0x58a705(0x38e),(_0x231138,_0x4c920e,_0x25ddf3)=>{const _0x50bb7a=_0x58a705,_0xee0714=_0x231138[_0x50bb7a(0x350)][_0x50bb7a(0x34e)],_0x5a0020=_0x16153f(_0x231138),_0x371179=_0x5152e7[_0x50bb7a(0x374)](_0xee0714);if(_0x371179&&_0x2d7c62?.['processes'])_0x2d7c62['processes'][_0x50bb7a(0x36b)](_0xee0714+':'+_0x371179[_0x50bb7a(0x398)])['catch'](()=>{});_0x5152e7[_0x50bb7a(0x35f)](_0xee0714),console[_0x50bb7a(0x278)](_0x50bb7a(0x32f)+_0xee0714+'\x20(slot='+(_0x5a0020??'?')+_0x50bb7a(0x2f0)+('(code='+_0x4c920e+_0x50bb7a(0x1df)+(_0x25ddf3??'none')+_0x50bb7a(0x22e)+_0x5152e7[_0x50bb7a(0x238)]+_0x50bb7a(0x301))),_0x1470f8();if(_0x5b1f86||_0x5a0020==null)return;const _0x4051e2=_0x18376e['get'](_0x5a0020);if(!_0x4051e2||_0x4051e2[_0x50bb7a(0x2d1)])return;const _0x19deb7=Date[_0x50bb7a(0x353)]();_0x4051e2[_0x50bb7a(0x1d6)][_0x50bb7a(0x202)](_0x19deb7),_0x4051e2[_0x50bb7a(0x1d6)]=_0x4051e2[_0x50bb7a(0x1d6)][_0x50bb7a(0x332)](_0x3c7d23=>_0x19deb7-_0x3c7d23<=_0x160d59);if(_0x4051e2[_0x50bb7a(0x1d6)]['length']>=_0x1ceab0){_0x4051e2[_0x50bb7a(0x2d1)]=!![],console[_0x50bb7a(0x3a0)]('[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot='+_0x5a0020+_0x50bb7a(0x295)+_0x4051e2[_0x50bb7a(0x1d6)][_0x50bb7a(0x2d8)]+_0x50bb7a(0x296)+(_0x160d59+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x5152e7[_0x50bb7a(0x238)]+_0x50bb7a(0x1b9)));return;}_0x4051e2['consecutiveFailures']++;const _0x19ffc0=Math[_0x50bb7a(0x2c7)](_0x424dbe,_0x21cc89*0x2**(_0x4051e2[_0x50bb7a(0x206)]-0x1));console[_0x50bb7a(0x278)]('[okdb-cluster]\x20respawning\x20worker\x20slot='+_0x5a0020+_0x50bb7a(0x2e6)+_0x19ffc0+_0x50bb7a(0x240)+_0x4051e2[_0x50bb7a(0x206)]+')'),_0x4051e2[_0x50bb7a(0x3b3)]=setTimeout(()=>{const _0x302dbc=_0x50bb7a;_0x4051e2['respawnTimer']=null;if(_0x5b1f86||_0x4051e2[_0x302dbc(0x2d1)])return;const _0x526a22=_0x5e2d76(_0x5a0020);_0x526a22[_0x302dbc(0x37b)](_0x302dbc(0x1a9),()=>{const _0x2e54aa=_0x302dbc;if(_0x18376e[_0x2e54aa(0x374)](_0x5a0020)===_0x4051e2)_0x4051e2[_0x2e54aa(0x206)]=0x0;});},_0x19ffc0),_0x4051e2[_0x50bb7a(0x3b3)][_0x50bb7a(0x36e)]?.();});const _0x81661a=[..._0x5152e7[_0x58a705(0x292)]()];console[_0x58a705(0x278)](_0x58a705(0x25d)+process['pid']+_0x58a705(0x30b)+_0x3fe9f5+_0x58a705(0x25e)+_0x284077+':\x20'+('['+_0x81661a['join'](',\x20')+']'));const _0x2751c7={'_isClusterController':!![],'port':_0x284077,'primaryOkdb':_0x2d7c62??null,'status'(){const _0x6e5573=_0x58a705;return{'clustered':!![],'primaryPid':process[_0x6e5573(0x34e)],'port':_0x284077,'primaryRole':_0x2d7c62?.[_0x6e5573(0x270)]??null,'processorPid':null,'supervisorPid':process[_0x6e5573(0x34e)],'workers':[..._0x5152e7[_0x6e5573(0x1e4)]()][_0x6e5573(0x28d)](({worker:_0x2d4b64})=>({'pid':_0x2d4b64[_0x6e5573(0x350)][_0x6e5573(0x34e)],'id':_0x2d4b64['id'],'dead':_0x2d4b64[_0x6e5573(0x205)]()}))};},async 'close'(){const _0x59aa3e=_0x58a705;_0x5b1f86=!![];for(const _0x841a44 of _0x18376e[_0x59aa3e(0x1e4)]()){_0x841a44[_0x59aa3e(0x2d1)]=!![],_0x841a44[_0x59aa3e(0x3b3)]&&(clearTimeout(_0x841a44[_0x59aa3e(0x3b3)]),_0x841a44[_0x59aa3e(0x3b3)]=null);}clearInterval(_0x3691d0),_0x5e96ec['off']('message',_0x53b3d1),_0x5e96ec[_0x59aa3e(0x185)](_0x59aa3e(0x1a1),_0x31d417),_0x2d7c62?.[_0x59aa3e(0x256)]?.['off']?.(_0x2aa535[_0x59aa3e(0x268)],_0x2207cf);if(_0x2d7c62?.[_0x59aa3e(0x256)]?.[_0x59aa3e(0x185)])for(const {event:_0x5318c0,handler:_0x1b89c6}of _0x3de86d){try{_0x2d7c62[_0x59aa3e(0x256)][_0x59aa3e(0x185)](_0x5318c0,_0x1b89c6);}catch{}}_0x3de86d['length']=0x0;const _0x480870=[..._0x5152e7[_0x59aa3e(0x1e4)]()]['map'](({worker:_0x1c8c1f})=>_0x1c8c1f);if(_0x480870[_0x59aa3e(0x2d8)]===0x0)return;await Promise[_0x59aa3e(0x239)](_0x480870['map'](_0x3c8b39=>new Promise(_0x400caf=>{const _0x19e772=_0x59aa3e;if(_0x3c8b39[_0x19e772(0x205)]()){_0x400caf();return;}let _0xafd9fa=![];const _0x26ca6f=()=>{if(_0xafd9fa)return;_0xafd9fa=!![];if(_0x44b922)clearTimeout(_0x44b922);_0x400caf();};_0x3c8b39[_0x19e772(0x37b)]('exit',_0x26ca6f);const _0x44b922=setTimeout(()=>{const _0x1abae3=_0x19e772;try{_0x3c8b39[_0x1abae3(0x350)][_0x1abae3(0x25c)]();}catch{}},_0x51dba2+0x1f4);_0x44b922[_0x19e772(0x36e)]?.();try{_0x3c8b39[_0x19e772(0x339)]();}catch{try{_0x3c8b39['process'][_0x19e772(0x25c)]();}catch{}}})));}};return _0x2751c7;}async function _0x2731f6({makeOkdb:_0x43996a,port:_0x4abf5f}){const _0x405c59=_0x40d8a0,_0x7cf0bb=await _0x43996a();return _0x5effc1(_0x7cf0bb),_0x7cf0bb['http'][_0x405c59(0x2f6)](_0x4abf5f);}function _0x5effc1(_0x18bdc8){const _0x4cde23=_0x40d8a0;if(!_0x18bdc8||_0x18bdc8['_clusterWorkerAttached'])return;_0x18bdc8[_0x4cde23(0x3a8)]=!![];try{const {OKDBChangefeed:_0x1a3ba4}=requireOkdbChangefeed(),_0x1ad6ac=_0x18bdc8[_0x4cde23(0x35e)];if(_0x1ad6ac&&typeof _0x1ad6ac['attachFeed']===_0x4cde23(0x22c)){const _0x288f69=new _0x1a3ba4(_0x18bdc8);_0x288f69[_0x4cde23(0x2b4)](),_0x1ad6ac[_0x4cde23(0x385)](_0x288f69),_0x18bdc8[_0x4cde23(0x37e)]=_0x288f69;}}catch(_0x73ac34){_0x18bdc8[_0x4cde23(0x278)]?.[_0x4cde23(0x20b)]?.(_0x4cde23(0x3a1)+(_0x73ac34?.[_0x4cde23(0x1a1)]??_0x73ac34),{'feature':'cluster'});}const _0x437e5f=_0x5f302b=>{const _0x260fe2=_0x4cde23;if(!_0x5f302b||typeof _0x5f302b!==_0x260fe2(0x2eb)||_0x5f302b[_0x186481]==null)return;if(_0x5f302b[_0x186481]===_0x3b21e0)try{_0x18bdc8[_0x260fe2(0x35e)]?.['pushEphemeral']?.(_0x5f302b[_0x260fe2(0x2fc)],_0x5f302b['data']);}catch{}};process['on']('message',_0x437e5f),_0x18bdc8['_clusterOnMessage']=_0x437e5f;{let _0x5130b5=process['cpuUsage'](),_0x49c73d=Date[_0x4cde23(0x353)]();const _0x48473c=()=>{const _0x1b36b9=_0x4cde23;if(typeof process[_0x1b36b9(0x22f)]!=='function'||!process[_0x1b36b9(0x34a)])return;const _0x23cef1=Date['now'](),_0x4e2833=process[_0x1b36b9(0x32d)](),_0x5827bb=(_0x23cef1-_0x49c73d)*0x3e8,_0xb537d=_0x4e2833[_0x1b36b9(0x366)]-_0x5130b5[_0x1b36b9(0x366)]+(_0x4e2833[_0x1b36b9(0x24a)]-_0x5130b5[_0x1b36b9(0x24a)]),_0x55803d=_0x5827bb>0x0?Math[_0x1b36b9(0x2c7)](0x64,Math[_0x1b36b9(0x252)](_0xb537d/(_0x5827bb*(_0x347e78[_0x1b36b9(0x1af)]()[_0x1b36b9(0x2d8)]||0x1))*0x64)):0x0;_0x5130b5=_0x4e2833,_0x49c73d=_0x23cef1;const _0x171d2f=process[_0x1b36b9(0x3a4)]();let _0x587e7b=null;try{_0x587e7b=_0x18bdc8[_0x1b36b9(0x270)]?.[_0x1b36b9(0x347)]?_0x18bdc8[_0x1b36b9(0x29e)]?.[_0x1b36b9(0x2d7)]?.()??null:null;}catch{}try{process[_0x1b36b9(0x22f)]({[_0x186481]:_0x27e42a,'stats':{'rss':_0x171d2f[_0x1b36b9(0x269)],'heapUsed':_0x171d2f[_0x1b36b9(0x31a)],'heapTotal':_0x171d2f['heapTotal'],'external':_0x171d2f['external'],'cpuPct':_0x55803d,'cpuWindowMs':Math[_0x1b36b9(0x252)](_0x5827bb/0x3e8)||null},'processing':_0x587e7b});}catch{}},_0x5c1f63=Math[_0x4cde23(0x1fd)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x3a6fd2=setInterval(_0x48473c,_0x5c1f63);_0x3a6fd2[_0x4cde23(0x36e)]?.(),_0x48473c();for(const _0x36e74b of[_0x4cde23(0x225),_0x4cde23(0x330)]){_0x18bdc8[_0x4cde23(0x256)]?.['on']?.(_0x36e74b,()=>{try{_0x48473c();}catch{}});}}let _0x354bb2=![];const _0x2762c0=async _0x4ba329=>{const _0x46a913=_0x4cde23;if(_0x354bb2)return;_0x354bb2=!![];const _0x1345a3=setTimeout(()=>process['exit'](_0x4ba329),_0x51dba2);_0x1345a3[_0x46a913(0x36e)]?.();try{await _0x18bdc8[_0x46a913(0x26f)]?.();}catch{}process[_0x46a913(0x38e)](_0x4ba329);};process['on'](_0x4cde23(0x339),()=>_0x2762c0(0x0));if(process['platform']!==_0x4cde23(0x1d9)){const _0x23078c=setInterval(()=>{const _0x420136=_0x4cde23;if(process[_0x420136(0x27b)]===0x1)_0x2762c0(0x0);},_0x478057);_0x23078c['unref']?.(),_0x18bdc8[_0x4cde23(0x329)]=_0x23078c;}}return okdbCluster={'runClustered':_0x3a08ca,'attachWorkerCluster':_0x5effc1},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0x7b58f6=_0x24af3f;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x409104=require$$0$5,{attachWorkerCluster:_0x3164fb}=requireOkdbCluster();async function _0x3d53d3(){const _0x3cd68a=_0x5df3,_0x5f52ff=process.env.OKDB_HTTP_CHILD;if(!_0x5f52ff)throw new Error(_0x3cd68a(0x2ba));const {rootPath:_0x4c35b2,port:_0x2a7c18,options:options={},logLevel:logLevel=_0x3cd68a(0x33a)}=JSON[_0x3cd68a(0x1c5)](_0x5f52ff);if(!_0x4c35b2||!_0x2a7c18)throw new Error(_0x3cd68a(0x2bf));const _0x4111d7=new _0x409104(_0x4c35b2,{...options,'engines':![],'processors':![],'compaction':![]});_0x4111d7[_0x3cd68a(0x278)]['detachConsole']?.();const _0x462f5e=process.env.OKDB_CLUSTER_SLOT??'?',_0x2e8c72={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x36e441=_0x2e8c72[logLevel]??_0x2e8c72[_0x3cd68a(0x33a)];_0x4111d7['log'][_0x3cd68a(0x377)](_0x12030f=>{const _0xb7edb0=_0x3cd68a;if((_0x2e8c72[_0x12030f[_0xb7edb0(0x1cf)]]??0x1)<_0x36e441)return;try{process[_0xb7edb0(0x22f)]?.({'__okdbCluster':_0xb7edb0(0x278),'slot':_0x462f5e,'pid':process[_0xb7edb0(0x34e)],'entry':_0x12030f});}catch{}}),await _0x4111d7[_0x3cd68a(0x1c8)](),_0x3164fb(_0x4111d7),await _0x4111d7[_0x3cd68a(0x379)][_0x3cd68a(0x2f6)](_0x2a7c18);}return _0x3d53d3()[_0x7b58f6(0x1b7)](_0x9b7db3=>{const _0x26c2a0=_0x7b58f6;try{process[_0x26c2a0(0x22f)]?.({'__okdbCluster':_0x26c2a0(0x278),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x26c2a0(0x34e)],'entry':{'level':'error','msg':_0x26c2a0(0x184)+(_0x9b7db3?.[_0x26c2a0(0x1a1)]??_0x9b7db3)}});}catch{}process[_0x26c2a0(0x38e)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module[_0x24af3f(0x29c)]=okdbHttpWorkerChild;
1
+ 'use strict';const _0xa12a27=_0x372a;(function(_0x516e8a,_0x112e93){const _0xc61a4c=_0x372a,_0x5a2942=_0x516e8a();while(!![]){try{const _0x2d7cf1=parseInt(_0xc61a4c(0x15b))/0x1*(parseInt(_0xc61a4c(0x2f1))/0x2)+parseInt(_0xc61a4c(0x267))/0x3*(-parseInt(_0xc61a4c(0x2b3))/0x4)+-parseInt(_0xc61a4c(0x1b8))/0x5+parseInt(_0xc61a4c(0x285))/0x6+-parseInt(_0xc61a4c(0x1df))/0x7*(parseInt(_0xc61a4c(0x1e6))/0x8)+-parseInt(_0xc61a4c(0x27b))/0x9+-parseInt(_0xc61a4c(0x1c0))/0xa*(-parseInt(_0xc61a4c(0x1dd))/0xb);if(_0x2d7cf1===_0x112e93)break;else _0x5a2942['push'](_0x5a2942['shift']());}catch(_0x50d728){_0x5a2942['push'](_0x5a2942['shift']());}}}(_0x1bdc,0x25ada));var require$$0$5=require('./okdb'),require$$1$1=require(_0xa12a27(0x252)),require$$1=require(_0xa12a27(0x2da)),require$$0$3=require('os'),require$$2=require(_0xa12a27(0xee)),require$$0=require(_0xa12a27(0x157)),require$$0$2=require(_0xa12a27(0x1b7)),require$$0$1=require('fs'),require$$0$4=require('node:events');function getDefaultExportFromCjs(_0x3994a6){const _0x4698ad=_0xa12a27;return _0x3994a6&&_0x3994a6[_0x4698ad(0x208)]&&Object[_0x4698ad(0x1a5)][_0x4698ad(0x142)][_0x4698ad(0x258)](_0x3994a6,_0x4698ad(0x2e9))?_0x3994a6[_0x4698ad(0x2e9)]:_0x3994a6;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x406246=_0xa12a27;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x46559c={'PUT':_0x406246(0x1cf),'REMOVE':_0x406246(0x1e9),'INDEX_DROP':_0x406246(0x238),'INDEX_REGISTER':_0x406246(0x146),'INDEX_RESET':_0x406246(0xfd),'TYPE_REGISTER':_0x406246(0x2e6),'TYPE_DROP':_0x406246(0x1f6),'FTS_REGISTER':'registerFts','FTS_DROP':_0x406246(0x144),'FTS_RESET':'resetFts','SCHEMA_SET':_0x406246(0x1c9),'SCHEMA_DROP':_0x406246(0x202),'TTL_SET':_0x406246(0x2ed),'TTL_CLEAR':'clearTtl'},_0xcef309={'SYSTEM_READY':_0x406246(0x129),'SYSTEM_STOPPED':_0x406246(0x2cc),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x406246(0x14f),'SYSTEM_DRAIN':'system:drain','SYSTEM_TYPE_DROP':'system:type_drop','SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x406246(0x1c5),'ITEM_CREATE':_0x406246(0x2cf),'ITEM_UPDATE':_0x406246(0x201),'ITEM_REMOVE':_0x406246(0x19f),'INDEX_RESET':'index:reset','INDEX_READY':_0x406246(0x130),'INDEX_PROGRESS':'index:progress','VIEW_PROGRESS':_0x406246(0x162),'INDEX_DROP':_0x406246(0x21f),'INDEX_REGISTERED':'index:registered','FTS_REGISTERED':_0x406246(0x2d3),'FTS_DROP':'fts:drop','FTS_RESET':_0x406246(0x219),'SCHEMA_SET':_0x406246(0x15d),'SCHEMA_DROP':_0x406246(0x21d),'UNIQUE_VIOLATION':_0x406246(0x131),'UNIQUE_VIOLATION_RESOLVED':_0x406246(0xf9),'REF_VIOLATION':_0x406246(0x179),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x406246(0x15c),'TXN_START':_0x406246(0x1d6),'TXN_END':_0x406246(0x260),'TXN_ROLLBACK':_0x406246(0x16f),'TYPE_REGISTERED':'type:registered','TYPE_DROP':_0x406246(0x1c6),'ENV_OPENED':_0x406246(0x2e0),'ENV_REMOVED':'env:removed','SYSTEM_ENV_RELEASE':'system:env_release','TTL_EXPIRED':'ttl:expired','TTL_SET':_0x406246(0x22d),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x406246(0x1c8),'LICENSE_ADDED':_0x406246(0x1d7),'LICENSE_ACTIVATED':_0x406246(0x26f),'LICENSE_REMOVED':_0x406246(0x276)},_0x2536d3={'CREATING':_0x406246(0xcd),'RESETTING':_0x406246(0x10d),'READY':_0x406246(0x2f0),'DROPPING':_0x406246(0x2df),'WAITING':_0x406246(0xf0)},_0x34defe={'CREATED':_0x406246(0x173),'STARTING':_0x406246(0x13a),'STARTED':'started','STOPPING':_0x406246(0x2a3),'STOPPED':'stopped'},_0xbd4da6={'CREATING':_0x406246(0xcd),'READY':_0x406246(0x2f0),'HALTED':_0x406246(0x1a1),'STOPPED':_0x406246(0x225),'RESETTING':_0x406246(0x10d)},_0x31b7de=Object['freeze']({'POKE':_0x406246(0x171),'DRAIN':_0x406246(0xdf),'TYPE_DROP':_0x406246(0x242),'PROC':'bus:proc','ENV_RELEASE':_0x406246(0x184)});return okdbEnums={'BUS_EVENTS':_0x31b7de,'CHANGE_ACTIONS':_0x46559c,'EVENTS':_0xcef309,'INDEX_STATE':_0x2536d3,'OKDB_STATE':_0x34defe,'VIEW_STATE':_0xbd4da6},okdbEnums;}function _0x1bdc(){const _0x372719=['min','heapUsed','--inspect',')\x20exited\x20','_lastCpuPct','slice','updateSupervisedChildStats','\x20drainAge=','_db','reportThreadStats','cli','platform','slot','primary',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','filter','system:ready','bumpCmd','process\x20','treeView','http\x20worker\x20child\x20failed:\x20','registry\x20heartbeat\x20skipped\x20(writer=','workers','index:ready','unique:violation','_envs','\x20while\x20this\x20process\x20runs\x20','flushed','_buildProcessingFacet','tryAcquire','cpus','_lastCpuAt','commit','starting','load','options','type','afterWrite','host','updatedAt','_migrateVocab','hasOwnProperty','claims','dropFts','_closed','registerIndex','slotKey','childTransaction','force',',\x20signal=','cpuWindowMs','processor:paused','message','clear','system:poke','_onPoke','listNodes','fanout','ORPHAN\x20(env-closed\x20write)','procmode/','processes','_nodeDbCache','node:perf_hooks','_baselines','entries','test','386QDvBJR','sync:apply','schema:set','instanceId','_report','close','REMOVE','view:progress','_buildOwnRow','hasType','okdb-http-worker-child.js','includes','worker','heartbeatMs','warn','_wantDb','events','_admissionTimer','namespace','SYNC_COMMITS','txn:rollback','processKey','bus:poke','oldestPendingMs','created','_outstanding','SIGKILL','http','committed','_nodeDbFor','ref:violation','user','env','_durs','_ownMeta','(code=','maxExtra','_admissionStarted','push','_sandbox','error:\x20','bus:env_release','attachFeed','allSettled','_refreshDesiredSnapshot','transaction','\x20worker\x20slot=','_children','max','abs','none','fromEntries','clusterStatusView','quantum','isDead','\x20\x20env=','online','processor','nodesView','then','_clusterOrphanWatch','status','INDEX_REGISTERED','ms\x20mean=','randomUUID','_nodeDb','_scheduleFlush','envsOpen','item:remove','singletonClaims','halted','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.','--print','detachConsole','prototype','processor:retry','_participate','listAll','removeSync','deregisterSelf','getProcess','stderr','busy','registry-publish','exports','1ofN:','ppid','listDesired','stats','getClock','_onItem','nodeKey','perf_hooks','58915ZtbTwr','_putRowAsync','building','commitP99Ms','_statusEnv','processing','node','\x20statusEnv=','3530vuZqPn','enable','startsWith','_released','markClosed','system:bus_state_change','type:drop','_onStop','license:invalid','setSchema','object','has','_buildChildRow','_isStale','_threadStats','put','_buckets','level','fast','_rootDb','_desired','\x20phase=','txn:start','license:added','ttlMs','_sampleOwnStats','okdb-diag.','setDesired','\x20died\x20','11429BpGKNo','removeNode','7eoPCIs','memoryUsage','--eval','instances','ms/','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','mean','360776zynnxq','transactionSync','_startHeartbeat','remove','_nodeDead','ms\x20on\x20env=','floor','toFixed','ITEM_UPDATE','_isWriter','raw-remove','dead','find','okdb','count','ms\x20activeWriters=','dropType','_hbTimer','\x20(durable\x20desired-state)','processor:resumed','FTS_REGISTERED','_inflight','commitsPerSec','unref','\x20ipc\x20error:\x20','_enableChangelog','signalWant','item:update','dropSchema','uncaughtException','recent\x20writes\x20(newest\x20first)','standalone','_pending','compaction','__esModule','processorId','meta','draining','async','SYSTEM_PROC','deaths','_started','\x20times\x20in\x20','_coordinator','_onProcEvent','cursorKey','inst:','sandbox','_rawDb','__vocab/version','\x20in\x20','fts:reset','number','function','external','schema:drop','enabled','index:drop','ENV_CLOSING_RETRY','beforeWrite','lifecycle','_processStartedAt','loop-lag','stopped','_role','exit','(worst\x20','_handleInProcess','acquiredAt','getRange','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','ttl:set','putSync','--watch','\x20@\x20','isWanted','heapTotal','list','runtimeProcessesView','_selfKey','label','_wantDbHandle','dropIndex','entry','_committed','ms\x20env=','clearThreadStats','log','release','_heartbeatInFlight','parse','shift','bus:type_drop','removeSupervisedChild','inflightAgesMs','_quantum','\x20sync','start','_instanceId','[okdb-cluster]\x20','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','selfKey','holder','_caps','_seen','\x20—\x20','loop-lag\x20','_dedupeMax','cluster','isHeld','send','data','rows=','addSupervisedChild','call','offWindow','error','tierList','_putRowSync','SWAP','_publishFailWarned','_onTick','txn:end','off','publishChildRow','listenAddr','embedded','_windowCbs','_flushTimer','3LBGCWr','SYSTEM_POKE','single','engines','ms\x20(attempt\x20','cpuPct','catch','_draining','license:activated','INDEX_PROGRESS','migrations','_cmd','.log','_lastCpuUsage','role','license:removed','disable','participate','~processes:desired','_flushDebounce','1358649dHkvAB','_ensureDesired','_rowKey','_markSeen','_writer','state','trim','_removeRowAsync','noteListenAddr','repeat','771624WnfWWs','connected','_collectWriterFacet','execArgv','okdb-writer:\x20env\x20closing\x20—\x20retry','setupPrimary','_listenAddr','_cursors','next','inspect','view','firstTs','uptime','percentile','open','emit','flushLmdb','processor:ready','flushDebounce','size','_heartbeatTimer',':want','createEnvironment','openDB','_dedupeKey','some','reduce','_key','\x20│\x20','isConnected','stopping','ephemeral','_groupByProcess','consecutiveFailures','stop','once','kind','_maybePublish','rss',');\x20','\x20\x20(no\x20env\x20draining)','now','\x20worker(s)\x20remaining','fork','\x20pid=','processors','1117976wUfMtu','_singletonLock','_isReader','cluster-wide','_clusterWorkerAttached','keys','ingest','toISOString','_done','_timer','isActive','maxMs','hostname','_publishNow','values','dumpedAt','listen','FTS_DROP','\x20===','code','~processes','appendFileSync','\x20HTTP\x20server(s)\x20on\x20port\x20','2.2.1','_lockDb','system:stopped','round','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','item:create','\x20parkedNow=','claimGated','kill','fts:registered','procmodeack/','_drain','race','processingStatusView','\x0a===\x20OKDB_DIAG\x20','http-server','path','disconnect','stack','add','map','dropping','env:opened','reap','unclaimed','respawnTimer','depth','indexOf','registerType','change','_log','default','name','caps','\x20\x20#','setTtl','version','raw-put','ready','758aQVJnQ','_lastCpuWindowMs','children','startedAt','_singletonLocks','_drainOne','_openEnvLazy','_bpWaiters','~lock','resolve','creating','processor:progress','set','length','_lock','cpuUsage','string','putNode','_versionSkewWarned','sync','_holderDead','split','_bpParkedTotal','feed:','write','hard-killed','setOwnMeta','getDesired','bus:drain','decommission','compact','register','_acquiredAt','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','threads','supervisorKey','note','ms\x20max=','_adminRelay','_highWater','running','stopHeartbeat','process','crypto','_handlePoke','waiting','ITEM_CREATE','[okdb-cluster]\x20primary\x20pid=','_startedAt','seq','_enqueuedAt','join','\x20worker(s)\x20still\x20serving','get','unique:violation_resolved','delete','_desiredOverlay','_supervisorKey','resetIndex','~processes:cmd','_activateProcesses','node/','expiresAt','decommissioned','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','hasDesired','parkedNow','_systemEnv','prependListener','startHeartbeat','__okdbSlot','_getType','splice','--test','resetting','system','_kind','_collectSingletonClaims','sort','pid','VIEW_PROGRESS','dedupeMax','_lastPublishAt','mode','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','[okdb-cluster]\x20worker\x20pid='];_0x1bdc=function(){return _0x372719;};return _0x1bdc();}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x422bac=_0xa12a27;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x192224,performance:_0x2fd10f}=require$$0,_0xd7fe8=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG==='true',_0x21f7a3=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x3adb43=process.env.OKDB_LOOP_LAG_ALL==='1',_0x3ab6b4=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x36c420{constructor(){const _0x5a2c0c=_0x372a;this['enabled']=_0xd7fe8,this[_0x5a2c0c(0x1d0)]=new Map(),this['_h']=null,this[_0x5a2c0c(0x2bc)]=null,this['_started']=![],this[_0x5a2c0c(0x2e8)]=(_0x17a9cb,_0x15898a)=>process[_0x5a2c0c(0x1ac)]['write'](_0x17a9cb+(_0x15898a?'\x20'+JSON['stringify'](_0x15898a):'')+'\x0a');}['now'](){const _0x410eae=_0x372a;return _0x2fd10f[_0x410eae(0x2ae)]();}['setLogger'](_0x43a369){const _0x636b2e=_0x372a;if(typeof _0x43a369===_0x636b2e(0x21b))this[_0x636b2e(0x2e8)]=_0x43a369;}['note'](_0x3b1e37,_0x3e4317,_0x408908){const _0x35eb15=_0x372a;if(!this[_0x35eb15(0x21e)])return;let _0x149543=this['_buckets'][_0x35eb15(0xf8)](_0x3b1e37);!_0x149543&&(_0x149543={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x35eb15(0x1d0)]['set'](_0x3b1e37,_0x149543)),_0x149543['ms']+=_0x3e4317,_0x149543[_0x35eb15(0x1f4)]+=0x1,_0x3e4317>_0x149543[_0x35eb15(0x2be)]&&(_0x149543[_0x35eb15(0x2be)]=_0x3e4317,_0x149543[_0x35eb15(0x17f)]=_0x408908||'');}['start'](_0x1cead8){const _0x1d98b8=_0x372a;if(!this[_0x1d98b8(0x21e)]||this[_0x1d98b8(0x20f)])return;this['_started']=!![];if(_0x1cead8)this[_0x1d98b8(0x2e8)]=_0x1cead8;this['_h']=_0x192224({'resolution':0xa}),this['_h'][_0x1d98b8(0x1c1)](),this['_timer']=setInterval(()=>this[_0x1d98b8(0x15f)](),_0x21f7a3);if(this[_0x1d98b8(0x2bc)]['unref'])this[_0x1d98b8(0x2bc)][_0x1d98b8(0x1fd)]();}['onWindow'](_0x4795f8){const _0x17c2b6=_0x372a;if(!this['_windowCbs'])this[_0x17c2b6(0x265)]=new Set();this[_0x17c2b6(0x265)][_0x17c2b6(0x2dd)](_0x4795f8);if(!this[_0x17c2b6(0x20f)])this['_startAdmission']();}[_0x422bac(0x259)](_0x2c0a22){const _0x4fe5c1=_0x422bac;this[_0x4fe5c1(0x265)]?.[_0x4fe5c1(0xfa)](_0x2c0a22);}['_startAdmission'](){const _0xa1adf1=_0x422bac;if(this['_admissionStarted'])return;this[_0xa1adf1(0x180)]=!![];!this['_h']&&(this['_h']=_0x192224({'resolution':0xa}),this['_h']['enable']());const _0x1caf3e=_0x21f7a3;this[_0xa1adf1(0x16c)]=setInterval(()=>{const _0x43140d=_0xa1adf1,_0x20c5fb=this['_h'];if(!_0x20c5fb)return;const _0x178bd0=_0x20c5fb[_0x43140d(0x292)](0x63)/0xf4240,_0x5f7368=_0x20c5fb['max']/0xf4240,_0x52537f=_0x20c5fb[_0x43140d(0x1e5)]/0xf4240;_0x20c5fb['reset']();if(this[_0x43140d(0x265)])for(const _0x7ff3b3 of this[_0x43140d(0x265)]){try{_0x7ff3b3({'p99Ms':_0x178bd0,'maxMs':_0x5f7368,'meanMs':_0x52537f,'reportMs':_0x1caf3e});}catch{}}},_0x1caf3e);if(this[_0xa1adf1(0x16c)][_0xa1adf1(0x1fd)])this[_0xa1adf1(0x16c)]['unref']();}['_report'](){const _0xfa6dc2=_0x422bac,_0x1e52d2=this['_h'],_0x2f3d45=_0x1e52d2[_0xfa6dc2(0x18b)]/0xf4240,_0x482008=_0x1e52d2[_0xfa6dc2(0x292)](0x63)/0xf4240,_0x54a07d=_0x1e52d2[_0xfa6dc2(0x1e5)]/0xf4240;_0x1e52d2['reset']();const _0x196e3b=[...this[_0xfa6dc2(0x1d0)][_0xfa6dc2(0x159)]()][_0xfa6dc2(0x2de)](([_0x4ebbf8,_0x508720])=>({'label':_0x4ebbf8,..._0x508720}))[_0xfa6dc2(0x111)]((_0xc14666,_0x450d41)=>_0x450d41['ms']-_0xc14666['ms'])['slice'](0x0,0x8);this[_0xfa6dc2(0x1d0)][_0xfa6dc2(0x14e)]();const _0x48bfe2=_0x196e3b[_0xfa6dc2(0x29f)]((_0x53195b,_0x596cc7)=>_0x53195b+_0x596cc7['ms'],0x0),_0x1f4854=_0x196e3b['map'](_0x3bf04d=>_0x3bf04d[_0xfa6dc2(0x236)]+'='+_0x3bf04d['ms'][_0xfa6dc2(0x1ed)](0x0)+_0xfa6dc2(0x1e3)+_0x3bf04d[_0xfa6dc2(0x1f4)]+(_0x3bf04d[_0xfa6dc2(0x2be)]>0x5?_0xfa6dc2(0x228)+_0x3bf04d[_0xfa6dc2(0x2be)][_0xfa6dc2(0x1ed)](0x0)+'ms'+(_0x3bf04d[_0xfa6dc2(0x17f)]?'\x20'+_0x3bf04d[_0xfa6dc2(0x17f)]:'')+')':''));(_0x3adb43||_0x2f3d45>=_0x3ab6b4)&&this[_0xfa6dc2(0x2e8)](_0xfa6dc2(0x250)+_0x21f7a3+_0xfa6dc2(0xe8)+_0x2f3d45[_0xfa6dc2(0x1ed)](0x0)+'ms\x20p99='+_0x482008[_0xfa6dc2(0x1ed)](0x0)+_0xfa6dc2(0x19a)+_0x54a07d[_0xfa6dc2(0x1ed)](0x0)+'ms\x20busy='+_0x48bfe2['toFixed'](0x0)+'ms'+(_0x1f4854[_0xfa6dc2(0xd0)]?_0xfa6dc2(0x2a1)+_0x1f4854[_0xfa6dc2(0xf6)]('\x20\x20'):''),{'feature':_0xfa6dc2(0x224)});if(this[_0xfa6dc2(0x265)])for(const _0x1fd857 of this[_0xfa6dc2(0x265)]){try{_0x1fd857({'p99Ms':_0x482008,'maxMs':_0x2f3d45,'meanMs':_0x54a07d,'reportMs':_0x21f7a3});}catch{}}}[_0x422bac(0x2a7)](){const _0x53bd66=_0x422bac;if(this[_0x53bd66(0x2bc)])clearInterval(this[_0x53bd66(0x2bc)]);if(this['_h'])this['_h'][_0x53bd66(0x277)]();this[_0x53bd66(0x2bc)]=null,this['_h']=null,this[_0x53bd66(0x20f)]=![];}}const _0x3493c9=new _0x36c420();if(_0x3493c9[_0x422bac(0x21e)])_0x3493c9[_0x422bac(0x247)]();return okdbLoopMonitor={'LOOP':_0x3493c9},okdbLoopMonitor;}function _0x372a(_0x2237ed,_0x30e39f){_0x2237ed=_0x2237ed-0xc4;const _0x1bdcaa=_0x1bdc();let _0x372a58=_0x1bdcaa[_0x2237ed];return _0x372a58;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x570675=require$$0$1,_0x4f9e6e=require$$1;let _0x121302,_0x3d9f5e,_0x26e862,_0x4de4f9,_0x564bde,_0x3698e6,_0x19a922,_0x3c0ca3=![];const _0x4e97a4=new Set();let _0x9d407f=null;const _0x28c4fe=new Map();function _0x21ff10(){if(_0x121302!==undefined)return _0x121302;_0x121302=process.env.OKDB_DIAG==='1';if(!_0x121302)return![];_0x3d9f5e=process.env.OKDB_DIAG_STACK==='1',_0x4de4f9=Math['max'](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x26e862=new Array(_0x4de4f9),_0x564bde=0x0,_0x3698e6=0x0,_0x19a922=process.env.OKDB_DIAG_DIR||null;if(_0x19a922)try{_0x570675['mkdirSync'](_0x19a922,{'recursive':!![]});}catch{}return!![];}function _0x1e1de5(){return _0x121302===undefined?_0x21ff10():_0x121302;}function _0x5a425a(_0x49cac7,_0x2f4221){const _0x200936=_0x372a;if(_0x121302===undefined?!_0x21ff10():!_0x121302)return;let _0x2c5381;if(_0x3d9f5e){const _0x5870c0=new Error()['stack']||'';_0x2c5381=_0x5870c0[_0x200936(0xd8)]('\x0a')['slice'](0x3)[_0x200936(0x2de)](_0x37f2f5=>_0x37f2f5[_0x200936(0x281)]())[_0x200936(0x128)](Boolean)[_0x200936(0x11e)](0x0,0x8);}_0x26e862[_0x564bde]={'seq':_0x3698e6++,'t':Date[_0x200936(0x2ae)](),'env':_0x49cac7,'kind':_0x2f4221||_0x200936(0x139),'stack':_0x2c5381},_0x564bde=(_0x564bde+0x1)%_0x4de4f9;}function _0x38d717(_0x467573){const _0x4eb75a=_0x372a,_0x3e2bb1=[];for(let _0x5ca781=0x0;_0x5ca781<_0x4de4f9;_0x5ca781++){const _0x4a1161=_0x26e862[(_0x564bde-0x1-_0x5ca781+_0x4de4f9*0x2)%_0x4de4f9];if(!_0x4a1161)continue;_0x3e2bb1[_0x4eb75a(0x181)](_0x4a1161);if(_0x3e2bb1['length']>=_0x467573)break;}return _0x3e2bb1;}function _0x1305a8(_0x997009){const _0x1253e1=_0x372a;try{process[_0x1253e1(0x1ac)][_0x1253e1(0xdb)](_0x997009+'\x0a');}catch{}if(_0x19a922)try{_0x570675[_0x1253e1(0x2c8)](_0x4f9e6e[_0x1253e1(0xf6)](_0x19a922,_0x1253e1(0x1da)+process['pid']+_0x1253e1(0x273)),_0x997009+'\x0a');}catch{}}function _0x53ae6e(_0x570cb2){const _0x510227=_0x372a,_0x4a1abd=_0x38d717(_0x570cb2);if(!_0x4a1abd[_0x510227(0xd0)])return _0x510227(0x103);const _0x1c601d=Date[_0x510227(0x2ae)]();return _0x4a1abd[_0x510227(0x2de)](_0xac4c2f=>{const _0x11f896=_0x510227,_0x1c3ab5=_0x11f896(0x2ec)+_0xac4c2f[_0x11f896(0xf4)]+'\x20-'+(_0x1c601d-_0xac4c2f['t'])+_0x11f896(0x23b)+_0xac4c2f[_0x11f896(0x17b)]+'\x20'+_0xac4c2f[_0x11f896(0x2a9)];return _0xac4c2f[_0x11f896(0x2dc)]&&_0xac4c2f[_0x11f896(0x2dc)][_0x11f896(0xd0)]?_0x1c3ab5+'\x0a\x20\x20\x20\x20\x20\x20'+_0xac4c2f['stack'][_0x11f896(0xf6)]('\x0a\x20\x20\x20\x20\x20\x20'):_0x1c3ab5;})['join']('\x0a');}function _0x363b23(_0x35e100,_0x15895f){const _0x1751bd=_0x372a,_0x46ad80=_0x1751bd(0x2d8)+_0x35e100+_0x1751bd(0x230)+new Date()[_0x1751bd(0x2ba)]()+_0x1751bd(0x2b1)+process[_0x1751bd(0x112)]+_0x1751bd(0x2c5),_0x76cb3=[_0x46ad80,_0x1751bd(0x183)+(_0x15895f&&_0x15895f[_0x1751bd(0x2dc)]?_0x15895f[_0x1751bd(0x2dc)][_0x1751bd(0xd8)]('\x0a')[0x0]:_0x15895f),_0x1751bd(0x204)+(_0x3d9f5e?'':'\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site')+':',_0x53ae6e(0x18),_0x2b3531(),'='['repeat'](_0x46ad80[_0x1751bd(0xd0)]-0x1)];_0x1305a8(_0x76cb3['join']('\x0a'));}function _0x3685d4(_0x25061f){const _0x13c6c7=_0x372a;if(!_0x1e1de5())return;const _0x1a02c0=String(_0x25061f&&_0x25061f['message']||_0x25061f||''),_0x22becd=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x13c6c7(0x15a)](_0x1a02c0);_0x363b23(_0x22becd?_0x13c6c7(0x153):_0x13c6c7(0x203),_0x25061f);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x22becd)return;try{console[_0x13c6c7(0x25a)](_0x25061f&&_0x25061f[_0x13c6c7(0x2dc)]?_0x25061f[_0x13c6c7(0x2dc)]:_0x25061f);}catch{}process[_0x13c6c7(0x227)](0x1);}function _0x6b1dec(_0x32202c){const _0x4e5ee8=_0x372a;if(!_0x1e1de5())return;const _0x31d021=String(_0x32202c&&_0x32202c[_0x4e5ee8(0x14d)]||_0x32202c||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x4e5ee8(0x15a)](_0x31d021)&&_0x363b23('ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)',_0x32202c);}function _0x2b3531(){const _0x69fb42=_0x372a,_0x5dd40d=[_0x69fb42(0x117)];let _0x40dc38=![];for(const _0x376432 of _0x4e97a4){const _0x38fd88=_0x376432&&_0x376432['_envs'];if(!_0x38fd88)continue;for(const [_0x652bc6,_0x380ef8]of _0x38fd88){const _0x28bde3=_0x380ef8&&_0x380ef8[_0x69fb42(0x211)]&&_0x380ef8[_0x69fb42(0x211)][_0x69fb42(0x28f)];if(!_0x28bde3)continue;let _0x679014,_0x17f73c;try{_0x679014=Atomics['load'](_0x28bde3,0x0),_0x17f73c=Atomics[_0x69fb42(0x13b)](_0x28bde3,0x1);}catch{continue;}if(_0x679014===0x0)continue;_0x40dc38=!![];const _0x5dfbf4=_0x679014>0x0?_0x69fb42(0x25d):'copy',_0x5c37a6=Date[_0x69fb42(0x2ae)]()-Math[_0x69fb42(0x18c)](_0x679014)*0x3e8,_0x23fbc3=((()=>{const _0x30c0f5=_0x69fb42;try{return _0x380ef8[_0x30c0f5(0x27f)]&&_0x380ef8[_0x30c0f5(0x27f)][_0x30c0f5(0x198)]?_0x380ef8['_writer']['status']():null;}catch{return null;}})());_0x5dd40d[_0x69fb42(0x181)](_0x69fb42(0x192)+_0x652bc6+_0x69fb42(0x1d5)+_0x5dfbf4+_0x69fb42(0x120)+_0x5c37a6+_0x69fb42(0x1f5)+_0x17f73c+(_0x23fbc3?'\x20writer{depth='+_0x23fbc3[_0x69fb42(0x2e4)]+'\x20oldestPendingMs='+_0x23fbc3['oldestPendingMs']+_0x69fb42(0x2d0)+_0x23fbc3['parkedNow']+'}':''));}}if(!_0x40dc38)_0x5dd40d[_0x69fb42(0x181)](_0x69fb42(0x2ad));return _0x5dd40d[_0x69fb42(0xf6)]('\x0a');}function _0x30bd90(){const _0x16b183=_0x372a;if(!_0x1e1de5())return;const _0x1edfd4=Math['max'](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x2b4f09=Date['now']();for(const _0x1a980f of _0x4e97a4){const _0x496897=_0x1a980f&&_0x1a980f['_envs'];if(!_0x496897)continue;for(const [_0x3a9fc2,_0x551621]of _0x496897){const _0x527b35=_0x551621&&_0x551621['_coordinator']&&_0x551621['_coordinator'][_0x16b183(0x28f)];if(!_0x527b35)continue;let _0x2de997;try{_0x2de997=Atomics[_0x16b183(0x13b)](_0x527b35,0x0);}catch{continue;}const _0x55a278=_0x1a980f['path']+'|'+_0x3a9fc2;if(_0x2de997<=0x0){_0x28c4fe['delete'](_0x55a278);continue;}const _0x3343d1=_0x2b4f09-_0x2de997*0x3e8,_0x5410db=_0x28c4fe['get'](_0x55a278);if(_0x3343d1<_0x1edfd4)continue;if(_0x5410db&&_0x2b4f09-_0x5410db[_0x16b183(0x2c2)]<_0x1edfd4)continue;_0x28c4fe[_0x16b183(0xcf)](_0x55a278,{'firstTs':_0x5410db?_0x5410db[_0x16b183(0x290)]:_0x2de997,'dumpedAt':_0x2b4f09});const _0x506cfb='\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20'+_0x3343d1+_0x16b183(0x1eb)+_0x3a9fc2+'\x20@\x20'+new Date()['toISOString']()+'\x20pid='+process['pid']+'\x20===';_0x1305a8([_0x506cfb,_0x2b3531(),'='[_0x16b183(0x284)](_0x506cfb[_0x16b183(0xd0)]-0x1)][_0x16b183(0xf6)]('\x0a'));}}}function _0x58afe6(){const _0xf99fe9=_0x372a;if(!_0x1e1de5()||_0x3c0ca3)return;_0x3c0ca3=!![],process[_0xf99fe9(0x107)](_0xf99fe9(0x203),_0x3685d4),process['prependListener']('unhandledRejection',_0x6b1dec);const _0xfbad8e=Math[_0xf99fe9(0x18b)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x9d407f=setInterval(_0x30bd90,_0xfbad8e);if(_0x9d407f[_0xf99fe9(0x1fd)])_0x9d407f[_0xf99fe9(0x1fd)]();}function _0x986448(_0x5438e1){const _0x4b2b37=_0x372a;if(!_0x1e1de5()||!_0x5438e1)return;_0x4e97a4[_0x4b2b37(0x2dd)](_0x5438e1),_0x58afe6();}function _0x4ff376(_0x3e9b4c){_0x4e97a4['delete'](_0x3e9b4c);}function _0xfc5402(){if(!_0x1e1de5())return{'enabled':![],'hint':'set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)'};return{'enabled':!![],'stackCapture':!!_0x3d9f5e,'recentWrites':_0x38d717(0x10),'drain':_0x2b3531()};}return okdbDiag={'isEnabled':_0x1e1de5,'recordWrite':_0x5a425a,'installDiag':_0x58afe6,'registerOkdb':_0x986448,'unregisterOkdb':_0x4ff376,'snapshot':_0xfc5402},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x3c1e0b=_0xa12a27;if(hasRequiredOkdbWriter)return okdbWriter[_0x3c1e0b(0x1af)];hasRequiredOkdbWriter=0x1;const {performance:_0x455f3a}=require$$0$2,_0x3cc030=requireOkdbDiag(),_0x5424a3=process.env.OKDB_COMMIT_MODE==='sync';class _0x95fcaf{constructor(_0x25440a){const _0x48efa9=_0x3c1e0b;this[_0x48efa9(0x17b)]=_0x25440a,this[_0x48efa9(0x1fb)]=new Set(),this[_0x48efa9(0xf5)]=new Map(),this['_committed']=0x0,this[_0x48efa9(0x17c)]=[],this[_0x48efa9(0x2bb)]=[],this[_0x48efa9(0xea)]=Math['max'](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this['_outstanding']=0x0,this[_0x48efa9(0xca)]=[],this['_bpParkedTotal']=0x0;}async[_0x3c1e0b(0x188)](_0x2947b8,_0x3d83e7){const _0x52f4e8=_0x3c1e0b;if(_0x3cc030['isEnabled']())_0x3cc030['recordWrite'](this[_0x52f4e8(0x17b)]?.[_0x52f4e8(0x2ea)],_0x3d83e7);if(this[_0x52f4e8(0x145)]){const _0x56bce2=new Error(_0x52f4e8(0x289));_0x56bce2['code']=_0x52f4e8(0x220);throw _0x56bce2;}if(this[_0x52f4e8(0xea)]>0x0){let _0x26dd97=![];while(this[_0x52f4e8(0x174)]>=this[_0x52f4e8(0xea)]&&!this[_0x52f4e8(0x145)]){!_0x26dd97&&(_0x26dd97=!![],this['_bpParkedTotal']++),await new Promise(_0x1a335a=>this['_bpWaiters']['push'](_0x1a335a));}if(this[_0x52f4e8(0x145)]){const _0x43346a=new Error(_0x52f4e8(0x289));_0x43346a[_0x52f4e8(0x2c6)]=_0x52f4e8(0x220);throw _0x43346a;}}this[_0x52f4e8(0x174)]++;const _0x4913b9=this['env'][_0x52f4e8(0x211)];if(_0x4913b9)await _0x4913b9[_0x52f4e8(0x221)]();if(this[_0x52f4e8(0x145)]){if(_0x4913b9)_0x4913b9[_0x52f4e8(0x13e)]();this[_0x52f4e8(0x174)]--;if(this[_0x52f4e8(0xca)][_0x52f4e8(0xd0)]&&this[_0x52f4e8(0x174)]<this[_0x52f4e8(0xea)])this[_0x52f4e8(0xca)][_0x52f4e8(0x241)]()();const _0x570c7f=new Error(_0x52f4e8(0x289));_0x570c7f[_0x52f4e8(0x2c6)]=_0x52f4e8(0x220);throw _0x570c7f;}const _0x12805c=_0x455f3a[_0x52f4e8(0x2ae)]();if(_0x5424a3)try{const _0x1738b9=this['env']['db'][_0x52f4e8(0x1e7)](_0x2947b8);this[_0x52f4e8(0x23a)]++;if(this[_0x52f4e8(0x17c)][_0x52f4e8(0x181)](_0x455f3a[_0x52f4e8(0x2ae)]()-_0x12805c)>0x100)this[_0x52f4e8(0x17c)][_0x52f4e8(0x241)]();if(this[_0x52f4e8(0x2bb)]['push'](_0x455f3a[_0x52f4e8(0x2ae)]())>0x800)this[_0x52f4e8(0x2bb)][_0x52f4e8(0x241)]();return _0x1738b9;}finally{this[_0x52f4e8(0x174)]--;if(this[_0x52f4e8(0xca)]['length']&&this['_outstanding']<this[_0x52f4e8(0xea)])this[_0x52f4e8(0xca)][_0x52f4e8(0x241)]()();if(_0x4913b9)_0x4913b9[_0x52f4e8(0x13e)]();}const _0x23a401=this[_0x52f4e8(0x17b)]['db'][_0x52f4e8(0x148)](_0x2947b8);this[_0x52f4e8(0x1fb)][_0x52f4e8(0x2dd)](_0x23a401),this[_0x52f4e8(0xf5)]['set'](_0x23a401,_0x12805c);const _0x28dc86=()=>{const _0x4de56c=_0x52f4e8;this[_0x4de56c(0x1fb)][_0x4de56c(0xfa)](_0x23a401),this[_0x4de56c(0xf5)][_0x4de56c(0xfa)](_0x23a401),this[_0x4de56c(0x23a)]++,this[_0x4de56c(0x174)]--;this[_0x4de56c(0xca)][_0x4de56c(0xd0)]&&this[_0x4de56c(0x174)]<this[_0x4de56c(0xea)]&&this['_bpWaiters'][_0x4de56c(0x241)]()();if(this['_durs']['push'](_0x455f3a[_0x4de56c(0x2ae)]()-_0x12805c)>0x100)this[_0x4de56c(0x17c)][_0x4de56c(0x241)]();if(this['_done'][_0x4de56c(0x181)](_0x455f3a[_0x4de56c(0x2ae)]())>0x800)this[_0x4de56c(0x2bb)][_0x4de56c(0x241)]();};_0x23a401[_0x52f4e8(0x196)](_0x28dc86,_0x28dc86);try{return await _0x23a401;}finally{if(_0x4913b9)_0x4913b9['afterWrite']();}}[_0x3c1e0b(0x198)](){const _0x39b03e=_0x3c1e0b,_0x41dae1=_0x455f3a['now']();let _0xc2f4a2=0x0;for(const _0x25bb5d of this[_0x39b03e(0xf5)]['values']()){const _0x1bf272=_0x41dae1-_0x25bb5d;if(_0x1bf272>_0xc2f4a2)_0xc2f4a2=_0x1bf272;}let _0x278a87=0x0;for(let _0x5667f7=this[_0x39b03e(0x2bb)][_0x39b03e(0xd0)]-0x1;_0x5667f7>=0x0;_0x5667f7--){if(_0x41dae1-this[_0x39b03e(0x2bb)][_0x5667f7]>0x3e8)break;_0x278a87++;}let _0x5da7c1=0x0;if(this[_0x39b03e(0x17c)][_0x39b03e(0xd0)]){const _0x2a5356=[...this[_0x39b03e(0x17c)]][_0x39b03e(0x111)]((_0x381e3f,_0x36202e)=>_0x381e3f-_0x36202e);_0x5da7c1=_0x2a5356[Math[_0x39b03e(0x119)](_0x2a5356[_0x39b03e(0xd0)]-0x1,Math[_0x39b03e(0x1ec)](_0x2a5356[_0x39b03e(0xd0)]*0.99))];}return{'depth':this[_0x39b03e(0x1fb)][_0x39b03e(0x298)],'oldestPendingMs':Math[_0x39b03e(0x2cd)](_0xc2f4a2),'committed':this[_0x39b03e(0x23a)],'commitsPerSec':_0x278a87,'commitP99Ms':Math[_0x39b03e(0x2cd)](_0x5da7c1),'parkedNow':this[_0x39b03e(0xca)]['length'],'parkedTotal':this[_0x39b03e(0xd9)],'highWater':this[_0x39b03e(0xea)]};}[_0x3c1e0b(0x244)](){const _0x49da55=_0x3c1e0b,_0x21eb77=_0x455f3a[_0x49da55(0x2ae)]();return[...this['_enqueuedAt']['values']()][_0x49da55(0x2de)](_0x47bd9f=>Math[_0x49da55(0x2cd)](_0x21eb77-_0x47bd9f))['sort']((_0xa2a211,_0x4d1d2a)=>_0x4d1d2a-_0xa2a211);}[_0x3c1e0b(0x1c4)](){const _0x5bdbd8=_0x3c1e0b;this[_0x5bdbd8(0x145)]=!![];for(const _0x177653 of this[_0x5bdbd8(0xca)][_0x5bdbd8(0x10b)](0x0))_0x177653();}async['drain'](){const _0x3b4887=_0x3c1e0b;let _0x5b0754=0x0;while(this['_inflight'][_0x3b4887(0x298)]&&_0x5b0754++<0x3e8){await Promise[_0x3b4887(0x186)]([...this['_inflight']]);}}async[_0x3c1e0b(0x1cf)](_0x53b230,_0x3d5685,_0x1cf8d1,_0xac3de4){const _0x375175=_0x3c1e0b;return this[_0x375175(0x188)](()=>{const _0x1b5b1c=_0x375175;if(_0xac3de4===undefined)_0x53b230[_0x1b5b1c(0x22e)](_0x3d5685,_0x1cf8d1);else _0x53b230[_0x1b5b1c(0x22e)](_0x3d5685,_0x1cf8d1,_0xac3de4);},_0x375175(0x2ef));}async[_0x3c1e0b(0x1e9)](_0x5066c9,_0x4e4794){const _0x45aa56=_0x3c1e0b;return this['transaction'](()=>_0x5066c9['removeSync'](_0x4e4794),_0x45aa56(0x1f0));}}async function _0x20969b(_0x348aa7,_0x27d2f3){const _0x3b3503=_0x3c1e0b;if(_0x27d2f3==null)_0x27d2f3=Math[_0x3b3503(0x18b)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x1a6075=_0x348aa7?.[_0x3b3503(0x134)];if(!_0x1a6075||typeof _0x1a6075['then']!==_0x3b3503(0x21b))return;await Promise[_0x3b3503(0x2d6)]([Promise[_0x3b3503(0xcc)](_0x1a6075)[_0x3b3503(0x26d)](()=>{}),new Promise(_0x231e8e=>{const _0x13cc6b=_0x3b3503,_0x58f73a=setTimeout(_0x231e8e,_0x27d2f3);if(_0x58f73a[_0x13cc6b(0x1fd)])_0x58f73a['unref']();})]);}catch{}}function _0x21b029(_0x18b7d0){const _0x4ab272=_0x3c1e0b;if(_0x5424a3)return Promise[_0x4ab272(0xcc)]();const _0xd13c2e=_0x18b7d0?.[_0x4ab272(0x177)];return _0xd13c2e&&typeof _0xd13c2e[_0x4ab272(0x196)]==='function'?_0xd13c2e:Promise[_0x4ab272(0xcc)]();}return okdbWriter['exports']=_0x95fcaf,okdbWriter['exports'][_0x3c1e0b(0x295)]=_0x20969b,okdbWriter[_0x3c1e0b(0x1af)][_0x3c1e0b(0x177)]=_0x21b029,okdbWriter['exports'][_0x3c1e0b(0x16e)]=_0x5424a3,okdbWriter[_0x3c1e0b(0x1af)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x31ef36=_0xa12a27;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x3476a6=require$$0$3,{SYNC_COMMITS:_0x3501f5}=requireOkdbWriter(),_0x5fc0ce=_0x31ef36(0xcb);class _0x593c83{constructor(_0x2c0e91,_0x3dc720,_0x33cbfd){const _0x2cb575=_0x31ef36;this['_lock']=_0x2c0e91,this[_0x2cb575(0x2a0)]=_0x3dc720,this[_0x2cb575(0xe3)]=_0x33cbfd,this[_0x2cb575(0x1c3)]=![],this[_0x2cb575(0x299)]=null,this[_0x2cb575(0x23f)]=null;}[_0x31ef36(0x253)](){const _0x2fd823=_0x31ef36;if(this[_0x2fd823(0x1c3)])return![];try{const _0x4cf66e=this['_lock']['_db']()[_0x2fd823(0xf8)](this[_0x2fd823(0x2a0)]);if(!_0x4cf66e||_0x4cf66e['acquiredAt']!==this[_0x2fd823(0xe3)])return![];const _0x56c897=_0x4cf66e['updatedAt']??_0x4cf66e[_0x2fd823(0x22a)];if(_0x56c897+_0x4cf66e[_0x2fd823(0x1d8)]<Date[_0x2fd823(0x2ae)]())return![];return!![];}catch{return!this[_0x2fd823(0x1c3)];}}['holder'](){const _0x259119=_0x31ef36;if(this[_0x259119(0x1c3)])return null;try{return this[_0x259119(0xd1)][_0x259119(0x121)]()[_0x259119(0xf8)](this[_0x259119(0x2a0)])??null;}catch{return null;}}async['extend'](_0x14e023){const _0x2ac56b=_0x31ef36;if(this[_0x2ac56b(0x1c3)])return;try{const _0x1b7f04=this['_lock'][_0x2ac56b(0x121)]()[_0x2ac56b(0xf8)](this['_key']);if(!_0x1b7f04||_0x1b7f04[_0x2ac56b(0x22a)]!==this[_0x2ac56b(0xe3)])return;if(_0x3501f5)this['_lock'][_0x2ac56b(0x121)]()['putSync'](this[_0x2ac56b(0x2a0)],{..._0x1b7f04,'ttlMs':_0x1b7f04[_0x2ac56b(0x1d8)]+_0x14e023});else await this[_0x2ac56b(0xd1)][_0x2ac56b(0x121)]()[_0x2ac56b(0x1cf)](this['_key'],{..._0x1b7f04,'ttlMs':_0x1b7f04[_0x2ac56b(0x1d8)]+_0x14e023});}catch{}}async[_0x31ef36(0x23e)](){const _0x2e7a42=_0x31ef36;if(this[_0x2e7a42(0x1c3)])return;if(this[_0x2e7a42(0x23f)])try{await this[_0x2e7a42(0x23f)];}catch{}clearInterval(this[_0x2e7a42(0x299)]),this[_0x2e7a42(0x299)]=null,this[_0x2e7a42(0x1c3)]=!![];try{const _0x194ea7=this[_0x2e7a42(0xd1)]['_db']()[_0x2e7a42(0xf8)](this['_key']);if(_0x194ea7&&_0x194ea7[_0x2e7a42(0x22a)]===this['_acquiredAt']){if(_0x3501f5)this[_0x2e7a42(0xd1)][_0x2e7a42(0x121)]()[_0x2e7a42(0x1a9)](this['_key']);else await this[_0x2e7a42(0xd1)]['_db']()[_0x2e7a42(0x1e9)](this['_key']);}}catch{}}[_0x31ef36(0x1e8)](_0x2d9f65,_0x4a2f01){const _0x1bb078=_0x31ef36,_0x2bb0c5=_0x4a2f01??Math[_0x1bb078(0x1ec)](_0x2d9f65/0x3);this[_0x1bb078(0x299)]=setInterval(()=>{const _0x568850=_0x1bb078;if(this[_0x568850(0x1c3)])return;this[_0x568850(0x23f)]=((async()=>{const _0x4530c4=_0x568850;try{const _0x2508f9=this[_0x4530c4(0xd1)][_0x4530c4(0x121)]()[_0x4530c4(0xf8)](this[_0x4530c4(0x2a0)]);if(!_0x2508f9||_0x2508f9[_0x4530c4(0x22a)]!==this[_0x4530c4(0xe3)]){this[_0x4530c4(0x1c3)]=!![],clearInterval(this['_heartbeatTimer']),this[_0x4530c4(0x299)]=null;return;}if(_0x3501f5)this[_0x4530c4(0xd1)][_0x4530c4(0x121)]()[_0x4530c4(0x22e)](this[_0x4530c4(0x2a0)],{..._0x2508f9,'updatedAt':Date['now']()});else await this[_0x4530c4(0xd1)]['_db']()[_0x4530c4(0x1cf)](this['_key'],{..._0x2508f9,'updatedAt':Date[_0x4530c4(0x2ae)]()});}catch{}this[_0x4530c4(0x23f)]=null;})());},_0x2bb0c5);if(this[_0x1bb078(0x299)][_0x1bb078(0x1fd)])this['_heartbeatTimer']['unref']();}}class _0xc88e4c{constructor(_0x2a7474,{namespace:_0xb51e00,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x51c26b=_0x31ef36;this['_rawDb']=_0x2a7474,this[_0x51c26b(0x16d)]=_0xb51e00,this[_0x51c26b(0x1d8)]=ttlMs,this[_0x51c26b(0x168)]=heartbeatMs,this[_0x51c26b(0x2cb)]=null;}[_0x31ef36(0x121)](){const _0x557e65=_0x31ef36;return!this[_0x557e65(0x2cb)]&&(this[_0x557e65(0x2cb)]=this['_rawDb'][_0x557e65(0x29c)](_0x5fc0ce,{'dupSort':![]})),this['_lockDb'];}[_0x31ef36(0x16a)](){const _0x5a91bc=_0x31ef36;return!this['_wantDbHandle']&&(this[_0x5a91bc(0x237)]=this[_0x5a91bc(0x216)][_0x5a91bc(0x29c)](_0x5fc0ce+_0x5a91bc(0x29a),{'dupSort':![]})),this[_0x5a91bc(0x237)];}[_0x31ef36(0x2a0)](_0x38a616){const _0x58ed94=_0x31ef36;return this[_0x58ed94(0x16d)]+':'+_0x38a616;}[_0x31ef36(0x200)](_0x3d4949){const _0x35e9df=_0x31ef36;try{_0x3501f5?this[_0x35e9df(0x16a)]()[_0x35e9df(0x22e)](this[_0x35e9df(0x2a0)](_0x3d4949),Date[_0x35e9df(0x2ae)]()):this['_wantDb']()[_0x35e9df(0x1cf)](this[_0x35e9df(0x2a0)](_0x3d4949),Date[_0x35e9df(0x2ae)]())?.[_0x35e9df(0x26d)]?.(()=>{});}catch{}}[_0x31ef36(0x231)](_0x3e6486,_0x4f7581=0x3e8){const _0x3cb4e4=_0x31ef36;try{const _0x4084f1=this[_0x3cb4e4(0x16a)]()[_0x3cb4e4(0xf8)](this['_key'](_0x3e6486));return typeof _0x4084f1===_0x3cb4e4(0x21a)&&Date[_0x3cb4e4(0x2ae)]()-_0x4084f1<_0x4f7581;}catch{return![];}}['_isStale'](_0x502cac){const _0x30a045=_0x31ef36,_0x2a1df4=_0x502cac['updatedAt']??_0x502cac[_0x30a045(0x22a)];return _0x2a1df4+_0x502cac[_0x30a045(0x1d8)]<Date[_0x30a045(0x2ae)]();}static[_0x31ef36(0xd7)](_0x257287){const _0x45dd05=_0x31ef36,_0x36f22d=_0x257287?.[_0x45dd05(0x24c)];if(!_0x36f22d||typeof _0x36f22d[_0x45dd05(0x112)]!==_0x45dd05(0x21a))return![];if(_0x36f22d[_0x45dd05(0x2bf)]!==_0x3476a6[_0x45dd05(0x2bf)]())return![];if(_0x36f22d[_0x45dd05(0x112)]===process[_0x45dd05(0x112)])return![];try{return process[_0x45dd05(0x2d2)](_0x36f22d['pid'],0x0),![];}catch(_0x507930){return _0x507930['code']==='ESRCH';}}async[_0x31ef36(0x136)](_0x25bd2a,_0xe42f61={},_0xf269fa={}){const _0x4061bf=_0x31ef36,_0x3884df=this[_0x4061bf(0x2a0)](_0x25bd2a),_0x4e5ed2=_0xf269fa[_0x4061bf(0x1d8)]??this[_0x4061bf(0x1d8)],_0x2d3cac=Date[_0x4061bf(0x2ae)](),_0x41aea1={'holder':{'pid':process[_0x4061bf(0x112)],'hostname':_0x3476a6[_0x4061bf(0x2bf)](),..._0xe42f61},'acquiredAt':_0x2d3cac,'updatedAt':_0x2d3cac,'ttlMs':_0x4e5ed2};let _0x3a1806=![],_0x28b3f0=null;try{const _0x37b6ac=()=>{const _0x1539ae=_0x4061bf,_0xa78466=this[_0x1539ae(0x121)]()[_0x1539ae(0xf8)](_0x3884df);if(_0xa78466&&!this[_0x1539ae(0x1cd)](_0xa78466)&&!_0xc88e4c[_0x1539ae(0xd7)](_0xa78466)){const _0x2ee204=_0xe42f61['processorId']!=null&&_0xa78466[_0x1539ae(0x24c)][_0x1539ae(0x112)]===process['pid']&&_0xa78466[_0x1539ae(0x24c)][_0x1539ae(0x209)]===_0xe42f61[_0x1539ae(0x209)];if(!_0x2ee204){_0x3a1806=![],_0x28b3f0=_0xa78466;return;}_0x41aea1[_0x1539ae(0x22a)]<=_0xa78466[_0x1539ae(0x22a)]&&(_0x41aea1[_0x1539ae(0x22a)]=_0xa78466[_0x1539ae(0x22a)]+0x1,_0x41aea1[_0x1539ae(0x140)]=_0x41aea1['acquiredAt']);}this[_0x1539ae(0x121)]()[_0x1539ae(0x1cf)](_0x3884df,_0x41aea1),_0x3a1806=!![],_0x28b3f0=_0x41aea1;};if(_0x3501f5)this[_0x4061bf(0x121)]()[_0x4061bf(0x1e7)](_0x37b6ac);else await this[_0x4061bf(0x121)]()['childTransaction'](_0x37b6ac);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x3a1806)return{'acquired':![],'handle':null,'current':_0x28b3f0};const _0x5584f8=new _0x593c83(this,_0x3884df,_0x41aea1[_0x4061bf(0x22a)]);return _0x5584f8[_0x4061bf(0x1e8)](_0x4e5ed2,this[_0x4061bf(0x168)]),{'acquired':!![],'handle':_0x5584f8,'current':_0x28b3f0};}[_0x31ef36(0x28e)](_0x342b04){const _0x7b535b=_0x31ef36;try{return this[_0x7b535b(0x121)]()['get'](this[_0x7b535b(0x2a0)](_0x342b04))??null;}catch{return null;}}[_0x31ef36(0x233)](){const _0x5ba656=_0x31ef36,_0x220390=this[_0x5ba656(0x16d)]+':',_0x561d5f=[];try{for(const {key:_0x563ed0,value:_0x3cde62}of this['_db']()['getRange']({'start':_0x220390,'end':_0x220390+'\xff'})){typeof _0x563ed0==='string'&&_0x563ed0[_0x5ba656(0x1c2)](_0x220390)&&_0x561d5f[_0x5ba656(0x181)]({'id':_0x563ed0[_0x5ba656(0x11e)](_0x220390[_0x5ba656(0xd0)]),'entry':_0x3cde62});}}catch{}return _0x561d5f;}static[_0x31ef36(0x1a8)](_0x22502a){const _0x368739=_0x31ef36,_0x11416f=[];try{const _0x943010=_0x22502a[_0x368739(0x29c)](_0x5fc0ce,{'dupSort':![]});for(const {key:_0x27a437,value:_0x393a1b}of _0x943010['getRange']({})){if(typeof _0x27a437!==_0x368739(0xd3))continue;const _0x427c54=_0x27a437[_0x368739(0x2e5)](':');if(_0x427c54<0x1)continue;_0x11416f[_0x368739(0x181)]({'namespace':_0x27a437['slice'](0x0,_0x427c54),'id':_0x27a437[_0x368739(0x11e)](_0x427c54+0x1),'entry':_0x393a1b});}}catch{}return _0x11416f;}}return okdbLock={'OKDBLock':_0xc88e4c},okdbLock;}var version=_0xa12a27(0x2ca),require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0xe3ce09=_0xa12a27;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x35acc1=require$$0$3,_0x15c343=require$$1$1,_0x4a6a5d=require$$2,{LOOP:_0x2a406b}=requireOkdbLoopMonitor(),{OKDBLock:_0x583e80}=requireOkdbLock(),{SYNC_COMMITS:_0x9ad6df}=requireOkdbWriter(),_0x1ee557=_0xe3ce09(0x2c7),_0x4ca531='node',_0x2c2f75=_0xe3ce09(0x279),_0x35a3ff=_0xe3ce09(0xfe),_0x137758=(_0x5afc8f,_0x836b69)=>_0x5afc8f+':'+_0x836b69,_0x1a87a0=(_0x1577c7,_0x62c012)=>_0x1577c7+'::'+_0x62c012,_0x5ad37b=(_0x130c36,_0x126de3)=>_0x130c36+'/'+_0x126de3,_0x3257f7=(_0x1840bc,_0x15c2bd)=>_0x1840bc+'#'+_0x15c2bd,_0x102ff0=_0x1d69fa=>{const _0x9dac43=_0xe3ce09;if(_0x1d69fa?.[_0x9dac43(0x170)])return _0x1d69fa[_0x9dac43(0x170)];const _0x344ce9=_0x1d69fa?.[_0x9dac43(0x1b6)];return typeof _0x344ce9===_0x9dac43(0xd3)&&_0x344ce9[_0x9dac43(0x166)]('#')?_0x344ce9[_0x9dac43(0x11e)](0x0,_0x344ce9[_0x9dac43(0x2e5)]('#')):_0x344ce9;},_0x29175a=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x1c4ec9=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x1786fe=_0x29175a*0x3,_0x506ad2=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0xe3ce09(0x18b)](0x927c0,_0x1786fe*0x14),_0x3153ef=['processor:progress',_0xe3ce09(0x296),_0xe3ce09(0x1a6),'processor:error',_0xe3ce09(0x14c),'processor:resumed'];let _0x2176a0=null;function _0x480975(){const _0x3f930b=_0xe3ce09;if(_0x2176a0==null)_0x2176a0=Math[_0x3f930b(0x2cd)]((Date['now']()-process[_0x3f930b(0x291)]()*0x3e8)/0x3e8)*0x3e8;return _0x2176a0;}function _0x3dfd82(_0x2d397b){const _0x23f4a5=_0xe3ce09;if(process.env.OKDB_PROCESS_KILL===_0x23f4a5(0x261))return![];if(_0x2d397b?.[_0x23f4a5(0x13c)]?.[_0x23f4a5(0x155)]&&typeof _0x2d397b['options']['processes']===_0x23f4a5(0x1ca)&&_0x2d397b[_0x23f4a5(0x13c)][_0x23f4a5(0x155)][_0x23f4a5(0x2d2)]===![])return![];return!![];}function _0x2f7dab(_0xc02c52,_0x82a77b){const _0x1fe140=_0xe3ce09,_0x4115ed=!!_0x82a77b?.[_0x1fe140(0x2b2)];switch(_0xc02c52){case'primary':return{'controllable':_0x4115ed,'decommissionable':![],'killable':!![],'killConfirm':_0x1fe140(0x2b6)};case'cli':case'standalone':return{'controllable':_0x4115ed,'decommissionable':![],'killable':!![],'killConfirm':'confirm'};case'embedded':return{'controllable':![],'decommissionable':![],'killable':![]};case _0x1fe140(0x2d9):case'queue-worker':case'fn-runner':case _0x1fe140(0x167):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x1fe140(0x149)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x1fa8d6{constructor(_0x27d2d1){const _0x486193=_0xe3ce09;this['okdb']=_0x27d2d1,this['_statusEnv']=null,this[_0x486193(0x1d4)]=null,this[_0x486193(0xfb)]=new Map(),this['_cmd']=null,this['_isWriter']=![],this[_0x486193(0x2b5)]=![],this[_0x486193(0x223)]=_0x480975(),this['_selfKey']=_0x137758(process[_0x486193(0x112)],this['_processStartedAt']),this[_0x486193(0x248)]=_0x4a6a5d[_0x486193(0x19b)]()[_0x486193(0x11e)](0x0,0x8),this[_0x486193(0x27d)]=_0x3257f7(this[_0x486193(0x235)],this['_instanceId']),this[_0x486193(0xf3)]=Date['now'](),this[_0x486193(0x10f)]=null,this[_0x486193(0xfc)]=null,this[_0x486193(0x28b)]=null,this[_0x486193(0x1f7)]=null,this['_onProcEvent']=null,this[_0x486193(0x25f)]=null,this[_0x486193(0x115)]=0x0,this[_0x486193(0x17d)]={},this[_0x486193(0x18a)]=new Map(),this['_lastCpuUsage']=process[_0x486193(0xd2)](),this[_0x486193(0x138)]=Date[_0x486193(0x2ae)](),this[_0x486193(0x11d)]=0x0,this[_0x486193(0x1ce)]=new Map();}get['selfKey'](){return this['_selfKey'];}get['rowKey'](){return this['_rowKey'];}[_0xe3ce09(0x24d)](_0x54071d,_0x8708a2){const _0x22bd09=_0xe3ce09,_0x396e9c=_0x2f7dab(_0x54071d,_0x8708a2);if(_0x396e9c['killable']&&!_0x3dfd82(this[_0x22bd09(0x1f3)]))return{..._0x396e9c,'killable':![],'killConfirm':undefined};return _0x396e9c;}[_0xe3ce09(0x2bd)](){return!!this['_statusEnv'];}[_0xe3ce09(0xdd)](_0x5e421e){const _0xd8478d=_0xe3ce09;Object['assign'](this[_0xd8478d(0x17d)],_0x5e421e||{});}[_0xe3ce09(0x283)](_0x4dda44){const _0x1a798b=_0xe3ce09;if(_0x4dda44)this[_0x1a798b(0x28b)]=_0x4dda44;}[_0xe3ce09(0xe2)](_0x40f4ab={}){const _0x6e772b=_0xe3ce09;return this[_0x6e772b(0x1f3)][_0x6e772b(0xff)](_0x40f4ab);}[_0xe3ce09(0x2d7)](){const _0x48c140=_0xe3ce09,_0x59b13d={};let _0x5bccd9=0x0,_0x2d86ec=0x0;const _0x1eae30=new Set();for(const _0x23a336 of this[_0x48c140(0x151)]()){_0x2d86ec++;const _0x4e6239=_0x23a336[_0x48c140(0x1bd)];if(!_0x4e6239)continue;if(_0x4e6239[_0x48c140(0x278)])_0x5bccd9++;for(const _0xeff8cd of _0x4e6239[_0x48c140(0x2b2)]||[]){if(!['single',_0x48c140(0x152)][_0x48c140(0x166)](_0xeff8cd[_0x48c140(0x116)]))continue;(_0xeff8cd['state']==='online'||_0xeff8cd['state']===_0x48c140(0x1ba))&&_0xeff8cd['cursorKey']&&_0x1eae30[_0x48c140(0x2dd)]((_0xeff8cd[_0x48c140(0x17b)]||_0x48c140(0x2e9))+':'+_0xeff8cd[_0x48c140(0x213)]);const _0x1a4dca=_0xeff8cd[_0x48c140(0x17b)]||_0x48c140(0x2e9);(_0x59b13d[_0x1a4dca]||=[])['push']({..._0xeff8cd,'env':_0x1a4dca,'owner':{'pid':_0x23a336[_0x48c140(0x112)]??null,'kind':_0x23a336[_0x48c140(0x2a9)]??null}});}}for(const [_0x1e2f1c,_0x58af66]of Object[_0x48c140(0x159)](_0x59b13d)){for(const _0x3a39ee of _0x58af66){if(_0x3a39ee['mode']===_0x48c140(0x269)&&!_0x3a39ee['claimGated']){const _0xdad53=_0x1e2f1c+':'+(_0x3a39ee['cursorKey']??'');if(!_0x1eae30[_0x48c140(0x1cb)](_0xdad53))_0x3a39ee[_0x48c140(0x2e2)]=!![];}}}return{'envs':_0x59b13d,'policy':null,'participation':{'participating':_0x5bccd9,'total':_0x2d86ec},'source':_0x48c140(0x12f)};}['processorsView'](){const _0x415808=_0xe3ce09,_0x55af7c=_0x1051cc=>{const _0x3e3f86=_0x372a;if(_0x1051cc[_0x3e3f86(0x280)]==='online'||_0x1051cc['state']===_0x3e3f86(0x1ba)||_0x1051cc[_0x3e3f86(0x280)]===_0x3e3f86(0x25a))return 0x3;if(_0x1051cc[_0x3e3f86(0x2d1)])return 0x1;return 0x2;},_0x78a64d=new Map();for(const _0x311629 of this[_0x415808(0x151)]()){for(const _0xbb1baf of _0x311629[_0x415808(0x1bd)]?.[_0x415808(0x2b2)]||[]){const _0x1cb13f={..._0xbb1baf,'owner':{'pid':_0x311629['pid']??null,'kind':_0x311629[_0x415808(0x2a9)]??null,'host':_0x311629['host']??null}},_0x26e0e1=_0xbb1baf[_0x415808(0x116)]==='single'?_0x415808(0x1b0)+(_0xbb1baf[_0x415808(0x17b)]??'')+'::'+(_0xbb1baf[_0x415808(0x213)]??_0xbb1baf[_0x415808(0x13d)]??_0xbb1baf['id']):_0x415808(0x214)+(_0x311629[_0x415808(0x1b6)]??_0x311629[_0x415808(0x170)]??'')+'::'+(_0xbb1baf[_0x415808(0x17b)]??'')+'::'+_0xbb1baf['id'],_0x58b780=_0x78a64d[_0x415808(0xf8)](_0x26e0e1);if(!_0x58b780||_0x55af7c(_0x1cb13f)>_0x55af7c(_0x58b780))_0x78a64d[_0x415808(0xcf)](_0x26e0e1,_0x1cb13f);}}return[..._0x78a64d[_0x415808(0x2c1)]()];}[_0xe3ce09(0x18f)](){const _0x1d6a06=_0xe3ce09,_0x2a7e7b=Date[_0x1d6a06(0x2ae)](),_0x5f3e1b=this[_0x1d6a06(0x151)](),_0x2e2efa=_0x261dfc=>Math[_0x1d6a06(0x18b)](0x0,Math[_0x1d6a06(0x2cd)]((_0x2a7e7b-(_0x261dfc[_0x1d6a06(0xc6)]||_0x2a7e7b))/0x3e8)),_0x194019=_0x5f3e1b[_0x1d6a06(0x1f2)](_0x474bb2=>_0x474bb2[_0x1d6a06(0x2a9)]===_0x1d6a06(0x126)),_0x2cc3d8=_0x5f3e1b[_0x1d6a06(0x128)](_0x2e31ec=>_0x2e31ec[_0x1d6a06(0x2a9)]==='http-server');if(_0x194019||_0x2cc3d8[_0x1d6a06(0xd0)])return{'primary':_0x194019?{'pid':_0x194019['pid'],'uptime':_0x2e2efa(_0x194019)}:null,'workers':_0x2cc3d8[_0x1d6a06(0x2de)](_0x45d2e5=>({'pid':_0x45d2e5[_0x1d6a06(0x112)],'uptime':_0x2e2efa(_0x45d2e5)})),'workersConfigured':_0x194019?.['meta']?.['workersConfigured']??_0x2cc3d8[_0x1d6a06(0xd0)],'mode':_0x1d6a06(0x252)};const _0x41659c=_0x5f3e1b[_0x1d6a06(0x1f2)](_0x474446=>_0x474446[_0x1d6a06(0x2a9)]==='cli'||_0x474446[_0x1d6a06(0x2a9)]===_0x1d6a06(0x205)||_0x474446['kind']===_0x1d6a06(0x264)),_0x7eb93d=_0x41659c?{'pid':_0x41659c[_0x1d6a06(0x112)],'uptime':_0x2e2efa(_0x41659c)}:{'pid':process[_0x1d6a06(0x112)],'uptime':Math[_0x1d6a06(0x18b)](0x0,Math['round'](process['uptime']()))};return{'primary':_0x7eb93d,'workers':[_0x7eb93d],'workersConfigured':0x1,'mode':_0x1d6a06(0x269)};}[_0xe3ce09(0x195)](){const _0x1f5db1=_0xe3ce09;return this[_0x1f5db1(0x2a5)]();}[_0xe3ce09(0x12c)](){const _0x3a0bf0=_0xe3ce09,_0x528332=new Map();for(const _0x410b8c of this['_groupByProcess']())_0x528332[_0x3a0bf0(0xcf)](_0x410b8c[_0x3a0bf0(0x170)],{..._0x410b8c,'children':[]});const _0xb4ee1a=[];for(const _0x1a2281 of _0x528332['values']()){const _0x1473cc=_0x1a2281[_0x3a0bf0(0xe6)]?_0x528332[_0x3a0bf0(0xf8)](_0x1a2281[_0x3a0bf0(0xe6)]):null;if(_0x1473cc&&_0x1473cc!==_0x1a2281)_0x1473cc[_0x3a0bf0(0xc5)][_0x3a0bf0(0x181)](_0x1a2281);else _0xb4ee1a[_0x3a0bf0(0x181)](_0x1a2281);}const _0x3c6dd0=(_0x16b3cb,_0x120c49)=>_0x16b3cb[_0x3a0bf0(0x2a9)]===_0x120c49[_0x3a0bf0(0x2a9)]?(_0x16b3cb[_0x3a0bf0(0x112)]||0x0)-(_0x120c49['pid']||0x0):(_0x16b3cb['kind']??'')<(_0x120c49[_0x3a0bf0(0x2a9)]??'')?-0x1:0x1,_0x61e2a4=_0x5933c5=>{const _0x11caa8=_0x3a0bf0;_0x5933c5[_0x11caa8(0x111)](_0x3c6dd0);for(const _0x3e56b7 of _0x5933c5)if(_0x3e56b7[_0x11caa8(0xc5)]['length'])_0x61e2a4(_0x3e56b7[_0x11caa8(0xc5)]);};return _0x61e2a4(_0xb4ee1a),_0xb4ee1a;}[_0xe3ce09(0x1ab)](_0x404096){const _0x52b98e=_0xe3ce09;return this[_0x52b98e(0x2a5)]()[_0x52b98e(0x1f2)](_0x1e15a6=>_0x1e15a6[_0x52b98e(0x170)]===_0x404096)??null;}['_groupByProcess'](_0x3d9e8d=Date[_0xe3ce09(0x2ae)]()){const _0x1aae6e=_0xe3ce09,_0x151e8d=new Map();for(const _0x1df9ea of this[_0x1aae6e(0x151)]()){const _0x1c596a=_0x102ff0(_0x1df9ea);let _0x4d0483=_0x151e8d[_0x1aae6e(0xf8)](_0x1c596a);!_0x4d0483&&(_0x4d0483={'processKey':_0x1c596a,'nodeKey':_0x1c596a,'pid':_0x1df9ea[_0x1aae6e(0x112)],'ppid':_0x1df9ea['ppid']??null,'host':_0x1df9ea['host']??null,'kind':_0x1df9ea[_0x1aae6e(0x2a9)],'role':null,'supervisorKey':_0x1df9ea['supervisorKey']??null,'slot':_0x1df9ea[_0x1aae6e(0x125)]??null,'slotKey':_0x1df9ea[_0x1aae6e(0x147)]??null,'caps':_0x1df9ea['caps']??null,'lifecycle':_0x1df9ea[_0x1aae6e(0x222)]??null,'uptime':Math['max'](0x0,Math[_0x1aae6e(0x2cd)]((_0x3d9e8d-(_0x1df9ea['startedAt']||_0x3d9e8d))/0x3e8)),'startedAt':_0x1df9ea[_0x1aae6e(0xc6)]??null,'meta':_0x1df9ea['meta']??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x151e8d[_0x1aae6e(0xcf)](_0x1c596a,_0x4d0483));_0x4d0483[_0x1aae6e(0x1e2)][_0x1aae6e(0x181)]({'instanceId':_0x1df9ea[_0x1aae6e(0x15e)]??null,'role':_0x1df9ea['role']??null,'listenAddr':_0x1df9ea[_0x1aae6e(0x263)]??null,'lifecycle':_0x1df9ea[_0x1aae6e(0x222)]??null,'processing':_0x1df9ea[_0x1aae6e(0x1bd)]??null});if(!_0x4d0483['role']&&_0x1df9ea[_0x1aae6e(0x275)])_0x4d0483['role']=_0x1df9ea[_0x1aae6e(0x275)];if(!_0x4d0483[_0x1aae6e(0x263)]&&_0x1df9ea[_0x1aae6e(0x263)])_0x4d0483[_0x1aae6e(0x263)]=_0x1df9ea[_0x1aae6e(0x263)];if(!_0x4d0483['processing']&&_0x1df9ea[_0x1aae6e(0x1bd)])_0x4d0483['processing']=_0x1df9ea[_0x1aae6e(0x1bd)];if(!_0x4d0483['engines']&&_0x1df9ea[_0x1aae6e(0x26a)])_0x4d0483['engines']=_0x1df9ea[_0x1aae6e(0x26a)];if(!_0x4d0483[_0x1aae6e(0x1a0)]&&_0x1df9ea['singletonClaims'])_0x4d0483[_0x1aae6e(0x1a0)]=_0x1df9ea[_0x1aae6e(0x1a0)];if(_0x4d0483[_0x1aae6e(0x2eb)]==null&&_0x1df9ea[_0x1aae6e(0x2eb)])_0x4d0483[_0x1aae6e(0x2eb)]=_0x1df9ea[_0x1aae6e(0x2eb)];if(_0x1df9ea[_0x1aae6e(0x1b3)]&&(!_0x4d0483['stats']||(_0x1df9ea['stats']['at']??0x0)>(_0x4d0483[_0x1aae6e(0x1b3)]['at']??0x0)))_0x4d0483['stats']=_0x1df9ea[_0x1aae6e(0x1b3)];}return[..._0x151e8d['values']()];}[_0xe3ce09(0x234)](){const _0x1c5481=_0xe3ce09,_0x24c8ad=[],_0x1efa68={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x43f5ff of this[_0x1c5481(0x2a5)]()){_0x24c8ad[_0x1c5481(0x181)]({'processKey':_0x43f5ff[_0x1c5481(0x170)],'kind':_0x43f5ff[_0x1c5481(0x2a9)],'pid':_0x43f5ff[_0x1c5481(0x112)],'supervisorKey':_0x43f5ff[_0x1c5481(0xe6)],'meta':_0x43f5ff[_0x1c5481(0x20a)]??null,'uptime':_0x43f5ff[_0x1c5481(0x291)],'stats':_0x43f5ff[_0x1c5481(0x1b3)]??null}),_0x1efa68[_0x1c5481(0x155)]++;if(_0x43f5ff[_0x1c5481(0x1b3)]){_0x1efa68['rss']+=_0x43f5ff[_0x1c5481(0x1b3)][_0x1c5481(0x2ab)]||0x0,_0x1efa68[_0x1c5481(0x11a)]+=(_0x43f5ff[_0x1c5481(0x1b3)][_0x1c5481(0x11a)]||0x0)+(_0x43f5ff[_0x1c5481(0x1b3)][_0x1c5481(0xe5)]?.[_0x1c5481(0x11a)]||0x0);const _0x299442=_0x43f5ff[_0x1c5481(0x1b3)]['threads'];_0x299442&&(_0x1efa68['threads'][_0x1c5481(0x1f4)]+=_0x299442[_0x1c5481(0x1f4)]||0x0,_0x1efa68[_0x1c5481(0xe5)]['sandbox']+=_0x299442[_0x1c5481(0x215)]||0x0,_0x1efa68['threads']['busy']+=_0x299442[_0x1c5481(0x1ad)]||0x0);}}return{'totals':_0x1efa68,'nodes':_0x24c8ad};}async[_0xe3ce09(0x293)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x2698ff=_0xe3ce09;this[_0x2698ff(0x1ef)]=this[_0x2698ff(0x1ef)]||!!writer,this['_isReader']=this[_0x2698ff(0x2b5)]||!!reader,this[_0x2698ff(0x10f)]=kind||this[_0x2698ff(0x10f)]||(_0x15c343['isWorker']?_0x2698ff(0x2d9):_0x2698ff(0x123)),this[_0x2698ff(0xfc)]=supervisorKey??this['_supervisorKey'],this['_listenAddr']=listenAddr??this[_0x2698ff(0x28b)],this['_ensureDesired'](),await this[_0x2698ff(0x141)]();if(!writer&&!reader)return null;if(!this[_0x2698ff(0x1bc)]){const _0x479aaf=await this[_0x2698ff(0x1f3)][_0x2698ff(0x29b)](_0x1ee557,{'sync':![],'durability':_0x2698ff(0x1d2)});if(!_0x479aaf[_0x2698ff(0x164)](_0x4ca531))await _0x479aaf[_0x2698ff(0x2e6)](_0x4ca531);this[_0x2698ff(0x1bc)]=_0x479aaf;}return this[_0x2698ff(0x1bc)];}[_0xe3ce09(0x19c)](){const _0x3a33ef=_0xe3ce09;return this[_0x3a33ef(0x178)]!==this[_0x3a33ef(0x1bc)]&&(this[_0x3a33ef(0x178)]=this[_0x3a33ef(0x1bc)],this[_0x3a33ef(0x156)]=this[_0x3a33ef(0x1bc)][_0x3a33ef(0x10a)](_0x4ca531)[_0x3a33ef(0x255)]),this[_0x3a33ef(0x156)];}[_0xe3ce09(0x1b9)](_0x542b23){const _0xe07b51=_0xe3ce09;if(_0x9ad6df)return this['_nodeDb']()['putSync'](_0x542b23[_0xe07b51(0x1b6)],_0x542b23,0x1);const _0x3bf5b1=this[_0xe07b51(0x19c)]()[_0xe07b51(0x1cf)](_0x542b23[_0xe07b51(0x1b6)],_0x542b23,0x1);if(_0x3bf5b1&&typeof _0x3bf5b1[_0xe07b51(0x196)]===_0xe07b51(0x21b))_0x3bf5b1['then'](undefined,()=>{});return _0x3bf5b1;}[_0xe3ce09(0x25c)](_0x5ee85a){const _0x1ed7b7=_0xe3ce09;return this['_nodeDb']()[_0x1ed7b7(0x22e)](_0x5ee85a[_0x1ed7b7(0x1b6)],_0x5ee85a,0x1);}['_removeRowAsync'](_0x3cf4e0){const _0x1a53f6=_0xe3ce09;if(_0x9ad6df)try{return this[_0x1a53f6(0x19c)]()[_0x1a53f6(0x1a9)](_0x3cf4e0);}catch{return![];}const _0x37785d=this[_0x1a53f6(0x19c)]()[_0x1a53f6(0x1e9)](_0x3cf4e0);if(_0x37785d&&typeof _0x37785d[_0x1a53f6(0x196)]===_0x1a53f6(0x21b))_0x37785d[_0x1a53f6(0x196)](undefined,()=>{});return _0x37785d;}async[_0xe3ce09(0xd4)](_0x13d4a8){const _0x385124=_0xe3ce09;if(!this[_0x385124(0x1bc)]||!this[_0x385124(0x1ef)]||!_0x13d4a8?.[_0x385124(0x1b6)])return;return this[_0x385124(0x1b9)](_0x13d4a8);}async[_0xe3ce09(0x1de)](_0x2fb9dd){const _0x34c6dc=_0xe3ce09;if(!this[_0x34c6dc(0x1bc)]||!this[_0x34c6dc(0x1ef)]||!_0x2fb9dd)return;const _0x5030ac=_0x2fb9dd[_0x34c6dc(0x166)]('#'),_0x3e4ebd=[];for(const {key:_0x27ac80}of this[_0x34c6dc(0x1bc)][_0x34c6dc(0x22b)](_0x4ca531)){if(_0x27ac80===_0x2fb9dd||!_0x5030ac&&typeof _0x27ac80===_0x34c6dc(0xd3)&&_0x27ac80[_0x34c6dc(0x1c2)](_0x2fb9dd+'#'))_0x3e4ebd[_0x34c6dc(0x181)](_0x27ac80);}for(const _0x46d250 of _0x3e4ebd){try{this[_0x34c6dc(0x19c)]()['removeSync'](_0x46d250);}catch{}}}[_0xe3ce09(0x1ea)](_0x4210f3){const _0x1ef9a7=_0xe3ce09;if(typeof _0x4210f3?.[_0x1ef9a7(0x112)]!=='number')return![];if(_0x4210f3['host']!==_0x35acc1[_0x1ef9a7(0x2bf)]())return![];if(_0x4210f3[_0x1ef9a7(0x112)]===process[_0x1ef9a7(0x112)])return![];if(_0x4210f3['expiresAt']!=null&&_0x4210f3[_0x1ef9a7(0x101)]<Date['now']()-_0x506ad2)return!![];try{return process[_0x1ef9a7(0x2d2)](_0x4210f3['pid'],0x0),![];}catch(_0x32ccb0){return _0x32ccb0[_0x1ef9a7(0x2c6)]==='ESRCH';}}[_0xe3ce09(0x151)](){const _0xe0bd61=_0xe3ce09;if(!this[_0xe0bd61(0x1bc)])return[];try{this[_0xe0bd61(0x1bc)]['db']?.['resetReadTxn']?.();}catch{}const _0x6e260c=Date[_0xe0bd61(0x2ae)](),_0x56ff53=_0x35acc1[_0xe0bd61(0x2bf)](),_0x20a918=[];for(const {value:_0x47c182}of this[_0xe0bd61(0x1bc)][_0xe0bd61(0x22b)](_0x4ca531)){if(!_0x47c182)continue;let _0x41a30a=null;_0x47c182[_0xe0bd61(0x13f)]===_0x56ff53&&typeof _0x47c182['pid']===_0xe0bd61(0x21a)&&(_0x41a30a=!this[_0xe0bd61(0x1ea)](_0x47c182));if(_0x41a30a===![])continue;const _0x1de852=_0x47c182[_0xe0bd61(0x101)]==null||_0x47c182[_0xe0bd61(0x101)]>=_0x6e260c;if(_0x41a30a===!![]||_0x1de852)_0x20a918['push'](_0x47c182);}return _0x20a918;}async[_0xe3ce09(0x2e1)](_0x250c8e=0x0){const _0x4b5a9b=_0xe3ce09;if(!this['_statusEnv']||!this[_0x4b5a9b(0x1ef)])return;const _0x667ec1=Date[_0x4b5a9b(0x2ae)]()-_0x250c8e,_0x3dec80=new Set(),_0x215951=[],_0x259256=_0x35acc1['hostname'](),_0xce22b2=require$$6[_0x4b5a9b(0x2ee)];for(const {key:_0x208d33,value:_0x48e4ed}of this[_0x4b5a9b(0x1bc)][_0x4b5a9b(0x22b)](_0x4ca531)){if(!_0x48e4ed)continue;const _0x2e0e11=_0x48e4ed[_0x4b5a9b(0x13f)]===_0x259256&&typeof _0x48e4ed[_0x4b5a9b(0x112)]==='number',_0x2c8ecc=_0x2e0e11?this[_0x4b5a9b(0x1ea)](_0x48e4ed):_0x48e4ed['expiresAt']!=null&&_0x48e4ed[_0x4b5a9b(0x101)]<_0x667ec1;if(_0x2c8ecc)_0x215951[_0x4b5a9b(0x181)](_0x208d33);else{_0x3dec80[_0x4b5a9b(0x2dd)](_0x102ff0(_0x48e4ed)??_0x208d33);if(_0x48e4ed[_0x4b5a9b(0x2ee)]&&_0x48e4ed[_0x4b5a9b(0x2ee)]!==_0xce22b2){if(!this[_0x4b5a9b(0xd5)])this[_0x4b5a9b(0xd5)]=new Set();!this['_versionSkewWarned']['has'](_0x48e4ed[_0x4b5a9b(0x2ee)])&&(this[_0x4b5a9b(0xd5)][_0x4b5a9b(0x2dd)](_0x48e4ed[_0x4b5a9b(0x2ee)]),this['okdb']['log']?.['warn']?.(_0x4b5a9b(0x12b)+(_0x48e4ed[_0x4b5a9b(0x112)]??'?')+'\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20'+_0x48e4ed['version']+_0x4b5a9b(0x133)+_0xce22b2+_0x4b5a9b(0x24f)+_0x4b5a9b(0x1a2),{'feature':_0x4b5a9b(0x271)}));}}}for(const _0x75ae52 of _0x215951)this[_0x4b5a9b(0x282)](_0x75ae52);if(this[_0x4b5a9b(0x27c)]()){const _0x49117a=[];for(const {key:_0x4d2c26}of this['listDesired'](_0x4b5a9b(0x1be))){if(!_0x3dec80[_0x4b5a9b(0x1cb)](_0x4d2c26)){if(_0x9ad6df)try{this['_desired'][_0x4b5a9b(0x1a9)](_0x4b5a9b(0x100)+_0x4d2c26);}catch{}else _0x49117a[_0x4b5a9b(0x181)](this[_0x4b5a9b(0x1d4)][_0x4b5a9b(0x1e9)](_0x4b5a9b(0x100)+_0x4d2c26));}}if(_0x49117a[_0x4b5a9b(0xd0)])await Promise[_0x4b5a9b(0x186)](_0x49117a);}}[_0xe3ce09(0x108)](_0x478f40=null){const _0x416d0d=_0xe3ce09;if(this[_0x416d0d(0x1f7)])return;if(!this[_0x416d0d(0x1ef)]||!this[_0x416d0d(0x1bc)]){this[_0x416d0d(0x1f3)]?.['log']?.[_0x416d0d(0x169)]?.(_0x416d0d(0x12e)+this[_0x416d0d(0x1ef)]+_0x416d0d(0x1bf)+!!this[_0x416d0d(0x1bc)]+_0x416d0d(0x127),{'feature':_0x416d0d(0x155)});return;}this['_onTick']=_0x478f40,this[_0x416d0d(0x212)]=()=>this[_0x416d0d(0x2aa)]();for(const _0x18676d of _0x3153ef)this[_0x416d0d(0x1f3)]['events']['on'](_0x18676d,this[_0x416d0d(0x212)]);this[_0x416d0d(0x2c0)]();const _0x3a0ff2=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x29175a;this[_0x416d0d(0x1f7)]=setInterval(()=>{const _0x556c20=_0x416d0d;if(this[_0x556c20(0x25f)])try{this['_onTick']();}catch{}this[_0x556c20(0x2c0)](),this[_0x556c20(0x2e1)]()['catch'](()=>{});},_0x3a0ff2);if(this[_0x416d0d(0x1f7)][_0x416d0d(0x1fd)])this[_0x416d0d(0x1f7)]['unref']();}[_0xe3ce09(0x2aa)](){const _0x129fa2=_0xe3ce09;if(!this['_isWriter']||!this[_0x129fa2(0x1bc)])return;if(Date[_0x129fa2(0x2ae)]()-this[_0x129fa2(0x115)]<_0x1c4ec9)return;this[_0x129fa2(0x2c0)]();}['_publishNow'](){const _0x2a9a8e=_0xe3ce09;if(!this[_0x2a9a8e(0x1ef)]||!this[_0x2a9a8e(0x1bc)])return;this[_0x2a9a8e(0x115)]=Date[_0x2a9a8e(0x2ae)]();try{const _0x383a09=[this[_0x2a9a8e(0x163)]()];for(const _0x27aca8 of this[_0x2a9a8e(0x18a)][_0x2a9a8e(0x2c1)]())_0x383a09[_0x2a9a8e(0x181)](this[_0x2a9a8e(0x1cc)](_0x27aca8));const _0x45e211=_0x2a406b[_0x2a9a8e(0x21e)]?_0x2a406b[_0x2a9a8e(0x2ae)]():0x0;for(const _0xf98319 of _0x383a09){try{this[_0x2a9a8e(0x25c)](_0xf98319),this[_0x2a9a8e(0x25e)]=![];}catch(_0x248fa2){!this[_0x2a9a8e(0x25e)]&&(this[_0x2a9a8e(0x25e)]=!![],this['okdb']?.[_0x2a9a8e(0x23d)]?.[_0x2a9a8e(0x169)]?.('registry\x20publish\x20failing:\x20'+_0x248fa2[_0x2a9a8e(0x14d)],{'feature':'processes'}));}}if(_0x2a406b[_0x2a9a8e(0x21e)])_0x2a406b[_0x2a9a8e(0xe7)](_0x2a9a8e(0x1ae),_0x2a406b[_0x2a9a8e(0x2ae)]()-_0x45e211,_0x2a9a8e(0x256)+_0x383a09['length']+_0x2a9a8e(0x246));}catch(_0x3bdb18){!this['_publishFailWarned']&&(this['_publishFailWarned']=!![],this['okdb']?.['log']?.['warn']?.('registry\x20publish\x20failing:\x20'+_0x3bdb18[_0x2a9a8e(0x14d)],{'feature':_0x2a9a8e(0x155)}));}}async[_0xe3ce09(0xec)](){const _0x2665df=_0xe3ce09;if(this[_0x2665df(0x212)]){for(const _0x759b67 of _0x3153ef){try{this[_0x2665df(0x1f3)]['events'][_0x2665df(0x261)](_0x759b67,this[_0x2665df(0x212)]);}catch{}}this[_0x2665df(0x212)]=null;}this['_hbTimer']&&(clearInterval(this[_0x2665df(0x1f7)]),this[_0x2665df(0x1f7)]=null);try{if(this[_0x2665df(0x1bc)]&&this[_0x2665df(0x1ef)])await this[_0x2665df(0x1de)](this[_0x2665df(0x27d)]);}catch{}}async[_0xe3ce09(0x1aa)](){const _0x87ce3a=_0xe3ce09;if(!this['_statusEnv']||!this[_0x87ce3a(0x1ef)])return;try{await this[_0x87ce3a(0x1de)](this[_0x87ce3a(0x27d)]);}catch{}try{const _0x10293d=[];for(const {value:_0x2b21bf}of this['_statusEnv']['getRange'](_0x4ca531)){if(_0x2b21bf?.[_0x87ce3a(0x1b1)]===process[_0x87ce3a(0x112)]&&_0x2b21bf[_0x87ce3a(0x1b6)])_0x10293d[_0x87ce3a(0x181)](_0x2b21bf[_0x87ce3a(0x1b6)]);}for(const _0x1a9941 of _0x10293d){try{await this[_0x87ce3a(0x1de)](_0x1a9941);}catch{}}}catch{}}async['publishOwnRow'](){const _0x5c945f=_0xe3ce09;return this[_0x5c945f(0xd4)](this[_0x5c945f(0x163)]());}async['publishChildRow'](_0x30dd54){const _0x31bce8=_0xe3ce09;if(!this['_statusEnv']||!this[_0x31bce8(0x1ef)])return;return this[_0x31bce8(0xd4)](this['_buildChildRow'](_0x30dd54));}[_0xe3ce09(0x1cc)]({pid:_0x11b8a3,startedAt:_0x342c57,kind:_0x19effa,supervisorKey:_0x99cd0e,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0xe3ce09(0xeb),meta:meta=null,stats:stats=null}){const _0x4f24e4=_0xe3ce09,_0x523f36=Date['now'](),_0x5052bb=_0x137758(_0x11b8a3,_0x342c57);return{'nodeKey':_0x3257f7(_0x5052bb,'0'),'processKey':_0x5052bb,'instanceId':'0','pid':_0x11b8a3,'startedAt':_0x342c57,'ppid':process['pid'],'host':_0x35acc1[_0x4f24e4(0x2bf)](),'supervisorKey':_0x99cd0e,'slot':slot,'slotKey':slotKey,'kind':_0x19effa,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x523f36,'expiresAt':_0x523f36+_0x1786fe,'caps':this[_0x4f24e4(0x24d)](_0x19effa,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0xe3ce09(0x257)](_0x127564){const _0x2d48ad=_0xe3ce09;if(!_0x127564?.[_0x2d48ad(0x112)])return null;const _0x57007d=_0x137758(_0x127564[_0x2d48ad(0x112)],_0x127564[_0x2d48ad(0xc6)]);this['_children'][_0x2d48ad(0xcf)](_0x57007d,{..._0x127564,'supervisorKey':_0x127564['supervisorKey']??this['_selfKey']});if(this['_isWriter'])await this[_0x2d48ad(0x262)](this[_0x2d48ad(0x18a)][_0x2d48ad(0xf8)](_0x57007d))[_0x2d48ad(0x26d)]?.(()=>{});return _0x57007d;}[_0xe3ce09(0x243)](_0x5ed4a4){const _0x3be5f7=_0xe3ce09;if(!_0x5ed4a4)return;return this['_children'][_0x3be5f7(0xfa)](_0x5ed4a4),this[_0x3be5f7(0x1de)](_0x5ed4a4);}[_0xe3ce09(0x1d9)](){const _0x2daea6=_0xe3ce09,_0x245b2a=Date[_0x2daea6(0x2ae)](),_0x3b489e=process[_0x2daea6(0xd2)](),_0x3ee06b=(_0x245b2a-this[_0x2daea6(0x138)])*0x3e8;if(_0x3ee06b>=0x3d090){const _0x591183=_0x3b489e[_0x2daea6(0x17a)]-this['_lastCpuUsage']['user']+(_0x3b489e[_0x2daea6(0x10e)]-this[_0x2daea6(0x274)]['system']),_0xa50f0=_0x35acc1[_0x2daea6(0x137)]()[_0x2daea6(0xd0)]||0x1;this[_0x2daea6(0x11d)]=Math['min'](0x64,Math[_0x2daea6(0x2cd)](_0x591183/(_0x3ee06b*_0xa50f0)*0x64)),this[_0x2daea6(0xc4)]=Math[_0x2daea6(0x2cd)](_0x3ee06b/0x3e8),this['_lastCpuUsage']=_0x3b489e,this[_0x2daea6(0x138)]=_0x245b2a;}const _0x5e013b=process['memoryUsage'](),_0x2542bc=this['_threadStats'][_0x2daea6(0x298)];let _0x1177e3=0x0;if(_0x2542bc>0x0){const _0x5ddae9=[this['okdb'],...this['okdb'][_0x2daea6(0x132)]?.['values']?.()??[]];for(const _0x4ed8c7 of _0x5ddae9){const _0x142b67=_0x4ed8c7['functions']?.[_0x2daea6(0x182)];if(_0x142b67)_0x1177e3+=_0x142b67['liveThreadStats']['busy'];}}let _0x1cffec=null;const _0x1f04c8=_0x2542bc;if(_0x1f04c8>0x0){let _0x2436c7=0x0;for(const _0x54f569 of this[_0x2daea6(0x1ce)][_0x2daea6(0x2c1)]())_0x2436c7+=_0x54f569[_0x2daea6(0x11a)]||0x0;_0x1cffec={'count':_0x1f04c8,'heapUsed':_0x2436c7,'sandbox':_0x2542bc,'busy':_0x1177e3};}return{'rss':_0x5e013b[_0x2daea6(0x2ab)],'heapUsed':_0x5e013b[_0x2daea6(0x11a)],'heapTotal':_0x5e013b['heapTotal'],'external':_0x5e013b[_0x2daea6(0x21c)],'cpuPct':this['_lastCpuPct'],'cpuWindowMs':this[_0x2daea6(0xc4)]??null,'threads':_0x1cffec,'at':_0x245b2a};}[_0xe3ce09(0x122)](_0x2ca85b,_0x1195e4){if(!_0x2ca85b||!_0x1195e4)return;this['_threadStats']['set'](_0x2ca85b,_0x1195e4);}[_0xe3ce09(0x23c)](_0x19d6bc){const _0x3f30cf=_0xe3ce09;this[_0x3f30cf(0x1ce)][_0x3f30cf(0xfa)](_0x19d6bc);}[_0xe3ce09(0x11f)](_0x5e5b11,_0x28a4a4,_0x30732a=undefined){const _0x2edf70=_0xe3ce09,_0x567807=this[_0x2edf70(0x18a)][_0x2edf70(0xf8)](_0x5e5b11);if(!_0x567807||!_0x28a4a4)return;if(_0x30732a!==undefined)_0x567807[_0x2edf70(0x1bd)]=_0x30732a;_0x567807[_0x2edf70(0x1b3)]={'rss':_0x28a4a4[_0x2edf70(0x2ab)]??null,'heapUsed':_0x28a4a4[_0x2edf70(0x11a)]??null,'heapTotal':_0x28a4a4[_0x2edf70(0x232)]??null,'external':_0x28a4a4['external']??null,'cpuPct':_0x28a4a4[_0x2edf70(0x26c)]??null,'cpuWindowMs':_0x28a4a4[_0x2edf70(0x14b)]??null,'threads':_0x28a4a4[_0x2edf70(0xe5)]??null,'claims':_0x28a4a4[_0x2edf70(0x143)]??null,'envsOpen':_0x28a4a4[_0x2edf70(0x19e)]??null,'at':Date['now']()};}[_0xe3ce09(0x163)](){const _0x26049b=_0xe3ce09,_0x197583=Date[_0x26049b(0x2ae)](),_0x2c9a49=this[_0x26049b(0x1f3)][_0x26049b(0x226)]||{},_0x48c544=this['_kind']||_0x26049b(0x123);return{'nodeKey':this[_0x26049b(0x27d)],'processKey':this['_selfKey'],'instanceId':this['_instanceId'],'pid':process[_0x26049b(0x112)],'startedAt':this[_0x26049b(0x223)],'instanceStartedAt':this[_0x26049b(0xf3)],'ppid':typeof process[_0x26049b(0x1b1)]===_0x26049b(0x21a)?process[_0x26049b(0x1b1)]:null,'host':_0x35acc1[_0x26049b(0x2bf)](),'supervisorKey':this[_0x26049b(0xfc)]??null,'version':require$$6[_0x26049b(0x2ee)],'kind':_0x48c544,'role':{'engines':!!_0x2c9a49[_0x26049b(0x26a)],'processors':!!_0x2c9a49[_0x26049b(0x2b2)],'compaction':_0x2c9a49[_0x26049b(0x207)],'http':_0x2c9a49[_0x26049b(0x176)]},'listenAddr':this[_0x26049b(0x28b)]??null,'heartbeatAt':_0x197583,'expiresAt':_0x197583+_0x1786fe,'caps':this[_0x26049b(0x24d)](_0x48c544,_0x2c9a49),'lifecycle':{'state':_0x26049b(0xeb),'desiredVersionApplied':null},'meta':{...this[_0x26049b(0x17d)]},'processing':_0x2c9a49[_0x26049b(0x2b2)]?this[_0x26049b(0x135)]():null,'engines':_0x2c9a49[_0x26049b(0x26a)]?[...this[_0x26049b(0x1f3)]['_servingEngines']??[]]:null,'singletonClaims':this[_0x26049b(0x110)](),'stats':this[_0x26049b(0x1d9)](),'writers':this[_0x26049b(0x287)]()};}[_0xe3ce09(0x287)](){const _0x360603=_0xe3ce09,_0x439619={};try{for(const [_0x1dad66,_0x4ea2af]of this[_0x360603(0x1f3)][_0x360603(0x132)]){try{const _0x3915ec=_0x4ea2af['writerStatus']?.();if(!_0x3915ec)continue;if(!_0x3915ec['depth']&&!_0x3915ec[_0x360603(0x177)]&&!(_0x3915ec[_0x360603(0x105)]??0x0)&&!_0x3915ec[_0x360603(0x20b)])continue;_0x439619[_0x1dad66]={'depth':_0x3915ec['depth'],'oldestPendingMs':_0x3915ec[_0x360603(0x172)],'committed':_0x3915ec[_0x360603(0x177)],'commitsPerSec':_0x3915ec[_0x360603(0x1fc)],'commitP99Ms':_0x3915ec[_0x360603(0x1bb)],'parkedNow':_0x3915ec[_0x360603(0x105)]??0x0,'draining':!!_0x3915ec[_0x360603(0x20b)]};}catch{}}}catch{}return Object[_0x360603(0x2b8)](_0x439619)[_0x360603(0xd0)]?_0x439619:null;}[_0xe3ce09(0x110)](){const _0x3d55c5=_0xe3ce09,_0x5e415a=process[_0x3d55c5(0x112)],_0x1c7e9c=Date[_0x3d55c5(0x2ae)](),_0x3099c3=_0x1d7189=>{const _0x58c9f9=_0x3d55c5;if(!_0x1d7189)return[];const _0x445897=[];try{for(const {id:_0x174870,entry:_0x5546c2}of _0x1d7189['list']()){if(_0x5546c2?.['holder']?.['pid']!==_0x5e415a)continue;const _0xe352cc=_0x5546c2['updatedAt']??_0x5546c2[_0x58c9f9(0x22a)]??0x0;if(_0xe352cc+(_0x5546c2['ttlMs']??0x0)<_0x1c7e9c)continue;_0x445897[_0x58c9f9(0x181)](_0x174870);}}catch{}return _0x445897;},_0x49f08b=_0x3099c3(this[_0x3d55c5(0x2b4)](_0x3d55c5(0xe1))),_0x406e19=_0x3099c3(this[_0x3d55c5(0x2b4)](_0x3d55c5(0xd6)));if(!_0x49f08b[_0x3d55c5(0xd0)]&&!_0x406e19[_0x3d55c5(0xd0)])return null;return{'compact':_0x49f08b,'replicate':_0x406e19};}['_singletonLock'](_0x4a66bd){const _0x1f9ab5=_0xe3ce09;if(!this[_0x1f9ab5(0x1f3)]?.[_0x1f9ab5(0x1d3)])return null;if(!this[_0x1f9ab5(0xc7)])this['_singletonLocks']=new Map();let _0x2e00eb=this[_0x1f9ab5(0xc7)][_0x1f9ab5(0xf8)](_0x4a66bd);if(!_0x2e00eb)try{_0x2e00eb=new _0x583e80(this[_0x1f9ab5(0x1f3)][_0x1f9ab5(0x1d3)],{'namespace':_0x4a66bd}),this['_singletonLocks'][_0x1f9ab5(0xcf)](_0x4a66bd,_0x2e00eb);}catch{return null;}return _0x2e00eb;}[_0xe3ce09(0x135)](){const _0x409662=_0xe3ce09,_0x3d2373=[];try{for(const [_0xa9267a,_0xecd047]of this[_0x409662(0x1f3)][_0x409662(0x132)]){if(_0xa9267a[_0x409662(0x1c2)]('~'))continue;for(const _0x41e47f of _0xecd047[_0x409662(0x194)][_0x409662(0x25b)]())_0x3d2373[_0x409662(0x181)]({..._0x41e47f,'env':_0xa9267a});}}catch{}return{'participate':this[_0x409662(0x1f3)]['processors']?.[_0x409662(0x1a7)]??![],'processors':_0x3d2373};}['_ensureDesired'](){const _0x42c357=_0xe3ce09;if(this[_0x42c357(0x1d4)])return!![];const _0x504175=this[_0x42c357(0x1f3)]['_rootDb'];if(!_0x504175)return![];return this['_desired']=_0x504175['openDB'](_0x2c2f75,{'dupSort':![]}),this[_0x42c357(0x272)]=_0x504175[_0x42c357(0x29c)](_0x35a3ff,{'dupSort':![]}),!![];}async[_0xe3ce09(0x141)](){const _0x36fb76=_0xe3ce09;if(!this[_0x36fb76(0x27c)]())return;const _0x540a04=_0x36fb76(0x217),_0x4ead80=0x1,_0x4bbefc=this[_0x36fb76(0x1d4)][_0x36fb76(0xf8)](_0x540a04)??0x0;if(_0x4bbefc>=_0x4ead80)return;const _0x30a708=_0x12e063=>{const _0x40e7bf=_0x36fb76;if(_0x12e063==='worker')return _0x40e7bf(0x269);if(_0x12e063===_0x40e7bf(0x20c))return _0x40e7bf(0x152);return _0x12e063;};await this[_0x36fb76(0x1f3)][_0x36fb76(0x106)][_0x36fb76(0x27f)][_0x36fb76(0x188)](()=>{const _0xa89ac4=_0x36fb76;for(const _0x501924 of[_0xa89ac4(0x154),_0xa89ac4(0x2d4)]){for(const {key:_0x2e4d51,value:_0x1e17ed}of this['_desired'][_0xa89ac4(0x22b)]({'start':_0x501924,'end':_0x501924+'\xff'})){if(typeof _0x2e4d51!==_0xa89ac4(0xd3)||!_0x2e4d51[_0xa89ac4(0x1c2)](_0x501924))break;const _0x5a0d41=_0x30a708(_0x1e17ed['mode']);if(_0x5a0d41!==_0x1e17ed[_0xa89ac4(0x116)])this[_0xa89ac4(0x1d4)]['put'](_0x2e4d51,{..._0x1e17ed,'mode':_0x5a0d41});}}this[_0xa89ac4(0x1d4)]['put'](_0x540a04,_0x4ead80);});}['hasDesired'](){const _0x28d6aa=_0xe3ce09;return!!this[_0x28d6aa(0x1d4)];}[_0xe3ce09(0xde)](_0x2813d0,_0x2c9ba9){const _0x4a2119=_0xe3ce09;if(!this['_ensureDesired']())return null;const _0x228b48=_0x2813d0+'/'+_0x2c9ba9;return this[_0x4a2119(0x187)](),this['_desiredOverlay'][_0x4a2119(0xf8)](_0x228b48)??this[_0x4a2119(0x1d4)][_0x4a2119(0xf8)](_0x228b48)??null;}[_0xe3ce09(0x187)](){const _0x57a454=_0xe3ce09;if(!_0x9ad6df)return;try{this['okdb'][_0x57a454(0x106)]?.['db']?.['resetReadTxn']?.();}catch{}}async[_0xe3ce09(0x1db)](_0xdcfc05,_0x61fab5,_0xc0c026){const _0x3fa005=_0xe3ce09;if(!this[_0x3fa005(0x27c)]())return null;const _0x1ab940=_0xdcfc05+'/'+_0x61fab5;this[_0x3fa005(0x187)]();const _0x4a68a7=this['_desiredOverlay'][_0x3fa005(0xf8)](_0x1ab940)??this[_0x3fa005(0x1d4)]['get'](_0x1ab940)??{'version':0x0},_0x274716=(_0x4a68a7[_0x3fa005(0x2ee)]||0x0)+0x1,_0xb7db6b={..._0x4a68a7,..._0xc0c026,'version':_0x274716,'updatedAt':Date[_0x3fa005(0x2ae)]()};this[_0x3fa005(0xfb)]['set'](_0x1ab940,_0xb7db6b);try{await this[_0x3fa005(0x1f3)]['_systemEnv']['_writer'][_0x3fa005(0x188)](()=>{const _0x1e8b12=_0x3fa005;this[_0x1e8b12(0x1d4)][_0x1e8b12(0x1cf)](_0x1ab940,_0xb7db6b);});}finally{if(this['_desiredOverlay'][_0x3fa005(0xf8)](_0x1ab940)===_0xb7db6b)this[_0x3fa005(0xfb)][_0x3fa005(0xfa)](_0x1ab940);}return _0x274716;}[_0xe3ce09(0x1b2)](_0x1cc99d){const _0x3d957f=_0xe3ce09;if(!this[_0x3d957f(0x27c)]())return[];this[_0x3d957f(0x187)]();const _0x180688=_0x1cc99d+'/',_0x28ecdc=[];for(const {key:_0x5bb718,value:_0x211ba5}of this[_0x3d957f(0x1d4)][_0x3d957f(0x22b)]({'start':_0x180688,'end':_0x180688+'\xff'})){if(typeof _0x5bb718!==_0x3d957f(0xd3)||!_0x5bb718['startsWith'](_0x180688))break;_0x28ecdc[_0x3d957f(0x181)]({'key':_0x5bb718['slice'](_0x180688[_0x3d957f(0xd0)]),'value':_0x211ba5});}return _0x28ecdc;}['getCmd'](_0x2ac2a3){const _0x3a4594=_0xe3ce09;if(!this['_ensureDesired']())return null;return this[_0x3a4594(0x272)][_0x3a4594(0xf8)](_0x2ac2a3)??null;}async[_0xe3ce09(0x12a)](_0x29c819,_0x179739,_0x31e7a4={}){const _0xf07ae9=_0xe3ce09;if(!this['_ensureDesired']())return null;let _0x48cd51;return await this[_0xf07ae9(0x1f3)][_0xf07ae9(0x106)]['_writer'][_0xf07ae9(0x188)](()=>{const _0x1f55e9=_0xf07ae9,_0x4d75bd=this[_0x1f55e9(0x272)]['get'](_0x29c819)||{'epoch':0x0};_0x48cd51=(_0x4d75bd['epoch']||0x0)+0x1,this[_0x1f55e9(0x272)][_0x1f55e9(0x1cf)](_0x29c819,{..._0x4d75bd,..._0x31e7a4,'cmd':_0x179739,'epoch':_0x48cd51,'updatedAt':Date[_0x1f55e9(0x2ae)]()});}),_0x48cd51;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x1fa8d6,'nodeKey':_0x137758,'logicalKey':_0x1a87a0,'slotKey':_0x5ad37b,'PROCESS_ENV':_0x1ee557,'NODE_TYPE':_0x4ca531},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x23485e=_0xa12a27;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x1ccc8e=require$$0$4,{EVENTS:_0x1b83d0,CHANGE_ACTIONS:_0xfee665}=requireOkdbEnums(),{LOOP:_0x18f3d4}=requireOkdbLoopMonitor(),_0x49da21=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x5f05f9=0x5,_0x256d52=0x2710;class _0x527fe extends _0x1ccc8e{constructor(_0x23e7aa,_0x11d181={}){const _0x204a20=_0x372a;super(),this[_0x204a20(0x1f3)]=_0x23e7aa,this[_0x204a20(0x245)]=_0x11d181[_0x204a20(0x190)]??_0x49da21,this['_flushDebounce']=_0x11d181[_0x204a20(0x297)]??_0x5f05f9,this[_0x204a20(0x251)]=_0x11d181[_0x204a20(0x114)]??_0x256d52,this[_0x204a20(0x20f)]=![],this[_0x204a20(0x28c)]=new Map(),this[_0x204a20(0x158)]=new Map(),this[_0x204a20(0x206)]=new Map(),this[_0x204a20(0x266)]=null,this[_0x204a20(0x26e)]=![],this[_0x204a20(0x24e)]=new Set(),this[_0x204a20(0x1b5)]=_0x173564=>this['_handleInProcess'](_0x173564),this[_0x204a20(0x150)]=_0x4e7209=>this['_handlePoke'](_0x4e7209),this[_0x204a20(0x1c7)]=()=>this[_0x204a20(0x2a7)]();}[_0x23485e(0x247)](){const _0xf199ed=_0x23485e;if(this[_0xf199ed(0x20f)])return;this[_0xf199ed(0x20f)]=!![];for(const [_0x2d2e64,_0x1b4420]of this['okdb']['_envs']){if(_0x2d2e64[_0xf199ed(0x1c2)]('~'))continue;try{_0x1b4420[_0xf199ed(0x1ff)]();}catch{}}for(const [_0xbc3cc,_0xd0b6c0]of this['okdb'][_0xf199ed(0x132)]){if(_0xbc3cc[_0xf199ed(0x1c2)]('~'))continue;try{this['_baselines'][_0xf199ed(0xcf)](_0xbc3cc,_0xd0b6c0['getClock']()||0x0);}catch{}}const {events:_0x3d91bb}=this[_0xf199ed(0x1f3)];_0x3d91bb['on'](_0x1b83d0[_0xf199ed(0xf1)],this[_0xf199ed(0x1b5)]),_0x3d91bb['on'](_0x1b83d0[_0xf199ed(0x1ee)],this[_0xf199ed(0x1b5)]),_0x3d91bb['on'](_0x1b83d0['ITEM_REMOVE'],this['_onItem']),_0x3d91bb['on'](_0x1b83d0[_0xf199ed(0x268)],this['_onPoke']),_0x3d91bb[_0xf199ed(0x2a8)](_0x1b83d0['SYSTEM_STOPPED'],this['_onStop']);}['stop'](){const _0x43067a=_0x23485e;if(!this['_started'])return;this[_0x43067a(0x20f)]=![];const {events:_0x1ebe5f}=this['okdb'];_0x1ebe5f['off'](_0x1b83d0[_0x43067a(0xf1)],this[_0x43067a(0x1b5)]),_0x1ebe5f[_0x43067a(0x261)](_0x1b83d0[_0x43067a(0x1ee)],this[_0x43067a(0x1b5)]),_0x1ebe5f[_0x43067a(0x261)](_0x1b83d0['ITEM_REMOVE'],this[_0x43067a(0x1b5)]),_0x1ebe5f[_0x43067a(0x261)](_0x1b83d0[_0x43067a(0x268)],this['_onPoke']);try{_0x1ebe5f[_0x43067a(0x261)](_0x1b83d0['SYSTEM_STOPPED'],this[_0x43067a(0x1c7)]);}catch{}this[_0x43067a(0x266)]&&(clearTimeout(this[_0x43067a(0x266)]),this['_flushTimer']=null),this[_0x43067a(0x206)][_0x43067a(0x14e)](),this['_cursors'][_0x43067a(0x14e)](),this[_0x43067a(0x158)]['clear'](),this[_0x43067a(0x24e)][_0x43067a(0x14e)]();}[_0x23485e(0x29d)](_0x51d0aa,_0x23579a,_0x2fcb39,_0x1287fc){return _0x51d0aa+'\x00'+_0x23579a+'\x00'+_0x2fcb39+'\x00'+_0x1287fc;}[_0x23485e(0x27e)](_0x2fd331,_0x452146,_0x176d03,_0x2c4dcb){const _0x2898f1=_0x23485e,_0x55fe83=this['_dedupeKey'](_0x2fd331,_0x452146,_0x176d03,_0x2c4dcb);if(this['_seen'][_0x2898f1(0x1cb)](_0x55fe83))return![];this[_0x2898f1(0x24e)][_0x2898f1(0x2dd)](_0x55fe83);if(this[_0x2898f1(0x24e)][_0x2898f1(0x298)]>this[_0x2898f1(0x251)]){const _0xd7b685=this[_0x2898f1(0x24e)][_0x2898f1(0x2c1)]()[_0x2898f1(0x28d)]()['value'];this[_0x2898f1(0x24e)][_0x2898f1(0xfa)](_0xd7b685);}return!![];}[_0x23485e(0x229)](_0x3f9501){const _0x5469ad=_0x23485e;if(!this[_0x5469ad(0x20f)]||!_0x3f9501)return;const {env:_0x21dda3,type:_0x239a0a,key:_0x5b9960,clock:_0x2ed163,origin:_0x4964a6,action:_0x87fc73,newValue:_0x55e093,oldValue:_0x9b4e6f}=_0x3f9501;if(_0x21dda3==null||_0x239a0a==null||_0x5b9960==null)return;if(typeof _0x21dda3==='string'&&_0x21dda3['startsWith']('~'))return;if(typeof _0x239a0a===_0x5469ad(0xd3)&&_0x239a0a[_0x5469ad(0x1c2)]('~'))return;if(!this[_0x5469ad(0x27e)](_0x21dda3,_0x239a0a,_0x5b9960,_0x2ed163))return;const _0x52a8aa=_0x87fc73===_0xfee665[_0x5469ad(0x161)]?_0x5469ad(0x1e9):_0x5469ad(0x1cf);this[_0x5469ad(0x294)](_0x5469ad(0x2e7),{'env':_0x21dda3,'type':_0x239a0a,'key':_0x5b9960,'op':_0x52a8aa,'clock':_0x2ed163,'origin':_0x4964a6,'value':_0x52a8aa===_0x5469ad(0x1e9)?null:_0x55e093,'prevValue':_0x9b4e6f});}[_0x23485e(0xef)](_0x5b13b3){const _0x3773c6=_0x23485e;if(!this[_0x3773c6(0x20f)])return;if(!_0x5b13b3||typeof _0x5b13b3[_0x3773c6(0x17b)]!==_0x3773c6(0xd3)||typeof _0x5b13b3[_0x3773c6(0x13d)]!==_0x3773c6(0xd3))return;const {env:_0x4bb9eb,type:_0x6b727}=_0x5b13b3;if(_0x4bb9eb[_0x3773c6(0x1c2)]('~')||_0x6b727[_0x3773c6(0x1c2)]('~'))return;this[_0x3773c6(0x206)][_0x3773c6(0xcf)](_0x4bb9eb+'\x00'+_0x6b727,{'env':_0x4bb9eb,'type':_0x6b727}),this[_0x3773c6(0x19d)]();}[_0x23485e(0x19d)](){const _0x42ffbe=_0x23485e;if(this['_flushTimer'])return;const _0x5e48a7=()=>{const _0x5127ad=_0x372a;this[_0x5127ad(0x266)]=null,this[_0x5127ad(0x2d5)]()[_0x5127ad(0x26d)](()=>{});};this[_0x42ffbe(0x266)]=setTimeout(_0x5e48a7,this[_0x42ffbe(0x27a)]>0x0?this[_0x42ffbe(0x27a)]:0x0);}async[_0x23485e(0x2d5)](){const _0x2bbc65=_0x23485e;if(this[_0x2bbc65(0x26e)]){this[_0x2bbc65(0x19d)]();return;}this['_draining']=!![];try{const _0xd7a8d1=[...this[_0x2bbc65(0x206)][_0x2bbc65(0x2c1)]()];this['_pending'][_0x2bbc65(0x14e)]();let _0x435a63=![];for(const {env:_0x4acd5c,type:_0x1a66c1}of _0xd7a8d1){try{const _0x2031d2=await this[_0x2bbc65(0xc8)](_0x4acd5c,_0x1a66c1);if(_0x2031d2)_0x435a63=!![];}catch{this['_pending'][_0x2bbc65(0xcf)](_0x4acd5c+'\x00'+_0x1a66c1,{'env':_0x4acd5c,'type':_0x1a66c1}),_0x435a63=!![];}}if(_0x435a63||this[_0x2bbc65(0x206)][_0x2bbc65(0x298)]>0x0)this[_0x2bbc65(0x19d)]();}finally{this[_0x2bbc65(0x26e)]=![];}}async['_drainOne'](_0x2f857b,_0x5683e8){const _0x4035b6=_0x23485e,_0x1505b2=await this[_0x4035b6(0x1f3)][_0x4035b6(0xc9)](_0x2f857b),_0x5723ae=_0x2f857b+'\x00'+_0x5683e8;!this[_0x4035b6(0x28c)][_0x4035b6(0x1cb)](_0x5723ae)&&(!this[_0x4035b6(0x158)][_0x4035b6(0x1cb)](_0x2f857b)&&(_0x1505b2['_enableChangelog'](),this['_baselines'][_0x4035b6(0xcf)](_0x2f857b,_0x1505b2[_0x4035b6(0x1b4)]()||0x0)),this['_cursors'][_0x4035b6(0xcf)](_0x5723ae,this['_baselines']['get'](_0x2f857b)));const _0x88788d=this[_0x4035b6(0x28c)][_0x4035b6(0xf8)](_0x5723ae),_0x238c5c=_0x1505b2[_0x4035b6(0x1b4)](_0x5683e8)||0x0;if(_0x238c5c<=_0x88788d)return![];const _0x41a75b=_0x88788d+this['_quantum'],_0x3c7f47=Math[_0x4035b6(0x119)](_0x238c5c,_0x41a75b),_0x5c81f6=_0x18f3d4['enabled']?_0x18f3d4[_0x4035b6(0x2ae)]():0x0,_0x54f018=Array['from'](_0x1505b2['getChanges'](_0x5683e8,_0x88788d+0x1,_0x3c7f47));let _0x5a1562=_0x88788d;for(const _0x88b3b3 of _0x54f018){const {clock:_0x4345ee,key:_0x26d21d,action:_0x4d2154,origin:_0x126434}=_0x88b3b3;if(_0x4345ee>_0x5a1562)_0x5a1562=_0x4345ee;if(_0x26d21d==null)continue;if(!this[_0x4035b6(0x27e)](_0x2f857b,_0x5683e8,_0x26d21d,_0x4345ee))continue;let _0x16ec9c,_0x135a59;if(_0x4d2154===_0xfee665[_0x4035b6(0x161)])_0x16ec9c=_0x4035b6(0x1e9),_0x135a59=null;else{const _0x38e393=_0x1505b2['get'](_0x5683e8,_0x26d21d);_0x38e393==null?(_0x16ec9c=_0x4035b6(0x1e9),_0x135a59=null):(_0x16ec9c=_0x4035b6(0x1cf),_0x135a59=_0x38e393);}this[_0x4035b6(0x294)](_0x4035b6(0x2e7),{'env':_0x2f857b,'type':_0x5683e8,'key':_0x26d21d,'op':_0x16ec9c,'clock':_0x4345ee,'origin':_0x126434,'value':_0x135a59});}if(_0x18f3d4[_0x4035b6(0x21e)])_0x18f3d4['note'](_0x4035b6(0xda)+_0x2f857b+':'+_0x5683e8,_0x18f3d4['now']()-_0x5c81f6,'n='+_0x54f018[_0x4035b6(0xd0)]);return this['_cursors'][_0x4035b6(0xcf)](_0x5723ae,Math[_0x4035b6(0x18b)](_0x5a1562,_0x3c7f47)),_0x1505b2[_0x4035b6(0x1b4)](_0x5683e8)>_0x3c7f47;}[_0x23485e(0x198)](){const _0x3f2640=_0x23485e;return{'started':this[_0x3f2640(0x20f)],'quantum':this[_0x3f2640(0x245)],'flushDebounce':this[_0x3f2640(0x27a)],'cursors':Object[_0x3f2640(0x18e)]([...this[_0x3f2640(0x28c)][_0x3f2640(0x159)]()][_0x3f2640(0x2de)](([_0x58d353,_0x3f0b89])=>[_0x58d353['replace']('\x00',':'),_0x3f0b89])),'pending':this[_0x3f2640(0x206)][_0x3f2640(0x298)],'seen':this[_0x3f2640(0x24e)][_0x3f2640(0x298)]};}}return _0x527fe['CHANGEFEED_QUANTUM']=_0x49da21,okdbChangefeed={'OKDBChangefeed':_0x527fe},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0xd160f4=_0xa12a27;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x597b20=require$$1$1,_0x31985e=require$$1,{EVENTS:_0x12731e}=requireOkdbEnums(),_0x355667=require$$0$3,{slotKey:_0x1ef8ba}=requireOkdbProcessRegistry(),_0x497c57=0xfa,_0x231d70=0xfa0,_0x10624d=0x5,_0x4d3bc4=0x2710,_0x3afbbc=0xbb8,_0xf1a31a=0x7d0,_0x5bea4c='__okdbCluster',_0x280ec2=_0xd160f4(0x2a4),_0x185be3=_0xd160f4(0x23d),_0x434c9a=_0xd160f4(0x1b3),_0x45a8d3=[_0x12731e[_0xd160f4(0x113)],_0x12731e[_0xd160f4(0x1fa)],_0x12731e[_0xd160f4(0x2c4)],_0x12731e['FTS_RESET'],_0x12731e[_0xd160f4(0x270)],_0x12731e['INDEX_READY'],_0x12731e['INDEX_RESET'],_0x12731e[_0xd160f4(0x199)],_0xd160f4(0x296),_0xd160f4(0xce),'processor:error',_0xd160f4(0x14c),_0xd160f4(0x1f9),'processor:retry'],_0x37b27d=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x4cf1f4({workers:_0x56589a,makeOkdb:_0x4bec7c,port:_0x5ede4b,primaryOkdb:_0x1b6c19,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x5c4eab=_0xd160f4;if(_0x597b20['isPrimary'])return childEntry&&_0x597b20[_0x5c4eab(0x28a)]({'exec':_0x31985e['join'](__dirname,_0x5c4eab(0x165)),'args':[],'execArgv':((()=>{const _0x439bf5=_0x5c4eab,_0x1eb1e6=[];for(let _0x270816=0x0;_0x270816<process[_0x439bf5(0x288)]['length'];_0x270816++){const _0x1f3634=process['execArgv'][_0x270816];if(_0x1f3634[_0x439bf5(0x1c2)](_0x439bf5(0x10c))||_0x1f3634[_0x439bf5(0x1c2)](_0x439bf5(0x22f))||_0x1f3634[_0x439bf5(0x1c2)](_0x439bf5(0x11b)))continue;if(_0x1f3634==='-e'||_0x1f3634===_0x439bf5(0x1e1)||_0x1f3634==='-p'||_0x1f3634===_0x439bf5(0x1a3)){_0x270816++;continue;}_0x1eb1e6[_0x439bf5(0x181)](_0x1f3634);}return _0x1eb1e6;})())}),_0x3dec2e({'workers':_0x56589a,'port':_0x5ede4b,'primaryOkdb':_0x1b6c19,'workerEnv':workerEnv});return _0x56a4a8({'makeOkdb':_0x4bec7c,'port':_0x5ede4b});}function _0x3dec2e({workers:_0x220a6e,port:_0x5725d1,primaryOkdb:_0x3b0b3b,workerEnv:_0x23e73e}){const _0x2ef5a1=_0xd160f4,_0x988b17=new Map(),_0x1da6ce=new Map();let _0x416f8f=![];const _0x58376f=_0x538b6c=>_0x538b6c?.[_0x2ef5a1(0x109)],_0x459191=_0x19ef86=>{const _0x64bca3=_0x2ef5a1,_0x571a68=_0x597b20[_0x64bca3(0x2b0)]({...process.env,..._0x23e73e||{},'OKDB_CLUSTER_SLOT':String(_0x19ef86)});return _0x571a68[_0x64bca3(0x109)]=_0x19ef86,_0x988b17[_0x64bca3(0xcf)](_0x571a68[_0x64bca3(0xed)][_0x64bca3(0x112)],{'worker':_0x571a68,'startedAt':Date['now'](),'slot':_0x19ef86}),_0x571a68['on'](_0x64bca3(0x25a),_0x175bd1=>{const _0x3c3195=_0x64bca3;console[_0x3c3195(0x23d)](_0x3c3195(0x118)+_0x571a68[_0x3c3195(0xed)][_0x3c3195(0x112)]+_0x3c3195(0x1fe)+(_0x175bd1?.['message']??_0x175bd1));}),_0x571a68['on'](_0x64bca3(0x193),()=>_0x3c71fc()),_0x571a68;},_0x585f84=_0x2e8312=>{const _0x30e4b1=_0x2ef5a1;for(const {worker:_0x11d3c}of _0x988b17[_0x30e4b1(0x2c1)]()){if(_0x11d3c[_0x30e4b1(0x191)]()||!_0x11d3c[_0x30e4b1(0x2a2)]())continue;try{_0x11d3c[_0x30e4b1(0x254)](_0x2e8312);}catch{}}};_0x3b0b3b?.[_0x2ef5a1(0xff)]?.({'kind':_0x2ef5a1(0x126),'listenAddr':':'+_0x5725d1})[_0x2ef5a1(0x26d)](()=>{}),_0x3b0b3b?.[_0x2ef5a1(0x155)]?.[_0x2ef5a1(0xdd)]?.({'workersConfigured':_0x220a6e});const _0x1ffc37={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x3c71fc=()=>{const _0x392720=_0x2ef5a1,_0x4c88a3=_0x3b0b3b?.[_0x392720(0x155)];if(!_0x4c88a3||!_0x4c88a3[_0x392720(0x1ef)])return;const _0x5429a7=_0x4c88a3[_0x392720(0x24b)];for(const {worker:_0x3b805c,startedAt:_0x2f5f20,slot:_0xe8e3b9,stats:_0x551779,processing:_0x1dca8c}of _0x988b17['values']()){if(_0x3b805c[_0x392720(0x191)]())continue;const _0x2f3bc3=_0x4c88a3[_0x392720(0x104)]?.()&&_0x4c88a3[_0x392720(0xde)](_0x392720(0x125),_0x237166(_0xe8e3b9))?.[_0x392720(0xe0)]===!![];_0x4c88a3[_0x392720(0x262)]({'pid':_0x3b805c[_0x392720(0xed)][_0x392720(0x112)],'startedAt':_0x2f5f20,'kind':_0x392720(0x2d9),'supervisorKey':_0x5429a7,'slot':_0xe8e3b9,'slotKey':_0x237166(_0xe8e3b9),'role':_0x1ffc37,'listenAddr':':'+_0x5725d1,'lifecycle':_0x2f3bc3?'decommissioning':_0x392720(0xeb),'processing':_0x1dca8c??null,'stats':_0x551779??null})[_0x392720(0x26d)](()=>{});}},_0x237166=_0x1d3dd6=>_0x1ef8ba('cluster:'+_0x5725d1,_0x1d3dd6),_0x312e9a=_0x4bfe15=>{const _0xbeb41a=_0x2ef5a1,_0x52de37=_0x3b0b3b?.['processes'];if(!_0x52de37?.[_0xbeb41a(0x104)]?.())return![];return _0x52de37[_0xbeb41a(0xde)]('slot',_0x237166(_0x4bfe15))?.[_0xbeb41a(0xe0)]===!![];};for(let _0x596e05=0x0;_0x596e05<_0x220a6e;_0x596e05++){const _0x13486d=_0x312e9a(_0x596e05);_0x1da6ce[_0x2ef5a1(0xcf)](_0x596e05,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x13486d,'respawnTimer':null}),_0x13486d?console['log']('[okdb-cluster]\x20slot='+_0x596e05+_0x2ef5a1(0x1e4)):_0x459191(_0x596e05);}const _0x1cc081=()=>{const _0x61cddf=_0x2ef5a1,_0x7c8454=_0x3b0b3b?.[_0x61cddf(0x155)];if(!_0x7c8454?.['_isWriter']||!_0x7c8454['hasDesired']?.())return;for(const [_0x253fd8,_0x37942f]of _0x1da6ce[_0x61cddf(0x159)]()){const _0x2be2f5=_0x7c8454[_0x61cddf(0xde)](_0x61cddf(0x125),_0x237166(_0x253fd8)),_0x5f2077=_0x2be2f5?.[_0x61cddf(0xe0)]===!![],_0x50af62=_0x2be2f5?.[_0x61cddf(0x2d2)]===!![];if(_0x5f2077&&!_0x37942f[_0x61cddf(0x1f1)]){_0x37942f['dead']=!![];_0x37942f[_0x61cddf(0x2e3)]&&(clearTimeout(_0x37942f[_0x61cddf(0x2e3)]),_0x37942f[_0x61cddf(0x2e3)]=null);for(const {worker:_0xd8ae40}of _0x988b17['values']()){if(_0x58376f(_0xd8ae40)!==_0x253fd8||_0xd8ae40[_0x61cddf(0x191)]())continue;try{if(_0x50af62)_0xd8ae40[_0x61cddf(0xed)][_0x61cddf(0x2d2)](_0x61cddf(0x175));else _0xd8ae40[_0x61cddf(0x2a2)]()&&_0xd8ae40[_0x61cddf(0x2db)]();}catch{}}console[_0x61cddf(0x23d)](_0x61cddf(0x249)+(_0x50af62?_0x61cddf(0xdc):_0x61cddf(0x102))+_0x61cddf(0x189)+_0x253fd8+_0x61cddf(0x1f8));}else{if(!_0x5f2077&&_0x37942f['dead']&&_0x2be2f5){_0x37942f[_0x61cddf(0x1f1)]=![],_0x37942f[_0x61cddf(0x20e)]=[],_0x37942f[_0x61cddf(0x2a6)]=0x0;const _0x4bbabc=[..._0x988b17[_0x61cddf(0x2c1)]()][_0x61cddf(0x29e)](({worker:_0x399efe})=>_0x58376f(_0x399efe)===_0x253fd8&&!_0x399efe[_0x61cddf(0x191)]());!_0x4bbabc&&!_0x416f8f&&(_0x459191(_0x253fd8),console[_0x61cddf(0x23d)](_0x61cddf(0x22c)+_0x253fd8));}}}},_0x5025b5=()=>{try{_0x1cc081();}catch{}};_0x3b0b3b?.[_0x2ef5a1(0x16b)]?.['on']?.(_0x12731e['SYSTEM_PROC'],_0x5025b5);const _0x30a6cc=[];if(_0x3b0b3b?.[_0x2ef5a1(0x16b)]?.['on'])for(const _0x4c8dc4 of _0x45a8d3){const _0xbadfb7=_0x25a159=>{_0x585f84({[_0x5bea4c]:_0x280ec2,'event':_0x4c8dc4,'data':_0x25a159??{}});};_0x3b0b3b[_0x2ef5a1(0x16b)]['on'](_0x4c8dc4,_0xbadfb7),_0x30a6cc[_0x2ef5a1(0x181)]({'event':_0x4c8dc4,'handler':_0xbadfb7});}const _0x537e27=setInterval(()=>{_0x1cc081(),_0x3c71fc();},_0x37b27d);_0x537e27['unref']?.();const _0x3fe81a=(_0x44a7f5,_0x2b7c49)=>{const _0x53d28f=_0x2ef5a1;if(!_0x2b7c49||typeof _0x2b7c49!==_0x53d28f(0x1ca)||_0x2b7c49[_0x5bea4c]!==_0x185be3)return;if(!_0x3b0b3b?.[_0x53d28f(0x23d)]?.[_0x53d28f(0x2b9)])return;const _0x2559d9=_0x2b7c49[_0x53d28f(0x239)]||{};_0x3b0b3b[_0x53d28f(0x23d)][_0x53d28f(0x2b9)]({..._0x2559d9,'msg':'[w'+_0x2b7c49[_0x53d28f(0x125)]+']\x20'+(_0x2559d9['msg']??''),'meta':{..._0x2559d9[_0x53d28f(0x20a)]||{},'worker':_0x2b7c49[_0x53d28f(0x125)],'workerPid':_0x2b7c49[_0x53d28f(0x112)]}});};_0x597b20['on'](_0x2ef5a1(0x14d),_0x3fe81a);const _0x3455c1=(_0x47a8b0,_0x1350a4)=>{const _0x46880b=_0x2ef5a1;if(!_0x1350a4||typeof _0x1350a4!=='object'||_0x1350a4[_0x5bea4c]!==_0x434c9a)return;const _0x6bc31b=_0x988b17['get'](_0x47a8b0[_0x46880b(0xed)][_0x46880b(0x112)]);if(_0x6bc31b){_0x6bc31b[_0x46880b(0x1b3)]={..._0x1350a4[_0x46880b(0x1b3)],'at':Date[_0x46880b(0x2ae)]()};if(_0x1350a4[_0x46880b(0x1bd)]!==undefined)_0x6bc31b[_0x46880b(0x1bd)]=_0x1350a4[_0x46880b(0x1bd)];}};_0x597b20['on'](_0x2ef5a1(0x14d),_0x3455c1),_0x597b20['on']('exit',(_0x4ef3cd,_0x1a1373,_0x5c0f49)=>{const _0x559345=_0x2ef5a1,_0x43da90=_0x4ef3cd[_0x559345(0xed)][_0x559345(0x112)],_0x14b55f=_0x58376f(_0x4ef3cd),_0x1ec52e=_0x988b17['get'](_0x43da90);if(_0x1ec52e&&_0x3b0b3b?.[_0x559345(0x155)])_0x3b0b3b[_0x559345(0x155)][_0x559345(0x1de)](_0x43da90+':'+_0x1ec52e['startedAt'])[_0x559345(0x26d)](()=>{});_0x988b17['delete'](_0x43da90),console[_0x559345(0x23d)](_0x559345(0x118)+_0x43da90+'\x20(slot='+(_0x14b55f??'?')+_0x559345(0x11c)+(_0x559345(0x17e)+_0x1a1373+_0x559345(0x14a)+(_0x5c0f49??_0x559345(0x18d))+_0x559345(0x2ac)+_0x988b17['size']+_0x559345(0x2af))),_0x3c71fc();if(_0x416f8f||_0x14b55f==null)return;const _0x2a99ac=_0x1da6ce[_0x559345(0xf8)](_0x14b55f);if(!_0x2a99ac||_0x2a99ac[_0x559345(0x1f1)])return;const _0x424655=Date[_0x559345(0x2ae)]();_0x2a99ac[_0x559345(0x20e)]['push'](_0x424655),_0x2a99ac[_0x559345(0x20e)]=_0x2a99ac[_0x559345(0x20e)][_0x559345(0x128)](_0x2900ed=>_0x424655-_0x2900ed<=_0x4d3bc4);if(_0x2a99ac[_0x559345(0x20e)][_0x559345(0xd0)]>=_0x10624d){_0x2a99ac[_0x559345(0x1f1)]=!![],console[_0x559345(0x25a)]('[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot='+_0x14b55f+_0x559345(0x1dc)+_0x2a99ac[_0x559345(0x20e)][_0x559345(0xd0)]+_0x559345(0x210)+(_0x4d3bc4+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x988b17[_0x559345(0x298)]+_0x559345(0xf7)));return;}_0x2a99ac[_0x559345(0x2a6)]++;const _0x3a3c77=Math[_0x559345(0x119)](_0x231d70,_0x497c57*0x2**(_0x2a99ac['consecutiveFailures']-0x1));console[_0x559345(0x23d)]('[okdb-cluster]\x20respawning\x20worker\x20slot='+_0x14b55f+_0x559345(0x218)+_0x3a3c77+_0x559345(0x26b)+_0x2a99ac['consecutiveFailures']+')'),_0x2a99ac[_0x559345(0x2e3)]=setTimeout(()=>{const _0x8eb750=_0x559345;_0x2a99ac[_0x8eb750(0x2e3)]=null;if(_0x416f8f||_0x2a99ac[_0x8eb750(0x1f1)])return;const _0x4cc476=_0x459191(_0x14b55f);_0x4cc476['once']('listening',()=>{const _0x4257e6=_0x8eb750;if(_0x1da6ce['get'](_0x14b55f)===_0x2a99ac)_0x2a99ac[_0x4257e6(0x2a6)]=0x0;});},_0x3a3c77),_0x2a99ac['respawnTimer']['unref']?.();});const _0x3956ee=[..._0x988b17[_0x2ef5a1(0x2b8)]()];console[_0x2ef5a1(0x23d)](_0x2ef5a1(0xf2)+process[_0x2ef5a1(0x112)]+'\x20forked\x20'+_0x220a6e+_0x2ef5a1(0x2c9)+_0x5725d1+':\x20'+('['+_0x3956ee['join'](',\x20')+']'));const _0x53e5fc={'_isClusterController':!![],'port':_0x5725d1,'primaryOkdb':_0x3b0b3b??null,'status'(){const _0x5cac0f=_0x2ef5a1;return{'clustered':!![],'primaryPid':process[_0x5cac0f(0x112)],'port':_0x5725d1,'primaryRole':_0x3b0b3b?.[_0x5cac0f(0x275)]??null,'processorPid':null,'supervisorPid':process[_0x5cac0f(0x112)],'workers':[..._0x988b17[_0x5cac0f(0x2c1)]()][_0x5cac0f(0x2de)](({worker:_0x9f11c4})=>({'pid':_0x9f11c4['process'][_0x5cac0f(0x112)],'id':_0x9f11c4['id'],'dead':_0x9f11c4[_0x5cac0f(0x191)]()}))};},async 'close'(){const _0x9c7788=_0x2ef5a1;_0x416f8f=!![];for(const _0xeb5926 of _0x1da6ce[_0x9c7788(0x2c1)]()){_0xeb5926[_0x9c7788(0x1f1)]=!![],_0xeb5926['respawnTimer']&&(clearTimeout(_0xeb5926[_0x9c7788(0x2e3)]),_0xeb5926[_0x9c7788(0x2e3)]=null);}clearInterval(_0x537e27),_0x597b20[_0x9c7788(0x261)](_0x9c7788(0x14d),_0x3fe81a),_0x597b20[_0x9c7788(0x261)](_0x9c7788(0x14d),_0x3455c1),_0x3b0b3b?.[_0x9c7788(0x16b)]?.[_0x9c7788(0x261)]?.(_0x12731e[_0x9c7788(0x20d)],_0x5025b5);if(_0x3b0b3b?.[_0x9c7788(0x16b)]?.['off'])for(const {event:_0x642039,handler:_0x166371}of _0x30a6cc){try{_0x3b0b3b['events'][_0x9c7788(0x261)](_0x642039,_0x166371);}catch{}}_0x30a6cc[_0x9c7788(0xd0)]=0x0;const _0x3a92d0=[..._0x988b17[_0x9c7788(0x2c1)]()][_0x9c7788(0x2de)](({worker:_0xc8e66b})=>_0xc8e66b);if(_0x3a92d0['length']===0x0)return;await Promise['all'](_0x3a92d0[_0x9c7788(0x2de)](_0x3f8c53=>new Promise(_0x5f2236=>{const _0x3f2544=_0x9c7788;if(_0x3f8c53[_0x3f2544(0x191)]()){_0x5f2236();return;}let _0x20b394=![];const _0x13bece=()=>{if(_0x20b394)return;_0x20b394=!![];if(_0x383b40)clearTimeout(_0x383b40);_0x5f2236();};_0x3f8c53[_0x3f2544(0x2a8)](_0x3f2544(0x227),_0x13bece);const _0x383b40=setTimeout(()=>{try{_0x3f8c53['process']['kill']();}catch{}},_0x3afbbc+0x1f4);_0x383b40[_0x3f2544(0x1fd)]?.();try{_0x3f8c53[_0x3f2544(0x2db)]();}catch{try{_0x3f8c53[_0x3f2544(0xed)]['kill']();}catch{}}})));}};return _0x53e5fc;}async function _0x56a4a8({makeOkdb:_0x49f997,port:_0x42c076}){const _0x5179a9=_0xd160f4,_0x3e2f7e=await _0x49f997();return _0x2f908e(_0x3e2f7e),_0x3e2f7e['http'][_0x5179a9(0x2c3)](_0x42c076);}function _0x2f908e(_0x33afc7){const _0x3a2281=_0xd160f4;if(!_0x33afc7||_0x33afc7[_0x3a2281(0x2b7)])return;_0x33afc7[_0x3a2281(0x2b7)]=!![];try{const {OKDBChangefeed:_0x429228}=requireOkdbChangefeed(),_0x2d2421=_0x33afc7[_0x3a2281(0xe9)];if(_0x2d2421&&typeof _0x2d2421[_0x3a2281(0x185)]===_0x3a2281(0x21b)){const _0x40ba33=new _0x429228(_0x33afc7);_0x40ba33[_0x3a2281(0x247)](),_0x2d2421[_0x3a2281(0x185)](_0x40ba33),_0x33afc7['_changefeed']=_0x40ba33;}}catch(_0x474722){_0x33afc7[_0x3a2281(0x23d)]?.[_0x3a2281(0x169)]?.(_0x3a2281(0x2ce)+(_0x474722?.[_0x3a2281(0x14d)]??_0x474722),{'feature':'cluster'});}const _0x4a3e31=_0x371c2e=>{const _0x368cef=_0x3a2281;if(!_0x371c2e||typeof _0x371c2e!=='object'||_0x371c2e[_0x5bea4c]==null)return;if(_0x371c2e[_0x5bea4c]===_0x280ec2)try{_0x33afc7[_0x368cef(0xe9)]?.['pushEphemeral']?.(_0x371c2e['event'],_0x371c2e[_0x368cef(0x255)]);}catch{}};process['on'](_0x3a2281(0x14d),_0x4a3e31),_0x33afc7['_clusterOnMessage']=_0x4a3e31;{let _0x2826c7=process['cpuUsage'](),_0x133a4c=Date[_0x3a2281(0x2ae)]();const _0x2089fc=()=>{const _0xdc1670=_0x3a2281;if(typeof process[_0xdc1670(0x254)]!==_0xdc1670(0x21b)||!process[_0xdc1670(0x286)])return;const _0x5e56b1=Date['now'](),_0x1e1eef=process[_0xdc1670(0xd2)](),_0x2382ef=(_0x5e56b1-_0x133a4c)*0x3e8,_0x39f278=_0x1e1eef[_0xdc1670(0x17a)]-_0x2826c7[_0xdc1670(0x17a)]+(_0x1e1eef[_0xdc1670(0x10e)]-_0x2826c7[_0xdc1670(0x10e)]),_0xf9a280=_0x2382ef>0x0?Math[_0xdc1670(0x119)](0x64,Math[_0xdc1670(0x2cd)](_0x39f278/(_0x2382ef*(_0x355667[_0xdc1670(0x137)]()[_0xdc1670(0xd0)]||0x1))*0x64)):0x0;_0x2826c7=_0x1e1eef,_0x133a4c=_0x5e56b1;const _0x5222d0=process[_0xdc1670(0x1e0)]();let _0x55130d=null;try{_0x55130d=_0x33afc7['role']?.[_0xdc1670(0x2b2)]?_0x33afc7[_0xdc1670(0x155)]?.[_0xdc1670(0x135)]?.()??null:null;}catch{}try{process['send']({[_0x5bea4c]:_0x434c9a,'stats':{'rss':_0x5222d0[_0xdc1670(0x2ab)],'heapUsed':_0x5222d0[_0xdc1670(0x11a)],'heapTotal':_0x5222d0['heapTotal'],'external':_0x5222d0[_0xdc1670(0x21c)],'cpuPct':_0xf9a280,'cpuWindowMs':Math[_0xdc1670(0x2cd)](_0x2382ef/0x3e8)||null},'processing':_0x55130d});}catch{}},_0x37a3a2=Math[_0x3a2281(0x18b)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x372162=setInterval(_0x2089fc,_0x37a3a2);_0x372162['unref']?.(),_0x2089fc();for(const _0x6df794 of['processor:paused',_0x3a2281(0x1f9)]){_0x33afc7['events']?.['on']?.(_0x6df794,()=>{try{_0x2089fc();}catch{}});}}let _0x412ddf=![];const _0x56908f=async _0x516872=>{const _0x5ba894=_0x3a2281;if(_0x412ddf)return;_0x412ddf=!![];const _0x1face3=setTimeout(()=>process[_0x5ba894(0x227)](_0x516872),_0x3afbbc);_0x1face3[_0x5ba894(0x1fd)]?.();try{await _0x33afc7[_0x5ba894(0x160)]?.();}catch{}process[_0x5ba894(0x227)](_0x516872);};process['on'](_0x3a2281(0x2db),()=>_0x56908f(0x0));if(process[_0x3a2281(0x124)]!=='win32'){const _0x1137c4=setInterval(()=>{const _0x18fa70=_0x3a2281;if(process[_0x18fa70(0x1b1)]===0x1)_0x56908f(0x0);},_0xf1a31a);_0x1137c4[_0x3a2281(0x1fd)]?.(),_0x33afc7[_0x3a2281(0x197)]=_0x1137c4;}}return okdbCluster={'runClustered':_0x4cf1f4,'attachWorkerCluster':_0x2f908e},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0x1b6570=_0xa12a27;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x784994=require$$0$5,{attachWorkerCluster:_0x36dac5}=requireOkdbCluster();async function _0x237fcc(){const _0x973a6a=_0x372a,_0x3c7f80=process.env.OKDB_HTTP_CHILD;if(!_0x3c7f80)throw new Error(_0x973a6a(0x24a));const {rootPath:_0x1786da,port:_0x3d045b,options:options={},logLevel:logLevel='info'}=JSON[_0x973a6a(0x240)](_0x3c7f80);if(!_0x1786da||!_0x3d045b)throw new Error(_0x973a6a(0xe4));const _0x239cb3=new _0x784994(_0x1786da,{...options,'engines':![],'processors':![],'compaction':![]});_0x239cb3[_0x973a6a(0x23d)][_0x973a6a(0x1a4)]?.();const _0x36749c=process.env.OKDB_CLUSTER_SLOT??'?',_0x1d6e22={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x37521b=_0x1d6e22[logLevel]??_0x1d6e22['info'];_0x239cb3[_0x973a6a(0x23d)]['attach'](_0x3b2e99=>{const _0x472f10=_0x973a6a;if((_0x1d6e22[_0x3b2e99[_0x472f10(0x1d1)]]??0x1)<_0x37521b)return;try{process[_0x472f10(0x254)]?.({'__okdbCluster':'log','slot':_0x36749c,'pid':process[_0x472f10(0x112)],'entry':_0x3b2e99});}catch{}}),await _0x239cb3[_0x973a6a(0x293)](),_0x36dac5(_0x239cb3),await _0x239cb3['http'][_0x973a6a(0x2c3)](_0x3d045b);}return _0x237fcc()[_0x1b6570(0x26d)](_0x42147e=>{const _0x37c94b=_0x1b6570;try{process['send']?.({'__okdbCluster':_0x37c94b(0x23d),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x37c94b(0x112)],'entry':{'level':_0x37c94b(0x25a),'msg':_0x37c94b(0x12d)+(_0x42147e?.[_0x37c94b(0x14d)]??_0x42147e)}});}catch{}process[_0x37c94b(0x227)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module['exports']=okdbHttpWorkerChild;
@@ -1 +1 @@
1
- 'use strict';const _0x45837b=_0x42e0;(function(_0x3d860c,_0xa13791){const _0x3355a3=_0x42e0,_0x495da0=_0x3d860c();while(!![]){try{const _0xc57fa8=-parseInt(_0x3355a3(0x164))/0x1*(-parseInt(_0x3355a3(0x12f))/0x2)+parseInt(_0x3355a3(0x15c))/0x3*(-parseInt(_0x3355a3(0x12a))/0x4)+-parseInt(_0x3355a3(0x156))/0x5+parseInt(_0x3355a3(0x149))/0x6+parseInt(_0x3355a3(0x12d))/0x7*(-parseInt(_0x3355a3(0x170))/0x8)+-parseInt(_0x3355a3(0x138))/0x9+parseInt(_0x3355a3(0x147))/0xa;if(_0xc57fa8===_0xa13791)break;else _0x495da0['push'](_0x495da0['shift']());}catch(_0x2d6bb3){_0x495da0['push'](_0x495da0['shift']());}}}(_0x5d0c,0xb7afb));function _0x42e0(_0x43d872,_0x143bca){_0x43d872=_0x43d872-0x121;const _0x5d0c6e=_0x5d0c();let _0x42e010=_0x5d0c6e[_0x43d872];return _0x42e010;}var require$$0=require(_0x45837b(0x14f)),require$$1=require(_0x45837b(0x140));function getDefaultExportFromCjs(_0x3242ed){const _0x383c28=_0x45837b;return _0x3242ed&&_0x3242ed[_0x383c28(0x172)]&&Object[_0x383c28(0x175)][_0x383c28(0x167)][_0x383c28(0x176)](_0x3242ed,_0x383c28(0x177))?_0x3242ed[_0x383c28(0x177)]:_0x3242ed;}var okdbViewsBootstrapWorker$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0xd1f95b=_0x45837b;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x41cf1d={'PUT':_0xd1f95b(0x148),'REMOVE':_0xd1f95b(0x143),'INDEX_DROP':'dropIndex','INDEX_REGISTER':'registerIndex','INDEX_RESET':_0xd1f95b(0x14b),'TYPE_REGISTER':_0xd1f95b(0x133),'TYPE_DROP':_0xd1f95b(0x16c),'FTS_REGISTER':_0xd1f95b(0x174),'FTS_DROP':_0xd1f95b(0x171),'FTS_RESET':_0xd1f95b(0x122),'SCHEMA_SET':_0xd1f95b(0x128),'SCHEMA_DROP':_0xd1f95b(0x12b),'TTL_SET':_0xd1f95b(0x14e),'TTL_CLEAR':_0xd1f95b(0x125)},_0x30e46f={'SYSTEM_READY':'system:ready','SYSTEM_STOPPED':_0xd1f95b(0x15a),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':'system:poke','SYSTEM_DRAIN':_0xd1f95b(0x134),'SYSTEM_TYPE_DROP':_0xd1f95b(0x137),'SYSTEM_PROC':_0xd1f95b(0x16a),'SYSTEM_BUS_STATE_CHANGE':_0xd1f95b(0x168),'ITEM_CREATE':_0xd1f95b(0x166),'ITEM_UPDATE':_0xd1f95b(0x178),'ITEM_REMOVE':'item:remove','INDEX_RESET':_0xd1f95b(0x163),'INDEX_READY':_0xd1f95b(0x151),'INDEX_PROGRESS':_0xd1f95b(0x126),'VIEW_PROGRESS':_0xd1f95b(0x136),'INDEX_DROP':_0xd1f95b(0x13e),'INDEX_REGISTERED':_0xd1f95b(0x142),'FTS_REGISTERED':_0xd1f95b(0x127),'FTS_DROP':_0xd1f95b(0x169),'FTS_RESET':_0xd1f95b(0x161),'SCHEMA_SET':'schema:set','SCHEMA_DROP':_0xd1f95b(0x16d),'UNIQUE_VIOLATION':_0xd1f95b(0x159),'UNIQUE_VIOLATION_RESOLVED':'unique:violation_resolved','REF_VIOLATION':_0xd1f95b(0x14c),'REF_VIOLATION_RESOLVED':_0xd1f95b(0x141),'SYNC_APPLY':_0xd1f95b(0x13d),'TXN_START':_0xd1f95b(0x14a),'TXN_END':_0xd1f95b(0x173),'TXN_ROLLBACK':_0xd1f95b(0x135),'TYPE_REGISTERED':_0xd1f95b(0x150),'TYPE_DROP':_0xd1f95b(0x16e),'ENV_OPENED':'env:opened','ENV_REMOVED':_0xd1f95b(0x157),'SYSTEM_ENV_RELEASE':_0xd1f95b(0x131),'TTL_EXPIRED':_0xd1f95b(0x155),'TTL_SET':_0xd1f95b(0x15e),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0xd1f95b(0x129),'LICENSE_ADDED':_0xd1f95b(0x12e),'LICENSE_ACTIVATED':_0xd1f95b(0x132),'LICENSE_REMOVED':_0xd1f95b(0x153)},_0x5e1f10={'CREATING':_0xd1f95b(0x152),'RESETTING':_0xd1f95b(0x13f),'READY':_0xd1f95b(0x158),'DROPPING':_0xd1f95b(0x16b),'WAITING':'waiting'},_0x291b74={'CREATED':_0xd1f95b(0x146),'STARTING':_0xd1f95b(0x13a),'STARTED':'started','STOPPING':_0xd1f95b(0x123),'STOPPED':_0xd1f95b(0x139)},_0x4ae671={'CREATING':_0xd1f95b(0x152),'READY':_0xd1f95b(0x158),'HALTED':_0xd1f95b(0x16f),'STOPPED':_0xd1f95b(0x139),'RESETTING':_0xd1f95b(0x13f)},_0x9182d9=Object[_0xd1f95b(0x162)]({'POKE':'bus:poke','DRAIN':_0xd1f95b(0x124),'TYPE_DROP':'bus:type_drop','PROC':_0xd1f95b(0x179),'ENV_RELEASE':_0xd1f95b(0x121)});return okdbEnums={'BUS_EVENTS':_0x9182d9,'CHANGE_ACTIONS':_0x41cf1d,'EVENTS':_0x30e46f,'INDEX_STATE':_0x5e1f10,'OKDB_STATE':_0x291b74,'VIEW_STATE':_0x4ae671},okdbEnums;}var hasRequiredOkdbViewsBootstrapWorker;function requireOkdbViewsBootstrapWorker(){if(hasRequiredOkdbViewsBootstrapWorker)return okdbViewsBootstrapWorker$1;hasRequiredOkdbViewsBootstrapWorker=0x1;const {parentPort:_0x3261f1,workerData:_0xd0c4c5}=require$$0,_0x453daf=require$$1,{EVENTS:_0xc0da19}=requireOkdbEnums();async function _0x4226d1(){const _0x3bb380=_0x42e0,{rootPath:_0x2e17d1,envName:_0x5c43ca,viewName:_0x2b529e,definition:_0x21c854}=_0xd0c4c5,_0x353a3e=new _0x453daf(_0x2e17d1,{'admin':![],'mcp':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],'processes':![]});await _0x353a3e[_0x3bb380(0x13b)]();const _0x56a127=_0x353a3e[_0x3bb380(0x165)](_0x5c43ca);_0x56a127[_0x3bb380(0x12c)]['on'](_0xc0da19['VIEW_PROGRESS'],_0x18e7d7=>{const _0xaab8be=_0x3bb380;if(_0x18e7d7?.[_0xaab8be(0x13c)]!==_0x2b529e)return;try{_0x3261f1[_0xaab8be(0x160)]({'type':_0xaab8be(0x15d),'event':_0x18e7d7});}catch{}}),await _0x56a127[_0x3bb380(0x130)][_0x3bb380(0x14d)](_0x21c854),await _0x56a127[_0x3bb380(0x130)]['_activateViewStorage'](_0x2b529e,_0x21c854),await _0x56a127[_0x3bb380(0x130)]['_runBootstrapScanPhases'](_0x2b529e,_0x21c854),_0x3261f1[_0x3bb380(0x160)]({'type':'done'}),await _0x353a3e[_0x3bb380(0x154)](),process['exit'](0x0);}return _0x4226d1()['catch'](_0x41d56d=>{const _0x4783bc=_0x42e0;try{_0x3261f1[_0x4783bc(0x160)]({'type':_0x4783bc(0x15f),'error':_0x41d56d[_0x4783bc(0x145)]??String(_0x41d56d),'stack':_0x41d56d[_0x4783bc(0x144)]});}catch{}process['exit'](0x1);}),okdbViewsBootstrapWorker$1;}var okdbViewsBootstrapWorkerExports=requireOkdbViewsBootstrapWorker(),okdbViewsBootstrapWorker=getDefaultExportFromCjs(okdbViewsBootstrapWorkerExports);module[_0x45837b(0x15b)]=okdbViewsBootstrapWorker;function _0x5d0c(){const _0x511f5a=['postMessage','fts:reset','freeze','index:reset','4072vXAbee','env','item:create','hasOwnProperty','system:bus_state_change','fts:drop','system:proc','dropping','dropType','schema:drop','type:drop','halted','13304GGWILb','dropFts','__esModule','txn:end','registerFts','prototype','call','default','item:update','bus:proc','bus:env_release','resetFts','stopping','bus:drain','clearTtl','index:progress','fts:registered','setSchema','license:invalid','24004ItYCux','dropSchema','events','5159UAbfIU','license:added','482htglro','views','system:env_release','license:activated','registerType','system:drain','txn:rollback','view:progress','system:type_drop','7184070aBcDXm','stopped','starting','open','name','sync:apply','index:drop','resetting','./okdb','ref:violation_resolved','index:registered','remove','stack','message','created','13849610CAtDPJ','put','8102844ElbcBj','txn:start','resetIndex','ref:violation','_prepareViewDict','setTtl','worker_threads','type:registered','index:ready','creating','license:removed','close','ttl:expired','4312670VSbgmg','env:removed','ready','unique:violation','system:stopped','exports','39NxSRbd','progress','ttl:set','error'];_0x5d0c=function(){return _0x511f5a;};return _0x5d0c();}
1
+ 'use strict';const _0x591eef=_0x20a8;(function(_0x3cce2d,_0x50b042){const _0x56c4dc=_0x20a8,_0x3e27d0=_0x3cce2d();while(!![]){try{const _0x1d33f6=parseInt(_0x56c4dc(0xb8))/0x1*(parseInt(_0x56c4dc(0xc5))/0x2)+-parseInt(_0x56c4dc(0xe0))/0x3+-parseInt(_0x56c4dc(0xd3))/0x4*(-parseInt(_0x56c4dc(0xa6))/0x5)+-parseInt(_0x56c4dc(0xa1))/0x6*(-parseInt(_0x56c4dc(0xbd))/0x7)+-parseInt(_0x56c4dc(0xcc))/0x8*(-parseInt(_0x56c4dc(0xdb))/0x9)+-parseInt(_0x56c4dc(0xb9))/0xa+-parseInt(_0x56c4dc(0xd5))/0xb;if(_0x1d33f6===_0x50b042)break;else _0x3e27d0['push'](_0x3e27d0['shift']());}catch(_0x4a3c43){_0x3e27d0['push'](_0x3e27d0['shift']());}}}(_0x4ace,0x3553b));function _0x4ace(){const _0x2eb9d9=['_runBootstrapScanPhases','fts:reset','error','4wNqQWD','stack','registerFts','index:ready','index:reset','ttl:set','VIEW_PROGRESS','1200NcfeiF','catch','dropType','system:env_release','__esModule','ttl:expired','license:invalid','8Gupups','item:create','18260JnvrqF','call','views','txn:end','system:drain','clearTtl','11619XSVplT','open','bus:type_drop','setSchema','prototype','972735ATKLlg','dropFts','ref:violation_resolved','unique:violation_resolved','ready','events','_prepareViewDict','registerIndex','index:registered','txn:start','system:ready','exports','env:removed','item:update','bus:proc','index:drop','halted','system:type_drop','system:proc','dropping','txn:rollback','stopped','system:poke','done','system:stopped','bus:env_release','1208154jmEaNX','resetting','exit','creating','env','132850uAXuwT','resetIndex','registerType','type:registered','./okdb','postMessage','system:clock_change','schema:set','unique:violation','waiting','item:remove','type:drop','index:progress','view:progress','license:activated','system:bus_state_change','remove','ttl:clear','156796RptKhu','4187680xKEnIJ','dropIndex','hasOwnProperty','fts:registered','14IuYllY','default','starting','worker_threads','bus:drain'];_0x4ace=function(){return _0x2eb9d9;};return _0x4ace();}function _0x20a8(_0x2728e7,_0x576821){_0x2728e7=_0x2728e7-0x9e;const _0x4ace2b=_0x4ace();let _0x20a8e0=_0x4ace2b[_0x2728e7];return _0x20a8e0;}var require$$0=require(_0x591eef(0xc0)),require$$1=require(_0x591eef(0xaa));function getDefaultExportFromCjs(_0x10ed1d){const _0x48a6fa=_0x591eef;return _0x10ed1d&&_0x10ed1d[_0x48a6fa(0xd0)]&&Object[_0x48a6fa(0xdf)][_0x48a6fa(0xbb)][_0x48a6fa(0xd6)](_0x10ed1d,_0x48a6fa(0xbe))?_0x10ed1d[_0x48a6fa(0xbe)]:_0x10ed1d;}var okdbViewsBootstrapWorker$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x255904=_0x591eef;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x3fb874={'PUT':'put','REMOVE':_0x255904(0xb6),'INDEX_DROP':_0x255904(0xba),'INDEX_REGISTER':_0x255904(0xe7),'INDEX_RESET':_0x255904(0xa7),'TYPE_REGISTER':_0x255904(0xa8),'TYPE_DROP':_0x255904(0xce),'FTS_REGISTER':_0x255904(0xc7),'FTS_DROP':_0x255904(0xe1),'FTS_RESET':'resetFts','SCHEMA_SET':_0x255904(0xde),'SCHEMA_DROP':'dropSchema','TTL_SET':'setTtl','TTL_CLEAR':_0x255904(0xda)},_0x4594af={'SYSTEM_READY':_0x255904(0xea),'SYSTEM_STOPPED':_0x255904(0x9f),'SYSTEM_CLOCK_CHANGE':_0x255904(0xac),'SYSTEM_POKE':_0x255904(0xf6),'SYSTEM_DRAIN':_0x255904(0xd9),'SYSTEM_TYPE_DROP':_0x255904(0xf1),'SYSTEM_PROC':_0x255904(0xf2),'SYSTEM_BUS_STATE_CHANGE':_0x255904(0xb5),'ITEM_CREATE':_0x255904(0xd4),'ITEM_UPDATE':_0x255904(0xed),'ITEM_REMOVE':_0x255904(0xb0),'INDEX_RESET':_0x255904(0xc9),'INDEX_READY':_0x255904(0xc8),'INDEX_PROGRESS':_0x255904(0xb2),'VIEW_PROGRESS':_0x255904(0xb3),'INDEX_DROP':_0x255904(0xef),'INDEX_REGISTERED':_0x255904(0xe8),'FTS_REGISTERED':_0x255904(0xbc),'FTS_DROP':'fts:drop','FTS_RESET':_0x255904(0xc3),'SCHEMA_SET':_0x255904(0xad),'SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':_0x255904(0xae),'UNIQUE_VIOLATION_RESOLVED':_0x255904(0xe3),'REF_VIOLATION':'ref:violation','REF_VIOLATION_RESOLVED':_0x255904(0xe2),'SYNC_APPLY':'sync:apply','TXN_START':_0x255904(0xe9),'TXN_END':_0x255904(0xd8),'TXN_ROLLBACK':_0x255904(0xf4),'TYPE_REGISTERED':_0x255904(0xa9),'TYPE_DROP':_0x255904(0xb1),'ENV_OPENED':'env:opened','ENV_REMOVED':_0x255904(0xec),'SYSTEM_ENV_RELEASE':_0x255904(0xcf),'TTL_EXPIRED':_0x255904(0xd1),'TTL_SET':_0x255904(0xca),'TTL_CLEAR':_0x255904(0xb7),'LICENSE_INVALID':_0x255904(0xd2),'LICENSE_ADDED':'license:added','LICENSE_ACTIVATED':_0x255904(0xb4),'LICENSE_REMOVED':'license:removed'},_0x407b2b={'CREATING':_0x255904(0xa4),'RESETTING':_0x255904(0xa2),'READY':_0x255904(0xe4),'DROPPING':_0x255904(0xf3),'WAITING':_0x255904(0xaf)},_0x2414f0={'CREATED':'created','STARTING':_0x255904(0xbf),'STARTED':'started','STOPPING':'stopping','STOPPED':_0x255904(0xf5)},_0x554045={'CREATING':'creating','READY':'ready','HALTED':_0x255904(0xf0),'STOPPED':'stopped','RESETTING':_0x255904(0xa2)},_0x502f9c=Object['freeze']({'POKE':'bus:poke','DRAIN':_0x255904(0xc1),'TYPE_DROP':_0x255904(0xdd),'PROC':_0x255904(0xee),'ENV_RELEASE':_0x255904(0xa0)});return okdbEnums={'BUS_EVENTS':_0x502f9c,'CHANGE_ACTIONS':_0x3fb874,'EVENTS':_0x4594af,'INDEX_STATE':_0x407b2b,'OKDB_STATE':_0x2414f0,'VIEW_STATE':_0x554045},okdbEnums;}var hasRequiredOkdbViewsBootstrapWorker;function requireOkdbViewsBootstrapWorker(){const _0x3993dd=_0x591eef;if(hasRequiredOkdbViewsBootstrapWorker)return okdbViewsBootstrapWorker$1;hasRequiredOkdbViewsBootstrapWorker=0x1;const {parentPort:_0x3fa56a,workerData:_0x3aaaf7}=require$$0,_0x49987e=require$$1,{EVENTS:_0x2cce9e}=requireOkdbEnums();async function _0x438fc1(){const _0xe77fbf=_0x20a8,{rootPath:_0xa994e4,envName:_0x49f94c,viewName:_0x47c3b6,definition:_0x2c0414}=_0x3aaaf7,_0x977755=new _0x49987e(_0xa994e4,{'admin':![],'mcp':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],'processes':![]});await _0x977755[_0xe77fbf(0xdc)]();const _0x230ee5=_0x977755[_0xe77fbf(0xa5)](_0x49f94c);_0x230ee5[_0xe77fbf(0xe5)]['on'](_0x2cce9e[_0xe77fbf(0xcb)],_0x26ffbb=>{const _0x2e6806=_0xe77fbf;if(_0x26ffbb?.['name']!==_0x47c3b6)return;try{_0x3fa56a[_0x2e6806(0xab)]({'type':'progress','event':_0x26ffbb});}catch{}}),await _0x230ee5[_0xe77fbf(0xd7)][_0xe77fbf(0xe6)](_0x2c0414),await _0x230ee5[_0xe77fbf(0xd7)]['_activateViewStorage'](_0x47c3b6,_0x2c0414),await _0x230ee5[_0xe77fbf(0xd7)][_0xe77fbf(0xc2)](_0x47c3b6,_0x2c0414),_0x3fa56a[_0xe77fbf(0xab)]({'type':_0xe77fbf(0x9e)}),await _0x977755['close'](),process[_0xe77fbf(0xa3)](0x0);}return _0x438fc1()[_0x3993dd(0xcd)](_0x2e903a=>{const _0x124331=_0x3993dd;try{_0x3fa56a[_0x124331(0xab)]({'type':_0x124331(0xc4),'error':_0x2e903a['message']??String(_0x2e903a),'stack':_0x2e903a[_0x124331(0xc6)]});}catch{}process[_0x124331(0xa3)](0x1);}),okdbViewsBootstrapWorker$1;}var okdbViewsBootstrapWorkerExports=requireOkdbViewsBootstrapWorker(),okdbViewsBootstrapWorker=getDefaultExportFromCjs(okdbViewsBootstrapWorkerExports);module[_0x591eef(0xeb)]=okdbViewsBootstrapWorker;