@kedem/okdb 2.3.4 → 2.4.0

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.
Files changed (60) hide show
  1. package/CHANGELOG.md +366 -0
  2. package/algorithm-worker-thread.js +1 -1
  3. package/bin/okdb.js +1 -1
  4. package/docs/auth-and-sync.md +28 -4
  5. package/docs/auth-permissions.md +19 -6
  6. package/docs/change-log.md +79 -59
  7. package/docs/data-model.md +20 -18
  8. package/docs/deployment.md +25 -0
  9. package/docs/diagnostics.md +59 -17
  10. package/docs/embeddings.md +57 -6
  11. package/docs/files.md +1 -1
  12. package/docs/fts.md +50 -5
  13. package/docs/functions.md +21 -8
  14. package/docs/http-api.md +139 -98
  15. package/docs/http-cluster.md +30 -8
  16. package/docs/indexes.md +5 -4
  17. package/docs/logging.md +18 -0
  18. package/docs/migration.md +94 -2
  19. package/docs/pipelines.md +6 -1
  20. package/docs/plugins.md +12 -18
  21. package/docs/process-registry.md +50 -39
  22. package/docs/processors.md +40 -22
  23. package/docs/querying.md +50 -36
  24. package/docs/queue.md +110 -14
  25. package/docs/subscriptions.md +35 -24
  26. package/docs/sync.md +96 -37
  27. package/docs/time-machine.md +23 -17
  28. package/docs/transactions.md +11 -19
  29. package/docs/ttl.md +118 -67
  30. package/docs/upgrade-2.0.md +2 -2
  31. package/docs/views.md +71 -52
  32. package/okdb-functions-sandbox-worker.js +1 -1
  33. package/okdb-http-worker-child.js +1 -1
  34. package/okdb-views-bootstrap-worker.js +1 -1
  35. package/okdb.js +1 -1
  36. package/package.json +1 -1
  37. package/public/sections/db/parts/type-viewer.ok.js +1 -1
  38. package/public/sections/embeddings/parts/engines-overview.ok.js +1 -1
  39. package/public/sections/queue/parts/queue-jobs.ok.js +1 -1
  40. package/public/sections/system/modals/data-ops-modal.ok.js +1 -1
  41. package/types/environment.d.ts +320 -52
  42. package/types/features/admin.d.ts +8 -2
  43. package/types/features/api.d.ts +10 -16
  44. package/types/features/auth.d.ts +135 -16
  45. package/types/features/embeddings.d.ts +639 -31
  46. package/types/features/engines.d.ts +368 -14
  47. package/types/features/files.d.ts +2 -4
  48. package/types/features/fts.d.ts +98 -26
  49. package/types/features/functions.d.ts +175 -15
  50. package/types/features/mcp.d.ts +23 -10
  51. package/types/features/pipelines.d.ts +268 -9
  52. package/types/features/queue.d.ts +230 -34
  53. package/types/features/sync.d.ts +177 -14
  54. package/types/features/time-machine.d.ts +117 -16
  55. package/types/features/views.d.ts +230 -39
  56. package/types/index.d.ts +357 -254
  57. package/types/okdb.d.ts +377 -0
  58. package/types/options.d.ts +309 -48
  59. package/public/test-cron-input.html +0 -60
  60. package/public/test-json-input.html +0 -280
@@ -1 +1 @@
1
- 'use strict';const _0x3b4fb0=_0x55dd;function _0x2fbd(){const _0x35e54d=['rowKey',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','license:activated','loop-lag','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','_caps','publishChildRow','_lastCpuWindowMs','fanout','ITEM_UPDATE','heartbeatMs','ENV_CLOSING_RETRY','txn:start','none','transaction','single','change','SIGKILL','http-server','system:bus_state_change','ready','FTS_REGISTERED','message','parkedNow','setDesired','open','cli','./okdb','ORPHAN\x20(env-closed\x20write)','split','registry-publish','_log','ms\x20mean=','queue-worker','waiting','_coordinator','_buildOwnRow','decommissioning','_kind','_bpParkedTotal',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','_writer','cpuPct','_putRowAsync','_nodeDb','removeNode','fork','compact','resolve','_closed','markClosed','dead','updateSupervisedChildStats','getChanges','afterWrite','mkdirSync','isDead','_seen','listNodes','FTS_RESET','clusterStatusView','building','cluster','treeView','_envs','SYSTEM_STOPPED','\x20writer{depth=','namespace','_isReader','_removeRowAsync','attach','stats','__vocab/version','dropSchema','add','_systemEnv','options',':want','_lastPublishAt','entry','list','isWorker','ITEM_CREATE','claimGated','rss','processor:ready','remove','all','license:added','committed','REMOVE','_collectSingletonClaims','tryAcquire','_enableChangelog','keys','uncaughtException','_threadStats','1171310wrRBoe','running','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','~lock','2.3.4','stopping','primary','[okdb-cluster]\x20respawning\x20worker\x20slot=','string','processor:progress','crypto','hard-killed','next','compaction','lifecycle','beforeWrite','_publishFailWarned','_cmd','stack','processor:paused','setupPrimary','warn','nodesView','_processStartedAt','parse','raw-put','_db','transactionSync','\x20===','exit','prependListener','_statusEnv','participate','_role','error:\x20','_handlePoke','ppid','ms\x20on\x20env=','_singletonLock','dropType','user','halted','ITEM_REMOVE','ttl:clear','function','--inspect','_instanceId','\x20\x20(no\x20env\x20draining)','_clusterOrphanWatch','\x20statusEnv=','map','schema:set','_versionSkewWarned','ephemeral','procmodeack/','dedupeMax','_putRowSync','_onItem','_groupByProcess','env','memoryUsage','node:events','processor','started','engines','push','_inflight','setTtl','true','cursorKey','_wantDbHandle','migrations','http','platform','loop-lag\x20','\x20drainAge=','processor:retry','cluster-wide','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','_enqueuedAt','system:env_release','_sampleOwnStats','sync','starting','runtimeProcessesView','commitsPerSec','8AwiasC','splice','_dedupeMax','_clusterWorkerAttached','_report','_lock','test','fn-runner','_maybePublish','system:poke','http\x20worker\x20child\x20failed:\x20','index:drop','setSchema','_handleInProcess','sort','commit','ms\x20p99=','nodeKey','item:create','indexOf','start','bumpCmd','72726WgOMyF','flushDebounce','ESRCH','processor:resumed','--print','deregisterSelf','getRange','addSupervisedChild','startHeartbeat','system:stopped','_rootDb','INDEX_PROGRESS','openDB','ingest','bus:poke','INDEX_REGISTERED','processor:error','maxExtra','filter','_released','depth','recent\x20writes\x20(newest\x20first)','registerIndex','process','listen','stderr','attachFeed','processingStatusView','disable','_getType','unref','_quantum','_onTick','mode','_buildChildRow','setOwnMeta','item:update','info','\x20@\x20','_drain','write','_nodeDbFor','kill','_outstanding','heapTotal','\x20\x20#','send','putSync','processorId','system:clock_change','_onPoke','_started','view:progress','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','number','now','_lockDb','values','decommissioned','getProcess','_hbTimer','~processes','appendFileSync','shift','percentile','SYSTEM_PROC','label','code','okdb-writer:\x20env\x20closing\x20—\x20retry','_listenAddr','processors','toISOString','_heldTotal','ttlMs','uptime','ms\x20env=','close','license:removed','version','_buckets','_lastCpuPct','--eval','reap','meta','maxMs','isActive','_nodeDbCache','online','msg','path','field:resolver_registered','\x20(slot=','__esModule','busy','join','[okdb-cluster]\x20primary\x20pid=','seq','supervisorKey','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','count','processKey','\x20parkedNow=','__okdbCluster','_singletonLocks','startsWith','SYNC_COMMITS','bus:type_drop','unique:violation_resolved','getDesired','cpuUsage','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','load','_desired','\x20oldestPendingMs=','6924910QgGpnC','ms\x20activeWriters=','_flushTimer','slice','freeze','removeSupervisedChild','resetting','_admissionTimer','_draining','toFixed','_activateProcesses','entries','_ensureDesired','fast','resetIndex','publishOwnRow','startedAt','replace','_wantDb','creating','enabled','\x20pid=','respawnTimer','515OcrkpI','type:registered','length','unclaimed','okdb-writer[','resetFts','\x20forked\x20','value','repeat','mean','getCmd','_migrateVocab','inflightAgesMs','threads','ttl:expired','stop','_acquiredAt','call','feed:','_nodeDead','_adminRelay','procmode/','_heartbeatInFlight','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','state','inspect','_heartbeatTimer','registerType','object','_highWater','getClock','removeSync','stopHeartbeat','ms\x20busy=','sandbox','listAll','_holderDead','_onProcEvent','has','singletonClaims','\x20ipc\x20error:\x20','pushEphemeral','drain','status','node/','execArgv','(worst\x20','enable','_drainOne','min','_pending','slot','\x20—\x20','quantum','confirm','reportThreadStats','events','selfKey','\x20in\x20','acquiredAt','_committed','_selfKey','get','host','error','sync:apply','_collectWriterFacet','randomUUID','data','heapUsed','SYSTEM_POKE','okdb-diag.','_bpWaiters','size','exports','_changefeed','caps','_clusterOnMessage','resetReadTxn','stringify','~processes:desired','embedded','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','isEnabled','index:registered','11218446Nqvvgg','fromEntries','decommission','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','assign','deaths','ref:violation','\x20worker(s)\x20remaining','set','round','expiresAt','_markSeen','40lvZwKR','register','process\x20','children','system','reset','_desiredOverlay','_participate','put','reject','noteListenAddr','\x0a===\x20OKDB_DIAG\x20','listenAddr','\x20while\x20this\x20process\x20runs\x20','max','hasDesired','stopped','detachConsole','_refreshDesiredSnapshot','cluster:','holder','raw-remove','txn:rollback','_cursors','role','okdb','FTS_DROP','\x20times\x20in\x20','_startedAt','index:progress','registry\x20publish\x20failing:\x20','default','catch','async','slotKey','draining','clearThreadStats','ttl:set','off','_publishNow','note','\x0a\x20\x20\x20\x20\x20\x20','external','listDesired','tierList','_startHeartbeat','log','consecutiveFailures','epoch','delete','_admissionStarted','index:reset','8183042FQVOzb','_key','_startAdmission','release','find','_rawDb','_isWriter','disconnect','_held','floor','_rowKey','env:opened','_onStop','clear','ms\x20(attempt\x20','once','cpus','dropFts','hostname','system:ready','200775mxTCYg','ms\x20max=','INDEX_READY','_baselines','dumpedAt','processes','_windowCbs','pid','_flushDebounce','processorsView',');\x20','fts:drop','recordWrite','[okdb-cluster]\x20worker\x20pid=','offWindow','txn:end','fts:registered','emit','_lastCpuAt','_supervisorKey','_buildProcessingFacet','_scheduleFlush','extend','type','flushLmdb','allSettled','_timer','clearTtl','processing','_durs','copy','isHeld','1624498jGPsKR','system:type_drop','prototype','_ownMeta','then','_done','view','setLogger','dropping','putNode','_sandbox','level','includes','_servingEngines','updatedAt','childTransaction','oldestPendingMs','kind','killable','_children','[okdb-cluster]\x20','signalWant'];_0x2fbd=function(){return _0x35e54d;};return _0x2fbd();}(function(_0x1f2244,_0x182d0c){const _0x32e69b=_0x55dd,_0x5b3ea0=_0x1f2244();while(!![]){try{const _0x457f38=-parseInt(_0x32e69b(0x359))/0x1+parseInt(_0x32e69b(0x2e1))/0x2+-parseInt(_0x32e69b(0x2c1))/0x3*(-parseInt(_0x32e69b(0x279))/0x4)+-parseInt(_0x32e69b(0x218))/0x5*(-parseInt(_0x32e69b(0x3c5))/0x6)+parseInt(_0x32e69b(0x2ad))/0x7+parseInt(_0x32e69b(0x3af))/0x8*(-parseInt(_0x32e69b(0x26d))/0x9)+-parseInt(_0x32e69b(0x201))/0xa;if(_0x457f38===_0x182d0c)break;else _0x5b3ea0['push'](_0x5b3ea0['shift']());}catch(_0x1bf491){_0x5b3ea0['push'](_0x5b3ea0['shift']());}}}(_0x2fbd,0xc08c1));function _0x55dd(_0x55c56c,_0xfa2227){_0x55c56c=_0x55c56c-0x1cb;const _0x2fbdac=_0x2fbd();let _0x55dd18=_0x2fbdac[_0x55c56c];return _0x55dd18;}var require$$0$5=require(_0x3b4fb0(0x313)),require$$1$1=require('cluster'),require$$1=require(_0x3b4fb0(0x1e7)),require$$0$3=require('os'),require$$2=require(_0x3b4fb0(0x363)),require$$0=require('node:perf_hooks'),require$$0$2=require('perf_hooks'),require$$0$1=require('fs'),require$$0$4=require(_0x3b4fb0(0x396));function getDefaultExportFromCjs(_0x49b1e5){const _0x55c1be=_0x3b4fb0;return _0x49b1e5&&_0x49b1e5[_0x55c1be(0x1ea)]&&Object[_0x55c1be(0x2e3)]['hasOwnProperty'][_0x55c1be(0x229)](_0x49b1e5,_0x55c1be(0x298))?_0x49b1e5['default']:_0x49b1e5;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x42820e=_0x3b4fb0;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x53288b={'PUT':'put','REMOVE':'remove','INDEX_DROP':'dropIndex','INDEX_REGISTER':_0x42820e(0x3db),'INDEX_RESET':_0x42820e(0x20f),'TYPE_REGISTER':_0x42820e(0x233),'TYPE_DROP':_0x42820e(0x380),'FTS_REGISTER':'registerFts','FTS_DROP':_0x42820e(0x2be),'FTS_RESET':_0x42820e(0x21d),'SCHEMA_SET':_0x42820e(0x3bb),'SCHEMA_DROP':_0x42820e(0x341),'TTL_SET':_0x42820e(0x39c),'TTL_CLEAR':_0x42820e(0x2dc)},_0x2c5487={'SYSTEM_READY':_0x42820e(0x2c0),'FIELD_RESOLVER_REGISTERED':_0x42820e(0x1e8),'SYSTEM_STOPPED':_0x42820e(0x3ce),'SYSTEM_CLOCK_CHANGE':_0x42820e(0x3f6),'SYSTEM_POKE':_0x42820e(0x3b8),'SYSTEM_DRAIN':'system:drain','SYSTEM_TYPE_DROP':_0x42820e(0x2e2),'SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x42820e(0x30b),'ITEM_CREATE':_0x42820e(0x3c1),'ITEM_UPDATE':_0x42820e(0x3e9),'ITEM_REMOVE':'item:remove','INDEX_RESET':_0x42820e(0x2ac),'INDEX_READY':'index:ready','INDEX_PROGRESS':_0x42820e(0x296),'VIEW_PROGRESS':_0x42820e(0x3f9),'INDEX_DROP':_0x42820e(0x3ba),'INDEX_REGISTERED':_0x42820e(0x26c),'FTS_REGISTERED':_0x42820e(0x2d1),'FTS_DROP':_0x42820e(0x2cc),'FTS_RESET':'fts:reset','SCHEMA_SET':_0x42820e(0x38c),'SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0x42820e(0x1fa),'REF_VIOLATION':_0x42820e(0x273),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x42820e(0x259),'TXN_START':_0x42820e(0x304),'TXN_END':_0x42820e(0x2d0),'TXN_ROLLBACK':_0x42820e(0x28f),'TYPE_REGISTERED':_0x42820e(0x219),'TYPE_DROP':'type:drop','ENV_OPENED':_0x42820e(0x2b8),'ENV_REMOVED':'env:removed','SYSTEM_ENV_RELEASE':_0x42820e(0x3a9),'TTL_EXPIRED':_0x42820e(0x226),'TTL_SET':_0x42820e(0x29e),'TTL_CLEAR':_0x42820e(0x384),'LICENSE_INVALID':'license:invalid','LICENSE_ADDED':_0x42820e(0x350),'LICENSE_ACTIVATED':_0x42820e(0x2fa),'LICENSE_REMOVED':_0x42820e(0x1db)},_0x2f3202={'CREATING':_0x42820e(0x214),'RESETTING':_0x42820e(0x207),'READY':_0x42820e(0x30c),'DROPPING':_0x42820e(0x2e9),'WAITING':_0x42820e(0x31a),'ERROR':_0x42820e(0x258)},_0xadee31={'CREATED':'created','STARTING':_0x42820e(0x3ac),'STARTED':_0x42820e(0x398),'STOPPING':_0x42820e(0x35e),'STOPPED':_0x42820e(0x289)},_0x32dd5d={'CREATING':'creating','READY':'ready','HALTED':_0x42820e(0x382),'STOPPED':_0x42820e(0x289),'RESETTING':_0x42820e(0x207)},_0x1bb843=Object[_0x42820e(0x205)]({'POKE':_0x42820e(0x3d3),'DRAIN':'bus:drain','TYPE_DROP':_0x42820e(0x1f9),'PROC':'bus:proc','ENV_RELEASE':'bus:env_release'});return okdbEnums={'BUS_EVENTS':_0x1bb843,'CHANGE_ACTIONS':_0x53288b,'EVENTS':_0x2c5487,'INDEX_STATE':_0x2f3202,'OKDB_STATE':_0xadee31,'VIEW_STATE':_0x32dd5d},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x3bebcb=_0x3b4fb0;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x4026e7,performance:_0x583838}=require$$0,_0xb06de1=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x3bebcb(0x39d),_0x56118b=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x4f924c=process.env.OKDB_LOOP_LAG_ALL==='1',_0x30e64=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x4d5af7{constructor(){const _0x10f9a8=_0x3bebcb;this[_0x10f9a8(0x215)]=_0xb06de1,this[_0x10f9a8(0x1dd)]=new Map(),this['_h']=null,this[_0x10f9a8(0x2db)]=null,this[_0x10f9a8(0x3f8)]=![],this[_0x10f9a8(0x317)]=(_0x34a1ed,_0x21f342)=>process[_0x10f9a8(0x3de)]['write'](_0x34a1ed+(_0x21f342?'\x20'+JSON[_0x10f9a8(0x267)](_0x21f342):'')+'\x0a');}[_0x3bebcb(0x3fc)](){return _0x583838['now']();}[_0x3bebcb(0x2e8)](_0x553573){const _0x250908=_0x3bebcb;if(typeof _0x553573===_0x250908(0x385))this['_log']=_0x553573;}[_0x3bebcb(0x2a1)](_0x398d0d,_0x6125fd,_0x3656f5){const _0x1d8516=_0x3bebcb;if(!this[_0x1d8516(0x215)])return;let _0x36bf9e=this[_0x1d8516(0x1dd)][_0x1d8516(0x256)](_0x398d0d);!_0x36bf9e&&(_0x36bf9e={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x1d8516(0x1dd)][_0x1d8516(0x275)](_0x398d0d,_0x36bf9e)),_0x36bf9e['ms']+=_0x6125fd,_0x36bf9e[_0x1d8516(0x1f2)]+=0x1,_0x6125fd>_0x36bf9e['maxMs']&&(_0x36bf9e[_0x1d8516(0x1e2)]=_0x6125fd,_0x36bf9e[_0x1d8516(0x3d6)]=_0x3656f5||'');}[_0x3bebcb(0x3c3)](_0x4e9de5){const _0x4f7163=_0x3bebcb;if(!this['enabled']||this[_0x4f7163(0x3f8)])return;this[_0x4f7163(0x3f8)]=!![];if(_0x4e9de5)this[_0x4f7163(0x317)]=_0x4e9de5;this['_h']=_0x4026e7({'resolution':0xa}),this['_h'][_0x4f7163(0x247)](),this[_0x4f7163(0x2db)]=setInterval(()=>this[_0x4f7163(0x3b3)](),_0x56118b);if(this[_0x4f7163(0x2db)]['unref'])this[_0x4f7163(0x2db)]['unref']();}['onWindow'](_0x1f14b1){const _0x3f017f=_0x3bebcb;if(!this[_0x3f017f(0x2c7)])this['_windowCbs']=new Set();this[_0x3f017f(0x2c7)]['add'](_0x1f14b1);if(!this[_0x3f017f(0x3f8)])this['_startAdmission']();}[_0x3bebcb(0x2cf)](_0x103a85){const _0x2a7aea=_0x3bebcb;this[_0x2a7aea(0x2c7)]?.['delete'](_0x103a85);}[_0x3bebcb(0x2af)](){const _0x17fd32=_0x3bebcb;if(this[_0x17fd32(0x2ab)])return;this[_0x17fd32(0x2ab)]=!![];!this['_h']&&(this['_h']=_0x4026e7({'resolution':0xa}),this['_h'][_0x17fd32(0x247)]());const _0xc8cee9=_0x56118b;this['_admissionTimer']=setInterval(()=>{const _0x84bd13=_0x17fd32,_0x450a63=this['_h'];if(!_0x450a63)return;const _0x43cd21=_0x450a63['percentile'](0x63)/0xf4240,_0x38095c=_0x450a63[_0x84bd13(0x287)]/0xf4240,_0xa25610=_0x450a63[_0x84bd13(0x221)]/0xf4240;_0x450a63[_0x84bd13(0x27e)]();if(this[_0x84bd13(0x2c7)])for(const _0x3ff269 of this[_0x84bd13(0x2c7)]){try{_0x3ff269({'p99Ms':_0x43cd21,'maxMs':_0x38095c,'meanMs':_0xa25610,'reportMs':_0xc8cee9});}catch{}}},_0xc8cee9);if(this[_0x17fd32(0x208)][_0x17fd32(0x3e3)])this[_0x17fd32(0x208)]['unref']();}[_0x3bebcb(0x3b3)](){const _0x16835c=_0x3bebcb,_0x41ead0=this['_h'],_0x2640be=_0x41ead0['max']/0xf4240,_0x2aa1d5=_0x41ead0[_0x16835c(0x1ce)](0x63)/0xf4240,_0x5a62dd=_0x41ead0['mean']/0xf4240;_0x41ead0['reset']();const _0x242b4c=[...this[_0x16835c(0x1dd)][_0x16835c(0x20c)]()][_0x16835c(0x38b)](([_0x225cbc,_0x5f26fd])=>({'label':_0x225cbc,..._0x5f26fd}))[_0x16835c(0x3bd)]((_0x101e12,_0x412cc8)=>_0x412cc8['ms']-_0x101e12['ms'])['slice'](0x0,0x8);this[_0x16835c(0x1dd)][_0x16835c(0x2ba)]();const _0x29b0a5=_0x242b4c['reduce']((_0x2043d9,_0x386663)=>_0x2043d9+_0x386663['ms'],0x0),_0x5957af=_0x242b4c[_0x16835c(0x38b)](_0x394162=>_0x394162[_0x16835c(0x1d0)]+'='+_0x394162['ms']['toFixed'](0x0)+'ms/'+_0x394162['count']+(_0x394162[_0x16835c(0x1e2)]>0x5?_0x16835c(0x246)+_0x394162['maxMs'][_0x16835c(0x20a)](0x0)+'ms'+(_0x394162[_0x16835c(0x3d6)]?'\x20'+_0x394162[_0x16835c(0x3d6)]:'')+')':''));(_0x4f924c||_0x2640be>=_0x30e64)&&this[_0x16835c(0x317)](_0x16835c(0x3a3)+_0x56118b+_0x16835c(0x2c2)+_0x2640be[_0x16835c(0x20a)](0x0)+_0x16835c(0x3bf)+_0x2aa1d5[_0x16835c(0x20a)](0x0)+_0x16835c(0x318)+_0x5a62dd[_0x16835c(0x20a)](0x0)+_0x16835c(0x239)+_0x29b0a5[_0x16835c(0x20a)](0x0)+'ms'+(_0x5957af[_0x16835c(0x21a)]?'\x20│\x20'+_0x5957af['join']('\x20\x20'):''),{'feature':_0x16835c(0x2fb)});if(this[_0x16835c(0x2c7)])for(const _0x440f7d of this[_0x16835c(0x2c7)]){try{_0x440f7d({'p99Ms':_0x2aa1d5,'maxMs':_0x2640be,'meanMs':_0x5a62dd,'reportMs':_0x56118b});}catch{}}}[_0x3bebcb(0x227)](){const _0x31aab9=_0x3bebcb;if(this[_0x31aab9(0x2db)])clearInterval(this[_0x31aab9(0x2db)]);if(this['_h'])this['_h'][_0x31aab9(0x3e1)]();this['_timer']=null,this['_h']=null,this[_0x31aab9(0x3f8)]=![];}}const _0x19b181=new _0x4d5af7();if(_0x19b181[_0x3bebcb(0x215)])_0x19b181[_0x3bebcb(0x3c3)]();return okdbLoopMonitor={'LOOP':_0x19b181},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x376412=require$$0$1,_0x40d66b=require$$1;let _0x280b67,_0x11aadf,_0x28c07d,_0x419227,_0x1d90eb,_0x11bc3d,_0x362ad6,_0x3f25b1=![];const _0x5e875f=new Set();let _0x50c4c5=null;const _0x2e27e0=new Map();function _0x55d051(){const _0x1627d6=_0x55dd;if(_0x280b67!==undefined)return _0x280b67;_0x280b67=process.env.OKDB_DIAG==='1';if(!_0x280b67)return![];_0x11aadf=process.env.OKDB_DIAG_STACK==='1',_0x419227=Math[_0x1627d6(0x287)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x28c07d=new Array(_0x419227),_0x1d90eb=0x0,_0x11bc3d=0x0,_0x362ad6=process.env.OKDB_DIAG_DIR||null;if(_0x362ad6)try{_0x376412[_0x1627d6(0x32f)](_0x362ad6,{'recursive':!![]});}catch{}return!![];}function _0xb7a045(){return _0x280b67===undefined?_0x55d051():_0x280b67;}function _0x5d1c05(_0x2d184f,_0x429ede){const _0x17ed5c=_0x55dd;if(_0x280b67===undefined?!_0x55d051():!_0x280b67)return;let _0x2c09bb;if(_0x11aadf){const _0x4f83e1=new Error()[_0x17ed5c(0x36b)]||'';_0x2c09bb=_0x4f83e1['split']('\x0a')[_0x17ed5c(0x204)](0x3)['map'](_0x309651=>_0x309651['trim']())[_0x17ed5c(0x3d7)](Boolean)['slice'](0x0,0x8);}_0x28c07d[_0x1d90eb]={'seq':_0x11bc3d++,'t':Date[_0x17ed5c(0x3fc)](),'env':_0x2d184f,'kind':_0x429ede||_0x17ed5c(0x3be),'stack':_0x2c09bb},_0x1d90eb=(_0x1d90eb+0x1)%_0x419227;}function _0x53a055(_0x2f3609){const _0x1194d3=_0x55dd,_0x18d4ce=[];for(let _0xa35f30=0x0;_0xa35f30<_0x419227;_0xa35f30++){const _0x3c0e4b=_0x28c07d[(_0x1d90eb-0x1-_0xa35f30+_0x419227*0x2)%_0x419227];if(!_0x3c0e4b)continue;_0x18d4ce[_0x1194d3(0x39a)](_0x3c0e4b);if(_0x18d4ce[_0x1194d3(0x21a)]>=_0x2f3609)break;}return _0x18d4ce;}function _0x1c5278(_0x487644){const _0x428379=_0x55dd;try{process[_0x428379(0x3de)][_0x428379(0x3ed)](_0x487644+'\x0a');}catch{}if(_0x362ad6)try{_0x376412[_0x428379(0x1cc)](_0x40d66b[_0x428379(0x1ec)](_0x362ad6,_0x428379(0x25f)+process['pid']+'.log'),_0x487644+'\x0a');}catch{}}function _0x5a3e86(_0x2671f2){const _0x3715e1=_0x55dd,_0x1a33fe=_0x53a055(_0x2671f2);if(!_0x1a33fe[_0x3715e1(0x21a)])return _0x3715e1(0x3fa);const _0x44dca8=Date[_0x3715e1(0x3fc)]();return _0x1a33fe[_0x3715e1(0x38b)](_0xa6a50b=>{const _0x57ca4e=_0x3715e1,_0x27dd44=_0x57ca4e(0x3f2)+_0xa6a50b[_0x57ca4e(0x1ee)]+'\x20-'+(_0x44dca8-_0xa6a50b['t'])+_0x57ca4e(0x1d9)+_0xa6a50b[_0x57ca4e(0x394)]+'\x20'+_0xa6a50b[_0x57ca4e(0x2f2)];return _0xa6a50b[_0x57ca4e(0x36b)]&&_0xa6a50b[_0x57ca4e(0x36b)][_0x57ca4e(0x21a)]?_0x27dd44+_0x57ca4e(0x2a2)+_0xa6a50b[_0x57ca4e(0x36b)]['join'](_0x57ca4e(0x2a2)):_0x27dd44;})['join']('\x0a');}function _0x144a1d(_0x140ec8,_0x1b4bc2){const _0x300463=_0x55dd,_0xf6a717=_0x300463(0x284)+_0x140ec8+'\x20@\x20'+new Date()[_0x300463(0x1d5)]()+_0x300463(0x216)+process['pid']+_0x300463(0x375),_0x456962=[_0xf6a717,_0x300463(0x37b)+(_0x1b4bc2&&_0x1b4bc2[_0x300463(0x36b)]?_0x1b4bc2[_0x300463(0x36b)][_0x300463(0x315)]('\x0a')[0x0]:_0x1b4bc2),_0x300463(0x3da)+(_0x11aadf?'':_0x300463(0x22f))+':',_0x5a3e86(0x18),_0x5bb131(),'='[_0x300463(0x220)](_0xf6a717[_0x300463(0x21a)]-0x1)];_0x1c5278(_0x456962['join']('\x0a'));}function _0x51ad5e(_0x1b0f2c){const _0xb97767=_0x55dd;if(!_0xb7a045())return;const _0x3f17de=String(_0x1b0f2c&&_0x1b0f2c['message']||_0x1b0f2c||''),_0x21d915=/already closed|environment is already|invalid read txn|reset an invalid/i[_0xb97767(0x3b5)](_0x3f17de);_0x144a1d(_0x21d915?_0xb97767(0x314):'uncaughtException',_0x1b0f2c);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x21d915)return;try{console[_0xb97767(0x258)](_0x1b0f2c&&_0x1b0f2c[_0xb97767(0x36b)]?_0x1b0f2c[_0xb97767(0x36b)]:_0x1b0f2c);}catch{}process[_0xb97767(0x376)](0x1);}function _0x3d8de8(_0x370e4c){const _0x43ab3f=_0x55dd;if(!_0xb7a045())return;const _0x29e7af=String(_0x370e4c&&_0x370e4c['message']||_0x370e4c||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x43ab3f(0x3b5)](_0x29e7af)&&_0x144a1d(_0x43ab3f(0x2fc),_0x370e4c);}function _0x5bb131(){const _0x3f464f=_0x55dd,_0x19e245=['drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):'];let _0xe1150a=![];for(const _0x8f253f of _0x5e875f){const _0x4b2b88=_0x8f253f&&_0x8f253f['_envs'];if(!_0x4b2b88)continue;for(const [_0x24d550,_0x2c2985]of _0x4b2b88){const _0x2320d1=_0x2c2985&&_0x2c2985[_0x3f464f(0x31b)]&&_0x2c2985[_0x3f464f(0x31b)][_0x3f464f(0x2e7)];if(!_0x2320d1)continue;let _0x36c237,_0x5c8240;try{_0x36c237=Atomics['load'](_0x2320d1,0x0),_0x5c8240=Atomics[_0x3f464f(0x1fe)](_0x2320d1,0x1);}catch{continue;}if(_0x36c237===0x0)continue;_0xe1150a=!![];const _0x2f103e=_0x36c237>0x0?'SWAP':_0x3f464f(0x2df),_0x5618d0=Date[_0x3f464f(0x3fc)]()-Math['abs'](_0x36c237)*0x3e8,_0x458d34=((()=>{const _0x228eb7=_0x3f464f;try{return _0x2c2985[_0x228eb7(0x321)]&&_0x2c2985[_0x228eb7(0x321)][_0x228eb7(0x243)]?_0x2c2985[_0x228eb7(0x321)][_0x228eb7(0x243)]():null;}catch{return null;}})());_0x19e245['push']('\x20\x20env='+_0x24d550+'\x20phase='+_0x2f103e+_0x3f464f(0x3a4)+_0x5618d0+_0x3f464f(0x202)+_0x5c8240+(_0x458d34?_0x3f464f(0x33a)+_0x458d34[_0x3f464f(0x3d9)]+_0x3f464f(0x200)+_0x458d34[_0x3f464f(0x2f1)]+_0x3f464f(0x1f4)+_0x458d34[_0x3f464f(0x30f)]+'}':''));}}if(!_0xe1150a)_0x19e245['push'](_0x3f464f(0x388));return _0x19e245[_0x3f464f(0x1ec)]('\x0a');}function _0x16a629(){const _0x3150cc=_0x55dd;if(!_0xb7a045())return;const _0x1c6374=Math[_0x3150cc(0x287)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x15ed38=Date[_0x3150cc(0x3fc)]();for(const _0x1ea42a of _0x5e875f){const _0x292082=_0x1ea42a&&_0x1ea42a['_envs'];if(!_0x292082)continue;for(const [_0x1a2c46,_0x2ea26d]of _0x292082){const _0x8302dc=_0x2ea26d&&_0x2ea26d[_0x3150cc(0x31b)]&&_0x2ea26d[_0x3150cc(0x31b)]['view'];if(!_0x8302dc)continue;let _0x303ef4;try{_0x303ef4=Atomics['load'](_0x8302dc,0x0);}catch{continue;}const _0x22c844=_0x1ea42a[_0x3150cc(0x1e7)]+'|'+_0x1a2c46;if(_0x303ef4<=0x0){_0x2e27e0['delete'](_0x22c844);continue;}const _0x250dfc=_0x15ed38-_0x303ef4*0x3e8,_0xc02f2=_0x2e27e0[_0x3150cc(0x256)](_0x22c844);if(_0x250dfc<_0x1c6374)continue;if(_0xc02f2&&_0x15ed38-_0xc02f2[_0x3150cc(0x2c5)]<_0x1c6374)continue;_0x2e27e0[_0x3150cc(0x275)](_0x22c844,{'firstTs':_0xc02f2?_0xc02f2['firstTs']:_0x303ef4,'dumpedAt':_0x15ed38});const _0x216b05=_0x3150cc(0x3a7)+_0x250dfc+_0x3150cc(0x37e)+_0x1a2c46+_0x3150cc(0x3eb)+new Date()[_0x3150cc(0x1d5)]()+_0x3150cc(0x216)+process[_0x3150cc(0x2c8)]+_0x3150cc(0x375);_0x1c5278([_0x216b05,_0x5bb131(),'='[_0x3150cc(0x220)](_0x216b05[_0x3150cc(0x21a)]-0x1)][_0x3150cc(0x1ec)]('\x0a'));}}}function _0x5a3795(){const _0x4cb95f=_0x55dd;if(!_0xb7a045()||_0x3f25b1)return;_0x3f25b1=!![],process[_0x4cb95f(0x377)](_0x4cb95f(0x357),_0x51ad5e),process[_0x4cb95f(0x377)]('unhandledRejection',_0x3d8de8);const _0x566ff2=Math['max'](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x50c4c5=setInterval(_0x16a629,_0x566ff2);if(_0x50c4c5[_0x4cb95f(0x3e3)])_0x50c4c5[_0x4cb95f(0x3e3)]();}function _0x333d65(_0x4c7c56){const _0x3ffdb5=_0x55dd;if(!_0xb7a045()||!_0x4c7c56)return;_0x5e875f[_0x3ffdb5(0x342)](_0x4c7c56),_0x5a3795();}function _0x3bdcd0(_0x38070d){const _0x8a3f8e=_0x55dd;_0x5e875f[_0x8a3f8e(0x2aa)](_0x38070d);}function _0xe3f763(){const _0x391c89=_0x55dd;if(!_0xb7a045())return{'enabled':![],'hint':_0x391c89(0x1f1)};return{'enabled':!![],'stackCapture':!!_0x11aadf,'recentWrites':_0x53a055(0x10),'drain':_0x5bb131()};}return okdbDiag={'isEnabled':_0xb7a045,'recordWrite':_0x5d1c05,'installDiag':_0x5a3795,'registerOkdb':_0x333d65,'unregisterOkdb':_0x3bdcd0,'snapshot':_0xe3f763},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x19bb83=_0x3b4fb0;if(hasRequiredOkdbWriter)return okdbWriter[_0x19bb83(0x262)];hasRequiredOkdbWriter=0x1;const {performance:_0x50317d}=require$$0$2,_0x57f24b=requireOkdbDiag(),_0x26f1c0=process.env.OKDB_COMMIT_MODE===_0x19bb83(0x3ab);class _0x59fcac{constructor(_0x29cd12){const _0x1bb2ea=_0x19bb83;this[_0x1bb2ea(0x394)]=_0x29cd12,this[_0x1bb2ea(0x39b)]=new Set(),this['_enqueuedAt']=new Map(),this[_0x1bb2ea(0x254)]=0x0,this[_0x1bb2ea(0x2de)]=[],this[_0x1bb2ea(0x2e6)]=[],this[_0x1bb2ea(0x235)]=Math[_0x1bb2ea(0x287)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x1bb2ea(0x3f0)]=0x0,this[_0x1bb2ea(0x260)]=[],this['_bpParkedTotal']=0x0,this[_0x1bb2ea(0x2b5)]=null,this['_heldTotal']=0x0,this['_nestedTotal']=0x0,this['_nestedWarned']=![];}async[_0x19bb83(0x306)](_0x131516,_0x45f67d){const _0x3698a0=_0x19bb83;if(_0x57f24b[_0x3698a0(0x26b)]())_0x57f24b[_0x3698a0(0x2cd)](this[_0x3698a0(0x394)]?.['name'],_0x45f67d);if(this[_0x3698a0(0x329)]){const _0x1f0cc8=new Error(_0x3698a0(0x1d2));_0x1f0cc8[_0x3698a0(0x1d1)]=_0x3698a0(0x303);throw _0x1f0cc8;}if(this[_0x3698a0(0x235)]>0x0){let _0x1661e4=![];while(this[_0x3698a0(0x3f0)]>=this[_0x3698a0(0x235)]&&!this[_0x3698a0(0x329)]){!_0x1661e4&&(_0x1661e4=!![],this[_0x3698a0(0x31f)]++),await new Promise(_0x6927c2=>this[_0x3698a0(0x260)][_0x3698a0(0x39a)](_0x6927c2));}if(this[_0x3698a0(0x329)]){const _0xe5af64=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0xe5af64[_0x3698a0(0x1d1)]=_0x3698a0(0x303);throw _0xe5af64;}}this[_0x3698a0(0x3f0)]++;const _0x46bf0c=this[_0x3698a0(0x394)]['_coordinator'];for(;;){while(this[_0x3698a0(0x2b5)])await this[_0x3698a0(0x2b5)];if(_0x46bf0c)await _0x46bf0c[_0x3698a0(0x368)]();if(!this['_held'])break;if(_0x46bf0c)_0x46bf0c['afterWrite']();}if(this[_0x3698a0(0x329)]){if(_0x46bf0c)_0x46bf0c[_0x3698a0(0x32e)]();this['_outstanding']--;if(this[_0x3698a0(0x260)]['length']&&this['_outstanding']<this[_0x3698a0(0x235)])this[_0x3698a0(0x260)][_0x3698a0(0x1cd)]()();const _0x15578c=new Error(_0x3698a0(0x1d2));_0x15578c['code']=_0x3698a0(0x303);throw _0x15578c;}const _0x56727f=_0x50317d[_0x3698a0(0x3fc)]();if(_0x26f1c0)try{const _0x214395=this['env']['db'][_0x3698a0(0x374)](_0x131516);this[_0x3698a0(0x254)]++;if(this['_durs'][_0x3698a0(0x39a)](_0x50317d[_0x3698a0(0x3fc)]()-_0x56727f)>0x100)this[_0x3698a0(0x2de)][_0x3698a0(0x1cd)]();if(this[_0x3698a0(0x2e6)][_0x3698a0(0x39a)](_0x50317d[_0x3698a0(0x3fc)]())>0x800)this[_0x3698a0(0x2e6)][_0x3698a0(0x1cd)]();return _0x214395;}finally{this[_0x3698a0(0x3f0)]--;if(this['_bpWaiters'][_0x3698a0(0x21a)]&&this['_outstanding']<this[_0x3698a0(0x235)])this[_0x3698a0(0x260)]['shift']()();if(_0x46bf0c)_0x46bf0c[_0x3698a0(0x32e)]();}let _0x3780b4=null;const _0x158569=()=>{const _0x4ca617=_0x3698a0,_0x3fad41=_0x131516();if(_0x3fad41&&typeof _0x3fad41[_0x4ca617(0x2e5)]===_0x4ca617(0x385)&&!_0x3780b4){this[_0x4ca617(0x1d6)]++;let _0x32335c;const _0xd26ccf=new Promise(_0x5382e0=>_0x32335c=_0x5382e0);this[_0x4ca617(0x2b5)]=_0xd26ccf,_0x3780b4=()=>{const _0x3870fa=_0x4ca617;if(this[_0x3870fa(0x2b5)]===_0xd26ccf)this[_0x3870fa(0x2b5)]=null;_0x32335c();};}return _0x3fad41;};let _0x487903;try{_0x487903=this[_0x3698a0(0x394)]['db'][_0x3698a0(0x2f0)](_0x158569);}catch(_0x47e93a){_0x487903=Promise[_0x3698a0(0x282)](_0x47e93a);}(!_0x487903||typeof _0x487903[_0x3698a0(0x2e5)]!==_0x3698a0(0x385))&&(this['_nestedTotal']++,!this['_nestedWarned']&&(this['_nestedWarned']=!![],console[_0x3698a0(0x36e)](_0x3698a0(0x21c)+(this[_0x3698a0(0x394)]?.['name']??'?')+_0x3698a0(0x2f8))),_0x487903=Promise[_0x3698a0(0x328)](_0x487903));const _0x23ba80=()=>{if(_0x3780b4)_0x3780b4();};_0x487903['then'](_0x23ba80,_0x23ba80),this['_inflight'][_0x3698a0(0x342)](_0x487903),this[_0x3698a0(0x3a8)][_0x3698a0(0x275)](_0x487903,_0x56727f);const _0x255be3=()=>{const _0x20301c=_0x3698a0;this[_0x20301c(0x39b)]['delete'](_0x487903),this[_0x20301c(0x3a8)][_0x20301c(0x2aa)](_0x487903),this['_committed']++,this[_0x20301c(0x3f0)]--;this[_0x20301c(0x260)][_0x20301c(0x21a)]&&this[_0x20301c(0x3f0)]<this[_0x20301c(0x235)]&&this[_0x20301c(0x260)][_0x20301c(0x1cd)]()();if(this[_0x20301c(0x2de)]['push'](_0x50317d[_0x20301c(0x3fc)]()-_0x56727f)>0x100)this[_0x20301c(0x2de)][_0x20301c(0x1cd)]();if(this[_0x20301c(0x2e6)]['push'](_0x50317d[_0x20301c(0x3fc)]())>0x800)this[_0x20301c(0x2e6)][_0x20301c(0x1cd)]();};_0x487903[_0x3698a0(0x2e5)](_0x255be3,_0x255be3);try{return await _0x487903;}finally{if(_0x46bf0c)_0x46bf0c[_0x3698a0(0x32e)]();}}['status'](){const _0xf0ecbb=_0x19bb83,_0x3c4db0=_0x50317d['now']();let _0x258435=0x0;for(const _0x4132de of this['_enqueuedAt'][_0xf0ecbb(0x3fe)]()){const _0x395b47=_0x3c4db0-_0x4132de;if(_0x395b47>_0x258435)_0x258435=_0x395b47;}let _0x3c569e=0x0;for(let _0x50ac41=this[_0xf0ecbb(0x2e6)][_0xf0ecbb(0x21a)]-0x1;_0x50ac41>=0x0;_0x50ac41--){if(_0x3c4db0-this[_0xf0ecbb(0x2e6)][_0x50ac41]>0x3e8)break;_0x3c569e++;}let _0x5fd250=0x0;if(this[_0xf0ecbb(0x2de)][_0xf0ecbb(0x21a)]){const _0x592137=[...this[_0xf0ecbb(0x2de)]][_0xf0ecbb(0x3bd)]((_0x49f96a,_0x2a4bac)=>_0x49f96a-_0x2a4bac);_0x5fd250=_0x592137[Math[_0xf0ecbb(0x249)](_0x592137[_0xf0ecbb(0x21a)]-0x1,Math[_0xf0ecbb(0x2b6)](_0x592137[_0xf0ecbb(0x21a)]*0.99))];}return{'depth':this['_inflight']['size'],'oldestPendingMs':Math['round'](_0x258435),'committed':this[_0xf0ecbb(0x254)],'commitsPerSec':_0x3c569e,'commitP99Ms':Math[_0xf0ecbb(0x276)](_0x5fd250),'parkedNow':this[_0xf0ecbb(0x260)][_0xf0ecbb(0x21a)],'parkedTotal':this['_bpParkedTotal'],'highWater':this['_highWater']};}[_0x19bb83(0x224)](){const _0x27c026=_0x19bb83,_0x537509=_0x50317d[_0x27c026(0x3fc)]();return[...this[_0x27c026(0x3a8)]['values']()]['map'](_0x1440f4=>Math[_0x27c026(0x276)](_0x537509-_0x1440f4))[_0x27c026(0x3bd)]((_0x4f442b,_0x3524ad)=>_0x3524ad-_0x4f442b);}[_0x19bb83(0x32a)](){const _0x21d9fb=_0x19bb83;this[_0x21d9fb(0x329)]=!![];for(const _0x4d8df8 of this['_bpWaiters'][_0x21d9fb(0x3b0)](0x0))_0x4d8df8();}async[_0x19bb83(0x242)](){const _0x7b708e=_0x19bb83;let _0xc1017f=0x0;while(this[_0x7b708e(0x39b)][_0x7b708e(0x261)]&&_0xc1017f++<0x3e8){await Promise[_0x7b708e(0x2da)]([...this[_0x7b708e(0x39b)]]);}}async[_0x19bb83(0x281)](_0x4efd5b,_0x4386d0,_0x3ca386,_0x5042cd){const _0x51c34b=_0x19bb83;return this[_0x51c34b(0x306)](()=>{const _0x5739b5=_0x51c34b;if(_0x5042cd===undefined)_0x4efd5b[_0x5739b5(0x3f4)](_0x4386d0,_0x3ca386);else _0x4efd5b[_0x5739b5(0x3f4)](_0x4386d0,_0x3ca386,_0x5042cd);},_0x51c34b(0x372));}async['remove'](_0x53c6fb,_0x55472b){const _0x1deed5=_0x19bb83;return this['transaction'](()=>_0x53c6fb[_0x1deed5(0x237)](_0x55472b),_0x1deed5(0x28e));}}async function _0x58fba9(_0x2cbde8,_0x2e2cb7){const _0x43d66a=_0x19bb83;if(_0x2e2cb7==null)_0x2e2cb7=Math['max'](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x51151c=_0x2cbde8?.['flushed'];if(!_0x51151c||typeof _0x51151c[_0x43d66a(0x2e5)]!==_0x43d66a(0x385))return;await Promise['race']([Promise['resolve'](_0x51151c)['catch'](()=>{}),new Promise(_0x3d6a8c=>{const _0x5b7d9b=_0x43d66a,_0x1f7eb3=setTimeout(_0x3d6a8c,_0x2e2cb7);if(_0x1f7eb3[_0x5b7d9b(0x3e3)])_0x1f7eb3['unref']();})]);}catch{}}function _0x188616(_0x575c72){const _0xb8a735=_0x19bb83;if(_0x26f1c0)return Promise[_0xb8a735(0x328)]();const _0x24f39d=_0x575c72?.[_0xb8a735(0x351)];return _0x24f39d&&typeof _0x24f39d[_0xb8a735(0x2e5)]===_0xb8a735(0x385)?_0x24f39d:Promise[_0xb8a735(0x328)]();}return okdbWriter['exports']=_0x59fcac,okdbWriter['exports'][_0x19bb83(0x2d9)]=_0x58fba9,okdbWriter['exports']['committed']=_0x188616,okdbWriter[_0x19bb83(0x262)][_0x19bb83(0x1f8)]=_0x26f1c0,okdbWriter[_0x19bb83(0x262)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x150bc8=_0x3b4fb0;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x5b1379=require$$0$3,{SYNC_COMMITS:_0x184540}=requireOkdbWriter(),_0x236a6e=_0x150bc8(0x35c);class _0x389445{constructor(_0x438b56,_0x20568b,_0x4995bb){const _0x51fbd5=_0x150bc8;this[_0x51fbd5(0x3b4)]=_0x438b56,this['_key']=_0x20568b,this[_0x51fbd5(0x228)]=_0x4995bb,this[_0x51fbd5(0x3d8)]=![],this[_0x51fbd5(0x232)]=null,this['_heartbeatInFlight']=null;}[_0x150bc8(0x2e0)](){const _0x4381bb=_0x150bc8;if(this[_0x4381bb(0x3d8)])return![];try{const _0x11c8f4=this['_lock'][_0x4381bb(0x373)]()[_0x4381bb(0x256)](this[_0x4381bb(0x2ae)]);if(!_0x11c8f4||_0x11c8f4[_0x4381bb(0x253)]!==this[_0x4381bb(0x228)])return![];const _0x1246aa=_0x11c8f4['updatedAt']??_0x11c8f4[_0x4381bb(0x253)];if(_0x1246aa+_0x11c8f4[_0x4381bb(0x1d7)]<Date[_0x4381bb(0x3fc)]())return![];return!![];}catch{return!this['_released'];}}[_0x150bc8(0x28d)](){const _0x1b41c6=_0x150bc8;if(this['_released'])return null;try{return this[_0x1b41c6(0x3b4)]['_db']()[_0x1b41c6(0x256)](this['_key'])??null;}catch{return null;}}async[_0x150bc8(0x2d7)](_0x53ead9){const _0x3c407f=_0x150bc8;if(this[_0x3c407f(0x3d8)])return;try{const _0x9a8960=this[_0x3c407f(0x3b4)]['_db']()[_0x3c407f(0x256)](this[_0x3c407f(0x2ae)]);if(!_0x9a8960||_0x9a8960[_0x3c407f(0x253)]!==this['_acquiredAt'])return;if(_0x184540)this[_0x3c407f(0x3b4)][_0x3c407f(0x373)]()[_0x3c407f(0x3f4)](this[_0x3c407f(0x2ae)],{..._0x9a8960,'ttlMs':_0x9a8960[_0x3c407f(0x1d7)]+_0x53ead9});else await this['_lock']['_db']()[_0x3c407f(0x281)](this[_0x3c407f(0x2ae)],{..._0x9a8960,'ttlMs':_0x9a8960[_0x3c407f(0x1d7)]+_0x53ead9});}catch{}}async[_0x150bc8(0x2b0)](){const _0x455de0=_0x150bc8;if(this[_0x455de0(0x3d8)])return;if(this[_0x455de0(0x22e)])try{await this[_0x455de0(0x22e)];}catch{}clearInterval(this[_0x455de0(0x232)]),this['_heartbeatTimer']=null,this[_0x455de0(0x3d8)]=!![];try{const _0x48332b=this[_0x455de0(0x3b4)][_0x455de0(0x373)]()[_0x455de0(0x256)](this['_key']);if(_0x48332b&&_0x48332b['acquiredAt']===this[_0x455de0(0x228)]){if(_0x184540)this[_0x455de0(0x3b4)][_0x455de0(0x373)]()['removeSync'](this['_key']);else await this[_0x455de0(0x3b4)][_0x455de0(0x373)]()['remove'](this['_key']);}}catch{}}[_0x150bc8(0x2a6)](_0x57fdf0,_0xea91a8){const _0x48c7f9=_0x150bc8,_0x4641b0=_0xea91a8??Math[_0x48c7f9(0x2b6)](_0x57fdf0/0x3);this[_0x48c7f9(0x232)]=setInterval(()=>{const _0x2adabb=_0x48c7f9;if(this[_0x2adabb(0x3d8)])return;this[_0x2adabb(0x22e)]=((async()=>{const _0x12b537=_0x2adabb;try{const _0x27c514=this[_0x12b537(0x3b4)]['_db']()[_0x12b537(0x256)](this['_key']);if(!_0x27c514||_0x27c514[_0x12b537(0x253)]!==this[_0x12b537(0x228)]){this[_0x12b537(0x3d8)]=!![],clearInterval(this['_heartbeatTimer']),this[_0x12b537(0x232)]=null;return;}if(_0x184540)this[_0x12b537(0x3b4)]['_db']()[_0x12b537(0x3f4)](this['_key'],{..._0x27c514,'updatedAt':Date['now']()});else await this[_0x12b537(0x3b4)][_0x12b537(0x373)]()['put'](this[_0x12b537(0x2ae)],{..._0x27c514,'updatedAt':Date[_0x12b537(0x3fc)]()});}catch{}this[_0x12b537(0x22e)]=null;})());},_0x4641b0);if(this[_0x48c7f9(0x232)][_0x48c7f9(0x3e3)])this[_0x48c7f9(0x232)]['unref']();}}class _0x18bfa6{constructor(_0x3dfa6f,{namespace:_0x395028,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x520cc3=_0x150bc8;this['_rawDb']=_0x3dfa6f,this[_0x520cc3(0x33b)]=_0x395028,this[_0x520cc3(0x1d7)]=ttlMs,this[_0x520cc3(0x302)]=heartbeatMs,this[_0x520cc3(0x3fd)]=null;}[_0x150bc8(0x373)](){const _0x43b9bb=_0x150bc8;return!this['_lockDb']&&(this[_0x43b9bb(0x3fd)]=this[_0x43b9bb(0x2b2)][_0x43b9bb(0x3d1)](_0x236a6e,{'dupSort':![]})),this[_0x43b9bb(0x3fd)];}[_0x150bc8(0x213)](){const _0x366408=_0x150bc8;return!this[_0x366408(0x39f)]&&(this[_0x366408(0x39f)]=this['_rawDb']['openDB'](_0x236a6e+_0x366408(0x345),{'dupSort':![]})),this[_0x366408(0x39f)];}[_0x150bc8(0x2ae)](_0x44c454){return this['namespace']+':'+_0x44c454;}[_0x150bc8(0x2f6)](_0x446bb9){const _0x37d67f=_0x150bc8;try{_0x184540?this['_wantDb']()['putSync'](this[_0x37d67f(0x2ae)](_0x446bb9),Date[_0x37d67f(0x3fc)]()):this['_wantDb']()[_0x37d67f(0x281)](this[_0x37d67f(0x2ae)](_0x446bb9),Date[_0x37d67f(0x3fc)]())?.[_0x37d67f(0x299)]?.(()=>{});}catch{}}['isWanted'](_0x1f167c,_0x1f7ac3=0x3e8){const _0x2c1d82=_0x150bc8;try{const _0x4fb92c=this[_0x2c1d82(0x213)]()[_0x2c1d82(0x256)](this['_key'](_0x1f167c));return typeof _0x4fb92c===_0x2c1d82(0x3fb)&&Date[_0x2c1d82(0x3fc)]()-_0x4fb92c<_0x1f7ac3;}catch{return![];}}['_isStale'](_0x231d83){const _0x207782=_0x150bc8,_0x38961e=_0x231d83['updatedAt']??_0x231d83[_0x207782(0x253)];return _0x38961e+_0x231d83[_0x207782(0x1d7)]<Date[_0x207782(0x3fc)]();}static[_0x150bc8(0x23c)](_0x5f118c){const _0x2e4ed9=_0x150bc8,_0x2560d1=_0x5f118c?.[_0x2e4ed9(0x28d)];if(!_0x2560d1||typeof _0x2560d1['pid']!==_0x2e4ed9(0x3fb))return![];if(_0x2560d1[_0x2e4ed9(0x2bf)]!==_0x5b1379[_0x2e4ed9(0x2bf)]())return![];if(_0x2560d1['pid']===process['pid'])return![];try{return process[_0x2e4ed9(0x3ef)](_0x2560d1[_0x2e4ed9(0x2c8)],0x0),![];}catch(_0x494018){return _0x494018[_0x2e4ed9(0x1d1)]===_0x2e4ed9(0x3c7);}}async[_0x150bc8(0x354)](_0x482f47,_0x57faf2={},_0x4dded4={}){const _0x461185=_0x150bc8,_0x49ff28=this[_0x461185(0x2ae)](_0x482f47),_0xe3b514=_0x4dded4[_0x461185(0x1d7)]??this[_0x461185(0x1d7)],_0x56e45e=Date[_0x461185(0x3fc)](),_0x4ca242={'holder':{'pid':process[_0x461185(0x2c8)],'hostname':_0x5b1379['hostname'](),..._0x57faf2},'acquiredAt':_0x56e45e,'updatedAt':_0x56e45e,'ttlMs':_0xe3b514};let _0x18d5fe=![],_0x481c79=null;try{const _0x378306=()=>{const _0xcb6356=_0x461185,_0x2f4f7f=this[_0xcb6356(0x373)]()[_0xcb6356(0x256)](_0x49ff28);if(_0x2f4f7f&&!this['_isStale'](_0x2f4f7f)&&!_0x18bfa6[_0xcb6356(0x23c)](_0x2f4f7f)){const _0x21afc8=_0x57faf2[_0xcb6356(0x3f5)]!=null&&_0x2f4f7f[_0xcb6356(0x28d)][_0xcb6356(0x2c8)]===process['pid']&&_0x2f4f7f[_0xcb6356(0x28d)][_0xcb6356(0x3f5)]===_0x57faf2['processorId'];if(!_0x21afc8){_0x18d5fe=![],_0x481c79=_0x2f4f7f;return;}_0x4ca242['acquiredAt']<=_0x2f4f7f[_0xcb6356(0x253)]&&(_0x4ca242['acquiredAt']=_0x2f4f7f[_0xcb6356(0x253)]+0x1,_0x4ca242[_0xcb6356(0x2ef)]=_0x4ca242['acquiredAt']);}this[_0xcb6356(0x373)]()[_0xcb6356(0x281)](_0x49ff28,_0x4ca242),_0x18d5fe=!![],_0x481c79=_0x4ca242;};if(_0x184540)this[_0x461185(0x373)]()[_0x461185(0x374)](_0x378306);else await this['_db']()[_0x461185(0x2f0)](_0x378306);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x18d5fe)return{'acquired':![],'handle':null,'current':_0x481c79};const _0x8c1e51=new _0x389445(this,_0x49ff28,_0x4ca242[_0x461185(0x253)]);return _0x8c1e51[_0x461185(0x2a6)](_0xe3b514,this[_0x461185(0x302)]),{'acquired':!![],'handle':_0x8c1e51,'current':_0x481c79};}[_0x150bc8(0x231)](_0x1bf221){const _0x1d0336=_0x150bc8;try{return this[_0x1d0336(0x373)]()[_0x1d0336(0x256)](this[_0x1d0336(0x2ae)](_0x1bf221))??null;}catch{return null;}}[_0x150bc8(0x348)](){const _0x181d1f=_0x150bc8,_0x20df21=this[_0x181d1f(0x33b)]+':',_0x542ca9=[];try{for(const {key:_0x1831a1,value:_0x5c0983}of this[_0x181d1f(0x373)]()[_0x181d1f(0x3cb)]({'start':_0x20df21,'end':_0x20df21+'\xff'})){typeof _0x1831a1===_0x181d1f(0x361)&&_0x1831a1[_0x181d1f(0x1f7)](_0x20df21)&&_0x542ca9[_0x181d1f(0x39a)]({'id':_0x1831a1[_0x181d1f(0x204)](_0x20df21['length']),'entry':_0x5c0983});}}catch{}return _0x542ca9;}static[_0x150bc8(0x23b)](_0x283301){const _0x5efcd8=_0x150bc8,_0x15389f=[];try{const _0x4a47db=_0x283301[_0x5efcd8(0x3d1)](_0x236a6e,{'dupSort':![]});for(const {key:_0x10f9e2,value:_0x4ae68f}of _0x4a47db[_0x5efcd8(0x3cb)]({})){if(typeof _0x10f9e2!=='string')continue;const _0x2fa608=_0x10f9e2[_0x5efcd8(0x3c2)](':');if(_0x2fa608<0x1)continue;_0x15389f[_0x5efcd8(0x39a)]({'namespace':_0x10f9e2['slice'](0x0,_0x2fa608),'id':_0x10f9e2[_0x5efcd8(0x204)](_0x2fa608+0x1),'entry':_0x4ae68f});}}catch{}return _0x15389f;}}return okdbLock={'OKDBLock':_0x18bfa6},okdbLock;}var version=_0x3b4fb0(0x35d),require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x12bded=_0x3b4fb0;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x11c5cb=require$$0$3,_0x46a014=require$$1$1,_0x4b67b2=require$$2,{LOOP:_0x267e86}=requireOkdbLoopMonitor(),{OKDBLock:_0x123333}=requireOkdbLock(),{SYNC_COMMITS:_0x4c3ede}=requireOkdbWriter(),_0x361773=_0x12bded(0x1cb),_0x616751='node',_0x493b20=_0x12bded(0x268),_0x2cba6b='~processes:cmd',_0x509992=(_0x5d60c3,_0x2dbbb1)=>_0x5d60c3+':'+_0x2dbbb1,_0x55b4bd=(_0x226b16,_0x5dd48e)=>_0x226b16+'::'+_0x5dd48e,_0x2bfa24=(_0x33d6fc,_0x4b03bc)=>_0x33d6fc+'/'+_0x4b03bc,_0x4563a6=(_0x16a6d1,_0x318969)=>_0x16a6d1+'#'+_0x318969,_0x263ca6=_0xe016d9=>{const _0x14469e=_0x12bded;if(_0xe016d9?.[_0x14469e(0x1f3)])return _0xe016d9[_0x14469e(0x1f3)];const _0x4e2f7a=_0xe016d9?.[_0x14469e(0x3c0)];return typeof _0x4e2f7a===_0x14469e(0x361)&&_0x4e2f7a[_0x14469e(0x2ed)]('#')?_0x4e2f7a[_0x14469e(0x204)](0x0,_0x4e2f7a[_0x14469e(0x3c2)]('#')):_0x4e2f7a;},_0x84f429=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x66d92d=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x4d9548=_0x84f429*0x3,_0x343193=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math['max'](0x927c0,_0x4d9548*0x14),_0x481f2e=[_0x12bded(0x362),'processor:ready','processor:retry',_0x12bded(0x3d5),_0x12bded(0x36c),'processor:resumed'];let _0x57c9d1=null;function _0x1fc979(){const _0x2a7cdc=_0x12bded;if(_0x57c9d1==null)_0x57c9d1=Math[_0x2a7cdc(0x276)]((Date[_0x2a7cdc(0x3fc)]()-process[_0x2a7cdc(0x1d8)]()*0x3e8)/0x3e8)*0x3e8;return _0x57c9d1;}function _0x5f3d32(_0x2cda97){const _0x57a391=_0x12bded;if(process.env.OKDB_PROCESS_KILL===_0x57a391(0x29f))return![];if(_0x2cda97?.['options']?.[_0x57a391(0x2c6)]&&typeof _0x2cda97[_0x57a391(0x344)][_0x57a391(0x2c6)]===_0x57a391(0x234)&&_0x2cda97['options'][_0x57a391(0x2c6)][_0x57a391(0x3ef)]===![])return![];return!![];}function _0x32283e(_0x4c13d2,_0x5dcf5d){const _0x253bc1=_0x12bded,_0x1d9a63=!!_0x5dcf5d?.[_0x253bc1(0x1d4)];switch(_0x4c13d2){case _0x253bc1(0x35f):return{'controllable':_0x1d9a63,'decommissionable':![],'killable':!![],'killConfirm':_0x253bc1(0x3a6)};case _0x253bc1(0x312):case'standalone':return{'controllable':_0x1d9a63,'decommissionable':![],'killable':!![],'killConfirm':_0x253bc1(0x24e)};case'embedded':return{'controllable':![],'decommissionable':![],'killable':![]};case'http-server':case _0x253bc1(0x319):case _0x253bc1(0x3b6):case'worker':return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':'force'};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x1058ee{constructor(_0x2fc28c){const _0x5c33c5=_0x12bded;this[_0x5c33c5(0x292)]=_0x2fc28c,this[_0x5c33c5(0x378)]=null,this[_0x5c33c5(0x1ff)]=null,this[_0x5c33c5(0x27f)]=new Map(),this[_0x5c33c5(0x36a)]=null,this[_0x5c33c5(0x2b3)]=![],this['_isReader']=![],this['_processStartedAt']=_0x1fc979(),this[_0x5c33c5(0x255)]=_0x509992(process['pid'],this['_processStartedAt']),this[_0x5c33c5(0x387)]=_0x4b67b2[_0x5c33c5(0x25b)]()[_0x5c33c5(0x204)](0x0,0x8),this[_0x5c33c5(0x2b7)]=_0x4563a6(this['_selfKey'],this[_0x5c33c5(0x387)]),this['_startedAt']=Date[_0x5c33c5(0x3fc)](),this[_0x5c33c5(0x31e)]=null,this[_0x5c33c5(0x2d4)]=null,this['_listenAddr']=null,this['_hbTimer']=null,this[_0x5c33c5(0x23d)]=null,this['_onTick']=null,this[_0x5c33c5(0x346)]=0x0,this['_ownMeta']={},this[_0x5c33c5(0x2f4)]=new Map(),this['_lastCpuUsage']=process[_0x5c33c5(0x1fc)](),this[_0x5c33c5(0x2d3)]=Date[_0x5c33c5(0x3fc)](),this[_0x5c33c5(0x1de)]=0x0,this[_0x5c33c5(0x358)]=new Map();}get[_0x12bded(0x251)](){const _0xd2aa93=_0x12bded;return this[_0xd2aa93(0x255)];}get[_0x12bded(0x2f7)](){const _0x5894a1=_0x12bded;return this[_0x5894a1(0x2b7)];}['_caps'](_0x179bee,_0x1b6266){const _0x1b2fcb=_0x12bded,_0x1eaeff=_0x32283e(_0x179bee,_0x1b6266);if(_0x1eaeff[_0x1b2fcb(0x2f3)]&&!_0x5f3d32(this['okdb']))return{..._0x1eaeff,'killable':![],'killConfirm':undefined};return _0x1eaeff;}[_0x12bded(0x1e3)](){const _0x4ed892=_0x12bded;return!!this[_0x4ed892(0x378)];}['setOwnMeta'](_0x564659){const _0x2f0a1d=_0x12bded;Object[_0x2f0a1d(0x271)](this[_0x2f0a1d(0x2e4)],_0x564659||{});}[_0x12bded(0x283)](_0x124120){if(_0x124120)this['_listenAddr']=_0x124120;}[_0x12bded(0x27a)](_0x5a8e13={}){const _0x82c46a=_0x12bded;return this[_0x82c46a(0x292)][_0x82c46a(0x20b)](_0x5a8e13);}[_0x12bded(0x3e0)](){const _0x56164a=_0x12bded,_0x3af40f={};let _0x2b41d6=0x0,_0x1021d7=0x0;const _0x1f0e25=new Set();for(const _0x5884ea of this[_0x56164a(0x332)]()){_0x1021d7++;const _0x23f2e2=_0x5884ea[_0x56164a(0x2dd)];if(!_0x23f2e2)continue;if(_0x23f2e2[_0x56164a(0x379)])_0x2b41d6++;for(const _0x1874aa of _0x23f2e2[_0x56164a(0x1d4)]||[]){if(!['single','fanout'][_0x56164a(0x2ed)](_0x1874aa['mode']))continue;(_0x1874aa[_0x56164a(0x230)]==='online'||_0x1874aa[_0x56164a(0x230)]===_0x56164a(0x335))&&_0x1874aa[_0x56164a(0x39e)]&&_0x1f0e25[_0x56164a(0x342)]((_0x1874aa[_0x56164a(0x394)]||'default')+':'+_0x1874aa[_0x56164a(0x39e)]);const _0x8d04a7=_0x1874aa[_0x56164a(0x394)]||_0x56164a(0x298);(_0x3af40f[_0x8d04a7]||=[])[_0x56164a(0x39a)]({..._0x1874aa,'env':_0x8d04a7,'owner':{'pid':_0x5884ea[_0x56164a(0x2c8)]??null,'kind':_0x5884ea[_0x56164a(0x2f2)]??null}});}}for(const [_0x11f7f7,_0x31adf7]of Object[_0x56164a(0x20c)](_0x3af40f)){for(const _0x2a0139 of _0x31adf7){if(_0x2a0139[_0x56164a(0x3e6)]===_0x56164a(0x307)&&!_0x2a0139[_0x56164a(0x34b)]){const _0x11b228=_0x11f7f7+':'+(_0x2a0139[_0x56164a(0x39e)]??'');if(!_0x1f0e25['has'](_0x11b228))_0x2a0139[_0x56164a(0x21b)]=!![];}}}return{'envs':_0x3af40f,'policy':null,'participation':{'participating':_0x2b41d6,'total':_0x1021d7},'source':'workers'};}[_0x12bded(0x2ca)](){const _0x159c8b=_0x12bded,_0x18383c=_0x1eaf5f=>{const _0x467bea=_0x55dd;if(_0x1eaf5f[_0x467bea(0x230)]===_0x467bea(0x1e5)||_0x1eaf5f[_0x467bea(0x230)]===_0x467bea(0x335)||_0x1eaf5f['state']===_0x467bea(0x258))return 0x3;if(_0x1eaf5f[_0x467bea(0x34b)])return 0x1;return 0x2;},_0x51e040=new Map();for(const _0x3a0e5b of this[_0x159c8b(0x332)]()){for(const _0x570263 of _0x3a0e5b['processing']?.[_0x159c8b(0x1d4)]||[]){const _0x4befac={..._0x570263,'owner':{'pid':_0x3a0e5b[_0x159c8b(0x2c8)]??null,'kind':_0x3a0e5b['kind']??null,'host':_0x3a0e5b['host']??null}},_0x48a8d1=_0x570263[_0x159c8b(0x3e6)]===_0x159c8b(0x307)?'1ofN:'+(_0x570263[_0x159c8b(0x394)]??'')+'::'+(_0x570263[_0x159c8b(0x39e)]??_0x570263[_0x159c8b(0x2d8)]??_0x570263['id']):'inst:'+(_0x3a0e5b[_0x159c8b(0x3c0)]??_0x3a0e5b[_0x159c8b(0x1f3)]??'')+'::'+(_0x570263[_0x159c8b(0x394)]??'')+'::'+_0x570263['id'],_0x277c91=_0x51e040[_0x159c8b(0x256)](_0x48a8d1);if(!_0x277c91||_0x18383c(_0x4befac)>_0x18383c(_0x277c91))_0x51e040[_0x159c8b(0x275)](_0x48a8d1,_0x4befac);}}return[..._0x51e040[_0x159c8b(0x3fe)]()];}[_0x12bded(0x334)](){const _0x1f8292=_0x12bded,_0x42ac83=Date[_0x1f8292(0x3fc)](),_0x7e2fea=this[_0x1f8292(0x332)](),_0x59252a=_0x526ac9=>Math[_0x1f8292(0x287)](0x0,Math['round']((_0x42ac83-(_0x526ac9[_0x1f8292(0x211)]||_0x42ac83))/0x3e8)),_0x1eb17c=_0x7e2fea['find'](_0x56a301=>_0x56a301[_0x1f8292(0x2f2)]===_0x1f8292(0x35f)),_0xd8348f=_0x7e2fea[_0x1f8292(0x3d7)](_0x1dc530=>_0x1dc530['kind']===_0x1f8292(0x30a));if(_0x1eb17c||_0xd8348f[_0x1f8292(0x21a)])return{'primary':_0x1eb17c?{'pid':_0x1eb17c[_0x1f8292(0x2c8)],'uptime':_0x59252a(_0x1eb17c)}:null,'workers':_0xd8348f[_0x1f8292(0x38b)](_0x1f76d5=>({'pid':_0x1f76d5['pid'],'uptime':_0x59252a(_0x1f76d5)})),'workersConfigured':_0x1eb17c?.[_0x1f8292(0x1e1)]?.['workersConfigured']??_0xd8348f[_0x1f8292(0x21a)],'mode':'cluster'};const _0x4ffd3d=_0x7e2fea[_0x1f8292(0x2b1)](_0x50f21f=>_0x50f21f[_0x1f8292(0x2f2)]===_0x1f8292(0x312)||_0x50f21f[_0x1f8292(0x2f2)]==='standalone'||_0x50f21f[_0x1f8292(0x2f2)]===_0x1f8292(0x269)),_0x57a254=_0x4ffd3d?{'pid':_0x4ffd3d['pid'],'uptime':_0x59252a(_0x4ffd3d)}:{'pid':process[_0x1f8292(0x2c8)],'uptime':Math[_0x1f8292(0x287)](0x0,Math['round'](process['uptime']()))};return{'primary':_0x57a254,'workers':[_0x57a254],'workersConfigured':0x1,'mode':'single'};}[_0x12bded(0x36f)](){const _0x354542=_0x12bded;return this[_0x354542(0x393)]();}[_0x12bded(0x337)](){const _0x200d6a=_0x12bded,_0x239d7e=new Map();for(const _0x16c357 of this[_0x200d6a(0x393)]())_0x239d7e['set'](_0x16c357[_0x200d6a(0x1f3)],{..._0x16c357,'children':[]});const _0x1705a0=[];for(const _0x52b6bf of _0x239d7e['values']()){const _0x3fc92b=_0x52b6bf[_0x200d6a(0x1ef)]?_0x239d7e['get'](_0x52b6bf[_0x200d6a(0x1ef)]):null;if(_0x3fc92b&&_0x3fc92b!==_0x52b6bf)_0x3fc92b[_0x200d6a(0x27c)][_0x200d6a(0x39a)](_0x52b6bf);else _0x1705a0[_0x200d6a(0x39a)](_0x52b6bf);}const _0x23cb35=(_0x4e3287,_0x12e869)=>_0x4e3287[_0x200d6a(0x2f2)]===_0x12e869[_0x200d6a(0x2f2)]?(_0x4e3287['pid']||0x0)-(_0x12e869['pid']||0x0):(_0x4e3287[_0x200d6a(0x2f2)]??'')<(_0x12e869[_0x200d6a(0x2f2)]??'')?-0x1:0x1,_0x25dd57=_0xb1ae27=>{const _0x4fbff4=_0x200d6a;_0xb1ae27[_0x4fbff4(0x3bd)](_0x23cb35);for(const _0x367f0f of _0xb1ae27)if(_0x367f0f['children'][_0x4fbff4(0x21a)])_0x25dd57(_0x367f0f[_0x4fbff4(0x27c)]);};return _0x25dd57(_0x1705a0),_0x1705a0;}[_0x12bded(0x400)](_0x44258f){const _0x5759b7=_0x12bded;return this[_0x5759b7(0x393)]()[_0x5759b7(0x2b1)](_0x202fed=>_0x202fed['processKey']===_0x44258f)??null;}[_0x12bded(0x393)](_0x40d754=Date[_0x12bded(0x3fc)]()){const _0x6a844b=_0x12bded,_0x5cc282=new Map();for(const _0x2186bf of this['listNodes']()){const _0x46d88d=_0x263ca6(_0x2186bf);let _0x309d99=_0x5cc282[_0x6a844b(0x256)](_0x46d88d);!_0x309d99&&(_0x309d99={'processKey':_0x46d88d,'nodeKey':_0x46d88d,'pid':_0x2186bf[_0x6a844b(0x2c8)],'ppid':_0x2186bf[_0x6a844b(0x37d)]??null,'host':_0x2186bf[_0x6a844b(0x257)]??null,'kind':_0x2186bf[_0x6a844b(0x2f2)],'role':null,'supervisorKey':_0x2186bf['supervisorKey']??null,'slot':_0x2186bf[_0x6a844b(0x24b)]??null,'slotKey':_0x2186bf[_0x6a844b(0x29b)]??null,'caps':_0x2186bf[_0x6a844b(0x264)]??null,'lifecycle':_0x2186bf[_0x6a844b(0x367)]??null,'uptime':Math[_0x6a844b(0x287)](0x0,Math[_0x6a844b(0x276)]((_0x40d754-(_0x2186bf[_0x6a844b(0x211)]||_0x40d754))/0x3e8)),'startedAt':_0x2186bf[_0x6a844b(0x211)]??null,'meta':_0x2186bf[_0x6a844b(0x1e1)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x5cc282['set'](_0x46d88d,_0x309d99));_0x309d99['instances'][_0x6a844b(0x39a)]({'instanceId':_0x2186bf['instanceId']??null,'role':_0x2186bf['role']??null,'listenAddr':_0x2186bf[_0x6a844b(0x285)]??null,'lifecycle':_0x2186bf[_0x6a844b(0x367)]??null,'processing':_0x2186bf[_0x6a844b(0x2dd)]??null});if(!_0x309d99[_0x6a844b(0x291)]&&_0x2186bf[_0x6a844b(0x291)])_0x309d99[_0x6a844b(0x291)]=_0x2186bf['role'];if(!_0x309d99[_0x6a844b(0x285)]&&_0x2186bf[_0x6a844b(0x285)])_0x309d99[_0x6a844b(0x285)]=_0x2186bf[_0x6a844b(0x285)];if(!_0x309d99[_0x6a844b(0x2dd)]&&_0x2186bf[_0x6a844b(0x2dd)])_0x309d99['processing']=_0x2186bf[_0x6a844b(0x2dd)];if(!_0x309d99[_0x6a844b(0x399)]&&_0x2186bf['engines'])_0x309d99[_0x6a844b(0x399)]=_0x2186bf['engines'];if(!_0x309d99[_0x6a844b(0x23f)]&&_0x2186bf['singletonClaims'])_0x309d99[_0x6a844b(0x23f)]=_0x2186bf[_0x6a844b(0x23f)];if(_0x309d99[_0x6a844b(0x264)]==null&&_0x2186bf[_0x6a844b(0x264)])_0x309d99[_0x6a844b(0x264)]=_0x2186bf['caps'];if(_0x2186bf['stats']&&(!_0x309d99[_0x6a844b(0x33f)]||(_0x2186bf[_0x6a844b(0x33f)]['at']??0x0)>(_0x309d99['stats']['at']??0x0)))_0x309d99['stats']=_0x2186bf[_0x6a844b(0x33f)];}return[..._0x5cc282[_0x6a844b(0x3fe)]()];}[_0x12bded(0x3ad)](){const _0x3749a4=_0x12bded,_0x139155=[],_0x4e2ef4={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x10a86e of this[_0x3749a4(0x393)]()){_0x139155[_0x3749a4(0x39a)]({'processKey':_0x10a86e[_0x3749a4(0x1f3)],'kind':_0x10a86e[_0x3749a4(0x2f2)],'pid':_0x10a86e['pid'],'supervisorKey':_0x10a86e[_0x3749a4(0x1ef)],'meta':_0x10a86e[_0x3749a4(0x1e1)]??null,'uptime':_0x10a86e[_0x3749a4(0x1d8)],'stats':_0x10a86e[_0x3749a4(0x33f)]??null}),_0x4e2ef4['processes']++;if(_0x10a86e[_0x3749a4(0x33f)]){_0x4e2ef4['rss']+=_0x10a86e[_0x3749a4(0x33f)][_0x3749a4(0x34c)]||0x0,_0x4e2ef4[_0x3749a4(0x25d)]+=(_0x10a86e[_0x3749a4(0x33f)]['heapUsed']||0x0)+(_0x10a86e['stats']['threads']?.[_0x3749a4(0x25d)]||0x0);const _0x327cec=_0x10a86e[_0x3749a4(0x33f)][_0x3749a4(0x225)];_0x327cec&&(_0x4e2ef4[_0x3749a4(0x225)][_0x3749a4(0x1f2)]+=_0x327cec[_0x3749a4(0x1f2)]||0x0,_0x4e2ef4[_0x3749a4(0x225)][_0x3749a4(0x23a)]+=_0x327cec[_0x3749a4(0x23a)]||0x0,_0x4e2ef4[_0x3749a4(0x225)][_0x3749a4(0x1eb)]+=_0x327cec['busy']||0x0);}}return{'totals':_0x4e2ef4,'nodes':_0x139155};}async[_0x12bded(0x311)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0xf0ce8=_0x12bded;this[_0xf0ce8(0x2b3)]=this[_0xf0ce8(0x2b3)]||!!writer,this[_0xf0ce8(0x33c)]=this[_0xf0ce8(0x33c)]||!!reader,this['_kind']=kind||this[_0xf0ce8(0x31e)]||(_0x46a014[_0xf0ce8(0x349)]?_0xf0ce8(0x30a):_0xf0ce8(0x312)),this['_supervisorKey']=supervisorKey??this['_supervisorKey'],this[_0xf0ce8(0x1d3)]=listenAddr??this[_0xf0ce8(0x1d3)],this[_0xf0ce8(0x20d)](),await this[_0xf0ce8(0x223)]();if(!writer&&!reader)return null;if(!this[_0xf0ce8(0x378)]){const _0x4dd9d4=await this[_0xf0ce8(0x292)]['createEnvironment'](_0x361773,{'sync':![],'durability':_0xf0ce8(0x20e)});await _0x4dd9d4['ensureType'](_0x616751),this[_0xf0ce8(0x378)]=_0x4dd9d4;}return this[_0xf0ce8(0x378)];}[_0x12bded(0x324)](){const _0x172665=_0x12bded;return this[_0x172665(0x3ee)]!==this['_statusEnv']&&(this['_nodeDbFor']=this[_0x172665(0x378)],this[_0x172665(0x1e4)]=this[_0x172665(0x378)][_0x172665(0x3e2)](_0x616751)[_0x172665(0x25c)]),this[_0x172665(0x1e4)];}[_0x12bded(0x323)](_0xea43e6){const _0x5d0f1f=_0x12bded;if(_0x4c3ede)return this['_nodeDb']()[_0x5d0f1f(0x3f4)](_0xea43e6[_0x5d0f1f(0x3c0)],_0xea43e6,0x1);const _0x58a0cd=this[_0x5d0f1f(0x324)]()[_0x5d0f1f(0x281)](_0xea43e6[_0x5d0f1f(0x3c0)],_0xea43e6,0x1);if(_0x58a0cd&&typeof _0x58a0cd[_0x5d0f1f(0x2e5)]==='function')_0x58a0cd[_0x5d0f1f(0x2e5)](undefined,()=>{});return _0x58a0cd;}[_0x12bded(0x391)](_0x56d9c2){const _0x5c2ee6=_0x12bded;return this[_0x5c2ee6(0x324)]()[_0x5c2ee6(0x3f4)](_0x56d9c2[_0x5c2ee6(0x3c0)],_0x56d9c2,0x1);}[_0x12bded(0x33d)](_0xf526c7){const _0x160677=_0x12bded;if(_0x4c3ede)try{return this[_0x160677(0x324)]()[_0x160677(0x237)](_0xf526c7);}catch{return![];}const _0x44417a=this[_0x160677(0x324)]()[_0x160677(0x34e)](_0xf526c7);if(_0x44417a&&typeof _0x44417a[_0x160677(0x2e5)]===_0x160677(0x385))_0x44417a[_0x160677(0x2e5)](undefined,()=>{});return _0x44417a;}async['putNode'](_0x48f160){const _0x819ccb=_0x12bded;if(!this[_0x819ccb(0x378)]||!this[_0x819ccb(0x2b3)]||!_0x48f160?.[_0x819ccb(0x3c0)])return;return this[_0x819ccb(0x323)](_0x48f160);}async['removeNode'](_0x5f3055){const _0x599c1e=_0x12bded;if(!this[_0x599c1e(0x378)]||!this[_0x599c1e(0x2b3)]||!_0x5f3055)return;const _0x11f2bb=_0x5f3055[_0x599c1e(0x2ed)]('#'),_0x49af8b=[];for(const {key:_0x4167a2}of this[_0x599c1e(0x378)][_0x599c1e(0x3cb)](_0x616751)){if(_0x4167a2===_0x5f3055||!_0x11f2bb&&typeof _0x4167a2===_0x599c1e(0x361)&&_0x4167a2['startsWith'](_0x5f3055+'#'))_0x49af8b['push'](_0x4167a2);}for(const _0x197e4a of _0x49af8b){try{this[_0x599c1e(0x324)]()[_0x599c1e(0x237)](_0x197e4a);}catch{}}}['_nodeDead'](_0x15c7f9){const _0xdd17c2=_0x12bded;if(typeof _0x15c7f9?.[_0xdd17c2(0x2c8)]!==_0xdd17c2(0x3fb))return![];if(_0x15c7f9[_0xdd17c2(0x257)]!==_0x11c5cb[_0xdd17c2(0x2bf)]())return![];if(_0x15c7f9[_0xdd17c2(0x2c8)]===process[_0xdd17c2(0x2c8)])return![];if(_0x15c7f9['expiresAt']!=null&&_0x15c7f9[_0xdd17c2(0x277)]<Date[_0xdd17c2(0x3fc)]()-_0x343193)return!![];try{return process[_0xdd17c2(0x3ef)](_0x15c7f9['pid'],0x0),![];}catch(_0x130963){return _0x130963[_0xdd17c2(0x1d1)]===_0xdd17c2(0x3c7);}}[_0x12bded(0x332)](){const _0x49abe5=_0x12bded;if(!this[_0x49abe5(0x378)])return[];try{this[_0x49abe5(0x378)]['db']?.[_0x49abe5(0x266)]?.();}catch{}const _0xdf54ea=Date[_0x49abe5(0x3fc)](),_0x8cd19=_0x11c5cb['hostname'](),_0x5aa205=[];for(const {value:_0x147600}of this['_statusEnv']['getRange'](_0x616751)){if(!_0x147600)continue;let _0x3e196e=null;_0x147600['host']===_0x8cd19&&typeof _0x147600[_0x49abe5(0x2c8)]==='number'&&(_0x3e196e=!this[_0x49abe5(0x22b)](_0x147600));if(_0x3e196e===![])continue;const _0x1f4032=_0x147600[_0x49abe5(0x277)]==null||_0x147600[_0x49abe5(0x277)]>=_0xdf54ea;if(_0x3e196e===!![]||_0x1f4032)_0x5aa205[_0x49abe5(0x39a)](_0x147600);}return _0x5aa205;}async[_0x12bded(0x1e0)](_0x34ae28=0x0){const _0x4dda89=_0x12bded;if(!this[_0x4dda89(0x378)]||!this[_0x4dda89(0x2b3)])return;const _0x2da8e2=Date[_0x4dda89(0x3fc)]()-_0x34ae28,_0x1986ae=new Set(),_0x2344bd=[],_0x5e5714=_0x11c5cb['hostname'](),_0x39aee2=require$$6[_0x4dda89(0x1dc)];for(const {key:_0x35c4da,value:_0xc30508}of this[_0x4dda89(0x378)][_0x4dda89(0x3cb)](_0x616751)){if(!_0xc30508)continue;const _0x12880a=_0xc30508[_0x4dda89(0x257)]===_0x5e5714&&typeof _0xc30508[_0x4dda89(0x2c8)]==='number',_0xf6b587=_0x12880a?this[_0x4dda89(0x22b)](_0xc30508):_0xc30508['expiresAt']!=null&&_0xc30508['expiresAt']<_0x2da8e2;if(_0xf6b587)_0x2344bd['push'](_0x35c4da);else{_0x1986ae[_0x4dda89(0x342)](_0x263ca6(_0xc30508)??_0x35c4da);if(_0xc30508['version']&&_0xc30508['version']!==_0x39aee2){if(!this[_0x4dda89(0x38d)])this[_0x4dda89(0x38d)]=new Set();!this[_0x4dda89(0x38d)]['has'](_0xc30508['version'])&&(this['_versionSkewWarned'][_0x4dda89(0x342)](_0xc30508[_0x4dda89(0x1dc)]),this[_0x4dda89(0x292)]['log']?.[_0x4dda89(0x36e)]?.(_0x4dda89(0x27b)+(_0xc30508[_0x4dda89(0x2c8)]??'?')+_0x4dda89(0x35b)+_0xc30508[_0x4dda89(0x1dc)]+_0x4dda89(0x286)+_0x39aee2+_0x4dda89(0x24c)+'mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.',{'feature':_0x4dda89(0x3a0)}));}}}for(const _0x469346 of _0x2344bd)this['_removeRowAsync'](_0x469346);if(this[_0x4dda89(0x20d)]()){const _0x3a36e8=[];for(const {key:_0x3d440a}of this[_0x4dda89(0x2a4)]('node')){if(!_0x1986ae[_0x4dda89(0x23e)](_0x3d440a)){if(_0x4c3ede)try{this[_0x4dda89(0x1ff)][_0x4dda89(0x237)](_0x4dda89(0x244)+_0x3d440a);}catch{}else _0x3a36e8[_0x4dda89(0x39a)](this['_desired'][_0x4dda89(0x34e)](_0x4dda89(0x244)+_0x3d440a));}}if(_0x3a36e8[_0x4dda89(0x21a)])await Promise[_0x4dda89(0x2da)](_0x3a36e8);}}[_0x12bded(0x3cd)](_0x3c7517=null){const _0x31d520=_0x12bded;if(this[_0x31d520(0x401)])return;if(!this[_0x31d520(0x2b3)]||!this[_0x31d520(0x378)]){this[_0x31d520(0x292)]?.[_0x31d520(0x2a7)]?.[_0x31d520(0x36e)]?.('registry\x20heartbeat\x20skipped\x20(writer='+this[_0x31d520(0x2b3)]+_0x31d520(0x38a)+!!this[_0x31d520(0x378)]+_0x31d520(0x320),{'feature':_0x31d520(0x2c6)});return;}this['_onTick']=_0x3c7517,this[_0x31d520(0x23d)]=()=>this[_0x31d520(0x3b7)]();for(const _0x414283 of _0x481f2e)this[_0x31d520(0x292)][_0x31d520(0x250)]['on'](_0x414283,this['_onProcEvent']);this[_0x31d520(0x2a0)]();const _0x3a7f24=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x84f429;this[_0x31d520(0x401)]=setInterval(()=>{const _0x4c0b22=_0x31d520;if(this['_onTick'])try{this[_0x4c0b22(0x3e5)]();}catch{}this['_publishNow'](),this[_0x4c0b22(0x1e0)]()[_0x4c0b22(0x299)](()=>{});},_0x3a7f24);if(this[_0x31d520(0x401)][_0x31d520(0x3e3)])this['_hbTimer']['unref']();}[_0x12bded(0x3b7)](){const _0x3ff0ce=_0x12bded;if(!this[_0x3ff0ce(0x2b3)]||!this['_statusEnv'])return;if(Date[_0x3ff0ce(0x3fc)]()-this['_lastPublishAt']<_0x66d92d)return;this[_0x3ff0ce(0x2a0)]();}[_0x12bded(0x2a0)](){const _0x3724c5=_0x12bded;if(!this[_0x3724c5(0x2b3)]||!this[_0x3724c5(0x378)])return;this['_lastPublishAt']=Date[_0x3724c5(0x3fc)]();try{const _0x3875e0=[this[_0x3724c5(0x31c)]()];for(const _0x57aa57 of this['_children']['values']())_0x3875e0[_0x3724c5(0x39a)](this[_0x3724c5(0x3e7)](_0x57aa57));const _0x3f7788=_0x267e86[_0x3724c5(0x215)]?_0x267e86['now']():0x0;for(const _0x489b13 of _0x3875e0){try{this[_0x3724c5(0x391)](_0x489b13),this[_0x3724c5(0x369)]=![];}catch(_0x2e6d87){!this['_publishFailWarned']&&(this[_0x3724c5(0x369)]=!![],this['okdb']?.['log']?.[_0x3724c5(0x36e)]?.(_0x3724c5(0x297)+_0x2e6d87[_0x3724c5(0x30e)],{'feature':_0x3724c5(0x2c6)}));}}if(_0x267e86[_0x3724c5(0x215)])_0x267e86[_0x3724c5(0x2a1)](_0x3724c5(0x316),_0x267e86[_0x3724c5(0x3fc)]()-_0x3f7788,'rows='+_0x3875e0[_0x3724c5(0x21a)]+'\x20sync');}catch(_0x8db6f7){!this['_publishFailWarned']&&(this[_0x3724c5(0x369)]=!![],this[_0x3724c5(0x292)]?.[_0x3724c5(0x2a7)]?.[_0x3724c5(0x36e)]?.(_0x3724c5(0x297)+_0x8db6f7[_0x3724c5(0x30e)],{'feature':_0x3724c5(0x2c6)}));}}async[_0x12bded(0x238)](){const _0xec652c=_0x12bded;if(this[_0xec652c(0x23d)]){for(const _0x2fcac2 of _0x481f2e){try{this[_0xec652c(0x292)]['events'][_0xec652c(0x29f)](_0x2fcac2,this[_0xec652c(0x23d)]);}catch{}}this[_0xec652c(0x23d)]=null;}this['_hbTimer']&&(clearInterval(this['_hbTimer']),this[_0xec652c(0x401)]=null);try{if(this[_0xec652c(0x378)]&&this['_isWriter'])await this[_0xec652c(0x325)](this[_0xec652c(0x2b7)]);}catch{}}async[_0x12bded(0x3ca)](){const _0x8df948=_0x12bded;if(!this['_statusEnv']||!this[_0x8df948(0x2b3)])return;try{await this[_0x8df948(0x325)](this['_rowKey']);}catch{}try{const _0x4ca2ba=[];for(const {value:_0xaadca3}of this[_0x8df948(0x378)]['getRange'](_0x616751)){if(_0xaadca3?.[_0x8df948(0x37d)]===process[_0x8df948(0x2c8)]&&_0xaadca3[_0x8df948(0x3c0)])_0x4ca2ba[_0x8df948(0x39a)](_0xaadca3[_0x8df948(0x3c0)]);}for(const _0x3d3274 of _0x4ca2ba){try{await this[_0x8df948(0x325)](_0x3d3274);}catch{}}}catch{}}async[_0x12bded(0x210)](){const _0x2c12b4=_0x12bded;return this[_0x2c12b4(0x2ea)](this[_0x2c12b4(0x31c)]());}async['publishChildRow'](_0x478687){const _0x165449=_0x12bded;if(!this['_statusEnv']||!this['_isWriter'])return;return this[_0x165449(0x2ea)](this[_0x165449(0x3e7)](_0x478687));}[_0x12bded(0x3e7)]({pid:_0x49a2aa,startedAt:_0x52e676,kind:_0x5e28e8,supervisorKey:_0x4b5529,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x12bded(0x35a),meta:meta=null,stats:stats=null}){const _0x420629=_0x12bded,_0x42dd30=Date[_0x420629(0x3fc)](),_0x401163=_0x509992(_0x49a2aa,_0x52e676);return{'nodeKey':_0x4563a6(_0x401163,'0'),'processKey':_0x401163,'instanceId':'0','pid':_0x49a2aa,'startedAt':_0x52e676,'ppid':process[_0x420629(0x2c8)],'host':_0x11c5cb['hostname'](),'supervisorKey':_0x4b5529,'slot':slot,'slotKey':slotKey,'kind':_0x5e28e8,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x42dd30,'expiresAt':_0x42dd30+_0x4d9548,'caps':this[_0x420629(0x2fd)](_0x5e28e8,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x12bded(0x3cc)](_0x55cb3e){const _0x38dc5e=_0x12bded;if(!_0x55cb3e?.['pid'])return null;const _0x4670ad=_0x509992(_0x55cb3e[_0x38dc5e(0x2c8)],_0x55cb3e[_0x38dc5e(0x211)]);this['_children'][_0x38dc5e(0x275)](_0x4670ad,{..._0x55cb3e,'supervisorKey':_0x55cb3e[_0x38dc5e(0x1ef)]??this[_0x38dc5e(0x255)]});if(this[_0x38dc5e(0x2b3)])await this[_0x38dc5e(0x2fe)](this[_0x38dc5e(0x2f4)][_0x38dc5e(0x256)](_0x4670ad))['catch']?.(()=>{});return _0x4670ad;}[_0x12bded(0x206)](_0x9be88a){const _0x9229f8=_0x12bded;if(!_0x9be88a)return;return this[_0x9229f8(0x2f4)][_0x9229f8(0x2aa)](_0x9be88a),this['removeNode'](_0x9be88a);}[_0x12bded(0x3aa)](){const _0xbc5238=_0x12bded,_0x38a2d7=Date[_0xbc5238(0x3fc)](),_0x49d55a=process[_0xbc5238(0x1fc)](),_0x5ee1e6=(_0x38a2d7-this[_0xbc5238(0x2d3)])*0x3e8;if(_0x5ee1e6>=0x3d090){const _0x274a7d=_0x49d55a['user']-this['_lastCpuUsage'][_0xbc5238(0x381)]+(_0x49d55a['system']-this['_lastCpuUsage'][_0xbc5238(0x27d)]),_0x340795=_0x11c5cb[_0xbc5238(0x2bd)]()[_0xbc5238(0x21a)]||0x1;this['_lastCpuPct']=Math[_0xbc5238(0x249)](0x64,Math['round'](_0x274a7d/(_0x5ee1e6*_0x340795)*0x64)),this['_lastCpuWindowMs']=Math['round'](_0x5ee1e6/0x3e8),this['_lastCpuUsage']=_0x49d55a,this[_0xbc5238(0x2d3)]=_0x38a2d7;}const _0x241573=process[_0xbc5238(0x395)](),_0x5910f0=this[_0xbc5238(0x358)][_0xbc5238(0x261)];let _0x40b6af=0x0;if(_0x5910f0>0x0){const _0x53a3e2=[this['okdb'],...this[_0xbc5238(0x292)][_0xbc5238(0x338)]?.['values']?.()??[]];for(const _0x2e7892 of _0x53a3e2){const _0x50c131=_0x2e7892['functions']?.[_0xbc5238(0x2eb)];if(_0x50c131)_0x40b6af+=_0x50c131['liveThreadStats']['busy'];}}let _0x1844ea=null;const _0x58b919=_0x5910f0;if(_0x58b919>0x0){let _0x37111f=0x0;for(const _0x2cafb1 of this['_threadStats']['values']())_0x37111f+=_0x2cafb1[_0xbc5238(0x25d)]||0x0;_0x1844ea={'count':_0x58b919,'heapUsed':_0x37111f,'sandbox':_0x5910f0,'busy':_0x40b6af};}return{'rss':_0x241573[_0xbc5238(0x34c)],'heapUsed':_0x241573[_0xbc5238(0x25d)],'heapTotal':_0x241573[_0xbc5238(0x3f1)],'external':_0x241573[_0xbc5238(0x2a3)],'cpuPct':this[_0xbc5238(0x1de)],'cpuWindowMs':this[_0xbc5238(0x2ff)]??null,'threads':_0x1844ea,'at':_0x38a2d7};}[_0x12bded(0x24f)](_0x291196,_0x473724){const _0x1e687c=_0x12bded;if(!_0x291196||!_0x473724)return;this['_threadStats'][_0x1e687c(0x275)](_0x291196,_0x473724);}[_0x12bded(0x29d)](_0x478fd8){const _0x2a5b3f=_0x12bded;this[_0x2a5b3f(0x358)][_0x2a5b3f(0x2aa)](_0x478fd8);}[_0x12bded(0x32c)](_0x2daa69,_0x36b0e6,_0x212446=undefined){const _0x19470b=_0x12bded,_0x43ded1=this['_children'][_0x19470b(0x256)](_0x2daa69);if(!_0x43ded1||!_0x36b0e6)return;if(_0x212446!==undefined)_0x43ded1[_0x19470b(0x2dd)]=_0x212446;_0x43ded1[_0x19470b(0x33f)]={'rss':_0x36b0e6[_0x19470b(0x34c)]??null,'heapUsed':_0x36b0e6[_0x19470b(0x25d)]??null,'heapTotal':_0x36b0e6[_0x19470b(0x3f1)]??null,'external':_0x36b0e6[_0x19470b(0x2a3)]??null,'cpuPct':_0x36b0e6[_0x19470b(0x322)]??null,'cpuWindowMs':_0x36b0e6['cpuWindowMs']??null,'threads':_0x36b0e6[_0x19470b(0x225)]??null,'claims':_0x36b0e6['claims']??null,'envsOpen':_0x36b0e6['envsOpen']??null,'at':Date['now']()};}[_0x12bded(0x31c)](){const _0x32bb70=_0x12bded,_0x137730=Date['now'](),_0x361b68=this[_0x32bb70(0x292)][_0x32bb70(0x37a)]||{},_0xfd79af=this[_0x32bb70(0x31e)]||'cli';return{'nodeKey':this[_0x32bb70(0x2b7)],'processKey':this[_0x32bb70(0x255)],'instanceId':this[_0x32bb70(0x387)],'pid':process[_0x32bb70(0x2c8)],'startedAt':this[_0x32bb70(0x370)],'instanceStartedAt':this[_0x32bb70(0x295)],'ppid':typeof process[_0x32bb70(0x37d)]==='number'?process[_0x32bb70(0x37d)]:null,'host':_0x11c5cb[_0x32bb70(0x2bf)](),'supervisorKey':this[_0x32bb70(0x2d4)]??null,'version':require$$6[_0x32bb70(0x1dc)],'kind':_0xfd79af,'role':{'engines':!!_0x361b68[_0x32bb70(0x399)],'processors':!!_0x361b68['processors'],'compaction':_0x361b68[_0x32bb70(0x366)],'http':_0x361b68[_0x32bb70(0x3a1)]},'listenAddr':this[_0x32bb70(0x1d3)]??null,'heartbeatAt':_0x137730,'expiresAt':_0x137730+_0x4d9548,'caps':this[_0x32bb70(0x2fd)](_0xfd79af,_0x361b68),'lifecycle':{'state':'running','desiredVersionApplied':null},'meta':{...this[_0x32bb70(0x2e4)]},'processing':_0x361b68[_0x32bb70(0x1d4)]?this[_0x32bb70(0x2d5)]():null,'engines':_0x361b68[_0x32bb70(0x399)]?[...this[_0x32bb70(0x292)][_0x32bb70(0x2ee)]??[]]:null,'singletonClaims':this[_0x32bb70(0x353)](),'stats':this['_sampleOwnStats'](),'writers':this[_0x32bb70(0x25a)]()};}['_collectWriterFacet'](){const _0x477c88=_0x12bded,_0x45651e={};try{for(const [_0x241374,_0x5512a9]of this[_0x477c88(0x292)][_0x477c88(0x338)]){try{const _0x1d05b1=_0x5512a9['writerStatus']?.();if(!_0x1d05b1)continue;if(!_0x1d05b1[_0x477c88(0x3d9)]&&!_0x1d05b1[_0x477c88(0x351)]&&!(_0x1d05b1[_0x477c88(0x30f)]??0x0)&&!_0x1d05b1[_0x477c88(0x29c)])continue;_0x45651e[_0x241374]={'depth':_0x1d05b1[_0x477c88(0x3d9)],'oldestPendingMs':_0x1d05b1[_0x477c88(0x2f1)],'committed':_0x1d05b1['committed'],'commitsPerSec':_0x1d05b1[_0x477c88(0x3ae)],'commitP99Ms':_0x1d05b1['commitP99Ms'],'parkedNow':_0x1d05b1['parkedNow']??0x0,'draining':!!_0x1d05b1[_0x477c88(0x29c)]};}catch{}}}catch{}return Object[_0x477c88(0x356)](_0x45651e)[_0x477c88(0x21a)]?_0x45651e:null;}[_0x12bded(0x353)](){const _0x2cb477=_0x12bded,_0x3c63a7=process[_0x2cb477(0x2c8)],_0x5afe43=Date['now'](),_0x5281df=_0x37d460=>{const _0x1d3145=_0x2cb477;if(!_0x37d460)return[];const _0x14ba5d=[];try{for(const {id:_0x16d98b,entry:_0x2cb12a}of _0x37d460[_0x1d3145(0x348)]()){if(_0x2cb12a?.['holder']?.['pid']!==_0x3c63a7)continue;const _0x3ae012=_0x2cb12a[_0x1d3145(0x2ef)]??_0x2cb12a[_0x1d3145(0x253)]??0x0;if(_0x3ae012+(_0x2cb12a['ttlMs']??0x0)<_0x5afe43)continue;_0x14ba5d['push'](_0x16d98b);}}catch{}return _0x14ba5d;},_0x291e54=_0x5281df(this['_singletonLock'](_0x2cb477(0x327))),_0x5daac6=_0x5281df(this[_0x2cb477(0x37f)](_0x2cb477(0x3ab)));if(!_0x291e54[_0x2cb477(0x21a)]&&!_0x5daac6[_0x2cb477(0x21a)])return null;return{'compact':_0x291e54,'replicate':_0x5daac6};}[_0x12bded(0x37f)](_0x187664){const _0x1c4e54=_0x12bded;if(!this[_0x1c4e54(0x292)]?.['_rootDb'])return null;if(!this['_singletonLocks'])this[_0x1c4e54(0x1f6)]=new Map();let _0x2d58f5=this[_0x1c4e54(0x1f6)]['get'](_0x187664);if(!_0x2d58f5)try{_0x2d58f5=new _0x123333(this[_0x1c4e54(0x292)][_0x1c4e54(0x3cf)],{'namespace':_0x187664}),this['_singletonLocks'][_0x1c4e54(0x275)](_0x187664,_0x2d58f5);}catch{return null;}return _0x2d58f5;}[_0x12bded(0x2d5)](){const _0x26633d=_0x12bded,_0x49d87a=[];try{for(const [_0x19a6d1,_0x1912ce]of this[_0x26633d(0x292)]['_envs']){if(_0x19a6d1[_0x26633d(0x1f7)]('~'))continue;for(const _0x1ea00f of _0x1912ce[_0x26633d(0x397)][_0x26633d(0x2a5)]())_0x49d87a[_0x26633d(0x39a)]({..._0x1ea00f,'env':_0x19a6d1});}}catch{}return{'participate':this[_0x26633d(0x292)][_0x26633d(0x1d4)]?.[_0x26633d(0x280)]??![],'processors':_0x49d87a};}[_0x12bded(0x20d)](){const _0x32f27a=_0x12bded;if(this[_0x32f27a(0x1ff)])return!![];const _0x4508c5=this[_0x32f27a(0x292)][_0x32f27a(0x3cf)];if(!_0x4508c5)return![];return this[_0x32f27a(0x1ff)]=_0x4508c5[_0x32f27a(0x3d1)](_0x493b20,{'dupSort':![]}),this[_0x32f27a(0x36a)]=_0x4508c5[_0x32f27a(0x3d1)](_0x2cba6b,{'dupSort':![]}),!![];}async['_migrateVocab'](){const _0x224c29=_0x12bded;if(!this['_ensureDesired']())return;const _0x4bff85=_0x224c29(0x340),_0x4c3d79=0x1,_0x4064c9=this[_0x224c29(0x1ff)][_0x224c29(0x256)](_0x4bff85)??0x0;if(_0x4064c9>=_0x4c3d79)return;const _0x570032=_0x30119d=>{const _0x1ceb1b=_0x224c29;if(_0x30119d==='worker')return _0x1ceb1b(0x307);if(_0x30119d===_0x1ceb1b(0x29a))return _0x1ceb1b(0x300);return _0x30119d;};await this['okdb'][_0x224c29(0x343)]['_writer'][_0x224c29(0x306)](()=>{const _0x104d54=_0x224c29;for(const _0xf4b0a of[_0x104d54(0x22d),_0x104d54(0x38f)]){for(const {key:_0x436255,value:_0x3fb22c}of this[_0x104d54(0x1ff)][_0x104d54(0x3cb)]({'start':_0xf4b0a,'end':_0xf4b0a+'\xff'})){if(typeof _0x436255!==_0x104d54(0x361)||!_0x436255[_0x104d54(0x1f7)](_0xf4b0a))break;const _0x13bc2b=_0x570032(_0x3fb22c['mode']);if(_0x13bc2b!==_0x3fb22c[_0x104d54(0x3e6)])this[_0x104d54(0x1ff)]['put'](_0x436255,{..._0x3fb22c,'mode':_0x13bc2b});}}this[_0x104d54(0x1ff)][_0x104d54(0x281)](_0x4bff85,_0x4c3d79);});}[_0x12bded(0x288)](){const _0x15e26b=_0x12bded;return!!this[_0x15e26b(0x1ff)];}[_0x12bded(0x1fb)](_0x55ebef,_0xe3cf51){const _0x456162=_0x12bded;if(!this['_ensureDesired']())return null;const _0x38e701=_0x55ebef+'/'+_0xe3cf51;return this[_0x456162(0x28b)](),this[_0x456162(0x27f)][_0x456162(0x256)](_0x38e701)??this[_0x456162(0x1ff)][_0x456162(0x256)](_0x38e701)??null;}[_0x12bded(0x28b)](){const _0x59dbd4=_0x12bded;if(!_0x4c3ede)return;try{this['okdb'][_0x59dbd4(0x343)]?.['db']?.[_0x59dbd4(0x266)]?.();}catch{}}async[_0x12bded(0x310)](_0x2d0cf9,_0x5f53ef,_0x2fc683){const _0x22e133=_0x12bded;if(!this[_0x22e133(0x20d)]())return null;const _0x47893b=_0x2d0cf9+'/'+_0x5f53ef;this[_0x22e133(0x28b)]();const _0x3774a6=this[_0x22e133(0x27f)]['get'](_0x47893b)??this['_desired'][_0x22e133(0x256)](_0x47893b)??{'version':0x0},_0x52e3ef=(_0x3774a6[_0x22e133(0x1dc)]||0x0)+0x1,_0x4b71e4={..._0x3774a6,..._0x2fc683,'version':_0x52e3ef,'updatedAt':Date[_0x22e133(0x3fc)]()};this['_desiredOverlay'][_0x22e133(0x275)](_0x47893b,_0x4b71e4);try{await this[_0x22e133(0x292)][_0x22e133(0x343)]['_writer']['transaction'](()=>{const _0x4bc440=_0x22e133;this[_0x4bc440(0x1ff)][_0x4bc440(0x281)](_0x47893b,_0x4b71e4);});}finally{if(this[_0x22e133(0x27f)][_0x22e133(0x256)](_0x47893b)===_0x4b71e4)this['_desiredOverlay'][_0x22e133(0x2aa)](_0x47893b);}return _0x52e3ef;}[_0x12bded(0x2a4)](_0x5cf53b){const _0x335588=_0x12bded;if(!this[_0x335588(0x20d)]())return[];this['_refreshDesiredSnapshot']();const _0x4afbce=_0x5cf53b+'/',_0x1bffd7=[];for(const {key:_0x24fc88,value:_0xba8522}of this['_desired'][_0x335588(0x3cb)]({'start':_0x4afbce,'end':_0x4afbce+'\xff'})){if(typeof _0x24fc88!==_0x335588(0x361)||!_0x24fc88[_0x335588(0x1f7)](_0x4afbce))break;_0x1bffd7['push']({'key':_0x24fc88[_0x335588(0x204)](_0x4afbce['length']),'value':_0xba8522});}return _0x1bffd7;}[_0x12bded(0x222)](_0x10a75b){const _0x5348b1=_0x12bded;if(!this[_0x5348b1(0x20d)]())return null;return this[_0x5348b1(0x36a)][_0x5348b1(0x256)](_0x10a75b)??null;}async[_0x12bded(0x3c4)](_0x3c6597,_0xef229d,_0x329a00={}){const _0x518db6=_0x12bded;if(!this[_0x518db6(0x20d)]())return null;let _0x4f80ec;return await this[_0x518db6(0x292)][_0x518db6(0x343)][_0x518db6(0x321)][_0x518db6(0x306)](()=>{const _0x5d3689=_0x518db6,_0x21d058=this[_0x5d3689(0x36a)][_0x5d3689(0x256)](_0x3c6597)||{'epoch':0x0};_0x4f80ec=(_0x21d058[_0x5d3689(0x2a9)]||0x0)+0x1,this[_0x5d3689(0x36a)]['put'](_0x3c6597,{..._0x21d058,..._0x329a00,'cmd':_0xef229d,'epoch':_0x4f80ec,'updatedAt':Date['now']()});}),_0x4f80ec;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x1058ee,'nodeKey':_0x509992,'logicalKey':_0x55b4bd,'slotKey':_0x2bfa24,'PROCESS_ENV':_0x361773,'NODE_TYPE':_0x616751},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x4bddb6=_0x3b4fb0;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x7a3a80=require$$0$4,{EVENTS:_0xa86aad,CHANGE_ACTIONS:_0x4a6cfb}=requireOkdbEnums(),{LOOP:_0x20ca17}=requireOkdbLoopMonitor(),_0x1eb994=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x3f103b=0x5,_0x580070=0x2710;class _0x5092d4 extends _0x7a3a80{constructor(_0x768cc3,_0x3d8a79={}){const _0x29acb7=_0x55dd;super(),this[_0x29acb7(0x292)]=_0x768cc3,this['_quantum']=_0x3d8a79[_0x29acb7(0x24d)]??_0x1eb994,this[_0x29acb7(0x2c9)]=_0x3d8a79[_0x29acb7(0x3c6)]??_0x3f103b,this[_0x29acb7(0x3b1)]=_0x3d8a79[_0x29acb7(0x390)]??_0x580070,this['_started']=![],this['_cursors']=new Map(),this['_baselines']=new Map(),this['_pending']=new Map(),this[_0x29acb7(0x203)]=null,this[_0x29acb7(0x209)]=![],this[_0x29acb7(0x331)]=new Set(),this['_onItem']=_0x545954=>this[_0x29acb7(0x3bc)](_0x545954),this[_0x29acb7(0x3f7)]=_0x4369c5=>this[_0x29acb7(0x37c)](_0x4369c5),this[_0x29acb7(0x2b9)]=()=>this[_0x29acb7(0x227)]();}['start'](){const _0x58da1c=_0x55dd;if(this['_started'])return;this[_0x58da1c(0x3f8)]=!![];for(const [_0x332efd,_0x32bf86]of this[_0x58da1c(0x292)]['_envs']){if(_0x332efd[_0x58da1c(0x1f7)]('~'))continue;try{_0x32bf86[_0x58da1c(0x355)]();}catch{}}for(const [_0x4d5f3d,_0x18d836]of this[_0x58da1c(0x292)]['_envs']){if(_0x4d5f3d[_0x58da1c(0x1f7)]('~'))continue;try{this[_0x58da1c(0x2c4)][_0x58da1c(0x275)](_0x4d5f3d,_0x18d836[_0x58da1c(0x236)]()||0x0);}catch{}}const {events:_0x79e346}=this[_0x58da1c(0x292)];_0x79e346['on'](_0xa86aad[_0x58da1c(0x34a)],this[_0x58da1c(0x392)]),_0x79e346['on'](_0xa86aad[_0x58da1c(0x301)],this[_0x58da1c(0x392)]),_0x79e346['on'](_0xa86aad[_0x58da1c(0x383)],this['_onItem']),_0x79e346['on'](_0xa86aad['SYSTEM_POKE'],this[_0x58da1c(0x3f7)]),_0x79e346['once'](_0xa86aad[_0x58da1c(0x339)],this[_0x58da1c(0x2b9)]);}[_0x4bddb6(0x227)](){const _0x288ca7=_0x4bddb6;if(!this[_0x288ca7(0x3f8)])return;this[_0x288ca7(0x3f8)]=![];const {events:_0x48a002}=this[_0x288ca7(0x292)];_0x48a002[_0x288ca7(0x29f)](_0xa86aad[_0x288ca7(0x34a)],this['_onItem']),_0x48a002[_0x288ca7(0x29f)](_0xa86aad[_0x288ca7(0x301)],this[_0x288ca7(0x392)]),_0x48a002[_0x288ca7(0x29f)](_0xa86aad[_0x288ca7(0x383)],this[_0x288ca7(0x392)]),_0x48a002['off'](_0xa86aad[_0x288ca7(0x25e)],this[_0x288ca7(0x3f7)]);try{_0x48a002[_0x288ca7(0x29f)](_0xa86aad[_0x288ca7(0x339)],this[_0x288ca7(0x2b9)]);}catch{}this[_0x288ca7(0x203)]&&(clearTimeout(this[_0x288ca7(0x203)]),this['_flushTimer']=null),this['_pending'][_0x288ca7(0x2ba)](),this[_0x288ca7(0x290)][_0x288ca7(0x2ba)](),this[_0x288ca7(0x2c4)][_0x288ca7(0x2ba)](),this[_0x288ca7(0x331)][_0x288ca7(0x2ba)]();}['_dedupeKey'](_0x468e1d,_0x129800,_0x280382,_0x43417f){return _0x468e1d+'\x00'+_0x129800+'\x00'+_0x280382+'\x00'+_0x43417f;}['_markSeen'](_0x27abbb,_0x1b1506,_0x106e53,_0x2adf00){const _0x221f93=_0x4bddb6,_0x544f2b=this['_dedupeKey'](_0x27abbb,_0x1b1506,_0x106e53,_0x2adf00);if(this[_0x221f93(0x331)][_0x221f93(0x23e)](_0x544f2b))return![];this[_0x221f93(0x331)]['add'](_0x544f2b);if(this[_0x221f93(0x331)][_0x221f93(0x261)]>this[_0x221f93(0x3b1)]){const _0x503859=this[_0x221f93(0x331)]['values']()[_0x221f93(0x365)]()[_0x221f93(0x21f)];this[_0x221f93(0x331)][_0x221f93(0x2aa)](_0x503859);}return!![];}[_0x4bddb6(0x3bc)](_0x42f7f3){const _0x15272b=_0x4bddb6;if(!this[_0x15272b(0x3f8)]||!_0x42f7f3)return;const {env:_0x4fafd1,type:_0x1afdf3,key:_0x10f674,clock:_0x33865a,origin:_0x323d35,action:_0xb9e285,newValue:_0x1ef4a6,oldValue:_0xd47885}=_0x42f7f3;if(_0x4fafd1==null||_0x1afdf3==null||_0x10f674==null)return;if(typeof _0x4fafd1===_0x15272b(0x361)&&_0x4fafd1[_0x15272b(0x1f7)]('~'))return;if(typeof _0x1afdf3===_0x15272b(0x361)&&_0x1afdf3['startsWith']('~'))return;if(!this[_0x15272b(0x278)](_0x4fafd1,_0x1afdf3,_0x10f674,_0x33865a))return;const _0x205581=_0xb9e285===_0x4a6cfb[_0x15272b(0x352)]?'remove':_0x15272b(0x281);this['emit'](_0x15272b(0x308),{'env':_0x4fafd1,'type':_0x1afdf3,'key':_0x10f674,'op':_0x205581,'clock':_0x33865a,'origin':_0x323d35,'value':_0x205581===_0x15272b(0x34e)?null:_0x1ef4a6,'prevValue':_0xd47885});}[_0x4bddb6(0x37c)](_0x55fcbf){const _0x17d8a7=_0x4bddb6;if(!this[_0x17d8a7(0x3f8)])return;if(!_0x55fcbf||typeof _0x55fcbf[_0x17d8a7(0x394)]!=='string'||typeof _0x55fcbf['type']!==_0x17d8a7(0x361))return;const {env:_0xe40746,type:_0x55acce}=_0x55fcbf;if(_0xe40746[_0x17d8a7(0x1f7)]('~')||_0x55acce[_0x17d8a7(0x1f7)]('~'))return;this[_0x17d8a7(0x24a)][_0x17d8a7(0x275)](_0xe40746+'\x00'+_0x55acce,{'env':_0xe40746,'type':_0x55acce}),this[_0x17d8a7(0x2d6)]();}[_0x4bddb6(0x2d6)](){const _0x59a0b4=_0x4bddb6;if(this[_0x59a0b4(0x203)])return;const _0x493b09=()=>{const _0x1c5c0b=_0x59a0b4;this[_0x1c5c0b(0x203)]=null,this[_0x1c5c0b(0x3ec)]()['catch'](()=>{});};this['_flushTimer']=setTimeout(_0x493b09,this[_0x59a0b4(0x2c9)]>0x0?this[_0x59a0b4(0x2c9)]:0x0);}async[_0x4bddb6(0x3ec)](){const _0x4b4e45=_0x4bddb6;if(this[_0x4b4e45(0x209)]){this[_0x4b4e45(0x2d6)]();return;}this[_0x4b4e45(0x209)]=!![];try{const _0xdad157=[...this['_pending']['values']()];this[_0x4b4e45(0x24a)][_0x4b4e45(0x2ba)]();let _0x4aa216=![];for(const {env:_0x405c0a,type:_0x301da6}of _0xdad157){try{const _0x10cc30=await this[_0x4b4e45(0x248)](_0x405c0a,_0x301da6);if(_0x10cc30)_0x4aa216=!![];}catch{this['_pending'][_0x4b4e45(0x275)](_0x405c0a+'\x00'+_0x301da6,{'env':_0x405c0a,'type':_0x301da6}),_0x4aa216=!![];}}if(_0x4aa216||this[_0x4b4e45(0x24a)][_0x4b4e45(0x261)]>0x0)this[_0x4b4e45(0x2d6)]();}finally{this[_0x4b4e45(0x209)]=![];}}async['_drainOne'](_0x7dafd5,_0x4b98b3){const _0x17c2bc=_0x4bddb6,_0x36e2a2=await this[_0x17c2bc(0x292)]['_openEnvLazy'](_0x7dafd5),_0x2324bb=_0x7dafd5+'\x00'+_0x4b98b3;!this[_0x17c2bc(0x290)][_0x17c2bc(0x23e)](_0x2324bb)&&(!this[_0x17c2bc(0x2c4)][_0x17c2bc(0x23e)](_0x7dafd5)&&(_0x36e2a2[_0x17c2bc(0x355)](),this['_baselines']['set'](_0x7dafd5,_0x36e2a2['getClock']()||0x0)),this[_0x17c2bc(0x290)][_0x17c2bc(0x275)](_0x2324bb,this[_0x17c2bc(0x2c4)][_0x17c2bc(0x256)](_0x7dafd5)));const _0x51ac58=this[_0x17c2bc(0x290)][_0x17c2bc(0x256)](_0x2324bb),_0x316732=_0x36e2a2[_0x17c2bc(0x236)](_0x4b98b3)||0x0;if(_0x316732<=_0x51ac58)return![];const _0x381b21=_0x51ac58+this[_0x17c2bc(0x3e4)],_0x55afb4=Math[_0x17c2bc(0x249)](_0x316732,_0x381b21),_0x56646=_0x20ca17[_0x17c2bc(0x215)]?_0x20ca17[_0x17c2bc(0x3fc)]():0x0,_0x4b654d=Array['from'](_0x36e2a2[_0x17c2bc(0x32d)](_0x4b98b3,_0x51ac58+0x1,_0x55afb4));let _0x4eeeec=_0x51ac58;for(const _0x57b222 of _0x4b654d){const {clock:_0x3dd85c,key:_0x24394c,action:_0x2cffed,origin:_0x149591}=_0x57b222;if(_0x3dd85c>_0x4eeeec)_0x4eeeec=_0x3dd85c;if(_0x24394c==null)continue;if(!this['_markSeen'](_0x7dafd5,_0x4b98b3,_0x24394c,_0x3dd85c))continue;let _0xbc399a,_0x5f3088;if(_0x2cffed===_0x4a6cfb[_0x17c2bc(0x352)])_0xbc399a=_0x17c2bc(0x34e),_0x5f3088=null;else{const _0x1f09d4=_0x36e2a2[_0x17c2bc(0x256)](_0x4b98b3,_0x24394c);_0x1f09d4==null?(_0xbc399a=_0x17c2bc(0x34e),_0x5f3088=null):(_0xbc399a=_0x17c2bc(0x281),_0x5f3088=_0x1f09d4);}this[_0x17c2bc(0x2d2)](_0x17c2bc(0x308),{'env':_0x7dafd5,'type':_0x4b98b3,'key':_0x24394c,'op':_0xbc399a,'clock':_0x3dd85c,'origin':_0x149591,'value':_0x5f3088});}if(_0x20ca17['enabled'])_0x20ca17[_0x17c2bc(0x2a1)](_0x17c2bc(0x22a)+_0x7dafd5+':'+_0x4b98b3,_0x20ca17['now']()-_0x56646,'n='+_0x4b654d['length']);return this[_0x17c2bc(0x290)][_0x17c2bc(0x275)](_0x2324bb,Math[_0x17c2bc(0x287)](_0x4eeeec,_0x55afb4)),_0x36e2a2[_0x17c2bc(0x236)](_0x4b98b3)>_0x55afb4;}[_0x4bddb6(0x243)](){const _0x1e60a2=_0x4bddb6;return{'started':this[_0x1e60a2(0x3f8)],'quantum':this[_0x1e60a2(0x3e4)],'flushDebounce':this['_flushDebounce'],'cursors':Object[_0x1e60a2(0x26e)]([...this[_0x1e60a2(0x290)][_0x1e60a2(0x20c)]()][_0x1e60a2(0x38b)](([_0xe8e7bb,_0x1b8da1])=>[_0xe8e7bb[_0x1e60a2(0x212)]('\x00',':'),_0x1b8da1])),'pending':this['_pending'][_0x1e60a2(0x261)],'seen':this[_0x1e60a2(0x331)][_0x1e60a2(0x261)]};}}return _0x5092d4['CHANGEFEED_QUANTUM']=_0x1eb994,okdbChangefeed={'OKDBChangefeed':_0x5092d4},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x5ba5e3=_0x3b4fb0;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x31d508=require$$1$1,_0xea03e7=require$$1,{EVENTS:_0xd81128}=requireOkdbEnums(),_0x237cd5=require$$0$3,{slotKey:_0x64c170}=requireOkdbProcessRegistry(),_0x12f7f5=0xfa,_0x349298=0xfa0,_0x91b31f=0x5,_0x41ab54=0x2710,_0xf72a24=0xbb8,_0x1e616f=0x7d0,_0x19b40e=_0x5ba5e3(0x1f5),_0x38dd32=_0x5ba5e3(0x38e),_0x4a1564='log',_0x447617=_0x5ba5e3(0x33f),_0x53ba27=[_0xd81128['VIEW_PROGRESS'],_0xd81128[_0x5ba5e3(0x30d)],_0xd81128[_0x5ba5e3(0x293)],_0xd81128[_0x5ba5e3(0x333)],_0xd81128[_0x5ba5e3(0x3d0)],_0xd81128[_0x5ba5e3(0x2c3)],_0xd81128['INDEX_RESET'],_0xd81128[_0x5ba5e3(0x3d4)],_0x5ba5e3(0x34d),_0x5ba5e3(0x362),'processor:error',_0x5ba5e3(0x36c),'processor:resumed',_0x5ba5e3(0x3a5)],_0x4e75af=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x3e5f8b({workers:_0x4f10f5,makeOkdb:_0x5b2c9d,port:_0x46aca5,primaryOkdb:_0x65e3ea,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0x5bc2a2=_0x5ba5e3;if(_0x31d508['isPrimary'])return childEntry&&_0x31d508[_0x5bc2a2(0x36d)]({'exec':_0xea03e7[_0x5bc2a2(0x1ec)](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0x54df4d=_0x5bc2a2,_0x18f907=[];for(let _0x214f7f=0x0;_0x214f7f<process[_0x54df4d(0x245)]['length'];_0x214f7f++){const _0x2a2eda=process[_0x54df4d(0x245)][_0x214f7f];if(_0x2a2eda[_0x54df4d(0x1f7)]('--test')||_0x2a2eda[_0x54df4d(0x1f7)]('--watch')||_0x2a2eda['startsWith'](_0x54df4d(0x386)))continue;if(_0x2a2eda==='-e'||_0x2a2eda===_0x54df4d(0x1df)||_0x2a2eda==='-p'||_0x2a2eda===_0x54df4d(0x3c9)){_0x214f7f++;continue;}_0x18f907[_0x54df4d(0x39a)](_0x2a2eda);}return _0x18f907;})())}),_0x5dc38e({'workers':_0x4f10f5,'port':_0x46aca5,'primaryOkdb':_0x65e3ea,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x46aca5});return _0x32dd4a({'makeOkdb':_0x5b2c9d,'port':_0x46aca5});}function _0x5dc38e({workers:_0x545f3b,port:_0x1d9c2e,primaryOkdb:_0x100b0c,workerEnv:_0x1d703f,workerRole:_0xd3eb50,listenAddr:_0x334ce}){const _0x333c73=_0x5ba5e3,_0x342899=new Map(),_0x273236=new Map();let _0x4df2d7=![];const _0x4d7510=_0x574f6c=>_0x574f6c?.['__okdbSlot'],_0x29d494=_0xc83bd9=>{const _0x49122a=_0x55dd,_0x327e1b=_0x31d508[_0x49122a(0x326)]({...process.env,..._0x1d703f||{},'OKDB_CLUSTER_SLOT':String(_0xc83bd9)});return _0x327e1b['__okdbSlot']=_0xc83bd9,_0x342899[_0x49122a(0x275)](_0x327e1b[_0x49122a(0x3dc)][_0x49122a(0x2c8)],{'worker':_0x327e1b,'startedAt':Date[_0x49122a(0x3fc)](),'slot':_0xc83bd9}),_0x327e1b['on'](_0x49122a(0x258),_0x5a0f0c=>{const _0x124fce=_0x49122a;console[_0x124fce(0x2a7)](_0x124fce(0x2ce)+_0x327e1b[_0x124fce(0x3dc)][_0x124fce(0x2c8)]+_0x124fce(0x240)+(_0x5a0f0c?.[_0x124fce(0x30e)]??_0x5a0f0c));}),_0x327e1b['on'](_0x49122a(0x1e5),()=>_0x5574a3()),_0x327e1b;},_0xc76da8=_0x378eee=>{const _0xabbb62=_0x55dd;for(const {worker:_0x34ec89}of _0x342899[_0xabbb62(0x3fe)]()){if(_0x34ec89['isDead']()||!_0x34ec89['isConnected']())continue;try{_0x34ec89[_0xabbb62(0x3f3)](_0x378eee);}catch{}}};_0x100b0c?.[_0x333c73(0x20b)]?.({'kind':_0x333c73(0x35f),'listenAddr':_0x334ce})['catch'](()=>{}),_0x100b0c?.[_0x333c73(0x2c6)]?.[_0x333c73(0x3e8)]?.({'workersConfigured':_0x545f3b});const _0x2223a8={'engines':!![],'processors':!![],'compaction':!![],..._0xd3eb50,'http':!![]},_0x5574a3=()=>{const _0x3da994=_0x333c73,_0x180b1f=_0x100b0c?.['processes'];if(!_0x180b1f||!_0x180b1f[_0x3da994(0x2b3)])return;const _0xb292a6=_0x180b1f[_0x3da994(0x251)];for(const {worker:_0xfcc9c2,startedAt:_0x12bca,slot:_0x2c6c11,stats:_0x3dc7d6,processing:_0x7ce78f}of _0x342899['values']()){if(_0xfcc9c2[_0x3da994(0x330)]())continue;const _0x589f03=_0x180b1f[_0x3da994(0x288)]?.()&&_0x180b1f[_0x3da994(0x1fb)](_0x3da994(0x24b),_0x31325e(_0x2c6c11))?.[_0x3da994(0x26f)]===!![];_0x180b1f['publishChildRow']({'pid':_0xfcc9c2[_0x3da994(0x3dc)]['pid'],'startedAt':_0x12bca,'kind':'http-server','supervisorKey':_0xb292a6,'slot':_0x2c6c11,'slotKey':_0x31325e(_0x2c6c11),'role':_0x2223a8,'listenAddr':_0x334ce,'lifecycle':_0x589f03?_0x3da994(0x31d):'running','processing':_0x7ce78f??null,'stats':_0x3dc7d6??null})[_0x3da994(0x299)](()=>{});}},_0x31325e=_0x5b4212=>_0x64c170(_0x333c73(0x28c)+_0x1d9c2e,_0x5b4212),_0x4088cc=_0xae2e4a=>{const _0x4557cf=_0x333c73,_0x361d9c=_0x100b0c?.[_0x4557cf(0x2c6)];if(!_0x361d9c?.[_0x4557cf(0x288)]?.())return![];return _0x361d9c[_0x4557cf(0x1fb)](_0x4557cf(0x24b),_0x31325e(_0xae2e4a))?.[_0x4557cf(0x26f)]===!![];};for(let _0x5744f9=0x0;_0x5744f9<_0x545f3b;_0x5744f9++){const _0x907e3e=_0x4088cc(_0x5744f9);_0x273236[_0x333c73(0x275)](_0x5744f9,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x907e3e,'respawnTimer':null}),_0x907e3e?console[_0x333c73(0x2a7)]('[okdb-cluster]\x20slot='+_0x5744f9+_0x333c73(0x1f0)):_0x29d494(_0x5744f9);}const _0x56626a=()=>{const _0x42acc7=_0x333c73,_0xae9667=_0x100b0c?.[_0x42acc7(0x2c6)];if(!_0xae9667?.[_0x42acc7(0x2b3)]||!_0xae9667[_0x42acc7(0x288)]?.())return;for(const [_0x47debe,_0x3fa150]of _0x273236['entries']()){const _0x1d888e=_0xae9667['getDesired'](_0x42acc7(0x24b),_0x31325e(_0x47debe)),_0xfdcf4f=_0x1d888e?.[_0x42acc7(0x26f)]===!![],_0x226f64=_0x1d888e?.['kill']===!![];if(_0xfdcf4f&&!_0x3fa150[_0x42acc7(0x32b)]){_0x3fa150[_0x42acc7(0x32b)]=!![];_0x3fa150[_0x42acc7(0x217)]&&(clearTimeout(_0x3fa150[_0x42acc7(0x217)]),_0x3fa150[_0x42acc7(0x217)]=null);for(const {worker:_0x4b2cbd}of _0x342899[_0x42acc7(0x3fe)]()){if(_0x4d7510(_0x4b2cbd)!==_0x47debe||_0x4b2cbd[_0x42acc7(0x330)]())continue;try{if(_0x226f64)_0x4b2cbd[_0x42acc7(0x3dc)][_0x42acc7(0x3ef)](_0x42acc7(0x309));else _0x4b2cbd['isConnected']()&&_0x4b2cbd[_0x42acc7(0x2b4)]();}catch{}}console[_0x42acc7(0x2a7)](_0x42acc7(0x2f5)+(_0x226f64?_0x42acc7(0x364):_0x42acc7(0x3ff))+'\x20worker\x20slot='+_0x47debe+'\x20(durable\x20desired-state)');}else{if(!_0xfdcf4f&&_0x3fa150[_0x42acc7(0x32b)]&&_0x1d888e){_0x3fa150[_0x42acc7(0x32b)]=![],_0x3fa150['deaths']=[],_0x3fa150['consecutiveFailures']=0x0;const _0x103bbf=[..._0x342899[_0x42acc7(0x3fe)]()]['some'](({worker:_0x51b709})=>_0x4d7510(_0x51b709)===_0x47debe&&!_0x51b709[_0x42acc7(0x330)]());!_0x103bbf&&!_0x4df2d7&&(_0x29d494(_0x47debe),console['log'](_0x42acc7(0x2f9)+_0x47debe));}}}},_0x19418a=()=>{try{_0x56626a();}catch{}};_0x100b0c?.['events']?.['on']?.(_0xd81128['SYSTEM_PROC'],_0x19418a);const _0x371323=[];if(_0x100b0c?.[_0x333c73(0x250)]?.['on'])for(const _0x5d3c0e of _0x53ba27){const _0x4004b2=_0x3be4dd=>{_0xc76da8({[_0x19b40e]:_0x38dd32,'event':_0x5d3c0e,'data':_0x3be4dd??{}});};_0x100b0c[_0x333c73(0x250)]['on'](_0x5d3c0e,_0x4004b2),_0x371323['push']({'event':_0x5d3c0e,'handler':_0x4004b2});}const _0xe772aa=setInterval(()=>{_0x56626a(),_0x5574a3();},_0x4e75af);_0xe772aa['unref']?.();const _0x510abb=(_0x13762b,_0x11e59f)=>{const _0x128404=_0x333c73;if(!_0x11e59f||typeof _0x11e59f!==_0x128404(0x234)||_0x11e59f[_0x19b40e]!==_0x4a1564)return;if(!_0x100b0c?.[_0x128404(0x2a7)]?.[_0x128404(0x3d2)])return;const _0x385764=_0x11e59f[_0x128404(0x347)]||{};_0x100b0c[_0x128404(0x2a7)][_0x128404(0x3d2)]({..._0x385764,'msg':'[w'+_0x11e59f[_0x128404(0x24b)]+']\x20'+(_0x385764[_0x128404(0x1e6)]??''),'meta':{..._0x385764[_0x128404(0x1e1)]||{},'worker':_0x11e59f[_0x128404(0x24b)],'workerPid':_0x11e59f[_0x128404(0x2c8)]}});};_0x31d508['on'](_0x333c73(0x30e),_0x510abb);const _0x17c8cc=(_0x2682d1,_0x5a29a3)=>{const _0x23abc7=_0x333c73;if(!_0x5a29a3||typeof _0x5a29a3!==_0x23abc7(0x234)||_0x5a29a3[_0x19b40e]!==_0x447617)return;const _0x3aded9=_0x342899[_0x23abc7(0x256)](_0x2682d1['process'][_0x23abc7(0x2c8)]);if(_0x3aded9){_0x3aded9[_0x23abc7(0x33f)]={..._0x5a29a3['stats'],'at':Date[_0x23abc7(0x3fc)]()};if(_0x5a29a3[_0x23abc7(0x2dd)]!==undefined)_0x3aded9[_0x23abc7(0x2dd)]=_0x5a29a3[_0x23abc7(0x2dd)];}};_0x31d508['on'](_0x333c73(0x30e),_0x17c8cc),_0x31d508['on'](_0x333c73(0x376),(_0xf0f750,_0x263ee3,_0x34f628)=>{const _0x5c6ece=_0x333c73,_0x206cce=_0xf0f750[_0x5c6ece(0x3dc)][_0x5c6ece(0x2c8)],_0x34f51f=_0x4d7510(_0xf0f750),_0x39f7d8=_0x342899[_0x5c6ece(0x256)](_0x206cce);if(_0x39f7d8&&_0x100b0c?.[_0x5c6ece(0x2c6)])_0x100b0c['processes'][_0x5c6ece(0x325)](_0x206cce+':'+_0x39f7d8[_0x5c6ece(0x211)])[_0x5c6ece(0x299)](()=>{});_0x342899[_0x5c6ece(0x2aa)](_0x206cce),console['log']('[okdb-cluster]\x20worker\x20pid='+_0x206cce+_0x5c6ece(0x1e9)+(_0x34f51f??'?')+')\x20exited\x20'+('(code='+_0x263ee3+',\x20signal='+(_0x34f628??_0x5c6ece(0x305))+_0x5c6ece(0x2cb)+_0x342899[_0x5c6ece(0x261)]+_0x5c6ece(0x274))),_0x5574a3();if(_0x4df2d7||_0x34f51f==null)return;const _0x55f244=_0x273236['get'](_0x34f51f);if(!_0x55f244||_0x55f244['dead'])return;const _0x358d6c=Date[_0x5c6ece(0x3fc)]();_0x55f244['deaths']['push'](_0x358d6c),_0x55f244[_0x5c6ece(0x272)]=_0x55f244[_0x5c6ece(0x272)][_0x5c6ece(0x3d7)](_0xc85848=>_0x358d6c-_0xc85848<=_0x41ab54);if(_0x55f244['deaths'][_0x5c6ece(0x21a)]>=_0x91b31f){_0x55f244[_0x5c6ece(0x32b)]=!![],console[_0x5c6ece(0x258)](_0x5c6ece(0x270)+_0x34f51f+'\x20died\x20'+_0x55f244[_0x5c6ece(0x272)][_0x5c6ece(0x21a)]+_0x5c6ece(0x294)+(_0x41ab54+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x342899[_0x5c6ece(0x261)]+'\x20worker(s)\x20still\x20serving'));return;}_0x55f244[_0x5c6ece(0x2a8)]++;const _0x2e493b=Math[_0x5c6ece(0x249)](_0x349298,_0x12f7f5*0x2**(_0x55f244[_0x5c6ece(0x2a8)]-0x1));console['log'](_0x5c6ece(0x360)+_0x34f51f+_0x5c6ece(0x252)+_0x2e493b+_0x5c6ece(0x2bb)+_0x55f244[_0x5c6ece(0x2a8)]+')'),_0x55f244[_0x5c6ece(0x217)]=setTimeout(()=>{const _0x40bc37=_0x5c6ece;_0x55f244[_0x40bc37(0x217)]=null;if(_0x4df2d7||_0x55f244[_0x40bc37(0x32b)])return;const _0x5102be=_0x29d494(_0x34f51f);_0x5102be[_0x40bc37(0x2bc)]('listening',()=>{const _0x2c955a=_0x40bc37;if(_0x273236[_0x2c955a(0x256)](_0x34f51f)===_0x55f244)_0x55f244[_0x2c955a(0x2a8)]=0x0;});},_0x2e493b),_0x55f244[_0x5c6ece(0x217)][_0x5c6ece(0x3e3)]?.();});const _0x23c70d=[..._0x342899['keys']()];console[_0x333c73(0x2a7)](_0x333c73(0x1ed)+process[_0x333c73(0x2c8)]+_0x333c73(0x21e)+_0x545f3b+'\x20HTTP\x20server(s)\x20on\x20port\x20'+_0x1d9c2e+':\x20'+('['+_0x23c70d[_0x333c73(0x1ec)](',\x20')+']'));const _0x589a59={'_isClusterController':!![],'port':_0x1d9c2e,'primaryOkdb':_0x100b0c??null,'status'(){const _0x50d009=_0x333c73;return{'clustered':!![],'primaryPid':process[_0x50d009(0x2c8)],'port':_0x1d9c2e,'primaryRole':_0x100b0c?.['role']??null,'processorPid':null,'supervisorPid':process[_0x50d009(0x2c8)],'workers':[..._0x342899[_0x50d009(0x3fe)]()][_0x50d009(0x38b)](({worker:_0x2ef154})=>({'pid':_0x2ef154[_0x50d009(0x3dc)][_0x50d009(0x2c8)],'id':_0x2ef154['id'],'dead':_0x2ef154[_0x50d009(0x330)]()}))};},async 'close'(){const _0x45134c=_0x333c73;_0x4df2d7=!![];for(const _0x17d20c of _0x273236[_0x45134c(0x3fe)]()){_0x17d20c['dead']=!![],_0x17d20c[_0x45134c(0x217)]&&(clearTimeout(_0x17d20c[_0x45134c(0x217)]),_0x17d20c['respawnTimer']=null);}clearInterval(_0xe772aa),_0x31d508[_0x45134c(0x29f)](_0x45134c(0x30e),_0x510abb),_0x31d508[_0x45134c(0x29f)]('message',_0x17c8cc),_0x100b0c?.[_0x45134c(0x250)]?.[_0x45134c(0x29f)]?.(_0xd81128[_0x45134c(0x1cf)],_0x19418a);if(_0x100b0c?.[_0x45134c(0x250)]?.[_0x45134c(0x29f)])for(const {event:_0x10fffb,handler:_0x24ad4e}of _0x371323){try{_0x100b0c[_0x45134c(0x250)][_0x45134c(0x29f)](_0x10fffb,_0x24ad4e);}catch{}}_0x371323[_0x45134c(0x21a)]=0x0;const _0x18a545=[..._0x342899[_0x45134c(0x3fe)]()][_0x45134c(0x38b)](({worker:_0x4059e8})=>_0x4059e8);if(_0x18a545[_0x45134c(0x21a)]===0x0)return;await Promise[_0x45134c(0x34f)](_0x18a545['map'](_0x1db7a9=>new Promise(_0x25822d=>{const _0xc94eca=_0x45134c;if(_0x1db7a9[_0xc94eca(0x330)]()){_0x25822d();return;}let _0x4dff2a=![];const _0x5a6884=()=>{if(_0x4dff2a)return;_0x4dff2a=!![];if(_0x3b9c11)clearTimeout(_0x3b9c11);_0x25822d();};_0x1db7a9[_0xc94eca(0x2bc)]('exit',_0x5a6884);const _0x3b9c11=setTimeout(()=>{const _0x1fd4b6=_0xc94eca;try{_0x1db7a9[_0x1fd4b6(0x3dc)][_0x1fd4b6(0x3ef)]();}catch{}},_0xf72a24+0x1f4);_0x3b9c11[_0xc94eca(0x3e3)]?.();try{_0x1db7a9['disconnect']();}catch{try{_0x1db7a9[_0xc94eca(0x3dc)][_0xc94eca(0x3ef)]();}catch{}}})));}};return _0x589a59;}async function _0x32dd4a({makeOkdb:_0x5f2b11,port:_0x497032}){const _0x2da356=_0x5ba5e3,_0x33860e=await _0x5f2b11();return _0x1611db(_0x33860e),_0x33860e['http'][_0x2da356(0x3dd)](_0x497032);}function _0x1611db(_0x159330){const _0x34bf2f=_0x5ba5e3;if(!_0x159330||_0x159330[_0x34bf2f(0x3b2)])return;_0x159330['_clusterWorkerAttached']=!![];try{const {OKDBChangefeed:_0x161623}=requireOkdbChangefeed(),_0x8f5c7c=_0x159330[_0x34bf2f(0x22c)];if(_0x8f5c7c&&typeof _0x8f5c7c[_0x34bf2f(0x3df)]==='function'){const _0xb1c41=new _0x161623(_0x159330);_0xb1c41[_0x34bf2f(0x3c3)](),_0x8f5c7c[_0x34bf2f(0x3df)](_0xb1c41),_0x159330[_0x34bf2f(0x263)]=_0xb1c41;}}catch(_0x828495){_0x159330[_0x34bf2f(0x2a7)]?.['warn']?.(_0x34bf2f(0x26a)+(_0x828495?.['message']??_0x828495),{'feature':_0x34bf2f(0x336)});}const _0x5d39b4=_0x5deb2e=>{const _0x76e57d=_0x34bf2f;if(!_0x5deb2e||typeof _0x5deb2e!==_0x76e57d(0x234)||_0x5deb2e[_0x19b40e]==null)return;if(_0x5deb2e[_0x19b40e]===_0x38dd32)try{_0x159330['_adminRelay']?.[_0x76e57d(0x241)]?.(_0x5deb2e['event'],_0x5deb2e[_0x76e57d(0x25c)]);}catch{}};process['on'](_0x34bf2f(0x30e),_0x5d39b4),_0x159330[_0x34bf2f(0x265)]=_0x5d39b4;{let _0x41ef50=process['cpuUsage'](),_0x1459cc=Date['now']();const _0x47ffdb=()=>{const _0x1673e2=_0x34bf2f;if(typeof process[_0x1673e2(0x3f3)]!=='function'||!process['connected'])return;const _0x5a9007=Date[_0x1673e2(0x3fc)](),_0x51a590=process[_0x1673e2(0x1fc)](),_0x35229b=(_0x5a9007-_0x1459cc)*0x3e8,_0x315318=_0x51a590[_0x1673e2(0x381)]-_0x41ef50['user']+(_0x51a590[_0x1673e2(0x27d)]-_0x41ef50[_0x1673e2(0x27d)]),_0x205eb8=_0x35229b>0x0?Math[_0x1673e2(0x249)](0x64,Math[_0x1673e2(0x276)](_0x315318/(_0x35229b*(_0x237cd5[_0x1673e2(0x2bd)]()[_0x1673e2(0x21a)]||0x1))*0x64)):0x0;_0x41ef50=_0x51a590,_0x1459cc=_0x5a9007;const _0x34f147=process[_0x1673e2(0x395)]();let _0x1884dc=null;try{_0x1884dc=_0x159330['role']?.['processors']?_0x159330[_0x1673e2(0x2c6)]?.['_buildProcessingFacet']?.()??null:null;}catch{}try{process['send']({[_0x19b40e]:_0x447617,'stats':{'rss':_0x34f147[_0x1673e2(0x34c)],'heapUsed':_0x34f147['heapUsed'],'heapTotal':_0x34f147[_0x1673e2(0x3f1)],'external':_0x34f147['external'],'cpuPct':_0x205eb8,'cpuWindowMs':Math[_0x1673e2(0x276)](_0x35229b/0x3e8)||null},'processing':_0x1884dc});}catch{}},_0x5961da=Math[_0x34bf2f(0x287)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x3a81ba=setInterval(_0x47ffdb,_0x5961da);_0x3a81ba[_0x34bf2f(0x3e3)]?.(),_0x47ffdb();for(const _0x3816e1 of[_0x34bf2f(0x36c),_0x34bf2f(0x3c8)]){_0x159330[_0x34bf2f(0x250)]?.['on']?.(_0x3816e1,()=>{try{_0x47ffdb();}catch{}});}}let _0x20ce7e=![];const _0x400a49=async _0x59f0c3=>{const _0x47521d=_0x34bf2f;if(_0x20ce7e)return;_0x20ce7e=!![];const _0x236035=setTimeout(()=>process['exit'](_0x59f0c3),_0xf72a24);_0x236035[_0x47521d(0x3e3)]?.();try{await _0x159330[_0x47521d(0x1da)]?.();}catch{}process[_0x47521d(0x376)](_0x59f0c3);};process['on']('disconnect',()=>_0x400a49(0x0));if(process[_0x34bf2f(0x3a2)]!=='win32'){const _0x41904b=setInterval(()=>{const _0x9585a5=_0x34bf2f;if(process[_0x9585a5(0x37d)]===0x1)_0x400a49(0x0);},_0x1e616f);_0x41904b[_0x34bf2f(0x3e3)]?.(),_0x159330[_0x34bf2f(0x389)]=_0x41904b;}}return okdbCluster={'runClustered':_0x3e5f8b,'attachWorkerCluster':_0x1611db},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0x2e0b34=_0x3b4fb0;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x5bd2d9=require$$0$5,{attachWorkerCluster:_0x294172}=requireOkdbCluster();async function _0x9560(){const _0x14a846=_0x55dd,_0x2c76fc=process.env.OKDB_HTTP_CHILD;if(!_0x2c76fc)throw new Error(_0x14a846(0x1fd));const {rootPath:_0x2062a1,port:_0x4d1e52,options:options={},logLevel:logLevel=_0x14a846(0x3ea)}=JSON[_0x14a846(0x371)](_0x2c76fc);if(!_0x2062a1||!_0x4d1e52)throw new Error('okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required');const _0x37d494=new _0x5bd2d9(_0x2062a1,{...options,'engines':![],'processors':![],'compaction':![]});_0x37d494['log'][_0x14a846(0x28a)]?.();const _0x1ba4b9=process.env.OKDB_CLUSTER_SLOT??'?',_0x7ed467={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x23cf5c=_0x7ed467[logLevel]??_0x7ed467[_0x14a846(0x3ea)];_0x37d494[_0x14a846(0x2a7)][_0x14a846(0x33e)](_0x48c4bc=>{const _0x4ddc15=_0x14a846;if((_0x7ed467[_0x48c4bc[_0x4ddc15(0x2ec)]]??0x1)<_0x23cf5c)return;try{process[_0x4ddc15(0x3f3)]?.({'__okdbCluster':'log','slot':_0x1ba4b9,'pid':process[_0x4ddc15(0x2c8)],'entry':_0x48c4bc});}catch{}}),await _0x37d494[_0x14a846(0x311)](),_0x294172(_0x37d494),await _0x37d494['http']['listen'](_0x4d1e52);}return _0x9560()[_0x2e0b34(0x299)](_0x11cd63=>{const _0x3a2491=_0x2e0b34;try{process['send']?.({'__okdbCluster':_0x3a2491(0x2a7),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x3a2491(0x2c8)],'entry':{'level':_0x3a2491(0x258),'msg':_0x3a2491(0x3b9)+(_0x11cd63?.[_0x3a2491(0x30e)]??_0x11cd63)}});}catch{}process[_0x3a2491(0x376)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module[_0x3b4fb0(0x262)]=okdbHttpWorkerChild;
1
+ 'use strict';const _0x18991b=_0x4fa3;(function(_0x8ab393,_0x529e12){const _0x28d2d2=_0x4fa3,_0x2abe43=_0x8ab393();while(!![]){try{const _0xe53ac4=parseInt(_0x28d2d2(0x23c))/0x1*(parseInt(_0x28d2d2(0xcd))/0x2)+-parseInt(_0x28d2d2(0x11e))/0x3*(parseInt(_0x28d2d2(0x1e3))/0x4)+-parseInt(_0x28d2d2(0xde))/0x5+-parseInt(_0x28d2d2(0x173))/0x6*(parseInt(_0x28d2d2(0x13d))/0x7)+parseInt(_0x28d2d2(0x15c))/0x8*(parseInt(_0x28d2d2(0xbf))/0x9)+parseInt(_0x28d2d2(0xad))/0xa+parseInt(_0x28d2d2(0xbc))/0xb;if(_0xe53ac4===_0x529e12)break;else _0x2abe43['push'](_0x2abe43['shift']());}catch(_0x329d34){_0x2abe43['push'](_0x2abe43['shift']());}}}(_0x4a2b,0x22c22));var require$$0$5=require(_0x18991b(0x24f)),require$$1$1=require(_0x18991b(0x143)),require$$1=require('path'),require$$0$3=require('os'),require$$2=require('crypto'),require$$0=require(_0x18991b(0x294)),require$$0$2=require(_0x18991b(0x11c)),require$$0$1=require('fs'),require$$0$4=require(_0x18991b(0x221));function getDefaultExportFromCjs(_0x4e65a3){return _0x4e65a3&&_0x4e65a3['__esModule']&&Object['prototype']['hasOwnProperty']['call'](_0x4e65a3,'default')?_0x4e65a3['default']:_0x4e65a3;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x42df32=_0x18991b;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x2a1467={'PUT':_0x42df32(0x20d),'REMOVE':_0x42df32(0x1a5),'INDEX_DROP':_0x42df32(0xb3),'INDEX_REGISTER':_0x42df32(0x1c9),'INDEX_RESET':_0x42df32(0xdd),'TYPE_REGISTER':_0x42df32(0xfd),'TYPE_DROP':_0x42df32(0x1eb),'FTS_REGISTER':'registerFts','FTS_DROP':_0x42df32(0x2d1),'FTS_RESET':_0x42df32(0x1ea),'SCHEMA_SET':_0x42df32(0x212),'SCHEMA_DROP':'dropSchema','TTL_SET':_0x42df32(0xed),'TTL_CLEAR':'clearTtl'},_0x4c2042={'SYSTEM_READY':'system:ready','FIELD_RESOLVER_REGISTERED':_0x42df32(0x1aa),'SYSTEM_STOPPED':_0x42df32(0x2a0),'SYSTEM_CLOCK_CHANGE':_0x42df32(0x288),'SYSTEM_POKE':_0x42df32(0x167),'SYSTEM_DRAIN':_0x42df32(0x286),'SYSTEM_TYPE_DROP':'system:type_drop','SYSTEM_PROC':_0x42df32(0xcc),'SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':_0x42df32(0xb9),'ITEM_UPDATE':_0x42df32(0x1c5),'ITEM_REMOVE':'item:remove','ITEM_PENDING':_0x42df32(0x2a6),'INDEX_RESET':_0x42df32(0x105),'INDEX_READY':_0x42df32(0xae),'INDEX_PROGRESS':_0x42df32(0x153),'VIEW_PROGRESS':'view:progress','INDEX_DROP':_0x42df32(0x1b4),'INDEX_REGISTERED':'index:registered','FTS_REGISTERED':_0x42df32(0x2a3),'FTS_DROP':_0x42df32(0x2c1),'FTS_RESET':'fts:reset','SCHEMA_SET':_0x42df32(0x19f),'SCHEMA_DROP':_0x42df32(0x2bd),'UNIQUE_VIOLATION':_0x42df32(0x1f4),'UNIQUE_VIOLATION_RESOLVED':_0x42df32(0x104),'REF_VIOLATION':_0x42df32(0xa2),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x42df32(0x1d5),'TXN_START':'txn:start','TXN_END':_0x42df32(0x1ed),'TXN_ROLLBACK':_0x42df32(0x1d3),'TYPE_REGISTERED':_0x42df32(0x200),'TYPE_DROP':_0x42df32(0x299),'ENV_OPENED':'env:opened','ENV_REMOVED':_0x42df32(0x186),'SYSTEM_ENV_RELEASE':_0x42df32(0xd3),'TTL_EXPIRED':_0x42df32(0x2a7),'TTL_SET':'ttl:set','TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x42df32(0x1fb),'LICENSE_ADDED':_0x42df32(0x229),'LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':_0x42df32(0xe4)},_0x1e2ad4={'CREATING':_0x42df32(0xc3),'RESETTING':_0x42df32(0x25b),'READY':_0x42df32(0x138),'DROPPING':_0x42df32(0x25e),'WAITING':'waiting','ERROR':_0x42df32(0x1d4)},_0x22dfdc={'CREATED':_0x42df32(0x99),'STARTING':'starting','STARTED':_0x42df32(0xc6),'STOPPING':_0x42df32(0x14a),'STOPPED':_0x42df32(0x13b)},_0x378746={'CREATING':'creating','READY':'ready','HALTED':'halted','STOPPED':_0x42df32(0x13b),'RESETTING':_0x42df32(0x25b)},_0x1d8289=Object[_0x42df32(0x1df)]({'POKE':_0x42df32(0x1dc),'DRAIN':'bus:drain','TYPE_DROP':_0x42df32(0x1b3),'PROC':_0x42df32(0x1c2),'ENV_RELEASE':_0x42df32(0x2dc)});return okdbEnums={'BUS_EVENTS':_0x1d8289,'CHANGE_ACTIONS':_0x2a1467,'EVENTS':_0x4c2042,'INDEX_STATE':_0x1e2ad4,'OKDB_STATE':_0x22dfdc,'VIEW_STATE':_0x378746},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x404aeb=_0x18991b;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x585dec,performance:_0x25ab9c}=require$$0,_0x224969=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG==='true',_0x54fdc4=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x31952f=process.env.OKDB_LOOP_LAG_ALL==='1',_0x3f60ef=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x294e76{constructor(){const _0x3c63dd=_0x4fa3;this[_0x3c63dd(0x11b)]=_0x224969,this['_buckets']=new Map(),this['_h']=null,this[_0x3c63dd(0x1bf)]=null,this['_started']=![],this['_log']=(_0xba86a2,_0x26955b)=>process[_0x3c63dd(0x2aa)][_0x3c63dd(0x1b0)](_0xba86a2+(_0x26955b?'\x20'+JSON['stringify'](_0x26955b):'')+'\x0a');}[_0x404aeb(0x194)](){const _0xd095cd=_0x404aeb;return _0x25ab9c[_0xd095cd(0x194)]();}[_0x404aeb(0x14e)](_0x4ceee3){const _0x3c78c3=_0x404aeb;if(typeof _0x4ceee3===_0x3c78c3(0x28f))this['_log']=_0x4ceee3;}[_0x404aeb(0x1a4)](_0x2ec508,_0x240c8a,_0x1b1b63){const _0x3a23a7=_0x404aeb;if(!this[_0x3a23a7(0x11b)])return;let _0x1028ef=this[_0x3a23a7(0x27e)][_0x3a23a7(0x10a)](_0x2ec508);!_0x1028ef&&(_0x1028ef={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x3a23a7(0x27e)]['set'](_0x2ec508,_0x1028ef)),_0x1028ef['ms']+=_0x240c8a,_0x1028ef['count']+=0x1,_0x240c8a>_0x1028ef[_0x3a23a7(0x2da)]&&(_0x1028ef[_0x3a23a7(0x2da)]=_0x240c8a,_0x1028ef['maxExtra']=_0x1b1b63||'');}['start'](_0x329888){const _0x547790=_0x404aeb;if(!this[_0x547790(0x11b)]||this['_started'])return;this[_0x547790(0x220)]=!![];if(_0x329888)this[_0x547790(0x10c)]=_0x329888;this['_h']=_0x585dec({'resolution':0xa}),this['_h'][_0x547790(0x16c)](),this['_timer']=setInterval(()=>this[_0x547790(0x209)](),_0x54fdc4);if(this[_0x547790(0x1bf)][_0x547790(0x232)])this[_0x547790(0x1bf)][_0x547790(0x232)]();}[_0x404aeb(0xbd)](_0x349843){const _0x196b32=_0x404aeb;if(!this['_windowCbs'])this[_0x196b32(0x2cb)]=new Set();this[_0x196b32(0x2cb)][_0x196b32(0x9e)](_0x349843);if(!this['_started'])this[_0x196b32(0xc2)]();}[_0x404aeb(0xb1)](_0x5377ac){const _0x34c142=_0x404aeb;this[_0x34c142(0x2cb)]?.['delete'](_0x5377ac);}['_startAdmission'](){const _0x42b3bd=_0x404aeb;if(this['_admissionStarted'])return;this[_0x42b3bd(0x157)]=!![];!this['_h']&&(this['_h']=_0x585dec({'resolution':0xa}),this['_h'][_0x42b3bd(0x16c)]());const _0x3ac7b9=_0x54fdc4;this['_admissionTimer']=setInterval(()=>{const _0x442af9=_0x42b3bd,_0x272a21=this['_h'];if(!_0x272a21)return;const _0x3996d7=_0x272a21[_0x442af9(0x27a)](0x63)/0xf4240,_0x158c64=_0x272a21[_0x442af9(0x2c5)]/0xf4240,_0x45fd20=_0x272a21['mean']/0xf4240;_0x272a21[_0x442af9(0x21e)]();if(this['_windowCbs'])for(const _0x320f68 of this['_windowCbs']){try{_0x320f68({'p99Ms':_0x3996d7,'maxMs':_0x158c64,'meanMs':_0x45fd20,'reportMs':_0x3ac7b9});}catch{}}},_0x3ac7b9);if(this[_0x42b3bd(0x23a)]['unref'])this[_0x42b3bd(0x23a)][_0x42b3bd(0x232)]();}[_0x404aeb(0x209)](){const _0x27135a=_0x404aeb,_0x24fe04=this['_h'],_0x395cbe=_0x24fe04[_0x27135a(0x2c5)]/0xf4240,_0x4376ba=_0x24fe04[_0x27135a(0x27a)](0x63)/0xf4240,_0x170c0e=_0x24fe04['mean']/0xf4240;_0x24fe04[_0x27135a(0x21e)]();const _0x10bfe5=[...this[_0x27135a(0x27e)][_0x27135a(0x206)]()][_0x27135a(0x284)](([_0x2e524f,_0x23f910])=>({'label':_0x2e524f,..._0x23f910}))[_0x27135a(0x2a2)]((_0xfbbcc0,_0x161b60)=>_0x161b60['ms']-_0xfbbcc0['ms'])['slice'](0x0,0x8);this[_0x27135a(0x27e)][_0x27135a(0x118)]();const _0x200d53=_0x10bfe5[_0x27135a(0x201)]((_0xe16e16,_0x20caa8)=>_0xe16e16+_0x20caa8['ms'],0x0),_0x2c1fa6=_0x10bfe5['map'](_0x4ae90a=>_0x4ae90a[_0x27135a(0x257)]+'='+_0x4ae90a['ms'][_0x27135a(0x1d9)](0x0)+'ms/'+_0x4ae90a[_0x27135a(0xfc)]+(_0x4ae90a[_0x27135a(0x2da)]>0x5?_0x27135a(0xe3)+_0x4ae90a[_0x27135a(0x2da)][_0x27135a(0x1d9)](0x0)+'ms'+(_0x4ae90a[_0x27135a(0x1bd)]?'\x20'+_0x4ae90a[_0x27135a(0x1bd)]:'')+')':''));(_0x31952f||_0x395cbe>=_0x3f60ef)&&this[_0x27135a(0x10c)]('loop-lag\x20'+_0x54fdc4+_0x27135a(0x17a)+_0x395cbe['toFixed'](0x0)+_0x27135a(0x12b)+_0x4376ba[_0x27135a(0x1d9)](0x0)+_0x27135a(0x190)+_0x170c0e['toFixed'](0x0)+'ms\x20busy='+_0x200d53['toFixed'](0x0)+'ms'+(_0x2c1fa6[_0x27135a(0x287)]?_0x27135a(0x148)+_0x2c1fa6[_0x27135a(0x296)]('\x20\x20'):''),{'feature':_0x27135a(0x276)});if(this[_0x27135a(0x2cb)])for(const _0x4a1598 of this[_0x27135a(0x2cb)]){try{_0x4a1598({'p99Ms':_0x4376ba,'maxMs':_0x395cbe,'meanMs':_0x170c0e,'reportMs':_0x54fdc4});}catch{}}}['stop'](){const _0x35bf7d=_0x404aeb;if(this[_0x35bf7d(0x1bf)])clearInterval(this[_0x35bf7d(0x1bf)]);if(this['_h'])this['_h'][_0x35bf7d(0xf3)]();this[_0x35bf7d(0x1bf)]=null,this['_h']=null,this[_0x35bf7d(0x220)]=![];}}const _0x5a652f=new _0x294e76();if(_0x5a652f['enabled'])_0x5a652f[_0x404aeb(0x269)]();return okdbLoopMonitor={'LOOP':_0x5a652f},okdbLoopMonitor;}function _0x4a2b(){const _0x35206c=['toFixed','building','signalWant','bus:poke','INDEX_PROGRESS','_heartbeatTimer','freeze','repeat','online','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','53036KFGOLI','ITEM_CREATE','_outstanding','_refreshDesiredSnapshot','procmode/','win32','assign','resetFts','dropType','_lastCpuAt','txn:end','_instanceId','commitsPerSec','setupPrimary','transaction','keys','toISOString','unique:violation','_assertUsable','INDEX_READY','confirm','_onItem','functions','test','license:invalid','REMOVE','slice','expiresAt','processor:progress','type:registered','reduce','_db','liveThreadStats','_heartbeatInFlight','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','entries','ms\x20activeWriters=','--print','_report','worker','status','paused','put','force','nodesView','_servingEngines','flushed','setSchema','type','_baselines','_lockDb',':want','next','_scheduleFlush','registry\x20heartbeat\x20skipped\x20(writer=','__vocab/version','_key','putNode','_startedAt','reset','send','_started','node:events','envsOpen','name','_putRowSync','_coordinator','okdb','pushEphemeral','reportThreadStats','license:added','ephemeral','default','has','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','\x0a===\x20OKDB_DIAG\x20','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.','_supervisorKey','markClosed','unref','FTS_RESET','instances','decommissioned','_inflight','--eval','appendFileSync','process\x20','_admissionTimer','cpus','251063kmIdnI','writerStatus','rows=','cli','_committed','_kind','uptime','_wantDbHandle','lifecycle','_handleInProcess','_putRowAsync','dead','_wantDb','updatedAt','_highWater','inst:','attachFeed','\x0a\x20\x20\x20\x20\x20\x20','deregisterSelf','./okdb','_threadStats',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','string','acquiredAt','_holderDead','_sampleOwnStats','from','label','meta','_draining','_statusEnv','resetting','cluster-wide','stopHeartbeat','dropping','release','_handlePoke','_lastCpuUsage','state','_flushTimer','_envs','_getType','allSettled','listening','[okdb-cluster]\x20worker\x20pid=','start','copy','parkedNow','INDEX_REGISTERED','__okdbCluster','processorId','execArgv','reap','openDB','_enqueuedAt','_closed','_startHeartbeat','min','loop-lag','_lockDbOf','okdb-writer[','selfKey','percentile','disconnect','_activateProcesses','__okdbSlot','_buckets','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','includes','setDesired','msg','isConnected','map','_isStale','system:drain','length','system:clock_change','heartbeatMs','_onPoke','[okdb-cluster]\x20primary\x20pid=','setOwnMeta','processor','_quantum','function','slot','_rowKey','env','slotKey','node:perf_hooks','message','join','isEnabled','_enableChangelog','type:drop','cpuPct','_bpParkedTotal','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','_isWriter','noteListenAddr','_done','system:stopped','some','sort','fts:registered','registry-publish','push','item:pending','ttl:expired','uncaughtException','\x20\x20(no\x20env\x20draining)','stderr','unclaimed','view','exports','primary','inflightAgesMs','_writer','\x20forked\x20','raw-remove','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','\x20ipc\x20error:\x20','log','stack','_bpWaiters','_versionSkewWarned','ITEM_UPDATE','childTransaction','\x20pid=','_dedupeMax','schema:drop','participate','getClock','cpuWindowMs','fts:drop','supervisorKey','floor','_publishFailWarned','max','heapUsed','ENV_CLOSING_RETRY','_lock','kind','size','_windowCbs','getDesired','null','set','_ensureDesired','role','dropFts','mode','\x20\x20#','process','~processes','_onTick','listNodes','engines','_sandbox','maxMs','_desired','bus:env_release','_buildProcessingFacet','race','_buildChildRow','threads','fanout','ms\x20env=','created','ensureType','list','standalone','pid','add','_handlePending','kill','afterWrite','ref:violation','_desiredOverlay','_cursors','_clusterWorkerAttached','_pending','tierList','_durs','isWanted','node/','startedAt','draining','1256440hSyvWo','index:ready','attach','node','offWindow','ingest','dropIndex','FTS_REGISTERED','[okdb-cluster]\x20respawning\x20worker\x20slot=','flushLmdb',',\x20signal=','_collectSingletonClaims','item:create','_heldTotal','FTS_DROP','3600971jwjnFf','onWindow','_nodeDead','72Lprgno','removeSync','resetReadTxn','_startAdmission','creating','_singletonLock','quantum','started','clusterStatusView','CHANGEFEED_QUANTUM','consecutiveFailures','recordWrite','_processStartedAt','system:proc','2OaYMFw','once','\x20(durable\x20desired-state)','_nodeDbCache','_caps','\x20writer{depth=','system:env_release','cursorKey','SYSTEM_STOPPED','_lastPublishAt','_onStop','randomUUID','change','_selfKey','queue-worker','_drainOne','resetIndex','1255260zcqhKW','ESRCH','\x20while\x20this\x20process\x20runs\x20','removeSupervisedChild','caps','(worst\x20','license:removed','_markSeen','stats','entry','\x20—\x20','http','processingSig','sandbox','createEnvironment','setTtl','nodeKey','indexOf','oldestPendingMs','okdb-writer:\x20env\x20closing\x20—\x20retry','processKey','disable','SWAP','replace','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','_lastCpuPct','namespace','_publishNow','clearThreadStats','--watch','count','registerType','external','compaction','1ofN:','splice','_nodeDb','level','unique:violation_resolved','index:reset','find','_changefeed','isWorker','singletonClaims','get','processorsView','_log','emit','\x20HTTP\x20server(s)\x20on\x20port\x20','hasDesired','_groupByProcess','epoch','round','decommissioning','listen','claimGated','register','migrations','clear','_nodeDbFor','events','enabled','perf_hooks','\x20@\x20','57nhQnkx','_dedupeKey','_drain','SYSTEM_POKE','commit','ppid','trim','_systemEnv','http\x20worker\x20child\x20failed:\x20','_collectWriterFacet','\x20phase=','\x20(slot=','ms\x20on\x20env=','ms\x20p99=','putSync','addSupervisedChild','connected','processor:paused','claims','rss','single','prependListener','cpuUsage','_flushDebounce','isPrimary','treeView','ready','_singletonLocks','_seen','stopped','isHeld','1306907tRUqSQ','close','async','unhandledRejection','\x20worker\x20slot=','processor:resumed','cluster','shift','_children','holder','_role','\x20│\x20','off','stopping','ITEM_REMOVE','inspect','delete','setLogger','depth','hard-killed','stringify','committed','index:progress','_rootDb','running','system','_admissionStarted','workers','[okdb-cluster]\x20slot=','--inspect','detachConsole','127976eShAHA','all','\x20===',');\x20','listAll','host','--test','_buildOwnRow','\x20parkedNow=','_released','okdb-http-worker-child.js','system:poke','~processes:cmd','warn','_held','listDesired','enable','_clusterOnMessage','code','children','\x20sync','registry\x20publish\x20failing:\x20','version','6ZnzWtP','heapTotal',')\x20exited\x20','raw-put','user','open','mkdirSync','ms\x20max=','(code=','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','dumpedAt','decommission','values','ttlMs','startsWith','publishChildRow','deaths','respawnTimer','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','env:removed','_hbTimer','path','processor:error','processor:ready','split','_maybePublish','_onPending','_ownMeta','number','ms\x20mean=','data','_onProcEvent','object','now','filter','\x20in\x20','removeNode','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','hostname','ITEM_PENDING','closing','processors','recent\x20writes\x20(newest\x20first)','platform','schema:set','busy','beforeWrite','reject','_adminRelay','note','remove','processes','\x20worker(s)\x20remaining','stop','.log','field:resolver_registered','_listenAddr','_acquiredAt','catch','then','commitP99Ms','write','listenAddr','parse','bus:type_drop','index:drop','resolve','ORPHAN\x20(env-closed\x20write)','processing','processingStatusView','load','_rawDb','getRange','options','maxExtra','event','_timer','sync','transactionSync','bus:proc','publishOwnRow',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','item:update','value','exit','_cmd','registerIndex','info','runtimeProcessesView','isDead','_nestedTotal','_isReader','okdb-lock:\x20env\x20closed','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','_pendingLocal','embedded','txn:rollback','error','sync:apply','_removeRowAsync','http-server','getCmd'];_0x4a2b=function(){return _0x35206c;};return _0x4a2b();}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x99f122=require$$0$1,_0x7ed2ea=require$$1;let _0x2543b0,_0x4314c0,_0x495a15,_0x218129,_0x252879,_0x3372f3,_0x2ed96c,_0x4f8523=![];const _0x5ab3a6=new Set();let _0x27350b=null;const _0x2c5595=new Map();function _0x1b8935(){const _0x3c4847=_0x4fa3;if(_0x2543b0!==undefined)return _0x2543b0;_0x2543b0=process.env.OKDB_DIAG==='1';if(!_0x2543b0)return![];_0x4314c0=process.env.OKDB_DIAG_STACK==='1',_0x218129=Math[_0x3c4847(0x2c5)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x495a15=new Array(_0x218129),_0x252879=0x0,_0x3372f3=0x0,_0x2ed96c=process.env.OKDB_DIAG_DIR||null;if(_0x2ed96c)try{_0x99f122[_0x3c4847(0x179)](_0x2ed96c,{'recursive':!![]});}catch{}return!![];}function _0x18bcb4(){return _0x2543b0===undefined?_0x1b8935():_0x2543b0;}function _0xce2e37(_0x318633,_0x2a17a1){const _0x366d7b=_0x4fa3;if(_0x2543b0===undefined?!_0x1b8935():!_0x2543b0)return;let _0x5d0057;if(_0x4314c0){const _0x2e59a5=new Error()[_0x366d7b(0x2b6)]||'';_0x5d0057=_0x2e59a5['split']('\x0a')[_0x366d7b(0x1fd)](0x3)[_0x366d7b(0x284)](_0x51a5fa=>_0x51a5fa[_0x366d7b(0x124)]())[_0x366d7b(0x195)](Boolean)[_0x366d7b(0x1fd)](0x0,0x8);}_0x495a15[_0x252879]={'seq':_0x3372f3++,'t':Date['now'](),'env':_0x318633,'kind':_0x2a17a1||_0x366d7b(0x122),'stack':_0x5d0057},_0x252879=(_0x252879+0x1)%_0x218129;}function _0x57ef7c(_0x3d99d2){const _0x24b543=_0x4fa3,_0x7fc66a=[];for(let _0x2fbe15=0x0;_0x2fbe15<_0x218129;_0x2fbe15++){const _0x1e314e=_0x495a15[(_0x252879-0x1-_0x2fbe15+_0x218129*0x2)%_0x218129];if(!_0x1e314e)continue;_0x7fc66a[_0x24b543(0x2a5)](_0x1e314e);if(_0x7fc66a[_0x24b543(0x287)]>=_0x3d99d2)break;}return _0x7fc66a;}function _0x519478(_0x512f55){const _0x42734d=_0x4fa3;try{process[_0x42734d(0x2aa)][_0x42734d(0x1b0)](_0x512f55+'\x0a');}catch{}if(_0x2ed96c)try{_0x99f122[_0x42734d(0x238)](_0x7ed2ea['join'](_0x2ed96c,'okdb-diag.'+process['pid']+_0x42734d(0x1a9)),_0x512f55+'\x0a');}catch{}}function _0x22ac14(_0xd12040){const _0x3cb167=_0x4fa3,_0xdf8794=_0x57ef7c(_0xd12040);if(!_0xdf8794[_0x3cb167(0x287)])return _0x3cb167(0x1e2);const _0x17697b=Date['now']();return _0xdf8794['map'](_0x18aafc=>{const _0x504aec=_0x3cb167,_0x4c16b4=_0x504aec(0x2d3)+_0x18aafc['seq']+'\x20-'+(_0x17697b-_0x18aafc['t'])+_0x504aec(0x2e2)+_0x18aafc[_0x504aec(0x292)]+'\x20'+_0x18aafc[_0x504aec(0x2c9)];return _0x18aafc[_0x504aec(0x2b6)]&&_0x18aafc['stack']['length']?_0x4c16b4+'\x0a\x20\x20\x20\x20\x20\x20'+_0x18aafc[_0x504aec(0x2b6)][_0x504aec(0x296)](_0x504aec(0x24d)):_0x4c16b4;})[_0x3cb167(0x296)]('\x0a');}function _0x4a6ea1(_0x58201e,_0xc98ebb){const _0x3a7232=_0x4fa3,_0x14b7b1=_0x3a7232(0x22e)+_0x58201e+_0x3a7232(0x11d)+new Date()[_0x3a7232(0x1f3)]()+_0x3a7232(0x2bb)+process['pid']+'\x20===',_0x38a5d4=[_0x14b7b1,'error:\x20'+(_0xc98ebb&&_0xc98ebb[_0x3a7232(0x2b6)]?_0xc98ebb['stack'][_0x3a7232(0x18b)]('\x0a')[0x0]:_0xc98ebb),_0x3a7232(0x19d)+(_0x4314c0?'':_0x3a7232(0x205))+':',_0x22ac14(0x18),_0x55092b(),'='[_0x3a7232(0x1e0)](_0x14b7b1[_0x3a7232(0x287)]-0x1)];_0x519478(_0x38a5d4[_0x3a7232(0x296)]('\x0a'));}function _0x538f84(_0x60ad7e){const _0x596521=_0x4fa3;if(!_0x18bcb4())return;const _0x41b6f8=String(_0x60ad7e&&_0x60ad7e[_0x596521(0x295)]||_0x60ad7e||''),_0x38bd69=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x596521(0x1fa)](_0x41b6f8);_0x4a6ea1(_0x38bd69?_0x596521(0x1b6):_0x596521(0x2a8),_0x60ad7e);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x38bd69)return;try{console[_0x596521(0x1d4)](_0x60ad7e&&_0x60ad7e[_0x596521(0x2b6)]?_0x60ad7e[_0x596521(0x2b6)]:_0x60ad7e);}catch{}process[_0x596521(0x1c7)](0x1);}function _0x533142(_0x49e122){const _0x227077=_0x4fa3;if(!_0x18bcb4())return;const _0x3ccacc=String(_0x49e122&&_0x49e122[_0x227077(0x295)]||_0x49e122||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x227077(0x1fa)](_0x3ccacc)&&_0x4a6ea1(_0x227077(0x185),_0x49e122);}function _0x55092b(){const _0x3f94d3=_0x4fa3,_0x516943=[_0x3f94d3(0x27f)];let _0x51864b=![];for(const _0x402c3b of _0x5ab3a6){const _0x5f05cb=_0x402c3b&&_0x402c3b[_0x3f94d3(0x264)];if(!_0x5f05cb)continue;for(const [_0x12db94,_0x310779]of _0x5f05cb){const _0x245d2c=_0x310779&&_0x310779[_0x3f94d3(0x225)]&&_0x310779['_coordinator'][_0x3f94d3(0x2ac)];if(!_0x245d2c)continue;let _0x36418c,_0x4857c6;try{_0x36418c=Atomics['load'](_0x245d2c,0x0),_0x4857c6=Atomics[_0x3f94d3(0x1b9)](_0x245d2c,0x1);}catch{continue;}if(_0x36418c===0x0)continue;_0x51864b=!![];const _0x2ac662=_0x36418c>0x0?_0x3f94d3(0xf4):_0x3f94d3(0x26a),_0x1c1984=Date[_0x3f94d3(0x194)]()-Math['abs'](_0x36418c)*0x3e8,_0x22d3f4=((()=>{const _0x3981a8=_0x3f94d3;try{return _0x310779[_0x3981a8(0x2b0)]&&_0x310779[_0x3981a8(0x2b0)][_0x3981a8(0x20b)]?_0x310779[_0x3981a8(0x2b0)][_0x3981a8(0x20b)]():null;}catch{return null;}})());_0x516943[_0x3f94d3(0x2a5)]('\x20\x20env='+_0x12db94+_0x3f94d3(0x128)+_0x2ac662+'\x20drainAge='+_0x1c1984+_0x3f94d3(0x207)+_0x4857c6+(_0x22d3f4?_0x3f94d3(0xd2)+_0x22d3f4[_0x3f94d3(0x14f)]+'\x20oldestPendingMs='+_0x22d3f4[_0x3f94d3(0xf0)]+_0x3f94d3(0x164)+_0x22d3f4['parkedNow']+'}':''));}}if(!_0x51864b)_0x516943[_0x3f94d3(0x2a5)](_0x3f94d3(0x2a9));return _0x516943[_0x3f94d3(0x296)]('\x0a');}function _0x576054(){const _0x182712=_0x4fa3;if(!_0x18bcb4())return;const _0x38ae2b=Math[_0x182712(0x2c5)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x2cec31=Date[_0x182712(0x194)]();for(const _0xe5c372 of _0x5ab3a6){const _0x305c93=_0xe5c372&&_0xe5c372[_0x182712(0x264)];if(!_0x305c93)continue;for(const [_0x347408,_0x4fca1c]of _0x305c93){const _0x3bd5ed=_0x4fca1c&&_0x4fca1c[_0x182712(0x225)]&&_0x4fca1c[_0x182712(0x225)]['view'];if(!_0x3bd5ed)continue;let _0x34ffd1;try{_0x34ffd1=Atomics[_0x182712(0x1b9)](_0x3bd5ed,0x0);}catch{continue;}const _0x5525bb=_0xe5c372[_0x182712(0x188)]+'|'+_0x347408;if(_0x34ffd1<=0x0){_0x2c5595[_0x182712(0x14d)](_0x5525bb);continue;}const _0x878afa=_0x2cec31-_0x34ffd1*0x3e8,_0x2dc946=_0x2c5595[_0x182712(0x10a)](_0x5525bb);if(_0x878afa<_0x38ae2b)continue;if(_0x2dc946&&_0x2cec31-_0x2dc946[_0x182712(0x17d)]<_0x38ae2b)continue;_0x2c5595[_0x182712(0x2ce)](_0x5525bb,{'firstTs':_0x2dc946?_0x2dc946['firstTs']:_0x34ffd1,'dumpedAt':_0x2cec31});const _0x736224='\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20'+_0x878afa+_0x182712(0x12a)+_0x347408+'\x20@\x20'+new Date()['toISOString']()+_0x182712(0x2bb)+process[_0x182712(0x9d)]+_0x182712(0x15e);_0x519478([_0x736224,_0x55092b(),'='[_0x182712(0x1e0)](_0x736224[_0x182712(0x287)]-0x1)]['join']('\x0a'));}}}function _0x5a048d(){const _0x8ee659=_0x4fa3;if(!_0x18bcb4()||_0x4f8523)return;_0x4f8523=!![],process[_0x8ee659(0x133)](_0x8ee659(0x2a8),_0x538f84),process[_0x8ee659(0x133)](_0x8ee659(0x140),_0x533142);const _0x45a04c=Math[_0x8ee659(0x2c5)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x27350b=setInterval(_0x576054,_0x45a04c);if(_0x27350b[_0x8ee659(0x232)])_0x27350b[_0x8ee659(0x232)]();}function _0x4e9beb(_0x4a95dd){if(!_0x18bcb4()||!_0x4a95dd)return;_0x5ab3a6['add'](_0x4a95dd),_0x5a048d();}function _0x12a295(_0x141f52){const _0x20b8bd=_0x4fa3;_0x5ab3a6[_0x20b8bd(0x14d)](_0x141f52);}function _0x5b8e0c(){const _0x3b1cb2=_0x4fa3;if(!_0x18bcb4())return{'enabled':![],'hint':_0x3b1cb2(0x29c)};return{'enabled':!![],'stackCapture':!!_0x4314c0,'recentWrites':_0x57ef7c(0x10),'drain':_0x55092b()};}return okdbDiag={'isEnabled':_0x18bcb4,'recordWrite':_0xce2e37,'installDiag':_0x5a048d,'registerOkdb':_0x4e9beb,'unregisterOkdb':_0x12a295,'snapshot':_0x5b8e0c},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x9ffe74=_0x18991b;if(hasRequiredOkdbWriter)return okdbWriter[_0x9ffe74(0x2ad)];hasRequiredOkdbWriter=0x1;const {performance:_0x1780b2}=require$$0$2,_0x8b5608=requireOkdbDiag(),_0x5a0c48=process.env.OKDB_COMMIT_MODE===_0x9ffe74(0x1c0);class _0x41c781{constructor(_0x43d5d2){const _0x53f742=_0x9ffe74;this[_0x53f742(0x292)]=_0x43d5d2,this[_0x53f742(0x236)]=new Set(),this[_0x53f742(0x272)]=new Map(),this[_0x53f742(0x240)]=0x0,this[_0x53f742(0xa8)]=[],this['_done']=[],this[_0x53f742(0x24a)]=Math[_0x53f742(0x2c5)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x53f742(0x1e5)]=0x0,this['_bpWaiters']=[],this['_bpParkedTotal']=0x0,this['_held']=null,this[_0x53f742(0xba)]=0x0,this[_0x53f742(0x1cd)]=0x0,this['_nestedWarned']=![];}async[_0x9ffe74(0x1f1)](_0x250436,_0x48ed2d,{admitted:admitted=![]}={}){const _0x557780=_0x9ffe74;if(_0x8b5608[_0x557780(0x297)]())_0x8b5608[_0x557780(0xca)](this[_0x557780(0x292)]?.[_0x557780(0x223)],_0x48ed2d);if(this['_closed']){const _0x4470a4=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x4470a4[_0x557780(0x16e)]=_0x557780(0x2c7);throw _0x4470a4;}if(this[_0x557780(0x24a)]>0x0){let _0x3f4606=![];while(this['_outstanding']>=this['_highWater']&&!this[_0x557780(0x273)]){!_0x3f4606&&(_0x3f4606=!![],this['_bpParkedTotal']++),await new Promise(_0x5a744f=>this['_bpWaiters']['push'](_0x5a744f));}if(this[_0x557780(0x273)]){const _0x17a00d=new Error(_0x557780(0xf1));_0x17a00d[_0x557780(0x16e)]=_0x557780(0x2c7);throw _0x17a00d;}}this['_outstanding']++;const _0x60f8d5=admitted?null:this['env']['_coordinator'];for(;;){while(this['_held'])await this[_0x557780(0x16a)];if(_0x60f8d5)try{await _0x60f8d5[_0x557780(0x1a1)]();}catch(_0xdd3705){this['_outstanding']--;if(this[_0x557780(0x2b7)]['length']&&this[_0x557780(0x1e5)]<this[_0x557780(0x24a)])this[_0x557780(0x2b7)]['shift']()();throw _0xdd3705;}if(!this['_held'])break;if(_0x60f8d5)_0x60f8d5[_0x557780(0xa1)]();}if(this[_0x557780(0x273)]){if(_0x60f8d5)_0x60f8d5[_0x557780(0xa1)]();this[_0x557780(0x1e5)]--;if(this['_bpWaiters'][_0x557780(0x287)]&&this[_0x557780(0x1e5)]<this[_0x557780(0x24a)])this[_0x557780(0x2b7)][_0x557780(0x144)]()();const _0x2a37be=new Error(_0x557780(0xf1));_0x2a37be[_0x557780(0x16e)]=_0x557780(0x2c7);throw _0x2a37be;}const _0x546577=_0x1780b2['now']();if(_0x5a0c48)try{const _0x1407fe=this[_0x557780(0x292)]['db'][_0x557780(0x1c1)](_0x250436);this['_committed']++;if(this[_0x557780(0xa8)][_0x557780(0x2a5)](_0x1780b2['now']()-_0x546577)>0x100)this['_durs'][_0x557780(0x144)]();if(this[_0x557780(0x29f)][_0x557780(0x2a5)](_0x1780b2[_0x557780(0x194)]())>0x800)this['_done'][_0x557780(0x144)]();return _0x1407fe;}finally{this['_outstanding']--;if(this[_0x557780(0x2b7)][_0x557780(0x287)]&&this[_0x557780(0x1e5)]<this[_0x557780(0x24a)])this[_0x557780(0x2b7)][_0x557780(0x144)]()();if(_0x60f8d5)_0x60f8d5['afterWrite']();}let _0x4ecd1c=null;const _0x3a0449=()=>{const _0x5d2bb2=_0x557780,_0x8026f4=_0x250436();if(_0x8026f4&&typeof _0x8026f4[_0x5d2bb2(0x1ae)]===_0x5d2bb2(0x28f)&&!_0x4ecd1c){this[_0x5d2bb2(0xba)]++;let _0x376673;const _0x383d65=new Promise(_0x803dad=>_0x376673=_0x803dad);this['_held']=_0x383d65,_0x4ecd1c=()=>{const _0x51c45d=_0x5d2bb2;if(this[_0x51c45d(0x16a)]===_0x383d65)this[_0x51c45d(0x16a)]=null;_0x376673();};}return _0x8026f4;};let _0x16addc;try{_0x16addc=this[_0x557780(0x292)]['db'][_0x557780(0x2ba)](_0x3a0449);}catch(_0x5d0433){_0x16addc=Promise[_0x557780(0x1a2)](_0x5d0433);}(!_0x16addc||typeof _0x16addc[_0x557780(0x1ae)]!==_0x557780(0x28f))&&(this[_0x557780(0x1cd)]++,!this['_nestedWarned']&&(this['_nestedWarned']=!![],console[_0x557780(0x169)](_0x557780(0x278)+(this['env']?.[_0x557780(0x223)]??'?')+_0x557780(0x251))),_0x16addc=Promise[_0x557780(0x1b5)](_0x16addc));const _0x34ad46=()=>{if(_0x4ecd1c)_0x4ecd1c();};_0x16addc[_0x557780(0x1ae)](_0x34ad46,_0x34ad46),this[_0x557780(0x236)][_0x557780(0x9e)](_0x16addc),this[_0x557780(0x272)]['set'](_0x16addc,_0x546577);const _0x4b2de5=()=>{const _0x1654e1=_0x557780;this[_0x1654e1(0x236)]['delete'](_0x16addc),this['_enqueuedAt'][_0x1654e1(0x14d)](_0x16addc),this[_0x1654e1(0x240)]++,this['_outstanding']--;this[_0x1654e1(0x2b7)][_0x1654e1(0x287)]&&this[_0x1654e1(0x1e5)]<this['_highWater']&&this['_bpWaiters'][_0x1654e1(0x144)]()();if(this[_0x1654e1(0xa8)][_0x1654e1(0x2a5)](_0x1780b2[_0x1654e1(0x194)]()-_0x546577)>0x100)this[_0x1654e1(0xa8)][_0x1654e1(0x144)]();if(this['_done'][_0x1654e1(0x2a5)](_0x1780b2['now']())>0x800)this[_0x1654e1(0x29f)][_0x1654e1(0x144)]();};_0x16addc[_0x557780(0x1ae)](_0x4b2de5,_0x4b2de5);try{return await _0x16addc;}finally{if(_0x60f8d5)_0x60f8d5[_0x557780(0xa1)]();}}[_0x9ffe74(0x20b)](){const _0x3d638c=_0x9ffe74,_0xf6e6a6=_0x1780b2[_0x3d638c(0x194)]();let _0x1a1d60=0x0;for(const _0xf307fc of this[_0x3d638c(0x272)]['values']()){const _0x9b890d=_0xf6e6a6-_0xf307fc;if(_0x9b890d>_0x1a1d60)_0x1a1d60=_0x9b890d;}let _0x492015=0x0;for(let _0x5544b0=this['_done'][_0x3d638c(0x287)]-0x1;_0x5544b0>=0x0;_0x5544b0--){if(_0xf6e6a6-this['_done'][_0x5544b0]>0x3e8)break;_0x492015++;}let _0x354f24=0x0;if(this[_0x3d638c(0xa8)][_0x3d638c(0x287)]){const _0x47d1bf=[...this[_0x3d638c(0xa8)]][_0x3d638c(0x2a2)]((_0x87f67b,_0x1977dc)=>_0x87f67b-_0x1977dc);_0x354f24=_0x47d1bf[Math[_0x3d638c(0x275)](_0x47d1bf[_0x3d638c(0x287)]-0x1,Math[_0x3d638c(0x2c3)](_0x47d1bf[_0x3d638c(0x287)]*0.99))];}return{'depth':this[_0x3d638c(0x236)][_0x3d638c(0x2ca)],'oldestPendingMs':Math['round'](_0x1a1d60),'committed':this[_0x3d638c(0x240)],'commitsPerSec':_0x492015,'commitP99Ms':Math[_0x3d638c(0x112)](_0x354f24),'parkedNow':this[_0x3d638c(0x2b7)][_0x3d638c(0x287)],'parkedTotal':this[_0x3d638c(0x29b)],'highWater':this['_highWater']};}[_0x9ffe74(0x2af)](){const _0x8fff84=_0x9ffe74,_0x20c2b8=_0x1780b2['now']();return[...this[_0x8fff84(0x272)]['values']()]['map'](_0x72adcc=>Math[_0x8fff84(0x112)](_0x20c2b8-_0x72adcc))[_0x8fff84(0x2a2)]((_0xd875be,_0x4368c0)=>_0x4368c0-_0xd875be);}[_0x9ffe74(0x231)](){const _0x51eb0d=_0x9ffe74;this[_0x51eb0d(0x273)]=!![];for(const _0x21fb1f of this['_bpWaiters'][_0x51eb0d(0x101)](0x0))_0x21fb1f();}async['drain'](){const _0x465bbe=_0x9ffe74;let _0x306949=0x0;while(this[_0x465bbe(0x236)][_0x465bbe(0x2ca)]&&_0x306949++<0x3e8){await Promise[_0x465bbe(0x266)]([...this[_0x465bbe(0x236)]]);}}async[_0x9ffe74(0x20d)](_0x3466d6,_0x1d8588,_0x4d21ed,_0x470e76){const _0x3d912c=_0x9ffe74;return this[_0x3d912c(0x1f1)](()=>{const _0x688911=_0x3d912c;if(_0x470e76===undefined)_0x3466d6['putSync'](_0x1d8588,_0x4d21ed);else _0x3466d6[_0x688911(0x12c)](_0x1d8588,_0x4d21ed,_0x470e76);},_0x3d912c(0x176));}async['remove'](_0x15eb23,_0x3a95a7){const _0x12fa45=_0x9ffe74;return this['transaction'](()=>_0x15eb23[_0x12fa45(0xc0)](_0x3a95a7),_0x12fa45(0x2b2));}}async function _0x1bccdf(_0x4213d8,_0x23908a){const _0x1c2e96=_0x9ffe74;if(_0x23908a==null)_0x23908a=Math[_0x1c2e96(0x2c5)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x5d5325=_0x4213d8?.[_0x1c2e96(0x211)];if(!_0x5d5325||typeof _0x5d5325[_0x1c2e96(0x1ae)]!==_0x1c2e96(0x28f))return;await Promise[_0x1c2e96(0x2de)]([Promise[_0x1c2e96(0x1b5)](_0x5d5325)['catch'](()=>{}),new Promise(_0x2c5b5c=>{const _0x5866e3=_0x1c2e96,_0x56b2fb=setTimeout(_0x2c5b5c,_0x23908a);if(_0x56b2fb[_0x5866e3(0x232)])_0x56b2fb[_0x5866e3(0x232)]();})]);}catch{}}function _0x1add5a(_0x9bf4e3){const _0x4f7c19=_0x9ffe74;if(_0x5a0c48)return Promise[_0x4f7c19(0x1b5)]();const _0x27aa89=_0x9bf4e3?.['committed'];return _0x27aa89&&typeof _0x27aa89[_0x4f7c19(0x1ae)]==='function'?_0x27aa89:Promise[_0x4f7c19(0x1b5)]();}return okdbWriter[_0x9ffe74(0x2ad)]=_0x41c781,okdbWriter[_0x9ffe74(0x2ad)][_0x9ffe74(0xb6)]=_0x1bccdf,okdbWriter[_0x9ffe74(0x2ad)]['committed']=_0x1add5a,okdbWriter[_0x9ffe74(0x2ad)]['SYNC_COMMITS']=_0x5a0c48,okdbWriter[_0x9ffe74(0x2ad)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x6da1a4=_0x18991b;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x1db27e=require$$0$3,{SYNC_COMMITS:_0x485714}=requireOkdbWriter(),_0x4ceb86='~lock';class _0x1c5941{constructor(_0x510d54,_0x295318,_0x3ff7fd){const _0x4cc221=_0x4fa3;this['_lock']=_0x510d54,this[_0x4cc221(0x21b)]=_0x295318,this['_acquiredAt']=_0x3ff7fd,this[_0x4cc221(0x165)]=![],this[_0x4cc221(0x1de)]=null,this[_0x4cc221(0x204)]=null;}[_0x6da1a4(0x13c)](){const _0x22ad64=_0x6da1a4;if(this['_released'])return![];try{const _0x543c88=this[_0x22ad64(0x2c8)][_0x22ad64(0x202)]()[_0x22ad64(0x10a)](this[_0x22ad64(0x21b)]);if(!_0x543c88||_0x543c88[_0x22ad64(0x253)]!==this[_0x22ad64(0x1ac)])return![];const _0x48795c=_0x543c88[_0x22ad64(0x249)]??_0x543c88['acquiredAt'];if(_0x48795c+_0x543c88[_0x22ad64(0x180)]<Date[_0x22ad64(0x194)]())return![];return!![];}catch{return!this['_released'];}}[_0x6da1a4(0x146)](){const _0x48afae=_0x6da1a4;if(this[_0x48afae(0x165)])return null;try{return this[_0x48afae(0x2c8)]['_db']()[_0x48afae(0x10a)](this['_key'])??null;}catch{return null;}}async['extend'](_0x4d7b62){const _0xa9aa8d=_0x6da1a4;if(this[_0xa9aa8d(0x165)])return;try{if(this[_0xa9aa8d(0x2c8)][_0xa9aa8d(0x273)]())return;const _0x3c287f=this[_0xa9aa8d(0x2c8)][_0xa9aa8d(0x202)]()[_0xa9aa8d(0x10a)](this[_0xa9aa8d(0x21b)]);if(!_0x3c287f||_0x3c287f[_0xa9aa8d(0x253)]!==this[_0xa9aa8d(0x1ac)])return;if(_0x485714)this[_0xa9aa8d(0x2c8)]['_db']()['putSync'](this[_0xa9aa8d(0x21b)],{..._0x3c287f,'ttlMs':_0x3c287f['ttlMs']+_0x4d7b62});else await this[_0xa9aa8d(0x2c8)]['_db']()[_0xa9aa8d(0x20d)](this[_0xa9aa8d(0x21b)],{..._0x3c287f,'ttlMs':_0x3c287f[_0xa9aa8d(0x180)]+_0x4d7b62});}catch{}}async[_0x6da1a4(0x25f)](){const _0xc4ce5d=_0x6da1a4;if(this[_0xc4ce5d(0x165)])return;if(this[_0xc4ce5d(0x204)])try{await this[_0xc4ce5d(0x204)];}catch{}clearInterval(this[_0xc4ce5d(0x1de)]),this[_0xc4ce5d(0x1de)]=null,this[_0xc4ce5d(0x165)]=!![];try{if(this[_0xc4ce5d(0x2c8)][_0xc4ce5d(0x273)]())return;const _0xfeb9ff=this[_0xc4ce5d(0x2c8)][_0xc4ce5d(0x202)]()[_0xc4ce5d(0x10a)](this[_0xc4ce5d(0x21b)]);if(_0xfeb9ff&&_0xfeb9ff[_0xc4ce5d(0x253)]===this[_0xc4ce5d(0x1ac)]){if(_0x485714)this[_0xc4ce5d(0x2c8)][_0xc4ce5d(0x202)]()['removeSync'](this[_0xc4ce5d(0x21b)]);else await this[_0xc4ce5d(0x2c8)][_0xc4ce5d(0x202)]()['remove'](this[_0xc4ce5d(0x21b)]);}}catch{}}[_0x6da1a4(0x274)](_0x58c467,_0xed704d){const _0x507233=_0x6da1a4,_0x1f1136=_0xed704d??Math[_0x507233(0x2c3)](_0x58c467/0x3);this[_0x507233(0x1de)]=setInterval(()=>{const _0x36970b=_0x507233;if(this[_0x36970b(0x165)])return;this[_0x36970b(0x204)]=((async()=>{const _0x2a8124=_0x36970b;try{if(this[_0x2a8124(0x2c8)][_0x2a8124(0x273)]())return;const _0x2ad530=this['_lock'][_0x2a8124(0x202)]()[_0x2a8124(0x10a)](this[_0x2a8124(0x21b)]);if(!_0x2ad530||_0x2ad530[_0x2a8124(0x253)]!==this['_acquiredAt']){this[_0x2a8124(0x165)]=!![],clearInterval(this[_0x2a8124(0x1de)]),this['_heartbeatTimer']=null;return;}if(_0x485714)this['_lock'][_0x2a8124(0x202)]()[_0x2a8124(0x12c)](this[_0x2a8124(0x21b)],{..._0x2ad530,'updatedAt':Date[_0x2a8124(0x194)]()});else await this[_0x2a8124(0x2c8)]['_db']()[_0x2a8124(0x20d)](this[_0x2a8124(0x21b)],{..._0x2ad530,'updatedAt':Date[_0x2a8124(0x194)]()});}catch{}this[_0x2a8124(0x204)]=null;})());},_0x1f1136);if(this[_0x507233(0x1de)][_0x507233(0x232)])this['_heartbeatTimer'][_0x507233(0x232)]();}}class _0x359114{constructor(_0x4f08e7,{namespace:_0x2759ed,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x22b362=_0x6da1a4;this[_0x22b362(0x1ba)]=_0x4f08e7,this[_0x22b362(0xf8)]=_0x2759ed,this['ttlMs']=ttlMs,this[_0x22b362(0x289)]=heartbeatMs,this[_0x22b362(0x215)]=null;}[_0x6da1a4(0x202)](){const _0x433adf=_0x6da1a4;return this[_0x433adf(0x1f5)](),(!this[_0x433adf(0x215)]||this['_lockDbOf']!==this[_0x433adf(0x1ba)])&&(this['_lockDb']=this[_0x433adf(0x1ba)][_0x433adf(0x271)](_0x4ceb86,{'dupSort':![]}),this[_0x433adf(0x277)]=this[_0x433adf(0x1ba)]),this[_0x433adf(0x215)];}[_0x6da1a4(0x248)](){const _0x500840=_0x6da1a4;return this['_assertUsable'](),(!this[_0x500840(0x243)]||this['_wantDbOf']!==this[_0x500840(0x1ba)])&&(this['_wantDbHandle']=this['_rawDb'][_0x500840(0x271)](_0x4ceb86+_0x500840(0x216),{'dupSort':![]}),this['_wantDbOf']=this[_0x500840(0x1ba)]),this[_0x500840(0x243)];}['_closed'](){const _0x16ad50=_0x6da1a4,_0x26e8e5=this[_0x16ad50(0x1ba)]?.[_0x16ad50(0x20b)];return _0x26e8e5===_0x16ad50(0x19b)||_0x26e8e5==='closed';}[_0x6da1a4(0x1f5)](){const _0x2413af=_0x6da1a4;if(this[_0x2413af(0x273)]())throw new Error(_0x2413af(0x1cf));}[_0x6da1a4(0x21b)](_0x3428e8){const _0x68f139=_0x6da1a4;return this[_0x68f139(0xf8)]+':'+_0x3428e8;}[_0x6da1a4(0x1db)](_0x356b1a){const _0x1c0fe2=_0x6da1a4;try{if(this[_0x1c0fe2(0x273)]())return;_0x485714?this[_0x1c0fe2(0x248)]()[_0x1c0fe2(0x12c)](this[_0x1c0fe2(0x21b)](_0x356b1a),Date['now']()):this['_wantDb']()[_0x1c0fe2(0x20d)](this[_0x1c0fe2(0x21b)](_0x356b1a),Date['now']())?.[_0x1c0fe2(0x1ad)]?.(()=>{});}catch{}}[_0x6da1a4(0xa9)](_0x1f1866,_0xf7d7eb=0x3e8){const _0x122929=_0x6da1a4;try{const _0x5f0e7c=this[_0x122929(0x248)]()[_0x122929(0x10a)](this['_key'](_0x1f1866));return typeof _0x5f0e7c===_0x122929(0x18f)&&Date['now']()-_0x5f0e7c<_0xf7d7eb;}catch{return![];}}['_isStale'](_0x398a13){const _0x2e72ff=_0x6da1a4,_0x5b3a48=_0x398a13[_0x2e72ff(0x249)]??_0x398a13[_0x2e72ff(0x253)];return _0x5b3a48+_0x398a13['ttlMs']<Date[_0x2e72ff(0x194)]();}static['_holderDead'](_0xf5cb2b){const _0x6b2d09=_0x6da1a4,_0x105daa=_0xf5cb2b?.[_0x6b2d09(0x146)];if(!_0x105daa||typeof _0x105daa[_0x6b2d09(0x9d)]!==_0x6b2d09(0x18f))return![];if(_0x105daa[_0x6b2d09(0x199)]!==_0x1db27e[_0x6b2d09(0x199)]())return![];if(_0x105daa['pid']===process['pid'])return![];try{return process[_0x6b2d09(0xa0)](_0x105daa[_0x6b2d09(0x9d)],0x0),![];}catch(_0x31e1bd){return _0x31e1bd[_0x6b2d09(0x16e)]===_0x6b2d09(0xdf);}}async['tryAcquire'](_0x2b5360,_0xc796dc={},_0x3b650d={}){const _0x5385b3=_0x6da1a4,_0x1681a7=this['_key'](_0x2b5360),_0x55af52=_0x3b650d[_0x5385b3(0x180)]??this['ttlMs'],_0x4b750f=Date['now'](),_0x4fedbe={'holder':{'pid':process[_0x5385b3(0x9d)],'hostname':_0x1db27e['hostname'](),..._0xc796dc},'acquiredAt':_0x4b750f,'updatedAt':_0x4b750f,'ttlMs':_0x55af52};let _0x126b6e=![],_0x4cafeb=null;if(this[_0x5385b3(0x273)]())return{'acquired':![],'handle':null,'current':null};try{const _0x557d72=()=>{const _0x48c452=_0x5385b3,_0x791e20=this[_0x48c452(0x202)]()[_0x48c452(0x10a)](_0x1681a7);if(_0x791e20&&!this[_0x48c452(0x285)](_0x791e20)&&!_0x359114[_0x48c452(0x254)](_0x791e20)){const _0xf6214c=_0xc796dc[_0x48c452(0x26e)]!=null&&_0x791e20['holder'][_0x48c452(0x9d)]===process['pid']&&_0x791e20['holder'][_0x48c452(0x26e)]===_0xc796dc['processorId'];if(!_0xf6214c){_0x126b6e=![],_0x4cafeb=_0x791e20;return;}_0x4fedbe[_0x48c452(0x253)]<=_0x791e20[_0x48c452(0x253)]&&(_0x4fedbe[_0x48c452(0x253)]=_0x791e20[_0x48c452(0x253)]+0x1,_0x4fedbe['updatedAt']=_0x4fedbe[_0x48c452(0x253)]);}this[_0x48c452(0x202)]()[_0x48c452(0x20d)](_0x1681a7,_0x4fedbe),_0x126b6e=!![],_0x4cafeb=_0x4fedbe;};if(_0x485714)this[_0x5385b3(0x202)]()['transactionSync'](_0x557d72);else await this[_0x5385b3(0x202)]()['childTransaction'](_0x557d72);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x126b6e)return{'acquired':![],'handle':null,'current':_0x4cafeb};const _0x580bfd=new _0x1c5941(this,_0x1681a7,_0x4fedbe[_0x5385b3(0x253)]);return _0x580bfd[_0x5385b3(0x274)](_0x55af52,this['heartbeatMs']),{'acquired':!![],'handle':_0x580bfd,'current':_0x4cafeb};}[_0x6da1a4(0x14c)](_0x5b4292){const _0x26c304=_0x6da1a4;try{return this[_0x26c304(0x202)]()[_0x26c304(0x10a)](this[_0x26c304(0x21b)](_0x5b4292))??null;}catch{return null;}}[_0x6da1a4(0x9b)](){const _0x320b78=_0x6da1a4,_0x4d919b=this['namespace']+':',_0x595042=[];try{for(const {key:_0x4d3232,value:_0x5e1bf5}of this[_0x320b78(0x202)]()[_0x320b78(0x1bb)]({'start':_0x4d919b,'end':_0x4d919b+'\xff'})){typeof _0x4d3232==='string'&&_0x4d3232['startsWith'](_0x4d919b)&&_0x595042[_0x320b78(0x2a5)]({'id':_0x4d3232['slice'](_0x4d919b[_0x320b78(0x287)]),'entry':_0x5e1bf5});}}catch{}return _0x595042;}static[_0x6da1a4(0x160)](_0xa978ca){const _0x596080=_0x6da1a4,_0x3dba95=[];try{const _0x2cc0d3=_0xa978ca['openDB'](_0x4ceb86,{'dupSort':![]});for(const {key:_0x4569dd,value:_0x1f4b91}of _0x2cc0d3[_0x596080(0x1bb)]({})){if(typeof _0x4569dd!==_0x596080(0x252))continue;const _0x28440c=_0x4569dd[_0x596080(0xef)](':');if(_0x28440c<0x1)continue;_0x3dba95[_0x596080(0x2a5)]({'namespace':_0x4569dd[_0x596080(0x1fd)](0x0,_0x28440c),'id':_0x4569dd[_0x596080(0x1fd)](_0x28440c+0x1),'entry':_0x1f4b91});}}catch{}return _0x3dba95;}}return okdbLock={'OKDBLock':_0x359114},okdbLock;}var version='2.4.0',require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x11d8ec=_0x18991b;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x545f03=require$$0$3,_0x107b11=require$$1$1,_0x204ee8=require$$2,{LOOP:_0xc296d6}=requireOkdbLoopMonitor(),{OKDBLock:_0x5e0748}=requireOkdbLock(),{SYNC_COMMITS:_0x2d0451}=requireOkdbWriter(),_0x516b59=_0x11d8ec(0x2d5),_0x2a9114=_0x11d8ec(0xb0),_0x4abebd='~processes:desired',_0x157dab=_0x11d8ec(0x168),_0x37eb2f=(_0x42a762,_0x1c89a2)=>_0x42a762+':'+_0x1c89a2,_0x975d42=(_0x3eb220,_0x2ce68d)=>_0x3eb220+'::'+_0x2ce68d,_0x224dd0=(_0x143a41,_0xb33a9a)=>_0x143a41+'/'+_0xb33a9a,_0x4fefbf=(_0x4da802,_0x6e2096)=>_0x4da802+'#'+_0x6e2096,_0x16c72c=_0x1bcc01=>{const _0x2e0223=_0x11d8ec;if(_0x1bcc01?.[_0x2e0223(0xf2)])return _0x1bcc01['processKey'];const _0x4c3ec6=_0x1bcc01?.['nodeKey'];return typeof _0x4c3ec6===_0x2e0223(0x252)&&_0x4c3ec6[_0x2e0223(0x280)]('#')?_0x4c3ec6[_0x2e0223(0x1fd)](0x0,_0x4c3ec6[_0x2e0223(0xef)]('#')):_0x4c3ec6;},_0xe366f4=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x22e835=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0xa10a98=_0xe366f4*0x3,_0x2613d4=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x11d8ec(0x2c5)](0x927c0,_0xa10a98*0x14),_0x312dd8=[_0x11d8ec(0x1ff),_0x11d8ec(0x18a),'processor:retry','processor:error','processor:paused',_0x11d8ec(0x142)];let _0x5e2482=null;function _0x52c16f(){const _0x5606b1=_0x11d8ec;if(_0x5e2482==null)_0x5e2482=Math[_0x5606b1(0x112)]((Date[_0x5606b1(0x194)]()-process[_0x5606b1(0x242)]()*0x3e8)/0x3e8)*0x3e8;return _0x5e2482;}function _0x1a8b84(_0x26d772){const _0x6f2737=_0x11d8ec;if(process.env.OKDB_PROCESS_KILL===_0x6f2737(0x149))return![];if(_0x26d772?.[_0x6f2737(0x1bc)]?.[_0x6f2737(0x1a6)]&&typeof _0x26d772[_0x6f2737(0x1bc)][_0x6f2737(0x1a6)]===_0x6f2737(0x193)&&_0x26d772['options'][_0x6f2737(0x1a6)][_0x6f2737(0xa0)]===![])return![];return!![];}function _0x18fa9c(_0x2ad640,_0x255762){const _0x5f5744=_0x11d8ec,_0x523b09=!!_0x255762?.[_0x5f5744(0x19c)];switch(_0x2ad640){case _0x5f5744(0x2ae):return{'controllable':_0x523b09,'decommissionable':![],'killable':!![],'killConfirm':_0x5f5744(0x25c)};case _0x5f5744(0x23f):case _0x5f5744(0x9c):return{'controllable':_0x523b09,'decommissionable':![],'killable':!![],'killConfirm':_0x5f5744(0x1f7)};case _0x5f5744(0x1d2):return{'controllable':![],'decommissionable':![],'killable':![]};case _0x5f5744(0x1d7):case _0x5f5744(0xdb):case'fn-runner':case _0x5f5744(0x20a):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x5f5744(0x20e)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x487e6d{constructor(_0x47e552){const _0x4e4edc=_0x11d8ec;this[_0x4e4edc(0x226)]=_0x47e552,this[_0x4e4edc(0x25a)]=null,this['_desired']=null,this[_0x4e4edc(0xa3)]=new Map(),this[_0x4e4edc(0x1c8)]=null,this['_isWriter']=![],this[_0x4e4edc(0x1ce)]=![],this[_0x4e4edc(0xcb)]=_0x52c16f(),this['_selfKey']=_0x37eb2f(process[_0x4e4edc(0x9d)],this[_0x4e4edc(0xcb)]),this['_instanceId']=_0x204ee8[_0x4e4edc(0xd8)]()[_0x4e4edc(0x1fd)](0x0,0x8),this[_0x4e4edc(0x291)]=_0x4fefbf(this['_selfKey'],this[_0x4e4edc(0x1ee)]),this['_startedAt']=Date['now'](),this[_0x4e4edc(0x241)]=null,this[_0x4e4edc(0x230)]=null,this[_0x4e4edc(0x1ab)]=null,this['_hbTimer']=null,this['_onProcEvent']=null,this[_0x4e4edc(0x2d6)]=null,this[_0x4e4edc(0xd6)]=0x0,this[_0x4e4edc(0x18e)]={},this[_0x4e4edc(0x145)]=new Map(),this['_lastCpuUsage']=process[_0x4e4edc(0x134)](),this[_0x4e4edc(0x1ec)]=Date[_0x4e4edc(0x194)](),this[_0x4e4edc(0xf7)]=0x0,this[_0x4e4edc(0x250)]=new Map();}get[_0x11d8ec(0x279)](){const _0x3d735e=_0x11d8ec;return this[_0x3d735e(0xda)];}get['rowKey'](){const _0x47cb26=_0x11d8ec;return this[_0x47cb26(0x291)];}[_0x11d8ec(0xd1)](_0x1b59a8,_0x3906db){const _0x7373dd=_0x11d8ec,_0xb99ca3=_0x18fa9c(_0x1b59a8,_0x3906db);if(_0xb99ca3['killable']&&!_0x1a8b84(this[_0x7373dd(0x226)]))return{..._0xb99ca3,'killable':![],'killConfirm':undefined};return _0xb99ca3;}['isActive'](){const _0xad45c0=_0x11d8ec;return!!this[_0xad45c0(0x25a)];}[_0x11d8ec(0x28c)](_0x6bd14f){const _0x7fa27c=_0x11d8ec;Object[_0x7fa27c(0x1e9)](this[_0x7fa27c(0x18e)],_0x6bd14f||{});}[_0x11d8ec(0x29e)](_0x58d132){const _0x59e6a3=_0x11d8ec;if(_0x58d132)this[_0x59e6a3(0x1ab)]=_0x58d132;}[_0x11d8ec(0x116)](_0xe3b7c3={}){const _0x146426=_0x11d8ec;return this['okdb'][_0x146426(0x27c)](_0xe3b7c3);}[_0x11d8ec(0x1b8)](){const _0x4837bb=_0x11d8ec,_0xc95ca8={};let _0x2f2aee=0x0,_0x10a51e=0x0;const _0x2d6d94=new Set();for(const _0x25b065 of this[_0x4837bb(0x2d7)]()){_0x10a51e++;const _0x546641=_0x25b065['processing'];if(!_0x546641)continue;if(_0x546641[_0x4837bb(0x2be)])_0x2f2aee++;for(const _0x459133 of _0x546641[_0x4837bb(0x19c)]||[]){if(!['single',_0x4837bb(0x2e1)]['includes'](_0x459133[_0x4837bb(0x2d2)]))continue;(_0x459133[_0x4837bb(0x262)]===_0x4837bb(0x1e1)||_0x459133[_0x4837bb(0x262)]===_0x4837bb(0x1da))&&_0x459133[_0x4837bb(0xd4)]&&_0x2d6d94[_0x4837bb(0x9e)]((_0x459133[_0x4837bb(0x292)]||'default')+':'+_0x459133['cursorKey']);const _0x53d317=_0x459133[_0x4837bb(0x292)]||_0x4837bb(0x22b);(_0xc95ca8[_0x53d317]||=[])[_0x4837bb(0x2a5)]({..._0x459133,'env':_0x53d317,'owner':{'pid':_0x25b065[_0x4837bb(0x9d)]??null,'kind':_0x25b065[_0x4837bb(0x2c9)]??null}});}}for(const [_0x587677,_0x3b0753]of Object[_0x4837bb(0x206)](_0xc95ca8)){for(const _0x5d15d3 of _0x3b0753){if(_0x5d15d3[_0x4837bb(0x2d2)]===_0x4837bb(0x132)&&!_0x5d15d3['claimGated']){const _0x3394e0=_0x587677+':'+(_0x5d15d3[_0x4837bb(0xd4)]??'');if(!_0x2d6d94['has'](_0x3394e0))_0x5d15d3[_0x4837bb(0x2ab)]=!![];}}}return{'envs':_0xc95ca8,'policy':null,'participation':{'participating':_0x2f2aee,'total':_0x10a51e},'source':_0x4837bb(0x158)};}[_0x11d8ec(0x10b)](){const _0x3571aa=_0x11d8ec,_0x3907b5=_0x6b5857=>{const _0x210353=_0x4fa3;if(_0x6b5857['state']===_0x210353(0x1e1)||_0x6b5857[_0x210353(0x262)]===_0x210353(0x1da)||_0x6b5857[_0x210353(0x262)]==='error')return 0x3;if(_0x6b5857[_0x210353(0x115)])return 0x1;return 0x2;},_0x44b08d=new Map();for(const _0x28bf53 of this['listNodes']()){for(const _0x15edfa of _0x28bf53['processing']?.[_0x3571aa(0x19c)]||[]){const _0x2813ed={..._0x15edfa,'owner':{'pid':_0x28bf53[_0x3571aa(0x9d)]??null,'kind':_0x28bf53[_0x3571aa(0x2c9)]??null,'host':_0x28bf53['host']??null}},_0x4d4aa9=_0x15edfa[_0x3571aa(0x2d2)]===_0x3571aa(0x132)?_0x3571aa(0x100)+(_0x15edfa[_0x3571aa(0x292)]??'')+'::'+(_0x15edfa[_0x3571aa(0xd4)]??_0x15edfa[_0x3571aa(0x213)]??_0x15edfa['id']):_0x3571aa(0x24b)+(_0x28bf53[_0x3571aa(0xee)]??_0x28bf53[_0x3571aa(0xf2)]??'')+'::'+(_0x15edfa[_0x3571aa(0x292)]??'')+'::'+_0x15edfa['id'],_0xa779fc=_0x44b08d[_0x3571aa(0x10a)](_0x4d4aa9);if(!_0xa779fc||_0x3907b5(_0x2813ed)>_0x3907b5(_0xa779fc))_0x44b08d['set'](_0x4d4aa9,_0x2813ed);}}return[..._0x44b08d[_0x3571aa(0x17f)]()];}[_0x11d8ec(0xc7)](){const _0x2791f7=_0x11d8ec,_0x46c898=Date[_0x2791f7(0x194)](),_0x5ad3c8=this[_0x2791f7(0x2d7)](),_0x3cc808=_0x59c65f=>Math[_0x2791f7(0x2c5)](0x0,Math[_0x2791f7(0x112)]((_0x46c898-(_0x59c65f[_0x2791f7(0xab)]||_0x46c898))/0x3e8)),_0x2dd27f=_0x5ad3c8[_0x2791f7(0x106)](_0x136fc4=>_0x136fc4['kind']==='primary'),_0x2d1b32=_0x5ad3c8['filter'](_0x2c30c2=>_0x2c30c2[_0x2791f7(0x2c9)]==='http-server');if(_0x2dd27f||_0x2d1b32[_0x2791f7(0x287)])return{'primary':_0x2dd27f?{'pid':_0x2dd27f[_0x2791f7(0x9d)],'uptime':_0x3cc808(_0x2dd27f)}:null,'workers':_0x2d1b32[_0x2791f7(0x284)](_0x4102da=>({'pid':_0x4102da[_0x2791f7(0x9d)],'uptime':_0x3cc808(_0x4102da)})),'workersConfigured':_0x2dd27f?.['meta']?.['workersConfigured']??_0x2d1b32[_0x2791f7(0x287)],'mode':_0x2791f7(0x143)};const _0x34fc90=_0x5ad3c8['find'](_0x4a769f=>_0x4a769f[_0x2791f7(0x2c9)]===_0x2791f7(0x23f)||_0x4a769f[_0x2791f7(0x2c9)]==='standalone'||_0x4a769f[_0x2791f7(0x2c9)]===_0x2791f7(0x1d2)),_0x39773e=_0x34fc90?{'pid':_0x34fc90['pid'],'uptime':_0x3cc808(_0x34fc90)}:{'pid':process[_0x2791f7(0x9d)],'uptime':Math[_0x2791f7(0x2c5)](0x0,Math[_0x2791f7(0x112)](process[_0x2791f7(0x242)]()))};return{'primary':_0x39773e,'workers':[_0x39773e],'workersConfigured':0x1,'mode':_0x2791f7(0x132)};}[_0x11d8ec(0x20f)](){const _0x530b3c=_0x11d8ec;return this[_0x530b3c(0x110)]();}[_0x11d8ec(0x137)](){const _0x380232=_0x11d8ec,_0x1996a1=new Map();for(const _0x4820b9 of this['_groupByProcess']())_0x1996a1[_0x380232(0x2ce)](_0x4820b9[_0x380232(0xf2)],{..._0x4820b9,'children':[]});const _0x40a5ef=[];for(const _0x38fa1f of _0x1996a1[_0x380232(0x17f)]()){const _0x3ef1d1=_0x38fa1f[_0x380232(0x2c2)]?_0x1996a1['get'](_0x38fa1f[_0x380232(0x2c2)]):null;if(_0x3ef1d1&&_0x3ef1d1!==_0x38fa1f)_0x3ef1d1[_0x380232(0x16f)]['push'](_0x38fa1f);else _0x40a5ef[_0x380232(0x2a5)](_0x38fa1f);}const _0x4fc12a=(_0x3a3c39,_0x421e2d)=>_0x3a3c39[_0x380232(0x2c9)]===_0x421e2d[_0x380232(0x2c9)]?(_0x3a3c39[_0x380232(0x9d)]||0x0)-(_0x421e2d[_0x380232(0x9d)]||0x0):(_0x3a3c39[_0x380232(0x2c9)]??'')<(_0x421e2d[_0x380232(0x2c9)]??'')?-0x1:0x1,_0x58a1e7=_0x442eed=>{const _0x1601f5=_0x380232;_0x442eed[_0x1601f5(0x2a2)](_0x4fc12a);for(const _0x403769 of _0x442eed)if(_0x403769['children'][_0x1601f5(0x287)])_0x58a1e7(_0x403769['children']);};return _0x58a1e7(_0x40a5ef),_0x40a5ef;}['getProcess'](_0x4b52ab){const _0x1fbe3d=_0x11d8ec;return this[_0x1fbe3d(0x110)]()[_0x1fbe3d(0x106)](_0x41a376=>_0x41a376[_0x1fbe3d(0xf2)]===_0x4b52ab)??null;}[_0x11d8ec(0x110)](_0x41b2a5=Date[_0x11d8ec(0x194)]()){const _0x702759=_0x11d8ec,_0x1812f9=new Map();for(const _0x22ae9c of this[_0x702759(0x2d7)]()){const _0x471f76=_0x16c72c(_0x22ae9c);let _0x54ed13=_0x1812f9[_0x702759(0x10a)](_0x471f76);!_0x54ed13&&(_0x54ed13={'processKey':_0x471f76,'nodeKey':_0x471f76,'pid':_0x22ae9c[_0x702759(0x9d)],'ppid':_0x22ae9c[_0x702759(0x123)]??null,'host':_0x22ae9c[_0x702759(0x161)]??null,'kind':_0x22ae9c[_0x702759(0x2c9)],'role':null,'supervisorKey':_0x22ae9c[_0x702759(0x2c2)]??null,'slot':_0x22ae9c[_0x702759(0x290)]??null,'slotKey':_0x22ae9c[_0x702759(0x293)]??null,'caps':_0x22ae9c[_0x702759(0xe2)]??null,'lifecycle':_0x22ae9c[_0x702759(0x244)]??null,'uptime':Math[_0x702759(0x2c5)](0x0,Math[_0x702759(0x112)]((_0x41b2a5-(_0x22ae9c[_0x702759(0xab)]||_0x41b2a5))/0x3e8)),'startedAt':_0x22ae9c['startedAt']??null,'meta':_0x22ae9c['meta']??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x1812f9['set'](_0x471f76,_0x54ed13));_0x54ed13[_0x702759(0x234)][_0x702759(0x2a5)]({'instanceId':_0x22ae9c['instanceId']??null,'role':_0x22ae9c['role']??null,'listenAddr':_0x22ae9c[_0x702759(0x1b1)]??null,'lifecycle':_0x22ae9c[_0x702759(0x244)]??null,'processing':_0x22ae9c[_0x702759(0x1b7)]??null});if(!_0x54ed13[_0x702759(0x2d0)]&&_0x22ae9c['role'])_0x54ed13[_0x702759(0x2d0)]=_0x22ae9c[_0x702759(0x2d0)];if(!_0x54ed13['listenAddr']&&_0x22ae9c['listenAddr'])_0x54ed13['listenAddr']=_0x22ae9c[_0x702759(0x1b1)];if(!_0x54ed13['processing']&&_0x22ae9c[_0x702759(0x1b7)])_0x54ed13[_0x702759(0x1b7)]=_0x22ae9c[_0x702759(0x1b7)];if(!_0x54ed13['engines']&&_0x22ae9c['engines'])_0x54ed13[_0x702759(0x2d8)]=_0x22ae9c[_0x702759(0x2d8)];if(!_0x54ed13[_0x702759(0x109)]&&_0x22ae9c[_0x702759(0x109)])_0x54ed13[_0x702759(0x109)]=_0x22ae9c[_0x702759(0x109)];if(_0x54ed13[_0x702759(0xe2)]==null&&_0x22ae9c[_0x702759(0xe2)])_0x54ed13['caps']=_0x22ae9c[_0x702759(0xe2)];if(_0x22ae9c[_0x702759(0xe6)]&&(!_0x54ed13[_0x702759(0xe6)]||(_0x22ae9c['stats']['at']??0x0)>(_0x54ed13[_0x702759(0xe6)]['at']??0x0)))_0x54ed13[_0x702759(0xe6)]=_0x22ae9c['stats'];}return[..._0x1812f9[_0x702759(0x17f)]()];}[_0x11d8ec(0x1cb)](){const _0x1a85c0=_0x11d8ec,_0xcecedd=[],_0x21c4a7={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x8f42b2 of this['_groupByProcess']()){_0xcecedd[_0x1a85c0(0x2a5)]({'processKey':_0x8f42b2['processKey'],'kind':_0x8f42b2[_0x1a85c0(0x2c9)],'pid':_0x8f42b2[_0x1a85c0(0x9d)],'supervisorKey':_0x8f42b2[_0x1a85c0(0x2c2)],'meta':_0x8f42b2[_0x1a85c0(0x258)]??null,'uptime':_0x8f42b2[_0x1a85c0(0x242)],'stats':_0x8f42b2['stats']??null}),_0x21c4a7[_0x1a85c0(0x1a6)]++;if(_0x8f42b2[_0x1a85c0(0xe6)]){_0x21c4a7[_0x1a85c0(0x131)]+=_0x8f42b2[_0x1a85c0(0xe6)]['rss']||0x0,_0x21c4a7[_0x1a85c0(0x2c6)]+=(_0x8f42b2['stats'][_0x1a85c0(0x2c6)]||0x0)+(_0x8f42b2[_0x1a85c0(0xe6)][_0x1a85c0(0x2e0)]?.[_0x1a85c0(0x2c6)]||0x0);const _0x39944b=_0x8f42b2['stats']['threads'];_0x39944b&&(_0x21c4a7[_0x1a85c0(0x2e0)][_0x1a85c0(0xfc)]+=_0x39944b[_0x1a85c0(0xfc)]||0x0,_0x21c4a7[_0x1a85c0(0x2e0)][_0x1a85c0(0xeb)]+=_0x39944b[_0x1a85c0(0xeb)]||0x0,_0x21c4a7['threads'][_0x1a85c0(0x1a0)]+=_0x39944b[_0x1a85c0(0x1a0)]||0x0);}}return{'totals':_0x21c4a7,'nodes':_0xcecedd};}async['open']({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x110a44=_0x11d8ec;this[_0x110a44(0x29d)]=this['_isWriter']||!!writer,this['_isReader']=this['_isReader']||!!reader,this['_kind']=kind||this[_0x110a44(0x241)]||(_0x107b11[_0x110a44(0x108)]?'http-server':'cli'),this['_supervisorKey']=supervisorKey??this[_0x110a44(0x230)],this[_0x110a44(0x1ab)]=listenAddr??this['_listenAddr'],this['_ensureDesired'](),await this['_migrateVocab']();if(!writer&&!reader)return null;if(!this[_0x110a44(0x25a)]){const _0x36e770=await this['okdb'][_0x110a44(0xec)](_0x516b59,{'sync':![],'durability':'fast'});await _0x36e770[_0x110a44(0x9a)](_0x2a9114),this['_statusEnv']=_0x36e770;}return this[_0x110a44(0x25a)];}[_0x11d8ec(0x102)](){const _0x1aa95a=_0x11d8ec;return this[_0x1aa95a(0x119)]!==this[_0x1aa95a(0x25a)]&&(this['_nodeDbFor']=this[_0x1aa95a(0x25a)],this[_0x1aa95a(0xd0)]=this['_statusEnv'][_0x1aa95a(0x265)](_0x2a9114)[_0x1aa95a(0x191)]),this['_nodeDbCache'];}[_0x11d8ec(0x246)](_0x214721){const _0x1d058f=_0x11d8ec;if(_0x2d0451)return this[_0x1d058f(0x102)]()[_0x1d058f(0x12c)](_0x214721[_0x1d058f(0xee)],_0x214721,0x1);const _0x11f5f8=this[_0x1d058f(0x102)]()[_0x1d058f(0x20d)](_0x214721[_0x1d058f(0xee)],_0x214721,0x1);if(_0x11f5f8&&typeof _0x11f5f8[_0x1d058f(0x1ae)]==='function')_0x11f5f8[_0x1d058f(0x1ae)](undefined,()=>{});return _0x11f5f8;}[_0x11d8ec(0x224)](_0x3c409a){const _0xa0ae73=_0x11d8ec;return this['_nodeDb']()['putSync'](_0x3c409a[_0xa0ae73(0xee)],_0x3c409a,0x1);}[_0x11d8ec(0x1d6)](_0x562c2c){const _0x2239b3=_0x11d8ec;if(_0x2d0451)try{return this[_0x2239b3(0x102)]()[_0x2239b3(0xc0)](_0x562c2c);}catch{return![];}const _0x3a8957=this['_nodeDb']()[_0x2239b3(0x1a5)](_0x562c2c);if(_0x3a8957&&typeof _0x3a8957[_0x2239b3(0x1ae)]===_0x2239b3(0x28f))_0x3a8957[_0x2239b3(0x1ae)](undefined,()=>{});return _0x3a8957;}async['putNode'](_0x1e21c5){const _0x204f3b=_0x11d8ec;if(!this[_0x204f3b(0x25a)]||!this[_0x204f3b(0x29d)]||!_0x1e21c5?.[_0x204f3b(0xee)])return;return this[_0x204f3b(0x246)](_0x1e21c5);}async[_0x11d8ec(0x197)](_0x3a52f6){const _0xd5d57c=_0x11d8ec;if(!this[_0xd5d57c(0x25a)]||!this[_0xd5d57c(0x29d)]||!_0x3a52f6)return;const _0x7d17aa=_0x3a52f6[_0xd5d57c(0x280)]('#'),_0xdd64bf=[];for(const {key:_0x1ab0c7}of this['_statusEnv'][_0xd5d57c(0x1bb)](_0x2a9114)){if(_0x1ab0c7===_0x3a52f6||!_0x7d17aa&&typeof _0x1ab0c7===_0xd5d57c(0x252)&&_0x1ab0c7['startsWith'](_0x3a52f6+'#'))_0xdd64bf['push'](_0x1ab0c7);}for(const _0x4bcb95 of _0xdd64bf){try{this[_0xd5d57c(0x102)]()[_0xd5d57c(0xc0)](_0x4bcb95);}catch{}}}[_0x11d8ec(0xbe)](_0x56442e){const _0x35bf1d=_0x11d8ec;if(typeof _0x56442e?.[_0x35bf1d(0x9d)]!==_0x35bf1d(0x18f))return![];if(_0x56442e[_0x35bf1d(0x161)]!==_0x545f03['hostname']())return![];if(_0x56442e['pid']===process[_0x35bf1d(0x9d)])return![];if(_0x56442e[_0x35bf1d(0x1fe)]!=null&&_0x56442e['expiresAt']<Date[_0x35bf1d(0x194)]()-_0x2613d4)return!![];try{return process[_0x35bf1d(0xa0)](_0x56442e[_0x35bf1d(0x9d)],0x0),![];}catch(_0x25bcc1){return _0x25bcc1[_0x35bf1d(0x16e)]===_0x35bf1d(0xdf);}}[_0x11d8ec(0x2d7)](){const _0x80382d=_0x11d8ec;if(!this[_0x80382d(0x25a)])return[];try{this['_statusEnv']['db']?.[_0x80382d(0xc1)]?.();}catch{}const _0x37a61e=Date['now'](),_0x25f8ea=_0x545f03[_0x80382d(0x199)](),_0x14a59b=[];for(const {value:_0x5b3823}of this[_0x80382d(0x25a)][_0x80382d(0x1bb)](_0x2a9114)){if(!_0x5b3823)continue;let _0x123c78=null;_0x5b3823[_0x80382d(0x161)]===_0x25f8ea&&typeof _0x5b3823[_0x80382d(0x9d)]===_0x80382d(0x18f)&&(_0x123c78=!this['_nodeDead'](_0x5b3823));if(_0x123c78===![])continue;const _0x484ba6=_0x5b3823[_0x80382d(0x1fe)]==null||_0x5b3823[_0x80382d(0x1fe)]>=_0x37a61e;if(_0x123c78===!![]||_0x484ba6)_0x14a59b['push'](_0x5b3823);}return _0x14a59b;}async['reap'](_0x7ee948=0x0){const _0x46a52f=_0x11d8ec;if(!this[_0x46a52f(0x25a)]||!this[_0x46a52f(0x29d)])return;const _0x460e4b=Date[_0x46a52f(0x194)]()-_0x7ee948,_0x2b91a4=new Set(),_0x267777=[],_0x8495e2=_0x545f03[_0x46a52f(0x199)](),_0x9354c3=require$$6[_0x46a52f(0x172)];for(const {key:_0x4d21e2,value:_0x29505f}of this[_0x46a52f(0x25a)][_0x46a52f(0x1bb)](_0x2a9114)){if(!_0x29505f)continue;const _0x440b39=_0x29505f[_0x46a52f(0x161)]===_0x8495e2&&typeof _0x29505f[_0x46a52f(0x9d)]===_0x46a52f(0x18f),_0x76d20c=_0x440b39?this[_0x46a52f(0xbe)](_0x29505f):_0x29505f[_0x46a52f(0x1fe)]!=null&&_0x29505f['expiresAt']<_0x460e4b;if(_0x76d20c)_0x267777[_0x46a52f(0x2a5)](_0x4d21e2);else{_0x2b91a4[_0x46a52f(0x9e)](_0x16c72c(_0x29505f)??_0x4d21e2);if(_0x29505f[_0x46a52f(0x172)]&&_0x29505f[_0x46a52f(0x172)]!==_0x9354c3){if(!this[_0x46a52f(0x2b8)])this[_0x46a52f(0x2b8)]=new Set();!this[_0x46a52f(0x2b8)][_0x46a52f(0x22c)](_0x29505f[_0x46a52f(0x172)])&&(this['_versionSkewWarned'][_0x46a52f(0x9e)](_0x29505f[_0x46a52f(0x172)]),this[_0x46a52f(0x226)][_0x46a52f(0x2b5)]?.[_0x46a52f(0x169)]?.(_0x46a52f(0x239)+(_0x29505f['pid']??'?')+_0x46a52f(0x17c)+_0x29505f[_0x46a52f(0x172)]+_0x46a52f(0xe0)+_0x9354c3+_0x46a52f(0xe8)+_0x46a52f(0x22f),{'feature':_0x46a52f(0x117)}));}}}for(const _0x2bf8f6 of _0x267777)this[_0x46a52f(0x1d6)](_0x2bf8f6);if(this['_ensureDesired']()){const _0xe6099f=[];for(const {key:_0x19a702}of this['listDesired'](_0x46a52f(0xb0))){if(!_0x2b91a4['has'](_0x19a702)){if(_0x2d0451)try{this[_0x46a52f(0x2db)]['removeSync'](_0x46a52f(0xaa)+_0x19a702);}catch{}else _0xe6099f[_0x46a52f(0x2a5)](this['_desired']['remove']('node/'+_0x19a702));}}if(_0xe6099f[_0x46a52f(0x287)])await Promise['allSettled'](_0xe6099f);}}['startHeartbeat'](_0x2500af=null){const _0x9f2af9=_0x11d8ec;if(this[_0x9f2af9(0x187)])return;if(!this[_0x9f2af9(0x29d)]||!this['_statusEnv']){this['okdb']?.['log']?.[_0x9f2af9(0x169)]?.(_0x9f2af9(0x219)+this[_0x9f2af9(0x29d)]+'\x20statusEnv='+!!this[_0x9f2af9(0x25a)]+_0x9f2af9(0x1c4),{'feature':'processes'});return;}this[_0x9f2af9(0x2d6)]=_0x2500af,this[_0x9f2af9(0x192)]=()=>this['_maybePublish']();for(const _0x1b9fdc of _0x312dd8)this['okdb'][_0x9f2af9(0x11a)]['on'](_0x1b9fdc,this[_0x9f2af9(0x192)]);this['_publishNow']();const _0x206e88=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0xe366f4;this[_0x9f2af9(0x187)]=setInterval(()=>{const _0x32ffb1=_0x9f2af9;if(this['_onTick'])try{this[_0x32ffb1(0x2d6)]();}catch{}this['_publishNow'](),this[_0x32ffb1(0x270)]()[_0x32ffb1(0x1ad)](()=>{});},_0x206e88);if(this['_hbTimer'][_0x9f2af9(0x232)])this[_0x9f2af9(0x187)][_0x9f2af9(0x232)]();}[_0x11d8ec(0x18c)](){const _0x31cea4=_0x11d8ec;if(!this['_isWriter']||!this[_0x31cea4(0x25a)])return;if(Date[_0x31cea4(0x194)]()-this['_lastPublishAt']<_0x22e835)return;this[_0x31cea4(0xf9)]();}['_publishNow'](){const _0x2756f6=_0x11d8ec;if(!this[_0x2756f6(0x29d)]||!this[_0x2756f6(0x25a)])return;this[_0x2756f6(0xd6)]=Date[_0x2756f6(0x194)]();try{const _0x5221f5=[this[_0x2756f6(0x163)]()];for(const _0x518931 of this['_children'][_0x2756f6(0x17f)]())_0x5221f5['push'](this[_0x2756f6(0x2df)](_0x518931));const _0x30d68e=_0xc296d6['enabled']?_0xc296d6[_0x2756f6(0x194)]():0x0;for(const _0x57964e of _0x5221f5){try{this[_0x2756f6(0x224)](_0x57964e),this['_publishFailWarned']=![];}catch(_0x2079e3){!this['_publishFailWarned']&&(this['_publishFailWarned']=!![],this[_0x2756f6(0x226)]?.[_0x2756f6(0x2b5)]?.[_0x2756f6(0x169)]?.(_0x2756f6(0x171)+_0x2079e3['message'],{'feature':_0x2756f6(0x1a6)}));}}if(_0xc296d6['enabled'])_0xc296d6[_0x2756f6(0x1a4)](_0x2756f6(0x2a4),_0xc296d6[_0x2756f6(0x194)]()-_0x30d68e,_0x2756f6(0x23e)+_0x5221f5[_0x2756f6(0x287)]+_0x2756f6(0x170));}catch(_0x28cc0b){!this[_0x2756f6(0x2c4)]&&(this['_publishFailWarned']=!![],this[_0x2756f6(0x226)]?.[_0x2756f6(0x2b5)]?.[_0x2756f6(0x169)]?.('registry\x20publish\x20failing:\x20'+_0x28cc0b[_0x2756f6(0x295)],{'feature':_0x2756f6(0x1a6)}));}}async[_0x11d8ec(0x25d)](){const _0x2212ef=_0x11d8ec;if(this['_onProcEvent']){for(const _0x3d8454 of _0x312dd8){try{this[_0x2212ef(0x226)][_0x2212ef(0x11a)][_0x2212ef(0x149)](_0x3d8454,this[_0x2212ef(0x192)]);}catch{}}this[_0x2212ef(0x192)]=null;}this[_0x2212ef(0x187)]&&(clearInterval(this[_0x2212ef(0x187)]),this[_0x2212ef(0x187)]=null);try{if(this[_0x2212ef(0x25a)]&&this[_0x2212ef(0x29d)])await this['removeNode'](this[_0x2212ef(0x291)]);}catch{}}async[_0x11d8ec(0x24e)](){const _0x4b91d6=_0x11d8ec;if(!this[_0x4b91d6(0x25a)]||!this[_0x4b91d6(0x29d)])return;try{await this['removeNode'](this['_rowKey']);}catch{}try{const _0x373d9b=[];for(const {value:_0x5aec89}of this[_0x4b91d6(0x25a)][_0x4b91d6(0x1bb)](_0x2a9114)){if(_0x5aec89?.[_0x4b91d6(0x123)]===process[_0x4b91d6(0x9d)]&&_0x5aec89[_0x4b91d6(0xee)])_0x373d9b[_0x4b91d6(0x2a5)](_0x5aec89[_0x4b91d6(0xee)]);}for(const _0x1f461e of _0x373d9b){try{await this[_0x4b91d6(0x197)](_0x1f461e);}catch{}}}catch{}}async[_0x11d8ec(0x1c3)](){const _0x27d863=_0x11d8ec;return this['putNode'](this[_0x27d863(0x163)]());}async[_0x11d8ec(0x182)](_0x253a8b){const _0x201a2a=_0x11d8ec;if(!this[_0x201a2a(0x25a)]||!this[_0x201a2a(0x29d)])return;return this[_0x201a2a(0x21c)](this[_0x201a2a(0x2df)](_0x253a8b));}[_0x11d8ec(0x2df)]({pid:_0x289331,startedAt:_0x1a5f13,kind:_0x281da5,supervisorKey:_0x5df04b,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x11d8ec(0x155),meta:meta=null,stats:stats=null}){const _0x19f3d8=_0x11d8ec,_0x57b633=Date[_0x19f3d8(0x194)](),_0x381440=_0x37eb2f(_0x289331,_0x1a5f13);return{'nodeKey':_0x4fefbf(_0x381440,'0'),'processKey':_0x381440,'instanceId':'0','pid':_0x289331,'startedAt':_0x1a5f13,'ppid':process[_0x19f3d8(0x9d)],'host':_0x545f03['hostname'](),'supervisorKey':_0x5df04b,'slot':slot,'slotKey':slotKey,'kind':_0x281da5,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x57b633,'expiresAt':_0x57b633+_0xa10a98,'caps':this[_0x19f3d8(0xd1)](_0x281da5,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x11d8ec(0x12d)](_0x41e31e){const _0x27e7a2=_0x11d8ec;if(!_0x41e31e?.[_0x27e7a2(0x9d)])return null;const _0x2993a2=_0x37eb2f(_0x41e31e[_0x27e7a2(0x9d)],_0x41e31e['startedAt']);this[_0x27e7a2(0x145)][_0x27e7a2(0x2ce)](_0x2993a2,{..._0x41e31e,'supervisorKey':_0x41e31e[_0x27e7a2(0x2c2)]??this[_0x27e7a2(0xda)]});if(this[_0x27e7a2(0x29d)])await this[_0x27e7a2(0x182)](this[_0x27e7a2(0x145)][_0x27e7a2(0x10a)](_0x2993a2))['catch']?.(()=>{});return _0x2993a2;}[_0x11d8ec(0xe1)](_0x3bf019){const _0x3b6017=_0x11d8ec;if(!_0x3bf019)return;return this[_0x3b6017(0x145)]['delete'](_0x3bf019),this[_0x3b6017(0x197)](_0x3bf019);}[_0x11d8ec(0x255)](){const _0x3fb99c=_0x11d8ec,_0x46bd60=Date[_0x3fb99c(0x194)](),_0x42b6cf=process[_0x3fb99c(0x134)](),_0x14adad=(_0x46bd60-this['_lastCpuAt'])*0x3e8;if(_0x14adad>=0x3d090){const _0x28c736=_0x42b6cf[_0x3fb99c(0x177)]-this[_0x3fb99c(0x261)][_0x3fb99c(0x177)]+(_0x42b6cf['system']-this['_lastCpuUsage']['system']),_0x4206fc=_0x545f03['cpus']()[_0x3fb99c(0x287)]||0x1;this['_lastCpuPct']=Math[_0x3fb99c(0x275)](0x64,Math[_0x3fb99c(0x112)](_0x28c736/(_0x14adad*_0x4206fc)*0x64)),this['_lastCpuWindowMs']=Math['round'](_0x14adad/0x3e8),this[_0x3fb99c(0x261)]=_0x42b6cf,this['_lastCpuAt']=_0x46bd60;}const _0x53b3c2=process['memoryUsage'](),_0xc722cb=this[_0x3fb99c(0x250)]['size'];let _0x3bcebf=0x0;if(_0xc722cb>0x0){const _0x313ebd=[this[_0x3fb99c(0x226)],...this['okdb'][_0x3fb99c(0x264)]?.[_0x3fb99c(0x17f)]?.()??[]];for(const _0x413565 of _0x313ebd){const _0x19e983=_0x413565[_0x3fb99c(0x1f9)]?.[_0x3fb99c(0x2d9)];if(_0x19e983)_0x3bcebf+=_0x19e983[_0x3fb99c(0x203)][_0x3fb99c(0x1a0)];}}let _0xcd776f=null;const _0x3b5f6a=_0xc722cb;if(_0x3b5f6a>0x0){let _0x41ad3f=0x0;for(const _0x55e970 of this['_threadStats'][_0x3fb99c(0x17f)]())_0x41ad3f+=_0x55e970[_0x3fb99c(0x2c6)]||0x0;_0xcd776f={'count':_0x3b5f6a,'heapUsed':_0x41ad3f,'sandbox':_0xc722cb,'busy':_0x3bcebf};}return{'rss':_0x53b3c2['rss'],'heapUsed':_0x53b3c2[_0x3fb99c(0x2c6)],'heapTotal':_0x53b3c2[_0x3fb99c(0x174)],'external':_0x53b3c2[_0x3fb99c(0xfe)],'cpuPct':this[_0x3fb99c(0xf7)],'cpuWindowMs':this['_lastCpuWindowMs']??null,'threads':_0xcd776f,'at':_0x46bd60};}[_0x11d8ec(0x228)](_0x1d6e7d,_0x3aff38){const _0x1c0028=_0x11d8ec;if(!_0x1d6e7d||!_0x3aff38)return;this[_0x1c0028(0x250)][_0x1c0028(0x2ce)](_0x1d6e7d,_0x3aff38);}[_0x11d8ec(0xfa)](_0x2121b4){const _0x5849bb=_0x11d8ec;this[_0x5849bb(0x250)][_0x5849bb(0x14d)](_0x2121b4);}['updateSupervisedChildStats'](_0x26ee8f,_0xad8ed3,_0x349739=undefined){const _0x546388=_0x11d8ec,_0x5bde09=this[_0x546388(0x145)]['get'](_0x26ee8f);if(!_0x5bde09||!_0xad8ed3)return;if(_0x349739!==undefined)_0x5bde09[_0x546388(0x1b7)]=_0x349739;_0x5bde09['stats']={'rss':_0xad8ed3[_0x546388(0x131)]??null,'heapUsed':_0xad8ed3[_0x546388(0x2c6)]??null,'heapTotal':_0xad8ed3['heapTotal']??null,'external':_0xad8ed3[_0x546388(0xfe)]??null,'cpuPct':_0xad8ed3[_0x546388(0x29a)]??null,'cpuWindowMs':_0xad8ed3[_0x546388(0x2c0)]??null,'threads':_0xad8ed3[_0x546388(0x2e0)]??null,'claims':_0xad8ed3[_0x546388(0x130)]??null,'envsOpen':_0xad8ed3[_0x546388(0x222)]??null,'at':Date[_0x546388(0x194)]()};}[_0x11d8ec(0x163)](){const _0x4f8d7d=_0x11d8ec,_0x1cfa35=Date['now'](),_0x470b0b=this[_0x4f8d7d(0x226)][_0x4f8d7d(0x147)]||{},_0x5f4b33=this[_0x4f8d7d(0x241)]||_0x4f8d7d(0x23f);return{'nodeKey':this[_0x4f8d7d(0x291)],'processKey':this['_selfKey'],'instanceId':this[_0x4f8d7d(0x1ee)],'pid':process['pid'],'startedAt':this['_processStartedAt'],'instanceStartedAt':this[_0x4f8d7d(0x21d)],'ppid':typeof process[_0x4f8d7d(0x123)]===_0x4f8d7d(0x18f)?process[_0x4f8d7d(0x123)]:null,'host':_0x545f03['hostname'](),'supervisorKey':this[_0x4f8d7d(0x230)]??null,'version':require$$6['version'],'kind':_0x5f4b33,'role':{'engines':!!_0x470b0b[_0x4f8d7d(0x2d8)],'processors':!!_0x470b0b[_0x4f8d7d(0x19c)],'compaction':_0x470b0b[_0x4f8d7d(0xff)],'http':_0x470b0b[_0x4f8d7d(0xe9)]},'listenAddr':this[_0x4f8d7d(0x1ab)]??null,'heartbeatAt':_0x1cfa35,'expiresAt':_0x1cfa35+_0xa10a98,'caps':this[_0x4f8d7d(0xd1)](_0x5f4b33,_0x470b0b),'lifecycle':{'state':_0x4f8d7d(0x155),'desiredVersionApplied':null},'meta':{...this['_ownMeta']},'processing':_0x470b0b['processors']?this['_buildProcessingFacet']():null,'engines':_0x470b0b[_0x4f8d7d(0x2d8)]?[...this[_0x4f8d7d(0x226)][_0x4f8d7d(0x210)]??[]]:null,'singletonClaims':this['_collectSingletonClaims'](),'stats':this[_0x4f8d7d(0x255)](),'writers':this[_0x4f8d7d(0x127)]()};}[_0x11d8ec(0x127)](){const _0x3ea611=_0x11d8ec,_0xad75d2={};try{for(const [_0x51cf0c,_0x49f490]of this[_0x3ea611(0x226)][_0x3ea611(0x264)]){try{const _0x39348d=_0x49f490[_0x3ea611(0x23d)]?.();if(!_0x39348d)continue;if(!_0x39348d[_0x3ea611(0x14f)]&&!_0x39348d[_0x3ea611(0x152)]&&!(_0x39348d[_0x3ea611(0x26b)]??0x0)&&!_0x39348d[_0x3ea611(0xac)])continue;_0xad75d2[_0x51cf0c]={'depth':_0x39348d[_0x3ea611(0x14f)],'oldestPendingMs':_0x39348d[_0x3ea611(0xf0)],'committed':_0x39348d[_0x3ea611(0x152)],'commitsPerSec':_0x39348d[_0x3ea611(0x1ef)],'commitP99Ms':_0x39348d[_0x3ea611(0x1af)],'parkedNow':_0x39348d[_0x3ea611(0x26b)]??0x0,'draining':!!_0x39348d[_0x3ea611(0xac)]};}catch{}}}catch{}return Object[_0x3ea611(0x1f2)](_0xad75d2)[_0x3ea611(0x287)]?_0xad75d2:null;}[_0x11d8ec(0xb8)](){const _0x40f2f5=_0x11d8ec,_0x3d3e00=process['pid'],_0x49a28c=Date[_0x40f2f5(0x194)](),_0x424125=_0x2accc1=>{const _0x7b8925=_0x40f2f5;if(!_0x2accc1)return[];const _0x30952a=[];try{for(const {id:_0x477d4f,entry:_0x5e1f22}of _0x2accc1[_0x7b8925(0x9b)]()){if(_0x5e1f22?.['holder']?.[_0x7b8925(0x9d)]!==_0x3d3e00)continue;const _0x129fd2=_0x5e1f22[_0x7b8925(0x249)]??_0x5e1f22[_0x7b8925(0x253)]??0x0;if(_0x129fd2+(_0x5e1f22[_0x7b8925(0x180)]??0x0)<_0x49a28c)continue;_0x30952a[_0x7b8925(0x2a5)](_0x477d4f);}}catch{}return _0x30952a;},_0x17a146=_0x424125(this[_0x40f2f5(0xc4)]('compact')),_0x1a33b8=_0x424125(this['_singletonLock'](_0x40f2f5(0x1c0)));if(!_0x17a146[_0x40f2f5(0x287)]&&!_0x1a33b8[_0x40f2f5(0x287)])return null;return{'compact':_0x17a146,'replicate':_0x1a33b8};}[_0x11d8ec(0xc4)](_0x18ffa3){const _0x3f4587=_0x11d8ec;if(!this[_0x3f4587(0x226)]?.[_0x3f4587(0x154)])return null;if(!this['_singletonLocks'])this[_0x3f4587(0x139)]=new Map();let _0x5b139d=this[_0x3f4587(0x139)]['get'](_0x18ffa3);if(!_0x5b139d)try{_0x5b139d=new _0x5e0748(this[_0x3f4587(0x226)][_0x3f4587(0x154)],{'namespace':_0x18ffa3}),this['_singletonLocks'][_0x3f4587(0x2ce)](_0x18ffa3,_0x5b139d);}catch{return null;}return _0x5b139d;}[_0x11d8ec(0x2dd)](){const _0x472288=_0x11d8ec,_0x2c72b5=[];try{for(const [_0x116d6,_0x4fd51a]of this[_0x472288(0x226)][_0x472288(0x264)]){if(_0x116d6['startsWith']('~'))continue;for(const _0x517ebd of _0x4fd51a[_0x472288(0x28d)][_0x472288(0xa7)]())_0x2c72b5[_0x472288(0x2a5)]({..._0x517ebd,'env':_0x116d6});}}catch{}return{'participate':this['okdb'][_0x472288(0x19c)]?.['_participate']??![],'processors':_0x2c72b5};}[_0x11d8ec(0x2cf)](){const _0x1ad4d1=_0x11d8ec;if(this[_0x1ad4d1(0x2db)])return!![];const _0x92a90e=this[_0x1ad4d1(0x226)][_0x1ad4d1(0x154)];if(!_0x92a90e)return![];return this[_0x1ad4d1(0x2db)]=_0x92a90e[_0x1ad4d1(0x271)](_0x4abebd,{'dupSort':![]}),this['_cmd']=_0x92a90e[_0x1ad4d1(0x271)](_0x157dab,{'dupSort':![]}),!![];}async['_migrateVocab'](){const _0xe1b4c5=_0x11d8ec;if(!this[_0xe1b4c5(0x2cf)]())return;const _0x23e2d9=_0xe1b4c5(0x21a),_0x2301cb=0x1,_0xa86a20=this[_0xe1b4c5(0x2db)][_0xe1b4c5(0x10a)](_0x23e2d9)??0x0;if(_0xa86a20>=_0x2301cb)return;const _0x478fcf=_0x42ceec=>{const _0x5f1387=_0xe1b4c5;if(_0x42ceec==='worker')return _0x5f1387(0x132);if(_0x42ceec===_0x5f1387(0x13f))return'fanout';return _0x42ceec;};await this[_0xe1b4c5(0x226)][_0xe1b4c5(0x125)]['_writer'][_0xe1b4c5(0x1f1)](()=>{const _0x130c6a=_0xe1b4c5;for(const _0x52e582 of[_0x130c6a(0x1e7),'procmodeack/']){for(const {key:_0x225bbb,value:_0x483cac}of this[_0x130c6a(0x2db)]['getRange']({'start':_0x52e582,'end':_0x52e582+'\xff'})){if(typeof _0x225bbb!=='string'||!_0x225bbb[_0x130c6a(0x181)](_0x52e582))break;const _0x1d2c9a=_0x478fcf(_0x483cac[_0x130c6a(0x2d2)]);if(_0x1d2c9a!==_0x483cac['mode'])this[_0x130c6a(0x2db)][_0x130c6a(0x20d)](_0x225bbb,{..._0x483cac,'mode':_0x1d2c9a});}}this['_desired'][_0x130c6a(0x20d)](_0x23e2d9,_0x2301cb);});}[_0x11d8ec(0x10f)](){const _0x21e9fb=_0x11d8ec;return!!this[_0x21e9fb(0x2db)];}[_0x11d8ec(0x2cc)](_0x17140d,_0x4a2a3f){const _0xaac968=_0x11d8ec;if(!this[_0xaac968(0x2cf)]())return null;const _0x3622a5=_0x17140d+'/'+_0x4a2a3f;return this[_0xaac968(0x1e6)](),this[_0xaac968(0xa3)][_0xaac968(0x10a)](_0x3622a5)??this[_0xaac968(0x2db)]['get'](_0x3622a5)??null;}[_0x11d8ec(0x1e6)](){const _0x3ba584=_0x11d8ec;if(!_0x2d0451)return;try{this[_0x3ba584(0x226)]['_systemEnv']?.['db']?.[_0x3ba584(0xc1)]?.();}catch{}}async[_0x11d8ec(0x281)](_0x506c98,_0x31900f,_0x336b20){const _0x2ed8ab=_0x11d8ec;if(!this['_ensureDesired']())return null;const _0x8ab54f=_0x506c98+'/'+_0x31900f;this['_refreshDesiredSnapshot']();const _0x19ef50=this[_0x2ed8ab(0xa3)]['get'](_0x8ab54f)??this[_0x2ed8ab(0x2db)][_0x2ed8ab(0x10a)](_0x8ab54f)??{'version':0x0},_0x314183=(_0x19ef50[_0x2ed8ab(0x172)]||0x0)+0x1,_0xa20878={..._0x19ef50,..._0x336b20,'version':_0x314183,'updatedAt':Date['now']()};this[_0x2ed8ab(0xa3)]['set'](_0x8ab54f,_0xa20878);try{await this[_0x2ed8ab(0x226)][_0x2ed8ab(0x125)][_0x2ed8ab(0x2b0)][_0x2ed8ab(0x1f1)](()=>{const _0x435fc4=_0x2ed8ab;this[_0x435fc4(0x2db)][_0x435fc4(0x20d)](_0x8ab54f,_0xa20878);});}finally{if(this[_0x2ed8ab(0xa3)][_0x2ed8ab(0x10a)](_0x8ab54f)===_0xa20878)this[_0x2ed8ab(0xa3)]['delete'](_0x8ab54f);}return _0x314183;}[_0x11d8ec(0x16b)](_0xab0c36){const _0x5c944c=_0x11d8ec;if(!this[_0x5c944c(0x2cf)]())return[];this[_0x5c944c(0x1e6)]();const _0x33dcec=_0xab0c36+'/',_0x41aea5=[];for(const {key:_0x4a6c6c,value:_0x138224}of this[_0x5c944c(0x2db)][_0x5c944c(0x1bb)]({'start':_0x33dcec,'end':_0x33dcec+'\xff'})){if(typeof _0x4a6c6c!=='string'||!_0x4a6c6c[_0x5c944c(0x181)](_0x33dcec))break;_0x41aea5[_0x5c944c(0x2a5)]({'key':_0x4a6c6c[_0x5c944c(0x1fd)](_0x33dcec['length']),'value':_0x138224});}return _0x41aea5;}[_0x11d8ec(0x1d8)](_0x7d46e2){const _0xa1c814=_0x11d8ec;if(!this[_0xa1c814(0x2cf)]())return null;return this[_0xa1c814(0x1c8)][_0xa1c814(0x10a)](_0x7d46e2)??null;}async['bumpCmd'](_0x1e16d6,_0x3efe6f,_0x509473={}){const _0x239b83=_0x11d8ec;if(!this[_0x239b83(0x2cf)]())return null;let _0x399f44;return await this[_0x239b83(0x226)][_0x239b83(0x125)]['_writer'][_0x239b83(0x1f1)](()=>{const _0x40fcb6=_0x239b83,_0x4e4591=this['_cmd'][_0x40fcb6(0x10a)](_0x1e16d6)||{'epoch':0x0};_0x399f44=(_0x4e4591[_0x40fcb6(0x111)]||0x0)+0x1,this['_cmd'][_0x40fcb6(0x20d)](_0x1e16d6,{..._0x4e4591,..._0x509473,'cmd':_0x3efe6f,'epoch':_0x399f44,'updatedAt':Date['now']()});}),_0x399f44;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x487e6d,'nodeKey':_0x37eb2f,'logicalKey':_0x975d42,'slotKey':_0x224dd0,'PROCESS_ENV':_0x516b59,'NODE_TYPE':_0x2a9114},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x1d1c1f=_0x18991b;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x6387b2=require$$0$4,{EVENTS:_0x1471ef,CHANGE_ACTIONS:_0x7ba888}=requireOkdbEnums(),{LOOP:_0x329e04}=requireOkdbLoopMonitor(),_0x368fd1=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x548e24=0x5,_0x38825e=0x2710;class _0x31b6f3 extends _0x6387b2{constructor(_0x23cf65,_0x53e677={}){const _0x4c17b2=_0x4fa3;super(),this[_0x4c17b2(0x226)]=_0x23cf65,this[_0x4c17b2(0x28e)]=_0x53e677[_0x4c17b2(0xc5)]??_0x368fd1,this['_flushDebounce']=_0x53e677['flushDebounce']??_0x548e24,this[_0x4c17b2(0x2bc)]=_0x53e677['dedupeMax']??_0x38825e,this['_started']=![],this[_0x4c17b2(0xa4)]=new Map(),this[_0x4c17b2(0x214)]=new Map(),this[_0x4c17b2(0xa6)]=new Map(),this['_flushTimer']=null,this['_draining']=![],this['_seen']=new Set(),this[_0x4c17b2(0x1d1)]=new Set(),this[_0x4c17b2(0x1f8)]=_0x311cfb=>this[_0x4c17b2(0x245)](_0x311cfb),this[_0x4c17b2(0x18d)]=_0x129af1=>this[_0x4c17b2(0x9f)](_0x129af1),this[_0x4c17b2(0x28a)]=_0x5771db=>this[_0x4c17b2(0x260)](_0x5771db),this['_onStop']=()=>this[_0x4c17b2(0x1a8)]();}[_0x1d1c1f(0x269)](){const _0x3b5d85=_0x1d1c1f;if(this[_0x3b5d85(0x220)])return;this[_0x3b5d85(0x220)]=!![];for(const [_0x372c35,_0x545825]of this[_0x3b5d85(0x226)]['_envs']){if(_0x372c35[_0x3b5d85(0x181)]('~'))continue;try{_0x545825[_0x3b5d85(0x298)]();}catch{}}for(const [_0x3df0c1,_0x17234f]of this[_0x3b5d85(0x226)][_0x3b5d85(0x264)]){if(_0x3df0c1['startsWith']('~'))continue;try{this['_baselines']['set'](_0x3df0c1,_0x17234f[_0x3b5d85(0x2bf)]()||0x0);}catch{}}const {events:_0x3aa828}=this['okdb'];_0x3aa828['on'](_0x1471ef['ITEM_PENDING'],this['_onPending']),_0x3aa828['on'](_0x1471ef[_0x3b5d85(0x1e4)],this[_0x3b5d85(0x1f8)]),_0x3aa828['on'](_0x1471ef[_0x3b5d85(0x2b9)],this['_onItem']),_0x3aa828['on'](_0x1471ef[_0x3b5d85(0x14b)],this[_0x3b5d85(0x1f8)]),_0x3aa828['on'](_0x1471ef[_0x3b5d85(0x121)],this[_0x3b5d85(0x28a)]),_0x3aa828[_0x3b5d85(0xce)](_0x1471ef[_0x3b5d85(0xd5)],this[_0x3b5d85(0xd7)]);}[_0x1d1c1f(0x1a8)](){const _0x55b0b8=_0x1d1c1f;if(!this[_0x55b0b8(0x220)])return;this[_0x55b0b8(0x220)]=![];const {events:_0x362ed1}=this['okdb'];_0x362ed1[_0x55b0b8(0x149)](_0x1471ef[_0x55b0b8(0x19a)],this[_0x55b0b8(0x18d)]),_0x362ed1['off'](_0x1471ef[_0x55b0b8(0x1e4)],this['_onItem']),_0x362ed1[_0x55b0b8(0x149)](_0x1471ef['ITEM_UPDATE'],this[_0x55b0b8(0x1f8)]),_0x362ed1[_0x55b0b8(0x149)](_0x1471ef[_0x55b0b8(0x14b)],this[_0x55b0b8(0x1f8)]),_0x362ed1[_0x55b0b8(0x149)](_0x1471ef[_0x55b0b8(0x121)],this[_0x55b0b8(0x28a)]);try{_0x362ed1[_0x55b0b8(0x149)](_0x1471ef[_0x55b0b8(0xd5)],this[_0x55b0b8(0xd7)]);}catch{}this['_flushTimer']&&(clearTimeout(this['_flushTimer']),this[_0x55b0b8(0x263)]=null),this[_0x55b0b8(0xa6)]['clear'](),this[_0x55b0b8(0xa4)]['clear'](),this[_0x55b0b8(0x214)][_0x55b0b8(0x118)](),this[_0x55b0b8(0x13a)][_0x55b0b8(0x118)](),this[_0x55b0b8(0x1d1)]['clear']();}[_0x1d1c1f(0x11f)](_0xacf237,_0x5d9a9f,_0x2cd3da,_0x3c4d2a){return _0xacf237+'\x00'+_0x5d9a9f+'\x00'+_0x2cd3da+'\x00'+_0x3c4d2a;}[_0x1d1c1f(0xe5)](_0x41a68c,_0x520d74,_0x5317e2,_0x3431b6){const _0x5ead78=_0x1d1c1f,_0x437169=this[_0x5ead78(0x11f)](_0x41a68c,_0x520d74,_0x5317e2,_0x3431b6);if(this[_0x5ead78(0x13a)]['has'](_0x437169))return![];this[_0x5ead78(0x13a)][_0x5ead78(0x9e)](_0x437169);if(this[_0x5ead78(0x13a)]['size']>this['_dedupeMax']){const _0x5290d3=this[_0x5ead78(0x13a)][_0x5ead78(0x17f)]()[_0x5ead78(0x217)]()['value'];this[_0x5ead78(0x13a)]['delete'](_0x5290d3);}return!![];}[_0x1d1c1f(0x9f)](_0x2abe2b){const _0x36f1b3=_0x1d1c1f;if(!this['_started']||!_0x2abe2b)return;const {env:_0xc9490f,type:_0x10035f,key:_0x304875,clock:_0x1af441}=_0x2abe2b;if(_0xc9490f==null||_0x10035f==null||_0x304875==null)return;if(typeof _0xc9490f===_0x36f1b3(0x252)&&_0xc9490f[_0x36f1b3(0x181)]('~'))return;if(typeof _0x10035f===_0x36f1b3(0x252)&&_0x10035f[_0x36f1b3(0x181)]('~'))return;this[_0x36f1b3(0x1d1)]['add'](this[_0x36f1b3(0x11f)](_0xc9490f,_0x10035f,_0x304875,_0x1af441)),this[_0x36f1b3(0x1d1)][_0x36f1b3(0x2ca)]>this['_dedupeMax']&&this[_0x36f1b3(0x1d1)]['delete'](this[_0x36f1b3(0x1d1)][_0x36f1b3(0x17f)]()['next']()[_0x36f1b3(0x1c6)]);}[_0x1d1c1f(0x245)](_0x47dbeb){const _0x2e01fe=_0x1d1c1f;if(!this[_0x2e01fe(0x220)]||!_0x47dbeb)return;const {env:_0x5c6d7a,type:_0x389047,key:_0x47c134,clock:_0x497451,origin:_0x149102,action:_0x2ed6ce,newValue:_0x4f175b,oldValue:_0x17ed2a}=_0x47dbeb;if(_0x5c6d7a==null||_0x389047==null||_0x47c134==null)return;if(typeof _0x5c6d7a===_0x2e01fe(0x252)&&_0x5c6d7a[_0x2e01fe(0x181)]('~'))return;if(typeof _0x389047===_0x2e01fe(0x252)&&_0x389047[_0x2e01fe(0x181)]('~'))return;this['_pendingLocal'][_0x2e01fe(0x14d)](this[_0x2e01fe(0x11f)](_0x5c6d7a,_0x389047,_0x47c134,_0x497451));if(!this[_0x2e01fe(0xe5)](_0x5c6d7a,_0x389047,_0x47c134,_0x497451))return;const _0x1b639a=_0x2ed6ce===_0x7ba888[_0x2e01fe(0x1fc)]?_0x2e01fe(0x1a5):_0x2e01fe(0x20d);this[_0x2e01fe(0x10d)]('change',{'env':_0x5c6d7a,'type':_0x389047,'key':_0x47c134,'op':_0x1b639a,'clock':_0x497451,'origin':_0x149102,'value':_0x1b639a==='remove'?null:_0x4f175b,'prevValue':_0x17ed2a});}['_handlePoke'](_0x3cfec6){const _0x310477=_0x1d1c1f;if(!this[_0x310477(0x220)])return;if(!_0x3cfec6||typeof _0x3cfec6[_0x310477(0x292)]!==_0x310477(0x252)||typeof _0x3cfec6[_0x310477(0x213)]!=='string')return;const {env:_0x1536ab,type:_0x1e0410}=_0x3cfec6;if(_0x1536ab[_0x310477(0x181)]('~')||_0x1e0410[_0x310477(0x181)]('~'))return;this[_0x310477(0xa6)][_0x310477(0x2ce)](_0x1536ab+'\x00'+_0x1e0410,{'env':_0x1536ab,'type':_0x1e0410}),this[_0x310477(0x218)]();}[_0x1d1c1f(0x218)](){const _0x31b432=_0x1d1c1f;if(this[_0x31b432(0x263)])return;const _0x34c5a5=()=>{const _0x3742f8=_0x31b432;this['_flushTimer']=null,this[_0x3742f8(0x120)]()[_0x3742f8(0x1ad)](()=>{});};this[_0x31b432(0x263)]=setTimeout(_0x34c5a5,this[_0x31b432(0x135)]>0x0?this[_0x31b432(0x135)]:0x0);}async[_0x1d1c1f(0x120)](){const _0x3e0c28=_0x1d1c1f;if(this[_0x3e0c28(0x259)]){this[_0x3e0c28(0x218)]();return;}this['_draining']=!![];try{const _0x51cb03=[...this[_0x3e0c28(0xa6)][_0x3e0c28(0x17f)]()];this['_pending'][_0x3e0c28(0x118)]();let _0x2135a9=![];for(const {env:_0x523523,type:_0x2f9957}of _0x51cb03){try{const _0x4f6d5b=await this[_0x3e0c28(0xdc)](_0x523523,_0x2f9957);if(_0x4f6d5b)_0x2135a9=!![];}catch{this[_0x3e0c28(0xa6)][_0x3e0c28(0x2ce)](_0x523523+'\x00'+_0x2f9957,{'env':_0x523523,'type':_0x2f9957}),_0x2135a9=!![];}}if(_0x2135a9||this[_0x3e0c28(0xa6)][_0x3e0c28(0x2ca)]>0x0)this[_0x3e0c28(0x218)]();}finally{this[_0x3e0c28(0x259)]=![];}}async['_drainOne'](_0x3d701c,_0x42081e){const _0x4a8f75=_0x1d1c1f,_0x46c772=await this['okdb']['_openEnvLazy'](_0x3d701c),_0x2cab7b=_0x3d701c+'\x00'+_0x42081e;!this['_cursors']['has'](_0x2cab7b)&&(!this[_0x4a8f75(0x214)]['has'](_0x3d701c)&&(_0x46c772[_0x4a8f75(0x298)](),this[_0x4a8f75(0x214)][_0x4a8f75(0x2ce)](_0x3d701c,_0x46c772['getClock']()||0x0)),this['_cursors'][_0x4a8f75(0x2ce)](_0x2cab7b,this['_baselines'][_0x4a8f75(0x10a)](_0x3d701c)));const _0x4e0696=this[_0x4a8f75(0xa4)][_0x4a8f75(0x10a)](_0x2cab7b),_0x41ac52=_0x46c772['getClock'](_0x42081e)||0x0;if(_0x41ac52<=_0x4e0696)return![];const _0x5b92d9=_0x4e0696+this['_quantum'],_0x1ec16e=Math[_0x4a8f75(0x275)](_0x41ac52,_0x5b92d9),_0x1897c5=_0x329e04[_0x4a8f75(0x11b)]?_0x329e04[_0x4a8f75(0x194)]():0x0,_0x10f710=Array[_0x4a8f75(0x256)](_0x46c772['getChanges'](_0x42081e,_0x4e0696+0x1,_0x1ec16e));let _0x463620=_0x4e0696;for(const _0x3207e9 of _0x10f710){const {clock:_0x16c027,key:_0x2368bf,action:_0x276f6c,origin:_0x400cba}=_0x3207e9;if(_0x16c027>_0x463620)_0x463620=_0x16c027;if(_0x2368bf==null)continue;if(this[_0x4a8f75(0x1d1)]['has'](this['_dedupeKey'](_0x3d701c,_0x42081e,_0x2368bf,_0x16c027)))continue;if(!this['_markSeen'](_0x3d701c,_0x42081e,_0x2368bf,_0x16c027))continue;let _0x3c0c0b,_0x3b3aa5;if(_0x276f6c===_0x7ba888['REMOVE'])_0x3c0c0b=_0x4a8f75(0x1a5),_0x3b3aa5=null;else{const _0x213401=_0x46c772[_0x4a8f75(0x10a)](_0x42081e,_0x2368bf);_0x213401==null?(_0x3c0c0b=_0x4a8f75(0x1a5),_0x3b3aa5=null):(_0x3c0c0b=_0x4a8f75(0x20d),_0x3b3aa5=_0x213401);}this[_0x4a8f75(0x10d)](_0x4a8f75(0xd9),{'env':_0x3d701c,'type':_0x42081e,'key':_0x2368bf,'op':_0x3c0c0b,'clock':_0x16c027,'origin':_0x400cba,'value':_0x3b3aa5});}if(_0x329e04['enabled'])_0x329e04[_0x4a8f75(0x1a4)]('feed:'+_0x3d701c+':'+_0x42081e,_0x329e04[_0x4a8f75(0x194)]()-_0x1897c5,'n='+_0x10f710['length']);return this[_0x4a8f75(0xa4)][_0x4a8f75(0x2ce)](_0x2cab7b,Math[_0x4a8f75(0x2c5)](_0x463620,_0x1ec16e)),_0x46c772[_0x4a8f75(0x2bf)](_0x42081e)>_0x1ec16e;}[_0x1d1c1f(0x20b)](){const _0x39b2d8=_0x1d1c1f;return{'started':this['_started'],'quantum':this[_0x39b2d8(0x28e)],'flushDebounce':this[_0x39b2d8(0x135)],'cursors':Object['fromEntries']([...this[_0x39b2d8(0xa4)][_0x39b2d8(0x206)]()][_0x39b2d8(0x284)](([_0x224204,_0xf493c7])=>[_0x224204[_0x39b2d8(0xf5)]('\x00',':'),_0xf493c7])),'pending':this[_0x39b2d8(0xa6)][_0x39b2d8(0x2ca)],'seen':this[_0x39b2d8(0x13a)][_0x39b2d8(0x2ca)]};}}return _0x31b6f3[_0x1d1c1f(0xc8)]=_0x368fd1,okdbChangefeed={'OKDBChangefeed':_0x31b6f3},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x3fcfcf=_0x18991b;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x3d7660=require$$1$1,_0x506f1b=require$$1,{EVENTS:_0x1f0274}=requireOkdbEnums(),_0x4aec30=require$$0$3,{slotKey:_0x4893b0}=requireOkdbProcessRegistry(),_0x5891b4=Number(process.env.OKDB_CLUSTER_RESPAWN_BACKOFF_MS)||0xfa,_0x9b299e=0xfa0,_0x53f29c=0x5,_0x3dd582=0x2710,_0x3d6efd=0xbb8,_0x2c7bbc=0x7d0,_0x3dba24=_0x3fcfcf(0x26d),_0x574153=_0x3fcfcf(0x22a),_0x165975='log',_0x5212e6=_0x3fcfcf(0xe6),_0x3adf04=[_0x1f0274['VIEW_PROGRESS'],_0x1f0274[_0x3fcfcf(0xb4)],_0x1f0274[_0x3fcfcf(0xbb)],_0x1f0274[_0x3fcfcf(0x233)],_0x1f0274[_0x3fcfcf(0x1dd)],_0x1f0274[_0x3fcfcf(0x1f6)],_0x1f0274['INDEX_RESET'],_0x1f0274[_0x3fcfcf(0x26c)],_0x3fcfcf(0x18a),_0x3fcfcf(0x1ff),_0x3fcfcf(0x189),_0x3fcfcf(0x12f),'processor:resumed','processor:retry'],_0x4eb093=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0,_0x3ed741=0x64;function _0x4c050b(_0x1860c9){const _0x3944f1=_0x3fcfcf;if(!_0x1860c9)return _0x3944f1(0x2cd);const _0x3b6d1a=(_0x1860c9[_0x3944f1(0x19c)]||[])[_0x3944f1(0x284)](_0x254638=>[_0x254638[_0x3944f1(0x292)],_0x254638['id'],_0x254638[_0x3944f1(0x2d2)],_0x254638[_0x3944f1(0x262)],!!_0x254638[_0x3944f1(0x20c)],!!_0x254638[_0x3944f1(0x2ab)],!!_0x254638['claimGated'],_0x254638['heldBy']?.[_0x3944f1(0x9d)]??null,_0x254638[_0x3944f1(0x1d4)]?String(_0x254638[_0x3944f1(0x1d4)]?.[_0x3944f1(0x295)]??_0x254638[_0x3944f1(0x1d4)]):null]);return JSON[_0x3944f1(0x151)]([!!_0x1860c9[_0x3944f1(0x2be)],_0x3b6d1a]);}function _0xbc61d8({workers:_0x31338a,makeOkdb:_0x1f5e22,port:_0x26f474,primaryOkdb:_0x163842,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0x48509b=_0x3fcfcf;if(_0x3d7660[_0x48509b(0x136)])return childEntry&&_0x3d7660[_0x48509b(0x1f0)]({'exec':_0x506f1b[_0x48509b(0x296)](__dirname,_0x48509b(0x166)),'args':[],'execArgv':((()=>{const _0xe42120=_0x48509b,_0x5ae312=[];for(let _0x8d6a67=0x0;_0x8d6a67<process[_0xe42120(0x26f)][_0xe42120(0x287)];_0x8d6a67++){const _0x1d2879=process['execArgv'][_0x8d6a67];if(_0x1d2879['startsWith'](_0xe42120(0x162))||_0x1d2879['startsWith'](_0xe42120(0xfb))||_0x1d2879[_0xe42120(0x181)](_0xe42120(0x15a)))continue;if(_0x1d2879==='-e'||_0x1d2879===_0xe42120(0x237)||_0x1d2879==='-p'||_0x1d2879===_0xe42120(0x208)){_0x8d6a67++;continue;}_0x5ae312[_0xe42120(0x2a5)](_0x1d2879);}return _0x5ae312;})())}),_0x5d079b({'workers':_0x31338a,'port':_0x26f474,'primaryOkdb':_0x163842,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x26f474});return _0x52ea10({'makeOkdb':_0x1f5e22,'port':_0x26f474});}function _0x5d079b({workers:_0x501b2a,port:_0x5d1f4d,primaryOkdb:_0x57cf65,workerEnv:_0x1d9922,workerRole:_0x49827a,listenAddr:_0x4df01a}){const _0xfa681=_0x3fcfcf,_0x34f06c=new Map(),_0x1e2cff=new Map();let _0x4d065b=![];const _0x5bd554=_0x5cc583=>_0x5cc583?.[_0xfa681(0x27d)],_0x294672=_0x4c93b4=>{const _0x5601ff=_0xfa681,_0x5d7bc4=_0x3d7660['fork']({...process.env,..._0x1d9922||{},'OKDB_CLUSTER_SLOT':String(_0x4c93b4)});return _0x5d7bc4['__okdbSlot']=_0x4c93b4,_0x34f06c['set'](_0x5d7bc4[_0x5601ff(0x2d4)][_0x5601ff(0x9d)],{'worker':_0x5d7bc4,'startedAt':Date[_0x5601ff(0x194)](),'slot':_0x4c93b4}),_0x5d7bc4['on'](_0x5601ff(0x1d4),_0x4cb037=>{const _0x15c143=_0x5601ff;console[_0x15c143(0x2b5)](_0x15c143(0x268)+_0x5d7bc4['process'][_0x15c143(0x9d)]+_0x15c143(0x2b4)+(_0x4cb037?.['message']??_0x4cb037));}),_0x5d7bc4['on'](_0x5601ff(0x1e1),()=>_0x42f49f()),_0x5d7bc4;},_0x174f74=_0x3a6036=>{const _0x4069dd=_0xfa681;for(const {worker:_0x117526}of _0x34f06c[_0x4069dd(0x17f)]()){if(_0x117526[_0x4069dd(0x1cc)]()||!_0x117526[_0x4069dd(0x283)]())continue;try{_0x117526[_0x4069dd(0x21f)](_0x3a6036);}catch{}}};_0x57cf65?.[_0xfa681(0x27c)]?.({'kind':'primary','listenAddr':_0x4df01a})[_0xfa681(0x1ad)](()=>{}),_0x57cf65?.['processes']?.[_0xfa681(0x28c)]?.({'workersConfigured':_0x501b2a});const _0x20fc7a={'engines':!![],'processors':!![],'compaction':!![],..._0x49827a,'http':!![]},_0x42f49f=()=>{const _0x3d83c8=_0xfa681,_0x1971e9=_0x57cf65?.[_0x3d83c8(0x1a6)];if(!_0x1971e9||!_0x1971e9['_isWriter'])return;const _0x4eed88=_0x1971e9[_0x3d83c8(0x279)];for(const {worker:_0x324725,startedAt:_0x430cf2,slot:_0x3983f4,stats:_0x324d60,processing:_0x18c2a4}of _0x34f06c[_0x3d83c8(0x17f)]()){if(_0x324725['isDead']())continue;const _0x47b25a=_0x1971e9['hasDesired']?.()&&_0x1971e9['getDesired'](_0x3d83c8(0x290),_0x1c6c19(_0x3983f4))?.[_0x3d83c8(0x17e)]===!![];_0x1971e9['publishChildRow']({'pid':_0x324725[_0x3d83c8(0x2d4)]['pid'],'startedAt':_0x430cf2,'kind':'http-server','supervisorKey':_0x4eed88,'slot':_0x3983f4,'slotKey':_0x1c6c19(_0x3983f4),'role':_0x20fc7a,'listenAddr':_0x4df01a,'lifecycle':_0x47b25a?_0x3d83c8(0x113):'running','processing':_0x18c2a4??null,'stats':_0x324d60??null})['catch'](()=>{});}},_0x1c6c19=_0x374e52=>_0x4893b0('cluster:'+_0x5d1f4d,_0x374e52),_0x170ae0=_0x56af34=>{const _0x57d208=_0xfa681,_0x245faa=_0x57cf65?.[_0x57d208(0x1a6)];if(!_0x245faa?.[_0x57d208(0x10f)]?.())return![];return _0x245faa[_0x57d208(0x2cc)](_0x57d208(0x290),_0x1c6c19(_0x56af34))?.[_0x57d208(0x17e)]===!![];};for(let _0x2a8b3a=0x0;_0x2a8b3a<_0x501b2a;_0x2a8b3a++){const _0x4b2472=_0x170ae0(_0x2a8b3a);_0x1e2cff['set'](_0x2a8b3a,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x4b2472,'respawnTimer':null}),_0x4b2472?console['log'](_0xfa681(0x159)+_0x2a8b3a+_0xfa681(0x1d0)):_0x294672(_0x2a8b3a);}const _0x57cfbe=()=>{const _0x13df9c=_0xfa681,_0x131b5b=_0x57cf65?.[_0x13df9c(0x1a6)];if(!_0x131b5b?.[_0x13df9c(0x29d)]||!_0x131b5b[_0x13df9c(0x10f)]?.())return;for(const [_0x22093c,_0x3ea95d]of _0x1e2cff[_0x13df9c(0x206)]()){const _0x1ea8ca=_0x131b5b[_0x13df9c(0x2cc)](_0x13df9c(0x290),_0x1c6c19(_0x22093c)),_0x5f5b64=_0x1ea8ca?.['decommission']===!![],_0x16b307=_0x1ea8ca?.['kill']===!![];if(_0x5f5b64&&!_0x3ea95d[_0x13df9c(0x247)]){_0x3ea95d['dead']=!![];_0x3ea95d[_0x13df9c(0x184)]&&(clearTimeout(_0x3ea95d[_0x13df9c(0x184)]),_0x3ea95d[_0x13df9c(0x184)]=null);for(const {worker:_0x116fcf}of _0x34f06c[_0x13df9c(0x17f)]()){if(_0x5bd554(_0x116fcf)!==_0x22093c||_0x116fcf[_0x13df9c(0x1cc)]())continue;try{if(_0x16b307)_0x116fcf[_0x13df9c(0x2d4)]['kill']('SIGKILL');else _0x116fcf[_0x13df9c(0x283)]()&&_0x116fcf[_0x13df9c(0x27b)]();}catch{}}console[_0x13df9c(0x2b5)]('[okdb-cluster]\x20'+(_0x16b307?_0x13df9c(0x150):_0x13df9c(0x235))+_0x13df9c(0x141)+_0x22093c+_0x13df9c(0xcf));}else{if(!_0x5f5b64&&_0x3ea95d[_0x13df9c(0x247)]&&_0x1ea8ca){_0x3ea95d[_0x13df9c(0x247)]=![],_0x3ea95d[_0x13df9c(0x183)]=[],_0x3ea95d[_0x13df9c(0xc9)]=0x0;const _0x42c102=[..._0x34f06c[_0x13df9c(0x17f)]()][_0x13df9c(0x2a1)](({worker:_0x3bd0d6})=>_0x5bd554(_0x3bd0d6)===_0x22093c&&!_0x3bd0d6[_0x13df9c(0x1cc)]());!_0x42c102&&!_0x4d065b&&(_0x294672(_0x22093c),console[_0x13df9c(0x2b5)]('[okdb-cluster]\x20recommissioned\x20worker\x20slot='+_0x22093c));}}}},_0x571ef0=()=>{try{_0x57cfbe();}catch{}};_0x57cf65?.[_0xfa681(0x11a)]?.['on']?.(_0x1f0274['SYSTEM_PROC'],_0x571ef0);const _0x4ae39f=[];if(_0x57cf65?.['events']?.['on'])for(const _0x49650e of _0x3adf04){const _0x5b4053=_0x48c20e=>{_0x174f74({[_0x3dba24]:_0x574153,'event':_0x49650e,'data':_0x48c20e??{}});};_0x57cf65[_0xfa681(0x11a)]['on'](_0x49650e,_0x5b4053),_0x4ae39f[_0xfa681(0x2a5)]({'event':_0x49650e,'handler':_0x5b4053});}const _0x30185d=setInterval(()=>{_0x57cfbe(),_0x42f49f();},_0x4eb093);_0x30185d['unref']?.();const _0x20215d=(_0x62f5c,_0x1f6301)=>{const _0x4a37f6=_0xfa681;if(!_0x1f6301||typeof _0x1f6301!==_0x4a37f6(0x193)||_0x1f6301[_0x3dba24]!==_0x165975)return;if(!_0x57cf65?.[_0x4a37f6(0x2b5)]?.['ingest'])return;const _0x47c0de=_0x1f6301[_0x4a37f6(0xe7)]||{};_0x57cf65[_0x4a37f6(0x2b5)][_0x4a37f6(0xb2)]({..._0x47c0de,'msg':'[w'+_0x1f6301[_0x4a37f6(0x290)]+']\x20'+(_0x47c0de[_0x4a37f6(0x282)]??''),'meta':{..._0x47c0de[_0x4a37f6(0x258)]||{},'worker':_0x1f6301[_0x4a37f6(0x290)],'workerPid':_0x1f6301['pid']}});};_0x3d7660['on']('message',_0x20215d);const _0x1933d6=(_0x1c2fec,_0x455d39)=>{const _0x49939a=_0xfa681;if(!_0x455d39||typeof _0x455d39!=='object'||_0x455d39[_0x3dba24]!==_0x5212e6)return;const _0x59c7a6=_0x34f06c[_0x49939a(0x10a)](_0x1c2fec['process'][_0x49939a(0x9d)]);if(_0x59c7a6){_0x59c7a6[_0x49939a(0xe6)]={..._0x455d39[_0x49939a(0xe6)],'at':Date[_0x49939a(0x194)]()};if(_0x455d39[_0x49939a(0x1b7)]!==undefined){const _0x4ac311=_0x4c050b(_0x455d39[_0x49939a(0x1b7)]);_0x4ac311!==_0x59c7a6[_0x49939a(0xea)]&&(_0x59c7a6[_0x49939a(0xea)]=_0x4ac311,_0x54f313()),_0x59c7a6[_0x49939a(0x1b7)]=_0x455d39[_0x49939a(0x1b7)];}}};let _0x46b1ea=null;const _0x54f313=()=>{if(_0x46b1ea||_0x4d065b)return;_0x46b1ea=setTimeout(()=>{_0x46b1ea=null;if(!_0x4d065b)_0x42f49f();},_0x3ed741),_0x46b1ea['unref']?.();};_0x3d7660['on'](_0xfa681(0x295),_0x1933d6),_0x3d7660['on']('exit',(_0x1b47d9,_0x571b1f,_0x3dace9)=>{const _0x2cce78=_0xfa681,_0x409bb2=_0x1b47d9['process'][_0x2cce78(0x9d)],_0x230518=_0x5bd554(_0x1b47d9),_0x52a92d=_0x34f06c['get'](_0x409bb2);if(_0x52a92d&&_0x57cf65?.[_0x2cce78(0x1a6)])_0x57cf65[_0x2cce78(0x1a6)][_0x2cce78(0x197)](_0x409bb2+':'+_0x52a92d['startedAt'])[_0x2cce78(0x1ad)](()=>{});_0x34f06c[_0x2cce78(0x14d)](_0x409bb2),console[_0x2cce78(0x2b5)](_0x2cce78(0x268)+_0x409bb2+_0x2cce78(0x129)+(_0x230518??'?')+_0x2cce78(0x175)+(_0x2cce78(0x17b)+_0x571b1f+_0x2cce78(0xb7)+(_0x3dace9??'none')+_0x2cce78(0x15f)+_0x34f06c[_0x2cce78(0x2ca)]+_0x2cce78(0x1a7))),_0x42f49f();if(_0x4d065b||_0x230518==null)return;const _0x5a4105=_0x1e2cff['get'](_0x230518);if(!_0x5a4105||_0x5a4105[_0x2cce78(0x247)])return;const _0x45097e=Date[_0x2cce78(0x194)]();_0x5a4105[_0x2cce78(0x183)][_0x2cce78(0x2a5)](_0x45097e),_0x5a4105[_0x2cce78(0x183)]=_0x5a4105['deaths'][_0x2cce78(0x195)](_0x1055d3=>_0x45097e-_0x1055d3<=_0x3dd582);if(_0x5a4105['deaths'][_0x2cce78(0x287)]>=_0x53f29c){_0x5a4105[_0x2cce78(0x247)]=!![],console[_0x2cce78(0x1d4)](_0x2cce78(0x198)+_0x230518+'\x20died\x20'+_0x5a4105['deaths'][_0x2cce78(0x287)]+'\x20times\x20in\x20'+(_0x3dd582+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x34f06c[_0x2cce78(0x2ca)]+'\x20worker(s)\x20still\x20serving'));return;}_0x5a4105['consecutiveFailures']++;const _0x4586c=Math[_0x2cce78(0x275)](_0x9b299e,_0x5891b4*0x2**(_0x5a4105['consecutiveFailures']-0x1));console['log'](_0x2cce78(0xb5)+_0x230518+_0x2cce78(0x196)+_0x4586c+'ms\x20(attempt\x20'+_0x5a4105[_0x2cce78(0xc9)]+')'),_0x5a4105[_0x2cce78(0x184)]=setTimeout(()=>{const _0x282ae4=_0x2cce78;_0x5a4105[_0x282ae4(0x184)]=null;if(_0x4d065b||_0x5a4105[_0x282ae4(0x247)])return;const _0x50e7b2=_0x294672(_0x230518);_0x50e7b2[_0x282ae4(0xce)](_0x282ae4(0x267),()=>{const _0x59bc60=_0x282ae4;if(_0x1e2cff[_0x59bc60(0x10a)](_0x230518)===_0x5a4105)_0x5a4105['consecutiveFailures']=0x0;});},_0x4586c),_0x5a4105[_0x2cce78(0x184)][_0x2cce78(0x232)]?.();});const _0x3cdf47=[..._0x34f06c[_0xfa681(0x1f2)]()];console[_0xfa681(0x2b5)](_0xfa681(0x28b)+process[_0xfa681(0x9d)]+_0xfa681(0x2b1)+_0x501b2a+_0xfa681(0x10e)+_0x5d1f4d+':\x20'+('['+_0x3cdf47[_0xfa681(0x296)](',\x20')+']'));const _0x144342={'_isClusterController':!![],'port':_0x5d1f4d,'primaryOkdb':_0x57cf65??null,'status'(){const _0x414735=_0xfa681;return{'clustered':!![],'primaryPid':process[_0x414735(0x9d)],'port':_0x5d1f4d,'primaryRole':_0x57cf65?.[_0x414735(0x2d0)]??null,'processorPid':null,'supervisorPid':process[_0x414735(0x9d)],'workers':[..._0x34f06c[_0x414735(0x17f)]()][_0x414735(0x284)](({worker:_0x4c7428})=>({'pid':_0x4c7428['process'][_0x414735(0x9d)],'id':_0x4c7428['id'],'dead':_0x4c7428[_0x414735(0x1cc)]()}))};},async 'close'(){const _0x5ae5d3=_0xfa681;_0x4d065b=!![];for(const _0x365c55 of _0x1e2cff[_0x5ae5d3(0x17f)]()){_0x365c55[_0x5ae5d3(0x247)]=!![],_0x365c55[_0x5ae5d3(0x184)]&&(clearTimeout(_0x365c55[_0x5ae5d3(0x184)]),_0x365c55[_0x5ae5d3(0x184)]=null);}clearInterval(_0x30185d);_0x46b1ea&&(clearTimeout(_0x46b1ea),_0x46b1ea=null);_0x3d7660[_0x5ae5d3(0x149)](_0x5ae5d3(0x295),_0x20215d),_0x3d7660['off'](_0x5ae5d3(0x295),_0x1933d6),_0x57cf65?.['events']?.[_0x5ae5d3(0x149)]?.(_0x1f0274['SYSTEM_PROC'],_0x571ef0);if(_0x57cf65?.[_0x5ae5d3(0x11a)]?.['off'])for(const {event:_0x4874d8,handler:_0x4d3209}of _0x4ae39f){try{_0x57cf65[_0x5ae5d3(0x11a)][_0x5ae5d3(0x149)](_0x4874d8,_0x4d3209);}catch{}}_0x4ae39f[_0x5ae5d3(0x287)]=0x0;const _0x35b1b0=[..._0x34f06c[_0x5ae5d3(0x17f)]()][_0x5ae5d3(0x284)](({worker:_0xff6172})=>_0xff6172);if(_0x35b1b0[_0x5ae5d3(0x287)]===0x0)return;await Promise[_0x5ae5d3(0x15d)](_0x35b1b0[_0x5ae5d3(0x284)](_0x5d0fdf=>new Promise(_0x5dd1dd=>{const _0x8fbee6=_0x5ae5d3;if(_0x5d0fdf[_0x8fbee6(0x1cc)]()){_0x5dd1dd();return;}let _0x52b9f4=![];const _0x3cabb1=()=>{if(_0x52b9f4)return;_0x52b9f4=!![];if(_0x216b37)clearTimeout(_0x216b37);_0x5dd1dd();};_0x5d0fdf[_0x8fbee6(0xce)](_0x8fbee6(0x1c7),_0x3cabb1);const _0x216b37=setTimeout(()=>{const _0xbf77b5=_0x8fbee6;try{_0x5d0fdf['process'][_0xbf77b5(0xa0)]();}catch{}},_0x3d6efd+0x1f4);_0x216b37[_0x8fbee6(0x232)]?.();try{_0x5d0fdf[_0x8fbee6(0x27b)]();}catch{try{_0x5d0fdf[_0x8fbee6(0x2d4)][_0x8fbee6(0xa0)]();}catch{}}})));}};return _0x144342;}async function _0x52ea10({makeOkdb:_0x3ca9b0,port:_0x31e160}){const _0x1f717d=_0x3fcfcf,_0xbedd51=await _0x3ca9b0();return _0x16ce9c(_0xbedd51),_0xbedd51[_0x1f717d(0xe9)]['listen'](_0x31e160);}function _0x16ce9c(_0x3d9369){const _0x19bdc4=_0x3fcfcf;if(!_0x3d9369||_0x3d9369[_0x19bdc4(0xa5)])return;_0x3d9369[_0x19bdc4(0xa5)]=!![];try{const {OKDBChangefeed:_0x35b77e}=requireOkdbChangefeed(),_0x10a55d=_0x3d9369['_adminRelay'];if(_0x10a55d&&typeof _0x10a55d['attachFeed']===_0x19bdc4(0x28f)){const _0x500abd=new _0x35b77e(_0x3d9369);_0x500abd[_0x19bdc4(0x269)](),_0x10a55d[_0x19bdc4(0x24c)](_0x500abd),_0x3d9369[_0x19bdc4(0x107)]=_0x500abd;}}catch(_0x10a2a7){_0x3d9369[_0x19bdc4(0x2b5)]?.[_0x19bdc4(0x169)]?.(_0x19bdc4(0xf6)+(_0x10a2a7?.['message']??_0x10a2a7),{'feature':_0x19bdc4(0x143)});}const _0xd54ec3=_0x4b4156=>{const _0x253970=_0x19bdc4;if(!_0x4b4156||typeof _0x4b4156!=='object'||_0x4b4156[_0x3dba24]==null)return;if(_0x4b4156[_0x3dba24]===_0x574153)try{_0x3d9369[_0x253970(0x1a3)]?.[_0x253970(0x227)]?.(_0x4b4156[_0x253970(0x1be)],_0x4b4156[_0x253970(0x191)]);}catch{}};process['on']('message',_0xd54ec3),_0x3d9369[_0x19bdc4(0x16d)]=_0xd54ec3;{let _0x3377b5=process[_0x19bdc4(0x134)](),_0xad6348=Date[_0x19bdc4(0x194)]();const _0x3adcee=()=>{const _0x2dbd8d=_0x19bdc4;if(typeof process['send']!=='function'||!process[_0x2dbd8d(0x12e)])return;const _0x2663a3=Date[_0x2dbd8d(0x194)](),_0x117e32=process[_0x2dbd8d(0x134)](),_0x4dfea4=(_0x2663a3-_0xad6348)*0x3e8,_0x42eeb8=_0x117e32[_0x2dbd8d(0x177)]-_0x3377b5[_0x2dbd8d(0x177)]+(_0x117e32[_0x2dbd8d(0x156)]-_0x3377b5[_0x2dbd8d(0x156)]),_0x381b58=_0x4dfea4>0x0?Math['min'](0x64,Math['round'](_0x42eeb8/(_0x4dfea4*(_0x4aec30[_0x2dbd8d(0x23b)]()[_0x2dbd8d(0x287)]||0x1))*0x64)):0x0;_0x3377b5=_0x117e32,_0xad6348=_0x2663a3;const _0x8c157b=process['memoryUsage']();let _0x396ab5=null;try{_0x396ab5=_0x3d9369[_0x2dbd8d(0x2d0)]?.[_0x2dbd8d(0x19c)]?_0x3d9369[_0x2dbd8d(0x1a6)]?.[_0x2dbd8d(0x2dd)]?.()??null:null;}catch{}try{process[_0x2dbd8d(0x21f)]({[_0x3dba24]:_0x5212e6,'stats':{'rss':_0x8c157b[_0x2dbd8d(0x131)],'heapUsed':_0x8c157b[_0x2dbd8d(0x2c6)],'heapTotal':_0x8c157b[_0x2dbd8d(0x174)],'external':_0x8c157b[_0x2dbd8d(0xfe)],'cpuPct':_0x381b58,'cpuWindowMs':Math[_0x2dbd8d(0x112)](_0x4dfea4/0x3e8)||null},'processing':_0x396ab5});}catch{}},_0x1e2ca1=Math[_0x19bdc4(0x2c5)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x11583a=setInterval(_0x3adcee,_0x1e2ca1);_0x11583a[_0x19bdc4(0x232)]?.(),_0x3adcee();for(const _0x32b85c of[_0x19bdc4(0x12f),_0x19bdc4(0x142)]){_0x3d9369[_0x19bdc4(0x11a)]?.['on']?.(_0x32b85c,()=>{try{_0x3adcee();}catch{}});}}let _0x371b1d=![];const _0x55b58f=async _0x3818cd=>{const _0x3a316e=_0x19bdc4;if(_0x371b1d)return;_0x371b1d=!![];const _0x62f669=setTimeout(()=>process['exit'](_0x3818cd),_0x3d6efd);_0x62f669[_0x3a316e(0x232)]?.();try{await _0x3d9369[_0x3a316e(0x13e)]?.();}catch{}process[_0x3a316e(0x1c7)](_0x3818cd);};process['on'](_0x19bdc4(0x27b),()=>_0x55b58f(0x0));if(process[_0x19bdc4(0x19e)]!==_0x19bdc4(0x1e8)){const _0xe7d781=setInterval(()=>{const _0x421eec=_0x19bdc4;if(process[_0x421eec(0x123)]===0x1)_0x55b58f(0x0);},_0x2c7bbc);_0xe7d781['unref']?.(),_0x3d9369['_clusterOrphanWatch']=_0xe7d781;}}return okdbCluster={'runClustered':_0xbc61d8,'attachWorkerCluster':_0x16ce9c},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x4996fd=require$$0$5,{attachWorkerCluster:_0x54e5cb}=requireOkdbCluster();async function _0x51af0e(){const _0xb67a5=_0x4fa3,_0x2241fe=process.env.OKDB_HTTP_CHILD;if(!_0x2241fe)throw new Error(_0xb67a5(0x2b3));const {rootPath:_0x31a7e7,port:_0x6854f7,options:options={},logLevel:logLevel='info'}=JSON[_0xb67a5(0x1b2)](_0x2241fe);if(!_0x31a7e7||!_0x6854f7)throw new Error(_0xb67a5(0x22d));const _0x26829d=new _0x4996fd(_0x31a7e7,{...options,'engines':![],'processors':![],'compaction':![]});_0x26829d['log'][_0xb67a5(0x15b)]?.();const _0x2e0fdc=process.env.OKDB_CLUSTER_SLOT??'?',_0x4e8e9a={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x3632b2=_0x4e8e9a[logLevel]??_0x4e8e9a[_0xb67a5(0x1ca)];_0x26829d[_0xb67a5(0x2b5)][_0xb67a5(0xaf)](_0x553204=>{const _0x8cb1a=_0xb67a5;if((_0x4e8e9a[_0x553204[_0x8cb1a(0x103)]]??0x1)<_0x3632b2)return;try{process[_0x8cb1a(0x21f)]?.({'__okdbCluster':'log','slot':_0x2e0fdc,'pid':process[_0x8cb1a(0x9d)],'entry':_0x553204});}catch{}}),await _0x26829d[_0xb67a5(0x178)](),_0x54e5cb(_0x26829d),await _0x26829d['http'][_0xb67a5(0x114)](_0x6854f7);}return _0x51af0e()['catch'](_0x49f280=>{const _0x210cb8=_0x4fa3;try{process[_0x210cb8(0x21f)]?.({'__okdbCluster':'log','slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x210cb8(0x9d)],'entry':{'level':_0x210cb8(0x1d4),'msg':_0x210cb8(0x126)+(_0x49f280?.[_0x210cb8(0x295)]??_0x49f280)}});}catch{}process[_0x210cb8(0x1c7)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);function _0x4fa3(_0x4e8c52,_0x32b891){_0x4e8c52=_0x4e8c52-0x99;const _0x4a2b28=_0x4a2b();let _0x4fa34d=_0x4a2b28[_0x4e8c52];return _0x4fa34d;}module['exports']=okdbHttpWorkerChild;