@kedem/okdb 2.2.1 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +287 -0
- package/algorithm-worker-thread.js +1 -1
- package/bin/okdb.js +1 -1
- package/docs/embeddings.md +83 -5
- package/docs/fts.md +1 -1
- package/docs/licensing.md +75 -14
- package/docs/manifest.json +1 -0
- package/docs/resolved-fields.md +79 -0
- package/okdb-functions-sandbox-worker.js +1 -1
- package/okdb-http-worker-child.js +1 -1
- package/okdb-views-bootstrap-worker.js +1 -1
- package/okdb.js +1 -1
- package/package.json +1 -1
- package/public/modules/ok.js +1 -1
- package/public/sections/db/modals/create-env-modal.ok.js +1 -1
- package/public/sections/db/modals/remove-env-modal.ok.js +1 -1
- package/public/sections/db/modals/schema-edit-modal.ok.js +1 -1
- package/public/sections/embeddings/parts/embed-create-panel.ok.js +1 -1
- package/public/sections/embeddings/parts/embed-search-panel.ok.js +1 -1
- package/public/sections/embeddings/parts/pipeline-try-search.ok.js +1 -1
- package/public/sections/license/parts/license-panel.ok.js +1 -1
- package/public/sections/queue/modals/create-bucket-modal.ok.js +1 -1
- package/public/sections/queue/modals/edit-bucket-modal.ok.js +1 -1
- package/public/sections/sync/index.ok.html +2 -2
- package/public/sections/sync/modals/connect-peer-modal.ok.js +1 -1
- package/public/sections/system/parts/system-sync-panel.ok.js +1 -1
- package/public/vendor/okjs/ok.esm.min.js +1 -1
- package/public/vendor/okjs/toolkit/devtools/devtools-window.js +1 -0
- package/public/vendor/okjs/toolkit/devtools/ok-console.ok.js +1 -1
- package/public/vendor/okjs/toolkit/devtools/ok-crash-explorer-service.ok.js +1 -0
- package/public/vendor/okjs/toolkit/devtools/ok-crash-explorer.ok.js +1 -0
- package/public/vendor/okjs/toolkit/elements/ok-icon.ok.js +1 -1
- package/public/vendor/okjs/toolkit/errors/crash-minimal.ok.js +1 -0
- package/public/vendor/okjs/toolkit/errors/ok-crash-boundary.ok.js +1 -1
- package/public/vendor/okjs/toolkit/errors/ok-crash-info.ok.js +1 -1
- package/public/vendor/okjs/toolkit/manifest.js +1 -1
- package/types/environment.d.ts +26 -0
- package/types/features/licenses.d.ts +86 -0
- package/types/index.d.ts +11 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0xa12a27=_0x372a;(function(_0x516e8a,_0x112e93){const _0xc61a4c=_0x372a,_0x5a2942=_0x516e8a();while(!![]){try{const _0x2d7cf1=parseInt(_0xc61a4c(0x15b))/0x1*(parseInt(_0xc61a4c(0x2f1))/0x2)+parseInt(_0xc61a4c(0x267))/0x3*(-parseInt(_0xc61a4c(0x2b3))/0x4)+-parseInt(_0xc61a4c(0x1b8))/0x5+parseInt(_0xc61a4c(0x285))/0x6+-parseInt(_0xc61a4c(0x1df))/0x7*(parseInt(_0xc61a4c(0x1e6))/0x8)+-parseInt(_0xc61a4c(0x27b))/0x9+-parseInt(_0xc61a4c(0x1c0))/0xa*(-parseInt(_0xc61a4c(0x1dd))/0xb);if(_0x2d7cf1===_0x112e93)break;else _0x5a2942['push'](_0x5a2942['shift']());}catch(_0x50d728){_0x5a2942['push'](_0x5a2942['shift']());}}}(_0x1bdc,0x25ada));var require$$0$5=require('./okdb'),require$$1$1=require(_0xa12a27(0x252)),require$$1=require(_0xa12a27(0x2da)),require$$0$3=require('os'),require$$2=require(_0xa12a27(0xee)),require$$0=require(_0xa12a27(0x157)),require$$0$2=require(_0xa12a27(0x1b7)),require$$0$1=require('fs'),require$$0$4=require('node:events');function getDefaultExportFromCjs(_0x3994a6){const _0x4698ad=_0xa12a27;return _0x3994a6&&_0x3994a6[_0x4698ad(0x208)]&&Object[_0x4698ad(0x1a5)][_0x4698ad(0x142)][_0x4698ad(0x258)](_0x3994a6,_0x4698ad(0x2e9))?_0x3994a6[_0x4698ad(0x2e9)]:_0x3994a6;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x406246=_0xa12a27;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x46559c={'PUT':_0x406246(0x1cf),'REMOVE':_0x406246(0x1e9),'INDEX_DROP':_0x406246(0x238),'INDEX_REGISTER':_0x406246(0x146),'INDEX_RESET':_0x406246(0xfd),'TYPE_REGISTER':_0x406246(0x2e6),'TYPE_DROP':_0x406246(0x1f6),'FTS_REGISTER':'registerFts','FTS_DROP':_0x406246(0x144),'FTS_RESET':'resetFts','SCHEMA_SET':_0x406246(0x1c9),'SCHEMA_DROP':_0x406246(0x202),'TTL_SET':_0x406246(0x2ed),'TTL_CLEAR':'clearTtl'},_0xcef309={'SYSTEM_READY':_0x406246(0x129),'SYSTEM_STOPPED':_0x406246(0x2cc),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x406246(0x14f),'SYSTEM_DRAIN':'system:drain','SYSTEM_TYPE_DROP':'system:type_drop','SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x406246(0x1c5),'ITEM_CREATE':_0x406246(0x2cf),'ITEM_UPDATE':_0x406246(0x201),'ITEM_REMOVE':_0x406246(0x19f),'INDEX_RESET':'index:reset','INDEX_READY':_0x406246(0x130),'INDEX_PROGRESS':'index:progress','VIEW_PROGRESS':_0x406246(0x162),'INDEX_DROP':_0x406246(0x21f),'INDEX_REGISTERED':'index:registered','FTS_REGISTERED':_0x406246(0x2d3),'FTS_DROP':'fts:drop','FTS_RESET':_0x406246(0x219),'SCHEMA_SET':_0x406246(0x15d),'SCHEMA_DROP':_0x406246(0x21d),'UNIQUE_VIOLATION':_0x406246(0x131),'UNIQUE_VIOLATION_RESOLVED':_0x406246(0xf9),'REF_VIOLATION':_0x406246(0x179),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x406246(0x15c),'TXN_START':_0x406246(0x1d6),'TXN_END':_0x406246(0x260),'TXN_ROLLBACK':_0x406246(0x16f),'TYPE_REGISTERED':'type:registered','TYPE_DROP':_0x406246(0x1c6),'ENV_OPENED':_0x406246(0x2e0),'ENV_REMOVED':'env:removed','SYSTEM_ENV_RELEASE':'system:env_release','TTL_EXPIRED':'ttl:expired','TTL_SET':_0x406246(0x22d),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x406246(0x1c8),'LICENSE_ADDED':_0x406246(0x1d7),'LICENSE_ACTIVATED':_0x406246(0x26f),'LICENSE_REMOVED':_0x406246(0x276)},_0x2536d3={'CREATING':_0x406246(0xcd),'RESETTING':_0x406246(0x10d),'READY':_0x406246(0x2f0),'DROPPING':_0x406246(0x2df),'WAITING':_0x406246(0xf0)},_0x34defe={'CREATED':_0x406246(0x173),'STARTING':_0x406246(0x13a),'STARTED':'started','STOPPING':_0x406246(0x2a3),'STOPPED':'stopped'},_0xbd4da6={'CREATING':_0x406246(0xcd),'READY':_0x406246(0x2f0),'HALTED':_0x406246(0x1a1),'STOPPED':_0x406246(0x225),'RESETTING':_0x406246(0x10d)},_0x31b7de=Object['freeze']({'POKE':_0x406246(0x171),'DRAIN':_0x406246(0xdf),'TYPE_DROP':_0x406246(0x242),'PROC':'bus:proc','ENV_RELEASE':_0x406246(0x184)});return okdbEnums={'BUS_EVENTS':_0x31b7de,'CHANGE_ACTIONS':_0x46559c,'EVENTS':_0xcef309,'INDEX_STATE':_0x2536d3,'OKDB_STATE':_0x34defe,'VIEW_STATE':_0xbd4da6},okdbEnums;}function _0x1bdc(){const _0x372719=['min','heapUsed','--inspect',')\x20exited\x20','_lastCpuPct','slice','updateSupervisedChildStats','\x20drainAge=','_db','reportThreadStats','cli','platform','slot','primary',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','filter','system:ready','bumpCmd','process\x20','treeView','http\x20worker\x20child\x20failed:\x20','registry\x20heartbeat\x20skipped\x20(writer=','workers','index:ready','unique:violation','_envs','\x20while\x20this\x20process\x20runs\x20','flushed','_buildProcessingFacet','tryAcquire','cpus','_lastCpuAt','commit','starting','load','options','type','afterWrite','host','updatedAt','_migrateVocab','hasOwnProperty','claims','dropFts','_closed','registerIndex','slotKey','childTransaction','force',',\x20signal=','cpuWindowMs','processor:paused','message','clear','system:poke','_onPoke','listNodes','fanout','ORPHAN\x20(env-closed\x20write)','procmode/','processes','_nodeDbCache','node:perf_hooks','_baselines','entries','test','386QDvBJR','sync:apply','schema:set','instanceId','_report','close','REMOVE','view:progress','_buildOwnRow','hasType','okdb-http-worker-child.js','includes','worker','heartbeatMs','warn','_wantDb','events','_admissionTimer','namespace','SYNC_COMMITS','txn:rollback','processKey','bus:poke','oldestPendingMs','created','_outstanding','SIGKILL','http','committed','_nodeDbFor','ref:violation','user','env','_durs','_ownMeta','(code=','maxExtra','_admissionStarted','push','_sandbox','error:\x20','bus:env_release','attachFeed','allSettled','_refreshDesiredSnapshot','transaction','\x20worker\x20slot=','_children','max','abs','none','fromEntries','clusterStatusView','quantum','isDead','\x20\x20env=','online','processor','nodesView','then','_clusterOrphanWatch','status','INDEX_REGISTERED','ms\x20mean=','randomUUID','_nodeDb','_scheduleFlush','envsOpen','item:remove','singletonClaims','halted','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.','--print','detachConsole','prototype','processor:retry','_participate','listAll','removeSync','deregisterSelf','getProcess','stderr','busy','registry-publish','exports','1ofN:','ppid','listDesired','stats','getClock','_onItem','nodeKey','perf_hooks','58915ZtbTwr','_putRowAsync','building','commitP99Ms','_statusEnv','processing','node','\x20statusEnv=','3530vuZqPn','enable','startsWith','_released','markClosed','system:bus_state_change','type:drop','_onStop','license:invalid','setSchema','object','has','_buildChildRow','_isStale','_threadStats','put','_buckets','level','fast','_rootDb','_desired','\x20phase=','txn:start','license:added','ttlMs','_sampleOwnStats','okdb-diag.','setDesired','\x20died\x20','11429BpGKNo','removeNode','7eoPCIs','memoryUsage','--eval','instances','ms/','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','mean','360776zynnxq','transactionSync','_startHeartbeat','remove','_nodeDead','ms\x20on\x20env=','floor','toFixed','ITEM_UPDATE','_isWriter','raw-remove','dead','find','okdb','count','ms\x20activeWriters=','dropType','_hbTimer','\x20(durable\x20desired-state)','processor:resumed','FTS_REGISTERED','_inflight','commitsPerSec','unref','\x20ipc\x20error:\x20','_enableChangelog','signalWant','item:update','dropSchema','uncaughtException','recent\x20writes\x20(newest\x20first)','standalone','_pending','compaction','__esModule','processorId','meta','draining','async','SYSTEM_PROC','deaths','_started','\x20times\x20in\x20','_coordinator','_onProcEvent','cursorKey','inst:','sandbox','_rawDb','__vocab/version','\x20in\x20','fts:reset','number','function','external','schema:drop','enabled','index:drop','ENV_CLOSING_RETRY','beforeWrite','lifecycle','_processStartedAt','loop-lag','stopped','_role','exit','(worst\x20','_handleInProcess','acquiredAt','getRange','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','ttl:set','putSync','--watch','\x20@\x20','isWanted','heapTotal','list','runtimeProcessesView','_selfKey','label','_wantDbHandle','dropIndex','entry','_committed','ms\x20env=','clearThreadStats','log','release','_heartbeatInFlight','parse','shift','bus:type_drop','removeSupervisedChild','inflightAgesMs','_quantum','\x20sync','start','_instanceId','[okdb-cluster]\x20','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','selfKey','holder','_caps','_seen','\x20—\x20','loop-lag\x20','_dedupeMax','cluster','isHeld','send','data','rows=','addSupervisedChild','call','offWindow','error','tierList','_putRowSync','SWAP','_publishFailWarned','_onTick','txn:end','off','publishChildRow','listenAddr','embedded','_windowCbs','_flushTimer','3LBGCWr','SYSTEM_POKE','single','engines','ms\x20(attempt\x20','cpuPct','catch','_draining','license:activated','INDEX_PROGRESS','migrations','_cmd','.log','_lastCpuUsage','role','license:removed','disable','participate','~processes:desired','_flushDebounce','1358649dHkvAB','_ensureDesired','_rowKey','_markSeen','_writer','state','trim','_removeRowAsync','noteListenAddr','repeat','771624WnfWWs','connected','_collectWriterFacet','execArgv','okdb-writer:\x20env\x20closing\x20—\x20retry','setupPrimary','_listenAddr','_cursors','next','inspect','view','firstTs','uptime','percentile','open','emit','flushLmdb','processor:ready','flushDebounce','size','_heartbeatTimer',':want','createEnvironment','openDB','_dedupeKey','some','reduce','_key','\x20│\x20','isConnected','stopping','ephemeral','_groupByProcess','consecutiveFailures','stop','once','kind','_maybePublish','rss',');\x20','\x20\x20(no\x20env\x20draining)','now','\x20worker(s)\x20remaining','fork','\x20pid=','processors','1117976wUfMtu','_singletonLock','_isReader','cluster-wide','_clusterWorkerAttached','keys','ingest','toISOString','_done','_timer','isActive','maxMs','hostname','_publishNow','values','dumpedAt','listen','FTS_DROP','\x20===','code','~processes','appendFileSync','\x20HTTP\x20server(s)\x20on\x20port\x20','2.2.1','_lockDb','system:stopped','round','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','item:create','\x20parkedNow=','claimGated','kill','fts:registered','procmodeack/','_drain','race','processingStatusView','\x0a===\x20OKDB_DIAG\x20','http-server','path','disconnect','stack','add','map','dropping','env:opened','reap','unclaimed','respawnTimer','depth','indexOf','registerType','change','_log','default','name','caps','\x20\x20#','setTtl','version','raw-put','ready','758aQVJnQ','_lastCpuWindowMs','children','startedAt','_singletonLocks','_drainOne','_openEnvLazy','_bpWaiters','~lock','resolve','creating','processor:progress','set','length','_lock','cpuUsage','string','putNode','_versionSkewWarned','sync','_holderDead','split','_bpParkedTotal','feed:','write','hard-killed','setOwnMeta','getDesired','bus:drain','decommission','compact','register','_acquiredAt','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','threads','supervisorKey','note','ms\x20max=','_adminRelay','_highWater','running','stopHeartbeat','process','crypto','_handlePoke','waiting','ITEM_CREATE','[okdb-cluster]\x20primary\x20pid=','_startedAt','seq','_enqueuedAt','join','\x20worker(s)\x20still\x20serving','get','unique:violation_resolved','delete','_desiredOverlay','_supervisorKey','resetIndex','~processes:cmd','_activateProcesses','node/','expiresAt','decommissioned','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','hasDesired','parkedNow','_systemEnv','prependListener','startHeartbeat','__okdbSlot','_getType','splice','--test','resetting','system','_kind','_collectSingletonClaims','sort','pid','VIEW_PROGRESS','dedupeMax','_lastPublishAt','mode','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','[okdb-cluster]\x20worker\x20pid='];_0x1bdc=function(){return _0x372719;};return _0x1bdc();}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x422bac=_0xa12a27;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x192224,performance:_0x2fd10f}=require$$0,_0xd7fe8=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG==='true',_0x21f7a3=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x3adb43=process.env.OKDB_LOOP_LAG_ALL==='1',_0x3ab6b4=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x36c420{constructor(){const _0x5a2c0c=_0x372a;this['enabled']=_0xd7fe8,this[_0x5a2c0c(0x1d0)]=new Map(),this['_h']=null,this[_0x5a2c0c(0x2bc)]=null,this['_started']=![],this[_0x5a2c0c(0x2e8)]=(_0x17a9cb,_0x15898a)=>process[_0x5a2c0c(0x1ac)]['write'](_0x17a9cb+(_0x15898a?'\x20'+JSON['stringify'](_0x15898a):'')+'\x0a');}['now'](){const _0x410eae=_0x372a;return _0x2fd10f[_0x410eae(0x2ae)]();}['setLogger'](_0x43a369){const _0x636b2e=_0x372a;if(typeof _0x43a369===_0x636b2e(0x21b))this[_0x636b2e(0x2e8)]=_0x43a369;}['note'](_0x3b1e37,_0x3e4317,_0x408908){const _0x35eb15=_0x372a;if(!this[_0x35eb15(0x21e)])return;let _0x149543=this['_buckets'][_0x35eb15(0xf8)](_0x3b1e37);!_0x149543&&(_0x149543={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x35eb15(0x1d0)]['set'](_0x3b1e37,_0x149543)),_0x149543['ms']+=_0x3e4317,_0x149543[_0x35eb15(0x1f4)]+=0x1,_0x3e4317>_0x149543[_0x35eb15(0x2be)]&&(_0x149543[_0x35eb15(0x2be)]=_0x3e4317,_0x149543[_0x35eb15(0x17f)]=_0x408908||'');}['start'](_0x1cead8){const _0x1d98b8=_0x372a;if(!this[_0x1d98b8(0x21e)]||this[_0x1d98b8(0x20f)])return;this['_started']=!![];if(_0x1cead8)this[_0x1d98b8(0x2e8)]=_0x1cead8;this['_h']=_0x192224({'resolution':0xa}),this['_h'][_0x1d98b8(0x1c1)](),this['_timer']=setInterval(()=>this[_0x1d98b8(0x15f)](),_0x21f7a3);if(this[_0x1d98b8(0x2bc)]['unref'])this[_0x1d98b8(0x2bc)][_0x1d98b8(0x1fd)]();}['onWindow'](_0x4795f8){const _0x17c2b6=_0x372a;if(!this['_windowCbs'])this[_0x17c2b6(0x265)]=new Set();this[_0x17c2b6(0x265)][_0x17c2b6(0x2dd)](_0x4795f8);if(!this[_0x17c2b6(0x20f)])this['_startAdmission']();}[_0x422bac(0x259)](_0x2c0a22){const _0x4fe5c1=_0x422bac;this[_0x4fe5c1(0x265)]?.[_0x4fe5c1(0xfa)](_0x2c0a22);}['_startAdmission'](){const _0xa1adf1=_0x422bac;if(this['_admissionStarted'])return;this[_0xa1adf1(0x180)]=!![];!this['_h']&&(this['_h']=_0x192224({'resolution':0xa}),this['_h']['enable']());const _0x1caf3e=_0x21f7a3;this[_0xa1adf1(0x16c)]=setInterval(()=>{const _0x43140d=_0xa1adf1,_0x20c5fb=this['_h'];if(!_0x20c5fb)return;const _0x178bd0=_0x20c5fb[_0x43140d(0x292)](0x63)/0xf4240,_0x5f7368=_0x20c5fb['max']/0xf4240,_0x52537f=_0x20c5fb[_0x43140d(0x1e5)]/0xf4240;_0x20c5fb['reset']();if(this[_0x43140d(0x265)])for(const _0x7ff3b3 of this[_0x43140d(0x265)]){try{_0x7ff3b3({'p99Ms':_0x178bd0,'maxMs':_0x5f7368,'meanMs':_0x52537f,'reportMs':_0x1caf3e});}catch{}}},_0x1caf3e);if(this[_0xa1adf1(0x16c)][_0xa1adf1(0x1fd)])this[_0xa1adf1(0x16c)]['unref']();}['_report'](){const _0xfa6dc2=_0x422bac,_0x1e52d2=this['_h'],_0x2f3d45=_0x1e52d2[_0xfa6dc2(0x18b)]/0xf4240,_0x482008=_0x1e52d2[_0xfa6dc2(0x292)](0x63)/0xf4240,_0x54a07d=_0x1e52d2[_0xfa6dc2(0x1e5)]/0xf4240;_0x1e52d2['reset']();const _0x196e3b=[...this[_0xfa6dc2(0x1d0)][_0xfa6dc2(0x159)]()][_0xfa6dc2(0x2de)](([_0x4ebbf8,_0x508720])=>({'label':_0x4ebbf8,..._0x508720}))[_0xfa6dc2(0x111)]((_0xc14666,_0x450d41)=>_0x450d41['ms']-_0xc14666['ms'])['slice'](0x0,0x8);this[_0xfa6dc2(0x1d0)][_0xfa6dc2(0x14e)]();const _0x48bfe2=_0x196e3b[_0xfa6dc2(0x29f)]((_0x53195b,_0x596cc7)=>_0x53195b+_0x596cc7['ms'],0x0),_0x1f4854=_0x196e3b['map'](_0x3bf04d=>_0x3bf04d[_0xfa6dc2(0x236)]+'='+_0x3bf04d['ms'][_0xfa6dc2(0x1ed)](0x0)+_0xfa6dc2(0x1e3)+_0x3bf04d[_0xfa6dc2(0x1f4)]+(_0x3bf04d[_0xfa6dc2(0x2be)]>0x5?_0xfa6dc2(0x228)+_0x3bf04d[_0xfa6dc2(0x2be)][_0xfa6dc2(0x1ed)](0x0)+'ms'+(_0x3bf04d[_0xfa6dc2(0x17f)]?'\x20'+_0x3bf04d[_0xfa6dc2(0x17f)]:'')+')':''));(_0x3adb43||_0x2f3d45>=_0x3ab6b4)&&this[_0xfa6dc2(0x2e8)](_0xfa6dc2(0x250)+_0x21f7a3+_0xfa6dc2(0xe8)+_0x2f3d45[_0xfa6dc2(0x1ed)](0x0)+'ms\x20p99='+_0x482008[_0xfa6dc2(0x1ed)](0x0)+_0xfa6dc2(0x19a)+_0x54a07d[_0xfa6dc2(0x1ed)](0x0)+'ms\x20busy='+_0x48bfe2['toFixed'](0x0)+'ms'+(_0x1f4854[_0xfa6dc2(0xd0)]?_0xfa6dc2(0x2a1)+_0x1f4854[_0xfa6dc2(0xf6)]('\x20\x20'):''),{'feature':_0xfa6dc2(0x224)});if(this[_0xfa6dc2(0x265)])for(const _0x1fd857 of this[_0xfa6dc2(0x265)]){try{_0x1fd857({'p99Ms':_0x482008,'maxMs':_0x2f3d45,'meanMs':_0x54a07d,'reportMs':_0x21f7a3});}catch{}}}[_0x422bac(0x2a7)](){const _0x53bd66=_0x422bac;if(this[_0x53bd66(0x2bc)])clearInterval(this[_0x53bd66(0x2bc)]);if(this['_h'])this['_h'][_0x53bd66(0x277)]();this[_0x53bd66(0x2bc)]=null,this['_h']=null,this[_0x53bd66(0x20f)]=![];}}const _0x3493c9=new _0x36c420();if(_0x3493c9[_0x422bac(0x21e)])_0x3493c9[_0x422bac(0x247)]();return okdbLoopMonitor={'LOOP':_0x3493c9},okdbLoopMonitor;}function _0x372a(_0x2237ed,_0x30e39f){_0x2237ed=_0x2237ed-0xc4;const _0x1bdcaa=_0x1bdc();let _0x372a58=_0x1bdcaa[_0x2237ed];return _0x372a58;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x570675=require$$0$1,_0x4f9e6e=require$$1;let _0x121302,_0x3d9f5e,_0x26e862,_0x4de4f9,_0x564bde,_0x3698e6,_0x19a922,_0x3c0ca3=![];const _0x4e97a4=new Set();let _0x9d407f=null;const _0x28c4fe=new Map();function _0x21ff10(){if(_0x121302!==undefined)return _0x121302;_0x121302=process.env.OKDB_DIAG==='1';if(!_0x121302)return![];_0x3d9f5e=process.env.OKDB_DIAG_STACK==='1',_0x4de4f9=Math['max'](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x26e862=new Array(_0x4de4f9),_0x564bde=0x0,_0x3698e6=0x0,_0x19a922=process.env.OKDB_DIAG_DIR||null;if(_0x19a922)try{_0x570675['mkdirSync'](_0x19a922,{'recursive':!![]});}catch{}return!![];}function _0x1e1de5(){return _0x121302===undefined?_0x21ff10():_0x121302;}function _0x5a425a(_0x49cac7,_0x2f4221){const _0x200936=_0x372a;if(_0x121302===undefined?!_0x21ff10():!_0x121302)return;let _0x2c5381;if(_0x3d9f5e){const _0x5870c0=new Error()['stack']||'';_0x2c5381=_0x5870c0[_0x200936(0xd8)]('\x0a')['slice'](0x3)[_0x200936(0x2de)](_0x37f2f5=>_0x37f2f5[_0x200936(0x281)]())[_0x200936(0x128)](Boolean)[_0x200936(0x11e)](0x0,0x8);}_0x26e862[_0x564bde]={'seq':_0x3698e6++,'t':Date[_0x200936(0x2ae)](),'env':_0x49cac7,'kind':_0x2f4221||_0x200936(0x139),'stack':_0x2c5381},_0x564bde=(_0x564bde+0x1)%_0x4de4f9;}function _0x38d717(_0x467573){const _0x4eb75a=_0x372a,_0x3e2bb1=[];for(let _0x5ca781=0x0;_0x5ca781<_0x4de4f9;_0x5ca781++){const _0x4a1161=_0x26e862[(_0x564bde-0x1-_0x5ca781+_0x4de4f9*0x2)%_0x4de4f9];if(!_0x4a1161)continue;_0x3e2bb1[_0x4eb75a(0x181)](_0x4a1161);if(_0x3e2bb1['length']>=_0x467573)break;}return _0x3e2bb1;}function _0x1305a8(_0x997009){const _0x1253e1=_0x372a;try{process[_0x1253e1(0x1ac)][_0x1253e1(0xdb)](_0x997009+'\x0a');}catch{}if(_0x19a922)try{_0x570675[_0x1253e1(0x2c8)](_0x4f9e6e[_0x1253e1(0xf6)](_0x19a922,_0x1253e1(0x1da)+process['pid']+_0x1253e1(0x273)),_0x997009+'\x0a');}catch{}}function _0x53ae6e(_0x570cb2){const _0x510227=_0x372a,_0x4a1abd=_0x38d717(_0x570cb2);if(!_0x4a1abd[_0x510227(0xd0)])return _0x510227(0x103);const _0x1c601d=Date[_0x510227(0x2ae)]();return _0x4a1abd[_0x510227(0x2de)](_0xac4c2f=>{const _0x11f896=_0x510227,_0x1c3ab5=_0x11f896(0x2ec)+_0xac4c2f[_0x11f896(0xf4)]+'\x20-'+(_0x1c601d-_0xac4c2f['t'])+_0x11f896(0x23b)+_0xac4c2f[_0x11f896(0x17b)]+'\x20'+_0xac4c2f[_0x11f896(0x2a9)];return _0xac4c2f[_0x11f896(0x2dc)]&&_0xac4c2f[_0x11f896(0x2dc)][_0x11f896(0xd0)]?_0x1c3ab5+'\x0a\x20\x20\x20\x20\x20\x20'+_0xac4c2f['stack'][_0x11f896(0xf6)]('\x0a\x20\x20\x20\x20\x20\x20'):_0x1c3ab5;})['join']('\x0a');}function _0x363b23(_0x35e100,_0x15895f){const _0x1751bd=_0x372a,_0x46ad80=_0x1751bd(0x2d8)+_0x35e100+_0x1751bd(0x230)+new Date()[_0x1751bd(0x2ba)]()+_0x1751bd(0x2b1)+process[_0x1751bd(0x112)]+_0x1751bd(0x2c5),_0x76cb3=[_0x46ad80,_0x1751bd(0x183)+(_0x15895f&&_0x15895f[_0x1751bd(0x2dc)]?_0x15895f[_0x1751bd(0x2dc)][_0x1751bd(0xd8)]('\x0a')[0x0]:_0x15895f),_0x1751bd(0x204)+(_0x3d9f5e?'':'\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site')+':',_0x53ae6e(0x18),_0x2b3531(),'='['repeat'](_0x46ad80[_0x1751bd(0xd0)]-0x1)];_0x1305a8(_0x76cb3['join']('\x0a'));}function _0x3685d4(_0x25061f){const _0x13c6c7=_0x372a;if(!_0x1e1de5())return;const _0x1a02c0=String(_0x25061f&&_0x25061f['message']||_0x25061f||''),_0x22becd=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x13c6c7(0x15a)](_0x1a02c0);_0x363b23(_0x22becd?_0x13c6c7(0x153):_0x13c6c7(0x203),_0x25061f);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x22becd)return;try{console[_0x13c6c7(0x25a)](_0x25061f&&_0x25061f[_0x13c6c7(0x2dc)]?_0x25061f[_0x13c6c7(0x2dc)]:_0x25061f);}catch{}process[_0x13c6c7(0x227)](0x1);}function _0x6b1dec(_0x32202c){const _0x4e5ee8=_0x372a;if(!_0x1e1de5())return;const _0x31d021=String(_0x32202c&&_0x32202c[_0x4e5ee8(0x14d)]||_0x32202c||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x4e5ee8(0x15a)](_0x31d021)&&_0x363b23('ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)',_0x32202c);}function _0x2b3531(){const _0x69fb42=_0x372a,_0x5dd40d=[_0x69fb42(0x117)];let _0x40dc38=![];for(const _0x376432 of _0x4e97a4){const _0x38fd88=_0x376432&&_0x376432['_envs'];if(!_0x38fd88)continue;for(const [_0x652bc6,_0x380ef8]of _0x38fd88){const _0x28bde3=_0x380ef8&&_0x380ef8[_0x69fb42(0x211)]&&_0x380ef8[_0x69fb42(0x211)][_0x69fb42(0x28f)];if(!_0x28bde3)continue;let _0x679014,_0x17f73c;try{_0x679014=Atomics['load'](_0x28bde3,0x0),_0x17f73c=Atomics[_0x69fb42(0x13b)](_0x28bde3,0x1);}catch{continue;}if(_0x679014===0x0)continue;_0x40dc38=!![];const _0x5dfbf4=_0x679014>0x0?_0x69fb42(0x25d):'copy',_0x5c37a6=Date[_0x69fb42(0x2ae)]()-Math[_0x69fb42(0x18c)](_0x679014)*0x3e8,_0x23fbc3=((()=>{const _0x30c0f5=_0x69fb42;try{return _0x380ef8[_0x30c0f5(0x27f)]&&_0x380ef8[_0x30c0f5(0x27f)][_0x30c0f5(0x198)]?_0x380ef8['_writer']['status']():null;}catch{return null;}})());_0x5dd40d[_0x69fb42(0x181)](_0x69fb42(0x192)+_0x652bc6+_0x69fb42(0x1d5)+_0x5dfbf4+_0x69fb42(0x120)+_0x5c37a6+_0x69fb42(0x1f5)+_0x17f73c+(_0x23fbc3?'\x20writer{depth='+_0x23fbc3[_0x69fb42(0x2e4)]+'\x20oldestPendingMs='+_0x23fbc3['oldestPendingMs']+_0x69fb42(0x2d0)+_0x23fbc3['parkedNow']+'}':''));}}if(!_0x40dc38)_0x5dd40d[_0x69fb42(0x181)](_0x69fb42(0x2ad));return _0x5dd40d[_0x69fb42(0xf6)]('\x0a');}function _0x30bd90(){const _0x16b183=_0x372a;if(!_0x1e1de5())return;const _0x1edfd4=Math['max'](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x2b4f09=Date['now']();for(const _0x1a980f of _0x4e97a4){const _0x496897=_0x1a980f&&_0x1a980f['_envs'];if(!_0x496897)continue;for(const [_0x3a9fc2,_0x551621]of _0x496897){const _0x527b35=_0x551621&&_0x551621['_coordinator']&&_0x551621['_coordinator'][_0x16b183(0x28f)];if(!_0x527b35)continue;let _0x2de997;try{_0x2de997=Atomics[_0x16b183(0x13b)](_0x527b35,0x0);}catch{continue;}const _0x55a278=_0x1a980f['path']+'|'+_0x3a9fc2;if(_0x2de997<=0x0){_0x28c4fe['delete'](_0x55a278);continue;}const _0x3343d1=_0x2b4f09-_0x2de997*0x3e8,_0x5410db=_0x28c4fe['get'](_0x55a278);if(_0x3343d1<_0x1edfd4)continue;if(_0x5410db&&_0x2b4f09-_0x5410db[_0x16b183(0x2c2)]<_0x1edfd4)continue;_0x28c4fe[_0x16b183(0xcf)](_0x55a278,{'firstTs':_0x5410db?_0x5410db[_0x16b183(0x290)]:_0x2de997,'dumpedAt':_0x2b4f09});const _0x506cfb='\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20'+_0x3343d1+_0x16b183(0x1eb)+_0x3a9fc2+'\x20@\x20'+new Date()['toISOString']()+'\x20pid='+process['pid']+'\x20===';_0x1305a8([_0x506cfb,_0x2b3531(),'='[_0x16b183(0x284)](_0x506cfb[_0x16b183(0xd0)]-0x1)][_0x16b183(0xf6)]('\x0a'));}}}function _0x58afe6(){const _0xf99fe9=_0x372a;if(!_0x1e1de5()||_0x3c0ca3)return;_0x3c0ca3=!![],process[_0xf99fe9(0x107)](_0xf99fe9(0x203),_0x3685d4),process['prependListener']('unhandledRejection',_0x6b1dec);const _0xfbad8e=Math[_0xf99fe9(0x18b)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x9d407f=setInterval(_0x30bd90,_0xfbad8e);if(_0x9d407f[_0xf99fe9(0x1fd)])_0x9d407f[_0xf99fe9(0x1fd)]();}function _0x986448(_0x5438e1){const _0x4b2b37=_0x372a;if(!_0x1e1de5()||!_0x5438e1)return;_0x4e97a4[_0x4b2b37(0x2dd)](_0x5438e1),_0x58afe6();}function _0x4ff376(_0x3e9b4c){_0x4e97a4['delete'](_0x3e9b4c);}function _0xfc5402(){if(!_0x1e1de5())return{'enabled':![],'hint':'set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)'};return{'enabled':!![],'stackCapture':!!_0x3d9f5e,'recentWrites':_0x38d717(0x10),'drain':_0x2b3531()};}return okdbDiag={'isEnabled':_0x1e1de5,'recordWrite':_0x5a425a,'installDiag':_0x58afe6,'registerOkdb':_0x986448,'unregisterOkdb':_0x4ff376,'snapshot':_0xfc5402},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x3c1e0b=_0xa12a27;if(hasRequiredOkdbWriter)return okdbWriter[_0x3c1e0b(0x1af)];hasRequiredOkdbWriter=0x1;const {performance:_0x455f3a}=require$$0$2,_0x3cc030=requireOkdbDiag(),_0x5424a3=process.env.OKDB_COMMIT_MODE==='sync';class _0x95fcaf{constructor(_0x25440a){const _0x48efa9=_0x3c1e0b;this[_0x48efa9(0x17b)]=_0x25440a,this[_0x48efa9(0x1fb)]=new Set(),this[_0x48efa9(0xf5)]=new Map(),this['_committed']=0x0,this[_0x48efa9(0x17c)]=[],this[_0x48efa9(0x2bb)]=[],this[_0x48efa9(0xea)]=Math['max'](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this['_outstanding']=0x0,this[_0x48efa9(0xca)]=[],this['_bpParkedTotal']=0x0;}async[_0x3c1e0b(0x188)](_0x2947b8,_0x3d83e7){const _0x52f4e8=_0x3c1e0b;if(_0x3cc030['isEnabled']())_0x3cc030['recordWrite'](this[_0x52f4e8(0x17b)]?.[_0x52f4e8(0x2ea)],_0x3d83e7);if(this[_0x52f4e8(0x145)]){const _0x56bce2=new Error(_0x52f4e8(0x289));_0x56bce2['code']=_0x52f4e8(0x220);throw _0x56bce2;}if(this[_0x52f4e8(0xea)]>0x0){let _0x26dd97=![];while(this[_0x52f4e8(0x174)]>=this[_0x52f4e8(0xea)]&&!this[_0x52f4e8(0x145)]){!_0x26dd97&&(_0x26dd97=!![],this['_bpParkedTotal']++),await new Promise(_0x1a335a=>this['_bpWaiters']['push'](_0x1a335a));}if(this[_0x52f4e8(0x145)]){const _0x43346a=new Error(_0x52f4e8(0x289));_0x43346a[_0x52f4e8(0x2c6)]=_0x52f4e8(0x220);throw _0x43346a;}}this[_0x52f4e8(0x174)]++;const _0x4913b9=this['env'][_0x52f4e8(0x211)];if(_0x4913b9)await _0x4913b9[_0x52f4e8(0x221)]();if(this[_0x52f4e8(0x145)]){if(_0x4913b9)_0x4913b9[_0x52f4e8(0x13e)]();this[_0x52f4e8(0x174)]--;if(this[_0x52f4e8(0xca)][_0x52f4e8(0xd0)]&&this[_0x52f4e8(0x174)]<this[_0x52f4e8(0xea)])this[_0x52f4e8(0xca)][_0x52f4e8(0x241)]()();const _0x570c7f=new Error(_0x52f4e8(0x289));_0x570c7f[_0x52f4e8(0x2c6)]=_0x52f4e8(0x220);throw _0x570c7f;}const _0x12805c=_0x455f3a[_0x52f4e8(0x2ae)]();if(_0x5424a3)try{const _0x1738b9=this['env']['db'][_0x52f4e8(0x1e7)](_0x2947b8);this[_0x52f4e8(0x23a)]++;if(this[_0x52f4e8(0x17c)][_0x52f4e8(0x181)](_0x455f3a[_0x52f4e8(0x2ae)]()-_0x12805c)>0x100)this[_0x52f4e8(0x17c)][_0x52f4e8(0x241)]();if(this[_0x52f4e8(0x2bb)]['push'](_0x455f3a[_0x52f4e8(0x2ae)]())>0x800)this[_0x52f4e8(0x2bb)][_0x52f4e8(0x241)]();return _0x1738b9;}finally{this[_0x52f4e8(0x174)]--;if(this[_0x52f4e8(0xca)]['length']&&this['_outstanding']<this[_0x52f4e8(0xea)])this[_0x52f4e8(0xca)][_0x52f4e8(0x241)]()();if(_0x4913b9)_0x4913b9[_0x52f4e8(0x13e)]();}const _0x23a401=this[_0x52f4e8(0x17b)]['db'][_0x52f4e8(0x148)](_0x2947b8);this[_0x52f4e8(0x1fb)][_0x52f4e8(0x2dd)](_0x23a401),this[_0x52f4e8(0xf5)]['set'](_0x23a401,_0x12805c);const _0x28dc86=()=>{const _0x4de56c=_0x52f4e8;this[_0x4de56c(0x1fb)][_0x4de56c(0xfa)](_0x23a401),this[_0x4de56c(0xf5)][_0x4de56c(0xfa)](_0x23a401),this[_0x4de56c(0x23a)]++,this[_0x4de56c(0x174)]--;this[_0x4de56c(0xca)][_0x4de56c(0xd0)]&&this[_0x4de56c(0x174)]<this[_0x4de56c(0xea)]&&this['_bpWaiters'][_0x4de56c(0x241)]()();if(this['_durs']['push'](_0x455f3a[_0x4de56c(0x2ae)]()-_0x12805c)>0x100)this[_0x4de56c(0x17c)][_0x4de56c(0x241)]();if(this['_done'][_0x4de56c(0x181)](_0x455f3a[_0x4de56c(0x2ae)]())>0x800)this[_0x4de56c(0x2bb)][_0x4de56c(0x241)]();};_0x23a401[_0x52f4e8(0x196)](_0x28dc86,_0x28dc86);try{return await _0x23a401;}finally{if(_0x4913b9)_0x4913b9['afterWrite']();}}[_0x3c1e0b(0x198)](){const _0x39b03e=_0x3c1e0b,_0x41dae1=_0x455f3a['now']();let _0xc2f4a2=0x0;for(const _0x25bb5d of this[_0x39b03e(0xf5)]['values']()){const _0x1bf272=_0x41dae1-_0x25bb5d;if(_0x1bf272>_0xc2f4a2)_0xc2f4a2=_0x1bf272;}let _0x278a87=0x0;for(let _0x5667f7=this[_0x39b03e(0x2bb)][_0x39b03e(0xd0)]-0x1;_0x5667f7>=0x0;_0x5667f7--){if(_0x41dae1-this[_0x39b03e(0x2bb)][_0x5667f7]>0x3e8)break;_0x278a87++;}let _0x5da7c1=0x0;if(this[_0x39b03e(0x17c)][_0x39b03e(0xd0)]){const _0x2a5356=[...this[_0x39b03e(0x17c)]][_0x39b03e(0x111)]((_0x381e3f,_0x36202e)=>_0x381e3f-_0x36202e);_0x5da7c1=_0x2a5356[Math[_0x39b03e(0x119)](_0x2a5356[_0x39b03e(0xd0)]-0x1,Math[_0x39b03e(0x1ec)](_0x2a5356[_0x39b03e(0xd0)]*0.99))];}return{'depth':this[_0x39b03e(0x1fb)][_0x39b03e(0x298)],'oldestPendingMs':Math[_0x39b03e(0x2cd)](_0xc2f4a2),'committed':this[_0x39b03e(0x23a)],'commitsPerSec':_0x278a87,'commitP99Ms':Math[_0x39b03e(0x2cd)](_0x5da7c1),'parkedNow':this[_0x39b03e(0xca)]['length'],'parkedTotal':this[_0x39b03e(0xd9)],'highWater':this[_0x39b03e(0xea)]};}[_0x3c1e0b(0x244)](){const _0x49da55=_0x3c1e0b,_0x21eb77=_0x455f3a[_0x49da55(0x2ae)]();return[...this['_enqueuedAt']['values']()][_0x49da55(0x2de)](_0x47bd9f=>Math[_0x49da55(0x2cd)](_0x21eb77-_0x47bd9f))['sort']((_0xa2a211,_0x4d1d2a)=>_0x4d1d2a-_0xa2a211);}[_0x3c1e0b(0x1c4)](){const _0x5bdbd8=_0x3c1e0b;this[_0x5bdbd8(0x145)]=!![];for(const _0x177653 of this[_0x5bdbd8(0xca)][_0x5bdbd8(0x10b)](0x0))_0x177653();}async['drain'](){const _0x3b4887=_0x3c1e0b;let _0x5b0754=0x0;while(this['_inflight'][_0x3b4887(0x298)]&&_0x5b0754++<0x3e8){await Promise[_0x3b4887(0x186)]([...this['_inflight']]);}}async[_0x3c1e0b(0x1cf)](_0x53b230,_0x3d5685,_0x1cf8d1,_0xac3de4){const _0x375175=_0x3c1e0b;return this[_0x375175(0x188)](()=>{const _0x1b5b1c=_0x375175;if(_0xac3de4===undefined)_0x53b230[_0x1b5b1c(0x22e)](_0x3d5685,_0x1cf8d1);else _0x53b230[_0x1b5b1c(0x22e)](_0x3d5685,_0x1cf8d1,_0xac3de4);},_0x375175(0x2ef));}async[_0x3c1e0b(0x1e9)](_0x5066c9,_0x4e4794){const _0x45aa56=_0x3c1e0b;return this['transaction'](()=>_0x5066c9['removeSync'](_0x4e4794),_0x45aa56(0x1f0));}}async function _0x20969b(_0x348aa7,_0x27d2f3){const _0x3b3503=_0x3c1e0b;if(_0x27d2f3==null)_0x27d2f3=Math[_0x3b3503(0x18b)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x1a6075=_0x348aa7?.[_0x3b3503(0x134)];if(!_0x1a6075||typeof _0x1a6075['then']!==_0x3b3503(0x21b))return;await Promise[_0x3b3503(0x2d6)]([Promise[_0x3b3503(0xcc)](_0x1a6075)[_0x3b3503(0x26d)](()=>{}),new Promise(_0x231e8e=>{const _0x13cc6b=_0x3b3503,_0x58f73a=setTimeout(_0x231e8e,_0x27d2f3);if(_0x58f73a[_0x13cc6b(0x1fd)])_0x58f73a['unref']();})]);}catch{}}function _0x21b029(_0x18b7d0){const _0x4ab272=_0x3c1e0b;if(_0x5424a3)return Promise[_0x4ab272(0xcc)]();const _0xd13c2e=_0x18b7d0?.[_0x4ab272(0x177)];return _0xd13c2e&&typeof _0xd13c2e[_0x4ab272(0x196)]==='function'?_0xd13c2e:Promise[_0x4ab272(0xcc)]();}return okdbWriter['exports']=_0x95fcaf,okdbWriter['exports'][_0x3c1e0b(0x295)]=_0x20969b,okdbWriter[_0x3c1e0b(0x1af)][_0x3c1e0b(0x177)]=_0x21b029,okdbWriter['exports'][_0x3c1e0b(0x16e)]=_0x5424a3,okdbWriter[_0x3c1e0b(0x1af)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x31ef36=_0xa12a27;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x3476a6=require$$0$3,{SYNC_COMMITS:_0x3501f5}=requireOkdbWriter(),_0x5fc0ce=_0x31ef36(0xcb);class _0x593c83{constructor(_0x2c0e91,_0x3dc720,_0x33cbfd){const _0x2cb575=_0x31ef36;this['_lock']=_0x2c0e91,this[_0x2cb575(0x2a0)]=_0x3dc720,this[_0x2cb575(0xe3)]=_0x33cbfd,this[_0x2cb575(0x1c3)]=![],this[_0x2cb575(0x299)]=null,this[_0x2cb575(0x23f)]=null;}[_0x31ef36(0x253)](){const _0x2fd823=_0x31ef36;if(this[_0x2fd823(0x1c3)])return![];try{const _0x4cf66e=this['_lock']['_db']()[_0x2fd823(0xf8)](this[_0x2fd823(0x2a0)]);if(!_0x4cf66e||_0x4cf66e['acquiredAt']!==this[_0x2fd823(0xe3)])return![];const _0x56c897=_0x4cf66e['updatedAt']??_0x4cf66e[_0x2fd823(0x22a)];if(_0x56c897+_0x4cf66e[_0x2fd823(0x1d8)]<Date[_0x2fd823(0x2ae)]())return![];return!![];}catch{return!this[_0x2fd823(0x1c3)];}}['holder'](){const _0x259119=_0x31ef36;if(this[_0x259119(0x1c3)])return null;try{return this[_0x259119(0xd1)][_0x259119(0x121)]()[_0x259119(0xf8)](this[_0x259119(0x2a0)])??null;}catch{return null;}}async['extend'](_0x14e023){const _0x2ac56b=_0x31ef36;if(this[_0x2ac56b(0x1c3)])return;try{const _0x1b7f04=this['_lock'][_0x2ac56b(0x121)]()[_0x2ac56b(0xf8)](this['_key']);if(!_0x1b7f04||_0x1b7f04[_0x2ac56b(0x22a)]!==this[_0x2ac56b(0xe3)])return;if(_0x3501f5)this['_lock'][_0x2ac56b(0x121)]()['putSync'](this[_0x2ac56b(0x2a0)],{..._0x1b7f04,'ttlMs':_0x1b7f04[_0x2ac56b(0x1d8)]+_0x14e023});else await this[_0x2ac56b(0xd1)][_0x2ac56b(0x121)]()[_0x2ac56b(0x1cf)](this['_key'],{..._0x1b7f04,'ttlMs':_0x1b7f04[_0x2ac56b(0x1d8)]+_0x14e023});}catch{}}async[_0x31ef36(0x23e)](){const _0x2e7a42=_0x31ef36;if(this[_0x2e7a42(0x1c3)])return;if(this[_0x2e7a42(0x23f)])try{await this[_0x2e7a42(0x23f)];}catch{}clearInterval(this[_0x2e7a42(0x299)]),this[_0x2e7a42(0x299)]=null,this[_0x2e7a42(0x1c3)]=!![];try{const _0x194ea7=this[_0x2e7a42(0xd1)]['_db']()[_0x2e7a42(0xf8)](this['_key']);if(_0x194ea7&&_0x194ea7[_0x2e7a42(0x22a)]===this['_acquiredAt']){if(_0x3501f5)this[_0x2e7a42(0xd1)][_0x2e7a42(0x121)]()[_0x2e7a42(0x1a9)](this['_key']);else await this[_0x2e7a42(0xd1)]['_db']()[_0x2e7a42(0x1e9)](this['_key']);}}catch{}}[_0x31ef36(0x1e8)](_0x2d9f65,_0x4a2f01){const _0x1bb078=_0x31ef36,_0x2bb0c5=_0x4a2f01??Math[_0x1bb078(0x1ec)](_0x2d9f65/0x3);this[_0x1bb078(0x299)]=setInterval(()=>{const _0x568850=_0x1bb078;if(this[_0x568850(0x1c3)])return;this[_0x568850(0x23f)]=((async()=>{const _0x4530c4=_0x568850;try{const _0x2508f9=this[_0x4530c4(0xd1)][_0x4530c4(0x121)]()[_0x4530c4(0xf8)](this[_0x4530c4(0x2a0)]);if(!_0x2508f9||_0x2508f9[_0x4530c4(0x22a)]!==this[_0x4530c4(0xe3)]){this[_0x4530c4(0x1c3)]=!![],clearInterval(this['_heartbeatTimer']),this[_0x4530c4(0x299)]=null;return;}if(_0x3501f5)this[_0x4530c4(0xd1)][_0x4530c4(0x121)]()[_0x4530c4(0x22e)](this[_0x4530c4(0x2a0)],{..._0x2508f9,'updatedAt':Date['now']()});else await this[_0x4530c4(0xd1)]['_db']()[_0x4530c4(0x1cf)](this['_key'],{..._0x2508f9,'updatedAt':Date[_0x4530c4(0x2ae)]()});}catch{}this[_0x4530c4(0x23f)]=null;})());},_0x2bb0c5);if(this[_0x1bb078(0x299)][_0x1bb078(0x1fd)])this['_heartbeatTimer']['unref']();}}class _0xc88e4c{constructor(_0x2a7474,{namespace:_0xb51e00,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x51c26b=_0x31ef36;this['_rawDb']=_0x2a7474,this[_0x51c26b(0x16d)]=_0xb51e00,this[_0x51c26b(0x1d8)]=ttlMs,this[_0x51c26b(0x168)]=heartbeatMs,this[_0x51c26b(0x2cb)]=null;}[_0x31ef36(0x121)](){const _0x557e65=_0x31ef36;return!this[_0x557e65(0x2cb)]&&(this[_0x557e65(0x2cb)]=this['_rawDb'][_0x557e65(0x29c)](_0x5fc0ce,{'dupSort':![]})),this['_lockDb'];}[_0x31ef36(0x16a)](){const _0x5a91bc=_0x31ef36;return!this['_wantDbHandle']&&(this[_0x5a91bc(0x237)]=this[_0x5a91bc(0x216)][_0x5a91bc(0x29c)](_0x5fc0ce+_0x5a91bc(0x29a),{'dupSort':![]})),this[_0x5a91bc(0x237)];}[_0x31ef36(0x2a0)](_0x38a616){const _0x58ed94=_0x31ef36;return this[_0x58ed94(0x16d)]+':'+_0x38a616;}[_0x31ef36(0x200)](_0x3d4949){const _0x35e9df=_0x31ef36;try{_0x3501f5?this[_0x35e9df(0x16a)]()[_0x35e9df(0x22e)](this[_0x35e9df(0x2a0)](_0x3d4949),Date[_0x35e9df(0x2ae)]()):this['_wantDb']()[_0x35e9df(0x1cf)](this[_0x35e9df(0x2a0)](_0x3d4949),Date[_0x35e9df(0x2ae)]())?.[_0x35e9df(0x26d)]?.(()=>{});}catch{}}[_0x31ef36(0x231)](_0x3e6486,_0x4f7581=0x3e8){const _0x3cb4e4=_0x31ef36;try{const _0x4084f1=this[_0x3cb4e4(0x16a)]()[_0x3cb4e4(0xf8)](this['_key'](_0x3e6486));return typeof _0x4084f1===_0x3cb4e4(0x21a)&&Date[_0x3cb4e4(0x2ae)]()-_0x4084f1<_0x4f7581;}catch{return![];}}['_isStale'](_0x502cac){const _0x30a045=_0x31ef36,_0x2a1df4=_0x502cac['updatedAt']??_0x502cac[_0x30a045(0x22a)];return _0x2a1df4+_0x502cac[_0x30a045(0x1d8)]<Date[_0x30a045(0x2ae)]();}static[_0x31ef36(0xd7)](_0x257287){const _0x45dd05=_0x31ef36,_0x36f22d=_0x257287?.[_0x45dd05(0x24c)];if(!_0x36f22d||typeof _0x36f22d[_0x45dd05(0x112)]!==_0x45dd05(0x21a))return![];if(_0x36f22d[_0x45dd05(0x2bf)]!==_0x3476a6[_0x45dd05(0x2bf)]())return![];if(_0x36f22d[_0x45dd05(0x112)]===process[_0x45dd05(0x112)])return![];try{return process[_0x45dd05(0x2d2)](_0x36f22d['pid'],0x0),![];}catch(_0x507930){return _0x507930['code']==='ESRCH';}}async[_0x31ef36(0x136)](_0x25bd2a,_0xe42f61={},_0xf269fa={}){const _0x4061bf=_0x31ef36,_0x3884df=this[_0x4061bf(0x2a0)](_0x25bd2a),_0x4e5ed2=_0xf269fa[_0x4061bf(0x1d8)]??this[_0x4061bf(0x1d8)],_0x2d3cac=Date[_0x4061bf(0x2ae)](),_0x41aea1={'holder':{'pid':process[_0x4061bf(0x112)],'hostname':_0x3476a6[_0x4061bf(0x2bf)](),..._0xe42f61},'acquiredAt':_0x2d3cac,'updatedAt':_0x2d3cac,'ttlMs':_0x4e5ed2};let _0x3a1806=![],_0x28b3f0=null;try{const _0x37b6ac=()=>{const _0x1539ae=_0x4061bf,_0xa78466=this[_0x1539ae(0x121)]()[_0x1539ae(0xf8)](_0x3884df);if(_0xa78466&&!this[_0x1539ae(0x1cd)](_0xa78466)&&!_0xc88e4c[_0x1539ae(0xd7)](_0xa78466)){const _0x2ee204=_0xe42f61['processorId']!=null&&_0xa78466[_0x1539ae(0x24c)][_0x1539ae(0x112)]===process['pid']&&_0xa78466[_0x1539ae(0x24c)][_0x1539ae(0x209)]===_0xe42f61[_0x1539ae(0x209)];if(!_0x2ee204){_0x3a1806=![],_0x28b3f0=_0xa78466;return;}_0x41aea1[_0x1539ae(0x22a)]<=_0xa78466[_0x1539ae(0x22a)]&&(_0x41aea1[_0x1539ae(0x22a)]=_0xa78466[_0x1539ae(0x22a)]+0x1,_0x41aea1[_0x1539ae(0x140)]=_0x41aea1['acquiredAt']);}this[_0x1539ae(0x121)]()[_0x1539ae(0x1cf)](_0x3884df,_0x41aea1),_0x3a1806=!![],_0x28b3f0=_0x41aea1;};if(_0x3501f5)this[_0x4061bf(0x121)]()[_0x4061bf(0x1e7)](_0x37b6ac);else await this[_0x4061bf(0x121)]()['childTransaction'](_0x37b6ac);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x3a1806)return{'acquired':![],'handle':null,'current':_0x28b3f0};const _0x5584f8=new _0x593c83(this,_0x3884df,_0x41aea1[_0x4061bf(0x22a)]);return _0x5584f8[_0x4061bf(0x1e8)](_0x4e5ed2,this[_0x4061bf(0x168)]),{'acquired':!![],'handle':_0x5584f8,'current':_0x28b3f0};}[_0x31ef36(0x28e)](_0x342b04){const _0x7b535b=_0x31ef36;try{return this[_0x7b535b(0x121)]()['get'](this[_0x7b535b(0x2a0)](_0x342b04))??null;}catch{return null;}}[_0x31ef36(0x233)](){const _0x5ba656=_0x31ef36,_0x220390=this[_0x5ba656(0x16d)]+':',_0x561d5f=[];try{for(const {key:_0x563ed0,value:_0x3cde62}of this['_db']()['getRange']({'start':_0x220390,'end':_0x220390+'\xff'})){typeof _0x563ed0==='string'&&_0x563ed0[_0x5ba656(0x1c2)](_0x220390)&&_0x561d5f[_0x5ba656(0x181)]({'id':_0x563ed0[_0x5ba656(0x11e)](_0x220390[_0x5ba656(0xd0)]),'entry':_0x3cde62});}}catch{}return _0x561d5f;}static[_0x31ef36(0x1a8)](_0x22502a){const _0x368739=_0x31ef36,_0x11416f=[];try{const _0x943010=_0x22502a[_0x368739(0x29c)](_0x5fc0ce,{'dupSort':![]});for(const {key:_0x27a437,value:_0x393a1b}of _0x943010['getRange']({})){if(typeof _0x27a437!==_0x368739(0xd3))continue;const _0x427c54=_0x27a437[_0x368739(0x2e5)](':');if(_0x427c54<0x1)continue;_0x11416f[_0x368739(0x181)]({'namespace':_0x27a437['slice'](0x0,_0x427c54),'id':_0x27a437[_0x368739(0x11e)](_0x427c54+0x1),'entry':_0x393a1b});}}catch{}return _0x11416f;}}return okdbLock={'OKDBLock':_0xc88e4c},okdbLock;}var version=_0xa12a27(0x2ca),require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0xe3ce09=_0xa12a27;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x35acc1=require$$0$3,_0x15c343=require$$1$1,_0x4a6a5d=require$$2,{LOOP:_0x2a406b}=requireOkdbLoopMonitor(),{OKDBLock:_0x583e80}=requireOkdbLock(),{SYNC_COMMITS:_0x9ad6df}=requireOkdbWriter(),_0x1ee557=_0xe3ce09(0x2c7),_0x4ca531='node',_0x2c2f75=_0xe3ce09(0x279),_0x35a3ff=_0xe3ce09(0xfe),_0x137758=(_0x5afc8f,_0x836b69)=>_0x5afc8f+':'+_0x836b69,_0x1a87a0=(_0x1577c7,_0x62c012)=>_0x1577c7+'::'+_0x62c012,_0x5ad37b=(_0x130c36,_0x126de3)=>_0x130c36+'/'+_0x126de3,_0x3257f7=(_0x1840bc,_0x15c2bd)=>_0x1840bc+'#'+_0x15c2bd,_0x102ff0=_0x1d69fa=>{const _0x9dac43=_0xe3ce09;if(_0x1d69fa?.[_0x9dac43(0x170)])return _0x1d69fa[_0x9dac43(0x170)];const _0x344ce9=_0x1d69fa?.[_0x9dac43(0x1b6)];return typeof _0x344ce9===_0x9dac43(0xd3)&&_0x344ce9[_0x9dac43(0x166)]('#')?_0x344ce9[_0x9dac43(0x11e)](0x0,_0x344ce9[_0x9dac43(0x2e5)]('#')):_0x344ce9;},_0x29175a=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x1c4ec9=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x1786fe=_0x29175a*0x3,_0x506ad2=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0xe3ce09(0x18b)](0x927c0,_0x1786fe*0x14),_0x3153ef=['processor:progress',_0xe3ce09(0x296),_0xe3ce09(0x1a6),'processor:error',_0xe3ce09(0x14c),'processor:resumed'];let _0x2176a0=null;function _0x480975(){const _0x3f930b=_0xe3ce09;if(_0x2176a0==null)_0x2176a0=Math[_0x3f930b(0x2cd)]((Date['now']()-process[_0x3f930b(0x291)]()*0x3e8)/0x3e8)*0x3e8;return _0x2176a0;}function _0x3dfd82(_0x2d397b){const _0x23f4a5=_0xe3ce09;if(process.env.OKDB_PROCESS_KILL===_0x23f4a5(0x261))return![];if(_0x2d397b?.[_0x23f4a5(0x13c)]?.[_0x23f4a5(0x155)]&&typeof _0x2d397b['options']['processes']===_0x23f4a5(0x1ca)&&_0x2d397b[_0x23f4a5(0x13c)][_0x23f4a5(0x155)][_0x23f4a5(0x2d2)]===![])return![];return!![];}function _0x2f7dab(_0xc02c52,_0x82a77b){const _0x1fe140=_0xe3ce09,_0x4115ed=!!_0x82a77b?.[_0x1fe140(0x2b2)];switch(_0xc02c52){case'primary':return{'controllable':_0x4115ed,'decommissionable':![],'killable':!![],'killConfirm':_0x1fe140(0x2b6)};case'cli':case'standalone':return{'controllable':_0x4115ed,'decommissionable':![],'killable':!![],'killConfirm':'confirm'};case'embedded':return{'controllable':![],'decommissionable':![],'killable':![]};case _0x1fe140(0x2d9):case'queue-worker':case'fn-runner':case _0x1fe140(0x167):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x1fe140(0x149)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x1fa8d6{constructor(_0x27d2d1){const _0x486193=_0xe3ce09;this['okdb']=_0x27d2d1,this['_statusEnv']=null,this[_0x486193(0x1d4)]=null,this[_0x486193(0xfb)]=new Map(),this['_cmd']=null,this['_isWriter']=![],this[_0x486193(0x2b5)]=![],this[_0x486193(0x223)]=_0x480975(),this['_selfKey']=_0x137758(process[_0x486193(0x112)],this['_processStartedAt']),this[_0x486193(0x248)]=_0x4a6a5d[_0x486193(0x19b)]()[_0x486193(0x11e)](0x0,0x8),this[_0x486193(0x27d)]=_0x3257f7(this[_0x486193(0x235)],this['_instanceId']),this[_0x486193(0xf3)]=Date['now'](),this[_0x486193(0x10f)]=null,this[_0x486193(0xfc)]=null,this[_0x486193(0x28b)]=null,this[_0x486193(0x1f7)]=null,this['_onProcEvent']=null,this[_0x486193(0x25f)]=null,this[_0x486193(0x115)]=0x0,this[_0x486193(0x17d)]={},this[_0x486193(0x18a)]=new Map(),this['_lastCpuUsage']=process[_0x486193(0xd2)](),this[_0x486193(0x138)]=Date[_0x486193(0x2ae)](),this[_0x486193(0x11d)]=0x0,this[_0x486193(0x1ce)]=new Map();}get['selfKey'](){return this['_selfKey'];}get['rowKey'](){return this['_rowKey'];}[_0xe3ce09(0x24d)](_0x54071d,_0x8708a2){const _0x22bd09=_0xe3ce09,_0x396e9c=_0x2f7dab(_0x54071d,_0x8708a2);if(_0x396e9c['killable']&&!_0x3dfd82(this[_0x22bd09(0x1f3)]))return{..._0x396e9c,'killable':![],'killConfirm':undefined};return _0x396e9c;}[_0xe3ce09(0x2bd)](){return!!this['_statusEnv'];}[_0xe3ce09(0xdd)](_0x5e421e){const _0xd8478d=_0xe3ce09;Object['assign'](this[_0xd8478d(0x17d)],_0x5e421e||{});}[_0xe3ce09(0x283)](_0x4dda44){const _0x1a798b=_0xe3ce09;if(_0x4dda44)this[_0x1a798b(0x28b)]=_0x4dda44;}[_0xe3ce09(0xe2)](_0x40f4ab={}){const _0x6e772b=_0xe3ce09;return this[_0x6e772b(0x1f3)][_0x6e772b(0xff)](_0x40f4ab);}[_0xe3ce09(0x2d7)](){const _0x48c140=_0xe3ce09,_0x59b13d={};let _0x5bccd9=0x0,_0x2d86ec=0x0;const _0x1eae30=new Set();for(const _0x23a336 of this[_0x48c140(0x151)]()){_0x2d86ec++;const _0x4e6239=_0x23a336[_0x48c140(0x1bd)];if(!_0x4e6239)continue;if(_0x4e6239[_0x48c140(0x278)])_0x5bccd9++;for(const _0xeff8cd of _0x4e6239[_0x48c140(0x2b2)]||[]){if(!['single',_0x48c140(0x152)][_0x48c140(0x166)](_0xeff8cd[_0x48c140(0x116)]))continue;(_0xeff8cd['state']==='online'||_0xeff8cd['state']===_0x48c140(0x1ba))&&_0xeff8cd['cursorKey']&&_0x1eae30[_0x48c140(0x2dd)]((_0xeff8cd[_0x48c140(0x17b)]||_0x48c140(0x2e9))+':'+_0xeff8cd[_0x48c140(0x213)]);const _0x1a4dca=_0xeff8cd[_0x48c140(0x17b)]||_0x48c140(0x2e9);(_0x59b13d[_0x1a4dca]||=[])['push']({..._0xeff8cd,'env':_0x1a4dca,'owner':{'pid':_0x23a336[_0x48c140(0x112)]??null,'kind':_0x23a336[_0x48c140(0x2a9)]??null}});}}for(const [_0x1e2f1c,_0x58af66]of Object[_0x48c140(0x159)](_0x59b13d)){for(const _0x3a39ee of _0x58af66){if(_0x3a39ee['mode']===_0x48c140(0x269)&&!_0x3a39ee['claimGated']){const _0xdad53=_0x1e2f1c+':'+(_0x3a39ee['cursorKey']??'');if(!_0x1eae30[_0x48c140(0x1cb)](_0xdad53))_0x3a39ee[_0x48c140(0x2e2)]=!![];}}}return{'envs':_0x59b13d,'policy':null,'participation':{'participating':_0x5bccd9,'total':_0x2d86ec},'source':_0x48c140(0x12f)};}['processorsView'](){const _0x415808=_0xe3ce09,_0x55af7c=_0x1051cc=>{const _0x3e3f86=_0x372a;if(_0x1051cc[_0x3e3f86(0x280)]==='online'||_0x1051cc['state']===_0x3e3f86(0x1ba)||_0x1051cc[_0x3e3f86(0x280)]===_0x3e3f86(0x25a))return 0x3;if(_0x1051cc[_0x3e3f86(0x2d1)])return 0x1;return 0x2;},_0x78a64d=new Map();for(const _0x311629 of this[_0x415808(0x151)]()){for(const _0xbb1baf of _0x311629[_0x415808(0x1bd)]?.[_0x415808(0x2b2)]||[]){const _0x1cb13f={..._0xbb1baf,'owner':{'pid':_0x311629['pid']??null,'kind':_0x311629[_0x415808(0x2a9)]??null,'host':_0x311629['host']??null}},_0x26e0e1=_0xbb1baf[_0x415808(0x116)]==='single'?_0x415808(0x1b0)+(_0xbb1baf[_0x415808(0x17b)]??'')+'::'+(_0xbb1baf[_0x415808(0x213)]??_0xbb1baf[_0x415808(0x13d)]??_0xbb1baf['id']):_0x415808(0x214)+(_0x311629[_0x415808(0x1b6)]??_0x311629[_0x415808(0x170)]??'')+'::'+(_0xbb1baf[_0x415808(0x17b)]??'')+'::'+_0xbb1baf['id'],_0x58b780=_0x78a64d[_0x415808(0xf8)](_0x26e0e1);if(!_0x58b780||_0x55af7c(_0x1cb13f)>_0x55af7c(_0x58b780))_0x78a64d[_0x415808(0xcf)](_0x26e0e1,_0x1cb13f);}}return[..._0x78a64d[_0x415808(0x2c1)]()];}[_0xe3ce09(0x18f)](){const _0x1d6a06=_0xe3ce09,_0x2a7e7b=Date[_0x1d6a06(0x2ae)](),_0x5f3e1b=this[_0x1d6a06(0x151)](),_0x2e2efa=_0x261dfc=>Math[_0x1d6a06(0x18b)](0x0,Math[_0x1d6a06(0x2cd)]((_0x2a7e7b-(_0x261dfc[_0x1d6a06(0xc6)]||_0x2a7e7b))/0x3e8)),_0x194019=_0x5f3e1b[_0x1d6a06(0x1f2)](_0x474bb2=>_0x474bb2[_0x1d6a06(0x2a9)]===_0x1d6a06(0x126)),_0x2cc3d8=_0x5f3e1b[_0x1d6a06(0x128)](_0x2e31ec=>_0x2e31ec[_0x1d6a06(0x2a9)]==='http-server');if(_0x194019||_0x2cc3d8[_0x1d6a06(0xd0)])return{'primary':_0x194019?{'pid':_0x194019['pid'],'uptime':_0x2e2efa(_0x194019)}:null,'workers':_0x2cc3d8[_0x1d6a06(0x2de)](_0x45d2e5=>({'pid':_0x45d2e5[_0x1d6a06(0x112)],'uptime':_0x2e2efa(_0x45d2e5)})),'workersConfigured':_0x194019?.['meta']?.['workersConfigured']??_0x2cc3d8[_0x1d6a06(0xd0)],'mode':_0x1d6a06(0x252)};const _0x41659c=_0x5f3e1b[_0x1d6a06(0x1f2)](_0x474446=>_0x474446[_0x1d6a06(0x2a9)]==='cli'||_0x474446[_0x1d6a06(0x2a9)]===_0x1d6a06(0x205)||_0x474446['kind']===_0x1d6a06(0x264)),_0x7eb93d=_0x41659c?{'pid':_0x41659c[_0x1d6a06(0x112)],'uptime':_0x2e2efa(_0x41659c)}:{'pid':process[_0x1d6a06(0x112)],'uptime':Math[_0x1d6a06(0x18b)](0x0,Math['round'](process['uptime']()))};return{'primary':_0x7eb93d,'workers':[_0x7eb93d],'workersConfigured':0x1,'mode':_0x1d6a06(0x269)};}[_0xe3ce09(0x195)](){const _0x1f5db1=_0xe3ce09;return this[_0x1f5db1(0x2a5)]();}[_0xe3ce09(0x12c)](){const _0x3a0bf0=_0xe3ce09,_0x528332=new Map();for(const _0x410b8c of this['_groupByProcess']())_0x528332[_0x3a0bf0(0xcf)](_0x410b8c[_0x3a0bf0(0x170)],{..._0x410b8c,'children':[]});const _0xb4ee1a=[];for(const _0x1a2281 of _0x528332['values']()){const _0x1473cc=_0x1a2281[_0x3a0bf0(0xe6)]?_0x528332[_0x3a0bf0(0xf8)](_0x1a2281[_0x3a0bf0(0xe6)]):null;if(_0x1473cc&&_0x1473cc!==_0x1a2281)_0x1473cc[_0x3a0bf0(0xc5)][_0x3a0bf0(0x181)](_0x1a2281);else _0xb4ee1a[_0x3a0bf0(0x181)](_0x1a2281);}const _0x3c6dd0=(_0x16b3cb,_0x120c49)=>_0x16b3cb[_0x3a0bf0(0x2a9)]===_0x120c49[_0x3a0bf0(0x2a9)]?(_0x16b3cb[_0x3a0bf0(0x112)]||0x0)-(_0x120c49['pid']||0x0):(_0x16b3cb['kind']??'')<(_0x120c49[_0x3a0bf0(0x2a9)]??'')?-0x1:0x1,_0x61e2a4=_0x5933c5=>{const _0x11caa8=_0x3a0bf0;_0x5933c5[_0x11caa8(0x111)](_0x3c6dd0);for(const _0x3e56b7 of _0x5933c5)if(_0x3e56b7[_0x11caa8(0xc5)]['length'])_0x61e2a4(_0x3e56b7[_0x11caa8(0xc5)]);};return _0x61e2a4(_0xb4ee1a),_0xb4ee1a;}[_0xe3ce09(0x1ab)](_0x404096){const _0x52b98e=_0xe3ce09;return this[_0x52b98e(0x2a5)]()[_0x52b98e(0x1f2)](_0x1e15a6=>_0x1e15a6[_0x52b98e(0x170)]===_0x404096)??null;}['_groupByProcess'](_0x3d9e8d=Date[_0xe3ce09(0x2ae)]()){const _0x1aae6e=_0xe3ce09,_0x151e8d=new Map();for(const _0x1df9ea of this[_0x1aae6e(0x151)]()){const _0x1c596a=_0x102ff0(_0x1df9ea);let _0x4d0483=_0x151e8d[_0x1aae6e(0xf8)](_0x1c596a);!_0x4d0483&&(_0x4d0483={'processKey':_0x1c596a,'nodeKey':_0x1c596a,'pid':_0x1df9ea[_0x1aae6e(0x112)],'ppid':_0x1df9ea['ppid']??null,'host':_0x1df9ea['host']??null,'kind':_0x1df9ea[_0x1aae6e(0x2a9)],'role':null,'supervisorKey':_0x1df9ea['supervisorKey']??null,'slot':_0x1df9ea[_0x1aae6e(0x125)]??null,'slotKey':_0x1df9ea[_0x1aae6e(0x147)]??null,'caps':_0x1df9ea['caps']??null,'lifecycle':_0x1df9ea[_0x1aae6e(0x222)]??null,'uptime':Math['max'](0x0,Math[_0x1aae6e(0x2cd)]((_0x3d9e8d-(_0x1df9ea['startedAt']||_0x3d9e8d))/0x3e8)),'startedAt':_0x1df9ea[_0x1aae6e(0xc6)]??null,'meta':_0x1df9ea['meta']??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x151e8d[_0x1aae6e(0xcf)](_0x1c596a,_0x4d0483));_0x4d0483[_0x1aae6e(0x1e2)][_0x1aae6e(0x181)]({'instanceId':_0x1df9ea[_0x1aae6e(0x15e)]??null,'role':_0x1df9ea['role']??null,'listenAddr':_0x1df9ea[_0x1aae6e(0x263)]??null,'lifecycle':_0x1df9ea[_0x1aae6e(0x222)]??null,'processing':_0x1df9ea[_0x1aae6e(0x1bd)]??null});if(!_0x4d0483['role']&&_0x1df9ea[_0x1aae6e(0x275)])_0x4d0483['role']=_0x1df9ea[_0x1aae6e(0x275)];if(!_0x4d0483[_0x1aae6e(0x263)]&&_0x1df9ea[_0x1aae6e(0x263)])_0x4d0483[_0x1aae6e(0x263)]=_0x1df9ea[_0x1aae6e(0x263)];if(!_0x4d0483['processing']&&_0x1df9ea[_0x1aae6e(0x1bd)])_0x4d0483['processing']=_0x1df9ea[_0x1aae6e(0x1bd)];if(!_0x4d0483['engines']&&_0x1df9ea[_0x1aae6e(0x26a)])_0x4d0483['engines']=_0x1df9ea[_0x1aae6e(0x26a)];if(!_0x4d0483[_0x1aae6e(0x1a0)]&&_0x1df9ea['singletonClaims'])_0x4d0483[_0x1aae6e(0x1a0)]=_0x1df9ea[_0x1aae6e(0x1a0)];if(_0x4d0483[_0x1aae6e(0x2eb)]==null&&_0x1df9ea[_0x1aae6e(0x2eb)])_0x4d0483[_0x1aae6e(0x2eb)]=_0x1df9ea[_0x1aae6e(0x2eb)];if(_0x1df9ea[_0x1aae6e(0x1b3)]&&(!_0x4d0483['stats']||(_0x1df9ea['stats']['at']??0x0)>(_0x4d0483[_0x1aae6e(0x1b3)]['at']??0x0)))_0x4d0483['stats']=_0x1df9ea[_0x1aae6e(0x1b3)];}return[..._0x151e8d['values']()];}[_0xe3ce09(0x234)](){const _0x1c5481=_0xe3ce09,_0x24c8ad=[],_0x1efa68={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x43f5ff of this[_0x1c5481(0x2a5)]()){_0x24c8ad[_0x1c5481(0x181)]({'processKey':_0x43f5ff[_0x1c5481(0x170)],'kind':_0x43f5ff[_0x1c5481(0x2a9)],'pid':_0x43f5ff[_0x1c5481(0x112)],'supervisorKey':_0x43f5ff[_0x1c5481(0xe6)],'meta':_0x43f5ff[_0x1c5481(0x20a)]??null,'uptime':_0x43f5ff[_0x1c5481(0x291)],'stats':_0x43f5ff[_0x1c5481(0x1b3)]??null}),_0x1efa68[_0x1c5481(0x155)]++;if(_0x43f5ff[_0x1c5481(0x1b3)]){_0x1efa68['rss']+=_0x43f5ff[_0x1c5481(0x1b3)][_0x1c5481(0x2ab)]||0x0,_0x1efa68[_0x1c5481(0x11a)]+=(_0x43f5ff[_0x1c5481(0x1b3)][_0x1c5481(0x11a)]||0x0)+(_0x43f5ff[_0x1c5481(0x1b3)][_0x1c5481(0xe5)]?.[_0x1c5481(0x11a)]||0x0);const _0x299442=_0x43f5ff[_0x1c5481(0x1b3)]['threads'];_0x299442&&(_0x1efa68['threads'][_0x1c5481(0x1f4)]+=_0x299442[_0x1c5481(0x1f4)]||0x0,_0x1efa68[_0x1c5481(0xe5)]['sandbox']+=_0x299442[_0x1c5481(0x215)]||0x0,_0x1efa68['threads']['busy']+=_0x299442[_0x1c5481(0x1ad)]||0x0);}}return{'totals':_0x1efa68,'nodes':_0x24c8ad};}async[_0xe3ce09(0x293)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x2698ff=_0xe3ce09;this[_0x2698ff(0x1ef)]=this[_0x2698ff(0x1ef)]||!!writer,this['_isReader']=this[_0x2698ff(0x2b5)]||!!reader,this[_0x2698ff(0x10f)]=kind||this[_0x2698ff(0x10f)]||(_0x15c343['isWorker']?_0x2698ff(0x2d9):_0x2698ff(0x123)),this[_0x2698ff(0xfc)]=supervisorKey??this['_supervisorKey'],this['_listenAddr']=listenAddr??this[_0x2698ff(0x28b)],this['_ensureDesired'](),await this[_0x2698ff(0x141)]();if(!writer&&!reader)return null;if(!this[_0x2698ff(0x1bc)]){const _0x479aaf=await this[_0x2698ff(0x1f3)][_0x2698ff(0x29b)](_0x1ee557,{'sync':![],'durability':_0x2698ff(0x1d2)});if(!_0x479aaf[_0x2698ff(0x164)](_0x4ca531))await _0x479aaf[_0x2698ff(0x2e6)](_0x4ca531);this[_0x2698ff(0x1bc)]=_0x479aaf;}return this[_0x2698ff(0x1bc)];}[_0xe3ce09(0x19c)](){const _0x3a33ef=_0xe3ce09;return this[_0x3a33ef(0x178)]!==this[_0x3a33ef(0x1bc)]&&(this[_0x3a33ef(0x178)]=this[_0x3a33ef(0x1bc)],this[_0x3a33ef(0x156)]=this[_0x3a33ef(0x1bc)][_0x3a33ef(0x10a)](_0x4ca531)[_0x3a33ef(0x255)]),this[_0x3a33ef(0x156)];}[_0xe3ce09(0x1b9)](_0x542b23){const _0xe07b51=_0xe3ce09;if(_0x9ad6df)return this['_nodeDb']()['putSync'](_0x542b23[_0xe07b51(0x1b6)],_0x542b23,0x1);const _0x3bf5b1=this[_0xe07b51(0x19c)]()[_0xe07b51(0x1cf)](_0x542b23[_0xe07b51(0x1b6)],_0x542b23,0x1);if(_0x3bf5b1&&typeof _0x3bf5b1[_0xe07b51(0x196)]===_0xe07b51(0x21b))_0x3bf5b1['then'](undefined,()=>{});return _0x3bf5b1;}[_0xe3ce09(0x25c)](_0x5ee85a){const _0x1ed7b7=_0xe3ce09;return this['_nodeDb']()[_0x1ed7b7(0x22e)](_0x5ee85a[_0x1ed7b7(0x1b6)],_0x5ee85a,0x1);}['_removeRowAsync'](_0x3cf4e0){const _0x1a53f6=_0xe3ce09;if(_0x9ad6df)try{return this[_0x1a53f6(0x19c)]()[_0x1a53f6(0x1a9)](_0x3cf4e0);}catch{return![];}const _0x37785d=this[_0x1a53f6(0x19c)]()[_0x1a53f6(0x1e9)](_0x3cf4e0);if(_0x37785d&&typeof _0x37785d[_0x1a53f6(0x196)]===_0x1a53f6(0x21b))_0x37785d[_0x1a53f6(0x196)](undefined,()=>{});return _0x37785d;}async[_0xe3ce09(0xd4)](_0x13d4a8){const _0x385124=_0xe3ce09;if(!this[_0x385124(0x1bc)]||!this[_0x385124(0x1ef)]||!_0x13d4a8?.[_0x385124(0x1b6)])return;return this[_0x385124(0x1b9)](_0x13d4a8);}async[_0xe3ce09(0x1de)](_0x2fb9dd){const _0x34c6dc=_0xe3ce09;if(!this[_0x34c6dc(0x1bc)]||!this[_0x34c6dc(0x1ef)]||!_0x2fb9dd)return;const _0x5030ac=_0x2fb9dd[_0x34c6dc(0x166)]('#'),_0x3e4ebd=[];for(const {key:_0x27ac80}of this[_0x34c6dc(0x1bc)][_0x34c6dc(0x22b)](_0x4ca531)){if(_0x27ac80===_0x2fb9dd||!_0x5030ac&&typeof _0x27ac80===_0x34c6dc(0xd3)&&_0x27ac80[_0x34c6dc(0x1c2)](_0x2fb9dd+'#'))_0x3e4ebd[_0x34c6dc(0x181)](_0x27ac80);}for(const _0x46d250 of _0x3e4ebd){try{this[_0x34c6dc(0x19c)]()['removeSync'](_0x46d250);}catch{}}}[_0xe3ce09(0x1ea)](_0x4210f3){const _0x1ef9a7=_0xe3ce09;if(typeof _0x4210f3?.[_0x1ef9a7(0x112)]!=='number')return![];if(_0x4210f3['host']!==_0x35acc1[_0x1ef9a7(0x2bf)]())return![];if(_0x4210f3[_0x1ef9a7(0x112)]===process[_0x1ef9a7(0x112)])return![];if(_0x4210f3['expiresAt']!=null&&_0x4210f3[_0x1ef9a7(0x101)]<Date['now']()-_0x506ad2)return!![];try{return process[_0x1ef9a7(0x2d2)](_0x4210f3['pid'],0x0),![];}catch(_0x32ccb0){return _0x32ccb0[_0x1ef9a7(0x2c6)]==='ESRCH';}}[_0xe3ce09(0x151)](){const _0xe0bd61=_0xe3ce09;if(!this[_0xe0bd61(0x1bc)])return[];try{this[_0xe0bd61(0x1bc)]['db']?.['resetReadTxn']?.();}catch{}const _0x6e260c=Date[_0xe0bd61(0x2ae)](),_0x56ff53=_0x35acc1[_0xe0bd61(0x2bf)](),_0x20a918=[];for(const {value:_0x47c182}of this[_0xe0bd61(0x1bc)][_0xe0bd61(0x22b)](_0x4ca531)){if(!_0x47c182)continue;let _0x41a30a=null;_0x47c182[_0xe0bd61(0x13f)]===_0x56ff53&&typeof _0x47c182['pid']===_0xe0bd61(0x21a)&&(_0x41a30a=!this[_0xe0bd61(0x1ea)](_0x47c182));if(_0x41a30a===![])continue;const _0x1de852=_0x47c182[_0xe0bd61(0x101)]==null||_0x47c182[_0xe0bd61(0x101)]>=_0x6e260c;if(_0x41a30a===!![]||_0x1de852)_0x20a918['push'](_0x47c182);}return _0x20a918;}async[_0xe3ce09(0x2e1)](_0x250c8e=0x0){const _0x4b5a9b=_0xe3ce09;if(!this['_statusEnv']||!this[_0x4b5a9b(0x1ef)])return;const _0x667ec1=Date[_0x4b5a9b(0x2ae)]()-_0x250c8e,_0x3dec80=new Set(),_0x215951=[],_0x259256=_0x35acc1['hostname'](),_0xce22b2=require$$6[_0x4b5a9b(0x2ee)];for(const {key:_0x208d33,value:_0x48e4ed}of this[_0x4b5a9b(0x1bc)][_0x4b5a9b(0x22b)](_0x4ca531)){if(!_0x48e4ed)continue;const _0x2e0e11=_0x48e4ed[_0x4b5a9b(0x13f)]===_0x259256&&typeof _0x48e4ed[_0x4b5a9b(0x112)]==='number',_0x2c8ecc=_0x2e0e11?this[_0x4b5a9b(0x1ea)](_0x48e4ed):_0x48e4ed['expiresAt']!=null&&_0x48e4ed[_0x4b5a9b(0x101)]<_0x667ec1;if(_0x2c8ecc)_0x215951[_0x4b5a9b(0x181)](_0x208d33);else{_0x3dec80[_0x4b5a9b(0x2dd)](_0x102ff0(_0x48e4ed)??_0x208d33);if(_0x48e4ed[_0x4b5a9b(0x2ee)]&&_0x48e4ed[_0x4b5a9b(0x2ee)]!==_0xce22b2){if(!this[_0x4b5a9b(0xd5)])this[_0x4b5a9b(0xd5)]=new Set();!this['_versionSkewWarned']['has'](_0x48e4ed[_0x4b5a9b(0x2ee)])&&(this[_0x4b5a9b(0xd5)][_0x4b5a9b(0x2dd)](_0x48e4ed[_0x4b5a9b(0x2ee)]),this['okdb']['log']?.['warn']?.(_0x4b5a9b(0x12b)+(_0x48e4ed[_0x4b5a9b(0x112)]??'?')+'\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20'+_0x48e4ed['version']+_0x4b5a9b(0x133)+_0xce22b2+_0x4b5a9b(0x24f)+_0x4b5a9b(0x1a2),{'feature':_0x4b5a9b(0x271)}));}}}for(const _0x75ae52 of _0x215951)this[_0x4b5a9b(0x282)](_0x75ae52);if(this[_0x4b5a9b(0x27c)]()){const _0x49117a=[];for(const {key:_0x4d2c26}of this['listDesired'](_0x4b5a9b(0x1be))){if(!_0x3dec80[_0x4b5a9b(0x1cb)](_0x4d2c26)){if(_0x9ad6df)try{this['_desired'][_0x4b5a9b(0x1a9)](_0x4b5a9b(0x100)+_0x4d2c26);}catch{}else _0x49117a[_0x4b5a9b(0x181)](this[_0x4b5a9b(0x1d4)][_0x4b5a9b(0x1e9)](_0x4b5a9b(0x100)+_0x4d2c26));}}if(_0x49117a[_0x4b5a9b(0xd0)])await Promise[_0x4b5a9b(0x186)](_0x49117a);}}[_0xe3ce09(0x108)](_0x478f40=null){const _0x416d0d=_0xe3ce09;if(this[_0x416d0d(0x1f7)])return;if(!this[_0x416d0d(0x1ef)]||!this[_0x416d0d(0x1bc)]){this[_0x416d0d(0x1f3)]?.['log']?.[_0x416d0d(0x169)]?.(_0x416d0d(0x12e)+this[_0x416d0d(0x1ef)]+_0x416d0d(0x1bf)+!!this[_0x416d0d(0x1bc)]+_0x416d0d(0x127),{'feature':_0x416d0d(0x155)});return;}this['_onTick']=_0x478f40,this[_0x416d0d(0x212)]=()=>this[_0x416d0d(0x2aa)]();for(const _0x18676d of _0x3153ef)this[_0x416d0d(0x1f3)]['events']['on'](_0x18676d,this[_0x416d0d(0x212)]);this[_0x416d0d(0x2c0)]();const _0x3a0ff2=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x29175a;this[_0x416d0d(0x1f7)]=setInterval(()=>{const _0x556c20=_0x416d0d;if(this[_0x556c20(0x25f)])try{this['_onTick']();}catch{}this[_0x556c20(0x2c0)](),this[_0x556c20(0x2e1)]()['catch'](()=>{});},_0x3a0ff2);if(this[_0x416d0d(0x1f7)][_0x416d0d(0x1fd)])this[_0x416d0d(0x1f7)]['unref']();}[_0xe3ce09(0x2aa)](){const _0x129fa2=_0xe3ce09;if(!this['_isWriter']||!this[_0x129fa2(0x1bc)])return;if(Date[_0x129fa2(0x2ae)]()-this[_0x129fa2(0x115)]<_0x1c4ec9)return;this[_0x129fa2(0x2c0)]();}['_publishNow'](){const _0x2a9a8e=_0xe3ce09;if(!this[_0x2a9a8e(0x1ef)]||!this[_0x2a9a8e(0x1bc)])return;this[_0x2a9a8e(0x115)]=Date[_0x2a9a8e(0x2ae)]();try{const _0x383a09=[this[_0x2a9a8e(0x163)]()];for(const _0x27aca8 of this[_0x2a9a8e(0x18a)][_0x2a9a8e(0x2c1)]())_0x383a09[_0x2a9a8e(0x181)](this[_0x2a9a8e(0x1cc)](_0x27aca8));const _0x45e211=_0x2a406b[_0x2a9a8e(0x21e)]?_0x2a406b[_0x2a9a8e(0x2ae)]():0x0;for(const _0xf98319 of _0x383a09){try{this[_0x2a9a8e(0x25c)](_0xf98319),this[_0x2a9a8e(0x25e)]=![];}catch(_0x248fa2){!this[_0x2a9a8e(0x25e)]&&(this[_0x2a9a8e(0x25e)]=!![],this['okdb']?.[_0x2a9a8e(0x23d)]?.[_0x2a9a8e(0x169)]?.('registry\x20publish\x20failing:\x20'+_0x248fa2[_0x2a9a8e(0x14d)],{'feature':'processes'}));}}if(_0x2a406b[_0x2a9a8e(0x21e)])_0x2a406b[_0x2a9a8e(0xe7)](_0x2a9a8e(0x1ae),_0x2a406b[_0x2a9a8e(0x2ae)]()-_0x45e211,_0x2a9a8e(0x256)+_0x383a09['length']+_0x2a9a8e(0x246));}catch(_0x3bdb18){!this['_publishFailWarned']&&(this['_publishFailWarned']=!![],this['okdb']?.['log']?.['warn']?.('registry\x20publish\x20failing:\x20'+_0x3bdb18[_0x2a9a8e(0x14d)],{'feature':_0x2a9a8e(0x155)}));}}async[_0xe3ce09(0xec)](){const _0x2665df=_0xe3ce09;if(this[_0x2665df(0x212)]){for(const _0x759b67 of _0x3153ef){try{this[_0x2665df(0x1f3)]['events'][_0x2665df(0x261)](_0x759b67,this[_0x2665df(0x212)]);}catch{}}this[_0x2665df(0x212)]=null;}this['_hbTimer']&&(clearInterval(this[_0x2665df(0x1f7)]),this[_0x2665df(0x1f7)]=null);try{if(this[_0x2665df(0x1bc)]&&this[_0x2665df(0x1ef)])await this[_0x2665df(0x1de)](this[_0x2665df(0x27d)]);}catch{}}async[_0xe3ce09(0x1aa)](){const _0x87ce3a=_0xe3ce09;if(!this['_statusEnv']||!this[_0x87ce3a(0x1ef)])return;try{await this[_0x87ce3a(0x1de)](this[_0x87ce3a(0x27d)]);}catch{}try{const _0x10293d=[];for(const {value:_0x2b21bf}of this['_statusEnv']['getRange'](_0x4ca531)){if(_0x2b21bf?.[_0x87ce3a(0x1b1)]===process[_0x87ce3a(0x112)]&&_0x2b21bf[_0x87ce3a(0x1b6)])_0x10293d[_0x87ce3a(0x181)](_0x2b21bf[_0x87ce3a(0x1b6)]);}for(const _0x1a9941 of _0x10293d){try{await this[_0x87ce3a(0x1de)](_0x1a9941);}catch{}}}catch{}}async['publishOwnRow'](){const _0x5c945f=_0xe3ce09;return this[_0x5c945f(0xd4)](this[_0x5c945f(0x163)]());}async['publishChildRow'](_0x30dd54){const _0x31bce8=_0xe3ce09;if(!this['_statusEnv']||!this[_0x31bce8(0x1ef)])return;return this[_0x31bce8(0xd4)](this['_buildChildRow'](_0x30dd54));}[_0xe3ce09(0x1cc)]({pid:_0x11b8a3,startedAt:_0x342c57,kind:_0x19effa,supervisorKey:_0x99cd0e,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0xe3ce09(0xeb),meta:meta=null,stats:stats=null}){const _0x4f24e4=_0xe3ce09,_0x523f36=Date['now'](),_0x5052bb=_0x137758(_0x11b8a3,_0x342c57);return{'nodeKey':_0x3257f7(_0x5052bb,'0'),'processKey':_0x5052bb,'instanceId':'0','pid':_0x11b8a3,'startedAt':_0x342c57,'ppid':process['pid'],'host':_0x35acc1[_0x4f24e4(0x2bf)](),'supervisorKey':_0x99cd0e,'slot':slot,'slotKey':slotKey,'kind':_0x19effa,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x523f36,'expiresAt':_0x523f36+_0x1786fe,'caps':this[_0x4f24e4(0x24d)](_0x19effa,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0xe3ce09(0x257)](_0x127564){const _0x2d48ad=_0xe3ce09;if(!_0x127564?.[_0x2d48ad(0x112)])return null;const _0x57007d=_0x137758(_0x127564[_0x2d48ad(0x112)],_0x127564[_0x2d48ad(0xc6)]);this['_children'][_0x2d48ad(0xcf)](_0x57007d,{..._0x127564,'supervisorKey':_0x127564['supervisorKey']??this['_selfKey']});if(this['_isWriter'])await this[_0x2d48ad(0x262)](this[_0x2d48ad(0x18a)][_0x2d48ad(0xf8)](_0x57007d))[_0x2d48ad(0x26d)]?.(()=>{});return _0x57007d;}[_0xe3ce09(0x243)](_0x5ed4a4){const _0x3be5f7=_0xe3ce09;if(!_0x5ed4a4)return;return this['_children'][_0x3be5f7(0xfa)](_0x5ed4a4),this[_0x3be5f7(0x1de)](_0x5ed4a4);}[_0xe3ce09(0x1d9)](){const _0x2daea6=_0xe3ce09,_0x245b2a=Date[_0x2daea6(0x2ae)](),_0x3b489e=process[_0x2daea6(0xd2)](),_0x3ee06b=(_0x245b2a-this[_0x2daea6(0x138)])*0x3e8;if(_0x3ee06b>=0x3d090){const _0x591183=_0x3b489e[_0x2daea6(0x17a)]-this['_lastCpuUsage']['user']+(_0x3b489e[_0x2daea6(0x10e)]-this[_0x2daea6(0x274)]['system']),_0xa50f0=_0x35acc1[_0x2daea6(0x137)]()[_0x2daea6(0xd0)]||0x1;this[_0x2daea6(0x11d)]=Math['min'](0x64,Math[_0x2daea6(0x2cd)](_0x591183/(_0x3ee06b*_0xa50f0)*0x64)),this[_0x2daea6(0xc4)]=Math[_0x2daea6(0x2cd)](_0x3ee06b/0x3e8),this['_lastCpuUsage']=_0x3b489e,this[_0x2daea6(0x138)]=_0x245b2a;}const _0x5e013b=process['memoryUsage'](),_0x2542bc=this['_threadStats'][_0x2daea6(0x298)];let _0x1177e3=0x0;if(_0x2542bc>0x0){const _0x5ddae9=[this['okdb'],...this['okdb'][_0x2daea6(0x132)]?.['values']?.()??[]];for(const _0x4ed8c7 of _0x5ddae9){const _0x142b67=_0x4ed8c7['functions']?.[_0x2daea6(0x182)];if(_0x142b67)_0x1177e3+=_0x142b67['liveThreadStats']['busy'];}}let _0x1cffec=null;const _0x1f04c8=_0x2542bc;if(_0x1f04c8>0x0){let _0x2436c7=0x0;for(const _0x54f569 of this[_0x2daea6(0x1ce)][_0x2daea6(0x2c1)]())_0x2436c7+=_0x54f569[_0x2daea6(0x11a)]||0x0;_0x1cffec={'count':_0x1f04c8,'heapUsed':_0x2436c7,'sandbox':_0x2542bc,'busy':_0x1177e3};}return{'rss':_0x5e013b[_0x2daea6(0x2ab)],'heapUsed':_0x5e013b[_0x2daea6(0x11a)],'heapTotal':_0x5e013b['heapTotal'],'external':_0x5e013b[_0x2daea6(0x21c)],'cpuPct':this['_lastCpuPct'],'cpuWindowMs':this[_0x2daea6(0xc4)]??null,'threads':_0x1cffec,'at':_0x245b2a};}[_0xe3ce09(0x122)](_0x2ca85b,_0x1195e4){if(!_0x2ca85b||!_0x1195e4)return;this['_threadStats']['set'](_0x2ca85b,_0x1195e4);}[_0xe3ce09(0x23c)](_0x19d6bc){const _0x3f30cf=_0xe3ce09;this[_0x3f30cf(0x1ce)][_0x3f30cf(0xfa)](_0x19d6bc);}[_0xe3ce09(0x11f)](_0x5e5b11,_0x28a4a4,_0x30732a=undefined){const _0x2edf70=_0xe3ce09,_0x567807=this[_0x2edf70(0x18a)][_0x2edf70(0xf8)](_0x5e5b11);if(!_0x567807||!_0x28a4a4)return;if(_0x30732a!==undefined)_0x567807[_0x2edf70(0x1bd)]=_0x30732a;_0x567807[_0x2edf70(0x1b3)]={'rss':_0x28a4a4[_0x2edf70(0x2ab)]??null,'heapUsed':_0x28a4a4[_0x2edf70(0x11a)]??null,'heapTotal':_0x28a4a4[_0x2edf70(0x232)]??null,'external':_0x28a4a4['external']??null,'cpuPct':_0x28a4a4[_0x2edf70(0x26c)]??null,'cpuWindowMs':_0x28a4a4[_0x2edf70(0x14b)]??null,'threads':_0x28a4a4[_0x2edf70(0xe5)]??null,'claims':_0x28a4a4[_0x2edf70(0x143)]??null,'envsOpen':_0x28a4a4[_0x2edf70(0x19e)]??null,'at':Date['now']()};}[_0xe3ce09(0x163)](){const _0x26049b=_0xe3ce09,_0x197583=Date[_0x26049b(0x2ae)](),_0x2c9a49=this[_0x26049b(0x1f3)][_0x26049b(0x226)]||{},_0x48c544=this['_kind']||_0x26049b(0x123);return{'nodeKey':this[_0x26049b(0x27d)],'processKey':this['_selfKey'],'instanceId':this['_instanceId'],'pid':process[_0x26049b(0x112)],'startedAt':this[_0x26049b(0x223)],'instanceStartedAt':this[_0x26049b(0xf3)],'ppid':typeof process[_0x26049b(0x1b1)]===_0x26049b(0x21a)?process[_0x26049b(0x1b1)]:null,'host':_0x35acc1[_0x26049b(0x2bf)](),'supervisorKey':this[_0x26049b(0xfc)]??null,'version':require$$6[_0x26049b(0x2ee)],'kind':_0x48c544,'role':{'engines':!!_0x2c9a49[_0x26049b(0x26a)],'processors':!!_0x2c9a49[_0x26049b(0x2b2)],'compaction':_0x2c9a49[_0x26049b(0x207)],'http':_0x2c9a49[_0x26049b(0x176)]},'listenAddr':this[_0x26049b(0x28b)]??null,'heartbeatAt':_0x197583,'expiresAt':_0x197583+_0x1786fe,'caps':this[_0x26049b(0x24d)](_0x48c544,_0x2c9a49),'lifecycle':{'state':_0x26049b(0xeb),'desiredVersionApplied':null},'meta':{...this[_0x26049b(0x17d)]},'processing':_0x2c9a49[_0x26049b(0x2b2)]?this[_0x26049b(0x135)]():null,'engines':_0x2c9a49[_0x26049b(0x26a)]?[...this[_0x26049b(0x1f3)]['_servingEngines']??[]]:null,'singletonClaims':this[_0x26049b(0x110)](),'stats':this[_0x26049b(0x1d9)](),'writers':this[_0x26049b(0x287)]()};}[_0xe3ce09(0x287)](){const _0x360603=_0xe3ce09,_0x439619={};try{for(const [_0x1dad66,_0x4ea2af]of this[_0x360603(0x1f3)][_0x360603(0x132)]){try{const _0x3915ec=_0x4ea2af['writerStatus']?.();if(!_0x3915ec)continue;if(!_0x3915ec['depth']&&!_0x3915ec[_0x360603(0x177)]&&!(_0x3915ec[_0x360603(0x105)]??0x0)&&!_0x3915ec[_0x360603(0x20b)])continue;_0x439619[_0x1dad66]={'depth':_0x3915ec['depth'],'oldestPendingMs':_0x3915ec[_0x360603(0x172)],'committed':_0x3915ec[_0x360603(0x177)],'commitsPerSec':_0x3915ec[_0x360603(0x1fc)],'commitP99Ms':_0x3915ec[_0x360603(0x1bb)],'parkedNow':_0x3915ec[_0x360603(0x105)]??0x0,'draining':!!_0x3915ec[_0x360603(0x20b)]};}catch{}}}catch{}return Object[_0x360603(0x2b8)](_0x439619)[_0x360603(0xd0)]?_0x439619:null;}[_0xe3ce09(0x110)](){const _0x3d55c5=_0xe3ce09,_0x5e415a=process[_0x3d55c5(0x112)],_0x1c7e9c=Date[_0x3d55c5(0x2ae)](),_0x3099c3=_0x1d7189=>{const _0x58c9f9=_0x3d55c5;if(!_0x1d7189)return[];const _0x445897=[];try{for(const {id:_0x174870,entry:_0x5546c2}of _0x1d7189['list']()){if(_0x5546c2?.['holder']?.['pid']!==_0x5e415a)continue;const _0xe352cc=_0x5546c2['updatedAt']??_0x5546c2[_0x58c9f9(0x22a)]??0x0;if(_0xe352cc+(_0x5546c2['ttlMs']??0x0)<_0x1c7e9c)continue;_0x445897[_0x58c9f9(0x181)](_0x174870);}}catch{}return _0x445897;},_0x49f08b=_0x3099c3(this[_0x3d55c5(0x2b4)](_0x3d55c5(0xe1))),_0x406e19=_0x3099c3(this[_0x3d55c5(0x2b4)](_0x3d55c5(0xd6)));if(!_0x49f08b[_0x3d55c5(0xd0)]&&!_0x406e19[_0x3d55c5(0xd0)])return null;return{'compact':_0x49f08b,'replicate':_0x406e19};}['_singletonLock'](_0x4a66bd){const _0x1f9ab5=_0xe3ce09;if(!this[_0x1f9ab5(0x1f3)]?.[_0x1f9ab5(0x1d3)])return null;if(!this[_0x1f9ab5(0xc7)])this['_singletonLocks']=new Map();let _0x2e00eb=this[_0x1f9ab5(0xc7)][_0x1f9ab5(0xf8)](_0x4a66bd);if(!_0x2e00eb)try{_0x2e00eb=new _0x583e80(this[_0x1f9ab5(0x1f3)][_0x1f9ab5(0x1d3)],{'namespace':_0x4a66bd}),this['_singletonLocks'][_0x1f9ab5(0xcf)](_0x4a66bd,_0x2e00eb);}catch{return null;}return _0x2e00eb;}[_0xe3ce09(0x135)](){const _0x409662=_0xe3ce09,_0x3d2373=[];try{for(const [_0xa9267a,_0xecd047]of this[_0x409662(0x1f3)][_0x409662(0x132)]){if(_0xa9267a[_0x409662(0x1c2)]('~'))continue;for(const _0x41e47f of _0xecd047[_0x409662(0x194)][_0x409662(0x25b)]())_0x3d2373[_0x409662(0x181)]({..._0x41e47f,'env':_0xa9267a});}}catch{}return{'participate':this[_0x409662(0x1f3)]['processors']?.[_0x409662(0x1a7)]??![],'processors':_0x3d2373};}['_ensureDesired'](){const _0x42c357=_0xe3ce09;if(this[_0x42c357(0x1d4)])return!![];const _0x504175=this[_0x42c357(0x1f3)]['_rootDb'];if(!_0x504175)return![];return this['_desired']=_0x504175['openDB'](_0x2c2f75,{'dupSort':![]}),this[_0x42c357(0x272)]=_0x504175[_0x42c357(0x29c)](_0x35a3ff,{'dupSort':![]}),!![];}async[_0xe3ce09(0x141)](){const _0x36fb76=_0xe3ce09;if(!this[_0x36fb76(0x27c)]())return;const _0x540a04=_0x36fb76(0x217),_0x4ead80=0x1,_0x4bbefc=this[_0x36fb76(0x1d4)][_0x36fb76(0xf8)](_0x540a04)??0x0;if(_0x4bbefc>=_0x4ead80)return;const _0x30a708=_0x12e063=>{const _0x40e7bf=_0x36fb76;if(_0x12e063==='worker')return _0x40e7bf(0x269);if(_0x12e063===_0x40e7bf(0x20c))return _0x40e7bf(0x152);return _0x12e063;};await this[_0x36fb76(0x1f3)][_0x36fb76(0x106)][_0x36fb76(0x27f)][_0x36fb76(0x188)](()=>{const _0xa89ac4=_0x36fb76;for(const _0x501924 of[_0xa89ac4(0x154),_0xa89ac4(0x2d4)]){for(const {key:_0x2e4d51,value:_0x1e17ed}of this['_desired'][_0xa89ac4(0x22b)]({'start':_0x501924,'end':_0x501924+'\xff'})){if(typeof _0x2e4d51!==_0xa89ac4(0xd3)||!_0x2e4d51[_0xa89ac4(0x1c2)](_0x501924))break;const _0x5a0d41=_0x30a708(_0x1e17ed['mode']);if(_0x5a0d41!==_0x1e17ed[_0xa89ac4(0x116)])this[_0xa89ac4(0x1d4)]['put'](_0x2e4d51,{..._0x1e17ed,'mode':_0x5a0d41});}}this[_0xa89ac4(0x1d4)]['put'](_0x540a04,_0x4ead80);});}['hasDesired'](){const _0x28d6aa=_0xe3ce09;return!!this[_0x28d6aa(0x1d4)];}[_0xe3ce09(0xde)](_0x2813d0,_0x2c9ba9){const _0x4a2119=_0xe3ce09;if(!this['_ensureDesired']())return null;const _0x228b48=_0x2813d0+'/'+_0x2c9ba9;return this[_0x4a2119(0x187)](),this['_desiredOverlay'][_0x4a2119(0xf8)](_0x228b48)??this[_0x4a2119(0x1d4)][_0x4a2119(0xf8)](_0x228b48)??null;}[_0xe3ce09(0x187)](){const _0x57a454=_0xe3ce09;if(!_0x9ad6df)return;try{this['okdb'][_0x57a454(0x106)]?.['db']?.['resetReadTxn']?.();}catch{}}async[_0xe3ce09(0x1db)](_0xdcfc05,_0x61fab5,_0xc0c026){const _0x3fa005=_0xe3ce09;if(!this[_0x3fa005(0x27c)]())return null;const _0x1ab940=_0xdcfc05+'/'+_0x61fab5;this[_0x3fa005(0x187)]();const _0x4a68a7=this['_desiredOverlay'][_0x3fa005(0xf8)](_0x1ab940)??this[_0x3fa005(0x1d4)]['get'](_0x1ab940)??{'version':0x0},_0x274716=(_0x4a68a7[_0x3fa005(0x2ee)]||0x0)+0x1,_0xb7db6b={..._0x4a68a7,..._0xc0c026,'version':_0x274716,'updatedAt':Date[_0x3fa005(0x2ae)]()};this[_0x3fa005(0xfb)]['set'](_0x1ab940,_0xb7db6b);try{await this[_0x3fa005(0x1f3)]['_systemEnv']['_writer'][_0x3fa005(0x188)](()=>{const _0x1e8b12=_0x3fa005;this[_0x1e8b12(0x1d4)][_0x1e8b12(0x1cf)](_0x1ab940,_0xb7db6b);});}finally{if(this['_desiredOverlay'][_0x3fa005(0xf8)](_0x1ab940)===_0xb7db6b)this[_0x3fa005(0xfb)][_0x3fa005(0xfa)](_0x1ab940);}return _0x274716;}[_0xe3ce09(0x1b2)](_0x1cc99d){const _0x3d957f=_0xe3ce09;if(!this[_0x3d957f(0x27c)]())return[];this[_0x3d957f(0x187)]();const _0x180688=_0x1cc99d+'/',_0x28ecdc=[];for(const {key:_0x5bb718,value:_0x211ba5}of this[_0x3d957f(0x1d4)][_0x3d957f(0x22b)]({'start':_0x180688,'end':_0x180688+'\xff'})){if(typeof _0x5bb718!==_0x3d957f(0xd3)||!_0x5bb718['startsWith'](_0x180688))break;_0x28ecdc[_0x3d957f(0x181)]({'key':_0x5bb718['slice'](_0x180688[_0x3d957f(0xd0)]),'value':_0x211ba5});}return _0x28ecdc;}['getCmd'](_0x2ac2a3){const _0x3a4594=_0xe3ce09;if(!this['_ensureDesired']())return null;return this[_0x3a4594(0x272)][_0x3a4594(0xf8)](_0x2ac2a3)??null;}async[_0xe3ce09(0x12a)](_0x29c819,_0x179739,_0x31e7a4={}){const _0xf07ae9=_0xe3ce09;if(!this['_ensureDesired']())return null;let _0x48cd51;return await this[_0xf07ae9(0x1f3)][_0xf07ae9(0x106)]['_writer'][_0xf07ae9(0x188)](()=>{const _0x1f55e9=_0xf07ae9,_0x4d75bd=this[_0x1f55e9(0x272)]['get'](_0x29c819)||{'epoch':0x0};_0x48cd51=(_0x4d75bd['epoch']||0x0)+0x1,this[_0x1f55e9(0x272)][_0x1f55e9(0x1cf)](_0x29c819,{..._0x4d75bd,..._0x31e7a4,'cmd':_0x179739,'epoch':_0x48cd51,'updatedAt':Date[_0x1f55e9(0x2ae)]()});}),_0x48cd51;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x1fa8d6,'nodeKey':_0x137758,'logicalKey':_0x1a87a0,'slotKey':_0x5ad37b,'PROCESS_ENV':_0x1ee557,'NODE_TYPE':_0x4ca531},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x23485e=_0xa12a27;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x1ccc8e=require$$0$4,{EVENTS:_0x1b83d0,CHANGE_ACTIONS:_0xfee665}=requireOkdbEnums(),{LOOP:_0x18f3d4}=requireOkdbLoopMonitor(),_0x49da21=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x5f05f9=0x5,_0x256d52=0x2710;class _0x527fe extends _0x1ccc8e{constructor(_0x23e7aa,_0x11d181={}){const _0x204a20=_0x372a;super(),this[_0x204a20(0x1f3)]=_0x23e7aa,this[_0x204a20(0x245)]=_0x11d181[_0x204a20(0x190)]??_0x49da21,this['_flushDebounce']=_0x11d181[_0x204a20(0x297)]??_0x5f05f9,this[_0x204a20(0x251)]=_0x11d181[_0x204a20(0x114)]??_0x256d52,this[_0x204a20(0x20f)]=![],this[_0x204a20(0x28c)]=new Map(),this[_0x204a20(0x158)]=new Map(),this[_0x204a20(0x206)]=new Map(),this[_0x204a20(0x266)]=null,this[_0x204a20(0x26e)]=![],this[_0x204a20(0x24e)]=new Set(),this[_0x204a20(0x1b5)]=_0x173564=>this['_handleInProcess'](_0x173564),this[_0x204a20(0x150)]=_0x4e7209=>this['_handlePoke'](_0x4e7209),this[_0x204a20(0x1c7)]=()=>this[_0x204a20(0x2a7)]();}[_0x23485e(0x247)](){const _0xf199ed=_0x23485e;if(this[_0xf199ed(0x20f)])return;this[_0xf199ed(0x20f)]=!![];for(const [_0x2d2e64,_0x1b4420]of this['okdb']['_envs']){if(_0x2d2e64[_0xf199ed(0x1c2)]('~'))continue;try{_0x1b4420[_0xf199ed(0x1ff)]();}catch{}}for(const [_0xbc3cc,_0xd0b6c0]of this['okdb'][_0xf199ed(0x132)]){if(_0xbc3cc[_0xf199ed(0x1c2)]('~'))continue;try{this['_baselines'][_0xf199ed(0xcf)](_0xbc3cc,_0xd0b6c0['getClock']()||0x0);}catch{}}const {events:_0x3d91bb}=this[_0xf199ed(0x1f3)];_0x3d91bb['on'](_0x1b83d0[_0xf199ed(0xf1)],this[_0xf199ed(0x1b5)]),_0x3d91bb['on'](_0x1b83d0[_0xf199ed(0x1ee)],this[_0xf199ed(0x1b5)]),_0x3d91bb['on'](_0x1b83d0['ITEM_REMOVE'],this['_onItem']),_0x3d91bb['on'](_0x1b83d0[_0xf199ed(0x268)],this['_onPoke']),_0x3d91bb[_0xf199ed(0x2a8)](_0x1b83d0['SYSTEM_STOPPED'],this['_onStop']);}['stop'](){const _0x43067a=_0x23485e;if(!this['_started'])return;this[_0x43067a(0x20f)]=![];const {events:_0x1ebe5f}=this['okdb'];_0x1ebe5f['off'](_0x1b83d0[_0x43067a(0xf1)],this[_0x43067a(0x1b5)]),_0x1ebe5f[_0x43067a(0x261)](_0x1b83d0[_0x43067a(0x1ee)],this[_0x43067a(0x1b5)]),_0x1ebe5f[_0x43067a(0x261)](_0x1b83d0['ITEM_REMOVE'],this[_0x43067a(0x1b5)]),_0x1ebe5f[_0x43067a(0x261)](_0x1b83d0[_0x43067a(0x268)],this['_onPoke']);try{_0x1ebe5f[_0x43067a(0x261)](_0x1b83d0['SYSTEM_STOPPED'],this[_0x43067a(0x1c7)]);}catch{}this[_0x43067a(0x266)]&&(clearTimeout(this[_0x43067a(0x266)]),this['_flushTimer']=null),this[_0x43067a(0x206)][_0x43067a(0x14e)](),this['_cursors'][_0x43067a(0x14e)](),this[_0x43067a(0x158)]['clear'](),this[_0x43067a(0x24e)][_0x43067a(0x14e)]();}[_0x23485e(0x29d)](_0x51d0aa,_0x23579a,_0x2fcb39,_0x1287fc){return _0x51d0aa+'\x00'+_0x23579a+'\x00'+_0x2fcb39+'\x00'+_0x1287fc;}[_0x23485e(0x27e)](_0x2fd331,_0x452146,_0x176d03,_0x2c4dcb){const _0x2898f1=_0x23485e,_0x55fe83=this['_dedupeKey'](_0x2fd331,_0x452146,_0x176d03,_0x2c4dcb);if(this['_seen'][_0x2898f1(0x1cb)](_0x55fe83))return![];this[_0x2898f1(0x24e)][_0x2898f1(0x2dd)](_0x55fe83);if(this[_0x2898f1(0x24e)][_0x2898f1(0x298)]>this[_0x2898f1(0x251)]){const _0xd7b685=this[_0x2898f1(0x24e)][_0x2898f1(0x2c1)]()[_0x2898f1(0x28d)]()['value'];this[_0x2898f1(0x24e)][_0x2898f1(0xfa)](_0xd7b685);}return!![];}[_0x23485e(0x229)](_0x3f9501){const _0x5469ad=_0x23485e;if(!this[_0x5469ad(0x20f)]||!_0x3f9501)return;const {env:_0x21dda3,type:_0x239a0a,key:_0x5b9960,clock:_0x2ed163,origin:_0x4964a6,action:_0x87fc73,newValue:_0x55e093,oldValue:_0x9b4e6f}=_0x3f9501;if(_0x21dda3==null||_0x239a0a==null||_0x5b9960==null)return;if(typeof _0x21dda3==='string'&&_0x21dda3['startsWith']('~'))return;if(typeof _0x239a0a===_0x5469ad(0xd3)&&_0x239a0a[_0x5469ad(0x1c2)]('~'))return;if(!this[_0x5469ad(0x27e)](_0x21dda3,_0x239a0a,_0x5b9960,_0x2ed163))return;const _0x52a8aa=_0x87fc73===_0xfee665[_0x5469ad(0x161)]?_0x5469ad(0x1e9):_0x5469ad(0x1cf);this[_0x5469ad(0x294)](_0x5469ad(0x2e7),{'env':_0x21dda3,'type':_0x239a0a,'key':_0x5b9960,'op':_0x52a8aa,'clock':_0x2ed163,'origin':_0x4964a6,'value':_0x52a8aa===_0x5469ad(0x1e9)?null:_0x55e093,'prevValue':_0x9b4e6f});}[_0x23485e(0xef)](_0x5b13b3){const _0x3773c6=_0x23485e;if(!this[_0x3773c6(0x20f)])return;if(!_0x5b13b3||typeof _0x5b13b3[_0x3773c6(0x17b)]!==_0x3773c6(0xd3)||typeof _0x5b13b3[_0x3773c6(0x13d)]!==_0x3773c6(0xd3))return;const {env:_0x4bb9eb,type:_0x6b727}=_0x5b13b3;if(_0x4bb9eb[_0x3773c6(0x1c2)]('~')||_0x6b727[_0x3773c6(0x1c2)]('~'))return;this[_0x3773c6(0x206)][_0x3773c6(0xcf)](_0x4bb9eb+'\x00'+_0x6b727,{'env':_0x4bb9eb,'type':_0x6b727}),this[_0x3773c6(0x19d)]();}[_0x23485e(0x19d)](){const _0x42ffbe=_0x23485e;if(this['_flushTimer'])return;const _0x5e48a7=()=>{const _0x5127ad=_0x372a;this[_0x5127ad(0x266)]=null,this[_0x5127ad(0x2d5)]()[_0x5127ad(0x26d)](()=>{});};this[_0x42ffbe(0x266)]=setTimeout(_0x5e48a7,this[_0x42ffbe(0x27a)]>0x0?this[_0x42ffbe(0x27a)]:0x0);}async[_0x23485e(0x2d5)](){const _0x2bbc65=_0x23485e;if(this[_0x2bbc65(0x26e)]){this[_0x2bbc65(0x19d)]();return;}this['_draining']=!![];try{const _0xd7a8d1=[...this[_0x2bbc65(0x206)][_0x2bbc65(0x2c1)]()];this['_pending'][_0x2bbc65(0x14e)]();let _0x435a63=![];for(const {env:_0x4acd5c,type:_0x1a66c1}of _0xd7a8d1){try{const _0x2031d2=await this[_0x2bbc65(0xc8)](_0x4acd5c,_0x1a66c1);if(_0x2031d2)_0x435a63=!![];}catch{this['_pending'][_0x2bbc65(0xcf)](_0x4acd5c+'\x00'+_0x1a66c1,{'env':_0x4acd5c,'type':_0x1a66c1}),_0x435a63=!![];}}if(_0x435a63||this[_0x2bbc65(0x206)][_0x2bbc65(0x298)]>0x0)this[_0x2bbc65(0x19d)]();}finally{this[_0x2bbc65(0x26e)]=![];}}async['_drainOne'](_0x2f857b,_0x5683e8){const _0x4035b6=_0x23485e,_0x1505b2=await this[_0x4035b6(0x1f3)][_0x4035b6(0xc9)](_0x2f857b),_0x5723ae=_0x2f857b+'\x00'+_0x5683e8;!this[_0x4035b6(0x28c)][_0x4035b6(0x1cb)](_0x5723ae)&&(!this[_0x4035b6(0x158)][_0x4035b6(0x1cb)](_0x2f857b)&&(_0x1505b2['_enableChangelog'](),this['_baselines'][_0x4035b6(0xcf)](_0x2f857b,_0x1505b2[_0x4035b6(0x1b4)]()||0x0)),this['_cursors'][_0x4035b6(0xcf)](_0x5723ae,this['_baselines']['get'](_0x2f857b)));const _0x88788d=this[_0x4035b6(0x28c)][_0x4035b6(0xf8)](_0x5723ae),_0x238c5c=_0x1505b2[_0x4035b6(0x1b4)](_0x5683e8)||0x0;if(_0x238c5c<=_0x88788d)return![];const _0x41a75b=_0x88788d+this['_quantum'],_0x3c7f47=Math[_0x4035b6(0x119)](_0x238c5c,_0x41a75b),_0x5c81f6=_0x18f3d4['enabled']?_0x18f3d4[_0x4035b6(0x2ae)]():0x0,_0x54f018=Array['from'](_0x1505b2['getChanges'](_0x5683e8,_0x88788d+0x1,_0x3c7f47));let _0x5a1562=_0x88788d;for(const _0x88b3b3 of _0x54f018){const {clock:_0x4345ee,key:_0x26d21d,action:_0x4d2154,origin:_0x126434}=_0x88b3b3;if(_0x4345ee>_0x5a1562)_0x5a1562=_0x4345ee;if(_0x26d21d==null)continue;if(!this[_0x4035b6(0x27e)](_0x2f857b,_0x5683e8,_0x26d21d,_0x4345ee))continue;let _0x16ec9c,_0x135a59;if(_0x4d2154===_0xfee665[_0x4035b6(0x161)])_0x16ec9c=_0x4035b6(0x1e9),_0x135a59=null;else{const _0x38e393=_0x1505b2['get'](_0x5683e8,_0x26d21d);_0x38e393==null?(_0x16ec9c=_0x4035b6(0x1e9),_0x135a59=null):(_0x16ec9c=_0x4035b6(0x1cf),_0x135a59=_0x38e393);}this[_0x4035b6(0x294)](_0x4035b6(0x2e7),{'env':_0x2f857b,'type':_0x5683e8,'key':_0x26d21d,'op':_0x16ec9c,'clock':_0x4345ee,'origin':_0x126434,'value':_0x135a59});}if(_0x18f3d4[_0x4035b6(0x21e)])_0x18f3d4['note'](_0x4035b6(0xda)+_0x2f857b+':'+_0x5683e8,_0x18f3d4['now']()-_0x5c81f6,'n='+_0x54f018[_0x4035b6(0xd0)]);return this['_cursors'][_0x4035b6(0xcf)](_0x5723ae,Math[_0x4035b6(0x18b)](_0x5a1562,_0x3c7f47)),_0x1505b2[_0x4035b6(0x1b4)](_0x5683e8)>_0x3c7f47;}[_0x23485e(0x198)](){const _0x3f2640=_0x23485e;return{'started':this[_0x3f2640(0x20f)],'quantum':this[_0x3f2640(0x245)],'flushDebounce':this[_0x3f2640(0x27a)],'cursors':Object[_0x3f2640(0x18e)]([...this[_0x3f2640(0x28c)][_0x3f2640(0x159)]()][_0x3f2640(0x2de)](([_0x58d353,_0x3f0b89])=>[_0x58d353['replace']('\x00',':'),_0x3f0b89])),'pending':this[_0x3f2640(0x206)][_0x3f2640(0x298)],'seen':this[_0x3f2640(0x24e)][_0x3f2640(0x298)]};}}return _0x527fe['CHANGEFEED_QUANTUM']=_0x49da21,okdbChangefeed={'OKDBChangefeed':_0x527fe},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0xd160f4=_0xa12a27;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x597b20=require$$1$1,_0x31985e=require$$1,{EVENTS:_0x12731e}=requireOkdbEnums(),_0x355667=require$$0$3,{slotKey:_0x1ef8ba}=requireOkdbProcessRegistry(),_0x497c57=0xfa,_0x231d70=0xfa0,_0x10624d=0x5,_0x4d3bc4=0x2710,_0x3afbbc=0xbb8,_0xf1a31a=0x7d0,_0x5bea4c='__okdbCluster',_0x280ec2=_0xd160f4(0x2a4),_0x185be3=_0xd160f4(0x23d),_0x434c9a=_0xd160f4(0x1b3),_0x45a8d3=[_0x12731e[_0xd160f4(0x113)],_0x12731e[_0xd160f4(0x1fa)],_0x12731e[_0xd160f4(0x2c4)],_0x12731e['FTS_RESET'],_0x12731e[_0xd160f4(0x270)],_0x12731e['INDEX_READY'],_0x12731e['INDEX_RESET'],_0x12731e[_0xd160f4(0x199)],_0xd160f4(0x296),_0xd160f4(0xce),'processor:error',_0xd160f4(0x14c),_0xd160f4(0x1f9),'processor:retry'],_0x37b27d=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x4cf1f4({workers:_0x56589a,makeOkdb:_0x4bec7c,port:_0x5ede4b,primaryOkdb:_0x1b6c19,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x5c4eab=_0xd160f4;if(_0x597b20['isPrimary'])return childEntry&&_0x597b20[_0x5c4eab(0x28a)]({'exec':_0x31985e['join'](__dirname,_0x5c4eab(0x165)),'args':[],'execArgv':((()=>{const _0x439bf5=_0x5c4eab,_0x1eb1e6=[];for(let _0x270816=0x0;_0x270816<process[_0x439bf5(0x288)]['length'];_0x270816++){const _0x1f3634=process['execArgv'][_0x270816];if(_0x1f3634[_0x439bf5(0x1c2)](_0x439bf5(0x10c))||_0x1f3634[_0x439bf5(0x1c2)](_0x439bf5(0x22f))||_0x1f3634[_0x439bf5(0x1c2)](_0x439bf5(0x11b)))continue;if(_0x1f3634==='-e'||_0x1f3634===_0x439bf5(0x1e1)||_0x1f3634==='-p'||_0x1f3634===_0x439bf5(0x1a3)){_0x270816++;continue;}_0x1eb1e6[_0x439bf5(0x181)](_0x1f3634);}return _0x1eb1e6;})())}),_0x3dec2e({'workers':_0x56589a,'port':_0x5ede4b,'primaryOkdb':_0x1b6c19,'workerEnv':workerEnv});return _0x56a4a8({'makeOkdb':_0x4bec7c,'port':_0x5ede4b});}function _0x3dec2e({workers:_0x220a6e,port:_0x5725d1,primaryOkdb:_0x3b0b3b,workerEnv:_0x23e73e}){const _0x2ef5a1=_0xd160f4,_0x988b17=new Map(),_0x1da6ce=new Map();let _0x416f8f=![];const _0x58376f=_0x538b6c=>_0x538b6c?.[_0x2ef5a1(0x109)],_0x459191=_0x19ef86=>{const _0x64bca3=_0x2ef5a1,_0x571a68=_0x597b20[_0x64bca3(0x2b0)]({...process.env,..._0x23e73e||{},'OKDB_CLUSTER_SLOT':String(_0x19ef86)});return _0x571a68[_0x64bca3(0x109)]=_0x19ef86,_0x988b17[_0x64bca3(0xcf)](_0x571a68[_0x64bca3(0xed)][_0x64bca3(0x112)],{'worker':_0x571a68,'startedAt':Date['now'](),'slot':_0x19ef86}),_0x571a68['on'](_0x64bca3(0x25a),_0x175bd1=>{const _0x3c3195=_0x64bca3;console[_0x3c3195(0x23d)](_0x3c3195(0x118)+_0x571a68[_0x3c3195(0xed)][_0x3c3195(0x112)]+_0x3c3195(0x1fe)+(_0x175bd1?.['message']??_0x175bd1));}),_0x571a68['on'](_0x64bca3(0x193),()=>_0x3c71fc()),_0x571a68;},_0x585f84=_0x2e8312=>{const _0x30e4b1=_0x2ef5a1;for(const {worker:_0x11d3c}of _0x988b17[_0x30e4b1(0x2c1)]()){if(_0x11d3c[_0x30e4b1(0x191)]()||!_0x11d3c[_0x30e4b1(0x2a2)]())continue;try{_0x11d3c[_0x30e4b1(0x254)](_0x2e8312);}catch{}}};_0x3b0b3b?.[_0x2ef5a1(0xff)]?.({'kind':_0x2ef5a1(0x126),'listenAddr':':'+_0x5725d1})[_0x2ef5a1(0x26d)](()=>{}),_0x3b0b3b?.[_0x2ef5a1(0x155)]?.[_0x2ef5a1(0xdd)]?.({'workersConfigured':_0x220a6e});const _0x1ffc37={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x3c71fc=()=>{const _0x392720=_0x2ef5a1,_0x4c88a3=_0x3b0b3b?.[_0x392720(0x155)];if(!_0x4c88a3||!_0x4c88a3[_0x392720(0x1ef)])return;const _0x5429a7=_0x4c88a3[_0x392720(0x24b)];for(const {worker:_0x3b805c,startedAt:_0x2f5f20,slot:_0xe8e3b9,stats:_0x551779,processing:_0x1dca8c}of _0x988b17['values']()){if(_0x3b805c[_0x392720(0x191)]())continue;const _0x2f3bc3=_0x4c88a3[_0x392720(0x104)]?.()&&_0x4c88a3[_0x392720(0xde)](_0x392720(0x125),_0x237166(_0xe8e3b9))?.[_0x392720(0xe0)]===!![];_0x4c88a3[_0x392720(0x262)]({'pid':_0x3b805c[_0x392720(0xed)][_0x392720(0x112)],'startedAt':_0x2f5f20,'kind':_0x392720(0x2d9),'supervisorKey':_0x5429a7,'slot':_0xe8e3b9,'slotKey':_0x237166(_0xe8e3b9),'role':_0x1ffc37,'listenAddr':':'+_0x5725d1,'lifecycle':_0x2f3bc3?'decommissioning':_0x392720(0xeb),'processing':_0x1dca8c??null,'stats':_0x551779??null})[_0x392720(0x26d)](()=>{});}},_0x237166=_0x1d3dd6=>_0x1ef8ba('cluster:'+_0x5725d1,_0x1d3dd6),_0x312e9a=_0x4bfe15=>{const _0xbeb41a=_0x2ef5a1,_0x52de37=_0x3b0b3b?.['processes'];if(!_0x52de37?.[_0xbeb41a(0x104)]?.())return![];return _0x52de37[_0xbeb41a(0xde)]('slot',_0x237166(_0x4bfe15))?.[_0xbeb41a(0xe0)]===!![];};for(let _0x596e05=0x0;_0x596e05<_0x220a6e;_0x596e05++){const _0x13486d=_0x312e9a(_0x596e05);_0x1da6ce[_0x2ef5a1(0xcf)](_0x596e05,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x13486d,'respawnTimer':null}),_0x13486d?console['log']('[okdb-cluster]\x20slot='+_0x596e05+_0x2ef5a1(0x1e4)):_0x459191(_0x596e05);}const _0x1cc081=()=>{const _0x61cddf=_0x2ef5a1,_0x7c8454=_0x3b0b3b?.[_0x61cddf(0x155)];if(!_0x7c8454?.['_isWriter']||!_0x7c8454['hasDesired']?.())return;for(const [_0x253fd8,_0x37942f]of _0x1da6ce[_0x61cddf(0x159)]()){const _0x2be2f5=_0x7c8454[_0x61cddf(0xde)](_0x61cddf(0x125),_0x237166(_0x253fd8)),_0x5f2077=_0x2be2f5?.[_0x61cddf(0xe0)]===!![],_0x50af62=_0x2be2f5?.[_0x61cddf(0x2d2)]===!![];if(_0x5f2077&&!_0x37942f[_0x61cddf(0x1f1)]){_0x37942f['dead']=!![];_0x37942f[_0x61cddf(0x2e3)]&&(clearTimeout(_0x37942f[_0x61cddf(0x2e3)]),_0x37942f[_0x61cddf(0x2e3)]=null);for(const {worker:_0xd8ae40}of _0x988b17['values']()){if(_0x58376f(_0xd8ae40)!==_0x253fd8||_0xd8ae40[_0x61cddf(0x191)]())continue;try{if(_0x50af62)_0xd8ae40[_0x61cddf(0xed)][_0x61cddf(0x2d2)](_0x61cddf(0x175));else _0xd8ae40[_0x61cddf(0x2a2)]()&&_0xd8ae40[_0x61cddf(0x2db)]();}catch{}}console[_0x61cddf(0x23d)](_0x61cddf(0x249)+(_0x50af62?_0x61cddf(0xdc):_0x61cddf(0x102))+_0x61cddf(0x189)+_0x253fd8+_0x61cddf(0x1f8));}else{if(!_0x5f2077&&_0x37942f['dead']&&_0x2be2f5){_0x37942f[_0x61cddf(0x1f1)]=![],_0x37942f[_0x61cddf(0x20e)]=[],_0x37942f[_0x61cddf(0x2a6)]=0x0;const _0x4bbabc=[..._0x988b17[_0x61cddf(0x2c1)]()][_0x61cddf(0x29e)](({worker:_0x399efe})=>_0x58376f(_0x399efe)===_0x253fd8&&!_0x399efe[_0x61cddf(0x191)]());!_0x4bbabc&&!_0x416f8f&&(_0x459191(_0x253fd8),console[_0x61cddf(0x23d)](_0x61cddf(0x22c)+_0x253fd8));}}}},_0x5025b5=()=>{try{_0x1cc081();}catch{}};_0x3b0b3b?.[_0x2ef5a1(0x16b)]?.['on']?.(_0x12731e['SYSTEM_PROC'],_0x5025b5);const _0x30a6cc=[];if(_0x3b0b3b?.[_0x2ef5a1(0x16b)]?.['on'])for(const _0x4c8dc4 of _0x45a8d3){const _0xbadfb7=_0x25a159=>{_0x585f84({[_0x5bea4c]:_0x280ec2,'event':_0x4c8dc4,'data':_0x25a159??{}});};_0x3b0b3b[_0x2ef5a1(0x16b)]['on'](_0x4c8dc4,_0xbadfb7),_0x30a6cc[_0x2ef5a1(0x181)]({'event':_0x4c8dc4,'handler':_0xbadfb7});}const _0x537e27=setInterval(()=>{_0x1cc081(),_0x3c71fc();},_0x37b27d);_0x537e27['unref']?.();const _0x3fe81a=(_0x44a7f5,_0x2b7c49)=>{const _0x53d28f=_0x2ef5a1;if(!_0x2b7c49||typeof _0x2b7c49!==_0x53d28f(0x1ca)||_0x2b7c49[_0x5bea4c]!==_0x185be3)return;if(!_0x3b0b3b?.[_0x53d28f(0x23d)]?.[_0x53d28f(0x2b9)])return;const _0x2559d9=_0x2b7c49[_0x53d28f(0x239)]||{};_0x3b0b3b[_0x53d28f(0x23d)][_0x53d28f(0x2b9)]({..._0x2559d9,'msg':'[w'+_0x2b7c49[_0x53d28f(0x125)]+']\x20'+(_0x2559d9['msg']??''),'meta':{..._0x2559d9[_0x53d28f(0x20a)]||{},'worker':_0x2b7c49[_0x53d28f(0x125)],'workerPid':_0x2b7c49[_0x53d28f(0x112)]}});};_0x597b20['on'](_0x2ef5a1(0x14d),_0x3fe81a);const _0x3455c1=(_0x47a8b0,_0x1350a4)=>{const _0x46880b=_0x2ef5a1;if(!_0x1350a4||typeof _0x1350a4!=='object'||_0x1350a4[_0x5bea4c]!==_0x434c9a)return;const _0x6bc31b=_0x988b17['get'](_0x47a8b0[_0x46880b(0xed)][_0x46880b(0x112)]);if(_0x6bc31b){_0x6bc31b[_0x46880b(0x1b3)]={..._0x1350a4[_0x46880b(0x1b3)],'at':Date[_0x46880b(0x2ae)]()};if(_0x1350a4[_0x46880b(0x1bd)]!==undefined)_0x6bc31b[_0x46880b(0x1bd)]=_0x1350a4[_0x46880b(0x1bd)];}};_0x597b20['on'](_0x2ef5a1(0x14d),_0x3455c1),_0x597b20['on']('exit',(_0x4ef3cd,_0x1a1373,_0x5c0f49)=>{const _0x559345=_0x2ef5a1,_0x43da90=_0x4ef3cd[_0x559345(0xed)][_0x559345(0x112)],_0x14b55f=_0x58376f(_0x4ef3cd),_0x1ec52e=_0x988b17['get'](_0x43da90);if(_0x1ec52e&&_0x3b0b3b?.[_0x559345(0x155)])_0x3b0b3b[_0x559345(0x155)][_0x559345(0x1de)](_0x43da90+':'+_0x1ec52e['startedAt'])[_0x559345(0x26d)](()=>{});_0x988b17['delete'](_0x43da90),console[_0x559345(0x23d)](_0x559345(0x118)+_0x43da90+'\x20(slot='+(_0x14b55f??'?')+_0x559345(0x11c)+(_0x559345(0x17e)+_0x1a1373+_0x559345(0x14a)+(_0x5c0f49??_0x559345(0x18d))+_0x559345(0x2ac)+_0x988b17['size']+_0x559345(0x2af))),_0x3c71fc();if(_0x416f8f||_0x14b55f==null)return;const _0x2a99ac=_0x1da6ce[_0x559345(0xf8)](_0x14b55f);if(!_0x2a99ac||_0x2a99ac[_0x559345(0x1f1)])return;const _0x424655=Date[_0x559345(0x2ae)]();_0x2a99ac[_0x559345(0x20e)]['push'](_0x424655),_0x2a99ac[_0x559345(0x20e)]=_0x2a99ac[_0x559345(0x20e)][_0x559345(0x128)](_0x2900ed=>_0x424655-_0x2900ed<=_0x4d3bc4);if(_0x2a99ac[_0x559345(0x20e)][_0x559345(0xd0)]>=_0x10624d){_0x2a99ac[_0x559345(0x1f1)]=!![],console[_0x559345(0x25a)]('[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot='+_0x14b55f+_0x559345(0x1dc)+_0x2a99ac[_0x559345(0x20e)][_0x559345(0xd0)]+_0x559345(0x210)+(_0x4d3bc4+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x988b17[_0x559345(0x298)]+_0x559345(0xf7)));return;}_0x2a99ac[_0x559345(0x2a6)]++;const _0x3a3c77=Math[_0x559345(0x119)](_0x231d70,_0x497c57*0x2**(_0x2a99ac['consecutiveFailures']-0x1));console[_0x559345(0x23d)]('[okdb-cluster]\x20respawning\x20worker\x20slot='+_0x14b55f+_0x559345(0x218)+_0x3a3c77+_0x559345(0x26b)+_0x2a99ac['consecutiveFailures']+')'),_0x2a99ac[_0x559345(0x2e3)]=setTimeout(()=>{const _0x8eb750=_0x559345;_0x2a99ac[_0x8eb750(0x2e3)]=null;if(_0x416f8f||_0x2a99ac[_0x8eb750(0x1f1)])return;const _0x4cc476=_0x459191(_0x14b55f);_0x4cc476['once']('listening',()=>{const _0x4257e6=_0x8eb750;if(_0x1da6ce['get'](_0x14b55f)===_0x2a99ac)_0x2a99ac[_0x4257e6(0x2a6)]=0x0;});},_0x3a3c77),_0x2a99ac['respawnTimer']['unref']?.();});const _0x3956ee=[..._0x988b17[_0x2ef5a1(0x2b8)]()];console[_0x2ef5a1(0x23d)](_0x2ef5a1(0xf2)+process[_0x2ef5a1(0x112)]+'\x20forked\x20'+_0x220a6e+_0x2ef5a1(0x2c9)+_0x5725d1+':\x20'+('['+_0x3956ee['join'](',\x20')+']'));const _0x53e5fc={'_isClusterController':!![],'port':_0x5725d1,'primaryOkdb':_0x3b0b3b??null,'status'(){const _0x5cac0f=_0x2ef5a1;return{'clustered':!![],'primaryPid':process[_0x5cac0f(0x112)],'port':_0x5725d1,'primaryRole':_0x3b0b3b?.[_0x5cac0f(0x275)]??null,'processorPid':null,'supervisorPid':process[_0x5cac0f(0x112)],'workers':[..._0x988b17[_0x5cac0f(0x2c1)]()][_0x5cac0f(0x2de)](({worker:_0x9f11c4})=>({'pid':_0x9f11c4['process'][_0x5cac0f(0x112)],'id':_0x9f11c4['id'],'dead':_0x9f11c4[_0x5cac0f(0x191)]()}))};},async 'close'(){const _0x9c7788=_0x2ef5a1;_0x416f8f=!![];for(const _0xeb5926 of _0x1da6ce[_0x9c7788(0x2c1)]()){_0xeb5926[_0x9c7788(0x1f1)]=!![],_0xeb5926['respawnTimer']&&(clearTimeout(_0xeb5926[_0x9c7788(0x2e3)]),_0xeb5926[_0x9c7788(0x2e3)]=null);}clearInterval(_0x537e27),_0x597b20[_0x9c7788(0x261)](_0x9c7788(0x14d),_0x3fe81a),_0x597b20[_0x9c7788(0x261)](_0x9c7788(0x14d),_0x3455c1),_0x3b0b3b?.[_0x9c7788(0x16b)]?.[_0x9c7788(0x261)]?.(_0x12731e[_0x9c7788(0x20d)],_0x5025b5);if(_0x3b0b3b?.[_0x9c7788(0x16b)]?.['off'])for(const {event:_0x642039,handler:_0x166371}of _0x30a6cc){try{_0x3b0b3b['events'][_0x9c7788(0x261)](_0x642039,_0x166371);}catch{}}_0x30a6cc[_0x9c7788(0xd0)]=0x0;const _0x3a92d0=[..._0x988b17[_0x9c7788(0x2c1)]()][_0x9c7788(0x2de)](({worker:_0xc8e66b})=>_0xc8e66b);if(_0x3a92d0['length']===0x0)return;await Promise['all'](_0x3a92d0[_0x9c7788(0x2de)](_0x3f8c53=>new Promise(_0x5f2236=>{const _0x3f2544=_0x9c7788;if(_0x3f8c53[_0x3f2544(0x191)]()){_0x5f2236();return;}let _0x20b394=![];const _0x13bece=()=>{if(_0x20b394)return;_0x20b394=!![];if(_0x383b40)clearTimeout(_0x383b40);_0x5f2236();};_0x3f8c53[_0x3f2544(0x2a8)](_0x3f2544(0x227),_0x13bece);const _0x383b40=setTimeout(()=>{try{_0x3f8c53['process']['kill']();}catch{}},_0x3afbbc+0x1f4);_0x383b40[_0x3f2544(0x1fd)]?.();try{_0x3f8c53[_0x3f2544(0x2db)]();}catch{try{_0x3f8c53[_0x3f2544(0xed)]['kill']();}catch{}}})));}};return _0x53e5fc;}async function _0x56a4a8({makeOkdb:_0x49f997,port:_0x42c076}){const _0x5179a9=_0xd160f4,_0x3e2f7e=await _0x49f997();return _0x2f908e(_0x3e2f7e),_0x3e2f7e['http'][_0x5179a9(0x2c3)](_0x42c076);}function _0x2f908e(_0x33afc7){const _0x3a2281=_0xd160f4;if(!_0x33afc7||_0x33afc7[_0x3a2281(0x2b7)])return;_0x33afc7[_0x3a2281(0x2b7)]=!![];try{const {OKDBChangefeed:_0x429228}=requireOkdbChangefeed(),_0x2d2421=_0x33afc7[_0x3a2281(0xe9)];if(_0x2d2421&&typeof _0x2d2421[_0x3a2281(0x185)]===_0x3a2281(0x21b)){const _0x40ba33=new _0x429228(_0x33afc7);_0x40ba33[_0x3a2281(0x247)](),_0x2d2421[_0x3a2281(0x185)](_0x40ba33),_0x33afc7['_changefeed']=_0x40ba33;}}catch(_0x474722){_0x33afc7[_0x3a2281(0x23d)]?.[_0x3a2281(0x169)]?.(_0x3a2281(0x2ce)+(_0x474722?.[_0x3a2281(0x14d)]??_0x474722),{'feature':'cluster'});}const _0x4a3e31=_0x371c2e=>{const _0x368cef=_0x3a2281;if(!_0x371c2e||typeof _0x371c2e!=='object'||_0x371c2e[_0x5bea4c]==null)return;if(_0x371c2e[_0x5bea4c]===_0x280ec2)try{_0x33afc7[_0x368cef(0xe9)]?.['pushEphemeral']?.(_0x371c2e['event'],_0x371c2e[_0x368cef(0x255)]);}catch{}};process['on'](_0x3a2281(0x14d),_0x4a3e31),_0x33afc7['_clusterOnMessage']=_0x4a3e31;{let _0x2826c7=process['cpuUsage'](),_0x133a4c=Date[_0x3a2281(0x2ae)]();const _0x2089fc=()=>{const _0xdc1670=_0x3a2281;if(typeof process[_0xdc1670(0x254)]!==_0xdc1670(0x21b)||!process[_0xdc1670(0x286)])return;const _0x5e56b1=Date['now'](),_0x1e1eef=process[_0xdc1670(0xd2)](),_0x2382ef=(_0x5e56b1-_0x133a4c)*0x3e8,_0x39f278=_0x1e1eef[_0xdc1670(0x17a)]-_0x2826c7[_0xdc1670(0x17a)]+(_0x1e1eef[_0xdc1670(0x10e)]-_0x2826c7[_0xdc1670(0x10e)]),_0xf9a280=_0x2382ef>0x0?Math[_0xdc1670(0x119)](0x64,Math[_0xdc1670(0x2cd)](_0x39f278/(_0x2382ef*(_0x355667[_0xdc1670(0x137)]()[_0xdc1670(0xd0)]||0x1))*0x64)):0x0;_0x2826c7=_0x1e1eef,_0x133a4c=_0x5e56b1;const _0x5222d0=process[_0xdc1670(0x1e0)]();let _0x55130d=null;try{_0x55130d=_0x33afc7['role']?.[_0xdc1670(0x2b2)]?_0x33afc7[_0xdc1670(0x155)]?.[_0xdc1670(0x135)]?.()??null:null;}catch{}try{process['send']({[_0x5bea4c]:_0x434c9a,'stats':{'rss':_0x5222d0[_0xdc1670(0x2ab)],'heapUsed':_0x5222d0[_0xdc1670(0x11a)],'heapTotal':_0x5222d0['heapTotal'],'external':_0x5222d0[_0xdc1670(0x21c)],'cpuPct':_0xf9a280,'cpuWindowMs':Math[_0xdc1670(0x2cd)](_0x2382ef/0x3e8)||null},'processing':_0x55130d});}catch{}},_0x37a3a2=Math[_0x3a2281(0x18b)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x372162=setInterval(_0x2089fc,_0x37a3a2);_0x372162['unref']?.(),_0x2089fc();for(const _0x6df794 of['processor:paused',_0x3a2281(0x1f9)]){_0x33afc7['events']?.['on']?.(_0x6df794,()=>{try{_0x2089fc();}catch{}});}}let _0x412ddf=![];const _0x56908f=async _0x516872=>{const _0x5ba894=_0x3a2281;if(_0x412ddf)return;_0x412ddf=!![];const _0x1face3=setTimeout(()=>process[_0x5ba894(0x227)](_0x516872),_0x3afbbc);_0x1face3[_0x5ba894(0x1fd)]?.();try{await _0x33afc7[_0x5ba894(0x160)]?.();}catch{}process[_0x5ba894(0x227)](_0x516872);};process['on'](_0x3a2281(0x2db),()=>_0x56908f(0x0));if(process[_0x3a2281(0x124)]!=='win32'){const _0x1137c4=setInterval(()=>{const _0x18fa70=_0x3a2281;if(process[_0x18fa70(0x1b1)]===0x1)_0x56908f(0x0);},_0xf1a31a);_0x1137c4[_0x3a2281(0x1fd)]?.(),_0x33afc7[_0x3a2281(0x197)]=_0x1137c4;}}return okdbCluster={'runClustered':_0x4cf1f4,'attachWorkerCluster':_0x2f908e},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0x1b6570=_0xa12a27;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x784994=require$$0$5,{attachWorkerCluster:_0x36dac5}=requireOkdbCluster();async function _0x237fcc(){const _0x973a6a=_0x372a,_0x3c7f80=process.env.OKDB_HTTP_CHILD;if(!_0x3c7f80)throw new Error(_0x973a6a(0x24a));const {rootPath:_0x1786da,port:_0x3d045b,options:options={},logLevel:logLevel='info'}=JSON[_0x973a6a(0x240)](_0x3c7f80);if(!_0x1786da||!_0x3d045b)throw new Error(_0x973a6a(0xe4));const _0x239cb3=new _0x784994(_0x1786da,{...options,'engines':![],'processors':![],'compaction':![]});_0x239cb3[_0x973a6a(0x23d)][_0x973a6a(0x1a4)]?.();const _0x36749c=process.env.OKDB_CLUSTER_SLOT??'?',_0x1d6e22={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x37521b=_0x1d6e22[logLevel]??_0x1d6e22['info'];_0x239cb3[_0x973a6a(0x23d)]['attach'](_0x3b2e99=>{const _0x472f10=_0x973a6a;if((_0x1d6e22[_0x3b2e99[_0x472f10(0x1d1)]]??0x1)<_0x37521b)return;try{process[_0x472f10(0x254)]?.({'__okdbCluster':'log','slot':_0x36749c,'pid':process[_0x472f10(0x112)],'entry':_0x3b2e99});}catch{}}),await _0x239cb3[_0x973a6a(0x293)](),_0x36dac5(_0x239cb3),await _0x239cb3['http'][_0x973a6a(0x2c3)](_0x3d045b);}return _0x237fcc()[_0x1b6570(0x26d)](_0x42147e=>{const _0x37c94b=_0x1b6570;try{process['send']?.({'__okdbCluster':_0x37c94b(0x23d),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x37c94b(0x112)],'entry':{'level':_0x37c94b(0x25a),'msg':_0x37c94b(0x12d)+(_0x42147e?.[_0x37c94b(0x14d)]??_0x42147e)}});}catch{}process[_0x37c94b(0x227)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module['exports']=okdbHttpWorkerChild;
|
|
1
|
+
'use strict';const _0x74f0a9=_0x30d0;function _0x30d0(_0xe60607,_0x5dd3ae){_0xe60607=_0xe60607-0xa6;const _0x33d29e=_0x33d2();let _0x30d0a6=_0x33d29e[_0xe60607];return _0x30d0a6;}(function(_0x285b11,_0x1a4150){const _0x368cc7=_0x30d0,_0x37532e=_0x285b11();while(!![]){try{const _0x144214=-parseInt(_0x368cc7(0x2bf))/0x1+parseInt(_0x368cc7(0x237))/0x2*(parseInt(_0x368cc7(0x106))/0x3)+parseInt(_0x368cc7(0x113))/0x4+parseInt(_0x368cc7(0x1ba))/0x5+-parseInt(_0x368cc7(0x123))/0x6+-parseInt(_0x368cc7(0xf5))/0x7+-parseInt(_0x368cc7(0x20d))/0x8;if(_0x144214===_0x1a4150)break;else _0x37532e['push'](_0x37532e['shift']());}catch(_0x20e94f){_0x37532e['push'](_0x37532e['shift']());}}}(_0x33d2,0xb541d));var require$$0$5=require(_0x74f0a9(0xcd)),require$$1$1=require(_0x74f0a9(0x1bc)),require$$1=require(_0x74f0a9(0x1b5)),require$$0$3=require('os'),require$$2=require(_0x74f0a9(0x281)),require$$0=require(_0x74f0a9(0x15e)),require$$0$2=require(_0x74f0a9(0x209)),require$$0$1=require('fs'),require$$0$4=require(_0x74f0a9(0xe8));function getDefaultExportFromCjs(_0x3d54f4){const _0x3d5c36=_0x74f0a9;return _0x3d54f4&&_0x3d54f4[_0x3d5c36(0x109)]&&Object['prototype'][_0x3d5c36(0x15a)][_0x3d5c36(0xb2)](_0x3d54f4,'default')?_0x3d54f4[_0x3d5c36(0x2a6)]:_0x3d54f4;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x13ee2a=_0x74f0a9;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x488412={'PUT':_0x13ee2a(0x1c0),'REMOVE':'remove','INDEX_DROP':_0x13ee2a(0x177),'INDEX_REGISTER':'registerIndex','INDEX_RESET':'resetIndex','TYPE_REGISTER':_0x13ee2a(0x159),'TYPE_DROP':'dropType','FTS_REGISTER':_0x13ee2a(0x114),'FTS_DROP':_0x13ee2a(0x158),'FTS_RESET':'resetFts','SCHEMA_SET':'setSchema','SCHEMA_DROP':_0x13ee2a(0x15b),'TTL_SET':_0x13ee2a(0x1d9),'TTL_CLEAR':_0x13ee2a(0x15f)},_0x5027f8={'SYSTEM_READY':_0x13ee2a(0x29f),'FIELD_RESOLVER_REGISTERED':_0x13ee2a(0x1df),'SYSTEM_STOPPED':_0x13ee2a(0xd2),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x13ee2a(0x19d),'SYSTEM_DRAIN':_0x13ee2a(0x2dd),'SYSTEM_TYPE_DROP':'system:type_drop','SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x13ee2a(0xd8),'ITEM_CREATE':_0x13ee2a(0x20c),'ITEM_UPDATE':_0x13ee2a(0xd1),'ITEM_REMOVE':'item:remove','INDEX_RESET':_0x13ee2a(0x1e7),'INDEX_READY':_0x13ee2a(0x1d6),'INDEX_PROGRESS':_0x13ee2a(0x257),'VIEW_PROGRESS':_0x13ee2a(0x1e3),'INDEX_DROP':_0x13ee2a(0xdc),'INDEX_REGISTERED':_0x13ee2a(0x2d1),'FTS_REGISTERED':_0x13ee2a(0x290),'FTS_DROP':_0x13ee2a(0x172),'FTS_RESET':_0x13ee2a(0x1f6),'SCHEMA_SET':'schema:set','SCHEMA_DROP':_0x13ee2a(0xb5),'UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0x13ee2a(0xe6),'REF_VIOLATION':_0x13ee2a(0x283),'REF_VIOLATION_RESOLVED':_0x13ee2a(0x234),'SYNC_APPLY':_0x13ee2a(0x150),'TXN_START':'txn:start','TXN_END':_0x13ee2a(0x174),'TXN_ROLLBACK':'txn:rollback','TYPE_REGISTERED':_0x13ee2a(0x21a),'TYPE_DROP':'type:drop','ENV_OPENED':_0x13ee2a(0x213),'ENV_REMOVED':_0x13ee2a(0xad),'SYSTEM_ENV_RELEASE':'system:env_release','TTL_EXPIRED':_0x13ee2a(0x1f4),'TTL_SET':_0x13ee2a(0x105),'TTL_CLEAR':_0x13ee2a(0x120),'LICENSE_INVALID':_0x13ee2a(0x208),'LICENSE_ADDED':'license:added','LICENSE_ACTIVATED':_0x13ee2a(0x20f),'LICENSE_REMOVED':_0x13ee2a(0x1f2)},_0x22d4d7={'CREATING':'creating','RESETTING':'resetting','READY':_0x13ee2a(0x1c2),'DROPPING':_0x13ee2a(0x24c),'WAITING':_0x13ee2a(0x282),'ERROR':_0x13ee2a(0x192)},_0x1db663={'CREATED':_0x13ee2a(0x170),'STARTING':'starting','STARTED':_0x13ee2a(0x1a1),'STOPPING':_0x13ee2a(0x22e),'STOPPED':_0x13ee2a(0x17a)},_0x3d65f8={'CREATING':_0x13ee2a(0x2ce),'READY':_0x13ee2a(0x1c2),'HALTED':'halted','STOPPED':_0x13ee2a(0x17a),'RESETTING':_0x13ee2a(0x2ba)},_0x2a297b=Object['freeze']({'POKE':_0x13ee2a(0xa7),'DRAIN':'bus:drain','TYPE_DROP':_0x13ee2a(0x253),'PROC':'bus:proc','ENV_RELEASE':_0x13ee2a(0x23b)});return okdbEnums={'BUS_EVENTS':_0x2a297b,'CHANGE_ACTIONS':_0x488412,'EVENTS':_0x5027f8,'INDEX_STATE':_0x22d4d7,'OKDB_STATE':_0x1db663,'VIEW_STATE':_0x3d65f8},okdbEnums;}function _0x33d2(){const _0x15785d=['has','_committed','_openEnvLazy','acquiredAt','~lock','__okdbSlot','_draining','_onPoke','_writer','index:ready','\x20times\x20in\x20','attach','setTtl','1ofN:','_putRowSync','race','warn','_lock','field:resolver_registered','user','http-server','\x20ipc\x20error:\x20','view:progress','_coordinator','okdb-writer:\x20env\x20closing\x20—\x20retry','_bpWaiters','index:reset','test','_held','mean','\x20died\x20','listAll','_selfKey','publishOwnRow','close','_quantum','startsWith','license:removed','decommission','ttl:expired','_nodeDbFor','fts:reset','processKey','_heartbeatTimer','join','rows=','raw-remove','stopHeartbeat','committed','listen','kill','respawnTimer','log','instanceId','min','isDead','transactionSync','seq','inst:','license:invalid','perf_hooks','[okdb-cluster]\x20','supervisorKey','item:create','11956016sluMkL','engines','license:activated','stringify','clear','isPrimary','env:opened','--watch','FTS_RESET','beforeWrite','okdb','write','now','type:registered','getProcess','floor','_startHeartbeat','events',',\x20signal=','note','(worst\x20','disable','_putRowAsync','createEnvironment','emit','function','_children','sandbox','getCmd','\x20phase=','setupPrimary','_changefeed','error:\x20','stopping','_removeRowAsync','_heartbeatInFlight','then','claimGated','decommissioned','ref:violation_resolved','_markSeen','_baselines','2004146GbDIQY','_groupByProcess','cluster-wide','_handlePoke','bus:env_release','_activateProcesses','_enableChangelog','depth','confirm',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','_collectSingletonClaims','some','mkdirSync','max','stack','commitP99Ms','addSupervisedChild','cluster:','busy','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','system','dropping','string','FTS_DROP','resetReadTxn','\x20===','values','onWindow','bus:type_drop','startedAt','toFixed','_startAdmission','index:progress','kind','_flushTimer','sort','unclaimed','\x20—\x20','uptime','~processes:cmd','claims','_drain','unhandledRejection','message','threads','_bpParkedTotal','repeat','stats','_envs','trim','getDesired','__okdbCluster','SYSTEM_STOPPED','version','_onTick','markClosed','workers','hostname','exports','_buckets','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','_maybePublish','listNodes','_durs',':want','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','commitsPerSec','_dedupeMax','_handleInProcess','async','getRange','reap','_onItem','holder','crypto','waiting','ref:violation','map','_clusterWorkerAttached','\x20\x20#','SWAP','change','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.','label','processingStatusView','_sandbox','delete','enabled','_onStop','fts:registered','\x20statusEnv=','detachConsole','connected','nodesView','_getType','_ownMeta','_isStale','building','killable','_publishNow','view','\x20\x20(no\x20env\x20draining)','publishChildRow','_rowKey','system:ready','state','reduce','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','indexOf','level','_migrateVocab','default','_buildOwnRow','setLogger','includes','caps','node/','registry-publish','_systemEnv','[okdb-cluster]\x20worker\x20pid=','pid','_acquiredAt','ppid','_startedAt','cli','\x20│\x20','_ensureDesired','\x20drainAge=','openDB','commit','\x20while\x20this\x20process\x20runs\x20','resetting','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','attachFeed','set','_done','1378089xMRhGD','[okdb-cluster]\x20slot=','push','maxMs','_rootDb','pushEphemeral','oldestPendingMs','from','nodeKey',')\x20exited\x20','round','http\x20worker\x20child\x20failed:\x20','_released','_singletonLock','feed:','creating','_admissionTimer','_heldTotal','index:registered','tierList','_drainOne','enable','filter','_instanceId','_seen','_lastCpuWindowMs','_nestedWarned','_started','ms\x20(attempt\x20','getClock','system:drain','_closed','okdb-http-worker-child.js','namespace','--inspect','maxExtra','_lockDb','expiresAt','_versionSkewWarned','bus:poke','_isReader','heapUsed','msg','_singletonLocks','setOwnMeta','env:removed','_wantDb','_report','inflightAgesMs','hasDesired','call','\x20\x20env=','workersConfigured','schema:drop','_buildProcessingFacet','loop-lag','lifecycle','\x20in\x20','firstTs','ESRCH','putSync','_nodeDb','_nodeDead','number','splice','processor','SYNC_COMMITS','list','size','_key','\x20oldestPendingMs=','deaths','processor:progress','processor:error','mode','split','_lastCpuPct','./okdb','~processes','percentile',');\x20','item:update','system:stopped','FTS_REGISTERED','_role','ms\x20p99=','open','_adminRelay','system:bus_state_change','external','primary','_log','index:drop','uncaughtException','registry\x20heartbeat\x20skipped\x20(writer=','isActive','SYSTEM_PROC','[okdb-cluster]\x20respawning\x20worker\x20slot=','_onProcEvent','_desired','SIGKILL','isWorker','unique:violation_resolved','migrations','node:events','allSettled','isConnected','[okdb-cluster]\x20primary\x20pid=','randomUUID','status','_nestedTotal','_timer','removeNode','liveThreadStats','\x0a\x20\x20\x20\x20\x20\x20','INDEX_PROGRESS','processing','429121XIilsQ','startHeartbeat','compaction','noteListenAddr','data','ORPHAN\x20(env-closed\x20write)','__vocab/version','_lastPublishAt','rowKey','quantum','execArgv','keys','SYSTEM_POKE','_cursors','http','setDesired','ttl:set','3eyVHRX','flushed','_outstanding','__esModule','embedded','ms\x20on\x20env=','flushLmdb','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','_lastCpuAt','getChanges','_processStartedAt','shift','object','5569112DqdbDZ','registerFts','registry\x20publish\x20failing:\x20','single','_nodeDbCache','ingest','_supervisorKey','_enqueuedAt','children','updatedAt','disconnect','_participate','ms\x20busy=','ttl:clear','processor:ready','_admissionStarted','393726mqWqdF','processors','online','cursorKey','host','_kind','slotKey','remove','compact','all','(code=','recordWrite','parkedNow','listenAddr','reject','INDEX_REGISTERED','.log','env','name','childTransaction','_scheduleFlush','ms\x20env=',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','options','_wantDbHandle','prependListener','fanout','processor:paused','ms\x20max=','role','heartbeatMs','drain','epoch','memoryUsage','none','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','toISOString','send','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','standalone','find','removeSync','_statusEnv','afterWrite','processor:resumed','sync:apply','updateSupervisedChildStats','_publishFailWarned','_collectWriterFacet','_listenAddr','\x20sync','add','\x20@\x20','dropFts','registerType','hasOwnProperty','dropSchema','participate','info','node:perf_hooks','clearTtl','processorId','count','deregisterSelf','code','_desiredOverlay','envsOpen','_isWriter','stderr','VIEW_PROGRESS','ms\x20activeWriters=','fn-runner','_holderDead','\x20worker\x20slot=','processorsView','_highWater','_db','created','_flushDebounce','fts:drop','sync','txn:end','signalWant','\x20HTTP\x20server(s)\x20on\x20port\x20','dropIndex','instances','singletonClaims','stopped','ms/','catch','--eval','event','running','exit','unref','processes','selfKey','dedupeMax','listening','win32','stop','true','ITEM_UPDATE','--test','_threadStats','_dedupeKey','_inflight','hard-killed','ENV_CLOSING_RETRY','cpuWindowMs','cpuUsage','error','off','force','get','\x20writer{depth=','_caps','entries','slot','load','listDesired','_lastCpuUsage','system:poke','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','_pending','\x0a===\x20OKDB_DIAG\x20','started','processor:retry','process','transaction','clusterStatusView','_windowCbs','consecutiveFailures','\x20pid=','type','ttlMs','once','putNode','_refreshDesiredSnapshot','_cmd','resolve','CHANGEFEED_QUANTUM','replace','reset','_hbTimer','fromEntries','path','ensureType','dead','worker','inspect','6737965hLwZZo','heapTotal','cluster','_buildChildRow','node','draining','put','ITEM_REMOVE','ready','slice','length','tryAcquire','start','reportThreadStats','value','_rawDb','rss','parse','INDEX_RESET'];_0x33d2=function(){return _0x15785d;};return _0x33d2();}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x3d0059=_0x74f0a9;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x1f9be7,performance:_0x1c95db}=require$$0,_0x17d124=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x3d0059(0x188),_0x5c550f=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x2b887f=process.env.OKDB_LOOP_LAG_ALL==='1',_0x3c9be7=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0xec9dc3{constructor(){const _0x23d42c=_0x3d0059;this[_0x23d42c(0x28e)]=_0x17d124,this['_buckets']=new Map(),this['_h']=null,this['_timer']=null,this['_started']=![],this[_0x23d42c(0xdb)]=(_0x3a3cae,_0x363e31)=>process[_0x23d42c(0x167)][_0x23d42c(0x218)](_0x3a3cae+(_0x363e31?'\x20'+JSON[_0x23d42c(0x210)](_0x363e31):'')+'\x0a');}['now'](){const _0x57e40c=_0x3d0059;return _0x1c95db[_0x57e40c(0x219)]();}[_0x3d0059(0x2a8)](_0x538265){const _0x3b7b20=_0x3d0059;if(typeof _0x538265===_0x3b7b20(0x226))this[_0x3b7b20(0xdb)]=_0x538265;}[_0x3d0059(0x220)](_0x25b292,_0x279e5b,_0x14d3e4){const _0x382317=_0x3d0059;if(!this[_0x382317(0x28e)])return;let _0x32b071=this[_0x382317(0x272)][_0x382317(0x195)](_0x25b292);!_0x32b071&&(_0x32b071={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x382317(0x272)][_0x382317(0x2bd)](_0x25b292,_0x32b071)),_0x32b071['ms']+=_0x279e5b,_0x32b071['count']+=0x1,_0x279e5b>_0x32b071['maxMs']&&(_0x32b071[_0x382317(0x2c2)]=_0x279e5b,_0x32b071[_0x382317(0x2e2)]=_0x14d3e4||'');}[_0x3d0059(0x1c6)](_0x2aa04a){const _0xc07884=_0x3d0059;if(!this[_0xc07884(0x28e)]||this[_0xc07884(0x2da)])return;this[_0xc07884(0x2da)]=!![];if(_0x2aa04a)this['_log']=_0x2aa04a;this['_h']=_0x1f9be7({'resolution':0xa}),this['_h'][_0xc07884(0x2d4)](),this[_0xc07884(0xef)]=setInterval(()=>this[_0xc07884(0xaf)](),_0x5c550f);if(this[_0xc07884(0xef)][_0xc07884(0x181)])this[_0xc07884(0xef)]['unref']();}[_0x3d0059(0x252)](_0x38c7a6){const _0x41e28e=_0x3d0059;if(!this[_0x41e28e(0x1a6)])this['_windowCbs']=new Set();this['_windowCbs'][_0x41e28e(0x156)](_0x38c7a6);if(!this[_0x41e28e(0x2da)])this[_0x41e28e(0x256)]();}['offWindow'](_0x30bb99){const _0x5c9bec=_0x3d0059;this[_0x5c9bec(0x1a6)]?.[_0x5c9bec(0x28d)](_0x30bb99);}[_0x3d0059(0x256)](){const _0x4091cd=_0x3d0059;if(this[_0x4091cd(0x122)])return;this['_admissionStarted']=!![];!this['_h']&&(this['_h']=_0x1f9be7({'resolution':0xa}),this['_h']['enable']());const _0x4a0a27=_0x5c550f;this[_0x4091cd(0x2cf)]=setInterval(()=>{const _0x29c128=_0x4091cd,_0x5e3706=this['_h'];if(!_0x5e3706)return;const _0x13d9c9=_0x5e3706[_0x29c128(0xcf)](0x63)/0xf4240,_0x4935b3=_0x5e3706['max']/0xf4240,_0x4107ec=_0x5e3706[_0x29c128(0x1ea)]/0xf4240;_0x5e3706[_0x29c128(0x1b2)]();if(this[_0x29c128(0x1a6)])for(const _0x47d3d7 of this[_0x29c128(0x1a6)]){try{_0x47d3d7({'p99Ms':_0x13d9c9,'maxMs':_0x4935b3,'meanMs':_0x4107ec,'reportMs':_0x4a0a27});}catch{}}},_0x4a0a27);if(this[_0x4091cd(0x2cf)][_0x4091cd(0x181)])this['_admissionTimer']['unref']();}[_0x3d0059(0xaf)](){const _0x852961=_0x3d0059,_0x3c14ae=this['_h'],_0x3e42c5=_0x3c14ae['max']/0xf4240,_0x460914=_0x3c14ae[_0x852961(0xcf)](0x63)/0xf4240,_0x3c5dec=_0x3c14ae[_0x852961(0x1ea)]/0xf4240;_0x3c14ae[_0x852961(0x1b2)]();const _0x2382fa=[...this[_0x852961(0x272)][_0x852961(0x198)]()]['map'](([_0x276e64,_0x4a1f7c])=>({'label':_0x276e64,..._0x4a1f7c}))[_0x852961(0x25a)]((_0x5b3c51,_0x5433a2)=>_0x5433a2['ms']-_0x5b3c51['ms'])[_0x852961(0x1c3)](0x0,0x8);this['_buckets'][_0x852961(0x211)]();const _0x7b0004=_0x2382fa[_0x852961(0x2a1)]((_0x55db80,_0xc42e2d)=>_0x55db80+_0xc42e2d['ms'],0x0),_0x2b8c52=_0x2382fa['map'](_0x345f7a=>_0x345f7a[_0x852961(0x28a)]+'='+_0x345f7a['ms'][_0x852961(0x255)](0x0)+_0x852961(0x17b)+_0x345f7a[_0x852961(0x161)]+(_0x345f7a['maxMs']>0x5?_0x852961(0x221)+_0x345f7a[_0x852961(0x2c2)][_0x852961(0x255)](0x0)+'ms'+(_0x345f7a[_0x852961(0x2e2)]?'\x20'+_0x345f7a[_0x852961(0x2e2)]:'')+')':''));(_0x2b887f||_0x3e42c5>=_0x3c9be7)&&this['_log']('loop-lag\x20'+_0x5c550f+_0x852961(0x13f)+_0x3e42c5[_0x852961(0x255)](0x0)+_0x852961(0xd5)+_0x460914[_0x852961(0x255)](0x0)+'ms\x20mean='+_0x3c5dec['toFixed'](0x0)+_0x852961(0x11f)+_0x7b0004[_0x852961(0x255)](0x0)+'ms'+(_0x2b8c52[_0x852961(0x1c4)]?_0x852961(0x2b4)+_0x2b8c52['join']('\x20\x20'):''),{'feature':_0x852961(0xb7)});if(this[_0x852961(0x1a6)])for(const _0x37b8eb of this['_windowCbs']){try{_0x37b8eb({'p99Ms':_0x460914,'maxMs':_0x3e42c5,'meanMs':_0x3c5dec,'reportMs':_0x5c550f});}catch{}}}[_0x3d0059(0x187)](){const _0x30ded6=_0x3d0059;if(this[_0x30ded6(0xef)])clearInterval(this[_0x30ded6(0xef)]);if(this['_h'])this['_h'][_0x30ded6(0x222)]();this[_0x30ded6(0xef)]=null,this['_h']=null,this[_0x30ded6(0x2da)]=![];}}const _0x29a307=new _0xec9dc3();if(_0x29a307[_0x3d0059(0x28e)])_0x29a307[_0x3d0059(0x1c6)]();return okdbLoopMonitor={'LOOP':_0x29a307},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x4523b4=require$$0$1,_0x520d5c=require$$1;let _0x43517d,_0x19ebef,_0x59524b,_0x126fa7,_0x54da5b,_0x1be9b0,_0x3f21dd,_0x5a8ed7=![];const _0x5b50df=new Set();let _0x467544=null;const _0x2e8397=new Map();function _0x2314ea(){const _0x27554b=_0x30d0;if(_0x43517d!==undefined)return _0x43517d;_0x43517d=process.env.OKDB_DIAG==='1';if(!_0x43517d)return![];_0x19ebef=process.env.OKDB_DIAG_STACK==='1',_0x126fa7=Math[_0x27554b(0x244)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x59524b=new Array(_0x126fa7),_0x54da5b=0x0,_0x1be9b0=0x0,_0x3f21dd=process.env.OKDB_DIAG_DIR||null;if(_0x3f21dd)try{_0x4523b4[_0x27554b(0x243)](_0x3f21dd,{'recursive':!![]});}catch{}return!![];}function _0x1ab510(){return _0x43517d===undefined?_0x2314ea():_0x43517d;}function _0x4b9a2d(_0x44cce5,_0x4bfd8f){const _0x568f88=_0x30d0;if(_0x43517d===undefined?!_0x2314ea():!_0x43517d)return;let _0x13e435;if(_0x19ebef){const _0xb06f05=new Error()[_0x568f88(0x245)]||'';_0x13e435=_0xb06f05[_0x568f88(0xcb)]('\x0a')[_0x568f88(0x1c3)](0x3)['map'](_0x429103=>_0x429103[_0x568f88(0x268)]())[_0x568f88(0x2d5)](Boolean)['slice'](0x0,0x8);}_0x59524b[_0x54da5b]={'seq':_0x1be9b0++,'t':Date[_0x568f88(0x219)](),'env':_0x44cce5,'kind':_0x4bfd8f||_0x568f88(0x2b8),'stack':_0x13e435},_0x54da5b=(_0x54da5b+0x1)%_0x126fa7;}function _0x4f75c5(_0x45fc53){const _0x48fcc8=_0x30d0,_0x212c98=[];for(let _0x56ddf5=0x0;_0x56ddf5<_0x126fa7;_0x56ddf5++){const _0x61e397=_0x59524b[(_0x54da5b-0x1-_0x56ddf5+_0x126fa7*0x2)%_0x126fa7];if(!_0x61e397)continue;_0x212c98[_0x48fcc8(0x2c1)](_0x61e397);if(_0x212c98[_0x48fcc8(0x1c4)]>=_0x45fc53)break;}return _0x212c98;}function _0x51d65e(_0x25bb84){const _0x2ca0d3=_0x30d0;try{process[_0x2ca0d3(0x167)][_0x2ca0d3(0x218)](_0x25bb84+'\x0a');}catch{}if(_0x3f21dd)try{_0x4523b4['appendFileSync'](_0x520d5c[_0x2ca0d3(0x1f9)](_0x3f21dd,'okdb-diag.'+process[_0x2ca0d3(0x2af)]+_0x2ca0d3(0x133)),_0x25bb84+'\x0a');}catch{}}function _0x13410a(_0x534d79){const _0x20392e=_0x30d0,_0xbdeb4d=_0x4f75c5(_0x534d79);if(!_0xbdeb4d[_0x20392e(0x1c4)])return'\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)';const _0x164b0b=Date[_0x20392e(0x219)]();return _0xbdeb4d[_0x20392e(0x284)](_0x4481d2=>{const _0x177e22=_0x20392e,_0x7fa882=_0x177e22(0x286)+_0x4481d2[_0x177e22(0x206)]+'\x20-'+(_0x164b0b-_0x4481d2['t'])+_0x177e22(0x138)+_0x4481d2[_0x177e22(0x134)]+'\x20'+_0x4481d2[_0x177e22(0x258)];return _0x4481d2[_0x177e22(0x245)]&&_0x4481d2[_0x177e22(0x245)][_0x177e22(0x1c4)]?_0x7fa882+_0x177e22(0xf2)+_0x4481d2[_0x177e22(0x245)][_0x177e22(0x1f9)](_0x177e22(0xf2)):_0x7fa882;})[_0x20392e(0x1f9)]('\x0a');}function _0x295f00(_0x158e72,_0x55022f){const _0x2c0767=_0x30d0,_0x522905=_0x2c0767(0x1a0)+_0x158e72+_0x2c0767(0x157)+new Date()[_0x2c0767(0x147)]()+_0x2c0767(0x1a8)+process[_0x2c0767(0x2af)]+_0x2c0767(0x250),_0x5aa24a=[_0x522905,_0x2c0767(0x22d)+(_0x55022f&&_0x55022f['stack']?_0x55022f['stack'][_0x2c0767(0xcb)]('\x0a')[0x0]:_0x55022f),'recent\x20writes\x20(newest\x20first)'+(_0x19ebef?'':_0x2c0767(0x149))+':',_0x13410a(0x18),_0x41e50e(),'='['repeat'](_0x522905[_0x2c0767(0x1c4)]-0x1)];_0x51d65e(_0x5aa24a[_0x2c0767(0x1f9)]('\x0a'));}function _0x30e2bc(_0x5e6ee7){const _0x44ae62=_0x30d0;if(!_0x1ab510())return;const _0x4716dc=String(_0x5e6ee7&&_0x5e6ee7['message']||_0x5e6ee7||''),_0x2ea36e=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x44ae62(0x1e8)](_0x4716dc);_0x295f00(_0x2ea36e?_0x44ae62(0xfa):'uncaughtException',_0x5e6ee7);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x2ea36e)return;try{console[_0x44ae62(0x192)](_0x5e6ee7&&_0x5e6ee7[_0x44ae62(0x245)]?_0x5e6ee7['stack']:_0x5e6ee7);}catch{}process[_0x44ae62(0x180)](0x1);}function _0x33709a(_0x432473){const _0x4f99be=_0x30d0;if(!_0x1ab510())return;const _0xd51ae5=String(_0x432473&&_0x432473[_0x4f99be(0x262)]||_0x432473||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x4f99be(0x1e8)](_0xd51ae5)&&_0x295f00(_0x4f99be(0x273),_0x432473);}function _0x41e50e(){const _0x14681d=_0x30d0,_0xc55977=[_0x14681d(0x19e)];let _0x195e21=![];for(const _0x328be7 of _0x5b50df){const _0x500a8a=_0x328be7&&_0x328be7[_0x14681d(0x267)];if(!_0x500a8a)continue;for(const [_0x2e446b,_0x2a6086]of _0x500a8a){const _0x21d074=_0x2a6086&&_0x2a6086[_0x14681d(0x1e4)]&&_0x2a6086[_0x14681d(0x1e4)][_0x14681d(0x29b)];if(!_0x21d074)continue;let _0x4991f9,_0x176a07;try{_0x4991f9=Atomics[_0x14681d(0x19a)](_0x21d074,0x0),_0x176a07=Atomics[_0x14681d(0x19a)](_0x21d074,0x1);}catch{continue;}if(_0x4991f9===0x0)continue;_0x195e21=!![];const _0x398bc2=_0x4991f9>0x0?_0x14681d(0x287):'copy',_0x3c025d=Date['now']()-Math['abs'](_0x4991f9)*0x3e8,_0x241385=((()=>{const _0x186f35=_0x14681d;try{return _0x2a6086[_0x186f35(0x1d5)]&&_0x2a6086[_0x186f35(0x1d5)][_0x186f35(0xed)]?_0x2a6086['_writer'][_0x186f35(0xed)]():null;}catch{return null;}})());_0xc55977['push'](_0x14681d(0xb3)+_0x2e446b+_0x14681d(0x22a)+_0x398bc2+_0x14681d(0x2b6)+_0x3c025d+_0x14681d(0x169)+_0x176a07+(_0x241385?_0x14681d(0x196)+_0x241385[_0x14681d(0x23e)]+_0x14681d(0xc6)+_0x241385[_0x14681d(0x2c5)]+'\x20parkedNow='+_0x241385[_0x14681d(0x12f)]+'}':''));}}if(!_0x195e21)_0xc55977[_0x14681d(0x2c1)](_0x14681d(0x29c));return _0xc55977[_0x14681d(0x1f9)]('\x0a');}function _0x2425d2(){const _0xc30693=_0x30d0;if(!_0x1ab510())return;const _0x475b61=Math[_0xc30693(0x244)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x178136=Date[_0xc30693(0x219)]();for(const _0x43cdd6 of _0x5b50df){const _0x2510e9=_0x43cdd6&&_0x43cdd6[_0xc30693(0x267)];if(!_0x2510e9)continue;for(const [_0x1b42b7,_0x17e42f]of _0x2510e9){const _0xd9d710=_0x17e42f&&_0x17e42f['_coordinator']&&_0x17e42f[_0xc30693(0x1e4)][_0xc30693(0x29b)];if(!_0xd9d710)continue;let _0x2e09ef;try{_0x2e09ef=Atomics[_0xc30693(0x19a)](_0xd9d710,0x0);}catch{continue;}const _0x401828=_0x43cdd6[_0xc30693(0x1b5)]+'|'+_0x1b42b7;if(_0x2e09ef<=0x0){_0x2e8397[_0xc30693(0x28d)](_0x401828);continue;}const _0x46f778=_0x178136-_0x2e09ef*0x3e8,_0x274e25=_0x2e8397['get'](_0x401828);if(_0x46f778<_0x475b61)continue;if(_0x274e25&&_0x178136-_0x274e25['dumpedAt']<_0x475b61)continue;_0x2e8397[_0xc30693(0x2bd)](_0x401828,{'firstTs':_0x274e25?_0x274e25[_0xc30693(0xba)]:_0x2e09ef,'dumpedAt':_0x178136});const _0x2a978a=_0xc30693(0x146)+_0x46f778+_0xc30693(0x10b)+_0x1b42b7+_0xc30693(0x157)+new Date()['toISOString']()+_0xc30693(0x1a8)+process[_0xc30693(0x2af)]+_0xc30693(0x250);_0x51d65e([_0x2a978a,_0x41e50e(),'='[_0xc30693(0x265)](_0x2a978a[_0xc30693(0x1c4)]-0x1)][_0xc30693(0x1f9)]('\x0a'));}}}function _0x507dd2(){const _0x3fa3f1=_0x30d0;if(!_0x1ab510()||_0x5a8ed7)return;_0x5a8ed7=!![],process[_0x3fa3f1(0x13c)](_0x3fa3f1(0xdd),_0x30e2bc),process['prependListener'](_0x3fa3f1(0x261),_0x33709a);const _0x2b0344=Math[_0x3fa3f1(0x244)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x467544=setInterval(_0x2425d2,_0x2b0344);if(_0x467544[_0x3fa3f1(0x181)])_0x467544[_0x3fa3f1(0x181)]();}function _0x37930b(_0x286827){const _0x6d0af9=_0x30d0;if(!_0x1ab510()||!_0x286827)return;_0x5b50df[_0x6d0af9(0x156)](_0x286827),_0x507dd2();}function _0x4723b6(_0x3b0751){const _0x4edf73=_0x30d0;_0x5b50df[_0x4edf73(0x28d)](_0x3b0751);}function _0x308b23(){if(!_0x1ab510())return{'enabled':![],'hint':'set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)'};return{'enabled':!![],'stackCapture':!!_0x19ebef,'recentWrites':_0x4f75c5(0x10),'drain':_0x41e50e()};}return okdbDiag={'isEnabled':_0x1ab510,'recordWrite':_0x4b9a2d,'installDiag':_0x507dd2,'registerOkdb':_0x37930b,'unregisterOkdb':_0x4723b6,'snapshot':_0x308b23},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x4ff54a=_0x74f0a9;if(hasRequiredOkdbWriter)return okdbWriter['exports'];hasRequiredOkdbWriter=0x1;const {performance:_0x5d733f}=require$$0$2,_0x157042=requireOkdbDiag(),_0xa50e87=process.env.OKDB_COMMIT_MODE===_0x4ff54a(0x173);class _0x3dfd5c{constructor(_0xb3f39e){const _0x1e52c7=_0x4ff54a;this['env']=_0xb3f39e,this[_0x1e52c7(0x18d)]=new Set(),this[_0x1e52c7(0x11a)]=new Map(),this[_0x1e52c7(0x1ce)]=0x0,this[_0x1e52c7(0x276)]=[],this[_0x1e52c7(0x2be)]=[],this[_0x1e52c7(0x16e)]=Math[_0x1e52c7(0x244)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x1e52c7(0x108)]=0x0,this[_0x1e52c7(0x1e6)]=[],this['_bpParkedTotal']=0x0,this[_0x1e52c7(0x1e9)]=null,this[_0x1e52c7(0x2d0)]=0x0,this[_0x1e52c7(0xee)]=0x0,this[_0x1e52c7(0x2d9)]=![];}async[_0x4ff54a(0x1a4)](_0x133332,_0x40bc49){const _0x552fb8=_0x4ff54a;if(_0x157042['isEnabled']())_0x157042[_0x552fb8(0x12e)](this[_0x552fb8(0x134)]?.[_0x552fb8(0x135)],_0x40bc49);if(this[_0x552fb8(0x2de)]){const _0x332e2e=new Error(_0x552fb8(0x1e5));_0x332e2e[_0x552fb8(0x163)]='ENV_CLOSING_RETRY';throw _0x332e2e;}if(this[_0x552fb8(0x16e)]>0x0){let _0x9fb1c9=![];while(this['_outstanding']>=this['_highWater']&&!this[_0x552fb8(0x2de)]){!_0x9fb1c9&&(_0x9fb1c9=!![],this[_0x552fb8(0x264)]++),await new Promise(_0x227b8c=>this[_0x552fb8(0x1e6)][_0x552fb8(0x2c1)](_0x227b8c));}if(this[_0x552fb8(0x2de)]){const _0x17d1c6=new Error(_0x552fb8(0x1e5));_0x17d1c6[_0x552fb8(0x163)]=_0x552fb8(0x18f);throw _0x17d1c6;}}this[_0x552fb8(0x108)]++;const _0x7c105a=this[_0x552fb8(0x134)][_0x552fb8(0x1e4)];for(;;){while(this[_0x552fb8(0x1e9)])await this[_0x552fb8(0x1e9)];if(_0x7c105a)await _0x7c105a[_0x552fb8(0x216)]();if(!this[_0x552fb8(0x1e9)])break;if(_0x7c105a)_0x7c105a[_0x552fb8(0x14e)]();}if(this[_0x552fb8(0x2de)]){if(_0x7c105a)_0x7c105a['afterWrite']();this[_0x552fb8(0x108)]--;if(this[_0x552fb8(0x1e6)][_0x552fb8(0x1c4)]&&this[_0x552fb8(0x108)]<this['_highWater'])this[_0x552fb8(0x1e6)][_0x552fb8(0x111)]()();const _0x4fb32a=new Error(_0x552fb8(0x1e5));_0x4fb32a[_0x552fb8(0x163)]=_0x552fb8(0x18f);throw _0x4fb32a;}const _0x53ebb4=_0x5d733f[_0x552fb8(0x219)]();if(_0xa50e87)try{const _0x2fc88f=this[_0x552fb8(0x134)]['db'][_0x552fb8(0x205)](_0x133332);this[_0x552fb8(0x1ce)]++;if(this[_0x552fb8(0x276)][_0x552fb8(0x2c1)](_0x5d733f['now']()-_0x53ebb4)>0x100)this[_0x552fb8(0x276)][_0x552fb8(0x111)]();if(this[_0x552fb8(0x2be)][_0x552fb8(0x2c1)](_0x5d733f[_0x552fb8(0x219)]())>0x800)this[_0x552fb8(0x2be)]['shift']();return _0x2fc88f;}finally{this['_outstanding']--;if(this['_bpWaiters'][_0x552fb8(0x1c4)]&&this['_outstanding']<this[_0x552fb8(0x16e)])this[_0x552fb8(0x1e6)]['shift']()();if(_0x7c105a)_0x7c105a['afterWrite']();}let _0x377784=null;const _0x1c30eb=()=>{const _0x10b3f0=_0x552fb8,_0x239876=_0x133332();if(_0x239876&&typeof _0x239876[_0x10b3f0(0x231)]===_0x10b3f0(0x226)&&!_0x377784){this[_0x10b3f0(0x2d0)]++;let _0x587809;const _0x5a857f=new Promise(_0x4124b7=>_0x587809=_0x4124b7);this['_held']=_0x5a857f,_0x377784=()=>{const _0x528ed1=_0x10b3f0;if(this['_held']===_0x5a857f)this[_0x528ed1(0x1e9)]=null;_0x587809();};}return _0x239876;};let _0x428c75;try{_0x428c75=this['env']['db'][_0x552fb8(0x136)](_0x1c30eb);}catch(_0x10dc3e){_0x428c75=Promise[_0x552fb8(0x131)](_0x10dc3e);}(!_0x428c75||typeof _0x428c75[_0x552fb8(0x231)]!==_0x552fb8(0x226))&&(this[_0x552fb8(0xee)]++,!this[_0x552fb8(0x2d9)]&&(this[_0x552fb8(0x2d9)]=!![],console[_0x552fb8(0x1dd)]('okdb-writer['+(this[_0x552fb8(0x134)]?.['name']??'?')+_0x552fb8(0x240))),_0x428c75=Promise[_0x552fb8(0x1af)](_0x428c75));const _0x2c4d00=()=>{if(_0x377784)_0x377784();};_0x428c75[_0x552fb8(0x231)](_0x2c4d00,_0x2c4d00),this['_inflight']['add'](_0x428c75),this[_0x552fb8(0x11a)][_0x552fb8(0x2bd)](_0x428c75,_0x53ebb4);const _0x474e54=()=>{const _0x4a1fad=_0x552fb8;this[_0x4a1fad(0x18d)]['delete'](_0x428c75),this[_0x4a1fad(0x11a)][_0x4a1fad(0x28d)](_0x428c75),this['_committed']++,this[_0x4a1fad(0x108)]--;this[_0x4a1fad(0x1e6)]['length']&&this[_0x4a1fad(0x108)]<this[_0x4a1fad(0x16e)]&&this['_bpWaiters'][_0x4a1fad(0x111)]()();if(this[_0x4a1fad(0x276)][_0x4a1fad(0x2c1)](_0x5d733f['now']()-_0x53ebb4)>0x100)this[_0x4a1fad(0x276)][_0x4a1fad(0x111)]();if(this[_0x4a1fad(0x2be)][_0x4a1fad(0x2c1)](_0x5d733f[_0x4a1fad(0x219)]())>0x800)this[_0x4a1fad(0x2be)][_0x4a1fad(0x111)]();};_0x428c75[_0x552fb8(0x231)](_0x474e54,_0x474e54);try{return await _0x428c75;}finally{if(_0x7c105a)_0x7c105a[_0x552fb8(0x14e)]();}}[_0x4ff54a(0xed)](){const _0x20cbf8=_0x4ff54a,_0x59b756=_0x5d733f['now']();let _0x2d71fc=0x0;for(const _0x5936a3 of this[_0x20cbf8(0x11a)][_0x20cbf8(0x251)]()){const _0x1224a4=_0x59b756-_0x5936a3;if(_0x1224a4>_0x2d71fc)_0x2d71fc=_0x1224a4;}let _0x2f1c08=0x0;for(let _0x467db1=this[_0x20cbf8(0x2be)]['length']-0x1;_0x467db1>=0x0;_0x467db1--){if(_0x59b756-this['_done'][_0x467db1]>0x3e8)break;_0x2f1c08++;}let _0x38bba4=0x0;if(this['_durs'][_0x20cbf8(0x1c4)]){const _0x3f10cc=[...this[_0x20cbf8(0x276)]][_0x20cbf8(0x25a)]((_0x11af12,_0x1a7ee9)=>_0x11af12-_0x1a7ee9);_0x38bba4=_0x3f10cc[Math[_0x20cbf8(0x203)](_0x3f10cc[_0x20cbf8(0x1c4)]-0x1,Math[_0x20cbf8(0x21c)](_0x3f10cc[_0x20cbf8(0x1c4)]*0.99))];}return{'depth':this[_0x20cbf8(0x18d)][_0x20cbf8(0xc4)],'oldestPendingMs':Math[_0x20cbf8(0x2c9)](_0x2d71fc),'committed':this[_0x20cbf8(0x1ce)],'commitsPerSec':_0x2f1c08,'commitP99Ms':Math[_0x20cbf8(0x2c9)](_0x38bba4),'parkedNow':this[_0x20cbf8(0x1e6)][_0x20cbf8(0x1c4)],'parkedTotal':this[_0x20cbf8(0x264)],'highWater':this[_0x20cbf8(0x16e)]};}[_0x4ff54a(0xb0)](){const _0xb72599=_0x4ff54a,_0x2b3f08=_0x5d733f['now']();return[...this['_enqueuedAt']['values']()][_0xb72599(0x284)](_0xdf40c2=>Math[_0xb72599(0x2c9)](_0x2b3f08-_0xdf40c2))[_0xb72599(0x25a)]((_0x503df8,_0x41b0d2)=>_0x41b0d2-_0x503df8);}[_0x4ff54a(0x26e)](){const _0x4e83a5=_0x4ff54a;this[_0x4e83a5(0x2de)]=!![];for(const _0x12efac of this['_bpWaiters'][_0x4e83a5(0xc0)](0x0))_0x12efac();}async[_0x4ff54a(0x142)](){const _0x4629a9=_0x4ff54a;let _0x31bb0a=0x0;while(this['_inflight']['size']&&_0x31bb0a++<0x3e8){await Promise[_0x4629a9(0xe9)]([...this[_0x4629a9(0x18d)]]);}}async[_0x4ff54a(0x1c0)](_0xa3fe0,_0x49699d,_0x599125,_0x347542){const _0x5b3a6a=_0x4ff54a;return this[_0x5b3a6a(0x1a4)](()=>{const _0x5728c7=_0x5b3a6a;if(_0x347542===undefined)_0xa3fe0[_0x5728c7(0xbc)](_0x49699d,_0x599125);else _0xa3fe0[_0x5728c7(0xbc)](_0x49699d,_0x599125,_0x347542);},'raw-put');}async[_0x4ff54a(0x12a)](_0x59b88a,_0x4cb4fe){const _0xfe78ac=_0x4ff54a;return this['transaction'](()=>_0x59b88a['removeSync'](_0x4cb4fe),_0xfe78ac(0x1fb));}}async function _0x2cb879(_0x4f98b6,_0x36737c){const _0x56bdfe=_0x4ff54a;if(_0x36737c==null)_0x36737c=Math['max'](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x31b291=_0x4f98b6?.[_0x56bdfe(0x107)];if(!_0x31b291||typeof _0x31b291[_0x56bdfe(0x231)]!==_0x56bdfe(0x226))return;await Promise[_0x56bdfe(0x1dc)]([Promise[_0x56bdfe(0x1af)](_0x31b291)[_0x56bdfe(0x17c)](()=>{}),new Promise(_0x2926cc=>{const _0x4426a8=_0x56bdfe,_0x4e7b71=setTimeout(_0x2926cc,_0x36737c);if(_0x4e7b71[_0x4426a8(0x181)])_0x4e7b71[_0x4426a8(0x181)]();})]);}catch{}}function _0x19b581(_0x53097a){const _0x5225bf=_0x4ff54a;if(_0xa50e87)return Promise[_0x5225bf(0x1af)]();const _0x337b78=_0x53097a?.[_0x5225bf(0x1fd)];return _0x337b78&&typeof _0x337b78[_0x5225bf(0x231)]===_0x5225bf(0x226)?_0x337b78:Promise[_0x5225bf(0x1af)]();}return okdbWriter[_0x4ff54a(0x271)]=_0x3dfd5c,okdbWriter[_0x4ff54a(0x271)][_0x4ff54a(0x10c)]=_0x2cb879,okdbWriter[_0x4ff54a(0x271)][_0x4ff54a(0x1fd)]=_0x19b581,okdbWriter['exports'][_0x4ff54a(0xc2)]=_0xa50e87,okdbWriter[_0x4ff54a(0x271)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0xacead1=_0x74f0a9;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x435b9c=require$$0$3,{SYNC_COMMITS:_0x44b48a}=requireOkdbWriter(),_0x3bed41=_0xacead1(0x1d1);class _0x38dbb6{constructor(_0x469a54,_0x1449a1,_0x46e036){const _0x1fb19a=_0xacead1;this[_0x1fb19a(0x1de)]=_0x469a54,this['_key']=_0x1449a1,this[_0x1fb19a(0x2b0)]=_0x46e036,this[_0x1fb19a(0x2cb)]=![],this[_0x1fb19a(0x1f8)]=null,this['_heartbeatInFlight']=null;}['isHeld'](){const _0x4bbea6=_0xacead1;if(this['_released'])return![];try{const _0x4d00f1=this[_0x4bbea6(0x1de)][_0x4bbea6(0x16f)]()[_0x4bbea6(0x195)](this[_0x4bbea6(0xc5)]);if(!_0x4d00f1||_0x4d00f1[_0x4bbea6(0x1d0)]!==this[_0x4bbea6(0x2b0)])return![];const _0x387cac=_0x4d00f1[_0x4bbea6(0x11c)]??_0x4d00f1['acquiredAt'];if(_0x387cac+_0x4d00f1[_0x4bbea6(0x1aa)]<Date[_0x4bbea6(0x219)]())return![];return!![];}catch{return!this[_0x4bbea6(0x2cb)];}}['holder'](){const _0x4428b7=_0xacead1;if(this[_0x4428b7(0x2cb)])return null;try{return this[_0x4428b7(0x1de)]['_db']()[_0x4428b7(0x195)](this['_key'])??null;}catch{return null;}}async['extend'](_0x585d4f){const _0xf89d75=_0xacead1;if(this[_0xf89d75(0x2cb)])return;try{const _0x15a11f=this[_0xf89d75(0x1de)][_0xf89d75(0x16f)]()['get'](this[_0xf89d75(0xc5)]);if(!_0x15a11f||_0x15a11f[_0xf89d75(0x1d0)]!==this[_0xf89d75(0x2b0)])return;if(_0x44b48a)this[_0xf89d75(0x1de)][_0xf89d75(0x16f)]()[_0xf89d75(0xbc)](this['_key'],{..._0x15a11f,'ttlMs':_0x15a11f[_0xf89d75(0x1aa)]+_0x585d4f});else await this[_0xf89d75(0x1de)][_0xf89d75(0x16f)]()[_0xf89d75(0x1c0)](this[_0xf89d75(0xc5)],{..._0x15a11f,'ttlMs':_0x15a11f[_0xf89d75(0x1aa)]+_0x585d4f});}catch{}}async['release'](){const _0x4e4b6b=_0xacead1;if(this[_0x4e4b6b(0x2cb)])return;if(this['_heartbeatInFlight'])try{await this[_0x4e4b6b(0x230)];}catch{}clearInterval(this[_0x4e4b6b(0x1f8)]),this[_0x4e4b6b(0x1f8)]=null,this[_0x4e4b6b(0x2cb)]=!![];try{const _0x2292be=this[_0x4e4b6b(0x1de)][_0x4e4b6b(0x16f)]()['get'](this['_key']);if(_0x2292be&&_0x2292be[_0x4e4b6b(0x1d0)]===this['_acquiredAt']){if(_0x44b48a)this[_0x4e4b6b(0x1de)][_0x4e4b6b(0x16f)]()[_0x4e4b6b(0x14c)](this[_0x4e4b6b(0xc5)]);else await this[_0x4e4b6b(0x1de)][_0x4e4b6b(0x16f)]()[_0x4e4b6b(0x12a)](this['_key']);}}catch{}}[_0xacead1(0x21d)](_0x4a0830,_0x4c01fe){const _0x1e4763=_0xacead1,_0x5d49ad=_0x4c01fe??Math[_0x1e4763(0x21c)](_0x4a0830/0x3);this[_0x1e4763(0x1f8)]=setInterval(()=>{if(this['_released'])return;this['_heartbeatInFlight']=((async()=>{const _0x1056ae=_0x30d0;try{const _0x150b7f=this[_0x1056ae(0x1de)][_0x1056ae(0x16f)]()[_0x1056ae(0x195)](this[_0x1056ae(0xc5)]);if(!_0x150b7f||_0x150b7f[_0x1056ae(0x1d0)]!==this[_0x1056ae(0x2b0)]){this[_0x1056ae(0x2cb)]=!![],clearInterval(this[_0x1056ae(0x1f8)]),this['_heartbeatTimer']=null;return;}if(_0x44b48a)this[_0x1056ae(0x1de)][_0x1056ae(0x16f)]()[_0x1056ae(0xbc)](this[_0x1056ae(0xc5)],{..._0x150b7f,'updatedAt':Date[_0x1056ae(0x219)]()});else await this[_0x1056ae(0x1de)][_0x1056ae(0x16f)]()[_0x1056ae(0x1c0)](this[_0x1056ae(0xc5)],{..._0x150b7f,'updatedAt':Date[_0x1056ae(0x219)]()});}catch{}this[_0x1056ae(0x230)]=null;})());},_0x5d49ad);if(this[_0x1e4763(0x1f8)]['unref'])this[_0x1e4763(0x1f8)][_0x1e4763(0x181)]();}}class _0x2ca7e9{constructor(_0x43e888,{namespace:_0x397825,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x15f8db=_0xacead1;this[_0x15f8db(0x1c9)]=_0x43e888,this[_0x15f8db(0x2e0)]=_0x397825,this[_0x15f8db(0x1aa)]=ttlMs,this[_0x15f8db(0x141)]=heartbeatMs,this[_0x15f8db(0x2e3)]=null;}[_0xacead1(0x16f)](){const _0x5d3a4b=_0xacead1;return!this['_lockDb']&&(this[_0x5d3a4b(0x2e3)]=this[_0x5d3a4b(0x1c9)][_0x5d3a4b(0x2b7)](_0x3bed41,{'dupSort':![]})),this[_0x5d3a4b(0x2e3)];}[_0xacead1(0xae)](){const _0xdd5ed3=_0xacead1;return!this['_wantDbHandle']&&(this[_0xdd5ed3(0x13b)]=this[_0xdd5ed3(0x1c9)][_0xdd5ed3(0x2b7)](_0x3bed41+_0xdd5ed3(0x277),{'dupSort':![]})),this[_0xdd5ed3(0x13b)];}[_0xacead1(0xc5)](_0x363b00){const _0x525d1c=_0xacead1;return this[_0x525d1c(0x2e0)]+':'+_0x363b00;}[_0xacead1(0x175)](_0x5d4599){const _0xa723d0=_0xacead1;try{_0x44b48a?this[_0xa723d0(0xae)]()[_0xa723d0(0xbc)](this['_key'](_0x5d4599),Date[_0xa723d0(0x219)]()):this[_0xa723d0(0xae)]()[_0xa723d0(0x1c0)](this[_0xa723d0(0xc5)](_0x5d4599),Date[_0xa723d0(0x219)]())?.[_0xa723d0(0x17c)]?.(()=>{});}catch{}}['isWanted'](_0xc9fc73,_0x1a97f8=0x3e8){const _0x19d9d0=_0xacead1;try{const _0x2719ae=this[_0x19d9d0(0xae)]()[_0x19d9d0(0x195)](this['_key'](_0xc9fc73));return typeof _0x2719ae==='number'&&Date['now']()-_0x2719ae<_0x1a97f8;}catch{return![];}}[_0xacead1(0x297)](_0x4827fa){const _0x26531b=_0xacead1,_0x375a0f=_0x4827fa[_0x26531b(0x11c)]??_0x4827fa[_0x26531b(0x1d0)];return _0x375a0f+_0x4827fa[_0x26531b(0x1aa)]<Date[_0x26531b(0x219)]();}static[_0xacead1(0x16b)](_0xc94f9a){const _0xacf3c2=_0xacead1,_0x581a69=_0xc94f9a?.['holder'];if(!_0x581a69||typeof _0x581a69[_0xacf3c2(0x2af)]!=='number')return![];if(_0x581a69[_0xacf3c2(0x270)]!==_0x435b9c[_0xacf3c2(0x270)]())return![];if(_0x581a69[_0xacf3c2(0x2af)]===process['pid'])return![];try{return process[_0xacf3c2(0x1ff)](_0x581a69[_0xacf3c2(0x2af)],0x0),![];}catch(_0x551029){return _0x551029[_0xacf3c2(0x163)]===_0xacf3c2(0xbb);}}async[_0xacead1(0x1c5)](_0x16b623,_0x451e72={},_0x8c8a5b={}){const _0x26f2e2=_0xacead1,_0x26b428=this[_0x26f2e2(0xc5)](_0x16b623),_0x404224=_0x8c8a5b[_0x26f2e2(0x1aa)]??this[_0x26f2e2(0x1aa)],_0x1b6974=Date['now'](),_0x317635={'holder':{'pid':process[_0x26f2e2(0x2af)],'hostname':_0x435b9c[_0x26f2e2(0x270)](),..._0x451e72},'acquiredAt':_0x1b6974,'updatedAt':_0x1b6974,'ttlMs':_0x404224};let _0x56fad8=![],_0x50326f=null;try{const _0x3a3bae=()=>{const _0x4b7964=_0x26f2e2,_0x14053d=this[_0x4b7964(0x16f)]()[_0x4b7964(0x195)](_0x26b428);if(_0x14053d&&!this[_0x4b7964(0x297)](_0x14053d)&&!_0x2ca7e9[_0x4b7964(0x16b)](_0x14053d)){const _0x1fd16e=_0x451e72['processorId']!=null&&_0x14053d[_0x4b7964(0x280)][_0x4b7964(0x2af)]===process[_0x4b7964(0x2af)]&&_0x14053d[_0x4b7964(0x280)]['processorId']===_0x451e72[_0x4b7964(0x160)];if(!_0x1fd16e){_0x56fad8=![],_0x50326f=_0x14053d;return;}_0x317635[_0x4b7964(0x1d0)]<=_0x14053d[_0x4b7964(0x1d0)]&&(_0x317635[_0x4b7964(0x1d0)]=_0x14053d[_0x4b7964(0x1d0)]+0x1,_0x317635[_0x4b7964(0x11c)]=_0x317635[_0x4b7964(0x1d0)]);}this[_0x4b7964(0x16f)]()['put'](_0x26b428,_0x317635),_0x56fad8=!![],_0x50326f=_0x317635;};if(_0x44b48a)this['_db']()['transactionSync'](_0x3a3bae);else await this[_0x26f2e2(0x16f)]()[_0x26f2e2(0x136)](_0x3a3bae);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x56fad8)return{'acquired':![],'handle':null,'current':_0x50326f};const _0x6dfea8=new _0x38dbb6(this,_0x26b428,_0x317635[_0x26f2e2(0x1d0)]);return _0x6dfea8['_startHeartbeat'](_0x404224,this['heartbeatMs']),{'acquired':!![],'handle':_0x6dfea8,'current':_0x50326f};}[_0xacead1(0x1b9)](_0x2b8f51){const _0x42a00d=_0xacead1;try{return this[_0x42a00d(0x16f)]()[_0x42a00d(0x195)](this[_0x42a00d(0xc5)](_0x2b8f51))??null;}catch{return null;}}[_0xacead1(0xc3)](){const _0x2ab29d=_0xacead1,_0x29e1a3=this[_0x2ab29d(0x2e0)]+':',_0x3cb758=[];try{for(const {key:_0x5f94c1,value:_0x5cfea2}of this[_0x2ab29d(0x16f)]()[_0x2ab29d(0x27d)]({'start':_0x29e1a3,'end':_0x29e1a3+'\xff'})){typeof _0x5f94c1===_0x2ab29d(0x24d)&&_0x5f94c1[_0x2ab29d(0x1f1)](_0x29e1a3)&&_0x3cb758[_0x2ab29d(0x2c1)]({'id':_0x5f94c1[_0x2ab29d(0x1c3)](_0x29e1a3[_0x2ab29d(0x1c4)]),'entry':_0x5cfea2});}}catch{}return _0x3cb758;}static[_0xacead1(0x1ec)](_0x3196fb){const _0x41875c=_0xacead1,_0x1c5ed3=[];try{const _0x17a06c=_0x3196fb[_0x41875c(0x2b7)](_0x3bed41,{'dupSort':![]});for(const {key:_0x163d84,value:_0x31154e}of _0x17a06c[_0x41875c(0x27d)]({})){if(typeof _0x163d84!==_0x41875c(0x24d))continue;const _0x2e8b06=_0x163d84[_0x41875c(0x2a3)](':');if(_0x2e8b06<0x1)continue;_0x1c5ed3[_0x41875c(0x2c1)]({'namespace':_0x163d84[_0x41875c(0x1c3)](0x0,_0x2e8b06),'id':_0x163d84[_0x41875c(0x1c3)](_0x2e8b06+0x1),'entry':_0x31154e});}}catch{}return _0x1c5ed3;}}return okdbLock={'OKDBLock':_0x2ca7e9},okdbLock;}var version='2.3.2',require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x4779c3=_0x74f0a9;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x2d0bfc=require$$0$3,_0x1b3070=require$$1$1,_0x47ce0f=require$$2,{LOOP:_0x3cd62f}=requireOkdbLoopMonitor(),{OKDBLock:_0x1e5cb6}=requireOkdbLock(),{SYNC_COMMITS:_0x2c6821}=requireOkdbWriter(),_0x1359c9=_0x4779c3(0xce),_0x341fee=_0x4779c3(0x1be),_0x257a11='~processes:desired',_0x38d988=_0x4779c3(0x25e),_0x5d03f6=(_0xbb77aa,_0x476696)=>_0xbb77aa+':'+_0x476696,_0x2516a2=(_0x58a4c9,_0x104e42)=>_0x58a4c9+'::'+_0x104e42,_0x1a1470=(_0xaa0fc3,_0x5efc21)=>_0xaa0fc3+'/'+_0x5efc21,_0x5ea47f=(_0x30c801,_0x4a3567)=>_0x30c801+'#'+_0x4a3567,_0x2017b5=_0x23da81=>{const _0x1345d1=_0x4779c3;if(_0x23da81?.['processKey'])return _0x23da81['processKey'];const _0x2042b5=_0x23da81?.[_0x1345d1(0x2c7)];return typeof _0x2042b5===_0x1345d1(0x24d)&&_0x2042b5['includes']('#')?_0x2042b5[_0x1345d1(0x1c3)](0x0,_0x2042b5[_0x1345d1(0x2a3)]('#')):_0x2042b5;},_0x5e18a7=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x140074=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x24b71d=_0x5e18a7*0x3,_0x261f92=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math['max'](0x927c0,_0x24b71d*0x14),_0x5dc771=[_0x4779c3(0xc8),_0x4779c3(0x121),_0x4779c3(0x1a2),_0x4779c3(0xc9),_0x4779c3(0x13e),_0x4779c3(0x14f)];let _0x54bcf0=null;function _0x1a95fa(){const _0x35150a=_0x4779c3;if(_0x54bcf0==null)_0x54bcf0=Math['round']((Date[_0x35150a(0x219)]()-process[_0x35150a(0x25d)]()*0x3e8)/0x3e8)*0x3e8;return _0x54bcf0;}function _0x10c631(_0x3a551e){const _0x30c2fd=_0x4779c3;if(process.env.OKDB_PROCESS_KILL===_0x30c2fd(0x193))return![];if(_0x3a551e?.[_0x30c2fd(0x13a)]?.[_0x30c2fd(0x182)]&&typeof _0x3a551e['options'][_0x30c2fd(0x182)]===_0x30c2fd(0x112)&&_0x3a551e[_0x30c2fd(0x13a)][_0x30c2fd(0x182)][_0x30c2fd(0x1ff)]===![])return![];return!![];}function _0xed25af(_0x5b3046,_0x5cd169){const _0x421d55=_0x4779c3,_0x24163a=!!_0x5cd169?.['processors'];switch(_0x5b3046){case'primary':return{'controllable':_0x24163a,'decommissionable':![],'killable':!![],'killConfirm':_0x421d55(0x239)};case _0x421d55(0x2b3):case _0x421d55(0x14a):return{'controllable':_0x24163a,'decommissionable':![],'killable':!![],'killConfirm':_0x421d55(0x23f)};case _0x421d55(0x10a):return{'controllable':![],'decommissionable':![],'killable':![]};case'http-server':case'queue-worker':case _0x421d55(0x16a):case _0x421d55(0x1b8):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x421d55(0x194)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x14bf54{constructor(_0x242415){const _0x2a31ff=_0x4779c3;this['okdb']=_0x242415,this['_statusEnv']=null,this[_0x2a31ff(0xe3)]=null,this['_desiredOverlay']=new Map(),this[_0x2a31ff(0x1ae)]=null,this[_0x2a31ff(0x166)]=![],this[_0x2a31ff(0xa8)]=![],this[_0x2a31ff(0x110)]=_0x1a95fa(),this[_0x2a31ff(0x1ed)]=_0x5d03f6(process[_0x2a31ff(0x2af)],this['_processStartedAt']),this[_0x2a31ff(0x2d6)]=_0x47ce0f[_0x2a31ff(0xec)]()[_0x2a31ff(0x1c3)](0x0,0x8),this[_0x2a31ff(0x29e)]=_0x5ea47f(this[_0x2a31ff(0x1ed)],this[_0x2a31ff(0x2d6)]),this[_0x2a31ff(0x2b2)]=Date[_0x2a31ff(0x219)](),this['_kind']=null,this[_0x2a31ff(0x119)]=null,this['_listenAddr']=null,this['_hbTimer']=null,this[_0x2a31ff(0xe2)]=null,this[_0x2a31ff(0x26d)]=null,this[_0x2a31ff(0xfc)]=0x0,this[_0x2a31ff(0x296)]={},this[_0x2a31ff(0x227)]=new Map(),this['_lastCpuUsage']=process[_0x2a31ff(0x191)](),this[_0x2a31ff(0x10e)]=Date[_0x2a31ff(0x219)](),this[_0x2a31ff(0xcc)]=0x0,this[_0x2a31ff(0x18b)]=new Map();}get[_0x4779c3(0x183)](){return this['_selfKey'];}get[_0x4779c3(0xfd)](){return this['_rowKey'];}[_0x4779c3(0x197)](_0x21ed35,_0x1d0533){const _0x3a9f6b=_0x4779c3,_0x5eee0f=_0xed25af(_0x21ed35,_0x1d0533);if(_0x5eee0f[_0x3a9f6b(0x299)]&&!_0x10c631(this[_0x3a9f6b(0x217)]))return{..._0x5eee0f,'killable':![],'killConfirm':undefined};return _0x5eee0f;}[_0x4779c3(0xdf)](){const _0x2bd220=_0x4779c3;return!!this[_0x2bd220(0x14d)];}[_0x4779c3(0xac)](_0x44c2f3){Object['assign'](this['_ownMeta'],_0x44c2f3||{});}[_0x4779c3(0xf8)](_0xb66fbd){const _0x48f086=_0x4779c3;if(_0xb66fbd)this[_0x48f086(0x154)]=_0xb66fbd;}['register'](_0x258926={}){const _0x5cacce=_0x4779c3;return this['okdb'][_0x5cacce(0x23c)](_0x258926);}[_0x4779c3(0x28b)](){const _0x3424e4=_0x4779c3,_0x328142={};let _0x1f1320=0x0,_0x3a8e55=0x0;const _0x14c372=new Set();for(const _0x15453f of this['listNodes']()){_0x3a8e55++;const _0x3430d9=_0x15453f[_0x3424e4(0xf4)];if(!_0x3430d9)continue;if(_0x3430d9[_0x3424e4(0x15c)])_0x1f1320++;for(const _0x5eab94 of _0x3430d9[_0x3424e4(0x124)]||[]){if(![_0x3424e4(0x116),_0x3424e4(0x13d)][_0x3424e4(0x2a9)](_0x5eab94[_0x3424e4(0xca)]))continue;(_0x5eab94[_0x3424e4(0x2a0)]===_0x3424e4(0x125)||_0x5eab94['state']===_0x3424e4(0x298))&&_0x5eab94[_0x3424e4(0x126)]&&_0x14c372['add']((_0x5eab94[_0x3424e4(0x134)]||'default')+':'+_0x5eab94[_0x3424e4(0x126)]);const _0x258848=_0x5eab94[_0x3424e4(0x134)]||_0x3424e4(0x2a6);(_0x328142[_0x258848]||=[])[_0x3424e4(0x2c1)]({..._0x5eab94,'env':_0x258848,'owner':{'pid':_0x15453f[_0x3424e4(0x2af)]??null,'kind':_0x15453f[_0x3424e4(0x258)]??null}});}}for(const [_0x2ec3e2,_0x568cbe]of Object['entries'](_0x328142)){for(const _0x163220 of _0x568cbe){if(_0x163220[_0x3424e4(0xca)]===_0x3424e4(0x116)&&!_0x163220[_0x3424e4(0x232)]){const _0x4d43e4=_0x2ec3e2+':'+(_0x163220[_0x3424e4(0x126)]??'');if(!_0x14c372[_0x3424e4(0x1cd)](_0x4d43e4))_0x163220[_0x3424e4(0x25b)]=!![];}}}return{'envs':_0x328142,'policy':null,'participation':{'participating':_0x1f1320,'total':_0x3a8e55},'source':_0x3424e4(0x26f)};}[_0x4779c3(0x16d)](){const _0x40c140=_0x4779c3,_0xeb5e9=_0x2040ae=>{const _0x1be4d2=_0x30d0;if(_0x2040ae[_0x1be4d2(0x2a0)]===_0x1be4d2(0x125)||_0x2040ae['state']===_0x1be4d2(0x298)||_0x2040ae['state']===_0x1be4d2(0x192))return 0x3;if(_0x2040ae[_0x1be4d2(0x232)])return 0x1;return 0x2;},_0x374f62=new Map();for(const _0x59020b of this['listNodes']()){for(const _0x24065a of _0x59020b[_0x40c140(0xf4)]?.['processors']||[]){const _0x2127c9={..._0x24065a,'owner':{'pid':_0x59020b['pid']??null,'kind':_0x59020b['kind']??null,'host':_0x59020b[_0x40c140(0x127)]??null}},_0x438f57=_0x24065a[_0x40c140(0xca)]===_0x40c140(0x116)?_0x40c140(0x1da)+(_0x24065a[_0x40c140(0x134)]??'')+'::'+(_0x24065a[_0x40c140(0x126)]??_0x24065a['type']??_0x24065a['id']):_0x40c140(0x207)+(_0x59020b[_0x40c140(0x2c7)]??_0x59020b[_0x40c140(0x1f7)]??'')+'::'+(_0x24065a[_0x40c140(0x134)]??'')+'::'+_0x24065a['id'],_0x5b7601=_0x374f62[_0x40c140(0x195)](_0x438f57);if(!_0x5b7601||_0xeb5e9(_0x2127c9)>_0xeb5e9(_0x5b7601))_0x374f62['set'](_0x438f57,_0x2127c9);}}return[..._0x374f62['values']()];}[_0x4779c3(0x1a5)](){const _0x1cd2aa=_0x4779c3,_0xeed1b6=Date['now'](),_0x38ab7f=this[_0x1cd2aa(0x275)](),_0x335ccf=_0x4fbaec=>Math[_0x1cd2aa(0x244)](0x0,Math[_0x1cd2aa(0x2c9)]((_0xeed1b6-(_0x4fbaec[_0x1cd2aa(0x254)]||_0xeed1b6))/0x3e8)),_0x2fb6c3=_0x38ab7f['find'](_0x3d1198=>_0x3d1198[_0x1cd2aa(0x258)]==='primary'),_0x47004e=_0x38ab7f[_0x1cd2aa(0x2d5)](_0x44776a=>_0x44776a[_0x1cd2aa(0x258)]===_0x1cd2aa(0x1e1));if(_0x2fb6c3||_0x47004e['length'])return{'primary':_0x2fb6c3?{'pid':_0x2fb6c3[_0x1cd2aa(0x2af)],'uptime':_0x335ccf(_0x2fb6c3)}:null,'workers':_0x47004e[_0x1cd2aa(0x284)](_0x33fd92=>({'pid':_0x33fd92[_0x1cd2aa(0x2af)],'uptime':_0x335ccf(_0x33fd92)})),'workersConfigured':_0x2fb6c3?.['meta']?.[_0x1cd2aa(0xb4)]??_0x47004e[_0x1cd2aa(0x1c4)],'mode':_0x1cd2aa(0x1bc)};const _0x3c41a1=_0x38ab7f[_0x1cd2aa(0x14b)](_0x21fd4f=>_0x21fd4f[_0x1cd2aa(0x258)]==='cli'||_0x21fd4f[_0x1cd2aa(0x258)]==='standalone'||_0x21fd4f[_0x1cd2aa(0x258)]==='embedded'),_0xec7038=_0x3c41a1?{'pid':_0x3c41a1[_0x1cd2aa(0x2af)],'uptime':_0x335ccf(_0x3c41a1)}:{'pid':process[_0x1cd2aa(0x2af)],'uptime':Math[_0x1cd2aa(0x244)](0x0,Math[_0x1cd2aa(0x2c9)](process['uptime']()))};return{'primary':_0xec7038,'workers':[_0xec7038],'workersConfigured':0x1,'mode':_0x1cd2aa(0x116)};}[_0x4779c3(0x294)](){const _0x2ef482=_0x4779c3;return this[_0x2ef482(0x238)]();}['treeView'](){const _0x46720e=_0x4779c3,_0x5cfc99=new Map();for(const _0x5d740e of this[_0x46720e(0x238)]())_0x5cfc99['set'](_0x5d740e[_0x46720e(0x1f7)],{..._0x5d740e,'children':[]});const _0x58616a=[];for(const _0x4c2276 of _0x5cfc99[_0x46720e(0x251)]()){const _0x41966e=_0x4c2276[_0x46720e(0x20b)]?_0x5cfc99[_0x46720e(0x195)](_0x4c2276[_0x46720e(0x20b)]):null;if(_0x41966e&&_0x41966e!==_0x4c2276)_0x41966e[_0x46720e(0x11b)][_0x46720e(0x2c1)](_0x4c2276);else _0x58616a[_0x46720e(0x2c1)](_0x4c2276);}const _0x4296fd=(_0x2b13a7,_0x4a44f1)=>_0x2b13a7[_0x46720e(0x258)]===_0x4a44f1[_0x46720e(0x258)]?(_0x2b13a7[_0x46720e(0x2af)]||0x0)-(_0x4a44f1[_0x46720e(0x2af)]||0x0):(_0x2b13a7['kind']??'')<(_0x4a44f1['kind']??'')?-0x1:0x1,_0xb09ba=_0xcade0=>{const _0x1a44a1=_0x46720e;_0xcade0[_0x1a44a1(0x25a)](_0x4296fd);for(const _0xd728c6 of _0xcade0)if(_0xd728c6[_0x1a44a1(0x11b)][_0x1a44a1(0x1c4)])_0xb09ba(_0xd728c6['children']);};return _0xb09ba(_0x58616a),_0x58616a;}[_0x4779c3(0x21b)](_0x49e461){const _0x358832=_0x4779c3;return this[_0x358832(0x238)]()[_0x358832(0x14b)](_0x149c54=>_0x149c54[_0x358832(0x1f7)]===_0x49e461)??null;}['_groupByProcess'](_0x2f3877=Date[_0x4779c3(0x219)]()){const _0x44fa0a=_0x4779c3,_0x461589=new Map();for(const _0x511d56 of this[_0x44fa0a(0x275)]()){const _0x111feb=_0x2017b5(_0x511d56);let _0x15e462=_0x461589[_0x44fa0a(0x195)](_0x111feb);!_0x15e462&&(_0x15e462={'processKey':_0x111feb,'nodeKey':_0x111feb,'pid':_0x511d56[_0x44fa0a(0x2af)],'ppid':_0x511d56[_0x44fa0a(0x2b1)]??null,'host':_0x511d56[_0x44fa0a(0x127)]??null,'kind':_0x511d56[_0x44fa0a(0x258)],'role':null,'supervisorKey':_0x511d56['supervisorKey']??null,'slot':_0x511d56[_0x44fa0a(0x199)]??null,'slotKey':_0x511d56[_0x44fa0a(0x129)]??null,'caps':_0x511d56[_0x44fa0a(0x2aa)]??null,'lifecycle':_0x511d56[_0x44fa0a(0xb8)]??null,'uptime':Math[_0x44fa0a(0x244)](0x0,Math[_0x44fa0a(0x2c9)]((_0x2f3877-(_0x511d56[_0x44fa0a(0x254)]||_0x2f3877))/0x3e8)),'startedAt':_0x511d56[_0x44fa0a(0x254)]??null,'meta':_0x511d56['meta']??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x461589[_0x44fa0a(0x2bd)](_0x111feb,_0x15e462));_0x15e462[_0x44fa0a(0x178)][_0x44fa0a(0x2c1)]({'instanceId':_0x511d56[_0x44fa0a(0x202)]??null,'role':_0x511d56['role']??null,'listenAddr':_0x511d56['listenAddr']??null,'lifecycle':_0x511d56[_0x44fa0a(0xb8)]??null,'processing':_0x511d56['processing']??null});if(!_0x15e462['role']&&_0x511d56[_0x44fa0a(0x140)])_0x15e462['role']=_0x511d56[_0x44fa0a(0x140)];if(!_0x15e462[_0x44fa0a(0x130)]&&_0x511d56[_0x44fa0a(0x130)])_0x15e462[_0x44fa0a(0x130)]=_0x511d56[_0x44fa0a(0x130)];if(!_0x15e462['processing']&&_0x511d56[_0x44fa0a(0xf4)])_0x15e462[_0x44fa0a(0xf4)]=_0x511d56[_0x44fa0a(0xf4)];if(!_0x15e462[_0x44fa0a(0x20e)]&&_0x511d56[_0x44fa0a(0x20e)])_0x15e462[_0x44fa0a(0x20e)]=_0x511d56[_0x44fa0a(0x20e)];if(!_0x15e462[_0x44fa0a(0x179)]&&_0x511d56[_0x44fa0a(0x179)])_0x15e462[_0x44fa0a(0x179)]=_0x511d56['singletonClaims'];if(_0x15e462[_0x44fa0a(0x2aa)]==null&&_0x511d56[_0x44fa0a(0x2aa)])_0x15e462[_0x44fa0a(0x2aa)]=_0x511d56['caps'];if(_0x511d56[_0x44fa0a(0x266)]&&(!_0x15e462[_0x44fa0a(0x266)]||(_0x511d56['stats']['at']??0x0)>(_0x15e462['stats']['at']??0x0)))_0x15e462[_0x44fa0a(0x266)]=_0x511d56['stats'];}return[..._0x461589[_0x44fa0a(0x251)]()];}['runtimeProcessesView'](){const _0x26deff=_0x4779c3,_0xc83056=[],_0x5ec3cf={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x41a097 of this[_0x26deff(0x238)]()){_0xc83056[_0x26deff(0x2c1)]({'processKey':_0x41a097['processKey'],'kind':_0x41a097[_0x26deff(0x258)],'pid':_0x41a097[_0x26deff(0x2af)],'supervisorKey':_0x41a097[_0x26deff(0x20b)],'meta':_0x41a097['meta']??null,'uptime':_0x41a097[_0x26deff(0x25d)],'stats':_0x41a097[_0x26deff(0x266)]??null}),_0x5ec3cf[_0x26deff(0x182)]++;if(_0x41a097[_0x26deff(0x266)]){_0x5ec3cf[_0x26deff(0x1ca)]+=_0x41a097[_0x26deff(0x266)][_0x26deff(0x1ca)]||0x0,_0x5ec3cf[_0x26deff(0xa9)]+=(_0x41a097[_0x26deff(0x266)][_0x26deff(0xa9)]||0x0)+(_0x41a097[_0x26deff(0x266)]['threads']?.['heapUsed']||0x0);const _0x966afe=_0x41a097[_0x26deff(0x266)][_0x26deff(0x263)];_0x966afe&&(_0x5ec3cf[_0x26deff(0x263)]['count']+=_0x966afe[_0x26deff(0x161)]||0x0,_0x5ec3cf['threads'][_0x26deff(0x228)]+=_0x966afe[_0x26deff(0x228)]||0x0,_0x5ec3cf[_0x26deff(0x263)][_0x26deff(0x249)]+=_0x966afe[_0x26deff(0x249)]||0x0);}}return{'totals':_0x5ec3cf,'nodes':_0xc83056};}async[_0x4779c3(0xd6)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x3b018e=_0x4779c3;this['_isWriter']=this[_0x3b018e(0x166)]||!!writer,this[_0x3b018e(0xa8)]=this[_0x3b018e(0xa8)]||!!reader,this[_0x3b018e(0x128)]=kind||this[_0x3b018e(0x128)]||(_0x1b3070[_0x3b018e(0xe5)]?_0x3b018e(0x1e1):'cli'),this[_0x3b018e(0x119)]=supervisorKey??this['_supervisorKey'],this[_0x3b018e(0x154)]=listenAddr??this[_0x3b018e(0x154)],this[_0x3b018e(0x2b5)](),await this[_0x3b018e(0x2a5)]();if(!writer&&!reader)return null;if(!this[_0x3b018e(0x14d)]){const _0x45b804=await this['okdb'][_0x3b018e(0x224)](_0x1359c9,{'sync':![],'durability':'fast'});await _0x45b804[_0x3b018e(0x1b6)](_0x341fee),this[_0x3b018e(0x14d)]=_0x45b804;}return this[_0x3b018e(0x14d)];}[_0x4779c3(0xbd)](){const _0x22fad8=_0x4779c3;return this[_0x22fad8(0x1f5)]!==this[_0x22fad8(0x14d)]&&(this['_nodeDbFor']=this[_0x22fad8(0x14d)],this[_0x22fad8(0x117)]=this['_statusEnv'][_0x22fad8(0x295)](_0x341fee)[_0x22fad8(0xf9)]),this[_0x22fad8(0x117)];}['_putRowAsync'](_0x15895a){const _0x10828b=_0x4779c3;if(_0x2c6821)return this[_0x10828b(0xbd)]()['putSync'](_0x15895a['nodeKey'],_0x15895a,0x1);const _0x5f20ec=this[_0x10828b(0xbd)]()[_0x10828b(0x1c0)](_0x15895a['nodeKey'],_0x15895a,0x1);if(_0x5f20ec&&typeof _0x5f20ec[_0x10828b(0x231)]===_0x10828b(0x226))_0x5f20ec['then'](undefined,()=>{});return _0x5f20ec;}[_0x4779c3(0x1db)](_0x4a99fd){const _0x4aa8e3=_0x4779c3;return this[_0x4aa8e3(0xbd)]()[_0x4aa8e3(0xbc)](_0x4a99fd[_0x4aa8e3(0x2c7)],_0x4a99fd,0x1);}[_0x4779c3(0x22f)](_0x386faf){const _0x1200b7=_0x4779c3;if(_0x2c6821)try{return this['_nodeDb']()[_0x1200b7(0x14c)](_0x386faf);}catch{return![];}const _0x567249=this[_0x1200b7(0xbd)]()[_0x1200b7(0x12a)](_0x386faf);if(_0x567249&&typeof _0x567249[_0x1200b7(0x231)]===_0x1200b7(0x226))_0x567249[_0x1200b7(0x231)](undefined,()=>{});return _0x567249;}async[_0x4779c3(0x1ac)](_0x22124d){const _0x2fc252=_0x4779c3;if(!this[_0x2fc252(0x14d)]||!this[_0x2fc252(0x166)]||!_0x22124d?.[_0x2fc252(0x2c7)])return;return this[_0x2fc252(0x223)](_0x22124d);}async[_0x4779c3(0xf0)](_0x1eb063){const _0x193631=_0x4779c3;if(!this[_0x193631(0x14d)]||!this[_0x193631(0x166)]||!_0x1eb063)return;const _0x373ad9=_0x1eb063[_0x193631(0x2a9)]('#'),_0x202ea1=[];for(const {key:_0x5d289e}of this[_0x193631(0x14d)][_0x193631(0x27d)](_0x341fee)){if(_0x5d289e===_0x1eb063||!_0x373ad9&&typeof _0x5d289e===_0x193631(0x24d)&&_0x5d289e[_0x193631(0x1f1)](_0x1eb063+'#'))_0x202ea1[_0x193631(0x2c1)](_0x5d289e);}for(const _0xcde788 of _0x202ea1){try{this['_nodeDb']()['removeSync'](_0xcde788);}catch{}}}['_nodeDead'](_0x5ae3d2){const _0x1db41a=_0x4779c3;if(typeof _0x5ae3d2?.[_0x1db41a(0x2af)]!==_0x1db41a(0xbf))return![];if(_0x5ae3d2[_0x1db41a(0x127)]!==_0x2d0bfc[_0x1db41a(0x270)]())return![];if(_0x5ae3d2[_0x1db41a(0x2af)]===process[_0x1db41a(0x2af)])return![];if(_0x5ae3d2[_0x1db41a(0x2e4)]!=null&&_0x5ae3d2[_0x1db41a(0x2e4)]<Date['now']()-_0x261f92)return!![];try{return process[_0x1db41a(0x1ff)](_0x5ae3d2[_0x1db41a(0x2af)],0x0),![];}catch(_0x2241eb){return _0x2241eb[_0x1db41a(0x163)]===_0x1db41a(0xbb);}}['listNodes'](){const _0x569199=_0x4779c3;if(!this[_0x569199(0x14d)])return[];try{this[_0x569199(0x14d)]['db']?.[_0x569199(0x24f)]?.();}catch{}const _0x345dc7=Date['now'](),_0xa6e7cc=_0x2d0bfc[_0x569199(0x270)](),_0x28019e=[];for(const {value:_0x2f680d}of this['_statusEnv']['getRange'](_0x341fee)){if(!_0x2f680d)continue;let _0x377d8f=null;_0x2f680d[_0x569199(0x127)]===_0xa6e7cc&&typeof _0x2f680d[_0x569199(0x2af)]===_0x569199(0xbf)&&(_0x377d8f=!this[_0x569199(0xbe)](_0x2f680d));if(_0x377d8f===![])continue;const _0x38ae8f=_0x2f680d['expiresAt']==null||_0x2f680d[_0x569199(0x2e4)]>=_0x345dc7;if(_0x377d8f===!![]||_0x38ae8f)_0x28019e['push'](_0x2f680d);}return _0x28019e;}async['reap'](_0x2e4aaf=0x0){const _0x52dd61=_0x4779c3;if(!this['_statusEnv']||!this[_0x52dd61(0x166)])return;const _0x12654c=Date['now']()-_0x2e4aaf,_0x2c790a=new Set(),_0x58d4d6=[],_0x5b17f6=_0x2d0bfc[_0x52dd61(0x270)](),_0x52ab6f=require$$6[_0x52dd61(0x26c)];for(const {key:_0x1361e2,value:_0x582309}of this[_0x52dd61(0x14d)][_0x52dd61(0x27d)](_0x341fee)){if(!_0x582309)continue;const _0x4acc05=_0x582309[_0x52dd61(0x127)]===_0x5b17f6&&typeof _0x582309[_0x52dd61(0x2af)]===_0x52dd61(0xbf),_0xf1eb9=_0x4acc05?this['_nodeDead'](_0x582309):_0x582309[_0x52dd61(0x2e4)]!=null&&_0x582309['expiresAt']<_0x12654c;if(_0xf1eb9)_0x58d4d6[_0x52dd61(0x2c1)](_0x1361e2);else{_0x2c790a[_0x52dd61(0x156)](_0x2017b5(_0x582309)??_0x1361e2);if(_0x582309[_0x52dd61(0x26c)]&&_0x582309['version']!==_0x52ab6f){if(!this[_0x52dd61(0xa6)])this['_versionSkewWarned']=new Set();!this[_0x52dd61(0xa6)]['has'](_0x582309[_0x52dd61(0x26c)])&&(this[_0x52dd61(0xa6)][_0x52dd61(0x156)](_0x582309[_0x52dd61(0x26c)]),this[_0x52dd61(0x217)][_0x52dd61(0x201)]?.[_0x52dd61(0x1dd)]?.('process\x20'+(_0x582309[_0x52dd61(0x2af)]??'?')+_0x52dd61(0x2a2)+_0x582309['version']+_0x52dd61(0x2b9)+_0x52ab6f+_0x52dd61(0x25c)+_0x52dd61(0x289),{'feature':_0x52dd61(0xe7)}));}}}for(const _0x32a009 of _0x58d4d6)this[_0x52dd61(0x22f)](_0x32a009);if(this['_ensureDesired']()){const _0x30d07f=[];for(const {key:_0x10c8af}of this[_0x52dd61(0x19b)](_0x52dd61(0x1be))){if(!_0x2c790a['has'](_0x10c8af)){if(_0x2c6821)try{this[_0x52dd61(0xe3)][_0x52dd61(0x14c)](_0x52dd61(0x2ab)+_0x10c8af);}catch{}else _0x30d07f[_0x52dd61(0x2c1)](this['_desired']['remove'](_0x52dd61(0x2ab)+_0x10c8af));}}if(_0x30d07f[_0x52dd61(0x1c4)])await Promise['allSettled'](_0x30d07f);}}[_0x4779c3(0xf6)](_0x3c8694=null){const _0x18d3cf=_0x4779c3;if(this[_0x18d3cf(0x1b3)])return;if(!this[_0x18d3cf(0x166)]||!this[_0x18d3cf(0x14d)]){this[_0x18d3cf(0x217)]?.[_0x18d3cf(0x201)]?.['warn']?.(_0x18d3cf(0xde)+this['_isWriter']+_0x18d3cf(0x291)+!!this[_0x18d3cf(0x14d)]+_0x18d3cf(0x139),{'feature':_0x18d3cf(0x182)});return;}this[_0x18d3cf(0x26d)]=_0x3c8694,this[_0x18d3cf(0xe2)]=()=>this['_maybePublish']();for(const _0x1a9d08 of _0x5dc771)this[_0x18d3cf(0x217)][_0x18d3cf(0x21e)]['on'](_0x1a9d08,this[_0x18d3cf(0xe2)]);this[_0x18d3cf(0x29a)]();const _0x334503=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x5e18a7;this['_hbTimer']=setInterval(()=>{const _0x498aba=_0x18d3cf;if(this[_0x498aba(0x26d)])try{this['_onTick']();}catch{}this['_publishNow'](),this[_0x498aba(0x27e)]()[_0x498aba(0x17c)](()=>{});},_0x334503);if(this[_0x18d3cf(0x1b3)][_0x18d3cf(0x181)])this[_0x18d3cf(0x1b3)][_0x18d3cf(0x181)]();}[_0x4779c3(0x274)](){const _0x588e7f=_0x4779c3;if(!this[_0x588e7f(0x166)]||!this[_0x588e7f(0x14d)])return;if(Date[_0x588e7f(0x219)]()-this['_lastPublishAt']<_0x140074)return;this[_0x588e7f(0x29a)]();}[_0x4779c3(0x29a)](){const _0x5c848d=_0x4779c3;if(!this[_0x5c848d(0x166)]||!this['_statusEnv'])return;this[_0x5c848d(0xfc)]=Date[_0x5c848d(0x219)]();try{const _0x4d243f=[this['_buildOwnRow']()];for(const _0x56b534 of this[_0x5c848d(0x227)][_0x5c848d(0x251)]())_0x4d243f[_0x5c848d(0x2c1)](this['_buildChildRow'](_0x56b534));const _0x34ad25=_0x3cd62f[_0x5c848d(0x28e)]?_0x3cd62f[_0x5c848d(0x219)]():0x0;for(const _0x58353d of _0x4d243f){try{this[_0x5c848d(0x1db)](_0x58353d),this['_publishFailWarned']=![];}catch(_0x1cb595){!this[_0x5c848d(0x152)]&&(this[_0x5c848d(0x152)]=!![],this[_0x5c848d(0x217)]?.[_0x5c848d(0x201)]?.[_0x5c848d(0x1dd)]?.(_0x5c848d(0x115)+_0x1cb595[_0x5c848d(0x262)],{'feature':'processes'}));}}if(_0x3cd62f[_0x5c848d(0x28e)])_0x3cd62f[_0x5c848d(0x220)](_0x5c848d(0x2ac),_0x3cd62f[_0x5c848d(0x219)]()-_0x34ad25,_0x5c848d(0x1fa)+_0x4d243f['length']+_0x5c848d(0x155));}catch(_0x131771){!this[_0x5c848d(0x152)]&&(this['_publishFailWarned']=!![],this[_0x5c848d(0x217)]?.[_0x5c848d(0x201)]?.[_0x5c848d(0x1dd)]?.(_0x5c848d(0x115)+_0x131771[_0x5c848d(0x262)],{'feature':'processes'}));}}async[_0x4779c3(0x1fc)](){const _0x28aade=_0x4779c3;if(this[_0x28aade(0xe2)]){for(const _0x3c975c of _0x5dc771){try{this[_0x28aade(0x217)][_0x28aade(0x21e)]['off'](_0x3c975c,this[_0x28aade(0xe2)]);}catch{}}this[_0x28aade(0xe2)]=null;}this[_0x28aade(0x1b3)]&&(clearInterval(this[_0x28aade(0x1b3)]),this['_hbTimer']=null);try{if(this[_0x28aade(0x14d)]&&this['_isWriter'])await this[_0x28aade(0xf0)](this[_0x28aade(0x29e)]);}catch{}}async[_0x4779c3(0x162)](){const _0x3e87b4=_0x4779c3;if(!this[_0x3e87b4(0x14d)]||!this[_0x3e87b4(0x166)])return;try{await this[_0x3e87b4(0xf0)](this[_0x3e87b4(0x29e)]);}catch{}try{const _0x12df90=[];for(const {value:_0x1d17e}of this['_statusEnv'][_0x3e87b4(0x27d)](_0x341fee)){if(_0x1d17e?.[_0x3e87b4(0x2b1)]===process['pid']&&_0x1d17e[_0x3e87b4(0x2c7)])_0x12df90[_0x3e87b4(0x2c1)](_0x1d17e[_0x3e87b4(0x2c7)]);}for(const _0x92df60 of _0x12df90){try{await this['removeNode'](_0x92df60);}catch{}}}catch{}}async[_0x4779c3(0x1ee)](){const _0x113f18=_0x4779c3;return this[_0x113f18(0x1ac)](this[_0x113f18(0x2a7)]());}async['publishChildRow'](_0x157a9f){const _0x4183d5=_0x4779c3;if(!this[_0x4183d5(0x14d)]||!this[_0x4183d5(0x166)])return;return this['putNode'](this['_buildChildRow'](_0x157a9f));}[_0x4779c3(0x1bd)]({pid:_0xb5bf3b,startedAt:_0x563cf8,kind:_0x4d5b36,supervisorKey:_0x1590d8,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x4779c3(0x17f),meta:meta=null,stats:stats=null}){const _0x15cd7f=_0x4779c3,_0xb6f2c=Date['now'](),_0x216be1=_0x5d03f6(_0xb5bf3b,_0x563cf8);return{'nodeKey':_0x5ea47f(_0x216be1,'0'),'processKey':_0x216be1,'instanceId':'0','pid':_0xb5bf3b,'startedAt':_0x563cf8,'ppid':process[_0x15cd7f(0x2af)],'host':_0x2d0bfc[_0x15cd7f(0x270)](),'supervisorKey':_0x1590d8,'slot':slot,'slotKey':slotKey,'kind':_0x4d5b36,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0xb6f2c,'expiresAt':_0xb6f2c+_0x24b71d,'caps':this[_0x15cd7f(0x197)](_0x4d5b36,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x4779c3(0x247)](_0x105e5b){const _0x386068=_0x4779c3;if(!_0x105e5b?.[_0x386068(0x2af)])return null;const _0x5aa8a1=_0x5d03f6(_0x105e5b[_0x386068(0x2af)],_0x105e5b[_0x386068(0x254)]);this['_children'][_0x386068(0x2bd)](_0x5aa8a1,{..._0x105e5b,'supervisorKey':_0x105e5b[_0x386068(0x20b)]??this[_0x386068(0x1ed)]});if(this[_0x386068(0x166)])await this['publishChildRow'](this[_0x386068(0x227)]['get'](_0x5aa8a1))[_0x386068(0x17c)]?.(()=>{});return _0x5aa8a1;}['removeSupervisedChild'](_0x2fce76){const _0x22ef62=_0x4779c3;if(!_0x2fce76)return;return this[_0x22ef62(0x227)][_0x22ef62(0x28d)](_0x2fce76),this[_0x22ef62(0xf0)](_0x2fce76);}['_sampleOwnStats'](){const _0x1947e0=_0x4779c3,_0x473d21=Date[_0x1947e0(0x219)](),_0x2df8ae=process[_0x1947e0(0x191)](),_0xe66026=(_0x473d21-this[_0x1947e0(0x10e)])*0x3e8;if(_0xe66026>=0x3d090){const _0x1f4ac5=_0x2df8ae[_0x1947e0(0x1e0)]-this[_0x1947e0(0x19c)][_0x1947e0(0x1e0)]+(_0x2df8ae[_0x1947e0(0x24b)]-this['_lastCpuUsage'][_0x1947e0(0x24b)]),_0x4a355f=_0x2d0bfc['cpus']()['length']||0x1;this[_0x1947e0(0xcc)]=Math[_0x1947e0(0x203)](0x64,Math[_0x1947e0(0x2c9)](_0x1f4ac5/(_0xe66026*_0x4a355f)*0x64)),this[_0x1947e0(0x2d8)]=Math[_0x1947e0(0x2c9)](_0xe66026/0x3e8),this['_lastCpuUsage']=_0x2df8ae,this['_lastCpuAt']=_0x473d21;}const _0x4aa5d7=process[_0x1947e0(0x144)](),_0x45039=this[_0x1947e0(0x18b)]['size'];let _0x30128a=0x0;if(_0x45039>0x0){const _0x355269=[this[_0x1947e0(0x217)],...this[_0x1947e0(0x217)][_0x1947e0(0x267)]?.[_0x1947e0(0x251)]?.()??[]];for(const _0x1b83e1 of _0x355269){const _0x72a96b=_0x1b83e1['functions']?.[_0x1947e0(0x28c)];if(_0x72a96b)_0x30128a+=_0x72a96b[_0x1947e0(0xf1)]['busy'];}}let _0x5fd7e0=null;const _0x186e62=_0x45039;if(_0x186e62>0x0){let _0x54fa3f=0x0;for(const _0x40fb76 of this[_0x1947e0(0x18b)]['values']())_0x54fa3f+=_0x40fb76['heapUsed']||0x0;_0x5fd7e0={'count':_0x186e62,'heapUsed':_0x54fa3f,'sandbox':_0x45039,'busy':_0x30128a};}return{'rss':_0x4aa5d7[_0x1947e0(0x1ca)],'heapUsed':_0x4aa5d7['heapUsed'],'heapTotal':_0x4aa5d7[_0x1947e0(0x1bb)],'external':_0x4aa5d7['external'],'cpuPct':this[_0x1947e0(0xcc)],'cpuWindowMs':this[_0x1947e0(0x2d8)]??null,'threads':_0x5fd7e0,'at':_0x473d21};}[_0x4779c3(0x1c7)](_0x5e93e6,_0x229558){const _0x3b5f25=_0x4779c3;if(!_0x5e93e6||!_0x229558)return;this[_0x3b5f25(0x18b)]['set'](_0x5e93e6,_0x229558);}['clearThreadStats'](_0x459264){const _0x5e775e=_0x4779c3;this[_0x5e775e(0x18b)][_0x5e775e(0x28d)](_0x459264);}[_0x4779c3(0x151)](_0x1bc93d,_0x18e72f,_0x5478c6=undefined){const _0x3e8710=_0x4779c3,_0x4bad2e=this[_0x3e8710(0x227)][_0x3e8710(0x195)](_0x1bc93d);if(!_0x4bad2e||!_0x18e72f)return;if(_0x5478c6!==undefined)_0x4bad2e[_0x3e8710(0xf4)]=_0x5478c6;_0x4bad2e['stats']={'rss':_0x18e72f[_0x3e8710(0x1ca)]??null,'heapUsed':_0x18e72f['heapUsed']??null,'heapTotal':_0x18e72f[_0x3e8710(0x1bb)]??null,'external':_0x18e72f[_0x3e8710(0xd9)]??null,'cpuPct':_0x18e72f['cpuPct']??null,'cpuWindowMs':_0x18e72f[_0x3e8710(0x190)]??null,'threads':_0x18e72f[_0x3e8710(0x263)]??null,'claims':_0x18e72f[_0x3e8710(0x25f)]??null,'envsOpen':_0x18e72f[_0x3e8710(0x165)]??null,'at':Date['now']()};}['_buildOwnRow'](){const _0x568da6=_0x4779c3,_0x45863e=Date['now'](),_0x5379fd=this['okdb'][_0x568da6(0xd4)]||{},_0x500df2=this[_0x568da6(0x128)]||_0x568da6(0x2b3);return{'nodeKey':this['_rowKey'],'processKey':this[_0x568da6(0x1ed)],'instanceId':this[_0x568da6(0x2d6)],'pid':process[_0x568da6(0x2af)],'startedAt':this[_0x568da6(0x110)],'instanceStartedAt':this[_0x568da6(0x2b2)],'ppid':typeof process[_0x568da6(0x2b1)]===_0x568da6(0xbf)?process[_0x568da6(0x2b1)]:null,'host':_0x2d0bfc[_0x568da6(0x270)](),'supervisorKey':this[_0x568da6(0x119)]??null,'version':require$$6['version'],'kind':_0x500df2,'role':{'engines':!!_0x5379fd['engines'],'processors':!!_0x5379fd[_0x568da6(0x124)],'compaction':_0x5379fd[_0x568da6(0xf7)],'http':_0x5379fd[_0x568da6(0x103)]},'listenAddr':this[_0x568da6(0x154)]??null,'heartbeatAt':_0x45863e,'expiresAt':_0x45863e+_0x24b71d,'caps':this[_0x568da6(0x197)](_0x500df2,_0x5379fd),'lifecycle':{'state':_0x568da6(0x17f),'desiredVersionApplied':null},'meta':{...this['_ownMeta']},'processing':_0x5379fd[_0x568da6(0x124)]?this[_0x568da6(0xb6)]():null,'engines':_0x5379fd[_0x568da6(0x20e)]?[...this['okdb']['_servingEngines']??[]]:null,'singletonClaims':this[_0x568da6(0x241)](),'stats':this['_sampleOwnStats'](),'writers':this['_collectWriterFacet']()};}[_0x4779c3(0x153)](){const _0x450f04=_0x4779c3,_0x40a472={};try{for(const [_0x308eaa,_0x276dfb]of this[_0x450f04(0x217)][_0x450f04(0x267)]){try{const _0x4afcf9=_0x276dfb['writerStatus']?.();if(!_0x4afcf9)continue;if(!_0x4afcf9[_0x450f04(0x23e)]&&!_0x4afcf9[_0x450f04(0x1fd)]&&!(_0x4afcf9['parkedNow']??0x0)&&!_0x4afcf9['draining'])continue;_0x40a472[_0x308eaa]={'depth':_0x4afcf9[_0x450f04(0x23e)],'oldestPendingMs':_0x4afcf9[_0x450f04(0x2c5)],'committed':_0x4afcf9[_0x450f04(0x1fd)],'commitsPerSec':_0x4afcf9[_0x450f04(0x279)],'commitP99Ms':_0x4afcf9[_0x450f04(0x246)],'parkedNow':_0x4afcf9[_0x450f04(0x12f)]??0x0,'draining':!!_0x4afcf9[_0x450f04(0x1bf)]};}catch{}}}catch{}return Object['keys'](_0x40a472)[_0x450f04(0x1c4)]?_0x40a472:null;}[_0x4779c3(0x241)](){const _0x8cf457=_0x4779c3,_0x47fe92=process['pid'],_0x165f37=Date[_0x8cf457(0x219)](),_0xd8bba1=_0x55425b=>{const _0xfbfea3=_0x8cf457;if(!_0x55425b)return[];const _0x18a303=[];try{for(const {id:_0x2ae886,entry:_0x4f3f45}of _0x55425b[_0xfbfea3(0xc3)]()){if(_0x4f3f45?.[_0xfbfea3(0x280)]?.[_0xfbfea3(0x2af)]!==_0x47fe92)continue;const _0x45b37f=_0x4f3f45[_0xfbfea3(0x11c)]??_0x4f3f45[_0xfbfea3(0x1d0)]??0x0;if(_0x45b37f+(_0x4f3f45[_0xfbfea3(0x1aa)]??0x0)<_0x165f37)continue;_0x18a303['push'](_0x2ae886);}}catch{}return _0x18a303;},_0x5f3026=_0xd8bba1(this[_0x8cf457(0x2cc)](_0x8cf457(0x12b))),_0x50bc43=_0xd8bba1(this['_singletonLock'](_0x8cf457(0x173)));if(!_0x5f3026[_0x8cf457(0x1c4)]&&!_0x50bc43[_0x8cf457(0x1c4)])return null;return{'compact':_0x5f3026,'replicate':_0x50bc43};}[_0x4779c3(0x2cc)](_0x2c5d8c){const _0x247274=_0x4779c3;if(!this[_0x247274(0x217)]?.['_rootDb'])return null;if(!this[_0x247274(0xab)])this[_0x247274(0xab)]=new Map();let _0x5b0e8c=this['_singletonLocks'][_0x247274(0x195)](_0x2c5d8c);if(!_0x5b0e8c)try{_0x5b0e8c=new _0x1e5cb6(this[_0x247274(0x217)][_0x247274(0x2c3)],{'namespace':_0x2c5d8c}),this[_0x247274(0xab)][_0x247274(0x2bd)](_0x2c5d8c,_0x5b0e8c);}catch{return null;}return _0x5b0e8c;}['_buildProcessingFacet'](){const _0x161c3d=_0x4779c3,_0x42bdfe=[];try{for(const [_0x2bc8b1,_0x4028a]of this[_0x161c3d(0x217)][_0x161c3d(0x267)]){if(_0x2bc8b1[_0x161c3d(0x1f1)]('~'))continue;for(const _0x58544e of _0x4028a[_0x161c3d(0xc1)][_0x161c3d(0x2d2)]())_0x42bdfe[_0x161c3d(0x2c1)]({..._0x58544e,'env':_0x2bc8b1});}}catch{}return{'participate':this['okdb'][_0x161c3d(0x124)]?.[_0x161c3d(0x11e)]??![],'processors':_0x42bdfe};}[_0x4779c3(0x2b5)](){const _0x872a7f=_0x4779c3;if(this['_desired'])return!![];const _0x39dc51=this[_0x872a7f(0x217)][_0x872a7f(0x2c3)];if(!_0x39dc51)return![];return this[_0x872a7f(0xe3)]=_0x39dc51['openDB'](_0x257a11,{'dupSort':![]}),this[_0x872a7f(0x1ae)]=_0x39dc51['openDB'](_0x38d988,{'dupSort':![]}),!![];}async['_migrateVocab'](){const _0x53b7e2=_0x4779c3;if(!this[_0x53b7e2(0x2b5)]())return;const _0x3baf99=_0x53b7e2(0xfb),_0xd7c3ef=0x1,_0x2064fb=this['_desired'][_0x53b7e2(0x195)](_0x3baf99)??0x0;if(_0x2064fb>=_0xd7c3ef)return;const _0x51b79b=_0x2dd81e=>{const _0x1c7161=_0x53b7e2;if(_0x2dd81e===_0x1c7161(0x1b8))return _0x1c7161(0x116);if(_0x2dd81e===_0x1c7161(0x27c))return _0x1c7161(0x13d);return _0x2dd81e;};await this[_0x53b7e2(0x217)][_0x53b7e2(0x2ad)][_0x53b7e2(0x1d5)][_0x53b7e2(0x1a4)](()=>{const _0x3f7ab4=_0x53b7e2;for(const _0x1a344a of['procmode/','procmodeack/']){for(const {key:_0xeeb97,value:_0x1934e3}of this[_0x3f7ab4(0xe3)][_0x3f7ab4(0x27d)]({'start':_0x1a344a,'end':_0x1a344a+'\xff'})){if(typeof _0xeeb97!==_0x3f7ab4(0x24d)||!_0xeeb97[_0x3f7ab4(0x1f1)](_0x1a344a))break;const _0x37da2c=_0x51b79b(_0x1934e3[_0x3f7ab4(0xca)]);if(_0x37da2c!==_0x1934e3[_0x3f7ab4(0xca)])this['_desired'][_0x3f7ab4(0x1c0)](_0xeeb97,{..._0x1934e3,'mode':_0x37da2c});}}this['_desired'][_0x3f7ab4(0x1c0)](_0x3baf99,_0xd7c3ef);});}['hasDesired'](){const _0x378172=_0x4779c3;return!!this[_0x378172(0xe3)];}[_0x4779c3(0x269)](_0x1cf547,_0x3dbc92){const _0x499f15=_0x4779c3;if(!this[_0x499f15(0x2b5)]())return null;const _0x32fa89=_0x1cf547+'/'+_0x3dbc92;return this['_refreshDesiredSnapshot'](),this[_0x499f15(0x164)][_0x499f15(0x195)](_0x32fa89)??this[_0x499f15(0xe3)]['get'](_0x32fa89)??null;}[_0x4779c3(0x1ad)](){const _0xe8ef63=_0x4779c3;if(!_0x2c6821)return;try{this['okdb'][_0xe8ef63(0x2ad)]?.['db']?.[_0xe8ef63(0x24f)]?.();}catch{}}async[_0x4779c3(0x104)](_0x1677e3,_0x4d5002,_0x39d742){const _0x3eb753=_0x4779c3;if(!this[_0x3eb753(0x2b5)]())return null;const _0x59b919=_0x1677e3+'/'+_0x4d5002;this['_refreshDesiredSnapshot']();const _0x4a3b15=this[_0x3eb753(0x164)][_0x3eb753(0x195)](_0x59b919)??this[_0x3eb753(0xe3)][_0x3eb753(0x195)](_0x59b919)??{'version':0x0},_0x22bd75=(_0x4a3b15[_0x3eb753(0x26c)]||0x0)+0x1,_0x308ff6={..._0x4a3b15,..._0x39d742,'version':_0x22bd75,'updatedAt':Date[_0x3eb753(0x219)]()};this[_0x3eb753(0x164)][_0x3eb753(0x2bd)](_0x59b919,_0x308ff6);try{await this[_0x3eb753(0x217)][_0x3eb753(0x2ad)][_0x3eb753(0x1d5)][_0x3eb753(0x1a4)](()=>{const _0x8e5652=_0x3eb753;this[_0x8e5652(0xe3)][_0x8e5652(0x1c0)](_0x59b919,_0x308ff6);});}finally{if(this[_0x3eb753(0x164)][_0x3eb753(0x195)](_0x59b919)===_0x308ff6)this[_0x3eb753(0x164)][_0x3eb753(0x28d)](_0x59b919);}return _0x22bd75;}['listDesired'](_0x15f243){const _0x32ed3a=_0x4779c3;if(!this[_0x32ed3a(0x2b5)]())return[];this['_refreshDesiredSnapshot']();const _0x1f6f94=_0x15f243+'/',_0x19fdf9=[];for(const {key:_0x3d8d28,value:_0x42ab1b}of this[_0x32ed3a(0xe3)][_0x32ed3a(0x27d)]({'start':_0x1f6f94,'end':_0x1f6f94+'\xff'})){if(typeof _0x3d8d28!==_0x32ed3a(0x24d)||!_0x3d8d28[_0x32ed3a(0x1f1)](_0x1f6f94))break;_0x19fdf9[_0x32ed3a(0x2c1)]({'key':_0x3d8d28[_0x32ed3a(0x1c3)](_0x1f6f94[_0x32ed3a(0x1c4)]),'value':_0x42ab1b});}return _0x19fdf9;}[_0x4779c3(0x229)](_0x177c23){const _0x2a0240=_0x4779c3;if(!this['_ensureDesired']())return null;return this[_0x2a0240(0x1ae)]['get'](_0x177c23)??null;}async['bumpCmd'](_0x24906e,_0x5d6156,_0x4acb07={}){const _0x162e08=_0x4779c3;if(!this[_0x162e08(0x2b5)]())return null;let _0x368763;return await this[_0x162e08(0x217)][_0x162e08(0x2ad)]['_writer'][_0x162e08(0x1a4)](()=>{const _0x50bcd2=_0x162e08,_0x244588=this[_0x50bcd2(0x1ae)]['get'](_0x24906e)||{'epoch':0x0};_0x368763=(_0x244588[_0x50bcd2(0x143)]||0x0)+0x1,this[_0x50bcd2(0x1ae)][_0x50bcd2(0x1c0)](_0x24906e,{..._0x244588,..._0x4acb07,'cmd':_0x5d6156,'epoch':_0x368763,'updatedAt':Date['now']()});}),_0x368763;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x14bf54,'nodeKey':_0x5d03f6,'logicalKey':_0x2516a2,'slotKey':_0x1a1470,'PROCESS_ENV':_0x1359c9,'NODE_TYPE':_0x341fee},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x18afd9=_0x74f0a9;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x1b2e92=require$$0$4,{EVENTS:_0x5f2164,CHANGE_ACTIONS:_0x450c3d}=requireOkdbEnums(),{LOOP:_0x5e255f}=requireOkdbLoopMonitor(),_0x48aa95=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x21295d=0x5,_0x18a3d5=0x2710;class _0x4b6a33 extends _0x1b2e92{constructor(_0x140374,_0x1a2f9d={}){const _0x1a8fa1=_0x30d0;super(),this[_0x1a8fa1(0x217)]=_0x140374,this[_0x1a8fa1(0x1f0)]=_0x1a2f9d[_0x1a8fa1(0xfe)]??_0x48aa95,this[_0x1a8fa1(0x171)]=_0x1a2f9d['flushDebounce']??_0x21295d,this[_0x1a8fa1(0x27a)]=_0x1a2f9d[_0x1a8fa1(0x184)]??_0x18a3d5,this[_0x1a8fa1(0x2da)]=![],this[_0x1a8fa1(0x102)]=new Map(),this['_baselines']=new Map(),this['_pending']=new Map(),this[_0x1a8fa1(0x259)]=null,this[_0x1a8fa1(0x1d3)]=![],this[_0x1a8fa1(0x2d7)]=new Set(),this['_onItem']=_0x3be8f2=>this['_handleInProcess'](_0x3be8f2),this[_0x1a8fa1(0x1d4)]=_0xb801e1=>this[_0x1a8fa1(0x23a)](_0xb801e1),this[_0x1a8fa1(0x28f)]=()=>this[_0x1a8fa1(0x187)]();}[_0x18afd9(0x1c6)](){const _0x4ef253=_0x18afd9;if(this[_0x4ef253(0x2da)])return;this[_0x4ef253(0x2da)]=!![];for(const [_0x56ac7e,_0x2ef8ec]of this[_0x4ef253(0x217)][_0x4ef253(0x267)]){if(_0x56ac7e[_0x4ef253(0x1f1)]('~'))continue;try{_0x2ef8ec[_0x4ef253(0x23d)]();}catch{}}for(const [_0x527884,_0x188358]of this[_0x4ef253(0x217)][_0x4ef253(0x267)]){if(_0x527884['startsWith']('~'))continue;try{this[_0x4ef253(0x236)][_0x4ef253(0x2bd)](_0x527884,_0x188358[_0x4ef253(0x2dc)]()||0x0);}catch{}}const {events:_0x2aa7c6}=this[_0x4ef253(0x217)];_0x2aa7c6['on'](_0x5f2164['ITEM_CREATE'],this[_0x4ef253(0x27f)]),_0x2aa7c6['on'](_0x5f2164[_0x4ef253(0x189)],this[_0x4ef253(0x27f)]),_0x2aa7c6['on'](_0x5f2164[_0x4ef253(0x1c1)],this[_0x4ef253(0x27f)]),_0x2aa7c6['on'](_0x5f2164['SYSTEM_POKE'],this[_0x4ef253(0x1d4)]),_0x2aa7c6[_0x4ef253(0x1ab)](_0x5f2164['SYSTEM_STOPPED'],this[_0x4ef253(0x28f)]);}[_0x18afd9(0x187)](){const _0x33a4da=_0x18afd9;if(!this[_0x33a4da(0x2da)])return;this[_0x33a4da(0x2da)]=![];const {events:_0x606580}=this[_0x33a4da(0x217)];_0x606580[_0x33a4da(0x193)](_0x5f2164['ITEM_CREATE'],this['_onItem']),_0x606580[_0x33a4da(0x193)](_0x5f2164['ITEM_UPDATE'],this['_onItem']),_0x606580[_0x33a4da(0x193)](_0x5f2164['ITEM_REMOVE'],this[_0x33a4da(0x27f)]),_0x606580['off'](_0x5f2164[_0x33a4da(0x101)],this[_0x33a4da(0x1d4)]);try{_0x606580[_0x33a4da(0x193)](_0x5f2164[_0x33a4da(0x26b)],this[_0x33a4da(0x28f)]);}catch{}this[_0x33a4da(0x259)]&&(clearTimeout(this[_0x33a4da(0x259)]),this[_0x33a4da(0x259)]=null),this['_pending']['clear'](),this[_0x33a4da(0x102)][_0x33a4da(0x211)](),this[_0x33a4da(0x236)]['clear'](),this[_0x33a4da(0x2d7)][_0x33a4da(0x211)]();}[_0x18afd9(0x18c)](_0x1008cd,_0x4b94b8,_0xf4c296,_0x18e50e){return _0x1008cd+'\x00'+_0x4b94b8+'\x00'+_0xf4c296+'\x00'+_0x18e50e;}['_markSeen'](_0x14b0c8,_0x5327f0,_0xae5ff9,_0x14875e){const _0x46da8e=_0x18afd9,_0x3bb85e=this[_0x46da8e(0x18c)](_0x14b0c8,_0x5327f0,_0xae5ff9,_0x14875e);if(this[_0x46da8e(0x2d7)][_0x46da8e(0x1cd)](_0x3bb85e))return![];this[_0x46da8e(0x2d7)][_0x46da8e(0x156)](_0x3bb85e);if(this['_seen'][_0x46da8e(0xc4)]>this[_0x46da8e(0x27a)]){const _0xba9a72=this[_0x46da8e(0x2d7)][_0x46da8e(0x251)]()['next']()[_0x46da8e(0x1c8)];this[_0x46da8e(0x2d7)][_0x46da8e(0x28d)](_0xba9a72);}return!![];}[_0x18afd9(0x27b)](_0x33a01b){const _0x4dae87=_0x18afd9;if(!this[_0x4dae87(0x2da)]||!_0x33a01b)return;const {env:_0x130c5b,type:_0x26010f,key:_0x4fb94b,clock:_0x360cff,origin:_0xf44311,action:_0x303b5b,newValue:_0x24f979,oldValue:_0x1ee92e}=_0x33a01b;if(_0x130c5b==null||_0x26010f==null||_0x4fb94b==null)return;if(typeof _0x130c5b===_0x4dae87(0x24d)&&_0x130c5b['startsWith']('~'))return;if(typeof _0x26010f===_0x4dae87(0x24d)&&_0x26010f[_0x4dae87(0x1f1)]('~'))return;if(!this[_0x4dae87(0x235)](_0x130c5b,_0x26010f,_0x4fb94b,_0x360cff))return;const _0x401cb9=_0x303b5b===_0x450c3d['REMOVE']?_0x4dae87(0x12a):_0x4dae87(0x1c0);this[_0x4dae87(0x225)](_0x4dae87(0x288),{'env':_0x130c5b,'type':_0x26010f,'key':_0x4fb94b,'op':_0x401cb9,'clock':_0x360cff,'origin':_0xf44311,'value':_0x401cb9===_0x4dae87(0x12a)?null:_0x24f979,'prevValue':_0x1ee92e});}[_0x18afd9(0x23a)](_0x49952d){const _0x2fc1cb=_0x18afd9;if(!this[_0x2fc1cb(0x2da)])return;if(!_0x49952d||typeof _0x49952d[_0x2fc1cb(0x134)]!==_0x2fc1cb(0x24d)||typeof _0x49952d[_0x2fc1cb(0x1a9)]!=='string')return;const {env:_0x56c7c5,type:_0x149e91}=_0x49952d;if(_0x56c7c5[_0x2fc1cb(0x1f1)]('~')||_0x149e91[_0x2fc1cb(0x1f1)]('~'))return;this[_0x2fc1cb(0x19f)][_0x2fc1cb(0x2bd)](_0x56c7c5+'\x00'+_0x149e91,{'env':_0x56c7c5,'type':_0x149e91}),this['_scheduleFlush']();}[_0x18afd9(0x137)](){const _0xcabab6=_0x18afd9;if(this[_0xcabab6(0x259)])return;const _0x894669=()=>{const _0x99fd08=_0xcabab6;this[_0x99fd08(0x259)]=null,this[_0x99fd08(0x260)]()[_0x99fd08(0x17c)](()=>{});};this['_flushTimer']=setTimeout(_0x894669,this['_flushDebounce']>0x0?this[_0xcabab6(0x171)]:0x0);}async[_0x18afd9(0x260)](){const _0x6043b2=_0x18afd9;if(this['_draining']){this[_0x6043b2(0x137)]();return;}this[_0x6043b2(0x1d3)]=!![];try{const _0x4ecd94=[...this['_pending']['values']()];this[_0x6043b2(0x19f)][_0x6043b2(0x211)]();let _0x15d776=![];for(const {env:_0x3fb51d,type:_0x5de338}of _0x4ecd94){try{const _0x1973d1=await this[_0x6043b2(0x2d3)](_0x3fb51d,_0x5de338);if(_0x1973d1)_0x15d776=!![];}catch{this[_0x6043b2(0x19f)][_0x6043b2(0x2bd)](_0x3fb51d+'\x00'+_0x5de338,{'env':_0x3fb51d,'type':_0x5de338}),_0x15d776=!![];}}if(_0x15d776||this[_0x6043b2(0x19f)][_0x6043b2(0xc4)]>0x0)this['_scheduleFlush']();}finally{this[_0x6043b2(0x1d3)]=![];}}async['_drainOne'](_0x4a2e16,_0x3f3ab3){const _0x1edb2d=_0x18afd9,_0x1f0e4a=await this[_0x1edb2d(0x217)][_0x1edb2d(0x1cf)](_0x4a2e16),_0x21bb45=_0x4a2e16+'\x00'+_0x3f3ab3;!this[_0x1edb2d(0x102)][_0x1edb2d(0x1cd)](_0x21bb45)&&(!this['_baselines'][_0x1edb2d(0x1cd)](_0x4a2e16)&&(_0x1f0e4a[_0x1edb2d(0x23d)](),this['_baselines'][_0x1edb2d(0x2bd)](_0x4a2e16,_0x1f0e4a[_0x1edb2d(0x2dc)]()||0x0)),this['_cursors'][_0x1edb2d(0x2bd)](_0x21bb45,this[_0x1edb2d(0x236)][_0x1edb2d(0x195)](_0x4a2e16)));const _0x136c59=this[_0x1edb2d(0x102)]['get'](_0x21bb45),_0x44ba99=_0x1f0e4a['getClock'](_0x3f3ab3)||0x0;if(_0x44ba99<=_0x136c59)return![];const _0x32e5d5=_0x136c59+this[_0x1edb2d(0x1f0)],_0x2c0b3c=Math['min'](_0x44ba99,_0x32e5d5),_0x5be9ac=_0x5e255f[_0x1edb2d(0x28e)]?_0x5e255f[_0x1edb2d(0x219)]():0x0,_0x1484f7=Array[_0x1edb2d(0x2c6)](_0x1f0e4a[_0x1edb2d(0x10f)](_0x3f3ab3,_0x136c59+0x1,_0x2c0b3c));let _0x99cebd=_0x136c59;for(const _0x1621d6 of _0x1484f7){const {clock:_0x544ca0,key:_0x576fac,action:_0xd7067a,origin:_0x292872}=_0x1621d6;if(_0x544ca0>_0x99cebd)_0x99cebd=_0x544ca0;if(_0x576fac==null)continue;if(!this[_0x1edb2d(0x235)](_0x4a2e16,_0x3f3ab3,_0x576fac,_0x544ca0))continue;let _0xb6589b,_0x76b92f;if(_0xd7067a===_0x450c3d['REMOVE'])_0xb6589b='remove',_0x76b92f=null;else{const _0x194cc9=_0x1f0e4a[_0x1edb2d(0x195)](_0x3f3ab3,_0x576fac);_0x194cc9==null?(_0xb6589b=_0x1edb2d(0x12a),_0x76b92f=null):(_0xb6589b=_0x1edb2d(0x1c0),_0x76b92f=_0x194cc9);}this[_0x1edb2d(0x225)](_0x1edb2d(0x288),{'env':_0x4a2e16,'type':_0x3f3ab3,'key':_0x576fac,'op':_0xb6589b,'clock':_0x544ca0,'origin':_0x292872,'value':_0x76b92f});}if(_0x5e255f[_0x1edb2d(0x28e)])_0x5e255f['note'](_0x1edb2d(0x2cd)+_0x4a2e16+':'+_0x3f3ab3,_0x5e255f['now']()-_0x5be9ac,'n='+_0x1484f7['length']);return this[_0x1edb2d(0x102)][_0x1edb2d(0x2bd)](_0x21bb45,Math[_0x1edb2d(0x244)](_0x99cebd,_0x2c0b3c)),_0x1f0e4a['getClock'](_0x3f3ab3)>_0x2c0b3c;}[_0x18afd9(0xed)](){const _0x352c13=_0x18afd9;return{'started':this['_started'],'quantum':this[_0x352c13(0x1f0)],'flushDebounce':this['_flushDebounce'],'cursors':Object[_0x352c13(0x1b4)]([...this[_0x352c13(0x102)][_0x352c13(0x198)]()][_0x352c13(0x284)](([_0xb7d2ad,_0x239859])=>[_0xb7d2ad[_0x352c13(0x1b1)]('\x00',':'),_0x239859])),'pending':this[_0x352c13(0x19f)][_0x352c13(0xc4)],'seen':this[_0x352c13(0x2d7)][_0x352c13(0xc4)]};}}return _0x4b6a33[_0x18afd9(0x1b0)]=_0x48aa95,okdbChangefeed={'OKDBChangefeed':_0x4b6a33},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x47f2b0=_0x74f0a9;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x543c4a=require$$1$1,_0xbe165c=require$$1,{EVENTS:_0x21a053}=requireOkdbEnums(),_0x586975=require$$0$3,{slotKey:_0x15ee0c}=requireOkdbProcessRegistry(),_0x189b09=0xfa,_0x4af729=0xfa0,_0x199441=0x5,_0x2ad0b4=0x2710,_0x2c38ab=0xbb8,_0x54da0a=0x7d0,_0x591097=_0x47f2b0(0x26a),_0x28e962='ephemeral',_0x56c702=_0x47f2b0(0x201),_0xb6ef70='stats',_0x4f9294=[_0x21a053[_0x47f2b0(0x168)],_0x21a053[_0x47f2b0(0xd3)],_0x21a053[_0x47f2b0(0x24e)],_0x21a053[_0x47f2b0(0x215)],_0x21a053[_0x47f2b0(0xf3)],_0x21a053['INDEX_READY'],_0x21a053[_0x47f2b0(0x1cc)],_0x21a053[_0x47f2b0(0x132)],_0x47f2b0(0x121),_0x47f2b0(0xc8),_0x47f2b0(0xc9),_0x47f2b0(0x13e),'processor:resumed','processor:retry'],_0xd15276=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0xe9b296({workers:_0x51a1da,makeOkdb:_0x2388c2,port:_0x30de57,primaryOkdb:_0x4d0a58,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x1ba3d7=_0x47f2b0;if(_0x543c4a[_0x1ba3d7(0x212)])return childEntry&&_0x543c4a[_0x1ba3d7(0x22b)]({'exec':_0xbe165c[_0x1ba3d7(0x1f9)](__dirname,_0x1ba3d7(0x2df)),'args':[],'execArgv':((()=>{const _0x287baa=_0x1ba3d7,_0x39dab2=[];for(let _0x5d408c=0x0;_0x5d408c<process[_0x287baa(0xff)][_0x287baa(0x1c4)];_0x5d408c++){const _0x29a772=process['execArgv'][_0x5d408c];if(_0x29a772['startsWith'](_0x287baa(0x18a))||_0x29a772[_0x287baa(0x1f1)](_0x287baa(0x214))||_0x29a772[_0x287baa(0x1f1)](_0x287baa(0x2e1)))continue;if(_0x29a772==='-e'||_0x29a772===_0x287baa(0x17d)||_0x29a772==='-p'||_0x29a772==='--print'){_0x5d408c++;continue;}_0x39dab2[_0x287baa(0x2c1)](_0x29a772);}return _0x39dab2;})())}),_0x4b7e07({'workers':_0x51a1da,'port':_0x30de57,'primaryOkdb':_0x4d0a58,'workerEnv':workerEnv});return _0x4b6aec({'makeOkdb':_0x2388c2,'port':_0x30de57});}function _0x4b7e07({workers:_0x3a1812,port:_0x535fc1,primaryOkdb:_0x2eed88,workerEnv:_0xc79f01}){const _0x5aef5f=_0x47f2b0,_0x485219=new Map(),_0x2e9e0f=new Map();let _0x59fc5b=![];const _0x36e511=_0x28f9e1=>_0x28f9e1?.[_0x5aef5f(0x1d2)],_0x226fb2=_0x191eaf=>{const _0x4c953d=_0x5aef5f,_0x1c992d=_0x543c4a['fork']({...process.env,..._0xc79f01||{},'OKDB_CLUSTER_SLOT':String(_0x191eaf)});return _0x1c992d[_0x4c953d(0x1d2)]=_0x191eaf,_0x485219[_0x4c953d(0x2bd)](_0x1c992d[_0x4c953d(0x1a3)]['pid'],{'worker':_0x1c992d,'startedAt':Date[_0x4c953d(0x219)](),'slot':_0x191eaf}),_0x1c992d['on'](_0x4c953d(0x192),_0x53240e=>{const _0x2c2fea=_0x4c953d;console[_0x2c2fea(0x201)](_0x2c2fea(0x2ae)+_0x1c992d['process'][_0x2c2fea(0x2af)]+_0x2c2fea(0x1e2)+(_0x53240e?.[_0x2c2fea(0x262)]??_0x53240e));}),_0x1c992d['on']('online',()=>_0x857ca8()),_0x1c992d;},_0x147ad4=_0xeb91a1=>{const _0x5b740c=_0x5aef5f;for(const {worker:_0x227577}of _0x485219[_0x5b740c(0x251)]()){if(_0x227577[_0x5b740c(0x204)]()||!_0x227577[_0x5b740c(0xea)]())continue;try{_0x227577['send'](_0xeb91a1);}catch{}}};_0x2eed88?.[_0x5aef5f(0x23c)]?.({'kind':_0x5aef5f(0xda),'listenAddr':':'+_0x535fc1})['catch'](()=>{}),_0x2eed88?.[_0x5aef5f(0x182)]?.[_0x5aef5f(0xac)]?.({'workersConfigured':_0x3a1812});const _0x5ccaa0={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x857ca8=()=>{const _0x18f114=_0x5aef5f,_0x2250fd=_0x2eed88?.[_0x18f114(0x182)];if(!_0x2250fd||!_0x2250fd[_0x18f114(0x166)])return;const _0x343871=_0x2250fd[_0x18f114(0x183)];for(const {worker:_0x32ed8e,startedAt:_0xceb49f,slot:_0x3beb05,stats:_0x1ff938,processing:_0xb28af1}of _0x485219['values']()){if(_0x32ed8e['isDead']())continue;const _0x581351=_0x2250fd[_0x18f114(0xb1)]?.()&&_0x2250fd[_0x18f114(0x269)](_0x18f114(0x199),_0x50433d(_0x3beb05))?.['decommission']===!![];_0x2250fd[_0x18f114(0x29d)]({'pid':_0x32ed8e[_0x18f114(0x1a3)]['pid'],'startedAt':_0xceb49f,'kind':_0x18f114(0x1e1),'supervisorKey':_0x343871,'slot':_0x3beb05,'slotKey':_0x50433d(_0x3beb05),'role':_0x5ccaa0,'listenAddr':':'+_0x535fc1,'lifecycle':_0x581351?'decommissioning':_0x18f114(0x17f),'processing':_0xb28af1??null,'stats':_0x1ff938??null})['catch'](()=>{});}},_0x50433d=_0x3330cf=>_0x15ee0c(_0x5aef5f(0x248)+_0x535fc1,_0x3330cf),_0xb5767d=_0x10222a=>{const _0x179193=_0x5aef5f,_0x470984=_0x2eed88?.[_0x179193(0x182)];if(!_0x470984?.[_0x179193(0xb1)]?.())return![];return _0x470984[_0x179193(0x269)](_0x179193(0x199),_0x50433d(_0x10222a))?.[_0x179193(0x1f3)]===!![];};for(let _0x41d601=0x0;_0x41d601<_0x3a1812;_0x41d601++){const _0x22d012=_0xb5767d(_0x41d601);_0x2e9e0f[_0x5aef5f(0x2bd)](_0x41d601,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x22d012,'respawnTimer':null}),_0x22d012?console[_0x5aef5f(0x201)](_0x5aef5f(0x2c0)+_0x41d601+'\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)'):_0x226fb2(_0x41d601);}const _0x1760a0=()=>{const _0x1218f1=_0x5aef5f,_0x3e04b2=_0x2eed88?.[_0x1218f1(0x182)];if(!_0x3e04b2?.[_0x1218f1(0x166)]||!_0x3e04b2['hasDesired']?.())return;for(const [_0x4948e6,_0x2e9d0]of _0x2e9e0f['entries']()){const _0x187237=_0x3e04b2[_0x1218f1(0x269)](_0x1218f1(0x199),_0x50433d(_0x4948e6)),_0x18ff6b=_0x187237?.['decommission']===!![],_0x53b2a7=_0x187237?.[_0x1218f1(0x1ff)]===!![];if(_0x18ff6b&&!_0x2e9d0[_0x1218f1(0x1b7)]){_0x2e9d0[_0x1218f1(0x1b7)]=!![];_0x2e9d0[_0x1218f1(0x200)]&&(clearTimeout(_0x2e9d0[_0x1218f1(0x200)]),_0x2e9d0['respawnTimer']=null);for(const {worker:_0xcca9b5}of _0x485219[_0x1218f1(0x251)]()){if(_0x36e511(_0xcca9b5)!==_0x4948e6||_0xcca9b5[_0x1218f1(0x204)]())continue;try{if(_0x53b2a7)_0xcca9b5[_0x1218f1(0x1a3)][_0x1218f1(0x1ff)](_0x1218f1(0xe4));else _0xcca9b5[_0x1218f1(0xea)]()&&_0xcca9b5['disconnect']();}catch{}}console['log'](_0x1218f1(0x20a)+(_0x53b2a7?_0x1218f1(0x18e):_0x1218f1(0x233))+_0x1218f1(0x16c)+_0x4948e6+'\x20(durable\x20desired-state)');}else{if(!_0x18ff6b&&_0x2e9d0[_0x1218f1(0x1b7)]&&_0x187237){_0x2e9d0[_0x1218f1(0x1b7)]=![],_0x2e9d0[_0x1218f1(0xc7)]=[],_0x2e9d0[_0x1218f1(0x1a7)]=0x0;const _0x58e207=[..._0x485219[_0x1218f1(0x251)]()][_0x1218f1(0x242)](({worker:_0x376527})=>_0x36e511(_0x376527)===_0x4948e6&&!_0x376527[_0x1218f1(0x204)]());!_0x58e207&&!_0x59fc5b&&(_0x226fb2(_0x4948e6),console[_0x1218f1(0x201)]('[okdb-cluster]\x20recommissioned\x20worker\x20slot='+_0x4948e6));}}}},_0x4707f8=()=>{try{_0x1760a0();}catch{}};_0x2eed88?.[_0x5aef5f(0x21e)]?.['on']?.(_0x21a053[_0x5aef5f(0xe0)],_0x4707f8);const _0x2deeb9=[];if(_0x2eed88?.[_0x5aef5f(0x21e)]?.['on'])for(const _0x495f56 of _0x4f9294){const _0x5c4f96=_0x4ff193=>{_0x147ad4({[_0x591097]:_0x28e962,'event':_0x495f56,'data':_0x4ff193??{}});};_0x2eed88[_0x5aef5f(0x21e)]['on'](_0x495f56,_0x5c4f96),_0x2deeb9[_0x5aef5f(0x2c1)]({'event':_0x495f56,'handler':_0x5c4f96});}const _0x4a734d=setInterval(()=>{_0x1760a0(),_0x857ca8();},_0xd15276);_0x4a734d['unref']?.();const _0x3b13ff=(_0x12c428,_0x20d8e0)=>{const _0x1209b6=_0x5aef5f;if(!_0x20d8e0||typeof _0x20d8e0!==_0x1209b6(0x112)||_0x20d8e0[_0x591097]!==_0x56c702)return;if(!_0x2eed88?.[_0x1209b6(0x201)]?.[_0x1209b6(0x118)])return;const _0x1b082c=_0x20d8e0['entry']||{};_0x2eed88[_0x1209b6(0x201)][_0x1209b6(0x118)]({..._0x1b082c,'msg':'[w'+_0x20d8e0[_0x1209b6(0x199)]+']\x20'+(_0x1b082c[_0x1209b6(0xaa)]??''),'meta':{..._0x1b082c['meta']||{},'worker':_0x20d8e0[_0x1209b6(0x199)],'workerPid':_0x20d8e0[_0x1209b6(0x2af)]}});};_0x543c4a['on'](_0x5aef5f(0x262),_0x3b13ff);const _0x332460=(_0x3aac23,_0x3c57bc)=>{const _0x339505=_0x5aef5f;if(!_0x3c57bc||typeof _0x3c57bc!=='object'||_0x3c57bc[_0x591097]!==_0xb6ef70)return;const _0x1c83bb=_0x485219[_0x339505(0x195)](_0x3aac23[_0x339505(0x1a3)][_0x339505(0x2af)]);if(_0x1c83bb){_0x1c83bb[_0x339505(0x266)]={..._0x3c57bc[_0x339505(0x266)],'at':Date[_0x339505(0x219)]()};if(_0x3c57bc[_0x339505(0xf4)]!==undefined)_0x1c83bb['processing']=_0x3c57bc[_0x339505(0xf4)];}};_0x543c4a['on'](_0x5aef5f(0x262),_0x332460),_0x543c4a['on'](_0x5aef5f(0x180),(_0x38a0de,_0x44ea2d,_0x35fff4)=>{const _0x1f23d2=_0x5aef5f,_0x4f2b55=_0x38a0de[_0x1f23d2(0x1a3)][_0x1f23d2(0x2af)],_0xca82e5=_0x36e511(_0x38a0de),_0xcffcd7=_0x485219[_0x1f23d2(0x195)](_0x4f2b55);if(_0xcffcd7&&_0x2eed88?.[_0x1f23d2(0x182)])_0x2eed88[_0x1f23d2(0x182)]['removeNode'](_0x4f2b55+':'+_0xcffcd7['startedAt'])['catch'](()=>{});_0x485219['delete'](_0x4f2b55),console[_0x1f23d2(0x201)](_0x1f23d2(0x2ae)+_0x4f2b55+'\x20(slot='+(_0xca82e5??'?')+_0x1f23d2(0x2c8)+(_0x1f23d2(0x12d)+_0x44ea2d+_0x1f23d2(0x21f)+(_0x35fff4??_0x1f23d2(0x145))+_0x1f23d2(0xd0)+_0x485219[_0x1f23d2(0xc4)]+'\x20worker(s)\x20remaining')),_0x857ca8();if(_0x59fc5b||_0xca82e5==null)return;const _0x393b6d=_0x2e9e0f['get'](_0xca82e5);if(!_0x393b6d||_0x393b6d[_0x1f23d2(0x1b7)])return;const _0x2953d5=Date[_0x1f23d2(0x219)]();_0x393b6d['deaths'][_0x1f23d2(0x2c1)](_0x2953d5),_0x393b6d[_0x1f23d2(0xc7)]=_0x393b6d['deaths'][_0x1f23d2(0x2d5)](_0x51262e=>_0x2953d5-_0x51262e<=_0x2ad0b4);if(_0x393b6d[_0x1f23d2(0xc7)][_0x1f23d2(0x1c4)]>=_0x199441){_0x393b6d[_0x1f23d2(0x1b7)]=!![],console[_0x1f23d2(0x192)](_0x1f23d2(0x278)+_0xca82e5+_0x1f23d2(0x1eb)+_0x393b6d[_0x1f23d2(0xc7)][_0x1f23d2(0x1c4)]+_0x1f23d2(0x1d7)+(_0x2ad0b4+_0x1f23d2(0x10d)+_0x485219['size']+'\x20worker(s)\x20still\x20serving'));return;}_0x393b6d['consecutiveFailures']++;const _0x22cbd1=Math[_0x1f23d2(0x203)](_0x4af729,_0x189b09*0x2**(_0x393b6d[_0x1f23d2(0x1a7)]-0x1));console['log'](_0x1f23d2(0xe1)+_0xca82e5+_0x1f23d2(0xb9)+_0x22cbd1+_0x1f23d2(0x2db)+_0x393b6d[_0x1f23d2(0x1a7)]+')'),_0x393b6d[_0x1f23d2(0x200)]=setTimeout(()=>{const _0x581926=_0x1f23d2;_0x393b6d['respawnTimer']=null;if(_0x59fc5b||_0x393b6d['dead'])return;const _0x31ec65=_0x226fb2(_0xca82e5);_0x31ec65[_0x581926(0x1ab)](_0x581926(0x185),()=>{const _0x293355=_0x581926;if(_0x2e9e0f[_0x293355(0x195)](_0xca82e5)===_0x393b6d)_0x393b6d['consecutiveFailures']=0x0;});},_0x22cbd1),_0x393b6d[_0x1f23d2(0x200)][_0x1f23d2(0x181)]?.();});const _0x4f36d0=[..._0x485219[_0x5aef5f(0x100)]()];console[_0x5aef5f(0x201)](_0x5aef5f(0xeb)+process[_0x5aef5f(0x2af)]+'\x20forked\x20'+_0x3a1812+_0x5aef5f(0x176)+_0x535fc1+':\x20'+('['+_0x4f36d0[_0x5aef5f(0x1f9)](',\x20')+']'));const _0x27939b={'_isClusterController':!![],'port':_0x535fc1,'primaryOkdb':_0x2eed88??null,'status'(){const _0x253c34=_0x5aef5f;return{'clustered':!![],'primaryPid':process[_0x253c34(0x2af)],'port':_0x535fc1,'primaryRole':_0x2eed88?.[_0x253c34(0x140)]??null,'processorPid':null,'supervisorPid':process[_0x253c34(0x2af)],'workers':[..._0x485219['values']()]['map'](({worker:_0x24f4ff})=>({'pid':_0x24f4ff[_0x253c34(0x1a3)][_0x253c34(0x2af)],'id':_0x24f4ff['id'],'dead':_0x24f4ff[_0x253c34(0x204)]()}))};},async 'close'(){const _0x5b564b=_0x5aef5f;_0x59fc5b=!![];for(const _0x59ee9c of _0x2e9e0f[_0x5b564b(0x251)]()){_0x59ee9c[_0x5b564b(0x1b7)]=!![],_0x59ee9c[_0x5b564b(0x200)]&&(clearTimeout(_0x59ee9c['respawnTimer']),_0x59ee9c[_0x5b564b(0x200)]=null);}clearInterval(_0x4a734d),_0x543c4a[_0x5b564b(0x193)]('message',_0x3b13ff),_0x543c4a[_0x5b564b(0x193)](_0x5b564b(0x262),_0x332460),_0x2eed88?.['events']?.['off']?.(_0x21a053['SYSTEM_PROC'],_0x4707f8);if(_0x2eed88?.[_0x5b564b(0x21e)]?.['off'])for(const {event:_0x22a15d,handler:_0x232203}of _0x2deeb9){try{_0x2eed88[_0x5b564b(0x21e)][_0x5b564b(0x193)](_0x22a15d,_0x232203);}catch{}}_0x2deeb9[_0x5b564b(0x1c4)]=0x0;const _0x56fe1a=[..._0x485219[_0x5b564b(0x251)]()][_0x5b564b(0x284)](({worker:_0x476218})=>_0x476218);if(_0x56fe1a[_0x5b564b(0x1c4)]===0x0)return;await Promise[_0x5b564b(0x12c)](_0x56fe1a[_0x5b564b(0x284)](_0x163293=>new Promise(_0x40342b=>{const _0xb6aa0d=_0x5b564b;if(_0x163293[_0xb6aa0d(0x204)]()){_0x40342b();return;}let _0x518a96=![];const _0x3c63d5=()=>{if(_0x518a96)return;_0x518a96=!![];if(_0xa97082)clearTimeout(_0xa97082);_0x40342b();};_0x163293['once'](_0xb6aa0d(0x180),_0x3c63d5);const _0xa97082=setTimeout(()=>{const _0x1daf51=_0xb6aa0d;try{_0x163293[_0x1daf51(0x1a3)]['kill']();}catch{}},_0x2c38ab+0x1f4);_0xa97082['unref']?.();try{_0x163293[_0xb6aa0d(0x11d)]();}catch{try{_0x163293['process']['kill']();}catch{}}})));}};return _0x27939b;}async function _0x4b6aec({makeOkdb:_0x3c2ac5,port:_0x22299c}){const _0x302ab5=_0x47f2b0,_0xb6bcb6=await _0x3c2ac5();return _0x2f6db0(_0xb6bcb6),_0xb6bcb6[_0x302ab5(0x103)][_0x302ab5(0x1fe)](_0x22299c);}function _0x2f6db0(_0x1ec54d){const _0x36fc69=_0x47f2b0;if(!_0x1ec54d||_0x1ec54d[_0x36fc69(0x285)])return;_0x1ec54d[_0x36fc69(0x285)]=!![];try{const {OKDBChangefeed:_0x21e40f}=requireOkdbChangefeed(),_0x46f494=_0x1ec54d[_0x36fc69(0xd7)];if(_0x46f494&&typeof _0x46f494[_0x36fc69(0x2bc)]===_0x36fc69(0x226)){const _0x495e00=new _0x21e40f(_0x1ec54d);_0x495e00[_0x36fc69(0x1c6)](),_0x46f494['attachFeed'](_0x495e00),_0x1ec54d[_0x36fc69(0x22c)]=_0x495e00;}}catch(_0x9c4cdd){_0x1ec54d[_0x36fc69(0x201)]?.[_0x36fc69(0x1dd)]?.(_0x36fc69(0x24a)+(_0x9c4cdd?.[_0x36fc69(0x262)]??_0x9c4cdd),{'feature':_0x36fc69(0x1bc)});}const _0x483b01=_0x218d9b=>{const _0x2ce55a=_0x36fc69;if(!_0x218d9b||typeof _0x218d9b!==_0x2ce55a(0x112)||_0x218d9b[_0x591097]==null)return;if(_0x218d9b[_0x591097]===_0x28e962)try{_0x1ec54d[_0x2ce55a(0xd7)]?.[_0x2ce55a(0x2c4)]?.(_0x218d9b[_0x2ce55a(0x17e)],_0x218d9b['data']);}catch{}};process['on'](_0x36fc69(0x262),_0x483b01),_0x1ec54d['_clusterOnMessage']=_0x483b01;{let _0x566821=process[_0x36fc69(0x191)](),_0x16a2f4=Date[_0x36fc69(0x219)]();const _0x5f7d49=()=>{const _0x3ae4f7=_0x36fc69;if(typeof process[_0x3ae4f7(0x148)]!==_0x3ae4f7(0x226)||!process[_0x3ae4f7(0x293)])return;const _0x2bb5c1=Date[_0x3ae4f7(0x219)](),_0x5b100e=process[_0x3ae4f7(0x191)](),_0x1b1f87=(_0x2bb5c1-_0x16a2f4)*0x3e8,_0x126ab1=_0x5b100e['user']-_0x566821['user']+(_0x5b100e[_0x3ae4f7(0x24b)]-_0x566821[_0x3ae4f7(0x24b)]),_0x5758b5=_0x1b1f87>0x0?Math[_0x3ae4f7(0x203)](0x64,Math['round'](_0x126ab1/(_0x1b1f87*(_0x586975['cpus']()['length']||0x1))*0x64)):0x0;_0x566821=_0x5b100e,_0x16a2f4=_0x2bb5c1;const _0x38d899=process[_0x3ae4f7(0x144)]();let _0x10d0b1=null;try{_0x10d0b1=_0x1ec54d[_0x3ae4f7(0x140)]?.[_0x3ae4f7(0x124)]?_0x1ec54d[_0x3ae4f7(0x182)]?.[_0x3ae4f7(0xb6)]?.()??null:null;}catch{}try{process['send']({[_0x591097]:_0xb6ef70,'stats':{'rss':_0x38d899['rss'],'heapUsed':_0x38d899[_0x3ae4f7(0xa9)],'heapTotal':_0x38d899[_0x3ae4f7(0x1bb)],'external':_0x38d899['external'],'cpuPct':_0x5758b5,'cpuWindowMs':Math[_0x3ae4f7(0x2c9)](_0x1b1f87/0x3e8)||null},'processing':_0x10d0b1});}catch{}},_0x1662ae=Math['max'](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0xeca21d=setInterval(_0x5f7d49,_0x1662ae);_0xeca21d[_0x36fc69(0x181)]?.(),_0x5f7d49();for(const _0x5cdf6a of['processor:paused',_0x36fc69(0x14f)]){_0x1ec54d[_0x36fc69(0x21e)]?.['on']?.(_0x5cdf6a,()=>{try{_0x5f7d49();}catch{}});}}let _0x224ba1=![];const _0x114851=async _0x199503=>{const _0x438683=_0x36fc69;if(_0x224ba1)return;_0x224ba1=!![];const _0x30f230=setTimeout(()=>process[_0x438683(0x180)](_0x199503),_0x2c38ab);_0x30f230[_0x438683(0x181)]?.();try{await _0x1ec54d[_0x438683(0x1ef)]?.();}catch{}process[_0x438683(0x180)](_0x199503);};process['on'](_0x36fc69(0x11d),()=>_0x114851(0x0));if(process['platform']!==_0x36fc69(0x186)){const _0x25e410=setInterval(()=>{const _0x3b3969=_0x36fc69;if(process[_0x3b3969(0x2b1)]===0x1)_0x114851(0x0);},_0x54da0a);_0x25e410['unref']?.(),_0x1ec54d['_clusterOrphanWatch']=_0x25e410;}}return okdbCluster={'runClustered':_0xe9b296,'attachWorkerCluster':_0x2f6db0},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x835cbc=require$$0$5,{attachWorkerCluster:_0x3c7a3a}=requireOkdbCluster();async function _0x4921e7(){const _0x2cd1b2=_0x30d0,_0x1ad461=process.env.OKDB_HTTP_CHILD;if(!_0x1ad461)throw new Error('okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing');const {rootPath:_0xd56a9b,port:_0x4d0344,options:options={},logLevel:logLevel=_0x2cd1b2(0x15d)}=JSON[_0x2cd1b2(0x1cb)](_0x1ad461);if(!_0xd56a9b||!_0x4d0344)throw new Error(_0x2cd1b2(0x2bb));const _0x2753d3=new _0x835cbc(_0xd56a9b,{...options,'engines':![],'processors':![],'compaction':![]});_0x2753d3[_0x2cd1b2(0x201)][_0x2cd1b2(0x292)]?.();const _0x51e214=process.env.OKDB_CLUSTER_SLOT??'?',_0x1a16ae={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x3a7a04=_0x1a16ae[logLevel]??_0x1a16ae[_0x2cd1b2(0x15d)];_0x2753d3['log'][_0x2cd1b2(0x1d8)](_0x39083e=>{const _0xe8de14=_0x2cd1b2;if((_0x1a16ae[_0x39083e[_0xe8de14(0x2a4)]]??0x1)<_0x3a7a04)return;try{process[_0xe8de14(0x148)]?.({'__okdbCluster':_0xe8de14(0x201),'slot':_0x51e214,'pid':process['pid'],'entry':_0x39083e});}catch{}}),await _0x2753d3['open'](),_0x3c7a3a(_0x2753d3),await _0x2753d3['http']['listen'](_0x4d0344);}return _0x4921e7()['catch'](_0x539054=>{const _0x5999e3=_0x30d0;try{process[_0x5999e3(0x148)]?.({'__okdbCluster':_0x5999e3(0x201),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x5999e3(0x2af)],'entry':{'level':'error','msg':_0x5999e3(0x2ca)+(_0x539054?.[_0x5999e3(0x262)]??_0x539054)}});}catch{}process[_0x5999e3(0x180)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module[_0x74f0a9(0x271)]=okdbHttpWorkerChild;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const
|
|
1
|
+
'use strict';const _0x58fea7=_0x4da5;(function(_0x2213f2,_0x314eb8){const _0x55ae30=_0x4da5,_0x3db447=_0x2213f2();while(!![]){try{const _0x544dc4=-parseInt(_0x55ae30(0xa9))/0x1+parseInt(_0x55ae30(0x9e))/0x2*(-parseInt(_0x55ae30(0xc3))/0x3)+-parseInt(_0x55ae30(0xcb))/0x4*(parseInt(_0x55ae30(0xc7))/0x5)+-parseInt(_0x55ae30(0xc1))/0x6+parseInt(_0x55ae30(0xe5))/0x7*(parseInt(_0x55ae30(0xb2))/0x8)+parseInt(_0x55ae30(0xe7))/0x9+-parseInt(_0x55ae30(0xd7))/0xa*(-parseInt(_0x55ae30(0xb0))/0xb);if(_0x544dc4===_0x314eb8)break;else _0x3db447['push'](_0x3db447['shift']());}catch(_0x3e8f40){_0x3db447['push'](_0x3db447['shift']());}}}(_0x5131,0x76258));var require$$0=require(_0x58fea7(0xa7)),require$$1=require('./okdb');function getDefaultExportFromCjs(_0x55a88a){const _0x5b5caf=_0x58fea7;return _0x55a88a&&_0x55a88a[_0x5b5caf(0xa8)]&&Object[_0x5b5caf(0xb5)][_0x5b5caf(0xbc)][_0x5b5caf(0xb9)](_0x55a88a,'default')?_0x55a88a['default']:_0x55a88a;}var okdbViewsBootstrapWorker$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x483ca7=_0x58fea7;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x4fb8b0={'PUT':_0x483ca7(0xba),'REMOVE':_0x483ca7(0xab),'INDEX_DROP':_0x483ca7(0xc6),'INDEX_REGISTER':_0x483ca7(0xef),'INDEX_RESET':_0x483ca7(0xb7),'TYPE_REGISTER':_0x483ca7(0xe0),'TYPE_DROP':_0x483ca7(0xaf),'FTS_REGISTER':_0x483ca7(0xbf),'FTS_DROP':'dropFts','FTS_RESET':'resetFts','SCHEMA_SET':_0x483ca7(0xee),'SCHEMA_DROP':_0x483ca7(0xea),'TTL_SET':'setTtl','TTL_CLEAR':'clearTtl'},_0x43e186={'SYSTEM_READY':_0x483ca7(0xc9),'FIELD_RESOLVER_REGISTERED':'field:resolver_registered','SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':_0x483ca7(0xd5),'SYSTEM_POKE':_0x483ca7(0xf3),'SYSTEM_DRAIN':'system:drain','SYSTEM_TYPE_DROP':_0x483ca7(0xc8),'SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x483ca7(0xce),'ITEM_CREATE':_0x483ca7(0xb8),'ITEM_UPDATE':_0x483ca7(0xd4),'ITEM_REMOVE':_0x483ca7(0xe9),'INDEX_RESET':_0x483ca7(0xa1),'INDEX_READY':'index:ready','INDEX_PROGRESS':'index:progress','VIEW_PROGRESS':'view:progress','INDEX_DROP':_0x483ca7(0xd3),'INDEX_REGISTERED':_0x483ca7(0xdb),'FTS_REGISTERED':_0x483ca7(0xbb),'FTS_DROP':_0x483ca7(0xf2),'FTS_RESET':'fts:reset','SCHEMA_SET':'schema:set','SCHEMA_DROP':_0x483ca7(0xf4),'UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':'unique:violation_resolved','REF_VIOLATION':_0x483ca7(0xcf),'REF_VIOLATION_RESOLVED':_0x483ca7(0xc0),'SYNC_APPLY':_0x483ca7(0xb6),'TXN_START':'txn:start','TXN_END':_0x483ca7(0xc4),'TXN_ROLLBACK':_0x483ca7(0xae),'TYPE_REGISTERED':_0x483ca7(0xbd),'TYPE_DROP':_0x483ca7(0xf0),'ENV_OPENED':_0x483ca7(0xe1),'ENV_REMOVED':_0x483ca7(0xd8),'SYSTEM_ENV_RELEASE':_0x483ca7(0xc2),'TTL_EXPIRED':'ttl:expired','TTL_SET':_0x483ca7(0xd0),'TTL_CLEAR':_0x483ca7(0xad),'LICENSE_INVALID':_0x483ca7(0xe3),'LICENSE_ADDED':_0x483ca7(0xf1),'LICENSE_ACTIVATED':_0x483ca7(0xe8),'LICENSE_REMOVED':_0x483ca7(0xda)},_0x154411={'CREATING':_0x483ca7(0x9f),'RESETTING':_0x483ca7(0xd2),'READY':_0x483ca7(0xcd),'DROPPING':_0x483ca7(0xa2),'WAITING':_0x483ca7(0xb1),'ERROR':'error'},_0x3fddd0={'CREATED':_0x483ca7(0xe4),'STARTING':_0x483ca7(0xbe),'STARTED':_0x483ca7(0xb3),'STOPPING':_0x483ca7(0xeb),'STOPPED':_0x483ca7(0xdf)},_0x1de8eb={'CREATING':_0x483ca7(0x9f),'READY':'ready','HALTED':_0x483ca7(0xdd),'STOPPED':_0x483ca7(0xdf),'RESETTING':_0x483ca7(0xd2)},_0x389811=Object[_0x483ca7(0xc5)]({'POKE':'bus:poke','DRAIN':'bus:drain','TYPE_DROP':'bus:type_drop','PROC':_0x483ca7(0xe6),'ENV_RELEASE':_0x483ca7(0xa3)});return okdbEnums={'BUS_EVENTS':_0x389811,'CHANGE_ACTIONS':_0x4fb8b0,'EVENTS':_0x43e186,'INDEX_STATE':_0x154411,'OKDB_STATE':_0x3fddd0,'VIEW_STATE':_0x1de8eb},okdbEnums;}var hasRequiredOkdbViewsBootstrapWorker;function requireOkdbViewsBootstrapWorker(){const _0x4dbdb5=_0x58fea7;if(hasRequiredOkdbViewsBootstrapWorker)return okdbViewsBootstrapWorker$1;hasRequiredOkdbViewsBootstrapWorker=0x1;const {parentPort:_0xeafedd,workerData:_0x5a45b0}=require$$0,_0x559582=require$$1,{EVENTS:_0x503140}=requireOkdbEnums();async function _0x2ff3c2(){const _0x14e8a9=_0x4da5,{rootPath:_0x1f382b,envName:_0x837b,viewName:_0x34f95f,definition:_0x16c8bb}=_0x5a45b0,_0x15704b=new _0x559582(_0x1f382b,{'admin':![],'mcp':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],'processes':![]});await _0x15704b[_0x14e8a9(0xcc)]();const _0x7355ff=_0x15704b[_0x14e8a9(0xac)](_0x837b);_0x7355ff[_0x14e8a9(0xa5)]['on'](_0x503140[_0x14e8a9(0xb4)],_0x43c7d8=>{const _0x1b6a52=_0x14e8a9;if(_0x43c7d8?.[_0x1b6a52(0xec)]!==_0x34f95f)return;try{_0xeafedd['postMessage']({'type':_0x1b6a52(0xa0),'event':_0x43c7d8});}catch{}}),await _0x7355ff[_0x14e8a9(0xde)]['_prepareViewDict'](_0x16c8bb),await _0x7355ff['views'][_0x14e8a9(0xa4)](_0x34f95f,_0x16c8bb),await _0x7355ff[_0x14e8a9(0xde)][_0x14e8a9(0xed)](_0x34f95f,_0x16c8bb),_0xeafedd[_0x14e8a9(0xe2)]({'type':'done'}),await _0x15704b[_0x14e8a9(0xd6)](),process[_0x14e8a9(0xca)](0x0);}return _0x2ff3c2()[_0x4dbdb5(0xaa)](_0x55bf48=>{const _0x22c2eb=_0x4dbdb5;try{_0xeafedd[_0x22c2eb(0xe2)]({'type':_0x22c2eb(0xd9),'error':_0x55bf48[_0x22c2eb(0xdc)]??String(_0x55bf48),'stack':_0x55bf48[_0x22c2eb(0xd1)]});}catch{}process[_0x22c2eb(0xca)](0x1);}),okdbViewsBootstrapWorker$1;}var okdbViewsBootstrapWorkerExports=requireOkdbViewsBootstrapWorker(),okdbViewsBootstrapWorker=getDefaultExportFromCjs(okdbViewsBootstrapWorkerExports);function _0x4da5(_0x49d490,_0x2d349e){_0x49d490=_0x49d490-0x9e;const _0x51314e=_0x5131();let _0x4da530=_0x51314e[_0x49d490];return _0x4da530;}function _0x5131(){const _0x41b74c=['_activateViewStorage','events','exports','worker_threads','__esModule','49780pCTHJd','catch','remove','env','ttl:clear','txn:rollback','dropType','11weKqhB','waiting','8GKahyM','started','VIEW_PROGRESS','prototype','sync:apply','resetIndex','item:create','call','put','fts:registered','hasOwnProperty','type:registered','starting','registerFts','ref:violation_resolved','4460490EGQjUv','system:env_release','1089TygUfF','txn:end','freeze','dropIndex','40PzORvG','system:type_drop','system:ready','exit','477164fiDufQ','open','ready','system:bus_state_change','ref:violation','ttl:set','stack','resetting','index:drop','item:update','system:clock_change','close','7904840fYHmAQ','env:removed','error','license:removed','index:registered','message','halted','views','stopped','registerType','env:opened','postMessage','license:invalid','created','6469197ZlpKxH','bus:proc','6333669CzErdh','license:activated','item:remove','dropSchema','stopping','name','_runBootstrapScanPhases','setSchema','registerIndex','type:drop','license:added','fts:drop','system:poke','schema:drop','1030jxVTjr','creating','progress','index:reset','dropping','bus:env_release'];_0x5131=function(){return _0x41b74c;};return _0x5131();}module[_0x58fea7(0xa6)]=okdbViewsBootstrapWorker;
|