@kedem/okdb 2.0.4 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/index.md CHANGED
@@ -127,3 +127,4 @@ await okdb.close();
127
127
  - [Plugins](./plugins.md) — extending OKDB before open
128
128
  - [Migration](./migration.md) — export, import, backup, blob integrity
129
129
  - [Upgrading to 2.0](./upgrade-2.0.md) — the node-model runtime redesign: constructor changes, workers dissolved, claimed responsibilities
130
+ - [Upgrading to 2.1](./upgrade-2.1.md) — the safe-range contract: range iterators are synchronous, `READER_HELD_ACROSS_AWAIT`, the env-balloon fix
@@ -42,7 +42,8 @@
42
42
  { "file": "logging.md", "label": "Logging" },
43
43
  { "file": "diagnostics.md", "label": "Diagnostics" },
44
44
  { "file": "migration.md", "label": "Migration" },
45
- { "file": "upgrade-2.0.md", "label": "Upgrading to 2.0" }
45
+ { "file": "upgrade-2.0.md", "label": "Upgrading to 2.0" },
46
+ { "file": "upgrade-2.1.md", "label": "Upgrading to 2.1" }
46
47
  ]
47
48
  }
48
49
  ]
@@ -0,0 +1,74 @@
1
+ # Upgrading to okdb 2.1 — the safe-range contract
2
+
3
+ okdb 2.1 fixes the **env-size balloon**: LMDB data files growing far past their live data
4
+ until a compaction rescued them. Storage formats, the document model, and all APIs are
5
+ **unchanged**, and **default-path code needs no changes at all** — including loops that
6
+ `await` while iterating a range.
7
+
8
+ > **The one-sentence contract.** Default range reads can no longer pin the database:
9
+ > `getRange` / `getKeys` / `getValues` / `getByPrefix` use a renewable read transaction, so
10
+ > an iterator held across an `await` neither balloons the file nor breaks. The explicitly
11
+ > **pinned** surfaces (`snapshot: true`, `byIndex` / `getIndex`, `getChanges`) release
12
+ > their cursor at any suspension and throw **`READER_HELD_ACROSS_AWAIT`** —
13
+ > deterministically; `'tolerant'` mode opts into resume-while-quiet.
14
+
15
+ ## Why
16
+
17
+ LMDB is copy-on-write: every commit frees the pages it replaces, and a freed page can be
18
+ recycled only when **no reader in any process** still holds an older snapshot. A pinned
19
+ range cursor held across an `await` blocks free-page reuse for the _entire_ env while
20
+ writes churn, and the file grows by _pages-dirtied-per-commit × commit count_ (≈24 KB
21
+ floor per commit) — completely decoupled from ingestion volume. One parked iterator plus
22
+ background churn = gigabytes. Reproduced and measured in `repro/reader-balloon.js` and
23
+ `repro/reader-balloon-amplify.js`.
24
+
25
+ ## What each surface does now
26
+
27
+ | Surface | Default behavior |
28
+ | ------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
29
+ | `getRange` / `getKeys` / `getValues` / `getByPrefix` | **Renewable** — iterate however you like, `await` freely mid-loop; per-row consistency (a resumed iterator sees writes that landed ahead of it); nothing pins. |
30
+ | `getRange(type, { snapshot: true })`, `getKeys(..., { snapshot: true })` | **Pinned + strict guard** — one frozen view that must be consumed in one synchronous block. On suspension the cursor is released (nothing pins past one synchronous block, abandoned iterators included) and the next `next()` throws `READER_HELD_ACROSS_AWAIT` — **deterministically**, quiet env or busy: the violation fails on first run at your desk, never intermittently under production write traffic. |
31
+ | `{ snapshot: 'tolerant' }` | Opt-in park-and-resume: same release-at-suspension, but the next `next()` resumes transparently **iff no commit of any kind landed meanwhile** (LMDB's env-wide `lastTxnId` unchanged — cross-process accurate) and throws only when the frozen view is genuinely unkeepable. Note this makes the error load-dependent — opt in only when that is what you want. |
32
+ | `getChanges` | Pinned + strict guard (renewal is not supported on the clock sub-DBs). `{ snapshot: 'tolerant' }` opts into the resume rule. |
33
+ | `byIndex` / `getIndex` | Pinned + strict guard — dupSort stores have no unambiguous resume bookmark, so any suspension throws. Materialize (`Array.from`) before awaiting. |
34
+ | explicit `{ transaction }` / `OKDBTransaction` | Bypasses the guards — the pin is caller-scoped (see below). |
35
+
36
+ If you hit the error, the fix is one line — materialize before the `await`:
37
+
38
+ ```js
39
+ for (const { value } of Array.from(env.byIndex('orders', ['status'], { values: ['open'] }))) {
40
+ await handle(value);
41
+ }
42
+ ```
43
+
44
+ or chunk large scans with keyed continuation (`{ limit, start, exclusiveStart }` per batch).
45
+
46
+ ## `useReadTransaction` — same rule, transaction-shaped
47
+
48
+ `env.transaction({ useReadTransaction: true })`'s consistent read view is released at the
49
+ first turn boundary after creation (so a transaction that is never committed can no longer
50
+ leak its pin). Reads after that throw `READER_HELD_ACROSS_AWAIT` — deterministically: do
51
+ all consistent reads before any `await`. `useReadTransaction: 'tolerant'` opts into the
52
+ resume rule instead (reads stay valid while nothing has been committed; the first
53
+ interleaved commit makes them throw). Writes are unaffected either way: they are buffered
54
+ intents, applied atomically at `commit()` with `ifVersion` checked against current state,
55
+ exactly as before.
56
+
57
+ Note the guard checks are **env-wide and conservative**: any commit — including internal
58
+ bookkeeping — counts as "the env was written."
59
+
60
+ ## Rolling upgrades
61
+
62
+ The renewable default and the guards live in the upgraded process. A **2.0.x peer sharing
63
+ the same store path can still pin** shared envs the old way until it is upgraded — the
64
+ process-registry mixed-build warning tells you when a fleet is split. Upgrade all
65
+ processes on a path.
66
+
67
+ ## History worth keeping (internal)
68
+
69
+ An earlier build shipped the renewable default and **segfaulted** — root cause was okdb's
70
+ _own_ boot loops holding renewable cursors across awaits into env close/rebuild windows.
71
+ Seven internal sites were fixed (materialized or chunked; the boot env-registry loop had
72
+ been pinning `~system` for the entire multi-env open). Internal scans must stay
73
+ synchronous or chunked; `tests/getrange-snapshot-default.test.js` keeps the crash shape
74
+ (env close with a held renewable iterator) permanently covered.
@@ -1 +1 @@
1
- 'use strict';const _0x25c30f=_0x3a2b;(function(_0x47cf8b,_0x26a35b){const _0x4676cc=_0x3a2b,_0x2a2bda=_0x47cf8b();while(!![]){try{const _0x8e13e0=-parseInt(_0x4676cc(0xcc))/0x1*(parseInt(_0x4676cc(0x95))/0x2)+-parseInt(_0x4676cc(0x1a1))/0x3+parseInt(_0x4676cc(0x80))/0x4+parseInt(_0x4676cc(0xbf))/0x5+parseInt(_0x4676cc(0x16d))/0x6+parseInt(_0x4676cc(0x156))/0x7+-parseInt(_0x4676cc(0x1a2))/0x8;if(_0x8e13e0===_0x26a35b)break;else _0x2a2bda['push'](_0x2a2bda['shift']());}catch(_0x4b09ce){_0x2a2bda['push'](_0x2a2bda['shift']());}}}(_0x3762,0x9652f));function _0x3762(){const _0x20e002=['start','getEntry','\x22\x20on\x20\x22','payload','ftsQuery','entries','create','Index\x20\x22','freeze','stringify','result','set','OKDBInvalidValueError','\x20which\x20does\x20not\x20exist','code','openEnv','byIndex','txn\x20ops\x20must\x20be\x20an\x20array','sandbox','loop-lag\x20','onDo','job_heartbeat','functionName','getCount','OKDBUniqueConstraintError','crypto','loop-lag','.okdb-function.js','item:update','filename','job','runId','stats','worker_threads','envName','exit','dropIndex','item:create','getValues','global','rollback','bus:poke','TXN_INVALID_OPS','reportOnSignal','trigger','object','ttl:expired','_closeReadTransaction','_doHooks','isArray','report','\x27,\x20cannot\x20map\x20to\x20\x27','_assertOpen','\x22\x20is\x20not\x20in\x20the\x20allowedFetchDomains\x20list','emit','references','max',':\x20key\x20[','(worst\x20','events','dropping','unsafe','details','getTTL','getByPath','setSchema','warn','Foreign\x20key\x20violation:\x20','reset','actionCount','sourceEnv','2370389XeKWKW','materializer','processor','created','registerFts','win32','url','ref:violation_resolved','unique:violation_resolved','transaction\x20commit\x20failed','license:removed','createContext','bus:type_drop','system:ready','fts:drop','targetEnv','fetch','enable','tags','now','getMany','_admissionTimer','hash','4695306fQDFRJ','txn\x20op\x20must\x20be\x20an\x20object\x20or\x20tuple','count','globalThis','_envs','okdb-function.js',']\x20already\x20maps\x20to\x20\x27','FOREIGN_KEY_DELETE_RESTRICTED','hostname','postMessage','env','getHeapStatistics','applyOps','SCHEMA_VALIDATION_FAILED','ttlStats','_timer','TXN_ERROR','clear','dropType','upload','note','requestedAt','add','run','getByPrefix','TYPE_ALREADY_REGISTERED','actions','txn-commit','getIndex','\x20references\x20','Function\x20script\x20failed\x20to\x20compile','~system','FOREIGN_KEY_VIOLATION','registerIndex','index:drop','commit','TXN_END','fatal','ensureType','txnId','schema:set','_closed','node:perf_hooks','TXN_INVALID_ACTION','indexReady','ms\x20mean=','node:vm','OKDBVersionMismatchError','targetKey','readTransaction','bus:env_release','dropSchema','2731821qrKDIJ','2780808YjyZUJ','function','engineKey','stopped','OKDBIndexAlreadyRegisteredError','TXN_CLOSED','getJob','getKeys','cursorKey','platform','sweepExpiredTTL','SIGSEGV','patch','listBuckets','allowFetch','get','getChanges','runtime','_undoHooks','ms/','debug','stack','_admissionStarted','priority','files','OKDBTypeAlreadyRegisteredError','system:type_drop','string','system:stopped','sandbox\x20worker:\x20rootPath\x20missing\x20from\x20workerData','update','OKDBForeignKeyError','reduce','default','ALREADY_EXISTS','system:env_release','mode','tries','ref:violation','mean','value','mkdirSync','OKDBNotFoundError','txn','index:reset','\x27:\x20','Index\x20\x27','hasOwnProperty','bind','Type\x20\x27','signal','length','Function\x20script\x20must\x20evaluate\x20to\x20a\x20callable\x20function','updateJob','transaction','cause','ttl','OKDBSchemaCollectionError','type','OKDBTypeNotRegisteredError','join','reject','keys','index:ready','requestId','args','used_heap_size','registerType','close','index:progress','Version\x20mismatch\x20for\x20','has','system:bus_state_change','OKDBIndexNotRegisteredError','materializerContext','2597064mEnktK','getDefaultTTL','_started','map','_drainHandler','push','version','name','ms\x20max=','_log','dryRunActions','SCHEMA_COLLECTION_INVALID','ready','targetType','percentile','maxMs','\x20actions=','type:registered','Unknown\x20OKDB\x20transaction\x20error','sandbox-','OKDBIndexHasConsumersError','2184436UoxdHl','getBucket','getRange','sourceKey','Schema\x20validation\x20failed\x20for\x20','geoQuery','hasType','processorContext','Invalid\x20index\x20key\x20type\x20for\x20\x27','timeoutMs','okdb','_buckets','error','runInContext','txn:end','fts:reset','Transaction\x20already\x20closed','okdb-function-sandbox','cancelled\x20by\x20caller','pid','sdk','Unsupported\x20transaction\x20action:\x20','system:poke','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','list','put','_startAdmission','jobContext','_windowCbs','halted','allowedFetchDomains','FUNCTION_SCRIPT_INVALID_SHAPE','any','remove','clearTTL','\x27\x20doesn\x27t\x20exist','compileTimeoutMs','FETCH_NOT_ALLOWED','delete','Invalid\x20primary\x20key\x20type:\x20','info','_writer','5978545MJvnqC','OKDBSchemaValidationError','range','open','clearTtl','label','write','INDEX_HAS_CONSUMERS','ttl:set','\x27\x20already\x20registered','getIndexStatus','createWriteFacade','errors','1cSfKcV','addBucket','stop','key','fts:registered','\x20already\x20exists','txn:rollback','enabled','options','TXN_INVALID_OP','path','bus:proc',':\x20expected\x20','type:drop','sourceType','queue','job_progress','txn:start','__esModule','FUNCTION_SCRIPT_COMPILE_FAILED','Script','message','nativeCode','resetFts','\x27\x20on\x20type\x20\x27','unref','maxExtra','setTtl','script','creating','fetch\x20blocked:\x20hostname\x20\x22','resetIndex','cancel','stream','catch','offWindow','view:progress','setTTL','useReadTransaction','done','resetting','size','excludeEnv','call','getClock','clearDefaultTTL','Unique\x20constraint\x20violated\x20on\x20','\x27\x20is\x20already\x20registered','dropFts','removeJob','query','TXN_START','sync:apply','Unknown\x20transaction\x20action:\x20','toFixed','INVALID_VALUE','enqueue','listTTL','OKDBError','slice','action','TXN_ROLLBACK','setDefaultTTL','log','UNIQUE_CONSTRAINT','\x22\x20is\x20used\x20by:\x20','INVALID_PRIMARY_KEY'];_0x3762=function(){return _0x20e002;};return _0x3762();}var require$$0$3=require(_0x25c30f(0x130)),require$$2=require('v8'),require$$0=require(_0x25c30f(0x19b)),require$$0$2=require('uuid'),require$$0$1=require(_0x25c30f(0x197)),require$$6=require('./okdb');function getDefaultExportFromCjs(_0x22e8be){const _0x4f6263=_0x25c30f;return _0x22e8be&&_0x22e8be[_0x4f6263(0xde)]&&Object['prototype'][_0x4f6263(0x1d1)][_0x4f6263(0xf7)](_0x22e8be,_0x4f6263(0x1c3))?_0x22e8be['default']:_0x22e8be;}var okdbFunctionsSandboxWorker$1={},okdbFatalReport,hasRequiredOkdbFatalReport;function requireOkdbFatalReport(){if(hasRequiredOkdbFatalReport)return okdbFatalReport;hasRequiredOkdbFatalReport=0x1;function _0x2e11fe(_0xc5f99e){const _0x15211e=_0x3a2b;if(process.env.OKDB_FATAL_REPORT!=='1')return;try{if(!process[_0x15211e(0x141)])return;process[_0x15211e(0x141)]['reportOnFatalError']=!![];try{if(_0x15211e(0xf6)in process[_0x15211e(0x141)])process[_0x15211e(0x141)][_0x15211e(0xf6)]=process.env.OKDB_FATAL_REPORT_ENV!=='1';}catch{}if(process[_0x15211e(0x1ab)]!==_0x15211e(0x15b))try{process['report'][_0x15211e(0x13a)]=!![];if(typeof process['report'][_0x15211e(0x1d4)]===_0x15211e(0x1bd))process[_0x15211e(0x141)][_0x15211e(0x1d4)]=_0x15211e(0x1ad);}catch{}if(process.env.OKDB_REPORT_DIR)try{require('fs')[_0x15211e(0x1cb)](process.env.OKDB_REPORT_DIR,{'recursive':!![]}),process[_0x15211e(0x141)]['directory']=process.env.OKDB_REPORT_DIR;}catch{}try{process['report'][_0x15211e(0x12c)]='';}catch{}if(_0xc5f99e)process.env.OKDB_REPORT_TAG=String(_0xc5f99e);}catch{}}return okdbFatalReport={'enableFatalReport':_0x2e11fe},okdbFatalReport;}var okdbFunctionsSandbox,hasRequiredOkdbFunctionsSandbox;function requireOkdbFunctionsSandbox(){if(hasRequiredOkdbFunctionsSandbox)return okdbFunctionsSandbox;hasRequiredOkdbFunctionsSandbox=0x1;const _0x1e98b2=require$$0;function _0x541965(_0x32e4ff){const _0x3db404=_0x3a2b,_0x38895f=_0x32e4ff==='*',_0x1b1010=_0x38895f?null:new Set(Array[_0x3db404(0x140)](_0x32e4ff)?_0x32e4ff:[]);return function _0x4c0e6e(_0x1fa2c9,_0x12ab23){const _0x44ea7c=_0x3db404;if(!_0x38895f){let _0x3e175c;try{const _0x2b73cc=new URL(typeof _0x1fa2c9==='string'?_0x1fa2c9:_0x1fa2c9?.[_0x44ea7c(0x15c)]??String(_0x1fa2c9));_0x3e175c=_0x2b73cc[_0x44ea7c(0x175)];}catch{const _0x4f65fa=new Error('fetch\x20blocked:\x20invalid\x20URL');return _0x4f65fa[_0x44ea7c(0x11d)]=_0x44ea7c(0xba),Promise['reject'](_0x4f65fa);}if(!_0x1b1010['has'](_0x3e175c)){const _0x575448=new Error(_0x1b1010[_0x44ea7c(0xf5)]===0x0?'fetch\x20is\x20not\x20allowed\x20in\x20this\x20function\x20sandbox\x20(no\x20allowedFetchDomains\x20configured)':_0x44ea7c(0xea)+_0x3e175c+_0x44ea7c(0x144));return _0x575448['code']='FETCH_NOT_ALLOWED',Promise[_0x44ea7c(0x1df)](_0x575448);}}return fetch(_0x1fa2c9,_0x12ab23);};}function _0x173ef2(_0x71fc88={}){const _0x342671=_0x3a2b,_0x730027=_0x71fc88[_0x342671(0x1b0)]!==![],_0x39ea8d=_0x71fc88[_0x342671(0xb3)]??[],_0x11efe6={'Date':Date,'Math':Math,'JSON':JSON,'Array':Array,'Object':Object,'String':String,'Number':Number,'Boolean':Boolean,'Map':Map,'Set':Set,'Promise':Promise,'URL':URL,'URLSearchParams':URLSearchParams,'TextEncoder':TextEncoder,'TextDecoder':TextDecoder,'AbortController':AbortController,'AbortSignal':AbortSignal,'setTimeout':setTimeout,'clearTimeout':clearTimeout,'setInterval':setInterval,'clearInterval':clearInterval,'queueMicrotask':queueMicrotask,'structuredClone':structuredClone,'crypto':globalThis[_0x342671(0x128)]};return _0x730027&&typeof fetch===_0x342671(0x1a3)&&(_0x11efe6[_0x342671(0x166)]=_0x541965(_0x39ea8d)),_0x11efe6[_0x342671(0x170)]=_0x11efe6,_0x11efe6;}function _0x512cb3(_0x40a7d5,_0x4e7030={}){const _0x59ad57=_0x3a2b,_0x2c8396=_0x173ef2(_0x4e7030),_0x5312e0=_0x1e98b2[_0x59ad57(0x161)](_0x2c8396,{'name':_0x59ad57(0xa6),'codeGeneration':{'strings':![],'wasm':![]}});let _0x403696;try{_0x403696=new _0x1e98b2[(_0x59ad57(0xe0))]('('+_0x40a7d5+')',{'filename':_0x4e7030[_0x59ad57(0x12c)]??_0x59ad57(0x172)});}catch(_0x39c275){const _0x452c95=new Error(_0x39c275?.[_0x59ad57(0xe1)]||_0x59ad57(0x18b));_0x452c95[_0x59ad57(0x11d)]=_0x59ad57(0xdf),_0x452c95[_0x59ad57(0x1d9)]=_0x39c275;throw _0x452c95;}let _0x499367;try{_0x499367=_0x403696[_0x59ad57(0xa2)](_0x5312e0,{'timeout':_0x4e7030[_0x59ad57(0xb9)]??0x64});}catch(_0x62a8c3){const _0x1a14a7=new Error(_0x62a8c3?.[_0x59ad57(0xe1)]||'Function\x20script\x20failed\x20to\x20initialize');_0x1a14a7['code']='FUNCTION_SCRIPT_COMPILE_FAILED',_0x1a14a7['cause']=_0x62a8c3;throw _0x1a14a7;}if(typeof _0x499367!==_0x59ad57(0x1a3)){const _0x470774=new Error(_0x59ad57(0x1d6));_0x470774[_0x59ad57(0x11d)]=_0x59ad57(0xb4);throw _0x470774;}return _0x499367;}return okdbFunctionsSandbox={'createSandboxGlobals':_0x173ef2,'compileFunctionExpression':_0x512cb3,'_buildRestrictedFetch':_0x541965},okdbFunctionsSandbox;}var okdbFunctionsIpc,hasRequiredOkdbFunctionsIpc;function requireOkdbFunctionsIpc(){if(hasRequiredOkdbFunctionsIpc)return okdbFunctionsIpc;hasRequiredOkdbFunctionsIpc=0x1;function _0x5b4d92(_0x1dc5b5){const _0xf77859=_0x3a2b;if(!_0x1dc5b5)return null;return{'message':_0x1dc5b5[_0xf77859(0xe1)]||String(_0x1dc5b5),'stack':_0x1dc5b5[_0xf77859(0x1b7)]||null,'code':_0x1dc5b5[_0xf77859(0x11d)]||null,'details':_0x1dc5b5[_0xf77859(0x14d)]||null};}function _0x70c658(_0x3b4c55){const _0x2ce030=_0x3a2b;if(!_0x3b4c55)return new Error('Unknown\x20custom\x20function\x20error');const _0x51b3b3=new Error(_0x3b4c55[_0x2ce030(0xe1)]||String(_0x3b4c55));if(_0x3b4c55[_0x2ce030(0x1b7)])_0x51b3b3[_0x2ce030(0x1b7)]=_0x3b4c55['stack'];if(_0x3b4c55[_0x2ce030(0x11d)])_0x51b3b3[_0x2ce030(0x11d)]=_0x3b4c55['code'];if(_0x3b4c55[_0x2ce030(0x14d)])_0x51b3b3[_0x2ce030(0x14d)]=_0x3b4c55[_0x2ce030(0x14d)];return _0x51b3b3;}return okdbFunctionsIpc={'serializeError':_0x5b4d92,'deserializeError':_0x70c658},okdbFunctionsIpc;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x5b3825=_0x25c30f;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x276ba4={'PUT':_0x5b3825(0xae),'REMOVE':_0x5b3825(0xb6),'INDEX_DROP':_0x5b3825(0x133),'INDEX_REGISTER':'registerIndex','INDEX_RESET':_0x5b3825(0xeb),'TYPE_REGISTER':'registerType','TYPE_DROP':'dropType','FTS_REGISTER':_0x5b3825(0x15a),'FTS_DROP':_0x5b3825(0xfc),'FTS_RESET':_0x5b3825(0xe3),'SCHEMA_SET':_0x5b3825(0x150),'SCHEMA_DROP':_0x5b3825(0x1a0),'TTL_SET':_0x5b3825(0xe7),'TTL_CLEAR':_0x5b3825(0xc3)},_0x387f09={'SYSTEM_READY':_0x5b3825(0x163),'SYSTEM_STOPPED':_0x5b3825(0x1be),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x5b3825(0xab),'SYSTEM_DRAIN':'system:drain','SYSTEM_TYPE_DROP':_0x5b3825(0x1bc),'SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x5b3825(0x7d),'ITEM_CREATE':_0x5b3825(0x134),'ITEM_UPDATE':_0x5b3825(0x12b),'ITEM_REMOVE':'item:remove','INDEX_RESET':_0x5b3825(0x1ce),'INDEX_READY':_0x5b3825(0x1e1),'INDEX_PROGRESS':_0x5b3825(0x7a),'VIEW_PROGRESS':_0x5b3825(0xf0),'INDEX_DROP':_0x5b3825(0x18f),'INDEX_REGISTERED':'index:registered','FTS_REGISTERED':_0x5b3825(0xd0),'FTS_DROP':_0x5b3825(0x164),'FTS_RESET':_0x5b3825(0xa4),'SCHEMA_SET':_0x5b3825(0x195),'SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0x5b3825(0x15e),'REF_VIOLATION':_0x5b3825(0x1c8),'REF_VIOLATION_RESOLVED':_0x5b3825(0x15d),'SYNC_APPLY':_0x5b3825(0x100),'TXN_START':_0x5b3825(0xdd),'TXN_END':_0x5b3825(0xa3),'TXN_ROLLBACK':_0x5b3825(0xd2),'TYPE_REGISTERED':_0x5b3825(0x91),'TYPE_DROP':_0x5b3825(0xd9),'ENV_OPENED':'env:opened','ENV_REMOVED':'env:removed','SYSTEM_ENV_RELEASE':_0x5b3825(0x1c5),'TTL_EXPIRED':_0x5b3825(0x13d),'TTL_SET':_0x5b3825(0xc7),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':'license:invalid','LICENSE_ADDED':'license:added','LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':_0x5b3825(0x160)},_0x5b3c85={'CREATING':_0x5b3825(0xe9),'RESETTING':_0x5b3825(0xf4),'READY':_0x5b3825(0x8c),'DROPPING':_0x5b3825(0x14b),'WAITING':'waiting'},_0x3e48bf={'CREATED':_0x5b3825(0x159),'STARTING':'starting','STARTED':'started','STOPPING':'stopping','STOPPED':_0x5b3825(0x1a5)},_0x3b7c0f={'CREATING':_0x5b3825(0xe9),'READY':_0x5b3825(0x8c),'HALTED':_0x5b3825(0xb2),'STOPPED':'stopped','RESETTING':_0x5b3825(0xf4)},_0x2e2abd=Object[_0x5b3825(0x117)]({'POKE':_0x5b3825(0x138),'DRAIN':'bus:drain','TYPE_DROP':_0x5b3825(0x162),'PROC':_0x5b3825(0xd7),'ENV_RELEASE':_0x5b3825(0x19f)});return okdbEnums={'BUS_EVENTS':_0x2e2abd,'CHANGE_ACTIONS':_0x276ba4,'EVENTS':_0x387f09,'INDEX_STATE':_0x5b3c85,'OKDB_STATE':_0x3e48bf,'VIEW_STATE':_0x3b7c0f},okdbEnums;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x596ce0 extends Error{constructor(_0xea7d63,_0x4ccff7,_0x3d66f0={}){const _0x4d9115=_0x3a2b;super(_0xea7d63),this['name']=_0x4d9115(0x106),this[_0x4d9115(0x11d)]=_0x4ccff7,this[_0x4d9115(0x14d)]=_0x3d66f0,_0x3d66f0[_0x4d9115(0x1d9)]&&(this[_0x4d9115(0x1d9)]=_0x3d66f0[_0x4d9115(0x1d9)]),Error['captureStackTrace'](this,this['constructor']);}}class _0x1b07f1 extends _0x596ce0{constructor(_0xb61495,_0xfaec1d,_0x2265a7,_0x5cc0f5){const _0x24cdcb=_0x3a2b;super(_0x24cdcb(0x7b)+_0xb61495+'@'+_0xfaec1d+_0x24cdcb(0xd8)+_0x2265a7+',\x20got\x20'+_0x5cc0f5,'VERSION_MISMATCH',{'type':_0xb61495,'key':_0xfaec1d,'expectedVersion':_0x2265a7,'actualVersion':_0x5cc0f5}),this['name']=_0x24cdcb(0x19c);}}class _0x5239b7 extends _0x596ce0{constructor(_0x7e1042,_0x4d3585){const _0xe5422c=_0x3a2b;super(_0x7e1042+'@'+_0x4d3585+'\x20does\x20not\x20exist','NOT_FOUND',{'type':_0x7e1042,'key':_0x4d3585}),this[_0xe5422c(0x87)]=_0xe5422c(0x1cc);}}class _0xf73854 extends _0x596ce0{constructor(_0x19e5d6,_0x516194){const _0x3e4451=_0x3a2b;super(_0x19e5d6+'@'+_0x516194+_0x3e4451(0xd1),_0x3e4451(0x1c4),{'type':_0x19e5d6,'key':_0x516194}),this[_0x3e4451(0x87)]='OKDBAlreadyExistsError';}}class _0x487fda extends _0x596ce0{constructor(_0x50a4f2,_0x3337a1){const _0x3d48b0=_0x3a2b,_0x34c3a0=typeof _0x3337a1;super(_0x3d48b0(0x9d)+_0x50a4f2+_0x3d48b0(0x1cf)+_0x34c3a0+'.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20'+_0x3337a1,'INVALID_INDEX_KEY',{'index':_0x50a4f2,'key':_0x3337a1,'keyType':_0x34c3a0}),this[_0x3d48b0(0x87)]='OKDBInvalidIndexKeyError';}}class _0x8eb8e4 extends _0x596ce0{constructor(_0x4a76e5){const _0x31f904=_0x3a2b,_0x4cc890=typeof _0x4a76e5;super(_0x31f904(0xbc)+_0x4cc890+_0x31f904(0xac)+_0x4a76e5,_0x31f904(0x10e),{'key':_0x4a76e5,'keyType':_0x4cc890}),this['name']='OKDBInvalidPrimaryKeyError';}}class _0x11d9e4 extends _0x596ce0{constructor(_0x109469){const _0x47d0d7=_0x3a2b;super('Type\x20\x27'+_0x109469+_0x47d0d7(0xb8),'TYPE_NOT_REGISTERED',{'type':_0x109469}),this[_0x47d0d7(0x87)]=_0x47d0d7(0x1dd);}}class _0x12f5f0 extends _0x596ce0{constructor(_0x5489d7){const _0x5da9c8=_0x3a2b;super(_0x5da9c8(0x1d3)+_0x5489d7+_0x5da9c8(0xc8),_0x5da9c8(0x186),{'type':_0x5489d7}),this[_0x5da9c8(0x87)]=_0x5da9c8(0x1bb);}}class _0x124eb5 extends _0x596ce0{constructor(_0x443b55,_0x3fd2dd){const _0x1f8294=_0x3a2b;super('Index\x20\x27'+_0x3fd2dd+_0x1f8294(0xe4)+_0x443b55+'\x27\x20doesn\x27t\x20exist','INDEX_NOT_REGISTERED',{'type':_0x443b55,'index':_0x3fd2dd}),this[_0x1f8294(0x87)]=_0x1f8294(0x7e);}}class _0x5da625 extends _0x596ce0{constructor(_0x59e74e,_0x50c901){const _0x34870f=_0x3a2b;super(_0x34870f(0x1d0)+_0x50c901+_0x34870f(0xe4)+_0x59e74e+_0x34870f(0xfb),'INDEX_ALREADY_REGISTERED',{'type':_0x59e74e,'index':_0x50c901}),this['name']=_0x34870f(0x1a6);}}class _0x3c2826 extends _0x596ce0{constructor(_0x50cae5,_0x314290={}){const _0x5eee4b=_0x3a2b;super(_0x50cae5,_0x5eee4b(0x103),_0x314290),this[_0x5eee4b(0x87)]=_0x5eee4b(0x11b);}}class _0x53ffdf extends _0x596ce0{constructor(_0x1b4fc9,_0x485119,_0x4a8d47,_0x2a5e5e,_0x31c80a){const _0x2b13a5=_0x3a2b;super(_0x2b13a5(0xfa)+_0x1b4fc9+'@'+_0x485119+_0x2b13a5(0x148)+_0x4a8d47+_0x2b13a5(0x173)+_0x2a5e5e+_0x2b13a5(0x142)+_0x31c80a+'\x27',_0x2b13a5(0x10c),{'type':_0x1b4fc9,'index':_0x485119,'indexKey':_0x4a8d47,'existingKey':_0x2a5e5e,'conflictingKey':_0x31c80a}),this[_0x2b13a5(0x87)]=_0x2b13a5(0x127);}}class _0x73f19d extends _0x596ce0{constructor(_0x4a793b,_0x4f321a,_0x5ed6f1){const _0x49a4f8=_0x3a2b;super(_0x49a4f8(0x99)+_0x4a793b+'@'+_0x4f321a,_0x49a4f8(0x17a),{'type':_0x4a793b,'key':_0x4f321a,'errors':_0x5ed6f1}),this[_0x49a4f8(0x87)]=_0x49a4f8(0xc0),this['type']=_0x4a793b,this[_0x49a4f8(0xcf)]=_0x4f321a,this[_0x49a4f8(0xcb)]=_0x5ed6f1;}}class _0x13170a extends _0x596ce0{constructor(_0x43d0f3,_0x5e0a94){const _0x1d4a6e=_0x3a2b;super('Cannot\x20set\x20enforce\x20schema\x20on\x20'+_0x43d0f3+':\x20'+_0x5e0a94[_0x1d4a6e(0x1d5)]+'\x20documents\x20fail\x20validation',_0x1d4a6e(0x8b),{'type':_0x43d0f3,'failures':_0x5e0a94}),this[_0x1d4a6e(0x87)]=_0x1d4a6e(0x1db),this[_0x1d4a6e(0x1dc)]=_0x43d0f3,this['failures']=_0x5e0a94;}}class _0x362fb9 extends _0x596ce0{constructor(_0x3b3242,_0x412c36,_0x24cd18,_0x5a77e2,_0x415bbc){const _0x24e3c8=_0x3a2b;super(_0x24e3c8(0x152)+_0x3b3242+'@'+_0x412c36+'.'+_0x24cd18+_0x24e3c8(0x18a)+_0x5a77e2+'@'+_0x415bbc+_0x24e3c8(0x11c),_0x24e3c8(0x18d),{'sourceType':_0x3b3242,'sourceKey':_0x412c36,'fieldPath':_0x24cd18,'targetType':_0x5a77e2,'targetKey':_0x415bbc}),this['name']=_0x24e3c8(0x1c1),this[_0x24e3c8(0xda)]=_0x3b3242,this[_0x24e3c8(0x98)]=_0x412c36,this['fieldPath']=_0x24cd18,this[_0x24e3c8(0x8d)]=_0x5a77e2,this[_0x24e3c8(0x19d)]=_0x415bbc;}}class _0xac1b98 extends _0x596ce0{constructor(_0x55f493,_0x1d01b8,_0x537532){const _0x59b99c=_0x3a2b;super('Cannot\x20delete\x20'+_0x55f493+'@'+_0x1d01b8+':\x20'+_0x537532[_0x59b99c(0x1d5)]+'\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict',_0x59b99c(0x174),{'targetType':_0x55f493,'targetKey':_0x1d01b8,'references':_0x537532}),this['name']='OKDBForeignKeyDeleteError',this[_0x59b99c(0x8d)]=_0x55f493,this['targetKey']=_0x1d01b8,this[_0x59b99c(0x146)]=_0x537532;}}class _0x4b0399 extends _0x596ce0{constructor(_0xb5e49e,_0x375652,_0x30fb99){const _0x2b14bf=_0x3a2b;super(_0x2b14bf(0x116)+_0x375652+_0x2b14bf(0x111)+_0xb5e49e+_0x2b14bf(0x10d)+_0x30fb99[_0x2b14bf(0x83)](_0xda8e64=>_0xda8e64['kind']+':'+_0xda8e64[_0x2b14bf(0x87)])[_0x2b14bf(0x1de)](',\x20'),_0x2b14bf(0xc6),{'type':_0xb5e49e,'index':_0x375652,'usedBy':_0x30fb99}),this[_0x2b14bf(0x87)]=_0x2b14bf(0x94);}}return okdbError={'OKDBError':_0x596ce0,'OKDBVersionMismatchError':_0x1b07f1,'OKDBNotFoundError':_0x5239b7,'OKDBAlreadyExistsError':_0xf73854,'OKDBInvalidIndexKeyError':_0x487fda,'OKDBInvalidPrimaryKeyError':_0x8eb8e4,'OKDBTypeNotRegisteredError':_0x11d9e4,'OKDBTypeAlreadyRegisteredError':_0x12f5f0,'OKDBIndexNotRegisteredError':_0x124eb5,'OKDBIndexAlreadyRegisteredError':_0x5da625,'OKDBInvalidValueError':_0x3c2826,'OKDBUniqueConstraintError':_0x53ffdf,'OKDBSchemaValidationError':_0x73f19d,'OKDBSchemaCollectionError':_0x13170a,'OKDBForeignKeyError':_0x362fb9,'OKDBForeignKeyDeleteError':_0xac1b98,'OKDBIndexHasConsumersError':_0x4b0399},okdbError;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x49357e=_0x25c30f;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x1d7681,performance:_0x209338}=require$$0$1,_0x7c8fb6=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG==='true',_0x4f570e=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x4a8504=process.env.OKDB_LOOP_LAG_ALL==='1',_0x384c36=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x12786f{constructor(){const _0x3b558c=_0x3a2b;this[_0x3b558c(0xd3)]=_0x7c8fb6,this[_0x3b558c(0xa0)]=new Map(),this['_h']=null,this[_0x3b558c(0x17c)]=null,this[_0x3b558c(0x82)]=![],this[_0x3b558c(0x89)]=(_0x12a438,_0x45a621)=>process['stderr'][_0x3b558c(0xc5)](_0x12a438+(_0x45a621?'\x20'+JSON[_0x3b558c(0x118)](_0x45a621):'')+'\x0a');}[_0x49357e(0x169)](){const _0x1c0fcb=_0x49357e;return _0x209338[_0x1c0fcb(0x169)]();}['setLogger'](_0x2595cc){const _0x18ddc4=_0x49357e;if(typeof _0x2595cc===_0x18ddc4(0x1a3))this[_0x18ddc4(0x89)]=_0x2595cc;}[_0x49357e(0x181)](_0x3cf9cb,_0x12181a,_0x31aebb){const _0x360104=_0x49357e;if(!this[_0x360104(0xd3)])return;let _0x4bb9c3=this[_0x360104(0xa0)][_0x360104(0x1b1)](_0x3cf9cb);!_0x4bb9c3&&(_0x4bb9c3={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x360104(0xa0)]['set'](_0x3cf9cb,_0x4bb9c3)),_0x4bb9c3['ms']+=_0x12181a,_0x4bb9c3[_0x360104(0x16f)]+=0x1,_0x12181a>_0x4bb9c3[_0x360104(0x8f)]&&(_0x4bb9c3[_0x360104(0x8f)]=_0x12181a,_0x4bb9c3[_0x360104(0xe6)]=_0x31aebb||'');}[_0x49357e(0x10f)](_0x145ba4){const _0x429dd3=_0x49357e;if(!this[_0x429dd3(0xd3)]||this[_0x429dd3(0x82)])return;this['_started']=!![];if(_0x145ba4)this[_0x429dd3(0x89)]=_0x145ba4;this['_h']=_0x1d7681({'resolution':0xa}),this['_h'][_0x429dd3(0x167)](),this[_0x429dd3(0x17c)]=setInterval(()=>this['_report'](),_0x4f570e);if(this[_0x429dd3(0x17c)]['unref'])this[_0x429dd3(0x17c)][_0x429dd3(0xe5)]();}['onWindow'](_0x137487){const _0x5103ea=_0x49357e;if(!this[_0x5103ea(0xb1)])this[_0x5103ea(0xb1)]=new Set();this['_windowCbs'][_0x5103ea(0x183)](_0x137487);if(!this['_started'])this[_0x5103ea(0xaf)]();}[_0x49357e(0xef)](_0x8f11ae){const _0x52426c=_0x49357e;this[_0x52426c(0xb1)]?.[_0x52426c(0xbb)](_0x8f11ae);}['_startAdmission'](){const _0xac4802=_0x49357e;if(this[_0xac4802(0x1b8)])return;this['_admissionStarted']=!![];!this['_h']&&(this['_h']=_0x1d7681({'resolution':0xa}),this['_h'][_0xac4802(0x167)]());const _0x5d29ae=_0x4f570e;this[_0xac4802(0x16b)]=setInterval(()=>{const _0x4ed6ba=_0xac4802,_0x37a588=this['_h'];if(!_0x37a588)return;const _0x595511=_0x37a588[_0x4ed6ba(0x8e)](0x63)/0xf4240,_0x4d8ff6=_0x37a588[_0x4ed6ba(0x147)]/0xf4240,_0x9bfb09=_0x37a588[_0x4ed6ba(0x1c9)]/0xf4240;_0x37a588['reset']();if(this['_windowCbs'])for(const _0x5a371b of this[_0x4ed6ba(0xb1)]){try{_0x5a371b({'p99Ms':_0x595511,'maxMs':_0x4d8ff6,'meanMs':_0x9bfb09,'reportMs':_0x5d29ae});}catch{}}},_0x5d29ae);if(this[_0xac4802(0x16b)][_0xac4802(0xe5)])this['_admissionTimer']['unref']();}['_report'](){const _0x22de71=_0x49357e,_0x5bac12=this['_h'],_0x1082b9=_0x5bac12[_0x22de71(0x147)]/0xf4240,_0x13bf2a=_0x5bac12[_0x22de71(0x8e)](0x63)/0xf4240,_0x3e988e=_0x5bac12[_0x22de71(0x1c9)]/0xf4240;_0x5bac12[_0x22de71(0x153)]();const _0x22c026=[...this[_0x22de71(0xa0)][_0x22de71(0x114)]()][_0x22de71(0x83)](([_0xae7804,_0x493624])=>({'label':_0xae7804,..._0x493624}))['sort']((_0x1f9237,_0xa43ceb)=>_0xa43ceb['ms']-_0x1f9237['ms'])[_0x22de71(0x107)](0x0,0x8);this[_0x22de71(0xa0)][_0x22de71(0x17e)]();const _0x381a2c=_0x22c026[_0x22de71(0x1c2)]((_0x5cac32,_0x1c1ed4)=>_0x5cac32+_0x1c1ed4['ms'],0x0),_0x3c560e=_0x22c026[_0x22de71(0x83)](_0x4429ba=>_0x4429ba[_0x22de71(0xc4)]+'='+_0x4429ba['ms']['toFixed'](0x0)+_0x22de71(0x1b5)+_0x4429ba[_0x22de71(0x16f)]+(_0x4429ba['maxMs']>0x5?_0x22de71(0x149)+_0x4429ba['maxMs'][_0x22de71(0x102)](0x0)+'ms'+(_0x4429ba[_0x22de71(0xe6)]?'\x20'+_0x4429ba['maxExtra']:'')+')':''));(_0x4a8504||_0x1082b9>=_0x384c36)&&this[_0x22de71(0x89)](_0x22de71(0x122)+_0x4f570e+_0x22de71(0x88)+_0x1082b9[_0x22de71(0x102)](0x0)+'ms\x20p99='+_0x13bf2a['toFixed'](0x0)+_0x22de71(0x19a)+_0x3e988e['toFixed'](0x0)+'ms\x20busy='+_0x381a2c[_0x22de71(0x102)](0x0)+'ms'+(_0x3c560e[_0x22de71(0x1d5)]?'\x20│\x20'+_0x3c560e[_0x22de71(0x1de)]('\x20\x20'):''),{'feature':_0x22de71(0x129)});if(this['_windowCbs'])for(const _0x2e0986 of this[_0x22de71(0xb1)]){try{_0x2e0986({'p99Ms':_0x13bf2a,'maxMs':_0x1082b9,'meanMs':_0x3e988e,'reportMs':_0x4f570e});}catch{}}}['stop'](){const _0x4193ae=_0x49357e;if(this[_0x4193ae(0x17c)])clearInterval(this['_timer']);if(this['_h'])this['_h']['disable']();this[_0x4193ae(0x17c)]=null,this['_h']=null,this['_started']=![];}}const _0x659167=new _0x12786f();if(_0x659167[_0x49357e(0xd3)])_0x659167[_0x49357e(0x10f)]();return okdbLoopMonitor={'LOOP':_0x659167},okdbLoopMonitor;}var okdbTransaction,hasRequiredOkdbTransaction;function requireOkdbTransaction(){const _0x34d3a6=_0x25c30f;if(hasRequiredOkdbTransaction)return okdbTransaction;hasRequiredOkdbTransaction=0x1;const _0x7d96ec=require$$0$2,{EVENTS:_0x51da5b}=requireOkdbEnums(),{OKDBError:_0x2d2a29}=requireOkdbError(),{LOOP:_0x276ad2}=requireOkdbLoopMonitor();function _0x1a2072(_0x53a7cf){const _0x2eff00=_0x3a2b;return _0x53a7cf[_0x2eff00(0x83)](_0x548b21=>{const _0x56edb2=_0x2eff00,[_0x3e924e,_0x2093da]=_0x548b21[_0x56edb2(0x1e3)]||[];return{'action':_0x548b21['action'],'type':_0x3e924e,'key':_0x2093da};});}class _0xed50cb{['okdb'];[_0x34d3a6(0x187)]=[];['_doHooks']=[];[_0x34d3a6(0x1b4)]=[];constructor(_0x111890,_0x3ae098={'useReadTransaction':![]}){const _0xeab5b6=_0x34d3a6;this['okdb']=_0x111890,this[_0xeab5b6(0xd4)]=_0x3ae098,this['id']=_0x7d96ec['v4'](),this[_0xeab5b6(0x19e)]=this[_0xeab5b6(0xd4)][_0xeab5b6(0xf2)]?this[_0xeab5b6(0x9f)]['db'][_0xeab5b6(0xf2)]():null,this[_0xeab5b6(0x196)]=![];}[_0x34d3a6(0x123)](_0x2308b3){const _0x182c2e=_0x34d3a6;this[_0x182c2e(0x13f)][_0x182c2e(0x85)](_0x2308b3);}['onUndo'](_0xa2ee33){const _0x3778b0=_0x34d3a6;this[_0x3778b0(0x1b4)]['push'](_0xa2ee33);}[_0x34d3a6(0x13e)](){const _0x6bb1c1=_0x34d3a6;if(!this[_0x6bb1c1(0x19e)])return;try{this['readTransaction'][_0x6bb1c1(0xf3)]();}catch(_0x34440c){}this[_0x6bb1c1(0x19e)]=null;}[_0x34d3a6(0x143)](){const _0x1e3f96=_0x34d3a6;if(this[_0x1e3f96(0x196)])throw new _0x2d2a29(_0x1e3f96(0xa5),_0x1e3f96(0x1a7));}[_0x34d3a6(0x1b1)](_0x112949,_0x333cba){const _0xc56f34=_0x34d3a6;return this[_0xc56f34(0x143)](),this[_0xc56f34(0x9f)][_0xc56f34(0x1b1)](_0x112949,_0x333cba,{'transaction':this[_0xc56f34(0x19e)]});}['getEntry'](_0x2185b8,_0x5716f8){const _0x1f00ed=_0x34d3a6;return this[_0x1f00ed(0x143)](),this['okdb'][_0x1f00ed(0x110)](_0x2185b8,_0x5716f8,{'transaction':this[_0x1f00ed(0x19e)]});}[_0x34d3a6(0x16a)](_0x423664,_0x22b839){const _0xb885e9=_0x34d3a6;return this[_0xb885e9(0x143)](),this[_0xb885e9(0x9f)][_0xb885e9(0x16a)](_0x423664,_0x22b839,{'transaction':this[_0xb885e9(0x19e)]});}[_0x34d3a6(0x97)](_0x27a71d,_0x24ff8f={}){const _0x297f58=_0x34d3a6;return this[_0x297f58(0x143)](),this['okdb'][_0x297f58(0x97)](_0x27a71d,{'transaction':this[_0x297f58(0x19e)],..._0x24ff8f});}['getValues'](_0x1f41e2,_0x1fd426={}){const _0x4e5185=_0x34d3a6;return this[_0x4e5185(0x143)](),this[_0x4e5185(0x9f)]['getValues'](_0x1f41e2,{'transaction':this['readTransaction'],..._0x1fd426});}[_0x34d3a6(0x1a9)](_0x2b06aa,_0x111b44={}){const _0x689dae=_0x34d3a6;return this[_0x689dae(0x143)](),this[_0x689dae(0x9f)][_0x689dae(0x1a9)](_0x2b06aa,{'transaction':this[_0x689dae(0x19e)],..._0x111b44});}[_0x34d3a6(0x11f)](_0x1f7da0,_0x760a0c,_0x4eadd2={}){const _0x360055=_0x34d3a6;return this[_0x360055(0x143)](),this[_0x360055(0x9f)]['byIndex'](_0x1f7da0,_0x760a0c,{'transaction':this[_0x360055(0x19e)],..._0x4eadd2});}['query'](_0x26735e,_0x513767,_0x4d92df={}){const _0x229ff7=_0x34d3a6;return this['_assertOpen'](),this['okdb'][_0x229ff7(0xfe)](_0x26735e,_0x513767,{'transaction':this['readTransaction'],..._0x4d92df});}[_0x34d3a6(0xf8)](_0x499d31=null){const _0x1bd475=_0x34d3a6;return this[_0x1bd475(0x143)](),this[_0x1bd475(0x9f)][_0x1bd475(0xf8)](_0x499d31,{'transaction':this[_0x1bd475(0x19e)]});}[_0x34d3a6(0x126)](_0x194cb8){const _0x20b755=_0x34d3a6;return this[_0x20b755(0x143)](),this[_0x20b755(0x9f)][_0x20b755(0x126)](_0x194cb8,{'transaction':this[_0x20b755(0x19e)]});}[_0x34d3a6(0xae)](_0x343cb4,_0x384c7a,_0x21e5b5,{ifVersion:ifVersion=null,version:version=null,timestamp:timestamp=Date[_0x34d3a6(0x169)](),origin:origin=null,ttl:ttl=null}={}){const _0x3a66b7=_0x34d3a6;this[_0x3a66b7(0x187)][_0x3a66b7(0x85)]({'action':_0x3a66b7(0xae),'args':[_0x343cb4,_0x384c7a,_0x21e5b5,{'ifVersion':ifVersion,'version':version,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}[_0x34d3a6(0x1c0)](_0x2d88ea,_0x5c631d,_0x33744c,{ifVersion:ifVersion=null,version:version=null,timestamp:timestamp=Date[_0x34d3a6(0x169)](),origin:origin=null,ttl:ttl=null}={}){const _0xcf7233=_0x34d3a6;this[_0xcf7233(0x187)][_0xcf7233(0x85)]({'action':_0xcf7233(0x1c0),'args':[_0x2d88ea,_0x5c631d,_0x33744c,{'ifVersion':ifVersion,'version':version,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}[_0x34d3a6(0x1ae)](_0x455778,_0x2b28a0,_0x518f67,{ifVersion:ifVersion=null,timestamp:timestamp=Date['now'](),origin:origin=null,ttl:ttl=null}={}){const _0x2e6776=_0x34d3a6;this[_0x2e6776(0x187)][_0x2e6776(0x85)]({'action':'patch','args':[_0x455778,_0x2b28a0,_0x518f67,{'ifVersion':ifVersion,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}[_0x34d3a6(0x115)](_0x259383,_0x1ee548,_0x278209,{version:version=null,timestamp:timestamp=Date['now'](),origin:origin=null,ttl:ttl=null}={}){const _0x2c3d04=_0x34d3a6;this[_0x2c3d04(0x187)]['push']({'action':_0x2c3d04(0x115),'args':[_0x259383,_0x1ee548,_0x278209,{'version':version,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}[_0x34d3a6(0xb6)](_0x2274c3,_0x50050a,{ifVersion:ifVersion=null,timestamp:timestamp=Date['now'](),origin:origin=null}={}){const _0x4b07c0=_0x34d3a6;this[_0x4b07c0(0x187)][_0x4b07c0(0x85)]({'action':_0x4b07c0(0xb6),'args':[_0x2274c3,_0x50050a,{'ifVersion':ifVersion,'timestamp':timestamp,'origin':origin}]});}[_0x34d3a6(0xf1)](_0x1f48e1,_0x1bcd60,_0x7968c5){const _0x530a09=_0x34d3a6;this['actions'][_0x530a09(0x85)]({'action':_0x530a09(0xf1),'args':[_0x1f48e1,_0x1bcd60,_0x7968c5]});}[_0x34d3a6(0xb7)](_0x3d388b,_0xbf56f4){const _0x51a943=_0x34d3a6;this['actions'][_0x51a943(0x85)]({'action':_0x51a943(0xb7),'args':[_0x3d388b,_0xbf56f4]});}[_0x34d3a6(0x137)](){const _0x5d3234=_0x34d3a6;if(this['_closed'])return;for(const _0x8cc4db of this['_undoHooks']){try{_0x8cc4db();}catch{}}this[_0x5d3234(0x9f)][_0x5d3234(0x14a)][_0x5d3234(0x145)](_0x51da5b[_0x5d3234(0x109)],{'id':this['id']}),this['actions']=[],this[_0x5d3234(0x13e)](),this[_0x5d3234(0x196)]=!![];}async[_0x34d3a6(0x190)](){const _0x20ba74=_0x34d3a6;if(this[_0x20ba74(0x196)])throw new Error(_0x20ba74(0xa5));const _0xfd9ed9={'id':this['id'],'timestamp':Date['now'](),'actions':this[_0x20ba74(0x187)]};this[_0x20ba74(0x9f)]['events'][_0x20ba74(0x145)](_0x51da5b[_0x20ba74(0xff)],_0xfd9ed9);try{const _0x1459d=_0x276ad2[_0x20ba74(0xd3)]?_0x276ad2[_0x20ba74(0x169)]():0x0;await this[_0x20ba74(0x9f)][_0x20ba74(0xbe)][_0x20ba74(0x1d8)](()=>{const _0x1f3e45=_0x20ba74;for(const _0xe34ce4 of this[_0x1f3e45(0x187)]){const _0xcc5b4=this['okdb']['_'+_0xe34ce4[_0x1f3e45(0x108)]];if(typeof _0xcc5b4!==_0x1f3e45(0x1a3))throw new Error('Unknown\x20transaction\x20action:\x20'+_0xe34ce4[_0x1f3e45(0x108)]);_0xcc5b4['call'](this[_0x1f3e45(0x9f)],this,..._0xe34ce4['args']);}}),_0x276ad2['enabled']&&_0x276ad2[_0x20ba74(0x181)](_0x20ba74(0x188),_0x276ad2[_0x20ba74(0x169)]()-_0x1459d,(this[_0x20ba74(0x9f)][_0x20ba74(0x87)]??'?')+_0x20ba74(0x90)+this['actions'][_0x20ba74(0x1d5)]);}catch(_0x276a53){for(const _0x7aab7 of this[_0x20ba74(0x1b4)]){try{_0x7aab7();}catch{}}this[_0x20ba74(0x13e)](),this[_0x20ba74(0x196)]=!![];if(_0x276a53 instanceof _0x2d2a29)throw _0x276a53;const _0x3001c4={'cause':_0x276a53,'env':this[_0x20ba74(0x9f)]?.[_0x20ba74(0x87)],'envPath':this['okdb']?.[_0x20ba74(0xd6)],'pid':process[_0x20ba74(0xa8)],'txnId':this['id'],'actionCount':this['actions'][_0x20ba74(0x1d5)],'actions':_0x1a2072(this[_0x20ba74(0x187)]),'nativeCode':_0x276a53?.[_0x20ba74(0x11d)],'nativeName':_0x276a53?.[_0x20ba74(0x87)]};try{this[_0x20ba74(0x9f)]?.['log']?.[_0x20ba74(0xa1)]?.(_0x20ba74(0x15f),{'env':_0x3001c4[_0x20ba74(0x177)],'envPath':_0x3001c4['envPath'],'pid':_0x3001c4['pid'],'txnId':_0x3001c4[_0x20ba74(0x194)],'actionCount':_0x3001c4[_0x20ba74(0x154)],'actions':_0x3001c4[_0x20ba74(0x187)],'nativeCode':_0x3001c4[_0x20ba74(0xe2)],'error':_0x276a53?.[_0x20ba74(0xe1)],'stack':_0x276a53?.['stack']});}catch{}throw new _0x2d2a29(_0x276a53?.[_0x20ba74(0xe1)]||_0x20ba74(0x92),_0x20ba74(0x17d),_0x3001c4);}this[_0x20ba74(0x9f)][_0x20ba74(0x14a)][_0x20ba74(0x145)](_0x51da5b[_0x20ba74(0x191)],_0xfd9ed9);for(const _0x193319 of this[_0x20ba74(0x13f)]){try{await _0x193319();}catch{}}this['actions']=[],this[_0x20ba74(0x13e)](),this[_0x20ba74(0x196)]=!![];}static[_0x34d3a6(0xca)](_0x3acf89){const _0x15f891=_0x34d3a6;return Object[_0x15f891(0x117)]({'id':_0x3acf89['id'],'put':_0x3acf89[_0x15f891(0xae)]['bind'](_0x3acf89),'update':_0x3acf89[_0x15f891(0x1c0)]['bind'](_0x3acf89),'patch':_0x3acf89[_0x15f891(0x1ae)][_0x15f891(0x1d2)](_0x3acf89),'create':_0x3acf89[_0x15f891(0x115)][_0x15f891(0x1d2)](_0x3acf89),'remove':_0x3acf89['remove']['bind'](_0x3acf89),'setTTL':_0x3acf89[_0x15f891(0xf1)][_0x15f891(0x1d2)](_0x3acf89),'clearTTL':_0x3acf89['clearTTL']['bind'](_0x3acf89),'commit':_0x3acf89[_0x15f891(0x190)][_0x15f891(0x1d2)](_0x3acf89),'rollback':_0x3acf89[_0x15f891(0x137)]['bind'](_0x3acf89),'get':_0x3acf89['get'][_0x15f891(0x1d2)](_0x3acf89),'getEntry':_0x3acf89[_0x15f891(0x110)][_0x15f891(0x1d2)](_0x3acf89),'getMany':_0x3acf89[_0x15f891(0x16a)][_0x15f891(0x1d2)](_0x3acf89),'getRange':_0x3acf89[_0x15f891(0x97)][_0x15f891(0x1d2)](_0x3acf89),'getValues':_0x3acf89[_0x15f891(0x135)]['bind'](_0x3acf89),'getKeys':_0x3acf89[_0x15f891(0x1a9)][_0x15f891(0x1d2)](_0x3acf89),'byIndex':_0x3acf89[_0x15f891(0x11f)][_0x15f891(0x1d2)](_0x3acf89),'query':_0x3acf89['query'][_0x15f891(0x1d2)](_0x3acf89),'getClock':_0x3acf89[_0x15f891(0xf8)][_0x15f891(0x1d2)](_0x3acf89),'getCount':_0x3acf89[_0x15f891(0x126)][_0x15f891(0x1d2)](_0x3acf89),'read':_0x3acf89,'raw':_0x3acf89});}static[_0x34d3a6(0x179)](_0x21e371,_0xd83fb=[]){const _0x35e979=_0x34d3a6;if(!Array[_0x35e979(0x140)](_0xd83fb))throw new _0x2d2a29(_0x35e979(0x120),_0x35e979(0x139));for(const _0x462a87 of _0xd83fb){if(Array[_0x35e979(0x140)](_0x462a87)){const [_0x24d30,..._0x387ad0]=_0x462a87;if(typeof _0x21e371[_0x24d30]!==_0x35e979(0x1a3))throw new _0x2d2a29(_0x35e979(0x101)+_0x24d30,'TXN_INVALID_ACTION',{'action':_0x24d30});_0x21e371[_0x24d30](..._0x387ad0);continue;}if(!_0x462a87||typeof _0x462a87!==_0x35e979(0x13c))throw new _0x2d2a29(_0x35e979(0x16e),_0x35e979(0xd5));const {action:_0x351895}=_0x462a87;if(typeof _0x351895!==_0x35e979(0x1bd)||typeof _0x21e371[_0x351895]!==_0x35e979(0x1a3))throw new _0x2d2a29(_0x35e979(0x101)+_0x351895,_0x35e979(0x198),{'action':_0x351895});switch(_0x351895){case _0x35e979(0xae):case _0x35e979(0x1c0):case'create':_0x21e371[_0x351895](_0x462a87['type'],_0x462a87[_0x35e979(0xcf)],_0x462a87[_0x35e979(0x1ca)],{..._0x462a87[_0x35e979(0xd4)],'ttl':_0x462a87[_0x35e979(0x1da)]??_0x462a87[_0x35e979(0xd4)]?.[_0x35e979(0x1da)]??null});break;case _0x35e979(0x1ae):_0x21e371[_0x35e979(0x1ae)](_0x462a87[_0x35e979(0x1dc)],_0x462a87['key'],_0x462a87['patch'],{..._0x462a87[_0x35e979(0xd4)],'ttl':_0x462a87[_0x35e979(0x1da)]??_0x462a87[_0x35e979(0xd4)]?.[_0x35e979(0x1da)]??null});break;case _0x35e979(0xb6):_0x21e371[_0x35e979(0xb6)](_0x462a87[_0x35e979(0x1dc)],_0x462a87[_0x35e979(0xcf)],_0x462a87[_0x35e979(0xd4)]||{});break;case _0x35e979(0xf1):_0x21e371[_0x35e979(0xf1)](_0x462a87[_0x35e979(0x1dc)],_0x462a87['key'],_0x462a87[_0x35e979(0x1da)]);break;case _0x35e979(0xb7):_0x21e371[_0x35e979(0xb7)](_0x462a87[_0x35e979(0x1dc)],_0x462a87[_0x35e979(0xcf)]);break;default:throw new _0x2d2a29(_0x35e979(0xaa)+_0x351895,_0x35e979(0x198),{'action':_0x351895});}}}static async['run'](_0x471713,_0x46a293,_0xc9ee3e={}){const _0x521eb5=_0x34d3a6,_0x1cafa4=new _0xed50cb(_0x471713,_0xc9ee3e),_0x53c676=_0xed50cb[_0x521eb5(0xca)](_0x1cafa4);try{typeof _0x46a293===_0x521eb5(0x1a3)?await _0x46a293(_0x53c676):_0xed50cb[_0x521eb5(0x179)](_0x1cafa4,_0x46a293||[]);const _0x5a53ed=_0x1cafa4[_0x521eb5(0x187)]['length'];return await _0x1cafa4['commit'](),{'id':_0x1cafa4['id'],'actions':_0x5a53ed};}catch(_0x4af2ed){try{_0x1cafa4[_0x521eb5(0x137)]();}catch(_0x2bf2a9){}throw _0x4af2ed;}}}return okdbTransaction=_0xed50cb,okdbTransaction;}var okdbFunctionsFacades,hasRequiredOkdbFunctionsFacades;function requireOkdbFunctionsFacades(){if(hasRequiredOkdbFunctionsFacades)return okdbFunctionsFacades;hasRequiredOkdbFunctionsFacades=0x1;const _0x13b68c=requireOkdbTransaction();function _0x310ee9(_0x4e065c){const _0x3b8887=_0x3a2b;return{'transaction':typeof _0x4e065c[_0x3b8887(0x1d8)]==='function'?_0x4e065c[_0x3b8887(0x1d8)][_0x3b8887(0x1d2)](_0x4e065c):_0x43233f=>new _0x13b68c(_0x4e065c,_0x43233f),'txn':typeof _0x4e065c[_0x3b8887(0x1cd)]==='function'?_0x4e065c[_0x3b8887(0x1cd)][_0x3b8887(0x1d2)](_0x4e065c):(_0x2cdda1,_0x428723)=>_0x13b68c['run'](_0x4e065c,_0x2cdda1,_0x428723)};}function _0x4414d2(_0x5a5de6){const _0x10dce1=_0x3a2b;return{'name':_0x5a5de6['name'],..._0x310ee9(_0x5a5de6),'put':_0x5a5de6[_0x10dce1(0xae)][_0x10dce1(0x1d2)](_0x5a5de6),'update':_0x5a5de6[_0x10dce1(0x1c0)]['bind'](_0x5a5de6),'patch':_0x5a5de6[_0x10dce1(0x1ae)][_0x10dce1(0x1d2)](_0x5a5de6),'create':_0x5a5de6[_0x10dce1(0x115)][_0x10dce1(0x1d2)](_0x5a5de6),'remove':_0x5a5de6[_0x10dce1(0xb6)][_0x10dce1(0x1d2)](_0x5a5de6),'get':_0x5a5de6[_0x10dce1(0x1b1)][_0x10dce1(0x1d2)](_0x5a5de6),'getMany':_0x5a5de6[_0x10dce1(0x16a)][_0x10dce1(0x1d2)](_0x5a5de6),'getEntry':_0x5a5de6[_0x10dce1(0x110)]['bind'](_0x5a5de6),'getRange':_0x5a5de6['getRange'][_0x10dce1(0x1d2)](_0x5a5de6),'getValues':_0x5a5de6[_0x10dce1(0x135)][_0x10dce1(0x1d2)](_0x5a5de6),'getKeys':_0x5a5de6[_0x10dce1(0x1a9)][_0x10dce1(0x1d2)](_0x5a5de6),'getCount':_0x5a5de6['getCount'][_0x10dce1(0x1d2)](_0x5a5de6),'getByPrefix':_0x5a5de6['getByPrefix'][_0x10dce1(0x1d2)](_0x5a5de6),'getIndex':_0x5a5de6['getIndex'][_0x10dce1(0x1d2)](_0x5a5de6),'byIndex':_0x5a5de6[_0x10dce1(0x11f)]['bind'](_0x5a5de6),'query':_0x5a5de6['query']['bind'](_0x5a5de6),'geoQuery':_0x5a5de6[_0x10dce1(0x9a)][_0x10dce1(0x1d2)](_0x5a5de6),'ftsQuery':_0x5a5de6[_0x10dce1(0x113)][_0x10dce1(0x1d2)](_0x5a5de6),'setTTL':_0x5a5de6['setTTL']['bind'](_0x5a5de6),'getTTL':_0x5a5de6[_0x10dce1(0x14e)][_0x10dce1(0x1d2)](_0x5a5de6),'clearTTL':_0x5a5de6[_0x10dce1(0xb7)]['bind'](_0x5a5de6),'sweepExpiredTTL':_0x5a5de6[_0x10dce1(0x1ac)][_0x10dce1(0x1d2)](_0x5a5de6),'listTTL':_0x5a5de6['listTTL'][_0x10dce1(0x1d2)](_0x5a5de6),'ttlStats':_0x5a5de6[_0x10dce1(0x17b)][_0x10dce1(0x1d2)](_0x5a5de6),'setDefaultTTL':_0x5a5de6[_0x10dce1(0x10a)][_0x10dce1(0x1d2)](_0x5a5de6),'getDefaultTTL':_0x5a5de6[_0x10dce1(0x81)][_0x10dce1(0x1d2)](_0x5a5de6),'clearDefaultTTL':_0x5a5de6[_0x10dce1(0xf9)][_0x10dce1(0x1d2)](_0x5a5de6),'registerType':_0x5a5de6[_0x10dce1(0x1e5)]['bind'](_0x5a5de6),'ensureType':_0x5a5de6[_0x10dce1(0x193)][_0x10dce1(0x1d2)](_0x5a5de6),'hasType':_0x5a5de6['hasType'][_0x10dce1(0x1d2)](_0x5a5de6),'dropType':_0x5a5de6[_0x10dce1(0x17f)][_0x10dce1(0x1d2)](_0x5a5de6),'registerIndex':_0x5a5de6[_0x10dce1(0x18e)][_0x10dce1(0x1d2)](_0x5a5de6),'hasIndex':_0x5a5de6['hasIndex']['bind'](_0x5a5de6),'dropIndex':_0x5a5de6['dropIndex'][_0x10dce1(0x1d2)](_0x5a5de6),'resetIndex':_0x5a5de6[_0x10dce1(0xeb)][_0x10dce1(0x1d2)](_0x5a5de6),'indexReady':_0x5a5de6[_0x10dce1(0x199)][_0x10dce1(0x1d2)](_0x5a5de6),'getIndexStatus':_0x5a5de6['getIndexStatus']['bind'](_0x5a5de6),'getClock':_0x5a5de6[_0x10dce1(0xf8)]['bind'](_0x5a5de6),'getChanges':_0x5a5de6[_0x10dce1(0x1b2)][_0x10dce1(0x1d2)](_0x5a5de6),'count':_0x5a5de6[_0x10dce1(0x16f)][_0x10dce1(0x1d2)](_0x5a5de6),'range':_0x5a5de6[_0x10dce1(0xc1)][_0x10dce1(0x1d2)](_0x5a5de6),'now':_0x5a5de6[_0x10dce1(0x169)]['bind'](_0x5a5de6)};}function _0x40eb3f(_0x244723){const _0x39f522=_0x3a2b;if(!_0x244723)return null;const _0x4493bf={};for(const _0x4b15d3 of[_0x39f522(0x104),_0x39f522(0x1a8),_0x39f522(0xad),_0x39f522(0x1d7),_0x39f522(0xfd),_0x39f522(0xcd),_0x39f522(0x96),_0x39f522(0x1af)]){if(typeof _0x244723[_0x4b15d3]===_0x39f522(0x1a3))_0x4493bf[_0x4b15d3]=_0x244723[_0x4b15d3][_0x39f522(0x1d2)](_0x244723);}return Object[_0x39f522(0x1e0)](_0x4493bf)['length']?_0x4493bf:null;}function _0x29c454(_0x5ca587){const _0x588a1a=_0x3a2b;if(!_0x5ca587)return null;const _0x2599ce={};for(const _0x5d1ce9 of[_0x588a1a(0x180),_0x588a1a(0xed),_0x588a1a(0xb6),'get',_0x588a1a(0xad),'getByPath']){if(typeof _0x5ca587[_0x5d1ce9]===_0x588a1a(0x1a3))_0x2599ce[_0x5d1ce9]=_0x5ca587[_0x5d1ce9][_0x588a1a(0x1d2)](_0x5ca587);}return Object[_0x588a1a(0x1e0)](_0x2599ce)['length']?_0x2599ce:null;}function _0x18546b(_0x58fcc9){const _0x25a159=_0x3a2b;return{'env':_0x58fcc9[_0x25a159(0x177)][_0x25a159(0x1d2)](_0x58fcc9),'createEnvironment':_0x58fcc9['createEnvironment'][_0x25a159(0x1d2)](_0x58fcc9),'removeEnvironment':_0x58fcc9['removeEnvironment'][_0x25a159(0x1d2)](_0x58fcc9),'info':_0x58fcc9[_0x25a159(0xbd)],..._0x310ee9(_0x58fcc9),'put':_0x58fcc9[_0x25a159(0xae)][_0x25a159(0x1d2)](_0x58fcc9),'update':_0x58fcc9['update']['bind'](_0x58fcc9),'patch':_0x58fcc9['patch'][_0x25a159(0x1d2)](_0x58fcc9),'create':_0x58fcc9[_0x25a159(0x115)]['bind'](_0x58fcc9),'remove':_0x58fcc9['remove']['bind'](_0x58fcc9),'get':_0x58fcc9[_0x25a159(0x1b1)]['bind'](_0x58fcc9),'getMany':_0x58fcc9[_0x25a159(0x16a)][_0x25a159(0x1d2)](_0x58fcc9),'getEntry':_0x58fcc9[_0x25a159(0x110)][_0x25a159(0x1d2)](_0x58fcc9),'getRange':_0x58fcc9[_0x25a159(0x97)]['bind'](_0x58fcc9),'getValues':_0x58fcc9['getValues'][_0x25a159(0x1d2)](_0x58fcc9),'getKeys':_0x58fcc9[_0x25a159(0x1a9)][_0x25a159(0x1d2)](_0x58fcc9),'getCount':_0x58fcc9[_0x25a159(0x126)][_0x25a159(0x1d2)](_0x58fcc9),'getByPrefix':_0x58fcc9[_0x25a159(0x185)][_0x25a159(0x1d2)](_0x58fcc9),'getIndex':_0x58fcc9[_0x25a159(0x189)][_0x25a159(0x1d2)](_0x58fcc9),'byIndex':_0x58fcc9[_0x25a159(0x11f)][_0x25a159(0x1d2)](_0x58fcc9),'query':_0x58fcc9[_0x25a159(0xfe)]['bind'](_0x58fcc9),'setTTL':_0x58fcc9[_0x25a159(0xf1)]['bind'](_0x58fcc9),'getTTL':_0x58fcc9[_0x25a159(0x14e)][_0x25a159(0x1d2)](_0x58fcc9),'clearTTL':_0x58fcc9[_0x25a159(0xb7)]['bind'](_0x58fcc9),'sweepExpiredTTL':_0x58fcc9[_0x25a159(0x1ac)]['bind'](_0x58fcc9),'listTTL':_0x58fcc9[_0x25a159(0x105)][_0x25a159(0x1d2)](_0x58fcc9),'ttlStats':_0x58fcc9[_0x25a159(0x17b)][_0x25a159(0x1d2)](_0x58fcc9),'setDefaultTTL':_0x58fcc9[_0x25a159(0x10a)][_0x25a159(0x1d2)](_0x58fcc9),'getDefaultTTL':_0x58fcc9[_0x25a159(0x81)][_0x25a159(0x1d2)](_0x58fcc9),'clearDefaultTTL':_0x58fcc9[_0x25a159(0xf9)][_0x25a159(0x1d2)](_0x58fcc9),'ensureType':_0x58fcc9[_0x25a159(0x193)][_0x25a159(0x1d2)](_0x58fcc9),'registerType':_0x58fcc9[_0x25a159(0x1e5)][_0x25a159(0x1d2)](_0x58fcc9),'hasType':_0x58fcc9[_0x25a159(0x9b)]['bind'](_0x58fcc9),'dropType':_0x58fcc9[_0x25a159(0x17f)][_0x25a159(0x1d2)](_0x58fcc9),'registerIndex':_0x58fcc9[_0x25a159(0x18e)][_0x25a159(0x1d2)](_0x58fcc9),'hasIndex':_0x58fcc9['hasIndex'][_0x25a159(0x1d2)](_0x58fcc9),'dropIndex':_0x58fcc9['dropIndex'][_0x25a159(0x1d2)](_0x58fcc9),'resetIndex':_0x58fcc9['resetIndex'][_0x25a159(0x1d2)](_0x58fcc9),'indexReady':_0x58fcc9[_0x25a159(0x199)][_0x25a159(0x1d2)](_0x58fcc9),'getIndexStatus':_0x58fcc9[_0x25a159(0xc9)][_0x25a159(0x1d2)](_0x58fcc9),'getClock':_0x58fcc9[_0x25a159(0xf8)][_0x25a159(0x1d2)](_0x58fcc9),'getChanges':_0x58fcc9['getChanges'][_0x25a159(0x1d2)](_0x58fcc9),'queue':_0x58fcc9[_0x25a159(0xdb)],'files':_0x58fcc9[_0x25a159(0x1ba)]};}return okdbFunctionsFacades={'createEnvFacade':_0x4414d2,'createQueueFacade':_0x40eb3f,'createFilesFacade':_0x29c454,'createGlobalFacade':_0x18546b},okdbFunctionsFacades;}var okdbFunctionsDryrun,hasRequiredOkdbFunctionsDryrun;function requireOkdbFunctionsDryrun(){const _0x4b5c6d=_0x25c30f;if(hasRequiredOkdbFunctionsDryrun)return okdbFunctionsDryrun;hasRequiredOkdbFunctionsDryrun=0x1;const _0x18f66c=new Set([_0x4b5c6d(0xae),_0x4b5c6d(0x1ae),_0x4b5c6d(0x115),'remove',_0x4b5c6d(0x1c0),_0x4b5c6d(0xf1),_0x4b5c6d(0xb7),_0x4b5c6d(0x1ac),'setDefaultTTL',_0x4b5c6d(0xf9),'dropType','dropIndex',_0x4b5c6d(0xeb)]),_0x34bb3e=new Set([_0x4b5c6d(0x104),_0x4b5c6d(0x1d7),_0x4b5c6d(0xfd),'addBucket']),_0x10d62e=new Set([_0x4b5c6d(0x180),_0x4b5c6d(0xb6)]);function _0x2e73a8(_0x44ac6a,_0x36a3b8){const _0x3e32d6=_0x4b5c6d;if(_0x44ac6a===_0x3e32d6(0x177)||_0x44ac6a===_0x3e32d6(0x136))return _0x18f66c[_0x3e32d6(0x7c)](_0x36a3b8);if(_0x44ac6a===_0x3e32d6(0xdb))return _0x34bb3e[_0x3e32d6(0x7c)](_0x36a3b8);if(_0x44ac6a===_0x3e32d6(0x1ba))return _0x10d62e[_0x3e32d6(0x7c)](_0x36a3b8);return![];}function _0x490ccd(_0x3861bd,_0x146b02,_0x13fc2f,_0x35c110){if(!_0x3861bd)return _0x3861bd;return new Proxy(_0x3861bd,{'get'(_0x37ba1b,_0x221c07,_0x39372c){const _0x264447=_0x3a2b,_0x59eaf9=Reflect[_0x264447(0x1b1)](_0x37ba1b,_0x221c07,_0x39372c);if(typeof _0x59eaf9!==_0x264447(0x1a3))return _0x59eaf9;if(!_0x2e73a8(_0x146b02,_0x221c07))return _0x59eaf9['bind'](_0x37ba1b);return function(..._0x2f33de){const _0x58cb70=_0x264447;return _0x35c110[_0x58cb70(0x85)]({'scope':_0x146b02,'method':_0x221c07,'envName':_0x13fc2f,'args':_0x2f33de}),null;};}});}function _0x4831e2(_0xa6eaae,_0x44aeae,_0x292d91,_0x9446d){const _0x535678={};for(const _0x4c0bc1 of _0x292d91){_0x535678[_0x4c0bc1]=(..._0x15fa9d)=>{return _0x2e73a8(_0xa6eaae,_0x4c0bc1)&&_0x9446d['push']({'scope':_0xa6eaae,'method':_0x4c0bc1,'envName':_0x44aeae,'args':_0x15fa9d}),null;};}return _0x535678;}return okdbFunctionsDryrun={'isWriteMethod':_0x2e73a8,'wrapForDryRun':_0x490ccd,'syntheticDryRunFacade':_0x4831e2,'ENV_WRITE_METHODS':_0x18f66c,'QUEUE_WRITE_METHODS':_0x34bb3e,'FILES_WRITE_METHODS':_0x10d62e},okdbFunctionsDryrun;}var okdbFunctionsContext,hasRequiredOkdbFunctionsContext;function _0x3a2b(_0x1a084d,_0x4b41a9){_0x1a084d=_0x1a084d-0x7a;const _0x3762fc=_0x3762();let _0x3a2b43=_0x3762fc[_0x1a084d];return _0x3a2b43;}function requireOkdbFunctionsContext(){const _0x3dbf73=_0x25c30f;if(hasRequiredOkdbFunctionsContext)return okdbFunctionsContext;hasRequiredOkdbFunctionsContext=0x1;const {createEnvFacade:_0x43e7b4,createQueueFacade:_0x1c9ac9,createFilesFacade:_0x1f45b1,createGlobalFacade:_0x11d551}=requireOkdbFunctionsFacades(),{wrapForDryRun:_0x381e32,syntheticDryRunFacade:_0x295375}=requireOkdbFunctionsDryrun(),_0x3f4058=[_0x3dbf73(0x104),_0x3dbf73(0x1a8),_0x3dbf73(0xad),_0x3dbf73(0x1d7),_0x3dbf73(0xfd),_0x3dbf73(0xcd),_0x3dbf73(0x96),_0x3dbf73(0x1af)],_0x21457b=[_0x3dbf73(0x180),_0x3dbf73(0xed),_0x3dbf73(0xb6),'get',_0x3dbf73(0xad),_0x3dbf73(0x14f)];function _0x5005b2(_0x518f64,_0x3f71b5){const _0x45e542=_0x3dbf73,_0x3a607a=(_0x11e1a2,_0x2eb687,_0x11ee2d)=>_0x3f71b5({'type':_0x45e542(0x10b),'requestId':_0x518f64[_0x45e542(0x1e2)],'runId':_0x518f64[_0x45e542(0x12e)],'entry':{'level':_0x11e1a2,'msg':_0x2eb687,'context':_0x11ee2d,'ts':Date[_0x45e542(0x169)]()}}),_0x3a2ab1=(_0x433b15,_0x3bb8bd)=>_0x3a607a(_0x45e542(0xbd),_0x433b15,_0x3bb8bd);return _0x3a2ab1[_0x45e542(0xbd)]=(_0x219372,_0x237bd0)=>_0x3a607a(_0x45e542(0xbd),_0x219372,_0x237bd0),_0x3a2ab1[_0x45e542(0x151)]=(_0x8cfb87,_0x43e783)=>_0x3a607a(_0x45e542(0x151),_0x8cfb87,_0x43e783),_0x3a2ab1['error']=(_0x229856,_0x2b109a)=>_0x3a607a('error',_0x229856,_0x2b109a),_0x3a2ab1[_0x45e542(0x1b6)]=(_0x1e0506,_0x34a817)=>_0x3a607a('debug',_0x1e0506,_0x34a817),_0x3a2ab1;}function _0x41529d(_0x4fc327,_0x3446a1,_0x491258){const _0x5b72da=_0x3dbf73;if(!_0x4fc327)return null;return{'id':_0x4fc327['id']??null,'type':_0x4fc327[_0x5b72da(0x1dc)]??null,'tries':_0x4fc327[_0x5b72da(0x1c7)]??null,'created':_0x4fc327[_0x5b72da(0x159)]??null,'tags':_0x4fc327[_0x5b72da(0x168)]??null,'priority':_0x4fc327[_0x5b72da(0x1b9)]??null,'bucket':_0x4fc327['bucket']??null,'cron':_0x4fc327['cron']??null,'heartbeat'(){const _0x21041c=_0x5b72da;_0x491258({'type':_0x21041c(0x124),'requestId':_0x3446a1[_0x21041c(0x1e2)],'runId':_0x3446a1['runId'],'jobId':_0x4fc327['id'],'claimId':_0x4fc327['claimId']});},'markProgress'(_0x493adf){const _0x27f91d=_0x5b72da;_0x491258({'type':_0x27f91d(0xdc),'requestId':_0x3446a1['requestId'],'runId':_0x3446a1[_0x27f91d(0x12e)],'jobId':_0x4fc327['id'],'claimId':_0x4fc327['claimId'],'message':_0x493adf});}};}function _0x164456(_0x3798b8){const _0x4eb29e=_0x3dbf73;if(!_0x3798b8)return null;return{'mode':_0x3798b8[_0x4eb29e(0x1c6)]??null,'sourceType':_0x3798b8['sourceType']??null,'sourceEnv':_0x3798b8[_0x4eb29e(0x155)]??null,'processor':_0x3798b8[_0x4eb29e(0x158)]??null,'engineKey':_0x3798b8[_0x4eb29e(0x1a4)]??null,'cursorKey':_0x3798b8[_0x4eb29e(0x1aa)]??null};}function _0x9762e3(_0x2c5412){const _0x4bbddf=_0x3dbf73;if(!_0x2c5412)return null;return{'mode':_0x2c5412[_0x4bbddf(0x1c6)]??null,'sourceType':_0x2c5412[_0x4bbddf(0xda)]??null,'targetType':_0x2c5412[_0x4bbddf(0x8d)]??null,'sourceEnv':_0x2c5412[_0x4bbddf(0x155)]??null,'targetEnv':_0x2c5412[_0x4bbddf(0x165)]??null,'engineKey':_0x2c5412['engineKey']??null,'cursorKey':_0x2c5412['cursorKey']??null};}function _0xb69b93(_0x2f314c,_0x2608b1,_0x4f17d2,_0x587bb7=null,_0x1029c0=null){const _0x2b9948=_0x3dbf73,_0x205597={'runId':_0x2608b1['runId'],'scope':'env','env':_0x2608b1[_0x2b9948(0x131)]??null,'functionName':_0x2608b1['functionName'],'trigger':_0x2608b1[_0x2b9948(0xbd)]?.[_0x2b9948(0x13b)]??_0x2b9948(0xa9),'requestedAt':_0x2608b1[_0x2b9948(0xbd)]?.[_0x2b9948(0x182)]??Date['now']()},_0x5dbb6c=_0x5005b2(_0x2608b1,_0x4f17d2),_0x2dfc11=AbortSignal['timeout'](Math[_0x2b9948(0x147)](0x1,_0x2608b1[_0x2b9948(0x1b3)]?.[_0x2b9948(0x9e)]??0x3e8)),_0x1c5fb1=_0x1029c0?AbortSignal[_0x2b9948(0xb5)]([_0x2dfc11,_0x1029c0]):_0x2dfc11,_0x29be03=_0x2f314c[_0x2b9948(0x177)](_0x2608b1[_0x2b9948(0x131)]),_0x4f31f9=_0x587bb7?_0x381e32(_0x29be03,'env',_0x2608b1[_0x2b9948(0x131)],_0x587bb7):_0x29be03,_0x28222f=_0x587bb7?_0x29be03[_0x2b9948(0xdb)]?_0x381e32(_0x29be03[_0x2b9948(0xdb)],_0x2b9948(0xdb),_0x2608b1[_0x2b9948(0x131)],_0x587bb7):_0x295375(_0x2b9948(0xdb),_0x2608b1['envName'],_0x3f4058,_0x587bb7):_0x29be03[_0x2b9948(0xdb)],_0x4c343a=_0x587bb7?_0x29be03[_0x2b9948(0x1ba)]?_0x381e32(_0x29be03['files'],_0x2b9948(0x1ba),_0x2608b1[_0x2b9948(0x131)],_0x587bb7):_0x295375('files',_0x2608b1['envName'],_0x21457b,_0x587bb7):_0x29be03[_0x2b9948(0x1ba)],_0x48ab1b=_0x43e7b4(_0x4f31f9),_0x2066ee=_0x1c9ac9(_0x28222f),_0xa4dce1=_0x1f45b1(_0x4c343a);if(_0x2066ee)_0x48ab1b['queue']=_0x2066ee;if(_0xa4dce1)_0x48ab1b[_0x2b9948(0x1ba)]=_0xa4dce1;const _0x5c6ade={'payload':_0x2608b1[_0x2b9948(0x112)]??null,'info':_0x205597,'signal':_0x1c5fb1,'log':_0x5dbb6c,'env':_0x48ab1b},_0x1cdbff=_0x41529d(_0x2608b1[_0x2b9948(0xb0)],_0x2608b1,_0x4f17d2);if(_0x1cdbff)_0x5c6ade[_0x2b9948(0x12d)]=_0x1cdbff;const _0x1a992e=_0x164456(_0x2608b1[_0x2b9948(0x9c)]);if(_0x1a992e)_0x5c6ade[_0x2b9948(0x158)]=_0x1a992e;const _0x2488cc=_0x9762e3(_0x2608b1[_0x2b9948(0x7f)]);if(_0x2488cc)_0x5c6ade[_0x2b9948(0x157)]=_0x2488cc;if(_0x2608b1[_0x2b9948(0x14c)]){const _0x178ed7=_0x587bb7?_0x381e32(_0x2f314c,_0x2b9948(0x136),null,_0x587bb7):_0x2f314c;_0x5c6ade[_0x2b9948(0x9f)]=_0x11d551(_0x178ed7);}return _0x5c6ade;}return okdbFunctionsContext={'createExecutionContext':_0xb69b93,'createScriptLogger':_0x5005b2},okdbFunctionsContext;}var hasRequiredOkdbFunctionsSandboxWorker;function requireOkdbFunctionsSandboxWorker(){const _0x4ce4c6=_0x25c30f;if(hasRequiredOkdbFunctionsSandboxWorker)return okdbFunctionsSandboxWorker$1;hasRequiredOkdbFunctionsSandboxWorker=0x1;const {parentPort:_0x19d7a2,workerData:_0x265110}=require$$0$3;requireOkdbFatalReport()['enableFatalReport'](_0x4ce4c6(0x121));const _0x4a14ca=require$$2,{compileFunctionExpression:_0x14556f}=requireOkdbFunctionsSandbox(),{serializeError:_0x45df66}=requireOkdbFunctionsIpc(),{createExecutionContext:_0x2b7a0c}=requireOkdbFunctionsContext(),_0x2d8a4d=require$$6;let _0x1aca09=null,_0x527292=![];const _0x15067d=new Map(),_0x134d06=new Map();function _0x2c74e0(_0x5d6479){const _0x509dcd=_0x4ce4c6;try{_0x19d7a2[_0x509dcd(0x176)](_0x5d6479);}catch{}}function _0xc6faea(_0x37148b){const _0x5227f1=_0x4ce4c6,_0x4e35bd=(_0x37148b[_0x5227f1(0x131)]||_0x5227f1(0x18c))+':'+_0x37148b['functionName']+':'+_0x37148b[_0x5227f1(0x86)]+':'+_0x37148b[_0x5227f1(0x16c)];let _0x1a6dcc=_0x15067d[_0x5227f1(0x1b1)](_0x4e35bd);return!_0x1a6dcc&&(_0x1a6dcc=_0x14556f(_0x37148b[_0x5227f1(0xe8)],{'allowFetch':_0x37148b['runtime']?.['allowFetch']!==![],'allowedFetchDomains':_0x37148b[_0x5227f1(0x1b3)]?.[_0x5227f1(0xb3)],'filename':_0x37148b[_0x5227f1(0x125)]+_0x5227f1(0x12a)}),_0x15067d[_0x5227f1(0x11a)](_0x4e35bd,_0x1a6dcc)),_0x1a6dcc;}async function _0x1428dc(_0x18ed59){const _0x41d299=_0x4ce4c6,_0x418e26=Date[_0x41d299(0x169)](),_0x481f0b=new AbortController();_0x134d06[_0x41d299(0x11a)](_0x18ed59[_0x41d299(0x1e2)],_0x481f0b);try{const _0x1fa5bf=_0xc6faea(_0x18ed59);if(_0x18ed59[_0x41d299(0x131)])await _0x1aca09[_0x41d299(0x11e)](_0x18ed59[_0x41d299(0x131)]);const _0x39b33d=_0x18ed59['dryRun']?[]:null,_0x110516=_0x2b7a0c(_0x1aca09,_0x18ed59,_0x2c74e0,_0x39b33d,_0x481f0b['signal']),_0x327910=await _0x1fa5bf(_0x110516),_0x369d24={'type':_0x41d299(0x119),'requestId':_0x18ed59['requestId'],'runId':_0x18ed59['runId'],'result':_0x327910,'meta':{'runnerId':'sandbox-'+process['pid'],'startedAt':_0x418e26,'finishedAt':Date[_0x41d299(0x169)](),'durationMs':Date[_0x41d299(0x169)]()-_0x418e26}};if(_0x39b33d)_0x369d24[_0x41d299(0x8a)]=_0x39b33d;_0x2c74e0(_0x369d24);}catch(_0x1ee088){_0x2c74e0({'type':'error','requestId':_0x18ed59[_0x41d299(0x1e2)],'runId':_0x18ed59[_0x41d299(0x12e)],'error':_0x45df66(_0x1ee088),'meta':{'runnerId':_0x41d299(0x93)+process[_0x41d299(0xa8)],'startedAt':_0x418e26,'finishedAt':Date[_0x41d299(0x169)](),'durationMs':Date['now']()-_0x418e26}});}finally{_0x134d06[_0x41d299(0xbb)](_0x18ed59[_0x41d299(0x1e2)]);}}async function _0x41b018(){const _0x1af931=_0x4ce4c6;if(_0x527292)return;_0x527292=!![];try{await _0x1aca09?.[_0x1af931(0x1e6)]?.();}catch{}process[_0x1af931(0x132)](0x0);}async function _0x37cfc1(){const _0x390ac0=_0x4ce4c6,{rootPath:_0x52eceb}=_0x265110??{};if(!_0x52eceb)throw new Error(_0x390ac0(0x1bf));_0x1aca09=new _0x2d8a4d(_0x52eceb,{'engines':![],'processors':![],'compaction':![],'http':![],'auth':{'open':!![]},'processes':![]}),await _0x1aca09[_0x390ac0(0xc2)]();const _0x2ab9e5=setInterval(()=>{const _0x1714ea=_0x390ac0;if(_0x527292)return;for(const [,_0x2a2ed3]of _0x1aca09[_0x1714ea(0x171)]){try{_0x2a2ed3[_0x1714ea(0x84)]?.();}catch{}}},0xc8);if(typeof _0x2ab9e5[_0x390ac0(0xe5)]===_0x390ac0(0x1a3))_0x2ab9e5['unref']();_0x19d7a2['on'](_0x390ac0(0xe1),_0x56cbfd=>{const _0x54ea9d=_0x390ac0;if(!_0x56cbfd||typeof _0x56cbfd!==_0x54ea9d(0x13c))return;if(_0x56cbfd['type']===_0x54ea9d(0xce))return void _0x41b018();if(_0x56cbfd[_0x54ea9d(0x1dc)]===_0x54ea9d(0xec)){_0x134d06[_0x54ea9d(0x1b1)](_0x56cbfd[_0x54ea9d(0x1e2)])?.['abort'](new Error(_0x54ea9d(0xa7)));return;}_0x56cbfd[_0x54ea9d(0x1dc)]===_0x54ea9d(0x184)&&void _0x1428dc(_0x56cbfd[_0x54ea9d(0x12d)]);});const _0x334658=Math[_0x390ac0(0x147)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x5511dc=setInterval(()=>{const _0x4c926d=_0x390ac0;try{_0x2c74e0({'type':_0x4c926d(0x12f),'heapUsed':_0x4a14ca[_0x4c926d(0x178)]()[_0x4c926d(0x1e4)]});}catch{}},_0x334658);if(typeof _0x5511dc[_0x390ac0(0xe5)]===_0x390ac0(0x1a3))_0x5511dc['unref']();_0x2c74e0({'type':_0x390ac0(0x8c)});}return _0x37cfc1()[_0x4ce4c6(0xee)](_0x591ad6=>{const _0x59a68f=_0x4ce4c6;_0x2c74e0({'type':_0x59a68f(0x192),'error':_0x45df66(_0x591ad6)}),process[_0x59a68f(0x132)](0x1);}),okdbFunctionsSandboxWorker$1;}var okdbFunctionsSandboxWorkerExports=requireOkdbFunctionsSandboxWorker(),okdbFunctionsSandboxWorker=getDefaultExportFromCjs(okdbFunctionsSandboxWorkerExports);module['exports']=okdbFunctionsSandboxWorker;
1
+ 'use strict';function _0x4c6d(_0x34a457,_0x2066a5){_0x34a457=_0x34a457-0xbb;const _0x3bbce9=_0x3bbc();let _0x4c6de3=_0x3bbce9[_0x34a457];return _0x4c6de3;}const _0x318de2=_0x4c6d;(function(_0x319965,_0x506557){const _0x3010d7=_0x4c6d,_0xb703bd=_0x319965();while(!![]){try{const _0x74a86d=-parseInt(_0x3010d7(0xcd))/0x1+parseInt(_0x3010d7(0x10a))/0x2*(parseInt(_0x3010d7(0x219))/0x3)+-parseInt(_0x3010d7(0x189))/0x4*(parseInt(_0x3010d7(0xf3))/0x5)+parseInt(_0x3010d7(0x134))/0x6+-parseInt(_0x3010d7(0x202))/0x7+parseInt(_0x3010d7(0x1a6))/0x8*(parseInt(_0x3010d7(0x10f))/0x9)+parseInt(_0x3010d7(0x1f3))/0xa*(parseInt(_0x3010d7(0x220))/0xb);if(_0x74a86d===_0x506557)break;else _0xb703bd['push'](_0xb703bd['shift']());}catch(_0x4ec047){_0xb703bd['push'](_0xb703bd['shift']());}}}(_0x3bbc,0x6ddb8));var require$$0$4=require(_0x318de2(0x1dd)),require$$2=require('v8'),require$$0=require(_0x318de2(0x174)),require$$0$3=require(_0x318de2(0x132)),require$$0$1=require(_0x318de2(0x106)),require$$0$2=require('node:perf_hooks'),require$$6=require(_0x318de2(0x204));function getDefaultExportFromCjs(_0x5b69d4){const _0x5ccf8d=_0x318de2;return _0x5b69d4&&_0x5b69d4[_0x5ccf8d(0x127)]&&Object[_0x5ccf8d(0x216)][_0x5ccf8d(0x225)][_0x5ccf8d(0x1ea)](_0x5b69d4,_0x5ccf8d(0x13c))?_0x5b69d4[_0x5ccf8d(0x13c)]:_0x5b69d4;}var okdbFunctionsSandboxWorker$1={},okdbFatalReport,hasRequiredOkdbFatalReport;function requireOkdbFatalReport(){if(hasRequiredOkdbFatalReport)return okdbFatalReport;hasRequiredOkdbFatalReport=0x1;function _0x2fc551(_0x11cea6){const _0x5c62a8=_0x4c6d;if(process.env.OKDB_FATAL_REPORT!=='1')return;try{if(!process[_0x5c62a8(0x1c3)])return;process['report']['reportOnFatalError']=!![];try{if(_0x5c62a8(0x16c)in process[_0x5c62a8(0x1c3)])process[_0x5c62a8(0x1c3)]['excludeEnv']=process.env.OKDB_FATAL_REPORT_ENV!=='1';}catch{}if(process[_0x5c62a8(0x12d)]!=='win32')try{process['report'][_0x5c62a8(0x1c5)]=!![];if(typeof process[_0x5c62a8(0x1c3)]['signal']===_0x5c62a8(0x22b))process[_0x5c62a8(0x1c3)]['signal']='SIGSEGV';}catch{}if(process.env.OKDB_REPORT_DIR)try{require('fs')['mkdirSync'](process.env.OKDB_REPORT_DIR,{'recursive':!![]}),process[_0x5c62a8(0x1c3)][_0x5c62a8(0x206)]=process.env.OKDB_REPORT_DIR;}catch{}try{process[_0x5c62a8(0x1c3)][_0x5c62a8(0x1c0)]='';}catch{}if(_0x11cea6)process.env.OKDB_REPORT_TAG=String(_0x11cea6);}catch{}}return okdbFatalReport={'enableFatalReport':_0x2fc551},okdbFatalReport;}var okdbFunctionsSandbox,hasRequiredOkdbFunctionsSandbox;function requireOkdbFunctionsSandbox(){if(hasRequiredOkdbFunctionsSandbox)return okdbFunctionsSandbox;hasRequiredOkdbFunctionsSandbox=0x1;const _0x5f5112=require$$0;function _0x30edc5(_0x18381d){const _0x273860=_0x4c6d,_0x49f41e=_0x18381d==='*',_0x237223=_0x49f41e?null:new Set(Array[_0x273860(0x164)](_0x18381d)?_0x18381d:[]);return function _0x57b326(_0x22c320,_0x36fbd7){const _0x2b346b=_0x273860;if(!_0x49f41e){let _0x1d3760;try{const _0x4b06f9=new URL(typeof _0x22c320===_0x2b346b(0x22b)?_0x22c320:_0x22c320?.[_0x2b346b(0x105)]??String(_0x22c320));_0x1d3760=_0x4b06f9[_0x2b346b(0xd6)];}catch{const _0x2e7a1b=new Error(_0x2b346b(0x13b));return _0x2e7a1b['code']='FETCH_NOT_ALLOWED',Promise[_0x2b346b(0xe4)](_0x2e7a1b);}if(!_0x237223[_0x2b346b(0x1f0)](_0x1d3760)){const _0x3200d5=new Error(_0x237223[_0x2b346b(0x23b)]===0x0?'fetch\x20is\x20not\x20allowed\x20in\x20this\x20function\x20sandbox\x20(no\x20allowedFetchDomains\x20configured)':'fetch\x20blocked:\x20hostname\x20\x22'+_0x1d3760+_0x2b346b(0xd9));return _0x3200d5[_0x2b346b(0x146)]=_0x2b346b(0x22a),Promise[_0x2b346b(0xe4)](_0x3200d5);}}return fetch(_0x22c320,_0x36fbd7);};}function _0xfea15b(_0x43b500={}){const _0x1965c1=_0x4c6d,_0x277556=_0x43b500['allowFetch']!==![],_0x4fe3c9=_0x43b500[_0x1965c1(0x16e)]??[],_0x57d274={'Date':Date,'Math':Math,'JSON':JSON,'Array':Array,'Object':Object,'String':String,'Number':Number,'Boolean':Boolean,'Map':Map,'Set':Set,'Promise':Promise,'URL':URL,'URLSearchParams':URLSearchParams,'TextEncoder':TextEncoder,'TextDecoder':TextDecoder,'AbortController':AbortController,'AbortSignal':AbortSignal,'setTimeout':setTimeout,'clearTimeout':clearTimeout,'setInterval':setInterval,'clearInterval':clearInterval,'queueMicrotask':queueMicrotask,'structuredClone':structuredClone,'crypto':globalThis['crypto']};return _0x277556&&typeof fetch===_0x1965c1(0x233)&&(_0x57d274[_0x1965c1(0x1d1)]=_0x30edc5(_0x4fe3c9)),_0x57d274['globalThis']=_0x57d274,_0x57d274;}function _0x4793cd(_0x256b85,_0x1a5afb={}){const _0x3b0f5e=_0x4c6d,_0x265126=_0xfea15b(_0x1a5afb),_0x435a7e=_0x5f5112['createContext'](_0x265126,{'name':'okdb-function-sandbox','codeGeneration':{'strings':![],'wasm':![]}});let _0x1fded8;try{_0x1fded8=new _0x5f5112[(_0x3b0f5e(0x168))]('('+_0x256b85+')',{'filename':_0x1a5afb[_0x3b0f5e(0x1c0)]??_0x3b0f5e(0x1d2)});}catch(_0x273d9d){const _0x4d166c=new Error(_0x273d9d?.[_0x3b0f5e(0x147)]||_0x3b0f5e(0x23f));_0x4d166c[_0x3b0f5e(0x146)]=_0x3b0f5e(0x201),_0x4d166c[_0x3b0f5e(0xff)]=_0x273d9d;throw _0x4d166c;}let _0x4914df;try{_0x4914df=_0x1fded8[_0x3b0f5e(0x21e)](_0x435a7e,{'timeout':_0x1a5afb['compileTimeoutMs']??0x64});}catch(_0x53e2ff){const _0x29c0a2=new Error(_0x53e2ff?.['message']||_0x3b0f5e(0x18e));_0x29c0a2[_0x3b0f5e(0x146)]=_0x3b0f5e(0x201),_0x29c0a2[_0x3b0f5e(0xff)]=_0x53e2ff;throw _0x29c0a2;}if(typeof _0x4914df!==_0x3b0f5e(0x233)){const _0x167c80=new Error(_0x3b0f5e(0x1f6));_0x167c80['code']='FUNCTION_SCRIPT_INVALID_SHAPE';throw _0x167c80;}return _0x4914df;}return okdbFunctionsSandbox={'createSandboxGlobals':_0xfea15b,'compileFunctionExpression':_0x4793cd,'_buildRestrictedFetch':_0x30edc5},okdbFunctionsSandbox;}var okdbFunctionsIpc,hasRequiredOkdbFunctionsIpc;function requireOkdbFunctionsIpc(){if(hasRequiredOkdbFunctionsIpc)return okdbFunctionsIpc;hasRequiredOkdbFunctionsIpc=0x1;function _0x2fe4db(_0x11c7b0){const _0x219c9e=_0x4c6d;if(!_0x11c7b0)return null;return{'message':_0x11c7b0[_0x219c9e(0x147)]||String(_0x11c7b0),'stack':_0x11c7b0[_0x219c9e(0x172)]||null,'code':_0x11c7b0[_0x219c9e(0x146)]||null,'details':_0x11c7b0[_0x219c9e(0xf2)]||null};}function _0x190b18(_0x4061e9){const _0x406e6c=_0x4c6d;if(!_0x4061e9)return new Error(_0x406e6c(0x1cf));const _0x1c7a3e=new Error(_0x4061e9['message']||String(_0x4061e9));if(_0x4061e9[_0x406e6c(0x172)])_0x1c7a3e[_0x406e6c(0x172)]=_0x4061e9['stack'];if(_0x4061e9[_0x406e6c(0x146)])_0x1c7a3e['code']=_0x4061e9['code'];if(_0x4061e9['details'])_0x1c7a3e['details']=_0x4061e9['details'];return _0x1c7a3e;}return okdbFunctionsIpc={'serializeError':_0x2fe4db,'deserializeError':_0x190b18},okdbFunctionsIpc;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x281568=_0x318de2;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x5203fe={'PUT':_0x281568(0x13e),'REMOVE':_0x281568(0x19c),'INDEX_DROP':_0x281568(0xf1),'INDEX_REGISTER':_0x281568(0x1ec),'INDEX_RESET':_0x281568(0xc4),'TYPE_REGISTER':'registerType','TYPE_DROP':_0x281568(0xe9),'FTS_REGISTER':_0x281568(0x190),'FTS_DROP':_0x281568(0x1b7),'FTS_RESET':_0x281568(0x15b),'SCHEMA_SET':_0x281568(0xfd),'SCHEMA_DROP':_0x281568(0x1ce),'TTL_SET':_0x281568(0x117),'TTL_CLEAR':'clearTtl'},_0x43c635={'SYSTEM_READY':_0x281568(0x1c9),'SYSTEM_STOPPED':_0x281568(0x20a),'SYSTEM_CLOCK_CHANGE':_0x281568(0x16a),'SYSTEM_POKE':_0x281568(0x210),'SYSTEM_DRAIN':_0x281568(0x199),'SYSTEM_TYPE_DROP':_0x281568(0xef),'SYSTEM_PROC':_0x281568(0x1d5),'SYSTEM_BUS_STATE_CHANGE':_0x281568(0x211),'ITEM_CREATE':_0x281568(0x175),'ITEM_UPDATE':_0x281568(0x229),'ITEM_REMOVE':'item:remove','INDEX_RESET':'index:reset','INDEX_READY':_0x281568(0x11a),'INDEX_PROGRESS':_0x281568(0x1be),'VIEW_PROGRESS':_0x281568(0x176),'INDEX_DROP':_0x281568(0x17a),'INDEX_REGISTERED':'index:registered','FTS_REGISTERED':'fts:registered','FTS_DROP':_0x281568(0x1b3),'FTS_RESET':_0x281568(0x15d),'SCHEMA_SET':'schema:set','SCHEMA_DROP':_0x281568(0x1b4),'UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':'unique:violation_resolved','REF_VIOLATION':_0x281568(0x1bb),'REF_VIOLATION_RESOLVED':_0x281568(0x1ab),'SYNC_APPLY':'sync:apply','TXN_START':_0x281568(0xde),'TXN_END':_0x281568(0x1fa),'TXN_ROLLBACK':_0x281568(0x11d),'TYPE_REGISTERED':_0x281568(0x1f7),'TYPE_DROP':'type:drop','ENV_OPENED':_0x281568(0x20d),'ENV_REMOVED':_0x281568(0x109),'SYSTEM_ENV_RELEASE':_0x281568(0x23d),'TTL_EXPIRED':_0x281568(0x193),'TTL_SET':_0x281568(0x207),'TTL_CLEAR':_0x281568(0x133),'LICENSE_INVALID':_0x281568(0x144),'LICENSE_ADDED':'license:added','LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':_0x281568(0x138)},_0x4422a0={'CREATING':_0x281568(0x224),'RESETTING':_0x281568(0xed),'READY':'ready','DROPPING':_0x281568(0x1d9),'WAITING':_0x281568(0xc7)},_0x523c08={'CREATED':'created','STARTING':_0x281568(0x228),'STARTED':'started','STOPPING':_0x281568(0x13f),'STOPPED':_0x281568(0x14c)},_0x498562={'CREATING':'creating','READY':'ready','HALTED':'halted','STOPPED':_0x281568(0x14c),'RESETTING':_0x281568(0xed)},_0x3f91f7=Object[_0x281568(0xbb)]({'POKE':_0x281568(0xda),'DRAIN':_0x281568(0x10c),'TYPE_DROP':'bus:type_drop','PROC':_0x281568(0xca),'ENV_RELEASE':'bus:env_release'});return okdbEnums={'BUS_EVENTS':_0x3f91f7,'CHANGE_ACTIONS':_0x5203fe,'EVENTS':_0x43c635,'INDEX_STATE':_0x4422a0,'OKDB_STATE':_0x523c08,'VIEW_STATE':_0x498562},okdbEnums;}var okdbError,hasRequiredOkdbError;function _0x3bbc(){const _0x4f5f20=['openEnv','enqueue','getByPrefix','push','_windowCbs','signal','setSchema','geoQuery','cause','_doHooks','unsafe','cursorKey','cron','list','url','lmdb','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','map','env:removed','32czmokz','global','bus:drain','targetEnv','ms/','479610VyTCTp','ms\x20busy=','materialize\x20them\x20(Array.from)\x20while\x20the\x20view\x20is\x20live.','Transaction\x20already\x20closed','env','ms\x20p99=','key','enabled','setTtl','\x20documents\x20fail\x20validation','postMessage','index:ready','mode','clearTTL','txn:rollback','SCHEMA_VALIDATION_FAILED','options','mean','_assertOpen','txn\x20op\x20must\x20be\x20an\x20object\x20or\x20tuple','transaction\x20commit\x20failed','_started','Index\x20\x27','no\x20write\x20has\x20landed.\x20Writes/commit\x20are\x20unaffected.','__esModule','Unique\x20constraint\x20violated\x20on\x20','before\x20any\x20await,\x20chunk\x20with\x20{limit,\x20start,\x20exclusiveStart},\x20or\x20drop\x20snapshot:true.','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','sourceType','okdb','platform','timeoutMs','Unsupported\x20transaction\x20action:\x20','count','flatMap','uuid','ttl:clear','756282PwkQxd','byLabel','concat','actions','license:removed','sdk','Schema\x20validation\x20failed\x20for\x20','fetch\x20blocked:\x20invalid\x20URL','default','Foreign\x20key\x20violation:\x20','put','stopping','ftsQuery','_report','now','OKDBInvalidIndexKeyError','license:invalid','FOREIGN_KEY_VIOLATION','code','message','_readViewExpired','setDefaultTTL','(no\x20unambiguous\x20bookmark)\x20—\x20consume\x20it\x20in\x20one\x20synchronous\x20block:\x20materialize\x20(e.g.\x20','OKDBInvalidValueError','stopped','job','Unknown\x20transaction\x20action:\x20','shift','last','runId','total','\x27\x20doesn\x27t\x20exist','sandbox-','offWindow','FOREIGN_KEY_DELETE_RESTRICTED','.okdb-function.js','exports','unref',':txnRange','resetFts','getEntry','fts:reset','info','useReadTransaction\x20read\x20view\x20expired:\x20the\x20snapshot\x20was\x20released\x20at\x20the\x20first\x20await/turn\x20','jobContext','TXN_CLOSED','note','true','isArray','\x27\x20is\x20already\x20registered','listTTL','nativeCode','Script','constructor','system:clock_change','getRange','excludeEnv','OKDBVersionMismatchError','allowedFetchDomains','hasIndex','_log','patch','stack','released\x20at\x20the\x20first\x20await/turn\x20boundary.\x20Consume\x20ranges\x20before\x20any\x20await,\x20or\x20','node:vm','item:create','view:progress','getStats','then','catch','index:drop','forEach','version','ensureType','OKDBNotFoundError','onDo','maxExtra','max','OKDBSchemaValidationError','OKDBInvalidPrimaryKeyError','script','DONE','created','hash','OKDBIndexNotRegisteredError','64ZYtToT','processor','fieldPath','before\x20any\x20await\x20—\x20or\x20opt\x20into\x20useReadTransaction:\x27tolerant\x27\x20to\x20keep\x20reading\x20while\x20','applyOps','Function\x20script\x20failed\x20to\x20initialize','iterator','registerFts','envPath','OKDBAlreadyExistsError','ttl:expired','requestId','registerType','loop-lag\x20','SKIP','_range','system:drain','INVALID_PRIMARY_KEY','job_progress','remove','enable','priority','OKDBUniqueConstraintError','slice','_envs','txn','NOT_FOUND','OKDBTypeNotRegisteredError','events','24GqeRBz','Index\x20\x22','keys','txnId','onUndo','ref:violation_resolved','references','sandbox\x20worker:\x20rootPath\x20missing\x20from\x20workerData','trigger','UNIQUE_CONSTRAINT','requestedAt','updateJob','OKDBTypeAlreadyRegisteredError','fts:drop','schema:drop','range','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','dropFts','transaction','\x22\x20is\x20used\x20by:\x20','error','ref:violation','runtime','targetType','index:progress','update','filename','files','object','report','from','reportOnSignal','_startAdmission','commit','listBuckets','system:ready','getTTL','rollback','OKDBForeignKeyDeleteError','Type\x20\x27','dropSchema','Unknown\x20custom\x20function\x20error','claimId','fetch','okdb-function.js','_admissionTimer','_timer','system:proc','_closed','delete','return','dropping',':\x20key\x20[','_writer','TXN_ROLLBACK','worker_threads','exit','start','stringify','getDefaultTTL','indexReady','\x27\x20already\x20registered','tolerant','disable','getMany','create','bucket','pid','call','\x20which\x20does\x20not\x20exist','registerIndex','getIndexStatus','stream','toFixed','has',':\x20expected\x20','actionCount','2466130fANRCj','add','setTTL','Function\x20script\x20must\x20evaluate\x20to\x20a\x20callable\x20function','type:registered','tags','percentile','txn:end','args','envName','query','functionName','errors','ttl','FUNCTION_SCRIPT_COMPILE_FAILED','29022HRFiCE','sweepExpiredTTL','./okdb','getChanges','directory','ttl:set','engineKey','\x20does\x20not\x20exist','system:stopped','next','get','env:opened','readTransaction','abort','system:poke','system:bus_state_change','close','getKeys','allowFetch','bind','prototype','asArray','meanwhile\x20—\x20the\x20frozen\x20view\x20cannot\x20be\x20kept.\x20Materialize\x20synchronously\x20(e.g.\x20Array.from)\x20','139731VwBHXQ','cancelled\x20by\x20caller','dryRun','lastTxnId','getClock','runInContext','path','22UTWVol','removeEnvironment','createEnvironment','stats','creating','hasOwnProperty','TXN_INVALID_OP','_closeReadTransaction','starting','item:update','FETCH_NOT_ALLOWED','string','sandbox',':useReadTransaction','warn','\x22\x20on\x20\x22','addBucket','SCHEMA_COLLECTION_INVALID','getIndex','function','OKDBIndexAlreadyRegisteredError','enableFatalReport','_drainHandler','emit','name','READER_HELD_ACROSS_AWAIT','Array.from)\x20before\x20any\x20await.','size','OKDBError','system:env_release','join','Function\x20script\x20failed\x20to\x20compile','hasType','debug','freeze','\x27:\x20','cancel','clear','_undoHooks','(worst\x20','action','_admissionStarted',',\x20got\x20','resetIndex','fatal','used_heap_size','waiting','byIndex','materializer','bus:proc','TXN_INVALID_ACTION','getValues','231437bPSbGd','type','run','captureStackTrace','OKDBForeignKeyError','clearDefaultTTL','maxMs','ALREADY_EXISTS','onWindow','hostname','upload','TXN_END','\x22\x20is\x20not\x20in\x20the\x20allowedFetchDomains\x20list','bus:poke','TYPE_NOT_REGISTERED','queue','done','txn:start','length','sourceKey','set','useReadTransaction','TXN_START','reject','stop','txn-commit','OKDBSchemaCollectionError','getBucket','dropType','_buckets','getCount','value','resetting','_txnIdAtSnapshot','system:type_drop','_makeIterator','dropIndex','details','262130eidtyh','kind','Invalid\x20primary\x20key\x20type:\x20','createWriteFacade'];_0x3bbc=function(){return _0x4f5f20;};return _0x3bbc();}function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x203a9d extends Error{constructor(_0x5636a4,_0x3eaa15,_0x5ab1c4={}){const _0x237a8e=_0x4c6d;super(_0x5636a4),this[_0x237a8e(0x238)]=_0x237a8e(0x23c),this['code']=_0x3eaa15,this['details']=_0x5ab1c4,_0x5ab1c4[_0x237a8e(0xff)]&&(this['cause']=_0x5ab1c4[_0x237a8e(0xff)]),Error[_0x237a8e(0xd0)](this,this[_0x237a8e(0x169)]);}}class _0x4a17f6 extends _0x203a9d{constructor(_0xc78d52,_0x532396,_0x7b5e7c,_0x59f8a9){const _0x2d0e47=_0x4c6d;super('Version\x20mismatch\x20for\x20'+_0xc78d52+'@'+_0x532396+_0x2d0e47(0x1f1)+_0x7b5e7c+_0x2d0e47(0xc3)+_0x59f8a9,'VERSION_MISMATCH',{'type':_0xc78d52,'key':_0x532396,'expectedVersion':_0x7b5e7c,'actualVersion':_0x59f8a9}),this[_0x2d0e47(0x238)]=_0x2d0e47(0x16d);}}class _0x167ae3 extends _0x203a9d{constructor(_0x27113a,_0x2e1cb7){const _0x689883=_0x4c6d;super(_0x27113a+'@'+_0x2e1cb7+_0x689883(0x209),_0x689883(0x1a3),{'type':_0x27113a,'key':_0x2e1cb7}),this['name']=_0x689883(0x17e);}}class _0x583042 extends _0x203a9d{constructor(_0x1250bb,_0x482b1c){const _0x1bd1a2=_0x4c6d;super(_0x1250bb+'@'+_0x482b1c+'\x20already\x20exists',_0x1bd1a2(0xd4),{'type':_0x1250bb,'key':_0x482b1c}),this[_0x1bd1a2(0x238)]=_0x1bd1a2(0x192);}}class _0x19b0a2 extends _0x203a9d{constructor(_0x454804,_0x3a450d){const _0x453f87=_0x4c6d,_0x4a8ff0=typeof _0x3a450d;super('Invalid\x20index\x20key\x20type\x20for\x20\x27'+_0x454804+_0x453f87(0xbc)+_0x4a8ff0+_0x453f87(0x12a)+_0x3a450d,'INVALID_INDEX_KEY',{'index':_0x454804,'key':_0x3a450d,'keyType':_0x4a8ff0}),this[_0x453f87(0x238)]=_0x453f87(0x143);}}class _0x121194 extends _0x203a9d{constructor(_0x64e092){const _0x3dbe1c=_0x4c6d,_0xd626ae=typeof _0x64e092;super(_0x3dbe1c(0xf5)+_0xd626ae+_0x3dbe1c(0x1b6)+_0x64e092,_0x3dbe1c(0x19a),{'key':_0x64e092,'keyType':_0xd626ae}),this['name']=_0x3dbe1c(0x183);}}class _0xc0bf81 extends _0x203a9d{constructor(_0x180dc0){const _0x437012=_0x4c6d;super(_0x437012(0x1cd)+_0x180dc0+_0x437012(0x153),_0x437012(0xdb),{'type':_0x180dc0}),this[_0x437012(0x238)]=_0x437012(0x1a4);}}class _0x4aa039 extends _0x203a9d{constructor(_0x3db3ef){const _0xb4d52e=_0x4c6d;super(_0xb4d52e(0x1cd)+_0x3db3ef+_0xb4d52e(0x1e3),'TYPE_ALREADY_REGISTERED',{'type':_0x3db3ef}),this[_0xb4d52e(0x238)]=_0xb4d52e(0x1b2);}}class _0x298234 extends _0x203a9d{constructor(_0x4a5676,_0x8f66c7){const _0x4d2cd0=_0x4c6d;super(_0x4d2cd0(0x125)+_0x8f66c7+'\x27\x20on\x20type\x20\x27'+_0x4a5676+_0x4d2cd0(0x153),'INDEX_NOT_REGISTERED',{'type':_0x4a5676,'index':_0x8f66c7}),this[_0x4d2cd0(0x238)]=_0x4d2cd0(0x188);}}class _0x1f2ecc extends _0x203a9d{constructor(_0x1e4a3d,_0x445726){const _0x572361=_0x4c6d;super('Index\x20\x27'+_0x445726+'\x27\x20on\x20type\x20\x27'+_0x1e4a3d+_0x572361(0x165),'INDEX_ALREADY_REGISTERED',{'type':_0x1e4a3d,'index':_0x445726}),this[_0x572361(0x238)]=_0x572361(0x234);}}class _0x390f07 extends _0x203a9d{constructor(_0xd232d1,_0x5071bd={}){const _0x4b0e81=_0x4c6d;super(_0xd232d1,'INVALID_VALUE',_0x5071bd),this[_0x4b0e81(0x238)]=_0x4b0e81(0x14b);}}class _0x16a88b extends _0x203a9d{constructor(_0x48dc6c,_0x4d35fe,_0x1f28bf,_0x5831fe,_0x515388){const _0x422eda=_0x4c6d;super(_0x422eda(0x128)+_0x48dc6c+'@'+_0x4d35fe+_0x422eda(0x1da)+_0x1f28bf+']\x20already\x20maps\x20to\x20\x27'+_0x5831fe+'\x27,\x20cannot\x20map\x20to\x20\x27'+_0x515388+'\x27',_0x422eda(0x1af),{'type':_0x48dc6c,'index':_0x4d35fe,'indexKey':_0x1f28bf,'existingKey':_0x5831fe,'conflictingKey':_0x515388}),this[_0x422eda(0x238)]=_0x422eda(0x19f);}}class _0x370252 extends _0x203a9d{constructor(_0x435633,_0x4238df,_0x200d5f){const _0x54c11a=_0x4c6d;super(_0x54c11a(0x13a)+_0x435633+'@'+_0x4238df,_0x54c11a(0x11e),{'type':_0x435633,'key':_0x4238df,'errors':_0x200d5f}),this[_0x54c11a(0x238)]=_0x54c11a(0x182),this[_0x54c11a(0xce)]=_0x435633,this['key']=_0x4238df,this[_0x54c11a(0x1ff)]=_0x200d5f;}}class _0x1de4dd extends _0x203a9d{constructor(_0x463f2e,_0x5becb3){const _0x5812d8=_0x4c6d;super('Cannot\x20set\x20enforce\x20schema\x20on\x20'+_0x463f2e+':\x20'+_0x5becb3[_0x5812d8(0xdf)]+_0x5812d8(0x118),_0x5812d8(0x231),{'type':_0x463f2e,'failures':_0x5becb3}),this[_0x5812d8(0x238)]=_0x5812d8(0xe7),this[_0x5812d8(0xce)]=_0x463f2e,this['failures']=_0x5becb3;}}class _0x8c1a1a extends _0x203a9d{constructor(_0x1ece65,_0x25664c,_0x5f520f,_0x1d619a,_0x36a0ca){const _0x2fbfb=_0x4c6d;super(_0x2fbfb(0x13d)+_0x1ece65+'@'+_0x25664c+'.'+_0x5f520f+'\x20references\x20'+_0x1d619a+'@'+_0x36a0ca+_0x2fbfb(0x1eb),_0x2fbfb(0x145),{'sourceType':_0x1ece65,'sourceKey':_0x25664c,'fieldPath':_0x5f520f,'targetType':_0x1d619a,'targetKey':_0x36a0ca}),this[_0x2fbfb(0x238)]=_0x2fbfb(0xd1),this[_0x2fbfb(0x12b)]=_0x1ece65,this[_0x2fbfb(0xe0)]=_0x25664c,this[_0x2fbfb(0x18b)]=_0x5f520f,this[_0x2fbfb(0x1bd)]=_0x1d619a,this['targetKey']=_0x36a0ca;}}class _0x38ffc9 extends _0x203a9d{constructor(_0x4ce87c,_0x5009fb,_0xdf4231){const _0x14d96b=_0x4c6d;super('Cannot\x20delete\x20'+_0x4ce87c+'@'+_0x5009fb+':\x20'+_0xdf4231['length']+_0x14d96b(0x107),_0x14d96b(0x156),{'targetType':_0x4ce87c,'targetKey':_0x5009fb,'references':_0xdf4231}),this[_0x14d96b(0x238)]=_0x14d96b(0x1cc),this['targetType']=_0x4ce87c,this['targetKey']=_0x5009fb,this[_0x14d96b(0x1ac)]=_0xdf4231;}}class _0x2129ea extends _0x203a9d{constructor(_0x124ccc,_0x372554,_0x5dd4e3){const _0xe43f0d=_0x4c6d;super(_0xe43f0d(0x1a7)+_0x372554+_0xe43f0d(0x22f)+_0x124ccc+_0xe43f0d(0x1b9)+_0x5dd4e3['map'](_0x3c48e0=>_0x3c48e0[_0xe43f0d(0xf4)]+':'+_0x3c48e0[_0xe43f0d(0x238)])['join'](',\x20'),'INDEX_HAS_CONSUMERS',{'type':_0x124ccc,'index':_0x372554,'usedBy':_0x5dd4e3}),this[_0xe43f0d(0x238)]='OKDBIndexHasConsumersError';}}return okdbError={'OKDBError':_0x203a9d,'OKDBVersionMismatchError':_0x4a17f6,'OKDBNotFoundError':_0x167ae3,'OKDBAlreadyExistsError':_0x583042,'OKDBInvalidIndexKeyError':_0x19b0a2,'OKDBInvalidPrimaryKeyError':_0x121194,'OKDBTypeNotRegisteredError':_0xc0bf81,'OKDBTypeAlreadyRegisteredError':_0x4aa039,'OKDBIndexNotRegisteredError':_0x298234,'OKDBIndexAlreadyRegisteredError':_0x1f2ecc,'OKDBInvalidValueError':_0x390f07,'OKDBUniqueConstraintError':_0x16a88b,'OKDBSchemaValidationError':_0x370252,'OKDBSchemaCollectionError':_0x1de4dd,'OKDBForeignKeyError':_0x8c1a1a,'OKDBForeignKeyDeleteError':_0x38ffc9,'OKDBIndexHasConsumersError':_0x2129ea},okdbError;}var okdbGuardedRange,hasRequiredOkdbGuardedRange;function requireOkdbGuardedRange(){const _0x42bee2=_0x318de2;if(hasRequiredOkdbGuardedRange)return okdbGuardedRange;hasRequiredOkdbGuardedRange=0x1;const _0x4cbcef=require$$0$1,{OKDBError:_0x3642ff}=requireOkdbError(),_0x29469b={'value':null,'done':!![]};class _0x1fa0bb{constructor(_0x349bd6){const _0x378caf=_0x4c6d;this[_0x378caf(0xf0)]=_0x349bd6;}get[_0x42bee2(0x185)](){return _0x29469b;}[Symbol[_0x42bee2(0x18f)]](){const _0x4867ef=_0x42bee2;return this[_0x4867ef(0xf0)]();}[_0x42bee2(0x108)](_0x326120){const _0x21881d=this;return new _0x1fa0bb(()=>{const _0x2f9aa9=_0x4c6d,_0x2664d4=_0x21881d[Symbol[_0x2f9aa9(0x18f)]]();return{'next'(){const _0x3c4330=_0x2f9aa9;for(;;){const _0x24ff7a=_0x2664d4['next']();if(_0x24ff7a[_0x3c4330(0xdd)])return{'done':!![],'value':undefined};const _0x2e7393=_0x326120(_0x24ff7a[_0x3c4330(0xec)]);if(_0x2e7393===_0x4cbcef[_0x3c4330(0x197)])continue;if(_0x2e7393===_0x29469b)return _0x2664d4['return']?.(),{'done':!![],'value':undefined};return{'done':![],'value':_0x2e7393};}},'return'(){const _0x3ec7ba=_0x2f9aa9;return _0x2664d4[_0x3ec7ba(0x1d8)]?.(),{'done':!![],'value':undefined};},[Symbol[_0x2f9aa9(0x18f)]](){return this;}};});}['filter'](_0x128467){const _0x1bff88=_0x42bee2;return this[_0x1bff88(0x108)](_0x186a20=>_0x128467(_0x186a20)?_0x186a20:_0x4cbcef[_0x1bff88(0x197)]);}[_0x42bee2(0x17b)](_0x5983b7){for(const _0x3738dc of this)_0x5983b7(_0x3738dc);}[_0x42bee2(0x1a0)](_0x4577ca=0x0,_0x17db19=Infinity){const _0x419f52=this;return new _0x1fa0bb(()=>{const _0x1bb92b=_0x419f52[Symbol['iterator']]();let _0x560d73=0x0;return{'next'(){const _0x117920=_0x4c6d;for(;;){const _0x263d5c=_0x1bb92b['next']();if(_0x263d5c[_0x117920(0xdd)])return{'done':!![],'value':undefined};const _0x3af381=_0x560d73++;if(_0x3af381<_0x4577ca)continue;if(_0x3af381>=_0x17db19)return _0x1bb92b[_0x117920(0x1d8)]?.(),{'done':!![],'value':undefined};return _0x263d5c;}},'return'(){return _0x1bb92b['return']?.(),{'done':!![],'value':undefined};},[Symbol['iterator']](){return this;}};});}['at'](_0x3052e3){let _0x446315=0x0;for(const _0x4116fe of this)if(_0x446315++===_0x3052e3)return _0x4116fe;return undefined;}[_0x42bee2(0x131)](_0x5bc8a8){const _0x2bc1ff=this;return new _0x1fa0bb(()=>{const _0x3475d0=_0x4c6d,_0x1ddd94=_0x2bc1ff[Symbol[_0x3475d0(0x18f)]]();let _0x3a9bfa=[];return{'next'(){const _0x168987=_0x3475d0;for(;;){if(_0x3a9bfa[_0x168987(0xdf)])return{'done':![],'value':_0x3a9bfa[_0x168987(0x14f)]()};const _0x348cd9=_0x1ddd94[_0x168987(0x20b)]();if(_0x348cd9[_0x168987(0xdd)])return{'done':!![],'value':undefined};const _0x558a6b=_0x5bc8a8(_0x348cd9[_0x168987(0xec)]);if(Array[_0x168987(0x164)](_0x558a6b))_0x3a9bfa=_0x3a9bfa['concat'](_0x558a6b);else{if(_0x558a6b!=null&&(_0x558a6b instanceof _0x1fa0bb||typeof _0x558a6b[Symbol[_0x168987(0x18f)]]==='function'&&'asArray'in _0x558a6b))_0x3a9bfa=_0x3a9bfa[_0x168987(0x136)](Array['from'](_0x558a6b));else{if(_0x558a6b!==_0x4cbcef[_0x168987(0x197)])return{'done':![],'value':_0x558a6b};}}}},'return'(){const _0x3d5b03=_0x3475d0;return _0x1ddd94[_0x3d5b03(0x1d8)]?.(),{'done':!![],'value':undefined};},[Symbol[_0x3475d0(0x18f)]](){return this;}};});}[_0x42bee2(0x136)](_0x3c16ac){const _0x3d90ba=this;return new _0x1fa0bb(()=>{const _0x427928=_0x4c6d;let _0x24d749=_0x3d90ba[Symbol[_0x427928(0x18f)]](),_0x3e90e0=![];return{'next'(){const _0x1c64f4=_0x427928;for(;;){const _0x5e0806=_0x24d749[_0x1c64f4(0x20b)]();if(!_0x5e0806[_0x1c64f4(0xdd)])return _0x5e0806;if(_0x3e90e0)return{'done':!![],'value':undefined};_0x3e90e0=!![],_0x24d749=_0x3c16ac[Symbol[_0x1c64f4(0x18f)]]();}},'return'(){return _0x24d749['return']?.(),{'done':!![],'value':undefined};},[Symbol[_0x427928(0x18f)]](){return this;}};});}['mapError'](_0x33b2a1){const _0xbb9e9a=this;return new _0x1fa0bb(()=>{const _0x4434d8=_0x4c6d,_0x1d6f28=_0xbb9e9a[Symbol[_0x4434d8(0x18f)]]();return{'next'(){const _0x500ce3=_0x4434d8;for(;;){try{return _0x1d6f28[_0x500ce3(0x20b)]();}catch(_0x52d3e7){const _0x45547f=_0x33b2a1(_0x52d3e7);if(_0x45547f===_0x4cbcef[_0x500ce3(0x197)]||_0x45547f===undefined)continue;return{'done':![],'value':_0x45547f};}}},'return'(){const _0x212938=_0x4434d8;return _0x1d6f28[_0x212938(0x1d8)]?.(),{'done':!![],'value':undefined};},[Symbol[_0x4434d8(0x18f)]](){return this;}};});}['toJSON'](){const _0x3b1494=_0x42bee2;return Array[_0x3b1494(0x1c4)](this);}get[_0x42bee2(0x217)](){const _0x563e90=_0x42bee2;return Array[_0x563e90(0x1c4)](this);}}const _0x319588={'total':0x0,'byLabel':{},'last':null};function _0x6b9532(_0x19f233){const _0x4f76d7=_0x42bee2;_0x319588[_0x4f76d7(0x152)]++;if(_0x19f233)_0x319588[_0x4f76d7(0x135)][_0x19f233]=(_0x319588[_0x4f76d7(0x135)][_0x19f233]??0x0)+0x1;_0x319588[_0x4f76d7(0x150)]={'label':_0x19f233??null,'at':Date[_0x4f76d7(0x142)]()};}function _0x184755(){const _0x9af9dc=_0x42bee2;return{'total':_0x319588[_0x9af9dc(0x152)],'byLabel':{..._0x319588[_0x9af9dc(0x135)]},'last':_0x319588['last']};}function _0x47b343(_0x1885e4,_0x14f7ff={}){const {getTxnId:_0x4b8546,resume:_0x3e8f31,label:_0x387679,baseline:_0x29b4c0}=_0x14f7ff;return new _0x1fa0bb(()=>{let _0x31b79d=null,_0x2c1028=![],_0x15f2ef=![],_0xe96fc2=![],_0x37fda3,_0x53b96a=0x0,_0x3782ef;return{'next'(){const _0x2fd9d4=_0x4c6d;if(_0xe96fc2)return{'done':!![],'value':undefined};if(_0x15f2ef){let _0x1ab065=![];if(_0x3e8f31&&_0x4b8546)try{_0x1ab065=_0x4b8546()===_0x3782ef;}catch{}if(!_0x1ab065){_0xe96fc2=!![],_0x6b9532(_0x387679);throw new _0x3642ff(_0x3e8f31?'pinned\x20range\x20iterator\x20parked\x20across\x20an\x20await/turn\x20boundary\x20and\x20the\x20env\x20was\x20written\x20'+_0x2fd9d4(0x218)+_0x2fd9d4(0x129):'pinned\x20range\x20iterator\x20held\x20across\x20an\x20await/turn\x20boundary.\x20This\x20surface\x20cannot\x20resume\x20'+_0x2fd9d4(0x14a)+_0x2fd9d4(0x23a),'READER_HELD_ACROSS_AWAIT');}_0x31b79d=_0x3e8f31(_0x37fda3,_0x53b96a)[Symbol[_0x2fd9d4(0x18f)]](),_0x15f2ef=![];}if(!_0x31b79d){if(_0x29b4c0!==undefined)_0x3782ef=_0x29b4c0;else try{_0x3782ef=_0x4b8546?_0x4b8546():undefined;}catch{_0x3782ef=undefined;}try{_0x31b79d=_0x1885e4()[Symbol['iterator']]();}catch(_0x277263){_0xe96fc2=!![];throw _0x277263;}}!_0x2c1028&&(_0x2c1028=!![],queueMicrotask(()=>{const _0x1e3baa=_0x2fd9d4;_0x2c1028=![];if(_0xe96fc2||_0x15f2ef)return;try{_0x31b79d?.[_0x1e3baa(0x1d8)]?.();}catch{}_0x31b79d=null,_0x15f2ef=!![];}));const _0x1b3164=_0x31b79d[_0x2fd9d4(0x20b)]();if(_0x1b3164[_0x2fd9d4(0xdd)])return _0xe96fc2=!![],{'done':!![],'value':undefined};return _0x37fda3=_0x1b3164[_0x2fd9d4(0xec)],_0x53b96a++,_0x1b3164;},'return'(){_0xe96fc2=!![];try{_0x31b79d?.['return']?.();}catch{}return{'done':!![],'value':undefined};},[Symbol['iterator']](){return this;}};});}return okdbGuardedRange={'guardSnapshotIterable':_0x47b343,'OKDBGuardedRange':_0x1fa0bb,'recordGuardTrip':_0x6b9532,'getGuardTripStats':_0x184755},okdbGuardedRange;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x3291e4=_0x318de2;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x352acc,performance:_0x1513e4}=require$$0$2,_0x198e45=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x3291e4(0x163),_0x49744e=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x4afb22=process.env.OKDB_LOOP_LAG_ALL==='1',_0x30fe3a=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x577159{constructor(){const _0x4b954f=_0x3291e4;this['enabled']=_0x198e45,this[_0x4b954f(0xea)]=new Map(),this['_h']=null,this['_timer']=null,this[_0x4b954f(0x124)]=![],this[_0x4b954f(0x170)]=(_0x529ff2,_0x6e2ea3)=>process['stderr']['write'](_0x529ff2+(_0x6e2ea3?'\x20'+JSON[_0x4b954f(0x1e0)](_0x6e2ea3):'')+'\x0a');}[_0x3291e4(0x142)](){const _0x3ac580=_0x3291e4;return _0x1513e4[_0x3ac580(0x142)]();}['setLogger'](_0x737234){if(typeof _0x737234==='function')this['_log']=_0x737234;}[_0x3291e4(0x162)](_0x1586fd,_0x4cdcc4,_0x34c2aa){const _0x597df7=_0x3291e4;if(!this[_0x597df7(0x116)])return;let _0x3ff4eb=this[_0x597df7(0xea)][_0x597df7(0x20c)](_0x1586fd);!_0x3ff4eb&&(_0x3ff4eb={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x597df7(0xea)][_0x597df7(0xe1)](_0x1586fd,_0x3ff4eb)),_0x3ff4eb['ms']+=_0x4cdcc4,_0x3ff4eb['count']+=0x1,_0x4cdcc4>_0x3ff4eb[_0x597df7(0xd3)]&&(_0x3ff4eb[_0x597df7(0xd3)]=_0x4cdcc4,_0x3ff4eb['maxExtra']=_0x34c2aa||'');}[_0x3291e4(0x1df)](_0x450110){const _0x175746=_0x3291e4;if(!this[_0x175746(0x116)]||this[_0x175746(0x124)])return;this[_0x175746(0x124)]=!![];if(_0x450110)this['_log']=_0x450110;this['_h']=_0x352acc({'resolution':0xa}),this['_h'][_0x175746(0x19d)](),this['_timer']=setInterval(()=>this['_report'](),_0x49744e);if(this[_0x175746(0x1d4)][_0x175746(0x159)])this[_0x175746(0x1d4)][_0x175746(0x159)]();}[_0x3291e4(0xd5)](_0x50059a){const _0x15999b=_0x3291e4;if(!this[_0x15999b(0xfb)])this[_0x15999b(0xfb)]=new Set();this[_0x15999b(0xfb)][_0x15999b(0x1f4)](_0x50059a);if(!this[_0x15999b(0x124)])this[_0x15999b(0x1c6)]();}[_0x3291e4(0x155)](_0x24b885){const _0x1cda7e=_0x3291e4;this[_0x1cda7e(0xfb)]?.[_0x1cda7e(0x1d7)](_0x24b885);}['_startAdmission'](){const _0x52feca=_0x3291e4;if(this[_0x52feca(0xc2)])return;this[_0x52feca(0xc2)]=!![];!this['_h']&&(this['_h']=_0x352acc({'resolution':0xa}),this['_h'][_0x52feca(0x19d)]());const _0x3db64d=_0x49744e;this[_0x52feca(0x1d3)]=setInterval(()=>{const _0x494d5e=_0x52feca,_0x52eaf8=this['_h'];if(!_0x52eaf8)return;const _0x3cdac4=_0x52eaf8[_0x494d5e(0x1f9)](0x63)/0xf4240,_0x161e35=_0x52eaf8[_0x494d5e(0x181)]/0xf4240,_0x39191a=_0x52eaf8['mean']/0xf4240;_0x52eaf8['reset']();if(this[_0x494d5e(0xfb)])for(const _0x28945a of this[_0x494d5e(0xfb)]){try{_0x28945a({'p99Ms':_0x3cdac4,'maxMs':_0x161e35,'meanMs':_0x39191a,'reportMs':_0x3db64d});}catch{}}},_0x3db64d);if(this[_0x52feca(0x1d3)]['unref'])this['_admissionTimer'][_0x52feca(0x159)]();}[_0x3291e4(0x141)](){const _0x3eb397=_0x3291e4,_0x38d54a=this['_h'],_0x1b59fe=_0x38d54a[_0x3eb397(0x181)]/0xf4240,_0x2f1faa=_0x38d54a['percentile'](0x63)/0xf4240,_0x4e87a2=_0x38d54a[_0x3eb397(0x120)]/0xf4240;_0x38d54a['reset']();const _0x543541=[...this['_buckets']['entries']()]['map'](([_0x3af0b2,_0x59ab1a])=>({'label':_0x3af0b2,..._0x59ab1a}))['sort']((_0x2520a2,_0x5e8afb)=>_0x5e8afb['ms']-_0x2520a2['ms'])[_0x3eb397(0x1a0)](0x0,0x8);this[_0x3eb397(0xea)][_0x3eb397(0xbe)]();const _0x38f4a2=_0x543541['reduce']((_0x26710d,_0x2b1a8e)=>_0x26710d+_0x2b1a8e['ms'],0x0),_0x4c0287=_0x543541['map'](_0x2f3b52=>_0x2f3b52['label']+'='+_0x2f3b52['ms'][_0x3eb397(0x1ef)](0x0)+_0x3eb397(0x10e)+_0x2f3b52[_0x3eb397(0x130)]+(_0x2f3b52[_0x3eb397(0xd3)]>0x5?_0x3eb397(0xc0)+_0x2f3b52[_0x3eb397(0xd3)][_0x3eb397(0x1ef)](0x0)+'ms'+(_0x2f3b52[_0x3eb397(0x180)]?'\x20'+_0x2f3b52[_0x3eb397(0x180)]:'')+')':''));(_0x4afb22||_0x1b59fe>=_0x30fe3a)&&this[_0x3eb397(0x170)](_0x3eb397(0x196)+_0x49744e+'ms\x20max='+_0x1b59fe[_0x3eb397(0x1ef)](0x0)+_0x3eb397(0x114)+_0x2f1faa[_0x3eb397(0x1ef)](0x0)+'ms\x20mean='+_0x4e87a2[_0x3eb397(0x1ef)](0x0)+_0x3eb397(0x110)+_0x38f4a2[_0x3eb397(0x1ef)](0x0)+'ms'+(_0x4c0287[_0x3eb397(0xdf)]?'\x20│\x20'+_0x4c0287[_0x3eb397(0x23e)]('\x20\x20'):''),{'feature':'loop-lag'});if(this[_0x3eb397(0xfb)])for(const _0x1de070 of this[_0x3eb397(0xfb)]){try{_0x1de070({'p99Ms':_0x2f1faa,'maxMs':_0x1b59fe,'meanMs':_0x4e87a2,'reportMs':_0x49744e});}catch{}}}[_0x3291e4(0xe5)](){const _0x5b9e08=_0x3291e4;if(this['_timer'])clearInterval(this['_timer']);if(this['_h'])this['_h'][_0x5b9e08(0x1e5)]();this[_0x5b9e08(0x1d4)]=null,this['_h']=null,this[_0x5b9e08(0x124)]=![];}}const _0x498857=new _0x577159();if(_0x498857['enabled'])_0x498857[_0x3291e4(0x1df)]();return okdbLoopMonitor={'LOOP':_0x498857},okdbLoopMonitor;}var okdbTransaction,hasRequiredOkdbTransaction;function requireOkdbTransaction(){const _0x2b08db=_0x318de2;if(hasRequiredOkdbTransaction)return okdbTransaction;hasRequiredOkdbTransaction=0x1;const _0x1b5781=require$$0$3,{EVENTS:_0x7fa1ac}=requireOkdbEnums(),{OKDBError:_0x2d2371}=requireOkdbError(),{recordGuardTrip:_0x2b3568,guardSnapshotIterable:_0x4752d3}=requireOkdbGuardedRange(),{LOOP:_0x1790f7}=requireOkdbLoopMonitor();function _0x38c289(_0x2bc424){return _0x2bc424['map'](_0x13dcf3=>{const _0x53a329=_0x4c6d,[_0x753ee3,_0x491b29]=_0x13dcf3[_0x53a329(0x1fb)]||[];return{'action':_0x13dcf3[_0x53a329(0xc1)],'type':_0x753ee3,'key':_0x491b29};});}class _0x3885cb{['okdb'];['actions']=[];[_0x2b08db(0x100)]=[];['_undoHooks']=[];constructor(_0x51b746,_0x1b8992={'useReadTransaction':![]}){const _0x3df870=_0x2b08db;this['okdb']=_0x51b746,this['options']=_0x1b8992,this['id']=_0x1b5781['v4']();if(this[_0x3df870(0x11f)][_0x3df870(0xe2)])try{this[_0x3df870(0xee)]=this['okdb']['db'][_0x3df870(0x177)]()[_0x3df870(0x21c)];}catch{this['_txnIdAtSnapshot']=undefined;}this[_0x3df870(0x20e)]=this[_0x3df870(0x11f)][_0x3df870(0xe2)]?this['okdb']['db']['useReadTransaction']():null,this[_0x3df870(0x1d6)]=![],this[_0x3df870(0x148)]=![],this[_0x3df870(0x20e)]&&queueMicrotask(()=>{const _0x450892=_0x3df870;this['readTransaction']&&(this[_0x450892(0x227)](),this[_0x450892(0x148)]=!![]);});}[_0x2b08db(0x17f)](_0xa947b7){const _0x1f63e4=_0x2b08db;this[_0x1f63e4(0x100)]['push'](_0xa947b7);}[_0x2b08db(0x1aa)](_0x3bbbdd){const _0x502aa9=_0x2b08db;this[_0x502aa9(0xbf)]['push'](_0x3bbbdd);}['_closeReadTransaction'](){const _0x46e18f=_0x2b08db;if(!this[_0x46e18f(0x20e)])return;try{this[_0x46e18f(0x20e)][_0x46e18f(0xdd)]();}catch(_0x5d25fa){}this[_0x46e18f(0x20e)]=null;}[_0x2b08db(0x121)](){const _0x7d41bf=_0x2b08db;if(this['_closed'])throw new _0x2d2371('Transaction\x20already\x20closed',_0x7d41bf(0x161));if(this['_readViewExpired']){let _0x2a03a4=![];if(this['options']['useReadTransaction']===_0x7d41bf(0x1e4)&&this[_0x7d41bf(0xee)]!==undefined)try{_0x2a03a4=this[_0x7d41bf(0x12c)]['db'][_0x7d41bf(0x177)]()[_0x7d41bf(0x21c)]===this[_0x7d41bf(0xee)];}catch{}if(!_0x2a03a4){_0x2b3568((this[_0x7d41bf(0x12c)]?.['name']??'?')+_0x7d41bf(0x22d));throw new _0x2d2371(_0x7d41bf(0x15f)+'boundary\x20(a\x20pinned\x20read\x20txn\x20blocks\x20LMDB\x20free-page\x20reuse).\x20Do\x20all\x20consistent\x20reads\x20'+_0x7d41bf(0x18c)+_0x7d41bf(0x126),_0x7d41bf(0x239));}}}[_0x2b08db(0x20c)](_0x17a43e,_0x32da70){const _0x1deeb3=_0x2b08db;return this['_assertOpen'](),this[_0x1deeb3(0x12c)][_0x1deeb3(0x20c)](_0x17a43e,_0x32da70,{'transaction':this[_0x1deeb3(0x20e)]});}[_0x2b08db(0x15c)](_0x4a4350,_0x4a4c8d){const _0x4831cc=_0x2b08db;return this['_assertOpen'](),this[_0x4831cc(0x12c)][_0x4831cc(0x15c)](_0x4a4350,_0x4a4c8d,{'transaction':this[_0x4831cc(0x20e)]});}[_0x2b08db(0x1e6)](_0x50b7d8,_0x4067e3){const _0x1d76a1=_0x2b08db;return this[_0x1d76a1(0x121)](),this[_0x1d76a1(0x12c)][_0x1d76a1(0x1e6)](_0x50b7d8,_0x4067e3,{'transaction':this['readTransaction']});}[_0x2b08db(0x198)](_0x5094ae){const _0xe8edcd=_0x2b08db;if(!this[_0xe8edcd(0x11f)][_0xe8edcd(0xe2)])return _0x5094ae;if(_0x5094ae&&typeof _0x5094ae[_0xe8edcd(0x178)]===_0xe8edcd(0x233))return _0x5094ae;if(Array[_0xe8edcd(0x164)](_0x5094ae))return _0x5094ae;const _0x572960=this,_0x540ba3=_0x572960[_0xe8edcd(0x11f)][_0xe8edcd(0xe2)]===_0xe8edcd(0x1e4),_0x6bbb0f=()=>{const _0x24ca18=_0xe8edcd;if(!_0x572960['_readViewExpired'])return![];if(!_0x540ba3)return!![];if(_0x572960[_0x24ca18(0xee)]===undefined)return!![];try{return _0x572960[_0x24ca18(0x12c)]['db']['getStats']()[_0x24ca18(0x21c)]!==_0x572960[_0x24ca18(0xee)];}catch{return!![];}};return _0x4752d3(()=>{const _0x358eeb=_0xe8edcd;if(_0x572960[_0x358eeb(0x1d6)])throw new _0x2d2371(_0x358eeb(0x112),_0x358eeb(0x161));if(_0x6bbb0f()){_0x2b3568((_0x572960['okdb']?.[_0x358eeb(0x238)]??'?')+':txnRange');throw new _0x2d2371('useReadTransaction\x20range\x20consumed\x20after\x20the\x20creation\x20turn\x20—\x20the\x20consistent\x20view\x20was\x20'+_0x358eeb(0x173)+_0x358eeb(0x111),'READER_HELD_ACROSS_AWAIT');}return _0x5094ae;},{'label':(_0x572960['okdb']?.['name']??'?')+_0xe8edcd(0x15a),..._0x540ba3?{'baseline':_0x572960[_0xe8edcd(0xee)],'getTxnId':()=>_0x572960[_0xe8edcd(0x12c)]['db']['getStats']()['lastTxnId'],'resume':(_0x53394d,_0x524664)=>_0x5094ae[_0xe8edcd(0x1a0)](_0x524664)}:{}});}['getRange'](_0x2e01c2,_0x2f716e={}){const _0x245c2f=_0x2b08db;return this['_assertOpen'](),this[_0x245c2f(0x198)](this[_0x245c2f(0x12c)][_0x245c2f(0x16b)](_0x2e01c2,{'transaction':this[_0x245c2f(0x20e)],..._0x2f716e}));}[_0x2b08db(0xcc)](_0x361083,_0x11351e={}){const _0x480748=_0x2b08db;return this[_0x480748(0x121)](),this[_0x480748(0x198)](this[_0x480748(0x12c)][_0x480748(0xcc)](_0x361083,{'transaction':this[_0x480748(0x20e)],..._0x11351e}));}[_0x2b08db(0x213)](_0x2eb8e6,_0x5bd5c6={}){const _0x569c6b=_0x2b08db;return this[_0x569c6b(0x121)](),this['_range'](this[_0x569c6b(0x12c)][_0x569c6b(0x213)](_0x2eb8e6,{'transaction':this[_0x569c6b(0x20e)],..._0x5bd5c6}));}[_0x2b08db(0xc8)](_0x2acf56,_0x2aecbd,_0x5e0e52={}){const _0x125c4c=_0x2b08db;return this['_assertOpen'](),this[_0x125c4c(0x198)](this[_0x125c4c(0x12c)][_0x125c4c(0xc8)](_0x2acf56,_0x2aecbd,{'transaction':this[_0x125c4c(0x20e)],..._0x5e0e52}));}[_0x2b08db(0x1fd)](_0x184f7d,_0x1b9b87,_0x5af1b2={}){const _0x2b9bb2=_0x2b08db;return this[_0x2b9bb2(0x121)](),this['_range'](this[_0x2b9bb2(0x12c)][_0x2b9bb2(0x1fd)](_0x184f7d,_0x1b9b87,{'transaction':this[_0x2b9bb2(0x20e)],..._0x5af1b2}));}[_0x2b08db(0x21d)](_0x21f7bb=null){const _0x20c8df=_0x2b08db;return this[_0x20c8df(0x121)](),this[_0x20c8df(0x12c)]['getClock'](_0x21f7bb,{'transaction':this[_0x20c8df(0x20e)]});}[_0x2b08db(0xeb)](_0xf3288c){const _0x26fcb7=_0x2b08db;return this[_0x26fcb7(0x121)](),this[_0x26fcb7(0x12c)][_0x26fcb7(0xeb)](_0xf3288c,{'transaction':this[_0x26fcb7(0x20e)]});}[_0x2b08db(0x13e)](_0x5ed333,_0x5cb06a,_0x37cb7c,{ifVersion:ifVersion=null,version:version=null,timestamp:timestamp=Date[_0x2b08db(0x142)](),origin:origin=null,ttl:ttl=null}={}){const _0x3b11ed=_0x2b08db;this[_0x3b11ed(0x137)][_0x3b11ed(0xfa)]({'action':'put','args':[_0x5ed333,_0x5cb06a,_0x37cb7c,{'ifVersion':ifVersion,'version':version,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}[_0x2b08db(0x1bf)](_0xb8e36a,_0x4d6165,_0x340087,{ifVersion:ifVersion=null,version:version=null,timestamp:timestamp=Date[_0x2b08db(0x142)](),origin:origin=null,ttl:ttl=null}={}){const _0xa8803b=_0x2b08db;this[_0xa8803b(0x137)][_0xa8803b(0xfa)]({'action':'update','args':[_0xb8e36a,_0x4d6165,_0x340087,{'ifVersion':ifVersion,'version':version,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}['patch'](_0x3a51ad,_0x3be4d1,_0x466e4c,{ifVersion:ifVersion=null,timestamp:timestamp=Date[_0x2b08db(0x142)](),origin:origin=null,ttl:ttl=null}={}){const _0x44a585=_0x2b08db;this[_0x44a585(0x137)][_0x44a585(0xfa)]({'action':_0x44a585(0x171),'args':[_0x3a51ad,_0x3be4d1,_0x466e4c,{'ifVersion':ifVersion,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}[_0x2b08db(0x1e7)](_0x307b7e,_0x5d246f,_0x58f5fa,{version:version=null,timestamp:timestamp=Date[_0x2b08db(0x142)](),origin:origin=null,ttl:ttl=null}={}){const _0x30aa9b=_0x2b08db;this[_0x30aa9b(0x137)][_0x30aa9b(0xfa)]({'action':'create','args':[_0x307b7e,_0x5d246f,_0x58f5fa,{'version':version,'timestamp':timestamp,'origin':origin,'ttl':ttl}]});}['remove'](_0x8f4d71,_0x562139,{ifVersion:ifVersion=null,timestamp:timestamp=Date['now'](),origin:origin=null}={}){const _0x3ba61b=_0x2b08db;this['actions'][_0x3ba61b(0xfa)]({'action':_0x3ba61b(0x19c),'args':[_0x8f4d71,_0x562139,{'ifVersion':ifVersion,'timestamp':timestamp,'origin':origin}]});}[_0x2b08db(0x1f5)](_0x2310c1,_0x539f22,_0x203c2b){const _0x17b748=_0x2b08db;this[_0x17b748(0x137)][_0x17b748(0xfa)]({'action':'setTTL','args':[_0x2310c1,_0x539f22,_0x203c2b]});}['clearTTL'](_0x2dbf5e,_0x2b83ee){const _0x120ee2=_0x2b08db;this['actions'][_0x120ee2(0xfa)]({'action':'clearTTL','args':[_0x2dbf5e,_0x2b83ee]});}[_0x2b08db(0x1cb)](){const _0x44b693=_0x2b08db;if(this[_0x44b693(0x1d6)])return;for(const _0x56fd77 of this[_0x44b693(0xbf)]){try{_0x56fd77();}catch{}}this[_0x44b693(0x12c)][_0x44b693(0x1a5)][_0x44b693(0x237)](_0x7fa1ac[_0x44b693(0x1dc)],{'id':this['id']}),this[_0x44b693(0x137)]=[],this['_closeReadTransaction'](),this[_0x44b693(0x1d6)]=!![];}async[_0x2b08db(0x1c7)](){const _0x254b9a=_0x2b08db;if(this['_closed'])throw new Error(_0x254b9a(0x112));const _0x29c17e={'id':this['id'],'timestamp':Date['now'](),'actions':this['actions']};this[_0x254b9a(0x12c)]['events'][_0x254b9a(0x237)](_0x7fa1ac[_0x254b9a(0xe3)],_0x29c17e);try{const _0x308cd3=_0x1790f7[_0x254b9a(0x116)]?_0x1790f7[_0x254b9a(0x142)]():0x0;await this['okdb'][_0x254b9a(0x1db)][_0x254b9a(0x1b8)](()=>{const _0x184a2c=_0x254b9a;for(const _0x4ce5bf of this['actions']){const _0xbf65a3=this[_0x184a2c(0x12c)]['_'+_0x4ce5bf[_0x184a2c(0xc1)]];if(typeof _0xbf65a3!==_0x184a2c(0x233))throw new Error(_0x184a2c(0x14e)+_0x4ce5bf[_0x184a2c(0xc1)]);_0xbf65a3[_0x184a2c(0x1ea)](this[_0x184a2c(0x12c)],this,..._0x4ce5bf[_0x184a2c(0x1fb)]);}}),_0x1790f7['enabled']&&_0x1790f7[_0x254b9a(0x162)](_0x254b9a(0xe6),_0x1790f7[_0x254b9a(0x142)]()-_0x308cd3,(this[_0x254b9a(0x12c)][_0x254b9a(0x238)]??'?')+'\x20actions='+this[_0x254b9a(0x137)][_0x254b9a(0xdf)]);}catch(_0x479123){for(const _0x211897 of this[_0x254b9a(0xbf)]){try{_0x211897();}catch{}}this[_0x254b9a(0x227)](),this[_0x254b9a(0x1d6)]=!![];if(_0x479123 instanceof _0x2d2371)throw _0x479123;const _0x3426ea={'cause':_0x479123,'env':this['okdb']?.[_0x254b9a(0x238)],'envPath':this['okdb']?.[_0x254b9a(0x21f)],'pid':process[_0x254b9a(0x1e9)],'txnId':this['id'],'actionCount':this[_0x254b9a(0x137)][_0x254b9a(0xdf)],'actions':_0x38c289(this[_0x254b9a(0x137)]),'nativeCode':_0x479123?.[_0x254b9a(0x146)],'nativeName':_0x479123?.[_0x254b9a(0x238)]};try{this['okdb']?.['log']?.[_0x254b9a(0x1ba)]?.(_0x254b9a(0x123),{'env':_0x3426ea[_0x254b9a(0x113)],'envPath':_0x3426ea[_0x254b9a(0x191)],'pid':_0x3426ea[_0x254b9a(0x1e9)],'txnId':_0x3426ea[_0x254b9a(0x1a9)],'actionCount':_0x3426ea[_0x254b9a(0x1f2)],'actions':_0x3426ea[_0x254b9a(0x137)],'nativeCode':_0x3426ea[_0x254b9a(0x167)],'error':_0x479123?.[_0x254b9a(0x147)],'stack':_0x479123?.[_0x254b9a(0x172)]});}catch{}throw new _0x2d2371(_0x479123?.[_0x254b9a(0x147)]||'Unknown\x20OKDB\x20transaction\x20error','TXN_ERROR',_0x3426ea);}this[_0x254b9a(0x12c)]['events'][_0x254b9a(0x237)](_0x7fa1ac[_0x254b9a(0xd8)],_0x29c17e);for(const _0x4b2f63 of this[_0x254b9a(0x100)]){try{await _0x4b2f63();}catch{}}this['actions']=[],this[_0x254b9a(0x227)](),this['_closed']=!![];}static[_0x2b08db(0xf6)](_0x1a435f){const _0x1c03f2=_0x2b08db;return Object[_0x1c03f2(0xbb)]({'id':_0x1a435f['id'],'put':_0x1a435f['put']['bind'](_0x1a435f),'update':_0x1a435f[_0x1c03f2(0x1bf)][_0x1c03f2(0x215)](_0x1a435f),'patch':_0x1a435f['patch'][_0x1c03f2(0x215)](_0x1a435f),'create':_0x1a435f[_0x1c03f2(0x1e7)][_0x1c03f2(0x215)](_0x1a435f),'remove':_0x1a435f[_0x1c03f2(0x19c)][_0x1c03f2(0x215)](_0x1a435f),'setTTL':_0x1a435f[_0x1c03f2(0x1f5)][_0x1c03f2(0x215)](_0x1a435f),'clearTTL':_0x1a435f[_0x1c03f2(0x11c)][_0x1c03f2(0x215)](_0x1a435f),'commit':_0x1a435f[_0x1c03f2(0x1c7)][_0x1c03f2(0x215)](_0x1a435f),'rollback':_0x1a435f[_0x1c03f2(0x1cb)][_0x1c03f2(0x215)](_0x1a435f),'get':_0x1a435f[_0x1c03f2(0x20c)][_0x1c03f2(0x215)](_0x1a435f),'getEntry':_0x1a435f[_0x1c03f2(0x15c)][_0x1c03f2(0x215)](_0x1a435f),'getMany':_0x1a435f['getMany'][_0x1c03f2(0x215)](_0x1a435f),'getRange':_0x1a435f[_0x1c03f2(0x16b)][_0x1c03f2(0x215)](_0x1a435f),'getValues':_0x1a435f[_0x1c03f2(0xcc)]['bind'](_0x1a435f),'getKeys':_0x1a435f[_0x1c03f2(0x213)]['bind'](_0x1a435f),'byIndex':_0x1a435f[_0x1c03f2(0xc8)][_0x1c03f2(0x215)](_0x1a435f),'query':_0x1a435f[_0x1c03f2(0x1fd)][_0x1c03f2(0x215)](_0x1a435f),'getClock':_0x1a435f[_0x1c03f2(0x21d)][_0x1c03f2(0x215)](_0x1a435f),'getCount':_0x1a435f[_0x1c03f2(0xeb)][_0x1c03f2(0x215)](_0x1a435f),'read':_0x1a435f,'raw':_0x1a435f});}static[_0x2b08db(0x18d)](_0x4a9cde,_0x5ee762=[]){const _0x50899b=_0x2b08db;if(!Array[_0x50899b(0x164)](_0x5ee762))throw new _0x2d2371('txn\x20ops\x20must\x20be\x20an\x20array','TXN_INVALID_OPS');for(const _0x3d940b of _0x5ee762){if(Array[_0x50899b(0x164)](_0x3d940b)){const [_0x5c9e9c,..._0x1119bd]=_0x3d940b;if(typeof _0x4a9cde[_0x5c9e9c]!==_0x50899b(0x233))throw new _0x2d2371(_0x50899b(0x14e)+_0x5c9e9c,_0x50899b(0xcb),{'action':_0x5c9e9c});_0x4a9cde[_0x5c9e9c](..._0x1119bd);continue;}if(!_0x3d940b||typeof _0x3d940b!==_0x50899b(0x1c2))throw new _0x2d2371(_0x50899b(0x122),_0x50899b(0x226));const {action:_0x928efd}=_0x3d940b;if(typeof _0x928efd!=='string'||typeof _0x4a9cde[_0x928efd]!=='function')throw new _0x2d2371(_0x50899b(0x14e)+_0x928efd,'TXN_INVALID_ACTION',{'action':_0x928efd});switch(_0x928efd){case _0x50899b(0x13e):case _0x50899b(0x1bf):case _0x50899b(0x1e7):_0x4a9cde[_0x928efd](_0x3d940b[_0x50899b(0xce)],_0x3d940b[_0x50899b(0x115)],_0x3d940b[_0x50899b(0xec)],{..._0x3d940b[_0x50899b(0x11f)],'ttl':_0x3d940b[_0x50899b(0x200)]??_0x3d940b[_0x50899b(0x11f)]?.[_0x50899b(0x200)]??null});break;case _0x50899b(0x171):_0x4a9cde[_0x50899b(0x171)](_0x3d940b[_0x50899b(0xce)],_0x3d940b['key'],_0x3d940b[_0x50899b(0x171)],{..._0x3d940b['options'],'ttl':_0x3d940b['ttl']??_0x3d940b[_0x50899b(0x11f)]?.[_0x50899b(0x200)]??null});break;case _0x50899b(0x19c):_0x4a9cde[_0x50899b(0x19c)](_0x3d940b[_0x50899b(0xce)],_0x3d940b['key'],_0x3d940b['options']||{});break;case'setTTL':_0x4a9cde[_0x50899b(0x1f5)](_0x3d940b[_0x50899b(0xce)],_0x3d940b['key'],_0x3d940b[_0x50899b(0x200)]);break;case _0x50899b(0x11c):_0x4a9cde['clearTTL'](_0x3d940b[_0x50899b(0xce)],_0x3d940b[_0x50899b(0x115)]);break;default:throw new _0x2d2371(_0x50899b(0x12f)+_0x928efd,_0x50899b(0xcb),{'action':_0x928efd});}}}static async['run'](_0x1a0957,_0x51d866,_0x3017f7={}){const _0xc5577a=_0x2b08db,_0x142539=new _0x3885cb(_0x1a0957,_0x3017f7),_0x583443=_0x3885cb[_0xc5577a(0xf6)](_0x142539);try{typeof _0x51d866===_0xc5577a(0x233)?await _0x51d866(_0x583443):_0x3885cb['applyOps'](_0x142539,_0x51d866||[]);const _0x88546e=_0x142539[_0xc5577a(0x137)]['length'];return await _0x142539[_0xc5577a(0x1c7)](),{'id':_0x142539['id'],'actions':_0x88546e};}catch(_0x3868c5){try{_0x142539[_0xc5577a(0x1cb)]();}catch(_0x26df3f){}throw _0x3868c5;}}}return okdbTransaction=_0x3885cb,okdbTransaction;}var okdbFunctionsFacades,hasRequiredOkdbFunctionsFacades;function requireOkdbFunctionsFacades(){if(hasRequiredOkdbFunctionsFacades)return okdbFunctionsFacades;hasRequiredOkdbFunctionsFacades=0x1;const _0x5370f9=requireOkdbTransaction();function _0x4312c0(_0x2b7c7b){const _0x405c74=_0x4c6d;return{'transaction':typeof _0x2b7c7b[_0x405c74(0x1b8)]===_0x405c74(0x233)?_0x2b7c7b['transaction'][_0x405c74(0x215)](_0x2b7c7b):_0x27f51a=>new _0x5370f9(_0x2b7c7b,_0x27f51a),'txn':typeof _0x2b7c7b[_0x405c74(0x1a2)]===_0x405c74(0x233)?_0x2b7c7b['txn'][_0x405c74(0x215)](_0x2b7c7b):(_0x43b555,_0x2c717f)=>_0x5370f9[_0x405c74(0xcf)](_0x2b7c7b,_0x43b555,_0x2c717f)};}function _0x227427(_0x31a8df){const _0x58711c=_0x4c6d;return{'name':_0x31a8df[_0x58711c(0x238)],..._0x4312c0(_0x31a8df),'put':_0x31a8df['put'][_0x58711c(0x215)](_0x31a8df),'update':_0x31a8df[_0x58711c(0x1bf)]['bind'](_0x31a8df),'patch':_0x31a8df[_0x58711c(0x171)][_0x58711c(0x215)](_0x31a8df),'create':_0x31a8df['create'][_0x58711c(0x215)](_0x31a8df),'remove':_0x31a8df[_0x58711c(0x19c)]['bind'](_0x31a8df),'get':_0x31a8df[_0x58711c(0x20c)][_0x58711c(0x215)](_0x31a8df),'getMany':_0x31a8df[_0x58711c(0x1e6)][_0x58711c(0x215)](_0x31a8df),'getEntry':_0x31a8df['getEntry']['bind'](_0x31a8df),'getRange':_0x31a8df[_0x58711c(0x16b)]['bind'](_0x31a8df),'getValues':_0x31a8df[_0x58711c(0xcc)]['bind'](_0x31a8df),'getKeys':_0x31a8df[_0x58711c(0x213)][_0x58711c(0x215)](_0x31a8df),'getCount':_0x31a8df[_0x58711c(0xeb)][_0x58711c(0x215)](_0x31a8df),'getByPrefix':_0x31a8df[_0x58711c(0xf9)]['bind'](_0x31a8df),'getIndex':_0x31a8df[_0x58711c(0x232)][_0x58711c(0x215)](_0x31a8df),'byIndex':_0x31a8df[_0x58711c(0xc8)][_0x58711c(0x215)](_0x31a8df),'query':_0x31a8df['query'][_0x58711c(0x215)](_0x31a8df),'geoQuery':_0x31a8df[_0x58711c(0xfe)][_0x58711c(0x215)](_0x31a8df),'ftsQuery':_0x31a8df[_0x58711c(0x140)][_0x58711c(0x215)](_0x31a8df),'setTTL':_0x31a8df['setTTL']['bind'](_0x31a8df),'getTTL':_0x31a8df[_0x58711c(0x1ca)][_0x58711c(0x215)](_0x31a8df),'clearTTL':_0x31a8df[_0x58711c(0x11c)][_0x58711c(0x215)](_0x31a8df),'sweepExpiredTTL':_0x31a8df['sweepExpiredTTL'][_0x58711c(0x215)](_0x31a8df),'listTTL':_0x31a8df[_0x58711c(0x166)][_0x58711c(0x215)](_0x31a8df),'ttlStats':_0x31a8df['ttlStats'][_0x58711c(0x215)](_0x31a8df),'setDefaultTTL':_0x31a8df[_0x58711c(0x149)][_0x58711c(0x215)](_0x31a8df),'getDefaultTTL':_0x31a8df[_0x58711c(0x1e1)][_0x58711c(0x215)](_0x31a8df),'clearDefaultTTL':_0x31a8df[_0x58711c(0xd2)][_0x58711c(0x215)](_0x31a8df),'registerType':_0x31a8df[_0x58711c(0x195)][_0x58711c(0x215)](_0x31a8df),'ensureType':_0x31a8df[_0x58711c(0x17d)][_0x58711c(0x215)](_0x31a8df),'hasType':_0x31a8df[_0x58711c(0x240)][_0x58711c(0x215)](_0x31a8df),'dropType':_0x31a8df['dropType'][_0x58711c(0x215)](_0x31a8df),'registerIndex':_0x31a8df['registerIndex']['bind'](_0x31a8df),'hasIndex':_0x31a8df['hasIndex'][_0x58711c(0x215)](_0x31a8df),'dropIndex':_0x31a8df['dropIndex'][_0x58711c(0x215)](_0x31a8df),'resetIndex':_0x31a8df[_0x58711c(0xc4)]['bind'](_0x31a8df),'indexReady':_0x31a8df[_0x58711c(0x1e2)][_0x58711c(0x215)](_0x31a8df),'getIndexStatus':_0x31a8df[_0x58711c(0x1ed)][_0x58711c(0x215)](_0x31a8df),'getClock':_0x31a8df[_0x58711c(0x21d)]['bind'](_0x31a8df),'getChanges':_0x31a8df['getChanges'][_0x58711c(0x215)](_0x31a8df),'count':_0x31a8df['count'][_0x58711c(0x215)](_0x31a8df),'range':_0x31a8df[_0x58711c(0x1b5)][_0x58711c(0x215)](_0x31a8df),'now':_0x31a8df[_0x58711c(0x142)][_0x58711c(0x215)](_0x31a8df)};}function _0x2683ba(_0x380768){const _0x1779bd=_0x4c6d;if(!_0x380768)return null;const _0xf555e5={};for(const _0x5bd1a1 of[_0x1779bd(0xf8),'getJob',_0x1779bd(0x104),'updateJob','removeJob',_0x1779bd(0x230),_0x1779bd(0xe8),_0x1779bd(0x1c8)]){if(typeof _0x380768[_0x5bd1a1]===_0x1779bd(0x233))_0xf555e5[_0x5bd1a1]=_0x380768[_0x5bd1a1][_0x1779bd(0x215)](_0x380768);}return Object[_0x1779bd(0x1a8)](_0xf555e5)[_0x1779bd(0xdf)]?_0xf555e5:null;}function _0x5c668c(_0x1557e7){const _0x10375a=_0x4c6d;if(!_0x1557e7)return null;const _0xa1fd76={};for(const _0x5706f3 of[_0x10375a(0xd7),'stream',_0x10375a(0x19c),_0x10375a(0x20c),_0x10375a(0x104),'getByPath']){if(typeof _0x1557e7[_0x5706f3]===_0x10375a(0x233))_0xa1fd76[_0x5706f3]=_0x1557e7[_0x5706f3]['bind'](_0x1557e7);}return Object[_0x10375a(0x1a8)](_0xa1fd76)['length']?_0xa1fd76:null;}function _0x2d9054(_0x95cb6b){const _0x4a332d=_0x4c6d;return{'env':_0x95cb6b[_0x4a332d(0x113)][_0x4a332d(0x215)](_0x95cb6b),'createEnvironment':_0x95cb6b[_0x4a332d(0x222)][_0x4a332d(0x215)](_0x95cb6b),'removeEnvironment':_0x95cb6b[_0x4a332d(0x221)]['bind'](_0x95cb6b),'info':_0x95cb6b[_0x4a332d(0x15e)],..._0x4312c0(_0x95cb6b),'put':_0x95cb6b['put'][_0x4a332d(0x215)](_0x95cb6b),'update':_0x95cb6b[_0x4a332d(0x1bf)][_0x4a332d(0x215)](_0x95cb6b),'patch':_0x95cb6b[_0x4a332d(0x171)]['bind'](_0x95cb6b),'create':_0x95cb6b[_0x4a332d(0x1e7)][_0x4a332d(0x215)](_0x95cb6b),'remove':_0x95cb6b['remove'][_0x4a332d(0x215)](_0x95cb6b),'get':_0x95cb6b['get'][_0x4a332d(0x215)](_0x95cb6b),'getMany':_0x95cb6b['getMany'][_0x4a332d(0x215)](_0x95cb6b),'getEntry':_0x95cb6b[_0x4a332d(0x15c)][_0x4a332d(0x215)](_0x95cb6b),'getRange':_0x95cb6b[_0x4a332d(0x16b)][_0x4a332d(0x215)](_0x95cb6b),'getValues':_0x95cb6b[_0x4a332d(0xcc)][_0x4a332d(0x215)](_0x95cb6b),'getKeys':_0x95cb6b['getKeys']['bind'](_0x95cb6b),'getCount':_0x95cb6b['getCount'][_0x4a332d(0x215)](_0x95cb6b),'getByPrefix':_0x95cb6b['getByPrefix'][_0x4a332d(0x215)](_0x95cb6b),'getIndex':_0x95cb6b[_0x4a332d(0x232)]['bind'](_0x95cb6b),'byIndex':_0x95cb6b[_0x4a332d(0xc8)][_0x4a332d(0x215)](_0x95cb6b),'query':_0x95cb6b[_0x4a332d(0x1fd)][_0x4a332d(0x215)](_0x95cb6b),'setTTL':_0x95cb6b[_0x4a332d(0x1f5)][_0x4a332d(0x215)](_0x95cb6b),'getTTL':_0x95cb6b['getTTL'][_0x4a332d(0x215)](_0x95cb6b),'clearTTL':_0x95cb6b[_0x4a332d(0x11c)]['bind'](_0x95cb6b),'sweepExpiredTTL':_0x95cb6b['sweepExpiredTTL']['bind'](_0x95cb6b),'listTTL':_0x95cb6b[_0x4a332d(0x166)]['bind'](_0x95cb6b),'ttlStats':_0x95cb6b['ttlStats'][_0x4a332d(0x215)](_0x95cb6b),'setDefaultTTL':_0x95cb6b[_0x4a332d(0x149)][_0x4a332d(0x215)](_0x95cb6b),'getDefaultTTL':_0x95cb6b[_0x4a332d(0x1e1)][_0x4a332d(0x215)](_0x95cb6b),'clearDefaultTTL':_0x95cb6b['clearDefaultTTL']['bind'](_0x95cb6b),'ensureType':_0x95cb6b[_0x4a332d(0x17d)]['bind'](_0x95cb6b),'registerType':_0x95cb6b['registerType'][_0x4a332d(0x215)](_0x95cb6b),'hasType':_0x95cb6b[_0x4a332d(0x240)][_0x4a332d(0x215)](_0x95cb6b),'dropType':_0x95cb6b[_0x4a332d(0xe9)][_0x4a332d(0x215)](_0x95cb6b),'registerIndex':_0x95cb6b[_0x4a332d(0x1ec)][_0x4a332d(0x215)](_0x95cb6b),'hasIndex':_0x95cb6b[_0x4a332d(0x16f)][_0x4a332d(0x215)](_0x95cb6b),'dropIndex':_0x95cb6b[_0x4a332d(0xf1)][_0x4a332d(0x215)](_0x95cb6b),'resetIndex':_0x95cb6b[_0x4a332d(0xc4)][_0x4a332d(0x215)](_0x95cb6b),'indexReady':_0x95cb6b['indexReady'][_0x4a332d(0x215)](_0x95cb6b),'getIndexStatus':_0x95cb6b[_0x4a332d(0x1ed)][_0x4a332d(0x215)](_0x95cb6b),'getClock':_0x95cb6b['getClock']['bind'](_0x95cb6b),'getChanges':_0x95cb6b[_0x4a332d(0x205)]['bind'](_0x95cb6b),'queue':_0x95cb6b[_0x4a332d(0xdc)],'files':_0x95cb6b[_0x4a332d(0x1c1)]};}return okdbFunctionsFacades={'createEnvFacade':_0x227427,'createQueueFacade':_0x2683ba,'createFilesFacade':_0x5c668c,'createGlobalFacade':_0x2d9054},okdbFunctionsFacades;}var okdbFunctionsDryrun,hasRequiredOkdbFunctionsDryrun;function requireOkdbFunctionsDryrun(){const _0x36218c=_0x318de2;if(hasRequiredOkdbFunctionsDryrun)return okdbFunctionsDryrun;hasRequiredOkdbFunctionsDryrun=0x1;const _0x304195=new Set([_0x36218c(0x13e),_0x36218c(0x171),'create',_0x36218c(0x19c),'update',_0x36218c(0x1f5),_0x36218c(0x11c),_0x36218c(0x203),'setDefaultTTL',_0x36218c(0xd2),_0x36218c(0xe9),_0x36218c(0xf1),'resetIndex']),_0x2e57b5=new Set(['enqueue','updateJob','removeJob',_0x36218c(0x230)]),_0x4dad90=new Set(['upload',_0x36218c(0x19c)]);function _0x551e13(_0x3aa5ee,_0x132888){const _0x34a3e0=_0x36218c;if(_0x3aa5ee===_0x34a3e0(0x113)||_0x3aa5ee===_0x34a3e0(0x10b))return _0x304195[_0x34a3e0(0x1f0)](_0x132888);if(_0x3aa5ee==='queue')return _0x2e57b5[_0x34a3e0(0x1f0)](_0x132888);if(_0x3aa5ee===_0x34a3e0(0x1c1))return _0x4dad90[_0x34a3e0(0x1f0)](_0x132888);return![];}function _0xc921bc(_0x2ec08f,_0x2bf063,_0x4d83b8,_0x4c80cc){if(!_0x2ec08f)return _0x2ec08f;return new Proxy(_0x2ec08f,{'get'(_0x5ba698,_0x31fd94,_0x103356){const _0x5c9a6c=_0x4c6d,_0x4e1530=Reflect[_0x5c9a6c(0x20c)](_0x5ba698,_0x31fd94,_0x103356);if(typeof _0x4e1530!==_0x5c9a6c(0x233))return _0x4e1530;if(!_0x551e13(_0x2bf063,_0x31fd94))return _0x4e1530[_0x5c9a6c(0x215)](_0x5ba698);return function(..._0x46d513){return _0x4c80cc['push']({'scope':_0x2bf063,'method':_0x31fd94,'envName':_0x4d83b8,'args':_0x46d513}),null;};}});}function _0xa03eed(_0x4f2d84,_0x198412,_0x3e8535,_0x4ad321){const _0x250e8e={};for(const _0x3d6e5f of _0x3e8535){_0x250e8e[_0x3d6e5f]=(..._0x5d8e15)=>{const _0x4789f4=_0x4c6d;return _0x551e13(_0x4f2d84,_0x3d6e5f)&&_0x4ad321[_0x4789f4(0xfa)]({'scope':_0x4f2d84,'method':_0x3d6e5f,'envName':_0x198412,'args':_0x5d8e15}),null;};}return _0x250e8e;}return okdbFunctionsDryrun={'isWriteMethod':_0x551e13,'wrapForDryRun':_0xc921bc,'syntheticDryRunFacade':_0xa03eed,'ENV_WRITE_METHODS':_0x304195,'QUEUE_WRITE_METHODS':_0x2e57b5,'FILES_WRITE_METHODS':_0x4dad90},okdbFunctionsDryrun;}var okdbFunctionsContext,hasRequiredOkdbFunctionsContext;function requireOkdbFunctionsContext(){const _0x2607eb=_0x318de2;if(hasRequiredOkdbFunctionsContext)return okdbFunctionsContext;hasRequiredOkdbFunctionsContext=0x1;const {createEnvFacade:_0x2e89b2,createQueueFacade:_0x3a0522,createFilesFacade:_0x429b9f,createGlobalFacade:_0x53e3bc}=requireOkdbFunctionsFacades(),{wrapForDryRun:_0x554acb,syntheticDryRunFacade:_0x532477}=requireOkdbFunctionsDryrun(),_0x4cbc66=['enqueue','getJob','list',_0x2607eb(0x1b1),'removeJob',_0x2607eb(0x230),'getBucket',_0x2607eb(0x1c8)],_0x23f164=[_0x2607eb(0xd7),_0x2607eb(0x1ee),'remove',_0x2607eb(0x20c),_0x2607eb(0x104),'getByPath'];function _0xcd02ff(_0x3b50ab,_0x3ad7e4){const _0x1bb5f4=_0x2607eb,_0x4fe367=(_0x52a288,_0x49a015,_0x17a02e)=>_0x3ad7e4({'type':'log','requestId':_0x3b50ab[_0x1bb5f4(0x194)],'runId':_0x3b50ab[_0x1bb5f4(0x151)],'entry':{'level':_0x52a288,'msg':_0x49a015,'context':_0x17a02e,'ts':Date[_0x1bb5f4(0x142)]()}}),_0x28635f=(_0x54214f,_0x1f0848)=>_0x4fe367(_0x1bb5f4(0x15e),_0x54214f,_0x1f0848);return _0x28635f[_0x1bb5f4(0x15e)]=(_0x20d047,_0x3399f6)=>_0x4fe367('info',_0x20d047,_0x3399f6),_0x28635f['warn']=(_0x33fc74,_0x181c32)=>_0x4fe367(_0x1bb5f4(0x22e),_0x33fc74,_0x181c32),_0x28635f[_0x1bb5f4(0x1ba)]=(_0xda61d1,_0x27ec2a)=>_0x4fe367(_0x1bb5f4(0x1ba),_0xda61d1,_0x27ec2a),_0x28635f['debug']=(_0x1e677e,_0x5b2627)=>_0x4fe367(_0x1bb5f4(0x241),_0x1e677e,_0x5b2627),_0x28635f;}function _0x2d9794(_0x5f1aec,_0x19db93,_0x2b7e65){const _0x14681f=_0x2607eb;if(!_0x5f1aec)return null;return{'id':_0x5f1aec['id']??null,'type':_0x5f1aec[_0x14681f(0xce)]??null,'tries':_0x5f1aec['tries']??null,'created':_0x5f1aec[_0x14681f(0x186)]??null,'tags':_0x5f1aec[_0x14681f(0x1f8)]??null,'priority':_0x5f1aec[_0x14681f(0x19e)]??null,'bucket':_0x5f1aec[_0x14681f(0x1e8)]??null,'cron':_0x5f1aec[_0x14681f(0x103)]??null,'heartbeat'(){const _0x4f5105=_0x14681f;_0x2b7e65({'type':'job_heartbeat','requestId':_0x19db93[_0x4f5105(0x194)],'runId':_0x19db93[_0x4f5105(0x151)],'jobId':_0x5f1aec['id'],'claimId':_0x5f1aec[_0x4f5105(0x1d0)]});},'markProgress'(_0x293254){const _0x375c23=_0x14681f;_0x2b7e65({'type':_0x375c23(0x19b),'requestId':_0x19db93[_0x375c23(0x194)],'runId':_0x19db93['runId'],'jobId':_0x5f1aec['id'],'claimId':_0x5f1aec[_0x375c23(0x1d0)],'message':_0x293254});}};}function _0x13328a(_0x44534f){const _0x73b1e=_0x2607eb;if(!_0x44534f)return null;return{'mode':_0x44534f[_0x73b1e(0x11b)]??null,'sourceType':_0x44534f[_0x73b1e(0x12b)]??null,'sourceEnv':_0x44534f['sourceEnv']??null,'processor':_0x44534f[_0x73b1e(0x18a)]??null,'engineKey':_0x44534f[_0x73b1e(0x208)]??null,'cursorKey':_0x44534f[_0x73b1e(0x102)]??null};}function _0x20cd2d(_0x4db963){const _0x1f95c4=_0x2607eb;if(!_0x4db963)return null;return{'mode':_0x4db963['mode']??null,'sourceType':_0x4db963[_0x1f95c4(0x12b)]??null,'targetType':_0x4db963[_0x1f95c4(0x1bd)]??null,'sourceEnv':_0x4db963['sourceEnv']??null,'targetEnv':_0x4db963[_0x1f95c4(0x10d)]??null,'engineKey':_0x4db963[_0x1f95c4(0x208)]??null,'cursorKey':_0x4db963[_0x1f95c4(0x102)]??null};}function _0x2f444e(_0x1237c5,_0x345d39,_0x4e22ad,_0x2f0f56=null,_0x1815f0=null){const _0x47d4c8=_0x2607eb,_0x26dc2c={'runId':_0x345d39[_0x47d4c8(0x151)],'scope':_0x47d4c8(0x113),'env':_0x345d39[_0x47d4c8(0x1fc)]??null,'functionName':_0x345d39[_0x47d4c8(0x1fe)],'trigger':_0x345d39[_0x47d4c8(0x15e)]?.[_0x47d4c8(0x1ae)]??_0x47d4c8(0x139),'requestedAt':_0x345d39[_0x47d4c8(0x15e)]?.[_0x47d4c8(0x1b0)]??Date[_0x47d4c8(0x142)]()},_0xaa0700=_0xcd02ff(_0x345d39,_0x4e22ad),_0x494afc=AbortSignal['timeout'](Math[_0x47d4c8(0x181)](0x1,_0x345d39[_0x47d4c8(0x1bc)]?.[_0x47d4c8(0x12e)]??0x3e8)),_0x2ec9c2=_0x1815f0?AbortSignal['any']([_0x494afc,_0x1815f0]):_0x494afc,_0x1ee88a=_0x1237c5[_0x47d4c8(0x113)](_0x345d39[_0x47d4c8(0x1fc)]),_0x354590=_0x2f0f56?_0x554acb(_0x1ee88a,_0x47d4c8(0x113),_0x345d39[_0x47d4c8(0x1fc)],_0x2f0f56):_0x1ee88a,_0x480961=_0x2f0f56?_0x1ee88a['queue']?_0x554acb(_0x1ee88a[_0x47d4c8(0xdc)],_0x47d4c8(0xdc),_0x345d39[_0x47d4c8(0x1fc)],_0x2f0f56):_0x532477(_0x47d4c8(0xdc),_0x345d39['envName'],_0x4cbc66,_0x2f0f56):_0x1ee88a[_0x47d4c8(0xdc)],_0x2abaf1=_0x2f0f56?_0x1ee88a['files']?_0x554acb(_0x1ee88a[_0x47d4c8(0x1c1)],_0x47d4c8(0x1c1),_0x345d39['envName'],_0x2f0f56):_0x532477(_0x47d4c8(0x1c1),_0x345d39[_0x47d4c8(0x1fc)],_0x23f164,_0x2f0f56):_0x1ee88a[_0x47d4c8(0x1c1)],_0x1a0e51=_0x2e89b2(_0x354590),_0x4f3b3c=_0x3a0522(_0x480961),_0x1c6a3a=_0x429b9f(_0x2abaf1);if(_0x4f3b3c)_0x1a0e51['queue']=_0x4f3b3c;if(_0x1c6a3a)_0x1a0e51['files']=_0x1c6a3a;const _0xce061f={'payload':_0x345d39['payload']??null,'info':_0x26dc2c,'signal':_0x2ec9c2,'log':_0xaa0700,'env':_0x1a0e51},_0x227c59=_0x2d9794(_0x345d39[_0x47d4c8(0x160)],_0x345d39,_0x4e22ad);if(_0x227c59)_0xce061f[_0x47d4c8(0x14d)]=_0x227c59;const _0x44c502=_0x13328a(_0x345d39['processorContext']);if(_0x44c502)_0xce061f[_0x47d4c8(0x18a)]=_0x44c502;const _0x5ee461=_0x20cd2d(_0x345d39['materializerContext']);if(_0x5ee461)_0xce061f[_0x47d4c8(0xc9)]=_0x5ee461;if(_0x345d39[_0x47d4c8(0x101)]){const _0x3a42ff=_0x2f0f56?_0x554acb(_0x1237c5,'global',null,_0x2f0f56):_0x1237c5;_0xce061f['okdb']=_0x53e3bc(_0x3a42ff);}return _0xce061f;}return okdbFunctionsContext={'createExecutionContext':_0x2f444e,'createScriptLogger':_0xcd02ff},okdbFunctionsContext;}var hasRequiredOkdbFunctionsSandboxWorker;function requireOkdbFunctionsSandboxWorker(){const _0x333329=_0x318de2;if(hasRequiredOkdbFunctionsSandboxWorker)return okdbFunctionsSandboxWorker$1;hasRequiredOkdbFunctionsSandboxWorker=0x1;const {parentPort:_0x5a145b,workerData:_0x1369df}=require$$0$4;requireOkdbFatalReport()[_0x333329(0x235)](_0x333329(0x22c));const _0x2fc2a2=require$$2,{compileFunctionExpression:_0x3c0e56}=requireOkdbFunctionsSandbox(),{serializeError:_0x3c4976}=requireOkdbFunctionsIpc(),{createExecutionContext:_0x2ba9f6}=requireOkdbFunctionsContext(),_0x238aef=require$$6;let _0x2dbfce=null,_0x237788=![];const _0x4000cb=new Map(),_0x5cd73e=new Map();function _0x526fc3(_0x1de1b7){const _0x128f4f=_0x333329;try{_0x5a145b[_0x128f4f(0x119)](_0x1de1b7);}catch{}}function _0x2af85b(_0x47261c){const _0x8e3329=_0x333329,_0x44705a=(_0x47261c[_0x8e3329(0x1fc)]||'~system')+':'+_0x47261c[_0x8e3329(0x1fe)]+':'+_0x47261c[_0x8e3329(0x17c)]+':'+_0x47261c[_0x8e3329(0x187)];let _0x54a10c=_0x4000cb['get'](_0x44705a);return!_0x54a10c&&(_0x54a10c=_0x3c0e56(_0x47261c[_0x8e3329(0x184)],{'allowFetch':_0x47261c[_0x8e3329(0x1bc)]?.[_0x8e3329(0x214)]!==![],'allowedFetchDomains':_0x47261c[_0x8e3329(0x1bc)]?.['allowedFetchDomains'],'filename':_0x47261c[_0x8e3329(0x1fe)]+_0x8e3329(0x157)}),_0x4000cb['set'](_0x44705a,_0x54a10c)),_0x54a10c;}async function _0x25bdf2(_0x1815de){const _0x5dbf26=_0x333329,_0x450924=Date[_0x5dbf26(0x142)](),_0x5a4bcd=new AbortController();_0x5cd73e[_0x5dbf26(0xe1)](_0x1815de['requestId'],_0x5a4bcd);try{const _0x4c6f5a=_0x2af85b(_0x1815de);if(_0x1815de[_0x5dbf26(0x1fc)])await _0x2dbfce[_0x5dbf26(0xf7)](_0x1815de[_0x5dbf26(0x1fc)]);const _0xa5cd80=_0x1815de[_0x5dbf26(0x21b)]?[]:null,_0x2fab5e=_0x2ba9f6(_0x2dbfce,_0x1815de,_0x526fc3,_0xa5cd80,_0x5a4bcd[_0x5dbf26(0xfc)]),_0x3a04be=await _0x4c6f5a(_0x2fab5e),_0x333f47={'type':'result','requestId':_0x1815de[_0x5dbf26(0x194)],'runId':_0x1815de[_0x5dbf26(0x151)],'result':_0x3a04be,'meta':{'runnerId':'sandbox-'+process[_0x5dbf26(0x1e9)],'startedAt':_0x450924,'finishedAt':Date[_0x5dbf26(0x142)](),'durationMs':Date[_0x5dbf26(0x142)]()-_0x450924}};if(_0xa5cd80)_0x333f47['dryRunActions']=_0xa5cd80;_0x526fc3(_0x333f47);}catch(_0x4d008c){_0x526fc3({'type':_0x5dbf26(0x1ba),'requestId':_0x1815de[_0x5dbf26(0x194)],'runId':_0x1815de[_0x5dbf26(0x151)],'error':_0x3c4976(_0x4d008c),'meta':{'runnerId':_0x5dbf26(0x154)+process[_0x5dbf26(0x1e9)],'startedAt':_0x450924,'finishedAt':Date['now'](),'durationMs':Date[_0x5dbf26(0x142)]()-_0x450924}});}finally{_0x5cd73e['delete'](_0x1815de[_0x5dbf26(0x194)]);}}async function _0x163298(){const _0x53329a=_0x333329;if(_0x237788)return;_0x237788=!![];try{await _0x2dbfce?.[_0x53329a(0x212)]?.();}catch{}process['exit'](0x0);}async function _0xf7fc3(){const _0x5f51af=_0x333329,{rootPath:_0x5d0d0f}=_0x1369df??{};if(!_0x5d0d0f)throw new Error(_0x5f51af(0x1ad));_0x2dbfce=new _0x238aef(_0x5d0d0f,{'engines':![],'processors':![],'compaction':![],'http':![],'auth':{'open':!![]},'processes':![]}),await _0x2dbfce['open']();const _0x3949e4=setInterval(()=>{const _0x3d2711=_0x5f51af;if(_0x237788)return;for(const [,_0x5f05ac]of _0x2dbfce[_0x3d2711(0x1a1)]){try{_0x5f05ac[_0x3d2711(0x236)]?.();}catch{}}},0xc8);if(typeof _0x3949e4['unref']===_0x5f51af(0x233))_0x3949e4[_0x5f51af(0x159)]();_0x5a145b['on'](_0x5f51af(0x147),_0x43d77a=>{const _0x4fdda7=_0x5f51af;if(!_0x43d77a||typeof _0x43d77a!==_0x4fdda7(0x1c2))return;if(_0x43d77a['type']===_0x4fdda7(0xe5))return void _0x163298();if(_0x43d77a[_0x4fdda7(0xce)]===_0x4fdda7(0xbd)){_0x5cd73e['get'](_0x43d77a['requestId'])?.[_0x4fdda7(0x20f)](new Error(_0x4fdda7(0x21a)));return;}_0x43d77a[_0x4fdda7(0xce)]===_0x4fdda7(0xcf)&&void _0x25bdf2(_0x43d77a['job']);});const _0x3c2f93=Math[_0x5f51af(0x181)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x4fd124=setInterval(()=>{const _0x39c1fd=_0x5f51af;try{_0x526fc3({'type':_0x39c1fd(0x223),'heapUsed':_0x2fc2a2['getHeapStatistics']()[_0x39c1fd(0xc6)]});}catch{}},_0x3c2f93);if(typeof _0x4fd124['unref']===_0x5f51af(0x233))_0x4fd124['unref']();_0x526fc3({'type':'ready'});}return _0xf7fc3()[_0x333329(0x179)](_0x430b1d=>{const _0x32491a=_0x333329;_0x526fc3({'type':_0x32491a(0xc5),'error':_0x3c4976(_0x430b1d)}),process[_0x32491a(0x1de)](0x1);}),okdbFunctionsSandboxWorker$1;}var okdbFunctionsSandboxWorkerExports=requireOkdbFunctionsSandboxWorker(),okdbFunctionsSandboxWorker=getDefaultExportFromCjs(okdbFunctionsSandboxWorkerExports);module[_0x318de2(0x158)]=okdbFunctionsSandboxWorker;