@kedem/okdb 2.6.0 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/algorithm-worker-thread.js +1 -1
- package/bin/okdb.js +1 -1
- package/okdb-functions-sandbox-worker.js +1 -1
- package/okdb-http-worker-child.js +1 -1
- package/okdb-views-bootstrap-worker.js +1 -1
- package/okdb.js +1 -1
- package/package.json +1 -1
- 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
|
@@ -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 _0xa5e620=_0x70ef;(function(_0x422392,_0x3ecc48){const _0x54e20a=_0x70ef,_0x53d6e4=_0x422392();while(!![]){try{const _0x2deac1=-parseInt(_0x54e20a(0x2a8))/0x1+-parseInt(_0x54e20a(0x13e))/0x2*(parseInt(_0x54e20a(0x13a))/0x3)+parseInt(_0x54e20a(0x236))/0x4*(parseInt(_0x54e20a(0x230))/0x5)+-parseInt(_0x54e20a(0x131))/0x6+-parseInt(_0x54e20a(0xae))/0x7+parseInt(_0x54e20a(0xdc))/0x8*(parseInt(_0x54e20a(0x170))/0x9)+parseInt(_0x54e20a(0x1e2))/0xa;if(_0x2deac1===_0x3ecc48)break;else _0x53d6e4['push'](_0x53d6e4['shift']());}catch(_0x27372b){_0x53d6e4['push'](_0x53d6e4['shift']());}}}(_0x1e20,0xbdce7));var require$$0$5=require(_0xa5e620(0x246)),require$$1$1=require(_0xa5e620(0xc4)),require$$1=require(_0xa5e620(0x26a)),require$$0$3=require('os'),require$$2=require(_0xa5e620(0x290)),require$$0=require(_0xa5e620(0x2bc)),require$$0$2=require(_0xa5e620(0x8c)),require$$0$1=require('fs'),require$$0$4=require('node:events');function _0x70ef(_0x3b0300,_0x43cca7){_0x3b0300=_0x3b0300-0x83;const _0x1e2005=_0x1e20();let _0x70ef97=_0x1e2005[_0x3b0300];return _0x70ef97;}function getDefaultExportFromCjs(_0xaa5154){const _0x372f0e=_0xa5e620;return _0xaa5154&&_0xaa5154[_0x372f0e(0x1f9)]&&Object[_0x372f0e(0x17d)]['hasOwnProperty']['call'](_0xaa5154,'default')?_0xaa5154[_0x372f0e(0x209)]:_0xaa5154;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x2734ea=_0xa5e620;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x2b024c={'PUT':_0x2734ea(0x1bf),'REMOVE':_0x2734ea(0x21b),'INDEX_DROP':_0x2734ea(0x2b8),'INDEX_REGISTER':_0x2734ea(0x29f),'INDEX_RESET':_0x2734ea(0x2c9),'TYPE_REGISTER':_0x2734ea(0x1cf),'TYPE_DROP':'dropType','FTS_REGISTER':_0x2734ea(0x193),'FTS_DROP':_0x2734ea(0x1a0),'FTS_RESET':_0x2734ea(0x1ae),'SCHEMA_SET':'setSchema','SCHEMA_DROP':_0x2734ea(0x207),'TTL_SET':_0x2734ea(0x148),'TTL_CLEAR':_0x2734ea(0xd0)},_0x71b2e2={'SYSTEM_READY':_0x2734ea(0x171),'FIELD_RESOLVER_REGISTERED':_0x2734ea(0x27a),'SYSTEM_STOPPED':_0x2734ea(0x127),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x2734ea(0x224),'SYSTEM_DRAIN':_0x2734ea(0x90),'SYSTEM_TYPE_DROP':'system:type_drop','SYSTEM_PROC':_0x2734ea(0xe2),'SYSTEM_BUS_STATE_CHANGE':_0x2734ea(0x19b),'ITEM_CREATE':_0x2734ea(0xb5),'ITEM_UPDATE':_0x2734ea(0xe6),'ITEM_REMOVE':_0x2734ea(0x208),'ITEM_PENDING':_0x2734ea(0x1db),'INDEX_RESET':_0x2734ea(0x1c8),'INDEX_READY':_0x2734ea(0x8b),'INDEX_PROGRESS':_0x2734ea(0x136),'VIEW_PROGRESS':_0x2734ea(0x26b),'INDEX_DROP':_0x2734ea(0x101),'INDEX_REGISTERED':'index:registered','FTS_REGISTERED':'fts:registered','FTS_DROP':'fts:drop','FTS_RESET':_0x2734ea(0x23b),'SCHEMA_SET':_0x2734ea(0x15e),'SCHEMA_DROP':_0x2734ea(0x260),'UNIQUE_VIOLATION':_0x2734ea(0x2ad),'UNIQUE_VIOLATION_RESOLVED':'unique:violation_resolved','REF_VIOLATION':_0x2734ea(0x11b),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x2734ea(0xaf),'TXN_START':_0x2734ea(0x103),'TXN_END':_0x2734ea(0x13c),'TXN_ROLLBACK':_0x2734ea(0x14d),'TYPE_REGISTERED':_0x2734ea(0x84),'TYPE_DROP':_0x2734ea(0x10e),'ENV_OPENED':_0x2734ea(0x227),'ENV_REMOVED':'env:removed','SYSTEM_ENV_RELEASE':_0x2734ea(0x146),'TTL_EXPIRED':_0x2734ea(0x26d),'TTL_SET':_0x2734ea(0x282),'TTL_CLEAR':_0x2734ea(0x243),'LICENSE_INVALID':_0x2734ea(0xa2),'LICENSE_ADDED':_0x2734ea(0x2c6),'LICENSE_ACTIVATED':_0x2734ea(0x270),'LICENSE_REMOVED':_0x2734ea(0x100)},_0xb0889a={'CREATING':'creating','RESETTING':'resetting','READY':'ready','DROPPING':_0x2734ea(0x27f),'WAITING':_0x2734ea(0x168),'ERROR':_0x2734ea(0x110)},_0x18a086={'CREATED':_0x2734ea(0x237),'STARTING':_0x2734ea(0x102),'STARTED':_0x2734ea(0x13b),'STOPPING':_0x2734ea(0xcd),'STOPPED':'stopped'},_0x428e21={'CREATING':'creating','READY':_0x2734ea(0x231),'HALTED':'halted','STOPPED':'stopped','RESETTING':_0x2734ea(0x2b7)},_0x20ca6c=Object[_0x2734ea(0x296)]({'POKE':_0x2734ea(0x145),'DRAIN':'bus:drain','TYPE_DROP':_0x2734ea(0xbe),'PROC':'bus:proc','ENV_RELEASE':_0x2734ea(0x2bb)});return okdbEnums={'BUS_EVENTS':_0x20ca6c,'CHANGE_ACTIONS':_0x2b024c,'EVENTS':_0x71b2e2,'INDEX_STATE':_0xb0889a,'OKDB_STATE':_0x18a086,'VIEW_STATE':_0x428e21},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x2ace7f=_0xa5e620;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x54a114,performance:_0x3ea5f3}=require$$0,_0x273706=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x2ace7f(0x1d3),_0xedfad5=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x2b783d=process.env.OKDB_LOOP_LAG_ALL==='1',_0x4ce7fc=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x3059fe{constructor(){const _0xcd274a=_0x2ace7f;this['enabled']=_0x273706,this[_0xcd274a(0xdf)]=new Map(),this['_h']=null,this[_0xcd274a(0x26f)]=null,this[_0xcd274a(0x2a0)]=![],this[_0xcd274a(0x17c)]=(_0x26ab77,_0x1d237e)=>process[_0xcd274a(0x114)][_0xcd274a(0x22a)](_0x26ab77+(_0x1d237e?'\x20'+JSON[_0xcd274a(0x279)](_0x1d237e):'')+'\x0a');}['now'](){const _0x48d61c=_0x2ace7f;return _0x3ea5f3[_0x48d61c(0x1a7)]();}[_0x2ace7f(0x167)](_0x49810c){const _0x1ded4b=_0x2ace7f;if(typeof _0x49810c===_0x1ded4b(0xc0))this['_log']=_0x49810c;}['note'](_0x1faa80,_0x70ac65,_0x2f9b08){const _0x4ba4c6=_0x2ace7f;if(!this[_0x4ba4c6(0x1a6)])return;let _0x140d56=this[_0x4ba4c6(0xdf)][_0x4ba4c6(0x10c)](_0x1faa80);!_0x140d56&&(_0x140d56={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x4ba4c6(0xdf)][_0x4ba4c6(0x198)](_0x1faa80,_0x140d56)),_0x140d56['ms']+=_0x70ac65,_0x140d56['count']+=0x1,_0x70ac65>_0x140d56[_0x4ba4c6(0x143)]&&(_0x140d56[_0x4ba4c6(0x143)]=_0x70ac65,_0x140d56[_0x4ba4c6(0x169)]=_0x2f9b08||'');}[_0x2ace7f(0xc3)](_0x27f0d8){const _0x19262e=_0x2ace7f;if(!this[_0x19262e(0x1a6)]||this[_0x19262e(0x2a0)])return;this[_0x19262e(0x2a0)]=!![];if(_0x27f0d8)this[_0x19262e(0x17c)]=_0x27f0d8;this['_h']=_0x54a114({'resolution':0xa}),this['_h'][_0x19262e(0x1ba)](),this[_0x19262e(0x26f)]=setInterval(()=>this['_report'](),_0xedfad5);if(this[_0x19262e(0x26f)][_0x19262e(0x187)])this[_0x19262e(0x26f)][_0x19262e(0x187)]();}['onWindow'](_0x38d8d8){const _0x3523c8=_0x2ace7f;if(!this['_windowCbs'])this['_windowCbs']=new Set();this[_0x3523c8(0x26c)][_0x3523c8(0x1f0)](_0x38d8d8);if(!this[_0x3523c8(0x2a0)])this['_startAdmission']();}['offWindow'](_0x2a7558){const _0x51bf44=_0x2ace7f;this[_0x51bf44(0x26c)]?.[_0x51bf44(0x200)](_0x2a7558);}[_0x2ace7f(0x205)](){const _0x78cf03=_0x2ace7f;if(this[_0x78cf03(0x1b5)])return;this[_0x78cf03(0x1b5)]=!![];!this['_h']&&(this['_h']=_0x54a114({'resolution':0xa}),this['_h']['enable']());const _0x1e1fc4=_0xedfad5;this[_0x78cf03(0x160)]=setInterval(()=>{const _0x3cdef1=_0x78cf03,_0x2b2125=this['_h'];if(!_0x2b2125)return;const _0x52b413=_0x2b2125[_0x3cdef1(0x26e)](0x63)/0xf4240,_0xe53e0c=_0x2b2125['max']/0xf4240,_0x39d109=_0x2b2125[_0x3cdef1(0x14f)]/0xf4240;_0x2b2125[_0x3cdef1(0xe7)]();if(this['_windowCbs'])for(const _0x291e36 of this[_0x3cdef1(0x26c)]){try{_0x291e36({'p99Ms':_0x52b413,'maxMs':_0xe53e0c,'meanMs':_0x39d109,'reportMs':_0x1e1fc4});}catch{}}},_0x1e1fc4);if(this[_0x78cf03(0x160)][_0x78cf03(0x187)])this[_0x78cf03(0x160)][_0x78cf03(0x187)]();}[_0x2ace7f(0x1ee)](){const _0x3e4b15=_0x2ace7f,_0x33fc37=this['_h'],_0x5a58f0=_0x33fc37['max']/0xf4240,_0x5254b4=_0x33fc37[_0x3e4b15(0x26e)](0x63)/0xf4240,_0x5c1dc9=_0x33fc37['mean']/0xf4240;_0x33fc37[_0x3e4b15(0xe7)]();const _0x2478fd=[...this[_0x3e4b15(0xdf)]['entries']()][_0x3e4b15(0xcc)](([_0x38121f,_0x57b5bd])=>({'label':_0x38121f,..._0x57b5bd}))[_0x3e4b15(0x117)]((_0x46fa05,_0x4c8aab)=>_0x4c8aab['ms']-_0x46fa05['ms'])['slice'](0x0,0x8);this['_buckets']['clear']();const _0x5e709f=_0x2478fd[_0x3e4b15(0x1d2)]((_0x23c1f4,_0x452924)=>_0x23c1f4+_0x452924['ms'],0x0),_0x368a70=_0x2478fd['map'](_0x3fe2e1=>_0x3fe2e1[_0x3e4b15(0x11a)]+'='+_0x3fe2e1['ms']['toFixed'](0x0)+_0x3e4b15(0xf5)+_0x3fe2e1['count']+(_0x3fe2e1[_0x3e4b15(0x143)]>0x5?_0x3e4b15(0xf8)+_0x3fe2e1[_0x3e4b15(0x143)][_0x3e4b15(0x177)](0x0)+'ms'+(_0x3fe2e1[_0x3e4b15(0x169)]?'\x20'+_0x3fe2e1[_0x3e4b15(0x169)]:'')+')':''));(_0x2b783d||_0x5a58f0>=_0x4ce7fc)&&this[_0x3e4b15(0x17c)](_0x3e4b15(0x154)+_0xedfad5+'ms\x20max='+_0x5a58f0[_0x3e4b15(0x177)](0x0)+_0x3e4b15(0x23f)+_0x5254b4['toFixed'](0x0)+_0x3e4b15(0x24a)+_0x5c1dc9[_0x3e4b15(0x177)](0x0)+'ms\x20busy='+_0x5e709f[_0x3e4b15(0x177)](0x0)+'ms'+(_0x368a70['length']?_0x3e4b15(0x252)+_0x368a70['join']('\x20\x20'):''),{'feature':_0x3e4b15(0x245)});if(this[_0x3e4b15(0x26c)])for(const _0x437f5c of this[_0x3e4b15(0x26c)]){try{_0x437f5c({'p99Ms':_0x5254b4,'maxMs':_0x5a58f0,'meanMs':_0x5c1dc9,'reportMs':_0xedfad5});}catch{}}}['stop'](){const _0x4163dc=_0x2ace7f;if(this[_0x4163dc(0x26f)])clearInterval(this[_0x4163dc(0x26f)]);if(this['_h'])this['_h'][_0x4163dc(0x9f)]();this['_timer']=null,this['_h']=null,this[_0x4163dc(0x2a0)]=![];}}const _0x2ce79c=new _0x3059fe();if(_0x2ce79c[_0x2ace7f(0x1a6)])_0x2ce79c[_0x2ace7f(0xc3)]();return okdbLoopMonitor={'LOOP':_0x2ce79c},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x4038f7=require$$0$1,_0x43ac5c=require$$1;let _0x76f68a,_0x759919,_0x43b536,_0x1b6922,_0x553a1d,_0x386e92,_0x5c90af,_0x2c24bf=![];const _0x2d987a=new Set();let _0x410411=null;const _0x1eb853=new Map();function _0x1b742e(){const _0x2de970=_0x70ef;if(_0x76f68a!==undefined)return _0x76f68a;_0x76f68a=process.env.OKDB_DIAG==='1';if(!_0x76f68a)return![];_0x759919=process.env.OKDB_DIAG_STACK==='1',_0x1b6922=Math[_0x2de970(0x293)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x43b536=new Array(_0x1b6922),_0x553a1d=0x0,_0x386e92=0x0,_0x5c90af=process.env.OKDB_DIAG_DIR||null;if(_0x5c90af)try{_0x4038f7[_0x2de970(0x272)](_0x5c90af,{'recursive':!![]});}catch{}return!![];}function _0x15bd6(){return _0x76f68a===undefined?_0x1b742e():_0x76f68a;}function _0x3991b1(_0x11e61e,_0x2d9e3e){const _0x562c82=_0x70ef;if(_0x76f68a===undefined?!_0x1b742e():!_0x76f68a)return;let _0x2fb1ec;if(_0x759919){const _0x448301=new Error()[_0x562c82(0xba)]||'';_0x2fb1ec=_0x448301[_0x562c82(0x2ba)]('\x0a')[_0x562c82(0x219)](0x3)[_0x562c82(0xcc)](_0x44cdb9=>_0x44cdb9[_0x562c82(0x1a1)]())[_0x562c82(0xda)](Boolean)[_0x562c82(0x219)](0x0,0x8);}_0x43b536[_0x553a1d]={'seq':_0x386e92++,'t':Date[_0x562c82(0x1a7)](),'env':_0x11e61e,'kind':_0x2d9e3e||_0x562c82(0x1ec),'stack':_0x2fb1ec},_0x553a1d=(_0x553a1d+0x1)%_0x1b6922;}function _0xfc425f(_0x18d13d){const _0xef527e=_0x70ef,_0x5bae21=[];for(let _0x48159f=0x0;_0x48159f<_0x1b6922;_0x48159f++){const _0x2d9ce0=_0x43b536[(_0x553a1d-0x1-_0x48159f+_0x1b6922*0x2)%_0x1b6922];if(!_0x2d9ce0)continue;_0x5bae21[_0xef527e(0x206)](_0x2d9ce0);if(_0x5bae21['length']>=_0x18d13d)break;}return _0x5bae21;}function _0x326abf(_0x50b74d){const _0x57d4de=_0x70ef;try{process[_0x57d4de(0x114)][_0x57d4de(0x22a)](_0x50b74d+'\x0a');}catch{}if(_0x5c90af)try{_0x4038f7[_0x57d4de(0xb8)](_0x43ac5c[_0x57d4de(0xf4)](_0x5c90af,_0x57d4de(0x2ae)+process[_0x57d4de(0x1c1)]+'.log'),_0x50b74d+'\x0a');}catch{}}function _0x162898(_0x2dd77e){const _0x51eed1=_0x70ef,_0x5a856b=_0xfc425f(_0x2dd77e);if(!_0x5a856b['length'])return _0x51eed1(0x226);const _0x2dcafc=Date['now']();return _0x5a856b[_0x51eed1(0xcc)](_0x482f60=>{const _0x5f0c59=_0x51eed1,_0x471420='\x20\x20#'+_0x482f60['seq']+'\x20-'+(_0x2dcafc-_0x482f60['t'])+_0x5f0c59(0xf7)+_0x482f60[_0x5f0c59(0x11d)]+'\x20'+_0x482f60[_0x5f0c59(0x194)];return _0x482f60[_0x5f0c59(0xba)]&&_0x482f60[_0x5f0c59(0xba)]['length']?_0x471420+_0x5f0c59(0x249)+_0x482f60['stack'][_0x5f0c59(0xf4)](_0x5f0c59(0x249)):_0x471420;})['join']('\x0a');}function _0x189f4e(_0x547fa9,_0x5e5f10){const _0x3093b3=_0x70ef,_0xc12f3d=_0x3093b3(0x1f4)+_0x547fa9+_0x3093b3(0x109)+new Date()['toISOString']()+_0x3093b3(0x116)+process[_0x3093b3(0x1c1)]+_0x3093b3(0x29e),_0x2ae2cb=[_0xc12f3d,'error:\x20'+(_0x5e5f10&&_0x5e5f10[_0x3093b3(0xba)]?_0x5e5f10['stack'][_0x3093b3(0x2ba)]('\x0a')[0x0]:_0x5e5f10),'recent\x20writes\x20(newest\x20first)'+(_0x759919?'':_0x3093b3(0x96))+':',_0x162898(0x18),_0x1b03cd(),'='['repeat'](_0xc12f3d[_0x3093b3(0x202)]-0x1)];_0x326abf(_0x2ae2cb[_0x3093b3(0xf4)]('\x0a'));}function _0x39fb6e(_0x6eae5f){const _0x8a6f79=_0x70ef;if(!_0x15bd6())return;const _0x5a824f=String(_0x6eae5f&&_0x6eae5f['message']||_0x6eae5f||''),_0x24a224=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x8a6f79(0x242)](_0x5a824f);_0x189f4e(_0x24a224?_0x8a6f79(0x204):_0x8a6f79(0x1e3),_0x6eae5f);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x24a224)return;try{console['error'](_0x6eae5f&&_0x6eae5f[_0x8a6f79(0xba)]?_0x6eae5f['stack']:_0x6eae5f);}catch{}process[_0x8a6f79(0x2bd)](0x1);}function _0xc1c6a4(_0x171252){const _0x4c40c8=_0x70ef;if(!_0x15bd6())return;const _0x572aa3=String(_0x171252&&_0x171252[_0x4c40c8(0x28a)]||_0x171252||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x4c40c8(0x242)](_0x572aa3)&&_0x189f4e(_0x4c40c8(0xe9),_0x171252);}function _0x1b03cd(){const _0x54c606=_0x70ef,_0x3fdb56=[_0x54c606(0xef)];let _0x111147=![];for(const _0x297589 of _0x2d987a){const _0xa7eebf=_0x297589&&_0x297589[_0x54c606(0x24d)];if(!_0xa7eebf)continue;for(const [_0x2cf157,_0x11d2ca]of _0xa7eebf){const _0xee905a=_0x11d2ca&&_0x11d2ca[_0x54c606(0x269)]&&_0x11d2ca[_0x54c606(0x269)][_0x54c606(0xde)];if(!_0xee905a)continue;let _0x46db2f,_0x296188;try{_0x46db2f=Atomics[_0x54c606(0x250)](_0xee905a,0x0),_0x296188=Atomics['load'](_0xee905a,0x1);}catch{continue;}if(_0x46db2f===0x0)continue;_0x111147=!![];const _0x2365e6=_0x46db2f>0x0?'SWAP':_0x54c606(0x186),_0x515231=Date[_0x54c606(0x1a7)]()-Math[_0x54c606(0x258)](_0x46db2f)*0x3e8,_0x352018=((()=>{const _0x107a36=_0x54c606;try{return _0x11d2ca[_0x107a36(0xb6)]&&_0x11d2ca[_0x107a36(0xb6)]['status']?_0x11d2ca[_0x107a36(0xb6)][_0x107a36(0x1a5)]():null;}catch{return null;}})());_0x3fdb56['push'](_0x54c606(0x1b7)+_0x2cf157+_0x54c606(0x1da)+_0x2365e6+_0x54c606(0x27b)+_0x515231+_0x54c606(0x149)+_0x296188+(_0x352018?_0x54c606(0x18f)+_0x352018[_0x54c606(0x2b1)]+'\x20oldestPendingMs='+_0x352018[_0x54c606(0x27e)]+_0x54c606(0xe1)+_0x352018[_0x54c606(0x2b2)]+'}':''));}}if(!_0x111147)_0x3fdb56[_0x54c606(0x206)](_0x54c606(0x180));return _0x3fdb56[_0x54c606(0xf4)]('\x0a');}function _0xf32f4a(){const _0x227f66=_0x70ef;if(!_0x15bd6())return;const _0x495b75=Math[_0x227f66(0x293)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x5d5473=Date[_0x227f66(0x1a7)]();for(const _0x120e1a of _0x2d987a){const _0x5304f9=_0x120e1a&&_0x120e1a[_0x227f66(0x24d)];if(!_0x5304f9)continue;for(const [_0x355526,_0x596773]of _0x5304f9){const _0x166463=_0x596773&&_0x596773[_0x227f66(0x269)]&&_0x596773[_0x227f66(0x269)][_0x227f66(0xde)];if(!_0x166463)continue;let _0x2b35f2;try{_0x2b35f2=Atomics[_0x227f66(0x250)](_0x166463,0x0);}catch{continue;}const _0x44ac70=_0x120e1a[_0x227f66(0x26a)]+'|'+_0x355526;if(_0x2b35f2<=0x0){_0x1eb853[_0x227f66(0x200)](_0x44ac70);continue;}const _0x35a2c3=_0x5d5473-_0x2b35f2*0x3e8,_0x2abeb9=_0x1eb853[_0x227f66(0x10c)](_0x44ac70);if(_0x35a2c3<_0x495b75)continue;if(_0x2abeb9&&_0x5d5473-_0x2abeb9[_0x227f66(0x29c)]<_0x495b75)continue;_0x1eb853[_0x227f66(0x198)](_0x44ac70,{'firstTs':_0x2abeb9?_0x2abeb9['firstTs']:_0x2b35f2,'dumpedAt':_0x5d5473});const _0x2c2c3f='\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20'+_0x35a2c3+_0x227f66(0x1fc)+_0x355526+_0x227f66(0x109)+new Date()['toISOString']()+_0x227f66(0x116)+process['pid']+_0x227f66(0x29e);_0x326abf([_0x2c2c3f,_0x1b03cd(),'='['repeat'](_0x2c2c3f[_0x227f66(0x202)]-0x1)]['join']('\x0a'));}}}function _0x5f4890(){const _0x517776=_0x70ef;if(!_0x15bd6()||_0x2c24bf)return;_0x2c24bf=!![],process[_0x517776(0x118)](_0x517776(0x1e3),_0x39fb6e),process[_0x517776(0x118)]('unhandledRejection',_0xc1c6a4);const _0x53027e=Math[_0x517776(0x293)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x410411=setInterval(_0xf32f4a,_0x53027e);if(_0x410411[_0x517776(0x187)])_0x410411['unref']();}function _0x2af6be(_0x18b034){if(!_0x15bd6()||!_0x18b034)return;_0x2d987a['add'](_0x18b034),_0x5f4890();}function _0x14cf5c(_0x1588d0){_0x2d987a['delete'](_0x1588d0);}function _0x5e1a9e(){if(!_0x15bd6())return{'enabled':![],'hint':'set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)'};return{'enabled':!![],'stackCapture':!!_0x759919,'recentWrites':_0xfc425f(0x10),'drain':_0x1b03cd()};}return okdbDiag={'isEnabled':_0x15bd6,'recordWrite':_0x3991b1,'installDiag':_0x5f4890,'registerOkdb':_0x2af6be,'unregisterOkdb':_0x14cf5c,'snapshot':_0x5e1a9e},okdbDiag;}function _0x1e20(){const _0x486d48=['allSettled','\x20│\x20','resetReadTxn','name','catch','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','_wantDbOf','abs','FTS_DROP','killable','_publishNow','extend','feed:','_buildProcessingFacet','clear','schema:drop','stopHeartbeat','putNode','selfKey','change','respawnTimer','[okdb-cluster]\x20','__vocab/version','http-server','_coordinator','path','view:progress','_windowCbs','ttl:expired','percentile','_timer','license:activated','[okdb-cluster]\x20worker\x20pid=','mkdirSync','_participate','has','FTS_REGISTERED','workersConfigured','noteListenAddr','\x20statusEnv=','stringify','field:resolver_registered','\x20drainAge=','role','value','oldestPendingMs','dropping','decommissioned','hard-killed','ttl:set','MAX_POOL_HOLDS','heldBy','_lock','transactionSync','startHeartbeat','_quantum','_collectSingletonClaims','message','VIEW_PROGRESS','race','FTS_RESET','_clusterOrphanWatch','putSync','crypto','reap','registry\x20publish\x20failing:\x20','max','_hbTimer','_putRowSync','freeze','_processStartedAt','ppid','ESRCH','~processes:desired','emit','dumpedAt','ENV_CLOSING_RETRY','\x20===','registerIndex','_started','_acquiredAt','_systemEnv','msg','namespace','_ownMeta','dead','SIGKILL','749790troJeP','okdb','\x20(slot=','cluster-wide','1ofN:','unique:violation','okdb-diag.','procmode/','_rowKey','depth','parkedNow','transaction','stats','_wantDbHandle','cpuWindowMs','resetting','dropIndex','_isStale','split','bus:env_release','node:perf_hooks','exit','_pendingLocal',')\x20exited\x20','REMOVE','_nestedWarned','_desired','_cmd','size','close','license:added','processing','lifecycle','resetIndex','_startHeartbeat','type:registered','_caps','_sandbox','draining','log','[okdb-cluster]\x20primary\x20pid=','holder','index:ready','perf_hooks','_bpWaiters','ITEM_CREATE','_enableChangelog','system:drain','_flushDebounce','round','_groupByProcess','SYNC_COMMITS','_buildOwnRow','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','okdb-writer[','none','okdb-writer:\x20env\x20closing\x20—\x20retry','_onProcEvent','_enqueuedAt','isPrimary','meta','_scheduleFlush','disable','engines','unclaimed','license:invalid','_lastPublishAt','processor:ready','publishChildRow','cpuUsage','stop','win32',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','raw-remove','_inflight','_highWater','external','4439491KxAuQr','sync:apply','reportThreadStats','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','process\x20','_markSeen','single','item:create','_writer','info','appendFileSync','workers','stack','node','mode','_getType','bus:type_drop','ms\x20(attempt\x20','function','shift','platform','start','cluster','all','listen','_maybePublish','processor:paused','list','decommissioning','raw-put','map','stopping','_servingEngines','splice','clearTtl','removeSync','drain','_clusterOnMessage','_pending','fanout','isWanted','markClosed','connected','hostname','filter','warn','3300616VXUidK','fast','view','_buckets','send','\x20parkedNow=','system:proc','_statusEnv','randomUUID','_versionSkewWarned','item:update','reset','processorsView','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','isEnabled','processes','_role','claimGated','\x20ipc\x20error:\x20','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','startsWith','note','_handlePending','off','join','ms/','version','ms\x20env=','(worst\x20','listenAddr','updatedAt','setDesired','\x20died\x20','beforeWrite','clearThreadStats','openDB','license:removed','index:drop','starting','txn:start','getProcess','_clusterWorkerAttached','_publishFailWarned','http','rss','\x20@\x20','_sampleOwnStats','acquiredAt','get','_drainOne','type:drop','_nodeDbFor','error','release','_heartbeatInFlight','_singletonLocks','stderr','--print','\x20pid=','sort','prependListener','childTransaction','label','ref:violation',',\x20signal=','env','SYSTEM_STOPPED','primary','pushEphemeral','find','_onPending','rows=','getChanges','nodeKey','instances','system:stopped',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','_adminRelay','_putRowAsync','worker','startedAt','ITEM_PENDING','slot','registry-publish','_lastCpuWindowMs','1052148xUYwHl','isActive','register','closing','_selfKey','index:progress','_listenAddr','_lockDb','_heldTotal','1549293iJVmpc','started','txn:end','async','6fEiJIq','\x20worker(s)\x20still\x20serving','_seen','processor:resumed','registry\x20heartbeat\x20skipped\x20(writer=','maxMs','standalone','bus:poke','system:env_release','--test','setTtl','ms\x20activeWriters=','busy','kill','object','txn:rollback','claims','mean',');\x20','exports','process','number','loop-lag\x20','_lastCpuUsage','runtimeProcessesView','entries','_assertUsable','children','type','then','heartbeatMs','_children','schema:set','_instanceId','_admissionTimer','instanceId','processingStatusView','_outstanding','quantum','_baselines','_singletonLock','setLogger','waiting','maxExtra','listening','_ensureDesired','listNodes','state','_lockDbOf','some','9slqqoV','system:ready','isWorker','_held','processingSig','_nestedTotal','dedupeMax','toFixed','_heartbeatTimer','values','_bpParkedTotal','min','_log','prototype','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.','expiresAt','\x20\x20(no\x20env\x20draining)','_kind','resolve','createEnvironment','~lock','_nodeDb','copy','unref','getClock','getCmd','CHANGEFEED_QUANTUM','sync','once','processor:progress','removeNode','\x20writer{depth=','running','user','uptime','registerFts','kind','processor:error','_migrateVocab','_draining','set','host','2.6.1','system:bus_state_change','ingest','_durs','isDead','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','dropFts','trim','[okdb-cluster]\x20slot=','execArgv','_refreshDesiredSnapshot','status','enabled','now','_collectWriterFacet','_rootDb','deaths','INDEX_READY','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','okdb-lock:\x20env\x20closed','resetFts','_activateProcesses','threads','options','ITEM_REMOVE','_handlePoke','_cursors','_admissionStarted','INDEX_PROGRESS','\x20\x20env=','_nodeDbCache','_dedupeMax','enable','SYSTEM_PROC','_rawDb','singletonClaims','code','put','_released','pid','processor:retry','parse','cursorKey','getDesired','getRange','_key','index:reset','_isReader','_supervisorKey','open','--inspect','queue-worker','processors','registerType','rowKey','next','reduce','true','_onTick','isConnected','\x20(durable\x20desired-state)','_db','setOwnMeta','_onPoke','\x20phase=','item:pending','fromEntries','_dedupeKey','_flushTimer','decommission','updateSupervisedChildStats','count','23736370jhRypV','uncaughtException','online','__okdbSlot','committed','tierList','participate','indexOf','_onStop','hasDesired','commit','_threadStats','_report','level','add',':want','commitsPerSec','--eval','\x0a===\x20OKDB_DIAG\x20','string','listDesired','fn-runner','sandbox','__esModule','[okdb-cluster]\x20respawning\x20worker\x20slot=','embedded','ms\x20on\x20env=','(code=','system','cli','delete','cpus','length','_nodeDead','ORPHAN\x20(env-closed\x20write)','_startAdmission','push','dropSchema','item:remove','default','\x20sync','processKey','disconnect','_removeRowAsync','afterWrite','listAll','attachFeed','_closed','ttlMs','migrations','fork','slotKey','_buildChildRow','clusterStatusView','_desiredOverlay','slice','signalWant','remove','__okdbCluster','heapUsed','_committed','floor','consecutiveFailures','procmodeack/','_isWriter','memoryUsage','system:poke','\x20times\x20in\x20','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','env:opened','includes','_wantDb','write','_drain','supervisorKey','building','SYSTEM_POKE','replace','5wJRexT','ready','epoch','_done','events','commitP99Ms','4399548ZEMsEI','created','confirm','withPoolHold','\x20in\x20','fts:reset','processorId','_lastCpuPct','setupPrimary','ms\x20p99=','_holderDead','okdb-http-worker-child.js','test','ttl:clear','nodesView','loop-lag','./okdb','caps','INDEX_RESET','\x0a\x20\x20\x20\x20\x20\x20','ms\x20mean=','~processes','_onItem','_envs','heapTotal','node/','load'];_0x1e20=function(){return _0x486d48;};return _0x1e20();}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x17b1f0=_0xa5e620;if(hasRequiredOkdbWriter)return okdbWriter[_0x17b1f0(0x151)];hasRequiredOkdbWriter=0x1;const {performance:_0x3c07f3}=require$$0$2,_0x4bf6cf=requireOkdbDiag(),_0x1f8797=process.env.OKDB_COMMIT_MODE===_0x17b1f0(0x18b);class _0x17da11{constructor(_0x136ab8){const _0x5c4faf=_0x17b1f0;this[_0x5c4faf(0x11d)]=_0x136ab8,this[_0x5c4faf(0xab)]=new Set(),this['_enqueuedAt']=new Map(),this[_0x5c4faf(0x21e)]=0x0,this[_0x5c4faf(0x19d)]=[],this[_0x5c4faf(0x233)]=[],this[_0x5c4faf(0xac)]=Math[_0x5c4faf(0x293)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x5c4faf(0x163)]=0x0,this[_0x5c4faf(0x8d)]=[],this[_0x5c4faf(0x17a)]=0x0,this[_0x5c4faf(0x173)]=null,this[_0x5c4faf(0x139)]=0x0,this[_0x5c4faf(0x175)]=0x0,this[_0x5c4faf(0x2c1)]=![];}async[_0x17b1f0(0x2b3)](_0x38f5b8,_0x50ebe6,{admitted:admitted=![]}={}){const _0xc6d478=_0x17b1f0;if(_0x4bf6cf[_0xc6d478(0xea)]())_0x4bf6cf['recordWrite'](this[_0xc6d478(0x11d)]?.[_0xc6d478(0x254)],_0x50ebe6);if(this[_0xc6d478(0x211)]){const _0x47d3c0=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x47d3c0[_0xc6d478(0x1be)]=_0xc6d478(0x29d);throw _0x47d3c0;}if(this[_0xc6d478(0xac)]>0x0){let _0x2d7d65=![];while(this[_0xc6d478(0x163)]>=this[_0xc6d478(0xac)]&&!this[_0xc6d478(0x211)]){!_0x2d7d65&&(_0x2d7d65=!![],this['_bpParkedTotal']++),await new Promise(_0x39cc00=>this['_bpWaiters'][_0xc6d478(0x206)](_0x39cc00));}if(this['_closed']){const _0xfd0cb5=new Error(_0xc6d478(0x99));_0xfd0cb5['code']=_0xc6d478(0x29d);throw _0xfd0cb5;}}this[_0xc6d478(0x163)]++;const _0x458f96=admitted?null:this[_0xc6d478(0x11d)]['_coordinator'];for(;;){while(this['_held'])await this[_0xc6d478(0x173)];if(_0x458f96)try{await _0x458f96[_0xc6d478(0xfd)]();}catch(_0x178eb9){this[_0xc6d478(0x163)]--;if(this['_bpWaiters'][_0xc6d478(0x202)]&&this[_0xc6d478(0x163)]<this[_0xc6d478(0xac)])this[_0xc6d478(0x8d)][_0xc6d478(0xc1)]()();throw _0x178eb9;}if(!this['_held'])break;if(_0x458f96)_0x458f96['afterWrite']();}if(this[_0xc6d478(0x211)]){if(_0x458f96)_0x458f96[_0xc6d478(0x20e)]();this['_outstanding']--;if(this[_0xc6d478(0x8d)][_0xc6d478(0x202)]&&this[_0xc6d478(0x163)]<this[_0xc6d478(0xac)])this[_0xc6d478(0x8d)][_0xc6d478(0xc1)]()();const _0x44233c=new Error(_0xc6d478(0x99));_0x44233c[_0xc6d478(0x1be)]='ENV_CLOSING_RETRY';throw _0x44233c;}const _0x2610d1=_0x3c07f3[_0xc6d478(0x1a7)]();if(_0x1f8797)try{const _0x2527c2=this[_0xc6d478(0x11d)]['db'][_0xc6d478(0x286)](_0x38f5b8);this[_0xc6d478(0x21e)]++;if(this[_0xc6d478(0x19d)][_0xc6d478(0x206)](_0x3c07f3[_0xc6d478(0x1a7)]()-_0x2610d1)>0x100)this[_0xc6d478(0x19d)][_0xc6d478(0xc1)]();if(this[_0xc6d478(0x233)][_0xc6d478(0x206)](_0x3c07f3[_0xc6d478(0x1a7)]())>0x800)this['_done'][_0xc6d478(0xc1)]();return _0x2527c2;}finally{this['_outstanding']--;if(this[_0xc6d478(0x8d)]['length']&&this['_outstanding']<this[_0xc6d478(0xac)])this[_0xc6d478(0x8d)][_0xc6d478(0xc1)]()();if(_0x458f96)_0x458f96[_0xc6d478(0x20e)]();}let _0x4f44e3=null;const _0x272a38=()=>{const _0x3b27e2=_0xc6d478,_0x10793a=_0x38f5b8();if(_0x10793a&&typeof _0x10793a[_0x3b27e2(0x15b)]===_0x3b27e2(0xc0)&&!_0x4f44e3){this[_0x3b27e2(0x139)]++;let _0xf7a95b;const _0x21a1b8=new Promise(_0x3da250=>_0xf7a95b=_0x3da250);this[_0x3b27e2(0x173)]=_0x21a1b8,_0x4f44e3=()=>{const _0x45b6c6=_0x3b27e2;if(this[_0x45b6c6(0x173)]===_0x21a1b8)this[_0x45b6c6(0x173)]=null;_0xf7a95b();};}return _0x10793a;};let _0x3d4967;try{_0x3d4967=this[_0xc6d478(0x11d)]['db']['childTransaction'](_0x272a38);}catch(_0x2a9b28){_0x3d4967=Promise['reject'](_0x2a9b28);}(!_0x3d4967||typeof _0x3d4967[_0xc6d478(0x15b)]!==_0xc6d478(0xc0))&&(this[_0xc6d478(0x175)]++,!this[_0xc6d478(0x2c1)]&&(this[_0xc6d478(0x2c1)]=!![],console[_0xc6d478(0xdb)](_0xc6d478(0x97)+(this[_0xc6d478(0x11d)]?.[_0xc6d478(0x254)]??'?')+_0xc6d478(0xa9))),_0x3d4967=Promise[_0xc6d478(0x182)](_0x3d4967));const _0x4fe6f8=()=>{if(_0x4f44e3)_0x4f44e3();};_0x3d4967['then'](_0x4fe6f8,_0x4fe6f8),this[_0xc6d478(0xab)][_0xc6d478(0x1f0)](_0x3d4967),this[_0xc6d478(0x9b)][_0xc6d478(0x198)](_0x3d4967,_0x2610d1);const _0x504604=()=>{const _0x5626ed=_0xc6d478;this[_0x5626ed(0xab)][_0x5626ed(0x200)](_0x3d4967),this[_0x5626ed(0x9b)][_0x5626ed(0x200)](_0x3d4967),this[_0x5626ed(0x21e)]++,this[_0x5626ed(0x163)]--;this[_0x5626ed(0x8d)][_0x5626ed(0x202)]&&this['_outstanding']<this[_0x5626ed(0xac)]&&this[_0x5626ed(0x8d)]['shift']()();if(this[_0x5626ed(0x19d)][_0x5626ed(0x206)](_0x3c07f3[_0x5626ed(0x1a7)]()-_0x2610d1)>0x100)this[_0x5626ed(0x19d)][_0x5626ed(0xc1)]();if(this['_done'][_0x5626ed(0x206)](_0x3c07f3[_0x5626ed(0x1a7)]())>0x800)this['_done'][_0x5626ed(0xc1)]();};_0x3d4967[_0xc6d478(0x15b)](_0x504604,_0x504604);try{return await _0x3d4967;}finally{if(_0x458f96)_0x458f96[_0xc6d478(0x20e)]();}}[_0x17b1f0(0x1a5)](){const _0x1e0450=_0x17b1f0,_0x3e6038=_0x3c07f3[_0x1e0450(0x1a7)]();let _0x263edb=0x0;for(const _0x3aaba7 of this[_0x1e0450(0x9b)]['values']()){const _0x306a10=_0x3e6038-_0x3aaba7;if(_0x306a10>_0x263edb)_0x263edb=_0x306a10;}let _0x4adf99=0x0;for(let _0x3be9e0=this[_0x1e0450(0x233)]['length']-0x1;_0x3be9e0>=0x0;_0x3be9e0--){if(_0x3e6038-this[_0x1e0450(0x233)][_0x3be9e0]>0x3e8)break;_0x4adf99++;}let _0x5024b7=0x0;if(this[_0x1e0450(0x19d)][_0x1e0450(0x202)]){const _0x51f147=[...this['_durs']][_0x1e0450(0x117)]((_0x427180,_0x296447)=>_0x427180-_0x296447);_0x5024b7=_0x51f147[Math['min'](_0x51f147[_0x1e0450(0x202)]-0x1,Math['floor'](_0x51f147[_0x1e0450(0x202)]*0.99))];}return{'depth':this[_0x1e0450(0xab)][_0x1e0450(0x2c4)],'oldestPendingMs':Math['round'](_0x263edb),'committed':this[_0x1e0450(0x21e)],'commitsPerSec':_0x4adf99,'commitP99Ms':Math[_0x1e0450(0x92)](_0x5024b7),'parkedNow':this[_0x1e0450(0x8d)][_0x1e0450(0x202)],'parkedTotal':this['_bpParkedTotal'],'highWater':this[_0x1e0450(0xac)]};}['inflightAgesMs'](){const _0xa7b08e=_0x17b1f0,_0x562700=_0x3c07f3[_0xa7b08e(0x1a7)]();return[...this[_0xa7b08e(0x9b)][_0xa7b08e(0x179)]()][_0xa7b08e(0xcc)](_0x467599=>Math[_0xa7b08e(0x92)](_0x562700-_0x467599))[_0xa7b08e(0x117)]((_0x1c0fe9,_0x1c1b19)=>_0x1c1b19-_0x1c0fe9);}[_0x17b1f0(0xd7)](){const _0x40d0cc=_0x17b1f0;this[_0x40d0cc(0x211)]=!![];for(const _0x296086 of this[_0x40d0cc(0x8d)][_0x40d0cc(0xcf)](0x0))_0x296086();}async[_0x17b1f0(0xd2)](){const _0x1dc79e=_0x17b1f0;let _0x43ee5b=0x0;while(this[_0x1dc79e(0xab)]['size']&&_0x43ee5b++<0x3e8){await Promise[_0x1dc79e(0x251)]([...this[_0x1dc79e(0xab)]]);}}async[_0x17b1f0(0x1bf)](_0x56a49e,_0x49b2b0,_0x4c49f5,_0x4ed679){const _0x59571c=_0x17b1f0;return this[_0x59571c(0x2b3)](()=>{const _0x10376f=_0x59571c;if(_0x4ed679===undefined)_0x56a49e[_0x10376f(0x28f)](_0x49b2b0,_0x4c49f5);else _0x56a49e[_0x10376f(0x28f)](_0x49b2b0,_0x4c49f5,_0x4ed679);},_0x59571c(0xcb));}async[_0x17b1f0(0x21b)](_0x3d0a41,_0x392ce4){const _0x580d8b=_0x17b1f0;return this[_0x580d8b(0x2b3)](()=>_0x3d0a41['removeSync'](_0x392ce4),_0x580d8b(0xaa));}}async function _0x71cff9(_0x5b663f,_0x3d4dff){const _0xf231fb=_0x17b1f0;if(_0x3d4dff==null)_0x3d4dff=Math[_0xf231fb(0x293)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0xf72d76=_0x5b663f?.['flushed'];if(!_0xf72d76||typeof _0xf72d76[_0xf231fb(0x15b)]!==_0xf231fb(0xc0))return;await Promise[_0xf231fb(0x28c)]([Promise[_0xf231fb(0x182)](_0xf72d76)[_0xf231fb(0x255)](()=>{}),new Promise(_0x2f6082=>{const _0x5ba987=_0xf231fb,_0x546f85=setTimeout(_0x2f6082,_0x3d4dff);if(_0x546f85[_0x5ba987(0x187)])_0x546f85[_0x5ba987(0x187)]();})]);}catch{}}function _0x393db2(_0x51de3e){const _0x927db5=_0x17b1f0;if(_0x1f8797)return Promise[_0x927db5(0x182)]();const _0x3d535a=_0x51de3e?.['committed'];return _0x3d535a&&typeof _0x3d535a[_0x927db5(0x15b)]==='function'?_0x3d535a:Promise['resolve']();}const _0xae5d35=Math[_0x17b1f0(0x293)](0x1,Math[_0x17b1f0(0x21f)](Number(process.env.UV_THREADPOOL_SIZE))||0x4),_0x5a5d26=Math[_0x17b1f0(0x293)](0x1,_0xae5d35-0x2);let _0x593dfd=0x0;const _0x57ee42=[];async function _0x2a0af0(_0x223e41){const _0x494c17=_0x17b1f0;if(_0x593dfd<_0x5a5d26)_0x593dfd++;else await new Promise(_0x3448d6=>_0x57ee42['push'](_0x3448d6));try{return await _0x223e41();}finally{const _0x460a2d=_0x57ee42[_0x494c17(0xc1)]();if(_0x460a2d)_0x460a2d();else _0x593dfd--;}}return okdbWriter['exports']=_0x17da11,okdbWriter[_0x17b1f0(0x151)][_0x17b1f0(0x239)]=_0x2a0af0,okdbWriter['exports'][_0x17b1f0(0x283)]=_0x5a5d26,okdbWriter[_0x17b1f0(0x151)]['flushLmdb']=_0x71cff9,okdbWriter[_0x17b1f0(0x151)]['committed']=_0x393db2,okdbWriter[_0x17b1f0(0x151)][_0x17b1f0(0x94)]=_0x1f8797,okdbWriter['exports'];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x282cc7=_0xa5e620;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x49b668=require$$0$3,{SYNC_COMMITS:_0x473a8f}=requireOkdbWriter(),_0x14bfa0=_0x282cc7(0x184);class _0x38fcbd{constructor(_0x151cd0,_0x368d80,_0x9d15){const _0x17789a=_0x282cc7;this['_lock']=_0x151cd0,this[_0x17789a(0x1c7)]=_0x368d80,this['_acquiredAt']=_0x9d15,this['_released']=![],this[_0x17789a(0x178)]=null,this[_0x17789a(0x112)]=null;}['isHeld'](){const _0x77652a=_0x282cc7;if(this['_released'])return![];try{const _0x19e55b=this[_0x77652a(0x285)][_0x77652a(0x1d7)]()['get'](this['_key']);if(!_0x19e55b||_0x19e55b[_0x77652a(0x10b)]!==this[_0x77652a(0x2a1)])return![];const _0x34c47d=_0x19e55b['updatedAt']??_0x19e55b[_0x77652a(0x10b)];if(_0x34c47d+_0x19e55b[_0x77652a(0x212)]<Date[_0x77652a(0x1a7)]())return![];return!![];}catch{return!this[_0x77652a(0x1c0)];}}[_0x282cc7(0x8a)](){const _0x4112a1=_0x282cc7;if(this['_released'])return null;try{return this[_0x4112a1(0x285)][_0x4112a1(0x1d7)]()[_0x4112a1(0x10c)](this['_key'])??null;}catch{return null;}}async[_0x282cc7(0x25c)](_0x450e52){const _0x391d44=_0x282cc7;if(this[_0x391d44(0x1c0)])return;try{if(this[_0x391d44(0x285)][_0x391d44(0x211)]())return;const _0x2f1a41=this[_0x391d44(0x285)][_0x391d44(0x1d7)]()[_0x391d44(0x10c)](this[_0x391d44(0x1c7)]);if(!_0x2f1a41||_0x2f1a41[_0x391d44(0x10b)]!==this['_acquiredAt'])return;if(_0x473a8f)this[_0x391d44(0x285)][_0x391d44(0x1d7)]()[_0x391d44(0x28f)](this[_0x391d44(0x1c7)],{..._0x2f1a41,'ttlMs':_0x2f1a41[_0x391d44(0x212)]+_0x450e52});else await this[_0x391d44(0x285)]['_db']()[_0x391d44(0x1bf)](this[_0x391d44(0x1c7)],{..._0x2f1a41,'ttlMs':_0x2f1a41['ttlMs']+_0x450e52});}catch{}}async[_0x282cc7(0x111)](){const _0xbfa140=_0x282cc7;if(this[_0xbfa140(0x1c0)])return;if(this[_0xbfa140(0x112)])try{await this[_0xbfa140(0x112)];}catch{}clearInterval(this['_heartbeatTimer']),this[_0xbfa140(0x178)]=null,this[_0xbfa140(0x1c0)]=!![];try{if(this['_lock'][_0xbfa140(0x211)]())return;const _0x3c03b6=this[_0xbfa140(0x285)][_0xbfa140(0x1d7)]()[_0xbfa140(0x10c)](this[_0xbfa140(0x1c7)]);if(_0x3c03b6&&_0x3c03b6[_0xbfa140(0x10b)]===this['_acquiredAt']){if(_0x473a8f)this[_0xbfa140(0x285)][_0xbfa140(0x1d7)]()[_0xbfa140(0xd1)](this[_0xbfa140(0x1c7)]);else await this[_0xbfa140(0x285)][_0xbfa140(0x1d7)]()[_0xbfa140(0x21b)](this[_0xbfa140(0x1c7)]);}}catch{}}[_0x282cc7(0x83)](_0x332a56,_0x317f20){const _0x357323=_0x282cc7,_0x386bb4=_0x317f20??Math[_0x357323(0x21f)](_0x332a56/0x3);this[_0x357323(0x178)]=setInterval(()=>{const _0x24fed6=_0x357323;if(this[_0x24fed6(0x1c0)])return;this[_0x24fed6(0x112)]=((async()=>{const _0x628069=_0x24fed6;try{if(this['_lock'][_0x628069(0x211)]())return;const _0x26923e=this[_0x628069(0x285)][_0x628069(0x1d7)]()[_0x628069(0x10c)](this[_0x628069(0x1c7)]);if(!_0x26923e||_0x26923e['acquiredAt']!==this[_0x628069(0x2a1)]){this[_0x628069(0x1c0)]=!![],clearInterval(this['_heartbeatTimer']),this['_heartbeatTimer']=null;return;}if(_0x473a8f)this[_0x628069(0x285)][_0x628069(0x1d7)]()[_0x628069(0x28f)](this['_key'],{..._0x26923e,'updatedAt':Date['now']()});else await this[_0x628069(0x285)][_0x628069(0x1d7)]()[_0x628069(0x1bf)](this[_0x628069(0x1c7)],{..._0x26923e,'updatedAt':Date[_0x628069(0x1a7)]()});}catch{}this['_heartbeatInFlight']=null;})());},_0x386bb4);if(this[_0x357323(0x178)][_0x357323(0x187)])this[_0x357323(0x178)]['unref']();}}class _0x143055{constructor(_0x377fb0,{namespace:_0x285b84,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x2e757d=_0x282cc7;this[_0x2e757d(0x1bc)]=_0x377fb0,this[_0x2e757d(0x2a4)]=_0x285b84,this['ttlMs']=ttlMs,this[_0x2e757d(0x15c)]=heartbeatMs,this[_0x2e757d(0x138)]=null;}['_db'](){const _0x2f2e48=_0x282cc7;return this[_0x2f2e48(0x158)](),(!this[_0x2f2e48(0x138)]||this[_0x2f2e48(0x16e)]!==this[_0x2f2e48(0x1bc)])&&(this[_0x2f2e48(0x138)]=this[_0x2f2e48(0x1bc)][_0x2f2e48(0xff)](_0x14bfa0,{'dupSort':![]}),this[_0x2f2e48(0x16e)]=this['_rawDb']),this[_0x2f2e48(0x138)];}[_0x282cc7(0x229)](){const _0x1c9e8f=_0x282cc7;return this[_0x1c9e8f(0x158)](),(!this[_0x1c9e8f(0x2b5)]||this[_0x1c9e8f(0x257)]!==this[_0x1c9e8f(0x1bc)])&&(this[_0x1c9e8f(0x2b5)]=this[_0x1c9e8f(0x1bc)]['openDB'](_0x14bfa0+_0x1c9e8f(0x1f1),{'dupSort':![]}),this[_0x1c9e8f(0x257)]=this[_0x1c9e8f(0x1bc)]),this[_0x1c9e8f(0x2b5)];}[_0x282cc7(0x211)](){const _0x45d407=_0x282cc7,_0x343f52=this[_0x45d407(0x1bc)]?.['status'];return _0x343f52===_0x45d407(0x134)||_0x343f52==='closed';}[_0x282cc7(0x158)](){const _0xec0554=_0x282cc7;if(this['_closed']())throw new Error(_0xec0554(0x1ad));}[_0x282cc7(0x1c7)](_0x302049){return this['namespace']+':'+_0x302049;}[_0x282cc7(0x21a)](_0x46bad0){const _0x2bfc46=_0x282cc7;try{if(this[_0x2bfc46(0x211)]())return;_0x473a8f?this[_0x2bfc46(0x229)]()[_0x2bfc46(0x28f)](this[_0x2bfc46(0x1c7)](_0x46bad0),Date['now']()):this[_0x2bfc46(0x229)]()[_0x2bfc46(0x1bf)](this[_0x2bfc46(0x1c7)](_0x46bad0),Date[_0x2bfc46(0x1a7)]())?.[_0x2bfc46(0x255)]?.(()=>{});}catch{}}[_0x282cc7(0xd6)](_0x3fcc9a,_0x42778f=0x3e8){const _0x723041=_0x282cc7;try{const _0x46d5f6=this[_0x723041(0x229)]()['get'](this[_0x723041(0x1c7)](_0x3fcc9a));return typeof _0x46d5f6==='number'&&Date[_0x723041(0x1a7)]()-_0x46d5f6<_0x42778f;}catch{return![];}}[_0x282cc7(0x2b9)](_0xb3de3){const _0xcc072c=_0x282cc7,_0x555490=_0xb3de3[_0xcc072c(0xfa)]??_0xb3de3[_0xcc072c(0x10b)];return _0x555490+_0xb3de3[_0xcc072c(0x212)]<Date['now']();}static[_0x282cc7(0x240)](_0x5de783){const _0x25fa57=_0x282cc7,_0x3a39ee=_0x5de783?.[_0x25fa57(0x8a)];if(!_0x3a39ee||typeof _0x3a39ee[_0x25fa57(0x1c1)]!==_0x25fa57(0x153))return![];if(_0x3a39ee[_0x25fa57(0xd9)]!==_0x49b668['hostname']())return![];if(_0x3a39ee['pid']===process[_0x25fa57(0x1c1)])return![];try{return process[_0x25fa57(0x14b)](_0x3a39ee[_0x25fa57(0x1c1)],0x0),![];}catch(_0xdb362d){return _0xdb362d['code']===_0x25fa57(0x299);}}async['tryAcquire'](_0x2e6697,_0x4e207b={},_0x3cb67e={}){const _0x122fa9=_0x282cc7,_0xb6f198=this[_0x122fa9(0x1c7)](_0x2e6697),_0x3082ec=_0x3cb67e[_0x122fa9(0x212)]??this['ttlMs'],_0x5419ed=Date[_0x122fa9(0x1a7)](),_0x44d857={'holder':{'pid':process[_0x122fa9(0x1c1)],'hostname':_0x49b668[_0x122fa9(0xd9)](),..._0x4e207b},'acquiredAt':_0x5419ed,'updatedAt':_0x5419ed,'ttlMs':_0x3082ec};let _0x45bb66=![],_0x1a62f4=null;if(this['_closed']())return{'acquired':![],'handle':null,'current':null};try{const _0x8a9ded=()=>{const _0x4b1717=_0x122fa9,_0x520e3f=this[_0x4b1717(0x1d7)]()[_0x4b1717(0x10c)](_0xb6f198);if(_0x520e3f&&!this[_0x4b1717(0x2b9)](_0x520e3f)&&!_0x143055[_0x4b1717(0x240)](_0x520e3f)){const _0x1b4092=_0x4e207b[_0x4b1717(0x23c)]!=null&&_0x520e3f['holder']['pid']===process['pid']&&_0x520e3f[_0x4b1717(0x8a)][_0x4b1717(0x23c)]===_0x4e207b[_0x4b1717(0x23c)];if(!_0x1b4092){_0x45bb66=![],_0x1a62f4=_0x520e3f;return;}_0x44d857[_0x4b1717(0x10b)]<=_0x520e3f['acquiredAt']&&(_0x44d857[_0x4b1717(0x10b)]=_0x520e3f[_0x4b1717(0x10b)]+0x1,_0x44d857[_0x4b1717(0xfa)]=_0x44d857['acquiredAt']);}this[_0x4b1717(0x1d7)]()[_0x4b1717(0x1bf)](_0xb6f198,_0x44d857),_0x45bb66=!![],_0x1a62f4=_0x44d857;};if(_0x473a8f)this[_0x122fa9(0x1d7)]()[_0x122fa9(0x286)](_0x8a9ded);else await this['_db']()[_0x122fa9(0x119)](_0x8a9ded);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x45bb66)return{'acquired':![],'handle':null,'current':_0x1a62f4};const _0x21221c=new _0x38fcbd(this,_0xb6f198,_0x44d857['acquiredAt']);return _0x21221c['_startHeartbeat'](_0x3082ec,this[_0x122fa9(0x15c)]),{'acquired':!![],'handle':_0x21221c,'current':_0x1a62f4};}['inspect'](_0x3c365c){const _0x1a6d34=_0x282cc7;try{return this[_0x1a6d34(0x1d7)]()[_0x1a6d34(0x10c)](this[_0x1a6d34(0x1c7)](_0x3c365c))??null;}catch{return null;}}[_0x282cc7(0xc9)](){const _0x51d477=_0x282cc7,_0x2940d5=this[_0x51d477(0x2a4)]+':',_0x3a3a27=[];try{for(const {key:_0x3b6746,value:_0x5c1e33}of this['_db']()['getRange']({'start':_0x2940d5,'end':_0x2940d5+'\xff'})){typeof _0x3b6746===_0x51d477(0x1f5)&&_0x3b6746['startsWith'](_0x2940d5)&&_0x3a3a27['push']({'id':_0x3b6746[_0x51d477(0x219)](_0x2940d5[_0x51d477(0x202)]),'entry':_0x5c1e33});}}catch{}return _0x3a3a27;}static[_0x282cc7(0x20f)](_0x55114e){const _0x58f3be=_0x282cc7,_0x142b07=[];try{const _0x1519ba=_0x55114e[_0x58f3be(0xff)](_0x14bfa0,{'dupSort':![]});for(const {key:_0x5d8ce0,value:_0x464747}of _0x1519ba[_0x58f3be(0x1c6)]({})){if(typeof _0x5d8ce0!==_0x58f3be(0x1f5))continue;const _0x266d4d=_0x5d8ce0['indexOf'](':');if(_0x266d4d<0x1)continue;_0x142b07[_0x58f3be(0x206)]({'namespace':_0x5d8ce0['slice'](0x0,_0x266d4d),'id':_0x5d8ce0[_0x58f3be(0x219)](_0x266d4d+0x1),'entry':_0x464747});}}catch{}return _0x142b07;}}return okdbLock={'OKDBLock':_0x143055},okdbLock;}var version=_0xa5e620(0x19a),require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x468433=_0xa5e620;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x596be7=require$$0$3,_0x4c308f=require$$1$1,_0x82104=require$$2,{LOOP:_0x2a1fe2}=requireOkdbLoopMonitor(),{OKDBLock:_0x5bf68e}=requireOkdbLock(),{SYNC_COMMITS:_0x3a4305}=requireOkdbWriter(),_0x3e9705=_0x468433(0x24b),_0x1f2a53=_0x468433(0xbb),_0x432641=_0x468433(0x29a),_0x4e0e8d='~processes:cmd',_0x4b3643=(_0x17355e,_0xb6cae0)=>_0x17355e+':'+_0xb6cae0,_0x50f8d3=(_0x4c2f0b,_0x44d808)=>_0x4c2f0b+'::'+_0x44d808,_0x5bab41=(_0x5b2e60,_0x4dd641)=>_0x5b2e60+'/'+_0x4dd641,_0x5a2ed8=(_0x374b44,_0x497725)=>_0x374b44+'#'+_0x497725,_0x46d951=_0x1b7090=>{const _0x5156ee=_0x468433;if(_0x1b7090?.[_0x5156ee(0x20b)])return _0x1b7090[_0x5156ee(0x20b)];const _0xd112b9=_0x1b7090?.['nodeKey'];return typeof _0xd112b9===_0x5156ee(0x1f5)&&_0xd112b9[_0x5156ee(0x228)]('#')?_0xd112b9[_0x5156ee(0x219)](0x0,_0xd112b9[_0x5156ee(0x1e9)]('#')):_0xd112b9;},_0x37d55a=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x1b0310=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x410fca=_0x37d55a*0x3,_0x27c1a3=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x468433(0x293)](0x927c0,_0x410fca*0x14),_0x47f7c3=[_0x468433(0x18d),'processor:ready','processor:retry',_0x468433(0x195),_0x468433(0xc8),_0x468433(0x141)];let _0x14d4f4=null;function _0x53fc56(){const _0x218651=_0x468433;if(_0x14d4f4==null)_0x14d4f4=Math['round']((Date[_0x218651(0x1a7)]()-process[_0x218651(0x192)]()*0x3e8)/0x3e8)*0x3e8;return _0x14d4f4;}function _0x53a4d6(_0x1c6b9c){const _0x3660ac=_0x468433;if(process.env.OKDB_PROCESS_KILL===_0x3660ac(0xf3))return![];if(_0x1c6b9c?.[_0x3660ac(0x1b1)]?.[_0x3660ac(0xeb)]&&typeof _0x1c6b9c[_0x3660ac(0x1b1)]['processes']===_0x3660ac(0x14c)&&_0x1c6b9c[_0x3660ac(0x1b1)][_0x3660ac(0xeb)][_0x3660ac(0x14b)]===![])return![];return!![];}function _0x26c283(_0x4ba61b,_0x591d4e){const _0x180b42=_0x468433,_0x1d2565=!!_0x591d4e?.[_0x180b42(0x1ce)];switch(_0x4ba61b){case'primary':return{'controllable':_0x1d2565,'decommissionable':![],'killable':!![],'killConfirm':_0x180b42(0x2ab)};case _0x180b42(0x1ff):case _0x180b42(0x144):return{'controllable':_0x1d2565,'decommissionable':![],'killable':!![],'killConfirm':_0x180b42(0x238)};case _0x180b42(0x1fb):return{'controllable':![],'decommissionable':![],'killable':![]};case'http-server':case _0x180b42(0x1cd):case _0x180b42(0x1f7):case _0x180b42(0x12b):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':'force'};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x1f04cf{constructor(_0x408dae){const _0x4e6207=_0x468433;this['okdb']=_0x408dae,this[_0x4e6207(0xe3)]=null,this['_desired']=null,this['_desiredOverlay']=new Map(),this[_0x4e6207(0x2c3)]=null,this[_0x4e6207(0x222)]=![],this[_0x4e6207(0x1c9)]=![],this[_0x4e6207(0x297)]=_0x53fc56(),this[_0x4e6207(0x135)]=_0x4b3643(process['pid'],this[_0x4e6207(0x297)]),this[_0x4e6207(0x15f)]=_0x82104[_0x4e6207(0xe4)]()['slice'](0x0,0x8),this['_rowKey']=_0x5a2ed8(this[_0x4e6207(0x135)],this[_0x4e6207(0x15f)]),this['_startedAt']=Date['now'](),this[_0x4e6207(0x181)]=null,this[_0x4e6207(0x1ca)]=null,this[_0x4e6207(0x137)]=null,this[_0x4e6207(0x294)]=null,this[_0x4e6207(0x9a)]=null,this['_onTick']=null,this[_0x4e6207(0xa3)]=0x0,this[_0x4e6207(0x2a5)]={},this[_0x4e6207(0x15d)]=new Map(),this[_0x4e6207(0x155)]=process[_0x4e6207(0xa6)](),this['_lastCpuAt']=Date[_0x4e6207(0x1a7)](),this['_lastCpuPct']=0x0,this['_threadStats']=new Map();}get[_0x468433(0x263)](){const _0x5e47db=_0x468433;return this[_0x5e47db(0x135)];}get[_0x468433(0x1d0)](){return this['_rowKey'];}[_0x468433(0x85)](_0x3894c5,_0x41dc76){const _0x2c55e6=_0x468433,_0x3d5bf3=_0x26c283(_0x3894c5,_0x41dc76);if(_0x3d5bf3[_0x2c55e6(0x25a)]&&!_0x53a4d6(this[_0x2c55e6(0x2a9)]))return{..._0x3d5bf3,'killable':![],'killConfirm':undefined};return _0x3d5bf3;}[_0x468433(0x132)](){return!!this['_statusEnv'];}[_0x468433(0x1d8)](_0x3c8a59){const _0x1791ed=_0x468433;Object['assign'](this[_0x1791ed(0x2a5)],_0x3c8a59||{});}[_0x468433(0x277)](_0x1f56cd){const _0x1b719d=_0x468433;if(_0x1f56cd)this[_0x1b719d(0x137)]=_0x1f56cd;}[_0x468433(0x133)](_0xd23189={}){const _0x4deb86=_0x468433;return this['okdb'][_0x4deb86(0x1af)](_0xd23189);}[_0x468433(0x162)](){const _0x11aada=_0x468433,_0x94bf62={};let _0x566d5b=0x0,_0x3f0f0c=0x0;const _0x5cb8ac=new Set();for(const _0x2070b7 of this['listNodes']()){_0x3f0f0c++;const _0xe19bca=_0x2070b7[_0x11aada(0x2c7)];if(!_0xe19bca)continue;if(_0xe19bca[_0x11aada(0x1e8)])_0x566d5b++;for(const _0xd3cc80 of _0xe19bca[_0x11aada(0x1ce)]||[]){if(![_0x11aada(0xb4),_0x11aada(0xd5)][_0x11aada(0x228)](_0xd3cc80[_0x11aada(0xbc)]))continue;(_0xd3cc80[_0x11aada(0x16d)]===_0x11aada(0x1e4)||_0xd3cc80[_0x11aada(0x16d)]===_0x11aada(0x22d))&&_0xd3cc80['cursorKey']&&_0x5cb8ac[_0x11aada(0x1f0)]((_0xd3cc80['env']||_0x11aada(0x209))+':'+_0xd3cc80[_0x11aada(0x1c4)]);const _0x22c7ed=_0xd3cc80['env']||_0x11aada(0x209);(_0x94bf62[_0x22c7ed]||=[])[_0x11aada(0x206)]({..._0xd3cc80,'env':_0x22c7ed,'owner':{'pid':_0x2070b7['pid']??null,'kind':_0x2070b7[_0x11aada(0x194)]??null}});}}for(const [_0x129b29,_0x3826f3]of Object[_0x11aada(0x157)](_0x94bf62)){for(const _0x27209a of _0x3826f3){if(_0x27209a['mode']==='single'&&!_0x27209a[_0x11aada(0xed)]){const _0xddee0b=_0x129b29+':'+(_0x27209a['cursorKey']??'');if(!_0x5cb8ac[_0x11aada(0x274)](_0xddee0b))_0x27209a['unclaimed']=!![];}}}return{'envs':_0x94bf62,'policy':null,'participation':{'participating':_0x566d5b,'total':_0x3f0f0c},'source':_0x11aada(0xb9)};}[_0x468433(0xe8)](){const _0xcbd480=_0x468433,_0x1ecce8=_0x35f9eb=>{const _0x31ea2c=_0x70ef;if(_0x35f9eb[_0x31ea2c(0x16d)]===_0x31ea2c(0x1e4)||_0x35f9eb[_0x31ea2c(0x16d)]==='building'||_0x35f9eb[_0x31ea2c(0x16d)]===_0x31ea2c(0x110))return 0x3;if(_0x35f9eb[_0x31ea2c(0xed)])return 0x1;return 0x2;},_0x25420c=new Map();for(const _0x3be3ac of this[_0xcbd480(0x16c)]()){for(const _0x93cc4e of _0x3be3ac[_0xcbd480(0x2c7)]?.[_0xcbd480(0x1ce)]||[]){const _0x47ab95={..._0x93cc4e,'owner':{'pid':_0x3be3ac['pid']??null,'kind':_0x3be3ac[_0xcbd480(0x194)]??null,'host':_0x3be3ac[_0xcbd480(0x199)]??null}},_0x1af738=_0x93cc4e['mode']==='single'?_0xcbd480(0x2ac)+(_0x93cc4e[_0xcbd480(0x11d)]??'')+'::'+(_0x93cc4e[_0xcbd480(0x1c4)]??_0x93cc4e[_0xcbd480(0x15a)]??_0x93cc4e['id']):'inst:'+(_0x3be3ac['nodeKey']??_0x3be3ac[_0xcbd480(0x20b)]??'')+'::'+(_0x93cc4e['env']??'')+'::'+_0x93cc4e['id'],_0x3d31f2=_0x25420c[_0xcbd480(0x10c)](_0x1af738);if(!_0x3d31f2||_0x1ecce8(_0x47ab95)>_0x1ecce8(_0x3d31f2))_0x25420c[_0xcbd480(0x198)](_0x1af738,_0x47ab95);}}return[..._0x25420c[_0xcbd480(0x179)]()];}[_0x468433(0x217)](){const _0x23a44b=_0x468433,_0x2b8899=Date['now'](),_0x2684dd=this['listNodes'](),_0x512197=_0x4716a7=>Math['max'](0x0,Math[_0x23a44b(0x92)]((_0x2b8899-(_0x4716a7[_0x23a44b(0x12c)]||_0x2b8899))/0x3e8)),_0x3098ef=_0x2684dd[_0x23a44b(0x121)](_0x37ce2b=>_0x37ce2b['kind']===_0x23a44b(0x11f)),_0x324361=_0x2684dd[_0x23a44b(0xda)](_0x18a890=>_0x18a890[_0x23a44b(0x194)]===_0x23a44b(0x268));if(_0x3098ef||_0x324361[_0x23a44b(0x202)])return{'primary':_0x3098ef?{'pid':_0x3098ef[_0x23a44b(0x1c1)],'uptime':_0x512197(_0x3098ef)}:null,'workers':_0x324361[_0x23a44b(0xcc)](_0x4ffc02=>({'pid':_0x4ffc02[_0x23a44b(0x1c1)],'uptime':_0x512197(_0x4ffc02)})),'workersConfigured':_0x3098ef?.[_0x23a44b(0x9d)]?.[_0x23a44b(0x276)]??_0x324361[_0x23a44b(0x202)],'mode':'cluster'};const _0x4eb923=_0x2684dd['find'](_0x460bde=>_0x460bde[_0x23a44b(0x194)]==='cli'||_0x460bde[_0x23a44b(0x194)]===_0x23a44b(0x144)||_0x460bde[_0x23a44b(0x194)]===_0x23a44b(0x1fb)),_0xc642bb=_0x4eb923?{'pid':_0x4eb923[_0x23a44b(0x1c1)],'uptime':_0x512197(_0x4eb923)}:{'pid':process['pid'],'uptime':Math[_0x23a44b(0x293)](0x0,Math['round'](process[_0x23a44b(0x192)]()))};return{'primary':_0xc642bb,'workers':[_0xc642bb],'workersConfigured':0x1,'mode':_0x23a44b(0xb4)};}[_0x468433(0x244)](){const _0x530d9c=_0x468433;return this[_0x530d9c(0x93)]();}['treeView'](){const _0x3f843f=_0x468433,_0x34dd30=new Map();for(const _0x59f8e2 of this[_0x3f843f(0x93)]())_0x34dd30[_0x3f843f(0x198)](_0x59f8e2[_0x3f843f(0x20b)],{..._0x59f8e2,'children':[]});const _0x34434e=[];for(const _0x1f2b4d of _0x34dd30['values']()){const _0x15b797=_0x1f2b4d['supervisorKey']?_0x34dd30[_0x3f843f(0x10c)](_0x1f2b4d[_0x3f843f(0x22c)]):null;if(_0x15b797&&_0x15b797!==_0x1f2b4d)_0x15b797[_0x3f843f(0x159)][_0x3f843f(0x206)](_0x1f2b4d);else _0x34434e['push'](_0x1f2b4d);}const _0x2bde8a=(_0x4545ba,_0x59238b)=>_0x4545ba[_0x3f843f(0x194)]===_0x59238b['kind']?(_0x4545ba['pid']||0x0)-(_0x59238b['pid']||0x0):(_0x4545ba['kind']??'')<(_0x59238b[_0x3f843f(0x194)]??'')?-0x1:0x1,_0x2cf9e4=_0x25f110=>{const _0x2772e0=_0x3f843f;_0x25f110[_0x2772e0(0x117)](_0x2bde8a);for(const _0x18f034 of _0x25f110)if(_0x18f034[_0x2772e0(0x159)][_0x2772e0(0x202)])_0x2cf9e4(_0x18f034['children']);};return _0x2cf9e4(_0x34434e),_0x34434e;}[_0x468433(0x104)](_0x4e1efb){const _0x368092=_0x468433;return this['_groupByProcess']()[_0x368092(0x121)](_0x3ad231=>_0x3ad231[_0x368092(0x20b)]===_0x4e1efb)??null;}['_groupByProcess'](_0x2a8292=Date[_0x468433(0x1a7)]()){const _0x4dbf84=_0x468433,_0x37ff39=new Map();for(const _0x4dc62f of this[_0x4dbf84(0x16c)]()){const _0x4ad93e=_0x46d951(_0x4dc62f);let _0x224fa0=_0x37ff39[_0x4dbf84(0x10c)](_0x4ad93e);!_0x224fa0&&(_0x224fa0={'processKey':_0x4ad93e,'nodeKey':_0x4ad93e,'pid':_0x4dc62f[_0x4dbf84(0x1c1)],'ppid':_0x4dc62f[_0x4dbf84(0x298)]??null,'host':_0x4dc62f[_0x4dbf84(0x199)]??null,'kind':_0x4dc62f[_0x4dbf84(0x194)],'role':null,'supervisorKey':_0x4dc62f[_0x4dbf84(0x22c)]??null,'slot':_0x4dc62f[_0x4dbf84(0x12e)]??null,'slotKey':_0x4dc62f[_0x4dbf84(0x215)]??null,'caps':_0x4dc62f[_0x4dbf84(0x247)]??null,'lifecycle':_0x4dc62f[_0x4dbf84(0x2c8)]??null,'uptime':Math[_0x4dbf84(0x293)](0x0,Math[_0x4dbf84(0x92)]((_0x2a8292-(_0x4dc62f[_0x4dbf84(0x12c)]||_0x2a8292))/0x3e8)),'startedAt':_0x4dc62f[_0x4dbf84(0x12c)]??null,'meta':_0x4dc62f[_0x4dbf84(0x9d)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x37ff39[_0x4dbf84(0x198)](_0x4ad93e,_0x224fa0));_0x224fa0[_0x4dbf84(0x126)][_0x4dbf84(0x206)]({'instanceId':_0x4dc62f[_0x4dbf84(0x161)]??null,'role':_0x4dc62f[_0x4dbf84(0x27c)]??null,'listenAddr':_0x4dc62f[_0x4dbf84(0xf9)]??null,'lifecycle':_0x4dc62f['lifecycle']??null,'processing':_0x4dc62f[_0x4dbf84(0x2c7)]??null});if(!_0x224fa0[_0x4dbf84(0x27c)]&&_0x4dc62f['role'])_0x224fa0[_0x4dbf84(0x27c)]=_0x4dc62f['role'];if(!_0x224fa0[_0x4dbf84(0xf9)]&&_0x4dc62f[_0x4dbf84(0xf9)])_0x224fa0[_0x4dbf84(0xf9)]=_0x4dc62f[_0x4dbf84(0xf9)];if(!_0x224fa0['processing']&&_0x4dc62f[_0x4dbf84(0x2c7)])_0x224fa0['processing']=_0x4dc62f[_0x4dbf84(0x2c7)];if(!_0x224fa0['engines']&&_0x4dc62f['engines'])_0x224fa0[_0x4dbf84(0xa0)]=_0x4dc62f['engines'];if(!_0x224fa0['singletonClaims']&&_0x4dc62f[_0x4dbf84(0x1bd)])_0x224fa0[_0x4dbf84(0x1bd)]=_0x4dc62f[_0x4dbf84(0x1bd)];if(_0x224fa0[_0x4dbf84(0x247)]==null&&_0x4dc62f['caps'])_0x224fa0[_0x4dbf84(0x247)]=_0x4dc62f[_0x4dbf84(0x247)];if(_0x4dc62f[_0x4dbf84(0x2b4)]&&(!_0x224fa0[_0x4dbf84(0x2b4)]||(_0x4dc62f[_0x4dbf84(0x2b4)]['at']??0x0)>(_0x224fa0[_0x4dbf84(0x2b4)]['at']??0x0)))_0x224fa0[_0x4dbf84(0x2b4)]=_0x4dc62f[_0x4dbf84(0x2b4)];}return[..._0x37ff39[_0x4dbf84(0x179)]()];}[_0x468433(0x156)](){const _0x2e31a9=_0x468433,_0x2b6221=[],_0x6d5cb={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x1f0697 of this[_0x2e31a9(0x93)]()){_0x2b6221[_0x2e31a9(0x206)]({'processKey':_0x1f0697['processKey'],'kind':_0x1f0697[_0x2e31a9(0x194)],'pid':_0x1f0697[_0x2e31a9(0x1c1)],'supervisorKey':_0x1f0697[_0x2e31a9(0x22c)],'meta':_0x1f0697[_0x2e31a9(0x9d)]??null,'uptime':_0x1f0697[_0x2e31a9(0x192)],'stats':_0x1f0697[_0x2e31a9(0x2b4)]??null}),_0x6d5cb[_0x2e31a9(0xeb)]++;if(_0x1f0697['stats']){_0x6d5cb[_0x2e31a9(0x108)]+=_0x1f0697['stats'][_0x2e31a9(0x108)]||0x0,_0x6d5cb[_0x2e31a9(0x21d)]+=(_0x1f0697[_0x2e31a9(0x2b4)][_0x2e31a9(0x21d)]||0x0)+(_0x1f0697[_0x2e31a9(0x2b4)]['threads']?.[_0x2e31a9(0x21d)]||0x0);const _0x2ff0b8=_0x1f0697[_0x2e31a9(0x2b4)]['threads'];_0x2ff0b8&&(_0x6d5cb[_0x2e31a9(0x1b0)][_0x2e31a9(0x1e1)]+=_0x2ff0b8[_0x2e31a9(0x1e1)]||0x0,_0x6d5cb[_0x2e31a9(0x1b0)][_0x2e31a9(0x1f8)]+=_0x2ff0b8[_0x2e31a9(0x1f8)]||0x0,_0x6d5cb[_0x2e31a9(0x1b0)]['busy']+=_0x2ff0b8[_0x2e31a9(0x14a)]||0x0);}}return{'totals':_0x6d5cb,'nodes':_0x2b6221};}async[_0x468433(0x1cb)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x1cc9ba=_0x468433;this[_0x1cc9ba(0x222)]=this[_0x1cc9ba(0x222)]||!!writer,this[_0x1cc9ba(0x1c9)]=this[_0x1cc9ba(0x1c9)]||!!reader,this[_0x1cc9ba(0x181)]=kind||this[_0x1cc9ba(0x181)]||(_0x4c308f[_0x1cc9ba(0x172)]?_0x1cc9ba(0x268):'cli'),this[_0x1cc9ba(0x1ca)]=supervisorKey??this[_0x1cc9ba(0x1ca)],this['_listenAddr']=listenAddr??this[_0x1cc9ba(0x137)],this[_0x1cc9ba(0x16b)](),await this[_0x1cc9ba(0x196)]();if(!writer&&!reader)return null;if(!this[_0x1cc9ba(0xe3)]){const _0x3b750a=await this[_0x1cc9ba(0x2a9)][_0x1cc9ba(0x183)](_0x3e9705,{'sync':![],'durability':_0x1cc9ba(0xdd)});await _0x3b750a['ensureType'](_0x1f2a53),this['_statusEnv']=_0x3b750a;}return this['_statusEnv'];}[_0x468433(0x185)](){const _0x23d6fb=_0x468433;return this[_0x23d6fb(0x10f)]!==this[_0x23d6fb(0xe3)]&&(this[_0x23d6fb(0x10f)]=this[_0x23d6fb(0xe3)],this[_0x23d6fb(0x1b8)]=this[_0x23d6fb(0xe3)][_0x23d6fb(0xbd)](_0x1f2a53)['data']),this[_0x23d6fb(0x1b8)];}[_0x468433(0x12a)](_0x3c699d){const _0xd04502=_0x468433;if(_0x3a4305)return this[_0xd04502(0x185)]()[_0xd04502(0x28f)](_0x3c699d[_0xd04502(0x125)],_0x3c699d,0x1);const _0x454a4d=this[_0xd04502(0x185)]()[_0xd04502(0x1bf)](_0x3c699d[_0xd04502(0x125)],_0x3c699d,0x1);if(_0x454a4d&&typeof _0x454a4d['then']===_0xd04502(0xc0))_0x454a4d['then'](undefined,()=>{});return _0x454a4d;}[_0x468433(0x295)](_0x179d00){const _0x543628=_0x468433;return this[_0x543628(0x185)]()[_0x543628(0x28f)](_0x179d00['nodeKey'],_0x179d00,0x1);}[_0x468433(0x20d)](_0x3611d3){const _0x3ae8fe=_0x468433;if(_0x3a4305)try{return this['_nodeDb']()['removeSync'](_0x3611d3);}catch{return![];}const _0x5cde65=this[_0x3ae8fe(0x185)]()[_0x3ae8fe(0x21b)](_0x3611d3);if(_0x5cde65&&typeof _0x5cde65[_0x3ae8fe(0x15b)]==='function')_0x5cde65[_0x3ae8fe(0x15b)](undefined,()=>{});return _0x5cde65;}async['putNode'](_0x1706c1){const _0x182c12=_0x468433;if(!this[_0x182c12(0xe3)]||!this[_0x182c12(0x222)]||!_0x1706c1?.['nodeKey'])return;return this[_0x182c12(0x12a)](_0x1706c1);}async[_0x468433(0x18e)](_0x1fd67d){const _0x27f8b4=_0x468433;if(!this['_statusEnv']||!this[_0x27f8b4(0x222)]||!_0x1fd67d)return;const _0x5f2896=_0x1fd67d['includes']('#'),_0x57a1de=[];for(const {key:_0x5e0299}of this[_0x27f8b4(0xe3)][_0x27f8b4(0x1c6)](_0x1f2a53)){if(_0x5e0299===_0x1fd67d||!_0x5f2896&&typeof _0x5e0299===_0x27f8b4(0x1f5)&&_0x5e0299[_0x27f8b4(0xf0)](_0x1fd67d+'#'))_0x57a1de[_0x27f8b4(0x206)](_0x5e0299);}for(const _0x12f6a1 of _0x57a1de){try{this[_0x27f8b4(0x185)]()[_0x27f8b4(0xd1)](_0x12f6a1);}catch{}}}[_0x468433(0x203)](_0x574772){const _0xf1c9cd=_0x468433;if(typeof _0x574772?.['pid']!==_0xf1c9cd(0x153))return![];if(_0x574772[_0xf1c9cd(0x199)]!==_0x596be7[_0xf1c9cd(0xd9)]())return![];if(_0x574772[_0xf1c9cd(0x1c1)]===process['pid'])return![];if(_0x574772[_0xf1c9cd(0x17f)]!=null&&_0x574772[_0xf1c9cd(0x17f)]<Date[_0xf1c9cd(0x1a7)]()-_0x27c1a3)return!![];try{return process[_0xf1c9cd(0x14b)](_0x574772[_0xf1c9cd(0x1c1)],0x0),![];}catch(_0x2cfcd6){return _0x2cfcd6[_0xf1c9cd(0x1be)]===_0xf1c9cd(0x299);}}[_0x468433(0x16c)](){const _0x4666ca=_0x468433;if(!this['_statusEnv'])return[];try{this['_statusEnv']['db']?.[_0x4666ca(0x253)]?.();}catch{}const _0x17c6fa=Date[_0x4666ca(0x1a7)](),_0x2007e1=_0x596be7[_0x4666ca(0xd9)](),_0x159afd=[];for(const {value:_0x3084de}of this[_0x4666ca(0xe3)][_0x4666ca(0x1c6)](_0x1f2a53)){if(!_0x3084de)continue;let _0x3f12e3=null;_0x3084de[_0x4666ca(0x199)]===_0x2007e1&&typeof _0x3084de[_0x4666ca(0x1c1)]===_0x4666ca(0x153)&&(_0x3f12e3=!this['_nodeDead'](_0x3084de));if(_0x3f12e3===![])continue;const _0x1039ca=_0x3084de[_0x4666ca(0x17f)]==null||_0x3084de['expiresAt']>=_0x17c6fa;if(_0x3f12e3===!![]||_0x1039ca)_0x159afd['push'](_0x3084de);}return _0x159afd;}async[_0x468433(0x291)](_0x1f48a6=0x0){const _0x267695=_0x468433;if(!this['_statusEnv']||!this[_0x267695(0x222)])return;const _0x3f43c5=Date['now']()-_0x1f48a6,_0x1a8ff8=new Set(),_0xec2674=[],_0xabc629=_0x596be7[_0x267695(0xd9)](),_0x4488e8=require$$6[_0x267695(0xf6)];for(const {key:_0x4d5a5e,value:_0x49e74c}of this['_statusEnv'][_0x267695(0x1c6)](_0x1f2a53)){if(!_0x49e74c)continue;const _0x2dd2d4=_0x49e74c[_0x267695(0x199)]===_0xabc629&&typeof _0x49e74c[_0x267695(0x1c1)]===_0x267695(0x153),_0x55103a=_0x2dd2d4?this[_0x267695(0x203)](_0x49e74c):_0x49e74c[_0x267695(0x17f)]!=null&&_0x49e74c['expiresAt']<_0x3f43c5;if(_0x55103a)_0xec2674['push'](_0x4d5a5e);else{_0x1a8ff8['add'](_0x46d951(_0x49e74c)??_0x4d5a5e);if(_0x49e74c[_0x267695(0xf6)]&&_0x49e74c[_0x267695(0xf6)]!==_0x4488e8){if(!this[_0x267695(0xe5)])this['_versionSkewWarned']=new Set();!this['_versionSkewWarned'][_0x267695(0x274)](_0x49e74c[_0x267695(0xf6)])&&(this['_versionSkewWarned'][_0x267695(0x1f0)](_0x49e74c[_0x267695(0xf6)]),this['okdb'][_0x267695(0x88)]?.[_0x267695(0xdb)]?.(_0x267695(0xb2)+(_0x49e74c['pid']??'?')+_0x267695(0xb1)+_0x49e74c[_0x267695(0xf6)]+'\x20while\x20this\x20process\x20runs\x20'+_0x4488e8+'\x20—\x20'+_0x267695(0x17e),{'feature':_0x267695(0x213)}));}}}for(const _0x47208c of _0xec2674)this[_0x267695(0x20d)](_0x47208c);if(this[_0x267695(0x16b)]()){const _0x4b9868=[];for(const {key:_0x42c794}of this[_0x267695(0x1f6)](_0x267695(0xbb))){if(!_0x1a8ff8[_0x267695(0x274)](_0x42c794)){if(_0x3a4305)try{this['_desired'][_0x267695(0xd1)](_0x267695(0x24f)+_0x42c794);}catch{}else _0x4b9868[_0x267695(0x206)](this['_desired'][_0x267695(0x21b)](_0x267695(0x24f)+_0x42c794));}}if(_0x4b9868[_0x267695(0x202)])await Promise['allSettled'](_0x4b9868);}}[_0x468433(0x287)](_0x1fa9d2=null){const _0x23aa61=_0x468433;if(this[_0x23aa61(0x294)])return;if(!this[_0x23aa61(0x222)]||!this[_0x23aa61(0xe3)]){this['okdb']?.['log']?.[_0x23aa61(0xdb)]?.(_0x23aa61(0x142)+this['_isWriter']+_0x23aa61(0x278)+!!this[_0x23aa61(0xe3)]+_0x23aa61(0x128),{'feature':_0x23aa61(0xeb)});return;}this[_0x23aa61(0x1d4)]=_0x1fa9d2,this[_0x23aa61(0x9a)]=()=>this[_0x23aa61(0xc7)]();for(const _0x451c9c of _0x47f7c3)this['okdb'][_0x23aa61(0x234)]['on'](_0x451c9c,this[_0x23aa61(0x9a)]);this['_publishNow']();const _0x4bd653=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x37d55a;this[_0x23aa61(0x294)]=setInterval(()=>{const _0x3e5a0f=_0x23aa61;if(this['_onTick'])try{this[_0x3e5a0f(0x1d4)]();}catch{}this[_0x3e5a0f(0x25b)](),this[_0x3e5a0f(0x291)]()[_0x3e5a0f(0x255)](()=>{});},_0x4bd653);if(this[_0x23aa61(0x294)][_0x23aa61(0x187)])this[_0x23aa61(0x294)]['unref']();}[_0x468433(0xc7)](){const _0x5287ca=_0x468433;if(!this['_isWriter']||!this[_0x5287ca(0xe3)])return;if(Date['now']()-this['_lastPublishAt']<_0x1b0310)return;this[_0x5287ca(0x25b)]();}[_0x468433(0x25b)](){const _0x5f0985=_0x468433;if(!this[_0x5f0985(0x222)]||!this[_0x5f0985(0xe3)])return;this[_0x5f0985(0xa3)]=Date[_0x5f0985(0x1a7)]();try{const _0x4dfd4a=[this[_0x5f0985(0x95)]()];for(const _0xce78a6 of this[_0x5f0985(0x15d)]['values']())_0x4dfd4a[_0x5f0985(0x206)](this['_buildChildRow'](_0xce78a6));const _0x4ba99b=_0x2a1fe2[_0x5f0985(0x1a6)]?_0x2a1fe2[_0x5f0985(0x1a7)]():0x0;for(const _0x1cb682 of _0x4dfd4a){try{this[_0x5f0985(0x295)](_0x1cb682),this[_0x5f0985(0x106)]=![];}catch(_0x27d4bf){!this[_0x5f0985(0x106)]&&(this[_0x5f0985(0x106)]=!![],this[_0x5f0985(0x2a9)]?.['log']?.[_0x5f0985(0xdb)]?.(_0x5f0985(0x292)+_0x27d4bf[_0x5f0985(0x28a)],{'feature':_0x5f0985(0xeb)}));}}if(_0x2a1fe2[_0x5f0985(0x1a6)])_0x2a1fe2[_0x5f0985(0xf1)](_0x5f0985(0x12f),_0x2a1fe2[_0x5f0985(0x1a7)]()-_0x4ba99b,_0x5f0985(0x123)+_0x4dfd4a[_0x5f0985(0x202)]+_0x5f0985(0x20a));}catch(_0x54e24e){!this[_0x5f0985(0x106)]&&(this[_0x5f0985(0x106)]=!![],this[_0x5f0985(0x2a9)]?.[_0x5f0985(0x88)]?.[_0x5f0985(0xdb)]?.('registry\x20publish\x20failing:\x20'+_0x54e24e['message'],{'feature':'processes'}));}}async[_0x468433(0x261)](){const _0x556ff5=_0x468433;if(this[_0x556ff5(0x9a)]){for(const _0x19fe99 of _0x47f7c3){try{this['okdb'][_0x556ff5(0x234)][_0x556ff5(0xf3)](_0x19fe99,this[_0x556ff5(0x9a)]);}catch{}}this[_0x556ff5(0x9a)]=null;}this['_hbTimer']&&(clearInterval(this[_0x556ff5(0x294)]),this[_0x556ff5(0x294)]=null);try{if(this['_statusEnv']&&this[_0x556ff5(0x222)])await this[_0x556ff5(0x18e)](this[_0x556ff5(0x2b0)]);}catch{}}async['deregisterSelf'](){const _0x4ea4fe=_0x468433;if(!this[_0x4ea4fe(0xe3)]||!this[_0x4ea4fe(0x222)])return;try{await this['removeNode'](this['_rowKey']);}catch{}try{const _0xdcae56=[];for(const {value:_0x313dd0}of this['_statusEnv'][_0x4ea4fe(0x1c6)](_0x1f2a53)){if(_0x313dd0?.['ppid']===process[_0x4ea4fe(0x1c1)]&&_0x313dd0[_0x4ea4fe(0x125)])_0xdcae56[_0x4ea4fe(0x206)](_0x313dd0['nodeKey']);}for(const _0x2e7e29 of _0xdcae56){try{await this['removeNode'](_0x2e7e29);}catch{}}}catch{}}async['publishOwnRow'](){const _0x595c8b=_0x468433;return this[_0x595c8b(0x262)](this[_0x595c8b(0x95)]());}async[_0x468433(0xa5)](_0x435459){const _0x5a09e4=_0x468433;if(!this[_0x5a09e4(0xe3)]||!this[_0x5a09e4(0x222)])return;return this[_0x5a09e4(0x262)](this[_0x5a09e4(0x216)](_0x435459));}['_buildChildRow']({pid:_0x226f28,startedAt:_0x40cf6d,kind:_0x53ae26,supervisorKey:_0x5acbd9,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x468433(0x190),meta:meta=null,stats:stats=null}){const _0x3f1b58=_0x468433,_0x55647a=Date[_0x3f1b58(0x1a7)](),_0x40fbd4=_0x4b3643(_0x226f28,_0x40cf6d);return{'nodeKey':_0x5a2ed8(_0x40fbd4,'0'),'processKey':_0x40fbd4,'instanceId':'0','pid':_0x226f28,'startedAt':_0x40cf6d,'ppid':process[_0x3f1b58(0x1c1)],'host':_0x596be7[_0x3f1b58(0xd9)](),'supervisorKey':_0x5acbd9,'slot':slot,'slotKey':slotKey,'kind':_0x53ae26,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x55647a,'expiresAt':_0x55647a+_0x410fca,'caps':this[_0x3f1b58(0x85)](_0x53ae26,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async['addSupervisedChild'](_0x284f0d){const _0x263c2b=_0x468433;if(!_0x284f0d?.[_0x263c2b(0x1c1)])return null;const _0x4ba729=_0x4b3643(_0x284f0d[_0x263c2b(0x1c1)],_0x284f0d[_0x263c2b(0x12c)]);this[_0x263c2b(0x15d)]['set'](_0x4ba729,{..._0x284f0d,'supervisorKey':_0x284f0d[_0x263c2b(0x22c)]??this[_0x263c2b(0x135)]});if(this[_0x263c2b(0x222)])await this[_0x263c2b(0xa5)](this[_0x263c2b(0x15d)]['get'](_0x4ba729))['catch']?.(()=>{});return _0x4ba729;}['removeSupervisedChild'](_0x2754f8){const _0x576e41=_0x468433;if(!_0x2754f8)return;return this[_0x576e41(0x15d)][_0x576e41(0x200)](_0x2754f8),this[_0x576e41(0x18e)](_0x2754f8);}['_sampleOwnStats'](){const _0xefab88=_0x468433,_0x3264e7=Date[_0xefab88(0x1a7)](),_0x52d41d=process[_0xefab88(0xa6)](),_0x5cd8f6=(_0x3264e7-this['_lastCpuAt'])*0x3e8;if(_0x5cd8f6>=0x3d090){const _0x17098e=_0x52d41d['user']-this[_0xefab88(0x155)][_0xefab88(0x191)]+(_0x52d41d[_0xefab88(0x1fe)]-this[_0xefab88(0x155)]['system']),_0x127786=_0x596be7[_0xefab88(0x201)]()[_0xefab88(0x202)]||0x1;this[_0xefab88(0x23d)]=Math[_0xefab88(0x17b)](0x64,Math[_0xefab88(0x92)](_0x17098e/(_0x5cd8f6*_0x127786)*0x64)),this[_0xefab88(0x130)]=Math[_0xefab88(0x92)](_0x5cd8f6/0x3e8),this[_0xefab88(0x155)]=_0x52d41d,this['_lastCpuAt']=_0x3264e7;}const _0xbd87b2=process['memoryUsage'](),_0x4ba1c0=this[_0xefab88(0x1ed)][_0xefab88(0x2c4)];let _0x281936=0x0;if(_0x4ba1c0>0x0){const _0x5ede69=[this['okdb'],...this[_0xefab88(0x2a9)][_0xefab88(0x24d)]?.['values']?.()??[]];for(const _0x14b363 of _0x5ede69){const _0x218c79=_0x14b363['functions']?.[_0xefab88(0x86)];if(_0x218c79)_0x281936+=_0x218c79['liveThreadStats'][_0xefab88(0x14a)];}}let _0x1d27f6=null;const _0x446c17=_0x4ba1c0;if(_0x446c17>0x0){let _0x2ab9bb=0x0;for(const _0x3d40f9 of this[_0xefab88(0x1ed)]['values']())_0x2ab9bb+=_0x3d40f9[_0xefab88(0x21d)]||0x0;_0x1d27f6={'count':_0x446c17,'heapUsed':_0x2ab9bb,'sandbox':_0x4ba1c0,'busy':_0x281936};}return{'rss':_0xbd87b2[_0xefab88(0x108)],'heapUsed':_0xbd87b2['heapUsed'],'heapTotal':_0xbd87b2['heapTotal'],'external':_0xbd87b2[_0xefab88(0xad)],'cpuPct':this[_0xefab88(0x23d)],'cpuWindowMs':this['_lastCpuWindowMs']??null,'threads':_0x1d27f6,'at':_0x3264e7};}[_0x468433(0xb0)](_0x58979e,_0x2f19cc){const _0x2323dd=_0x468433;if(!_0x58979e||!_0x2f19cc)return;this[_0x2323dd(0x1ed)][_0x2323dd(0x198)](_0x58979e,_0x2f19cc);}[_0x468433(0xfe)](_0x3e7dbe){const _0x2919cc=_0x468433;this[_0x2919cc(0x1ed)][_0x2919cc(0x200)](_0x3e7dbe);}[_0x468433(0x1e0)](_0x16dbb3,_0x4dd8f8,_0x23f17b=undefined){const _0x587a24=_0x468433,_0x1973aa=this['_children']['get'](_0x16dbb3);if(!_0x1973aa||!_0x4dd8f8)return;if(_0x23f17b!==undefined)_0x1973aa[_0x587a24(0x2c7)]=_0x23f17b;_0x1973aa[_0x587a24(0x2b4)]={'rss':_0x4dd8f8['rss']??null,'heapUsed':_0x4dd8f8[_0x587a24(0x21d)]??null,'heapTotal':_0x4dd8f8['heapTotal']??null,'external':_0x4dd8f8['external']??null,'cpuPct':_0x4dd8f8['cpuPct']??null,'cpuWindowMs':_0x4dd8f8[_0x587a24(0x2b6)]??null,'threads':_0x4dd8f8[_0x587a24(0x1b0)]??null,'claims':_0x4dd8f8[_0x587a24(0x14e)]??null,'envsOpen':_0x4dd8f8['envsOpen']??null,'at':Date[_0x587a24(0x1a7)]()};}['_buildOwnRow'](){const _0x1ee60f=_0x468433,_0x55116b=Date['now'](),_0x3d6fe7=this[_0x1ee60f(0x2a9)][_0x1ee60f(0xec)]||{},_0x3ce3d6=this[_0x1ee60f(0x181)]||_0x1ee60f(0x1ff);return{'nodeKey':this['_rowKey'],'processKey':this[_0x1ee60f(0x135)],'instanceId':this[_0x1ee60f(0x15f)],'pid':process['pid'],'startedAt':this[_0x1ee60f(0x297)],'instanceStartedAt':this['_startedAt'],'ppid':typeof process[_0x1ee60f(0x298)]===_0x1ee60f(0x153)?process[_0x1ee60f(0x298)]:null,'host':_0x596be7[_0x1ee60f(0xd9)](),'supervisorKey':this[_0x1ee60f(0x1ca)]??null,'version':require$$6[_0x1ee60f(0xf6)],'kind':_0x3ce3d6,'role':{'engines':!!_0x3d6fe7[_0x1ee60f(0xa0)],'processors':!!_0x3d6fe7['processors'],'compaction':_0x3d6fe7['compaction'],'http':_0x3d6fe7[_0x1ee60f(0x107)]},'listenAddr':this[_0x1ee60f(0x137)]??null,'heartbeatAt':_0x55116b,'expiresAt':_0x55116b+_0x410fca,'caps':this['_caps'](_0x3ce3d6,_0x3d6fe7),'lifecycle':{'state':_0x1ee60f(0x190),'desiredVersionApplied':null},'meta':{...this[_0x1ee60f(0x2a5)]},'processing':_0x3d6fe7[_0x1ee60f(0x1ce)]?this['_buildProcessingFacet']():null,'engines':_0x3d6fe7[_0x1ee60f(0xa0)]?[...this[_0x1ee60f(0x2a9)][_0x1ee60f(0xce)]??[]]:null,'singletonClaims':this[_0x1ee60f(0x289)](),'stats':this[_0x1ee60f(0x10a)](),'writers':this[_0x1ee60f(0x1a8)]()};}[_0x468433(0x1a8)](){const _0x3c57a3=_0x468433,_0x14da2d={};try{for(const [_0x4d0e79,_0x55e8e2]of this['okdb'][_0x3c57a3(0x24d)]){try{const _0x10457a=_0x55e8e2['writerStatus']?.();if(!_0x10457a)continue;if(!_0x10457a[_0x3c57a3(0x2b1)]&&!_0x10457a[_0x3c57a3(0x1e6)]&&!(_0x10457a['parkedNow']??0x0)&&!_0x10457a[_0x3c57a3(0x87)])continue;_0x14da2d[_0x4d0e79]={'depth':_0x10457a[_0x3c57a3(0x2b1)],'oldestPendingMs':_0x10457a[_0x3c57a3(0x27e)],'committed':_0x10457a[_0x3c57a3(0x1e6)],'commitsPerSec':_0x10457a[_0x3c57a3(0x1f2)],'commitP99Ms':_0x10457a[_0x3c57a3(0x235)],'parkedNow':_0x10457a[_0x3c57a3(0x2b2)]??0x0,'draining':!!_0x10457a[_0x3c57a3(0x87)]};}catch{}}}catch{}return Object['keys'](_0x14da2d)[_0x3c57a3(0x202)]?_0x14da2d:null;}[_0x468433(0x289)](){const _0x26c016=_0x468433,_0x25bc3d=process[_0x26c016(0x1c1)],_0x41c596=Date[_0x26c016(0x1a7)](),_0x4f2f07=_0x57ae5c=>{const _0x20014f=_0x26c016;if(!_0x57ae5c)return[];const _0x186d00=[];try{for(const {id:_0x4cefee,entry:_0x224b1d}of _0x57ae5c[_0x20014f(0xc9)]()){if(_0x224b1d?.[_0x20014f(0x8a)]?.[_0x20014f(0x1c1)]!==_0x25bc3d)continue;const _0x312540=_0x224b1d[_0x20014f(0xfa)]??_0x224b1d['acquiredAt']??0x0;if(_0x312540+(_0x224b1d[_0x20014f(0x212)]??0x0)<_0x41c596)continue;_0x186d00[_0x20014f(0x206)](_0x4cefee);}}catch{}return _0x186d00;},_0x58762c=_0x4f2f07(this[_0x26c016(0x166)]('compact')),_0x33cb39=_0x4f2f07(this[_0x26c016(0x166)](_0x26c016(0x18b)));if(!_0x58762c[_0x26c016(0x202)]&&!_0x33cb39['length'])return null;return{'compact':_0x58762c,'replicate':_0x33cb39};}['_singletonLock'](_0x2cb467){const _0x25144f=_0x468433;if(!this[_0x25144f(0x2a9)]?.[_0x25144f(0x1a9)])return null;if(!this[_0x25144f(0x113)])this[_0x25144f(0x113)]=new Map();let _0xe82aac=this[_0x25144f(0x113)][_0x25144f(0x10c)](_0x2cb467);if(!_0xe82aac)try{_0xe82aac=new _0x5bf68e(this['okdb']['_rootDb'],{'namespace':_0x2cb467}),this[_0x25144f(0x113)][_0x25144f(0x198)](_0x2cb467,_0xe82aac);}catch{return null;}return _0xe82aac;}['_buildProcessingFacet'](){const _0x511c69=_0x468433,_0x4f6ed4=[];try{for(const [_0x267b2d,_0x5e30bd]of this['okdb']['_envs']){if(_0x267b2d[_0x511c69(0xf0)]('~'))continue;for(const _0x236626 of _0x5e30bd['processor'][_0x511c69(0x1e7)]())_0x4f6ed4[_0x511c69(0x206)]({..._0x236626,'env':_0x267b2d});}}catch{}return{'participate':this[_0x511c69(0x2a9)][_0x511c69(0x1ce)]?.[_0x511c69(0x273)]??![],'processors':_0x4f6ed4};}[_0x468433(0x16b)](){const _0x28c202=_0x468433;if(this[_0x28c202(0x2c2)])return!![];const _0x23c7db=this[_0x28c202(0x2a9)]['_rootDb'];if(!_0x23c7db)return![];return this['_desired']=_0x23c7db[_0x28c202(0xff)](_0x432641,{'dupSort':![]}),this['_cmd']=_0x23c7db[_0x28c202(0xff)](_0x4e0e8d,{'dupSort':![]}),!![];}async[_0x468433(0x196)](){const _0x385ac0=_0x468433;if(!this[_0x385ac0(0x16b)]())return;const _0x5a0242=_0x385ac0(0x267),_0x5791c9=0x1,_0x1c56cd=this[_0x385ac0(0x2c2)][_0x385ac0(0x10c)](_0x5a0242)??0x0;if(_0x1c56cd>=_0x5791c9)return;const _0x35d1b0=_0x3bbda6=>{const _0xdf68e7=_0x385ac0;if(_0x3bbda6===_0xdf68e7(0x12b))return _0xdf68e7(0xb4);if(_0x3bbda6===_0xdf68e7(0x13d))return'fanout';return _0x3bbda6;};await this[_0x385ac0(0x2a9)][_0x385ac0(0x2a2)][_0x385ac0(0xb6)]['transaction'](()=>{const _0x24e69f=_0x385ac0;for(const _0x20feca of[_0x24e69f(0x2af),_0x24e69f(0x221)]){for(const {key:_0x580188,value:_0x1fb142}of this['_desired'][_0x24e69f(0x1c6)]({'start':_0x20feca,'end':_0x20feca+'\xff'})){if(typeof _0x580188!==_0x24e69f(0x1f5)||!_0x580188[_0x24e69f(0xf0)](_0x20feca))break;const _0x4557fb=_0x35d1b0(_0x1fb142[_0x24e69f(0xbc)]);if(_0x4557fb!==_0x1fb142[_0x24e69f(0xbc)])this[_0x24e69f(0x2c2)][_0x24e69f(0x1bf)](_0x580188,{..._0x1fb142,'mode':_0x4557fb});}}this[_0x24e69f(0x2c2)]['put'](_0x5a0242,_0x5791c9);});}[_0x468433(0x1eb)](){const _0xff7357=_0x468433;return!!this[_0xff7357(0x2c2)];}[_0x468433(0x1c5)](_0x5e10b4,_0xc0e80d){const _0x3a05d3=_0x468433;if(!this['_ensureDesired']())return null;const _0x5563da=_0x5e10b4+'/'+_0xc0e80d;return this[_0x3a05d3(0x1a4)](),this[_0x3a05d3(0x218)][_0x3a05d3(0x10c)](_0x5563da)??this[_0x3a05d3(0x2c2)][_0x3a05d3(0x10c)](_0x5563da)??null;}[_0x468433(0x1a4)](){const _0x5eb9f6=_0x468433;if(!_0x3a4305)return;try{this[_0x5eb9f6(0x2a9)][_0x5eb9f6(0x2a2)]?.['db']?.[_0x5eb9f6(0x253)]?.();}catch{}}async[_0x468433(0xfb)](_0x2387d0,_0x49c3bf,_0x3581c8){const _0x4a7422=_0x468433;if(!this[_0x4a7422(0x16b)]())return null;const _0x2e1c0b=_0x2387d0+'/'+_0x49c3bf;this['_refreshDesiredSnapshot']();const _0x44ab5f=this[_0x4a7422(0x218)][_0x4a7422(0x10c)](_0x2e1c0b)??this[_0x4a7422(0x2c2)][_0x4a7422(0x10c)](_0x2e1c0b)??{'version':0x0},_0x1a6dce=(_0x44ab5f[_0x4a7422(0xf6)]||0x0)+0x1,_0x53dab5={..._0x44ab5f,..._0x3581c8,'version':_0x1a6dce,'updatedAt':Date[_0x4a7422(0x1a7)]()};this[_0x4a7422(0x218)]['set'](_0x2e1c0b,_0x53dab5);try{await this[_0x4a7422(0x2a9)][_0x4a7422(0x2a2)][_0x4a7422(0xb6)][_0x4a7422(0x2b3)](()=>{const _0x1c2590=_0x4a7422;this['_desired'][_0x1c2590(0x1bf)](_0x2e1c0b,_0x53dab5);});}finally{if(this[_0x4a7422(0x218)][_0x4a7422(0x10c)](_0x2e1c0b)===_0x53dab5)this['_desiredOverlay']['delete'](_0x2e1c0b);}return _0x1a6dce;}[_0x468433(0x1f6)](_0x2bf554){const _0x151f21=_0x468433;if(!this[_0x151f21(0x16b)]())return[];this[_0x151f21(0x1a4)]();const _0x1645f3=_0x2bf554+'/',_0x5ebd0d=[];for(const {key:_0x2e7567,value:_0x5174f0}of this[_0x151f21(0x2c2)][_0x151f21(0x1c6)]({'start':_0x1645f3,'end':_0x1645f3+'\xff'})){if(typeof _0x2e7567!==_0x151f21(0x1f5)||!_0x2e7567[_0x151f21(0xf0)](_0x1645f3))break;_0x5ebd0d[_0x151f21(0x206)]({'key':_0x2e7567[_0x151f21(0x219)](_0x1645f3['length']),'value':_0x5174f0});}return _0x5ebd0d;}[_0x468433(0x189)](_0x202c98){const _0x4428cb=_0x468433;if(!this['_ensureDesired']())return null;return this[_0x4428cb(0x2c3)][_0x4428cb(0x10c)](_0x202c98)??null;}async['bumpCmd'](_0x23ff4b,_0x586c19,_0x26e55f={}){const _0x2dd0c=_0x468433;if(!this[_0x2dd0c(0x16b)]())return null;let _0x346f07;return await this['okdb'][_0x2dd0c(0x2a2)][_0x2dd0c(0xb6)][_0x2dd0c(0x2b3)](()=>{const _0x4e165f=_0x2dd0c,_0x1b2527=this[_0x4e165f(0x2c3)]['get'](_0x23ff4b)||{'epoch':0x0};_0x346f07=(_0x1b2527[_0x4e165f(0x232)]||0x0)+0x1,this[_0x4e165f(0x2c3)]['put'](_0x23ff4b,{..._0x1b2527,..._0x26e55f,'cmd':_0x586c19,'epoch':_0x346f07,'updatedAt':Date[_0x4e165f(0x1a7)]()});}),_0x346f07;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x1f04cf,'nodeKey':_0x4b3643,'logicalKey':_0x50f8d3,'slotKey':_0x5bab41,'PROCESS_ENV':_0x3e9705,'NODE_TYPE':_0x1f2a53},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x263001=_0xa5e620;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x2838d2=require$$0$4,{EVENTS:_0x666ad5,CHANGE_ACTIONS:_0x11ccc2}=requireOkdbEnums(),{LOOP:_0x1b786c}=requireOkdbLoopMonitor(),_0x2be887=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x500d7f=0x5,_0x4786fe=0x2710;class _0x18697d extends _0x2838d2{constructor(_0x4df425,_0x2b2f4a={}){const _0x52cb2c=_0x70ef;super(),this['okdb']=_0x4df425,this[_0x52cb2c(0x288)]=_0x2b2f4a[_0x52cb2c(0x164)]??_0x2be887,this[_0x52cb2c(0x91)]=_0x2b2f4a['flushDebounce']??_0x500d7f,this[_0x52cb2c(0x1b9)]=_0x2b2f4a[_0x52cb2c(0x176)]??_0x4786fe,this['_started']=![],this[_0x52cb2c(0x1b4)]=new Map(),this['_baselines']=new Map(),this['_pending']=new Map(),this[_0x52cb2c(0x1de)]=null,this['_draining']=![],this['_seen']=new Set(),this[_0x52cb2c(0x2be)]=new Set(),this[_0x52cb2c(0x24c)]=_0x2ac871=>this['_handleInProcess'](_0x2ac871),this[_0x52cb2c(0x122)]=_0x2b2b47=>this[_0x52cb2c(0xf2)](_0x2b2b47),this[_0x52cb2c(0x1d9)]=_0x4cc1c9=>this[_0x52cb2c(0x1b3)](_0x4cc1c9),this[_0x52cb2c(0x1ea)]=()=>this[_0x52cb2c(0xa7)]();}[_0x263001(0xc3)](){const _0x53235f=_0x263001;if(this['_started'])return;this[_0x53235f(0x2a0)]=!![];for(const [_0x1abbb9,_0x4591a]of this[_0x53235f(0x2a9)][_0x53235f(0x24d)]){if(_0x1abbb9[_0x53235f(0xf0)]('~'))continue;try{_0x4591a[_0x53235f(0x8f)]();}catch{}}for(const [_0x5d41fa,_0x154c2f]of this[_0x53235f(0x2a9)][_0x53235f(0x24d)]){if(_0x5d41fa[_0x53235f(0xf0)]('~'))continue;try{this[_0x53235f(0x165)][_0x53235f(0x198)](_0x5d41fa,_0x154c2f[_0x53235f(0x188)]()||0x0);}catch{}}const {events:_0x1c347a}=this[_0x53235f(0x2a9)];_0x1c347a['on'](_0x666ad5[_0x53235f(0x12d)],this[_0x53235f(0x122)]),_0x1c347a['on'](_0x666ad5['ITEM_CREATE'],this[_0x53235f(0x24c)]),_0x1c347a['on'](_0x666ad5['ITEM_UPDATE'],this['_onItem']),_0x1c347a['on'](_0x666ad5[_0x53235f(0x1b2)],this['_onItem']),_0x1c347a['on'](_0x666ad5[_0x53235f(0x22e)],this[_0x53235f(0x1d9)]),_0x1c347a['once'](_0x666ad5[_0x53235f(0x11e)],this[_0x53235f(0x1ea)]);}[_0x263001(0xa7)](){const _0x3d8b82=_0x263001;if(!this['_started'])return;this[_0x3d8b82(0x2a0)]=![];const {events:_0x2c5e7d}=this[_0x3d8b82(0x2a9)];_0x2c5e7d[_0x3d8b82(0xf3)](_0x666ad5[_0x3d8b82(0x12d)],this['_onPending']),_0x2c5e7d[_0x3d8b82(0xf3)](_0x666ad5[_0x3d8b82(0x8e)],this['_onItem']),_0x2c5e7d[_0x3d8b82(0xf3)](_0x666ad5['ITEM_UPDATE'],this[_0x3d8b82(0x24c)]),_0x2c5e7d['off'](_0x666ad5[_0x3d8b82(0x1b2)],this[_0x3d8b82(0x24c)]),_0x2c5e7d[_0x3d8b82(0xf3)](_0x666ad5['SYSTEM_POKE'],this[_0x3d8b82(0x1d9)]);try{_0x2c5e7d[_0x3d8b82(0xf3)](_0x666ad5[_0x3d8b82(0x11e)],this['_onStop']);}catch{}this[_0x3d8b82(0x1de)]&&(clearTimeout(this[_0x3d8b82(0x1de)]),this[_0x3d8b82(0x1de)]=null),this['_pending'][_0x3d8b82(0x25f)](),this['_cursors'][_0x3d8b82(0x25f)](),this[_0x3d8b82(0x165)]['clear'](),this[_0x3d8b82(0x140)][_0x3d8b82(0x25f)](),this[_0x3d8b82(0x2be)][_0x3d8b82(0x25f)]();}[_0x263001(0x1dd)](_0x3c8671,_0x27a6af,_0x33f7b4,_0x2eb1b3){return _0x3c8671+'\x00'+_0x27a6af+'\x00'+_0x33f7b4+'\x00'+_0x2eb1b3;}[_0x263001(0xb3)](_0x37739d,_0x448c4,_0x3f155b,_0x84b00d){const _0x4dc47a=_0x263001,_0x19a049=this['_dedupeKey'](_0x37739d,_0x448c4,_0x3f155b,_0x84b00d);if(this[_0x4dc47a(0x140)][_0x4dc47a(0x274)](_0x19a049))return![];this[_0x4dc47a(0x140)][_0x4dc47a(0x1f0)](_0x19a049);if(this['_seen'][_0x4dc47a(0x2c4)]>this['_dedupeMax']){const _0x2ce02a=this[_0x4dc47a(0x140)][_0x4dc47a(0x179)]()[_0x4dc47a(0x1d1)]()['value'];this[_0x4dc47a(0x140)]['delete'](_0x2ce02a);}return!![];}[_0x263001(0xf2)](_0xe44f5b){const _0x26cea7=_0x263001;if(!this[_0x26cea7(0x2a0)]||!_0xe44f5b)return;const {env:_0x7d0677,type:_0x46d89b,key:_0x583e3f,clock:_0x5541f5}=_0xe44f5b;if(_0x7d0677==null||_0x46d89b==null||_0x583e3f==null)return;if(typeof _0x7d0677==='string'&&_0x7d0677[_0x26cea7(0xf0)]('~'))return;if(typeof _0x46d89b===_0x26cea7(0x1f5)&&_0x46d89b[_0x26cea7(0xf0)]('~'))return;this[_0x26cea7(0x2be)][_0x26cea7(0x1f0)](this[_0x26cea7(0x1dd)](_0x7d0677,_0x46d89b,_0x583e3f,_0x5541f5)),this['_pendingLocal'][_0x26cea7(0x2c4)]>this[_0x26cea7(0x1b9)]&&this[_0x26cea7(0x2be)][_0x26cea7(0x200)](this[_0x26cea7(0x2be)][_0x26cea7(0x179)]()[_0x26cea7(0x1d1)]()[_0x26cea7(0x27d)]);}['_handleInProcess'](_0x3fdbe3){const _0x55ead7=_0x263001;if(!this[_0x55ead7(0x2a0)]||!_0x3fdbe3)return;const {env:_0x487841,type:_0x5ef9c5,key:_0x56519c,clock:_0x2b3250,origin:_0x57f0ad,action:_0x5075ce,newValue:_0x250438,oldValue:_0x374bb7}=_0x3fdbe3;if(_0x487841==null||_0x5ef9c5==null||_0x56519c==null)return;if(typeof _0x487841===_0x55ead7(0x1f5)&&_0x487841['startsWith']('~'))return;if(typeof _0x5ef9c5===_0x55ead7(0x1f5)&&_0x5ef9c5['startsWith']('~'))return;this[_0x55ead7(0x2be)][_0x55ead7(0x200)](this[_0x55ead7(0x1dd)](_0x487841,_0x5ef9c5,_0x56519c,_0x2b3250));if(!this[_0x55ead7(0xb3)](_0x487841,_0x5ef9c5,_0x56519c,_0x2b3250))return;const _0x520e6a=_0x5075ce===_0x11ccc2[_0x55ead7(0x2c0)]?_0x55ead7(0x21b):_0x55ead7(0x1bf);this[_0x55ead7(0x29b)](_0x55ead7(0x264),{'env':_0x487841,'type':_0x5ef9c5,'key':_0x56519c,'op':_0x520e6a,'clock':_0x2b3250,'origin':_0x57f0ad,'value':_0x520e6a===_0x55ead7(0x21b)?null:_0x250438,'prevValue':_0x374bb7});}[_0x263001(0x1b3)](_0x511796){const _0xdc811a=_0x263001;if(!this['_started'])return;if(!_0x511796||typeof _0x511796[_0xdc811a(0x11d)]!==_0xdc811a(0x1f5)||typeof _0x511796[_0xdc811a(0x15a)]!==_0xdc811a(0x1f5))return;const {env:_0x182d87,type:_0x384d00}=_0x511796;if(_0x182d87[_0xdc811a(0xf0)]('~')||_0x384d00[_0xdc811a(0xf0)]('~'))return;this['_pending'][_0xdc811a(0x198)](_0x182d87+'\x00'+_0x384d00,{'env':_0x182d87,'type':_0x384d00}),this[_0xdc811a(0x9e)]();}[_0x263001(0x9e)](){if(this['_flushTimer'])return;const _0x5b7a02=()=>{const _0x248a20=_0x70ef;this['_flushTimer']=null,this['_drain']()[_0x248a20(0x255)](()=>{});};this['_flushTimer']=setTimeout(_0x5b7a02,this['_flushDebounce']>0x0?this['_flushDebounce']:0x0);}async[_0x263001(0x22b)](){const _0x3b9fed=_0x263001;if(this[_0x3b9fed(0x197)]){this[_0x3b9fed(0x9e)]();return;}this['_draining']=!![];try{const _0x37ccf0=[...this[_0x3b9fed(0xd4)][_0x3b9fed(0x179)]()];this[_0x3b9fed(0xd4)]['clear']();let _0x4bea92=![];for(const {env:_0x5d60d7,type:_0x18bfcb}of _0x37ccf0){try{const _0x107baa=await this[_0x3b9fed(0x10d)](_0x5d60d7,_0x18bfcb);if(_0x107baa)_0x4bea92=!![];}catch{this[_0x3b9fed(0xd4)][_0x3b9fed(0x198)](_0x5d60d7+'\x00'+_0x18bfcb,{'env':_0x5d60d7,'type':_0x18bfcb}),_0x4bea92=!![];}}if(_0x4bea92||this[_0x3b9fed(0xd4)][_0x3b9fed(0x2c4)]>0x0)this[_0x3b9fed(0x9e)]();}finally{this[_0x3b9fed(0x197)]=![];}}async[_0x263001(0x10d)](_0x51b8ac,_0xc1bfb7){const _0x29afae=_0x263001,_0x1db3bf=await this['okdb']['_openEnvLazy'](_0x51b8ac),_0x5e0df2=_0x51b8ac+'\x00'+_0xc1bfb7;!this['_cursors'][_0x29afae(0x274)](_0x5e0df2)&&(!this[_0x29afae(0x165)]['has'](_0x51b8ac)&&(_0x1db3bf[_0x29afae(0x8f)](),this[_0x29afae(0x165)][_0x29afae(0x198)](_0x51b8ac,_0x1db3bf[_0x29afae(0x188)]()||0x0)),this[_0x29afae(0x1b4)]['set'](_0x5e0df2,this[_0x29afae(0x165)]['get'](_0x51b8ac)));const _0x8b79b5=this[_0x29afae(0x1b4)][_0x29afae(0x10c)](_0x5e0df2),_0x1bb7aa=_0x1db3bf[_0x29afae(0x188)](_0xc1bfb7)||0x0;if(_0x1bb7aa<=_0x8b79b5)return![];const _0x5e8d12=_0x8b79b5+this['_quantum'],_0x4299bc=Math[_0x29afae(0x17b)](_0x1bb7aa,_0x5e8d12),_0x456215=_0x1b786c[_0x29afae(0x1a6)]?_0x1b786c[_0x29afae(0x1a7)]():0x0,_0x9bf140=Array['from'](_0x1db3bf[_0x29afae(0x124)](_0xc1bfb7,_0x8b79b5+0x1,_0x4299bc));let _0xd95ca5=_0x8b79b5;for(const _0x230e5d of _0x9bf140){const {clock:_0x29939b,key:_0x50770e,action:_0x1f56b1,origin:_0x4ce635}=_0x230e5d;if(_0x29939b>_0xd95ca5)_0xd95ca5=_0x29939b;if(_0x50770e==null)continue;if(this[_0x29afae(0x2be)][_0x29afae(0x274)](this[_0x29afae(0x1dd)](_0x51b8ac,_0xc1bfb7,_0x50770e,_0x29939b)))continue;if(!this[_0x29afae(0xb3)](_0x51b8ac,_0xc1bfb7,_0x50770e,_0x29939b))continue;let _0x433f4b,_0x572f02;if(_0x1f56b1===_0x11ccc2[_0x29afae(0x2c0)])_0x433f4b=_0x29afae(0x21b),_0x572f02=null;else{const _0x17d2ec=_0x1db3bf[_0x29afae(0x10c)](_0xc1bfb7,_0x50770e);_0x17d2ec==null?(_0x433f4b=_0x29afae(0x21b),_0x572f02=null):(_0x433f4b=_0x29afae(0x1bf),_0x572f02=_0x17d2ec);}this[_0x29afae(0x29b)](_0x29afae(0x264),{'env':_0x51b8ac,'type':_0xc1bfb7,'key':_0x50770e,'op':_0x433f4b,'clock':_0x29939b,'origin':_0x4ce635,'value':_0x572f02});}if(_0x1b786c[_0x29afae(0x1a6)])_0x1b786c[_0x29afae(0xf1)](_0x29afae(0x25d)+_0x51b8ac+':'+_0xc1bfb7,_0x1b786c[_0x29afae(0x1a7)]()-_0x456215,'n='+_0x9bf140['length']);return this[_0x29afae(0x1b4)][_0x29afae(0x198)](_0x5e0df2,Math['max'](_0xd95ca5,_0x4299bc)),_0x1db3bf[_0x29afae(0x188)](_0xc1bfb7)>_0x4299bc;}[_0x263001(0x1a5)](){const _0x240d86=_0x263001;return{'started':this[_0x240d86(0x2a0)],'quantum':this[_0x240d86(0x288)],'flushDebounce':this[_0x240d86(0x91)],'cursors':Object[_0x240d86(0x1dc)]([...this[_0x240d86(0x1b4)][_0x240d86(0x157)]()][_0x240d86(0xcc)](([_0x1ed54f,_0x356a79])=>[_0x1ed54f[_0x240d86(0x22f)]('\x00',':'),_0x356a79])),'pending':this[_0x240d86(0xd4)][_0x240d86(0x2c4)],'seen':this['_seen']['size']};}}return _0x18697d[_0x263001(0x18a)]=_0x2be887,okdbChangefeed={'OKDBChangefeed':_0x18697d},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x317aa8=_0xa5e620;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x80b076=require$$1$1,_0x64d597=require$$1,{EVENTS:_0xd0c31c}=requireOkdbEnums(),_0x32ea33=require$$0$3,{slotKey:_0x3dd6f6}=requireOkdbProcessRegistry(),_0x233976=Number(process.env.OKDB_CLUSTER_RESPAWN_BACKOFF_MS)||0xfa,_0x102cf2=0xfa0,_0x289313=0x5,_0x4056b7=0x2710,_0x10c29d=0xbb8,_0x18d9d6=0x7d0,_0x1fc319=_0x317aa8(0x21c),_0x42616b='ephemeral',_0x37e59c='log',_0x3e61e5=_0x317aa8(0x2b4),_0x25d4d4=[_0xd0c31c[_0x317aa8(0x28b)],_0xd0c31c[_0x317aa8(0x275)],_0xd0c31c[_0x317aa8(0x259)],_0xd0c31c[_0x317aa8(0x28d)],_0xd0c31c[_0x317aa8(0x1b6)],_0xd0c31c[_0x317aa8(0x1ab)],_0xd0c31c[_0x317aa8(0x248)],_0xd0c31c['INDEX_REGISTERED'],_0x317aa8(0xa4),_0x317aa8(0x18d),_0x317aa8(0x195),_0x317aa8(0xc8),'processor:resumed',_0x317aa8(0x1c2)],_0x3d87f4=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0,_0x5e296b=0x64;function _0x2cbf3c(_0x2231e1){const _0x35dc6d=_0x317aa8;if(!_0x2231e1)return'null';const _0xfabaa6=(_0x2231e1[_0x35dc6d(0x1ce)]||[])[_0x35dc6d(0xcc)](_0x1ff793=>[_0x1ff793['env'],_0x1ff793['id'],_0x1ff793['mode'],_0x1ff793['state'],!!_0x1ff793['paused'],!!_0x1ff793[_0x35dc6d(0xa1)],!!_0x1ff793[_0x35dc6d(0xed)],_0x1ff793[_0x35dc6d(0x284)]?.[_0x35dc6d(0x1c1)]??null,_0x1ff793[_0x35dc6d(0x110)]?String(_0x1ff793[_0x35dc6d(0x110)]?.['message']??_0x1ff793[_0x35dc6d(0x110)]):null]);return JSON[_0x35dc6d(0x279)]([!!_0x2231e1[_0x35dc6d(0x1e8)],_0xfabaa6]);}function _0x51282b({workers:_0xf9207b,makeOkdb:_0x2b8f7f,port:_0x322e0c,primaryOkdb:_0xf3837c,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0x3cf267=_0x317aa8;if(_0x80b076[_0x3cf267(0x9c)])return childEntry&&_0x80b076[_0x3cf267(0x23e)]({'exec':_0x64d597[_0x3cf267(0xf4)](__dirname,_0x3cf267(0x241)),'args':[],'execArgv':((()=>{const _0x2519b8=_0x3cf267,_0x302f5a=[];for(let _0x589e00=0x0;_0x589e00<process['execArgv'][_0x2519b8(0x202)];_0x589e00++){const _0x2403de=process[_0x2519b8(0x1a3)][_0x589e00];if(_0x2403de[_0x2519b8(0xf0)](_0x2519b8(0x147))||_0x2403de[_0x2519b8(0xf0)]('--watch')||_0x2403de['startsWith'](_0x2519b8(0x1cc)))continue;if(_0x2403de==='-e'||_0x2403de===_0x2519b8(0x1f3)||_0x2403de==='-p'||_0x2403de===_0x2519b8(0x115)){_0x589e00++;continue;}_0x302f5a[_0x2519b8(0x206)](_0x2403de);}return _0x302f5a;})())}),_0x29cb18({'workers':_0xf9207b,'port':_0x322e0c,'primaryOkdb':_0xf3837c,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x322e0c});return _0x34eada({'makeOkdb':_0x2b8f7f,'port':_0x322e0c});}function _0x29cb18({workers:_0x4514a5,port:_0x37c795,primaryOkdb:_0xc3d945,workerEnv:_0x303f7e,workerRole:_0x2db5ca,listenAddr:_0x5efb45}){const _0x346bfb=_0x317aa8,_0x2ee090=new Map(),_0x24839c=new Map();let _0x1e9c5b=![];const _0x5aeedf=_0x44ec0d=>_0x44ec0d?.['__okdbSlot'],_0x444f58=_0x36efb5=>{const _0x2c2980=_0x70ef,_0x6ff3df=_0x80b076[_0x2c2980(0x214)]({...process.env,..._0x303f7e||{},'OKDB_CLUSTER_SLOT':String(_0x36efb5)});return _0x6ff3df[_0x2c2980(0x1e5)]=_0x36efb5,_0x2ee090[_0x2c2980(0x198)](_0x6ff3df[_0x2c2980(0x152)][_0x2c2980(0x1c1)],{'worker':_0x6ff3df,'startedAt':Date['now'](),'slot':_0x36efb5}),_0x6ff3df['on'](_0x2c2980(0x110),_0x2b25a8=>{const _0x4260b2=_0x2c2980;console[_0x4260b2(0x88)](_0x4260b2(0x271)+_0x6ff3df['process'][_0x4260b2(0x1c1)]+_0x4260b2(0xee)+(_0x2b25a8?.[_0x4260b2(0x28a)]??_0x2b25a8));}),_0x6ff3df['on'](_0x2c2980(0x1e4),()=>_0x4dd79c()),_0x6ff3df;},_0x53656e=_0x50d752=>{const _0x268635=_0x70ef;for(const {worker:_0x17d382}of _0x2ee090[_0x268635(0x179)]()){if(_0x17d382[_0x268635(0x19e)]()||!_0x17d382[_0x268635(0x1d5)]())continue;try{_0x17d382[_0x268635(0xe0)](_0x50d752);}catch{}}};_0xc3d945?.['_activateProcesses']?.({'kind':'primary','listenAddr':_0x5efb45})['catch'](()=>{}),_0xc3d945?.[_0x346bfb(0xeb)]?.[_0x346bfb(0x1d8)]?.({'workersConfigured':_0x4514a5});const _0x1b4955={'engines':!![],'processors':!![],'compaction':!![],..._0x2db5ca,'http':!![]},_0x4dd79c=()=>{const _0x38164c=_0x346bfb,_0x16e07c=_0xc3d945?.[_0x38164c(0xeb)];if(!_0x16e07c||!_0x16e07c[_0x38164c(0x222)])return;const _0xb6bf1a=_0x16e07c['selfKey'];for(const {worker:_0x73d12d,startedAt:_0x4deba5,slot:_0x47aadf,stats:_0x4ea64e,processing:_0x13f100}of _0x2ee090[_0x38164c(0x179)]()){if(_0x73d12d[_0x38164c(0x19e)]())continue;const _0x47202b=_0x16e07c[_0x38164c(0x1eb)]?.()&&_0x16e07c[_0x38164c(0x1c5)](_0x38164c(0x12e),_0x365488(_0x47aadf))?.[_0x38164c(0x1df)]===!![];_0x16e07c[_0x38164c(0xa5)]({'pid':_0x73d12d['process'][_0x38164c(0x1c1)],'startedAt':_0x4deba5,'kind':_0x38164c(0x268),'supervisorKey':_0xb6bf1a,'slot':_0x47aadf,'slotKey':_0x365488(_0x47aadf),'role':_0x1b4955,'listenAddr':_0x5efb45,'lifecycle':_0x47202b?_0x38164c(0xca):_0x38164c(0x190),'processing':_0x13f100??null,'stats':_0x4ea64e??null})[_0x38164c(0x255)](()=>{});}},_0x365488=_0x37370a=>_0x3dd6f6('cluster:'+_0x37c795,_0x37370a),_0x38f4fe=_0x8b41=>{const _0x2daa9d=_0x346bfb,_0x4572c1=_0xc3d945?.[_0x2daa9d(0xeb)];if(!_0x4572c1?.['hasDesired']?.())return![];return _0x4572c1['getDesired'](_0x2daa9d(0x12e),_0x365488(_0x8b41))?.[_0x2daa9d(0x1df)]===!![];};for(let _0x555ba3=0x0;_0x555ba3<_0x4514a5;_0x555ba3++){const _0x12af1c=_0x38f4fe(_0x555ba3);_0x24839c[_0x346bfb(0x198)](_0x555ba3,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x12af1c,'respawnTimer':null}),_0x12af1c?console['log'](_0x346bfb(0x1a2)+_0x555ba3+_0x346bfb(0x19f)):_0x444f58(_0x555ba3);}const _0x3d1f89=()=>{const _0x1ff0ed=_0x346bfb,_0x5f5a6=_0xc3d945?.[_0x1ff0ed(0xeb)];if(!_0x5f5a6?.['_isWriter']||!_0x5f5a6['hasDesired']?.())return;for(const [_0x8b7466,_0x4dfa78]of _0x24839c[_0x1ff0ed(0x157)]()){const _0x522625=_0x5f5a6['getDesired'](_0x1ff0ed(0x12e),_0x365488(_0x8b7466)),_0x5a591a=_0x522625?.[_0x1ff0ed(0x1df)]===!![],_0x493001=_0x522625?.[_0x1ff0ed(0x14b)]===!![];if(_0x5a591a&&!_0x4dfa78[_0x1ff0ed(0x2a6)]){_0x4dfa78[_0x1ff0ed(0x2a6)]=!![];_0x4dfa78['respawnTimer']&&(clearTimeout(_0x4dfa78[_0x1ff0ed(0x265)]),_0x4dfa78[_0x1ff0ed(0x265)]=null);for(const {worker:_0x2f0d8c}of _0x2ee090[_0x1ff0ed(0x179)]()){if(_0x5aeedf(_0x2f0d8c)!==_0x8b7466||_0x2f0d8c[_0x1ff0ed(0x19e)]())continue;try{if(_0x493001)_0x2f0d8c['process'][_0x1ff0ed(0x14b)](_0x1ff0ed(0x2a7));else _0x2f0d8c['isConnected']()&&_0x2f0d8c[_0x1ff0ed(0x20c)]();}catch{}}console[_0x1ff0ed(0x88)](_0x1ff0ed(0x266)+(_0x493001?_0x1ff0ed(0x281):_0x1ff0ed(0x280))+'\x20worker\x20slot='+_0x8b7466+_0x1ff0ed(0x1d6));}else{if(!_0x5a591a&&_0x4dfa78['dead']&&_0x522625){_0x4dfa78[_0x1ff0ed(0x2a6)]=![],_0x4dfa78[_0x1ff0ed(0x1aa)]=[],_0x4dfa78[_0x1ff0ed(0x220)]=0x0;const _0x56f2d1=[..._0x2ee090['values']()][_0x1ff0ed(0x16f)](({worker:_0x415bef})=>_0x5aeedf(_0x415bef)===_0x8b7466&&!_0x415bef[_0x1ff0ed(0x19e)]());!_0x56f2d1&&!_0x1e9c5b&&(_0x444f58(_0x8b7466),console[_0x1ff0ed(0x88)](_0x1ff0ed(0x256)+_0x8b7466));}}}},_0x404762=()=>{try{_0x3d1f89();}catch{}};_0xc3d945?.[_0x346bfb(0x234)]?.['on']?.(_0xd0c31c[_0x346bfb(0x1bb)],_0x404762);const _0xd25a57=[];if(_0xc3d945?.[_0x346bfb(0x234)]?.['on'])for(const _0x581c0e of _0x25d4d4){const _0x428650=_0x5c59d6=>{_0x53656e({[_0x1fc319]:_0x42616b,'event':_0x581c0e,'data':_0x5c59d6??{}});};_0xc3d945['events']['on'](_0x581c0e,_0x428650),_0xd25a57[_0x346bfb(0x206)]({'event':_0x581c0e,'handler':_0x428650});}const _0x10937d=setInterval(()=>{_0x3d1f89(),_0x4dd79c();},_0x3d87f4);_0x10937d[_0x346bfb(0x187)]?.();const _0x4b6e91=(_0x2475d9,_0x5826f0)=>{const _0x43723c=_0x346bfb;if(!_0x5826f0||typeof _0x5826f0!==_0x43723c(0x14c)||_0x5826f0[_0x1fc319]!==_0x37e59c)return;if(!_0xc3d945?.[_0x43723c(0x88)]?.['ingest'])return;const _0x5cdaa8=_0x5826f0['entry']||{};_0xc3d945[_0x43723c(0x88)][_0x43723c(0x19c)]({..._0x5cdaa8,'msg':'[w'+_0x5826f0[_0x43723c(0x12e)]+']\x20'+(_0x5cdaa8[_0x43723c(0x2a3)]??''),'meta':{..._0x5cdaa8[_0x43723c(0x9d)]||{},'worker':_0x5826f0[_0x43723c(0x12e)],'workerPid':_0x5826f0[_0x43723c(0x1c1)]}});};_0x80b076['on'](_0x346bfb(0x28a),_0x4b6e91);const _0x521625=(_0x5dc4da,_0xbb94da)=>{const _0x228113=_0x346bfb;if(!_0xbb94da||typeof _0xbb94da!==_0x228113(0x14c)||_0xbb94da[_0x1fc319]!==_0x3e61e5)return;const _0x40cdbe=_0x2ee090['get'](_0x5dc4da[_0x228113(0x152)][_0x228113(0x1c1)]);if(_0x40cdbe){_0x40cdbe[_0x228113(0x2b4)]={..._0xbb94da[_0x228113(0x2b4)],'at':Date[_0x228113(0x1a7)]()};if(_0xbb94da[_0x228113(0x2c7)]!==undefined){const _0x103eaa=_0x2cbf3c(_0xbb94da[_0x228113(0x2c7)]);_0x103eaa!==_0x40cdbe[_0x228113(0x174)]&&(_0x40cdbe[_0x228113(0x174)]=_0x103eaa,_0x15ca63()),_0x40cdbe[_0x228113(0x2c7)]=_0xbb94da['processing'];}}};let _0x5b3e33=null;const _0x15ca63=()=>{const _0x5eae3c=_0x346bfb;if(_0x5b3e33||_0x1e9c5b)return;_0x5b3e33=setTimeout(()=>{_0x5b3e33=null;if(!_0x1e9c5b)_0x4dd79c();},_0x5e296b),_0x5b3e33[_0x5eae3c(0x187)]?.();};_0x80b076['on']('message',_0x521625),_0x80b076['on'](_0x346bfb(0x2bd),(_0x45fcd7,_0x372318,_0xa97c9)=>{const _0x3d1c5d=_0x346bfb,_0x40204b=_0x45fcd7[_0x3d1c5d(0x152)][_0x3d1c5d(0x1c1)],_0x3a2711=_0x5aeedf(_0x45fcd7),_0xf1e413=_0x2ee090[_0x3d1c5d(0x10c)](_0x40204b);if(_0xf1e413&&_0xc3d945?.[_0x3d1c5d(0xeb)])_0xc3d945[_0x3d1c5d(0xeb)][_0x3d1c5d(0x18e)](_0x40204b+':'+_0xf1e413[_0x3d1c5d(0x12c)])[_0x3d1c5d(0x255)](()=>{});_0x2ee090[_0x3d1c5d(0x200)](_0x40204b),console[_0x3d1c5d(0x88)](_0x3d1c5d(0x271)+_0x40204b+_0x3d1c5d(0x2aa)+(_0x3a2711??'?')+_0x3d1c5d(0x2bf)+(_0x3d1c5d(0x1fd)+_0x372318+_0x3d1c5d(0x11c)+(_0xa97c9??_0x3d1c5d(0x98))+_0x3d1c5d(0x150)+_0x2ee090[_0x3d1c5d(0x2c4)]+'\x20worker(s)\x20remaining')),_0x4dd79c();if(_0x1e9c5b||_0x3a2711==null)return;const _0x274cdf=_0x24839c[_0x3d1c5d(0x10c)](_0x3a2711);if(!_0x274cdf||_0x274cdf[_0x3d1c5d(0x2a6)])return;const _0x5829ba=Date[_0x3d1c5d(0x1a7)]();_0x274cdf[_0x3d1c5d(0x1aa)][_0x3d1c5d(0x206)](_0x5829ba),_0x274cdf['deaths']=_0x274cdf[_0x3d1c5d(0x1aa)][_0x3d1c5d(0xda)](_0x5b6f66=>_0x5829ba-_0x5b6f66<=_0x4056b7);if(_0x274cdf[_0x3d1c5d(0x1aa)][_0x3d1c5d(0x202)]>=_0x289313){_0x274cdf[_0x3d1c5d(0x2a6)]=!![],console[_0x3d1c5d(0x110)]('[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot='+_0x3a2711+_0x3d1c5d(0xfc)+_0x274cdf['deaths'][_0x3d1c5d(0x202)]+_0x3d1c5d(0x225)+(_0x4056b7+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x2ee090['size']+_0x3d1c5d(0x13f)));return;}_0x274cdf['consecutiveFailures']++;const _0x18e6f8=Math['min'](_0x102cf2,_0x233976*0x2**(_0x274cdf['consecutiveFailures']-0x1));console['log'](_0x3d1c5d(0x1fa)+_0x3a2711+_0x3d1c5d(0x23a)+_0x18e6f8+_0x3d1c5d(0xbf)+_0x274cdf[_0x3d1c5d(0x220)]+')'),_0x274cdf[_0x3d1c5d(0x265)]=setTimeout(()=>{const _0x1d2408=_0x3d1c5d;_0x274cdf[_0x1d2408(0x265)]=null;if(_0x1e9c5b||_0x274cdf[_0x1d2408(0x2a6)])return;const _0x1555ec=_0x444f58(_0x3a2711);_0x1555ec['once'](_0x1d2408(0x16a),()=>{const _0xf46119=_0x1d2408;if(_0x24839c[_0xf46119(0x10c)](_0x3a2711)===_0x274cdf)_0x274cdf['consecutiveFailures']=0x0;});},_0x18e6f8),_0x274cdf['respawnTimer'][_0x3d1c5d(0x187)]?.();});const _0xd14ae5=[..._0x2ee090['keys']()];console['log'](_0x346bfb(0x89)+process[_0x346bfb(0x1c1)]+'\x20forked\x20'+_0x4514a5+'\x20HTTP\x20server(s)\x20on\x20port\x20'+_0x37c795+':\x20'+('['+_0xd14ae5[_0x346bfb(0xf4)](',\x20')+']'));const _0x165b3d={'_isClusterController':!![],'port':_0x37c795,'primaryOkdb':_0xc3d945??null,'status'(){const _0x36626e=_0x346bfb;return{'clustered':!![],'primaryPid':process[_0x36626e(0x1c1)],'port':_0x37c795,'primaryRole':_0xc3d945?.[_0x36626e(0x27c)]??null,'processorPid':null,'supervisorPid':process[_0x36626e(0x1c1)],'workers':[..._0x2ee090[_0x36626e(0x179)]()][_0x36626e(0xcc)](({worker:_0x30c3fc})=>({'pid':_0x30c3fc['process'][_0x36626e(0x1c1)],'id':_0x30c3fc['id'],'dead':_0x30c3fc[_0x36626e(0x19e)]()}))};},async 'close'(){const _0x90debb=_0x346bfb;_0x1e9c5b=!![];for(const _0x3c2a42 of _0x24839c[_0x90debb(0x179)]()){_0x3c2a42[_0x90debb(0x2a6)]=!![],_0x3c2a42[_0x90debb(0x265)]&&(clearTimeout(_0x3c2a42['respawnTimer']),_0x3c2a42[_0x90debb(0x265)]=null);}clearInterval(_0x10937d);_0x5b3e33&&(clearTimeout(_0x5b3e33),_0x5b3e33=null);_0x80b076[_0x90debb(0xf3)]('message',_0x4b6e91),_0x80b076[_0x90debb(0xf3)](_0x90debb(0x28a),_0x521625),_0xc3d945?.[_0x90debb(0x234)]?.['off']?.(_0xd0c31c[_0x90debb(0x1bb)],_0x404762);if(_0xc3d945?.['events']?.[_0x90debb(0xf3)])for(const {event:_0x2f9c0a,handler:_0x5f4835}of _0xd25a57){try{_0xc3d945['events']['off'](_0x2f9c0a,_0x5f4835);}catch{}}_0xd25a57['length']=0x0;const _0x3dc1af=[..._0x2ee090[_0x90debb(0x179)]()][_0x90debb(0xcc)](({worker:_0x1ab444})=>_0x1ab444);if(_0x3dc1af['length']===0x0)return;await Promise[_0x90debb(0xc5)](_0x3dc1af['map'](_0x14e4fe=>new Promise(_0x1d5683=>{const _0x362253=_0x90debb;if(_0x14e4fe[_0x362253(0x19e)]()){_0x1d5683();return;}let _0x4c891c=![];const _0x383242=()=>{if(_0x4c891c)return;_0x4c891c=!![];if(_0x3b5f57)clearTimeout(_0x3b5f57);_0x1d5683();};_0x14e4fe[_0x362253(0x18c)]('exit',_0x383242);const _0x3b5f57=setTimeout(()=>{const _0xd872f7=_0x362253;try{_0x14e4fe[_0xd872f7(0x152)]['kill']();}catch{}},_0x10c29d+0x1f4);_0x3b5f57[_0x362253(0x187)]?.();try{_0x14e4fe[_0x362253(0x20c)]();}catch{try{_0x14e4fe[_0x362253(0x152)][_0x362253(0x14b)]();}catch{}}})));}};return _0x165b3d;}async function _0x34eada({makeOkdb:_0x1d73fb,port:_0x1fbe00}){const _0x19424b=_0x317aa8,_0x74f8a7=await _0x1d73fb();return _0x5e428c(_0x74f8a7),_0x74f8a7[_0x19424b(0x107)][_0x19424b(0xc6)](_0x1fbe00);}function _0x5e428c(_0x2a28c0){const _0x856aed=_0x317aa8;if(!_0x2a28c0||_0x2a28c0[_0x856aed(0x105)])return;_0x2a28c0[_0x856aed(0x105)]=!![];try{const {OKDBChangefeed:_0x3a7621}=requireOkdbChangefeed(),_0x4aa191=_0x2a28c0[_0x856aed(0x129)];if(_0x4aa191&&typeof _0x4aa191['attachFeed']===_0x856aed(0xc0)){const _0xda48bc=new _0x3a7621(_0x2a28c0);_0xda48bc[_0x856aed(0xc3)](),_0x4aa191[_0x856aed(0x210)](_0xda48bc),_0x2a28c0['_changefeed']=_0xda48bc;}}catch(_0x4fbecc){_0x2a28c0[_0x856aed(0x88)]?.[_0x856aed(0xdb)]?.('[okdb-cluster]\x20change-feed\x20init\x20failed:\x20'+(_0x4fbecc?.[_0x856aed(0x28a)]??_0x4fbecc),{'feature':_0x856aed(0xc4)});}const _0x5006e6=_0x34d6d2=>{const _0xa6089d=_0x856aed;if(!_0x34d6d2||typeof _0x34d6d2!==_0xa6089d(0x14c)||_0x34d6d2[_0x1fc319]==null)return;if(_0x34d6d2[_0x1fc319]===_0x42616b)try{_0x2a28c0[_0xa6089d(0x129)]?.[_0xa6089d(0x120)]?.(_0x34d6d2['event'],_0x34d6d2['data']);}catch{}};process['on'](_0x856aed(0x28a),_0x5006e6),_0x2a28c0[_0x856aed(0xd3)]=_0x5006e6;{let _0x224157=process[_0x856aed(0xa6)](),_0x33cfb6=Date[_0x856aed(0x1a7)]();const _0x381e26=()=>{const _0x122e22=_0x856aed;if(typeof process[_0x122e22(0xe0)]!==_0x122e22(0xc0)||!process[_0x122e22(0xd8)])return;const _0x446377=Date[_0x122e22(0x1a7)](),_0x6100b=process[_0x122e22(0xa6)](),_0x260a82=(_0x446377-_0x33cfb6)*0x3e8,_0x4e06bc=_0x6100b[_0x122e22(0x191)]-_0x224157[_0x122e22(0x191)]+(_0x6100b[_0x122e22(0x1fe)]-_0x224157[_0x122e22(0x1fe)]),_0x243288=_0x260a82>0x0?Math[_0x122e22(0x17b)](0x64,Math[_0x122e22(0x92)](_0x4e06bc/(_0x260a82*(_0x32ea33[_0x122e22(0x201)]()[_0x122e22(0x202)]||0x1))*0x64)):0x0;_0x224157=_0x6100b,_0x33cfb6=_0x446377;const _0x17d297=process[_0x122e22(0x223)]();let _0x5d7c9a=null;try{_0x5d7c9a=_0x2a28c0['role']?.[_0x122e22(0x1ce)]?_0x2a28c0[_0x122e22(0xeb)]?.[_0x122e22(0x25e)]?.()??null:null;}catch{}try{process[_0x122e22(0xe0)]({[_0x1fc319]:_0x3e61e5,'stats':{'rss':_0x17d297[_0x122e22(0x108)],'heapUsed':_0x17d297[_0x122e22(0x21d)],'heapTotal':_0x17d297[_0x122e22(0x24e)],'external':_0x17d297[_0x122e22(0xad)],'cpuPct':_0x243288,'cpuWindowMs':Math[_0x122e22(0x92)](_0x260a82/0x3e8)||null},'processing':_0x5d7c9a});}catch{}},_0x34ad52=Math[_0x856aed(0x293)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x47c8ed=setInterval(_0x381e26,_0x34ad52);_0x47c8ed[_0x856aed(0x187)]?.(),_0x381e26();for(const _0x18b088 of[_0x856aed(0xc8),_0x856aed(0x141)]){_0x2a28c0[_0x856aed(0x234)]?.['on']?.(_0x18b088,()=>{try{_0x381e26();}catch{}});}}let _0x5093c1=![];const _0x4ec65b=async _0x468ca3=>{const _0x537c0a=_0x856aed;if(_0x5093c1)return;_0x5093c1=!![];const _0x56b5ca=setTimeout(()=>process[_0x537c0a(0x2bd)](_0x468ca3),_0x10c29d);_0x56b5ca['unref']?.();try{await _0x2a28c0[_0x537c0a(0x2c5)]?.();}catch{}process[_0x537c0a(0x2bd)](_0x468ca3);};process['on']('disconnect',()=>_0x4ec65b(0x0));if(process[_0x856aed(0xe0)]&&!process[_0x856aed(0xd8)])_0x4ec65b(0x0);if(process[_0x856aed(0xc2)]!==_0x856aed(0xa8)){const _0x54f451=setInterval(()=>{const _0x162724=_0x856aed;if(process[_0x162724(0x298)]===0x1)_0x4ec65b(0x0);},_0x18d9d6);_0x54f451[_0x856aed(0x187)]?.(),_0x2a28c0[_0x856aed(0x28e)]=_0x54f451;}}return okdbCluster={'runClustered':_0x51282b,'attachWorkerCluster':_0x5e428c},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0x3b8709=_0xa5e620;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x34734d=require$$0$5,{attachWorkerCluster:_0x15d14c}=requireOkdbCluster();async function _0x35e7fa(){const _0x20ae3e=_0x70ef,_0x5628d7=process.env.OKDB_HTTP_CHILD;if(!_0x5628d7)throw new Error(_0x20ae3e(0x1ac));const {rootPath:_0x32f438,port:_0x299fe8,options:options={},logLevel:logLevel=_0x20ae3e(0xb7)}=JSON[_0x20ae3e(0x1c3)](_0x5628d7);if(!_0x32f438||!_0x299fe8)throw new Error('okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required');const _0x4247f4=new _0x34734d(_0x32f438,{...options,'engines':![],'processors':![],'compaction':![]});_0x4247f4[_0x20ae3e(0x88)]['detachConsole']?.();const _0x6957fc=process.env.OKDB_CLUSTER_SLOT??'?',_0x25ca8c={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x168b81=_0x25ca8c[logLevel]??_0x25ca8c[_0x20ae3e(0xb7)];_0x4247f4[_0x20ae3e(0x88)]['attach'](_0x190be7=>{const _0x5f4e3c=_0x20ae3e;if((_0x25ca8c[_0x190be7[_0x5f4e3c(0x1ef)]]??0x1)<_0x168b81)return;try{process[_0x5f4e3c(0xe0)]?.({'__okdbCluster':_0x5f4e3c(0x88),'slot':_0x6957fc,'pid':process[_0x5f4e3c(0x1c1)],'entry':_0x190be7});}catch{}}),await _0x4247f4[_0x20ae3e(0x1cb)](),_0x15d14c(_0x4247f4),await _0x4247f4[_0x20ae3e(0x107)][_0x20ae3e(0xc6)](_0x299fe8);}return _0x35e7fa()[_0x3b8709(0x255)](_0x4721fa=>{const _0x640c42=_0x3b8709;try{process[_0x640c42(0xe0)]?.({'__okdbCluster':'log','slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x640c42(0x1c1)],'entry':{'level':'error','msg':'http\x20worker\x20child\x20failed:\x20'+(_0x4721fa?.['message']??_0x4721fa)}});}catch{}process[_0x640c42(0x2bd)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module[_0xa5e620(0x151)]=okdbHttpWorkerChild;
|