@kedem/okdb 2.3.2 → 2.3.4

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 _0x74f0a9=_0x30d0;function _0x30d0(_0xe60607,_0x5dd3ae){_0xe60607=_0xe60607-0xa6;const _0x33d29e=_0x33d2();let _0x30d0a6=_0x33d29e[_0xe60607];return _0x30d0a6;}(function(_0x285b11,_0x1a4150){const _0x368cc7=_0x30d0,_0x37532e=_0x285b11();while(!![]){try{const _0x144214=-parseInt(_0x368cc7(0x2bf))/0x1+parseInt(_0x368cc7(0x237))/0x2*(parseInt(_0x368cc7(0x106))/0x3)+parseInt(_0x368cc7(0x113))/0x4+parseInt(_0x368cc7(0x1ba))/0x5+-parseInt(_0x368cc7(0x123))/0x6+-parseInt(_0x368cc7(0xf5))/0x7+-parseInt(_0x368cc7(0x20d))/0x8;if(_0x144214===_0x1a4150)break;else _0x37532e['push'](_0x37532e['shift']());}catch(_0x20e94f){_0x37532e['push'](_0x37532e['shift']());}}}(_0x33d2,0xb541d));var require$$0$5=require(_0x74f0a9(0xcd)),require$$1$1=require(_0x74f0a9(0x1bc)),require$$1=require(_0x74f0a9(0x1b5)),require$$0$3=require('os'),require$$2=require(_0x74f0a9(0x281)),require$$0=require(_0x74f0a9(0x15e)),require$$0$2=require(_0x74f0a9(0x209)),require$$0$1=require('fs'),require$$0$4=require(_0x74f0a9(0xe8));function getDefaultExportFromCjs(_0x3d54f4){const _0x3d5c36=_0x74f0a9;return _0x3d54f4&&_0x3d54f4[_0x3d5c36(0x109)]&&Object['prototype'][_0x3d5c36(0x15a)][_0x3d5c36(0xb2)](_0x3d54f4,'default')?_0x3d54f4[_0x3d5c36(0x2a6)]:_0x3d54f4;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x13ee2a=_0x74f0a9;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x488412={'PUT':_0x13ee2a(0x1c0),'REMOVE':'remove','INDEX_DROP':_0x13ee2a(0x177),'INDEX_REGISTER':'registerIndex','INDEX_RESET':'resetIndex','TYPE_REGISTER':_0x13ee2a(0x159),'TYPE_DROP':'dropType','FTS_REGISTER':_0x13ee2a(0x114),'FTS_DROP':_0x13ee2a(0x158),'FTS_RESET':'resetFts','SCHEMA_SET':'setSchema','SCHEMA_DROP':_0x13ee2a(0x15b),'TTL_SET':_0x13ee2a(0x1d9),'TTL_CLEAR':_0x13ee2a(0x15f)},_0x5027f8={'SYSTEM_READY':_0x13ee2a(0x29f),'FIELD_RESOLVER_REGISTERED':_0x13ee2a(0x1df),'SYSTEM_STOPPED':_0x13ee2a(0xd2),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x13ee2a(0x19d),'SYSTEM_DRAIN':_0x13ee2a(0x2dd),'SYSTEM_TYPE_DROP':'system:type_drop','SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x13ee2a(0xd8),'ITEM_CREATE':_0x13ee2a(0x20c),'ITEM_UPDATE':_0x13ee2a(0xd1),'ITEM_REMOVE':'item:remove','INDEX_RESET':_0x13ee2a(0x1e7),'INDEX_READY':_0x13ee2a(0x1d6),'INDEX_PROGRESS':_0x13ee2a(0x257),'VIEW_PROGRESS':_0x13ee2a(0x1e3),'INDEX_DROP':_0x13ee2a(0xdc),'INDEX_REGISTERED':_0x13ee2a(0x2d1),'FTS_REGISTERED':_0x13ee2a(0x290),'FTS_DROP':_0x13ee2a(0x172),'FTS_RESET':_0x13ee2a(0x1f6),'SCHEMA_SET':'schema:set','SCHEMA_DROP':_0x13ee2a(0xb5),'UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0x13ee2a(0xe6),'REF_VIOLATION':_0x13ee2a(0x283),'REF_VIOLATION_RESOLVED':_0x13ee2a(0x234),'SYNC_APPLY':_0x13ee2a(0x150),'TXN_START':'txn:start','TXN_END':_0x13ee2a(0x174),'TXN_ROLLBACK':'txn:rollback','TYPE_REGISTERED':_0x13ee2a(0x21a),'TYPE_DROP':'type:drop','ENV_OPENED':_0x13ee2a(0x213),'ENV_REMOVED':_0x13ee2a(0xad),'SYSTEM_ENV_RELEASE':'system:env_release','TTL_EXPIRED':_0x13ee2a(0x1f4),'TTL_SET':_0x13ee2a(0x105),'TTL_CLEAR':_0x13ee2a(0x120),'LICENSE_INVALID':_0x13ee2a(0x208),'LICENSE_ADDED':'license:added','LICENSE_ACTIVATED':_0x13ee2a(0x20f),'LICENSE_REMOVED':_0x13ee2a(0x1f2)},_0x22d4d7={'CREATING':'creating','RESETTING':'resetting','READY':_0x13ee2a(0x1c2),'DROPPING':_0x13ee2a(0x24c),'WAITING':_0x13ee2a(0x282),'ERROR':_0x13ee2a(0x192)},_0x1db663={'CREATED':_0x13ee2a(0x170),'STARTING':'starting','STARTED':_0x13ee2a(0x1a1),'STOPPING':_0x13ee2a(0x22e),'STOPPED':_0x13ee2a(0x17a)},_0x3d65f8={'CREATING':_0x13ee2a(0x2ce),'READY':_0x13ee2a(0x1c2),'HALTED':'halted','STOPPED':_0x13ee2a(0x17a),'RESETTING':_0x13ee2a(0x2ba)},_0x2a297b=Object['freeze']({'POKE':_0x13ee2a(0xa7),'DRAIN':'bus:drain','TYPE_DROP':_0x13ee2a(0x253),'PROC':'bus:proc','ENV_RELEASE':_0x13ee2a(0x23b)});return okdbEnums={'BUS_EVENTS':_0x2a297b,'CHANGE_ACTIONS':_0x488412,'EVENTS':_0x5027f8,'INDEX_STATE':_0x22d4d7,'OKDB_STATE':_0x1db663,'VIEW_STATE':_0x3d65f8},okdbEnums;}function _0x33d2(){const _0x15785d=['has','_committed','_openEnvLazy','acquiredAt','~lock','__okdbSlot','_draining','_onPoke','_writer','index:ready','\x20times\x20in\x20','attach','setTtl','1ofN:','_putRowSync','race','warn','_lock','field:resolver_registered','user','http-server','\x20ipc\x20error:\x20','view:progress','_coordinator','okdb-writer:\x20env\x20closing\x20—\x20retry','_bpWaiters','index:reset','test','_held','mean','\x20died\x20','listAll','_selfKey','publishOwnRow','close','_quantum','startsWith','license:removed','decommission','ttl:expired','_nodeDbFor','fts:reset','processKey','_heartbeatTimer','join','rows=','raw-remove','stopHeartbeat','committed','listen','kill','respawnTimer','log','instanceId','min','isDead','transactionSync','seq','inst:','license:invalid','perf_hooks','[okdb-cluster]\x20','supervisorKey','item:create','11956016sluMkL','engines','license:activated','stringify','clear','isPrimary','env:opened','--watch','FTS_RESET','beforeWrite','okdb','write','now','type:registered','getProcess','floor','_startHeartbeat','events',',\x20signal=','note','(worst\x20','disable','_putRowAsync','createEnvironment','emit','function','_children','sandbox','getCmd','\x20phase=','setupPrimary','_changefeed','error:\x20','stopping','_removeRowAsync','_heartbeatInFlight','then','claimGated','decommissioned','ref:violation_resolved','_markSeen','_baselines','2004146GbDIQY','_groupByProcess','cluster-wide','_handlePoke','bus:env_release','_activateProcesses','_enableChangelog','depth','confirm',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','_collectSingletonClaims','some','mkdirSync','max','stack','commitP99Ms','addSupervisedChild','cluster:','busy','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','system','dropping','string','FTS_DROP','resetReadTxn','\x20===','values','onWindow','bus:type_drop','startedAt','toFixed','_startAdmission','index:progress','kind','_flushTimer','sort','unclaimed','\x20—\x20','uptime','~processes:cmd','claims','_drain','unhandledRejection','message','threads','_bpParkedTotal','repeat','stats','_envs','trim','getDesired','__okdbCluster','SYSTEM_STOPPED','version','_onTick','markClosed','workers','hostname','exports','_buckets','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','_maybePublish','listNodes','_durs',':want','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','commitsPerSec','_dedupeMax','_handleInProcess','async','getRange','reap','_onItem','holder','crypto','waiting','ref:violation','map','_clusterWorkerAttached','\x20\x20#','SWAP','change','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.','label','processingStatusView','_sandbox','delete','enabled','_onStop','fts:registered','\x20statusEnv=','detachConsole','connected','nodesView','_getType','_ownMeta','_isStale','building','killable','_publishNow','view','\x20\x20(no\x20env\x20draining)','publishChildRow','_rowKey','system:ready','state','reduce','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','indexOf','level','_migrateVocab','default','_buildOwnRow','setLogger','includes','caps','node/','registry-publish','_systemEnv','[okdb-cluster]\x20worker\x20pid=','pid','_acquiredAt','ppid','_startedAt','cli','\x20│\x20','_ensureDesired','\x20drainAge=','openDB','commit','\x20while\x20this\x20process\x20runs\x20','resetting','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','attachFeed','set','_done','1378089xMRhGD','[okdb-cluster]\x20slot=','push','maxMs','_rootDb','pushEphemeral','oldestPendingMs','from','nodeKey',')\x20exited\x20','round','http\x20worker\x20child\x20failed:\x20','_released','_singletonLock','feed:','creating','_admissionTimer','_heldTotal','index:registered','tierList','_drainOne','enable','filter','_instanceId','_seen','_lastCpuWindowMs','_nestedWarned','_started','ms\x20(attempt\x20','getClock','system:drain','_closed','okdb-http-worker-child.js','namespace','--inspect','maxExtra','_lockDb','expiresAt','_versionSkewWarned','bus:poke','_isReader','heapUsed','msg','_singletonLocks','setOwnMeta','env:removed','_wantDb','_report','inflightAgesMs','hasDesired','call','\x20\x20env=','workersConfigured','schema:drop','_buildProcessingFacet','loop-lag','lifecycle','\x20in\x20','firstTs','ESRCH','putSync','_nodeDb','_nodeDead','number','splice','processor','SYNC_COMMITS','list','size','_key','\x20oldestPendingMs=','deaths','processor:progress','processor:error','mode','split','_lastCpuPct','./okdb','~processes','percentile',');\x20','item:update','system:stopped','FTS_REGISTERED','_role','ms\x20p99=','open','_adminRelay','system:bus_state_change','external','primary','_log','index:drop','uncaughtException','registry\x20heartbeat\x20skipped\x20(writer=','isActive','SYSTEM_PROC','[okdb-cluster]\x20respawning\x20worker\x20slot=','_onProcEvent','_desired','SIGKILL','isWorker','unique:violation_resolved','migrations','node:events','allSettled','isConnected','[okdb-cluster]\x20primary\x20pid=','randomUUID','status','_nestedTotal','_timer','removeNode','liveThreadStats','\x0a\x20\x20\x20\x20\x20\x20','INDEX_PROGRESS','processing','429121XIilsQ','startHeartbeat','compaction','noteListenAddr','data','ORPHAN\x20(env-closed\x20write)','__vocab/version','_lastPublishAt','rowKey','quantum','execArgv','keys','SYSTEM_POKE','_cursors','http','setDesired','ttl:set','3eyVHRX','flushed','_outstanding','__esModule','embedded','ms\x20on\x20env=','flushLmdb','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','_lastCpuAt','getChanges','_processStartedAt','shift','object','5569112DqdbDZ','registerFts','registry\x20publish\x20failing:\x20','single','_nodeDbCache','ingest','_supervisorKey','_enqueuedAt','children','updatedAt','disconnect','_participate','ms\x20busy=','ttl:clear','processor:ready','_admissionStarted','393726mqWqdF','processors','online','cursorKey','host','_kind','slotKey','remove','compact','all','(code=','recordWrite','parkedNow','listenAddr','reject','INDEX_REGISTERED','.log','env','name','childTransaction','_scheduleFlush','ms\x20env=',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','options','_wantDbHandle','prependListener','fanout','processor:paused','ms\x20max=','role','heartbeatMs','drain','epoch','memoryUsage','none','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','toISOString','send','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','standalone','find','removeSync','_statusEnv','afterWrite','processor:resumed','sync:apply','updateSupervisedChildStats','_publishFailWarned','_collectWriterFacet','_listenAddr','\x20sync','add','\x20@\x20','dropFts','registerType','hasOwnProperty','dropSchema','participate','info','node:perf_hooks','clearTtl','processorId','count','deregisterSelf','code','_desiredOverlay','envsOpen','_isWriter','stderr','VIEW_PROGRESS','ms\x20activeWriters=','fn-runner','_holderDead','\x20worker\x20slot=','processorsView','_highWater','_db','created','_flushDebounce','fts:drop','sync','txn:end','signalWant','\x20HTTP\x20server(s)\x20on\x20port\x20','dropIndex','instances','singletonClaims','stopped','ms/','catch','--eval','event','running','exit','unref','processes','selfKey','dedupeMax','listening','win32','stop','true','ITEM_UPDATE','--test','_threadStats','_dedupeKey','_inflight','hard-killed','ENV_CLOSING_RETRY','cpuWindowMs','cpuUsage','error','off','force','get','\x20writer{depth=','_caps','entries','slot','load','listDesired','_lastCpuUsage','system:poke','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','_pending','\x0a===\x20OKDB_DIAG\x20','started','processor:retry','process','transaction','clusterStatusView','_windowCbs','consecutiveFailures','\x20pid=','type','ttlMs','once','putNode','_refreshDesiredSnapshot','_cmd','resolve','CHANGEFEED_QUANTUM','replace','reset','_hbTimer','fromEntries','path','ensureType','dead','worker','inspect','6737965hLwZZo','heapTotal','cluster','_buildChildRow','node','draining','put','ITEM_REMOVE','ready','slice','length','tryAcquire','start','reportThreadStats','value','_rawDb','rss','parse','INDEX_RESET'];_0x33d2=function(){return _0x15785d;};return _0x33d2();}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x3d0059=_0x74f0a9;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x1f9be7,performance:_0x1c95db}=require$$0,_0x17d124=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x3d0059(0x188),_0x5c550f=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x2b887f=process.env.OKDB_LOOP_LAG_ALL==='1',_0x3c9be7=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0xec9dc3{constructor(){const _0x23d42c=_0x3d0059;this[_0x23d42c(0x28e)]=_0x17d124,this['_buckets']=new Map(),this['_h']=null,this['_timer']=null,this['_started']=![],this[_0x23d42c(0xdb)]=(_0x3a3cae,_0x363e31)=>process[_0x23d42c(0x167)][_0x23d42c(0x218)](_0x3a3cae+(_0x363e31?'\x20'+JSON[_0x23d42c(0x210)](_0x363e31):'')+'\x0a');}['now'](){const _0x57e40c=_0x3d0059;return _0x1c95db[_0x57e40c(0x219)]();}[_0x3d0059(0x2a8)](_0x538265){const _0x3b7b20=_0x3d0059;if(typeof _0x538265===_0x3b7b20(0x226))this[_0x3b7b20(0xdb)]=_0x538265;}[_0x3d0059(0x220)](_0x25b292,_0x279e5b,_0x14d3e4){const _0x382317=_0x3d0059;if(!this[_0x382317(0x28e)])return;let _0x32b071=this[_0x382317(0x272)][_0x382317(0x195)](_0x25b292);!_0x32b071&&(_0x32b071={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x382317(0x272)][_0x382317(0x2bd)](_0x25b292,_0x32b071)),_0x32b071['ms']+=_0x279e5b,_0x32b071['count']+=0x1,_0x279e5b>_0x32b071['maxMs']&&(_0x32b071[_0x382317(0x2c2)]=_0x279e5b,_0x32b071[_0x382317(0x2e2)]=_0x14d3e4||'');}[_0x3d0059(0x1c6)](_0x2aa04a){const _0xc07884=_0x3d0059;if(!this[_0xc07884(0x28e)]||this[_0xc07884(0x2da)])return;this[_0xc07884(0x2da)]=!![];if(_0x2aa04a)this['_log']=_0x2aa04a;this['_h']=_0x1f9be7({'resolution':0xa}),this['_h'][_0xc07884(0x2d4)](),this[_0xc07884(0xef)]=setInterval(()=>this[_0xc07884(0xaf)](),_0x5c550f);if(this[_0xc07884(0xef)][_0xc07884(0x181)])this[_0xc07884(0xef)]['unref']();}[_0x3d0059(0x252)](_0x38c7a6){const _0x41e28e=_0x3d0059;if(!this[_0x41e28e(0x1a6)])this['_windowCbs']=new Set();this['_windowCbs'][_0x41e28e(0x156)](_0x38c7a6);if(!this[_0x41e28e(0x2da)])this[_0x41e28e(0x256)]();}['offWindow'](_0x30bb99){const _0x5c9bec=_0x3d0059;this[_0x5c9bec(0x1a6)]?.[_0x5c9bec(0x28d)](_0x30bb99);}[_0x3d0059(0x256)](){const _0x4091cd=_0x3d0059;if(this[_0x4091cd(0x122)])return;this['_admissionStarted']=!![];!this['_h']&&(this['_h']=_0x1f9be7({'resolution':0xa}),this['_h']['enable']());const _0x4a0a27=_0x5c550f;this[_0x4091cd(0x2cf)]=setInterval(()=>{const _0x29c128=_0x4091cd,_0x5e3706=this['_h'];if(!_0x5e3706)return;const _0x13d9c9=_0x5e3706[_0x29c128(0xcf)](0x63)/0xf4240,_0x4935b3=_0x5e3706['max']/0xf4240,_0x4107ec=_0x5e3706[_0x29c128(0x1ea)]/0xf4240;_0x5e3706[_0x29c128(0x1b2)]();if(this[_0x29c128(0x1a6)])for(const _0x47d3d7 of this[_0x29c128(0x1a6)]){try{_0x47d3d7({'p99Ms':_0x13d9c9,'maxMs':_0x4935b3,'meanMs':_0x4107ec,'reportMs':_0x4a0a27});}catch{}}},_0x4a0a27);if(this[_0x4091cd(0x2cf)][_0x4091cd(0x181)])this['_admissionTimer']['unref']();}[_0x3d0059(0xaf)](){const _0x852961=_0x3d0059,_0x3c14ae=this['_h'],_0x3e42c5=_0x3c14ae['max']/0xf4240,_0x460914=_0x3c14ae[_0x852961(0xcf)](0x63)/0xf4240,_0x3c5dec=_0x3c14ae[_0x852961(0x1ea)]/0xf4240;_0x3c14ae[_0x852961(0x1b2)]();const _0x2382fa=[...this[_0x852961(0x272)][_0x852961(0x198)]()]['map'](([_0x276e64,_0x4a1f7c])=>({'label':_0x276e64,..._0x4a1f7c}))[_0x852961(0x25a)]((_0x5b3c51,_0x5433a2)=>_0x5433a2['ms']-_0x5b3c51['ms'])[_0x852961(0x1c3)](0x0,0x8);this['_buckets'][_0x852961(0x211)]();const _0x7b0004=_0x2382fa[_0x852961(0x2a1)]((_0x55db80,_0xc42e2d)=>_0x55db80+_0xc42e2d['ms'],0x0),_0x2b8c52=_0x2382fa['map'](_0x345f7a=>_0x345f7a[_0x852961(0x28a)]+'='+_0x345f7a['ms'][_0x852961(0x255)](0x0)+_0x852961(0x17b)+_0x345f7a[_0x852961(0x161)]+(_0x345f7a['maxMs']>0x5?_0x852961(0x221)+_0x345f7a[_0x852961(0x2c2)][_0x852961(0x255)](0x0)+'ms'+(_0x345f7a[_0x852961(0x2e2)]?'\x20'+_0x345f7a[_0x852961(0x2e2)]:'')+')':''));(_0x2b887f||_0x3e42c5>=_0x3c9be7)&&this['_log']('loop-lag\x20'+_0x5c550f+_0x852961(0x13f)+_0x3e42c5[_0x852961(0x255)](0x0)+_0x852961(0xd5)+_0x460914[_0x852961(0x255)](0x0)+'ms\x20mean='+_0x3c5dec['toFixed'](0x0)+_0x852961(0x11f)+_0x7b0004[_0x852961(0x255)](0x0)+'ms'+(_0x2b8c52[_0x852961(0x1c4)]?_0x852961(0x2b4)+_0x2b8c52['join']('\x20\x20'):''),{'feature':_0x852961(0xb7)});if(this[_0x852961(0x1a6)])for(const _0x37b8eb of this['_windowCbs']){try{_0x37b8eb({'p99Ms':_0x460914,'maxMs':_0x3e42c5,'meanMs':_0x3c5dec,'reportMs':_0x5c550f});}catch{}}}[_0x3d0059(0x187)](){const _0x30ded6=_0x3d0059;if(this[_0x30ded6(0xef)])clearInterval(this[_0x30ded6(0xef)]);if(this['_h'])this['_h'][_0x30ded6(0x222)]();this[_0x30ded6(0xef)]=null,this['_h']=null,this[_0x30ded6(0x2da)]=![];}}const _0x29a307=new _0xec9dc3();if(_0x29a307[_0x3d0059(0x28e)])_0x29a307[_0x3d0059(0x1c6)]();return okdbLoopMonitor={'LOOP':_0x29a307},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x4523b4=require$$0$1,_0x520d5c=require$$1;let _0x43517d,_0x19ebef,_0x59524b,_0x126fa7,_0x54da5b,_0x1be9b0,_0x3f21dd,_0x5a8ed7=![];const _0x5b50df=new Set();let _0x467544=null;const _0x2e8397=new Map();function _0x2314ea(){const _0x27554b=_0x30d0;if(_0x43517d!==undefined)return _0x43517d;_0x43517d=process.env.OKDB_DIAG==='1';if(!_0x43517d)return![];_0x19ebef=process.env.OKDB_DIAG_STACK==='1',_0x126fa7=Math[_0x27554b(0x244)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x59524b=new Array(_0x126fa7),_0x54da5b=0x0,_0x1be9b0=0x0,_0x3f21dd=process.env.OKDB_DIAG_DIR||null;if(_0x3f21dd)try{_0x4523b4[_0x27554b(0x243)](_0x3f21dd,{'recursive':!![]});}catch{}return!![];}function _0x1ab510(){return _0x43517d===undefined?_0x2314ea():_0x43517d;}function _0x4b9a2d(_0x44cce5,_0x4bfd8f){const _0x568f88=_0x30d0;if(_0x43517d===undefined?!_0x2314ea():!_0x43517d)return;let _0x13e435;if(_0x19ebef){const _0xb06f05=new Error()[_0x568f88(0x245)]||'';_0x13e435=_0xb06f05[_0x568f88(0xcb)]('\x0a')[_0x568f88(0x1c3)](0x3)['map'](_0x429103=>_0x429103[_0x568f88(0x268)]())[_0x568f88(0x2d5)](Boolean)['slice'](0x0,0x8);}_0x59524b[_0x54da5b]={'seq':_0x1be9b0++,'t':Date[_0x568f88(0x219)](),'env':_0x44cce5,'kind':_0x4bfd8f||_0x568f88(0x2b8),'stack':_0x13e435},_0x54da5b=(_0x54da5b+0x1)%_0x126fa7;}function _0x4f75c5(_0x45fc53){const _0x48fcc8=_0x30d0,_0x212c98=[];for(let _0x56ddf5=0x0;_0x56ddf5<_0x126fa7;_0x56ddf5++){const _0x61e397=_0x59524b[(_0x54da5b-0x1-_0x56ddf5+_0x126fa7*0x2)%_0x126fa7];if(!_0x61e397)continue;_0x212c98[_0x48fcc8(0x2c1)](_0x61e397);if(_0x212c98[_0x48fcc8(0x1c4)]>=_0x45fc53)break;}return _0x212c98;}function _0x51d65e(_0x25bb84){const _0x2ca0d3=_0x30d0;try{process[_0x2ca0d3(0x167)][_0x2ca0d3(0x218)](_0x25bb84+'\x0a');}catch{}if(_0x3f21dd)try{_0x4523b4['appendFileSync'](_0x520d5c[_0x2ca0d3(0x1f9)](_0x3f21dd,'okdb-diag.'+process[_0x2ca0d3(0x2af)]+_0x2ca0d3(0x133)),_0x25bb84+'\x0a');}catch{}}function _0x13410a(_0x534d79){const _0x20392e=_0x30d0,_0xbdeb4d=_0x4f75c5(_0x534d79);if(!_0xbdeb4d[_0x20392e(0x1c4)])return'\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)';const _0x164b0b=Date[_0x20392e(0x219)]();return _0xbdeb4d[_0x20392e(0x284)](_0x4481d2=>{const _0x177e22=_0x20392e,_0x7fa882=_0x177e22(0x286)+_0x4481d2[_0x177e22(0x206)]+'\x20-'+(_0x164b0b-_0x4481d2['t'])+_0x177e22(0x138)+_0x4481d2[_0x177e22(0x134)]+'\x20'+_0x4481d2[_0x177e22(0x258)];return _0x4481d2[_0x177e22(0x245)]&&_0x4481d2[_0x177e22(0x245)][_0x177e22(0x1c4)]?_0x7fa882+_0x177e22(0xf2)+_0x4481d2[_0x177e22(0x245)][_0x177e22(0x1f9)](_0x177e22(0xf2)):_0x7fa882;})[_0x20392e(0x1f9)]('\x0a');}function _0x295f00(_0x158e72,_0x55022f){const _0x2c0767=_0x30d0,_0x522905=_0x2c0767(0x1a0)+_0x158e72+_0x2c0767(0x157)+new Date()[_0x2c0767(0x147)]()+_0x2c0767(0x1a8)+process[_0x2c0767(0x2af)]+_0x2c0767(0x250),_0x5aa24a=[_0x522905,_0x2c0767(0x22d)+(_0x55022f&&_0x55022f['stack']?_0x55022f['stack'][_0x2c0767(0xcb)]('\x0a')[0x0]:_0x55022f),'recent\x20writes\x20(newest\x20first)'+(_0x19ebef?'':_0x2c0767(0x149))+':',_0x13410a(0x18),_0x41e50e(),'='['repeat'](_0x522905[_0x2c0767(0x1c4)]-0x1)];_0x51d65e(_0x5aa24a[_0x2c0767(0x1f9)]('\x0a'));}function _0x30e2bc(_0x5e6ee7){const _0x44ae62=_0x30d0;if(!_0x1ab510())return;const _0x4716dc=String(_0x5e6ee7&&_0x5e6ee7['message']||_0x5e6ee7||''),_0x2ea36e=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x44ae62(0x1e8)](_0x4716dc);_0x295f00(_0x2ea36e?_0x44ae62(0xfa):'uncaughtException',_0x5e6ee7);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x2ea36e)return;try{console[_0x44ae62(0x192)](_0x5e6ee7&&_0x5e6ee7[_0x44ae62(0x245)]?_0x5e6ee7['stack']:_0x5e6ee7);}catch{}process[_0x44ae62(0x180)](0x1);}function _0x33709a(_0x432473){const _0x4f99be=_0x30d0;if(!_0x1ab510())return;const _0xd51ae5=String(_0x432473&&_0x432473[_0x4f99be(0x262)]||_0x432473||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x4f99be(0x1e8)](_0xd51ae5)&&_0x295f00(_0x4f99be(0x273),_0x432473);}function _0x41e50e(){const _0x14681d=_0x30d0,_0xc55977=[_0x14681d(0x19e)];let _0x195e21=![];for(const _0x328be7 of _0x5b50df){const _0x500a8a=_0x328be7&&_0x328be7[_0x14681d(0x267)];if(!_0x500a8a)continue;for(const [_0x2e446b,_0x2a6086]of _0x500a8a){const _0x21d074=_0x2a6086&&_0x2a6086[_0x14681d(0x1e4)]&&_0x2a6086[_0x14681d(0x1e4)][_0x14681d(0x29b)];if(!_0x21d074)continue;let _0x4991f9,_0x176a07;try{_0x4991f9=Atomics[_0x14681d(0x19a)](_0x21d074,0x0),_0x176a07=Atomics[_0x14681d(0x19a)](_0x21d074,0x1);}catch{continue;}if(_0x4991f9===0x0)continue;_0x195e21=!![];const _0x398bc2=_0x4991f9>0x0?_0x14681d(0x287):'copy',_0x3c025d=Date['now']()-Math['abs'](_0x4991f9)*0x3e8,_0x241385=((()=>{const _0x186f35=_0x14681d;try{return _0x2a6086[_0x186f35(0x1d5)]&&_0x2a6086[_0x186f35(0x1d5)][_0x186f35(0xed)]?_0x2a6086['_writer'][_0x186f35(0xed)]():null;}catch{return null;}})());_0xc55977['push'](_0x14681d(0xb3)+_0x2e446b+_0x14681d(0x22a)+_0x398bc2+_0x14681d(0x2b6)+_0x3c025d+_0x14681d(0x169)+_0x176a07+(_0x241385?_0x14681d(0x196)+_0x241385[_0x14681d(0x23e)]+_0x14681d(0xc6)+_0x241385[_0x14681d(0x2c5)]+'\x20parkedNow='+_0x241385[_0x14681d(0x12f)]+'}':''));}}if(!_0x195e21)_0xc55977[_0x14681d(0x2c1)](_0x14681d(0x29c));return _0xc55977[_0x14681d(0x1f9)]('\x0a');}function _0x2425d2(){const _0xc30693=_0x30d0;if(!_0x1ab510())return;const _0x475b61=Math[_0xc30693(0x244)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x178136=Date[_0xc30693(0x219)]();for(const _0x43cdd6 of _0x5b50df){const _0x2510e9=_0x43cdd6&&_0x43cdd6[_0xc30693(0x267)];if(!_0x2510e9)continue;for(const [_0x1b42b7,_0x17e42f]of _0x2510e9){const _0xd9d710=_0x17e42f&&_0x17e42f['_coordinator']&&_0x17e42f[_0xc30693(0x1e4)][_0xc30693(0x29b)];if(!_0xd9d710)continue;let _0x2e09ef;try{_0x2e09ef=Atomics[_0xc30693(0x19a)](_0xd9d710,0x0);}catch{continue;}const _0x401828=_0x43cdd6[_0xc30693(0x1b5)]+'|'+_0x1b42b7;if(_0x2e09ef<=0x0){_0x2e8397[_0xc30693(0x28d)](_0x401828);continue;}const _0x46f778=_0x178136-_0x2e09ef*0x3e8,_0x274e25=_0x2e8397['get'](_0x401828);if(_0x46f778<_0x475b61)continue;if(_0x274e25&&_0x178136-_0x274e25['dumpedAt']<_0x475b61)continue;_0x2e8397[_0xc30693(0x2bd)](_0x401828,{'firstTs':_0x274e25?_0x274e25[_0xc30693(0xba)]:_0x2e09ef,'dumpedAt':_0x178136});const _0x2a978a=_0xc30693(0x146)+_0x46f778+_0xc30693(0x10b)+_0x1b42b7+_0xc30693(0x157)+new Date()['toISOString']()+_0xc30693(0x1a8)+process[_0xc30693(0x2af)]+_0xc30693(0x250);_0x51d65e([_0x2a978a,_0x41e50e(),'='[_0xc30693(0x265)](_0x2a978a[_0xc30693(0x1c4)]-0x1)][_0xc30693(0x1f9)]('\x0a'));}}}function _0x507dd2(){const _0x3fa3f1=_0x30d0;if(!_0x1ab510()||_0x5a8ed7)return;_0x5a8ed7=!![],process[_0x3fa3f1(0x13c)](_0x3fa3f1(0xdd),_0x30e2bc),process['prependListener'](_0x3fa3f1(0x261),_0x33709a);const _0x2b0344=Math[_0x3fa3f1(0x244)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x467544=setInterval(_0x2425d2,_0x2b0344);if(_0x467544[_0x3fa3f1(0x181)])_0x467544[_0x3fa3f1(0x181)]();}function _0x37930b(_0x286827){const _0x6d0af9=_0x30d0;if(!_0x1ab510()||!_0x286827)return;_0x5b50df[_0x6d0af9(0x156)](_0x286827),_0x507dd2();}function _0x4723b6(_0x3b0751){const _0x4edf73=_0x30d0;_0x5b50df[_0x4edf73(0x28d)](_0x3b0751);}function _0x308b23(){if(!_0x1ab510())return{'enabled':![],'hint':'set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)'};return{'enabled':!![],'stackCapture':!!_0x19ebef,'recentWrites':_0x4f75c5(0x10),'drain':_0x41e50e()};}return okdbDiag={'isEnabled':_0x1ab510,'recordWrite':_0x4b9a2d,'installDiag':_0x507dd2,'registerOkdb':_0x37930b,'unregisterOkdb':_0x4723b6,'snapshot':_0x308b23},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x4ff54a=_0x74f0a9;if(hasRequiredOkdbWriter)return okdbWriter['exports'];hasRequiredOkdbWriter=0x1;const {performance:_0x5d733f}=require$$0$2,_0x157042=requireOkdbDiag(),_0xa50e87=process.env.OKDB_COMMIT_MODE===_0x4ff54a(0x173);class _0x3dfd5c{constructor(_0xb3f39e){const _0x1e52c7=_0x4ff54a;this['env']=_0xb3f39e,this[_0x1e52c7(0x18d)]=new Set(),this[_0x1e52c7(0x11a)]=new Map(),this[_0x1e52c7(0x1ce)]=0x0,this[_0x1e52c7(0x276)]=[],this[_0x1e52c7(0x2be)]=[],this[_0x1e52c7(0x16e)]=Math[_0x1e52c7(0x244)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x1e52c7(0x108)]=0x0,this[_0x1e52c7(0x1e6)]=[],this['_bpParkedTotal']=0x0,this[_0x1e52c7(0x1e9)]=null,this[_0x1e52c7(0x2d0)]=0x0,this[_0x1e52c7(0xee)]=0x0,this[_0x1e52c7(0x2d9)]=![];}async[_0x4ff54a(0x1a4)](_0x133332,_0x40bc49){const _0x552fb8=_0x4ff54a;if(_0x157042['isEnabled']())_0x157042[_0x552fb8(0x12e)](this[_0x552fb8(0x134)]?.[_0x552fb8(0x135)],_0x40bc49);if(this[_0x552fb8(0x2de)]){const _0x332e2e=new Error(_0x552fb8(0x1e5));_0x332e2e[_0x552fb8(0x163)]='ENV_CLOSING_RETRY';throw _0x332e2e;}if(this[_0x552fb8(0x16e)]>0x0){let _0x9fb1c9=![];while(this['_outstanding']>=this['_highWater']&&!this[_0x552fb8(0x2de)]){!_0x9fb1c9&&(_0x9fb1c9=!![],this[_0x552fb8(0x264)]++),await new Promise(_0x227b8c=>this[_0x552fb8(0x1e6)][_0x552fb8(0x2c1)](_0x227b8c));}if(this[_0x552fb8(0x2de)]){const _0x17d1c6=new Error(_0x552fb8(0x1e5));_0x17d1c6[_0x552fb8(0x163)]=_0x552fb8(0x18f);throw _0x17d1c6;}}this[_0x552fb8(0x108)]++;const _0x7c105a=this[_0x552fb8(0x134)][_0x552fb8(0x1e4)];for(;;){while(this[_0x552fb8(0x1e9)])await this[_0x552fb8(0x1e9)];if(_0x7c105a)await _0x7c105a[_0x552fb8(0x216)]();if(!this[_0x552fb8(0x1e9)])break;if(_0x7c105a)_0x7c105a[_0x552fb8(0x14e)]();}if(this[_0x552fb8(0x2de)]){if(_0x7c105a)_0x7c105a['afterWrite']();this[_0x552fb8(0x108)]--;if(this[_0x552fb8(0x1e6)][_0x552fb8(0x1c4)]&&this[_0x552fb8(0x108)]<this['_highWater'])this[_0x552fb8(0x1e6)][_0x552fb8(0x111)]()();const _0x4fb32a=new Error(_0x552fb8(0x1e5));_0x4fb32a[_0x552fb8(0x163)]=_0x552fb8(0x18f);throw _0x4fb32a;}const _0x53ebb4=_0x5d733f[_0x552fb8(0x219)]();if(_0xa50e87)try{const _0x2fc88f=this[_0x552fb8(0x134)]['db'][_0x552fb8(0x205)](_0x133332);this[_0x552fb8(0x1ce)]++;if(this[_0x552fb8(0x276)][_0x552fb8(0x2c1)](_0x5d733f['now']()-_0x53ebb4)>0x100)this[_0x552fb8(0x276)][_0x552fb8(0x111)]();if(this[_0x552fb8(0x2be)][_0x552fb8(0x2c1)](_0x5d733f[_0x552fb8(0x219)]())>0x800)this[_0x552fb8(0x2be)]['shift']();return _0x2fc88f;}finally{this['_outstanding']--;if(this['_bpWaiters'][_0x552fb8(0x1c4)]&&this['_outstanding']<this[_0x552fb8(0x16e)])this[_0x552fb8(0x1e6)]['shift']()();if(_0x7c105a)_0x7c105a['afterWrite']();}let _0x377784=null;const _0x1c30eb=()=>{const _0x10b3f0=_0x552fb8,_0x239876=_0x133332();if(_0x239876&&typeof _0x239876[_0x10b3f0(0x231)]===_0x10b3f0(0x226)&&!_0x377784){this[_0x10b3f0(0x2d0)]++;let _0x587809;const _0x5a857f=new Promise(_0x4124b7=>_0x587809=_0x4124b7);this['_held']=_0x5a857f,_0x377784=()=>{const _0x528ed1=_0x10b3f0;if(this['_held']===_0x5a857f)this[_0x528ed1(0x1e9)]=null;_0x587809();};}return _0x239876;};let _0x428c75;try{_0x428c75=this['env']['db'][_0x552fb8(0x136)](_0x1c30eb);}catch(_0x10dc3e){_0x428c75=Promise[_0x552fb8(0x131)](_0x10dc3e);}(!_0x428c75||typeof _0x428c75[_0x552fb8(0x231)]!==_0x552fb8(0x226))&&(this[_0x552fb8(0xee)]++,!this[_0x552fb8(0x2d9)]&&(this[_0x552fb8(0x2d9)]=!![],console[_0x552fb8(0x1dd)]('okdb-writer['+(this[_0x552fb8(0x134)]?.['name']??'?')+_0x552fb8(0x240))),_0x428c75=Promise[_0x552fb8(0x1af)](_0x428c75));const _0x2c4d00=()=>{if(_0x377784)_0x377784();};_0x428c75[_0x552fb8(0x231)](_0x2c4d00,_0x2c4d00),this['_inflight']['add'](_0x428c75),this[_0x552fb8(0x11a)][_0x552fb8(0x2bd)](_0x428c75,_0x53ebb4);const _0x474e54=()=>{const _0x4a1fad=_0x552fb8;this[_0x4a1fad(0x18d)]['delete'](_0x428c75),this[_0x4a1fad(0x11a)][_0x4a1fad(0x28d)](_0x428c75),this['_committed']++,this[_0x4a1fad(0x108)]--;this[_0x4a1fad(0x1e6)]['length']&&this[_0x4a1fad(0x108)]<this[_0x4a1fad(0x16e)]&&this['_bpWaiters'][_0x4a1fad(0x111)]()();if(this[_0x4a1fad(0x276)][_0x4a1fad(0x2c1)](_0x5d733f['now']()-_0x53ebb4)>0x100)this[_0x4a1fad(0x276)][_0x4a1fad(0x111)]();if(this[_0x4a1fad(0x2be)][_0x4a1fad(0x2c1)](_0x5d733f[_0x4a1fad(0x219)]())>0x800)this[_0x4a1fad(0x2be)][_0x4a1fad(0x111)]();};_0x428c75[_0x552fb8(0x231)](_0x474e54,_0x474e54);try{return await _0x428c75;}finally{if(_0x7c105a)_0x7c105a[_0x552fb8(0x14e)]();}}[_0x4ff54a(0xed)](){const _0x20cbf8=_0x4ff54a,_0x59b756=_0x5d733f['now']();let _0x2d71fc=0x0;for(const _0x5936a3 of this[_0x20cbf8(0x11a)][_0x20cbf8(0x251)]()){const _0x1224a4=_0x59b756-_0x5936a3;if(_0x1224a4>_0x2d71fc)_0x2d71fc=_0x1224a4;}let _0x2f1c08=0x0;for(let _0x467db1=this[_0x20cbf8(0x2be)]['length']-0x1;_0x467db1>=0x0;_0x467db1--){if(_0x59b756-this['_done'][_0x467db1]>0x3e8)break;_0x2f1c08++;}let _0x38bba4=0x0;if(this['_durs'][_0x20cbf8(0x1c4)]){const _0x3f10cc=[...this[_0x20cbf8(0x276)]][_0x20cbf8(0x25a)]((_0x11af12,_0x1a7ee9)=>_0x11af12-_0x1a7ee9);_0x38bba4=_0x3f10cc[Math[_0x20cbf8(0x203)](_0x3f10cc[_0x20cbf8(0x1c4)]-0x1,Math[_0x20cbf8(0x21c)](_0x3f10cc[_0x20cbf8(0x1c4)]*0.99))];}return{'depth':this[_0x20cbf8(0x18d)][_0x20cbf8(0xc4)],'oldestPendingMs':Math[_0x20cbf8(0x2c9)](_0x2d71fc),'committed':this[_0x20cbf8(0x1ce)],'commitsPerSec':_0x2f1c08,'commitP99Ms':Math[_0x20cbf8(0x2c9)](_0x38bba4),'parkedNow':this[_0x20cbf8(0x1e6)][_0x20cbf8(0x1c4)],'parkedTotal':this[_0x20cbf8(0x264)],'highWater':this[_0x20cbf8(0x16e)]};}[_0x4ff54a(0xb0)](){const _0xb72599=_0x4ff54a,_0x2b3f08=_0x5d733f['now']();return[...this['_enqueuedAt']['values']()][_0xb72599(0x284)](_0xdf40c2=>Math[_0xb72599(0x2c9)](_0x2b3f08-_0xdf40c2))[_0xb72599(0x25a)]((_0x503df8,_0x41b0d2)=>_0x41b0d2-_0x503df8);}[_0x4ff54a(0x26e)](){const _0x4e83a5=_0x4ff54a;this[_0x4e83a5(0x2de)]=!![];for(const _0x12efac of this['_bpWaiters'][_0x4e83a5(0xc0)](0x0))_0x12efac();}async[_0x4ff54a(0x142)](){const _0x4629a9=_0x4ff54a;let _0x31bb0a=0x0;while(this['_inflight']['size']&&_0x31bb0a++<0x3e8){await Promise[_0x4629a9(0xe9)]([...this[_0x4629a9(0x18d)]]);}}async[_0x4ff54a(0x1c0)](_0xa3fe0,_0x49699d,_0x599125,_0x347542){const _0x5b3a6a=_0x4ff54a;return this[_0x5b3a6a(0x1a4)](()=>{const _0x5728c7=_0x5b3a6a;if(_0x347542===undefined)_0xa3fe0[_0x5728c7(0xbc)](_0x49699d,_0x599125);else _0xa3fe0[_0x5728c7(0xbc)](_0x49699d,_0x599125,_0x347542);},'raw-put');}async[_0x4ff54a(0x12a)](_0x59b88a,_0x4cb4fe){const _0xfe78ac=_0x4ff54a;return this['transaction'](()=>_0x59b88a['removeSync'](_0x4cb4fe),_0xfe78ac(0x1fb));}}async function _0x2cb879(_0x4f98b6,_0x36737c){const _0x56bdfe=_0x4ff54a;if(_0x36737c==null)_0x36737c=Math['max'](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x31b291=_0x4f98b6?.[_0x56bdfe(0x107)];if(!_0x31b291||typeof _0x31b291[_0x56bdfe(0x231)]!==_0x56bdfe(0x226))return;await Promise[_0x56bdfe(0x1dc)]([Promise[_0x56bdfe(0x1af)](_0x31b291)[_0x56bdfe(0x17c)](()=>{}),new Promise(_0x2926cc=>{const _0x4426a8=_0x56bdfe,_0x4e7b71=setTimeout(_0x2926cc,_0x36737c);if(_0x4e7b71[_0x4426a8(0x181)])_0x4e7b71[_0x4426a8(0x181)]();})]);}catch{}}function _0x19b581(_0x53097a){const _0x5225bf=_0x4ff54a;if(_0xa50e87)return Promise[_0x5225bf(0x1af)]();const _0x337b78=_0x53097a?.[_0x5225bf(0x1fd)];return _0x337b78&&typeof _0x337b78[_0x5225bf(0x231)]===_0x5225bf(0x226)?_0x337b78:Promise[_0x5225bf(0x1af)]();}return okdbWriter[_0x4ff54a(0x271)]=_0x3dfd5c,okdbWriter[_0x4ff54a(0x271)][_0x4ff54a(0x10c)]=_0x2cb879,okdbWriter[_0x4ff54a(0x271)][_0x4ff54a(0x1fd)]=_0x19b581,okdbWriter['exports'][_0x4ff54a(0xc2)]=_0xa50e87,okdbWriter[_0x4ff54a(0x271)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0xacead1=_0x74f0a9;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x435b9c=require$$0$3,{SYNC_COMMITS:_0x44b48a}=requireOkdbWriter(),_0x3bed41=_0xacead1(0x1d1);class _0x38dbb6{constructor(_0x469a54,_0x1449a1,_0x46e036){const _0x1fb19a=_0xacead1;this[_0x1fb19a(0x1de)]=_0x469a54,this['_key']=_0x1449a1,this[_0x1fb19a(0x2b0)]=_0x46e036,this[_0x1fb19a(0x2cb)]=![],this[_0x1fb19a(0x1f8)]=null,this['_heartbeatInFlight']=null;}['isHeld'](){const _0x4bbea6=_0xacead1;if(this['_released'])return![];try{const _0x4d00f1=this[_0x4bbea6(0x1de)][_0x4bbea6(0x16f)]()[_0x4bbea6(0x195)](this[_0x4bbea6(0xc5)]);if(!_0x4d00f1||_0x4d00f1[_0x4bbea6(0x1d0)]!==this[_0x4bbea6(0x2b0)])return![];const _0x387cac=_0x4d00f1[_0x4bbea6(0x11c)]??_0x4d00f1['acquiredAt'];if(_0x387cac+_0x4d00f1[_0x4bbea6(0x1aa)]<Date[_0x4bbea6(0x219)]())return![];return!![];}catch{return!this[_0x4bbea6(0x2cb)];}}['holder'](){const _0x4428b7=_0xacead1;if(this[_0x4428b7(0x2cb)])return null;try{return this[_0x4428b7(0x1de)]['_db']()[_0x4428b7(0x195)](this['_key'])??null;}catch{return null;}}async['extend'](_0x585d4f){const _0xf89d75=_0xacead1;if(this[_0xf89d75(0x2cb)])return;try{const _0x15a11f=this[_0xf89d75(0x1de)][_0xf89d75(0x16f)]()['get'](this[_0xf89d75(0xc5)]);if(!_0x15a11f||_0x15a11f[_0xf89d75(0x1d0)]!==this[_0xf89d75(0x2b0)])return;if(_0x44b48a)this[_0xf89d75(0x1de)][_0xf89d75(0x16f)]()[_0xf89d75(0xbc)](this['_key'],{..._0x15a11f,'ttlMs':_0x15a11f[_0xf89d75(0x1aa)]+_0x585d4f});else await this[_0xf89d75(0x1de)][_0xf89d75(0x16f)]()[_0xf89d75(0x1c0)](this[_0xf89d75(0xc5)],{..._0x15a11f,'ttlMs':_0x15a11f[_0xf89d75(0x1aa)]+_0x585d4f});}catch{}}async['release'](){const _0x4e4b6b=_0xacead1;if(this[_0x4e4b6b(0x2cb)])return;if(this['_heartbeatInFlight'])try{await this[_0x4e4b6b(0x230)];}catch{}clearInterval(this[_0x4e4b6b(0x1f8)]),this[_0x4e4b6b(0x1f8)]=null,this[_0x4e4b6b(0x2cb)]=!![];try{const _0x2292be=this[_0x4e4b6b(0x1de)][_0x4e4b6b(0x16f)]()['get'](this['_key']);if(_0x2292be&&_0x2292be[_0x4e4b6b(0x1d0)]===this['_acquiredAt']){if(_0x44b48a)this[_0x4e4b6b(0x1de)][_0x4e4b6b(0x16f)]()[_0x4e4b6b(0x14c)](this[_0x4e4b6b(0xc5)]);else await this[_0x4e4b6b(0x1de)][_0x4e4b6b(0x16f)]()[_0x4e4b6b(0x12a)](this['_key']);}}catch{}}[_0xacead1(0x21d)](_0x4a0830,_0x4c01fe){const _0x1e4763=_0xacead1,_0x5d49ad=_0x4c01fe??Math[_0x1e4763(0x21c)](_0x4a0830/0x3);this[_0x1e4763(0x1f8)]=setInterval(()=>{if(this['_released'])return;this['_heartbeatInFlight']=((async()=>{const _0x1056ae=_0x30d0;try{const _0x150b7f=this[_0x1056ae(0x1de)][_0x1056ae(0x16f)]()[_0x1056ae(0x195)](this[_0x1056ae(0xc5)]);if(!_0x150b7f||_0x150b7f[_0x1056ae(0x1d0)]!==this[_0x1056ae(0x2b0)]){this[_0x1056ae(0x2cb)]=!![],clearInterval(this[_0x1056ae(0x1f8)]),this['_heartbeatTimer']=null;return;}if(_0x44b48a)this[_0x1056ae(0x1de)][_0x1056ae(0x16f)]()[_0x1056ae(0xbc)](this[_0x1056ae(0xc5)],{..._0x150b7f,'updatedAt':Date[_0x1056ae(0x219)]()});else await this[_0x1056ae(0x1de)][_0x1056ae(0x16f)]()[_0x1056ae(0x1c0)](this[_0x1056ae(0xc5)],{..._0x150b7f,'updatedAt':Date[_0x1056ae(0x219)]()});}catch{}this[_0x1056ae(0x230)]=null;})());},_0x5d49ad);if(this[_0x1e4763(0x1f8)]['unref'])this[_0x1e4763(0x1f8)][_0x1e4763(0x181)]();}}class _0x2ca7e9{constructor(_0x43e888,{namespace:_0x397825,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x15f8db=_0xacead1;this[_0x15f8db(0x1c9)]=_0x43e888,this[_0x15f8db(0x2e0)]=_0x397825,this[_0x15f8db(0x1aa)]=ttlMs,this[_0x15f8db(0x141)]=heartbeatMs,this[_0x15f8db(0x2e3)]=null;}[_0xacead1(0x16f)](){const _0x5d3a4b=_0xacead1;return!this['_lockDb']&&(this[_0x5d3a4b(0x2e3)]=this[_0x5d3a4b(0x1c9)][_0x5d3a4b(0x2b7)](_0x3bed41,{'dupSort':![]})),this[_0x5d3a4b(0x2e3)];}[_0xacead1(0xae)](){const _0xdd5ed3=_0xacead1;return!this['_wantDbHandle']&&(this[_0xdd5ed3(0x13b)]=this[_0xdd5ed3(0x1c9)][_0xdd5ed3(0x2b7)](_0x3bed41+_0xdd5ed3(0x277),{'dupSort':![]})),this[_0xdd5ed3(0x13b)];}[_0xacead1(0xc5)](_0x363b00){const _0x525d1c=_0xacead1;return this[_0x525d1c(0x2e0)]+':'+_0x363b00;}[_0xacead1(0x175)](_0x5d4599){const _0xa723d0=_0xacead1;try{_0x44b48a?this[_0xa723d0(0xae)]()[_0xa723d0(0xbc)](this['_key'](_0x5d4599),Date[_0xa723d0(0x219)]()):this[_0xa723d0(0xae)]()[_0xa723d0(0x1c0)](this[_0xa723d0(0xc5)](_0x5d4599),Date[_0xa723d0(0x219)]())?.[_0xa723d0(0x17c)]?.(()=>{});}catch{}}['isWanted'](_0xc9fc73,_0x1a97f8=0x3e8){const _0x19d9d0=_0xacead1;try{const _0x2719ae=this[_0x19d9d0(0xae)]()[_0x19d9d0(0x195)](this['_key'](_0xc9fc73));return typeof _0x2719ae==='number'&&Date['now']()-_0x2719ae<_0x1a97f8;}catch{return![];}}[_0xacead1(0x297)](_0x4827fa){const _0x26531b=_0xacead1,_0x375a0f=_0x4827fa[_0x26531b(0x11c)]??_0x4827fa[_0x26531b(0x1d0)];return _0x375a0f+_0x4827fa[_0x26531b(0x1aa)]<Date[_0x26531b(0x219)]();}static[_0xacead1(0x16b)](_0xc94f9a){const _0xacf3c2=_0xacead1,_0x581a69=_0xc94f9a?.['holder'];if(!_0x581a69||typeof _0x581a69[_0xacf3c2(0x2af)]!=='number')return![];if(_0x581a69[_0xacf3c2(0x270)]!==_0x435b9c[_0xacf3c2(0x270)]())return![];if(_0x581a69[_0xacf3c2(0x2af)]===process['pid'])return![];try{return process[_0xacf3c2(0x1ff)](_0x581a69[_0xacf3c2(0x2af)],0x0),![];}catch(_0x551029){return _0x551029[_0xacf3c2(0x163)]===_0xacf3c2(0xbb);}}async[_0xacead1(0x1c5)](_0x16b623,_0x451e72={},_0x8c8a5b={}){const _0x26f2e2=_0xacead1,_0x26b428=this[_0x26f2e2(0xc5)](_0x16b623),_0x404224=_0x8c8a5b[_0x26f2e2(0x1aa)]??this[_0x26f2e2(0x1aa)],_0x1b6974=Date['now'](),_0x317635={'holder':{'pid':process[_0x26f2e2(0x2af)],'hostname':_0x435b9c[_0x26f2e2(0x270)](),..._0x451e72},'acquiredAt':_0x1b6974,'updatedAt':_0x1b6974,'ttlMs':_0x404224};let _0x56fad8=![],_0x50326f=null;try{const _0x3a3bae=()=>{const _0x4b7964=_0x26f2e2,_0x14053d=this[_0x4b7964(0x16f)]()[_0x4b7964(0x195)](_0x26b428);if(_0x14053d&&!this[_0x4b7964(0x297)](_0x14053d)&&!_0x2ca7e9[_0x4b7964(0x16b)](_0x14053d)){const _0x1fd16e=_0x451e72['processorId']!=null&&_0x14053d[_0x4b7964(0x280)][_0x4b7964(0x2af)]===process[_0x4b7964(0x2af)]&&_0x14053d[_0x4b7964(0x280)]['processorId']===_0x451e72[_0x4b7964(0x160)];if(!_0x1fd16e){_0x56fad8=![],_0x50326f=_0x14053d;return;}_0x317635[_0x4b7964(0x1d0)]<=_0x14053d[_0x4b7964(0x1d0)]&&(_0x317635[_0x4b7964(0x1d0)]=_0x14053d[_0x4b7964(0x1d0)]+0x1,_0x317635[_0x4b7964(0x11c)]=_0x317635[_0x4b7964(0x1d0)]);}this[_0x4b7964(0x16f)]()['put'](_0x26b428,_0x317635),_0x56fad8=!![],_0x50326f=_0x317635;};if(_0x44b48a)this['_db']()['transactionSync'](_0x3a3bae);else await this[_0x26f2e2(0x16f)]()[_0x26f2e2(0x136)](_0x3a3bae);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x56fad8)return{'acquired':![],'handle':null,'current':_0x50326f};const _0x6dfea8=new _0x38dbb6(this,_0x26b428,_0x317635[_0x26f2e2(0x1d0)]);return _0x6dfea8['_startHeartbeat'](_0x404224,this['heartbeatMs']),{'acquired':!![],'handle':_0x6dfea8,'current':_0x50326f};}[_0xacead1(0x1b9)](_0x2b8f51){const _0x42a00d=_0xacead1;try{return this[_0x42a00d(0x16f)]()[_0x42a00d(0x195)](this[_0x42a00d(0xc5)](_0x2b8f51))??null;}catch{return null;}}[_0xacead1(0xc3)](){const _0x2ab29d=_0xacead1,_0x29e1a3=this[_0x2ab29d(0x2e0)]+':',_0x3cb758=[];try{for(const {key:_0x5f94c1,value:_0x5cfea2}of this[_0x2ab29d(0x16f)]()[_0x2ab29d(0x27d)]({'start':_0x29e1a3,'end':_0x29e1a3+'\xff'})){typeof _0x5f94c1===_0x2ab29d(0x24d)&&_0x5f94c1[_0x2ab29d(0x1f1)](_0x29e1a3)&&_0x3cb758[_0x2ab29d(0x2c1)]({'id':_0x5f94c1[_0x2ab29d(0x1c3)](_0x29e1a3[_0x2ab29d(0x1c4)]),'entry':_0x5cfea2});}}catch{}return _0x3cb758;}static[_0xacead1(0x1ec)](_0x3196fb){const _0x41875c=_0xacead1,_0x1c5ed3=[];try{const _0x17a06c=_0x3196fb[_0x41875c(0x2b7)](_0x3bed41,{'dupSort':![]});for(const {key:_0x163d84,value:_0x31154e}of _0x17a06c[_0x41875c(0x27d)]({})){if(typeof _0x163d84!==_0x41875c(0x24d))continue;const _0x2e8b06=_0x163d84[_0x41875c(0x2a3)](':');if(_0x2e8b06<0x1)continue;_0x1c5ed3[_0x41875c(0x2c1)]({'namespace':_0x163d84[_0x41875c(0x1c3)](0x0,_0x2e8b06),'id':_0x163d84[_0x41875c(0x1c3)](_0x2e8b06+0x1),'entry':_0x31154e});}}catch{}return _0x1c5ed3;}}return okdbLock={'OKDBLock':_0x2ca7e9},okdbLock;}var version='2.3.2',require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x4779c3=_0x74f0a9;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x2d0bfc=require$$0$3,_0x1b3070=require$$1$1,_0x47ce0f=require$$2,{LOOP:_0x3cd62f}=requireOkdbLoopMonitor(),{OKDBLock:_0x1e5cb6}=requireOkdbLock(),{SYNC_COMMITS:_0x2c6821}=requireOkdbWriter(),_0x1359c9=_0x4779c3(0xce),_0x341fee=_0x4779c3(0x1be),_0x257a11='~processes:desired',_0x38d988=_0x4779c3(0x25e),_0x5d03f6=(_0xbb77aa,_0x476696)=>_0xbb77aa+':'+_0x476696,_0x2516a2=(_0x58a4c9,_0x104e42)=>_0x58a4c9+'::'+_0x104e42,_0x1a1470=(_0xaa0fc3,_0x5efc21)=>_0xaa0fc3+'/'+_0x5efc21,_0x5ea47f=(_0x30c801,_0x4a3567)=>_0x30c801+'#'+_0x4a3567,_0x2017b5=_0x23da81=>{const _0x1345d1=_0x4779c3;if(_0x23da81?.['processKey'])return _0x23da81['processKey'];const _0x2042b5=_0x23da81?.[_0x1345d1(0x2c7)];return typeof _0x2042b5===_0x1345d1(0x24d)&&_0x2042b5['includes']('#')?_0x2042b5[_0x1345d1(0x1c3)](0x0,_0x2042b5[_0x1345d1(0x2a3)]('#')):_0x2042b5;},_0x5e18a7=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x140074=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x24b71d=_0x5e18a7*0x3,_0x261f92=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math['max'](0x927c0,_0x24b71d*0x14),_0x5dc771=[_0x4779c3(0xc8),_0x4779c3(0x121),_0x4779c3(0x1a2),_0x4779c3(0xc9),_0x4779c3(0x13e),_0x4779c3(0x14f)];let _0x54bcf0=null;function _0x1a95fa(){const _0x35150a=_0x4779c3;if(_0x54bcf0==null)_0x54bcf0=Math['round']((Date[_0x35150a(0x219)]()-process[_0x35150a(0x25d)]()*0x3e8)/0x3e8)*0x3e8;return _0x54bcf0;}function _0x10c631(_0x3a551e){const _0x30c2fd=_0x4779c3;if(process.env.OKDB_PROCESS_KILL===_0x30c2fd(0x193))return![];if(_0x3a551e?.[_0x30c2fd(0x13a)]?.[_0x30c2fd(0x182)]&&typeof _0x3a551e['options'][_0x30c2fd(0x182)]===_0x30c2fd(0x112)&&_0x3a551e[_0x30c2fd(0x13a)][_0x30c2fd(0x182)][_0x30c2fd(0x1ff)]===![])return![];return!![];}function _0xed25af(_0x5b3046,_0x5cd169){const _0x421d55=_0x4779c3,_0x24163a=!!_0x5cd169?.['processors'];switch(_0x5b3046){case'primary':return{'controllable':_0x24163a,'decommissionable':![],'killable':!![],'killConfirm':_0x421d55(0x239)};case _0x421d55(0x2b3):case _0x421d55(0x14a):return{'controllable':_0x24163a,'decommissionable':![],'killable':!![],'killConfirm':_0x421d55(0x23f)};case _0x421d55(0x10a):return{'controllable':![],'decommissionable':![],'killable':![]};case'http-server':case'queue-worker':case _0x421d55(0x16a):case _0x421d55(0x1b8):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x421d55(0x194)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x14bf54{constructor(_0x242415){const _0x2a31ff=_0x4779c3;this['okdb']=_0x242415,this['_statusEnv']=null,this[_0x2a31ff(0xe3)]=null,this['_desiredOverlay']=new Map(),this[_0x2a31ff(0x1ae)]=null,this[_0x2a31ff(0x166)]=![],this[_0x2a31ff(0xa8)]=![],this[_0x2a31ff(0x110)]=_0x1a95fa(),this[_0x2a31ff(0x1ed)]=_0x5d03f6(process[_0x2a31ff(0x2af)],this['_processStartedAt']),this[_0x2a31ff(0x2d6)]=_0x47ce0f[_0x2a31ff(0xec)]()[_0x2a31ff(0x1c3)](0x0,0x8),this[_0x2a31ff(0x29e)]=_0x5ea47f(this[_0x2a31ff(0x1ed)],this[_0x2a31ff(0x2d6)]),this[_0x2a31ff(0x2b2)]=Date[_0x2a31ff(0x219)](),this['_kind']=null,this[_0x2a31ff(0x119)]=null,this['_listenAddr']=null,this['_hbTimer']=null,this[_0x2a31ff(0xe2)]=null,this[_0x2a31ff(0x26d)]=null,this[_0x2a31ff(0xfc)]=0x0,this[_0x2a31ff(0x296)]={},this[_0x2a31ff(0x227)]=new Map(),this['_lastCpuUsage']=process[_0x2a31ff(0x191)](),this[_0x2a31ff(0x10e)]=Date[_0x2a31ff(0x219)](),this[_0x2a31ff(0xcc)]=0x0,this[_0x2a31ff(0x18b)]=new Map();}get[_0x4779c3(0x183)](){return this['_selfKey'];}get[_0x4779c3(0xfd)](){return this['_rowKey'];}[_0x4779c3(0x197)](_0x21ed35,_0x1d0533){const _0x3a9f6b=_0x4779c3,_0x5eee0f=_0xed25af(_0x21ed35,_0x1d0533);if(_0x5eee0f[_0x3a9f6b(0x299)]&&!_0x10c631(this[_0x3a9f6b(0x217)]))return{..._0x5eee0f,'killable':![],'killConfirm':undefined};return _0x5eee0f;}[_0x4779c3(0xdf)](){const _0x2bd220=_0x4779c3;return!!this[_0x2bd220(0x14d)];}[_0x4779c3(0xac)](_0x44c2f3){Object['assign'](this['_ownMeta'],_0x44c2f3||{});}[_0x4779c3(0xf8)](_0xb66fbd){const _0x48f086=_0x4779c3;if(_0xb66fbd)this[_0x48f086(0x154)]=_0xb66fbd;}['register'](_0x258926={}){const _0x5cacce=_0x4779c3;return this['okdb'][_0x5cacce(0x23c)](_0x258926);}[_0x4779c3(0x28b)](){const _0x3424e4=_0x4779c3,_0x328142={};let _0x1f1320=0x0,_0x3a8e55=0x0;const _0x14c372=new Set();for(const _0x15453f of this['listNodes']()){_0x3a8e55++;const _0x3430d9=_0x15453f[_0x3424e4(0xf4)];if(!_0x3430d9)continue;if(_0x3430d9[_0x3424e4(0x15c)])_0x1f1320++;for(const _0x5eab94 of _0x3430d9[_0x3424e4(0x124)]||[]){if(![_0x3424e4(0x116),_0x3424e4(0x13d)][_0x3424e4(0x2a9)](_0x5eab94[_0x3424e4(0xca)]))continue;(_0x5eab94[_0x3424e4(0x2a0)]===_0x3424e4(0x125)||_0x5eab94['state']===_0x3424e4(0x298))&&_0x5eab94[_0x3424e4(0x126)]&&_0x14c372['add']((_0x5eab94[_0x3424e4(0x134)]||'default')+':'+_0x5eab94[_0x3424e4(0x126)]);const _0x258848=_0x5eab94[_0x3424e4(0x134)]||_0x3424e4(0x2a6);(_0x328142[_0x258848]||=[])[_0x3424e4(0x2c1)]({..._0x5eab94,'env':_0x258848,'owner':{'pid':_0x15453f[_0x3424e4(0x2af)]??null,'kind':_0x15453f[_0x3424e4(0x258)]??null}});}}for(const [_0x2ec3e2,_0x568cbe]of Object['entries'](_0x328142)){for(const _0x163220 of _0x568cbe){if(_0x163220[_0x3424e4(0xca)]===_0x3424e4(0x116)&&!_0x163220[_0x3424e4(0x232)]){const _0x4d43e4=_0x2ec3e2+':'+(_0x163220[_0x3424e4(0x126)]??'');if(!_0x14c372[_0x3424e4(0x1cd)](_0x4d43e4))_0x163220[_0x3424e4(0x25b)]=!![];}}}return{'envs':_0x328142,'policy':null,'participation':{'participating':_0x1f1320,'total':_0x3a8e55},'source':_0x3424e4(0x26f)};}[_0x4779c3(0x16d)](){const _0x40c140=_0x4779c3,_0xeb5e9=_0x2040ae=>{const _0x1be4d2=_0x30d0;if(_0x2040ae[_0x1be4d2(0x2a0)]===_0x1be4d2(0x125)||_0x2040ae['state']===_0x1be4d2(0x298)||_0x2040ae['state']===_0x1be4d2(0x192))return 0x3;if(_0x2040ae[_0x1be4d2(0x232)])return 0x1;return 0x2;},_0x374f62=new Map();for(const _0x59020b of this['listNodes']()){for(const _0x24065a of _0x59020b[_0x40c140(0xf4)]?.['processors']||[]){const _0x2127c9={..._0x24065a,'owner':{'pid':_0x59020b['pid']??null,'kind':_0x59020b['kind']??null,'host':_0x59020b[_0x40c140(0x127)]??null}},_0x438f57=_0x24065a[_0x40c140(0xca)]===_0x40c140(0x116)?_0x40c140(0x1da)+(_0x24065a[_0x40c140(0x134)]??'')+'::'+(_0x24065a[_0x40c140(0x126)]??_0x24065a['type']??_0x24065a['id']):_0x40c140(0x207)+(_0x59020b[_0x40c140(0x2c7)]??_0x59020b[_0x40c140(0x1f7)]??'')+'::'+(_0x24065a[_0x40c140(0x134)]??'')+'::'+_0x24065a['id'],_0x5b7601=_0x374f62[_0x40c140(0x195)](_0x438f57);if(!_0x5b7601||_0xeb5e9(_0x2127c9)>_0xeb5e9(_0x5b7601))_0x374f62['set'](_0x438f57,_0x2127c9);}}return[..._0x374f62['values']()];}[_0x4779c3(0x1a5)](){const _0x1cd2aa=_0x4779c3,_0xeed1b6=Date['now'](),_0x38ab7f=this[_0x1cd2aa(0x275)](),_0x335ccf=_0x4fbaec=>Math[_0x1cd2aa(0x244)](0x0,Math[_0x1cd2aa(0x2c9)]((_0xeed1b6-(_0x4fbaec[_0x1cd2aa(0x254)]||_0xeed1b6))/0x3e8)),_0x2fb6c3=_0x38ab7f['find'](_0x3d1198=>_0x3d1198[_0x1cd2aa(0x258)]==='primary'),_0x47004e=_0x38ab7f[_0x1cd2aa(0x2d5)](_0x44776a=>_0x44776a[_0x1cd2aa(0x258)]===_0x1cd2aa(0x1e1));if(_0x2fb6c3||_0x47004e['length'])return{'primary':_0x2fb6c3?{'pid':_0x2fb6c3[_0x1cd2aa(0x2af)],'uptime':_0x335ccf(_0x2fb6c3)}:null,'workers':_0x47004e[_0x1cd2aa(0x284)](_0x33fd92=>({'pid':_0x33fd92[_0x1cd2aa(0x2af)],'uptime':_0x335ccf(_0x33fd92)})),'workersConfigured':_0x2fb6c3?.['meta']?.[_0x1cd2aa(0xb4)]??_0x47004e[_0x1cd2aa(0x1c4)],'mode':_0x1cd2aa(0x1bc)};const _0x3c41a1=_0x38ab7f[_0x1cd2aa(0x14b)](_0x21fd4f=>_0x21fd4f[_0x1cd2aa(0x258)]==='cli'||_0x21fd4f[_0x1cd2aa(0x258)]==='standalone'||_0x21fd4f[_0x1cd2aa(0x258)]==='embedded'),_0xec7038=_0x3c41a1?{'pid':_0x3c41a1[_0x1cd2aa(0x2af)],'uptime':_0x335ccf(_0x3c41a1)}:{'pid':process[_0x1cd2aa(0x2af)],'uptime':Math[_0x1cd2aa(0x244)](0x0,Math[_0x1cd2aa(0x2c9)](process['uptime']()))};return{'primary':_0xec7038,'workers':[_0xec7038],'workersConfigured':0x1,'mode':_0x1cd2aa(0x116)};}[_0x4779c3(0x294)](){const _0x2ef482=_0x4779c3;return this[_0x2ef482(0x238)]();}['treeView'](){const _0x46720e=_0x4779c3,_0x5cfc99=new Map();for(const _0x5d740e of this[_0x46720e(0x238)]())_0x5cfc99['set'](_0x5d740e[_0x46720e(0x1f7)],{..._0x5d740e,'children':[]});const _0x58616a=[];for(const _0x4c2276 of _0x5cfc99[_0x46720e(0x251)]()){const _0x41966e=_0x4c2276[_0x46720e(0x20b)]?_0x5cfc99[_0x46720e(0x195)](_0x4c2276[_0x46720e(0x20b)]):null;if(_0x41966e&&_0x41966e!==_0x4c2276)_0x41966e[_0x46720e(0x11b)][_0x46720e(0x2c1)](_0x4c2276);else _0x58616a[_0x46720e(0x2c1)](_0x4c2276);}const _0x4296fd=(_0x2b13a7,_0x4a44f1)=>_0x2b13a7[_0x46720e(0x258)]===_0x4a44f1[_0x46720e(0x258)]?(_0x2b13a7[_0x46720e(0x2af)]||0x0)-(_0x4a44f1[_0x46720e(0x2af)]||0x0):(_0x2b13a7['kind']??'')<(_0x4a44f1['kind']??'')?-0x1:0x1,_0xb09ba=_0xcade0=>{const _0x1a44a1=_0x46720e;_0xcade0[_0x1a44a1(0x25a)](_0x4296fd);for(const _0xd728c6 of _0xcade0)if(_0xd728c6[_0x1a44a1(0x11b)][_0x1a44a1(0x1c4)])_0xb09ba(_0xd728c6['children']);};return _0xb09ba(_0x58616a),_0x58616a;}[_0x4779c3(0x21b)](_0x49e461){const _0x358832=_0x4779c3;return this[_0x358832(0x238)]()[_0x358832(0x14b)](_0x149c54=>_0x149c54[_0x358832(0x1f7)]===_0x49e461)??null;}['_groupByProcess'](_0x2f3877=Date[_0x4779c3(0x219)]()){const _0x44fa0a=_0x4779c3,_0x461589=new Map();for(const _0x511d56 of this[_0x44fa0a(0x275)]()){const _0x111feb=_0x2017b5(_0x511d56);let _0x15e462=_0x461589[_0x44fa0a(0x195)](_0x111feb);!_0x15e462&&(_0x15e462={'processKey':_0x111feb,'nodeKey':_0x111feb,'pid':_0x511d56[_0x44fa0a(0x2af)],'ppid':_0x511d56[_0x44fa0a(0x2b1)]??null,'host':_0x511d56[_0x44fa0a(0x127)]??null,'kind':_0x511d56[_0x44fa0a(0x258)],'role':null,'supervisorKey':_0x511d56['supervisorKey']??null,'slot':_0x511d56[_0x44fa0a(0x199)]??null,'slotKey':_0x511d56[_0x44fa0a(0x129)]??null,'caps':_0x511d56[_0x44fa0a(0x2aa)]??null,'lifecycle':_0x511d56[_0x44fa0a(0xb8)]??null,'uptime':Math[_0x44fa0a(0x244)](0x0,Math[_0x44fa0a(0x2c9)]((_0x2f3877-(_0x511d56[_0x44fa0a(0x254)]||_0x2f3877))/0x3e8)),'startedAt':_0x511d56[_0x44fa0a(0x254)]??null,'meta':_0x511d56['meta']??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x461589[_0x44fa0a(0x2bd)](_0x111feb,_0x15e462));_0x15e462[_0x44fa0a(0x178)][_0x44fa0a(0x2c1)]({'instanceId':_0x511d56[_0x44fa0a(0x202)]??null,'role':_0x511d56['role']??null,'listenAddr':_0x511d56['listenAddr']??null,'lifecycle':_0x511d56[_0x44fa0a(0xb8)]??null,'processing':_0x511d56['processing']??null});if(!_0x15e462['role']&&_0x511d56[_0x44fa0a(0x140)])_0x15e462['role']=_0x511d56[_0x44fa0a(0x140)];if(!_0x15e462[_0x44fa0a(0x130)]&&_0x511d56[_0x44fa0a(0x130)])_0x15e462[_0x44fa0a(0x130)]=_0x511d56[_0x44fa0a(0x130)];if(!_0x15e462['processing']&&_0x511d56[_0x44fa0a(0xf4)])_0x15e462[_0x44fa0a(0xf4)]=_0x511d56[_0x44fa0a(0xf4)];if(!_0x15e462[_0x44fa0a(0x20e)]&&_0x511d56[_0x44fa0a(0x20e)])_0x15e462[_0x44fa0a(0x20e)]=_0x511d56[_0x44fa0a(0x20e)];if(!_0x15e462[_0x44fa0a(0x179)]&&_0x511d56[_0x44fa0a(0x179)])_0x15e462[_0x44fa0a(0x179)]=_0x511d56['singletonClaims'];if(_0x15e462[_0x44fa0a(0x2aa)]==null&&_0x511d56[_0x44fa0a(0x2aa)])_0x15e462[_0x44fa0a(0x2aa)]=_0x511d56['caps'];if(_0x511d56[_0x44fa0a(0x266)]&&(!_0x15e462[_0x44fa0a(0x266)]||(_0x511d56['stats']['at']??0x0)>(_0x15e462['stats']['at']??0x0)))_0x15e462[_0x44fa0a(0x266)]=_0x511d56['stats'];}return[..._0x461589[_0x44fa0a(0x251)]()];}['runtimeProcessesView'](){const _0x26deff=_0x4779c3,_0xc83056=[],_0x5ec3cf={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x41a097 of this[_0x26deff(0x238)]()){_0xc83056[_0x26deff(0x2c1)]({'processKey':_0x41a097['processKey'],'kind':_0x41a097[_0x26deff(0x258)],'pid':_0x41a097[_0x26deff(0x2af)],'supervisorKey':_0x41a097[_0x26deff(0x20b)],'meta':_0x41a097['meta']??null,'uptime':_0x41a097[_0x26deff(0x25d)],'stats':_0x41a097[_0x26deff(0x266)]??null}),_0x5ec3cf[_0x26deff(0x182)]++;if(_0x41a097[_0x26deff(0x266)]){_0x5ec3cf[_0x26deff(0x1ca)]+=_0x41a097[_0x26deff(0x266)][_0x26deff(0x1ca)]||0x0,_0x5ec3cf[_0x26deff(0xa9)]+=(_0x41a097[_0x26deff(0x266)][_0x26deff(0xa9)]||0x0)+(_0x41a097[_0x26deff(0x266)]['threads']?.['heapUsed']||0x0);const _0x966afe=_0x41a097[_0x26deff(0x266)][_0x26deff(0x263)];_0x966afe&&(_0x5ec3cf[_0x26deff(0x263)]['count']+=_0x966afe[_0x26deff(0x161)]||0x0,_0x5ec3cf['threads'][_0x26deff(0x228)]+=_0x966afe[_0x26deff(0x228)]||0x0,_0x5ec3cf[_0x26deff(0x263)][_0x26deff(0x249)]+=_0x966afe[_0x26deff(0x249)]||0x0);}}return{'totals':_0x5ec3cf,'nodes':_0xc83056};}async[_0x4779c3(0xd6)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x3b018e=_0x4779c3;this['_isWriter']=this[_0x3b018e(0x166)]||!!writer,this[_0x3b018e(0xa8)]=this[_0x3b018e(0xa8)]||!!reader,this[_0x3b018e(0x128)]=kind||this[_0x3b018e(0x128)]||(_0x1b3070[_0x3b018e(0xe5)]?_0x3b018e(0x1e1):'cli'),this[_0x3b018e(0x119)]=supervisorKey??this['_supervisorKey'],this[_0x3b018e(0x154)]=listenAddr??this[_0x3b018e(0x154)],this[_0x3b018e(0x2b5)](),await this[_0x3b018e(0x2a5)]();if(!writer&&!reader)return null;if(!this[_0x3b018e(0x14d)]){const _0x45b804=await this['okdb'][_0x3b018e(0x224)](_0x1359c9,{'sync':![],'durability':'fast'});await _0x45b804[_0x3b018e(0x1b6)](_0x341fee),this[_0x3b018e(0x14d)]=_0x45b804;}return this[_0x3b018e(0x14d)];}[_0x4779c3(0xbd)](){const _0x22fad8=_0x4779c3;return this[_0x22fad8(0x1f5)]!==this[_0x22fad8(0x14d)]&&(this['_nodeDbFor']=this[_0x22fad8(0x14d)],this[_0x22fad8(0x117)]=this['_statusEnv'][_0x22fad8(0x295)](_0x341fee)[_0x22fad8(0xf9)]),this[_0x22fad8(0x117)];}['_putRowAsync'](_0x15895a){const _0x10828b=_0x4779c3;if(_0x2c6821)return this[_0x10828b(0xbd)]()['putSync'](_0x15895a['nodeKey'],_0x15895a,0x1);const _0x5f20ec=this[_0x10828b(0xbd)]()[_0x10828b(0x1c0)](_0x15895a['nodeKey'],_0x15895a,0x1);if(_0x5f20ec&&typeof _0x5f20ec[_0x10828b(0x231)]===_0x10828b(0x226))_0x5f20ec['then'](undefined,()=>{});return _0x5f20ec;}[_0x4779c3(0x1db)](_0x4a99fd){const _0x4aa8e3=_0x4779c3;return this[_0x4aa8e3(0xbd)]()[_0x4aa8e3(0xbc)](_0x4a99fd[_0x4aa8e3(0x2c7)],_0x4a99fd,0x1);}[_0x4779c3(0x22f)](_0x386faf){const _0x1200b7=_0x4779c3;if(_0x2c6821)try{return this['_nodeDb']()[_0x1200b7(0x14c)](_0x386faf);}catch{return![];}const _0x567249=this[_0x1200b7(0xbd)]()[_0x1200b7(0x12a)](_0x386faf);if(_0x567249&&typeof _0x567249[_0x1200b7(0x231)]===_0x1200b7(0x226))_0x567249[_0x1200b7(0x231)](undefined,()=>{});return _0x567249;}async[_0x4779c3(0x1ac)](_0x22124d){const _0x2fc252=_0x4779c3;if(!this[_0x2fc252(0x14d)]||!this[_0x2fc252(0x166)]||!_0x22124d?.[_0x2fc252(0x2c7)])return;return this[_0x2fc252(0x223)](_0x22124d);}async[_0x4779c3(0xf0)](_0x1eb063){const _0x193631=_0x4779c3;if(!this[_0x193631(0x14d)]||!this[_0x193631(0x166)]||!_0x1eb063)return;const _0x373ad9=_0x1eb063[_0x193631(0x2a9)]('#'),_0x202ea1=[];for(const {key:_0x5d289e}of this[_0x193631(0x14d)][_0x193631(0x27d)](_0x341fee)){if(_0x5d289e===_0x1eb063||!_0x373ad9&&typeof _0x5d289e===_0x193631(0x24d)&&_0x5d289e[_0x193631(0x1f1)](_0x1eb063+'#'))_0x202ea1[_0x193631(0x2c1)](_0x5d289e);}for(const _0xcde788 of _0x202ea1){try{this['_nodeDb']()['removeSync'](_0xcde788);}catch{}}}['_nodeDead'](_0x5ae3d2){const _0x1db41a=_0x4779c3;if(typeof _0x5ae3d2?.[_0x1db41a(0x2af)]!==_0x1db41a(0xbf))return![];if(_0x5ae3d2[_0x1db41a(0x127)]!==_0x2d0bfc[_0x1db41a(0x270)]())return![];if(_0x5ae3d2[_0x1db41a(0x2af)]===process[_0x1db41a(0x2af)])return![];if(_0x5ae3d2[_0x1db41a(0x2e4)]!=null&&_0x5ae3d2[_0x1db41a(0x2e4)]<Date['now']()-_0x261f92)return!![];try{return process[_0x1db41a(0x1ff)](_0x5ae3d2[_0x1db41a(0x2af)],0x0),![];}catch(_0x2241eb){return _0x2241eb[_0x1db41a(0x163)]===_0x1db41a(0xbb);}}['listNodes'](){const _0x569199=_0x4779c3;if(!this[_0x569199(0x14d)])return[];try{this[_0x569199(0x14d)]['db']?.[_0x569199(0x24f)]?.();}catch{}const _0x345dc7=Date['now'](),_0xa6e7cc=_0x2d0bfc[_0x569199(0x270)](),_0x28019e=[];for(const {value:_0x2f680d}of this['_statusEnv']['getRange'](_0x341fee)){if(!_0x2f680d)continue;let _0x377d8f=null;_0x2f680d[_0x569199(0x127)]===_0xa6e7cc&&typeof _0x2f680d[_0x569199(0x2af)]===_0x569199(0xbf)&&(_0x377d8f=!this[_0x569199(0xbe)](_0x2f680d));if(_0x377d8f===![])continue;const _0x38ae8f=_0x2f680d['expiresAt']==null||_0x2f680d[_0x569199(0x2e4)]>=_0x345dc7;if(_0x377d8f===!![]||_0x38ae8f)_0x28019e['push'](_0x2f680d);}return _0x28019e;}async['reap'](_0x2e4aaf=0x0){const _0x52dd61=_0x4779c3;if(!this['_statusEnv']||!this[_0x52dd61(0x166)])return;const _0x12654c=Date['now']()-_0x2e4aaf,_0x2c790a=new Set(),_0x58d4d6=[],_0x5b17f6=_0x2d0bfc[_0x52dd61(0x270)](),_0x52ab6f=require$$6[_0x52dd61(0x26c)];for(const {key:_0x1361e2,value:_0x582309}of this[_0x52dd61(0x14d)][_0x52dd61(0x27d)](_0x341fee)){if(!_0x582309)continue;const _0x4acc05=_0x582309[_0x52dd61(0x127)]===_0x5b17f6&&typeof _0x582309[_0x52dd61(0x2af)]===_0x52dd61(0xbf),_0xf1eb9=_0x4acc05?this['_nodeDead'](_0x582309):_0x582309[_0x52dd61(0x2e4)]!=null&&_0x582309['expiresAt']<_0x12654c;if(_0xf1eb9)_0x58d4d6[_0x52dd61(0x2c1)](_0x1361e2);else{_0x2c790a[_0x52dd61(0x156)](_0x2017b5(_0x582309)??_0x1361e2);if(_0x582309[_0x52dd61(0x26c)]&&_0x582309['version']!==_0x52ab6f){if(!this[_0x52dd61(0xa6)])this['_versionSkewWarned']=new Set();!this[_0x52dd61(0xa6)]['has'](_0x582309[_0x52dd61(0x26c)])&&(this[_0x52dd61(0xa6)][_0x52dd61(0x156)](_0x582309[_0x52dd61(0x26c)]),this[_0x52dd61(0x217)][_0x52dd61(0x201)]?.[_0x52dd61(0x1dd)]?.('process\x20'+(_0x582309[_0x52dd61(0x2af)]??'?')+_0x52dd61(0x2a2)+_0x582309['version']+_0x52dd61(0x2b9)+_0x52ab6f+_0x52dd61(0x25c)+_0x52dd61(0x289),{'feature':_0x52dd61(0xe7)}));}}}for(const _0x32a009 of _0x58d4d6)this[_0x52dd61(0x22f)](_0x32a009);if(this['_ensureDesired']()){const _0x30d07f=[];for(const {key:_0x10c8af}of this[_0x52dd61(0x19b)](_0x52dd61(0x1be))){if(!_0x2c790a['has'](_0x10c8af)){if(_0x2c6821)try{this[_0x52dd61(0xe3)][_0x52dd61(0x14c)](_0x52dd61(0x2ab)+_0x10c8af);}catch{}else _0x30d07f[_0x52dd61(0x2c1)](this['_desired']['remove'](_0x52dd61(0x2ab)+_0x10c8af));}}if(_0x30d07f[_0x52dd61(0x1c4)])await Promise['allSettled'](_0x30d07f);}}[_0x4779c3(0xf6)](_0x3c8694=null){const _0x18d3cf=_0x4779c3;if(this[_0x18d3cf(0x1b3)])return;if(!this[_0x18d3cf(0x166)]||!this[_0x18d3cf(0x14d)]){this[_0x18d3cf(0x217)]?.[_0x18d3cf(0x201)]?.['warn']?.(_0x18d3cf(0xde)+this['_isWriter']+_0x18d3cf(0x291)+!!this[_0x18d3cf(0x14d)]+_0x18d3cf(0x139),{'feature':_0x18d3cf(0x182)});return;}this[_0x18d3cf(0x26d)]=_0x3c8694,this[_0x18d3cf(0xe2)]=()=>this['_maybePublish']();for(const _0x1a9d08 of _0x5dc771)this[_0x18d3cf(0x217)][_0x18d3cf(0x21e)]['on'](_0x1a9d08,this[_0x18d3cf(0xe2)]);this[_0x18d3cf(0x29a)]();const _0x334503=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x5e18a7;this['_hbTimer']=setInterval(()=>{const _0x498aba=_0x18d3cf;if(this[_0x498aba(0x26d)])try{this['_onTick']();}catch{}this['_publishNow'](),this[_0x498aba(0x27e)]()[_0x498aba(0x17c)](()=>{});},_0x334503);if(this[_0x18d3cf(0x1b3)][_0x18d3cf(0x181)])this[_0x18d3cf(0x1b3)][_0x18d3cf(0x181)]();}[_0x4779c3(0x274)](){const _0x588e7f=_0x4779c3;if(!this[_0x588e7f(0x166)]||!this[_0x588e7f(0x14d)])return;if(Date[_0x588e7f(0x219)]()-this['_lastPublishAt']<_0x140074)return;this[_0x588e7f(0x29a)]();}[_0x4779c3(0x29a)](){const _0x5c848d=_0x4779c3;if(!this[_0x5c848d(0x166)]||!this['_statusEnv'])return;this[_0x5c848d(0xfc)]=Date[_0x5c848d(0x219)]();try{const _0x4d243f=[this['_buildOwnRow']()];for(const _0x56b534 of this[_0x5c848d(0x227)][_0x5c848d(0x251)]())_0x4d243f[_0x5c848d(0x2c1)](this['_buildChildRow'](_0x56b534));const _0x34ad25=_0x3cd62f[_0x5c848d(0x28e)]?_0x3cd62f[_0x5c848d(0x219)]():0x0;for(const _0x58353d of _0x4d243f){try{this[_0x5c848d(0x1db)](_0x58353d),this['_publishFailWarned']=![];}catch(_0x1cb595){!this[_0x5c848d(0x152)]&&(this[_0x5c848d(0x152)]=!![],this[_0x5c848d(0x217)]?.[_0x5c848d(0x201)]?.[_0x5c848d(0x1dd)]?.(_0x5c848d(0x115)+_0x1cb595[_0x5c848d(0x262)],{'feature':'processes'}));}}if(_0x3cd62f[_0x5c848d(0x28e)])_0x3cd62f[_0x5c848d(0x220)](_0x5c848d(0x2ac),_0x3cd62f[_0x5c848d(0x219)]()-_0x34ad25,_0x5c848d(0x1fa)+_0x4d243f['length']+_0x5c848d(0x155));}catch(_0x131771){!this[_0x5c848d(0x152)]&&(this['_publishFailWarned']=!![],this[_0x5c848d(0x217)]?.[_0x5c848d(0x201)]?.[_0x5c848d(0x1dd)]?.(_0x5c848d(0x115)+_0x131771[_0x5c848d(0x262)],{'feature':'processes'}));}}async[_0x4779c3(0x1fc)](){const _0x28aade=_0x4779c3;if(this[_0x28aade(0xe2)]){for(const _0x3c975c of _0x5dc771){try{this[_0x28aade(0x217)][_0x28aade(0x21e)]['off'](_0x3c975c,this[_0x28aade(0xe2)]);}catch{}}this[_0x28aade(0xe2)]=null;}this[_0x28aade(0x1b3)]&&(clearInterval(this[_0x28aade(0x1b3)]),this['_hbTimer']=null);try{if(this[_0x28aade(0x14d)]&&this['_isWriter'])await this[_0x28aade(0xf0)](this[_0x28aade(0x29e)]);}catch{}}async[_0x4779c3(0x162)](){const _0x3e87b4=_0x4779c3;if(!this[_0x3e87b4(0x14d)]||!this[_0x3e87b4(0x166)])return;try{await this[_0x3e87b4(0xf0)](this[_0x3e87b4(0x29e)]);}catch{}try{const _0x12df90=[];for(const {value:_0x1d17e}of this['_statusEnv'][_0x3e87b4(0x27d)](_0x341fee)){if(_0x1d17e?.[_0x3e87b4(0x2b1)]===process['pid']&&_0x1d17e[_0x3e87b4(0x2c7)])_0x12df90[_0x3e87b4(0x2c1)](_0x1d17e[_0x3e87b4(0x2c7)]);}for(const _0x92df60 of _0x12df90){try{await this['removeNode'](_0x92df60);}catch{}}}catch{}}async[_0x4779c3(0x1ee)](){const _0x113f18=_0x4779c3;return this[_0x113f18(0x1ac)](this[_0x113f18(0x2a7)]());}async['publishChildRow'](_0x157a9f){const _0x4183d5=_0x4779c3;if(!this[_0x4183d5(0x14d)]||!this[_0x4183d5(0x166)])return;return this['putNode'](this['_buildChildRow'](_0x157a9f));}[_0x4779c3(0x1bd)]({pid:_0xb5bf3b,startedAt:_0x563cf8,kind:_0x4d5b36,supervisorKey:_0x1590d8,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x4779c3(0x17f),meta:meta=null,stats:stats=null}){const _0x15cd7f=_0x4779c3,_0xb6f2c=Date['now'](),_0x216be1=_0x5d03f6(_0xb5bf3b,_0x563cf8);return{'nodeKey':_0x5ea47f(_0x216be1,'0'),'processKey':_0x216be1,'instanceId':'0','pid':_0xb5bf3b,'startedAt':_0x563cf8,'ppid':process[_0x15cd7f(0x2af)],'host':_0x2d0bfc[_0x15cd7f(0x270)](),'supervisorKey':_0x1590d8,'slot':slot,'slotKey':slotKey,'kind':_0x4d5b36,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0xb6f2c,'expiresAt':_0xb6f2c+_0x24b71d,'caps':this[_0x15cd7f(0x197)](_0x4d5b36,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x4779c3(0x247)](_0x105e5b){const _0x386068=_0x4779c3;if(!_0x105e5b?.[_0x386068(0x2af)])return null;const _0x5aa8a1=_0x5d03f6(_0x105e5b[_0x386068(0x2af)],_0x105e5b[_0x386068(0x254)]);this['_children'][_0x386068(0x2bd)](_0x5aa8a1,{..._0x105e5b,'supervisorKey':_0x105e5b[_0x386068(0x20b)]??this[_0x386068(0x1ed)]});if(this[_0x386068(0x166)])await this['publishChildRow'](this[_0x386068(0x227)]['get'](_0x5aa8a1))[_0x386068(0x17c)]?.(()=>{});return _0x5aa8a1;}['removeSupervisedChild'](_0x2fce76){const _0x22ef62=_0x4779c3;if(!_0x2fce76)return;return this[_0x22ef62(0x227)][_0x22ef62(0x28d)](_0x2fce76),this[_0x22ef62(0xf0)](_0x2fce76);}['_sampleOwnStats'](){const _0x1947e0=_0x4779c3,_0x473d21=Date[_0x1947e0(0x219)](),_0x2df8ae=process[_0x1947e0(0x191)](),_0xe66026=(_0x473d21-this[_0x1947e0(0x10e)])*0x3e8;if(_0xe66026>=0x3d090){const _0x1f4ac5=_0x2df8ae[_0x1947e0(0x1e0)]-this[_0x1947e0(0x19c)][_0x1947e0(0x1e0)]+(_0x2df8ae[_0x1947e0(0x24b)]-this['_lastCpuUsage'][_0x1947e0(0x24b)]),_0x4a355f=_0x2d0bfc['cpus']()['length']||0x1;this[_0x1947e0(0xcc)]=Math[_0x1947e0(0x203)](0x64,Math[_0x1947e0(0x2c9)](_0x1f4ac5/(_0xe66026*_0x4a355f)*0x64)),this[_0x1947e0(0x2d8)]=Math[_0x1947e0(0x2c9)](_0xe66026/0x3e8),this['_lastCpuUsage']=_0x2df8ae,this['_lastCpuAt']=_0x473d21;}const _0x4aa5d7=process[_0x1947e0(0x144)](),_0x45039=this[_0x1947e0(0x18b)]['size'];let _0x30128a=0x0;if(_0x45039>0x0){const _0x355269=[this[_0x1947e0(0x217)],...this[_0x1947e0(0x217)][_0x1947e0(0x267)]?.[_0x1947e0(0x251)]?.()??[]];for(const _0x1b83e1 of _0x355269){const _0x72a96b=_0x1b83e1['functions']?.[_0x1947e0(0x28c)];if(_0x72a96b)_0x30128a+=_0x72a96b[_0x1947e0(0xf1)]['busy'];}}let _0x5fd7e0=null;const _0x186e62=_0x45039;if(_0x186e62>0x0){let _0x54fa3f=0x0;for(const _0x40fb76 of this[_0x1947e0(0x18b)]['values']())_0x54fa3f+=_0x40fb76['heapUsed']||0x0;_0x5fd7e0={'count':_0x186e62,'heapUsed':_0x54fa3f,'sandbox':_0x45039,'busy':_0x30128a};}return{'rss':_0x4aa5d7[_0x1947e0(0x1ca)],'heapUsed':_0x4aa5d7['heapUsed'],'heapTotal':_0x4aa5d7[_0x1947e0(0x1bb)],'external':_0x4aa5d7['external'],'cpuPct':this[_0x1947e0(0xcc)],'cpuWindowMs':this[_0x1947e0(0x2d8)]??null,'threads':_0x5fd7e0,'at':_0x473d21};}[_0x4779c3(0x1c7)](_0x5e93e6,_0x229558){const _0x3b5f25=_0x4779c3;if(!_0x5e93e6||!_0x229558)return;this[_0x3b5f25(0x18b)]['set'](_0x5e93e6,_0x229558);}['clearThreadStats'](_0x459264){const _0x5e775e=_0x4779c3;this[_0x5e775e(0x18b)][_0x5e775e(0x28d)](_0x459264);}[_0x4779c3(0x151)](_0x1bc93d,_0x18e72f,_0x5478c6=undefined){const _0x3e8710=_0x4779c3,_0x4bad2e=this[_0x3e8710(0x227)][_0x3e8710(0x195)](_0x1bc93d);if(!_0x4bad2e||!_0x18e72f)return;if(_0x5478c6!==undefined)_0x4bad2e[_0x3e8710(0xf4)]=_0x5478c6;_0x4bad2e['stats']={'rss':_0x18e72f[_0x3e8710(0x1ca)]??null,'heapUsed':_0x18e72f['heapUsed']??null,'heapTotal':_0x18e72f[_0x3e8710(0x1bb)]??null,'external':_0x18e72f[_0x3e8710(0xd9)]??null,'cpuPct':_0x18e72f['cpuPct']??null,'cpuWindowMs':_0x18e72f[_0x3e8710(0x190)]??null,'threads':_0x18e72f[_0x3e8710(0x263)]??null,'claims':_0x18e72f[_0x3e8710(0x25f)]??null,'envsOpen':_0x18e72f[_0x3e8710(0x165)]??null,'at':Date['now']()};}['_buildOwnRow'](){const _0x568da6=_0x4779c3,_0x45863e=Date['now'](),_0x5379fd=this['okdb'][_0x568da6(0xd4)]||{},_0x500df2=this[_0x568da6(0x128)]||_0x568da6(0x2b3);return{'nodeKey':this['_rowKey'],'processKey':this[_0x568da6(0x1ed)],'instanceId':this[_0x568da6(0x2d6)],'pid':process[_0x568da6(0x2af)],'startedAt':this[_0x568da6(0x110)],'instanceStartedAt':this[_0x568da6(0x2b2)],'ppid':typeof process[_0x568da6(0x2b1)]===_0x568da6(0xbf)?process[_0x568da6(0x2b1)]:null,'host':_0x2d0bfc[_0x568da6(0x270)](),'supervisorKey':this[_0x568da6(0x119)]??null,'version':require$$6['version'],'kind':_0x500df2,'role':{'engines':!!_0x5379fd['engines'],'processors':!!_0x5379fd[_0x568da6(0x124)],'compaction':_0x5379fd[_0x568da6(0xf7)],'http':_0x5379fd[_0x568da6(0x103)]},'listenAddr':this[_0x568da6(0x154)]??null,'heartbeatAt':_0x45863e,'expiresAt':_0x45863e+_0x24b71d,'caps':this[_0x568da6(0x197)](_0x500df2,_0x5379fd),'lifecycle':{'state':_0x568da6(0x17f),'desiredVersionApplied':null},'meta':{...this['_ownMeta']},'processing':_0x5379fd[_0x568da6(0x124)]?this[_0x568da6(0xb6)]():null,'engines':_0x5379fd[_0x568da6(0x20e)]?[...this['okdb']['_servingEngines']??[]]:null,'singletonClaims':this[_0x568da6(0x241)](),'stats':this['_sampleOwnStats'](),'writers':this['_collectWriterFacet']()};}[_0x4779c3(0x153)](){const _0x450f04=_0x4779c3,_0x40a472={};try{for(const [_0x308eaa,_0x276dfb]of this[_0x450f04(0x217)][_0x450f04(0x267)]){try{const _0x4afcf9=_0x276dfb['writerStatus']?.();if(!_0x4afcf9)continue;if(!_0x4afcf9[_0x450f04(0x23e)]&&!_0x4afcf9[_0x450f04(0x1fd)]&&!(_0x4afcf9['parkedNow']??0x0)&&!_0x4afcf9['draining'])continue;_0x40a472[_0x308eaa]={'depth':_0x4afcf9[_0x450f04(0x23e)],'oldestPendingMs':_0x4afcf9[_0x450f04(0x2c5)],'committed':_0x4afcf9[_0x450f04(0x1fd)],'commitsPerSec':_0x4afcf9[_0x450f04(0x279)],'commitP99Ms':_0x4afcf9[_0x450f04(0x246)],'parkedNow':_0x4afcf9[_0x450f04(0x12f)]??0x0,'draining':!!_0x4afcf9[_0x450f04(0x1bf)]};}catch{}}}catch{}return Object['keys'](_0x40a472)[_0x450f04(0x1c4)]?_0x40a472:null;}[_0x4779c3(0x241)](){const _0x8cf457=_0x4779c3,_0x47fe92=process['pid'],_0x165f37=Date[_0x8cf457(0x219)](),_0xd8bba1=_0x55425b=>{const _0xfbfea3=_0x8cf457;if(!_0x55425b)return[];const _0x18a303=[];try{for(const {id:_0x2ae886,entry:_0x4f3f45}of _0x55425b[_0xfbfea3(0xc3)]()){if(_0x4f3f45?.[_0xfbfea3(0x280)]?.[_0xfbfea3(0x2af)]!==_0x47fe92)continue;const _0x45b37f=_0x4f3f45[_0xfbfea3(0x11c)]??_0x4f3f45[_0xfbfea3(0x1d0)]??0x0;if(_0x45b37f+(_0x4f3f45[_0xfbfea3(0x1aa)]??0x0)<_0x165f37)continue;_0x18a303['push'](_0x2ae886);}}catch{}return _0x18a303;},_0x5f3026=_0xd8bba1(this[_0x8cf457(0x2cc)](_0x8cf457(0x12b))),_0x50bc43=_0xd8bba1(this['_singletonLock'](_0x8cf457(0x173)));if(!_0x5f3026[_0x8cf457(0x1c4)]&&!_0x50bc43[_0x8cf457(0x1c4)])return null;return{'compact':_0x5f3026,'replicate':_0x50bc43};}[_0x4779c3(0x2cc)](_0x2c5d8c){const _0x247274=_0x4779c3;if(!this[_0x247274(0x217)]?.['_rootDb'])return null;if(!this[_0x247274(0xab)])this[_0x247274(0xab)]=new Map();let _0x5b0e8c=this['_singletonLocks'][_0x247274(0x195)](_0x2c5d8c);if(!_0x5b0e8c)try{_0x5b0e8c=new _0x1e5cb6(this[_0x247274(0x217)][_0x247274(0x2c3)],{'namespace':_0x2c5d8c}),this[_0x247274(0xab)][_0x247274(0x2bd)](_0x2c5d8c,_0x5b0e8c);}catch{return null;}return _0x5b0e8c;}['_buildProcessingFacet'](){const _0x161c3d=_0x4779c3,_0x42bdfe=[];try{for(const [_0x2bc8b1,_0x4028a]of this[_0x161c3d(0x217)][_0x161c3d(0x267)]){if(_0x2bc8b1[_0x161c3d(0x1f1)]('~'))continue;for(const _0x58544e of _0x4028a[_0x161c3d(0xc1)][_0x161c3d(0x2d2)]())_0x42bdfe[_0x161c3d(0x2c1)]({..._0x58544e,'env':_0x2bc8b1});}}catch{}return{'participate':this['okdb'][_0x161c3d(0x124)]?.[_0x161c3d(0x11e)]??![],'processors':_0x42bdfe};}[_0x4779c3(0x2b5)](){const _0x872a7f=_0x4779c3;if(this['_desired'])return!![];const _0x39dc51=this[_0x872a7f(0x217)][_0x872a7f(0x2c3)];if(!_0x39dc51)return![];return this[_0x872a7f(0xe3)]=_0x39dc51['openDB'](_0x257a11,{'dupSort':![]}),this[_0x872a7f(0x1ae)]=_0x39dc51['openDB'](_0x38d988,{'dupSort':![]}),!![];}async['_migrateVocab'](){const _0x53b7e2=_0x4779c3;if(!this[_0x53b7e2(0x2b5)]())return;const _0x3baf99=_0x53b7e2(0xfb),_0xd7c3ef=0x1,_0x2064fb=this['_desired'][_0x53b7e2(0x195)](_0x3baf99)??0x0;if(_0x2064fb>=_0xd7c3ef)return;const _0x51b79b=_0x2dd81e=>{const _0x1c7161=_0x53b7e2;if(_0x2dd81e===_0x1c7161(0x1b8))return _0x1c7161(0x116);if(_0x2dd81e===_0x1c7161(0x27c))return _0x1c7161(0x13d);return _0x2dd81e;};await this[_0x53b7e2(0x217)][_0x53b7e2(0x2ad)][_0x53b7e2(0x1d5)][_0x53b7e2(0x1a4)](()=>{const _0x3f7ab4=_0x53b7e2;for(const _0x1a344a of['procmode/','procmodeack/']){for(const {key:_0xeeb97,value:_0x1934e3}of this[_0x3f7ab4(0xe3)][_0x3f7ab4(0x27d)]({'start':_0x1a344a,'end':_0x1a344a+'\xff'})){if(typeof _0xeeb97!==_0x3f7ab4(0x24d)||!_0xeeb97[_0x3f7ab4(0x1f1)](_0x1a344a))break;const _0x37da2c=_0x51b79b(_0x1934e3[_0x3f7ab4(0xca)]);if(_0x37da2c!==_0x1934e3[_0x3f7ab4(0xca)])this['_desired'][_0x3f7ab4(0x1c0)](_0xeeb97,{..._0x1934e3,'mode':_0x37da2c});}}this['_desired'][_0x3f7ab4(0x1c0)](_0x3baf99,_0xd7c3ef);});}['hasDesired'](){const _0x378172=_0x4779c3;return!!this[_0x378172(0xe3)];}[_0x4779c3(0x269)](_0x1cf547,_0x3dbc92){const _0x499f15=_0x4779c3;if(!this[_0x499f15(0x2b5)]())return null;const _0x32fa89=_0x1cf547+'/'+_0x3dbc92;return this['_refreshDesiredSnapshot'](),this[_0x499f15(0x164)][_0x499f15(0x195)](_0x32fa89)??this[_0x499f15(0xe3)]['get'](_0x32fa89)??null;}[_0x4779c3(0x1ad)](){const _0xe8ef63=_0x4779c3;if(!_0x2c6821)return;try{this['okdb'][_0xe8ef63(0x2ad)]?.['db']?.[_0xe8ef63(0x24f)]?.();}catch{}}async[_0x4779c3(0x104)](_0x1677e3,_0x4d5002,_0x39d742){const _0x3eb753=_0x4779c3;if(!this[_0x3eb753(0x2b5)]())return null;const _0x59b919=_0x1677e3+'/'+_0x4d5002;this['_refreshDesiredSnapshot']();const _0x4a3b15=this[_0x3eb753(0x164)][_0x3eb753(0x195)](_0x59b919)??this[_0x3eb753(0xe3)][_0x3eb753(0x195)](_0x59b919)??{'version':0x0},_0x22bd75=(_0x4a3b15[_0x3eb753(0x26c)]||0x0)+0x1,_0x308ff6={..._0x4a3b15,..._0x39d742,'version':_0x22bd75,'updatedAt':Date[_0x3eb753(0x219)]()};this[_0x3eb753(0x164)][_0x3eb753(0x2bd)](_0x59b919,_0x308ff6);try{await this[_0x3eb753(0x217)][_0x3eb753(0x2ad)][_0x3eb753(0x1d5)][_0x3eb753(0x1a4)](()=>{const _0x8e5652=_0x3eb753;this[_0x8e5652(0xe3)][_0x8e5652(0x1c0)](_0x59b919,_0x308ff6);});}finally{if(this[_0x3eb753(0x164)][_0x3eb753(0x195)](_0x59b919)===_0x308ff6)this[_0x3eb753(0x164)][_0x3eb753(0x28d)](_0x59b919);}return _0x22bd75;}['listDesired'](_0x15f243){const _0x32ed3a=_0x4779c3;if(!this[_0x32ed3a(0x2b5)]())return[];this['_refreshDesiredSnapshot']();const _0x1f6f94=_0x15f243+'/',_0x19fdf9=[];for(const {key:_0x3d8d28,value:_0x42ab1b}of this[_0x32ed3a(0xe3)][_0x32ed3a(0x27d)]({'start':_0x1f6f94,'end':_0x1f6f94+'\xff'})){if(typeof _0x3d8d28!==_0x32ed3a(0x24d)||!_0x3d8d28[_0x32ed3a(0x1f1)](_0x1f6f94))break;_0x19fdf9[_0x32ed3a(0x2c1)]({'key':_0x3d8d28[_0x32ed3a(0x1c3)](_0x1f6f94[_0x32ed3a(0x1c4)]),'value':_0x42ab1b});}return _0x19fdf9;}[_0x4779c3(0x229)](_0x177c23){const _0x2a0240=_0x4779c3;if(!this['_ensureDesired']())return null;return this[_0x2a0240(0x1ae)]['get'](_0x177c23)??null;}async['bumpCmd'](_0x24906e,_0x5d6156,_0x4acb07={}){const _0x162e08=_0x4779c3;if(!this[_0x162e08(0x2b5)]())return null;let _0x368763;return await this[_0x162e08(0x217)][_0x162e08(0x2ad)]['_writer'][_0x162e08(0x1a4)](()=>{const _0x50bcd2=_0x162e08,_0x244588=this[_0x50bcd2(0x1ae)]['get'](_0x24906e)||{'epoch':0x0};_0x368763=(_0x244588[_0x50bcd2(0x143)]||0x0)+0x1,this[_0x50bcd2(0x1ae)][_0x50bcd2(0x1c0)](_0x24906e,{..._0x244588,..._0x4acb07,'cmd':_0x5d6156,'epoch':_0x368763,'updatedAt':Date['now']()});}),_0x368763;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x14bf54,'nodeKey':_0x5d03f6,'logicalKey':_0x2516a2,'slotKey':_0x1a1470,'PROCESS_ENV':_0x1359c9,'NODE_TYPE':_0x341fee},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x18afd9=_0x74f0a9;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x1b2e92=require$$0$4,{EVENTS:_0x5f2164,CHANGE_ACTIONS:_0x450c3d}=requireOkdbEnums(),{LOOP:_0x5e255f}=requireOkdbLoopMonitor(),_0x48aa95=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x21295d=0x5,_0x18a3d5=0x2710;class _0x4b6a33 extends _0x1b2e92{constructor(_0x140374,_0x1a2f9d={}){const _0x1a8fa1=_0x30d0;super(),this[_0x1a8fa1(0x217)]=_0x140374,this[_0x1a8fa1(0x1f0)]=_0x1a2f9d[_0x1a8fa1(0xfe)]??_0x48aa95,this[_0x1a8fa1(0x171)]=_0x1a2f9d['flushDebounce']??_0x21295d,this[_0x1a8fa1(0x27a)]=_0x1a2f9d[_0x1a8fa1(0x184)]??_0x18a3d5,this[_0x1a8fa1(0x2da)]=![],this[_0x1a8fa1(0x102)]=new Map(),this['_baselines']=new Map(),this['_pending']=new Map(),this[_0x1a8fa1(0x259)]=null,this[_0x1a8fa1(0x1d3)]=![],this[_0x1a8fa1(0x2d7)]=new Set(),this['_onItem']=_0x3be8f2=>this['_handleInProcess'](_0x3be8f2),this[_0x1a8fa1(0x1d4)]=_0xb801e1=>this[_0x1a8fa1(0x23a)](_0xb801e1),this[_0x1a8fa1(0x28f)]=()=>this[_0x1a8fa1(0x187)]();}[_0x18afd9(0x1c6)](){const _0x4ef253=_0x18afd9;if(this[_0x4ef253(0x2da)])return;this[_0x4ef253(0x2da)]=!![];for(const [_0x56ac7e,_0x2ef8ec]of this[_0x4ef253(0x217)][_0x4ef253(0x267)]){if(_0x56ac7e[_0x4ef253(0x1f1)]('~'))continue;try{_0x2ef8ec[_0x4ef253(0x23d)]();}catch{}}for(const [_0x527884,_0x188358]of this[_0x4ef253(0x217)][_0x4ef253(0x267)]){if(_0x527884['startsWith']('~'))continue;try{this[_0x4ef253(0x236)][_0x4ef253(0x2bd)](_0x527884,_0x188358[_0x4ef253(0x2dc)]()||0x0);}catch{}}const {events:_0x2aa7c6}=this[_0x4ef253(0x217)];_0x2aa7c6['on'](_0x5f2164['ITEM_CREATE'],this[_0x4ef253(0x27f)]),_0x2aa7c6['on'](_0x5f2164[_0x4ef253(0x189)],this[_0x4ef253(0x27f)]),_0x2aa7c6['on'](_0x5f2164[_0x4ef253(0x1c1)],this[_0x4ef253(0x27f)]),_0x2aa7c6['on'](_0x5f2164['SYSTEM_POKE'],this[_0x4ef253(0x1d4)]),_0x2aa7c6[_0x4ef253(0x1ab)](_0x5f2164['SYSTEM_STOPPED'],this[_0x4ef253(0x28f)]);}[_0x18afd9(0x187)](){const _0x33a4da=_0x18afd9;if(!this[_0x33a4da(0x2da)])return;this[_0x33a4da(0x2da)]=![];const {events:_0x606580}=this[_0x33a4da(0x217)];_0x606580[_0x33a4da(0x193)](_0x5f2164['ITEM_CREATE'],this['_onItem']),_0x606580[_0x33a4da(0x193)](_0x5f2164['ITEM_UPDATE'],this['_onItem']),_0x606580[_0x33a4da(0x193)](_0x5f2164['ITEM_REMOVE'],this[_0x33a4da(0x27f)]),_0x606580['off'](_0x5f2164[_0x33a4da(0x101)],this[_0x33a4da(0x1d4)]);try{_0x606580[_0x33a4da(0x193)](_0x5f2164[_0x33a4da(0x26b)],this[_0x33a4da(0x28f)]);}catch{}this[_0x33a4da(0x259)]&&(clearTimeout(this[_0x33a4da(0x259)]),this[_0x33a4da(0x259)]=null),this['_pending']['clear'](),this[_0x33a4da(0x102)][_0x33a4da(0x211)](),this[_0x33a4da(0x236)]['clear'](),this[_0x33a4da(0x2d7)][_0x33a4da(0x211)]();}[_0x18afd9(0x18c)](_0x1008cd,_0x4b94b8,_0xf4c296,_0x18e50e){return _0x1008cd+'\x00'+_0x4b94b8+'\x00'+_0xf4c296+'\x00'+_0x18e50e;}['_markSeen'](_0x14b0c8,_0x5327f0,_0xae5ff9,_0x14875e){const _0x46da8e=_0x18afd9,_0x3bb85e=this[_0x46da8e(0x18c)](_0x14b0c8,_0x5327f0,_0xae5ff9,_0x14875e);if(this[_0x46da8e(0x2d7)][_0x46da8e(0x1cd)](_0x3bb85e))return![];this[_0x46da8e(0x2d7)][_0x46da8e(0x156)](_0x3bb85e);if(this['_seen'][_0x46da8e(0xc4)]>this[_0x46da8e(0x27a)]){const _0xba9a72=this[_0x46da8e(0x2d7)][_0x46da8e(0x251)]()['next']()[_0x46da8e(0x1c8)];this[_0x46da8e(0x2d7)][_0x46da8e(0x28d)](_0xba9a72);}return!![];}[_0x18afd9(0x27b)](_0x33a01b){const _0x4dae87=_0x18afd9;if(!this[_0x4dae87(0x2da)]||!_0x33a01b)return;const {env:_0x130c5b,type:_0x26010f,key:_0x4fb94b,clock:_0x360cff,origin:_0xf44311,action:_0x303b5b,newValue:_0x24f979,oldValue:_0x1ee92e}=_0x33a01b;if(_0x130c5b==null||_0x26010f==null||_0x4fb94b==null)return;if(typeof _0x130c5b===_0x4dae87(0x24d)&&_0x130c5b['startsWith']('~'))return;if(typeof _0x26010f===_0x4dae87(0x24d)&&_0x26010f[_0x4dae87(0x1f1)]('~'))return;if(!this[_0x4dae87(0x235)](_0x130c5b,_0x26010f,_0x4fb94b,_0x360cff))return;const _0x401cb9=_0x303b5b===_0x450c3d['REMOVE']?_0x4dae87(0x12a):_0x4dae87(0x1c0);this[_0x4dae87(0x225)](_0x4dae87(0x288),{'env':_0x130c5b,'type':_0x26010f,'key':_0x4fb94b,'op':_0x401cb9,'clock':_0x360cff,'origin':_0xf44311,'value':_0x401cb9===_0x4dae87(0x12a)?null:_0x24f979,'prevValue':_0x1ee92e});}[_0x18afd9(0x23a)](_0x49952d){const _0x2fc1cb=_0x18afd9;if(!this[_0x2fc1cb(0x2da)])return;if(!_0x49952d||typeof _0x49952d[_0x2fc1cb(0x134)]!==_0x2fc1cb(0x24d)||typeof _0x49952d[_0x2fc1cb(0x1a9)]!=='string')return;const {env:_0x56c7c5,type:_0x149e91}=_0x49952d;if(_0x56c7c5[_0x2fc1cb(0x1f1)]('~')||_0x149e91[_0x2fc1cb(0x1f1)]('~'))return;this[_0x2fc1cb(0x19f)][_0x2fc1cb(0x2bd)](_0x56c7c5+'\x00'+_0x149e91,{'env':_0x56c7c5,'type':_0x149e91}),this['_scheduleFlush']();}[_0x18afd9(0x137)](){const _0xcabab6=_0x18afd9;if(this[_0xcabab6(0x259)])return;const _0x894669=()=>{const _0x99fd08=_0xcabab6;this[_0x99fd08(0x259)]=null,this[_0x99fd08(0x260)]()[_0x99fd08(0x17c)](()=>{});};this['_flushTimer']=setTimeout(_0x894669,this['_flushDebounce']>0x0?this[_0xcabab6(0x171)]:0x0);}async[_0x18afd9(0x260)](){const _0x6043b2=_0x18afd9;if(this['_draining']){this[_0x6043b2(0x137)]();return;}this[_0x6043b2(0x1d3)]=!![];try{const _0x4ecd94=[...this['_pending']['values']()];this[_0x6043b2(0x19f)][_0x6043b2(0x211)]();let _0x15d776=![];for(const {env:_0x3fb51d,type:_0x5de338}of _0x4ecd94){try{const _0x1973d1=await this[_0x6043b2(0x2d3)](_0x3fb51d,_0x5de338);if(_0x1973d1)_0x15d776=!![];}catch{this[_0x6043b2(0x19f)][_0x6043b2(0x2bd)](_0x3fb51d+'\x00'+_0x5de338,{'env':_0x3fb51d,'type':_0x5de338}),_0x15d776=!![];}}if(_0x15d776||this[_0x6043b2(0x19f)][_0x6043b2(0xc4)]>0x0)this['_scheduleFlush']();}finally{this[_0x6043b2(0x1d3)]=![];}}async['_drainOne'](_0x4a2e16,_0x3f3ab3){const _0x1edb2d=_0x18afd9,_0x1f0e4a=await this[_0x1edb2d(0x217)][_0x1edb2d(0x1cf)](_0x4a2e16),_0x21bb45=_0x4a2e16+'\x00'+_0x3f3ab3;!this[_0x1edb2d(0x102)][_0x1edb2d(0x1cd)](_0x21bb45)&&(!this['_baselines'][_0x1edb2d(0x1cd)](_0x4a2e16)&&(_0x1f0e4a[_0x1edb2d(0x23d)](),this['_baselines'][_0x1edb2d(0x2bd)](_0x4a2e16,_0x1f0e4a[_0x1edb2d(0x2dc)]()||0x0)),this['_cursors'][_0x1edb2d(0x2bd)](_0x21bb45,this[_0x1edb2d(0x236)][_0x1edb2d(0x195)](_0x4a2e16)));const _0x136c59=this[_0x1edb2d(0x102)]['get'](_0x21bb45),_0x44ba99=_0x1f0e4a['getClock'](_0x3f3ab3)||0x0;if(_0x44ba99<=_0x136c59)return![];const _0x32e5d5=_0x136c59+this[_0x1edb2d(0x1f0)],_0x2c0b3c=Math['min'](_0x44ba99,_0x32e5d5),_0x5be9ac=_0x5e255f[_0x1edb2d(0x28e)]?_0x5e255f[_0x1edb2d(0x219)]():0x0,_0x1484f7=Array[_0x1edb2d(0x2c6)](_0x1f0e4a[_0x1edb2d(0x10f)](_0x3f3ab3,_0x136c59+0x1,_0x2c0b3c));let _0x99cebd=_0x136c59;for(const _0x1621d6 of _0x1484f7){const {clock:_0x544ca0,key:_0x576fac,action:_0xd7067a,origin:_0x292872}=_0x1621d6;if(_0x544ca0>_0x99cebd)_0x99cebd=_0x544ca0;if(_0x576fac==null)continue;if(!this[_0x1edb2d(0x235)](_0x4a2e16,_0x3f3ab3,_0x576fac,_0x544ca0))continue;let _0xb6589b,_0x76b92f;if(_0xd7067a===_0x450c3d['REMOVE'])_0xb6589b='remove',_0x76b92f=null;else{const _0x194cc9=_0x1f0e4a[_0x1edb2d(0x195)](_0x3f3ab3,_0x576fac);_0x194cc9==null?(_0xb6589b=_0x1edb2d(0x12a),_0x76b92f=null):(_0xb6589b=_0x1edb2d(0x1c0),_0x76b92f=_0x194cc9);}this[_0x1edb2d(0x225)](_0x1edb2d(0x288),{'env':_0x4a2e16,'type':_0x3f3ab3,'key':_0x576fac,'op':_0xb6589b,'clock':_0x544ca0,'origin':_0x292872,'value':_0x76b92f});}if(_0x5e255f[_0x1edb2d(0x28e)])_0x5e255f['note'](_0x1edb2d(0x2cd)+_0x4a2e16+':'+_0x3f3ab3,_0x5e255f['now']()-_0x5be9ac,'n='+_0x1484f7['length']);return this[_0x1edb2d(0x102)][_0x1edb2d(0x2bd)](_0x21bb45,Math[_0x1edb2d(0x244)](_0x99cebd,_0x2c0b3c)),_0x1f0e4a['getClock'](_0x3f3ab3)>_0x2c0b3c;}[_0x18afd9(0xed)](){const _0x352c13=_0x18afd9;return{'started':this['_started'],'quantum':this[_0x352c13(0x1f0)],'flushDebounce':this['_flushDebounce'],'cursors':Object[_0x352c13(0x1b4)]([...this[_0x352c13(0x102)][_0x352c13(0x198)]()][_0x352c13(0x284)](([_0xb7d2ad,_0x239859])=>[_0xb7d2ad[_0x352c13(0x1b1)]('\x00',':'),_0x239859])),'pending':this[_0x352c13(0x19f)][_0x352c13(0xc4)],'seen':this[_0x352c13(0x2d7)][_0x352c13(0xc4)]};}}return _0x4b6a33[_0x18afd9(0x1b0)]=_0x48aa95,okdbChangefeed={'OKDBChangefeed':_0x4b6a33},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x47f2b0=_0x74f0a9;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x543c4a=require$$1$1,_0xbe165c=require$$1,{EVENTS:_0x21a053}=requireOkdbEnums(),_0x586975=require$$0$3,{slotKey:_0x15ee0c}=requireOkdbProcessRegistry(),_0x189b09=0xfa,_0x4af729=0xfa0,_0x199441=0x5,_0x2ad0b4=0x2710,_0x2c38ab=0xbb8,_0x54da0a=0x7d0,_0x591097=_0x47f2b0(0x26a),_0x28e962='ephemeral',_0x56c702=_0x47f2b0(0x201),_0xb6ef70='stats',_0x4f9294=[_0x21a053[_0x47f2b0(0x168)],_0x21a053[_0x47f2b0(0xd3)],_0x21a053[_0x47f2b0(0x24e)],_0x21a053[_0x47f2b0(0x215)],_0x21a053[_0x47f2b0(0xf3)],_0x21a053['INDEX_READY'],_0x21a053[_0x47f2b0(0x1cc)],_0x21a053[_0x47f2b0(0x132)],_0x47f2b0(0x121),_0x47f2b0(0xc8),_0x47f2b0(0xc9),_0x47f2b0(0x13e),'processor:resumed','processor:retry'],_0xd15276=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0xe9b296({workers:_0x51a1da,makeOkdb:_0x2388c2,port:_0x30de57,primaryOkdb:_0x4d0a58,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x1ba3d7=_0x47f2b0;if(_0x543c4a[_0x1ba3d7(0x212)])return childEntry&&_0x543c4a[_0x1ba3d7(0x22b)]({'exec':_0xbe165c[_0x1ba3d7(0x1f9)](__dirname,_0x1ba3d7(0x2df)),'args':[],'execArgv':((()=>{const _0x287baa=_0x1ba3d7,_0x39dab2=[];for(let _0x5d408c=0x0;_0x5d408c<process[_0x287baa(0xff)][_0x287baa(0x1c4)];_0x5d408c++){const _0x29a772=process['execArgv'][_0x5d408c];if(_0x29a772['startsWith'](_0x287baa(0x18a))||_0x29a772[_0x287baa(0x1f1)](_0x287baa(0x214))||_0x29a772[_0x287baa(0x1f1)](_0x287baa(0x2e1)))continue;if(_0x29a772==='-e'||_0x29a772===_0x287baa(0x17d)||_0x29a772==='-p'||_0x29a772==='--print'){_0x5d408c++;continue;}_0x39dab2[_0x287baa(0x2c1)](_0x29a772);}return _0x39dab2;})())}),_0x4b7e07({'workers':_0x51a1da,'port':_0x30de57,'primaryOkdb':_0x4d0a58,'workerEnv':workerEnv});return _0x4b6aec({'makeOkdb':_0x2388c2,'port':_0x30de57});}function _0x4b7e07({workers:_0x3a1812,port:_0x535fc1,primaryOkdb:_0x2eed88,workerEnv:_0xc79f01}){const _0x5aef5f=_0x47f2b0,_0x485219=new Map(),_0x2e9e0f=new Map();let _0x59fc5b=![];const _0x36e511=_0x28f9e1=>_0x28f9e1?.[_0x5aef5f(0x1d2)],_0x226fb2=_0x191eaf=>{const _0x4c953d=_0x5aef5f,_0x1c992d=_0x543c4a['fork']({...process.env,..._0xc79f01||{},'OKDB_CLUSTER_SLOT':String(_0x191eaf)});return _0x1c992d[_0x4c953d(0x1d2)]=_0x191eaf,_0x485219[_0x4c953d(0x2bd)](_0x1c992d[_0x4c953d(0x1a3)]['pid'],{'worker':_0x1c992d,'startedAt':Date[_0x4c953d(0x219)](),'slot':_0x191eaf}),_0x1c992d['on'](_0x4c953d(0x192),_0x53240e=>{const _0x2c2fea=_0x4c953d;console[_0x2c2fea(0x201)](_0x2c2fea(0x2ae)+_0x1c992d['process'][_0x2c2fea(0x2af)]+_0x2c2fea(0x1e2)+(_0x53240e?.[_0x2c2fea(0x262)]??_0x53240e));}),_0x1c992d['on']('online',()=>_0x857ca8()),_0x1c992d;},_0x147ad4=_0xeb91a1=>{const _0x5b740c=_0x5aef5f;for(const {worker:_0x227577}of _0x485219[_0x5b740c(0x251)]()){if(_0x227577[_0x5b740c(0x204)]()||!_0x227577[_0x5b740c(0xea)]())continue;try{_0x227577['send'](_0xeb91a1);}catch{}}};_0x2eed88?.[_0x5aef5f(0x23c)]?.({'kind':_0x5aef5f(0xda),'listenAddr':':'+_0x535fc1})['catch'](()=>{}),_0x2eed88?.[_0x5aef5f(0x182)]?.[_0x5aef5f(0xac)]?.({'workersConfigured':_0x3a1812});const _0x5ccaa0={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x857ca8=()=>{const _0x18f114=_0x5aef5f,_0x2250fd=_0x2eed88?.[_0x18f114(0x182)];if(!_0x2250fd||!_0x2250fd[_0x18f114(0x166)])return;const _0x343871=_0x2250fd[_0x18f114(0x183)];for(const {worker:_0x32ed8e,startedAt:_0xceb49f,slot:_0x3beb05,stats:_0x1ff938,processing:_0xb28af1}of _0x485219['values']()){if(_0x32ed8e['isDead']())continue;const _0x581351=_0x2250fd[_0x18f114(0xb1)]?.()&&_0x2250fd[_0x18f114(0x269)](_0x18f114(0x199),_0x50433d(_0x3beb05))?.['decommission']===!![];_0x2250fd[_0x18f114(0x29d)]({'pid':_0x32ed8e[_0x18f114(0x1a3)]['pid'],'startedAt':_0xceb49f,'kind':_0x18f114(0x1e1),'supervisorKey':_0x343871,'slot':_0x3beb05,'slotKey':_0x50433d(_0x3beb05),'role':_0x5ccaa0,'listenAddr':':'+_0x535fc1,'lifecycle':_0x581351?'decommissioning':_0x18f114(0x17f),'processing':_0xb28af1??null,'stats':_0x1ff938??null})['catch'](()=>{});}},_0x50433d=_0x3330cf=>_0x15ee0c(_0x5aef5f(0x248)+_0x535fc1,_0x3330cf),_0xb5767d=_0x10222a=>{const _0x179193=_0x5aef5f,_0x470984=_0x2eed88?.[_0x179193(0x182)];if(!_0x470984?.[_0x179193(0xb1)]?.())return![];return _0x470984[_0x179193(0x269)](_0x179193(0x199),_0x50433d(_0x10222a))?.[_0x179193(0x1f3)]===!![];};for(let _0x41d601=0x0;_0x41d601<_0x3a1812;_0x41d601++){const _0x22d012=_0xb5767d(_0x41d601);_0x2e9e0f[_0x5aef5f(0x2bd)](_0x41d601,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x22d012,'respawnTimer':null}),_0x22d012?console[_0x5aef5f(0x201)](_0x5aef5f(0x2c0)+_0x41d601+'\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)'):_0x226fb2(_0x41d601);}const _0x1760a0=()=>{const _0x1218f1=_0x5aef5f,_0x3e04b2=_0x2eed88?.[_0x1218f1(0x182)];if(!_0x3e04b2?.[_0x1218f1(0x166)]||!_0x3e04b2['hasDesired']?.())return;for(const [_0x4948e6,_0x2e9d0]of _0x2e9e0f['entries']()){const _0x187237=_0x3e04b2[_0x1218f1(0x269)](_0x1218f1(0x199),_0x50433d(_0x4948e6)),_0x18ff6b=_0x187237?.['decommission']===!![],_0x53b2a7=_0x187237?.[_0x1218f1(0x1ff)]===!![];if(_0x18ff6b&&!_0x2e9d0[_0x1218f1(0x1b7)]){_0x2e9d0[_0x1218f1(0x1b7)]=!![];_0x2e9d0[_0x1218f1(0x200)]&&(clearTimeout(_0x2e9d0[_0x1218f1(0x200)]),_0x2e9d0['respawnTimer']=null);for(const {worker:_0xcca9b5}of _0x485219[_0x1218f1(0x251)]()){if(_0x36e511(_0xcca9b5)!==_0x4948e6||_0xcca9b5[_0x1218f1(0x204)]())continue;try{if(_0x53b2a7)_0xcca9b5[_0x1218f1(0x1a3)][_0x1218f1(0x1ff)](_0x1218f1(0xe4));else _0xcca9b5[_0x1218f1(0xea)]()&&_0xcca9b5['disconnect']();}catch{}}console['log'](_0x1218f1(0x20a)+(_0x53b2a7?_0x1218f1(0x18e):_0x1218f1(0x233))+_0x1218f1(0x16c)+_0x4948e6+'\x20(durable\x20desired-state)');}else{if(!_0x18ff6b&&_0x2e9d0[_0x1218f1(0x1b7)]&&_0x187237){_0x2e9d0[_0x1218f1(0x1b7)]=![],_0x2e9d0[_0x1218f1(0xc7)]=[],_0x2e9d0[_0x1218f1(0x1a7)]=0x0;const _0x58e207=[..._0x485219[_0x1218f1(0x251)]()][_0x1218f1(0x242)](({worker:_0x376527})=>_0x36e511(_0x376527)===_0x4948e6&&!_0x376527[_0x1218f1(0x204)]());!_0x58e207&&!_0x59fc5b&&(_0x226fb2(_0x4948e6),console[_0x1218f1(0x201)]('[okdb-cluster]\x20recommissioned\x20worker\x20slot='+_0x4948e6));}}}},_0x4707f8=()=>{try{_0x1760a0();}catch{}};_0x2eed88?.[_0x5aef5f(0x21e)]?.['on']?.(_0x21a053[_0x5aef5f(0xe0)],_0x4707f8);const _0x2deeb9=[];if(_0x2eed88?.[_0x5aef5f(0x21e)]?.['on'])for(const _0x495f56 of _0x4f9294){const _0x5c4f96=_0x4ff193=>{_0x147ad4({[_0x591097]:_0x28e962,'event':_0x495f56,'data':_0x4ff193??{}});};_0x2eed88[_0x5aef5f(0x21e)]['on'](_0x495f56,_0x5c4f96),_0x2deeb9[_0x5aef5f(0x2c1)]({'event':_0x495f56,'handler':_0x5c4f96});}const _0x4a734d=setInterval(()=>{_0x1760a0(),_0x857ca8();},_0xd15276);_0x4a734d['unref']?.();const _0x3b13ff=(_0x12c428,_0x20d8e0)=>{const _0x1209b6=_0x5aef5f;if(!_0x20d8e0||typeof _0x20d8e0!==_0x1209b6(0x112)||_0x20d8e0[_0x591097]!==_0x56c702)return;if(!_0x2eed88?.[_0x1209b6(0x201)]?.[_0x1209b6(0x118)])return;const _0x1b082c=_0x20d8e0['entry']||{};_0x2eed88[_0x1209b6(0x201)][_0x1209b6(0x118)]({..._0x1b082c,'msg':'[w'+_0x20d8e0[_0x1209b6(0x199)]+']\x20'+(_0x1b082c[_0x1209b6(0xaa)]??''),'meta':{..._0x1b082c['meta']||{},'worker':_0x20d8e0[_0x1209b6(0x199)],'workerPid':_0x20d8e0[_0x1209b6(0x2af)]}});};_0x543c4a['on'](_0x5aef5f(0x262),_0x3b13ff);const _0x332460=(_0x3aac23,_0x3c57bc)=>{const _0x339505=_0x5aef5f;if(!_0x3c57bc||typeof _0x3c57bc!=='object'||_0x3c57bc[_0x591097]!==_0xb6ef70)return;const _0x1c83bb=_0x485219[_0x339505(0x195)](_0x3aac23[_0x339505(0x1a3)][_0x339505(0x2af)]);if(_0x1c83bb){_0x1c83bb[_0x339505(0x266)]={..._0x3c57bc[_0x339505(0x266)],'at':Date[_0x339505(0x219)]()};if(_0x3c57bc[_0x339505(0xf4)]!==undefined)_0x1c83bb['processing']=_0x3c57bc[_0x339505(0xf4)];}};_0x543c4a['on'](_0x5aef5f(0x262),_0x332460),_0x543c4a['on'](_0x5aef5f(0x180),(_0x38a0de,_0x44ea2d,_0x35fff4)=>{const _0x1f23d2=_0x5aef5f,_0x4f2b55=_0x38a0de[_0x1f23d2(0x1a3)][_0x1f23d2(0x2af)],_0xca82e5=_0x36e511(_0x38a0de),_0xcffcd7=_0x485219[_0x1f23d2(0x195)](_0x4f2b55);if(_0xcffcd7&&_0x2eed88?.[_0x1f23d2(0x182)])_0x2eed88[_0x1f23d2(0x182)]['removeNode'](_0x4f2b55+':'+_0xcffcd7['startedAt'])['catch'](()=>{});_0x485219['delete'](_0x4f2b55),console[_0x1f23d2(0x201)](_0x1f23d2(0x2ae)+_0x4f2b55+'\x20(slot='+(_0xca82e5??'?')+_0x1f23d2(0x2c8)+(_0x1f23d2(0x12d)+_0x44ea2d+_0x1f23d2(0x21f)+(_0x35fff4??_0x1f23d2(0x145))+_0x1f23d2(0xd0)+_0x485219[_0x1f23d2(0xc4)]+'\x20worker(s)\x20remaining')),_0x857ca8();if(_0x59fc5b||_0xca82e5==null)return;const _0x393b6d=_0x2e9e0f['get'](_0xca82e5);if(!_0x393b6d||_0x393b6d[_0x1f23d2(0x1b7)])return;const _0x2953d5=Date[_0x1f23d2(0x219)]();_0x393b6d['deaths'][_0x1f23d2(0x2c1)](_0x2953d5),_0x393b6d[_0x1f23d2(0xc7)]=_0x393b6d['deaths'][_0x1f23d2(0x2d5)](_0x51262e=>_0x2953d5-_0x51262e<=_0x2ad0b4);if(_0x393b6d[_0x1f23d2(0xc7)][_0x1f23d2(0x1c4)]>=_0x199441){_0x393b6d[_0x1f23d2(0x1b7)]=!![],console[_0x1f23d2(0x192)](_0x1f23d2(0x278)+_0xca82e5+_0x1f23d2(0x1eb)+_0x393b6d[_0x1f23d2(0xc7)][_0x1f23d2(0x1c4)]+_0x1f23d2(0x1d7)+(_0x2ad0b4+_0x1f23d2(0x10d)+_0x485219['size']+'\x20worker(s)\x20still\x20serving'));return;}_0x393b6d['consecutiveFailures']++;const _0x22cbd1=Math[_0x1f23d2(0x203)](_0x4af729,_0x189b09*0x2**(_0x393b6d[_0x1f23d2(0x1a7)]-0x1));console['log'](_0x1f23d2(0xe1)+_0xca82e5+_0x1f23d2(0xb9)+_0x22cbd1+_0x1f23d2(0x2db)+_0x393b6d[_0x1f23d2(0x1a7)]+')'),_0x393b6d[_0x1f23d2(0x200)]=setTimeout(()=>{const _0x581926=_0x1f23d2;_0x393b6d['respawnTimer']=null;if(_0x59fc5b||_0x393b6d['dead'])return;const _0x31ec65=_0x226fb2(_0xca82e5);_0x31ec65[_0x581926(0x1ab)](_0x581926(0x185),()=>{const _0x293355=_0x581926;if(_0x2e9e0f[_0x293355(0x195)](_0xca82e5)===_0x393b6d)_0x393b6d['consecutiveFailures']=0x0;});},_0x22cbd1),_0x393b6d[_0x1f23d2(0x200)][_0x1f23d2(0x181)]?.();});const _0x4f36d0=[..._0x485219[_0x5aef5f(0x100)]()];console[_0x5aef5f(0x201)](_0x5aef5f(0xeb)+process[_0x5aef5f(0x2af)]+'\x20forked\x20'+_0x3a1812+_0x5aef5f(0x176)+_0x535fc1+':\x20'+('['+_0x4f36d0[_0x5aef5f(0x1f9)](',\x20')+']'));const _0x27939b={'_isClusterController':!![],'port':_0x535fc1,'primaryOkdb':_0x2eed88??null,'status'(){const _0x253c34=_0x5aef5f;return{'clustered':!![],'primaryPid':process[_0x253c34(0x2af)],'port':_0x535fc1,'primaryRole':_0x2eed88?.[_0x253c34(0x140)]??null,'processorPid':null,'supervisorPid':process[_0x253c34(0x2af)],'workers':[..._0x485219['values']()]['map'](({worker:_0x24f4ff})=>({'pid':_0x24f4ff[_0x253c34(0x1a3)][_0x253c34(0x2af)],'id':_0x24f4ff['id'],'dead':_0x24f4ff[_0x253c34(0x204)]()}))};},async 'close'(){const _0x5b564b=_0x5aef5f;_0x59fc5b=!![];for(const _0x59ee9c of _0x2e9e0f[_0x5b564b(0x251)]()){_0x59ee9c[_0x5b564b(0x1b7)]=!![],_0x59ee9c[_0x5b564b(0x200)]&&(clearTimeout(_0x59ee9c['respawnTimer']),_0x59ee9c[_0x5b564b(0x200)]=null);}clearInterval(_0x4a734d),_0x543c4a[_0x5b564b(0x193)]('message',_0x3b13ff),_0x543c4a[_0x5b564b(0x193)](_0x5b564b(0x262),_0x332460),_0x2eed88?.['events']?.['off']?.(_0x21a053['SYSTEM_PROC'],_0x4707f8);if(_0x2eed88?.[_0x5b564b(0x21e)]?.['off'])for(const {event:_0x22a15d,handler:_0x232203}of _0x2deeb9){try{_0x2eed88[_0x5b564b(0x21e)][_0x5b564b(0x193)](_0x22a15d,_0x232203);}catch{}}_0x2deeb9[_0x5b564b(0x1c4)]=0x0;const _0x56fe1a=[..._0x485219[_0x5b564b(0x251)]()][_0x5b564b(0x284)](({worker:_0x476218})=>_0x476218);if(_0x56fe1a[_0x5b564b(0x1c4)]===0x0)return;await Promise[_0x5b564b(0x12c)](_0x56fe1a[_0x5b564b(0x284)](_0x163293=>new Promise(_0x40342b=>{const _0xb6aa0d=_0x5b564b;if(_0x163293[_0xb6aa0d(0x204)]()){_0x40342b();return;}let _0x518a96=![];const _0x3c63d5=()=>{if(_0x518a96)return;_0x518a96=!![];if(_0xa97082)clearTimeout(_0xa97082);_0x40342b();};_0x163293['once'](_0xb6aa0d(0x180),_0x3c63d5);const _0xa97082=setTimeout(()=>{const _0x1daf51=_0xb6aa0d;try{_0x163293[_0x1daf51(0x1a3)]['kill']();}catch{}},_0x2c38ab+0x1f4);_0xa97082['unref']?.();try{_0x163293[_0xb6aa0d(0x11d)]();}catch{try{_0x163293['process']['kill']();}catch{}}})));}};return _0x27939b;}async function _0x4b6aec({makeOkdb:_0x3c2ac5,port:_0x22299c}){const _0x302ab5=_0x47f2b0,_0xb6bcb6=await _0x3c2ac5();return _0x2f6db0(_0xb6bcb6),_0xb6bcb6[_0x302ab5(0x103)][_0x302ab5(0x1fe)](_0x22299c);}function _0x2f6db0(_0x1ec54d){const _0x36fc69=_0x47f2b0;if(!_0x1ec54d||_0x1ec54d[_0x36fc69(0x285)])return;_0x1ec54d[_0x36fc69(0x285)]=!![];try{const {OKDBChangefeed:_0x21e40f}=requireOkdbChangefeed(),_0x46f494=_0x1ec54d[_0x36fc69(0xd7)];if(_0x46f494&&typeof _0x46f494[_0x36fc69(0x2bc)]===_0x36fc69(0x226)){const _0x495e00=new _0x21e40f(_0x1ec54d);_0x495e00[_0x36fc69(0x1c6)](),_0x46f494['attachFeed'](_0x495e00),_0x1ec54d[_0x36fc69(0x22c)]=_0x495e00;}}catch(_0x9c4cdd){_0x1ec54d[_0x36fc69(0x201)]?.[_0x36fc69(0x1dd)]?.(_0x36fc69(0x24a)+(_0x9c4cdd?.[_0x36fc69(0x262)]??_0x9c4cdd),{'feature':_0x36fc69(0x1bc)});}const _0x483b01=_0x218d9b=>{const _0x2ce55a=_0x36fc69;if(!_0x218d9b||typeof _0x218d9b!==_0x2ce55a(0x112)||_0x218d9b[_0x591097]==null)return;if(_0x218d9b[_0x591097]===_0x28e962)try{_0x1ec54d[_0x2ce55a(0xd7)]?.[_0x2ce55a(0x2c4)]?.(_0x218d9b[_0x2ce55a(0x17e)],_0x218d9b['data']);}catch{}};process['on'](_0x36fc69(0x262),_0x483b01),_0x1ec54d['_clusterOnMessage']=_0x483b01;{let _0x566821=process[_0x36fc69(0x191)](),_0x16a2f4=Date[_0x36fc69(0x219)]();const _0x5f7d49=()=>{const _0x3ae4f7=_0x36fc69;if(typeof process[_0x3ae4f7(0x148)]!==_0x3ae4f7(0x226)||!process[_0x3ae4f7(0x293)])return;const _0x2bb5c1=Date[_0x3ae4f7(0x219)](),_0x5b100e=process[_0x3ae4f7(0x191)](),_0x1b1f87=(_0x2bb5c1-_0x16a2f4)*0x3e8,_0x126ab1=_0x5b100e['user']-_0x566821['user']+(_0x5b100e[_0x3ae4f7(0x24b)]-_0x566821[_0x3ae4f7(0x24b)]),_0x5758b5=_0x1b1f87>0x0?Math[_0x3ae4f7(0x203)](0x64,Math['round'](_0x126ab1/(_0x1b1f87*(_0x586975['cpus']()['length']||0x1))*0x64)):0x0;_0x566821=_0x5b100e,_0x16a2f4=_0x2bb5c1;const _0x38d899=process[_0x3ae4f7(0x144)]();let _0x10d0b1=null;try{_0x10d0b1=_0x1ec54d[_0x3ae4f7(0x140)]?.[_0x3ae4f7(0x124)]?_0x1ec54d[_0x3ae4f7(0x182)]?.[_0x3ae4f7(0xb6)]?.()??null:null;}catch{}try{process['send']({[_0x591097]:_0xb6ef70,'stats':{'rss':_0x38d899['rss'],'heapUsed':_0x38d899[_0x3ae4f7(0xa9)],'heapTotal':_0x38d899[_0x3ae4f7(0x1bb)],'external':_0x38d899['external'],'cpuPct':_0x5758b5,'cpuWindowMs':Math[_0x3ae4f7(0x2c9)](_0x1b1f87/0x3e8)||null},'processing':_0x10d0b1});}catch{}},_0x1662ae=Math['max'](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0xeca21d=setInterval(_0x5f7d49,_0x1662ae);_0xeca21d[_0x36fc69(0x181)]?.(),_0x5f7d49();for(const _0x5cdf6a of['processor:paused',_0x36fc69(0x14f)]){_0x1ec54d[_0x36fc69(0x21e)]?.['on']?.(_0x5cdf6a,()=>{try{_0x5f7d49();}catch{}});}}let _0x224ba1=![];const _0x114851=async _0x199503=>{const _0x438683=_0x36fc69;if(_0x224ba1)return;_0x224ba1=!![];const _0x30f230=setTimeout(()=>process[_0x438683(0x180)](_0x199503),_0x2c38ab);_0x30f230[_0x438683(0x181)]?.();try{await _0x1ec54d[_0x438683(0x1ef)]?.();}catch{}process[_0x438683(0x180)](_0x199503);};process['on'](_0x36fc69(0x11d),()=>_0x114851(0x0));if(process['platform']!==_0x36fc69(0x186)){const _0x25e410=setInterval(()=>{const _0x3b3969=_0x36fc69;if(process[_0x3b3969(0x2b1)]===0x1)_0x114851(0x0);},_0x54da0a);_0x25e410['unref']?.(),_0x1ec54d['_clusterOrphanWatch']=_0x25e410;}}return okdbCluster={'runClustered':_0xe9b296,'attachWorkerCluster':_0x2f6db0},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x835cbc=require$$0$5,{attachWorkerCluster:_0x3c7a3a}=requireOkdbCluster();async function _0x4921e7(){const _0x2cd1b2=_0x30d0,_0x1ad461=process.env.OKDB_HTTP_CHILD;if(!_0x1ad461)throw new Error('okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing');const {rootPath:_0xd56a9b,port:_0x4d0344,options:options={},logLevel:logLevel=_0x2cd1b2(0x15d)}=JSON[_0x2cd1b2(0x1cb)](_0x1ad461);if(!_0xd56a9b||!_0x4d0344)throw new Error(_0x2cd1b2(0x2bb));const _0x2753d3=new _0x835cbc(_0xd56a9b,{...options,'engines':![],'processors':![],'compaction':![]});_0x2753d3[_0x2cd1b2(0x201)][_0x2cd1b2(0x292)]?.();const _0x51e214=process.env.OKDB_CLUSTER_SLOT??'?',_0x1a16ae={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x3a7a04=_0x1a16ae[logLevel]??_0x1a16ae[_0x2cd1b2(0x15d)];_0x2753d3['log'][_0x2cd1b2(0x1d8)](_0x39083e=>{const _0xe8de14=_0x2cd1b2;if((_0x1a16ae[_0x39083e[_0xe8de14(0x2a4)]]??0x1)<_0x3a7a04)return;try{process[_0xe8de14(0x148)]?.({'__okdbCluster':_0xe8de14(0x201),'slot':_0x51e214,'pid':process['pid'],'entry':_0x39083e});}catch{}}),await _0x2753d3['open'](),_0x3c7a3a(_0x2753d3),await _0x2753d3['http']['listen'](_0x4d0344);}return _0x4921e7()['catch'](_0x539054=>{const _0x5999e3=_0x30d0;try{process[_0x5999e3(0x148)]?.({'__okdbCluster':_0x5999e3(0x201),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x5999e3(0x2af)],'entry':{'level':'error','msg':_0x5999e3(0x2ca)+(_0x539054?.[_0x5999e3(0x262)]??_0x539054)}});}catch{}process[_0x5999e3(0x180)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module[_0x74f0a9(0x271)]=okdbHttpWorkerChild;
1
+ 'use strict';const _0x3b4fb0=_0x55dd;function _0x2fbd(){const _0x35e54d=['rowKey',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','license:activated','loop-lag','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','_caps','publishChildRow','_lastCpuWindowMs','fanout','ITEM_UPDATE','heartbeatMs','ENV_CLOSING_RETRY','txn:start','none','transaction','single','change','SIGKILL','http-server','system:bus_state_change','ready','FTS_REGISTERED','message','parkedNow','setDesired','open','cli','./okdb','ORPHAN\x20(env-closed\x20write)','split','registry-publish','_log','ms\x20mean=','queue-worker','waiting','_coordinator','_buildOwnRow','decommissioning','_kind','_bpParkedTotal',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','_writer','cpuPct','_putRowAsync','_nodeDb','removeNode','fork','compact','resolve','_closed','markClosed','dead','updateSupervisedChildStats','getChanges','afterWrite','mkdirSync','isDead','_seen','listNodes','FTS_RESET','clusterStatusView','building','cluster','treeView','_envs','SYSTEM_STOPPED','\x20writer{depth=','namespace','_isReader','_removeRowAsync','attach','stats','__vocab/version','dropSchema','add','_systemEnv','options',':want','_lastPublishAt','entry','list','isWorker','ITEM_CREATE','claimGated','rss','processor:ready','remove','all','license:added','committed','REMOVE','_collectSingletonClaims','tryAcquire','_enableChangelog','keys','uncaughtException','_threadStats','1171310wrRBoe','running','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','~lock','2.3.4','stopping','primary','[okdb-cluster]\x20respawning\x20worker\x20slot=','string','processor:progress','crypto','hard-killed','next','compaction','lifecycle','beforeWrite','_publishFailWarned','_cmd','stack','processor:paused','setupPrimary','warn','nodesView','_processStartedAt','parse','raw-put','_db','transactionSync','\x20===','exit','prependListener','_statusEnv','participate','_role','error:\x20','_handlePoke','ppid','ms\x20on\x20env=','_singletonLock','dropType','user','halted','ITEM_REMOVE','ttl:clear','function','--inspect','_instanceId','\x20\x20(no\x20env\x20draining)','_clusterOrphanWatch','\x20statusEnv=','map','schema:set','_versionSkewWarned','ephemeral','procmodeack/','dedupeMax','_putRowSync','_onItem','_groupByProcess','env','memoryUsage','node:events','processor','started','engines','push','_inflight','setTtl','true','cursorKey','_wantDbHandle','migrations','http','platform','loop-lag\x20','\x20drainAge=','processor:retry','cluster-wide','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','_enqueuedAt','system:env_release','_sampleOwnStats','sync','starting','runtimeProcessesView','commitsPerSec','8AwiasC','splice','_dedupeMax','_clusterWorkerAttached','_report','_lock','test','fn-runner','_maybePublish','system:poke','http\x20worker\x20child\x20failed:\x20','index:drop','setSchema','_handleInProcess','sort','commit','ms\x20p99=','nodeKey','item:create','indexOf','start','bumpCmd','72726WgOMyF','flushDebounce','ESRCH','processor:resumed','--print','deregisterSelf','getRange','addSupervisedChild','startHeartbeat','system:stopped','_rootDb','INDEX_PROGRESS','openDB','ingest','bus:poke','INDEX_REGISTERED','processor:error','maxExtra','filter','_released','depth','recent\x20writes\x20(newest\x20first)','registerIndex','process','listen','stderr','attachFeed','processingStatusView','disable','_getType','unref','_quantum','_onTick','mode','_buildChildRow','setOwnMeta','item:update','info','\x20@\x20','_drain','write','_nodeDbFor','kill','_outstanding','heapTotal','\x20\x20#','send','putSync','processorId','system:clock_change','_onPoke','_started','view:progress','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','number','now','_lockDb','values','decommissioned','getProcess','_hbTimer','~processes','appendFileSync','shift','percentile','SYSTEM_PROC','label','code','okdb-writer:\x20env\x20closing\x20—\x20retry','_listenAddr','processors','toISOString','_heldTotal','ttlMs','uptime','ms\x20env=','close','license:removed','version','_buckets','_lastCpuPct','--eval','reap','meta','maxMs','isActive','_nodeDbCache','online','msg','path','field:resolver_registered','\x20(slot=','__esModule','busy','join','[okdb-cluster]\x20primary\x20pid=','seq','supervisorKey','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','count','processKey','\x20parkedNow=','__okdbCluster','_singletonLocks','startsWith','SYNC_COMMITS','bus:type_drop','unique:violation_resolved','getDesired','cpuUsage','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','load','_desired','\x20oldestPendingMs=','6924910QgGpnC','ms\x20activeWriters=','_flushTimer','slice','freeze','removeSupervisedChild','resetting','_admissionTimer','_draining','toFixed','_activateProcesses','entries','_ensureDesired','fast','resetIndex','publishOwnRow','startedAt','replace','_wantDb','creating','enabled','\x20pid=','respawnTimer','515OcrkpI','type:registered','length','unclaimed','okdb-writer[','resetFts','\x20forked\x20','value','repeat','mean','getCmd','_migrateVocab','inflightAgesMs','threads','ttl:expired','stop','_acquiredAt','call','feed:','_nodeDead','_adminRelay','procmode/','_heartbeatInFlight','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','state','inspect','_heartbeatTimer','registerType','object','_highWater','getClock','removeSync','stopHeartbeat','ms\x20busy=','sandbox','listAll','_holderDead','_onProcEvent','has','singletonClaims','\x20ipc\x20error:\x20','pushEphemeral','drain','status','node/','execArgv','(worst\x20','enable','_drainOne','min','_pending','slot','\x20—\x20','quantum','confirm','reportThreadStats','events','selfKey','\x20in\x20','acquiredAt','_committed','_selfKey','get','host','error','sync:apply','_collectWriterFacet','randomUUID','data','heapUsed','SYSTEM_POKE','okdb-diag.','_bpWaiters','size','exports','_changefeed','caps','_clusterOnMessage','resetReadTxn','stringify','~processes:desired','embedded','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','isEnabled','index:registered','11218446Nqvvgg','fromEntries','decommission','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','assign','deaths','ref:violation','\x20worker(s)\x20remaining','set','round','expiresAt','_markSeen','40lvZwKR','register','process\x20','children','system','reset','_desiredOverlay','_participate','put','reject','noteListenAddr','\x0a===\x20OKDB_DIAG\x20','listenAddr','\x20while\x20this\x20process\x20runs\x20','max','hasDesired','stopped','detachConsole','_refreshDesiredSnapshot','cluster:','holder','raw-remove','txn:rollback','_cursors','role','okdb','FTS_DROP','\x20times\x20in\x20','_startedAt','index:progress','registry\x20publish\x20failing:\x20','default','catch','async','slotKey','draining','clearThreadStats','ttl:set','off','_publishNow','note','\x0a\x20\x20\x20\x20\x20\x20','external','listDesired','tierList','_startHeartbeat','log','consecutiveFailures','epoch','delete','_admissionStarted','index:reset','8183042FQVOzb','_key','_startAdmission','release','find','_rawDb','_isWriter','disconnect','_held','floor','_rowKey','env:opened','_onStop','clear','ms\x20(attempt\x20','once','cpus','dropFts','hostname','system:ready','200775mxTCYg','ms\x20max=','INDEX_READY','_baselines','dumpedAt','processes','_windowCbs','pid','_flushDebounce','processorsView',');\x20','fts:drop','recordWrite','[okdb-cluster]\x20worker\x20pid=','offWindow','txn:end','fts:registered','emit','_lastCpuAt','_supervisorKey','_buildProcessingFacet','_scheduleFlush','extend','type','flushLmdb','allSettled','_timer','clearTtl','processing','_durs','copy','isHeld','1624498jGPsKR','system:type_drop','prototype','_ownMeta','then','_done','view','setLogger','dropping','putNode','_sandbox','level','includes','_servingEngines','updatedAt','childTransaction','oldestPendingMs','kind','killable','_children','[okdb-cluster]\x20','signalWant'];_0x2fbd=function(){return _0x35e54d;};return _0x2fbd();}(function(_0x1f2244,_0x182d0c){const _0x32e69b=_0x55dd,_0x5b3ea0=_0x1f2244();while(!![]){try{const _0x457f38=-parseInt(_0x32e69b(0x359))/0x1+parseInt(_0x32e69b(0x2e1))/0x2+-parseInt(_0x32e69b(0x2c1))/0x3*(-parseInt(_0x32e69b(0x279))/0x4)+-parseInt(_0x32e69b(0x218))/0x5*(-parseInt(_0x32e69b(0x3c5))/0x6)+parseInt(_0x32e69b(0x2ad))/0x7+parseInt(_0x32e69b(0x3af))/0x8*(-parseInt(_0x32e69b(0x26d))/0x9)+-parseInt(_0x32e69b(0x201))/0xa;if(_0x457f38===_0x182d0c)break;else _0x5b3ea0['push'](_0x5b3ea0['shift']());}catch(_0x1bf491){_0x5b3ea0['push'](_0x5b3ea0['shift']());}}}(_0x2fbd,0xc08c1));function _0x55dd(_0x55c56c,_0xfa2227){_0x55c56c=_0x55c56c-0x1cb;const _0x2fbdac=_0x2fbd();let _0x55dd18=_0x2fbdac[_0x55c56c];return _0x55dd18;}var require$$0$5=require(_0x3b4fb0(0x313)),require$$1$1=require('cluster'),require$$1=require(_0x3b4fb0(0x1e7)),require$$0$3=require('os'),require$$2=require(_0x3b4fb0(0x363)),require$$0=require('node:perf_hooks'),require$$0$2=require('perf_hooks'),require$$0$1=require('fs'),require$$0$4=require(_0x3b4fb0(0x396));function getDefaultExportFromCjs(_0x49b1e5){const _0x55c1be=_0x3b4fb0;return _0x49b1e5&&_0x49b1e5[_0x55c1be(0x1ea)]&&Object[_0x55c1be(0x2e3)]['hasOwnProperty'][_0x55c1be(0x229)](_0x49b1e5,_0x55c1be(0x298))?_0x49b1e5['default']:_0x49b1e5;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x42820e=_0x3b4fb0;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x53288b={'PUT':'put','REMOVE':'remove','INDEX_DROP':'dropIndex','INDEX_REGISTER':_0x42820e(0x3db),'INDEX_RESET':_0x42820e(0x20f),'TYPE_REGISTER':_0x42820e(0x233),'TYPE_DROP':_0x42820e(0x380),'FTS_REGISTER':'registerFts','FTS_DROP':_0x42820e(0x2be),'FTS_RESET':_0x42820e(0x21d),'SCHEMA_SET':_0x42820e(0x3bb),'SCHEMA_DROP':_0x42820e(0x341),'TTL_SET':_0x42820e(0x39c),'TTL_CLEAR':_0x42820e(0x2dc)},_0x2c5487={'SYSTEM_READY':_0x42820e(0x2c0),'FIELD_RESOLVER_REGISTERED':_0x42820e(0x1e8),'SYSTEM_STOPPED':_0x42820e(0x3ce),'SYSTEM_CLOCK_CHANGE':_0x42820e(0x3f6),'SYSTEM_POKE':_0x42820e(0x3b8),'SYSTEM_DRAIN':'system:drain','SYSTEM_TYPE_DROP':_0x42820e(0x2e2),'SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x42820e(0x30b),'ITEM_CREATE':_0x42820e(0x3c1),'ITEM_UPDATE':_0x42820e(0x3e9),'ITEM_REMOVE':'item:remove','INDEX_RESET':_0x42820e(0x2ac),'INDEX_READY':'index:ready','INDEX_PROGRESS':_0x42820e(0x296),'VIEW_PROGRESS':_0x42820e(0x3f9),'INDEX_DROP':_0x42820e(0x3ba),'INDEX_REGISTERED':_0x42820e(0x26c),'FTS_REGISTERED':_0x42820e(0x2d1),'FTS_DROP':_0x42820e(0x2cc),'FTS_RESET':'fts:reset','SCHEMA_SET':_0x42820e(0x38c),'SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0x42820e(0x1fa),'REF_VIOLATION':_0x42820e(0x273),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x42820e(0x259),'TXN_START':_0x42820e(0x304),'TXN_END':_0x42820e(0x2d0),'TXN_ROLLBACK':_0x42820e(0x28f),'TYPE_REGISTERED':_0x42820e(0x219),'TYPE_DROP':'type:drop','ENV_OPENED':_0x42820e(0x2b8),'ENV_REMOVED':'env:removed','SYSTEM_ENV_RELEASE':_0x42820e(0x3a9),'TTL_EXPIRED':_0x42820e(0x226),'TTL_SET':_0x42820e(0x29e),'TTL_CLEAR':_0x42820e(0x384),'LICENSE_INVALID':'license:invalid','LICENSE_ADDED':_0x42820e(0x350),'LICENSE_ACTIVATED':_0x42820e(0x2fa),'LICENSE_REMOVED':_0x42820e(0x1db)},_0x2f3202={'CREATING':_0x42820e(0x214),'RESETTING':_0x42820e(0x207),'READY':_0x42820e(0x30c),'DROPPING':_0x42820e(0x2e9),'WAITING':_0x42820e(0x31a),'ERROR':_0x42820e(0x258)},_0xadee31={'CREATED':'created','STARTING':_0x42820e(0x3ac),'STARTED':_0x42820e(0x398),'STOPPING':_0x42820e(0x35e),'STOPPED':_0x42820e(0x289)},_0x32dd5d={'CREATING':'creating','READY':'ready','HALTED':_0x42820e(0x382),'STOPPED':_0x42820e(0x289),'RESETTING':_0x42820e(0x207)},_0x1bb843=Object[_0x42820e(0x205)]({'POKE':_0x42820e(0x3d3),'DRAIN':'bus:drain','TYPE_DROP':_0x42820e(0x1f9),'PROC':'bus:proc','ENV_RELEASE':'bus:env_release'});return okdbEnums={'BUS_EVENTS':_0x1bb843,'CHANGE_ACTIONS':_0x53288b,'EVENTS':_0x2c5487,'INDEX_STATE':_0x2f3202,'OKDB_STATE':_0xadee31,'VIEW_STATE':_0x32dd5d},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x3bebcb=_0x3b4fb0;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x4026e7,performance:_0x583838}=require$$0,_0xb06de1=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x3bebcb(0x39d),_0x56118b=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x4f924c=process.env.OKDB_LOOP_LAG_ALL==='1',_0x30e64=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x4d5af7{constructor(){const _0x10f9a8=_0x3bebcb;this[_0x10f9a8(0x215)]=_0xb06de1,this[_0x10f9a8(0x1dd)]=new Map(),this['_h']=null,this[_0x10f9a8(0x2db)]=null,this[_0x10f9a8(0x3f8)]=![],this[_0x10f9a8(0x317)]=(_0x34a1ed,_0x21f342)=>process[_0x10f9a8(0x3de)]['write'](_0x34a1ed+(_0x21f342?'\x20'+JSON[_0x10f9a8(0x267)](_0x21f342):'')+'\x0a');}[_0x3bebcb(0x3fc)](){return _0x583838['now']();}[_0x3bebcb(0x2e8)](_0x553573){const _0x250908=_0x3bebcb;if(typeof _0x553573===_0x250908(0x385))this['_log']=_0x553573;}[_0x3bebcb(0x2a1)](_0x398d0d,_0x6125fd,_0x3656f5){const _0x1d8516=_0x3bebcb;if(!this[_0x1d8516(0x215)])return;let _0x36bf9e=this[_0x1d8516(0x1dd)][_0x1d8516(0x256)](_0x398d0d);!_0x36bf9e&&(_0x36bf9e={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x1d8516(0x1dd)][_0x1d8516(0x275)](_0x398d0d,_0x36bf9e)),_0x36bf9e['ms']+=_0x6125fd,_0x36bf9e[_0x1d8516(0x1f2)]+=0x1,_0x6125fd>_0x36bf9e['maxMs']&&(_0x36bf9e[_0x1d8516(0x1e2)]=_0x6125fd,_0x36bf9e[_0x1d8516(0x3d6)]=_0x3656f5||'');}[_0x3bebcb(0x3c3)](_0x4e9de5){const _0x4f7163=_0x3bebcb;if(!this['enabled']||this[_0x4f7163(0x3f8)])return;this[_0x4f7163(0x3f8)]=!![];if(_0x4e9de5)this[_0x4f7163(0x317)]=_0x4e9de5;this['_h']=_0x4026e7({'resolution':0xa}),this['_h'][_0x4f7163(0x247)](),this[_0x4f7163(0x2db)]=setInterval(()=>this[_0x4f7163(0x3b3)](),_0x56118b);if(this[_0x4f7163(0x2db)]['unref'])this[_0x4f7163(0x2db)]['unref']();}['onWindow'](_0x1f14b1){const _0x3f017f=_0x3bebcb;if(!this[_0x3f017f(0x2c7)])this['_windowCbs']=new Set();this[_0x3f017f(0x2c7)]['add'](_0x1f14b1);if(!this[_0x3f017f(0x3f8)])this['_startAdmission']();}[_0x3bebcb(0x2cf)](_0x103a85){const _0x2a7aea=_0x3bebcb;this[_0x2a7aea(0x2c7)]?.['delete'](_0x103a85);}[_0x3bebcb(0x2af)](){const _0x17fd32=_0x3bebcb;if(this[_0x17fd32(0x2ab)])return;this[_0x17fd32(0x2ab)]=!![];!this['_h']&&(this['_h']=_0x4026e7({'resolution':0xa}),this['_h'][_0x17fd32(0x247)]());const _0xc8cee9=_0x56118b;this['_admissionTimer']=setInterval(()=>{const _0x84bd13=_0x17fd32,_0x450a63=this['_h'];if(!_0x450a63)return;const _0x43cd21=_0x450a63['percentile'](0x63)/0xf4240,_0x38095c=_0x450a63[_0x84bd13(0x287)]/0xf4240,_0xa25610=_0x450a63[_0x84bd13(0x221)]/0xf4240;_0x450a63[_0x84bd13(0x27e)]();if(this[_0x84bd13(0x2c7)])for(const _0x3ff269 of this[_0x84bd13(0x2c7)]){try{_0x3ff269({'p99Ms':_0x43cd21,'maxMs':_0x38095c,'meanMs':_0xa25610,'reportMs':_0xc8cee9});}catch{}}},_0xc8cee9);if(this[_0x17fd32(0x208)][_0x17fd32(0x3e3)])this[_0x17fd32(0x208)]['unref']();}[_0x3bebcb(0x3b3)](){const _0x16835c=_0x3bebcb,_0x41ead0=this['_h'],_0x2640be=_0x41ead0['max']/0xf4240,_0x2aa1d5=_0x41ead0[_0x16835c(0x1ce)](0x63)/0xf4240,_0x5a62dd=_0x41ead0['mean']/0xf4240;_0x41ead0['reset']();const _0x242b4c=[...this[_0x16835c(0x1dd)][_0x16835c(0x20c)]()][_0x16835c(0x38b)](([_0x225cbc,_0x5f26fd])=>({'label':_0x225cbc,..._0x5f26fd}))[_0x16835c(0x3bd)]((_0x101e12,_0x412cc8)=>_0x412cc8['ms']-_0x101e12['ms'])['slice'](0x0,0x8);this[_0x16835c(0x1dd)][_0x16835c(0x2ba)]();const _0x29b0a5=_0x242b4c['reduce']((_0x2043d9,_0x386663)=>_0x2043d9+_0x386663['ms'],0x0),_0x5957af=_0x242b4c[_0x16835c(0x38b)](_0x394162=>_0x394162[_0x16835c(0x1d0)]+'='+_0x394162['ms']['toFixed'](0x0)+'ms/'+_0x394162['count']+(_0x394162[_0x16835c(0x1e2)]>0x5?_0x16835c(0x246)+_0x394162['maxMs'][_0x16835c(0x20a)](0x0)+'ms'+(_0x394162[_0x16835c(0x3d6)]?'\x20'+_0x394162[_0x16835c(0x3d6)]:'')+')':''));(_0x4f924c||_0x2640be>=_0x30e64)&&this[_0x16835c(0x317)](_0x16835c(0x3a3)+_0x56118b+_0x16835c(0x2c2)+_0x2640be[_0x16835c(0x20a)](0x0)+_0x16835c(0x3bf)+_0x2aa1d5[_0x16835c(0x20a)](0x0)+_0x16835c(0x318)+_0x5a62dd[_0x16835c(0x20a)](0x0)+_0x16835c(0x239)+_0x29b0a5[_0x16835c(0x20a)](0x0)+'ms'+(_0x5957af[_0x16835c(0x21a)]?'\x20│\x20'+_0x5957af['join']('\x20\x20'):''),{'feature':_0x16835c(0x2fb)});if(this[_0x16835c(0x2c7)])for(const _0x440f7d of this[_0x16835c(0x2c7)]){try{_0x440f7d({'p99Ms':_0x2aa1d5,'maxMs':_0x2640be,'meanMs':_0x5a62dd,'reportMs':_0x56118b});}catch{}}}[_0x3bebcb(0x227)](){const _0x31aab9=_0x3bebcb;if(this[_0x31aab9(0x2db)])clearInterval(this[_0x31aab9(0x2db)]);if(this['_h'])this['_h'][_0x31aab9(0x3e1)]();this['_timer']=null,this['_h']=null,this[_0x31aab9(0x3f8)]=![];}}const _0x19b181=new _0x4d5af7();if(_0x19b181[_0x3bebcb(0x215)])_0x19b181[_0x3bebcb(0x3c3)]();return okdbLoopMonitor={'LOOP':_0x19b181},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x376412=require$$0$1,_0x40d66b=require$$1;let _0x280b67,_0x11aadf,_0x28c07d,_0x419227,_0x1d90eb,_0x11bc3d,_0x362ad6,_0x3f25b1=![];const _0x5e875f=new Set();let _0x50c4c5=null;const _0x2e27e0=new Map();function _0x55d051(){const _0x1627d6=_0x55dd;if(_0x280b67!==undefined)return _0x280b67;_0x280b67=process.env.OKDB_DIAG==='1';if(!_0x280b67)return![];_0x11aadf=process.env.OKDB_DIAG_STACK==='1',_0x419227=Math[_0x1627d6(0x287)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x28c07d=new Array(_0x419227),_0x1d90eb=0x0,_0x11bc3d=0x0,_0x362ad6=process.env.OKDB_DIAG_DIR||null;if(_0x362ad6)try{_0x376412[_0x1627d6(0x32f)](_0x362ad6,{'recursive':!![]});}catch{}return!![];}function _0xb7a045(){return _0x280b67===undefined?_0x55d051():_0x280b67;}function _0x5d1c05(_0x2d184f,_0x429ede){const _0x17ed5c=_0x55dd;if(_0x280b67===undefined?!_0x55d051():!_0x280b67)return;let _0x2c09bb;if(_0x11aadf){const _0x4f83e1=new Error()[_0x17ed5c(0x36b)]||'';_0x2c09bb=_0x4f83e1['split']('\x0a')[_0x17ed5c(0x204)](0x3)['map'](_0x309651=>_0x309651['trim']())[_0x17ed5c(0x3d7)](Boolean)['slice'](0x0,0x8);}_0x28c07d[_0x1d90eb]={'seq':_0x11bc3d++,'t':Date[_0x17ed5c(0x3fc)](),'env':_0x2d184f,'kind':_0x429ede||_0x17ed5c(0x3be),'stack':_0x2c09bb},_0x1d90eb=(_0x1d90eb+0x1)%_0x419227;}function _0x53a055(_0x2f3609){const _0x1194d3=_0x55dd,_0x18d4ce=[];for(let _0xa35f30=0x0;_0xa35f30<_0x419227;_0xa35f30++){const _0x3c0e4b=_0x28c07d[(_0x1d90eb-0x1-_0xa35f30+_0x419227*0x2)%_0x419227];if(!_0x3c0e4b)continue;_0x18d4ce[_0x1194d3(0x39a)](_0x3c0e4b);if(_0x18d4ce[_0x1194d3(0x21a)]>=_0x2f3609)break;}return _0x18d4ce;}function _0x1c5278(_0x487644){const _0x428379=_0x55dd;try{process[_0x428379(0x3de)][_0x428379(0x3ed)](_0x487644+'\x0a');}catch{}if(_0x362ad6)try{_0x376412[_0x428379(0x1cc)](_0x40d66b[_0x428379(0x1ec)](_0x362ad6,_0x428379(0x25f)+process['pid']+'.log'),_0x487644+'\x0a');}catch{}}function _0x5a3e86(_0x2671f2){const _0x3715e1=_0x55dd,_0x1a33fe=_0x53a055(_0x2671f2);if(!_0x1a33fe[_0x3715e1(0x21a)])return _0x3715e1(0x3fa);const _0x44dca8=Date[_0x3715e1(0x3fc)]();return _0x1a33fe[_0x3715e1(0x38b)](_0xa6a50b=>{const _0x57ca4e=_0x3715e1,_0x27dd44=_0x57ca4e(0x3f2)+_0xa6a50b[_0x57ca4e(0x1ee)]+'\x20-'+(_0x44dca8-_0xa6a50b['t'])+_0x57ca4e(0x1d9)+_0xa6a50b[_0x57ca4e(0x394)]+'\x20'+_0xa6a50b[_0x57ca4e(0x2f2)];return _0xa6a50b[_0x57ca4e(0x36b)]&&_0xa6a50b[_0x57ca4e(0x36b)][_0x57ca4e(0x21a)]?_0x27dd44+_0x57ca4e(0x2a2)+_0xa6a50b[_0x57ca4e(0x36b)]['join'](_0x57ca4e(0x2a2)):_0x27dd44;})['join']('\x0a');}function _0x144a1d(_0x140ec8,_0x1b4bc2){const _0x300463=_0x55dd,_0xf6a717=_0x300463(0x284)+_0x140ec8+'\x20@\x20'+new Date()[_0x300463(0x1d5)]()+_0x300463(0x216)+process['pid']+_0x300463(0x375),_0x456962=[_0xf6a717,_0x300463(0x37b)+(_0x1b4bc2&&_0x1b4bc2[_0x300463(0x36b)]?_0x1b4bc2[_0x300463(0x36b)][_0x300463(0x315)]('\x0a')[0x0]:_0x1b4bc2),_0x300463(0x3da)+(_0x11aadf?'':_0x300463(0x22f))+':',_0x5a3e86(0x18),_0x5bb131(),'='[_0x300463(0x220)](_0xf6a717[_0x300463(0x21a)]-0x1)];_0x1c5278(_0x456962['join']('\x0a'));}function _0x51ad5e(_0x1b0f2c){const _0xb97767=_0x55dd;if(!_0xb7a045())return;const _0x3f17de=String(_0x1b0f2c&&_0x1b0f2c['message']||_0x1b0f2c||''),_0x21d915=/already closed|environment is already|invalid read txn|reset an invalid/i[_0xb97767(0x3b5)](_0x3f17de);_0x144a1d(_0x21d915?_0xb97767(0x314):'uncaughtException',_0x1b0f2c);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x21d915)return;try{console[_0xb97767(0x258)](_0x1b0f2c&&_0x1b0f2c[_0xb97767(0x36b)]?_0x1b0f2c[_0xb97767(0x36b)]:_0x1b0f2c);}catch{}process[_0xb97767(0x376)](0x1);}function _0x3d8de8(_0x370e4c){const _0x43ab3f=_0x55dd;if(!_0xb7a045())return;const _0x29e7af=String(_0x370e4c&&_0x370e4c['message']||_0x370e4c||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x43ab3f(0x3b5)](_0x29e7af)&&_0x144a1d(_0x43ab3f(0x2fc),_0x370e4c);}function _0x5bb131(){const _0x3f464f=_0x55dd,_0x19e245=['drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):'];let _0xe1150a=![];for(const _0x8f253f of _0x5e875f){const _0x4b2b88=_0x8f253f&&_0x8f253f['_envs'];if(!_0x4b2b88)continue;for(const [_0x24d550,_0x2c2985]of _0x4b2b88){const _0x2320d1=_0x2c2985&&_0x2c2985[_0x3f464f(0x31b)]&&_0x2c2985[_0x3f464f(0x31b)][_0x3f464f(0x2e7)];if(!_0x2320d1)continue;let _0x36c237,_0x5c8240;try{_0x36c237=Atomics['load'](_0x2320d1,0x0),_0x5c8240=Atomics[_0x3f464f(0x1fe)](_0x2320d1,0x1);}catch{continue;}if(_0x36c237===0x0)continue;_0xe1150a=!![];const _0x2f103e=_0x36c237>0x0?'SWAP':_0x3f464f(0x2df),_0x5618d0=Date[_0x3f464f(0x3fc)]()-Math['abs'](_0x36c237)*0x3e8,_0x458d34=((()=>{const _0x228eb7=_0x3f464f;try{return _0x2c2985[_0x228eb7(0x321)]&&_0x2c2985[_0x228eb7(0x321)][_0x228eb7(0x243)]?_0x2c2985[_0x228eb7(0x321)][_0x228eb7(0x243)]():null;}catch{return null;}})());_0x19e245['push']('\x20\x20env='+_0x24d550+'\x20phase='+_0x2f103e+_0x3f464f(0x3a4)+_0x5618d0+_0x3f464f(0x202)+_0x5c8240+(_0x458d34?_0x3f464f(0x33a)+_0x458d34[_0x3f464f(0x3d9)]+_0x3f464f(0x200)+_0x458d34[_0x3f464f(0x2f1)]+_0x3f464f(0x1f4)+_0x458d34[_0x3f464f(0x30f)]+'}':''));}}if(!_0xe1150a)_0x19e245['push'](_0x3f464f(0x388));return _0x19e245[_0x3f464f(0x1ec)]('\x0a');}function _0x16a629(){const _0x3150cc=_0x55dd;if(!_0xb7a045())return;const _0x1c6374=Math[_0x3150cc(0x287)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x15ed38=Date[_0x3150cc(0x3fc)]();for(const _0x1ea42a of _0x5e875f){const _0x292082=_0x1ea42a&&_0x1ea42a['_envs'];if(!_0x292082)continue;for(const [_0x1a2c46,_0x2ea26d]of _0x292082){const _0x8302dc=_0x2ea26d&&_0x2ea26d[_0x3150cc(0x31b)]&&_0x2ea26d[_0x3150cc(0x31b)]['view'];if(!_0x8302dc)continue;let _0x303ef4;try{_0x303ef4=Atomics['load'](_0x8302dc,0x0);}catch{continue;}const _0x22c844=_0x1ea42a[_0x3150cc(0x1e7)]+'|'+_0x1a2c46;if(_0x303ef4<=0x0){_0x2e27e0['delete'](_0x22c844);continue;}const _0x250dfc=_0x15ed38-_0x303ef4*0x3e8,_0xc02f2=_0x2e27e0[_0x3150cc(0x256)](_0x22c844);if(_0x250dfc<_0x1c6374)continue;if(_0xc02f2&&_0x15ed38-_0xc02f2[_0x3150cc(0x2c5)]<_0x1c6374)continue;_0x2e27e0[_0x3150cc(0x275)](_0x22c844,{'firstTs':_0xc02f2?_0xc02f2['firstTs']:_0x303ef4,'dumpedAt':_0x15ed38});const _0x216b05=_0x3150cc(0x3a7)+_0x250dfc+_0x3150cc(0x37e)+_0x1a2c46+_0x3150cc(0x3eb)+new Date()[_0x3150cc(0x1d5)]()+_0x3150cc(0x216)+process[_0x3150cc(0x2c8)]+_0x3150cc(0x375);_0x1c5278([_0x216b05,_0x5bb131(),'='[_0x3150cc(0x220)](_0x216b05[_0x3150cc(0x21a)]-0x1)][_0x3150cc(0x1ec)]('\x0a'));}}}function _0x5a3795(){const _0x4cb95f=_0x55dd;if(!_0xb7a045()||_0x3f25b1)return;_0x3f25b1=!![],process[_0x4cb95f(0x377)](_0x4cb95f(0x357),_0x51ad5e),process[_0x4cb95f(0x377)]('unhandledRejection',_0x3d8de8);const _0x566ff2=Math['max'](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x50c4c5=setInterval(_0x16a629,_0x566ff2);if(_0x50c4c5[_0x4cb95f(0x3e3)])_0x50c4c5[_0x4cb95f(0x3e3)]();}function _0x333d65(_0x4c7c56){const _0x3ffdb5=_0x55dd;if(!_0xb7a045()||!_0x4c7c56)return;_0x5e875f[_0x3ffdb5(0x342)](_0x4c7c56),_0x5a3795();}function _0x3bdcd0(_0x38070d){const _0x8a3f8e=_0x55dd;_0x5e875f[_0x8a3f8e(0x2aa)](_0x38070d);}function _0xe3f763(){const _0x391c89=_0x55dd;if(!_0xb7a045())return{'enabled':![],'hint':_0x391c89(0x1f1)};return{'enabled':!![],'stackCapture':!!_0x11aadf,'recentWrites':_0x53a055(0x10),'drain':_0x5bb131()};}return okdbDiag={'isEnabled':_0xb7a045,'recordWrite':_0x5d1c05,'installDiag':_0x5a3795,'registerOkdb':_0x333d65,'unregisterOkdb':_0x3bdcd0,'snapshot':_0xe3f763},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x19bb83=_0x3b4fb0;if(hasRequiredOkdbWriter)return okdbWriter[_0x19bb83(0x262)];hasRequiredOkdbWriter=0x1;const {performance:_0x50317d}=require$$0$2,_0x57f24b=requireOkdbDiag(),_0x26f1c0=process.env.OKDB_COMMIT_MODE===_0x19bb83(0x3ab);class _0x59fcac{constructor(_0x29cd12){const _0x1bb2ea=_0x19bb83;this[_0x1bb2ea(0x394)]=_0x29cd12,this[_0x1bb2ea(0x39b)]=new Set(),this['_enqueuedAt']=new Map(),this[_0x1bb2ea(0x254)]=0x0,this[_0x1bb2ea(0x2de)]=[],this[_0x1bb2ea(0x2e6)]=[],this[_0x1bb2ea(0x235)]=Math[_0x1bb2ea(0x287)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x1bb2ea(0x3f0)]=0x0,this[_0x1bb2ea(0x260)]=[],this['_bpParkedTotal']=0x0,this[_0x1bb2ea(0x2b5)]=null,this['_heldTotal']=0x0,this['_nestedTotal']=0x0,this['_nestedWarned']=![];}async[_0x19bb83(0x306)](_0x131516,_0x45f67d){const _0x3698a0=_0x19bb83;if(_0x57f24b[_0x3698a0(0x26b)]())_0x57f24b[_0x3698a0(0x2cd)](this[_0x3698a0(0x394)]?.['name'],_0x45f67d);if(this[_0x3698a0(0x329)]){const _0x1f0cc8=new Error(_0x3698a0(0x1d2));_0x1f0cc8[_0x3698a0(0x1d1)]=_0x3698a0(0x303);throw _0x1f0cc8;}if(this[_0x3698a0(0x235)]>0x0){let _0x1661e4=![];while(this[_0x3698a0(0x3f0)]>=this[_0x3698a0(0x235)]&&!this[_0x3698a0(0x329)]){!_0x1661e4&&(_0x1661e4=!![],this[_0x3698a0(0x31f)]++),await new Promise(_0x6927c2=>this[_0x3698a0(0x260)][_0x3698a0(0x39a)](_0x6927c2));}if(this[_0x3698a0(0x329)]){const _0xe5af64=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0xe5af64[_0x3698a0(0x1d1)]=_0x3698a0(0x303);throw _0xe5af64;}}this[_0x3698a0(0x3f0)]++;const _0x46bf0c=this[_0x3698a0(0x394)]['_coordinator'];for(;;){while(this[_0x3698a0(0x2b5)])await this[_0x3698a0(0x2b5)];if(_0x46bf0c)await _0x46bf0c[_0x3698a0(0x368)]();if(!this['_held'])break;if(_0x46bf0c)_0x46bf0c['afterWrite']();}if(this[_0x3698a0(0x329)]){if(_0x46bf0c)_0x46bf0c[_0x3698a0(0x32e)]();this['_outstanding']--;if(this[_0x3698a0(0x260)]['length']&&this['_outstanding']<this[_0x3698a0(0x235)])this[_0x3698a0(0x260)][_0x3698a0(0x1cd)]()();const _0x15578c=new Error(_0x3698a0(0x1d2));_0x15578c['code']=_0x3698a0(0x303);throw _0x15578c;}const _0x56727f=_0x50317d[_0x3698a0(0x3fc)]();if(_0x26f1c0)try{const _0x214395=this['env']['db'][_0x3698a0(0x374)](_0x131516);this[_0x3698a0(0x254)]++;if(this['_durs'][_0x3698a0(0x39a)](_0x50317d[_0x3698a0(0x3fc)]()-_0x56727f)>0x100)this[_0x3698a0(0x2de)][_0x3698a0(0x1cd)]();if(this[_0x3698a0(0x2e6)][_0x3698a0(0x39a)](_0x50317d[_0x3698a0(0x3fc)]())>0x800)this[_0x3698a0(0x2e6)][_0x3698a0(0x1cd)]();return _0x214395;}finally{this[_0x3698a0(0x3f0)]--;if(this['_bpWaiters'][_0x3698a0(0x21a)]&&this['_outstanding']<this[_0x3698a0(0x235)])this[_0x3698a0(0x260)]['shift']()();if(_0x46bf0c)_0x46bf0c[_0x3698a0(0x32e)]();}let _0x3780b4=null;const _0x158569=()=>{const _0x4ca617=_0x3698a0,_0x3fad41=_0x131516();if(_0x3fad41&&typeof _0x3fad41[_0x4ca617(0x2e5)]===_0x4ca617(0x385)&&!_0x3780b4){this[_0x4ca617(0x1d6)]++;let _0x32335c;const _0xd26ccf=new Promise(_0x5382e0=>_0x32335c=_0x5382e0);this[_0x4ca617(0x2b5)]=_0xd26ccf,_0x3780b4=()=>{const _0x3870fa=_0x4ca617;if(this[_0x3870fa(0x2b5)]===_0xd26ccf)this[_0x3870fa(0x2b5)]=null;_0x32335c();};}return _0x3fad41;};let _0x487903;try{_0x487903=this[_0x3698a0(0x394)]['db'][_0x3698a0(0x2f0)](_0x158569);}catch(_0x47e93a){_0x487903=Promise[_0x3698a0(0x282)](_0x47e93a);}(!_0x487903||typeof _0x487903[_0x3698a0(0x2e5)]!==_0x3698a0(0x385))&&(this['_nestedTotal']++,!this['_nestedWarned']&&(this['_nestedWarned']=!![],console[_0x3698a0(0x36e)](_0x3698a0(0x21c)+(this[_0x3698a0(0x394)]?.['name']??'?')+_0x3698a0(0x2f8))),_0x487903=Promise[_0x3698a0(0x328)](_0x487903));const _0x23ba80=()=>{if(_0x3780b4)_0x3780b4();};_0x487903['then'](_0x23ba80,_0x23ba80),this['_inflight'][_0x3698a0(0x342)](_0x487903),this[_0x3698a0(0x3a8)][_0x3698a0(0x275)](_0x487903,_0x56727f);const _0x255be3=()=>{const _0x20301c=_0x3698a0;this[_0x20301c(0x39b)]['delete'](_0x487903),this[_0x20301c(0x3a8)][_0x20301c(0x2aa)](_0x487903),this['_committed']++,this[_0x20301c(0x3f0)]--;this[_0x20301c(0x260)][_0x20301c(0x21a)]&&this[_0x20301c(0x3f0)]<this[_0x20301c(0x235)]&&this[_0x20301c(0x260)][_0x20301c(0x1cd)]()();if(this[_0x20301c(0x2de)]['push'](_0x50317d[_0x20301c(0x3fc)]()-_0x56727f)>0x100)this[_0x20301c(0x2de)][_0x20301c(0x1cd)]();if(this[_0x20301c(0x2e6)]['push'](_0x50317d[_0x20301c(0x3fc)]())>0x800)this[_0x20301c(0x2e6)][_0x20301c(0x1cd)]();};_0x487903[_0x3698a0(0x2e5)](_0x255be3,_0x255be3);try{return await _0x487903;}finally{if(_0x46bf0c)_0x46bf0c[_0x3698a0(0x32e)]();}}['status'](){const _0xf0ecbb=_0x19bb83,_0x3c4db0=_0x50317d['now']();let _0x258435=0x0;for(const _0x4132de of this['_enqueuedAt'][_0xf0ecbb(0x3fe)]()){const _0x395b47=_0x3c4db0-_0x4132de;if(_0x395b47>_0x258435)_0x258435=_0x395b47;}let _0x3c569e=0x0;for(let _0x50ac41=this[_0xf0ecbb(0x2e6)][_0xf0ecbb(0x21a)]-0x1;_0x50ac41>=0x0;_0x50ac41--){if(_0x3c4db0-this[_0xf0ecbb(0x2e6)][_0x50ac41]>0x3e8)break;_0x3c569e++;}let _0x5fd250=0x0;if(this[_0xf0ecbb(0x2de)][_0xf0ecbb(0x21a)]){const _0x592137=[...this[_0xf0ecbb(0x2de)]][_0xf0ecbb(0x3bd)]((_0x49f96a,_0x2a4bac)=>_0x49f96a-_0x2a4bac);_0x5fd250=_0x592137[Math[_0xf0ecbb(0x249)](_0x592137[_0xf0ecbb(0x21a)]-0x1,Math[_0xf0ecbb(0x2b6)](_0x592137[_0xf0ecbb(0x21a)]*0.99))];}return{'depth':this['_inflight']['size'],'oldestPendingMs':Math['round'](_0x258435),'committed':this[_0xf0ecbb(0x254)],'commitsPerSec':_0x3c569e,'commitP99Ms':Math[_0xf0ecbb(0x276)](_0x5fd250),'parkedNow':this[_0xf0ecbb(0x260)][_0xf0ecbb(0x21a)],'parkedTotal':this['_bpParkedTotal'],'highWater':this['_highWater']};}[_0x19bb83(0x224)](){const _0x27c026=_0x19bb83,_0x537509=_0x50317d[_0x27c026(0x3fc)]();return[...this[_0x27c026(0x3a8)]['values']()]['map'](_0x1440f4=>Math[_0x27c026(0x276)](_0x537509-_0x1440f4))[_0x27c026(0x3bd)]((_0x4f442b,_0x3524ad)=>_0x3524ad-_0x4f442b);}[_0x19bb83(0x32a)](){const _0x21d9fb=_0x19bb83;this[_0x21d9fb(0x329)]=!![];for(const _0x4d8df8 of this['_bpWaiters'][_0x21d9fb(0x3b0)](0x0))_0x4d8df8();}async[_0x19bb83(0x242)](){const _0x7b708e=_0x19bb83;let _0xc1017f=0x0;while(this[_0x7b708e(0x39b)][_0x7b708e(0x261)]&&_0xc1017f++<0x3e8){await Promise[_0x7b708e(0x2da)]([...this[_0x7b708e(0x39b)]]);}}async[_0x19bb83(0x281)](_0x4efd5b,_0x4386d0,_0x3ca386,_0x5042cd){const _0x51c34b=_0x19bb83;return this[_0x51c34b(0x306)](()=>{const _0x5739b5=_0x51c34b;if(_0x5042cd===undefined)_0x4efd5b[_0x5739b5(0x3f4)](_0x4386d0,_0x3ca386);else _0x4efd5b[_0x5739b5(0x3f4)](_0x4386d0,_0x3ca386,_0x5042cd);},_0x51c34b(0x372));}async['remove'](_0x53c6fb,_0x55472b){const _0x1deed5=_0x19bb83;return this['transaction'](()=>_0x53c6fb[_0x1deed5(0x237)](_0x55472b),_0x1deed5(0x28e));}}async function _0x58fba9(_0x2cbde8,_0x2e2cb7){const _0x43d66a=_0x19bb83;if(_0x2e2cb7==null)_0x2e2cb7=Math['max'](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x51151c=_0x2cbde8?.['flushed'];if(!_0x51151c||typeof _0x51151c[_0x43d66a(0x2e5)]!==_0x43d66a(0x385))return;await Promise['race']([Promise['resolve'](_0x51151c)['catch'](()=>{}),new Promise(_0x3d6a8c=>{const _0x5b7d9b=_0x43d66a,_0x1f7eb3=setTimeout(_0x3d6a8c,_0x2e2cb7);if(_0x1f7eb3[_0x5b7d9b(0x3e3)])_0x1f7eb3['unref']();})]);}catch{}}function _0x188616(_0x575c72){const _0xb8a735=_0x19bb83;if(_0x26f1c0)return Promise[_0xb8a735(0x328)]();const _0x24f39d=_0x575c72?.[_0xb8a735(0x351)];return _0x24f39d&&typeof _0x24f39d[_0xb8a735(0x2e5)]===_0xb8a735(0x385)?_0x24f39d:Promise[_0xb8a735(0x328)]();}return okdbWriter['exports']=_0x59fcac,okdbWriter['exports'][_0x19bb83(0x2d9)]=_0x58fba9,okdbWriter['exports']['committed']=_0x188616,okdbWriter[_0x19bb83(0x262)][_0x19bb83(0x1f8)]=_0x26f1c0,okdbWriter[_0x19bb83(0x262)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x150bc8=_0x3b4fb0;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x5b1379=require$$0$3,{SYNC_COMMITS:_0x184540}=requireOkdbWriter(),_0x236a6e=_0x150bc8(0x35c);class _0x389445{constructor(_0x438b56,_0x20568b,_0x4995bb){const _0x51fbd5=_0x150bc8;this[_0x51fbd5(0x3b4)]=_0x438b56,this['_key']=_0x20568b,this[_0x51fbd5(0x228)]=_0x4995bb,this[_0x51fbd5(0x3d8)]=![],this[_0x51fbd5(0x232)]=null,this['_heartbeatInFlight']=null;}[_0x150bc8(0x2e0)](){const _0x4381bb=_0x150bc8;if(this[_0x4381bb(0x3d8)])return![];try{const _0x11c8f4=this['_lock'][_0x4381bb(0x373)]()[_0x4381bb(0x256)](this[_0x4381bb(0x2ae)]);if(!_0x11c8f4||_0x11c8f4[_0x4381bb(0x253)]!==this[_0x4381bb(0x228)])return![];const _0x1246aa=_0x11c8f4['updatedAt']??_0x11c8f4[_0x4381bb(0x253)];if(_0x1246aa+_0x11c8f4[_0x4381bb(0x1d7)]<Date[_0x4381bb(0x3fc)]())return![];return!![];}catch{return!this['_released'];}}[_0x150bc8(0x28d)](){const _0x1b41c6=_0x150bc8;if(this['_released'])return null;try{return this[_0x1b41c6(0x3b4)]['_db']()[_0x1b41c6(0x256)](this['_key'])??null;}catch{return null;}}async[_0x150bc8(0x2d7)](_0x53ead9){const _0x3c407f=_0x150bc8;if(this[_0x3c407f(0x3d8)])return;try{const _0x9a8960=this[_0x3c407f(0x3b4)]['_db']()[_0x3c407f(0x256)](this[_0x3c407f(0x2ae)]);if(!_0x9a8960||_0x9a8960[_0x3c407f(0x253)]!==this['_acquiredAt'])return;if(_0x184540)this[_0x3c407f(0x3b4)][_0x3c407f(0x373)]()[_0x3c407f(0x3f4)](this[_0x3c407f(0x2ae)],{..._0x9a8960,'ttlMs':_0x9a8960[_0x3c407f(0x1d7)]+_0x53ead9});else await this['_lock']['_db']()[_0x3c407f(0x281)](this[_0x3c407f(0x2ae)],{..._0x9a8960,'ttlMs':_0x9a8960[_0x3c407f(0x1d7)]+_0x53ead9});}catch{}}async[_0x150bc8(0x2b0)](){const _0x455de0=_0x150bc8;if(this[_0x455de0(0x3d8)])return;if(this[_0x455de0(0x22e)])try{await this[_0x455de0(0x22e)];}catch{}clearInterval(this[_0x455de0(0x232)]),this['_heartbeatTimer']=null,this[_0x455de0(0x3d8)]=!![];try{const _0x48332b=this[_0x455de0(0x3b4)][_0x455de0(0x373)]()[_0x455de0(0x256)](this['_key']);if(_0x48332b&&_0x48332b['acquiredAt']===this[_0x455de0(0x228)]){if(_0x184540)this[_0x455de0(0x3b4)][_0x455de0(0x373)]()['removeSync'](this['_key']);else await this[_0x455de0(0x3b4)][_0x455de0(0x373)]()['remove'](this['_key']);}}catch{}}[_0x150bc8(0x2a6)](_0x57fdf0,_0xea91a8){const _0x48c7f9=_0x150bc8,_0x4641b0=_0xea91a8??Math[_0x48c7f9(0x2b6)](_0x57fdf0/0x3);this[_0x48c7f9(0x232)]=setInterval(()=>{const _0x2adabb=_0x48c7f9;if(this[_0x2adabb(0x3d8)])return;this[_0x2adabb(0x22e)]=((async()=>{const _0x12b537=_0x2adabb;try{const _0x27c514=this[_0x12b537(0x3b4)]['_db']()[_0x12b537(0x256)](this['_key']);if(!_0x27c514||_0x27c514[_0x12b537(0x253)]!==this[_0x12b537(0x228)]){this[_0x12b537(0x3d8)]=!![],clearInterval(this['_heartbeatTimer']),this[_0x12b537(0x232)]=null;return;}if(_0x184540)this[_0x12b537(0x3b4)]['_db']()[_0x12b537(0x3f4)](this['_key'],{..._0x27c514,'updatedAt':Date['now']()});else await this[_0x12b537(0x3b4)][_0x12b537(0x373)]()['put'](this[_0x12b537(0x2ae)],{..._0x27c514,'updatedAt':Date[_0x12b537(0x3fc)]()});}catch{}this[_0x12b537(0x22e)]=null;})());},_0x4641b0);if(this[_0x48c7f9(0x232)][_0x48c7f9(0x3e3)])this[_0x48c7f9(0x232)]['unref']();}}class _0x18bfa6{constructor(_0x3dfa6f,{namespace:_0x395028,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x520cc3=_0x150bc8;this['_rawDb']=_0x3dfa6f,this[_0x520cc3(0x33b)]=_0x395028,this[_0x520cc3(0x1d7)]=ttlMs,this[_0x520cc3(0x302)]=heartbeatMs,this[_0x520cc3(0x3fd)]=null;}[_0x150bc8(0x373)](){const _0x43b9bb=_0x150bc8;return!this['_lockDb']&&(this[_0x43b9bb(0x3fd)]=this[_0x43b9bb(0x2b2)][_0x43b9bb(0x3d1)](_0x236a6e,{'dupSort':![]})),this[_0x43b9bb(0x3fd)];}[_0x150bc8(0x213)](){const _0x366408=_0x150bc8;return!this[_0x366408(0x39f)]&&(this[_0x366408(0x39f)]=this['_rawDb']['openDB'](_0x236a6e+_0x366408(0x345),{'dupSort':![]})),this[_0x366408(0x39f)];}[_0x150bc8(0x2ae)](_0x44c454){return this['namespace']+':'+_0x44c454;}[_0x150bc8(0x2f6)](_0x446bb9){const _0x37d67f=_0x150bc8;try{_0x184540?this['_wantDb']()['putSync'](this[_0x37d67f(0x2ae)](_0x446bb9),Date[_0x37d67f(0x3fc)]()):this['_wantDb']()[_0x37d67f(0x281)](this[_0x37d67f(0x2ae)](_0x446bb9),Date[_0x37d67f(0x3fc)]())?.[_0x37d67f(0x299)]?.(()=>{});}catch{}}['isWanted'](_0x1f167c,_0x1f7ac3=0x3e8){const _0x2c1d82=_0x150bc8;try{const _0x4fb92c=this[_0x2c1d82(0x213)]()[_0x2c1d82(0x256)](this['_key'](_0x1f167c));return typeof _0x4fb92c===_0x2c1d82(0x3fb)&&Date[_0x2c1d82(0x3fc)]()-_0x4fb92c<_0x1f7ac3;}catch{return![];}}['_isStale'](_0x231d83){const _0x207782=_0x150bc8,_0x38961e=_0x231d83['updatedAt']??_0x231d83[_0x207782(0x253)];return _0x38961e+_0x231d83[_0x207782(0x1d7)]<Date[_0x207782(0x3fc)]();}static[_0x150bc8(0x23c)](_0x5f118c){const _0x2e4ed9=_0x150bc8,_0x2560d1=_0x5f118c?.[_0x2e4ed9(0x28d)];if(!_0x2560d1||typeof _0x2560d1['pid']!==_0x2e4ed9(0x3fb))return![];if(_0x2560d1[_0x2e4ed9(0x2bf)]!==_0x5b1379[_0x2e4ed9(0x2bf)]())return![];if(_0x2560d1['pid']===process['pid'])return![];try{return process[_0x2e4ed9(0x3ef)](_0x2560d1[_0x2e4ed9(0x2c8)],0x0),![];}catch(_0x494018){return _0x494018[_0x2e4ed9(0x1d1)]===_0x2e4ed9(0x3c7);}}async[_0x150bc8(0x354)](_0x482f47,_0x57faf2={},_0x4dded4={}){const _0x461185=_0x150bc8,_0x49ff28=this[_0x461185(0x2ae)](_0x482f47),_0xe3b514=_0x4dded4[_0x461185(0x1d7)]??this[_0x461185(0x1d7)],_0x56e45e=Date[_0x461185(0x3fc)](),_0x4ca242={'holder':{'pid':process[_0x461185(0x2c8)],'hostname':_0x5b1379['hostname'](),..._0x57faf2},'acquiredAt':_0x56e45e,'updatedAt':_0x56e45e,'ttlMs':_0xe3b514};let _0x18d5fe=![],_0x481c79=null;try{const _0x378306=()=>{const _0xcb6356=_0x461185,_0x2f4f7f=this[_0xcb6356(0x373)]()[_0xcb6356(0x256)](_0x49ff28);if(_0x2f4f7f&&!this['_isStale'](_0x2f4f7f)&&!_0x18bfa6[_0xcb6356(0x23c)](_0x2f4f7f)){const _0x21afc8=_0x57faf2[_0xcb6356(0x3f5)]!=null&&_0x2f4f7f[_0xcb6356(0x28d)][_0xcb6356(0x2c8)]===process['pid']&&_0x2f4f7f[_0xcb6356(0x28d)][_0xcb6356(0x3f5)]===_0x57faf2['processorId'];if(!_0x21afc8){_0x18d5fe=![],_0x481c79=_0x2f4f7f;return;}_0x4ca242['acquiredAt']<=_0x2f4f7f[_0xcb6356(0x253)]&&(_0x4ca242['acquiredAt']=_0x2f4f7f[_0xcb6356(0x253)]+0x1,_0x4ca242[_0xcb6356(0x2ef)]=_0x4ca242['acquiredAt']);}this[_0xcb6356(0x373)]()[_0xcb6356(0x281)](_0x49ff28,_0x4ca242),_0x18d5fe=!![],_0x481c79=_0x4ca242;};if(_0x184540)this[_0x461185(0x373)]()[_0x461185(0x374)](_0x378306);else await this['_db']()[_0x461185(0x2f0)](_0x378306);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x18d5fe)return{'acquired':![],'handle':null,'current':_0x481c79};const _0x8c1e51=new _0x389445(this,_0x49ff28,_0x4ca242[_0x461185(0x253)]);return _0x8c1e51[_0x461185(0x2a6)](_0xe3b514,this[_0x461185(0x302)]),{'acquired':!![],'handle':_0x8c1e51,'current':_0x481c79};}[_0x150bc8(0x231)](_0x1bf221){const _0x1d0336=_0x150bc8;try{return this[_0x1d0336(0x373)]()[_0x1d0336(0x256)](this[_0x1d0336(0x2ae)](_0x1bf221))??null;}catch{return null;}}[_0x150bc8(0x348)](){const _0x181d1f=_0x150bc8,_0x20df21=this[_0x181d1f(0x33b)]+':',_0x542ca9=[];try{for(const {key:_0x1831a1,value:_0x5c0983}of this[_0x181d1f(0x373)]()[_0x181d1f(0x3cb)]({'start':_0x20df21,'end':_0x20df21+'\xff'})){typeof _0x1831a1===_0x181d1f(0x361)&&_0x1831a1[_0x181d1f(0x1f7)](_0x20df21)&&_0x542ca9[_0x181d1f(0x39a)]({'id':_0x1831a1[_0x181d1f(0x204)](_0x20df21['length']),'entry':_0x5c0983});}}catch{}return _0x542ca9;}static[_0x150bc8(0x23b)](_0x283301){const _0x5efcd8=_0x150bc8,_0x15389f=[];try{const _0x4a47db=_0x283301[_0x5efcd8(0x3d1)](_0x236a6e,{'dupSort':![]});for(const {key:_0x10f9e2,value:_0x4ae68f}of _0x4a47db[_0x5efcd8(0x3cb)]({})){if(typeof _0x10f9e2!=='string')continue;const _0x2fa608=_0x10f9e2[_0x5efcd8(0x3c2)](':');if(_0x2fa608<0x1)continue;_0x15389f[_0x5efcd8(0x39a)]({'namespace':_0x10f9e2['slice'](0x0,_0x2fa608),'id':_0x10f9e2[_0x5efcd8(0x204)](_0x2fa608+0x1),'entry':_0x4ae68f});}}catch{}return _0x15389f;}}return okdbLock={'OKDBLock':_0x18bfa6},okdbLock;}var version=_0x3b4fb0(0x35d),require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x12bded=_0x3b4fb0;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x11c5cb=require$$0$3,_0x46a014=require$$1$1,_0x4b67b2=require$$2,{LOOP:_0x267e86}=requireOkdbLoopMonitor(),{OKDBLock:_0x123333}=requireOkdbLock(),{SYNC_COMMITS:_0x4c3ede}=requireOkdbWriter(),_0x361773=_0x12bded(0x1cb),_0x616751='node',_0x493b20=_0x12bded(0x268),_0x2cba6b='~processes:cmd',_0x509992=(_0x5d60c3,_0x2dbbb1)=>_0x5d60c3+':'+_0x2dbbb1,_0x55b4bd=(_0x226b16,_0x5dd48e)=>_0x226b16+'::'+_0x5dd48e,_0x2bfa24=(_0x33d6fc,_0x4b03bc)=>_0x33d6fc+'/'+_0x4b03bc,_0x4563a6=(_0x16a6d1,_0x318969)=>_0x16a6d1+'#'+_0x318969,_0x263ca6=_0xe016d9=>{const _0x14469e=_0x12bded;if(_0xe016d9?.[_0x14469e(0x1f3)])return _0xe016d9[_0x14469e(0x1f3)];const _0x4e2f7a=_0xe016d9?.[_0x14469e(0x3c0)];return typeof _0x4e2f7a===_0x14469e(0x361)&&_0x4e2f7a[_0x14469e(0x2ed)]('#')?_0x4e2f7a[_0x14469e(0x204)](0x0,_0x4e2f7a[_0x14469e(0x3c2)]('#')):_0x4e2f7a;},_0x84f429=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x66d92d=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x4d9548=_0x84f429*0x3,_0x343193=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math['max'](0x927c0,_0x4d9548*0x14),_0x481f2e=[_0x12bded(0x362),'processor:ready','processor:retry',_0x12bded(0x3d5),_0x12bded(0x36c),'processor:resumed'];let _0x57c9d1=null;function _0x1fc979(){const _0x2a7cdc=_0x12bded;if(_0x57c9d1==null)_0x57c9d1=Math[_0x2a7cdc(0x276)]((Date[_0x2a7cdc(0x3fc)]()-process[_0x2a7cdc(0x1d8)]()*0x3e8)/0x3e8)*0x3e8;return _0x57c9d1;}function _0x5f3d32(_0x2cda97){const _0x57a391=_0x12bded;if(process.env.OKDB_PROCESS_KILL===_0x57a391(0x29f))return![];if(_0x2cda97?.['options']?.[_0x57a391(0x2c6)]&&typeof _0x2cda97[_0x57a391(0x344)][_0x57a391(0x2c6)]===_0x57a391(0x234)&&_0x2cda97['options'][_0x57a391(0x2c6)][_0x57a391(0x3ef)]===![])return![];return!![];}function _0x32283e(_0x4c13d2,_0x5dcf5d){const _0x253bc1=_0x12bded,_0x1d9a63=!!_0x5dcf5d?.[_0x253bc1(0x1d4)];switch(_0x4c13d2){case _0x253bc1(0x35f):return{'controllable':_0x1d9a63,'decommissionable':![],'killable':!![],'killConfirm':_0x253bc1(0x3a6)};case _0x253bc1(0x312):case'standalone':return{'controllable':_0x1d9a63,'decommissionable':![],'killable':!![],'killConfirm':_0x253bc1(0x24e)};case'embedded':return{'controllable':![],'decommissionable':![],'killable':![]};case'http-server':case _0x253bc1(0x319):case _0x253bc1(0x3b6):case'worker':return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':'force'};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x1058ee{constructor(_0x2fc28c){const _0x5c33c5=_0x12bded;this[_0x5c33c5(0x292)]=_0x2fc28c,this[_0x5c33c5(0x378)]=null,this[_0x5c33c5(0x1ff)]=null,this[_0x5c33c5(0x27f)]=new Map(),this[_0x5c33c5(0x36a)]=null,this[_0x5c33c5(0x2b3)]=![],this['_isReader']=![],this['_processStartedAt']=_0x1fc979(),this[_0x5c33c5(0x255)]=_0x509992(process['pid'],this['_processStartedAt']),this[_0x5c33c5(0x387)]=_0x4b67b2[_0x5c33c5(0x25b)]()[_0x5c33c5(0x204)](0x0,0x8),this[_0x5c33c5(0x2b7)]=_0x4563a6(this['_selfKey'],this[_0x5c33c5(0x387)]),this['_startedAt']=Date[_0x5c33c5(0x3fc)](),this[_0x5c33c5(0x31e)]=null,this[_0x5c33c5(0x2d4)]=null,this['_listenAddr']=null,this['_hbTimer']=null,this[_0x5c33c5(0x23d)]=null,this['_onTick']=null,this[_0x5c33c5(0x346)]=0x0,this['_ownMeta']={},this[_0x5c33c5(0x2f4)]=new Map(),this['_lastCpuUsage']=process[_0x5c33c5(0x1fc)](),this[_0x5c33c5(0x2d3)]=Date[_0x5c33c5(0x3fc)](),this[_0x5c33c5(0x1de)]=0x0,this[_0x5c33c5(0x358)]=new Map();}get[_0x12bded(0x251)](){const _0xd2aa93=_0x12bded;return this[_0xd2aa93(0x255)];}get[_0x12bded(0x2f7)](){const _0x5894a1=_0x12bded;return this[_0x5894a1(0x2b7)];}['_caps'](_0x179bee,_0x1b6266){const _0x1b2fcb=_0x12bded,_0x1eaeff=_0x32283e(_0x179bee,_0x1b6266);if(_0x1eaeff[_0x1b2fcb(0x2f3)]&&!_0x5f3d32(this['okdb']))return{..._0x1eaeff,'killable':![],'killConfirm':undefined};return _0x1eaeff;}[_0x12bded(0x1e3)](){const _0x4ed892=_0x12bded;return!!this[_0x4ed892(0x378)];}['setOwnMeta'](_0x564659){const _0x2f0a1d=_0x12bded;Object[_0x2f0a1d(0x271)](this[_0x2f0a1d(0x2e4)],_0x564659||{});}[_0x12bded(0x283)](_0x124120){if(_0x124120)this['_listenAddr']=_0x124120;}[_0x12bded(0x27a)](_0x5a8e13={}){const _0x82c46a=_0x12bded;return this[_0x82c46a(0x292)][_0x82c46a(0x20b)](_0x5a8e13);}[_0x12bded(0x3e0)](){const _0x56164a=_0x12bded,_0x3af40f={};let _0x2b41d6=0x0,_0x1021d7=0x0;const _0x1f0e25=new Set();for(const _0x5884ea of this[_0x56164a(0x332)]()){_0x1021d7++;const _0x23f2e2=_0x5884ea[_0x56164a(0x2dd)];if(!_0x23f2e2)continue;if(_0x23f2e2[_0x56164a(0x379)])_0x2b41d6++;for(const _0x1874aa of _0x23f2e2[_0x56164a(0x1d4)]||[]){if(!['single','fanout'][_0x56164a(0x2ed)](_0x1874aa['mode']))continue;(_0x1874aa[_0x56164a(0x230)]==='online'||_0x1874aa[_0x56164a(0x230)]===_0x56164a(0x335))&&_0x1874aa[_0x56164a(0x39e)]&&_0x1f0e25[_0x56164a(0x342)]((_0x1874aa[_0x56164a(0x394)]||'default')+':'+_0x1874aa[_0x56164a(0x39e)]);const _0x8d04a7=_0x1874aa[_0x56164a(0x394)]||_0x56164a(0x298);(_0x3af40f[_0x8d04a7]||=[])[_0x56164a(0x39a)]({..._0x1874aa,'env':_0x8d04a7,'owner':{'pid':_0x5884ea[_0x56164a(0x2c8)]??null,'kind':_0x5884ea[_0x56164a(0x2f2)]??null}});}}for(const [_0x11f7f7,_0x31adf7]of Object[_0x56164a(0x20c)](_0x3af40f)){for(const _0x2a0139 of _0x31adf7){if(_0x2a0139[_0x56164a(0x3e6)]===_0x56164a(0x307)&&!_0x2a0139[_0x56164a(0x34b)]){const _0x11b228=_0x11f7f7+':'+(_0x2a0139[_0x56164a(0x39e)]??'');if(!_0x1f0e25['has'](_0x11b228))_0x2a0139[_0x56164a(0x21b)]=!![];}}}return{'envs':_0x3af40f,'policy':null,'participation':{'participating':_0x2b41d6,'total':_0x1021d7},'source':'workers'};}[_0x12bded(0x2ca)](){const _0x159c8b=_0x12bded,_0x18383c=_0x1eaf5f=>{const _0x467bea=_0x55dd;if(_0x1eaf5f[_0x467bea(0x230)]===_0x467bea(0x1e5)||_0x1eaf5f[_0x467bea(0x230)]===_0x467bea(0x335)||_0x1eaf5f['state']===_0x467bea(0x258))return 0x3;if(_0x1eaf5f[_0x467bea(0x34b)])return 0x1;return 0x2;},_0x51e040=new Map();for(const _0x3a0e5b of this[_0x159c8b(0x332)]()){for(const _0x570263 of _0x3a0e5b['processing']?.[_0x159c8b(0x1d4)]||[]){const _0x4befac={..._0x570263,'owner':{'pid':_0x3a0e5b[_0x159c8b(0x2c8)]??null,'kind':_0x3a0e5b['kind']??null,'host':_0x3a0e5b['host']??null}},_0x48a8d1=_0x570263[_0x159c8b(0x3e6)]===_0x159c8b(0x307)?'1ofN:'+(_0x570263[_0x159c8b(0x394)]??'')+'::'+(_0x570263[_0x159c8b(0x39e)]??_0x570263[_0x159c8b(0x2d8)]??_0x570263['id']):'inst:'+(_0x3a0e5b[_0x159c8b(0x3c0)]??_0x3a0e5b[_0x159c8b(0x1f3)]??'')+'::'+(_0x570263[_0x159c8b(0x394)]??'')+'::'+_0x570263['id'],_0x277c91=_0x51e040[_0x159c8b(0x256)](_0x48a8d1);if(!_0x277c91||_0x18383c(_0x4befac)>_0x18383c(_0x277c91))_0x51e040[_0x159c8b(0x275)](_0x48a8d1,_0x4befac);}}return[..._0x51e040[_0x159c8b(0x3fe)]()];}[_0x12bded(0x334)](){const _0x1f8292=_0x12bded,_0x42ac83=Date[_0x1f8292(0x3fc)](),_0x7e2fea=this[_0x1f8292(0x332)](),_0x59252a=_0x526ac9=>Math[_0x1f8292(0x287)](0x0,Math['round']((_0x42ac83-(_0x526ac9[_0x1f8292(0x211)]||_0x42ac83))/0x3e8)),_0x1eb17c=_0x7e2fea['find'](_0x56a301=>_0x56a301[_0x1f8292(0x2f2)]===_0x1f8292(0x35f)),_0xd8348f=_0x7e2fea[_0x1f8292(0x3d7)](_0x1dc530=>_0x1dc530['kind']===_0x1f8292(0x30a));if(_0x1eb17c||_0xd8348f[_0x1f8292(0x21a)])return{'primary':_0x1eb17c?{'pid':_0x1eb17c[_0x1f8292(0x2c8)],'uptime':_0x59252a(_0x1eb17c)}:null,'workers':_0xd8348f[_0x1f8292(0x38b)](_0x1f76d5=>({'pid':_0x1f76d5['pid'],'uptime':_0x59252a(_0x1f76d5)})),'workersConfigured':_0x1eb17c?.[_0x1f8292(0x1e1)]?.['workersConfigured']??_0xd8348f[_0x1f8292(0x21a)],'mode':'cluster'};const _0x4ffd3d=_0x7e2fea[_0x1f8292(0x2b1)](_0x50f21f=>_0x50f21f[_0x1f8292(0x2f2)]===_0x1f8292(0x312)||_0x50f21f[_0x1f8292(0x2f2)]==='standalone'||_0x50f21f[_0x1f8292(0x2f2)]===_0x1f8292(0x269)),_0x57a254=_0x4ffd3d?{'pid':_0x4ffd3d['pid'],'uptime':_0x59252a(_0x4ffd3d)}:{'pid':process[_0x1f8292(0x2c8)],'uptime':Math[_0x1f8292(0x287)](0x0,Math['round'](process['uptime']()))};return{'primary':_0x57a254,'workers':[_0x57a254],'workersConfigured':0x1,'mode':'single'};}[_0x12bded(0x36f)](){const _0x354542=_0x12bded;return this[_0x354542(0x393)]();}[_0x12bded(0x337)](){const _0x200d6a=_0x12bded,_0x239d7e=new Map();for(const _0x16c357 of this[_0x200d6a(0x393)]())_0x239d7e['set'](_0x16c357[_0x200d6a(0x1f3)],{..._0x16c357,'children':[]});const _0x1705a0=[];for(const _0x52b6bf of _0x239d7e['values']()){const _0x3fc92b=_0x52b6bf[_0x200d6a(0x1ef)]?_0x239d7e['get'](_0x52b6bf[_0x200d6a(0x1ef)]):null;if(_0x3fc92b&&_0x3fc92b!==_0x52b6bf)_0x3fc92b[_0x200d6a(0x27c)][_0x200d6a(0x39a)](_0x52b6bf);else _0x1705a0[_0x200d6a(0x39a)](_0x52b6bf);}const _0x23cb35=(_0x4e3287,_0x12e869)=>_0x4e3287[_0x200d6a(0x2f2)]===_0x12e869[_0x200d6a(0x2f2)]?(_0x4e3287['pid']||0x0)-(_0x12e869['pid']||0x0):(_0x4e3287[_0x200d6a(0x2f2)]??'')<(_0x12e869[_0x200d6a(0x2f2)]??'')?-0x1:0x1,_0x25dd57=_0xb1ae27=>{const _0x4fbff4=_0x200d6a;_0xb1ae27[_0x4fbff4(0x3bd)](_0x23cb35);for(const _0x367f0f of _0xb1ae27)if(_0x367f0f['children'][_0x4fbff4(0x21a)])_0x25dd57(_0x367f0f[_0x4fbff4(0x27c)]);};return _0x25dd57(_0x1705a0),_0x1705a0;}[_0x12bded(0x400)](_0x44258f){const _0x5759b7=_0x12bded;return this[_0x5759b7(0x393)]()[_0x5759b7(0x2b1)](_0x202fed=>_0x202fed['processKey']===_0x44258f)??null;}[_0x12bded(0x393)](_0x40d754=Date[_0x12bded(0x3fc)]()){const _0x6a844b=_0x12bded,_0x5cc282=new Map();for(const _0x2186bf of this['listNodes']()){const _0x46d88d=_0x263ca6(_0x2186bf);let _0x309d99=_0x5cc282[_0x6a844b(0x256)](_0x46d88d);!_0x309d99&&(_0x309d99={'processKey':_0x46d88d,'nodeKey':_0x46d88d,'pid':_0x2186bf[_0x6a844b(0x2c8)],'ppid':_0x2186bf[_0x6a844b(0x37d)]??null,'host':_0x2186bf[_0x6a844b(0x257)]??null,'kind':_0x2186bf[_0x6a844b(0x2f2)],'role':null,'supervisorKey':_0x2186bf['supervisorKey']??null,'slot':_0x2186bf[_0x6a844b(0x24b)]??null,'slotKey':_0x2186bf[_0x6a844b(0x29b)]??null,'caps':_0x2186bf[_0x6a844b(0x264)]??null,'lifecycle':_0x2186bf[_0x6a844b(0x367)]??null,'uptime':Math[_0x6a844b(0x287)](0x0,Math[_0x6a844b(0x276)]((_0x40d754-(_0x2186bf[_0x6a844b(0x211)]||_0x40d754))/0x3e8)),'startedAt':_0x2186bf[_0x6a844b(0x211)]??null,'meta':_0x2186bf[_0x6a844b(0x1e1)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x5cc282['set'](_0x46d88d,_0x309d99));_0x309d99['instances'][_0x6a844b(0x39a)]({'instanceId':_0x2186bf['instanceId']??null,'role':_0x2186bf['role']??null,'listenAddr':_0x2186bf[_0x6a844b(0x285)]??null,'lifecycle':_0x2186bf[_0x6a844b(0x367)]??null,'processing':_0x2186bf[_0x6a844b(0x2dd)]??null});if(!_0x309d99[_0x6a844b(0x291)]&&_0x2186bf[_0x6a844b(0x291)])_0x309d99[_0x6a844b(0x291)]=_0x2186bf['role'];if(!_0x309d99[_0x6a844b(0x285)]&&_0x2186bf[_0x6a844b(0x285)])_0x309d99[_0x6a844b(0x285)]=_0x2186bf[_0x6a844b(0x285)];if(!_0x309d99[_0x6a844b(0x2dd)]&&_0x2186bf[_0x6a844b(0x2dd)])_0x309d99['processing']=_0x2186bf[_0x6a844b(0x2dd)];if(!_0x309d99[_0x6a844b(0x399)]&&_0x2186bf['engines'])_0x309d99[_0x6a844b(0x399)]=_0x2186bf['engines'];if(!_0x309d99[_0x6a844b(0x23f)]&&_0x2186bf['singletonClaims'])_0x309d99[_0x6a844b(0x23f)]=_0x2186bf[_0x6a844b(0x23f)];if(_0x309d99[_0x6a844b(0x264)]==null&&_0x2186bf[_0x6a844b(0x264)])_0x309d99[_0x6a844b(0x264)]=_0x2186bf['caps'];if(_0x2186bf['stats']&&(!_0x309d99[_0x6a844b(0x33f)]||(_0x2186bf[_0x6a844b(0x33f)]['at']??0x0)>(_0x309d99['stats']['at']??0x0)))_0x309d99['stats']=_0x2186bf[_0x6a844b(0x33f)];}return[..._0x5cc282[_0x6a844b(0x3fe)]()];}[_0x12bded(0x3ad)](){const _0x3749a4=_0x12bded,_0x139155=[],_0x4e2ef4={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x10a86e of this[_0x3749a4(0x393)]()){_0x139155[_0x3749a4(0x39a)]({'processKey':_0x10a86e[_0x3749a4(0x1f3)],'kind':_0x10a86e[_0x3749a4(0x2f2)],'pid':_0x10a86e['pid'],'supervisorKey':_0x10a86e[_0x3749a4(0x1ef)],'meta':_0x10a86e[_0x3749a4(0x1e1)]??null,'uptime':_0x10a86e[_0x3749a4(0x1d8)],'stats':_0x10a86e[_0x3749a4(0x33f)]??null}),_0x4e2ef4['processes']++;if(_0x10a86e[_0x3749a4(0x33f)]){_0x4e2ef4['rss']+=_0x10a86e[_0x3749a4(0x33f)][_0x3749a4(0x34c)]||0x0,_0x4e2ef4[_0x3749a4(0x25d)]+=(_0x10a86e[_0x3749a4(0x33f)]['heapUsed']||0x0)+(_0x10a86e['stats']['threads']?.[_0x3749a4(0x25d)]||0x0);const _0x327cec=_0x10a86e[_0x3749a4(0x33f)][_0x3749a4(0x225)];_0x327cec&&(_0x4e2ef4[_0x3749a4(0x225)][_0x3749a4(0x1f2)]+=_0x327cec[_0x3749a4(0x1f2)]||0x0,_0x4e2ef4[_0x3749a4(0x225)][_0x3749a4(0x23a)]+=_0x327cec[_0x3749a4(0x23a)]||0x0,_0x4e2ef4[_0x3749a4(0x225)][_0x3749a4(0x1eb)]+=_0x327cec['busy']||0x0);}}return{'totals':_0x4e2ef4,'nodes':_0x139155};}async[_0x12bded(0x311)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0xf0ce8=_0x12bded;this[_0xf0ce8(0x2b3)]=this[_0xf0ce8(0x2b3)]||!!writer,this[_0xf0ce8(0x33c)]=this[_0xf0ce8(0x33c)]||!!reader,this['_kind']=kind||this[_0xf0ce8(0x31e)]||(_0x46a014[_0xf0ce8(0x349)]?_0xf0ce8(0x30a):_0xf0ce8(0x312)),this['_supervisorKey']=supervisorKey??this['_supervisorKey'],this[_0xf0ce8(0x1d3)]=listenAddr??this[_0xf0ce8(0x1d3)],this[_0xf0ce8(0x20d)](),await this[_0xf0ce8(0x223)]();if(!writer&&!reader)return null;if(!this[_0xf0ce8(0x378)]){const _0x4dd9d4=await this[_0xf0ce8(0x292)]['createEnvironment'](_0x361773,{'sync':![],'durability':_0xf0ce8(0x20e)});await _0x4dd9d4['ensureType'](_0x616751),this[_0xf0ce8(0x378)]=_0x4dd9d4;}return this[_0xf0ce8(0x378)];}[_0x12bded(0x324)](){const _0x172665=_0x12bded;return this[_0x172665(0x3ee)]!==this['_statusEnv']&&(this['_nodeDbFor']=this[_0x172665(0x378)],this[_0x172665(0x1e4)]=this[_0x172665(0x378)][_0x172665(0x3e2)](_0x616751)[_0x172665(0x25c)]),this[_0x172665(0x1e4)];}[_0x12bded(0x323)](_0xea43e6){const _0x5d0f1f=_0x12bded;if(_0x4c3ede)return this['_nodeDb']()[_0x5d0f1f(0x3f4)](_0xea43e6[_0x5d0f1f(0x3c0)],_0xea43e6,0x1);const _0x58a0cd=this[_0x5d0f1f(0x324)]()[_0x5d0f1f(0x281)](_0xea43e6[_0x5d0f1f(0x3c0)],_0xea43e6,0x1);if(_0x58a0cd&&typeof _0x58a0cd[_0x5d0f1f(0x2e5)]==='function')_0x58a0cd[_0x5d0f1f(0x2e5)](undefined,()=>{});return _0x58a0cd;}[_0x12bded(0x391)](_0x56d9c2){const _0x5c2ee6=_0x12bded;return this[_0x5c2ee6(0x324)]()[_0x5c2ee6(0x3f4)](_0x56d9c2[_0x5c2ee6(0x3c0)],_0x56d9c2,0x1);}[_0x12bded(0x33d)](_0xf526c7){const _0x160677=_0x12bded;if(_0x4c3ede)try{return this[_0x160677(0x324)]()[_0x160677(0x237)](_0xf526c7);}catch{return![];}const _0x44417a=this[_0x160677(0x324)]()[_0x160677(0x34e)](_0xf526c7);if(_0x44417a&&typeof _0x44417a[_0x160677(0x2e5)]===_0x160677(0x385))_0x44417a[_0x160677(0x2e5)](undefined,()=>{});return _0x44417a;}async['putNode'](_0x48f160){const _0x819ccb=_0x12bded;if(!this[_0x819ccb(0x378)]||!this[_0x819ccb(0x2b3)]||!_0x48f160?.[_0x819ccb(0x3c0)])return;return this[_0x819ccb(0x323)](_0x48f160);}async['removeNode'](_0x5f3055){const _0x599c1e=_0x12bded;if(!this[_0x599c1e(0x378)]||!this[_0x599c1e(0x2b3)]||!_0x5f3055)return;const _0x11f2bb=_0x5f3055[_0x599c1e(0x2ed)]('#'),_0x49af8b=[];for(const {key:_0x4167a2}of this[_0x599c1e(0x378)][_0x599c1e(0x3cb)](_0x616751)){if(_0x4167a2===_0x5f3055||!_0x11f2bb&&typeof _0x4167a2===_0x599c1e(0x361)&&_0x4167a2['startsWith'](_0x5f3055+'#'))_0x49af8b['push'](_0x4167a2);}for(const _0x197e4a of _0x49af8b){try{this[_0x599c1e(0x324)]()[_0x599c1e(0x237)](_0x197e4a);}catch{}}}['_nodeDead'](_0x15c7f9){const _0xdd17c2=_0x12bded;if(typeof _0x15c7f9?.[_0xdd17c2(0x2c8)]!==_0xdd17c2(0x3fb))return![];if(_0x15c7f9[_0xdd17c2(0x257)]!==_0x11c5cb[_0xdd17c2(0x2bf)]())return![];if(_0x15c7f9[_0xdd17c2(0x2c8)]===process[_0xdd17c2(0x2c8)])return![];if(_0x15c7f9['expiresAt']!=null&&_0x15c7f9[_0xdd17c2(0x277)]<Date[_0xdd17c2(0x3fc)]()-_0x343193)return!![];try{return process[_0xdd17c2(0x3ef)](_0x15c7f9['pid'],0x0),![];}catch(_0x130963){return _0x130963[_0xdd17c2(0x1d1)]===_0xdd17c2(0x3c7);}}[_0x12bded(0x332)](){const _0x49abe5=_0x12bded;if(!this[_0x49abe5(0x378)])return[];try{this[_0x49abe5(0x378)]['db']?.[_0x49abe5(0x266)]?.();}catch{}const _0xdf54ea=Date[_0x49abe5(0x3fc)](),_0x8cd19=_0x11c5cb['hostname'](),_0x5aa205=[];for(const {value:_0x147600}of this['_statusEnv']['getRange'](_0x616751)){if(!_0x147600)continue;let _0x3e196e=null;_0x147600['host']===_0x8cd19&&typeof _0x147600[_0x49abe5(0x2c8)]==='number'&&(_0x3e196e=!this[_0x49abe5(0x22b)](_0x147600));if(_0x3e196e===![])continue;const _0x1f4032=_0x147600[_0x49abe5(0x277)]==null||_0x147600[_0x49abe5(0x277)]>=_0xdf54ea;if(_0x3e196e===!![]||_0x1f4032)_0x5aa205[_0x49abe5(0x39a)](_0x147600);}return _0x5aa205;}async[_0x12bded(0x1e0)](_0x34ae28=0x0){const _0x4dda89=_0x12bded;if(!this[_0x4dda89(0x378)]||!this[_0x4dda89(0x2b3)])return;const _0x2da8e2=Date[_0x4dda89(0x3fc)]()-_0x34ae28,_0x1986ae=new Set(),_0x2344bd=[],_0x5e5714=_0x11c5cb['hostname'](),_0x39aee2=require$$6[_0x4dda89(0x1dc)];for(const {key:_0x35c4da,value:_0xc30508}of this[_0x4dda89(0x378)][_0x4dda89(0x3cb)](_0x616751)){if(!_0xc30508)continue;const _0x12880a=_0xc30508[_0x4dda89(0x257)]===_0x5e5714&&typeof _0xc30508[_0x4dda89(0x2c8)]==='number',_0xf6b587=_0x12880a?this[_0x4dda89(0x22b)](_0xc30508):_0xc30508['expiresAt']!=null&&_0xc30508['expiresAt']<_0x2da8e2;if(_0xf6b587)_0x2344bd['push'](_0x35c4da);else{_0x1986ae[_0x4dda89(0x342)](_0x263ca6(_0xc30508)??_0x35c4da);if(_0xc30508['version']&&_0xc30508['version']!==_0x39aee2){if(!this[_0x4dda89(0x38d)])this[_0x4dda89(0x38d)]=new Set();!this[_0x4dda89(0x38d)]['has'](_0xc30508['version'])&&(this['_versionSkewWarned'][_0x4dda89(0x342)](_0xc30508[_0x4dda89(0x1dc)]),this[_0x4dda89(0x292)]['log']?.[_0x4dda89(0x36e)]?.(_0x4dda89(0x27b)+(_0xc30508[_0x4dda89(0x2c8)]??'?')+_0x4dda89(0x35b)+_0xc30508[_0x4dda89(0x1dc)]+_0x4dda89(0x286)+_0x39aee2+_0x4dda89(0x24c)+'mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.',{'feature':_0x4dda89(0x3a0)}));}}}for(const _0x469346 of _0x2344bd)this['_removeRowAsync'](_0x469346);if(this[_0x4dda89(0x20d)]()){const _0x3a36e8=[];for(const {key:_0x3d440a}of this[_0x4dda89(0x2a4)]('node')){if(!_0x1986ae[_0x4dda89(0x23e)](_0x3d440a)){if(_0x4c3ede)try{this[_0x4dda89(0x1ff)][_0x4dda89(0x237)](_0x4dda89(0x244)+_0x3d440a);}catch{}else _0x3a36e8[_0x4dda89(0x39a)](this['_desired'][_0x4dda89(0x34e)](_0x4dda89(0x244)+_0x3d440a));}}if(_0x3a36e8[_0x4dda89(0x21a)])await Promise[_0x4dda89(0x2da)](_0x3a36e8);}}[_0x12bded(0x3cd)](_0x3c7517=null){const _0x31d520=_0x12bded;if(this[_0x31d520(0x401)])return;if(!this[_0x31d520(0x2b3)]||!this[_0x31d520(0x378)]){this[_0x31d520(0x292)]?.[_0x31d520(0x2a7)]?.[_0x31d520(0x36e)]?.('registry\x20heartbeat\x20skipped\x20(writer='+this[_0x31d520(0x2b3)]+_0x31d520(0x38a)+!!this[_0x31d520(0x378)]+_0x31d520(0x320),{'feature':_0x31d520(0x2c6)});return;}this['_onTick']=_0x3c7517,this[_0x31d520(0x23d)]=()=>this[_0x31d520(0x3b7)]();for(const _0x414283 of _0x481f2e)this[_0x31d520(0x292)][_0x31d520(0x250)]['on'](_0x414283,this['_onProcEvent']);this[_0x31d520(0x2a0)]();const _0x3a7f24=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x84f429;this[_0x31d520(0x401)]=setInterval(()=>{const _0x4c0b22=_0x31d520;if(this['_onTick'])try{this[_0x4c0b22(0x3e5)]();}catch{}this['_publishNow'](),this[_0x4c0b22(0x1e0)]()[_0x4c0b22(0x299)](()=>{});},_0x3a7f24);if(this[_0x31d520(0x401)][_0x31d520(0x3e3)])this['_hbTimer']['unref']();}[_0x12bded(0x3b7)](){const _0x3ff0ce=_0x12bded;if(!this[_0x3ff0ce(0x2b3)]||!this['_statusEnv'])return;if(Date[_0x3ff0ce(0x3fc)]()-this['_lastPublishAt']<_0x66d92d)return;this[_0x3ff0ce(0x2a0)]();}[_0x12bded(0x2a0)](){const _0x3724c5=_0x12bded;if(!this[_0x3724c5(0x2b3)]||!this[_0x3724c5(0x378)])return;this['_lastPublishAt']=Date[_0x3724c5(0x3fc)]();try{const _0x3875e0=[this[_0x3724c5(0x31c)]()];for(const _0x57aa57 of this['_children']['values']())_0x3875e0[_0x3724c5(0x39a)](this[_0x3724c5(0x3e7)](_0x57aa57));const _0x3f7788=_0x267e86[_0x3724c5(0x215)]?_0x267e86['now']():0x0;for(const _0x489b13 of _0x3875e0){try{this[_0x3724c5(0x391)](_0x489b13),this[_0x3724c5(0x369)]=![];}catch(_0x2e6d87){!this['_publishFailWarned']&&(this[_0x3724c5(0x369)]=!![],this['okdb']?.['log']?.[_0x3724c5(0x36e)]?.(_0x3724c5(0x297)+_0x2e6d87[_0x3724c5(0x30e)],{'feature':_0x3724c5(0x2c6)}));}}if(_0x267e86[_0x3724c5(0x215)])_0x267e86[_0x3724c5(0x2a1)](_0x3724c5(0x316),_0x267e86[_0x3724c5(0x3fc)]()-_0x3f7788,'rows='+_0x3875e0[_0x3724c5(0x21a)]+'\x20sync');}catch(_0x8db6f7){!this['_publishFailWarned']&&(this[_0x3724c5(0x369)]=!![],this[_0x3724c5(0x292)]?.[_0x3724c5(0x2a7)]?.[_0x3724c5(0x36e)]?.(_0x3724c5(0x297)+_0x8db6f7[_0x3724c5(0x30e)],{'feature':_0x3724c5(0x2c6)}));}}async[_0x12bded(0x238)](){const _0xec652c=_0x12bded;if(this[_0xec652c(0x23d)]){for(const _0x2fcac2 of _0x481f2e){try{this[_0xec652c(0x292)]['events'][_0xec652c(0x29f)](_0x2fcac2,this[_0xec652c(0x23d)]);}catch{}}this[_0xec652c(0x23d)]=null;}this['_hbTimer']&&(clearInterval(this['_hbTimer']),this[_0xec652c(0x401)]=null);try{if(this[_0xec652c(0x378)]&&this['_isWriter'])await this[_0xec652c(0x325)](this[_0xec652c(0x2b7)]);}catch{}}async[_0x12bded(0x3ca)](){const _0x8df948=_0x12bded;if(!this['_statusEnv']||!this[_0x8df948(0x2b3)])return;try{await this[_0x8df948(0x325)](this['_rowKey']);}catch{}try{const _0x4ca2ba=[];for(const {value:_0xaadca3}of this[_0x8df948(0x378)]['getRange'](_0x616751)){if(_0xaadca3?.[_0x8df948(0x37d)]===process[_0x8df948(0x2c8)]&&_0xaadca3[_0x8df948(0x3c0)])_0x4ca2ba[_0x8df948(0x39a)](_0xaadca3[_0x8df948(0x3c0)]);}for(const _0x3d3274 of _0x4ca2ba){try{await this[_0x8df948(0x325)](_0x3d3274);}catch{}}}catch{}}async[_0x12bded(0x210)](){const _0x2c12b4=_0x12bded;return this[_0x2c12b4(0x2ea)](this[_0x2c12b4(0x31c)]());}async['publishChildRow'](_0x478687){const _0x165449=_0x12bded;if(!this['_statusEnv']||!this['_isWriter'])return;return this[_0x165449(0x2ea)](this[_0x165449(0x3e7)](_0x478687));}[_0x12bded(0x3e7)]({pid:_0x49a2aa,startedAt:_0x52e676,kind:_0x5e28e8,supervisorKey:_0x4b5529,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x12bded(0x35a),meta:meta=null,stats:stats=null}){const _0x420629=_0x12bded,_0x42dd30=Date[_0x420629(0x3fc)](),_0x401163=_0x509992(_0x49a2aa,_0x52e676);return{'nodeKey':_0x4563a6(_0x401163,'0'),'processKey':_0x401163,'instanceId':'0','pid':_0x49a2aa,'startedAt':_0x52e676,'ppid':process[_0x420629(0x2c8)],'host':_0x11c5cb['hostname'](),'supervisorKey':_0x4b5529,'slot':slot,'slotKey':slotKey,'kind':_0x5e28e8,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x42dd30,'expiresAt':_0x42dd30+_0x4d9548,'caps':this[_0x420629(0x2fd)](_0x5e28e8,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x12bded(0x3cc)](_0x55cb3e){const _0x38dc5e=_0x12bded;if(!_0x55cb3e?.['pid'])return null;const _0x4670ad=_0x509992(_0x55cb3e[_0x38dc5e(0x2c8)],_0x55cb3e[_0x38dc5e(0x211)]);this['_children'][_0x38dc5e(0x275)](_0x4670ad,{..._0x55cb3e,'supervisorKey':_0x55cb3e[_0x38dc5e(0x1ef)]??this[_0x38dc5e(0x255)]});if(this[_0x38dc5e(0x2b3)])await this[_0x38dc5e(0x2fe)](this[_0x38dc5e(0x2f4)][_0x38dc5e(0x256)](_0x4670ad))['catch']?.(()=>{});return _0x4670ad;}[_0x12bded(0x206)](_0x9be88a){const _0x9229f8=_0x12bded;if(!_0x9be88a)return;return this[_0x9229f8(0x2f4)][_0x9229f8(0x2aa)](_0x9be88a),this['removeNode'](_0x9be88a);}[_0x12bded(0x3aa)](){const _0xbc5238=_0x12bded,_0x38a2d7=Date[_0xbc5238(0x3fc)](),_0x49d55a=process[_0xbc5238(0x1fc)](),_0x5ee1e6=(_0x38a2d7-this[_0xbc5238(0x2d3)])*0x3e8;if(_0x5ee1e6>=0x3d090){const _0x274a7d=_0x49d55a['user']-this['_lastCpuUsage'][_0xbc5238(0x381)]+(_0x49d55a['system']-this['_lastCpuUsage'][_0xbc5238(0x27d)]),_0x340795=_0x11c5cb[_0xbc5238(0x2bd)]()[_0xbc5238(0x21a)]||0x1;this['_lastCpuPct']=Math[_0xbc5238(0x249)](0x64,Math['round'](_0x274a7d/(_0x5ee1e6*_0x340795)*0x64)),this['_lastCpuWindowMs']=Math['round'](_0x5ee1e6/0x3e8),this['_lastCpuUsage']=_0x49d55a,this[_0xbc5238(0x2d3)]=_0x38a2d7;}const _0x241573=process[_0xbc5238(0x395)](),_0x5910f0=this[_0xbc5238(0x358)][_0xbc5238(0x261)];let _0x40b6af=0x0;if(_0x5910f0>0x0){const _0x53a3e2=[this['okdb'],...this[_0xbc5238(0x292)][_0xbc5238(0x338)]?.['values']?.()??[]];for(const _0x2e7892 of _0x53a3e2){const _0x50c131=_0x2e7892['functions']?.[_0xbc5238(0x2eb)];if(_0x50c131)_0x40b6af+=_0x50c131['liveThreadStats']['busy'];}}let _0x1844ea=null;const _0x58b919=_0x5910f0;if(_0x58b919>0x0){let _0x37111f=0x0;for(const _0x2cafb1 of this['_threadStats']['values']())_0x37111f+=_0x2cafb1[_0xbc5238(0x25d)]||0x0;_0x1844ea={'count':_0x58b919,'heapUsed':_0x37111f,'sandbox':_0x5910f0,'busy':_0x40b6af};}return{'rss':_0x241573[_0xbc5238(0x34c)],'heapUsed':_0x241573[_0xbc5238(0x25d)],'heapTotal':_0x241573[_0xbc5238(0x3f1)],'external':_0x241573[_0xbc5238(0x2a3)],'cpuPct':this[_0xbc5238(0x1de)],'cpuWindowMs':this[_0xbc5238(0x2ff)]??null,'threads':_0x1844ea,'at':_0x38a2d7};}[_0x12bded(0x24f)](_0x291196,_0x473724){const _0x1e687c=_0x12bded;if(!_0x291196||!_0x473724)return;this['_threadStats'][_0x1e687c(0x275)](_0x291196,_0x473724);}[_0x12bded(0x29d)](_0x478fd8){const _0x2a5b3f=_0x12bded;this[_0x2a5b3f(0x358)][_0x2a5b3f(0x2aa)](_0x478fd8);}[_0x12bded(0x32c)](_0x2daa69,_0x36b0e6,_0x212446=undefined){const _0x19470b=_0x12bded,_0x43ded1=this['_children'][_0x19470b(0x256)](_0x2daa69);if(!_0x43ded1||!_0x36b0e6)return;if(_0x212446!==undefined)_0x43ded1[_0x19470b(0x2dd)]=_0x212446;_0x43ded1[_0x19470b(0x33f)]={'rss':_0x36b0e6[_0x19470b(0x34c)]??null,'heapUsed':_0x36b0e6[_0x19470b(0x25d)]??null,'heapTotal':_0x36b0e6[_0x19470b(0x3f1)]??null,'external':_0x36b0e6[_0x19470b(0x2a3)]??null,'cpuPct':_0x36b0e6[_0x19470b(0x322)]??null,'cpuWindowMs':_0x36b0e6['cpuWindowMs']??null,'threads':_0x36b0e6[_0x19470b(0x225)]??null,'claims':_0x36b0e6['claims']??null,'envsOpen':_0x36b0e6['envsOpen']??null,'at':Date['now']()};}[_0x12bded(0x31c)](){const _0x32bb70=_0x12bded,_0x137730=Date['now'](),_0x361b68=this[_0x32bb70(0x292)][_0x32bb70(0x37a)]||{},_0xfd79af=this[_0x32bb70(0x31e)]||'cli';return{'nodeKey':this[_0x32bb70(0x2b7)],'processKey':this[_0x32bb70(0x255)],'instanceId':this[_0x32bb70(0x387)],'pid':process[_0x32bb70(0x2c8)],'startedAt':this[_0x32bb70(0x370)],'instanceStartedAt':this[_0x32bb70(0x295)],'ppid':typeof process[_0x32bb70(0x37d)]==='number'?process[_0x32bb70(0x37d)]:null,'host':_0x11c5cb[_0x32bb70(0x2bf)](),'supervisorKey':this[_0x32bb70(0x2d4)]??null,'version':require$$6[_0x32bb70(0x1dc)],'kind':_0xfd79af,'role':{'engines':!!_0x361b68[_0x32bb70(0x399)],'processors':!!_0x361b68['processors'],'compaction':_0x361b68[_0x32bb70(0x366)],'http':_0x361b68[_0x32bb70(0x3a1)]},'listenAddr':this[_0x32bb70(0x1d3)]??null,'heartbeatAt':_0x137730,'expiresAt':_0x137730+_0x4d9548,'caps':this[_0x32bb70(0x2fd)](_0xfd79af,_0x361b68),'lifecycle':{'state':'running','desiredVersionApplied':null},'meta':{...this[_0x32bb70(0x2e4)]},'processing':_0x361b68[_0x32bb70(0x1d4)]?this[_0x32bb70(0x2d5)]():null,'engines':_0x361b68[_0x32bb70(0x399)]?[...this[_0x32bb70(0x292)][_0x32bb70(0x2ee)]??[]]:null,'singletonClaims':this[_0x32bb70(0x353)](),'stats':this['_sampleOwnStats'](),'writers':this[_0x32bb70(0x25a)]()};}['_collectWriterFacet'](){const _0x477c88=_0x12bded,_0x45651e={};try{for(const [_0x241374,_0x5512a9]of this[_0x477c88(0x292)][_0x477c88(0x338)]){try{const _0x1d05b1=_0x5512a9['writerStatus']?.();if(!_0x1d05b1)continue;if(!_0x1d05b1[_0x477c88(0x3d9)]&&!_0x1d05b1[_0x477c88(0x351)]&&!(_0x1d05b1[_0x477c88(0x30f)]??0x0)&&!_0x1d05b1[_0x477c88(0x29c)])continue;_0x45651e[_0x241374]={'depth':_0x1d05b1[_0x477c88(0x3d9)],'oldestPendingMs':_0x1d05b1[_0x477c88(0x2f1)],'committed':_0x1d05b1['committed'],'commitsPerSec':_0x1d05b1[_0x477c88(0x3ae)],'commitP99Ms':_0x1d05b1['commitP99Ms'],'parkedNow':_0x1d05b1['parkedNow']??0x0,'draining':!!_0x1d05b1[_0x477c88(0x29c)]};}catch{}}}catch{}return Object[_0x477c88(0x356)](_0x45651e)[_0x477c88(0x21a)]?_0x45651e:null;}[_0x12bded(0x353)](){const _0x2cb477=_0x12bded,_0x3c63a7=process[_0x2cb477(0x2c8)],_0x5afe43=Date['now'](),_0x5281df=_0x37d460=>{const _0x1d3145=_0x2cb477;if(!_0x37d460)return[];const _0x14ba5d=[];try{for(const {id:_0x16d98b,entry:_0x2cb12a}of _0x37d460[_0x1d3145(0x348)]()){if(_0x2cb12a?.['holder']?.['pid']!==_0x3c63a7)continue;const _0x3ae012=_0x2cb12a[_0x1d3145(0x2ef)]??_0x2cb12a[_0x1d3145(0x253)]??0x0;if(_0x3ae012+(_0x2cb12a['ttlMs']??0x0)<_0x5afe43)continue;_0x14ba5d['push'](_0x16d98b);}}catch{}return _0x14ba5d;},_0x291e54=_0x5281df(this['_singletonLock'](_0x2cb477(0x327))),_0x5daac6=_0x5281df(this[_0x2cb477(0x37f)](_0x2cb477(0x3ab)));if(!_0x291e54[_0x2cb477(0x21a)]&&!_0x5daac6[_0x2cb477(0x21a)])return null;return{'compact':_0x291e54,'replicate':_0x5daac6};}[_0x12bded(0x37f)](_0x187664){const _0x1c4e54=_0x12bded;if(!this[_0x1c4e54(0x292)]?.['_rootDb'])return null;if(!this['_singletonLocks'])this[_0x1c4e54(0x1f6)]=new Map();let _0x2d58f5=this[_0x1c4e54(0x1f6)]['get'](_0x187664);if(!_0x2d58f5)try{_0x2d58f5=new _0x123333(this[_0x1c4e54(0x292)][_0x1c4e54(0x3cf)],{'namespace':_0x187664}),this['_singletonLocks'][_0x1c4e54(0x275)](_0x187664,_0x2d58f5);}catch{return null;}return _0x2d58f5;}[_0x12bded(0x2d5)](){const _0x26633d=_0x12bded,_0x49d87a=[];try{for(const [_0x19a6d1,_0x1912ce]of this[_0x26633d(0x292)]['_envs']){if(_0x19a6d1[_0x26633d(0x1f7)]('~'))continue;for(const _0x1ea00f of _0x1912ce[_0x26633d(0x397)][_0x26633d(0x2a5)]())_0x49d87a[_0x26633d(0x39a)]({..._0x1ea00f,'env':_0x19a6d1});}}catch{}return{'participate':this[_0x26633d(0x292)][_0x26633d(0x1d4)]?.[_0x26633d(0x280)]??![],'processors':_0x49d87a};}[_0x12bded(0x20d)](){const _0x32f27a=_0x12bded;if(this[_0x32f27a(0x1ff)])return!![];const _0x4508c5=this[_0x32f27a(0x292)][_0x32f27a(0x3cf)];if(!_0x4508c5)return![];return this[_0x32f27a(0x1ff)]=_0x4508c5[_0x32f27a(0x3d1)](_0x493b20,{'dupSort':![]}),this[_0x32f27a(0x36a)]=_0x4508c5[_0x32f27a(0x3d1)](_0x2cba6b,{'dupSort':![]}),!![];}async['_migrateVocab'](){const _0x224c29=_0x12bded;if(!this['_ensureDesired']())return;const _0x4bff85=_0x224c29(0x340),_0x4c3d79=0x1,_0x4064c9=this[_0x224c29(0x1ff)][_0x224c29(0x256)](_0x4bff85)??0x0;if(_0x4064c9>=_0x4c3d79)return;const _0x570032=_0x30119d=>{const _0x1ceb1b=_0x224c29;if(_0x30119d==='worker')return _0x1ceb1b(0x307);if(_0x30119d===_0x1ceb1b(0x29a))return _0x1ceb1b(0x300);return _0x30119d;};await this['okdb'][_0x224c29(0x343)]['_writer'][_0x224c29(0x306)](()=>{const _0x104d54=_0x224c29;for(const _0xf4b0a of[_0x104d54(0x22d),_0x104d54(0x38f)]){for(const {key:_0x436255,value:_0x3fb22c}of this[_0x104d54(0x1ff)][_0x104d54(0x3cb)]({'start':_0xf4b0a,'end':_0xf4b0a+'\xff'})){if(typeof _0x436255!==_0x104d54(0x361)||!_0x436255[_0x104d54(0x1f7)](_0xf4b0a))break;const _0x13bc2b=_0x570032(_0x3fb22c['mode']);if(_0x13bc2b!==_0x3fb22c[_0x104d54(0x3e6)])this[_0x104d54(0x1ff)]['put'](_0x436255,{..._0x3fb22c,'mode':_0x13bc2b});}}this[_0x104d54(0x1ff)][_0x104d54(0x281)](_0x4bff85,_0x4c3d79);});}[_0x12bded(0x288)](){const _0x15e26b=_0x12bded;return!!this[_0x15e26b(0x1ff)];}[_0x12bded(0x1fb)](_0x55ebef,_0xe3cf51){const _0x456162=_0x12bded;if(!this['_ensureDesired']())return null;const _0x38e701=_0x55ebef+'/'+_0xe3cf51;return this[_0x456162(0x28b)](),this[_0x456162(0x27f)][_0x456162(0x256)](_0x38e701)??this[_0x456162(0x1ff)][_0x456162(0x256)](_0x38e701)??null;}[_0x12bded(0x28b)](){const _0x59dbd4=_0x12bded;if(!_0x4c3ede)return;try{this['okdb'][_0x59dbd4(0x343)]?.['db']?.[_0x59dbd4(0x266)]?.();}catch{}}async[_0x12bded(0x310)](_0x2d0cf9,_0x5f53ef,_0x2fc683){const _0x22e133=_0x12bded;if(!this[_0x22e133(0x20d)]())return null;const _0x47893b=_0x2d0cf9+'/'+_0x5f53ef;this[_0x22e133(0x28b)]();const _0x3774a6=this[_0x22e133(0x27f)]['get'](_0x47893b)??this['_desired'][_0x22e133(0x256)](_0x47893b)??{'version':0x0},_0x52e3ef=(_0x3774a6[_0x22e133(0x1dc)]||0x0)+0x1,_0x4b71e4={..._0x3774a6,..._0x2fc683,'version':_0x52e3ef,'updatedAt':Date[_0x22e133(0x3fc)]()};this['_desiredOverlay'][_0x22e133(0x275)](_0x47893b,_0x4b71e4);try{await this[_0x22e133(0x292)][_0x22e133(0x343)]['_writer']['transaction'](()=>{const _0x4bc440=_0x22e133;this[_0x4bc440(0x1ff)][_0x4bc440(0x281)](_0x47893b,_0x4b71e4);});}finally{if(this[_0x22e133(0x27f)][_0x22e133(0x256)](_0x47893b)===_0x4b71e4)this['_desiredOverlay'][_0x22e133(0x2aa)](_0x47893b);}return _0x52e3ef;}[_0x12bded(0x2a4)](_0x5cf53b){const _0x335588=_0x12bded;if(!this[_0x335588(0x20d)]())return[];this['_refreshDesiredSnapshot']();const _0x4afbce=_0x5cf53b+'/',_0x1bffd7=[];for(const {key:_0x24fc88,value:_0xba8522}of this['_desired'][_0x335588(0x3cb)]({'start':_0x4afbce,'end':_0x4afbce+'\xff'})){if(typeof _0x24fc88!==_0x335588(0x361)||!_0x24fc88[_0x335588(0x1f7)](_0x4afbce))break;_0x1bffd7['push']({'key':_0x24fc88[_0x335588(0x204)](_0x4afbce['length']),'value':_0xba8522});}return _0x1bffd7;}[_0x12bded(0x222)](_0x10a75b){const _0x5348b1=_0x12bded;if(!this[_0x5348b1(0x20d)]())return null;return this[_0x5348b1(0x36a)][_0x5348b1(0x256)](_0x10a75b)??null;}async[_0x12bded(0x3c4)](_0x3c6597,_0xef229d,_0x329a00={}){const _0x518db6=_0x12bded;if(!this[_0x518db6(0x20d)]())return null;let _0x4f80ec;return await this[_0x518db6(0x292)][_0x518db6(0x343)][_0x518db6(0x321)][_0x518db6(0x306)](()=>{const _0x5d3689=_0x518db6,_0x21d058=this[_0x5d3689(0x36a)][_0x5d3689(0x256)](_0x3c6597)||{'epoch':0x0};_0x4f80ec=(_0x21d058[_0x5d3689(0x2a9)]||0x0)+0x1,this[_0x5d3689(0x36a)]['put'](_0x3c6597,{..._0x21d058,..._0x329a00,'cmd':_0xef229d,'epoch':_0x4f80ec,'updatedAt':Date['now']()});}),_0x4f80ec;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x1058ee,'nodeKey':_0x509992,'logicalKey':_0x55b4bd,'slotKey':_0x2bfa24,'PROCESS_ENV':_0x361773,'NODE_TYPE':_0x616751},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x4bddb6=_0x3b4fb0;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x7a3a80=require$$0$4,{EVENTS:_0xa86aad,CHANGE_ACTIONS:_0x4a6cfb}=requireOkdbEnums(),{LOOP:_0x20ca17}=requireOkdbLoopMonitor(),_0x1eb994=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x3f103b=0x5,_0x580070=0x2710;class _0x5092d4 extends _0x7a3a80{constructor(_0x768cc3,_0x3d8a79={}){const _0x29acb7=_0x55dd;super(),this[_0x29acb7(0x292)]=_0x768cc3,this['_quantum']=_0x3d8a79[_0x29acb7(0x24d)]??_0x1eb994,this[_0x29acb7(0x2c9)]=_0x3d8a79[_0x29acb7(0x3c6)]??_0x3f103b,this[_0x29acb7(0x3b1)]=_0x3d8a79[_0x29acb7(0x390)]??_0x580070,this['_started']=![],this['_cursors']=new Map(),this['_baselines']=new Map(),this['_pending']=new Map(),this[_0x29acb7(0x203)]=null,this[_0x29acb7(0x209)]=![],this[_0x29acb7(0x331)]=new Set(),this['_onItem']=_0x545954=>this[_0x29acb7(0x3bc)](_0x545954),this[_0x29acb7(0x3f7)]=_0x4369c5=>this[_0x29acb7(0x37c)](_0x4369c5),this[_0x29acb7(0x2b9)]=()=>this[_0x29acb7(0x227)]();}['start'](){const _0x58da1c=_0x55dd;if(this['_started'])return;this[_0x58da1c(0x3f8)]=!![];for(const [_0x332efd,_0x32bf86]of this[_0x58da1c(0x292)]['_envs']){if(_0x332efd[_0x58da1c(0x1f7)]('~'))continue;try{_0x32bf86[_0x58da1c(0x355)]();}catch{}}for(const [_0x4d5f3d,_0x18d836]of this[_0x58da1c(0x292)]['_envs']){if(_0x4d5f3d[_0x58da1c(0x1f7)]('~'))continue;try{this[_0x58da1c(0x2c4)][_0x58da1c(0x275)](_0x4d5f3d,_0x18d836[_0x58da1c(0x236)]()||0x0);}catch{}}const {events:_0x79e346}=this[_0x58da1c(0x292)];_0x79e346['on'](_0xa86aad[_0x58da1c(0x34a)],this[_0x58da1c(0x392)]),_0x79e346['on'](_0xa86aad[_0x58da1c(0x301)],this[_0x58da1c(0x392)]),_0x79e346['on'](_0xa86aad[_0x58da1c(0x383)],this['_onItem']),_0x79e346['on'](_0xa86aad['SYSTEM_POKE'],this[_0x58da1c(0x3f7)]),_0x79e346['once'](_0xa86aad[_0x58da1c(0x339)],this[_0x58da1c(0x2b9)]);}[_0x4bddb6(0x227)](){const _0x288ca7=_0x4bddb6;if(!this[_0x288ca7(0x3f8)])return;this[_0x288ca7(0x3f8)]=![];const {events:_0x48a002}=this[_0x288ca7(0x292)];_0x48a002[_0x288ca7(0x29f)](_0xa86aad[_0x288ca7(0x34a)],this['_onItem']),_0x48a002[_0x288ca7(0x29f)](_0xa86aad[_0x288ca7(0x301)],this[_0x288ca7(0x392)]),_0x48a002[_0x288ca7(0x29f)](_0xa86aad[_0x288ca7(0x383)],this[_0x288ca7(0x392)]),_0x48a002['off'](_0xa86aad[_0x288ca7(0x25e)],this[_0x288ca7(0x3f7)]);try{_0x48a002[_0x288ca7(0x29f)](_0xa86aad[_0x288ca7(0x339)],this[_0x288ca7(0x2b9)]);}catch{}this[_0x288ca7(0x203)]&&(clearTimeout(this[_0x288ca7(0x203)]),this['_flushTimer']=null),this['_pending'][_0x288ca7(0x2ba)](),this[_0x288ca7(0x290)][_0x288ca7(0x2ba)](),this[_0x288ca7(0x2c4)][_0x288ca7(0x2ba)](),this[_0x288ca7(0x331)][_0x288ca7(0x2ba)]();}['_dedupeKey'](_0x468e1d,_0x129800,_0x280382,_0x43417f){return _0x468e1d+'\x00'+_0x129800+'\x00'+_0x280382+'\x00'+_0x43417f;}['_markSeen'](_0x27abbb,_0x1b1506,_0x106e53,_0x2adf00){const _0x221f93=_0x4bddb6,_0x544f2b=this['_dedupeKey'](_0x27abbb,_0x1b1506,_0x106e53,_0x2adf00);if(this[_0x221f93(0x331)][_0x221f93(0x23e)](_0x544f2b))return![];this[_0x221f93(0x331)]['add'](_0x544f2b);if(this[_0x221f93(0x331)][_0x221f93(0x261)]>this[_0x221f93(0x3b1)]){const _0x503859=this[_0x221f93(0x331)]['values']()[_0x221f93(0x365)]()[_0x221f93(0x21f)];this[_0x221f93(0x331)][_0x221f93(0x2aa)](_0x503859);}return!![];}[_0x4bddb6(0x3bc)](_0x42f7f3){const _0x15272b=_0x4bddb6;if(!this[_0x15272b(0x3f8)]||!_0x42f7f3)return;const {env:_0x4fafd1,type:_0x1afdf3,key:_0x10f674,clock:_0x33865a,origin:_0x323d35,action:_0xb9e285,newValue:_0x1ef4a6,oldValue:_0xd47885}=_0x42f7f3;if(_0x4fafd1==null||_0x1afdf3==null||_0x10f674==null)return;if(typeof _0x4fafd1===_0x15272b(0x361)&&_0x4fafd1[_0x15272b(0x1f7)]('~'))return;if(typeof _0x1afdf3===_0x15272b(0x361)&&_0x1afdf3['startsWith']('~'))return;if(!this[_0x15272b(0x278)](_0x4fafd1,_0x1afdf3,_0x10f674,_0x33865a))return;const _0x205581=_0xb9e285===_0x4a6cfb[_0x15272b(0x352)]?'remove':_0x15272b(0x281);this['emit'](_0x15272b(0x308),{'env':_0x4fafd1,'type':_0x1afdf3,'key':_0x10f674,'op':_0x205581,'clock':_0x33865a,'origin':_0x323d35,'value':_0x205581===_0x15272b(0x34e)?null:_0x1ef4a6,'prevValue':_0xd47885});}[_0x4bddb6(0x37c)](_0x55fcbf){const _0x17d8a7=_0x4bddb6;if(!this[_0x17d8a7(0x3f8)])return;if(!_0x55fcbf||typeof _0x55fcbf[_0x17d8a7(0x394)]!=='string'||typeof _0x55fcbf['type']!==_0x17d8a7(0x361))return;const {env:_0xe40746,type:_0x55acce}=_0x55fcbf;if(_0xe40746[_0x17d8a7(0x1f7)]('~')||_0x55acce[_0x17d8a7(0x1f7)]('~'))return;this[_0x17d8a7(0x24a)][_0x17d8a7(0x275)](_0xe40746+'\x00'+_0x55acce,{'env':_0xe40746,'type':_0x55acce}),this[_0x17d8a7(0x2d6)]();}[_0x4bddb6(0x2d6)](){const _0x59a0b4=_0x4bddb6;if(this[_0x59a0b4(0x203)])return;const _0x493b09=()=>{const _0x1c5c0b=_0x59a0b4;this[_0x1c5c0b(0x203)]=null,this[_0x1c5c0b(0x3ec)]()['catch'](()=>{});};this['_flushTimer']=setTimeout(_0x493b09,this[_0x59a0b4(0x2c9)]>0x0?this[_0x59a0b4(0x2c9)]:0x0);}async[_0x4bddb6(0x3ec)](){const _0x4b4e45=_0x4bddb6;if(this[_0x4b4e45(0x209)]){this[_0x4b4e45(0x2d6)]();return;}this[_0x4b4e45(0x209)]=!![];try{const _0xdad157=[...this['_pending']['values']()];this[_0x4b4e45(0x24a)][_0x4b4e45(0x2ba)]();let _0x4aa216=![];for(const {env:_0x405c0a,type:_0x301da6}of _0xdad157){try{const _0x10cc30=await this[_0x4b4e45(0x248)](_0x405c0a,_0x301da6);if(_0x10cc30)_0x4aa216=!![];}catch{this['_pending'][_0x4b4e45(0x275)](_0x405c0a+'\x00'+_0x301da6,{'env':_0x405c0a,'type':_0x301da6}),_0x4aa216=!![];}}if(_0x4aa216||this[_0x4b4e45(0x24a)][_0x4b4e45(0x261)]>0x0)this[_0x4b4e45(0x2d6)]();}finally{this[_0x4b4e45(0x209)]=![];}}async['_drainOne'](_0x7dafd5,_0x4b98b3){const _0x17c2bc=_0x4bddb6,_0x36e2a2=await this[_0x17c2bc(0x292)]['_openEnvLazy'](_0x7dafd5),_0x2324bb=_0x7dafd5+'\x00'+_0x4b98b3;!this[_0x17c2bc(0x290)][_0x17c2bc(0x23e)](_0x2324bb)&&(!this[_0x17c2bc(0x2c4)][_0x17c2bc(0x23e)](_0x7dafd5)&&(_0x36e2a2[_0x17c2bc(0x355)](),this['_baselines']['set'](_0x7dafd5,_0x36e2a2['getClock']()||0x0)),this[_0x17c2bc(0x290)][_0x17c2bc(0x275)](_0x2324bb,this[_0x17c2bc(0x2c4)][_0x17c2bc(0x256)](_0x7dafd5)));const _0x51ac58=this[_0x17c2bc(0x290)][_0x17c2bc(0x256)](_0x2324bb),_0x316732=_0x36e2a2[_0x17c2bc(0x236)](_0x4b98b3)||0x0;if(_0x316732<=_0x51ac58)return![];const _0x381b21=_0x51ac58+this[_0x17c2bc(0x3e4)],_0x55afb4=Math[_0x17c2bc(0x249)](_0x316732,_0x381b21),_0x56646=_0x20ca17[_0x17c2bc(0x215)]?_0x20ca17[_0x17c2bc(0x3fc)]():0x0,_0x4b654d=Array['from'](_0x36e2a2[_0x17c2bc(0x32d)](_0x4b98b3,_0x51ac58+0x1,_0x55afb4));let _0x4eeeec=_0x51ac58;for(const _0x57b222 of _0x4b654d){const {clock:_0x3dd85c,key:_0x24394c,action:_0x2cffed,origin:_0x149591}=_0x57b222;if(_0x3dd85c>_0x4eeeec)_0x4eeeec=_0x3dd85c;if(_0x24394c==null)continue;if(!this['_markSeen'](_0x7dafd5,_0x4b98b3,_0x24394c,_0x3dd85c))continue;let _0xbc399a,_0x5f3088;if(_0x2cffed===_0x4a6cfb[_0x17c2bc(0x352)])_0xbc399a=_0x17c2bc(0x34e),_0x5f3088=null;else{const _0x1f09d4=_0x36e2a2[_0x17c2bc(0x256)](_0x4b98b3,_0x24394c);_0x1f09d4==null?(_0xbc399a=_0x17c2bc(0x34e),_0x5f3088=null):(_0xbc399a=_0x17c2bc(0x281),_0x5f3088=_0x1f09d4);}this[_0x17c2bc(0x2d2)](_0x17c2bc(0x308),{'env':_0x7dafd5,'type':_0x4b98b3,'key':_0x24394c,'op':_0xbc399a,'clock':_0x3dd85c,'origin':_0x149591,'value':_0x5f3088});}if(_0x20ca17['enabled'])_0x20ca17[_0x17c2bc(0x2a1)](_0x17c2bc(0x22a)+_0x7dafd5+':'+_0x4b98b3,_0x20ca17['now']()-_0x56646,'n='+_0x4b654d['length']);return this[_0x17c2bc(0x290)][_0x17c2bc(0x275)](_0x2324bb,Math[_0x17c2bc(0x287)](_0x4eeeec,_0x55afb4)),_0x36e2a2[_0x17c2bc(0x236)](_0x4b98b3)>_0x55afb4;}[_0x4bddb6(0x243)](){const _0x1e60a2=_0x4bddb6;return{'started':this[_0x1e60a2(0x3f8)],'quantum':this[_0x1e60a2(0x3e4)],'flushDebounce':this['_flushDebounce'],'cursors':Object[_0x1e60a2(0x26e)]([...this[_0x1e60a2(0x290)][_0x1e60a2(0x20c)]()][_0x1e60a2(0x38b)](([_0xe8e7bb,_0x1b8da1])=>[_0xe8e7bb[_0x1e60a2(0x212)]('\x00',':'),_0x1b8da1])),'pending':this['_pending'][_0x1e60a2(0x261)],'seen':this[_0x1e60a2(0x331)][_0x1e60a2(0x261)]};}}return _0x5092d4['CHANGEFEED_QUANTUM']=_0x1eb994,okdbChangefeed={'OKDBChangefeed':_0x5092d4},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x5ba5e3=_0x3b4fb0;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x31d508=require$$1$1,_0xea03e7=require$$1,{EVENTS:_0xd81128}=requireOkdbEnums(),_0x237cd5=require$$0$3,{slotKey:_0x64c170}=requireOkdbProcessRegistry(),_0x12f7f5=0xfa,_0x349298=0xfa0,_0x91b31f=0x5,_0x41ab54=0x2710,_0xf72a24=0xbb8,_0x1e616f=0x7d0,_0x19b40e=_0x5ba5e3(0x1f5),_0x38dd32=_0x5ba5e3(0x38e),_0x4a1564='log',_0x447617=_0x5ba5e3(0x33f),_0x53ba27=[_0xd81128['VIEW_PROGRESS'],_0xd81128[_0x5ba5e3(0x30d)],_0xd81128[_0x5ba5e3(0x293)],_0xd81128[_0x5ba5e3(0x333)],_0xd81128[_0x5ba5e3(0x3d0)],_0xd81128[_0x5ba5e3(0x2c3)],_0xd81128['INDEX_RESET'],_0xd81128[_0x5ba5e3(0x3d4)],_0x5ba5e3(0x34d),_0x5ba5e3(0x362),'processor:error',_0x5ba5e3(0x36c),'processor:resumed',_0x5ba5e3(0x3a5)],_0x4e75af=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x3e5f8b({workers:_0x4f10f5,makeOkdb:_0x5b2c9d,port:_0x46aca5,primaryOkdb:_0x65e3ea,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0x5bc2a2=_0x5ba5e3;if(_0x31d508['isPrimary'])return childEntry&&_0x31d508[_0x5bc2a2(0x36d)]({'exec':_0xea03e7[_0x5bc2a2(0x1ec)](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0x54df4d=_0x5bc2a2,_0x18f907=[];for(let _0x214f7f=0x0;_0x214f7f<process[_0x54df4d(0x245)]['length'];_0x214f7f++){const _0x2a2eda=process[_0x54df4d(0x245)][_0x214f7f];if(_0x2a2eda[_0x54df4d(0x1f7)]('--test')||_0x2a2eda[_0x54df4d(0x1f7)]('--watch')||_0x2a2eda['startsWith'](_0x54df4d(0x386)))continue;if(_0x2a2eda==='-e'||_0x2a2eda===_0x54df4d(0x1df)||_0x2a2eda==='-p'||_0x2a2eda===_0x54df4d(0x3c9)){_0x214f7f++;continue;}_0x18f907[_0x54df4d(0x39a)](_0x2a2eda);}return _0x18f907;})())}),_0x5dc38e({'workers':_0x4f10f5,'port':_0x46aca5,'primaryOkdb':_0x65e3ea,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x46aca5});return _0x32dd4a({'makeOkdb':_0x5b2c9d,'port':_0x46aca5});}function _0x5dc38e({workers:_0x545f3b,port:_0x1d9c2e,primaryOkdb:_0x100b0c,workerEnv:_0x1d703f,workerRole:_0xd3eb50,listenAddr:_0x334ce}){const _0x333c73=_0x5ba5e3,_0x342899=new Map(),_0x273236=new Map();let _0x4df2d7=![];const _0x4d7510=_0x574f6c=>_0x574f6c?.['__okdbSlot'],_0x29d494=_0xc83bd9=>{const _0x49122a=_0x55dd,_0x327e1b=_0x31d508[_0x49122a(0x326)]({...process.env,..._0x1d703f||{},'OKDB_CLUSTER_SLOT':String(_0xc83bd9)});return _0x327e1b['__okdbSlot']=_0xc83bd9,_0x342899[_0x49122a(0x275)](_0x327e1b[_0x49122a(0x3dc)][_0x49122a(0x2c8)],{'worker':_0x327e1b,'startedAt':Date[_0x49122a(0x3fc)](),'slot':_0xc83bd9}),_0x327e1b['on'](_0x49122a(0x258),_0x5a0f0c=>{const _0x124fce=_0x49122a;console[_0x124fce(0x2a7)](_0x124fce(0x2ce)+_0x327e1b[_0x124fce(0x3dc)][_0x124fce(0x2c8)]+_0x124fce(0x240)+(_0x5a0f0c?.[_0x124fce(0x30e)]??_0x5a0f0c));}),_0x327e1b['on'](_0x49122a(0x1e5),()=>_0x5574a3()),_0x327e1b;},_0xc76da8=_0x378eee=>{const _0xabbb62=_0x55dd;for(const {worker:_0x34ec89}of _0x342899[_0xabbb62(0x3fe)]()){if(_0x34ec89['isDead']()||!_0x34ec89['isConnected']())continue;try{_0x34ec89[_0xabbb62(0x3f3)](_0x378eee);}catch{}}};_0x100b0c?.[_0x333c73(0x20b)]?.({'kind':_0x333c73(0x35f),'listenAddr':_0x334ce})['catch'](()=>{}),_0x100b0c?.[_0x333c73(0x2c6)]?.[_0x333c73(0x3e8)]?.({'workersConfigured':_0x545f3b});const _0x2223a8={'engines':!![],'processors':!![],'compaction':!![],..._0xd3eb50,'http':!![]},_0x5574a3=()=>{const _0x3da994=_0x333c73,_0x180b1f=_0x100b0c?.['processes'];if(!_0x180b1f||!_0x180b1f[_0x3da994(0x2b3)])return;const _0xb292a6=_0x180b1f[_0x3da994(0x251)];for(const {worker:_0xfcc9c2,startedAt:_0x12bca,slot:_0x2c6c11,stats:_0x3dc7d6,processing:_0x7ce78f}of _0x342899['values']()){if(_0xfcc9c2[_0x3da994(0x330)]())continue;const _0x589f03=_0x180b1f[_0x3da994(0x288)]?.()&&_0x180b1f[_0x3da994(0x1fb)](_0x3da994(0x24b),_0x31325e(_0x2c6c11))?.[_0x3da994(0x26f)]===!![];_0x180b1f['publishChildRow']({'pid':_0xfcc9c2[_0x3da994(0x3dc)]['pid'],'startedAt':_0x12bca,'kind':'http-server','supervisorKey':_0xb292a6,'slot':_0x2c6c11,'slotKey':_0x31325e(_0x2c6c11),'role':_0x2223a8,'listenAddr':_0x334ce,'lifecycle':_0x589f03?_0x3da994(0x31d):'running','processing':_0x7ce78f??null,'stats':_0x3dc7d6??null})[_0x3da994(0x299)](()=>{});}},_0x31325e=_0x5b4212=>_0x64c170(_0x333c73(0x28c)+_0x1d9c2e,_0x5b4212),_0x4088cc=_0xae2e4a=>{const _0x4557cf=_0x333c73,_0x361d9c=_0x100b0c?.[_0x4557cf(0x2c6)];if(!_0x361d9c?.[_0x4557cf(0x288)]?.())return![];return _0x361d9c[_0x4557cf(0x1fb)](_0x4557cf(0x24b),_0x31325e(_0xae2e4a))?.[_0x4557cf(0x26f)]===!![];};for(let _0x5744f9=0x0;_0x5744f9<_0x545f3b;_0x5744f9++){const _0x907e3e=_0x4088cc(_0x5744f9);_0x273236[_0x333c73(0x275)](_0x5744f9,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x907e3e,'respawnTimer':null}),_0x907e3e?console[_0x333c73(0x2a7)]('[okdb-cluster]\x20slot='+_0x5744f9+_0x333c73(0x1f0)):_0x29d494(_0x5744f9);}const _0x56626a=()=>{const _0x42acc7=_0x333c73,_0xae9667=_0x100b0c?.[_0x42acc7(0x2c6)];if(!_0xae9667?.[_0x42acc7(0x2b3)]||!_0xae9667[_0x42acc7(0x288)]?.())return;for(const [_0x47debe,_0x3fa150]of _0x273236['entries']()){const _0x1d888e=_0xae9667['getDesired'](_0x42acc7(0x24b),_0x31325e(_0x47debe)),_0xfdcf4f=_0x1d888e?.[_0x42acc7(0x26f)]===!![],_0x226f64=_0x1d888e?.['kill']===!![];if(_0xfdcf4f&&!_0x3fa150[_0x42acc7(0x32b)]){_0x3fa150[_0x42acc7(0x32b)]=!![];_0x3fa150[_0x42acc7(0x217)]&&(clearTimeout(_0x3fa150[_0x42acc7(0x217)]),_0x3fa150[_0x42acc7(0x217)]=null);for(const {worker:_0x4b2cbd}of _0x342899[_0x42acc7(0x3fe)]()){if(_0x4d7510(_0x4b2cbd)!==_0x47debe||_0x4b2cbd[_0x42acc7(0x330)]())continue;try{if(_0x226f64)_0x4b2cbd[_0x42acc7(0x3dc)][_0x42acc7(0x3ef)](_0x42acc7(0x309));else _0x4b2cbd['isConnected']()&&_0x4b2cbd[_0x42acc7(0x2b4)]();}catch{}}console[_0x42acc7(0x2a7)](_0x42acc7(0x2f5)+(_0x226f64?_0x42acc7(0x364):_0x42acc7(0x3ff))+'\x20worker\x20slot='+_0x47debe+'\x20(durable\x20desired-state)');}else{if(!_0xfdcf4f&&_0x3fa150[_0x42acc7(0x32b)]&&_0x1d888e){_0x3fa150[_0x42acc7(0x32b)]=![],_0x3fa150['deaths']=[],_0x3fa150['consecutiveFailures']=0x0;const _0x103bbf=[..._0x342899[_0x42acc7(0x3fe)]()]['some'](({worker:_0x51b709})=>_0x4d7510(_0x51b709)===_0x47debe&&!_0x51b709[_0x42acc7(0x330)]());!_0x103bbf&&!_0x4df2d7&&(_0x29d494(_0x47debe),console['log'](_0x42acc7(0x2f9)+_0x47debe));}}}},_0x19418a=()=>{try{_0x56626a();}catch{}};_0x100b0c?.['events']?.['on']?.(_0xd81128['SYSTEM_PROC'],_0x19418a);const _0x371323=[];if(_0x100b0c?.[_0x333c73(0x250)]?.['on'])for(const _0x5d3c0e of _0x53ba27){const _0x4004b2=_0x3be4dd=>{_0xc76da8({[_0x19b40e]:_0x38dd32,'event':_0x5d3c0e,'data':_0x3be4dd??{}});};_0x100b0c[_0x333c73(0x250)]['on'](_0x5d3c0e,_0x4004b2),_0x371323['push']({'event':_0x5d3c0e,'handler':_0x4004b2});}const _0xe772aa=setInterval(()=>{_0x56626a(),_0x5574a3();},_0x4e75af);_0xe772aa['unref']?.();const _0x510abb=(_0x13762b,_0x11e59f)=>{const _0x128404=_0x333c73;if(!_0x11e59f||typeof _0x11e59f!==_0x128404(0x234)||_0x11e59f[_0x19b40e]!==_0x4a1564)return;if(!_0x100b0c?.[_0x128404(0x2a7)]?.[_0x128404(0x3d2)])return;const _0x385764=_0x11e59f[_0x128404(0x347)]||{};_0x100b0c[_0x128404(0x2a7)][_0x128404(0x3d2)]({..._0x385764,'msg':'[w'+_0x11e59f[_0x128404(0x24b)]+']\x20'+(_0x385764[_0x128404(0x1e6)]??''),'meta':{..._0x385764[_0x128404(0x1e1)]||{},'worker':_0x11e59f[_0x128404(0x24b)],'workerPid':_0x11e59f[_0x128404(0x2c8)]}});};_0x31d508['on'](_0x333c73(0x30e),_0x510abb);const _0x17c8cc=(_0x2682d1,_0x5a29a3)=>{const _0x23abc7=_0x333c73;if(!_0x5a29a3||typeof _0x5a29a3!==_0x23abc7(0x234)||_0x5a29a3[_0x19b40e]!==_0x447617)return;const _0x3aded9=_0x342899[_0x23abc7(0x256)](_0x2682d1['process'][_0x23abc7(0x2c8)]);if(_0x3aded9){_0x3aded9[_0x23abc7(0x33f)]={..._0x5a29a3['stats'],'at':Date[_0x23abc7(0x3fc)]()};if(_0x5a29a3[_0x23abc7(0x2dd)]!==undefined)_0x3aded9[_0x23abc7(0x2dd)]=_0x5a29a3[_0x23abc7(0x2dd)];}};_0x31d508['on'](_0x333c73(0x30e),_0x17c8cc),_0x31d508['on'](_0x333c73(0x376),(_0xf0f750,_0x263ee3,_0x34f628)=>{const _0x5c6ece=_0x333c73,_0x206cce=_0xf0f750[_0x5c6ece(0x3dc)][_0x5c6ece(0x2c8)],_0x34f51f=_0x4d7510(_0xf0f750),_0x39f7d8=_0x342899[_0x5c6ece(0x256)](_0x206cce);if(_0x39f7d8&&_0x100b0c?.[_0x5c6ece(0x2c6)])_0x100b0c['processes'][_0x5c6ece(0x325)](_0x206cce+':'+_0x39f7d8[_0x5c6ece(0x211)])[_0x5c6ece(0x299)](()=>{});_0x342899[_0x5c6ece(0x2aa)](_0x206cce),console['log']('[okdb-cluster]\x20worker\x20pid='+_0x206cce+_0x5c6ece(0x1e9)+(_0x34f51f??'?')+')\x20exited\x20'+('(code='+_0x263ee3+',\x20signal='+(_0x34f628??_0x5c6ece(0x305))+_0x5c6ece(0x2cb)+_0x342899[_0x5c6ece(0x261)]+_0x5c6ece(0x274))),_0x5574a3();if(_0x4df2d7||_0x34f51f==null)return;const _0x55f244=_0x273236['get'](_0x34f51f);if(!_0x55f244||_0x55f244['dead'])return;const _0x358d6c=Date[_0x5c6ece(0x3fc)]();_0x55f244['deaths']['push'](_0x358d6c),_0x55f244[_0x5c6ece(0x272)]=_0x55f244[_0x5c6ece(0x272)][_0x5c6ece(0x3d7)](_0xc85848=>_0x358d6c-_0xc85848<=_0x41ab54);if(_0x55f244['deaths'][_0x5c6ece(0x21a)]>=_0x91b31f){_0x55f244[_0x5c6ece(0x32b)]=!![],console[_0x5c6ece(0x258)](_0x5c6ece(0x270)+_0x34f51f+'\x20died\x20'+_0x55f244[_0x5c6ece(0x272)][_0x5c6ece(0x21a)]+_0x5c6ece(0x294)+(_0x41ab54+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x342899[_0x5c6ece(0x261)]+'\x20worker(s)\x20still\x20serving'));return;}_0x55f244[_0x5c6ece(0x2a8)]++;const _0x2e493b=Math[_0x5c6ece(0x249)](_0x349298,_0x12f7f5*0x2**(_0x55f244[_0x5c6ece(0x2a8)]-0x1));console['log'](_0x5c6ece(0x360)+_0x34f51f+_0x5c6ece(0x252)+_0x2e493b+_0x5c6ece(0x2bb)+_0x55f244[_0x5c6ece(0x2a8)]+')'),_0x55f244[_0x5c6ece(0x217)]=setTimeout(()=>{const _0x40bc37=_0x5c6ece;_0x55f244[_0x40bc37(0x217)]=null;if(_0x4df2d7||_0x55f244[_0x40bc37(0x32b)])return;const _0x5102be=_0x29d494(_0x34f51f);_0x5102be[_0x40bc37(0x2bc)]('listening',()=>{const _0x2c955a=_0x40bc37;if(_0x273236[_0x2c955a(0x256)](_0x34f51f)===_0x55f244)_0x55f244[_0x2c955a(0x2a8)]=0x0;});},_0x2e493b),_0x55f244[_0x5c6ece(0x217)][_0x5c6ece(0x3e3)]?.();});const _0x23c70d=[..._0x342899['keys']()];console[_0x333c73(0x2a7)](_0x333c73(0x1ed)+process[_0x333c73(0x2c8)]+_0x333c73(0x21e)+_0x545f3b+'\x20HTTP\x20server(s)\x20on\x20port\x20'+_0x1d9c2e+':\x20'+('['+_0x23c70d[_0x333c73(0x1ec)](',\x20')+']'));const _0x589a59={'_isClusterController':!![],'port':_0x1d9c2e,'primaryOkdb':_0x100b0c??null,'status'(){const _0x50d009=_0x333c73;return{'clustered':!![],'primaryPid':process[_0x50d009(0x2c8)],'port':_0x1d9c2e,'primaryRole':_0x100b0c?.['role']??null,'processorPid':null,'supervisorPid':process[_0x50d009(0x2c8)],'workers':[..._0x342899[_0x50d009(0x3fe)]()][_0x50d009(0x38b)](({worker:_0x2ef154})=>({'pid':_0x2ef154[_0x50d009(0x3dc)][_0x50d009(0x2c8)],'id':_0x2ef154['id'],'dead':_0x2ef154[_0x50d009(0x330)]()}))};},async 'close'(){const _0x45134c=_0x333c73;_0x4df2d7=!![];for(const _0x17d20c of _0x273236[_0x45134c(0x3fe)]()){_0x17d20c['dead']=!![],_0x17d20c[_0x45134c(0x217)]&&(clearTimeout(_0x17d20c[_0x45134c(0x217)]),_0x17d20c['respawnTimer']=null);}clearInterval(_0xe772aa),_0x31d508[_0x45134c(0x29f)](_0x45134c(0x30e),_0x510abb),_0x31d508[_0x45134c(0x29f)]('message',_0x17c8cc),_0x100b0c?.[_0x45134c(0x250)]?.[_0x45134c(0x29f)]?.(_0xd81128[_0x45134c(0x1cf)],_0x19418a);if(_0x100b0c?.[_0x45134c(0x250)]?.[_0x45134c(0x29f)])for(const {event:_0x10fffb,handler:_0x24ad4e}of _0x371323){try{_0x100b0c[_0x45134c(0x250)][_0x45134c(0x29f)](_0x10fffb,_0x24ad4e);}catch{}}_0x371323[_0x45134c(0x21a)]=0x0;const _0x18a545=[..._0x342899[_0x45134c(0x3fe)]()][_0x45134c(0x38b)](({worker:_0x4059e8})=>_0x4059e8);if(_0x18a545[_0x45134c(0x21a)]===0x0)return;await Promise[_0x45134c(0x34f)](_0x18a545['map'](_0x1db7a9=>new Promise(_0x25822d=>{const _0xc94eca=_0x45134c;if(_0x1db7a9[_0xc94eca(0x330)]()){_0x25822d();return;}let _0x4dff2a=![];const _0x5a6884=()=>{if(_0x4dff2a)return;_0x4dff2a=!![];if(_0x3b9c11)clearTimeout(_0x3b9c11);_0x25822d();};_0x1db7a9[_0xc94eca(0x2bc)]('exit',_0x5a6884);const _0x3b9c11=setTimeout(()=>{const _0x1fd4b6=_0xc94eca;try{_0x1db7a9[_0x1fd4b6(0x3dc)][_0x1fd4b6(0x3ef)]();}catch{}},_0xf72a24+0x1f4);_0x3b9c11[_0xc94eca(0x3e3)]?.();try{_0x1db7a9['disconnect']();}catch{try{_0x1db7a9[_0xc94eca(0x3dc)][_0xc94eca(0x3ef)]();}catch{}}})));}};return _0x589a59;}async function _0x32dd4a({makeOkdb:_0x5f2b11,port:_0x497032}){const _0x2da356=_0x5ba5e3,_0x33860e=await _0x5f2b11();return _0x1611db(_0x33860e),_0x33860e['http'][_0x2da356(0x3dd)](_0x497032);}function _0x1611db(_0x159330){const _0x34bf2f=_0x5ba5e3;if(!_0x159330||_0x159330[_0x34bf2f(0x3b2)])return;_0x159330['_clusterWorkerAttached']=!![];try{const {OKDBChangefeed:_0x161623}=requireOkdbChangefeed(),_0x8f5c7c=_0x159330[_0x34bf2f(0x22c)];if(_0x8f5c7c&&typeof _0x8f5c7c[_0x34bf2f(0x3df)]==='function'){const _0xb1c41=new _0x161623(_0x159330);_0xb1c41[_0x34bf2f(0x3c3)](),_0x8f5c7c[_0x34bf2f(0x3df)](_0xb1c41),_0x159330[_0x34bf2f(0x263)]=_0xb1c41;}}catch(_0x828495){_0x159330[_0x34bf2f(0x2a7)]?.['warn']?.(_0x34bf2f(0x26a)+(_0x828495?.['message']??_0x828495),{'feature':_0x34bf2f(0x336)});}const _0x5d39b4=_0x5deb2e=>{const _0x76e57d=_0x34bf2f;if(!_0x5deb2e||typeof _0x5deb2e!==_0x76e57d(0x234)||_0x5deb2e[_0x19b40e]==null)return;if(_0x5deb2e[_0x19b40e]===_0x38dd32)try{_0x159330['_adminRelay']?.[_0x76e57d(0x241)]?.(_0x5deb2e['event'],_0x5deb2e[_0x76e57d(0x25c)]);}catch{}};process['on'](_0x34bf2f(0x30e),_0x5d39b4),_0x159330[_0x34bf2f(0x265)]=_0x5d39b4;{let _0x41ef50=process['cpuUsage'](),_0x1459cc=Date['now']();const _0x47ffdb=()=>{const _0x1673e2=_0x34bf2f;if(typeof process[_0x1673e2(0x3f3)]!=='function'||!process['connected'])return;const _0x5a9007=Date[_0x1673e2(0x3fc)](),_0x51a590=process[_0x1673e2(0x1fc)](),_0x35229b=(_0x5a9007-_0x1459cc)*0x3e8,_0x315318=_0x51a590[_0x1673e2(0x381)]-_0x41ef50['user']+(_0x51a590[_0x1673e2(0x27d)]-_0x41ef50[_0x1673e2(0x27d)]),_0x205eb8=_0x35229b>0x0?Math[_0x1673e2(0x249)](0x64,Math[_0x1673e2(0x276)](_0x315318/(_0x35229b*(_0x237cd5[_0x1673e2(0x2bd)]()[_0x1673e2(0x21a)]||0x1))*0x64)):0x0;_0x41ef50=_0x51a590,_0x1459cc=_0x5a9007;const _0x34f147=process[_0x1673e2(0x395)]();let _0x1884dc=null;try{_0x1884dc=_0x159330['role']?.['processors']?_0x159330[_0x1673e2(0x2c6)]?.['_buildProcessingFacet']?.()??null:null;}catch{}try{process['send']({[_0x19b40e]:_0x447617,'stats':{'rss':_0x34f147[_0x1673e2(0x34c)],'heapUsed':_0x34f147['heapUsed'],'heapTotal':_0x34f147[_0x1673e2(0x3f1)],'external':_0x34f147['external'],'cpuPct':_0x205eb8,'cpuWindowMs':Math[_0x1673e2(0x276)](_0x35229b/0x3e8)||null},'processing':_0x1884dc});}catch{}},_0x5961da=Math[_0x34bf2f(0x287)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x3a81ba=setInterval(_0x47ffdb,_0x5961da);_0x3a81ba[_0x34bf2f(0x3e3)]?.(),_0x47ffdb();for(const _0x3816e1 of[_0x34bf2f(0x36c),_0x34bf2f(0x3c8)]){_0x159330[_0x34bf2f(0x250)]?.['on']?.(_0x3816e1,()=>{try{_0x47ffdb();}catch{}});}}let _0x20ce7e=![];const _0x400a49=async _0x59f0c3=>{const _0x47521d=_0x34bf2f;if(_0x20ce7e)return;_0x20ce7e=!![];const _0x236035=setTimeout(()=>process['exit'](_0x59f0c3),_0xf72a24);_0x236035[_0x47521d(0x3e3)]?.();try{await _0x159330[_0x47521d(0x1da)]?.();}catch{}process[_0x47521d(0x376)](_0x59f0c3);};process['on']('disconnect',()=>_0x400a49(0x0));if(process[_0x34bf2f(0x3a2)]!=='win32'){const _0x41904b=setInterval(()=>{const _0x9585a5=_0x34bf2f;if(process[_0x9585a5(0x37d)]===0x1)_0x400a49(0x0);},_0x1e616f);_0x41904b[_0x34bf2f(0x3e3)]?.(),_0x159330[_0x34bf2f(0x389)]=_0x41904b;}}return okdbCluster={'runClustered':_0x3e5f8b,'attachWorkerCluster':_0x1611db},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0x2e0b34=_0x3b4fb0;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x5bd2d9=require$$0$5,{attachWorkerCluster:_0x294172}=requireOkdbCluster();async function _0x9560(){const _0x14a846=_0x55dd,_0x2c76fc=process.env.OKDB_HTTP_CHILD;if(!_0x2c76fc)throw new Error(_0x14a846(0x1fd));const {rootPath:_0x2062a1,port:_0x4d1e52,options:options={},logLevel:logLevel=_0x14a846(0x3ea)}=JSON[_0x14a846(0x371)](_0x2c76fc);if(!_0x2062a1||!_0x4d1e52)throw new Error('okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required');const _0x37d494=new _0x5bd2d9(_0x2062a1,{...options,'engines':![],'processors':![],'compaction':![]});_0x37d494['log'][_0x14a846(0x28a)]?.();const _0x1ba4b9=process.env.OKDB_CLUSTER_SLOT??'?',_0x7ed467={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x23cf5c=_0x7ed467[logLevel]??_0x7ed467[_0x14a846(0x3ea)];_0x37d494[_0x14a846(0x2a7)][_0x14a846(0x33e)](_0x48c4bc=>{const _0x4ddc15=_0x14a846;if((_0x7ed467[_0x48c4bc[_0x4ddc15(0x2ec)]]??0x1)<_0x23cf5c)return;try{process[_0x4ddc15(0x3f3)]?.({'__okdbCluster':'log','slot':_0x1ba4b9,'pid':process[_0x4ddc15(0x2c8)],'entry':_0x48c4bc});}catch{}}),await _0x37d494[_0x14a846(0x311)](),_0x294172(_0x37d494),await _0x37d494['http']['listen'](_0x4d1e52);}return _0x9560()[_0x2e0b34(0x299)](_0x11cd63=>{const _0x3a2491=_0x2e0b34;try{process['send']?.({'__okdbCluster':_0x3a2491(0x2a7),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x3a2491(0x2c8)],'entry':{'level':_0x3a2491(0x258),'msg':_0x3a2491(0x3b9)+(_0x11cd63?.[_0x3a2491(0x30e)]??_0x11cd63)}});}catch{}process[_0x3a2491(0x376)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module[_0x3b4fb0(0x262)]=okdbHttpWorkerChild;