@kedem/okdb 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/algorithm-worker-thread.js +1 -0
- package/bin/okdb.js +1 -1
- package/docs/index.md +1 -0
- package/docs/licensing.md +152 -0
- package/docs/manifest.json +1 -0
- package/okdb-functions-sandbox-worker.js +1 -1
- package/okdb-http-worker-child.js +1 -1
- package/okdb-views-bootstrap-worker.js +1 -1
- package/okdb.js +1 -1
- package/package.json +1 -1
package/bin/okdb.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
'use strict';const _0x42e206=_0x4d7d;(function(_0xfe35c,_0xfc0d86){const _0x43c101=_0x4d7d,_0x507f52=_0xfe35c();while(!![]){try{const _0x5a5395=parseInt(_0x43c101(0x3fa))/0x1*(parseInt(_0x43c101(0x5b0))/0x2)+parseInt(_0x43c101(0x5c3))/0x3+-parseInt(_0x43c101(0x41e))/0x4*(parseInt(_0x43c101(0x6ac))/0x5)+-parseInt(_0x43c101(0x56a))/0x6+parseInt(_0x43c101(0x5a8))/0x7*(-parseInt(_0x43c101(0x20c))/0x8)+-parseInt(_0x43c101(0x34a))/0x9+parseInt(_0x43c101(0x401))/0xa;if(_0x5a5395===_0xfc0d86)break;else _0x507f52['push'](_0x507f52['shift']());}catch(_0x96c1a2){_0x507f52['push'](_0x507f52['shift']());}}}(_0x4c6a,0xe9bfe));var require$$1=require(_0x42e206(0x47b)),require$$1$1=require('fs'),require$$0=require('os'),require$$4$1=require('net'),require$$5=require(_0x42e206(0x292)),require$$0$3=require(_0x42e206(0x542)),require$$0$1=require(_0x42e206(0x68c)),require$$0$2=require(_0x42e206(0x58b)),require$$4=require('child_process'),require$$1$2=require(_0x42e206(0x409)),require$$0$4=require(_0x42e206(0x613)),require$$0$5=require('perf_hooks'),require$$0$6=require(_0x42e206(0x240));function _0x4c6a(){const _0x14e427=['[okdb]\x20port\x20','_key','bus:type_drop','_adminRelay','view:progress','\x1b[31m','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','\x27,\x20cannot\x20map\x20to\x20\x27','\x20supervised)','note','isInteger','execArgv','commitP99Ms','object','embeddings','_scheduleFlush','1112727KnDngO','\x20\x20Expected\x20one\x20of:','[okdb]\x20reset:\x20','Version\x20mismatch\x20for\x20','_publishFailWarned','slot','EXIT','procmodeack/','EADDRINUSE','_cmd','ephemeral','--log-level','keys','\x20\x20\x20\x20features:\x20\x20','SCHEMA_VALIDATION_FAILED','transactionSync','exp','padEnd','--password','_rawDb','\x20writes\x20(','__okdbCluster','Feature\x20not\x20licensed:\x20','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','_pending','node','[env]','time','registry\x20publish\x20failing:\x20','OKDBTypeNotRegisteredError','\x0a\x20\x20✓\x20License\x20activated','[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20','type/users/item/alice','detachConsole','_log','processes','\x20in\x20','starting','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','base64url','export','disable','history','createInterface','\x20\x20Path\x20access','OKDBTypeAlreadyRegisteredError','toUpperCase','\x20\x20records=','\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','Foreign\x20key\x20violation:\x20','expiresAt','import','received\x20','\x1b[1m','decommission','push','running','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','derivePin','\x20worker\x20slot=','repeat','extend','{}[]:,\x27\x22','stack','cursorKey','bus:poke','INDEX_PROGRESS','logs','_dedupeKey','slice','dropIndex','resetting','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20active\x20environment\x20+\x20list\x20all\x20envs\x0a\x20\x20','randomUUID','race','body:\x20','[okdb-cluster]\x20slot=','\x0d[okdb]\x20','_dedupeMax','SYSTEM_POKE','node:perf_hooks','busy','OKDBForeignKeyDeleteError','\x20\x20Usage:\x20','Engines','\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20API\x20docs\x20for\x20a\x20path\x0a\x0a\x20\x20','use\x20<env>','_kind','No\x20tokens.','LICENSE_LIMIT_EXCEEDED','none','putSync','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','stringify','\x20\x20✓\x20Removed\x20license\x20','commitsPerSec','\x20months\x20from\x20issuance)','once','LICENSE_TYPE_OPEN','hex','summary','confirm','PUT\x20type/users/item/x\x20{\x22n\x22:1}','removeSync','type/users/query\x20{\x22active\x22:true}','message','doctor','\x20already\x20in\x20use','SYSTEM_PROC','length','index','NAME','_nodeDead','LICENSED_BUILD','bus:proc','add','\x0a\x20\x20\x20\x20\x20\x20','config\x20file\x20invalid:\x20','\x20pid=','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','host','INDEX_REGISTERED','hasType','\x20\x20\x20\x20','no\x20.kdbconfig\x20(using\x20defaults)','_lockDb','migrate','treeView','OKDBInvalidIndexKeyError','functions','\x0a\x20\x20Joining\x20cluster\x20at\x20','existsSync','USE','node\x20','--permissions','activation','license:activated','dumpedAt','boolean','effective','committed','ceil','operation','reset','_instanceId','allocUnsafe','fts:registered','\x0a\x20\x20','system:proc','flushed','__identity','_highWater','api','OKDBSchemaCollectionError','description','\x20log\x20level:\x20','\x20to\x20browse\x20the\x20API,\x20','<path>','resetReadTxn','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','fn-runner','\x22.\x20Use:\x20create,\x20list,\x20revoke','[okdb]\x20warning:\x20failed\x20to\x20restore\x20identity/licenses\x20after\x20reset:\x20','[okdb]\x20error:\x20','\x20\x20\x20\x20license:\x20','/\x20quit\x20/\x20Ctrl+C','seq','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','\x1b[36m',':\x20expected\x20','invalid','_clusterWorkerAttached','_maybePublish','writeUInt32BE','\x20licenses','[okdb]\x20closed\x20cleanly\x0a','system:drain','startHeartbeat','processor:error','--print','default','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','createServer','platform','Index\x20\x22','blobs','uuid','references','waiting','\x20\x20\x20\x20usage:\x20\x20\x20','_desiredOverlay','_ensureDesired','processor:retry','[okdb]\x20close\x20error:\x20','_released','\x20writer{depth=','terminal','\x20@\x20','process','readUInt8','crypto','claimGated','CREATED','number','list','\x20\x20╔═══════════════════════════╗','unique:violation_resolved','\x20\x20→\x20\x20','children','connected','detectInputType','listLicenses','getRange','entries','deaths','decommissioned','FOREIGN_KEY_DELETE_RESTRICTED','/api','every','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','log','ref:violation','_onPoke','enable','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','scrypt','started','active','_selfKey','_windowCbs','build','ITEM_UPDATE','15XqIfFv','dropFts','init','open','\x20\x20✓\x20http\x20listening\x20on\x20:','lifecycle','_db','--drop','search','singletonClaims','ms\x20(attempt\x20','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','clusterStatusView','system:ready','types','sandbox','\x20license(s)','ms/','maxWrites','ingest','INDEX_READY','_listenAddr','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','[okdb-cluster]\x20worker\x20pid=','toString',',\x20got\x20','OKDBInvalidValueError','_groupByProcess','\x20\x20\x20\x20api:\x20\x20\x20\x20\x20http://localhost:','processKey','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','\x20does\x20not\x20exist','txn:start','isWorker','_refreshDesiredSnapshot','pause','TYPE_ALREADY_REGISTERED','permissions','_committed','startedAt','LICENSE_HASH_MISMATCH','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','halted','_buckets','reload','registerType','data','meta','okdb','OKDBInvalidPrimaryKeyError','POST','15320MXXgta','holder','ms\x20p99=','\x22\x20→\x20','okdb.pid','\x20\x20(licensee:\x20','Token\x20secret\x20not\x20configured','_admissionTimer','register','trim','blob','\x20worker(s)\x20remaining','isConnected','%),\x20','types/env=','--config','\x20phase=','create','homedir','true','_nodeDbCache','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/info\x0a\x20\x20\x20\x20','\x20\x20(unlimited)','payload','byteLength','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20','\x20environment\x20','.okdb-write-test','licenses','getDesired','bus:drain','_sampleOwnStats',',\x20stopping\x20workers…\x0a','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','NOT_FOUND','then','clearLine','method','resetFts','available','exit','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','label','type:drop','_flushDebounce','\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','cpus','isPrimary','/api/env/','INDEX_NOT_REGISTERED','--username','load','node:events','entry','SIGKILL','config\x20file\x20valid:\x20','_heartbeatTimer','keys:','\x1b[35m','dynamic','\x20\x20changes=','dedupeMax',');\x20','_drain','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','Cannot\x20delete\x20','input:\x20','appendFileSync','pid','_markSeen','engines','\x1b[90m','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','exports','feed:','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','has','\x20sync','_isClusterController','[okdb]\x20opening\x20','processorsView','\x20\x20Writes:\x20\x20','ms\x20env=','\x20\x20All\x20checks\x20passed.\x0a','\x20(must\x20be\x20an\x20integer\x20>=\x201)\x20—\x20using\x201','type/users/item/alice\x20--env\x20staging','env:removed','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','[okdb]\x20shutdown\x20drain\x20exceeded\x203000ms\x20—\x20hard-exiting\x0a','quit','\x20type','type','Build\x20expects\x20public\x20key\x20fingerprint\x20','role','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','drop','_putRowSync','\x20(must\x20be\x201–65535)','recheck','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','env/staging/info','\x20\x20✗','map','\x20\x20·\x20','_onProcEvent','transport','[okdb]\x20blobs:\x20imported=','_license','pin','writeUInt8','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','\x20\x20Type\x20','statSync','_caps','decommissioning','createEnvironment','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','participate','[okdb]\x20invalid\x20port:\x20','workers','clusterWorkers','workersFlag','isFeatureEnabled','peers=','node\x20identity','Examples','properties','_report','_active','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','license:added','node/','stdin','../okdb','ms\x20on\x20env=','draining','[okdb]\x20error:\x20failed\x20to\x20read\x20','--grants','env/:env','_ownMeta','ms\x20activeWriters=','version','processor:progress','disconnect','\x20process','bind','\x27\x20already\x20registered','_quantum','\x20\x20\x20\x20path:\x20\x20\x20\x20','_clusterOnMessage','listAll','test','_flushTimer','randomBytes','access','readUInt16BE','(null)','replace','cpuWindowMs','[on|off|level]','--token','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','putNode','from','\x20(slot=','events','Unique\x20constraint\x20violated\x20on\x20','constructor','type:registered','item:update','\x22\x20is\x20used\x20by:\x20','pending','_systemEnv','Schema\x20validation\x20failed\x20for\x20','_timer','ITEM_REMOVE','readFileSync','safety','addLicense','parkedNow','\x20\x20⚠\x20\x20','verify','[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping','darwin','rowKey','assertLimit','./okdb-export.ndjson','null','HELP','views','sync:apply','win32','worker','importBlobs','_activateProcesses','write','FTS_REGISTERED','roles','rss','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','concat','acquiredAt','prependListener','count','_wantDb','tags:\x20','PUB_FINGERPRINT','LICENSE_FEATURE_DISABLED','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','fast','inflightAgesMs','_threadStats','_bpWaiters','_nodeDbFor','\x20\x20\x20\x20permissions:\x20','/api/','error','drain','keys/public.pem','reverse','argv','SCHEMA_COLLECTION_INVALID','LICENSE_ACTIVATION_INVALID','--no-cluster','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','info','_nodeDb','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','writeUInt16BE','primary','prototype','\x20MB)','[okdb]\x20nothing\x20to\x20reset\x20—\x20','\x20│\x20','childTransaction','\x20records…','resolve','ESRCH','round','rmSync','OKDBNotFoundError','gray','ms\x20mean=','processor:ready','attach','getSecurityNotices','\x20oldestPendingMs=','flushLmdb','admin','_statusEnv','/type/users\x0a\x20\x20\x20\x20','.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22','cluster:\x20unavailable\x20(shmbuf\x20native\x20missing)\x20—\x20running\x20single-process','captureStackTrace','\x20\x20\x20\x20graceful\x20shutdown\x0a','\x20already\x20exists','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','[okdb]\x20loaded\x20config:\x20','__OKDB_PUB_FINGERPRINT__','_removeRowAsync','License\x20already\x20stored','PUT','--label','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','isWanted','warn','type/users','_lock','dropping','_startAdmission','registerFts','ttlMs','_startedAt','_lastCpuAt','slotKey','\x20forked\x20','\x20active\x20env:\x20','SIGINT','ALREADY_EXISTS','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','createHmac','fts:reset','decoded','reason','noCluster','writes=','FEATURES','\x20<path>\x20[json-body]','processors','_cursors','/admin/index.html','bus:env_release','signalWant','\x20drainAge=','respawnTimer','MALFORMED_TOKEN','envsOpen','~licenses','online','uncaughtException','/type/users/query\x0a\x20\x20\x20\x20','OPEN','(empty)','toFixed','columns','default:\x20cores−1\x20=\x20','options','ms\x20busy=','beforeWrite','FTS_RESET','shift','_enableChangelog','\x20\x20\x20\x20expires:\x20\x20\x20','abs','Processors','http.workers','types:','9822744OuSeyY','_publishNow','PUBLIC_KEY_PEM','\x20\x20Envs:\x20\x20\x20\x20','grants','ref:violation_resolved','reduce','licensed','\x20\x20Some\x20checks\x20failed.\x0a','writeFileSync','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','string','listNodes','indexes','raw-put','system:env_release','sig','index:registered','envs','[okdb]\x20created\x20.kdbconfig','env','\x22\x20matches\x20','\x20\x20\x20\x20id:\x20\x20\x20\x20','[okdb]\x20http\x20workers:\x20','[okdb-cluster]\x20respawning\x20worker\x20slot=','get','\x20day(s).','\x0a[okdb]\x20error:\x20','_isReader','current','min','find','\x20HTTP\x20server(s)\x20on\x20port\x20','\x20\x20✓\x20OKDB\x20server\x20running','files','--env\x20<name>','_done','sourceKey','VERSION_MISMATCH','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','--inspect','index:ready','Records','INDEX_ALREADY_REGISTERED','database\x20path\x20not\x20writable:\x20','some','async','system:clock_change','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','\x20\x20\x20\x20status:\x20\x20\x20\x20active','allSettled','_computeStatus','\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)','licenseHash','types\x20--env\x20staging','Events','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20this\x20help\x0a\x20\x20','\x20(expires\x20','level','licenseType','green','clearTtl','param','mean','timeMachine','hasDesired','event','selfKey','expired','decodeLicenseBlob','LOGS','--open','call','--eval','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','change','_processStartedAt','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','\x20\x20Error:\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20open\x20admin\x20UI\x20in\x20browser\x0a\x20\x20','(unset)','startsWith','unknown','config','_seen','tags','_coordinator','processingStatusView','_servingEngines','line','\x1b[37m','toLowerCase','~processes:cmd','deregisterSelf','licensee','hidden','_onTick','oldestPendingMs','ttl:set','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','[okdb]\x20cluster\x20close\x20error:\x20','--test','user','sizeBefore','commit','database\x20path\x20writable:\x20','--address','\x20/\x20','\x20HTTP\x20workers,\x20primary\x20=\x20processor)','supervisorKey','\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20(','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','_started','maxExtra','server','includes','schema:set','~processes','syncPeers','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','_wantDbHandle','createdAt','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','_singletonLocks','INVALID_PRIMARY_KEY','password','charCodeAt','_envs','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','setDesired','trimStart','enabled','--path','_onStop','SIG_INVALID','Invalid\x20activation\x20token:\x20','ITEM_CREATE','dirname','\x20references\x20','\x20\x20\x20\x20\x20\x20','depth','_changefeed','--help','_lastPublishAt','\x20\x20[okdb]\x20closed\x20cleanly\x0a','fanout','[okdb]\x20imported\x20\x20types=','processor:paused','noteListenAddr','http://localhost:','HTTP\x20','No\x20license\x20found\x20matching\x20this\x20activation\x20token','\x0a===\x20OKDB_DIAG\x20','[okdb]\x20cluster\x20primary\x20pid=','sync','xdg-open\x20','--types','_heartbeatInFlight','_children','ACTIVATION_EXPIRED','\x0a\x20\x20License\x20details:','function','importFromFile','__writeCounter','help','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','_isStale','STATUS','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','inputSchema','listen','_closed','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','selfAddress','token','2WmmRjU','okdb-writer:\x20env\x20closing\x20—\x20retry','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','[body]','TYPES','processorId','_buildProcessingFacet','37109270zwSfRY','percentile','updatedAt','127.0.0.1','idx:','\x0a[okdb]\x20received\x20','processing','\x0a\x0a\x20\x20','cluster','targetKey','[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','type/','namespace','TYPE_NOT_REGISTERED','msg','[okdb]\x20exporting\x20env\x20\x22','--ttl','VIEW_PROGRESS','values','OKDBIndexNotRegisteredError','clearThreadStats','SYNC_COMMITS','QUIT','\x20file','onLicenseExpired','_rootDb','\x20logs\x20off\x0a','__okdbSlot','ORPHAN\x20(env-closed\x20write)','777960uHLNOy','[okdb]\x20primary\x20okdb\x20close\x20error:\x20','\x20\x20(','features','der','Type\x20\x27','verifyActivation','spki','embedded','identity','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','username','parse','update','\x20\x20(name:\x20','OKDBAlreadyExistsError','sha256','setOwnMeta',':\x20key\x20[','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','\x20\x20@','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','stderr','valid',',\x20signal=','question','okdb-http-worker-child.js','mcp',';\x20shmbuf\x20native\x20missing\x20→\x20forced\x20single-process',',\x20closing…\x0a','port','copy','(workers\x20can\x27t\x20share\x20the\x20cross-process\x20HLC/clock).\x20Forcing\x20single-process\x20(was\x20','status','\x27\x20doesn\x27t\x20exist','debug','kill','offWindow','publishChildRow','stdout','--blobs','\x20\x20\x20\x20status:\x20\x20\x20\x20','\x20\x20✓\x20Revoked\x20token\x20','?\x0a\x20\x20(node\x20identity\x20and\x20licenses\x20are\x20preserved)\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','loop-lag\x20','\x20(expires\x20in\x20','ttl:expired','--name','access:\x20','dropType','(add\x20a\x20license\x20first)','--version','set','(on\x20any\x20path\x20command)','[okdb-cluster]\x20','nodeKey','[okdb]\x20created\x20./okdb-data','item:remove','activateLicense','Release','_lastCpuWindowMs','catch','[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument','assertFeature','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','License\x20expired\x20or\x20invalidated','\x0a\x20\x20✓\x20Token\x20created','\x20\x20✓\x20','_buildChildRow','inst:','--key','\x0a\x20\x20✓\x20License\x20added','white','loop-lag','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','sub','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','getCmd','uptime','[okdb-cluster]\x20primary\x20pid=','firstTs','\x20records','_lastCpuUsage','clear','delete','put','<json-body>','\x20statusEnv=','1ofN:','~processes:desired','_bpParkedTotal','setLogger','Indexes','path','emit','--changes','[okdb]\x20reset\x20aborted','\x20worker','cyan','\x0a\x20\x20Invalid\x20JSON:\x20','logLevel','Queue','cluster:\x20ready\x20(','attachFeed','logRequests','ready','external','[okdb]\x20error:\x20--password\x20requires\x20--name','Environments','getCount','http','cluster:','issuedAt','--watch','__vocab/version','mkdirSync','backup','EXPIRES','_acquiredAt','_hbTimer','_lastCpuPct','noAdmin','_supervisorKey','listDesired','bumpCmd','maxMs','killable','Sync','PATCH','\x20\x20\x20http://localhost:','sort','\x20died\x20','ENV_CLOSING_RETRY','LICENSEE','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','sizeAfter','shutdown','createHash','getClock','size','dropSchema','./okdb-backup','bold','exportBlobs','\x20\x20\x20\x20port:\x20\x20\x20\x20','(none)','_role','getProcess','nodesView','expires','[okdb]\x20shmbuf\x20native\x20binding\x20unavailable\x20—\x20multi-process\x20clustering\x20is\x20unsafe\x20','_isWriter','send','DELETE','code','FOREIGN_KEY_VIOLATION','shmbufNative','shmbuf/package.json','errors','unref','records','~tokens','\x20\x20+','_inflight','_holderDead','shutting\x20down…\x0a','removeSupervisedChild','(primary\x20=\x20processor)','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','files/','_draining',':want','cpuUsage','stopped',')\x20exited\x20','publishOwnRow','hint','open\x20','addSupervisedChild','openDB','red','env:opened','getPins','INDEX_RESET','state','hard-killed','splice','magenta','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','toLocaleString','.kdbconfig','isTTY','quantum','Full-text\x20search','filter','hostname','_licenseHash','isDead','index:progress','Index\x20\x27','_outstanding','SYSTEM_STOPPED','\x22\x20to\x20enable\x20it.','cli','now','listenAddr','free\x20tier','recordWrite','_sandbox','updateSupervisedChildStats','split','dim',')\x20—\x20they\x20will\x20NOT\x20be\x20preserved','\x20\x20[','\x20\x20\x20\x20limits:\x20\x20\x20\x20','fieldPath','exec','processes:\x20','result','threads','off','system:poke','padStart','changes','\x20\x20╚═══════════════════════════╝','pushEphemeral','caps','compact','prompt','other','heartbeatMs','key','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','[okdb]\x20import\x20complete','_baselines','Admin','OKDB-PIN-V1:','mode','force','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','_singletonLock','application/json','transaction','already\x20in\x20use','\x20for\x20commands,\x20','\x20tokens:','license','listRoutes','Activation\x20invalid:\x20','[okdb]\x20export\x20complete','timingSafeEqual','close','markClosed','UNIQUE_CONSTRAINT','\x20\x20⚠','setTtl','single','licenseId','ms\x20max=','stats','flushDebounce','kind','assign','_buildOwnRow','_isFree','expiry','\x1b[0m','ttl','fork','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20','id:\x20','schema:drop','value','\x20\x20\x20\x20licensee:\x20\x20','\x20\x20\x20\x20path:\x20\x20','building','SIGINT\x20(double-tap)','unique:violation','\x20worker(s)\x20still\x20serving','--workers','_desired','digest','routes','getChanges','OKDBVersionMismatchError','\x20result','\x27\x20is\x20already\x20registered','dead','LICENSE_INVALID','INDEX_HAS_CONSUMERS','processor:resumed','typeSubDbs','readline','OKDBForeignKeyError','_writer','\x20\x20\x20\x20\x20\x20\x20','use','_startHeartbeat','standalone','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','GET','[okdb]\x20invalid\x20log\x20level:\x20\x22','.kdb_history','Files','floor','registerIndex','consecutiveFailures','\x20\x20\x20\x20admin:\x20http://localhost:','LABEL','join','ppid','max','System','_collectSingletonClaims','_getType','config\x20http.workers','_rowKey','created','fts','--env','--no-repl','val','\x20===','heapUsed','SIGBREAK','start','typesPerEnv','memoryUsage','active:','\x20\x20\x20\x20writes:\x20\x20\x20\x20','_enqueuedAt','OKDB_HTTP_WORKERS\x20env','6379464IPHfBV','cause','_handleInProcess','\x20ipc\x20error:\x20','heapTotal','\x20\x20\x20\x20port:\x20\x20','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','ftsName','limits','forEach','SIGTERM','\x27:\x20','remove','\x20which\x20does\x20not\x20exist','readUInt32BE','0123456789ABCDEFGHJKMNPQRSTVWXYZ','_drainOne','dbPath','\x20HTTP\x20workers\x20','_migrateVocab','INVALID_VALUE','REMOVE','revoke','\x1b[32m','_collectWriterFacet','setupPrimary','level:\x20info','unlinkSync','recent\x20writes\x20(newest\x20first)','indexOf',']\x20already\x20maps\x20to\x20\x27','removeNode','system','node:crypto','body','\x20\x20http://localhost:','\x0a\x20\x20okdb\x20doctor\x0a','name','http-server','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','\x20\x20skipped=','~lock','[okdb]\x20invalid\x20','_onItem',')\x20to\x20your\x20license\x20vendor.','fts:drop','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','isArray','ENVS','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','\x0a\x20\x20\x20\x20','fts:','./okdb-data','auth','stop','env/','afterWrite','_durs','targetType','utf8',':\x20processor\x20(HTTP-silent),\x20','3682FetqAB','yellow','indexToDb','rows=','toISOString','OKDB_HTTP_WORKERS','noRepl','\x20\x20env=','621022XWizzo','--port','_putRowAsync'];_0x4c6a=function(){return _0x14e427;};return _0x4c6a();}function getDefaultExportFromCjs(_0x3b706f){const _0x4bd46d=_0x42e206;return _0x3b706f&&_0x3b706f['__esModule']&&Object[_0x4bd46d(0x2f3)]['hasOwnProperty'][_0x4bd46d(0x393)](_0x3b706f,_0x4bd46d(0x678))?_0x3b706f[_0x4bd46d(0x678)]:_0x3b706f;}var okdb$1={},okdbWorkers,hasRequiredOkdbWorkers;function requireOkdbWorkers(){if(hasRequiredOkdbWorkers)return okdbWorkers;hasRequiredOkdbWorkers=0x1;const _0x55b36a=require$$0,_0xf8275=require$$1$1,_0xf99ba4=require$$1;let _0x4df4c3;function _0xcc3f05(){const _0x33b4f6=_0x4d7d;if(process.env.OKDB_FORCE_SHMBUF_FALLBACK==='1')return![];if(_0x4df4c3!==undefined)return _0x4df4c3;try{const _0x1271f4=_0xf99ba4[_0x33b4f6(0x3d4)](require[_0x33b4f6(0x2f9)](_0x33b4f6(0x4bb)));_0x4df4c3=_0xf8275[_0x33b4f6(0x647)](_0xf99ba4[_0x33b4f6(0x553)](_0x1271f4,_0x33b4f6(0x6aa),_0x33b4f6(0x459),'shmbuf.node'));}catch{_0x4df4c3=![];}return _0x4df4c3;}function _0x229c22(){const _0x1168f1=_0x4d7d,_0x57df2c=_0x55b36a[_0x1168f1(0x23a)]()[_0x1168f1(0x631)];return Math[_0x1168f1(0x555)](0x1,_0x57df2c-0x1);}function _0x3caf81(_0x25e3fa,_0x1bf42e={}){const _0x2f4222=_0x4d7d,_0x4f7a99=_0x1bf42e[_0x2f4222(0x4ba)]!==undefined?_0x1bf42e[_0x2f4222(0x4ba)]:_0xcc3f05();let _0x447f29;if(_0x25e3fa?.[_0x2f4222(0x329)])_0x447f29=0x1;else{let _0x272312,_0x220890;if(_0x25e3fa?.[_0x2f4222(0x286)]!==undefined&&_0x25e3fa['workersFlag']!==null&&_0x25e3fa[_0x2f4222(0x286)]!=='')_0x272312=_0x25e3fa[_0x2f4222(0x286)],_0x220890=_0x2f4222(0x535);else{if(process.env.OKDB_HTTP_WORKERS!==undefined&&process.env.OKDB_HTTP_WORKERS!=='')_0x272312=process.env.OKDB_HTTP_WORKERS,_0x220890=_0x2f4222(0x5ad);else _0x25e3fa?.[_0x2f4222(0x48c)]?.[_0x2f4222(0x284)]!==undefined&&_0x25e3fa[_0x2f4222(0x48c)][_0x2f4222(0x284)]!==null&&_0x25e3fa['http'][_0x2f4222(0x284)]!==''&&(_0x272312=_0x25e3fa[_0x2f4222(0x48c)][_0x2f4222(0x284)],_0x220890=_0x2f4222(0x348));}if(_0x272312===undefined)_0x447f29=_0x229c22();else{const _0x40bf64=Number(_0x272312);!Number[_0x2f4222(0x5bd)](_0x40bf64)||_0x40bf64<0x1?(console['warn'](_0x2f4222(0x594)+_0x220890+'='+JSON[_0x2f4222(0x621)](_0x272312)+_0x2f4222(0x260)),_0x447f29=0x1):_0x447f29=_0x40bf64;}}return!_0x4f7a99&&_0x447f29>0x1&&(console[_0x2f4222(0x316)](_0x2f4222(0x4b4)+(_0x2f4222(0x43e)+_0x447f29+').')),_0x447f29=0x1),_0x447f29;}return okdbWorkers={'isShmbufNative':_0xcc3f05,'defaultWorkers':_0x229c22,'resolveWorkers':_0x3caf81},okdbWorkers;}var version='2.0.0',require$$3={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x15db89=require$$0$1;function _0x259e2b(_0x540119,_0x32c608){const _0x6c1fe9=_0x4d7d;return _0x15db89[_0x6c1fe9(0x325)](_0x6c1fe9(0x42e),_0x32c608)[_0x6c1fe9(0x42b)](_0x540119)[_0x6c1fe9(0x537)]('base64url');}function _0x240fa4(_0x2a3e66,_0x67b902){const _0x1809ef=_0x4d7d;if(typeof _0x2a3e66!==_0x1809ef(0x355)||typeof _0x67b902!==_0x1809ef(0x355))return![];if(Buffer[_0x1809ef(0x224)](_0x2a3e66)!==Buffer['byteLength'](_0x67b902))return![];return _0x15db89['timingSafeEqual'](Buffer['from'](_0x2a3e66),Buffer[_0x1809ef(0x2b0)](_0x67b902));}function _0x3a5f6b(_0x133b42){const _0x45f854=_0x4d7d;if(!_0x133b42?.[_0x45f854(0x39c)]('Bearer\x20'))return null;return _0x133b42[_0x45f854(0x608)](0x7);}function _0x5c9b77(_0x29aabd=0x20){const _0x45c9d5=_0x4d7d;return _0x15db89[_0x45c9d5(0x2a6)](_0x29aabd)[_0x45c9d5(0x1f0)]('base64url');}function _0x5f208c(_0xa22d67){const _0x18aa50=_0x4d7d;return _0x15db89[_0x18aa50(0x4a7)](_0x18aa50(0x42e))[_0x18aa50(0x42b)](_0xa22d67)[_0x18aa50(0x537)](_0x18aa50(0x627));}function _0x4469ca(_0x34e978,_0x20d610,_0x5a26f8=0x36ee80){const _0x17e81a=_0x4d7d;if(!_0x20d610)throw new Error(_0x17e81a(0x212));const _0x3d14bb=Date[_0x17e81a(0x4ea)](),_0x3233f2=Buffer['from'](JSON[_0x17e81a(0x621)]({'iat':_0x3d14bb,'exp':_0x3d14bb+_0x5a26f8,'sub':_0x34e978?.['id']??_0x34e978?.[_0x17e81a(0x469)]??null,'username':_0x34e978?.[_0x17e81a(0x429)]??_0x34e978?.['name']??null,'roles':Array[_0x17e81a(0x59a)](_0x34e978?.[_0x17e81a(0x2d2)])?_0x34e978[_0x17e81a(0x2d2)]:[]}))[_0x17e81a(0x1f0)](_0x17e81a(0x5ea)),_0xb023c0=_0x259e2b(_0x3233f2,_0x20d610);return _0x3233f2+'.'+_0xb023c0;}function _0x13d9aa(_0x59825a,_0x19194b){const _0x4fb065=_0x4d7d;if(!_0x19194b||typeof _0x59825a!==_0x4fb065(0x355))return null;const [_0x14f1b0,_0x241b20]=_0x59825a[_0x4fb065(0x4f0)]('.');if(!_0x14f1b0||!_0x241b20)return null;const _0x571284=_0x259e2b(_0x14f1b0,_0x19194b);if(!_0x240fa4(_0x241b20,_0x571284))return null;try{const _0x10c5be=JSON[_0x4fb065(0x42a)](Buffer[_0x4fb065(0x2b0)](_0x14f1b0,'base64url')[_0x4fb065(0x1f0)]()),_0x5ef2f2=0x7530;if(Date[_0x4fb065(0x4ea)]()>Number(_0x10c5be?.['exp']??0x0)+_0x5ef2f2)return null;return _0x10c5be;}catch{return null;}}async function _0x233c67(_0x3fe55c){return new Promise((_0x30b11f,_0x478b23)=>{const _0x4a9b89=_0x4d7d,_0x3acd66=_0x15db89['randomBytes'](0x10);_0x15db89[_0x4a9b89(0x6a5)](_0x3fe55c,_0x3acd66,0x40,(_0x299ae3,_0x2edb03)=>{const _0x5d1adb=_0x4a9b89;if(_0x299ae3)_0x478b23(_0x299ae3);_0x30b11f(_0x3acd66[_0x5d1adb(0x1f0)](_0x5d1adb(0x627))+':'+_0x2edb03[_0x5d1adb(0x1f0)](_0x5d1adb(0x627)));});});}async function _0x3d6c4f(_0x138c12,_0x1cc734){const _0x3a4105=_0x4d7d,[_0x5ebb1e,_0x56cd15]=_0x1cc734['split'](':');if(!_0x5ebb1e||!_0x56cd15)return![];const _0x2cb431=Buffer['from'](_0x5ebb1e,_0x3a4105(0x627));return new Promise((_0x19bddd,_0x1dfa7a)=>{const _0x23dcb3=_0x3a4105;_0x15db89[_0x23dcb3(0x6a5)](_0x138c12,_0x2cb431,0x40,(_0x6fbf9f,_0xa735d3)=>{const _0x30d80e=_0x23dcb3;if(_0x6fbf9f)_0x1dfa7a(_0x6fbf9f);_0x19bddd(_0x15db89[_0x30d80e(0x518)](_0xa735d3,Buffer['from'](_0x56cd15,_0x30d80e(0x627))));});});}return okdbAuthTokens={'hmac':_0x259e2b,'timingSafeEqual':_0x240fa4,'parseBearer':_0x3a5f6b,'randomToken':_0x5c9b77,'hashToken':_0x5f208c,'issueToken':_0x4469ca,'authenticateToken':_0x13d9aa,'hashPassword':_0x233c67,'verifyPassword':_0x3d6c4f},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x5a523e=_0x42e206;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x42c98c=require$$0$2,_0x17ca14=_0x5a523e(0x579),_0xe4b1d4=new Uint8Array(0x100)['fill'](0xff);for(let _0x118cdf=0x0;_0x118cdf<_0x17ca14[_0x5a523e(0x631)];_0x118cdf++){_0xe4b1d4[_0x17ca14[_0x5a523e(0x3c9)](_0x118cdf)]=_0x118cdf,_0xe4b1d4[_0x17ca14[_0x5a523e(0x3c9)](_0x118cdf)+0x20]=_0x118cdf;}_0xe4b1d4['O'[_0x5a523e(0x3c9)](0x0)]=0x0,_0xe4b1d4['o'['charCodeAt'](0x0)]=0x0,_0xe4b1d4['I'[_0x5a523e(0x3c9)](0x0)]=0x1,_0xe4b1d4['i'[_0x5a523e(0x3c9)](0x0)]=0x1,_0xe4b1d4['L'[_0x5a523e(0x3c9)](0x0)]=0x1,_0xe4b1d4['l'[_0x5a523e(0x3c9)](0x0)]=0x1;function _0x54f5cb(_0x2e2970){const _0x59613d=_0x5a523e;let _0x3cfc4d=0x0,_0x245bc6=0x0,_0x48df60='';for(let _0x252922=0x0;_0x252922<_0x2e2970[_0x59613d(0x631)];_0x252922++){_0x245bc6=_0x245bc6<<0x8|_0x2e2970[_0x252922],_0x3cfc4d+=0x8;while(_0x3cfc4d>=0x5){_0x3cfc4d-=0x5,_0x48df60+=_0x17ca14[_0x245bc6>>>_0x3cfc4d&0x1f];}}return _0x3cfc4d>0x0&&(_0x48df60+=_0x17ca14[_0x245bc6<<0x5-_0x3cfc4d&0x1f]),_0x48df60;}function _0x5aeefa(_0xe93cef){const _0x11678e=_0x5a523e;_0xe93cef=_0xe93cef['replace'](/-/g,'')[_0x11678e(0x5f1)]();let _0x5acbd2=0x0,_0x58aeeb=0x0;const _0x143539=[];for(let _0x2911e0=0x0;_0x2911e0<_0xe93cef['length'];_0x2911e0++){const _0x15330e=_0xe4b1d4[_0xe93cef['charCodeAt'](_0x2911e0)];if(_0x15330e===0xff)continue;_0x58aeeb=_0x58aeeb<<0x5|_0x15330e,_0x5acbd2+=0x5,_0x5acbd2>=0x8&&(_0x5acbd2-=0x8,_0x143539[_0x11678e(0x5fa)](_0x58aeeb>>>_0x5acbd2&0xff));}return Buffer[_0x11678e(0x2b0)](_0x143539);}const _0x168d3d=[_0x5a523e(0x3e5),_0x5a523e(0x5c1),_0x5a523e(0x252),_0x5a523e(0x55c),'timeMachine',_0x5a523e(0x2ca),_0x5a523e(0x439),_0x5a523e(0x36c)],_0x301e8c=0x0,_0x464063=0x1,_0x49f215=0x2,_0x35a2c4=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x47b2b5({issuedAt:_0x1f859e,expiresAt:_0x1c6090,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x301e8c}){const _0x4a6a32=_0x5a523e,_0x1b78f1=Buffer[_0x4a6a32(0x2b0)](licensee,_0x4a6a32(0x5a6))[_0x4a6a32(0x608)](0x0,0x40),_0xa49df9=0x1+0x1+0x4+0x4+0x1+_0x1b78f1[_0x4a6a32(0x631)]+0x2+0x10,_0xcd392b=Buffer[_0x4a6a32(0x655)](_0xa49df9);let _0x546198=0x0;_0xcd392b[_0x4a6a32(0x279)](0x1,_0x546198++),_0xcd392b[_0x4a6a32(0x279)](licenseType,_0x546198++),_0xcd392b[_0x4a6a32(0x671)](Math['floor'](_0x1f859e/0x3e8),_0x546198),_0x546198+=0x4,_0xcd392b[_0x4a6a32(0x671)](Math[_0x4a6a32(0x54e)](_0x1c6090/0x3e8),_0x546198),_0x546198+=0x4,_0xcd392b[_0x4a6a32(0x279)](_0x1b78f1[_0x4a6a32(0x631)],_0x546198++),_0x1b78f1[_0x4a6a32(0x43d)](_0xcd392b,_0x546198),_0x546198+=_0x1b78f1[_0x4a6a32(0x631)];let _0xfae173=0x0;for(let _0x366f96=0x0;_0x366f96<_0x168d3d[_0x4a6a32(0x631)];_0x366f96++){if(features[_0x168d3d[_0x366f96]])_0xfae173|=0x1<<_0x366f96;}_0xcd392b[_0x4a6a32(0x2f1)](_0xfae173,_0x546198),_0x546198+=0x2;const _0x2d530e=['envs',_0x4a6a32(0x564),_0x4a6a32(0x3c1),'maxWrites'];for(const _0x46d6a6 of _0x2d530e){_0xcd392b[_0x4a6a32(0x671)](limits[_0x46d6a6]||0x0,_0x546198),_0x546198+=0x4;}return _0xcd392b;}function _0x24778b(_0x2fc953){const _0x35999b=_0x5a523e;let _0x1704e1=0x0;const _0x113a32=_0x2fc953[_0x35999b(0x68b)](_0x1704e1++),_0x4c86ab=_0x2fc953['readUInt8'](_0x1704e1++),_0x258cde=_0x2fc953[_0x35999b(0x578)](_0x1704e1);_0x1704e1+=0x4;const _0x3b5e31=_0x2fc953[_0x35999b(0x578)](_0x1704e1);_0x1704e1+=0x4;const _0xfe205a=_0x2fc953[_0x35999b(0x68b)](_0x1704e1++),_0x540706=_0x2fc953[_0x35999b(0x608)](_0x1704e1,_0x1704e1+_0xfe205a)[_0x35999b(0x1f0)](_0x35999b(0x5a6));_0x1704e1+=_0xfe205a;const _0x217a3d=_0x2fc953[_0x35999b(0x2a8)](_0x1704e1);_0x1704e1+=0x2;const _0x52021b={};for(let _0x4744c2=0x0;_0x4744c2<_0x168d3d[_0x35999b(0x631)];_0x4744c2++){_0x52021b[_0x168d3d[_0x4744c2]]=Boolean(_0x217a3d&0x1<<_0x4744c2);}const _0x4006a3=[_0x35999b(0x35c),_0x35999b(0x564),'syncPeers','maxWrites'],_0x2edd81={};for(const _0x99ce56 of _0x4006a3){const _0x52788e=_0x2fc953[_0x35999b(0x578)](_0x1704e1);_0x1704e1+=0x4,_0x2edd81[_0x99ce56]=_0x52788e===0x0?null:_0x52788e;}return{'v':_0x113a32,'licenseType':_0x4c86ab,'issuedAt':_0x258cde*0x3e8,'expiresAt':_0x3b5e31*0x3e8,'licensee':_0x540706,'features':_0x52021b,'limits':_0x2edd81};}function _0x51fc07(_0xbf28f4,_0x5d6bdd){const _0x978dd3=_0x5a523e,_0x18c210=Buffer[_0x978dd3(0x2d5)]([_0xbf28f4,_0x5d6bdd]),_0x41a708=_0x54f5cb(_0x18c210),_0x18d48e=[];for(let _0x39fb75=0x0;_0x39fb75<_0x41a708[_0x978dd3(0x631)];_0x39fb75+=0x8){_0x18d48e[_0x978dd3(0x5fa)](_0x41a708[_0x978dd3(0x608)](_0x39fb75,_0x39fb75+0x8));}return _0x18d48e[_0x978dd3(0x553)]('-');}function _0x55e509(_0x4277fe){const _0x1778a6=_0x5a523e;if(typeof _0x4277fe!==_0x1778a6(0x355))throw new Error(_0x1778a6(0x3f0));const _0x56bf35=_0x5aeefa(_0x4277fe[_0x1778a6(0x2aa)](/-/g,''));if(_0x56bf35[_0x1778a6(0x631)]<0x41)throw new Error('decodeLicenseBlob:\x20blob\x20too\x20short\x20('+_0x56bf35['length']+'\x20bytes,\x20need\x20>=\x2065)');const _0x43dc93=_0x56bf35[_0x1778a6(0x608)](0x0,_0x56bf35[_0x1778a6(0x631)]-0x40),_0x56c14c=_0x56bf35[_0x1778a6(0x608)](_0x56bf35['length']-0x40);let _0x4614ad;try{_0x4614ad=_0x24778b(_0x43dc93);}catch(_0x3ae0b0){throw new Error(_0x1778a6(0x506)+_0x3ae0b0['message']);}return{'rawBuf':_0x56bf35,'payload':_0x43dc93,'sig':_0x56c14c,'decoded':_0x4614ad};}function _0x1b8e69(_0x49d2a2){const _0x149058=_0x5a523e;return _0x42c98c[_0x149058(0x4a7)](_0x149058(0x42e))[_0x149058(0x42b)](_0x49d2a2)[_0x149058(0x537)]()[_0x149058(0x608)](0x0,0x8);}function _0x76bd12(_0x337011,_0x3e4d3d,_0x4b9974){const _0x1b184e=_0x5a523e,_0x3a4ae0=_0x1b184e(0x50a)+_0x4b9974,_0xd16d97=Buffer[_0x1b184e(0x2d5)]([Buffer[_0x1b184e(0x2b0)](_0x337011,_0x1b184e(0x5a6)),_0x3e4d3d]),_0x50b57f=_0x42c98c[_0x1b184e(0x325)]('sha256',_0x3a4ae0)[_0x1b184e(0x42b)](_0xd16d97)[_0x1b184e(0x537)](),_0x48d760=_0x54f5cb(_0x50b57f[_0x1b184e(0x608)](0x0,0x5));return{'pin':_0x48d760,'pinHmac':_0x50b57f};}function _0xa6ed7f(_0x5e5b33,_0x4038bb,_0x576a29){const _0x37d81c=_0x5a523e,_0x4b714a=Buffer[_0x37d81c(0x655)](0x4d);let _0x2286e5=0x0;_0x4b714a[_0x37d81c(0x279)](0x1,_0x2286e5++),_0x5e5b33[_0x37d81c(0x43d)](_0x4b714a,_0x2286e5),_0x2286e5+=0x8,_0x4b714a['writeUInt32BE'](_0x4038bb,_0x2286e5),_0x2286e5+=0x4,_0x576a29['copy'](_0x4b714a,_0x2286e5);const _0x417002=_0x54f5cb(_0x4b714a),_0x484f6d=[];for(let _0x4082e8=0x0;_0x4082e8<_0x417002[_0x37d81c(0x631)];_0x4082e8+=0x6){_0x484f6d['push'](_0x417002[_0x37d81c(0x608)](_0x4082e8,_0x4082e8+0x6));}return _0x484f6d['join']('-');}function _0x39229f(_0x118676){const _0x54463a=_0x5a523e;if(typeof _0x118676!==_0x54463a(0x355))throw new Error('decodeActivationToken:\x20input\x20must\x20be\x20a\x20string');const _0x3fdf45=_0x5aeefa(_0x118676['replace'](/-/g,''));if(_0x3fdf45[_0x54463a(0x631)]!==0x4d)throw new Error('decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20'+_0x3fdf45[_0x54463a(0x631)]);let _0x5dbe73=0x0;const _0xda97b=_0x3fdf45['readUInt8'](_0x5dbe73++),_0x401551=_0x3fdf45[_0x54463a(0x608)](_0x5dbe73,_0x5dbe73+0x8);_0x5dbe73+=0x8;const _0x4b0dcd=_0x3fdf45[_0x54463a(0x578)](_0x5dbe73);_0x5dbe73+=0x4;const _0x266b6b=_0x3fdf45[_0x54463a(0x608)](_0x5dbe73);return{'v':_0xda97b,'licenseHash':_0x401551,'expiry':_0x4b0dcd,'sig':_0x266b6b};}function _0x5be6bd({tokenString:_0x21785b,nodeId:_0x3dd096,rawBlobBuf:_0x286f71,pubKeyPem:_0x26f056,pubFingerprint:_0x5b27fe}){const _0x3bd42f=_0x5a523e;let _0x3148d2;try{_0x3148d2=_0x39229f(_0x21785b);}catch(_0x1acd3a){return{'valid':![],'reason':_0x3bd42f(0x334)};}const _0x2d1d15=_0x1b8e69(_0x286f71);if(!_0x2d1d15['equals'](_0x3148d2[_0x3bd42f(0x380)]))return{'valid':![],'reason':_0x3bd42f(0x200)};const {pinHmac:_0x1f32e5}=_0x76bd12(_0x3dd096,_0x2d1d15,_0x5b27fe),_0x4e4bc5=Buffer['allocUnsafe'](0x4);_0x4e4bc5[_0x3bd42f(0x671)](_0x3148d2[_0x3bd42f(0x527)],0x0);const _0x1a2caf=Buffer[_0x3bd42f(0x2d5)]([Buffer[_0x3bd42f(0x2b0)]([_0x3148d2['v']]),_0x1f32e5[_0x3bd42f(0x608)](0x0,0x5),_0x3148d2[_0x3bd42f(0x380)],_0x4e4bc5]);try{const _0x5bdfea=_0x42c98c[_0x3bd42f(0x2c2)](null,_0x1a2caf,_0x26f056,_0x3148d2[_0x3bd42f(0x35a)]);if(!_0x5bdfea)return{'valid':![],'reason':_0x3bd42f(0x3d1)};}catch(_0x4e9d00){return{'valid':![],'reason':_0x3bd42f(0x3d1)};}if(_0x3148d2[_0x3bd42f(0x527)]<Date[_0x3bd42f(0x4ea)]()/0x3e8)return{'valid':![],'reason':'ACTIVATION_EXPIRED'};return{'valid':!![],'reason':'ok'};}function _0x50b1cf(_0x180346){const _0x5b63ce=_0x5a523e;if(typeof _0x180346!==_0x5b63ce(0x355))return _0x5b63ce(0x39d);const _0x5c2894=_0x180346[_0x5b63ce(0x215)]();if(_0x5c2894[_0x5b63ce(0x39c)]('/')||_0x5c2894[_0x5b63ce(0x39c)]('./')||_0x5c2894[_0x5b63ce(0x39c)]('../')||/^[A-Za-z]:[\\/]/[_0x5b63ce(0x2a4)](_0x5c2894))return _0x5b63ce(0x47b);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x5b63ce(0x2a4)](_0x5c2894))return _0x5b63ce(0x67e);const _0x5bcfd3=_0x5c2894[_0x5b63ce(0x2aa)](/[\s-]+/g,'')['length'];if(_0x5bcfd3===0x7c)return _0x5b63ce(0x64b);if(_0x5bcfd3>=0x95&&_0x5bcfd3<=0xfc)return _0x5b63ce(0x216);return _0x5b63ce(0x39d);}return okdbLicenseCodec={'toBase32':_0x54f5cb,'fromBase32':_0x5aeefa,'encodeLicensePayload':_0x47b2b5,'decodeLicensePayload':_0x24778b,'encodeLicenseBlob':_0x51fc07,'decodeLicenseBlob':_0x55e509,'licenseHash':_0x1b8e69,'derivePin':_0x76bd12,'encodeActivationToken':_0xa6ed7f,'decodeActivationToken':_0x39229f,'verifyActivation':_0x5be6bd,'detectInputType':_0x50b1cf,'FEATURE_NAMES':_0x168d3d,'LICENSE_TYPE_STANDARD':_0x301e8c,'LICENSE_TYPE_OPEN':_0x464063,'LICENSE_TYPE_INTERNAL':_0x49f215,'OPEN_LICENSE_MAX_DURATION_MS':_0x35a2c4},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x30babc extends Error{constructor(_0x24539f,_0x170d22,_0x57da03={}){const _0xd92436=_0x4d7d;super(_0x24539f),this[_0xd92436(0x58f)]='OKDBError',this[_0xd92436(0x4b8)]=_0x170d22,this['details']=_0x57da03,_0x57da03[_0xd92436(0x56b)]&&(this[_0xd92436(0x56b)]=_0x57da03[_0xd92436(0x56b)]),Error[_0xd92436(0x30a)](this,this[_0xd92436(0x2b4)]);}}class _0x35de5f extends _0x30babc{constructor(_0x228e61,_0x5e2718,_0x493c71,_0x101b9e){const _0x554844=_0x4d7d;super(_0x554844(0x5c6)+_0x228e61+'@'+_0x5e2718+_0x554844(0x66d)+_0x493c71+_0x554844(0x1f1)+_0x101b9e,_0x554844(0x370),{'type':_0x228e61,'key':_0x5e2718,'expectedVersion':_0x493c71,'actualVersion':_0x101b9e}),this[_0x554844(0x58f)]=_0x554844(0x53a);}}class _0x5623d8 extends _0x30babc{constructor(_0xb92564,_0x562425){const _0x440cdf=_0x4d7d;super(_0xb92564+'@'+_0x562425+_0x440cdf(0x1f7),_0x440cdf(0x22e),{'type':_0xb92564,'key':_0x562425}),this[_0x440cdf(0x58f)]=_0x440cdf(0x2fd);}}class _0x34b1ea extends _0x30babc{constructor(_0xd22b94,_0xf42050){const _0x456cfa=_0x4d7d;super(_0xd22b94+'@'+_0xf42050+_0x456cfa(0x30c),_0x456cfa(0x323),{'type':_0xd22b94,'key':_0xf42050}),this[_0x456cfa(0x58f)]=_0x456cfa(0x42d);}}class _0x3feada extends _0x30babc{constructor(_0x44e0c0,_0x15c623){const _0x1d4996=_0x4d7d,_0x143915=typeof _0x15c623;super('Invalid\x20index\x20key\x20type\x20for\x20\x27'+_0x44e0c0+_0x1d4996(0x575)+_0x143915+_0x1d4996(0x4da)+_0x15c623,'INVALID_INDEX_KEY',{'index':_0x44e0c0,'key':_0x15c623,'keyType':_0x143915}),this[_0x1d4996(0x58f)]=_0x1d4996(0x644);}}class _0x125702 extends _0x30babc{constructor(_0x4783db){const _0x318491=_0x4d7d,_0x31a1ee=typeof _0x4783db;super('Invalid\x20primary\x20key\x20type:\x20'+_0x31a1ee+_0x318491(0x2ae)+_0x4783db,_0x318491(0x3c7),{'key':_0x4783db,'keyType':_0x31a1ee}),this[_0x318491(0x58f)]=_0x318491(0x20a);}}class _0x4441d9 extends _0x30babc{constructor(_0x138346){const _0x6204fb=_0x4d7d;super(_0x6204fb(0x423)+_0x138346+_0x6204fb(0x440),_0x6204fb(0x40e),{'type':_0x138346}),this['name']=_0x6204fb(0x5e0);}}class _0x85ba21 extends _0x30babc{constructor(_0x7abba3){const _0x2123c3=_0x4d7d;super(_0x2123c3(0x423)+_0x7abba3+_0x2123c3(0x29f),_0x2123c3(0x1fc),{'type':_0x7abba3}),this[_0x2123c3(0x58f)]=_0x2123c3(0x5f0);}}class _0x39e97f extends _0x30babc{constructor(_0x1ffd07,_0x10f97c){const _0x5d3849=_0x4d7d;super(_0x5d3849(0x4e5)+_0x10f97c+'\x27\x20on\x20type\x20\x27'+_0x1ffd07+'\x27\x20doesn\x27t\x20exist',_0x5d3849(0x23d),{'type':_0x1ffd07,'index':_0x10f97c}),this['name']=_0x5d3849(0x414);}}class _0x45b9b7 extends _0x30babc{constructor(_0x42ab89,_0x6ec8ad){const _0x2ad2b4=_0x4d7d;super('Index\x20\x27'+_0x6ec8ad+'\x27\x20on\x20type\x20\x27'+_0x42ab89+_0x2ad2b4(0x53c),_0x2ad2b4(0x376),{'type':_0x42ab89,'index':_0x6ec8ad}),this[_0x2ad2b4(0x58f)]='OKDBIndexAlreadyRegisteredError';}}class _0x401f8a extends _0x30babc{constructor(_0x490e9a,_0x2e2bf9={}){const _0x28e2ce=_0x4d7d;super(_0x490e9a,_0x28e2ce(0x57e),_0x2e2bf9),this[_0x28e2ce(0x58f)]=_0x28e2ce(0x1f2);}}class _0x57c96b extends _0x30babc{constructor(_0x21db8f,_0x2fb2ae,_0x27ae6e,_0x172e50,_0x149323){const _0x2523e7=_0x4d7d;super(_0x2523e7(0x2b3)+_0x21db8f+'@'+_0x2fb2ae+_0x2523e7(0x430)+_0x27ae6e+_0x2523e7(0x588)+_0x172e50+_0x2523e7(0x5ba)+_0x149323+'\x27',_0x2523e7(0x51b),{'type':_0x21db8f,'index':_0x2fb2ae,'indexKey':_0x27ae6e,'existingKey':_0x172e50,'conflictingKey':_0x149323}),this[_0x2523e7(0x58f)]='OKDBUniqueConstraintError';}}class _0x3cbe7a extends _0x30babc{constructor(_0x15ee56,_0x137379,_0x14ba99){const _0x142eca=_0x4d7d;super(_0x142eca(0x2ba)+_0x15ee56+'@'+_0x137379,_0x142eca(0x5d1),{'type':_0x15ee56,'key':_0x137379,'errors':_0x14ba99}),this[_0x142eca(0x58f)]='OKDBSchemaValidationError',this[_0x142eca(0x267)]=_0x15ee56,this[_0x142eca(0x505)]=_0x137379,this[_0x142eca(0x4bc)]=_0x14ba99;}}class _0x16c857 extends _0x30babc{constructor(_0x14c7f2,_0xcd711b){const _0x233385=_0x4d7d;super('Cannot\x20set\x20enforce\x20schema\x20on\x20'+_0x14c7f2+':\x20'+_0xcd711b[_0x233385(0x631)]+'\x20documents\x20fail\x20validation',_0x233385(0x2ea),{'type':_0x14c7f2,'failures':_0xcd711b}),this[_0x233385(0x58f)]=_0x233385(0x65d),this['type']=_0x14c7f2,this['failures']=_0xcd711b;}}class _0x14a141 extends _0x30babc{constructor(_0x4e7144,_0x2a1841,_0x5e1161,_0x5b10f0,_0x535574){const _0x20ad13=_0x4d7d;super(_0x20ad13(0x5f4)+_0x4e7144+'@'+_0x2a1841+'.'+_0x5e1161+_0x20ad13(0x3d5)+_0x5b10f0+'@'+_0x535574+_0x20ad13(0x577),_0x20ad13(0x4b9),{'sourceType':_0x4e7144,'sourceKey':_0x2a1841,'fieldPath':_0x5e1161,'targetType':_0x5b10f0,'targetKey':_0x535574}),this['name']=_0x20ad13(0x543),this['sourceType']=_0x4e7144,this[_0x20ad13(0x36f)]=_0x2a1841,this[_0x20ad13(0x4f5)]=_0x5e1161,this[_0x20ad13(0x5a5)]=_0x5b10f0,this[_0x20ad13(0x40a)]=_0x535574;}}class _0x153641 extends _0x30babc{constructor(_0x44cbf1,_0x3e37e8,_0x4cd721){const _0x38dd4f=_0x4d7d;super(_0x38dd4f(0x24d)+_0x44cbf1+'@'+_0x3e37e8+':\x20'+_0x4cd721['length']+_0x38dd4f(0x570),_0x38dd4f(0x69c),{'targetType':_0x44cbf1,'targetKey':_0x3e37e8,'references':_0x4cd721}),this[_0x38dd4f(0x58f)]=_0x38dd4f(0x615),this[_0x38dd4f(0x5a5)]=_0x44cbf1,this[_0x38dd4f(0x40a)]=_0x3e37e8,this[_0x38dd4f(0x67f)]=_0x4cd721;}}class _0x3b8cf3 extends _0x30babc{constructor(_0x4246bd,_0x11ba1f,_0x2ff46e){const _0x417bd7=_0x4d7d;super(_0x417bd7(0x67c)+_0x11ba1f+'\x22\x20on\x20\x22'+_0x4246bd+_0x417bd7(0x2b7)+_0x2ff46e[_0x417bd7(0x272)](_0x424e96=>_0x424e96['kind']+':'+_0x424e96[_0x417bd7(0x58f)])[_0x417bd7(0x553)](',\x20'),_0x417bd7(0x53f),{'type':_0x4246bd,'index':_0x11ba1f,'usedBy':_0x2ff46e}),this['name']='OKDBIndexHasConsumersError';}}return okdbError={'OKDBError':_0x30babc,'OKDBVersionMismatchError':_0x35de5f,'OKDBNotFoundError':_0x5623d8,'OKDBAlreadyExistsError':_0x34b1ea,'OKDBInvalidIndexKeyError':_0x3feada,'OKDBInvalidPrimaryKeyError':_0x125702,'OKDBTypeNotRegisteredError':_0x4441d9,'OKDBTypeAlreadyRegisteredError':_0x85ba21,'OKDBIndexNotRegisteredError':_0x39e97f,'OKDBIndexAlreadyRegisteredError':_0x45b9b7,'OKDBInvalidValueError':_0x401f8a,'OKDBUniqueConstraintError':_0x57c96b,'OKDBSchemaValidationError':_0x3cbe7a,'OKDBSchemaCollectionError':_0x16c857,'OKDBForeignKeyError':_0x14a141,'OKDBForeignKeyDeleteError':_0x153641,'OKDBIndexHasConsumersError':_0x3b8cf3},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x2875c9=_0x42e206;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x3a8177={'PUT':'put','REMOVE':_0x2875c9(0x576),'INDEX_DROP':_0x2875c9(0x609),'INDEX_REGISTER':_0x2875c9(0x54f),'INDEX_RESET':'resetIndex','TYPE_REGISTER':_0x2875c9(0x206),'TYPE_DROP':_0x2875c9(0x44f),'FTS_REGISTER':_0x2875c9(0x31b),'FTS_DROP':_0x2875c9(0x6ad),'FTS_RESET':_0x2875c9(0x232),'SCHEMA_SET':'setSchema','SCHEMA_DROP':_0x2875c9(0x4aa),'TTL_SET':_0x2875c9(0x51d),'TTL_CLEAR':_0x2875c9(0x388)},_0x10c418={'SYSTEM_READY':_0x2875c9(0x1e5),'SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':_0x2875c9(0x37a),'SYSTEM_POKE':_0x2875c9(0x4fb),'SYSTEM_DRAIN':_0x2875c9(0x674),'SYSTEM_TYPE_DROP':'system:type_drop','SYSTEM_PROC':_0x2875c9(0x658),'SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':'item:create','ITEM_UPDATE':_0x2875c9(0x2b6),'ITEM_REMOVE':_0x2875c9(0x457),'INDEX_RESET':'index:reset','INDEX_READY':_0x2875c9(0x374),'INDEX_PROGRESS':_0x2875c9(0x4e4),'VIEW_PROGRESS':_0x2875c9(0x5b7),'INDEX_DROP':'index:drop','INDEX_REGISTERED':_0x2875c9(0x35b),'FTS_REGISTERED':_0x2875c9(0x656),'FTS_DROP':_0x2875c9(0x597),'FTS_RESET':_0x2875c9(0x326),'SCHEMA_SET':_0x2875c9(0x3bf),'SCHEMA_DROP':_0x2875c9(0x52d),'UNIQUE_VIOLATION':_0x2875c9(0x533),'UNIQUE_VIOLATION_RESOLVED':_0x2875c9(0x692),'REF_VIOLATION':_0x2875c9(0x6a1),'REF_VIOLATION_RESOLVED':_0x2875c9(0x34f),'SYNC_APPLY':_0x2875c9(0x2cb),'TXN_START':_0x2875c9(0x1f8),'TXN_END':'txn:end','TXN_ROLLBACK':'txn:rollback','TYPE_REGISTERED':_0x2875c9(0x2b5),'TYPE_DROP':_0x2875c9(0x237),'ENV_OPENED':_0x2875c9(0x4d3),'ENV_REMOVED':_0x2875c9(0x262),'SYSTEM_ENV_RELEASE':_0x2875c9(0x359),'TTL_EXPIRED':_0x2875c9(0x44c),'TTL_SET':_0x2875c9(0x3ad),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':'license:invalid','LICENSE_ADDED':_0x2875c9(0x28f),'LICENSE_ACTIVATED':_0x2875c9(0x64c),'LICENSE_REMOVED':'license:removed'},_0x5e2783={'CREATING':'creating','RESETTING':_0x2875c9(0x60a),'READY':_0x2875c9(0x487),'DROPPING':_0x2875c9(0x319),'WAITING':_0x2875c9(0x680)},_0x5f1518={'CREATED':_0x2875c9(0x55b),'STARTING':_0x2875c9(0x5e8),'STARTED':_0x2875c9(0x6a6),'STOPPING':'stopping','STOPPED':'stopped'},_0x51846d={'CREATING':'creating','READY':'ready','HALTED':_0x2875c9(0x203),'STOPPED':_0x2875c9(0x4cb),'RESETTING':_0x2875c9(0x60a)},_0x195d81=Object['freeze']({'POKE':_0x2875c9(0x604),'DRAIN':_0x2875c9(0x22a),'TYPE_DROP':_0x2875c9(0x5b5),'PROC':_0x2875c9(0x636),'ENV_RELEASE':_0x2875c9(0x330)});return okdbEnums={'BUS_EVENTS':_0x195d81,'CHANGE_ACTIONS':_0x3a8177,'EVENTS':_0x10c418,'INDEX_STATE':_0x5e2783,'OKDB_STATE':_0x5f1518,'VIEW_STATE':_0x51846d},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x2f3162=_0x42e206;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x8afb68=require$$1$1,_0x50fcfd=require$$1,_0x24b7c0=require$$0$1,_0x4db096=_0x8afb68[_0x2f3162(0x2bd)](_0x50fcfd[_0x2f3162(0x553)](__dirname,_0x2f3162(0x2e7)),_0x2f3162(0x5a6))[_0x2f3162(0x215)](),_0x4ca098=_0x24b7c0['createPublicKey'](_0x4db096)[_0x2f3162(0x5eb)]({'type':_0x2f3162(0x425),'format':_0x2f3162(0x422)}),_0x634931=_0x24b7c0[_0x2f3162(0x4a7)](_0x2f3162(0x42e))[_0x2f3162(0x42b)](_0x4ca098)[_0x2f3162(0x537)](_0x2f3162(0x627))[_0x2f3162(0x608)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x4db096,'PUB_FINGERPRINT':_0x634931},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x5a5fca=_0x42e206;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x1570b2=require$$0$1,{OKDBError:_0x5a5abe}=requireOkdbError(),{EVENTS:_0x3fe5c8}=requireOkdbEnums(),_0x30343e=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0xe475a2,LICENSE_TYPE_INTERNAL:_0x5a6c95,OPEN_LICENSE_MAX_DURATION_MS:_0x140483}=_0x30343e,_0x1fe4b7=requireOkdbPubkey(),_0x24917c={'LICENSED_BUILD':_0x5a5fca(0x21f),'PUBLIC_KEY_PEM':_0x1fe4b7[_0x5a5fca(0x34c)],'PUB_FINGERPRINT':_0x1fe4b7[_0x5a5fca(0x2db)],'LICENSE_EXPIRED_ACTION':_0x5a5fca(0x6a0)},_0x397aae='~licenses',_0x549c15={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x97be83(_0x5b9627){const _0x150826=_0x5a5fca;!_0x5b9627[_0x150826(0x63e)](_0x397aae)&&await _0x5b9627[_0x150826(0x206)](_0x397aae);}class _0x12c1b9{constructor(_0x27e03b){const _0x3cd48d=_0x5a5fca;this[_0x3cd48d(0x209)]=_0x27e03b,this[_0x3cd48d(0x28d)]=null;}async[_0x5a5fca(0x205)](){const _0x5d76ab=_0x5a5fca,_0x2684f6=this[_0x5d76ab(0x209)][_0x5d76ab(0x2b9)];if(!_0x2684f6||!_0x2684f6['hasType'](_0x397aae)){this[_0x5d76ab(0x28d)]=null;return;}const _0x4230a6=this[_0x5d76ab(0x209)]['id'];let _0x2d077f=null;for(const {key:_0x2b0fc3,value:_0x24c3f2}of _0x2684f6['getRange'](_0x397aae)){const _0x37a669=this[_0x5d76ab(0x37e)](_0x24c3f2,_0x4230a6);_0x37a669===_0x5d76ab(0x6a7)&&!_0x2d077f&&(_0x2d077f={..._0x24c3f2,'id':_0x2b0fc3,'status':_0x37a669});}this['_active']=_0x2d077f;if(this[_0x5d76ab(0x28d)]&&this[_0x5d76ab(0x28d)]['licenseType']===_0xe475a2){const _0xfc79e4=Math[_0x5d76ab(0x651)]((this[_0x5d76ab(0x28d)][_0x5d76ab(0x5f5)]-Date['now']())/0x5265c00);this[_0x5d76ab(0x209)]['log']?.[_0x5d76ab(0x316)](_0x5d76ab(0x5b9)+_0xfc79e4+_0x5d76ab(0x364),{'feature':_0x5d76ab(0x514),'licensee':this[_0x5d76ab(0x28d)][_0x5d76ab(0x3a9)],'expiresAt':new Date(this[_0x5d76ab(0x28d)]['expiresAt'])[_0x5d76ab(0x5ac)]()});}this[_0x5d76ab(0x28d)]&&this[_0x5d76ab(0x28d)][_0x5d76ab(0x386)]===_0x5a6c95&&this[_0x5d76ab(0x209)][_0x5d76ab(0x6a0)]?.[_0x5d76ab(0x316)](_0x5d76ab(0x371),{'feature':_0x5d76ab(0x514),'licensee':this[_0x5d76ab(0x28d)][_0x5d76ab(0x3a9)]});}['_computeStatus'](_0x1663b4,_0x33a073){const _0x6c7ef7=_0x5a5fca;if(!_0x1663b4[_0x6c7ef7(0x216)])return _0x6c7ef7(0x66e);let _0x471f67;try{_0x471f67=_0x30343e[_0x6c7ef7(0x390)](_0x1663b4[_0x6c7ef7(0x216)]);}catch(_0x538678){return _0x6c7ef7(0x66e);}try{const _0x4c7eb9=_0x1570b2['verify'](null,_0x471f67[_0x6c7ef7(0x223)],_0x24917c[_0x6c7ef7(0x34c)],_0x471f67['sig']);if(!_0x4c7eb9)return _0x6c7ef7(0x66e);}catch(_0x3e57a5){return _0x6c7ef7(0x66e);}if(_0x471f67[_0x6c7ef7(0x327)][_0x6c7ef7(0x386)]===_0x5a6c95)return _0x6c7ef7(0x6a7);if(_0x471f67[_0x6c7ef7(0x327)][_0x6c7ef7(0x5f5)]<=Date[_0x6c7ef7(0x4ea)]())return _0x6c7ef7(0x38f);if(_0x471f67['decoded'][_0x6c7ef7(0x386)]===_0xe475a2)return _0x6c7ef7(0x6a7);if(!_0x1663b4[_0x6c7ef7(0x64b)])return _0x6c7ef7(0x2b8);const _0xb1abaa=_0x30343e['verifyActivation']({'tokenString':_0x1663b4[_0x6c7ef7(0x64b)],'nodeId':_0x33a073,'rawBlobBuf':_0x471f67['rawBuf'],'pubKeyPem':_0x24917c[_0x6c7ef7(0x34c)],'pubFingerprint':_0x24917c[_0x6c7ef7(0x2db)]});if(_0xb1abaa['reason']===_0x6c7ef7(0x200)||_0xb1abaa[_0x6c7ef7(0x328)]==='SIG_INVALID')return'wrong_node';if(_0xb1abaa['reason']===_0x6c7ef7(0x3ea))return'expired';if(!_0xb1abaa[_0x6c7ef7(0x435)])return'wrong_node';return _0x6c7ef7(0x6a7);}get['active'](){const _0xecfdde=_0x5a5fca;return this[_0xecfdde(0x28d)];}get['effective'](){const _0x293393=_0x5a5fca;return this[_0x293393(0x28d)]??_0x549c15;}[_0x5a5fca(0x45d)](_0x3edd86){const _0x1e26c3=_0x5a5fca;if(_0x24917c[_0x1e26c3(0x635)]!==_0x1e26c3(0x21f))return;const _0x381db4=this[_0x1e26c3(0x64f)];if(!_0x381db4[_0x1e26c3(0x421)]?.[_0x3edd86]){const _0x3580f0=_0x381db4['_isFree']?_0x1e26c3(0x235)+_0x3edd86+'.\x20Add\x20a\x20license\x20that\x20includes\x20\x22'+_0x3edd86+_0x1e26c3(0x4e8):_0x1e26c3(0x5d9)+_0x3edd86+_0x1e26c3(0x308)+_0x3edd86+'\x22.';throw new _0x5a5abe(_0x3580f0,_0x1e26c3(0x2dc),{'feature':_0x3edd86});}}[_0x5a5fca(0x287)](_0x23d0b0){const _0xd93ecb=_0x5a5fca;if(_0x24917c['LICENSED_BUILD']!==_0xd93ecb(0x21f))return!![];return!!this[_0xd93ecb(0x64f)][_0xd93ecb(0x421)]?.[_0x23d0b0];}[_0x5a5fca(0x2c6)](_0xf5b6c3,_0x4f61ba){const _0x461d2a=_0x5a5fca;if(_0x24917c['LICENSED_BUILD']!==_0x461d2a(0x21f))return;const _0x5a37dc=this[_0x461d2a(0x64f)],_0x495b28=_0x5a37dc['limits']?.[_0xf5b6c3];if(_0x495b28===null||_0x495b28===undefined||_0x495b28===0x0)return;if(_0x4f61ba>=_0x495b28)throw new _0x5a5abe('License\x20limit\x20exceeded:\x20'+_0xf5b6c3+'\x20('+_0x4f61ba+'/'+_0x495b28+')',_0x461d2a(0x61d),{'limit':_0xf5b6c3,'current':_0x4f61ba,'max':_0x495b28});}async[_0x5a5fca(0x2bf)](_0x2989be){const _0x55127a=_0x5a5fca;let _0x30f333;try{_0x30f333=_0x30343e[_0x55127a(0x390)](_0x2989be);}catch(_0x36490c){throw new _0x5a5abe('Invalid\x20license\x20blob:\x20'+_0x36490c[_0x55127a(0x62d)],_0x55127a(0x53e));}let _0x4eb028;try{_0x4eb028=_0x1570b2['verify'](null,_0x30f333['payload'],_0x24917c[_0x55127a(0x34c)],_0x30f333[_0x55127a(0x35a)]);}catch(_0x20ee3e){throw new _0x5a5abe('License\x20signature\x20invalid:\x20'+_0x20ee3e[_0x55127a(0x62d)],_0x55127a(0x53e));}if(!_0x4eb028)throw new _0x5a5abe(_0x55127a(0x6a4)+(_0x55127a(0x268)+_0x24917c['PUB_FINGERPRINT']+'.\x20')+_0x55127a(0x3ae),_0x55127a(0x53e),{'expectedFingerprint':_0x24917c['PUB_FINGERPRINT']});if(_0x30f333[_0x55127a(0x327)][_0x55127a(0x386)]===_0xe475a2){const _0x31c8e5=_0x30f333[_0x55127a(0x327)][_0x55127a(0x5f5)]-_0x30f333[_0x55127a(0x327)][_0x55127a(0x48e)];if(_0x31c8e5>_0x140483)throw new _0x5a5abe(_0x55127a(0x254)+Math['ceil'](_0x31c8e5/(0x1e*0x5265c00))+_0x55127a(0x624),'LICENSE_INVALID');}const _0x5f3b62=this[_0x55127a(0x209)][_0x55127a(0x2b9)];await _0x97be83(_0x5f3b62);const _0x1cfb23=_0x30343e[_0x55127a(0x380)](_0x30f333['rawBuf'])[_0x55127a(0x1f0)](_0x55127a(0x627));for(const {value:_0x15823c}of _0x5f3b62[_0x55127a(0x698)](_0x397aae)){if(_0x15823c[_0x55127a(0x4e2)]===_0x1cfb23)throw new _0x5a5abe(_0x55127a(0x311),_0x55127a(0x53e));}const _0x23ca0f=_0x1570b2[_0x55127a(0x60c)](),_0x5d2f09={'blob':_0x2989be,'activation':null,'addedAt':Date[_0x55127a(0x4ea)](),'_licenseHash':_0x1cfb23,'licensee':_0x30f333[_0x55127a(0x327)][_0x55127a(0x3a9)],'expiresAt':_0x30f333[_0x55127a(0x327)][_0x55127a(0x5f5)],'features':_0x30f333['decoded'][_0x55127a(0x421)],'limits':_0x30f333[_0x55127a(0x327)][_0x55127a(0x572)],'licenseType':_0x30f333['decoded']['licenseType']};return await _0x5f3b62[_0x55127a(0x473)](_0x397aae,_0x23ca0f,_0x5d2f09),{'id':_0x23ca0f,..._0x5d2f09};}async[_0x5a5fca(0x458)](_0x48980f){const _0x483886=_0x5a5fca;let _0x1a5038;try{_0x1a5038=_0x30343e['decodeActivationToken'](_0x48980f);}catch(_0x33dccb){throw new _0x5a5abe(_0x483886(0x3d2)+_0x33dccb[_0x483886(0x62d)],_0x483886(0x2eb));}const _0x3649ca=_0x1a5038[_0x483886(0x380)][_0x483886(0x1f0)](_0x483886(0x627)),_0x1817e8=this[_0x483886(0x209)]['_systemEnv'];if(!_0x1817e8||!_0x1817e8['hasType'](_0x397aae))throw new _0x5a5abe(_0x483886(0x3e2),_0x483886(0x2eb));let _0xeffe3f=null,_0x1b5ad0=null;for(const {key:_0x3868d5,value:_0x577f65}of _0x1817e8[_0x483886(0x698)](_0x397aae)){if(_0x577f65['_licenseHash']===_0x3649ca){_0xeffe3f=_0x3868d5,_0x1b5ad0=_0x577f65;break;}}if(!_0xeffe3f)throw new _0x5a5abe(_0x483886(0x3e2),_0x483886(0x2eb));const {rawBuf:_0x33e2a8}=_0x30343e[_0x483886(0x390)](_0x1b5ad0['blob']),_0x1530bb=_0x30343e[_0x483886(0x424)]({'tokenString':_0x48980f,'nodeId':this[_0x483886(0x209)]['id'],'rawBlobBuf':_0x33e2a8,'pubKeyPem':_0x24917c[_0x483886(0x34c)],'pubFingerprint':_0x24917c['PUB_FINGERPRINT']});if(!_0x1530bb[_0x483886(0x435)])throw new _0x5a5abe(_0x483886(0x516)+_0x1530bb['reason'],_0x483886(0x2eb),{'reason':_0x1530bb[_0x483886(0x328)]});const _0x39396e={..._0x1b5ad0,'activation':_0x48980f};return await _0x1817e8['update'](_0x397aae,_0xeffe3f,_0x39396e),{'id':_0xeffe3f,..._0x39396e};}async['removeLicense'](_0x571340){const _0x110a9a=_0x5a5fca,_0x4ee942=this[_0x110a9a(0x209)][_0x110a9a(0x2b9)];if(!_0x4ee942||!_0x4ee942[_0x110a9a(0x63e)](_0x397aae))return;await _0x4ee942[_0x110a9a(0x576)](_0x397aae,_0x571340);}async[_0x5a5fca(0x697)](){const _0x5044b5=_0x5a5fca,_0x4fd2c9=this[_0x5044b5(0x209)][_0x5044b5(0x2b9)];if(!_0x4fd2c9||!_0x4fd2c9['hasType'](_0x397aae))return[];const _0x5178b6=this[_0x5044b5(0x209)]['id'],_0x1d5de9=[];for(const {key:_0x56e6b1,value:_0x5465fe}of _0x4fd2c9[_0x5044b5(0x698)](_0x397aae)){const _0x2af397=this[_0x5044b5(0x37e)](_0x5465fe,_0x5178b6);_0x1d5de9[_0x5044b5(0x5fa)]({..._0x5465fe,'id':_0x56e6b1,'status':_0x2af397});}return _0x1d5de9;}[_0x5a5fca(0x4d4)](){const _0x92e4c=_0x5a5fca,_0x3c47e4=this[_0x92e4c(0x209)]['_systemEnv'];if(!_0x3c47e4||!_0x3c47e4[_0x92e4c(0x63e)](_0x397aae))return[];const _0x4b2ad9=this[_0x92e4c(0x209)]['id'],_0x33583a=[];for(const {key:_0x2cde9b,value:_0x413941}of _0x3c47e4[_0x92e4c(0x698)](_0x397aae)){if(_0x413941['_licenseHash']){if(_0x413941[_0x92e4c(0x386)]===_0xe475a2)_0x33583a[_0x92e4c(0x5fa)]({'licenseId':_0x2cde9b,'pin':null});else{const _0x2caf2d=Buffer[_0x92e4c(0x2b0)](_0x413941[_0x92e4c(0x4e2)],'hex'),{pin:_0x4dc4e5}=_0x30343e[_0x92e4c(0x5fd)](_0x4b2ad9,_0x2caf2d,_0x24917c['PUB_FINGERPRINT']);_0x33583a[_0x92e4c(0x5fa)]({'licenseId':_0x2cde9b,'pin':_0x4dc4e5});}}}return _0x33583a;}async[_0x5a5fca(0x26e)](){const _0x405c8d=_0x5a5fca,_0x14b6c3=this['_active'];await this[_0x405c8d(0x205)]();if(this['_active']&&this[_0x405c8d(0x28d)]['licenseType']===_0xe475a2){const _0x36cc1e=Math['ceil']((this['_active'][_0x405c8d(0x5f5)]-Date['now']())/0x5265c00);this[_0x405c8d(0x209)]['log']?.[_0x405c8d(0x316)]('⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20'+_0x36cc1e+'\x20day(s).',{'feature':_0x405c8d(0x514),'licensee':this[_0x405c8d(0x28d)][_0x405c8d(0x3a9)],'expiresAt':new Date(this[_0x405c8d(0x28d)][_0x405c8d(0x5f5)])[_0x405c8d(0x5ac)]()});}this['_active']&&this[_0x405c8d(0x28d)][_0x405c8d(0x386)]===_0x5a6c95&&this[_0x405c8d(0x209)][_0x405c8d(0x6a0)]?.['warn']('⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.',{'feature':'license','licensee':this[_0x405c8d(0x28d)][_0x405c8d(0x3a9)]});if(_0x14b6c3&&!this[_0x405c8d(0x28d)]){this[_0x405c8d(0x209)]['log']?.[_0x405c8d(0x316)](_0x405c8d(0x45f),{'feature':'license'}),this[_0x405c8d(0x209)]['events']?.[_0x405c8d(0x47c)](_0x3fe5c8[_0x405c8d(0x53e)],{'previous':_0x14b6c3});const _0x394c7c=this[_0x405c8d(0x209)]['options']?.[_0x405c8d(0x419)]??_0x24917c['LICENSE_EXPIRED_ACTION'];_0x394c7c==='shutdown'&&(this[_0x405c8d(0x209)][_0x405c8d(0x6a0)]?.[_0x405c8d(0x2e5)]('Shutting\x20down\x20due\x20to\x20license\x20expiry',{'feature':_0x405c8d(0x514)}),this[_0x405c8d(0x209)][_0x405c8d(0x519)]()[_0x405c8d(0x45b)](()=>{})['finally'](()=>process[_0x405c8d(0x234)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x12c1b9,'_C':_0x24917c},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x1d7d3b=_0x42e206;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x4e0420=require$$0$3,_0x1b3471=require$$1$1,_0x504cdc=require$$0,_0x54d959=require$$1,_0x35cdc1=_0x54d959[_0x1d7d3b(0x553)](_0x504cdc[_0x1d7d3b(0x21e)](),_0x1d7d3b(0x54c)),_0x53d0b0=0x3e8,_0x277272={'reset':_0x1d7d3b(0x528),'bold':_0x1d7d3b(0x5f8),'dim':'\x1b[2m','red':_0x1d7d3b(0x5b8),'green':_0x1d7d3b(0x581),'yellow':'\x1b[33m','blue':'\x1b[34m','magenta':_0x1d7d3b(0x246),'cyan':_0x1d7d3b(0x66c),'white':_0x1d7d3b(0x3a5),'gray':_0x1d7d3b(0x253)},_0x5dde43=!process[_0x1d7d3b(0x445)]['isTTY']||!!process.env.NO_COLOR,_0x1e379c=(_0x28da6d,_0x59797a)=>_0x5dde43?_0x59797a:''+_0x28da6d+_0x59797a+_0x277272[_0x1d7d3b(0x653)],_0x2e5ff4={'error':_0x277272['red'],'warn':_0x277272[_0x1d7d3b(0x5a9)],'info':_0x277272['cyan'],'debug':_0x277272[_0x1d7d3b(0x2fe)]},_0x2f6c53={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0xeec79e(_0x468fde,_0x252349=_0x1d7d3b(0x2ee)){const _0x24a1bf=_0x1d7d3b,{level:_0x1aea21,msg:_0x398293,meta:_0x2dbd03,context:_0x443307,ts:_0x59b841}=_0x468fde;if((_0x2f6c53[_0x1aea21]??0x1)<(_0x2f6c53[_0x252349]??0x1))return;const _0x135b87=_0x1e379c(_0x277272['gray'],new Date(_0x59b841)['toISOString']()),_0x5ebc7f=_0x1e379c(_0x2e5ff4[_0x1aea21]??_0x277272[_0x24a1bf(0x466)],_0x1aea21[_0x24a1bf(0x5d4)](0x5));let _0x1ab342='\x20\x20'+_0x135b87+'\x20'+_0x1e379c(_0x277272[_0x24a1bf(0x4ac)],_0x5ebc7f)+'\x20'+_0x398293;if(_0x2dbd03&&Object[_0x24a1bf(0x5cf)](_0x2dbd03)[_0x24a1bf(0x631)]>0x0){const _0x10e7ac=Object['entries'](_0x2dbd03)[_0x24a1bf(0x272)](([_0x435765,_0x5b6577])=>_0x435765+'='+_0x5b6577)['join']('\x20');_0x1ab342+=_0x1e379c(_0x277272[_0x24a1bf(0x4f1)],_0x24a1bf(0x4f3)+_0x10e7ac+']');}if(_0x443307!==undefined){const _0x553611=typeof _0x443307==='object'?JSON[_0x24a1bf(0x621)](_0x443307):String(_0x443307);_0x1ab342+=_0x1e379c(_0x277272[_0x24a1bf(0x4f1)],'\x20\x20'+_0x553611);}const _0x12133c=_0x1aea21==='error'||_0x1aea21===_0x24a1bf(0x316)?process[_0x24a1bf(0x434)][_0x24a1bf(0x2d0)][_0x24a1bf(0x29e)](process[_0x24a1bf(0x434)]):process[_0x24a1bf(0x445)][_0x24a1bf(0x2d0)][_0x24a1bf(0x29e)](process[_0x24a1bf(0x445)]);_0x12133c(_0x1ab342+'\x0a');}function _0x587774(_0x42ae59,_0x5292eb){const _0x5656bc=_0x1d7d3b;if(_0x42ae59===0xcc||_0x42ae59>=0xc8&&_0x42ae59<0x12c&&!_0x5292eb){console[_0x5656bc(0x6a0)](_0x5656bc(0x657)+_0x1e379c(_0x277272[_0x5656bc(0x387)],'✓')+'\x0a');return;}if(_0x42ae59>=0x190||_0x5292eb?.[_0x5656bc(0x2e5)]){const _0x2d2d7d=_0x5292eb?.[_0x5656bc(0x2e5)]??_0x5292eb?.['message']??_0x5656bc(0x3e1)+_0x42ae59;console['log'](_0x5656bc(0x657)+_0x1e379c(_0x277272[_0x5656bc(0x4d2)],'✗')+'\x20'+_0x1e379c(_0x277272[_0x5656bc(0x4ac)]+_0x277272[_0x5656bc(0x4d2)],String(_0x42ae59))+'\x20\x20'+_0x2d2d7d+'\x0a');return;}const _0x2a140e=Object[_0x5656bc(0x2f3)]['hasOwnProperty'][_0x5656bc(0x393)](_0x5292eb??{},'result')?_0x5292eb[_0x5656bc(0x4f8)]:_0x5292eb,_0x1187b7=_0x5292eb?.[_0x5656bc(0x208)];console['log'](''),_0x1620b3(_0x2a140e,'\x20\x20');if(_0x1187b7?.['count']!=null||_0x1187b7?.['time']!=null){const _0x452cb6=[];if(_0x1187b7['count']!=null)_0x452cb6['push'](_0x1187b7['count']+_0x5656bc(0x53b)+(_0x1187b7[_0x5656bc(0x2d8)]!==0x1?'s':''));if(_0x1187b7[_0x5656bc(0x5de)]!=null)_0x452cb6[_0x5656bc(0x5fa)](_0x1187b7[_0x5656bc(0x5de)]+'ms');console[_0x5656bc(0x6a0)](_0x5656bc(0x657)+_0x1e379c(_0x277272[_0x5656bc(0x4f1)],_0x452cb6[_0x5656bc(0x553)]('\x20\x20·\x20\x20')));}console['log']('');}function _0x1620b3(_0x334936,_0x4b1171=''){const _0x3bb119=_0x1d7d3b;if(_0x334936===null||_0x334936===undefined){console[_0x3bb119(0x6a0)](_0x4b1171+_0x1e379c(_0x277272[_0x3bb119(0x4f1)],_0x3bb119(0x2a9)));return;}if(Array[_0x3bb119(0x59a)](_0x334936)){if(_0x334936[_0x3bb119(0x631)]===0x0){console[_0x3bb119(0x6a0)](_0x4b1171+_0x1e379c(_0x277272[_0x3bb119(0x4f1)],_0x3bb119(0x33b)));return;}if(_0x334936[_0x3bb119(0x69e)](_0x2103e7=>_0x2103e7&&typeof _0x2103e7===_0x3bb119(0x5c0)&&_0x3bb119(0x505)in _0x2103e7&&_0x3bb119(0x52e)in _0x2103e7)){_0x4fa610(_0x334936,_0x4b1171);return;}if(_0x334936[_0x3bb119(0x69e)](_0x4a0c8a=>_0x4a0c8a&&typeof _0x4a0c8a===_0x3bb119(0x5c0)&&_0x3bb119(0x267)in _0x4a0c8a&&_0x3bb119(0x2d8)in _0x4a0c8a)){_0x361baa(_0x334936,_0x4b1171);return;}if(_0x334936[_0x3bb119(0x69e)](_0x1e4b6e=>typeof _0x1e4b6e!==_0x3bb119(0x5c0)||_0x1e4b6e===null)){_0x334936[_0x3bb119(0x573)]((_0x175603,_0x4a1e39)=>console[_0x3bb119(0x6a0)](_0x4b1171+_0x1e379c(_0x277272['gray'],_0x4a1e39+0x1+'.')+'\x20'+_0x1e379c(_0x277272[_0x3bb119(0x466)],String(_0x175603))));return;}_0x334936[_0x3bb119(0x573)]((_0x57279a,_0x1545eb)=>{const _0xd1c9c2=_0x3bb119;console[_0xd1c9c2(0x6a0)](_0x4b1171+_0x1e379c(_0x277272[_0xd1c9c2(0x4f1)],'['+_0x1545eb+']'));if(typeof _0x57279a==='object'&&_0x57279a!==null)_0x18be6f(_0x57279a,_0x4b1171+'\x20\x20');else console[_0xd1c9c2(0x6a0)](_0x4b1171+'\x20\x20'+String(_0x57279a));});return;}if(typeof _0x334936===_0x3bb119(0x5c0)){if(_0x3bb119(0x505)in _0x334936&&_0x3bb119(0x52e)in _0x334936&&Object['keys'](_0x334936)[_0x3bb119(0x631)]<=0x3){console[_0x3bb119(0x6a0)](_0x4b1171+_0x1e379c(_0x277272[_0x3bb119(0x4ac)]+_0x277272[_0x3bb119(0x480)],String(_0x334936['key'])));const _0x18396e=_0x334936[_0x3bb119(0x52e)];if(_0x18396e&&typeof _0x18396e===_0x3bb119(0x5c0))_0x18be6f(_0x18396e,_0x4b1171);else console['log'](_0x4b1171+_0x1e379c(_0x277272['white'],String(_0x18396e)));return;}_0x18be6f(_0x334936,_0x4b1171);return;}console['log'](_0x4b1171+_0x1e379c(_0x277272[_0x3bb119(0x466)],String(_0x334936)));}function _0x18be6f(_0xcc9da0,_0x41167d=''){const _0x426a3e=_0x1d7d3b,_0x4d4a84=Object['entries'](_0xcc9da0);if(_0x4d4a84[_0x426a3e(0x631)]===0x0){console[_0x426a3e(0x6a0)](_0x41167d+_0x1e379c(_0x277272['dim'],'{}'));return;}const _0x137a76=Math['min'](0x1c,Math[_0x426a3e(0x555)](..._0x4d4a84[_0x426a3e(0x272)](([_0x5a9d89])=>_0x5a9d89[_0x426a3e(0x631)])));for(const [_0x36e852,_0x20ecd8]of _0x4d4a84){const _0xf740ed=_0x1e379c(_0x277272[_0x426a3e(0x480)],_0x36e852[_0x426a3e(0x5d4)](_0x137a76));if(_0x20ecd8===null||_0x20ecd8===undefined)console[_0x426a3e(0x6a0)](_0x41167d+_0xf740ed+'\x20\x20'+_0x1e379c(_0x277272[_0x426a3e(0x4f1)],_0x426a3e(0x2c8)));else{if(typeof _0x20ecd8===_0x426a3e(0x5c0)){const _0x20f887=JSON['stringify'](_0x20ecd8);_0x20f887['length']<=0x50?console[_0x426a3e(0x6a0)](_0x41167d+_0xf740ed+'\x20\x20'+_0x1e379c(_0x277272[_0x426a3e(0x4f1)],_0x20f887)):(console['log'](_0x41167d+_0xf740ed),_0x1620b3(_0x20ecd8,_0x41167d+'\x20\x20'));}else{const _0x22df2a=typeof _0x20ecd8===_0x426a3e(0x64e)?_0x1e379c(_0x20ecd8?_0x277272[_0x426a3e(0x387)]:_0x277272[_0x426a3e(0x5a9)],String(_0x20ecd8)):typeof _0x20ecd8===_0x426a3e(0x68f)?_0x1e379c(_0x277272[_0x426a3e(0x4d9)],String(_0x20ecd8)):_0x1e379c(_0x277272[_0x426a3e(0x466)],String(_0x20ecd8));console['log'](_0x41167d+_0xf740ed+'\x20\x20'+_0x22df2a);}}}}function _0x4fa610(_0x364b40,_0x366ee4=''){const _0xfff7dd=_0x1d7d3b,_0x3c37f9=Math[_0xfff7dd(0x368)](0x20,Math[_0xfff7dd(0x555)](..._0x364b40[_0xfff7dd(0x272)](_0x70078d=>String(_0x70078d[_0xfff7dd(0x505)])['length'])));for(const {key:_0x325f5a,value:_0x1c1aec,score:_0x9471b3,clock:_0x5ba337}of _0x364b40){const _0x16b06c=_0x1e379c(_0x277272[_0xfff7dd(0x4ac)]+_0x277272[_0xfff7dd(0x480)],String(_0x325f5a)['padEnd'](_0x3c37f9)),_0x1c9025=_0x1c1aec==null?_0x1e379c(_0x277272[_0xfff7dd(0x4f1)],'null'):typeof _0x1c1aec==='object'?_0x1e379c(_0x277272['dim'],JSON[_0xfff7dd(0x621)](_0x1c1aec)):_0x1e379c(_0x277272['white'],String(_0x1c1aec)),_0x31fb0a=_0x9471b3!=null?_0x1e379c(_0x277272[_0xfff7dd(0x2fe)],'\x20\x20score:'+_0x9471b3['toFixed'](0x4)):'',_0x58c25d=_0x5ba337!=null?_0x1e379c(_0x277272[_0xfff7dd(0x2fe)],_0xfff7dd(0x432)+_0x5ba337):'';console['log'](_0x366ee4+_0x16b06c+'\x20\x20'+_0x1c9025+_0x31fb0a+_0x58c25d);}}function _0x361baa(_0x213f79,_0x1bd492=''){const _0x84e0b1=_0x1d7d3b,_0x1f6fd1=Math[_0x84e0b1(0x368)](0x20,Math['max'](..._0x213f79[_0x84e0b1(0x272)](_0x54d9ab=>_0x54d9ab[_0x84e0b1(0x267)][_0x84e0b1(0x631)])));for(const {type:_0xec9930,count:_0x214563,fields:_0x139075}of _0x213f79){if(_0xec9930[_0x84e0b1(0x39c)]('~'))continue;const _0x3a0c90=_0x1e379c(_0x277272[_0x84e0b1(0x4ac)]+_0x277272['cyan'],_0xec9930[_0x84e0b1(0x5d4)](_0x1f6fd1)),_0x4b8293=_0x1e379c(_0x277272['magenta'],String(_0x214563)['padStart'](0x6))+_0x1e379c(_0x277272[_0x84e0b1(0x4f1)],_0x84e0b1(0x46f)),_0x34b031=_0x139075&&Object[_0x84e0b1(0x5cf)](_0x139075)['length']?_0x1e379c(_0x277272[_0x84e0b1(0x4f1)],_0x84e0b1(0x273)+Object[_0x84e0b1(0x5cf)](_0x139075)[_0x84e0b1(0x608)](0x0,0x6)[_0x84e0b1(0x553)](',\x20')+(Object[_0x84e0b1(0x5cf)](_0x139075)[_0x84e0b1(0x631)]>0x6?'…':'')):'';console[_0x84e0b1(0x6a0)](_0x1bd492+_0x3a0c90+'\x20\x20'+_0x4b8293+_0x34b031);}}const _0x4543da=[_0x1d7d3b(0x1e6),_0x1d7d3b(0x40c),'queue/',_0x1d7d3b(0x4c7),_0x1d7d3b(0x510),'processors/'];function _0x3bdcf7(_0x144d01,_0x380f8c){const _0x240dc2=_0x1d7d3b;if(_0x144d01[_0x240dc2(0x39c)]('/api/'))return _0x144d01;if(_0x144d01[_0x240dc2(0x39c)]('/'))return _0x240dc2(0x69d)+_0x144d01;if(_0x144d01[_0x240dc2(0x39c)](_0x240dc2(0x5a2)))return _0x240dc2(0x2e4)+_0x144d01;const _0x2d2dae=_0x4543da['some'](_0x5ebd80=>_0x144d01===_0x5ebd80[_0x240dc2(0x2aa)](/\/$/,'')||_0x144d01[_0x240dc2(0x39c)](_0x5ebd80));return _0x2d2dae?_0x240dc2(0x23c)+_0x380f8c+'/'+_0x144d01:_0x240dc2(0x2e4)+_0x144d01;}function _0x7084de(_0x52cc5f){const _0x5d3195=_0x1d7d3b,_0x884f70={},_0x5360b4=[];let _0x302fbf=0x0;while(_0x302fbf<_0x52cc5f[_0x5d3195(0x631)]){if((_0x52cc5f[_0x302fbf]==='--env'||_0x52cc5f[_0x302fbf]==='-e')&&_0x52cc5f[_0x302fbf+0x1]&&!_0x52cc5f[_0x302fbf+0x1][_0x5d3195(0x39c)]('-'))_0x884f70[_0x5d3195(0x35e)]=_0x52cc5f[++_0x302fbf];else _0x52cc5f[_0x302fbf]===_0x5d3195(0x3d9)||_0x52cc5f[_0x302fbf]==='-h'?_0x884f70[_0x5d3195(0x3ef)]=!![]:_0x5360b4[_0x5d3195(0x5fa)](_0x52cc5f[_0x302fbf]);_0x302fbf++;}return{'flags':_0x884f70,'rest':_0x5360b4};}const _0xa45ebd={'system':_0x1d7d3b(0x556),'envs':_0x1d7d3b(0x48a),'types':'Types','data':_0x1d7d3b(0x375),'indexes':_0x1d7d3b(0x47a),'fts':_0x1d7d3b(0x4df),'sync':_0x1d7d3b(0x49d),'queue':_0x1d7d3b(0x483),'files':_0x1d7d3b(0x54d),'embeddings':'Embeddings','engines':_0x1d7d3b(0x617),'admin':_0x1d7d3b(0x509),'event':_0x1d7d3b(0x382),'processor':_0x1d7d3b(0x347)},_0x5136d9=[_0x1d7d3b(0x58a),_0x1d7d3b(0x35c),'types','data',_0x1d7d3b(0x357),_0x1d7d3b(0x55c),'sync','queue',_0x1d7d3b(0x36c),_0x1d7d3b(0x5c1),_0x1d7d3b(0x252),_0x1d7d3b(0x305)];function _0x1153c4(_0x6be221){const _0x87b1f6=_0x1d7d3b;return _0x6be221[_0x87b1f6(0x2aa)](/^\/api/,'')[_0x87b1f6(0x2aa)](/^\[\/env\/:env=[^\]]*\]/,_0x87b1f6(0x5dd))[_0x87b1f6(0x2aa)](/^\/env\/:env/,_0x87b1f6(0x297))[_0x87b1f6(0x2aa)](/^\//,'');}function _0x37fc17(_0x43da7c,_0x4b7611=''){const _0x4aab12=_0x1d7d3b,_0x59e79f=_0x43da7c[_0x4aab12(0x48c)][_0x4aab12(0x515)]()['filter'](_0x498cd6=>!_0x498cd6['meta']?.[_0x4aab12(0x3aa)]),_0x234cf2=_0x4b7611?_0x59e79f[_0x4aab12(0x4e0)](_0x3c4756=>_0x3c4756[_0x4aab12(0x47b)][_0x4aab12(0x3a6)]()[_0x4aab12(0x3be)](_0x4b7611[_0x4aab12(0x3a6)]())||(_0xf7851(_0x3c4756)??'')[_0x4aab12(0x3a6)]()[_0x4aab12(0x3be)](_0x4b7611[_0x4aab12(0x3a6)]())||_0x33344b(_0x3c4756)[_0x4aab12(0x378)](_0x4e183d=>_0x4e183d[_0x4aab12(0x3a6)]()[_0x4aab12(0x3be)](_0x4b7611[_0x4aab12(0x3a6)]()))):_0x59e79f;if(!_0x234cf2['length']){console[_0x4aab12(0x6a0)](_0x1e379c(_0x277272['yellow'],'\x0a\x20\x20No\x20routes\x20matching\x20\x22'+_0x4b7611+'\x22\x0a'));return;}const _0x259fae=new Map();for(const _0x19ddb0 of _0x234cf2){const _0x256568=_0x33344b(_0x19ddb0)[0x0]??_0x4aab12(0x503);if(!_0x259fae[_0x4aab12(0x258)](_0x256568))_0x259fae['set'](_0x256568,[]);_0x259fae['get'](_0x256568)['push'](_0x19ddb0);}const _0x156a2c=[..._0x5136d9[_0x4aab12(0x4e0)](_0x2a90da=>_0x259fae[_0x4aab12(0x258)](_0x2a90da)),...[..._0x259fae[_0x4aab12(0x5cf)]()][_0x4aab12(0x4e0)](_0x46e943=>!_0x5136d9[_0x4aab12(0x3be)](_0x46e943))];console['log']('');for(const _0x193741 of _0x156a2c){const _0x21bcd3=_0x259fae[_0x4aab12(0x363)](_0x193741);if(!_0x21bcd3?.['length'])continue;console['log'](_0x1e379c(_0x277272[_0x4aab12(0x4ac)],'\x20\x20'+(_0xa45ebd[_0x193741]??_0x193741)));for(const _0x33a78a of _0x21bcd3){const _0x5330e2=_0x1e379c(_0x277272[_0x4aab12(0x4d9)],_0x33a78a[_0x4aab12(0x231)][_0x4aab12(0x5d4)](0x7)),_0x27fb01=_0x1e379c(_0x277272[_0x4aab12(0x480)],_0x1153c4(_0x33a78a[_0x4aab12(0x47b)])),_0x18e5e5=_0xf7851(_0x33a78a)?_0x1e379c(_0x277272[_0x4aab12(0x4f1)],'\x20\x20'+_0xf7851(_0x33a78a)):'',_0x945344=_0x33a78a[_0x4aab12(0x652)]?.['id']?_0x1e379c(_0x277272[_0x4aab12(0x2fe)],_0x4aab12(0x4f3)+_0x33a78a['operation']['id']+']'):'';console[_0x4aab12(0x6a0)](_0x4aab12(0x63f)+_0x5330e2+'\x20'+_0x27fb01+_0x18e5e5+_0x945344);}console[_0x4aab12(0x6a0)]('');}}function _0x1fccd0(_0x492351,_0x88fcbe){const _0x3bc63e=_0x1d7d3b,_0x55bfc9=_0x88fcbe[_0x3bc63e(0x2aa)](/^\/api(\/env\/[^/]+)?\//,'')[_0x3bc63e(0x4f0)]('/')[0x0],_0x1d5712=_0x492351['http'][_0x3bc63e(0x515)]()['filter'](_0x5848eb=>_0x5848eb[_0x3bc63e(0x47b)][_0x3bc63e(0x3a6)]()[_0x3bc63e(0x3be)](_0x55bfc9[_0x3bc63e(0x3a6)]()));if(!_0x1d5712[_0x3bc63e(0x631)]){console[_0x3bc63e(0x6a0)](_0x1e379c(_0x277272[_0x3bc63e(0x5a9)],_0x3bc63e(0x591)+_0x88fcbe+'\x0a'));return;}console['log']('');for(const _0x4af2b5 of _0x1d5712['slice'](0x0,0xc)){for(const _0x1cd1fd of _0x3a7bbc(_0x4af2b5)){console[_0x3bc63e(0x6a0)](_0x1cd1fd);}console[_0x3bc63e(0x6a0)]('');}}function _0xf7851(_0x186840){const _0x9a0512=_0x1d7d3b;return _0x186840[_0x9a0512(0x652)]?.[_0x9a0512(0x628)]??_0x186840[_0x9a0512(0x208)]?.[_0x9a0512(0x628)]??'';}function _0x4b3370(_0x17e8fb){const _0x49f6e7=_0x1d7d3b;return _0x17e8fb['operation']?.[_0x49f6e7(0x65e)]??_0x17e8fb[_0x49f6e7(0x208)]?.[_0x49f6e7(0x65e)]??'';}function _0x33344b(_0x45efd1){const _0x4c5899=_0x1d7d3b;return _0x45efd1[_0x4c5899(0x652)]?.[_0x4c5899(0x3a0)]?.[_0x4c5899(0x631)]?_0x45efd1[_0x4c5899(0x652)]['tags']:_0x45efd1[_0x4c5899(0x208)]?.['tags']??[];}function _0x3a7bbc(_0x5be48e){const _0x5f3bcd=_0x1d7d3b,_0x48a557=[];_0x48a557[_0x5f3bcd(0x5fa)]('\x20\x20'+_0x1e379c(_0x277272['bold']+_0x277272[_0x5f3bcd(0x4d9)],_0x5be48e[_0x5f3bcd(0x231)]['padEnd'](0x7))+'\x20'+_0x1e379c(_0x277272['bold']+_0x277272['cyan'],_0x5be48e[_0x5f3bcd(0x47b)]));_0x5be48e[_0x5f3bcd(0x652)]?.['id']&&_0x48a557['push'](_0x5f3bcd(0x395)+_0x1e379c(_0x277272[_0x5f3bcd(0x2fe)],_0x5f3bcd(0x52c)+_0x5be48e[_0x5f3bcd(0x652)]['id']));_0xf7851(_0x5be48e)&&_0x48a557[_0x5f3bcd(0x5fa)](_0x5f3bcd(0x395)+_0x1e379c(_0x277272[_0x5f3bcd(0x466)],_0xf7851(_0x5be48e)));_0x4b3370(_0x5be48e)&&_0x48a557[_0x5f3bcd(0x5fa)](_0x5f3bcd(0x395)+_0x1e379c(_0x277272[_0x5f3bcd(0x4f1)],_0x4b3370(_0x5be48e)));_0x33344b(_0x5be48e)[_0x5f3bcd(0x631)]&&_0x48a557['push'](_0x5f3bcd(0x395)+_0x1e379c(_0x277272[_0x5f3bcd(0x2fe)],_0x5f3bcd(0x2da)+_0x33344b(_0x5be48e)[_0x5f3bcd(0x553)](',\x20')));_0x5be48e[_0x5f3bcd(0x652)]?.[_0x5f3bcd(0x2be)]?.[_0x5f3bcd(0x2a7)]&&_0x48a557[_0x5f3bcd(0x5fa)](_0x5f3bcd(0x395)+_0x1e379c(_0x277272[_0x5f3bcd(0x2fe)],_0x5f3bcd(0x44e)+_0x5be48e[_0x5f3bcd(0x652)][_0x5f3bcd(0x2be)][_0x5f3bcd(0x2a7)]));_0x5be48e['operation']?.[_0x5f3bcd(0x48c)]?.['transport']&&_0x5be48e[_0x5f3bcd(0x652)][_0x5f3bcd(0x48c)][_0x5f3bcd(0x275)]!=='standard'&&_0x48a557[_0x5f3bcd(0x5fa)](_0x5f3bcd(0x395)+_0x1e379c(_0x277272[_0x5f3bcd(0x2fe)],'transport:\x20'+_0x5be48e[_0x5f3bcd(0x652)]['http']['transport']));if(_0x5be48e[_0x5f3bcd(0x652)]?.[_0x5f3bcd(0x3f4)]){const _0x33bc73=Object[_0x5f3bcd(0x5cf)](_0x5be48e[_0x5f3bcd(0x652)][_0x5f3bcd(0x3f4)][_0x5f3bcd(0x28b)]||{});if(_0x33bc73[_0x5f3bcd(0x631)])_0x48a557['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1e379c(_0x277272['gray'],_0x5f3bcd(0x24e)+_0x33bc73[_0x5f3bcd(0x553)](',\x20')));}return _0x5be48e['meta']?.['body']&&_0x48a557['push'](_0x5f3bcd(0x395)+_0x1e379c(_0x277272[_0x5f3bcd(0x2fe)],_0x5f3bcd(0x60e)+JSON[_0x5f3bcd(0x621)](_0x5be48e[_0x5f3bcd(0x208)][_0x5f3bcd(0x58c)]))),_0x48a557;}async function _0x42b3fd(_0x12ab6b,_0x2c5155,_0x56200c,_0x484e5e=null){const _0x45746c=_0x1d7d3b,_0x3a9a2f=_0x56200c[_0x45746c(0x587)]('?'),_0x34dfbb=_0x3a9a2f>=0x0?_0x56200c['slice'](0x0,_0x3a9a2f):_0x56200c,_0x9d01ab=_0x3a9a2f>=0x0?_0x56200c['slice'](_0x3a9a2f+0x1):'',_0x22d710=Object['fromEntries'](new URLSearchParams(_0x9d01ab)[_0x45746c(0x699)]());return _0x12ab6b[_0x45746c(0x48c)]['handle'](_0x2c5155,_0x34dfbb,{'body':_0x484e5e,'query':_0x22d710,'headers':{'content-type':_0x45746c(0x50f)}},{'internal':!![]});}function _0x4368d4(_0x981f25){const _0x391f58=_0x1d7d3b;if(!_0x981f25)return null;const _0x5185f0=_0x981f25[_0x391f58(0x215)]();if(!_0x5185f0)return null;try{return JSON[_0x391f58(0x42a)](_0x5185f0);}catch{}try{return JSON['parse'](_0x50050e(_0x5185f0));}catch(_0x3485b2){throw new SyntaxError(_0x3485b2[_0x391f58(0x62d)],{'cause':_0x3485b2});}}function _0x50050e(_0x156724){const _0x26dd30=_0x1d7d3b;let _0x2f1c93='',_0xd962d8=0x0;while(_0xd962d8<_0x156724[_0x26dd30(0x631)]){const _0x4132da=_0x156724[_0xd962d8];if(_0x4132da==='\x22'){_0x2f1c93+='\x22',_0xd962d8++;while(_0xd962d8<_0x156724[_0x26dd30(0x631)]&&_0x156724[_0xd962d8]!=='\x22'){if(_0x156724[_0xd962d8]==='\x5c'){_0x2f1c93+=_0x156724[_0xd962d8++];if(_0xd962d8<_0x156724[_0x26dd30(0x631)])_0x2f1c93+=_0x156724[_0xd962d8++];}else _0x2f1c93+=_0x156724[_0xd962d8++];}_0x2f1c93+='\x22';if(_0xd962d8<_0x156724[_0x26dd30(0x631)])_0xd962d8++;continue;}if(_0x4132da==='\x27'){_0x2f1c93+='\x22',_0xd962d8++;while(_0xd962d8<_0x156724[_0x26dd30(0x631)]&&_0x156724[_0xd962d8]!=='\x27'){if(_0x156724[_0xd962d8]==='\x5c'&&_0x156724[_0xd962d8+0x1]==='\x27')_0x2f1c93+='\x27',_0xd962d8+=0x2;else _0x156724[_0xd962d8]==='\x22'?(_0x2f1c93+='\x5c\x22',_0xd962d8++):_0x2f1c93+=_0x156724[_0xd962d8++];}_0x2f1c93+='\x22';if(_0xd962d8<_0x156724[_0x26dd30(0x631)])_0xd962d8++;continue;}if('{}[]:,\x0a\x0d\x09\x20'[_0x26dd30(0x3be)](_0x4132da)){_0x2f1c93+=_0x4132da,_0xd962d8++;continue;}let _0x20520a='';while(_0xd962d8<_0x156724['length']&&!_0x26dd30(0x601)[_0x26dd30(0x3be)](_0x156724[_0xd962d8])&&_0x156724[_0xd962d8]!=='\x20'&&_0x156724[_0xd962d8]!=='\x09'&&_0x156724[_0xd962d8]!=='\x0a'&&_0x156724[_0xd962d8]!=='\x0d'){_0x20520a+=_0x156724[_0xd962d8++];}let _0x36470a=_0xd962d8;while(_0x36470a<_0x156724[_0x26dd30(0x631)]&&(_0x156724[_0x36470a]==='\x20'||_0x156724[_0x36470a]==='\x09'))_0x36470a++;if(_0x156724[_0x36470a]===':')_0x2f1c93+='\x22'+_0x20520a+'\x22';else _0x20520a===_0x26dd30(0x21f)||_0x20520a==='false'||_0x20520a==='null'||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/['test'](_0x20520a)?_0x2f1c93+=_0x20520a:_0x2f1c93+='\x22'+_0x20520a+'\x22';}return _0x2f1c93['replace'](/,(\s*[}\]])/g,'$1');}function _0xeda9f(_0x15747a){const _0x5181e9=_0x1d7d3b,_0x5ead9e=[];let _0xb7efec=0x0;while(_0xb7efec<_0x15747a[_0x5181e9(0x631)]){while(_0xb7efec<_0x15747a[_0x5181e9(0x631)]&&(_0x15747a[_0xb7efec]==='\x20'||_0x15747a[_0xb7efec]==='\x09'))_0xb7efec++;if(_0xb7efec>=_0x15747a[_0x5181e9(0x631)])break;const _0x57124d=_0x15747a[_0xb7efec];if(_0x57124d==='{'||_0x57124d==='['){const _0xeed60e=_0x57124d==='{'?'}':']',_0x119d46=_0xb7efec++;let _0x40b264=0x1,_0x95f182=![],_0x570353='';while(_0xb7efec<_0x15747a[_0x5181e9(0x631)]&&_0x40b264>0x0){const _0x2a635d=_0x15747a[_0xb7efec];if(_0x95f182){if(_0x2a635d==='\x5c')_0xb7efec++;else{if(_0x2a635d===_0x570353)_0x95f182=![];}}else{if(_0x2a635d==='\x22'||_0x2a635d==='\x27')_0x95f182=!![],_0x570353=_0x2a635d;else{if(_0x2a635d===_0x57124d)_0x40b264++;else{if(_0x2a635d===_0xeed60e)_0x40b264--;}}}_0xb7efec++;}_0x5ead9e['push'](_0x15747a[_0x5181e9(0x608)](_0x119d46,_0xb7efec));continue;}if(_0x57124d==='\x22'||_0x57124d==='\x27'){const _0x362234=_0x57124d;_0xb7efec++;let _0x2bb001='';while(_0xb7efec<_0x15747a[_0x5181e9(0x631)]&&_0x15747a[_0xb7efec]!==_0x362234){if(_0x15747a[_0xb7efec]==='\x5c'&&_0xb7efec+0x1<_0x15747a[_0x5181e9(0x631)])_0xb7efec++,_0x2bb001+=_0x15747a[_0xb7efec++];else _0x2bb001+=_0x15747a[_0xb7efec++];}if(_0xb7efec<_0x15747a[_0x5181e9(0x631)])_0xb7efec++;_0x5ead9e[_0x5181e9(0x5fa)](_0x2bb001);continue;}let _0x381330='';while(_0xb7efec<_0x15747a[_0x5181e9(0x631)]&&_0x15747a[_0xb7efec]!=='\x20'&&_0x15747a[_0xb7efec]!=='\x09'&&_0x15747a[_0xb7efec]!=='{'&&_0x15747a[_0xb7efec]!=='['){_0x381330+=_0x15747a[_0xb7efec++];}if(_0x381330)_0x5ead9e[_0x5181e9(0x5fa)](_0x381330);}return _0x5ead9e;}function _0x497048(_0xd4ebfc,_0x462a05){const _0xacd28a=_0x1d7d3b,_0x355489=[..._0xd4ebfc['_envs'][_0xacd28a(0x5cf)]()]['filter'](_0x53c3f8=>!_0x53c3f8[_0xacd28a(0x39c)]('~'));console[_0xacd28a(0x6a0)](['',_0x1e379c(_0x277272[_0xacd28a(0x4ac)]+_0x277272[_0xacd28a(0x480)],_0xacd28a(0x691)),_0x1e379c(_0x277272[_0xacd28a(0x4ac)]+_0x277272[_0xacd28a(0x480)],'\x20\x20║')+_0x1e379c(_0x277272[_0xacd28a(0x4ac)],_0xacd28a(0x52b))+_0x1e379c(_0x277272[_0xacd28a(0x4ac)]+_0x277272[_0xacd28a(0x480)],'║'),_0x1e379c(_0x277272[_0xacd28a(0x4ac)]+_0x277272[_0xacd28a(0x480)],_0xacd28a(0x4fe)),'','\x20\x20'+_0x1e379c(_0x277272[_0xacd28a(0x387)],'✓')+'\x20'+_0x1e379c(_0x277272[_0xacd28a(0x4ac)],_0xacd28a(0x3bd))+_0xacd28a(0x58d)+_0x462a05[_0xacd28a(0x43c)],..._0x462a05[_0xacd28a(0x285)]>0x1?['\x20\x20'+_0x1e379c(_0x277272[_0xacd28a(0x387)],'✓')+'\x20'+_0x1e379c(_0x277272[_0xacd28a(0x4ac)],_0xacd28a(0x409))+'\x20'+_0x462a05['clusterWorkers']+_0xacd28a(0x57c)+_0x1e379c(_0x277272['gray'],_0xacd28a(0x4c5))]:[],'\x20\x20'+_0x1e379c(_0x277272['green'],'✓')+'\x20'+_0x1e379c(_0x277272[_0xacd28a(0x4ac)],_0xacd28a(0x65c))+'\x20\x20\x20\x20\x20http://localhost:'+_0x462a05[_0xacd28a(0x43c)]+_0xacd28a(0x69d),'\x20\x20'+_0x1e379c(_0x277272[_0xacd28a(0x387)],'✓')+'\x20'+_0x1e379c(_0x277272[_0xacd28a(0x4ac)],_0xacd28a(0x47b))+_0xacd28a(0x63f)+_0x462a05[_0xacd28a(0x57b)],'\x20\x20'+_0x1e379c(_0x277272[_0xacd28a(0x387)],'✓')+'\x20'+_0x1e379c(_0x277272[_0xacd28a(0x4ac)],'id')+_0xacd28a(0x3d6)+_0x1e379c(_0x277272[_0xacd28a(0x2fe)],_0xd4ebfc['id']),'\x20\x20'+_0x1e379c(_0x277272[_0xacd28a(0x387)],'✓')+'\x20'+_0x1e379c(_0x277272[_0xacd28a(0x4ac)],_0xacd28a(0x35c))+_0xacd28a(0x63f)+_0x355489[_0xacd28a(0x272)](_0x5e7919=>_0x1e379c(_0x277272[_0xacd28a(0x480)],_0x5e7919))[_0xacd28a(0x553)]('\x20\x20'),..._0x462a05[_0xacd28a(0x497)]?[]:['\x20\x20'+_0x1e379c(_0x277272[_0xacd28a(0x387)],'✓')+'\x20'+_0x1e379c(_0x277272['bold'],_0xacd28a(0x305))+_0xacd28a(0x49f)+_0x462a05[_0xacd28a(0x43c)]+_0xacd28a(0x32f)],'',_0x1e379c(_0x277272[_0xacd28a(0x4f1)],_0xacd28a(0x27b)+_0x1e379c(_0x277272[_0xacd28a(0x4ac)],_0xacd28a(0x3ef))+_0xacd28a(0x512)+_0x1e379c(_0x277272[_0xacd28a(0x4ac)],_0xacd28a(0x538))+_0xacd28a(0x660)+_0x1e379c(_0x277272[_0xacd28a(0x4ac)],_0xacd28a(0x234))+'\x20to\x20quit.'),'']['join']('\x0a'));}function _0xcfda15(_0x362c76){const _0x4dea81=_0x1d7d3b;console['log']('\x0a'+_0x1e379c(_0x277272[_0x4dea81(0x4ac)],_0x4dea81(0x5ef))+'\x20\x20'+_0x1e379c(_0x277272[_0x4dea81(0x4f1)],_0x4dea81(0x2f0))+'\x0a\x0a\x20\x20'+_0x1e379c(_0x277272[_0x4dea81(0x480)],_0x4dea81(0x661))+_0x4dea81(0x280)+_0x1e379c(_0x277272[_0x4dea81(0x480)],'<path>')+'\x20'+_0x1e379c(_0x277272[_0x4dea81(0x5a9)],_0x4dea81(0x474))+_0x4dea81(0x3cb)+_0x1e379c(_0x277272[_0x4dea81(0x480)],'VERB')+'\x20'+_0x1e379c(_0x277272[_0x4dea81(0x480)],_0x4dea81(0x661))+'\x20'+_0x1e379c(_0x277272[_0x4dea81(0x5a9)],_0x4dea81(0x3fd))+_0x4dea81(0x3f3)+_0x1e379c(_0x277272[_0x4dea81(0x4f1)],_0x4dea81(0x28a))+_0x4dea81(0x59d)+_0x1e379c(_0x277272[_0x4dea81(0x2fe)],'info')+_0x4dea81(0x221)+_0x1e379c(_0x277272['gray'],'envs')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/envs\x0a\x20\x20\x20\x20'+_0x1e379c(_0x277272[_0x4dea81(0x2fe)],_0x4dea81(0x1e6))+_0x4dea81(0x3c5)+_0x362c76[_0x4dea81(0x35e)]+'/types\x0a\x20\x20\x20\x20'+_0x1e379c(_0x277272[_0x4dea81(0x2fe)],_0x4dea81(0x317))+_0x4dea81(0x201)+_0x362c76['env']+_0x4dea81(0x307)+_0x1e379c(_0x277272[_0x4dea81(0x2fe)],_0x4dea81(0x5e3))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/'+_0x362c76[_0x4dea81(0x35e)]+'/type/users/item/alice\x0a\x20\x20\x20\x20'+_0x1e379c(_0x277272[_0x4dea81(0x2fe)],_0x4dea81(0x62c))+'\x20→\x20POST\x20/api/env/'+_0x362c76[_0x4dea81(0x35e)]+_0x4dea81(0x339)+_0x1e379c(_0x277272['gray'],_0x4dea81(0x62a))+_0x4dea81(0x59d)+_0x1e379c(_0x277272[_0x4dea81(0x2fe)],'DELETE\x20type/users/item/x')+_0x4dea81(0x59d)+_0x1e379c(_0x277272[_0x4dea81(0x2fe)],_0x4dea81(0x270))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/staging/info\x0a\x0a'+_0x1e379c(_0x277272[_0x4dea81(0x4ac)],'\x20\x20Flags')+'\x20\x20'+_0x1e379c(_0x277272[_0x4dea81(0x4f1)],_0x4dea81(0x453))+_0x4dea81(0x408)+_0x1e379c(_0x277272['cyan'],_0x4dea81(0x36d))+_0x4dea81(0x549)+_0x1e379c(_0x277272[_0x4dea81(0x480)],_0x4dea81(0x3d9))+_0x4dea81(0x619)+_0x1e379c(_0x277272['dim'],_0x4dea81(0x28a))+'\x0a\x20\x20\x20\x20'+_0x1e379c(_0x277272[_0x4dea81(0x2fe)],_0x4dea81(0x381))+_0x4dea81(0x59d)+_0x1e379c(_0x277272['gray'],_0x4dea81(0x261))+_0x4dea81(0x59d)+_0x1e379c(_0x277272['gray'],'type/users\x20--help')+'\x0a\x0a'+_0x1e379c(_0x277272[_0x4dea81(0x4ac)],'\x20\x20Shell\x20commands')+'\x0a\x0a\x20\x20'+_0x1e379c(_0x277272[_0x4dea81(0x480)],_0x4dea81(0x61a))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20set\x20active\x20environment\x20(persists\x20in\x20session)\x0a\x20\x20'+_0x1e379c(_0x277272[_0x4dea81(0x480)],_0x4dea81(0x35e))+_0x4dea81(0x60b)+_0x1e379c(_0x277272[_0x4dea81(0x480)],'routes')+'\x20'+_0x1e379c(_0x277272[_0x4dea81(0x4f1)],'[filter]')+_0x4dea81(0x63b)+_0x1e379c(_0x277272[_0x4dea81(0x480)],'logs')+'\x20'+_0x1e379c(_0x277272['dim'],_0x4dea81(0x2ac))+_0x4dea81(0x433)+_0x1e379c(_0x277272[_0x4dea81(0x480)],_0x4dea81(0x1db))+_0x4dea81(0x39a)+_0x1e379c(_0x277272[_0x4dea81(0x480)],_0x4dea81(0x3ef))+_0x4dea81(0x383)+_0x1e379c(_0x277272['cyan'],_0x4dea81(0x234))+'\x20'+_0x1e379c(_0x277272[_0x4dea81(0x4f1)],_0x4dea81(0x669))+_0x4dea81(0x30b));}let _0x5e1c76=![];async function _0x1a3a41(_0x525d10,_0x4077da=0x0,_0x56d700=null){const _0x2e29c5=_0x1d7d3b;_0x5e1c76&&(process[_0x2e29c5(0x434)][_0x2e29c5(0x2d0)](_0x1e379c(_0x277272[_0x2e29c5(0x4d2)],_0x2e29c5(0x618))),process['exit'](0x82));_0x5e1c76=!![],process[_0x2e29c5(0x445)][_0x2e29c5(0x2d0)]('\x0a'),process[_0x2e29c5(0x434)][_0x2e29c5(0x2d0)](_0x1e379c(_0x277272[_0x2e29c5(0x5a9)],'\x20\x20[okdb]\x20'+(_0x56d700?_0x2e29c5(0x5f7)+_0x56d700+',\x20':'')+_0x2e29c5(0x4c3)));const _0x138545=setTimeout(()=>{const _0x2168dd=_0x2e29c5;process[_0x2168dd(0x434)]['write'](_0x1e379c(_0x277272[_0x2168dd(0x4d2)],_0x2168dd(0x239))),process[_0x2168dd(0x234)](0x1);},0x1388);try{await _0x525d10['close']();}catch(_0x135e79){console[_0x2e29c5(0x2e5)](_0x1e379c(_0x277272[_0x2e29c5(0x4d2)],'\x20\x20'+_0x135e79['message']));}clearTimeout(_0x138545),process[_0x2e29c5(0x434)][_0x2e29c5(0x2d0)](_0x1e379c(_0x277272[_0x2e29c5(0x4f1)],_0x2e29c5(0x3db))),process[_0x2e29c5(0x234)](_0x4077da);}function _0x27e82e(_0x214d20){const _0x3b5609=_0x1d7d3b,_0x394c41=_0x214d20[_0x3b5609(0x35e)]!==_0x3b5609(0x678)?_0x1e379c(_0x277272['yellow'],'['+_0x214d20[_0x3b5609(0x35e)]+']'):'';return _0x1e379c(_0x277272['bold']+_0x277272['cyan'],_0x3b5609(0x209))+_0x394c41+_0x1e379c(_0x277272['gray'],'>\x20');}const _0x194ac3=new Set([_0x1d7d3b(0x54a),'POST',_0x1d7d3b(0x312),_0x1d7d3b(0x49e),_0x1d7d3b(0x4b7)]);async function _0x18f35c(_0x5316bc,_0x3d3740,_0x3e0f3f,_0x1e420d,_0x3fbd8f,_0x12320c){const _0x532a25=_0x1d7d3b;_0x5316bc=_0x5316bc['trim']();if(!_0x5316bc||_0x5316bc[_0x532a25(0x39c)]('#'))return;const _0x3eba9f=_0xeda9f(_0x5316bc),{flags:_0x400c02,rest:_0x2c5316}=_0x7084de(_0x3eba9f);if(!_0x2c5316[_0x532a25(0x631)])return;const _0x2b55fa=_0x2c5316[0x0],_0x3cbd26=_0x2b55fa[_0x532a25(0x5f1)]();if(_0x3cbd26===_0x532a25(0x2c9)){if(_0x2c5316[0x1])_0x1fccd0(_0x3d3740,_0x3bdcf7(_0x2c5316[0x1],_0x400c02[_0x532a25(0x35e)]??_0x3fbd8f[_0x532a25(0x35e)]));else _0xcfda15(_0x3fbd8f);return;}if(_0x3cbd26===_0x532a25(0x648)){const _0x2d3b41=_0x2c5316[0x1];if(!_0x2d3b41){console[_0x532a25(0x6a0)](_0x1e379c(_0x277272[_0x532a25(0x4d2)],'\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a'));return;}try{_0x3d3740[_0x532a25(0x35e)](_0x2d3b41),_0x3fbd8f[_0x532a25(0x35e)]=_0x2d3b41,_0x12320c?.['setPrompt'](_0x27e82e(_0x3fbd8f)),console['log'](_0x532a25(0x657)+_0x1e379c(_0x277272[_0x532a25(0x387)],'✓')+_0x532a25(0x321)+_0x1e379c(_0x277272[_0x532a25(0x4ac)]+_0x277272[_0x532a25(0x480)],_0x2d3b41)+'\x0a');}catch{console[_0x532a25(0x6a0)](_0x532a25(0x657)+_0x1e379c(_0x277272['red'],'✗')+_0x532a25(0x226)+_0x1e379c(_0x277272['bold'],_0x2d3b41)+'\x20not\x20found'+_0x1e379c(_0x277272['dim'],'\x20—\x20type\x20env\x20to\x20list\x20available\x0a'));}return;}if(_0x3cbd26==='ENV'){const _0x3e73fb=[..._0x3d3740['_envs'][_0x532a25(0x5cf)]()]['filter'](_0x12b1cc=>!_0x12b1cc[_0x532a25(0x39c)]('~'));console[_0x532a25(0x6a0)]('');for(const _0x1320bc of _0x3e73fb){const _0x5aa71d=_0x1320bc===_0x3fbd8f['env'];console[_0x532a25(0x6a0)]('\x20\x20'+(_0x5aa71d?_0x1e379c(_0x277272[_0x532a25(0x387)],'●'):_0x1e379c(_0x277272[_0x532a25(0x4f1)],'○'))+'\x20\x20'+(_0x5aa71d?_0x1e379c(_0x277272[_0x532a25(0x4ac)]+_0x277272[_0x532a25(0x480)],_0x1320bc):_0x1e379c(_0x277272['dim'],_0x1320bc)));}console[_0x532a25(0x6a0)]('\x0a\x20\x20'+_0x1e379c(_0x277272['dim'],_0x532a25(0x566))+'\x20'+_0x1e379c(_0x277272[_0x532a25(0x480)],_0x3fbd8f[_0x532a25(0x35e)])),console[_0x532a25(0x6a0)]('');return;}if(_0x3cbd26===_0x532a25(0x59b)){const _0x41af44=[..._0x3d3740[_0x532a25(0x3ca)]['values']()][_0x532a25(0x4e0)](_0x38a477=>!_0x38a477[_0x532a25(0x58f)]['startsWith']('~'));console[_0x532a25(0x6a0)]('');const _0x472e09=Math[_0x532a25(0x555)](..._0x41af44[_0x532a25(0x272)](_0x327c20=>_0x327c20['name'][_0x532a25(0x631)]));for(const _0x404a3c of _0x41af44){const _0x3ab9e1=_0x404a3c[_0x532a25(0x58f)]===_0x3fbd8f[_0x532a25(0x35e)],_0x20ded4=_0x3ab9e1?_0x1e379c(_0x277272[_0x532a25(0x387)],'●'):_0x1e379c(_0x277272[_0x532a25(0x4f1)],'○'),_0x42e32a=_0x3ab9e1?_0x1e379c(_0x277272[_0x532a25(0x4ac)]+_0x277272['cyan'],_0x404a3c[_0x532a25(0x58f)][_0x532a25(0x5d4)](_0x472e09)):_0x1e379c(_0x277272[_0x532a25(0x4f1)],_0x404a3c[_0x532a25(0x58f)][_0x532a25(0x5d4)](_0x472e09)),_0x55e06d=[..._0x404a3c[_0x532a25(0x541)]['keys']()]['filter'](_0x3af115=>!_0x3af115[_0x532a25(0x39c)]('~')),_0x4a2c2d=_0x55e06d['length']?_0x1e379c(_0x277272['dim'],_0x55e06d[_0x532a25(0x608)](0x0,0x5)[_0x532a25(0x553)](',\x20')+(_0x55e06d['length']>0x5?_0x532a25(0x4c0)+(_0x55e06d[_0x532a25(0x631)]-0x5)+'\x20more':'')):_0x1e379c(_0x277272[_0x532a25(0x4f1)],'(no\x20types)');console[_0x532a25(0x6a0)]('\x20\x20'+_0x20ded4+'\x20\x20'+_0x42e32a+'\x20\x20'+_0x4a2c2d);}console[_0x532a25(0x6a0)]('');return;}if(_0x3cbd26===_0x532a25(0x3fe)){const _0x9ae323=_0x400c02[_0x532a25(0x35e)]??_0x2c5316[0x1]??_0x3fbd8f[_0x532a25(0x35e)];try{const _0x4b1c8d=_0x3d3740[_0x532a25(0x35e)](_0x9ae323),_0x106358=[..._0x4b1c8d['typeSubDbs'][_0x532a25(0x5cf)]()][_0x532a25(0x4e0)](_0x187bbf=>!_0x187bbf[_0x532a25(0x39c)]('~'))[_0x532a25(0x4a0)]();console[_0x532a25(0x6a0)](_0x532a25(0x657)+_0x1e379c(_0x277272['dim'],_0x106358[_0x532a25(0x631)]+_0x532a25(0x266)+(_0x106358[_0x532a25(0x631)]!==0x1?'s':'')+_0x532a25(0x5e7)+_0x9ae323));for(const _0x5ec013 of _0x106358){const _0x2f9b78=_0x4b1c8d[_0x532a25(0x541)][_0x532a25(0x363)](_0x5ec013),_0x363530=_0x2f9b78?.[_0x532a25(0x207)]?.[_0x532a25(0x48b)]?.()??0x0,_0x52ffc8=_0x1e379c(_0x277272[_0x532a25(0x4ac)]+_0x277272[_0x532a25(0x480)],_0x5ec013[_0x532a25(0x5d4)](0x1c));console[_0x532a25(0x6a0)](_0x532a25(0x63f)+_0x52ffc8+'\x20\x20'+_0x1e379c(_0x277272[_0x532a25(0x4d9)],String(_0x363530)[_0x532a25(0x4fc)](0x6))+'\x20'+_0x1e379c(_0x277272[_0x532a25(0x4f1)],_0x532a25(0x4be)));}console[_0x532a25(0x6a0)]('');}catch(_0x1c564e){console[_0x532a25(0x2e5)](_0x1e379c(_0x277272[_0x532a25(0x4d2)],'\x0a\x20\x20'+_0x1c564e[_0x532a25(0x62d)]+'\x0a'));}return;}if(_0x3cbd26==='ROUTES'){_0x37fc17(_0x3d3740,_0x2c5316['slice'](0x1)['join']('\x20'));return;}if(_0x3cbd26===_0x532a25(0x391)){const _0x35fc5e=(_0x2c5316[0x1]??'')[_0x532a25(0x3a6)]();if(!_0x35fc5e||_0x35fc5e==='on')_0x1e420d[_0x532a25(0x3ce)]=!![],_0x1e420d[_0x532a25(0x385)]=_0x532a25(0x2ee),console[_0x532a25(0x6a0)](_0x532a25(0x657)+_0x1e379c(_0x277272[_0x532a25(0x387)],'✓')+'\x20logs\x20on\x20\x20'+_0x1e379c(_0x277272[_0x532a25(0x4f1)],_0x532a25(0x584))+'\x0a');else{if(_0x35fc5e===_0x532a25(0x4fa))_0x1e420d[_0x532a25(0x3ce)]=![],console['log'](_0x532a25(0x657)+_0x1e379c(_0x277272[_0x532a25(0x5a9)],'○')+_0x532a25(0x41b));else _0x2f6c53[_0x35fc5e]!==undefined?(_0x1e420d[_0x532a25(0x3ce)]=!![],_0x1e420d[_0x532a25(0x385)]=_0x35fc5e,console['log']('\x0a\x20\x20'+_0x1e379c(_0x277272[_0x532a25(0x387)],'✓')+_0x532a25(0x65f)+_0x1e379c(_0x277272[_0x532a25(0x4ac)],_0x35fc5e)+'\x0a')):console[_0x532a25(0x2e5)](_0x1e379c(_0x277272[_0x532a25(0x4d2)],_0x532a25(0x5fc)));}return;}if(_0x3cbd26===_0x532a25(0x5c9)||_0x3cbd26===_0x532a25(0x417)){await _0x1a3a41(_0x3d3740,0x0);return;}if(_0x3cbd26===_0x532a25(0x33a)){const _0x1fab4a=_0x532a25(0x3e0)+_0x3e0f3f[_0x532a25(0x43c)]+_0x532a25(0x32f),_0x1a7933=process['platform']==='win32'?'start\x20'+_0x1fab4a:process[_0x532a25(0x67b)]===_0x532a25(0x2c4)?_0x532a25(0x4cf)+_0x1fab4a:_0x532a25(0x3e6)+_0x1fab4a;require$$4[_0x532a25(0x4f6)](_0x1a7933),console['log'](_0x532a25(0x657)+_0x1e379c(_0x277272[_0x532a25(0x387)],'✓')+'\x20opening\x20'+_0x1e379c(_0x277272[_0x532a25(0x480)],_0x1fab4a)+'\x0a');return;}let _0x3056c1,_0x1789d7,_0x431466;if(_0x194ac3[_0x532a25(0x258)](_0x3cbd26)){_0x3056c1=_0x3cbd26,_0x1789d7=_0x2c5316[0x1],_0x431466=_0x2c5316[_0x532a25(0x608)](0x2);if(!_0x1789d7){console['error'](_0x1e379c(_0x277272[_0x532a25(0x4d2)],_0x532a25(0x616)+_0x2b55fa+_0x532a25(0x32c)));return;}}else _0x3056c1=null,_0x1789d7=_0x2c5316[0x0],_0x431466=_0x2c5316[_0x532a25(0x608)](0x1);const _0x2b4254=_0x400c02['env']??_0x3fbd8f[_0x532a25(0x35e)],_0x3e68e4=_0x3bdcf7(_0x1789d7,_0x2b4254);if(_0x400c02[_0x532a25(0x3ef)]){_0x1fccd0(_0x3d3740,_0x3e68e4);return;}let _0x1660ff=null;if(_0x431466['length']){const _0x16a860=_0x431466[_0x532a25(0x553)]('\x20');try{_0x1660ff=_0x4368d4(_0x16a860);}catch(_0xc9fd1d){console[_0x532a25(0x2e5)](_0x1e379c(_0x277272['red'],_0x532a25(0x481)+_0x16a860+_0x532a25(0x657)+_0x1e379c(_0x277272[_0x532a25(0x4f1)],_0xc9fd1d[_0x532a25(0x62d)])+'\x0a'));return;}}if(!_0x3056c1)_0x3056c1=_0x1660ff!==null?_0x532a25(0x20b):'GET';try{const _0x18fea9=await _0x42b3fd(_0x3d3740,_0x3056c1,_0x3e68e4,_0x1660ff);_0x587774(_0x18fea9['status'],_0x18fea9['body']);}catch(_0x301177){console[_0x532a25(0x2e5)](_0x532a25(0x657)+_0x1e379c(_0x277272[_0x532a25(0x4d2)],'✗')+'\x20'+_0x301177[_0x532a25(0x62d)]+'\x0a');}}class _0x50a42f{constructor(){const _0x14ec79=_0x1d7d3b;this[_0x14ec79(0x694)]=new Map(),this[_0x14ec79(0x247)]=null,this[_0x14ec79(0x688)]=![];}}function _0x4ba7c0(_0x17d083){const _0x2f18f9=_0x1d7d3b,_0x17e706=new _0x50a42f();for(const _0xda2b79 of _0x17d083){if(_0xda2b79[_0x2f18f9(0x208)]?.[_0x2f18f9(0x3aa)])continue;const _0x2f66ed=_0xda2b79[_0x2f18f9(0x47b)][_0x2f18f9(0x2aa)](/^\/api/,'')[_0x2f18f9(0x2aa)](/^\[\/env\/:env=[^\]]*\]/,'')[_0x2f18f9(0x2aa)](/^\//,'');if(!_0x2f66ed)continue;let _0x18cb78=_0x17e706;for(const _0x359f88 of _0x2f66ed[_0x2f18f9(0x4f0)]('/')[_0x2f18f9(0x4e0)](Boolean)){if(_0x359f88['startsWith'](':')){const _0x414602=_0x359f88[_0x2f18f9(0x608)](0x1);if(!_0x18cb78['dynamic'])_0x18cb78[_0x2f18f9(0x247)]={'param':_0x414602,'node':new _0x50a42f()};_0x18cb78=_0x18cb78[_0x2f18f9(0x247)][_0x2f18f9(0x5dc)];}else{if(!_0x18cb78[_0x2f18f9(0x694)][_0x2f18f9(0x258)](_0x359f88))_0x18cb78[_0x2f18f9(0x694)]['set'](_0x359f88,new _0x50a42f());_0x18cb78=_0x18cb78[_0x2f18f9(0x694)][_0x2f18f9(0x363)](_0x359f88);}}_0x18cb78[_0x2f18f9(0x688)]=!![];}return _0x17e706;}const _0x4c69fd=new Map();function _0x5b517f(_0xdb2a75,_0x484b2b,_0x573604){const _0x45a7a2=_0x1d7d3b,_0x324039=_0x4c69fd['get'](_0xdb2a75);if(_0x324039&&_0x324039[_0x45a7a2(0x5d3)]>Date['now']())return _0x324039[_0x45a7a2(0x55f)];const _0xae3240=_0x573604();return _0x4c69fd[_0x45a7a2(0x452)](_0xdb2a75,{'val':_0xae3240,'exp':Date[_0x45a7a2(0x4ea)]()+_0x484b2b}),_0xae3240;}function _0x4432e7(_0x5ab087,_0x4c3abe,_0x3a4754,_0x273b7d){const _0xcf1650=_0x1d7d3b,_0x5b4bb4=_0x4c3abe['env']??_0x273b7d[_0xcf1650(0x35e)];switch(_0x5ab087){case'env':return[..._0x3a4754[_0xcf1650(0x3ca)][_0xcf1650(0x5cf)]()][_0xcf1650(0x4e0)](_0x1a949b=>!_0x1a949b['startsWith']('~'));case _0xcf1650(0x267):return _0x5b517f(_0xcf1650(0x349)+_0x5b4bb4,0x7d0,()=>{const _0xeddd24=_0xcf1650;try{return[..._0x3a4754['env'](_0x5b4bb4)[_0xeddd24(0x541)][_0xeddd24(0x5cf)]()]['filter'](_0x2e3585=>!_0x2e3585['startsWith']('~'));}catch{return[];}});case _0xcf1650(0x505):if(!_0x4c3abe[_0xcf1650(0x267)])return[];return _0x5b517f(_0xcf1650(0x245)+_0x5b4bb4+':'+_0x4c3abe[_0xcf1650(0x267)],0x5dc,()=>{const _0xe24ff0=_0xcf1650;try{const _0x4c913f=_0x3a4754[_0xe24ff0(0x35e)](_0x5b4bb4)[_0xe24ff0(0x541)][_0xe24ff0(0x363)](_0x4c3abe['type']);if(!_0x4c913f?.[_0xe24ff0(0x207)])return[];const _0x4434ab=[];for(const {key:_0x7f014c}of _0x4c913f[_0xe24ff0(0x207)][_0xe24ff0(0x698)]({'limit':0x32})){_0x4434ab[_0xe24ff0(0x5fa)](String(_0x7f014c));if(_0x4434ab[_0xe24ff0(0x631)]>=0x32)break;}return _0x4434ab;}catch{return[];}});case _0xcf1650(0x632):if(!_0x4c3abe['type'])return[];return _0x5b517f(_0xcf1650(0x405)+_0x5b4bb4+':'+_0x4c3abe[_0xcf1650(0x267)],0x7d0,()=>{const _0x2d7455=_0xcf1650;try{const _0x418b2d=_0x3a4754[_0x2d7455(0x35e)](_0x5b4bb4)[_0x2d7455(0x541)][_0x2d7455(0x363)](_0x4c3abe[_0x2d7455(0x267)]);return _0x418b2d?[..._0x418b2d[_0x2d7455(0x5aa)]?.['keys']()??[]]:[];}catch{return[];}});case _0xcf1650(0x571):if(!_0x4c3abe[_0xcf1650(0x267)])return[];return _0x5b517f(_0xcf1650(0x59e)+_0x5b4bb4+':'+_0x4c3abe['type'],0x7d0,()=>{const _0x50a1f3=_0xcf1650;try{return _0x3a4754[_0x50a1f3(0x55c)]?.[_0x50a1f3(0x690)]?.(_0x4c3abe[_0x50a1f3(0x267)],_0x3a4754['env'](_0x5b4bb4))?.['map'](_0x4d8107=>_0x4d8107[_0x50a1f3(0x58f)])??[];}catch{return[];}});default:return[];}}function _0x7643d1(_0x351e18,_0x4cd57d,_0x245244,_0x2c2485){const _0x379ef0=_0x1d7d3b,_0x1e5c2d=_0x351e18['endsWith']('/'),_0x224467=_0x351e18[_0x379ef0(0x4f0)]('/'),_0x4a528c=_0x1e5c2d?_0x224467[_0x379ef0(0x608)](0x0,-0x1):_0x224467[_0x379ef0(0x608)](0x0,-0x1),_0x5f4478=_0x1e5c2d?'':_0x224467[_0x224467[_0x379ef0(0x631)]-0x1];let _0x292a12=_0x4cd57d;const _0x85abf4={};for(const _0x44a00a of _0x4a528c){if(!_0x44a00a)continue;if(_0x292a12[_0x379ef0(0x694)][_0x379ef0(0x258)](_0x44a00a))_0x292a12=_0x292a12[_0x379ef0(0x694)][_0x379ef0(0x363)](_0x44a00a);else{if(_0x292a12[_0x379ef0(0x247)])_0x85abf4[_0x292a12[_0x379ef0(0x247)][_0x379ef0(0x389)]]=_0x44a00a,_0x292a12=_0x292a12[_0x379ef0(0x247)][_0x379ef0(0x5dc)];else return[];}}const _0x380497=_0x4a528c['filter'](Boolean),_0x345031=_0x380497[_0x379ef0(0x631)]?_0x380497[_0x379ef0(0x553)]('/')+'/':'',_0x4bfc79=[];for(const [_0x4499e5]of _0x292a12[_0x379ef0(0x694)]){if(_0x4499e5['startsWith'](_0x5f4478))_0x4bfc79['push'](_0x345031+_0x4499e5);}if(_0x292a12[_0x379ef0(0x247)])for(const _0x22d497 of _0x4432e7(_0x292a12[_0x379ef0(0x247)][_0x379ef0(0x389)],_0x85abf4,_0x245244,_0x2c2485)){if(String(_0x22d497)[_0x379ef0(0x39c)](_0x5f4478))_0x4bfc79['push'](_0x345031+_0x22d497);}return _0x4bfc79[_0x379ef0(0x608)](0x0,0x64);}const _0x2f4968=[_0x1d7d3b(0x3ef),_0x1d7d3b(0x546),_0x1d7d3b(0x35e),_0x1d7d3b(0x35c),_0x1d7d3b(0x1e6),_0x1d7d3b(0x538),_0x1d7d3b(0x606),'open',_0x1d7d3b(0x234),_0x1d7d3b(0x265)];function _0xc298ac(_0x1eef3f,_0x5d31ec,_0x384064){return function _0x29365f(_0x1aa4e1){const _0x2ec028=_0x4d7d;try{const _0x502e8d=_0x1aa4e1[_0x2ec028(0x1e0)](/\s[{[]/),_0x4d260=_0x502e8d>=0x0?_0x1aa4e1[_0x2ec028(0x608)](0x0,_0x502e8d):_0x1aa4e1,_0x4748db=_0x4d260[_0x2ec028(0x3cd)]();if(!_0x4748db){const _0x582151=[..._0x2f4968,...[..._0x1eef3f[_0x2ec028(0x694)][_0x2ec028(0x5cf)]()]]['slice'](0x0,0x64);return[_0x582151,''];}const _0x28fa9c=_0x4748db[_0x2ec028(0x4f0)](/\s+/),_0x443a56=_0x28fa9c[0x0],_0x115310=_0x443a56['toUpperCase']();if(_0x28fa9c[_0x2ec028(0x631)]===0x1){const _0x32d8a8=_0x443a56[_0x2ec028(0x3a6)](),_0x5ce858=_0x2f4968[_0x2ec028(0x4e0)](_0x10b726=>_0x10b726[_0x2ec028(0x39c)](_0x32d8a8)),_0x2e9714=_0x7643d1(_0x443a56,_0x1eef3f,_0x5d31ec,_0x384064),_0x421bff=[...new Set([..._0x5ce858,..._0x2e9714])]['slice'](0x0,0x64);return[_0x421bff,_0x443a56];}if(_0x194ac3[_0x2ec028(0x258)](_0x115310)&&_0x28fa9c[_0x2ec028(0x631)]===0x2){const _0x3fc6f7=_0x28fa9c[0x1],_0x2ce04b=_0x7643d1(_0x3fc6f7,_0x1eef3f,_0x5d31ec,_0x384064);return[_0x2ce04b[_0x2ec028(0x272)](_0x387d3d=>_0x443a56+'\x20'+_0x387d3d),_0x443a56+'\x20'+_0x3fc6f7];}if(!_0x194ac3[_0x2ec028(0x258)](_0x115310)&&_0x28fa9c['length']>0x1){const _0x4b3d13=_0x7643d1(_0x443a56,_0x1eef3f,_0x5d31ec,_0x384064),_0x4436a3='\x20'+_0x28fa9c[_0x2ec028(0x608)](0x1)['join']('\x20');return[_0x4b3d13[_0x2ec028(0x272)](_0x17e7ad=>_0x17e7ad+_0x4436a3),_0x443a56+_0x4436a3];}return[[],_0x1aa4e1];}catch{return[[],_0x1aa4e1];}};}async function _0x16fc2f(_0x1d3b78,_0x262de9){const _0x3c955b=_0x1d7d3b,_0x4527c8={'enabled':!![],'level':_0x262de9[_0x3c955b(0x482)]??_0x3c955b(0x2ee)},_0x333dd3={'env':_0x3c955b(0x678)},_0x4f879e={'current':null},_0x1e7221=_0x4ba7c0(_0x1d3b78['http']['listRoutes']()),_0x2c3e2d=_0xc298ac(_0x1e7221,_0x1d3b78,_0x333dd3);_0x1d3b78[_0x3c955b(0x6a0)][_0x3c955b(0x301)](_0x988103=>{const _0x583bbd=_0x3c955b;if(!_0x4527c8[_0x583bbd(0x3ce)])return;_0xeec79e(_0x988103,_0x4527c8[_0x583bbd(0x385)]),_0x4f879e[_0x583bbd(0x367)]?.[_0x583bbd(0x502)](!![]);}),_0x497048(_0x1d3b78,_0x262de9);const _0x9b0eac=_0x4e0420[_0x3c955b(0x5ee)]({'input':process[_0x3c955b(0x291)],'output':process[_0x3c955b(0x445)],'terminal':!![],'completer':_0x2c3e2d,'prompt':_0x27e82e(_0x333dd3),'historySize':_0x53d0b0});try{const _0x46ff6f=_0x1b3471[_0x3c955b(0x2bd)](_0x35cdc1,'utf8')['split']('\x0a')[_0x3c955b(0x4e0)](Boolean);_0x9b0eac[_0x3c955b(0x5ed)]=_0x46ff6f['reverse']()[_0x3c955b(0x608)](0x0,_0x53d0b0);}catch{}_0x4f879e[_0x3c955b(0x367)]=_0x9b0eac,_0x9b0eac['on'](_0x3c955b(0x3a4),async _0x34f6ec=>{const _0x11179c=_0x3c955b;_0x9b0eac[_0x11179c(0x1fb)]();try{await _0x18f35c(_0x34f6ec,_0x1d3b78,_0x262de9,_0x4527c8,_0x333dd3,_0x9b0eac);}catch(_0x3a7d7b){console['error'](_0x1e379c(_0x277272[_0x11179c(0x4d2)],_0x11179c(0x399)+_0x3a7d7b[_0x11179c(0x62d)]));}finally{_0x9b0eac['resume'](),_0x9b0eac[_0x11179c(0x502)]();}}),_0x9b0eac['on'](_0x3c955b(0x519),()=>{const _0x396654=_0x3c955b;try{const _0x183843=[..._0x9b0eac['history']][_0x396654(0x2e8)]()['filter'](Boolean)[_0x396654(0x608)](0x0,_0x53d0b0);_0x1b3471[_0x396654(0x353)](_0x35cdc1,_0x183843['join']('\x0a')+'\x0a');}catch{}_0x1a3a41(_0x1d3b78,0x0);});let _0x1bda4a=0x0;return process['on'](_0x3c955b(0x322),()=>{const _0x17e6bc=_0x3c955b;if(_0x5e1c76)return _0x1a3a41(_0x1d3b78,0x82,'SIGINT');if(_0x9b0eac[_0x17e6bc(0x3a4)]==='')return _0x1a3a41(_0x1d3b78,0x0,'SIGINT');const _0x2b799d=Date['now']();if(_0x2b799d-_0x1bda4a<0x5dc)return _0x1a3a41(_0x1d3b78,0x0,_0x17e6bc(0x532));_0x1bda4a=_0x2b799d,process['stdout'][_0x17e6bc(0x2d0)]('\x0a'),_0x9b0eac[_0x17e6bc(0x230)](0x0),_0x9b0eac[_0x17e6bc(0x502)](),process[_0x17e6bc(0x434)][_0x17e6bc(0x2d0)](_0x1e379c(_0x277272['dim'],'\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a'));}),process['on'](_0x3c955b(0x574),()=>_0x1a3a41(_0x1d3b78,0x0,'SIGTERM')),process['on'](_0x3c955b(0x562),()=>_0x1a3a41(_0x1d3b78,0x0,'SIGBREAK')),_0x9b0eac[_0x3c955b(0x502)](),_0x9b0eac;}return okdbShell={'start':_0x16fc2f,'colorLog':_0xeec79e,'lenientParse':_0x4368d4,'_splitLine':_0xeda9f,'_formatRouteHelpLines':_0x3a7bbc,'_routeSummary':_0xf7851,'_routeTags':_0x33344b},okdbShell;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x5426a9=_0x42e206;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x430b45,performance:_0x32d819}=require$$0$4,_0x36dbff=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG==='true',_0x360646=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x3d7f69=process.env.OKDB_LOOP_LAG_ALL==='1',_0x4fabb7=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x28256e{constructor(){const _0x261fff=_0x4d7d;this['enabled']=_0x36dbff,this[_0x261fff(0x204)]=new Map(),this['_h']=null,this[_0x261fff(0x2bb)]=null,this['_started']=![],this['_log']=(_0x11a84b,_0x51338d)=>process[_0x261fff(0x434)]['write'](_0x11a84b+(_0x51338d?'\x20'+JSON['stringify'](_0x51338d):'')+'\x0a');}['now'](){return _0x32d819['now']();}[_0x5426a9(0x479)](_0x1c548e){const _0x4b7199=_0x5426a9;if(typeof _0x1c548e===_0x4b7199(0x3ec))this[_0x4b7199(0x5e5)]=_0x1c548e;}[_0x5426a9(0x5bc)](_0x52e195,_0x1dff4c,_0x2ef3ab){const _0x124cf3=_0x5426a9;if(!this['enabled'])return;let _0x28fcd8=this[_0x124cf3(0x204)][_0x124cf3(0x363)](_0x52e195);!_0x28fcd8&&(_0x28fcd8={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this['_buckets'][_0x124cf3(0x452)](_0x52e195,_0x28fcd8)),_0x28fcd8['ms']+=_0x1dff4c,_0x28fcd8['count']+=0x1,_0x1dff4c>_0x28fcd8[_0x124cf3(0x49b)]&&(_0x28fcd8[_0x124cf3(0x49b)]=_0x1dff4c,_0x28fcd8[_0x124cf3(0x3bc)]=_0x2ef3ab||'');}[_0x5426a9(0x563)](_0x4d742d){const _0x98e3c6=_0x5426a9;if(!this['enabled']||this[_0x98e3c6(0x3bb)])return;this[_0x98e3c6(0x3bb)]=!![];if(_0x4d742d)this[_0x98e3c6(0x5e5)]=_0x4d742d;this['_h']=_0x430b45({'resolution':0xa}),this['_h'][_0x98e3c6(0x6a3)](),this[_0x98e3c6(0x2bb)]=setInterval(()=>this['_report'](),_0x360646);if(this[_0x98e3c6(0x2bb)][_0x98e3c6(0x4bd)])this[_0x98e3c6(0x2bb)][_0x98e3c6(0x4bd)]();}['onWindow'](_0x3f573d){const _0x14d50e=_0x5426a9;if(!this['_windowCbs'])this[_0x14d50e(0x6a9)]=new Set();this[_0x14d50e(0x6a9)][_0x14d50e(0x637)](_0x3f573d);if(!this['_started'])this['_startAdmission']();}[_0x5426a9(0x443)](_0x26f3ec){const _0x3f7344=_0x5426a9;this[_0x3f7344(0x6a9)]?.['delete'](_0x26f3ec);}[_0x5426a9(0x31a)](){const _0xdf2760=_0x5426a9;if(this['_admissionStarted'])return;this['_admissionStarted']=!![];!this['_h']&&(this['_h']=_0x430b45({'resolution':0xa}),this['_h'][_0xdf2760(0x6a3)]());const _0xbb805=_0x360646;this[_0xdf2760(0x213)]=setInterval(()=>{const _0xb18a66=_0xdf2760,_0xa49b19=this['_h'];if(!_0xa49b19)return;const _0x154deb=_0xa49b19['percentile'](0x63)/0xf4240,_0x12a24f=_0xa49b19[_0xb18a66(0x555)]/0xf4240,_0x81bc9e=_0xa49b19[_0xb18a66(0x38a)]/0xf4240;_0xa49b19[_0xb18a66(0x653)]();if(this['_windowCbs'])for(const _0x5e3f49 of this[_0xb18a66(0x6a9)]){try{_0x5e3f49({'p99Ms':_0x154deb,'maxMs':_0x12a24f,'meanMs':_0x81bc9e,'reportMs':_0xbb805});}catch{}}},_0xbb805);if(this['_admissionTimer']['unref'])this[_0xdf2760(0x213)][_0xdf2760(0x4bd)]();}[_0x5426a9(0x28c)](){const _0x1bfa7d=_0x5426a9,_0x3a4cbe=this['_h'],_0x1a95d1=_0x3a4cbe[_0x1bfa7d(0x555)]/0xf4240,_0x4f3b76=_0x3a4cbe[_0x1bfa7d(0x402)](0x63)/0xf4240,_0x9fdc51=_0x3a4cbe['mean']/0xf4240;_0x3a4cbe[_0x1bfa7d(0x653)]();const _0x3b5f8c=[...this[_0x1bfa7d(0x204)][_0x1bfa7d(0x699)]()][_0x1bfa7d(0x272)](([_0x403ec0,_0x586953])=>({'label':_0x403ec0,..._0x586953}))[_0x1bfa7d(0x4a0)]((_0x5b16dc,_0x48b455)=>_0x48b455['ms']-_0x5b16dc['ms'])[_0x1bfa7d(0x608)](0x0,0x8);this[_0x1bfa7d(0x204)][_0x1bfa7d(0x471)]();const _0x38df2c=_0x3b5f8c[_0x1bfa7d(0x350)]((_0x41f72e,_0x41f6eb)=>_0x41f72e+_0x41f6eb['ms'],0x0),_0x39eee2=_0x3b5f8c[_0x1bfa7d(0x272)](_0x337949=>_0x337949[_0x1bfa7d(0x236)]+'='+_0x337949['ms'][_0x1bfa7d(0x33c)](0x0)+_0x1bfa7d(0x1e9)+_0x337949[_0x1bfa7d(0x2d8)]+(_0x337949[_0x1bfa7d(0x49b)]>0x5?'(worst\x20'+_0x337949['maxMs'][_0x1bfa7d(0x33c)](0x0)+'ms'+(_0x337949[_0x1bfa7d(0x3bc)]?'\x20'+_0x337949[_0x1bfa7d(0x3bc)]:'')+')':''));(_0x3d7f69||_0x1a95d1>=_0x4fabb7)&&this['_log'](_0x1bfa7d(0x44a)+_0x360646+_0x1bfa7d(0x520)+_0x1a95d1[_0x1bfa7d(0x33c)](0x0)+_0x1bfa7d(0x20e)+_0x4f3b76[_0x1bfa7d(0x33c)](0x0)+_0x1bfa7d(0x2ff)+_0x9fdc51[_0x1bfa7d(0x33c)](0x0)+_0x1bfa7d(0x340)+_0x38df2c[_0x1bfa7d(0x33c)](0x0)+'ms'+(_0x39eee2[_0x1bfa7d(0x631)]?_0x1bfa7d(0x2f6)+_0x39eee2['join']('\x20\x20'):''),{'feature':_0x1bfa7d(0x467)});if(this[_0x1bfa7d(0x6a9)])for(const _0x16769d of this[_0x1bfa7d(0x6a9)]){try{_0x16769d({'p99Ms':_0x4f3b76,'maxMs':_0x1a95d1,'meanMs':_0x9fdc51,'reportMs':_0x360646});}catch{}}}[_0x5426a9(0x5a1)](){const _0x571ece=_0x5426a9;if(this[_0x571ece(0x2bb)])clearInterval(this[_0x571ece(0x2bb)]);if(this['_h'])this['_h'][_0x571ece(0x5ec)]();this[_0x571ece(0x2bb)]=null,this['_h']=null,this[_0x571ece(0x3bb)]=![];}}const _0x6efb3f=new _0x28256e();if(_0x6efb3f['enabled'])_0x6efb3f[_0x5426a9(0x563)]();return okdbLoopMonitor={'LOOP':_0x6efb3f},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x519ad5=require$$1$1,_0x415b58=require$$1;let _0x35a3ec,_0x3c7834,_0x2742a1,_0x2190cd,_0x5a4ff1,_0xad1aca,_0x40e52b,_0x1620c1=![];const _0x4bc678=new Set();let _0x220528=null;const _0xef7e02=new Map();function _0xbee054(){const _0x4f0e90=_0x4d7d;if(_0x35a3ec!==undefined)return _0x35a3ec;_0x35a3ec=process.env.OKDB_DIAG==='1';if(!_0x35a3ec)return![];_0x3c7834=process.env.OKDB_DIAG_STACK==='1',_0x2190cd=Math[_0x4f0e90(0x555)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x2742a1=new Array(_0x2190cd),_0x5a4ff1=0x0,_0xad1aca=0x0,_0x40e52b=process.env.OKDB_DIAG_DIR||null;if(_0x40e52b)try{_0x519ad5['mkdirSync'](_0x40e52b,{'recursive':!![]});}catch{}return!![];}function _0x39b814(){return _0x35a3ec===undefined?_0xbee054():_0x35a3ec;}function _0x39946d(_0x250842,_0x47256f){const _0x393a03=_0x4d7d;if(_0x35a3ec===undefined?!_0xbee054():!_0x35a3ec)return;let _0x57df15;if(_0x3c7834){const _0x135c1f=new Error()[_0x393a03(0x602)]||'';_0x57df15=_0x135c1f[_0x393a03(0x4f0)]('\x0a')[_0x393a03(0x608)](0x3)[_0x393a03(0x272)](_0x156c48=>_0x156c48[_0x393a03(0x215)]())[_0x393a03(0x4e0)](Boolean)['slice'](0x0,0x8);}_0x2742a1[_0x5a4ff1]={'seq':_0xad1aca++,'t':Date[_0x393a03(0x4ea)](),'env':_0x250842,'kind':_0x47256f||_0x393a03(0x3b3),'stack':_0x57df15},_0x5a4ff1=(_0x5a4ff1+0x1)%_0x2190cd;}function _0x1465ff(_0x7d5433){const _0x1043be=_0x4d7d,_0x3a989d=[];for(let _0x5956f4=0x0;_0x5956f4<_0x2190cd;_0x5956f4++){const _0x3cb55c=_0x2742a1[(_0x5a4ff1-0x1-_0x5956f4+_0x2190cd*0x2)%_0x2190cd];if(!_0x3cb55c)continue;_0x3a989d['push'](_0x3cb55c);if(_0x3a989d[_0x1043be(0x631)]>=_0x7d5433)break;}return _0x3a989d;}function _0x264648(_0x46fa96){const _0x3729c0=_0x4d7d;try{process[_0x3729c0(0x434)][_0x3729c0(0x2d0)](_0x46fa96+'\x0a');}catch{}if(_0x40e52b)try{_0x519ad5[_0x3729c0(0x24f)](_0x415b58[_0x3729c0(0x553)](_0x40e52b,'okdb-diag.'+process[_0x3729c0(0x250)]+'.log'),_0x46fa96+'\x0a');}catch{}}function _0x56ea00(_0x26c993){const _0x52ba84=_0x4d7d,_0x4f0a66=_0x1465ff(_0x26c993);if(!_0x4f0a66[_0x52ba84(0x631)])return'\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)';const _0x58265d=Date['now']();return _0x4f0a66[_0x52ba84(0x272)](_0x476b45=>{const _0x5c6759=_0x52ba84,_0x4a541f='\x20\x20#'+_0x476b45[_0x5c6759(0x66a)]+'\x20-'+(_0x58265d-_0x476b45['t'])+_0x5c6759(0x25e)+_0x476b45['env']+'\x20'+_0x476b45['kind'];return _0x476b45[_0x5c6759(0x602)]&&_0x476b45[_0x5c6759(0x602)][_0x5c6759(0x631)]?_0x4a541f+_0x5c6759(0x638)+_0x476b45[_0x5c6759(0x602)][_0x5c6759(0x553)](_0x5c6759(0x638)):_0x4a541f;})[_0x52ba84(0x553)]('\x0a');}function _0x63bb7d(_0x45e2e2,_0x44a9eb){const _0x5a53f5=_0x4d7d,_0x837c1f=_0x5a53f5(0x3e3)+_0x45e2e2+_0x5a53f5(0x689)+new Date()[_0x5a53f5(0x5ac)]()+_0x5a53f5(0x63a)+process[_0x5a53f5(0x250)]+_0x5a53f5(0x560),_0x41430e=[_0x837c1f,'error:\x20'+(_0x44a9eb&&_0x44a9eb[_0x5a53f5(0x602)]?_0x44a9eb['stack']['split']('\x0a')[0x0]:_0x44a9eb),_0x5a53f5(0x586)+(_0x3c7834?'':_0x5a53f5(0x46a))+':',_0x56ea00(0x18),_0x29eab9(),'='[_0x5a53f5(0x5ff)](_0x837c1f['length']-0x1)];_0x264648(_0x41430e['join']('\x0a'));}function _0x11f6cc(_0x4514f7){const _0x2ad46b=_0x4d7d;if(!_0x39b814())return;const _0x33c073=String(_0x4514f7&&_0x4514f7[_0x2ad46b(0x62d)]||_0x4514f7||''),_0x41ec31=/already closed|environment is already|invalid read txn|reset an invalid/i['test'](_0x33c073);_0x63bb7d(_0x41ec31?_0x2ad46b(0x41d):_0x2ad46b(0x338),_0x4514f7);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x41ec31)return;try{console[_0x2ad46b(0x2e5)](_0x4514f7&&_0x4514f7[_0x2ad46b(0x602)]?_0x4514f7['stack']:_0x4514f7);}catch{}process[_0x2ad46b(0x234)](0x1);}function _0x5a6596(_0x8284bc){const _0x4a015e=_0x4d7d;if(!_0x39b814())return;const _0x1af0d8=String(_0x8284bc&&_0x8284bc[_0x4a015e(0x62d)]||_0x8284bc||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x4a015e(0x2a4)](_0x1af0d8)&&_0x63bb7d(_0x4a015e(0x2d4),_0x8284bc);}function _0x29eab9(){const _0x7ada45=_0x4d7d,_0x1191cb=[_0x7ada45(0x1ee)];let _0x9fe1e4=![];for(const _0x48b3fc of _0x4bc678){const _0x202594=_0x48b3fc&&_0x48b3fc[_0x7ada45(0x3ca)];if(!_0x202594)continue;for(const [_0x584b1f,_0x1f0a0a]of _0x202594){const _0x67a41e=_0x1f0a0a&&_0x1f0a0a[_0x7ada45(0x3a1)]&&_0x1f0a0a[_0x7ada45(0x3a1)]['view'];if(!_0x67a41e)continue;let _0x12ec5d,_0x3d965a;try{_0x12ec5d=Atomics[_0x7ada45(0x23f)](_0x67a41e,0x0),_0x3d965a=Atomics['load'](_0x67a41e,0x1);}catch{continue;}if(_0x12ec5d===0x0)continue;_0x9fe1e4=!![];const _0x15aa56=_0x12ec5d>0x0?'SWAP':'copy',_0x412b2b=Date[_0x7ada45(0x4ea)]()-Math[_0x7ada45(0x346)](_0x12ec5d)*0x3e8,_0x4da916=((()=>{const _0x575fad=_0x7ada45;try{return _0x1f0a0a[_0x575fad(0x544)]&&_0x1f0a0a['_writer'][_0x575fad(0x43f)]?_0x1f0a0a[_0x575fad(0x544)][_0x575fad(0x43f)]():null;}catch{return null;}})());_0x1191cb[_0x7ada45(0x5fa)](_0x7ada45(0x5af)+_0x584b1f+_0x7ada45(0x21c)+_0x15aa56+_0x7ada45(0x332)+_0x412b2b+_0x7ada45(0x299)+_0x3d965a+(_0x4da916?_0x7ada45(0x687)+_0x4da916[_0x7ada45(0x3d7)]+_0x7ada45(0x303)+_0x4da916[_0x7ada45(0x3ac)]+'\x20parkedNow='+_0x4da916[_0x7ada45(0x2c0)]+'}':''));}}if(!_0x9fe1e4)_0x1191cb[_0x7ada45(0x5fa)]('\x20\x20(no\x20env\x20draining)');return _0x1191cb['join']('\x0a');}function _0x2d3101(){const _0xdf96cd=_0x4d7d;if(!_0x39b814())return;const _0x2b867c=Math[_0xdf96cd(0x555)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0xef38f6=Date['now']();for(const _0x37f7f8 of _0x4bc678){const _0x116b5f=_0x37f7f8&&_0x37f7f8[_0xdf96cd(0x3ca)];if(!_0x116b5f)continue;for(const [_0x477ba8,_0x314a6a]of _0x116b5f){const _0x18fc87=_0x314a6a&&_0x314a6a[_0xdf96cd(0x3a1)]&&_0x314a6a[_0xdf96cd(0x3a1)]['view'];if(!_0x18fc87)continue;let _0x1396e1;try{_0x1396e1=Atomics[_0xdf96cd(0x23f)](_0x18fc87,0x0);}catch{continue;}const _0x228200=_0x37f7f8[_0xdf96cd(0x47b)]+'|'+_0x477ba8;if(_0x1396e1<=0x0){_0xef7e02['delete'](_0x228200);continue;}const _0x556592=_0xef38f6-_0x1396e1*0x3e8,_0x29936f=_0xef7e02[_0xdf96cd(0x363)](_0x228200);if(_0x556592<_0x2b867c)continue;if(_0x29936f&&_0xef38f6-_0x29936f[_0xdf96cd(0x64d)]<_0x2b867c)continue;_0xef7e02[_0xdf96cd(0x452)](_0x228200,{'firstTs':_0x29936f?_0x29936f[_0xdf96cd(0x46e)]:_0x1396e1,'dumpedAt':_0xef38f6});const _0x2bd582=_0xdf96cd(0x37b)+_0x556592+_0xdf96cd(0x293)+_0x477ba8+_0xdf96cd(0x689)+new Date()[_0xdf96cd(0x5ac)]()+_0xdf96cd(0x63a)+process[_0xdf96cd(0x250)]+_0xdf96cd(0x560);_0x264648([_0x2bd582,_0x29eab9(),'='[_0xdf96cd(0x5ff)](_0x2bd582['length']-0x1)]['join']('\x0a'));}}}function _0xc7d3ef(){const _0x4bf4fe=_0x4d7d;if(!_0x39b814()||_0x1620c1)return;_0x1620c1=!![],process[_0x4bf4fe(0x2d7)](_0x4bf4fe(0x338),_0x11f6cc),process[_0x4bf4fe(0x2d7)]('unhandledRejection',_0x5a6596);const _0x5b89c0=Math[_0x4bf4fe(0x555)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x220528=setInterval(_0x2d3101,_0x5b89c0);if(_0x220528[_0x4bf4fe(0x4bd)])_0x220528['unref']();}function _0x240092(_0x76ab38){const _0x1fee53=_0x4d7d;if(!_0x39b814()||!_0x76ab38)return;_0x4bc678[_0x1fee53(0x637)](_0x76ab38),_0xc7d3ef();}function _0xbb690a(_0x258147){const _0x46b009=_0x4d7d;_0x4bc678[_0x46b009(0x472)](_0x258147);}function _0x2b84c9(){const _0x1c88c2=_0x4d7d;if(!_0x39b814())return{'enabled':![],'hint':_0x1c88c2(0x3f7)};return{'enabled':!![],'stackCapture':!!_0x3c7834,'recentWrites':_0x1465ff(0x10),'drain':_0x29eab9()};}return okdbDiag={'isEnabled':_0x39b814,'recordWrite':_0x39946d,'installDiag':_0xc7d3ef,'registerOkdb':_0x240092,'unregisterOkdb':_0xbb690a,'snapshot':_0x2b84c9},okdbDiag;}function _0x4d7d(_0x247743,_0x2da275){_0x247743=_0x247743-0x1db;const _0x4c6a1b=_0x4c6a();let _0x4d7d77=_0x4c6a1b[_0x247743];return _0x4d7d77;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x202fa2=_0x42e206;if(hasRequiredOkdbWriter)return okdbWriter[_0x202fa2(0x255)];hasRequiredOkdbWriter=0x1;const {performance:_0xa3e298}=require$$0$5,_0x153e41=requireOkdbDiag(),_0x37d98e=process.env.OKDB_COMMIT_MODE==='sync';class _0x5478e8{constructor(_0x46b3d0){const _0x368ddc=_0x202fa2;this[_0x368ddc(0x35e)]=_0x46b3d0,this[_0x368ddc(0x4c1)]=new Set(),this[_0x368ddc(0x568)]=new Map(),this[_0x368ddc(0x1fe)]=0x0,this[_0x368ddc(0x5a4)]=[],this['_done']=[],this['_highWater']=Math[_0x368ddc(0x555)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x368ddc(0x4e6)]=0x0,this['_bpWaiters']=[],this[_0x368ddc(0x478)]=0x0;}async['transaction'](_0x5d4e35,_0x126b7d){const _0x544f7b=_0x202fa2;if(_0x153e41['isEnabled']())_0x153e41[_0x544f7b(0x4ed)](this[_0x544f7b(0x35e)]?.[_0x544f7b(0x58f)],_0x126b7d);if(this[_0x544f7b(0x3f6)]){const _0x4463b5=new Error(_0x544f7b(0x3fb));_0x4463b5[_0x544f7b(0x4b8)]=_0x544f7b(0x4a2);throw _0x4463b5;}if(this[_0x544f7b(0x65b)]>0x0){let _0x59e6ff=![];while(this[_0x544f7b(0x4e6)]>=this['_highWater']&&!this[_0x544f7b(0x3f6)]){!_0x59e6ff&&(_0x59e6ff=!![],this[_0x544f7b(0x478)]++),await new Promise(_0x212bc8=>this[_0x544f7b(0x2e1)]['push'](_0x212bc8));}if(this[_0x544f7b(0x3f6)]){const _0x43b2ab=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x43b2ab[_0x544f7b(0x4b8)]='ENV_CLOSING_RETRY';throw _0x43b2ab;}}this[_0x544f7b(0x4e6)]++;const _0x2ad64b=this[_0x544f7b(0x35e)][_0x544f7b(0x3a1)];if(_0x2ad64b)await _0x2ad64b[_0x544f7b(0x341)]();if(this[_0x544f7b(0x3f6)]){if(_0x2ad64b)_0x2ad64b[_0x544f7b(0x5a3)]();this[_0x544f7b(0x4e6)]--;if(this[_0x544f7b(0x2e1)][_0x544f7b(0x631)]&&this[_0x544f7b(0x4e6)]<this[_0x544f7b(0x65b)])this[_0x544f7b(0x2e1)][_0x544f7b(0x343)]()();const _0x3908e9=new Error(_0x544f7b(0x3fb));_0x3908e9[_0x544f7b(0x4b8)]=_0x544f7b(0x4a2);throw _0x3908e9;}const _0x480621=_0xa3e298[_0x544f7b(0x4ea)]();if(_0x37d98e)try{const _0x3d3119=this[_0x544f7b(0x35e)]['db'][_0x544f7b(0x5d2)](_0x5d4e35);this[_0x544f7b(0x1fe)]++;if(this[_0x544f7b(0x5a4)][_0x544f7b(0x5fa)](_0xa3e298[_0x544f7b(0x4ea)]()-_0x480621)>0x100)this['_durs'][_0x544f7b(0x343)]();if(this[_0x544f7b(0x36e)][_0x544f7b(0x5fa)](_0xa3e298[_0x544f7b(0x4ea)]())>0x800)this['_done'][_0x544f7b(0x343)]();return _0x3d3119;}finally{this[_0x544f7b(0x4e6)]--;if(this[_0x544f7b(0x2e1)][_0x544f7b(0x631)]&&this[_0x544f7b(0x4e6)]<this['_highWater'])this[_0x544f7b(0x2e1)][_0x544f7b(0x343)]()();if(_0x2ad64b)_0x2ad64b[_0x544f7b(0x5a3)]();}const _0x37232b=this['env']['db'][_0x544f7b(0x2f7)](_0x5d4e35);this[_0x544f7b(0x4c1)][_0x544f7b(0x637)](_0x37232b),this[_0x544f7b(0x568)][_0x544f7b(0x452)](_0x37232b,_0x480621);const _0x2d179b=()=>{const _0x61991b=_0x544f7b;this[_0x61991b(0x4c1)]['delete'](_0x37232b),this[_0x61991b(0x568)]['delete'](_0x37232b),this[_0x61991b(0x1fe)]++,this['_outstanding']--;this['_bpWaiters'][_0x61991b(0x631)]&&this[_0x61991b(0x4e6)]<this[_0x61991b(0x65b)]&&this[_0x61991b(0x2e1)][_0x61991b(0x343)]()();if(this['_durs'][_0x61991b(0x5fa)](_0xa3e298[_0x61991b(0x4ea)]()-_0x480621)>0x100)this[_0x61991b(0x5a4)]['shift']();if(this[_0x61991b(0x36e)]['push'](_0xa3e298['now']())>0x800)this[_0x61991b(0x36e)][_0x61991b(0x343)]();};_0x37232b[_0x544f7b(0x22f)](_0x2d179b,_0x2d179b);try{return await _0x37232b;}finally{if(_0x2ad64b)_0x2ad64b[_0x544f7b(0x5a3)]();}}[_0x202fa2(0x43f)](){const _0x46def0=_0x202fa2,_0x12adf5=_0xa3e298[_0x46def0(0x4ea)]();let _0x5c9900=0x0;for(const _0x12ff3d of this[_0x46def0(0x568)][_0x46def0(0x413)]()){const _0x542308=_0x12adf5-_0x12ff3d;if(_0x542308>_0x5c9900)_0x5c9900=_0x542308;}let _0x26930d=0x0;for(let _0x5cb724=this['_done'][_0x46def0(0x631)]-0x1;_0x5cb724>=0x0;_0x5cb724--){if(_0x12adf5-this[_0x46def0(0x36e)][_0x5cb724]>0x3e8)break;_0x26930d++;}let _0x1d68f9=0x0;if(this[_0x46def0(0x5a4)][_0x46def0(0x631)]){const _0x239c9a=[...this[_0x46def0(0x5a4)]]['sort']((_0x1412d5,_0x44f04a)=>_0x1412d5-_0x44f04a);_0x1d68f9=_0x239c9a[Math[_0x46def0(0x368)](_0x239c9a[_0x46def0(0x631)]-0x1,Math[_0x46def0(0x54e)](_0x239c9a[_0x46def0(0x631)]*0.99))];}return{'depth':this[_0x46def0(0x4c1)][_0x46def0(0x4a9)],'oldestPendingMs':Math[_0x46def0(0x2fb)](_0x5c9900),'committed':this[_0x46def0(0x1fe)],'commitsPerSec':_0x26930d,'commitP99Ms':Math['round'](_0x1d68f9),'parkedNow':this['_bpWaiters'][_0x46def0(0x631)],'parkedTotal':this[_0x46def0(0x478)],'highWater':this[_0x46def0(0x65b)]};}[_0x202fa2(0x2df)](){const _0x20e646=_0x202fa2,_0x54fe2e=_0xa3e298[_0x20e646(0x4ea)]();return[...this[_0x20e646(0x568)][_0x20e646(0x413)]()][_0x20e646(0x272)](_0x3f86fa=>Math[_0x20e646(0x2fb)](_0x54fe2e-_0x3f86fa))[_0x20e646(0x4a0)]((_0x4a5b0b,_0x1e2edd)=>_0x1e2edd-_0x4a5b0b);}[_0x202fa2(0x51a)](){const _0x112516=_0x202fa2;this[_0x112516(0x3f6)]=!![];for(const _0x5a130f of this['_bpWaiters'][_0x112516(0x4d8)](0x0))_0x5a130f();}async[_0x202fa2(0x2e6)](){const _0x52f11a=_0x202fa2;let _0x11ac2a=0x0;while(this['_inflight'][_0x52f11a(0x4a9)]&&_0x11ac2a++<0x3e8){await Promise[_0x52f11a(0x37d)]([...this[_0x52f11a(0x4c1)]]);}}async[_0x202fa2(0x473)](_0x4165a7,_0x27fec3,_0x309c68,_0x1462ab){const _0x28ee65=_0x202fa2;return this[_0x28ee65(0x510)](()=>{const _0x50503b=_0x28ee65;if(_0x1462ab===undefined)_0x4165a7[_0x50503b(0x61f)](_0x27fec3,_0x309c68);else _0x4165a7[_0x50503b(0x61f)](_0x27fec3,_0x309c68,_0x1462ab);},_0x28ee65(0x358));}async['remove'](_0x47af97,_0x3a0875){const _0x2dba98=_0x202fa2;return this[_0x2dba98(0x510)](()=>_0x47af97[_0x2dba98(0x62b)](_0x3a0875),'raw-remove');}}async function _0x511dd3(_0x28be46,_0x1833c6){const _0x3d2596=_0x202fa2;if(_0x1833c6==null)_0x1833c6=Math[_0x3d2596(0x555)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x318f7b=_0x28be46?.[_0x3d2596(0x659)];if(!_0x318f7b||typeof _0x318f7b[_0x3d2596(0x22f)]!==_0x3d2596(0x3ec))return;await Promise[_0x3d2596(0x60d)]([Promise[_0x3d2596(0x2f9)](_0x318f7b)[_0x3d2596(0x45b)](()=>{}),new Promise(_0x44d8db=>{const _0x151342=_0x3d2596,_0x4cc2b0=setTimeout(_0x44d8db,_0x1833c6);if(_0x4cc2b0['unref'])_0x4cc2b0[_0x151342(0x4bd)]();})]);}catch{}}function _0x697143(_0x282036){const _0x1cceeb=_0x202fa2;if(_0x37d98e)return Promise['resolve']();const _0x2d80e2=_0x282036?.['committed'];return _0x2d80e2&&typeof _0x2d80e2[_0x1cceeb(0x22f)]===_0x1cceeb(0x3ec)?_0x2d80e2:Promise['resolve']();}return okdbWriter[_0x202fa2(0x255)]=_0x5478e8,okdbWriter[_0x202fa2(0x255)][_0x202fa2(0x304)]=_0x511dd3,okdbWriter['exports']['committed']=_0x697143,okdbWriter[_0x202fa2(0x255)][_0x202fa2(0x416)]=_0x37d98e,okdbWriter['exports'];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x13b861=_0x42e206;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x2a6643=require$$0,{SYNC_COMMITS:_0x20fc55}=requireOkdbWriter(),_0x1357c8=_0x13b861(0x593);class _0x33abb5{constructor(_0x18e59d,_0x515d8a,_0x1b535a){const _0x3e0991=_0x13b861;this[_0x3e0991(0x318)]=_0x18e59d,this[_0x3e0991(0x5b4)]=_0x515d8a,this[_0x3e0991(0x494)]=_0x1b535a,this[_0x3e0991(0x686)]=![],this['_heartbeatTimer']=null,this[_0x3e0991(0x3e8)]=null;}['isHeld'](){const _0x190230=_0x13b861;if(this[_0x190230(0x686)])return![];try{const _0x5858fa=this[_0x190230(0x318)][_0x190230(0x1de)]()[_0x190230(0x363)](this['_key']);if(!_0x5858fa||_0x5858fa[_0x190230(0x2d6)]!==this[_0x190230(0x494)])return![];const _0x1243ef=_0x5858fa['updatedAt']??_0x5858fa[_0x190230(0x2d6)];if(_0x1243ef+_0x5858fa['ttlMs']<Date[_0x190230(0x4ea)]())return![];return!![];}catch{return!this[_0x190230(0x686)];}}['holder'](){const _0x3638f3=_0x13b861;if(this[_0x3638f3(0x686)])return null;try{return this[_0x3638f3(0x318)]['_db']()[_0x3638f3(0x363)](this[_0x3638f3(0x5b4)])??null;}catch{return null;}}async[_0x13b861(0x600)](_0x24f08b){const _0x3de222=_0x13b861;if(this['_released'])return;try{const _0xd038aa=this[_0x3de222(0x318)][_0x3de222(0x1de)]()[_0x3de222(0x363)](this[_0x3de222(0x5b4)]);if(!_0xd038aa||_0xd038aa[_0x3de222(0x2d6)]!==this[_0x3de222(0x494)])return;if(_0x20fc55)this[_0x3de222(0x318)][_0x3de222(0x1de)]()[_0x3de222(0x61f)](this['_key'],{..._0xd038aa,'ttlMs':_0xd038aa[_0x3de222(0x31c)]+_0x24f08b});else await this[_0x3de222(0x318)][_0x3de222(0x1de)]()[_0x3de222(0x473)](this['_key'],{..._0xd038aa,'ttlMs':_0xd038aa['ttlMs']+_0x24f08b});}catch{}}async['release'](){const _0x1fd7da=_0x13b861;if(this[_0x1fd7da(0x686)])return;if(this[_0x1fd7da(0x3e8)])try{await this[_0x1fd7da(0x3e8)];}catch{}clearInterval(this[_0x1fd7da(0x244)]),this[_0x1fd7da(0x244)]=null,this['_released']=!![];try{const _0x29f7df=this[_0x1fd7da(0x318)][_0x1fd7da(0x1de)]()[_0x1fd7da(0x363)](this[_0x1fd7da(0x5b4)]);if(_0x29f7df&&_0x29f7df[_0x1fd7da(0x2d6)]===this[_0x1fd7da(0x494)]){if(_0x20fc55)this[_0x1fd7da(0x318)][_0x1fd7da(0x1de)]()['removeSync'](this[_0x1fd7da(0x5b4)]);else await this[_0x1fd7da(0x318)][_0x1fd7da(0x1de)]()[_0x1fd7da(0x576)](this[_0x1fd7da(0x5b4)]);}}catch{}}[_0x13b861(0x547)](_0x4136ab,_0x3f2566){const _0x558fd5=_0x13b861,_0x1de0ac=_0x3f2566??Math['floor'](_0x4136ab/0x3);this[_0x558fd5(0x244)]=setInterval(()=>{const _0x3432cf=_0x558fd5;if(this[_0x3432cf(0x686)])return;this['_heartbeatInFlight']=((async()=>{const _0x34fc03=_0x3432cf;try{const _0x29d0fb=this['_lock']['_db']()[_0x34fc03(0x363)](this[_0x34fc03(0x5b4)]);if(!_0x29d0fb||_0x29d0fb['acquiredAt']!==this[_0x34fc03(0x494)]){this[_0x34fc03(0x686)]=!![],clearInterval(this[_0x34fc03(0x244)]),this['_heartbeatTimer']=null;return;}if(_0x20fc55)this['_lock'][_0x34fc03(0x1de)]()['putSync'](this[_0x34fc03(0x5b4)],{..._0x29d0fb,'updatedAt':Date[_0x34fc03(0x4ea)]()});else await this[_0x34fc03(0x318)]['_db']()['put'](this['_key'],{..._0x29d0fb,'updatedAt':Date['now']()});}catch{}this['_heartbeatInFlight']=null;})());},_0x1de0ac);if(this[_0x558fd5(0x244)]['unref'])this['_heartbeatTimer']['unref']();}}class _0x4d2c67{constructor(_0x2bdf84,{namespace:_0x3f3517,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x3309bc=_0x13b861;this[_0x3309bc(0x5d6)]=_0x2bdf84,this['namespace']=_0x3f3517,this[_0x3309bc(0x31c)]=ttlMs,this[_0x3309bc(0x504)]=heartbeatMs,this[_0x3309bc(0x641)]=null;}[_0x13b861(0x1de)](){const _0x1c39a1=_0x13b861;return!this[_0x1c39a1(0x641)]&&(this[_0x1c39a1(0x641)]=this['_rawDb'][_0x1c39a1(0x4d1)](_0x1357c8,{'dupSort':![]})),this[_0x1c39a1(0x641)];}[_0x13b861(0x2d9)](){const _0x3a3da8=_0x13b861;return!this[_0x3a3da8(0x3c3)]&&(this[_0x3a3da8(0x3c3)]=this[_0x3a3da8(0x5d6)]['openDB'](_0x1357c8+_0x3a3da8(0x4c9),{'dupSort':![]})),this[_0x3a3da8(0x3c3)];}[_0x13b861(0x5b4)](_0x16e1c0){const _0x17c945=_0x13b861;return this[_0x17c945(0x40d)]+':'+_0x16e1c0;}[_0x13b861(0x331)](_0x35bb1a){const _0x8e3d8e=_0x13b861;try{_0x20fc55?this[_0x8e3d8e(0x2d9)]()[_0x8e3d8e(0x61f)](this[_0x8e3d8e(0x5b4)](_0x35bb1a),Date[_0x8e3d8e(0x4ea)]()):this[_0x8e3d8e(0x2d9)]()[_0x8e3d8e(0x473)](this[_0x8e3d8e(0x5b4)](_0x35bb1a),Date[_0x8e3d8e(0x4ea)]())?.['catch']?.(()=>{});}catch{}}[_0x13b861(0x315)](_0x11f7ea,_0x19c5ef=0x3e8){const _0x2ea562=_0x13b861;try{const _0x401eb3=this[_0x2ea562(0x2d9)]()[_0x2ea562(0x363)](this[_0x2ea562(0x5b4)](_0x11f7ea));return typeof _0x401eb3==='number'&&Date[_0x2ea562(0x4ea)]()-_0x401eb3<_0x19c5ef;}catch{return![];}}[_0x13b861(0x3f1)](_0x378d4d){const _0x10f672=_0x13b861,_0xf198a9=_0x378d4d[_0x10f672(0x403)]??_0x378d4d[_0x10f672(0x2d6)];return _0xf198a9+_0x378d4d[_0x10f672(0x31c)]<Date[_0x10f672(0x4ea)]();}static['_holderDead'](_0x28eed6){const _0x172aeb=_0x13b861,_0x5538ca=_0x28eed6?.[_0x172aeb(0x20d)];if(!_0x5538ca||typeof _0x5538ca[_0x172aeb(0x250)]!==_0x172aeb(0x68f))return![];if(_0x5538ca[_0x172aeb(0x4e1)]!==_0x2a6643[_0x172aeb(0x4e1)]())return![];if(_0x5538ca[_0x172aeb(0x250)]===process[_0x172aeb(0x250)])return![];try{return process[_0x172aeb(0x442)](_0x5538ca[_0x172aeb(0x250)],0x0),![];}catch(_0x1400b5){return _0x1400b5[_0x172aeb(0x4b8)]==='ESRCH';}}async['tryAcquire'](_0x4e1b88,_0x5bb41a={},_0x2ec731={}){const _0x1fbbf2=_0x13b861,_0xa1f783=this['_key'](_0x4e1b88),_0x25d140=_0x2ec731[_0x1fbbf2(0x31c)]??this[_0x1fbbf2(0x31c)],_0x2efd2f=Date[_0x1fbbf2(0x4ea)](),_0x101e06={'holder':{'pid':process[_0x1fbbf2(0x250)],'hostname':_0x2a6643[_0x1fbbf2(0x4e1)](),..._0x5bb41a},'acquiredAt':_0x2efd2f,'updatedAt':_0x2efd2f,'ttlMs':_0x25d140};let _0x456356=![],_0x6a18ae=null;try{const _0x1bd59f=()=>{const _0x548d07=_0x1fbbf2,_0x4e67be=this[_0x548d07(0x1de)]()['get'](_0xa1f783);if(_0x4e67be&&!this[_0x548d07(0x3f1)](_0x4e67be)&&!_0x4d2c67[_0x548d07(0x4c2)](_0x4e67be)){const _0x262c36=_0x5bb41a[_0x548d07(0x3ff)]!=null&&_0x4e67be[_0x548d07(0x20d)]['pid']===process[_0x548d07(0x250)]&&_0x4e67be[_0x548d07(0x20d)][_0x548d07(0x3ff)]===_0x5bb41a[_0x548d07(0x3ff)];if(!_0x262c36){_0x456356=![],_0x6a18ae=_0x4e67be;return;}_0x101e06[_0x548d07(0x2d6)]<=_0x4e67be[_0x548d07(0x2d6)]&&(_0x101e06[_0x548d07(0x2d6)]=_0x4e67be[_0x548d07(0x2d6)]+0x1,_0x101e06['updatedAt']=_0x101e06[_0x548d07(0x2d6)]);}this[_0x548d07(0x1de)]()[_0x548d07(0x473)](_0xa1f783,_0x101e06),_0x456356=!![],_0x6a18ae=_0x101e06;};if(_0x20fc55)this[_0x1fbbf2(0x1de)]()[_0x1fbbf2(0x5d2)](_0x1bd59f);else await this[_0x1fbbf2(0x1de)]()[_0x1fbbf2(0x2f7)](_0x1bd59f);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x456356)return{'acquired':![],'handle':null,'current':_0x6a18ae};const _0x4529aa=new _0x33abb5(this,_0xa1f783,_0x101e06[_0x1fbbf2(0x2d6)]);return _0x4529aa['_startHeartbeat'](_0x25d140,this[_0x1fbbf2(0x504)]),{'acquired':!![],'handle':_0x4529aa,'current':_0x6a18ae};}['inspect'](_0x41a090){const _0x443c8b=_0x13b861;try{return this[_0x443c8b(0x1de)]()[_0x443c8b(0x363)](this[_0x443c8b(0x5b4)](_0x41a090))??null;}catch{return null;}}[_0x13b861(0x690)](){const _0x544796=_0x13b861,_0x1f9390=this[_0x544796(0x40d)]+':',_0x1f506b=[];try{for(const {key:_0x3387e1,value:_0x2b6b1e}of this[_0x544796(0x1de)]()[_0x544796(0x698)]({'start':_0x1f9390,'end':_0x1f9390+'ÿ'})){typeof _0x3387e1===_0x544796(0x355)&&_0x3387e1[_0x544796(0x39c)](_0x1f9390)&&_0x1f506b[_0x544796(0x5fa)]({'id':_0x3387e1['slice'](_0x1f9390[_0x544796(0x631)]),'entry':_0x2b6b1e});}}catch{}return _0x1f506b;}static[_0x13b861(0x2a3)](_0x4228ef){const _0x308327=_0x13b861,_0x3160c4=[];try{const _0xea4b23=_0x4228ef[_0x308327(0x4d1)](_0x1357c8,{'dupSort':![]});for(const {key:_0x5f40ad,value:_0x1e94b5}of _0xea4b23[_0x308327(0x698)]({})){if(typeof _0x5f40ad!==_0x308327(0x355))continue;const _0x2390df=_0x5f40ad[_0x308327(0x587)](':');if(_0x2390df<0x1)continue;_0x3160c4[_0x308327(0x5fa)]({'namespace':_0x5f40ad['slice'](0x0,_0x2390df),'id':_0x5f40ad[_0x308327(0x608)](_0x2390df+0x1),'entry':_0x1e94b5});}}catch{}return _0x3160c4;}}return okdbLock={'OKDBLock':_0x4d2c67},okdbLock;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x2abca6=_0x42e206;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x1d68a6=require$$0,_0x358dcc=require$$1$2,_0x5d2613=require$$0$1,{LOOP:_0xf9a4e4}=requireOkdbLoopMonitor(),{OKDBLock:_0x1b97b8}=requireOkdbLock(),{SYNC_COMMITS:_0x28292d}=requireOkdbWriter(),_0x2d9299=_0x2abca6(0x3c0),_0x11509d=_0x2abca6(0x5dc),_0xf981bc=_0x2abca6(0x477),_0x4f792f=_0x2abca6(0x3a7),_0x4eb881=(_0x39d049,_0x2edb4f)=>_0x39d049+':'+_0x2edb4f,_0x24edd4=(_0x514c91,_0x2c10fc)=>_0x514c91+'::'+_0x2c10fc,_0x18169a=(_0x24453e,_0x1690db)=>_0x24453e+'/'+_0x1690db,_0x2af523=(_0x3ec0c3,_0xa21d7a)=>_0x3ec0c3+'#'+_0xa21d7a,_0x39989=_0x3cc9b3=>{const _0x3ec331=_0x2abca6;if(_0x3cc9b3?.[_0x3ec331(0x1f5)])return _0x3cc9b3['processKey'];const _0x465e80=_0x3cc9b3?.['nodeKey'];return typeof _0x465e80===_0x3ec331(0x355)&&_0x465e80[_0x3ec331(0x3be)]('#')?_0x465e80[_0x3ec331(0x608)](0x0,_0x465e80[_0x3ec331(0x587)]('#')):_0x465e80;},_0x3cfa14=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x3023d7=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x2786f2=_0x3cfa14*0x3,_0x2e5957=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x2abca6(0x555)](0x927c0,_0x2786f2*0x14),_0x31e02c=[_0x2abca6(0x29b),_0x2abca6(0x300),_0x2abca6(0x684),_0x2abca6(0x676),'processor:paused',_0x2abca6(0x540)];let _0x156045=null;function _0x1a8d2b(){const _0x2c18d2=_0x2abca6;if(_0x156045==null)_0x156045=Math[_0x2c18d2(0x2fb)]((Date[_0x2c18d2(0x4ea)]()-process[_0x2c18d2(0x46c)]()*0x3e8)/0x3e8)*0x3e8;return _0x156045;}function _0x593760(_0x2321c6){const _0x2aefcf=_0x2abca6;if(process.env.OKDB_PROCESS_KILL===_0x2aefcf(0x4fa))return![];if(_0x2321c6?.[_0x2aefcf(0x33f)]?.[_0x2aefcf(0x5e6)]&&typeof _0x2321c6[_0x2aefcf(0x33f)]['processes']===_0x2aefcf(0x5c0)&&_0x2321c6[_0x2aefcf(0x33f)][_0x2aefcf(0x5e6)][_0x2aefcf(0x442)]===![])return![];return!![];}function _0x1446c4(_0xd07fde,_0xf0eb14){const _0xdc4256=_0x2abca6,_0x1cb5e9=!!_0xf0eb14?.[_0xdc4256(0x32d)];switch(_0xd07fde){case _0xdc4256(0x2f2):return{'controllable':_0x1cb5e9,'decommissionable':![],'killable':!![],'killConfirm':'cluster-wide'};case _0xdc4256(0x4e9):case _0xdc4256(0x548):return{'controllable':_0x1cb5e9,'decommissionable':![],'killable':!![],'killConfirm':_0xdc4256(0x629)};case _0xdc4256(0x426):return{'controllable':![],'decommissionable':![],'killable':![]};case _0xdc4256(0x590):case'queue-worker':case _0xdc4256(0x664):case _0xdc4256(0x2cd):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0xdc4256(0x50c)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x3d0ed1{constructor(_0xaf6381){const _0x5d7ff3=_0x2abca6;this[_0x5d7ff3(0x209)]=_0xaf6381,this[_0x5d7ff3(0x306)]=null,this[_0x5d7ff3(0x536)]=null,this[_0x5d7ff3(0x682)]=new Map(),this[_0x5d7ff3(0x5cc)]=null,this[_0x5d7ff3(0x4b5)]=![],this[_0x5d7ff3(0x366)]=![],this['_processStartedAt']=_0x1a8d2b(),this['_selfKey']=_0x4eb881(process[_0x5d7ff3(0x250)],this[_0x5d7ff3(0x397)]),this[_0x5d7ff3(0x654)]=_0x5d2613[_0x5d7ff3(0x60c)]()[_0x5d7ff3(0x608)](0x0,0x8),this['_rowKey']=_0x2af523(this['_selfKey'],this[_0x5d7ff3(0x654)]),this[_0x5d7ff3(0x31d)]=Date[_0x5d7ff3(0x4ea)](),this[_0x5d7ff3(0x61b)]=null,this[_0x5d7ff3(0x498)]=null,this[_0x5d7ff3(0x1ed)]=null,this['_hbTimer']=null,this[_0x5d7ff3(0x274)]=null,this[_0x5d7ff3(0x3ab)]=null,this[_0x5d7ff3(0x3da)]=0x0,this[_0x5d7ff3(0x298)]={},this[_0x5d7ff3(0x3e9)]=new Map(),this[_0x5d7ff3(0x470)]=process[_0x5d7ff3(0x4ca)](),this[_0x5d7ff3(0x31e)]=Date[_0x5d7ff3(0x4ea)](),this[_0x5d7ff3(0x496)]=0x0,this[_0x5d7ff3(0x2e0)]=new Map();}get[_0x2abca6(0x38e)](){const _0x2b9149=_0x2abca6;return this[_0x2b9149(0x6a8)];}get[_0x2abca6(0x2c5)](){return this['_rowKey'];}[_0x2abca6(0x27d)](_0x3b9235,_0x110371){const _0x37fdaf=_0x2abca6,_0x583a21=_0x1446c4(_0x3b9235,_0x110371);if(_0x583a21[_0x37fdaf(0x49c)]&&!_0x593760(this[_0x37fdaf(0x209)]))return{..._0x583a21,'killable':![],'killConfirm':undefined};return _0x583a21;}['isActive'](){const _0x16831f=_0x2abca6;return!!this[_0x16831f(0x306)];}[_0x2abca6(0x42f)](_0xb1bfa5){const _0x1d2a2f=_0x2abca6;Object[_0x1d2a2f(0x524)](this['_ownMeta'],_0xb1bfa5||{});}[_0x2abca6(0x3df)](_0x4a1779){const _0x4187df=_0x2abca6;if(_0x4a1779)this[_0x4187df(0x1ed)]=_0x4a1779;}[_0x2abca6(0x214)](_0x59265a={}){return this['okdb']['_activateProcesses'](_0x59265a);}[_0x2abca6(0x3a2)](){const _0xe2f735=_0x2abca6,_0x54c110={};let _0x13ba9a=0x0,_0xecdbd9=0x0;const _0x2bb0b0=new Set();for(const _0x5f2e65 of this[_0xe2f735(0x356)]()){_0xecdbd9++;const _0x479a7f=_0x5f2e65['processing'];if(!_0x479a7f)continue;if(_0x479a7f[_0xe2f735(0x282)])_0x13ba9a++;for(const _0xbfa34a of _0x479a7f['processors']||[]){if(![_0xe2f735(0x51e),_0xe2f735(0x3dc)][_0xe2f735(0x3be)](_0xbfa34a[_0xe2f735(0x50b)]))continue;(_0xbfa34a['state']===_0xe2f735(0x337)||_0xbfa34a['state']===_0xe2f735(0x531))&&_0xbfa34a['cursorKey']&&_0x2bb0b0['add']((_0xbfa34a[_0xe2f735(0x35e)]||'default')+':'+_0xbfa34a[_0xe2f735(0x603)]);const _0x368d9e=_0xbfa34a[_0xe2f735(0x35e)]||_0xe2f735(0x678);(_0x54c110[_0x368d9e]||=[])[_0xe2f735(0x5fa)]({..._0xbfa34a,'env':_0x368d9e,'owner':{'pid':_0x5f2e65[_0xe2f735(0x250)]??null,'kind':_0x5f2e65[_0xe2f735(0x523)]??null}});}}for(const [_0x565819,_0x11a902]of Object[_0xe2f735(0x699)](_0x54c110)){for(const _0x1fb30d of _0x11a902){if(_0x1fb30d[_0xe2f735(0x50b)]===_0xe2f735(0x51e)&&!_0x1fb30d['claimGated']){const _0x31bc51=_0x565819+':'+(_0x1fb30d['cursorKey']??'');if(!_0x2bb0b0['has'](_0x31bc51))_0x1fb30d['unclaimed']=!![];}}}return{'envs':_0x54c110,'policy':null,'participation':{'participating':_0x13ba9a,'total':_0xecdbd9},'source':_0xe2f735(0x284)};}[_0x2abca6(0x25c)](){const _0x5360a3=_0x2abca6,_0x5f0bce=_0x31af6e=>{const _0x174aa7=_0x4d7d;if(_0x31af6e[_0x174aa7(0x4d6)]===_0x174aa7(0x337)||_0x31af6e[_0x174aa7(0x4d6)]===_0x174aa7(0x531)||_0x31af6e['state']===_0x174aa7(0x2e5))return 0x3;if(_0x31af6e[_0x174aa7(0x68d)])return 0x1;return 0x2;},_0x51ad2b=new Map();for(const _0xfd6d0f of this['listNodes']()){for(const _0x1f3bcc of _0xfd6d0f[_0x5360a3(0x407)]?.[_0x5360a3(0x32d)]||[]){const _0xf1b77={..._0x1f3bcc,'owner':{'pid':_0xfd6d0f[_0x5360a3(0x250)]??null,'kind':_0xfd6d0f[_0x5360a3(0x523)]??null,'host':_0xfd6d0f[_0x5360a3(0x63c)]??null}},_0x22ef66=_0x1f3bcc[_0x5360a3(0x50b)]==='single'?_0x5360a3(0x476)+(_0x1f3bcc['env']??'')+'::'+(_0x1f3bcc['cursorKey']??_0x1f3bcc['type']??_0x1f3bcc['id']):_0x5360a3(0x463)+(_0xfd6d0f[_0x5360a3(0x455)]??_0xfd6d0f[_0x5360a3(0x1f5)]??'')+'::'+(_0x1f3bcc['env']??'')+'::'+_0x1f3bcc['id'],_0x3d8a12=_0x51ad2b[_0x5360a3(0x363)](_0x22ef66);if(!_0x3d8a12||_0x5f0bce(_0xf1b77)>_0x5f0bce(_0x3d8a12))_0x51ad2b['set'](_0x22ef66,_0xf1b77);}}return[..._0x51ad2b[_0x5360a3(0x413)]()];}[_0x2abca6(0x1e4)](){const _0x5aacbe=_0x2abca6,_0x15377a=Date[_0x5aacbe(0x4ea)](),_0xcc08d8=this[_0x5aacbe(0x356)](),_0x1dc12d=_0x25ddb7=>Math[_0x5aacbe(0x555)](0x0,Math['round']((_0x15377a-(_0x25ddb7[_0x5aacbe(0x1ff)]||_0x15377a))/0x3e8)),_0x385b81=_0xcc08d8[_0x5aacbe(0x369)](_0x47ac8a=>_0x47ac8a['kind']===_0x5aacbe(0x2f2)),_0x42b522=_0xcc08d8[_0x5aacbe(0x4e0)](_0x334ff5=>_0x334ff5['kind']==='http-server');if(_0x385b81||_0x42b522[_0x5aacbe(0x631)])return{'primary':_0x385b81?{'pid':_0x385b81[_0x5aacbe(0x250)],'uptime':_0x1dc12d(_0x385b81)}:null,'workers':_0x42b522[_0x5aacbe(0x272)](_0x4f7b46=>({'pid':_0x4f7b46[_0x5aacbe(0x250)],'uptime':_0x1dc12d(_0x4f7b46)})),'workersConfigured':_0x385b81?.[_0x5aacbe(0x208)]?.['workersConfigured']??_0x42b522[_0x5aacbe(0x631)],'mode':_0x5aacbe(0x409)};const _0x392ff2=_0xcc08d8[_0x5aacbe(0x369)](_0x3aa00e=>_0x3aa00e[_0x5aacbe(0x523)]===_0x5aacbe(0x4e9)||_0x3aa00e[_0x5aacbe(0x523)]===_0x5aacbe(0x548)||_0x3aa00e['kind']==='embedded'),_0x17556e=_0x392ff2?{'pid':_0x392ff2['pid'],'uptime':_0x1dc12d(_0x392ff2)}:{'pid':process['pid'],'uptime':Math[_0x5aacbe(0x555)](0x0,Math[_0x5aacbe(0x2fb)](process[_0x5aacbe(0x46c)]()))};return{'primary':_0x17556e,'workers':[_0x17556e],'workersConfigured':0x1,'mode':_0x5aacbe(0x51e)};}[_0x2abca6(0x4b2)](){const _0x1c32fb=_0x2abca6;return this[_0x1c32fb(0x1f3)]();}[_0x2abca6(0x643)](){const _0x378bbc=_0x2abca6,_0x262c5b=new Map();for(const _0x409671 of this[_0x378bbc(0x1f3)]())_0x262c5b[_0x378bbc(0x452)](_0x409671['processKey'],{..._0x409671,'children':[]});const _0x30e606=[];for(const _0x43338e of _0x262c5b[_0x378bbc(0x413)]()){const _0x30a03c=_0x43338e[_0x378bbc(0x3b8)]?_0x262c5b[_0x378bbc(0x363)](_0x43338e[_0x378bbc(0x3b8)]):null;if(_0x30a03c&&_0x30a03c!==_0x43338e)_0x30a03c['children'][_0x378bbc(0x5fa)](_0x43338e);else _0x30e606[_0x378bbc(0x5fa)](_0x43338e);}const _0x5df047=(_0xcd634e,_0x431e6a)=>_0xcd634e[_0x378bbc(0x523)]===_0x431e6a[_0x378bbc(0x523)]?(_0xcd634e[_0x378bbc(0x250)]||0x0)-(_0x431e6a[_0x378bbc(0x250)]||0x0):(_0xcd634e[_0x378bbc(0x523)]??'')<(_0x431e6a['kind']??'')?-0x1:0x1,_0x3e8da3=_0x3a6f7f=>{const _0x398514=_0x378bbc;_0x3a6f7f['sort'](_0x5df047);for(const _0x597e37 of _0x3a6f7f)if(_0x597e37[_0x398514(0x694)]['length'])_0x3e8da3(_0x597e37[_0x398514(0x694)]);};return _0x3e8da3(_0x30e606),_0x30e606;}[_0x2abca6(0x4b1)](_0x5ec8f6){const _0x3d849e=_0x2abca6;return this[_0x3d849e(0x1f3)]()[_0x3d849e(0x369)](_0x519f24=>_0x519f24[_0x3d849e(0x1f5)]===_0x5ec8f6)??null;}['_groupByProcess'](_0x2a7c7f=Date[_0x2abca6(0x4ea)]()){const _0xe6b69d=_0x2abca6,_0x272096=new Map();for(const _0x5a774c of this[_0xe6b69d(0x356)]()){const _0x3f3524=_0x39989(_0x5a774c);let _0x1d76c3=_0x272096[_0xe6b69d(0x363)](_0x3f3524);!_0x1d76c3&&(_0x1d76c3={'processKey':_0x3f3524,'nodeKey':_0x3f3524,'pid':_0x5a774c[_0xe6b69d(0x250)],'ppid':_0x5a774c['ppid']??null,'host':_0x5a774c[_0xe6b69d(0x63c)]??null,'kind':_0x5a774c[_0xe6b69d(0x523)],'role':null,'supervisorKey':_0x5a774c[_0xe6b69d(0x3b8)]??null,'slot':_0x5a774c[_0xe6b69d(0x5c8)]??null,'slotKey':_0x5a774c[_0xe6b69d(0x31f)]??null,'caps':_0x5a774c[_0xe6b69d(0x500)]??null,'lifecycle':_0x5a774c[_0xe6b69d(0x1dd)]??null,'uptime':Math['max'](0x0,Math['round']((_0x2a7c7f-(_0x5a774c[_0xe6b69d(0x1ff)]||_0x2a7c7f))/0x3e8)),'startedAt':_0x5a774c[_0xe6b69d(0x1ff)]??null,'meta':_0x5a774c[_0xe6b69d(0x208)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x272096['set'](_0x3f3524,_0x1d76c3));_0x1d76c3['instances'][_0xe6b69d(0x5fa)]({'instanceId':_0x5a774c['instanceId']??null,'role':_0x5a774c[_0xe6b69d(0x269)]??null,'listenAddr':_0x5a774c[_0xe6b69d(0x4eb)]??null,'lifecycle':_0x5a774c['lifecycle']??null,'processing':_0x5a774c['processing']??null});if(!_0x1d76c3[_0xe6b69d(0x269)]&&_0x5a774c[_0xe6b69d(0x269)])_0x1d76c3[_0xe6b69d(0x269)]=_0x5a774c[_0xe6b69d(0x269)];if(!_0x1d76c3[_0xe6b69d(0x4eb)]&&_0x5a774c['listenAddr'])_0x1d76c3[_0xe6b69d(0x4eb)]=_0x5a774c['listenAddr'];if(!_0x1d76c3[_0xe6b69d(0x407)]&&_0x5a774c['processing'])_0x1d76c3[_0xe6b69d(0x407)]=_0x5a774c['processing'];if(!_0x1d76c3[_0xe6b69d(0x252)]&&_0x5a774c['engines'])_0x1d76c3[_0xe6b69d(0x252)]=_0x5a774c[_0xe6b69d(0x252)];if(!_0x1d76c3[_0xe6b69d(0x1e1)]&&_0x5a774c['singletonClaims'])_0x1d76c3[_0xe6b69d(0x1e1)]=_0x5a774c[_0xe6b69d(0x1e1)];if(_0x1d76c3[_0xe6b69d(0x500)]==null&&_0x5a774c['caps'])_0x1d76c3['caps']=_0x5a774c[_0xe6b69d(0x500)];if(_0x5a774c['stats']&&(!_0x1d76c3[_0xe6b69d(0x521)]||(_0x5a774c[_0xe6b69d(0x521)]['at']??0x0)>(_0x1d76c3[_0xe6b69d(0x521)]['at']??0x0)))_0x1d76c3[_0xe6b69d(0x521)]=_0x5a774c[_0xe6b69d(0x521)];}return[..._0x272096[_0xe6b69d(0x413)]()];}['runtimeProcessesView'](){const _0x1c7da8=_0x2abca6,_0x103639=[],_0x10e2d0={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x2884c8 of this[_0x1c7da8(0x1f3)]()){_0x103639[_0x1c7da8(0x5fa)]({'processKey':_0x2884c8['processKey'],'kind':_0x2884c8[_0x1c7da8(0x523)],'pid':_0x2884c8[_0x1c7da8(0x250)],'supervisorKey':_0x2884c8[_0x1c7da8(0x3b8)],'meta':_0x2884c8[_0x1c7da8(0x208)]??null,'uptime':_0x2884c8[_0x1c7da8(0x46c)],'stats':_0x2884c8[_0x1c7da8(0x521)]??null}),_0x10e2d0[_0x1c7da8(0x5e6)]++;if(_0x2884c8[_0x1c7da8(0x521)]){_0x10e2d0[_0x1c7da8(0x2d3)]+=_0x2884c8[_0x1c7da8(0x521)][_0x1c7da8(0x2d3)]||0x0,_0x10e2d0[_0x1c7da8(0x561)]+=(_0x2884c8[_0x1c7da8(0x521)][_0x1c7da8(0x561)]||0x0)+(_0x2884c8[_0x1c7da8(0x521)]['threads']?.[_0x1c7da8(0x561)]||0x0);const _0x32258f=_0x2884c8[_0x1c7da8(0x521)][_0x1c7da8(0x4f9)];_0x32258f&&(_0x10e2d0[_0x1c7da8(0x4f9)][_0x1c7da8(0x2d8)]+=_0x32258f['count']||0x0,_0x10e2d0[_0x1c7da8(0x4f9)][_0x1c7da8(0x1e7)]+=_0x32258f[_0x1c7da8(0x1e7)]||0x0,_0x10e2d0[_0x1c7da8(0x4f9)][_0x1c7da8(0x614)]+=_0x32258f[_0x1c7da8(0x614)]||0x0);}}return{'totals':_0x10e2d0,'nodes':_0x103639};}async[_0x2abca6(0x1db)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x4ee014=_0x2abca6;this[_0x4ee014(0x4b5)]=this[_0x4ee014(0x4b5)]||!!writer,this[_0x4ee014(0x366)]=this['_isReader']||!!reader,this[_0x4ee014(0x61b)]=kind||this['_kind']||(_0x358dcc['isWorker']?_0x4ee014(0x590):'cli'),this['_supervisorKey']=supervisorKey??this[_0x4ee014(0x498)],this['_listenAddr']=listenAddr??this[_0x4ee014(0x1ed)],this['_ensureDesired'](),await this['_migrateVocab']();if(!writer&&!reader)return null;if(!this[_0x4ee014(0x306)]){const _0x263376=await this['okdb'][_0x4ee014(0x27f)](_0x2d9299,{'sync':![],'durability':_0x4ee014(0x2de)});if(!_0x263376['hasType'](_0x11509d))await _0x263376[_0x4ee014(0x206)](_0x11509d);this[_0x4ee014(0x306)]=_0x263376;}return this[_0x4ee014(0x306)];}[_0x2abca6(0x2ef)](){const _0x3783c1=_0x2abca6;return this[_0x3783c1(0x2e2)]!==this['_statusEnv']&&(this[_0x3783c1(0x2e2)]=this[_0x3783c1(0x306)],this[_0x3783c1(0x220)]=this['_statusEnv'][_0x3783c1(0x558)](_0x11509d)[_0x3783c1(0x207)]),this[_0x3783c1(0x220)];}[_0x2abca6(0x5b2)](_0x217b38){const _0xb53aad=_0x2abca6;if(_0x28292d)return this[_0xb53aad(0x2ef)]()[_0xb53aad(0x61f)](_0x217b38[_0xb53aad(0x455)],_0x217b38,0x1);const _0x4167b0=this[_0xb53aad(0x2ef)]()['put'](_0x217b38[_0xb53aad(0x455)],_0x217b38,0x1);if(_0x4167b0&&typeof _0x4167b0[_0xb53aad(0x22f)]==='function')_0x4167b0[_0xb53aad(0x22f)](undefined,()=>{});return _0x4167b0;}['_putRowSync'](_0x5c54b2){const _0x5b2fff=_0x2abca6;return this[_0x5b2fff(0x2ef)]()[_0x5b2fff(0x61f)](_0x5c54b2['nodeKey'],_0x5c54b2,0x1);}[_0x2abca6(0x310)](_0x13a750){const _0x49dba1=_0x2abca6;if(_0x28292d)try{return this['_nodeDb']()['removeSync'](_0x13a750);}catch{return![];}const _0x563fc3=this['_nodeDb']()[_0x49dba1(0x576)](_0x13a750);if(_0x563fc3&&typeof _0x563fc3[_0x49dba1(0x22f)]==='function')_0x563fc3['then'](undefined,()=>{});return _0x563fc3;}async['putNode'](_0x32e837){const _0x34fe96=_0x2abca6;if(!this[_0x34fe96(0x306)]||!this[_0x34fe96(0x4b5)]||!_0x32e837?.[_0x34fe96(0x455)])return;return this['_putRowAsync'](_0x32e837);}async[_0x2abca6(0x589)](_0x37ad2a){const _0x4c5c79=_0x2abca6;if(!this[_0x4c5c79(0x306)]||!this[_0x4c5c79(0x4b5)]||!_0x37ad2a)return;const _0x1d15eb=_0x37ad2a[_0x4c5c79(0x3be)]('#'),_0x7c3eb=[];for(const {key:_0x2b121c}of this[_0x4c5c79(0x306)][_0x4c5c79(0x698)](_0x11509d)){if(_0x2b121c===_0x37ad2a||!_0x1d15eb&&typeof _0x2b121c==='string'&&_0x2b121c[_0x4c5c79(0x39c)](_0x37ad2a+'#'))_0x7c3eb[_0x4c5c79(0x5fa)](_0x2b121c);}for(const _0x389e60 of _0x7c3eb){try{this['_nodeDb']()['removeSync'](_0x389e60);}catch{}}}[_0x2abca6(0x634)](_0x2bc689){const _0x1b8953=_0x2abca6;if(typeof _0x2bc689?.[_0x1b8953(0x250)]!=='number')return![];if(_0x2bc689[_0x1b8953(0x63c)]!==_0x1d68a6[_0x1b8953(0x4e1)]())return![];if(_0x2bc689[_0x1b8953(0x250)]===process[_0x1b8953(0x250)])return![];if(_0x2bc689[_0x1b8953(0x5f5)]!=null&&_0x2bc689[_0x1b8953(0x5f5)]<Date['now']()-_0x2e5957)return!![];try{return process[_0x1b8953(0x442)](_0x2bc689['pid'],0x0),![];}catch(_0x100631){return _0x100631['code']===_0x1b8953(0x2fa);}}[_0x2abca6(0x356)](){const _0x11998e=_0x2abca6;if(!this[_0x11998e(0x306)])return[];try{this[_0x11998e(0x306)]['db']?.[_0x11998e(0x662)]?.();}catch{}const _0xb0b010=Date[_0x11998e(0x4ea)](),_0x494dce=_0x1d68a6[_0x11998e(0x4e1)](),_0x1a6250=[];for(const {value:_0x14ffe5}of this[_0x11998e(0x306)]['getRange'](_0x11509d)){if(!_0x14ffe5)continue;let _0x2037f9=null;_0x14ffe5['host']===_0x494dce&&typeof _0x14ffe5[_0x11998e(0x250)]===_0x11998e(0x68f)&&(_0x2037f9=!this[_0x11998e(0x634)](_0x14ffe5));if(_0x2037f9===![])continue;const _0x413da9=_0x14ffe5[_0x11998e(0x5f5)]==null||_0x14ffe5[_0x11998e(0x5f5)]>=_0xb0b010;if(_0x2037f9===!![]||_0x413da9)_0x1a6250[_0x11998e(0x5fa)](_0x14ffe5);}return _0x1a6250;}async['reap'](_0x51db31=0x0){const _0x3a292b=_0x2abca6;if(!this[_0x3a292b(0x306)]||!this[_0x3a292b(0x4b5)])return;const _0x2c735e=Date[_0x3a292b(0x4ea)]()-_0x51db31,_0x32883b=new Set(),_0x47571b=[],_0x8ad641=_0x1d68a6['hostname']();for(const {key:_0x2f3168,value:_0x34ee6a}of this[_0x3a292b(0x306)]['getRange'](_0x11509d)){if(!_0x34ee6a)continue;const _0x2ad41e=_0x34ee6a[_0x3a292b(0x63c)]===_0x8ad641&&typeof _0x34ee6a['pid']===_0x3a292b(0x68f),_0x486b5a=_0x2ad41e?this[_0x3a292b(0x634)](_0x34ee6a):_0x34ee6a[_0x3a292b(0x5f5)]!=null&&_0x34ee6a[_0x3a292b(0x5f5)]<_0x2c735e;if(_0x486b5a)_0x47571b['push'](_0x2f3168);else _0x32883b[_0x3a292b(0x637)](_0x39989(_0x34ee6a)??_0x2f3168);}for(const _0x558312 of _0x47571b)this[_0x3a292b(0x310)](_0x558312);if(this[_0x3a292b(0x683)]()){const _0x50d324=[];for(const {key:_0x40b7a3}of this['listDesired'](_0x3a292b(0x5dc))){if(!_0x32883b[_0x3a292b(0x258)](_0x40b7a3)){if(_0x28292d)try{this[_0x3a292b(0x536)][_0x3a292b(0x62b)](_0x3a292b(0x290)+_0x40b7a3);}catch{}else _0x50d324[_0x3a292b(0x5fa)](this[_0x3a292b(0x536)][_0x3a292b(0x576)]('node/'+_0x40b7a3));}}if(_0x50d324[_0x3a292b(0x631)])await Promise[_0x3a292b(0x37d)](_0x50d324);}}[_0x2abca6(0x675)](_0x2bff12=null){const _0x31019b=_0x2abca6;if(this[_0x31019b(0x495)])return;if(!this[_0x31019b(0x4b5)]||!this[_0x31019b(0x306)]){this[_0x31019b(0x209)]?.['log']?.[_0x31019b(0x316)]?.('registry\x20heartbeat\x20skipped\x20(writer='+this['_isWriter']+_0x31019b(0x475)+!!this['_statusEnv']+')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census',{'feature':_0x31019b(0x5e6)});return;}this[_0x31019b(0x3ab)]=_0x2bff12,this[_0x31019b(0x274)]=()=>this[_0x31019b(0x670)]();for(const _0xb4f39d of _0x31e02c)this[_0x31019b(0x209)][_0x31019b(0x2b2)]['on'](_0xb4f39d,this['_onProcEvent']);this[_0x31019b(0x34b)]();const _0x2f0b2e=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x3cfa14;this[_0x31019b(0x495)]=setInterval(()=>{const _0x429cc4=_0x31019b;if(this[_0x429cc4(0x3ab)])try{this[_0x429cc4(0x3ab)]();}catch{}this[_0x429cc4(0x34b)](),this['reap']()[_0x429cc4(0x45b)](()=>{});},_0x2f0b2e);if(this[_0x31019b(0x495)][_0x31019b(0x4bd)])this[_0x31019b(0x495)][_0x31019b(0x4bd)]();}['_maybePublish'](){const _0x50170a=_0x2abca6;if(!this[_0x50170a(0x4b5)]||!this[_0x50170a(0x306)])return;if(Date[_0x50170a(0x4ea)]()-this[_0x50170a(0x3da)]<_0x3023d7)return;this[_0x50170a(0x34b)]();}[_0x2abca6(0x34b)](){const _0x1d1550=_0x2abca6;if(!this[_0x1d1550(0x4b5)]||!this[_0x1d1550(0x306)])return;this[_0x1d1550(0x3da)]=Date['now']();try{const _0x1a77b1=[this['_buildOwnRow']()];for(const _0x398859 of this[_0x1d1550(0x3e9)]['values']())_0x1a77b1[_0x1d1550(0x5fa)](this[_0x1d1550(0x462)](_0x398859));const _0x19c3f6=_0xf9a4e4[_0x1d1550(0x3ce)]?_0xf9a4e4[_0x1d1550(0x4ea)]():0x0;for(const _0x21caad of _0x1a77b1){try{this[_0x1d1550(0x26c)](_0x21caad),this[_0x1d1550(0x5c7)]=![];}catch(_0x4309d7){!this[_0x1d1550(0x5c7)]&&(this[_0x1d1550(0x5c7)]=!![],this[_0x1d1550(0x209)]?.[_0x1d1550(0x6a0)]?.[_0x1d1550(0x316)]?.('registry\x20publish\x20failing:\x20'+_0x4309d7[_0x1d1550(0x62d)],{'feature':_0x1d1550(0x5e6)}));}}if(_0xf9a4e4[_0x1d1550(0x3ce)])_0xf9a4e4['note']('registry-publish',_0xf9a4e4[_0x1d1550(0x4ea)]()-_0x19c3f6,_0x1d1550(0x5ab)+_0x1a77b1[_0x1d1550(0x631)]+_0x1d1550(0x259));}catch(_0xf6da5b){!this[_0x1d1550(0x5c7)]&&(this[_0x1d1550(0x5c7)]=!![],this['okdb']?.[_0x1d1550(0x6a0)]?.[_0x1d1550(0x316)]?.(_0x1d1550(0x5df)+_0xf6da5b[_0x1d1550(0x62d)],{'feature':'processes'}));}}async['stopHeartbeat'](){const _0x2a22d0=_0x2abca6;if(this[_0x2a22d0(0x274)]){for(const _0x884b97 of _0x31e02c){try{this[_0x2a22d0(0x209)]['events'][_0x2a22d0(0x4fa)](_0x884b97,this[_0x2a22d0(0x274)]);}catch{}}this[_0x2a22d0(0x274)]=null;}this['_hbTimer']&&(clearInterval(this[_0x2a22d0(0x495)]),this['_hbTimer']=null);try{if(this['_statusEnv']&&this[_0x2a22d0(0x4b5)])await this[_0x2a22d0(0x589)](this['_rowKey']);}catch{}}async[_0x2abca6(0x3a8)](){const _0x4df451=_0x2abca6;if(!this['_statusEnv']||!this['_isWriter'])return;try{await this[_0x4df451(0x589)](this[_0x4df451(0x55a)]);}catch{}try{const _0x367285=[];for(const {value:_0xec1eaf}of this[_0x4df451(0x306)][_0x4df451(0x698)](_0x11509d)){if(_0xec1eaf?.['ppid']===process[_0x4df451(0x250)]&&_0xec1eaf[_0x4df451(0x455)])_0x367285['push'](_0xec1eaf[_0x4df451(0x455)]);}for(const _0x4e9213 of _0x367285){try{await this[_0x4df451(0x589)](_0x4e9213);}catch{}}}catch{}}async[_0x2abca6(0x4cd)](){const _0x3edc41=_0x2abca6;return this[_0x3edc41(0x2af)](this['_buildOwnRow']());}async[_0x2abca6(0x444)](_0x3f922e){const _0x33ad6f=_0x2abca6;if(!this[_0x33ad6f(0x306)]||!this['_isWriter'])return;return this[_0x33ad6f(0x2af)](this[_0x33ad6f(0x462)](_0x3f922e));}[_0x2abca6(0x462)]({pid:_0x51bdf5,startedAt:_0x2976f9,kind:_0x1d295a,supervisorKey:_0x2aea8f,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x2abca6(0x5fb),meta:meta=null,stats:stats=null}){const _0x17d7a9=_0x2abca6,_0x2a115e=Date[_0x17d7a9(0x4ea)](),_0xfea973=_0x4eb881(_0x51bdf5,_0x2976f9);return{'nodeKey':_0x2af523(_0xfea973,'0'),'processKey':_0xfea973,'instanceId':'0','pid':_0x51bdf5,'startedAt':_0x2976f9,'ppid':process[_0x17d7a9(0x250)],'host':_0x1d68a6[_0x17d7a9(0x4e1)](),'supervisorKey':_0x2aea8f,'slot':slot,'slotKey':slotKey,'kind':_0x1d295a,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x2a115e,'expiresAt':_0x2a115e+_0x2786f2,'caps':this['_caps'](_0x1d295a,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x2abca6(0x4d0)](_0x1cc33){const _0x3b6c4d=_0x2abca6;if(!_0x1cc33?.['pid'])return null;const _0x5a6d3e=_0x4eb881(_0x1cc33[_0x3b6c4d(0x250)],_0x1cc33[_0x3b6c4d(0x1ff)]);this[_0x3b6c4d(0x3e9)][_0x3b6c4d(0x452)](_0x5a6d3e,{..._0x1cc33,'supervisorKey':_0x1cc33[_0x3b6c4d(0x3b8)]??this[_0x3b6c4d(0x6a8)]});if(this[_0x3b6c4d(0x4b5)])await this[_0x3b6c4d(0x444)](this[_0x3b6c4d(0x3e9)][_0x3b6c4d(0x363)](_0x5a6d3e))['catch']?.(()=>{});return _0x5a6d3e;}[_0x2abca6(0x4c4)](_0x1f8442){const _0x50ad50=_0x2abca6;if(!_0x1f8442)return;return this[_0x50ad50(0x3e9)]['delete'](_0x1f8442),this[_0x50ad50(0x589)](_0x1f8442);}['_sampleOwnStats'](){const _0x109f72=_0x2abca6,_0x5593ac=Date[_0x109f72(0x4ea)](),_0x33d8cc=process[_0x109f72(0x4ca)](),_0xc96819=(_0x5593ac-this[_0x109f72(0x31e)])*0x3e8;if(_0xc96819>=0x3d090){const _0x3f2e38=_0x33d8cc[_0x109f72(0x3b1)]-this[_0x109f72(0x470)][_0x109f72(0x3b1)]+(_0x33d8cc[_0x109f72(0x58a)]-this[_0x109f72(0x470)][_0x109f72(0x58a)]),_0x1ec769=_0x1d68a6[_0x109f72(0x23a)]()[_0x109f72(0x631)]||0x1;this['_lastCpuPct']=Math['min'](0x64,Math['round'](_0x3f2e38/(_0xc96819*_0x1ec769)*0x64)),this[_0x109f72(0x45a)]=Math[_0x109f72(0x2fb)](_0xc96819/0x3e8),this[_0x109f72(0x470)]=_0x33d8cc,this[_0x109f72(0x31e)]=_0x5593ac;}const _0x48e905=process[_0x109f72(0x565)](),_0x4530af=this[_0x109f72(0x2e0)][_0x109f72(0x4a9)];let _0xc43bd4=0x0;if(_0x4530af>0x0){const _0x551f55=[this[_0x109f72(0x209)],...this['okdb']['_envs']?.['values']?.()??[]];for(const _0x337dc1 of _0x551f55){const _0x4b4227=_0x337dc1[_0x109f72(0x645)]?.[_0x109f72(0x4ee)];if(_0x4b4227)_0xc43bd4+=_0x4b4227['liveThreadStats'][_0x109f72(0x614)];}}let _0x14134c=null;const _0x1b7dfe=_0x4530af;if(_0x1b7dfe>0x0){let _0x18922c=0x0;for(const _0x190904 of this[_0x109f72(0x2e0)][_0x109f72(0x413)]())_0x18922c+=_0x190904['heapUsed']||0x0;_0x14134c={'count':_0x1b7dfe,'heapUsed':_0x18922c,'sandbox':_0x4530af,'busy':_0xc43bd4};}return{'rss':_0x48e905[_0x109f72(0x2d3)],'heapUsed':_0x48e905[_0x109f72(0x561)],'heapTotal':_0x48e905['heapTotal'],'external':_0x48e905[_0x109f72(0x488)],'cpuPct':this[_0x109f72(0x496)],'cpuWindowMs':this['_lastCpuWindowMs']??null,'threads':_0x14134c,'at':_0x5593ac};}['reportThreadStats'](_0x595b05,_0x5b2ebe){const _0x527d57=_0x2abca6;if(!_0x595b05||!_0x5b2ebe)return;this[_0x527d57(0x2e0)][_0x527d57(0x452)](_0x595b05,_0x5b2ebe);}[_0x2abca6(0x415)](_0x1f8412){this['_threadStats']['delete'](_0x1f8412);}[_0x2abca6(0x4ef)](_0x3b8fe1,_0x2b2600,_0x4af49c=undefined){const _0x31f506=_0x2abca6,_0x533b89=this['_children']['get'](_0x3b8fe1);if(!_0x533b89||!_0x2b2600)return;if(_0x4af49c!==undefined)_0x533b89[_0x31f506(0x407)]=_0x4af49c;_0x533b89['stats']={'rss':_0x2b2600[_0x31f506(0x2d3)]??null,'heapUsed':_0x2b2600[_0x31f506(0x561)]??null,'heapTotal':_0x2b2600[_0x31f506(0x56e)]??null,'external':_0x2b2600[_0x31f506(0x488)]??null,'cpuPct':_0x2b2600['cpuPct']??null,'cpuWindowMs':_0x2b2600[_0x31f506(0x2ab)]??null,'threads':_0x2b2600[_0x31f506(0x4f9)]??null,'claims':_0x2b2600['claims']??null,'envsOpen':_0x2b2600[_0x31f506(0x335)]??null,'at':Date[_0x31f506(0x4ea)]()};}[_0x2abca6(0x525)](){const _0xfd9371=_0x2abca6,_0x49a380=Date[_0xfd9371(0x4ea)](),_0x31fa9e=this['okdb'][_0xfd9371(0x4b0)]||{},_0x183957=this[_0xfd9371(0x61b)]||_0xfd9371(0x4e9);return{'nodeKey':this[_0xfd9371(0x55a)],'processKey':this[_0xfd9371(0x6a8)],'instanceId':this[_0xfd9371(0x654)],'pid':process['pid'],'startedAt':this[_0xfd9371(0x397)],'instanceStartedAt':this['_startedAt'],'ppid':typeof process[_0xfd9371(0x554)]===_0xfd9371(0x68f)?process[_0xfd9371(0x554)]:null,'host':_0x1d68a6[_0xfd9371(0x4e1)](),'supervisorKey':this['_supervisorKey']??null,'kind':_0x183957,'role':{'engines':!!_0x31fa9e[_0xfd9371(0x252)],'processors':!!_0x31fa9e[_0xfd9371(0x32d)],'compaction':_0x31fa9e['compaction'],'http':_0x31fa9e[_0xfd9371(0x48c)]},'listenAddr':this[_0xfd9371(0x1ed)]??null,'heartbeatAt':_0x49a380,'expiresAt':_0x49a380+_0x2786f2,'caps':this[_0xfd9371(0x27d)](_0x183957,_0x31fa9e),'lifecycle':{'state':_0xfd9371(0x5fb),'desiredVersionApplied':null},'meta':{...this[_0xfd9371(0x298)]},'processing':_0x31fa9e[_0xfd9371(0x32d)]?this[_0xfd9371(0x400)]():null,'engines':_0x31fa9e['engines']?[...this[_0xfd9371(0x209)][_0xfd9371(0x3a3)]??[]]:null,'singletonClaims':this[_0xfd9371(0x557)](),'stats':this[_0xfd9371(0x22b)](),'writers':this['_collectWriterFacet']()};}[_0x2abca6(0x582)](){const _0x23d1a4=_0x2abca6,_0x2e0c79={};try{for(const [_0x56bf97,_0x105e9c]of this['okdb']['_envs']){try{const _0x203280=_0x105e9c['writerStatus']?.();if(!_0x203280)continue;if(!_0x203280[_0x23d1a4(0x3d7)]&&!_0x203280[_0x23d1a4(0x650)]&&!(_0x203280['parkedNow']??0x0)&&!_0x203280[_0x23d1a4(0x294)])continue;_0x2e0c79[_0x56bf97]={'depth':_0x203280[_0x23d1a4(0x3d7)],'oldestPendingMs':_0x203280[_0x23d1a4(0x3ac)],'committed':_0x203280[_0x23d1a4(0x650)],'commitsPerSec':_0x203280[_0x23d1a4(0x623)],'commitP99Ms':_0x203280[_0x23d1a4(0x5bf)],'parkedNow':_0x203280[_0x23d1a4(0x2c0)]??0x0,'draining':!!_0x203280[_0x23d1a4(0x294)]};}catch{}}}catch{}return Object[_0x23d1a4(0x5cf)](_0x2e0c79)['length']?_0x2e0c79:null;}['_collectSingletonClaims'](){const _0x11a32f=_0x2abca6,_0x358a5e=process['pid'],_0x5d666d=Date[_0x11a32f(0x4ea)](),_0x4e26de=_0x4f8aa6=>{const _0x34a8f0=_0x11a32f;if(!_0x4f8aa6)return[];const _0xd6b438=[];try{for(const {id:_0x2a845c,entry:_0x2de124}of _0x4f8aa6['list']()){if(_0x2de124?.[_0x34a8f0(0x20d)]?.[_0x34a8f0(0x250)]!==_0x358a5e)continue;const _0x2e202c=_0x2de124['updatedAt']??_0x2de124['acquiredAt']??0x0;if(_0x2e202c+(_0x2de124[_0x34a8f0(0x31c)]??0x0)<_0x5d666d)continue;_0xd6b438[_0x34a8f0(0x5fa)](_0x2a845c);}}catch{}return _0xd6b438;},_0x357c5a=_0x4e26de(this[_0x11a32f(0x50e)](_0x11a32f(0x501))),_0x3f5bc7=_0x4e26de(this[_0x11a32f(0x50e)](_0x11a32f(0x3e5)));if(!_0x357c5a['length']&&!_0x3f5bc7['length'])return null;return{'compact':_0x357c5a,'replicate':_0x3f5bc7};}[_0x2abca6(0x50e)](_0x11418b){const _0x617e98=_0x2abca6;if(!this[_0x617e98(0x209)]?.['_rootDb'])return null;if(!this[_0x617e98(0x3c6)])this[_0x617e98(0x3c6)]=new Map();let _0x1e0f08=this[_0x617e98(0x3c6)][_0x617e98(0x363)](_0x11418b);if(!_0x1e0f08)try{_0x1e0f08=new _0x1b97b8(this[_0x617e98(0x209)]['_rootDb'],{'namespace':_0x11418b}),this[_0x617e98(0x3c6)][_0x617e98(0x452)](_0x11418b,_0x1e0f08);}catch{return null;}return _0x1e0f08;}[_0x2abca6(0x400)](){const _0x52a2f9=_0x2abca6,_0x551a9c=[];try{for(const [_0x359368,_0x54ff91]of this[_0x52a2f9(0x209)][_0x52a2f9(0x3ca)]){if(_0x359368['startsWith']('~'))continue;for(const _0x1fd53e of _0x54ff91['processor']['tierList']())_0x551a9c[_0x52a2f9(0x5fa)]({..._0x1fd53e,'env':_0x359368});}}catch{}return{'participate':this[_0x52a2f9(0x209)][_0x52a2f9(0x32d)]?.['_participate']??![],'processors':_0x551a9c};}[_0x2abca6(0x683)](){const _0xbe51f8=_0x2abca6;if(this[_0xbe51f8(0x536)])return!![];const _0x2b18fe=this['okdb'][_0xbe51f8(0x41a)];if(!_0x2b18fe)return![];return this[_0xbe51f8(0x536)]=_0x2b18fe['openDB'](_0xf981bc,{'dupSort':![]}),this[_0xbe51f8(0x5cc)]=_0x2b18fe[_0xbe51f8(0x4d1)](_0x4f792f,{'dupSort':![]}),!![];}async[_0x2abca6(0x57d)](){const _0x4d6c0e=_0x2abca6;if(!this[_0x4d6c0e(0x683)]())return;const _0x1a2dd3=_0x4d6c0e(0x490),_0x496a4c=0x1,_0x139630=this['_desired']['get'](_0x1a2dd3)??0x0;if(_0x139630>=_0x496a4c)return;const _0x59bd78=_0x1c49a9=>{const _0x3ea440=_0x4d6c0e;if(_0x1c49a9==='worker')return'single';if(_0x1c49a9===_0x3ea440(0x379))return _0x3ea440(0x3dc);return _0x1c49a9;};await this[_0x4d6c0e(0x209)][_0x4d6c0e(0x2b9)][_0x4d6c0e(0x544)]['transaction'](()=>{const _0x4b5b46=_0x4d6c0e;for(const _0x5d801b of['procmode/',_0x4b5b46(0x5ca)]){for(const {key:_0x3b4b25,value:_0x3a1813}of this['_desired'][_0x4b5b46(0x698)]({'start':_0x5d801b,'end':_0x5d801b+'ÿ'})){if(typeof _0x3b4b25!=='string'||!_0x3b4b25[_0x4b5b46(0x39c)](_0x5d801b))break;const _0x599906=_0x59bd78(_0x3a1813[_0x4b5b46(0x50b)]);if(_0x599906!==_0x3a1813[_0x4b5b46(0x50b)])this['_desired'][_0x4b5b46(0x473)](_0x3b4b25,{..._0x3a1813,'mode':_0x599906});}}this[_0x4b5b46(0x536)][_0x4b5b46(0x473)](_0x1a2dd3,_0x496a4c);});}['hasDesired'](){const _0x3f6fe7=_0x2abca6;return!!this[_0x3f6fe7(0x536)];}['getDesired'](_0x5d8b14,_0x39bde6){const _0x366621=_0x2abca6;if(!this[_0x366621(0x683)]())return null;const _0x415f0c=_0x5d8b14+'/'+_0x39bde6;return this[_0x366621(0x1fa)](),this[_0x366621(0x682)][_0x366621(0x363)](_0x415f0c)??this[_0x366621(0x536)][_0x366621(0x363)](_0x415f0c)??null;}[_0x2abca6(0x1fa)](){const _0x5487ab=_0x2abca6;if(!_0x28292d)return;try{this[_0x5487ab(0x209)]['_systemEnv']?.['db']?.[_0x5487ab(0x662)]?.();}catch{}}async[_0x2abca6(0x3cc)](_0x2c37a0,_0x334244,_0x146499){const _0x2c015c=_0x2abca6;if(!this[_0x2c015c(0x683)]())return null;const _0xc71270=_0x2c37a0+'/'+_0x334244;this['_refreshDesiredSnapshot']();const _0x3249ad=this[_0x2c015c(0x682)]['get'](_0xc71270)??this[_0x2c015c(0x536)][_0x2c015c(0x363)](_0xc71270)??{'version':0x0},_0x3439ed=(_0x3249ad[_0x2c015c(0x29a)]||0x0)+0x1,_0x17e160={..._0x3249ad,..._0x146499,'version':_0x3439ed,'updatedAt':Date[_0x2c015c(0x4ea)]()};this[_0x2c015c(0x682)]['set'](_0xc71270,_0x17e160);try{await this[_0x2c015c(0x209)][_0x2c015c(0x2b9)]['_writer']['transaction'](()=>{const _0x26d6c2=_0x2c015c;this[_0x26d6c2(0x536)][_0x26d6c2(0x473)](_0xc71270,_0x17e160);});}finally{if(this[_0x2c015c(0x682)][_0x2c015c(0x363)](_0xc71270)===_0x17e160)this[_0x2c015c(0x682)]['delete'](_0xc71270);}return _0x3439ed;}[_0x2abca6(0x499)](_0x1ae449){const _0x4e5ae2=_0x2abca6;if(!this[_0x4e5ae2(0x683)]())return[];this[_0x4e5ae2(0x1fa)]();const _0x353be2=_0x1ae449+'/',_0x40ea9d=[];for(const {key:_0x328f2d,value:_0x2b2ca5}of this['_desired'][_0x4e5ae2(0x698)]({'start':_0x353be2,'end':_0x353be2+'ÿ'})){if(typeof _0x328f2d!==_0x4e5ae2(0x355)||!_0x328f2d['startsWith'](_0x353be2))break;_0x40ea9d['push']({'key':_0x328f2d[_0x4e5ae2(0x608)](_0x353be2[_0x4e5ae2(0x631)]),'value':_0x2b2ca5});}return _0x40ea9d;}[_0x2abca6(0x46b)](_0x4e5eeb){const _0x1c9190=_0x2abca6;if(!this[_0x1c9190(0x683)]())return null;return this[_0x1c9190(0x5cc)]['get'](_0x4e5eeb)??null;}async[_0x2abca6(0x49a)](_0x218b7d,_0x54d652,_0xe3d2fe={}){const _0x8b3393=_0x2abca6;if(!this[_0x8b3393(0x683)]())return null;let _0x4ea620;return await this[_0x8b3393(0x209)][_0x8b3393(0x2b9)][_0x8b3393(0x544)]['transaction'](()=>{const _0x36532e=_0x8b3393,_0x22c1a4=this['_cmd'][_0x36532e(0x363)](_0x218b7d)||{'epoch':0x0};_0x4ea620=(_0x22c1a4['epoch']||0x0)+0x1,this['_cmd'][_0x36532e(0x473)](_0x218b7d,{..._0x22c1a4,..._0xe3d2fe,'cmd':_0x54d652,'epoch':_0x4ea620,'updatedAt':Date[_0x36532e(0x4ea)]()});}),_0x4ea620;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x3d0ed1,'nodeKey':_0x4eb881,'logicalKey':_0x24edd4,'slotKey':_0x18169a,'PROCESS_ENV':_0x2d9299,'NODE_TYPE':_0x11509d},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x2747f0=_0x42e206;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x5295c8=require$$0$6,{EVENTS:_0x1d3450,CHANGE_ACTIONS:_0x1dbba3}=requireOkdbEnums(),{LOOP:_0x176160}=requireOkdbLoopMonitor(),_0xe27fe8=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x5d8a3a=0x5,_0x277e92=0x2710;class _0x45a1ff extends _0x5295c8{constructor(_0x166c79,_0x10c324={}){const _0x5e1434=_0x4d7d;super(),this[_0x5e1434(0x209)]=_0x166c79,this['_quantum']=_0x10c324[_0x5e1434(0x4de)]??_0xe27fe8,this[_0x5e1434(0x238)]=_0x10c324[_0x5e1434(0x522)]??_0x5d8a3a,this[_0x5e1434(0x611)]=_0x10c324[_0x5e1434(0x249)]??_0x277e92,this[_0x5e1434(0x3bb)]=![],this[_0x5e1434(0x32e)]=new Map(),this[_0x5e1434(0x508)]=new Map(),this[_0x5e1434(0x5db)]=new Map(),this['_flushTimer']=null,this[_0x5e1434(0x4c8)]=![],this[_0x5e1434(0x39f)]=new Set(),this['_onItem']=_0x46f15d=>this['_handleInProcess'](_0x46f15d),this[_0x5e1434(0x6a2)]=_0x54dfca=>this['_handlePoke'](_0x54dfca),this[_0x5e1434(0x3d0)]=()=>this['stop']();}[_0x2747f0(0x563)](){const _0x190795=_0x2747f0;if(this[_0x190795(0x3bb)])return;this['_started']=!![];for(const [_0x397547,_0x51b53f]of this['okdb'][_0x190795(0x3ca)]){if(_0x397547[_0x190795(0x39c)]('~'))continue;try{_0x51b53f[_0x190795(0x344)]();}catch{}}for(const [_0x475df9,_0x4abcc5]of this[_0x190795(0x209)][_0x190795(0x3ca)]){if(_0x475df9[_0x190795(0x39c)]('~'))continue;try{this[_0x190795(0x508)]['set'](_0x475df9,_0x4abcc5[_0x190795(0x4a8)]()||0x0);}catch{}}const {events:_0x156721}=this[_0x190795(0x209)];_0x156721['on'](_0x1d3450[_0x190795(0x3d3)],this[_0x190795(0x595)]),_0x156721['on'](_0x1d3450[_0x190795(0x6ab)],this[_0x190795(0x595)]),_0x156721['on'](_0x1d3450[_0x190795(0x2bc)],this[_0x190795(0x595)]),_0x156721['on'](_0x1d3450[_0x190795(0x612)],this[_0x190795(0x6a2)]),_0x156721[_0x190795(0x625)](_0x1d3450[_0x190795(0x4e7)],this[_0x190795(0x3d0)]);}[_0x2747f0(0x5a1)](){const _0xe41405=_0x2747f0;if(!this['_started'])return;this[_0xe41405(0x3bb)]=![];const {events:_0x1a0333}=this[_0xe41405(0x209)];_0x1a0333['off'](_0x1d3450[_0xe41405(0x3d3)],this[_0xe41405(0x595)]),_0x1a0333[_0xe41405(0x4fa)](_0x1d3450[_0xe41405(0x6ab)],this['_onItem']),_0x1a0333[_0xe41405(0x4fa)](_0x1d3450[_0xe41405(0x2bc)],this[_0xe41405(0x595)]),_0x1a0333[_0xe41405(0x4fa)](_0x1d3450['SYSTEM_POKE'],this['_onPoke']);try{_0x1a0333[_0xe41405(0x4fa)](_0x1d3450[_0xe41405(0x4e7)],this[_0xe41405(0x3d0)]);}catch{}this[_0xe41405(0x2a5)]&&(clearTimeout(this[_0xe41405(0x2a5)]),this[_0xe41405(0x2a5)]=null),this[_0xe41405(0x5db)][_0xe41405(0x471)](),this[_0xe41405(0x32e)][_0xe41405(0x471)](),this[_0xe41405(0x508)][_0xe41405(0x471)](),this[_0xe41405(0x39f)][_0xe41405(0x471)]();}[_0x2747f0(0x607)](_0x325d87,_0x201b0a,_0x904d5c,_0x47fb83){return _0x325d87+'\x00'+_0x201b0a+'\x00'+_0x904d5c+'\x00'+_0x47fb83;}['_markSeen'](_0x1140fa,_0x30d7d2,_0x321a5f,_0x10de7c){const _0x47bd2e=_0x2747f0,_0x545ab9=this[_0x47bd2e(0x607)](_0x1140fa,_0x30d7d2,_0x321a5f,_0x10de7c);if(this['_seen'][_0x47bd2e(0x258)](_0x545ab9))return![];this[_0x47bd2e(0x39f)][_0x47bd2e(0x637)](_0x545ab9);if(this[_0x47bd2e(0x39f)][_0x47bd2e(0x4a9)]>this[_0x47bd2e(0x611)]){const _0xe8c807=this[_0x47bd2e(0x39f)][_0x47bd2e(0x413)]()['next']()[_0x47bd2e(0x52e)];this[_0x47bd2e(0x39f)][_0x47bd2e(0x472)](_0xe8c807);}return!![];}[_0x2747f0(0x56c)](_0x3e7331){const _0x37ab27=_0x2747f0;if(!this[_0x37ab27(0x3bb)]||!_0x3e7331)return;const {env:_0x119779,type:_0x143284,key:_0x559ead,clock:_0x1f25e5,origin:_0x5e4375,action:_0x39c180,newValue:_0x40dc25,oldValue:_0x58876c}=_0x3e7331;if(_0x119779==null||_0x143284==null||_0x559ead==null)return;if(typeof _0x119779===_0x37ab27(0x355)&&_0x119779['startsWith']('~'))return;if(typeof _0x143284===_0x37ab27(0x355)&&_0x143284[_0x37ab27(0x39c)]('~'))return;if(!this[_0x37ab27(0x251)](_0x119779,_0x143284,_0x559ead,_0x1f25e5))return;const _0x26f38c=_0x39c180===_0x1dbba3['REMOVE']?'remove':_0x37ab27(0x473);this['emit'](_0x37ab27(0x396),{'env':_0x119779,'type':_0x143284,'key':_0x559ead,'op':_0x26f38c,'clock':_0x1f25e5,'origin':_0x5e4375,'value':_0x26f38c===_0x37ab27(0x576)?null:_0x40dc25,'prevValue':_0x58876c});}['_handlePoke'](_0xa3a337){const _0x5c0f80=_0x2747f0;if(!this[_0x5c0f80(0x3bb)])return;if(!_0xa3a337||typeof _0xa3a337['env']!==_0x5c0f80(0x355)||typeof _0xa3a337[_0x5c0f80(0x267)]!==_0x5c0f80(0x355))return;const {env:_0x29e8f5,type:_0x4fa86f}=_0xa3a337;if(_0x29e8f5[_0x5c0f80(0x39c)]('~')||_0x4fa86f['startsWith']('~'))return;this['_pending'][_0x5c0f80(0x452)](_0x29e8f5+'\x00'+_0x4fa86f,{'env':_0x29e8f5,'type':_0x4fa86f}),this[_0x5c0f80(0x5c2)]();}[_0x2747f0(0x5c2)](){const _0x4d558b=_0x2747f0;if(this[_0x4d558b(0x2a5)])return;const _0x10cdbe=()=>{const _0x557fdd=_0x4d558b;this[_0x557fdd(0x2a5)]=null,this[_0x557fdd(0x24b)]()['catch'](()=>{});};this[_0x4d558b(0x2a5)]=setTimeout(_0x10cdbe,this[_0x4d558b(0x238)]>0x0?this[_0x4d558b(0x238)]:0x0);}async[_0x2747f0(0x24b)](){const _0x3c8b78=_0x2747f0;if(this[_0x3c8b78(0x4c8)]){this['_scheduleFlush']();return;}this[_0x3c8b78(0x4c8)]=!![];try{const _0x34a0c2=[...this[_0x3c8b78(0x5db)][_0x3c8b78(0x413)]()];this[_0x3c8b78(0x5db)][_0x3c8b78(0x471)]();let _0x532f69=![];for(const {env:_0x179b89,type:_0x496a50}of _0x34a0c2){try{const _0xcebaf8=await this['_drainOne'](_0x179b89,_0x496a50);if(_0xcebaf8)_0x532f69=!![];}catch{this[_0x3c8b78(0x5db)]['set'](_0x179b89+'\x00'+_0x496a50,{'env':_0x179b89,'type':_0x496a50}),_0x532f69=!![];}}if(_0x532f69||this[_0x3c8b78(0x5db)]['size']>0x0)this[_0x3c8b78(0x5c2)]();}finally{this['_draining']=![];}}async[_0x2747f0(0x57a)](_0x4fac03,_0x2fd6aa){const _0x2e3b66=_0x2747f0,_0x2832db=await this[_0x2e3b66(0x209)]['_openEnvLazy'](_0x4fac03),_0x3e14aa=_0x4fac03+'\x00'+_0x2fd6aa;!this[_0x2e3b66(0x32e)]['has'](_0x3e14aa)&&(!this['_baselines']['has'](_0x4fac03)&&(_0x2832db[_0x2e3b66(0x344)](),this[_0x2e3b66(0x508)]['set'](_0x4fac03,_0x2832db['getClock']()||0x0)),this['_cursors'][_0x2e3b66(0x452)](_0x3e14aa,this[_0x2e3b66(0x508)]['get'](_0x4fac03)));const _0x43c308=this[_0x2e3b66(0x32e)]['get'](_0x3e14aa),_0xa7a47c=_0x2832db['getClock'](_0x2fd6aa)||0x0;if(_0xa7a47c<=_0x43c308)return![];const _0x366345=_0x43c308+this['_quantum'],_0x351a89=Math['min'](_0xa7a47c,_0x366345),_0x28baf1=_0x176160['enabled']?_0x176160[_0x2e3b66(0x4ea)]():0x0,_0x4ed3dc=Array[_0x2e3b66(0x2b0)](_0x2832db[_0x2e3b66(0x539)](_0x2fd6aa,_0x43c308+0x1,_0x351a89));let _0xd9cd27=_0x43c308;for(const _0x53eee8 of _0x4ed3dc){const {clock:_0x5be8ff,key:_0x2f1dd6,action:_0x142f20,origin:_0x30fa31}=_0x53eee8;if(_0x5be8ff>_0xd9cd27)_0xd9cd27=_0x5be8ff;if(_0x2f1dd6==null)continue;if(!this['_markSeen'](_0x4fac03,_0x2fd6aa,_0x2f1dd6,_0x5be8ff))continue;let _0x24f961,_0x163545;if(_0x142f20===_0x1dbba3[_0x2e3b66(0x57f)])_0x24f961=_0x2e3b66(0x576),_0x163545=null;else{const _0x5e0971=_0x2832db[_0x2e3b66(0x363)](_0x2fd6aa,_0x2f1dd6);_0x5e0971==null?(_0x24f961=_0x2e3b66(0x576),_0x163545=null):(_0x24f961=_0x2e3b66(0x473),_0x163545=_0x5e0971);}this[_0x2e3b66(0x47c)](_0x2e3b66(0x396),{'env':_0x4fac03,'type':_0x2fd6aa,'key':_0x2f1dd6,'op':_0x24f961,'clock':_0x5be8ff,'origin':_0x30fa31,'value':_0x163545});}if(_0x176160[_0x2e3b66(0x3ce)])_0x176160[_0x2e3b66(0x5bc)](_0x2e3b66(0x256)+_0x4fac03+':'+_0x2fd6aa,_0x176160[_0x2e3b66(0x4ea)]()-_0x28baf1,'n='+_0x4ed3dc[_0x2e3b66(0x631)]);return this[_0x2e3b66(0x32e)][_0x2e3b66(0x452)](_0x3e14aa,Math[_0x2e3b66(0x555)](_0xd9cd27,_0x351a89)),_0x2832db[_0x2e3b66(0x4a8)](_0x2fd6aa)>_0x351a89;}[_0x2747f0(0x43f)](){const _0x25133d=_0x2747f0;return{'started':this[_0x25133d(0x3bb)],'quantum':this[_0x25133d(0x2a0)],'flushDebounce':this[_0x25133d(0x238)],'cursors':Object['fromEntries']([...this[_0x25133d(0x32e)][_0x25133d(0x699)]()][_0x25133d(0x272)](([_0xe02fb8,_0x4e9067])=>[_0xe02fb8[_0x25133d(0x2aa)]('\x00',':'),_0x4e9067])),'pending':this[_0x25133d(0x5db)][_0x25133d(0x4a9)],'seen':this[_0x25133d(0x39f)][_0x25133d(0x4a9)]};}}return _0x45a1ff['CHANGEFEED_QUANTUM']=_0xe27fe8,okdbChangefeed={'OKDBChangefeed':_0x45a1ff},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x5560ca=_0x42e206;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0xbe5340=require$$1$2,_0x2dd387=require$$1,{EVENTS:_0x386ea9}=requireOkdbEnums(),_0x10707d=require$$0,{slotKey:_0x228c70}=requireOkdbProcessRegistry(),_0x44f4c2=0xfa,_0xcdeae5=0xfa0,_0x8e97f8=0x5,_0x125526=0x2710,_0x62df41=0xbb8,_0x3d23e1=0x7d0,_0x2d146a=_0x5560ca(0x5d8),_0x16603e=_0x5560ca(0x5cd),_0x358db4=_0x5560ca(0x6a0),_0xa85062=_0x5560ca(0x521),_0x2a2c21=[_0x386ea9[_0x5560ca(0x412)],_0x386ea9[_0x5560ca(0x2d1)],_0x386ea9['FTS_DROP'],_0x386ea9[_0x5560ca(0x342)],_0x386ea9[_0x5560ca(0x605)],_0x386ea9[_0x5560ca(0x1ec)],_0x386ea9[_0x5560ca(0x4d5)],_0x386ea9[_0x5560ca(0x63d)],'processor:ready','processor:progress','processor:error','processor:paused','processor:resumed',_0x5560ca(0x684)],_0x4601b5=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0xe47d76({workers:_0x14a5e2,makeOkdb:_0x5cbdba,port:_0xa968e8,primaryOkdb:_0x4e6b8d,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x223ef9=_0x5560ca;if(_0xbe5340[_0x223ef9(0x23b)])return childEntry&&_0xbe5340[_0x223ef9(0x583)]({'exec':_0x2dd387[_0x223ef9(0x553)](__dirname,_0x223ef9(0x438)),'args':[],'execArgv':((()=>{const _0x28c04d=_0x223ef9,_0xf761cd=[];for(let _0x57c889=0x0;_0x57c889<process[_0x28c04d(0x5be)]['length'];_0x57c889++){const _0x4138bf=process[_0x28c04d(0x5be)][_0x57c889];if(_0x4138bf[_0x28c04d(0x39c)](_0x28c04d(0x3b0))||_0x4138bf[_0x28c04d(0x39c)](_0x28c04d(0x48f))||_0x4138bf[_0x28c04d(0x39c)](_0x28c04d(0x373)))continue;if(_0x4138bf==='-e'||_0x4138bf===_0x28c04d(0x394)||_0x4138bf==='-p'||_0x4138bf===_0x28c04d(0x677)){_0x57c889++;continue;}_0xf761cd[_0x28c04d(0x5fa)](_0x4138bf);}return _0xf761cd;})())}),_0x47be19({'workers':_0x14a5e2,'port':_0xa968e8,'primaryOkdb':_0x4e6b8d,'workerEnv':workerEnv});return _0x3cb0e4({'makeOkdb':_0x5cbdba,'port':_0xa968e8});}function _0x47be19({workers:_0x35d665,port:_0x59fbce,primaryOkdb:_0x43369e,workerEnv:_0x2df347}){const _0x37885e=_0x5560ca,_0x17a5be=new Map(),_0x2d6190=new Map();let _0x5ef346=![];const _0x188249=_0x3b5703=>_0x3b5703?.['__okdbSlot'],_0x1845c7=_0x1b5f49=>{const _0xc39557=_0x4d7d,_0x1fec63=_0xbe5340[_0xc39557(0x52a)]({...process.env,..._0x2df347||{},'OKDB_CLUSTER_SLOT':String(_0x1b5f49)});return _0x1fec63[_0xc39557(0x41c)]=_0x1b5f49,_0x17a5be[_0xc39557(0x452)](_0x1fec63[_0xc39557(0x68a)][_0xc39557(0x250)],{'worker':_0x1fec63,'startedAt':Date[_0xc39557(0x4ea)](),'slot':_0x1b5f49}),_0x1fec63['on'](_0xc39557(0x2e5),_0x22151c=>{const _0x20a45f=_0xc39557;console['log']('[okdb-cluster]\x20worker\x20pid='+_0x1fec63[_0x20a45f(0x68a)][_0x20a45f(0x250)]+_0x20a45f(0x56d)+(_0x22151c?.[_0x20a45f(0x62d)]??_0x22151c));}),_0x1fec63['on'](_0xc39557(0x337),()=>_0x1ef082()),_0x1fec63;},_0x17d13f=_0x11dcbd=>{const _0x1227d1=_0x4d7d;for(const {worker:_0x190d73}of _0x17a5be['values']()){if(_0x190d73[_0x1227d1(0x4e3)]()||!_0x190d73[_0x1227d1(0x218)]())continue;try{_0x190d73[_0x1227d1(0x4b6)](_0x11dcbd);}catch{}}};_0x43369e?.[_0x37885e(0x2cf)]?.({'kind':'primary','listenAddr':':'+_0x59fbce})[_0x37885e(0x45b)](()=>{}),_0x43369e?.['processes']?.[_0x37885e(0x42f)]?.({'workersConfigured':_0x35d665});const _0x4d71a0={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x1ef082=()=>{const _0x572446=_0x37885e,_0x13ca06=_0x43369e?.[_0x572446(0x5e6)];if(!_0x13ca06||!_0x13ca06[_0x572446(0x4b5)])return;const _0xbae90e=_0x13ca06[_0x572446(0x38e)];for(const {worker:_0x32c121,startedAt:_0x28766b,slot:_0x4a86c7,stats:_0x86bee7,processing:_0x2c0283}of _0x17a5be['values']()){if(_0x32c121[_0x572446(0x4e3)]())continue;const _0x170faa=_0x13ca06[_0x572446(0x38c)]?.()&&_0x13ca06[_0x572446(0x229)]('slot',_0x39793c(_0x4a86c7))?.[_0x572446(0x5f9)]===!![];_0x13ca06[_0x572446(0x444)]({'pid':_0x32c121[_0x572446(0x68a)]['pid'],'startedAt':_0x28766b,'kind':'http-server','supervisorKey':_0xbae90e,'slot':_0x4a86c7,'slotKey':_0x39793c(_0x4a86c7),'role':_0x4d71a0,'listenAddr':':'+_0x59fbce,'lifecycle':_0x170faa?_0x572446(0x27e):_0x572446(0x5fb),'processing':_0x2c0283??null,'stats':_0x86bee7??null})['catch'](()=>{});}},_0x39793c=_0x590ca4=>_0x228c70(_0x37885e(0x48d)+_0x59fbce,_0x590ca4),_0x3f28e6=_0x10a558=>{const _0x26cd91=_0x37885e,_0x2831af=_0x43369e?.[_0x26cd91(0x5e6)];if(!_0x2831af?.[_0x26cd91(0x38c)]?.())return![];return _0x2831af[_0x26cd91(0x229)](_0x26cd91(0x5c8),_0x39793c(_0x10a558))?.['decommission']===!![];};for(let _0x36aab7=0x0;_0x36aab7<_0x35d665;_0x36aab7++){const _0x315f6f=_0x3f28e6(_0x36aab7);_0x2d6190[_0x37885e(0x452)](_0x36aab7,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x315f6f,'respawnTimer':null}),_0x315f6f?console[_0x37885e(0x6a0)](_0x37885e(0x60f)+_0x36aab7+_0x37885e(0x59c)):_0x1845c7(_0x36aab7);}const _0x12fcfb=()=>{const _0x48fd8c=_0x37885e,_0x534bfc=_0x43369e?.[_0x48fd8c(0x5e6)];if(!_0x534bfc?.['_isWriter']||!_0x534bfc[_0x48fd8c(0x38c)]?.())return;for(const [_0x12be8a,_0x65d95]of _0x2d6190[_0x48fd8c(0x699)]()){const _0x2ea5c2=_0x534bfc[_0x48fd8c(0x229)](_0x48fd8c(0x5c8),_0x39793c(_0x12be8a)),_0x32d22a=_0x2ea5c2?.[_0x48fd8c(0x5f9)]===!![],_0x2dc4dd=_0x2ea5c2?.['kill']===!![];if(_0x32d22a&&!_0x65d95[_0x48fd8c(0x53d)]){_0x65d95['dead']=!![];_0x65d95[_0x48fd8c(0x333)]&&(clearTimeout(_0x65d95[_0x48fd8c(0x333)]),_0x65d95['respawnTimer']=null);for(const {worker:_0xf6b2ce}of _0x17a5be['values']()){if(_0x188249(_0xf6b2ce)!==_0x12be8a||_0xf6b2ce[_0x48fd8c(0x4e3)]())continue;try{if(_0x2dc4dd)_0xf6b2ce[_0x48fd8c(0x68a)][_0x48fd8c(0x442)](_0x48fd8c(0x242));else _0xf6b2ce[_0x48fd8c(0x218)]()&&_0xf6b2ce[_0x48fd8c(0x29c)]();}catch{}}console[_0x48fd8c(0x6a0)](_0x48fd8c(0x454)+(_0x2dc4dd?_0x48fd8c(0x4d7):_0x48fd8c(0x69b))+_0x48fd8c(0x5fe)+_0x12be8a+'\x20(durable\x20desired-state)');}else{if(!_0x32d22a&&_0x65d95['dead']&&_0x2ea5c2){_0x65d95[_0x48fd8c(0x53d)]=![],_0x65d95[_0x48fd8c(0x69a)]=[],_0x65d95[_0x48fd8c(0x550)]=0x0;const _0x2f6e8d=[..._0x17a5be[_0x48fd8c(0x413)]()]['some'](({worker:_0x2051a1})=>_0x188249(_0x2051a1)===_0x12be8a&&!_0x2051a1[_0x48fd8c(0x4e3)]());!_0x2f6e8d&&!_0x5ef346&&(_0x1845c7(_0x12be8a),console[_0x48fd8c(0x6a0)]('[okdb-cluster]\x20recommissioned\x20worker\x20slot='+_0x12be8a));}}}},_0x4a3c68=()=>{try{_0x12fcfb();}catch{}};_0x43369e?.[_0x37885e(0x2b2)]?.['on']?.(_0x386ea9['SYSTEM_PROC'],_0x4a3c68);const _0x468124=[];if(_0x43369e?.[_0x37885e(0x2b2)]?.['on'])for(const _0x454558 of _0x2a2c21){const _0x33bfd4=_0x507b09=>{_0x17d13f({[_0x2d146a]:_0x16603e,'event':_0x454558,'data':_0x507b09??{}});};_0x43369e[_0x37885e(0x2b2)]['on'](_0x454558,_0x33bfd4),_0x468124[_0x37885e(0x5fa)]({'event':_0x454558,'handler':_0x33bfd4});}const _0xa3f56c=setInterval(()=>{_0x12fcfb(),_0x1ef082();},_0x4601b5);_0xa3f56c[_0x37885e(0x4bd)]?.();const _0x3f7b88=(_0x1e7022,_0x322c27)=>{const _0x41236d=_0x37885e;if(!_0x322c27||typeof _0x322c27!=='object'||_0x322c27[_0x2d146a]!==_0x358db4)return;if(!_0x43369e?.['log']?.[_0x41236d(0x1eb)])return;const _0x1d0ce8=_0x322c27[_0x41236d(0x241)]||{};_0x43369e[_0x41236d(0x6a0)][_0x41236d(0x1eb)]({..._0x1d0ce8,'msg':'[w'+_0x322c27[_0x41236d(0x5c8)]+']\x20'+(_0x1d0ce8[_0x41236d(0x40f)]??''),'meta':{..._0x1d0ce8[_0x41236d(0x208)]||{},'worker':_0x322c27['slot'],'workerPid':_0x322c27['pid']}});};_0xbe5340['on'](_0x37885e(0x62d),_0x3f7b88);const _0x52eda8=(_0x5bfa28,_0x26ceb0)=>{const _0x3992c0=_0x37885e;if(!_0x26ceb0||typeof _0x26ceb0!==_0x3992c0(0x5c0)||_0x26ceb0[_0x2d146a]!==_0xa85062)return;const _0x530001=_0x17a5be['get'](_0x5bfa28[_0x3992c0(0x68a)][_0x3992c0(0x250)]);if(_0x530001){_0x530001['stats']={..._0x26ceb0[_0x3992c0(0x521)],'at':Date[_0x3992c0(0x4ea)]()};if(_0x26ceb0['processing']!==undefined)_0x530001[_0x3992c0(0x407)]=_0x26ceb0[_0x3992c0(0x407)];}};_0xbe5340['on'](_0x37885e(0x62d),_0x52eda8),_0xbe5340['on'](_0x37885e(0x234),(_0x18bd3f,_0x260f09,_0x431f3a)=>{const _0x37ef72=_0x37885e,_0x512b11=_0x18bd3f[_0x37ef72(0x68a)][_0x37ef72(0x250)],_0x2226b4=_0x188249(_0x18bd3f),_0x4bd94d=_0x17a5be[_0x37ef72(0x363)](_0x512b11);if(_0x4bd94d&&_0x43369e?.[_0x37ef72(0x5e6)])_0x43369e[_0x37ef72(0x5e6)]['removeNode'](_0x512b11+':'+_0x4bd94d['startedAt'])[_0x37ef72(0x45b)](()=>{});_0x17a5be[_0x37ef72(0x472)](_0x512b11),console[_0x37ef72(0x6a0)](_0x37ef72(0x1ef)+_0x512b11+_0x37ef72(0x2b1)+(_0x2226b4??'?')+_0x37ef72(0x4cc)+('(code='+_0x260f09+_0x37ef72(0x436)+(_0x431f3a??_0x37ef72(0x61e))+_0x37ef72(0x24a)+_0x17a5be['size']+_0x37ef72(0x217))),_0x1ef082();if(_0x5ef346||_0x2226b4==null)return;const _0x127d16=_0x2d6190[_0x37ef72(0x363)](_0x2226b4);if(!_0x127d16||_0x127d16[_0x37ef72(0x53d)])return;const _0x2045b4=Date[_0x37ef72(0x4ea)]();_0x127d16[_0x37ef72(0x69a)][_0x37ef72(0x5fa)](_0x2045b4),_0x127d16[_0x37ef72(0x69a)]=_0x127d16['deaths'][_0x37ef72(0x4e0)](_0x35f2c8=>_0x2045b4-_0x35f2c8<=_0x125526);if(_0x127d16[_0x37ef72(0x69a)][_0x37ef72(0x631)]>=_0x8e97f8){_0x127d16['dead']=!![],console[_0x37ef72(0x2e5)]('[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot='+_0x2226b4+_0x37ef72(0x4a1)+_0x127d16[_0x37ef72(0x69a)][_0x37ef72(0x631)]+'\x20times\x20in\x20'+(_0x125526+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x17a5be[_0x37ef72(0x4a9)]+_0x37ef72(0x534)));return;}_0x127d16[_0x37ef72(0x550)]++;const _0x39341f=Math[_0x37ef72(0x368)](_0xcdeae5,_0x44f4c2*0x2**(_0x127d16[_0x37ef72(0x550)]-0x1));console[_0x37ef72(0x6a0)](_0x37ef72(0x362)+_0x2226b4+'\x20in\x20'+_0x39341f+_0x37ef72(0x1e2)+_0x127d16[_0x37ef72(0x550)]+')'),_0x127d16[_0x37ef72(0x333)]=setTimeout(()=>{const _0xaa2bea=_0x37ef72;_0x127d16[_0xaa2bea(0x333)]=null;if(_0x5ef346||_0x127d16[_0xaa2bea(0x53d)])return;const _0x47f1d4=_0x1845c7(_0x2226b4);_0x47f1d4[_0xaa2bea(0x625)]('listening',()=>{const _0x3a107b=_0xaa2bea;if(_0x2d6190[_0x3a107b(0x363)](_0x2226b4)===_0x127d16)_0x127d16[_0x3a107b(0x550)]=0x0;});},_0x39341f),_0x127d16[_0x37ef72(0x333)][_0x37ef72(0x4bd)]?.();});const _0x386c76=[..._0x17a5be['keys']()];console[_0x37885e(0x6a0)](_0x37885e(0x46d)+process[_0x37885e(0x250)]+_0x37885e(0x320)+_0x35d665+_0x37885e(0x36a)+_0x59fbce+':\x20'+('['+_0x386c76[_0x37885e(0x553)](',\x20')+']'));const _0x1f83e1={'_isClusterController':!![],'port':_0x59fbce,'primaryOkdb':_0x43369e??null,'status'(){const _0x589a5f=_0x37885e;return{'clustered':!![],'primaryPid':process[_0x589a5f(0x250)],'port':_0x59fbce,'primaryRole':_0x43369e?.['role']??null,'processorPid':null,'supervisorPid':process['pid'],'workers':[..._0x17a5be[_0x589a5f(0x413)]()][_0x589a5f(0x272)](({worker:_0xe73860})=>({'pid':_0xe73860[_0x589a5f(0x68a)]['pid'],'id':_0xe73860['id'],'dead':_0xe73860[_0x589a5f(0x4e3)]()}))};},async 'close'(){const _0x3c4f02=_0x37885e;_0x5ef346=!![];for(const _0x229ccf of _0x2d6190['values']()){_0x229ccf[_0x3c4f02(0x53d)]=!![],_0x229ccf['respawnTimer']&&(clearTimeout(_0x229ccf['respawnTimer']),_0x229ccf[_0x3c4f02(0x333)]=null);}clearInterval(_0xa3f56c),_0xbe5340[_0x3c4f02(0x4fa)](_0x3c4f02(0x62d),_0x3f7b88),_0xbe5340[_0x3c4f02(0x4fa)](_0x3c4f02(0x62d),_0x52eda8),_0x43369e?.[_0x3c4f02(0x2b2)]?.[_0x3c4f02(0x4fa)]?.(_0x386ea9[_0x3c4f02(0x630)],_0x4a3c68);if(_0x43369e?.['events']?.[_0x3c4f02(0x4fa)])for(const {event:_0x133323,handler:_0x3c7c60}of _0x468124){try{_0x43369e['events']['off'](_0x133323,_0x3c7c60);}catch{}}_0x468124[_0x3c4f02(0x631)]=0x0;const _0xc18537=[..._0x17a5be[_0x3c4f02(0x413)]()]['map'](({worker:_0x2fd7d9})=>_0x2fd7d9);if(_0xc18537[_0x3c4f02(0x631)]===0x0)return;await Promise['all'](_0xc18537[_0x3c4f02(0x272)](_0x4d0008=>new Promise(_0x764599=>{const _0x273f63=_0x3c4f02;if(_0x4d0008[_0x273f63(0x4e3)]()){_0x764599();return;}let _0x4ffcc6=![];const _0xe35075=()=>{if(_0x4ffcc6)return;_0x4ffcc6=!![];if(_0x7f59f6)clearTimeout(_0x7f59f6);_0x764599();};_0x4d0008[_0x273f63(0x625)](_0x273f63(0x234),_0xe35075);const _0x7f59f6=setTimeout(()=>{const _0x2c72d8=_0x273f63;try{_0x4d0008[_0x2c72d8(0x68a)]['kill']();}catch{}},_0x62df41+0x1f4);_0x7f59f6[_0x273f63(0x4bd)]?.();try{_0x4d0008[_0x273f63(0x29c)]();}catch{try{_0x4d0008[_0x273f63(0x68a)][_0x273f63(0x442)]();}catch{}}})));}};return _0x1f83e1;}async function _0x3cb0e4({makeOkdb:_0x186e1d,port:_0x504c3e}){const _0x44a40b=_0x5560ca,_0x4d0792=await _0x186e1d();return _0x323786(_0x4d0792),_0x4d0792[_0x44a40b(0x48c)][_0x44a40b(0x3f5)](_0x504c3e);}function _0x323786(_0x50322b){const _0x302851=_0x5560ca;if(!_0x50322b||_0x50322b[_0x302851(0x66f)])return;_0x50322b[_0x302851(0x66f)]=!![];try{const {OKDBChangefeed:_0x10ba82}=requireOkdbChangefeed(),_0x179960=_0x50322b[_0x302851(0x5b6)];if(_0x179960&&typeof _0x179960['attachFeed']===_0x302851(0x3ec)){const _0x4db714=new _0x10ba82(_0x50322b);_0x4db714['start'](),_0x179960[_0x302851(0x485)](_0x4db714),_0x50322b[_0x302851(0x3d8)]=_0x4db714;}}catch(_0x262e33){_0x50322b[_0x302851(0x6a0)]?.[_0x302851(0x316)]?.(_0x302851(0x354)+(_0x262e33?.[_0x302851(0x62d)]??_0x262e33),{'feature':_0x302851(0x409)});}const _0x2e091c=_0x2c0d05=>{const _0x3bdfa5=_0x302851;if(!_0x2c0d05||typeof _0x2c0d05!==_0x3bdfa5(0x5c0)||_0x2c0d05[_0x2d146a]==null)return;if(_0x2c0d05[_0x2d146a]===_0x16603e)try{_0x50322b[_0x3bdfa5(0x5b6)]?.[_0x3bdfa5(0x4ff)]?.(_0x2c0d05[_0x3bdfa5(0x38d)],_0x2c0d05[_0x3bdfa5(0x207)]);}catch{}};process['on']('message',_0x2e091c),_0x50322b[_0x302851(0x2a2)]=_0x2e091c;{let _0x5543f4=process['cpuUsage'](),_0x40293b=Date['now']();const _0x17a696=()=>{const _0x53b446=_0x302851;if(typeof process[_0x53b446(0x4b6)]!==_0x53b446(0x3ec)||!process[_0x53b446(0x695)])return;const _0x4d3c80=Date[_0x53b446(0x4ea)](),_0x17e42b=process[_0x53b446(0x4ca)](),_0x224ce1=(_0x4d3c80-_0x40293b)*0x3e8,_0x17521b=_0x17e42b[_0x53b446(0x3b1)]-_0x5543f4[_0x53b446(0x3b1)]+(_0x17e42b[_0x53b446(0x58a)]-_0x5543f4['system']),_0x5ed037=_0x224ce1>0x0?Math[_0x53b446(0x368)](0x64,Math[_0x53b446(0x2fb)](_0x17521b/(_0x224ce1*(_0x10707d[_0x53b446(0x23a)]()[_0x53b446(0x631)]||0x1))*0x64)):0x0;_0x5543f4=_0x17e42b,_0x40293b=_0x4d3c80;const _0x5d602a=process[_0x53b446(0x565)]();let _0x9b74f=null;try{_0x9b74f=_0x50322b[_0x53b446(0x269)]?.['processors']?_0x50322b[_0x53b446(0x5e6)]?.[_0x53b446(0x400)]?.()??null:null;}catch{}try{process[_0x53b446(0x4b6)]({[_0x2d146a]:_0xa85062,'stats':{'rss':_0x5d602a[_0x53b446(0x2d3)],'heapUsed':_0x5d602a['heapUsed'],'heapTotal':_0x5d602a[_0x53b446(0x56e)],'external':_0x5d602a[_0x53b446(0x488)],'cpuPct':_0x5ed037,'cpuWindowMs':Math[_0x53b446(0x2fb)](_0x224ce1/0x3e8)||null},'processing':_0x9b74f});}catch{}},_0x1d06e6=Math['max'](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0xe26996=setInterval(_0x17a696,_0x1d06e6);_0xe26996[_0x302851(0x4bd)]?.(),_0x17a696();for(const _0x5c02f2 of[_0x302851(0x3de),_0x302851(0x540)]){_0x50322b[_0x302851(0x2b2)]?.['on']?.(_0x5c02f2,()=>{try{_0x17a696();}catch{}});}}let _0x49704c=![];const _0x1f136c=async _0x5e864e=>{const _0x5eaf05=_0x302851;if(_0x49704c)return;_0x49704c=!![];const _0xb51edc=setTimeout(()=>process['exit'](_0x5e864e),_0x62df41);_0xb51edc[_0x5eaf05(0x4bd)]?.();try{await _0x50322b[_0x5eaf05(0x519)]?.();}catch{}process[_0x5eaf05(0x234)](_0x5e864e);};process['on'](_0x302851(0x29c),()=>_0x1f136c(0x0));if(process[_0x302851(0x67b)]!==_0x302851(0x2cc)){const _0x417aa4=setInterval(()=>{const _0x405293=_0x302851;if(process[_0x405293(0x554)]===0x1)_0x1f136c(0x0);},_0x3d23e1);_0x417aa4[_0x302851(0x4bd)]?.(),_0x50322b['_clusterOrphanWatch']=_0x417aa4;}}return okdbCluster={'runClustered':_0xe47d76,'attachWorkerCluster':_0x323786},okdbCluster;}var hasRequiredOkdb;function requireOkdb(){const _0x448381=_0x42e206;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process['loadEnvFile']();}catch{}const _0xf46ca3=require$$1,_0x3d0262=require$$1$1,{resolveWorkers:_0x23bf33,isShmbufNative:_0x47ed2b}=requireOkdbWorkers();function _0xfc27a3(_0x4622a9){const _0x43826d=_0x4d7d,_0x39c042=_0x4622a9[_0x43826d(0x608)](0x2),_0x75b74d={};let _0x44ddba=0x0;while(_0x44ddba<_0x39c042[_0x43826d(0x631)]){const _0x2ba684=_0x39c042[_0x44ddba];if(_0x2ba684===_0x43826d(0x5b1)||_0x2ba684==='-p')_0x75b74d[_0x43826d(0x43c)]=Number(_0x39c042[++_0x44ddba]);else{if(_0x2ba684==='--path'||_0x2ba684==='-d')_0x75b74d['path']=_0x39c042[++_0x44ddba];else{if(_0x2ba684===_0x43826d(0x464)||_0x2ba684==='-k')_0x75b74d[_0x43826d(0x505)]=_0x39c042[++_0x44ddba];else{if(_0x2ba684===_0x43826d(0x21b)||_0x2ba684==='-c')_0x75b74d[_0x43826d(0x39e)]=_0x39c042[++_0x44ddba];else{if(_0x2ba684===_0x43826d(0x5ce))_0x75b74d['logLevel']=_0x39c042[++_0x44ddba];else{if(_0x2ba684===_0x43826d(0x55e))_0x75b74d[_0x43826d(0x5ae)]=!![];else{if(_0x2ba684==='--no-admin')_0x75b74d[_0x43826d(0x497)]=!![];else{if(_0x2ba684===_0x43826d(0x535))_0x75b74d[_0x43826d(0x284)]=_0x39c042[++_0x44ddba];else{if(_0x2ba684===_0x43826d(0x2ec))_0x75b74d['noCluster']=!![];else{if(_0x2ba684===_0x43826d(0x55d)||_0x2ba684==='-e')_0x75b74d[_0x43826d(0x35e)]=_0x39c042[++_0x44ddba];else{if(_0x2ba684===_0x43826d(0x3e7))_0x75b74d[_0x43826d(0x1e6)]=_0x39c042[++_0x44ddba];else{if(_0x2ba684===_0x43826d(0x47d))_0x75b74d[_0x43826d(0x4fd)]=!![];else{if(_0x2ba684===_0x43826d(0x446))_0x75b74d['blobs']=!![];else{if(_0x2ba684===_0x43826d(0x1df))_0x75b74d[_0x43826d(0x26b)]=!![];else{if(_0x2ba684===_0x43826d(0x392)){const _0x2aef59=[];while(_0x44ddba+0x1<_0x39c042[_0x43826d(0x631)]&&!_0x39c042[_0x44ddba+0x1][_0x43826d(0x39c)]('--')){_0x2aef59[_0x43826d(0x5fa)](_0x39c042[++_0x44ddba]);}_0x75b74d[_0x43826d(0x1db)]=_0x2aef59[_0x43826d(0x631)]>0x0?_0x2aef59:!![];}else{if(_0x2ba684==='--log-requests')_0x75b74d[_0x43826d(0x486)]=!![];else{if(_0x2ba684===_0x43826d(0x44d))_0x75b74d[_0x43826d(0x58f)]=_0x39c042[++_0x44ddba];else{if(_0x2ba684===_0x43826d(0x5d5))_0x75b74d[_0x43826d(0x3c8)]=_0x39c042[++_0x44ddba];else{if(_0x2ba684===_0x43826d(0x313))_0x75b74d[_0x43826d(0x236)]=_0x39c042[++_0x44ddba];else{if(_0x2ba684===_0x43826d(0x64a))_0x75b74d[_0x43826d(0x1fd)]=_0x39c042[++_0x44ddba];else{if(_0x2ba684==='--grants')_0x75b74d[_0x43826d(0x34e)]=_0x39c042[++_0x44ddba];else{if(_0x2ba684===_0x43826d(0x411))_0x75b74d[_0x43826d(0x529)]=_0x39c042[++_0x44ddba];else{if(_0x2ba684===_0x43826d(0x2ad))_0x75b74d[_0x43826d(0x3f9)]=_0x39c042[++_0x44ddba];else{if(_0x2ba684==='--username'||_0x2ba684==='-u')_0x75b74d['username']=_0x39c042[++_0x44ddba];else{if(_0x2ba684==='--address')_0x75b74d[_0x43826d(0x3f8)]=_0x39c042[++_0x44ddba];else{if(_0x2ba684===_0x43826d(0x451)||_0x2ba684==='-v'){const _0x33867c=require$$3;console[_0x43826d(0x6a0)](_0x33867c['version']),process[_0x43826d(0x234)](0x0);}else(_0x2ba684===_0x43826d(0x3d9)||_0x2ba684==='-h')&&(_0x19f71a(),process[_0x43826d(0x234)](0x0));}}}}}}}}}}}}}}}}}}}}}}}}}_0x44ddba++;}return _0x75b74d;}function _0x19f71a(){console['log']('\x0a\x20\x20okdb\x20—\x20standalone\x20OKDB\x20server\x0a\x0a\x20\x20Usage:\x0a\x20\x20\x20\x20okdb\x20[options]\x0a\x20\x20\x20\x20okdb\x20<command>\x0a\x0a\x20\x20Options:\x0a\x20\x20\x20\x20-p,\x20--port\x20<port>\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x20(default:\x208484)\x0a\x20\x20\x20\x20-d,\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x20(default:\x20./okdb-data)\x0a\x20\x20\x20\x20-k,\x20--key\x20\x20<secret>\x20\x20\x20\x20\x20\x20Encryption\x20key\x20for\x20data\x20at\x20rest\x0a\x20\x20\x20\x20-c,\x20--config\x20<file>\x20\x20\x20\x20\x20\x20Config\x20file\x20path\x20(default:\x20.kdbconfig)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-level\x20<level>\x20\x20Log\x20level:\x20debug\x20|\x20info\x20|\x20warn\x20|\x20error\x20(default:\x20info)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-repl\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20without\x20interactive\x20shell\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-admin\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20\x20\x20\x20\x20--open\x20[ip\x20...]\x20\x20\x20\x20\x20\x20Open\x20mode:\x20bypass\x20auth\x20for\x20listed\x20IPs\x20(default:\x20localhost).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Examples:\x20--open\x20\x20--open\x20192.168.1.0/24\x20\x20--open\x20*\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-requests\x20\x20\x20\x20\x20\x20\x20Print\x20every\x20HTTP\x20request\x20to\x20stdout\x20(for\x20debugging)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--workers\x20<n>\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20capable\x20worker\x20processes\x20sharing\x20the\x20listen\x20socket\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(default:\x20cores\x20−\x201).\x20Each\x20worker\x20serves\x20HTTP\x20+\x20SSE\x20AND\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20processes\x20(claims\x20leases,\x20drains\x20on\x20its\x20own\x20loop);\x20the\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20cluster\x20primary\x20is\x20a\x20thin\x20passive\x20supervisor.\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-cluster\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20single-process\x20(equivalent\x20to\x20--workers\x201)\x0a\x20\x20\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x0a\x20\x20Commands:\x0a\x20\x20\x20\x20version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20doctor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20health\x20checks\x0a\x20\x20\x20\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20.kdbconfig\x20and\x20okdb-data/\x0a\x20\x20\x20\x20token\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20a\x20token\x20in\x20the\x20local\x20DB\x20(direct\x20access,\x20no\x20HTTP)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--name\x20<name>\x20\x20\x20\x20\x20\x20For\x20password\x20login\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<pass>\x20\x20Password\x20(requires\x20--name)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--label\x20<text>\x20\x20\x20\x20\x20Human\x20description\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--permissions\x20<l>\x20\x20Comma-separated\x20baseline\x20permissions\x20(e.g.\x20\x22*\x22\x20or\x20\x22data:read\x22)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--grants\x20<json>\x20\x20\x20\x20Per-env\x20grants\x20as\x20JSON\x20(e.g.\x20\x27{\x22orders\x22:[\x22data:*\x22]}\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--ttl\x20<ms>\x20\x20\x20\x20\x20\x20\x20\x20\x20Optional\x20TTL\x20in\x20milliseconds\x0a\x20\x20\x20\x20token\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20all\x20tokens\x20in\x20the\x20local\x20DB\x0a\x20\x20\x20\x20token\x20revoke\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20Revoke\x20(delete)\x20a\x20token\x20by\x20id\x20(full\x20uuid\x20or\x20unique\x20prefix)\x0a\x20\x20\x20\x20join\x20<address>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Join\x20an\x20existing\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--token\x20<t>\x20\x20\x20\x20\x20\x20\x20\x20Bearer\x20token\x20from\x20the\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--username\x20<u>\x20\x20\x20\x20\x20Or,\x20username\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<p>\x20\x20\x20\x20\x20Password\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--address\x20<addr>\x20\x20\x20This\x20node\x27s\x20reachable\x20sync\x20address\x20(required)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20Local\x20DB\x20path\x0a\x20\x20\x20\x20backup\x20[dir]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Hot\x20filesystem\x20backup\x20via\x20LMDB\x20native\x20copy\x20(default:\x20./okdb-backup)\x0a\x20\x20\x20\x20export\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20export\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20env\x20to\x20export\x20(default:\x20default)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20comma-separated\x20type\x20filter\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20include\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20export\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20import\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20import\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20target\x20env\x20override\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20import\x20only\x20these\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--drop\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20drop\x20&\x20recreate\x20existing\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20restore\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20import\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20and\x20recreate\x20database\x20(with\x20confirmation);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20node\x20identity\x20and\x20licenses\x20are\x20preserved\x0a\x20\x20\x20\x20license\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20stored\x20licenses,\x20current\x20tier,\x20and\x20usage\x0a\x20\x20\x20\x20license\x20<blob|path>\x20\x20\x20\x20\x20\x20Add\x20a\x20license\x20blob\x20(or\x20read\x20from\x20a\x20.license\x20file)\x0a\x20\x20\x20\x20license\x20<activation>\x20\x20\x20\x20\x20Activate\x20a\x20previously-added\x20license\x20with\x20the\x20vendor\x27s\x20token\x0a\x20\x20\x20\x20license\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20details\x20for\x20one\x20stored\x20license\x20(by\x20uuid\x20or\x20prefix)\x0a\x20\x20\x20\x20license\x20remove\x20<id>\x20\x20\x20\x20\x20\x20Remove\x20a\x20stored\x20license\x0a\x0a\x20\x20Environment\x20variables:\x0a\x20\x20\x20\x20OKDB_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x0a\x20\x20\x20\x20OKDB_PATH\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x0a\x20\x20\x20\x20OKDB_LOG_LEVEL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log\x20level\x20(debug|info|warn|error)\x0a\x20\x20\x20\x20OKDB_KEY\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Encryption\x20key\x0a\x20\x20\x20\x20OKDB_NO_REPL=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20REPL\x0a\x20\x20\x20\x20OKDB_NO_ADMIN=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20OKDB_HTTP_WORKERS\x20\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20passive\x20HTTP\x20worker\x20processes\x20(default:\x20cores\x20−\x201;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20forced\x20to\x201\x20if\x20the\x20shmbuf\x20native\x20binding\x20is\x20unavailable)\x0a\x0a\x20\x20Config\x20file\x20(.kdbconfig)\x20—\x20JSON,\x20all\x20keys\x20optional:\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22port\x22:\x20\x20\x20\x20\x208484,\x0a\x20\x20\x20\x20\x20\x20\x22path\x22:\x20\x20\x20\x20\x20\x22./okdb-data\x22,\x0a\x20\x20\x20\x20\x20\x20\x22key\x22:\x20\x20\x20\x20\x20\x20\x22...\x22,\x0a\x20\x20\x20\x20\x20\x20\x22logLevel\x22:\x20\x22info\x22,\x0a\x20\x20\x20\x20\x20\x20\x22noAdmin\x22:\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22noRepl\x22:\x20\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22auth\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22open\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20Examples:\x0a\x20\x20\x20\x20okdb\x0a\x20\x20\x20\x20okdb\x20--port\x209000\x20--path\x20./mydb\x0a\x20\x20\x20\x20okdb\x20--no-repl\x20--port\x208080\x0a\x20\x20\x20\x20okdb\x20--open\x0a\x20\x20\x20\x20okdb\x20--open\x20192.168.1.0/24\x0a\x20\x20\x20\x20okdb\x20doctor\x0a\x20\x20\x20\x20okdb\x20backup\x20./my-backup\x0a');}const _0x29ed62=new Set(['debug','info',_0x448381(0x316),_0x448381(0x2e5)]);function _0x1f8f79(_0x89df29){const _0x497843=_0x448381,_0x37cbc0=_0x89df29['config']?_0xf46ca3[_0x497843(0x2f9)](_0x89df29[_0x497843(0x39e)]):_0xf46ca3[_0x497843(0x2f9)](_0x497843(0x4dc));let _0x411da4={};if(_0x3d0262[_0x497843(0x647)](_0x37cbc0))try{const _0x5c8620=_0x3d0262[_0x497843(0x2bd)](_0x37cbc0,_0x497843(0x5a6))['replace'](/^\uFEFF/,'');_0x411da4=JSON[_0x497843(0x42a)](_0x5c8620),console[_0x497843(0x6a0)](_0x497843(0x30e)+_0x37cbc0);}catch(_0x50556c){console[_0x497843(0x2e5)](_0x497843(0x5e2)+_0x37cbc0+':\x20'+_0x50556c['message']),process['exit'](0x1);}const _0x3ccc9d={'port':process.env.OKDB_PORT?Number(process.env.OKDB_PORT):undefined,'path':process.env.OKDB_PATH??undefined,'key':process.env.OKDB_KEY??undefined,'logLevel':process.env.OKDB_LOG_LEVEL??undefined,'noRepl':process.env.OKDB_NO_REPL==='1'?!![]:undefined,'noAdmin':process.env.OKDB_NO_ADMIN==='1'?!![]:undefined},_0x1d6173={'port':_0x89df29[_0x497843(0x43c)]??_0x411da4[_0x497843(0x43c)]??_0x3ccc9d[_0x497843(0x43c)]??0x2124,'dbPath':_0x89df29[_0x497843(0x47b)]??_0x411da4[_0x497843(0x47b)]??_0x3ccc9d[_0x497843(0x47b)]??_0x497843(0x59f),'key':_0x89df29['key']??_0x411da4[_0x497843(0x505)]??_0x3ccc9d[_0x497843(0x505)]??undefined,'logLevel':_0x89df29[_0x497843(0x482)]??_0x411da4[_0x497843(0x482)]??_0x3ccc9d[_0x497843(0x482)]??_0x497843(0x2ee),'noRepl':_0x89df29[_0x497843(0x5ae)]??_0x411da4['noRepl']??_0x3ccc9d['noRepl']??![],'noAdmin':_0x89df29['noAdmin']??_0x411da4[_0x497843(0x497)]??_0x3ccc9d[_0x497843(0x497)]??![],'admin':_0x411da4['admin']??{},'api':_0x411da4[_0x497843(0x65c)]??undefined,'auth':_0x411da4[_0x497843(0x5a0)]??undefined,'mcp':_0x411da4['mcp']??undefined,'http':_0x411da4[_0x497843(0x48c)]??undefined,'timeMachine':_0x411da4[_0x497843(0x38b)]!==![]?_0x411da4[_0x497843(0x38b)]??{}:![]};if(_0x89df29['noCluster'])_0x1d6173[_0x497843(0x329)]=!![];if(_0x89df29[_0x497843(0x284)]!==undefined)_0x1d6173[_0x497843(0x286)]=_0x89df29[_0x497843(0x284)];return _0x89df29[_0x497843(0x1db)]!==undefined&&(_0x1d6173['auth']=_0x1d6173[_0x497843(0x5a0)]||{},_0x1d6173[_0x497843(0x5a0)][_0x497843(0x1db)]=_0x89df29[_0x497843(0x1db)]),_0x89df29[_0x497843(0x486)]&&(_0x1d6173['debug']=_0x1d6173[_0x497843(0x441)]||{},_0x1d6173[_0x497843(0x441)]['logRequests']=!![]),(!Number[_0x497843(0x5bd)](_0x1d6173[_0x497843(0x43c)])||_0x1d6173[_0x497843(0x43c)]<0x1||_0x1d6173['port']>0xffff)&&(console[_0x497843(0x2e5)](_0x497843(0x283)+_0x1d6173[_0x497843(0x43c)]+_0x497843(0x26d)),process[_0x497843(0x234)](0x1)),!_0x29ed62[_0x497843(0x258)](_0x1d6173[_0x497843(0x482)])&&(console[_0x497843(0x2e5)](_0x497843(0x54b)+_0x1d6173['logLevel']+'\x22\x20(must\x20be\x20debug|info|warn|error)'),process[_0x497843(0x234)](0x1)),_0x1d6173;}function _0x256bf3(_0x5ac21d){const _0x59983c=_0x448381;return!!(_0x5ac21d&&typeof _0x5ac21d===_0x59983c(0x5c0)&&!Array[_0x59983c(0x59a)](_0x5ac21d)&&Object[_0x59983c(0x5cf)](_0x5ac21d)['length']>0x0);}function _0x38d5ca(_0x1f9505){const _0x2f5c87=_0x448381;return{..._0x1f9505[_0x2f5c87(0x505)]?{'encryptionKey':_0x1f9505[_0x2f5c87(0x505)]}:{},'engines':![],'processors':![],'compaction':![]};}const _0x1bca5c=!process[_0x448381(0x445)]['isTTY']||!!process.env.NO_COLOR;function _0x201346(_0x1ddd6f,_0x49211d){const _0x3e0e6a=_0x448381;return _0x1bca5c?_0x49211d:'\x1b['+_0x1ddd6f+'m'+_0x49211d+_0x3e0e6a(0x528);}function _0x1235e7(_0x45bdcf){const _0x49ae72=_0x448381;if(!_0x45bdcf||_0x45bdcf[_0x49ae72(0x631)]===0x0)return;const _0xaad2fd='─'['repeat'](0x38);process[_0x49ae72(0x434)][_0x49ae72(0x2d0)]('\x0a'),process[_0x49ae72(0x434)][_0x49ae72(0x2d0)](_0x201346('33',_0x49ae72(0x2c1)+_0x45bdcf['length']+'\x20SECURITY\x20NOTICE'+(_0x45bdcf['length']>0x1?'S':'')+'\x0a')),process[_0x49ae72(0x434)][_0x49ae72(0x2d0)]('\x20\x20'+_0xaad2fd+'\x0a');for(const _0x208235 of _0x45bdcf){const _0x3289fe=_0x208235[_0x49ae72(0x385)]===_0x49ae72(0x2e5)?_0x201346('31',_0x49ae72(0x271)):_0x201346('33',_0x49ae72(0x51c));process[_0x49ae72(0x434)]['write'](_0x3289fe+'\x20\x20'+_0x201346('1',_0x208235['title'])+'\x0a'),process['stderr']['write'](_0x49ae72(0x545)+_0x208235[_0x49ae72(0x62d)]+'\x0a');if(_0x208235[_0x49ae72(0x4ce)])process['stderr']['write'](_0x49ae72(0x545)+_0x201346('2','Hint:\x20'+_0x208235[_0x49ae72(0x4ce)])+'\x0a');process[_0x49ae72(0x434)][_0x49ae72(0x2d0)]('\x0a');}process[_0x49ae72(0x434)][_0x49ae72(0x2d0)]('\x20\x20'+_0xaad2fd+'\x0a\x0a');}function _0x43c2d5(_0x3b7ecc,_0x3c9b53,_0x5abc5e={}){const _0x83ef31=_0x448381,_0x2d8999=_0x3b7ecc[_0x83ef31(0x48c)][_0x83ef31(0x3f5)](_0x3c9b53,_0x5abc5e);if(_0x2d8999&&_0x2d8999[_0x83ef31(0x25a)])return Promise[_0x83ef31(0x2f9)](_0x2d8999);return new Promise((_0x15a803,_0x19a6d1)=>{const _0xd67fb=_0x83ef31;_0x2d8999['once']('listening',_0x15a803),_0x2d8999[_0xd67fb(0x625)](_0xd67fb(0x2e5),_0x19a6d1);});}async function _0x2f5a4b(_0x358570){const _0x3f55cf=_0x448381,_0x133c58=require$$4$1;console[_0x3f55cf(0x6a0)](_0x3f55cf(0x58e));let _0x4538e1=!![];const _0x4e8d89=(_0x1f19ce,_0x1718b6)=>{const _0x580866=_0x3f55cf;console[_0x580866(0x6a0)]('\x20\x20'+(_0x1f19ce?'✓':'✗')+'\x20'+_0x1718b6);if(!_0x1f19ce)_0x4538e1=![];},_0x4e0969=Number(process[_0x3f55cf(0x29a)]['replace']('v','')[_0x3f55cf(0x4f0)]('.')[0x0]);_0x4e8d89(_0x4e0969>=0x12,_0x3f55cf(0x649)+process[_0x3f55cf(0x29a)]+(_0x4e0969<0x12?'\x20\x20(need\x20≥\x2018)':''));const _0x293197=_0xf46ca3[_0x3f55cf(0x2f9)](_0x358570[_0x3f55cf(0x57b)]);try{_0x3d0262[_0x3f55cf(0x491)](_0x293197,{'recursive':!![]});const _0x2b5ba5=_0xf46ca3[_0x3f55cf(0x553)](_0x293197,_0x3f55cf(0x227));_0x3d0262[_0x3f55cf(0x353)](_0x2b5ba5,''),_0x3d0262[_0x3f55cf(0x585)](_0x2b5ba5),_0x4e8d89(!![],_0x3f55cf(0x3b4)+_0x293197);}catch(_0x203d4d){_0x4e8d89(![],_0x3f55cf(0x377)+_0x293197+_0x3f55cf(0x420)+_0x203d4d[_0x3f55cf(0x62d)]+')');}const _0x476775=await new Promise(_0x4f757d=>{const _0x5c819b=_0x3f55cf,_0x13e301=_0x133c58[_0x5c819b(0x67a)]();_0x13e301[_0x5c819b(0x625)](_0x5c819b(0x2e5),()=>_0x4f757d(![])),_0x13e301[_0x5c819b(0x625)]('listening',()=>{_0x13e301['close'](),_0x4f757d(!![]);}),_0x13e301[_0x5c819b(0x3f5)](_0x358570['port'],_0x5c819b(0x404));});_0x4e8d89(_0x476775,'port\x20'+_0x358570[_0x3f55cf(0x43c)]+'\x20'+(_0x476775?_0x3f55cf(0x233):_0x3f55cf(0x511)));const _0x2abba8=_0xf46ca3['resolve'](_0x3f55cf(0x4dc));if(_0x3d0262['existsSync'](_0x2abba8))try{JSON[_0x3f55cf(0x42a)](_0x3d0262['readFileSync'](_0x2abba8,_0x3f55cf(0x5a6))[_0x3f55cf(0x2aa)](/^\uFEFF/,'')),_0x4e8d89(!![],_0x3f55cf(0x243)+_0x2abba8);}catch(_0x11f1de){_0x4e8d89(![],_0x3f55cf(0x639)+_0x11f1de['message']);}else _0x4e8d89(!![],_0x3f55cf(0x640));if(_0x47ed2b()){const _0x598e13=_0x23bf33(_0x358570,{'shmbufNative':!![]});_0x4e8d89(!![],_0x3f55cf(0x484)+_0x598e13+_0x3f55cf(0x47f)+(_0x598e13===0x1?'':'s')+')');}else _0x4e8d89(!![],_0x3f55cf(0x309));if(!_0x476775)try{const _0x8660ab=require('../okdb'),_0x3b85b9=new _0x8660ab(_0x293197,{'engines':![],'processors':![],'compaction':![],'http':![],'auth':{'open':!![]}});await _0x3b85b9[_0x3f55cf(0x1db)]();try{await _0x3b85b9[_0x3f55cf(0x5e6)][_0x3f55cf(0x1db)]({'reader':!![]});const _0x1456e9=_0x3b85b9['processes'][_0x3f55cf(0x356)](),_0x5b5426=_0x1456e9[_0x3f55cf(0x4e0)](_0x80fc33=>_0x80fc33['supervisorKey']!=null)[_0x3f55cf(0x631)];_0x4e8d89(!![],_0x3f55cf(0x4f7)+_0x1456e9[_0x3f55cf(0x631)]+_0x3f55cf(0x29d)+(_0x1456e9[_0x3f55cf(0x631)]===0x1?'':'es')+'\x20('+_0x5b5426+_0x3f55cf(0x5bb));}finally{await _0x3b85b9[_0x3f55cf(0x519)]();}}catch{}console[_0x3f55cf(0x6a0)](''),_0x4538e1?console['log'](_0x3f55cf(0x25f)):(console[_0x3f55cf(0x6a0)](_0x3f55cf(0x352)),process['exit'](0x1));}async function _0x30faec(){const _0x245cdf=_0x448381,_0x3627fc=_0xf46ca3[_0x245cdf(0x2f9)](_0x245cdf(0x4dc));!_0x3d0262['existsSync'](_0x3627fc)?(_0x3d0262[_0x245cdf(0x353)](_0x3627fc,JSON['stringify']({'port':0x2124,'path':'./okdb-data','logLevel':'info','noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x245cdf(0x6a0)](_0x245cdf(0x35d))):console[_0x245cdf(0x6a0)](_0x245cdf(0x2c3));const _0x10d6ef=_0xf46ca3[_0x245cdf(0x2f9)](_0x245cdf(0x59f));!_0x3d0262[_0x245cdf(0x647)](_0x10d6ef)?(_0x3d0262[_0x245cdf(0x491)](_0x10d6ef,{'recursive':!![]}),console[_0x245cdf(0x6a0)](_0x245cdf(0x456))):console[_0x245cdf(0x6a0)]('[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping'),console[_0x245cdf(0x6a0)](_0x245cdf(0x202));}async function _0x4e9aba(_0x1d5ad1){const _0xef2a56=_0x448381,_0x53be8f=_0xf46ca3[_0xef2a56(0x2f9)](_0x1d5ad1[_0xef2a56(0x57b)]);if(!_0x3d0262[_0xef2a56(0x647)](_0x53be8f)){console['log'](_0xef2a56(0x2f5)+_0x53be8f+'\x20does\x20not\x20exist');return;}const _0x30d5dd=require$$0$3,_0x1db263=_0x30d5dd[_0xef2a56(0x5ee)]({'input':process[_0xef2a56(0x291)],'output':process[_0xef2a56(0x445)]}),_0xc91b3b=await new Promise(_0x43e6db=>_0x1db263[_0xef2a56(0x437)]('\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20'+_0x53be8f+_0xef2a56(0x449),_0x43e6db));_0x1db263[_0xef2a56(0x519)](),console[_0xef2a56(0x6a0)]('');if(_0xc91b3b[_0xef2a56(0x215)]()[_0xef2a56(0x3a6)]()!=='yes'){console['log'](_0xef2a56(0x47e));return;}let _0x5d0c40=null;try{_0x5d0c40=await _0x165c56(_0x53be8f,_0x1d5ad1,async _0x1622f4=>{const _0x4279a6=_0xef2a56,_0x42717c=_0x1622f4['_systemEnv'],_0x37971a=_0x42717c?.['db']?.['get'](_0x4279a6(0x65a))??null,_0x2a3179=[];if(_0x42717c?.[_0x4279a6(0x63e)](_0x4279a6(0x336)))for(const {key:_0x843633,value:_0x215f31}of _0x42717c['getRange'](_0x4279a6(0x336))){_0x2a3179['push']({'key':_0x843633,'value':_0x215f31});}return{'identity':_0x37971a,'licenses':_0x2a3179};});}catch(_0x9799ed){console['log']('[okdb]\x20warning:\x20could\x20not\x20read\x20node\x20identity/licenses\x20before\x20reset\x20('+_0x9799ed['message']+_0xef2a56(0x4f2));}_0x3d0262[_0xef2a56(0x2fc)](_0x53be8f,{'recursive':!![],'force':!![]}),console['log'](_0xef2a56(0x5c5)+_0x53be8f+'\x20deleted');if(_0x5d0c40&&(_0x5d0c40[_0xef2a56(0x427)]||_0x5d0c40['licenses'][_0xef2a56(0x631)]>0x0))try{await _0x165c56(_0x53be8f,_0x1d5ad1,async _0x1207f3=>{const _0x2a8c9a=_0xef2a56,_0x145a3c=_0x1207f3[_0x2a8c9a(0x2b9)];_0x5d0c40[_0x2a8c9a(0x427)]&&_0x145a3c['db']['putSync'](_0x2a8c9a(0x65a),_0x5d0c40[_0x2a8c9a(0x427)]);if(_0x5d0c40[_0x2a8c9a(0x228)][_0x2a8c9a(0x631)]>0x0){if(!_0x145a3c['hasType'](_0x2a8c9a(0x336)))await _0x145a3c[_0x2a8c9a(0x206)](_0x2a8c9a(0x336));for(const {key:_0xe6068,value:_0x1f38a9}of _0x5d0c40[_0x2a8c9a(0x228)]){await _0x145a3c[_0x2a8c9a(0x473)](_0x2a8c9a(0x336),_0xe6068,_0x1f38a9);}}});const _0x28419f=[];if(_0x5d0c40[_0xef2a56(0x427)])_0x28419f[_0xef2a56(0x5fa)](_0xef2a56(0x289));if(_0x5d0c40[_0xef2a56(0x228)][_0xef2a56(0x631)]>0x0)_0x28419f[_0xef2a56(0x5fa)](_0x5d0c40['licenses'][_0xef2a56(0x631)]+_0xef2a56(0x1e8));console[_0xef2a56(0x6a0)]('[okdb]\x20preserved:\x20'+_0x28419f['join']('\x20+\x20'));}catch(_0x4da1f4){console[_0xef2a56(0x6a0)](_0xef2a56(0x666)+_0x4da1f4[_0xef2a56(0x62d)]);}}async function _0x165c56(_0x13b2d1,_0x38cd62,_0x30b863){const _0x4cdcae=_0x448381,_0x45fb11=require$$5,_0xc676c2=new _0x45fb11(_0x13b2d1,{'admin':![],'mcp':![],'http':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],..._0x38d5ca(_0x38cd62)});await _0xc676c2['open']();try{return await _0x30b863(_0xc676c2);}finally{await _0xc676c2[_0x4cdcae(0x519)]();}}async function _0x3daf70(_0x3e9fd5,_0xee8b0e){const _0x390e52=_0x448381,_0x2755a7=require$$5,_0x5955d9=_0xf46ca3[_0x390e52(0x2f9)](_0xee8b0e['dbPath']);console[_0x390e52(0x6a0)](_0x390e52(0x25b)+_0x5955d9+'…');const _0x2ea228=new _0x2755a7(_0x5955d9,_0x38d5ca(_0xee8b0e));await _0x2ea228[_0x390e52(0x1db)](),console[_0x390e52(0x6a0)]('[okdb]\x20backing\x20up\x20to\x20'+_0x3e9fd5+'…');const {envs:_0x5e0fd6}=await _0x2ea228['migrate']['backup'](_0x3e9fd5);for(const _0x327e0e of _0x5e0fd6){const _0x141a77=_0x327e0e['sizeBefore']>0x0?_0x390e52(0x420)+(_0x327e0e[_0x390e52(0x3b2)]/0x400/0x400)[_0x390e52(0x33c)](0x2)+'\x20MB\x20→\x20'+(_0x327e0e[_0x390e52(0x4a5)]/0x400/0x400)['toFixed'](0x2)+_0x390e52(0x2f4):'';console['log'](_0x390e52(0x461)+_0x327e0e[_0x390e52(0x58f)]+_0x390e52(0x693)+_0x327e0e['dest']+_0x141a77);}await _0x2ea228[_0x390e52(0x519)](),console['log']('[okdb]\x20backup\x20complete');}async function _0x5dea01(_0x2333a1,_0x59e76c,_0x321d63){const _0x554bd5=_0x448381,_0x3e68e6=require$$5,_0x48aad7=_0xf46ca3[_0x554bd5(0x2f9)](_0x59e76c[_0x554bd5(0x57b)]),_0x4d67d7=_0x321d63[_0x554bd5(0x35e)]??'default',_0xeef9f9=_0x321d63[_0x554bd5(0x1e6)]?_0x321d63[_0x554bd5(0x1e6)]['split'](',')[_0x554bd5(0x272)](_0x48b8ea=>_0x48b8ea['trim']()):null;console[_0x554bd5(0x6a0)](_0x554bd5(0x25b)+_0x48aad7+'…');const _0x390b0e=new _0x3e68e6(_0x48aad7,_0x38d5ca(_0x59e76c));await _0x390b0e[_0x554bd5(0x1db)](),console[_0x554bd5(0x6a0)](_0x554bd5(0x410)+_0x4d67d7+_0x554bd5(0x20f)+_0x2333a1+'…');const _0x41700e=await _0x390b0e[_0x554bd5(0x642)]['exportToFile'](_0x2333a1,{'envName':_0x4d67d7,'types':_0xeef9f9,'includeChanges':!!_0x321d63['changes']});console[_0x554bd5(0x6a0)]('[okdb]\x20exported\x20\x20types='+_0x41700e[_0x554bd5(0x1e6)]+'\x20\x20records='+_0x41700e[_0x554bd5(0x4be)]+_0x554bd5(0x248)+_0x41700e[_0x554bd5(0x4fd)]);if(_0x321d63[_0x554bd5(0x67d)]){const _0xc6b201=_0xf46ca3[_0x554bd5(0x553)](_0xf46ca3[_0x554bd5(0x3d4)](_0x2333a1),_0x554bd5(0x67d));process[_0x554bd5(0x445)][_0x554bd5(0x2d0)]('[okdb]\x20exporting\x20blobs…');const {count:_0x473376,bytes:_0x228706}=await _0x390b0e[_0x554bd5(0x642)][_0x554bd5(0x4ad)](_0xc6b201);console[_0x554bd5(0x6a0)]('\x0d[okdb]\x20blobs:\x20'+_0xc6b201+_0x554bd5(0x420)+_0x473376+_0x554bd5(0x418)+(_0x473376!==0x1?'s':'')+',\x20'+(_0x228706/0x400/0x400)[_0x554bd5(0x33c)](0x2)+_0x554bd5(0x2f4));}await _0x390b0e[_0x554bd5(0x519)](),console[_0x554bd5(0x6a0)](_0x554bd5(0x517));}async function _0x1287f2(_0x24b510,_0x58baf9,_0x28ee28){const _0x489cbc=_0x448381,_0x334f59=require$$5,_0x3e9876=_0xf46ca3[_0x489cbc(0x2f9)](_0x58baf9['dbPath']),_0x406770=_0x28ee28[_0x489cbc(0x35e)]??null,_0x751927=_0x28ee28[_0x489cbc(0x1e6)]?_0x28ee28[_0x489cbc(0x1e6)]['split'](',')[_0x489cbc(0x272)](_0x224b87=>_0x224b87[_0x489cbc(0x215)]()):null,_0x5265cd=!!_0x28ee28[_0x489cbc(0x26b)];console[_0x489cbc(0x6a0)](_0x489cbc(0x25b)+_0x3e9876+'…');const _0x3a9613=new _0x334f59(_0x3e9876,_0x38d5ca(_0x58baf9));await _0x3a9613[_0x489cbc(0x1db)](),console[_0x489cbc(0x6a0)]('[okdb]\x20importing\x20'+_0x24b510+'…');const _0x3e8923=await _0x3a9613[_0x489cbc(0x642)][_0x489cbc(0x3ed)](_0x24b510,{'envName':_0x406770,'types':_0x751927,'dropExisting':_0x5265cd,'includeChanges':!!_0x28ee28[_0x489cbc(0x4fd)],'onProgress':({type:_0x5f3862,count:_0x2d2f78})=>{const _0x14fa3b=_0x489cbc;process[_0x14fa3b(0x445)][_0x14fa3b(0x2d0)](_0x14fa3b(0x610)+_0x5f3862+':\x20'+_0x2d2f78+_0x14fa3b(0x2f8));}});process[_0x489cbc(0x445)]['write']('\x0a'),console[_0x489cbc(0x6a0)](_0x489cbc(0x3dd)+_0x3e8923[_0x489cbc(0x1e6)]+_0x489cbc(0x5f2)+_0x3e8923[_0x489cbc(0x4be)]+_0x489cbc(0x248)+_0x3e8923[_0x489cbc(0x4fd)]);if(_0x28ee28[_0x489cbc(0x67d)]){const _0x3f6c55=_0xf46ca3[_0x489cbc(0x553)](_0xf46ca3['dirname'](_0x24b510),'blobs');if(_0x3d0262[_0x489cbc(0x647)](_0x3f6c55)){const {imported:_0x2d7a6b,skipped:_0x5eeffe}=await _0x3a9613[_0x489cbc(0x642)][_0x489cbc(0x2ce)](_0x3f6c55);console[_0x489cbc(0x6a0)](_0x489cbc(0x276)+_0x2d7a6b+_0x489cbc(0x592)+_0x5eeffe);}}await _0x3a9613[_0x489cbc(0x519)](),console['log'](_0x489cbc(0x507));}async function _0x132b69(_0x2c993e,_0x1e0b7d){const _0x9c68db=_0x448381;_0x1e0b7d[_0x9c68db(0x3c8)]&&!_0x1e0b7d[_0x9c68db(0x58f)]&&(console[_0x9c68db(0x2e5)](_0x9c68db(0x489)),process[_0x9c68db(0x234)](0x1));const _0x3d7c76=_0x1e0b7d['permissions']?_0x1e0b7d['permissions']['split'](',')['map'](_0x9ec129=>_0x9ec129[_0x9c68db(0x215)]())[_0x9c68db(0x4e0)](Boolean):[];let _0x4ba2a3={};if(_0x1e0b7d[_0x9c68db(0x34e)])try{_0x4ba2a3=JSON[_0x9c68db(0x42a)](_0x1e0b7d[_0x9c68db(0x34e)]);if(typeof _0x4ba2a3!==_0x9c68db(0x5c0)||Array[_0x9c68db(0x59a)](_0x4ba2a3)||_0x4ba2a3===null)throw new Error();}catch{console['error'](_0x9c68db(0x2ed)),process[_0x9c68db(0x234)](0x1);}const _0x8e4af9=require$$5,{randomToken:_0x1655ff,hashToken:_0x912ae8,hashPassword:_0x3b18c3}=requireOkdbAuthTokens(),_0x2a1984=require$$0$1,_0xb8d415=_0xf46ca3['resolve'](_0x2c993e['dbPath']),_0x41847c=new _0x8e4af9(_0xb8d415,_0x38d5ca(_0x2c993e));await _0x41847c[_0x9c68db(0x1db)]();try{await _0x41847c[_0x9c68db(0x5a0)]['_ensureTokensType']();if(_0x1e0b7d[_0x9c68db(0x58f)]){const _0x5df451=await _0x41847c['auth']['_lookupByName'](_0x1e0b7d[_0x9c68db(0x58f)]);_0x5df451&&(console[_0x9c68db(0x2e5)](_0x9c68db(0x3ba)+_0x1e0b7d['name']+'\x22\x20already\x20exists'),process[_0x9c68db(0x234)](0x1));}const _0x231e82=_0x1655ff(0x20),_0x2ab78e=_0x912ae8(_0x231e82),_0x3d3d5e=_0x1e0b7d[_0x9c68db(0x3c8)]?await _0x3b18c3(_0x1e0b7d[_0x9c68db(0x3c8)]):null,_0x138f75=_0x2a1984[_0x9c68db(0x60c)](),_0x3bce25={'tokenHash':_0x2ab78e,'name':_0x1e0b7d['name']||null,'passwordHash':_0x3d3d5e,'label':_0x1e0b7d[_0x9c68db(0x236)]||null,'permissions':_0x3d7c76,'grants':_0x4ba2a3,'createdAt':Date['now'](),'lastUsedAt':null},_0x291a79=_0x1e0b7d[_0x9c68db(0x529)]?{'ttl':Number(_0x1e0b7d[_0x9c68db(0x529)])}:undefined;await _0x41847c[_0x9c68db(0x2b9)][_0x9c68db(0x473)](_0x9c68db(0x4bf),_0x138f75,_0x3bce25,_0x291a79),console[_0x9c68db(0x6a0)](_0x9c68db(0x460)),console[_0x9c68db(0x6a0)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x138f75),console['log'](_0x9c68db(0x679)+(_0x1e0b7d[_0x9c68db(0x58f)]||_0x9c68db(0x39b))),console[_0x9c68db(0x6a0)](_0x9c68db(0x281)+(_0x1e0b7d[_0x9c68db(0x236)]||'(unset)')),console['log'](_0x9c68db(0x2e3)+(_0x3d7c76[_0x9c68db(0x553)](',\x20')||_0x9c68db(0x4af))),console['log']('\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a'),console['log'](_0x9c68db(0x63f)+_0x231e82+'\x0a');}finally{await _0x41847c[_0x9c68db(0x519)]();}}async function _0x46da84(_0x2fa216){const _0x1169e9=_0x448381,_0x5bde7d=require$$5,_0x49608f=_0xf46ca3[_0x1169e9(0x2f9)](_0x2fa216['dbPath']),_0x3dcf0a=new _0x5bde7d(_0x49608f,_0x38d5ca(_0x2fa216));await _0x3dcf0a['open']();try{const _0x367130=_0x3dcf0a[_0x1169e9(0x2b9)];if(!_0x367130||!_0x367130[_0x1169e9(0x63e)]('~tokens')){console['log'](_0x1169e9(0x61c));return;}const _0x680b8a=[];for(const {key:_0xe0a1e4,value:_0x3ff369}of _0x367130[_0x1169e9(0x698)](_0x1169e9(0x4bf))){_0x680b8a[_0x1169e9(0x5fa)]({'id':_0xe0a1e4,'name':_0x3ff369[_0x1169e9(0x58f)]||_0x1169e9(0x39b),'label':_0x3ff369['label']||_0x1169e9(0x39b),'permissions':Array[_0x1169e9(0x59a)](_0x3ff369[_0x1169e9(0x1fd)])?_0x3ff369[_0x1169e9(0x1fd)][_0x1169e9(0x553)](','):'','created':_0x3ff369[_0x1169e9(0x3c4)]?new Date(_0x3ff369[_0x1169e9(0x3c4)])['toISOString']()[_0x1169e9(0x608)](0x0,0xa):''});}if(_0x680b8a['length']===0x0){console[_0x1169e9(0x6a0)](_0x1169e9(0x61c));return;}const _0x3db275=!process[_0x1169e9(0x445)][_0x1169e9(0x33d)]||process[_0x1169e9(0x445)]['columns']>=0x64,_0x192d0f=_0x3db275?0x24:0xa,_0x3a6ea6=['ID'['padEnd'](_0x192d0f),_0x1169e9(0x633)['padEnd'](0x10),_0x1169e9(0x552)[_0x1169e9(0x5d4)](0x14),'PERMISSIONS'['padEnd'](0x14),_0x1169e9(0x68e)][_0x1169e9(0x553)]('\x20\x20');console[_0x1169e9(0x6a0)]('\x0a'+_0x3a6ea6),console[_0x1169e9(0x6a0)]('-'[_0x1169e9(0x5ff)](_0x3a6ea6['length']));for(const _0x57f98e of _0x680b8a){const _0x1af8a0=_0x3db275?_0x57f98e['id']:_0x57f98e['id'][_0x1169e9(0x608)](0x0,0x8)+'…';console[_0x1169e9(0x6a0)]([_0x1af8a0[_0x1169e9(0x5d4)](_0x192d0f),_0x57f98e[_0x1169e9(0x58f)]['slice'](0x0,0x10)[_0x1169e9(0x5d4)](0x10),_0x57f98e[_0x1169e9(0x236)][_0x1169e9(0x608)](0x0,0x14)[_0x1169e9(0x5d4)](0x14),_0x57f98e[_0x1169e9(0x1fd)][_0x1169e9(0x608)](0x0,0x14)[_0x1169e9(0x5d4)](0x14),_0x57f98e[_0x1169e9(0x55b)]][_0x1169e9(0x553)]('\x20\x20'));}console[_0x1169e9(0x6a0)]('');}finally{await _0x3dcf0a[_0x1169e9(0x519)]();}}async function _0xb26cd(_0x367896,_0x4dd59d){const _0x30db6f=_0x448381;!_0x367896&&(console['error'](_0x30db6f(0x45c)),process[_0x30db6f(0x234)](0x1));const _0xc1d246=require$$5,_0x3a9bcb=_0xf46ca3['resolve'](_0x4dd59d[_0x30db6f(0x57b)]),_0x209e86=new _0xc1d246(_0x3a9bcb,_0x38d5ca(_0x4dd59d));await _0x209e86['open']();try{const _0x34eca6=_0x209e86[_0x30db6f(0x2b9)];(!_0x34eca6||!_0x34eca6[_0x30db6f(0x63e)](_0x30db6f(0x4bf)))&&(console[_0x30db6f(0x2e5)](_0x30db6f(0x598)+_0x367896+'\x22'),process[_0x30db6f(0x234)](0x1));let _0xc93fbb=null,_0x3d9441=null;const _0x55401b=_0x34eca6['get']('~tokens',_0x367896);if(_0x55401b)_0xc93fbb=_0x367896,_0x3d9441=_0x55401b;else{const _0x5a836e=[];for(const {key:_0x33c996,value:_0x6dd016}of _0x34eca6[_0x30db6f(0x698)](_0x30db6f(0x4bf))){if(_0x33c996['startsWith'](_0x367896))_0x5a836e[_0x30db6f(0x5fa)]({'key':_0x33c996,'value':_0x6dd016});}_0x5a836e[_0x30db6f(0x631)]===0x0&&(console[_0x30db6f(0x2e5)](_0x30db6f(0x598)+_0x367896+'\x22'),process[_0x30db6f(0x234)](0x1));if(_0x5a836e[_0x30db6f(0x631)]>0x1){console['error'](_0x30db6f(0x5e9)+_0x367896+_0x30db6f(0x35f)+_0x5a836e[_0x30db6f(0x631)]+_0x30db6f(0x513));for(const _0x497fa5 of _0x5a836e){console[_0x30db6f(0x2e5)]('\x20\x20'+_0x497fa5['key']+_0x30db6f(0x42c)+(_0x497fa5[_0x30db6f(0x52e)][_0x30db6f(0x58f)]||_0x30db6f(0x39b))+')');}process[_0x30db6f(0x234)](0x1);}_0xc93fbb=_0x5a836e[0x0]['key'],_0x3d9441=_0x5a836e[0x0][_0x30db6f(0x52e)];}await _0x34eca6[_0x30db6f(0x576)]('~tokens',_0xc93fbb),console['log'](_0x30db6f(0x448)+_0xc93fbb+_0x30db6f(0x42c)+(_0x3d9441[_0x30db6f(0x58f)]||_0x30db6f(0x39b))+',\x20label:\x20'+(_0x3d9441[_0x30db6f(0x236)]||_0x30db6f(0x39b))+')');}finally{await _0x209e86['close']();}}function _0x405c89(_0x3984b6,_0x4b9867){const _0x13c871=_0x448381;if(!_0x3984b6[_0x13c871(0x64b)])return _0x13c871(0x2b8);const _0x22e305=_0x3984b6[_0x13c871(0x5f5)];if(!_0x22e305)return _0x13c871(0x6a7);if(_0x4b9867>_0x22e305)return _0x13c871(0x38f);return _0x13c871(0x6a7);}function _0xf58339(_0x1ba707){const _0x3bf27c=_0x448381;if(!_0x1ba707||typeof _0x1ba707!==_0x3bf27c(0x5c0))return'';const _0x388331=Object[_0x3bf27c(0x699)](_0x1ba707)[_0x3bf27c(0x4e0)](([,_0x209bdc])=>_0x209bdc)[_0x3bf27c(0x272)](([_0x1dc688])=>_0x1dc688);if(_0x388331[_0x3bf27c(0x631)]===0x0)return _0x3bf27c(0x4af);if(_0x388331['length']<=0x3)return _0x388331[_0x3bf27c(0x553)]('\x20');return _0x388331[_0x3bf27c(0x608)](0x0,0x3)[_0x3bf27c(0x553)]('\x20')+('\x20+'+(_0x388331['length']-0x3));}async function _0xb32db8(_0x2ed6aa){const _0x179c7f=_0x448381,_0x5a96df=require$$5,_0x1624a0=requireOkdbLicenseCodec(),{_C:_0x4fda89}=requireOkdbLicense(),_0x5ea3f2=_0xf46ca3['resolve'](_0x2ed6aa[_0x179c7f(0x57b)]),_0x268cfc=new _0x5a96df(_0x5ea3f2,_0x38d5ca(_0x2ed6aa));await _0x268cfc['open']();try{const _0x2856f3=_0x268cfc[_0x179c7f(0x2b9)],_0x58b33b=_0x2856f3?.['db']?.[_0x179c7f(0x363)]?.('__writeCounter')??0x0,_0x35ef82=[..._0x268cfc[_0x179c7f(0x3ca)]['keys']()][_0x179c7f(0x4e0)](_0x1b613c=>!_0x1b613c[_0x179c7f(0x39c)]('~'))[_0x179c7f(0x631)],_0x599a00=_0x268cfc[_0x179c7f(0x277)]?.[_0x179c7f(0x64f)];if(_0x599a00){const _0x2798c0=_0x599a00[_0x179c7f(0x526)]===!![],_0x2b24c0=_0x2798c0?_0x179c7f(0x4ec):_0x268cfc[_0x179c7f(0x277)]['active']?.[_0x179c7f(0x3a9)]||_0x179c7f(0x351);console[_0x179c7f(0x6a0)](''),console[_0x179c7f(0x6a0)]('\x20\x20Tier:\x20\x20\x20\x20'+_0x2b24c0);const _0x513f2e=_0x599a00['limits']||{};if(_0x513f2e[_0x179c7f(0x1ea)]){const _0x3b55fd=Math['round'](_0x58b33b/_0x513f2e[_0x179c7f(0x1ea)]*0x64);console['log'](_0x179c7f(0x25d)+_0x58b33b[_0x179c7f(0x4db)]()+_0x179c7f(0x3b6)+_0x513f2e[_0x179c7f(0x1ea)][_0x179c7f(0x4db)]()+_0x179c7f(0x420)+_0x3b55fd+'%)');}else console['log']('\x20\x20Writes:\x20\x20'+_0x58b33b[_0x179c7f(0x4db)]());_0x513f2e['envs']?console['log']('\x20\x20Envs:\x20\x20\x20\x20'+_0x35ef82+_0x179c7f(0x3b6)+_0x513f2e['envs']):console[_0x179c7f(0x6a0)](_0x179c7f(0x34d)+_0x35ef82),_0x4fda89?.[_0x179c7f(0x2db)]&&console[_0x179c7f(0x6a0)](_0x179c7f(0x324)+_0x4fda89[_0x179c7f(0x2db)]+_0x179c7f(0x428));}if(!_0x2856f3||!_0x2856f3[_0x179c7f(0x63e)]('~licenses')){console[_0x179c7f(0x6a0)](''),console[_0x179c7f(0x6a0)](_0x179c7f(0x26f)),console[_0x179c7f(0x6a0)]('');return;}const _0x46764d=[],_0x3a85d4=Date['now'](),_0x4588f6=_0x268cfc['id'],_0x390037=_0x179c7f(0x30f);for(const {key:_0xf978d2,value:_0x37334d}of _0x2856f3['getRange']('~licenses')){const _0x322ce6=_0x37334d[_0x179c7f(0x4e2)]?Buffer['from'](_0x37334d[_0x179c7f(0x4e2)],_0x179c7f(0x627)):Buffer['alloc'](0x8);let _0x481c53='';try{_0x481c53=_0x1624a0[_0x179c7f(0x5fd)](_0x4588f6,_0x322ce6,_0x390037)['pin'];}catch{}_0x46764d[_0x179c7f(0x5fa)]({'id':_0xf978d2,'licensee':_0x37334d[_0x179c7f(0x3a9)]||'','expires':_0x37334d['expiresAt']?new Date(_0x37334d[_0x179c7f(0x5f5)])[_0x179c7f(0x5ac)]()[_0x179c7f(0x608)](0x0,0xa):'','features':_0xf58339(_0x37334d['features']),'pin':_0x481c53,'status':_0x405c89(_0x37334d,_0x3a85d4)});}if(_0x46764d[_0x179c7f(0x631)]===0x0){console[_0x179c7f(0x6a0)](''),console[_0x179c7f(0x6a0)](_0x179c7f(0x26f)),console[_0x179c7f(0x6a0)]('');return;}const _0x23cc47=['\x20\x20'+'ID'[_0x179c7f(0x5d4)](0xe),_0x179c7f(0x4a3)[_0x179c7f(0x5d4)](0xe),_0x179c7f(0x493)[_0x179c7f(0x5d4)](0xc),_0x179c7f(0x32b)[_0x179c7f(0x5d4)](0x1e),'PIN'[_0x179c7f(0x5d4)](0xa),_0x179c7f(0x3f2)][_0x179c7f(0x553)]('\x20');console[_0x179c7f(0x6a0)]('\x0a'+_0x23cc47);for(const _0x3de39b of _0x46764d){const _0x2021ff=_0x3de39b['id'][_0x179c7f(0x608)](0x0,0x8)+'…';console['log'](['\x20\x20'+_0x2021ff[_0x179c7f(0x5d4)](0xe),_0x3de39b[_0x179c7f(0x3a9)][_0x179c7f(0x608)](0x0,0xe)[_0x179c7f(0x5d4)](0xe),_0x3de39b[_0x179c7f(0x4b3)][_0x179c7f(0x5d4)](0xc),_0x3de39b[_0x179c7f(0x421)][_0x179c7f(0x608)](0x0,0x1e)['padEnd'](0x1e),_0x3de39b[_0x179c7f(0x278)]['padEnd'](0xa),_0x3de39b[_0x179c7f(0x43f)]][_0x179c7f(0x553)]('\x20'));}console[_0x179c7f(0x6a0)]('');}finally{await _0x268cfc['close']();}}async function _0x3b66e7(_0x23bc43,_0x3d2d1a){const _0x1a6de3=_0x448381,_0x39d194=require$$5,_0x4dd9ef=requireOkdbLicenseCodec();let _0x2839a4=_0x23bc43;(_0x4dd9ef[_0x1a6de3(0x696)](_0x23bc43)===_0x1a6de3(0x47b)||_0x3d0262[_0x1a6de3(0x647)](_0x23bc43)&&_0x3d0262[_0x1a6de3(0x27c)](_0x23bc43)['isFile']())&&(_0x2839a4=_0x3d0262[_0x1a6de3(0x2bd)](_0x23bc43,_0x1a6de3(0x5a6))[_0x1a6de3(0x215)]());const _0x21c088=_0xf46ca3[_0x1a6de3(0x2f9)](_0x3d2d1a[_0x1a6de3(0x57b)]),_0x2acfba=new _0x39d194(_0x21c088,_0x38d5ca(_0x3d2d1a));await _0x2acfba[_0x1a6de3(0x1db)]();try{!_0x2acfba[_0x1a6de3(0x277)]&&(console[_0x1a6de3(0x2e5)]('[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).'),process[_0x1a6de3(0x234)](0x1));let _0x176442;try{_0x176442=await _0x2acfba['_license'][_0x1a6de3(0x2bf)](_0x2839a4);}catch(_0x1b3fe5){console[_0x1a6de3(0x2e5)](_0x1a6de3(0x667)+_0x1b3fe5['message']),process[_0x1a6de3(0x234)](0x1);}const _0x28888a=_0x2acfba[_0x1a6de3(0x277)][_0x1a6de3(0x4d4)](),_0x157a8d=_0x28888a[_0x1a6de3(0x369)](_0x11d0e0=>_0x11d0e0[_0x1a6de3(0x51f)]===_0x176442['id'])?.[_0x1a6de3(0x278)]||'',_0x66b6e3=Object[_0x1a6de3(0x699)](_0x176442[_0x1a6de3(0x421)]||{})['filter'](([,_0x875e70])=>_0x875e70)[_0x1a6de3(0x272)](([_0x759fa3])=>_0x759fa3),_0x13e179=_0x176442[_0x1a6de3(0x572)]||{},_0x58871f=[_0x13e179[_0x1a6de3(0x35c)]?'envs='+_0x13e179[_0x1a6de3(0x35c)]:null,_0x13e179['typesPerEnv']?_0x1a6de3(0x21a)+_0x13e179[_0x1a6de3(0x564)]:null,_0x13e179['syncPeers']?_0x1a6de3(0x288)+_0x13e179[_0x1a6de3(0x3c1)]:null,_0x13e179['maxWrites']?_0x1a6de3(0x32a)+_0x13e179[_0x1a6de3(0x1ea)][_0x1a6de3(0x4db)]():null][_0x1a6de3(0x4e0)](Boolean)[_0x1a6de3(0x553)]('\x20\x20'),_0x137a4c=_0x176442['licenseType']===_0x4dd9ef[_0x1a6de3(0x626)];console[_0x1a6de3(0x6a0)](_0x1a6de3(0x465)),console[_0x1a6de3(0x6a0)](_0x1a6de3(0x28e)+_0x176442['id']),console[_0x1a6de3(0x6a0)](_0x1a6de3(0x52f)+_0x176442['licensee']),console[_0x1a6de3(0x6a0)](_0x1a6de3(0x345)+new Date(_0x176442[_0x1a6de3(0x5f5)])[_0x1a6de3(0x5ac)]()[_0x1a6de3(0x608)](0x0,0xa)),console['log'](_0x1a6de3(0x5d0)+(_0x66b6e3['join'](',\x20')||_0x1a6de3(0x4af)));if(_0x58871f)console[_0x1a6de3(0x6a0)](_0x1a6de3(0x4f4)+_0x58871f);_0x137a4c?(console[_0x1a6de3(0x6a0)](_0x1a6de3(0x37f)),console[_0x1a6de3(0x6a0)]('')):(console[_0x1a6de3(0x6a0)](_0x1a6de3(0x2dd)+_0x157a8d),console[_0x1a6de3(0x6a0)](_0x1a6de3(0x45e)),console[_0x1a6de3(0x6a0)](''),console[_0x1a6de3(0x6a0)]('\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:'),console['log'](_0x1a6de3(0x3b9)+_0x157a8d+_0x1a6de3(0x596)),console[_0x1a6de3(0x6a0)]('\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.'),console[_0x1a6de3(0x6a0)](_0x1a6de3(0x620)),console[_0x1a6de3(0x6a0)](''));}finally{await _0x2acfba[_0x1a6de3(0x519)]();}}async function _0x20f640(_0xf19872,_0x4b8078){const _0x401986=_0x448381,_0x3af075=require$$5,_0x4005bd=_0xf46ca3[_0x401986(0x2f9)](_0x4b8078[_0x401986(0x57b)]),_0x5d46c3=new _0x3af075(_0x4005bd,_0x38d5ca(_0x4b8078));await _0x5d46c3[_0x401986(0x1db)]();try{!_0x5d46c3[_0x401986(0x277)]&&(console[_0x401986(0x2e5)](_0x401986(0x22d)),process['exit'](0x1));let _0xb0d53b;try{_0xb0d53b=await _0x5d46c3[_0x401986(0x277)]['activateLicense'](_0xf19872[_0x401986(0x215)]());}catch(_0xc7c419){console[_0x401986(0x2e5)](_0x401986(0x667)+_0xc7c419[_0x401986(0x62d)]),console['error'](''),console[_0x401986(0x2e5)]('\x20\x20Common\x20causes:'),console[_0x401986(0x2e5)](_0x401986(0x3fc)),console[_0x401986(0x2e5)]('\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.'),console[_0x401986(0x2e5)](_0x401986(0x372)),console[_0x401986(0x2e5)](''),process[_0x401986(0x234)](0x1);}console['log'](_0x401986(0x5e1)),console[_0x401986(0x6a0)](_0x401986(0x28e)+_0xb0d53b['id']),console['log']('\x20\x20\x20\x20licensee:\x20\x20'+_0xb0d53b[_0x401986(0x3a9)]),console[_0x401986(0x6a0)](_0x401986(0x345)+new Date(_0xb0d53b[_0x401986(0x5f5)])['toISOString']()[_0x401986(0x608)](0x0,0xa)),console[_0x401986(0x6a0)](_0x401986(0x37c)),console[_0x401986(0x6a0)]('');}finally{await _0x5d46c3[_0x401986(0x519)]();}}async function _0xdd6e6a(_0x22863e,_0x582983){const _0x2c81db=_0x448381;!_0x22863e&&(console[_0x2c81db(0x2e5)](_0x2c81db(0x599)),process[_0x2c81db(0x234)](0x1));const _0x53aca6=require$$5,_0x50fcf1=requireOkdbLicenseCodec(),_0x43145b=_0xf46ca3[_0x2c81db(0x2f9)](_0x582983[_0x2c81db(0x57b)]),_0x1abb69=new _0x53aca6(_0x43145b,_0x38d5ca(_0x582983));await _0x1abb69['open']();try{const _0x5dcd9a=_0x1abb69[_0x2c81db(0x2b9)];(!_0x5dcd9a||!_0x5dcd9a['hasType'](_0x2c81db(0x336)))&&(console[_0x2c81db(0x2e5)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x22863e+'\x22'),process['exit'](0x1));let _0x2e2bb5=null,_0x47d000=null;const _0x3c3094=_0x5dcd9a['get'](_0x2c81db(0x336),_0x22863e);if(_0x3c3094)_0x2e2bb5=_0x22863e,_0x47d000=_0x3c3094;else{const _0x331e17=[];for(const {key:_0x5f357c,value:_0x5f1384}of _0x5dcd9a[_0x2c81db(0x698)](_0x2c81db(0x336))){if(_0x5f357c[_0x2c81db(0x39c)](_0x22863e))_0x331e17[_0x2c81db(0x5fa)]({'key':_0x5f357c,'value':_0x5f1384});}_0x331e17['length']===0x0&&(console[_0x2c81db(0x2e5)](_0x2c81db(0x24c)+_0x22863e+'\x22'),process[_0x2c81db(0x234)](0x1)),_0x331e17['length']>0x1&&(console[_0x2c81db(0x2e5)]('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x22863e+_0x2c81db(0x35f)+_0x331e17[_0x2c81db(0x631)]+_0x2c81db(0x672)),process[_0x2c81db(0x234)](0x1)),_0x2e2bb5=_0x331e17[0x0]['key'],_0x47d000=_0x331e17[0x0][_0x2c81db(0x52e)];}const _0x49beb3=Date[_0x2c81db(0x4ea)](),_0x34ff6a=_0x405c89(_0x47d000,_0x49beb3),_0x16da03=_0x1abb69['id'],_0x1f055a=_0x2c81db(0x30f);let _0x50c5f2='';try{const _0x2c9c6b=Buffer[_0x2c81db(0x2b0)](_0x47d000[_0x2c81db(0x4e2)],_0x2c81db(0x627));_0x50c5f2=_0x50fcf1['derivePin'](_0x16da03,_0x2c9c6b,_0x1f055a)[_0x2c81db(0x278)];}catch{}const _0x1f0527=_0x47d000['features']?Object[_0x2c81db(0x699)](_0x47d000['features'])['filter'](([,_0x4d010f])=>_0x4d010f)[_0x2c81db(0x272)](([_0x363374])=>_0x363374):[],_0x5d1445=_0x47d000[_0x2c81db(0x572)]||{},_0x2bcbb4=_0x5dcd9a?.['db']?.['get']?.(_0x2c81db(0x3ee))??0x0,_0x18332a=[..._0x1abb69[_0x2c81db(0x3ca)]['keys']()][_0x2c81db(0x4e0)](_0xbdaf8a=>!_0xbdaf8a[_0x2c81db(0x39c)]('~'))[_0x2c81db(0x631)];console[_0x2c81db(0x6a0)](_0x2c81db(0x3eb)),console[_0x2c81db(0x6a0)](_0x2c81db(0x28e)+_0x2e2bb5),console['log'](_0x2c81db(0x52f)+(_0x47d000[_0x2c81db(0x3a9)]||'')),console[_0x2c81db(0x6a0)](_0x2c81db(0x345)+(_0x47d000[_0x2c81db(0x5f5)]?new Date(_0x47d000['expiresAt'])['toISOString']()[_0x2c81db(0x608)](0x0,0xa):'')),console['log'](_0x2c81db(0x5d0)+(_0x1f0527[_0x2c81db(0x553)](',\x20')||_0x2c81db(0x4af))),console['log']('\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20'+_0x50c5f2),console[_0x2c81db(0x6a0)](_0x2c81db(0x447)+_0x34ff6a),console[_0x2c81db(0x6a0)]('\x20\x20\x20\x20addedAt:\x20\x20\x20'+new Date(_0x47d000['addedAt'])[_0x2c81db(0x5ac)]());if(_0x34ff6a==='active'){console[_0x2c81db(0x6a0)](''),console[_0x2c81db(0x6a0)]('\x20\x20Usage:');if(_0x5d1445[_0x2c81db(0x1ea)]){const _0x9cf5b2=Math['round'](_0x2bcbb4/_0x5d1445[_0x2c81db(0x1ea)]*0x64);console[_0x2c81db(0x6a0)](_0x2c81db(0x567)+_0x2bcbb4[_0x2c81db(0x4db)]()+_0x2c81db(0x3b6)+_0x5d1445['maxWrites'][_0x2c81db(0x4db)]()+'\x20\x20('+_0x9cf5b2+'%)');}else console[_0x2c81db(0x6a0)]('\x20\x20\x20\x20writes:\x20\x20\x20\x20'+_0x2bcbb4[_0x2c81db(0x4db)]()+'\x20\x20(unlimited)');_0x5d1445[_0x2c81db(0x35c)]?console[_0x2c81db(0x6a0)](_0x2c81db(0x69f)+_0x18332a+_0x2c81db(0x3b6)+_0x5d1445[_0x2c81db(0x35c)]):console[_0x2c81db(0x6a0)](_0x2c81db(0x69f)+_0x18332a+_0x2c81db(0x222));}console[_0x2c81db(0x6a0)]('');}finally{await _0x1abb69[_0x2c81db(0x519)]();}}async function _0xa0a66f(_0x40d84b,_0x42fd99){const _0x2e5469=_0x448381;!_0x40d84b&&(console['error'](_0x2e5469(0x431)),process[_0x2e5469(0x234)](0x1));const _0x1a89c3=require$$5,_0x3a8a36=_0xf46ca3[_0x2e5469(0x2f9)](_0x42fd99[_0x2e5469(0x57b)]),_0x1caf6f=new _0x1a89c3(_0x3a8a36,_0x38d5ca(_0x42fd99));await _0x1caf6f[_0x2e5469(0x1db)]();try{const _0xd40ce4=_0x1caf6f['_systemEnv'];(!_0xd40ce4||!_0xd40ce4[_0x2e5469(0x63e)](_0x2e5469(0x336)))&&(console[_0x2e5469(0x2e5)](_0x2e5469(0x24c)+_0x40d84b+'\x22'),process[_0x2e5469(0x234)](0x1));let _0x5ea65c=null,_0x5ad5d9=null;const _0x2ee913=_0xd40ce4[_0x2e5469(0x363)](_0x2e5469(0x336),_0x40d84b);if(_0x2ee913)_0x5ea65c=_0x40d84b,_0x5ad5d9=_0x2ee913;else{const _0x381696=[];for(const {key:_0x12019e,value:_0x48c643}of _0xd40ce4[_0x2e5469(0x698)](_0x2e5469(0x336))){if(_0x12019e[_0x2e5469(0x39c)](_0x40d84b))_0x381696[_0x2e5469(0x5fa)]({'key':_0x12019e,'value':_0x48c643});}_0x381696[_0x2e5469(0x631)]===0x0&&(console[_0x2e5469(0x2e5)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x40d84b+'\x22'),process[_0x2e5469(0x234)](0x1)),_0x381696[_0x2e5469(0x631)]>0x1&&(console[_0x2e5469(0x2e5)]('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x40d84b+_0x2e5469(0x35f)+_0x381696['length']+_0x2e5469(0x672)),process[_0x2e5469(0x234)](0x1)),_0x5ea65c=_0x381696[0x0][_0x2e5469(0x505)],_0x5ad5d9=_0x381696[0x0][_0x2e5469(0x52e)];}await _0xd40ce4[_0x2e5469(0x576)]('~licenses',_0x5ea65c),console[_0x2e5469(0x6a0)](_0x2e5469(0x622)+_0x5ea65c+_0x2e5469(0x211)+(_0x5ad5d9['licensee']||_0x2e5469(0x39b))+')');}finally{await _0x1caf6f[_0x2e5469(0x519)]();}}async function _0x1ca934(_0x4ee2ca,_0x318a94,_0x37c6a9){const _0x51b394=_0x448381;!_0x4ee2ca&&(console[_0x51b394(0x2e5)]('[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>'),process[_0x51b394(0x234)](0x1));!_0x37c6a9[_0x51b394(0x3f9)]&&!(_0x37c6a9[_0x51b394(0x429)]&&_0x37c6a9[_0x51b394(0x3c8)])&&(console['error'](_0x51b394(0x30d)),process[_0x51b394(0x234)](0x1));const _0x73b466=_0x37c6a9[_0x51b394(0x3f8)]||_0x318a94[_0x51b394(0x3e5)]?.['address'];!_0x73b466&&(console[_0x51b394(0x2e5)](_0x51b394(0x398)+'\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a'+_0x51b394(0x50d)),process['exit'](0x1));const _0x76ec60=require$$5,_0x18b8ea=new _0x76ec60(_0x318a94[_0x51b394(0x57b)],{'sync':{'address':_0x73b466,'auto_reconcile':![]}});await _0x18b8ea['open']();try{const _0x40b220=_0x18b8ea[_0x51b394(0x2b9)];if(_0x40b220&&_0x40b220['hasType'](_0x51b394(0x4bf))){let _0x224361=![];for(const _0x4a9d31 of _0x40b220[_0x51b394(0x698)](_0x51b394(0x4bf))){_0x224361=!![];break;}_0x224361&&console['log'](_0x51b394(0x4a4)+_0x51b394(0x1e3));}console[_0x51b394(0x6a0)](_0x51b394(0x646)+_0x4ee2ca+'…'),await _0x18b8ea[_0x51b394(0x3e5)][_0x51b394(0x553)](_0x4ee2ca[_0x51b394(0x2aa)](/\/+$/,''),{'token':_0x37c6a9[_0x51b394(0x3f9)],'username':_0x37c6a9['username'],'password':_0x37c6a9[_0x51b394(0x3c8)]}),console['log'](_0x51b394(0x66b)),console[_0x51b394(0x6a0)](_0x51b394(0x663));}finally{await _0x18b8ea[_0x51b394(0x519)]();}}async function _0x5cb532(){const _0x163a29=_0x448381,_0x132d07=Date[_0x163a29(0x4ea)](),_0x586650=_0xfc27a3(process[_0x163a29(0x2e9)]),_0x4fc3f0=_0x1f8f79(_0x586650),_0x37a7e8=_0xf46ca3[_0x163a29(0x2f9)](_0x4fc3f0[_0x163a29(0x57b)]);!_0x4fc3f0[_0x163a29(0x5ae)]&&!process[_0x163a29(0x291)][_0x163a29(0x4dd)]&&(_0x4fc3f0[_0x163a29(0x5ae)]=!![]);const _0x7e9a10=require$$5,{start:_0x51794f,colorLog:_0x57c998}=requireOkdbShell(),_0x202504=require$$1$2,_0x1fa17c={..._0x4fc3f0['key']?{'encryptionKey':_0x4fc3f0[_0x163a29(0x505)]}:{},..._0x4fc3f0[_0x163a29(0x497)]?{'admin':![]}:_0x256bf3(_0x4fc3f0['admin'])?{'admin':_0x4fc3f0[_0x163a29(0x305)]}:{},..._0x256bf3(_0x4fc3f0['api'])?{'api':_0x4fc3f0[_0x163a29(0x65c)]}:{},..._0x256bf3(_0x4fc3f0['auth'])?{'auth':_0x4fc3f0[_0x163a29(0x5a0)]}:{},..._0x256bf3(_0x4fc3f0['mcp'])?{'mcp':_0x4fc3f0['mcp']}:{},..._0x4fc3f0[_0x163a29(0x38b)]!==![]?{'timeMachine':_0x4fc3f0[_0x163a29(0x38b)]}:{}},_0xc5a210=_0x23bf33(_0x4fc3f0);if(!_0x202504['isWorker']){const _0x2a7b69=_0x47ed2b(),_0x3bfd35=_0x4fc3f0[_0x163a29(0x329)]?_0x163a29(0x2ec):_0x4fc3f0['workersFlag']!=null&&_0x4fc3f0[_0x163a29(0x286)]!==''?_0x163a29(0x535):process.env.OKDB_HTTP_WORKERS?_0x163a29(0x569):_0x4fc3f0['http']?.[_0x163a29(0x284)]!=null?_0x163a29(0x559):_0x163a29(0x33e)+Math[_0x163a29(0x555)](0x1,require$$0['cpus']()['length']-0x1);process['stdout'][_0x163a29(0x2d0)](_0x163a29(0x361)+_0xc5a210+'\x20('+_0x3bfd35+(!_0x2a7b69?_0x163a29(0x43a):'')+')\x0a');}if(_0x202504[_0x163a29(0x1f9)]){const _0x36d54b={..._0x1fa17c},_0x287490=new _0x7e9a10(_0x37a7e8,_0x36d54b);_0x287490['log'][_0x163a29(0x5e4)]?.();const _0x8d0a64=process.env.OKDB_CLUSTER_SLOT??'?',_0x143624={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x291140=_0x143624[_0x4fc3f0[_0x163a29(0x482)]]??_0x143624[_0x163a29(0x2ee)];_0x287490[_0x163a29(0x6a0)][_0x163a29(0x301)](_0x34db8d=>{const _0x95312f=_0x163a29;if((_0x143624[_0x34db8d[_0x95312f(0x385)]]??0x1)<_0x291140)return;try{process[_0x95312f(0x4b6)]?.({'__okdbCluster':_0x95312f(0x6a0),'slot':_0x8d0a64,'pid':process[_0x95312f(0x250)],'entry':_0x34db8d});}catch{}}),await _0x287490['open']();const {attachWorkerCluster:_0x45358c}=requireOkdbCluster();_0x45358c(_0x287490),await _0x43c2d5(_0x287490,_0x4fc3f0[_0x163a29(0x43c)]);return;}if(_0xc5a210>0x1){const {runClustered:_0x4a9297}=requireOkdbCluster(),_0x498493=new _0x7e9a10(_0x37a7e8,{..._0x1fa17c,'engines':![],'processors':![],'compaction':![]});await _0x498493['open']();const _0x49d70d=async()=>{const _0x235813=_0x163a29,_0x58695b=new _0x7e9a10(_0x37a7e8,{..._0x1fa17c});return await _0x58695b[_0x235813(0x1db)](),_0x58695b;},_0x45b3c5=_0x4a9297({'workers':_0xc5a210,'makeOkdb':_0x49d70d,'port':_0x4fc3f0[_0x163a29(0x43c)],'primaryOkdb':_0x498493});let _0x5bdf10=![];async function _0x1ba113(_0x54884b){const _0xf62714=_0x163a29;_0x5bdf10&&(process[_0xf62714(0x434)][_0xf62714(0x2d0)](_0xf62714(0x5f3)),process['exit'](0x82));_0x5bdf10=!![],process[_0xf62714(0x434)][_0xf62714(0x2d0)]('\x0a[okdb]\x20received\x20'+(_0x54884b||_0xf62714(0x4a6))+_0xf62714(0x22c));const _0x48dfb7=setTimeout(()=>{const _0x2ce48d=_0xf62714;process[_0x2ce48d(0x434)][_0x2ce48d(0x2d0)](_0x2ce48d(0x264)),process[_0x2ce48d(0x234)](0x0);},0xbb8);_0x48dfb7['unref']?.();try{await _0x45b3c5[_0xf62714(0x519)]();}catch(_0x5baf69){process['stderr']['write'](_0xf62714(0x3af)+(_0x5baf69?.[_0xf62714(0x62d)]??_0x5baf69)+'\x0a');}try{await _0x498493[_0xf62714(0x519)]();}catch(_0x5d03bb){process['stderr'][_0xf62714(0x2d0)](_0xf62714(0x41f)+(_0x5d03bb?.[_0xf62714(0x62d)]??_0x5d03bb)+'\x0a');}process['exit'](0x0);}_0x4fc3f0[_0x163a29(0x285)]=_0xc5a210;if(!_0x4fc3f0['noRepl']){_0x498493[_0x163a29(0x6a0)][_0x163a29(0x5e4)]?.(),_0x1235e7(_0x498493[_0x163a29(0x5a0)]?.['getSecurityNotices']?.()??[]),await _0x51794f(_0x498493,_0x4fc3f0);return;}process[_0x163a29(0x445)]['write'](_0x163a29(0x3e4)+process[_0x163a29(0x250)]+_0x163a29(0x5a7)+_0xc5a210+'\x20'+('passive\x20HTTP\x20worker(s)\x20serving\x20:'+_0x4fc3f0[_0x163a29(0x43c)]+'\x0a')),console[_0x163a29(0x6a0)](''),console[_0x163a29(0x6a0)]('\x20\x20✓\x20OKDB\x20cluster\x20running'),console['log'](_0x163a29(0x4ae)+_0x4fc3f0[_0x163a29(0x43c)]+_0x163a29(0x420)+_0xc5a210+_0x163a29(0x3b7)),console[_0x163a29(0x6a0)](_0x163a29(0x2a1)+_0x37a7e8),console[_0x163a29(0x6a0)](_0x163a29(0x225)+_0x498493['id']),console[_0x163a29(0x6a0)](_0x163a29(0x1f4)+_0x4fc3f0[_0x163a29(0x43c)]+_0x163a29(0x69d));!_0x4fc3f0[_0x163a29(0x497)]&&console[_0x163a29(0x6a0)]('\x20\x20\x20\x20admin:\x20\x20\x20http://localhost:'+_0x4fc3f0[_0x163a29(0x43c)]+_0x163a29(0x32f));console[_0x163a29(0x6a0)](''),_0x1235e7(_0x498493['auth']?.[_0x163a29(0x302)]?.()??[]),process['on'](_0x163a29(0x322),()=>_0x1ba113(_0x163a29(0x322))),process['on']('SIGTERM',()=>_0x1ba113(_0x163a29(0x574))),process['on']('SIGBREAK',()=>_0x1ba113('SIGBREAK'));return;}const _0xd3d8c=new _0x7e9a10(_0x37a7e8,_0x1fa17c);_0xd3d8c['log']['detachConsole']?.();const _0x4e5777=_0xd3d8c[_0x163a29(0x6a0)]['attach'](_0xd51bc1=>_0x57c998(_0xd51bc1,_0x4fc3f0[_0x163a29(0x482)]));if(_0x4fc3f0[_0x163a29(0x5ae)])process[_0x163a29(0x445)][_0x163a29(0x2d0)]('[okdb]\x20starting…\x0a');await _0xd3d8c['open']();if(_0x4fc3f0[_0x163a29(0x5ae)])process[_0x163a29(0x445)][_0x163a29(0x2d0)]('\x20\x20✓\x20database\x20opened\x0a');try{await _0x43c2d5(_0xd3d8c,_0x4fc3f0['port']);}catch(_0x4d936f){_0x4d936f['code']===_0x163a29(0x5cb)&&(console[_0x163a29(0x2e5)](_0x163a29(0x5b3)+_0x4fc3f0['port']+_0x163a29(0x62f)),process[_0x163a29(0x234)](0x1));throw _0x4d936f;}if(_0x4fc3f0[_0x163a29(0x5ae)])process[_0x163a29(0x445)][_0x163a29(0x2d0)](_0x163a29(0x1dc)+_0x4fc3f0[_0x163a29(0x43c)]+'\x0a');if(!_0x4fc3f0[_0x163a29(0x5ae)])_0xd3d8c[_0x163a29(0x6a0)][_0x163a29(0x5e4)]?.(),_0x4e5777?.(),_0x1235e7(_0xd3d8c[_0x163a29(0x5a0)]?.[_0x163a29(0x302)]?.()??[]),await _0x51794f(_0xd3d8c,_0x4fc3f0);else{const _0x394b9a=_0xf46ca3[_0x163a29(0x553)](_0x37a7e8,_0x163a29(0x210));try{_0x3d0262['writeFileSync'](_0x394b9a,String(process[_0x163a29(0x250)]));}catch{}const _0x4ac93a=Date[_0x163a29(0x4ea)]()-_0x132d07;console[_0x163a29(0x6a0)](''),console[_0x163a29(0x6a0)](_0x163a29(0x36b)),console[_0x163a29(0x6a0)](_0x163a29(0x56f)+_0x4fc3f0[_0x163a29(0x43c)]),console['log'](_0x163a29(0x530)+_0x37a7e8),console['log'](_0x163a29(0x360)+_0xd3d8c['id']);{const _0x4af6f7=_0xd3d8c['_systemEnv']?.['db']?.[_0x163a29(0x363)]?.('__writeCounter')??0x0,_0x79041d=[..._0xd3d8c['_envs']['keys']()][_0x163a29(0x4e0)](_0x1d91ea=>!_0x1d91ea['startsWith']('~'))[_0x163a29(0x631)];if(_0xd3d8c[_0x163a29(0x277)]?.['active']?.[_0x163a29(0x386)]===0x1){const _0x216767=Math[_0x163a29(0x651)]((_0xd3d8c['_license'][_0x163a29(0x6a7)][_0x163a29(0x5f5)]-Date['now']())/0x5265c00);console[_0x163a29(0x6a0)](_0x163a29(0x3c2)+_0xd3d8c[_0x163a29(0x277)]['active'][_0x163a29(0x3a9)]+_0x163a29(0x44b)+_0x216767+_0x163a29(0x468));}else{if(_0xd3d8c[_0x163a29(0x277)]?.[_0x163a29(0x6a7)]){const _0xba25e7=_0xd3d8c[_0x163a29(0x277)][_0x163a29(0x6a7)];console[_0x163a29(0x6a0)](_0x163a29(0x668)+_0xba25e7[_0x163a29(0x3a9)]+_0x163a29(0x384)+new Date(_0xba25e7[_0x163a29(0x5f5)])[_0x163a29(0x5ac)]()[_0x163a29(0x608)](0x0,0xa)+')');const _0x29b291=_0xba25e7['limits']||{};if(_0x29b291['maxWrites']){const _0x5b4fe7=Math['round'](_0x4af6f7/_0x29b291[_0x163a29(0x1ea)]*0x64);console[_0x163a29(0x6a0)](_0x163a29(0x681)+_0x4af6f7['toLocaleString']()+_0x163a29(0x3b6)+_0x29b291['maxWrites'][_0x163a29(0x4db)]()+_0x163a29(0x5d7)+_0x5b4fe7+_0x163a29(0x219)+_0x79041d+(_0x29b291[_0x163a29(0x35c)]?'/'+_0x29b291[_0x163a29(0x35c)]:'')+'\x20env'+(_0x79041d===0x1?'':'s'));}}else{if(_0xd3d8c['_license']){const _0xb5d816=_0xd3d8c[_0x163a29(0x277)][_0x163a29(0x4d4)](),_0xf9e884=_0xb5d816[_0x163a29(0x631)]?_0xb5d816[_0x163a29(0x272)](_0x2defd1=>_0x2defd1[_0x163a29(0x278)])['join'](',\x20'):_0x163a29(0x450),_0x13c436=_0xd3d8c[_0x163a29(0x277)][_0x163a29(0x64f)],_0x3bdecb=_0x13c436[_0x163a29(0x572)][_0x163a29(0x1ea)]?Math['round'](_0x4af6f7/_0x13c436[_0x163a29(0x572)][_0x163a29(0x1ea)]*0x64):0x0;console['log'](_0x163a29(0x27a)),console[_0x163a29(0x6a0)](_0x163a29(0x681)+_0x4af6f7[_0x163a29(0x4db)]()+_0x163a29(0x3b6)+_0x13c436['limits']['maxWrites']['toLocaleString']()+_0x163a29(0x5d7)+_0x3bdecb+'%),\x20'+_0x79041d+'\x20/\x20'+_0x13c436[_0x163a29(0x572)]['envs']+'\x20envs'),console[_0x163a29(0x6a0)](_0x163a29(0x4c6)+_0xf9e884);}}}}console[_0x163a29(0x6a0)](_0x163a29(0x314)+_0x4fc3f0[_0x163a29(0x43c)]+'/api');!_0x4fc3f0[_0x163a29(0x497)]&&console[_0x163a29(0x6a0)](_0x163a29(0x551)+_0x4fc3f0[_0x163a29(0x43c)]+'/admin/index.html');console['log'](''),console['log']('[okdb]\x20started\x20in\x20'+_0x4ac93a+'ms'),_0x1235e7(_0xd3d8c[_0x163a29(0x5a0)]?.['getSecurityNotices']?.()??[]);let _0x4ec13c=![];async function _0x2f4941(_0x4bda66){const _0x461c45=_0x163a29;_0x4ec13c&&(process[_0x461c45(0x434)][_0x461c45(0x2d0)](_0x461c45(0x5f3)),process[_0x461c45(0x234)](0x82));_0x4ec13c=!![],process[_0x461c45(0x434)][_0x461c45(0x2d0)](_0x461c45(0x406)+(_0x4bda66||_0x461c45(0x4a6))+_0x461c45(0x43b));const _0x447376=setTimeout(()=>{const _0x1e3cd2=_0x461c45;process[_0x1e3cd2(0x434)]['write'](_0x1e3cd2(0x40b)),process[_0x1e3cd2(0x234)](0x1);},0x1388);try{_0x3d0262['unlinkSync'](_0x394b9a);}catch{}try{await _0xd3d8c['close']();}catch(_0x277a2e){process[_0x461c45(0x434)]['write'](_0x461c45(0x685)+(_0x277a2e?.[_0x461c45(0x62d)]??_0x277a2e)+'\x0a');}clearTimeout(_0x447376),process[_0x461c45(0x434)][_0x461c45(0x2d0)](_0x461c45(0x673)),process['exit'](0x0);}process['on']('SIGINT',()=>_0x2f4941(_0x163a29(0x322))),process['on'](_0x163a29(0x574),()=>_0x2f4941(_0x163a29(0x574))),process['on'](_0x163a29(0x562),()=>_0x2f4941(_0x163a29(0x562)));}}const _0x1128cb=new Set([_0x448381(0x29a),_0x448381(0x62e),_0x448381(0x6ae),_0x448381(0x492),_0x448381(0x5eb),_0x448381(0x5f6),_0x448381(0x653),_0x448381(0x3f9),_0x448381(0x553),'license']),_0x4cb051=process[_0x448381(0x2e9)][0x2];if(_0x4cb051===_0x448381(0x29a))console['log'](require$$3[_0x448381(0x29a)]),process[_0x448381(0x234)](0x0);else{if(_0x4cb051&&_0x1128cb[_0x448381(0x258)](_0x4cb051)){const _0x45e3e2=process[_0x448381(0x2e9)]['slice'](0x3),_0x316d6b=_0xfc27a3([_0x448381(0x5dc),'okdb',..._0x45e3e2]),_0x1e8607=_0x1f8f79(_0x316d6b),_0x1dfb7b=new Set([_0x448381(0x3cf),'-d','--key','-k','--config','-c','--port','-p',_0x448381(0x5ce),_0x448381(0x55d),'-e',_0x448381(0x3e7),_0x448381(0x44d),_0x448381(0x5d5),_0x448381(0x313),_0x448381(0x64a),'--grants',_0x448381(0x411),_0x448381(0x2ad),_0x448381(0x23e),'-u',_0x448381(0x3b5)]);let _0x32b4ac=null;for(let _0x3fcfab=0x0;_0x3fcfab<_0x45e3e2['length'];_0x3fcfab++){if(_0x1dfb7b[_0x448381(0x258)](_0x45e3e2[_0x3fcfab])){_0x3fcfab++;continue;}if(!_0x45e3e2[_0x3fcfab][_0x448381(0x39c)]('-')){_0x32b4ac=_0x45e3e2[_0x3fcfab];break;}}(async()=>{const _0x453bb2=_0x448381;if(_0x4cb051===_0x453bb2(0x3f9)){const _0x22041e=process['argv'][0x3],_0x437514=process[_0x453bb2(0x2e9)][_0x453bb2(0x608)](0x4),_0x4bcb73=_0xfc27a3([_0x453bb2(0x5dc),'okdb',..._0x437514]),_0x5bdbfa=_0x1f8f79(_0x4bcb73),_0x5b83c2=new Set([_0x453bb2(0x3cf),'-d',_0x453bb2(0x464),'-k',_0x453bb2(0x21b),'-c','--port','-p',_0x453bb2(0x44d),'--password','--label',_0x453bb2(0x64a),_0x453bb2(0x296),_0x453bb2(0x411),_0x453bb2(0x5ce),_0x453bb2(0x55d),'-e',_0x453bb2(0x3e7)]),_0x3ae028=[];for(let _0x88a1ba=0x0;_0x88a1ba<_0x437514[_0x453bb2(0x631)];_0x88a1ba++){if(_0x5b83c2['has'](_0x437514[_0x88a1ba])){_0x88a1ba++;continue;}if(_0x437514[_0x88a1ba][_0x453bb2(0x39c)]('-'))continue;_0x3ae028[_0x453bb2(0x5fa)](_0x437514[_0x88a1ba]);}switch(_0x22041e){case _0x453bb2(0x21d):await _0x132b69(_0x5bdbfa,_0x4bcb73);break;case _0x453bb2(0x690):await _0x46da84(_0x5bdbfa);break;case _0x453bb2(0x580):await _0xb26cd(_0x3ae028[0x0],_0x5bdbfa);break;default:console[_0x453bb2(0x2e5)]('[okdb]\x20unknown\x20token\x20action:\x20\x22'+_0x22041e+_0x453bb2(0x665)),process['exit'](0x1);}return;}if(_0x4cb051===_0x453bb2(0x514)){const _0x5ea612=requireOkdbLicenseCodec(),_0x5da57b=process['argv'][_0x453bb2(0x608)](0x3),_0x3a23cd=_0xfc27a3([_0x453bb2(0x5dc),'okdb',..._0x5da57b]),_0x4c0d0c=_0x1f8f79(_0x3a23cd),_0x5132e2=new Set([_0x453bb2(0x3cf),'-d',_0x453bb2(0x464),'-k','--config','-c','--port','-p',_0x453bb2(0x5ce)]),_0x48b4dd=[];for(let _0x167ee1=0x0;_0x167ee1<_0x5da57b[_0x453bb2(0x631)];_0x167ee1++){if(_0x5132e2[_0x453bb2(0x258)](_0x5da57b[_0x167ee1])){_0x167ee1++;continue;}if(_0x5da57b[_0x167ee1]['startsWith']('-'))continue;_0x48b4dd['push'](_0x5da57b[_0x167ee1]);}const _0x3b4b70=_0x48b4dd[0x0]??null;if(_0x3b4b70===_0x453bb2(0x576))await _0xa0a66f(_0x48b4dd[0x1],_0x4c0d0c);else{if(!_0x3b4b70)await _0xb32db8(_0x4c0d0c);else{let _0x3d6320=_0x5ea612[_0x453bb2(0x696)](_0x3b4b70);if(_0x3d6320===_0x453bb2(0x39d)&&_0x3d0262[_0x453bb2(0x647)](_0x3b4b70))_0x3d6320=_0x453bb2(0x47b);if(_0x3d6320===_0x453bb2(0x47b))try{const _0x3e7865=_0x3d0262[_0x453bb2(0x2bd)](_0x3b4b70,_0x453bb2(0x5a6))['trim'](),_0x5d857b=_0x5ea612[_0x453bb2(0x696)](_0x3e7865);if(_0x5d857b===_0x453bb2(0x64b)){await _0x20f640(_0x3e7865,_0x4c0d0c);return;}await _0x3b66e7(_0x3b4b70,_0x4c0d0c);return;}catch(_0xc8c17a){console[_0x453bb2(0x2e5)](_0x453bb2(0x295)+_0x3b4b70+':\x20'+_0xc8c17a[_0x453bb2(0x62d)]),process[_0x453bb2(0x234)](0x1);}switch(_0x3d6320){case _0x453bb2(0x216):await _0x3b66e7(_0x3b4b70,_0x4c0d0c);break;case _0x453bb2(0x64b):await _0x20f640(_0x3b4b70,_0x4c0d0c);break;case'uuid':await _0xdd6e6a(_0x3b4b70,_0x4c0d0c);break;default:console['error'](_0x453bb2(0x1f6)+_0x3b4b70+'\x22'),console[_0x453bb2(0x2e5)](''),console[_0x453bb2(0x2e5)](_0x453bb2(0x5c4)),console[_0x453bb2(0x2e5)]('\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)'),console[_0x453bb2(0x2e5)](_0x453bb2(0x263)),console[_0x453bb2(0x2e5)](_0x453bb2(0x257)),console[_0x453bb2(0x2e5)](_0x453bb2(0x5da)),console[_0x453bb2(0x2e5)](''),console[_0x453bb2(0x2e5)](_0x453bb2(0x26a)),process[_0x453bb2(0x234)](0x1);}}}return;}switch(_0x4cb051){case'doctor':await _0x2f5a4b(_0x1e8607);break;case _0x453bb2(0x6ae):await _0x30faec();break;case _0x453bb2(0x653):await _0x4e9aba(_0x1e8607);break;case _0x453bb2(0x492):await _0x3daf70(_0x32b4ac??_0xf46ca3[_0x453bb2(0x2f9)](_0x453bb2(0x4ab)),_0x1e8607);break;case _0x453bb2(0x5eb):await _0x5dea01(_0x32b4ac??_0xf46ca3[_0x453bb2(0x2f9)](_0x453bb2(0x2c7)),_0x1e8607,_0x316d6b);break;case _0x453bb2(0x5f6):await _0x1287f2(_0x32b4ac??_0xf46ca3[_0x453bb2(0x2f9)](_0x453bb2(0x2c7)),_0x1e8607,_0x316d6b);break;case'join':await _0x1ca934(_0x32b4ac,_0x1e8607,_0x316d6b);break;}})()['then'](()=>process[_0x448381(0x234)](0x0))[_0x448381(0x45b)](_0x1bdac1=>{const _0x5c1c44=_0x448381;console[_0x5c1c44(0x2e5)](_0x5c1c44(0x365)+(_0x1bdac1[_0x5c1c44(0x62d)]||_0x1bdac1)+'\x0a'),process[_0x5c1c44(0x234)](0x1);});}else _0x5cb532()[_0x448381(0x45b)](_0x59e70f=>{const _0x65fad1=_0x448381;console[_0x65fad1(0x2e5)]('\x0a[okdb]\x20fatal\x20error:'),console[_0x65fad1(0x2e5)](_0x59e70f[_0x65fad1(0x602)]||_0x59e70f),process['exit'](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x42e206(0x255)]=okdb;
|
|
2
|
+
'use strict';const _0x5dddf1=_0x3f34;(function(_0x49ad82,_0xb6b335){const _0x4de442=_0x3f34,_0x439039=_0x49ad82();while(!![]){try{const _0x14fb2e=-parseInt(_0x4de442(0x227))/0x1+parseInt(_0x4de442(0x564))/0x2+-parseInt(_0x4de442(0x472))/0x3+parseInt(_0x4de442(0x2c6))/0x4+-parseInt(_0x4de442(0x633))/0x5+parseInt(_0x4de442(0x244))/0x6*(parseInt(_0x4de442(0x1df))/0x7)+parseInt(_0x4de442(0x282))/0x8;if(_0x14fb2e===_0xb6b335)break;else _0x439039['push'](_0x439039['shift']());}catch(_0x435b7d){_0x439039['push'](_0x439039['shift']());}}}(_0x5884,0x211a0));var require$$1=require('path'),require$$1$1=require('fs'),require$$0=require('os'),require$$4$1=require(_0x5dddf1(0x5f9)),require$$5=require('../okdb'),require$$0$3=require(_0x5dddf1(0x410)),require$$0$1=require('crypto'),require$$0$2=require(_0x5dddf1(0x662)),require$$4=require(_0x5dddf1(0x251)),require$$1$2=require(_0x5dddf1(0x406)),require$$0$4=require(_0x5dddf1(0x62e)),require$$0$5=require(_0x5dddf1(0x598)),require$$0$6=require(_0x5dddf1(0x670));function getDefaultExportFromCjs(_0x4cf5f0){const _0x3e598b=_0x5dddf1;return _0x4cf5f0&&_0x4cf5f0[_0x3e598b(0x5d8)]&&Object[_0x3e598b(0x3b0)]['hasOwnProperty'][_0x3e598b(0x2f9)](_0x4cf5f0,_0x3e598b(0x269))?_0x4cf5f0[_0x3e598b(0x269)]:_0x4cf5f0;}var okdb$1={},okdbWorkers,hasRequiredOkdbWorkers;function requireOkdbWorkers(){if(hasRequiredOkdbWorkers)return okdbWorkers;hasRequiredOkdbWorkers=0x1;const _0x146375=require$$0,_0x2e3529=require$$1$1,_0x3b5a08=require$$1;let _0x12c885;function _0x3fa68d(){const _0x1299f8=_0x3f34;if(process.env.OKDB_FORCE_SHMBUF_FALLBACK==='1')return![];if(_0x12c885!==undefined)return _0x12c885;try{const _0x10864a=_0x3b5a08[_0x1299f8(0x23f)](require[_0x1299f8(0x271)](_0x1299f8(0x671)));_0x12c885=_0x2e3529[_0x1299f8(0x41a)](_0x3b5a08[_0x1299f8(0x3b2)](_0x10864a,_0x1299f8(0x643),'Release','shmbuf.node'));}catch{_0x12c885=![];}return _0x12c885;}function _0x1cb671(){const _0x538a9a=_0x3f34,_0x14518f=_0x146375[_0x538a9a(0x58e)]()['length'];return Math['max'](0x1,_0x14518f-0x1);}function _0x220693(_0x3f2db9,_0x231b4b={}){const _0x365fb6=_0x3f34,_0x5bacf8=_0x231b4b[_0x365fb6(0x31b)]!==undefined?_0x231b4b[_0x365fb6(0x31b)]:_0x3fa68d();let _0x5a99c8;if(_0x3f2db9?.['noCluster'])_0x5a99c8=0x1;else{let _0x31cec1,_0x37b6aa;if(_0x3f2db9?.['workersFlag']!==undefined&&_0x3f2db9[_0x365fb6(0x43a)]!==null&&_0x3f2db9[_0x365fb6(0x43a)]!=='')_0x31cec1=_0x3f2db9[_0x365fb6(0x43a)],_0x37b6aa=_0x365fb6(0x4a7);else{if(process.env.OKDB_HTTP_WORKERS!==undefined&&process.env.OKDB_HTTP_WORKERS!=='')_0x31cec1=process.env.OKDB_HTTP_WORKERS,_0x37b6aa=_0x365fb6(0x4cb);else _0x3f2db9?.['http']?.[_0x365fb6(0x4e0)]!==undefined&&_0x3f2db9[_0x365fb6(0x57a)][_0x365fb6(0x4e0)]!==null&&_0x3f2db9[_0x365fb6(0x57a)]['workers']!==''&&(_0x31cec1=_0x3f2db9[_0x365fb6(0x57a)]['workers'],_0x37b6aa=_0x365fb6(0x38f));}if(_0x31cec1===undefined)_0x5a99c8=_0x1cb671();else{const _0x44b128=Number(_0x31cec1);!Number[_0x365fb6(0x3d0)](_0x44b128)||_0x44b128<0x1?(console[_0x365fb6(0x4ea)](_0x365fb6(0x239)+_0x37b6aa+'='+JSON[_0x365fb6(0x481)](_0x31cec1)+_0x365fb6(0x1f6)),_0x5a99c8=0x1):_0x5a99c8=_0x44b128;}}return!_0x5bacf8&&_0x5a99c8>0x1&&(console['warn'](_0x365fb6(0x1e3)+(_0x365fb6(0x1e7)+_0x5a99c8+').')),_0x5a99c8=0x1),_0x5a99c8;}return okdbWorkers={'isShmbufNative':_0x3fa68d,'defaultWorkers':_0x1cb671,'resolveWorkers':_0x220693},okdbWorkers;}var version=_0x5dddf1(0x570),require$$3={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x24ccb0=require$$0$1;function _0x4db579(_0x134717,_0x4d382b){const _0x24fa77=_0x3f34;return _0x24ccb0[_0x24fa77(0x686)](_0x24fa77(0x45e),_0x4d382b)[_0x24fa77(0x448)](_0x134717)[_0x24fa77(0x55b)](_0x24fa77(0x4c0));}function _0x4398d9(_0x34dfbf,_0x7513da){const _0x1d51b7=_0x3f34;if(typeof _0x34dfbf!==_0x1d51b7(0x58b)||typeof _0x7513da!==_0x1d51b7(0x58b))return![];if(Buffer[_0x1d51b7(0x42b)](_0x34dfbf)!==Buffer['byteLength'](_0x7513da))return![];return _0x24ccb0[_0x1d51b7(0x658)](Buffer[_0x1d51b7(0x1c3)](_0x34dfbf),Buffer['from'](_0x7513da));}function _0x151747(_0x26e298){const _0x5e9a45=_0x3f34;if(!_0x26e298?.[_0x5e9a45(0x2f6)]('Bearer\x20'))return null;return _0x26e298[_0x5e9a45(0x2a1)](0x7);}function _0x2e0451(_0x41b414=0x20){const _0xe5984f=_0x3f34;return _0x24ccb0[_0xe5984f(0x3c2)](_0x41b414)[_0xe5984f(0x4cc)](_0xe5984f(0x4c0));}function _0x1cb872(_0x4ad618){const _0x5b1302=_0x3f34;return _0x24ccb0[_0x5b1302(0x2d1)]('sha256')[_0x5b1302(0x448)](_0x4ad618)[_0x5b1302(0x55b)](_0x5b1302(0x2b5));}function _0x21dc6b(_0x2e24ae,_0x3b802d,_0x1d3088=0x36ee80){const _0x2b2042=_0x3f34;if(!_0x3b802d)throw new Error('Token\x20secret\x20not\x20configured');const _0x45db4b=Date[_0x2b2042(0x387)](),_0x4ccc45=Buffer[_0x2b2042(0x1c3)](JSON[_0x2b2042(0x481)]({'iat':_0x45db4b,'exp':_0x45db4b+_0x1d3088,'sub':_0x2e24ae?.['id']??_0x2e24ae?.['sub']??null,'username':_0x2e24ae?.['username']??_0x2e24ae?.[_0x2b2042(0x68d)]??null,'roles':Array[_0x2b2042(0x65a)](_0x2e24ae?.['roles'])?_0x2e24ae['roles']:[]}))['toString'](_0x2b2042(0x4c0)),_0x41bd2b=_0x4db579(_0x4ccc45,_0x3b802d);return _0x4ccc45+'.'+_0x41bd2b;}function _0x30e9e7(_0x19dda3,_0x11b648){const _0x5abc85=_0x3f34;if(!_0x11b648||typeof _0x19dda3!==_0x5abc85(0x58b))return null;const [_0x5ee409,_0x313cad]=_0x19dda3['split']('.');if(!_0x5ee409||!_0x313cad)return null;const _0x1e9321=_0x4db579(_0x5ee409,_0x11b648);if(!_0x4398d9(_0x313cad,_0x1e9321))return null;try{const _0x371906=JSON[_0x5abc85(0x496)](Buffer[_0x5abc85(0x1c3)](_0x5ee409,'base64url')[_0x5abc85(0x4cc)]()),_0x2993fb=0x7530;if(Date[_0x5abc85(0x387)]()>Number(_0x371906?.[_0x5abc85(0x311)]??0x0)+_0x2993fb)return null;return _0x371906;}catch{return null;}}async function _0x3b9282(_0xd32ad3){return new Promise((_0x154bf7,_0x4febdb)=>{const _0x153edf=_0x3f34,_0x9b2df=_0x24ccb0['randomBytes'](0x10);_0x24ccb0[_0x153edf(0x232)](_0xd32ad3,_0x9b2df,0x40,(_0x9f4b05,_0x225cb1)=>{const _0xf0d169=_0x153edf;if(_0x9f4b05)_0x4febdb(_0x9f4b05);_0x154bf7(_0x9b2df[_0xf0d169(0x4cc)](_0xf0d169(0x2b5))+':'+_0x225cb1[_0xf0d169(0x4cc)](_0xf0d169(0x2b5)));});});}async function _0x34c9eb(_0x1de90d,_0x1e5c17){const _0x1d31d4=_0x3f34,[_0x443eca,_0x93d1f8]=_0x1e5c17['split'](':');if(!_0x443eca||!_0x93d1f8)return![];const _0x26b99c=Buffer[_0x1d31d4(0x1c3)](_0x443eca,_0x1d31d4(0x2b5));return new Promise((_0x1e97a5,_0x1bca0c)=>{_0x24ccb0['scrypt'](_0x1de90d,_0x26b99c,0x40,(_0x499f49,_0x5e7720)=>{const _0x239a9a=_0x3f34;if(_0x499f49)_0x1bca0c(_0x499f49);_0x1e97a5(_0x24ccb0[_0x239a9a(0x658)](_0x5e7720,Buffer[_0x239a9a(0x1c3)](_0x93d1f8,_0x239a9a(0x2b5))));});});}return okdbAuthTokens={'hmac':_0x4db579,'timingSafeEqual':_0x4398d9,'parseBearer':_0x151747,'randomToken':_0x2e0451,'hashToken':_0x1cb872,'issueToken':_0x21dc6b,'authenticateToken':_0x30e9e7,'hashPassword':_0x3b9282,'verifyPassword':_0x34c9eb},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x484267=_0x5dddf1;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x17716e=require$$0$2,_0x57facf=_0x484267(0x2ce),_0x24122b=new Uint8Array(0x100)[_0x484267(0x33b)](0xff);for(let _0x37c69e=0x0;_0x37c69e<_0x57facf['length'];_0x37c69e++){_0x24122b[_0x57facf['charCodeAt'](_0x37c69e)]=_0x37c69e,_0x24122b[_0x57facf['charCodeAt'](_0x37c69e)+0x20]=_0x37c69e;}_0x24122b['O'[_0x484267(0x1c2)](0x0)]=0x0,_0x24122b['o'[_0x484267(0x1c2)](0x0)]=0x0,_0x24122b['I'['charCodeAt'](0x0)]=0x1,_0x24122b['i'[_0x484267(0x1c2)](0x0)]=0x1,_0x24122b['L'[_0x484267(0x1c2)](0x0)]=0x1,_0x24122b['l'[_0x484267(0x1c2)](0x0)]=0x1;function _0x2a907d(_0x3e1cdc){const _0x46fb5f=_0x484267;let _0x446acf=0x0,_0x438464=0x0,_0x21f363='';for(let _0x2a90ab=0x0;_0x2a90ab<_0x3e1cdc[_0x46fb5f(0x502)];_0x2a90ab++){_0x438464=_0x438464<<0x8|_0x3e1cdc[_0x2a90ab],_0x446acf+=0x8;while(_0x446acf>=0x5){_0x446acf-=0x5,_0x21f363+=_0x57facf[_0x438464>>>_0x446acf&0x1f];}}return _0x446acf>0x0&&(_0x21f363+=_0x57facf[_0x438464<<0x5-_0x446acf&0x1f]),_0x21f363;}function _0x30c74f(_0xc35976){const _0x4b3af3=_0x484267;_0xc35976=_0xc35976[_0x4b3af3(0x1db)](/-/g,'')[_0x4b3af3(0x573)]();let _0x5436d9=0x0,_0x802d8c=0x0;const _0x1dbf49=[];for(let _0x337621=0x0;_0x337621<_0xc35976[_0x4b3af3(0x502)];_0x337621++){const _0x5d0790=_0x24122b[_0xc35976[_0x4b3af3(0x1c2)](_0x337621)];if(_0x5d0790===0xff)continue;_0x802d8c=_0x802d8c<<0x5|_0x5d0790,_0x5436d9+=0x5,_0x5436d9>=0x8&&(_0x5436d9-=0x8,_0x1dbf49[_0x4b3af3(0x59e)](_0x802d8c>>>_0x5436d9&0xff));}return Buffer[_0x4b3af3(0x1c3)](_0x1dbf49);}const _0x5292f8=['sync','embeddings',_0x484267(0x46a),_0x484267(0x396),_0x484267(0x640),'views',_0x484267(0x68c),_0x484267(0x4b7)],_0x26be1c=0x0,_0x668203=0x1,_0x54ebc1=0x2,_0x41241d=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x5ad986({issuedAt:_0xd44a95,expiresAt:_0x434396,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x26be1c}){const _0x286e03=_0x484267,_0x1273e9=Buffer[_0x286e03(0x1c3)](licensee,_0x286e03(0x5c5))[_0x286e03(0x2a1)](0x0,0x40),_0xd70c74=0x1+0x1+0x4+0x4+0x1+_0x1273e9[_0x286e03(0x502)]+0x2+0x10,_0xd5eff6=Buffer[_0x286e03(0x4fb)](_0xd70c74);let _0x226024=0x0;_0xd5eff6[_0x286e03(0x31a)](0x1,_0x226024++),_0xd5eff6[_0x286e03(0x31a)](licenseType,_0x226024++),_0xd5eff6[_0x286e03(0x4db)](Math[_0x286e03(0x3be)](_0xd44a95/0x3e8),_0x226024),_0x226024+=0x4,_0xd5eff6[_0x286e03(0x4db)](Math[_0x286e03(0x3be)](_0x434396/0x3e8),_0x226024),_0x226024+=0x4,_0xd5eff6[_0x286e03(0x31a)](_0x1273e9[_0x286e03(0x502)],_0x226024++),_0x1273e9[_0x286e03(0x21c)](_0xd5eff6,_0x226024),_0x226024+=_0x1273e9['length'];let _0x35a190=0x0;for(let _0x5684dc=0x0;_0x5684dc<_0x5292f8[_0x286e03(0x502)];_0x5684dc++){if(features[_0x5292f8[_0x5684dc]])_0x35a190|=0x1<<_0x5684dc;}_0xd5eff6['writeUInt16BE'](_0x35a190,_0x226024),_0x226024+=0x2;const _0x5ee14a=[_0x286e03(0x61a),_0x286e03(0x3e2),_0x286e03(0x3e5),_0x286e03(0x3ff)];for(const _0x149fa6 of _0x5ee14a){_0xd5eff6[_0x286e03(0x4db)](limits[_0x149fa6]||0x0,_0x226024),_0x226024+=0x4;}return _0xd5eff6;}function _0xd02aaf(_0x24e7b0){const _0xf0b999=_0x484267;let _0x4ee285=0x0;const _0x5777cb=_0x24e7b0[_0xf0b999(0x238)](_0x4ee285++),_0xd2ec49=_0x24e7b0['readUInt8'](_0x4ee285++),_0x572c16=_0x24e7b0['readUInt32BE'](_0x4ee285);_0x4ee285+=0x4;const _0x807742=_0x24e7b0['readUInt32BE'](_0x4ee285);_0x4ee285+=0x4;const _0x3c0838=_0x24e7b0[_0xf0b999(0x238)](_0x4ee285++),_0x34c57e=_0x24e7b0[_0xf0b999(0x2a1)](_0x4ee285,_0x4ee285+_0x3c0838)[_0xf0b999(0x4cc)](_0xf0b999(0x5c5));_0x4ee285+=_0x3c0838;const _0x31ae75=_0x24e7b0['readUInt16BE'](_0x4ee285);_0x4ee285+=0x2;const _0xaec4da={};for(let _0x1831fb=0x0;_0x1831fb<_0x5292f8[_0xf0b999(0x502)];_0x1831fb++){_0xaec4da[_0x5292f8[_0x1831fb]]=Boolean(_0x31ae75&0x1<<_0x1831fb);}const _0x213769=[_0xf0b999(0x61a),_0xf0b999(0x3e2),_0xf0b999(0x3e5),'maxWrites'],_0x2291f9={};for(const _0x4f60a2 of _0x213769){const _0x48448b=_0x24e7b0[_0xf0b999(0x607)](_0x4ee285);_0x4ee285+=0x4,_0x2291f9[_0x4f60a2]=_0x48448b===0x0?null:_0x48448b;}return{'v':_0x5777cb,'licenseType':_0xd2ec49,'issuedAt':_0x572c16*0x3e8,'expiresAt':_0x807742*0x3e8,'licensee':_0x34c57e,'features':_0xaec4da,'limits':_0x2291f9};}function _0x3363ec(_0x389fe6,_0x12d3bf){const _0x1ace43=_0x484267,_0x486cd5=Buffer[_0x1ace43(0x305)]([_0x389fe6,_0x12d3bf]),_0x1b434f=_0x2a907d(_0x486cd5),_0x369a8b=[];for(let _0x4aef06=0x0;_0x4aef06<_0x1b434f[_0x1ace43(0x502)];_0x4aef06+=0x8){_0x369a8b['push'](_0x1b434f[_0x1ace43(0x2a1)](_0x4aef06,_0x4aef06+0x8));}return _0x369a8b[_0x1ace43(0x3b2)]('-');}function _0x12cd83(_0x54f148){const _0x47b313=_0x484267;if(typeof _0x54f148!==_0x47b313(0x58b))throw new Error(_0x47b313(0x338));const _0x2f3435=_0x30c74f(_0x54f148[_0x47b313(0x1db)](/-/g,''));if(_0x2f3435[_0x47b313(0x502)]<0x41)throw new Error(_0x47b313(0x603)+_0x2f3435['length']+'\x20bytes,\x20need\x20>=\x2065)');const _0x5c3b38=_0x2f3435[_0x47b313(0x2a1)](0x0,_0x2f3435['length']-0x40),_0xc92df7=_0x2f3435[_0x47b313(0x2a1)](_0x2f3435['length']-0x40);let _0x5ceb52;try{_0x5ceb52=_0xd02aaf(_0x5c3b38);}catch(_0x2b71e6){throw new Error(_0x47b313(0x250)+_0x2b71e6[_0x47b313(0x66f)]);}return{'rawBuf':_0x2f3435,'payload':_0x5c3b38,'sig':_0xc92df7,'decoded':_0x5ceb52};}function _0x2ffbec(_0x4fc382){const _0x5835f4=_0x484267;return _0x17716e[_0x5835f4(0x2d1)]('sha256')[_0x5835f4(0x448)](_0x4fc382)[_0x5835f4(0x55b)]()[_0x5835f4(0x2a1)](0x0,0x8);}function _0x577240(_0x17585c,_0x15d1e4,_0xb36477){const _0x438d22=_0x484267,_0x27623d=_0x438d22(0x388)+_0xb36477,_0x2f98b4=Buffer['concat']([Buffer['from'](_0x17585c,'utf8'),_0x15d1e4]),_0x4f2fdc=_0x17716e[_0x438d22(0x686)](_0x438d22(0x45e),_0x27623d)[_0x438d22(0x448)](_0x2f98b4)['digest'](),_0x23e53a=_0x2a907d(_0x4f2fdc[_0x438d22(0x2a1)](0x0,0x5));return{'pin':_0x23e53a,'pinHmac':_0x4f2fdc};}function _0x4ff03e(_0x139530,_0x591b83,_0x160b72){const _0x45acc3=_0x484267,_0x83c759=Buffer['allocUnsafe'](0x4d);let _0x20dc9f=0x0;_0x83c759[_0x45acc3(0x31a)](0x1,_0x20dc9f++),_0x139530[_0x45acc3(0x21c)](_0x83c759,_0x20dc9f),_0x20dc9f+=0x8,_0x83c759[_0x45acc3(0x4db)](_0x591b83,_0x20dc9f),_0x20dc9f+=0x4,_0x160b72[_0x45acc3(0x21c)](_0x83c759,_0x20dc9f);const _0x4fea7a=_0x2a907d(_0x83c759),_0x4f934c=[];for(let _0x4f6d99=0x0;_0x4f6d99<_0x4fea7a[_0x45acc3(0x502)];_0x4f6d99+=0x6){_0x4f934c[_0x45acc3(0x59e)](_0x4fea7a['slice'](_0x4f6d99,_0x4f6d99+0x6));}return _0x4f934c[_0x45acc3(0x3b2)]('-');}function _0x3c7b5b(_0x15696e){const _0x398084=_0x484267;if(typeof _0x15696e!==_0x398084(0x58b))throw new Error(_0x398084(0x37e));const _0x19c2bc=_0x30c74f(_0x15696e[_0x398084(0x1db)](/-/g,''));if(_0x19c2bc['length']!==0x4d)throw new Error(_0x398084(0x21a)+_0x19c2bc[_0x398084(0x502)]);let _0x4eb1b1=0x0;const _0xf8a9f0=_0x19c2bc['readUInt8'](_0x4eb1b1++),_0x206516=_0x19c2bc[_0x398084(0x2a1)](_0x4eb1b1,_0x4eb1b1+0x8);_0x4eb1b1+=0x8;const _0x43d0d3=_0x19c2bc[_0x398084(0x607)](_0x4eb1b1);_0x4eb1b1+=0x4;const _0x15d0a0=_0x19c2bc[_0x398084(0x2a1)](_0x4eb1b1);return{'v':_0xf8a9f0,'licenseHash':_0x206516,'expiry':_0x43d0d3,'sig':_0x15d0a0};}function _0x428ffd({tokenString:_0x56c3bf,nodeId:_0x1acf5b,rawBlobBuf:_0x352dc9,pubKeyPem:_0x1099ee,pubFingerprint:_0x196a31}){const _0x2aa398=_0x484267;let _0x384c58;try{_0x384c58=_0x3c7b5b(_0x56c3bf);}catch(_0x3c64d4){return{'valid':![],'reason':'MALFORMED_TOKEN'};}const _0x34160d=_0x2ffbec(_0x352dc9);if(!_0x34160d[_0x2aa398(0x312)](_0x384c58['licenseHash']))return{'valid':![],'reason':_0x2aa398(0x3ca)};const {pinHmac:_0x5bbaf5}=_0x577240(_0x1acf5b,_0x34160d,_0x196a31),_0x1302af=Buffer[_0x2aa398(0x4fb)](0x4);_0x1302af[_0x2aa398(0x4db)](_0x384c58[_0x2aa398(0x3a1)],0x0);const _0x201604=Buffer[_0x2aa398(0x305)]([Buffer['from']([_0x384c58['v']]),_0x5bbaf5[_0x2aa398(0x2a1)](0x0,0x5),_0x384c58['licenseHash'],_0x1302af]);try{const _0x873c83=_0x17716e['verify'](null,_0x201604,_0x1099ee,_0x384c58[_0x2aa398(0x40c)]);if(!_0x873c83)return{'valid':![],'reason':_0x2aa398(0x241)};}catch(_0x2bd77a){return{'valid':![],'reason':_0x2aa398(0x241)};}if(_0x384c58[_0x2aa398(0x3a1)]<Date['now']()/0x3e8)return{'valid':![],'reason':'ACTIVATION_EXPIRED'};return{'valid':!![],'reason':'ok'};}function _0x22356b(_0x4dce10){const _0xcefd0d=_0x484267;if(typeof _0x4dce10!=='string')return'unknown';const _0x48369a=_0x4dce10[_0xcefd0d(0x205)]();if(_0x48369a[_0xcefd0d(0x2f6)]('/')||_0x48369a[_0xcefd0d(0x2f6)]('./')||_0x48369a['startsWith'](_0xcefd0d(0x4a9))||/^[A-Za-z]:[\\/]/['test'](_0x48369a))return'path';if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0xcefd0d(0x26f)](_0x48369a))return _0xcefd0d(0x231);const _0x30f7bb=_0x48369a[_0xcefd0d(0x1db)](/[\s-]+/g,'')[_0xcefd0d(0x502)];if(_0x30f7bb===0x7c)return _0xcefd0d(0x5a0);if(_0x30f7bb>=0x95&&_0x30f7bb<=0xfc)return _0xcefd0d(0x36b);return'unknown';}return okdbLicenseCodec={'toBase32':_0x2a907d,'fromBase32':_0x30c74f,'encodeLicensePayload':_0x5ad986,'decodeLicensePayload':_0xd02aaf,'encodeLicenseBlob':_0x3363ec,'decodeLicenseBlob':_0x12cd83,'licenseHash':_0x2ffbec,'derivePin':_0x577240,'encodeActivationToken':_0x4ff03e,'decodeActivationToken':_0x3c7b5b,'verifyActivation':_0x428ffd,'detectInputType':_0x22356b,'FEATURE_NAMES':_0x5292f8,'LICENSE_TYPE_STANDARD':_0x26be1c,'LICENSE_TYPE_OPEN':_0x668203,'LICENSE_TYPE_INTERNAL':_0x54ebc1,'OPEN_LICENSE_MAX_DURATION_MS':_0x41241d},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x52d2fc extends Error{constructor(_0x10308e,_0x411fe7,_0x6532e9={}){const _0x21b952=_0x3f34;super(_0x10308e),this[_0x21b952(0x68d)]='OKDBError',this[_0x21b952(0x30f)]=_0x411fe7,this[_0x21b952(0x28d)]=_0x6532e9,_0x6532e9[_0x21b952(0x549)]&&(this['cause']=_0x6532e9[_0x21b952(0x549)]),Error[_0x21b952(0x228)](this,this[_0x21b952(0x361)]);}}class _0x4dc32a extends _0x52d2fc{constructor(_0x1ca5dc,_0x5d9e42,_0x524ac0,_0x518ee0){const _0x5c619f=_0x3f34;super(_0x5c619f(0x501)+_0x1ca5dc+'@'+_0x5d9e42+_0x5c619f(0x3b7)+_0x524ac0+',\x20got\x20'+_0x518ee0,_0x5c619f(0x421),{'type':_0x1ca5dc,'key':_0x5d9e42,'expectedVersion':_0x524ac0,'actualVersion':_0x518ee0}),this[_0x5c619f(0x68d)]=_0x5c619f(0x3df);}}class _0x517ae5 extends _0x52d2fc{constructor(_0x22cc48,_0x5da669){const _0x416236=_0x3f34;super(_0x22cc48+'@'+_0x5da669+_0x416236(0x56f),_0x416236(0x599),{'type':_0x22cc48,'key':_0x5da669}),this['name']=_0x416236(0x48c);}}class _0x2f419b extends _0x52d2fc{constructor(_0x526105,_0x5265ad){const _0x27f622=_0x3f34;super(_0x526105+'@'+_0x5265ad+'\x20already\x20exists',_0x27f622(0x614),{'type':_0x526105,'key':_0x5265ad}),this[_0x27f622(0x68d)]=_0x27f622(0x1c7);}}class _0x3004ab extends _0x52d2fc{constructor(_0x19f3cb,_0x3a838){const _0x2091ec=_0x3f34,_0x1567f0=typeof _0x3a838;super('Invalid\x20index\x20key\x20type\x20for\x20\x27'+_0x19f3cb+_0x2091ec(0x646)+_0x1567f0+_0x2091ec(0x1ff)+_0x3a838,_0x2091ec(0x59a),{'index':_0x19f3cb,'key':_0x3a838,'keyType':_0x1567f0}),this[_0x2091ec(0x68d)]=_0x2091ec(0x5a6);}}class _0x10fb67 extends _0x52d2fc{constructor(_0x4e2d93){const _0x55070e=_0x3f34,_0x538a27=typeof _0x4e2d93;super('Invalid\x20primary\x20key\x20type:\x20'+_0x538a27+'.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20'+_0x4e2d93,_0x55070e(0x4a4),{'key':_0x4e2d93,'keyType':_0x538a27}),this[_0x55070e(0x68d)]=_0x55070e(0x2ba);}}class _0x3f1096 extends _0x52d2fc{constructor(_0x52ebd2){const _0x27a0b8=_0x3f34;super(_0x27a0b8(0x5d1)+_0x52ebd2+_0x27a0b8(0x589),_0x27a0b8(0x54b),{'type':_0x52ebd2}),this[_0x27a0b8(0x68d)]='OKDBTypeNotRegisteredError';}}class _0x1cf13f extends _0x52d2fc{constructor(_0x18738f){const _0x578dca=_0x3f34;super(_0x578dca(0x5d1)+_0x18738f+_0x578dca(0x4e8),'TYPE_ALREADY_REGISTERED',{'type':_0x18738f}),this[_0x578dca(0x68d)]='OKDBTypeAlreadyRegisteredError';}}class _0xdb9ebb extends _0x52d2fc{constructor(_0x567592,_0x483e6d){const _0x57f3b9=_0x3f34;super(_0x57f3b9(0x2e0)+_0x483e6d+_0x57f3b9(0x624)+_0x567592+_0x57f3b9(0x589),_0x57f3b9(0x2c0),{'type':_0x567592,'index':_0x483e6d}),this[_0x57f3b9(0x68d)]=_0x57f3b9(0x459);}}class _0x4d16bb extends _0x52d2fc{constructor(_0x2d1c38,_0x16fa1c){const _0x22dedb=_0x3f34;super(_0x22dedb(0x2e0)+_0x16fa1c+_0x22dedb(0x624)+_0x2d1c38+'\x27\x20is\x20already\x20registered',_0x22dedb(0x539),{'type':_0x2d1c38,'index':_0x16fa1c}),this[_0x22dedb(0x68d)]=_0x22dedb(0x1f9);}}class _0x37bdbf extends _0x52d2fc{constructor(_0x23bff9,_0x34704f={}){const _0x574afe=_0x3f34;super(_0x23bff9,_0x574afe(0x454),_0x34704f),this[_0x574afe(0x68d)]='OKDBInvalidValueError';}}class _0x16926f extends _0x52d2fc{constructor(_0x33ed2e,_0x40bf41,_0x339558,_0x2a0d8e,_0x4fee7c){const _0x2bbb02=_0x3f34;super(_0x2bbb02(0x530)+_0x33ed2e+'@'+_0x40bf41+_0x2bbb02(0x580)+_0x339558+_0x2bbb02(0x514)+_0x2a0d8e+_0x2bbb02(0x3cf)+_0x4fee7c+'\x27',_0x2bbb02(0x33e),{'type':_0x33ed2e,'index':_0x40bf41,'indexKey':_0x339558,'existingKey':_0x2a0d8e,'conflictingKey':_0x4fee7c}),this[_0x2bbb02(0x68d)]=_0x2bbb02(0x263);}}class _0x2f7082 extends _0x52d2fc{constructor(_0x8d3496,_0x1f83f0,_0x1d294b){const _0x1b2aa6=_0x3f34;super('Schema\x20validation\x20failed\x20for\x20'+_0x8d3496+'@'+_0x1f83f0,_0x1b2aa6(0x1ed),{'type':_0x8d3496,'key':_0x1f83f0,'errors':_0x1d294b}),this[_0x1b2aa6(0x68d)]='OKDBSchemaValidationError',this[_0x1b2aa6(0x3b5)]=_0x8d3496,this[_0x1b2aa6(0x528)]=_0x1f83f0,this[_0x1b2aa6(0x352)]=_0x1d294b;}}class _0x1cd1cb extends _0x52d2fc{constructor(_0x464829,_0xd5ce23){const _0x5a206d=_0x3f34;super(_0x5a206d(0x582)+_0x464829+':\x20'+_0xd5ce23[_0x5a206d(0x502)]+_0x5a206d(0x2d6),_0x5a206d(0x444),{'type':_0x464829,'failures':_0xd5ce23}),this[_0x5a206d(0x68d)]='OKDBSchemaCollectionError',this[_0x5a206d(0x3b5)]=_0x464829,this[_0x5a206d(0x4b4)]=_0xd5ce23;}}class _0x25ea83 extends _0x52d2fc{constructor(_0x40c923,_0x31dbc6,_0x2a7e32,_0x329b79,_0x932fdc){const _0x41f3ca=_0x3f34;super(_0x41f3ca(0x2d4)+_0x40c923+'@'+_0x31dbc6+'.'+_0x2a7e32+_0x41f3ca(0x3c9)+_0x329b79+'@'+_0x932fdc+_0x41f3ca(0x585),_0x41f3ca(0x3a4),{'sourceType':_0x40c923,'sourceKey':_0x31dbc6,'fieldPath':_0x2a7e32,'targetType':_0x329b79,'targetKey':_0x932fdc}),this[_0x41f3ca(0x68d)]='OKDBForeignKeyError',this[_0x41f3ca(0x328)]=_0x40c923,this['sourceKey']=_0x31dbc6,this[_0x41f3ca(0x5c8)]=_0x2a7e32,this[_0x41f3ca(0x5a5)]=_0x329b79,this[_0x41f3ca(0x287)]=_0x932fdc;}}class _0x3f5548 extends _0x52d2fc{constructor(_0x24e5e9,_0x5beb2a,_0x327a1d){const _0x14c5f7=_0x3f34;super(_0x14c5f7(0x562)+_0x24e5e9+'@'+_0x5beb2a+':\x20'+_0x327a1d['length']+_0x14c5f7(0x31f),'FOREIGN_KEY_DELETE_RESTRICTED',{'targetType':_0x24e5e9,'targetKey':_0x5beb2a,'references':_0x327a1d}),this[_0x14c5f7(0x68d)]=_0x14c5f7(0x5df),this['targetType']=_0x24e5e9,this[_0x14c5f7(0x287)]=_0x5beb2a,this['references']=_0x327a1d;}}class _0x4e83f6 extends _0x52d2fc{constructor(_0x28b08a,_0x1cd7d2,_0x2f25b8){const _0x2cb279=_0x3f34;super(_0x2cb279(0x5f6)+_0x1cd7d2+_0x2cb279(0x46f)+_0x28b08a+'\x22\x20is\x20used\x20by:\x20'+_0x2f25b8['map'](_0x1d6af3=>_0x1d6af3[_0x2cb279(0x2a5)]+':'+_0x1d6af3['name'])[_0x2cb279(0x3b2)](',\x20'),_0x2cb279(0x43d),{'type':_0x28b08a,'index':_0x1cd7d2,'usedBy':_0x2f25b8}),this[_0x2cb279(0x68d)]=_0x2cb279(0x3d8);}}return okdbError={'OKDBError':_0x52d2fc,'OKDBVersionMismatchError':_0x4dc32a,'OKDBNotFoundError':_0x517ae5,'OKDBAlreadyExistsError':_0x2f419b,'OKDBInvalidIndexKeyError':_0x3004ab,'OKDBInvalidPrimaryKeyError':_0x10fb67,'OKDBTypeNotRegisteredError':_0x3f1096,'OKDBTypeAlreadyRegisteredError':_0x1cf13f,'OKDBIndexNotRegisteredError':_0xdb9ebb,'OKDBIndexAlreadyRegisteredError':_0x4d16bb,'OKDBInvalidValueError':_0x37bdbf,'OKDBUniqueConstraintError':_0x16926f,'OKDBSchemaValidationError':_0x2f7082,'OKDBSchemaCollectionError':_0x1cd1cb,'OKDBForeignKeyError':_0x25ea83,'OKDBForeignKeyDeleteError':_0x3f5548,'OKDBIndexHasConsumersError':_0x4e83f6},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x17a4d3=_0x5dddf1;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x4fa84a={'PUT':'put','REMOVE':_0x17a4d3(0x66c),'INDEX_DROP':_0x17a4d3(0x351),'INDEX_REGISTER':_0x17a4d3(0x497),'INDEX_RESET':_0x17a4d3(0x4ff),'TYPE_REGISTER':'registerType','TYPE_DROP':_0x17a4d3(0x39b),'FTS_REGISTER':_0x17a4d3(0x460),'FTS_DROP':_0x17a4d3(0x3eb),'FTS_RESET':_0x17a4d3(0x1d2),'SCHEMA_SET':'setSchema','SCHEMA_DROP':_0x17a4d3(0x424),'TTL_SET':_0x17a4d3(0x68e),'TTL_CLEAR':'clearTtl'},_0x39550e={'SYSTEM_READY':_0x17a4d3(0x617),'SYSTEM_STOPPED':_0x17a4d3(0x3b8),'SYSTEM_CLOCK_CHANGE':_0x17a4d3(0x490),'SYSTEM_POKE':'system:poke','SYSTEM_DRAIN':_0x17a4d3(0x507),'SYSTEM_TYPE_DROP':'system:type_drop','SYSTEM_PROC':_0x17a4d3(0x5e2),'SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':_0x17a4d3(0x587),'ITEM_UPDATE':_0x17a4d3(0x219),'ITEM_REMOVE':_0x17a4d3(0x29d),'INDEX_RESET':_0x17a4d3(0x621),'INDEX_READY':'index:ready','INDEX_PROGRESS':_0x17a4d3(0x692),'VIEW_PROGRESS':_0x17a4d3(0x1f4),'INDEX_DROP':_0x17a4d3(0x5bc),'INDEX_REGISTERED':_0x17a4d3(0x3f7),'FTS_REGISTERED':'fts:registered','FTS_DROP':_0x17a4d3(0x26a),'FTS_RESET':_0x17a4d3(0x4bd),'SCHEMA_SET':_0x17a4d3(0x364),'SCHEMA_DROP':_0x17a4d3(0x51a),'UNIQUE_VIOLATION':_0x17a4d3(0x38d),'UNIQUE_VIOLATION_RESOLVED':'unique:violation_resolved','REF_VIOLATION':_0x17a4d3(0x3ea),'REF_VIOLATION_RESOLVED':_0x17a4d3(0x374),'SYNC_APPLY':_0x17a4d3(0x4e6),'TXN_START':'txn:start','TXN_END':_0x17a4d3(0x52b),'TXN_ROLLBACK':_0x17a4d3(0x295),'TYPE_REGISTERED':'type:registered','TYPE_DROP':_0x17a4d3(0x27b),'ENV_OPENED':'env:opened','ENV_REMOVED':_0x17a4d3(0x243),'SYSTEM_ENV_RELEASE':'system:env_release','TTL_EXPIRED':'ttl:expired','TTL_SET':_0x17a4d3(0x5c9),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x17a4d3(0x5fe),'LICENSE_ADDED':_0x17a4d3(0x4d0),'LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':'license:removed'},_0x3e52c8={'CREATING':_0x17a4d3(0x4e4),'RESETTING':_0x17a4d3(0x264),'READY':'ready','DROPPING':_0x17a4d3(0x439),'WAITING':_0x17a4d3(0x210)},_0x55a85f={'CREATED':'created','STARTING':_0x17a4d3(0x25f),'STARTED':_0x17a4d3(0x4bc),'STOPPING':_0x17a4d3(0x679),'STOPPED':_0x17a4d3(0x461)},_0x194b8f={'CREATING':_0x17a4d3(0x4e4),'READY':_0x17a4d3(0x5e1),'HALTED':'halted','STOPPED':_0x17a4d3(0x461),'RESETTING':_0x17a4d3(0x264)},_0x508884=Object[_0x17a4d3(0x559)]({'POKE':'bus:poke','DRAIN':'bus:drain','TYPE_DROP':_0x17a4d3(0x27d),'PROC':_0x17a4d3(0x29f),'ENV_RELEASE':_0x17a4d3(0x402)});return okdbEnums={'BUS_EVENTS':_0x508884,'CHANGE_ACTIONS':_0x4fa84a,'EVENTS':_0x39550e,'INDEX_STATE':_0x3e52c8,'OKDB_STATE':_0x55a85f,'VIEW_STATE':_0x194b8f},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x461db6=_0x5dddf1;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x5a1513=require$$1$1,_0x7a44cc=require$$1,_0x2cc72f=require$$0$1,_0x791928=_0x5a1513[_0x461db6(0x5d4)](_0x7a44cc['join'](__dirname,'keys/public.pem'),_0x461db6(0x5c5))[_0x461db6(0x205)](),_0x322112=_0x2cc72f[_0x461db6(0x683)](_0x791928)['export']({'type':_0x461db6(0x1f5),'format':_0x461db6(0x2ef)}),_0x609d17=_0x2cc72f['createHash'](_0x461db6(0x45e))[_0x461db6(0x448)](_0x322112)[_0x461db6(0x55b)](_0x461db6(0x2b5))[_0x461db6(0x2a1)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x791928,'PUB_FINGERPRINT':_0x609d17},okdbPubkey;}function _0x5884(){const _0x170b2b=['abs','\x20\x20✓\x20database\x20opened\x0a','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20open\x20admin\x20UI\x20in\x20browser\x0a\x20\x20','handle','_lock','OKDB_HTTP_WORKERS\x20env','\x20logs\x20on\x20\x20','writeUInt32BE','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','supervisorKey','body','runtimeProcessesView','workers','license','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','isActive','creating','\x22\x20matches\x20','sync:apply','_drain','\x27\x20already\x20registered',';\x20shmbuf\x20native\x20missing\x20→\x20forced\x20single-process','warn','load','updatedAt','fts:','active','_writer','stdin','detectInputType','\x20\x20⚠','node','_envs','--username','removeNode','1ofN:','Records','licenses','sync','allocUnsafe','hasDesired','[okdb]\x20warning:\x20failed\x20to\x20restore\x20identity/licenses\x20after\x20reset:\x20','sort','resetIndex','changes','Version\x20mismatch\x20for\x20','length','inflightAgesMs','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Flags','\x20for\x20commands,\x20','system:drain','every','_sampleOwnStats','--address','processor:error','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','_processStartedAt','_nodeDead','listRoutes','external','?\x0a\x20\x20(node\x20identity\x20and\x20licenses\x20are\x20preserved)\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','heapTotal','_isClusterController',']\x20already\x20maps\x20to\x20\x27','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','_openEnvLazy','bumpCmd','(on\x20any\x20path\x20command)','ITEM_REMOVE','schema:drop','database\x20path\x20not\x20writable:\x20','[okdb]\x20invalid\x20log\x20level:\x20\x22','[okdb]\x20imported\x20\x20types=','/type/users/query\x0a\x20\x20\x20\x20','DELETE\x20type/users/item/x','\x20\x20·\x20','\x0a\x20\x20License\x20details:','acquiredAt','LICENSEE','\x20to\x20browse\x20the\x20API,\x20','\x20\x20Path\x20access','[okdb]\x20backing\x20up\x20to\x20','connected','key','\x20(must\x20be\x201–65535)','min','txn:end','_admissionStarted','_ownMeta','no\x20.kdbconfig\x20(using\x20defaults)','reap','Unique\x20constraint\x20violated\x20on\x20','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','[okdb]\x20shutdown\x20drain\x20exceeded\x203000ms\x20—\x20hard-exiting\x0a','_drainOne','_supervisorKey','getCmd','Shutting\x20down\x20due\x20to\x20license\x20expiry','mean','files/','INDEX_ALREADY_REGISTERED','_isStale','_systemEnv','clearLine','api','heapUsed','[okdb]\x20starting…\x0a','\x0a\x20\x20✓\x20License\x20added','FTS_RESET','resetReadTxn','recent\x20writes\x20(newest\x20first)','_kind','lifecycle','_bpWaiters','running','tags','cause','flushLmdb','TYPE_NOT_REGISTERED','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20set\x20active\x20environment\x20(persists\x20in\x20session)\x0a\x20\x20','red','hint','[okdb]\x20exporting\x20blobs…','(code=','grants','\x20active\x20env:\x20','\x20(slot=','debug','cluster-wide','~licenses','quantum','_timer','freeze','[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','digest','\x20\x20\x20\x20writes:\x20\x20\x20\x20','doctor','reportThreadStats','worker','Feature\x20not\x20licensed:\x20','_inflight','Cannot\x20delete\x20','decommission','346662yTnyRI','\x20parkedNow=','\x20opening\x20','pin','info','uptime','process','\x22\x20→\x20','envsOpen','_statusEnv','ftsName','\x20does\x20not\x20exist','2.0.2','\x20\x20✗','slotKey','toUpperCase','okdb.pid','_heartbeatInFlight','_nodeDbFor','keys','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','caps','http','heartbeatMs','number','/\x20quit\x20/\x20Ctrl+C','config\x20file\x20invalid:\x20','./okdb-data',':\x20key\x20[','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','Cannot\x20set\x20enforce\x20schema\x20on\x20','_activateProcesses','[okdb]\x20invalid\x20port:\x20','\x20which\x20does\x20not\x20exist','--watch','item:create','_ensureDesired','\x27\x20doesn\x27t\x20exist','Embeddings','string','licenseHash','System','cpus','TYPES','properties','--test','help','_buildProcessingFacet','noRepl','_threadStats','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','PIN','perf_hooks','NOT_FOUND','INVALID_INDEX_KEY','raw-put',')\x20to\x20your\x20license\x20vendor.','function','push','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','activation','isHeld','\x20\x20#','routes','_lastCpuUsage','targetType','OKDBInvalidIndexKeyError','\x0a\x20\x20\x20\x20\x20\x20','getDesired','_startedAt','_released','processor:paused','_clusterOnMessage','--path','commitsPerSec','free\x20tier','\x20\x20Error:\x20','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','_lastCpuPct','error','import','processor:progress','role','\x0a[okdb]\x20error:\x20','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','listDesired','\x20\x20\x20\x20expires:\x20\x20\x20','confirm','index:drop','ms\x20activeWriters=','\x20\x20\x20\x20\x20http://localhost:',',\x20closing…\x0a','\x20\x20\x20\x20port:\x20\x20','_flushTimer','ttlMs','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','\x20\x20✓\x20OKDB\x20server\x20running','utf8','Files','ITEM_UPDATE','fieldPath','ttl:set','\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a','ppid','default:\x20cores−1\x20=\x20','ENV_CLOSING_RETRY','effective','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','config\x20http.workers','Type\x20\x27','STATUS','assertLimit','readFileSync','ceil','listenAddr','okdb','__esModule','expired','derivePin','processor','finally','--log-level','_heartbeatTimer','OKDBForeignKeyDeleteError','types\x20--env\x20staging','ready','system:proc','recheck','type/users/item/alice\x20--env\x20staging','processors/','listen','true','off','epoch','win32','\x0d[okdb]\x20blobs:\x20','--version','\x20supervised)','export','reset','~processes:desired','\x20\x20✓\x20Removed\x20license\x20','max','_handleInProcess','ephemeral','unclaimed','Index\x20\x22','(primary\x20=\x20processor)','\x1b[37m','net','isPrimary','_participate','\x20\x20╔═══════════════════════════╗','endsWith','license:invalid','stderr','_publishNow','_singletonLocks','writeFileSync','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','maxMs','--env','slot','readUInt32BE','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20this\x20help\x0a\x20\x20','\x20ipc\x20error:\x20','REMOVE','cli','param','dim','%),\x20','detachConsole','data','removeSync','[okdb]\x20import\x20complete','prompt','ALREADY_EXISTS','[okdb]\x20primary\x20okdb\x20close\x20error:\x20','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','system:ready','_rowKey','SYNC_COMMITS','envs','_done','consecutiveFailures','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','decodeActivationToken','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','index:reset','open\x20','functions','\x27\x20on\x20type\x20\x27','execArgv','SIGBREAK','sizeAfter','password','processing','\x20process','dedupeMax','okdb-diag.','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','node:perf_hooks','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','(none)','\x20\x20·\x20\x20','\x20oldestPendingMs=','546790JWNygM','dynamic',',\x20label:\x20','kill','_putRowSync','\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','_role','\x20\x20\x20\x20port:\x20\x20\x20\x20','platform','shutdown','removeLicense','__okdbSlot','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','timeMachine','blobs','expiresAt','build','put','(null)','\x27:\x20','[okdb]\x20port\x20','split','_listenAddr','[okdb]\x20unknown\x20token\x20action:\x20\x22','init','_highWater','label','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','get','peers=','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','user','License\x20limit\x20exceeded:\x20','\x20worker\x20slot=','_markSeen','processKey','procmodeack/','timingSafeEqual','parkedNow','isArray','object','enabled','map','transaction','_log','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','fast','node:crypto','list','cpuUsage','\x20worker(s)\x20remaining','shutting\x20down…\x0a','question','cpuPct','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','isConnected','raw-remove','remove','INDEX_READY','[okdb]\x20blobs:\x20imported=','message','node:events','shmbuf/package.json','\x20sync','[okdb]\x20exporting\x20env\x20\x22','_handlePoke','(unset)','DELETE','fork','description','stopping','\x20\x20\x20\x20graceful\x20shutdown\x0a','VIEW_PROGRESS','stdout','__writeCounter','liveThreadStats','issuedAt','_committed','reload','\x20MB\x20→\x20','createPublicKey','username','reason','createHmac','start','--token','_lockDb','processors','onWindow','mcp','name','setTtl','createEnvironment','[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20','type/users/item/alice','index:progress','charCodeAt','from','\x20\x20\x20\x20','_cmd','ITEM_CREATE','OKDBAlreadyExistsError','percentile','\x20\x20@','threads','\x20forked\x20','backup','_collectWriterFacet','logRequests','holder','License\x20expired\x20or\x20invalidated','_windowCbs','resetFts','\x0a\x20\x20Invalid\x20JSON:\x20','License\x20signature\x20invalid:\x20','\x20\x20✓\x20http\x20listening\x20on\x20:','respawnTimer','access','padEnd','transactionSync','_groupByProcess','replace','noteListenAddr','envs=','entry','422457UIIIoF','\x20\x20[','\x20\x20\x20\x20usage:\x20\x20\x20','extend','[okdb]\x20shmbuf\x20native\x20binding\x20unavailable\x20—\x20multi-process\x20clustering\x20is\x20unsafe\x20','toLowerCase','_singletonLock','POST','(workers\x20can\x27t\x20share\x20the\x20cross-process\x20HLC/clock).\x20Forcing\x20single-process\x20(was\x20','history','embeddings','indexes','PUB_FINGERPRINT','Full-text\x20search','SCHEMA_VALIDATION_FAILED','LICENSE_FEATURE_DISABLED','<path>','dead','FTS_DROP','env/:env','_buckets','view:progress','spki','\x20(must\x20be\x20an\x20integer\x20>=\x201)\x20—\x20using\x201','attachFeed','next','OKDBIndexAlreadyRegisteredError','shift','./okdb-export.ndjson','addSupervisedChild','toISOString','memoryUsage','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','filter','_baselines','disconnect','PUT\x20type/users/item/x\x20{\x22n\x22:1}','_buildChildRow','trim','safety','\x20\x20score:','processorsView','_rawDb','ESRCH','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','registry\x20publish\x20failing:\x20','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20',')\x20—\x20they\x20will\x20NOT\x20be\x20preserved','waiting','_active','LICENSE_EXPIRED_ACTION','state','listNodes','_licenseHash','force','[okdb-cluster]\x20primary\x20pid=','.kdbconfig','item:update','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','valid','copy','rss','events','pause','darwin','loadEnvFile','find','\x20\x20\x20\x20\x20\x20','\x1b[32m','INDEX_PROGRESS','registry\x20heartbeat\x20skipped\x20(writer=','137809sXiWZu','captureStackTrace','(worst\x20','clearThreadStats','dbPath','yellow','_seen','--grants','listLicenses','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','uuid','scrypt','_refreshDesiredSnapshot','_ensureTokensType','\x20pid=','--ttl','setOwnMeta','readUInt8','[okdb]\x20invalid\x20','tierList','\x0a[okdb]\x20received\x20','nodeKey','some','ms\x20max=','dirname','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','SIG_INVALID','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','env:removed','6uxGewX','QUIT','mkdirSync','\x20result',':want','[okdb]\x20reset\x20aborted','flushed','~processes:cmd','env/','okdb-writer:\x20env\x20closing\x20—\x20retry','_draining','INDEX_RESET','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','child_process','hostname','instanceId','reverse','beforeWrite','\x20worker(s)\x20still\x20serving','time','hasType','_children','has','\x20\x20Usage:','\x20\x20✓\x20Revoked\x20token\x20','setupPrimary','SIGINT','starting','Sync','okdb-http-worker-child.js','openDB','OKDBUniqueConstraintError','resetting','_onPoke','terminal','--no-cluster','port','default','fts:drop','_outstanding','view','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','use','test','node\x20','resolve','release','alloc','killable','Hint:\x20','tryAcquire','markClosed',',\x20stopping\x20workers…\x0a','\x20\x20Expected\x20one\x20of:','\x20log\x20level:\x20','type:drop','system','bus:type_drop','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','[okdb]\x20error:\x20--password\x20requires\x20--name','.kdb_history','sandbox','462656ssjwtt','oldestPendingMs','_onProcEvent','_lastCpuWindowMs','--types','targetKey','_admissionTimer','\x20writes\x20(','level','registerType','[okdb]\x20created\x20.kdbconfig','details','_report','catch','__vocab/version','_clusterWorkerAttached','version','race','childTransaction','txn:rollback','\x1b[31m','\x20\x20changes=','types','recordWrite','type/users\x20--help','\x20environment\x20','uncaughtException','item:remove','count','bus:proc',');\x20','slice','msg','claimGated','_lastCpuAt','kind','--name','[okdb]\x20reset:\x20','\x20\x20\x20\x20permissions:\x20','Admin','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','_sandbox','_migrateVocab','\x20day(s).','\x0a\x20\x20okdb\x20doctor\x0a','\x20\x20\x20http://localhost:','singletonClaims','HELP','revoke','columns','licenseId','hex','\x20\x20records=','false','_selfKey','xdg-open\x20','OKDBInvalidPrimaryKeyError','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','_desired','\x20\x20\x20\x20admin:\x20\x20\x20http://localhost:','_rootDb','--print','INDEX_NOT_REGISTERED','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','noCluster','\x0a\x20\x20','\x20\x20✓\x20OKDB\x20cluster\x20running','http://localhost:','530208OdqtZe','\x0a\x20\x20✓\x20Token\x20created','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','unknown','[filter]','env','level:\x20info','_started','0123456789ABCDEFGHJKMNPQRSTVWXYZ','passive\x20HTTP\x20worker(s)\x20serving\x20:','drain','createHash','children','_getType','Foreign\x20key\x20violation:\x20','_flushDebounce','\x20documents\x20fail\x20validation','\x20\x20\x20\x20\x20\x20\x20','enable','set','\x0a[okdb]\x20fatal\x20error:','_startAdmission','\x20logs\x20off\x0a','\x20\x20✓\x20','/api','rowKey','Index\x20\x27','rawBuf','delete','cluster:','\x20<path>\x20[json-body]','result','repeat','listAll','\x20phase=','_onTick','SWAP','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','\x22\x20already\x20exists','_durs','body:\x20','der','USE','\x20+\x20','decoded','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','summary','/admin/index.html','startsWith','commit','_enqueuedAt','call','ENV','expires','\x20\x20Writes:\x20\x20','standalone','exportToFile','ms\x20p99=','activateLicense','\x20licenses','publishOwnRow','note','admin','concat','_putRowAsync','[okdb]\x20error:\x20','host','\x20\x20env=','_maybePublish','unref','participate','splice','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','code',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','exp','equals','SYSTEM_STOPPED','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','startHeartbeat','_key','[okdb]\x20opening\x20','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','_license','writeUInt8','shmbufNative','env/staging/info','exec','firstTs','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','\x1b[35m','setDesired','\x20\x20╚═══════════════════════════╝','boolean','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','\x20\x20(licensee:\x20','processor:retry','fn-runner','sourceType','config','afterWrite','\x0a\x20\x20okdb\x20—\x20standalone\x20OKDB\x20server\x0a\x0a\x20\x20Usage:\x0a\x20\x20\x20\x20okdb\x20[options]\x0a\x20\x20\x20\x20okdb\x20<command>\x0a\x0a\x20\x20Options:\x0a\x20\x20\x20\x20-p,\x20--port\x20<port>\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x20(default:\x208484)\x0a\x20\x20\x20\x20-d,\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x20(default:\x20./okdb-data)\x0a\x20\x20\x20\x20-k,\x20--key\x20\x20<secret>\x20\x20\x20\x20\x20\x20Encryption\x20key\x20for\x20data\x20at\x20rest\x0a\x20\x20\x20\x20-c,\x20--config\x20<file>\x20\x20\x20\x20\x20\x20Config\x20file\x20path\x20(default:\x20.kdbconfig)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-level\x20<level>\x20\x20Log\x20level:\x20debug\x20|\x20info\x20|\x20warn\x20|\x20error\x20(default:\x20info)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-repl\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20without\x20interactive\x20shell\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-admin\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20\x20\x20\x20\x20--open\x20[ip\x20...]\x20\x20\x20\x20\x20\x20Open\x20mode:\x20bypass\x20auth\x20for\x20listed\x20IPs\x20(default:\x20localhost).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Examples:\x20--open\x20\x20--open\x20192.168.1.0/24\x20\x20--open\x20*\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-requests\x20\x20\x20\x20\x20\x20\x20Print\x20every\x20HTTP\x20request\x20to\x20stdout\x20(for\x20debugging)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--workers\x20<n>\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20capable\x20worker\x20processes\x20sharing\x20the\x20listen\x20socket\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(default:\x20cores\x20−\x201).\x20Each\x20worker\x20serves\x20HTTP\x20+\x20SSE\x20AND\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20processes\x20(claims\x20leases,\x20drains\x20on\x20its\x20own\x20loop);\x20the\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20cluster\x20primary\x20is\x20a\x20thin\x20passive\x20supervisor.\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-cluster\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20single-process\x20(equivalent\x20to\x20--workers\x201)\x0a\x20\x20\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x0a\x20\x20Commands:\x0a\x20\x20\x20\x20version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20doctor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20health\x20checks\x0a\x20\x20\x20\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20.kdbconfig\x20and\x20okdb-data/\x0a\x20\x20\x20\x20token\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20a\x20token\x20in\x20the\x20local\x20DB\x20(direct\x20access,\x20no\x20HTTP)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--name\x20<name>\x20\x20\x20\x20\x20\x20For\x20password\x20login\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<pass>\x20\x20Password\x20(requires\x20--name)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--label\x20<text>\x20\x20\x20\x20\x20Human\x20description\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--permissions\x20<l>\x20\x20Comma-separated\x20baseline\x20permissions\x20(e.g.\x20\x22*\x22\x20or\x20\x22data:read\x22)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--grants\x20<json>\x20\x20\x20\x20Per-env\x20grants\x20as\x20JSON\x20(e.g.\x20\x27{\x22orders\x22:[\x22data:*\x22]}\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--ttl\x20<ms>\x20\x20\x20\x20\x20\x20\x20\x20\x20Optional\x20TTL\x20in\x20milliseconds\x0a\x20\x20\x20\x20token\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20all\x20tokens\x20in\x20the\x20local\x20DB\x0a\x20\x20\x20\x20token\x20revoke\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20Revoke\x20(delete)\x20a\x20token\x20by\x20id\x20(full\x20uuid\x20or\x20unique\x20prefix)\x0a\x20\x20\x20\x20join\x20<address>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Join\x20an\x20existing\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--token\x20<t>\x20\x20\x20\x20\x20\x20\x20\x20Bearer\x20token\x20from\x20the\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--username\x20<u>\x20\x20\x20\x20\x20Or,\x20username\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<p>\x20\x20\x20\x20\x20Password\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--address\x20<addr>\x20\x20\x20This\x20node\x27s\x20reachable\x20sync\x20address\x20(required)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20Local\x20DB\x20path\x0a\x20\x20\x20\x20backup\x20[dir]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Hot\x20filesystem\x20backup\x20via\x20LMDB\x20native\x20copy\x20(default:\x20./okdb-backup)\x0a\x20\x20\x20\x20export\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20export\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20env\x20to\x20export\x20(default:\x20default)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20comma-separated\x20type\x20filter\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20include\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20export\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20import\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20import\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20target\x20env\x20override\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20import\x20only\x20these\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--drop\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20drop\x20&\x20recreate\x20existing\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20restore\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20import\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20and\x20recreate\x20database\x20(with\x20confirmation);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20node\x20identity\x20and\x20licenses\x20are\x20preserved\x0a\x20\x20\x20\x20license\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20stored\x20licenses,\x20current\x20tier,\x20and\x20usage\x0a\x20\x20\x20\x20license\x20<blob|path>\x20\x20\x20\x20\x20\x20Add\x20a\x20license\x20blob\x20(or\x20read\x20from\x20a\x20.license\x20file)\x0a\x20\x20\x20\x20license\x20<activation>\x20\x20\x20\x20\x20Activate\x20a\x20previously-added\x20license\x20with\x20the\x20vendor\x27s\x20token\x0a\x20\x20\x20\x20license\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20details\x20for\x20one\x20stored\x20license\x20(by\x20uuid\x20or\x20prefix)\x0a\x20\x20\x20\x20license\x20remove\x20<id>\x20\x20\x20\x20\x20\x20Remove\x20a\x20stored\x20license\x0a\x0a\x20\x20Environment\x20variables:\x0a\x20\x20\x20\x20OKDB_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x0a\x20\x20\x20\x20OKDB_PATH\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x0a\x20\x20\x20\x20OKDB_LOG_LEVEL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log\x20level\x20(debug|info|warn|error)\x0a\x20\x20\x20\x20OKDB_KEY\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Encryption\x20key\x0a\x20\x20\x20\x20OKDB_NO_REPL=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20REPL\x0a\x20\x20\x20\x20OKDB_NO_ADMIN=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20OKDB_HTTP_WORKERS\x20\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20passive\x20HTTP\x20worker\x20processes\x20(default:\x20cores\x20−\x201;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20forced\x20to\x201\x20if\x20the\x20shmbuf\x20native\x20binding\x20is\x20unavailable)\x0a\x0a\x20\x20Config\x20file\x20(.kdbconfig)\x20—\x20JSON,\x20all\x20keys\x20optional:\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22port\x22:\x20\x20\x20\x20\x208484,\x0a\x20\x20\x20\x20\x20\x20\x22path\x22:\x20\x20\x20\x20\x20\x22./okdb-data\x22,\x0a\x20\x20\x20\x20\x20\x20\x22key\x22:\x20\x20\x20\x20\x20\x20\x22...\x22,\x0a\x20\x20\x20\x20\x20\x20\x22logLevel\x22:\x20\x22info\x22,\x0a\x20\x20\x20\x20\x20\x20\x22noAdmin\x22:\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22noRepl\x22:\x20\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22auth\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22open\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20Examples:\x0a\x20\x20\x20\x20okdb\x0a\x20\x20\x20\x20okdb\x20--port\x209000\x20--path\x20./mydb\x0a\x20\x20\x20\x20okdb\x20--no-repl\x20--port\x208080\x0a\x20\x20\x20\x20okdb\x20--open\x0a\x20\x20\x20\x20okdb\x20--open\x20192.168.1.0/24\x0a\x20\x20\x20\x20okdb\x20doctor\x0a\x20\x20\x20\x20okdb\x20backup\x20./my-backup\x0a','decommissioning','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','appendFileSync','clear','--password','importBlobs','_nodeDb','clusterWorkers','LICENSE_ACTIVATION_INVALID','queue/','ms\x20(attempt\x20','\x20\x20skipped=','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','\x1b[90m','input:\x20','fill','values','null','UNIQUE_CONSTRAINT','queue-worker','(add\x20a\x20license\x20first)','PUBLIC_KEY_PEM','Invalid\x20activation\x20token:\x20','importFromFile','depth','http-server','decommissioned','./okdb-backup','_lastPublishAt','[okdb]\x20importing\x20','deregisterSelf','\x20in\x20','getSecurityNotices','isWorker','\x20\x20→\x20\x20','val','getChanges','dropIndex','errors','FTS_REGISTERED','selfKey','emit','--no-repl','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','decodeLicenseBlob','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','getClock','primary','wrong_node','_wantDbHandle','../okdb','active:','\x20\x20\x20\x20api:\x20\x20\x20\x20\x20http://localhost:','constructor','_pending','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20','schema:set','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','\x0d[okdb]\x20','online','CREATED','maxExtra','SIGTERM','blob','__identity','node/','[okdb-cluster]\x20worker\x20pid=','status','\x22\x20(must\x20be\x20debug|info|warn|error)','\x20deleted','toFixed','application/json','ref:violation_resolved','setLogger','SYSTEM_POKE','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','token','loop-lag','\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20(','putSync','_changefeed','\x20@\x20','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','write','(empty)','types/env=','auth','addLicense','(no\x20types)','Processors','keys:','now','OKDB-PIN-V1:','processor:resumed','License\x20already\x20stored','_scheduleFlush','\x20\x20(','unique:violation','\x0a\x20\x20\x20\x20','http.workers','white','\x20\x20Envs:\x20\x20\x20\x20','ORPHAN\x20(env-closed\x20write)','gray','Build\x20expects\x20public\x20key\x20fingerprint\x20','_bpParkedTotal','fts','_acquiredAt','clusterStatusView','\x20→\x20POST\x20/api/env/','--key','dropType','_buildOwnRow','features','PATCH','includes','_holderDead','expiry','ROUTES','_closed','FOREIGN_KEY_VIOLATION','_dedupeMax','committed','Events','send','migrate','--help','__OKDB_PUB_FINGERPRINT__','\x20not\x20found','[okdb-cluster]\x20','seq','\x20\x20Some\x20checks\x20failed.\x0a','prototype','\x20\x20[okdb]\x20','join','--drop','\x20===','type','_dedupeKey',':\x20expected\x20','system:stopped','exports','cyan','attach','\x0a===\x20OKDB_DIAG\x20','[okdb]\x20http\x20workers:\x20','floor','argv','\x20records','\x20\x20\x20\x20license:\x20','randomBytes','processorId','verifyActivation','\x22\x20to\x20enable\x20it.','inspect','Engines','processor:ready','\x20references\x20','LICENSE_HASH_MISMATCH','_quantum','toLocaleString','index','unlinkSync','\x27,\x20cannot\x20map\x20to\x20\x27','isInteger','indexOf','--port','getPins','access:\x20','EADDRINUSE','createInterface','createServer','OKDBIndexHasConsumersError','stop','procmode/','once','line','ttl','\x0a\x0a\x20\x20','OKDBVersionMismatchError','LICENSED_BUILD','bold','typesPerEnv','_isWriter','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','syncPeers','_caps','hasOwnProperty','close','config\x20file\x20valid:\x20','ref:violation','dropFts','embedded','all','indexToDb','round','\x20records…','forEach','value','\x20\x20Usage:\x20','quit','\x1b[1m','\x20\x20\x20\x20features:\x20\x20','index:registered','deaths','\x1b[2m','server','SYSTEM_PROC','listening','padStart','fromEntries','maxWrites','randomUUID','busy','bus:env_release','\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/envs\x0a\x20\x20\x20\x20','compaction','cluster','processes','change','publishChildRow','FEATURES','rows=','sig','\x20SECURITY\x20NOTICE','[okdb]\x20nothing\x20to\x20reset\x20—\x20','invalid','readline','path','_adminRelay','_publishFailWarned','_instanceId','ms\x20mean=','getRange','\x20\x20Tier:\x20\x20\x20\x20','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','noAdmin','existsSync','\x20\x20\x20\x20licensee:\x20\x20','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','cursorKey','title','operation','\x20env','VERSION_MISMATCH','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','ingest','dropSchema','~processes','VERB','ENVS','\x0a\x20\x20Joining\x20cluster\x20at\x20','fanout','queue','byteLength','logs','method','Activation\x20invalid:\x20','\x20\x20(need\x20≥\x2018)','--blobs','verify','add','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','type/','records','\x20\x20\x20\x20status:\x20\x20\x20\x20active','processingStatusView','dropping','workersFlag','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','open','INDEX_HAS_CONSUMERS',',\x20signal=','--label','\x22.\x20Use:\x20create,\x20list,\x20revoke','Invalid\x20license\x20blob:\x20','allSettled','\x20/\x20','SCHEMA_COLLECTION_INVALID','register','putNode','\x1b[36m','update','offWindow','\x20\x20\x20\x20path:\x20\x20\x20\x20','addedAt','_wantDb','namespace','async','\x20\x20(no\x20env\x20draining)','[okdb]\x20loaded\x20config:\x20','INDEX_REGISTERED','\x20\x20Type\x20','signalWant','INVALID_VALUE','permissions','start\x20','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','event','OKDBIndexNotRegisteredError','writes=','transport:\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20API\x20docs\x20for\x20a\x20path\x0a\x0a\x20\x20','then','sha256','{}[]:,\x0a\x0d\x09\x20','registerFts','stopped','_onItem','ms/','\x20writer{depth=','_desiredOverlay','isWanted','already\x20in\x20use','ms\x20env=','--permissions','engines','isFile','\x20file','magenta','exit','\x22\x20on\x20\x22','_isFree','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','123945QLLzwA','\x20(expires\x20','--changes','size','Examples','\x20statusEnv=','pid','_nodeDbCache','GET','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','limits','_onStop','unhandledRejection','green','licensed','stringify','licensee','dest','LICENSE_INVALID','_coordinator','sizeBefore','current','/api/','_startHeartbeat','\x20\x20\x20\x20id:\x20\x20\x20\x20','\x20\x20All\x20checks\x20passed.\x0a','OKDBNotFoundError','isDead','stack','SIGINT\x20(double-tap)','system:clock_change','single','startedAt','transport','_isReader','createdAt','parse','registerIndex','_hbTimer','workersConfigured','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20',')\x20exited\x20','removeSupervisedChild','\x20\x20\x20\x20addedAt:\x20\x20\x20','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','_computeStatus','licenseType','\x20\x20Shell\x20commands','log','--inspect','INVALID_PRIMARY_KEY','\x20already\x20in\x20use','logLevel','--workers','--config','../','selfAddress','payload','typeSubDbs','error:\x20','_enableChangelog','drop','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','\x20HTTP\x20workers\x20','type/users/query\x20{\x22active\x22:true}','_cursors','failures','draining','_db','files','entries','stats','\x20type','options','started','fts:reset','~tokens','\x20MB)','base64url','\x20\x20(name:\x20','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','available','Indexes','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','\x20\x20(unlimited)','[okdb]\x20export\x20complete','\x20\x20⚠\x20\x20','identity','OKDB_HTTP_WORKERS','toString','use\x20<env>','meta','\x20times\x20in\x20','license:added','/api/env/','loop-lag\x20','mode'];_0x5884=function(){return _0x170b2b;};return _0x5884();}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x27937e=_0x5dddf1;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x2f76a8=require$$0$1,{OKDBError:_0x5dd789}=requireOkdbError(),{EVENTS:_0x592720}=requireOkdbEnums(),_0x4a47f6=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0xb15560,LICENSE_TYPE_INTERNAL:_0x5b7d9b,OPEN_LICENSE_MAX_DURATION_MS:_0x30bb3e}=_0x4a47f6,_0x529795=requireOkdbPubkey(),_0x28d108={'LICENSED_BUILD':_0x27937e(0x5e7),'PUBLIC_KEY_PEM':_0x529795[_0x27937e(0x341)],'PUB_FINGERPRINT':_0x529795[_0x27937e(0x1eb)],'LICENSE_EXPIRED_ACTION':_0x27937e(0x4a2)},_0x1dcfb3=_0x27937e(0x556),_0x636913={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x3bf186(_0x224ec2){const _0x4a27ef=_0x27937e;!_0x224ec2[_0x4a27ef(0x258)](_0x1dcfb3)&&await _0x224ec2[_0x4a27ef(0x28b)](_0x1dcfb3);}class _0x16ece7{constructor(_0x1682dd){const _0x46a22c=_0x27937e;this['okdb']=_0x1682dd,this[_0x46a22c(0x211)]=null;}async[_0x27937e(0x681)](){const _0x87aab3=_0x27937e,_0x1de886=this[_0x87aab3(0x5d7)][_0x87aab3(0x53b)];if(!_0x1de886||!_0x1de886[_0x87aab3(0x258)](_0x1dcfb3)){this[_0x87aab3(0x211)]=null;return;}const _0x8f71bb=this[_0x87aab3(0x5d7)]['id'];let _0x10ce78=null;for(const {key:_0x27ef5b,value:_0x26c9e8}of _0x1de886['getRange'](_0x1dcfb3)){const _0x250cf4=this[_0x87aab3(0x49f)](_0x26c9e8,_0x8f71bb);_0x250cf4===_0x87aab3(0x4ee)&&!_0x10ce78&&(_0x10ce78={..._0x26c9e8,'id':_0x27ef5b,'status':_0x250cf4});}this[_0x87aab3(0x211)]=_0x10ce78;if(this[_0x87aab3(0x211)]&&this[_0x87aab3(0x211)][_0x87aab3(0x4a0)]===_0xb15560){const _0x5dd7a5=Math[_0x87aab3(0x5d5)]((this[_0x87aab3(0x211)][_0x87aab3(0x642)]-Date[_0x87aab3(0x387)]())/0x5265c00);this[_0x87aab3(0x5d7)][_0x87aab3(0x4a2)]?.[_0x87aab3(0x4ea)](_0x87aab3(0x4c6)+_0x5dd7a5+'\x20day(s).',{'feature':_0x87aab3(0x4e1),'licensee':this[_0x87aab3(0x211)]['licensee'],'expiresAt':new Date(this[_0x87aab3(0x211)][_0x87aab3(0x642)])[_0x87aab3(0x1fd)]()});}this[_0x87aab3(0x211)]&&this[_0x87aab3(0x211)][_0x87aab3(0x4a0)]===_0x5b7d9b&&this[_0x87aab3(0x5d7)][_0x87aab3(0x4a2)]?.[_0x87aab3(0x4ea)](_0x87aab3(0x49e),{'feature':_0x87aab3(0x4e1),'licensee':this[_0x87aab3(0x211)][_0x87aab3(0x482)]});}[_0x27937e(0x49f)](_0x3a1fe7,_0x77a9f6){const _0x44b909=_0x27937e;if(!_0x3a1fe7[_0x44b909(0x36b)])return _0x44b909(0x40f);let _0x1dc22c;try{_0x1dc22c=_0x4a47f6['decodeLicenseBlob'](_0x3a1fe7['blob']);}catch(_0x4cd82c){return _0x44b909(0x40f);}try{const _0x97adfb=_0x2f76a8[_0x44b909(0x431)](null,_0x1dc22c['payload'],_0x28d108[_0x44b909(0x341)],_0x1dc22c[_0x44b909(0x40c)]);if(!_0x97adfb)return _0x44b909(0x40f);}catch(_0x324f8c){return _0x44b909(0x40f);}if(_0x1dc22c[_0x44b909(0x2f2)][_0x44b909(0x4a0)]===_0x5b7d9b)return'active';if(_0x1dc22c[_0x44b909(0x2f2)]['expiresAt']<=Date[_0x44b909(0x387)]())return _0x44b909(0x5d9);if(_0x1dc22c['decoded']['licenseType']===_0xb15560)return'active';if(!_0x3a1fe7['activation'])return'pending';const _0x20b9ae=_0x4a47f6[_0x44b909(0x3c4)]({'tokenString':_0x3a1fe7[_0x44b909(0x5a0)],'nodeId':_0x77a9f6,'rawBlobBuf':_0x1dc22c[_0x44b909(0x2e1)],'pubKeyPem':_0x28d108[_0x44b909(0x341)],'pubFingerprint':_0x28d108[_0x44b909(0x1eb)]});if(_0x20b9ae['reason']===_0x44b909(0x3ca)||_0x20b9ae[_0x44b909(0x685)]==='SIG_INVALID')return'wrong_node';if(_0x20b9ae[_0x44b909(0x685)]==='ACTIVATION_EXPIRED')return _0x44b909(0x5d9);if(!_0x20b9ae['valid'])return _0x44b909(0x35c);return _0x44b909(0x4ee);}get[_0x27937e(0x4ee)](){const _0x55a27d=_0x27937e;return this[_0x55a27d(0x211)];}get[_0x27937e(0x5ce)](){return this['_active']??_0x636913;}['assertFeature'](_0x5a5312){const _0x351fb=_0x27937e;if(_0x28d108[_0x351fb(0x3e0)]!==_0x351fb(0x5e7))return;const _0x1b769b=this[_0x351fb(0x5ce)];if(!_0x1b769b['features']?.[_0x5a5312]){const _0x6e67a9=_0x1b769b[_0x351fb(0x470)]?'Feature\x20not\x20available\x20on\x20free\x20tier:\x20'+_0x5a5312+'.\x20Add\x20a\x20license\x20that\x20includes\x20\x22'+_0x5a5312+_0x351fb(0x3c5):_0x351fb(0x560)+_0x5a5312+'.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22'+_0x5a5312+'\x22.';throw new _0x5dd789(_0x6e67a9,_0x351fb(0x1ee),{'feature':_0x5a5312});}}['isFeatureEnabled'](_0x5ad179){const _0x31f9ce=_0x27937e;if(_0x28d108[_0x31f9ce(0x3e0)]!==_0x31f9ce(0x5e7))return!![];return!!this[_0x31f9ce(0x5ce)]['features']?.[_0x5ad179];}[_0x27937e(0x5d3)](_0x29908c,_0x2feb95){const _0x272eb8=_0x27937e;if(_0x28d108['LICENSED_BUILD']!==_0x272eb8(0x5e7))return;const _0x371459=this[_0x272eb8(0x5ce)],_0x50ce18=_0x371459[_0x272eb8(0x47c)]?.[_0x29908c];if(_0x50ce18===null||_0x50ce18===undefined||_0x50ce18===0x0)return;if(_0x2feb95>=_0x50ce18)throw new _0x5dd789(_0x272eb8(0x653)+_0x29908c+'\x20('+_0x2feb95+'/'+_0x50ce18+')','LICENSE_LIMIT_EXCEEDED',{'limit':_0x29908c,'current':_0x2feb95,'max':_0x50ce18});}async[_0x27937e(0x383)](_0x4561a9){const _0x205e81=_0x27937e;let _0x4e4554;try{_0x4e4554=_0x4a47f6[_0x205e81(0x358)](_0x4561a9);}catch(_0x54fbe8){throw new _0x5dd789(_0x205e81(0x441)+_0x54fbe8[_0x205e81(0x66f)],_0x205e81(0x484));}let _0xd70ed3;try{_0xd70ed3=_0x2f76a8[_0x205e81(0x431)](null,_0x4e4554[_0x205e81(0x4ab)],_0x28d108[_0x205e81(0x341)],_0x4e4554[_0x205e81(0x40c)]);}catch(_0x5c9702){throw new _0x5dd789(_0x205e81(0x1d4)+_0x5c9702[_0x205e81(0x66f)],_0x205e81(0x484));}if(!_0xd70ed3)throw new _0x5dd789(_0x205e81(0x3e4)+(_0x205e81(0x394)+_0x28d108[_0x205e81(0x1eb)]+'.\x20')+_0x205e81(0x359),'LICENSE_INVALID',{'expectedFingerprint':_0x28d108['PUB_FINGERPRINT']});if(_0x4e4554[_0x205e81(0x2f2)][_0x205e81(0x4a0)]===_0xb15560){const _0x2253ad=_0x4e4554[_0x205e81(0x2f2)][_0x205e81(0x642)]-_0x4e4554[_0x205e81(0x2f2)][_0x205e81(0x67f)];if(_0x2253ad>_0x30bb3e)throw new _0x5dd789('Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20'+Math[_0x205e81(0x5d5)](_0x2253ad/(0x1e*0x5265c00))+'\x20months\x20from\x20issuance)',_0x205e81(0x484));}const _0x5cc236=this['okdb'][_0x205e81(0x53b)];await _0x3bf186(_0x5cc236);const _0x2571f4=_0x4a47f6[_0x205e81(0x58c)](_0x4e4554[_0x205e81(0x2e1)])[_0x205e81(0x4cc)](_0x205e81(0x2b5));for(const {value:_0x3fda60}of _0x5cc236[_0x205e81(0x416)](_0x1dcfb3)){if(_0x3fda60[_0x205e81(0x215)]===_0x2571f4)throw new _0x5dd789(_0x205e81(0x38a),_0x205e81(0x484));}const _0x2aaae9=_0x2f76a8[_0x205e81(0x400)](),_0x129cbd={'blob':_0x4561a9,'activation':null,'addedAt':Date[_0x205e81(0x387)](),'_licenseHash':_0x2571f4,'licensee':_0x4e4554['decoded'][_0x205e81(0x482)],'expiresAt':_0x4e4554['decoded'][_0x205e81(0x642)],'features':_0x4e4554['decoded'][_0x205e81(0x39d)],'limits':_0x4e4554[_0x205e81(0x2f2)][_0x205e81(0x47c)],'licenseType':_0x4e4554[_0x205e81(0x2f2)]['licenseType']};return await _0x5cc236[_0x205e81(0x644)](_0x1dcfb3,_0x2aaae9,_0x129cbd),{'id':_0x2aaae9,..._0x129cbd};}async[_0x27937e(0x300)](_0x37105c){const _0x183944=_0x27937e;let _0x4e6d4a;try{_0x4e6d4a=_0x4a47f6[_0x183944(0x61f)](_0x37105c);}catch(_0x570933){throw new _0x5dd789(_0x183944(0x342)+_0x570933['message'],_0x183944(0x334));}const _0x14f0a3=_0x4e6d4a[_0x183944(0x58c)][_0x183944(0x4cc)](_0x183944(0x2b5)),_0x10220a=this[_0x183944(0x5d7)][_0x183944(0x53b)];if(!_0x10220a||!_0x10220a[_0x183944(0x258)](_0x1dcfb3))throw new _0x5dd789('No\x20license\x20found\x20matching\x20this\x20activation\x20token',_0x183944(0x334));let _0x38056d=null,_0x4bea5a=null;for(const {key:_0xd198be,value:_0x3fcd6c}of _0x10220a[_0x183944(0x416)](_0x1dcfb3)){if(_0x3fcd6c['_licenseHash']===_0x14f0a3){_0x38056d=_0xd198be,_0x4bea5a=_0x3fcd6c;break;}}if(!_0x38056d)throw new _0x5dd789('No\x20license\x20found\x20matching\x20this\x20activation\x20token',_0x183944(0x334));const {rawBuf:_0x4a1e3d}=_0x4a47f6[_0x183944(0x358)](_0x4bea5a['blob']),_0x3947fd=_0x4a47f6['verifyActivation']({'tokenString':_0x37105c,'nodeId':this[_0x183944(0x5d7)]['id'],'rawBlobBuf':_0x4a1e3d,'pubKeyPem':_0x28d108[_0x183944(0x341)],'pubFingerprint':_0x28d108[_0x183944(0x1eb)]});if(!_0x3947fd[_0x183944(0x21b)])throw new _0x5dd789(_0x183944(0x42e)+_0x3947fd[_0x183944(0x685)],_0x183944(0x334),{'reason':_0x3947fd['reason']});const _0x1cb591={..._0x4bea5a,'activation':_0x37105c};return await _0x10220a[_0x183944(0x448)](_0x1dcfb3,_0x38056d,_0x1cb591),{'id':_0x38056d,..._0x1cb591};}async[_0x27937e(0x63d)](_0x35adcf){const _0x2f6e10=_0x27937e,_0x1d7d5e=this[_0x2f6e10(0x5d7)][_0x2f6e10(0x53b)];if(!_0x1d7d5e||!_0x1d7d5e[_0x2f6e10(0x258)](_0x1dcfb3))return;await _0x1d7d5e['remove'](_0x1dcfb3,_0x35adcf);}async[_0x27937e(0x22f)](){const _0x4ea654=_0x27937e,_0x136ea9=this[_0x4ea654(0x5d7)][_0x4ea654(0x53b)];if(!_0x136ea9||!_0x136ea9['hasType'](_0x1dcfb3))return[];const _0x5d7bb9=this['okdb']['id'],_0x1d2622=[];for(const {key:_0x1fd2a1,value:_0x4e5703}of _0x136ea9[_0x4ea654(0x416)](_0x1dcfb3)){const _0x21befa=this[_0x4ea654(0x49f)](_0x4e5703,_0x5d7bb9);_0x1d2622[_0x4ea654(0x59e)]({..._0x4e5703,'id':_0x1fd2a1,'status':_0x21befa});}return _0x1d2622;}[_0x27937e(0x3d3)](){const _0x4f806b=_0x27937e,_0x594d24=this['okdb'][_0x4f806b(0x53b)];if(!_0x594d24||!_0x594d24[_0x4f806b(0x258)](_0x1dcfb3))return[];const _0x9b11c6=this['okdb']['id'],_0x4eb833=[];for(const {key:_0x671972,value:_0x9a7245}of _0x594d24[_0x4f806b(0x416)](_0x1dcfb3)){if(_0x9a7245['_licenseHash']){if(_0x9a7245[_0x4f806b(0x4a0)]===_0xb15560)_0x4eb833['push']({'licenseId':_0x671972,'pin':null});else{const _0xcab4d4=Buffer[_0x4f806b(0x1c3)](_0x9a7245[_0x4f806b(0x215)],_0x4f806b(0x2b5)),{pin:_0x91a6e4}=_0x4a47f6[_0x4f806b(0x5da)](_0x9b11c6,_0xcab4d4,_0x28d108[_0x4f806b(0x1eb)]);_0x4eb833[_0x4f806b(0x59e)]({'licenseId':_0x671972,'pin':_0x91a6e4});}}}return _0x4eb833;}async[_0x27937e(0x5e3)](){const _0x24936b=_0x27937e,_0xc14566=this[_0x24936b(0x211)];await this[_0x24936b(0x681)]();if(this[_0x24936b(0x211)]&&this[_0x24936b(0x211)][_0x24936b(0x4a0)]===_0xb15560){const _0xc34015=Math[_0x24936b(0x5d5)]((this[_0x24936b(0x211)][_0x24936b(0x642)]-Date['now']())/0x5265c00);this[_0x24936b(0x5d7)][_0x24936b(0x4a2)]?.['warn'](_0x24936b(0x4c6)+_0xc34015+_0x24936b(0x2ad),{'feature':'license','licensee':this[_0x24936b(0x211)][_0x24936b(0x482)],'expiresAt':new Date(this[_0x24936b(0x211)][_0x24936b(0x642)])[_0x24936b(0x1fd)]()});}this[_0x24936b(0x211)]&&this[_0x24936b(0x211)][_0x24936b(0x4a0)]===_0x5b7d9b&&this[_0x24936b(0x5d7)][_0x24936b(0x4a2)]?.[_0x24936b(0x4ea)](_0x24936b(0x49e),{'feature':_0x24936b(0x4e1),'licensee':this[_0x24936b(0x211)]['licensee']});if(_0xc14566&&!this[_0x24936b(0x211)]){this['okdb'][_0x24936b(0x4a2)]?.[_0x24936b(0x4ea)](_0x24936b(0x1d0),{'feature':_0x24936b(0x4e1)}),this[_0x24936b(0x5d7)][_0x24936b(0x21e)]?.[_0x24936b(0x355)](_0x592720['LICENSE_INVALID'],{'previous':_0xc14566});const _0x5a8064=this[_0x24936b(0x5d7)]['options']?.['onLicenseExpired']??_0x28d108[_0x24936b(0x212)];_0x5a8064===_0x24936b(0x63c)&&(this['okdb'][_0x24936b(0x4a2)]?.['error'](_0x24936b(0x536),{'feature':_0x24936b(0x4e1)}),this[_0x24936b(0x5d7)][_0x24936b(0x3e8)]()[_0x24936b(0x28f)](()=>{})[_0x24936b(0x5dc)](()=>process['exit'](0x1)));}}}return okdbLicense={'LicenseChecker':_0x16ece7,'_C':_0x28d108},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x377970=_0x5dddf1;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0xbfdeba=require$$0$3,_0x4591a8=require$$1$1,_0x50acd0=require$$0,_0x4fdd34=require$$1,_0x10ed82=_0x4fdd34[_0x377970(0x3b2)](_0x50acd0['homedir'](),_0x377970(0x280)),_0x344e78=0x3e8,_0x21481f={'reset':'\x1b[0m','bold':_0x377970(0x3f5),'dim':_0x377970(0x3f9),'red':_0x377970(0x296),'green':_0x377970(0x224),'yellow':'\x1b[33m','blue':'\x1b[34m','magenta':_0x377970(0x320),'cyan':_0x377970(0x447),'white':_0x377970(0x5f8),'gray':_0x377970(0x339)},_0x1348e5=!process['stdout']['isTTY']||!!process.env.NO_COLOR,_0x314ca0=(_0x308594,_0x571d74)=>_0x1348e5?_0x571d74:''+_0x308594+_0x571d74+_0x21481f[_0x377970(0x5ef)],_0x548700={'error':_0x21481f[_0x377970(0x54d)],'warn':_0x21481f[_0x377970(0x22c)],'info':_0x21481f[_0x377970(0x3ba)],'debug':_0x21481f['gray']},_0x264dc3={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x3b7636(_0xd7e4a7,_0x14a818='info'){const _0x158d8f=_0x377970,{level:_0x3fd2c2,msg:_0x474af2,meta:_0x43cbe0,context:_0x49e168,ts:_0x241af4}=_0xd7e4a7;if((_0x264dc3[_0x3fd2c2]??0x1)<(_0x264dc3[_0x14a818]??0x1))return;const _0x5430b6=_0x314ca0(_0x21481f[_0x158d8f(0x393)],new Date(_0x241af4)[_0x158d8f(0x1fd)]()),_0x2ed31a=_0x314ca0(_0x548700[_0x3fd2c2]??_0x21481f[_0x158d8f(0x390)],_0x3fd2c2['padEnd'](0x5));let _0x2d4594='\x20\x20'+_0x5430b6+'\x20'+_0x314ca0(_0x21481f[_0x158d8f(0x3e1)],_0x2ed31a)+'\x20'+_0x474af2;if(_0x43cbe0&&Object[_0x158d8f(0x577)](_0x43cbe0)['length']>0x0){const _0x101fa8=Object[_0x158d8f(0x4b8)](_0x43cbe0)[_0x158d8f(0x65d)](([_0xd0fe29,_0x446ae7])=>_0xd0fe29+'='+_0x446ae7)[_0x158d8f(0x3b2)]('\x20');_0x2d4594+=_0x314ca0(_0x21481f[_0x158d8f(0x60d)],'\x20\x20['+_0x101fa8+']');}if(_0x49e168!==undefined){const _0x325765=typeof _0x49e168===_0x158d8f(0x65b)?JSON[_0x158d8f(0x481)](_0x49e168):String(_0x49e168);_0x2d4594+=_0x314ca0(_0x21481f[_0x158d8f(0x60d)],'\x20\x20'+_0x325765);}const _0x2cf3d3=_0x3fd2c2===_0x158d8f(0x5b3)||_0x3fd2c2===_0x158d8f(0x4ea)?process['stderr'][_0x158d8f(0x37f)]['bind'](process[_0x158d8f(0x5ff)]):process[_0x158d8f(0x67c)][_0x158d8f(0x37f)]['bind'](process[_0x158d8f(0x67c)]);_0x2cf3d3(_0x2d4594+'\x0a');}function _0x3f7167(_0x45366c,_0x529ec0){const _0x1fed6f=_0x377970;if(_0x45366c===0xcc||_0x45366c>=0xc8&&_0x45366c<0x12c&&!_0x529ec0){console[_0x1fed6f(0x4a2)](_0x1fed6f(0x2c3)+_0x314ca0(_0x21481f['green'],'✓')+'\x0a');return;}if(_0x45366c>=0x190||_0x529ec0?.[_0x1fed6f(0x5b3)]){const _0xbc37f9=_0x529ec0?.[_0x1fed6f(0x5b3)]??_0x529ec0?.[_0x1fed6f(0x66f)]??'HTTP\x20'+_0x45366c;console['log'](_0x1fed6f(0x2c3)+_0x314ca0(_0x21481f[_0x1fed6f(0x54d)],'✗')+'\x20'+_0x314ca0(_0x21481f[_0x1fed6f(0x3e1)]+_0x21481f[_0x1fed6f(0x54d)],String(_0x45366c))+'\x20\x20'+_0xbc37f9+'\x0a');return;}const _0x5d61d5=Object[_0x1fed6f(0x3b0)][_0x1fed6f(0x3e7)][_0x1fed6f(0x2f9)](_0x529ec0??{},'result')?_0x529ec0[_0x1fed6f(0x2e5)]:_0x529ec0,_0x550fc1=_0x529ec0?.[_0x1fed6f(0x4ce)];console[_0x1fed6f(0x4a2)](''),_0x1213be(_0x5d61d5,'\x20\x20');if(_0x550fc1?.['count']!=null||_0x550fc1?.[_0x1fed6f(0x257)]!=null){const _0x2c3718=[];if(_0x550fc1['count']!=null)_0x2c3718[_0x1fed6f(0x59e)](_0x550fc1[_0x1fed6f(0x29e)]+_0x1fed6f(0x247)+(_0x550fc1[_0x1fed6f(0x29e)]!==0x1?'s':''));if(_0x550fc1['time']!=null)_0x2c3718['push'](_0x550fc1[_0x1fed6f(0x257)]+'ms');console[_0x1fed6f(0x4a2)](_0x1fed6f(0x2c3)+_0x314ca0(_0x21481f[_0x1fed6f(0x60d)],_0x2c3718['join'](_0x1fed6f(0x631))));}console['log']('');}function _0x1213be(_0x2408e5,_0x34ad0e=''){const _0x48f786=_0x377970;if(_0x2408e5===null||_0x2408e5===undefined){console[_0x48f786(0x4a2)](_0x34ad0e+_0x314ca0(_0x21481f['dim'],_0x48f786(0x645)));return;}if(Array[_0x48f786(0x65a)](_0x2408e5)){if(_0x2408e5[_0x48f786(0x502)]===0x0){console[_0x48f786(0x4a2)](_0x34ad0e+_0x314ca0(_0x21481f[_0x48f786(0x60d)],_0x48f786(0x380)));return;}if(_0x2408e5[_0x48f786(0x508)](_0x4dc040=>_0x4dc040&&typeof _0x4dc040==='object'&&_0x48f786(0x528)in _0x4dc040&&_0x48f786(0x3f2)in _0x4dc040)){_0x4a19a8(_0x2408e5,_0x34ad0e);return;}if(_0x2408e5[_0x48f786(0x508)](_0x3ab9c1=>_0x3ab9c1&&typeof _0x3ab9c1===_0x48f786(0x65b)&&_0x48f786(0x3b5)in _0x3ab9c1&&_0x48f786(0x29e)in _0x3ab9c1)){_0x3e5dea(_0x2408e5,_0x34ad0e);return;}if(_0x2408e5[_0x48f786(0x508)](_0x14ede6=>typeof _0x14ede6!=='object'||_0x14ede6===null)){_0x2408e5[_0x48f786(0x3f1)]((_0x10851b,_0x58d2f7)=>console[_0x48f786(0x4a2)](_0x34ad0e+_0x314ca0(_0x21481f[_0x48f786(0x393)],_0x58d2f7+0x1+'.')+'\x20'+_0x314ca0(_0x21481f[_0x48f786(0x390)],String(_0x10851b))));return;}_0x2408e5['forEach']((_0x5a6254,_0x58e758)=>{const _0x18c0f2=_0x48f786;console[_0x18c0f2(0x4a2)](_0x34ad0e+_0x314ca0(_0x21481f[_0x18c0f2(0x60d)],'['+_0x58e758+']'));if(typeof _0x5a6254===_0x18c0f2(0x65b)&&_0x5a6254!==null)_0xda7aba(_0x5a6254,_0x34ad0e+'\x20\x20');else console[_0x18c0f2(0x4a2)](_0x34ad0e+'\x20\x20'+String(_0x5a6254));});return;}if(typeof _0x2408e5==='object'){if('key'in _0x2408e5&&_0x48f786(0x3f2)in _0x2408e5&&Object['keys'](_0x2408e5)[_0x48f786(0x502)]<=0x3){console[_0x48f786(0x4a2)](_0x34ad0e+_0x314ca0(_0x21481f['bold']+_0x21481f[_0x48f786(0x3ba)],String(_0x2408e5[_0x48f786(0x528)])));const _0x9cd51f=_0x2408e5[_0x48f786(0x3f2)];if(_0x9cd51f&&typeof _0x9cd51f==='object')_0xda7aba(_0x9cd51f,_0x34ad0e);else console['log'](_0x34ad0e+_0x314ca0(_0x21481f[_0x48f786(0x390)],String(_0x9cd51f)));return;}_0xda7aba(_0x2408e5,_0x34ad0e);return;}console[_0x48f786(0x4a2)](_0x34ad0e+_0x314ca0(_0x21481f[_0x48f786(0x390)],String(_0x2408e5)));}function _0xda7aba(_0x398e60,_0x313acd=''){const _0x25c76a=_0x377970,_0x1258e8=Object[_0x25c76a(0x4b8)](_0x398e60);if(_0x1258e8[_0x25c76a(0x502)]===0x0){console[_0x25c76a(0x4a2)](_0x313acd+_0x314ca0(_0x21481f[_0x25c76a(0x60d)],'{}'));return;}const _0x4c3299=Math['min'](0x1c,Math[_0x25c76a(0x5f2)](..._0x1258e8[_0x25c76a(0x65d)](([_0x5375b1])=>_0x5375b1['length'])));for(const [_0x1d1637,_0x416a99]of _0x1258e8){const _0x32d91d=_0x314ca0(_0x21481f[_0x25c76a(0x3ba)],_0x1d1637['padEnd'](_0x4c3299));if(_0x416a99===null||_0x416a99===undefined)console[_0x25c76a(0x4a2)](_0x313acd+_0x32d91d+'\x20\x20'+_0x314ca0(_0x21481f['dim'],_0x25c76a(0x33d)));else{if(typeof _0x416a99===_0x25c76a(0x65b)){const _0x1cb26b=JSON['stringify'](_0x416a99);_0x1cb26b[_0x25c76a(0x502)]<=0x50?console['log'](_0x313acd+_0x32d91d+'\x20\x20'+_0x314ca0(_0x21481f[_0x25c76a(0x60d)],_0x1cb26b)):(console[_0x25c76a(0x4a2)](_0x313acd+_0x32d91d),_0x1213be(_0x416a99,_0x313acd+'\x20\x20'));}else{const _0x30481d=typeof _0x416a99===_0x25c76a(0x323)?_0x314ca0(_0x416a99?_0x21481f[_0x25c76a(0x47f)]:_0x21481f[_0x25c76a(0x22c)],String(_0x416a99)):typeof _0x416a99===_0x25c76a(0x57c)?_0x314ca0(_0x21481f[_0x25c76a(0x46d)],String(_0x416a99)):_0x314ca0(_0x21481f[_0x25c76a(0x390)],String(_0x416a99));console[_0x25c76a(0x4a2)](_0x313acd+_0x32d91d+'\x20\x20'+_0x30481d);}}}}function _0x4a19a8(_0x3d8d5d,_0x3e38b2=''){const _0x29a180=_0x377970,_0x59ea7d=Math[_0x29a180(0x52a)](0x20,Math[_0x29a180(0x5f2)](..._0x3d8d5d[_0x29a180(0x65d)](_0x31fb8e=>String(_0x31fb8e[_0x29a180(0x528)])[_0x29a180(0x502)])));for(const {key:_0x1c5dd6,value:_0x1e4e13,score:_0x361e9e,clock:_0x2bca93}of _0x3d8d5d){const _0x4dd878=_0x314ca0(_0x21481f[_0x29a180(0x3e1)]+_0x21481f[_0x29a180(0x3ba)],String(_0x1c5dd6)[_0x29a180(0x1d8)](_0x59ea7d)),_0xd7c356=_0x1e4e13==null?_0x314ca0(_0x21481f[_0x29a180(0x60d)],_0x29a180(0x33d)):typeof _0x1e4e13==='object'?_0x314ca0(_0x21481f[_0x29a180(0x60d)],JSON[_0x29a180(0x481)](_0x1e4e13)):_0x314ca0(_0x21481f[_0x29a180(0x390)],String(_0x1e4e13)),_0x256cca=_0x361e9e!=null?_0x314ca0(_0x21481f[_0x29a180(0x393)],_0x29a180(0x207)+_0x361e9e[_0x29a180(0x372)](0x4)):'',_0x393c67=_0x2bca93!=null?_0x314ca0(_0x21481f[_0x29a180(0x393)],_0x29a180(0x1c9)+_0x2bca93):'';console['log'](_0x3e38b2+_0x4dd878+'\x20\x20'+_0xd7c356+_0x256cca+_0x393c67);}}function _0x3e5dea(_0x25091b,_0x38729c=''){const _0x58ba3f=_0x377970,_0x4e757d=Math[_0x58ba3f(0x52a)](0x20,Math[_0x58ba3f(0x5f2)](..._0x25091b[_0x58ba3f(0x65d)](_0x139bcb=>_0x139bcb[_0x58ba3f(0x3b5)][_0x58ba3f(0x502)])));for(const {type:_0x30294d,count:_0x8102a9,fields:_0x3d212a}of _0x25091b){if(_0x30294d[_0x58ba3f(0x2f6)]('~'))continue;const _0x6fedc6=_0x314ca0(_0x21481f['bold']+_0x21481f[_0x58ba3f(0x3ba)],_0x30294d[_0x58ba3f(0x1d8)](_0x4e757d)),_0x48631c=_0x314ca0(_0x21481f[_0x58ba3f(0x46d)],String(_0x8102a9)[_0x58ba3f(0x3fd)](0x6))+_0x314ca0(_0x21481f['dim'],_0x58ba3f(0x3c0)),_0x2e2c16=_0x3d212a&&Object['keys'](_0x3d212a)[_0x58ba3f(0x502)]?_0x314ca0(_0x21481f['dim'],_0x58ba3f(0x520)+Object[_0x58ba3f(0x577)](_0x3d212a)[_0x58ba3f(0x2a1)](0x0,0x6)[_0x58ba3f(0x3b2)](',\x20')+(Object['keys'](_0x3d212a)[_0x58ba3f(0x502)]>0x6?'…':'')):'';console[_0x58ba3f(0x4a2)](_0x38729c+_0x6fedc6+'\x20\x20'+_0x48631c+_0x2e2c16);}}const _0x52ba51=[_0x377970(0x298),_0x377970(0x435),_0x377970(0x335),_0x377970(0x538),_0x377970(0x65e),_0x377970(0x5e5)];function _0x1b46a3(_0x23fe9e,_0x4cde2d){const _0x899431=_0x377970;if(_0x23fe9e[_0x899431(0x2f6)](_0x899431(0x488)))return _0x23fe9e;if(_0x23fe9e[_0x899431(0x2f6)]('/'))return _0x899431(0x2de)+_0x23fe9e;if(_0x23fe9e['startsWith'](_0x899431(0x24c)))return _0x899431(0x488)+_0x23fe9e;const _0x973126=_0x52ba51[_0x899431(0x23d)](_0x378791=>_0x23fe9e===_0x378791[_0x899431(0x1db)](/\/$/,'')||_0x23fe9e[_0x899431(0x2f6)](_0x378791));return _0x973126?_0x899431(0x4d1)+_0x4cde2d+'/'+_0x23fe9e:_0x899431(0x488)+_0x23fe9e;}function _0x355562(_0x1108a8){const _0x5eb08a=_0x377970,_0x15bc88={},_0x5cdc83=[];let _0x1effab=0x0;while(_0x1effab<_0x1108a8[_0x5eb08a(0x502)]){if((_0x1108a8[_0x1effab]===_0x5eb08a(0x605)||_0x1108a8[_0x1effab]==='-e')&&_0x1108a8[_0x1effab+0x1]&&!_0x1108a8[_0x1effab+0x1][_0x5eb08a(0x2f6)]('-'))_0x15bc88['env']=_0x1108a8[++_0x1effab];else _0x1108a8[_0x1effab]===_0x5eb08a(0x3aa)||_0x1108a8[_0x1effab]==='-h'?_0x15bc88[_0x5eb08a(0x592)]=!![]:_0x5cdc83[_0x5eb08a(0x59e)](_0x1108a8[_0x1effab]);_0x1effab++;}return{'flags':_0x15bc88,'rest':_0x5cdc83};}const _0x1037d9={'system':_0x377970(0x58d),'envs':'Environments','types':'Types','data':_0x377970(0x4f8),'indexes':_0x377970(0x4c5),'fts':_0x377970(0x1ec),'sync':_0x377970(0x260),'queue':'Queue','files':_0x377970(0x5c6),'embeddings':_0x377970(0x58a),'engines':_0x377970(0x3c7),'admin':_0x377970(0x2a9),'event':_0x377970(0x3a7),'processor':_0x377970(0x385)},_0x5db7b2=[_0x377970(0x27c),_0x377970(0x61a),_0x377970(0x298),'data',_0x377970(0x1ea),_0x377970(0x396),_0x377970(0x4fa),_0x377970(0x42a),_0x377970(0x4b7),_0x377970(0x1e9),_0x377970(0x46a),_0x377970(0x304)];function _0x1ec055(_0x2da08d){const _0xba1a42=_0x377970;return _0x2da08d['replace'](/^\/api/,'')[_0xba1a42(0x1db)](/^\[\/env\/:env=[^\]]*\]/,'[env]')[_0xba1a42(0x1db)](/^\/env\/:env/,_0xba1a42(0x1f2))[_0xba1a42(0x1db)](/^\//,'');}function _0x1a1c7b(_0x39a6fe,_0x16d61b=''){const _0x3b300b=_0x377970,_0x40c10c=_0x39a6fe[_0x3b300b(0x57a)][_0x3b300b(0x50f)]()['filter'](_0x55747c=>!_0x55747c[_0x3b300b(0x4ce)]?.['hidden']),_0x53a83c=_0x16d61b?_0x40c10c[_0x3b300b(0x200)](_0x4352b6=>_0x4352b6[_0x3b300b(0x411)][_0x3b300b(0x1e4)]()[_0x3b300b(0x39f)](_0x16d61b[_0x3b300b(0x1e4)]())||(_0x109b6d(_0x4352b6)??'')[_0x3b300b(0x1e4)]()[_0x3b300b(0x39f)](_0x16d61b[_0x3b300b(0x1e4)]())||_0x1934ed(_0x4352b6)[_0x3b300b(0x23d)](_0x1401e3=>_0x1401e3['toLowerCase']()[_0x3b300b(0x39f)](_0x16d61b['toLowerCase']()))):_0x40c10c;if(!_0x53a83c[_0x3b300b(0x502)]){console[_0x3b300b(0x4a2)](_0x314ca0(_0x21481f[_0x3b300b(0x22c)],'\x0a\x20\x20No\x20routes\x20matching\x20\x22'+_0x16d61b+'\x22\x0a'));return;}const _0x5dad38=new Map();for(const _0x2672ec of _0x53a83c){const _0x382140=_0x1934ed(_0x2672ec)[0x0]??'other';if(!_0x5dad38[_0x3b300b(0x25a)](_0x382140))_0x5dad38[_0x3b300b(0x2d9)](_0x382140,[]);_0x5dad38[_0x3b300b(0x64f)](_0x382140)[_0x3b300b(0x59e)](_0x2672ec);}const _0x5a9cf0=[..._0x5db7b2[_0x3b300b(0x200)](_0x2df9dc=>_0x5dad38['has'](_0x2df9dc)),...[..._0x5dad38[_0x3b300b(0x577)]()]['filter'](_0x3c4341=>!_0x5db7b2[_0x3b300b(0x39f)](_0x3c4341))];console['log']('');for(const _0x11f697 of _0x5a9cf0){const _0x18988a=_0x5dad38[_0x3b300b(0x64f)](_0x11f697);if(!_0x18988a?.[_0x3b300b(0x502)])continue;console[_0x3b300b(0x4a2)](_0x314ca0(_0x21481f[_0x3b300b(0x3e1)],'\x20\x20'+(_0x1037d9[_0x11f697]??_0x11f697)));for(const _0x26ef23 of _0x18988a){const _0x1b073b=_0x314ca0(_0x21481f[_0x3b300b(0x46d)],_0x26ef23['method'][_0x3b300b(0x1d8)](0x7)),_0x3fa7a5=_0x314ca0(_0x21481f[_0x3b300b(0x3ba)],_0x1ec055(_0x26ef23['path'])),_0x411a14=_0x109b6d(_0x26ef23)?_0x314ca0(_0x21481f[_0x3b300b(0x60d)],'\x20\x20'+_0x109b6d(_0x26ef23)):'',_0x156d07=_0x26ef23['operation']?.['id']?_0x314ca0(_0x21481f[_0x3b300b(0x393)],_0x3b300b(0x1e0)+_0x26ef23[_0x3b300b(0x41f)]['id']+']'):'';console[_0x3b300b(0x4a2)]('\x20\x20\x20\x20'+_0x1b073b+'\x20'+_0x3fa7a5+_0x411a14+_0x156d07);}console[_0x3b300b(0x4a2)]('');}}function _0x4a48bc(_0x560094,_0x1c9601){const _0x55403b=_0x377970,_0x469d4b=_0x1c9601[_0x55403b(0x1db)](/^\/api(\/env\/[^/]+)?\//,'')[_0x55403b(0x648)]('/')[0x0],_0x55a815=_0x560094[_0x55403b(0x57a)][_0x55403b(0x50f)]()[_0x55403b(0x200)](_0x218018=>_0x218018[_0x55403b(0x411)][_0x55403b(0x1e4)]()[_0x55403b(0x39f)](_0x469d4b[_0x55403b(0x1e4)]()));if(!_0x55a815['length']){console[_0x55403b(0x4a2)](_0x314ca0(_0x21481f[_0x55403b(0x22c)],'\x0a\x20\x20No\x20documentation\x20found\x20for:\x20'+_0x1c9601+'\x0a'));return;}console[_0x55403b(0x4a2)]('');for(const _0x5dcc3c of _0x55a815[_0x55403b(0x2a1)](0x0,0xc)){for(const _0xb049dd of _0x3d4586(_0x5dcc3c)){console[_0x55403b(0x4a2)](_0xb049dd);}console['log']('');}}function _0x109b6d(_0x24ce0a){const _0x36688b=_0x377970;return _0x24ce0a[_0x36688b(0x41f)]?.[_0x36688b(0x2f4)]??_0x24ce0a['meta']?.['summary']??'';}function _0x59513f(_0x1b2c10){const _0x36f38b=_0x377970;return _0x1b2c10['operation']?.[_0x36f38b(0x678)]??_0x1b2c10[_0x36f38b(0x4ce)]?.['description']??'';}function _0x1934ed(_0x14bf59){const _0x2e58c9=_0x377970;return _0x14bf59[_0x2e58c9(0x41f)]?.[_0x2e58c9(0x548)]?.[_0x2e58c9(0x502)]?_0x14bf59[_0x2e58c9(0x41f)][_0x2e58c9(0x548)]:_0x14bf59[_0x2e58c9(0x4ce)]?.['tags']??[];}function _0x3d4586(_0x3c59dd){const _0x334ff7=_0x377970,_0xe9048c=[];_0xe9048c[_0x334ff7(0x59e)]('\x20\x20'+_0x314ca0(_0x21481f[_0x334ff7(0x3e1)]+_0x21481f[_0x334ff7(0x46d)],_0x3c59dd[_0x334ff7(0x42d)][_0x334ff7(0x1d8)](0x7))+'\x20'+_0x314ca0(_0x21481f[_0x334ff7(0x3e1)]+_0x21481f[_0x334ff7(0x3ba)],_0x3c59dd['path']));_0x3c59dd['operation']?.['id']&&_0xe9048c['push'](_0x334ff7(0x504)+_0x314ca0(_0x21481f[_0x334ff7(0x393)],'id:\x20'+_0x3c59dd[_0x334ff7(0x41f)]['id']));_0x109b6d(_0x3c59dd)&&_0xe9048c[_0x334ff7(0x59e)](_0x334ff7(0x504)+_0x314ca0(_0x21481f[_0x334ff7(0x390)],_0x109b6d(_0x3c59dd)));_0x59513f(_0x3c59dd)&&_0xe9048c['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x314ca0(_0x21481f[_0x334ff7(0x60d)],_0x59513f(_0x3c59dd)));_0x1934ed(_0x3c59dd)['length']&&_0xe9048c[_0x334ff7(0x59e)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x314ca0(_0x21481f[_0x334ff7(0x393)],'tags:\x20'+_0x1934ed(_0x3c59dd)['join'](',\x20')));_0x3c59dd[_0x334ff7(0x41f)]?.[_0x334ff7(0x206)]?.[_0x334ff7(0x1d7)]&&_0xe9048c[_0x334ff7(0x59e)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x314ca0(_0x21481f[_0x334ff7(0x393)],_0x334ff7(0x3d4)+_0x3c59dd[_0x334ff7(0x41f)]['safety']['access']));_0x3c59dd[_0x334ff7(0x41f)]?.['http']?.[_0x334ff7(0x493)]&&_0x3c59dd[_0x334ff7(0x41f)][_0x334ff7(0x57a)]['transport']!=='standard'&&_0xe9048c[_0x334ff7(0x59e)](_0x334ff7(0x504)+_0x314ca0(_0x21481f[_0x334ff7(0x393)],_0x334ff7(0x45b)+_0x3c59dd['operation'][_0x334ff7(0x57a)][_0x334ff7(0x493)]));if(_0x3c59dd[_0x334ff7(0x41f)]?.['inputSchema']){const _0xb76bc8=Object['keys'](_0x3c59dd[_0x334ff7(0x41f)]['inputSchema'][_0x334ff7(0x590)]||{});if(_0xb76bc8[_0x334ff7(0x502)])_0xe9048c[_0x334ff7(0x59e)](_0x334ff7(0x504)+_0x314ca0(_0x21481f['gray'],_0x334ff7(0x33a)+_0xb76bc8[_0x334ff7(0x3b2)](',\x20')));}return _0x3c59dd['meta']?.[_0x334ff7(0x4de)]&&_0xe9048c[_0x334ff7(0x59e)](_0x334ff7(0x504)+_0x314ca0(_0x21481f[_0x334ff7(0x393)],_0x334ff7(0x2ee)+JSON[_0x334ff7(0x481)](_0x3c59dd['meta'][_0x334ff7(0x4de)]))),_0xe9048c;}async function _0x3a95b8(_0x45bf8f,_0x2f52de,_0x289619,_0x358387=null){const _0x2f8407=_0x377970,_0x25ee38=_0x289619[_0x2f8407(0x3d1)]('?'),_0x3392e9=_0x25ee38>=0x0?_0x289619[_0x2f8407(0x2a1)](0x0,_0x25ee38):_0x289619,_0x18e6e0=_0x25ee38>=0x0?_0x289619[_0x2f8407(0x2a1)](_0x25ee38+0x1):'',_0x62d789=Object[_0x2f8407(0x3fe)](new URLSearchParams(_0x18e6e0)[_0x2f8407(0x4b8)]());return _0x45bf8f[_0x2f8407(0x57a)][_0x2f8407(0x4d7)](_0x2f52de,_0x3392e9,{'body':_0x358387,'query':_0x62d789,'headers':{'content-type':_0x2f8407(0x373)}},{'internal':!![]});}function _0x19348c(_0x52c5e1){const _0x14fbc8=_0x377970;if(!_0x52c5e1)return null;const _0x531ddd=_0x52c5e1[_0x14fbc8(0x205)]();if(!_0x531ddd)return null;try{return JSON[_0x14fbc8(0x496)](_0x531ddd);}catch{}try{return JSON[_0x14fbc8(0x496)](_0x52a80b(_0x531ddd));}catch(_0x5ccb0c){throw new SyntaxError(_0x5ccb0c[_0x14fbc8(0x66f)],{'cause':_0x5ccb0c});}}function _0x52a80b(_0x2bcffb){const _0x2a8573=_0x377970;let _0x3ae817='',_0x1455e1=0x0;while(_0x1455e1<_0x2bcffb[_0x2a8573(0x502)]){const _0x458c3d=_0x2bcffb[_0x1455e1];if(_0x458c3d==='\x22'){_0x3ae817+='\x22',_0x1455e1++;while(_0x1455e1<_0x2bcffb[_0x2a8573(0x502)]&&_0x2bcffb[_0x1455e1]!=='\x22'){if(_0x2bcffb[_0x1455e1]==='\x5c'){_0x3ae817+=_0x2bcffb[_0x1455e1++];if(_0x1455e1<_0x2bcffb['length'])_0x3ae817+=_0x2bcffb[_0x1455e1++];}else _0x3ae817+=_0x2bcffb[_0x1455e1++];}_0x3ae817+='\x22';if(_0x1455e1<_0x2bcffb[_0x2a8573(0x502)])_0x1455e1++;continue;}if(_0x458c3d==='\x27'){_0x3ae817+='\x22',_0x1455e1++;while(_0x1455e1<_0x2bcffb['length']&&_0x2bcffb[_0x1455e1]!=='\x27'){if(_0x2bcffb[_0x1455e1]==='\x5c'&&_0x2bcffb[_0x1455e1+0x1]==='\x27')_0x3ae817+='\x27',_0x1455e1+=0x2;else _0x2bcffb[_0x1455e1]==='\x22'?(_0x3ae817+='\x5c\x22',_0x1455e1++):_0x3ae817+=_0x2bcffb[_0x1455e1++];}_0x3ae817+='\x22';if(_0x1455e1<_0x2bcffb[_0x2a8573(0x502)])_0x1455e1++;continue;}if(_0x2a8573(0x45f)[_0x2a8573(0x39f)](_0x458c3d)){_0x3ae817+=_0x458c3d,_0x1455e1++;continue;}let _0x59bef9='';while(_0x1455e1<_0x2bcffb[_0x2a8573(0x502)]&&!'{}[]:,\x27\x22'[_0x2a8573(0x39f)](_0x2bcffb[_0x1455e1])&&_0x2bcffb[_0x1455e1]!=='\x20'&&_0x2bcffb[_0x1455e1]!=='\x09'&&_0x2bcffb[_0x1455e1]!=='\x0a'&&_0x2bcffb[_0x1455e1]!=='\x0d'){_0x59bef9+=_0x2bcffb[_0x1455e1++];}let _0x7765de=_0x1455e1;while(_0x7765de<_0x2bcffb['length']&&(_0x2bcffb[_0x7765de]==='\x20'||_0x2bcffb[_0x7765de]==='\x09'))_0x7765de++;if(_0x2bcffb[_0x7765de]===':')_0x3ae817+='\x22'+_0x59bef9+'\x22';else _0x59bef9==='true'||_0x59bef9===_0x2a8573(0x2b7)||_0x59bef9===_0x2a8573(0x33d)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x2a8573(0x26f)](_0x59bef9)?_0x3ae817+=_0x59bef9:_0x3ae817+='\x22'+_0x59bef9+'\x22';}return _0x3ae817[_0x2a8573(0x1db)](/,(\s*[}\]])/g,'$1');}function _0x1fb896(_0x1f1fbb){const _0x9ec13=_0x377970,_0x31fe7e=[];let _0x10bf9e=0x0;while(_0x10bf9e<_0x1f1fbb[_0x9ec13(0x502)]){while(_0x10bf9e<_0x1f1fbb['length']&&(_0x1f1fbb[_0x10bf9e]==='\x20'||_0x1f1fbb[_0x10bf9e]==='\x09'))_0x10bf9e++;if(_0x10bf9e>=_0x1f1fbb[_0x9ec13(0x502)])break;const _0x686f4b=_0x1f1fbb[_0x10bf9e];if(_0x686f4b==='{'||_0x686f4b==='['){const _0x2577c3=_0x686f4b==='{'?'}':']',_0x17cbcf=_0x10bf9e++;let _0xe188a0=0x1,_0x5e1dd9=![],_0x73799d='';while(_0x10bf9e<_0x1f1fbb[_0x9ec13(0x502)]&&_0xe188a0>0x0){const _0x423622=_0x1f1fbb[_0x10bf9e];if(_0x5e1dd9){if(_0x423622==='\x5c')_0x10bf9e++;else{if(_0x423622===_0x73799d)_0x5e1dd9=![];}}else{if(_0x423622==='\x22'||_0x423622==='\x27')_0x5e1dd9=!![],_0x73799d=_0x423622;else{if(_0x423622===_0x686f4b)_0xe188a0++;else{if(_0x423622===_0x2577c3)_0xe188a0--;}}}_0x10bf9e++;}_0x31fe7e[_0x9ec13(0x59e)](_0x1f1fbb[_0x9ec13(0x2a1)](_0x17cbcf,_0x10bf9e));continue;}if(_0x686f4b==='\x22'||_0x686f4b==='\x27'){const _0x162c3e=_0x686f4b;_0x10bf9e++;let _0x4febd6='';while(_0x10bf9e<_0x1f1fbb[_0x9ec13(0x502)]&&_0x1f1fbb[_0x10bf9e]!==_0x162c3e){if(_0x1f1fbb[_0x10bf9e]==='\x5c'&&_0x10bf9e+0x1<_0x1f1fbb[_0x9ec13(0x502)])_0x10bf9e++,_0x4febd6+=_0x1f1fbb[_0x10bf9e++];else _0x4febd6+=_0x1f1fbb[_0x10bf9e++];}if(_0x10bf9e<_0x1f1fbb[_0x9ec13(0x502)])_0x10bf9e++;_0x31fe7e[_0x9ec13(0x59e)](_0x4febd6);continue;}let _0x5a9d7a='';while(_0x10bf9e<_0x1f1fbb[_0x9ec13(0x502)]&&_0x1f1fbb[_0x10bf9e]!=='\x20'&&_0x1f1fbb[_0x10bf9e]!=='\x09'&&_0x1f1fbb[_0x10bf9e]!=='{'&&_0x1f1fbb[_0x10bf9e]!=='['){_0x5a9d7a+=_0x1f1fbb[_0x10bf9e++];}if(_0x5a9d7a)_0x31fe7e[_0x9ec13(0x59e)](_0x5a9d7a);}return _0x31fe7e;}function _0x9783bf(_0x1ee568,_0x5edc5d){const _0x3f4676=_0x377970,_0x511ab7=[..._0x1ee568[_0x3f4676(0x4f4)][_0x3f4676(0x577)]()]['filter'](_0x3d8922=>!_0x3d8922[_0x3f4676(0x2f6)]('~'));console[_0x3f4676(0x4a2)](['',_0x314ca0(_0x21481f['bold']+_0x21481f[_0x3f4676(0x3ba)],_0x3f4676(0x5fc)),_0x314ca0(_0x21481f[_0x3f4676(0x3e1)]+_0x21481f[_0x3f4676(0x3ba)],'\x20\x20║')+_0x314ca0(_0x21481f[_0x3f4676(0x3e1)],'\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20')+_0x314ca0(_0x21481f[_0x3f4676(0x3e1)]+_0x21481f[_0x3f4676(0x3ba)],'║'),_0x314ca0(_0x21481f[_0x3f4676(0x3e1)]+_0x21481f[_0x3f4676(0x3ba)],_0x3f4676(0x322)),'','\x20\x20'+_0x314ca0(_0x21481f['green'],'✓')+'\x20'+_0x314ca0(_0x21481f[_0x3f4676(0x3e1)],_0x3f4676(0x3fa))+'\x20\x20http://localhost:'+_0x5edc5d['port'],..._0x5edc5d['clusterWorkers']>0x1?['\x20\x20'+_0x314ca0(_0x21481f['green'],'✓')+'\x20'+_0x314ca0(_0x21481f[_0x3f4676(0x3e1)],'cluster')+'\x20'+_0x5edc5d[_0x3f4676(0x333)]+_0x3f4676(0x4b1)+_0x314ca0(_0x21481f[_0x3f4676(0x393)],_0x3f4676(0x5f7))]:[],'\x20\x20'+_0x314ca0(_0x21481f[_0x3f4676(0x47f)],'✓')+'\x20'+_0x314ca0(_0x21481f[_0x3f4676(0x3e1)],_0x3f4676(0x53d))+_0x3f4676(0x5be)+_0x5edc5d[_0x3f4676(0x268)]+_0x3f4676(0x2de),'\x20\x20'+_0x314ca0(_0x21481f[_0x3f4676(0x47f)],'✓')+'\x20'+_0x314ca0(_0x21481f[_0x3f4676(0x3e1)],_0x3f4676(0x411))+_0x3f4676(0x1c4)+_0x5edc5d[_0x3f4676(0x22b)],'\x20\x20'+_0x314ca0(_0x21481f[_0x3f4676(0x47f)],'✓')+'\x20'+_0x314ca0(_0x21481f['bold'],'id')+_0x3f4676(0x223)+_0x314ca0(_0x21481f[_0x3f4676(0x393)],_0x1ee568['id']),'\x20\x20'+_0x314ca0(_0x21481f[_0x3f4676(0x47f)],'✓')+'\x20'+_0x314ca0(_0x21481f[_0x3f4676(0x3e1)],_0x3f4676(0x61a))+_0x3f4676(0x1c4)+_0x511ab7[_0x3f4676(0x65d)](_0x281d43=>_0x314ca0(_0x21481f['cyan'],_0x281d43))[_0x3f4676(0x3b2)]('\x20\x20'),..._0x5edc5d[_0x3f4676(0x419)]?[]:['\x20\x20'+_0x314ca0(_0x21481f[_0x3f4676(0x47f)],'✓')+'\x20'+_0x314ca0(_0x21481f[_0x3f4676(0x3e1)],_0x3f4676(0x304))+_0x3f4676(0x2af)+_0x5edc5d[_0x3f4676(0x268)]+_0x3f4676(0x2f5)],'',_0x314ca0(_0x21481f[_0x3f4676(0x60d)],_0x3f4676(0x452)+_0x314ca0(_0x21481f[_0x3f4676(0x3e1)],_0x3f4676(0x592))+_0x3f4676(0x506)+_0x314ca0(_0x21481f[_0x3f4676(0x3e1)],_0x3f4676(0x5a3))+_0x3f4676(0x524)+_0x314ca0(_0x21481f['bold'],'exit')+'\x20to\x20quit.'),''][_0x3f4676(0x3b2)]('\x0a'));}function _0x179842(_0x446ada){const _0x1d24d1=_0x377970;console[_0x1d24d1(0x4a2)]('\x0a'+_0x314ca0(_0x21481f[_0x1d24d1(0x3e1)],_0x1d24d1(0x525))+'\x20\x20'+_0x314ca0(_0x21481f[_0x1d24d1(0x60d)],_0x1d24d1(0x651))+_0x1d24d1(0x3de)+_0x314ca0(_0x21481f[_0x1d24d1(0x3ba)],_0x1d24d1(0x1ef))+_0x1d24d1(0x581)+_0x314ca0(_0x21481f[_0x1d24d1(0x3ba)],_0x1d24d1(0x1ef))+'\x20'+_0x314ca0(_0x21481f[_0x1d24d1(0x22c)],'<json-body>')+_0x1d24d1(0x318)+_0x314ca0(_0x21481f[_0x1d24d1(0x3ba)],_0x1d24d1(0x426))+'\x20'+_0x314ca0(_0x21481f[_0x1d24d1(0x3ba)],_0x1d24d1(0x1ef))+'\x20'+_0x314ca0(_0x21481f[_0x1d24d1(0x22c)],'[body]')+'\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20'+_0x314ca0(_0x21481f['dim'],_0x1d24d1(0x476))+_0x1d24d1(0x38e)+_0x314ca0(_0x21481f['gray'],_0x1d24d1(0x568))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/info\x0a\x20\x20\x20\x20'+_0x314ca0(_0x21481f['gray'],_0x1d24d1(0x61a))+_0x1d24d1(0x404)+_0x314ca0(_0x21481f[_0x1d24d1(0x393)],_0x1d24d1(0x298))+_0x1d24d1(0x596)+_0x446ada[_0x1d24d1(0x2cb)]+'/types\x0a\x20\x20\x20\x20'+_0x314ca0(_0x21481f[_0x1d24d1(0x393)],'type/users')+_0x1d24d1(0x2c1)+_0x446ada[_0x1d24d1(0x2cb)]+'/type/users\x0a\x20\x20\x20\x20'+_0x314ca0(_0x21481f[_0x1d24d1(0x393)],_0x1d24d1(0x691))+_0x1d24d1(0x32d)+_0x446ada[_0x1d24d1(0x2cb)]+'/type/users/item/alice\x0a\x20\x20\x20\x20'+_0x314ca0(_0x21481f[_0x1d24d1(0x393)],_0x1d24d1(0x4b2))+_0x1d24d1(0x399)+_0x446ada[_0x1d24d1(0x2cb)]+_0x1d24d1(0x51e)+_0x314ca0(_0x21481f[_0x1d24d1(0x393)],_0x1d24d1(0x203))+_0x1d24d1(0x38e)+_0x314ca0(_0x21481f['gray'],_0x1d24d1(0x51f))+'\x0a\x20\x20\x20\x20'+_0x314ca0(_0x21481f['gray'],_0x1d24d1(0x31c))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/staging/info\x0a\x0a'+_0x314ca0(_0x21481f[_0x1d24d1(0x3e1)],_0x1d24d1(0x505))+'\x20\x20'+_0x314ca0(_0x21481f[_0x1d24d1(0x60d)],_0x1d24d1(0x518))+_0x1d24d1(0x3de)+_0x314ca0(_0x21481f[_0x1d24d1(0x3ba)],'--env\x20<name>')+_0x1d24d1(0x49a)+_0x314ca0(_0x21481f[_0x1d24d1(0x3ba)],'--help')+_0x1d24d1(0x45c)+_0x314ca0(_0x21481f[_0x1d24d1(0x60d)],_0x1d24d1(0x476))+_0x1d24d1(0x38e)+_0x314ca0(_0x21481f['gray'],_0x1d24d1(0x5e0))+'\x0a\x20\x20\x20\x20'+_0x314ca0(_0x21481f[_0x1d24d1(0x393)],_0x1d24d1(0x5e4))+'\x0a\x20\x20\x20\x20'+_0x314ca0(_0x21481f[_0x1d24d1(0x393)],_0x1d24d1(0x29a))+'\x0a\x0a'+_0x314ca0(_0x21481f[_0x1d24d1(0x3e1)],_0x1d24d1(0x4a1))+'\x0a\x0a\x20\x20'+_0x314ca0(_0x21481f[_0x1d24d1(0x3ba)],_0x1d24d1(0x4cd))+_0x1d24d1(0x54c)+_0x314ca0(_0x21481f[_0x1d24d1(0x3ba)],'env')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20active\x20environment\x20+\x20list\x20all\x20envs\x0a\x20\x20'+_0x314ca0(_0x21481f[_0x1d24d1(0x3ba)],_0x1d24d1(0x5a3))+'\x20'+_0x314ca0(_0x21481f['dim'],_0x1d24d1(0x2ca))+_0x1d24d1(0x669)+_0x314ca0(_0x21481f[_0x1d24d1(0x3ba)],_0x1d24d1(0x42c))+'\x20'+_0x314ca0(_0x21481f[_0x1d24d1(0x60d)],'[on|off|level]')+_0x1d24d1(0x620)+_0x314ca0(_0x21481f[_0x1d24d1(0x3ba)],'open')+_0x1d24d1(0x4d6)+_0x314ca0(_0x21481f[_0x1d24d1(0x3ba)],_0x1d24d1(0x592))+_0x1d24d1(0x608)+_0x314ca0(_0x21481f[_0x1d24d1(0x3ba)],_0x1d24d1(0x46e))+'\x20'+_0x314ca0(_0x21481f[_0x1d24d1(0x60d)],_0x1d24d1(0x57d))+_0x1d24d1(0x67a));}let _0x27e187=![];async function _0x44eb8c(_0xc9969f,_0x10a258=0x0,_0x5c1aa2=null){const _0x44bbf3=_0x377970;_0x27e187&&(process['stderr'][_0x44bbf3(0x37f)](_0x314ca0(_0x21481f[_0x44bbf3(0x54d)],'\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a')),process[_0x44bbf3(0x46e)](0x82));_0x27e187=!![],process[_0x44bbf3(0x67c)][_0x44bbf3(0x37f)]('\x0a'),process[_0x44bbf3(0x5ff)][_0x44bbf3(0x37f)](_0x314ca0(_0x21481f[_0x44bbf3(0x22c)],_0x44bbf3(0x3b1)+(_0x5c1aa2?'received\x20'+_0x5c1aa2+',\x20':'')+_0x44bbf3(0x666)));const _0x5ed093=setTimeout(()=>{const _0x5bdbce=_0x44bbf3;process[_0x5bdbce(0x5ff)][_0x5bdbce(0x37f)](_0x314ca0(_0x21481f[_0x5bdbce(0x54d)],_0x5bdbce(0x638))),process[_0x5bdbce(0x46e)](0x1);},0x1388);try{await _0xc9969f['close']();}catch(_0x2e8804){console[_0x44bbf3(0x5b3)](_0x314ca0(_0x21481f[_0x44bbf3(0x54d)],'\x20\x20'+_0x2e8804[_0x44bbf3(0x66f)]));}clearTimeout(_0x5ed093),process[_0x44bbf3(0x5ff)][_0x44bbf3(0x37f)](_0x314ca0(_0x21481f['dim'],'\x20\x20[okdb]\x20closed\x20cleanly\x0a')),process[_0x44bbf3(0x46e)](_0x10a258);}function _0x50af14(_0x17605c){const _0x1f6221=_0x377970,_0x122bc9=_0x17605c[_0x1f6221(0x2cb)]!==_0x1f6221(0x269)?_0x314ca0(_0x21481f[_0x1f6221(0x22c)],'['+_0x17605c[_0x1f6221(0x2cb)]+']'):'';return _0x314ca0(_0x21481f[_0x1f6221(0x3e1)]+_0x21481f[_0x1f6221(0x3ba)],_0x1f6221(0x5d7))+_0x122bc9+_0x314ca0(_0x21481f['gray'],'>\x20');}const _0x198ff0=new Set([_0x377970(0x47a),_0x377970(0x1e6),'PUT',_0x377970(0x39e),_0x377970(0x676)]);async function _0x1c104d(_0x2f0f55,_0x41cccb,_0x10e3ab,_0x30398b,_0x422809,_0x10865b){const _0x495a1f=_0x377970;_0x2f0f55=_0x2f0f55[_0x495a1f(0x205)]();if(!_0x2f0f55||_0x2f0f55['startsWith']('#'))return;const _0x3aae36=_0x1fb896(_0x2f0f55),{flags:_0x4a1f28,rest:_0x1f2117}=_0x355562(_0x3aae36);if(!_0x1f2117[_0x495a1f(0x502)])return;const _0x23d208=_0x1f2117[0x0],_0x1a012f=_0x23d208[_0x495a1f(0x573)]();if(_0x1a012f===_0x495a1f(0x2b1)){if(_0x1f2117[0x1])_0x4a48bc(_0x41cccb,_0x1b46a3(_0x1f2117[0x1],_0x4a1f28['env']??_0x422809[_0x495a1f(0x2cb)]));else _0x179842(_0x422809);return;}if(_0x1a012f===_0x495a1f(0x2f0)){const _0x349604=_0x1f2117[0x1];if(!_0x349604){console[_0x495a1f(0x4a2)](_0x314ca0(_0x21481f[_0x495a1f(0x54d)],_0x495a1f(0x4c3)));return;}try{_0x41cccb[_0x495a1f(0x2cb)](_0x349604),_0x422809[_0x495a1f(0x2cb)]=_0x349604,_0x10865b?.['setPrompt'](_0x50af14(_0x422809)),console['log'](_0x495a1f(0x2c3)+_0x314ca0(_0x21481f[_0x495a1f(0x47f)],'✓')+_0x495a1f(0x552)+_0x314ca0(_0x21481f['bold']+_0x21481f[_0x495a1f(0x3ba)],_0x349604)+'\x0a');}catch{console[_0x495a1f(0x4a2)](_0x495a1f(0x2c3)+_0x314ca0(_0x21481f[_0x495a1f(0x54d)],'✗')+_0x495a1f(0x29b)+_0x314ca0(_0x21481f['bold'],_0x349604)+_0x495a1f(0x3ac)+_0x314ca0(_0x21481f[_0x495a1f(0x60d)],_0x495a1f(0x377)));}return;}if(_0x1a012f===_0x495a1f(0x2fa)){const _0x933f37=[..._0x41cccb[_0x495a1f(0x4f4)][_0x495a1f(0x577)]()][_0x495a1f(0x200)](_0x5562b5=>!_0x5562b5[_0x495a1f(0x2f6)]('~'));console[_0x495a1f(0x4a2)]('');for(const _0x22e0f5 of _0x933f37){const _0x34eddb=_0x22e0f5===_0x422809['env'];console[_0x495a1f(0x4a2)]('\x20\x20'+(_0x34eddb?_0x314ca0(_0x21481f[_0x495a1f(0x47f)],'●'):_0x314ca0(_0x21481f['dim'],'○'))+'\x20\x20'+(_0x34eddb?_0x314ca0(_0x21481f['bold']+_0x21481f[_0x495a1f(0x3ba)],_0x22e0f5):_0x314ca0(_0x21481f[_0x495a1f(0x60d)],_0x22e0f5)));}console['log'](_0x495a1f(0x2c3)+_0x314ca0(_0x21481f[_0x495a1f(0x60d)],_0x495a1f(0x35f))+'\x20'+_0x314ca0(_0x21481f[_0x495a1f(0x3ba)],_0x422809[_0x495a1f(0x2cb)])),console[_0x495a1f(0x4a2)]('');return;}if(_0x1a012f===_0x495a1f(0x427)){const _0x2da8c2=[..._0x41cccb['_envs'][_0x495a1f(0x33c)]()][_0x495a1f(0x200)](_0x45561e=>!_0x45561e[_0x495a1f(0x68d)][_0x495a1f(0x2f6)]('~'));console[_0x495a1f(0x4a2)]('');const _0x3b9b69=Math[_0x495a1f(0x5f2)](..._0x2da8c2['map'](_0x258a47=>_0x258a47[_0x495a1f(0x68d)][_0x495a1f(0x502)]));for(const _0x5bf55e of _0x2da8c2){const _0x1aaf76=_0x5bf55e[_0x495a1f(0x68d)]===_0x422809[_0x495a1f(0x2cb)],_0x2aec9f=_0x1aaf76?_0x314ca0(_0x21481f[_0x495a1f(0x47f)],'●'):_0x314ca0(_0x21481f['dim'],'○'),_0x12edd5=_0x1aaf76?_0x314ca0(_0x21481f['bold']+_0x21481f['cyan'],_0x5bf55e['name'][_0x495a1f(0x1d8)](_0x3b9b69)):_0x314ca0(_0x21481f['dim'],_0x5bf55e['name'][_0x495a1f(0x1d8)](_0x3b9b69)),_0x2775a2=[..._0x5bf55e[_0x495a1f(0x4ac)][_0x495a1f(0x577)]()]['filter'](_0x355dd0=>!_0x355dd0['startsWith']('~')),_0x3b7cce=_0x2775a2[_0x495a1f(0x502)]?_0x314ca0(_0x21481f['dim'],_0x2775a2[_0x495a1f(0x2a1)](0x0,0x5)['join'](',\x20')+(_0x2775a2[_0x495a1f(0x502)]>0x5?'\x20\x20+'+(_0x2775a2[_0x495a1f(0x502)]-0x5)+'\x20more':'')):_0x314ca0(_0x21481f[_0x495a1f(0x60d)],_0x495a1f(0x384));console[_0x495a1f(0x4a2)]('\x20\x20'+_0x2aec9f+'\x20\x20'+_0x12edd5+'\x20\x20'+_0x3b7cce);}console[_0x495a1f(0x4a2)]('');return;}if(_0x1a012f===_0x495a1f(0x58f)){const _0x2830b2=_0x4a1f28['env']??_0x1f2117[0x1]??_0x422809['env'];try{const _0x4f416e=_0x41cccb['env'](_0x2830b2),_0x529690=[..._0x4f416e['typeSubDbs'][_0x495a1f(0x577)]()][_0x495a1f(0x200)](_0x582e36=>!_0x582e36[_0x495a1f(0x2f6)]('~'))[_0x495a1f(0x4fe)]();console[_0x495a1f(0x4a2)](_0x495a1f(0x2c3)+_0x314ca0(_0x21481f['dim'],_0x529690[_0x495a1f(0x502)]+_0x495a1f(0x4ba)+(_0x529690[_0x495a1f(0x502)]!==0x1?'s':'')+_0x495a1f(0x34b)+_0x2830b2));for(const _0x1653fe of _0x529690){const _0x1b3cb9=_0x4f416e[_0x495a1f(0x4ac)][_0x495a1f(0x64f)](_0x1653fe),_0x16028d=_0x1b3cb9?.[_0x495a1f(0x610)]?.['getCount']?.()??0x0,_0x2aa61c=_0x314ca0(_0x21481f[_0x495a1f(0x3e1)]+_0x21481f[_0x495a1f(0x3ba)],_0x1653fe[_0x495a1f(0x1d8)](0x1c));console[_0x495a1f(0x4a2)](_0x495a1f(0x1c4)+_0x2aa61c+'\x20\x20'+_0x314ca0(_0x21481f['magenta'],String(_0x16028d)[_0x495a1f(0x3fd)](0x6))+'\x20'+_0x314ca0(_0x21481f[_0x495a1f(0x60d)],'records'));}console[_0x495a1f(0x4a2)]('');}catch(_0x2f3f35){console[_0x495a1f(0x5b3)](_0x314ca0(_0x21481f['red'],_0x495a1f(0x2c3)+_0x2f3f35['message']+'\x0a'));}return;}if(_0x1a012f===_0x495a1f(0x3a2)){_0x1a1c7b(_0x41cccb,_0x1f2117[_0x495a1f(0x2a1)](0x1)[_0x495a1f(0x3b2)]('\x20'));return;}if(_0x1a012f==='LOGS'){const _0x467ae0=(_0x1f2117[0x1]??'')[_0x495a1f(0x1e4)]();if(!_0x467ae0||_0x467ae0==='on')_0x30398b['enabled']=!![],_0x30398b[_0x495a1f(0x28a)]='info',console['log'](_0x495a1f(0x2c3)+_0x314ca0(_0x21481f[_0x495a1f(0x47f)],'✓')+_0x495a1f(0x4da)+_0x314ca0(_0x21481f['dim'],_0x495a1f(0x2cc))+'\x0a');else{if(_0x467ae0===_0x495a1f(0x5e8))_0x30398b[_0x495a1f(0x65c)]=![],console[_0x495a1f(0x4a2)](_0x495a1f(0x2c3)+_0x314ca0(_0x21481f[_0x495a1f(0x22c)],'○')+_0x495a1f(0x2dc));else _0x264dc3[_0x467ae0]!==undefined?(_0x30398b[_0x495a1f(0x65c)]=!![],_0x30398b[_0x495a1f(0x28a)]=_0x467ae0,console[_0x495a1f(0x4a2)](_0x495a1f(0x2c3)+_0x314ca0(_0x21481f[_0x495a1f(0x47f)],'✓')+_0x495a1f(0x27a)+_0x314ca0(_0x21481f[_0x495a1f(0x3e1)],_0x467ae0)+'\x0a')):console[_0x495a1f(0x5b3)](_0x314ca0(_0x21481f[_0x495a1f(0x54d)],_0x495a1f(0x30e)));}return;}if(_0x1a012f==='EXIT'||_0x1a012f===_0x495a1f(0x245)){await _0x44eb8c(_0x41cccb,0x0);return;}if(_0x1a012f==='OPEN'){const _0x33364e=_0x495a1f(0x2c5)+_0x10e3ab[_0x495a1f(0x268)]+_0x495a1f(0x2f5),_0x34208d=process[_0x495a1f(0x63b)]===_0x495a1f(0x5ea)?_0x495a1f(0x456)+_0x33364e:process['platform']===_0x495a1f(0x220)?_0x495a1f(0x622)+_0x33364e:_0x495a1f(0x2b9)+_0x33364e;require$$4[_0x495a1f(0x31d)](_0x34208d),console[_0x495a1f(0x4a2)]('\x0a\x20\x20'+_0x314ca0(_0x21481f['green'],'✓')+_0x495a1f(0x566)+_0x314ca0(_0x21481f['cyan'],_0x33364e)+'\x0a');return;}let _0x4138f1,_0x3d3c5e,_0x27d77c;if(_0x198ff0[_0x495a1f(0x25a)](_0x1a012f)){_0x4138f1=_0x1a012f,_0x3d3c5e=_0x1f2117[0x1],_0x27d77c=_0x1f2117[_0x495a1f(0x2a1)](0x2);if(!_0x3d3c5e){console[_0x495a1f(0x5b3)](_0x314ca0(_0x21481f[_0x495a1f(0x54d)],_0x495a1f(0x3f3)+_0x23d208+_0x495a1f(0x2e4)));return;}}else _0x4138f1=null,_0x3d3c5e=_0x1f2117[0x0],_0x27d77c=_0x1f2117['slice'](0x1);const _0x52a203=_0x4a1f28[_0x495a1f(0x2cb)]??_0x422809[_0x495a1f(0x2cb)],_0x11eb26=_0x1b46a3(_0x3d3c5e,_0x52a203);if(_0x4a1f28[_0x495a1f(0x592)]){_0x4a48bc(_0x41cccb,_0x11eb26);return;}let _0x35b847=null;if(_0x27d77c[_0x495a1f(0x502)]){const _0x387e61=_0x27d77c[_0x495a1f(0x3b2)]('\x20');try{_0x35b847=_0x19348c(_0x387e61);}catch(_0x4e3bed){console[_0x495a1f(0x5b3)](_0x314ca0(_0x21481f[_0x495a1f(0x54d)],_0x495a1f(0x1d3)+_0x387e61+'\x0a\x20\x20'+_0x314ca0(_0x21481f[_0x495a1f(0x60d)],_0x4e3bed[_0x495a1f(0x66f)])+'\x0a'));return;}}if(!_0x4138f1)_0x4138f1=_0x35b847!==null?_0x495a1f(0x1e6):_0x495a1f(0x47a);try{const _0x50818e=await _0x3a95b8(_0x41cccb,_0x4138f1,_0x11eb26,_0x35b847);_0x3f7167(_0x50818e[_0x495a1f(0x36f)],_0x50818e[_0x495a1f(0x4de)]);}catch(_0x4fa382){console[_0x495a1f(0x5b3)](_0x495a1f(0x2c3)+_0x314ca0(_0x21481f['red'],'✗')+'\x20'+_0x4fa382[_0x495a1f(0x66f)]+'\x0a');}}class _0x4548c9{constructor(){const _0x3d968f=_0x377970;this[_0x3d968f(0x2d2)]=new Map(),this[_0x3d968f(0x634)]=null,this['terminal']=![];}}function _0x195704(_0x3308fe){const _0x2d2e2d=_0x377970,_0x361681=new _0x4548c9();for(const _0x4ed360 of _0x3308fe){if(_0x4ed360[_0x2d2e2d(0x4ce)]?.['hidden'])continue;const _0x1c8505=_0x4ed360[_0x2d2e2d(0x411)][_0x2d2e2d(0x1db)](/^\/api/,'')[_0x2d2e2d(0x1db)](/^\[\/env\/:env=[^\]]*\]/,'')['replace'](/^\//,'');if(!_0x1c8505)continue;let _0xf8e1d1=_0x361681;for(const _0x4518c8 of _0x1c8505[_0x2d2e2d(0x648)]('/')['filter'](Boolean)){if(_0x4518c8['startsWith'](':')){const _0x328bb5=_0x4518c8[_0x2d2e2d(0x2a1)](0x1);if(!_0xf8e1d1[_0x2d2e2d(0x634)])_0xf8e1d1[_0x2d2e2d(0x634)]={'param':_0x328bb5,'node':new _0x4548c9()};_0xf8e1d1=_0xf8e1d1[_0x2d2e2d(0x634)][_0x2d2e2d(0x4f3)];}else{if(!_0xf8e1d1['children'][_0x2d2e2d(0x25a)](_0x4518c8))_0xf8e1d1[_0x2d2e2d(0x2d2)][_0x2d2e2d(0x2d9)](_0x4518c8,new _0x4548c9());_0xf8e1d1=_0xf8e1d1[_0x2d2e2d(0x2d2)][_0x2d2e2d(0x64f)](_0x4518c8);}}_0xf8e1d1[_0x2d2e2d(0x266)]=!![];}return _0x361681;}const _0x53bb59=new Map();function _0x57419b(_0x5d2122,_0xaeb95b,_0x49c658){const _0x1cfafd=_0x377970,_0x80e644=_0x53bb59[_0x1cfafd(0x64f)](_0x5d2122);if(_0x80e644&&_0x80e644[_0x1cfafd(0x311)]>Date[_0x1cfafd(0x387)]())return _0x80e644[_0x1cfafd(0x34f)];const _0x2caad8=_0x49c658();return _0x53bb59[_0x1cfafd(0x2d9)](_0x5d2122,{'val':_0x2caad8,'exp':Date[_0x1cfafd(0x387)]()+_0xaeb95b}),_0x2caad8;}function _0x4e42a3(_0x14ae2d,_0x376648,_0x1805a4,_0x45ceeb){const _0x3ce54f=_0x377970,_0x15c8d9=_0x376648[_0x3ce54f(0x2cb)]??_0x45ceeb['env'];switch(_0x14ae2d){case'env':return[..._0x1805a4[_0x3ce54f(0x4f4)][_0x3ce54f(0x577)]()][_0x3ce54f(0x200)](_0x5a67c0=>!_0x5a67c0[_0x3ce54f(0x2f6)]('~'));case _0x3ce54f(0x3b5):return _0x57419b('types:'+_0x15c8d9,0x7d0,()=>{const _0x28e19b=_0x3ce54f;try{return[..._0x1805a4[_0x28e19b(0x2cb)](_0x15c8d9)[_0x28e19b(0x4ac)][_0x28e19b(0x577)]()][_0x28e19b(0x200)](_0xee0865=>!_0xee0865[_0x28e19b(0x2f6)]('~'));}catch{return[];}});case _0x3ce54f(0x528):if(!_0x376648['type'])return[];return _0x57419b(_0x3ce54f(0x386)+_0x15c8d9+':'+_0x376648['type'],0x5dc,()=>{const _0x28ab90=_0x3ce54f;try{const _0x333e12=_0x1805a4['env'](_0x15c8d9)['typeSubDbs'][_0x28ab90(0x64f)](_0x376648[_0x28ab90(0x3b5)]);if(!_0x333e12?.[_0x28ab90(0x610)])return[];const _0x14f722=[];for(const {key:_0x29824b}of _0x333e12[_0x28ab90(0x610)][_0x28ab90(0x416)]({'limit':0x32})){_0x14f722[_0x28ab90(0x59e)](String(_0x29824b));if(_0x14f722[_0x28ab90(0x502)]>=0x32)break;}return _0x14f722;}catch{return[];}});case _0x3ce54f(0x3cd):if(!_0x376648[_0x3ce54f(0x3b5)])return[];return _0x57419b('idx:'+_0x15c8d9+':'+_0x376648[_0x3ce54f(0x3b5)],0x7d0,()=>{const _0x4de726=_0x3ce54f;try{const _0x1386ab=_0x1805a4[_0x4de726(0x2cb)](_0x15c8d9)[_0x4de726(0x4ac)][_0x4de726(0x64f)](_0x376648['type']);return _0x1386ab?[..._0x1386ab[_0x4de726(0x3ee)]?.[_0x4de726(0x577)]()??[]]:[];}catch{return[];}});case _0x3ce54f(0x56e):if(!_0x376648[_0x3ce54f(0x3b5)])return[];return _0x57419b(_0x3ce54f(0x4ed)+_0x15c8d9+':'+_0x376648['type'],0x7d0,()=>{const _0x48c0d4=_0x3ce54f;try{return _0x1805a4['fts']?.[_0x48c0d4(0x663)]?.(_0x376648[_0x48c0d4(0x3b5)],_0x1805a4[_0x48c0d4(0x2cb)](_0x15c8d9))?.[_0x48c0d4(0x65d)](_0x2c7708=>_0x2c7708[_0x48c0d4(0x68d)])??[];}catch{return[];}});default:return[];}}function _0x2edfad(_0xe972bc,_0xa9d0d8,_0x143363,_0x5e888b){const _0x39d7f1=_0x377970,_0x53871d=_0xe972bc[_0x39d7f1(0x5fd)]('/'),_0x533857=_0xe972bc[_0x39d7f1(0x648)]('/'),_0x16d4aa=_0x53871d?_0x533857[_0x39d7f1(0x2a1)](0x0,-0x1):_0x533857[_0x39d7f1(0x2a1)](0x0,-0x1),_0x54deb5=_0x53871d?'':_0x533857[_0x533857[_0x39d7f1(0x502)]-0x1];let _0x27ecdb=_0xa9d0d8;const _0x509554={};for(const _0x252bc3 of _0x16d4aa){if(!_0x252bc3)continue;if(_0x27ecdb['children'][_0x39d7f1(0x25a)](_0x252bc3))_0x27ecdb=_0x27ecdb[_0x39d7f1(0x2d2)][_0x39d7f1(0x64f)](_0x252bc3);else{if(_0x27ecdb[_0x39d7f1(0x634)])_0x509554[_0x27ecdb[_0x39d7f1(0x634)][_0x39d7f1(0x60c)]]=_0x252bc3,_0x27ecdb=_0x27ecdb[_0x39d7f1(0x634)]['node'];else return[];}}const _0x5c4100=_0x16d4aa[_0x39d7f1(0x200)](Boolean),_0x2e7815=_0x5c4100[_0x39d7f1(0x502)]?_0x5c4100['join']('/')+'/':'',_0x106cb8=[];for(const [_0x5cb7f2]of _0x27ecdb['children']){if(_0x5cb7f2[_0x39d7f1(0x2f6)](_0x54deb5))_0x106cb8[_0x39d7f1(0x59e)](_0x2e7815+_0x5cb7f2);}if(_0x27ecdb[_0x39d7f1(0x634)])for(const _0x493d64 of _0x4e42a3(_0x27ecdb['dynamic'][_0x39d7f1(0x60c)],_0x509554,_0x143363,_0x5e888b)){if(String(_0x493d64)[_0x39d7f1(0x2f6)](_0x54deb5))_0x106cb8[_0x39d7f1(0x59e)](_0x2e7815+_0x493d64);}return _0x106cb8[_0x39d7f1(0x2a1)](0x0,0x64);}const _0x307509=[_0x377970(0x592),_0x377970(0x26e),'env',_0x377970(0x61a),_0x377970(0x298),_0x377970(0x5a3),'logs',_0x377970(0x43c),_0x377970(0x46e),_0x377970(0x3f4)];function _0x139a33(_0x3bb305,_0x4966d0,_0x2da372){return function _0x265bb4(_0x286856){const _0x2da066=_0x3f34;try{const _0x5cc7cd=_0x286856['search'](/\s[{[]/),_0x139297=_0x5cc7cd>=0x0?_0x286856['slice'](0x0,_0x5cc7cd):_0x286856,_0x2d7259=_0x139297['trimStart']();if(!_0x2d7259){const _0x2862df=[..._0x307509,...[..._0x3bb305[_0x2da066(0x2d2)]['keys']()]][_0x2da066(0x2a1)](0x0,0x64);return[_0x2862df,''];}const _0x5632d7=_0x2d7259[_0x2da066(0x648)](/\s+/),_0x8ffb08=_0x5632d7[0x0],_0x5d51f7=_0x8ffb08[_0x2da066(0x573)]();if(_0x5632d7['length']===0x1){const _0x22cc8d=_0x8ffb08['toLowerCase'](),_0x4ab98a=_0x307509['filter'](_0x3e221f=>_0x3e221f['startsWith'](_0x22cc8d)),_0x2b26c1=_0x2edfad(_0x8ffb08,_0x3bb305,_0x4966d0,_0x2da372),_0x47fdfa=[...new Set([..._0x4ab98a,..._0x2b26c1])][_0x2da066(0x2a1)](0x0,0x64);return[_0x47fdfa,_0x8ffb08];}if(_0x198ff0[_0x2da066(0x25a)](_0x5d51f7)&&_0x5632d7[_0x2da066(0x502)]===0x2){const _0x31a40d=_0x5632d7[0x1],_0x304321=_0x2edfad(_0x31a40d,_0x3bb305,_0x4966d0,_0x2da372);return[_0x304321[_0x2da066(0x65d)](_0x1935c4=>_0x8ffb08+'\x20'+_0x1935c4),_0x8ffb08+'\x20'+_0x31a40d];}if(!_0x198ff0[_0x2da066(0x25a)](_0x5d51f7)&&_0x5632d7[_0x2da066(0x502)]>0x1){const _0x5bae81=_0x2edfad(_0x8ffb08,_0x3bb305,_0x4966d0,_0x2da372),_0x15d490='\x20'+_0x5632d7[_0x2da066(0x2a1)](0x1)['join']('\x20');return[_0x5bae81['map'](_0x576565=>_0x576565+_0x15d490),_0x8ffb08+_0x15d490];}return[[],_0x286856];}catch{return[[],_0x286856];}};}async function _0x28e929(_0x5556c9,_0x220826){const _0x54896a=_0x377970,_0x370eb2={'enabled':!![],'level':_0x220826[_0x54896a(0x4a6)]??_0x54896a(0x568)},_0x4070ac={'env':_0x54896a(0x269)},_0x49507d={'current':null},_0x35369f=_0x195704(_0x5556c9[_0x54896a(0x57a)][_0x54896a(0x50f)]()),_0x31ada4=_0x139a33(_0x35369f,_0x5556c9,_0x4070ac);_0x5556c9['log'][_0x54896a(0x3bb)](_0x3c0689=>{const _0x24fa78=_0x54896a;if(!_0x370eb2['enabled'])return;_0x3b7636(_0x3c0689,_0x370eb2['level']),_0x49507d[_0x24fa78(0x487)]?.[_0x24fa78(0x613)](!![]);}),_0x9783bf(_0x5556c9,_0x220826);const _0x41c75b=_0xbfdeba[_0x54896a(0x3d6)]({'input':process[_0x54896a(0x4f0)],'output':process[_0x54896a(0x67c)],'terminal':!![],'completer':_0x31ada4,'prompt':_0x50af14(_0x4070ac),'historySize':_0x344e78});try{const _0x19795b=_0x4591a8[_0x54896a(0x5d4)](_0x10ed82,'utf8')[_0x54896a(0x648)]('\x0a')[_0x54896a(0x200)](Boolean);_0x41c75b['history']=_0x19795b[_0x54896a(0x254)]()[_0x54896a(0x2a1)](0x0,_0x344e78);}catch{}_0x49507d[_0x54896a(0x487)]=_0x41c75b,_0x41c75b['on'](_0x54896a(0x3dc),async _0x888064=>{const _0x46f46a=_0x54896a;_0x41c75b[_0x46f46a(0x21f)]();try{await _0x1c104d(_0x888064,_0x5556c9,_0x220826,_0x370eb2,_0x4070ac,_0x41c75b);}catch(_0x27d12a){console[_0x46f46a(0x5b3)](_0x314ca0(_0x21481f[_0x46f46a(0x54d)],_0x46f46a(0x5b0)+_0x27d12a[_0x46f46a(0x66f)]));}finally{_0x41c75b['resume'](),_0x41c75b[_0x46f46a(0x613)]();}}),_0x41c75b['on'](_0x54896a(0x3e8),()=>{const _0xa06e2e=_0x54896a;try{const _0x4929a5=[..._0x41c75b[_0xa06e2e(0x1e8)]][_0xa06e2e(0x254)]()['filter'](Boolean)['slice'](0x0,_0x344e78);_0x4591a8[_0xa06e2e(0x602)](_0x10ed82,_0x4929a5[_0xa06e2e(0x3b2)]('\x0a')+'\x0a');}catch{}_0x44eb8c(_0x5556c9,0x0);});let _0x29dc0e=0x0;return process['on']('SIGINT',()=>{const _0x2a260f=_0x54896a;if(_0x27e187)return _0x44eb8c(_0x5556c9,0x82,_0x2a260f(0x25e));if(_0x41c75b[_0x2a260f(0x3dc)]==='')return _0x44eb8c(_0x5556c9,0x0,_0x2a260f(0x25e));const _0x3c4eb5=Date[_0x2a260f(0x387)]();if(_0x3c4eb5-_0x29dc0e<0x5dc)return _0x44eb8c(_0x5556c9,0x0,_0x2a260f(0x48f));_0x29dc0e=_0x3c4eb5,process['stdout'][_0x2a260f(0x37f)]('\x0a'),_0x41c75b[_0x2a260f(0x53c)](0x0),_0x41c75b[_0x2a260f(0x613)](),process[_0x2a260f(0x5ff)]['write'](_0x314ca0(_0x21481f['dim'],_0x2a260f(0x5ca)));}),process['on'](_0x54896a(0x36a),()=>_0x44eb8c(_0x5556c9,0x0,_0x54896a(0x36a))),process['on'](_0x54896a(0x626),()=>_0x44eb8c(_0x5556c9,0x0,_0x54896a(0x626))),_0x41c75b[_0x54896a(0x613)](),_0x41c75b;}return okdbShell={'start':_0x28e929,'colorLog':_0x3b7636,'lenientParse':_0x19348c,'_splitLine':_0x1fb896,'_formatRouteHelpLines':_0x3d4586,'_routeSummary':_0x109b6d,'_routeTags':_0x1934ed},okdbShell;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function _0x3f34(_0x60d787,_0xef1a){_0x60d787=_0x60d787-0x1c2;const _0x58844c=_0x5884();let _0x3f3498=_0x58844c[_0x60d787];return _0x3f3498;}function requireOkdbLoopMonitor(){const _0x3123da=_0x5dddf1;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x410424,performance:_0x56f8d8}=require$$0$4,_0x36575c=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x3123da(0x5e7),_0x1d97e5=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x1f3d7e=process.env.OKDB_LOOP_LAG_ALL==='1',_0x2bc229=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x1e6f56{constructor(){const _0x70159=_0x3123da;this[_0x70159(0x65c)]=_0x36575c,this[_0x70159(0x1f3)]=new Map(),this['_h']=null,this[_0x70159(0x558)]=null,this[_0x70159(0x2cd)]=![],this[_0x70159(0x65f)]=(_0x39c359,_0x4393ac)=>process[_0x70159(0x5ff)]['write'](_0x39c359+(_0x4393ac?'\x20'+JSON[_0x70159(0x481)](_0x4393ac):'')+'\x0a');}[_0x3123da(0x387)](){const _0x3a7503=_0x3123da;return _0x56f8d8[_0x3a7503(0x387)]();}[_0x3123da(0x375)](_0x1fe29e){const _0x2e6b00=_0x3123da;if(typeof _0x1fe29e===_0x2e6b00(0x59d))this[_0x2e6b00(0x65f)]=_0x1fe29e;}[_0x3123da(0x303)](_0x7a97d9,_0xfa6b40,_0x435d1e){const _0x47ba04=_0x3123da;if(!this[_0x47ba04(0x65c)])return;let _0x26d606=this['_buckets'][_0x47ba04(0x64f)](_0x7a97d9);!_0x26d606&&(_0x26d606={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x47ba04(0x1f3)]['set'](_0x7a97d9,_0x26d606)),_0x26d606['ms']+=_0xfa6b40,_0x26d606[_0x47ba04(0x29e)]+=0x1,_0xfa6b40>_0x26d606['maxMs']&&(_0x26d606['maxMs']=_0xfa6b40,_0x26d606[_0x47ba04(0x369)]=_0x435d1e||'');}[_0x3123da(0x687)](_0x82cf67){const _0x3ddfbb=_0x3123da;if(!this[_0x3ddfbb(0x65c)]||this[_0x3ddfbb(0x2cd)])return;this['_started']=!![];if(_0x82cf67)this[_0x3ddfbb(0x65f)]=_0x82cf67;this['_h']=_0x410424({'resolution':0xa}),this['_h'][_0x3ddfbb(0x2d8)](),this['_timer']=setInterval(()=>this['_report'](),_0x1d97e5);if(this['_timer'][_0x3ddfbb(0x30b)])this[_0x3ddfbb(0x558)][_0x3ddfbb(0x30b)]();}[_0x3123da(0x68b)](_0x3c5b84){const _0x436298=_0x3123da;if(!this[_0x436298(0x1d1)])this[_0x436298(0x1d1)]=new Set();this[_0x436298(0x1d1)][_0x436298(0x432)](_0x3c5b84);if(!this[_0x436298(0x2cd)])this[_0x436298(0x2db)]();}[_0x3123da(0x449)](_0x3bbd8e){const _0x376797=_0x3123da;this['_windowCbs']?.[_0x376797(0x2e2)](_0x3bbd8e);}['_startAdmission'](){const _0x4cfa5e=_0x3123da;if(this[_0x4cfa5e(0x52c)])return;this[_0x4cfa5e(0x52c)]=!![];!this['_h']&&(this['_h']=_0x410424({'resolution':0xa}),this['_h']['enable']());const _0x3e04d5=_0x1d97e5;this[_0x4cfa5e(0x288)]=setInterval(()=>{const _0x4dc7a7=_0x4cfa5e,_0x3e6adc=this['_h'];if(!_0x3e6adc)return;const _0x439295=_0x3e6adc['percentile'](0x63)/0xf4240,_0x2883d6=_0x3e6adc[_0x4dc7a7(0x5f2)]/0xf4240,_0x17b2b5=_0x3e6adc[_0x4dc7a7(0x537)]/0xf4240;_0x3e6adc['reset']();if(this[_0x4dc7a7(0x1d1)])for(const _0x5b249e of this['_windowCbs']){try{_0x5b249e({'p99Ms':_0x439295,'maxMs':_0x2883d6,'meanMs':_0x17b2b5,'reportMs':_0x3e04d5});}catch{}}},_0x3e04d5);if(this[_0x4cfa5e(0x288)][_0x4cfa5e(0x30b)])this[_0x4cfa5e(0x288)][_0x4cfa5e(0x30b)]();}[_0x3123da(0x28e)](){const _0xa08c3=_0x3123da,_0x169aaf=this['_h'],_0x1b0215=_0x169aaf[_0xa08c3(0x5f2)]/0xf4240,_0x2d3349=_0x169aaf[_0xa08c3(0x1c8)](0x63)/0xf4240,_0x137050=_0x169aaf['mean']/0xf4240;_0x169aaf[_0xa08c3(0x5ef)]();const _0x5a2d52=[...this[_0xa08c3(0x1f3)][_0xa08c3(0x4b8)]()][_0xa08c3(0x65d)](([_0x102920,_0x184d25])=>({'label':_0x102920,..._0x184d25}))[_0xa08c3(0x4fe)]((_0x3c40cf,_0x48499c)=>_0x48499c['ms']-_0x3c40cf['ms'])['slice'](0x0,0x8);this[_0xa08c3(0x1f3)][_0xa08c3(0x32f)]();const _0x1712dd=_0x5a2d52['reduce']((_0x322c39,_0x250042)=>_0x322c39+_0x250042['ms'],0x0),_0x3053a9=_0x5a2d52[_0xa08c3(0x65d)](_0x159c06=>_0x159c06[_0xa08c3(0x64d)]+'='+_0x159c06['ms'][_0xa08c3(0x372)](0x0)+_0xa08c3(0x463)+_0x159c06[_0xa08c3(0x29e)]+(_0x159c06[_0xa08c3(0x604)]>0x5?_0xa08c3(0x229)+_0x159c06[_0xa08c3(0x604)][_0xa08c3(0x372)](0x0)+'ms'+(_0x159c06[_0xa08c3(0x369)]?'\x20'+_0x159c06[_0xa08c3(0x369)]:'')+')':''));(_0x1f3d7e||_0x1b0215>=_0x2bc229)&&this[_0xa08c3(0x65f)](_0xa08c3(0x4d2)+_0x1d97e5+_0xa08c3(0x23e)+_0x1b0215[_0xa08c3(0x372)](0x0)+_0xa08c3(0x2ff)+_0x2d3349[_0xa08c3(0x372)](0x0)+_0xa08c3(0x415)+_0x137050[_0xa08c3(0x372)](0x0)+'ms\x20busy='+_0x1712dd['toFixed'](0x0)+'ms'+(_0x3053a9[_0xa08c3(0x502)]?'\x20│\x20'+_0x3053a9['join']('\x20\x20'):''),{'feature':_0xa08c3(0x379)});if(this[_0xa08c3(0x1d1)])for(const _0x382d10 of this[_0xa08c3(0x1d1)]){try{_0x382d10({'p99Ms':_0x2d3349,'maxMs':_0x1b0215,'meanMs':_0x137050,'reportMs':_0x1d97e5});}catch{}}}[_0x3123da(0x3d9)](){const _0x210057=_0x3123da;if(this['_timer'])clearInterval(this[_0x210057(0x558)]);if(this['_h'])this['_h']['disable']();this['_timer']=null,this['_h']=null,this['_started']=![];}}const _0x3afaf1=new _0x1e6f56();if(_0x3afaf1[_0x3123da(0x65c)])_0x3afaf1[_0x3123da(0x687)]();return okdbLoopMonitor={'LOOP':_0x3afaf1},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x12b88b=require$$1$1,_0x4da039=require$$1;let _0x516e54,_0x15b7f6,_0x3db460,_0x5590b3,_0x52ba32,_0x3b5970,_0x2eba99,_0x419eef=![];const _0x162def=new Set();let _0x1ef799=null;const _0x725f75=new Map();function _0x3a54de(){const _0x3436f9=_0x3f34;if(_0x516e54!==undefined)return _0x516e54;_0x516e54=process.env.OKDB_DIAG==='1';if(!_0x516e54)return![];_0x15b7f6=process.env.OKDB_DIAG_STACK==='1',_0x5590b3=Math[_0x3436f9(0x5f2)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x3db460=new Array(_0x5590b3),_0x52ba32=0x0,_0x3b5970=0x0,_0x2eba99=process.env.OKDB_DIAG_DIR||null;if(_0x2eba99)try{_0x12b88b[_0x3436f9(0x246)](_0x2eba99,{'recursive':!![]});}catch{}return!![];}function _0x4504f8(){return _0x516e54===undefined?_0x3a54de():_0x516e54;}function _0x4f53b0(_0x55ec38,_0x2f8137){const _0x254e83=_0x3f34;if(_0x516e54===undefined?!_0x3a54de():!_0x516e54)return;let _0x34da80;if(_0x15b7f6){const _0x3c51cc=new Error()[_0x254e83(0x48e)]||'';_0x34da80=_0x3c51cc[_0x254e83(0x648)]('\x0a')[_0x254e83(0x2a1)](0x3)[_0x254e83(0x65d)](_0x126f0c=>_0x126f0c[_0x254e83(0x205)]())[_0x254e83(0x200)](Boolean)[_0x254e83(0x2a1)](0x0,0x8);}_0x3db460[_0x52ba32]={'seq':_0x3b5970++,'t':Date[_0x254e83(0x387)](),'env':_0x55ec38,'kind':_0x2f8137||_0x254e83(0x2f7),'stack':_0x34da80},_0x52ba32=(_0x52ba32+0x1)%_0x5590b3;}function _0x594bd0(_0x14f621){const _0x5742e8=[];for(let _0x5cbbee=0x0;_0x5cbbee<_0x5590b3;_0x5cbbee++){const _0x443a5b=_0x3db460[(_0x52ba32-0x1-_0x5cbbee+_0x5590b3*0x2)%_0x5590b3];if(!_0x443a5b)continue;_0x5742e8['push'](_0x443a5b);if(_0x5742e8['length']>=_0x14f621)break;}return _0x5742e8;}function _0x5a0f51(_0x514e0a){const _0xdf7cc8=_0x3f34;try{process[_0xdf7cc8(0x5ff)][_0xdf7cc8(0x37f)](_0x514e0a+'\x0a');}catch{}if(_0x2eba99)try{_0x12b88b[_0xdf7cc8(0x32e)](_0x4da039[_0xdf7cc8(0x3b2)](_0x2eba99,_0xdf7cc8(0x62c)+process['pid']+'.log'),_0x514e0a+'\x0a');}catch{}}function _0x47ea4c(_0x2f01cb){const _0x23d27c=_0x3f34,_0x2dfa53=_0x594bd0(_0x2f01cb);if(!_0x2dfa53[_0x23d27c(0x502)])return'\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)';const _0x320e4d=Date[_0x23d27c(0x387)]();return _0x2dfa53['map'](_0x40ceb6=>{const _0x1c1337=_0x23d27c,_0x15b4e2=_0x1c1337(0x5a2)+_0x40ceb6[_0x1c1337(0x3ae)]+'\x20-'+(_0x320e4d-_0x40ceb6['t'])+_0x1c1337(0x468)+_0x40ceb6[_0x1c1337(0x2cb)]+'\x20'+_0x40ceb6[_0x1c1337(0x2a5)];return _0x40ceb6['stack']&&_0x40ceb6[_0x1c1337(0x48e)][_0x1c1337(0x502)]?_0x15b4e2+_0x1c1337(0x5a7)+_0x40ceb6[_0x1c1337(0x48e)][_0x1c1337(0x3b2)]('\x0a\x20\x20\x20\x20\x20\x20'):_0x15b4e2;})[_0x23d27c(0x3b2)]('\x0a');}function _0x88567b(_0x1d360f,_0x4a087e){const _0x1de991=_0x3f34,_0x6f3284=_0x1de991(0x3bc)+_0x1d360f+_0x1de991(0x37d)+new Date()[_0x1de991(0x1fd)]()+'\x20pid='+process['pid']+_0x1de991(0x3b4),_0x2942a8=[_0x6f3284,_0x1de991(0x4ad)+(_0x4a087e&&_0x4a087e[_0x1de991(0x48e)]?_0x4a087e['stack'][_0x1de991(0x648)]('\x0a')[0x0]:_0x4a087e),_0x1de991(0x543)+(_0x15b7f6?'':_0x1de991(0x50c))+':',_0x47ea4c(0x18),_0x4f61c8(),'='[_0x1de991(0x2e6)](_0x6f3284[_0x1de991(0x502)]-0x1)];_0x5a0f51(_0x2942a8['join']('\x0a'));}function _0x1e3e70(_0x51c31d){const _0x170bb1=_0x3f34;if(!_0x4504f8())return;const _0x410676=String(_0x51c31d&&_0x51c31d[_0x170bb1(0x66f)]||_0x51c31d||''),_0x32a4f9=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x170bb1(0x26f)](_0x410676);_0x88567b(_0x32a4f9?_0x170bb1(0x392):_0x170bb1(0x29c),_0x51c31d);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x32a4f9)return;try{console[_0x170bb1(0x5b3)](_0x51c31d&&_0x51c31d['stack']?_0x51c31d[_0x170bb1(0x48e)]:_0x51c31d);}catch{}process[_0x170bb1(0x46e)](0x1);}function _0x4978d7(_0xc42aca){const _0x1fef54=_0x3f34;if(!_0x4504f8())return;const _0x416114=String(_0xc42aca&&_0xc42aca['message']||_0xc42aca||'');/already closed|environment is already|invalid read txn|reset an invalid/i['test'](_0x416114)&&_0x88567b(_0x1fef54(0x4dc),_0xc42aca);}function _0x4f61c8(){const _0x5e1162=_0x3f34,_0x58f226=['drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):'];let _0x246423=![];for(const _0x1244c2 of _0x162def){const _0x19f94b=_0x1244c2&&_0x1244c2[_0x5e1162(0x4f4)];if(!_0x19f94b)continue;for(const [_0x38227c,_0x37d695]of _0x19f94b){const _0x2f6220=_0x37d695&&_0x37d695[_0x5e1162(0x485)]&&_0x37d695[_0x5e1162(0x485)][_0x5e1162(0x26c)];if(!_0x2f6220)continue;let _0x613213,_0x9912ab;try{_0x613213=Atomics['load'](_0x2f6220,0x0),_0x9912ab=Atomics['load'](_0x2f6220,0x1);}catch{continue;}if(_0x613213===0x0)continue;_0x246423=!![];const _0x581f04=_0x613213>0x0?_0x5e1162(0x2ea):_0x5e1162(0x21c),_0x331fbd=Date['now']()-Math[_0x5e1162(0x4d4)](_0x613213)*0x3e8,_0x1fc520=((()=>{const _0x3a412c=_0x5e1162;try{return _0x37d695['_writer']&&_0x37d695[_0x3a412c(0x4ef)][_0x3a412c(0x36f)]?_0x37d695[_0x3a412c(0x4ef)]['status']():null;}catch{return null;}})());_0x58f226[_0x5e1162(0x59e)](_0x5e1162(0x309)+_0x38227c+_0x5e1162(0x2e8)+_0x581f04+'\x20drainAge='+_0x331fbd+_0x5e1162(0x5bd)+_0x9912ab+(_0x1fc520?_0x5e1162(0x464)+_0x1fc520[_0x5e1162(0x344)]+_0x5e1162(0x632)+_0x1fc520[_0x5e1162(0x283)]+_0x5e1162(0x565)+_0x1fc520['parkedNow']+'}':''));}}if(!_0x246423)_0x58f226[_0x5e1162(0x59e)](_0x5e1162(0x44f));return _0x58f226[_0x5e1162(0x3b2)]('\x0a');}function _0x1c7b26(){const _0x28cb63=_0x3f34;if(!_0x4504f8())return;const _0x5b9f3=Math[_0x28cb63(0x5f2)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0xd474a3=Date[_0x28cb63(0x387)]();for(const _0x325540 of _0x162def){const _0x2167a=_0x325540&&_0x325540['_envs'];if(!_0x2167a)continue;for(const [_0x386d53,_0x229fc7]of _0x2167a){const _0x2e5e35=_0x229fc7&&_0x229fc7[_0x28cb63(0x485)]&&_0x229fc7['_coordinator']['view'];if(!_0x2e5e35)continue;let _0x241219;try{_0x241219=Atomics[_0x28cb63(0x4eb)](_0x2e5e35,0x0);}catch{continue;}const _0x224b21=_0x325540[_0x28cb63(0x411)]+'|'+_0x386d53;if(_0x241219<=0x0){_0x725f75[_0x28cb63(0x2e2)](_0x224b21);continue;}const _0x3e157f=_0xd474a3-_0x241219*0x3e8,_0x44660a=_0x725f75[_0x28cb63(0x64f)](_0x224b21);if(_0x3e157f<_0x5b9f3)continue;if(_0x44660a&&_0xd474a3-_0x44660a['dumpedAt']<_0x5b9f3)continue;_0x725f75[_0x28cb63(0x2d9)](_0x224b21,{'firstTs':_0x44660a?_0x44660a[_0x28cb63(0x31e)]:_0x241219,'dumpedAt':_0xd474a3});const _0x239e0d=_0x28cb63(0x660)+_0x3e157f+'ms\x20on\x20env='+_0x386d53+_0x28cb63(0x37d)+new Date()[_0x28cb63(0x1fd)]()+_0x28cb63(0x235)+process['pid']+_0x28cb63(0x3b4);_0x5a0f51([_0x239e0d,_0x4f61c8(),'='[_0x28cb63(0x2e6)](_0x239e0d[_0x28cb63(0x502)]-0x1)][_0x28cb63(0x3b2)]('\x0a'));}}}function _0x3f2d2f(){const _0x2a46df=_0x3f34;if(!_0x4504f8()||_0x419eef)return;_0x419eef=!![],process['prependListener'](_0x2a46df(0x29c),_0x1e3e70),process['prependListener'](_0x2a46df(0x47e),_0x4978d7);const _0x570101=Math[_0x2a46df(0x5f2)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x1ef799=setInterval(_0x1c7b26,_0x570101);if(_0x1ef799[_0x2a46df(0x30b)])_0x1ef799[_0x2a46df(0x30b)]();}function _0x1efd94(_0x219b36){const _0x459afc=_0x3f34;if(!_0x4504f8()||!_0x219b36)return;_0x162def[_0x459afc(0x432)](_0x219b36),_0x3f2d2f();}function _0x5e75d3(_0x3dda44){const _0x2d45f9=_0x3f34;_0x162def[_0x2d45f9(0x2e2)](_0x3dda44);}function _0x1a74e5(){const _0x430481=_0x3f34;if(!_0x4504f8())return{'enabled':![],'hint':_0x430481(0x2c8)};return{'enabled':!![],'stackCapture':!!_0x15b7f6,'recentWrites':_0x594bd0(0x10),'drain':_0x4f61c8()};}return okdbDiag={'isEnabled':_0x4504f8,'recordWrite':_0x4f53b0,'installDiag':_0x3f2d2f,'registerOkdb':_0x1efd94,'unregisterOkdb':_0x5e75d3,'snapshot':_0x1a74e5},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x1de016=_0x5dddf1;if(hasRequiredOkdbWriter)return okdbWriter['exports'];hasRequiredOkdbWriter=0x1;const {performance:_0x47c046}=require$$0$5,_0x4e52e2=requireOkdbDiag(),_0x4d1733=process.env.OKDB_COMMIT_MODE===_0x1de016(0x4fa);class _0x195c3c{constructor(_0x14d354){const _0x319562=_0x1de016;this[_0x319562(0x2cb)]=_0x14d354,this[_0x319562(0x561)]=new Set(),this[_0x319562(0x2f8)]=new Map(),this[_0x319562(0x680)]=0x0,this['_durs']=[],this['_done']=[],this['_highWater']=Math[_0x319562(0x5f2)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this['_outstanding']=0x0,this['_bpWaiters']=[],this[_0x319562(0x395)]=0x0;}async['transaction'](_0x1314b5,_0x350adf){const _0x23fe7d=_0x1de016;if(_0x4e52e2['isEnabled']())_0x4e52e2[_0x23fe7d(0x299)](this['env']?.[_0x23fe7d(0x68d)],_0x350adf);if(this['_closed']){const _0x155d24=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x155d24[_0x23fe7d(0x30f)]=_0x23fe7d(0x5cd);throw _0x155d24;}if(this[_0x23fe7d(0x64c)]>0x0){let _0x179d1b=![];while(this[_0x23fe7d(0x26b)]>=this['_highWater']&&!this['_closed']){!_0x179d1b&&(_0x179d1b=!![],this['_bpParkedTotal']++),await new Promise(_0x13285e=>this[_0x23fe7d(0x546)][_0x23fe7d(0x59e)](_0x13285e));}if(this[_0x23fe7d(0x3a3)]){const _0x37b55f=new Error(_0x23fe7d(0x24d));_0x37b55f['code']=_0x23fe7d(0x5cd);throw _0x37b55f;}}this[_0x23fe7d(0x26b)]++;const _0xb764ae=this[_0x23fe7d(0x2cb)][_0x23fe7d(0x485)];if(_0xb764ae)await _0xb764ae[_0x23fe7d(0x255)]();if(this[_0x23fe7d(0x3a3)]){if(_0xb764ae)_0xb764ae[_0x23fe7d(0x32a)]();this[_0x23fe7d(0x26b)]--;if(this[_0x23fe7d(0x546)][_0x23fe7d(0x502)]&&this[_0x23fe7d(0x26b)]<this[_0x23fe7d(0x64c)])this['_bpWaiters'][_0x23fe7d(0x1fa)]()();const _0x59cbc6=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x59cbc6[_0x23fe7d(0x30f)]=_0x23fe7d(0x5cd);throw _0x59cbc6;}const _0x4b4ce2=_0x47c046['now']();if(_0x4d1733)try{const _0x594dd9=this[_0x23fe7d(0x2cb)]['db']['transactionSync'](_0x1314b5);this[_0x23fe7d(0x680)]++;if(this[_0x23fe7d(0x2ed)]['push'](_0x47c046[_0x23fe7d(0x387)]()-_0x4b4ce2)>0x100)this[_0x23fe7d(0x2ed)][_0x23fe7d(0x1fa)]();if(this['_done']['push'](_0x47c046[_0x23fe7d(0x387)]())>0x800)this[_0x23fe7d(0x61b)]['shift']();return _0x594dd9;}finally{this[_0x23fe7d(0x26b)]--;if(this[_0x23fe7d(0x546)][_0x23fe7d(0x502)]&&this[_0x23fe7d(0x26b)]<this[_0x23fe7d(0x64c)])this[_0x23fe7d(0x546)][_0x23fe7d(0x1fa)]()();if(_0xb764ae)_0xb764ae[_0x23fe7d(0x32a)]();}const _0x4c0348=this[_0x23fe7d(0x2cb)]['db'][_0x23fe7d(0x294)](_0x1314b5);this[_0x23fe7d(0x561)]['add'](_0x4c0348),this[_0x23fe7d(0x2f8)][_0x23fe7d(0x2d9)](_0x4c0348,_0x4b4ce2);const _0x26e69a=()=>{const _0x1864e1=_0x23fe7d;this[_0x1864e1(0x561)][_0x1864e1(0x2e2)](_0x4c0348),this[_0x1864e1(0x2f8)][_0x1864e1(0x2e2)](_0x4c0348),this[_0x1864e1(0x680)]++,this['_outstanding']--;this[_0x1864e1(0x546)][_0x1864e1(0x502)]&&this[_0x1864e1(0x26b)]<this[_0x1864e1(0x64c)]&&this[_0x1864e1(0x546)][_0x1864e1(0x1fa)]()();if(this['_durs'][_0x1864e1(0x59e)](_0x47c046[_0x1864e1(0x387)]()-_0x4b4ce2)>0x100)this[_0x1864e1(0x2ed)][_0x1864e1(0x1fa)]();if(this[_0x1864e1(0x61b)][_0x1864e1(0x59e)](_0x47c046[_0x1864e1(0x387)]())>0x800)this['_done'][_0x1864e1(0x1fa)]();};_0x4c0348[_0x23fe7d(0x45d)](_0x26e69a,_0x26e69a);try{return await _0x4c0348;}finally{if(_0xb764ae)_0xb764ae[_0x23fe7d(0x32a)]();}}[_0x1de016(0x36f)](){const _0x4a5886=_0x1de016,_0x2d037e=_0x47c046[_0x4a5886(0x387)]();let _0x144a1d=0x0;for(const _0x3c5787 of this[_0x4a5886(0x2f8)][_0x4a5886(0x33c)]()){const _0x590f62=_0x2d037e-_0x3c5787;if(_0x590f62>_0x144a1d)_0x144a1d=_0x590f62;}let _0x4b8eb8=0x0;for(let _0x472aec=this[_0x4a5886(0x61b)][_0x4a5886(0x502)]-0x1;_0x472aec>=0x0;_0x472aec--){if(_0x2d037e-this[_0x4a5886(0x61b)][_0x472aec]>0x3e8)break;_0x4b8eb8++;}let _0x2b8ecd=0x0;if(this[_0x4a5886(0x2ed)][_0x4a5886(0x502)]){const _0x9ebd5e=[...this[_0x4a5886(0x2ed)]][_0x4a5886(0x4fe)]((_0x11f2b9,_0x2b8bd8)=>_0x11f2b9-_0x2b8bd8);_0x2b8ecd=_0x9ebd5e[Math[_0x4a5886(0x52a)](_0x9ebd5e[_0x4a5886(0x502)]-0x1,Math[_0x4a5886(0x3be)](_0x9ebd5e[_0x4a5886(0x502)]*0.99))];}return{'depth':this[_0x4a5886(0x561)]['size'],'oldestPendingMs':Math['round'](_0x144a1d),'committed':this[_0x4a5886(0x680)],'commitsPerSec':_0x4b8eb8,'commitP99Ms':Math[_0x4a5886(0x3ef)](_0x2b8ecd),'parkedNow':this[_0x4a5886(0x546)][_0x4a5886(0x502)],'parkedTotal':this['_bpParkedTotal'],'highWater':this[_0x4a5886(0x64c)]};}[_0x1de016(0x503)](){const _0x14847b=_0x1de016,_0x5954a9=_0x47c046[_0x14847b(0x387)]();return[...this['_enqueuedAt'][_0x14847b(0x33c)]()]['map'](_0x44d58f=>Math[_0x14847b(0x3ef)](_0x5954a9-_0x44d58f))['sort']((_0x2bef77,_0x42bcc1)=>_0x42bcc1-_0x2bef77);}[_0x1de016(0x277)](){const _0x53b942=_0x1de016;this[_0x53b942(0x3a3)]=!![];for(const _0x38c869 of this[_0x53b942(0x546)][_0x53b942(0x30d)](0x0))_0x38c869();}async[_0x1de016(0x2d0)](){const _0x272ce6=_0x1de016;let _0x307e72=0x0;while(this['_inflight']['size']&&_0x307e72++<0x3e8){await Promise[_0x272ce6(0x442)]([...this[_0x272ce6(0x561)]]);}}async[_0x1de016(0x644)](_0x4a7981,_0x4b2e12,_0x194667,_0x2ad8f2){const _0x3beb2c=_0x1de016;return this[_0x3beb2c(0x65e)](()=>{const _0x4dab6f=_0x3beb2c;if(_0x2ad8f2===undefined)_0x4a7981[_0x4dab6f(0x37b)](_0x4b2e12,_0x194667);else _0x4a7981[_0x4dab6f(0x37b)](_0x4b2e12,_0x194667,_0x2ad8f2);},_0x3beb2c(0x59b));}async['remove'](_0x456fe3,_0x18e0d3){const _0x3c967e=_0x1de016;return this[_0x3c967e(0x65e)](()=>_0x456fe3[_0x3c967e(0x611)](_0x18e0d3),_0x3c967e(0x66b));}}async function _0x3ec71f(_0x337821,_0x465db1){const _0x521c95=_0x1de016;if(_0x465db1==null)_0x465db1=Math[_0x521c95(0x5f2)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x15642e=_0x337821?.[_0x521c95(0x24a)];if(!_0x15642e||typeof _0x15642e[_0x521c95(0x45d)]!==_0x521c95(0x59d))return;await Promise[_0x521c95(0x293)]([Promise[_0x521c95(0x271)](_0x15642e)[_0x521c95(0x28f)](()=>{}),new Promise(_0x96aa28=>{const _0x20e5b8=_0x521c95,_0x55a706=setTimeout(_0x96aa28,_0x465db1);if(_0x55a706['unref'])_0x55a706[_0x20e5b8(0x30b)]();})]);}catch{}}function _0x1055bf(_0x304696){const _0x30d306=_0x1de016;if(_0x4d1733)return Promise[_0x30d306(0x271)]();const _0xc09e5f=_0x304696?.[_0x30d306(0x3a6)];return _0xc09e5f&&typeof _0xc09e5f['then']===_0x30d306(0x59d)?_0xc09e5f:Promise[_0x30d306(0x271)]();}return okdbWriter[_0x1de016(0x3b9)]=_0x195c3c,okdbWriter[_0x1de016(0x3b9)][_0x1de016(0x54a)]=_0x3ec71f,okdbWriter['exports'][_0x1de016(0x3a6)]=_0x1055bf,okdbWriter['exports'][_0x1de016(0x619)]=_0x4d1733,okdbWriter[_0x1de016(0x3b9)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x5754b5=_0x5dddf1;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x5c9259=require$$0,{SYNC_COMMITS:_0x3ea3cf}=requireOkdbWriter(),_0x4620c5='~lock';class _0x48b76f{constructor(_0x30f025,_0x38dedb,_0x3336ea){const _0x1a1a5e=_0x3f34;this[_0x1a1a5e(0x4d8)]=_0x30f025,this[_0x1a1a5e(0x316)]=_0x38dedb,this[_0x1a1a5e(0x397)]=_0x3336ea,this[_0x1a1a5e(0x5aa)]=![],this[_0x1a1a5e(0x5de)]=null,this[_0x1a1a5e(0x575)]=null;}[_0x5754b5(0x5a1)](){const _0x26eb42=_0x5754b5;if(this[_0x26eb42(0x5aa)])return![];try{const _0x2e052b=this[_0x26eb42(0x4d8)][_0x26eb42(0x4b6)]()[_0x26eb42(0x64f)](this['_key']);if(!_0x2e052b||_0x2e052b[_0x26eb42(0x522)]!==this[_0x26eb42(0x397)])return![];const _0x5930d1=_0x2e052b[_0x26eb42(0x4ec)]??_0x2e052b[_0x26eb42(0x522)];if(_0x5930d1+_0x2e052b[_0x26eb42(0x5c2)]<Date['now']())return![];return!![];}catch{return!this[_0x26eb42(0x5aa)];}}[_0x5754b5(0x1cf)](){const _0xaee77b=_0x5754b5;if(this[_0xaee77b(0x5aa)])return null;try{return this['_lock'][_0xaee77b(0x4b6)]()[_0xaee77b(0x64f)](this[_0xaee77b(0x316)])??null;}catch{return null;}}async[_0x5754b5(0x1e2)](_0xb34881){const _0x37a73c=_0x5754b5;if(this[_0x37a73c(0x5aa)])return;try{const _0x53623a=this[_0x37a73c(0x4d8)][_0x37a73c(0x4b6)]()[_0x37a73c(0x64f)](this[_0x37a73c(0x316)]);if(!_0x53623a||_0x53623a['acquiredAt']!==this['_acquiredAt'])return;if(_0x3ea3cf)this['_lock'][_0x37a73c(0x4b6)]()[_0x37a73c(0x37b)](this[_0x37a73c(0x316)],{..._0x53623a,'ttlMs':_0x53623a[_0x37a73c(0x5c2)]+_0xb34881});else await this[_0x37a73c(0x4d8)][_0x37a73c(0x4b6)]()[_0x37a73c(0x644)](this[_0x37a73c(0x316)],{..._0x53623a,'ttlMs':_0x53623a['ttlMs']+_0xb34881});}catch{}}async[_0x5754b5(0x272)](){const _0x4cea31=_0x5754b5;if(this[_0x4cea31(0x5aa)])return;if(this[_0x4cea31(0x575)])try{await this[_0x4cea31(0x575)];}catch{}clearInterval(this[_0x4cea31(0x5de)]),this[_0x4cea31(0x5de)]=null,this['_released']=!![];try{const _0x373300=this[_0x4cea31(0x4d8)][_0x4cea31(0x4b6)]()['get'](this[_0x4cea31(0x316)]);if(_0x373300&&_0x373300[_0x4cea31(0x522)]===this[_0x4cea31(0x397)]){if(_0x3ea3cf)this[_0x4cea31(0x4d8)][_0x4cea31(0x4b6)]()[_0x4cea31(0x611)](this['_key']);else await this['_lock'][_0x4cea31(0x4b6)]()['remove'](this[_0x4cea31(0x316)]);}}catch{}}[_0x5754b5(0x489)](_0x1e0ca2,_0x17fb0a){const _0x3fd2a8=_0x5754b5,_0x167af3=_0x17fb0a??Math['floor'](_0x1e0ca2/0x3);this[_0x3fd2a8(0x5de)]=setInterval(()=>{const _0x32af2a=_0x3fd2a8;if(this[_0x32af2a(0x5aa)])return;this['_heartbeatInFlight']=((async()=>{const _0x4193c8=_0x32af2a;try{const _0x3e51a4=this[_0x4193c8(0x4d8)][_0x4193c8(0x4b6)]()[_0x4193c8(0x64f)](this[_0x4193c8(0x316)]);if(!_0x3e51a4||_0x3e51a4[_0x4193c8(0x522)]!==this[_0x4193c8(0x397)]){this[_0x4193c8(0x5aa)]=!![],clearInterval(this[_0x4193c8(0x5de)]),this['_heartbeatTimer']=null;return;}if(_0x3ea3cf)this[_0x4193c8(0x4d8)][_0x4193c8(0x4b6)]()[_0x4193c8(0x37b)](this[_0x4193c8(0x316)],{..._0x3e51a4,'updatedAt':Date['now']()});else await this['_lock'][_0x4193c8(0x4b6)]()[_0x4193c8(0x644)](this[_0x4193c8(0x316)],{..._0x3e51a4,'updatedAt':Date[_0x4193c8(0x387)]()});}catch{}this[_0x4193c8(0x575)]=null;})());},_0x167af3);if(this[_0x3fd2a8(0x5de)][_0x3fd2a8(0x30b)])this[_0x3fd2a8(0x5de)]['unref']();}}class _0x6b2bbc{constructor(_0x1bbc94,{namespace:_0x9663d0,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x245d89=_0x5754b5;this['_rawDb']=_0x1bbc94,this[_0x245d89(0x44d)]=_0x9663d0,this[_0x245d89(0x5c2)]=ttlMs,this[_0x245d89(0x57b)]=heartbeatMs,this[_0x245d89(0x689)]=null;}[_0x5754b5(0x4b6)](){const _0x1de1d1=_0x5754b5;return!this['_lockDb']&&(this['_lockDb']=this[_0x1de1d1(0x209)][_0x1de1d1(0x262)](_0x4620c5,{'dupSort':![]})),this[_0x1de1d1(0x689)];}[_0x5754b5(0x44c)](){const _0x4b7aad=_0x5754b5;return!this[_0x4b7aad(0x35d)]&&(this['_wantDbHandle']=this[_0x4b7aad(0x209)]['openDB'](_0x4620c5+_0x4b7aad(0x248),{'dupSort':![]})),this['_wantDbHandle'];}[_0x5754b5(0x316)](_0x3af308){const _0x2b6c37=_0x5754b5;return this[_0x2b6c37(0x44d)]+':'+_0x3af308;}[_0x5754b5(0x453)](_0xbdc665){const _0x2afca7=_0x5754b5;try{_0x3ea3cf?this[_0x2afca7(0x44c)]()['putSync'](this[_0x2afca7(0x316)](_0xbdc665),Date[_0x2afca7(0x387)]()):this[_0x2afca7(0x44c)]()['put'](this[_0x2afca7(0x316)](_0xbdc665),Date[_0x2afca7(0x387)]())?.[_0x2afca7(0x28f)]?.(()=>{});}catch{}}[_0x5754b5(0x466)](_0x59e964,_0x4b2336=0x3e8){const _0x16aff0=_0x5754b5;try{const _0x56f78a=this[_0x16aff0(0x44c)]()[_0x16aff0(0x64f)](this[_0x16aff0(0x316)](_0x59e964));return typeof _0x56f78a===_0x16aff0(0x57c)&&Date[_0x16aff0(0x387)]()-_0x56f78a<_0x4b2336;}catch{return![];}}[_0x5754b5(0x53a)](_0x34a0c4){const _0x223be6=_0x5754b5,_0x12524f=_0x34a0c4[_0x223be6(0x4ec)]??_0x34a0c4['acquiredAt'];return _0x12524f+_0x34a0c4['ttlMs']<Date[_0x223be6(0x387)]();}static['_holderDead'](_0x115f04){const _0x5b4006=_0x5754b5,_0x47f20a=_0x115f04?.[_0x5b4006(0x1cf)];if(!_0x47f20a||typeof _0x47f20a[_0x5b4006(0x478)]!==_0x5b4006(0x57c))return![];if(_0x47f20a[_0x5b4006(0x252)]!==_0x5c9259[_0x5b4006(0x252)]())return![];if(_0x47f20a[_0x5b4006(0x478)]===process['pid'])return![];try{return process[_0x5b4006(0x636)](_0x47f20a[_0x5b4006(0x478)],0x0),![];}catch(_0x519dc2){return _0x519dc2[_0x5b4006(0x30f)]==='ESRCH';}}async[_0x5754b5(0x276)](_0x553304,_0x18fb2b={},_0x1b22b5={}){const _0x4ed924=_0x5754b5,_0x2d4ee9=this[_0x4ed924(0x316)](_0x553304),_0x1d1b0c=_0x1b22b5['ttlMs']??this[_0x4ed924(0x5c2)],_0x1921bc=Date[_0x4ed924(0x387)](),_0x1dd9e2={'holder':{'pid':process[_0x4ed924(0x478)],'hostname':_0x5c9259[_0x4ed924(0x252)](),..._0x18fb2b},'acquiredAt':_0x1921bc,'updatedAt':_0x1921bc,'ttlMs':_0x1d1b0c};let _0x1cffd0=![],_0x2d3f59=null;try{const _0x2f2ffa=()=>{const _0xae9de9=_0x4ed924,_0xe358ff=this[_0xae9de9(0x4b6)]()['get'](_0x2d4ee9);if(_0xe358ff&&!this[_0xae9de9(0x53a)](_0xe358ff)&&!_0x6b2bbc[_0xae9de9(0x3a0)](_0xe358ff)){const _0x43154c=_0x18fb2b['processorId']!=null&&_0xe358ff[_0xae9de9(0x1cf)][_0xae9de9(0x478)]===process[_0xae9de9(0x478)]&&_0xe358ff[_0xae9de9(0x1cf)]['processorId']===_0x18fb2b[_0xae9de9(0x3c3)];if(!_0x43154c){_0x1cffd0=![],_0x2d3f59=_0xe358ff;return;}_0x1dd9e2[_0xae9de9(0x522)]<=_0xe358ff[_0xae9de9(0x522)]&&(_0x1dd9e2[_0xae9de9(0x522)]=_0xe358ff[_0xae9de9(0x522)]+0x1,_0x1dd9e2['updatedAt']=_0x1dd9e2[_0xae9de9(0x522)]);}this['_db']()['put'](_0x2d4ee9,_0x1dd9e2),_0x1cffd0=!![],_0x2d3f59=_0x1dd9e2;};if(_0x3ea3cf)this[_0x4ed924(0x4b6)]()[_0x4ed924(0x1d9)](_0x2f2ffa);else await this[_0x4ed924(0x4b6)]()[_0x4ed924(0x294)](_0x2f2ffa);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x1cffd0)return{'acquired':![],'handle':null,'current':_0x2d3f59};const _0x532974=new _0x48b76f(this,_0x2d4ee9,_0x1dd9e2[_0x4ed924(0x522)]);return _0x532974['_startHeartbeat'](_0x1d1b0c,this[_0x4ed924(0x57b)]),{'acquired':!![],'handle':_0x532974,'current':_0x2d3f59};}[_0x5754b5(0x3c6)](_0x4632d2){const _0x43cb94=_0x5754b5;try{return this[_0x43cb94(0x4b6)]()[_0x43cb94(0x64f)](this[_0x43cb94(0x316)](_0x4632d2))??null;}catch{return null;}}['list'](){const _0x4a9cbc=_0x5754b5,_0x572b94=this[_0x4a9cbc(0x44d)]+':',_0x5bbe3f=[];try{for(const {key:_0x5ef230,value:_0x1df2fd}of this[_0x4a9cbc(0x4b6)]()['getRange']({'start':_0x572b94,'end':_0x572b94+'ÿ'})){typeof _0x5ef230==='string'&&_0x5ef230[_0x4a9cbc(0x2f6)](_0x572b94)&&_0x5bbe3f[_0x4a9cbc(0x59e)]({'id':_0x5ef230[_0x4a9cbc(0x2a1)](_0x572b94[_0x4a9cbc(0x502)]),'entry':_0x1df2fd});}}catch{}return _0x5bbe3f;}static[_0x5754b5(0x2e7)](_0x28e4bf){const _0x37fa1f=_0x5754b5,_0x4cefa6=[];try{const _0x68a054=_0x28e4bf['openDB'](_0x4620c5,{'dupSort':![]});for(const {key:_0x266539,value:_0x32413b}of _0x68a054[_0x37fa1f(0x416)]({})){if(typeof _0x266539!==_0x37fa1f(0x58b))continue;const _0x1031f1=_0x266539[_0x37fa1f(0x3d1)](':');if(_0x1031f1<0x1)continue;_0x4cefa6[_0x37fa1f(0x59e)]({'namespace':_0x266539[_0x37fa1f(0x2a1)](0x0,_0x1031f1),'id':_0x266539[_0x37fa1f(0x2a1)](_0x1031f1+0x1),'entry':_0x32413b});}}catch{}return _0x4cefa6;}}return okdbLock={'OKDBLock':_0x6b2bbc},okdbLock;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x100fda=_0x5dddf1;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x2735c4=require$$0,_0x39c47d=require$$1$2,_0x437cd8=require$$0$1,{LOOP:_0x3fefd1}=requireOkdbLoopMonitor(),{OKDBLock:_0x19966d}=requireOkdbLock(),{SYNC_COMMITS:_0x2ac7c5}=requireOkdbWriter(),_0x51ea91=_0x100fda(0x425),_0x1ce828=_0x100fda(0x4f3),_0x5f0118=_0x100fda(0x5f0),_0x5a332d=_0x100fda(0x24b),_0x15e52c=(_0x27bafb,_0x2067d0)=>_0x27bafb+':'+_0x2067d0,_0x34c4e6=(_0x2f381a,_0x567934)=>_0x2f381a+'::'+_0x567934,_0x15b115=(_0x1d783a,_0x16e036)=>_0x1d783a+'/'+_0x16e036,_0x2a77f7=(_0x45d9d3,_0xd27eb6)=>_0x45d9d3+'#'+_0xd27eb6,_0x339da7=_0x3e0052=>{const _0x3acb48=_0x100fda;if(_0x3e0052?.['processKey'])return _0x3e0052[_0x3acb48(0x656)];const _0x4e428f=_0x3e0052?.[_0x3acb48(0x23c)];return typeof _0x4e428f===_0x3acb48(0x58b)&&_0x4e428f[_0x3acb48(0x39f)]('#')?_0x4e428f[_0x3acb48(0x2a1)](0x0,_0x4e428f['indexOf']('#')):_0x4e428f;},_0x3d13d6=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x1d5641=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x2c592d=_0x3d13d6*0x3,_0x433c66=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math['max'](0x927c0,_0x2c592d*0x14),_0x3d098c=[_0x100fda(0x5b5),_0x100fda(0x3c8),_0x100fda(0x326),_0x100fda(0x50b),_0x100fda(0x5ab),_0x100fda(0x389)];let _0x4498e0=null;function _0x51fcbb(){const _0x3c0961=_0x100fda;if(_0x4498e0==null)_0x4498e0=Math[_0x3c0961(0x3ef)]((Date[_0x3c0961(0x387)]()-process[_0x3c0961(0x569)]()*0x3e8)/0x3e8)*0x3e8;return _0x4498e0;}function _0x904b22(_0x24962b){const _0x3b1cbc=_0x100fda;if(process.env.OKDB_PROCESS_KILL===_0x3b1cbc(0x5e8))return![];if(_0x24962b?.[_0x3b1cbc(0x4bb)]?.[_0x3b1cbc(0x407)]&&typeof _0x24962b[_0x3b1cbc(0x4bb)]['processes']===_0x3b1cbc(0x65b)&&_0x24962b['options']['processes']['kill']===![])return![];return!![];}function _0x10a378(_0x512144,_0xa9009){const _0x5f2b44=_0x100fda,_0x2930b4=!!_0xa9009?.[_0x5f2b44(0x68a)];switch(_0x512144){case _0x5f2b44(0x35b):return{'controllable':_0x2930b4,'decommissionable':![],'killable':!![],'killConfirm':_0x5f2b44(0x555)};case _0x5f2b44(0x60b):case'standalone':return{'controllable':_0x2930b4,'decommissionable':![],'killable':!![],'killConfirm':_0x5f2b44(0x5bb)};case _0x5f2b44(0x3ec):return{'controllable':![],'decommissionable':![],'killable':![]};case _0x5f2b44(0x345):case _0x5f2b44(0x33f):case _0x5f2b44(0x327):case _0x5f2b44(0x55f):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x5f2b44(0x216)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x128a85{constructor(_0x43be8b){const _0x20d503=_0x100fda;this['okdb']=_0x43be8b,this[_0x20d503(0x56d)]=null,this[_0x20d503(0x2bc)]=null,this[_0x20d503(0x465)]=new Map(),this[_0x20d503(0x1c5)]=null,this['_isWriter']=![],this[_0x20d503(0x494)]=![],this[_0x20d503(0x50d)]=_0x51fcbb(),this[_0x20d503(0x2b8)]=_0x15e52c(process[_0x20d503(0x478)],this[_0x20d503(0x50d)]),this[_0x20d503(0x414)]=_0x437cd8['randomUUID']()[_0x20d503(0x2a1)](0x0,0x8),this[_0x20d503(0x618)]=_0x2a77f7(this['_selfKey'],this[_0x20d503(0x414)]),this[_0x20d503(0x5a9)]=Date[_0x20d503(0x387)](),this['_kind']=null,this[_0x20d503(0x534)]=null,this['_listenAddr']=null,this[_0x20d503(0x498)]=null,this[_0x20d503(0x284)]=null,this[_0x20d503(0x2e9)]=null,this[_0x20d503(0x348)]=0x0,this[_0x20d503(0x52d)]={},this[_0x20d503(0x259)]=new Map(),this[_0x20d503(0x5a4)]=process['cpuUsage'](),this['_lastCpuAt']=Date[_0x20d503(0x387)](),this[_0x20d503(0x5b2)]=0x0,this[_0x20d503(0x595)]=new Map();}get[_0x100fda(0x354)](){const _0x468e0a=_0x100fda;return this[_0x468e0a(0x2b8)];}get[_0x100fda(0x2df)](){const _0x102125=_0x100fda;return this[_0x102125(0x618)];}['_caps'](_0x1a3b57,_0x429570){const _0x4e197f=_0x100fda,_0x5a5ba9=_0x10a378(_0x1a3b57,_0x429570);if(_0x5a5ba9[_0x4e197f(0x274)]&&!_0x904b22(this['okdb']))return{..._0x5a5ba9,'killable':![],'killConfirm':undefined};return _0x5a5ba9;}[_0x100fda(0x4e3)](){return!!this['_statusEnv'];}['setOwnMeta'](_0x155579){const _0x3c0dc0=_0x100fda;Object['assign'](this[_0x3c0dc0(0x52d)],_0x155579||{});}[_0x100fda(0x1dc)](_0x52e010){const _0x41f4f0=_0x100fda;if(_0x52e010)this[_0x41f4f0(0x649)]=_0x52e010;}[_0x100fda(0x445)](_0x5c1f13={}){const _0x2ae1af=_0x100fda;return this[_0x2ae1af(0x5d7)][_0x2ae1af(0x583)](_0x5c1f13);}[_0x100fda(0x438)](){const _0xe5e6f5=_0x100fda,_0x54586f={};let _0x2981bb=0x0,_0x2a3f42=0x0;const _0x1c3af8=new Set();for(const _0x2ca894 of this['listNodes']()){_0x2a3f42++;const _0x13b417=_0x2ca894[_0xe5e6f5(0x629)];if(!_0x13b417)continue;if(_0x13b417[_0xe5e6f5(0x30c)])_0x2981bb++;for(const _0x1424ae of _0x13b417['processors']||[]){if(![_0xe5e6f5(0x491),_0xe5e6f5(0x429)][_0xe5e6f5(0x39f)](_0x1424ae[_0xe5e6f5(0x4d3)]))continue;(_0x1424ae['state']===_0xe5e6f5(0x367)||_0x1424ae[_0xe5e6f5(0x213)]==='building')&&_0x1424ae[_0xe5e6f5(0x41d)]&&_0x1c3af8[_0xe5e6f5(0x432)]((_0x1424ae['env']||_0xe5e6f5(0x269))+':'+_0x1424ae[_0xe5e6f5(0x41d)]);const _0x2f0275=_0x1424ae['env']||'default';(_0x54586f[_0x2f0275]||=[])['push']({..._0x1424ae,'env':_0x2f0275,'owner':{'pid':_0x2ca894[_0xe5e6f5(0x478)]??null,'kind':_0x2ca894[_0xe5e6f5(0x2a5)]??null}});}}for(const [_0x128407,_0x41ecb9]of Object[_0xe5e6f5(0x4b8)](_0x54586f)){for(const _0x471b95 of _0x41ecb9){if(_0x471b95[_0xe5e6f5(0x4d3)]==='single'&&!_0x471b95[_0xe5e6f5(0x2a3)]){const _0xc601ea=_0x128407+':'+(_0x471b95[_0xe5e6f5(0x41d)]??'');if(!_0x1c3af8[_0xe5e6f5(0x25a)](_0xc601ea))_0x471b95[_0xe5e6f5(0x5f5)]=!![];}}}return{'envs':_0x54586f,'policy':null,'participation':{'participating':_0x2981bb,'total':_0x2a3f42},'source':_0xe5e6f5(0x4e0)};}[_0x100fda(0x208)](){const _0x1b23f1=_0x100fda,_0x469141=_0x1fd865=>{const _0x4ad214=_0x3f34;if(_0x1fd865['state']===_0x4ad214(0x367)||_0x1fd865['state']==='building'||_0x1fd865[_0x4ad214(0x213)]===_0x4ad214(0x5b3))return 0x3;if(_0x1fd865['claimGated'])return 0x1;return 0x2;},_0x134fd2=new Map();for(const _0x1c842b of this[_0x1b23f1(0x214)]()){for(const _0x3ce8ce of _0x1c842b[_0x1b23f1(0x629)]?.[_0x1b23f1(0x68a)]||[]){const _0x3596ff={..._0x3ce8ce,'owner':{'pid':_0x1c842b['pid']??null,'kind':_0x1c842b[_0x1b23f1(0x2a5)]??null,'host':_0x1c842b[_0x1b23f1(0x308)]??null}},_0x3d12a7=_0x3ce8ce[_0x1b23f1(0x4d3)]===_0x1b23f1(0x491)?_0x1b23f1(0x4f7)+(_0x3ce8ce[_0x1b23f1(0x2cb)]??'')+'::'+(_0x3ce8ce[_0x1b23f1(0x41d)]??_0x3ce8ce['type']??_0x3ce8ce['id']):'inst:'+(_0x1c842b[_0x1b23f1(0x23c)]??_0x1c842b[_0x1b23f1(0x656)]??'')+'::'+(_0x3ce8ce[_0x1b23f1(0x2cb)]??'')+'::'+_0x3ce8ce['id'],_0x1d1fed=_0x134fd2['get'](_0x3d12a7);if(!_0x1d1fed||_0x469141(_0x3596ff)>_0x469141(_0x1d1fed))_0x134fd2[_0x1b23f1(0x2d9)](_0x3d12a7,_0x3596ff);}}return[..._0x134fd2[_0x1b23f1(0x33c)]()];}[_0x100fda(0x398)](){const _0x4cdd2f=_0x100fda,_0x31c4eb=Date['now'](),_0xfe57fb=this[_0x4cdd2f(0x214)](),_0xb43b06=_0x4d2ad9=>Math[_0x4cdd2f(0x5f2)](0x0,Math['round']((_0x31c4eb-(_0x4d2ad9[_0x4cdd2f(0x492)]||_0x31c4eb))/0x3e8)),_0x14960a=_0xfe57fb[_0x4cdd2f(0x222)](_0x43b24e=>_0x43b24e['kind']===_0x4cdd2f(0x35b)),_0x496088=_0xfe57fb[_0x4cdd2f(0x200)](_0x32f208=>_0x32f208[_0x4cdd2f(0x2a5)]==='http-server');if(_0x14960a||_0x496088['length'])return{'primary':_0x14960a?{'pid':_0x14960a[_0x4cdd2f(0x478)],'uptime':_0xb43b06(_0x14960a)}:null,'workers':_0x496088['map'](_0x476bc8=>({'pid':_0x476bc8[_0x4cdd2f(0x478)],'uptime':_0xb43b06(_0x476bc8)})),'workersConfigured':_0x14960a?.[_0x4cdd2f(0x4ce)]?.[_0x4cdd2f(0x499)]??_0x496088[_0x4cdd2f(0x502)],'mode':_0x4cdd2f(0x406)};const _0x2bcac6=_0xfe57fb['find'](_0x6a28e0=>_0x6a28e0[_0x4cdd2f(0x2a5)]===_0x4cdd2f(0x60b)||_0x6a28e0['kind']===_0x4cdd2f(0x2fd)||_0x6a28e0['kind']===_0x4cdd2f(0x3ec)),_0x2af22c=_0x2bcac6?{'pid':_0x2bcac6[_0x4cdd2f(0x478)],'uptime':_0xb43b06(_0x2bcac6)}:{'pid':process['pid'],'uptime':Math[_0x4cdd2f(0x5f2)](0x0,Math['round'](process[_0x4cdd2f(0x569)]()))};return{'primary':_0x2af22c,'workers':[_0x2af22c],'workersConfigured':0x1,'mode':'single'};}['nodesView'](){const _0x206ca9=_0x100fda;return this[_0x206ca9(0x1da)]();}['treeView'](){const _0x33d883=_0x100fda,_0x1668b0=new Map();for(const _0xca08c0 of this['_groupByProcess']())_0x1668b0[_0x33d883(0x2d9)](_0xca08c0[_0x33d883(0x656)],{..._0xca08c0,'children':[]});const _0x108354=[];for(const _0x41047e of _0x1668b0[_0x33d883(0x33c)]()){const _0x40de45=_0x41047e[_0x33d883(0x4dd)]?_0x1668b0['get'](_0x41047e[_0x33d883(0x4dd)]):null;if(_0x40de45&&_0x40de45!==_0x41047e)_0x40de45[_0x33d883(0x2d2)][_0x33d883(0x59e)](_0x41047e);else _0x108354[_0x33d883(0x59e)](_0x41047e);}const _0x81cfa6=(_0x3152ba,_0x583c0b)=>_0x3152ba[_0x33d883(0x2a5)]===_0x583c0b['kind']?(_0x3152ba['pid']||0x0)-(_0x583c0b[_0x33d883(0x478)]||0x0):(_0x3152ba['kind']??'')<(_0x583c0b[_0x33d883(0x2a5)]??'')?-0x1:0x1,_0x224caf=_0x3ef62f=>{const _0x20ab20=_0x33d883;_0x3ef62f['sort'](_0x81cfa6);for(const _0x4fe03e of _0x3ef62f)if(_0x4fe03e[_0x20ab20(0x2d2)]['length'])_0x224caf(_0x4fe03e[_0x20ab20(0x2d2)]);};return _0x224caf(_0x108354),_0x108354;}['getProcess'](_0x2c9bec){const _0x4992be=_0x100fda;return this[_0x4992be(0x1da)]()['find'](_0xea27c9=>_0xea27c9[_0x4992be(0x656)]===_0x2c9bec)??null;}['_groupByProcess'](_0x4a0b58=Date['now']()){const _0x569fc5=_0x100fda,_0x2eae59=new Map();for(const _0x4d56b3 of this[_0x569fc5(0x214)]()){const _0x4dd0aa=_0x339da7(_0x4d56b3);let _0x20f74b=_0x2eae59[_0x569fc5(0x64f)](_0x4dd0aa);!_0x20f74b&&(_0x20f74b={'processKey':_0x4dd0aa,'nodeKey':_0x4dd0aa,'pid':_0x4d56b3['pid'],'ppid':_0x4d56b3[_0x569fc5(0x5cb)]??null,'host':_0x4d56b3[_0x569fc5(0x308)]??null,'kind':_0x4d56b3[_0x569fc5(0x2a5)],'role':null,'supervisorKey':_0x4d56b3[_0x569fc5(0x4dd)]??null,'slot':_0x4d56b3[_0x569fc5(0x606)]??null,'slotKey':_0x4d56b3[_0x569fc5(0x572)]??null,'caps':_0x4d56b3['caps']??null,'lifecycle':_0x4d56b3[_0x569fc5(0x545)]??null,'uptime':Math[_0x569fc5(0x5f2)](0x0,Math['round']((_0x4a0b58-(_0x4d56b3[_0x569fc5(0x492)]||_0x4a0b58))/0x3e8)),'startedAt':_0x4d56b3[_0x569fc5(0x492)]??null,'meta':_0x4d56b3[_0x569fc5(0x4ce)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x2eae59[_0x569fc5(0x2d9)](_0x4dd0aa,_0x20f74b));_0x20f74b['instances'][_0x569fc5(0x59e)]({'instanceId':_0x4d56b3[_0x569fc5(0x253)]??null,'role':_0x4d56b3[_0x569fc5(0x5b6)]??null,'listenAddr':_0x4d56b3[_0x569fc5(0x5d6)]??null,'lifecycle':_0x4d56b3[_0x569fc5(0x545)]??null,'processing':_0x4d56b3[_0x569fc5(0x629)]??null});if(!_0x20f74b[_0x569fc5(0x5b6)]&&_0x4d56b3['role'])_0x20f74b[_0x569fc5(0x5b6)]=_0x4d56b3['role'];if(!_0x20f74b[_0x569fc5(0x5d6)]&&_0x4d56b3[_0x569fc5(0x5d6)])_0x20f74b[_0x569fc5(0x5d6)]=_0x4d56b3[_0x569fc5(0x5d6)];if(!_0x20f74b[_0x569fc5(0x629)]&&_0x4d56b3['processing'])_0x20f74b[_0x569fc5(0x629)]=_0x4d56b3[_0x569fc5(0x629)];if(!_0x20f74b[_0x569fc5(0x46a)]&&_0x4d56b3[_0x569fc5(0x46a)])_0x20f74b['engines']=_0x4d56b3[_0x569fc5(0x46a)];if(!_0x20f74b['singletonClaims']&&_0x4d56b3[_0x569fc5(0x2b0)])_0x20f74b[_0x569fc5(0x2b0)]=_0x4d56b3[_0x569fc5(0x2b0)];if(_0x20f74b[_0x569fc5(0x579)]==null&&_0x4d56b3[_0x569fc5(0x579)])_0x20f74b[_0x569fc5(0x579)]=_0x4d56b3[_0x569fc5(0x579)];if(_0x4d56b3['stats']&&(!_0x20f74b[_0x569fc5(0x4b9)]||(_0x4d56b3[_0x569fc5(0x4b9)]['at']??0x0)>(_0x20f74b[_0x569fc5(0x4b9)]['at']??0x0)))_0x20f74b[_0x569fc5(0x4b9)]=_0x4d56b3[_0x569fc5(0x4b9)];}return[..._0x2eae59[_0x569fc5(0x33c)]()];}[_0x100fda(0x4df)](){const _0x2e92b4=_0x100fda,_0x4d93f9=[],_0x3a19dd={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x2cd142 of this['_groupByProcess']()){_0x4d93f9[_0x2e92b4(0x59e)]({'processKey':_0x2cd142[_0x2e92b4(0x656)],'kind':_0x2cd142[_0x2e92b4(0x2a5)],'pid':_0x2cd142[_0x2e92b4(0x478)],'supervisorKey':_0x2cd142[_0x2e92b4(0x4dd)],'meta':_0x2cd142[_0x2e92b4(0x4ce)]??null,'uptime':_0x2cd142['uptime'],'stats':_0x2cd142['stats']??null}),_0x3a19dd[_0x2e92b4(0x407)]++;if(_0x2cd142[_0x2e92b4(0x4b9)]){_0x3a19dd[_0x2e92b4(0x21d)]+=_0x2cd142[_0x2e92b4(0x4b9)][_0x2e92b4(0x21d)]||0x0,_0x3a19dd[_0x2e92b4(0x53e)]+=(_0x2cd142[_0x2e92b4(0x4b9)]['heapUsed']||0x0)+(_0x2cd142[_0x2e92b4(0x4b9)]['threads']?.[_0x2e92b4(0x53e)]||0x0);const _0x232ebd=_0x2cd142['stats']['threads'];_0x232ebd&&(_0x3a19dd[_0x2e92b4(0x1ca)]['count']+=_0x232ebd[_0x2e92b4(0x29e)]||0x0,_0x3a19dd[_0x2e92b4(0x1ca)]['sandbox']+=_0x232ebd[_0x2e92b4(0x281)]||0x0,_0x3a19dd[_0x2e92b4(0x1ca)][_0x2e92b4(0x401)]+=_0x232ebd['busy']||0x0);}}return{'totals':_0x3a19dd,'nodes':_0x4d93f9};}async[_0x100fda(0x43c)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x5dc277=_0x100fda;this[_0x5dc277(0x3e3)]=this[_0x5dc277(0x3e3)]||!!writer,this['_isReader']=this[_0x5dc277(0x494)]||!!reader,this[_0x5dc277(0x544)]=kind||this['_kind']||(_0x39c47d[_0x5dc277(0x34d)]?_0x5dc277(0x345):'cli'),this[_0x5dc277(0x534)]=supervisorKey??this[_0x5dc277(0x534)],this[_0x5dc277(0x649)]=listenAddr??this[_0x5dc277(0x649)],this['_ensureDesired'](),await this['_migrateVocab']();if(!writer&&!reader)return null;if(!this['_statusEnv']){const _0x14a35d=await this[_0x5dc277(0x5d7)][_0x5dc277(0x68f)](_0x51ea91,{'sync':![],'durability':_0x5dc277(0x661)});if(!_0x14a35d['hasType'](_0x1ce828))await _0x14a35d[_0x5dc277(0x28b)](_0x1ce828);this[_0x5dc277(0x56d)]=_0x14a35d;}return this['_statusEnv'];}['_nodeDb'](){const _0xd1150=_0x100fda;return this[_0xd1150(0x576)]!==this[_0xd1150(0x56d)]&&(this['_nodeDbFor']=this[_0xd1150(0x56d)],this[_0xd1150(0x479)]=this[_0xd1150(0x56d)][_0xd1150(0x2d3)](_0x1ce828)[_0xd1150(0x610)]),this[_0xd1150(0x479)];}[_0x100fda(0x306)](_0x2f657d){const _0x219cd8=_0x100fda;if(_0x2ac7c5)return this['_nodeDb']()[_0x219cd8(0x37b)](_0x2f657d[_0x219cd8(0x23c)],_0x2f657d,0x1);const _0x1d7a5f=this[_0x219cd8(0x332)]()['put'](_0x2f657d[_0x219cd8(0x23c)],_0x2f657d,0x1);if(_0x1d7a5f&&typeof _0x1d7a5f[_0x219cd8(0x45d)]===_0x219cd8(0x59d))_0x1d7a5f['then'](undefined,()=>{});return _0x1d7a5f;}[_0x100fda(0x637)](_0x11ed99){const _0x459974=_0x100fda;return this[_0x459974(0x332)]()[_0x459974(0x37b)](_0x11ed99['nodeKey'],_0x11ed99,0x1);}['_removeRowAsync'](_0x57245e){const _0x52a109=_0x100fda;if(_0x2ac7c5)try{return this[_0x52a109(0x332)]()[_0x52a109(0x611)](_0x57245e);}catch{return![];}const _0x3844fa=this[_0x52a109(0x332)]()['remove'](_0x57245e);if(_0x3844fa&&typeof _0x3844fa[_0x52a109(0x45d)]===_0x52a109(0x59d))_0x3844fa['then'](undefined,()=>{});return _0x3844fa;}async[_0x100fda(0x446)](_0xb852c9){const _0x308a32=_0x100fda;if(!this[_0x308a32(0x56d)]||!this[_0x308a32(0x3e3)]||!_0xb852c9?.[_0x308a32(0x23c)])return;return this['_putRowAsync'](_0xb852c9);}async[_0x100fda(0x4f6)](_0x30443f){const _0xf1ac1=_0x100fda;if(!this['_statusEnv']||!this[_0xf1ac1(0x3e3)]||!_0x30443f)return;const _0x4219f6=_0x30443f[_0xf1ac1(0x39f)]('#'),_0x2f2a90=[];for(const {key:_0x16b65d}of this['_statusEnv'][_0xf1ac1(0x416)](_0x1ce828)){if(_0x16b65d===_0x30443f||!_0x4219f6&&typeof _0x16b65d===_0xf1ac1(0x58b)&&_0x16b65d[_0xf1ac1(0x2f6)](_0x30443f+'#'))_0x2f2a90['push'](_0x16b65d);}for(const _0x8834f0 of _0x2f2a90){try{this[_0xf1ac1(0x332)]()[_0xf1ac1(0x611)](_0x8834f0);}catch{}}}[_0x100fda(0x50e)](_0x1ed612){const _0x59d6a2=_0x100fda;if(typeof _0x1ed612?.['pid']!==_0x59d6a2(0x57c))return![];if(_0x1ed612[_0x59d6a2(0x308)]!==_0x2735c4['hostname']())return![];if(_0x1ed612[_0x59d6a2(0x478)]===process[_0x59d6a2(0x478)])return![];if(_0x1ed612['expiresAt']!=null&&_0x1ed612[_0x59d6a2(0x642)]<Date['now']()-_0x433c66)return!![];try{return process['kill'](_0x1ed612[_0x59d6a2(0x478)],0x0),![];}catch(_0x109ce9){return _0x109ce9[_0x59d6a2(0x30f)]===_0x59d6a2(0x20a);}}[_0x100fda(0x214)](){const _0x5aeb16=_0x100fda;if(!this['_statusEnv'])return[];try{this[_0x5aeb16(0x56d)]['db']?.[_0x5aeb16(0x542)]?.();}catch{}const _0x17f099=Date[_0x5aeb16(0x387)](),_0x1b4139=_0x2735c4[_0x5aeb16(0x252)](),_0x2b27e6=[];for(const {value:_0x529f7f}of this['_statusEnv'][_0x5aeb16(0x416)](_0x1ce828)){if(!_0x529f7f)continue;let _0x293b5f=null;_0x529f7f[_0x5aeb16(0x308)]===_0x1b4139&&typeof _0x529f7f[_0x5aeb16(0x478)]===_0x5aeb16(0x57c)&&(_0x293b5f=!this[_0x5aeb16(0x50e)](_0x529f7f));if(_0x293b5f===![])continue;const _0x50e559=_0x529f7f[_0x5aeb16(0x642)]==null||_0x529f7f[_0x5aeb16(0x642)]>=_0x17f099;if(_0x293b5f===!![]||_0x50e559)_0x2b27e6[_0x5aeb16(0x59e)](_0x529f7f);}return _0x2b27e6;}async['reap'](_0x3d682d=0x0){const _0x14fc86=_0x100fda;if(!this[_0x14fc86(0x56d)]||!this[_0x14fc86(0x3e3)])return;const _0x39398e=Date['now']()-_0x3d682d,_0x262728=new Set(),_0x4837f2=[],_0x36a9b9=_0x2735c4['hostname']();for(const {key:_0x4cbcbb,value:_0x5c4215}of this[_0x14fc86(0x56d)][_0x14fc86(0x416)](_0x1ce828)){if(!_0x5c4215)continue;const _0x169ba0=_0x5c4215[_0x14fc86(0x308)]===_0x36a9b9&&typeof _0x5c4215['pid']===_0x14fc86(0x57c),_0x37e89e=_0x169ba0?this[_0x14fc86(0x50e)](_0x5c4215):_0x5c4215[_0x14fc86(0x642)]!=null&&_0x5c4215[_0x14fc86(0x642)]<_0x39398e;if(_0x37e89e)_0x4837f2[_0x14fc86(0x59e)](_0x4cbcbb);else _0x262728['add'](_0x339da7(_0x5c4215)??_0x4cbcbb);}for(const _0x1e3bff of _0x4837f2)this['_removeRowAsync'](_0x1e3bff);if(this[_0x14fc86(0x588)]()){const _0x3adc60=[];for(const {key:_0xb98868}of this[_0x14fc86(0x5b9)](_0x14fc86(0x4f3))){if(!_0x262728[_0x14fc86(0x25a)](_0xb98868)){if(_0x2ac7c5)try{this[_0x14fc86(0x2bc)]['removeSync'](_0x14fc86(0x36d)+_0xb98868);}catch{}else _0x3adc60[_0x14fc86(0x59e)](this[_0x14fc86(0x2bc)][_0x14fc86(0x66c)]('node/'+_0xb98868));}}if(_0x3adc60[_0x14fc86(0x502)])await Promise['allSettled'](_0x3adc60);}}[_0x100fda(0x315)](_0x131c6b=null){const _0x240059=_0x100fda;if(this[_0x240059(0x498)])return;if(!this['_isWriter']||!this['_statusEnv']){this[_0x240059(0x5d7)]?.[_0x240059(0x4a2)]?.['warn']?.(_0x240059(0x226)+this[_0x240059(0x3e3)]+_0x240059(0x477)+!!this[_0x240059(0x56d)]+_0x240059(0x310),{'feature':_0x240059(0x407)});return;}this['_onTick']=_0x131c6b,this[_0x240059(0x284)]=()=>this[_0x240059(0x30a)]();for(const _0x22be71 of _0x3d098c)this[_0x240059(0x5d7)]['events']['on'](_0x22be71,this[_0x240059(0x284)]);this['_publishNow']();const _0x2ce9fd=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x3d13d6;this[_0x240059(0x498)]=setInterval(()=>{const _0x2e0960=_0x240059;if(this[_0x2e0960(0x2e9)])try{this['_onTick']();}catch{}this['_publishNow'](),this[_0x2e0960(0x52f)]()[_0x2e0960(0x28f)](()=>{});},_0x2ce9fd);if(this['_hbTimer'][_0x240059(0x30b)])this[_0x240059(0x498)][_0x240059(0x30b)]();}[_0x100fda(0x30a)](){const _0x470c13=_0x100fda;if(!this[_0x470c13(0x3e3)]||!this['_statusEnv'])return;if(Date[_0x470c13(0x387)]()-this[_0x470c13(0x348)]<_0x1d5641)return;this[_0x470c13(0x600)]();}[_0x100fda(0x600)](){const _0x4e7359=_0x100fda;if(!this['_isWriter']||!this[_0x4e7359(0x56d)])return;this['_lastPublishAt']=Date[_0x4e7359(0x387)]();try{const _0x44447c=[this[_0x4e7359(0x39c)]()];for(const _0x15ae0f of this[_0x4e7359(0x259)]['values']())_0x44447c[_0x4e7359(0x59e)](this[_0x4e7359(0x204)](_0x15ae0f));const _0x23bf58=_0x3fefd1['enabled']?_0x3fefd1[_0x4e7359(0x387)]():0x0;for(const _0x183915 of _0x44447c){try{this[_0x4e7359(0x637)](_0x183915),this[_0x4e7359(0x413)]=![];}catch(_0x13192d){!this[_0x4e7359(0x413)]&&(this[_0x4e7359(0x413)]=!![],this[_0x4e7359(0x5d7)]?.['log']?.[_0x4e7359(0x4ea)]?.(_0x4e7359(0x20c)+_0x13192d['message'],{'feature':_0x4e7359(0x407)}));}}if(_0x3fefd1[_0x4e7359(0x65c)])_0x3fefd1[_0x4e7359(0x303)]('registry-publish',_0x3fefd1['now']()-_0x23bf58,_0x4e7359(0x40b)+_0x44447c['length']+_0x4e7359(0x672));}catch(_0x47d907){!this[_0x4e7359(0x413)]&&(this[_0x4e7359(0x413)]=!![],this[_0x4e7359(0x5d7)]?.['log']?.[_0x4e7359(0x4ea)]?.('registry\x20publish\x20failing:\x20'+_0x47d907[_0x4e7359(0x66f)],{'feature':_0x4e7359(0x407)}));}}async['stopHeartbeat'](){const _0xc1ee26=_0x100fda;if(this['_onProcEvent']){for(const _0x29c33e of _0x3d098c){try{this[_0xc1ee26(0x5d7)]['events'][_0xc1ee26(0x5e8)](_0x29c33e,this[_0xc1ee26(0x284)]);}catch{}}this[_0xc1ee26(0x284)]=null;}this[_0xc1ee26(0x498)]&&(clearInterval(this['_hbTimer']),this[_0xc1ee26(0x498)]=null);try{if(this[_0xc1ee26(0x56d)]&&this[_0xc1ee26(0x3e3)])await this['removeNode'](this['_rowKey']);}catch{}}async[_0x100fda(0x34a)](){const _0xb18d89=_0x100fda;if(!this[_0xb18d89(0x56d)]||!this[_0xb18d89(0x3e3)])return;try{await this[_0xb18d89(0x4f6)](this[_0xb18d89(0x618)]);}catch{}try{const _0x3e152f=[];for(const {value:_0x1ba777}of this['_statusEnv'][_0xb18d89(0x416)](_0x1ce828)){if(_0x1ba777?.[_0xb18d89(0x5cb)]===process[_0xb18d89(0x478)]&&_0x1ba777[_0xb18d89(0x23c)])_0x3e152f[_0xb18d89(0x59e)](_0x1ba777['nodeKey']);}for(const _0x47f401 of _0x3e152f){try{await this[_0xb18d89(0x4f6)](_0x47f401);}catch{}}}catch{}}async[_0x100fda(0x302)](){const _0x5daaf7=_0x100fda;return this['putNode'](this[_0x5daaf7(0x39c)]());}async[_0x100fda(0x409)](_0x432a61){const _0x15ee25=_0x100fda;if(!this[_0x15ee25(0x56d)]||!this['_isWriter'])return;return this[_0x15ee25(0x446)](this[_0x15ee25(0x204)](_0x432a61));}['_buildChildRow']({pid:_0x305739,startedAt:_0x2d9f11,kind:_0x1e4d55,supervisorKey:_0x245738,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x100fda(0x547),meta:meta=null,stats:stats=null}){const _0x5ddcad=_0x100fda,_0x5410fb=Date[_0x5ddcad(0x387)](),_0x57ac36=_0x15e52c(_0x305739,_0x2d9f11);return{'nodeKey':_0x2a77f7(_0x57ac36,'0'),'processKey':_0x57ac36,'instanceId':'0','pid':_0x305739,'startedAt':_0x2d9f11,'ppid':process['pid'],'host':_0x2735c4[_0x5ddcad(0x252)](),'supervisorKey':_0x245738,'slot':slot,'slotKey':slotKey,'kind':_0x1e4d55,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x5410fb,'expiresAt':_0x5410fb+_0x2c592d,'caps':this['_caps'](_0x1e4d55,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x100fda(0x1fc)](_0x494315){const _0x2aaee8=_0x100fda;if(!_0x494315?.['pid'])return null;const _0x227e40=_0x15e52c(_0x494315[_0x2aaee8(0x478)],_0x494315[_0x2aaee8(0x492)]);this[_0x2aaee8(0x259)]['set'](_0x227e40,{..._0x494315,'supervisorKey':_0x494315['supervisorKey']??this[_0x2aaee8(0x2b8)]});if(this[_0x2aaee8(0x3e3)])await this[_0x2aaee8(0x409)](this['_children'][_0x2aaee8(0x64f)](_0x227e40))[_0x2aaee8(0x28f)]?.(()=>{});return _0x227e40;}[_0x100fda(0x49c)](_0x29fe91){const _0x404a47=_0x100fda;if(!_0x29fe91)return;return this['_children'][_0x404a47(0x2e2)](_0x29fe91),this[_0x404a47(0x4f6)](_0x29fe91);}[_0x100fda(0x509)](){const _0x2e26b5=_0x100fda,_0x5ca2ea=Date[_0x2e26b5(0x387)](),_0x1a2275=process[_0x2e26b5(0x664)](),_0x5989a9=(_0x5ca2ea-this[_0x2e26b5(0x2a4)])*0x3e8;if(_0x5989a9>=0x3d090){const _0x5ec44d=_0x1a2275[_0x2e26b5(0x652)]-this[_0x2e26b5(0x5a4)][_0x2e26b5(0x652)]+(_0x1a2275[_0x2e26b5(0x27c)]-this[_0x2e26b5(0x5a4)][_0x2e26b5(0x27c)]),_0x29f680=_0x2735c4[_0x2e26b5(0x58e)]()[_0x2e26b5(0x502)]||0x1;this[_0x2e26b5(0x5b2)]=Math[_0x2e26b5(0x52a)](0x64,Math[_0x2e26b5(0x3ef)](_0x5ec44d/(_0x5989a9*_0x29f680)*0x64)),this[_0x2e26b5(0x285)]=Math[_0x2e26b5(0x3ef)](_0x5989a9/0x3e8),this[_0x2e26b5(0x5a4)]=_0x1a2275,this[_0x2e26b5(0x2a4)]=_0x5ca2ea;}const _0x781d5c=process[_0x2e26b5(0x1fe)](),_0xd3a775=this[_0x2e26b5(0x595)][_0x2e26b5(0x475)];let _0x5e13e4=0x0;if(_0xd3a775>0x0){const _0xb442ed=[this['okdb'],...this[_0x2e26b5(0x5d7)][_0x2e26b5(0x4f4)]?.['values']?.()??[]];for(const _0x5bff69 of _0xb442ed){const _0x364498=_0x5bff69[_0x2e26b5(0x623)]?.[_0x2e26b5(0x2ab)];if(_0x364498)_0x5e13e4+=_0x364498[_0x2e26b5(0x67e)][_0x2e26b5(0x401)];}}let _0x45740d=null;const _0xaf4567=_0xd3a775;if(_0xaf4567>0x0){let _0x2debdb=0x0;for(const _0x12ba41 of this[_0x2e26b5(0x595)][_0x2e26b5(0x33c)]())_0x2debdb+=_0x12ba41[_0x2e26b5(0x53e)]||0x0;_0x45740d={'count':_0xaf4567,'heapUsed':_0x2debdb,'sandbox':_0xd3a775,'busy':_0x5e13e4};}return{'rss':_0x781d5c['rss'],'heapUsed':_0x781d5c['heapUsed'],'heapTotal':_0x781d5c[_0x2e26b5(0x512)],'external':_0x781d5c['external'],'cpuPct':this['_lastCpuPct'],'cpuWindowMs':this[_0x2e26b5(0x285)]??null,'threads':_0x45740d,'at':_0x5ca2ea};}[_0x100fda(0x55e)](_0x2c79c6,_0x5ac382){const _0x200cb4=_0x100fda;if(!_0x2c79c6||!_0x5ac382)return;this[_0x200cb4(0x595)][_0x200cb4(0x2d9)](_0x2c79c6,_0x5ac382);}[_0x100fda(0x22a)](_0x285e4c){const _0x9c3f6b=_0x100fda;this['_threadStats'][_0x9c3f6b(0x2e2)](_0x285e4c);}['updateSupervisedChildStats'](_0xd23366,_0x3e131c,_0x203fba=undefined){const _0x91300=_0x100fda,_0x3c9998=this[_0x91300(0x259)][_0x91300(0x64f)](_0xd23366);if(!_0x3c9998||!_0x3e131c)return;if(_0x203fba!==undefined)_0x3c9998[_0x91300(0x629)]=_0x203fba;_0x3c9998[_0x91300(0x4b9)]={'rss':_0x3e131c[_0x91300(0x21d)]??null,'heapUsed':_0x3e131c[_0x91300(0x53e)]??null,'heapTotal':_0x3e131c[_0x91300(0x512)]??null,'external':_0x3e131c[_0x91300(0x510)]??null,'cpuPct':_0x3e131c[_0x91300(0x668)]??null,'cpuWindowMs':_0x3e131c['cpuWindowMs']??null,'threads':_0x3e131c[_0x91300(0x1ca)]??null,'claims':_0x3e131c['claims']??null,'envsOpen':_0x3e131c[_0x91300(0x56c)]??null,'at':Date['now']()};}['_buildOwnRow'](){const _0x41acb7=_0x100fda,_0x72e06c=Date[_0x41acb7(0x387)](),_0x42c908=this[_0x41acb7(0x5d7)][_0x41acb7(0x639)]||{},_0x5e1506=this[_0x41acb7(0x544)]||_0x41acb7(0x60b);return{'nodeKey':this[_0x41acb7(0x618)],'processKey':this[_0x41acb7(0x2b8)],'instanceId':this[_0x41acb7(0x414)],'pid':process[_0x41acb7(0x478)],'startedAt':this[_0x41acb7(0x50d)],'instanceStartedAt':this[_0x41acb7(0x5a9)],'ppid':typeof process['ppid']===_0x41acb7(0x57c)?process[_0x41acb7(0x5cb)]:null,'host':_0x2735c4['hostname'](),'supervisorKey':this[_0x41acb7(0x534)]??null,'kind':_0x5e1506,'role':{'engines':!!_0x42c908[_0x41acb7(0x46a)],'processors':!!_0x42c908['processors'],'compaction':_0x42c908[_0x41acb7(0x405)],'http':_0x42c908['http']},'listenAddr':this[_0x41acb7(0x649)]??null,'heartbeatAt':_0x72e06c,'expiresAt':_0x72e06c+_0x2c592d,'caps':this[_0x41acb7(0x3e6)](_0x5e1506,_0x42c908),'lifecycle':{'state':_0x41acb7(0x547),'desiredVersionApplied':null},'meta':{...this['_ownMeta']},'processing':_0x42c908[_0x41acb7(0x68a)]?this['_buildProcessingFacet']():null,'engines':_0x42c908[_0x41acb7(0x46a)]?[...this['okdb']['_servingEngines']??[]]:null,'singletonClaims':this['_collectSingletonClaims'](),'stats':this[_0x41acb7(0x509)](),'writers':this[_0x41acb7(0x1cd)]()};}[_0x100fda(0x1cd)](){const _0x1bb636=_0x100fda,_0x1b4bd6={};try{for(const [_0x275027,_0x50c9ba]of this['okdb'][_0x1bb636(0x4f4)]){try{const _0x30850c=_0x50c9ba['writerStatus']?.();if(!_0x30850c)continue;if(!_0x30850c['depth']&&!_0x30850c[_0x1bb636(0x3a6)]&&!(_0x30850c['parkedNow']??0x0)&&!_0x30850c[_0x1bb636(0x4b5)])continue;_0x1b4bd6[_0x275027]={'depth':_0x30850c['depth'],'oldestPendingMs':_0x30850c[_0x1bb636(0x283)],'committed':_0x30850c[_0x1bb636(0x3a6)],'commitsPerSec':_0x30850c[_0x1bb636(0x5ae)],'commitP99Ms':_0x30850c['commitP99Ms'],'parkedNow':_0x30850c[_0x1bb636(0x659)]??0x0,'draining':!!_0x30850c[_0x1bb636(0x4b5)]};}catch{}}}catch{}return Object[_0x1bb636(0x577)](_0x1b4bd6)[_0x1bb636(0x502)]?_0x1b4bd6:null;}['_collectSingletonClaims'](){const _0x4b9af2=_0x100fda,_0x36e186=process['pid'],_0xdbc87=Date[_0x4b9af2(0x387)](),_0xa908e0=_0x207416=>{const _0x4592d9=_0x4b9af2;if(!_0x207416)return[];const _0x20dc53=[];try{for(const {id:_0x4e5ad6,entry:_0x554e3d}of _0x207416[_0x4592d9(0x663)]()){if(_0x554e3d?.[_0x4592d9(0x1cf)]?.['pid']!==_0x36e186)continue;const _0x46d8c1=_0x554e3d[_0x4592d9(0x4ec)]??_0x554e3d[_0x4592d9(0x522)]??0x0;if(_0x46d8c1+(_0x554e3d['ttlMs']??0x0)<_0xdbc87)continue;_0x20dc53[_0x4592d9(0x59e)](_0x4e5ad6);}}catch{}return _0x20dc53;},_0x245e11=_0xa908e0(this[_0x4b9af2(0x1e5)]('compact')),_0x2aa52c=_0xa908e0(this[_0x4b9af2(0x1e5)](_0x4b9af2(0x4fa)));if(!_0x245e11[_0x4b9af2(0x502)]&&!_0x2aa52c[_0x4b9af2(0x502)])return null;return{'compact':_0x245e11,'replicate':_0x2aa52c};}[_0x100fda(0x1e5)](_0x32021d){const _0x48e5b9=_0x100fda;if(!this['okdb']?.['_rootDb'])return null;if(!this[_0x48e5b9(0x601)])this['_singletonLocks']=new Map();let _0x2d3b54=this[_0x48e5b9(0x601)][_0x48e5b9(0x64f)](_0x32021d);if(!_0x2d3b54)try{_0x2d3b54=new _0x19966d(this['okdb'][_0x48e5b9(0x2be)],{'namespace':_0x32021d}),this[_0x48e5b9(0x601)][_0x48e5b9(0x2d9)](_0x32021d,_0x2d3b54);}catch{return null;}return _0x2d3b54;}[_0x100fda(0x593)](){const _0x3b28a3=_0x100fda,_0x2dafbc=[];try{for(const [_0x168f56,_0x4144e8]of this[_0x3b28a3(0x5d7)][_0x3b28a3(0x4f4)]){if(_0x168f56[_0x3b28a3(0x2f6)]('~'))continue;for(const _0x2402d5 of _0x4144e8[_0x3b28a3(0x5db)][_0x3b28a3(0x23a)]())_0x2dafbc[_0x3b28a3(0x59e)]({..._0x2402d5,'env':_0x168f56});}}catch{}return{'participate':this['okdb'][_0x3b28a3(0x68a)]?.[_0x3b28a3(0x5fb)]??![],'processors':_0x2dafbc};}['_ensureDesired'](){const _0x277585=_0x100fda;if(this[_0x277585(0x2bc)])return!![];const _0x7e8903=this[_0x277585(0x5d7)][_0x277585(0x2be)];if(!_0x7e8903)return![];return this[_0x277585(0x2bc)]=_0x7e8903[_0x277585(0x262)](_0x5f0118,{'dupSort':![]}),this[_0x277585(0x1c5)]=_0x7e8903[_0x277585(0x262)](_0x5a332d,{'dupSort':![]}),!![];}async[_0x100fda(0x2ac)](){const _0x3ff710=_0x100fda;if(!this[_0x3ff710(0x588)]())return;const _0x40398a=_0x3ff710(0x290),_0xd789ab=0x1,_0x376645=this['_desired'][_0x3ff710(0x64f)](_0x40398a)??0x0;if(_0x376645>=_0xd789ab)return;const _0x39e10c=_0x1a6154=>{const _0x41d0fd=_0x3ff710;if(_0x1a6154===_0x41d0fd(0x55f))return _0x41d0fd(0x491);if(_0x1a6154===_0x41d0fd(0x44e))return'fanout';return _0x1a6154;};await this[_0x3ff710(0x5d7)]['_systemEnv']['_writer']['transaction'](()=>{const _0x5512a4=_0x3ff710;for(const _0x1df09b of[_0x5512a4(0x3da),_0x5512a4(0x657)]){for(const {key:_0x17f1ff,value:_0x341b56}of this[_0x5512a4(0x2bc)][_0x5512a4(0x416)]({'start':_0x1df09b,'end':_0x1df09b+'ÿ'})){if(typeof _0x17f1ff!==_0x5512a4(0x58b)||!_0x17f1ff[_0x5512a4(0x2f6)](_0x1df09b))break;const _0xd4f095=_0x39e10c(_0x341b56[_0x5512a4(0x4d3)]);if(_0xd4f095!==_0x341b56[_0x5512a4(0x4d3)])this['_desired']['put'](_0x17f1ff,{..._0x341b56,'mode':_0xd4f095});}}this[_0x5512a4(0x2bc)][_0x5512a4(0x644)](_0x40398a,_0xd789ab);});}[_0x100fda(0x4fc)](){const _0x28cbdb=_0x100fda;return!!this[_0x28cbdb(0x2bc)];}[_0x100fda(0x5a8)](_0x303e91,_0x37c8d5){const _0x1c0f0a=_0x100fda;if(!this[_0x1c0f0a(0x588)]())return null;const _0x2f927d=_0x303e91+'/'+_0x37c8d5;return this['_refreshDesiredSnapshot'](),this[_0x1c0f0a(0x465)][_0x1c0f0a(0x64f)](_0x2f927d)??this[_0x1c0f0a(0x2bc)]['get'](_0x2f927d)??null;}['_refreshDesiredSnapshot'](){const _0x30315a=_0x100fda;if(!_0x2ac7c5)return;try{this[_0x30315a(0x5d7)][_0x30315a(0x53b)]?.['db']?.[_0x30315a(0x542)]?.();}catch{}}async[_0x100fda(0x321)](_0x11a13e,_0x1e6994,_0x28fab4){const _0x17d89c=_0x100fda;if(!this[_0x17d89c(0x588)]())return null;const _0x13c07a=_0x11a13e+'/'+_0x1e6994;this[_0x17d89c(0x233)]();const _0x46a1ce=this[_0x17d89c(0x465)]['get'](_0x13c07a)??this[_0x17d89c(0x2bc)]['get'](_0x13c07a)??{'version':0x0},_0xa24733=(_0x46a1ce[_0x17d89c(0x292)]||0x0)+0x1,_0x4b05ed={..._0x46a1ce,..._0x28fab4,'version':_0xa24733,'updatedAt':Date['now']()};this[_0x17d89c(0x465)]['set'](_0x13c07a,_0x4b05ed);try{await this[_0x17d89c(0x5d7)][_0x17d89c(0x53b)][_0x17d89c(0x4ef)]['transaction'](()=>{const _0x567505=_0x17d89c;this[_0x567505(0x2bc)][_0x567505(0x644)](_0x13c07a,_0x4b05ed);});}finally{if(this[_0x17d89c(0x465)][_0x17d89c(0x64f)](_0x13c07a)===_0x4b05ed)this[_0x17d89c(0x465)][_0x17d89c(0x2e2)](_0x13c07a);}return _0xa24733;}[_0x100fda(0x5b9)](_0x116548){const _0x4dbd63=_0x100fda;if(!this[_0x4dbd63(0x588)]())return[];this[_0x4dbd63(0x233)]();const _0x5cf9c2=_0x116548+'/',_0x5815c4=[];for(const {key:_0x5dcd07,value:_0x2ed93b}of this[_0x4dbd63(0x2bc)]['getRange']({'start':_0x5cf9c2,'end':_0x5cf9c2+'ÿ'})){if(typeof _0x5dcd07!==_0x4dbd63(0x58b)||!_0x5dcd07['startsWith'](_0x5cf9c2))break;_0x5815c4[_0x4dbd63(0x59e)]({'key':_0x5dcd07[_0x4dbd63(0x2a1)](_0x5cf9c2[_0x4dbd63(0x502)]),'value':_0x2ed93b});}return _0x5815c4;}[_0x100fda(0x535)](_0x27ed6e){const _0x4f3741=_0x100fda;if(!this[_0x4f3741(0x588)]())return null;return this[_0x4f3741(0x1c5)][_0x4f3741(0x64f)](_0x27ed6e)??null;}async[_0x100fda(0x517)](_0x12539e,_0x3b18cc,_0x180815={}){const _0x3d6e3f=_0x100fda;if(!this[_0x3d6e3f(0x588)]())return null;let _0x10ed36;return await this['okdb'][_0x3d6e3f(0x53b)][_0x3d6e3f(0x4ef)][_0x3d6e3f(0x65e)](()=>{const _0x5ba96a=_0x3d6e3f,_0x5496fd=this[_0x5ba96a(0x1c5)][_0x5ba96a(0x64f)](_0x12539e)||{'epoch':0x0};_0x10ed36=(_0x5496fd[_0x5ba96a(0x5e9)]||0x0)+0x1,this[_0x5ba96a(0x1c5)][_0x5ba96a(0x644)](_0x12539e,{..._0x5496fd,..._0x180815,'cmd':_0x3b18cc,'epoch':_0x10ed36,'updatedAt':Date[_0x5ba96a(0x387)]()});}),_0x10ed36;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x128a85,'nodeKey':_0x15e52c,'logicalKey':_0x34c4e6,'slotKey':_0x15b115,'PROCESS_ENV':_0x51ea91,'NODE_TYPE':_0x1ce828},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x17ee79=_0x5dddf1;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x42a091=require$$0$6,{EVENTS:_0x30e933,CHANGE_ACTIONS:_0x3abcc5}=requireOkdbEnums(),{LOOP:_0x1dd4c8}=requireOkdbLoopMonitor(),_0xd4f477=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x443b20=0x5,_0xdba9f2=0x2710;class _0x3c3683 extends _0x42a091{constructor(_0x5e534b,_0x440f04={}){const _0x20f051=_0x3f34;super(),this[_0x20f051(0x5d7)]=_0x5e534b,this[_0x20f051(0x3cb)]=_0x440f04[_0x20f051(0x557)]??_0xd4f477,this[_0x20f051(0x2d5)]=_0x440f04['flushDebounce']??_0x443b20,this[_0x20f051(0x3a5)]=_0x440f04[_0x20f051(0x62b)]??_0xdba9f2,this[_0x20f051(0x2cd)]=![],this['_cursors']=new Map(),this[_0x20f051(0x201)]=new Map(),this['_pending']=new Map(),this['_flushTimer']=null,this[_0x20f051(0x24e)]=![],this[_0x20f051(0x22d)]=new Set(),this[_0x20f051(0x462)]=_0x27fcf6=>this[_0x20f051(0x5f3)](_0x27fcf6),this[_0x20f051(0x265)]=_0x3e4512=>this[_0x20f051(0x674)](_0x3e4512),this[_0x20f051(0x47d)]=()=>this[_0x20f051(0x3d9)]();}[_0x17ee79(0x687)](){const _0x2d27d4=_0x17ee79;if(this['_started'])return;this[_0x2d27d4(0x2cd)]=!![];for(const [_0x59082d,_0x46336f]of this[_0x2d27d4(0x5d7)]['_envs']){if(_0x59082d[_0x2d27d4(0x2f6)]('~'))continue;try{_0x46336f[_0x2d27d4(0x4ae)]();}catch{}}for(const [_0x35033c,_0x8c6e7b]of this[_0x2d27d4(0x5d7)][_0x2d27d4(0x4f4)]){if(_0x35033c[_0x2d27d4(0x2f6)]('~'))continue;try{this[_0x2d27d4(0x201)]['set'](_0x35033c,_0x8c6e7b[_0x2d27d4(0x35a)]()||0x0);}catch{}}const {events:_0x1950ee}=this[_0x2d27d4(0x5d7)];_0x1950ee['on'](_0x30e933['ITEM_CREATE'],this[_0x2d27d4(0x462)]),_0x1950ee['on'](_0x30e933['ITEM_UPDATE'],this[_0x2d27d4(0x462)]),_0x1950ee['on'](_0x30e933[_0x2d27d4(0x519)],this[_0x2d27d4(0x462)]),_0x1950ee['on'](_0x30e933[_0x2d27d4(0x376)],this[_0x2d27d4(0x265)]),_0x1950ee[_0x2d27d4(0x3db)](_0x30e933[_0x2d27d4(0x313)],this[_0x2d27d4(0x47d)]);}['stop'](){const _0x56eef9=_0x17ee79;if(!this[_0x56eef9(0x2cd)])return;this['_started']=![];const {events:_0xc37ec5}=this[_0x56eef9(0x5d7)];_0xc37ec5['off'](_0x30e933[_0x56eef9(0x1c6)],this[_0x56eef9(0x462)]),_0xc37ec5['off'](_0x30e933[_0x56eef9(0x5c7)],this[_0x56eef9(0x462)]),_0xc37ec5['off'](_0x30e933[_0x56eef9(0x519)],this[_0x56eef9(0x462)]),_0xc37ec5[_0x56eef9(0x5e8)](_0x30e933['SYSTEM_POKE'],this['_onPoke']);try{_0xc37ec5[_0x56eef9(0x5e8)](_0x30e933[_0x56eef9(0x313)],this[_0x56eef9(0x47d)]);}catch{}this[_0x56eef9(0x5c1)]&&(clearTimeout(this[_0x56eef9(0x5c1)]),this[_0x56eef9(0x5c1)]=null),this[_0x56eef9(0x362)][_0x56eef9(0x32f)](),this[_0x56eef9(0x4b3)]['clear'](),this['_baselines']['clear'](),this['_seen'][_0x56eef9(0x32f)]();}['_dedupeKey'](_0x5749fe,_0x581a69,_0x11a1c4,_0x4bcb63){return _0x5749fe+'\x00'+_0x581a69+'\x00'+_0x11a1c4+'\x00'+_0x4bcb63;}['_markSeen'](_0x4fc4fd,_0x51c7f1,_0x495fa3,_0x43894f){const _0x441f06=_0x17ee79,_0x2fbf68=this[_0x441f06(0x3b6)](_0x4fc4fd,_0x51c7f1,_0x495fa3,_0x43894f);if(this[_0x441f06(0x22d)]['has'](_0x2fbf68))return![];this[_0x441f06(0x22d)][_0x441f06(0x432)](_0x2fbf68);if(this[_0x441f06(0x22d)][_0x441f06(0x475)]>this['_dedupeMax']){const _0x169652=this[_0x441f06(0x22d)][_0x441f06(0x33c)]()[_0x441f06(0x1f8)]()[_0x441f06(0x3f2)];this['_seen'][_0x441f06(0x2e2)](_0x169652);}return!![];}[_0x17ee79(0x5f3)](_0x150562){const _0x583bc4=_0x17ee79;if(!this[_0x583bc4(0x2cd)]||!_0x150562)return;const {env:_0x47f302,type:_0xaf7847,key:_0x4e4124,clock:_0x5704c3,origin:_0x14745d,action:_0xe3f1ce,newValue:_0x49590d,oldValue:_0x7adc43}=_0x150562;if(_0x47f302==null||_0xaf7847==null||_0x4e4124==null)return;if(typeof _0x47f302===_0x583bc4(0x58b)&&_0x47f302[_0x583bc4(0x2f6)]('~'))return;if(typeof _0xaf7847===_0x583bc4(0x58b)&&_0xaf7847['startsWith']('~'))return;if(!this[_0x583bc4(0x655)](_0x47f302,_0xaf7847,_0x4e4124,_0x5704c3))return;const _0x13619f=_0xe3f1ce===_0x3abcc5[_0x583bc4(0x60a)]?_0x583bc4(0x66c):_0x583bc4(0x644);this[_0x583bc4(0x355)](_0x583bc4(0x408),{'env':_0x47f302,'type':_0xaf7847,'key':_0x4e4124,'op':_0x13619f,'clock':_0x5704c3,'origin':_0x14745d,'value':_0x13619f==='remove'?null:_0x49590d,'prevValue':_0x7adc43});}['_handlePoke'](_0x188883){const _0x443e4c=_0x17ee79;if(!this[_0x443e4c(0x2cd)])return;if(!_0x188883||typeof _0x188883['env']!==_0x443e4c(0x58b)||typeof _0x188883['type']!=='string')return;const {env:_0x49f8a5,type:_0x239fd3}=_0x188883;if(_0x49f8a5[_0x443e4c(0x2f6)]('~')||_0x239fd3[_0x443e4c(0x2f6)]('~'))return;this[_0x443e4c(0x362)][_0x443e4c(0x2d9)](_0x49f8a5+'\x00'+_0x239fd3,{'env':_0x49f8a5,'type':_0x239fd3}),this[_0x443e4c(0x38b)]();}['_scheduleFlush'](){const _0x5a08e3=_0x17ee79;if(this['_flushTimer'])return;const _0x52f0dd=()=>{const _0x43fd4a=_0x3f34;this['_flushTimer']=null,this['_drain']()[_0x43fd4a(0x28f)](()=>{});};this['_flushTimer']=setTimeout(_0x52f0dd,this[_0x5a08e3(0x2d5)]>0x0?this['_flushDebounce']:0x0);}async[_0x17ee79(0x4e7)](){const _0x3c885c=_0x17ee79;if(this['_draining']){this[_0x3c885c(0x38b)]();return;}this['_draining']=!![];try{const _0x982948=[...this['_pending'][_0x3c885c(0x33c)]()];this[_0x3c885c(0x362)]['clear']();let _0x30992b=![];for(const {env:_0x4a8571,type:_0x28788d}of _0x982948){try{const _0x4f6cd4=await this[_0x3c885c(0x533)](_0x4a8571,_0x28788d);if(_0x4f6cd4)_0x30992b=!![];}catch{this['_pending'][_0x3c885c(0x2d9)](_0x4a8571+'\x00'+_0x28788d,{'env':_0x4a8571,'type':_0x28788d}),_0x30992b=!![];}}if(_0x30992b||this['_pending']['size']>0x0)this[_0x3c885c(0x38b)]();}finally{this[_0x3c885c(0x24e)]=![];}}async[_0x17ee79(0x533)](_0x1e24fb,_0x16f88b){const _0x145912=_0x17ee79,_0x203ce2=await this[_0x145912(0x5d7)][_0x145912(0x516)](_0x1e24fb),_0x3d6e22=_0x1e24fb+'\x00'+_0x16f88b;!this[_0x145912(0x4b3)][_0x145912(0x25a)](_0x3d6e22)&&(!this[_0x145912(0x201)][_0x145912(0x25a)](_0x1e24fb)&&(_0x203ce2['_enableChangelog'](),this[_0x145912(0x201)][_0x145912(0x2d9)](_0x1e24fb,_0x203ce2[_0x145912(0x35a)]()||0x0)),this[_0x145912(0x4b3)][_0x145912(0x2d9)](_0x3d6e22,this[_0x145912(0x201)]['get'](_0x1e24fb)));const _0xa66d8d=this[_0x145912(0x4b3)]['get'](_0x3d6e22),_0x388399=_0x203ce2['getClock'](_0x16f88b)||0x0;if(_0x388399<=_0xa66d8d)return![];const _0x5b8753=_0xa66d8d+this[_0x145912(0x3cb)],_0x5a25c0=Math[_0x145912(0x52a)](_0x388399,_0x5b8753),_0x1e39b4=_0x1dd4c8[_0x145912(0x65c)]?_0x1dd4c8['now']():0x0,_0x361558=Array[_0x145912(0x1c3)](_0x203ce2[_0x145912(0x350)](_0x16f88b,_0xa66d8d+0x1,_0x5a25c0));let _0x498d61=_0xa66d8d;for(const _0x5905a3 of _0x361558){const {clock:_0x46d2ff,key:_0xc6ba9b,action:_0x50afcc,origin:_0x44a4a5}=_0x5905a3;if(_0x46d2ff>_0x498d61)_0x498d61=_0x46d2ff;if(_0xc6ba9b==null)continue;if(!this[_0x145912(0x655)](_0x1e24fb,_0x16f88b,_0xc6ba9b,_0x46d2ff))continue;let _0x36df4a,_0x4da2b4;if(_0x50afcc===_0x3abcc5[_0x145912(0x60a)])_0x36df4a=_0x145912(0x66c),_0x4da2b4=null;else{const _0x121f78=_0x203ce2[_0x145912(0x64f)](_0x16f88b,_0xc6ba9b);_0x121f78==null?(_0x36df4a='remove',_0x4da2b4=null):(_0x36df4a='put',_0x4da2b4=_0x121f78);}this[_0x145912(0x355)](_0x145912(0x408),{'env':_0x1e24fb,'type':_0x16f88b,'key':_0xc6ba9b,'op':_0x36df4a,'clock':_0x46d2ff,'origin':_0x44a4a5,'value':_0x4da2b4});}if(_0x1dd4c8['enabled'])_0x1dd4c8[_0x145912(0x303)]('feed:'+_0x1e24fb+':'+_0x16f88b,_0x1dd4c8['now']()-_0x1e39b4,'n='+_0x361558['length']);return this[_0x145912(0x4b3)]['set'](_0x3d6e22,Math['max'](_0x498d61,_0x5a25c0)),_0x203ce2[_0x145912(0x35a)](_0x16f88b)>_0x5a25c0;}[_0x17ee79(0x36f)](){const _0x462ccc=_0x17ee79;return{'started':this[_0x462ccc(0x2cd)],'quantum':this[_0x462ccc(0x3cb)],'flushDebounce':this[_0x462ccc(0x2d5)],'cursors':Object[_0x462ccc(0x3fe)]([...this[_0x462ccc(0x4b3)][_0x462ccc(0x4b8)]()][_0x462ccc(0x65d)](([_0x10caac,_0x49f8c3])=>[_0x10caac[_0x462ccc(0x1db)]('\x00',':'),_0x49f8c3])),'pending':this['_pending']['size'],'seen':this[_0x462ccc(0x22d)][_0x462ccc(0x475)]};}}return _0x3c3683['CHANGEFEED_QUANTUM']=_0xd4f477,okdbChangefeed={'OKDBChangefeed':_0x3c3683},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x21a40a=_0x5dddf1;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x4e9890=require$$1$2,_0x41b7b9=require$$1,{EVENTS:_0x3c60a7}=requireOkdbEnums(),_0x381057=require$$0,{slotKey:_0x8e1372}=requireOkdbProcessRegistry(),_0x1e556f=0xfa,_0x92b22f=0xfa0,_0x5ce3a6=0x5,_0x4a50a0=0x2710,_0x53ed3a=0xbb8,_0x43e341=0x7d0,_0x38c6ba='__okdbCluster',_0x165dfc=_0x21a40a(0x5f4),_0x3ad506=_0x21a40a(0x4a2),_0x3559a3=_0x21a40a(0x4b9),_0x58a1f8=[_0x3c60a7[_0x21a40a(0x67b)],_0x3c60a7[_0x21a40a(0x353)],_0x3c60a7[_0x21a40a(0x1f1)],_0x3c60a7[_0x21a40a(0x541)],_0x3c60a7[_0x21a40a(0x225)],_0x3c60a7[_0x21a40a(0x66d)],_0x3c60a7[_0x21a40a(0x24f)],_0x3c60a7[_0x21a40a(0x451)],'processor:ready',_0x21a40a(0x5b5),_0x21a40a(0x50b),_0x21a40a(0x5ab),'processor:resumed',_0x21a40a(0x326)],_0x33cd3f=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x362429({workers:_0x98f288,makeOkdb:_0x22712b,port:_0x5ac590,primaryOkdb:_0x2c63b1,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x1aaab7=_0x21a40a;if(_0x4e9890[_0x1aaab7(0x5fa)])return childEntry&&_0x4e9890[_0x1aaab7(0x25d)]({'exec':_0x41b7b9['join'](__dirname,_0x1aaab7(0x261)),'args':[],'execArgv':((()=>{const _0x58a01f=_0x1aaab7,_0x6352d3=[];for(let _0x20eaa8=0x0;_0x20eaa8<process[_0x58a01f(0x625)][_0x58a01f(0x502)];_0x20eaa8++){const _0x4fdf77=process[_0x58a01f(0x625)][_0x20eaa8];if(_0x4fdf77['startsWith'](_0x58a01f(0x591))||_0x4fdf77[_0x58a01f(0x2f6)](_0x58a01f(0x586))||_0x4fdf77[_0x58a01f(0x2f6)](_0x58a01f(0x4a3)))continue;if(_0x4fdf77==='-e'||_0x4fdf77==='--eval'||_0x4fdf77==='-p'||_0x4fdf77===_0x58a01f(0x2bf)){_0x20eaa8++;continue;}_0x6352d3[_0x58a01f(0x59e)](_0x4fdf77);}return _0x6352d3;})())}),_0x422352({'workers':_0x98f288,'port':_0x5ac590,'primaryOkdb':_0x2c63b1,'workerEnv':workerEnv});return _0x2c5705({'makeOkdb':_0x22712b,'port':_0x5ac590});}function _0x422352({workers:_0x279961,port:_0x5affa8,primaryOkdb:_0x344a1e,workerEnv:_0x9652f4}){const _0x45ef12=_0x21a40a,_0x599804=new Map(),_0x3bd94e=new Map();let _0xcd42f5=![];const _0x194d88=_0x1b3034=>_0x1b3034?.['__okdbSlot'],_0x3dd3ff=_0xfbb113=>{const _0xae4d8f=_0x3f34,_0x3513d8=_0x4e9890[_0xae4d8f(0x677)]({...process.env,..._0x9652f4||{},'OKDB_CLUSTER_SLOT':String(_0xfbb113)});return _0x3513d8[_0xae4d8f(0x63e)]=_0xfbb113,_0x599804[_0xae4d8f(0x2d9)](_0x3513d8['process'][_0xae4d8f(0x478)],{'worker':_0x3513d8,'startedAt':Date[_0xae4d8f(0x387)](),'slot':_0xfbb113}),_0x3513d8['on'](_0xae4d8f(0x5b3),_0x455bf8=>{const _0x3931a9=_0xae4d8f;console[_0x3931a9(0x4a2)](_0x3931a9(0x36e)+_0x3513d8[_0x3931a9(0x56a)]['pid']+_0x3931a9(0x609)+(_0x455bf8?.['message']??_0x455bf8));}),_0x3513d8['on'](_0xae4d8f(0x367),()=>_0x3507f1()),_0x3513d8;},_0x473f7d=_0x44b04a=>{const _0x8eefdf=_0x3f34;for(const {worker:_0x19a6ec}of _0x599804['values']()){if(_0x19a6ec[_0x8eefdf(0x48d)]()||!_0x19a6ec[_0x8eefdf(0x66a)]())continue;try{_0x19a6ec[_0x8eefdf(0x3a8)](_0x44b04a);}catch{}}};_0x344a1e?.[_0x45ef12(0x583)]?.({'kind':_0x45ef12(0x35b),'listenAddr':':'+_0x5affa8})['catch'](()=>{}),_0x344a1e?.[_0x45ef12(0x407)]?.[_0x45ef12(0x237)]?.({'workersConfigured':_0x279961});const _0x51d1e1={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x3507f1=()=>{const _0x54eac7=_0x45ef12,_0x3894b9=_0x344a1e?.[_0x54eac7(0x407)];if(!_0x3894b9||!_0x3894b9['_isWriter'])return;const _0x27c3ac=_0x3894b9[_0x54eac7(0x354)];for(const {worker:_0x4c608e,startedAt:_0x1d7335,slot:_0x5cbddf,stats:_0x404f1a,processing:_0x5f1888}of _0x599804[_0x54eac7(0x33c)]()){if(_0x4c608e[_0x54eac7(0x48d)]())continue;const _0x4b020c=_0x3894b9['hasDesired']?.()&&_0x3894b9[_0x54eac7(0x5a8)]('slot',_0x44b044(_0x5cbddf))?.['decommission']===!![];_0x3894b9['publishChildRow']({'pid':_0x4c608e[_0x54eac7(0x56a)][_0x54eac7(0x478)],'startedAt':_0x1d7335,'kind':_0x54eac7(0x345),'supervisorKey':_0x27c3ac,'slot':_0x5cbddf,'slotKey':_0x44b044(_0x5cbddf),'role':_0x51d1e1,'listenAddr':':'+_0x5affa8,'lifecycle':_0x4b020c?_0x54eac7(0x32c):_0x54eac7(0x547),'processing':_0x5f1888??null,'stats':_0x404f1a??null})[_0x54eac7(0x28f)](()=>{});}},_0x44b044=_0x4d43b1=>_0x8e1372(_0x45ef12(0x2e3)+_0x5affa8,_0x4d43b1),_0x44fefc=_0x4c888d=>{const _0x59b5b1=_0x45ef12,_0x1d59bc=_0x344a1e?.[_0x59b5b1(0x407)];if(!_0x1d59bc?.['hasDesired']?.())return![];return _0x1d59bc['getDesired'](_0x59b5b1(0x606),_0x44b044(_0x4c888d))?.[_0x59b5b1(0x563)]===!![];};for(let _0x24ad3a=0x0;_0x24ad3a<_0x279961;_0x24ad3a++){const _0x49cc35=_0x44fefc(_0x24ad3a);_0x3bd94e['set'](_0x24ad3a,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x49cc35,'respawnTimer':null}),_0x49cc35?console['log']('[okdb-cluster]\x20slot='+_0x24ad3a+_0x45ef12(0x418)):_0x3dd3ff(_0x24ad3a);}const _0xf89263=()=>{const _0x50db05=_0x45ef12,_0x5cfd92=_0x344a1e?.[_0x50db05(0x407)];if(!_0x5cfd92?.[_0x50db05(0x3e3)]||!_0x5cfd92[_0x50db05(0x4fc)]?.())return;for(const [_0x4c2e8a,_0x551d0c]of _0x3bd94e['entries']()){const _0x300f39=_0x5cfd92[_0x50db05(0x5a8)]('slot',_0x44b044(_0x4c2e8a)),_0x1b9191=_0x300f39?.[_0x50db05(0x563)]===!![],_0xbeb2a0=_0x300f39?.[_0x50db05(0x636)]===!![];if(_0x1b9191&&!_0x551d0c[_0x50db05(0x1f0)]){_0x551d0c['dead']=!![];_0x551d0c[_0x50db05(0x1d6)]&&(clearTimeout(_0x551d0c['respawnTimer']),_0x551d0c[_0x50db05(0x1d6)]=null);for(const {worker:_0x1e213a}of _0x599804[_0x50db05(0x33c)]()){if(_0x194d88(_0x1e213a)!==_0x4c2e8a||_0x1e213a['isDead']())continue;try{if(_0xbeb2a0)_0x1e213a[_0x50db05(0x56a)]['kill']('SIGKILL');else _0x1e213a[_0x50db05(0x66a)]()&&_0x1e213a[_0x50db05(0x202)]();}catch{}}console['log'](_0x50db05(0x3ad)+(_0xbeb2a0?'hard-killed':_0x50db05(0x346))+_0x50db05(0x654)+_0x4c2e8a+'\x20(durable\x20desired-state)');}else{if(!_0x1b9191&&_0x551d0c[_0x50db05(0x1f0)]&&_0x300f39){_0x551d0c[_0x50db05(0x1f0)]=![],_0x551d0c['deaths']=[],_0x551d0c[_0x50db05(0x61c)]=0x0;const _0x2dd400=[..._0x599804['values']()]['some'](({worker:_0x6f0e24})=>_0x194d88(_0x6f0e24)===_0x4c2e8a&&!_0x6f0e24[_0x50db05(0x48d)]());!_0x2dd400&&!_0xcd42f5&&(_0x3dd3ff(_0x4c2e8a),console['log'](_0x50db05(0x578)+_0x4c2e8a));}}}},_0x35045d=()=>{try{_0xf89263();}catch{}};_0x344a1e?.[_0x45ef12(0x21e)]?.['on']?.(_0x3c60a7[_0x45ef12(0x3fb)],_0x35045d);const _0x2ca81a=[];if(_0x344a1e?.[_0x45ef12(0x21e)]?.['on'])for(const _0x3e41c3 of _0x58a1f8){const _0x451e02=_0x79801a=>{_0x473f7d({[_0x38c6ba]:_0x165dfc,'event':_0x3e41c3,'data':_0x79801a??{}});};_0x344a1e[_0x45ef12(0x21e)]['on'](_0x3e41c3,_0x451e02),_0x2ca81a['push']({'event':_0x3e41c3,'handler':_0x451e02});}const _0x168225=setInterval(()=>{_0xf89263(),_0x3507f1();},_0x33cd3f);_0x168225[_0x45ef12(0x30b)]?.();const _0x1135cd=(_0x570c34,_0x3c21df)=>{const _0x8e4240=_0x45ef12;if(!_0x3c21df||typeof _0x3c21df!==_0x8e4240(0x65b)||_0x3c21df[_0x38c6ba]!==_0x3ad506)return;if(!_0x344a1e?.[_0x8e4240(0x4a2)]?.['ingest'])return;const _0x518409=_0x3c21df[_0x8e4240(0x1de)]||{};_0x344a1e[_0x8e4240(0x4a2)][_0x8e4240(0x423)]({..._0x518409,'msg':'[w'+_0x3c21df[_0x8e4240(0x606)]+']\x20'+(_0x518409[_0x8e4240(0x2a2)]??''),'meta':{..._0x518409[_0x8e4240(0x4ce)]||{},'worker':_0x3c21df['slot'],'workerPid':_0x3c21df[_0x8e4240(0x478)]}});};_0x4e9890['on'](_0x45ef12(0x66f),_0x1135cd);const _0x13afcc=(_0x5f1e10,_0x1d5c08)=>{const _0x4caaf0=_0x45ef12;if(!_0x1d5c08||typeof _0x1d5c08!==_0x4caaf0(0x65b)||_0x1d5c08[_0x38c6ba]!==_0x3559a3)return;const _0x206d40=_0x599804[_0x4caaf0(0x64f)](_0x5f1e10['process'][_0x4caaf0(0x478)]);if(_0x206d40){_0x206d40['stats']={..._0x1d5c08['stats'],'at':Date[_0x4caaf0(0x387)]()};if(_0x1d5c08['processing']!==undefined)_0x206d40[_0x4caaf0(0x629)]=_0x1d5c08[_0x4caaf0(0x629)];}};_0x4e9890['on']('message',_0x13afcc),_0x4e9890['on'](_0x45ef12(0x46e),(_0x4bf18b,_0x2a692a,_0x5b1c36)=>{const _0x50cd61=_0x45ef12,_0x452995=_0x4bf18b[_0x50cd61(0x56a)][_0x50cd61(0x478)],_0x4d3204=_0x194d88(_0x4bf18b),_0x276a82=_0x599804[_0x50cd61(0x64f)](_0x452995);if(_0x276a82&&_0x344a1e?.[_0x50cd61(0x407)])_0x344a1e['processes'][_0x50cd61(0x4f6)](_0x452995+':'+_0x276a82[_0x50cd61(0x492)])[_0x50cd61(0x28f)](()=>{});_0x599804[_0x50cd61(0x2e2)](_0x452995),console['log'](_0x50cd61(0x36e)+_0x452995+_0x50cd61(0x553)+(_0x4d3204??'?')+_0x50cd61(0x49b)+(_0x50cd61(0x550)+_0x2a692a+_0x50cd61(0x43e)+(_0x5b1c36??'none')+_0x50cd61(0x2a0)+_0x599804[_0x50cd61(0x475)]+_0x50cd61(0x665))),_0x3507f1();if(_0xcd42f5||_0x4d3204==null)return;const _0x40f98c=_0x3bd94e['get'](_0x4d3204);if(!_0x40f98c||_0x40f98c[_0x50cd61(0x1f0)])return;const _0x2daadf=Date[_0x50cd61(0x387)]();_0x40f98c[_0x50cd61(0x3f8)]['push'](_0x2daadf),_0x40f98c[_0x50cd61(0x3f8)]=_0x40f98c[_0x50cd61(0x3f8)][_0x50cd61(0x200)](_0x5f29ce=>_0x2daadf-_0x5f29ce<=_0x4a50a0);if(_0x40f98c[_0x50cd61(0x3f8)][_0x50cd61(0x502)]>=_0x5ce3a6){_0x40f98c[_0x50cd61(0x1f0)]=!![],console[_0x50cd61(0x5b3)](_0x50cd61(0x4e2)+_0x4d3204+'\x20died\x20'+_0x40f98c['deaths'][_0x50cd61(0x502)]+_0x50cd61(0x4cf)+(_0x4a50a0+_0x50cd61(0x357)+_0x599804[_0x50cd61(0x475)]+_0x50cd61(0x256)));return;}_0x40f98c[_0x50cd61(0x61c)]++;const _0x140091=Math['min'](_0x92b22f,_0x1e556f*0x2**(_0x40f98c[_0x50cd61(0x61c)]-0x1));console['log']('[okdb-cluster]\x20respawning\x20worker\x20slot='+_0x4d3204+'\x20in\x20'+_0x140091+_0x50cd61(0x336)+_0x40f98c[_0x50cd61(0x61c)]+')'),_0x40f98c[_0x50cd61(0x1d6)]=setTimeout(()=>{const _0x36a98e=_0x50cd61;_0x40f98c['respawnTimer']=null;if(_0xcd42f5||_0x40f98c[_0x36a98e(0x1f0)])return;const _0x3ed2e4=_0x3dd3ff(_0x4d3204);_0x3ed2e4[_0x36a98e(0x3db)](_0x36a98e(0x3fc),()=>{const _0x501f22=_0x36a98e;if(_0x3bd94e[_0x501f22(0x64f)](_0x4d3204)===_0x40f98c)_0x40f98c[_0x501f22(0x61c)]=0x0;});},_0x140091),_0x40f98c[_0x50cd61(0x1d6)][_0x50cd61(0x30b)]?.();});const _0x4f1d24=[..._0x599804[_0x45ef12(0x577)]()];console[_0x45ef12(0x4a2)](_0x45ef12(0x217)+process[_0x45ef12(0x478)]+_0x45ef12(0x1cb)+_0x279961+'\x20HTTP\x20server(s)\x20on\x20port\x20'+_0x5affa8+':\x20'+('['+_0x4f1d24[_0x45ef12(0x3b2)](',\x20')+']'));const _0x4ab78f={'_isClusterController':!![],'port':_0x5affa8,'primaryOkdb':_0x344a1e??null,'status'(){const _0x4b3b11=_0x45ef12;return{'clustered':!![],'primaryPid':process['pid'],'port':_0x5affa8,'primaryRole':_0x344a1e?.[_0x4b3b11(0x5b6)]??null,'processorPid':null,'supervisorPid':process[_0x4b3b11(0x478)],'workers':[..._0x599804[_0x4b3b11(0x33c)]()][_0x4b3b11(0x65d)](({worker:_0x218f79})=>({'pid':_0x218f79[_0x4b3b11(0x56a)][_0x4b3b11(0x478)],'id':_0x218f79['id'],'dead':_0x218f79['isDead']()}))};},async 'close'(){const _0x1abad6=_0x45ef12;_0xcd42f5=!![];for(const _0x579422 of _0x3bd94e[_0x1abad6(0x33c)]()){_0x579422[_0x1abad6(0x1f0)]=!![],_0x579422[_0x1abad6(0x1d6)]&&(clearTimeout(_0x579422[_0x1abad6(0x1d6)]),_0x579422[_0x1abad6(0x1d6)]=null);}clearInterval(_0x168225),_0x4e9890[_0x1abad6(0x5e8)](_0x1abad6(0x66f),_0x1135cd),_0x4e9890[_0x1abad6(0x5e8)](_0x1abad6(0x66f),_0x13afcc),_0x344a1e?.[_0x1abad6(0x21e)]?.[_0x1abad6(0x5e8)]?.(_0x3c60a7[_0x1abad6(0x3fb)],_0x35045d);if(_0x344a1e?.['events']?.[_0x1abad6(0x5e8)])for(const {event:_0x5abbed,handler:_0x1854a7}of _0x2ca81a){try{_0x344a1e[_0x1abad6(0x21e)][_0x1abad6(0x5e8)](_0x5abbed,_0x1854a7);}catch{}}_0x2ca81a[_0x1abad6(0x502)]=0x0;const _0xb032c7=[..._0x599804['values']()]['map'](({worker:_0x4c5493})=>_0x4c5493);if(_0xb032c7[_0x1abad6(0x502)]===0x0)return;await Promise[_0x1abad6(0x3ed)](_0xb032c7[_0x1abad6(0x65d)](_0xd3feca=>new Promise(_0x44f8fb=>{const _0x6e527d=_0x1abad6;if(_0xd3feca[_0x6e527d(0x48d)]()){_0x44f8fb();return;}let _0x4f1f15=![];const _0x652125=()=>{if(_0x4f1f15)return;_0x4f1f15=!![];if(_0x5224de)clearTimeout(_0x5224de);_0x44f8fb();};_0xd3feca[_0x6e527d(0x3db)]('exit',_0x652125);const _0x5224de=setTimeout(()=>{const _0x4775de=_0x6e527d;try{_0xd3feca[_0x4775de(0x56a)][_0x4775de(0x636)]();}catch{}},_0x53ed3a+0x1f4);_0x5224de[_0x6e527d(0x30b)]?.();try{_0xd3feca[_0x6e527d(0x202)]();}catch{try{_0xd3feca['process']['kill']();}catch{}}})));}};return _0x4ab78f;}async function _0x2c5705({makeOkdb:_0x28a3e5,port:_0x5b5e86}){const _0x3ecc03=_0x21a40a,_0x407df2=await _0x28a3e5();return _0x205dbc(_0x407df2),_0x407df2['http'][_0x3ecc03(0x5e6)](_0x5b5e86);}function _0x205dbc(_0x495f50){const _0x36823=_0x21a40a;if(!_0x495f50||_0x495f50[_0x36823(0x291)])return;_0x495f50['_clusterWorkerAttached']=!![];try{const {OKDBChangefeed:_0x37bda8}=requireOkdbChangefeed(),_0xc13698=_0x495f50['_adminRelay'];if(_0xc13698&&typeof _0xc13698[_0x36823(0x1f7)]===_0x36823(0x59d)){const _0x5bf743=new _0x37bda8(_0x495f50);_0x5bf743['start'](),_0xc13698[_0x36823(0x1f7)](_0x5bf743),_0x495f50[_0x36823(0x37c)]=_0x5bf743;}}catch(_0x52ff92){_0x495f50['log']?.[_0x36823(0x4ea)]?.(_0x36823(0x43b)+(_0x52ff92?.[_0x36823(0x66f)]??_0x52ff92),{'feature':_0x36823(0x406)});}const _0x34cb5b=_0x3b4e20=>{const _0x31d54d=_0x36823;if(!_0x3b4e20||typeof _0x3b4e20!=='object'||_0x3b4e20[_0x38c6ba]==null)return;if(_0x3b4e20[_0x38c6ba]===_0x165dfc)try{_0x495f50[_0x31d54d(0x412)]?.['pushEphemeral']?.(_0x3b4e20[_0x31d54d(0x458)],_0x3b4e20['data']);}catch{}};process['on'](_0x36823(0x66f),_0x34cb5b),_0x495f50[_0x36823(0x5ac)]=_0x34cb5b;{let _0x10de81=process['cpuUsage'](),_0x7b48f3=Date[_0x36823(0x387)]();const _0x10756b=()=>{const _0x527df7=_0x36823;if(typeof process[_0x527df7(0x3a8)]!=='function'||!process[_0x527df7(0x527)])return;const _0x45bc54=Date[_0x527df7(0x387)](),_0x3fdcbf=process[_0x527df7(0x664)](),_0x82098e=(_0x45bc54-_0x7b48f3)*0x3e8,_0x953cf2=_0x3fdcbf[_0x527df7(0x652)]-_0x10de81[_0x527df7(0x652)]+(_0x3fdcbf[_0x527df7(0x27c)]-_0x10de81[_0x527df7(0x27c)]),_0x49bd0d=_0x82098e>0x0?Math[_0x527df7(0x52a)](0x64,Math['round'](_0x953cf2/(_0x82098e*(_0x381057[_0x527df7(0x58e)]()['length']||0x1))*0x64)):0x0;_0x10de81=_0x3fdcbf,_0x7b48f3=_0x45bc54;const _0x2a157f=process[_0x527df7(0x1fe)]();let _0x55f915=null;try{_0x55f915=_0x495f50[_0x527df7(0x5b6)]?.[_0x527df7(0x68a)]?_0x495f50[_0x527df7(0x407)]?.[_0x527df7(0x593)]?.()??null:null;}catch{}try{process[_0x527df7(0x3a8)]({[_0x38c6ba]:_0x3559a3,'stats':{'rss':_0x2a157f[_0x527df7(0x21d)],'heapUsed':_0x2a157f[_0x527df7(0x53e)],'heapTotal':_0x2a157f[_0x527df7(0x512)],'external':_0x2a157f[_0x527df7(0x510)],'cpuPct':_0x49bd0d,'cpuWindowMs':Math[_0x527df7(0x3ef)](_0x82098e/0x3e8)||null},'processing':_0x55f915});}catch{}},_0x31b63a=Math[_0x36823(0x5f2)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x2b959e=setInterval(_0x10756b,_0x31b63a);_0x2b959e[_0x36823(0x30b)]?.(),_0x10756b();for(const _0x1d389b of['processor:paused',_0x36823(0x389)]){_0x495f50[_0x36823(0x21e)]?.['on']?.(_0x1d389b,()=>{try{_0x10756b();}catch{}});}}let _0x5cf033=![];const _0x2d91f2=async _0xa7e158=>{const _0x2eaec5=_0x36823;if(_0x5cf033)return;_0x5cf033=!![];const _0x418264=setTimeout(()=>process[_0x2eaec5(0x46e)](_0xa7e158),_0x53ed3a);_0x418264[_0x2eaec5(0x30b)]?.();try{await _0x495f50['close']?.();}catch{}process[_0x2eaec5(0x46e)](_0xa7e158);};process['on']('disconnect',()=>_0x2d91f2(0x0));if(process[_0x36823(0x63b)]!==_0x36823(0x5ea)){const _0x2ddcc4=setInterval(()=>{const _0x324d68=_0x36823;if(process[_0x324d68(0x5cb)]===0x1)_0x2d91f2(0x0);},_0x43e341);_0x2ddcc4[_0x36823(0x30b)]?.(),_0x495f50['_clusterOrphanWatch']=_0x2ddcc4;}}return okdbCluster={'runClustered':_0x362429,'attachWorkerCluster':_0x205dbc},okdbCluster;}var hasRequiredOkdb;function requireOkdb(){const _0x39b60e=_0x5dddf1;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x39b60e(0x221)]();}catch{}const _0x1a92f7=require$$1,_0x480a7a=require$$1$1,{resolveWorkers:_0x3889b2,isShmbufNative:_0x50d9b4}=requireOkdbWorkers();function _0x1ed07b(_0xe3d4e8){const _0x440b97=_0x39b60e,_0x31d8ba=_0xe3d4e8[_0x440b97(0x2a1)](0x2),_0x3add5c={};let _0x32f206=0x0;while(_0x32f206<_0x31d8ba[_0x440b97(0x502)]){const _0x202b62=_0x31d8ba[_0x32f206];if(_0x202b62==='--port'||_0x202b62==='-p')_0x3add5c[_0x440b97(0x268)]=Number(_0x31d8ba[++_0x32f206]);else{if(_0x202b62===_0x440b97(0x5ad)||_0x202b62==='-d')_0x3add5c[_0x440b97(0x411)]=_0x31d8ba[++_0x32f206];else{if(_0x202b62===_0x440b97(0x39a)||_0x202b62==='-k')_0x3add5c['key']=_0x31d8ba[++_0x32f206];else{if(_0x202b62===_0x440b97(0x4a8)||_0x202b62==='-c')_0x3add5c['config']=_0x31d8ba[++_0x32f206];else{if(_0x202b62===_0x440b97(0x5dd))_0x3add5c[_0x440b97(0x4a6)]=_0x31d8ba[++_0x32f206];else{if(_0x202b62===_0x440b97(0x356))_0x3add5c[_0x440b97(0x594)]=!![];else{if(_0x202b62==='--no-admin')_0x3add5c[_0x440b97(0x419)]=!![];else{if(_0x202b62==='--workers')_0x3add5c['workers']=_0x31d8ba[++_0x32f206];else{if(_0x202b62===_0x440b97(0x267))_0x3add5c['noCluster']=!![];else{if(_0x202b62===_0x440b97(0x605)||_0x202b62==='-e')_0x3add5c[_0x440b97(0x2cb)]=_0x31d8ba[++_0x32f206];else{if(_0x202b62==='--types')_0x3add5c[_0x440b97(0x298)]=_0x31d8ba[++_0x32f206];else{if(_0x202b62===_0x440b97(0x474))_0x3add5c[_0x440b97(0x500)]=!![];else{if(_0x202b62===_0x440b97(0x430))_0x3add5c[_0x440b97(0x641)]=!![];else{if(_0x202b62===_0x440b97(0x3b3))_0x3add5c[_0x440b97(0x4af)]=!![];else{if(_0x202b62==='--open'){const _0x4cf844=[];while(_0x32f206+0x1<_0x31d8ba[_0x440b97(0x502)]&&!_0x31d8ba[_0x32f206+0x1][_0x440b97(0x2f6)]('--')){_0x4cf844[_0x440b97(0x59e)](_0x31d8ba[++_0x32f206]);}_0x3add5c[_0x440b97(0x43c)]=_0x4cf844[_0x440b97(0x502)]>0x0?_0x4cf844:!![];}else{if(_0x202b62==='--log-requests')_0x3add5c['logRequests']=!![];else{if(_0x202b62==='--name')_0x3add5c['name']=_0x31d8ba[++_0x32f206];else{if(_0x202b62===_0x440b97(0x330))_0x3add5c[_0x440b97(0x628)]=_0x31d8ba[++_0x32f206];else{if(_0x202b62===_0x440b97(0x43f))_0x3add5c[_0x440b97(0x64d)]=_0x31d8ba[++_0x32f206];else{if(_0x202b62===_0x440b97(0x469))_0x3add5c[_0x440b97(0x455)]=_0x31d8ba[++_0x32f206];else{if(_0x202b62===_0x440b97(0x22e))_0x3add5c['grants']=_0x31d8ba[++_0x32f206];else{if(_0x202b62===_0x440b97(0x236))_0x3add5c[_0x440b97(0x3dd)]=_0x31d8ba[++_0x32f206];else{if(_0x202b62===_0x440b97(0x688))_0x3add5c[_0x440b97(0x378)]=_0x31d8ba[++_0x32f206];else{if(_0x202b62===_0x440b97(0x4f5)||_0x202b62==='-u')_0x3add5c[_0x440b97(0x684)]=_0x31d8ba[++_0x32f206];else{if(_0x202b62===_0x440b97(0x50a))_0x3add5c[_0x440b97(0x4aa)]=_0x31d8ba[++_0x32f206];else{if(_0x202b62===_0x440b97(0x5ec)||_0x202b62==='-v'){const _0x495ca=require$$3;console['log'](_0x495ca[_0x440b97(0x292)]),process['exit'](0x0);}else(_0x202b62===_0x440b97(0x3aa)||_0x202b62==='-h')&&(_0x1e3dea(),process['exit'](0x0));}}}}}}}}}}}}}}}}}}}}}}}}}_0x32f206++;}return _0x3add5c;}function _0x1e3dea(){const _0x13bb3c=_0x39b60e;console['log'](_0x13bb3c(0x32b));}const _0x56988b=new Set([_0x39b60e(0x554),_0x39b60e(0x568),_0x39b60e(0x4ea),_0x39b60e(0x5b3)]);function _0x18b2f0(_0x108627){const _0x3bfd84=_0x39b60e,_0x31f9ff=_0x108627[_0x3bfd84(0x329)]?_0x1a92f7[_0x3bfd84(0x271)](_0x108627['config']):_0x1a92f7['resolve'](_0x3bfd84(0x218));let _0x1c956d={};if(_0x480a7a[_0x3bfd84(0x41a)](_0x31f9ff))try{const _0x2ee01b=_0x480a7a[_0x3bfd84(0x5d4)](_0x31f9ff,_0x3bfd84(0x5c5))[_0x3bfd84(0x1db)](/^\uFEFF/,'');_0x1c956d=JSON['parse'](_0x2ee01b),console[_0x3bfd84(0x4a2)](_0x3bfd84(0x450)+_0x31f9ff);}catch(_0x479ffe){console[_0x3bfd84(0x5b3)](_0x3bfd84(0x690)+_0x31f9ff+':\x20'+_0x479ffe['message']),process[_0x3bfd84(0x46e)](0x1);}const _0x17721f={'port':process.env.OKDB_PORT?Number(process.env.OKDB_PORT):undefined,'path':process.env.OKDB_PATH??undefined,'key':process.env.OKDB_KEY??undefined,'logLevel':process.env.OKDB_LOG_LEVEL??undefined,'noRepl':process.env.OKDB_NO_REPL==='1'?!![]:undefined,'noAdmin':process.env.OKDB_NO_ADMIN==='1'?!![]:undefined},_0x1ed28e={'port':_0x108627[_0x3bfd84(0x268)]??_0x1c956d[_0x3bfd84(0x268)]??_0x17721f[_0x3bfd84(0x268)]??0x2124,'dbPath':_0x108627[_0x3bfd84(0x411)]??_0x1c956d[_0x3bfd84(0x411)]??_0x17721f[_0x3bfd84(0x411)]??'./okdb-data','key':_0x108627[_0x3bfd84(0x528)]??_0x1c956d[_0x3bfd84(0x528)]??_0x17721f['key']??undefined,'logLevel':_0x108627[_0x3bfd84(0x4a6)]??_0x1c956d['logLevel']??_0x17721f[_0x3bfd84(0x4a6)]??_0x3bfd84(0x568),'noRepl':_0x108627['noRepl']??_0x1c956d[_0x3bfd84(0x594)]??_0x17721f[_0x3bfd84(0x594)]??![],'noAdmin':_0x108627['noAdmin']??_0x1c956d[_0x3bfd84(0x419)]??_0x17721f[_0x3bfd84(0x419)]??![],'admin':_0x1c956d[_0x3bfd84(0x304)]??{},'api':_0x1c956d[_0x3bfd84(0x53d)]??undefined,'auth':_0x1c956d['auth']??undefined,'mcp':_0x1c956d[_0x3bfd84(0x68c)]??undefined,'http':_0x1c956d[_0x3bfd84(0x57a)]??undefined,'timeMachine':_0x1c956d[_0x3bfd84(0x640)]!==![]?_0x1c956d[_0x3bfd84(0x640)]??{}:![]};if(_0x108627[_0x3bfd84(0x2c2)])_0x1ed28e[_0x3bfd84(0x2c2)]=!![];if(_0x108627[_0x3bfd84(0x4e0)]!==undefined)_0x1ed28e['workersFlag']=_0x108627['workers'];return _0x108627[_0x3bfd84(0x43c)]!==undefined&&(_0x1ed28e[_0x3bfd84(0x382)]=_0x1ed28e[_0x3bfd84(0x382)]||{},_0x1ed28e[_0x3bfd84(0x382)][_0x3bfd84(0x43c)]=_0x108627[_0x3bfd84(0x43c)]),_0x108627[_0x3bfd84(0x1ce)]&&(_0x1ed28e[_0x3bfd84(0x554)]=_0x1ed28e['debug']||{},_0x1ed28e[_0x3bfd84(0x554)][_0x3bfd84(0x1ce)]=!![]),(!Number['isInteger'](_0x1ed28e[_0x3bfd84(0x268)])||_0x1ed28e['port']<0x1||_0x1ed28e[_0x3bfd84(0x268)]>0xffff)&&(console[_0x3bfd84(0x5b3)](_0x3bfd84(0x584)+_0x1ed28e[_0x3bfd84(0x268)]+_0x3bfd84(0x529)),process[_0x3bfd84(0x46e)](0x1)),!_0x56988b[_0x3bfd84(0x25a)](_0x1ed28e[_0x3bfd84(0x4a6)])&&(console[_0x3bfd84(0x5b3)](_0x3bfd84(0x51c)+_0x1ed28e[_0x3bfd84(0x4a6)]+_0x3bfd84(0x370)),process[_0x3bfd84(0x46e)](0x1)),_0x1ed28e;}function _0x507a02(_0x3283f9){const _0x3afe83=_0x39b60e;return!!(_0x3283f9&&typeof _0x3283f9==='object'&&!Array['isArray'](_0x3283f9)&&Object[_0x3afe83(0x577)](_0x3283f9)[_0x3afe83(0x502)]>0x0);}function _0x365680(_0x5450cd){return{..._0x5450cd['key']?{'encryptionKey':_0x5450cd['key']}:{},'engines':![],'processors':![],'compaction':![]};}const _0x525556=!process['stdout']['isTTY']||!!process.env.NO_COLOR;function _0x3407dd(_0x5c41f9,_0x27863f){return _0x525556?_0x27863f:'\x1b['+_0x5c41f9+'m'+_0x27863f+'\x1b[0m';}function _0x4cc78e(_0x2863f4){const _0x5245ee=_0x39b60e;if(!_0x2863f4||_0x2863f4[_0x5245ee(0x502)]===0x0)return;const _0x593178='─'[_0x5245ee(0x2e6)](0x38);process[_0x5245ee(0x5ff)][_0x5245ee(0x37f)]('\x0a'),process['stderr']['write'](_0x3407dd('33',_0x5245ee(0x4c9)+_0x2863f4[_0x5245ee(0x502)]+_0x5245ee(0x40d)+(_0x2863f4[_0x5245ee(0x502)]>0x1?'S':'')+'\x0a')),process[_0x5245ee(0x5ff)][_0x5245ee(0x37f)]('\x20\x20'+_0x593178+'\x0a');for(const _0x437868 of _0x2863f4){const _0x3632d0=_0x437868[_0x5245ee(0x28a)]===_0x5245ee(0x5b3)?_0x3407dd('31',_0x5245ee(0x571)):_0x3407dd('33',_0x5245ee(0x4f2));process['stderr']['write'](_0x3632d0+'\x20\x20'+_0x3407dd('1',_0x437868[_0x5245ee(0x41e)])+'\x0a'),process[_0x5245ee(0x5ff)][_0x5245ee(0x37f)]('\x20\x20\x20\x20\x20\x20\x20'+_0x437868[_0x5245ee(0x66f)]+'\x0a');if(_0x437868[_0x5245ee(0x54e)])process['stderr'][_0x5245ee(0x37f)](_0x5245ee(0x2d7)+_0x3407dd('2',_0x5245ee(0x275)+_0x437868['hint'])+'\x0a');process[_0x5245ee(0x5ff)][_0x5245ee(0x37f)]('\x0a');}process[_0x5245ee(0x5ff)][_0x5245ee(0x37f)]('\x20\x20'+_0x593178+'\x0a\x0a');}function _0x454a87(_0x326ac7,_0x379f2b,_0x5dce3d={}){const _0xe50105=_0x39b60e,_0x59ef2e=_0x326ac7[_0xe50105(0x57a)][_0xe50105(0x5e6)](_0x379f2b,_0x5dce3d);if(_0x59ef2e&&_0x59ef2e[_0xe50105(0x513)])return Promise[_0xe50105(0x271)](_0x59ef2e);return new Promise((_0x415bcb,_0x416e77)=>{const _0x18db9c=_0xe50105;_0x59ef2e[_0x18db9c(0x3db)](_0x18db9c(0x3fc),_0x415bcb),_0x59ef2e['once']('error',_0x416e77);});}async function _0x35013a(_0x4e801b){const _0x52833e=_0x39b60e,_0xe82eb=require$$4$1;console['log'](_0x52833e(0x2ae));let _0x2bb57a=!![];const _0x5c59d6=(_0x35b22d,_0x15888a)=>{console['log']('\x20\x20'+(_0x35b22d?'✓':'✗')+'\x20'+_0x15888a);if(!_0x35b22d)_0x2bb57a=![];},_0x34f9b9=Number(process['version'][_0x52833e(0x1db)]('v','')['split']('.')[0x0]);_0x5c59d6(_0x34f9b9>=0x12,_0x52833e(0x270)+process['version']+(_0x34f9b9<0x12?_0x52833e(0x42f):''));const _0x28bfea=_0x1a92f7[_0x52833e(0x271)](_0x4e801b[_0x52833e(0x22b)]);try{_0x480a7a[_0x52833e(0x246)](_0x28bfea,{'recursive':!![]});const _0x44a648=_0x1a92f7['join'](_0x28bfea,'.okdb-write-test');_0x480a7a[_0x52833e(0x602)](_0x44a648,''),_0x480a7a['unlinkSync'](_0x44a648),_0x5c59d6(!![],'database\x20path\x20writable:\x20'+_0x28bfea);}catch(_0x1cb2db){_0x5c59d6(![],_0x52833e(0x51b)+_0x28bfea+_0x52833e(0x38c)+_0x1cb2db[_0x52833e(0x66f)]+')');}const _0x33ae9c=await new Promise(_0x351694=>{const _0x3072bf=_0x52833e,_0x25c07c=_0xe82eb[_0x3072bf(0x3d7)]();_0x25c07c['once'](_0x3072bf(0x5b3),()=>_0x351694(![])),_0x25c07c[_0x3072bf(0x3db)](_0x3072bf(0x3fc),()=>{_0x25c07c['close'](),_0x351694(!![]);}),_0x25c07c['listen'](_0x4e801b['port'],'127.0.0.1');});_0x5c59d6(_0x33ae9c,'port\x20'+_0x4e801b[_0x52833e(0x268)]+'\x20'+(_0x33ae9c?_0x52833e(0x4c4):_0x52833e(0x467)));const _0x3b3d26=_0x1a92f7[_0x52833e(0x271)](_0x52833e(0x218));if(_0x480a7a['existsSync'](_0x3b3d26))try{JSON[_0x52833e(0x496)](_0x480a7a[_0x52833e(0x5d4)](_0x3b3d26,'utf8')[_0x52833e(0x1db)](/^\uFEFF/,'')),_0x5c59d6(!![],_0x52833e(0x3e9)+_0x3b3d26);}catch(_0x258b3d){_0x5c59d6(![],_0x52833e(0x57e)+_0x258b3d[_0x52833e(0x66f)]);}else _0x5c59d6(!![],_0x52833e(0x52e));if(_0x50d9b4()){const _0x14825f=_0x3889b2(_0x4e801b,{'shmbufNative':!![]});_0x5c59d6(!![],'cluster:\x20ready\x20('+_0x14825f+'\x20worker'+(_0x14825f===0x1?'':'s')+')');}else _0x5c59d6(!![],'cluster:\x20unavailable\x20(shmbuf\x20native\x20missing)\x20—\x20running\x20single-process');if(!_0x33ae9c)try{const _0xe4b1=require(_0x52833e(0x35e)),_0x5d95c4=new _0xe4b1(_0x28bfea,{'engines':![],'processors':![],'compaction':![],'http':![],'auth':{'open':!![]}});await _0x5d95c4[_0x52833e(0x43c)]();try{await _0x5d95c4[_0x52833e(0x407)]['open']({'reader':!![]});const _0x26d9d4=_0x5d95c4[_0x52833e(0x407)]['listNodes'](),_0x488cfb=_0x26d9d4[_0x52833e(0x200)](_0xa5c2f5=>_0xa5c2f5[_0x52833e(0x4dd)]!=null)[_0x52833e(0x502)];_0x5c59d6(!![],'processes:\x20'+_0x26d9d4[_0x52833e(0x502)]+_0x52833e(0x62a)+(_0x26d9d4[_0x52833e(0x502)]===0x1?'':'es')+'\x20('+_0x488cfb+_0x52833e(0x5ed));}finally{await _0x5d95c4[_0x52833e(0x3e8)]();}}catch{}console[_0x52833e(0x4a2)](''),_0x2bb57a?console['log'](_0x52833e(0x48b)):(console[_0x52833e(0x4a2)](_0x52833e(0x3af)),process[_0x52833e(0x46e)](0x1));}async function _0x39f314(){const _0x160cfd=_0x39b60e,_0x15da0b=_0x1a92f7[_0x160cfd(0x271)](_0x160cfd(0x218));!_0x480a7a[_0x160cfd(0x41a)](_0x15da0b)?(_0x480a7a[_0x160cfd(0x602)](_0x15da0b,JSON[_0x160cfd(0x481)]({'port':0x2124,'path':'./okdb-data','logLevel':'info','noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x160cfd(0x4a2)](_0x160cfd(0x28c))):console[_0x160cfd(0x4a2)]('[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping');const _0xcb7c5b=_0x1a92f7[_0x160cfd(0x271)](_0x160cfd(0x57f));!_0x480a7a[_0x160cfd(0x41a)](_0xcb7c5b)?(_0x480a7a[_0x160cfd(0x246)](_0xcb7c5b,{'recursive':!![]}),console['log']('[okdb]\x20created\x20./okdb-data')):console['log']('[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping'),console[_0x160cfd(0x4a2)]('\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a');}async function _0x159c46(_0x551965){const _0x28b5ff=_0x39b60e,_0x43d7d8=_0x1a92f7[_0x28b5ff(0x271)](_0x551965[_0x28b5ff(0x22b)]);if(!_0x480a7a['existsSync'](_0x43d7d8)){console[_0x28b5ff(0x4a2)](_0x28b5ff(0x40e)+_0x43d7d8+_0x28b5ff(0x56f));return;}const _0x460305=require$$0$3,_0x1c62a9=_0x460305[_0x28b5ff(0x3d6)]({'input':process[_0x28b5ff(0x4f0)],'output':process['stdout']}),_0x29b5ca=await new Promise(_0xf20a99=>_0x1c62a9[_0x28b5ff(0x667)](_0x28b5ff(0x324)+_0x43d7d8+_0x28b5ff(0x511),_0xf20a99));_0x1c62a9['close'](),console[_0x28b5ff(0x4a2)]('');if(_0x29b5ca['trim']()['toLowerCase']()!=='yes'){console[_0x28b5ff(0x4a2)](_0x28b5ff(0x249));return;}let _0x52cc92=null;try{_0x52cc92=await _0x20f8d2(_0x43d7d8,_0x551965,async _0x54c4a0=>{const _0x44650a=_0x28b5ff,_0x121edb=_0x54c4a0[_0x44650a(0x53b)],_0x12e42c=_0x121edb?.['db']?.[_0x44650a(0x64f)](_0x44650a(0x36c))??null,_0x4991d6=[];if(_0x121edb?.[_0x44650a(0x258)]('~licenses'))for(const {key:_0x5290db,value:_0x3418e0}of _0x121edb[_0x44650a(0x416)](_0x44650a(0x556))){_0x4991d6[_0x44650a(0x59e)]({'key':_0x5290db,'value':_0x3418e0});}return{'identity':_0x12e42c,'licenses':_0x4991d6};});}catch(_0x2619ca){console[_0x28b5ff(0x4a2)]('[okdb]\x20warning:\x20could\x20not\x20read\x20node\x20identity/licenses\x20before\x20reset\x20('+_0x2619ca[_0x28b5ff(0x66f)]+_0x28b5ff(0x20f));}_0x480a7a['rmSync'](_0x43d7d8,{'recursive':!![],'force':!![]}),console['log'](_0x28b5ff(0x2a7)+_0x43d7d8+_0x28b5ff(0x371));if(_0x52cc92&&(_0x52cc92[_0x28b5ff(0x4ca)]||_0x52cc92[_0x28b5ff(0x4f9)][_0x28b5ff(0x502)]>0x0))try{await _0x20f8d2(_0x43d7d8,_0x551965,async _0x4cac45=>{const _0x44c545=_0x28b5ff,_0x37c130=_0x4cac45[_0x44c545(0x53b)];_0x52cc92['identity']&&_0x37c130['db'][_0x44c545(0x37b)](_0x44c545(0x36c),_0x52cc92[_0x44c545(0x4ca)]);if(_0x52cc92[_0x44c545(0x4f9)]['length']>0x0){if(!_0x37c130['hasType']('~licenses'))await _0x37c130['registerType'](_0x44c545(0x556));for(const {key:_0x47dacb,value:_0x5e45f1}of _0x52cc92[_0x44c545(0x4f9)]){await _0x37c130[_0x44c545(0x644)](_0x44c545(0x556),_0x47dacb,_0x5e45f1);}}});const _0x39a7cc=[];if(_0x52cc92[_0x28b5ff(0x4ca)])_0x39a7cc['push']('node\x20identity');if(_0x52cc92['licenses'][_0x28b5ff(0x502)]>0x0)_0x39a7cc[_0x28b5ff(0x59e)](_0x52cc92[_0x28b5ff(0x4f9)]['length']+'\x20license(s)');console['log']('[okdb]\x20preserved:\x20'+_0x39a7cc['join'](_0x28b5ff(0x2f1)));}catch(_0x2b6da8){console['log'](_0x28b5ff(0x4fd)+_0x2b6da8[_0x28b5ff(0x66f)]);}}async function _0x20f8d2(_0x2aedf5,_0x53184a,_0xe1b458){const _0x585e08=_0x39b60e,_0x3ffea4=require$$5,_0x3a2f81=new _0x3ffea4(_0x2aedf5,{'admin':![],'mcp':![],'http':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],..._0x365680(_0x53184a)});await _0x3a2f81['open']();try{return await _0xe1b458(_0x3a2f81);}finally{await _0x3a2f81[_0x585e08(0x3e8)]();}}async function _0x30c414(_0x8c5ca4,_0x1f290e){const _0x34929c=_0x39b60e,_0x512fba=require$$5,_0x23f268=_0x1a92f7[_0x34929c(0x271)](_0x1f290e[_0x34929c(0x22b)]);console[_0x34929c(0x4a2)](_0x34929c(0x317)+_0x23f268+'…');const _0x7ac699=new _0x512fba(_0x23f268,_0x365680(_0x1f290e));await _0x7ac699['open'](),console[_0x34929c(0x4a2)](_0x34929c(0x526)+_0x8c5ca4+'…');const {envs:_0x5a2198}=await _0x7ac699[_0x34929c(0x3a9)]['backup'](_0x8c5ca4);for(const _0x3a0324 of _0x5a2198){const _0x27d657=_0x3a0324[_0x34929c(0x486)]>0x0?_0x34929c(0x38c)+(_0x3a0324[_0x34929c(0x486)]/0x400/0x400)[_0x34929c(0x372)](0x2)+_0x34929c(0x682)+(_0x3a0324[_0x34929c(0x627)]/0x400/0x400)[_0x34929c(0x372)](0x2)+_0x34929c(0x4bf):'';console[_0x34929c(0x4a2)](_0x34929c(0x2dd)+_0x3a0324[_0x34929c(0x68d)]+_0x34929c(0x34e)+_0x3a0324[_0x34929c(0x483)]+_0x27d657);}await _0x7ac699['close'](),console['log']('[okdb]\x20backup\x20complete');}async function _0x2d02b6(_0x2f06c6,_0x5387ab,_0xc3e3b6){const _0x38dfb4=_0x39b60e,_0x567ab9=require$$5,_0x1b594e=_0x1a92f7[_0x38dfb4(0x271)](_0x5387ab[_0x38dfb4(0x22b)]),_0x5e031a=_0xc3e3b6[_0x38dfb4(0x2cb)]??_0x38dfb4(0x269),_0x272a29=_0xc3e3b6[_0x38dfb4(0x298)]?_0xc3e3b6[_0x38dfb4(0x298)]['split'](',')[_0x38dfb4(0x65d)](_0x2126e5=>_0x2126e5[_0x38dfb4(0x205)]()):null;console['log'](_0x38dfb4(0x317)+_0x1b594e+'…');const _0x5d69c2=new _0x567ab9(_0x1b594e,_0x365680(_0x5387ab));await _0x5d69c2['open'](),console[_0x38dfb4(0x4a2)](_0x38dfb4(0x673)+_0x5e031a+_0x38dfb4(0x56b)+_0x2f06c6+'…');const _0x3090f9=await _0x5d69c2['migrate'][_0x38dfb4(0x2fe)](_0x2f06c6,{'envName':_0x5e031a,'types':_0x272a29,'includeChanges':!!_0xc3e3b6[_0x38dfb4(0x500)]});console[_0x38dfb4(0x4a2)]('[okdb]\x20exported\x20\x20types='+_0x3090f9['types']+_0x38dfb4(0x2b6)+_0x3090f9[_0x38dfb4(0x436)]+_0x38dfb4(0x297)+_0x3090f9[_0x38dfb4(0x500)]);if(_0xc3e3b6[_0x38dfb4(0x641)]){const _0x372427=_0x1a92f7[_0x38dfb4(0x3b2)](_0x1a92f7['dirname'](_0x2f06c6),_0x38dfb4(0x641));process[_0x38dfb4(0x67c)][_0x38dfb4(0x37f)](_0x38dfb4(0x54f));const {count:_0x317e52,bytes:_0x5da450}=await _0x5d69c2[_0x38dfb4(0x3a9)]['exportBlobs'](_0x372427);console[_0x38dfb4(0x4a2)](_0x38dfb4(0x5eb)+_0x372427+_0x38dfb4(0x38c)+_0x317e52+_0x38dfb4(0x46c)+(_0x317e52!==0x1?'s':'')+',\x20'+(_0x5da450/0x400/0x400)[_0x38dfb4(0x372)](0x2)+_0x38dfb4(0x4bf));}await _0x5d69c2['close'](),console['log'](_0x38dfb4(0x4c8));}async function _0x13b5ae(_0x1e4d2f,_0x4694cf,_0x4a8fdf){const _0x5e8fd5=_0x39b60e,_0x19858c=require$$5,_0x1c90ba=_0x1a92f7[_0x5e8fd5(0x271)](_0x4694cf[_0x5e8fd5(0x22b)]),_0x5c1ec9=_0x4a8fdf[_0x5e8fd5(0x2cb)]??null,_0x6279f6=_0x4a8fdf[_0x5e8fd5(0x298)]?_0x4a8fdf['types'][_0x5e8fd5(0x648)](',')[_0x5e8fd5(0x65d)](_0x463701=>_0x463701['trim']()):null,_0x226667=!!_0x4a8fdf[_0x5e8fd5(0x4af)];console[_0x5e8fd5(0x4a2)](_0x5e8fd5(0x317)+_0x1c90ba+'…');const _0x5bb4b8=new _0x19858c(_0x1c90ba,_0x365680(_0x4694cf));await _0x5bb4b8[_0x5e8fd5(0x43c)](),console[_0x5e8fd5(0x4a2)](_0x5e8fd5(0x349)+_0x1e4d2f+'…');const _0x5b7ec4=await _0x5bb4b8['migrate'][_0x5e8fd5(0x343)](_0x1e4d2f,{'envName':_0x5c1ec9,'types':_0x6279f6,'dropExisting':_0x226667,'includeChanges':!!_0x4a8fdf[_0x5e8fd5(0x500)],'onProgress':({type:_0xc5d1b4,count:_0x41dc8e})=>{const _0x59b566=_0x5e8fd5;process[_0x59b566(0x67c)]['write'](_0x59b566(0x366)+_0xc5d1b4+':\x20'+_0x41dc8e+_0x59b566(0x3f0));}});process[_0x5e8fd5(0x67c)][_0x5e8fd5(0x37f)]('\x0a'),console['log'](_0x5e8fd5(0x51d)+_0x5b7ec4['types']+'\x20\x20records='+_0x5b7ec4['records']+_0x5e8fd5(0x297)+_0x5b7ec4['changes']);if(_0x4a8fdf[_0x5e8fd5(0x641)]){const _0x119f20=_0x1a92f7[_0x5e8fd5(0x3b2)](_0x1a92f7[_0x5e8fd5(0x23f)](_0x1e4d2f),_0x5e8fd5(0x641));if(_0x480a7a[_0x5e8fd5(0x41a)](_0x119f20)){const {imported:_0x5dc980,skipped:_0x5c22eb}=await _0x5bb4b8['migrate'][_0x5e8fd5(0x331)](_0x119f20);console['log'](_0x5e8fd5(0x66e)+_0x5dc980+_0x5e8fd5(0x337)+_0x5c22eb);}}await _0x5bb4b8['close'](),console[_0x5e8fd5(0x4a2)](_0x5e8fd5(0x612));}async function _0x3e8a76(_0x544e6a,_0x37ca48){const _0x76d554=_0x39b60e;_0x37ca48[_0x76d554(0x628)]&&!_0x37ca48[_0x76d554(0x68d)]&&(console[_0x76d554(0x5b3)](_0x76d554(0x27f)),process[_0x76d554(0x46e)](0x1));const _0x27f5c6=_0x37ca48[_0x76d554(0x455)]?_0x37ca48[_0x76d554(0x455)][_0x76d554(0x648)](',')[_0x76d554(0x65d)](_0x5a021f=>_0x5a021f[_0x76d554(0x205)]())[_0x76d554(0x200)](Boolean):[];let _0x570cbe={};if(_0x37ca48[_0x76d554(0x551)])try{_0x570cbe=JSON['parse'](_0x37ca48[_0x76d554(0x551)]);if(typeof _0x570cbe!==_0x76d554(0x65b)||Array[_0x76d554(0x65a)](_0x570cbe)||_0x570cbe===null)throw new Error();}catch{console['error'](_0x76d554(0x27e)),process[_0x76d554(0x46e)](0x1);}const _0x3f0d33=require$$5,{randomToken:_0x188b1d,hashToken:_0x4dfd89,hashPassword:_0x5ef47e}=requireOkdbAuthTokens(),_0x384bf0=require$$0$1,_0x58dae5=_0x1a92f7['resolve'](_0x544e6a[_0x76d554(0x22b)]),_0x445c98=new _0x3f0d33(_0x58dae5,_0x365680(_0x544e6a));await _0x445c98['open']();try{await _0x445c98['auth'][_0x76d554(0x234)]();if(_0x37ca48['name']){const _0x438ff1=await _0x445c98[_0x76d554(0x382)]['_lookupByName'](_0x37ca48[_0x76d554(0x68d)]);_0x438ff1&&(console[_0x76d554(0x5b3)](_0x76d554(0x242)+_0x37ca48[_0x76d554(0x68d)]+_0x76d554(0x2ec)),process[_0x76d554(0x46e)](0x1));}const _0x17f21d=_0x188b1d(0x20),_0x4c2434=_0x4dfd89(_0x17f21d),_0x3b0dae=_0x37ca48[_0x76d554(0x628)]?await _0x5ef47e(_0x37ca48[_0x76d554(0x628)]):null,_0xe8794d=_0x384bf0['randomUUID'](),_0x2f4d11={'tokenHash':_0x4c2434,'name':_0x37ca48[_0x76d554(0x68d)]||null,'passwordHash':_0x3b0dae,'label':_0x37ca48[_0x76d554(0x64d)]||null,'permissions':_0x27f5c6,'grants':_0x570cbe,'createdAt':Date[_0x76d554(0x387)](),'lastUsedAt':null},_0x19d9ba=_0x37ca48[_0x76d554(0x3dd)]?{'ttl':Number(_0x37ca48['ttl'])}:undefined;await _0x445c98[_0x76d554(0x53b)]['put'](_0x76d554(0x4be),_0xe8794d,_0x2f4d11,_0x19d9ba),console[_0x76d554(0x4a2)](_0x76d554(0x2c7)),console[_0x76d554(0x4a2)](_0x76d554(0x240)+_0xe8794d),console[_0x76d554(0x4a2)](_0x76d554(0x2eb)+(_0x37ca48[_0x76d554(0x68d)]||_0x76d554(0x675))),console['log']('\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20'+(_0x37ca48[_0x76d554(0x64d)]||_0x76d554(0x675))),console[_0x76d554(0x4a2)](_0x76d554(0x2a8)+(_0x27f5c6[_0x76d554(0x3b2)](',\x20')||_0x76d554(0x630))),console['log'](_0x76d554(0x5b8)),console['log'](_0x76d554(0x1c4)+_0x17f21d+'\x0a');}finally{await _0x445c98['close']();}}async function _0xd5e3bd(_0x23c3f2){const _0x54fc2f=_0x39b60e,_0x17d95d=require$$5,_0x220e15=_0x1a92f7[_0x54fc2f(0x271)](_0x23c3f2[_0x54fc2f(0x22b)]),_0x5bcce7=new _0x17d95d(_0x220e15,_0x365680(_0x23c3f2));await _0x5bcce7[_0x54fc2f(0x43c)]();try{const _0xa40d4b=_0x5bcce7[_0x54fc2f(0x53b)];if(!_0xa40d4b||!_0xa40d4b[_0x54fc2f(0x258)](_0x54fc2f(0x4be))){console[_0x54fc2f(0x4a2)]('No\x20tokens.');return;}const _0x4ab782=[];for(const {key:_0x4906ad,value:_0x5a6348}of _0xa40d4b[_0x54fc2f(0x416)](_0x54fc2f(0x4be))){_0x4ab782['push']({'id':_0x4906ad,'name':_0x5a6348[_0x54fc2f(0x68d)]||_0x54fc2f(0x675),'label':_0x5a6348['label']||_0x54fc2f(0x675),'permissions':Array[_0x54fc2f(0x65a)](_0x5a6348['permissions'])?_0x5a6348['permissions'][_0x54fc2f(0x3b2)](','):'','created':_0x5a6348[_0x54fc2f(0x495)]?new Date(_0x5a6348[_0x54fc2f(0x495)])['toISOString']()[_0x54fc2f(0x2a1)](0x0,0xa):''});}if(_0x4ab782['length']===0x0){console[_0x54fc2f(0x4a2)]('No\x20tokens.');return;}const _0x47a2d9=!process['stdout'][_0x54fc2f(0x2b3)]||process[_0x54fc2f(0x67c)][_0x54fc2f(0x2b3)]>=0x64,_0x2d16e7=_0x47a2d9?0x24:0xa,_0x99b688=['ID'[_0x54fc2f(0x1d8)](_0x2d16e7),'NAME'[_0x54fc2f(0x1d8)](0x10),'LABEL'['padEnd'](0x14),'PERMISSIONS'[_0x54fc2f(0x1d8)](0x14),_0x54fc2f(0x368)][_0x54fc2f(0x3b2)]('\x20\x20');console[_0x54fc2f(0x4a2)]('\x0a'+_0x99b688),console[_0x54fc2f(0x4a2)]('-'[_0x54fc2f(0x2e6)](_0x99b688[_0x54fc2f(0x502)]));for(const _0x6ba8ae of _0x4ab782){const _0x51a5dc=_0x47a2d9?_0x6ba8ae['id']:_0x6ba8ae['id'][_0x54fc2f(0x2a1)](0x0,0x8)+'…';console[_0x54fc2f(0x4a2)]([_0x51a5dc[_0x54fc2f(0x1d8)](_0x2d16e7),_0x6ba8ae['name'][_0x54fc2f(0x2a1)](0x0,0x10)[_0x54fc2f(0x1d8)](0x10),_0x6ba8ae[_0x54fc2f(0x64d)]['slice'](0x0,0x14)[_0x54fc2f(0x1d8)](0x14),_0x6ba8ae[_0x54fc2f(0x455)][_0x54fc2f(0x2a1)](0x0,0x14)['padEnd'](0x14),_0x6ba8ae['created']][_0x54fc2f(0x3b2)]('\x20\x20'));}console[_0x54fc2f(0x4a2)]('');}finally{await _0x5bcce7['close']();}}async function _0xbb77f5(_0x5e105f,_0x514871){const _0x1fed91=_0x39b60e;!_0x5e105f&&(console[_0x1fed91(0x5b3)]('[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument'),process[_0x1fed91(0x46e)](0x1));const _0x4c96a6=require$$5,_0x47a6d0=_0x1a92f7['resolve'](_0x514871['dbPath']),_0x5cea56=new _0x4c96a6(_0x47a6d0,_0x365680(_0x514871));await _0x5cea56['open']();try{const _0xefeb42=_0x5cea56[_0x1fed91(0x53b)];(!_0xefeb42||!_0xefeb42['hasType']('~tokens'))&&(console['error'](_0x1fed91(0x531)+_0x5e105f+'\x22'),process[_0x1fed91(0x46e)](0x1));let _0x34e07b=null,_0x40ef6e=null;const _0x9b87a9=_0xefeb42[_0x1fed91(0x64f)]('~tokens',_0x5e105f);if(_0x9b87a9)_0x34e07b=_0x5e105f,_0x40ef6e=_0x9b87a9;else{const _0x49cbc8=[];for(const {key:_0x1aa888,value:_0x1e4ce6}of _0xefeb42[_0x1fed91(0x416)](_0x1fed91(0x4be))){if(_0x1aa888[_0x1fed91(0x2f6)](_0x5e105f))_0x49cbc8[_0x1fed91(0x59e)]({'key':_0x1aa888,'value':_0x1e4ce6});}_0x49cbc8[_0x1fed91(0x502)]===0x0&&(console['error']('[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22'+_0x5e105f+'\x22'),process[_0x1fed91(0x46e)](0x1));if(_0x49cbc8[_0x1fed91(0x502)]>0x1){console[_0x1fed91(0x5b3)](_0x1fed91(0x314)+_0x5e105f+_0x1fed91(0x4e5)+_0x49cbc8[_0x1fed91(0x502)]+'\x20tokens:');for(const _0x3e35d1 of _0x49cbc8){console[_0x1fed91(0x5b3)]('\x20\x20'+_0x3e35d1[_0x1fed91(0x528)]+_0x1fed91(0x4c1)+(_0x3e35d1[_0x1fed91(0x3f2)][_0x1fed91(0x68d)]||_0x1fed91(0x675))+')');}process[_0x1fed91(0x46e)](0x1);}_0x34e07b=_0x49cbc8[0x0][_0x1fed91(0x528)],_0x40ef6e=_0x49cbc8[0x0][_0x1fed91(0x3f2)];}await _0xefeb42[_0x1fed91(0x66c)](_0x1fed91(0x4be),_0x34e07b),console[_0x1fed91(0x4a2)](_0x1fed91(0x25c)+_0x34e07b+_0x1fed91(0x4c1)+(_0x40ef6e[_0x1fed91(0x68d)]||_0x1fed91(0x675))+_0x1fed91(0x635)+(_0x40ef6e[_0x1fed91(0x64d)]||_0x1fed91(0x675))+')');}finally{await _0x5cea56[_0x1fed91(0x3e8)]();}}function _0x55f238(_0x14009b,_0x1dccf){const _0x4f4039=_0x39b60e;if(!_0x14009b[_0x4f4039(0x5a0)])return'pending';const _0x1b5324=_0x14009b[_0x4f4039(0x642)];if(!_0x1b5324)return _0x4f4039(0x4ee);if(_0x1dccf>_0x1b5324)return'expired';return'active';}function _0x37c84c(_0x3388ff){const _0x261c11=_0x39b60e;if(!_0x3388ff||typeof _0x3388ff!=='object')return'';const _0x1dc55b=Object[_0x261c11(0x4b8)](_0x3388ff)['filter'](([,_0x13e557])=>_0x13e557)[_0x261c11(0x65d)](([_0x79c089])=>_0x79c089);if(_0x1dc55b[_0x261c11(0x502)]===0x0)return'(none)';if(_0x1dc55b[_0x261c11(0x502)]<=0x3)return _0x1dc55b[_0x261c11(0x3b2)]('\x20');return _0x1dc55b[_0x261c11(0x2a1)](0x0,0x3)[_0x261c11(0x3b2)]('\x20')+('\x20+'+(_0x1dc55b[_0x261c11(0x502)]-0x3));}async function _0x4a6f19(_0x21c340){const _0x166d2c=_0x39b60e,_0xd303b7=require$$5,_0x534ec3=requireOkdbLicenseCodec(),{_C:_0x1ff721}=requireOkdbLicense(),_0x3bae7f=_0x1a92f7[_0x166d2c(0x271)](_0x21c340[_0x166d2c(0x22b)]),_0x5e240f=new _0xd303b7(_0x3bae7f,_0x365680(_0x21c340));await _0x5e240f[_0x166d2c(0x43c)]();try{const _0x449592=_0x5e240f['_systemEnv'],_0x2da32e=_0x449592?.['db']?.[_0x166d2c(0x64f)]?.(_0x166d2c(0x67d))??0x0,_0x2fa7dd=[..._0x5e240f[_0x166d2c(0x4f4)][_0x166d2c(0x577)]()][_0x166d2c(0x200)](_0x5b1fca=>!_0x5b1fca[_0x166d2c(0x2f6)]('~'))[_0x166d2c(0x502)],_0x541876=_0x5e240f[_0x166d2c(0x319)]?.[_0x166d2c(0x5ce)];if(_0x541876){const _0x32a98b=_0x541876[_0x166d2c(0x470)]===!![],_0x6dfffa=_0x32a98b?_0x166d2c(0x5af):_0x5e240f[_0x166d2c(0x319)][_0x166d2c(0x4ee)]?.[_0x166d2c(0x482)]||_0x166d2c(0x480);console[_0x166d2c(0x4a2)](''),console['log'](_0x166d2c(0x417)+_0x6dfffa);const _0x2a680f=_0x541876[_0x166d2c(0x47c)]||{};if(_0x2a680f[_0x166d2c(0x3ff)]){const _0x45f87b=Math[_0x166d2c(0x3ef)](_0x2da32e/_0x2a680f[_0x166d2c(0x3ff)]*0x64);console[_0x166d2c(0x4a2)](_0x166d2c(0x2fc)+_0x2da32e[_0x166d2c(0x3cc)]()+_0x166d2c(0x443)+_0x2a680f[_0x166d2c(0x3ff)][_0x166d2c(0x3cc)]()+'\x20\x20('+_0x45f87b+'%)');}else console['log'](_0x166d2c(0x2fc)+_0x2da32e['toLocaleString']());_0x2a680f[_0x166d2c(0x61a)]?console[_0x166d2c(0x4a2)](_0x166d2c(0x391)+_0x2fa7dd+_0x166d2c(0x443)+_0x2a680f[_0x166d2c(0x61a)]):console[_0x166d2c(0x4a2)]('\x20\x20Envs:\x20\x20\x20\x20'+_0x2fa7dd),_0x1ff721?.[_0x166d2c(0x1eb)]&&console[_0x166d2c(0x4a2)](_0x166d2c(0x20e)+_0x1ff721[_0x166d2c(0x1eb)]+_0x166d2c(0x59f));}if(!_0x449592||!_0x449592[_0x166d2c(0x258)](_0x166d2c(0x556))){console['log'](''),console[_0x166d2c(0x4a2)]('\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.'),console[_0x166d2c(0x4a2)]('');return;}const _0x33c1e6=[],_0x338792=Date[_0x166d2c(0x387)](),_0x15675c=_0x5e240f['id'],_0x38eaa1=_0x166d2c(0x3ab);for(const {key:_0x36195e,value:_0x4681b7}of _0x449592['getRange'](_0x166d2c(0x556))){const _0x4541ca=_0x4681b7[_0x166d2c(0x215)]?Buffer[_0x166d2c(0x1c3)](_0x4681b7[_0x166d2c(0x215)],_0x166d2c(0x2b5)):Buffer[_0x166d2c(0x273)](0x8);let _0x18fa63='';try{_0x18fa63=_0x534ec3['derivePin'](_0x15675c,_0x4541ca,_0x38eaa1)[_0x166d2c(0x567)];}catch{}_0x33c1e6[_0x166d2c(0x59e)]({'id':_0x36195e,'licensee':_0x4681b7[_0x166d2c(0x482)]||'','expires':_0x4681b7[_0x166d2c(0x642)]?new Date(_0x4681b7[_0x166d2c(0x642)])[_0x166d2c(0x1fd)]()[_0x166d2c(0x2a1)](0x0,0xa):'','features':_0x37c84c(_0x4681b7[_0x166d2c(0x39d)]),'pin':_0x18fa63,'status':_0x55f238(_0x4681b7,_0x338792)});}if(_0x33c1e6[_0x166d2c(0x502)]===0x0){console[_0x166d2c(0x4a2)](''),console['log']('\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.'),console['log']('');return;}const _0xd450e=['\x20\x20'+'ID'[_0x166d2c(0x1d8)](0xe),_0x166d2c(0x523)['padEnd'](0xe),'EXPIRES'[_0x166d2c(0x1d8)](0xc),_0x166d2c(0x40a)[_0x166d2c(0x1d8)](0x1e),_0x166d2c(0x597)['padEnd'](0xa),_0x166d2c(0x5d2)][_0x166d2c(0x3b2)]('\x20');console['log']('\x0a'+_0xd450e);for(const _0x354260 of _0x33c1e6){const _0x379d12=_0x354260['id'][_0x166d2c(0x2a1)](0x0,0x8)+'…';console[_0x166d2c(0x4a2)](['\x20\x20'+_0x379d12[_0x166d2c(0x1d8)](0xe),_0x354260['licensee'][_0x166d2c(0x2a1)](0x0,0xe)['padEnd'](0xe),_0x354260[_0x166d2c(0x2fb)][_0x166d2c(0x1d8)](0xc),_0x354260[_0x166d2c(0x39d)]['slice'](0x0,0x1e)[_0x166d2c(0x1d8)](0x1e),_0x354260[_0x166d2c(0x567)]['padEnd'](0xa),_0x354260[_0x166d2c(0x36f)]][_0x166d2c(0x3b2)]('\x20'));}console['log']('');}finally{await _0x5e240f[_0x166d2c(0x3e8)]();}}async function _0x239a84(_0x325dbe,_0x79261e){const _0x51109f=_0x39b60e,_0x248f9d=require$$5,_0x1478f4=requireOkdbLicenseCodec();let _0x2c5054=_0x325dbe;(_0x1478f4[_0x51109f(0x4f1)](_0x325dbe)==='path'||_0x480a7a[_0x51109f(0x41a)](_0x325dbe)&&_0x480a7a['statSync'](_0x325dbe)[_0x51109f(0x46b)]())&&(_0x2c5054=_0x480a7a[_0x51109f(0x5d4)](_0x325dbe,'utf8')[_0x51109f(0x205)]());const _0x298805=_0x1a92f7[_0x51109f(0x271)](_0x79261e[_0x51109f(0x22b)]),_0x180ba9=new _0x248f9d(_0x298805,_0x365680(_0x79261e));await _0x180ba9[_0x51109f(0x43c)]();try{!_0x180ba9[_0x51109f(0x319)]&&(console[_0x51109f(0x5b3)]('[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).'),process['exit'](0x1));let _0x3d9330;try{_0x3d9330=await _0x180ba9[_0x51109f(0x319)]['addLicense'](_0x2c5054);}catch(_0x5e9b60){console[_0x51109f(0x5b3)](_0x51109f(0x307)+_0x5e9b60['message']),process[_0x51109f(0x46e)](0x1);}const _0xffe6ba=_0x180ba9[_0x51109f(0x319)]['getPins'](),_0x3206d5=_0xffe6ba[_0x51109f(0x222)](_0x3b010c=>_0x3b010c[_0x51109f(0x2b4)]===_0x3d9330['id'])?.['pin']||'',_0x7a9d10=Object[_0x51109f(0x4b8)](_0x3d9330[_0x51109f(0x39d)]||{})[_0x51109f(0x200)](([,_0x2f33a5])=>_0x2f33a5)['map'](([_0x25d83c])=>_0x25d83c),_0x202269=_0x3d9330[_0x51109f(0x47c)]||{},_0x35ddb2=[_0x202269[_0x51109f(0x61a)]?_0x51109f(0x1dd)+_0x202269[_0x51109f(0x61a)]:null,_0x202269[_0x51109f(0x3e2)]?_0x51109f(0x381)+_0x202269[_0x51109f(0x3e2)]:null,_0x202269[_0x51109f(0x3e5)]?_0x51109f(0x650)+_0x202269[_0x51109f(0x3e5)]:null,_0x202269[_0x51109f(0x3ff)]?_0x51109f(0x45a)+_0x202269[_0x51109f(0x3ff)][_0x51109f(0x3cc)]():null][_0x51109f(0x200)](Boolean)['join']('\x20\x20'),_0x416c50=_0x3d9330['licenseType']===_0x1478f4['LICENSE_TYPE_OPEN'];console[_0x51109f(0x4a2)](_0x51109f(0x540)),console[_0x51109f(0x4a2)](_0x51109f(0x20b)+_0x3d9330['id']),console[_0x51109f(0x4a2)](_0x51109f(0x41b)+_0x3d9330[_0x51109f(0x482)]),console[_0x51109f(0x4a2)]('\x20\x20\x20\x20expires:\x20\x20\x20'+new Date(_0x3d9330['expiresAt'])[_0x51109f(0x1fd)]()[_0x51109f(0x2a1)](0x0,0xa)),console[_0x51109f(0x4a2)](_0x51109f(0x3f6)+(_0x7a9d10[_0x51109f(0x3b2)](',\x20')||_0x51109f(0x630)));if(_0x35ddb2)console[_0x51109f(0x4a2)]('\x20\x20\x20\x20limits:\x20\x20\x20\x20'+_0x35ddb2);_0x416c50?(console[_0x51109f(0x4a2)]('\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)'),console[_0x51109f(0x4a2)]('')):(console['log'](_0x51109f(0x5cf)+_0x3206d5),console['log'](_0x51109f(0x365)),console[_0x51109f(0x4a2)](''),console[_0x51109f(0x4a2)](_0x51109f(0x471)),console[_0x51109f(0x4a2)](_0x51109f(0x37a)+_0x3206d5+_0x51109f(0x59c)),console[_0x51109f(0x4a2)](_0x51109f(0x63f)),console[_0x51109f(0x4a2)](_0x51109f(0x4b0)),console['log'](''));}finally{await _0x180ba9[_0x51109f(0x3e8)]();}}async function _0x42df0d(_0x1e7d7a,_0xb96ced){const _0x2c4db4=_0x39b60e,_0x2dc23e=require$$5,_0x369cda=_0x1a92f7[_0x2c4db4(0x271)](_0xb96ced[_0x2c4db4(0x22b)]),_0x2088ed=new _0x2dc23e(_0x369cda,_0x365680(_0xb96ced));await _0x2088ed[_0x2c4db4(0x43c)]();try{!_0x2088ed[_0x2c4db4(0x319)]&&(console[_0x2c4db4(0x5b3)](_0x2c4db4(0x62f)),process['exit'](0x1));let _0x3944ed;try{_0x3944ed=await _0x2088ed[_0x2c4db4(0x319)][_0x2c4db4(0x300)](_0x1e7d7a[_0x2c4db4(0x205)]());}catch(_0x55d191){console[_0x2c4db4(0x5b3)](_0x2c4db4(0x307)+_0x55d191['message']),console[_0x2c4db4(0x5b3)](''),console[_0x2c4db4(0x5b3)]('\x20\x20Common\x20causes:'),console[_0x2c4db4(0x5b3)](_0x2c4db4(0x61e)),console[_0x2c4db4(0x5b3)](_0x2c4db4(0x616)),console[_0x2c4db4(0x5b3)](_0x2c4db4(0x20d)),console['error'](''),process[_0x2c4db4(0x46e)](0x1);}console[_0x2c4db4(0x4a2)]('\x0a\x20\x20✓\x20License\x20activated'),console[_0x2c4db4(0x4a2)](_0x2c4db4(0x20b)+_0x3944ed['id']),console['log']('\x20\x20\x20\x20licensee:\x20\x20'+_0x3944ed[_0x2c4db4(0x482)]),console[_0x2c4db4(0x4a2)](_0x2c4db4(0x5ba)+new Date(_0x3944ed[_0x2c4db4(0x642)])[_0x2c4db4(0x1fd)]()[_0x2c4db4(0x2a1)](0x0,0xa)),console[_0x2c4db4(0x4a2)](_0x2c4db4(0x437)),console[_0x2c4db4(0x4a2)]('');}finally{await _0x2088ed['close']();}}async function _0x431cb3(_0x9036,_0x3820c4){const _0x1d55e9=_0x39b60e;!_0x9036&&(console[_0x1d55e9(0x5b3)]('[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument'),process[_0x1d55e9(0x46e)](0x1));const _0xbe5b9a=require$$5,_0x458d1b=requireOkdbLicenseCodec(),_0x4b94a=_0x1a92f7[_0x1d55e9(0x271)](_0x3820c4[_0x1d55e9(0x22b)]),_0x10afe8=new _0xbe5b9a(_0x4b94a,_0x365680(_0x3820c4));await _0x10afe8['open']();try{const _0x576394=_0x10afe8['_systemEnv'];(!_0x576394||!_0x576394[_0x1d55e9(0x258)](_0x1d55e9(0x556)))&&(console['error'](_0x1d55e9(0x26d)+_0x9036+'\x22'),process[_0x1d55e9(0x46e)](0x1));let _0x3dc201=null,_0x96736b=null;const _0x47cea7=_0x576394[_0x1d55e9(0x64f)](_0x1d55e9(0x556),_0x9036);if(_0x47cea7)_0x3dc201=_0x9036,_0x96736b=_0x47cea7;else{const _0x4f82b1=[];for(const {key:_0x43f5e2,value:_0x566f3d}of _0x576394[_0x1d55e9(0x416)]('~licenses')){if(_0x43f5e2['startsWith'](_0x9036))_0x4f82b1[_0x1d55e9(0x59e)]({'key':_0x43f5e2,'value':_0x566f3d});}_0x4f82b1[_0x1d55e9(0x502)]===0x0&&(console[_0x1d55e9(0x5b3)](_0x1d55e9(0x26d)+_0x9036+'\x22'),process['exit'](0x1)),_0x4f82b1['length']>0x1&&(console[_0x1d55e9(0x5b3)](_0x1d55e9(0x314)+_0x9036+'\x22\x20matches\x20'+_0x4f82b1['length']+_0x1d55e9(0x301)),process['exit'](0x1)),_0x3dc201=_0x4f82b1[0x0]['key'],_0x96736b=_0x4f82b1[0x0]['value'];}const _0x48bcd1=Date[_0x1d55e9(0x387)](),_0x1a2b3f=_0x55f238(_0x96736b,_0x48bcd1),_0x1dd25e=_0x10afe8['id'],_0x3ce9a7=_0x1d55e9(0x3ab);let _0xd81542='';try{const _0x33c9d1=Buffer[_0x1d55e9(0x1c3)](_0x96736b['_licenseHash'],_0x1d55e9(0x2b5));_0xd81542=_0x458d1b[_0x1d55e9(0x5da)](_0x1dd25e,_0x33c9d1,_0x3ce9a7)[_0x1d55e9(0x567)];}catch{}const _0x37e80b=_0x96736b[_0x1d55e9(0x39d)]?Object['entries'](_0x96736b[_0x1d55e9(0x39d)])[_0x1d55e9(0x200)](([,_0x272dae])=>_0x272dae)[_0x1d55e9(0x65d)](([_0x26fa03])=>_0x26fa03):[],_0x29b6c=_0x96736b[_0x1d55e9(0x47c)]||{},_0x2be167=_0x576394?.['db']?.[_0x1d55e9(0x64f)]?.(_0x1d55e9(0x67d))??0x0,_0x36ea8e=[..._0x10afe8['_envs'][_0x1d55e9(0x577)]()][_0x1d55e9(0x200)](_0xaf2001=>!_0xaf2001[_0x1d55e9(0x2f6)]('~'))[_0x1d55e9(0x502)];console['log'](_0x1d55e9(0x521)),console[_0x1d55e9(0x4a2)](_0x1d55e9(0x20b)+_0x3dc201),console[_0x1d55e9(0x4a2)](_0x1d55e9(0x41b)+(_0x96736b['licensee']||'')),console['log'](_0x1d55e9(0x5ba)+(_0x96736b[_0x1d55e9(0x642)]?new Date(_0x96736b[_0x1d55e9(0x642)])[_0x1d55e9(0x1fd)]()[_0x1d55e9(0x2a1)](0x0,0xa):'')),console['log'](_0x1d55e9(0x3f6)+(_0x37e80b['join'](',\x20')||_0x1d55e9(0x630))),console['log'](_0x1d55e9(0x5cf)+_0xd81542),console[_0x1d55e9(0x4a2)]('\x20\x20\x20\x20status:\x20\x20\x20\x20'+_0x1a2b3f),console[_0x1d55e9(0x4a2)](_0x1d55e9(0x49d)+new Date(_0x96736b[_0x1d55e9(0x44b)])['toISOString']());if(_0x1a2b3f===_0x1d55e9(0x4ee)){console[_0x1d55e9(0x4a2)](''),console[_0x1d55e9(0x4a2)](_0x1d55e9(0x25b));if(_0x29b6c[_0x1d55e9(0x3ff)]){const _0x5ec977=Math[_0x1d55e9(0x3ef)](_0x2be167/_0x29b6c[_0x1d55e9(0x3ff)]*0x64);console['log'](_0x1d55e9(0x55c)+_0x2be167[_0x1d55e9(0x3cc)]()+_0x1d55e9(0x443)+_0x29b6c['maxWrites']['toLocaleString']()+_0x1d55e9(0x38c)+_0x5ec977+'%)');}else console[_0x1d55e9(0x4a2)](_0x1d55e9(0x55c)+_0x2be167[_0x1d55e9(0x3cc)]()+_0x1d55e9(0x4c7));_0x29b6c[_0x1d55e9(0x61a)]?console['log'](_0x1d55e9(0x64e)+_0x36ea8e+_0x1d55e9(0x443)+_0x29b6c[_0x1d55e9(0x61a)]):console[_0x1d55e9(0x4a2)](_0x1d55e9(0x64e)+_0x36ea8e+_0x1d55e9(0x4c7));}console[_0x1d55e9(0x4a2)]('');}finally{await _0x10afe8[_0x1d55e9(0x3e8)]();}}async function _0x15260f(_0x2abfb2,_0x50a761){const _0x45bc3d=_0x39b60e;!_0x2abfb2&&(console[_0x45bc3d(0x5b3)](_0x45bc3d(0x515)),process[_0x45bc3d(0x46e)](0x1));const _0x2cabe7=require$$5,_0x3ea6cb=_0x1a92f7[_0x45bc3d(0x271)](_0x50a761[_0x45bc3d(0x22b)]),_0x25d460=new _0x2cabe7(_0x3ea6cb,_0x365680(_0x50a761));await _0x25d460['open']();try{const _0x35423c=_0x25d460[_0x45bc3d(0x53b)];(!_0x35423c||!_0x35423c['hasType'](_0x45bc3d(0x556)))&&(console[_0x45bc3d(0x5b3)](_0x45bc3d(0x26d)+_0x2abfb2+'\x22'),process[_0x45bc3d(0x46e)](0x1));let _0x5787f9=null,_0x2ce0bd=null;const _0xa1f73d=_0x35423c[_0x45bc3d(0x64f)](_0x45bc3d(0x556),_0x2abfb2);if(_0xa1f73d)_0x5787f9=_0x2abfb2,_0x2ce0bd=_0xa1f73d;else{const _0x4ef865=[];for(const {key:_0x5ddf3d,value:_0x2e6236}of _0x35423c[_0x45bc3d(0x416)](_0x45bc3d(0x556))){if(_0x5ddf3d[_0x45bc3d(0x2f6)](_0x2abfb2))_0x4ef865[_0x45bc3d(0x59e)]({'key':_0x5ddf3d,'value':_0x2e6236});}_0x4ef865['length']===0x0&&(console[_0x45bc3d(0x5b3)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x2abfb2+'\x22'),process[_0x45bc3d(0x46e)](0x1)),_0x4ef865['length']>0x1&&(console['error'](_0x45bc3d(0x314)+_0x2abfb2+_0x45bc3d(0x4e5)+_0x4ef865['length']+_0x45bc3d(0x301)),process[_0x45bc3d(0x46e)](0x1)),_0x5787f9=_0x4ef865[0x0][_0x45bc3d(0x528)],_0x2ce0bd=_0x4ef865[0x0][_0x45bc3d(0x3f2)];}await _0x35423c[_0x45bc3d(0x66c)](_0x45bc3d(0x556),_0x5787f9),console['log'](_0x45bc3d(0x5f1)+_0x5787f9+_0x45bc3d(0x325)+(_0x2ce0bd['licensee']||_0x45bc3d(0x675))+')');}finally{await _0x25d460[_0x45bc3d(0x3e8)]();}}async function _0x2de88e(_0x1f0f93,_0x4adbff,_0x3556d4){const _0x4e3070=_0x39b60e;!_0x1f0f93&&(console['error'](_0x4e3070(0x422)),process[_0x4e3070(0x46e)](0x1));!_0x3556d4['token']&&!(_0x3556d4[_0x4e3070(0x684)]&&_0x3556d4[_0x4e3070(0x628)])&&(console[_0x4e3070(0x5b3)](_0x4e3070(0x47b)),process[_0x4e3070(0x46e)](0x1));const _0x29cbdc=_0x3556d4['selfAddress']||_0x4adbff[_0x4e3070(0x4fa)]?.['address'];!_0x29cbdc&&(console[_0x4e3070(0x5b3)]('[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a'+_0x4e3070(0x434)+_0x4e3070(0x5c3)),process[_0x4e3070(0x46e)](0x1));const _0x3f8f85=require$$5,_0x84634e=new _0x3f8f85(_0x4adbff['dbPath'],{'sync':{'address':_0x29cbdc,'auto_reconcile':![]}});await _0x84634e[_0x4e3070(0x43c)]();try{const _0x237150=_0x84634e[_0x4e3070(0x53b)];if(_0x237150&&_0x237150[_0x4e3070(0x258)](_0x4e3070(0x4be))){let _0x1b4202=![];for(const _0xfeaf0d of _0x237150[_0x4e3070(0x416)](_0x4e3070(0x4be))){_0x1b4202=!![];break;}_0x1b4202&&console[_0x4e3070(0x4a2)](_0x4e3070(0x230)+_0x4e3070(0x61d));}console[_0x4e3070(0x4a2)](_0x4e3070(0x428)+_0x1f0f93+'…'),await _0x84634e[_0x4e3070(0x4fa)]['join'](_0x1f0f93[_0x4e3070(0x1db)](/\/+$/,''),{'token':_0x3556d4[_0x4e3070(0x378)],'username':_0x3556d4['username'],'password':_0x3556d4[_0x4e3070(0x628)]}),console['log'](_0x4e3070(0x2bb)),console[_0x4e3070(0x4a2)]('\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a');}finally{await _0x84634e[_0x4e3070(0x3e8)]();}}async function _0x376adb(){const _0x3cb3d2=_0x39b60e,_0x4a2ceb=Date['now'](),_0x292ad0=_0x1ed07b(process['argv']),_0x5f3efe=_0x18b2f0(_0x292ad0),_0xeb7f25=_0x1a92f7[_0x3cb3d2(0x271)](_0x5f3efe['dbPath']);!_0x5f3efe[_0x3cb3d2(0x594)]&&!process[_0x3cb3d2(0x4f0)]['isTTY']&&(_0x5f3efe[_0x3cb3d2(0x594)]=!![]);const _0xb9ddbe=require$$5,{start:_0x1d13e0,colorLog:_0x3b6ef7}=requireOkdbShell(),_0x11a686=require$$1$2,_0x5aece3={..._0x5f3efe[_0x3cb3d2(0x528)]?{'encryptionKey':_0x5f3efe['key']}:{},..._0x5f3efe[_0x3cb3d2(0x419)]?{'admin':![]}:_0x507a02(_0x5f3efe[_0x3cb3d2(0x304)])?{'admin':_0x5f3efe[_0x3cb3d2(0x304)]}:{},..._0x507a02(_0x5f3efe[_0x3cb3d2(0x53d)])?{'api':_0x5f3efe[_0x3cb3d2(0x53d)]}:{},..._0x507a02(_0x5f3efe['auth'])?{'auth':_0x5f3efe[_0x3cb3d2(0x382)]}:{},..._0x507a02(_0x5f3efe[_0x3cb3d2(0x68c)])?{'mcp':_0x5f3efe[_0x3cb3d2(0x68c)]}:{},..._0x5f3efe[_0x3cb3d2(0x640)]!==![]?{'timeMachine':_0x5f3efe[_0x3cb3d2(0x640)]}:{}},_0xf10aeb=_0x3889b2(_0x5f3efe);if(!_0x11a686[_0x3cb3d2(0x34d)]){const _0x279b2f=_0x50d9b4(),_0x557afb=_0x5f3efe[_0x3cb3d2(0x2c2)]?'--no-cluster':_0x5f3efe[_0x3cb3d2(0x43a)]!=null&&_0x5f3efe[_0x3cb3d2(0x43a)]!==''?_0x3cb3d2(0x4a7):process.env.OKDB_HTTP_WORKERS?_0x3cb3d2(0x4d9):_0x5f3efe['http']?.[_0x3cb3d2(0x4e0)]!=null?_0x3cb3d2(0x5d0):_0x3cb3d2(0x5cc)+Math[_0x3cb3d2(0x5f2)](0x1,require$$0[_0x3cb3d2(0x58e)]()[_0x3cb3d2(0x502)]-0x1);process['stdout'][_0x3cb3d2(0x37f)](_0x3cb3d2(0x3bd)+_0xf10aeb+'\x20('+_0x557afb+(!_0x279b2f?_0x3cb3d2(0x4e9):'')+')\x0a');}if(_0x11a686['isWorker']){const _0x19fb75={..._0x5aece3},_0x1de79b=new _0xb9ddbe(_0xeb7f25,_0x19fb75);_0x1de79b[_0x3cb3d2(0x4a2)][_0x3cb3d2(0x60f)]?.();const _0x2b6a58=process.env.OKDB_CLUSTER_SLOT??'?',_0x1485d9={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x473291=_0x1485d9[_0x5f3efe[_0x3cb3d2(0x4a6)]]??_0x1485d9[_0x3cb3d2(0x568)];_0x1de79b[_0x3cb3d2(0x4a2)]['attach'](_0x4e9d3e=>{const _0x271e25=_0x3cb3d2;if((_0x1485d9[_0x4e9d3e[_0x271e25(0x28a)]]??0x1)<_0x473291)return;try{process['send']?.({'__okdbCluster':_0x271e25(0x4a2),'slot':_0x2b6a58,'pid':process[_0x271e25(0x478)],'entry':_0x4e9d3e});}catch{}}),await _0x1de79b[_0x3cb3d2(0x43c)]();const {attachWorkerCluster:_0x61b979}=requireOkdbCluster();_0x61b979(_0x1de79b),await _0x454a87(_0x1de79b,_0x5f3efe['port']);return;}if(_0xf10aeb>0x1){const {runClustered:_0x340f23}=requireOkdbCluster(),_0x551ccc=new _0xb9ddbe(_0xeb7f25,{..._0x5aece3,'engines':![],'processors':![],'compaction':![]});await _0x551ccc[_0x3cb3d2(0x43c)]();const _0x363ab7=async()=>{const _0x4878cf=_0x3cb3d2,_0x5561ab=new _0xb9ddbe(_0xeb7f25,{..._0x5aece3});return await _0x5561ab[_0x4878cf(0x43c)](),_0x5561ab;},_0x42b7c7=_0x340f23({'workers':_0xf10aeb,'makeOkdb':_0x363ab7,'port':_0x5f3efe[_0x3cb3d2(0x268)],'primaryOkdb':_0x551ccc});let _0x315d48=![];async function _0x534066(_0x2ddbb6){const _0x55bfff=_0x3cb3d2;_0x315d48&&(process[_0x55bfff(0x5ff)]['write'](_0x55bfff(0x403)),process[_0x55bfff(0x46e)](0x82));_0x315d48=!![],process[_0x55bfff(0x5ff)][_0x55bfff(0x37f)](_0x55bfff(0x23b)+(_0x2ddbb6||_0x55bfff(0x63c))+_0x55bfff(0x278));const _0x582539=setTimeout(()=>{const _0x192a46=_0x55bfff;process['stderr'][_0x192a46(0x37f)](_0x192a46(0x532)),process[_0x192a46(0x46e)](0x0);},0xbb8);_0x582539['unref']?.();try{await _0x42b7c7[_0x55bfff(0x3e8)]();}catch(_0x1aa70d){process[_0x55bfff(0x5ff)][_0x55bfff(0x37f)]('[okdb]\x20cluster\x20close\x20error:\x20'+(_0x1aa70d?.[_0x55bfff(0x66f)]??_0x1aa70d)+'\x0a');}try{await _0x551ccc[_0x55bfff(0x3e8)]();}catch(_0x55ddb3){process[_0x55bfff(0x5ff)][_0x55bfff(0x37f)](_0x55bfff(0x615)+(_0x55ddb3?.['message']??_0x55ddb3)+'\x0a');}process[_0x55bfff(0x46e)](0x0);}_0x5f3efe[_0x3cb3d2(0x333)]=_0xf10aeb;if(!_0x5f3efe[_0x3cb3d2(0x594)]){_0x551ccc['log'][_0x3cb3d2(0x60f)]?.(),_0x4cc78e(_0x551ccc['auth']?.[_0x3cb3d2(0x34c)]?.()??[]),await _0x1d13e0(_0x551ccc,_0x5f3efe);return;}process[_0x3cb3d2(0x67c)][_0x3cb3d2(0x37f)]('[okdb]\x20cluster\x20primary\x20pid='+process['pid']+':\x20processor\x20(HTTP-silent),\x20'+_0xf10aeb+'\x20'+(_0x3cb3d2(0x2cf)+_0x5f3efe[_0x3cb3d2(0x268)]+'\x0a')),console[_0x3cb3d2(0x4a2)](''),console['log'](_0x3cb3d2(0x2c4)),console['log'](_0x3cb3d2(0x63a)+_0x5f3efe[_0x3cb3d2(0x268)]+_0x3cb3d2(0x38c)+_0xf10aeb+'\x20HTTP\x20workers,\x20primary\x20=\x20processor)'),console[_0x3cb3d2(0x4a2)](_0x3cb3d2(0x44a)+_0xeb7f25),console[_0x3cb3d2(0x4a2)](_0x3cb3d2(0x363)+_0x551ccc['id']),console['log'](_0x3cb3d2(0x360)+_0x5f3efe[_0x3cb3d2(0x268)]+_0x3cb3d2(0x2de));!_0x5f3efe[_0x3cb3d2(0x419)]&&console[_0x3cb3d2(0x4a2)](_0x3cb3d2(0x2bd)+_0x5f3efe[_0x3cb3d2(0x268)]+_0x3cb3d2(0x2f5));console[_0x3cb3d2(0x4a2)](''),_0x4cc78e(_0x551ccc['auth']?.['getSecurityNotices']?.()??[]),process['on'](_0x3cb3d2(0x25e),()=>_0x534066(_0x3cb3d2(0x25e))),process['on'](_0x3cb3d2(0x36a),()=>_0x534066('SIGTERM')),process['on']('SIGBREAK',()=>_0x534066('SIGBREAK'));return;}const _0x44eca2=new _0xb9ddbe(_0xeb7f25,_0x5aece3);_0x44eca2['log'][_0x3cb3d2(0x60f)]?.();const _0x15f32a=_0x44eca2['log']['attach'](_0x19ab4d=>_0x3b6ef7(_0x19ab4d,_0x5f3efe['logLevel']));if(_0x5f3efe[_0x3cb3d2(0x594)])process[_0x3cb3d2(0x67c)]['write'](_0x3cb3d2(0x53f));await _0x44eca2[_0x3cb3d2(0x43c)]();if(_0x5f3efe[_0x3cb3d2(0x594)])process['stdout']['write'](_0x3cb3d2(0x4d5));try{await _0x454a87(_0x44eca2,_0x5f3efe[_0x3cb3d2(0x268)]);}catch(_0x2fa5be){_0x2fa5be['code']===_0x3cb3d2(0x3d5)&&(console[_0x3cb3d2(0x5b3)](_0x3cb3d2(0x647)+_0x5f3efe[_0x3cb3d2(0x268)]+_0x3cb3d2(0x4a5)),process[_0x3cb3d2(0x46e)](0x1));throw _0x2fa5be;}if(_0x5f3efe[_0x3cb3d2(0x594)])process[_0x3cb3d2(0x67c)][_0x3cb3d2(0x37f)](_0x3cb3d2(0x1d5)+_0x5f3efe[_0x3cb3d2(0x268)]+'\x0a');if(!_0x5f3efe['noRepl'])_0x44eca2['log'][_0x3cb3d2(0x60f)]?.(),_0x15f32a?.(),_0x4cc78e(_0x44eca2[_0x3cb3d2(0x382)]?.[_0x3cb3d2(0x34c)]?.()??[]),await _0x1d13e0(_0x44eca2,_0x5f3efe);else{const _0x1bb511=_0x1a92f7['join'](_0xeb7f25,_0x3cb3d2(0x574));try{_0x480a7a[_0x3cb3d2(0x602)](_0x1bb511,String(process[_0x3cb3d2(0x478)]));}catch{}const _0x286920=Date[_0x3cb3d2(0x387)]()-_0x4a2ceb;console['log'](''),console[_0x3cb3d2(0x4a2)](_0x3cb3d2(0x5c4)),console[_0x3cb3d2(0x4a2)](_0x3cb3d2(0x5c0)+_0x5f3efe['port']),console[_0x3cb3d2(0x4a2)]('\x20\x20\x20\x20path:\x20\x20'+_0xeb7f25),console[_0x3cb3d2(0x4a2)](_0x3cb3d2(0x48a)+_0x44eca2['id']);{const _0x2e8347=_0x44eca2[_0x3cb3d2(0x53b)]?.['db']?.['get']?.('__writeCounter')??0x0,_0x469e28=[..._0x44eca2[_0x3cb3d2(0x4f4)]['keys']()][_0x3cb3d2(0x200)](_0xca43ee=>!_0xca43ee[_0x3cb3d2(0x2f6)]('~'))[_0x3cb3d2(0x502)];if(_0x44eca2['_license']?.['active']?.[_0x3cb3d2(0x4a0)]===0x1){const _0xa77aef=Math[_0x3cb3d2(0x5d5)]((_0x44eca2[_0x3cb3d2(0x319)][_0x3cb3d2(0x4ee)]['expiresAt']-Date[_0x3cb3d2(0x387)]())/0x5265c00);console[_0x3cb3d2(0x4a2)](_0x3cb3d2(0x2f3)+_0x44eca2[_0x3cb3d2(0x319)][_0x3cb3d2(0x4ee)][_0x3cb3d2(0x482)]+'\x20(expires\x20in\x20'+_0xa77aef+_0x3cb3d2(0x457));}else{if(_0x44eca2[_0x3cb3d2(0x319)]?.['active']){const _0x3ac826=_0x44eca2[_0x3cb3d2(0x319)][_0x3cb3d2(0x4ee)];console[_0x3cb3d2(0x4a2)](_0x3cb3d2(0x3c1)+_0x3ac826[_0x3cb3d2(0x482)]+_0x3cb3d2(0x473)+new Date(_0x3ac826[_0x3cb3d2(0x642)])['toISOString']()[_0x3cb3d2(0x2a1)](0x0,0xa)+')');const _0x5f2ff6=_0x3ac826[_0x3cb3d2(0x47c)]||{};if(_0x5f2ff6[_0x3cb3d2(0x3ff)]){const _0x2e88f8=Math['round'](_0x2e8347/_0x5f2ff6[_0x3cb3d2(0x3ff)]*0x64);console[_0x3cb3d2(0x4a2)](_0x3cb3d2(0x1e1)+_0x2e8347['toLocaleString']()+'\x20/\x20'+_0x5f2ff6['maxWrites'][_0x3cb3d2(0x3cc)]()+_0x3cb3d2(0x289)+_0x2e88f8+_0x3cb3d2(0x60e)+_0x469e28+(_0x5f2ff6['envs']?'/'+_0x5f2ff6[_0x3cb3d2(0x61a)]:'')+_0x3cb3d2(0x420)+(_0x469e28===0x1?'':'s'));}}else{if(_0x44eca2[_0x3cb3d2(0x319)]){const _0xc26577=_0x44eca2[_0x3cb3d2(0x319)][_0x3cb3d2(0x3d3)](),_0x2b0f7e=_0xc26577[_0x3cb3d2(0x502)]?_0xc26577[_0x3cb3d2(0x65d)](_0x529758=>_0x529758[_0x3cb3d2(0x567)])['join'](',\x20'):_0x3cb3d2(0x340),_0x10c023=_0x44eca2[_0x3cb3d2(0x319)][_0x3cb3d2(0x5ce)],_0x52756c=_0x10c023[_0x3cb3d2(0x47c)][_0x3cb3d2(0x3ff)]?Math['round'](_0x2e8347/_0x10c023[_0x3cb3d2(0x47c)][_0x3cb3d2(0x3ff)]*0x64):0x0;console['log']('\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine'),console[_0x3cb3d2(0x4a2)]('\x20\x20\x20\x20usage:\x20\x20\x20'+_0x2e8347[_0x3cb3d2(0x3cc)]()+_0x3cb3d2(0x443)+_0x10c023[_0x3cb3d2(0x47c)][_0x3cb3d2(0x3ff)][_0x3cb3d2(0x3cc)]()+_0x3cb3d2(0x289)+_0x52756c+_0x3cb3d2(0x60e)+_0x469e28+_0x3cb3d2(0x443)+_0x10c023[_0x3cb3d2(0x47c)][_0x3cb3d2(0x61a)]+'\x20envs'),console[_0x3cb3d2(0x4a2)](_0x3cb3d2(0x41c)+_0x2b0f7e);}}}}console[_0x3cb3d2(0x4a2)](_0x3cb3d2(0x62d)+_0x5f3efe[_0x3cb3d2(0x268)]+_0x3cb3d2(0x2de));!_0x5f3efe['noAdmin']&&console[_0x3cb3d2(0x4a2)]('\x20\x20\x20\x20admin:\x20http://localhost:'+_0x5f3efe[_0x3cb3d2(0x268)]+_0x3cb3d2(0x2f5));console[_0x3cb3d2(0x4a2)](''),console[_0x3cb3d2(0x4a2)]('[okdb]\x20started\x20in\x20'+_0x286920+'ms'),_0x4cc78e(_0x44eca2[_0x3cb3d2(0x382)]?.[_0x3cb3d2(0x34c)]?.()??[]);let _0x11be82=![];async function _0xe193b0(_0x316437){const _0x2e0738=_0x3cb3d2;_0x11be82&&(process['stderr']['write'](_0x2e0738(0x403)),process[_0x2e0738(0x46e)](0x82));_0x11be82=!![],process[_0x2e0738(0x5ff)]['write'](_0x2e0738(0x23b)+(_0x316437||_0x2e0738(0x63c))+_0x2e0738(0x5bf));const _0x4609b0=setTimeout(()=>{const _0x279e70=_0x2e0738;process[_0x279e70(0x5ff)][_0x279e70(0x37f)](_0x279e70(0x55a)),process[_0x279e70(0x46e)](0x1);},0x1388);try{_0x480a7a[_0x2e0738(0x3ce)](_0x1bb511);}catch{}try{await _0x44eca2[_0x2e0738(0x3e8)]();}catch(_0x42e577){process[_0x2e0738(0x5ff)][_0x2e0738(0x37f)]('[okdb]\x20close\x20error:\x20'+(_0x42e577?.[_0x2e0738(0x66f)]??_0x42e577)+'\x0a');}clearTimeout(_0x4609b0),process['stderr'][_0x2e0738(0x37f)]('[okdb]\x20closed\x20cleanly\x0a'),process[_0x2e0738(0x46e)](0x0);}process['on']('SIGINT',()=>_0xe193b0(_0x3cb3d2(0x25e))),process['on'](_0x3cb3d2(0x36a),()=>_0xe193b0('SIGTERM')),process['on'](_0x3cb3d2(0x626),()=>_0xe193b0('SIGBREAK'));}}const _0x5bb9f9=new Set([_0x39b60e(0x292),'doctor',_0x39b60e(0x64b),_0x39b60e(0x1cc),_0x39b60e(0x5ee),_0x39b60e(0x5b4),_0x39b60e(0x5ef),_0x39b60e(0x378),_0x39b60e(0x3b2),_0x39b60e(0x4e1)]),_0x5f4ebb=process[_0x39b60e(0x3bf)][0x2];if(_0x5f4ebb===_0x39b60e(0x292))console['log'](require$$3['version']),process['exit'](0x0);else{if(_0x5f4ebb&&_0x5bb9f9[_0x39b60e(0x25a)](_0x5f4ebb)){const _0x2d1fdb=process[_0x39b60e(0x3bf)][_0x39b60e(0x2a1)](0x3),_0x14e05d=_0x1ed07b(['node',_0x39b60e(0x5d7),..._0x2d1fdb]),_0x161efb=_0x18b2f0(_0x14e05d),_0xe8473f=new Set([_0x39b60e(0x5ad),'-d',_0x39b60e(0x39a),'-k','--config','-c',_0x39b60e(0x3d2),'-p','--log-level',_0x39b60e(0x605),'-e',_0x39b60e(0x286),_0x39b60e(0x2a6),_0x39b60e(0x330),'--label',_0x39b60e(0x469),_0x39b60e(0x22e),_0x39b60e(0x236),_0x39b60e(0x688),'--username','-u','--address']);let _0x1b3cd9=null;for(let _0x3874ce=0x0;_0x3874ce<_0x2d1fdb[_0x39b60e(0x502)];_0x3874ce++){if(_0xe8473f[_0x39b60e(0x25a)](_0x2d1fdb[_0x3874ce])){_0x3874ce++;continue;}if(!_0x2d1fdb[_0x3874ce][_0x39b60e(0x2f6)]('-')){_0x1b3cd9=_0x2d1fdb[_0x3874ce];break;}}(async()=>{const _0x2a404b=_0x39b60e;if(_0x5f4ebb===_0x2a404b(0x378)){const _0x1f0258=process[_0x2a404b(0x3bf)][0x3],_0x344686=process['argv']['slice'](0x4),_0x2f832b=_0x1ed07b([_0x2a404b(0x4f3),'okdb',..._0x344686]),_0x35e9a0=_0x18b2f0(_0x2f832b),_0x16531a=new Set([_0x2a404b(0x5ad),'-d',_0x2a404b(0x39a),'-k',_0x2a404b(0x4a8),'-c',_0x2a404b(0x3d2),'-p',_0x2a404b(0x2a6),_0x2a404b(0x330),_0x2a404b(0x43f),_0x2a404b(0x469),_0x2a404b(0x22e),'--ttl',_0x2a404b(0x5dd),_0x2a404b(0x605),'-e',_0x2a404b(0x286)]),_0xeab19a=[];for(let _0x2245a4=0x0;_0x2245a4<_0x344686[_0x2a404b(0x502)];_0x2245a4++){if(_0x16531a['has'](_0x344686[_0x2245a4])){_0x2245a4++;continue;}if(_0x344686[_0x2245a4][_0x2a404b(0x2f6)]('-'))continue;_0xeab19a['push'](_0x344686[_0x2245a4]);}switch(_0x1f0258){case'create':await _0x3e8a76(_0x35e9a0,_0x2f832b);break;case _0x2a404b(0x663):await _0xd5e3bd(_0x35e9a0);break;case _0x2a404b(0x2b2):await _0xbb77f5(_0xeab19a[0x0],_0x35e9a0);break;default:console[_0x2a404b(0x5b3)](_0x2a404b(0x64a)+_0x1f0258+_0x2a404b(0x440)),process[_0x2a404b(0x46e)](0x1);}return;}if(_0x5f4ebb===_0x2a404b(0x4e1)){const _0x270aa8=requireOkdbLicenseCodec(),_0x2ddc6c=process[_0x2a404b(0x3bf)][_0x2a404b(0x2a1)](0x3),_0x4cee3d=_0x1ed07b([_0x2a404b(0x4f3),'okdb',..._0x2ddc6c]),_0x1944b2=_0x18b2f0(_0x4cee3d),_0x4b978c=new Set(['--path','-d',_0x2a404b(0x39a),'-k',_0x2a404b(0x4a8),'-c',_0x2a404b(0x3d2),'-p',_0x2a404b(0x5dd)]),_0x154284=[];for(let _0x401dc2=0x0;_0x401dc2<_0x2ddc6c[_0x2a404b(0x502)];_0x401dc2++){if(_0x4b978c['has'](_0x2ddc6c[_0x401dc2])){_0x401dc2++;continue;}if(_0x2ddc6c[_0x401dc2][_0x2a404b(0x2f6)]('-'))continue;_0x154284['push'](_0x2ddc6c[_0x401dc2]);}const _0x23971a=_0x154284[0x0]??null;if(_0x23971a===_0x2a404b(0x66c))await _0x15260f(_0x154284[0x1],_0x1944b2);else{if(!_0x23971a)await _0x4a6f19(_0x1944b2);else{let _0x12c13f=_0x270aa8[_0x2a404b(0x4f1)](_0x23971a);if(_0x12c13f===_0x2a404b(0x2c9)&&_0x480a7a[_0x2a404b(0x41a)](_0x23971a))_0x12c13f='path';if(_0x12c13f===_0x2a404b(0x411))try{const _0x25091a=_0x480a7a['readFileSync'](_0x23971a,'utf8')['trim'](),_0x311775=_0x270aa8[_0x2a404b(0x4f1)](_0x25091a);if(_0x311775==='activation'){await _0x42df0d(_0x25091a,_0x1944b2);return;}await _0x239a84(_0x23971a,_0x1944b2);return;}catch(_0x423585){console[_0x2a404b(0x5b3)]('[okdb]\x20error:\x20failed\x20to\x20read\x20'+_0x23971a+':\x20'+_0x423585[_0x2a404b(0x66f)]),process[_0x2a404b(0x46e)](0x1);}switch(_0x12c13f){case'blob':await _0x239a84(_0x23971a,_0x1944b2);break;case _0x2a404b(0x5a0):await _0x42df0d(_0x23971a,_0x1944b2);break;case _0x2a404b(0x231):await _0x431cb3(_0x23971a,_0x1944b2);break;default:console[_0x2a404b(0x5b3)](_0x2a404b(0x5b1)+_0x23971a+'\x22'),console['error'](''),console[_0x2a404b(0x5b3)](_0x2a404b(0x279)),console[_0x2a404b(0x5b3)](_0x2a404b(0x2aa)),console['error']('\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)'),console['error'](_0x2a404b(0x433)),console[_0x2a404b(0x5b3)](_0x2a404b(0x4c2)),console['error'](''),console['error']('\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]'),process['exit'](0x1);}}}return;}switch(_0x5f4ebb){case _0x2a404b(0x55d):await _0x35013a(_0x161efb);break;case _0x2a404b(0x64b):await _0x39f314();break;case _0x2a404b(0x5ef):await _0x159c46(_0x161efb);break;case _0x2a404b(0x1cc):await _0x30c414(_0x1b3cd9??_0x1a92f7['resolve'](_0x2a404b(0x347)),_0x161efb);break;case'export':await _0x2d02b6(_0x1b3cd9??_0x1a92f7[_0x2a404b(0x271)](_0x2a404b(0x1fb)),_0x161efb,_0x14e05d);break;case'import':await _0x13b5ae(_0x1b3cd9??_0x1a92f7[_0x2a404b(0x271)](_0x2a404b(0x1fb)),_0x161efb,_0x14e05d);break;case _0x2a404b(0x3b2):await _0x2de88e(_0x1b3cd9,_0x161efb,_0x14e05d);break;}})()[_0x39b60e(0x45d)](()=>process[_0x39b60e(0x46e)](0x0))['catch'](_0x4cd2bc=>{const _0x179420=_0x39b60e;console[_0x179420(0x5b3)](_0x179420(0x5b7)+(_0x4cd2bc[_0x179420(0x66f)]||_0x4cd2bc)+'\x0a'),process[_0x179420(0x46e)](0x1);});}else _0x376adb()['catch'](_0x4e9909=>{const _0x5c07c7=_0x39b60e;console['error'](_0x5c07c7(0x2da)),console[_0x5c07c7(0x5b3)](_0x4e9909[_0x5c07c7(0x48e)]||_0x4e9909),process[_0x5c07c7(0x46e)](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x5dddf1(0x3b9)]=okdb;
|