@kedem/okdb 2.6.0 → 2.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/algorithm-worker-thread.js +1 -1
- package/bin/okdb.js +1 -1
- package/docs/queue.md +6 -0
- package/okdb-functions-sandbox-worker.js +1 -1
- package/okdb-http-worker-child.js +1 -1
- package/okdb-views-bootstrap-worker.js +1 -1
- package/okdb.js +1 -1
- package/package.json +1 -1
- package/public/vendor/okjs/ok.esm.min.js +1 -1
- package/public/vendor/okjs/toolkit/components/ok-chart.ok.js +1 -1
- package/public/vendor/okjs/toolkit/components/ok-doc-viewer.ok.js +1 -1
- package/public/vendor/okjs/toolkit/components/ok-monaco.ok.js +1 -1
- package/public/vendor/okjs/toolkit/core/virtualized.ok.js +1 -1
- package/public/vendor/okjs/toolkit/editor/ok-live-shell.ok.js +1 -1
- package/public/vendor/okjs/toolkit/elements/ok-select.ok.js +1 -1
- package/public/vendor/okjs/toolkit/elements/ok-table.ok.js +1 -1
- package/types/features/queue.d.ts +4 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function _0x37d7(_0x4d0a78,_0x3a3491){_0x4d0a78=_0x4d0a78-0xa4;const _0x11c068=_0x11c0();let _0x37d72a=_0x11c068[_0x4d0a78];return _0x37d72a;}const _0x498b9d=_0x37d7;(function(_0x2d0d79,_0x5771e0){const _0x575ce2=_0x37d7,_0x1cf33e=_0x2d0d79();while(!![]){try{const _0x285f44=-parseInt(_0x575ce2(0x174))/0x1*(parseInt(_0x575ce2(0xcd))/0x2)+-parseInt(_0x575ce2(0x184))/0x3+parseInt(_0x575ce2(0x2aa))/0x4*(parseInt(_0x575ce2(0x22c))/0x5)+-parseInt(_0x575ce2(0x118))/0x6*(parseInt(_0x575ce2(0xf7))/0x7)+-parseInt(_0x575ce2(0x222))/0x8+parseInt(_0x575ce2(0xf4))/0x9+-parseInt(_0x575ce2(0x2db))/0xa*(-parseInt(_0x575ce2(0x132))/0xb);if(_0x285f44===_0x5771e0)break;else _0x1cf33e['push'](_0x1cf33e['shift']());}catch(_0x3f37a7){_0x1cf33e['push'](_0x1cf33e['shift']());}}}(_0x11c0,0x87015));var require$$0$5=require(_0x498b9d(0x1c9)),require$$1$1=require(_0x498b9d(0x18f)),require$$1=require(_0x498b9d(0x2df)),require$$0$3=require('os'),require$$2=require(_0x498b9d(0x1d5)),require$$0=require(_0x498b9d(0x24c)),require$$0$2=require(_0x498b9d(0x2d6)),require$$0$1=require('fs'),require$$0$4=require(_0x498b9d(0x1a4));function getDefaultExportFromCjs(_0x8080f6){const _0x327e78=_0x498b9d;return _0x8080f6&&_0x8080f6[_0x327e78(0x1e4)]&&Object[_0x327e78(0xb9)][_0x327e78(0x2c2)][_0x327e78(0x269)](_0x8080f6,_0x327e78(0x1fe))?_0x8080f6[_0x327e78(0x1fe)]:_0x8080f6;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function _0x11c0(){const _0x31375b=['4215688NcYvRT','[okdb-cluster]\x20','building','_desiredOverlay','isActive','maxMs','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','signalWant','INDEX_RESET','publishChildRow','40wqDefv','open','single','holder','max','entry','off','_onTick','closing','_singletonLock','writerStatus','bumpCmd','hasDesired','connected','external','reset','removeNode','startedAt','okdb-writer[','ms\x20on\x20env=','splice','raw-remove','bus:env_release','view:progress','put','SYSTEM_STOPPED','ms/','_systemEnv','[okdb-cluster]\x20worker\x20pid=','processKey','draining','runtimeProcessesView','node:perf_hooks','offWindow','okdb','value','repeat','SIGKILL','resetting','updateSupervisedChildStats','stats','\x20(durable\x20desired-state)','rss','inst:','round','toISOString','status','removeSupervisedChild','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','dropIndex','async','txn:rollback','queue-worker','keys','stderr','test','halted','~processes','claims','creating','http-server','call','split','fromEntries','\x20statusEnv=','heapUsed','processor:paused','addSupervisedChild','INDEX_READY','getClock','heapTotal','bus:type_drop','nodeKey','change','_threadStats','_caps','dropping','started','_clusterOrphanWatch','processors','unref','\x20drainAge=','deaths','entries','_nestedTotal','okdb-diag.','memoryUsage','startHeartbeat','parkedNow','_putRowAsync','isWanted','removeSync','procmodeack/','ms\x20(attempt\x20','prependListener','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','_sampleOwnStats','_rawDb','recent\x20writes\x20(newest\x20first)','_held','recordWrite','updatedAt','events','_changefeed','type:registered','slice','size','_flushTimer','instances','pid','(code=','running','note','waiting','_heartbeatInFlight','okdb-lock:\x20env\x20closed','setTtl','_participate','system','start','startsWith','level','ms\x20busy=','join','consecutiveFailures','data','1816RFVBeP','event','isDead','_drain','~processes:desired','_startedAt','code','now','getProcess','listenAddr','exit','once','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','withPoolHold','children','deregisterSelf','_assertUsable','meta','cursorKey','_wantDbOf','_closed','map','node','system:poke','hasOwnProperty','system:clock_change','\x20(slot=','push','_ownMeta','ITEM_CREATE','_handleInProcess','\x20worker\x20slot=','worker','flushDebounce','remove','_buildChildRow','\x20\x20env=','ppid','license:invalid','flushed','version','namespace','_timer','fts:drop','perf_hooks','find','compact','\x20times\x20in\x20','system:type_drop','10EFUKxN','~lock','heartbeatMs','registerType','path','appendFileSync','isEnabled','_putRowSync','system:stopped','clearThreadStats','_key','tierList','disable','paused','includes','unique:violation','markClosed','nodesView','dumpedAt','index:ready','_quantum','listening','_singletonLocks','txn:start','_committed','none','enabled','_lastPublishAt','name','commitsPerSec','respawnTimer','warn','field:resolver_registered','null','info','listNodes','instanceId','stopHeartbeat','prototype','decommissioning','log','randomUUID','\x20forked\x20','disconnect','detachConsole','killable','view','confirm','_draining','has','processes','load','okdb-writer:\x20env\x20closing\x20—\x20retry','--eval','processor:resumed','_report','user','primary','454VVRFUe','setSchema','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','decommission','\x0a\x20\x20\x20\x20\x20\x20','created','ESRCH','sync','_role','env:removed','_writer','\x20===','ms\x20max=','singletonClaims','flushLmdb','_selfKey','min','mode','dedupeMax','_statusEnv','_publishNow','stop','inspect','ms\x20mean=','_lock','REMOVE','force','engines','fork','[okdb-cluster]\x20respawning\x20worker\x20slot=','_started','schema:set','clearTtl','http\x20worker\x20child\x20failed:\x20','registry\x20heartbeat\x20skipped\x20(writer=','treeView','_bpParkedTotal','_pendingLocal','SWAP','2037204zgziMJ','_hbTimer','_heldTotal','4865427btaXXZ','_admissionStarted','\x20while\x20this\x20process\x20runs\x20','_seen','ttl:expired','_admissionTimer','1ofN:','registerFts','drain','_pending','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','embedded','cpuWindowMs',');\x20','claimGated','expiresAt','registry-publish','cli','_enableChangelog','parse','getCmd','process\x20','ITEM_REMOVE','_wantDbHandle','exports','then','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','resolve','_versionSkewWarned','processorId','_desired','filter','_nodeDbFor','6rlmjwN','enable','_lastCpuPct','percentile','_processStartedAt','stringify','allSettled','ttlMs','license:added','ensureType',':want','processingSig','MAX_POOL_HOLDS','length','list','FTS_REGISTERED','processorsView','raw-put','threads','delete','getDesired','system:drain','_listenAddr','_startHeartbeat','\x20phase=','_nodeDead','35418592BikuiO','workersConfigured','--print','epoch','_scheduleFlush','_inflight','_lockDbOf','process','_adminRelay','number','_buildOwnRow','_dedupeKey','_nestedWarned','isWorker','_holderDead','shift','sort','registerIndex','starting','_groupByProcess','_nodeDb','_handlePending','race','floor','okdb-http-worker-child.js','commit','http','_kind','SYSTEM_POKE','dropSchema','string','processor:error','_rootDb','item:pending','processor:retry','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','_cursors','uncaughtException','INDEX_REGISTERED','get','openDB','message','add','_onPoke','noteListenAddr','schema:drop','mean','hard-killed','_ensureDesired','procmode/','\x20sync','attach','index:progress','busy','getRange','register',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','_baselines','clear','_nodeDbCache','processingStatusView','_buildProcessingFacet','commitP99Ms','loop-lag\x20','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','processor:progress','3493uUdSor','\x20worker(s)\x20remaining','_onPending','listen','_startAdmission','_supervisorKey','cpuUsage','\x20@\x20','env','\x20HTTP\x20server(s)\x20on\x20port\x20','win32','unclaimed','listDesired','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','item:create','_isWriter','2645838fXYFro','__okdbSlot','quantum','_sandbox','_activateProcesses','dropType','_clusterWorkerAttached','FTS_DROP','execArgv','functions','depth','cluster','(worst\x20','maxExtra','feed:','slot','function','kill','_highWater','_cmd','_log','_outstanding','putNode','_onStop','_rowKey','set','_coordinator','_lastCpuUsage','_done','uptime','all','\x20—\x20','node:events','_durs','error','online','toFixed','_envs','state','_handlePoke','replace','sandbox','write','object','oldestPendingMs','_db','send','reap','msg','extend','setOwnMeta','_refreshDesiredSnapshot','host','mkdirSync','rowKey','reportThreadStats','setLogger','\x20oldestPendingMs=','_lastCpuWindowMs','_instanceId','_wantDb','selfKey','platform','_drainOne','_enqueuedAt','clusterStatusView','emit','listAll','index:registered','./okdb','\x20died\x20','_lastCpuAt','true','acquiredAt','env:opened','_windowCbs','\x20│\x20','index:drop','trim','hostname',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','crypto','workers','putSync','afterWrite','item:remove','processing','_heartbeatTimer','stopped','ttl:set','closed','system:bus_state_change','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','unique:violation_resolved','_removeRowAsync','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','__esModule','isPrimary','ref:violation','_onItem','indexOf','_children','_acquiredAt','.log','_dedupeMax','values','setupPrimary','caps','resetIndex','ms\x20env=','_bpWaiters','error:\x20','committed','\x0a===\x20OKDB_DIAG\x20','_publishFailWarned','\x20writer{depth=','processor:ready','stack','options','participate','--watch','cpus','default','bus:drain','count','_collectWriterFacet','dead','attachFeed','VIEW_PROGRESS','_released','_isStale','setDesired','catch','resetReadTxn','_onProcEvent','childTransaction','fts:registered',',\x20signal=','compaction','_lockDb','\x20\x20(no\x20env\x20draining)','ready',')\x20exited\x20','ENV_CLOSING_RETRY','transaction','_buckets','bus:poke','\x20pid=','_clusterOnMessage','_markSeen','role','_isReader','_openEnvLazy','heldBy','kind','_flushDebounce','isConnected','supervisorKey'];_0x11c0=function(){return _0x31375b;};return _0x11c0();}function requireOkdbEnums(){const _0x136492=_0x498b9d;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x3bacbd={'PUT':_0x136492(0x244),'REMOVE':_0x136492(0x2cc),'INDEX_DROP':_0x136492(0x25d),'INDEX_REGISTER':_0x136492(0x143),'INDEX_RESET':_0x136492(0x1f0),'TYPE_REGISTER':_0x136492(0x2de),'TYPE_DROP':_0x136492(0x189),'FTS_REGISTER':_0x136492(0xfe),'FTS_DROP':'dropFts','FTS_RESET':'resetFts','SCHEMA_SET':_0x136492(0xce),'SCHEMA_DROP':_0x136492(0x14f),'TTL_SET':_0x136492(0x2a0),'TTL_CLEAR':_0x136492(0xed)},_0x2d6c7c={'SYSTEM_READY':'system:ready','FIELD_RESOLVER_REGISTERED':_0x136492(0xb3),'SYSTEM_STOPPED':_0x136492(0x2e3),'SYSTEM_CLOCK_CHANGE':_0x136492(0x2c3),'SYSTEM_POKE':_0x136492(0x2c1),'SYSTEM_DRAIN':_0x136492(0x12d),'SYSTEM_TYPE_DROP':_0x136492(0x2da),'SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x136492(0x1df),'ITEM_CREATE':_0x136492(0x182),'ITEM_UPDATE':'item:update','ITEM_REMOVE':_0x136492(0x1d9),'ITEM_PENDING':_0x136492(0x153),'INDEX_RESET':'index:reset','INDEX_READY':_0x136492(0xa6),'INDEX_PROGRESS':_0x136492(0x166),'VIEW_PROGRESS':_0x136492(0x243),'INDEX_DROP':_0x136492(0x1d1),'INDEX_REGISTERED':_0x136492(0x1c8),'FTS_REGISTERED':_0x136492(0x20c),'FTS_DROP':_0x136492(0x2d5),'FTS_RESET':'fts:reset','SCHEMA_SET':_0x136492(0xec),'SCHEMA_DROP':_0x136492(0x15f),'UNIQUE_VIOLATION':_0x136492(0x2ea),'UNIQUE_VIOLATION_RESOLVED':_0x136492(0x1e1),'REF_VIOLATION':_0x136492(0x1e6),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':'sync:apply','TXN_START':_0x136492(0xaa),'TXN_END':'txn:end','TXN_ROLLBACK':_0x136492(0x25f),'TYPE_REGISTERED':_0x136492(0x294),'TYPE_DROP':'type:drop','ENV_OPENED':_0x136492(0x1ce),'ENV_REMOVED':_0x136492(0xd6),'SYSTEM_ENV_RELEASE':'system:env_release','TTL_EXPIRED':_0x136492(0xfb),'TTL_SET':_0x136492(0x1dd),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x136492(0x2d0),'LICENSE_ADDED':_0x136492(0x120),'LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':'license:removed'},_0x335baf={'CREATING':_0x136492(0x267),'RESETTING':_0x136492(0x252),'READY':_0x136492(0x211),'DROPPING':_0x136492(0x278),'WAITING':_0x136492(0x29d),'ERROR':'error'},_0x7d2d4b={'CREATED':_0x136492(0xd2),'STARTING':_0x136492(0x144),'STARTED':_0x136492(0x279),'STOPPING':'stopping','STOPPED':_0x136492(0x1dc)},_0x499ca0={'CREATING':_0x136492(0x267),'READY':_0x136492(0x211),'HALTED':_0x136492(0x264),'STOPPED':_0x136492(0x1dc),'RESETTING':_0x136492(0x252)},_0x531246=Object['freeze']({'POKE':_0x136492(0x216),'DRAIN':_0x136492(0x1ff),'TYPE_DROP':_0x136492(0x273),'PROC':'bus:proc','ENV_RELEASE':_0x136492(0x242)});return okdbEnums={'BUS_EVENTS':_0x531246,'CHANGE_ACTIONS':_0x3bacbd,'EVENTS':_0x2d6c7c,'INDEX_STATE':_0x335baf,'OKDB_STATE':_0x7d2d4b,'VIEW_STATE':_0x499ca0},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x3ac040=_0x498b9d;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x5763e5,performance:_0x4263bd}=require$$0,_0x318913=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x3ac040(0x1cc),_0x592624=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0xbb91ce=process.env.OKDB_LOOP_LAG_ALL==='1',_0x32a037=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x48950f{constructor(){const _0x270116=_0x3ac040;this[_0x270116(0xad)]=_0x318913,this[_0x270116(0x215)]=new Map(),this['_h']=null,this[_0x270116(0x2d4)]=null,this[_0x270116(0xeb)]=![],this[_0x270116(0x198)]=(_0x42ccca,_0x160e36)=>process[_0x270116(0x262)]['write'](_0x42ccca+(_0x160e36?'\x20'+JSON[_0x270116(0x11d)](_0x160e36):'')+'\x0a');}[_0x3ac040(0x2b1)](){return _0x4263bd['now']();}[_0x3ac040(0x1bc)](_0x131aee){const _0x28680c=_0x3ac040;if(typeof _0x131aee===_0x28680c(0x194))this[_0x28680c(0x198)]=_0x131aee;}['note'](_0x35f34d,_0xaa64d8,_0x511313){const _0x47baf5=_0x3ac040;if(!this['enabled'])return;let _0x20ab02=this[_0x47baf5(0x215)][_0x47baf5(0x159)](_0x35f34d);!_0x20ab02&&(_0x20ab02={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this['_buckets'][_0x47baf5(0x19d)](_0x35f34d,_0x20ab02)),_0x20ab02['ms']+=_0xaa64d8,_0x20ab02[_0x47baf5(0x200)]+=0x1,_0xaa64d8>_0x20ab02['maxMs']&&(_0x20ab02['maxMs']=_0xaa64d8,_0x20ab02[_0x47baf5(0x191)]=_0x511313||'');}[_0x3ac040(0x2a3)](_0x26c4b9){const _0x3f9b50=_0x3ac040;if(!this[_0x3f9b50(0xad)]||this[_0x3f9b50(0xeb)])return;this['_started']=!![];if(_0x26c4b9)this[_0x3f9b50(0x198)]=_0x26c4b9;this['_h']=_0x5763e5({'resolution':0xa}),this['_h'][_0x3f9b50(0x119)](),this['_timer']=setInterval(()=>this[_0x3f9b50(0xca)](),_0x592624);if(this[_0x3f9b50(0x2d4)][_0x3f9b50(0x27c)])this['_timer']['unref']();}['onWindow'](_0x3003f7){const _0x151c8e=_0x3ac040;if(!this[_0x151c8e(0x1cf)])this[_0x151c8e(0x1cf)]=new Set();this[_0x151c8e(0x1cf)][_0x151c8e(0x15c)](_0x3003f7);if(!this[_0x151c8e(0xeb)])this['_startAdmission']();}[_0x3ac040(0x24d)](_0x4ec1b5){const _0x34fa04=_0x3ac040;this[_0x34fa04(0x1cf)]?.[_0x34fa04(0x12b)](_0x4ec1b5);}[_0x3ac040(0x178)](){const _0x4aeb83=_0x3ac040;if(this[_0x4aeb83(0xf8)])return;this[_0x4aeb83(0xf8)]=!![];!this['_h']&&(this['_h']=_0x5763e5({'resolution':0xa}),this['_h'][_0x4aeb83(0x119)]());const _0x23e154=_0x592624;this[_0x4aeb83(0xfc)]=setInterval(()=>{const _0x10a50a=_0x4aeb83,_0x561abf=this['_h'];if(!_0x561abf)return;const _0x53b0d3=_0x561abf[_0x10a50a(0x11b)](0x63)/0xf4240,_0x38da33=_0x561abf['max']/0xf4240,_0x1d3ed4=_0x561abf[_0x10a50a(0x160)]/0xf4240;_0x561abf[_0x10a50a(0x23b)]();if(this[_0x10a50a(0x1cf)])for(const _0x4810c0 of this[_0x10a50a(0x1cf)]){try{_0x4810c0({'p99Ms':_0x53b0d3,'maxMs':_0x38da33,'meanMs':_0x1d3ed4,'reportMs':_0x23e154});}catch{}}},_0x23e154);if(this[_0x4aeb83(0xfc)][_0x4aeb83(0x27c)])this['_admissionTimer'][_0x4aeb83(0x27c)]();}[_0x3ac040(0xca)](){const _0xbc3a95=_0x3ac040,_0x50382f=this['_h'],_0x412072=_0x50382f[_0xbc3a95(0x230)]/0xf4240,_0x538212=_0x50382f[_0xbc3a95(0x11b)](0x63)/0xf4240,_0x49321d=_0x50382f['mean']/0xf4240;_0x50382f[_0xbc3a95(0x23b)]();const _0xcdd498=[...this[_0xbc3a95(0x215)][_0xbc3a95(0x27f)]()]['map'](([_0x4ef5,_0x9611d1])=>({'label':_0x4ef5,..._0x9611d1}))[_0xbc3a95(0x142)]((_0x362a2b,_0x40f079)=>_0x40f079['ms']-_0x362a2b['ms'])[_0xbc3a95(0x295)](0x0,0x8);this[_0xbc3a95(0x215)][_0xbc3a95(0x16c)]();const _0x4466f4=_0xcdd498['reduce']((_0xf1bda0,_0x4642a5)=>_0xf1bda0+_0x4642a5['ms'],0x0),_0x5c04b0=_0xcdd498[_0xbc3a95(0x2bf)](_0x4bce01=>_0x4bce01['label']+'='+_0x4bce01['ms']['toFixed'](0x0)+_0xbc3a95(0x246)+_0x4bce01[_0xbc3a95(0x200)]+(_0x4bce01[_0xbc3a95(0x227)]>0x5?_0xbc3a95(0x190)+_0x4bce01[_0xbc3a95(0x227)][_0xbc3a95(0x1a8)](0x0)+'ms'+(_0x4bce01[_0xbc3a95(0x191)]?'\x20'+_0x4bce01['maxExtra']:'')+')':''));(_0xbb91ce||_0x412072>=_0x32a037)&&this['_log'](_0xbc3a95(0x171)+_0x592624+_0xbc3a95(0xd9)+_0x412072[_0xbc3a95(0x1a8)](0x0)+'ms\x20p99='+_0x538212[_0xbc3a95(0x1a8)](0x0)+_0xbc3a95(0xe4)+_0x49321d['toFixed'](0x0)+_0xbc3a95(0x2a6)+_0x4466f4[_0xbc3a95(0x1a8)](0x0)+'ms'+(_0x5c04b0[_0xbc3a95(0x125)]?_0xbc3a95(0x1d0)+_0x5c04b0[_0xbc3a95(0x2a7)]('\x20\x20'):''),{'feature':'loop-lag'});if(this[_0xbc3a95(0x1cf)])for(const _0x4af8d1 of this[_0xbc3a95(0x1cf)]){try{_0x4af8d1({'p99Ms':_0x538212,'maxMs':_0x412072,'meanMs':_0x49321d,'reportMs':_0x592624});}catch{}}}[_0x3ac040(0xe2)](){const _0x18ecc0=_0x3ac040;if(this[_0x18ecc0(0x2d4)])clearInterval(this[_0x18ecc0(0x2d4)]);if(this['_h'])this['_h'][_0x18ecc0(0x2e7)]();this[_0x18ecc0(0x2d4)]=null,this['_h']=null,this[_0x18ecc0(0xeb)]=![];}}const _0x1b0d25=new _0x48950f();if(_0x1b0d25[_0x3ac040(0xad)])_0x1b0d25[_0x3ac040(0x2a3)]();return okdbLoopMonitor={'LOOP':_0x1b0d25},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x290a81=require$$0$1,_0x15a939=require$$1;let _0x34525a,_0x4b5820,_0x512a8f,_0x91a08d,_0x45c3ba,_0x2c069b,_0x3c8364,_0x4596dc=![];const _0x44f88d=new Set();let _0x3485e0=null;const _0x59cc5e=new Map();function _0x26f4f0(){const _0x780e8b=_0x37d7;if(_0x34525a!==undefined)return _0x34525a;_0x34525a=process.env.OKDB_DIAG==='1';if(!_0x34525a)return![];_0x4b5820=process.env.OKDB_DIAG_STACK==='1',_0x91a08d=Math['max'](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x512a8f=new Array(_0x91a08d),_0x45c3ba=0x0,_0x2c069b=0x0,_0x3c8364=process.env.OKDB_DIAG_DIR||null;if(_0x3c8364)try{_0x290a81[_0x780e8b(0x1b9)](_0x3c8364,{'recursive':!![]});}catch{}return!![];}function _0x236cd8(){return _0x34525a===undefined?_0x26f4f0():_0x34525a;}function _0x18d13b(_0x51bbca,_0x52a244){const _0x423e58=_0x37d7;if(_0x34525a===undefined?!_0x26f4f0():!_0x34525a)return;let _0x49c8c3;if(_0x4b5820){const _0x1807eb=new Error()[_0x423e58(0x1f9)]||'';_0x49c8c3=_0x1807eb[_0x423e58(0x26a)]('\x0a')[_0x423e58(0x295)](0x3)[_0x423e58(0x2bf)](_0x5aec1c=>_0x5aec1c[_0x423e58(0x1d2)]())[_0x423e58(0x116)](Boolean)['slice'](0x0,0x8);}_0x512a8f[_0x45c3ba]={'seq':_0x2c069b++,'t':Date[_0x423e58(0x2b1)](),'env':_0x51bbca,'kind':_0x52a244||_0x423e58(0x14b),'stack':_0x49c8c3},_0x45c3ba=(_0x45c3ba+0x1)%_0x91a08d;}function _0x37bc6f(_0x12f473){const _0x20cef4=_0x37d7,_0x4a5bdb=[];for(let _0x264317=0x0;_0x264317<_0x91a08d;_0x264317++){const _0x3a9db7=_0x512a8f[(_0x45c3ba-0x1-_0x264317+_0x91a08d*0x2)%_0x91a08d];if(!_0x3a9db7)continue;_0x4a5bdb['push'](_0x3a9db7);if(_0x4a5bdb[_0x20cef4(0x125)]>=_0x12f473)break;}return _0x4a5bdb;}function _0x347449(_0x5c64da){const _0x3da9b4=_0x37d7;try{process['stderr'][_0x3da9b4(0x1ae)](_0x5c64da+'\x0a');}catch{}if(_0x3c8364)try{_0x290a81[_0x3da9b4(0x2e0)](_0x15a939[_0x3da9b4(0x2a7)](_0x3c8364,_0x3da9b4(0x281)+process['pid']+_0x3da9b4(0x1eb)),_0x5c64da+'\x0a');}catch{}}function _0x1d16d4(_0x19015b){const _0x4abda9=_0x37d7,_0x311525=_0x37bc6f(_0x19015b);if(!_0x311525[_0x4abda9(0x125)])return _0x4abda9(0x1e0);const _0x3bf61c=Date[_0x4abda9(0x2b1)]();return _0x311525[_0x4abda9(0x2bf)](_0x13e165=>{const _0x2fd598=_0x4abda9,_0x1d8393='\x20\x20#'+_0x13e165['seq']+'\x20-'+(_0x3bf61c-_0x13e165['t'])+_0x2fd598(0x1f1)+_0x13e165[_0x2fd598(0x17c)]+'\x20'+_0x13e165['kind'];return _0x13e165[_0x2fd598(0x1f9)]&&_0x13e165[_0x2fd598(0x1f9)][_0x2fd598(0x125)]?_0x1d8393+_0x2fd598(0xd1)+_0x13e165[_0x2fd598(0x1f9)][_0x2fd598(0x2a7)](_0x2fd598(0xd1)):_0x1d8393;})[_0x4abda9(0x2a7)]('\x0a');}function _0x4dfc6d(_0x11fb2e,_0x32b97d){const _0x2941ff=_0x37d7,_0x55c037=_0x2941ff(0x1f5)+_0x11fb2e+_0x2941ff(0x17b)+new Date()[_0x2941ff(0x259)]()+_0x2941ff(0x217)+process['pid']+_0x2941ff(0xd8),_0x2e6a85=[_0x55c037,_0x2941ff(0x1f3)+(_0x32b97d&&_0x32b97d[_0x2941ff(0x1f9)]?_0x32b97d[_0x2941ff(0x1f9)][_0x2941ff(0x26a)]('\x0a')[0x0]:_0x32b97d),_0x2941ff(0x28e)+(_0x4b5820?'':_0x2941ff(0x155))+':',_0x1d16d4(0x18),_0x2b6f56(),'='[_0x2941ff(0x250)](_0x55c037[_0x2941ff(0x125)]-0x1)];_0x347449(_0x2e6a85[_0x2941ff(0x2a7)]('\x0a'));}function _0x568771(_0x4fa9a2){const _0x2b1fc3=_0x37d7;if(!_0x236cd8())return;const _0x52d2b8=String(_0x4fa9a2&&_0x4fa9a2['message']||_0x4fa9a2||''),_0x1416a6=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x2b1fc3(0x263)](_0x52d2b8);_0x4dfc6d(_0x1416a6?'ORPHAN\x20(env-closed\x20write)':'uncaughtException',_0x4fa9a2);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x1416a6)return;try{console[_0x2b1fc3(0x1a6)](_0x4fa9a2&&_0x4fa9a2[_0x2b1fc3(0x1f9)]?_0x4fa9a2[_0x2b1fc3(0x1f9)]:_0x4fa9a2);}catch{}process['exit'](0x1);}function _0x1375f1(_0x101d25){const _0x91df99=_0x37d7;if(!_0x236cd8())return;const _0x3886c8=String(_0x101d25&&_0x101d25['message']||_0x101d25||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x91df99(0x263)](_0x3886c8)&&_0x4dfc6d(_0x91df99(0x28b),_0x101d25);}function _0x2b6f56(){const _0xccc60b=_0x37d7,_0x1ff535=[_0xccc60b(0x1e3)];let _0x5a089b=![];for(const _0x3bbe48 of _0x44f88d){const _0x18a448=_0x3bbe48&&_0x3bbe48[_0xccc60b(0x1a9)];if(!_0x18a448)continue;for(const [_0x2da527,_0x17c17a]of _0x18a448){const _0x2dea95=_0x17c17a&&_0x17c17a[_0xccc60b(0x19e)]&&_0x17c17a['_coordinator']['view'];if(!_0x2dea95)continue;let _0x468822,_0x39820a;try{_0x468822=Atomics[_0xccc60b(0xc6)](_0x2dea95,0x0),_0x39820a=Atomics['load'](_0x2dea95,0x1);}catch{continue;}if(_0x468822===0x0)continue;_0x5a089b=!![];const _0x285361=_0x468822>0x0?_0xccc60b(0xf3):'copy',_0x4743b8=Date[_0xccc60b(0x2b1)]()-Math['abs'](_0x468822)*0x3e8,_0x20013e=((()=>{const _0x971315=_0xccc60b;try{return _0x17c17a[_0x971315(0xd7)]&&_0x17c17a[_0x971315(0xd7)][_0x971315(0x25a)]?_0x17c17a[_0x971315(0xd7)][_0x971315(0x25a)]():null;}catch{return null;}})());_0x1ff535[_0xccc60b(0x2c5)](_0xccc60b(0x2ce)+_0x2da527+_0xccc60b(0x130)+_0x285361+_0xccc60b(0x27d)+_0x4743b8+'ms\x20activeWriters='+_0x39820a+(_0x20013e?_0xccc60b(0x1f7)+_0x20013e[_0xccc60b(0x18e)]+_0xccc60b(0x1bd)+_0x20013e[_0xccc60b(0x1b0)]+'\x20parkedNow='+_0x20013e[_0xccc60b(0x284)]+'}':''));}}if(!_0x5a089b)_0x1ff535[_0xccc60b(0x2c5)](_0xccc60b(0x210));return _0x1ff535[_0xccc60b(0x2a7)]('\x0a');}function _0x201455(){const _0x44d55c=_0x37d7;if(!_0x236cd8())return;const _0x406b82=Math[_0x44d55c(0x230)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x37fb4e=Date[_0x44d55c(0x2b1)]();for(const _0x486fc1 of _0x44f88d){const _0x180428=_0x486fc1&&_0x486fc1[_0x44d55c(0x1a9)];if(!_0x180428)continue;for(const [_0x1744ad,_0x42f865]of _0x180428){const _0x17865d=_0x42f865&&_0x42f865['_coordinator']&&_0x42f865['_coordinator'][_0x44d55c(0xc1)];if(!_0x17865d)continue;let _0x5f1312;try{_0x5f1312=Atomics[_0x44d55c(0xc6)](_0x17865d,0x0);}catch{continue;}const _0x4852d3=_0x486fc1[_0x44d55c(0x2df)]+'|'+_0x1744ad;if(_0x5f1312<=0x0){_0x59cc5e[_0x44d55c(0x12b)](_0x4852d3);continue;}const _0x321590=_0x37fb4e-_0x5f1312*0x3e8,_0x516967=_0x59cc5e[_0x44d55c(0x159)](_0x4852d3);if(_0x321590<_0x406b82)continue;if(_0x516967&&_0x37fb4e-_0x516967[_0x44d55c(0xa5)]<_0x406b82)continue;_0x59cc5e[_0x44d55c(0x19d)](_0x4852d3,{'firstTs':_0x516967?_0x516967['firstTs']:_0x5f1312,'dumpedAt':_0x37fb4e});const _0x7aed9e=_0x44d55c(0x172)+_0x321590+_0x44d55c(0x23f)+_0x1744ad+'\x20@\x20'+new Date()['toISOString']()+_0x44d55c(0x217)+process['pid']+'\x20===';_0x347449([_0x7aed9e,_0x2b6f56(),'='[_0x44d55c(0x250)](_0x7aed9e[_0x44d55c(0x125)]-0x1)][_0x44d55c(0x2a7)]('\x0a'));}}}function _0x45d948(){const _0xa623d7=_0x37d7;if(!_0x236cd8()||_0x4596dc)return;_0x4596dc=!![],process[_0xa623d7(0x28a)](_0xa623d7(0x157),_0x568771),process[_0xa623d7(0x28a)]('unhandledRejection',_0x1375f1);const _0x31c1e4=Math[_0xa623d7(0x230)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x3485e0=setInterval(_0x201455,_0x31c1e4);if(_0x3485e0['unref'])_0x3485e0['unref']();}function _0x3d23ea(_0x5bfed9){const _0x575ae9=_0x37d7;if(!_0x236cd8()||!_0x5bfed9)return;_0x44f88d[_0x575ae9(0x15c)](_0x5bfed9),_0x45d948();}function _0x5e9eff(_0x53d3f2){const _0x10bd28=_0x37d7;_0x44f88d[_0x10bd28(0x12b)](_0x53d3f2);}function _0x847627(){const _0x4b392d=_0x37d7;if(!_0x236cd8())return{'enabled':![],'hint':_0x4b392d(0x2b6)};return{'enabled':!![],'stackCapture':!!_0x4b5820,'recentWrites':_0x37bc6f(0x10),'drain':_0x2b6f56()};}return okdbDiag={'isEnabled':_0x236cd8,'recordWrite':_0x18d13b,'installDiag':_0x45d948,'registerOkdb':_0x3d23ea,'unregisterOkdb':_0x5e9eff,'snapshot':_0x847627},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x49276c=_0x498b9d;if(hasRequiredOkdbWriter)return okdbWriter[_0x49276c(0x10f)];hasRequiredOkdbWriter=0x1;const {performance:_0x2a3078}=require$$0$2,_0x38f899=requireOkdbDiag(),_0xd5b23a=process.env.OKDB_COMMIT_MODE===_0x49276c(0xd4);class _0x1a13d7{constructor(_0x4729b8){const _0x5ac97b=_0x49276c;this[_0x5ac97b(0x17c)]=_0x4729b8,this['_inflight']=new Set(),this[_0x5ac97b(0x1c4)]=new Map(),this[_0x5ac97b(0xab)]=0x0,this[_0x5ac97b(0x1a5)]=[],this[_0x5ac97b(0x1a0)]=[],this[_0x5ac97b(0x196)]=Math[_0x5ac97b(0x230)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x5ac97b(0x199)]=0x0,this['_bpWaiters']=[],this[_0x5ac97b(0xf1)]=0x0,this[_0x5ac97b(0x28f)]=null,this[_0x5ac97b(0xf6)]=0x0,this[_0x5ac97b(0x280)]=0x0,this[_0x5ac97b(0x13e)]=![];}async['transaction'](_0x19b81e,_0x1980d2,{admitted:admitted=![]}={}){const _0xe05936=_0x49276c;if(_0x38f899[_0xe05936(0x2e1)]())_0x38f899[_0xe05936(0x290)](this[_0xe05936(0x17c)]?.[_0xe05936(0xaf)],_0x1980d2);if(this['_closed']){const _0x2bb388=new Error(_0xe05936(0xc7));_0x2bb388[_0xe05936(0x2b0)]=_0xe05936(0x213);throw _0x2bb388;}if(this['_highWater']>0x0){let _0x398486=![];while(this[_0xe05936(0x199)]>=this[_0xe05936(0x196)]&&!this[_0xe05936(0x2be)]){!_0x398486&&(_0x398486=!![],this['_bpParkedTotal']++),await new Promise(_0x1d4350=>this[_0xe05936(0x1f2)][_0xe05936(0x2c5)](_0x1d4350));}if(this[_0xe05936(0x2be)]){const _0x48ae8f=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x48ae8f[_0xe05936(0x2b0)]='ENV_CLOSING_RETRY';throw _0x48ae8f;}}this[_0xe05936(0x199)]++;const _0x212e48=admitted?null:this[_0xe05936(0x17c)][_0xe05936(0x19e)];for(;;){while(this[_0xe05936(0x28f)])await this[_0xe05936(0x28f)];if(_0x212e48)try{await _0x212e48['beforeWrite']();}catch(_0x279791){this[_0xe05936(0x199)]--;if(this[_0xe05936(0x1f2)][_0xe05936(0x125)]&&this[_0xe05936(0x199)]<this[_0xe05936(0x196)])this[_0xe05936(0x1f2)]['shift']()();throw _0x279791;}if(!this[_0xe05936(0x28f)])break;if(_0x212e48)_0x212e48[_0xe05936(0x1d8)]();}if(this[_0xe05936(0x2be)]){if(_0x212e48)_0x212e48[_0xe05936(0x1d8)]();this[_0xe05936(0x199)]--;if(this[_0xe05936(0x1f2)][_0xe05936(0x125)]&&this['_outstanding']<this[_0xe05936(0x196)])this[_0xe05936(0x1f2)][_0xe05936(0x141)]()();const _0x24f25c=new Error(_0xe05936(0xc7));_0x24f25c[_0xe05936(0x2b0)]='ENV_CLOSING_RETRY';throw _0x24f25c;}const _0x46d938=_0x2a3078[_0xe05936(0x2b1)]();if(_0xd5b23a)try{const _0x5b7e4e=this[_0xe05936(0x17c)]['db']['transactionSync'](_0x19b81e);this[_0xe05936(0xab)]++;if(this['_durs'][_0xe05936(0x2c5)](_0x2a3078['now']()-_0x46d938)>0x100)this['_durs'][_0xe05936(0x141)]();if(this['_done'][_0xe05936(0x2c5)](_0x2a3078[_0xe05936(0x2b1)]())>0x800)this[_0xe05936(0x1a0)][_0xe05936(0x141)]();return _0x5b7e4e;}finally{this[_0xe05936(0x199)]--;if(this[_0xe05936(0x1f2)]['length']&&this[_0xe05936(0x199)]<this[_0xe05936(0x196)])this[_0xe05936(0x1f2)][_0xe05936(0x141)]()();if(_0x212e48)_0x212e48[_0xe05936(0x1d8)]();}let _0x39fef7=null;const _0x3e919e=()=>{const _0x139ded=_0xe05936,_0x40ad1a=_0x19b81e();if(_0x40ad1a&&typeof _0x40ad1a['then']===_0x139ded(0x194)&&!_0x39fef7){this[_0x139ded(0xf6)]++;let _0x52c989;const _0x2e3cc3=new Promise(_0x11034f=>_0x52c989=_0x11034f);this[_0x139ded(0x28f)]=_0x2e3cc3,_0x39fef7=()=>{const _0xcd269c=_0x139ded;if(this[_0xcd269c(0x28f)]===_0x2e3cc3)this['_held']=null;_0x52c989();};}return _0x40ad1a;};let _0x487bb7;try{_0x487bb7=this[_0xe05936(0x17c)]['db'][_0xe05936(0x20b)](_0x3e919e);}catch(_0x361377){_0x487bb7=Promise['reject'](_0x361377);}(!_0x487bb7||typeof _0x487bb7[_0xe05936(0x110)]!=='function')&&(this[_0xe05936(0x280)]++,!this['_nestedWarned']&&(this[_0xe05936(0x13e)]=!![],console[_0xe05936(0xb2)](_0xe05936(0x23e)+(this[_0xe05936(0x17c)]?.[_0xe05936(0xaf)]??'?')+_0xe05936(0x1d4))),_0x487bb7=Promise[_0xe05936(0x112)](_0x487bb7));const _0x197ede=()=>{if(_0x39fef7)_0x39fef7();};_0x487bb7['then'](_0x197ede,_0x197ede),this[_0xe05936(0x137)][_0xe05936(0x15c)](_0x487bb7),this['_enqueuedAt'][_0xe05936(0x19d)](_0x487bb7,_0x46d938);const _0x1a28c5=()=>{const _0x483c76=_0xe05936;this['_inflight'][_0x483c76(0x12b)](_0x487bb7),this['_enqueuedAt']['delete'](_0x487bb7),this[_0x483c76(0xab)]++,this[_0x483c76(0x199)]--;this[_0x483c76(0x1f2)][_0x483c76(0x125)]&&this[_0x483c76(0x199)]<this['_highWater']&&this['_bpWaiters'][_0x483c76(0x141)]()();if(this[_0x483c76(0x1a5)][_0x483c76(0x2c5)](_0x2a3078[_0x483c76(0x2b1)]()-_0x46d938)>0x100)this['_durs'][_0x483c76(0x141)]();if(this[_0x483c76(0x1a0)]['push'](_0x2a3078[_0x483c76(0x2b1)]())>0x800)this['_done'][_0x483c76(0x141)]();};_0x487bb7['then'](_0x1a28c5,_0x1a28c5);try{return await _0x487bb7;}finally{if(_0x212e48)_0x212e48[_0xe05936(0x1d8)]();}}[_0x49276c(0x25a)](){const _0x36e7ff=_0x49276c,_0x34f1d0=_0x2a3078[_0x36e7ff(0x2b1)]();let _0x2d8fef=0x0;for(const _0x14fe37 of this[_0x36e7ff(0x1c4)]['values']()){const _0x2c6777=_0x34f1d0-_0x14fe37;if(_0x2c6777>_0x2d8fef)_0x2d8fef=_0x2c6777;}let _0x5e595e=0x0;for(let _0x37f6dd=this['_done'][_0x36e7ff(0x125)]-0x1;_0x37f6dd>=0x0;_0x37f6dd--){if(_0x34f1d0-this['_done'][_0x37f6dd]>0x3e8)break;_0x5e595e++;}let _0x161dc1=0x0;if(this[_0x36e7ff(0x1a5)][_0x36e7ff(0x125)]){const _0x258de7=[...this[_0x36e7ff(0x1a5)]][_0x36e7ff(0x142)]((_0x16a8cd,_0xd0d42)=>_0x16a8cd-_0xd0d42);_0x161dc1=_0x258de7[Math[_0x36e7ff(0xdd)](_0x258de7['length']-0x1,Math[_0x36e7ff(0x149)](_0x258de7[_0x36e7ff(0x125)]*0.99))];}return{'depth':this[_0x36e7ff(0x137)][_0x36e7ff(0x296)],'oldestPendingMs':Math[_0x36e7ff(0x258)](_0x2d8fef),'committed':this[_0x36e7ff(0xab)],'commitsPerSec':_0x5e595e,'commitP99Ms':Math[_0x36e7ff(0x258)](_0x161dc1),'parkedNow':this[_0x36e7ff(0x1f2)][_0x36e7ff(0x125)],'parkedTotal':this['_bpParkedTotal'],'highWater':this[_0x36e7ff(0x196)]};}['inflightAgesMs'](){const _0x3c4497=_0x49276c,_0x2e570c=_0x2a3078[_0x3c4497(0x2b1)]();return[...this[_0x3c4497(0x1c4)][_0x3c4497(0x1ed)]()][_0x3c4497(0x2bf)](_0x250fe8=>Math[_0x3c4497(0x258)](_0x2e570c-_0x250fe8))[_0x3c4497(0x142)]((_0x2bd10b,_0x1dcef1)=>_0x1dcef1-_0x2bd10b);}[_0x49276c(0x2eb)](){const _0x29f4e0=_0x49276c;this['_closed']=!![];for(const _0x566ba0 of this[_0x29f4e0(0x1f2)][_0x29f4e0(0x240)](0x0))_0x566ba0();}async[_0x49276c(0xff)](){const _0x42f30f=_0x49276c;let _0x54ae91=0x0;while(this[_0x42f30f(0x137)]['size']&&_0x54ae91++<0x3e8){await Promise[_0x42f30f(0x11e)]([...this[_0x42f30f(0x137)]]);}}async['put'](_0x592007,_0x52997b,_0x4839d4,_0x46da4d){const _0x3403a9=_0x49276c;return this[_0x3403a9(0x214)](()=>{const _0x20e444=_0x3403a9;if(_0x46da4d===undefined)_0x592007[_0x20e444(0x1d7)](_0x52997b,_0x4839d4);else _0x592007['putSync'](_0x52997b,_0x4839d4,_0x46da4d);},_0x3403a9(0x129));}async['remove'](_0x14df0e,_0x1a6df3){const _0x4a2863=_0x49276c;return this[_0x4a2863(0x214)](()=>_0x14df0e[_0x4a2863(0x287)](_0x1a6df3),_0x4a2863(0x241));}}async function _0x4e7dcf(_0x4758e0,_0x6876aa){const _0x11e102=_0x49276c;if(_0x6876aa==null)_0x6876aa=Math[_0x11e102(0x230)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x437f32=_0x4758e0?.[_0x11e102(0x2d1)];if(!_0x437f32||typeof _0x437f32[_0x11e102(0x110)]!==_0x11e102(0x194))return;await Promise[_0x11e102(0x148)]([Promise[_0x11e102(0x112)](_0x437f32)['catch'](()=>{}),new Promise(_0x4e7e68=>{const _0x240c00=_0x11e102,_0x556076=setTimeout(_0x4e7e68,_0x6876aa);if(_0x556076[_0x240c00(0x27c)])_0x556076['unref']();})]);}catch{}}function _0xd93eea(_0x376ddd){const _0x376ebc=_0x49276c;if(_0xd5b23a)return Promise['resolve']();const _0x30b9ec=_0x376ddd?.[_0x376ebc(0x1f4)];return _0x30b9ec&&typeof _0x30b9ec['then']===_0x376ebc(0x194)?_0x30b9ec:Promise[_0x376ebc(0x112)]();}const _0xc9a661=Math[_0x49276c(0x230)](0x1,Math[_0x49276c(0x149)](Number(process.env.UV_THREADPOOL_SIZE))||0x4),_0x44eb6a=Math[_0x49276c(0x230)](0x1,_0xc9a661-0x2);let _0x5ce522=0x0;const _0x297872=[];async function _0x5dac10(_0x15ef9f){const _0xf8dcfa=_0x49276c;if(_0x5ce522<_0x44eb6a)_0x5ce522++;else await new Promise(_0x16cbec=>_0x297872[_0xf8dcfa(0x2c5)](_0x16cbec));try{return await _0x15ef9f();}finally{const _0x349d9e=_0x297872[_0xf8dcfa(0x141)]();if(_0x349d9e)_0x349d9e();else _0x5ce522--;}}return okdbWriter[_0x49276c(0x10f)]=_0x1a13d7,okdbWriter[_0x49276c(0x10f)][_0x49276c(0x2b7)]=_0x5dac10,okdbWriter['exports'][_0x49276c(0x124)]=_0x44eb6a,okdbWriter[_0x49276c(0x10f)][_0x49276c(0xdb)]=_0x4e7dcf,okdbWriter['exports'][_0x49276c(0x1f4)]=_0xd93eea,okdbWriter['exports']['SYNC_COMMITS']=_0xd5b23a,okdbWriter[_0x49276c(0x10f)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x24b4a4=_0x498b9d;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x10bce9=require$$0$3,{SYNC_COMMITS:_0xce6ceb}=requireOkdbWriter(),_0xc4152f=_0x24b4a4(0x2dc);class _0x3b0bc1{constructor(_0x50d7ab,_0x5c7673,_0x20afa7){const _0x70571d=_0x24b4a4;this[_0x70571d(0xe5)]=_0x50d7ab,this[_0x70571d(0x2e5)]=_0x5c7673,this[_0x70571d(0x1ea)]=_0x20afa7,this[_0x70571d(0x205)]=![],this[_0x70571d(0x1db)]=null,this[_0x70571d(0x29e)]=null;}['isHeld'](){const _0x395043=_0x24b4a4;if(this[_0x395043(0x205)])return![];try{const _0x3e42d6=this[_0x395043(0xe5)]['_db']()[_0x395043(0x159)](this['_key']);if(!_0x3e42d6||_0x3e42d6[_0x395043(0x1cd)]!==this['_acquiredAt'])return![];const _0x1853cc=_0x3e42d6['updatedAt']??_0x3e42d6[_0x395043(0x1cd)];if(_0x1853cc+_0x3e42d6[_0x395043(0x11f)]<Date['now']())return![];return!![];}catch{return!this[_0x395043(0x205)];}}['holder'](){const _0x53f545=_0x24b4a4;if(this[_0x53f545(0x205)])return null;try{return this[_0x53f545(0xe5)][_0x53f545(0x1b1)]()['get'](this['_key'])??null;}catch{return null;}}async[_0x24b4a4(0x1b5)](_0x22fdd3){const _0x4abdc5=_0x24b4a4;if(this[_0x4abdc5(0x205)])return;try{if(this[_0x4abdc5(0xe5)][_0x4abdc5(0x2be)]())return;const _0x3e3114=this[_0x4abdc5(0xe5)][_0x4abdc5(0x1b1)]()[_0x4abdc5(0x159)](this['_key']);if(!_0x3e3114||_0x3e3114[_0x4abdc5(0x1cd)]!==this[_0x4abdc5(0x1ea)])return;if(_0xce6ceb)this[_0x4abdc5(0xe5)]['_db']()['putSync'](this[_0x4abdc5(0x2e5)],{..._0x3e3114,'ttlMs':_0x3e3114[_0x4abdc5(0x11f)]+_0x22fdd3});else await this[_0x4abdc5(0xe5)]['_db']()[_0x4abdc5(0x244)](this[_0x4abdc5(0x2e5)],{..._0x3e3114,'ttlMs':_0x3e3114[_0x4abdc5(0x11f)]+_0x22fdd3});}catch{}}async['release'](){const _0x331b23=_0x24b4a4;if(this[_0x331b23(0x205)])return;if(this['_heartbeatInFlight'])try{await this[_0x331b23(0x29e)];}catch{}clearInterval(this['_heartbeatTimer']),this[_0x331b23(0x1db)]=null,this['_released']=!![];try{if(this[_0x331b23(0xe5)][_0x331b23(0x2be)]())return;const _0x1446f0=this[_0x331b23(0xe5)][_0x331b23(0x1b1)]()[_0x331b23(0x159)](this[_0x331b23(0x2e5)]);if(_0x1446f0&&_0x1446f0[_0x331b23(0x1cd)]===this[_0x331b23(0x1ea)]){if(_0xce6ceb)this[_0x331b23(0xe5)][_0x331b23(0x1b1)]()[_0x331b23(0x287)](this['_key']);else await this[_0x331b23(0xe5)][_0x331b23(0x1b1)]()[_0x331b23(0x2cc)](this[_0x331b23(0x2e5)]);}}catch{}}[_0x24b4a4(0x12f)](_0x5106c7,_0x2e3d94){const _0x2d021c=_0x24b4a4,_0x56e40f=_0x2e3d94??Math[_0x2d021c(0x149)](_0x5106c7/0x3);this[_0x2d021c(0x1db)]=setInterval(()=>{const _0x5ca5a1=_0x2d021c;if(this[_0x5ca5a1(0x205)])return;this[_0x5ca5a1(0x29e)]=((async()=>{const _0xd4a0a=_0x5ca5a1;try{if(this[_0xd4a0a(0xe5)][_0xd4a0a(0x2be)]())return;const _0x1147ef=this[_0xd4a0a(0xe5)]['_db']()['get'](this['_key']);if(!_0x1147ef||_0x1147ef[_0xd4a0a(0x1cd)]!==this[_0xd4a0a(0x1ea)]){this[_0xd4a0a(0x205)]=!![],clearInterval(this[_0xd4a0a(0x1db)]),this[_0xd4a0a(0x1db)]=null;return;}if(_0xce6ceb)this[_0xd4a0a(0xe5)][_0xd4a0a(0x1b1)]()[_0xd4a0a(0x1d7)](this[_0xd4a0a(0x2e5)],{..._0x1147ef,'updatedAt':Date[_0xd4a0a(0x2b1)]()});else await this['_lock'][_0xd4a0a(0x1b1)]()['put'](this[_0xd4a0a(0x2e5)],{..._0x1147ef,'updatedAt':Date[_0xd4a0a(0x2b1)]()});}catch{}this[_0xd4a0a(0x29e)]=null;})());},_0x56e40f);if(this[_0x2d021c(0x1db)][_0x2d021c(0x27c)])this[_0x2d021c(0x1db)][_0x2d021c(0x27c)]();}}class _0x363ba7{constructor(_0x323790,{namespace:_0x3a286a,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x22579c=_0x24b4a4;this[_0x22579c(0x28d)]=_0x323790,this[_0x22579c(0x2d3)]=_0x3a286a,this['ttlMs']=ttlMs,this[_0x22579c(0x2dd)]=heartbeatMs,this[_0x22579c(0x20f)]=null;}[_0x24b4a4(0x1b1)](){const _0x3c7e91=_0x24b4a4;return this[_0x3c7e91(0x2ba)](),(!this[_0x3c7e91(0x20f)]||this[_0x3c7e91(0x138)]!==this[_0x3c7e91(0x28d)])&&(this[_0x3c7e91(0x20f)]=this[_0x3c7e91(0x28d)][_0x3c7e91(0x15a)](_0xc4152f,{'dupSort':![]}),this[_0x3c7e91(0x138)]=this[_0x3c7e91(0x28d)]),this[_0x3c7e91(0x20f)];}['_wantDb'](){const _0x4b625a=_0x24b4a4;return this['_assertUsable'](),(!this[_0x4b625a(0x10e)]||this['_wantDbOf']!==this['_rawDb'])&&(this[_0x4b625a(0x10e)]=this[_0x4b625a(0x28d)][_0x4b625a(0x15a)](_0xc4152f+_0x4b625a(0x122),{'dupSort':![]}),this[_0x4b625a(0x2bd)]=this[_0x4b625a(0x28d)]),this[_0x4b625a(0x10e)];}['_closed'](){const _0x55671f=_0x24b4a4,_0x24eda0=this[_0x55671f(0x28d)]?.[_0x55671f(0x25a)];return _0x24eda0===_0x55671f(0x234)||_0x24eda0===_0x55671f(0x1de);}[_0x24b4a4(0x2ba)](){const _0x573618=_0x24b4a4;if(this[_0x573618(0x2be)]())throw new Error(_0x573618(0x29f));}[_0x24b4a4(0x2e5)](_0x5ac67d){const _0x34e536=_0x24b4a4;return this[_0x34e536(0x2d3)]+':'+_0x5ac67d;}[_0x24b4a4(0x229)](_0x497e8e){const _0x565a6c=_0x24b4a4;try{if(this[_0x565a6c(0x2be)]())return;_0xce6ceb?this[_0x565a6c(0x1c0)]()['putSync'](this[_0x565a6c(0x2e5)](_0x497e8e),Date['now']()):this[_0x565a6c(0x1c0)]()[_0x565a6c(0x244)](this[_0x565a6c(0x2e5)](_0x497e8e),Date[_0x565a6c(0x2b1)]())?.['catch']?.(()=>{});}catch{}}[_0x24b4a4(0x286)](_0x177eef,_0x78e6af=0x3e8){const _0x1aecfa=_0x24b4a4;try{const _0x393a78=this['_wantDb']()[_0x1aecfa(0x159)](this[_0x1aecfa(0x2e5)](_0x177eef));return typeof _0x393a78===_0x1aecfa(0x13b)&&Date[_0x1aecfa(0x2b1)]()-_0x393a78<_0x78e6af;}catch{return![];}}['_isStale'](_0x381ec9){const _0x19fffb=_0x24b4a4,_0x5557e9=_0x381ec9[_0x19fffb(0x291)]??_0x381ec9[_0x19fffb(0x1cd)];return _0x5557e9+_0x381ec9[_0x19fffb(0x11f)]<Date[_0x19fffb(0x2b1)]();}static[_0x24b4a4(0x140)](_0x1b11e4){const _0x1eb077=_0x24b4a4,_0x2b235b=_0x1b11e4?.[_0x1eb077(0x22f)];if(!_0x2b235b||typeof _0x2b235b['pid']!==_0x1eb077(0x13b))return![];if(_0x2b235b['hostname']!==_0x10bce9[_0x1eb077(0x1d3)]())return![];if(_0x2b235b[_0x1eb077(0x299)]===process[_0x1eb077(0x299)])return![];try{return process['kill'](_0x2b235b[_0x1eb077(0x299)],0x0),![];}catch(_0x2c485f){return _0x2c485f[_0x1eb077(0x2b0)]===_0x1eb077(0xd3);}}async['tryAcquire'](_0x13d3fc,_0x189f98={},_0x5a3b7d={}){const _0x1f3458=_0x24b4a4,_0x1ee715=this[_0x1f3458(0x2e5)](_0x13d3fc),_0x3e473b=_0x5a3b7d[_0x1f3458(0x11f)]??this['ttlMs'],_0x4f06f3=Date[_0x1f3458(0x2b1)](),_0x49da4f={'holder':{'pid':process[_0x1f3458(0x299)],'hostname':_0x10bce9['hostname'](),..._0x189f98},'acquiredAt':_0x4f06f3,'updatedAt':_0x4f06f3,'ttlMs':_0x3e473b};let _0x350a11=![],_0x272d1c=null;if(this['_closed']())return{'acquired':![],'handle':null,'current':null};try{const _0x2d4d73=()=>{const _0x4a267c=_0x1f3458,_0x35b7e2=this[_0x4a267c(0x1b1)]()[_0x4a267c(0x159)](_0x1ee715);if(_0x35b7e2&&!this[_0x4a267c(0x206)](_0x35b7e2)&&!_0x363ba7[_0x4a267c(0x140)](_0x35b7e2)){const _0x55468a=_0x189f98[_0x4a267c(0x114)]!=null&&_0x35b7e2['holder'][_0x4a267c(0x299)]===process['pid']&&_0x35b7e2[_0x4a267c(0x22f)][_0x4a267c(0x114)]===_0x189f98['processorId'];if(!_0x55468a){_0x350a11=![],_0x272d1c=_0x35b7e2;return;}_0x49da4f[_0x4a267c(0x1cd)]<=_0x35b7e2[_0x4a267c(0x1cd)]&&(_0x49da4f[_0x4a267c(0x1cd)]=_0x35b7e2[_0x4a267c(0x1cd)]+0x1,_0x49da4f['updatedAt']=_0x49da4f[_0x4a267c(0x1cd)]);}this[_0x4a267c(0x1b1)]()[_0x4a267c(0x244)](_0x1ee715,_0x49da4f),_0x350a11=!![],_0x272d1c=_0x49da4f;};if(_0xce6ceb)this['_db']()['transactionSync'](_0x2d4d73);else await this[_0x1f3458(0x1b1)]()['childTransaction'](_0x2d4d73);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x350a11)return{'acquired':![],'handle':null,'current':_0x272d1c};const _0x2ec5f2=new _0x3b0bc1(this,_0x1ee715,_0x49da4f['acquiredAt']);return _0x2ec5f2[_0x1f3458(0x12f)](_0x3e473b,this[_0x1f3458(0x2dd)]),{'acquired':!![],'handle':_0x2ec5f2,'current':_0x272d1c};}[_0x24b4a4(0xe3)](_0x152d28){try{return this['_db']()['get'](this['_key'](_0x152d28))??null;}catch{return null;}}[_0x24b4a4(0x126)](){const _0x3be5ef=_0x24b4a4,_0x17c2cb=this[_0x3be5ef(0x2d3)]+':',_0x383fa3=[];try{for(const {key:_0x50270d,value:_0x318df6}of this['_db']()[_0x3be5ef(0x168)]({'start':_0x17c2cb,'end':_0x17c2cb+'\xff'})){typeof _0x50270d===_0x3be5ef(0x150)&&_0x50270d[_0x3be5ef(0x2a4)](_0x17c2cb)&&_0x383fa3[_0x3be5ef(0x2c5)]({'id':_0x50270d[_0x3be5ef(0x295)](_0x17c2cb['length']),'entry':_0x318df6});}}catch{}return _0x383fa3;}static[_0x24b4a4(0x1c7)](_0x207fb5){const _0x2766f7=_0x24b4a4,_0x5464ea=[];try{const _0x357790=_0x207fb5[_0x2766f7(0x15a)](_0xc4152f,{'dupSort':![]});for(const {key:_0x313d4d,value:_0x844c4c}of _0x357790['getRange']({})){if(typeof _0x313d4d!==_0x2766f7(0x150))continue;const _0x4aaaa4=_0x313d4d[_0x2766f7(0x1e8)](':');if(_0x4aaaa4<0x1)continue;_0x5464ea['push']({'namespace':_0x313d4d['slice'](0x0,_0x4aaaa4),'id':_0x313d4d[_0x2766f7(0x295)](_0x4aaaa4+0x1),'entry':_0x844c4c});}}catch{}return _0x5464ea;}}return okdbLock={'OKDBLock':_0x363ba7},okdbLock;}var version='2.6.0',require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x174019=_0x498b9d;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x2af0f3=require$$0$3,_0x4002d1=require$$1$1,_0x399681=require$$2,{LOOP:_0x7aa652}=requireOkdbLoopMonitor(),{OKDBLock:_0x351786}=requireOkdbLock(),{SYNC_COMMITS:_0x3f4025}=requireOkdbWriter(),_0x25f3f7=_0x174019(0x265),_0x18c686=_0x174019(0x2c0),_0x40cc73=_0x174019(0x2ae),_0x418851='~processes:cmd',_0x1f1286=(_0x494a82,_0x777aeb)=>_0x494a82+':'+_0x777aeb,_0x1e4841=(_0x8bcda2,_0x22bf01)=>_0x8bcda2+'::'+_0x22bf01,_0x239f10=(_0x324588,_0x1f85cb)=>_0x324588+'/'+_0x1f85cb,_0x45cb85=(_0x17f881,_0x555a08)=>_0x17f881+'#'+_0x555a08,_0x22ade0=_0x517459=>{const _0x58ef6f=_0x174019;if(_0x517459?.[_0x58ef6f(0x249)])return _0x517459[_0x58ef6f(0x249)];const _0xf0ba5=_0x517459?.[_0x58ef6f(0x274)];return typeof _0xf0ba5==='string'&&_0xf0ba5[_0x58ef6f(0x2e9)]('#')?_0xf0ba5[_0x58ef6f(0x295)](0x0,_0xf0ba5[_0x58ef6f(0x1e8)]('#')):_0xf0ba5;},_0xe3bd4=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x54339b=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x3f3740=_0xe3bd4*0x3,_0x4e045e=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x174019(0x230)](0x927c0,_0x3f3740*0x14),_0x871f9c=[_0x174019(0x173),'processor:ready',_0x174019(0x154),_0x174019(0x151),_0x174019(0x26e),'processor:resumed'];let _0x40eca2=null;function _0x3469f4(){const _0x1ca498=_0x174019;if(_0x40eca2==null)_0x40eca2=Math[_0x1ca498(0x258)]((Date[_0x1ca498(0x2b1)]()-process[_0x1ca498(0x1a1)]()*0x3e8)/0x3e8)*0x3e8;return _0x40eca2;}function _0x268e76(_0x318094){const _0x57ac76=_0x174019;if(process.env.OKDB_PROCESS_KILL===_0x57ac76(0x232))return![];if(_0x318094?.[_0x57ac76(0x1fa)]?.['processes']&&typeof _0x318094[_0x57ac76(0x1fa)][_0x57ac76(0xc5)]==='object'&&_0x318094[_0x57ac76(0x1fa)]['processes'][_0x57ac76(0x195)]===![])return![];return!![];}function _0xc288a9(_0x2a0157,_0x4c74f0){const _0x5bf558=_0x174019,_0x12f9a7=!!_0x4c74f0?.[_0x5bf558(0x27b)];switch(_0x2a0157){case _0x5bf558(0xcc):return{'controllable':_0x12f9a7,'decommissionable':![],'killable':!![],'killConfirm':'cluster-wide'};case _0x5bf558(0x108):case'standalone':return{'controllable':_0x12f9a7,'decommissionable':![],'killable':!![],'killConfirm':_0x5bf558(0xc2)};case _0x5bf558(0x102):return{'controllable':![],'decommissionable':![],'killable':![]};case'http-server':case _0x5bf558(0x260):case'fn-runner':case _0x5bf558(0x2ca):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x5bf558(0xe7)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x3ad314{constructor(_0x4445de){const _0x10839c=_0x174019;this[_0x10839c(0x24e)]=_0x4445de,this[_0x10839c(0xe0)]=null,this[_0x10839c(0x115)]=null,this[_0x10839c(0x225)]=new Map(),this[_0x10839c(0x197)]=null,this[_0x10839c(0x183)]=![],this[_0x10839c(0x21b)]=![],this[_0x10839c(0x11c)]=_0x3469f4(),this[_0x10839c(0xdc)]=_0x1f1286(process[_0x10839c(0x299)],this[_0x10839c(0x11c)]),this[_0x10839c(0x1bf)]=_0x399681[_0x10839c(0xbc)]()[_0x10839c(0x295)](0x0,0x8),this['_rowKey']=_0x45cb85(this[_0x10839c(0xdc)],this[_0x10839c(0x1bf)]),this[_0x10839c(0x2af)]=Date['now'](),this['_kind']=null,this[_0x10839c(0x179)]=null,this[_0x10839c(0x12e)]=null,this['_hbTimer']=null,this['_onProcEvent']=null,this[_0x10839c(0x233)]=null,this['_lastPublishAt']=0x0,this[_0x10839c(0x2c6)]={},this[_0x10839c(0x1e9)]=new Map(),this[_0x10839c(0x19f)]=process[_0x10839c(0x17a)](),this[_0x10839c(0x1cb)]=Date[_0x10839c(0x2b1)](),this['_lastCpuPct']=0x0,this[_0x10839c(0x276)]=new Map();}get[_0x174019(0x1c1)](){const _0x407cd1=_0x174019;return this[_0x407cd1(0xdc)];}get[_0x174019(0x1ba)](){const _0xeae055=_0x174019;return this[_0xeae055(0x19c)];}[_0x174019(0x277)](_0x380e2a,_0x1ba48c){const _0x10723a=_0x174019,_0x4d797b=_0xc288a9(_0x380e2a,_0x1ba48c);if(_0x4d797b[_0x10723a(0xc0)]&&!_0x268e76(this['okdb']))return{..._0x4d797b,'killable':![],'killConfirm':undefined};return _0x4d797b;}[_0x174019(0x226)](){const _0x24aa26=_0x174019;return!!this[_0x24aa26(0xe0)];}[_0x174019(0x1b6)](_0x43b6e4){const _0x15414b=_0x174019;Object['assign'](this[_0x15414b(0x2c6)],_0x43b6e4||{});}[_0x174019(0x15e)](_0x23e1a4){const _0x13da2c=_0x174019;if(_0x23e1a4)this[_0x13da2c(0x12e)]=_0x23e1a4;}[_0x174019(0x169)](_0x147aa4={}){const _0x87136c=_0x174019;return this[_0x87136c(0x24e)][_0x87136c(0x188)](_0x147aa4);}[_0x174019(0x16e)](){const _0x2c0785=_0x174019,_0x5c8590={};let _0x33f215=0x0,_0x40fdb3=0x0;const _0x11525f=new Set();for(const _0xd0a04a of this[_0x2c0785(0xb6)]()){_0x40fdb3++;const _0x4234c0=_0xd0a04a['processing'];if(!_0x4234c0)continue;if(_0x4234c0['participate'])_0x33f215++;for(const _0x5d98c8 of _0x4234c0[_0x2c0785(0x27b)]||[]){if(![_0x2c0785(0x22e),'fanout'][_0x2c0785(0x2e9)](_0x5d98c8[_0x2c0785(0xde)]))continue;(_0x5d98c8[_0x2c0785(0x1aa)]===_0x2c0785(0x1a7)||_0x5d98c8['state']===_0x2c0785(0x224))&&_0x5d98c8[_0x2c0785(0x2bc)]&&_0x11525f[_0x2c0785(0x15c)]((_0x5d98c8[_0x2c0785(0x17c)]||_0x2c0785(0x1fe))+':'+_0x5d98c8[_0x2c0785(0x2bc)]);const _0x2b7e69=_0x5d98c8[_0x2c0785(0x17c)]||_0x2c0785(0x1fe);(_0x5c8590[_0x2b7e69]||=[])[_0x2c0785(0x2c5)]({..._0x5d98c8,'env':_0x2b7e69,'owner':{'pid':_0xd0a04a['pid']??null,'kind':_0xd0a04a['kind']??null}});}}for(const [_0x256999,_0x4fb515]of Object[_0x2c0785(0x27f)](_0x5c8590)){for(const _0x48cc5d of _0x4fb515){if(_0x48cc5d[_0x2c0785(0xde)]===_0x2c0785(0x22e)&&!_0x48cc5d[_0x2c0785(0x105)]){const _0x5a0869=_0x256999+':'+(_0x48cc5d[_0x2c0785(0x2bc)]??'');if(!_0x11525f[_0x2c0785(0xc4)](_0x5a0869))_0x48cc5d['unclaimed']=!![];}}}return{'envs':_0x5c8590,'policy':null,'participation':{'participating':_0x33f215,'total':_0x40fdb3},'source':_0x2c0785(0x1d6)};}[_0x174019(0x128)](){const _0x3dbaf8=_0x174019,_0x1aaa57=_0x42107c=>{const _0xd3e3d7=_0x37d7;if(_0x42107c[_0xd3e3d7(0x1aa)]==='online'||_0x42107c[_0xd3e3d7(0x1aa)]==='building'||_0x42107c['state']===_0xd3e3d7(0x1a6))return 0x3;if(_0x42107c['claimGated'])return 0x1;return 0x2;},_0x43b329=new Map();for(const _0x9b4be3 of this[_0x3dbaf8(0xb6)]()){for(const _0x22160a of _0x9b4be3[_0x3dbaf8(0x1da)]?.[_0x3dbaf8(0x27b)]||[]){const _0x4dade6={..._0x22160a,'owner':{'pid':_0x9b4be3[_0x3dbaf8(0x299)]??null,'kind':_0x9b4be3[_0x3dbaf8(0x21e)]??null,'host':_0x9b4be3[_0x3dbaf8(0x1b8)]??null}},_0x467de9=_0x22160a[_0x3dbaf8(0xde)]===_0x3dbaf8(0x22e)?_0x3dbaf8(0xfd)+(_0x22160a['env']??'')+'::'+(_0x22160a[_0x3dbaf8(0x2bc)]??_0x22160a['type']??_0x22160a['id']):_0x3dbaf8(0x257)+(_0x9b4be3[_0x3dbaf8(0x274)]??_0x9b4be3[_0x3dbaf8(0x249)]??'')+'::'+(_0x22160a[_0x3dbaf8(0x17c)]??'')+'::'+_0x22160a['id'],_0x32af31=_0x43b329[_0x3dbaf8(0x159)](_0x467de9);if(!_0x32af31||_0x1aaa57(_0x4dade6)>_0x1aaa57(_0x32af31))_0x43b329[_0x3dbaf8(0x19d)](_0x467de9,_0x4dade6);}}return[..._0x43b329['values']()];}[_0x174019(0x1c5)](){const _0xd299a=_0x174019,_0x5d6555=Date[_0xd299a(0x2b1)](),_0x535fee=this['listNodes'](),_0x4ad9ca=_0x4b03b3=>Math[_0xd299a(0x230)](0x0,Math[_0xd299a(0x258)]((_0x5d6555-(_0x4b03b3['startedAt']||_0x5d6555))/0x3e8)),_0x270d0b=_0x535fee['find'](_0x548d54=>_0x548d54['kind']===_0xd299a(0xcc)),_0x746c6a=_0x535fee['filter'](_0x34d1e8=>_0x34d1e8[_0xd299a(0x21e)]===_0xd299a(0x268));if(_0x270d0b||_0x746c6a[_0xd299a(0x125)])return{'primary':_0x270d0b?{'pid':_0x270d0b[_0xd299a(0x299)],'uptime':_0x4ad9ca(_0x270d0b)}:null,'workers':_0x746c6a[_0xd299a(0x2bf)](_0x434583=>({'pid':_0x434583[_0xd299a(0x299)],'uptime':_0x4ad9ca(_0x434583)})),'workersConfigured':_0x270d0b?.[_0xd299a(0x2bb)]?.[_0xd299a(0x133)]??_0x746c6a[_0xd299a(0x125)],'mode':_0xd299a(0x18f)};const _0x579a57=_0x535fee[_0xd299a(0x2d7)](_0x2affe3=>_0x2affe3[_0xd299a(0x21e)]===_0xd299a(0x108)||_0x2affe3[_0xd299a(0x21e)]==='standalone'||_0x2affe3[_0xd299a(0x21e)]==='embedded'),_0x481b40=_0x579a57?{'pid':_0x579a57[_0xd299a(0x299)],'uptime':_0x4ad9ca(_0x579a57)}:{'pid':process['pid'],'uptime':Math[_0xd299a(0x230)](0x0,Math['round'](process['uptime']()))};return{'primary':_0x481b40,'workers':[_0x481b40],'workersConfigured':0x1,'mode':'single'};}[_0x174019(0xa4)](){const _0x4183fa=_0x174019;return this[_0x4183fa(0x145)]();}[_0x174019(0xf0)](){const _0x2a2d9f=_0x174019,_0x21fd5f=new Map();for(const _0x9b57bb of this[_0x2a2d9f(0x145)]())_0x21fd5f['set'](_0x9b57bb[_0x2a2d9f(0x249)],{..._0x9b57bb,'children':[]});const _0x150f48=[];for(const _0x2fb0bc of _0x21fd5f[_0x2a2d9f(0x1ed)]()){const _0x253e22=_0x2fb0bc[_0x2a2d9f(0x221)]?_0x21fd5f[_0x2a2d9f(0x159)](_0x2fb0bc[_0x2a2d9f(0x221)]):null;if(_0x253e22&&_0x253e22!==_0x2fb0bc)_0x253e22[_0x2a2d9f(0x2b8)][_0x2a2d9f(0x2c5)](_0x2fb0bc);else _0x150f48['push'](_0x2fb0bc);}const _0xa30b5f=(_0x4f583b,_0x1e0417)=>_0x4f583b['kind']===_0x1e0417[_0x2a2d9f(0x21e)]?(_0x4f583b[_0x2a2d9f(0x299)]||0x0)-(_0x1e0417[_0x2a2d9f(0x299)]||0x0):(_0x4f583b['kind']??'')<(_0x1e0417['kind']??'')?-0x1:0x1,_0x14f424=_0x5b7e46=>{const _0xea7391=_0x2a2d9f;_0x5b7e46[_0xea7391(0x142)](_0xa30b5f);for(const _0x2a5291 of _0x5b7e46)if(_0x2a5291[_0xea7391(0x2b8)][_0xea7391(0x125)])_0x14f424(_0x2a5291['children']);};return _0x14f424(_0x150f48),_0x150f48;}[_0x174019(0x2b2)](_0x2b5b70){const _0x4d9427=_0x174019;return this['_groupByProcess']()[_0x4d9427(0x2d7)](_0x232c27=>_0x232c27[_0x4d9427(0x249)]===_0x2b5b70)??null;}[_0x174019(0x145)](_0x8449de=Date[_0x174019(0x2b1)]()){const _0x38e5b9=_0x174019,_0x4f1f9c=new Map();for(const _0x55e503 of this[_0x38e5b9(0xb6)]()){const _0x362588=_0x22ade0(_0x55e503);let _0x150593=_0x4f1f9c['get'](_0x362588);!_0x150593&&(_0x150593={'processKey':_0x362588,'nodeKey':_0x362588,'pid':_0x55e503[_0x38e5b9(0x299)],'ppid':_0x55e503[_0x38e5b9(0x2cf)]??null,'host':_0x55e503['host']??null,'kind':_0x55e503[_0x38e5b9(0x21e)],'role':null,'supervisorKey':_0x55e503['supervisorKey']??null,'slot':_0x55e503[_0x38e5b9(0x193)]??null,'slotKey':_0x55e503['slotKey']??null,'caps':_0x55e503[_0x38e5b9(0x1ef)]??null,'lifecycle':_0x55e503['lifecycle']??null,'uptime':Math[_0x38e5b9(0x230)](0x0,Math[_0x38e5b9(0x258)]((_0x8449de-(_0x55e503['startedAt']||_0x8449de))/0x3e8)),'startedAt':_0x55e503[_0x38e5b9(0x23d)]??null,'meta':_0x55e503['meta']??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x4f1f9c[_0x38e5b9(0x19d)](_0x362588,_0x150593));_0x150593[_0x38e5b9(0x298)][_0x38e5b9(0x2c5)]({'instanceId':_0x55e503[_0x38e5b9(0xb7)]??null,'role':_0x55e503[_0x38e5b9(0x21a)]??null,'listenAddr':_0x55e503[_0x38e5b9(0x2b3)]??null,'lifecycle':_0x55e503['lifecycle']??null,'processing':_0x55e503['processing']??null});if(!_0x150593[_0x38e5b9(0x21a)]&&_0x55e503['role'])_0x150593[_0x38e5b9(0x21a)]=_0x55e503[_0x38e5b9(0x21a)];if(!_0x150593[_0x38e5b9(0x2b3)]&&_0x55e503[_0x38e5b9(0x2b3)])_0x150593[_0x38e5b9(0x2b3)]=_0x55e503['listenAddr'];if(!_0x150593['processing']&&_0x55e503['processing'])_0x150593['processing']=_0x55e503[_0x38e5b9(0x1da)];if(!_0x150593[_0x38e5b9(0xe8)]&&_0x55e503[_0x38e5b9(0xe8)])_0x150593[_0x38e5b9(0xe8)]=_0x55e503[_0x38e5b9(0xe8)];if(!_0x150593[_0x38e5b9(0xda)]&&_0x55e503[_0x38e5b9(0xda)])_0x150593[_0x38e5b9(0xda)]=_0x55e503[_0x38e5b9(0xda)];if(_0x150593[_0x38e5b9(0x1ef)]==null&&_0x55e503[_0x38e5b9(0x1ef)])_0x150593[_0x38e5b9(0x1ef)]=_0x55e503['caps'];if(_0x55e503['stats']&&(!_0x150593[_0x38e5b9(0x254)]||(_0x55e503['stats']['at']??0x0)>(_0x150593[_0x38e5b9(0x254)]['at']??0x0)))_0x150593[_0x38e5b9(0x254)]=_0x55e503['stats'];}return[..._0x4f1f9c[_0x38e5b9(0x1ed)]()];}[_0x174019(0x24b)](){const _0xd4c4ef=_0x174019,_0x24763e=[],_0x4471c5={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x56b642 of this[_0xd4c4ef(0x145)]()){_0x24763e['push']({'processKey':_0x56b642['processKey'],'kind':_0x56b642[_0xd4c4ef(0x21e)],'pid':_0x56b642['pid'],'supervisorKey':_0x56b642['supervisorKey'],'meta':_0x56b642[_0xd4c4ef(0x2bb)]??null,'uptime':_0x56b642['uptime'],'stats':_0x56b642[_0xd4c4ef(0x254)]??null}),_0x4471c5['processes']++;if(_0x56b642[_0xd4c4ef(0x254)]){_0x4471c5[_0xd4c4ef(0x256)]+=_0x56b642['stats'][_0xd4c4ef(0x256)]||0x0,_0x4471c5[_0xd4c4ef(0x26d)]+=(_0x56b642[_0xd4c4ef(0x254)][_0xd4c4ef(0x26d)]||0x0)+(_0x56b642[_0xd4c4ef(0x254)][_0xd4c4ef(0x12a)]?.['heapUsed']||0x0);const _0x2abb8d=_0x56b642[_0xd4c4ef(0x254)][_0xd4c4ef(0x12a)];_0x2abb8d&&(_0x4471c5[_0xd4c4ef(0x12a)]['count']+=_0x2abb8d['count']||0x0,_0x4471c5[_0xd4c4ef(0x12a)]['sandbox']+=_0x2abb8d[_0xd4c4ef(0x1ad)]||0x0,_0x4471c5['threads']['busy']+=_0x2abb8d[_0xd4c4ef(0x167)]||0x0);}}return{'totals':_0x4471c5,'nodes':_0x24763e};}async['open']({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x3036c5=_0x174019;this[_0x3036c5(0x183)]=this[_0x3036c5(0x183)]||!!writer,this['_isReader']=this[_0x3036c5(0x21b)]||!!reader,this[_0x3036c5(0x14d)]=kind||this[_0x3036c5(0x14d)]||(_0x4002d1[_0x3036c5(0x13f)]?_0x3036c5(0x268):'cli'),this[_0x3036c5(0x179)]=supervisorKey??this[_0x3036c5(0x179)],this['_listenAddr']=listenAddr??this[_0x3036c5(0x12e)],this[_0x3036c5(0x162)](),await this['_migrateVocab']();if(!writer&&!reader)return null;if(!this[_0x3036c5(0xe0)]){const _0x3323c1=await this[_0x3036c5(0x24e)]['createEnvironment'](_0x25f3f7,{'sync':![],'durability':'fast'});await _0x3323c1[_0x3036c5(0x121)](_0x18c686),this[_0x3036c5(0xe0)]=_0x3323c1;}return this[_0x3036c5(0xe0)];}[_0x174019(0x146)](){const _0x452d6e=_0x174019;return this[_0x452d6e(0x117)]!==this[_0x452d6e(0xe0)]&&(this[_0x452d6e(0x117)]=this[_0x452d6e(0xe0)],this[_0x452d6e(0x16d)]=this[_0x452d6e(0xe0)]['_getType'](_0x18c686)[_0x452d6e(0x2a9)]),this[_0x452d6e(0x16d)];}[_0x174019(0x285)](_0x1746a4){const _0x2c552d=_0x174019;if(_0x3f4025)return this[_0x2c552d(0x146)]()['putSync'](_0x1746a4['nodeKey'],_0x1746a4,0x1);const _0x2d0569=this[_0x2c552d(0x146)]()[_0x2c552d(0x244)](_0x1746a4[_0x2c552d(0x274)],_0x1746a4,0x1);if(_0x2d0569&&typeof _0x2d0569[_0x2c552d(0x110)]===_0x2c552d(0x194))_0x2d0569['then'](undefined,()=>{});return _0x2d0569;}[_0x174019(0x2e2)](_0x488988){const _0x1beb2d=_0x174019;return this[_0x1beb2d(0x146)]()['putSync'](_0x488988[_0x1beb2d(0x274)],_0x488988,0x1);}[_0x174019(0x1e2)](_0x320416){const _0x38080e=_0x174019;if(_0x3f4025)try{return this['_nodeDb']()['removeSync'](_0x320416);}catch{return![];}const _0x41e7f0=this['_nodeDb']()[_0x38080e(0x2cc)](_0x320416);if(_0x41e7f0&&typeof _0x41e7f0[_0x38080e(0x110)]==='function')_0x41e7f0[_0x38080e(0x110)](undefined,()=>{});return _0x41e7f0;}async[_0x174019(0x19a)](_0x2694d5){const _0x20ed7e=_0x174019;if(!this[_0x20ed7e(0xe0)]||!this[_0x20ed7e(0x183)]||!_0x2694d5?.['nodeKey'])return;return this['_putRowAsync'](_0x2694d5);}async[_0x174019(0x23c)](_0x1ef996){const _0x5a7e98=_0x174019;if(!this[_0x5a7e98(0xe0)]||!this[_0x5a7e98(0x183)]||!_0x1ef996)return;const _0x3900e9=_0x1ef996[_0x5a7e98(0x2e9)]('#'),_0x62ce12=[];for(const {key:_0x2f98ca}of this['_statusEnv'][_0x5a7e98(0x168)](_0x18c686)){if(_0x2f98ca===_0x1ef996||!_0x3900e9&&typeof _0x2f98ca===_0x5a7e98(0x150)&&_0x2f98ca[_0x5a7e98(0x2a4)](_0x1ef996+'#'))_0x62ce12[_0x5a7e98(0x2c5)](_0x2f98ca);}for(const _0x3d6ca7 of _0x62ce12){try{this[_0x5a7e98(0x146)]()[_0x5a7e98(0x287)](_0x3d6ca7);}catch{}}}['_nodeDead'](_0x554acb){const _0x5d8d1c=_0x174019;if(typeof _0x554acb?.['pid']!==_0x5d8d1c(0x13b))return![];if(_0x554acb[_0x5d8d1c(0x1b8)]!==_0x2af0f3[_0x5d8d1c(0x1d3)]())return![];if(_0x554acb['pid']===process['pid'])return![];if(_0x554acb['expiresAt']!=null&&_0x554acb['expiresAt']<Date[_0x5d8d1c(0x2b1)]()-_0x4e045e)return!![];try{return process[_0x5d8d1c(0x195)](_0x554acb[_0x5d8d1c(0x299)],0x0),![];}catch(_0x7d4dd9){return _0x7d4dd9[_0x5d8d1c(0x2b0)]===_0x5d8d1c(0xd3);}}[_0x174019(0xb6)](){const _0x2f4349=_0x174019;if(!this[_0x2f4349(0xe0)])return[];try{this[_0x2f4349(0xe0)]['db']?.[_0x2f4349(0x209)]?.();}catch{}const _0x153874=Date[_0x2f4349(0x2b1)](),_0x1af445=_0x2af0f3['hostname'](),_0x3e784c=[];for(const {value:_0x38ab85}of this[_0x2f4349(0xe0)][_0x2f4349(0x168)](_0x18c686)){if(!_0x38ab85)continue;let _0x15727e=null;_0x38ab85['host']===_0x1af445&&typeof _0x38ab85[_0x2f4349(0x299)]===_0x2f4349(0x13b)&&(_0x15727e=!this[_0x2f4349(0x131)](_0x38ab85));if(_0x15727e===![])continue;const _0x485c1a=_0x38ab85['expiresAt']==null||_0x38ab85['expiresAt']>=_0x153874;if(_0x15727e===!![]||_0x485c1a)_0x3e784c['push'](_0x38ab85);}return _0x3e784c;}async[_0x174019(0x1b3)](_0x5bd53f=0x0){const _0x1ed716=_0x174019;if(!this[_0x1ed716(0xe0)]||!this[_0x1ed716(0x183)])return;const _0x19e991=Date[_0x1ed716(0x2b1)]()-_0x5bd53f,_0x2e72f4=new Set(),_0x544448=[],_0x33144f=_0x2af0f3[_0x1ed716(0x1d3)](),_0xa8c3b0=require$$6[_0x1ed716(0x2d2)];for(const {key:_0x4633a8,value:_0x2bcb45}of this['_statusEnv'][_0x1ed716(0x168)](_0x18c686)){if(!_0x2bcb45)continue;const _0x1f6387=_0x2bcb45[_0x1ed716(0x1b8)]===_0x33144f&&typeof _0x2bcb45[_0x1ed716(0x299)]==='number',_0x712786=_0x1f6387?this[_0x1ed716(0x131)](_0x2bcb45):_0x2bcb45[_0x1ed716(0x106)]!=null&&_0x2bcb45[_0x1ed716(0x106)]<_0x19e991;if(_0x712786)_0x544448[_0x1ed716(0x2c5)](_0x4633a8);else{_0x2e72f4[_0x1ed716(0x15c)](_0x22ade0(_0x2bcb45)??_0x4633a8);if(_0x2bcb45[_0x1ed716(0x2d2)]&&_0x2bcb45[_0x1ed716(0x2d2)]!==_0xa8c3b0){if(!this['_versionSkewWarned'])this[_0x1ed716(0x113)]=new Set();!this[_0x1ed716(0x113)][_0x1ed716(0xc4)](_0x2bcb45[_0x1ed716(0x2d2)])&&(this[_0x1ed716(0x113)][_0x1ed716(0x15c)](_0x2bcb45[_0x1ed716(0x2d2)]),this[_0x1ed716(0x24e)][_0x1ed716(0xbb)]?.['warn']?.(_0x1ed716(0x10c)+(_0x2bcb45[_0x1ed716(0x299)]??'?')+_0x1ed716(0x111)+_0x2bcb45['version']+_0x1ed716(0xf9)+_0xa8c3b0+_0x1ed716(0x1a3)+'mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.',{'feature':'migrations'}));}}}for(const _0x2105dd of _0x544448)this['_removeRowAsync'](_0x2105dd);if(this[_0x1ed716(0x162)]()){const _0x19a859=[];for(const {key:_0x27e308}of this[_0x1ed716(0x180)](_0x1ed716(0x2c0))){if(!_0x2e72f4[_0x1ed716(0xc4)](_0x27e308)){if(_0x3f4025)try{this['_desired']['removeSync']('node/'+_0x27e308);}catch{}else _0x19a859[_0x1ed716(0x2c5)](this[_0x1ed716(0x115)][_0x1ed716(0x2cc)]('node/'+_0x27e308));}}if(_0x19a859['length'])await Promise[_0x1ed716(0x11e)](_0x19a859);}}[_0x174019(0x283)](_0x3d625e=null){const _0x2ed103=_0x174019;if(this[_0x2ed103(0xf5)])return;if(!this['_isWriter']||!this[_0x2ed103(0xe0)]){this['okdb']?.[_0x2ed103(0xbb)]?.[_0x2ed103(0xb2)]?.(_0x2ed103(0xef)+this[_0x2ed103(0x183)]+_0x2ed103(0x26c)+!!this[_0x2ed103(0xe0)]+_0x2ed103(0x16a),{'feature':'processes'});return;}this['_onTick']=_0x3d625e,this[_0x2ed103(0x20a)]=()=>this['_maybePublish']();for(const _0x3d6d7b of _0x871f9c)this[_0x2ed103(0x24e)]['events']['on'](_0x3d6d7b,this[_0x2ed103(0x20a)]);this[_0x2ed103(0xe1)]();const _0x5acd68=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0xe3bd4;this[_0x2ed103(0xf5)]=setInterval(()=>{const _0x2f0b7d=_0x2ed103;if(this[_0x2f0b7d(0x233)])try{this[_0x2f0b7d(0x233)]();}catch{}this['_publishNow'](),this[_0x2f0b7d(0x1b3)]()['catch'](()=>{});},_0x5acd68);if(this[_0x2ed103(0xf5)][_0x2ed103(0x27c)])this[_0x2ed103(0xf5)][_0x2ed103(0x27c)]();}['_maybePublish'](){const _0x3487f9=_0x174019;if(!this['_isWriter']||!this[_0x3487f9(0xe0)])return;if(Date[_0x3487f9(0x2b1)]()-this['_lastPublishAt']<_0x54339b)return;this['_publishNow']();}[_0x174019(0xe1)](){const _0x40460c=_0x174019;if(!this['_isWriter']||!this[_0x40460c(0xe0)])return;this[_0x40460c(0xae)]=Date[_0x40460c(0x2b1)]();try{const _0x4fe2de=[this[_0x40460c(0x13c)]()];for(const _0x13dada of this[_0x40460c(0x1e9)][_0x40460c(0x1ed)]())_0x4fe2de[_0x40460c(0x2c5)](this[_0x40460c(0x2cd)](_0x13dada));const _0x182fcb=_0x7aa652[_0x40460c(0xad)]?_0x7aa652[_0x40460c(0x2b1)]():0x0;for(const _0x384298 of _0x4fe2de){try{this[_0x40460c(0x2e2)](_0x384298),this['_publishFailWarned']=![];}catch(_0x559ccc){!this[_0x40460c(0x1f6)]&&(this[_0x40460c(0x1f6)]=!![],this['okdb']?.[_0x40460c(0xbb)]?.[_0x40460c(0xb2)]?.('registry\x20publish\x20failing:\x20'+_0x559ccc[_0x40460c(0x15b)],{'feature':_0x40460c(0xc5)}));}}if(_0x7aa652[_0x40460c(0xad)])_0x7aa652[_0x40460c(0x29c)](_0x40460c(0x107),_0x7aa652['now']()-_0x182fcb,'rows='+_0x4fe2de[_0x40460c(0x125)]+_0x40460c(0x164));}catch(_0x55831e){!this[_0x40460c(0x1f6)]&&(this['_publishFailWarned']=!![],this['okdb']?.[_0x40460c(0xbb)]?.['warn']?.('registry\x20publish\x20failing:\x20'+_0x55831e[_0x40460c(0x15b)],{'feature':_0x40460c(0xc5)}));}}async[_0x174019(0xb8)](){const _0x37912b=_0x174019;if(this[_0x37912b(0x20a)]){for(const _0x51e2a0 of _0x871f9c){try{this[_0x37912b(0x24e)]['events'][_0x37912b(0x232)](_0x51e2a0,this['_onProcEvent']);}catch{}}this[_0x37912b(0x20a)]=null;}this[_0x37912b(0xf5)]&&(clearInterval(this[_0x37912b(0xf5)]),this[_0x37912b(0xf5)]=null);try{if(this[_0x37912b(0xe0)]&&this[_0x37912b(0x183)])await this[_0x37912b(0x23c)](this['_rowKey']);}catch{}}async[_0x174019(0x2b9)](){const _0x233d77=_0x174019;if(!this[_0x233d77(0xe0)]||!this[_0x233d77(0x183)])return;try{await this['removeNode'](this['_rowKey']);}catch{}try{const _0x25724a=[];for(const {value:_0x36d812}of this[_0x233d77(0xe0)]['getRange'](_0x18c686)){if(_0x36d812?.['ppid']===process[_0x233d77(0x299)]&&_0x36d812[_0x233d77(0x274)])_0x25724a[_0x233d77(0x2c5)](_0x36d812[_0x233d77(0x274)]);}for(const _0x3ecbb2 of _0x25724a){try{await this[_0x233d77(0x23c)](_0x3ecbb2);}catch{}}}catch{}}async['publishOwnRow'](){const _0x1736ea=_0x174019;return this[_0x1736ea(0x19a)](this[_0x1736ea(0x13c)]());}async[_0x174019(0x22b)](_0x255e53){const _0x4ccd17=_0x174019;if(!this['_statusEnv']||!this[_0x4ccd17(0x183)])return;return this[_0x4ccd17(0x19a)](this[_0x4ccd17(0x2cd)](_0x255e53));}[_0x174019(0x2cd)]({pid:_0x1cb8ee,startedAt:_0x3bb478,kind:_0x1d5ceb,supervisorKey:_0x25915c,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x174019(0x29b),meta:meta=null,stats:stats=null}){const _0x4cf6c7=_0x174019,_0x30c8e0=Date[_0x4cf6c7(0x2b1)](),_0x32d26a=_0x1f1286(_0x1cb8ee,_0x3bb478);return{'nodeKey':_0x45cb85(_0x32d26a,'0'),'processKey':_0x32d26a,'instanceId':'0','pid':_0x1cb8ee,'startedAt':_0x3bb478,'ppid':process[_0x4cf6c7(0x299)],'host':_0x2af0f3[_0x4cf6c7(0x1d3)](),'supervisorKey':_0x25915c,'slot':slot,'slotKey':slotKey,'kind':_0x1d5ceb,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x30c8e0,'expiresAt':_0x30c8e0+_0x3f3740,'caps':this[_0x4cf6c7(0x277)](_0x1d5ceb,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x174019(0x26f)](_0x5c05bb){const _0x51ded2=_0x174019;if(!_0x5c05bb?.['pid'])return null;const _0x2ed8f6=_0x1f1286(_0x5c05bb['pid'],_0x5c05bb['startedAt']);this[_0x51ded2(0x1e9)][_0x51ded2(0x19d)](_0x2ed8f6,{..._0x5c05bb,'supervisorKey':_0x5c05bb[_0x51ded2(0x221)]??this[_0x51ded2(0xdc)]});if(this[_0x51ded2(0x183)])await this[_0x51ded2(0x22b)](this[_0x51ded2(0x1e9)][_0x51ded2(0x159)](_0x2ed8f6))['catch']?.(()=>{});return _0x2ed8f6;}[_0x174019(0x25b)](_0x136222){const _0x35b920=_0x174019;if(!_0x136222)return;return this[_0x35b920(0x1e9)][_0x35b920(0x12b)](_0x136222),this[_0x35b920(0x23c)](_0x136222);}['_sampleOwnStats'](){const _0x3cab4b=_0x174019,_0x19b938=Date[_0x3cab4b(0x2b1)](),_0x960acf=process[_0x3cab4b(0x17a)](),_0x1b22b8=(_0x19b938-this[_0x3cab4b(0x1cb)])*0x3e8;if(_0x1b22b8>=0x3d090){const _0x46db50=_0x960acf['user']-this[_0x3cab4b(0x19f)][_0x3cab4b(0xcb)]+(_0x960acf[_0x3cab4b(0x2a2)]-this[_0x3cab4b(0x19f)][_0x3cab4b(0x2a2)]),_0x28a9e3=_0x2af0f3[_0x3cab4b(0x1fd)]()[_0x3cab4b(0x125)]||0x1;this[_0x3cab4b(0x11a)]=Math[_0x3cab4b(0xdd)](0x64,Math['round'](_0x46db50/(_0x1b22b8*_0x28a9e3)*0x64)),this['_lastCpuWindowMs']=Math['round'](_0x1b22b8/0x3e8),this[_0x3cab4b(0x19f)]=_0x960acf,this[_0x3cab4b(0x1cb)]=_0x19b938;}const _0x5f43c4=process[_0x3cab4b(0x282)](),_0x5fe7ae=this[_0x3cab4b(0x276)][_0x3cab4b(0x296)];let _0x15c1d0=0x0;if(_0x5fe7ae>0x0){const _0x518a64=[this['okdb'],...this[_0x3cab4b(0x24e)][_0x3cab4b(0x1a9)]?.[_0x3cab4b(0x1ed)]?.()??[]];for(const _0xcb82b2 of _0x518a64){const _0x434efb=_0xcb82b2[_0x3cab4b(0x18d)]?.[_0x3cab4b(0x187)];if(_0x434efb)_0x15c1d0+=_0x434efb['liveThreadStats'][_0x3cab4b(0x167)];}}let _0x3fe6dc=null;const _0xfd4913=_0x5fe7ae;if(_0xfd4913>0x0){let _0x2ea0b2=0x0;for(const _0x2ff85e of this[_0x3cab4b(0x276)]['values']())_0x2ea0b2+=_0x2ff85e[_0x3cab4b(0x26d)]||0x0;_0x3fe6dc={'count':_0xfd4913,'heapUsed':_0x2ea0b2,'sandbox':_0x5fe7ae,'busy':_0x15c1d0};}return{'rss':_0x5f43c4[_0x3cab4b(0x256)],'heapUsed':_0x5f43c4[_0x3cab4b(0x26d)],'heapTotal':_0x5f43c4[_0x3cab4b(0x272)],'external':_0x5f43c4[_0x3cab4b(0x23a)],'cpuPct':this[_0x3cab4b(0x11a)],'cpuWindowMs':this[_0x3cab4b(0x1be)]??null,'threads':_0x3fe6dc,'at':_0x19b938};}[_0x174019(0x1bb)](_0x5b07a7,_0x4bd3c3){const _0x385796=_0x174019;if(!_0x5b07a7||!_0x4bd3c3)return;this[_0x385796(0x276)][_0x385796(0x19d)](_0x5b07a7,_0x4bd3c3);}[_0x174019(0x2e4)](_0x1e4489){const _0x5666a5=_0x174019;this[_0x5666a5(0x276)][_0x5666a5(0x12b)](_0x1e4489);}[_0x174019(0x253)](_0x313467,_0xad13,_0x75054f=undefined){const _0x3fe947=_0x174019,_0x24c6e0=this[_0x3fe947(0x1e9)][_0x3fe947(0x159)](_0x313467);if(!_0x24c6e0||!_0xad13)return;if(_0x75054f!==undefined)_0x24c6e0[_0x3fe947(0x1da)]=_0x75054f;_0x24c6e0[_0x3fe947(0x254)]={'rss':_0xad13['rss']??null,'heapUsed':_0xad13[_0x3fe947(0x26d)]??null,'heapTotal':_0xad13[_0x3fe947(0x272)]??null,'external':_0xad13[_0x3fe947(0x23a)]??null,'cpuPct':_0xad13['cpuPct']??null,'cpuWindowMs':_0xad13[_0x3fe947(0x103)]??null,'threads':_0xad13['threads']??null,'claims':_0xad13[_0x3fe947(0x266)]??null,'envsOpen':_0xad13['envsOpen']??null,'at':Date[_0x3fe947(0x2b1)]()};}['_buildOwnRow'](){const _0x25f237=_0x174019,_0x52aba8=Date[_0x25f237(0x2b1)](),_0x391eb4=this[_0x25f237(0x24e)][_0x25f237(0xd5)]||{},_0x31348a=this[_0x25f237(0x14d)]||'cli';return{'nodeKey':this['_rowKey'],'processKey':this[_0x25f237(0xdc)],'instanceId':this['_instanceId'],'pid':process[_0x25f237(0x299)],'startedAt':this[_0x25f237(0x11c)],'instanceStartedAt':this[_0x25f237(0x2af)],'ppid':typeof process['ppid']===_0x25f237(0x13b)?process[_0x25f237(0x2cf)]:null,'host':_0x2af0f3[_0x25f237(0x1d3)](),'supervisorKey':this[_0x25f237(0x179)]??null,'version':require$$6[_0x25f237(0x2d2)],'kind':_0x31348a,'role':{'engines':!!_0x391eb4[_0x25f237(0xe8)],'processors':!!_0x391eb4[_0x25f237(0x27b)],'compaction':_0x391eb4[_0x25f237(0x20e)],'http':_0x391eb4[_0x25f237(0x14c)]},'listenAddr':this[_0x25f237(0x12e)]??null,'heartbeatAt':_0x52aba8,'expiresAt':_0x52aba8+_0x3f3740,'caps':this[_0x25f237(0x277)](_0x31348a,_0x391eb4),'lifecycle':{'state':_0x25f237(0x29b),'desiredVersionApplied':null},'meta':{...this['_ownMeta']},'processing':_0x391eb4[_0x25f237(0x27b)]?this[_0x25f237(0x16f)]():null,'engines':_0x391eb4[_0x25f237(0xe8)]?[...this[_0x25f237(0x24e)]['_servingEngines']??[]]:null,'singletonClaims':this['_collectSingletonClaims'](),'stats':this[_0x25f237(0x28c)](),'writers':this[_0x25f237(0x201)]()};}[_0x174019(0x201)](){const _0x404f3a=_0x174019,_0x4e29f7={};try{for(const [_0x7ec250,_0x4c54f8]of this['okdb'][_0x404f3a(0x1a9)]){try{const _0xd6c7be=_0x4c54f8[_0x404f3a(0x236)]?.();if(!_0xd6c7be)continue;if(!_0xd6c7be[_0x404f3a(0x18e)]&&!_0xd6c7be[_0x404f3a(0x1f4)]&&!(_0xd6c7be['parkedNow']??0x0)&&!_0xd6c7be[_0x404f3a(0x24a)])continue;_0x4e29f7[_0x7ec250]={'depth':_0xd6c7be[_0x404f3a(0x18e)],'oldestPendingMs':_0xd6c7be[_0x404f3a(0x1b0)],'committed':_0xd6c7be[_0x404f3a(0x1f4)],'commitsPerSec':_0xd6c7be[_0x404f3a(0xb0)],'commitP99Ms':_0xd6c7be[_0x404f3a(0x170)],'parkedNow':_0xd6c7be[_0x404f3a(0x284)]??0x0,'draining':!!_0xd6c7be[_0x404f3a(0x24a)]};}catch{}}}catch{}return Object[_0x404f3a(0x261)](_0x4e29f7)[_0x404f3a(0x125)]?_0x4e29f7:null;}['_collectSingletonClaims'](){const _0x48d4d7=_0x174019,_0x20ff3a=process[_0x48d4d7(0x299)],_0x2528a0=Date[_0x48d4d7(0x2b1)](),_0x3350a1=_0x12817d=>{const _0x15fc0e=_0x48d4d7;if(!_0x12817d)return[];const _0x145e7b=[];try{for(const {id:_0x540e58,entry:_0xc0f287}of _0x12817d[_0x15fc0e(0x126)]()){if(_0xc0f287?.['holder']?.[_0x15fc0e(0x299)]!==_0x20ff3a)continue;const _0x281be2=_0xc0f287[_0x15fc0e(0x291)]??_0xc0f287[_0x15fc0e(0x1cd)]??0x0;if(_0x281be2+(_0xc0f287[_0x15fc0e(0x11f)]??0x0)<_0x2528a0)continue;_0x145e7b[_0x15fc0e(0x2c5)](_0x540e58);}}catch{}return _0x145e7b;},_0x27f977=_0x3350a1(this[_0x48d4d7(0x235)](_0x48d4d7(0x2d8))),_0x1945f2=_0x3350a1(this['_singletonLock'](_0x48d4d7(0xd4)));if(!_0x27f977[_0x48d4d7(0x125)]&&!_0x1945f2[_0x48d4d7(0x125)])return null;return{'compact':_0x27f977,'replicate':_0x1945f2};}[_0x174019(0x235)](_0x502083){const _0x33ae32=_0x174019;if(!this['okdb']?.[_0x33ae32(0x152)])return null;if(!this[_0x33ae32(0xa9)])this['_singletonLocks']=new Map();let _0x422654=this[_0x33ae32(0xa9)]['get'](_0x502083);if(!_0x422654)try{_0x422654=new _0x351786(this[_0x33ae32(0x24e)][_0x33ae32(0x152)],{'namespace':_0x502083}),this[_0x33ae32(0xa9)]['set'](_0x502083,_0x422654);}catch{return null;}return _0x422654;}['_buildProcessingFacet'](){const _0x57c890=_0x174019,_0x45e2da=[];try{for(const [_0x95a55a,_0x7aa2c6]of this['okdb'][_0x57c890(0x1a9)]){if(_0x95a55a[_0x57c890(0x2a4)]('~'))continue;for(const _0x1d787b of _0x7aa2c6['processor'][_0x57c890(0x2e6)]())_0x45e2da[_0x57c890(0x2c5)]({..._0x1d787b,'env':_0x95a55a});}}catch{}return{'participate':this[_0x57c890(0x24e)][_0x57c890(0x27b)]?.[_0x57c890(0x2a1)]??![],'processors':_0x45e2da};}[_0x174019(0x162)](){const _0x55c088=_0x174019;if(this[_0x55c088(0x115)])return!![];const _0x125d0e=this['okdb']['_rootDb'];if(!_0x125d0e)return![];return this[_0x55c088(0x115)]=_0x125d0e[_0x55c088(0x15a)](_0x40cc73,{'dupSort':![]}),this['_cmd']=_0x125d0e[_0x55c088(0x15a)](_0x418851,{'dupSort':![]}),!![];}async['_migrateVocab'](){const _0x119a9f=_0x174019;if(!this['_ensureDesired']())return;const _0x45615d='__vocab/version',_0x435478=0x1,_0x286f5a=this[_0x119a9f(0x115)][_0x119a9f(0x159)](_0x45615d)??0x0;if(_0x286f5a>=_0x435478)return;const _0xb631bc=_0x32aefd=>{const _0x528b2e=_0x119a9f;if(_0x32aefd==='worker')return _0x528b2e(0x22e);if(_0x32aefd===_0x528b2e(0x25e))return'fanout';return _0x32aefd;};await this[_0x119a9f(0x24e)]['_systemEnv'][_0x119a9f(0xd7)]['transaction'](()=>{const _0x113389=_0x119a9f;for(const _0x5eecdd of[_0x113389(0x163),_0x113389(0x288)]){for(const {key:_0x2309c9,value:_0x4c801f}of this[_0x113389(0x115)][_0x113389(0x168)]({'start':_0x5eecdd,'end':_0x5eecdd+'\xff'})){if(typeof _0x2309c9!==_0x113389(0x150)||!_0x2309c9[_0x113389(0x2a4)](_0x5eecdd))break;const _0x542f72=_0xb631bc(_0x4c801f[_0x113389(0xde)]);if(_0x542f72!==_0x4c801f[_0x113389(0xde)])this['_desired'][_0x113389(0x244)](_0x2309c9,{..._0x4c801f,'mode':_0x542f72});}}this[_0x113389(0x115)][_0x113389(0x244)](_0x45615d,_0x435478);});}['hasDesired'](){return!!this['_desired'];}[_0x174019(0x12c)](_0x50985c,_0x15305c){const _0x4e5b8c=_0x174019;if(!this[_0x4e5b8c(0x162)]())return null;const _0x86033b=_0x50985c+'/'+_0x15305c;return this[_0x4e5b8c(0x1b7)](),this[_0x4e5b8c(0x225)]['get'](_0x86033b)??this['_desired']['get'](_0x86033b)??null;}[_0x174019(0x1b7)](){const _0x5dff4c=_0x174019;if(!_0x3f4025)return;try{this[_0x5dff4c(0x24e)][_0x5dff4c(0x247)]?.['db']?.[_0x5dff4c(0x209)]?.();}catch{}}async[_0x174019(0x207)](_0x5000ea,_0x22a2a5,_0x2eb4c8){const _0x5380b1=_0x174019;if(!this['_ensureDesired']())return null;const _0x227f95=_0x5000ea+'/'+_0x22a2a5;this['_refreshDesiredSnapshot']();const _0x6bb0ef=this[_0x5380b1(0x225)][_0x5380b1(0x159)](_0x227f95)??this['_desired'][_0x5380b1(0x159)](_0x227f95)??{'version':0x0},_0x4a84d0=(_0x6bb0ef[_0x5380b1(0x2d2)]||0x0)+0x1,_0x1a2c44={..._0x6bb0ef,..._0x2eb4c8,'version':_0x4a84d0,'updatedAt':Date['now']()};this[_0x5380b1(0x225)][_0x5380b1(0x19d)](_0x227f95,_0x1a2c44);try{await this['okdb']['_systemEnv'][_0x5380b1(0xd7)][_0x5380b1(0x214)](()=>{const _0x38cadc=_0x5380b1;this[_0x38cadc(0x115)][_0x38cadc(0x244)](_0x227f95,_0x1a2c44);});}finally{if(this['_desiredOverlay'][_0x5380b1(0x159)](_0x227f95)===_0x1a2c44)this[_0x5380b1(0x225)][_0x5380b1(0x12b)](_0x227f95);}return _0x4a84d0;}[_0x174019(0x180)](_0x2b8c09){const _0x3b6d43=_0x174019;if(!this[_0x3b6d43(0x162)]())return[];this['_refreshDesiredSnapshot']();const _0x1616dd=_0x2b8c09+'/',_0x7adaa3=[];for(const {key:_0x62dd1a,value:_0x3688be}of this['_desired'][_0x3b6d43(0x168)]({'start':_0x1616dd,'end':_0x1616dd+'\xff'})){if(typeof _0x62dd1a!=='string'||!_0x62dd1a[_0x3b6d43(0x2a4)](_0x1616dd))break;_0x7adaa3['push']({'key':_0x62dd1a[_0x3b6d43(0x295)](_0x1616dd[_0x3b6d43(0x125)]),'value':_0x3688be});}return _0x7adaa3;}[_0x174019(0x10b)](_0x286d5e){const _0x58a2b2=_0x174019;if(!this[_0x58a2b2(0x162)]())return null;return this[_0x58a2b2(0x197)][_0x58a2b2(0x159)](_0x286d5e)??null;}async[_0x174019(0x237)](_0xc1964,_0x30978f,_0x1b5887={}){const _0x1f5769=_0x174019;if(!this[_0x1f5769(0x162)]())return null;let _0x47a769;return await this[_0x1f5769(0x24e)]['_systemEnv'][_0x1f5769(0xd7)]['transaction'](()=>{const _0x1d2f9c=_0x1f5769,_0x2a8731=this[_0x1d2f9c(0x197)][_0x1d2f9c(0x159)](_0xc1964)||{'epoch':0x0};_0x47a769=(_0x2a8731[_0x1d2f9c(0x135)]||0x0)+0x1,this['_cmd'][_0x1d2f9c(0x244)](_0xc1964,{..._0x2a8731,..._0x1b5887,'cmd':_0x30978f,'epoch':_0x47a769,'updatedAt':Date['now']()});}),_0x47a769;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x3ad314,'nodeKey':_0x1f1286,'logicalKey':_0x1e4841,'slotKey':_0x239f10,'PROCESS_ENV':_0x25f3f7,'NODE_TYPE':_0x18c686},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x2ac451=_0x498b9d;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x4ceeba=require$$0$4,{EVENTS:_0x11b767,CHANGE_ACTIONS:_0x31679b}=requireOkdbEnums(),{LOOP:_0x300d81}=requireOkdbLoopMonitor(),_0x76eaf3=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x4b3505=0x5,_0x1a51c2=0x2710;class _0x1fd4b9 extends _0x4ceeba{constructor(_0x3d267e,_0x2681c5={}){const _0x4f20bf=_0x37d7;super(),this[_0x4f20bf(0x24e)]=_0x3d267e,this[_0x4f20bf(0xa7)]=_0x2681c5[_0x4f20bf(0x186)]??_0x76eaf3,this[_0x4f20bf(0x21f)]=_0x2681c5[_0x4f20bf(0x2cb)]??_0x4b3505,this[_0x4f20bf(0x1ec)]=_0x2681c5[_0x4f20bf(0xdf)]??_0x1a51c2,this[_0x4f20bf(0xeb)]=![],this['_cursors']=new Map(),this['_baselines']=new Map(),this['_pending']=new Map(),this['_flushTimer']=null,this[_0x4f20bf(0xc3)]=![],this[_0x4f20bf(0xfa)]=new Set(),this[_0x4f20bf(0xf2)]=new Set(),this[_0x4f20bf(0x1e7)]=_0x4e1883=>this[_0x4f20bf(0x2c8)](_0x4e1883),this[_0x4f20bf(0x176)]=_0x179e90=>this[_0x4f20bf(0x147)](_0x179e90),this['_onPoke']=_0x5c9ec7=>this[_0x4f20bf(0x1ab)](_0x5c9ec7),this[_0x4f20bf(0x19b)]=()=>this[_0x4f20bf(0xe2)]();}[_0x2ac451(0x2a3)](){const _0x3e83c0=_0x2ac451;if(this[_0x3e83c0(0xeb)])return;this[_0x3e83c0(0xeb)]=!![];for(const [_0x11908a,_0x508e84]of this[_0x3e83c0(0x24e)][_0x3e83c0(0x1a9)]){if(_0x11908a['startsWith']('~'))continue;try{_0x508e84[_0x3e83c0(0x109)]();}catch{}}for(const [_0x206dcf,_0x2189d0]of this[_0x3e83c0(0x24e)][_0x3e83c0(0x1a9)]){if(_0x206dcf[_0x3e83c0(0x2a4)]('~'))continue;try{this['_baselines']['set'](_0x206dcf,_0x2189d0['getClock']()||0x0);}catch{}}const {events:_0x5b9540}=this[_0x3e83c0(0x24e)];_0x5b9540['on'](_0x11b767['ITEM_PENDING'],this[_0x3e83c0(0x176)]),_0x5b9540['on'](_0x11b767[_0x3e83c0(0x2c7)],this[_0x3e83c0(0x1e7)]),_0x5b9540['on'](_0x11b767['ITEM_UPDATE'],this[_0x3e83c0(0x1e7)]),_0x5b9540['on'](_0x11b767[_0x3e83c0(0x10d)],this[_0x3e83c0(0x1e7)]),_0x5b9540['on'](_0x11b767[_0x3e83c0(0x14e)],this[_0x3e83c0(0x15d)]),_0x5b9540['once'](_0x11b767[_0x3e83c0(0x245)],this['_onStop']);}[_0x2ac451(0xe2)](){const _0x1e92d4=_0x2ac451;if(!this[_0x1e92d4(0xeb)])return;this[_0x1e92d4(0xeb)]=![];const {events:_0xab9f6f}=this[_0x1e92d4(0x24e)];_0xab9f6f[_0x1e92d4(0x232)](_0x11b767['ITEM_PENDING'],this[_0x1e92d4(0x176)]),_0xab9f6f[_0x1e92d4(0x232)](_0x11b767[_0x1e92d4(0x2c7)],this[_0x1e92d4(0x1e7)]),_0xab9f6f[_0x1e92d4(0x232)](_0x11b767['ITEM_UPDATE'],this[_0x1e92d4(0x1e7)]),_0xab9f6f[_0x1e92d4(0x232)](_0x11b767[_0x1e92d4(0x10d)],this[_0x1e92d4(0x1e7)]),_0xab9f6f['off'](_0x11b767[_0x1e92d4(0x14e)],this[_0x1e92d4(0x15d)]);try{_0xab9f6f[_0x1e92d4(0x232)](_0x11b767['SYSTEM_STOPPED'],this[_0x1e92d4(0x19b)]);}catch{}this['_flushTimer']&&(clearTimeout(this[_0x1e92d4(0x297)]),this[_0x1e92d4(0x297)]=null),this[_0x1e92d4(0x100)][_0x1e92d4(0x16c)](),this[_0x1e92d4(0x156)][_0x1e92d4(0x16c)](),this[_0x1e92d4(0x16b)][_0x1e92d4(0x16c)](),this[_0x1e92d4(0xfa)][_0x1e92d4(0x16c)](),this[_0x1e92d4(0xf2)][_0x1e92d4(0x16c)]();}['_dedupeKey'](_0x32e089,_0x419787,_0x400548,_0xcc5b6){return _0x32e089+'\x00'+_0x419787+'\x00'+_0x400548+'\x00'+_0xcc5b6;}[_0x2ac451(0x219)](_0x55490f,_0x4f5b23,_0x1ba65a,_0x20e87a){const _0x5b6ccd=_0x2ac451,_0x589ed6=this[_0x5b6ccd(0x13d)](_0x55490f,_0x4f5b23,_0x1ba65a,_0x20e87a);if(this['_seen'][_0x5b6ccd(0xc4)](_0x589ed6))return![];this[_0x5b6ccd(0xfa)][_0x5b6ccd(0x15c)](_0x589ed6);if(this[_0x5b6ccd(0xfa)][_0x5b6ccd(0x296)]>this[_0x5b6ccd(0x1ec)]){const _0xe2fadc=this['_seen'][_0x5b6ccd(0x1ed)]()['next']()[_0x5b6ccd(0x24f)];this[_0x5b6ccd(0xfa)][_0x5b6ccd(0x12b)](_0xe2fadc);}return!![];}[_0x2ac451(0x147)](_0x239985){const _0x88fe30=_0x2ac451;if(!this[_0x88fe30(0xeb)]||!_0x239985)return;const {env:_0x25f396,type:_0x39417d,key:_0x1a7099,clock:_0x1408ec}=_0x239985;if(_0x25f396==null||_0x39417d==null||_0x1a7099==null)return;if(typeof _0x25f396===_0x88fe30(0x150)&&_0x25f396[_0x88fe30(0x2a4)]('~'))return;if(typeof _0x39417d==='string'&&_0x39417d[_0x88fe30(0x2a4)]('~'))return;this['_pendingLocal'][_0x88fe30(0x15c)](this[_0x88fe30(0x13d)](_0x25f396,_0x39417d,_0x1a7099,_0x1408ec)),this['_pendingLocal'][_0x88fe30(0x296)]>this['_dedupeMax']&&this[_0x88fe30(0xf2)]['delete'](this[_0x88fe30(0xf2)][_0x88fe30(0x1ed)]()['next']()[_0x88fe30(0x24f)]);}[_0x2ac451(0x2c8)](_0x1aad06){const _0x5be25d=_0x2ac451;if(!this[_0x5be25d(0xeb)]||!_0x1aad06)return;const {env:_0x30d21d,type:_0x46cbd4,key:_0x2304ab,clock:_0x19ac14,origin:_0xccce7,action:_0x5d524c,newValue:_0x2aec4d,oldValue:_0x3958e5}=_0x1aad06;if(_0x30d21d==null||_0x46cbd4==null||_0x2304ab==null)return;if(typeof _0x30d21d===_0x5be25d(0x150)&&_0x30d21d[_0x5be25d(0x2a4)]('~'))return;if(typeof _0x46cbd4===_0x5be25d(0x150)&&_0x46cbd4[_0x5be25d(0x2a4)]('~'))return;this[_0x5be25d(0xf2)]['delete'](this[_0x5be25d(0x13d)](_0x30d21d,_0x46cbd4,_0x2304ab,_0x19ac14));if(!this[_0x5be25d(0x219)](_0x30d21d,_0x46cbd4,_0x2304ab,_0x19ac14))return;const _0x5afd98=_0x5d524c===_0x31679b['REMOVE']?'remove':_0x5be25d(0x244);this['emit'](_0x5be25d(0x275),{'env':_0x30d21d,'type':_0x46cbd4,'key':_0x2304ab,'op':_0x5afd98,'clock':_0x19ac14,'origin':_0xccce7,'value':_0x5afd98===_0x5be25d(0x2cc)?null:_0x2aec4d,'prevValue':_0x3958e5});}[_0x2ac451(0x1ab)](_0x2758c4){const _0x5630ea=_0x2ac451;if(!this[_0x5630ea(0xeb)])return;if(!_0x2758c4||typeof _0x2758c4['env']!=='string'||typeof _0x2758c4['type']!==_0x5630ea(0x150))return;const {env:_0x1241ca,type:_0x201a1b}=_0x2758c4;if(_0x1241ca[_0x5630ea(0x2a4)]('~')||_0x201a1b[_0x5630ea(0x2a4)]('~'))return;this[_0x5630ea(0x100)][_0x5630ea(0x19d)](_0x1241ca+'\x00'+_0x201a1b,{'env':_0x1241ca,'type':_0x201a1b}),this[_0x5630ea(0x136)]();}[_0x2ac451(0x136)](){const _0x257029=_0x2ac451;if(this['_flushTimer'])return;const _0xe9faf2=()=>{const _0x3c28b4=_0x37d7;this[_0x3c28b4(0x297)]=null,this[_0x3c28b4(0x2ad)]()[_0x3c28b4(0x208)](()=>{});};this[_0x257029(0x297)]=setTimeout(_0xe9faf2,this[_0x257029(0x21f)]>0x0?this['_flushDebounce']:0x0);}async[_0x2ac451(0x2ad)](){const _0x2c3978=_0x2ac451;if(this[_0x2c3978(0xc3)]){this[_0x2c3978(0x136)]();return;}this[_0x2c3978(0xc3)]=!![];try{const _0x5f2d6c=[...this[_0x2c3978(0x100)][_0x2c3978(0x1ed)]()];this[_0x2c3978(0x100)][_0x2c3978(0x16c)]();let _0x5207f7=![];for(const {env:_0x3dea7e,type:_0x39fa73}of _0x5f2d6c){try{const _0x278eed=await this[_0x2c3978(0x1c3)](_0x3dea7e,_0x39fa73);if(_0x278eed)_0x5207f7=!![];}catch{this[_0x2c3978(0x100)][_0x2c3978(0x19d)](_0x3dea7e+'\x00'+_0x39fa73,{'env':_0x3dea7e,'type':_0x39fa73}),_0x5207f7=!![];}}if(_0x5207f7||this['_pending']['size']>0x0)this[_0x2c3978(0x136)]();}finally{this[_0x2c3978(0xc3)]=![];}}async[_0x2ac451(0x1c3)](_0x5b679e,_0x3a7d6b){const _0x1e99ec=_0x2ac451,_0x418868=await this[_0x1e99ec(0x24e)][_0x1e99ec(0x21c)](_0x5b679e),_0x3d3189=_0x5b679e+'\x00'+_0x3a7d6b;!this[_0x1e99ec(0x156)]['has'](_0x3d3189)&&(!this[_0x1e99ec(0x16b)][_0x1e99ec(0xc4)](_0x5b679e)&&(_0x418868[_0x1e99ec(0x109)](),this[_0x1e99ec(0x16b)][_0x1e99ec(0x19d)](_0x5b679e,_0x418868[_0x1e99ec(0x271)]()||0x0)),this[_0x1e99ec(0x156)]['set'](_0x3d3189,this['_baselines'][_0x1e99ec(0x159)](_0x5b679e)));const _0x2a84f0=this[_0x1e99ec(0x156)][_0x1e99ec(0x159)](_0x3d3189),_0x494f8d=_0x418868[_0x1e99ec(0x271)](_0x3a7d6b)||0x0;if(_0x494f8d<=_0x2a84f0)return![];const _0x1fcf79=_0x2a84f0+this[_0x1e99ec(0xa7)],_0x3dc575=Math['min'](_0x494f8d,_0x1fcf79),_0x1e60f7=_0x300d81[_0x1e99ec(0xad)]?_0x300d81[_0x1e99ec(0x2b1)]():0x0,_0x32acd3=Array['from'](_0x418868['getChanges'](_0x3a7d6b,_0x2a84f0+0x1,_0x3dc575));let _0x4651a2=_0x2a84f0;for(const _0x951b1d of _0x32acd3){const {clock:_0x85e9f8,key:_0x182ff6,action:_0x246959,origin:_0x53a003}=_0x951b1d;if(_0x85e9f8>_0x4651a2)_0x4651a2=_0x85e9f8;if(_0x182ff6==null)continue;if(this['_pendingLocal'][_0x1e99ec(0xc4)](this[_0x1e99ec(0x13d)](_0x5b679e,_0x3a7d6b,_0x182ff6,_0x85e9f8)))continue;if(!this[_0x1e99ec(0x219)](_0x5b679e,_0x3a7d6b,_0x182ff6,_0x85e9f8))continue;let _0xdca0ba,_0x173d4d;if(_0x246959===_0x31679b[_0x1e99ec(0xe6)])_0xdca0ba=_0x1e99ec(0x2cc),_0x173d4d=null;else{const _0xa6a7bf=_0x418868[_0x1e99ec(0x159)](_0x3a7d6b,_0x182ff6);_0xa6a7bf==null?(_0xdca0ba='remove',_0x173d4d=null):(_0xdca0ba=_0x1e99ec(0x244),_0x173d4d=_0xa6a7bf);}this[_0x1e99ec(0x1c6)]('change',{'env':_0x5b679e,'type':_0x3a7d6b,'key':_0x182ff6,'op':_0xdca0ba,'clock':_0x85e9f8,'origin':_0x53a003,'value':_0x173d4d});}if(_0x300d81[_0x1e99ec(0xad)])_0x300d81[_0x1e99ec(0x29c)](_0x1e99ec(0x192)+_0x5b679e+':'+_0x3a7d6b,_0x300d81['now']()-_0x1e60f7,'n='+_0x32acd3[_0x1e99ec(0x125)]);return this[_0x1e99ec(0x156)][_0x1e99ec(0x19d)](_0x3d3189,Math[_0x1e99ec(0x230)](_0x4651a2,_0x3dc575)),_0x418868['getClock'](_0x3a7d6b)>_0x3dc575;}[_0x2ac451(0x25a)](){const _0x2372c6=_0x2ac451;return{'started':this[_0x2372c6(0xeb)],'quantum':this[_0x2372c6(0xa7)],'flushDebounce':this['_flushDebounce'],'cursors':Object[_0x2372c6(0x26b)]([...this[_0x2372c6(0x156)][_0x2372c6(0x27f)]()][_0x2372c6(0x2bf)](([_0x375809,_0x41e53d])=>[_0x375809[_0x2372c6(0x1ac)]('\x00',':'),_0x41e53d])),'pending':this[_0x2372c6(0x100)]['size'],'seen':this[_0x2372c6(0xfa)][_0x2372c6(0x296)]};}}return _0x1fd4b9['CHANGEFEED_QUANTUM']=_0x76eaf3,okdbChangefeed={'OKDBChangefeed':_0x1fd4b9},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x57dda3=_0x498b9d;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x50f497=require$$1$1,_0x5568cf=require$$1,{EVENTS:_0x5b452a}=requireOkdbEnums(),_0x5e17d7=require$$0$3,{slotKey:_0x2e7a7f}=requireOkdbProcessRegistry(),_0x6b02ee=Number(process.env.OKDB_CLUSTER_RESPAWN_BACKOFF_MS)||0xfa,_0x3185bb=0xfa0,_0x530163=0x5,_0x360c9c=0x2710,_0x213543=0xbb8,_0x3ed24a=0x7d0,_0x35bd43='__okdbCluster',_0x50b055='ephemeral',_0x25b9ae=_0x57dda3(0xbb),_0x4d97f8=_0x57dda3(0x254),_0x809370=[_0x5b452a[_0x57dda3(0x204)],_0x5b452a[_0x57dda3(0x127)],_0x5b452a[_0x57dda3(0x18b)],_0x5b452a['FTS_RESET'],_0x5b452a['INDEX_PROGRESS'],_0x5b452a[_0x57dda3(0x270)],_0x5b452a[_0x57dda3(0x22a)],_0x5b452a[_0x57dda3(0x158)],_0x57dda3(0x1f8),_0x57dda3(0x173),_0x57dda3(0x151),_0x57dda3(0x26e),_0x57dda3(0xc9),_0x57dda3(0x154)],_0x57295f=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0,_0x588b7f=0x64;function _0x4d6e65(_0x3e5366){const _0x2ba519=_0x57dda3;if(!_0x3e5366)return _0x2ba519(0xb4);const _0x5bd43b=(_0x3e5366[_0x2ba519(0x27b)]||[])[_0x2ba519(0x2bf)](_0x1e17ae=>[_0x1e17ae[_0x2ba519(0x17c)],_0x1e17ae['id'],_0x1e17ae['mode'],_0x1e17ae[_0x2ba519(0x1aa)],!!_0x1e17ae[_0x2ba519(0x2e8)],!!_0x1e17ae[_0x2ba519(0x17f)],!!_0x1e17ae['claimGated'],_0x1e17ae[_0x2ba519(0x21d)]?.[_0x2ba519(0x299)]??null,_0x1e17ae['error']?String(_0x1e17ae[_0x2ba519(0x1a6)]?.[_0x2ba519(0x15b)]??_0x1e17ae[_0x2ba519(0x1a6)]):null]);return JSON[_0x2ba519(0x11d)]([!!_0x3e5366[_0x2ba519(0x1fb)],_0x5bd43b]);}function _0x3bc41d({workers:_0x4650b0,makeOkdb:_0x24bfb8,port:_0x31585c,primaryOkdb:_0x526fc6,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0xdbe06d=_0x57dda3;if(_0x50f497[_0xdbe06d(0x1e5)])return childEntry&&_0x50f497[_0xdbe06d(0x1ee)]({'exec':_0x5568cf[_0xdbe06d(0x2a7)](__dirname,_0xdbe06d(0x14a)),'args':[],'execArgv':((()=>{const _0x393a5b=_0xdbe06d,_0x1f2908=[];for(let _0x19f3ad=0x0;_0x19f3ad<process['execArgv'][_0x393a5b(0x125)];_0x19f3ad++){const _0x5d1eb2=process[_0x393a5b(0x18c)][_0x19f3ad];if(_0x5d1eb2['startsWith']('--test')||_0x5d1eb2[_0x393a5b(0x2a4)](_0x393a5b(0x1fc))||_0x5d1eb2[_0x393a5b(0x2a4)]('--inspect'))continue;if(_0x5d1eb2==='-e'||_0x5d1eb2===_0x393a5b(0xc8)||_0x5d1eb2==='-p'||_0x5d1eb2===_0x393a5b(0x134)){_0x19f3ad++;continue;}_0x1f2908['push'](_0x5d1eb2);}return _0x1f2908;})())}),_0x5a36ad({'workers':_0x4650b0,'port':_0x31585c,'primaryOkdb':_0x526fc6,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x31585c});return _0x25e525({'makeOkdb':_0x24bfb8,'port':_0x31585c});}function _0x5a36ad({workers:_0x2b121f,port:_0x5afd9d,primaryOkdb:_0x8ed0fe,workerEnv:_0x212712,workerRole:_0x96a3cc,listenAddr:_0x33bf51}){const _0x151fb7=_0x57dda3,_0x166a99=new Map(),_0x25dff8=new Map();let _0x243248=![];const _0x261405=_0x3b21e2=>_0x3b21e2?.['__okdbSlot'],_0x43da4f=_0x38e72d=>{const _0x2748c5=_0x37d7,_0x1941a2=_0x50f497[_0x2748c5(0xe9)]({...process.env,..._0x212712||{},'OKDB_CLUSTER_SLOT':String(_0x38e72d)});return _0x1941a2[_0x2748c5(0x185)]=_0x38e72d,_0x166a99['set'](_0x1941a2[_0x2748c5(0x139)][_0x2748c5(0x299)],{'worker':_0x1941a2,'startedAt':Date[_0x2748c5(0x2b1)](),'slot':_0x38e72d}),_0x1941a2['on'](_0x2748c5(0x1a6),_0x557cdf=>{const _0x2f41bc=_0x2748c5;console[_0x2f41bc(0xbb)](_0x2f41bc(0x248)+_0x1941a2['process']['pid']+'\x20ipc\x20error:\x20'+(_0x557cdf?.[_0x2f41bc(0x15b)]??_0x557cdf));}),_0x1941a2['on'](_0x2748c5(0x1a7),()=>_0x12ac0c()),_0x1941a2;},_0x1c88ac=_0x55acfc=>{const _0x3cf58d=_0x37d7;for(const {worker:_0x3ab3ab}of _0x166a99['values']()){if(_0x3ab3ab[_0x3cf58d(0x2ac)]()||!_0x3ab3ab['isConnected']())continue;try{_0x3ab3ab[_0x3cf58d(0x1b2)](_0x55acfc);}catch{}}};_0x8ed0fe?.[_0x151fb7(0x188)]?.({'kind':_0x151fb7(0xcc),'listenAddr':_0x33bf51})[_0x151fb7(0x208)](()=>{}),_0x8ed0fe?.['processes']?.[_0x151fb7(0x1b6)]?.({'workersConfigured':_0x2b121f});const _0x555e6d={'engines':!![],'processors':!![],'compaction':!![],..._0x96a3cc,'http':!![]},_0x12ac0c=()=>{const _0x101717=_0x151fb7,_0x82c266=_0x8ed0fe?.[_0x101717(0xc5)];if(!_0x82c266||!_0x82c266['_isWriter'])return;const _0x1ed6af=_0x82c266[_0x101717(0x1c1)];for(const {worker:_0x20c927,startedAt:_0x26e4ac,slot:_0x5b5b39,stats:_0x1f9ea4,processing:_0x4b0bd7}of _0x166a99[_0x101717(0x1ed)]()){if(_0x20c927['isDead']())continue;const _0x5a810b=_0x82c266['hasDesired']?.()&&_0x82c266[_0x101717(0x12c)]('slot',_0x97bf9d(_0x5b5b39))?.[_0x101717(0xd0)]===!![];_0x82c266[_0x101717(0x22b)]({'pid':_0x20c927[_0x101717(0x139)]['pid'],'startedAt':_0x26e4ac,'kind':_0x101717(0x268),'supervisorKey':_0x1ed6af,'slot':_0x5b5b39,'slotKey':_0x97bf9d(_0x5b5b39),'role':_0x555e6d,'listenAddr':_0x33bf51,'lifecycle':_0x5a810b?_0x101717(0xba):_0x101717(0x29b),'processing':_0x4b0bd7??null,'stats':_0x1f9ea4??null})[_0x101717(0x208)](()=>{});}},_0x97bf9d=_0x194cce=>_0x2e7a7f('cluster:'+_0x5afd9d,_0x194cce),_0x2b079b=_0x2bf54f=>{const _0x3a0421=_0x151fb7,_0x5c47d4=_0x8ed0fe?.[_0x3a0421(0xc5)];if(!_0x5c47d4?.[_0x3a0421(0x238)]?.())return![];return _0x5c47d4[_0x3a0421(0x12c)](_0x3a0421(0x193),_0x97bf9d(_0x2bf54f))?.[_0x3a0421(0xd0)]===!![];};for(let _0x2b7e8a=0x0;_0x2b7e8a<_0x2b121f;_0x2b7e8a++){const _0x465380=_0x2b079b(_0x2b7e8a);_0x25dff8['set'](_0x2b7e8a,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x465380,'respawnTimer':null}),_0x465380?console['log']('[okdb-cluster]\x20slot='+_0x2b7e8a+_0x151fb7(0x228)):_0x43da4f(_0x2b7e8a);}const _0x5b159b=()=>{const _0x2e70eb=_0x151fb7,_0x2e972=_0x8ed0fe?.[_0x2e70eb(0xc5)];if(!_0x2e972?.['_isWriter']||!_0x2e972[_0x2e70eb(0x238)]?.())return;for(const [_0x1bee7e,_0x33de74]of _0x25dff8[_0x2e70eb(0x27f)]()){const _0x5692cd=_0x2e972[_0x2e70eb(0x12c)](_0x2e70eb(0x193),_0x97bf9d(_0x1bee7e)),_0x553991=_0x5692cd?.[_0x2e70eb(0xd0)]===!![],_0x3a9662=_0x5692cd?.[_0x2e70eb(0x195)]===!![];if(_0x553991&&!_0x33de74[_0x2e70eb(0x202)]){_0x33de74[_0x2e70eb(0x202)]=!![];_0x33de74[_0x2e70eb(0xb1)]&&(clearTimeout(_0x33de74[_0x2e70eb(0xb1)]),_0x33de74[_0x2e70eb(0xb1)]=null);for(const {worker:_0x4b85fd}of _0x166a99[_0x2e70eb(0x1ed)]()){if(_0x261405(_0x4b85fd)!==_0x1bee7e||_0x4b85fd[_0x2e70eb(0x2ac)]())continue;try{if(_0x3a9662)_0x4b85fd[_0x2e70eb(0x139)][_0x2e70eb(0x195)](_0x2e70eb(0x251));else _0x4b85fd[_0x2e70eb(0x220)]()&&_0x4b85fd[_0x2e70eb(0xbe)]();}catch{}}console['log'](_0x2e70eb(0x223)+(_0x3a9662?_0x2e70eb(0x161):'decommissioned')+_0x2e70eb(0x2c9)+_0x1bee7e+_0x2e70eb(0x255));}else{if(!_0x553991&&_0x33de74[_0x2e70eb(0x202)]&&_0x5692cd){_0x33de74[_0x2e70eb(0x202)]=![],_0x33de74[_0x2e70eb(0x27e)]=[],_0x33de74[_0x2e70eb(0x2a8)]=0x0;const _0x16fc9a=[..._0x166a99['values']()]['some'](({worker:_0x563184})=>_0x261405(_0x563184)===_0x1bee7e&&!_0x563184[_0x2e70eb(0x2ac)]());!_0x16fc9a&&!_0x243248&&(_0x43da4f(_0x1bee7e),console['log']('[okdb-cluster]\x20recommissioned\x20worker\x20slot='+_0x1bee7e));}}}},_0x57b9ed=()=>{try{_0x5b159b();}catch{}};_0x8ed0fe?.[_0x151fb7(0x292)]?.['on']?.(_0x5b452a['SYSTEM_PROC'],_0x57b9ed);const _0xc1870b=[];if(_0x8ed0fe?.['events']?.['on'])for(const _0x304203 of _0x809370){const _0xd9138=_0x588501=>{_0x1c88ac({[_0x35bd43]:_0x50b055,'event':_0x304203,'data':_0x588501??{}});};_0x8ed0fe['events']['on'](_0x304203,_0xd9138),_0xc1870b[_0x151fb7(0x2c5)]({'event':_0x304203,'handler':_0xd9138});}const _0x1731d0=setInterval(()=>{_0x5b159b(),_0x12ac0c();},_0x57295f);_0x1731d0[_0x151fb7(0x27c)]?.();const _0x4c9e14=(_0x16f131,_0x5dc367)=>{const _0x1067f6=_0x151fb7;if(!_0x5dc367||typeof _0x5dc367!==_0x1067f6(0x1af)||_0x5dc367[_0x35bd43]!==_0x25b9ae)return;if(!_0x8ed0fe?.['log']?.['ingest'])return;const _0x1cc933=_0x5dc367[_0x1067f6(0x231)]||{};_0x8ed0fe[_0x1067f6(0xbb)]['ingest']({..._0x1cc933,'msg':'[w'+_0x5dc367[_0x1067f6(0x193)]+']\x20'+(_0x1cc933[_0x1067f6(0x1b4)]??''),'meta':{..._0x1cc933[_0x1067f6(0x2bb)]||{},'worker':_0x5dc367['slot'],'workerPid':_0x5dc367[_0x1067f6(0x299)]}});};_0x50f497['on'](_0x151fb7(0x15b),_0x4c9e14);const _0x4f98bb=(_0x407efc,_0x486b68)=>{const _0x7e6951=_0x151fb7;if(!_0x486b68||typeof _0x486b68!=='object'||_0x486b68[_0x35bd43]!==_0x4d97f8)return;const _0xf61018=_0x166a99[_0x7e6951(0x159)](_0x407efc['process'][_0x7e6951(0x299)]);if(_0xf61018){_0xf61018[_0x7e6951(0x254)]={..._0x486b68[_0x7e6951(0x254)],'at':Date['now']()};if(_0x486b68[_0x7e6951(0x1da)]!==undefined){const _0x1a21da=_0x4d6e65(_0x486b68['processing']);_0x1a21da!==_0xf61018[_0x7e6951(0x123)]&&(_0xf61018['processingSig']=_0x1a21da,_0x56bca7()),_0xf61018['processing']=_0x486b68['processing'];}}};let _0x3439dd=null;const _0x56bca7=()=>{if(_0x3439dd||_0x243248)return;_0x3439dd=setTimeout(()=>{_0x3439dd=null;if(!_0x243248)_0x12ac0c();},_0x588b7f),_0x3439dd['unref']?.();};_0x50f497['on'](_0x151fb7(0x15b),_0x4f98bb),_0x50f497['on'](_0x151fb7(0x2b4),(_0x24aafe,_0x1c4833,_0x16bd3a)=>{const _0x8271cd=_0x151fb7,_0x464ce0=_0x24aafe[_0x8271cd(0x139)]['pid'],_0x8cbfff=_0x261405(_0x24aafe),_0xec60c5=_0x166a99[_0x8271cd(0x159)](_0x464ce0);if(_0xec60c5&&_0x8ed0fe?.[_0x8271cd(0xc5)])_0x8ed0fe[_0x8271cd(0xc5)]['removeNode'](_0x464ce0+':'+_0xec60c5[_0x8271cd(0x23d)])['catch'](()=>{});_0x166a99[_0x8271cd(0x12b)](_0x464ce0),console[_0x8271cd(0xbb)](_0x8271cd(0x248)+_0x464ce0+_0x8271cd(0x2c4)+(_0x8cbfff??'?')+_0x8271cd(0x212)+(_0x8271cd(0x29a)+_0x1c4833+_0x8271cd(0x20d)+(_0x16bd3a??_0x8271cd(0xac))+_0x8271cd(0x104)+_0x166a99[_0x8271cd(0x296)]+_0x8271cd(0x175))),_0x12ac0c();if(_0x243248||_0x8cbfff==null)return;const _0x2f83d2=_0x25dff8[_0x8271cd(0x159)](_0x8cbfff);if(!_0x2f83d2||_0x2f83d2['dead'])return;const _0xd8df91=Date[_0x8271cd(0x2b1)]();_0x2f83d2[_0x8271cd(0x27e)][_0x8271cd(0x2c5)](_0xd8df91),_0x2f83d2[_0x8271cd(0x27e)]=_0x2f83d2['deaths'][_0x8271cd(0x116)](_0x578c78=>_0xd8df91-_0x578c78<=_0x360c9c);if(_0x2f83d2[_0x8271cd(0x27e)][_0x8271cd(0x125)]>=_0x530163){_0x2f83d2[_0x8271cd(0x202)]=!![],console[_0x8271cd(0x1a6)](_0x8271cd(0x101)+_0x8cbfff+_0x8271cd(0x1ca)+_0x2f83d2['deaths'][_0x8271cd(0x125)]+_0x8271cd(0x2d9)+(_0x360c9c+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x166a99['size']+'\x20worker(s)\x20still\x20serving'));return;}_0x2f83d2[_0x8271cd(0x2a8)]++;const _0x5793db=Math[_0x8271cd(0xdd)](_0x3185bb,_0x6b02ee*0x2**(_0x2f83d2['consecutiveFailures']-0x1));console[_0x8271cd(0xbb)](_0x8271cd(0xea)+_0x8cbfff+'\x20in\x20'+_0x5793db+_0x8271cd(0x289)+_0x2f83d2[_0x8271cd(0x2a8)]+')'),_0x2f83d2[_0x8271cd(0xb1)]=setTimeout(()=>{const _0x1ba6bc=_0x8271cd;_0x2f83d2['respawnTimer']=null;if(_0x243248||_0x2f83d2['dead'])return;const _0x41d0f9=_0x43da4f(_0x8cbfff);_0x41d0f9[_0x1ba6bc(0x2b5)](_0x1ba6bc(0xa8),()=>{const _0x3fdfbf=_0x1ba6bc;if(_0x25dff8[_0x3fdfbf(0x159)](_0x8cbfff)===_0x2f83d2)_0x2f83d2['consecutiveFailures']=0x0;});},_0x5793db),_0x2f83d2['respawnTimer'][_0x8271cd(0x27c)]?.();});const _0x2969a8=[..._0x166a99[_0x151fb7(0x261)]()];console[_0x151fb7(0xbb)]('[okdb-cluster]\x20primary\x20pid='+process['pid']+_0x151fb7(0xbd)+_0x2b121f+_0x151fb7(0x17d)+_0x5afd9d+':\x20'+('['+_0x2969a8[_0x151fb7(0x2a7)](',\x20')+']'));const _0x11db2d={'_isClusterController':!![],'port':_0x5afd9d,'primaryOkdb':_0x8ed0fe??null,'status'(){const _0x5b68f2=_0x151fb7;return{'clustered':!![],'primaryPid':process['pid'],'port':_0x5afd9d,'primaryRole':_0x8ed0fe?.[_0x5b68f2(0x21a)]??null,'processorPid':null,'supervisorPid':process[_0x5b68f2(0x299)],'workers':[..._0x166a99[_0x5b68f2(0x1ed)]()][_0x5b68f2(0x2bf)](({worker:_0x4644a5})=>({'pid':_0x4644a5[_0x5b68f2(0x139)][_0x5b68f2(0x299)],'id':_0x4644a5['id'],'dead':_0x4644a5[_0x5b68f2(0x2ac)]()}))};},async 'close'(){const _0xf4fede=_0x151fb7;_0x243248=!![];for(const _0x3c28a4 of _0x25dff8[_0xf4fede(0x1ed)]()){_0x3c28a4['dead']=!![],_0x3c28a4['respawnTimer']&&(clearTimeout(_0x3c28a4[_0xf4fede(0xb1)]),_0x3c28a4[_0xf4fede(0xb1)]=null);}clearInterval(_0x1731d0);_0x3439dd&&(clearTimeout(_0x3439dd),_0x3439dd=null);_0x50f497[_0xf4fede(0x232)](_0xf4fede(0x15b),_0x4c9e14),_0x50f497[_0xf4fede(0x232)]('message',_0x4f98bb),_0x8ed0fe?.[_0xf4fede(0x292)]?.['off']?.(_0x5b452a['SYSTEM_PROC'],_0x57b9ed);if(_0x8ed0fe?.[_0xf4fede(0x292)]?.['off'])for(const {event:_0x5a0882,handler:_0x4266de}of _0xc1870b){try{_0x8ed0fe[_0xf4fede(0x292)][_0xf4fede(0x232)](_0x5a0882,_0x4266de);}catch{}}_0xc1870b['length']=0x0;const _0x2b9794=[..._0x166a99[_0xf4fede(0x1ed)]()][_0xf4fede(0x2bf)](({worker:_0x6c8f98})=>_0x6c8f98);if(_0x2b9794['length']===0x0)return;await Promise[_0xf4fede(0x1a2)](_0x2b9794[_0xf4fede(0x2bf)](_0xf4dbd5=>new Promise(_0x55d4a8=>{const _0x18bbf4=_0xf4fede;if(_0xf4dbd5[_0x18bbf4(0x2ac)]()){_0x55d4a8();return;}let _0x510fd0=![];const _0x419931=()=>{if(_0x510fd0)return;_0x510fd0=!![];if(_0x1f22b6)clearTimeout(_0x1f22b6);_0x55d4a8();};_0xf4dbd5[_0x18bbf4(0x2b5)](_0x18bbf4(0x2b4),_0x419931);const _0x1f22b6=setTimeout(()=>{const _0x5db424=_0x18bbf4;try{_0xf4dbd5[_0x5db424(0x139)][_0x5db424(0x195)]();}catch{}},_0x213543+0x1f4);_0x1f22b6[_0x18bbf4(0x27c)]?.();try{_0xf4dbd5[_0x18bbf4(0xbe)]();}catch{try{_0xf4dbd5[_0x18bbf4(0x139)][_0x18bbf4(0x195)]();}catch{}}})));}};return _0x11db2d;}async function _0x25e525({makeOkdb:_0x5b51ec,port:_0x261d3b}){const _0x285fb7=_0x57dda3,_0x48a9f7=await _0x5b51ec();return _0x2d31da(_0x48a9f7),_0x48a9f7[_0x285fb7(0x14c)][_0x285fb7(0x177)](_0x261d3b);}function _0x2d31da(_0x596e99){const _0x56be22=_0x57dda3;if(!_0x596e99||_0x596e99[_0x56be22(0x18a)])return;_0x596e99[_0x56be22(0x18a)]=!![];try{const {OKDBChangefeed:_0x3cd7f8}=requireOkdbChangefeed(),_0x3d8db8=_0x596e99['_adminRelay'];if(_0x3d8db8&&typeof _0x3d8db8[_0x56be22(0x203)]==='function'){const _0x2e9995=new _0x3cd7f8(_0x596e99);_0x2e9995[_0x56be22(0x2a3)](),_0x3d8db8[_0x56be22(0x203)](_0x2e9995),_0x596e99[_0x56be22(0x293)]=_0x2e9995;}}catch(_0x4875f2){_0x596e99[_0x56be22(0xbb)]?.[_0x56be22(0xb2)]?.(_0x56be22(0xcf)+(_0x4875f2?.['message']??_0x4875f2),{'feature':'cluster'});}const _0x364ed6=_0x2292fd=>{const _0x37676c=_0x56be22;if(!_0x2292fd||typeof _0x2292fd!==_0x37676c(0x1af)||_0x2292fd[_0x35bd43]==null)return;if(_0x2292fd[_0x35bd43]===_0x50b055)try{_0x596e99[_0x37676c(0x13a)]?.['pushEphemeral']?.(_0x2292fd[_0x37676c(0x2ab)],_0x2292fd[_0x37676c(0x2a9)]);}catch{}};process['on']('message',_0x364ed6),_0x596e99[_0x56be22(0x218)]=_0x364ed6;{let _0x4bca13=process[_0x56be22(0x17a)](),_0xc9dca9=Date[_0x56be22(0x2b1)]();const _0x4594e0=()=>{const _0x2aa143=_0x56be22;if(typeof process[_0x2aa143(0x1b2)]!==_0x2aa143(0x194)||!process['connected'])return;const _0xb16ab3=Date[_0x2aa143(0x2b1)](),_0x44608a=process[_0x2aa143(0x17a)](),_0x55dcb6=(_0xb16ab3-_0xc9dca9)*0x3e8,_0x2c87b0=_0x44608a['user']-_0x4bca13[_0x2aa143(0xcb)]+(_0x44608a[_0x2aa143(0x2a2)]-_0x4bca13[_0x2aa143(0x2a2)]),_0x1e8f74=_0x55dcb6>0x0?Math[_0x2aa143(0xdd)](0x64,Math[_0x2aa143(0x258)](_0x2c87b0/(_0x55dcb6*(_0x5e17d7[_0x2aa143(0x1fd)]()[_0x2aa143(0x125)]||0x1))*0x64)):0x0;_0x4bca13=_0x44608a,_0xc9dca9=_0xb16ab3;const _0x4dd867=process['memoryUsage']();let _0x516fb7=null;try{_0x516fb7=_0x596e99[_0x2aa143(0x21a)]?.['processors']?_0x596e99[_0x2aa143(0xc5)]?.[_0x2aa143(0x16f)]?.()??null:null;}catch{}try{process[_0x2aa143(0x1b2)]({[_0x35bd43]:_0x4d97f8,'stats':{'rss':_0x4dd867[_0x2aa143(0x256)],'heapUsed':_0x4dd867[_0x2aa143(0x26d)],'heapTotal':_0x4dd867[_0x2aa143(0x272)],'external':_0x4dd867[_0x2aa143(0x23a)],'cpuPct':_0x1e8f74,'cpuWindowMs':Math[_0x2aa143(0x258)](_0x55dcb6/0x3e8)||null},'processing':_0x516fb7});}catch{}},_0x31078a=Math['max'](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x4f6cbc=setInterval(_0x4594e0,_0x31078a);_0x4f6cbc[_0x56be22(0x27c)]?.(),_0x4594e0();for(const _0x32f540 of['processor:paused',_0x56be22(0xc9)]){_0x596e99[_0x56be22(0x292)]?.['on']?.(_0x32f540,()=>{try{_0x4594e0();}catch{}});}}let _0x401cfb=![];const _0x3a74c0=async _0x5514a2=>{const _0x3e119a=_0x56be22;if(_0x401cfb)return;_0x401cfb=!![];const _0x49e965=setTimeout(()=>process[_0x3e119a(0x2b4)](_0x5514a2),_0x213543);_0x49e965[_0x3e119a(0x27c)]?.();try{await _0x596e99['close']?.();}catch{}process[_0x3e119a(0x2b4)](_0x5514a2);};process['on'](_0x56be22(0xbe),()=>_0x3a74c0(0x0));if(process[_0x56be22(0x1b2)]&&!process[_0x56be22(0x239)])_0x3a74c0(0x0);if(process[_0x56be22(0x1c2)]!==_0x56be22(0x17e)){const _0x395b31=setInterval(()=>{const _0x1c2384=_0x56be22;if(process[_0x1c2384(0x2cf)]===0x1)_0x3a74c0(0x0);},_0x3ed24a);_0x395b31[_0x56be22(0x27c)]?.(),_0x596e99[_0x56be22(0x27a)]=_0x395b31;}}return okdbCluster={'runClustered':_0x3bc41d,'attachWorkerCluster':_0x2d31da},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x4bffed=require$$0$5,{attachWorkerCluster:_0x235047}=requireOkdbCluster();async function _0x5ce18f(){const _0x544c10=_0x37d7,_0x5156cf=process.env.OKDB_HTTP_CHILD;if(!_0x5156cf)throw new Error(_0x544c10(0x25c));const {rootPath:_0x2faefc,port:_0x6e9096,options:options={},logLevel:logLevel='info'}=JSON[_0x544c10(0x10a)](_0x5156cf);if(!_0x2faefc||!_0x6e9096)throw new Error(_0x544c10(0x181));const _0x3026ae=new _0x4bffed(_0x2faefc,{...options,'engines':![],'processors':![],'compaction':![]});_0x3026ae[_0x544c10(0xbb)][_0x544c10(0xbf)]?.();const _0x4089e5=process.env.OKDB_CLUSTER_SLOT??'?',_0x4a478a={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x51accb=_0x4a478a[logLevel]??_0x4a478a[_0x544c10(0xb5)];_0x3026ae[_0x544c10(0xbb)][_0x544c10(0x165)](_0x3ef544=>{const _0x3838fc=_0x544c10;if((_0x4a478a[_0x3ef544[_0x3838fc(0x2a5)]]??0x1)<_0x51accb)return;try{process[_0x3838fc(0x1b2)]?.({'__okdbCluster':'log','slot':_0x4089e5,'pid':process['pid'],'entry':_0x3ef544});}catch{}}),await _0x3026ae[_0x544c10(0x22d)](),_0x235047(_0x3026ae),await _0x3026ae[_0x544c10(0x14c)][_0x544c10(0x177)](_0x6e9096);}return _0x5ce18f()['catch'](_0x1b7918=>{const _0x2bb65d=_0x37d7;try{process[_0x2bb65d(0x1b2)]?.({'__okdbCluster':'log','slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process['pid'],'entry':{'level':_0x2bb65d(0x1a6),'msg':_0x2bb65d(0xee)+(_0x1b7918?.['message']??_0x1b7918)}});}catch{}process[_0x2bb65d(0x2b4)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module[_0x498b9d(0x10f)]=okdbHttpWorkerChild;
|
|
1
|
+
'use strict';const _0x1383d2=_0x2fe0;(function(_0x5c2333,_0x5f14c6){const _0x1a5f2e=_0x2fe0,_0x195a68=_0x5c2333();while(!![]){try{const _0x4938e0=parseInt(_0x1a5f2e(0x2ad))/0x1*(-parseInt(_0x1a5f2e(0x11f))/0x2)+-parseInt(_0x1a5f2e(0x16e))/0x3+-parseInt(_0x1a5f2e(0x112))/0x4*(-parseInt(_0x1a5f2e(0x9d))/0x5)+parseInt(_0x1a5f2e(0x2a3))/0x6+parseInt(_0x1a5f2e(0x202))/0x7+-parseInt(_0x1a5f2e(0x22f))/0x8+parseInt(_0x1a5f2e(0x152))/0x9;if(_0x4938e0===_0x5f14c6)break;else _0x195a68['push'](_0x195a68['shift']());}catch(_0x49e39f){_0x195a68['push'](_0x195a68['shift']());}}}(_0x2b1c,0x45fc3));var require$$0$5=require(_0x1383d2(0x27c)),require$$1$1=require(_0x1383d2(0x87)),require$$1=require(_0x1383d2(0x189)),require$$0$3=require('os'),require$$2=require(_0x1383d2(0x133)),require$$0=require(_0x1383d2(0xd0)),require$$0$2=require(_0x1383d2(0x1b5)),require$$0$1=require('fs'),require$$0$4=require(_0x1383d2(0x2b4));function _0x2b1c(){const _0x3886ba=['loop-lag','warn','[okdb-cluster]\x20respawning\x20worker\x20slot=','start','inflightAgesMs','cli','_baselines','all','selfKey','oldestPendingMs','_getType','instanceId','isHeld','closed','disable','reap','getDesired','env','txn:rollback','hard-killed','SYSTEM_STOPPED','parse','_wantDb','nodesView','_admissionTimer','halted','writerStatus','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','close','committed','okdb-diag.','replace','processor','mkdirSync','_participate','indexOf','attachFeed','transaction','commit','fanout','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','dropIndex','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','isEnabled','FTS_RESET','_clusterWorkerAttached','true','FTS_DROP','draining','ttl:set','license:activated','extend','processor:retry','\x20drainAge=','49148UahuFx','2.6.2','list','rowKey','_publishNow','_openEnvLazy','listen','_heartbeatTimer','busy','_enqueuedAt','isConnected','setupPrimary','functions','2jkHriA','fork','_servingEngines','win32','listAll','maxMs','filter','listDesired','type:drop','_isWriter','\x20statusEnv=','_key','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','starting','dedupeMax','unref','msg','keys','external','FTS_REGISTERED','crypto','publishChildRow','addSupervisedChild','SYSTEM_POKE','treeView','code','beforeWrite','force','queue-worker','stringify','\x20died\x20','\x20pid=','raw-remove','processes','async','_lastCpuAt','_log','stderr','slotKey','has','caps','ITEM_UPDATE','openDB','\x20(slot=','hasDesired','compaction','uptime','_db','resetReadTxn','_refreshDesiredSnapshot','--test','4324842vmHtdJ','lifecycle','dropping','license:added','type','_wantDbHandle','_sandbox','view','_startAdmission','_rowKey','call','allSettled','change','--print','system:env_release','getCmd','processKey','SWAP','_durs','INDEX_RESET','http\x20worker\x20child\x20failed:\x20','_processStartedAt','stopHeartbeat','_putRowAsync','_handleInProcess','removeSync','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','_buildProcessingFacet','525708JeWVWM','heartbeatMs','ms\x20busy=','fn-runner','processor:resumed','waiting','send','_removeRowAsync','index:drop','_rootDb','_cmd','trim','_lockDb','engines','_children','sandbox','_inflight','_outstanding','exports','ORPHAN\x20(env-closed\x20write)','registerFts','_done','reportThreadStats','setOwnMeta','_migrateVocab','bus:type_drop','processingSig','path','envsOpen','isDead','events','_onItem','heapUsed','_startHeartbeat','detachConsole','\x20oldestPendingMs=','prependListener','_buildChildRow','dropFts','label','__vocab/version','_released','_nestedTotal','license:invalid','exit','_ownMeta','index:registered','_acquiredAt','system:stopped','listNodes','once','getProcess','_writer','write','getChanges','ephemeral','ttlMs','memoryUsage','size','field:resolver_registered','error:\x20','node','emit','cpuWindowMs','processor:paused','slice','dropType','count','some','message','processors','perf_hooks','withPoolHold','okdb-lock:\x20env\x20closed','_held','mean','okdb-writer:\x20env\x20closing\x20—\x20retry',')\x20exited\x20','_onProcEvent','\x20sync','threads','repeat','_highWater','processor:progress','_seen','getRange','children','options','primary','item:update','ttl:expired','max','claims','_pendingLocal','deaths','isActive','enabled','isWorker','setSchema','INDEX_REGISTERED','cluster:','_selfKey','_startedAt','building','disconnect','bumpCmd','_nodeDb','_quantum','dropSchema','getClock','setTtl','resetIndex','_buckets','removeNode','_systemEnv','_publishFailWarned','system:drain','_timer','standalone','_lastCpuPct','\x20writer{depth=','entry','index:progress','killable','index:reset','_desired',');\x20','freeze','hasOwnProperty','startedAt','--inspect','ITEM_REMOVE','supervisorKey','note','schema:drop','SIGKILL','_onPending','registry\x20publish\x20failing:\x20','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','drain','confirm','add','level','log','_heldTotal','listenAddr','find','.log','2143169gkLOnY','_changefeed','transactionSync','CHANGEFEED_QUANTUM','default','registerType','_closed','process\x20','_draining','ms\x20max=','entries','\x0a\x20\x20\x20\x20\x20\x20','_hbTimer','off','view:progress','_cursors','_lockDbOf','noteListenAddr','unclaimed','host','_clusterOnMessage','stopping','fts:drop','_lastPublishAt','_isStale','_singletonLock','single','system:clock_change','running','state','toISOString','value','_nestedWarned','_drain','user','toFixed','_rawDb','nodeKey','_admissionStarted','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','reduce','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','_windowCbs','\x0a===\x20OKDB_DIAG\x20','randomUUID','3084888GdvEOo','_lastCpuUsage','stopped','online','flushLmdb','kind','_nodeDead','string','liveThreadStats','ensureType','env:opened','holder','_lock','processor:error','_kind','_buildOwnRow','test','creating','next','http-server','length','raw-put','maxExtra','shift','setDesired','_instanceId','SYSTEM_PROC','onWindow','bus:proc','ms\x20p99=','cursorKey','_threadStats','_wantDbOf','error','unhandledRejection','decommission','singletonClaims','_markSeen','_listenAddr','_role','rss','firstTs','\x20ipc\x20error:\x20','stack','consecutiveFailures','ms\x20on\x20env=','_desiredOverlay','none','workers','\x20forked\x20','_started','process','childTransaction','delete','http','commitsPerSec','catch','participate','paused','bus:env_release','system:bus_state_change','\x20\x20(no\x20env\x20draining)','putSync','embedded','now','started','migrations','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','object','~lock','heldBy','clusterStatusView','processor:ready','workersConfigured','version','heapTotal','respawnTimer','./okdb','dead','set','kill','ready','fromEntries','_adminRelay','sort','ITEM_CREATE','_drainOne','updatedAt','_nodeDbFor','stop','_onPoke','decommissioned','race','abs','system:poke','min','_ensureDesired','remove','_holderDead','status','_dedupeMax','_onTick','_statusEnv','_committed','uncaughtException','ESRCH','appendFileSync','data','removeSupervisedChild','MAX_POOL_HOLDS','pid','sync','join','execArgv','REMOVE','resetting','1862454kXvedg','commitP99Ms','role','get','map','enable','_heartbeatInFlight','updateSupervisedChildStats','VIEW_PROGRESS','_scheduleFlush','261895SVnmTq','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.','_assertUsable','\x20===','_sampleOwnStats','feed:','processorId','node:events','dumpedAt','ref:violation_resolved','clear','parkedNow','[okdb-cluster]\x20','okdb','startsWith',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','deregisterSelf','expiresAt','[okdb-cluster]\x20worker\x20pid=','_collectWriterFacet','_dedupeKey','startHeartbeat','_handlePoke','claimGated','recordWrite','registerIndex','_isReader','ENV_CLOSING_RETRY','_putRowSync','hostname','cpuPct','\x20\x20env=','\x20@\x20','env:removed','system','register','__esModule','_supervisorKey','cluster','info','seq','null','cpus','item:pending','then','reset','_lastCpuWindowMs','_envs','put','_maybePublish','load','fts:reset','ttl:clear','floor','ms\x20env=','runtimeProcessesView','ms\x20(attempt\x20','__okdbCluster','\x20\x20#','pushEphemeral','5JJJTCm','round','stats','_bpWaiters','name','schema:set','number','type:registered','release','_collectSingletonClaims','decommissioning','_caps','afterWrite','ppid','values','\x20HTTP\x20server(s)\x20on\x20port\x20','\x20│\x20','open','\x20(durable\x20desired-state)','_groupByProcess','push','_coordinator','_report','meta','\x20times\x20in\x20',',\x20signal=','connected','fast','slot','_handlePending','_bpParkedTotal','~processes','namespace','acquiredAt','cpuUsage','ingest','clearThreadStats','quantum','--eval','putNode','processingStatusView','_pending','_flushTimer','includes','\x20in\x20','_versionSkewWarned','split','closing','resolve','percentile','processing','node:perf_hooks','function',':want','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','mode','_onStop','_enableChangelog','_flushDebounce','item:create','depth','node/','_singletonLocks'];_0x2b1c=function(){return _0x3886ba;};return _0x2b1c();}function getDefaultExportFromCjs(_0x74629d){const _0x30cfe9=_0x1383d2;return _0x74629d&&_0x74629d[_0x30cfe9(0x85)]&&Object['prototype'][_0x30cfe9(0x1ee)][_0x30cfe9(0x15c)](_0x74629d,_0x30cfe9(0x206))?_0x74629d[_0x30cfe9(0x206)]:_0x74629d;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x5d88c7=_0x1383d2;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x2d7f3e={'PUT':_0x5d88c7(0x91),'REMOVE':_0x5d88c7(0x290),'INDEX_DROP':_0x5d88c7(0x105),'INDEX_REGISTER':_0x5d88c7(0x2c6),'INDEX_RESET':_0x5d88c7(0x1dd),'TYPE_REGISTER':_0x5d88c7(0x207),'TYPE_DROP':_0x5d88c7(0x1b0),'FTS_REGISTER':_0x5d88c7(0x182),'FTS_DROP':_0x5d88c7(0x194),'FTS_RESET':'resetFts','SCHEMA_SET':_0x5d88c7(0x1d0),'SCHEMA_DROP':_0x5d88c7(0x1da),'TTL_SET':_0x5d88c7(0x1dc),'TTL_CLEAR':'clearTtl'},_0x347b32={'SYSTEM_READY':'system:ready','FIELD_RESOLVER_REGISTERED':_0x5d88c7(0x1a9),'SYSTEM_STOPPED':_0x5d88c7(0x19e),'SYSTEM_CLOCK_CHANGE':_0x5d88c7(0x21d),'SYSTEM_POKE':_0x5d88c7(0x28d),'SYSTEM_DRAIN':_0x5d88c7(0x1e2),'SYSTEM_TYPE_DROP':'system:type_drop','SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x5d88c7(0x26b),'ITEM_CREATE':_0x5d88c7(0xd8),'ITEM_UPDATE':_0x5d88c7(0x1c7),'ITEM_REMOVE':'item:remove','ITEM_PENDING':_0x5d88c7(0x8c),'INDEX_RESET':_0x5d88c7(0x1ea),'INDEX_READY':'index:ready','INDEX_PROGRESS':_0x5d88c7(0x1e8),'VIEW_PROGRESS':_0x5d88c7(0x210),'INDEX_DROP':_0x5d88c7(0x176),'INDEX_REGISTERED':_0x5d88c7(0x19c),'FTS_REGISTERED':'fts:registered','FTS_DROP':_0x5d88c7(0x218),'FTS_RESET':_0x5d88c7(0x94),'SCHEMA_SET':_0x5d88c7(0xa2),'SCHEMA_DROP':_0x5d88c7(0x1f4),'UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':'unique:violation_resolved','REF_VIOLATION':'ref:violation','REF_VIOLATION_RESOLVED':_0x5d88c7(0x2b6),'SYNC_APPLY':'sync:apply','TXN_START':'txn:start','TXN_END':'txn:end','TXN_ROLLBACK':_0x5d88c7(0xee),'TYPE_REGISTERED':_0x5d88c7(0xa4),'TYPE_DROP':_0x5d88c7(0x127),'ENV_OPENED':_0x5d88c7(0x239),'ENV_REMOVED':_0x5d88c7(0x82),'SYSTEM_ENV_RELEASE':_0x5d88c7(0x160),'TTL_EXPIRED':_0x5d88c7(0x1c8),'TTL_SET':_0x5d88c7(0x10d),'TTL_CLEAR':_0x5d88c7(0x95),'LICENSE_INVALID':_0x5d88c7(0x199),'LICENSE_ADDED':_0x5d88c7(0x155),'LICENSE_ACTIVATED':_0x5d88c7(0x10e),'LICENSE_REMOVED':'license:removed'},_0x56a2d1={'CREATING':_0x5d88c7(0x240),'RESETTING':_0x5d88c7(0x2a2),'READY':_0x5d88c7(0x280),'DROPPING':_0x5d88c7(0x154),'WAITING':_0x5d88c7(0x173),'ERROR':_0x5d88c7(0x250)},_0x49596c={'CREATED':'created','STARTING':_0x5d88c7(0x12c),'STARTED':_0x5d88c7(0x270),'STOPPING':_0x5d88c7(0x217),'STOPPED':'stopped'},_0x4b2fad={'CREATING':_0x5d88c7(0x240),'READY':'ready','HALTED':_0x5d88c7(0xf5),'STOPPED':_0x5d88c7(0x231),'RESETTING':_0x5d88c7(0x2a2)},_0x4c6601=Object[_0x5d88c7(0x1ed)]({'POKE':'bus:poke','DRAIN':'bus:drain','TYPE_DROP':_0x5d88c7(0x187),'PROC':_0x5d88c7(0x24b),'ENV_RELEASE':_0x5d88c7(0x26a)});return okdbEnums={'BUS_EVENTS':_0x4c6601,'CHANGE_ACTIONS':_0x2d7f3e,'EVENTS':_0x347b32,'INDEX_STATE':_0x56a2d1,'OKDB_STATE':_0x49596c,'VIEW_STATE':_0x4b2fad},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x4f3b4a=_0x1383d2;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x2a1a5e,performance:_0x308b75}=require$$0,_0x1fe9fa=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x4f3b4a(0x10a),_0x5d2b2c=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x2e4b6f=process.env.OKDB_LOOP_LAG_ALL==='1',_0x465edc=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x4a99b0{constructor(){const _0x13a8cf=_0x4f3b4a;this[_0x13a8cf(0x1ce)]=_0x1fe9fa,this[_0x13a8cf(0x1de)]=new Map(),this['_h']=null,this['_timer']=null,this[_0x13a8cf(0x261)]=![],this[_0x13a8cf(0x143)]=(_0x1c7d7b,_0x2b8928)=>process[_0x13a8cf(0x144)][_0x13a8cf(0x1a3)](_0x1c7d7b+(_0x2b8928?'\x20'+JSON[_0x13a8cf(0x13c)](_0x2b8928):'')+'\x0a');}[_0x4f3b4a(0x26f)](){const _0x55a994=_0x4f3b4a;return _0x308b75[_0x55a994(0x26f)]();}['setLogger'](_0x1eae66){const _0x5064b4=_0x4f3b4a;if(typeof _0x1eae66==='function')this[_0x5064b4(0x143)]=_0x1eae66;}['note'](_0x4e9183,_0x38aa14,_0x331b1d){const _0x3b30bb=_0x4f3b4a;if(!this[_0x3b30bb(0x1ce)])return;let _0x1e8e71=this['_buckets'][_0x3b30bb(0x2a6)](_0x4e9183);!_0x1e8e71&&(_0x1e8e71={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this['_buckets'][_0x3b30bb(0x27e)](_0x4e9183,_0x1e8e71)),_0x1e8e71['ms']+=_0x38aa14,_0x1e8e71[_0x3b30bb(0x1b1)]+=0x1,_0x38aa14>_0x1e8e71[_0x3b30bb(0x124)]&&(_0x1e8e71[_0x3b30bb(0x124)]=_0x38aa14,_0x1e8e71['maxExtra']=_0x331b1d||'');}[_0x4f3b4a(0xdf)](_0x536abe){const _0x39b458=_0x4f3b4a;if(!this['enabled']||this[_0x39b458(0x261)])return;this[_0x39b458(0x261)]=!![];if(_0x536abe)this['_log']=_0x536abe;this['_h']=_0x2a1a5e({'resolution':0xa}),this['_h'][_0x39b458(0x2a8)](),this[_0x39b458(0x1e3)]=setInterval(()=>this[_0x39b458(0xb3)](),_0x5d2b2c);if(this[_0x39b458(0x1e3)]['unref'])this[_0x39b458(0x1e3)][_0x39b458(0x12e)]();}[_0x4f3b4a(0x24a)](_0x5ce18a){const _0xb86f69=_0x4f3b4a;if(!this['_windowCbs'])this[_0xb86f69(0x22c)]=new Set();this[_0xb86f69(0x22c)][_0xb86f69(0x1fb)](_0x5ce18a);if(!this[_0xb86f69(0x261)])this[_0xb86f69(0x15a)]();}['offWindow'](_0x5340ca){const _0x3099c7=_0x4f3b4a;this['_windowCbs']?.[_0x3099c7(0x264)](_0x5340ca);}[_0x4f3b4a(0x15a)](){const _0xf4cabe=_0x4f3b4a;if(this[_0xf4cabe(0x228)])return;this[_0xf4cabe(0x228)]=!![];!this['_h']&&(this['_h']=_0x2a1a5e({'resolution':0xa}),this['_h'][_0xf4cabe(0x2a8)]());const _0x1b468b=_0x5d2b2c;this[_0xf4cabe(0xf4)]=setInterval(()=>{const _0x2761f2=_0xf4cabe,_0x477886=this['_h'];if(!_0x477886)return;const _0x4bfa40=_0x477886[_0x2761f2(0xce)](0x63)/0xf4240,_0x5d2970=_0x477886[_0x2761f2(0x1c9)]/0xf4240,_0x48f5c4=_0x477886[_0x2761f2(0x1b9)]/0xf4240;_0x477886[_0x2761f2(0x8e)]();if(this[_0x2761f2(0x22c)])for(const _0x5872a2 of this['_windowCbs']){try{_0x5872a2({'p99Ms':_0x4bfa40,'maxMs':_0x5d2970,'meanMs':_0x48f5c4,'reportMs':_0x1b468b});}catch{}}},_0x1b468b);if(this[_0xf4cabe(0xf4)][_0xf4cabe(0x12e)])this['_admissionTimer'][_0xf4cabe(0x12e)]();}[_0x4f3b4a(0xb3)](){const _0x33f508=_0x4f3b4a,_0xd7706e=this['_h'],_0x80922=_0xd7706e['max']/0xf4240,_0x2d7fbc=_0xd7706e[_0x33f508(0xce)](0x63)/0xf4240,_0x3fb118=_0xd7706e[_0x33f508(0x1b9)]/0xf4240;_0xd7706e[_0x33f508(0x8e)]();const _0x5e3ac0=[...this[_0x33f508(0x1de)][_0x33f508(0x20c)]()][_0x33f508(0x2a7)](([_0x46108f,_0x19d38a])=>({'label':_0x46108f,..._0x19d38a}))[_0x33f508(0x283)]((_0x31d0fe,_0x44fc28)=>_0x44fc28['ms']-_0x31d0fe['ms'])[_0x33f508(0x1af)](0x0,0x8);this[_0x33f508(0x1de)][_0x33f508(0x2b7)]();const _0x38cad4=_0x5e3ac0[_0x33f508(0x22a)]((_0x4f4e21,_0xc1c24e)=>_0x4f4e21+_0xc1c24e['ms'],0x0),_0x3ddbd1=_0x5e3ac0[_0x33f508(0x2a7)](_0x5ed4ef=>_0x5ed4ef[_0x33f508(0x195)]+'='+_0x5ed4ef['ms']['toFixed'](0x0)+'ms/'+_0x5ed4ef[_0x33f508(0x1b1)]+(_0x5ed4ef[_0x33f508(0x124)]>0x5?'(worst\x20'+_0x5ed4ef[_0x33f508(0x124)][_0x33f508(0x225)](0x0)+'ms'+(_0x5ed4ef[_0x33f508(0x245)]?'\x20'+_0x5ed4ef[_0x33f508(0x245)]:'')+')':''));(_0x2e4b6f||_0x80922>=_0x465edc)&&this[_0x33f508(0x143)]('loop-lag\x20'+_0x5d2b2c+_0x33f508(0x20b)+_0x80922['toFixed'](0x0)+_0x33f508(0x24c)+_0x2d7fbc[_0x33f508(0x225)](0x0)+'ms\x20mean='+_0x3fb118['toFixed'](0x0)+_0x33f508(0x170)+_0x38cad4[_0x33f508(0x225)](0x0)+'ms'+(_0x3ddbd1[_0x33f508(0x243)]?_0x33f508(0xad)+_0x3ddbd1['join']('\x20\x20'):''),{'feature':_0x33f508(0xdc)});if(this[_0x33f508(0x22c)])for(const _0x168a43 of this[_0x33f508(0x22c)]){try{_0x168a43({'p99Ms':_0x2d7fbc,'maxMs':_0x80922,'meanMs':_0x3fb118,'reportMs':_0x5d2b2c});}catch{}}}[_0x4f3b4a(0x288)](){const _0x23b1af=_0x4f3b4a;if(this['_timer'])clearInterval(this[_0x23b1af(0x1e3)]);if(this['_h'])this['_h'][_0x23b1af(0xea)]();this[_0x23b1af(0x1e3)]=null,this['_h']=null,this['_started']=![];}}const _0x29cf64=new _0x4a99b0();if(_0x29cf64[_0x4f3b4a(0x1ce)])_0x29cf64[_0x4f3b4a(0xdf)]();return okdbLoopMonitor={'LOOP':_0x29cf64},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x5ac596=require$$0$1,_0x3f7c27=require$$1;let _0x423ae4,_0x3192a2,_0x12e525,_0x28d84c,_0x21637f,_0x122150,_0x58cab3,_0x2d7bdb=![];const _0x1bcbb3=new Set();let _0x3fd984=null;const _0x129f96=new Map();function _0xf2004b(){const _0x1f642f=_0x2fe0;if(_0x423ae4!==undefined)return _0x423ae4;_0x423ae4=process.env.OKDB_DIAG==='1';if(!_0x423ae4)return![];_0x3192a2=process.env.OKDB_DIAG_STACK==='1',_0x28d84c=Math[_0x1f642f(0x1c9)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x12e525=new Array(_0x28d84c),_0x21637f=0x0,_0x122150=0x0,_0x58cab3=process.env.OKDB_DIAG_DIR||null;if(_0x58cab3)try{_0x5ac596[_0x1f642f(0xfd)](_0x58cab3,{'recursive':!![]});}catch{}return!![];}function _0x146b36(){return _0x423ae4===undefined?_0xf2004b():_0x423ae4;}function _0x201422(_0xb08516,_0x132eb8){const _0x4f079d=_0x2fe0;if(_0x423ae4===undefined?!_0xf2004b():!_0x423ae4)return;let _0x3b4a83;if(_0x3192a2){const _0xc75c3f=new Error()['stack']||'';_0x3b4a83=_0xc75c3f[_0x4f079d(0xcb)]('\x0a')[_0x4f079d(0x1af)](0x3)['map'](_0x382fa4=>_0x382fa4[_0x4f079d(0x179)]())['filter'](Boolean)[_0x4f079d(0x1af)](0x0,0x8);}_0x12e525[_0x21637f]={'seq':_0x122150++,'t':Date['now'](),'env':_0xb08516,'kind':_0x132eb8||_0x4f079d(0x102),'stack':_0x3b4a83},_0x21637f=(_0x21637f+0x1)%_0x28d84c;}function _0x449182(_0x2ecd98){const _0x4828a4=[];for(let _0x56fc2b=0x0;_0x56fc2b<_0x28d84c;_0x56fc2b++){const _0x33a7c8=_0x12e525[(_0x21637f-0x1-_0x56fc2b+_0x28d84c*0x2)%_0x28d84c];if(!_0x33a7c8)continue;_0x4828a4['push'](_0x33a7c8);if(_0x4828a4['length']>=_0x2ecd98)break;}return _0x4828a4;}function _0x5b9e39(_0x2d153f){const _0x58a04b=_0x2fe0;try{process[_0x58a04b(0x144)]['write'](_0x2d153f+'\x0a');}catch{}if(_0x58cab3)try{_0x5ac596[_0x58a04b(0x299)](_0x3f7c27[_0x58a04b(0x29f)](_0x58cab3,_0x58a04b(0xfa)+process[_0x58a04b(0x29d)]+_0x58a04b(0x201)),_0x2d153f+'\x0a');}catch{}}function _0x13aad0(_0x669a6d){const _0x34b18d=_0x2fe0,_0x27b1b4=_0x449182(_0x669a6d);if(!_0x27b1b4[_0x34b18d(0x243)])return _0x34b18d(0x16c);const _0x674cf0=Date[_0x34b18d(0x26f)]();return _0x27b1b4['map'](_0x119efa=>{const _0x526c1d=_0x34b18d,_0x2ed6eb=_0x526c1d(0x9b)+_0x119efa[_0x526c1d(0x89)]+'\x20-'+(_0x674cf0-_0x119efa['t'])+_0x526c1d(0x97)+_0x119efa[_0x526c1d(0xed)]+'\x20'+_0x119efa[_0x526c1d(0x234)];return _0x119efa[_0x526c1d(0x25a)]&&_0x119efa['stack'][_0x526c1d(0x243)]?_0x2ed6eb+'\x0a\x20\x20\x20\x20\x20\x20'+_0x119efa[_0x526c1d(0x25a)][_0x526c1d(0x29f)](_0x526c1d(0x20d)):_0x2ed6eb;})[_0x34b18d(0x29f)]('\x0a');}function _0x29f1d4(_0x370f55,_0x5b4890){const _0x55b60c=_0x2fe0,_0x2555cb=_0x55b60c(0x22d)+_0x370f55+'\x20@\x20'+new Date()[_0x55b60c(0x220)]()+_0x55b60c(0x13e)+process[_0x55b60c(0x29d)]+_0x55b60c(0x2b0),_0x30df5e=[_0x2555cb,_0x55b60c(0x1aa)+(_0x5b4890&&_0x5b4890[_0x55b60c(0x25a)]?_0x5b4890[_0x55b60c(0x25a)][_0x55b60c(0xcb)]('\x0a')[0x0]:_0x5b4890),'recent\x20writes\x20(newest\x20first)'+(_0x3192a2?'':_0x55b60c(0x12b))+':',_0x13aad0(0x18),_0x3ea26b(),'='[_0x55b60c(0x1bf)](_0x2555cb['length']-0x1)];_0x5b9e39(_0x30df5e[_0x55b60c(0x29f)]('\x0a'));}function _0x2e7a6f(_0x3aa846){const _0x186c72=_0x2fe0;if(!_0x146b36())return;const _0x10a0f4=String(_0x3aa846&&_0x3aa846[_0x186c72(0x1b3)]||_0x3aa846||''),_0x151668=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x186c72(0x23f)](_0x10a0f4);_0x29f1d4(_0x151668?_0x186c72(0x181):_0x186c72(0x297),_0x3aa846);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x151668)return;try{console[_0x186c72(0x250)](_0x3aa846&&_0x3aa846['stack']?_0x3aa846[_0x186c72(0x25a)]:_0x3aa846);}catch{}process[_0x186c72(0x19a)](0x1);}function _0x5ea280(_0x2a01e1){const _0x724238=_0x2fe0;if(!_0x146b36())return;const _0x46384a=String(_0x2a01e1&&_0x2a01e1['message']||_0x2a01e1||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x724238(0x23f)](_0x46384a)&&_0x29f1d4(_0x724238(0xf7),_0x2a01e1);}function _0x3ea26b(){const _0x1492d6=_0x2fe0,_0x219486=['drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):'];let _0x5960f4=![];for(const _0x3c9e11 of _0x1bcbb3){const _0x29ba69=_0x3c9e11&&_0x3c9e11['_envs'];if(!_0x29ba69)continue;for(const [_0x313402,_0x15bdb7]of _0x29ba69){const _0x2a1829=_0x15bdb7&&_0x15bdb7[_0x1492d6(0xb2)]&&_0x15bdb7[_0x1492d6(0xb2)][_0x1492d6(0x159)];if(!_0x2a1829)continue;let _0x461cc2,_0x1fda55;try{_0x461cc2=Atomics[_0x1492d6(0x93)](_0x2a1829,0x0),_0x1fda55=Atomics[_0x1492d6(0x93)](_0x2a1829,0x1);}catch{continue;}if(_0x461cc2===0x0)continue;_0x5960f4=!![];const _0x5b6f83=_0x461cc2>0x0?_0x1492d6(0x163):'copy',_0x4ab0ce=Date[_0x1492d6(0x26f)]()-Math[_0x1492d6(0x28c)](_0x461cc2)*0x3e8,_0x11751b=((()=>{const _0x320057=_0x1492d6;try{return _0x15bdb7['_writer']&&_0x15bdb7['_writer'][_0x320057(0x292)]?_0x15bdb7[_0x320057(0x1a2)]['status']():null;}catch{return null;}})());_0x219486['push'](_0x1492d6(0x80)+_0x313402+'\x20phase='+_0x5b6f83+_0x1492d6(0x111)+_0x4ab0ce+'ms\x20activeWriters='+_0x1fda55+(_0x11751b?_0x1492d6(0x1e6)+_0x11751b[_0x1492d6(0xd9)]+_0x1492d6(0x191)+_0x11751b['oldestPendingMs']+'\x20parkedNow='+_0x11751b[_0x1492d6(0x2b8)]+'}':''));}}if(!_0x5960f4)_0x219486[_0x1492d6(0xb1)](_0x1492d6(0x26c));return _0x219486[_0x1492d6(0x29f)]('\x0a');}function _0x449e5c(){const _0x5d724f=_0x2fe0;if(!_0x146b36())return;const _0x2957bb=Math[_0x5d724f(0x1c9)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x57c5fd=Date[_0x5d724f(0x26f)]();for(const _0x3550cd of _0x1bcbb3){const _0x23ce32=_0x3550cd&&_0x3550cd['_envs'];if(!_0x23ce32)continue;for(const [_0x2485c2,_0x1688c7]of _0x23ce32){const _0x214ac7=_0x1688c7&&_0x1688c7[_0x5d724f(0xb2)]&&_0x1688c7['_coordinator'][_0x5d724f(0x159)];if(!_0x214ac7)continue;let _0x3c9903;try{_0x3c9903=Atomics[_0x5d724f(0x93)](_0x214ac7,0x0);}catch{continue;}const _0x37d6e7=_0x3550cd[_0x5d724f(0x189)]+'|'+_0x2485c2;if(_0x3c9903<=0x0){_0x129f96[_0x5d724f(0x264)](_0x37d6e7);continue;}const _0x4538be=_0x57c5fd-_0x3c9903*0x3e8,_0x526716=_0x129f96[_0x5d724f(0x2a6)](_0x37d6e7);if(_0x4538be<_0x2957bb)continue;if(_0x526716&&_0x57c5fd-_0x526716[_0x5d724f(0x2b5)]<_0x2957bb)continue;_0x129f96[_0x5d724f(0x27e)](_0x37d6e7,{'firstTs':_0x526716?_0x526716[_0x5d724f(0x258)]:_0x3c9903,'dumpedAt':_0x57c5fd});const _0x3ca92d=_0x5d724f(0x1f8)+_0x4538be+_0x5d724f(0x25c)+_0x2485c2+_0x5d724f(0x81)+new Date()[_0x5d724f(0x220)]()+_0x5d724f(0x13e)+process['pid']+_0x5d724f(0x2b0);_0x5b9e39([_0x3ca92d,_0x3ea26b(),'='[_0x5d724f(0x1bf)](_0x3ca92d['length']-0x1)]['join']('\x0a'));}}}function _0x14b00f(){const _0x47abd7=_0x2fe0;if(!_0x146b36()||_0x2d7bdb)return;_0x2d7bdb=!![],process[_0x47abd7(0x192)](_0x47abd7(0x297),_0x2e7a6f),process[_0x47abd7(0x192)](_0x47abd7(0x251),_0x5ea280);const _0x189803=Math[_0x47abd7(0x1c9)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x3fd984=setInterval(_0x449e5c,_0x189803);if(_0x3fd984[_0x47abd7(0x12e)])_0x3fd984[_0x47abd7(0x12e)]();}function _0x498b39(_0x242fa7){const _0x4a2093=_0x2fe0;if(!_0x146b36()||!_0x242fa7)return;_0x1bcbb3[_0x4a2093(0x1fb)](_0x242fa7),_0x14b00f();}function _0x19d505(_0x2c2b68){_0x1bcbb3['delete'](_0x2c2b68);}function _0x21e1b9(){if(!_0x146b36())return{'enabled':![],'hint':'set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)'};return{'enabled':!![],'stackCapture':!!_0x3192a2,'recentWrites':_0x449182(0x10),'drain':_0x3ea26b()};}return okdbDiag={'isEnabled':_0x146b36,'recordWrite':_0x201422,'installDiag':_0x14b00f,'registerOkdb':_0x498b39,'unregisterOkdb':_0x19d505,'snapshot':_0x21e1b9},okdbDiag;}function _0x2fe0(_0xc0320e,_0x2fce2b){_0xc0320e=_0xc0320e-0x7c;const _0x2b1c79=_0x2b1c();let _0x2fe061=_0x2b1c79[_0xc0320e];return _0x2fe061;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x1cad83=_0x1383d2;if(hasRequiredOkdbWriter)return okdbWriter[_0x1cad83(0x180)];hasRequiredOkdbWriter=0x1;const {performance:_0xd2cf61}=require$$0$2,_0x23f70a=requireOkdbDiag(),_0x1b7eb3=process.env.OKDB_COMMIT_MODE===_0x1cad83(0x29e);class _0x587c12{constructor(_0x479ac1){const _0x21ea1c=_0x1cad83;this['env']=_0x479ac1,this[_0x21ea1c(0x17e)]=new Set(),this[_0x21ea1c(0x11b)]=new Map(),this[_0x21ea1c(0x296)]=0x0,this[_0x21ea1c(0x164)]=[],this['_done']=[],this[_0x21ea1c(0x1c0)]=Math['max'](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x21ea1c(0x17f)]=0x0,this[_0x21ea1c(0xa0)]=[],this['_bpParkedTotal']=0x0,this['_held']=null,this[_0x21ea1c(0x1fe)]=0x0,this[_0x21ea1c(0x198)]=0x0,this[_0x21ea1c(0x222)]=![];}async[_0x1cad83(0x101)](_0x3477da,_0x1f31e8,{admitted:admitted=![]}={}){const _0x4bbac6=_0x1cad83;if(_0x23f70a[_0x4bbac6(0x107)]())_0x23f70a[_0x4bbac6(0x2c5)](this['env']?.['name'],_0x1f31e8);if(this[_0x4bbac6(0x208)]){const _0x322321=new Error(_0x4bbac6(0x1ba));_0x322321[_0x4bbac6(0x138)]=_0x4bbac6(0x7c);throw _0x322321;}if(this['_highWater']>0x0){let _0x40f3f6=![];while(this[_0x4bbac6(0x17f)]>=this[_0x4bbac6(0x1c0)]&&!this[_0x4bbac6(0x208)]){!_0x40f3f6&&(_0x40f3f6=!![],this['_bpParkedTotal']++),await new Promise(_0x28296c=>this[_0x4bbac6(0xa0)]['push'](_0x28296c));}if(this[_0x4bbac6(0x208)]){const _0x36816e=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x36816e[_0x4bbac6(0x138)]=_0x4bbac6(0x7c);throw _0x36816e;}}this[_0x4bbac6(0x17f)]++;const _0x410451=admitted?null:this['env'][_0x4bbac6(0xb2)];for(;;){while(this[_0x4bbac6(0x1b8)])await this[_0x4bbac6(0x1b8)];if(_0x410451)try{await _0x410451[_0x4bbac6(0x139)]();}catch(_0x4d9346){this[_0x4bbac6(0x17f)]--;if(this[_0x4bbac6(0xa0)][_0x4bbac6(0x243)]&&this[_0x4bbac6(0x17f)]<this[_0x4bbac6(0x1c0)])this['_bpWaiters'][_0x4bbac6(0x246)]()();throw _0x4d9346;}if(!this[_0x4bbac6(0x1b8)])break;if(_0x410451)_0x410451[_0x4bbac6(0xa9)]();}if(this['_closed']){if(_0x410451)_0x410451[_0x4bbac6(0xa9)]();this['_outstanding']--;if(this[_0x4bbac6(0xa0)][_0x4bbac6(0x243)]&&this[_0x4bbac6(0x17f)]<this[_0x4bbac6(0x1c0)])this[_0x4bbac6(0xa0)][_0x4bbac6(0x246)]()();const _0x19a865=new Error(_0x4bbac6(0x1ba));_0x19a865[_0x4bbac6(0x138)]='ENV_CLOSING_RETRY';throw _0x19a865;}const _0x4597fe=_0xd2cf61[_0x4bbac6(0x26f)]();if(_0x1b7eb3)try{const _0x4171e4=this[_0x4bbac6(0xed)]['db'][_0x4bbac6(0x204)](_0x3477da);this[_0x4bbac6(0x296)]++;if(this[_0x4bbac6(0x164)][_0x4bbac6(0xb1)](_0xd2cf61[_0x4bbac6(0x26f)]()-_0x4597fe)>0x100)this[_0x4bbac6(0x164)]['shift']();if(this[_0x4bbac6(0x183)][_0x4bbac6(0xb1)](_0xd2cf61[_0x4bbac6(0x26f)]())>0x800)this[_0x4bbac6(0x183)][_0x4bbac6(0x246)]();return _0x4171e4;}finally{this[_0x4bbac6(0x17f)]--;if(this['_bpWaiters'][_0x4bbac6(0x243)]&&this['_outstanding']<this[_0x4bbac6(0x1c0)])this[_0x4bbac6(0xa0)][_0x4bbac6(0x246)]()();if(_0x410451)_0x410451[_0x4bbac6(0xa9)]();}let _0x3bb020=null;const _0x3b04e8=()=>{const _0x44f4fb=_0x4bbac6,_0x5bc8c7=_0x3477da();if(_0x5bc8c7&&typeof _0x5bc8c7[_0x44f4fb(0x8d)]==='function'&&!_0x3bb020){this['_heldTotal']++;let _0x165da5;const _0x580d36=new Promise(_0x272dde=>_0x165da5=_0x272dde);this['_held']=_0x580d36,_0x3bb020=()=>{if(this['_held']===_0x580d36)this['_held']=null;_0x165da5();};}return _0x5bc8c7;};let _0x12613e;try{_0x12613e=this[_0x4bbac6(0xed)]['db'][_0x4bbac6(0x263)](_0x3b04e8);}catch(_0x1cacde){_0x12613e=Promise['reject'](_0x1cacde);}(!_0x12613e||typeof _0x12613e['then']!=='function')&&(this['_nestedTotal']++,!this[_0x4bbac6(0x222)]&&(this[_0x4bbac6(0x222)]=!![],console[_0x4bbac6(0xdd)]('okdb-writer['+(this['env']?.[_0x4bbac6(0xa1)]??'?')+']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller')),_0x12613e=Promise[_0x4bbac6(0xcd)](_0x12613e));const _0x3f3d06=()=>{if(_0x3bb020)_0x3bb020();};_0x12613e[_0x4bbac6(0x8d)](_0x3f3d06,_0x3f3d06),this[_0x4bbac6(0x17e)][_0x4bbac6(0x1fb)](_0x12613e),this[_0x4bbac6(0x11b)][_0x4bbac6(0x27e)](_0x12613e,_0x4597fe);const _0x782c1d=()=>{const _0x515bcb=_0x4bbac6;this[_0x515bcb(0x17e)]['delete'](_0x12613e),this[_0x515bcb(0x11b)]['delete'](_0x12613e),this[_0x515bcb(0x296)]++,this[_0x515bcb(0x17f)]--;this['_bpWaiters'][_0x515bcb(0x243)]&&this[_0x515bcb(0x17f)]<this[_0x515bcb(0x1c0)]&&this['_bpWaiters'][_0x515bcb(0x246)]()();if(this[_0x515bcb(0x164)]['push'](_0xd2cf61[_0x515bcb(0x26f)]()-_0x4597fe)>0x100)this[_0x515bcb(0x164)][_0x515bcb(0x246)]();if(this['_done'][_0x515bcb(0xb1)](_0xd2cf61['now']())>0x800)this[_0x515bcb(0x183)]['shift']();};_0x12613e[_0x4bbac6(0x8d)](_0x782c1d,_0x782c1d);try{return await _0x12613e;}finally{if(_0x410451)_0x410451[_0x4bbac6(0xa9)]();}}[_0x1cad83(0x292)](){const _0x3eebb2=_0x1cad83,_0x321f6a=_0xd2cf61[_0x3eebb2(0x26f)]();let _0x11d0bc=0x0;for(const _0x48b3a3 of this[_0x3eebb2(0x11b)][_0x3eebb2(0xab)]()){const _0x1db7f9=_0x321f6a-_0x48b3a3;if(_0x1db7f9>_0x11d0bc)_0x11d0bc=_0x1db7f9;}let _0x4dbe5d=0x0;for(let _0x5353a7=this[_0x3eebb2(0x183)]['length']-0x1;_0x5353a7>=0x0;_0x5353a7--){if(_0x321f6a-this[_0x3eebb2(0x183)][_0x5353a7]>0x3e8)break;_0x4dbe5d++;}let _0x3d68f3=0x0;if(this[_0x3eebb2(0x164)]['length']){const _0x440cfa=[...this[_0x3eebb2(0x164)]][_0x3eebb2(0x283)]((_0x3a1c79,_0x268c50)=>_0x3a1c79-_0x268c50);_0x3d68f3=_0x440cfa[Math[_0x3eebb2(0x28e)](_0x440cfa[_0x3eebb2(0x243)]-0x1,Math[_0x3eebb2(0x96)](_0x440cfa['length']*0.99))];}return{'depth':this[_0x3eebb2(0x17e)][_0x3eebb2(0x1a8)],'oldestPendingMs':Math[_0x3eebb2(0x9e)](_0x11d0bc),'committed':this[_0x3eebb2(0x296)],'commitsPerSec':_0x4dbe5d,'commitP99Ms':Math[_0x3eebb2(0x9e)](_0x3d68f3),'parkedNow':this[_0x3eebb2(0xa0)]['length'],'parkedTotal':this[_0x3eebb2(0xbb)],'highWater':this['_highWater']};}[_0x1cad83(0xe0)](){const _0x340bbc=_0x1cad83,_0x443186=_0xd2cf61[_0x340bbc(0x26f)]();return[...this['_enqueuedAt'][_0x340bbc(0xab)]()][_0x340bbc(0x2a7)](_0x3d31c6=>Math[_0x340bbc(0x9e)](_0x443186-_0x3d31c6))[_0x340bbc(0x283)]((_0x3d3dca,_0x1c87ad)=>_0x1c87ad-_0x3d3dca);}['markClosed'](){const _0x56fea1=_0x1cad83;this['_closed']=!![];for(const _0xc5a57b of this[_0x56fea1(0xa0)]['splice'](0x0))_0xc5a57b();}async[_0x1cad83(0x1f9)](){const _0x44a7ad=_0x1cad83;let _0x505298=0x0;while(this['_inflight'][_0x44a7ad(0x1a8)]&&_0x505298++<0x3e8){await Promise[_0x44a7ad(0x15d)]([...this['_inflight']]);}}async['put'](_0x58b2a1,_0x2db002,_0x526f8f,_0x489d45){const _0x28bf2f=_0x1cad83;return this[_0x28bf2f(0x101)](()=>{const _0x38b308=_0x28bf2f;if(_0x489d45===undefined)_0x58b2a1[_0x38b308(0x26d)](_0x2db002,_0x526f8f);else _0x58b2a1[_0x38b308(0x26d)](_0x2db002,_0x526f8f,_0x489d45);},_0x28bf2f(0x244));}async[_0x1cad83(0x290)](_0x264d57,_0x5795ba){const _0x35e248=_0x1cad83;return this[_0x35e248(0x101)](()=>_0x264d57[_0x35e248(0x16b)](_0x5795ba),_0x35e248(0x13f));}}async function _0x2b4714(_0x4d40fa,_0x59a054){const _0x3f4810=_0x1cad83;if(_0x59a054==null)_0x59a054=Math[_0x3f4810(0x1c9)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x20200c=_0x4d40fa?.['flushed'];if(!_0x20200c||typeof _0x20200c[_0x3f4810(0x8d)]!==_0x3f4810(0xd1))return;await Promise[_0x3f4810(0x28b)]([Promise['resolve'](_0x20200c)[_0x3f4810(0x267)](()=>{}),new Promise(_0x4db935=>{const _0x431a55=_0x3f4810,_0x4d8ec7=setTimeout(_0x4db935,_0x59a054);if(_0x4d8ec7['unref'])_0x4d8ec7[_0x431a55(0x12e)]();})]);}catch{}}function _0x5974cc(_0x1b0aca){const _0x4fd484=_0x1cad83;if(_0x1b7eb3)return Promise[_0x4fd484(0xcd)]();const _0x1144c5=_0x1b0aca?.[_0x4fd484(0xf9)];return _0x1144c5&&typeof _0x1144c5[_0x4fd484(0x8d)]==='function'?_0x1144c5:Promise[_0x4fd484(0xcd)]();}const _0x27462c=Math[_0x1cad83(0x1c9)](0x1,Math['floor'](Number(process.env.UV_THREADPOOL_SIZE))||0x4),_0x187185=Math[_0x1cad83(0x1c9)](0x1,_0x27462c-0x2);let _0x21b5c3=0x0;const _0xdb11df=[];async function _0x3dd99f(_0x5705ff){const _0x54af2b=_0x1cad83;if(_0x21b5c3<_0x187185)_0x21b5c3++;else await new Promise(_0x3e4d4d=>_0xdb11df[_0x54af2b(0xb1)](_0x3e4d4d));try{return await _0x5705ff();}finally{const _0xe7ace9=_0xdb11df[_0x54af2b(0x246)]();if(_0xe7ace9)_0xe7ace9();else _0x21b5c3--;}}return okdbWriter[_0x1cad83(0x180)]=_0x587c12,okdbWriter['exports'][_0x1cad83(0x1b6)]=_0x3dd99f,okdbWriter[_0x1cad83(0x180)][_0x1cad83(0x29c)]=_0x187185,okdbWriter['exports'][_0x1cad83(0x233)]=_0x2b4714,okdbWriter[_0x1cad83(0x180)][_0x1cad83(0xf9)]=_0x5974cc,okdbWriter[_0x1cad83(0x180)]['SYNC_COMMITS']=_0x1b7eb3,okdbWriter['exports'];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x3202ed=_0x1383d2;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x4cbc8c=require$$0$3,{SYNC_COMMITS:_0x5687fd}=requireOkdbWriter(),_0x48ddc8=_0x3202ed(0x274);class _0x3431a6{constructor(_0x408933,_0x5a4957,_0x1f2515){const _0x53c249=_0x3202ed;this[_0x53c249(0x23b)]=_0x408933,this[_0x53c249(0x12a)]=_0x5a4957,this['_acquiredAt']=_0x1f2515,this[_0x53c249(0x197)]=![],this[_0x53c249(0x119)]=null,this['_heartbeatInFlight']=null;}[_0x3202ed(0xe8)](){const _0x37aa26=_0x3202ed;if(this[_0x37aa26(0x197)])return![];try{const _0x22cc76=this[_0x37aa26(0x23b)][_0x37aa26(0x14e)]()[_0x37aa26(0x2a6)](this['_key']);if(!_0x22cc76||_0x22cc76['acquiredAt']!==this[_0x37aa26(0x19d)])return![];const _0x4460c6=_0x22cc76['updatedAt']??_0x22cc76[_0x37aa26(0xbe)];if(_0x4460c6+_0x22cc76[_0x37aa26(0x1a6)]<Date[_0x37aa26(0x26f)]())return![];return!![];}catch{return!this[_0x37aa26(0x197)];}}[_0x3202ed(0x23a)](){const _0x79336f=_0x3202ed;if(this[_0x79336f(0x197)])return null;try{return this['_lock'][_0x79336f(0x14e)]()[_0x79336f(0x2a6)](this[_0x79336f(0x12a)])??null;}catch{return null;}}async[_0x3202ed(0x10f)](_0x4bd86f){const _0x1efb97=_0x3202ed;if(this['_released'])return;try{if(this[_0x1efb97(0x23b)][_0x1efb97(0x208)]())return;const _0x187afa=this['_lock']['_db']()[_0x1efb97(0x2a6)](this[_0x1efb97(0x12a)]);if(!_0x187afa||_0x187afa[_0x1efb97(0xbe)]!==this[_0x1efb97(0x19d)])return;if(_0x5687fd)this[_0x1efb97(0x23b)]['_db']()['putSync'](this[_0x1efb97(0x12a)],{..._0x187afa,'ttlMs':_0x187afa[_0x1efb97(0x1a6)]+_0x4bd86f});else await this[_0x1efb97(0x23b)][_0x1efb97(0x14e)]()[_0x1efb97(0x91)](this['_key'],{..._0x187afa,'ttlMs':_0x187afa[_0x1efb97(0x1a6)]+_0x4bd86f});}catch{}}async[_0x3202ed(0xa5)](){const _0x58df2e=_0x3202ed;if(this['_released'])return;if(this['_heartbeatInFlight'])try{await this[_0x58df2e(0x2a9)];}catch{}clearInterval(this[_0x58df2e(0x119)]),this[_0x58df2e(0x119)]=null,this[_0x58df2e(0x197)]=!![];try{if(this[_0x58df2e(0x23b)][_0x58df2e(0x208)]())return;const _0x534d52=this[_0x58df2e(0x23b)]['_db']()[_0x58df2e(0x2a6)](this['_key']);if(_0x534d52&&_0x534d52[_0x58df2e(0xbe)]===this[_0x58df2e(0x19d)]){if(_0x5687fd)this[_0x58df2e(0x23b)]['_db']()[_0x58df2e(0x16b)](this[_0x58df2e(0x12a)]);else await this[_0x58df2e(0x23b)][_0x58df2e(0x14e)]()[_0x58df2e(0x290)](this[_0x58df2e(0x12a)]);}}catch{}}[_0x3202ed(0x18f)](_0x22351e,_0x3a5623){const _0x563e8d=_0x3202ed,_0x3b2c8a=_0x3a5623??Math[_0x563e8d(0x96)](_0x22351e/0x3);this['_heartbeatTimer']=setInterval(()=>{const _0x51fdb8=_0x563e8d;if(this[_0x51fdb8(0x197)])return;this[_0x51fdb8(0x2a9)]=((async()=>{const _0x415243=_0x51fdb8;try{if(this['_lock'][_0x415243(0x208)]())return;const _0x34c80c=this[_0x415243(0x23b)]['_db']()['get'](this['_key']);if(!_0x34c80c||_0x34c80c[_0x415243(0xbe)]!==this[_0x415243(0x19d)]){this[_0x415243(0x197)]=!![],clearInterval(this[_0x415243(0x119)]),this['_heartbeatTimer']=null;return;}if(_0x5687fd)this['_lock']['_db']()[_0x415243(0x26d)](this[_0x415243(0x12a)],{..._0x34c80c,'updatedAt':Date[_0x415243(0x26f)]()});else await this[_0x415243(0x23b)][_0x415243(0x14e)]()[_0x415243(0x91)](this[_0x415243(0x12a)],{..._0x34c80c,'updatedAt':Date[_0x415243(0x26f)]()});}catch{}this[_0x415243(0x2a9)]=null;})());},_0x3b2c8a);if(this[_0x563e8d(0x119)]['unref'])this[_0x563e8d(0x119)][_0x563e8d(0x12e)]();}}class _0x312597{constructor(_0x4434d8,{namespace:_0x306af2,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x1e5b81=_0x3202ed;this['_rawDb']=_0x4434d8,this['namespace']=_0x306af2,this[_0x1e5b81(0x1a6)]=ttlMs,this[_0x1e5b81(0x16f)]=heartbeatMs,this[_0x1e5b81(0x17a)]=null;}[_0x3202ed(0x14e)](){const _0x3c0763=_0x3202ed;return this[_0x3c0763(0x2af)](),(!this[_0x3c0763(0x17a)]||this[_0x3c0763(0x212)]!==this['_rawDb'])&&(this['_lockDb']=this[_0x3c0763(0x226)]['openDB'](_0x48ddc8,{'dupSort':![]}),this[_0x3c0763(0x212)]=this[_0x3c0763(0x226)]),this[_0x3c0763(0x17a)];}[_0x3202ed(0xf2)](){const _0x19a85e=_0x3202ed;return this['_assertUsable'](),(!this['_wantDbHandle']||this['_wantDbOf']!==this[_0x19a85e(0x226)])&&(this[_0x19a85e(0x157)]=this[_0x19a85e(0x226)]['openDB'](_0x48ddc8+_0x19a85e(0xd2),{'dupSort':![]}),this[_0x19a85e(0x24f)]=this[_0x19a85e(0x226)]),this['_wantDbHandle'];}[_0x3202ed(0x208)](){const _0x59e983=_0x3202ed,_0x2b2c4d=this[_0x59e983(0x226)]?.[_0x59e983(0x292)];return _0x2b2c4d===_0x59e983(0xcc)||_0x2b2c4d===_0x59e983(0xe9);}[_0x3202ed(0x2af)](){const _0xd9709a=_0x3202ed;if(this[_0xd9709a(0x208)]())throw new Error(_0xd9709a(0x1b7));}[_0x3202ed(0x12a)](_0x10493d){const _0x27d9e6=_0x3202ed;return this[_0x27d9e6(0xbd)]+':'+_0x10493d;}['signalWant'](_0x47367d){const _0x1f9127=_0x3202ed;try{if(this[_0x1f9127(0x208)]())return;_0x5687fd?this[_0x1f9127(0xf2)]()[_0x1f9127(0x26d)](this[_0x1f9127(0x12a)](_0x47367d),Date[_0x1f9127(0x26f)]()):this['_wantDb']()[_0x1f9127(0x91)](this[_0x1f9127(0x12a)](_0x47367d),Date['now']())?.[_0x1f9127(0x267)]?.(()=>{});}catch{}}['isWanted'](_0x2ba853,_0x2dd0d2=0x3e8){const _0x5858e2=_0x3202ed;try{const _0x1ab23f=this['_wantDb']()['get'](this[_0x5858e2(0x12a)](_0x2ba853));return typeof _0x1ab23f===_0x5858e2(0xa3)&&Date[_0x5858e2(0x26f)]()-_0x1ab23f<_0x2dd0d2;}catch{return![];}}[_0x3202ed(0x21a)](_0x30ab70){const _0x47158f=_0x3202ed,_0x6f1c4=_0x30ab70['updatedAt']??_0x30ab70[_0x47158f(0xbe)];return _0x6f1c4+_0x30ab70[_0x47158f(0x1a6)]<Date[_0x47158f(0x26f)]();}static[_0x3202ed(0x291)](_0x374c6b){const _0x4e064f=_0x3202ed,_0x5510f3=_0x374c6b?.[_0x4e064f(0x23a)];if(!_0x5510f3||typeof _0x5510f3[_0x4e064f(0x29d)]!=='number')return![];if(_0x5510f3[_0x4e064f(0x7e)]!==_0x4cbc8c['hostname']())return![];if(_0x5510f3[_0x4e064f(0x29d)]===process['pid'])return![];try{return process[_0x4e064f(0x27f)](_0x5510f3[_0x4e064f(0x29d)],0x0),![];}catch(_0x4f5b8){return _0x4f5b8[_0x4e064f(0x138)]===_0x4e064f(0x298);}}async['tryAcquire'](_0x495ffc,_0x2b7d12={},_0x4a35d8={}){const _0x5f25d6=_0x3202ed,_0x33674c=this['_key'](_0x495ffc),_0x1a1914=_0x4a35d8[_0x5f25d6(0x1a6)]??this[_0x5f25d6(0x1a6)],_0x72d2e2=Date[_0x5f25d6(0x26f)](),_0x785956={'holder':{'pid':process[_0x5f25d6(0x29d)],'hostname':_0x4cbc8c[_0x5f25d6(0x7e)](),..._0x2b7d12},'acquiredAt':_0x72d2e2,'updatedAt':_0x72d2e2,'ttlMs':_0x1a1914};let _0x20eb90=![],_0x10ff53=null;if(this[_0x5f25d6(0x208)]())return{'acquired':![],'handle':null,'current':null};try{const _0x35cdcc=()=>{const _0x5a724b=_0x5f25d6,_0x352f3a=this[_0x5a724b(0x14e)]()[_0x5a724b(0x2a6)](_0x33674c);if(_0x352f3a&&!this['_isStale'](_0x352f3a)&&!_0x312597[_0x5a724b(0x291)](_0x352f3a)){const _0x1b396c=_0x2b7d12[_0x5a724b(0x2b3)]!=null&&_0x352f3a[_0x5a724b(0x23a)][_0x5a724b(0x29d)]===process[_0x5a724b(0x29d)]&&_0x352f3a['holder'][_0x5a724b(0x2b3)]===_0x2b7d12[_0x5a724b(0x2b3)];if(!_0x1b396c){_0x20eb90=![],_0x10ff53=_0x352f3a;return;}_0x785956['acquiredAt']<=_0x352f3a[_0x5a724b(0xbe)]&&(_0x785956['acquiredAt']=_0x352f3a[_0x5a724b(0xbe)]+0x1,_0x785956[_0x5a724b(0x286)]=_0x785956[_0x5a724b(0xbe)]);}this[_0x5a724b(0x14e)]()[_0x5a724b(0x91)](_0x33674c,_0x785956),_0x20eb90=!![],_0x10ff53=_0x785956;};if(_0x5687fd)this[_0x5f25d6(0x14e)]()[_0x5f25d6(0x204)](_0x35cdcc);else await this[_0x5f25d6(0x14e)]()[_0x5f25d6(0x263)](_0x35cdcc);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x20eb90)return{'acquired':![],'handle':null,'current':_0x10ff53};const _0x287960=new _0x3431a6(this,_0x33674c,_0x785956[_0x5f25d6(0xbe)]);return _0x287960[_0x5f25d6(0x18f)](_0x1a1914,this[_0x5f25d6(0x16f)]),{'acquired':!![],'handle':_0x287960,'current':_0x10ff53};}['inspect'](_0x12d61e){const _0x5be763=_0x3202ed;try{return this['_db']()['get'](this[_0x5be763(0x12a)](_0x12d61e))??null;}catch{return null;}}['list'](){const _0x452f21=_0x3202ed,_0x48e7ba=this[_0x452f21(0xbd)]+':',_0x14721c=[];try{for(const {key:_0xd2ea04,value:_0x32a989}of this[_0x452f21(0x14e)]()[_0x452f21(0x1c3)]({'start':_0x48e7ba,'end':_0x48e7ba+'\xff'})){typeof _0xd2ea04==='string'&&_0xd2ea04[_0x452f21(0x2bb)](_0x48e7ba)&&_0x14721c[_0x452f21(0xb1)]({'id':_0xd2ea04[_0x452f21(0x1af)](_0x48e7ba[_0x452f21(0x243)]),'entry':_0x32a989});}}catch{}return _0x14721c;}static[_0x3202ed(0x123)](_0x441f8f){const _0x301bf7=_0x3202ed,_0x1e075b=[];try{const _0x5692c9=_0x441f8f[_0x301bf7(0x149)](_0x48ddc8,{'dupSort':![]});for(const {key:_0x2b1af3,value:_0x6f5540}of _0x5692c9[_0x301bf7(0x1c3)]({})){if(typeof _0x2b1af3!==_0x301bf7(0x236))continue;const _0x2192c1=_0x2b1af3[_0x301bf7(0xff)](':');if(_0x2192c1<0x1)continue;_0x1e075b[_0x301bf7(0xb1)]({'namespace':_0x2b1af3[_0x301bf7(0x1af)](0x0,_0x2192c1),'id':_0x2b1af3[_0x301bf7(0x1af)](_0x2192c1+0x1),'entry':_0x6f5540});}}catch{}return _0x1e075b;}}return okdbLock={'OKDBLock':_0x312597},okdbLock;}var version=_0x1383d2(0x113),require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x31854b=_0x1383d2;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x38474c=require$$0$3,_0x3c5db5=require$$1$1,_0x12e936=require$$2,{LOOP:_0x212f76}=requireOkdbLoopMonitor(),{OKDBLock:_0x5e0e06}=requireOkdbLock(),{SYNC_COMMITS:_0x4d57ac}=requireOkdbWriter(),_0x4181c5=_0x31854b(0xbc),_0x5f0107=_0x31854b(0x1ab),_0xd36915='~processes:desired',_0x404721='~processes:cmd',_0x5bb0f0=(_0x56bbd3,_0x2d9283)=>_0x56bbd3+':'+_0x2d9283,_0x53f064=(_0x325791,_0x231392)=>_0x325791+'::'+_0x231392,_0x10a4ca=(_0x45768f,_0xe3427e)=>_0x45768f+'/'+_0xe3427e,_0x155c92=(_0x3ec002,_0x38ce6b)=>_0x3ec002+'#'+_0x38ce6b,_0x113fc1=_0x292194=>{const _0x102bbe=_0x31854b;if(_0x292194?.[_0x102bbe(0x162)])return _0x292194[_0x102bbe(0x162)];const _0x142e49=_0x292194?.[_0x102bbe(0x227)];return typeof _0x142e49===_0x102bbe(0x236)&&_0x142e49[_0x102bbe(0xc8)]('#')?_0x142e49[_0x102bbe(0x1af)](0x0,_0x142e49[_0x102bbe(0xff)]('#')):_0x142e49;},_0x1cffbf=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x1d6332=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x5397d1=_0x1cffbf*0x3,_0x2f75bf=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x31854b(0x1c9)](0x927c0,_0x5397d1*0x14),_0x218a3d=[_0x31854b(0x1c1),_0x31854b(0x277),_0x31854b(0x110),_0x31854b(0x23c),_0x31854b(0x1ae),_0x31854b(0x172)];let _0x371ab4=null;function _0x3b877a(){const _0x14a56f=_0x31854b;if(_0x371ab4==null)_0x371ab4=Math[_0x14a56f(0x9e)]((Date[_0x14a56f(0x26f)]()-process[_0x14a56f(0x14d)]()*0x3e8)/0x3e8)*0x3e8;return _0x371ab4;}function _0x57b2dd(_0x5230df){const _0xb64131=_0x31854b;if(process.env.OKDB_PROCESS_KILL===_0xb64131(0x20f))return![];if(_0x5230df?.[_0xb64131(0x1c5)]?.[_0xb64131(0x140)]&&typeof _0x5230df['options'][_0xb64131(0x140)]===_0xb64131(0x273)&&_0x5230df['options']['processes']['kill']===![])return![];return!![];}function _0x52c120(_0x1469a8,_0x55ad77){const _0x5ecf50=_0x31854b,_0x32ac92=!!_0x55ad77?.[_0x5ecf50(0x1b4)];switch(_0x1469a8){case _0x5ecf50(0x1c6):return{'controllable':_0x32ac92,'decommissionable':![],'killable':!![],'killConfirm':'cluster-wide'};case _0x5ecf50(0xe1):case _0x5ecf50(0x1e4):return{'controllable':_0x32ac92,'decommissionable':![],'killable':!![],'killConfirm':_0x5ecf50(0x1fa)};case'embedded':return{'controllable':![],'decommissionable':![],'killable':![]};case _0x5ecf50(0x242):case _0x5ecf50(0x13b):case _0x5ecf50(0x171):case'worker':return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x5ecf50(0x13a)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x4b6f2f{constructor(_0x1d334b){const _0x502a1e=_0x31854b;this[_0x502a1e(0x2ba)]=_0x1d334b,this['_statusEnv']=null,this['_desired']=null,this[_0x502a1e(0x25d)]=new Map(),this['_cmd']=null,this[_0x502a1e(0x128)]=![],this[_0x502a1e(0x2c7)]=![],this[_0x502a1e(0x167)]=_0x3b877a(),this['_selfKey']=_0x5bb0f0(process[_0x502a1e(0x29d)],this[_0x502a1e(0x167)]),this['_instanceId']=_0x12e936[_0x502a1e(0x22e)]()[_0x502a1e(0x1af)](0x0,0x8),this['_rowKey']=_0x155c92(this[_0x502a1e(0x1d3)],this[_0x502a1e(0x248)]),this['_startedAt']=Date[_0x502a1e(0x26f)](),this[_0x502a1e(0x23d)]=null,this[_0x502a1e(0x86)]=null,this[_0x502a1e(0x255)]=null,this[_0x502a1e(0x20e)]=null,this[_0x502a1e(0x1bc)]=null,this['_onTick']=null,this[_0x502a1e(0x219)]=0x0,this['_ownMeta']={},this[_0x502a1e(0x17c)]=new Map(),this[_0x502a1e(0x230)]=process['cpuUsage'](),this[_0x502a1e(0x142)]=Date[_0x502a1e(0x26f)](),this[_0x502a1e(0x1e5)]=0x0,this[_0x502a1e(0x24e)]=new Map();}get[_0x31854b(0xe4)](){const _0x5b332c=_0x31854b;return this[_0x5b332c(0x1d3)];}get[_0x31854b(0x115)](){const _0x258c6d=_0x31854b;return this[_0x258c6d(0x15b)];}['_caps'](_0x548435,_0x4d4395){const _0x30718d=_0x31854b,_0x76ee07=_0x52c120(_0x548435,_0x4d4395);if(_0x76ee07[_0x30718d(0x1e9)]&&!_0x57b2dd(this[_0x30718d(0x2ba)]))return{..._0x76ee07,'killable':![],'killConfirm':undefined};return _0x76ee07;}[_0x31854b(0x1cd)](){const _0x5a9ce7=_0x31854b;return!!this[_0x5a9ce7(0x295)];}[_0x31854b(0x185)](_0x2a1cbb){Object['assign'](this['_ownMeta'],_0x2a1cbb||{});}[_0x31854b(0x213)](_0x480160){const _0x4b709e=_0x31854b;if(_0x480160)this[_0x4b709e(0x255)]=_0x480160;}[_0x31854b(0x84)](_0x77dee3={}){const _0x269bb3=_0x31854b;return this[_0x269bb3(0x2ba)]['_activateProcesses'](_0x77dee3);}[_0x31854b(0xc5)](){const _0x17bf96=_0x31854b,_0x49231d={};let _0x48f2d2=0x0,_0x3e5fe4=0x0;const _0x3102f5=new Set();for(const _0x221feb of this[_0x17bf96(0x19f)]()){_0x3e5fe4++;const _0x2dfcef=_0x221feb['processing'];if(!_0x2dfcef)continue;if(_0x2dfcef[_0x17bf96(0x268)])_0x48f2d2++;for(const _0x4f536a of _0x2dfcef[_0x17bf96(0x1b4)]||[]){if(![_0x17bf96(0x21c),_0x17bf96(0x103)][_0x17bf96(0xc8)](_0x4f536a[_0x17bf96(0xd4)]))continue;(_0x4f536a[_0x17bf96(0x21f)]===_0x17bf96(0x232)||_0x4f536a[_0x17bf96(0x21f)]===_0x17bf96(0x1d5))&&_0x4f536a[_0x17bf96(0x24d)]&&_0x3102f5[_0x17bf96(0x1fb)]((_0x4f536a[_0x17bf96(0xed)]||_0x17bf96(0x206))+':'+_0x4f536a[_0x17bf96(0x24d)]);const _0x17e4ed=_0x4f536a['env']||_0x17bf96(0x206);(_0x49231d[_0x17e4ed]||=[])[_0x17bf96(0xb1)]({..._0x4f536a,'env':_0x17e4ed,'owner':{'pid':_0x221feb['pid']??null,'kind':_0x221feb['kind']??null}});}}for(const [_0x1d8475,_0x25e5c2]of Object[_0x17bf96(0x20c)](_0x49231d)){for(const _0x541cf7 of _0x25e5c2){if(_0x541cf7['mode']==='single'&&!_0x541cf7[_0x17bf96(0x2c4)]){const _0x49e553=_0x1d8475+':'+(_0x541cf7[_0x17bf96(0x24d)]??'');if(!_0x3102f5[_0x17bf96(0x146)](_0x49e553))_0x541cf7[_0x17bf96(0x214)]=!![];}}}return{'envs':_0x49231d,'policy':null,'participation':{'participating':_0x48f2d2,'total':_0x3e5fe4},'source':_0x17bf96(0x25f)};}['processorsView'](){const _0xd69f27=_0x31854b,_0x1473e9=_0x24c753=>{const _0x461775=_0x2fe0;if(_0x24c753['state']===_0x461775(0x232)||_0x24c753[_0x461775(0x21f)]==='building'||_0x24c753[_0x461775(0x21f)]===_0x461775(0x250))return 0x3;if(_0x24c753[_0x461775(0x2c4)])return 0x1;return 0x2;},_0x9e4d4f=new Map();for(const _0x1896be of this[_0xd69f27(0x19f)]()){for(const _0x18e307 of _0x1896be[_0xd69f27(0xcf)]?.[_0xd69f27(0x1b4)]||[]){const _0x5145e4={..._0x18e307,'owner':{'pid':_0x1896be[_0xd69f27(0x29d)]??null,'kind':_0x1896be[_0xd69f27(0x234)]??null,'host':_0x1896be[_0xd69f27(0x215)]??null}},_0x2b048e=_0x18e307['mode']===_0xd69f27(0x21c)?'1ofN:'+(_0x18e307[_0xd69f27(0xed)]??'')+'::'+(_0x18e307[_0xd69f27(0x24d)]??_0x18e307[_0xd69f27(0x156)]??_0x18e307['id']):'inst:'+(_0x1896be['nodeKey']??_0x1896be[_0xd69f27(0x162)]??'')+'::'+(_0x18e307['env']??'')+'::'+_0x18e307['id'],_0x3d758f=_0x9e4d4f[_0xd69f27(0x2a6)](_0x2b048e);if(!_0x3d758f||_0x1473e9(_0x5145e4)>_0x1473e9(_0x3d758f))_0x9e4d4f[_0xd69f27(0x27e)](_0x2b048e,_0x5145e4);}}return[..._0x9e4d4f[_0xd69f27(0xab)]()];}[_0x31854b(0x276)](){const _0x30ad85=_0x31854b,_0x16915c=Date[_0x30ad85(0x26f)](),_0x2f505c=this[_0x30ad85(0x19f)](),_0x30cb45=_0x28d25f=>Math[_0x30ad85(0x1c9)](0x0,Math[_0x30ad85(0x9e)]((_0x16915c-(_0x28d25f[_0x30ad85(0x1ef)]||_0x16915c))/0x3e8)),_0x1836db=_0x2f505c[_0x30ad85(0x200)](_0x4c6756=>_0x4c6756[_0x30ad85(0x234)]===_0x30ad85(0x1c6)),_0x23f9a3=_0x2f505c[_0x30ad85(0x125)](_0x5251a1=>_0x5251a1['kind']===_0x30ad85(0x242));if(_0x1836db||_0x23f9a3[_0x30ad85(0x243)])return{'primary':_0x1836db?{'pid':_0x1836db[_0x30ad85(0x29d)],'uptime':_0x30cb45(_0x1836db)}:null,'workers':_0x23f9a3[_0x30ad85(0x2a7)](_0x47789f=>({'pid':_0x47789f[_0x30ad85(0x29d)],'uptime':_0x30cb45(_0x47789f)})),'workersConfigured':_0x1836db?.[_0x30ad85(0xb4)]?.[_0x30ad85(0x278)]??_0x23f9a3[_0x30ad85(0x243)],'mode':_0x30ad85(0x87)};const _0x4e58cc=_0x2f505c[_0x30ad85(0x200)](_0x1e00a1=>_0x1e00a1[_0x30ad85(0x234)]===_0x30ad85(0xe1)||_0x1e00a1[_0x30ad85(0x234)]==='standalone'||_0x1e00a1[_0x30ad85(0x234)]===_0x30ad85(0x26e)),_0x27b636=_0x4e58cc?{'pid':_0x4e58cc[_0x30ad85(0x29d)],'uptime':_0x30cb45(_0x4e58cc)}:{'pid':process[_0x30ad85(0x29d)],'uptime':Math[_0x30ad85(0x1c9)](0x0,Math[_0x30ad85(0x9e)](process['uptime']()))};return{'primary':_0x27b636,'workers':[_0x27b636],'workersConfigured':0x1,'mode':_0x30ad85(0x21c)};}[_0x31854b(0xf3)](){return this['_groupByProcess']();}[_0x31854b(0x137)](){const _0x2211d3=_0x31854b,_0x53e46e=new Map();for(const _0x51d27a of this[_0x2211d3(0xb0)]())_0x53e46e['set'](_0x51d27a['processKey'],{..._0x51d27a,'children':[]});const _0x29c698=[];for(const _0x227d29 of _0x53e46e[_0x2211d3(0xab)]()){const _0x48ff39=_0x227d29['supervisorKey']?_0x53e46e[_0x2211d3(0x2a6)](_0x227d29[_0x2211d3(0x1f2)]):null;if(_0x48ff39&&_0x48ff39!==_0x227d29)_0x48ff39['children']['push'](_0x227d29);else _0x29c698['push'](_0x227d29);}const _0x2ee7a0=(_0x50915f,_0x2bcc7c)=>_0x50915f[_0x2211d3(0x234)]===_0x2bcc7c['kind']?(_0x50915f['pid']||0x0)-(_0x2bcc7c['pid']||0x0):(_0x50915f[_0x2211d3(0x234)]??'')<(_0x2bcc7c[_0x2211d3(0x234)]??'')?-0x1:0x1,_0x4a3e1e=_0x367c1d=>{const _0x5b4eb9=_0x2211d3;_0x367c1d[_0x5b4eb9(0x283)](_0x2ee7a0);for(const _0x2c91da of _0x367c1d)if(_0x2c91da[_0x5b4eb9(0x1c4)]['length'])_0x4a3e1e(_0x2c91da[_0x5b4eb9(0x1c4)]);};return _0x4a3e1e(_0x29c698),_0x29c698;}[_0x31854b(0x1a1)](_0x1ba441){const _0x5ba1fe=_0x31854b;return this['_groupByProcess']()[_0x5ba1fe(0x200)](_0x4f4b9d=>_0x4f4b9d['processKey']===_0x1ba441)??null;}[_0x31854b(0xb0)](_0x253ae1=Date[_0x31854b(0x26f)]()){const _0x52a8d0=_0x31854b,_0x4a537e=new Map();for(const _0x53e4a0 of this[_0x52a8d0(0x19f)]()){const _0x311fd2=_0x113fc1(_0x53e4a0);let _0x377331=_0x4a537e[_0x52a8d0(0x2a6)](_0x311fd2);!_0x377331&&(_0x377331={'processKey':_0x311fd2,'nodeKey':_0x311fd2,'pid':_0x53e4a0[_0x52a8d0(0x29d)],'ppid':_0x53e4a0[_0x52a8d0(0xaa)]??null,'host':_0x53e4a0[_0x52a8d0(0x215)]??null,'kind':_0x53e4a0[_0x52a8d0(0x234)],'role':null,'supervisorKey':_0x53e4a0[_0x52a8d0(0x1f2)]??null,'slot':_0x53e4a0[_0x52a8d0(0xb9)]??null,'slotKey':_0x53e4a0[_0x52a8d0(0x145)]??null,'caps':_0x53e4a0['caps']??null,'lifecycle':_0x53e4a0['lifecycle']??null,'uptime':Math[_0x52a8d0(0x1c9)](0x0,Math[_0x52a8d0(0x9e)]((_0x253ae1-(_0x53e4a0['startedAt']||_0x253ae1))/0x3e8)),'startedAt':_0x53e4a0['startedAt']??null,'meta':_0x53e4a0[_0x52a8d0(0xb4)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x4a537e[_0x52a8d0(0x27e)](_0x311fd2,_0x377331));_0x377331['instances'][_0x52a8d0(0xb1)]({'instanceId':_0x53e4a0[_0x52a8d0(0xe7)]??null,'role':_0x53e4a0[_0x52a8d0(0x2a5)]??null,'listenAddr':_0x53e4a0['listenAddr']??null,'lifecycle':_0x53e4a0[_0x52a8d0(0x153)]??null,'processing':_0x53e4a0[_0x52a8d0(0xcf)]??null});if(!_0x377331[_0x52a8d0(0x2a5)]&&_0x53e4a0[_0x52a8d0(0x2a5)])_0x377331[_0x52a8d0(0x2a5)]=_0x53e4a0['role'];if(!_0x377331[_0x52a8d0(0x1ff)]&&_0x53e4a0[_0x52a8d0(0x1ff)])_0x377331[_0x52a8d0(0x1ff)]=_0x53e4a0[_0x52a8d0(0x1ff)];if(!_0x377331['processing']&&_0x53e4a0[_0x52a8d0(0xcf)])_0x377331['processing']=_0x53e4a0['processing'];if(!_0x377331[_0x52a8d0(0x17b)]&&_0x53e4a0[_0x52a8d0(0x17b)])_0x377331[_0x52a8d0(0x17b)]=_0x53e4a0[_0x52a8d0(0x17b)];if(!_0x377331[_0x52a8d0(0x253)]&&_0x53e4a0[_0x52a8d0(0x253)])_0x377331[_0x52a8d0(0x253)]=_0x53e4a0[_0x52a8d0(0x253)];if(_0x377331[_0x52a8d0(0x147)]==null&&_0x53e4a0[_0x52a8d0(0x147)])_0x377331['caps']=_0x53e4a0['caps'];if(_0x53e4a0[_0x52a8d0(0x9f)]&&(!_0x377331[_0x52a8d0(0x9f)]||(_0x53e4a0[_0x52a8d0(0x9f)]['at']??0x0)>(_0x377331['stats']['at']??0x0)))_0x377331[_0x52a8d0(0x9f)]=_0x53e4a0[_0x52a8d0(0x9f)];}return[..._0x4a537e['values']()];}[_0x31854b(0x98)](){const _0x26965b=_0x31854b,_0x2069e7=[],_0x247dcb={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x5d3945 of this['_groupByProcess']()){_0x2069e7[_0x26965b(0xb1)]({'processKey':_0x5d3945[_0x26965b(0x162)],'kind':_0x5d3945[_0x26965b(0x234)],'pid':_0x5d3945[_0x26965b(0x29d)],'supervisorKey':_0x5d3945[_0x26965b(0x1f2)],'meta':_0x5d3945['meta']??null,'uptime':_0x5d3945[_0x26965b(0x14d)],'stats':_0x5d3945[_0x26965b(0x9f)]??null}),_0x247dcb[_0x26965b(0x140)]++;if(_0x5d3945[_0x26965b(0x9f)]){_0x247dcb[_0x26965b(0x257)]+=_0x5d3945['stats'][_0x26965b(0x257)]||0x0,_0x247dcb[_0x26965b(0x18e)]+=(_0x5d3945[_0x26965b(0x9f)][_0x26965b(0x18e)]||0x0)+(_0x5d3945[_0x26965b(0x9f)][_0x26965b(0x1be)]?.[_0x26965b(0x18e)]||0x0);const _0x4c601c=_0x5d3945[_0x26965b(0x9f)][_0x26965b(0x1be)];_0x4c601c&&(_0x247dcb[_0x26965b(0x1be)][_0x26965b(0x1b1)]+=_0x4c601c[_0x26965b(0x1b1)]||0x0,_0x247dcb['threads'][_0x26965b(0x17d)]+=_0x4c601c[_0x26965b(0x17d)]||0x0,_0x247dcb['threads'][_0x26965b(0x11a)]+=_0x4c601c['busy']||0x0);}}return{'totals':_0x247dcb,'nodes':_0x2069e7};}async[_0x31854b(0xae)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x194036=_0x31854b;this[_0x194036(0x128)]=this[_0x194036(0x128)]||!!writer,this[_0x194036(0x2c7)]=this['_isReader']||!!reader,this['_kind']=kind||this[_0x194036(0x23d)]||(_0x3c5db5[_0x194036(0x1cf)]?_0x194036(0x242):_0x194036(0xe1)),this[_0x194036(0x86)]=supervisorKey??this[_0x194036(0x86)],this['_listenAddr']=listenAddr??this[_0x194036(0x255)],this[_0x194036(0x28f)](),await this[_0x194036(0x186)]();if(!writer&&!reader)return null;if(!this[_0x194036(0x295)]){const _0x1edc90=await this[_0x194036(0x2ba)]['createEnvironment'](_0x4181c5,{'sync':![],'durability':_0x194036(0xb8)});await _0x1edc90[_0x194036(0x238)](_0x5f0107),this[_0x194036(0x295)]=_0x1edc90;}return this['_statusEnv'];}[_0x31854b(0x1d8)](){const _0x365a89=_0x31854b;return this[_0x365a89(0x287)]!==this[_0x365a89(0x295)]&&(this['_nodeDbFor']=this[_0x365a89(0x295)],this['_nodeDbCache']=this[_0x365a89(0x295)][_0x365a89(0xe6)](_0x5f0107)[_0x365a89(0x29a)]),this['_nodeDbCache'];}[_0x31854b(0x169)](_0x41cc93){const _0x2fcbed=_0x31854b;if(_0x4d57ac)return this['_nodeDb']()[_0x2fcbed(0x26d)](_0x41cc93[_0x2fcbed(0x227)],_0x41cc93,0x1);const _0x3a0462=this[_0x2fcbed(0x1d8)]()[_0x2fcbed(0x91)](_0x41cc93['nodeKey'],_0x41cc93,0x1);if(_0x3a0462&&typeof _0x3a0462[_0x2fcbed(0x8d)]===_0x2fcbed(0xd1))_0x3a0462[_0x2fcbed(0x8d)](undefined,()=>{});return _0x3a0462;}[_0x31854b(0x7d)](_0x4c4e72){const _0x2b4d87=_0x31854b;return this['_nodeDb']()[_0x2b4d87(0x26d)](_0x4c4e72[_0x2b4d87(0x227)],_0x4c4e72,0x1);}[_0x31854b(0x175)](_0x97fb74){const _0x449114=_0x31854b;if(_0x4d57ac)try{return this['_nodeDb']()[_0x449114(0x16b)](_0x97fb74);}catch{return![];}const _0x135f18=this[_0x449114(0x1d8)]()[_0x449114(0x290)](_0x97fb74);if(_0x135f18&&typeof _0x135f18[_0x449114(0x8d)]===_0x449114(0xd1))_0x135f18[_0x449114(0x8d)](undefined,()=>{});return _0x135f18;}async[_0x31854b(0xc4)](_0x254c0d){const _0x78cf67=_0x31854b;if(!this[_0x78cf67(0x295)]||!this[_0x78cf67(0x128)]||!_0x254c0d?.[_0x78cf67(0x227)])return;return this['_putRowAsync'](_0x254c0d);}async[_0x31854b(0x1df)](_0x2a53eb){const _0x14ca3b=_0x31854b;if(!this[_0x14ca3b(0x295)]||!this[_0x14ca3b(0x128)]||!_0x2a53eb)return;const _0x107112=_0x2a53eb[_0x14ca3b(0xc8)]('#'),_0x256c5f=[];for(const {key:_0x4f2f1c}of this['_statusEnv']['getRange'](_0x5f0107)){if(_0x4f2f1c===_0x2a53eb||!_0x107112&&typeof _0x4f2f1c===_0x14ca3b(0x236)&&_0x4f2f1c['startsWith'](_0x2a53eb+'#'))_0x256c5f['push'](_0x4f2f1c);}for(const _0x171981 of _0x256c5f){try{this[_0x14ca3b(0x1d8)]()[_0x14ca3b(0x16b)](_0x171981);}catch{}}}[_0x31854b(0x235)](_0x4d6b03){const _0x40d85e=_0x31854b;if(typeof _0x4d6b03?.[_0x40d85e(0x29d)]!=='number')return![];if(_0x4d6b03[_0x40d85e(0x215)]!==_0x38474c[_0x40d85e(0x7e)]())return![];if(_0x4d6b03[_0x40d85e(0x29d)]===process[_0x40d85e(0x29d)])return![];if(_0x4d6b03[_0x40d85e(0x2be)]!=null&&_0x4d6b03[_0x40d85e(0x2be)]<Date[_0x40d85e(0x26f)]()-_0x2f75bf)return!![];try{return process['kill'](_0x4d6b03[_0x40d85e(0x29d)],0x0),![];}catch(_0x435a95){return _0x435a95[_0x40d85e(0x138)]===_0x40d85e(0x298);}}[_0x31854b(0x19f)](){const _0x494322=_0x31854b;if(!this[_0x494322(0x295)])return[];try{this['_statusEnv']['db']?.[_0x494322(0x14f)]?.();}catch{}const _0x450b4e=Date[_0x494322(0x26f)](),_0x5cdfac=_0x38474c[_0x494322(0x7e)](),_0x183078=[];for(const {value:_0x25d682}of this[_0x494322(0x295)][_0x494322(0x1c3)](_0x5f0107)){if(!_0x25d682)continue;let _0x4efeb1=null;_0x25d682['host']===_0x5cdfac&&typeof _0x25d682[_0x494322(0x29d)]===_0x494322(0xa3)&&(_0x4efeb1=!this['_nodeDead'](_0x25d682));if(_0x4efeb1===![])continue;const _0x163d41=_0x25d682[_0x494322(0x2be)]==null||_0x25d682[_0x494322(0x2be)]>=_0x450b4e;if(_0x4efeb1===!![]||_0x163d41)_0x183078[_0x494322(0xb1)](_0x25d682);}return _0x183078;}async[_0x31854b(0xeb)](_0x12ed7a=0x0){const _0x298716=_0x31854b;if(!this['_statusEnv']||!this[_0x298716(0x128)])return;const _0x287c6c=Date[_0x298716(0x26f)]()-_0x12ed7a,_0x387b45=new Set(),_0x43c0c1=[],_0x4a3e4e=_0x38474c[_0x298716(0x7e)](),_0x6daaf5=require$$6[_0x298716(0x279)];for(const {key:_0x1f6e50,value:_0x1d0179}of this[_0x298716(0x295)][_0x298716(0x1c3)](_0x5f0107)){if(!_0x1d0179)continue;const _0xcf5f1d=_0x1d0179[_0x298716(0x215)]===_0x4a3e4e&&typeof _0x1d0179['pid']===_0x298716(0xa3),_0x527a88=_0xcf5f1d?this[_0x298716(0x235)](_0x1d0179):_0x1d0179['expiresAt']!=null&&_0x1d0179[_0x298716(0x2be)]<_0x287c6c;if(_0x527a88)_0x43c0c1[_0x298716(0xb1)](_0x1f6e50);else{_0x387b45[_0x298716(0x1fb)](_0x113fc1(_0x1d0179)??_0x1f6e50);if(_0x1d0179[_0x298716(0x279)]&&_0x1d0179[_0x298716(0x279)]!==_0x6daaf5){if(!this['_versionSkewWarned'])this[_0x298716(0xca)]=new Set();!this['_versionSkewWarned'][_0x298716(0x146)](_0x1d0179['version'])&&(this[_0x298716(0xca)][_0x298716(0x1fb)](_0x1d0179[_0x298716(0x279)]),this[_0x298716(0x2ba)]['log']?.['warn']?.(_0x298716(0x209)+(_0x1d0179[_0x298716(0x29d)]??'?')+_0x298716(0x106)+_0x1d0179[_0x298716(0x279)]+'\x20while\x20this\x20process\x20runs\x20'+_0x6daaf5+'\x20—\x20'+_0x298716(0x2ae),{'feature':_0x298716(0x271)}));}}}for(const _0x26f968 of _0x43c0c1)this[_0x298716(0x175)](_0x26f968);if(this[_0x298716(0x28f)]()){const _0x14a278=[];for(const {key:_0x19c1ef}of this[_0x298716(0x126)]('node')){if(!_0x387b45[_0x298716(0x146)](_0x19c1ef)){if(_0x4d57ac)try{this[_0x298716(0x1eb)][_0x298716(0x16b)]('node/'+_0x19c1ef);}catch{}else _0x14a278[_0x298716(0xb1)](this[_0x298716(0x1eb)][_0x298716(0x290)](_0x298716(0xda)+_0x19c1ef));}}if(_0x14a278[_0x298716(0x243)])await Promise['allSettled'](_0x14a278);}}[_0x31854b(0x2c2)](_0x124452=null){const _0x5bcf4b=_0x31854b;if(this[_0x5bcf4b(0x20e)])return;if(!this[_0x5bcf4b(0x128)]||!this[_0x5bcf4b(0x295)]){this['okdb']?.[_0x5bcf4b(0x1fd)]?.[_0x5bcf4b(0xdd)]?.('registry\x20heartbeat\x20skipped\x20(writer='+this['_isWriter']+_0x5bcf4b(0x129)+!!this['_statusEnv']+_0x5bcf4b(0x2bc),{'feature':_0x5bcf4b(0x140)});return;}this['_onTick']=_0x124452,this[_0x5bcf4b(0x1bc)]=()=>this[_0x5bcf4b(0x92)]();for(const _0x2cf309 of _0x218a3d)this['okdb'][_0x5bcf4b(0x18c)]['on'](_0x2cf309,this[_0x5bcf4b(0x1bc)]);this['_publishNow']();const _0x1ffe2f=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x1cffbf;this['_hbTimer']=setInterval(()=>{const _0x5cb38e=_0x5bcf4b;if(this['_onTick'])try{this[_0x5cb38e(0x294)]();}catch{}this['_publishNow'](),this[_0x5cb38e(0xeb)]()[_0x5cb38e(0x267)](()=>{});},_0x1ffe2f);if(this[_0x5bcf4b(0x20e)]['unref'])this[_0x5bcf4b(0x20e)]['unref']();}['_maybePublish'](){const _0x17fd23=_0x31854b;if(!this[_0x17fd23(0x128)]||!this[_0x17fd23(0x295)])return;if(Date[_0x17fd23(0x26f)]()-this[_0x17fd23(0x219)]<_0x1d6332)return;this[_0x17fd23(0x116)]();}[_0x31854b(0x116)](){const _0x890c81=_0x31854b;if(!this[_0x890c81(0x128)]||!this[_0x890c81(0x295)])return;this[_0x890c81(0x219)]=Date[_0x890c81(0x26f)]();try{const _0x47fed5=[this['_buildOwnRow']()];for(const _0x4ebf6b of this[_0x890c81(0x17c)][_0x890c81(0xab)]())_0x47fed5['push'](this['_buildChildRow'](_0x4ebf6b));const _0x337b73=_0x212f76[_0x890c81(0x1ce)]?_0x212f76[_0x890c81(0x26f)]():0x0;for(const _0x4b672c of _0x47fed5){try{this[_0x890c81(0x7d)](_0x4b672c),this[_0x890c81(0x1e1)]=![];}catch(_0x1a3376){!this['_publishFailWarned']&&(this['_publishFailWarned']=!![],this[_0x890c81(0x2ba)]?.[_0x890c81(0x1fd)]?.[_0x890c81(0xdd)]?.('registry\x20publish\x20failing:\x20'+_0x1a3376[_0x890c81(0x1b3)],{'feature':_0x890c81(0x140)}));}}if(_0x212f76[_0x890c81(0x1ce)])_0x212f76[_0x890c81(0x1f3)]('registry-publish',_0x212f76[_0x890c81(0x26f)]()-_0x337b73,'rows='+_0x47fed5[_0x890c81(0x243)]+_0x890c81(0x1bd));}catch(_0x4558fb){!this['_publishFailWarned']&&(this[_0x890c81(0x1e1)]=!![],this['okdb']?.['log']?.[_0x890c81(0xdd)]?.(_0x890c81(0x1f7)+_0x4558fb[_0x890c81(0x1b3)],{'feature':_0x890c81(0x140)}));}}async[_0x31854b(0x168)](){const _0x4fb0b0=_0x31854b;if(this['_onProcEvent']){for(const _0x3e1eb8 of _0x218a3d){try{this['okdb'][_0x4fb0b0(0x18c)][_0x4fb0b0(0x20f)](_0x3e1eb8,this['_onProcEvent']);}catch{}}this[_0x4fb0b0(0x1bc)]=null;}this[_0x4fb0b0(0x20e)]&&(clearInterval(this['_hbTimer']),this[_0x4fb0b0(0x20e)]=null);try{if(this['_statusEnv']&&this[_0x4fb0b0(0x128)])await this[_0x4fb0b0(0x1df)](this[_0x4fb0b0(0x15b)]);}catch{}}async[_0x31854b(0x2bd)](){const _0x311966=_0x31854b;if(!this['_statusEnv']||!this['_isWriter'])return;try{await this['removeNode'](this[_0x311966(0x15b)]);}catch{}try{const _0x9f58e8=[];for(const {value:_0x53bbab}of this[_0x311966(0x295)][_0x311966(0x1c3)](_0x5f0107)){if(_0x53bbab?.[_0x311966(0xaa)]===process[_0x311966(0x29d)]&&_0x53bbab[_0x311966(0x227)])_0x9f58e8[_0x311966(0xb1)](_0x53bbab[_0x311966(0x227)]);}for(const _0x29f570 of _0x9f58e8){try{await this[_0x311966(0x1df)](_0x29f570);}catch{}}}catch{}}async['publishOwnRow'](){const _0x38f68c=_0x31854b;return this[_0x38f68c(0xc4)](this[_0x38f68c(0x23e)]());}async[_0x31854b(0x134)](_0x13ded6){const _0x148321=_0x31854b;if(!this[_0x148321(0x295)]||!this[_0x148321(0x128)])return;return this[_0x148321(0xc4)](this[_0x148321(0x193)](_0x13ded6));}[_0x31854b(0x193)]({pid:_0xc3a010,startedAt:_0x5a86e2,kind:_0x4527d4,supervisorKey:_0x3e950e,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle='running',meta:meta=null,stats:stats=null}){const _0x3cce98=_0x31854b,_0x367a18=Date[_0x3cce98(0x26f)](),_0x23534f=_0x5bb0f0(_0xc3a010,_0x5a86e2);return{'nodeKey':_0x155c92(_0x23534f,'0'),'processKey':_0x23534f,'instanceId':'0','pid':_0xc3a010,'startedAt':_0x5a86e2,'ppid':process[_0x3cce98(0x29d)],'host':_0x38474c['hostname'](),'supervisorKey':_0x3e950e,'slot':slot,'slotKey':slotKey,'kind':_0x4527d4,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x367a18,'expiresAt':_0x367a18+_0x5397d1,'caps':this[_0x3cce98(0xa8)](_0x4527d4,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x31854b(0x135)](_0x5b6f73){const _0x3a22c3=_0x31854b;if(!_0x5b6f73?.[_0x3a22c3(0x29d)])return null;const _0x5a5be5=_0x5bb0f0(_0x5b6f73[_0x3a22c3(0x29d)],_0x5b6f73[_0x3a22c3(0x1ef)]);this[_0x3a22c3(0x17c)][_0x3a22c3(0x27e)](_0x5a5be5,{..._0x5b6f73,'supervisorKey':_0x5b6f73[_0x3a22c3(0x1f2)]??this['_selfKey']});if(this[_0x3a22c3(0x128)])await this[_0x3a22c3(0x134)](this[_0x3a22c3(0x17c)][_0x3a22c3(0x2a6)](_0x5a5be5))['catch']?.(()=>{});return _0x5a5be5;}[_0x31854b(0x29b)](_0x513500){const _0xabfbf8=_0x31854b;if(!_0x513500)return;return this[_0xabfbf8(0x17c)][_0xabfbf8(0x264)](_0x513500),this[_0xabfbf8(0x1df)](_0x513500);}['_sampleOwnStats'](){const _0x3314a3=_0x31854b,_0x136783=Date['now'](),_0x2509aa=process['cpuUsage'](),_0x173efc=(_0x136783-this['_lastCpuAt'])*0x3e8;if(_0x173efc>=0x3d090){const _0x507f14=_0x2509aa[_0x3314a3(0x224)]-this['_lastCpuUsage'][_0x3314a3(0x224)]+(_0x2509aa[_0x3314a3(0x83)]-this[_0x3314a3(0x230)][_0x3314a3(0x83)]),_0x43bb6=_0x38474c[_0x3314a3(0x8b)]()[_0x3314a3(0x243)]||0x1;this[_0x3314a3(0x1e5)]=Math[_0x3314a3(0x28e)](0x64,Math['round'](_0x507f14/(_0x173efc*_0x43bb6)*0x64)),this[_0x3314a3(0x8f)]=Math['round'](_0x173efc/0x3e8),this[_0x3314a3(0x230)]=_0x2509aa,this[_0x3314a3(0x142)]=_0x136783;}const _0x32e4e2=process[_0x3314a3(0x1a7)](),_0x492822=this[_0x3314a3(0x24e)][_0x3314a3(0x1a8)];let _0x1c278b=0x0;if(_0x492822>0x0){const _0x5bffb0=[this['okdb'],...this['okdb'][_0x3314a3(0x90)]?.[_0x3314a3(0xab)]?.()??[]];for(const _0x4bb94d of _0x5bffb0){const _0x481507=_0x4bb94d[_0x3314a3(0x11e)]?.[_0x3314a3(0x158)];if(_0x481507)_0x1c278b+=_0x481507[_0x3314a3(0x237)]['busy'];}}let _0x242d2b=null;const _0x1949f6=_0x492822;if(_0x1949f6>0x0){let _0x5c922c=0x0;for(const _0x4b4bdd of this[_0x3314a3(0x24e)][_0x3314a3(0xab)]())_0x5c922c+=_0x4b4bdd[_0x3314a3(0x18e)]||0x0;_0x242d2b={'count':_0x1949f6,'heapUsed':_0x5c922c,'sandbox':_0x492822,'busy':_0x1c278b};}return{'rss':_0x32e4e2[_0x3314a3(0x257)],'heapUsed':_0x32e4e2[_0x3314a3(0x18e)],'heapTotal':_0x32e4e2[_0x3314a3(0x27a)],'external':_0x32e4e2[_0x3314a3(0x131)],'cpuPct':this[_0x3314a3(0x1e5)],'cpuWindowMs':this[_0x3314a3(0x8f)]??null,'threads':_0x242d2b,'at':_0x136783};}[_0x31854b(0x184)](_0x198b25,_0x5562e6){const _0x22db4b=_0x31854b;if(!_0x198b25||!_0x5562e6)return;this[_0x22db4b(0x24e)][_0x22db4b(0x27e)](_0x198b25,_0x5562e6);}[_0x31854b(0xc1)](_0x5c6a75){const _0x2cc844=_0x31854b;this[_0x2cc844(0x24e)][_0x2cc844(0x264)](_0x5c6a75);}[_0x31854b(0x2aa)](_0x346532,_0x11c138,_0x102338=undefined){const _0x2446fc=_0x31854b,_0x5726d2=this[_0x2446fc(0x17c)][_0x2446fc(0x2a6)](_0x346532);if(!_0x5726d2||!_0x11c138)return;if(_0x102338!==undefined)_0x5726d2[_0x2446fc(0xcf)]=_0x102338;_0x5726d2[_0x2446fc(0x9f)]={'rss':_0x11c138[_0x2446fc(0x257)]??null,'heapUsed':_0x11c138[_0x2446fc(0x18e)]??null,'heapTotal':_0x11c138[_0x2446fc(0x27a)]??null,'external':_0x11c138[_0x2446fc(0x131)]??null,'cpuPct':_0x11c138[_0x2446fc(0x7f)]??null,'cpuWindowMs':_0x11c138[_0x2446fc(0x1ad)]??null,'threads':_0x11c138[_0x2446fc(0x1be)]??null,'claims':_0x11c138[_0x2446fc(0x1ca)]??null,'envsOpen':_0x11c138[_0x2446fc(0x18a)]??null,'at':Date[_0x2446fc(0x26f)]()};}[_0x31854b(0x23e)](){const _0x29baa2=_0x31854b,_0x2ab6a1=Date[_0x29baa2(0x26f)](),_0x10661c=this['okdb'][_0x29baa2(0x256)]||{},_0x3c9f45=this[_0x29baa2(0x23d)]||'cli';return{'nodeKey':this[_0x29baa2(0x15b)],'processKey':this['_selfKey'],'instanceId':this[_0x29baa2(0x248)],'pid':process[_0x29baa2(0x29d)],'startedAt':this[_0x29baa2(0x167)],'instanceStartedAt':this[_0x29baa2(0x1d4)],'ppid':typeof process[_0x29baa2(0xaa)]===_0x29baa2(0xa3)?process['ppid']:null,'host':_0x38474c[_0x29baa2(0x7e)](),'supervisorKey':this[_0x29baa2(0x86)]??null,'version':require$$6[_0x29baa2(0x279)],'kind':_0x3c9f45,'role':{'engines':!!_0x10661c['engines'],'processors':!!_0x10661c[_0x29baa2(0x1b4)],'compaction':_0x10661c[_0x29baa2(0x14c)],'http':_0x10661c[_0x29baa2(0x265)]},'listenAddr':this[_0x29baa2(0x255)]??null,'heartbeatAt':_0x2ab6a1,'expiresAt':_0x2ab6a1+_0x5397d1,'caps':this[_0x29baa2(0xa8)](_0x3c9f45,_0x10661c),'lifecycle':{'state':_0x29baa2(0x21e),'desiredVersionApplied':null},'meta':{...this[_0x29baa2(0x19b)]},'processing':_0x10661c[_0x29baa2(0x1b4)]?this[_0x29baa2(0x16d)]():null,'engines':_0x10661c[_0x29baa2(0x17b)]?[...this[_0x29baa2(0x2ba)][_0x29baa2(0x121)]??[]]:null,'singletonClaims':this['_collectSingletonClaims'](),'stats':this[_0x29baa2(0x2b1)](),'writers':this[_0x29baa2(0x2c0)]()};}['_collectWriterFacet'](){const _0x32279a=_0x31854b,_0x4a120c={};try{for(const [_0x433197,_0x3e3fca]of this[_0x32279a(0x2ba)][_0x32279a(0x90)]){try{const _0x478ab9=_0x3e3fca[_0x32279a(0xf6)]?.();if(!_0x478ab9)continue;if(!_0x478ab9[_0x32279a(0xd9)]&&!_0x478ab9[_0x32279a(0xf9)]&&!(_0x478ab9['parkedNow']??0x0)&&!_0x478ab9[_0x32279a(0x10c)])continue;_0x4a120c[_0x433197]={'depth':_0x478ab9[_0x32279a(0xd9)],'oldestPendingMs':_0x478ab9[_0x32279a(0xe5)],'committed':_0x478ab9[_0x32279a(0xf9)],'commitsPerSec':_0x478ab9[_0x32279a(0x266)],'commitP99Ms':_0x478ab9[_0x32279a(0x2a4)],'parkedNow':_0x478ab9[_0x32279a(0x2b8)]??0x0,'draining':!!_0x478ab9[_0x32279a(0x10c)]};}catch{}}}catch{}return Object[_0x32279a(0x130)](_0x4a120c)[_0x32279a(0x243)]?_0x4a120c:null;}[_0x31854b(0xa6)](){const _0x42acc0=_0x31854b,_0x31524c=process[_0x42acc0(0x29d)],_0x331173=Date[_0x42acc0(0x26f)](),_0x2051b9=_0x1cc6c8=>{const _0x3c4d9a=_0x42acc0;if(!_0x1cc6c8)return[];const _0xcd88c8=[];try{for(const {id:_0x42ddb6,entry:_0x36bd34}of _0x1cc6c8[_0x3c4d9a(0x114)]()){if(_0x36bd34?.[_0x3c4d9a(0x23a)]?.[_0x3c4d9a(0x29d)]!==_0x31524c)continue;const _0xc65a42=_0x36bd34[_0x3c4d9a(0x286)]??_0x36bd34[_0x3c4d9a(0xbe)]??0x0;if(_0xc65a42+(_0x36bd34[_0x3c4d9a(0x1a6)]??0x0)<_0x331173)continue;_0xcd88c8[_0x3c4d9a(0xb1)](_0x42ddb6);}}catch{}return _0xcd88c8;},_0x1861d7=_0x2051b9(this['_singletonLock']('compact')),_0x4005c7=_0x2051b9(this[_0x42acc0(0x21b)](_0x42acc0(0x29e)));if(!_0x1861d7[_0x42acc0(0x243)]&&!_0x4005c7[_0x42acc0(0x243)])return null;return{'compact':_0x1861d7,'replicate':_0x4005c7};}['_singletonLock'](_0x4f9640){const _0x5265fd=_0x31854b;if(!this[_0x5265fd(0x2ba)]?.['_rootDb'])return null;if(!this[_0x5265fd(0xdb)])this[_0x5265fd(0xdb)]=new Map();let _0x54b411=this['_singletonLocks'][_0x5265fd(0x2a6)](_0x4f9640);if(!_0x54b411)try{_0x54b411=new _0x5e0e06(this[_0x5265fd(0x2ba)][_0x5265fd(0x177)],{'namespace':_0x4f9640}),this[_0x5265fd(0xdb)][_0x5265fd(0x27e)](_0x4f9640,_0x54b411);}catch{return null;}return _0x54b411;}[_0x31854b(0x16d)](){const _0x2ab542=_0x31854b,_0x281efb=[];try{for(const [_0x152cd2,_0x29472f]of this['okdb'][_0x2ab542(0x90)]){if(_0x152cd2[_0x2ab542(0x2bb)]('~'))continue;for(const _0x4597d0 of _0x29472f[_0x2ab542(0xfc)]['tierList']())_0x281efb[_0x2ab542(0xb1)]({..._0x4597d0,'env':_0x152cd2});}}catch{}return{'participate':this['okdb'][_0x2ab542(0x1b4)]?.[_0x2ab542(0xfe)]??![],'processors':_0x281efb};}[_0x31854b(0x28f)](){const _0x48d7c8=_0x31854b;if(this['_desired'])return!![];const _0x3aeda3=this[_0x48d7c8(0x2ba)][_0x48d7c8(0x177)];if(!_0x3aeda3)return![];return this[_0x48d7c8(0x1eb)]=_0x3aeda3[_0x48d7c8(0x149)](_0xd36915,{'dupSort':![]}),this[_0x48d7c8(0x178)]=_0x3aeda3['openDB'](_0x404721,{'dupSort':![]}),!![];}async[_0x31854b(0x186)](){const _0x299d32=_0x31854b;if(!this[_0x299d32(0x28f)]())return;const _0x2f0614=_0x299d32(0x196),_0x1996b2=0x1,_0x16105b=this[_0x299d32(0x1eb)]['get'](_0x2f0614)??0x0;if(_0x16105b>=_0x1996b2)return;const _0x228dfd=_0x65824d=>{const _0x2e714a=_0x299d32;if(_0x65824d==='worker')return _0x2e714a(0x21c);if(_0x65824d===_0x2e714a(0x141))return _0x2e714a(0x103);return _0x65824d;};await this['okdb'][_0x299d32(0x1e0)]['_writer'][_0x299d32(0x101)](()=>{const _0xe80766=_0x299d32;for(const _0x26f466 of['procmode/','procmodeack/']){for(const {key:_0x410e4b,value:_0xe5f3bf}of this[_0xe80766(0x1eb)][_0xe80766(0x1c3)]({'start':_0x26f466,'end':_0x26f466+'\xff'})){if(typeof _0x410e4b!=='string'||!_0x410e4b[_0xe80766(0x2bb)](_0x26f466))break;const _0x19586d=_0x228dfd(_0xe5f3bf[_0xe80766(0xd4)]);if(_0x19586d!==_0xe5f3bf['mode'])this[_0xe80766(0x1eb)][_0xe80766(0x91)](_0x410e4b,{..._0xe5f3bf,'mode':_0x19586d});}}this['_desired'][_0xe80766(0x91)](_0x2f0614,_0x1996b2);});}[_0x31854b(0x14b)](){const _0x4d7f20=_0x31854b;return!!this[_0x4d7f20(0x1eb)];}[_0x31854b(0xec)](_0x4c6122,_0x203f83){const _0x545b7b=_0x31854b;if(!this[_0x545b7b(0x28f)]())return null;const _0x373ae4=_0x4c6122+'/'+_0x203f83;return this[_0x545b7b(0x150)](),this['_desiredOverlay']['get'](_0x373ae4)??this[_0x545b7b(0x1eb)][_0x545b7b(0x2a6)](_0x373ae4)??null;}['_refreshDesiredSnapshot'](){const _0x46fe9a=_0x31854b;if(!_0x4d57ac)return;try{this[_0x46fe9a(0x2ba)]['_systemEnv']?.['db']?.['resetReadTxn']?.();}catch{}}async[_0x31854b(0x247)](_0x5d223d,_0x5911ac,_0x246586){const _0x161c47=_0x31854b;if(!this[_0x161c47(0x28f)]())return null;const _0x2d1111=_0x5d223d+'/'+_0x5911ac;this[_0x161c47(0x150)]();const _0x78a0c4=this[_0x161c47(0x25d)][_0x161c47(0x2a6)](_0x2d1111)??this[_0x161c47(0x1eb)][_0x161c47(0x2a6)](_0x2d1111)??{'version':0x0},_0x411d81=(_0x78a0c4[_0x161c47(0x279)]||0x0)+0x1,_0x5814ef={..._0x78a0c4,..._0x246586,'version':_0x411d81,'updatedAt':Date[_0x161c47(0x26f)]()};this[_0x161c47(0x25d)]['set'](_0x2d1111,_0x5814ef);try{await this['okdb'][_0x161c47(0x1e0)]['_writer'][_0x161c47(0x101)](()=>{const _0x52739a=_0x161c47;this[_0x52739a(0x1eb)][_0x52739a(0x91)](_0x2d1111,_0x5814ef);});}finally{if(this[_0x161c47(0x25d)][_0x161c47(0x2a6)](_0x2d1111)===_0x5814ef)this[_0x161c47(0x25d)][_0x161c47(0x264)](_0x2d1111);}return _0x411d81;}[_0x31854b(0x126)](_0x579b91){const _0x7ebcf2=_0x31854b;if(!this[_0x7ebcf2(0x28f)]())return[];this[_0x7ebcf2(0x150)]();const _0x289d46=_0x579b91+'/',_0x5152a0=[];for(const {key:_0x22bd2b,value:_0x1f3077}of this[_0x7ebcf2(0x1eb)][_0x7ebcf2(0x1c3)]({'start':_0x289d46,'end':_0x289d46+'\xff'})){if(typeof _0x22bd2b!==_0x7ebcf2(0x236)||!_0x22bd2b['startsWith'](_0x289d46))break;_0x5152a0[_0x7ebcf2(0xb1)]({'key':_0x22bd2b[_0x7ebcf2(0x1af)](_0x289d46['length']),'value':_0x1f3077});}return _0x5152a0;}[_0x31854b(0x161)](_0x138092){const _0x4ceb6f=_0x31854b;if(!this[_0x4ceb6f(0x28f)]())return null;return this[_0x4ceb6f(0x178)]['get'](_0x138092)??null;}async[_0x31854b(0x1d7)](_0x271c94,_0x39bdd8,_0x5e9162={}){const _0xd98464=_0x31854b;if(!this[_0xd98464(0x28f)]())return null;let _0x2b8f4b;return await this[_0xd98464(0x2ba)][_0xd98464(0x1e0)]['_writer'][_0xd98464(0x101)](()=>{const _0x11e6a3=_0xd98464,_0x1fa739=this[_0x11e6a3(0x178)][_0x11e6a3(0x2a6)](_0x271c94)||{'epoch':0x0};_0x2b8f4b=(_0x1fa739['epoch']||0x0)+0x1,this['_cmd'][_0x11e6a3(0x91)](_0x271c94,{..._0x1fa739,..._0x5e9162,'cmd':_0x39bdd8,'epoch':_0x2b8f4b,'updatedAt':Date['now']()});}),_0x2b8f4b;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x4b6f2f,'nodeKey':_0x5bb0f0,'logicalKey':_0x53f064,'slotKey':_0x10a4ca,'PROCESS_ENV':_0x4181c5,'NODE_TYPE':_0x5f0107},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x5988e7=_0x1383d2;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x5d4835=require$$0$4,{EVENTS:_0x312803,CHANGE_ACTIONS:_0xfb8d4c}=requireOkdbEnums(),{LOOP:_0x2dc572}=requireOkdbLoopMonitor(),_0x3ef022=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x4a19eb=0x5,_0x2a5675=0x2710;class _0x1b64a2 extends _0x5d4835{constructor(_0x287021,_0x51e35a={}){const _0x210495=_0x2fe0;super(),this[_0x210495(0x2ba)]=_0x287021,this['_quantum']=_0x51e35a[_0x210495(0xc2)]??_0x3ef022,this[_0x210495(0xd7)]=_0x51e35a['flushDebounce']??_0x4a19eb,this[_0x210495(0x293)]=_0x51e35a[_0x210495(0x12d)]??_0x2a5675,this['_started']=![],this[_0x210495(0x211)]=new Map(),this[_0x210495(0xe2)]=new Map(),this['_pending']=new Map(),this['_flushTimer']=null,this[_0x210495(0x20a)]=![],this[_0x210495(0x1c2)]=new Set(),this[_0x210495(0x1cb)]=new Set(),this['_onItem']=_0x51695b=>this['_handleInProcess'](_0x51695b),this[_0x210495(0x1f6)]=_0x37f863=>this[_0x210495(0xba)](_0x37f863),this[_0x210495(0x289)]=_0x24493d=>this[_0x210495(0x2c3)](_0x24493d),this[_0x210495(0xd5)]=()=>this[_0x210495(0x288)]();}[_0x5988e7(0xdf)](){const _0x50347d=_0x5988e7;if(this[_0x50347d(0x261)])return;this[_0x50347d(0x261)]=!![];for(const [_0x444f23,_0x6709b9]of this['okdb'][_0x50347d(0x90)]){if(_0x444f23[_0x50347d(0x2bb)]('~'))continue;try{_0x6709b9['_enableChangelog']();}catch{}}for(const [_0x367d24,_0x19e31c]of this[_0x50347d(0x2ba)][_0x50347d(0x90)]){if(_0x367d24[_0x50347d(0x2bb)]('~'))continue;try{this[_0x50347d(0xe2)][_0x50347d(0x27e)](_0x367d24,_0x19e31c[_0x50347d(0x1db)]()||0x0);}catch{}}const {events:_0x2d808f}=this[_0x50347d(0x2ba)];_0x2d808f['on'](_0x312803['ITEM_PENDING'],this['_onPending']),_0x2d808f['on'](_0x312803[_0x50347d(0x284)],this[_0x50347d(0x18d)]),_0x2d808f['on'](_0x312803[_0x50347d(0x148)],this[_0x50347d(0x18d)]),_0x2d808f['on'](_0x312803[_0x50347d(0x1f1)],this[_0x50347d(0x18d)]),_0x2d808f['on'](_0x312803[_0x50347d(0x136)],this['_onPoke']),_0x2d808f[_0x50347d(0x1a0)](_0x312803[_0x50347d(0xf0)],this['_onStop']);}[_0x5988e7(0x288)](){const _0x3bc802=_0x5988e7;if(!this['_started'])return;this[_0x3bc802(0x261)]=![];const {events:_0x58fc1c}=this[_0x3bc802(0x2ba)];_0x58fc1c[_0x3bc802(0x20f)](_0x312803['ITEM_PENDING'],this['_onPending']),_0x58fc1c[_0x3bc802(0x20f)](_0x312803[_0x3bc802(0x284)],this['_onItem']),_0x58fc1c[_0x3bc802(0x20f)](_0x312803[_0x3bc802(0x148)],this[_0x3bc802(0x18d)]),_0x58fc1c['off'](_0x312803[_0x3bc802(0x1f1)],this['_onItem']),_0x58fc1c[_0x3bc802(0x20f)](_0x312803['SYSTEM_POKE'],this['_onPoke']);try{_0x58fc1c[_0x3bc802(0x20f)](_0x312803['SYSTEM_STOPPED'],this['_onStop']);}catch{}this['_flushTimer']&&(clearTimeout(this['_flushTimer']),this['_flushTimer']=null),this['_pending']['clear'](),this[_0x3bc802(0x211)][_0x3bc802(0x2b7)](),this[_0x3bc802(0xe2)][_0x3bc802(0x2b7)](),this[_0x3bc802(0x1c2)][_0x3bc802(0x2b7)](),this['_pendingLocal'][_0x3bc802(0x2b7)]();}[_0x5988e7(0x2c1)](_0x1e77fd,_0x34579d,_0x5ce680,_0x4eb301){return _0x1e77fd+'\x00'+_0x34579d+'\x00'+_0x5ce680+'\x00'+_0x4eb301;}[_0x5988e7(0x254)](_0x11c739,_0x2f340d,_0xa865d6,_0x17cbb1){const _0x547b84=_0x5988e7,_0x594ea3=this[_0x547b84(0x2c1)](_0x11c739,_0x2f340d,_0xa865d6,_0x17cbb1);if(this['_seen']['has'](_0x594ea3))return![];this[_0x547b84(0x1c2)]['add'](_0x594ea3);if(this[_0x547b84(0x1c2)]['size']>this[_0x547b84(0x293)]){const _0x327cc=this[_0x547b84(0x1c2)][_0x547b84(0xab)]()['next']()[_0x547b84(0x221)];this[_0x547b84(0x1c2)][_0x547b84(0x264)](_0x327cc);}return!![];}[_0x5988e7(0xba)](_0x41fc67){const _0x359375=_0x5988e7;if(!this[_0x359375(0x261)]||!_0x41fc67)return;const {env:_0x1541e9,type:_0x4bed29,key:_0x1043d7,clock:_0x34417b}=_0x41fc67;if(_0x1541e9==null||_0x4bed29==null||_0x1043d7==null)return;if(typeof _0x1541e9===_0x359375(0x236)&&_0x1541e9[_0x359375(0x2bb)]('~'))return;if(typeof _0x4bed29===_0x359375(0x236)&&_0x4bed29[_0x359375(0x2bb)]('~'))return;this[_0x359375(0x1cb)][_0x359375(0x1fb)](this[_0x359375(0x2c1)](_0x1541e9,_0x4bed29,_0x1043d7,_0x34417b)),this[_0x359375(0x1cb)][_0x359375(0x1a8)]>this[_0x359375(0x293)]&&this[_0x359375(0x1cb)]['delete'](this[_0x359375(0x1cb)][_0x359375(0xab)]()[_0x359375(0x241)]()[_0x359375(0x221)]);}[_0x5988e7(0x16a)](_0x12f547){const _0x54aa94=_0x5988e7;if(!this[_0x54aa94(0x261)]||!_0x12f547)return;const {env:_0x5eb0a1,type:_0x1740ae,key:_0x52e9e1,clock:_0xd27cb,origin:_0xa309c7,action:_0x320e28,newValue:_0x2a2d69,oldValue:_0x5267d0}=_0x12f547;if(_0x5eb0a1==null||_0x1740ae==null||_0x52e9e1==null)return;if(typeof _0x5eb0a1==='string'&&_0x5eb0a1['startsWith']('~'))return;if(typeof _0x1740ae===_0x54aa94(0x236)&&_0x1740ae['startsWith']('~'))return;this[_0x54aa94(0x1cb)]['delete'](this[_0x54aa94(0x2c1)](_0x5eb0a1,_0x1740ae,_0x52e9e1,_0xd27cb));if(!this[_0x54aa94(0x254)](_0x5eb0a1,_0x1740ae,_0x52e9e1,_0xd27cb))return;const _0x5a1759=_0x320e28===_0xfb8d4c['REMOVE']?_0x54aa94(0x290):_0x54aa94(0x91);this[_0x54aa94(0x1ac)](_0x54aa94(0x15e),{'env':_0x5eb0a1,'type':_0x1740ae,'key':_0x52e9e1,'op':_0x5a1759,'clock':_0xd27cb,'origin':_0xa309c7,'value':_0x5a1759===_0x54aa94(0x290)?null:_0x2a2d69,'prevValue':_0x5267d0});}[_0x5988e7(0x2c3)](_0x5b278f){const _0x5eff9a=_0x5988e7;if(!this[_0x5eff9a(0x261)])return;if(!_0x5b278f||typeof _0x5b278f[_0x5eff9a(0xed)]!==_0x5eff9a(0x236)||typeof _0x5b278f['type']!==_0x5eff9a(0x236))return;const {env:_0x32d9aa,type:_0x526e02}=_0x5b278f;if(_0x32d9aa[_0x5eff9a(0x2bb)]('~')||_0x526e02[_0x5eff9a(0x2bb)]('~'))return;this['_pending'][_0x5eff9a(0x27e)](_0x32d9aa+'\x00'+_0x526e02,{'env':_0x32d9aa,'type':_0x526e02}),this[_0x5eff9a(0x2ac)]();}[_0x5988e7(0x2ac)](){const _0xca1bf3=_0x5988e7;if(this[_0xca1bf3(0xc7)])return;const _0x5ce295=()=>{const _0x26c20b=_0xca1bf3;this[_0x26c20b(0xc7)]=null,this[_0x26c20b(0x223)]()[_0x26c20b(0x267)](()=>{});};this[_0xca1bf3(0xc7)]=setTimeout(_0x5ce295,this[_0xca1bf3(0xd7)]>0x0?this[_0xca1bf3(0xd7)]:0x0);}async[_0x5988e7(0x223)](){const _0xd87ef7=_0x5988e7;if(this[_0xd87ef7(0x20a)]){this[_0xd87ef7(0x2ac)]();return;}this[_0xd87ef7(0x20a)]=!![];try{const _0x4ead8e=[...this[_0xd87ef7(0xc6)][_0xd87ef7(0xab)]()];this['_pending']['clear']();let _0x1391a2=![];for(const {env:_0x1b36aa,type:_0x3bc81b}of _0x4ead8e){try{const _0x4fb8dd=await this[_0xd87ef7(0x285)](_0x1b36aa,_0x3bc81b);if(_0x4fb8dd)_0x1391a2=!![];}catch{this[_0xd87ef7(0xc6)][_0xd87ef7(0x27e)](_0x1b36aa+'\x00'+_0x3bc81b,{'env':_0x1b36aa,'type':_0x3bc81b}),_0x1391a2=!![];}}if(_0x1391a2||this[_0xd87ef7(0xc6)][_0xd87ef7(0x1a8)]>0x0)this[_0xd87ef7(0x2ac)]();}finally{this[_0xd87ef7(0x20a)]=![];}}async[_0x5988e7(0x285)](_0x3d91a0,_0x58bd8e){const _0x491698=_0x5988e7,_0x8b8ef6=await this['okdb'][_0x491698(0x117)](_0x3d91a0),_0x3a2a96=_0x3d91a0+'\x00'+_0x58bd8e;!this['_cursors'][_0x491698(0x146)](_0x3a2a96)&&(!this[_0x491698(0xe2)][_0x491698(0x146)](_0x3d91a0)&&(_0x8b8ef6[_0x491698(0xd6)](),this[_0x491698(0xe2)][_0x491698(0x27e)](_0x3d91a0,_0x8b8ef6[_0x491698(0x1db)]()||0x0)),this[_0x491698(0x211)][_0x491698(0x27e)](_0x3a2a96,this[_0x491698(0xe2)]['get'](_0x3d91a0)));const _0x4b315b=this[_0x491698(0x211)][_0x491698(0x2a6)](_0x3a2a96),_0x554cb6=_0x8b8ef6['getClock'](_0x58bd8e)||0x0;if(_0x554cb6<=_0x4b315b)return![];const _0x372f3d=_0x4b315b+this[_0x491698(0x1d9)],_0x5b5bf3=Math['min'](_0x554cb6,_0x372f3d),_0x1be66d=_0x2dc572[_0x491698(0x1ce)]?_0x2dc572[_0x491698(0x26f)]():0x0,_0x5ada13=Array['from'](_0x8b8ef6[_0x491698(0x1a4)](_0x58bd8e,_0x4b315b+0x1,_0x5b5bf3));let _0x1ac508=_0x4b315b;for(const _0x2c02be of _0x5ada13){const {clock:_0x1d2f36,key:_0x180e85,action:_0x33d8e8,origin:_0x1b6b55}=_0x2c02be;if(_0x1d2f36>_0x1ac508)_0x1ac508=_0x1d2f36;if(_0x180e85==null)continue;if(this[_0x491698(0x1cb)][_0x491698(0x146)](this[_0x491698(0x2c1)](_0x3d91a0,_0x58bd8e,_0x180e85,_0x1d2f36)))continue;if(!this[_0x491698(0x254)](_0x3d91a0,_0x58bd8e,_0x180e85,_0x1d2f36))continue;let _0x5ee792,_0x2a8a36;if(_0x33d8e8===_0xfb8d4c[_0x491698(0x2a1)])_0x5ee792=_0x491698(0x290),_0x2a8a36=null;else{const _0xa10cb6=_0x8b8ef6['get'](_0x58bd8e,_0x180e85);_0xa10cb6==null?(_0x5ee792=_0x491698(0x290),_0x2a8a36=null):(_0x5ee792='put',_0x2a8a36=_0xa10cb6);}this['emit']('change',{'env':_0x3d91a0,'type':_0x58bd8e,'key':_0x180e85,'op':_0x5ee792,'clock':_0x1d2f36,'origin':_0x1b6b55,'value':_0x2a8a36});}if(_0x2dc572['enabled'])_0x2dc572['note'](_0x491698(0x2b2)+_0x3d91a0+':'+_0x58bd8e,_0x2dc572[_0x491698(0x26f)]()-_0x1be66d,'n='+_0x5ada13[_0x491698(0x243)]);return this[_0x491698(0x211)]['set'](_0x3a2a96,Math[_0x491698(0x1c9)](_0x1ac508,_0x5b5bf3)),_0x8b8ef6['getClock'](_0x58bd8e)>_0x5b5bf3;}[_0x5988e7(0x292)](){const _0x3a5643=_0x5988e7;return{'started':this[_0x3a5643(0x261)],'quantum':this[_0x3a5643(0x1d9)],'flushDebounce':this['_flushDebounce'],'cursors':Object[_0x3a5643(0x281)]([...this[_0x3a5643(0x211)][_0x3a5643(0x20c)]()]['map'](([_0x4a48e6,_0x53eaa5])=>[_0x4a48e6[_0x3a5643(0xfb)]('\x00',':'),_0x53eaa5])),'pending':this['_pending'][_0x3a5643(0x1a8)],'seen':this['_seen'][_0x3a5643(0x1a8)]};}}return _0x1b64a2[_0x5988e7(0x205)]=_0x3ef022,okdbChangefeed={'OKDBChangefeed':_0x1b64a2},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x3300c4=_0x1383d2;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x303525=require$$1$1,_0x48d93e=require$$1,{EVENTS:_0x375187}=requireOkdbEnums(),_0x59dbab=require$$0$3,{slotKey:_0x401d35}=requireOkdbProcessRegistry(),_0x544e97=Number(process.env.OKDB_CLUSTER_RESPAWN_BACKOFF_MS)||0xfa,_0x51ea7c=0xfa0,_0x3a6900=0x5,_0x486cf4=0x2710,_0x32feb6=0xbb8,_0x3e6003=0x7d0,_0x5646ec=_0x3300c4(0x9a),_0x15a485=_0x3300c4(0x1a5),_0x3ff8cd='log',_0x518df2=_0x3300c4(0x9f),_0x2d6394=[_0x375187[_0x3300c4(0x2ab)],_0x375187[_0x3300c4(0x132)],_0x375187[_0x3300c4(0x10b)],_0x375187[_0x3300c4(0x108)],_0x375187['INDEX_PROGRESS'],_0x375187['INDEX_READY'],_0x375187[_0x3300c4(0x165)],_0x375187[_0x3300c4(0x1d1)],_0x3300c4(0x277),_0x3300c4(0x1c1),_0x3300c4(0x23c),_0x3300c4(0x1ae),_0x3300c4(0x172),_0x3300c4(0x110)],_0x1d46f0=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0,_0x292a34=0x64;function _0x4d9dad(_0x36d010){const _0x530efc=_0x3300c4;if(!_0x36d010)return _0x530efc(0x8a);const _0x485f44=(_0x36d010[_0x530efc(0x1b4)]||[])['map'](_0x5a8d53=>[_0x5a8d53['env'],_0x5a8d53['id'],_0x5a8d53[_0x530efc(0xd4)],_0x5a8d53['state'],!!_0x5a8d53[_0x530efc(0x269)],!!_0x5a8d53[_0x530efc(0x214)],!!_0x5a8d53[_0x530efc(0x2c4)],_0x5a8d53[_0x530efc(0x275)]?.[_0x530efc(0x29d)]??null,_0x5a8d53[_0x530efc(0x250)]?String(_0x5a8d53['error']?.[_0x530efc(0x1b3)]??_0x5a8d53[_0x530efc(0x250)]):null]);return JSON['stringify']([!!_0x36d010[_0x530efc(0x268)],_0x485f44]);}function _0x2d53fb({workers:_0x47a331,makeOkdb:_0x54ea77,port:_0x3d60fe,primaryOkdb:_0x4eb198,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0x5ee63e=_0x3300c4;if(_0x303525['isPrimary'])return childEntry&&_0x303525[_0x5ee63e(0x11d)]({'exec':_0x48d93e[_0x5ee63e(0x29f)](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0x54b2af=_0x5ee63e,_0x24d809=[];for(let _0x3d43c6=0x0;_0x3d43c6<process[_0x54b2af(0x2a0)][_0x54b2af(0x243)];_0x3d43c6++){const _0x5810ad=process[_0x54b2af(0x2a0)][_0x3d43c6];if(_0x5810ad[_0x54b2af(0x2bb)](_0x54b2af(0x151))||_0x5810ad['startsWith']('--watch')||_0x5810ad[_0x54b2af(0x2bb)](_0x54b2af(0x1f0)))continue;if(_0x5810ad==='-e'||_0x5810ad===_0x54b2af(0xc3)||_0x5810ad==='-p'||_0x5810ad===_0x54b2af(0x15f)){_0x3d43c6++;continue;}_0x24d809[_0x54b2af(0xb1)](_0x5810ad);}return _0x24d809;})())}),_0x15fc5b({'workers':_0x47a331,'port':_0x3d60fe,'primaryOkdb':_0x4eb198,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x3d60fe});return _0x320482({'makeOkdb':_0x54ea77,'port':_0x3d60fe});}function _0x15fc5b({workers:_0x1d99a3,port:_0x56d99f,primaryOkdb:_0x1374e8,workerEnv:_0x4f800e,workerRole:_0x46bc6f,listenAddr:_0x155d63}){const _0x39ff7b=_0x3300c4,_0x5dbdd3=new Map(),_0x2568d5=new Map();let _0x18f01f=![];const _0x49a6e8=_0x18cec8=>_0x18cec8?.['__okdbSlot'],_0x25980d=_0x2ddfbd=>{const _0x3276cc=_0x2fe0,_0x2098b4=_0x303525[_0x3276cc(0x120)]({...process.env,..._0x4f800e||{},'OKDB_CLUSTER_SLOT':String(_0x2ddfbd)});return _0x2098b4['__okdbSlot']=_0x2ddfbd,_0x5dbdd3[_0x3276cc(0x27e)](_0x2098b4['process'][_0x3276cc(0x29d)],{'worker':_0x2098b4,'startedAt':Date[_0x3276cc(0x26f)](),'slot':_0x2ddfbd}),_0x2098b4['on'](_0x3276cc(0x250),_0x484d57=>{const _0x4c1253=_0x3276cc;console[_0x4c1253(0x1fd)](_0x4c1253(0x2bf)+_0x2098b4[_0x4c1253(0x262)][_0x4c1253(0x29d)]+_0x4c1253(0x259)+(_0x484d57?.[_0x4c1253(0x1b3)]??_0x484d57));}),_0x2098b4['on'](_0x3276cc(0x232),()=>_0x375f82()),_0x2098b4;},_0x556783=_0x15a76f=>{const _0x16bb9b=_0x2fe0;for(const {worker:_0x204497}of _0x5dbdd3[_0x16bb9b(0xab)]()){if(_0x204497[_0x16bb9b(0x18b)]()||!_0x204497[_0x16bb9b(0x11c)]())continue;try{_0x204497[_0x16bb9b(0x174)](_0x15a76f);}catch{}}};_0x1374e8?.['_activateProcesses']?.({'kind':'primary','listenAddr':_0x155d63})['catch'](()=>{}),_0x1374e8?.[_0x39ff7b(0x140)]?.['setOwnMeta']?.({'workersConfigured':_0x1d99a3});const _0x12a7ad={'engines':!![],'processors':!![],'compaction':!![],..._0x46bc6f,'http':!![]},_0x375f82=()=>{const _0x2e8535=_0x39ff7b,_0x3264f6=_0x1374e8?.[_0x2e8535(0x140)];if(!_0x3264f6||!_0x3264f6[_0x2e8535(0x128)])return;const _0x3656dd=_0x3264f6['selfKey'];for(const {worker:_0x351d82,startedAt:_0x27e729,slot:_0x527011,stats:_0x4ad251,processing:_0x4f495a}of _0x5dbdd3[_0x2e8535(0xab)]()){if(_0x351d82[_0x2e8535(0x18b)]())continue;const _0x38b47f=_0x3264f6[_0x2e8535(0x14b)]?.()&&_0x3264f6[_0x2e8535(0xec)](_0x2e8535(0xb9),_0x4532ae(_0x527011))?.[_0x2e8535(0x252)]===!![];_0x3264f6[_0x2e8535(0x134)]({'pid':_0x351d82[_0x2e8535(0x262)][_0x2e8535(0x29d)],'startedAt':_0x27e729,'kind':_0x2e8535(0x242),'supervisorKey':_0x3656dd,'slot':_0x527011,'slotKey':_0x4532ae(_0x527011),'role':_0x12a7ad,'listenAddr':_0x155d63,'lifecycle':_0x38b47f?_0x2e8535(0xa7):_0x2e8535(0x21e),'processing':_0x4f495a??null,'stats':_0x4ad251??null})['catch'](()=>{});}},_0x4532ae=_0x255f68=>_0x401d35(_0x39ff7b(0x1d2)+_0x56d99f,_0x255f68),_0xb176fb=_0x238537=>{const _0x3e7be6=_0x39ff7b,_0x1ab15c=_0x1374e8?.[_0x3e7be6(0x140)];if(!_0x1ab15c?.[_0x3e7be6(0x14b)]?.())return![];return _0x1ab15c[_0x3e7be6(0xec)]('slot',_0x4532ae(_0x238537))?.[_0x3e7be6(0x252)]===!![];};for(let _0x2c1032=0x0;_0x2c1032<_0x1d99a3;_0x2c1032++){const _0x1f94ea=_0xb176fb(_0x2c1032);_0x2568d5[_0x39ff7b(0x27e)](_0x2c1032,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x1f94ea,'respawnTimer':null}),_0x1f94ea?console[_0x39ff7b(0x1fd)]('[okdb-cluster]\x20slot='+_0x2c1032+_0x39ff7b(0x104)):_0x25980d(_0x2c1032);}const _0x389db2=()=>{const _0x536851=_0x39ff7b,_0x30bdca=_0x1374e8?.['processes'];if(!_0x30bdca?.['_isWriter']||!_0x30bdca['hasDesired']?.())return;for(const [_0x15bee4,_0x4b9923]of _0x2568d5[_0x536851(0x20c)]()){const _0x23a458=_0x30bdca['getDesired'](_0x536851(0xb9),_0x4532ae(_0x15bee4)),_0x2e357a=_0x23a458?.[_0x536851(0x252)]===!![],_0x58cdd8=_0x23a458?.[_0x536851(0x27f)]===!![];if(_0x2e357a&&!_0x4b9923[_0x536851(0x27d)]){_0x4b9923[_0x536851(0x27d)]=!![];_0x4b9923['respawnTimer']&&(clearTimeout(_0x4b9923[_0x536851(0x27b)]),_0x4b9923[_0x536851(0x27b)]=null);for(const {worker:_0x4c97eb}of _0x5dbdd3[_0x536851(0xab)]()){if(_0x49a6e8(_0x4c97eb)!==_0x15bee4||_0x4c97eb[_0x536851(0x18b)]())continue;try{if(_0x58cdd8)_0x4c97eb['process'][_0x536851(0x27f)](_0x536851(0x1f5));else _0x4c97eb['isConnected']()&&_0x4c97eb[_0x536851(0x1d6)]();}catch{}}console['log'](_0x536851(0x2b9)+(_0x58cdd8?_0x536851(0xef):_0x536851(0x28a))+'\x20worker\x20slot='+_0x15bee4+_0x536851(0xaf));}else{if(!_0x2e357a&&_0x4b9923['dead']&&_0x23a458){_0x4b9923[_0x536851(0x27d)]=![],_0x4b9923[_0x536851(0x1cc)]=[],_0x4b9923['consecutiveFailures']=0x0;const _0x31b770=[..._0x5dbdd3[_0x536851(0xab)]()][_0x536851(0x1b2)](({worker:_0x4cbf31})=>_0x49a6e8(_0x4cbf31)===_0x15bee4&&!_0x4cbf31[_0x536851(0x18b)]());!_0x31b770&&!_0x18f01f&&(_0x25980d(_0x15bee4),console['log']('[okdb-cluster]\x20recommissioned\x20worker\x20slot='+_0x15bee4));}}}},_0x377965=()=>{try{_0x389db2();}catch{}};_0x1374e8?.[_0x39ff7b(0x18c)]?.['on']?.(_0x375187[_0x39ff7b(0x249)],_0x377965);const _0x20fa91=[];if(_0x1374e8?.[_0x39ff7b(0x18c)]?.['on'])for(const _0x5e0bdd of _0x2d6394){const _0x5cb815=_0x4a1dc8=>{_0x556783({[_0x5646ec]:_0x15a485,'event':_0x5e0bdd,'data':_0x4a1dc8??{}});};_0x1374e8[_0x39ff7b(0x18c)]['on'](_0x5e0bdd,_0x5cb815),_0x20fa91[_0x39ff7b(0xb1)]({'event':_0x5e0bdd,'handler':_0x5cb815});}const _0x5e8ae6=setInterval(()=>{_0x389db2(),_0x375f82();},_0x1d46f0);_0x5e8ae6[_0x39ff7b(0x12e)]?.();const _0x42ab4b=(_0x3446e5,_0x372194)=>{const _0x37a7f4=_0x39ff7b;if(!_0x372194||typeof _0x372194!=='object'||_0x372194[_0x5646ec]!==_0x3ff8cd)return;if(!_0x1374e8?.['log']?.[_0x37a7f4(0xc0)])return;const _0x347481=_0x372194[_0x37a7f4(0x1e7)]||{};_0x1374e8[_0x37a7f4(0x1fd)]['ingest']({..._0x347481,'msg':'[w'+_0x372194[_0x37a7f4(0xb9)]+']\x20'+(_0x347481[_0x37a7f4(0x12f)]??''),'meta':{..._0x347481['meta']||{},'worker':_0x372194[_0x37a7f4(0xb9)],'workerPid':_0x372194[_0x37a7f4(0x29d)]}});};_0x303525['on']('message',_0x42ab4b);const _0x5aa13b=(_0x8028f7,_0x344ebc)=>{const _0x1b5438=_0x39ff7b;if(!_0x344ebc||typeof _0x344ebc!==_0x1b5438(0x273)||_0x344ebc[_0x5646ec]!==_0x518df2)return;const _0x1bfd37=_0x5dbdd3[_0x1b5438(0x2a6)](_0x8028f7[_0x1b5438(0x262)][_0x1b5438(0x29d)]);if(_0x1bfd37){_0x1bfd37['stats']={..._0x344ebc[_0x1b5438(0x9f)],'at':Date['now']()};if(_0x344ebc[_0x1b5438(0xcf)]!==undefined){const _0x26d243=_0x4d9dad(_0x344ebc[_0x1b5438(0xcf)]);_0x26d243!==_0x1bfd37[_0x1b5438(0x188)]&&(_0x1bfd37[_0x1b5438(0x188)]=_0x26d243,_0x38b12c()),_0x1bfd37[_0x1b5438(0xcf)]=_0x344ebc[_0x1b5438(0xcf)];}}};let _0x1a76b8=null;const _0x38b12c=()=>{if(_0x1a76b8||_0x18f01f)return;_0x1a76b8=setTimeout(()=>{_0x1a76b8=null;if(!_0x18f01f)_0x375f82();},_0x292a34),_0x1a76b8['unref']?.();};_0x303525['on'](_0x39ff7b(0x1b3),_0x5aa13b),_0x303525['on'](_0x39ff7b(0x19a),(_0x1e8bc2,_0x576e66,_0x4d4077)=>{const _0x2eb6cc=_0x39ff7b,_0x5c28ba=_0x1e8bc2[_0x2eb6cc(0x262)][_0x2eb6cc(0x29d)],_0x3e46db=_0x49a6e8(_0x1e8bc2),_0x39aaab=_0x5dbdd3['get'](_0x5c28ba);if(_0x39aaab&&_0x1374e8?.[_0x2eb6cc(0x140)])_0x1374e8['processes'][_0x2eb6cc(0x1df)](_0x5c28ba+':'+_0x39aaab['startedAt'])[_0x2eb6cc(0x267)](()=>{});_0x5dbdd3[_0x2eb6cc(0x264)](_0x5c28ba),console['log']('[okdb-cluster]\x20worker\x20pid='+_0x5c28ba+_0x2eb6cc(0x14a)+(_0x3e46db??'?')+_0x2eb6cc(0x1bb)+('(code='+_0x576e66+_0x2eb6cc(0xb6)+(_0x4d4077??_0x2eb6cc(0x25e))+_0x2eb6cc(0x1ec)+_0x5dbdd3['size']+'\x20worker(s)\x20remaining')),_0x375f82();if(_0x18f01f||_0x3e46db==null)return;const _0x2deae1=_0x2568d5[_0x2eb6cc(0x2a6)](_0x3e46db);if(!_0x2deae1||_0x2deae1[_0x2eb6cc(0x27d)])return;const _0x350dc4=Date['now']();_0x2deae1[_0x2eb6cc(0x1cc)]['push'](_0x350dc4),_0x2deae1[_0x2eb6cc(0x1cc)]=_0x2deae1['deaths'][_0x2eb6cc(0x125)](_0x1b1ae5=>_0x350dc4-_0x1b1ae5<=_0x486cf4);if(_0x2deae1[_0x2eb6cc(0x1cc)][_0x2eb6cc(0x243)]>=_0x3a6900){_0x2deae1[_0x2eb6cc(0x27d)]=!![],console[_0x2eb6cc(0x250)](_0x2eb6cc(0x272)+_0x3e46db+_0x2eb6cc(0x13d)+_0x2deae1[_0x2eb6cc(0x1cc)]['length']+_0x2eb6cc(0xb5)+(_0x486cf4+_0x2eb6cc(0xd3)+_0x5dbdd3[_0x2eb6cc(0x1a8)]+'\x20worker(s)\x20still\x20serving'));return;}_0x2deae1[_0x2eb6cc(0x25b)]++;const _0x23db14=Math[_0x2eb6cc(0x28e)](_0x51ea7c,_0x544e97*0x2**(_0x2deae1[_0x2eb6cc(0x25b)]-0x1));console[_0x2eb6cc(0x1fd)](_0x2eb6cc(0xde)+_0x3e46db+_0x2eb6cc(0xc9)+_0x23db14+_0x2eb6cc(0x99)+_0x2deae1[_0x2eb6cc(0x25b)]+')'),_0x2deae1[_0x2eb6cc(0x27b)]=setTimeout(()=>{const _0x3ed60f=_0x2eb6cc;_0x2deae1[_0x3ed60f(0x27b)]=null;if(_0x18f01f||_0x2deae1[_0x3ed60f(0x27d)])return;const _0x12443e=_0x25980d(_0x3e46db);_0x12443e[_0x3ed60f(0x1a0)]('listening',()=>{const _0xf4d123=_0x3ed60f;if(_0x2568d5[_0xf4d123(0x2a6)](_0x3e46db)===_0x2deae1)_0x2deae1[_0xf4d123(0x25b)]=0x0;});},_0x23db14),_0x2deae1[_0x2eb6cc(0x27b)][_0x2eb6cc(0x12e)]?.();});const _0x492dc0=[..._0x5dbdd3[_0x39ff7b(0x130)]()];console[_0x39ff7b(0x1fd)]('[okdb-cluster]\x20primary\x20pid='+process[_0x39ff7b(0x29d)]+_0x39ff7b(0x260)+_0x1d99a3+_0x39ff7b(0xac)+_0x56d99f+':\x20'+('['+_0x492dc0[_0x39ff7b(0x29f)](',\x20')+']'));const _0x4d78fe={'_isClusterController':!![],'port':_0x56d99f,'primaryOkdb':_0x1374e8??null,'status'(){const _0x243b74=_0x39ff7b;return{'clustered':!![],'primaryPid':process[_0x243b74(0x29d)],'port':_0x56d99f,'primaryRole':_0x1374e8?.[_0x243b74(0x2a5)]??null,'processorPid':null,'supervisorPid':process[_0x243b74(0x29d)],'workers':[..._0x5dbdd3[_0x243b74(0xab)]()]['map'](({worker:_0x19d70b})=>({'pid':_0x19d70b[_0x243b74(0x262)]['pid'],'id':_0x19d70b['id'],'dead':_0x19d70b[_0x243b74(0x18b)]()}))};},async 'close'(){const _0x13ad33=_0x39ff7b;_0x18f01f=!![];for(const _0x4deb1f of _0x2568d5[_0x13ad33(0xab)]()){_0x4deb1f[_0x13ad33(0x27d)]=!![],_0x4deb1f[_0x13ad33(0x27b)]&&(clearTimeout(_0x4deb1f[_0x13ad33(0x27b)]),_0x4deb1f['respawnTimer']=null);}clearInterval(_0x5e8ae6);_0x1a76b8&&(clearTimeout(_0x1a76b8),_0x1a76b8=null);_0x303525[_0x13ad33(0x20f)]('message',_0x42ab4b),_0x303525['off'](_0x13ad33(0x1b3),_0x5aa13b),_0x1374e8?.[_0x13ad33(0x18c)]?.[_0x13ad33(0x20f)]?.(_0x375187[_0x13ad33(0x249)],_0x377965);if(_0x1374e8?.[_0x13ad33(0x18c)]?.[_0x13ad33(0x20f)])for(const {event:_0x2c40d6,handler:_0x1e3a3a}of _0x20fa91){try{_0x1374e8[_0x13ad33(0x18c)][_0x13ad33(0x20f)](_0x2c40d6,_0x1e3a3a);}catch{}}_0x20fa91[_0x13ad33(0x243)]=0x0;const _0x54d4cf=[..._0x5dbdd3[_0x13ad33(0xab)]()][_0x13ad33(0x2a7)](({worker:_0x352402})=>_0x352402);if(_0x54d4cf[_0x13ad33(0x243)]===0x0)return;await Promise[_0x13ad33(0xe3)](_0x54d4cf[_0x13ad33(0x2a7)](_0x1dc333=>new Promise(_0xc4220e=>{const _0xb61f75=_0x13ad33;if(_0x1dc333[_0xb61f75(0x18b)]()){_0xc4220e();return;}let _0x21b08d=![];const _0x52dc02=()=>{if(_0x21b08d)return;_0x21b08d=!![];if(_0x2e0182)clearTimeout(_0x2e0182);_0xc4220e();};_0x1dc333[_0xb61f75(0x1a0)]('exit',_0x52dc02);const _0x2e0182=setTimeout(()=>{const _0x460ec9=_0xb61f75;try{_0x1dc333[_0x460ec9(0x262)][_0x460ec9(0x27f)]();}catch{}},_0x32feb6+0x1f4);_0x2e0182[_0xb61f75(0x12e)]?.();try{_0x1dc333['disconnect']();}catch{try{_0x1dc333[_0xb61f75(0x262)][_0xb61f75(0x27f)]();}catch{}}})));}};return _0x4d78fe;}async function _0x320482({makeOkdb:_0xe63f9,port:_0x1367bb}){const _0x26d252=_0x3300c4,_0x5989d1=await _0xe63f9();return _0x1beb5b(_0x5989d1),_0x5989d1[_0x26d252(0x265)][_0x26d252(0x118)](_0x1367bb);}function _0x1beb5b(_0x4a940a){const _0x4e0542=_0x3300c4;if(!_0x4a940a||_0x4a940a['_clusterWorkerAttached'])return;_0x4a940a[_0x4e0542(0x109)]=!![];try{const {OKDBChangefeed:_0x2bed63}=requireOkdbChangefeed(),_0x37af58=_0x4a940a['_adminRelay'];if(_0x37af58&&typeof _0x37af58[_0x4e0542(0x100)]===_0x4e0542(0xd1)){const _0x3b22be=new _0x2bed63(_0x4a940a);_0x3b22be[_0x4e0542(0xdf)](),_0x37af58[_0x4e0542(0x100)](_0x3b22be),_0x4a940a[_0x4e0542(0x203)]=_0x3b22be;}}catch(_0x4bf98a){_0x4a940a[_0x4e0542(0x1fd)]?.['warn']?.(_0x4e0542(0x229)+(_0x4bf98a?.[_0x4e0542(0x1b3)]??_0x4bf98a),{'feature':_0x4e0542(0x87)});}const _0x4ad3f2=_0x270629=>{const _0x5482b0=_0x4e0542;if(!_0x270629||typeof _0x270629!==_0x5482b0(0x273)||_0x270629[_0x5646ec]==null)return;if(_0x270629[_0x5646ec]===_0x15a485)try{_0x4a940a[_0x5482b0(0x282)]?.[_0x5482b0(0x9c)]?.(_0x270629['event'],_0x270629[_0x5482b0(0x29a)]);}catch{}};process['on'](_0x4e0542(0x1b3),_0x4ad3f2),_0x4a940a[_0x4e0542(0x216)]=_0x4ad3f2;{let _0x14d2a9=process[_0x4e0542(0xbf)](),_0x75035c=Date['now']();const _0x50f851=()=>{const _0x55655d=_0x4e0542;if(typeof process[_0x55655d(0x174)]!=='function'||!process[_0x55655d(0xb7)])return;const _0x47d054=Date[_0x55655d(0x26f)](),_0x49c70d=process[_0x55655d(0xbf)](),_0x2b1936=(_0x47d054-_0x75035c)*0x3e8,_0x12190e=_0x49c70d[_0x55655d(0x224)]-_0x14d2a9[_0x55655d(0x224)]+(_0x49c70d[_0x55655d(0x83)]-_0x14d2a9['system']),_0x31df54=_0x2b1936>0x0?Math[_0x55655d(0x28e)](0x64,Math[_0x55655d(0x9e)](_0x12190e/(_0x2b1936*(_0x59dbab[_0x55655d(0x8b)]()['length']||0x1))*0x64)):0x0;_0x14d2a9=_0x49c70d,_0x75035c=_0x47d054;const _0x446cfe=process[_0x55655d(0x1a7)]();let _0x25765a=null;try{_0x25765a=_0x4a940a[_0x55655d(0x2a5)]?.[_0x55655d(0x1b4)]?_0x4a940a[_0x55655d(0x140)]?.[_0x55655d(0x16d)]?.()??null:null;}catch{}try{process[_0x55655d(0x174)]({[_0x5646ec]:_0x518df2,'stats':{'rss':_0x446cfe[_0x55655d(0x257)],'heapUsed':_0x446cfe[_0x55655d(0x18e)],'heapTotal':_0x446cfe[_0x55655d(0x27a)],'external':_0x446cfe[_0x55655d(0x131)],'cpuPct':_0x31df54,'cpuWindowMs':Math[_0x55655d(0x9e)](_0x2b1936/0x3e8)||null},'processing':_0x25765a});}catch{}},_0x3e4db9=Math[_0x4e0542(0x1c9)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x246659=setInterval(_0x50f851,_0x3e4db9);_0x246659[_0x4e0542(0x12e)]?.(),_0x50f851();for(const _0x369d6b of[_0x4e0542(0x1ae),_0x4e0542(0x172)]){_0x4a940a[_0x4e0542(0x18c)]?.['on']?.(_0x369d6b,()=>{try{_0x50f851();}catch{}});}}let _0x16dbfc=![];const _0x39ce67=async _0x5c81a0=>{const _0x4f369f=_0x4e0542;if(_0x16dbfc)return;_0x16dbfc=!![];const _0x2893dd=setTimeout(()=>process[_0x4f369f(0x19a)](_0x5c81a0),_0x32feb6);_0x2893dd[_0x4f369f(0x12e)]?.();try{await _0x4a940a[_0x4f369f(0xf8)]?.();}catch{}process[_0x4f369f(0x19a)](_0x5c81a0);};process['on'](_0x4e0542(0x1d6),()=>_0x39ce67(0x0));if(process[_0x4e0542(0x174)]&&!process[_0x4e0542(0xb7)])_0x39ce67(0x0);if(process['platform']!==_0x4e0542(0x122)){const _0x1c4c75=setInterval(()=>{if(process['ppid']===0x1)_0x39ce67(0x0);},_0x3e6003);_0x1c4c75[_0x4e0542(0x12e)]?.(),_0x4a940a['_clusterOrphanWatch']=_0x1c4c75;}}return okdbCluster={'runClustered':_0x2d53fb,'attachWorkerCluster':_0x1beb5b},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x2f2539=require$$0$5,{attachWorkerCluster:_0x46b847}=requireOkdbCluster();async function _0x210b1f(){const _0x2ddb0e=_0x2fe0,_0x429dbb=process.env.OKDB_HTTP_CHILD;if(!_0x429dbb)throw new Error('okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing');const {rootPath:_0x3d04c6,port:_0x212127,options:options={},logLevel:logLevel=_0x2ddb0e(0x88)}=JSON[_0x2ddb0e(0xf1)](_0x429dbb);if(!_0x3d04c6||!_0x212127)throw new Error(_0x2ddb0e(0x22b));const _0x482ab7=new _0x2f2539(_0x3d04c6,{...options,'engines':![],'processors':![],'compaction':![]});_0x482ab7[_0x2ddb0e(0x1fd)][_0x2ddb0e(0x190)]?.();const _0x56f506=process.env.OKDB_CLUSTER_SLOT??'?',_0x52b646={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x3a9689=_0x52b646[logLevel]??_0x52b646[_0x2ddb0e(0x88)];_0x482ab7[_0x2ddb0e(0x1fd)]['attach'](_0x4f283d=>{const _0x4ee181=_0x2ddb0e;if((_0x52b646[_0x4f283d[_0x4ee181(0x1fc)]]??0x1)<_0x3a9689)return;try{process['send']?.({'__okdbCluster':'log','slot':_0x56f506,'pid':process[_0x4ee181(0x29d)],'entry':_0x4f283d});}catch{}}),await _0x482ab7['open'](),_0x46b847(_0x482ab7),await _0x482ab7['http']['listen'](_0x212127);}return _0x210b1f()['catch'](_0x1aa40a=>{const _0x24ec76=_0x2fe0;try{process[_0x24ec76(0x174)]?.({'__okdbCluster':_0x24ec76(0x1fd),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x24ec76(0x29d)],'entry':{'level':_0x24ec76(0x250),'msg':_0x24ec76(0x166)+(_0x1aa40a?.[_0x24ec76(0x1b3)]??_0x1aa40a)}});}catch{}process['exit'](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module['exports']=okdbHttpWorkerChild;
|