@kedem/okdb 1.9.1 → 2.0.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 (48) hide show
  1. package/README.md +3 -2
  2. package/bin/okdb.js +1 -1
  3. package/docs/deployment.md +155 -0
  4. package/docs/diagnostics.md +115 -0
  5. package/docs/embeddings.md +1 -1
  6. package/docs/functions.md +30 -27
  7. package/docs/getting-started.md +14 -3
  8. package/docs/http-api.md +3 -3
  9. package/docs/http-cluster.md +93 -60
  10. package/docs/index.md +13 -1
  11. package/docs/manifest.json +6 -3
  12. package/docs/pipelines.md +1 -1
  13. package/docs/process-registry.md +5 -5
  14. package/docs/processors.md +35 -18
  15. package/docs/queue.md +112 -42
  16. package/docs/sync.md +10 -7
  17. package/docs/ttl.md +1 -1
  18. package/docs/upgrade-2.0.md +290 -0
  19. package/okdb-functions-sandbox-worker.js +1 -1
  20. package/okdb-http-worker-child.js +1 -1
  21. package/okdb-views-bootstrap-worker.js +1 -1
  22. package/okdb.js +1 -1
  23. package/package.json +1 -1
  24. package/public/layouts/_default.ok.html +1 -1
  25. package/public/sections/db/modals/create-env-modal.ok.js +1 -1
  26. package/public/sections/db/modals/demo-env-modal.ok.js +1 -1
  27. package/public/sections/db/parts/db-overview.ok.js +1 -1
  28. package/public/sections/engines/engine-ui-utils.js +1 -1
  29. package/public/sections/engines/parts/engine-declaration-editor.ok.js +1 -1
  30. package/public/sections/engines/parts/generic-engine-panel.ok.js +1 -1
  31. package/public/sections/queue/parts/code-panel.ok.js +1 -1
  32. package/public/sections/queue/parts/job-log-panel.ok.js +1 -1
  33. package/public/sections/queue/parts/queue-jobs.ok.js +1 -1
  34. package/public/sections/sync/parts/sync-topology.ok.js +1 -1
  35. package/public/sections/system/index.ok.html +1 -1
  36. package/public/sections/system/parts/system-process-panel.ok.js +1 -1
  37. package/public/sections/system/parts/system-processing-panel.ok.js +1 -1
  38. package/public/sections/system/parts/system-runtime-overview.ok.js +1 -1
  39. package/public/setup-app.js +1 -1
  40. package/public/setup.html +116 -55
  41. package/types/index.d.ts +33 -3
  42. package/types/options.d.ts +19 -10
  43. package/docs/worker-fleet.md +0 -139
  44. package/okdb-functions-runner-child.js +0 -1
  45. package/okdb-queue-load-handler.js +0 -1
  46. package/okdb-queue-spawn-child.js +0 -1
  47. package/okdb-worker-child.js +0 -1
  48. package/public/sections/system/parts/system-workers-panel.ok.js +0 -1
@@ -1 +1 @@
1
- 'use strict';function _0x450a(){const _0x4e5602=['item:create','lag','info','_onTick','emit','cluster-wide','node:perf_hooks','reset','SYSTEM_POKE','system:stopped','env:removed','cluster','compaction','system:drain','killable','clearThreadStats','type','ITEM_CREATE','setupPrimary','dropIndex','keys','_handlePoke','map','node','attach','kill','push','license:added','enabled','delete','nodesView','listenAddr','error','indexOf','type:drop','startedAt','embedded','\x20worker\x20slot=','async','(worst\x20','cursorKey','selfKey','license:activated','halted','detachConsole','INDEX_RESET','_timer','process','_statusEnv','heapTotal','ttl:clear','_openEnvLazy','online','_maybePublish','host','data','state','claimGated','addSupervisedChild','_buckets','processKey','_clusterOrphanWatch','[okdb-cluster]\x20worker\x20pid=','okdb-http-worker-child.js','mode','note','_lastCpuAt','removeSync','_isReader','replace','_nodeDb','_ensureDesired','_caps','system:type_drop','threads','_listenAddr','running','external','http','slice','[okdb-cluster]\x20slot=','dropType','waiting','enable','close','add','toFixed','_draining','_drain','_processingPolicy','11361pyqYFm','instanceId',')\x20exited\x20','expiresAt','ITEM_REMOVE','_scheduleFlush','maxMs','startsWith','registerType','isActive','has','listNodes','_drainOne','_lastPublishAt','ms\x20busy=','_supervisorKey','processor:paused','cluster:','_groupByProcess','txn:end','_threadStats','_dedupeKey','round','ms\x20max=','item:update','log','rows=','reap','txn:rollback','processor:ready','./okdb','stopped','respawnTimer','bus:poke','dropSchema','--test','some','workers',');\x20','FTS_RESET','_kind','_log','getDesired','getProcess','version','ttl:expired','system:ready','putNode','processor:retry','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','bus:type_drop','force','epoch','ms\x20p99=','processor','created','index:ready','1ofN:','send','assign','kind','put','write','4863960sAxTmT','mean','openDB','execArgv','setOwnMeta','setDesired','SIGKILL','cpuPct','_startAdmission','_children','~processes:desired','unref','none','getChanges','schema:drop','_putRowAsync','ms/','attachFeed','system:poke','_startedAt','disconnect','win32','start','_getType','object','supervisorKey','meta','_quantum','hasDesired','isDead','getClock','function','_onProcEvent','\x20forked\x20','find','_rowKey','--inspect','dropFts','true','maxExtra','worker','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','prototype','cpuUsage','\x20worker(s)\x20still\x20serving','_handleInProcess','msg','view:progress','loop-lag\x20','all','_clusterOnMessage','platform','getRange','role','system:bus_state_change','\x20worker(s)\x20remaining','_seen','processors','join','_pending','slot','from','_lastCpuPct','ITEM_UPDATE','_activateProcesses','updateSupervisedChildStats','system','number','_dedupeMax','inst:','stats','entries','cli','_clusterWorkerAttached','_flushTimer','processes','workersConfigured','_baselines','decommission','fromEntries','__okdbSlot','instances','env','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','_desired','(code=','_flushDebounce','_buildProcessingFacet','warn','clear','cpus','lifecycle','\x20(durable\x20desired-state)','8009631FOmwmq','INDEX_PROGRESS','_nodeDead','ingest','fts:reset','INDEX_REGISTERED','_report','then','randomUUID','_onPoke','change','hasOwnProperty','ephemeral','catch','\x20(slot=','passive','filter','processorsView','_admissionStarted','http\x20worker\x20child\x20failed:\x20','index:registered','[okdb-cluster]\x20','\x20ipc\x20error:\x20','_buildChildRow','3449768xUsskN','okdb','size','hard-killed','default','hostname','ttl:set','_ownMeta','code','SYSTEM_PROC','connected','_nodeDbFor','_cursors','clusterStatusView','8070472AbBZYI','_markSeen','includes','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','onWindow','reduce','transactionSync','offWindow','single','fanout','FTS_DROP','message','_hbTimer','_adminRelay','string','events','1442DBAoIE','length','exports','fts:registered','nodeKey','stop','~processes:cmd','building','license:removed','CHANGEFEED_QUANTUM','sort','_envs','resetFts','creating','removeNode','label','percentile','pushEphemeral','system:proc','values','crypto','publishOwnRow','get','user','rss','count','next','startHeartbeat','unique:violation_resolved','fts:drop','starting','options','env:opened','pid','_selfKey','_instanceId','__okdbCluster','rowKey','now','deaths','fn-runner','remove','listen','uptime','_isWriter','dead','ppid','processor:error','_onStop','[okdb-cluster]\x20primary\x20pid=','REMOVE','_admissionTimer','VIEW_PROGRESS','_started','min','publishChildRow','_lastCpuUsage','resetting','isWorker','ready','1561704IfPNXu','hasType','lastClock','processor:progress','_publishNow','_rootDb','_onItem','exit','_nodeDbCache','__esModule','2PZnJfg','node/','entry','node:events','primary','queue-worker','processing','SYSTEM_STOPPED','max','heapUsed','http-server','claims','registerIndex','started','16326VRjXuy','path','set','_processStartedAt','ref:violation','dedupeMax','memoryUsage','\x20in\x20','off','isPrimary','bus:drain','status','stringify','_lastCpuWindowMs','listDesired','_buildOwnRow','once','flushDebounce','_cmd','stderr','_windowCbs','isConnected','--print','caps','[okdb-cluster]\x20respawning\x20worker\x20slot=','children','consecutiveFailures'];_0x450a=function(){return _0x4e5602;};return _0x450a();}const _0xd218e=_0x2a26;(function(_0x24f12e,_0x4ba9a8){const _0x77583e=_0x2a26,_0x2ebfd4=_0x24f12e();while(!![]){try{const _0x15718f=-parseInt(_0x77583e(0x13a))/0x1+parseInt(_0x77583e(0xb7))/0x2*(-parseInt(_0x77583e(0xad))/0x3)+parseInt(_0x77583e(0x1ee))/0x4+parseInt(_0x77583e(0x179))/0x5+-parseInt(_0x77583e(0xc5))/0x6*(parseInt(_0x77583e(0x71))/0x7)+-parseInt(_0x77583e(0x1fc))/0x8+parseInt(_0x77583e(0x1d6))/0x9;if(_0x15718f===_0x4ba9a8)break;else _0x2ebfd4['push'](_0x2ebfd4['shift']());}catch(_0x4368a0){_0x2ebfd4['push'](_0x2ebfd4['shift']());}}}(_0x450a,0x98539));var require$$0$3=require(_0xd218e(0x158)),require$$1=require('cluster'),require$$1$1=require(_0xd218e(0xc6)),require$$0$1=require('os'),require$$2=require(_0xd218e(0x85)),require$$0=require(_0xd218e(0xe6)),require$$0$2=require(_0xd218e(0xba));function getDefaultExportFromCjs(_0x4f71ad){const _0x2c009f=_0xd218e;return _0x4f71ad&&_0x4f71ad[_0x2c009f(0xb6)]&&Object[_0x2c009f(0x1a3)][_0x2c009f(0x1e1)]['call'](_0x4f71ad,_0x2c009f(0x1f2))?_0x4f71ad[_0x2c009f(0x1f2)]:_0x4f71ad;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0xf39004=_0xd218e;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x8d4a1f={'PUT':_0xf39004(0x177),'REMOVE':_0xf39004(0x9a),'INDEX_DROP':_0xf39004(0xf3),'INDEX_REGISTER':_0xf39004(0xc3),'INDEX_RESET':'resetIndex','TYPE_REGISTER':'registerType','TYPE_DROP':_0xf39004(0x131),'FTS_REGISTER':'registerFts','FTS_DROP':_0xf39004(0x19e),'FTS_RESET':_0xf39004(0x7d),'SCHEMA_SET':'setSchema','SCHEMA_DROP':_0xf39004(0x15c),'TTL_SET':'setTtl','TTL_CLEAR':'clearTtl'},_0x2bfade={'SYSTEM_READY':_0xf39004(0x168),'SYSTEM_STOPPED':_0xf39004(0xe9),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0xf39004(0x18b),'SYSTEM_DRAIN':_0xf39004(0xed),'SYSTEM_TYPE_DROP':_0xf39004(0x129),'SYSTEM_PROC':_0xf39004(0x83),'SYSTEM_BUS_STATE_CHANGE':_0xf39004(0x1af),'ITEM_CREATE':_0xf39004(0xe0),'ITEM_UPDATE':_0xf39004(0x152),'ITEM_REMOVE':'item:remove','INDEX_RESET':'index:reset','INDEX_READY':_0xf39004(0x172),'INDEX_PROGRESS':'index:progress','VIEW_PROGRESS':_0xf39004(0x1a8),'INDEX_DROP':'index:drop','INDEX_REGISTERED':_0xf39004(0x1ea),'FTS_REGISTERED':_0xf39004(0x74),'FTS_DROP':_0xf39004(0x8e),'FTS_RESET':_0xf39004(0x1da),'SCHEMA_SET':'schema:set','SCHEMA_DROP':_0xf39004(0x187),'UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0xf39004(0x8d),'REF_VIOLATION':_0xf39004(0xc9),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':'sync:apply','TXN_START':'txn:start','TXN_END':_0xf39004(0x14d),'TXN_ROLLBACK':_0xf39004(0x156),'TYPE_REGISTERED':'type:registered','TYPE_DROP':_0xf39004(0x102),'ENV_OPENED':_0xf39004(0x91),'ENV_REMOVED':_0xf39004(0xea),'TTL_EXPIRED':_0xf39004(0x167),'TTL_SET':_0xf39004(0x1f4),'TTL_CLEAR':_0xf39004(0x112),'LICENSE_INVALID':'license:invalid','LICENSE_ADDED':_0xf39004(0xfb),'LICENSE_ACTIVATED':_0xf39004(0x10a),'LICENSE_REMOVED':_0xf39004(0x79)},_0x48de69={'CREATING':_0xf39004(0x7e),'RESETTING':_0xf39004(0xaa),'READY':'ready','DROPPING':'dropping','WAITING':_0xf39004(0x132)},_0x5bc8cb={'CREATED':_0xf39004(0x171),'STARTING':_0xf39004(0x8f),'STARTED':_0xf39004(0xc4),'STOPPING':'stopping','STOPPED':_0xf39004(0x159)},_0x41f384={'CREATING':_0xf39004(0x7e),'READY':_0xf39004(0xac),'HALTED':_0xf39004(0x10b),'STOPPED':_0xf39004(0x159),'RESETTING':_0xf39004(0xaa)},_0x217e66=Object['freeze']({'POKE':_0xf39004(0x15b),'DRAIN':_0xf39004(0xcf),'TYPE_DROP':_0xf39004(0x16c),'PROC':'bus:proc'});return okdbEnums={'BUS_EVENTS':_0x217e66,'CHANGE_ACTIONS':_0x8d4a1f,'EVENTS':_0x2bfade,'INDEX_STATE':_0x48de69,'OKDB_STATE':_0x5bc8cb,'VIEW_STATE':_0x41f384},okdbEnums;}function _0x2a26(_0x2f541e,_0x3fff5b){_0x2f541e=_0x2f541e-0x6c;const _0x450af0=_0x450a();let _0x2a26c2=_0x450af0[_0x2f541e];return _0x2a26c2;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x44306f=_0xd218e;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x1b30d5,performance:_0x278c64}=require$$0,_0x2c370e=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x44306f(0x19f),_0x4aa748=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x43ac7d=process.env.OKDB_LOOP_LAG_ALL==='1',_0x57e28a=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x4fd049{constructor(){const _0x11a8b7=_0x44306f;this[_0x11a8b7(0xfc)]=_0x2c370e,this[_0x11a8b7(0x11b)]=new Map(),this['_h']=null,this['_timer']=null,this[_0x11a8b7(0xa6)]=![],this['_log']=(_0x432295,_0x3e6498)=>process[_0x11a8b7(0xd8)][_0x11a8b7(0x178)](_0x432295+(_0x3e6498?'\x20'+JSON[_0x11a8b7(0xd1)](_0x3e6498):'')+'\x0a');}['now'](){const _0x198022=_0x44306f;return _0x278c64[_0x198022(0x97)]();}['setLogger'](_0x1d7a52){const _0x5966a6=_0x44306f;if(typeof _0x1d7a52===_0x5966a6(0x198))this['_log']=_0x1d7a52;}[_0x44306f(0x121)](_0x2ac104,_0x576cd6,_0x48b014){const _0x31b470=_0x44306f;if(!this[_0x31b470(0xfc)])return;let _0x269a01=this[_0x31b470(0x11b)][_0x31b470(0x87)](_0x2ac104);!_0x269a01&&(_0x269a01={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x31b470(0x11b)][_0x31b470(0xc7)](_0x2ac104,_0x269a01)),_0x269a01['ms']+=_0x576cd6,_0x269a01[_0x31b470(0x8a)]+=0x1,_0x576cd6>_0x269a01[_0x31b470(0x140)]&&(_0x269a01[_0x31b470(0x140)]=_0x576cd6,_0x269a01[_0x31b470(0x1a0)]=_0x48b014||'');}[_0x44306f(0x18f)](_0x1f6419){const _0x530c7b=_0x44306f;if(!this[_0x530c7b(0xfc)]||this[_0x530c7b(0xa6)])return;this[_0x530c7b(0xa6)]=!![];if(_0x1f6419)this[_0x530c7b(0x163)]=_0x1f6419;this['_h']=_0x1b30d5({'resolution':0xa}),this['_h'][_0x530c7b(0x133)](),this['_timer']=setInterval(()=>this[_0x530c7b(0x1dc)](),_0x4aa748);if(this[_0x530c7b(0x10e)][_0x530c7b(0x184)])this[_0x530c7b(0x10e)][_0x530c7b(0x184)]();}[_0x44306f(0x200)](_0x202813){const _0x531d18=_0x44306f;if(!this[_0x531d18(0xd9)])this[_0x531d18(0xd9)]=new Set();this[_0x531d18(0xd9)][_0x531d18(0x135)](_0x202813);if(!this[_0x531d18(0xa6)])this[_0x531d18(0x181)]();}[_0x44306f(0x203)](_0x4e261b){const _0xaabb6d=_0x44306f;this[_0xaabb6d(0xd9)]?.[_0xaabb6d(0xfd)](_0x4e261b);}[_0x44306f(0x181)](){const _0x188743=_0x44306f;if(this[_0x188743(0x1e8)])return;this[_0x188743(0x1e8)]=!![];!this['_h']&&(this['_h']=_0x1b30d5({'resolution':0xa}),this['_h'][_0x188743(0x133)]());const _0x56131e=_0x4aa748;this[_0x188743(0xa4)]=setInterval(()=>{const _0x40dccd=_0x188743,_0x4706f5=this['_h'];if(!_0x4706f5)return;const _0x375208=_0x4706f5[_0x40dccd(0x81)](0x63)/0xf4240,_0x3895b4=_0x4706f5[_0x40dccd(0xbf)]/0xf4240,_0x5c5882=_0x4706f5[_0x40dccd(0x17a)]/0xf4240;_0x4706f5[_0x40dccd(0xe7)]();if(this[_0x40dccd(0xd9)])for(const _0x219a98 of this[_0x40dccd(0xd9)]){try{_0x219a98({'p99Ms':_0x375208,'maxMs':_0x3895b4,'meanMs':_0x5c5882,'reportMs':_0x56131e});}catch{}}},_0x56131e);if(this[_0x188743(0xa4)][_0x188743(0x184)])this[_0x188743(0xa4)][_0x188743(0x184)]();}[_0x44306f(0x1dc)](){const _0x38c619=_0x44306f,_0x90b8fc=this['_h'],_0x5b64b1=_0x90b8fc[_0x38c619(0xbf)]/0xf4240,_0x4cac7e=_0x90b8fc[_0x38c619(0x81)](0x63)/0xf4240,_0xe009a0=_0x90b8fc[_0x38c619(0x17a)]/0xf4240;_0x90b8fc[_0x38c619(0xe7)]();const _0x40dadb=[...this[_0x38c619(0x11b)][_0x38c619(0x1c0)]()][_0x38c619(0xf6)](([_0x36816f,_0x5c642d])=>({'label':_0x36816f,..._0x5c642d}))[_0x38c619(0x7b)]((_0x283190,_0x47edf3)=>_0x47edf3['ms']-_0x283190['ms'])[_0x38c619(0x12f)](0x0,0x8);this[_0x38c619(0x11b)]['clear']();const _0x3a562b=_0x40dadb[_0x38c619(0x201)]((_0x8912e4,_0x23b4f2)=>_0x8912e4+_0x23b4f2['ms'],0x0),_0x1159ac=_0x40dadb['map'](_0x2db17e=>_0x2db17e[_0x38c619(0x80)]+'='+_0x2db17e['ms'][_0x38c619(0x136)](0x0)+_0x38c619(0x189)+_0x2db17e[_0x38c619(0x8a)]+(_0x2db17e[_0x38c619(0x140)]>0x5?_0x38c619(0x107)+_0x2db17e[_0x38c619(0x140)][_0x38c619(0x136)](0x0)+'ms'+(_0x2db17e[_0x38c619(0x1a0)]?'\x20'+_0x2db17e[_0x38c619(0x1a0)]:'')+')':''));(_0x43ac7d||_0x5b64b1>=_0x57e28a)&&this[_0x38c619(0x163)](_0x38c619(0x1a9)+_0x4aa748+_0x38c619(0x151)+_0x5b64b1[_0x38c619(0x136)](0x0)+_0x38c619(0x16f)+_0x4cac7e[_0x38c619(0x136)](0x0)+'ms\x20mean='+_0xe009a0[_0x38c619(0x136)](0x0)+_0x38c619(0x148)+_0x3a562b[_0x38c619(0x136)](0x0)+'ms'+(_0x1159ac['length']?'\x20│\x20'+_0x1159ac[_0x38c619(0x1b3)]('\x20\x20'):''),{'feature':'loop-lag'});if(this[_0x38c619(0xd9)])for(const _0x1a3576 of this[_0x38c619(0xd9)]){try{_0x1a3576({'p99Ms':_0x4cac7e,'maxMs':_0x5b64b1,'meanMs':_0xe009a0,'reportMs':_0x4aa748});}catch{}}}[_0x44306f(0x76)](){const _0x1f3783=_0x44306f;if(this[_0x1f3783(0x10e)])clearInterval(this[_0x1f3783(0x10e)]);if(this['_h'])this['_h']['disable']();this[_0x1f3783(0x10e)]=null,this['_h']=null,this['_started']=![];}}const _0x322320=new _0x4fd049();if(_0x322320[_0x44306f(0xfc)])_0x322320[_0x44306f(0x18f)]();return okdbLoopMonitor={'LOOP':_0x322320},okdbLoopMonitor;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x47c38b=_0xd218e;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x3672e0=require$$0$1,_0xd83097=require$$1,_0x5ed5d4=require$$2,{LOOP:_0xfcc22e}=requireOkdbLoopMonitor(),_0xefbd20='~processes',_0x26e5eb=_0x47c38b(0xf7),_0x49321f=_0x47c38b(0x183),_0x6a7cb=_0x47c38b(0x77),_0x517179=(_0x3703db,_0x3730f1)=>_0x3703db+':'+_0x3730f1,_0x963705=(_0x3f8c16,_0x183a0e)=>_0x3f8c16+'::'+_0x183a0e,_0x428f06=(_0x2bcc98,_0x385c62)=>_0x2bcc98+'/'+_0x385c62,_0x5956c8=(_0x201b59,_0x2c7592)=>_0x201b59+'#'+_0x2c7592,_0x4d2e79=_0x29ad42=>{const _0x4da394=_0x47c38b;if(_0x29ad42?.['processKey'])return _0x29ad42[_0x4da394(0x11c)];const _0x31f413=_0x29ad42?.[_0x4da394(0x75)];return typeof _0x31f413==='string'&&_0x31f413['includes']('#')?_0x31f413[_0x4da394(0x12f)](0x0,_0x31f413[_0x4da394(0x101)]('#')):_0x31f413;},_0x4377c1=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x4f01d3=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x5d09ef=_0x4377c1*0x3,_0x2476f0=[_0x47c38b(0xb0),_0x47c38b(0x157),_0x47c38b(0x16a),'processor:error'];let _0x1e53f7=null;function _0x2783c8(){const _0x1a5342=_0x47c38b;if(_0x1e53f7==null)_0x1e53f7=Math[_0x1a5342(0x150)]((Date[_0x1a5342(0x97)]()-process[_0x1a5342(0x9c)]()*0x3e8)/0x3e8)*0x3e8;return _0x1e53f7;}function _0x26335a(_0x2441a5){const _0x2dd181=_0x47c38b;if(process.env.OKDB_PROCESS_KILL===_0x2dd181(0xcd))return![];if(_0x2441a5?.['options']?.[_0x2dd181(0x1c4)]&&typeof _0x2441a5[_0x2dd181(0x90)][_0x2dd181(0x1c4)]===_0x2dd181(0x191)&&_0x2441a5[_0x2dd181(0x90)][_0x2dd181(0x1c4)][_0x2dd181(0xf9)]===![])return![];return!![];}function _0x4515a4(_0x32614a,_0x4c282a){const _0x230a22=_0x47c38b,_0x2e1d0d=!!_0x4c282a?.['asyncProcessors'];switch(_0x32614a){case'primary':return{'controllable':_0x2e1d0d,'decommissionable':![],'killable':!![],'killConfirm':_0x230a22(0xe5)};case _0x230a22(0x1c1):case'standalone':return{'controllable':_0x2e1d0d,'decommissionable':![],'killable':!![],'killConfirm':'confirm'};case _0x230a22(0x104):return{'controllable':![],'decommissionable':![],'killable':![]};case'http-server':case _0x230a22(0xbc):case _0x230a22(0x99):case'worker':return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x230a22(0x16d)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x4c042f{constructor(_0x4b4e44){const _0x140f96=_0x47c38b;this['okdb']=_0x4b4e44,this[_0x140f96(0x110)]=null,this[_0x140f96(0x1cd)]=null,this['_cmd']=null,this['_isWriter']=![],this[_0x140f96(0x124)]=![],this[_0x140f96(0xc8)]=_0x2783c8(),this[_0x140f96(0x93)]=_0x517179(process[_0x140f96(0x92)],this[_0x140f96(0xc8)]),this['_instanceId']=_0x5ed5d4[_0x140f96(0x1de)]()[_0x140f96(0x12f)](0x0,0x8),this[_0x140f96(0x19c)]=_0x5956c8(this['_selfKey'],this['_instanceId']),this[_0x140f96(0x18c)]=Date['now'](),this[_0x140f96(0x162)]=null,this[_0x140f96(0x149)]=null,this['_listenAddr']=null,this[_0x140f96(0x6d)]=null,this['_onProcEvent']=null,this[_0x140f96(0xe3)]=null,this[_0x140f96(0x147)]=0x0,this[_0x140f96(0x1f5)]={},this[_0x140f96(0x182)]=new Map(),this[_0x140f96(0xa9)]=process['cpuUsage'](),this[_0x140f96(0x122)]=Date['now'](),this[_0x140f96(0x1b7)]=0x0,this['_threadStats']=new Map();}get[_0x47c38b(0x109)](){return this['_selfKey'];}get[_0x47c38b(0x96)](){const _0x2ea83d=_0x47c38b;return this[_0x2ea83d(0x19c)];}['_caps'](_0x49c815,_0x38f9ad){const _0x1fd6bb=_0x47c38b,_0x28dac9=_0x4515a4(_0x49c815,_0x38f9ad);if(_0x28dac9[_0x1fd6bb(0xee)]&&!_0x26335a(this[_0x1fd6bb(0x1ef)]))return{..._0x28dac9,'killable':![],'killConfirm':undefined};return _0x28dac9;}[_0x47c38b(0x143)](){const _0x5ec628=_0x47c38b;return!!this[_0x5ec628(0x110)];}[_0x47c38b(0x17d)](_0x299439){const _0x46cf0c=_0x47c38b;Object[_0x46cf0c(0x175)](this[_0x46cf0c(0x1f5)],_0x299439||{});}['noteListenAddr'](_0xe73c5c){const _0x65afdd=_0x47c38b;if(_0xe73c5c)this[_0x65afdd(0x12b)]=_0xe73c5c;}['register'](_0x200def={}){const _0x5900cc=_0x47c38b;return this['okdb'][_0x5900cc(0x1b9)](_0x200def);}['processingStatusView'](){const _0x5249e6=_0x47c38b;let _0x4bef9e=null;const _0x1f4f90={};for(const _0x5bb6e7 of this['listNodes']()){const _0x4073fa=_0x5bb6e7[_0x5249e6(0xbd)];if(!_0x4073fa)continue;if(_0x4bef9e==null)_0x4bef9e=_0x4073fa['policy'];for(const _0x5717c1 of _0x4073fa['processors']||[]){if(![_0x5249e6(0x204),_0x5249e6(0x205),_0x5249e6(0x1a1),_0x5249e6(0x106)][_0x5249e6(0x1fe)](_0x5717c1[_0x5249e6(0x120)]))continue;const _0x2c61d0=_0x5717c1[_0x5249e6(0x1cb)]||_0x5249e6(0x1f2);(_0x1f4f90[_0x2c61d0]||=[])['push']({'type':_0x5717c1['type'],'mode':_0x5717c1[_0x5249e6(0x120)],'state':_0x5717c1[_0x5249e6(0x118)],'lastClock':_0x5717c1[_0x5249e6(0xaf)],'headClock':_0x5717c1['headClock'],'lag':_0x5717c1[_0x5249e6(0xe1)]});}}return{'envs':_0x1f4f90,'policy':_0x4bef9e,'source':_0x5249e6(0x15f)};}[_0x47c38b(0x1e7)](){const _0x2607fe=_0x47c38b,_0x1d627f=_0x24daed=>{const _0x2f9395=_0x2a26;if(_0x24daed['state']===_0x2f9395(0x114)||_0x24daed[_0x2f9395(0x118)]===_0x2f9395(0x78)||_0x24daed[_0x2f9395(0x118)]===_0x2f9395(0x100))return 0x3;if(_0x24daed[_0x2f9395(0x119)])return 0x1;return 0x2;},_0x2cd6f2=new Map();for(const _0x481e8a of this[_0x2607fe(0x145)]()){for(const _0x3f65fe of _0x481e8a['processing']?.[_0x2607fe(0x1b2)]||[]){const _0x526ad0={..._0x3f65fe,'owner':{'pid':_0x481e8a[_0x2607fe(0x92)]??null,'kind':_0x481e8a[_0x2607fe(0x176)]??null,'host':_0x481e8a[_0x2607fe(0x116)]??null}},_0x4374f1=_0x3f65fe['mode']===_0x2607fe(0x204)?_0x2607fe(0x173)+(_0x3f65fe[_0x2607fe(0x1cb)]??'')+'::'+(_0x3f65fe[_0x2607fe(0x108)]??_0x3f65fe[_0x2607fe(0xf0)]??_0x3f65fe['id']):_0x2607fe(0x1be)+(_0x481e8a['nodeKey']??_0x481e8a[_0x2607fe(0x11c)]??'')+'::'+(_0x3f65fe[_0x2607fe(0x1cb)]??'')+'::'+_0x3f65fe['id'],_0x1ba718=_0x2cd6f2[_0x2607fe(0x87)](_0x4374f1);if(!_0x1ba718||_0x1d627f(_0x526ad0)>_0x1d627f(_0x1ba718))_0x2cd6f2['set'](_0x4374f1,_0x526ad0);}}return[..._0x2cd6f2[_0x2607fe(0x84)]()];}[_0x47c38b(0x1fb)](){const _0x266d9f=_0x47c38b,_0x2d6c42=Date[_0x266d9f(0x97)](),_0x434ce6=this[_0x266d9f(0x145)](),_0xb04907=_0x296baa=>Math[_0x266d9f(0xbf)](0x0,Math['round']((_0x2d6c42-(_0x296baa[_0x266d9f(0x103)]||_0x2d6c42))/0x3e8)),_0x3125fe=_0x434ce6[_0x266d9f(0x19b)](_0x431e5a=>_0x431e5a[_0x266d9f(0x176)]===_0x266d9f(0xbb)),_0x3fdde9=_0x434ce6[_0x266d9f(0x1e6)](_0x2ff8bb=>_0x2ff8bb[_0x266d9f(0x176)]==='http-server');if(_0x3125fe||_0x3fdde9['length'])return{'primary':_0x3125fe?{'pid':_0x3125fe[_0x266d9f(0x92)],'uptime':_0xb04907(_0x3125fe)}:null,'workers':_0x3fdde9['map'](_0x546841=>({'pid':_0x546841['pid'],'uptime':_0xb04907(_0x546841)})),'workersConfigured':_0x3125fe?.[_0x266d9f(0x193)]?.[_0x266d9f(0x1c5)]??_0x3fdde9[_0x266d9f(0x72)],'mode':_0x266d9f(0xeb)};const _0xab0da9=_0x434ce6[_0x266d9f(0x19b)](_0x3309e9=>_0x3309e9['kind']===_0x266d9f(0x1c1)||_0x3309e9[_0x266d9f(0x176)]==='standalone'||_0x3309e9[_0x266d9f(0x176)]===_0x266d9f(0x104)),_0x3eff9e=_0xab0da9?{'pid':_0xab0da9['pid'],'uptime':_0xb04907(_0xab0da9)}:{'pid':process[_0x266d9f(0x92)],'uptime':Math['max'](0x0,Math[_0x266d9f(0x150)](process[_0x266d9f(0x9c)]()))};return{'primary':_0x3eff9e,'workers':[_0x3eff9e],'workersConfigured':0x1,'mode':_0x266d9f(0x204)};}[_0x47c38b(0xfe)](){return this['_groupByProcess']();}['treeView'](){const _0x79947e=_0x47c38b,_0x13222e=new Map();for(const _0x2f0f10 of this[_0x79947e(0x14c)]())_0x13222e[_0x79947e(0xc7)](_0x2f0f10[_0x79947e(0x11c)],{..._0x2f0f10,'children':[]});const _0x2e99f9=[];for(const _0x5a186b of _0x13222e['values']()){const _0x5b7e9e=_0x5a186b[_0x79947e(0x192)]?_0x13222e['get'](_0x5a186b[_0x79947e(0x192)]):null;if(_0x5b7e9e&&_0x5b7e9e!==_0x5a186b)_0x5b7e9e['children'][_0x79947e(0xfa)](_0x5a186b);else _0x2e99f9[_0x79947e(0xfa)](_0x5a186b);}const _0xb004e7=(_0x5026ca,_0x320ff9)=>_0x5026ca[_0x79947e(0x176)]===_0x320ff9[_0x79947e(0x176)]?(_0x5026ca[_0x79947e(0x92)]||0x0)-(_0x320ff9['pid']||0x0):(_0x5026ca[_0x79947e(0x176)]??'')<(_0x320ff9['kind']??'')?-0x1:0x1,_0x8cd863=_0x2df2c6=>{const _0x33c9e4=_0x79947e;_0x2df2c6[_0x33c9e4(0x7b)](_0xb004e7);for(const _0x4988e6 of _0x2df2c6)if(_0x4988e6[_0x33c9e4(0xde)][_0x33c9e4(0x72)])_0x8cd863(_0x4988e6[_0x33c9e4(0xde)]);};return _0x8cd863(_0x2e99f9),_0x2e99f9;}[_0x47c38b(0x165)](_0x39361f){const _0x3e9bcf=_0x47c38b;return this['_groupByProcess']()[_0x3e9bcf(0x19b)](_0x33449f=>_0x33449f['processKey']===_0x39361f)??null;}[_0x47c38b(0x14c)](_0x1276bc=Date[_0x47c38b(0x97)]()){const _0x4e230a=_0x47c38b,_0x22f667=new Map();for(const _0x599cca of this[_0x4e230a(0x145)]()){const _0x4643a1=_0x4d2e79(_0x599cca);let _0x362619=_0x22f667[_0x4e230a(0x87)](_0x4643a1);!_0x362619&&(_0x362619={'processKey':_0x4643a1,'nodeKey':_0x4643a1,'pid':_0x599cca[_0x4e230a(0x92)],'ppid':_0x599cca['ppid']??null,'host':_0x599cca[_0x4e230a(0x116)]??null,'kind':_0x599cca[_0x4e230a(0x176)],'role':null,'supervisorKey':_0x599cca['supervisorKey']??null,'slot':_0x599cca[_0x4e230a(0x1b5)]??null,'slotKey':_0x599cca['slotKey']??null,'caps':_0x599cca[_0x4e230a(0xdc)]??null,'lifecycle':_0x599cca[_0x4e230a(0x1d4)]??null,'uptime':Math[_0x4e230a(0xbf)](0x0,Math[_0x4e230a(0x150)]((_0x1276bc-(_0x599cca[_0x4e230a(0x103)]||_0x1276bc))/0x3e8)),'startedAt':_0x599cca['startedAt']??null,'meta':_0x599cca[_0x4e230a(0x193)]??null,'listenAddr':null,'processing':null,'stats':null,'instances':[]},_0x22f667['set'](_0x4643a1,_0x362619));_0x362619[_0x4e230a(0x1ca)][_0x4e230a(0xfa)]({'instanceId':_0x599cca[_0x4e230a(0x13b)]??null,'role':_0x599cca[_0x4e230a(0x1ae)]??null,'listenAddr':_0x599cca['listenAddr']??null,'lifecycle':_0x599cca[_0x4e230a(0x1d4)]??null,'processing':_0x599cca['processing']??null});if(!_0x362619[_0x4e230a(0x1ae)]&&_0x599cca[_0x4e230a(0x1ae)])_0x362619[_0x4e230a(0x1ae)]=_0x599cca[_0x4e230a(0x1ae)];if(!_0x362619[_0x4e230a(0xff)]&&_0x599cca[_0x4e230a(0xff)])_0x362619[_0x4e230a(0xff)]=_0x599cca[_0x4e230a(0xff)];if(!_0x362619[_0x4e230a(0xbd)]&&_0x599cca[_0x4e230a(0xbd)])_0x362619['processing']=_0x599cca['processing'];if(_0x362619['caps']==null&&_0x599cca[_0x4e230a(0xdc)])_0x362619['caps']=_0x599cca['caps'];if(_0x599cca[_0x4e230a(0x1bf)]&&(!_0x362619[_0x4e230a(0x1bf)]||(_0x599cca['stats']['at']??0x0)>(_0x362619[_0x4e230a(0x1bf)]['at']??0x0)))_0x362619[_0x4e230a(0x1bf)]=_0x599cca['stats'];}return[..._0x22f667[_0x4e230a(0x84)]()];}['runtimeProcessesView'](){const _0x494803=_0x47c38b,_0x20e446=[],_0x22df2b={'rss':0x0,'heapUsed':0x0,'processes':0x0};for(const _0x4a8b59 of this[_0x494803(0x14c)]()){_0x20e446[_0x494803(0xfa)]({'processKey':_0x4a8b59['processKey'],'kind':_0x4a8b59['kind'],'pid':_0x4a8b59[_0x494803(0x92)],'supervisorKey':_0x4a8b59['supervisorKey'],'meta':_0x4a8b59[_0x494803(0x193)]??null,'uptime':_0x4a8b59['uptime'],'stats':_0x4a8b59[_0x494803(0x1bf)]??null}),_0x22df2b[_0x494803(0x1c4)]++,_0x4a8b59[_0x494803(0x1bf)]&&(_0x22df2b[_0x494803(0x89)]+=_0x4a8b59['stats'][_0x494803(0x89)]||0x0,_0x22df2b[_0x494803(0xc0)]+=(_0x4a8b59[_0x494803(0x1bf)][_0x494803(0xc0)]||0x0)+(_0x4a8b59['stats'][_0x494803(0x12a)]?.[_0x494803(0xc0)]||0x0));}return{'totals':_0x22df2b,'nodes':_0x20e446};}async['open']({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x1d0688=_0x47c38b;this[_0x1d0688(0x9d)]=this[_0x1d0688(0x9d)]||!!writer,this[_0x1d0688(0x124)]=this[_0x1d0688(0x124)]||!!reader,this[_0x1d0688(0x162)]=kind||this[_0x1d0688(0x162)]||(_0xd83097[_0x1d0688(0xab)]?_0x1d0688(0xc1):'cli'),this[_0x1d0688(0x149)]=supervisorKey??this[_0x1d0688(0x149)],this[_0x1d0688(0x12b)]=listenAddr??this[_0x1d0688(0x12b)],this['_ensureDesired']();if(!writer&&!reader)return null;if(!this['_statusEnv']){const _0x2cbb37=await this[_0x1d0688(0x1ef)]['createEnvironment'](_0xefbd20,{'sync':![],'durability':'fast'});if(!_0x2cbb37[_0x1d0688(0xae)](_0x26e5eb))await _0x2cbb37[_0x1d0688(0x142)](_0x26e5eb);this[_0x1d0688(0x110)]=_0x2cbb37;}return this[_0x1d0688(0x110)];}[_0x47c38b(0x126)](){const _0x21cb52=_0x47c38b;return this[_0x21cb52(0x1f9)]!==this[_0x21cb52(0x110)]&&(this[_0x21cb52(0x1f9)]=this[_0x21cb52(0x110)],this[_0x21cb52(0xb5)]=this[_0x21cb52(0x110)][_0x21cb52(0x190)](_0x26e5eb)[_0x21cb52(0x117)]),this[_0x21cb52(0xb5)];}[_0x47c38b(0x188)](_0x161fcc){const _0x1d35a4=_0x47c38b,_0x221391=this[_0x1d35a4(0x126)]()[_0x1d35a4(0x177)](_0x161fcc['nodeKey'],_0x161fcc,0x1);if(_0x221391&&typeof _0x221391['then']==='function')_0x221391[_0x1d35a4(0x1dd)](undefined,()=>{});return _0x221391;}['_removeRowAsync'](_0x2db9bb){const _0x73dc7a=_0x47c38b,_0x8acc4c=this[_0x73dc7a(0x126)]()[_0x73dc7a(0x9a)](_0x2db9bb);if(_0x8acc4c&&typeof _0x8acc4c['then']===_0x73dc7a(0x198))_0x8acc4c[_0x73dc7a(0x1dd)](undefined,()=>{});return _0x8acc4c;}async[_0x47c38b(0x169)](_0x15bdf3){const _0x14dd30=_0x47c38b;if(!this['_statusEnv']||!this['_isWriter']||!_0x15bdf3?.[_0x14dd30(0x75)])return;return this[_0x14dd30(0x188)](_0x15bdf3);}async[_0x47c38b(0x7f)](_0x3c1d34){const _0x370a79=_0x47c38b;if(!this[_0x370a79(0x110)]||!this['_isWriter']||!_0x3c1d34)return;const _0x1a8005=_0x3c1d34[_0x370a79(0x1fe)]('#'),_0x25bde2=[];for(const {key:_0x239e50}of this[_0x370a79(0x110)][_0x370a79(0x1ad)](_0x26e5eb)){if(_0x239e50===_0x3c1d34||!_0x1a8005&&typeof _0x239e50===_0x370a79(0x6f)&&_0x239e50[_0x370a79(0x141)](_0x3c1d34+'#'))_0x25bde2[_0x370a79(0xfa)](_0x239e50);}return Promise[_0x370a79(0x1aa)](_0x25bde2['map'](_0x18c510=>this['_removeRowAsync'](_0x18c510)));}[_0x47c38b(0x1d8)](_0x2fba69){const _0x4d9853=_0x47c38b;if(typeof _0x2fba69?.['pid']!=='number')return![];if(_0x2fba69[_0x4d9853(0x116)]!==_0x3672e0[_0x4d9853(0x1f3)]())return![];if(_0x2fba69[_0x4d9853(0x92)]===process['pid'])return![];try{return process[_0x4d9853(0xf9)](_0x2fba69[_0x4d9853(0x92)],0x0),![];}catch(_0x217e3f){return _0x217e3f[_0x4d9853(0x1f6)]==='ESRCH';}}[_0x47c38b(0x145)](){const _0x290be9=_0x47c38b;if(!this[_0x290be9(0x110)])return[];const _0x345404=Date[_0x290be9(0x97)](),_0x149edd=[];for(const {value:_0x3c2e57}of this[_0x290be9(0x110)][_0x290be9(0x1ad)](_0x26e5eb)){if(_0x3c2e57&&(_0x3c2e57['expiresAt']==null||_0x3c2e57['expiresAt']>=_0x345404)&&!this[_0x290be9(0x1d8)](_0x3c2e57))_0x149edd[_0x290be9(0xfa)](_0x3c2e57);}return _0x149edd;}['reap'](_0x1d01a7=0x0){const _0x2ab4f6=_0x47c38b;if(!this[_0x2ab4f6(0x110)]||!this[_0x2ab4f6(0x9d)])return;const _0x2c8658=Date['now']()-_0x1d01a7,_0x3327de=new Set(),_0x18490f=[];for(const {key:_0x27c394,value:_0x43856d}of this[_0x2ab4f6(0x110)][_0x2ab4f6(0x1ad)](_0x26e5eb)){if(_0x43856d&&(_0x43856d[_0x2ab4f6(0x13d)]!=null&&_0x43856d['expiresAt']<_0x2c8658||this[_0x2ab4f6(0x1d8)](_0x43856d)))_0x18490f[_0x2ab4f6(0xfa)](_0x27c394);else _0x3327de[_0x2ab4f6(0x135)](_0x4d2e79(_0x43856d)??_0x27c394);}for(const _0x5af27b of _0x18490f)this['_removeRowAsync'](_0x5af27b);if(this[_0x2ab4f6(0x127)]())for(const {key:_0x3a2498}of this[_0x2ab4f6(0xd3)]('node')){if(!_0x3327de['has'](_0x3a2498))this[_0x2ab4f6(0x1cd)][_0x2ab4f6(0x123)](_0x2ab4f6(0xb8)+_0x3a2498);}}[_0x47c38b(0x8c)](_0x2a96ba=null){const _0x933580=_0x47c38b;if(this[_0x933580(0x6d)]||!this[_0x933580(0x9d)]||!this[_0x933580(0x110)])return;this['_onTick']=_0x2a96ba,this[_0x933580(0x199)]=()=>this['_maybePublish']();for(const _0x4f1581 of _0x2476f0)this[_0x933580(0x1ef)][_0x933580(0x70)]['on'](_0x4f1581,this[_0x933580(0x199)]);this[_0x933580(0xb1)]();const _0x29b92c=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x4377c1;this[_0x933580(0x6d)]=setInterval(()=>{const _0xe9a515=_0x933580;if(this['_onTick'])try{this[_0xe9a515(0xe3)]();}catch{}this[_0xe9a515(0xb1)](),this[_0xe9a515(0x155)]();},_0x29b92c);if(this['_hbTimer']['unref'])this[_0x933580(0x6d)][_0x933580(0x184)]();}[_0x47c38b(0x115)](){const _0x97281a=_0x47c38b;if(!this[_0x97281a(0x9d)]||!this['_statusEnv'])return;if(Date[_0x97281a(0x97)]()-this[_0x97281a(0x147)]<_0x4f01d3)return;this['_publishNow']();}[_0x47c38b(0xb1)](){const _0x32fb9a=_0x47c38b;if(!this[_0x32fb9a(0x9d)]||!this['_statusEnv'])return;this[_0x32fb9a(0x147)]=Date[_0x32fb9a(0x97)]();try{const _0x19738d=[this[_0x32fb9a(0xd4)]()];for(const _0x39ca80 of this[_0x32fb9a(0x182)][_0x32fb9a(0x84)]())_0x19738d[_0x32fb9a(0xfa)](this[_0x32fb9a(0x1ed)](_0x39ca80));const _0x3ac06d=_0xfcc22e[_0x32fb9a(0xfc)]?_0xfcc22e[_0x32fb9a(0x97)]():0x0,_0x5516df=Promise[_0x32fb9a(0x1aa)](_0x19738d[_0x32fb9a(0xf6)](_0x4981bc=>this[_0x32fb9a(0x188)](_0x4981bc)))['catch'](()=>{});if(_0xfcc22e[_0x32fb9a(0xfc)])_0xfcc22e[_0x32fb9a(0x121)]('registry-publish',_0xfcc22e[_0x32fb9a(0x97)]()-_0x3ac06d,_0x32fb9a(0x154)+_0x19738d[_0x32fb9a(0x72)]);return _0x5516df;}catch{}}async['stopHeartbeat'](){const _0x2afc6e=_0x47c38b;if(this[_0x2afc6e(0x199)]){for(const _0x56a2ee of _0x2476f0){try{this[_0x2afc6e(0x1ef)]['events'][_0x2afc6e(0xcd)](_0x56a2ee,this['_onProcEvent']);}catch{}}this[_0x2afc6e(0x199)]=null;}this['_hbTimer']&&(clearInterval(this[_0x2afc6e(0x6d)]),this[_0x2afc6e(0x6d)]=null);try{if(this['_statusEnv']&&this[_0x2afc6e(0x9d)])await this[_0x2afc6e(0x7f)](this[_0x2afc6e(0x19c)]);}catch{}}async['deregisterSelf'](){const _0x197660=_0x47c38b;if(!this['_statusEnv']||!this[_0x197660(0x9d)])return;try{await this['removeNode'](this[_0x197660(0x19c)]);}catch{}try{const _0x13eae9=[];for(const {value:_0x31ef8e}of this['_statusEnv'][_0x197660(0x1ad)](_0x26e5eb)){if(_0x31ef8e?.[_0x197660(0x9f)]===process[_0x197660(0x92)]&&_0x31ef8e[_0x197660(0x75)])_0x13eae9['push'](_0x31ef8e['nodeKey']);}for(const _0x602cc1 of _0x13eae9){try{await this[_0x197660(0x7f)](_0x602cc1);}catch{}}}catch{}}async[_0x47c38b(0x86)](){const _0x51da07=_0x47c38b;return this['putNode'](this[_0x51da07(0xd4)]());}async[_0x47c38b(0xa8)](_0x5c29a3){const _0x198f17=_0x47c38b;if(!this['_statusEnv']||!this[_0x198f17(0x9d)])return;return this[_0x198f17(0x169)](this['_buildChildRow'](_0x5c29a3));}[_0x47c38b(0x1ed)]({pid:_0x3c2f20,startedAt:_0x2ccdb5,kind:_0x4b3977,supervisorKey:_0x3fbc52,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle='running',meta:meta=null,stats:stats=null}){const _0x3120b0=_0x47c38b,_0x50cdd0=Date['now'](),_0x3c6880=_0x517179(_0x3c2f20,_0x2ccdb5);return{'nodeKey':_0x5956c8(_0x3c6880,'0'),'processKey':_0x3c6880,'instanceId':'0','pid':_0x3c2f20,'startedAt':_0x2ccdb5,'ppid':process[_0x3120b0(0x92)],'host':_0x3672e0['hostname'](),'supervisorKey':_0x3fbc52,'slot':slot,'slotKey':slotKey,'kind':_0x4b3977,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x50cdd0,'expiresAt':_0x50cdd0+_0x5d09ef,'caps':this[_0x3120b0(0x128)](_0x4b3977,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x47c38b(0x11a)](_0x5ab9db){const _0xec42fc=_0x47c38b;if(!_0x5ab9db?.[_0xec42fc(0x92)])return null;const _0x15c8d9=_0x517179(_0x5ab9db['pid'],_0x5ab9db[_0xec42fc(0x103)]);this[_0xec42fc(0x182)]['set'](_0x15c8d9,{..._0x5ab9db,'supervisorKey':_0x5ab9db[_0xec42fc(0x192)]??this[_0xec42fc(0x93)]});if(this[_0xec42fc(0x9d)])await this[_0xec42fc(0xa8)](this[_0xec42fc(0x182)][_0xec42fc(0x87)](_0x15c8d9))[_0xec42fc(0x1e3)]?.(()=>{});return _0x15c8d9;}['removeSupervisedChild'](_0x707e4d){const _0x3a888a=_0x47c38b;if(!_0x707e4d)return;return this[_0x3a888a(0x182)][_0x3a888a(0xfd)](_0x707e4d),this['removeNode'](_0x707e4d);}['_sampleOwnStats'](){const _0x533648=_0x47c38b,_0x3c26ee=Date[_0x533648(0x97)](),_0x498cf7=process['cpuUsage'](),_0x254d95=(_0x3c26ee-this[_0x533648(0x122)])*0x3e8;if(_0x254d95>=0x3d090){const _0x49765b=_0x498cf7['user']-this['_lastCpuUsage'][_0x533648(0x88)]+(_0x498cf7['system']-this['_lastCpuUsage'][_0x533648(0x1bb)]),_0x140a81=_0x3672e0[_0x533648(0x1d3)]()['length']||0x1;this[_0x533648(0x1b7)]=Math['min'](0x64,Math[_0x533648(0x150)](_0x49765b/(_0x254d95*_0x140a81)*0x64)),this[_0x533648(0xd2)]=Math[_0x533648(0x150)](_0x254d95/0x3e8),this[_0x533648(0xa9)]=_0x498cf7,this['_lastCpuAt']=_0x3c26ee;}const _0x45b196=process[_0x533648(0xcb)]();let _0xb54366=null;if(this[_0x533648(0x14e)][_0x533648(0x1f0)]>0x0){let _0x340f58=0x0;for(const _0x5f500d of this[_0x533648(0x14e)]['values']())_0x340f58+=_0x5f500d[_0x533648(0xc0)]||0x0;_0xb54366={'count':this['_threadStats']['size'],'heapUsed':_0x340f58};}return{'rss':_0x45b196[_0x533648(0x89)],'heapUsed':_0x45b196['heapUsed'],'heapTotal':_0x45b196[_0x533648(0x111)],'external':_0x45b196['external'],'cpuPct':this['_lastCpuPct'],'cpuWindowMs':this[_0x533648(0xd2)]??null,'threads':_0xb54366,'at':_0x3c26ee};}['reportThreadStats'](_0x4da82f,_0x3355be){const _0x2c20af=_0x47c38b;if(!_0x4da82f||!_0x3355be)return;this[_0x2c20af(0x14e)][_0x2c20af(0xc7)](_0x4da82f,_0x3355be);}[_0x47c38b(0xef)](_0x162fe3){const _0x4bffa8=_0x47c38b;this[_0x4bffa8(0x14e)][_0x4bffa8(0xfd)](_0x162fe3);}[_0x47c38b(0x1ba)](_0x29bfb8,_0xa25091,_0x1c28c5=undefined){const _0x374f14=_0x47c38b,_0x188753=this['_children'][_0x374f14(0x87)](_0x29bfb8);if(!_0x188753||!_0xa25091)return;if(_0x1c28c5!==undefined)_0x188753[_0x374f14(0xbd)]=_0x1c28c5;_0x188753[_0x374f14(0x1bf)]={'rss':_0xa25091[_0x374f14(0x89)]??null,'heapUsed':_0xa25091[_0x374f14(0xc0)]??null,'heapTotal':_0xa25091[_0x374f14(0x111)]??null,'external':_0xa25091[_0x374f14(0x12d)]??null,'cpuPct':_0xa25091[_0x374f14(0x180)]??null,'cpuWindowMs':_0xa25091['cpuWindowMs']??null,'threads':_0xa25091[_0x374f14(0x12a)]??null,'claims':_0xa25091[_0x374f14(0xc2)]??null,'envsOpen':_0xa25091['envsOpen']??null,'at':Date[_0x374f14(0x97)]()};}[_0x47c38b(0xd4)](){const _0x133164=_0x47c38b,_0x191c5f=Date['now'](),_0x1bdd6e=this['okdb']['_role']||{},_0x458e8d=this[_0x133164(0x162)]||'cli';return{'nodeKey':this[_0x133164(0x19c)],'processKey':this[_0x133164(0x93)],'instanceId':this[_0x133164(0x94)],'pid':process[_0x133164(0x92)],'startedAt':this[_0x133164(0xc8)],'instanceStartedAt':this[_0x133164(0x18c)],'ppid':typeof process[_0x133164(0x9f)]===_0x133164(0x1bc)?process[_0x133164(0x9f)]:null,'host':_0x3672e0[_0x133164(0x1f3)](),'supervisorKey':this['_supervisorKey']??null,'kind':_0x458e8d,'role':{'engines':!!_0x1bdd6e['engines'],'asyncProcessors':!!_0x1bdd6e['asyncProcessors'],'compaction':_0x1bdd6e[_0x133164(0xec)],'http':_0x1bdd6e[_0x133164(0x12e)]},'listenAddr':this[_0x133164(0x12b)]??null,'heartbeatAt':_0x191c5f,'expiresAt':_0x191c5f+_0x5d09ef,'caps':this[_0x133164(0x128)](_0x458e8d,_0x1bdd6e),'lifecycle':{'state':_0x133164(0x12c),'desiredVersionApplied':null},'meta':{...this[_0x133164(0x1f5)]},'processing':_0x1bdd6e['asyncProcessors']?this[_0x133164(0x1d0)]():null,'stats':this['_sampleOwnStats']()};}[_0x47c38b(0x1d0)](){const _0x33529c=_0x47c38b,_0x10ae39=[];try{for(const [_0x2070a0,_0x977fa1]of this[_0x33529c(0x1ef)][_0x33529c(0x7c)]){if(_0x2070a0[_0x33529c(0x141)]('~'))continue;for(const _0x2335d8 of _0x977fa1[_0x33529c(0x170)]['tierList']())_0x10ae39['push']({..._0x2335d8,'env':_0x2070a0});}}catch{}return{'policy':this[_0x33529c(0x1ef)][_0x33529c(0x139)]??null,'processors':_0x10ae39};}[_0x47c38b(0x127)](){const _0x16b6f9=_0x47c38b;if(this[_0x16b6f9(0x1cd)])return!![];const _0x3e8549=this[_0x16b6f9(0x1ef)][_0x16b6f9(0xb2)];if(!_0x3e8549)return![];return this['_desired']=_0x3e8549['openDB'](_0x49321f,{'dupSort':![]}),this[_0x16b6f9(0xd7)]=_0x3e8549[_0x16b6f9(0x17b)](_0x6a7cb,{'dupSort':![]}),!![];}[_0x47c38b(0x195)](){return!!this['_desired'];}[_0x47c38b(0x164)](_0x4404a4,_0x543d99){const _0x1bce73=_0x47c38b;if(!this['_ensureDesired']())return null;return this[_0x1bce73(0x1cd)][_0x1bce73(0x87)](_0x4404a4+'/'+_0x543d99)??null;}[_0x47c38b(0x17e)](_0x2f3a03,_0x462d94,_0x56dd0c){const _0x2d076a=_0x47c38b;if(!this[_0x2d076a(0x127)]())return null;const _0x45ceac=_0x2f3a03+'/'+_0x462d94;let _0x3377b9;return this[_0x2d076a(0x1cd)][_0x2d076a(0x202)](()=>{const _0x229c30=_0x2d076a,_0x490d4e=this['_desired'][_0x229c30(0x87)](_0x45ceac)||{'version':0x0};_0x3377b9=(_0x490d4e[_0x229c30(0x166)]||0x0)+0x1,this['_desired']['put'](_0x45ceac,{..._0x490d4e,..._0x56dd0c,'version':_0x3377b9,'updatedAt':Date[_0x229c30(0x97)]()});}),_0x3377b9;}[_0x47c38b(0xd3)](_0x478873){const _0x1ad4cc=_0x47c38b;if(!this[_0x1ad4cc(0x127)]())return[];const _0x41f2b6=_0x478873+'/',_0x4f6f7b=[];for(const {key:_0x6d78cb,value:_0x157cfb}of this[_0x1ad4cc(0x1cd)][_0x1ad4cc(0x1ad)]({'start':_0x41f2b6,'end':_0x41f2b6+'ÿ'})){if(typeof _0x6d78cb!==_0x1ad4cc(0x6f)||!_0x6d78cb[_0x1ad4cc(0x141)](_0x41f2b6))break;_0x4f6f7b[_0x1ad4cc(0xfa)]({'key':_0x6d78cb[_0x1ad4cc(0x12f)](_0x41f2b6[_0x1ad4cc(0x72)]),'value':_0x157cfb});}return _0x4f6f7b;}['getCmd'](_0x5e46d9){const _0x2038c6=_0x47c38b;if(!this[_0x2038c6(0x127)]())return null;return this['_cmd'][_0x2038c6(0x87)](_0x5e46d9)??null;}['bumpCmd'](_0x522415,_0x187ea1,_0x8d57b3={}){const _0x55d891=_0x47c38b;if(!this[_0x55d891(0x127)]())return null;let _0x589bd8;return this['_cmd'][_0x55d891(0x202)](()=>{const _0x20071d=_0x55d891,_0x52c356=this[_0x20071d(0xd7)][_0x20071d(0x87)](_0x522415)||{'epoch':0x0};_0x589bd8=(_0x52c356[_0x20071d(0x16e)]||0x0)+0x1,this[_0x20071d(0xd7)][_0x20071d(0x177)](_0x522415,{..._0x52c356,..._0x8d57b3,'cmd':_0x187ea1,'epoch':_0x589bd8,'updatedAt':Date['now']()});}),_0x589bd8;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x4c042f,'nodeKey':_0x517179,'logicalKey':_0x963705,'slotKey':_0x428f06,'PROCESS_ENV':_0xefbd20,'NODE_TYPE':_0x26e5eb},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x103ff7=_0xd218e;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x3e6d75=require$$0$2,{EVENTS:_0x36ec68,CHANGE_ACTIONS:_0x3bb655}=requireOkdbEnums(),{LOOP:_0xc36c4f}=requireOkdbLoopMonitor(),_0x521d39=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x2cac48=0x5,_0xbefe9d=0x2710;class _0x2c4bbf extends _0x3e6d75{constructor(_0x1c8bdb,_0x405bce={}){const _0x2c5edb=_0x2a26;super(),this[_0x2c5edb(0x1ef)]=_0x1c8bdb,this[_0x2c5edb(0x194)]=_0x405bce['quantum']??_0x521d39,this['_flushDebounce']=_0x405bce[_0x2c5edb(0xd6)]??_0x2cac48,this[_0x2c5edb(0x1bd)]=_0x405bce[_0x2c5edb(0xca)]??_0xbefe9d,this[_0x2c5edb(0xa6)]=![],this[_0x2c5edb(0x1fa)]=new Map(),this[_0x2c5edb(0x1c6)]=new Map(),this[_0x2c5edb(0x1b4)]=new Map(),this[_0x2c5edb(0x1c3)]=null,this[_0x2c5edb(0x137)]=![],this[_0x2c5edb(0x1b1)]=new Set(),this['_onItem']=_0x71a3db=>this[_0x2c5edb(0x1a6)](_0x71a3db),this[_0x2c5edb(0x1df)]=_0x520bb8=>this['_handlePoke'](_0x520bb8),this[_0x2c5edb(0xa1)]=()=>this[_0x2c5edb(0x76)]();}[_0x103ff7(0x18f)](){const _0x134ca4=_0x103ff7;if(this[_0x134ca4(0xa6)])return;this[_0x134ca4(0xa6)]=!![];for(const [_0x26998e,_0x5d7878]of this[_0x134ca4(0x1ef)][_0x134ca4(0x7c)]){if(_0x26998e[_0x134ca4(0x141)]('~'))continue;try{this[_0x134ca4(0x1c6)][_0x134ca4(0xc7)](_0x26998e,_0x5d7878[_0x134ca4(0x197)]()||0x0);}catch{}}const {events:_0x58441b}=this['okdb'];_0x58441b['on'](_0x36ec68[_0x134ca4(0xf1)],this['_onItem']),_0x58441b['on'](_0x36ec68['ITEM_UPDATE'],this[_0x134ca4(0xb3)]),_0x58441b['on'](_0x36ec68['ITEM_REMOVE'],this['_onItem']),_0x58441b['on'](_0x36ec68[_0x134ca4(0xe8)],this[_0x134ca4(0x1df)]),_0x58441b[_0x134ca4(0xd5)](_0x36ec68[_0x134ca4(0xbe)],this[_0x134ca4(0xa1)]);}[_0x103ff7(0x76)](){const _0x52e3cf=_0x103ff7;if(!this[_0x52e3cf(0xa6)])return;this[_0x52e3cf(0xa6)]=![];const {events:_0x70d1d7}=this['okdb'];_0x70d1d7['off'](_0x36ec68[_0x52e3cf(0xf1)],this['_onItem']),_0x70d1d7['off'](_0x36ec68[_0x52e3cf(0x1b8)],this[_0x52e3cf(0xb3)]),_0x70d1d7[_0x52e3cf(0xcd)](_0x36ec68[_0x52e3cf(0x13e)],this[_0x52e3cf(0xb3)]),_0x70d1d7[_0x52e3cf(0xcd)](_0x36ec68[_0x52e3cf(0xe8)],this[_0x52e3cf(0x1df)]);try{_0x70d1d7[_0x52e3cf(0xcd)](_0x36ec68[_0x52e3cf(0xbe)],this[_0x52e3cf(0xa1)]);}catch{}this['_flushTimer']&&(clearTimeout(this[_0x52e3cf(0x1c3)]),this[_0x52e3cf(0x1c3)]=null),this[_0x52e3cf(0x1b4)][_0x52e3cf(0x1d2)](),this[_0x52e3cf(0x1fa)][_0x52e3cf(0x1d2)](),this[_0x52e3cf(0x1c6)][_0x52e3cf(0x1d2)](),this[_0x52e3cf(0x1b1)][_0x52e3cf(0x1d2)]();}[_0x103ff7(0x14f)](_0x356f96,_0x5bd46a,_0x581234,_0x29d5bb){return _0x356f96+'\x00'+_0x5bd46a+'\x00'+_0x581234+'\x00'+_0x29d5bb;}['_markSeen'](_0x4d35f4,_0x1e2623,_0x1473aa,_0x469a26){const _0x449722=_0x103ff7,_0x178017=this[_0x449722(0x14f)](_0x4d35f4,_0x1e2623,_0x1473aa,_0x469a26);if(this[_0x449722(0x1b1)][_0x449722(0x144)](_0x178017))return![];this[_0x449722(0x1b1)][_0x449722(0x135)](_0x178017);if(this[_0x449722(0x1b1)][_0x449722(0x1f0)]>this[_0x449722(0x1bd)]){const _0x3f8ad0=this[_0x449722(0x1b1)]['values']()[_0x449722(0x8b)]()['value'];this[_0x449722(0x1b1)][_0x449722(0xfd)](_0x3f8ad0);}return!![];}['_handleInProcess'](_0xda90fa){const _0x45acfc=_0x103ff7;if(!this[_0x45acfc(0xa6)]||!_0xda90fa)return;const {env:_0x487ca1,type:_0x1f6b29,key:_0x52c8d4,clock:_0x24a5d9,origin:_0x5b7194,action:_0x3caf93,newValue:_0xe4a94d,oldValue:_0x7d686b}=_0xda90fa;if(_0x487ca1==null||_0x1f6b29==null||_0x52c8d4==null)return;if(typeof _0x487ca1===_0x45acfc(0x6f)&&_0x487ca1[_0x45acfc(0x141)]('~'))return;if(typeof _0x1f6b29===_0x45acfc(0x6f)&&_0x1f6b29[_0x45acfc(0x141)]('~'))return;if(!this['_markSeen'](_0x487ca1,_0x1f6b29,_0x52c8d4,_0x24a5d9))return;const _0x344882=_0x3caf93===_0x3bb655['REMOVE']?_0x45acfc(0x9a):'put';this['emit'](_0x45acfc(0x1e0),{'env':_0x487ca1,'type':_0x1f6b29,'key':_0x52c8d4,'op':_0x344882,'clock':_0x24a5d9,'origin':_0x5b7194,'value':_0x344882==='remove'?null:_0xe4a94d,'prevValue':_0x7d686b});}[_0x103ff7(0xf5)](_0x864ca5){const _0xb82147=_0x103ff7;if(!this[_0xb82147(0xa6)])return;if(!_0x864ca5||typeof _0x864ca5[_0xb82147(0x1cb)]!=='string'||typeof _0x864ca5[_0xb82147(0xf0)]!==_0xb82147(0x6f))return;const {env:_0x9986ae,type:_0x48bb38}=_0x864ca5;if(_0x9986ae[_0xb82147(0x141)]('~')||_0x48bb38[_0xb82147(0x141)]('~'))return;this['_pending'][_0xb82147(0xc7)](_0x9986ae+'\x00'+_0x48bb38,{'env':_0x9986ae,'type':_0x48bb38}),this[_0xb82147(0x13f)]();}['_scheduleFlush'](){const _0x37e312=_0x103ff7;if(this['_flushTimer'])return;const _0x3347ca=()=>{const _0x5bd558=_0x2a26;this[_0x5bd558(0x1c3)]=null,this[_0x5bd558(0x138)]()['catch'](()=>{});};this[_0x37e312(0x1c3)]=setTimeout(_0x3347ca,this[_0x37e312(0x1cf)]>0x0?this['_flushDebounce']:0x0);}async['_drain'](){const _0x29f9e7=_0x103ff7;if(this[_0x29f9e7(0x137)]){this[_0x29f9e7(0x13f)]();return;}this[_0x29f9e7(0x137)]=!![];try{const _0x8ca108=[...this['_pending']['values']()];this[_0x29f9e7(0x1b4)][_0x29f9e7(0x1d2)]();let _0x1f9d15=![];for(const {env:_0x312255,type:_0x1bd1a5}of _0x8ca108){try{const _0x5298f7=await this[_0x29f9e7(0x146)](_0x312255,_0x1bd1a5);if(_0x5298f7)_0x1f9d15=!![];}catch{this[_0x29f9e7(0x1b4)][_0x29f9e7(0xc7)](_0x312255+'\x00'+_0x1bd1a5,{'env':_0x312255,'type':_0x1bd1a5}),_0x1f9d15=!![];}}if(_0x1f9d15||this[_0x29f9e7(0x1b4)][_0x29f9e7(0x1f0)]>0x0)this[_0x29f9e7(0x13f)]();}finally{this[_0x29f9e7(0x137)]=![];}}async[_0x103ff7(0x146)](_0x16fc39,_0x358c6e){const _0x1d6792=_0x103ff7,_0x5a6ade=await this[_0x1d6792(0x1ef)][_0x1d6792(0x113)](_0x16fc39),_0x8d9111=_0x16fc39+'\x00'+_0x358c6e;!this['_cursors'][_0x1d6792(0x144)](_0x8d9111)&&(!this['_baselines']['has'](_0x16fc39)&&this[_0x1d6792(0x1c6)][_0x1d6792(0xc7)](_0x16fc39,_0x5a6ade[_0x1d6792(0x197)]()||0x0),this[_0x1d6792(0x1fa)][_0x1d6792(0xc7)](_0x8d9111,this[_0x1d6792(0x1c6)][_0x1d6792(0x87)](_0x16fc39)));const _0x3f7394=this[_0x1d6792(0x1fa)][_0x1d6792(0x87)](_0x8d9111),_0x4081e0=_0x5a6ade[_0x1d6792(0x197)](_0x358c6e)||0x0;if(_0x4081e0<=_0x3f7394)return![];const _0x3c08b3=_0x3f7394+this[_0x1d6792(0x194)],_0x37f589=Math[_0x1d6792(0xa7)](_0x4081e0,_0x3c08b3),_0x4055b5=_0xc36c4f[_0x1d6792(0xfc)]?_0xc36c4f[_0x1d6792(0x97)]():0x0,_0x3a5169=Array[_0x1d6792(0x1b6)](_0x5a6ade[_0x1d6792(0x186)](_0x358c6e,_0x3f7394+0x1,_0x37f589));let _0xc9c2b0=_0x3f7394;for(const _0x42905c of _0x3a5169){const {clock:_0x565e22,key:_0x5854d2,action:_0x83de37,origin:_0x4978dd}=_0x42905c;if(_0x565e22>_0xc9c2b0)_0xc9c2b0=_0x565e22;if(_0x5854d2==null)continue;if(!this[_0x1d6792(0x1fd)](_0x16fc39,_0x358c6e,_0x5854d2,_0x565e22))continue;let _0x43a3ef,_0x150f76;if(_0x83de37===_0x3bb655[_0x1d6792(0xa3)])_0x43a3ef=_0x1d6792(0x9a),_0x150f76=null;else{const _0xa1ffe5=_0x5a6ade[_0x1d6792(0x87)](_0x358c6e,_0x5854d2);_0xa1ffe5==null?(_0x43a3ef=_0x1d6792(0x9a),_0x150f76=null):(_0x43a3ef=_0x1d6792(0x177),_0x150f76=_0xa1ffe5);}this[_0x1d6792(0xe4)](_0x1d6792(0x1e0),{'env':_0x16fc39,'type':_0x358c6e,'key':_0x5854d2,'op':_0x43a3ef,'clock':_0x565e22,'origin':_0x4978dd,'value':_0x150f76});}if(_0xc36c4f[_0x1d6792(0xfc)])_0xc36c4f[_0x1d6792(0x121)]('feed:'+_0x16fc39+':'+_0x358c6e,_0xc36c4f[_0x1d6792(0x97)]()-_0x4055b5,'n='+_0x3a5169[_0x1d6792(0x72)]);return this[_0x1d6792(0x1fa)]['set'](_0x8d9111,Math[_0x1d6792(0xbf)](_0xc9c2b0,_0x37f589)),_0x5a6ade['getClock'](_0x358c6e)>_0x37f589;}[_0x103ff7(0xd0)](){const _0x16050e=_0x103ff7;return{'started':this[_0x16050e(0xa6)],'quantum':this[_0x16050e(0x194)],'flushDebounce':this[_0x16050e(0x1cf)],'cursors':Object[_0x16050e(0x1c8)]([...this['_cursors']['entries']()][_0x16050e(0xf6)](([_0x1b31f9,_0x61f63a])=>[_0x1b31f9[_0x16050e(0x125)]('\x00',':'),_0x61f63a])),'pending':this['_pending'][_0x16050e(0x1f0)],'seen':this[_0x16050e(0x1b1)][_0x16050e(0x1f0)]};}}return _0x2c4bbf[_0x103ff7(0x7a)]=_0x521d39,okdbChangefeed={'OKDBChangefeed':_0x2c4bbf},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x3350ab=_0xd218e;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x57edd3=require$$1,_0x183e5e=require$$1$1,{EVENTS:_0x94bf1f}=requireOkdbEnums(),_0x3f9272=require$$0$1,{slotKey:_0x1e30be}=requireOkdbProcessRegistry(),_0x52a75f=0xfa,_0x538d4e=0xfa0,_0xc5a1d6=0x5,_0x465c74=0x2710,_0x501452=0xbb8,_0x28d8bc=0x7d0,_0x2e49aa=_0x3350ab(0x95),_0x394b29=_0x3350ab(0x1e2),_0x53c861=_0x3350ab(0x153),_0x132dfd=_0x3350ab(0x1bf),_0x29a64f=[_0x94bf1f[_0x3350ab(0xa5)],_0x94bf1f['FTS_REGISTERED'],_0x94bf1f[_0x3350ab(0x206)],_0x94bf1f[_0x3350ab(0x161)],_0x94bf1f[_0x3350ab(0x1d7)],_0x94bf1f['INDEX_READY'],_0x94bf1f[_0x3350ab(0x10d)],_0x94bf1f[_0x3350ab(0x1db)],_0x3350ab(0x157),_0x3350ab(0xb0),_0x3350ab(0xa0),_0x3350ab(0x14a),'processor:resumed',_0x3350ab(0x16a)],_0x304581=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x3a93d7({workers:_0x52d995,makeOkdb:_0x22323b,port:_0x253710,primaryOkdb:_0x2cbd1e,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x520e44=_0x3350ab;if(_0x57edd3[_0x520e44(0xce)])return childEntry&&_0x57edd3[_0x520e44(0xf2)]({'exec':_0x183e5e[_0x520e44(0x1b3)](__dirname,_0x520e44(0x11f)),'args':[],'execArgv':((()=>{const _0x4b435d=_0x520e44,_0x319faf=[];for(let _0x34eb63=0x0;_0x34eb63<process['execArgv'][_0x4b435d(0x72)];_0x34eb63++){const _0x2ab9d9=process[_0x4b435d(0x17c)][_0x34eb63];if(_0x2ab9d9[_0x4b435d(0x141)](_0x4b435d(0x15d))||_0x2ab9d9[_0x4b435d(0x141)]('--watch')||_0x2ab9d9['startsWith'](_0x4b435d(0x19d)))continue;if(_0x2ab9d9==='-e'||_0x2ab9d9==='--eval'||_0x2ab9d9==='-p'||_0x2ab9d9===_0x4b435d(0xdb)){_0x34eb63++;continue;}_0x319faf['push'](_0x2ab9d9);}return _0x319faf;})())}),_0x22b516({'workers':_0x52d995,'port':_0x253710,'primaryOkdb':_0x2cbd1e,'workerEnv':workerEnv});return _0x3d4b6b({'makeOkdb':_0x22323b,'port':_0x253710});}function _0x22b516({workers:_0x583833,port:_0x57dd5c,primaryOkdb:_0x12fafb,workerEnv:_0x35b218}){const _0x3367f9=_0x3350ab,_0x26bb95=new Map(),_0xafaab8=new Map();let _0x5f2193=![];const _0x86974=_0x512ac3=>_0x512ac3?.[_0x3367f9(0x1c9)],_0x56b52a=_0x1c9b4c=>{const _0x4038eb=_0x3367f9,_0x2fde8c=_0x57edd3['fork']({...process.env,..._0x35b218||{},'OKDB_CLUSTER_SLOT':String(_0x1c9b4c)});return _0x2fde8c[_0x4038eb(0x1c9)]=_0x1c9b4c,_0x26bb95[_0x4038eb(0xc7)](_0x2fde8c[_0x4038eb(0x10f)]['pid'],{'worker':_0x2fde8c,'startedAt':Date[_0x4038eb(0x97)](),'slot':_0x1c9b4c}),_0x2fde8c['on'](_0x4038eb(0x100),_0x2ec2fd=>{const _0x5a05bd=_0x4038eb;console['log'](_0x5a05bd(0x11e)+_0x2fde8c[_0x5a05bd(0x10f)][_0x5a05bd(0x92)]+_0x5a05bd(0x1ec)+(_0x2ec2fd?.['message']??_0x2ec2fd));}),_0x2fde8c['on'](_0x4038eb(0x114),()=>_0x1b7b01()),_0x2fde8c;},_0x15f4a5=_0x29a7ba=>{const _0xa14b9d=_0x3367f9;for(const {worker:_0x3e933f}of _0x26bb95[_0xa14b9d(0x84)]()){if(_0x3e933f[_0xa14b9d(0x196)]()||!_0x3e933f[_0xa14b9d(0xda)]())continue;try{_0x3e933f[_0xa14b9d(0x174)](_0x29a7ba);}catch{}}};_0x12fafb?.[_0x3367f9(0x1b9)]?.({'kind':_0x3367f9(0xbb),'listenAddr':':'+_0x57dd5c})[_0x3367f9(0x1e3)](()=>{}),_0x12fafb?.['processes']?.['setOwnMeta']?.({'workersConfigured':_0x583833});const _0x2e7784={'engines':![],'asyncProcessors':![],'compaction':_0x3367f9(0x1e5),'http':!![]},_0x1b7b01=()=>{const _0x453904=_0x3367f9,_0xf6607=_0x12fafb?.[_0x453904(0x1c4)];if(!_0xf6607||!_0xf6607[_0x453904(0x9d)])return;const _0x1d94a2=_0xf6607['selfKey'];for(const {worker:_0x5384af,startedAt:_0xc380aa,slot:_0x569562,stats:_0x7570b2}of _0x26bb95[_0x453904(0x84)]()){if(_0x5384af[_0x453904(0x196)]())continue;const _0x176d49=_0xf6607[_0x453904(0x195)]?.()&&_0xf6607['getDesired']('slot',_0x3721ae(_0x569562))?.[_0x453904(0x1c7)]===!![];_0xf6607[_0x453904(0xa8)]({'pid':_0x5384af['process'][_0x453904(0x92)],'startedAt':_0xc380aa,'kind':_0x453904(0xc1),'supervisorKey':_0x1d94a2,'slot':_0x569562,'slotKey':_0x3721ae(_0x569562),'role':_0x2e7784,'listenAddr':':'+_0x57dd5c,'lifecycle':_0x176d49?'decommissioning':_0x453904(0x12c),'stats':_0x7570b2??null})['catch'](()=>{});}},_0x3721ae=_0x990350=>_0x1e30be(_0x3367f9(0x14b)+_0x57dd5c,_0x990350),_0x1dec19=_0x2febb4=>{const _0x56e8cd=_0x3367f9,_0x2dfb5e=_0x12fafb?.[_0x56e8cd(0x1c4)];if(!_0x2dfb5e?.[_0x56e8cd(0x195)]?.())return![];return _0x2dfb5e[_0x56e8cd(0x164)]('slot',_0x3721ae(_0x2febb4))?.['decommission']===!![];};for(let _0x23a4eb=0x0;_0x23a4eb<_0x583833;_0x23a4eb++){const _0x57f13a=_0x1dec19(_0x23a4eb);_0xafaab8['set'](_0x23a4eb,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x57f13a,'respawnTimer':null}),_0x57f13a?console['log'](_0x3367f9(0x130)+_0x23a4eb+_0x3367f9(0x16b)):_0x56b52a(_0x23a4eb);}const _0xa7141a=()=>{const _0x3b21cf=_0x3367f9,_0x274f5b=_0x12fafb?.[_0x3b21cf(0x1c4)];if(!_0x274f5b?.[_0x3b21cf(0x9d)]||!_0x274f5b['hasDesired']?.())return;for(const [_0x15b99b,_0x3dd6e0]of _0xafaab8[_0x3b21cf(0x1c0)]()){const _0x2fa57c=_0x274f5b[_0x3b21cf(0x164)](_0x3b21cf(0x1b5),_0x3721ae(_0x15b99b)),_0x116120=_0x2fa57c?.[_0x3b21cf(0x1c7)]===!![],_0x3b16f5=_0x2fa57c?.[_0x3b21cf(0xf9)]===!![];if(_0x116120&&!_0x3dd6e0['dead']){_0x3dd6e0['dead']=!![];_0x3dd6e0['respawnTimer']&&(clearTimeout(_0x3dd6e0[_0x3b21cf(0x15a)]),_0x3dd6e0[_0x3b21cf(0x15a)]=null);for(const {worker:_0x378154}of _0x26bb95['values']()){if(_0x86974(_0x378154)!==_0x15b99b||_0x378154[_0x3b21cf(0x196)]())continue;try{if(_0x3b16f5)_0x378154[_0x3b21cf(0x10f)]['kill'](_0x3b21cf(0x17f));else _0x378154[_0x3b21cf(0xda)]()&&_0x378154[_0x3b21cf(0x18d)]();}catch{}}console[_0x3b21cf(0x153)](_0x3b21cf(0x1eb)+(_0x3b16f5?_0x3b21cf(0x1f1):'decommissioned')+_0x3b21cf(0x105)+_0x15b99b+_0x3b21cf(0x1d5));}else{if(!_0x116120&&_0x3dd6e0['dead']&&_0x2fa57c){_0x3dd6e0[_0x3b21cf(0x9e)]=![],_0x3dd6e0[_0x3b21cf(0x98)]=[],_0x3dd6e0[_0x3b21cf(0xdf)]=0x0;const _0x5c73f4=[..._0x26bb95['values']()][_0x3b21cf(0x15e)](({worker:_0x56ec88})=>_0x86974(_0x56ec88)===_0x15b99b&&!_0x56ec88['isDead']());!_0x5c73f4&&!_0x5f2193&&(_0x56b52a(_0x15b99b),console['log'](_0x3b21cf(0x1a2)+_0x15b99b));}}}},_0x45e583=()=>{try{_0xa7141a();}catch{}};_0x12fafb?.['events']?.['on']?.(_0x94bf1f['SYSTEM_PROC'],_0x45e583);const _0x14753e=[];if(_0x12fafb?.[_0x3367f9(0x70)]?.['on'])for(const _0x505b34 of _0x29a64f){const _0x57a114=_0x2b8eb1=>{_0x15f4a5({[_0x2e49aa]:_0x394b29,'event':_0x505b34,'data':_0x2b8eb1??{}});};_0x12fafb[_0x3367f9(0x70)]['on'](_0x505b34,_0x57a114),_0x14753e[_0x3367f9(0xfa)]({'event':_0x505b34,'handler':_0x57a114});}const _0xb99a6d=setInterval(()=>{_0xa7141a(),_0x1b7b01();},_0x304581);_0xb99a6d['unref']?.();const _0x17c037=(_0x4058a1,_0x7ad87c)=>{const _0x46781a=_0x3367f9;if(!_0x7ad87c||typeof _0x7ad87c!==_0x46781a(0x191)||_0x7ad87c[_0x2e49aa]!==_0x53c861)return;if(!_0x12fafb?.[_0x46781a(0x153)]?.[_0x46781a(0x1d9)])return;const _0x2b7e62=_0x7ad87c[_0x46781a(0xb9)]||{};_0x12fafb['log'][_0x46781a(0x1d9)]({..._0x2b7e62,'msg':'[w'+_0x7ad87c[_0x46781a(0x1b5)]+']\x20'+(_0x2b7e62[_0x46781a(0x1a7)]??''),'meta':{..._0x2b7e62['meta']||{},'worker':_0x7ad87c[_0x46781a(0x1b5)],'workerPid':_0x7ad87c['pid']}});};_0x57edd3['on'](_0x3367f9(0x6c),_0x17c037);const _0x5ed5d8=(_0x200b20,_0x3d486d)=>{const _0x55d242=_0x3367f9;if(!_0x3d486d||typeof _0x3d486d!=='object'||_0x3d486d[_0x2e49aa]!==_0x132dfd)return;const _0x45e51e=_0x26bb95[_0x55d242(0x87)](_0x200b20[_0x55d242(0x10f)]['pid']);if(_0x45e51e)_0x45e51e[_0x55d242(0x1bf)]={..._0x3d486d['stats'],'at':Date[_0x55d242(0x97)]()};};_0x57edd3['on']('message',_0x5ed5d8),_0x57edd3['on'](_0x3367f9(0xb4),(_0x6cf6ec,_0x2e3a7a,_0x44959c)=>{const _0x1bca9f=_0x3367f9,_0xc0f7b2=_0x6cf6ec[_0x1bca9f(0x10f)][_0x1bca9f(0x92)],_0x2bf8bd=_0x86974(_0x6cf6ec),_0x3e7e8d=_0x26bb95[_0x1bca9f(0x87)](_0xc0f7b2);if(_0x3e7e8d&&_0x12fafb?.[_0x1bca9f(0x1c4)])_0x12fafb[_0x1bca9f(0x1c4)][_0x1bca9f(0x7f)](_0xc0f7b2+':'+_0x3e7e8d[_0x1bca9f(0x103)])[_0x1bca9f(0x1e3)](()=>{});_0x26bb95[_0x1bca9f(0xfd)](_0xc0f7b2),console['log'](_0x1bca9f(0x11e)+_0xc0f7b2+_0x1bca9f(0x1e4)+(_0x2bf8bd??'?')+_0x1bca9f(0x13c)+(_0x1bca9f(0x1ce)+_0x2e3a7a+',\x20signal='+(_0x44959c??_0x1bca9f(0x185))+_0x1bca9f(0x160)+_0x26bb95[_0x1bca9f(0x1f0)]+_0x1bca9f(0x1b0))),_0x1b7b01();if(_0x5f2193||_0x2bf8bd==null)return;const _0x5056b8=_0xafaab8[_0x1bca9f(0x87)](_0x2bf8bd);if(!_0x5056b8||_0x5056b8[_0x1bca9f(0x9e)])return;const _0x2b336f=Date[_0x1bca9f(0x97)]();_0x5056b8[_0x1bca9f(0x98)][_0x1bca9f(0xfa)](_0x2b336f),_0x5056b8[_0x1bca9f(0x98)]=_0x5056b8[_0x1bca9f(0x98)]['filter'](_0x37828c=>_0x2b336f-_0x37828c<=_0x465c74);if(_0x5056b8[_0x1bca9f(0x98)]['length']>=_0xc5a1d6){_0x5056b8['dead']=!![],console['error']('[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot='+_0x2bf8bd+'\x20died\x20'+_0x5056b8[_0x1bca9f(0x98)][_0x1bca9f(0x72)]+'\x20times\x20in\x20'+(_0x465c74+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x26bb95[_0x1bca9f(0x1f0)]+_0x1bca9f(0x1a5)));return;}_0x5056b8[_0x1bca9f(0xdf)]++;const _0x462e80=Math['min'](_0x538d4e,_0x52a75f*0x2**(_0x5056b8['consecutiveFailures']-0x1));console['log'](_0x1bca9f(0xdd)+_0x2bf8bd+_0x1bca9f(0xcc)+_0x462e80+'ms\x20(attempt\x20'+_0x5056b8['consecutiveFailures']+')'),_0x5056b8[_0x1bca9f(0x15a)]=setTimeout(()=>{const _0x21d817=_0x1bca9f;_0x5056b8[_0x21d817(0x15a)]=null;if(_0x5f2193||_0x5056b8['dead'])return;const _0x14fefa=_0x56b52a(_0x2bf8bd);_0x14fefa[_0x21d817(0xd5)]('listening',()=>{const _0x3c0010=_0x21d817;if(_0xafaab8[_0x3c0010(0x87)](_0x2bf8bd)===_0x5056b8)_0x5056b8[_0x3c0010(0xdf)]=0x0;});},_0x462e80),_0x5056b8[_0x1bca9f(0x15a)][_0x1bca9f(0x184)]?.();});const _0x4a95ac=[..._0x26bb95[_0x3367f9(0xf4)]()];console[_0x3367f9(0x153)](_0x3367f9(0xa2)+process[_0x3367f9(0x92)]+_0x3367f9(0x19a)+_0x583833+'\x20HTTP\x20server(s)\x20on\x20port\x20'+_0x57dd5c+':\x20'+('['+_0x4a95ac[_0x3367f9(0x1b3)](',\x20')+']'));const _0x4c6907={'_isClusterController':!![],'port':_0x57dd5c,'primaryOkdb':_0x12fafb??null,'status'(){const _0x37c1c6=_0x3367f9;return{'clustered':!![],'primaryPid':process[_0x37c1c6(0x92)],'port':_0x57dd5c,'primaryRole':_0x12fafb?.[_0x37c1c6(0x1ae)]??null,'processorPid':_0x12fafb?process[_0x37c1c6(0x92)]:null,'workers':[..._0x26bb95[_0x37c1c6(0x84)]()]['map'](({worker:_0x268984})=>({'pid':_0x268984[_0x37c1c6(0x10f)]['pid'],'id':_0x268984['id'],'dead':_0x268984[_0x37c1c6(0x196)]()}))};},async 'close'(){const _0x5c11d2=_0x3367f9;_0x5f2193=!![];for(const _0x251011 of _0xafaab8[_0x5c11d2(0x84)]()){_0x251011[_0x5c11d2(0x9e)]=!![],_0x251011['respawnTimer']&&(clearTimeout(_0x251011[_0x5c11d2(0x15a)]),_0x251011[_0x5c11d2(0x15a)]=null);}clearInterval(_0xb99a6d),_0x57edd3[_0x5c11d2(0xcd)](_0x5c11d2(0x6c),_0x17c037),_0x57edd3['off']('message',_0x5ed5d8),_0x12fafb?.['events']?.[_0x5c11d2(0xcd)]?.(_0x94bf1f[_0x5c11d2(0x1f7)],_0x45e583);if(_0x12fafb?.['events']?.[_0x5c11d2(0xcd)])for(const {event:_0x543b3e,handler:_0x2bfbc3}of _0x14753e){try{_0x12fafb[_0x5c11d2(0x70)]['off'](_0x543b3e,_0x2bfbc3);}catch{}}_0x14753e[_0x5c11d2(0x72)]=0x0;const _0x1ba58b=[..._0x26bb95[_0x5c11d2(0x84)]()][_0x5c11d2(0xf6)](({worker:_0x3094a3})=>_0x3094a3);if(_0x1ba58b['length']===0x0)return;await Promise['all'](_0x1ba58b['map'](_0x161554=>new Promise(_0x8d09da=>{const _0x233f3d=_0x5c11d2;if(_0x161554['isDead']()){_0x8d09da();return;}let _0x2e4f12=![];const _0x101722=()=>{if(_0x2e4f12)return;_0x2e4f12=!![];if(_0x369221)clearTimeout(_0x369221);_0x8d09da();};_0x161554[_0x233f3d(0xd5)](_0x233f3d(0xb4),_0x101722);const _0x369221=setTimeout(()=>{const _0x135373=_0x233f3d;try{_0x161554[_0x135373(0x10f)][_0x135373(0xf9)]();}catch{}},_0x501452+0x1f4);_0x369221[_0x233f3d(0x184)]?.();try{_0x161554[_0x233f3d(0x18d)]();}catch{try{_0x161554[_0x233f3d(0x10f)][_0x233f3d(0xf9)]();}catch{}}})));}};return _0x4c6907;}async function _0x3d4b6b({makeOkdb:_0x416416,port:_0x2a7988}){const _0x27ca0b=_0x3350ab,_0x51a19d=await _0x416416();return _0x306a93(_0x51a19d),_0x51a19d[_0x27ca0b(0x12e)][_0x27ca0b(0x9b)](_0x2a7988);}function _0x306a93(_0x325778){const _0x5e2ea4=_0x3350ab;if(!_0x325778||_0x325778[_0x5e2ea4(0x1c2)])return;_0x325778[_0x5e2ea4(0x1c2)]=!![];try{const {OKDBChangefeed:_0x933c4f}=requireOkdbChangefeed(),_0x4720c=_0x325778[_0x5e2ea4(0x6e)];if(_0x4720c&&typeof _0x4720c[_0x5e2ea4(0x18a)]===_0x5e2ea4(0x198)){const _0x56dc02=new _0x933c4f(_0x325778);_0x56dc02['start'](),_0x4720c[_0x5e2ea4(0x18a)](_0x56dc02),_0x325778['_changefeed']=_0x56dc02;}}catch(_0x834aa9){_0x325778[_0x5e2ea4(0x153)]?.[_0x5e2ea4(0x1d1)]?.(_0x5e2ea4(0x1cc)+(_0x834aa9?.[_0x5e2ea4(0x6c)]??_0x834aa9),{'feature':_0x5e2ea4(0xeb)});}const _0x298b49=_0x48f5a4=>{const _0x332f86=_0x5e2ea4;if(!_0x48f5a4||typeof _0x48f5a4!==_0x332f86(0x191)||_0x48f5a4[_0x2e49aa]==null)return;if(_0x48f5a4[_0x2e49aa]===_0x394b29)try{_0x325778[_0x332f86(0x6e)]?.[_0x332f86(0x82)]?.(_0x48f5a4['event'],_0x48f5a4[_0x332f86(0x117)]);}catch{}};process['on'](_0x5e2ea4(0x6c),_0x298b49),_0x325778[_0x5e2ea4(0x1ab)]=_0x298b49;{let _0x185d8d=process[_0x5e2ea4(0x1a4)](),_0x1575c0=Date['now']();const _0x5bdbaa=()=>{const _0x15a7ba=_0x5e2ea4;if(typeof process[_0x15a7ba(0x174)]!=='function'||!process[_0x15a7ba(0x1f8)])return;const _0x145cf7=Date[_0x15a7ba(0x97)](),_0x193fce=process[_0x15a7ba(0x1a4)](),_0x341887=(_0x145cf7-_0x1575c0)*0x3e8,_0x546480=_0x193fce[_0x15a7ba(0x88)]-_0x185d8d['user']+(_0x193fce[_0x15a7ba(0x1bb)]-_0x185d8d[_0x15a7ba(0x1bb)]),_0x55351c=_0x341887>0x0?Math['min'](0x64,Math['round'](_0x546480/(_0x341887*(_0x3f9272[_0x15a7ba(0x1d3)]()[_0x15a7ba(0x72)]||0x1))*0x64)):0x0;_0x185d8d=_0x193fce,_0x1575c0=_0x145cf7;const _0x15de6c=process[_0x15a7ba(0xcb)]();try{process[_0x15a7ba(0x174)]({[_0x2e49aa]:_0x132dfd,'stats':{'rss':_0x15de6c['rss'],'heapUsed':_0x15de6c[_0x15a7ba(0xc0)],'heapTotal':_0x15de6c[_0x15a7ba(0x111)],'external':_0x15de6c[_0x15a7ba(0x12d)],'cpuPct':_0x55351c,'cpuWindowMs':Math[_0x15a7ba(0x150)](_0x341887/0x3e8)||null}});}catch{}},_0x2ebd16=Math['max'](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x3233c7=setInterval(_0x5bdbaa,_0x2ebd16);_0x3233c7[_0x5e2ea4(0x184)]?.(),_0x5bdbaa();}let _0x5e5e0f=![];const _0x249b07=async _0x47683d=>{const _0x320a32=_0x5e2ea4;if(_0x5e5e0f)return;_0x5e5e0f=!![];const _0x2a1d6a=setTimeout(()=>process[_0x320a32(0xb4)](_0x47683d),_0x501452);_0x2a1d6a['unref']?.();try{await _0x325778[_0x320a32(0x134)]?.();}catch{}process[_0x320a32(0xb4)](_0x47683d);};process['on'](_0x5e2ea4(0x18d),()=>_0x249b07(0x0));if(process[_0x5e2ea4(0x1ac)]!==_0x5e2ea4(0x18e)){const _0x52ee73=setInterval(()=>{const _0x5f55e8=_0x5e2ea4;if(process[_0x5f55e8(0x9f)]===0x1)_0x249b07(0x0);},_0x28d8bc);_0x52ee73['unref']?.(),_0x325778[_0x5e2ea4(0x11d)]=_0x52ee73;}}return okdbCluster={'runClustered':_0x3a93d7,'attachWorkerCluster':_0x306a93},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0x59aa1f=_0xd218e;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x3501d6=require$$0$3,{attachWorkerCluster:_0x319402}=requireOkdbCluster();async function _0x30d62e(){const _0x3e8f9b=_0x2a26,_0x29e3c5=process.env.OKDB_HTTP_CHILD;if(!_0x29e3c5)throw new Error('okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing');const {rootPath:_0x37e54e,port:_0x197b45,options:options={},logLevel:logLevel=_0x3e8f9b(0xe2)}=JSON['parse'](_0x29e3c5);if(!_0x37e54e||!_0x197b45)throw new Error(_0x3e8f9b(0x1ff));const _0x3f47cb=new _0x3501d6(_0x37e54e,{...options,'engines':![],'asyncProcessors':![],'compaction':_0x3e8f9b(0x1e5),'bus':!![]});_0x3f47cb[_0x3e8f9b(0x153)][_0x3e8f9b(0x10c)]?.();const _0x53f897=process.env.OKDB_CLUSTER_SLOT??'?',_0x4bd66a={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x26951f=_0x4bd66a[logLevel]??_0x4bd66a['info'];_0x3f47cb[_0x3e8f9b(0x153)][_0x3e8f9b(0xf8)](_0x19b940=>{const _0x4b1fe4=_0x3e8f9b;if((_0x4bd66a[_0x19b940['level']]??0x1)<_0x26951f)return;try{process[_0x4b1fe4(0x174)]?.({'__okdbCluster':_0x4b1fe4(0x153),'slot':_0x53f897,'pid':process[_0x4b1fe4(0x92)],'entry':_0x19b940});}catch{}}),await _0x3f47cb['open'](),_0x319402(_0x3f47cb),await _0x3f47cb[_0x3e8f9b(0x12e)]['listen'](_0x197b45);}return _0x30d62e()[_0x59aa1f(0x1e3)](_0xb59547=>{const _0x2a20e5=_0x59aa1f;try{process[_0x2a20e5(0x174)]?.({'__okdbCluster':_0x2a20e5(0x153),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x2a20e5(0x92)],'entry':{'level':_0x2a20e5(0x100),'msg':_0x2a20e5(0x1e9)+(_0xb59547?.[_0x2a20e5(0x6c)]??_0xb59547)}});}catch{}process[_0x2a20e5(0xb4)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module[_0xd218e(0x73)]=okdbHttpWorkerChild;
1
+ 'use strict';const _0x5c5b6f=_0x490e;(function(_0x41f7ff,_0x1ef0f3){const _0x178647=_0x490e,_0x43f6d7=_0x41f7ff();while(!![]){try{const _0x38c40a=parseInt(_0x178647(0x222))/0x1*(-parseInt(_0x178647(0x3b1))/0x2)+parseInt(_0x178647(0x35d))/0x3*(-parseInt(_0x178647(0x284))/0x4)+-parseInt(_0x178647(0x32f))/0x5*(-parseInt(_0x178647(0x324))/0x6)+-parseInt(_0x178647(0x2e2))/0x7+-parseInt(_0x178647(0x2b9))/0x8+parseInt(_0x178647(0x3d0))/0x9+-parseInt(_0x178647(0x25d))/0xa*(-parseInt(_0x178647(0x298))/0xb);if(_0x38c40a===_0x1ef0f3)break;else _0x43f6d7['push'](_0x43f6d7['shift']());}catch(_0x48cb08){_0x43f6d7['push'](_0x43f6d7['shift']());}}}(_0x2853,0xbd364));var require$$0$5=require(_0x5c5b6f(0x3e8)),require$$1$1=require('cluster'),require$$1=require(_0x5c5b6f(0x3c9)),require$$0$3=require('os'),require$$2=require(_0x5c5b6f(0x237)),require$$0=require(_0x5c5b6f(0x265)),require$$0$2=require(_0x5c5b6f(0x3f2)),require$$0$1=require('fs'),require$$0$4=require('node:events');function getDefaultExportFromCjs(_0x185481){const _0x19f712=_0x5c5b6f;return _0x185481&&_0x185481[_0x19f712(0x1f6)]&&Object['prototype'][_0x19f712(0x2a9)][_0x19f712(0x373)](_0x185481,_0x19f712(0x3a8))?_0x185481[_0x19f712(0x3a8)]:_0x185481;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x31666d=_0x5c5b6f;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x3af20d={'PUT':'put','REMOVE':_0x31666d(0x294),'INDEX_DROP':_0x31666d(0x300),'INDEX_REGISTER':'registerIndex','INDEX_RESET':_0x31666d(0x1f3),'TYPE_REGISTER':_0x31666d(0x3aa),'TYPE_DROP':_0x31666d(0x3b0),'FTS_REGISTER':_0x31666d(0x1e8),'FTS_DROP':_0x31666d(0x387),'FTS_RESET':'resetFts','SCHEMA_SET':'setSchema','SCHEMA_DROP':'dropSchema','TTL_SET':_0x31666d(0x1f2),'TTL_CLEAR':_0x31666d(0x2a3)},_0x221b59={'SYSTEM_READY':_0x31666d(0x22f),'SYSTEM_STOPPED':_0x31666d(0x39d),'SYSTEM_CLOCK_CHANGE':_0x31666d(0x34a),'SYSTEM_POKE':'system:poke','SYSTEM_DRAIN':_0x31666d(0x3a1),'SYSTEM_TYPE_DROP':_0x31666d(0x225),'SYSTEM_PROC':_0x31666d(0x301),'SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':'item:create','ITEM_UPDATE':_0x31666d(0x379),'ITEM_REMOVE':_0x31666d(0x369),'INDEX_RESET':_0x31666d(0x210),'INDEX_READY':_0x31666d(0x279),'INDEX_PROGRESS':_0x31666d(0x242),'VIEW_PROGRESS':_0x31666d(0x2c8),'INDEX_DROP':_0x31666d(0x3b4),'INDEX_REGISTERED':'index:registered','FTS_REGISTERED':_0x31666d(0x280),'FTS_DROP':'fts:drop','FTS_RESET':_0x31666d(0x383),'SCHEMA_SET':_0x31666d(0x2c1),'SCHEMA_DROP':_0x31666d(0x262),'UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0x31666d(0x270),'REF_VIOLATION':'ref:violation','REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x31666d(0x375),'TXN_START':_0x31666d(0x2a0),'TXN_END':_0x31666d(0x2ab),'TXN_ROLLBACK':_0x31666d(0x227),'TYPE_REGISTERED':_0x31666d(0x20b),'TYPE_DROP':_0x31666d(0x2c9),'ENV_OPENED':_0x31666d(0x3ed),'ENV_REMOVED':_0x31666d(0x28e),'SYSTEM_ENV_RELEASE':_0x31666d(0x2e0),'TTL_EXPIRED':_0x31666d(0x36e),'TTL_SET':_0x31666d(0x2b8),'TTL_CLEAR':_0x31666d(0x21a),'LICENSE_INVALID':_0x31666d(0x2ec),'LICENSE_ADDED':_0x31666d(0x3ba),'LICENSE_ACTIVATED':_0x31666d(0x311),'LICENSE_REMOVED':'license:removed'},_0x2fd1e6={'CREATING':_0x31666d(0x266),'RESETTING':_0x31666d(0x1d2),'READY':_0x31666d(0x327),'DROPPING':_0x31666d(0x36d),'WAITING':_0x31666d(0x3ce)},_0x13c41e={'CREATED':_0x31666d(0x329),'STARTING':_0x31666d(0x350),'STARTED':'started','STOPPING':_0x31666d(0x385),'STOPPED':_0x31666d(0x349)},_0x271759={'CREATING':_0x31666d(0x266),'READY':'ready','HALTED':_0x31666d(0x273),'STOPPED':_0x31666d(0x349),'RESETTING':_0x31666d(0x1d2)},_0x462ccb=Object['freeze']({'POKE':_0x31666d(0x366),'DRAIN':_0x31666d(0x289),'TYPE_DROP':_0x31666d(0x2b3),'PROC':'bus:proc','ENV_RELEASE':_0x31666d(0x229)});return okdbEnums={'BUS_EVENTS':_0x462ccb,'CHANGE_ACTIONS':_0x3af20d,'EVENTS':_0x221b59,'INDEX_STATE':_0x2fd1e6,'OKDB_STATE':_0x13c41e,'VIEW_STATE':_0x271759},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function _0x2853(){const _0x4d323b=['_clusterWorkerAttached','310lgrXSC','_lastCpuAt','addSupervisedChild','options','_isWriter','schema:drop','_instanceId','resolve','node:perf_hooks','creating','cpus','~processes:desired','_participate','removeSupervisedChild','_groupByProcess','exports','INDEX_REGISTERED','engines','\x20(durable\x20desired-state)','unique:violation_resolved','extend','user','halted','data','__okdbSlot','_enqueuedAt','getProcess','unref','index:ready','async','getDesired','_writer','_refreshDesiredSnapshot','SYSTEM_POKE','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','fts:registered','note','(code=','release','1556pbbjWE','kind','consecutiveFailures','_handleInProcess','--inspect','bus:drain','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','change','appendFileSync','_supervisorKey','env:removed','_singletonLock','push','_listenAddr','node','_outstanding','remove','_admissionTimer','enable','_coordinator','849673HQPXKr','add','listenAddr','_onItem','_quantum','max','cpuWindowMs','count','txn:start','_desiredOverlay','connected','clearTtl','split','none','\x20\x20(no\x20env\x20draining)','flushed','string','hasOwnProperty','\x20\x20#','txn:end','ingest','_inflight','removeSync','workers','test','_draining','ms\x20p99=','bus:type_drop','disconnect','CHANGEFEED_QUANTUM','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','__vocab/version','ttl:set','3502688FgITiT','FTS_DROP','_openEnvLazy','sandbox','next','stack','slotKey','get','schema:set','cluster:','clear',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','epoch','commit','writerStatus','view:progress','type:drop','min','single','_migrateVocab','_publishNow','processor:paused','ephemeral','sort','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','fork','replace','once','_maybePublish','SYSTEM_PROC','_threadStats','_collectSingletonClaims','\x20@\x20','okdb-diag.','_pending','fanout','ITEM_CREATE','busy','cluster','system:env_release','\x20parkedNow=','8549331GyiVVA','_lastPublishAt','processor:ready','REMOVE','race','kill','processor:retry','_wantDbHandle','_selfKey','primary','license:invalid','_lastCpuPct','uptime','ESRCH','_dedupeKey','env','nodeKey','_activateProcesses','_systemEnv','putNode','_bpParkedTotal','_admissionStarted','_durs','_closed','allSettled','commitP99Ms','processor:resumed','_singletonLocks','--print','_collectWriterFacet','dropIndex','system:proc','processKey','ITEM_UPDATE','_desired','dumpedAt','recordWrite','_key','\x20worker\x20slot=','afterWrite','publishChildRow','stderr','register','INDEX_READY','mode','true','_onPoke','license:activated','namespace','cpuPct','log','cpuUsage','_markSeen','[okdb-cluster]\x20slot=','has','some','dead','warn','_lastCpuUsage','_buckets','_flushDebounce','parkedNow','processor:error','\x20died\x20','clusterStatusView','feed:','528nedmTR','open','events','ready','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','created','attach','processing','_nodeDbCache','expiresAt','updateSupervisedChildStats','67265cLBmPh','noteListenAddr','isEnabled','markClosed','putSync','meta','_drain','ms/','ITEM_REMOVE','external','hasType','_onProcEvent','_drainOne','\x20===','slice','createEnvironment','_startAdmission','\x20sync','_db','setDesired','isWorker','ms\x20mean=','standalone','_nodeDead','hasDesired','\x20\x20env=','stopped','system:clock_change','_highWater','isActive','ppid','indexOf','event','starting','process','raw-remove','stringify','committed','cluster-wide','processes','name','startsWith','flushLmdb','depth','info','sync','6522EwLyZa','hard-killed','processorId','getRange','_onStop','size','length','\x20statusEnv=','shift','bus:poke','ms\x20on\x20env=','rowKey','item:remove','_statusEnv','_clusterOnMessage','building','dropping','ttl:expired','onWindow','slot','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','_lockDb','call','holder','sync:apply','nodesView','inflightAgesMs','isWanted','item:update','firstTs','load','toISOString','\x20worker(s)\x20remaining','_handlePoke','_heartbeatInFlight','deregisterSelf','hostname','\x20in\x20','fts:reset','_kind','stopping','trim','dropFts','emit','_report','_acquiredAt','processors','[okdb-cluster]\x20worker\x20pid=','1ofN:','openDB','\x20pid=','fn-runner','_rowKey','claimGated','queue-worker','isHeld','send','host','processor:progress','object','singletonClaims','uncaughtException','\x20oldestPendingMs=','toFixed','system:stopped','_hbTimer','_servingEngines','ORPHAN\x20(env-closed\x20write)','system:drain','decommissioned','getCmd','okdb','_processStartedAt','_ensureDesired','off','default','transactionSync','registerType','inst:','seq','entry','unclaimed','getClock','dropType','2900902AQxyGj','removeNode','cli','index:drop','_children','reset','_started','maxMs','keys','license:added','_buildProcessingFacet','splice','code','now','exit','processorsView','_publishFailWarned','instanceId','registry\x20publish\x20failing:\x20','_changefeed','loop-lag','_windowCbs','bumpCmd','caps','path','_released','join','\x0a\x20\x20\x20\x20\x20\x20','heapUsed','waiting','\x20HTTP\x20server(s)\x20on\x20port\x20','10367289wCfDak','write','startedAt','\x20forked\x20','_done','_wantDb','isDead','startHeartbeat','--test','cursorKey','_startHeartbeat','online','_seen','SYSTEM_STOPPED','_log','decommission','_removeRowAsync','.log','catch','_heartbeatTimer','error:\x20','updatedAt','heapTotal','_ownMeta','./okdb','_cursors','role','_isReader','list','env:opened','repeat','transaction','stop','delete','perf_hooks','rows=','_startedAt','status','setOwnMeta','INDEX_PROGRESS','childTransaction','detachConsole','FTS_REGISTERED','[okdb-cluster]\x20respawning\x20worker\x20slot=','\x20ipc\x20error:\x20','reduce','oldestPendingMs','attachFeed','compaction','deaths','selfKey','ms\x20busy=','~processes:cmd','abs','resetting','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','draining','close','includes','error','loop-lag\x20','percentile','_nodeDb','system','_baselines','function','inspect','tierList','_lastCpuWindowMs','_cmd','assign','[okdb-cluster]\x20primary\x20pid=','_buildChildRow','confirm','_enableChangelog','_adminRelay','registerFts','values','unhandledRejection','maxExtra','force','listen','entries','_clusterOrphanWatch','_committed','_rootDb','setTtl','resetIndex','rss','tryAcquire','__esModule','children','stats','supervisorKey','acquiredAt','state','round','registry\x20heartbeat\x20skipped\x20(writer=','[okdb-cluster]\x20','start','then','level','view','http-server','fast','threads','_putRowSync','clearThreadStats','listening','node/','isConnected','type:registered','isPrimary','filter','\x20(slot=','_lock','index:reset','lifecycle','fromEntries','floor','--watch','pid','drain','_envs','_nodeDbFor','ms\x20env=','ttl:clear','running','_role','platform','ttlMs','put','worker','_timer','1DSMIuz','_caps','_rawDb','system:type_drop','set','txn:rollback','_onTick','bus:env_release','runtimeProcessesView',');\x20',':want','http','_isStale','system:ready','listAll','INDEX_RESET','\x20drainAge=','VIEW_PROGRESS','type','getChanges','heartbeatMs','crypto','resetReadTxn','memoryUsage','okdb-http-worker-child.js','respawnTimer','prependListener','beforeWrite','win32','_putRowAsync','reportThreadStats','map','index:progress','envsOpen','_buildOwnRow','_bpWaiters','decommissioning','number','~lock','_scheduleFlush','enabled','message','_flushTimer','_holderDead','ms\x20activeWriters=','__okdbCluster','listDesired','execArgv','reap','listNodes','quantum','disable','copy','\x20│\x20','parse','embedded','find','value'];_0x2853=function(){return _0x4d323b;};return _0x2853();}function requireOkdbLoopMonitor(){const _0x1ef230=_0x5c5b6f;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x81c7ae,performance:_0x35484b}=require$$0,_0x303633=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x1ef230(0x30f),_0x24bf24=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x52e81e=process.env.OKDB_LOOP_LAG_ALL==='1',_0x2d0923=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x5dfb50{constructor(){const _0x1b8ebe=_0x1ef230;this[_0x1b8ebe(0x24a)]=_0x303633,this[_0x1b8ebe(0x31d)]=new Map(),this['_h']=null,this[_0x1b8ebe(0x221)]=null,this['_started']=![],this[_0x1b8ebe(0x3de)]=(_0x339485,_0x28a269)=>process['stderr'][_0x1b8ebe(0x3d1)](_0x339485+(_0x28a269?'\x20'+JSON[_0x1b8ebe(0x353)](_0x28a269):'')+'\x0a');}[_0x1ef230(0x3be)](){const _0x57b515=_0x1ef230;return _0x35484b[_0x57b515(0x3be)]();}['setLogger'](_0x5af69a){const _0x2b6493=_0x1ef230;if(typeof _0x5af69a===_0x2b6493(0x1dd))this[_0x2b6493(0x3de)]=_0x5af69a;}['note'](_0x13f2d4,_0x50294c,_0xd441ab){const _0xd95166=_0x1ef230;if(!this[_0xd95166(0x24a)])return;let _0x218350=this['_buckets'][_0xd95166(0x2c0)](_0x13f2d4);!_0x218350&&(_0x218350={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0xd95166(0x31d)]['set'](_0x13f2d4,_0x218350)),_0x218350['ms']+=_0x50294c,_0x218350['count']+=0x1,_0x50294c>_0x218350[_0xd95166(0x3b8)]&&(_0x218350[_0xd95166(0x3b8)]=_0x50294c,_0x218350['maxExtra']=_0xd441ab||'');}['start'](_0x4ac609){const _0x3d2e03=_0x1ef230;if(!this[_0x3d2e03(0x24a)]||this[_0x3d2e03(0x3b7)])return;this[_0x3d2e03(0x3b7)]=!![];if(_0x4ac609)this[_0x3d2e03(0x3de)]=_0x4ac609;this['_h']=_0x81c7ae({'resolution':0xa}),this['_h'][_0x3d2e03(0x296)](),this[_0x3d2e03(0x221)]=setInterval(()=>this[_0x3d2e03(0x389)](),_0x24bf24);if(this[_0x3d2e03(0x221)][_0x3d2e03(0x278)])this[_0x3d2e03(0x221)][_0x3d2e03(0x278)]();}[_0x1ef230(0x36f)](_0xe4d98d){const _0x362baf=_0x1ef230;if(!this['_windowCbs'])this['_windowCbs']=new Set();this['_windowCbs'][_0x362baf(0x299)](_0xe4d98d);if(!this[_0x362baf(0x3b7)])this[_0x362baf(0x33f)]();}['offWindow'](_0x58bdfc){const _0x59fe65=_0x1ef230;this[_0x59fe65(0x3c6)]?.[_0x59fe65(0x3f1)](_0x58bdfc);}[_0x1ef230(0x33f)](){const _0x2cd4ff=_0x1ef230;if(this[_0x2cd4ff(0x2f7)])return;this[_0x2cd4ff(0x2f7)]=!![];!this['_h']&&(this['_h']=_0x81c7ae({'resolution':0xa}),this['_h'][_0x2cd4ff(0x296)]());const _0x5c952a=_0x24bf24;this[_0x2cd4ff(0x295)]=setInterval(()=>{const _0x37bce3=_0x2cd4ff,_0x949d5c=this['_h'];if(!_0x949d5c)return;const _0x2f48eb=_0x949d5c[_0x37bce3(0x1d9)](0x63)/0xf4240,_0x5aa5c4=_0x949d5c[_0x37bce3(0x29d)]/0xf4240,_0x5a3769=_0x949d5c['mean']/0xf4240;_0x949d5c['reset']();if(this[_0x37bce3(0x3c6)])for(const _0x27c334 of this['_windowCbs']){try{_0x27c334({'p99Ms':_0x2f48eb,'maxMs':_0x5aa5c4,'meanMs':_0x5a3769,'reportMs':_0x5c952a});}catch{}}},_0x5c952a);if(this[_0x2cd4ff(0x295)][_0x2cd4ff(0x278)])this[_0x2cd4ff(0x295)][_0x2cd4ff(0x278)]();}['_report'](){const _0x24c302=_0x1ef230,_0x30679b=this['_h'],_0x44cf7e=_0x30679b[_0x24c302(0x29d)]/0xf4240,_0x435b76=_0x30679b[_0x24c302(0x1d9)](0x63)/0xf4240,_0x516473=_0x30679b['mean']/0xf4240;_0x30679b[_0x24c302(0x3b6)]();const _0x1f9b55=[...this[_0x24c302(0x31d)][_0x24c302(0x1ee)]()][_0x24c302(0x241)](([_0x2818cb,_0x36a92a])=>({'label':_0x2818cb,..._0x36a92a}))[_0x24c302(0x2d0)]((_0x2ead70,_0x15fad4)=>_0x15fad4['ms']-_0x2ead70['ms'])[_0x24c302(0x33d)](0x0,0x8);this[_0x24c302(0x31d)][_0x24c302(0x2c3)]();const _0x4ad26e=_0x1f9b55[_0x24c302(0x1c9)]((_0x2b8b49,_0x58b0f1)=>_0x2b8b49+_0x58b0f1['ms'],0x0),_0x25ff84=_0x1f9b55[_0x24c302(0x241)](_0x55c834=>_0x55c834['label']+'='+_0x55c834['ms'][_0x24c302(0x39c)](0x0)+_0x24c302(0x336)+_0x55c834[_0x24c302(0x29f)]+(_0x55c834['maxMs']>0x5?'(worst\x20'+_0x55c834[_0x24c302(0x3b8)]['toFixed'](0x0)+'ms'+(_0x55c834['maxExtra']?'\x20'+_0x55c834[_0x24c302(0x1eb)]:'')+')':''));(_0x52e81e||_0x44cf7e>=_0x2d0923)&&this['_log'](_0x24c302(0x1d8)+_0x24bf24+'ms\x20max='+_0x44cf7e[_0x24c302(0x39c)](0x0)+_0x24c302(0x2b2)+_0x435b76[_0x24c302(0x39c)](0x0)+_0x24c302(0x344)+_0x516473['toFixed'](0x0)+_0x24c302(0x1cf)+_0x4ad26e[_0x24c302(0x39c)](0x0)+'ms'+(_0x25ff84['length']?_0x24c302(0x257)+_0x25ff84[_0x24c302(0x3cb)]('\x20\x20'):''),{'feature':_0x24c302(0x3c5)});if(this[_0x24c302(0x3c6)])for(const _0x31a83e of this['_windowCbs']){try{_0x31a83e({'p99Ms':_0x435b76,'maxMs':_0x44cf7e,'meanMs':_0x516473,'reportMs':_0x24bf24});}catch{}}}['stop'](){const _0x4cce64=_0x1ef230;if(this['_timer'])clearInterval(this['_timer']);if(this['_h'])this['_h'][_0x4cce64(0x255)]();this[_0x4cce64(0x221)]=null,this['_h']=null,this[_0x4cce64(0x3b7)]=![];}}const _0x47f686=new _0x5dfb50();if(_0x47f686[_0x1ef230(0x24a)])_0x47f686[_0x1ef230(0x1ff)]();return okdbLoopMonitor={'LOOP':_0x47f686},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x184aaf=require$$0$1,_0x15ac79=require$$1;let _0x23216c,_0x20c80c,_0x4f9efb,_0x310b38,_0x70da9d,_0x25a86f,_0x2f6f79,_0x3647d5=![];const _0x4f41c4=new Set();let _0x1a3927=null;const _0x1ccfc4=new Map();function _0x131b65(){if(_0x23216c!==undefined)return _0x23216c;_0x23216c=process.env.OKDB_DIAG==='1';if(!_0x23216c)return![];_0x20c80c=process.env.OKDB_DIAG_STACK==='1',_0x310b38=Math['max'](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x4f9efb=new Array(_0x310b38),_0x70da9d=0x0,_0x25a86f=0x0,_0x2f6f79=process.env.OKDB_DIAG_DIR||null;if(_0x2f6f79)try{_0x184aaf['mkdirSync'](_0x2f6f79,{'recursive':!![]});}catch{}return!![];}function _0xd6b60e(){return _0x23216c===undefined?_0x131b65():_0x23216c;}function _0x4decd9(_0x45cb89,_0x25db93){const _0x5d6df4=_0x490e;if(_0x23216c===undefined?!_0x131b65():!_0x23216c)return;let _0xcb1822;if(_0x20c80c){const _0x1ad25a=new Error()[_0x5d6df4(0x2be)]||'';_0xcb1822=_0x1ad25a[_0x5d6df4(0x2a4)]('\x0a')[_0x5d6df4(0x33d)](0x3)[_0x5d6df4(0x241)](_0x5944da=>_0x5944da[_0x5d6df4(0x386)]())[_0x5d6df4(0x20d)](Boolean)['slice'](0x0,0x8);}_0x4f9efb[_0x70da9d]={'seq':_0x25a86f++,'t':Date[_0x5d6df4(0x3be)](),'env':_0x45cb89,'kind':_0x25db93||_0x5d6df4(0x2c6),'stack':_0xcb1822},_0x70da9d=(_0x70da9d+0x1)%_0x310b38;}function _0x1f5fd6(_0x47bccd){const _0x28de5f=_0x490e,_0x3ba383=[];for(let _0x1e9b51=0x0;_0x1e9b51<_0x310b38;_0x1e9b51++){const _0x371410=_0x4f9efb[(_0x70da9d-0x1-_0x1e9b51+_0x310b38*0x2)%_0x310b38];if(!_0x371410)continue;_0x3ba383['push'](_0x371410);if(_0x3ba383[_0x28de5f(0x363)]>=_0x47bccd)break;}return _0x3ba383;}function _0x4dff5c(_0x3d5e35){const _0x36931a=_0x490e;try{process[_0x36931a(0x30b)][_0x36931a(0x3d1)](_0x3d5e35+'\x0a');}catch{}if(_0x2f6f79)try{_0x184aaf[_0x36931a(0x28c)](_0x15ac79[_0x36931a(0x3cb)](_0x2f6f79,_0x36931a(0x2da)+process[_0x36931a(0x215)]+_0x36931a(0x3e1)),_0x3d5e35+'\x0a');}catch{}}function _0x4c75fa(_0x199908){const _0x439b37=_0x490e,_0x573ef0=_0x1f5fd6(_0x199908);if(!_0x573ef0[_0x439b37(0x363)])return'\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)';const _0xd340=Date[_0x439b37(0x3be)]();return _0x573ef0[_0x439b37(0x241)](_0x3566cb=>{const _0x71c103=_0x439b37,_0x388f9b=_0x71c103(0x2aa)+_0x3566cb[_0x71c103(0x3ac)]+'\x20-'+(_0xd340-_0x3566cb['t'])+_0x71c103(0x219)+_0x3566cb[_0x71c103(0x2f1)]+'\x20'+_0x3566cb[_0x71c103(0x285)];return _0x3566cb['stack']&&_0x3566cb[_0x71c103(0x2be)]['length']?_0x388f9b+_0x71c103(0x3cc)+_0x3566cb[_0x71c103(0x2be)][_0x71c103(0x3cb)](_0x71c103(0x3cc)):_0x388f9b;})[_0x439b37(0x3cb)]('\x0a');}function _0x49b67d(_0x12bca7,_0x2f0d4a){const _0x1e9877=_0x490e,_0x4a7099='\x0a===\x20OKDB_DIAG\x20'+_0x12bca7+_0x1e9877(0x2d9)+new Date()['toISOString']()+_0x1e9877(0x38f)+process[_0x1e9877(0x215)]+_0x1e9877(0x33c),_0x2734ad=[_0x4a7099,_0x1e9877(0x3e4)+(_0x2f0d4a&&_0x2f0d4a[_0x1e9877(0x2be)]?_0x2f0d4a[_0x1e9877(0x2be)][_0x1e9877(0x2a4)]('\x0a')[0x0]:_0x2f0d4a),'recent\x20writes\x20(newest\x20first)'+(_0x20c80c?'':_0x1e9877(0x2b6))+':',_0x4c75fa(0x18),_0x3ef2af(),'='['repeat'](_0x4a7099[_0x1e9877(0x363)]-0x1)];_0x4dff5c(_0x2734ad['join']('\x0a'));}function _0x1acef4(_0x2f98b8){const _0x1fe22f=_0x490e;if(!_0xd6b60e())return;const _0x17d5f6=String(_0x2f98b8&&_0x2f98b8[_0x1fe22f(0x24b)]||_0x2f98b8||''),_0x2aae0b=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x1fe22f(0x2b0)](_0x17d5f6);_0x49b67d(_0x2aae0b?_0x1fe22f(0x3a0):_0x1fe22f(0x39a),_0x2f98b8);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x2aae0b)return;try{console[_0x1fe22f(0x1d7)](_0x2f98b8&&_0x2f98b8['stack']?_0x2f98b8[_0x1fe22f(0x2be)]:_0x2f98b8);}catch{}process[_0x1fe22f(0x3bf)](0x1);}function _0x411bfd(_0x8c7274){const _0x4e21b2=_0x490e;if(!_0xd6b60e())return;const _0x26e587=String(_0x8c7274&&_0x8c7274[_0x4e21b2(0x24b)]||_0x8c7274||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x4e21b2(0x2b0)](_0x26e587)&&_0x49b67d(_0x4e21b2(0x2d1),_0x8c7274);}function _0x3ef2af(){const _0xbd32f4=_0x490e,_0x37726e=[_0xbd32f4(0x328)];let _0x21ca2f=![];for(const _0x1f0870 of _0x4f41c4){const _0x1fb02d=_0x1f0870&&_0x1f0870['_envs'];if(!_0x1fb02d)continue;for(const [_0x3272b4,_0xc720a6]of _0x1fb02d){const _0x31eb5d=_0xc720a6&&_0xc720a6[_0xbd32f4(0x297)]&&_0xc720a6[_0xbd32f4(0x297)][_0xbd32f4(0x202)];if(!_0x31eb5d)continue;let _0x53fcc6,_0x51b213;try{_0x53fcc6=Atomics[_0xbd32f4(0x37b)](_0x31eb5d,0x0),_0x51b213=Atomics[_0xbd32f4(0x37b)](_0x31eb5d,0x1);}catch{continue;}if(_0x53fcc6===0x0)continue;_0x21ca2f=!![];const _0xed0449=_0x53fcc6>0x0?'SWAP':_0xbd32f4(0x256),_0x3e9358=Date[_0xbd32f4(0x3be)]()-Math[_0xbd32f4(0x1d1)](_0x53fcc6)*0x3e8,_0x567fd0=((()=>{const _0x2eed4c=_0xbd32f4;try{return _0xc720a6['_writer']&&_0xc720a6[_0x2eed4c(0x27c)]['status']?_0xc720a6[_0x2eed4c(0x27c)][_0x2eed4c(0x3f5)]():null;}catch{return null;}})());_0x37726e['push'](_0xbd32f4(0x348)+_0x3272b4+'\x20phase='+_0xed0449+_0xbd32f4(0x232)+_0x3e9358+_0xbd32f4(0x24e)+_0x51b213+(_0x567fd0?'\x20writer{depth='+_0x567fd0[_0xbd32f4(0x35a)]+_0xbd32f4(0x39b)+_0x567fd0['oldestPendingMs']+_0xbd32f4(0x2e1)+_0x567fd0[_0xbd32f4(0x31f)]+'}':''));}}if(!_0x21ca2f)_0x37726e[_0xbd32f4(0x290)](_0xbd32f4(0x2a6));return _0x37726e['join']('\x0a');}function _0x49780c(){const _0x591452=_0x490e;if(!_0xd6b60e())return;const _0x45baf6=Math['max'](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x350216=Date[_0x591452(0x3be)]();for(const _0x48837a of _0x4f41c4){const _0x33f9a4=_0x48837a&&_0x48837a[_0x591452(0x217)];if(!_0x33f9a4)continue;for(const [_0x52d121,_0x43703c]of _0x33f9a4){const _0x21f141=_0x43703c&&_0x43703c['_coordinator']&&_0x43703c[_0x591452(0x297)][_0x591452(0x202)];if(!_0x21f141)continue;let _0x197890;try{_0x197890=Atomics[_0x591452(0x37b)](_0x21f141,0x0);}catch{continue;}const _0x4a45e1=_0x48837a[_0x591452(0x3c9)]+'|'+_0x52d121;if(_0x197890<=0x0){_0x1ccfc4[_0x591452(0x3f1)](_0x4a45e1);continue;}const _0xa034c9=_0x350216-_0x197890*0x3e8,_0x540b7b=_0x1ccfc4[_0x591452(0x2c0)](_0x4a45e1);if(_0xa034c9<_0x45baf6)continue;if(_0x540b7b&&_0x350216-_0x540b7b[_0x591452(0x305)]<_0x45baf6)continue;_0x1ccfc4[_0x591452(0x226)](_0x4a45e1,{'firstTs':_0x540b7b?_0x540b7b[_0x591452(0x37a)]:_0x197890,'dumpedAt':_0x350216});const _0xf4f9bf=_0x591452(0x371)+_0xa034c9+_0x591452(0x367)+_0x52d121+_0x591452(0x2d9)+new Date()[_0x591452(0x37c)]()+_0x591452(0x38f)+process[_0x591452(0x215)]+_0x591452(0x33c);_0x4dff5c([_0xf4f9bf,_0x3ef2af(),'='[_0x591452(0x3ee)](_0xf4f9bf[_0x591452(0x363)]-0x1)][_0x591452(0x3cb)]('\x0a'));}}}function _0x365ed4(){const _0x48f522=_0x490e;if(!_0xd6b60e()||_0x3647d5)return;_0x3647d5=!![],process[_0x48f522(0x23c)]('uncaughtException',_0x1acef4),process[_0x48f522(0x23c)](_0x48f522(0x1ea),_0x411bfd);const _0x4ad916=Math[_0x48f522(0x29d)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x1a3927=setInterval(_0x49780c,_0x4ad916);if(_0x1a3927[_0x48f522(0x278)])_0x1a3927[_0x48f522(0x278)]();}function _0xc7847f(_0x25f4ab){const _0x573522=_0x490e;if(!_0xd6b60e()||!_0x25f4ab)return;_0x4f41c4[_0x573522(0x299)](_0x25f4ab),_0x365ed4();}function _0x58964f(_0x5b7f14){_0x4f41c4['delete'](_0x5b7f14);}function _0x4719cf(){if(!_0xd6b60e())return{'enabled':![],'hint':'set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)'};return{'enabled':!![],'stackCapture':!!_0x20c80c,'recentWrites':_0x1f5fd6(0x10),'drain':_0x3ef2af()};}return okdbDiag={'isEnabled':_0xd6b60e,'recordWrite':_0x4decd9,'installDiag':_0x365ed4,'registerOkdb':_0xc7847f,'unregisterOkdb':_0x58964f,'snapshot':_0x4719cf},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x254115=_0x5c5b6f;if(hasRequiredOkdbWriter)return okdbWriter['exports'];hasRequiredOkdbWriter=0x1;const {performance:_0x159480}=require$$0$2,_0x33aa68=requireOkdbDiag(),_0x734f22=process.env.OKDB_COMMIT_MODE===_0x254115(0x35c);class _0x4d6057{constructor(_0x14763b){const _0x14859d=_0x254115;this['env']=_0x14763b,this[_0x14859d(0x2ad)]=new Set(),this[_0x14859d(0x276)]=new Map(),this[_0x14859d(0x1f0)]=0x0,this['_durs']=[],this['_done']=[],this[_0x14859d(0x34b)]=Math['max'](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x14859d(0x293)]=0x0,this[_0x14859d(0x245)]=[],this['_bpParkedTotal']=0x0;}async[_0x254115(0x3ef)](_0x4ad22f,_0x386487){const _0x60a7da=_0x254115;if(_0x33aa68[_0x60a7da(0x331)]())_0x33aa68[_0x60a7da(0x306)](this[_0x60a7da(0x2f1)]?.[_0x60a7da(0x357)],_0x386487);if(this['_closed']){const _0x4a26db=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x4a26db['code']='ENV_CLOSING_RETRY';throw _0x4a26db;}if(this[_0x60a7da(0x34b)]>0x0){let _0x5b432d=![];while(this[_0x60a7da(0x293)]>=this[_0x60a7da(0x34b)]&&!this[_0x60a7da(0x2f9)]){!_0x5b432d&&(_0x5b432d=!![],this[_0x60a7da(0x2f6)]++),await new Promise(_0xed18=>this[_0x60a7da(0x245)][_0x60a7da(0x290)](_0xed18));}if(this[_0x60a7da(0x2f9)]){const _0x18045e=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x18045e[_0x60a7da(0x3bd)]='ENV_CLOSING_RETRY';throw _0x18045e;}}this[_0x60a7da(0x293)]++;const _0x45a79d=this['env'][_0x60a7da(0x297)];if(_0x45a79d)await _0x45a79d[_0x60a7da(0x23d)]();if(this[_0x60a7da(0x2f9)]){if(_0x45a79d)_0x45a79d[_0x60a7da(0x309)]();this['_outstanding']--;if(this[_0x60a7da(0x245)]['length']&&this[_0x60a7da(0x293)]<this['_highWater'])this[_0x60a7da(0x245)][_0x60a7da(0x365)]()();const _0x58ee0e=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x58ee0e['code']='ENV_CLOSING_RETRY';throw _0x58ee0e;}const _0x5a5d78=_0x159480['now']();if(_0x734f22)try{const _0x5d7594=this[_0x60a7da(0x2f1)]['db'][_0x60a7da(0x3a9)](_0x4ad22f);this[_0x60a7da(0x1f0)]++;if(this[_0x60a7da(0x2f8)][_0x60a7da(0x290)](_0x159480[_0x60a7da(0x3be)]()-_0x5a5d78)>0x100)this['_durs'][_0x60a7da(0x365)]();if(this['_done'][_0x60a7da(0x290)](_0x159480[_0x60a7da(0x3be)]())>0x800)this['_done'][_0x60a7da(0x365)]();return _0x5d7594;}finally{this[_0x60a7da(0x293)]--;if(this[_0x60a7da(0x245)][_0x60a7da(0x363)]&&this['_outstanding']<this['_highWater'])this['_bpWaiters'][_0x60a7da(0x365)]()();if(_0x45a79d)_0x45a79d[_0x60a7da(0x309)]();}const _0x47b4e1=this[_0x60a7da(0x2f1)]['db'][_0x60a7da(0x3f8)](_0x4ad22f);this[_0x60a7da(0x2ad)]['add'](_0x47b4e1),this[_0x60a7da(0x276)][_0x60a7da(0x226)](_0x47b4e1,_0x5a5d78);const _0x37724d=()=>{const _0x35751=_0x60a7da;this[_0x35751(0x2ad)][_0x35751(0x3f1)](_0x47b4e1),this['_enqueuedAt']['delete'](_0x47b4e1),this[_0x35751(0x1f0)]++,this[_0x35751(0x293)]--;this[_0x35751(0x245)][_0x35751(0x363)]&&this[_0x35751(0x293)]<this[_0x35751(0x34b)]&&this['_bpWaiters'][_0x35751(0x365)]()();if(this[_0x35751(0x2f8)][_0x35751(0x290)](_0x159480[_0x35751(0x3be)]()-_0x5a5d78)>0x100)this[_0x35751(0x2f8)]['shift']();if(this[_0x35751(0x3d4)][_0x35751(0x290)](_0x159480['now']())>0x800)this['_done']['shift']();};_0x47b4e1[_0x60a7da(0x200)](_0x37724d,_0x37724d);try{return await _0x47b4e1;}finally{if(_0x45a79d)_0x45a79d['afterWrite']();}}[_0x254115(0x3f5)](){const _0x368458=_0x254115,_0x19d454=_0x159480[_0x368458(0x3be)]();let _0x4f0477=0x0;for(const _0x244692 of this['_enqueuedAt'][_0x368458(0x1e9)]()){const _0x2e2b85=_0x19d454-_0x244692;if(_0x2e2b85>_0x4f0477)_0x4f0477=_0x2e2b85;}let _0xe000d1=0x0;for(let _0xae8121=this[_0x368458(0x3d4)][_0x368458(0x363)]-0x1;_0xae8121>=0x0;_0xae8121--){if(_0x19d454-this['_done'][_0xae8121]>0x3e8)break;_0xe000d1++;}let _0x3ab040=0x0;if(this['_durs']['length']){const _0xd45a0b=[...this[_0x368458(0x2f8)]]['sort']((_0x3bb841,_0x235c7c)=>_0x3bb841-_0x235c7c);_0x3ab040=_0xd45a0b[Math['min'](_0xd45a0b[_0x368458(0x363)]-0x1,Math[_0x368458(0x213)](_0xd45a0b[_0x368458(0x363)]*0.99))];}return{'depth':this[_0x368458(0x2ad)][_0x368458(0x362)],'oldestPendingMs':Math[_0x368458(0x1fc)](_0x4f0477),'committed':this[_0x368458(0x1f0)],'commitsPerSec':_0xe000d1,'commitP99Ms':Math[_0x368458(0x1fc)](_0x3ab040),'parkedNow':this['_bpWaiters'][_0x368458(0x363)],'parkedTotal':this[_0x368458(0x2f6)],'highWater':this[_0x368458(0x34b)]};}[_0x254115(0x377)](){const _0x4a2bf4=_0x254115,_0x4b6809=_0x159480[_0x4a2bf4(0x3be)]();return[...this[_0x4a2bf4(0x276)][_0x4a2bf4(0x1e9)]()][_0x4a2bf4(0x241)](_0x7f22c9=>Math[_0x4a2bf4(0x1fc)](_0x4b6809-_0x7f22c9))[_0x4a2bf4(0x2d0)]((_0x4b8b83,_0x4b84bd)=>_0x4b84bd-_0x4b8b83);}[_0x254115(0x332)](){const _0x1cb824=_0x254115;this[_0x1cb824(0x2f9)]=!![];for(const _0x582154 of this[_0x1cb824(0x245)][_0x1cb824(0x3bc)](0x0))_0x582154();}async[_0x254115(0x216)](){const _0x5e454e=_0x254115;let _0x1d94c3=0x0;while(this[_0x5e454e(0x2ad)]['size']&&_0x1d94c3++<0x3e8){await Promise[_0x5e454e(0x2fa)]([...this['_inflight']]);}}async[_0x254115(0x21f)](_0x2fd390,_0x3a9902,_0x2e0a99,_0x2b0620){const _0x1b4317=_0x254115;return this[_0x1b4317(0x3ef)](()=>{const _0x40e28f=_0x1b4317;if(_0x2b0620===undefined)_0x2fd390[_0x40e28f(0x333)](_0x3a9902,_0x2e0a99);else _0x2fd390['putSync'](_0x3a9902,_0x2e0a99,_0x2b0620);},'raw-put');}async[_0x254115(0x294)](_0x16bc03,_0x4e9632){const _0x5c1584=_0x254115;return this[_0x5c1584(0x3ef)](()=>_0x16bc03[_0x5c1584(0x2ae)](_0x4e9632),_0x5c1584(0x352));}}async function _0x170024(_0x20db10,_0x37a4b1){const _0x261823=_0x254115;if(_0x37a4b1==null)_0x37a4b1=Math[_0x261823(0x29d)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x4457cc=_0x20db10?.[_0x261823(0x2a7)];if(!_0x4457cc||typeof _0x4457cc['then']!==_0x261823(0x1dd))return;await Promise[_0x261823(0x2e6)]([Promise[_0x261823(0x264)](_0x4457cc)['catch'](()=>{}),new Promise(_0x2a52c1=>{const _0x359b2b=_0x261823,_0x118ae2=setTimeout(_0x2a52c1,_0x37a4b1);if(_0x118ae2[_0x359b2b(0x278)])_0x118ae2[_0x359b2b(0x278)]();})]);}catch{}}function _0x5b694b(_0x5691aa){const _0x568c04=_0x254115;if(_0x734f22)return Promise[_0x568c04(0x264)]();const _0x1c102a=_0x5691aa?.['committed'];return _0x1c102a&&typeof _0x1c102a['then']===_0x568c04(0x1dd)?_0x1c102a:Promise['resolve']();}return okdbWriter[_0x254115(0x26c)]=_0x4d6057,okdbWriter[_0x254115(0x26c)][_0x254115(0x359)]=_0x170024,okdbWriter[_0x254115(0x26c)][_0x254115(0x354)]=_0x5b694b,okdbWriter[_0x254115(0x26c)]['SYNC_COMMITS']=_0x734f22,okdbWriter['exports'];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x23dccf=_0x5c5b6f;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x98d8f3=require$$0$3,{SYNC_COMMITS:_0x511578}=requireOkdbWriter(),_0x3f69bb=_0x23dccf(0x248);class _0xa34c14{constructor(_0x35dd55,_0x277f79,_0x4ddc90){const _0x26781a=_0x23dccf;this['_lock']=_0x35dd55,this[_0x26781a(0x307)]=_0x277f79,this['_acquiredAt']=_0x4ddc90,this['_released']=![],this[_0x26781a(0x3e3)]=null,this[_0x26781a(0x37f)]=null;}[_0x23dccf(0x394)](){const _0x48228c=_0x23dccf;if(this[_0x48228c(0x3ca)])return![];try{const _0x53315c=this['_lock'][_0x48228c(0x341)]()[_0x48228c(0x2c0)](this[_0x48228c(0x307)]);if(!_0x53315c||_0x53315c['acquiredAt']!==this[_0x48228c(0x38a)])return![];const _0x19fee9=_0x53315c[_0x48228c(0x3e5)]??_0x53315c[_0x48228c(0x1fa)];if(_0x19fee9+_0x53315c['ttlMs']<Date[_0x48228c(0x3be)]())return![];return!![];}catch{return!this['_released'];}}[_0x23dccf(0x374)](){const _0x38b6d5=_0x23dccf;if(this[_0x38b6d5(0x3ca)])return null;try{return this[_0x38b6d5(0x20f)][_0x38b6d5(0x341)]()[_0x38b6d5(0x2c0)](this[_0x38b6d5(0x307)])??null;}catch{return null;}}async[_0x23dccf(0x271)](_0x2614eb){const _0x12d52b=_0x23dccf;if(this[_0x12d52b(0x3ca)])return;try{const _0x1dd438=this['_lock']['_db']()[_0x12d52b(0x2c0)](this[_0x12d52b(0x307)]);if(!_0x1dd438||_0x1dd438['acquiredAt']!==this[_0x12d52b(0x38a)])return;if(_0x511578)this[_0x12d52b(0x20f)][_0x12d52b(0x341)]()[_0x12d52b(0x333)](this[_0x12d52b(0x307)],{..._0x1dd438,'ttlMs':_0x1dd438['ttlMs']+_0x2614eb});else await this['_lock'][_0x12d52b(0x341)]()[_0x12d52b(0x21f)](this[_0x12d52b(0x307)],{..._0x1dd438,'ttlMs':_0x1dd438[_0x12d52b(0x21e)]+_0x2614eb});}catch{}}async[_0x23dccf(0x283)](){const _0x19c315=_0x23dccf;if(this[_0x19c315(0x3ca)])return;if(this[_0x19c315(0x37f)])try{await this[_0x19c315(0x37f)];}catch{}clearInterval(this['_heartbeatTimer']),this['_heartbeatTimer']=null,this['_released']=!![];try{const _0x513bff=this[_0x19c315(0x20f)][_0x19c315(0x341)]()['get'](this[_0x19c315(0x307)]);if(_0x513bff&&_0x513bff[_0x19c315(0x1fa)]===this[_0x19c315(0x38a)]){if(_0x511578)this[_0x19c315(0x20f)]['_db']()[_0x19c315(0x2ae)](this[_0x19c315(0x307)]);else await this[_0x19c315(0x20f)][_0x19c315(0x341)]()[_0x19c315(0x294)](this[_0x19c315(0x307)]);}}catch{}}['_startHeartbeat'](_0x3f9787,_0x48d35f){const _0x54166a=_0x23dccf,_0x4f02b9=_0x48d35f??Math[_0x54166a(0x213)](_0x3f9787/0x3);this[_0x54166a(0x3e3)]=setInterval(()=>{const _0x16b6b6=_0x54166a;if(this[_0x16b6b6(0x3ca)])return;this[_0x16b6b6(0x37f)]=((async()=>{const _0x28fe22=_0x16b6b6;try{const _0x46e753=this[_0x28fe22(0x20f)][_0x28fe22(0x341)]()[_0x28fe22(0x2c0)](this[_0x28fe22(0x307)]);if(!_0x46e753||_0x46e753[_0x28fe22(0x1fa)]!==this[_0x28fe22(0x38a)]){this[_0x28fe22(0x3ca)]=!![],clearInterval(this[_0x28fe22(0x3e3)]),this['_heartbeatTimer']=null;return;}if(_0x511578)this[_0x28fe22(0x20f)][_0x28fe22(0x341)]()[_0x28fe22(0x333)](this['_key'],{..._0x46e753,'updatedAt':Date[_0x28fe22(0x3be)]()});else await this['_lock'][_0x28fe22(0x341)]()[_0x28fe22(0x21f)](this[_0x28fe22(0x307)],{..._0x46e753,'updatedAt':Date[_0x28fe22(0x3be)]()});}catch{}this[_0x28fe22(0x37f)]=null;})());},_0x4f02b9);if(this[_0x54166a(0x3e3)][_0x54166a(0x278)])this[_0x54166a(0x3e3)]['unref']();}}class _0x13b168{constructor(_0x2d5ca0,{namespace:_0x36db4d,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x2bf678=_0x23dccf;this['_rawDb']=_0x2d5ca0,this[_0x2bf678(0x312)]=_0x36db4d,this[_0x2bf678(0x21e)]=ttlMs,this[_0x2bf678(0x236)]=heartbeatMs,this[_0x2bf678(0x372)]=null;}[_0x23dccf(0x341)](){const _0xe04602=_0x23dccf;return!this[_0xe04602(0x372)]&&(this['_lockDb']=this[_0xe04602(0x224)][_0xe04602(0x38e)](_0x3f69bb,{'dupSort':![]})),this[_0xe04602(0x372)];}[_0x23dccf(0x3d5)](){const _0x4dcd17=_0x23dccf;return!this[_0x4dcd17(0x2e9)]&&(this[_0x4dcd17(0x2e9)]=this[_0x4dcd17(0x224)][_0x4dcd17(0x38e)](_0x3f69bb+_0x4dcd17(0x22c),{'dupSort':![]})),this['_wantDbHandle'];}[_0x23dccf(0x307)](_0xe0b6bf){const _0x49c72b=_0x23dccf;return this[_0x49c72b(0x312)]+':'+_0xe0b6bf;}['signalWant'](_0x4bfda6){const _0x23a516=_0x23dccf;try{_0x511578?this[_0x23a516(0x3d5)]()[_0x23a516(0x333)](this[_0x23a516(0x307)](_0x4bfda6),Date[_0x23a516(0x3be)]()):this[_0x23a516(0x3d5)]()['put'](this['_key'](_0x4bfda6),Date[_0x23a516(0x3be)]())?.[_0x23a516(0x3e2)]?.(()=>{});}catch{}}[_0x23dccf(0x378)](_0x13d050,_0xa2b2ef=0x3e8){const _0x2da895=_0x23dccf;try{const _0x1a9c29=this[_0x2da895(0x3d5)]()[_0x2da895(0x2c0)](this['_key'](_0x13d050));return typeof _0x1a9c29===_0x2da895(0x247)&&Date[_0x2da895(0x3be)]()-_0x1a9c29<_0xa2b2ef;}catch{return![];}}[_0x23dccf(0x22e)](_0xf85f2a){const _0x48a83e=_0x23dccf,_0x39fc39=_0xf85f2a[_0x48a83e(0x3e5)]??_0xf85f2a[_0x48a83e(0x1fa)];return _0x39fc39+_0xf85f2a[_0x48a83e(0x21e)]<Date[_0x48a83e(0x3be)]();}static[_0x23dccf(0x24d)](_0x19ad1b){const _0x380651=_0x23dccf,_0x321689=_0x19ad1b?.[_0x380651(0x374)];if(!_0x321689||typeof _0x321689[_0x380651(0x215)]!==_0x380651(0x247))return![];if(_0x321689[_0x380651(0x381)]!==_0x98d8f3['hostname']())return![];if(_0x321689[_0x380651(0x215)]===process['pid'])return![];try{return process['kill'](_0x321689['pid'],0x0),![];}catch(_0x516e60){return _0x516e60[_0x380651(0x3bd)]===_0x380651(0x2ef);}}async[_0x23dccf(0x1f5)](_0x16cd9c,_0x3d027b={},_0x2c0d83={}){const _0x2ce53a=_0x23dccf,_0x44af92=this['_key'](_0x16cd9c),_0x32bbf0=_0x2c0d83[_0x2ce53a(0x21e)]??this['ttlMs'],_0x3188ba=Date[_0x2ce53a(0x3be)](),_0x590e00={'holder':{'pid':process[_0x2ce53a(0x215)],'hostname':_0x98d8f3['hostname'](),..._0x3d027b},'acquiredAt':_0x3188ba,'updatedAt':_0x3188ba,'ttlMs':_0x32bbf0};let _0x74ef0=![],_0x4a047c=null;try{const _0x2f315f=()=>{const _0x5d0eec=_0x2ce53a,_0x405270=this[_0x5d0eec(0x341)]()['get'](_0x44af92);if(_0x405270&&!this['_isStale'](_0x405270)&&!_0x13b168[_0x5d0eec(0x24d)](_0x405270)){const _0x59b72b=_0x3d027b[_0x5d0eec(0x35f)]!=null&&_0x405270[_0x5d0eec(0x374)]['pid']===process[_0x5d0eec(0x215)]&&_0x405270[_0x5d0eec(0x374)][_0x5d0eec(0x35f)]===_0x3d027b['processorId'];if(!_0x59b72b){_0x74ef0=![],_0x4a047c=_0x405270;return;}_0x590e00[_0x5d0eec(0x1fa)]<=_0x405270[_0x5d0eec(0x1fa)]&&(_0x590e00[_0x5d0eec(0x1fa)]=_0x405270['acquiredAt']+0x1,_0x590e00['updatedAt']=_0x590e00[_0x5d0eec(0x1fa)]);}this['_db']()[_0x5d0eec(0x21f)](_0x44af92,_0x590e00),_0x74ef0=!![],_0x4a047c=_0x590e00;};if(_0x511578)this[_0x2ce53a(0x341)]()[_0x2ce53a(0x3a9)](_0x2f315f);else await this[_0x2ce53a(0x341)]()['childTransaction'](_0x2f315f);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x74ef0)return{'acquired':![],'handle':null,'current':_0x4a047c};const _0x15fb48=new _0xa34c14(this,_0x44af92,_0x590e00[_0x2ce53a(0x1fa)]);return _0x15fb48[_0x2ce53a(0x3da)](_0x32bbf0,this[_0x2ce53a(0x236)]),{'acquired':!![],'handle':_0x15fb48,'current':_0x4a047c};}[_0x23dccf(0x1de)](_0x2d9e5c){const _0x98613f=_0x23dccf;try{return this[_0x98613f(0x341)]()[_0x98613f(0x2c0)](this['_key'](_0x2d9e5c))??null;}catch{return null;}}[_0x23dccf(0x3ec)](){const _0x53cb7b=_0x23dccf,_0xa28544=this['namespace']+':',_0x1ab43c=[];try{for(const {key:_0xf44e31,value:_0x47d0b4}of this[_0x53cb7b(0x341)]()[_0x53cb7b(0x360)]({'start':_0xa28544,'end':_0xa28544+'ÿ'})){typeof _0xf44e31===_0x53cb7b(0x2a8)&&_0xf44e31[_0x53cb7b(0x358)](_0xa28544)&&_0x1ab43c[_0x53cb7b(0x290)]({'id':_0xf44e31[_0x53cb7b(0x33d)](_0xa28544[_0x53cb7b(0x363)]),'entry':_0x47d0b4});}}catch{}return _0x1ab43c;}static[_0x23dccf(0x230)](_0x417358){const _0xf771b=_0x23dccf,_0x5d14bd=[];try{const _0x1fbabd=_0x417358[_0xf771b(0x38e)](_0x3f69bb,{'dupSort':![]});for(const {key:_0x3e28e1,value:_0x3941fd}of _0x1fbabd[_0xf771b(0x360)]({})){if(typeof _0x3e28e1!==_0xf771b(0x2a8))continue;const _0xd6193c=_0x3e28e1[_0xf771b(0x34e)](':');if(_0xd6193c<0x1)continue;_0x5d14bd[_0xf771b(0x290)]({'namespace':_0x3e28e1['slice'](0x0,_0xd6193c),'id':_0x3e28e1['slice'](_0xd6193c+0x1),'entry':_0x3941fd});}}catch{}return _0x5d14bd;}}return okdbLock={'OKDBLock':_0x13b168},okdbLock;}function _0x490e(_0x405a83,_0x247f0a){_0x405a83=_0x405a83-0x1c8;const _0x2853e9=_0x2853();let _0x490e90=_0x2853e9[_0x405a83];return _0x490e90;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x509c5d=_0x5c5b6f;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x10883f=require$$0$3,_0x172b32=require$$1$1,_0x39a26c=require$$2,{LOOP:_0x2a0784}=requireOkdbLoopMonitor(),{OKDBLock:_0x14e32d}=requireOkdbLock(),{SYNC_COMMITS:_0x4f356c}=requireOkdbWriter(),_0xf7a273='~processes',_0x4a843e='node',_0x322c4f=_0x509c5d(0x268),_0x186fd4=_0x509c5d(0x1d0),_0x1e889d=(_0xf7d08e,_0x5d91c0)=>_0xf7d08e+':'+_0x5d91c0,_0x5a4646=(_0x34dab1,_0x513199)=>_0x34dab1+'::'+_0x513199,_0x24df5d=(_0x252060,_0x4c3caf)=>_0x252060+'/'+_0x4c3caf,_0x375010=(_0x54d8fa,_0x2f9d1c)=>_0x54d8fa+'#'+_0x2f9d1c,_0x2a0447=_0x3ac2fc=>{const _0x25bcec=_0x509c5d;if(_0x3ac2fc?.[_0x25bcec(0x302)])return _0x3ac2fc['processKey'];const _0x1e42d2=_0x3ac2fc?.[_0x25bcec(0x2f2)];return typeof _0x1e42d2===_0x25bcec(0x2a8)&&_0x1e42d2[_0x25bcec(0x1d6)]('#')?_0x1e42d2['slice'](0x0,_0x1e42d2[_0x25bcec(0x34e)]('#')):_0x1e42d2;},_0x328fb5=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x3d279f=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x15800a=_0x328fb5*0x3,_0x22b8c6=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x509c5d(0x29d)](0x927c0,_0x15800a*0x14),_0x595dcf=[_0x509c5d(0x397),_0x509c5d(0x2e4),_0x509c5d(0x2e8),'processor:error',_0x509c5d(0x2ce),_0x509c5d(0x2fc)];let _0x1f7129=null;function _0x5796b5(){const _0x1c6f9e=_0x509c5d;if(_0x1f7129==null)_0x1f7129=Math[_0x1c6f9e(0x1fc)]((Date['now']()-process[_0x1c6f9e(0x2ee)]()*0x3e8)/0x3e8)*0x3e8;return _0x1f7129;}function _0x52d7c2(_0x14fbe8){const _0x201f22=_0x509c5d;if(process.env.OKDB_PROCESS_KILL===_0x201f22(0x3a7))return![];if(_0x14fbe8?.[_0x201f22(0x260)]?.[_0x201f22(0x356)]&&typeof _0x14fbe8['options'][_0x201f22(0x356)]==='object'&&_0x14fbe8[_0x201f22(0x260)]['processes'][_0x201f22(0x2e7)]===![])return![];return!![];}function _0x360b44(_0x3f4d4e,_0x5b3624){const _0x51fd62=_0x509c5d,_0x2ae749=!!_0x5b3624?.[_0x51fd62(0x38b)];switch(_0x3f4d4e){case _0x51fd62(0x2eb):return{'controllable':_0x2ae749,'decommissionable':![],'killable':!![],'killConfirm':_0x51fd62(0x355)};case'cli':case _0x51fd62(0x345):return{'controllable':_0x2ae749,'decommissionable':![],'killable':!![],'killConfirm':_0x51fd62(0x1e5)};case _0x51fd62(0x259):return{'controllable':![],'decommissionable':![],'killable':![]};case _0x51fd62(0x203):case _0x51fd62(0x393):case _0x51fd62(0x390):case _0x51fd62(0x220):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x51fd62(0x1ec)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x130df5{constructor(_0x15b96f){const _0x1a3d4f=_0x509c5d;this[_0x1a3d4f(0x3a4)]=_0x15b96f,this[_0x1a3d4f(0x36a)]=null,this['_desired']=null,this['_desiredOverlay']=new Map(),this[_0x1a3d4f(0x1e1)]=null,this['_isWriter']=![],this[_0x1a3d4f(0x3eb)]=![],this[_0x1a3d4f(0x3a5)]=_0x5796b5(),this[_0x1a3d4f(0x2ea)]=_0x1e889d(process['pid'],this[_0x1a3d4f(0x3a5)]),this[_0x1a3d4f(0x263)]=_0x39a26c['randomUUID']()[_0x1a3d4f(0x33d)](0x0,0x8),this[_0x1a3d4f(0x391)]=_0x375010(this[_0x1a3d4f(0x2ea)],this[_0x1a3d4f(0x263)]),this[_0x1a3d4f(0x3f4)]=Date['now'](),this[_0x1a3d4f(0x384)]=null,this[_0x1a3d4f(0x28d)]=null,this[_0x1a3d4f(0x291)]=null,this[_0x1a3d4f(0x39e)]=null,this['_onProcEvent']=null,this[_0x1a3d4f(0x228)]=null,this['_lastPublishAt']=0x0,this[_0x1a3d4f(0x3e7)]={},this[_0x1a3d4f(0x3b5)]=new Map(),this[_0x1a3d4f(0x31c)]=process[_0x1a3d4f(0x315)](),this[_0x1a3d4f(0x25e)]=Date[_0x1a3d4f(0x3be)](),this[_0x1a3d4f(0x2ed)]=0x0,this[_0x1a3d4f(0x2d7)]=new Map();}get['selfKey'](){const _0x2b612c=_0x509c5d;return this[_0x2b612c(0x2ea)];}get[_0x509c5d(0x368)](){const _0x4c1b3f=_0x509c5d;return this[_0x4c1b3f(0x391)];}[_0x509c5d(0x223)](_0x4a6852,_0x4710f4){const _0x3e5dc4=_0x360b44(_0x4a6852,_0x4710f4);if(_0x3e5dc4['killable']&&!_0x52d7c2(this['okdb']))return{..._0x3e5dc4,'killable':![],'killConfirm':undefined};return _0x3e5dc4;}[_0x509c5d(0x34c)](){const _0x515642=_0x509c5d;return!!this[_0x515642(0x36a)];}[_0x509c5d(0x3f6)](_0x4edde6){const _0x392d6a=_0x509c5d;Object[_0x392d6a(0x1e2)](this[_0x392d6a(0x3e7)],_0x4edde6||{});}[_0x509c5d(0x330)](_0x4c2f87){if(_0x4c2f87)this['_listenAddr']=_0x4c2f87;}[_0x509c5d(0x30c)](_0xf644b4={}){const _0x15b61d=_0x509c5d;return this[_0x15b61d(0x3a4)][_0x15b61d(0x2f3)](_0xf644b4);}['processingStatusView'](){const _0x53244c=_0x509c5d,_0x5db0ac={};let _0x558102=0x0,_0x1d17ec=0x0;const _0x1a436a=new Set();for(const _0x5cc02e of this['listNodes']()){_0x1d17ec++;const _0x1ae39c=_0x5cc02e['processing'];if(!_0x1ae39c)continue;if(_0x1ae39c['participate'])_0x558102++;for(const _0x443c43 of _0x1ae39c[_0x53244c(0x38b)]||[]){if(!['single',_0x53244c(0x2dc)][_0x53244c(0x1d6)](_0x443c43[_0x53244c(0x30e)]))continue;(_0x443c43['state']==='online'||_0x443c43[_0x53244c(0x1fb)]===_0x53244c(0x36c))&&_0x443c43[_0x53244c(0x3d9)]&&_0x1a436a[_0x53244c(0x299)]((_0x443c43['env']||_0x53244c(0x3a8))+':'+_0x443c43[_0x53244c(0x3d9)]);const _0x1bd2a9=_0x443c43[_0x53244c(0x2f1)]||_0x53244c(0x3a8);(_0x5db0ac[_0x1bd2a9]||=[])[_0x53244c(0x290)]({..._0x443c43,'env':_0x1bd2a9,'owner':{'pid':_0x5cc02e[_0x53244c(0x215)]??null,'kind':_0x5cc02e[_0x53244c(0x285)]??null}});}}for(const [_0x32190d,_0xc19c4f]of Object['entries'](_0x5db0ac)){for(const _0x184769 of _0xc19c4f){if(_0x184769[_0x53244c(0x30e)]===_0x53244c(0x2cb)&&!_0x184769[_0x53244c(0x392)]){const _0x17a7e9=_0x32190d+':'+(_0x184769[_0x53244c(0x3d9)]??'');if(!_0x1a436a[_0x53244c(0x318)](_0x17a7e9))_0x184769[_0x53244c(0x3ae)]=!![];}}}return{'envs':_0x5db0ac,'policy':null,'participation':{'participating':_0x558102,'total':_0x1d17ec},'source':_0x53244c(0x2af)};}[_0x509c5d(0x3c0)](){const _0x196c9=_0x509c5d,_0x4c7fc1=_0xaa8cad=>{const _0x19390e=_0x490e;if(_0xaa8cad[_0x19390e(0x1fb)]===_0x19390e(0x3db)||_0xaa8cad[_0x19390e(0x1fb)]===_0x19390e(0x36c)||_0xaa8cad['state']===_0x19390e(0x1d7))return 0x3;if(_0xaa8cad[_0x19390e(0x392)])return 0x1;return 0x2;},_0x51a59a=new Map();for(const _0x289a75 of this[_0x196c9(0x253)]()){for(const _0x68baa0 of _0x289a75['processing']?.[_0x196c9(0x38b)]||[]){const _0x4b3fe8={..._0x68baa0,'owner':{'pid':_0x289a75[_0x196c9(0x215)]??null,'kind':_0x289a75[_0x196c9(0x285)]??null,'host':_0x289a75[_0x196c9(0x396)]??null}},_0x1b4c75=_0x68baa0[_0x196c9(0x30e)]===_0x196c9(0x2cb)?_0x196c9(0x38d)+(_0x68baa0[_0x196c9(0x2f1)]??'')+'::'+(_0x68baa0['cursorKey']??_0x68baa0[_0x196c9(0x234)]??_0x68baa0['id']):_0x196c9(0x3ab)+(_0x289a75[_0x196c9(0x2f2)]??_0x289a75[_0x196c9(0x302)]??'')+'::'+(_0x68baa0['env']??'')+'::'+_0x68baa0['id'],_0x25fd09=_0x51a59a[_0x196c9(0x2c0)](_0x1b4c75);if(!_0x25fd09||_0x4c7fc1(_0x4b3fe8)>_0x4c7fc1(_0x25fd09))_0x51a59a['set'](_0x1b4c75,_0x4b3fe8);}}return[..._0x51a59a[_0x196c9(0x1e9)]()];}[_0x509c5d(0x322)](){const _0x5b6562=_0x509c5d,_0x35d219=Date[_0x5b6562(0x3be)](),_0x3a021a=this[_0x5b6562(0x253)](),_0x1d8f7a=_0x4967ee=>Math[_0x5b6562(0x29d)](0x0,Math[_0x5b6562(0x1fc)]((_0x35d219-(_0x4967ee['startedAt']||_0x35d219))/0x3e8)),_0x51a96d=_0x3a021a['find'](_0x72dd80=>_0x72dd80[_0x5b6562(0x285)]==='primary'),_0x430154=_0x3a021a['filter'](_0x591ef6=>_0x591ef6[_0x5b6562(0x285)]===_0x5b6562(0x203));if(_0x51a96d||_0x430154[_0x5b6562(0x363)])return{'primary':_0x51a96d?{'pid':_0x51a96d['pid'],'uptime':_0x1d8f7a(_0x51a96d)}:null,'workers':_0x430154[_0x5b6562(0x241)](_0x1b4ba8=>({'pid':_0x1b4ba8[_0x5b6562(0x215)],'uptime':_0x1d8f7a(_0x1b4ba8)})),'workersConfigured':_0x51a96d?.[_0x5b6562(0x334)]?.['workersConfigured']??_0x430154['length'],'mode':_0x5b6562(0x2df)};const _0x47dfcd=_0x3a021a[_0x5b6562(0x25a)](_0xb1413=>_0xb1413[_0x5b6562(0x285)]==='cli'||_0xb1413[_0x5b6562(0x285)]==='standalone'||_0xb1413[_0x5b6562(0x285)]==='embedded'),_0x3d737f=_0x47dfcd?{'pid':_0x47dfcd['pid'],'uptime':_0x1d8f7a(_0x47dfcd)}:{'pid':process[_0x5b6562(0x215)],'uptime':Math[_0x5b6562(0x29d)](0x0,Math[_0x5b6562(0x1fc)](process[_0x5b6562(0x2ee)]()))};return{'primary':_0x3d737f,'workers':[_0x3d737f],'workersConfigured':0x1,'mode':_0x5b6562(0x2cb)};}[_0x509c5d(0x376)](){const _0x10b732=_0x509c5d;return this[_0x10b732(0x26b)]();}['treeView'](){const _0x4b6ea3=_0x509c5d,_0x2d3cf7=new Map();for(const _0x3096dc of this['_groupByProcess']())_0x2d3cf7[_0x4b6ea3(0x226)](_0x3096dc[_0x4b6ea3(0x302)],{..._0x3096dc,'children':[]});const _0x4a9789=[];for(const _0x218b9c of _0x2d3cf7[_0x4b6ea3(0x1e9)]()){const _0x1769e3=_0x218b9c['supervisorKey']?_0x2d3cf7['get'](_0x218b9c[_0x4b6ea3(0x1f9)]):null;if(_0x1769e3&&_0x1769e3!==_0x218b9c)_0x1769e3[_0x4b6ea3(0x1f7)][_0x4b6ea3(0x290)](_0x218b9c);else _0x4a9789[_0x4b6ea3(0x290)](_0x218b9c);}const _0x332e07=(_0x5d3fa2,_0x490381)=>_0x5d3fa2[_0x4b6ea3(0x285)]===_0x490381['kind']?(_0x5d3fa2[_0x4b6ea3(0x215)]||0x0)-(_0x490381['pid']||0x0):(_0x5d3fa2[_0x4b6ea3(0x285)]??'')<(_0x490381[_0x4b6ea3(0x285)]??'')?-0x1:0x1,_0x50f0df=_0x6b6729=>{const _0x3a639c=_0x4b6ea3;_0x6b6729[_0x3a639c(0x2d0)](_0x332e07);for(const _0x56aa59 of _0x6b6729)if(_0x56aa59[_0x3a639c(0x1f7)][_0x3a639c(0x363)])_0x50f0df(_0x56aa59[_0x3a639c(0x1f7)]);};return _0x50f0df(_0x4a9789),_0x4a9789;}[_0x509c5d(0x277)](_0x3c1bf5){const _0x5f4edb=_0x509c5d;return this[_0x5f4edb(0x26b)]()['find'](_0x5690a4=>_0x5690a4['processKey']===_0x3c1bf5)??null;}['_groupByProcess'](_0x1b5983=Date[_0x509c5d(0x3be)]()){const _0x40fa0c=_0x509c5d,_0x20bd54=new Map();for(const _0x2dcbe4 of this[_0x40fa0c(0x253)]()){const _0x3131ff=_0x2a0447(_0x2dcbe4);let _0x3ddcae=_0x20bd54['get'](_0x3131ff);!_0x3ddcae&&(_0x3ddcae={'processKey':_0x3131ff,'nodeKey':_0x3131ff,'pid':_0x2dcbe4[_0x40fa0c(0x215)],'ppid':_0x2dcbe4[_0x40fa0c(0x34d)]??null,'host':_0x2dcbe4['host']??null,'kind':_0x2dcbe4[_0x40fa0c(0x285)],'role':null,'supervisorKey':_0x2dcbe4['supervisorKey']??null,'slot':_0x2dcbe4[_0x40fa0c(0x370)]??null,'slotKey':_0x2dcbe4[_0x40fa0c(0x2bf)]??null,'caps':_0x2dcbe4[_0x40fa0c(0x3c8)]??null,'lifecycle':_0x2dcbe4[_0x40fa0c(0x211)]??null,'uptime':Math[_0x40fa0c(0x29d)](0x0,Math[_0x40fa0c(0x1fc)]((_0x1b5983-(_0x2dcbe4['startedAt']||_0x1b5983))/0x3e8)),'startedAt':_0x2dcbe4[_0x40fa0c(0x3d2)]??null,'meta':_0x2dcbe4[_0x40fa0c(0x334)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x20bd54[_0x40fa0c(0x226)](_0x3131ff,_0x3ddcae));_0x3ddcae['instances'][_0x40fa0c(0x290)]({'instanceId':_0x2dcbe4[_0x40fa0c(0x3c2)]??null,'role':_0x2dcbe4[_0x40fa0c(0x3ea)]??null,'listenAddr':_0x2dcbe4[_0x40fa0c(0x29a)]??null,'lifecycle':_0x2dcbe4['lifecycle']??null,'processing':_0x2dcbe4[_0x40fa0c(0x32b)]??null});if(!_0x3ddcae[_0x40fa0c(0x3ea)]&&_0x2dcbe4[_0x40fa0c(0x3ea)])_0x3ddcae['role']=_0x2dcbe4[_0x40fa0c(0x3ea)];if(!_0x3ddcae['listenAddr']&&_0x2dcbe4[_0x40fa0c(0x29a)])_0x3ddcae['listenAddr']=_0x2dcbe4['listenAddr'];if(!_0x3ddcae[_0x40fa0c(0x32b)]&&_0x2dcbe4[_0x40fa0c(0x32b)])_0x3ddcae['processing']=_0x2dcbe4['processing'];if(!_0x3ddcae[_0x40fa0c(0x26e)]&&_0x2dcbe4[_0x40fa0c(0x26e)])_0x3ddcae[_0x40fa0c(0x26e)]=_0x2dcbe4[_0x40fa0c(0x26e)];if(!_0x3ddcae['singletonClaims']&&_0x2dcbe4[_0x40fa0c(0x399)])_0x3ddcae[_0x40fa0c(0x399)]=_0x2dcbe4[_0x40fa0c(0x399)];if(_0x3ddcae[_0x40fa0c(0x3c8)]==null&&_0x2dcbe4[_0x40fa0c(0x3c8)])_0x3ddcae[_0x40fa0c(0x3c8)]=_0x2dcbe4[_0x40fa0c(0x3c8)];if(_0x2dcbe4['stats']&&(!_0x3ddcae[_0x40fa0c(0x1f8)]||(_0x2dcbe4[_0x40fa0c(0x1f8)]['at']??0x0)>(_0x3ddcae[_0x40fa0c(0x1f8)]['at']??0x0)))_0x3ddcae[_0x40fa0c(0x1f8)]=_0x2dcbe4[_0x40fa0c(0x1f8)];}return[..._0x20bd54[_0x40fa0c(0x1e9)]()];}[_0x509c5d(0x22a)](){const _0x1e9dd8=_0x509c5d,_0x361ebe=[],_0x1c84de={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x2e211c of this[_0x1e9dd8(0x26b)]()){_0x361ebe['push']({'processKey':_0x2e211c['processKey'],'kind':_0x2e211c[_0x1e9dd8(0x285)],'pid':_0x2e211c[_0x1e9dd8(0x215)],'supervisorKey':_0x2e211c[_0x1e9dd8(0x1f9)],'meta':_0x2e211c['meta']??null,'uptime':_0x2e211c[_0x1e9dd8(0x2ee)],'stats':_0x2e211c['stats']??null}),_0x1c84de[_0x1e9dd8(0x356)]++;if(_0x2e211c[_0x1e9dd8(0x1f8)]){_0x1c84de[_0x1e9dd8(0x1f4)]+=_0x2e211c[_0x1e9dd8(0x1f8)]['rss']||0x0,_0x1c84de[_0x1e9dd8(0x3cd)]+=(_0x2e211c[_0x1e9dd8(0x1f8)]['heapUsed']||0x0)+(_0x2e211c[_0x1e9dd8(0x1f8)][_0x1e9dd8(0x205)]?.[_0x1e9dd8(0x3cd)]||0x0);const _0x4915bc=_0x2e211c[_0x1e9dd8(0x1f8)][_0x1e9dd8(0x205)];_0x4915bc&&(_0x1c84de[_0x1e9dd8(0x205)][_0x1e9dd8(0x29f)]+=_0x4915bc['count']||0x0,_0x1c84de['threads'][_0x1e9dd8(0x2bc)]+=_0x4915bc['sandbox']||0x0,_0x1c84de['threads'][_0x1e9dd8(0x2de)]+=_0x4915bc[_0x1e9dd8(0x2de)]||0x0);}}return{'totals':_0x1c84de,'nodes':_0x361ebe};}async[_0x509c5d(0x325)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x5339e5=_0x509c5d;this[_0x5339e5(0x261)]=this[_0x5339e5(0x261)]||!!writer,this['_isReader']=this['_isReader']||!!reader,this['_kind']=kind||this[_0x5339e5(0x384)]||(_0x172b32[_0x5339e5(0x343)]?_0x5339e5(0x203):_0x5339e5(0x3b3)),this[_0x5339e5(0x28d)]=supervisorKey??this[_0x5339e5(0x28d)],this[_0x5339e5(0x291)]=listenAddr??this[_0x5339e5(0x291)],this['_ensureDesired'](),await this[_0x5339e5(0x2cc)]();if(!writer&&!reader)return null;if(!this['_statusEnv']){const _0x1c01f0=await this[_0x5339e5(0x3a4)][_0x5339e5(0x33e)](_0xf7a273,{'sync':![],'durability':_0x5339e5(0x204)});if(!_0x1c01f0[_0x5339e5(0x339)](_0x4a843e))await _0x1c01f0[_0x5339e5(0x3aa)](_0x4a843e);this[_0x5339e5(0x36a)]=_0x1c01f0;}return this['_statusEnv'];}['_nodeDb'](){const _0x502917=_0x509c5d;return this[_0x502917(0x218)]!==this[_0x502917(0x36a)]&&(this[_0x502917(0x218)]=this[_0x502917(0x36a)],this['_nodeDbCache']=this['_statusEnv']['_getType'](_0x4a843e)[_0x502917(0x274)]),this[_0x502917(0x32c)];}[_0x509c5d(0x23f)](_0x366909){const _0x1d609f=_0x509c5d;if(_0x4f356c)return this[_0x1d609f(0x1da)]()['putSync'](_0x366909['nodeKey'],_0x366909,0x1);const _0x110005=this[_0x1d609f(0x1da)]()[_0x1d609f(0x21f)](_0x366909['nodeKey'],_0x366909,0x1);if(_0x110005&&typeof _0x110005[_0x1d609f(0x200)]===_0x1d609f(0x1dd))_0x110005['then'](undefined,()=>{});return _0x110005;}[_0x509c5d(0x206)](_0x1ad1e9){const _0x308edc=_0x509c5d;return this[_0x308edc(0x1da)]()[_0x308edc(0x333)](_0x1ad1e9[_0x308edc(0x2f2)],_0x1ad1e9,0x1);}[_0x509c5d(0x3e0)](_0x73de9b){const _0x47b3ae=_0x509c5d;if(_0x4f356c)try{return this[_0x47b3ae(0x1da)]()[_0x47b3ae(0x2ae)](_0x73de9b);}catch{return![];}const _0x486ffd=this[_0x47b3ae(0x1da)]()[_0x47b3ae(0x294)](_0x73de9b);if(_0x486ffd&&typeof _0x486ffd[_0x47b3ae(0x200)]===_0x47b3ae(0x1dd))_0x486ffd[_0x47b3ae(0x200)](undefined,()=>{});return _0x486ffd;}async[_0x509c5d(0x2f5)](_0x4ff4de){const _0x21bd3b=_0x509c5d;if(!this[_0x21bd3b(0x36a)]||!this[_0x21bd3b(0x261)]||!_0x4ff4de?.[_0x21bd3b(0x2f2)])return;return this[_0x21bd3b(0x23f)](_0x4ff4de);}async[_0x509c5d(0x3b2)](_0x200667){const _0x1a52f2=_0x509c5d;if(!this[_0x1a52f2(0x36a)]||!this[_0x1a52f2(0x261)]||!_0x200667)return;const _0x817659=_0x200667[_0x1a52f2(0x1d6)]('#'),_0x706b53=[];for(const {key:_0x195ffd}of this[_0x1a52f2(0x36a)][_0x1a52f2(0x360)](_0x4a843e)){if(_0x195ffd===_0x200667||!_0x817659&&typeof _0x195ffd===_0x1a52f2(0x2a8)&&_0x195ffd[_0x1a52f2(0x358)](_0x200667+'#'))_0x706b53[_0x1a52f2(0x290)](_0x195ffd);}for(const _0x192bdb of _0x706b53){try{this[_0x1a52f2(0x1da)]()[_0x1a52f2(0x2ae)](_0x192bdb);}catch{}}}[_0x509c5d(0x346)](_0xf1ed41){const _0x46fc62=_0x509c5d;if(typeof _0xf1ed41?.[_0x46fc62(0x215)]!=='number')return![];if(_0xf1ed41[_0x46fc62(0x396)]!==_0x10883f[_0x46fc62(0x381)]())return![];if(_0xf1ed41[_0x46fc62(0x215)]===process[_0x46fc62(0x215)])return![];if(_0xf1ed41[_0x46fc62(0x32d)]!=null&&_0xf1ed41[_0x46fc62(0x32d)]<Date[_0x46fc62(0x3be)]()-_0x22b8c6)return!![];try{return process[_0x46fc62(0x2e7)](_0xf1ed41[_0x46fc62(0x215)],0x0),![];}catch(_0x1ff6b6){return _0x1ff6b6[_0x46fc62(0x3bd)]===_0x46fc62(0x2ef);}}['listNodes'](){const _0x5996de=_0x509c5d;if(!this[_0x5996de(0x36a)])return[];try{this[_0x5996de(0x36a)]['db']?.[_0x5996de(0x238)]?.();}catch{}const _0x3b4431=Date[_0x5996de(0x3be)](),_0x3adf17=_0x10883f[_0x5996de(0x381)](),_0x4fc5c2=[];for(const {value:_0x2b1faa}of this[_0x5996de(0x36a)][_0x5996de(0x360)](_0x4a843e)){if(!_0x2b1faa)continue;let _0xad029d=null;_0x2b1faa[_0x5996de(0x396)]===_0x3adf17&&typeof _0x2b1faa['pid']===_0x5996de(0x247)&&(_0xad029d=!this[_0x5996de(0x346)](_0x2b1faa));if(_0xad029d===![])continue;const _0x200793=_0x2b1faa['expiresAt']==null||_0x2b1faa[_0x5996de(0x32d)]>=_0x3b4431;if(_0xad029d===!![]||_0x200793)_0x4fc5c2[_0x5996de(0x290)](_0x2b1faa);}return _0x4fc5c2;}async[_0x509c5d(0x252)](_0x3080a6=0x0){const _0x369512=_0x509c5d;if(!this[_0x369512(0x36a)]||!this[_0x369512(0x261)])return;const _0x375778=Date[_0x369512(0x3be)]()-_0x3080a6,_0x603a9f=new Set(),_0x369949=[],_0x32e6c2=_0x10883f[_0x369512(0x381)]();for(const {key:_0x3ac896,value:_0x41ded9}of this['_statusEnv']['getRange'](_0x4a843e)){if(!_0x41ded9)continue;const _0x31e7c9=_0x41ded9[_0x369512(0x396)]===_0x32e6c2&&typeof _0x41ded9[_0x369512(0x215)]==='number',_0x517215=_0x31e7c9?this['_nodeDead'](_0x41ded9):_0x41ded9['expiresAt']!=null&&_0x41ded9[_0x369512(0x32d)]<_0x375778;if(_0x517215)_0x369949[_0x369512(0x290)](_0x3ac896);else _0x603a9f[_0x369512(0x299)](_0x2a0447(_0x41ded9)??_0x3ac896);}for(const _0x30c2f8 of _0x369949)this[_0x369512(0x3e0)](_0x30c2f8);if(this[_0x369512(0x3a6)]()){const _0x3e8c28=[];for(const {key:_0x4470e6}of this[_0x369512(0x250)](_0x369512(0x292))){if(!_0x603a9f['has'](_0x4470e6)){if(_0x4f356c)try{this[_0x369512(0x304)][_0x369512(0x2ae)](_0x369512(0x209)+_0x4470e6);}catch{}else _0x3e8c28[_0x369512(0x290)](this[_0x369512(0x304)][_0x369512(0x294)]('node/'+_0x4470e6));}}if(_0x3e8c28['length'])await Promise[_0x369512(0x2fa)](_0x3e8c28);}}[_0x509c5d(0x3d7)](_0x24ddb9=null){const _0x54892e=_0x509c5d;if(this[_0x54892e(0x39e)])return;if(!this[_0x54892e(0x261)]||!this['_statusEnv']){this[_0x54892e(0x3a4)]?.['log']?.[_0x54892e(0x31b)]?.(_0x54892e(0x1fd)+this['_isWriter']+_0x54892e(0x364)+!!this[_0x54892e(0x36a)]+_0x54892e(0x2c4),{'feature':_0x54892e(0x356)});return;}this[_0x54892e(0x228)]=_0x24ddb9,this[_0x54892e(0x33a)]=()=>this[_0x54892e(0x2d5)]();for(const _0x17bd24 of _0x595dcf)this['okdb'][_0x54892e(0x326)]['on'](_0x17bd24,this[_0x54892e(0x33a)]);this[_0x54892e(0x2cd)]();const _0x1aaa4c=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x328fb5;this[_0x54892e(0x39e)]=setInterval(()=>{const _0x3fdbde=_0x54892e;if(this['_onTick'])try{this[_0x3fdbde(0x228)]();}catch{}this[_0x3fdbde(0x2cd)](),this[_0x3fdbde(0x252)]()[_0x3fdbde(0x3e2)](()=>{});},_0x1aaa4c);if(this[_0x54892e(0x39e)][_0x54892e(0x278)])this[_0x54892e(0x39e)]['unref']();}[_0x509c5d(0x2d5)](){const _0x4fd1bf=_0x509c5d;if(!this[_0x4fd1bf(0x261)]||!this[_0x4fd1bf(0x36a)])return;if(Date[_0x4fd1bf(0x3be)]()-this[_0x4fd1bf(0x2e3)]<_0x3d279f)return;this['_publishNow']();}[_0x509c5d(0x2cd)](){const _0x5f25c0=_0x509c5d;if(!this[_0x5f25c0(0x261)]||!this['_statusEnv'])return;this['_lastPublishAt']=Date['now']();try{const _0x36f37f=[this[_0x5f25c0(0x244)]()];for(const _0x10bb32 of this['_children']['values']())_0x36f37f[_0x5f25c0(0x290)](this[_0x5f25c0(0x1e4)](_0x10bb32));const _0x10ac86=_0x2a0784[_0x5f25c0(0x24a)]?_0x2a0784[_0x5f25c0(0x3be)]():0x0;for(const _0x38b8f7 of _0x36f37f){try{this[_0x5f25c0(0x206)](_0x38b8f7),this['_publishFailWarned']=![];}catch(_0x231986){!this[_0x5f25c0(0x3c1)]&&(this[_0x5f25c0(0x3c1)]=!![],this[_0x5f25c0(0x3a4)]?.[_0x5f25c0(0x314)]?.[_0x5f25c0(0x31b)]?.(_0x5f25c0(0x3c3)+_0x231986['message'],{'feature':_0x5f25c0(0x356)}));}}if(_0x2a0784[_0x5f25c0(0x24a)])_0x2a0784[_0x5f25c0(0x281)]('registry-publish',_0x2a0784['now']()-_0x10ac86,_0x5f25c0(0x3f3)+_0x36f37f[_0x5f25c0(0x363)]+_0x5f25c0(0x340));}catch(_0x59f8c7){!this[_0x5f25c0(0x3c1)]&&(this[_0x5f25c0(0x3c1)]=!![],this[_0x5f25c0(0x3a4)]?.[_0x5f25c0(0x314)]?.['warn']?.(_0x5f25c0(0x3c3)+_0x59f8c7[_0x5f25c0(0x24b)],{'feature':_0x5f25c0(0x356)}));}}async['stopHeartbeat'](){const _0x18184c=_0x509c5d;if(this['_onProcEvent']){for(const _0x4f30c6 of _0x595dcf){try{this[_0x18184c(0x3a4)]['events'][_0x18184c(0x3a7)](_0x4f30c6,this[_0x18184c(0x33a)]);}catch{}}this[_0x18184c(0x33a)]=null;}this['_hbTimer']&&(clearInterval(this[_0x18184c(0x39e)]),this[_0x18184c(0x39e)]=null);try{if(this[_0x18184c(0x36a)]&&this[_0x18184c(0x261)])await this[_0x18184c(0x3b2)](this[_0x18184c(0x391)]);}catch{}}async[_0x509c5d(0x380)](){const _0x1b9cac=_0x509c5d;if(!this['_statusEnv']||!this[_0x1b9cac(0x261)])return;try{await this['removeNode'](this[_0x1b9cac(0x391)]);}catch{}try{const _0x5685a6=[];for(const {value:_0x449e0f}of this['_statusEnv'][_0x1b9cac(0x360)](_0x4a843e)){if(_0x449e0f?.[_0x1b9cac(0x34d)]===process[_0x1b9cac(0x215)]&&_0x449e0f['nodeKey'])_0x5685a6[_0x1b9cac(0x290)](_0x449e0f[_0x1b9cac(0x2f2)]);}for(const _0x54c3a7 of _0x5685a6){try{await this[_0x1b9cac(0x3b2)](_0x54c3a7);}catch{}}}catch{}}async['publishOwnRow'](){const _0x19f1bc=_0x509c5d;return this[_0x19f1bc(0x2f5)](this[_0x19f1bc(0x244)]());}async[_0x509c5d(0x30a)](_0x3f9860){const _0x1812a2=_0x509c5d;if(!this[_0x1812a2(0x36a)]||!this[_0x1812a2(0x261)])return;return this['putNode'](this[_0x1812a2(0x1e4)](_0x3f9860));}[_0x509c5d(0x1e4)]({pid:_0x593bc2,startedAt:_0x5ddfad,kind:_0x262915,supervisorKey:_0x4ae149,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x509c5d(0x21b),meta:meta=null,stats:stats=null}){const _0xdf8a4b=_0x509c5d,_0x30fc16=Date[_0xdf8a4b(0x3be)](),_0x3826e9=_0x1e889d(_0x593bc2,_0x5ddfad);return{'nodeKey':_0x375010(_0x3826e9,'0'),'processKey':_0x3826e9,'instanceId':'0','pid':_0x593bc2,'startedAt':_0x5ddfad,'ppid':process[_0xdf8a4b(0x215)],'host':_0x10883f[_0xdf8a4b(0x381)](),'supervisorKey':_0x4ae149,'slot':slot,'slotKey':slotKey,'kind':_0x262915,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x30fc16,'expiresAt':_0x30fc16+_0x15800a,'caps':this[_0xdf8a4b(0x223)](_0x262915,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x509c5d(0x25f)](_0x64a0d9){const _0x3f7406=_0x509c5d;if(!_0x64a0d9?.[_0x3f7406(0x215)])return null;const _0x13243b=_0x1e889d(_0x64a0d9[_0x3f7406(0x215)],_0x64a0d9[_0x3f7406(0x3d2)]);this['_children'][_0x3f7406(0x226)](_0x13243b,{..._0x64a0d9,'supervisorKey':_0x64a0d9[_0x3f7406(0x1f9)]??this['_selfKey']});if(this[_0x3f7406(0x261)])await this['publishChildRow'](this['_children']['get'](_0x13243b))[_0x3f7406(0x3e2)]?.(()=>{});return _0x13243b;}[_0x509c5d(0x26a)](_0x388d2b){const _0x1d9676=_0x509c5d;if(!_0x388d2b)return;return this['_children'][_0x1d9676(0x3f1)](_0x388d2b),this[_0x1d9676(0x3b2)](_0x388d2b);}['_sampleOwnStats'](){const _0x156427=_0x509c5d,_0x50ffbf=Date['now'](),_0x6d8d2f=process[_0x156427(0x315)](),_0x3b9a43=(_0x50ffbf-this['_lastCpuAt'])*0x3e8;if(_0x3b9a43>=0x3d090){const _0x28ba0d=_0x6d8d2f['user']-this[_0x156427(0x31c)][_0x156427(0x272)]+(_0x6d8d2f[_0x156427(0x1db)]-this[_0x156427(0x31c)][_0x156427(0x1db)]),_0x4f59c2=_0x10883f[_0x156427(0x267)]()[_0x156427(0x363)]||0x1;this[_0x156427(0x2ed)]=Math['min'](0x64,Math[_0x156427(0x1fc)](_0x28ba0d/(_0x3b9a43*_0x4f59c2)*0x64)),this[_0x156427(0x1e0)]=Math[_0x156427(0x1fc)](_0x3b9a43/0x3e8),this[_0x156427(0x31c)]=_0x6d8d2f,this['_lastCpuAt']=_0x50ffbf;}const _0xa70f7b=process[_0x156427(0x239)](),_0x240332=this['_threadStats'][_0x156427(0x362)];let _0x58f7b2=0x0;if(_0x240332>0x0){const _0x49bed2=[this[_0x156427(0x3a4)],...this['okdb'][_0x156427(0x217)]?.['values']?.()??[]];for(const _0x1f5a10 of _0x49bed2){const _0x533319=_0x1f5a10['functions']?.['_sandbox'];if(_0x533319)_0x58f7b2+=_0x533319['liveThreadStats'][_0x156427(0x2de)];}}let _0x4abab5=null;const _0x76512a=_0x240332;if(_0x76512a>0x0){let _0xd20444=0x0;for(const _0x250c72 of this[_0x156427(0x2d7)][_0x156427(0x1e9)]())_0xd20444+=_0x250c72[_0x156427(0x3cd)]||0x0;_0x4abab5={'count':_0x76512a,'heapUsed':_0xd20444,'sandbox':_0x240332,'busy':_0x58f7b2};}return{'rss':_0xa70f7b['rss'],'heapUsed':_0xa70f7b[_0x156427(0x3cd)],'heapTotal':_0xa70f7b[_0x156427(0x3e6)],'external':_0xa70f7b[_0x156427(0x338)],'cpuPct':this[_0x156427(0x2ed)],'cpuWindowMs':this[_0x156427(0x1e0)]??null,'threads':_0x4abab5,'at':_0x50ffbf};}[_0x509c5d(0x240)](_0x1e700a,_0x351268){const _0x223755=_0x509c5d;if(!_0x1e700a||!_0x351268)return;this[_0x223755(0x2d7)]['set'](_0x1e700a,_0x351268);}[_0x509c5d(0x207)](_0x3e04fb){const _0x3ecb3d=_0x509c5d;this[_0x3ecb3d(0x2d7)][_0x3ecb3d(0x3f1)](_0x3e04fb);}[_0x509c5d(0x32e)](_0x2accfc,_0x4ae830,_0x4f2911=undefined){const _0x361050=_0x509c5d,_0x48961a=this['_children'][_0x361050(0x2c0)](_0x2accfc);if(!_0x48961a||!_0x4ae830)return;if(_0x4f2911!==undefined)_0x48961a[_0x361050(0x32b)]=_0x4f2911;_0x48961a[_0x361050(0x1f8)]={'rss':_0x4ae830[_0x361050(0x1f4)]??null,'heapUsed':_0x4ae830[_0x361050(0x3cd)]??null,'heapTotal':_0x4ae830[_0x361050(0x3e6)]??null,'external':_0x4ae830['external']??null,'cpuPct':_0x4ae830[_0x361050(0x313)]??null,'cpuWindowMs':_0x4ae830[_0x361050(0x29e)]??null,'threads':_0x4ae830['threads']??null,'claims':_0x4ae830['claims']??null,'envsOpen':_0x4ae830[_0x361050(0x243)]??null,'at':Date[_0x361050(0x3be)]()};}[_0x509c5d(0x244)](){const _0x42049=_0x509c5d,_0x4e4b69=Date['now'](),_0x4b2ee5=this[_0x42049(0x3a4)][_0x42049(0x21c)]||{},_0x1a971b=this[_0x42049(0x384)]||_0x42049(0x3b3);return{'nodeKey':this[_0x42049(0x391)],'processKey':this[_0x42049(0x2ea)],'instanceId':this[_0x42049(0x263)],'pid':process[_0x42049(0x215)],'startedAt':this['_processStartedAt'],'instanceStartedAt':this['_startedAt'],'ppid':typeof process[_0x42049(0x34d)]===_0x42049(0x247)?process[_0x42049(0x34d)]:null,'host':_0x10883f[_0x42049(0x381)](),'supervisorKey':this[_0x42049(0x28d)]??null,'kind':_0x1a971b,'role':{'engines':!!_0x4b2ee5[_0x42049(0x26e)],'processors':!!_0x4b2ee5[_0x42049(0x38b)],'compaction':_0x4b2ee5[_0x42049(0x1cc)],'http':_0x4b2ee5[_0x42049(0x22d)]},'listenAddr':this[_0x42049(0x291)]??null,'heartbeatAt':_0x4e4b69,'expiresAt':_0x4e4b69+_0x15800a,'caps':this['_caps'](_0x1a971b,_0x4b2ee5),'lifecycle':{'state':_0x42049(0x21b),'desiredVersionApplied':null},'meta':{...this[_0x42049(0x3e7)]},'processing':_0x4b2ee5[_0x42049(0x38b)]?this['_buildProcessingFacet']():null,'engines':_0x4b2ee5[_0x42049(0x26e)]?[...this[_0x42049(0x3a4)][_0x42049(0x39f)]??[]]:null,'singletonClaims':this['_collectSingletonClaims'](),'stats':this['_sampleOwnStats'](),'writers':this[_0x42049(0x2ff)]()};}[_0x509c5d(0x2ff)](){const _0x215cf4=_0x509c5d,_0x1a4f51={};try{for(const [_0x5e6802,_0x3cc200]of this[_0x215cf4(0x3a4)][_0x215cf4(0x217)]){try{const _0x266b91=_0x3cc200[_0x215cf4(0x2c7)]?.();if(!_0x266b91)continue;if(!_0x266b91[_0x215cf4(0x35a)]&&!_0x266b91[_0x215cf4(0x354)]&&!(_0x266b91['parkedNow']??0x0)&&!_0x266b91[_0x215cf4(0x1d4)])continue;_0x1a4f51[_0x5e6802]={'depth':_0x266b91['depth'],'oldestPendingMs':_0x266b91[_0x215cf4(0x1ca)],'committed':_0x266b91[_0x215cf4(0x354)],'commitsPerSec':_0x266b91['commitsPerSec'],'commitP99Ms':_0x266b91[_0x215cf4(0x2fb)],'parkedNow':_0x266b91[_0x215cf4(0x31f)]??0x0,'draining':!!_0x266b91['draining']};}catch{}}}catch{}return Object[_0x215cf4(0x3b9)](_0x1a4f51)[_0x215cf4(0x363)]?_0x1a4f51:null;}[_0x509c5d(0x2d8)](){const _0x1ce925=_0x509c5d,_0x53a73e=process[_0x1ce925(0x215)],_0x12fb1e=Date[_0x1ce925(0x3be)](),_0x53cb04=_0x1b8d1c=>{const _0x54c258=_0x1ce925;if(!_0x1b8d1c)return[];const _0x4a2040=[];try{for(const {id:_0xc01400,entry:_0x305399}of _0x1b8d1c[_0x54c258(0x3ec)]()){if(_0x305399?.[_0x54c258(0x374)]?.['pid']!==_0x53a73e)continue;const _0x537375=_0x305399[_0x54c258(0x3e5)]??_0x305399[_0x54c258(0x1fa)]??0x0;if(_0x537375+(_0x305399['ttlMs']??0x0)<_0x12fb1e)continue;_0x4a2040[_0x54c258(0x290)](_0xc01400);}}catch{}return _0x4a2040;},_0x7fac0e=_0x53cb04(this[_0x1ce925(0x28f)]('compact')),_0x52e927=_0x53cb04(this[_0x1ce925(0x28f)](_0x1ce925(0x35c)));if(!_0x7fac0e['length']&&!_0x52e927[_0x1ce925(0x363)])return null;return{'compact':_0x7fac0e,'replicate':_0x52e927};}[_0x509c5d(0x28f)](_0x3fa51d){const _0x552f8b=_0x509c5d;if(!this[_0x552f8b(0x3a4)]?.[_0x552f8b(0x1f1)])return null;if(!this[_0x552f8b(0x2fd)])this[_0x552f8b(0x2fd)]=new Map();let _0x1a4946=this[_0x552f8b(0x2fd)][_0x552f8b(0x2c0)](_0x3fa51d);if(!_0x1a4946)try{_0x1a4946=new _0x14e32d(this[_0x552f8b(0x3a4)]['_rootDb'],{'namespace':_0x3fa51d}),this[_0x552f8b(0x2fd)][_0x552f8b(0x226)](_0x3fa51d,_0x1a4946);}catch{return null;}return _0x1a4946;}[_0x509c5d(0x3bb)](){const _0x447dbb=_0x509c5d,_0x3cf35d=[];try{for(const [_0x555129,_0x10a12e]of this['okdb'][_0x447dbb(0x217)]){if(_0x555129[_0x447dbb(0x358)]('~'))continue;for(const _0x3b56a0 of _0x10a12e['processor'][_0x447dbb(0x1df)]())_0x3cf35d['push']({..._0x3b56a0,'env':_0x555129});}}catch{}return{'participate':this[_0x447dbb(0x3a4)][_0x447dbb(0x38b)]?.[_0x447dbb(0x269)]??![],'processors':_0x3cf35d};}[_0x509c5d(0x3a6)](){const _0x72e258=_0x509c5d;if(this['_desired'])return!![];const _0x65e2f=this[_0x72e258(0x3a4)]['_rootDb'];if(!_0x65e2f)return![];return this['_desired']=_0x65e2f[_0x72e258(0x38e)](_0x322c4f,{'dupSort':![]}),this[_0x72e258(0x1e1)]=_0x65e2f['openDB'](_0x186fd4,{'dupSort':![]}),!![];}async['_migrateVocab'](){const _0x188f48=_0x509c5d;if(!this[_0x188f48(0x3a6)]())return;const _0x545f3d=_0x188f48(0x2b7),_0x6566f=0x1,_0x363e40=this['_desired'][_0x188f48(0x2c0)](_0x545f3d)??0x0;if(_0x363e40>=_0x6566f)return;const _0x24c51b=_0x2610d=>{const _0x547b27=_0x188f48;if(_0x2610d===_0x547b27(0x220))return'single';if(_0x2610d===_0x547b27(0x27a))return'fanout';return _0x2610d;};await this[_0x188f48(0x3a4)][_0x188f48(0x2f4)][_0x188f48(0x27c)][_0x188f48(0x3ef)](()=>{const _0x5e61f3=_0x188f48;for(const _0x8964c7 of['procmode/','procmodeack/']){for(const {key:_0x4bd295,value:_0x128dfd}of this['_desired']['getRange']({'start':_0x8964c7,'end':_0x8964c7+'ÿ'})){if(typeof _0x4bd295!==_0x5e61f3(0x2a8)||!_0x4bd295[_0x5e61f3(0x358)](_0x8964c7))break;const _0x3058f3=_0x24c51b(_0x128dfd[_0x5e61f3(0x30e)]);if(_0x3058f3!==_0x128dfd[_0x5e61f3(0x30e)])this['_desired'][_0x5e61f3(0x21f)](_0x4bd295,{..._0x128dfd,'mode':_0x3058f3});}}this[_0x5e61f3(0x304)][_0x5e61f3(0x21f)](_0x545f3d,_0x6566f);});}['hasDesired'](){const _0x37b68c=_0x509c5d;return!!this[_0x37b68c(0x304)];}[_0x509c5d(0x27b)](_0x267ec0,_0xba238a){const _0x1b84e9=_0x509c5d;if(!this[_0x1b84e9(0x3a6)]())return null;const _0x479e3b=_0x267ec0+'/'+_0xba238a;return this[_0x1b84e9(0x27d)](),this['_desiredOverlay'][_0x1b84e9(0x2c0)](_0x479e3b)??this[_0x1b84e9(0x304)][_0x1b84e9(0x2c0)](_0x479e3b)??null;}['_refreshDesiredSnapshot'](){const _0x1b150b=_0x509c5d;if(!_0x4f356c)return;try{this['okdb'][_0x1b150b(0x2f4)]?.['db']?.['resetReadTxn']?.();}catch{}}async[_0x509c5d(0x342)](_0x28595f,_0x1fdff3,_0xae8c79){const _0x1bdc8c=_0x509c5d;if(!this[_0x1bdc8c(0x3a6)]())return null;const _0x14e06b=_0x28595f+'/'+_0x1fdff3;this[_0x1bdc8c(0x27d)]();const _0x2e3ab5=this[_0x1bdc8c(0x2a1)]['get'](_0x14e06b)??this['_desired'][_0x1bdc8c(0x2c0)](_0x14e06b)??{'version':0x0},_0x138bc0=(_0x2e3ab5['version']||0x0)+0x1,_0x292f67={..._0x2e3ab5,..._0xae8c79,'version':_0x138bc0,'updatedAt':Date[_0x1bdc8c(0x3be)]()};this[_0x1bdc8c(0x2a1)][_0x1bdc8c(0x226)](_0x14e06b,_0x292f67);try{await this['okdb'][_0x1bdc8c(0x2f4)]['_writer']['transaction'](()=>{const _0x2df2e0=_0x1bdc8c;this[_0x2df2e0(0x304)][_0x2df2e0(0x21f)](_0x14e06b,_0x292f67);});}finally{if(this[_0x1bdc8c(0x2a1)][_0x1bdc8c(0x2c0)](_0x14e06b)===_0x292f67)this[_0x1bdc8c(0x2a1)][_0x1bdc8c(0x3f1)](_0x14e06b);}return _0x138bc0;}['listDesired'](_0x2d84c6){const _0x39bf23=_0x509c5d;if(!this[_0x39bf23(0x3a6)]())return[];this[_0x39bf23(0x27d)]();const _0x59c202=_0x2d84c6+'/',_0x3cf33d=[];for(const {key:_0x1cf192,value:_0x178bd2}of this[_0x39bf23(0x304)][_0x39bf23(0x360)]({'start':_0x59c202,'end':_0x59c202+'ÿ'})){if(typeof _0x1cf192!==_0x39bf23(0x2a8)||!_0x1cf192['startsWith'](_0x59c202))break;_0x3cf33d[_0x39bf23(0x290)]({'key':_0x1cf192['slice'](_0x59c202[_0x39bf23(0x363)]),'value':_0x178bd2});}return _0x3cf33d;}[_0x509c5d(0x3a3)](_0x1a08f8){const _0x5377aa=_0x509c5d;if(!this[_0x5377aa(0x3a6)]())return null;return this[_0x5377aa(0x1e1)][_0x5377aa(0x2c0)](_0x1a08f8)??null;}async[_0x509c5d(0x3c7)](_0x2efa77,_0x17ebed,_0x3a45fb={}){const _0x457e2d=_0x509c5d;if(!this[_0x457e2d(0x3a6)]())return null;let _0x506186;return await this[_0x457e2d(0x3a4)]['_systemEnv'][_0x457e2d(0x27c)][_0x457e2d(0x3ef)](()=>{const _0x296aee=_0x457e2d,_0x3da2c9=this[_0x296aee(0x1e1)][_0x296aee(0x2c0)](_0x2efa77)||{'epoch':0x0};_0x506186=(_0x3da2c9[_0x296aee(0x2c5)]||0x0)+0x1,this[_0x296aee(0x1e1)][_0x296aee(0x21f)](_0x2efa77,{..._0x3da2c9,..._0x3a45fb,'cmd':_0x17ebed,'epoch':_0x506186,'updatedAt':Date['now']()});}),_0x506186;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x130df5,'nodeKey':_0x1e889d,'logicalKey':_0x5a4646,'slotKey':_0x24df5d,'PROCESS_ENV':_0xf7a273,'NODE_TYPE':_0x4a843e},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x4ff0a9=_0x5c5b6f;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0xa76fbe=require$$0$4,{EVENTS:_0x35cfba,CHANGE_ACTIONS:_0x1dd1d5}=requireOkdbEnums(),{LOOP:_0x5e0d8e}=requireOkdbLoopMonitor(),_0x3833bb=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x54885e=0x5,_0x9bad60=0x2710;class _0x283130 extends _0xa76fbe{constructor(_0x1560b4,_0x4dbf6c={}){const _0x10f5a6=_0x490e;super(),this[_0x10f5a6(0x3a4)]=_0x1560b4,this['_quantum']=_0x4dbf6c[_0x10f5a6(0x254)]??_0x3833bb,this[_0x10f5a6(0x31e)]=_0x4dbf6c['flushDebounce']??_0x54885e,this['_dedupeMax']=_0x4dbf6c['dedupeMax']??_0x9bad60,this['_started']=![],this[_0x10f5a6(0x3e9)]=new Map(),this[_0x10f5a6(0x1dc)]=new Map(),this['_pending']=new Map(),this['_flushTimer']=null,this[_0x10f5a6(0x2b1)]=![],this[_0x10f5a6(0x3dc)]=new Set(),this['_onItem']=_0x2ee8fe=>this[_0x10f5a6(0x287)](_0x2ee8fe),this[_0x10f5a6(0x310)]=_0x1df99a=>this[_0x10f5a6(0x37e)](_0x1df99a),this[_0x10f5a6(0x361)]=()=>this[_0x10f5a6(0x3f0)]();}[_0x4ff0a9(0x1ff)](){const _0xb2c177=_0x4ff0a9;if(this[_0xb2c177(0x3b7)])return;this[_0xb2c177(0x3b7)]=!![];for(const [_0x4b9f4f,_0x4d71f6]of this[_0xb2c177(0x3a4)][_0xb2c177(0x217)]){if(_0x4b9f4f['startsWith']('~'))continue;try{_0x4d71f6[_0xb2c177(0x1e6)]();}catch{}}for(const [_0x14d3ff,_0x92d250]of this[_0xb2c177(0x3a4)][_0xb2c177(0x217)]){if(_0x14d3ff[_0xb2c177(0x358)]('~'))continue;try{this[_0xb2c177(0x1dc)][_0xb2c177(0x226)](_0x14d3ff,_0x92d250[_0xb2c177(0x3af)]()||0x0);}catch{}}const {events:_0x3fec7f}=this[_0xb2c177(0x3a4)];_0x3fec7f['on'](_0x35cfba[_0xb2c177(0x2dd)],this['_onItem']),_0x3fec7f['on'](_0x35cfba[_0xb2c177(0x303)],this[_0xb2c177(0x29b)]),_0x3fec7f['on'](_0x35cfba[_0xb2c177(0x337)],this[_0xb2c177(0x29b)]),_0x3fec7f['on'](_0x35cfba[_0xb2c177(0x27e)],this[_0xb2c177(0x310)]),_0x3fec7f[_0xb2c177(0x2d4)](_0x35cfba[_0xb2c177(0x3dd)],this['_onStop']);}[_0x4ff0a9(0x3f0)](){const _0x3a9fa2=_0x4ff0a9;if(!this[_0x3a9fa2(0x3b7)])return;this[_0x3a9fa2(0x3b7)]=![];const {events:_0x295960}=this[_0x3a9fa2(0x3a4)];_0x295960[_0x3a9fa2(0x3a7)](_0x35cfba[_0x3a9fa2(0x2dd)],this[_0x3a9fa2(0x29b)]),_0x295960['off'](_0x35cfba['ITEM_UPDATE'],this['_onItem']),_0x295960[_0x3a9fa2(0x3a7)](_0x35cfba[_0x3a9fa2(0x337)],this[_0x3a9fa2(0x29b)]),_0x295960[_0x3a9fa2(0x3a7)](_0x35cfba[_0x3a9fa2(0x27e)],this[_0x3a9fa2(0x310)]);try{_0x295960[_0x3a9fa2(0x3a7)](_0x35cfba[_0x3a9fa2(0x3dd)],this[_0x3a9fa2(0x361)]);}catch{}this['_flushTimer']&&(clearTimeout(this['_flushTimer']),this['_flushTimer']=null),this['_pending']['clear'](),this[_0x3a9fa2(0x3e9)][_0x3a9fa2(0x2c3)](),this[_0x3a9fa2(0x1dc)][_0x3a9fa2(0x2c3)](),this[_0x3a9fa2(0x3dc)][_0x3a9fa2(0x2c3)]();}[_0x4ff0a9(0x2f0)](_0x5a20a1,_0x4305e4,_0x255f77,_0x3b7756){return _0x5a20a1+'\x00'+_0x4305e4+'\x00'+_0x255f77+'\x00'+_0x3b7756;}[_0x4ff0a9(0x316)](_0x497713,_0x537eed,_0x2cb3d8,_0xea9746){const _0x363fe4=_0x4ff0a9,_0x48e315=this[_0x363fe4(0x2f0)](_0x497713,_0x537eed,_0x2cb3d8,_0xea9746);if(this[_0x363fe4(0x3dc)]['has'](_0x48e315))return![];this['_seen']['add'](_0x48e315);if(this['_seen'][_0x363fe4(0x362)]>this['_dedupeMax']){const _0xc0a52d=this['_seen'][_0x363fe4(0x1e9)]()[_0x363fe4(0x2bd)]()[_0x363fe4(0x25b)];this['_seen'][_0x363fe4(0x3f1)](_0xc0a52d);}return!![];}['_handleInProcess'](_0x359098){const _0x56a797=_0x4ff0a9;if(!this[_0x56a797(0x3b7)]||!_0x359098)return;const {env:_0x5951cf,type:_0x2d9041,key:_0x866cf2,clock:_0x20ef6f,origin:_0x1ba8c6,action:_0x3c2597,newValue:_0x58881c,oldValue:_0x596478}=_0x359098;if(_0x5951cf==null||_0x2d9041==null||_0x866cf2==null)return;if(typeof _0x5951cf===_0x56a797(0x2a8)&&_0x5951cf[_0x56a797(0x358)]('~'))return;if(typeof _0x2d9041===_0x56a797(0x2a8)&&_0x2d9041['startsWith']('~'))return;if(!this[_0x56a797(0x316)](_0x5951cf,_0x2d9041,_0x866cf2,_0x20ef6f))return;const _0x2fb993=_0x3c2597===_0x1dd1d5[_0x56a797(0x2e5)]?_0x56a797(0x294):_0x56a797(0x21f);this[_0x56a797(0x388)](_0x56a797(0x28b),{'env':_0x5951cf,'type':_0x2d9041,'key':_0x866cf2,'op':_0x2fb993,'clock':_0x20ef6f,'origin':_0x1ba8c6,'value':_0x2fb993===_0x56a797(0x294)?null:_0x58881c,'prevValue':_0x596478});}[_0x4ff0a9(0x37e)](_0x38b402){const _0x39f6e4=_0x4ff0a9;if(!this[_0x39f6e4(0x3b7)])return;if(!_0x38b402||typeof _0x38b402[_0x39f6e4(0x2f1)]!=='string'||typeof _0x38b402[_0x39f6e4(0x234)]!==_0x39f6e4(0x2a8))return;const {env:_0x22937a,type:_0x13b5be}=_0x38b402;if(_0x22937a[_0x39f6e4(0x358)]('~')||_0x13b5be['startsWith']('~'))return;this[_0x39f6e4(0x2db)][_0x39f6e4(0x226)](_0x22937a+'\x00'+_0x13b5be,{'env':_0x22937a,'type':_0x13b5be}),this[_0x39f6e4(0x249)]();}[_0x4ff0a9(0x249)](){const _0xab1e60=_0x4ff0a9;if(this[_0xab1e60(0x24c)])return;const _0x20301e=()=>{const _0x5db2b8=_0xab1e60;this[_0x5db2b8(0x24c)]=null,this[_0x5db2b8(0x335)]()[_0x5db2b8(0x3e2)](()=>{});};this[_0xab1e60(0x24c)]=setTimeout(_0x20301e,this[_0xab1e60(0x31e)]>0x0?this['_flushDebounce']:0x0);}async[_0x4ff0a9(0x335)](){const _0x1b4820=_0x4ff0a9;if(this[_0x1b4820(0x2b1)]){this[_0x1b4820(0x249)]();return;}this[_0x1b4820(0x2b1)]=!![];try{const _0x405617=[...this[_0x1b4820(0x2db)][_0x1b4820(0x1e9)]()];this[_0x1b4820(0x2db)][_0x1b4820(0x2c3)]();let _0x3249c6=![];for(const {env:_0x30dd82,type:_0x3c2f8e}of _0x405617){try{const _0x4a4fe0=await this[_0x1b4820(0x33b)](_0x30dd82,_0x3c2f8e);if(_0x4a4fe0)_0x3249c6=!![];}catch{this[_0x1b4820(0x2db)][_0x1b4820(0x226)](_0x30dd82+'\x00'+_0x3c2f8e,{'env':_0x30dd82,'type':_0x3c2f8e}),_0x3249c6=!![];}}if(_0x3249c6||this[_0x1b4820(0x2db)][_0x1b4820(0x362)]>0x0)this[_0x1b4820(0x249)]();}finally{this[_0x1b4820(0x2b1)]=![];}}async['_drainOne'](_0x54f655,_0x5bde09){const _0x486c1d=_0x4ff0a9,_0xcf8ff8=await this['okdb'][_0x486c1d(0x2bb)](_0x54f655),_0x343b33=_0x54f655+'\x00'+_0x5bde09;!this[_0x486c1d(0x3e9)]['has'](_0x343b33)&&(!this['_baselines'][_0x486c1d(0x318)](_0x54f655)&&(_0xcf8ff8[_0x486c1d(0x1e6)](),this[_0x486c1d(0x1dc)]['set'](_0x54f655,_0xcf8ff8['getClock']()||0x0)),this[_0x486c1d(0x3e9)][_0x486c1d(0x226)](_0x343b33,this[_0x486c1d(0x1dc)][_0x486c1d(0x2c0)](_0x54f655)));const _0x55cdf1=this[_0x486c1d(0x3e9)][_0x486c1d(0x2c0)](_0x343b33),_0x2662ed=_0xcf8ff8['getClock'](_0x5bde09)||0x0;if(_0x2662ed<=_0x55cdf1)return![];const _0x32ff87=_0x55cdf1+this[_0x486c1d(0x29c)],_0x16b233=Math[_0x486c1d(0x2ca)](_0x2662ed,_0x32ff87),_0x184c55=_0x5e0d8e[_0x486c1d(0x24a)]?_0x5e0d8e[_0x486c1d(0x3be)]():0x0,_0x15d161=Array['from'](_0xcf8ff8[_0x486c1d(0x235)](_0x5bde09,_0x55cdf1+0x1,_0x16b233));let _0x1d72ca=_0x55cdf1;for(const _0x4a8bb2 of _0x15d161){const {clock:_0x1f6b58,key:_0x58db0b,action:_0xd0c3a6,origin:_0x33c007}=_0x4a8bb2;if(_0x1f6b58>_0x1d72ca)_0x1d72ca=_0x1f6b58;if(_0x58db0b==null)continue;if(!this[_0x486c1d(0x316)](_0x54f655,_0x5bde09,_0x58db0b,_0x1f6b58))continue;let _0x512197,_0x3f10a5;if(_0xd0c3a6===_0x1dd1d5[_0x486c1d(0x2e5)])_0x512197=_0x486c1d(0x294),_0x3f10a5=null;else{const _0x5aa19e=_0xcf8ff8[_0x486c1d(0x2c0)](_0x5bde09,_0x58db0b);_0x5aa19e==null?(_0x512197=_0x486c1d(0x294),_0x3f10a5=null):(_0x512197='put',_0x3f10a5=_0x5aa19e);}this['emit'](_0x486c1d(0x28b),{'env':_0x54f655,'type':_0x5bde09,'key':_0x58db0b,'op':_0x512197,'clock':_0x1f6b58,'origin':_0x33c007,'value':_0x3f10a5});}if(_0x5e0d8e[_0x486c1d(0x24a)])_0x5e0d8e[_0x486c1d(0x281)](_0x486c1d(0x323)+_0x54f655+':'+_0x5bde09,_0x5e0d8e[_0x486c1d(0x3be)]()-_0x184c55,'n='+_0x15d161['length']);return this[_0x486c1d(0x3e9)][_0x486c1d(0x226)](_0x343b33,Math['max'](_0x1d72ca,_0x16b233)),_0xcf8ff8[_0x486c1d(0x3af)](_0x5bde09)>_0x16b233;}[_0x4ff0a9(0x3f5)](){const _0x1b1986=_0x4ff0a9;return{'started':this[_0x1b1986(0x3b7)],'quantum':this['_quantum'],'flushDebounce':this[_0x1b1986(0x31e)],'cursors':Object[_0x1b1986(0x212)]([...this['_cursors'][_0x1b1986(0x1ee)]()]['map'](([_0x49ba02,_0x113b0a])=>[_0x49ba02[_0x1b1986(0x2d3)]('\x00',':'),_0x113b0a])),'pending':this['_pending'][_0x1b1986(0x362)],'seen':this[_0x1b1986(0x3dc)][_0x1b1986(0x362)]};}}return _0x283130[_0x4ff0a9(0x2b5)]=_0x3833bb,okdbChangefeed={'OKDBChangefeed':_0x283130},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x2cefbb=_0x5c5b6f;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x28bdaf=require$$1$1,_0x572415=require$$1,{EVENTS:_0x1fe1a8}=requireOkdbEnums(),_0x626eba=require$$0$3,{slotKey:_0x3f4c8d}=requireOkdbProcessRegistry(),_0x4ba9ca=0xfa,_0x444e52=0xfa0,_0x299f1a=0x5,_0x37d27e=0x2710,_0x8a3736=0xbb8,_0x3fd903=0x7d0,_0x5db11d=_0x2cefbb(0x24f),_0x18dc90=_0x2cefbb(0x2cf),_0x31c9cc=_0x2cefbb(0x314),_0x5a84b9='stats',_0x1a30b1=[_0x1fe1a8[_0x2cefbb(0x233)],_0x1fe1a8[_0x2cefbb(0x3fa)],_0x1fe1a8[_0x2cefbb(0x2ba)],_0x1fe1a8['FTS_RESET'],_0x1fe1a8[_0x2cefbb(0x3f7)],_0x1fe1a8[_0x2cefbb(0x30d)],_0x1fe1a8[_0x2cefbb(0x231)],_0x1fe1a8[_0x2cefbb(0x26d)],'processor:ready','processor:progress',_0x2cefbb(0x320),_0x2cefbb(0x2ce),'processor:resumed',_0x2cefbb(0x2e8)],_0x37189b=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x50c17a({workers:_0x4eaf34,makeOkdb:_0x13827d,port:_0x2325a3,primaryOkdb:_0x1d9017,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x3741c0=_0x2cefbb;if(_0x28bdaf[_0x3741c0(0x20c)])return childEntry&&_0x28bdaf['setupPrimary']({'exec':_0x572415[_0x3741c0(0x3cb)](__dirname,_0x3741c0(0x23a)),'args':[],'execArgv':((()=>{const _0x1f4618=_0x3741c0,_0x552493=[];for(let _0x1d8948=0x0;_0x1d8948<process[_0x1f4618(0x251)]['length'];_0x1d8948++){const _0xb12bea=process[_0x1f4618(0x251)][_0x1d8948];if(_0xb12bea[_0x1f4618(0x358)](_0x1f4618(0x3d8))||_0xb12bea[_0x1f4618(0x358)](_0x1f4618(0x214))||_0xb12bea['startsWith'](_0x1f4618(0x288)))continue;if(_0xb12bea==='-e'||_0xb12bea==='--eval'||_0xb12bea==='-p'||_0xb12bea===_0x1f4618(0x2fe)){_0x1d8948++;continue;}_0x552493[_0x1f4618(0x290)](_0xb12bea);}return _0x552493;})())}),_0x1223d3({'workers':_0x4eaf34,'port':_0x2325a3,'primaryOkdb':_0x1d9017,'workerEnv':workerEnv});return _0x1e3dc8({'makeOkdb':_0x13827d,'port':_0x2325a3});}function _0x1223d3({workers:_0x3d3760,port:_0x176316,primaryOkdb:_0x213c14,workerEnv:_0x1f529d}){const _0x562e68=_0x2cefbb,_0x19170f=new Map(),_0x30510b=new Map();let _0x553202=![];const _0x58b636=_0x23bfd8=>_0x23bfd8?.[_0x562e68(0x275)],_0x46f70d=_0x5318e0=>{const _0x531a46=_0x562e68,_0x262e03=_0x28bdaf[_0x531a46(0x2d2)]({...process.env,..._0x1f529d||{},'OKDB_CLUSTER_SLOT':String(_0x5318e0)});return _0x262e03[_0x531a46(0x275)]=_0x5318e0,_0x19170f[_0x531a46(0x226)](_0x262e03['process'][_0x531a46(0x215)],{'worker':_0x262e03,'startedAt':Date[_0x531a46(0x3be)](),'slot':_0x5318e0}),_0x262e03['on'](_0x531a46(0x1d7),_0x4f4b8c=>{const _0x2e273a=_0x531a46;console['log'](_0x2e273a(0x38c)+_0x262e03[_0x2e273a(0x351)]['pid']+_0x2e273a(0x1c8)+(_0x4f4b8c?.[_0x2e273a(0x24b)]??_0x4f4b8c));}),_0x262e03['on'](_0x531a46(0x3db),()=>_0x129c1e()),_0x262e03;},_0x5234be=_0x459edb=>{const _0x4210db=_0x562e68;for(const {worker:_0x17cd9e}of _0x19170f[_0x4210db(0x1e9)]()){if(_0x17cd9e[_0x4210db(0x3d6)]()||!_0x17cd9e[_0x4210db(0x20a)]())continue;try{_0x17cd9e['send'](_0x459edb);}catch{}}};_0x213c14?.[_0x562e68(0x2f3)]?.({'kind':_0x562e68(0x2eb),'listenAddr':':'+_0x176316})[_0x562e68(0x3e2)](()=>{}),_0x213c14?.[_0x562e68(0x356)]?.[_0x562e68(0x3f6)]?.({'workersConfigured':_0x3d3760});const _0x5f4d49={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x129c1e=()=>{const _0x1041ae=_0x562e68,_0x56ca55=_0x213c14?.[_0x1041ae(0x356)];if(!_0x56ca55||!_0x56ca55[_0x1041ae(0x261)])return;const _0x504b39=_0x56ca55[_0x1041ae(0x1ce)];for(const {worker:_0x4f91c6,startedAt:_0x2c1139,slot:_0x599115,stats:_0x27716a,processing:_0x549663}of _0x19170f[_0x1041ae(0x1e9)]()){if(_0x4f91c6['isDead']())continue;const _0xa55e40=_0x56ca55[_0x1041ae(0x347)]?.()&&_0x56ca55[_0x1041ae(0x27b)](_0x1041ae(0x370),_0x285194(_0x599115))?.[_0x1041ae(0x3df)]===!![];_0x56ca55[_0x1041ae(0x30a)]({'pid':_0x4f91c6['process']['pid'],'startedAt':_0x2c1139,'kind':'http-server','supervisorKey':_0x504b39,'slot':_0x599115,'slotKey':_0x285194(_0x599115),'role':_0x5f4d49,'listenAddr':':'+_0x176316,'lifecycle':_0xa55e40?_0x1041ae(0x246):'running','processing':_0x549663??null,'stats':_0x27716a??null})[_0x1041ae(0x3e2)](()=>{});}},_0x285194=_0x4e4a11=>_0x3f4c8d(_0x562e68(0x2c2)+_0x176316,_0x4e4a11),_0x29ef5c=_0x518ca1=>{const _0x1e460b=_0x562e68,_0x581cf2=_0x213c14?.[_0x1e460b(0x356)];if(!_0x581cf2?.[_0x1e460b(0x347)]?.())return![];return _0x581cf2[_0x1e460b(0x27b)](_0x1e460b(0x370),_0x285194(_0x518ca1))?.[_0x1e460b(0x3df)]===!![];};for(let _0x8d1d5f=0x0;_0x8d1d5f<_0x3d3760;_0x8d1d5f++){const _0x1dc325=_0x29ef5c(_0x8d1d5f);_0x30510b['set'](_0x8d1d5f,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x1dc325,'respawnTimer':null}),_0x1dc325?console[_0x562e68(0x314)](_0x562e68(0x317)+_0x8d1d5f+'\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)'):_0x46f70d(_0x8d1d5f);}const _0x4a7077=()=>{const _0x1185fb=_0x562e68,_0x440d41=_0x213c14?.['processes'];if(!_0x440d41?.[_0x1185fb(0x261)]||!_0x440d41['hasDesired']?.())return;for(const [_0x4c3aa5,_0x485242]of _0x30510b['entries']()){const _0x5b2da4=_0x440d41['getDesired']('slot',_0x285194(_0x4c3aa5)),_0x438f87=_0x5b2da4?.[_0x1185fb(0x3df)]===!![],_0x54beb1=_0x5b2da4?.[_0x1185fb(0x2e7)]===!![];if(_0x438f87&&!_0x485242[_0x1185fb(0x31a)]){_0x485242[_0x1185fb(0x31a)]=!![];_0x485242[_0x1185fb(0x23b)]&&(clearTimeout(_0x485242['respawnTimer']),_0x485242['respawnTimer']=null);for(const {worker:_0x196779}of _0x19170f['values']()){if(_0x58b636(_0x196779)!==_0x4c3aa5||_0x196779['isDead']())continue;try{if(_0x54beb1)_0x196779[_0x1185fb(0x351)][_0x1185fb(0x2e7)]('SIGKILL');else _0x196779[_0x1185fb(0x20a)]()&&_0x196779[_0x1185fb(0x2b4)]();}catch{}}console[_0x1185fb(0x314)](_0x1185fb(0x1fe)+(_0x54beb1?_0x1185fb(0x35e):_0x1185fb(0x3a2))+_0x1185fb(0x308)+_0x4c3aa5+_0x1185fb(0x26f));}else{if(!_0x438f87&&_0x485242[_0x1185fb(0x31a)]&&_0x5b2da4){_0x485242[_0x1185fb(0x31a)]=![],_0x485242[_0x1185fb(0x1cd)]=[],_0x485242[_0x1185fb(0x286)]=0x0;const _0x4bf986=[..._0x19170f[_0x1185fb(0x1e9)]()][_0x1185fb(0x319)](({worker:_0x58d731})=>_0x58b636(_0x58d731)===_0x4c3aa5&&!_0x58d731[_0x1185fb(0x3d6)]());!_0x4bf986&&!_0x553202&&(_0x46f70d(_0x4c3aa5),console[_0x1185fb(0x314)](_0x1185fb(0x28a)+_0x4c3aa5));}}}},_0x487962=()=>{try{_0x4a7077();}catch{}};_0x213c14?.[_0x562e68(0x326)]?.['on']?.(_0x1fe1a8[_0x562e68(0x2d6)],_0x487962);const _0x396c25=[];if(_0x213c14?.['events']?.['on'])for(const _0x131bba of _0x1a30b1){const _0x9f302=_0x3738ae=>{_0x5234be({[_0x5db11d]:_0x18dc90,'event':_0x131bba,'data':_0x3738ae??{}});};_0x213c14[_0x562e68(0x326)]['on'](_0x131bba,_0x9f302),_0x396c25[_0x562e68(0x290)]({'event':_0x131bba,'handler':_0x9f302});}const _0x11e87f=setInterval(()=>{_0x4a7077(),_0x129c1e();},_0x37189b);_0x11e87f[_0x562e68(0x278)]?.();const _0x1e979e=(_0x176cc6,_0x23e6d8)=>{const _0x4d229b=_0x562e68;if(!_0x23e6d8||typeof _0x23e6d8!==_0x4d229b(0x398)||_0x23e6d8[_0x5db11d]!==_0x31c9cc)return;if(!_0x213c14?.['log']?.[_0x4d229b(0x2ac)])return;const _0x53d450=_0x23e6d8[_0x4d229b(0x3ad)]||{};_0x213c14[_0x4d229b(0x314)][_0x4d229b(0x2ac)]({..._0x53d450,'msg':'[w'+_0x23e6d8[_0x4d229b(0x370)]+']\x20'+(_0x53d450['msg']??''),'meta':{..._0x53d450[_0x4d229b(0x334)]||{},'worker':_0x23e6d8[_0x4d229b(0x370)],'workerPid':_0x23e6d8[_0x4d229b(0x215)]}});};_0x28bdaf['on'](_0x562e68(0x24b),_0x1e979e);const _0x31fb49=(_0x3a1602,_0x419da4)=>{const _0x113d8c=_0x562e68;if(!_0x419da4||typeof _0x419da4!==_0x113d8c(0x398)||_0x419da4[_0x5db11d]!==_0x5a84b9)return;const _0x2ae59f=_0x19170f['get'](_0x3a1602[_0x113d8c(0x351)][_0x113d8c(0x215)]);if(_0x2ae59f){_0x2ae59f['stats']={..._0x419da4[_0x113d8c(0x1f8)],'at':Date[_0x113d8c(0x3be)]()};if(_0x419da4[_0x113d8c(0x32b)]!==undefined)_0x2ae59f[_0x113d8c(0x32b)]=_0x419da4[_0x113d8c(0x32b)];}};_0x28bdaf['on'](_0x562e68(0x24b),_0x31fb49),_0x28bdaf['on']('exit',(_0x171912,_0x4de576,_0x6ed8c0)=>{const _0x1f150f=_0x562e68,_0x36375c=_0x171912['process']['pid'],_0x3fc322=_0x58b636(_0x171912),_0x59706f=_0x19170f[_0x1f150f(0x2c0)](_0x36375c);if(_0x59706f&&_0x213c14?.[_0x1f150f(0x356)])_0x213c14['processes'][_0x1f150f(0x3b2)](_0x36375c+':'+_0x59706f[_0x1f150f(0x3d2)])[_0x1f150f(0x3e2)](()=>{});_0x19170f[_0x1f150f(0x3f1)](_0x36375c),console[_0x1f150f(0x314)](_0x1f150f(0x38c)+_0x36375c+_0x1f150f(0x20e)+(_0x3fc322??'?')+')\x20exited\x20'+(_0x1f150f(0x282)+_0x4de576+',\x20signal='+(_0x6ed8c0??_0x1f150f(0x2a5))+_0x1f150f(0x22b)+_0x19170f[_0x1f150f(0x362)]+_0x1f150f(0x37d))),_0x129c1e();if(_0x553202||_0x3fc322==null)return;const _0x1f72c9=_0x30510b[_0x1f150f(0x2c0)](_0x3fc322);if(!_0x1f72c9||_0x1f72c9[_0x1f150f(0x31a)])return;const _0x1d6eba=Date['now']();_0x1f72c9['deaths'][_0x1f150f(0x290)](_0x1d6eba),_0x1f72c9[_0x1f150f(0x1cd)]=_0x1f72c9['deaths'][_0x1f150f(0x20d)](_0x51c8e7=>_0x1d6eba-_0x51c8e7<=_0x37d27e);if(_0x1f72c9[_0x1f150f(0x1cd)][_0x1f150f(0x363)]>=_0x299f1a){_0x1f72c9[_0x1f150f(0x31a)]=!![],console[_0x1f150f(0x1d7)](_0x1f150f(0x27f)+_0x3fc322+_0x1f150f(0x321)+_0x1f72c9[_0x1f150f(0x1cd)][_0x1f150f(0x363)]+'\x20times\x20in\x20'+(_0x37d27e+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x19170f[_0x1f150f(0x362)]+'\x20worker(s)\x20still\x20serving'));return;}_0x1f72c9[_0x1f150f(0x286)]++;const _0x4ca95c=Math[_0x1f150f(0x2ca)](_0x444e52,_0x4ba9ca*0x2**(_0x1f72c9[_0x1f150f(0x286)]-0x1));console[_0x1f150f(0x314)](_0x1f150f(0x3fb)+_0x3fc322+_0x1f150f(0x382)+_0x4ca95c+'ms\x20(attempt\x20'+_0x1f72c9[_0x1f150f(0x286)]+')'),_0x1f72c9[_0x1f150f(0x23b)]=setTimeout(()=>{const _0x466f31=_0x1f150f;_0x1f72c9[_0x466f31(0x23b)]=null;if(_0x553202||_0x1f72c9['dead'])return;const _0x2f1146=_0x46f70d(_0x3fc322);_0x2f1146[_0x466f31(0x2d4)](_0x466f31(0x208),()=>{const _0x1af6f6=_0x466f31;if(_0x30510b[_0x1af6f6(0x2c0)](_0x3fc322)===_0x1f72c9)_0x1f72c9[_0x1af6f6(0x286)]=0x0;});},_0x4ca95c),_0x1f72c9[_0x1f150f(0x23b)]['unref']?.();});const _0x294c04=[..._0x19170f[_0x562e68(0x3b9)]()];console[_0x562e68(0x314)](_0x562e68(0x1e3)+process[_0x562e68(0x215)]+_0x562e68(0x3d3)+_0x3d3760+_0x562e68(0x3cf)+_0x176316+':\x20'+('['+_0x294c04[_0x562e68(0x3cb)](',\x20')+']'));const _0x3ade06={'_isClusterController':!![],'port':_0x176316,'primaryOkdb':_0x213c14??null,'status'(){const _0x4f3dce=_0x562e68;return{'clustered':!![],'primaryPid':process[_0x4f3dce(0x215)],'port':_0x176316,'primaryRole':_0x213c14?.['role']??null,'processorPid':null,'supervisorPid':process[_0x4f3dce(0x215)],'workers':[..._0x19170f['values']()][_0x4f3dce(0x241)](({worker:_0x522849})=>({'pid':_0x522849[_0x4f3dce(0x351)][_0x4f3dce(0x215)],'id':_0x522849['id'],'dead':_0x522849[_0x4f3dce(0x3d6)]()}))};},async 'close'(){const _0x430130=_0x562e68;_0x553202=!![];for(const _0x28924a of _0x30510b[_0x430130(0x1e9)]()){_0x28924a[_0x430130(0x31a)]=!![],_0x28924a[_0x430130(0x23b)]&&(clearTimeout(_0x28924a[_0x430130(0x23b)]),_0x28924a[_0x430130(0x23b)]=null);}clearInterval(_0x11e87f),_0x28bdaf[_0x430130(0x3a7)]('message',_0x1e979e),_0x28bdaf[_0x430130(0x3a7)](_0x430130(0x24b),_0x31fb49),_0x213c14?.[_0x430130(0x326)]?.[_0x430130(0x3a7)]?.(_0x1fe1a8[_0x430130(0x2d6)],_0x487962);if(_0x213c14?.[_0x430130(0x326)]?.[_0x430130(0x3a7)])for(const {event:_0x1ecf0c,handler:_0x33b00d}of _0x396c25){try{_0x213c14[_0x430130(0x326)][_0x430130(0x3a7)](_0x1ecf0c,_0x33b00d);}catch{}}_0x396c25[_0x430130(0x363)]=0x0;const _0x9c5ae8=[..._0x19170f[_0x430130(0x1e9)]()][_0x430130(0x241)](({worker:_0x19045f})=>_0x19045f);if(_0x9c5ae8[_0x430130(0x363)]===0x0)return;await Promise['all'](_0x9c5ae8[_0x430130(0x241)](_0x192202=>new Promise(_0x3a802=>{const _0x1cd411=_0x430130;if(_0x192202[_0x1cd411(0x3d6)]()){_0x3a802();return;}let _0x4405c3=![];const _0x1e4a75=()=>{if(_0x4405c3)return;_0x4405c3=!![];if(_0x5c3b6c)clearTimeout(_0x5c3b6c);_0x3a802();};_0x192202[_0x1cd411(0x2d4)](_0x1cd411(0x3bf),_0x1e4a75);const _0x5c3b6c=setTimeout(()=>{const _0x60e208=_0x1cd411;try{_0x192202['process'][_0x60e208(0x2e7)]();}catch{}},_0x8a3736+0x1f4);_0x5c3b6c[_0x1cd411(0x278)]?.();try{_0x192202[_0x1cd411(0x2b4)]();}catch{try{_0x192202['process'][_0x1cd411(0x2e7)]();}catch{}}})));}};return _0x3ade06;}async function _0x1e3dc8({makeOkdb:_0xc06234,port:_0x53c716}){const _0x2af02b=_0x2cefbb,_0x4d55b6=await _0xc06234();return _0x11e4c3(_0x4d55b6),_0x4d55b6[_0x2af02b(0x22d)][_0x2af02b(0x1ed)](_0x53c716);}function _0x11e4c3(_0x1d542d){const _0x1acd5c=_0x2cefbb;if(!_0x1d542d||_0x1d542d[_0x1acd5c(0x25c)])return;_0x1d542d[_0x1acd5c(0x25c)]=!![];try{const {OKDBChangefeed:_0x417138}=requireOkdbChangefeed(),_0x64794e=_0x1d542d[_0x1acd5c(0x1e7)];if(_0x64794e&&typeof _0x64794e[_0x1acd5c(0x1cb)]===_0x1acd5c(0x1dd)){const _0x75f905=new _0x417138(_0x1d542d);_0x75f905['start'](),_0x64794e[_0x1acd5c(0x1cb)](_0x75f905),_0x1d542d[_0x1acd5c(0x3c4)]=_0x75f905;}}catch(_0x55398e){_0x1d542d[_0x1acd5c(0x314)]?.[_0x1acd5c(0x31b)]?.(_0x1acd5c(0x1d3)+(_0x55398e?.[_0x1acd5c(0x24b)]??_0x55398e),{'feature':_0x1acd5c(0x2df)});}const _0xdf8e5f=_0x2299bd=>{const _0xf69217=_0x1acd5c;if(!_0x2299bd||typeof _0x2299bd!==_0xf69217(0x398)||_0x2299bd[_0x5db11d]==null)return;if(_0x2299bd[_0x5db11d]===_0x18dc90)try{_0x1d542d[_0xf69217(0x1e7)]?.['pushEphemeral']?.(_0x2299bd[_0xf69217(0x34f)],_0x2299bd['data']);}catch{}};process['on']('message',_0xdf8e5f),_0x1d542d[_0x1acd5c(0x36b)]=_0xdf8e5f;{let _0x13c6ea=process['cpuUsage'](),_0x1c0d8b=Date[_0x1acd5c(0x3be)]();const _0x5b88d1=()=>{const _0x1c29cd=_0x1acd5c;if(typeof process['send']!==_0x1c29cd(0x1dd)||!process[_0x1c29cd(0x2a2)])return;const _0x1a24e7=Date['now'](),_0x581ed2=process[_0x1c29cd(0x315)](),_0x28c7ef=(_0x1a24e7-_0x1c0d8b)*0x3e8,_0x11da76=_0x581ed2[_0x1c29cd(0x272)]-_0x13c6ea[_0x1c29cd(0x272)]+(_0x581ed2[_0x1c29cd(0x1db)]-_0x13c6ea[_0x1c29cd(0x1db)]),_0x3a4365=_0x28c7ef>0x0?Math[_0x1c29cd(0x2ca)](0x64,Math[_0x1c29cd(0x1fc)](_0x11da76/(_0x28c7ef*(_0x626eba[_0x1c29cd(0x267)]()[_0x1c29cd(0x363)]||0x1))*0x64)):0x0;_0x13c6ea=_0x581ed2,_0x1c0d8b=_0x1a24e7;const _0x548dcc=process[_0x1c29cd(0x239)]();let _0x142ddc=null;try{_0x142ddc=_0x1d542d[_0x1c29cd(0x3ea)]?.['processors']?_0x1d542d['processes']?.[_0x1c29cd(0x3bb)]?.()??null:null;}catch{}try{process[_0x1c29cd(0x395)]({[_0x5db11d]:_0x5a84b9,'stats':{'rss':_0x548dcc['rss'],'heapUsed':_0x548dcc['heapUsed'],'heapTotal':_0x548dcc[_0x1c29cd(0x3e6)],'external':_0x548dcc[_0x1c29cd(0x338)],'cpuPct':_0x3a4365,'cpuWindowMs':Math[_0x1c29cd(0x1fc)](_0x28c7ef/0x3e8)||null},'processing':_0x142ddc});}catch{}},_0x403c1d=Math['max'](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0xf5d0a3=setInterval(_0x5b88d1,_0x403c1d);_0xf5d0a3[_0x1acd5c(0x278)]?.(),_0x5b88d1();for(const _0x228fde of[_0x1acd5c(0x2ce),'processor:resumed']){_0x1d542d[_0x1acd5c(0x326)]?.['on']?.(_0x228fde,()=>{try{_0x5b88d1();}catch{}});}}let _0x11800c=![];const _0x220d26=async _0x484141=>{const _0x40d20d=_0x1acd5c;if(_0x11800c)return;_0x11800c=!![];const _0x3ee238=setTimeout(()=>process[_0x40d20d(0x3bf)](_0x484141),_0x8a3736);_0x3ee238[_0x40d20d(0x278)]?.();try{await _0x1d542d[_0x40d20d(0x1d5)]?.();}catch{}process[_0x40d20d(0x3bf)](_0x484141);};process['on'](_0x1acd5c(0x2b4),()=>_0x220d26(0x0));if(process[_0x1acd5c(0x21d)]!==_0x1acd5c(0x23e)){const _0x113eea=setInterval(()=>{if(process['ppid']===0x1)_0x220d26(0x0);},_0x3fd903);_0x113eea[_0x1acd5c(0x278)]?.(),_0x1d542d[_0x1acd5c(0x1ef)]=_0x113eea;}}return okdbCluster={'runClustered':_0x50c17a,'attachWorkerCluster':_0x11e4c3},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0x275b71=_0x5c5b6f;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x48998c=require$$0$5,{attachWorkerCluster:_0xc51b74}=requireOkdbCluster();async function _0x3f2608(){const _0x1012fb=_0x490e,_0x562d3a=process.env.OKDB_HTTP_CHILD;if(!_0x562d3a)throw new Error('okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing');const {rootPath:_0x4d662b,port:_0x4baaf4,options:options={},logLevel:logLevel='info'}=JSON[_0x1012fb(0x258)](_0x562d3a);if(!_0x4d662b||!_0x4baaf4)throw new Error('okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required');const _0x1cf393=new _0x48998c(_0x4d662b,{...options,'engines':![],'processors':![],'compaction':![]});_0x1cf393[_0x1012fb(0x314)][_0x1012fb(0x3f9)]?.();const _0x7f0c3e=process.env.OKDB_CLUSTER_SLOT??'?',_0x5d37ad={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x173cac=_0x5d37ad[logLevel]??_0x5d37ad[_0x1012fb(0x35b)];_0x1cf393['log'][_0x1012fb(0x32a)](_0x5cab29=>{const _0x527ce5=_0x1012fb;if((_0x5d37ad[_0x5cab29[_0x527ce5(0x201)]]??0x1)<_0x173cac)return;try{process[_0x527ce5(0x395)]?.({'__okdbCluster':_0x527ce5(0x314),'slot':_0x7f0c3e,'pid':process[_0x527ce5(0x215)],'entry':_0x5cab29});}catch{}}),await _0x1cf393[_0x1012fb(0x325)](),_0xc51b74(_0x1cf393),await _0x1cf393[_0x1012fb(0x22d)][_0x1012fb(0x1ed)](_0x4baaf4);}return _0x3f2608()[_0x275b71(0x3e2)](_0x55b96e=>{const _0x19a305=_0x275b71;try{process[_0x19a305(0x395)]?.({'__okdbCluster':'log','slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x19a305(0x215)],'entry':{'level':_0x19a305(0x1d7),'msg':'http\x20worker\x20child\x20failed:\x20'+(_0x55b96e?.[_0x19a305(0x24b)]??_0x55b96e)}});}catch{}process['exit'](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module['exports']=okdbHttpWorkerChild;
@@ -1 +1 @@
1
- 'use strict';const _0xc249a0=_0x46a5;(function(_0x20a04a,_0x4d55be){const _0x56f397=_0x46a5,_0x32eed1=_0x20a04a();while(!![]){try{const _0x5ac2f6=parseInt(_0x56f397(0x140))/0x1+parseInt(_0x56f397(0x15a))/0x2*(parseInt(_0x56f397(0x150))/0x3)+parseInt(_0x56f397(0x156))/0x4*(-parseInt(_0x56f397(0x168))/0x5)+-parseInt(_0x56f397(0x16b))/0x6+parseInt(_0x56f397(0x130))/0x7+-parseInt(_0x56f397(0x14b))/0x8*(-parseInt(_0x56f397(0x12b))/0x9)+-parseInt(_0x56f397(0x136))/0xa;if(_0x5ac2f6===_0x4d55be)break;else _0x32eed1['push'](_0x32eed1['shift']());}catch(_0x5fcf91){_0x32eed1['push'](_0x32eed1['shift']());}}}(_0x3c9d,0x6864a));var require$$0=require(_0xc249a0(0x131)),require$$1=require(_0xc249a0(0x13c));function getDefaultExportFromCjs(_0x38b93d){const _0xed41ab=_0xc249a0;return _0x38b93d&&_0x38b93d[_0xed41ab(0x127)]&&Object['prototype'][_0xed41ab(0x13b)][_0xed41ab(0x15e)](_0x38b93d,_0xed41ab(0x133))?_0x38b93d[_0xed41ab(0x133)]:_0x38b93d;}function _0x46a5(_0x3f0b22,_0x138fa1){_0x3f0b22=_0x3f0b22-0x11b;const _0x3c9d5a=_0x3c9d();let _0x46a52a=_0x3c9d5a[_0x3f0b22];return _0x46a52a;}var okdbViewsBootstrapWorker$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x491feb=_0xc249a0;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x308de4={'PUT':_0x491feb(0x15f),'REMOVE':_0x491feb(0x125),'INDEX_DROP':_0x491feb(0x13a),'INDEX_REGISTER':_0x491feb(0x152),'INDEX_RESET':_0x491feb(0x147),'TYPE_REGISTER':_0x491feb(0x155),'TYPE_DROP':_0x491feb(0x122),'FTS_REGISTER':'registerFts','FTS_DROP':'dropFts','FTS_RESET':_0x491feb(0x132),'SCHEMA_SET':_0x491feb(0x11c),'SCHEMA_DROP':_0x491feb(0x12c),'TTL_SET':_0x491feb(0x135),'TTL_CLEAR':_0x491feb(0x123)},_0x3eec1a={'SYSTEM_READY':_0x491feb(0x11b),'SYSTEM_STOPPED':_0x491feb(0x146),'SYSTEM_CLOCK_CHANGE':_0x491feb(0x145),'SYSTEM_POKE':_0x491feb(0x15b),'SYSTEM_DRAIN':_0x491feb(0x141),'SYSTEM_TYPE_DROP':_0x491feb(0x13f),'SYSTEM_PROC':_0x491feb(0x148),'SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':'item:create','ITEM_UPDATE':_0x491feb(0x128),'ITEM_REMOVE':_0x491feb(0x160),'INDEX_RESET':_0x491feb(0x14f),'INDEX_READY':_0x491feb(0x161),'INDEX_PROGRESS':_0x491feb(0x121),'VIEW_PROGRESS':_0x491feb(0x11d),'INDEX_DROP':'index:drop','INDEX_REGISTERED':'index:registered','FTS_REGISTERED':'fts:registered','FTS_DROP':_0x491feb(0x15d),'FTS_RESET':'fts:reset','SCHEMA_SET':_0x491feb(0x158),'SCHEMA_DROP':_0x491feb(0x139),'UNIQUE_VIOLATION':_0x491feb(0x12f),'UNIQUE_VIOLATION_RESOLVED':_0x491feb(0x143),'REF_VIOLATION':_0x491feb(0x16c),'REF_VIOLATION_RESOLVED':_0x491feb(0x149),'SYNC_APPLY':_0x491feb(0x164),'TXN_START':'txn:start','TXN_END':_0x491feb(0x15c),'TXN_ROLLBACK':_0x491feb(0x11e),'TYPE_REGISTERED':_0x491feb(0x13e),'TYPE_DROP':_0x491feb(0x14d),'ENV_OPENED':_0x491feb(0x138),'ENV_REMOVED':_0x491feb(0x167),'TTL_EXPIRED':'ttl:expired','TTL_SET':'ttl:set','TTL_CLEAR':_0x491feb(0x134),'LICENSE_INVALID':_0x491feb(0x169),'LICENSE_ADDED':_0x491feb(0x120),'LICENSE_ACTIVATED':_0x491feb(0x166),'LICENSE_REMOVED':_0x491feb(0x162)},_0x1a780a={'CREATING':_0x491feb(0x13d),'RESETTING':_0x491feb(0x159),'READY':'ready','DROPPING':'dropping','WAITING':'waiting'},_0x4cf705={'CREATED':_0x491feb(0x142),'STARTING':_0x491feb(0x12d),'STARTED':_0x491feb(0x163),'STOPPING':_0x491feb(0x144),'STOPPED':_0x491feb(0x16a)},_0x11b14a={'CREATING':_0x491feb(0x13d),'READY':'ready','HALTED':_0x491feb(0x137),'STOPPED':_0x491feb(0x16a),'RESETTING':'resetting'},_0x21c933=Object[_0x491feb(0x12e)]({'POKE':_0x491feb(0x14e),'DRAIN':_0x491feb(0x11f),'TYPE_DROP':'bus:type_drop','PROC':_0x491feb(0x126)});return okdbEnums={'BUS_EVENTS':_0x21c933,'CHANGE_ACTIONS':_0x308de4,'EVENTS':_0x3eec1a,'INDEX_STATE':_0x1a780a,'OKDB_STATE':_0x4cf705,'VIEW_STATE':_0x11b14a},okdbEnums;}var hasRequiredOkdbViewsBootstrapWorker;function requireOkdbViewsBootstrapWorker(){const _0x2cfb6e=_0xc249a0;if(hasRequiredOkdbViewsBootstrapWorker)return okdbViewsBootstrapWorker$1;hasRequiredOkdbViewsBootstrapWorker=0x1;const {parentPort:_0x4f5b0d,workerData:_0x5d6dd4}=require$$0,_0x283a47=require$$1,{EVENTS:_0x5aef2b}=requireOkdbEnums();async function _0x3ac427(){const _0x590d0c=_0x46a5,{rootPath:_0x947af6,envName:_0x34b57c,viewName:_0x3525e4,definition:_0x134598}=_0x5d6dd4,_0x8e27bb=new _0x283a47(_0x947af6,{'admin':![],'mcp':![],'http':![],'timeMachine':![],'engines':![],'asyncProcessors':![],'compaction':_0x590d0c(0x165),'_skipBootRuntime':!![]});await _0x8e27bb['open']();const _0x2d4326=_0x8e27bb[_0x590d0c(0x124)](_0x34b57c);_0x2d4326[_0x590d0c(0x157)]['on'](_0x5aef2b['VIEW_PROGRESS'],_0x16f747=>{if(_0x16f747?.['name']!==_0x3525e4)return;try{_0x4f5b0d['postMessage']({'type':'progress','event':_0x16f747});}catch{}}),_0x2d4326[_0x590d0c(0x14c)]['_activateViewStorage'](_0x3525e4,_0x134598),await _0x2d4326[_0x590d0c(0x14c)]['_runBootstrapScanPhases'](_0x3525e4,_0x134598),_0x4f5b0d[_0x590d0c(0x153)]({'type':'done'}),await _0x8e27bb['close'](),process[_0x590d0c(0x129)](0x0);}return _0x3ac427()[_0x2cfb6e(0x154)](_0x1f4623=>{const _0x49aa30=_0x2cfb6e;try{_0x4f5b0d[_0x49aa30(0x153)]({'type':_0x49aa30(0x151),'error':_0x1f4623['message']??String(_0x1f4623),'stack':_0x1f4623[_0x49aa30(0x12a)]});}catch{}process[_0x49aa30(0x129)](0x1);}),okdbViewsBootstrapWorker$1;}function _0x3c9d(){const _0x2040ec=['remove','bus:proc','__esModule','item:update','exit','stack','126QptZLx','dropSchema','starting','freeze','unique:violation','2779693pxJqqw','worker_threads','resetFts','default','ttl:clear','setTtl','9673670ooVvqn','halted','env:opened','schema:drop','dropIndex','hasOwnProperty','./okdb','creating','type:registered','system:type_drop','724749FcJUaQ','system:drain','created','unique:violation_resolved','stopping','system:clock_change','system:stopped','resetIndex','system:proc','ref:violation_resolved','exports','440808ZLHKYt','views','type:drop','bus:poke','index:reset','159711DBVIBD','error','registerIndex','postMessage','catch','registerType','1492uwpXAP','events','schema:set','resetting','22HVozXm','system:poke','txn:end','fts:drop','call','put','item:remove','index:ready','license:removed','started','sync:apply','passive','license:activated','env:removed','5585AZZqFu','license:invalid','stopped','4003602PsCctL','ref:violation','system:ready','setSchema','view:progress','txn:rollback','bus:drain','license:added','index:progress','dropType','clearTtl','env'];_0x3c9d=function(){return _0x2040ec;};return _0x3c9d();}var okdbViewsBootstrapWorkerExports=requireOkdbViewsBootstrapWorker(),okdbViewsBootstrapWorker=getDefaultExportFromCjs(okdbViewsBootstrapWorkerExports);module[_0xc249a0(0x14a)]=okdbViewsBootstrapWorker;
1
+ 'use strict';const _0x9c8308=_0xa09b;(function(_0x3bd56c,_0x2e4921){const _0x1a0630=_0xa09b,_0x4b336d=_0x3bd56c();while(!![]){try{const _0x555f24=-parseInt(_0x1a0630(0x181))/0x1+parseInt(_0x1a0630(0x183))/0x2*(parseInt(_0x1a0630(0x1bc))/0x3)+parseInt(_0x1a0630(0x1b8))/0x4+parseInt(_0x1a0630(0x1c3))/0x5*(-parseInt(_0x1a0630(0x1ab))/0x6)+-parseInt(_0x1a0630(0x1a2))/0x7+parseInt(_0x1a0630(0x189))/0x8*(-parseInt(_0x1a0630(0x1b5))/0x9)+parseInt(_0x1a0630(0x1c8))/0xa;if(_0x555f24===_0x2e4921)break;else _0x4b336d['push'](_0x4b336d['shift']());}catch(_0x4ff3d3){_0x4b336d['push'](_0x4b336d['shift']());}}}(_0x4f11,0x83460));var require$$0=require(_0x9c8308(0x1a5)),require$$1=require('./okdb');function getDefaultExportFromCjs(_0x33151a){const _0x522320=_0x9c8308;return _0x33151a&&_0x33151a[_0x522320(0x18a)]&&Object['prototype'][_0x522320(0x19f)]['call'](_0x33151a,_0x522320(0x1bf))?_0x33151a[_0x522320(0x1bf)]:_0x33151a;}var okdbViewsBootstrapWorker$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x404766=_0x9c8308;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x18df08={'PUT':'put','REMOVE':_0x404766(0x17c),'INDEX_DROP':'dropIndex','INDEX_REGISTER':_0x404766(0x1c9),'INDEX_RESET':'resetIndex','TYPE_REGISTER':_0x404766(0x1c0),'TYPE_DROP':_0x404766(0x1aa),'FTS_REGISTER':_0x404766(0x1b4),'FTS_DROP':_0x404766(0x18c),'FTS_RESET':_0x404766(0x1a1),'SCHEMA_SET':_0x404766(0x196),'SCHEMA_DROP':_0x404766(0x1b0),'TTL_SET':'setTtl','TTL_CLEAR':_0x404766(0x195)},_0x4a7a93={'SYSTEM_READY':_0x404766(0x1c1),'SYSTEM_STOPPED':_0x404766(0x1a3),'SYSTEM_CLOCK_CHANGE':_0x404766(0x17a),'SYSTEM_POKE':_0x404766(0x191),'SYSTEM_DRAIN':'system:drain','SYSTEM_TYPE_DROP':_0x404766(0x1a9),'SYSTEM_PROC':_0x404766(0x1af),'SYSTEM_BUS_STATE_CHANGE':_0x404766(0x1b9),'ITEM_CREATE':_0x404766(0x178),'ITEM_UPDATE':_0x404766(0x1b7),'ITEM_REMOVE':_0x404766(0x194),'INDEX_RESET':_0x404766(0x18b),'INDEX_READY':_0x404766(0x188),'INDEX_PROGRESS':'index:progress','VIEW_PROGRESS':'view:progress','INDEX_DROP':_0x404766(0x192),'INDEX_REGISTERED':_0x404766(0x1b1),'FTS_REGISTERED':_0x404766(0x1c4),'FTS_DROP':_0x404766(0x174),'FTS_RESET':_0x404766(0x18e),'SCHEMA_SET':_0x404766(0x187),'SCHEMA_DROP':_0x404766(0x1c6),'UNIQUE_VIOLATION':_0x404766(0x17b),'UNIQUE_VIOLATION_RESOLVED':_0x404766(0x1c5),'REF_VIOLATION':_0x404766(0x1a6),'REF_VIOLATION_RESOLVED':_0x404766(0x1b3),'SYNC_APPLY':_0x404766(0x1ac),'TXN_START':_0x404766(0x18d),'TXN_END':_0x404766(0x17e),'TXN_ROLLBACK':_0x404766(0x185),'TYPE_REGISTERED':_0x404766(0x17f),'TYPE_DROP':_0x404766(0x1be),'ENV_OPENED':_0x404766(0x1ba),'ENV_REMOVED':_0x404766(0x1ad),'SYSTEM_ENV_RELEASE':_0x404766(0x1ca),'TTL_EXPIRED':_0x404766(0x177),'TTL_SET':_0x404766(0x1a0),'TTL_CLEAR':_0x404766(0x175),'LICENSE_INVALID':'license:invalid','LICENSE_ADDED':'license:added','LICENSE_ACTIVATED':_0x404766(0x199),'LICENSE_REMOVED':_0x404766(0x19d)},_0x162564={'CREATING':_0x404766(0x186),'RESETTING':_0x404766(0x19a),'READY':'ready','DROPPING':_0x404766(0x1a7),'WAITING':_0x404766(0x190)},_0x23b747={'CREATED':_0x404766(0x184),'STARTING':'starting','STARTED':'started','STOPPING':'stopping','STOPPED':_0x404766(0x1b6)},_0x214398={'CREATING':_0x404766(0x186),'READY':'ready','HALTED':'halted','STOPPED':'stopped','RESETTING':'resetting'},_0x528e3a=Object[_0x404766(0x173)]({'POKE':_0x404766(0x17d),'DRAIN':_0x404766(0x1bb),'TYPE_DROP':'bus:type_drop','PROC':'bus:proc','ENV_RELEASE':_0x404766(0x180)});return okdbEnums={'BUS_EVENTS':_0x528e3a,'CHANGE_ACTIONS':_0x18df08,'EVENTS':_0x4a7a93,'INDEX_STATE':_0x162564,'OKDB_STATE':_0x23b747,'VIEW_STATE':_0x214398},okdbEnums;}function _0xa09b(_0xa5062d,_0x2916ed){_0xa5062d=_0xa5062d-0x173;const _0x4f1184=_0x4f11();let _0xa09b93=_0x4f1184[_0xa5062d];return _0xa09b93;}var hasRequiredOkdbViewsBootstrapWorker;function requireOkdbViewsBootstrapWorker(){const _0x2db4f7=_0x9c8308;if(hasRequiredOkdbViewsBootstrapWorker)return okdbViewsBootstrapWorker$1;hasRequiredOkdbViewsBootstrapWorker=0x1;const {parentPort:_0x2ce5c8,workerData:_0x4eacd7}=require$$0,_0x4ab8a9=require$$1,{EVENTS:_0x4b4f27}=requireOkdbEnums();async function _0x19c8d2(){const _0x4efbaa=_0xa09b,{rootPath:_0x6c44ec,envName:_0x520b35,viewName:_0x493eb9,definition:_0x534793}=_0x4eacd7,_0x38a988=new _0x4ab8a9(_0x6c44ec,{'admin':![],'mcp':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],'processes':![]});await _0x38a988[_0x4efbaa(0x1a8)]();const _0x209c73=_0x38a988['env'](_0x520b35);_0x209c73[_0x4efbaa(0x176)]['on'](_0x4b4f27[_0x4efbaa(0x19b)],_0x8fff7d=>{const _0x54da7b=_0x4efbaa;if(_0x8fff7d?.[_0x54da7b(0x19e)]!==_0x493eb9)return;try{_0x2ce5c8[_0x54da7b(0x1c2)]({'type':_0x54da7b(0x1a4),'event':_0x8fff7d});}catch{}}),await _0x209c73['views'][_0x4efbaa(0x193)](_0x534793),await _0x209c73[_0x4efbaa(0x19c)][_0x4efbaa(0x182)](_0x493eb9,_0x534793),await _0x209c73[_0x4efbaa(0x19c)]['_runBootstrapScanPhases'](_0x493eb9,_0x534793),_0x2ce5c8[_0x4efbaa(0x1c2)]({'type':_0x4efbaa(0x197)}),await _0x38a988[_0x4efbaa(0x1bd)](),process[_0x4efbaa(0x18f)](0x0);}return _0x19c8d2()[_0x2db4f7(0x1ae)](_0x54ea2f=>{const _0x4e211e=_0x2db4f7;try{_0x2ce5c8['postMessage']({'type':_0x4e211e(0x198),'error':_0x54ea2f[_0x4e211e(0x179)]??String(_0x54ea2f),'stack':_0x54ea2f[_0x4e211e(0x1b2)]});}catch{}process[_0x4e211e(0x18f)](0x1);}),okdbViewsBootstrapWorker$1;}var okdbViewsBootstrapWorkerExports=requireOkdbViewsBootstrapWorker(),okdbViewsBootstrapWorker=getDefaultExportFromCjs(okdbViewsBootstrapWorkerExports);function _0x4f11(){const _0x469a1d=['4404071kilfhB','system:stopped','progress','worker_threads','ref:violation','dropping','open','system:type_drop','dropType','948oWFvLw','sync:apply','env:removed','catch','system:proc','dropSchema','index:registered','stack','ref:violation_resolved','registerFts','9wJKYwI','stopped','item:update','771992yTBbKu','system:bus_state_change','env:opened','bus:drain','21bQPhGs','close','type:drop','default','registerType','system:ready','postMessage','4305OdVtyZ','fts:registered','unique:violation_resolved','schema:drop','exports','29128180TnDJIU','registerIndex','system:env_release','freeze','fts:drop','ttl:clear','events','ttl:expired','item:create','message','system:clock_change','unique:violation','remove','bus:poke','txn:end','type:registered','bus:env_release','981499hYiVig','_activateViewStorage','30130OVijmS','created','txn:rollback','creating','schema:set','index:ready','7415080eYDbtO','__esModule','index:reset','dropFts','txn:start','fts:reset','exit','waiting','system:poke','index:drop','_prepareViewDict','item:remove','clearTtl','setSchema','done','error','license:activated','resetting','VIEW_PROGRESS','views','license:removed','name','hasOwnProperty','ttl:set','resetFts'];_0x4f11=function(){return _0x469a1d;};return _0x4f11();}module[_0x9c8308(0x1c7)]=okdbViewsBootstrapWorker;