@kedem/okdb 2.3.5 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/CHANGELOG.md +427 -0
  2. package/algorithm-worker-thread.js +1 -1
  3. package/bin/okdb.js +1 -1
  4. package/docs/auth-and-sync.md +30 -5
  5. package/docs/auth-permissions.md +19 -6
  6. package/docs/change-log.md +79 -59
  7. package/docs/data-model.md +20 -18
  8. package/docs/deployment.md +25 -0
  9. package/docs/diagnostics.md +59 -17
  10. package/docs/embeddings.md +57 -6
  11. package/docs/fts.md +50 -5
  12. package/docs/functions.md +21 -8
  13. package/docs/http-api.md +139 -98
  14. package/docs/http-cluster.md +30 -8
  15. package/docs/indexes.md +5 -4
  16. package/docs/licensing.md +6 -1
  17. package/docs/logging.md +18 -0
  18. package/docs/migration.md +153 -2
  19. package/docs/pipelines.md +6 -1
  20. package/docs/plugins.md +12 -18
  21. package/docs/process-registry.md +50 -39
  22. package/docs/processors.md +40 -22
  23. package/docs/querying.md +50 -36
  24. package/docs/queue.md +110 -14
  25. package/docs/subscriptions.md +37 -24
  26. package/docs/sync.md +96 -37
  27. package/docs/time-machine.md +23 -17
  28. package/docs/transactions.md +11 -19
  29. package/docs/ttl.md +118 -67
  30. package/docs/upgrade-2.0.md +2 -2
  31. package/docs/views.md +75 -52
  32. package/okdb-functions-sandbox-worker.js +1 -1
  33. package/okdb-http-worker-child.js +1 -1
  34. package/okdb-views-bootstrap-worker.js +1 -1
  35. package/okdb.js +1 -1
  36. package/package.json +1 -1
  37. package/public/sections/db/parts/type-viewer.ok.js +1 -1
  38. package/public/sections/embeddings/parts/engines-overview.ok.js +1 -1
  39. package/public/sections/queue/parts/queue-jobs.ok.js +1 -1
  40. package/public/sections/system/modals/data-ops-modal.ok.js +1 -1
  41. package/types/environment.d.ts +320 -52
  42. package/types/features/admin.d.ts +8 -2
  43. package/types/features/api.d.ts +10 -16
  44. package/types/features/auth.d.ts +135 -16
  45. package/types/features/embeddings.d.ts +639 -31
  46. package/types/features/engines.d.ts +368 -14
  47. package/types/features/files.d.ts +0 -3
  48. package/types/features/fts.d.ts +98 -26
  49. package/types/features/functions.d.ts +175 -15
  50. package/types/features/mcp.d.ts +23 -10
  51. package/types/features/pipelines.d.ts +268 -9
  52. package/types/features/queue.d.ts +230 -34
  53. package/types/features/sync.d.ts +177 -14
  54. package/types/features/time-machine.d.ts +117 -16
  55. package/types/features/views.d.ts +230 -39
  56. package/types/index.d.ts +357 -254
  57. package/types/okdb.d.ts +397 -0
  58. package/types/options.d.ts +309 -48
  59. package/public/test-cron-input.html +0 -60
  60. package/public/test-json-input.html +0 -280
package/bin/okdb.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';const _0x362184=_0x4307;(function(_0xd691dc,_0x522028){const _0x4536db=_0x4307,_0x5567ce=_0xd691dc();while(!![]){try{const _0x4ea2ed=-parseInt(_0x4536db(0x45c))/0x1*(-parseInt(_0x4536db(0x615))/0x2)+-parseInt(_0x4536db(0x20e))/0x3+parseInt(_0x4536db(0x2fe))/0x4+-parseInt(_0x4536db(0x1db))/0x5+-parseInt(_0x4536db(0x47a))/0x6+-parseInt(_0x4536db(0x6ae))/0x7*(parseInt(_0x4536db(0x447))/0x8)+parseInt(_0x4536db(0x23f))/0x9;if(_0x4ea2ed===_0x522028)break;else _0x5567ce['push'](_0x5567ce['shift']());}catch(_0x3d2c73){_0x5567ce['push'](_0x5567ce['shift']());}}}(_0x226c,0xbcb8d));var require$$1=require(_0x362184(0x624)),require$$1$1=require('fs'),require$$0=require('os'),require$$4$1=require('net'),require$$5=require(_0x362184(0x392)),require$$0$2=require('readline'),require$$2=require(_0x362184(0x27c)),require$$0$1=require(_0x362184(0x253)),require$$4=require(_0x362184(0x3bf)),require$$1$2=require(_0x362184(0x3a6)),require$$0$3=require('node:perf_hooks'),require$$0$4=require('perf_hooks'),require$$0$5=require('node:events'),require$$0$6=require('http'),require$$1$3=require(_0x362184(0x424)),require$$2$1=require(_0x362184(0x3a8)),require$$8=require(_0x362184(0x246)),commonjsGlobal=typeof globalThis!==_0x362184(0x3f0)?globalThis:typeof window!==_0x362184(0x3f0)?window:typeof global!==_0x362184(0x3f0)?global:typeof self!==_0x362184(0x3f0)?self:{};function getDefaultExportFromCjs(_0x1bc07d){const _0x1700f4=_0x362184;return _0x1bc07d&&_0x1bc07d[_0x1700f4(0x528)]&&Object[_0x1700f4(0x359)][_0x1700f4(0x46b)][_0x1700f4(0x668)](_0x1bc07d,'default')?_0x1bc07d[_0x1700f4(0x445)]:_0x1bc07d;}var okdb$1={},okdbWorkers,hasRequiredOkdbWorkers;function requireOkdbWorkers(){if(hasRequiredOkdbWorkers)return okdbWorkers;hasRequiredOkdbWorkers=0x1;const _0x7007c9=require$$0,_0xfa350f=require$$1$1,_0x5c67f7=require$$1;let _0x526c52;function _0x18d139(){const _0xe2910d=_0x4307;if(process.env.OKDB_FORCE_SHMBUF_FALLBACK==='1')return![];if(_0x526c52!==undefined)return _0x526c52;try{const _0x357537=_0x5c67f7[_0xe2910d(0x237)](require['resolve'](_0xe2910d(0x77c)));_0x526c52=_0xfa350f['existsSync'](_0x5c67f7[_0xe2910d(0x29f)](_0x357537,'build',_0xe2910d(0x648),'shmbuf.node'));}catch{_0x526c52=![];}return _0x526c52;}function _0x3f1758(){const _0x294b9a=_0x4307,_0x378f35=_0x7007c9['cpus']()['length'];return Math[_0x294b9a(0x270)](0x1,_0x378f35-0x1);}function _0x5737dd(_0x41ad79,_0x364733={}){const _0x47094d=_0x4307,_0x1552d6=_0x364733[_0x47094d(0x2c2)]!==undefined?_0x364733[_0x47094d(0x2c2)]:_0x18d139();let _0x21a443;if(_0x41ad79?.[_0x47094d(0x343)])_0x21a443=0x1;else{let _0x5db8d7,_0xe9d79a;if(_0x41ad79?.[_0x47094d(0x5cb)]!==undefined&&_0x41ad79[_0x47094d(0x5cb)]!==null&&_0x41ad79[_0x47094d(0x5cb)]!=='')_0x5db8d7=_0x41ad79[_0x47094d(0x5cb)],_0xe9d79a='--workers';else{if(process.env.OKDB_HTTP_WORKERS!==undefined&&process.env.OKDB_HTTP_WORKERS!=='')_0x5db8d7=process.env.OKDB_HTTP_WORKERS,_0xe9d79a=_0x47094d(0x33f);else _0x41ad79?.[_0x47094d(0x635)]?.['workers']!==undefined&&_0x41ad79[_0x47094d(0x635)][_0x47094d(0x5f3)]!==null&&_0x41ad79[_0x47094d(0x635)][_0x47094d(0x5f3)]!==''&&(_0x5db8d7=_0x41ad79[_0x47094d(0x635)]['workers'],_0xe9d79a=_0x47094d(0x233));}if(_0x5db8d7===undefined)_0x21a443=_0x3f1758();else{const _0x1046bf=Number(_0x5db8d7);!Number[_0x47094d(0x636)](_0x1046bf)||_0x1046bf<0x1?(console[_0x47094d(0x21b)]('[okdb]\x20invalid\x20'+_0xe9d79a+'='+JSON['stringify'](_0x5db8d7)+'\x20(must\x20be\x20an\x20integer\x20>=\x201)\x20—\x20using\x201'),_0x21a443=0x1):_0x21a443=_0x1046bf;}}return!_0x1552d6&&_0x21a443>0x1&&(console[_0x47094d(0x21b)](_0x47094d(0x57a)+(_0x47094d(0x6b3)+_0x21a443+').')),_0x21a443=0x1),_0x21a443;}return okdbWorkers={'isShmbufNative':_0x18d139,'defaultWorkers':_0x3f1758,'resolveWorkers':_0x5737dd},okdbWorkers;}var version=_0x362184(0x6a4),require$$3={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x5e397c=require$$2;function _0x40957c(_0x508729,_0x3774d8){const _0x322ac9=_0x4307;return _0x5e397c[_0x322ac9(0x21e)](_0x322ac9(0x33b),_0x3774d8)[_0x322ac9(0x594)](_0x508729)['digest'](_0x322ac9(0x32e));}function _0x4e8980(_0x444101,_0x55ef32){const _0x3d14db=_0x4307;if(typeof _0x444101!==_0x3d14db(0x44e)||typeof _0x55ef32!==_0x3d14db(0x44e))return![];if(Buffer['byteLength'](_0x444101)!==Buffer['byteLength'](_0x55ef32))return![];return _0x5e397c[_0x3d14db(0x59f)](Buffer[_0x3d14db(0x2f3)](_0x444101),Buffer['from'](_0x55ef32));}function _0x4a70d6(_0x18d1b4){const _0xade1d8=_0x4307;if(!_0x18d1b4?.[_0xade1d8(0x637)](_0xade1d8(0x228)))return null;return _0x18d1b4[_0xade1d8(0x5b8)](0x7);}function _0x25c344(_0x5e8ffc=0x20){const _0x2eadc7=_0x4307;return _0x5e397c['randomBytes'](_0x5e8ffc)[_0x2eadc7(0x288)](_0x2eadc7(0x32e));}function _0x386011(_0x11f012){const _0xf86e55=_0x4307;return _0x5e397c[_0xf86e55(0x506)](_0xf86e55(0x33b))[_0xf86e55(0x594)](_0x11f012)['digest'](_0xf86e55(0x767));}function _0x399af2(_0x48de8d,_0x57b6e4,_0x929d53=0x36ee80){const _0x28f0ed=_0x4307;if(!_0x57b6e4)throw new Error(_0x28f0ed(0x4b4));const _0x33822b=Date[_0x28f0ed(0x6fd)](),_0x294153=Buffer['from'](JSON[_0x28f0ed(0x72f)]({'iat':_0x33822b,'exp':_0x33822b+_0x929d53,'sub':_0x48de8d?.['id']??_0x48de8d?.['sub']??null,'username':_0x48de8d?.[_0x28f0ed(0x376)]??_0x48de8d?.['name']??null,'roles':Array[_0x28f0ed(0x65e)](_0x48de8d?.['roles'])?_0x48de8d[_0x28f0ed(0x1d3)]:[]}))[_0x28f0ed(0x288)](_0x28f0ed(0x32e)),_0x269feb=_0x40957c(_0x294153,_0x57b6e4);return _0x294153+'.'+_0x269feb;}function _0x4991ff(_0x1c2adc,_0x8a0124){const _0x35e2fb=_0x4307;if(!_0x8a0124||typeof _0x1c2adc!==_0x35e2fb(0x44e))return null;const [_0x396185,_0x4dd371]=_0x1c2adc[_0x35e2fb(0x3d5)]('.');if(!_0x396185||!_0x4dd371)return null;const _0x28b4d1=_0x40957c(_0x396185,_0x8a0124);if(!_0x4e8980(_0x4dd371,_0x28b4d1))return null;try{const _0x4a73a0=JSON['parse'](Buffer[_0x35e2fb(0x2f3)](_0x396185,_0x35e2fb(0x32e))[_0x35e2fb(0x288)]()),_0x58b36d=0x7530;if(Date[_0x35e2fb(0x6fd)]()>Number(_0x4a73a0?.[_0x35e2fb(0x79c)]??0x0)+_0x58b36d)return null;return _0x4a73a0;}catch{return null;}}async function _0x5de4e(_0x61765){return new Promise((_0x4ce00e,_0x5b70f3)=>{const _0x5ebe52=_0x4307,_0x4fc91b=_0x5e397c['randomBytes'](0x10);_0x5e397c[_0x5ebe52(0x541)](_0x61765,_0x4fc91b,0x40,(_0x261f41,_0x106ec6)=>{const _0x4fc3e3=_0x5ebe52;if(_0x261f41)_0x5b70f3(_0x261f41);_0x4ce00e(_0x4fc91b[_0x4fc3e3(0x288)](_0x4fc3e3(0x767))+':'+_0x106ec6[_0x4fc3e3(0x288)]('hex'));});});}async function _0x5be61a(_0x1bc38e,_0x40fe08){const _0x3bb459=_0x4307,[_0x257c8b,_0x34d46d]=_0x40fe08[_0x3bb459(0x3d5)](':');if(!_0x257c8b||!_0x34d46d)return![];const _0x261bc6=Buffer[_0x3bb459(0x2f3)](_0x257c8b,_0x3bb459(0x767));return new Promise((_0x1b7331,_0x3f7f18)=>{const _0x187807=_0x3bb459;_0x5e397c[_0x187807(0x541)](_0x1bc38e,_0x261bc6,0x40,(_0x3cea62,_0x172a94)=>{const _0x3bdc8c=_0x187807;if(_0x3cea62)_0x3f7f18(_0x3cea62);_0x1b7331(_0x5e397c[_0x3bdc8c(0x59f)](_0x172a94,Buffer[_0x3bdc8c(0x2f3)](_0x34d46d,_0x3bdc8c(0x767))));});});}return okdbAuthTokens={'hmac':_0x40957c,'timingSafeEqual':_0x4e8980,'parseBearer':_0x4a70d6,'randomToken':_0x25c344,'hashToken':_0x386011,'issueToken':_0x399af2,'authenticateToken':_0x4991ff,'hashPassword':_0x5de4e,'verifyPassword':_0x5be61a},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x3d4f6d=_0x362184;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x4fcf0a=require$$0$1,_0x40f23f=_0x3d4f6d(0x595),_0x172b65=new Uint8Array(0x100)['fill'](0xff);for(let _0x16c9bc=0x0;_0x16c9bc<_0x40f23f[_0x3d4f6d(0x503)];_0x16c9bc++){_0x172b65[_0x40f23f['charCodeAt'](_0x16c9bc)]=_0x16c9bc,_0x172b65[_0x40f23f[_0x3d4f6d(0x713)](_0x16c9bc)+0x20]=_0x16c9bc;}_0x172b65['O'[_0x3d4f6d(0x713)](0x0)]=0x0,_0x172b65['o'['charCodeAt'](0x0)]=0x0,_0x172b65['I'[_0x3d4f6d(0x713)](0x0)]=0x1,_0x172b65['i'['charCodeAt'](0x0)]=0x1,_0x172b65['L'[_0x3d4f6d(0x713)](0x0)]=0x1,_0x172b65['l'[_0x3d4f6d(0x713)](0x0)]=0x1;function _0x2bbf5f(_0x2713d6){const _0x106012=_0x3d4f6d;let _0x1f9214=0x0,_0x4de58e=0x0,_0x53e5f4='';for(let _0x59d93c=0x0;_0x59d93c<_0x2713d6[_0x106012(0x503)];_0x59d93c++){_0x4de58e=_0x4de58e<<0x8|_0x2713d6[_0x59d93c],_0x1f9214+=0x8;while(_0x1f9214>=0x5){_0x1f9214-=0x5,_0x53e5f4+=_0x40f23f[_0x4de58e>>>_0x1f9214&0x1f];}}return _0x1f9214>0x0&&(_0x53e5f4+=_0x40f23f[_0x4de58e<<0x5-_0x1f9214&0x1f]),_0x53e5f4;}function _0x17cbe5(_0x312a65){const _0x5757bd=_0x3d4f6d;_0x312a65=_0x312a65[_0x5757bd(0x18e)](/-/g,'')[_0x5757bd(0x575)]();let _0x4ace5f=0x0,_0x4d3dae=0x0;const _0x7b92b0=[];for(let _0x2bca6b=0x0;_0x2bca6b<_0x312a65[_0x5757bd(0x503)];_0x2bca6b++){const _0x43d3df=_0x172b65[_0x312a65[_0x5757bd(0x713)](_0x2bca6b)];if(_0x43d3df===0xff)continue;_0x4d3dae=_0x4d3dae<<0x5|_0x43d3df,_0x4ace5f+=0x5,_0x4ace5f>=0x8&&(_0x4ace5f-=0x8,_0x7b92b0[_0x5757bd(0x387)](_0x4d3dae>>>_0x4ace5f&0xff));}return Buffer[_0x5757bd(0x2f3)](_0x7b92b0);}const _0x4f56f9=[_0x3d4f6d(0x317),_0x3d4f6d(0x61e),_0x3d4f6d(0x517),'fts','timeMachine','views',_0x3d4f6d(0x79a),'files'],_0x486615=0x0,_0x33dd43=0x1,_0x3238e9=0x2,_0x3b3907=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x545d05({issuedAt:_0x4cd629,expiresAt:_0x2be699,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x486615}){const _0x2fbe47=_0x3d4f6d,_0x16c2f2=Buffer[_0x2fbe47(0x2f3)](licensee,_0x2fbe47(0x6f6))['slice'](0x0,0x40),_0x433562=0x1+0x1+0x4+0x4+0x1+_0x16c2f2[_0x2fbe47(0x503)]+0x2+0x10,_0x1200fd=Buffer[_0x2fbe47(0x705)](_0x433562);let _0x35eb85=0x0;_0x1200fd['writeUInt8'](0x1,_0x35eb85++),_0x1200fd['writeUInt8'](licenseType,_0x35eb85++),_0x1200fd[_0x2fbe47(0x374)](Math['floor'](_0x4cd629/0x3e8),_0x35eb85),_0x35eb85+=0x4,_0x1200fd['writeUInt32BE'](Math['floor'](_0x2be699/0x3e8),_0x35eb85),_0x35eb85+=0x4,_0x1200fd[_0x2fbe47(0x500)](_0x16c2f2[_0x2fbe47(0x503)],_0x35eb85++),_0x16c2f2[_0x2fbe47(0x2fb)](_0x1200fd,_0x35eb85),_0x35eb85+=_0x16c2f2[_0x2fbe47(0x503)];let _0xf9813f=0x0;for(let _0xaf5281=0x0;_0xaf5281<_0x4f56f9['length'];_0xaf5281++){if(features[_0x4f56f9[_0xaf5281]])_0xf9813f|=0x1<<_0xaf5281;}_0x1200fd[_0x2fbe47(0x331)](_0xf9813f,_0x35eb85),_0x35eb85+=0x2;const _0x2a00f6=[_0x2fbe47(0x364),_0x2fbe47(0x200),_0x2fbe47(0x313),'maxWrites'];for(const _0x37998f of _0x2a00f6){_0x1200fd[_0x2fbe47(0x374)](limits[_0x37998f]||0x0,_0x35eb85),_0x35eb85+=0x4;}return _0x1200fd;}function _0x84b359(_0x2c9c09){const _0x23f9af=_0x3d4f6d;let _0x3de023=0x0;const _0x20a0d3=_0x2c9c09[_0x23f9af(0x6ac)](_0x3de023++),_0x2bc1e4=_0x2c9c09['readUInt8'](_0x3de023++),_0x5598da=_0x2c9c09['readUInt32BE'](_0x3de023);_0x3de023+=0x4;const _0x361aad=_0x2c9c09[_0x23f9af(0x601)](_0x3de023);_0x3de023+=0x4;const _0x479763=_0x2c9c09['readUInt8'](_0x3de023++),_0x53cf2a=_0x2c9c09[_0x23f9af(0x5b8)](_0x3de023,_0x3de023+_0x479763)[_0x23f9af(0x288)](_0x23f9af(0x6f6));_0x3de023+=_0x479763;const _0x2343d1=_0x2c9c09[_0x23f9af(0x525)](_0x3de023);_0x3de023+=0x2;const _0x45f314={};for(let _0x4051a7=0x0;_0x4051a7<_0x4f56f9[_0x23f9af(0x503)];_0x4051a7++){_0x45f314[_0x4f56f9[_0x4051a7]]=Boolean(_0x2343d1&0x1<<_0x4051a7);}const _0x577ecb=[_0x23f9af(0x364),'typesPerEnv',_0x23f9af(0x313),'maxWrites'],_0x48f938={};for(const _0xfd2938 of _0x577ecb){const _0x3dcce1=_0x2c9c09[_0x23f9af(0x601)](_0x3de023);_0x3de023+=0x4,_0x48f938[_0xfd2938]=_0x3dcce1===0x0?null:_0x3dcce1;}return{'v':_0x20a0d3,'licenseType':_0x2bc1e4,'issuedAt':_0x5598da*0x3e8,'expiresAt':_0x361aad*0x3e8,'licensee':_0x53cf2a,'features':_0x45f314,'limits':_0x48f938};}function _0x4ea685(_0x15b566,_0x2dc2f3){const _0x3fb5dc=_0x3d4f6d,_0xc0955c=Buffer[_0x3fb5dc(0x549)]([_0x15b566,_0x2dc2f3]),_0x45b352=_0x2bbf5f(_0xc0955c),_0x188a9c=[];for(let _0x4d2d7d=0x0;_0x4d2d7d<_0x45b352['length'];_0x4d2d7d+=0x8){_0x188a9c['push'](_0x45b352[_0x3fb5dc(0x5b8)](_0x4d2d7d,_0x4d2d7d+0x8));}return _0x188a9c[_0x3fb5dc(0x29f)]('-');}function _0xfe93de(_0x33bb9e){const _0x44e6a2=_0x3d4f6d;if(typeof _0x33bb9e!=='string')throw new Error('decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string');const _0x47da9b=_0x17cbe5(_0x33bb9e[_0x44e6a2(0x18e)](/-/g,''));if(_0x47da9b[_0x44e6a2(0x503)]<0x41)throw new Error(_0x44e6a2(0x1ad)+_0x47da9b[_0x44e6a2(0x503)]+'\x20bytes,\x20need\x20>=\x2065)');const _0x1c92fa=_0x47da9b[_0x44e6a2(0x5b8)](0x0,_0x47da9b['length']-0x40),_0x4f4112=_0x47da9b[_0x44e6a2(0x5b8)](_0x47da9b[_0x44e6a2(0x503)]-0x40);let _0x15f70f;try{_0x15f70f=_0x84b359(_0x1c92fa);}catch(_0x535e2e){throw new Error('decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20'+_0x535e2e[_0x44e6a2(0x1e0)]);}return{'rawBuf':_0x47da9b,'payload':_0x1c92fa,'sig':_0x4f4112,'decoded':_0x15f70f};}function _0xc15bbb(_0x226dd7){const _0x1060d9=_0x3d4f6d;return _0x4fcf0a[_0x1060d9(0x506)](_0x1060d9(0x33b))[_0x1060d9(0x594)](_0x226dd7)[_0x1060d9(0x2f8)]()['slice'](0x0,0x8);}function _0x3e2238(_0x3d4a82,_0x434d4e,_0x28168e){const _0x49f0c5=_0x3d4f6d,_0x4d85ed='OKDB-PIN-V1:'+_0x28168e,_0x19f03e=Buffer[_0x49f0c5(0x549)]([Buffer[_0x49f0c5(0x2f3)](_0x3d4a82,'utf8'),_0x434d4e]),_0x2ed3f5=_0x4fcf0a[_0x49f0c5(0x21e)](_0x49f0c5(0x33b),_0x4d85ed)['update'](_0x19f03e)[_0x49f0c5(0x2f8)](),_0x50b5b4=_0x2bbf5f(_0x2ed3f5['slice'](0x0,0x5));return{'pin':_0x50b5b4,'pinHmac':_0x2ed3f5};}function _0x543eea(_0x4c556a,_0x2322c3,_0x1528e9){const _0x142ebb=_0x3d4f6d,_0x29fdd4=Buffer[_0x142ebb(0x705)](0x4d);let _0x33424a=0x0;_0x29fdd4[_0x142ebb(0x500)](0x1,_0x33424a++),_0x4c556a[_0x142ebb(0x2fb)](_0x29fdd4,_0x33424a),_0x33424a+=0x8,_0x29fdd4[_0x142ebb(0x374)](_0x2322c3,_0x33424a),_0x33424a+=0x4,_0x1528e9[_0x142ebb(0x2fb)](_0x29fdd4,_0x33424a);const _0x378b76=_0x2bbf5f(_0x29fdd4),_0x187a9e=[];for(let _0x20f8fc=0x0;_0x20f8fc<_0x378b76[_0x142ebb(0x503)];_0x20f8fc+=0x6){_0x187a9e[_0x142ebb(0x387)](_0x378b76[_0x142ebb(0x5b8)](_0x20f8fc,_0x20f8fc+0x6));}return _0x187a9e['join']('-');}function _0x4ec148(_0xbbcec0){const _0x5df3b1=_0x3d4f6d;if(typeof _0xbbcec0!==_0x5df3b1(0x44e))throw new Error(_0x5df3b1(0x6f0));const _0x589744=_0x17cbe5(_0xbbcec0[_0x5df3b1(0x18e)](/-/g,''));if(_0x589744[_0x5df3b1(0x503)]!==0x4d)throw new Error('decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20'+_0x589744[_0x5df3b1(0x503)]);let _0x2262e3=0x0;const _0x5f409a=_0x589744[_0x5df3b1(0x6ac)](_0x2262e3++),_0x488f77=_0x589744[_0x5df3b1(0x5b8)](_0x2262e3,_0x2262e3+0x8);_0x2262e3+=0x8;const _0x108e56=_0x589744[_0x5df3b1(0x601)](_0x2262e3);_0x2262e3+=0x4;const _0x1dccf0=_0x589744[_0x5df3b1(0x5b8)](_0x2262e3);return{'v':_0x5f409a,'licenseHash':_0x488f77,'expiry':_0x108e56,'sig':_0x1dccf0};}function _0x1e3d49({tokenString:_0x449766,nodeId:_0x5029a3,rawBlobBuf:_0x1c8c48,pubKeyPem:_0x205453,pubFingerprint:_0x25bbe4}){const _0x546aac=_0x3d4f6d;let _0x349790;try{_0x349790=_0x4ec148(_0x449766);}catch(_0x232031){return{'valid':![],'reason':_0x546aac(0x512)};}const _0x250b0f=_0xc15bbb(_0x1c8c48);if(!_0x250b0f[_0x546aac(0x65b)](_0x349790[_0x546aac(0x350)]))return{'valid':![],'reason':_0x546aac(0x487)};const {pinHmac:_0x217ff0}=_0x3e2238(_0x5029a3,_0x250b0f,_0x25bbe4),_0x2329e3=Buffer[_0x546aac(0x705)](0x4);_0x2329e3[_0x546aac(0x374)](_0x349790[_0x546aac(0x4be)],0x0);const _0x794010=Buffer[_0x546aac(0x549)]([Buffer['from']([_0x349790['v']]),_0x217ff0[_0x546aac(0x5b8)](0x0,0x5),_0x349790[_0x546aac(0x350)],_0x2329e3]);try{const _0x1b67a4=_0x4fcf0a[_0x546aac(0x5e1)](null,_0x794010,_0x205453,_0x349790[_0x546aac(0x434)]);if(!_0x1b67a4)return{'valid':![],'reason':'SIG_INVALID'};}catch(_0x16ea06){return{'valid':![],'reason':_0x546aac(0x418)};}if(_0x349790[_0x546aac(0x4be)]<Date[_0x546aac(0x6fd)]()/0x3e8)return{'valid':![],'reason':'ACTIVATION_EXPIRED'};return{'valid':!![],'reason':'ok'};}function _0x452125(_0x225285){const _0x47ffa1=_0x3d4f6d;if(typeof _0x225285!==_0x47ffa1(0x44e))return _0x47ffa1(0x23d);const _0xe6e98a=_0x225285['trim']();if(_0xe6e98a[_0x47ffa1(0x637)]('/')||_0xe6e98a[_0x47ffa1(0x637)]('./')||_0xe6e98a[_0x47ffa1(0x637)](_0x47ffa1(0x2f6))||/^[A-Za-z]:[\\/]/[_0x47ffa1(0x193)](_0xe6e98a))return'path';if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x47ffa1(0x193)](_0xe6e98a))return _0x47ffa1(0x537);const _0x435c10=_0xe6e98a[_0x47ffa1(0x18e)](/[\s-]+/g,'')['length'];if(_0x435c10===0x7c)return'activation';if(_0x435c10>=0x95&&_0x435c10<=0xfc)return _0x47ffa1(0x33c);return _0x47ffa1(0x23d);}return okdbLicenseCodec={'toBase32':_0x2bbf5f,'fromBase32':_0x17cbe5,'encodeLicensePayload':_0x545d05,'decodeLicensePayload':_0x84b359,'encodeLicenseBlob':_0x4ea685,'decodeLicenseBlob':_0xfe93de,'licenseHash':_0xc15bbb,'derivePin':_0x3e2238,'encodeActivationToken':_0x543eea,'decodeActivationToken':_0x4ec148,'verifyActivation':_0x1e3d49,'detectInputType':_0x452125,'FEATURE_NAMES':_0x4f56f9,'LICENSE_TYPE_STANDARD':_0x486615,'LICENSE_TYPE_OPEN':_0x33dd43,'LICENSE_TYPE_INTERNAL':_0x3238e9,'OPEN_LICENSE_MAX_DURATION_MS':_0x3b3907},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x10bda0 extends Error{constructor(_0x16d04c,_0x312f8b,_0x4b053a={}){const _0x9d82e3=_0x4307;super(_0x16d04c),this[_0x9d82e3(0x378)]='OKDBError',this['code']=_0x312f8b,this[_0x9d82e3(0x491)]=_0x4b053a,_0x4b053a['cause']&&(this[_0x9d82e3(0x73d)]=_0x4b053a[_0x9d82e3(0x73d)]),Error[_0x9d82e3(0x54c)](this,this['constructor']);}}class _0x5412a7 extends _0x10bda0{constructor(_0x1ee5bb,_0x4d25d8,_0x516bc3,_0x3c5396){const _0x546231=_0x4307;super(_0x546231(0x762)+_0x1ee5bb+'@'+_0x4d25d8+':\x20expected\x20'+_0x516bc3+_0x546231(0x753)+_0x3c5396,_0x546231(0x1a0),{'type':_0x1ee5bb,'key':_0x4d25d8,'expectedVersion':_0x516bc3,'actualVersion':_0x3c5396}),this['name']=_0x546231(0x27b);}}class _0xab82e4 extends _0x10bda0{constructor(_0x2191a6,_0x52d515){const _0x4036c5=_0x4307;super(_0x2191a6+'@'+_0x52d515+'\x20does\x20not\x20exist','NOT_FOUND',{'type':_0x2191a6,'key':_0x52d515}),this[_0x4036c5(0x378)]='OKDBNotFoundError';}}class _0x56e278 extends _0x10bda0{constructor(_0x4272a2,_0xfa66c2){const _0x2ef599=_0x4307;super(_0x4272a2+'@'+_0xfa66c2+_0x2ef599(0x18f),'ALREADY_EXISTS',{'type':_0x4272a2,'key':_0xfa66c2}),this['name']='OKDBAlreadyExistsError';}}class _0x38ecc3 extends _0x10bda0{constructor(_0x518622,_0x35eab9){const _0x176ebd=_0x4307,_0x1a38c9=typeof _0x35eab9;super(_0x176ebd(0x2c3)+_0x518622+_0x176ebd(0x497)+_0x1a38c9+'.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20'+_0x35eab9,_0x176ebd(0x280),{'index':_0x518622,'key':_0x35eab9,'keyType':_0x1a38c9}),this['name']=_0x176ebd(0x3f1);}}class _0x108c50 extends _0x10bda0{constructor(_0xb4247){const _0x197bbd=_0x4307,_0x45da49=typeof _0xb4247;super('Invalid\x20primary\x20key\x20type:\x20'+_0x45da49+'.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20'+_0xb4247,_0x197bbd(0x304),{'key':_0xb4247,'keyType':_0x45da49}),this[_0x197bbd(0x378)]='OKDBInvalidPrimaryKeyError';}}class _0x2473fb extends _0x10bda0{constructor(_0xb2f879){const _0x3a7103=_0x4307;super(_0x3a7103(0x6c3)+_0xb2f879+_0x3a7103(0x22a),_0x3a7103(0x64b),{'type':_0xb2f879}),this[_0x3a7103(0x378)]=_0x3a7103(0x4e5);}}class _0x3847c2 extends _0x10bda0{constructor(_0x2277da){const _0x57d467=_0x4307;super(_0x57d467(0x6c3)+_0x2277da+_0x57d467(0x572),_0x57d467(0x734),{'type':_0x2277da}),this[_0x57d467(0x378)]=_0x57d467(0x196);}}class _0x5767fa extends _0x10bda0{constructor(_0xd1429d,_0x3d9037){const _0x260760=_0x4307;super(_0x260760(0x755)+_0x3d9037+_0x260760(0x744)+_0xd1429d+_0x260760(0x22a),'INDEX_NOT_REGISTERED',{'type':_0xd1429d,'index':_0x3d9037}),this[_0x260760(0x378)]='OKDBIndexNotRegisteredError';}}class _0x294a88 extends _0x10bda0{constructor(_0x21d7d3,_0x1a63ab){const _0x39e7ce=_0x4307;super(_0x39e7ce(0x755)+_0x1a63ab+'\x27\x20on\x20type\x20\x27'+_0x21d7d3+_0x39e7ce(0x1be),_0x39e7ce(0x405),{'type':_0x21d7d3,'index':_0x1a63ab}),this[_0x39e7ce(0x378)]=_0x39e7ce(0x276);}}class _0x565250 extends _0x10bda0{constructor(_0x619221,_0x490593={}){const _0x483e56=_0x4307;super(_0x619221,_0x483e56(0x5ac),_0x490593),this[_0x483e56(0x378)]=_0x483e56(0x33e);}}class _0x1cd9e5 extends _0x10bda0{constructor(_0x5a9f5e,_0x5d4dd0,_0x25e69a,_0x4d9dd4,_0x1ccc66){const _0x34916a=_0x4307;super(_0x34916a(0x467)+_0x5a9f5e+'@'+_0x5d4dd0+':\x20key\x20['+_0x25e69a+_0x34916a(0x3d4)+_0x4d9dd4+_0x34916a(0x462)+_0x1ccc66+'\x27',_0x34916a(0x697),{'type':_0x5a9f5e,'index':_0x5d4dd0,'indexKey':_0x25e69a,'existingKey':_0x4d9dd4,'conflictingKey':_0x1ccc66}),this[_0x34916a(0x378)]=_0x34916a(0x6be);}}class _0x3194d3 extends _0x10bda0{constructor(_0x35bec9,_0x353452,_0x5b9c58){const _0x326980=_0x4307;super(_0x326980(0x218)+_0x35bec9+'@'+_0x353452,_0x326980(0x6f8),{'type':_0x35bec9,'key':_0x353452,'errors':_0x5b9c58}),this[_0x326980(0x378)]=_0x326980(0x426),this[_0x326980(0x5e4)]=_0x35bec9,this[_0x326980(0x566)]=_0x353452,this[_0x326980(0x6db)]=_0x5b9c58;}}class _0x58dced extends _0x10bda0{constructor(_0x5dced0,_0xdc1b6a){const _0xc58d73=_0x4307;super(_0xc58d73(0x3ec)+_0x5dced0+':\x20'+_0xdc1b6a['length']+_0xc58d73(0x18d),'SCHEMA_COLLECTION_INVALID',{'type':_0x5dced0,'failures':_0xdc1b6a}),this[_0xc58d73(0x378)]=_0xc58d73(0x3b8),this[_0xc58d73(0x5e4)]=_0x5dced0,this[_0xc58d73(0x3b0)]=_0xdc1b6a;}}class _0x1590b7 extends _0x10bda0{constructor(_0xfb9739,_0x3075bd,_0x422a7f,_0x20d806,_0x1a9152){const _0x20fc16=_0x4307;super(_0x20fc16(0x420)+_0xfb9739+'@'+_0x3075bd+'.'+_0x422a7f+_0x20fc16(0x514)+_0x20d806+'@'+_0x1a9152+_0x20fc16(0x229),'FOREIGN_KEY_VIOLATION',{'sourceType':_0xfb9739,'sourceKey':_0x3075bd,'fieldPath':_0x422a7f,'targetType':_0x20d806,'targetKey':_0x1a9152}),this['name']=_0x20fc16(0x775),this[_0x20fc16(0x336)]=_0xfb9739,this['sourceKey']=_0x3075bd,this[_0x20fc16(0x56c)]=_0x422a7f,this['targetType']=_0x20d806,this[_0x20fc16(0x4f2)]=_0x1a9152;}}class _0x28aac9 extends _0x10bda0{constructor(_0x4b65c8,_0x1d811e,_0x416725){const _0x327c59=_0x4307;super(_0x327c59(0x192)+_0x4b65c8+'@'+_0x1d811e+':\x20'+_0x416725[_0x327c59(0x503)]+_0x327c59(0x63f),_0x327c59(0x748),{'targetType':_0x4b65c8,'targetKey':_0x1d811e,'references':_0x416725}),this[_0x327c59(0x378)]=_0x327c59(0x3ff),this[_0x327c59(0x356)]=_0x4b65c8,this['targetKey']=_0x1d811e,this[_0x327c59(0x286)]=_0x416725;}}class _0x4ba594 extends _0x10bda0{constructor(_0x44127d,_0x11a650,_0x58aa33){const _0x1f2126=_0x4307;super(_0x1f2126(0x456)+_0x11a650+_0x1f2126(0x232)+_0x44127d+'\x22\x20is\x20used\x20by:\x20'+_0x58aa33['map'](_0x399d3c=>_0x399d3c['kind']+':'+_0x399d3c[_0x1f2126(0x378)])[_0x1f2126(0x29f)](',\x20'),'INDEX_HAS_CONSUMERS',{'type':_0x44127d,'index':_0x11a650,'usedBy':_0x58aa33}),this[_0x1f2126(0x378)]='OKDBIndexHasConsumersError';}}return okdbError={'OKDBError':_0x10bda0,'OKDBVersionMismatchError':_0x5412a7,'OKDBNotFoundError':_0xab82e4,'OKDBAlreadyExistsError':_0x56e278,'OKDBInvalidIndexKeyError':_0x38ecc3,'OKDBInvalidPrimaryKeyError':_0x108c50,'OKDBTypeNotRegisteredError':_0x2473fb,'OKDBTypeAlreadyRegisteredError':_0x3847c2,'OKDBIndexNotRegisteredError':_0x5767fa,'OKDBIndexAlreadyRegisteredError':_0x294a88,'OKDBInvalidValueError':_0x565250,'OKDBUniqueConstraintError':_0x1cd9e5,'OKDBSchemaValidationError':_0x3194d3,'OKDBSchemaCollectionError':_0x58dced,'OKDBForeignKeyError':_0x1590b7,'OKDBForeignKeyDeleteError':_0x28aac9,'OKDBIndexHasConsumersError':_0x4ba594},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x5c5641=_0x362184;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0xa0a502={'PUT':_0x5c5641(0x66a),'REMOVE':_0x5c5641(0x488),'INDEX_DROP':'dropIndex','INDEX_REGISTER':_0x5c5641(0x372),'INDEX_RESET':'resetIndex','TYPE_REGISTER':_0x5c5641(0x3d7),'TYPE_DROP':'dropType','FTS_REGISTER':_0x5c5641(0x5d7),'FTS_DROP':'dropFts','FTS_RESET':_0x5c5641(0x1f2),'SCHEMA_SET':_0x5c5641(0x49a),'SCHEMA_DROP':'dropSchema','TTL_SET':'setTtl','TTL_CLEAR':_0x5c5641(0x58b)},_0x209bb0={'SYSTEM_READY':_0x5c5641(0x54a),'FIELD_RESOLVER_REGISTERED':_0x5c5641(0x4d0),'SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':_0x5c5641(0x1b3),'SYSTEM_POKE':'system:poke','SYSTEM_DRAIN':'system:drain','SYSTEM_TYPE_DROP':'system:type_drop','SYSTEM_PROC':_0x5c5641(0x4b0),'SYSTEM_BUS_STATE_CHANGE':_0x5c5641(0x36e),'ITEM_CREATE':_0x5c5641(0x74a),'ITEM_UPDATE':_0x5c5641(0x3ee),'ITEM_REMOVE':_0x5c5641(0x22c),'INDEX_RESET':_0x5c5641(0x24e),'INDEX_READY':'index:ready','INDEX_PROGRESS':_0x5c5641(0x5b4),'VIEW_PROGRESS':_0x5c5641(0x3e9),'INDEX_DROP':_0x5c5641(0x644),'INDEX_REGISTERED':'index:registered','FTS_REGISTERED':_0x5c5641(0x561),'FTS_DROP':_0x5c5641(0x64a),'FTS_RESET':_0x5c5641(0x2d1),'SCHEMA_SET':_0x5c5641(0x366),'SCHEMA_DROP':_0x5c5641(0x4e3),'UNIQUE_VIOLATION':_0x5c5641(0x6e6),'UNIQUE_VIOLATION_RESOLVED':_0x5c5641(0x348),'REF_VIOLATION':_0x5c5641(0x2da),'REF_VIOLATION_RESOLVED':_0x5c5641(0x591),'SYNC_APPLY':_0x5c5641(0x688),'TXN_START':_0x5c5641(0x5ed),'TXN_END':'txn:end','TXN_ROLLBACK':_0x5c5641(0x266),'TYPE_REGISTERED':_0x5c5641(0x5d2),'TYPE_DROP':'type:drop','ENV_OPENED':_0x5c5641(0x501),'ENV_REMOVED':_0x5c5641(0x245),'SYSTEM_ENV_RELEASE':_0x5c5641(0x716),'TTL_EXPIRED':_0x5c5641(0x1f1),'TTL_SET':'ttl:set','TTL_CLEAR':_0x5c5641(0x50e),'LICENSE_INVALID':_0x5c5641(0x2ab),'LICENSE_ADDED':_0x5c5641(0x262),'LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':'license:removed'},_0x2cb7eb={'CREATING':_0x5c5641(0x47f),'RESETTING':'resetting','READY':_0x5c5641(0x5da),'DROPPING':_0x5c5641(0x1fc),'WAITING':_0x5c5641(0x425),'ERROR':_0x5c5641(0x5b7)},_0x37ebac={'CREATED':_0x5c5641(0x55e),'STARTING':_0x5c5641(0x19b),'STARTED':_0x5c5641(0x6c0),'STOPPING':_0x5c5641(0x35e),'STOPPED':'stopped'},_0x5f4309={'CREATING':'creating','READY':_0x5c5641(0x5da),'HALTED':'halted','STOPPED':_0x5c5641(0x367),'RESETTING':'resetting'},_0x35ed61=Object[_0x5c5641(0x24a)]({'POKE':_0x5c5641(0x1e4),'DRAIN':_0x5c5641(0x291),'TYPE_DROP':_0x5c5641(0x577),'PROC':_0x5c5641(0x340),'ENV_RELEASE':_0x5c5641(0x763)});return okdbEnums={'BUS_EVENTS':_0x35ed61,'CHANGE_ACTIONS':_0xa0a502,'EVENTS':_0x209bb0,'INDEX_STATE':_0x2cb7eb,'OKDB_STATE':_0x37ebac,'VIEW_STATE':_0x5f4309},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x11cf1d=_0x362184;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x4ad1a1=require$$1$1,_0x58136c=require$$1,_0x4622c1=require$$2,_0x56836e=_0x4ad1a1[_0x11cf1d(0x2a8)](_0x58136c[_0x11cf1d(0x29f)](__dirname,_0x11cf1d(0x319)),_0x11cf1d(0x6f6))['trim'](),_0x3ccac7=_0x4622c1['createPublicKey'](_0x56836e)[_0x11cf1d(0x28c)]({'type':_0x11cf1d(0x498),'format':_0x11cf1d(0x248)}),_0x4fd122=_0x4622c1[_0x11cf1d(0x506)](_0x11cf1d(0x33b))[_0x11cf1d(0x594)](_0x3ccac7)['digest'](_0x11cf1d(0x767))['slice'](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x56836e,'PUB_FINGERPRINT':_0x4fd122},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x2330c8=_0x362184;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x162793=require$$2,{OKDBError:_0x51da13}=requireOkdbError(),{EVENTS:_0x114a32}=requireOkdbEnums(),_0x584a05=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x1e5701,LICENSE_TYPE_INTERNAL:_0x55d8cf,OPEN_LICENSE_MAX_DURATION_MS:_0x2f1745}=_0x584a05,_0x261870=requireOkdbPubkey(),_0x4618b0={'LICENSED_BUILD':_0x2330c8(0x47d),'PUBLIC_KEY_PEM':_0x261870[_0x2330c8(0x363)],'PUB_FINGERPRINT':_0x261870['PUB_FINGERPRINT'],'LICENSE_EXPIRED_ACTION':'log'},_0x27e0c3='~licenses',_0x34455b={'features':{'sync':![],'embeddings':!![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x5,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240,'pipelinesPerEnv':0x2},'_isFree':!![]};async function _0x1a3303(_0x514621){await _0x514621['ensureType'](_0x27e0c3);}class _0x332dbb{constructor(_0x1ea86b){const _0x50124d=_0x2330c8;this[_0x50124d(0x784)]=_0x1ea86b,this[_0x50124d(0x3ed)]=null;}async['reload'](){const _0x36898a=_0x2330c8,_0x3540f9=this[_0x36898a(0x784)]['_systemEnv'];if(!_0x3540f9||!_0x3540f9[_0x36898a(0x4d9)](_0x27e0c3)){this[_0x36898a(0x3ed)]=null;return;}const _0x219f72=this['okdb']['id'];let _0x59c837=null;for(const {key:_0x352647,value:_0x18d2c8}of _0x3540f9[_0x36898a(0x73f)](_0x27e0c3)){const _0x1693cd=this[_0x36898a(0x563)](_0x18d2c8,_0x219f72);_0x1693cd==='active'&&!_0x59c837&&(_0x59c837={..._0x18d2c8,'id':_0x352647,'status':_0x1693cd});}this[_0x36898a(0x3ed)]=_0x59c837;if(this['_active']&&this[_0x36898a(0x3ed)][_0x36898a(0x6ba)]===_0x1e5701){const _0x3c41e8=Math[_0x36898a(0x752)]((this[_0x36898a(0x3ed)][_0x36898a(0x4f7)]-Date[_0x36898a(0x6fd)]())/0x5265c00);this['okdb'][_0x36898a(0x273)]?.[_0x36898a(0x21b)](_0x36898a(0x18c)+_0x3c41e8+_0x36898a(0x3c5),{'feature':_0x36898a(0x20d),'licensee':this[_0x36898a(0x3ed)][_0x36898a(0x67a)],'expiresAt':new Date(this[_0x36898a(0x3ed)][_0x36898a(0x4f7)])[_0x36898a(0x2d7)]()});}this[_0x36898a(0x3ed)]&&this['_active']['licenseType']===_0x55d8cf&&this[_0x36898a(0x784)][_0x36898a(0x273)]?.[_0x36898a(0x21b)](_0x36898a(0x35f),{'feature':_0x36898a(0x20d),'licensee':this[_0x36898a(0x3ed)][_0x36898a(0x67a)]});}[_0x2330c8(0x563)](_0x8af13f,_0x758565){const _0x5f42ec=_0x2330c8;if(!_0x8af13f[_0x5f42ec(0x33c)])return _0x5f42ec(0x6c2);let _0x2c5831;try{_0x2c5831=_0x584a05['decodeLicenseBlob'](_0x8af13f[_0x5f42ec(0x33c)]);}catch(_0x3e0da6){return _0x5f42ec(0x6c2);}try{const _0x2fcd2c=_0x162793[_0x5f42ec(0x5e1)](null,_0x2c5831[_0x5f42ec(0x63d)],_0x4618b0['PUBLIC_KEY_PEM'],_0x2c5831[_0x5f42ec(0x434)]);if(!_0x2fcd2c)return _0x5f42ec(0x6c2);}catch(_0x519e05){return _0x5f42ec(0x6c2);}if(_0x2c5831[_0x5f42ec(0x5ef)][_0x5f42ec(0x6ba)]===_0x55d8cf)return _0x5f42ec(0x569);if(_0x2c5831[_0x5f42ec(0x5ef)]['expiresAt']<=Date[_0x5f42ec(0x6fd)]())return _0x5f42ec(0x1cd);if(_0x2c5831[_0x5f42ec(0x5ef)][_0x5f42ec(0x6ba)]===_0x1e5701)return _0x5f42ec(0x569);if(!_0x8af13f[_0x5f42ec(0x6c5)])return _0x5f42ec(0x2f0);const _0x55723a=_0x584a05['verifyActivation']({'tokenString':_0x8af13f[_0x5f42ec(0x6c5)],'nodeId':_0x758565,'rawBlobBuf':_0x2c5831[_0x5f42ec(0x332)],'pubKeyPem':_0x4618b0['PUBLIC_KEY_PEM'],'pubFingerprint':_0x4618b0['PUB_FINGERPRINT']});if(_0x55723a[_0x5f42ec(0x271)]===_0x5f42ec(0x487)||_0x55723a['reason']==='SIG_INVALID')return _0x5f42ec(0x2b2);if(_0x55723a[_0x5f42ec(0x271)]===_0x5f42ec(0x65c))return _0x5f42ec(0x1cd);if(!_0x55723a['valid'])return _0x5f42ec(0x2b2);return _0x5f42ec(0x569);}get[_0x2330c8(0x569)](){return this['_active'];}get[_0x2330c8(0x236)](){const _0x44db0d=_0x2330c8;return this[_0x44db0d(0x3ed)]??_0x34455b;}['assertFeature'](_0x2dc38a){const _0x1e5aa8=_0x2330c8;if(_0x4618b0[_0x1e5aa8(0x1ef)]!=='true')return;const _0x58ca6d=this[_0x1e5aa8(0x236)];if(!_0x58ca6d[_0x1e5aa8(0x2e2)]?.[_0x2dc38a]){const _0x417ced=_0x58ca6d[_0x1e5aa8(0x3ad)]?_0x1e5aa8(0x5bd)+_0x2dc38a+_0x1e5aa8(0x3de)+_0x2dc38a+'\x22\x20to\x20enable\x20it.':_0x1e5aa8(0x28b)+_0x2dc38a+_0x1e5aa8(0x54b)+_0x2dc38a+'\x22.';throw new _0x51da13(_0x417ced,'LICENSE_FEATURE_DISABLED',{'feature':_0x2dc38a});}}[_0x2330c8(0x527)](_0x58a790){const _0x57db56=_0x2330c8;if(_0x4618b0[_0x57db56(0x1ef)]!==_0x57db56(0x47d))return!![];return!!this[_0x57db56(0x236)][_0x57db56(0x2e2)]?.[_0x58a790];}[_0x2330c8(0x38e)](_0x1972cf){const _0x1683c8=_0x2330c8;if(_0x4618b0[_0x1683c8(0x1ef)]!=='true')return![];const _0x17c259=this['effective']['limits']?.[_0x1972cf];return!(_0x17c259===null||_0x17c259===undefined||_0x17c259===0x0);}['assertLimit'](_0x420dbc,_0x42470a){const _0xe4beae=_0x2330c8;if(_0x4618b0[_0xe4beae(0x1ef)]!==_0xe4beae(0x47d))return;const _0x2860ec=this[_0xe4beae(0x236)],_0x1c8761=_0x2860ec[_0xe4beae(0x3aa)]?.[_0x420dbc];if(_0x1c8761===null||_0x1c8761===undefined||_0x1c8761===0x0)return;if(_0x42470a>=_0x1c8761)throw new _0x51da13(_0xe4beae(0x57c)+_0x420dbc+'\x20('+_0x42470a+'/'+_0x1c8761+')',_0xe4beae(0x2b7),{'limit':_0x420dbc,'current':_0x42470a,'max':_0x1c8761});}async[_0x2330c8(0x793)](_0x24ed10){const _0x48d8f6=_0x2330c8;let _0x45667c;try{_0x45667c=_0x584a05[_0x48d8f6(0x382)](_0x24ed10);}catch(_0x294941){throw new _0x51da13('Invalid\x20license\x20blob:\x20'+_0x294941['message'],_0x48d8f6(0x431));}let _0x30cdff;try{_0x30cdff=_0x162793[_0x48d8f6(0x5e1)](null,_0x45667c['payload'],_0x4618b0[_0x48d8f6(0x363)],_0x45667c[_0x48d8f6(0x434)]);}catch(_0x102530){throw new _0x51da13(_0x48d8f6(0x214)+_0x102530['message'],_0x48d8f6(0x431));}if(!_0x30cdff)throw new _0x51da13(_0x48d8f6(0x284)+(_0x48d8f6(0x720)+_0x4618b0[_0x48d8f6(0x6a8)]+'.\x20')+_0x48d8f6(0x3c1),_0x48d8f6(0x431),{'expectedFingerprint':_0x4618b0[_0x48d8f6(0x6a8)]});if(_0x45667c[_0x48d8f6(0x5ef)][_0x48d8f6(0x6ba)]===_0x1e5701){const _0x11ea33=_0x45667c[_0x48d8f6(0x5ef)][_0x48d8f6(0x4f7)]-_0x45667c[_0x48d8f6(0x5ef)][_0x48d8f6(0x4dd)];if(_0x11ea33>_0x2f1745)throw new _0x51da13(_0x48d8f6(0x68a)+Math[_0x48d8f6(0x752)](_0x11ea33/(0x1e*0x5265c00))+'\x20months\x20from\x20issuance)','LICENSE_INVALID');}const _0x77e30a=this['okdb'][_0x48d8f6(0x791)];await _0x1a3303(_0x77e30a);const _0x21eb9a=_0x584a05[_0x48d8f6(0x350)](_0x45667c[_0x48d8f6(0x332)])[_0x48d8f6(0x288)](_0x48d8f6(0x767));for(const {key:_0x2f67d8,value:_0x41f488}of _0x77e30a[_0x48d8f6(0x73f)](_0x27e0c3)){if(_0x41f488[_0x48d8f6(0x3a4)]===_0x21eb9a)throw new _0x51da13(_0x48d8f6(0x74e),_0x48d8f6(0x6e4),{'id':_0x2f67d8});}const _0x98cac3=_0x162793[_0x48d8f6(0x506)](_0x48d8f6(0x33b))[_0x48d8f6(0x594)](_0x48d8f6(0x776))[_0x48d8f6(0x594)](_0x45667c['rawBuf'])['digest'](_0x48d8f6(0x767)),_0x318a37=_0x98cac3[_0x48d8f6(0x5b8)](0x0,0x8)+'-'+_0x98cac3[_0x48d8f6(0x5b8)](0x8,0xc)+'-5'+_0x98cac3[_0x48d8f6(0x5b8)](0xd,0x10)+'-'+(parseInt(_0x98cac3[0x10],0x10)&0x3|0x8)['toString'](0x10)+_0x98cac3['slice'](0x11,0x14)+'-'+_0x98cac3[_0x48d8f6(0x5b8)](0x14,0x20),_0x28879a={'blob':_0x24ed10,'activation':null,'addedAt':Date['now'](),'_licenseHash':_0x21eb9a,'licensee':_0x45667c[_0x48d8f6(0x5ef)][_0x48d8f6(0x67a)],'expiresAt':_0x45667c[_0x48d8f6(0x5ef)][_0x48d8f6(0x4f7)],'features':_0x45667c[_0x48d8f6(0x5ef)][_0x48d8f6(0x2e2)],'limits':_0x45667c[_0x48d8f6(0x5ef)]['limits'],'licenseType':_0x45667c['decoded'][_0x48d8f6(0x6ba)]};return await _0x77e30a[_0x48d8f6(0x66a)](_0x27e0c3,_0x318a37,_0x28879a),{'id':_0x318a37,..._0x28879a};}async[_0x2330c8(0x41e)](_0x58e154){const _0x1594d2=_0x2330c8;let _0x4e3c62;try{_0x4e3c62=_0x584a05[_0x1594d2(0x538)](_0x58e154);}catch(_0x3f4d63){throw new _0x51da13(_0x1594d2(0x4cc)+_0x3f4d63[_0x1594d2(0x1e0)],_0x1594d2(0x29a));}const _0x1646cc=_0x4e3c62[_0x1594d2(0x350)][_0x1594d2(0x288)](_0x1594d2(0x767)),_0xfac78b=this['okdb'][_0x1594d2(0x791)];if(!_0xfac78b||!_0xfac78b['hasType'](_0x27e0c3))throw new _0x51da13('No\x20license\x20found\x20matching\x20this\x20activation\x20token',_0x1594d2(0x29a));let _0x5615fc=null,_0x267a54=null;for(const {key:_0x1e7851,value:_0x21ee4a}of _0xfac78b[_0x1594d2(0x73f)](_0x27e0c3)){if(_0x21ee4a[_0x1594d2(0x3a4)]===_0x1646cc){_0x5615fc=_0x1e7851,_0x267a54=_0x21ee4a;break;}}if(!_0x5615fc)throw new _0x51da13('No\x20license\x20found\x20matching\x20this\x20activation\x20token',_0x1594d2(0x29a));const {rawBuf:_0x536700}=_0x584a05[_0x1594d2(0x382)](_0x267a54[_0x1594d2(0x33c)]),_0x43617c=_0x584a05['verifyActivation']({'tokenString':_0x58e154,'nodeId':this[_0x1594d2(0x784)]['id'],'rawBlobBuf':_0x536700,'pubKeyPem':_0x4618b0[_0x1594d2(0x363)],'pubFingerprint':_0x4618b0['PUB_FINGERPRINT']});if(!_0x43617c[_0x1594d2(0x53a)])throw new _0x51da13(_0x1594d2(0x406)+_0x43617c['reason'],_0x1594d2(0x29a),{'reason':_0x43617c['reason']});const _0x2ecd6b={..._0x267a54,'activation':_0x58e154};return await _0xfac78b['update'](_0x27e0c3,_0x5615fc,_0x2ecd6b),{'id':_0x5615fc,..._0x2ecd6b};}async[_0x2330c8(0x686)](_0x330455){const _0x5dc710=_0x2330c8,_0x5e6399=this[_0x5dc710(0x784)][_0x5dc710(0x791)];if(!_0x5e6399||!_0x5e6399[_0x5dc710(0x4d9)](_0x27e0c3))return;await _0x5e6399[_0x5dc710(0x488)](_0x27e0c3,_0x330455);}async['listLicenses'](){const _0x40deed=_0x2330c8,_0x5bdbcf=this[_0x40deed(0x784)][_0x40deed(0x791)];if(!_0x5bdbcf||!_0x5bdbcf[_0x40deed(0x4d9)](_0x27e0c3))return[];const _0x1cedf9=this[_0x40deed(0x784)]['id'],_0x420614=[];for(const {key:_0x19b5b4,value:_0x44a444}of _0x5bdbcf[_0x40deed(0x73f)](_0x27e0c3)){const _0x454a04=this[_0x40deed(0x563)](_0x44a444,_0x1cedf9);_0x420614[_0x40deed(0x387)]({..._0x44a444,'id':_0x19b5b4,'status':_0x454a04});}return _0x420614;}['getPins'](){const _0x318760=_0x2330c8,_0x12687a=this[_0x318760(0x784)][_0x318760(0x791)];if(!_0x12687a||!_0x12687a['hasType'](_0x27e0c3))return[];const _0x54bc4c=this['okdb']['id'],_0xa7fc88=[];for(const {key:_0x4487d9,value:_0x2df564}of _0x12687a[_0x318760(0x73f)](_0x27e0c3)){if(_0x2df564[_0x318760(0x3a4)]){if(_0x2df564[_0x318760(0x6ba)]===_0x1e5701)_0xa7fc88[_0x318760(0x387)]({'licenseId':_0x4487d9,'pin':null});else{const _0x511cd6=Buffer[_0x318760(0x2f3)](_0x2df564[_0x318760(0x3a4)],_0x318760(0x767)),{pin:_0x4ba938}=_0x584a05[_0x318760(0x19c)](_0x54bc4c,_0x511cd6,_0x4618b0[_0x318760(0x6a8)]);_0xa7fc88[_0x318760(0x387)]({'licenseId':_0x4487d9,'pin':_0x4ba938});}}}return _0xa7fc88;}async['recheck'](){const _0x3e599c=_0x2330c8,_0x331df2=this[_0x3e599c(0x3ed)];await this[_0x3e599c(0x4ec)]();if(this[_0x3e599c(0x3ed)]&&this[_0x3e599c(0x3ed)]['licenseType']===_0x1e5701){const _0x55f8e8=Math[_0x3e599c(0x752)]((this[_0x3e599c(0x3ed)][_0x3e599c(0x4f7)]-Date['now']())/0x5265c00);this['okdb']['log']?.[_0x3e599c(0x21b)]('⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20'+_0x55f8e8+_0x3e599c(0x3c5),{'feature':'license','licensee':this[_0x3e599c(0x3ed)][_0x3e599c(0x67a)],'expiresAt':new Date(this[_0x3e599c(0x3ed)]['expiresAt'])[_0x3e599c(0x2d7)]()});}this[_0x3e599c(0x3ed)]&&this[_0x3e599c(0x3ed)][_0x3e599c(0x6ba)]===_0x55d8cf&&this[_0x3e599c(0x784)][_0x3e599c(0x273)]?.[_0x3e599c(0x21b)](_0x3e599c(0x35f),{'feature':'license','licensee':this['_active'][_0x3e599c(0x67a)]});if(_0x331df2&&!this[_0x3e599c(0x3ed)]){this[_0x3e599c(0x784)]['log']?.[_0x3e599c(0x21b)]('License\x20expired\x20or\x20invalidated',{'feature':_0x3e599c(0x20d)}),this['okdb'][_0x3e599c(0x3e2)]?.[_0x3e599c(0x41f)](_0x114a32['LICENSE_INVALID'],{'previous':_0x331df2});const _0x531684=this[_0x3e599c(0x784)][_0x3e599c(0x659)]?.[_0x3e599c(0x6ef)]??_0x4618b0[_0x3e599c(0x600)];_0x531684===_0x3e599c(0x774)&&(this['okdb'][_0x3e599c(0x273)]?.[_0x3e599c(0x5b7)]('Shutting\x20down\x20due\x20to\x20license\x20expiry',{'feature':_0x3e599c(0x20d)}),this[_0x3e599c(0x784)][_0x3e599c(0x543)]()[_0x3e599c(0x628)](()=>{})[_0x3e599c(0x5c5)](()=>process[_0x3e599c(0x393)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x332dbb,'_C':_0x4618b0,'FREE_TIER':_0x34455b},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x2a2824=_0x362184;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x51c597=require$$0$2,_0x3afeb8=require$$1$1,_0x4597b4=require$$0,_0x396c43=require$$1,_0x2da170=_0x396c43[_0x2a2824(0x29f)](_0x4597b4[_0x2a2824(0x41a)](),_0x2a2824(0x518)),_0xfd95d6=0x3e8,_0x1b9306={'reset':_0x2a2824(0x1d9),'bold':_0x2a2824(0x49e),'dim':_0x2a2824(0x56b),'red':_0x2a2824(0x6c6),'green':'\x1b[32m','yellow':_0x2a2824(0x43d),'blue':'\x1b[34m','magenta':'\x1b[35m','cyan':'\x1b[36m','white':_0x2a2824(0x3bd),'gray':_0x2a2824(0x34a)},_0x5968ef=!process[_0x2a2824(0x3f5)][_0x2a2824(0x53f)]||!!process.env.NO_COLOR,_0x1f9979=(_0x537280,_0x5ba4e4)=>_0x5968ef?_0x5ba4e4:''+_0x537280+_0x5ba4e4+_0x1b9306[_0x2a2824(0x620)],_0x1ecc29={'error':_0x1b9306[_0x2a2824(0x482)],'warn':_0x1b9306['yellow'],'info':_0x1b9306[_0x2a2824(0x1eb)],'debug':_0x1b9306[_0x2a2824(0x195)]},_0x2adb06={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0xab5c9(_0x3e6988,_0x76e534=_0x2a2824(0x77a)){const _0x580cb8=_0x2a2824,{level:_0x4e6051,msg:_0x3efada,meta:_0x24fde8,context:_0x5bbd03,ts:_0x15db34}=_0x3e6988;if((_0x2adb06[_0x4e6051]??0x1)<(_0x2adb06[_0x76e534]??0x1))return;const _0x2b432b=_0x1f9979(_0x1b9306['gray'],new Date(_0x15db34)[_0x580cb8(0x2d7)]()),_0x1637c7=_0x1f9979(_0x1ecc29[_0x4e6051]??_0x1b9306['white'],_0x4e6051[_0x580cb8(0x619)](0x5));let _0x1b13b2='\x20\x20'+_0x2b432b+'\x20'+_0x1f9979(_0x1b9306[_0x580cb8(0x50b)],_0x1637c7)+'\x20'+_0x3efada;if(_0x24fde8&&Object[_0x580cb8(0x2ac)](_0x24fde8)[_0x580cb8(0x503)]>0x0){const _0x5c09ff=Object[_0x580cb8(0x62b)](_0x24fde8)[_0x580cb8(0x626)](([_0x571495,_0x266140])=>_0x571495+'='+_0x266140)[_0x580cb8(0x29f)]('\x20');_0x1b13b2+=_0x1f9979(_0x1b9306[_0x580cb8(0x260)],_0x580cb8(0x736)+_0x5c09ff+']');}if(_0x5bbd03!==undefined){const _0x1e51a0=typeof _0x5bbd03===_0x580cb8(0x40d)?JSON['stringify'](_0x5bbd03):String(_0x5bbd03);_0x1b13b2+=_0x1f9979(_0x1b9306['dim'],'\x20\x20'+_0x1e51a0);}const _0x206f83=_0x4e6051==='error'||_0x4e6051===_0x580cb8(0x21b)?process[_0x580cb8(0x556)][_0x580cb8(0x6cc)]['bind'](process[_0x580cb8(0x556)]):process['stdout']['write'][_0x580cb8(0x723)](process[_0x580cb8(0x3f5)]);_0x206f83(_0x1b13b2+'\x0a');}function _0x156cf5(_0x1cbf6b,_0x3dbd68){const _0x48f7a5=_0x2a2824;if(_0x1cbf6b===0xcc||_0x1cbf6b>=0xc8&&_0x1cbf6b<0x12c&&!_0x3dbd68){console[_0x48f7a5(0x273)](_0x48f7a5(0x608)+_0x1f9979(_0x1b9306['green'],'✓')+'\x0a');return;}if(_0x1cbf6b>=0x190||_0x3dbd68?.['error']){const _0x4d825b=_0x3dbd68?.[_0x48f7a5(0x5b7)]??_0x3dbd68?.[_0x48f7a5(0x1e0)]??'HTTP\x20'+_0x1cbf6b;console[_0x48f7a5(0x273)](_0x48f7a5(0x608)+_0x1f9979(_0x1b9306[_0x48f7a5(0x482)],'✗')+'\x20'+_0x1f9979(_0x1b9306[_0x48f7a5(0x50b)]+_0x1b9306[_0x48f7a5(0x482)],String(_0x1cbf6b))+'\x20\x20'+_0x4d825b+'\x0a');return;}const _0x21e48f=Object[_0x48f7a5(0x359)][_0x48f7a5(0x46b)][_0x48f7a5(0x668)](_0x3dbd68??{},_0x48f7a5(0x401))?_0x3dbd68[_0x48f7a5(0x401)]:_0x3dbd68,_0x8f493d=_0x3dbd68?.['meta'];console[_0x48f7a5(0x273)](''),_0x546c28(_0x21e48f,'\x20\x20');if(_0x8f493d?.[_0x48f7a5(0x5b9)]!=null||_0x8f493d?.[_0x48f7a5(0x1d5)]!=null){const _0xdd1e54=[];if(_0x8f493d[_0x48f7a5(0x5b9)]!=null)_0xdd1e54['push'](_0x8f493d[_0x48f7a5(0x5b9)]+_0x48f7a5(0x46f)+(_0x8f493d[_0x48f7a5(0x5b9)]!==0x1?'s':''));if(_0x8f493d[_0x48f7a5(0x1d5)]!=null)_0xdd1e54[_0x48f7a5(0x387)](_0x8f493d[_0x48f7a5(0x1d5)]+'ms');console[_0x48f7a5(0x273)]('\x0a\x20\x20'+_0x1f9979(_0x1b9306[_0x48f7a5(0x260)],_0xdd1e54[_0x48f7a5(0x29f)](_0x48f7a5(0x6d4))));}console[_0x48f7a5(0x273)]('');}function _0x546c28(_0x33e8ce,_0x182574=''){const _0x21ccc2=_0x2a2824;if(_0x33e8ce===null||_0x33e8ce===undefined){console[_0x21ccc2(0x273)](_0x182574+_0x1f9979(_0x1b9306[_0x21ccc2(0x260)],'(null)'));return;}if(Array[_0x21ccc2(0x65e)](_0x33e8ce)){if(_0x33e8ce[_0x21ccc2(0x503)]===0x0){console['log'](_0x182574+_0x1f9979(_0x1b9306[_0x21ccc2(0x260)],_0x21ccc2(0x53b)));return;}if(_0x33e8ce[_0x21ccc2(0x3a1)](_0x31aafa=>_0x31aafa&&typeof _0x31aafa===_0x21ccc2(0x40d)&&'key'in _0x31aafa&&_0x21ccc2(0x481)in _0x31aafa)){_0xc3917b(_0x33e8ce,_0x182574);return;}if(_0x33e8ce[_0x21ccc2(0x3a1)](_0x443cb0=>_0x443cb0&&typeof _0x443cb0===_0x21ccc2(0x40d)&&'type'in _0x443cb0&&_0x21ccc2(0x5b9)in _0x443cb0)){_0x1e2a1b(_0x33e8ce,_0x182574);return;}if(_0x33e8ce[_0x21ccc2(0x3a1)](_0x417e0c=>typeof _0x417e0c!==_0x21ccc2(0x40d)||_0x417e0c===null)){_0x33e8ce[_0x21ccc2(0x5c0)]((_0x3cec9f,_0x18aec9)=>console[_0x21ccc2(0x273)](_0x182574+_0x1f9979(_0x1b9306[_0x21ccc2(0x195)],_0x18aec9+0x1+'.')+'\x20'+_0x1f9979(_0x1b9306[_0x21ccc2(0x777)],String(_0x3cec9f))));return;}_0x33e8ce['forEach']((_0xddfa09,_0x44f68a)=>{const _0x4dfbbe=_0x21ccc2;console[_0x4dfbbe(0x273)](_0x182574+_0x1f9979(_0x1b9306[_0x4dfbbe(0x260)],'['+_0x44f68a+']'));if(typeof _0xddfa09===_0x4dfbbe(0x40d)&&_0xddfa09!==null)_0x36c5d9(_0xddfa09,_0x182574+'\x20\x20');else console[_0x4dfbbe(0x273)](_0x182574+'\x20\x20'+String(_0xddfa09));});return;}if(typeof _0x33e8ce===_0x21ccc2(0x40d)){if(_0x21ccc2(0x566)in _0x33e8ce&&_0x21ccc2(0x481)in _0x33e8ce&&Object[_0x21ccc2(0x2ac)](_0x33e8ce)[_0x21ccc2(0x503)]<=0x3){console[_0x21ccc2(0x273)](_0x182574+_0x1f9979(_0x1b9306[_0x21ccc2(0x50b)]+_0x1b9306[_0x21ccc2(0x1eb)],String(_0x33e8ce[_0x21ccc2(0x566)])));const _0x2ae18c=_0x33e8ce[_0x21ccc2(0x481)];if(_0x2ae18c&&typeof _0x2ae18c===_0x21ccc2(0x40d))_0x36c5d9(_0x2ae18c,_0x182574);else console[_0x21ccc2(0x273)](_0x182574+_0x1f9979(_0x1b9306['white'],String(_0x2ae18c)));return;}_0x36c5d9(_0x33e8ce,_0x182574);return;}console[_0x21ccc2(0x273)](_0x182574+_0x1f9979(_0x1b9306[_0x21ccc2(0x777)],String(_0x33e8ce)));}function _0x36c5d9(_0x2eb04a,_0x455570=''){const _0x156175=_0x2a2824,_0x593954=Object[_0x156175(0x62b)](_0x2eb04a);if(_0x593954[_0x156175(0x503)]===0x0){console['log'](_0x455570+_0x1f9979(_0x1b9306[_0x156175(0x260)],'{}'));return;}const _0x51c37b=Math[_0x156175(0x311)](0x1c,Math[_0x156175(0x270)](..._0x593954[_0x156175(0x626)](([_0x1383a1])=>_0x1383a1['length'])));for(const [_0x2167b6,_0x31889a]of _0x593954){const _0x4195c9=_0x1f9979(_0x1b9306[_0x156175(0x1eb)],_0x2167b6[_0x156175(0x619)](_0x51c37b));if(_0x31889a===null||_0x31889a===undefined)console[_0x156175(0x273)](_0x455570+_0x4195c9+'\x20\x20'+_0x1f9979(_0x1b9306[_0x156175(0x260)],'null'));else{if(typeof _0x31889a===_0x156175(0x40d)){const _0x46f352=JSON[_0x156175(0x72f)](_0x31889a);_0x46f352[_0x156175(0x503)]<=0x50?console[_0x156175(0x273)](_0x455570+_0x4195c9+'\x20\x20'+_0x1f9979(_0x1b9306[_0x156175(0x260)],_0x46f352)):(console[_0x156175(0x273)](_0x455570+_0x4195c9),_0x546c28(_0x31889a,_0x455570+'\x20\x20'));}else{const _0x242fee=typeof _0x31889a===_0x156175(0x6ff)?_0x1f9979(_0x31889a?_0x1b9306['green']:_0x1b9306['yellow'],String(_0x31889a)):typeof _0x31889a===_0x156175(0x6e3)?_0x1f9979(_0x1b9306['magenta'],String(_0x31889a)):_0x1f9979(_0x1b9306[_0x156175(0x777)],String(_0x31889a));console[_0x156175(0x273)](_0x455570+_0x4195c9+'\x20\x20'+_0x242fee);}}}}function _0xc3917b(_0x8d7a39,_0x57fee5=''){const _0x3babb5=_0x2a2824,_0x390fed=Math['min'](0x20,Math['max'](..._0x8d7a39['map'](_0x860151=>String(_0x860151[_0x3babb5(0x566)])['length'])));for(const {key:_0x49f9a4,value:_0xcfe819,score:_0x4286b1,clock:_0x32103c}of _0x8d7a39){const _0x54c10f=_0x1f9979(_0x1b9306[_0x3babb5(0x50b)]+_0x1b9306['cyan'],String(_0x49f9a4)[_0x3babb5(0x619)](_0x390fed)),_0x5201aa=_0xcfe819==null?_0x1f9979(_0x1b9306[_0x3babb5(0x260)],_0x3babb5(0x750)):typeof _0xcfe819===_0x3babb5(0x40d)?_0x1f9979(_0x1b9306[_0x3babb5(0x260)],JSON[_0x3babb5(0x72f)](_0xcfe819)):_0x1f9979(_0x1b9306[_0x3babb5(0x777)],String(_0xcfe819)),_0x468008=_0x4286b1!=null?_0x1f9979(_0x1b9306[_0x3babb5(0x195)],'\x20\x20score:'+_0x4286b1['toFixed'](0x4)):'',_0x373f05=_0x32103c!=null?_0x1f9979(_0x1b9306['gray'],_0x3babb5(0x444)+_0x32103c):'';console['log'](_0x57fee5+_0x54c10f+'\x20\x20'+_0x5201aa+_0x468008+_0x373f05);}}function _0x1e2a1b(_0x36396e,_0x3a6e71=''){const _0x355b09=_0x2a2824,_0x137c79=Math['min'](0x20,Math[_0x355b09(0x270)](..._0x36396e[_0x355b09(0x626)](_0x4f0b57=>_0x4f0b57['type']['length'])));for(const {type:_0x6a4a69,count:_0xc5c20a,fields:_0x53ac5e}of _0x36396e){if(_0x6a4a69[_0x355b09(0x637)]('~'))continue;const _0x24d9e1=_0x1f9979(_0x1b9306[_0x355b09(0x50b)]+_0x1b9306[_0x355b09(0x1eb)],_0x6a4a69[_0x355b09(0x619)](_0x137c79)),_0x1afcbb=_0x1f9979(_0x1b9306['magenta'],String(_0xc5c20a)[_0x355b09(0x2e7)](0x6))+_0x1f9979(_0x1b9306[_0x355b09(0x260)],_0x355b09(0x45e)),_0x1b0224=_0x53ac5e&&Object[_0x355b09(0x2ac)](_0x53ac5e)['length']?_0x1f9979(_0x1b9306[_0x355b09(0x260)],'\x20\x20·\x20'+Object[_0x355b09(0x2ac)](_0x53ac5e)[_0x355b09(0x5b8)](0x0,0x6)[_0x355b09(0x29f)](',\x20')+(Object[_0x355b09(0x2ac)](_0x53ac5e)[_0x355b09(0x503)]>0x6?'…':'')):'';console[_0x355b09(0x273)](_0x3a6e71+_0x24d9e1+'\x20\x20'+_0x1afcbb+_0x1b0224);}}const _0x2d6a1c=['types','type/','queue/',_0x2a2824(0x6ab),_0x2a2824(0x5ab),_0x2a2824(0x6f5)];function _0x10769f(_0x1e1b15,_0x5c9679){const _0x23f5a9=_0x2a2824;if(_0x1e1b15[_0x23f5a9(0x637)](_0x23f5a9(0x7a0)))return _0x1e1b15;if(_0x1e1b15[_0x23f5a9(0x637)]('/'))return _0x23f5a9(0x5fc)+_0x1e1b15;if(_0x1e1b15[_0x23f5a9(0x637)](_0x23f5a9(0x28f)))return _0x23f5a9(0x7a0)+_0x1e1b15;const _0x1ea877=_0x2d6a1c[_0x23f5a9(0x6ad)](_0x49306e=>_0x1e1b15===_0x49306e['replace'](/\/$/,'')||_0x1e1b15[_0x23f5a9(0x637)](_0x49306e));return _0x1ea877?_0x23f5a9(0x6fc)+_0x5c9679+'/'+_0x1e1b15:_0x23f5a9(0x7a0)+_0x1e1b15;}function _0x1d1c00(_0x47fea8){const _0xe363ef=_0x2a2824,_0x301345={},_0x43eb59=[];let _0x66082e=0x0;while(_0x66082e<_0x47fea8[_0xe363ef(0x503)]){if((_0x47fea8[_0x66082e]===_0xe363ef(0x5ce)||_0x47fea8[_0x66082e]==='-e')&&_0x47fea8[_0x66082e+0x1]&&!_0x47fea8[_0x66082e+0x1][_0xe363ef(0x637)]('-'))_0x301345[_0xe363ef(0x758)]=_0x47fea8[++_0x66082e];else _0x47fea8[_0x66082e]===_0xe363ef(0x355)||_0x47fea8[_0x66082e]==='-h'?_0x301345[_0xe363ef(0x3f2)]=!![]:_0x43eb59['push'](_0x47fea8[_0x66082e]);_0x66082e++;}return{'flags':_0x301345,'rest':_0x43eb59};}const _0x217846={'system':_0x2a2824(0x5d3),'envs':_0x2a2824(0x3b3),'types':_0x2a2824(0x2b0),'data':_0x2a2824(0x353),'indexes':'Indexes','fts':_0x2a2824(0x1a4),'sync':_0x2a2824(0x773),'queue':'Queue','files':_0x2a2824(0x45a),'embeddings':_0x2a2824(0x4eb),'engines':_0x2a2824(0x337),'admin':_0x2a2824(0x277),'event':_0x2a2824(0x681),'processor':'Processors'},_0x30c13c=[_0x2a2824(0x2ad),_0x2a2824(0x364),_0x2a2824(0x4fc),_0x2a2824(0x6af),'indexes',_0x2a2824(0x4ee),_0x2a2824(0x317),_0x2a2824(0x708),'files',_0x2a2824(0x61e),'engines','admin'];function _0x45e8c1(_0x30e662){const _0x1f6156=_0x2a2824;return _0x30e662[_0x1f6156(0x18e)](/^\/api/,'')[_0x1f6156(0x18e)](/^\[\/env\/:env=[^\]]*\]/,'[env]')['replace'](/^\/env\/:env/,_0x1f6156(0x4b9))[_0x1f6156(0x18e)](/^\//,'');}function _0x6d3537(_0x4dfc76,_0x42508f=''){const _0x88a95d=_0x2a2824,_0x4f627e=_0x4dfc76[_0x88a95d(0x635)][_0x88a95d(0x4a0)]()['filter'](_0x9a4346=>!_0x9a4346[_0x88a95d(0x58a)]?.[_0x88a95d(0x3ea)]),_0x152259=_0x42508f?_0x4f627e[_0x88a95d(0x1ff)](_0x35d914=>_0x35d914['path'][_0x88a95d(0x4ff)]()['includes'](_0x42508f[_0x88a95d(0x4ff)]())||(_0x5c39e7(_0x35d914)??'')['toLowerCase']()[_0x88a95d(0x1dc)](_0x42508f[_0x88a95d(0x4ff)]())||_0x5ba79a(_0x35d914)['some'](_0xd077e1=>_0xd077e1[_0x88a95d(0x4ff)]()[_0x88a95d(0x1dc)](_0x42508f[_0x88a95d(0x4ff)]()))):_0x4f627e;if(!_0x152259[_0x88a95d(0x503)]){console['log'](_0x1f9979(_0x1b9306[_0x88a95d(0x6a1)],'\x0a\x20\x20No\x20routes\x20matching\x20\x22'+_0x42508f+'\x22\x0a'));return;}const _0x4f742b=new Map();for(const _0x4d2718 of _0x152259){const _0x296c76=_0x5ba79a(_0x4d2718)[0x0]??_0x88a95d(0x61b);if(!_0x4f742b[_0x88a95d(0x52e)](_0x296c76))_0x4f742b[_0x88a95d(0x36f)](_0x296c76,[]);_0x4f742b['get'](_0x296c76)['push'](_0x4d2718);}const _0x50f4cf=[..._0x30c13c[_0x88a95d(0x1ff)](_0x509f6e=>_0x4f742b['has'](_0x509f6e)),...[..._0x4f742b[_0x88a95d(0x2ac)]()]['filter'](_0x1d1d39=>!_0x30c13c[_0x88a95d(0x1dc)](_0x1d1d39))];console['log']('');for(const _0x487041 of _0x50f4cf){const _0x546eac=_0x4f742b[_0x88a95d(0x3e6)](_0x487041);if(!_0x546eac?.[_0x88a95d(0x503)])continue;console[_0x88a95d(0x273)](_0x1f9979(_0x1b9306[_0x88a95d(0x50b)],'\x20\x20'+(_0x217846[_0x487041]??_0x487041)));for(const _0x21006d of _0x546eac){const _0x389c4e=_0x1f9979(_0x1b9306[_0x88a95d(0x651)],_0x21006d[_0x88a95d(0x5e0)][_0x88a95d(0x619)](0x7)),_0x4af2b9=_0x1f9979(_0x1b9306[_0x88a95d(0x1eb)],_0x45e8c1(_0x21006d['path'])),_0x336416=_0x5c39e7(_0x21006d)?_0x1f9979(_0x1b9306[_0x88a95d(0x260)],'\x20\x20'+_0x5c39e7(_0x21006d)):'',_0x385540=_0x21006d[_0x88a95d(0x71e)]?.['id']?_0x1f9979(_0x1b9306[_0x88a95d(0x195)],_0x88a95d(0x736)+_0x21006d[_0x88a95d(0x71e)]['id']+']'):'';console[_0x88a95d(0x273)]('\x20\x20\x20\x20'+_0x389c4e+'\x20'+_0x4af2b9+_0x336416+_0x385540);}console[_0x88a95d(0x273)]('');}}function _0x682161(_0x372da7,_0x2d4376){const _0x4290f6=_0x2a2824,_0x1a809b=_0x2d4376[_0x4290f6(0x18e)](/^\/api(\/env\/[^/]+)?\//,'')['split']('/')[0x0],_0x3159f4=_0x372da7[_0x4290f6(0x635)][_0x4290f6(0x4a0)]()[_0x4290f6(0x1ff)](_0x559fdc=>_0x559fdc[_0x4290f6(0x624)]['toLowerCase']()[_0x4290f6(0x1dc)](_0x1a809b[_0x4290f6(0x4ff)]()));if(!_0x3159f4['length']){console['log'](_0x1f9979(_0x1b9306[_0x4290f6(0x6a1)],_0x4290f6(0x419)+_0x2d4376+'\x0a'));return;}console[_0x4290f6(0x273)]('');for(const _0x170ed7 of _0x3159f4['slice'](0x0,0xc)){for(const _0x12a322 of _0x2ddbbf(_0x170ed7)){console[_0x4290f6(0x273)](_0x12a322);}console[_0x4290f6(0x273)]('');}}function _0x5c39e7(_0x5a3976){const _0x116ccd=_0x2a2824;return _0x5a3976[_0x116ccd(0x71e)]?.['summary']??_0x5a3976[_0x116ccd(0x58a)]?.[_0x116ccd(0x2d5)]??'';}function _0x103851(_0x5f56fb){const _0x10fc80=_0x2a2824;return _0x5f56fb['operation']?.[_0x10fc80(0x373)]??_0x5f56fb[_0x10fc80(0x58a)]?.['description']??'';}function _0x5ba79a(_0x3dd30f){const _0x122156=_0x2a2824;return _0x3dd30f[_0x122156(0x71e)]?.[_0x122156(0x4d7)]?.['length']?_0x3dd30f[_0x122156(0x71e)][_0x122156(0x4d7)]:_0x3dd30f[_0x122156(0x58a)]?.['tags']??[];}function _0x2ddbbf(_0x48f4b9){const _0x158b2c=_0x2a2824,_0x32ccec=[];_0x32ccec['push']('\x20\x20'+_0x1f9979(_0x1b9306[_0x158b2c(0x50b)]+_0x1b9306[_0x158b2c(0x651)],_0x48f4b9['method'][_0x158b2c(0x619)](0x7))+'\x20'+_0x1f9979(_0x1b9306[_0x158b2c(0x50b)]+_0x1b9306['cyan'],_0x48f4b9['path']));_0x48f4b9[_0x158b2c(0x71e)]?.['id']&&_0x32ccec['push'](_0x158b2c(0x6ce)+_0x1f9979(_0x1b9306['gray'],_0x158b2c(0x5f4)+_0x48f4b9[_0x158b2c(0x71e)]['id']));_0x5c39e7(_0x48f4b9)&&_0x32ccec[_0x158b2c(0x387)](_0x158b2c(0x6ce)+_0x1f9979(_0x1b9306[_0x158b2c(0x777)],_0x5c39e7(_0x48f4b9)));_0x103851(_0x48f4b9)&&_0x32ccec['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1f9979(_0x1b9306[_0x158b2c(0x260)],_0x103851(_0x48f4b9)));_0x5ba79a(_0x48f4b9)[_0x158b2c(0x503)]&&_0x32ccec[_0x158b2c(0x387)](_0x158b2c(0x6ce)+_0x1f9979(_0x1b9306[_0x158b2c(0x195)],_0x158b2c(0x75e)+_0x5ba79a(_0x48f4b9)[_0x158b2c(0x29f)](',\x20')));_0x48f4b9['operation']?.[_0x158b2c(0x217)]?.['access']&&_0x32ccec[_0x158b2c(0x387)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1f9979(_0x1b9306['gray'],'access:\x20'+_0x48f4b9[_0x158b2c(0x71e)][_0x158b2c(0x217)][_0x158b2c(0x28d)]));_0x48f4b9[_0x158b2c(0x71e)]?.[_0x158b2c(0x635)]?.[_0x158b2c(0x240)]&&_0x48f4b9[_0x158b2c(0x71e)][_0x158b2c(0x635)][_0x158b2c(0x240)]!=='standard'&&_0x32ccec[_0x158b2c(0x387)](_0x158b2c(0x6ce)+_0x1f9979(_0x1b9306['gray'],_0x158b2c(0x694)+_0x48f4b9[_0x158b2c(0x71e)][_0x158b2c(0x635)][_0x158b2c(0x240)]));if(_0x48f4b9[_0x158b2c(0x71e)]?.[_0x158b2c(0x484)]){const _0x51bac2=Object[_0x158b2c(0x2ac)](_0x48f4b9[_0x158b2c(0x71e)][_0x158b2c(0x484)][_0x158b2c(0x5f7)]||{});if(_0x51bac2[_0x158b2c(0x503)])_0x32ccec['push'](_0x158b2c(0x6ce)+_0x1f9979(_0x1b9306['gray'],_0x158b2c(0x44f)+_0x51bac2['join'](',\x20')));}return _0x48f4b9[_0x158b2c(0x58a)]?.[_0x158b2c(0x505)]&&_0x32ccec[_0x158b2c(0x387)](_0x158b2c(0x6ce)+_0x1f9979(_0x1b9306['gray'],_0x158b2c(0x63b)+JSON['stringify'](_0x48f4b9[_0x158b2c(0x58a)]['body']))),_0x32ccec;}async function _0xc0723a(_0x1d931e,_0x3c2e2f,_0x9b4b16,_0x4b781f=null){const _0x45a319=_0x2a2824,_0x25a434=_0x9b4b16['indexOf']('?'),_0x5c7e47=_0x25a434>=0x0?_0x9b4b16[_0x45a319(0x5b8)](0x0,_0x25a434):_0x9b4b16,_0x34e6ca=_0x25a434>=0x0?_0x9b4b16[_0x45a319(0x5b8)](_0x25a434+0x1):'',_0x4d3103=Object[_0x45a319(0x6fe)](new URLSearchParams(_0x34e6ca)[_0x45a319(0x62b)]());return _0x1d931e[_0x45a319(0x635)][_0x45a319(0x435)](_0x3c2e2f,_0x5c7e47,{'body':_0x4b781f,'query':_0x4d3103,'headers':{'content-type':_0x45a319(0x44b)}},{'internal':!![]});}function _0x179112(_0x3d964f){const _0x499f8c=_0x2a2824;if(!_0x3d964f)return null;const _0x26263d=_0x3d964f[_0x499f8c(0x6f3)]();if(!_0x26263d)return null;try{return JSON[_0x499f8c(0x663)](_0x26263d);}catch{}try{return JSON[_0x499f8c(0x663)](_0x251578(_0x26263d));}catch(_0x23d0d3){throw new SyntaxError(_0x23d0d3['message'],{'cause':_0x23d0d3});}}function _0x251578(_0x1d2696){const _0x18d5e8=_0x2a2824;let _0x38440d='',_0x300246=0x0;while(_0x300246<_0x1d2696[_0x18d5e8(0x503)]){const _0x49fd92=_0x1d2696[_0x300246];if(_0x49fd92==='\x22'){_0x38440d+='\x22',_0x300246++;while(_0x300246<_0x1d2696[_0x18d5e8(0x503)]&&_0x1d2696[_0x300246]!=='\x22'){if(_0x1d2696[_0x300246]==='\x5c'){_0x38440d+=_0x1d2696[_0x300246++];if(_0x300246<_0x1d2696['length'])_0x38440d+=_0x1d2696[_0x300246++];}else _0x38440d+=_0x1d2696[_0x300246++];}_0x38440d+='\x22';if(_0x300246<_0x1d2696['length'])_0x300246++;continue;}if(_0x49fd92==='\x27'){_0x38440d+='\x22',_0x300246++;while(_0x300246<_0x1d2696[_0x18d5e8(0x503)]&&_0x1d2696[_0x300246]!=='\x27'){if(_0x1d2696[_0x300246]==='\x5c'&&_0x1d2696[_0x300246+0x1]==='\x27')_0x38440d+='\x27',_0x300246+=0x2;else _0x1d2696[_0x300246]==='\x22'?(_0x38440d+='\x5c\x22',_0x300246++):_0x38440d+=_0x1d2696[_0x300246++];}_0x38440d+='\x22';if(_0x300246<_0x1d2696[_0x18d5e8(0x503)])_0x300246++;continue;}if(_0x18d5e8(0x35d)['includes'](_0x49fd92)){_0x38440d+=_0x49fd92,_0x300246++;continue;}let _0x36e91c='';while(_0x300246<_0x1d2696[_0x18d5e8(0x503)]&&!_0x18d5e8(0x19d)[_0x18d5e8(0x1dc)](_0x1d2696[_0x300246])&&_0x1d2696[_0x300246]!=='\x20'&&_0x1d2696[_0x300246]!=='\x09'&&_0x1d2696[_0x300246]!=='\x0a'&&_0x1d2696[_0x300246]!=='\x0d'){_0x36e91c+=_0x1d2696[_0x300246++];}let _0xd3792e=_0x300246;while(_0xd3792e<_0x1d2696[_0x18d5e8(0x503)]&&(_0x1d2696[_0xd3792e]==='\x20'||_0x1d2696[_0xd3792e]==='\x09'))_0xd3792e++;if(_0x1d2696[_0xd3792e]===':')_0x38440d+='\x22'+_0x36e91c+'\x22';else _0x36e91c==='true'||_0x36e91c==='false'||_0x36e91c===_0x18d5e8(0x750)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x18d5e8(0x193)](_0x36e91c)?_0x38440d+=_0x36e91c:_0x38440d+='\x22'+_0x36e91c+'\x22';}return _0x38440d[_0x18d5e8(0x18e)](/,(\s*[}\]])/g,'$1');}function _0xa35b86(_0x5a6a95){const _0x16ea25=_0x2a2824,_0x45081e=[];let _0xf211f7=0x0;while(_0xf211f7<_0x5a6a95['length']){while(_0xf211f7<_0x5a6a95[_0x16ea25(0x503)]&&(_0x5a6a95[_0xf211f7]==='\x20'||_0x5a6a95[_0xf211f7]==='\x09'))_0xf211f7++;if(_0xf211f7>=_0x5a6a95[_0x16ea25(0x503)])break;const _0x43b112=_0x5a6a95[_0xf211f7];if(_0x43b112==='{'||_0x43b112==='['){const _0x22de9a=_0x43b112==='{'?'}':']',_0x195641=_0xf211f7++;let _0x27f4c5=0x1,_0x3efc1d=![],_0x3ea9e3='';while(_0xf211f7<_0x5a6a95[_0x16ea25(0x503)]&&_0x27f4c5>0x0){const _0x58932f=_0x5a6a95[_0xf211f7];if(_0x3efc1d){if(_0x58932f==='\x5c')_0xf211f7++;else{if(_0x58932f===_0x3ea9e3)_0x3efc1d=![];}}else{if(_0x58932f==='\x22'||_0x58932f==='\x27')_0x3efc1d=!![],_0x3ea9e3=_0x58932f;else{if(_0x58932f===_0x43b112)_0x27f4c5++;else{if(_0x58932f===_0x22de9a)_0x27f4c5--;}}}_0xf211f7++;}_0x45081e['push'](_0x5a6a95['slice'](_0x195641,_0xf211f7));continue;}if(_0x43b112==='\x22'||_0x43b112==='\x27'){const _0x2cac15=_0x43b112;_0xf211f7++;let _0x468907='';while(_0xf211f7<_0x5a6a95[_0x16ea25(0x503)]&&_0x5a6a95[_0xf211f7]!==_0x2cac15){if(_0x5a6a95[_0xf211f7]==='\x5c'&&_0xf211f7+0x1<_0x5a6a95['length'])_0xf211f7++,_0x468907+=_0x5a6a95[_0xf211f7++];else _0x468907+=_0x5a6a95[_0xf211f7++];}if(_0xf211f7<_0x5a6a95[_0x16ea25(0x503)])_0xf211f7++;_0x45081e[_0x16ea25(0x387)](_0x468907);continue;}let _0x1fc9f6='';while(_0xf211f7<_0x5a6a95[_0x16ea25(0x503)]&&_0x5a6a95[_0xf211f7]!=='\x20'&&_0x5a6a95[_0xf211f7]!=='\x09'&&_0x5a6a95[_0xf211f7]!=='{'&&_0x5a6a95[_0xf211f7]!=='['){_0x1fc9f6+=_0x5a6a95[_0xf211f7++];}if(_0x1fc9f6)_0x45081e['push'](_0x1fc9f6);}return _0x45081e;}function _0x497e68(_0x2d6c8e,_0x2fc060){const _0x37c412=_0x2a2824,_0x1fd280=[..._0x2d6c8e[_0x37c412(0x6ca)][_0x37c412(0x2ac)]()][_0x37c412(0x1ff)](_0x31ca52=>!_0x31ca52['startsWith']('~'));console[_0x37c412(0x273)](['',_0x1f9979(_0x1b9306['bold']+_0x1b9306['cyan'],_0x37c412(0x42d)),_0x1f9979(_0x1b9306[_0x37c412(0x50b)]+_0x1b9306[_0x37c412(0x1eb)],_0x37c412(0x57f))+_0x1f9979(_0x1b9306[_0x37c412(0x50b)],_0x37c412(0x3d2))+_0x1f9979(_0x1b9306[_0x37c412(0x50b)]+_0x1b9306[_0x37c412(0x1eb)],'║'),_0x1f9979(_0x1b9306[_0x37c412(0x50b)]+_0x1b9306[_0x37c412(0x1eb)],_0x37c412(0x264)),'','\x20\x20'+_0x1f9979(_0x1b9306[_0x37c412(0x3f7)],'✓')+'\x20'+_0x1f9979(_0x1b9306['bold'],_0x37c412(0x492))+_0x37c412(0x52f)+_0x2fc060[_0x37c412(0x5f6)],..._0x2fc060[_0x37c412(0x598)]>0x1?['\x20\x20'+_0x1f9979(_0x1b9306[_0x37c412(0x3f7)],'✓')+'\x20'+_0x1f9979(_0x1b9306[_0x37c412(0x50b)],_0x37c412(0x3a6))+'\x20'+_0x2fc060[_0x37c412(0x598)]+'\x20HTTP\x20workers\x20'+_0x1f9979(_0x1b9306[_0x37c412(0x195)],_0x37c412(0x329))]:[],'\x20\x20'+_0x1f9979(_0x1b9306[_0x37c412(0x3f7)],'✓')+'\x20'+_0x1f9979(_0x1b9306[_0x37c412(0x50b)],_0x37c412(0x24f))+'\x20\x20\x20\x20\x20http://localhost:'+_0x2fc060[_0x37c412(0x5f6)]+_0x37c412(0x5fc),'\x20\x20'+_0x1f9979(_0x1b9306[_0x37c412(0x3f7)],'✓')+'\x20'+_0x1f9979(_0x1b9306[_0x37c412(0x50b)],_0x37c412(0x624))+_0x37c412(0x583)+_0x2fc060[_0x37c412(0x28e)],'\x20\x20'+_0x1f9979(_0x1b9306[_0x37c412(0x3f7)],'✓')+'\x20'+_0x1f9979(_0x1b9306['bold'],'id')+_0x37c412(0x643)+_0x1f9979(_0x1b9306[_0x37c412(0x195)],_0x2d6c8e['id']),'\x20\x20'+_0x1f9979(_0x1b9306[_0x37c412(0x3f7)],'✓')+'\x20'+_0x1f9979(_0x1b9306['bold'],_0x37c412(0x364))+_0x37c412(0x583)+_0x1fd280[_0x37c412(0x626)](_0x2ed69d=>_0x1f9979(_0x1b9306[_0x37c412(0x1eb)],_0x2ed69d))['join']('\x20\x20'),..._0x2fc060[_0x37c412(0x6b6)]?[]:['\x20\x20'+_0x1f9979(_0x1b9306['green'],'✓')+'\x20'+_0x1f9979(_0x1b9306[_0x37c412(0x50b)],_0x37c412(0x4f4))+'\x20\x20\x20http://localhost:'+_0x2fc060[_0x37c412(0x5f6)]+_0x37c412(0x7a5)],'',_0x1f9979(_0x1b9306[_0x37c412(0x260)],'\x20\x20Type\x20'+_0x1f9979(_0x1b9306[_0x37c412(0x50b)],_0x37c412(0x3f2))+_0x37c412(0x574)+_0x1f9979(_0x1b9306[_0x37c412(0x50b)],_0x37c412(0x654))+_0x37c412(0x283)+_0x1f9979(_0x1b9306[_0x37c412(0x50b)],_0x37c412(0x393))+_0x37c412(0x287)),''][_0x37c412(0x29f)]('\x0a'));}function _0x411453(_0x2e8729){const _0x22bafd=_0x2a2824;console[_0x22bafd(0x273)]('\x0a'+_0x1f9979(_0x1b9306[_0x22bafd(0x50b)],_0x22bafd(0x6d5))+'\x20\x20'+_0x1f9979(_0x1b9306[_0x22bafd(0x260)],'—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected')+'\x0a\x0a\x20\x20'+_0x1f9979(_0x1b9306['cyan'],_0x22bafd(0x2a4))+_0x22bafd(0x58e)+_0x1f9979(_0x1b9306[_0x22bafd(0x1eb)],'<path>')+'\x20'+_0x1f9979(_0x1b9306[_0x22bafd(0x6a1)],_0x22bafd(0x371))+_0x22bafd(0x738)+_0x1f9979(_0x1b9306[_0x22bafd(0x1eb)],_0x22bafd(0x31c))+'\x20'+_0x1f9979(_0x1b9306['cyan'],'<path>')+'\x20'+_0x1f9979(_0x1b9306['yellow'],_0x22bafd(0x1b8))+_0x22bafd(0x5c1)+_0x1f9979(_0x1b9306[_0x22bafd(0x260)],_0x22bafd(0x26d))+_0x22bafd(0x742)+_0x1f9979(_0x1b9306[_0x22bafd(0x195)],_0x22bafd(0x77a))+_0x22bafd(0x2e1)+_0x1f9979(_0x1b9306['gray'],'envs')+_0x22bafd(0x5e2)+_0x1f9979(_0x1b9306[_0x22bafd(0x195)],_0x22bafd(0x4fc))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/'+_0x2e8729[_0x22bafd(0x758)]+_0x22bafd(0x75c)+_0x1f9979(_0x1b9306[_0x22bafd(0x195)],_0x22bafd(0x257))+_0x22bafd(0x1cb)+_0x2e8729[_0x22bafd(0x758)]+_0x22bafd(0x1bb)+_0x1f9979(_0x1b9306['gray'],_0x22bafd(0x68c))+_0x22bafd(0x1e7)+_0x2e8729['env']+_0x22bafd(0x3e4)+_0x1f9979(_0x1b9306[_0x22bafd(0x195)],'type/users/query\x20{\x22active\x22:true}')+'\x20→\x20POST\x20/api/env/'+_0x2e8729[_0x22bafd(0x758)]+_0x22bafd(0x60b)+_0x1f9979(_0x1b9306[_0x22bafd(0x195)],'PUT\x20type/users/item/x\x20{\x22n\x22:1}')+_0x22bafd(0x742)+_0x1f9979(_0x1b9306[_0x22bafd(0x195)],_0x22bafd(0x5d1))+'\x0a\x20\x20\x20\x20'+_0x1f9979(_0x1b9306['gray'],_0x22bafd(0x51a))+_0x22bafd(0x42f)+_0x1f9979(_0x1b9306['bold'],'\x20\x20Flags')+'\x20\x20'+_0x1f9979(_0x1b9306[_0x22bafd(0x260)],_0x22bafd(0x790))+'\x0a\x0a\x20\x20'+_0x1f9979(_0x1b9306[_0x22bafd(0x1eb)],'--env\x20<name>')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20'+_0x1f9979(_0x1b9306[_0x22bafd(0x1eb)],'--help')+_0x22bafd(0x45d)+_0x1f9979(_0x1b9306['dim'],_0x22bafd(0x26d))+'\x0a\x20\x20\x20\x20'+_0x1f9979(_0x1b9306[_0x22bafd(0x195)],_0x22bafd(0x4ae))+_0x22bafd(0x742)+_0x1f9979(_0x1b9306[_0x22bafd(0x195)],_0x22bafd(0x783))+_0x22bafd(0x742)+_0x1f9979(_0x1b9306[_0x22bafd(0x195)],_0x22bafd(0x1a6))+'\x0a\x0a'+_0x1f9979(_0x1b9306[_0x22bafd(0x50b)],_0x22bafd(0x675))+'\x0a\x0a\x20\x20'+_0x1f9979(_0x1b9306[_0x22bafd(0x1eb)],'use\x20<env>')+_0x22bafd(0x1c7)+_0x1f9979(_0x1b9306[_0x22bafd(0x1eb)],_0x22bafd(0x758))+_0x22bafd(0x754)+_0x1f9979(_0x1b9306[_0x22bafd(0x1eb)],_0x22bafd(0x654))+'\x20'+_0x1f9979(_0x1b9306[_0x22bafd(0x260)],_0x22bafd(0x3f9))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20'+_0x1f9979(_0x1b9306[_0x22bafd(0x1eb)],_0x22bafd(0x308))+'\x20'+_0x1f9979(_0x1b9306[_0x22bafd(0x260)],_0x22bafd(0x2ae))+'\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20'+_0x1f9979(_0x1b9306[_0x22bafd(0x1eb)],_0x22bafd(0x1bc))+_0x22bafd(0x4e7)+_0x1f9979(_0x1b9306[_0x22bafd(0x1eb)],'help')+_0x22bafd(0x4de)+_0x1f9979(_0x1b9306[_0x22bafd(0x1eb)],_0x22bafd(0x393))+'\x20'+_0x1f9979(_0x1b9306[_0x22bafd(0x260)],_0x22bafd(0x5f5))+'\x20\x20\x20\x20graceful\x20shutdown\x0a');}let _0x5a9a33=![];async function _0x1cfc4d(_0x346f4f,_0x5a904d=0x0,_0x1bbcda=null){const _0x1e6399=_0x2a2824;_0x5a9a33&&(process[_0x1e6399(0x556)][_0x1e6399(0x6cc)](_0x1f9979(_0x1b9306[_0x1e6399(0x482)],'\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a')),process[_0x1e6399(0x393)](0x82));_0x5a9a33=!![],process[_0x1e6399(0x3f5)]['write']('\x0a'),process[_0x1e6399(0x556)][_0x1e6399(0x6cc)](_0x1f9979(_0x1b9306['yellow'],'\x20\x20[okdb]\x20'+(_0x1bbcda?_0x1e6399(0x412)+_0x1bbcda+',\x20':'')+_0x1e6399(0x5fe)));const _0xbdf76e=setTimeout(()=>{const _0xcdbf9=_0x1e6399;process[_0xcdbf9(0x556)][_0xcdbf9(0x6cc)](_0x1f9979(_0x1b9306[_0xcdbf9(0x482)],_0xcdbf9(0x43c))),process['exit'](0x1);},0x1388);try{await _0x346f4f[_0x1e6399(0x543)]();}catch(_0x51150e){console['error'](_0x1f9979(_0x1b9306['red'],'\x20\x20'+_0x51150e[_0x1e6399(0x1e0)]));}clearTimeout(_0xbdf76e),process['stderr'][_0x1e6399(0x6cc)](_0x1f9979(_0x1b9306['dim'],_0x1e6399(0x3d8))),process['exit'](_0x5a904d);}function _0x43cde5(_0x50a432){const _0x397fb0=_0x2a2824,_0x4e8da0=_0x50a432[_0x397fb0(0x758)]!=='default'?_0x1f9979(_0x1b9306[_0x397fb0(0x6a1)],'['+_0x50a432[_0x397fb0(0x758)]+']'):'';return _0x1f9979(_0x1b9306['bold']+_0x1b9306[_0x397fb0(0x1eb)],_0x397fb0(0x784))+_0x4e8da0+_0x1f9979(_0x1b9306['gray'],'>\x20');}const _0x563be7=new Set(['GET',_0x2a2824(0x48d),_0x2a2824(0x48f),_0x2a2824(0x652),_0x2a2824(0x2ec)]);async function _0x5216df(_0x4b4bf9,_0x4d0e81,_0x4493ab,_0x144245,_0x39059d,_0x42f5ad){const _0x9c2672=_0x2a2824;_0x4b4bf9=_0x4b4bf9['trim']();if(!_0x4b4bf9||_0x4b4bf9['startsWith']('#'))return;const _0x9b8a67=_0xa35b86(_0x4b4bf9),{flags:_0x1f665b,rest:_0x564366}=_0x1d1c00(_0x9b8a67);if(!_0x564366['length'])return;const _0x2804cf=_0x564366[0x0],_0x1b4d86=_0x2804cf[_0x9c2672(0x575)]();if(_0x1b4d86===_0x9c2672(0x216)){if(_0x564366[0x1])_0x682161(_0x4d0e81,_0x10769f(_0x564366[0x1],_0x1f665b[_0x9c2672(0x758)]??_0x39059d[_0x9c2672(0x758)]));else _0x411453(_0x39059d);return;}if(_0x1b4d86===_0x9c2672(0x69f)){const _0x1b03f4=_0x564366[0x1];if(!_0x1b03f4){console[_0x9c2672(0x273)](_0x1f9979(_0x1b9306[_0x9c2672(0x482)],_0x9c2672(0x55b)));return;}try{_0x4d0e81[_0x9c2672(0x758)](_0x1b03f4),_0x39059d[_0x9c2672(0x758)]=_0x1b03f4,_0x42f5ad?.['setPrompt'](_0x43cde5(_0x39059d)),console['log'](_0x9c2672(0x608)+_0x1f9979(_0x1b9306[_0x9c2672(0x3f7)],'✓')+_0x9c2672(0x75b)+_0x1f9979(_0x1b9306[_0x9c2672(0x50b)]+_0x1b9306[_0x9c2672(0x1eb)],_0x1b03f4)+'\x0a');}catch{console[_0x9c2672(0x273)](_0x9c2672(0x608)+_0x1f9979(_0x1b9306[_0x9c2672(0x482)],'✗')+'\x20environment\x20'+_0x1f9979(_0x1b9306[_0x9c2672(0x50b)],_0x1b03f4)+_0x9c2672(0x4cb)+_0x1f9979(_0x1b9306[_0x9c2672(0x260)],_0x9c2672(0x463)));}return;}if(_0x1b4d86===_0x9c2672(0x5d4)){const _0x1350b5=[..._0x4d0e81['_envs'][_0x9c2672(0x2ac)]()][_0x9c2672(0x1ff)](_0x4daca8=>!_0x4daca8[_0x9c2672(0x637)]('~'));console['log']('');for(const _0x1c4527 of _0x1350b5){const _0x2f9601=_0x1c4527===_0x39059d[_0x9c2672(0x758)];console[_0x9c2672(0x273)]('\x20\x20'+(_0x2f9601?_0x1f9979(_0x1b9306[_0x9c2672(0x3f7)],'●'):_0x1f9979(_0x1b9306[_0x9c2672(0x260)],'○'))+'\x20\x20'+(_0x2f9601?_0x1f9979(_0x1b9306[_0x9c2672(0x50b)]+_0x1b9306[_0x9c2672(0x1eb)],_0x1c4527):_0x1f9979(_0x1b9306[_0x9c2672(0x260)],_0x1c4527)));}console[_0x9c2672(0x273)](_0x9c2672(0x608)+_0x1f9979(_0x1b9306['dim'],_0x9c2672(0x46a))+'\x20'+_0x1f9979(_0x1b9306[_0x9c2672(0x1eb)],_0x39059d[_0x9c2672(0x758)])),console['log']('');return;}if(_0x1b4d86===_0x9c2672(0x452)){const _0x5419c9=[..._0x4d0e81[_0x9c2672(0x6ca)][_0x9c2672(0x397)]()][_0x9c2672(0x1ff)](_0xf41402=>!_0xf41402[_0x9c2672(0x378)]['startsWith']('~'));console[_0x9c2672(0x273)]('');const _0x5ba65a=Math['max'](..._0x5419c9['map'](_0x1d0317=>_0x1d0317[_0x9c2672(0x378)][_0x9c2672(0x503)]));for(const _0x22ddc4 of _0x5419c9){const _0x370843=_0x22ddc4[_0x9c2672(0x378)]===_0x39059d[_0x9c2672(0x758)],_0x5b8dba=_0x370843?_0x1f9979(_0x1b9306[_0x9c2672(0x3f7)],'●'):_0x1f9979(_0x1b9306['dim'],'○'),_0x4eddd2=_0x370843?_0x1f9979(_0x1b9306[_0x9c2672(0x50b)]+_0x1b9306[_0x9c2672(0x1eb)],_0x22ddc4[_0x9c2672(0x378)][_0x9c2672(0x619)](_0x5ba65a)):_0x1f9979(_0x1b9306[_0x9c2672(0x260)],_0x22ddc4[_0x9c2672(0x378)][_0x9c2672(0x619)](_0x5ba65a)),_0x342386=[..._0x22ddc4['typeSubDbs'][_0x9c2672(0x2ac)]()]['filter'](_0x2d9395=>!_0x2d9395[_0x9c2672(0x637)]('~')),_0x43b35a=_0x342386[_0x9c2672(0x503)]?_0x1f9979(_0x1b9306[_0x9c2672(0x260)],_0x342386['slice'](0x0,0x5)[_0x9c2672(0x29f)](',\x20')+(_0x342386['length']>0x5?'\x20\x20+'+(_0x342386[_0x9c2672(0x503)]-0x5)+_0x9c2672(0x404):'')):_0x1f9979(_0x1b9306[_0x9c2672(0x260)],_0x9c2672(0x345));console[_0x9c2672(0x273)]('\x20\x20'+_0x5b8dba+'\x20\x20'+_0x4eddd2+'\x20\x20'+_0x43b35a);}console[_0x9c2672(0x273)]('');return;}if(_0x1b4d86===_0x9c2672(0x39b)){const _0x24f1b5=_0x1f665b[_0x9c2672(0x758)]??_0x564366[0x1]??_0x39059d[_0x9c2672(0x758)];try{const _0x5f488e=_0x4d0e81[_0x9c2672(0x758)](_0x24f1b5),_0x2dbd9d=[..._0x5f488e['typeSubDbs'][_0x9c2672(0x2ac)]()]['filter'](_0x2f14db=>!_0x2f14db['startsWith']('~'))[_0x9c2672(0x788)]();console[_0x9c2672(0x273)](_0x9c2672(0x608)+_0x1f9979(_0x1b9306[_0x9c2672(0x260)],_0x2dbd9d[_0x9c2672(0x503)]+_0x9c2672(0x66f)+(_0x2dbd9d[_0x9c2672(0x503)]!==0x1?'s':'')+'\x20in\x20'+_0x24f1b5));for(const _0x3259d6 of _0x2dbd9d){const _0x51bd64=_0x5f488e[_0x9c2672(0x71b)][_0x9c2672(0x3e6)](_0x3259d6),_0x5eb0c6=_0x51bd64?.[_0x9c2672(0x6af)]?.[_0x9c2672(0x4df)]?.()??0x0,_0x1e10a7=_0x1f9979(_0x1b9306[_0x9c2672(0x50b)]+_0x1b9306[_0x9c2672(0x1eb)],_0x3259d6[_0x9c2672(0x619)](0x1c));console[_0x9c2672(0x273)](_0x9c2672(0x583)+_0x1e10a7+'\x20\x20'+_0x1f9979(_0x1b9306[_0x9c2672(0x651)],String(_0x5eb0c6)[_0x9c2672(0x2e7)](0x6))+'\x20'+_0x1f9979(_0x1b9306[_0x9c2672(0x260)],_0x9c2672(0x712)));}console[_0x9c2672(0x273)]('');}catch(_0x4a13b1){console[_0x9c2672(0x5b7)](_0x1f9979(_0x1b9306['red'],_0x9c2672(0x608)+_0x4a13b1[_0x9c2672(0x1e0)]+'\x0a'));}return;}if(_0x1b4d86===_0x9c2672(0x2bb)){_0x6d3537(_0x4d0e81,_0x564366['slice'](0x1)['join']('\x20'));return;}if(_0x1b4d86===_0x9c2672(0x631)){const _0x10b975=(_0x564366[0x1]??'')[_0x9c2672(0x4ff)]();if(!_0x10b975||_0x10b975==='on')_0x144245[_0x9c2672(0x40c)]=!![],_0x144245[_0x9c2672(0x3f4)]=_0x9c2672(0x77a),console[_0x9c2672(0x273)](_0x9c2672(0x608)+_0x1f9979(_0x1b9306[_0x9c2672(0x3f7)],'✓')+_0x9c2672(0x5db)+_0x1f9979(_0x1b9306['dim'],'level:\x20info')+'\x0a');else{if(_0x10b975===_0x9c2672(0x77f))_0x144245[_0x9c2672(0x40c)]=![],console[_0x9c2672(0x273)](_0x9c2672(0x608)+_0x1f9979(_0x1b9306[_0x9c2672(0x6a1)],'○')+'\x20logs\x20off\x0a');else _0x2adb06[_0x10b975]!==undefined?(_0x144245['enabled']=!![],_0x144245[_0x9c2672(0x3f4)]=_0x10b975,console[_0x9c2672(0x273)](_0x9c2672(0x608)+_0x1f9979(_0x1b9306[_0x9c2672(0x3f7)],'✓')+_0x9c2672(0x384)+_0x1f9979(_0x1b9306[_0x9c2672(0x50b)],_0x10b975)+'\x0a')):console[_0x9c2672(0x5b7)](_0x1f9979(_0x1b9306[_0x9c2672(0x482)],_0x9c2672(0x451)));}return;}if(_0x1b4d86===_0x9c2672(0x6d0)||_0x1b4d86===_0x9c2672(0x3db)){await _0x1cfc4d(_0x4d0e81,0x0);return;}if(_0x1b4d86==='OPEN'){const _0x5eb564=_0x9c2672(0x1ac)+_0x4493ab[_0x9c2672(0x5f6)]+_0x9c2672(0x7a5),_0x1af210=process['platform']===_0x9c2672(0x293)?_0x9c2672(0x693)+_0x5eb564:process[_0x9c2672(0x3a3)]==='darwin'?_0x9c2672(0x678)+_0x5eb564:'xdg-open\x20'+_0x5eb564;require$$4[_0x9c2672(0x2b9)](_0x1af210),console[_0x9c2672(0x273)]('\x0a\x20\x20'+_0x1f9979(_0x1b9306['green'],'✓')+_0x9c2672(0x780)+_0x1f9979(_0x1b9306[_0x9c2672(0x1eb)],_0x5eb564)+'\x0a');return;}let _0xd2b9d4,_0x2f9da3,_0x201631;if(_0x563be7[_0x9c2672(0x52e)](_0x1b4d86)){_0xd2b9d4=_0x1b4d86,_0x2f9da3=_0x564366[0x1],_0x201631=_0x564366[_0x9c2672(0x5b8)](0x2);if(!_0x2f9da3){console[_0x9c2672(0x5b7)](_0x1f9979(_0x1b9306[_0x9c2672(0x482)],_0x9c2672(0x540)+_0x2804cf+_0x9c2672(0x30e)));return;}}else _0xd2b9d4=null,_0x2f9da3=_0x564366[0x0],_0x201631=_0x564366['slice'](0x1);const _0x48b676=_0x1f665b['env']??_0x39059d[_0x9c2672(0x758)],_0x2654a3=_0x10769f(_0x2f9da3,_0x48b676);if(_0x1f665b[_0x9c2672(0x3f2)]){_0x682161(_0x4d0e81,_0x2654a3);return;}let _0x25ea3d=null;if(_0x201631['length']){const _0x43f420=_0x201631[_0x9c2672(0x29f)]('\x20');try{_0x25ea3d=_0x179112(_0x43f420);}catch(_0x56ec0f){console[_0x9c2672(0x5b7)](_0x1f9979(_0x1b9306['red'],_0x9c2672(0x5d8)+_0x43f420+_0x9c2672(0x608)+_0x1f9979(_0x1b9306['dim'],_0x56ec0f['message'])+'\x0a'));return;}}if(!_0xd2b9d4)_0xd2b9d4=_0x25ea3d!==null?_0x9c2672(0x48d):_0x9c2672(0x51c);try{const _0x526a70=await _0xc0723a(_0x4d0e81,_0xd2b9d4,_0x2654a3,_0x25ea3d);_0x156cf5(_0x526a70[_0x9c2672(0x7a3)],_0x526a70[_0x9c2672(0x505)]);}catch(_0x3e4ad4){console[_0x9c2672(0x5b7)]('\x0a\x20\x20'+_0x1f9979(_0x1b9306[_0x9c2672(0x482)],'✗')+'\x20'+_0x3e4ad4[_0x9c2672(0x1e0)]+'\x0a');}}class _0x336a7c{constructor(){const _0x9ac6fe=_0x2a2824;this[_0x9ac6fe(0x201)]=new Map(),this['dynamic']=null,this['terminal']=![];}}function _0x5b09d0(_0x701dcf){const _0x2783ce=_0x2a2824,_0x2815f2=new _0x336a7c();for(const _0x49e0e0 of _0x701dcf){if(_0x49e0e0[_0x2783ce(0x58a)]?.[_0x2783ce(0x3ea)])continue;const _0x2dacee=_0x49e0e0[_0x2783ce(0x624)][_0x2783ce(0x18e)](/^\/api/,'')['replace'](/^\[\/env\/:env=[^\]]*\]/,'')[_0x2783ce(0x18e)](/^\//,'');if(!_0x2dacee)continue;let _0x39c6cd=_0x2815f2;for(const _0x42464d of _0x2dacee[_0x2783ce(0x3d5)]('/')[_0x2783ce(0x1ff)](Boolean)){if(_0x42464d[_0x2783ce(0x637)](':')){const _0x1c218b=_0x42464d[_0x2783ce(0x5b8)](0x1);if(!_0x39c6cd['dynamic'])_0x39c6cd[_0x2783ce(0x62f)]={'param':_0x1c218b,'node':new _0x336a7c()};_0x39c6cd=_0x39c6cd[_0x2783ce(0x62f)]['node'];}else{if(!_0x39c6cd[_0x2783ce(0x201)][_0x2783ce(0x52e)](_0x42464d))_0x39c6cd[_0x2783ce(0x201)][_0x2783ce(0x36f)](_0x42464d,new _0x336a7c());_0x39c6cd=_0x39c6cd[_0x2783ce(0x201)][_0x2783ce(0x3e6)](_0x42464d);}}_0x39c6cd[_0x2783ce(0x533)]=!![];}return _0x2815f2;}const _0x1257a3=new Map();function _0x3562d9(_0x52ea40,_0x19034d,_0x24c8dc){const _0x3708cb=_0x2a2824,_0x2f448a=_0x1257a3['get'](_0x52ea40);if(_0x2f448a&&_0x2f448a[_0x3708cb(0x79c)]>Date[_0x3708cb(0x6fd)]())return _0x2f448a[_0x3708cb(0x519)];const _0x50dc10=_0x24c8dc();return _0x1257a3[_0x3708cb(0x36f)](_0x52ea40,{'val':_0x50dc10,'exp':Date[_0x3708cb(0x6fd)]()+_0x19034d}),_0x50dc10;}function _0x433236(_0x145af7,_0x4e96b8,_0x37a6ad,_0x5cd1a2){const _0x36d310=_0x2a2824,_0xda8a31=_0x4e96b8[_0x36d310(0x758)]??_0x5cd1a2[_0x36d310(0x758)];switch(_0x145af7){case _0x36d310(0x758):return[..._0x37a6ad['_envs']['keys']()][_0x36d310(0x1ff)](_0x467014=>!_0x467014['startsWith']('~'));case _0x36d310(0x5e4):return _0x3562d9(_0x36d310(0x3a2)+_0xda8a31,0x7d0,()=>{const _0x5d581a=_0x36d310;try{return[..._0x37a6ad[_0x5d581a(0x758)](_0xda8a31)[_0x5d581a(0x71b)][_0x5d581a(0x2ac)]()]['filter'](_0x29ce91=>!_0x29ce91['startsWith']('~'));}catch{return[];}});case _0x36d310(0x566):if(!_0x4e96b8[_0x36d310(0x5e4)])return[];return _0x3562d9(_0x36d310(0x779)+_0xda8a31+':'+_0x4e96b8['type'],0x5dc,()=>{const _0x1b53f3=_0x36d310;try{const _0x5dd13a=_0x37a6ad['env'](_0xda8a31)[_0x1b53f3(0x71b)][_0x1b53f3(0x3e6)](_0x4e96b8[_0x1b53f3(0x5e4)]);if(!_0x5dd13a?.[_0x1b53f3(0x6af)])return[];const _0x56dd6f=[];for(const {key:_0x16a378}of _0x5dd13a[_0x1b53f3(0x6af)][_0x1b53f3(0x73f)]({'limit':0x32})){_0x56dd6f[_0x1b53f3(0x387)](String(_0x16a378));if(_0x56dd6f['length']>=0x32)break;}return _0x56dd6f;}catch{return[];}});case'index':if(!_0x4e96b8[_0x36d310(0x5e4)])return[];return _0x3562d9(_0x36d310(0x391)+_0xda8a31+':'+_0x4e96b8[_0x36d310(0x5e4)],0x7d0,()=>{const _0x340c4f=_0x36d310;try{const _0xfd9481=_0x37a6ad[_0x340c4f(0x758)](_0xda8a31)['typeSubDbs'][_0x340c4f(0x3e6)](_0x4e96b8[_0x340c4f(0x5e4)]);return _0xfd9481?[..._0xfd9481['indexToDb']?.['keys']()??[]]:[];}catch{return[];}});case'ftsName':if(!_0x4e96b8[_0x36d310(0x5e4)])return[];return _0x3562d9('fts:'+_0xda8a31+':'+_0x4e96b8[_0x36d310(0x5e4)],0x7d0,()=>{const _0x576bb6=_0x36d310;try{return _0x37a6ad[_0x576bb6(0x4ee)]?.[_0x576bb6(0x437)]?.(_0x4e96b8[_0x576bb6(0x5e4)],_0x37a6ad['env'](_0xda8a31))?.['map'](_0x1f9f96=>_0x1f9f96['name'])??[];}catch{return[];}});default:return[];}}function _0x41a196(_0x14c908,_0x36fe08,_0x42fd5a,_0x2807af){const _0x51d01b=_0x2a2824,_0x308e12=_0x14c908[_0x51d01b(0x25f)]('/'),_0x47c7da=_0x14c908[_0x51d01b(0x3d5)]('/'),_0x5522e0=_0x308e12?_0x47c7da[_0x51d01b(0x5b8)](0x0,-0x1):_0x47c7da['slice'](0x0,-0x1),_0x3f0cbf=_0x308e12?'':_0x47c7da[_0x47c7da[_0x51d01b(0x503)]-0x1];let _0x1fd86c=_0x36fe08;const _0x4c5adb={};for(const _0x243a0d of _0x5522e0){if(!_0x243a0d)continue;if(_0x1fd86c[_0x51d01b(0x201)][_0x51d01b(0x52e)](_0x243a0d))_0x1fd86c=_0x1fd86c['children'][_0x51d01b(0x3e6)](_0x243a0d);else{if(_0x1fd86c['dynamic'])_0x4c5adb[_0x1fd86c[_0x51d01b(0x62f)]['param']]=_0x243a0d,_0x1fd86c=_0x1fd86c[_0x51d01b(0x62f)][_0x51d01b(0x1f9)];else return[];}}const _0x114377=_0x5522e0['filter'](Boolean),_0x5274a0=_0x114377[_0x51d01b(0x503)]?_0x114377[_0x51d01b(0x29f)]('/')+'/':'',_0x234448=[];for(const [_0x4cdf0f]of _0x1fd86c['children']){if(_0x4cdf0f[_0x51d01b(0x637)](_0x3f0cbf))_0x234448['push'](_0x5274a0+_0x4cdf0f);}if(_0x1fd86c['dynamic'])for(const _0x4fcf1e of _0x433236(_0x1fd86c[_0x51d01b(0x62f)]['param'],_0x4c5adb,_0x42fd5a,_0x2807af)){if(String(_0x4fcf1e)[_0x51d01b(0x637)](_0x3f0cbf))_0x234448[_0x51d01b(0x387)](_0x5274a0+_0x4fcf1e);}return _0x234448[_0x51d01b(0x5b8)](0x0,0x64);}const _0x85171e=[_0x2a2824(0x3f2),_0x2a2824(0x680),_0x2a2824(0x758),_0x2a2824(0x364),_0x2a2824(0x4fc),_0x2a2824(0x654),'logs',_0x2a2824(0x1bc),_0x2a2824(0x393),_0x2a2824(0x27f)];function _0x130864(_0x52c8a5,_0x263866,_0x1426a3){return function _0x1baf10(_0xbbdff4){const _0x33a618=_0x4307;try{const _0x2baa95=_0xbbdff4[_0x33a618(0x395)](/\s[{[]/),_0x411cec=_0x2baa95>=0x0?_0xbbdff4['slice'](0x0,_0x2baa95):_0xbbdff4,_0x56299c=_0x411cec[_0x33a618(0x731)]();if(!_0x56299c){const _0x43acde=[..._0x85171e,...[..._0x52c8a5[_0x33a618(0x201)][_0x33a618(0x2ac)]()]][_0x33a618(0x5b8)](0x0,0x64);return[_0x43acde,''];}const _0x3a9f80=_0x56299c[_0x33a618(0x3d5)](/\s+/),_0x18f8a3=_0x3a9f80[0x0],_0x285b1d=_0x18f8a3[_0x33a618(0x575)]();if(_0x3a9f80[_0x33a618(0x503)]===0x1){const _0x4e3a74=_0x18f8a3[_0x33a618(0x4ff)](),_0x14e0a4=_0x85171e[_0x33a618(0x1ff)](_0x3bbd3a=>_0x3bbd3a['startsWith'](_0x4e3a74)),_0x2853e2=_0x41a196(_0x18f8a3,_0x52c8a5,_0x263866,_0x1426a3),_0x261f30=[...new Set([..._0x14e0a4,..._0x2853e2])][_0x33a618(0x5b8)](0x0,0x64);return[_0x261f30,_0x18f8a3];}if(_0x563be7['has'](_0x285b1d)&&_0x3a9f80['length']===0x2){const _0x69d59f=_0x3a9f80[0x1],_0x265c7a=_0x41a196(_0x69d59f,_0x52c8a5,_0x263866,_0x1426a3);return[_0x265c7a[_0x33a618(0x626)](_0x30706e=>_0x18f8a3+'\x20'+_0x30706e),_0x18f8a3+'\x20'+_0x69d59f];}if(!_0x563be7['has'](_0x285b1d)&&_0x3a9f80[_0x33a618(0x503)]>0x1){const _0x4cb612=_0x41a196(_0x18f8a3,_0x52c8a5,_0x263866,_0x1426a3),_0x3146c8='\x20'+_0x3a9f80['slice'](0x1)[_0x33a618(0x29f)]('\x20');return[_0x4cb612['map'](_0x429498=>_0x429498+_0x3146c8),_0x18f8a3+_0x3146c8];}return[[],_0xbbdff4];}catch{return[[],_0xbbdff4];}};}async function _0x44fc67(_0x56f9eb,_0x27d67f){const _0x5e1806=_0x2a2824,_0x1d1b2d={'enabled':!![],'level':_0x27d67f[_0x5e1806(0x6d3)]??_0x5e1806(0x77a)},_0x5a7d86={'env':_0x5e1806(0x445)},_0x52d9fe={'current':null},_0x320d2a=_0x5b09d0(_0x56f9eb[_0x5e1806(0x635)][_0x5e1806(0x4a0)]()),_0x291a80=_0x130864(_0x320d2a,_0x56f9eb,_0x5a7d86);_0x56f9eb[_0x5e1806(0x273)][_0x5e1806(0x292)](_0x5985e1=>{const _0x2c8470=_0x5e1806;if(!_0x1d1b2d['enabled'])return;_0xab5c9(_0x5985e1,_0x1d1b2d[_0x2c8470(0x3f4)]),_0x52d9fe[_0x2c8470(0x1ce)]?.['prompt'](!![]);}),_0x497e68(_0x56f9eb,_0x27d67f);const _0x554f07=_0x51c597[_0x5e1806(0x3fb)]({'input':process['stdin'],'output':process['stdout'],'terminal':!![],'completer':_0x291a80,'prompt':_0x43cde5(_0x5a7d86),'historySize':_0xfd95d6});try{const _0x255c1a=_0x3afeb8[_0x5e1806(0x2a8)](_0x2da170,_0x5e1806(0x6f6))[_0x5e1806(0x3d5)]('\x0a')[_0x5e1806(0x1ff)](Boolean);_0x554f07[_0x5e1806(0x3d9)]=_0x255c1a[_0x5e1806(0x2a9)]()[_0x5e1806(0x5b8)](0x0,_0xfd95d6);}catch{}_0x52d9fe[_0x5e1806(0x1ce)]=_0x554f07,_0x554f07['on'](_0x5e1806(0x4fd),async _0x244cec=>{const _0x92b835=_0x5e1806;_0x554f07['pause']();try{await _0x5216df(_0x244cec,_0x56f9eb,_0x27d67f,_0x1d1b2d,_0x5a7d86,_0x554f07);}catch(_0x2413bb){console[_0x92b835(0x5b7)](_0x1f9979(_0x1b9306['red'],_0x92b835(0x77d)+_0x2413bb['message']));}finally{_0x554f07[_0x92b835(0x531)](),_0x554f07['prompt']();}}),_0x554f07['on']('close',()=>{const _0x236a21=_0x5e1806;try{const _0x290e42=[..._0x554f07['history']]['reverse']()['filter'](Boolean)[_0x236a21(0x5b8)](0x0,_0xfd95d6);_0x3afeb8[_0x236a21(0x565)](_0x2da170,_0x290e42[_0x236a21(0x29f)]('\x0a')+'\x0a');}catch{}_0x1cfc4d(_0x56f9eb,0x0);});let _0xd32e50=0x0;return process['on'](_0x5e1806(0x6e5),()=>{const _0x4ed40e=_0x5e1806;if(_0x5a9a33)return _0x1cfc4d(_0x56f9eb,0x82,'SIGINT');if(_0x554f07['line']==='')return _0x1cfc4d(_0x56f9eb,0x0,_0x4ed40e(0x6e5));const _0x7de68f=Date['now']();if(_0x7de68f-_0xd32e50<0x5dc)return _0x1cfc4d(_0x56f9eb,0x0,_0x4ed40e(0x5c4));_0xd32e50=_0x7de68f,process['stdout']['write']('\x0a'),_0x554f07['clearLine'](0x0),_0x554f07['prompt'](),process[_0x4ed40e(0x556)][_0x4ed40e(0x6cc)](_0x1f9979(_0x1b9306['dim'],_0x4ed40e(0x47e)));}),process['on'](_0x5e1806(0x5f8),()=>_0x1cfc4d(_0x56f9eb,0x0,_0x5e1806(0x5f8))),process['on'](_0x5e1806(0x4bc),()=>_0x1cfc4d(_0x56f9eb,0x0,_0x5e1806(0x4bc))),_0x554f07['prompt'](),_0x554f07;}return okdbShell={'start':_0x44fc67,'colorLog':_0xab5c9,'lenientParse':_0x179112,'_splitLine':_0xa35b86,'_formatRouteHelpLines':_0x2ddbbf,'_routeSummary':_0x5c39e7,'_routeTags':_0x5ba79a},okdbShell;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x361e81=_0x362184;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x1aef63,performance:_0x496a19}=require$$0$3,_0x204f74=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x361e81(0x47d),_0x516d85=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x5bb9d3=process.env.OKDB_LOOP_LAG_ALL==='1',_0x148574=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x49ae21{constructor(){const _0x59408a=_0x361e81;this['enabled']=_0x204f74,this['_buckets']=new Map(),this['_h']=null,this['_timer']=null,this['_started']=![],this[_0x59408a(0x683)]=(_0x14619c,_0x5e3d26)=>process[_0x59408a(0x556)][_0x59408a(0x6cc)](_0x14619c+(_0x5e3d26?'\x20'+JSON['stringify'](_0x5e3d26):'')+'\x0a');}[_0x361e81(0x6fd)](){return _0x496a19['now']();}[_0x361e81(0x1c9)](_0x1679d6){const _0x16e9ab=_0x361e81;if(typeof _0x1679d6===_0x16e9ab(0x5aa))this[_0x16e9ab(0x683)]=_0x1679d6;}['note'](_0x99055c,_0x37de12,_0x35084a){const _0x52b465=_0x361e81;if(!this[_0x52b465(0x40c)])return;let _0x1c517f=this[_0x52b465(0x247)]['get'](_0x99055c);!_0x1c517f&&(_0x1c517f={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x52b465(0x247)][_0x52b465(0x36f)](_0x99055c,_0x1c517f)),_0x1c517f['ms']+=_0x37de12,_0x1c517f[_0x52b465(0x5b9)]+=0x1,_0x37de12>_0x1c517f[_0x52b465(0x1fe)]&&(_0x1c517f[_0x52b465(0x1fe)]=_0x37de12,_0x1c517f[_0x52b465(0x239)]=_0x35084a||'');}[_0x361e81(0x58f)](_0x481c9e){const _0x2e9fbb=_0x361e81;if(!this[_0x2e9fbb(0x40c)]||this['_started'])return;this[_0x2e9fbb(0x427)]=!![];if(_0x481c9e)this[_0x2e9fbb(0x683)]=_0x481c9e;this['_h']=_0x1aef63({'resolution':0xa}),this['_h'][_0x2e9fbb(0x1a1)](),this[_0x2e9fbb(0x673)]=setInterval(()=>this[_0x2e9fbb(0x4e6)](),_0x516d85);if(this[_0x2e9fbb(0x673)][_0x2e9fbb(0x442)])this[_0x2e9fbb(0x673)][_0x2e9fbb(0x442)]();}['onWindow'](_0x4a6eb1){const _0x76994a=_0x361e81;if(!this[_0x76994a(0x1c6)])this[_0x76994a(0x1c6)]=new Set();this[_0x76994a(0x1c6)][_0x76994a(0x4d2)](_0x4a6eb1);if(!this[_0x76994a(0x427)])this[_0x76994a(0x653)]();}[_0x361e81(0x486)](_0x25512d){const _0x553647=_0x361e81;this[_0x553647(0x1c6)]?.[_0x553647(0x560)](_0x25512d);}[_0x361e81(0x653)](){const _0x1010e4=_0x361e81;if(this['_admissionStarted'])return;this[_0x1010e4(0x40e)]=!![];!this['_h']&&(this['_h']=_0x1aef63({'resolution':0xa}),this['_h'][_0x1010e4(0x1a1)]());const _0x3e4f30=_0x516d85;this[_0x1010e4(0x67b)]=setInterval(()=>{const _0x3dae07=_0x1010e4,_0x4b18af=this['_h'];if(!_0x4b18af)return;const _0x82d9e8=_0x4b18af['percentile'](0x63)/0xf4240,_0x3afa98=_0x4b18af['max']/0xf4240,_0x209650=_0x4b18af[_0x3dae07(0x67f)]/0xf4240;_0x4b18af[_0x3dae07(0x620)]();if(this[_0x3dae07(0x1c6)])for(const _0x38d8f2 of this['_windowCbs']){try{_0x38d8f2({'p99Ms':_0x82d9e8,'maxMs':_0x3afa98,'meanMs':_0x209650,'reportMs':_0x3e4f30});}catch{}}},_0x3e4f30);if(this[_0x1010e4(0x67b)][_0x1010e4(0x442)])this[_0x1010e4(0x67b)]['unref']();}[_0x361e81(0x4e6)](){const _0x39b9b5=_0x361e81,_0x29bd88=this['_h'],_0x3dc04a=_0x29bd88['max']/0xf4240,_0x5f19e2=_0x29bd88[_0x39b9b5(0x64d)](0x63)/0xf4240,_0x2956d9=_0x29bd88['mean']/0xf4240;_0x29bd88[_0x39b9b5(0x620)]();const _0x32ab41=[...this[_0x39b9b5(0x247)][_0x39b9b5(0x62b)]()][_0x39b9b5(0x626)](([_0x1dcaf6,_0x4257a9])=>({'label':_0x1dcaf6,..._0x4257a9}))[_0x39b9b5(0x788)]((_0x35b895,_0x15e4e0)=>_0x15e4e0['ms']-_0x35b895['ms'])[_0x39b9b5(0x5b8)](0x0,0x8);this[_0x39b9b5(0x247)][_0x39b9b5(0x3dd)]();const _0x51f566=_0x32ab41[_0x39b9b5(0x400)]((_0x4a7b23,_0x1f28aa)=>_0x4a7b23+_0x1f28aa['ms'],0x0),_0x41b6cc=_0x32ab41[_0x39b9b5(0x626)](_0x8f53fa=>_0x8f53fa[_0x39b9b5(0x4c5)]+'='+_0x8f53fa['ms']['toFixed'](0x0)+_0x39b9b5(0x1b7)+_0x8f53fa[_0x39b9b5(0x5b9)]+(_0x8f53fa[_0x39b9b5(0x1fe)]>0x5?_0x39b9b5(0x2c0)+_0x8f53fa[_0x39b9b5(0x1fe)][_0x39b9b5(0x6cb)](0x0)+'ms'+(_0x8f53fa[_0x39b9b5(0x239)]?'\x20'+_0x8f53fa[_0x39b9b5(0x239)]:'')+')':''));(_0x5bb9d3||_0x3dc04a>=_0x148574)&&this[_0x39b9b5(0x683)](_0x39b9b5(0x493)+_0x516d85+_0x39b9b5(0x30f)+_0x3dc04a[_0x39b9b5(0x6cb)](0x0)+_0x39b9b5(0x73a)+_0x5f19e2[_0x39b9b5(0x6cb)](0x0)+'ms\x20mean='+_0x2956d9['toFixed'](0x0)+_0x39b9b5(0x1fa)+_0x51f566['toFixed'](0x0)+'ms'+(_0x41b6cc[_0x39b9b5(0x503)]?_0x39b9b5(0x3b6)+_0x41b6cc[_0x39b9b5(0x29f)]('\x20\x20'):''),{'feature':'loop-lag'});if(this[_0x39b9b5(0x1c6)])for(const _0x39e938 of this['_windowCbs']){try{_0x39e938({'p99Ms':_0x5f19e2,'maxMs':_0x3dc04a,'meanMs':_0x2956d9,'reportMs':_0x516d85});}catch{}}}[_0x361e81(0x1d2)](){const _0x193e7e=_0x361e81;if(this['_timer'])clearInterval(this['_timer']);if(this['_h'])this['_h'][_0x193e7e(0x41b)]();this[_0x193e7e(0x673)]=null,this['_h']=null,this['_started']=![];}}const _0x4cd92a=new _0x49ae21();if(_0x4cd92a['enabled'])_0x4cd92a[_0x361e81(0x58f)]();return okdbLoopMonitor={'LOOP':_0x4cd92a},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x57dec1=require$$1$1,_0x168347=require$$1;let _0x4083a9,_0x278071,_0x48387d,_0x464761,_0xf5e86f,_0xc30161,_0xd5348d,_0x1b26ee=![];const _0x569ade=new Set();let _0xcbd998=null;const _0xf2c42d=new Map();function _0x2e807e(){const _0x5ac5a4=_0x4307;if(_0x4083a9!==undefined)return _0x4083a9;_0x4083a9=process.env.OKDB_DIAG==='1';if(!_0x4083a9)return![];_0x278071=process.env.OKDB_DIAG_STACK==='1',_0x464761=Math[_0x5ac5a4(0x270)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x48387d=new Array(_0x464761),_0xf5e86f=0x0,_0xc30161=0x0,_0xd5348d=process.env.OKDB_DIAG_DIR||null;if(_0xd5348d)try{_0x57dec1[_0x5ac5a4(0x76d)](_0xd5348d,{'recursive':!![]});}catch{}return!![];}function _0xc37db1(){return _0x4083a9===undefined?_0x2e807e():_0x4083a9;}function _0x8658fc(_0x149879,_0x3f6853){const _0x5596a6=_0x4307;if(_0x4083a9===undefined?!_0x2e807e():!_0x4083a9)return;let _0x1fa6d7;if(_0x278071){const _0x135aca=new Error()['stack']||'';_0x1fa6d7=_0x135aca[_0x5596a6(0x3d5)]('\x0a')[_0x5596a6(0x5b8)](0x3)['map'](_0x2ce054=>_0x2ce054[_0x5596a6(0x6f3)]())[_0x5596a6(0x1ff)](Boolean)['slice'](0x0,0x8);}_0x48387d[_0xf5e86f]={'seq':_0xc30161++,'t':Date[_0x5596a6(0x6fd)](),'env':_0x149879,'kind':_0x3f6853||_0x5596a6(0x662),'stack':_0x1fa6d7},_0xf5e86f=(_0xf5e86f+0x1)%_0x464761;}function _0x832217(_0x569763){const _0x48d0df=_0x4307,_0x52c04c=[];for(let _0x38ee96=0x0;_0x38ee96<_0x464761;_0x38ee96++){const _0x54ff3d=_0x48387d[(_0xf5e86f-0x1-_0x38ee96+_0x464761*0x2)%_0x464761];if(!_0x54ff3d)continue;_0x52c04c['push'](_0x54ff3d);if(_0x52c04c[_0x48d0df(0x503)]>=_0x569763)break;}return _0x52c04c;}function _0x420fcf(_0x2a6072){const _0x1268a5=_0x4307;try{process[_0x1268a5(0x556)]['write'](_0x2a6072+'\x0a');}catch{}if(_0xd5348d)try{_0x57dec1[_0x1268a5(0x190)](_0x168347['join'](_0xd5348d,_0x1268a5(0x490)+process[_0x1268a5(0x789)]+_0x1268a5(0x4a8)),_0x2a6072+'\x0a');}catch{}}function _0x913c64(_0x6c7c7b){const _0x2fd57a=_0x4307,_0x491c42=_0x832217(_0x6c7c7b);if(!_0x491c42[_0x2fd57a(0x503)])return _0x2fd57a(0x2e4);const _0x11db94=Date[_0x2fd57a(0x6fd)]();return _0x491c42[_0x2fd57a(0x626)](_0x1d7600=>{const _0x48559f=_0x2fd57a,_0x5751b2=_0x48559f(0x42e)+_0x1d7600[_0x48559f(0x798)]+'\x20-'+(_0x11db94-_0x1d7600['t'])+_0x48559f(0x46e)+_0x1d7600['env']+'\x20'+_0x1d7600['kind'];return _0x1d7600[_0x48559f(0x22e)]&&_0x1d7600[_0x48559f(0x22e)][_0x48559f(0x503)]?_0x5751b2+'\x0a\x20\x20\x20\x20\x20\x20'+_0x1d7600[_0x48559f(0x22e)]['join'](_0x48559f(0x49d)):_0x5751b2;})[_0x2fd57a(0x29f)]('\x0a');}function _0x1fa7af(_0x30482f,_0x16e881){const _0xf52dd6=_0x4307,_0x17270c='\x0a===\x20OKDB_DIAG\x20'+_0x30482f+_0xf52dd6(0x327)+new Date()['toISOString']()+_0xf52dd6(0x1d0)+process[_0xf52dd6(0x789)]+'\x20===',_0x10ee1e=[_0x17270c,'error:\x20'+(_0x16e881&&_0x16e881[_0xf52dd6(0x22e)]?_0x16e881[_0xf52dd6(0x22e)][_0xf52dd6(0x3d5)]('\x0a')[0x0]:_0x16e881),'recent\x20writes\x20(newest\x20first)'+(_0x278071?'':_0xf52dd6(0x47b))+':',_0x913c64(0x18),_0x54b920(),'='['repeat'](_0x17270c['length']-0x1)];_0x420fcf(_0x10ee1e[_0xf52dd6(0x29f)]('\x0a'));}function _0x4c3833(_0x270e84){const _0x51ab7f=_0x4307;if(!_0xc37db1())return;const _0x5a1643=String(_0x270e84&&_0x270e84[_0x51ab7f(0x1e0)]||_0x270e84||''),_0x54fce2=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x51ab7f(0x193)](_0x5a1643);_0x1fa7af(_0x54fce2?_0x51ab7f(0x26e):_0x51ab7f(0x3b5),_0x270e84);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x54fce2)return;try{console['error'](_0x270e84&&_0x270e84[_0x51ab7f(0x22e)]?_0x270e84['stack']:_0x270e84);}catch{}process[_0x51ab7f(0x393)](0x1);}function _0x2b4a41(_0x5dbfee){const _0x373289=_0x4307;if(!_0xc37db1())return;const _0x275741=String(_0x5dbfee&&_0x5dbfee[_0x373289(0x1e0)]||_0x5dbfee||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x373289(0x193)](_0x275741)&&_0x1fa7af('ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)',_0x5dbfee);}function _0x54b920(){const _0x223b02=_0x4307,_0x4dbc44=['drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):'];let _0x553846=![];for(const _0x3368e5 of _0x569ade){const _0x536c12=_0x3368e5&&_0x3368e5[_0x223b02(0x6ca)];if(!_0x536c12)continue;for(const [_0x26ccea,_0x22cc9b]of _0x536c12){const _0x37a601=_0x22cc9b&&_0x22cc9b[_0x223b02(0x443)]&&_0x22cc9b[_0x223b02(0x443)][_0x223b02(0x258)];if(!_0x37a601)continue;let _0x50ae9a,_0x5be9ad;try{_0x50ae9a=Atomics['load'](_0x37a601,0x0),_0x5be9ad=Atomics[_0x223b02(0x603)](_0x37a601,0x1);}catch{continue;}if(_0x50ae9a===0x0)continue;_0x553846=!![];const _0x5e834d=_0x50ae9a>0x0?'SWAP':'copy',_0xfbc05a=Date[_0x223b02(0x6fd)]()-Math[_0x223b02(0x5a9)](_0x50ae9a)*0x3e8,_0x2cb38b=((()=>{const _0x25d98f=_0x223b02;try{return _0x22cc9b[_0x25d98f(0x398)]&&_0x22cc9b['_writer'][_0x25d98f(0x7a3)]?_0x22cc9b[_0x25d98f(0x398)]['status']():null;}catch{return null;}})());_0x4dbc44['push'](_0x223b02(0x23e)+_0x26ccea+_0x223b02(0x458)+_0x5e834d+_0x223b02(0x3fa)+_0xfbc05a+_0x223b02(0x333)+_0x5be9ad+(_0x2cb38b?'\x20writer{depth='+_0x2cb38b[_0x223b02(0x52c)]+_0x223b02(0x5a6)+_0x2cb38b['oldestPendingMs']+_0x223b02(0x599)+_0x2cb38b[_0x223b02(0x3fd)]+'}':''));}}if(!_0x553846)_0x4dbc44[_0x223b02(0x387)](_0x223b02(0x6df));return _0x4dbc44[_0x223b02(0x29f)]('\x0a');}function _0x63c079(){const _0xc99f19=_0x4307;if(!_0xc37db1())return;const _0x33418b=Math[_0xc99f19(0x270)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x3b012e=Date[_0xc99f19(0x6fd)]();for(const _0x1b1b1c of _0x569ade){const _0x321632=_0x1b1b1c&&_0x1b1b1c[_0xc99f19(0x6ca)];if(!_0x321632)continue;for(const [_0x4e04c7,_0x2873bc]of _0x321632){const _0x51e735=_0x2873bc&&_0x2873bc[_0xc99f19(0x443)]&&_0x2873bc[_0xc99f19(0x443)][_0xc99f19(0x258)];if(!_0x51e735)continue;let _0x45d650;try{_0x45d650=Atomics['load'](_0x51e735,0x0);}catch{continue;}const _0x84330f=_0x1b1b1c[_0xc99f19(0x624)]+'|'+_0x4e04c7;if(_0x45d650<=0x0){_0xf2c42d[_0xc99f19(0x560)](_0x84330f);continue;}const _0x120af4=_0x3b012e-_0x45d650*0x3e8,_0x592c94=_0xf2c42d[_0xc99f19(0x3e6)](_0x84330f);if(_0x120af4<_0x33418b)continue;if(_0x592c94&&_0x3b012e-_0x592c94[_0xc99f19(0x4a5)]<_0x33418b)continue;_0xf2c42d[_0xc99f19(0x36f)](_0x84330f,{'firstTs':_0x592c94?_0x592c94[_0xc99f19(0x2ba)]:_0x45d650,'dumpedAt':_0x3b012e});const _0x535b4a='\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20'+_0x120af4+_0xc99f19(0x5e7)+_0x4e04c7+_0xc99f19(0x327)+new Date()[_0xc99f19(0x2d7)]()+_0xc99f19(0x1d0)+process[_0xc99f19(0x789)]+_0xc99f19(0x5a1);_0x420fcf([_0x535b4a,_0x54b920(),'='[_0xc99f19(0x3ba)](_0x535b4a[_0xc99f19(0x503)]-0x1)][_0xc99f19(0x29f)]('\x0a'));}}}function _0x13a2d3(){const _0x285b10=_0x4307;if(!_0xc37db1()||_0x1b26ee)return;_0x1b26ee=!![],process[_0x285b10(0x66c)](_0x285b10(0x3b5),_0x4c3833),process[_0x285b10(0x66c)](_0x285b10(0x516),_0x2b4a41);const _0x14842f=Math['max'](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0xcbd998=setInterval(_0x63c079,_0x14842f);if(_0xcbd998['unref'])_0xcbd998[_0x285b10(0x442)]();}function _0x1b474e(_0x236b14){const _0x1665c8=_0x4307;if(!_0xc37db1()||!_0x236b14)return;_0x569ade[_0x1665c8(0x4d2)](_0x236b14),_0x13a2d3();}function _0x33d2d5(_0x452be9){const _0x180554=_0x4307;_0x569ade[_0x180554(0x560)](_0x452be9);}function _0x189ba7(){const _0x379b90=_0x4307;if(!_0xc37db1())return{'enabled':![],'hint':_0x379b90(0x737)};return{'enabled':!![],'stackCapture':!!_0x278071,'recentWrites':_0x832217(0x10),'drain':_0x54b920()};}return okdbDiag={'isEnabled':_0xc37db1,'recordWrite':_0x8658fc,'installDiag':_0x13a2d3,'registerOkdb':_0x1b474e,'unregisterOkdb':_0x33d2d5,'snapshot':_0x189ba7},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x35debd=_0x362184;if(hasRequiredOkdbWriter)return okdbWriter['exports'];hasRequiredOkdbWriter=0x1;const {performance:_0x1ad781}=require$$0$4,_0x4c550a=requireOkdbDiag(),_0xc87986=process.env.OKDB_COMMIT_MODE===_0x35debd(0x317);class _0x29fbb6{constructor(_0x3c2b4c){const _0x1b1175=_0x35debd;this[_0x1b1175(0x758)]=_0x3c2b4c,this['_inflight']=new Set(),this[_0x1b1175(0x4d5)]=new Map(),this[_0x1b1175(0x480)]=0x0,this[_0x1b1175(0x3be)]=[],this[_0x1b1175(0x6b7)]=[],this[_0x1b1175(0x2f2)]=Math[_0x1b1175(0x270)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x1b1175(0x37f)]=0x0,this[_0x1b1175(0x571)]=[],this[_0x1b1175(0x621)]=0x0,this[_0x1b1175(0x3fe)]=null,this[_0x1b1175(0x781)]=0x0,this['_nestedTotal']=0x0,this['_nestedWarned']=![];}async[_0x35debd(0x5ab)](_0xb3f65b,_0x462caf){const _0x78355=_0x35debd;if(_0x4c550a['isEnabled']())_0x4c550a[_0x78355(0x4c3)](this['env']?.[_0x78355(0x378)],_0x462caf);if(this[_0x78355(0x30a)]){const _0x186909=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x186909['code']='ENV_CLOSING_RETRY';throw _0x186909;}if(this[_0x78355(0x2f2)]>0x0){let _0x5bed74=![];while(this['_outstanding']>=this[_0x78355(0x2f2)]&&!this[_0x78355(0x30a)]){!_0x5bed74&&(_0x5bed74=!![],this[_0x78355(0x621)]++),await new Promise(_0x4b81b2=>this[_0x78355(0x571)][_0x78355(0x387)](_0x4b81b2));}if(this[_0x78355(0x30a)]){const _0x5e03b9=new Error(_0x78355(0x2cc));_0x5e03b9[_0x78355(0x2a0)]=_0x78355(0x2c4);throw _0x5e03b9;}}this[_0x78355(0x37f)]++;const _0xf42281=this[_0x78355(0x758)]['_coordinator'];for(;;){while(this[_0x78355(0x3fe)])await this[_0x78355(0x3fe)];if(_0xf42281)await _0xf42281[_0x78355(0x278)]();if(!this['_held'])break;if(_0xf42281)_0xf42281[_0x78355(0x411)]();}if(this[_0x78355(0x30a)]){if(_0xf42281)_0xf42281[_0x78355(0x411)]();this['_outstanding']--;if(this[_0x78355(0x571)][_0x78355(0x503)]&&this[_0x78355(0x37f)]<this[_0x78355(0x2f2)])this['_bpWaiters'][_0x78355(0x4c0)]()();const _0x36e606=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x36e606['code']=_0x78355(0x2c4);throw _0x36e606;}const _0x3134da=_0x1ad781[_0x78355(0x6fd)]();if(_0xc87986)try{const _0x55666b=this['env']['db'][_0x78355(0x796)](_0xb3f65b);this['_committed']++;if(this[_0x78355(0x3be)][_0x78355(0x387)](_0x1ad781[_0x78355(0x6fd)]()-_0x3134da)>0x100)this[_0x78355(0x3be)][_0x78355(0x4c0)]();if(this[_0x78355(0x6b7)]['push'](_0x1ad781['now']())>0x800)this['_done'][_0x78355(0x4c0)]();return _0x55666b;}finally{this['_outstanding']--;if(this[_0x78355(0x571)][_0x78355(0x503)]&&this[_0x78355(0x37f)]<this['_highWater'])this[_0x78355(0x571)]['shift']()();if(_0xf42281)_0xf42281[_0x78355(0x411)]();}let _0x4befb0=null;const _0x3dc684=()=>{const _0x35edf3=_0x78355,_0x1e73a7=_0xb3f65b();if(_0x1e73a7&&typeof _0x1e73a7[_0x35edf3(0x4a7)]===_0x35edf3(0x5aa)&&!_0x4befb0){this['_heldTotal']++;let _0x40ef66;const _0x200ce9=new Promise(_0x3c6f67=>_0x40ef66=_0x3c6f67);this[_0x35edf3(0x3fe)]=_0x200ce9,_0x4befb0=()=>{const _0x439617=_0x35edf3;if(this['_held']===_0x200ce9)this[_0x439617(0x3fe)]=null;_0x40ef66();};}return _0x1e73a7;};let _0x36826a;try{_0x36826a=this[_0x78355(0x758)]['db']['childTransaction'](_0x3dc684);}catch(_0x540949){_0x36826a=Promise[_0x78355(0x71f)](_0x540949);}(!_0x36826a||typeof _0x36826a['then']!==_0x78355(0x5aa))&&(this[_0x78355(0x6fa)]++,!this[_0x78355(0x3e8)]&&(this[_0x78355(0x3e8)]=!![],console['warn'](_0x78355(0x3a0)+(this[_0x78355(0x758)]?.[_0x78355(0x378)]??'?')+_0x78355(0x261))),_0x36826a=Promise['resolve'](_0x36826a));const _0x1ae5f1=()=>{if(_0x4befb0)_0x4befb0();};_0x36826a['then'](_0x1ae5f1,_0x1ae5f1),this['_inflight']['add'](_0x36826a),this[_0x78355(0x4d5)][_0x78355(0x36f)](_0x36826a,_0x3134da);const _0x439cb2=()=>{const _0x3e5f91=_0x78355;this[_0x3e5f91(0x6eb)][_0x3e5f91(0x560)](_0x36826a),this['_enqueuedAt'][_0x3e5f91(0x560)](_0x36826a),this['_committed']++,this['_outstanding']--;this[_0x3e5f91(0x571)][_0x3e5f91(0x503)]&&this[_0x3e5f91(0x37f)]<this[_0x3e5f91(0x2f2)]&&this[_0x3e5f91(0x571)][_0x3e5f91(0x4c0)]()();if(this[_0x3e5f91(0x3be)][_0x3e5f91(0x387)](_0x1ad781[_0x3e5f91(0x6fd)]()-_0x3134da)>0x100)this['_durs']['shift']();if(this[_0x3e5f91(0x6b7)][_0x3e5f91(0x387)](_0x1ad781[_0x3e5f91(0x6fd)]())>0x800)this['_done'][_0x3e5f91(0x4c0)]();};_0x36826a['then'](_0x439cb2,_0x439cb2);try{return await _0x36826a;}finally{if(_0xf42281)_0xf42281[_0x78355(0x411)]();}}[_0x35debd(0x7a3)](){const _0x1b2f3d=_0x35debd,_0x59127a=_0x1ad781[_0x1b2f3d(0x6fd)]();let _0x22f573=0x0;for(const _0x355628 of this[_0x1b2f3d(0x4d5)][_0x1b2f3d(0x397)]()){const _0x2729af=_0x59127a-_0x355628;if(_0x2729af>_0x22f573)_0x22f573=_0x2729af;}let _0x492381=0x0;for(let _0x53869c=this[_0x1b2f3d(0x6b7)]['length']-0x1;_0x53869c>=0x0;_0x53869c--){if(_0x59127a-this[_0x1b2f3d(0x6b7)][_0x53869c]>0x3e8)break;_0x492381++;}let _0x5a0ad0=0x0;if(this['_durs'][_0x1b2f3d(0x503)]){const _0x31c143=[...this[_0x1b2f3d(0x3be)]][_0x1b2f3d(0x788)]((_0xc7bc03,_0x593145)=>_0xc7bc03-_0x593145);_0x5a0ad0=_0x31c143[Math[_0x1b2f3d(0x311)](_0x31c143['length']-0x1,Math[_0x1b2f3d(0x318)](_0x31c143[_0x1b2f3d(0x503)]*0.99))];}return{'depth':this[_0x1b2f3d(0x6eb)][_0x1b2f3d(0x1f8)],'oldestPendingMs':Math[_0x1b2f3d(0x6bd)](_0x22f573),'committed':this['_committed'],'commitsPerSec':_0x492381,'commitP99Ms':Math[_0x1b2f3d(0x6bd)](_0x5a0ad0),'parkedNow':this[_0x1b2f3d(0x571)][_0x1b2f3d(0x503)],'parkedTotal':this[_0x1b2f3d(0x621)],'highWater':this[_0x1b2f3d(0x2f2)]};}[_0x35debd(0x242)](){const _0x4e46ae=_0x35debd,_0x5fe544=_0x1ad781['now']();return[...this['_enqueuedAt'][_0x4e46ae(0x397)]()][_0x4e46ae(0x626)](_0x1d7cdc=>Math[_0x4e46ae(0x6bd)](_0x5fe544-_0x1d7cdc))['sort']((_0x12374c,_0xc0f5ed)=>_0xc0f5ed-_0x12374c);}[_0x35debd(0x56a)](){const _0x5c50e8=_0x35debd;this[_0x5c50e8(0x30a)]=!![];for(const _0x225fe7 of this['_bpWaiters'][_0x5c50e8(0x2cb)](0x0))_0x225fe7();}async[_0x35debd(0x785)](){const _0x2b1c0b=_0x35debd;let _0x1ee825=0x0;while(this[_0x2b1c0b(0x6eb)][_0x2b1c0b(0x1f8)]&&_0x1ee825++<0x3e8){await Promise[_0x2b1c0b(0x6ed)]([...this['_inflight']]);}}async['put'](_0x1b59b4,_0x42e5b4,_0x2a7518,_0x4a42d0){const _0x49dc15=_0x35debd;return this[_0x49dc15(0x5ab)](()=>{const _0x1a20ac=_0x49dc15;if(_0x4a42d0===undefined)_0x1b59b4[_0x1a20ac(0x6da)](_0x42e5b4,_0x2a7518);else _0x1b59b4[_0x1a20ac(0x6da)](_0x42e5b4,_0x2a7518,_0x4a42d0);},'raw-put');}async['remove'](_0x55b0f0,_0x3e0f6a){const _0x53f186=_0x35debd;return this[_0x53f186(0x5ab)](()=>_0x55b0f0[_0x53f186(0x605)](_0x3e0f6a),'raw-remove');}}async function _0x4cd4a7(_0x2a506a,_0x7a248c){const _0x4a3154=_0x35debd;if(_0x7a248c==null)_0x7a248c=Math[_0x4a3154(0x270)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x16a870=_0x2a506a?.[_0x4a3154(0x42a)];if(!_0x16a870||typeof _0x16a870['then']!==_0x4a3154(0x5aa))return;await Promise[_0x4a3154(0x52b)]([Promise[_0x4a3154(0x300)](_0x16a870)[_0x4a3154(0x628)](()=>{}),new Promise(_0x2240a1=>{const _0x3336d1=_0x4a3154,_0xceaa40=setTimeout(_0x2240a1,_0x7a248c);if(_0xceaa40[_0x3336d1(0x442)])_0xceaa40['unref']();})]);}catch{}}function _0x2ee8ce(_0x5adb3a){const _0x30e2fe=_0x35debd;if(_0xc87986)return Promise[_0x30e2fe(0x300)]();const _0xe24da7=_0x5adb3a?.[_0x30e2fe(0x589)];return _0xe24da7&&typeof _0xe24da7['then']===_0x30e2fe(0x5aa)?_0xe24da7:Promise[_0x30e2fe(0x300)]();}return okdbWriter['exports']=_0x29fbb6,okdbWriter['exports'][_0x35debd(0x5d0)]=_0x4cd4a7,okdbWriter[_0x35debd(0x1e3)][_0x35debd(0x589)]=_0x2ee8ce,okdbWriter[_0x35debd(0x1e3)][_0x35debd(0x3fc)]=_0xc87986,okdbWriter[_0x35debd(0x1e3)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x380fe8=_0x362184;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x2cba7f=require$$0,{SYNC_COMMITS:_0x1fb115}=requireOkdbWriter(),_0x46704f='~lock';class _0x58f8c1{constructor(_0x463fc0,_0x245a4f,_0x540a1c){const _0x45d3cc=_0x4307;this['_lock']=_0x463fc0,this[_0x45d3cc(0x22d)]=_0x245a4f,this[_0x45d3cc(0x220)]=_0x540a1c,this['_released']=![],this[_0x45d3cc(0x76e)]=null,this[_0x45d3cc(0x797)]=null;}[_0x380fe8(0x231)](){const _0x2a2c63=_0x380fe8;if(this[_0x2a2c63(0x649)])return![];try{const _0x1bc3a9=this['_lock'][_0x2a2c63(0x441)]()['get'](this['_key']);if(!_0x1bc3a9||_0x1bc3a9[_0x2a2c63(0x65a)]!==this[_0x2a2c63(0x220)])return![];const _0x3bd5c2=_0x1bc3a9['updatedAt']??_0x1bc3a9['acquiredAt'];if(_0x3bd5c2+_0x1bc3a9[_0x2a2c63(0x696)]<Date['now']())return![];return!![];}catch{return!this['_released'];}}['holder'](){const _0x42bddd=_0x380fe8;if(this['_released'])return null;try{return this[_0x42bddd(0x62a)][_0x42bddd(0x441)]()[_0x42bddd(0x3e6)](this[_0x42bddd(0x22d)])??null;}catch{return null;}}async[_0x380fe8(0x6e1)](_0x2e22b0){const _0x43dc44=_0x380fe8;if(this[_0x43dc44(0x649)])return;try{const _0xb50d09=this['_lock'][_0x43dc44(0x441)]()[_0x43dc44(0x3e6)](this['_key']);if(!_0xb50d09||_0xb50d09[_0x43dc44(0x65a)]!==this['_acquiredAt'])return;if(_0x1fb115)this[_0x43dc44(0x62a)][_0x43dc44(0x441)]()[_0x43dc44(0x6da)](this[_0x43dc44(0x22d)],{..._0xb50d09,'ttlMs':_0xb50d09[_0x43dc44(0x696)]+_0x2e22b0});else await this[_0x43dc44(0x62a)][_0x43dc44(0x441)]()[_0x43dc44(0x66a)](this[_0x43dc44(0x22d)],{..._0xb50d09,'ttlMs':_0xb50d09['ttlMs']+_0x2e22b0});}catch{}}async['release'](){const _0x3f466e=_0x380fe8;if(this[_0x3f466e(0x649)])return;if(this[_0x3f466e(0x797)])try{await this[_0x3f466e(0x797)];}catch{}clearInterval(this[_0x3f466e(0x76e)]),this[_0x3f466e(0x76e)]=null,this[_0x3f466e(0x649)]=!![];try{const _0x1a44f7=this[_0x3f466e(0x62a)]['_db']()[_0x3f466e(0x3e6)](this['_key']);if(_0x1a44f7&&_0x1a44f7['acquiredAt']===this[_0x3f466e(0x220)]){if(_0x1fb115)this[_0x3f466e(0x62a)]['_db']()[_0x3f466e(0x605)](this[_0x3f466e(0x22d)]);else await this[_0x3f466e(0x62a)][_0x3f466e(0x441)]()[_0x3f466e(0x488)](this['_key']);}}catch{}}['_startHeartbeat'](_0x4c4e10,_0xb37c99){const _0x387653=_0x380fe8,_0x47e080=_0xb37c99??Math[_0x387653(0x318)](_0x4c4e10/0x3);this[_0x387653(0x76e)]=setInterval(()=>{const _0x4c1db5=_0x387653;if(this[_0x4c1db5(0x649)])return;this[_0x4c1db5(0x797)]=((async()=>{const _0xf2db18=_0x4c1db5;try{const _0x43873b=this['_lock'][_0xf2db18(0x441)]()[_0xf2db18(0x3e6)](this[_0xf2db18(0x22d)]);if(!_0x43873b||_0x43873b[_0xf2db18(0x65a)]!==this[_0xf2db18(0x220)]){this['_released']=!![],clearInterval(this[_0xf2db18(0x76e)]),this[_0xf2db18(0x76e)]=null;return;}if(_0x1fb115)this[_0xf2db18(0x62a)][_0xf2db18(0x441)]()[_0xf2db18(0x6da)](this[_0xf2db18(0x22d)],{..._0x43873b,'updatedAt':Date['now']()});else await this[_0xf2db18(0x62a)][_0xf2db18(0x441)]()[_0xf2db18(0x66a)](this['_key'],{..._0x43873b,'updatedAt':Date[_0xf2db18(0x6fd)]()});}catch{}this[_0xf2db18(0x797)]=null;})());},_0x47e080);if(this[_0x387653(0x76e)][_0x387653(0x442)])this[_0x387653(0x76e)][_0x387653(0x442)]();}}class _0x13d882{constructor(_0x3c46aa,{namespace:_0x2c5d3a,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x9b9071=_0x380fe8;this['_rawDb']=_0x3c46aa,this[_0x9b9071(0x728)]=_0x2c5d3a,this[_0x9b9071(0x696)]=ttlMs,this['heartbeatMs']=heartbeatMs,this[_0x9b9071(0x27a)]=null;}['_db'](){const _0x32912e=_0x380fe8;return!this['_lockDb']&&(this[_0x32912e(0x27a)]=this[_0x32912e(0x20f)][_0x32912e(0x79e)](_0x46704f,{'dupSort':![]})),this[_0x32912e(0x27a)];}[_0x380fe8(0x53d)](){const _0x3e0b1d=_0x380fe8;return!this[_0x3e0b1d(0x568)]&&(this['_wantDbHandle']=this['_rawDb'][_0x3e0b1d(0x79e)](_0x46704f+_0x3e0b1d(0x49f),{'dupSort':![]})),this[_0x3e0b1d(0x568)];}[_0x380fe8(0x22d)](_0x3fa01b){const _0x535650=_0x380fe8;return this[_0x535650(0x728)]+':'+_0x3fa01b;}[_0x380fe8(0x45b)](_0x26bdab){const _0x48f3ea=_0x380fe8;try{_0x1fb115?this['_wantDb']()[_0x48f3ea(0x6da)](this[_0x48f3ea(0x22d)](_0x26bdab),Date[_0x48f3ea(0x6fd)]()):this[_0x48f3ea(0x53d)]()[_0x48f3ea(0x66a)](this[_0x48f3ea(0x22d)](_0x26bdab),Date[_0x48f3ea(0x6fd)]())?.[_0x48f3ea(0x628)]?.(()=>{});}catch{}}[_0x380fe8(0x389)](_0x476d10,_0x2c8bc0=0x3e8){const _0x1b9d4d=_0x380fe8;try{const _0x31f28b=this[_0x1b9d4d(0x53d)]()[_0x1b9d4d(0x3e6)](this[_0x1b9d4d(0x22d)](_0x476d10));return typeof _0x31f28b===_0x1b9d4d(0x6e3)&&Date[_0x1b9d4d(0x6fd)]()-_0x31f28b<_0x2c8bc0;}catch{return![];}}[_0x380fe8(0x529)](_0x21039d){const _0xf4e531=_0x380fe8,_0x38c459=_0x21039d['updatedAt']??_0x21039d['acquiredAt'];return _0x38c459+_0x21039d[_0xf4e531(0x696)]<Date[_0xf4e531(0x6fd)]();}static['_holderDead'](_0x10f86c){const _0x2a16cf=_0x380fe8,_0x426ee9=_0x10f86c?.[_0x2a16cf(0x47c)];if(!_0x426ee9||typeof _0x426ee9[_0x2a16cf(0x789)]!==_0x2a16cf(0x6e3))return![];if(_0x426ee9[_0x2a16cf(0x57e)]!==_0x2cba7f[_0x2a16cf(0x57e)]())return![];if(_0x426ee9[_0x2a16cf(0x789)]===process[_0x2a16cf(0x789)])return![];try{return process['kill'](_0x426ee9[_0x2a16cf(0x789)],0x0),![];}catch(_0x7a1a5a){return _0x7a1a5a[_0x2a16cf(0x2a0)]===_0x2a16cf(0x55c);}}async[_0x380fe8(0x5dd)](_0x198aee,_0x5cf362={},_0x101782={}){const _0xa65002=_0x380fe8,_0x828443=this['_key'](_0x198aee),_0x37b3f6=_0x101782[_0xa65002(0x696)]??this[_0xa65002(0x696)],_0x2335a6=Date[_0xa65002(0x6fd)](),_0x4ca8dc={'holder':{'pid':process['pid'],'hostname':_0x2cba7f[_0xa65002(0x57e)](),..._0x5cf362},'acquiredAt':_0x2335a6,'updatedAt':_0x2335a6,'ttlMs':_0x37b3f6};let _0x214a2e=![],_0x2e774c=null;try{const _0x3f42ff=()=>{const _0x1b5702=_0xa65002,_0x1fa3dd=this[_0x1b5702(0x441)]()[_0x1b5702(0x3e6)](_0x828443);if(_0x1fa3dd&&!this[_0x1b5702(0x529)](_0x1fa3dd)&&!_0x13d882[_0x1b5702(0x761)](_0x1fa3dd)){const _0xe56107=_0x5cf362[_0x1b5702(0x281)]!=null&&_0x1fa3dd[_0x1b5702(0x47c)]['pid']===process[_0x1b5702(0x789)]&&_0x1fa3dd[_0x1b5702(0x47c)]['processorId']===_0x5cf362[_0x1b5702(0x281)];if(!_0xe56107){_0x214a2e=![],_0x2e774c=_0x1fa3dd;return;}_0x4ca8dc[_0x1b5702(0x65a)]<=_0x1fa3dd['acquiredAt']&&(_0x4ca8dc[_0x1b5702(0x65a)]=_0x1fa3dd[_0x1b5702(0x65a)]+0x1,_0x4ca8dc['updatedAt']=_0x4ca8dc['acquiredAt']);}this[_0x1b5702(0x441)]()[_0x1b5702(0x66a)](_0x828443,_0x4ca8dc),_0x214a2e=!![],_0x2e774c=_0x4ca8dc;};if(_0x1fb115)this['_db']()['transactionSync'](_0x3f42ff);else await this['_db']()['childTransaction'](_0x3f42ff);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x214a2e)return{'acquired':![],'handle':null,'current':_0x2e774c};const _0x42ec3a=new _0x58f8c1(this,_0x828443,_0x4ca8dc[_0xa65002(0x65a)]);return _0x42ec3a[_0xa65002(0x429)](_0x37b3f6,this['heartbeatMs']),{'acquired':!![],'handle':_0x42ec3a,'current':_0x2e774c};}[_0x380fe8(0x2b5)](_0x4e2426){const _0x173068=_0x380fe8;try{return this['_db']()['get'](this[_0x173068(0x22d)](_0x4e2426))??null;}catch{return null;}}[_0x380fe8(0x437)](){const _0x53ddb6=_0x380fe8,_0x950450=this['namespace']+':',_0x3b1dbe=[];try{for(const {key:_0x421140,value:_0x5c1e39}of this[_0x53ddb6(0x441)]()[_0x53ddb6(0x73f)]({'start':_0x950450,'end':_0x950450+'\xff'})){typeof _0x421140===_0x53ddb6(0x44e)&&_0x421140[_0x53ddb6(0x637)](_0x950450)&&_0x3b1dbe['push']({'id':_0x421140[_0x53ddb6(0x5b8)](_0x950450['length']),'entry':_0x5c1e39});}}catch{}return _0x3b1dbe;}static[_0x380fe8(0x302)](_0x400cb0){const _0x3edfdd=_0x380fe8,_0x3d799d=[];try{const _0x17b3df=_0x400cb0[_0x3edfdd(0x79e)](_0x46704f,{'dupSort':![]});for(const {key:_0xe45818,value:_0x126d73}of _0x17b3df[_0x3edfdd(0x73f)]({})){if(typeof _0xe45818!==_0x3edfdd(0x44e))continue;const _0x1fbee5=_0xe45818[_0x3edfdd(0x5f2)](':');if(_0x1fbee5<0x1)continue;_0x3d799d['push']({'namespace':_0xe45818[_0x3edfdd(0x5b8)](0x0,_0x1fbee5),'id':_0xe45818[_0x3edfdd(0x5b8)](_0x1fbee5+0x1),'entry':_0x126d73});}}catch{}return _0x3d799d;}}return okdbLock={'OKDBLock':_0x13d882},okdbLock;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x54a94d=_0x362184;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x5cb7ef=require$$0,_0x2d7a1d=require$$1$2,_0x344f44=require$$2,{LOOP:_0x32ffdd}=requireOkdbLoopMonitor(),{OKDBLock:_0x12ee53}=requireOkdbLock(),{SYNC_COMMITS:_0x5c9203}=requireOkdbWriter(),_0x345b6a=_0x54a94d(0x476),_0x12e27e=_0x54a94d(0x1f9),_0x334020=_0x54a94d(0x4a9),_0x1a73d2=_0x54a94d(0x3bc),_0x3355a2=(_0x1ff3a0,_0x3f3d1f)=>_0x1ff3a0+':'+_0x3f3d1f,_0x2137c4=(_0x314661,_0x115e04)=>_0x314661+'::'+_0x115e04,_0x23bc47=(_0x555672,_0x23a206)=>_0x555672+'/'+_0x23a206,_0x474b19=(_0x30b611,_0x553f6e)=>_0x30b611+'#'+_0x553f6e,_0x55ee5c=_0x177705=>{const _0x1bb218=_0x54a94d;if(_0x177705?.[_0x1bb218(0x422)])return _0x177705[_0x1bb218(0x422)];const _0xd1cf61=_0x177705?.['nodeKey'];return typeof _0xd1cf61==='string'&&_0xd1cf61[_0x1bb218(0x1dc)]('#')?_0xd1cf61[_0x1bb218(0x5b8)](0x0,_0xd1cf61[_0x1bb218(0x5f2)]('#')):_0xd1cf61;},_0x3e0276=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x2744de=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x5298b5=_0x3e0276*0x3,_0x1305d0=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x54a94d(0x270)](0x927c0,_0x5298b5*0x14),_0x593c61=[_0x54a94d(0x40f),_0x54a94d(0x4cd),_0x54a94d(0x701),_0x54a94d(0x665),'processor:paused','processor:resumed'];let _0x1b7dcd=null;function _0x4685e2(){const _0x303cfc=_0x54a94d;if(_0x1b7dcd==null)_0x1b7dcd=Math[_0x303cfc(0x6bd)]((Date['now']()-process[_0x303cfc(0x4c1)]()*0x3e8)/0x3e8)*0x3e8;return _0x1b7dcd;}function _0x25759f(_0x40efdd){const _0x4743a1=_0x54a94d;if(process.env.OKDB_PROCESS_KILL===_0x4743a1(0x77f))return![];if(_0x40efdd?.['options']?.[_0x4743a1(0x721)]&&typeof _0x40efdd['options'][_0x4743a1(0x721)]===_0x4743a1(0x40d)&&_0x40efdd[_0x4743a1(0x659)][_0x4743a1(0x721)][_0x4743a1(0x49c)]===![])return![];return!![];}function _0x553dbb(_0xab5b7d,_0x4a7003){const _0x2c5b78=_0x54a94d,_0x5e1e96=!!_0x4a7003?.[_0x2c5b78(0x471)];switch(_0xab5b7d){case _0x2c5b78(0x30c):return{'controllable':_0x5e1e96,'decommissionable':![],'killable':!![],'killConfirm':_0x2c5b78(0x6b4)};case _0x2c5b78(0x335):case'standalone':return{'controllable':_0x5e1e96,'decommissionable':![],'killable':!![],'killConfirm':_0x2c5b78(0x51f)};case _0x2c5b78(0x18a):return{'controllable':![],'decommissionable':![],'killable':![]};case _0x2c5b78(0x5ea):case _0x2c5b78(0x203):case _0x2c5b78(0x496):case'worker':return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x2c5b78(0x37b)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x1eefa2{constructor(_0x127df5){const _0xa2ac64=_0x54a94d;this[_0xa2ac64(0x784)]=_0x127df5,this['_statusEnv']=null,this['_desired']=null,this[_0xa2ac64(0x2b1)]=new Map(),this[_0xa2ac64(0x704)]=null,this[_0xa2ac64(0x778)]=![],this[_0xa2ac64(0x623)]=![],this[_0xa2ac64(0x5c7)]=_0x4685e2(),this['_selfKey']=_0x3355a2(process[_0xa2ac64(0x789)],this['_processStartedAt']),this[_0xa2ac64(0x6e7)]=_0x344f44['randomUUID']()['slice'](0x0,0x8),this['_rowKey']=_0x474b19(this[_0xa2ac64(0x4d4)],this[_0xa2ac64(0x6e7)]),this['_startedAt']=Date['now'](),this['_kind']=null,this[_0xa2ac64(0x6f7)]=null,this[_0xa2ac64(0x60f)]=null,this[_0xa2ac64(0x421)]=null,this[_0xa2ac64(0x5f0)]=null,this[_0xa2ac64(0x5cf)]=null,this[_0xa2ac64(0x5ec)]=0x0,this[_0xa2ac64(0x1fb)]={},this[_0xa2ac64(0x719)]=new Map(),this[_0xa2ac64(0x542)]=process[_0xa2ac64(0x2fd)](),this[_0xa2ac64(0x68d)]=Date[_0xa2ac64(0x6fd)](),this['_lastCpuPct']=0x0,this['_threadStats']=new Map();}get[_0x54a94d(0x198)](){const _0x4895a8=_0x54a94d;return this[_0x4895a8(0x4d4)];}get[_0x54a94d(0x386)](){const _0x4fd160=_0x54a94d;return this[_0x4fd160(0x1df)];}[_0x54a94d(0x37d)](_0x1c28b5,_0x494b58){const _0x983480=_0x54a94d,_0x55521a=_0x553dbb(_0x1c28b5,_0x494b58);if(_0x55521a[_0x983480(0x465)]&&!_0x25759f(this['okdb']))return{..._0x55521a,'killable':![],'killConfirm':undefined};return _0x55521a;}[_0x54a94d(0x368)](){const _0x49ecda=_0x54a94d;return!!this[_0x49ecda(0x534)];}[_0x54a94d(0x312)](_0x331849){const _0x96f074=_0x54a94d;Object[_0x96f074(0x2f7)](this[_0x96f074(0x1fb)],_0x331849||{});}[_0x54a94d(0x322)](_0x5b2b57){const _0x561c97=_0x54a94d;if(_0x5b2b57)this[_0x561c97(0x60f)]=_0x5b2b57;}[_0x54a94d(0x513)](_0x35987e={}){const _0x696961=_0x54a94d;return this[_0x696961(0x784)][_0x696961(0x5e6)](_0x35987e);}[_0x54a94d(0x1c0)](){const _0x4cf4f3=_0x54a94d,_0xbe2daf={};let _0x32187e=0x0,_0xd76ebf=0x0;const _0x452097=new Set();for(const _0x574aa5 of this[_0x4cf4f3(0x1f3)]()){_0xd76ebf++;const _0x3261da=_0x574aa5['processing'];if(!_0x3261da)continue;if(_0x3261da[_0x4cf4f3(0x330)])_0x32187e++;for(const _0x3aa822 of _0x3261da['processors']||[]){if(!['single',_0x4cf4f3(0x6c7)][_0x4cf4f3(0x1dc)](_0x3aa822['mode']))continue;(_0x3aa822[_0x4cf4f3(0x687)]===_0x4cf4f3(0x3af)||_0x3aa822[_0x4cf4f3(0x687)]===_0x4cf4f3(0x3f6))&&_0x3aa822[_0x4cf4f3(0x5a0)]&&_0x452097[_0x4cf4f3(0x4d2)]((_0x3aa822[_0x4cf4f3(0x758)]||_0x4cf4f3(0x445))+':'+_0x3aa822[_0x4cf4f3(0x5a0)]);const _0x3c9016=_0x3aa822[_0x4cf4f3(0x758)]||_0x4cf4f3(0x445);(_0xbe2daf[_0x3c9016]||=[])[_0x4cf4f3(0x387)]({..._0x3aa822,'env':_0x3c9016,'owner':{'pid':_0x574aa5[_0x4cf4f3(0x789)]??null,'kind':_0x574aa5[_0x4cf4f3(0x4c2)]??null}});}}for(const [_0x53eda2,_0x25a336]of Object[_0x4cf4f3(0x62b)](_0xbe2daf)){for(const _0x2bfd84 of _0x25a336){if(_0x2bfd84[_0x4cf4f3(0x4f5)]===_0x4cf4f3(0x34f)&&!_0x2bfd84[_0x4cf4f3(0x548)]){const _0x2bbd50=_0x53eda2+':'+(_0x2bfd84[_0x4cf4f3(0x5a0)]??'');if(!_0x452097['has'](_0x2bbd50))_0x2bfd84[_0x4cf4f3(0x215)]=!![];}}}return{'envs':_0xbe2daf,'policy':null,'participation':{'participating':_0x32187e,'total':_0xd76ebf},'source':'workers'};}[_0x54a94d(0x70b)](){const _0x4ed30b=_0x54a94d,_0x23293d=_0x42f371=>{const _0x25f69f=_0x4307;if(_0x42f371[_0x25f69f(0x687)]===_0x25f69f(0x3af)||_0x42f371['state']==='building'||_0x42f371[_0x25f69f(0x687)]==='error')return 0x3;if(_0x42f371[_0x25f69f(0x548)])return 0x1;return 0x2;},_0x5341c7=new Map();for(const _0x2cc13b of this[_0x4ed30b(0x1f3)]()){for(const _0x495008 of _0x2cc13b[_0x4ed30b(0x494)]?.['processors']||[]){const _0x8ad488={..._0x495008,'owner':{'pid':_0x2cc13b['pid']??null,'kind':_0x2cc13b[_0x4ed30b(0x4c2)]??null,'host':_0x2cc13b[_0x4ed30b(0x76f)]??null}},_0x29a1de=_0x495008['mode']==='single'?_0x4ed30b(0x328)+(_0x495008[_0x4ed30b(0x758)]??'')+'::'+(_0x495008[_0x4ed30b(0x5a0)]??_0x495008[_0x4ed30b(0x5e4)]??_0x495008['id']):_0x4ed30b(0x275)+(_0x2cc13b[_0x4ed30b(0x2a1)]??_0x2cc13b[_0x4ed30b(0x422)]??'')+'::'+(_0x495008[_0x4ed30b(0x758)]??'')+'::'+_0x495008['id'],_0x3469f3=_0x5341c7[_0x4ed30b(0x3e6)](_0x29a1de);if(!_0x3469f3||_0x23293d(_0x8ad488)>_0x23293d(_0x3469f3))_0x5341c7['set'](_0x29a1de,_0x8ad488);}}return[..._0x5341c7[_0x4ed30b(0x397)]()];}[_0x54a94d(0x691)](){const _0x4c8a0e=_0x54a94d,_0x24260a=Date['now'](),_0x372ac6=this[_0x4c8a0e(0x1f3)](),_0xc5f592=_0x3a7715=>Math[_0x4c8a0e(0x270)](0x0,Math[_0x4c8a0e(0x6bd)]((_0x24260a-(_0x3a7715[_0x4c8a0e(0x714)]||_0x24260a))/0x3e8)),_0x560fb3=_0x372ac6[_0x4c8a0e(0x475)](_0x2f5d2c=>_0x2f5d2c[_0x4c8a0e(0x4c2)]===_0x4c8a0e(0x30c)),_0xeeed80=_0x372ac6[_0x4c8a0e(0x1ff)](_0x3a6a39=>_0x3a6a39[_0x4c8a0e(0x4c2)]==='http-server');if(_0x560fb3||_0xeeed80[_0x4c8a0e(0x503)])return{'primary':_0x560fb3?{'pid':_0x560fb3[_0x4c8a0e(0x789)],'uptime':_0xc5f592(_0x560fb3)}:null,'workers':_0xeeed80[_0x4c8a0e(0x626)](_0x55a5df=>({'pid':_0x55a5df['pid'],'uptime':_0xc5f592(_0x55a5df)})),'workersConfigured':_0x560fb3?.[_0x4c8a0e(0x58a)]?.['workersConfigured']??_0xeeed80[_0x4c8a0e(0x503)],'mode':_0x4c8a0e(0x3a6)};const _0x508c8d=_0x372ac6[_0x4c8a0e(0x475)](_0x2a3e39=>_0x2a3e39[_0x4c8a0e(0x4c2)]===_0x4c8a0e(0x335)||_0x2a3e39[_0x4c8a0e(0x4c2)]===_0x4c8a0e(0x410)||_0x2a3e39[_0x4c8a0e(0x4c2)]==='embedded'),_0x1d8915=_0x508c8d?{'pid':_0x508c8d[_0x4c8a0e(0x789)],'uptime':_0xc5f592(_0x508c8d)}:{'pid':process[_0x4c8a0e(0x789)],'uptime':Math[_0x4c8a0e(0x270)](0x0,Math[_0x4c8a0e(0x6bd)](process['uptime']()))};return{'primary':_0x1d8915,'workers':[_0x1d8915],'workersConfigured':0x1,'mode':_0x4c8a0e(0x34f)};}[_0x54a94d(0x6c9)](){const _0x49b51e=_0x54a94d;return this[_0x49b51e(0x62c)]();}[_0x54a94d(0x448)](){const _0x620866=_0x54a94d,_0xbfc942=new Map();for(const _0x18dfdc of this[_0x620866(0x62c)]())_0xbfc942[_0x620866(0x36f)](_0x18dfdc[_0x620866(0x422)],{..._0x18dfdc,'children':[]});const _0x50e831=[];for(const _0x2bdb34 of _0xbfc942[_0x620866(0x397)]()){const _0x12c0ba=_0x2bdb34['supervisorKey']?_0xbfc942[_0x620866(0x3e6)](_0x2bdb34[_0x620866(0x2fc)]):null;if(_0x12c0ba&&_0x12c0ba!==_0x2bdb34)_0x12c0ba[_0x620866(0x201)][_0x620866(0x387)](_0x2bdb34);else _0x50e831[_0x620866(0x387)](_0x2bdb34);}const _0x2c8683=(_0x1f1ab1,_0x43b606)=>_0x1f1ab1[_0x620866(0x4c2)]===_0x43b606['kind']?(_0x1f1ab1[_0x620866(0x789)]||0x0)-(_0x43b606[_0x620866(0x789)]||0x0):(_0x1f1ab1[_0x620866(0x4c2)]??'')<(_0x43b606[_0x620866(0x4c2)]??'')?-0x1:0x1,_0x20e7a7=_0x4ec944=>{const _0x55d826=_0x620866;_0x4ec944[_0x55d826(0x788)](_0x2c8683);for(const _0x4ed1ec of _0x4ec944)if(_0x4ed1ec[_0x55d826(0x201)][_0x55d826(0x503)])_0x20e7a7(_0x4ed1ec[_0x55d826(0x201)]);};return _0x20e7a7(_0x50e831),_0x50e831;}[_0x54a94d(0x2bd)](_0x4e5dae){const _0x59d66d=_0x54a94d;return this['_groupByProcess']()[_0x59d66d(0x475)](_0x266089=>_0x266089[_0x59d66d(0x422)]===_0x4e5dae)??null;}[_0x54a94d(0x62c)](_0x3d6a5e=Date[_0x54a94d(0x6fd)]()){const _0x103db5=_0x54a94d,_0x56b753=new Map();for(const _0xaebac9 of this['listNodes']()){const _0x751312=_0x55ee5c(_0xaebac9);let _0x1f54ec=_0x56b753[_0x103db5(0x3e6)](_0x751312);!_0x1f54ec&&(_0x1f54ec={'processKey':_0x751312,'nodeKey':_0x751312,'pid':_0xaebac9[_0x103db5(0x789)],'ppid':_0xaebac9[_0x103db5(0x6dd)]??null,'host':_0xaebac9[_0x103db5(0x76f)]??null,'kind':_0xaebac9[_0x103db5(0x4c2)],'role':null,'supervisorKey':_0xaebac9[_0x103db5(0x2fc)]??null,'slot':_0xaebac9[_0x103db5(0x1d1)]??null,'slotKey':_0xaebac9['slotKey']??null,'caps':_0xaebac9[_0x103db5(0x53e)]??null,'lifecycle':_0xaebac9['lifecycle']??null,'uptime':Math['max'](0x0,Math[_0x103db5(0x6bd)]((_0x3d6a5e-(_0xaebac9[_0x103db5(0x714)]||_0x3d6a5e))/0x3e8)),'startedAt':_0xaebac9[_0x103db5(0x714)]??null,'meta':_0xaebac9[_0x103db5(0x58a)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x56b753[_0x103db5(0x36f)](_0x751312,_0x1f54ec));_0x1f54ec[_0x103db5(0x739)][_0x103db5(0x387)]({'instanceId':_0xaebac9[_0x103db5(0x757)]??null,'role':_0xaebac9['role']??null,'listenAddr':_0xaebac9['listenAddr']??null,'lifecycle':_0xaebac9['lifecycle']??null,'processing':_0xaebac9[_0x103db5(0x494)]??null});if(!_0x1f54ec[_0x103db5(0x6ea)]&&_0xaebac9[_0x103db5(0x6ea)])_0x1f54ec['role']=_0xaebac9[_0x103db5(0x6ea)];if(!_0x1f54ec[_0x103db5(0x650)]&&_0xaebac9['listenAddr'])_0x1f54ec[_0x103db5(0x650)]=_0xaebac9[_0x103db5(0x650)];if(!_0x1f54ec[_0x103db5(0x494)]&&_0xaebac9['processing'])_0x1f54ec[_0x103db5(0x494)]=_0xaebac9['processing'];if(!_0x1f54ec[_0x103db5(0x517)]&&_0xaebac9[_0x103db5(0x517)])_0x1f54ec[_0x103db5(0x517)]=_0xaebac9[_0x103db5(0x517)];if(!_0x1f54ec[_0x103db5(0x4e1)]&&_0xaebac9[_0x103db5(0x4e1)])_0x1f54ec[_0x103db5(0x4e1)]=_0xaebac9[_0x103db5(0x4e1)];if(_0x1f54ec[_0x103db5(0x53e)]==null&&_0xaebac9['caps'])_0x1f54ec[_0x103db5(0x53e)]=_0xaebac9[_0x103db5(0x53e)];if(_0xaebac9[_0x103db5(0x5b2)]&&(!_0x1f54ec[_0x103db5(0x5b2)]||(_0xaebac9[_0x103db5(0x5b2)]['at']??0x0)>(_0x1f54ec[_0x103db5(0x5b2)]['at']??0x0)))_0x1f54ec[_0x103db5(0x5b2)]=_0xaebac9[_0x103db5(0x5b2)];}return[..._0x56b753[_0x103db5(0x397)]()];}[_0x54a94d(0x29e)](){const _0x28c6fe=_0x54a94d,_0x35e76d=[],_0x1fea9e={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x15f71e of this['_groupByProcess']()){_0x35e76d[_0x28c6fe(0x387)]({'processKey':_0x15f71e['processKey'],'kind':_0x15f71e['kind'],'pid':_0x15f71e[_0x28c6fe(0x789)],'supervisorKey':_0x15f71e['supervisorKey'],'meta':_0x15f71e[_0x28c6fe(0x58a)]??null,'uptime':_0x15f71e[_0x28c6fe(0x4c1)],'stats':_0x15f71e[_0x28c6fe(0x5b2)]??null}),_0x1fea9e[_0x28c6fe(0x721)]++;if(_0x15f71e['stats']){_0x1fea9e[_0x28c6fe(0x380)]+=_0x15f71e[_0x28c6fe(0x5b2)][_0x28c6fe(0x380)]||0x0,_0x1fea9e[_0x28c6fe(0x685)]+=(_0x15f71e[_0x28c6fe(0x5b2)][_0x28c6fe(0x685)]||0x0)+(_0x15f71e['stats'][_0x28c6fe(0x4da)]?.[_0x28c6fe(0x685)]||0x0);const _0x3ad2db=_0x15f71e[_0x28c6fe(0x5b2)][_0x28c6fe(0x4da)];_0x3ad2db&&(_0x1fea9e[_0x28c6fe(0x4da)][_0x28c6fe(0x5b9)]+=_0x3ad2db[_0x28c6fe(0x5b9)]||0x0,_0x1fea9e[_0x28c6fe(0x4da)][_0x28c6fe(0x24d)]+=_0x3ad2db[_0x28c6fe(0x24d)]||0x0,_0x1fea9e[_0x28c6fe(0x4da)]['busy']+=_0x3ad2db[_0x28c6fe(0x64f)]||0x0);}}return{'totals':_0x1fea9e,'nodes':_0x35e76d};}async['open']({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x1d8004=_0x54a94d;this[_0x1d8004(0x778)]=this['_isWriter']||!!writer,this['_isReader']=this[_0x1d8004(0x623)]||!!reader,this[_0x1d8004(0x51b)]=kind||this[_0x1d8004(0x51b)]||(_0x2d7a1d[_0x1d8004(0x698)]?_0x1d8004(0x5ea):_0x1d8004(0x335)),this[_0x1d8004(0x6f7)]=supervisorKey??this['_supervisorKey'],this[_0x1d8004(0x60f)]=listenAddr??this['_listenAddr'],this[_0x1d8004(0x5b5)](),await this['_migrateVocab']();if(!writer&&!reader)return null;if(!this['_statusEnv']){const _0x59aa40=await this['okdb'][_0x1d8004(0x394)](_0x345b6a,{'sync':![],'durability':_0x1d8004(0x6c1)});await _0x59aa40['ensureType'](_0x12e27e),this[_0x1d8004(0x534)]=_0x59aa40;}return this['_statusEnv'];}[_0x54a94d(0x2e5)](){const _0x13c72c=_0x54a94d;return this['_nodeDbFor']!==this['_statusEnv']&&(this[_0x13c72c(0x268)]=this[_0x13c72c(0x534)],this[_0x13c72c(0x564)]=this['_statusEnv']['_getType'](_0x12e27e)['data']),this['_nodeDbCache'];}[_0x54a94d(0x31e)](_0x5a9c35){const _0x30fa22=_0x54a94d;if(_0x5c9203)return this[_0x30fa22(0x2e5)]()['putSync'](_0x5a9c35[_0x30fa22(0x2a1)],_0x5a9c35,0x1);const _0x1d7834=this['_nodeDb']()[_0x30fa22(0x66a)](_0x5a9c35[_0x30fa22(0x2a1)],_0x5a9c35,0x1);if(_0x1d7834&&typeof _0x1d7834[_0x30fa22(0x4a7)]==='function')_0x1d7834[_0x30fa22(0x4a7)](undefined,()=>{});return _0x1d7834;}[_0x54a94d(0x724)](_0x4d0fc3){const _0x4c06c0=_0x54a94d;return this['_nodeDb']()[_0x4c06c0(0x6da)](_0x4d0fc3[_0x4c06c0(0x2a1)],_0x4d0fc3,0x1);}['_removeRowAsync'](_0x5d7732){const _0x3831a6=_0x54a94d;if(_0x5c9203)try{return this[_0x3831a6(0x2e5)]()['removeSync'](_0x5d7732);}catch{return![];}const _0x242fb2=this[_0x3831a6(0x2e5)]()[_0x3831a6(0x488)](_0x5d7732);if(_0x242fb2&&typeof _0x242fb2['then']==='function')_0x242fb2[_0x3831a6(0x4a7)](undefined,()=>{});return _0x242fb2;}async[_0x54a94d(0x587)](_0x1812ac){const _0x3e8650=_0x54a94d;if(!this[_0x3e8650(0x534)]||!this[_0x3e8650(0x778)]||!_0x1812ac?.[_0x3e8650(0x2a1)])return;return this[_0x3e8650(0x31e)](_0x1812ac);}async[_0x54a94d(0x316)](_0x3e2633){const _0x5f2af2=_0x54a94d;if(!this[_0x5f2af2(0x534)]||!this['_isWriter']||!_0x3e2633)return;const _0x40d61e=_0x3e2633[_0x5f2af2(0x1dc)]('#'),_0x35f879=[];for(const {key:_0x1008c6}of this[_0x5f2af2(0x534)][_0x5f2af2(0x73f)](_0x12e27e)){if(_0x1008c6===_0x3e2633||!_0x40d61e&&typeof _0x1008c6==='string'&&_0x1008c6[_0x5f2af2(0x637)](_0x3e2633+'#'))_0x35f879[_0x5f2af2(0x387)](_0x1008c6);}for(const _0x240efb of _0x35f879){try{this[_0x5f2af2(0x2e5)]()['removeSync'](_0x240efb);}catch{}}}[_0x54a94d(0x2d4)](_0xdebd95){const _0x52a226=_0x54a94d;if(typeof _0xdebd95?.[_0x52a226(0x789)]!=='number')return![];if(_0xdebd95[_0x52a226(0x76f)]!==_0x5cb7ef[_0x52a226(0x57e)]())return![];if(_0xdebd95['pid']===process[_0x52a226(0x789)])return![];if(_0xdebd95['expiresAt']!=null&&_0xdebd95[_0x52a226(0x4f7)]<Date[_0x52a226(0x6fd)]()-_0x1305d0)return!![];try{return process['kill'](_0xdebd95[_0x52a226(0x789)],0x0),![];}catch(_0x5da6cf){return _0x5da6cf[_0x52a226(0x2a0)]===_0x52a226(0x55c);}}[_0x54a94d(0x1f3)](){const _0x54eedb=_0x54a94d;if(!this[_0x54eedb(0x534)])return[];try{this['_statusEnv']['db']?.[_0x54eedb(0x4a2)]?.();}catch{}const _0x2e815e=Date[_0x54eedb(0x6fd)](),_0x34a666=_0x5cb7ef[_0x54eedb(0x57e)](),_0x17a50a=[];for(const {value:_0x501367}of this[_0x54eedb(0x534)][_0x54eedb(0x73f)](_0x12e27e)){if(!_0x501367)continue;let _0x205718=null;_0x501367[_0x54eedb(0x76f)]===_0x34a666&&typeof _0x501367[_0x54eedb(0x789)]==='number'&&(_0x205718=!this['_nodeDead'](_0x501367));if(_0x205718===![])continue;const _0xd41457=_0x501367['expiresAt']==null||_0x501367[_0x54eedb(0x4f7)]>=_0x2e815e;if(_0x205718===!![]||_0xd41457)_0x17a50a['push'](_0x501367);}return _0x17a50a;}async['reap'](_0x4ae049=0x0){const _0x290c7a=_0x54a94d;if(!this['_statusEnv']||!this[_0x290c7a(0x778)])return;const _0x53bbd5=Date[_0x290c7a(0x6fd)]()-_0x4ae049,_0x132551=new Set(),_0x1d58b9=[],_0x23f61e=_0x5cb7ef[_0x290c7a(0x57e)](),_0x5ac256=require$$3['version'];for(const {key:_0x196146,value:_0x4a9113}of this[_0x290c7a(0x534)]['getRange'](_0x12e27e)){if(!_0x4a9113)continue;const _0x102784=_0x4a9113[_0x290c7a(0x76f)]===_0x23f61e&&typeof _0x4a9113[_0x290c7a(0x789)]===_0x290c7a(0x6e3),_0x52fc75=_0x102784?this[_0x290c7a(0x2d4)](_0x4a9113):_0x4a9113['expiresAt']!=null&&_0x4a9113[_0x290c7a(0x4f7)]<_0x53bbd5;if(_0x52fc75)_0x1d58b9[_0x290c7a(0x387)](_0x196146);else{_0x132551['add'](_0x55ee5c(_0x4a9113)??_0x196146);if(_0x4a9113[_0x290c7a(0x2b3)]&&_0x4a9113[_0x290c7a(0x2b3)]!==_0x5ac256){if(!this[_0x290c7a(0x1a3)])this[_0x290c7a(0x1a3)]=new Set();!this[_0x290c7a(0x1a3)][_0x290c7a(0x52e)](_0x4a9113[_0x290c7a(0x2b3)])&&(this[_0x290c7a(0x1a3)][_0x290c7a(0x4d2)](_0x4a9113[_0x290c7a(0x2b3)]),this[_0x290c7a(0x784)][_0x290c7a(0x273)]?.['warn']?.(_0x290c7a(0x607)+(_0x4a9113['pid']??'?')+'\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20'+_0x4a9113[_0x290c7a(0x2b3)]+_0x290c7a(0x485)+_0x5ac256+_0x290c7a(0x1a5)+_0x290c7a(0x453),{'feature':'migrations'}));}}}for(const _0x23a80e of _0x1d58b9)this['_removeRowAsync'](_0x23a80e);if(this[_0x290c7a(0x5b5)]()){const _0x2334e7=[];for(const {key:_0xbba873}of this[_0x290c7a(0x3e1)]('node')){if(!_0x132551[_0x290c7a(0x52e)](_0xbba873)){if(_0x5c9203)try{this['_desired']['removeSync']('node/'+_0xbba873);}catch{}else _0x2334e7[_0x290c7a(0x387)](this[_0x290c7a(0x6a6)]['remove'](_0x290c7a(0x470)+_0xbba873));}}if(_0x2334e7['length'])await Promise[_0x290c7a(0x6ed)](_0x2334e7);}}[_0x54a94d(0x5bc)](_0x3736d4=null){const _0x3dfbb9=_0x54a94d;if(this['_hbTimer'])return;if(!this[_0x3dfbb9(0x778)]||!this[_0x3dfbb9(0x534)]){this[_0x3dfbb9(0x784)]?.[_0x3dfbb9(0x273)]?.[_0x3dfbb9(0x21b)]?.(_0x3dfbb9(0x2eb)+this[_0x3dfbb9(0x778)]+_0x3dfbb9(0x526)+!!this[_0x3dfbb9(0x534)]+')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census',{'feature':_0x3dfbb9(0x721)});return;}this[_0x3dfbb9(0x5cf)]=_0x3736d4,this[_0x3dfbb9(0x5f0)]=()=>this[_0x3dfbb9(0x559)]();for(const _0x1f4921 of _0x593c61)this[_0x3dfbb9(0x784)][_0x3dfbb9(0x3e2)]['on'](_0x1f4921,this[_0x3dfbb9(0x5f0)]);this[_0x3dfbb9(0x468)]();const _0x23ec55=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x3e0276;this[_0x3dfbb9(0x421)]=setInterval(()=>{const _0x191e0b=_0x3dfbb9;if(this['_onTick'])try{this[_0x191e0b(0x5cf)]();}catch{}this[_0x191e0b(0x468)](),this[_0x191e0b(0x62d)]()[_0x191e0b(0x628)](()=>{});},_0x23ec55);if(this[_0x3dfbb9(0x421)][_0x3dfbb9(0x442)])this[_0x3dfbb9(0x421)]['unref']();}[_0x54a94d(0x559)](){const _0x4b4dbd=_0x54a94d;if(!this[_0x4b4dbd(0x778)]||!this['_statusEnv'])return;if(Date['now']()-this[_0x4b4dbd(0x5ec)]<_0x2744de)return;this[_0x4b4dbd(0x468)]();}['_publishNow'](){const _0x2992d3=_0x54a94d;if(!this['_isWriter']||!this[_0x2992d3(0x534)])return;this[_0x2992d3(0x5ec)]=Date[_0x2992d3(0x6fd)]();try{const _0x5efda3=[this[_0x2992d3(0x72b)]()];for(const _0x4b67ac of this['_children'][_0x2992d3(0x397)]())_0x5efda3['push'](this[_0x2992d3(0x35c)](_0x4b67ac));const _0x4d0bf4=_0x32ffdd['enabled']?_0x32ffdd[_0x2992d3(0x6fd)]():0x0;for(const _0x5ea832 of _0x5efda3){try{this['_putRowSync'](_0x5ea832),this['_publishFailWarned']=![];}catch(_0x147286){!this['_publishFailWarned']&&(this[_0x2992d3(0x5e3)]=!![],this[_0x2992d3(0x784)]?.[_0x2992d3(0x273)]?.[_0x2992d3(0x21b)]?.(_0x2992d3(0x423)+_0x147286[_0x2992d3(0x1e0)],{'feature':'processes'}));}}if(_0x32ffdd[_0x2992d3(0x40c)])_0x32ffdd['note'](_0x2992d3(0x369),_0x32ffdd[_0x2992d3(0x6fd)]()-_0x4d0bf4,'rows='+_0x5efda3['length']+_0x2992d3(0x1f6));}catch(_0x386d0c){!this['_publishFailWarned']&&(this['_publishFailWarned']=!![],this[_0x2992d3(0x784)]?.['log']?.[_0x2992d3(0x21b)]?.(_0x2992d3(0x423)+_0x386d0c[_0x2992d3(0x1e0)],{'feature':_0x2992d3(0x721)}));}}async[_0x54a94d(0x2de)](){const _0x52c2cc=_0x54a94d;if(this[_0x52c2cc(0x5f0)]){for(const _0x396b15 of _0x593c61){try{this[_0x52c2cc(0x784)][_0x52c2cc(0x3e2)][_0x52c2cc(0x77f)](_0x396b15,this['_onProcEvent']);}catch{}}this[_0x52c2cc(0x5f0)]=null;}this[_0x52c2cc(0x421)]&&(clearInterval(this[_0x52c2cc(0x421)]),this['_hbTimer']=null);try{if(this[_0x52c2cc(0x534)]&&this['_isWriter'])await this[_0x52c2cc(0x316)](this['_rowKey']);}catch{}}async['deregisterSelf'](){const _0x53bd42=_0x54a94d;if(!this[_0x53bd42(0x534)]||!this[_0x53bd42(0x778)])return;try{await this['removeNode'](this[_0x53bd42(0x1df)]);}catch{}try{const _0x13ecce=[];for(const {value:_0x671e9b}of this['_statusEnv'][_0x53bd42(0x73f)](_0x12e27e)){if(_0x671e9b?.[_0x53bd42(0x6dd)]===process[_0x53bd42(0x789)]&&_0x671e9b[_0x53bd42(0x2a1)])_0x13ecce[_0x53bd42(0x387)](_0x671e9b[_0x53bd42(0x2a1)]);}for(const _0x3eb679 of _0x13ecce){try{await this[_0x53bd42(0x316)](_0x3eb679);}catch{}}}catch{}}async['publishOwnRow'](){const _0x524aef=_0x54a94d;return this['putNode'](this[_0x524aef(0x72b)]());}async['publishChildRow'](_0x1736aa){const _0x4ed77d=_0x54a94d;if(!this['_statusEnv']||!this[_0x4ed77d(0x778)])return;return this['putNode'](this['_buildChildRow'](_0x1736aa));}[_0x54a94d(0x35c)]({pid:_0x3008f2,startedAt:_0x3a7793,kind:_0x172a93,supervisorKey:_0x4e77cb,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x54a94d(0x390),meta:meta=null,stats:stats=null}){const _0x54d681=_0x54a94d,_0x5347b3=Date[_0x54d681(0x6fd)](),_0x3f8add=_0x3355a2(_0x3008f2,_0x3a7793);return{'nodeKey':_0x474b19(_0x3f8add,'0'),'processKey':_0x3f8add,'instanceId':'0','pid':_0x3008f2,'startedAt':_0x3a7793,'ppid':process[_0x54d681(0x789)],'host':_0x5cb7ef[_0x54d681(0x57e)](),'supervisorKey':_0x4e77cb,'slot':slot,'slotKey':slotKey,'kind':_0x172a93,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x5347b3,'expiresAt':_0x5347b3+_0x5298b5,'caps':this[_0x54d681(0x37d)](_0x172a93,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x54a94d(0x68f)](_0x5db532){const _0x2871e9=_0x54a94d;if(!_0x5db532?.[_0x2871e9(0x789)])return null;const _0x2af78d=_0x3355a2(_0x5db532[_0x2871e9(0x789)],_0x5db532[_0x2871e9(0x714)]);this[_0x2871e9(0x719)][_0x2871e9(0x36f)](_0x2af78d,{..._0x5db532,'supervisorKey':_0x5db532[_0x2871e9(0x2fc)]??this['_selfKey']});if(this['_isWriter'])await this['publishChildRow'](this[_0x2871e9(0x719)][_0x2871e9(0x3e6)](_0x2af78d))[_0x2871e9(0x628)]?.(()=>{});return _0x2af78d;}[_0x54a94d(0x1f4)](_0x54d4a0){const _0x5bd6b7=_0x54a94d;if(!_0x54d4a0)return;return this[_0x5bd6b7(0x719)][_0x5bd6b7(0x560)](_0x54d4a0),this['removeNode'](_0x54d4a0);}[_0x54a94d(0x627)](){const _0x152398=_0x54a94d,_0x13f839=Date[_0x152398(0x6fd)](),_0x477783=process[_0x152398(0x2fd)](),_0x2c6a7a=(_0x13f839-this[_0x152398(0x68d)])*0x3e8;if(_0x2c6a7a>=0x3d090){const _0x11e70b=_0x477783[_0x152398(0x76c)]-this['_lastCpuUsage'][_0x152398(0x76c)]+(_0x477783[_0x152398(0x2ad)]-this[_0x152398(0x542)]['system']),_0x24ac38=_0x5cb7ef[_0x152398(0x573)]()['length']||0x1;this[_0x152398(0x43a)]=Math['min'](0x64,Math[_0x152398(0x6bd)](_0x11e70b/(_0x2c6a7a*_0x24ac38)*0x64)),this[_0x152398(0x579)]=Math[_0x152398(0x6bd)](_0x2c6a7a/0x3e8),this[_0x152398(0x542)]=_0x477783,this[_0x152398(0x68d)]=_0x13f839;}const _0x15315a=process['memoryUsage'](),_0x43553e=this['_threadStats'][_0x152398(0x1f8)];let _0x1b0817=0x0;if(_0x43553e>0x0){const _0x57e8a2=[this[_0x152398(0x784)],...this['okdb']['_envs']?.[_0x152398(0x397)]?.()??[]];for(const _0x495e84 of _0x57e8a2){const _0x43f3fa=_0x495e84[_0x152398(0x59b)]?.[_0x152398(0x2ed)];if(_0x43f3fa)_0x1b0817+=_0x43f3fa[_0x152398(0x707)][_0x152398(0x64f)];}}let _0x32e4d3=null;const _0x1372c=_0x43553e;if(_0x1372c>0x0){let _0x5b8cd0=0x0;for(const _0x493976 of this[_0x152398(0x4ed)][_0x152398(0x397)]())_0x5b8cd0+=_0x493976['heapUsed']||0x0;_0x32e4d3={'count':_0x1372c,'heapUsed':_0x5b8cd0,'sandbox':_0x43553e,'busy':_0x1b0817};}return{'rss':_0x15315a[_0x152398(0x380)],'heapUsed':_0x15315a[_0x152398(0x685)],'heapTotal':_0x15315a['heapTotal'],'external':_0x15315a[_0x152398(0x756)],'cpuPct':this[_0x152398(0x43a)],'cpuWindowMs':this['_lastCpuWindowMs']??null,'threads':_0x32e4d3,'at':_0x13f839};}['reportThreadStats'](_0x3909cc,_0x5f5099){const _0x5c2ab9=_0x54a94d;if(!_0x3909cc||!_0x5f5099)return;this[_0x5c2ab9(0x4ed)][_0x5c2ab9(0x36f)](_0x3909cc,_0x5f5099);}['clearThreadStats'](_0x99807b){const _0x366b84=_0x54a94d;this[_0x366b84(0x4ed)][_0x366b84(0x560)](_0x99807b);}[_0x54a94d(0x6aa)](_0x50ed4e,_0x310aeb,_0x1c7af5=undefined){const _0x4817e5=_0x54a94d,_0x53af51=this[_0x4817e5(0x719)]['get'](_0x50ed4e);if(!_0x53af51||!_0x310aeb)return;if(_0x1c7af5!==undefined)_0x53af51[_0x4817e5(0x494)]=_0x1c7af5;_0x53af51[_0x4817e5(0x5b2)]={'rss':_0x310aeb[_0x4817e5(0x380)]??null,'heapUsed':_0x310aeb[_0x4817e5(0x685)]??null,'heapTotal':_0x310aeb['heapTotal']??null,'external':_0x310aeb[_0x4817e5(0x756)]??null,'cpuPct':_0x310aeb[_0x4817e5(0x234)]??null,'cpuWindowMs':_0x310aeb[_0x4817e5(0x1b6)]??null,'threads':_0x310aeb[_0x4817e5(0x4da)]??null,'claims':_0x310aeb[_0x4817e5(0x48c)]??null,'envsOpen':_0x310aeb['envsOpen']??null,'at':Date[_0x4817e5(0x6fd)]()};}[_0x54a94d(0x72b)](){const _0x534615=_0x54a94d,_0x2b8ddc=Date[_0x534615(0x6fd)](),_0x773f65=this[_0x534615(0x784)][_0x534615(0x2be)]||{},_0x41d009=this[_0x534615(0x51b)]||'cli';return{'nodeKey':this[_0x534615(0x1df)],'processKey':this[_0x534615(0x4d4)],'instanceId':this[_0x534615(0x6e7)],'pid':process[_0x534615(0x789)],'startedAt':this[_0x534615(0x5c7)],'instanceStartedAt':this[_0x534615(0x334)],'ppid':typeof process[_0x534615(0x6dd)]===_0x534615(0x6e3)?process[_0x534615(0x6dd)]:null,'host':_0x5cb7ef[_0x534615(0x57e)](),'supervisorKey':this[_0x534615(0x6f7)]??null,'version':require$$3[_0x534615(0x2b3)],'kind':_0x41d009,'role':{'engines':!!_0x773f65[_0x534615(0x517)],'processors':!!_0x773f65[_0x534615(0x471)],'compaction':_0x773f65['compaction'],'http':_0x773f65[_0x534615(0x635)]},'listenAddr':this[_0x534615(0x60f)]??null,'heartbeatAt':_0x2b8ddc,'expiresAt':_0x2b8ddc+_0x5298b5,'caps':this['_caps'](_0x41d009,_0x773f65),'lifecycle':{'state':_0x534615(0x390),'desiredVersionApplied':null},'meta':{...this['_ownMeta']},'processing':_0x773f65[_0x534615(0x471)]?this[_0x534615(0x597)]():null,'engines':_0x773f65[_0x534615(0x517)]?[...this[_0x534615(0x784)]['_servingEngines']??[]]:null,'singletonClaims':this[_0x534615(0x770)](),'stats':this[_0x534615(0x627)](),'writers':this[_0x534615(0x6e2)]()};}[_0x54a94d(0x6e2)](){const _0x58f446=_0x54a94d,_0x58f277={};try{for(const [_0x5ca1a2,_0xd5533e]of this[_0x58f446(0x784)][_0x58f446(0x6ca)]){try{const _0x3f197f=_0xd5533e[_0x58f446(0x40a)]?.();if(!_0x3f197f)continue;if(!_0x3f197f[_0x58f446(0x52c)]&&!_0x3f197f[_0x58f446(0x589)]&&!(_0x3f197f[_0x58f446(0x3fd)]??0x0)&&!_0x3f197f[_0x58f446(0x2b8)])continue;_0x58f277[_0x5ca1a2]={'depth':_0x3f197f[_0x58f446(0x52c)],'oldestPendingMs':_0x3f197f['oldestPendingMs'],'committed':_0x3f197f[_0x58f446(0x589)],'commitsPerSec':_0x3f197f[_0x58f446(0x661)],'commitP99Ms':_0x3f197f[_0x58f446(0x658)],'parkedNow':_0x3f197f[_0x58f446(0x3fd)]??0x0,'draining':!!_0x3f197f['draining']};}catch{}}}catch{}return Object['keys'](_0x58f277)[_0x58f446(0x503)]?_0x58f277:null;}['_collectSingletonClaims'](){const _0x17f77c=_0x54a94d,_0x1031e3=process[_0x17f77c(0x789)],_0x54f4f9=Date['now'](),_0x4b8701=_0x509356=>{const _0x341a81=_0x17f77c;if(!_0x509356)return[];const _0x28e0b8=[];try{for(const {id:_0x14f867,entry:_0x5a16e8}of _0x509356[_0x341a81(0x437)]()){if(_0x5a16e8?.['holder']?.[_0x341a81(0x789)]!==_0x1031e3)continue;const _0x28148c=_0x5a16e8[_0x341a81(0x4cf)]??_0x5a16e8['acquiredAt']??0x0;if(_0x28148c+(_0x5a16e8['ttlMs']??0x0)<_0x54f4f9)continue;_0x28e0b8[_0x341a81(0x387)](_0x14f867);}}catch{}return _0x28e0b8;},_0x4be08e=_0x4b8701(this[_0x17f77c(0x66b)](_0x17f77c(0x5c3))),_0x30a4ce=_0x4b8701(this[_0x17f77c(0x66b)](_0x17f77c(0x317)));if(!_0x4be08e[_0x17f77c(0x503)]&&!_0x30a4ce['length'])return null;return{'compact':_0x4be08e,'replicate':_0x30a4ce};}[_0x54a94d(0x66b)](_0x518bce){const _0x3a1951=_0x54a94d;if(!this['okdb']?.[_0x3a1951(0x765)])return null;if(!this['_singletonLocks'])this[_0x3a1951(0x640)]=new Map();let _0x1d2eaa=this['_singletonLocks'][_0x3a1951(0x3e6)](_0x518bce);if(!_0x1d2eaa)try{_0x1d2eaa=new _0x12ee53(this['okdb'][_0x3a1951(0x765)],{'namespace':_0x518bce}),this[_0x3a1951(0x640)][_0x3a1951(0x36f)](_0x518bce,_0x1d2eaa);}catch{return null;}return _0x1d2eaa;}[_0x54a94d(0x597)](){const _0x3c09a4=_0x54a94d,_0x354024=[];try{for(const [_0x48b7cc,_0x23522a]of this[_0x3c09a4(0x784)][_0x3c09a4(0x6ca)]){if(_0x48b7cc[_0x3c09a4(0x637)]('~'))continue;for(const _0x54a7a4 of _0x23522a[_0x3c09a4(0x3a9)][_0x3c09a4(0x1bf)]())_0x354024['push']({..._0x54a7a4,'env':_0x48b7cc});}}catch{}return{'participate':this[_0x3c09a4(0x784)][_0x3c09a4(0x471)]?.['_participate']??![],'processors':_0x354024};}[_0x54a94d(0x5b5)](){const _0x4a8e0b=_0x54a94d;if(this[_0x4a8e0b(0x6a6)])return!![];const _0x13a0ea=this[_0x4a8e0b(0x784)][_0x4a8e0b(0x765)];if(!_0x13a0ea)return![];return this['_desired']=_0x13a0ea[_0x4a8e0b(0x79e)](_0x334020,{'dupSort':![]}),this[_0x4a8e0b(0x704)]=_0x13a0ea['openDB'](_0x1a73d2,{'dupSort':![]}),!![];}async[_0x54a94d(0x795)](){const _0x517cb7=_0x54a94d;if(!this['_ensureDesired']())return;const _0x4b8363=_0x517cb7(0x6c8),_0x1a21b5=0x1,_0x39ed3c=this[_0x517cb7(0x6a6)][_0x517cb7(0x3e6)](_0x4b8363)??0x0;if(_0x39ed3c>=_0x1a21b5)return;const _0x4ca8ca=_0x25260c=>{const _0x426fc2=_0x517cb7;if(_0x25260c===_0x426fc2(0x502))return _0x426fc2(0x34f);if(_0x25260c===_0x426fc2(0x59a))return _0x426fc2(0x6c7);return _0x25260c;};await this['okdb']['_systemEnv'][_0x517cb7(0x398)][_0x517cb7(0x5ab)](()=>{const _0x5dc1e2=_0x517cb7;for(const _0x584062 of['procmode/',_0x5dc1e2(0x5f9)]){for(const {key:_0x54fa31,value:_0x19097d}of this[_0x5dc1e2(0x6a6)][_0x5dc1e2(0x73f)]({'start':_0x584062,'end':_0x584062+'\xff'})){if(typeof _0x54fa31!==_0x5dc1e2(0x44e)||!_0x54fa31['startsWith'](_0x584062))break;const _0x8c828d=_0x4ca8ca(_0x19097d[_0x5dc1e2(0x4f5)]);if(_0x8c828d!==_0x19097d[_0x5dc1e2(0x4f5)])this[_0x5dc1e2(0x6a6)][_0x5dc1e2(0x66a)](_0x54fa31,{..._0x19097d,'mode':_0x8c828d});}}this[_0x5dc1e2(0x6a6)][_0x5dc1e2(0x66a)](_0x4b8363,_0x1a21b5);});}['hasDesired'](){const _0x34306a=_0x54a94d;return!!this[_0x34306a(0x6a6)];}['getDesired'](_0xde0912,_0x568d5c){const _0x42e653=_0x54a94d;if(!this[_0x42e653(0x5b5)]())return null;const _0x206e70=_0xde0912+'/'+_0x568d5c;return this[_0x42e653(0x695)](),this[_0x42e653(0x2b1)][_0x42e653(0x3e6)](_0x206e70)??this[_0x42e653(0x6a6)][_0x42e653(0x3e6)](_0x206e70)??null;}[_0x54a94d(0x695)](){const _0x446eb6=_0x54a94d;if(!_0x5c9203)return;try{this[_0x446eb6(0x784)][_0x446eb6(0x791)]?.['db']?.['resetReadTxn']?.();}catch{}}async[_0x54a94d(0x305)](_0x366897,_0x3a664d,_0x9527d1){const _0x171f46=_0x54a94d;if(!this['_ensureDesired']())return null;const _0x109e66=_0x366897+'/'+_0x3a664d;this['_refreshDesiredSnapshot']();const _0x803e1a=this['_desiredOverlay'][_0x171f46(0x3e6)](_0x109e66)??this['_desired'][_0x171f46(0x3e6)](_0x109e66)??{'version':0x0},_0x1415c8=(_0x803e1a[_0x171f46(0x2b3)]||0x0)+0x1,_0x55019b={..._0x803e1a,..._0x9527d1,'version':_0x1415c8,'updatedAt':Date['now']()};this[_0x171f46(0x2b1)]['set'](_0x109e66,_0x55019b);try{await this['okdb'][_0x171f46(0x791)][_0x171f46(0x398)][_0x171f46(0x5ab)](()=>{const _0x559dbc=_0x171f46;this[_0x559dbc(0x6a6)][_0x559dbc(0x66a)](_0x109e66,_0x55019b);});}finally{if(this[_0x171f46(0x2b1)][_0x171f46(0x3e6)](_0x109e66)===_0x55019b)this['_desiredOverlay'][_0x171f46(0x560)](_0x109e66);}return _0x1415c8;}[_0x54a94d(0x3e1)](_0x381858){const _0x3fe365=_0x54a94d;if(!this[_0x3fe365(0x5b5)]())return[];this[_0x3fe365(0x695)]();const _0x3600a3=_0x381858+'/',_0x559c6b=[];for(const {key:_0x317869,value:_0x1a1a29}of this[_0x3fe365(0x6a6)][_0x3fe365(0x73f)]({'start':_0x3600a3,'end':_0x3600a3+'\xff'})){if(typeof _0x317869!==_0x3fe365(0x44e)||!_0x317869[_0x3fe365(0x637)](_0x3600a3))break;_0x559c6b[_0x3fe365(0x387)]({'key':_0x317869[_0x3fe365(0x5b8)](_0x3600a3['length']),'value':_0x1a1a29});}return _0x559c6b;}[_0x54a94d(0x3b4)](_0x123129){const _0x2fde17=_0x54a94d;if(!this[_0x2fde17(0x5b5)]())return null;return this[_0x2fde17(0x704)][_0x2fde17(0x3e6)](_0x123129)??null;}async[_0x54a94d(0x515)](_0x1eccce,_0xba5a1c,_0x2bbd29={}){const _0x2e518f=_0x54a94d;if(!this[_0x2e518f(0x5b5)]())return null;let _0x136c1f;return await this['okdb'][_0x2e518f(0x791)][_0x2e518f(0x398)][_0x2e518f(0x5ab)](()=>{const _0x406fb3=_0x2e518f,_0x420909=this['_cmd'][_0x406fb3(0x3e6)](_0x1eccce)||{'epoch':0x0};_0x136c1f=(_0x420909['epoch']||0x0)+0x1,this[_0x406fb3(0x704)]['put'](_0x1eccce,{..._0x420909,..._0x2bbd29,'cmd':_0xba5a1c,'epoch':_0x136c1f,'updatedAt':Date['now']()});}),_0x136c1f;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x1eefa2,'nodeKey':_0x3355a2,'logicalKey':_0x2137c4,'slotKey':_0x23bc47,'PROCESS_ENV':_0x345b6a,'NODE_TYPE':_0x12e27e},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x4d8d43=_0x362184;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x2b7950=require$$0$5,{EVENTS:_0x2a7187,CHANGE_ACTIONS:_0x41241f}=requireOkdbEnums(),{LOOP:_0x5c9ca7}=requireOkdbLoopMonitor(),_0x550fba=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x1fc789=0x5,_0x30a6e0=0x2710;class _0xa6fc1e extends _0x2b7950{constructor(_0x5b34c9,_0x51faf9={}){const _0x4e8339=_0x4307;super(),this['okdb']=_0x5b34c9,this[_0x4e8339(0x679)]=_0x51faf9[_0x4e8339(0x760)]??_0x550fba,this[_0x4e8339(0x1b4)]=_0x51faf9[_0x4e8339(0x37a)]??_0x1fc789,this['_dedupeMax']=_0x51faf9[_0x4e8339(0x3e0)]??_0x30a6e0,this['_started']=![],this[_0x4e8339(0x2d3)]=new Map(),this['_baselines']=new Map(),this[_0x4e8339(0x769)]=new Map(),this[_0x4e8339(0x79f)]=null,this[_0x4e8339(0x352)]=![],this['_seen']=new Set(),this['_onItem']=_0x1c9f59=>this[_0x4e8339(0x46d)](_0x1c9f59),this[_0x4e8339(0x5a7)]=_0x5ea4a9=>this[_0x4e8339(0x5cd)](_0x5ea4a9),this[_0x4e8339(0x593)]=()=>this[_0x4e8339(0x1d2)]();}['start'](){const _0x1a4123=_0x4307;if(this[_0x1a4123(0x427)])return;this[_0x1a4123(0x427)]=!![];for(const [_0x13f165,_0x27ffd1]of this[_0x1a4123(0x784)][_0x1a4123(0x6ca)]){if(_0x13f165['startsWith']('~'))continue;try{_0x27ffd1['_enableChangelog']();}catch{}}for(const [_0x326597,_0x70dfc1]of this[_0x1a4123(0x784)][_0x1a4123(0x6ca)]){if(_0x326597[_0x1a4123(0x637)]('~'))continue;try{this[_0x1a4123(0x59d)]['set'](_0x326597,_0x70dfc1[_0x1a4123(0x43f)]()||0x0);}catch{}}const {events:_0x5afc99}=this[_0x1a4123(0x784)];_0x5afc99['on'](_0x2a7187['ITEM_CREATE'],this[_0x1a4123(0x6b0)]),_0x5afc99['on'](_0x2a7187['ITEM_UPDATE'],this['_onItem']),_0x5afc99['on'](_0x2a7187[_0x1a4123(0x2ee)],this[_0x1a4123(0x6b0)]),_0x5afc99['on'](_0x2a7187[_0x1a4123(0x5b1)],this['_onPoke']),_0x5afc99[_0x1a4123(0x3c3)](_0x2a7187[_0x1a4123(0x567)],this[_0x1a4123(0x593)]);}[_0x4d8d43(0x1d2)](){const _0x39254c=_0x4d8d43;if(!this['_started'])return;this[_0x39254c(0x427)]=![];const {events:_0x16897a}=this[_0x39254c(0x784)];_0x16897a[_0x39254c(0x77f)](_0x2a7187[_0x39254c(0x191)],this[_0x39254c(0x6b0)]),_0x16897a[_0x39254c(0x77f)](_0x2a7187[_0x39254c(0x5fb)],this[_0x39254c(0x6b0)]),_0x16897a[_0x39254c(0x77f)](_0x2a7187['ITEM_REMOVE'],this['_onItem']),_0x16897a[_0x39254c(0x77f)](_0x2a7187[_0x39254c(0x5b1)],this[_0x39254c(0x5a7)]);try{_0x16897a['off'](_0x2a7187[_0x39254c(0x567)],this[_0x39254c(0x593)]);}catch{}this[_0x39254c(0x79f)]&&(clearTimeout(this['_flushTimer']),this[_0x39254c(0x79f)]=null),this['_pending'][_0x39254c(0x3dd)](),this['_cursors'][_0x39254c(0x3dd)](),this[_0x39254c(0x59d)]['clear'](),this[_0x39254c(0x4f3)][_0x39254c(0x3dd)]();}['_dedupeKey'](_0x591665,_0xb3e8c7,_0x111d52,_0x217f47){return _0x591665+'\x00'+_0xb3e8c7+'\x00'+_0x111d52+'\x00'+_0x217f47;}[_0x4d8d43(0x24c)](_0x1e9932,_0x3ae040,_0x5a9e02,_0x3d51bb){const _0x39b7d9=_0x4d8d43,_0x2db4f1=this[_0x39b7d9(0x25d)](_0x1e9932,_0x3ae040,_0x5a9e02,_0x3d51bb);if(this[_0x39b7d9(0x4f3)][_0x39b7d9(0x52e)](_0x2db4f1))return![];this[_0x39b7d9(0x4f3)][_0x39b7d9(0x4d2)](_0x2db4f1);if(this[_0x39b7d9(0x4f3)][_0x39b7d9(0x1f8)]>this[_0x39b7d9(0x346)]){const _0x20a964=this[_0x39b7d9(0x4f3)][_0x39b7d9(0x397)]()[_0x39b7d9(0x439)]()[_0x39b7d9(0x481)];this[_0x39b7d9(0x4f3)]['delete'](_0x20a964);}return!![];}[_0x4d8d43(0x46d)](_0x575174){const _0x57fa90=_0x4d8d43;if(!this['_started']||!_0x575174)return;const {env:_0x2aece1,type:_0x17f898,key:_0x4b10d3,clock:_0x39cf5f,origin:_0x365d4a,action:_0x294e2f,newValue:_0x394a97,oldValue:_0x1ab1ce}=_0x575174;if(_0x2aece1==null||_0x17f898==null||_0x4b10d3==null)return;if(typeof _0x2aece1==='string'&&_0x2aece1[_0x57fa90(0x637)]('~'))return;if(typeof _0x17f898===_0x57fa90(0x44e)&&_0x17f898[_0x57fa90(0x637)]('~'))return;if(!this[_0x57fa90(0x24c)](_0x2aece1,_0x17f898,_0x4b10d3,_0x39cf5f))return;const _0x557976=_0x294e2f===_0x41241f[_0x57fa90(0x43b)]?_0x57fa90(0x488):'put';this[_0x57fa90(0x41f)](_0x57fa90(0x50d),{'env':_0x2aece1,'type':_0x17f898,'key':_0x4b10d3,'op':_0x557976,'clock':_0x39cf5f,'origin':_0x365d4a,'value':_0x557976===_0x57fa90(0x488)?null:_0x394a97,'prevValue':_0x1ab1ce});}[_0x4d8d43(0x5cd)](_0x78fb1a){const _0x21059e=_0x4d8d43;if(!this['_started'])return;if(!_0x78fb1a||typeof _0x78fb1a[_0x21059e(0x758)]!==_0x21059e(0x44e)||typeof _0x78fb1a[_0x21059e(0x5e4)]!==_0x21059e(0x44e))return;const {env:_0x4e58d5,type:_0x3fcb87}=_0x78fb1a;if(_0x4e58d5[_0x21059e(0x637)]('~')||_0x3fcb87['startsWith']('~'))return;this['_pending'][_0x21059e(0x36f)](_0x4e58d5+'\x00'+_0x3fcb87,{'env':_0x4e58d5,'type':_0x3fcb87}),this[_0x21059e(0x56e)]();}[_0x4d8d43(0x56e)](){const _0x47ea29=_0x4d8d43;if(this[_0x47ea29(0x79f)])return;const _0x13d2fc=()=>{const _0x331853=_0x47ea29;this[_0x331853(0x79f)]=null,this[_0x331853(0x4bf)]()[_0x331853(0x628)](()=>{});};this[_0x47ea29(0x79f)]=setTimeout(_0x13d2fc,this[_0x47ea29(0x1b4)]>0x0?this[_0x47ea29(0x1b4)]:0x0);}async[_0x4d8d43(0x4bf)](){const _0x525135=_0x4d8d43;if(this['_draining']){this[_0x525135(0x56e)]();return;}this[_0x525135(0x352)]=!![];try{const _0x4a9d26=[...this[_0x525135(0x769)][_0x525135(0x397)]()];this[_0x525135(0x769)][_0x525135(0x3dd)]();let _0x1df431=![];for(const {env:_0x5b28bf,type:_0x51dc90}of _0x4a9d26){try{const _0x7596b4=await this['_drainOne'](_0x5b28bf,_0x51dc90);if(_0x7596b4)_0x1df431=!![];}catch{this[_0x525135(0x769)][_0x525135(0x36f)](_0x5b28bf+'\x00'+_0x51dc90,{'env':_0x5b28bf,'type':_0x51dc90}),_0x1df431=!![];}}if(_0x1df431||this[_0x525135(0x769)]['size']>0x0)this[_0x525135(0x56e)]();}finally{this[_0x525135(0x352)]=![];}}async[_0x4d8d43(0x6de)](_0x302caa,_0x58dbdb){const _0x477103=_0x4d8d43,_0x2efdd8=await this[_0x477103(0x784)][_0x477103(0x4f1)](_0x302caa),_0x40862e=_0x302caa+'\x00'+_0x58dbdb;!this[_0x477103(0x2d3)][_0x477103(0x52e)](_0x40862e)&&(!this[_0x477103(0x59d)][_0x477103(0x52e)](_0x302caa)&&(_0x2efdd8['_enableChangelog'](),this['_baselines'][_0x477103(0x36f)](_0x302caa,_0x2efdd8[_0x477103(0x43f)]()||0x0)),this[_0x477103(0x2d3)][_0x477103(0x36f)](_0x40862e,this[_0x477103(0x59d)][_0x477103(0x3e6)](_0x302caa)));const _0x35dfa6=this[_0x477103(0x2d3)][_0x477103(0x3e6)](_0x40862e),_0x4fdf80=_0x2efdd8[_0x477103(0x43f)](_0x58dbdb)||0x0;if(_0x4fdf80<=_0x35dfa6)return![];const _0x13495f=_0x35dfa6+this[_0x477103(0x679)],_0x23c765=Math['min'](_0x4fdf80,_0x13495f),_0x2a6fdb=_0x5c9ca7['enabled']?_0x5c9ca7[_0x477103(0x6fd)]():0x0,_0x5cf431=Array['from'](_0x2efdd8[_0x477103(0x205)](_0x58dbdb,_0x35dfa6+0x1,_0x23c765));let _0x630582=_0x35dfa6;for(const _0x325325 of _0x5cf431){const {clock:_0x4f9075,key:_0x47391c,action:_0x692d2b,origin:_0xc83391}=_0x325325;if(_0x4f9075>_0x630582)_0x630582=_0x4f9075;if(_0x47391c==null)continue;if(!this[_0x477103(0x24c)](_0x302caa,_0x58dbdb,_0x47391c,_0x4f9075))continue;let _0x477e1f,_0x475f1;if(_0x692d2b===_0x41241f[_0x477103(0x43b)])_0x477e1f='remove',_0x475f1=null;else{const _0x104265=_0x2efdd8[_0x477103(0x3e6)](_0x58dbdb,_0x47391c);_0x104265==null?(_0x477e1f='remove',_0x475f1=null):(_0x477e1f=_0x477103(0x66a),_0x475f1=_0x104265);}this['emit']('change',{'env':_0x302caa,'type':_0x58dbdb,'key':_0x47391c,'op':_0x477e1f,'clock':_0x4f9075,'origin':_0xc83391,'value':_0x475f1});}if(_0x5c9ca7[_0x477103(0x40c)])_0x5c9ca7[_0x477103(0x6cf)](_0x477103(0x2bf)+_0x302caa+':'+_0x58dbdb,_0x5c9ca7[_0x477103(0x6fd)]()-_0x2a6fdb,'n='+_0x5cf431[_0x477103(0x503)]);return this[_0x477103(0x2d3)]['set'](_0x40862e,Math[_0x477103(0x270)](_0x630582,_0x23c765)),_0x2efdd8[_0x477103(0x43f)](_0x58dbdb)>_0x23c765;}[_0x4d8d43(0x7a3)](){const _0x4420af=_0x4d8d43;return{'started':this[_0x4420af(0x427)],'quantum':this[_0x4420af(0x679)],'flushDebounce':this['_flushDebounce'],'cursors':Object[_0x4420af(0x6fe)]([...this[_0x4420af(0x2d3)][_0x4420af(0x62b)]()][_0x4420af(0x626)](([_0x47ba8a,_0x53bcfc])=>[_0x47ba8a[_0x4420af(0x18e)]('\x00',':'),_0x53bcfc])),'pending':this[_0x4420af(0x769)][_0x4420af(0x1f8)],'seen':this[_0x4420af(0x4f3)][_0x4420af(0x1f8)]};}}return _0xa6fc1e['CHANGEFEED_QUANTUM']=_0x550fba,okdbChangefeed={'OKDBChangefeed':_0xa6fc1e},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x2f66b8=_0x362184;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x398386=require$$1$2,_0x17aa8c=require$$1,{EVENTS:_0x1f61f7}=requireOkdbEnums(),_0x3bfa0b=require$$0,{slotKey:_0x24d925}=requireOkdbProcessRegistry(),_0x45520f=0xfa,_0x3b9aaa=0xfa0,_0x40cd40=0x5,_0x437856=0x2710,_0x5ac7e7=0xbb8,_0x2d5de3=0x7d0,_0x306f3b=_0x2f66b8(0x42b),_0x1436f7=_0x2f66b8(0x1c3),_0x17537a=_0x2f66b8(0x273),_0x36f438='stats',_0x29d556=[_0x1f61f7['VIEW_PROGRESS'],_0x1f61f7[_0x2f66b8(0x6f2)],_0x1f61f7[_0x2f66b8(0x1c8)],_0x1f61f7[_0x2f66b8(0x3c2)],_0x1f61f7[_0x2f66b8(0x54f)],_0x1f61f7['INDEX_READY'],_0x1f61f7[_0x2f66b8(0x38d)],_0x1f61f7['INDEX_REGISTERED'],_0x2f66b8(0x4cd),'processor:progress',_0x2f66b8(0x665),'processor:paused',_0x2f66b8(0x4e0),_0x2f66b8(0x701)],_0x3e0d45=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x331f5d({workers:_0x451d32,makeOkdb:_0x1bf756,port:_0x106555,primaryOkdb:_0x351dc3,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0x11fd98=_0x2f66b8;if(_0x398386[_0x11fd98(0x6cd)])return childEntry&&_0x398386[_0x11fd98(0x34b)]({'exec':_0x17aa8c[_0x11fd98(0x29f)](__dirname,_0x11fd98(0x5a4)),'args':[],'execArgv':((()=>{const _0x96d9c=_0x11fd98,_0x206721=[];for(let _0x5d2a83=0x0;_0x5d2a83<process[_0x96d9c(0x477)]['length'];_0x5d2a83++){const _0x24ef05=process['execArgv'][_0x5d2a83];if(_0x24ef05['startsWith'](_0x96d9c(0x197))||_0x24ef05['startsWith'](_0x96d9c(0x5d9))||_0x24ef05[_0x96d9c(0x637)](_0x96d9c(0x409)))continue;if(_0x24ef05==='-e'||_0x24ef05===_0x96d9c(0x265)||_0x24ef05==='-p'||_0x24ef05===_0x96d9c(0x2e3)){_0x5d2a83++;continue;}_0x206721[_0x96d9c(0x387)](_0x24ef05);}return _0x206721;})())}),_0xa82240({'workers':_0x451d32,'port':_0x106555,'primaryOkdb':_0x351dc3,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x106555});return _0x4c9fa3({'makeOkdb':_0x1bf756,'port':_0x106555});}function _0xa82240({workers:_0x558c5f,port:_0x58ed1b,primaryOkdb:_0x4dd459,workerEnv:_0x1586d5,workerRole:_0x1db35a,listenAddr:_0x54741f}){const _0x77803b=_0x2f66b8,_0x1cd632=new Map(),_0x2fb02a=new Map();let _0x593fec=![];const _0x2d0255=_0x219239=>_0x219239?.['__okdbSlot'],_0x105c03=_0x25a6d9=>{const _0x2d03c4=_0x4307,_0x5e6b0d=_0x398386[_0x2d03c4(0x77b)]({...process.env,..._0x1586d5||{},'OKDB_CLUSTER_SLOT':String(_0x25a6d9)});return _0x5e6b0d['__okdbSlot']=_0x25a6d9,_0x1cd632[_0x2d03c4(0x36f)](_0x5e6b0d[_0x2d03c4(0x4ac)][_0x2d03c4(0x789)],{'worker':_0x5e6b0d,'startedAt':Date[_0x2d03c4(0x6fd)](),'slot':_0x25a6d9}),_0x5e6b0d['on'](_0x2d03c4(0x5b7),_0xf20551=>{const _0x1f7d75=_0x2d03c4;console['log'](_0x1f7d75(0x536)+_0x5e6b0d['process'][_0x1f7d75(0x789)]+_0x1f7d75(0x1e9)+(_0xf20551?.[_0x1f7d75(0x1e0)]??_0xf20551));}),_0x5e6b0d['on'](_0x2d03c4(0x3af),()=>_0xa0b816()),_0x5e6b0d;},_0x4a916c=_0x511be5=>{const _0x15a529=_0x4307;for(const {worker:_0x585950}of _0x1cd632[_0x15a529(0x397)]()){if(_0x585950[_0x15a529(0x381)]()||!_0x585950[_0x15a529(0x433)]())continue;try{_0x585950['send'](_0x511be5);}catch{}}};_0x4dd459?.[_0x77803b(0x5e6)]?.({'kind':'primary','listenAddr':_0x54741f})[_0x77803b(0x628)](()=>{}),_0x4dd459?.[_0x77803b(0x721)]?.[_0x77803b(0x312)]?.({'workersConfigured':_0x558c5f});const _0x47efa2={'engines':!![],'processors':!![],'compaction':!![],..._0x1db35a,'http':!![]},_0xa0b816=()=>{const _0x5994cb=_0x77803b,_0x4e051a=_0x4dd459?.['processes'];if(!_0x4e051a||!_0x4e051a[_0x5994cb(0x778)])return;const _0x2c11aa=_0x4e051a['selfKey'];for(const {worker:_0x3e3ef6,startedAt:_0x333bee,slot:_0x3af282,stats:_0x12987e,processing:_0x4a37a1}of _0x1cd632[_0x5994cb(0x397)]()){if(_0x3e3ef6['isDead']())continue;const _0x5623a8=_0x4e051a[_0x5994cb(0x4b5)]?.()&&_0x4e051a[_0x5994cb(0x4fa)](_0x5994cb(0x1d1),_0x38b5a0(_0x3af282))?.[_0x5994cb(0x3ab)]===!![];_0x4e051a['publishChildRow']({'pid':_0x3e3ef6[_0x5994cb(0x4ac)][_0x5994cb(0x789)],'startedAt':_0x333bee,'kind':_0x5994cb(0x5ea),'supervisorKey':_0x2c11aa,'slot':_0x3af282,'slotKey':_0x38b5a0(_0x3af282),'role':_0x47efa2,'listenAddr':_0x54741f,'lifecycle':_0x5623a8?'decommissioning':_0x5994cb(0x390),'processing':_0x4a37a1??null,'stats':_0x12987e??null})[_0x5994cb(0x628)](()=>{});}},_0x38b5a0=_0x593cc7=>_0x24d925(_0x77803b(0x19a)+_0x58ed1b,_0x593cc7),_0x4c6f57=_0x406176=>{const _0x12aadd=_0x77803b,_0x300617=_0x4dd459?.[_0x12aadd(0x721)];if(!_0x300617?.[_0x12aadd(0x4b5)]?.())return![];return _0x300617[_0x12aadd(0x4fa)](_0x12aadd(0x1d1),_0x38b5a0(_0x406176))?.[_0x12aadd(0x3ab)]===!![];};for(let _0x31d726=0x0;_0x31d726<_0x558c5f;_0x31d726++){const _0x206a52=_0x4c6f57(_0x31d726);_0x2fb02a[_0x77803b(0x36f)](_0x31d726,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x206a52,'respawnTimer':null}),_0x206a52?console[_0x77803b(0x273)]('[okdb-cluster]\x20slot='+_0x31d726+_0x77803b(0x606)):_0x105c03(_0x31d726);}const _0x21cecc=()=>{const _0xbf1cb1=_0x77803b,_0x3e551e=_0x4dd459?.[_0xbf1cb1(0x721)];if(!_0x3e551e?.[_0xbf1cb1(0x778)]||!_0x3e551e[_0xbf1cb1(0x4b5)]?.())return;for(const [_0x5aa53c,_0x1bae0d]of _0x2fb02a['entries']()){const _0x14214c=_0x3e551e[_0xbf1cb1(0x4fa)](_0xbf1cb1(0x1d1),_0x38b5a0(_0x5aa53c)),_0x23adcb=_0x14214c?.[_0xbf1cb1(0x3ab)]===!![],_0x2eb0a2=_0x14214c?.[_0xbf1cb1(0x49c)]===!![];if(_0x23adcb&&!_0x1bae0d[_0xbf1cb1(0x282)]){_0x1bae0d[_0xbf1cb1(0x282)]=!![];_0x1bae0d[_0xbf1cb1(0x4ce)]&&(clearTimeout(_0x1bae0d['respawnTimer']),_0x1bae0d[_0xbf1cb1(0x4ce)]=null);for(const {worker:_0x48fae3}of _0x1cd632['values']()){if(_0x2d0255(_0x48fae3)!==_0x5aa53c||_0x48fae3[_0xbf1cb1(0x381)]())continue;try{if(_0x2eb0a2)_0x48fae3[_0xbf1cb1(0x4ac)][_0xbf1cb1(0x49c)](_0xbf1cb1(0x65d));else _0x48fae3[_0xbf1cb1(0x433)]()&&_0x48fae3[_0xbf1cb1(0x717)]();}catch{}}console[_0xbf1cb1(0x273)](_0xbf1cb1(0x76a)+(_0x2eb0a2?'hard-killed':_0xbf1cb1(0x510))+'\x20worker\x20slot='+_0x5aa53c+_0xbf1cb1(0x50c));}else{if(!_0x23adcb&&_0x1bae0d[_0xbf1cb1(0x282)]&&_0x14214c){_0x1bae0d[_0xbf1cb1(0x282)]=![],_0x1bae0d[_0xbf1cb1(0x1d8)]=[],_0x1bae0d['consecutiveFailures']=0x0;const _0x408afe=[..._0x1cd632['values']()][_0xbf1cb1(0x6ad)](({worker:_0x4a0e70})=>_0x2d0255(_0x4a0e70)===_0x5aa53c&&!_0x4a0e70[_0xbf1cb1(0x381)]());!_0x408afe&&!_0x593fec&&(_0x105c03(_0x5aa53c),console[_0xbf1cb1(0x273)]('[okdb-cluster]\x20recommissioned\x20worker\x20slot='+_0x5aa53c));}}}},_0x34f5af=()=>{try{_0x21cecc();}catch{}};_0x4dd459?.['events']?.['on']?.(_0x1f61f7[_0x77803b(0x689)],_0x34f5af);const _0x10361b=[];if(_0x4dd459?.[_0x77803b(0x3e2)]?.['on'])for(const _0x1d8e95 of _0x29d556){const _0x351f5d=_0x368c06=>{_0x4a916c({[_0x306f3b]:_0x1436f7,'event':_0x1d8e95,'data':_0x368c06??{}});};_0x4dd459[_0x77803b(0x3e2)]['on'](_0x1d8e95,_0x351f5d),_0x10361b[_0x77803b(0x387)]({'event':_0x1d8e95,'handler':_0x351f5d});}const _0x5b9eda=setInterval(()=>{_0x21cecc(),_0xa0b816();},_0x3e0d45);_0x5b9eda[_0x77803b(0x442)]?.();const _0x384b2d=(_0x8dbbff,_0x2806ff)=>{const _0x5d8b97=_0x77803b;if(!_0x2806ff||typeof _0x2806ff!==_0x5d8b97(0x40d)||_0x2806ff[_0x306f3b]!==_0x17537a)return;if(!_0x4dd459?.[_0x5d8b97(0x273)]?.[_0x5d8b97(0x699)])return;const _0x3e3595=_0x2806ff[_0x5d8b97(0x39a)]||{};_0x4dd459[_0x5d8b97(0x273)]['ingest']({..._0x3e3595,'msg':'[w'+_0x2806ff[_0x5d8b97(0x1d1)]+']\x20'+(_0x3e3595[_0x5d8b97(0x2f4)]??''),'meta':{..._0x3e3595['meta']||{},'worker':_0x2806ff[_0x5d8b97(0x1d1)],'workerPid':_0x2806ff[_0x5d8b97(0x789)]}});};_0x398386['on'](_0x77803b(0x1e0),_0x384b2d);const _0x44163b=(_0x43d715,_0x4dc789)=>{const _0x649433=_0x77803b;if(!_0x4dc789||typeof _0x4dc789!==_0x649433(0x40d)||_0x4dc789[_0x306f3b]!==_0x36f438)return;const _0x2abcd7=_0x1cd632['get'](_0x43d715['process']['pid']);if(_0x2abcd7){_0x2abcd7[_0x649433(0x5b2)]={..._0x4dc789['stats'],'at':Date[_0x649433(0x6fd)]()};if(_0x4dc789['processing']!==undefined)_0x2abcd7[_0x649433(0x494)]=_0x4dc789[_0x649433(0x494)];}};_0x398386['on'](_0x77803b(0x1e0),_0x44163b),_0x398386['on'](_0x77803b(0x393),(_0x34c79f,_0x2be8c7,_0x4b1df8)=>{const _0x41c360=_0x77803b,_0x517e33=_0x34c79f[_0x41c360(0x4ac)][_0x41c360(0x789)],_0x1b2005=_0x2d0255(_0x34c79f),_0x1f009c=_0x1cd632[_0x41c360(0x3e6)](_0x517e33);if(_0x1f009c&&_0x4dd459?.[_0x41c360(0x721)])_0x4dd459['processes'][_0x41c360(0x316)](_0x517e33+':'+_0x1f009c[_0x41c360(0x714)])['catch'](()=>{});_0x1cd632[_0x41c360(0x560)](_0x517e33),console['log'](_0x41c360(0x536)+_0x517e33+_0x41c360(0x2f9)+(_0x1b2005??'?')+_0x41c360(0x4db)+('(code='+_0x2be8c7+_0x41c360(0x38b)+(_0x4b1df8??_0x41c360(0x4d6))+_0x41c360(0x4ea)+_0x1cd632[_0x41c360(0x1f8)]+_0x41c360(0x6b9))),_0xa0b816();if(_0x593fec||_0x1b2005==null)return;const _0xa4b2a5=_0x2fb02a[_0x41c360(0x3e6)](_0x1b2005);if(!_0xa4b2a5||_0xa4b2a5['dead'])return;const _0x42784c=Date[_0x41c360(0x6fd)]();_0xa4b2a5[_0x41c360(0x1d8)]['push'](_0x42784c),_0xa4b2a5[_0x41c360(0x1d8)]=_0xa4b2a5[_0x41c360(0x1d8)][_0x41c360(0x1ff)](_0x6e376b=>_0x42784c-_0x6e376b<=_0x437856);if(_0xa4b2a5[_0x41c360(0x1d8)][_0x41c360(0x503)]>=_0x40cd40){_0xa4b2a5[_0x41c360(0x282)]=!![],console[_0x41c360(0x5b7)](_0x41c360(0x614)+_0x1b2005+'\x20died\x20'+_0xa4b2a5['deaths'][_0x41c360(0x503)]+'\x20times\x20in\x20'+(_0x437856+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x1cd632[_0x41c360(0x1f8)]+_0x41c360(0x22b)));return;}_0xa4b2a5[_0x41c360(0x4b3)]++;const _0x2ef513=Math[_0x41c360(0x311)](_0x3b9aaa,_0x45520f*0x2**(_0xa4b2a5[_0x41c360(0x4b3)]-0x1));console[_0x41c360(0x273)]('[okdb-cluster]\x20respawning\x20worker\x20slot='+_0x1b2005+_0x41c360(0x39c)+_0x2ef513+'ms\x20(attempt\x20'+_0xa4b2a5[_0x41c360(0x4b3)]+')'),_0xa4b2a5[_0x41c360(0x4ce)]=setTimeout(()=>{const _0x4633ce=_0x41c360;_0xa4b2a5[_0x4633ce(0x4ce)]=null;if(_0x593fec||_0xa4b2a5[_0x4633ce(0x282)])return;const _0x1af8bb=_0x105c03(_0x1b2005);_0x1af8bb[_0x4633ce(0x3c3)](_0x4633ce(0x2ea),()=>{const _0x317af2=_0x4633ce;if(_0x2fb02a['get'](_0x1b2005)===_0xa4b2a5)_0xa4b2a5[_0x317af2(0x4b3)]=0x0;});},_0x2ef513),_0xa4b2a5['respawnTimer']['unref']?.();});const _0x592322=[..._0x1cd632[_0x77803b(0x2ac)]()];console['log'](_0x77803b(0x747)+process[_0x77803b(0x789)]+'\x20forked\x20'+_0x558c5f+_0x77803b(0x33a)+_0x58ed1b+':\x20'+('['+_0x592322[_0x77803b(0x29f)](',\x20')+']'));const _0x40323a={'_isClusterController':!![],'port':_0x58ed1b,'primaryOkdb':_0x4dd459??null,'status'(){const _0x81669=_0x77803b;return{'clustered':!![],'primaryPid':process['pid'],'port':_0x58ed1b,'primaryRole':_0x4dd459?.[_0x81669(0x6ea)]??null,'processorPid':null,'supervisorPid':process[_0x81669(0x789)],'workers':[..._0x1cd632[_0x81669(0x397)]()][_0x81669(0x626)](({worker:_0xee1e7})=>({'pid':_0xee1e7['process'][_0x81669(0x789)],'id':_0xee1e7['id'],'dead':_0xee1e7[_0x81669(0x381)]()}))};},async 'close'(){const _0x448e24=_0x77803b;_0x593fec=!![];for(const _0x4e0fd2 of _0x2fb02a['values']()){_0x4e0fd2[_0x448e24(0x282)]=!![],_0x4e0fd2['respawnTimer']&&(clearTimeout(_0x4e0fd2[_0x448e24(0x4ce)]),_0x4e0fd2[_0x448e24(0x4ce)]=null);}clearInterval(_0x5b9eda),_0x398386[_0x448e24(0x77f)]('message',_0x384b2d),_0x398386[_0x448e24(0x77f)](_0x448e24(0x1e0),_0x44163b),_0x4dd459?.[_0x448e24(0x3e2)]?.['off']?.(_0x1f61f7['SYSTEM_PROC'],_0x34f5af);if(_0x4dd459?.['events']?.[_0x448e24(0x77f)])for(const {event:_0x415339,handler:_0x2439d1}of _0x10361b){try{_0x4dd459[_0x448e24(0x3e2)][_0x448e24(0x77f)](_0x415339,_0x2439d1);}catch{}}_0x10361b[_0x448e24(0x503)]=0x0;const _0x46d1f2=[..._0x1cd632[_0x448e24(0x397)]()]['map'](({worker:_0x58140b})=>_0x58140b);if(_0x46d1f2['length']===0x0)return;await Promise[_0x448e24(0x618)](_0x46d1f2[_0x448e24(0x626)](_0x3259fb=>new Promise(_0x1f264d=>{const _0x446418=_0x448e24;if(_0x3259fb[_0x446418(0x381)]()){_0x1f264d();return;}let _0x14b7f6=![];const _0x30168c=()=>{if(_0x14b7f6)return;_0x14b7f6=!![];if(_0x1146ab)clearTimeout(_0x1146ab);_0x1f264d();};_0x3259fb[_0x446418(0x3c3)](_0x446418(0x393),_0x30168c);const _0x1146ab=setTimeout(()=>{const _0x5b8ee4=_0x446418;try{_0x3259fb[_0x5b8ee4(0x4ac)][_0x5b8ee4(0x49c)]();}catch{}},_0x5ac7e7+0x1f4);_0x1146ab[_0x446418(0x442)]?.();try{_0x3259fb['disconnect']();}catch{try{_0x3259fb[_0x446418(0x4ac)][_0x446418(0x49c)]();}catch{}}})));}};return _0x40323a;}async function _0x4c9fa3({makeOkdb:_0x1c64f8,port:_0x4ed675}){const _0x3a83a5=_0x2f66b8,_0x38be4e=await _0x1c64f8();return _0x4f456e(_0x38be4e),_0x38be4e[_0x3a83a5(0x635)][_0x3a83a5(0x49b)](_0x4ed675);}function _0x4f456e(_0x327ed8){const _0x571262=_0x2f66b8;if(!_0x327ed8||_0x327ed8['_clusterWorkerAttached'])return;_0x327ed8['_clusterWorkerAttached']=!![];try{const {OKDBChangefeed:_0x1e1406}=requireOkdbChangefeed(),_0x38a5b3=_0x327ed8[_0x571262(0x666)];if(_0x38a5b3&&typeof _0x38a5b3[_0x571262(0x771)]===_0x571262(0x5aa)){const _0x1475c5=new _0x1e1406(_0x327ed8);_0x1475c5['start'](),_0x38a5b3['attachFeed'](_0x1475c5),_0x327ed8[_0x571262(0x2c6)]=_0x1475c5;}}catch(_0x7e61a0){_0x327ed8[_0x571262(0x273)]?.[_0x571262(0x21b)]?.(_0x571262(0x251)+(_0x7e61a0?.[_0x571262(0x1e0)]??_0x7e61a0),{'feature':_0x571262(0x3a6)});}const _0x30099a=_0x5bd721=>{const _0x3cf4f5=_0x571262;if(!_0x5bd721||typeof _0x5bd721!==_0x3cf4f5(0x40d)||_0x5bd721[_0x306f3b]==null)return;if(_0x5bd721[_0x306f3b]===_0x1436f7)try{_0x327ed8[_0x3cf4f5(0x666)]?.['pushEphemeral']?.(_0x5bd721[_0x3cf4f5(0x403)],_0x5bd721['data']);}catch{}};process['on'](_0x571262(0x1e0),_0x30099a),_0x327ed8[_0x571262(0x539)]=_0x30099a;{let _0x16136b=process[_0x571262(0x2fd)](),_0x3a654d=Date[_0x571262(0x6fd)]();const _0x823511=()=>{const _0x37c069=_0x571262;if(typeof process[_0x37c069(0x2bc)]!=='function'||!process['connected'])return;const _0x469940=Date[_0x37c069(0x6fd)](),_0x111fd9=process[_0x37c069(0x2fd)](),_0x3495af=(_0x469940-_0x3a654d)*0x3e8,_0x2cec58=_0x111fd9['user']-_0x16136b['user']+(_0x111fd9['system']-_0x16136b[_0x37c069(0x2ad)]),_0x871183=_0x3495af>0x0?Math['min'](0x64,Math['round'](_0x2cec58/(_0x3495af*(_0x3bfa0b[_0x37c069(0x573)]()['length']||0x1))*0x64)):0x0;_0x16136b=_0x111fd9,_0x3a654d=_0x469940;const _0x495a97=process['memoryUsage']();let _0x55c6d3=null;try{_0x55c6d3=_0x327ed8[_0x37c069(0x6ea)]?.[_0x37c069(0x471)]?_0x327ed8['processes']?.[_0x37c069(0x597)]?.()??null:null;}catch{}try{process['send']({[_0x306f3b]:_0x36f438,'stats':{'rss':_0x495a97['rss'],'heapUsed':_0x495a97['heapUsed'],'heapTotal':_0x495a97[_0x37c069(0x612)],'external':_0x495a97[_0x37c069(0x756)],'cpuPct':_0x871183,'cpuWindowMs':Math[_0x37c069(0x6bd)](_0x3495af/0x3e8)||null},'processing':_0x55c6d3});}catch{}},_0x4afd24=Math['max'](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x3df492=setInterval(_0x823511,_0x4afd24);_0x3df492[_0x571262(0x442)]?.(),_0x823511();for(const _0x329f43 of[_0x571262(0x6ee),_0x571262(0x4e0)]){_0x327ed8[_0x571262(0x3e2)]?.['on']?.(_0x329f43,()=>{try{_0x823511();}catch{}});}}let _0x3499ce=![];const _0x59c334=async _0x268e94=>{const _0x5466d9=_0x571262;if(_0x3499ce)return;_0x3499ce=!![];const _0x298a07=setTimeout(()=>process[_0x5466d9(0x393)](_0x268e94),_0x5ac7e7);_0x298a07[_0x5466d9(0x442)]?.();try{await _0x327ed8['close']?.();}catch{}process[_0x5466d9(0x393)](_0x268e94);};process['on'](_0x571262(0x717),()=>_0x59c334(0x0));if(process['platform']!==_0x571262(0x293)){const _0xc9d8d4=setInterval(()=>{const _0xd1d4f2=_0x571262;if(process[_0xd1d4f2(0x6dd)]===0x1)_0x59c334(0x0);},_0x2d5de3);_0xc9d8d4[_0x571262(0x442)]?.(),_0x327ed8['_clusterOrphanWatch']=_0xc9d8d4;}}return okdbCluster={'runClustered':_0x331f5d,'attachWorkerCluster':_0x4f456e},okdbCluster;}var okdbHttp={'exports':{}},okdbMetrics,hasRequiredOkdbMetrics;function requireOkdbMetrics(){const _0x26701f=_0x362184;if(hasRequiredOkdbMetrics)return okdbMetrics;hasRequiredOkdbMetrics=0x1;const _0x2af213=0x3c;function _0x393db7(){return{'requests':0x0,'reads':0x0,'writes':0x0,'errors':0x0,'readMs':0x0,'writeMs':0x0};}class _0xea1207{constructor(){const _0x43e183=_0x4307;this[_0x43e183(0x7a4)]=0x0,this[_0x43e183(0x5a3)]=0x0,this[_0x43e183(0x610)]=0x0,this[_0x43e183(0x272)]=0x0,this['_totalReadMs']=0x0,this[_0x43e183(0x474)]=0x0,this[_0x43e183(0x247)]=Array[_0x43e183(0x2f3)]({'length':_0x2af213},_0x393db7),this[_0x43e183(0x31d)]=0x0,this[_0x43e183(0x3b1)]=Date[_0x43e183(0x6fd)](),this[_0x43e183(0x673)]=setInterval(()=>this[_0x43e183(0x711)](),0x3e8);if(this[_0x43e183(0x673)][_0x43e183(0x442)])this[_0x43e183(0x673)][_0x43e183(0x442)]();}[_0x26701f(0x711)](){const _0x121355=_0x26701f;this['_bucketIdx']=(this[_0x121355(0x31d)]+0x1)%_0x2af213,this[_0x121355(0x247)][this[_0x121355(0x31d)]]=_0x393db7(),this[_0x121355(0x3b1)]=Date['now']();}['record'](_0x122c2a,_0x3bafb5,_0x2389e3){const _0x42c102=_0x26701f,_0x40450c=/^(POST|PUT|PATCH|DELETE)$/i['test'](_0x122c2a),_0xdba4ac=this[_0x42c102(0x247)][this[_0x42c102(0x31d)]];this[_0x42c102(0x7a4)]++,_0xdba4ac[_0x42c102(0x664)]++,_0x2389e3&&(this[_0x42c102(0x272)]++,_0xdba4ac[_0x42c102(0x6db)]++),_0x40450c?(this[_0x42c102(0x610)]++,this[_0x42c102(0x474)]+=_0x3bafb5,_0xdba4ac[_0x42c102(0x799)]++,_0xdba4ac['writeMs']+=_0x3bafb5):(this['_totalReads']++,this[_0x42c102(0x1f5)]+=_0x3bafb5,_0xdba4ac[_0x42c102(0x751)]++,_0xdba4ac[_0x42c102(0x6f4)]+=_0x3bafb5);}[_0x26701f(0x5b2)](){const _0x5e2c9f=_0x26701f;let _0x5555f8=0x0,_0x11cb5d=0x0,_0x4b99a0=0x0,_0x163b81=0x0,_0x4e9f18=0x0,_0x5b7a57=0x0;for(const _0x28e88c of this[_0x5e2c9f(0x247)]){_0x5555f8+=_0x28e88c[_0x5e2c9f(0x664)],_0x11cb5d+=_0x28e88c[_0x5e2c9f(0x751)],_0x4b99a0+=_0x28e88c[_0x5e2c9f(0x799)],_0x163b81+=_0x28e88c[_0x5e2c9f(0x6db)],_0x4e9f18+=_0x28e88c[_0x5e2c9f(0x6f4)],_0x5b7a57+=_0x28e88c[_0x5e2c9f(0x60e)];}const _0x1537fc=_0x2af213;return{'lifetime':{'requests':this[_0x5e2c9f(0x7a4)],'reads':this['_totalReads'],'writes':this['_totalWrites'],'errors':this['_totalErrors'],'avgReadMs':this[_0x5e2c9f(0x5a3)]>0x0?+(this[_0x5e2c9f(0x1f5)]/this['_totalReads'])[_0x5e2c9f(0x6cb)](0x2):null,'avgWriteMs':this[_0x5e2c9f(0x610)]>0x0?+(this[_0x5e2c9f(0x474)]/this['_totalWrites'])['toFixed'](0x2):null},'window':{'seconds':_0x1537fc,'requests':_0x5555f8,'reads':_0x11cb5d,'writes':_0x4b99a0,'errors':_0x163b81,'reqPerSec':+(_0x5555f8/_0x1537fc)[_0x5e2c9f(0x6cb)](0x2),'readPerSec':+(_0x11cb5d/_0x1537fc)[_0x5e2c9f(0x6cb)](0x2),'writePerSec':+(_0x4b99a0/_0x1537fc)[_0x5e2c9f(0x6cb)](0x2),'avgReadMs':_0x11cb5d>0x0?+(_0x4e9f18/_0x11cb5d)[_0x5e2c9f(0x6cb)](0x2):null,'avgWriteMs':_0x4b99a0>0x0?+(_0x5b7a57/_0x4b99a0)['toFixed'](0x2):null}};}[_0x26701f(0x543)](){const _0x46bf75=_0x26701f;clearInterval(this[_0x46bf75(0x673)]);}}return okdbMetrics=_0xea1207,okdbMetrics;}function _0x4307(_0x1c3323,_0xe0d39){_0x1c3323=_0x1c3323-0x18a;const _0x226c2d=_0x226c();let _0x4307c4=_0x226c2d[_0x1c3323];return _0x4307c4;}var okdbAuthNamespaces,hasRequiredOkdbAuthNamespaces;function requireOkdbAuthNamespaces(){const _0x4fc05e=_0x362184;if(hasRequiredOkdbAuthNamespaces)return okdbAuthNamespaces;hasRequiredOkdbAuthNamespaces=0x1;const _0x232401={'data':{'label':'Data','scope':_0x4fc05e(0x758),'description':'Records\x20inside\x20your\x20types\x20—\x20the\x20actual\x20rows\x20you\x20store.','operations':{'read':{'label':'Read','summary':_0x4fc05e(0x5bb)},'write':{'label':_0x4fc05e(0x647),'summary':_0x4fc05e(0x440)}}},'schema':{'label':'Schema\x20&\x20Indexes','scope':_0x4fc05e(0x758),'description':_0x4fc05e(0x41d),'operations':{'read':{'label':_0x4fc05e(0x6e8),'summary':_0x4fc05e(0x53c)},'write':{'label':_0x4fc05e(0x647),'summary':_0x4fc05e(0x396)}}},'search':{'label':_0x4fc05e(0x1bd),'scope':_0x4fc05e(0x758),'description':'Run\x20searches\x20against\x20registered\x20FTS\x20and\x20vector\x20indexes.','operations':{'query':{'label':_0x4fc05e(0x1c5),'summary':_0x4fc05e(0x338)}}},'queue':{'label':_0x4fc05e(0x64c),'scope':_0x4fc05e(0x758),'description':_0x4fc05e(0x676),'operations':{'read':{'label':_0x4fc05e(0x6e8),'summary':_0x4fc05e(0x4d1)},'write':{'label':_0x4fc05e(0x647),'summary':'Enqueue,\x20cancel,\x20retry,\x20remove\x20jobs;\x20manage\x20buckets;\x20reconcile\x20and\x20rebuild\x20stats.'},'work':{'label':_0x4fc05e(0x50f),'summary':_0x4fc05e(0x551)}}},'files':{'label':'Files','scope':_0x4fc05e(0x758),'description':_0x4fc05e(0x3ce),'operations':{'read':{'label':_0x4fc05e(0x6e8),'summary':_0x4fc05e(0x1fd)},'write':{'label':_0x4fc05e(0x647),'summary':_0x4fc05e(0x69e)}}},'functions':{'label':_0x4fc05e(0x249),'scope':_0x4fc05e(0x758),'description':'Server-side\x20user-defined\x20functions\x20registered\x20per\x20environment.','operations':{'read':{'label':_0x4fc05e(0x6e8),'summary':_0x4fc05e(0x2a5)},'write':{'label':_0x4fc05e(0x647),'summary':'Register,\x20update,\x20and\x20delete\x20function\x20definitions.'},'run':{'label':_0x4fc05e(0x521),'summary':_0x4fc05e(0x4c6)}}},'views':{'label':_0x4fc05e(0x524),'scope':_0x4fc05e(0x758),'description':_0x4fc05e(0x2fa),'operations':{'read':{'label':_0x4fc05e(0x6e8),'summary':_0x4fc05e(0x42c)},'write':{'label':_0x4fc05e(0x647),'summary':_0x4fc05e(0x61a)}}},'env':{'label':_0x4fc05e(0x3b3),'scope':_0x4fc05e(0x758),'description':'Environment\x20lifecycle.\x20Listing\x20and\x20creating\x20envs\x20is\x20system-level.','operations':{'read':{'label':_0x4fc05e(0x6e8),'summary':'List\x20environments\x20and\x20read\x20environment\x20info.'},'write':{'label':_0x4fc05e(0x647),'summary':_0x4fc05e(0x52d)}}},'auth':{'label':_0x4fc05e(0x3f3),'scope':_0x4fc05e(0x2ad),'description':_0x4fc05e(0x30b),'operations':{'read':{'label':_0x4fc05e(0x6e8),'summary':_0x4fc05e(0x6d1)},'write':{'label':_0x4fc05e(0x647),'summary':_0x4fc05e(0x3bb)}}},'system':{'label':_0x4fc05e(0x5d3),'scope':_0x4fc05e(0x2ad),'description':_0x4fc05e(0x325),'operations':{'read':{'label':_0x4fc05e(0x6e8),'summary':_0x4fc05e(0x58c)},'write':{'label':'Write','summary':_0x4fc05e(0x656)}}},'sync':{'label':_0x4fc05e(0x773),'scope':_0x4fc05e(0x2ad),'description':_0x4fc05e(0x3e3),'operations':{'read':{'label':_0x4fc05e(0x6e8),'summary':_0x4fc05e(0x27e)},'write':{'label':_0x4fc05e(0x647),'summary':_0x4fc05e(0x454)},'peer':{'label':_0x4fc05e(0x51e),'summary':_0x4fc05e(0x4f6),'machineOnly':!![]}}},'protected':{'label':_0x4fc05e(0x1b2),'scope':'gate','description':_0x4fc05e(0x625),'operations':{'read':{'label':_0x4fc05e(0x6e8),'summary':'May\x20read\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20read\x20permission.'},'write':{'label':_0x4fc05e(0x647),'summary':_0x4fc05e(0x2f5)}}}},_0x21e0c7={'schema:read':['data:read',_0x4fc05e(0x6d6),_0x4fc05e(0x557)]},_0x4b1d4b=[_0x4fc05e(0x633),'query',_0x4fc05e(0x5bf),_0x4fc05e(0x6cc),_0x4fc05e(0x221),_0x4fc05e(0x2af)];function _0x28d12c(){const _0x46c23c=_0x4fc05e,_0x590b63=[];for(const [_0x4236b7,_0x2c07ad]of Object[_0x46c23c(0x62b)](_0x232401)){for(const _0x24acdf of Object[_0x46c23c(0x2ac)](_0x2c07ad[_0x46c23c(0x35a)])){_0x590b63[_0x46c23c(0x387)](_0x4236b7+':'+_0x24acdf);}}return _0x590b63;}function _0x52d024(_0x394675){return _0x232401[_0x394675]||null;}function _0xcaa001(_0x17965f,_0x3849df){const _0x3856d3=_0x4fc05e;return _0x232401[_0x17965f]?.[_0x3856d3(0x35a)][_0x3849df]||null;}return okdbAuthNamespaces={'NAMESPACES':_0x232401,'IMPLIED_BY':_0x21e0c7,'OP_ORDER':_0x4b1d4b,'listAllPermissions':_0x28d12c,'getNamespaceMeta':_0x52d024,'getOperationMeta':_0xcaa001},okdbAuthNamespaces;}var okdbAuthPermissions,hasRequiredOkdbAuthPermissions;function requireOkdbAuthPermissions(){const _0x182027=_0x362184;if(hasRequiredOkdbAuthPermissions)return okdbAuthPermissions;hasRequiredOkdbAuthPermissions=0x1;const {IMPLIED_BY:_0xb981f8}=requireOkdbAuthNamespaces(),_0x275d3b=new Set([_0x182027(0x633),_0x182027(0x347)]);function _0x2c1bf8(_0x2fd8ba,_0x3b4749){const _0xe0b384=_0x182027;if(!Array[_0xe0b384(0x65e)](_0x2fd8ba)||_0x2fd8ba['length']===0x0)return![];for(const _0x13c906 of _0x2fd8ba){if(typeof _0x13c906!==_0xe0b384(0x44e)||!_0x13c906[_0xe0b384(0x1dc)](':')){if(_0x13c906==='*')return!![];continue;}const [_0x19e5d0,_0x1237b0]=_0x13c906[_0xe0b384(0x3d5)](':'),[_0x150f56,_0x28c719]=_0x3b4749[_0xe0b384(0x3d5)](':'),_0x293d5e=_0x19e5d0==='*'||_0x19e5d0===_0x150f56,_0x4df893=_0x1237b0==='*'||_0x1237b0===_0x28c719;if(_0x293d5e&&_0x4df893)return!![];}const _0x272aee=_0xb981f8[_0x3b4749];if(_0x272aee)for(const _0x32cc4a of _0x272aee){if(_0x2c1bf8(_0x2fd8ba,_0x32cc4a))return!![];}return![];}function _0x69bf77(_0x46d503,_0x5a6da1){const _0x4431eb=_0x182027,_0x559225=new Set();if(Array['isArray'](_0x46d503)){for(const _0x2bbca8 of _0x46d503)_0x559225['add'](_0x2bbca8);}if(Array[_0x4431eb(0x65e)](_0x5a6da1)){for(const _0x122052 of _0x5a6da1)_0x559225[_0x4431eb(0x4d2)](_0x122052);}return Array[_0x4431eb(0x2f3)](_0x559225);}function _0x551567(_0x27eac0){const _0x43aaf9=_0x182027;if(typeof _0x27eac0!==_0x43aaf9(0x44e))return![];const [,_0x438609]=_0x27eac0[_0x43aaf9(0x3d5)](':');return _0x275d3b[_0x43aaf9(0x52e)](_0x438609);}function _0x4e9276(_0x36fd64){const _0x193af9=_0x182027;return _0x551567(_0x36fd64)?_0x193af9(0x457):_0x193af9(0x320);}function _0x257e09(_0x179c30,_0x3ba587){const _0x53023d=_0x182027;return _0x69bf77(_0x179c30['permissions']||[],_0x3ba587?(_0x179c30[_0x53023d(0x204)]||{})[_0x3ba587]||[]:[]);}function _0x1ef6fc(_0x142b79){const _0x45920f=_0x182027,_0x446022=[];for(const _0x38fac0 of _0x142b79['listRoutes']()){const _0x26b47c=_0x38fac0[_0x45920f(0x71e)]?.[_0x45920f(0x28d)];if(!_0x26b47c)continue;_0x26b47c[_0x45920f(0x354)]&&!_0x26b47c[_0x45920f(0x638)]&&_0x446022[_0x45920f(0x387)](_0x38fac0[_0x45920f(0x5e0)]+'\x20'+_0x38fac0[_0x45920f(0x624)]+_0x45920f(0x641)+(_0x38fac0[_0x45920f(0x71e)]['id']??'?')+')');}if(_0x446022[_0x45920f(0x503)])throw new Error('The\x20following\x20routes\x20require\x20auth\x20but\x20declare\x20no\x20permission:\x0a\x20\x20'+_0x446022['join']('\x0a\x20\x20'));}return okdbAuthPermissions={'hasPermission':_0x2c1bf8,'unionPermissions':_0x69bf77,'isReadOperation':_0x551567,'resolveProtectedGate':_0x4e9276,'getEffectivePermissions':_0x257e09,'assertEveryRouteHasPermission':_0x1ef6fc},okdbAuthPermissions;}var okdbJwtUtils,hasRequiredOkdbJwtUtils;function requireOkdbJwtUtils(){if(hasRequiredOkdbJwtUtils)return okdbJwtUtils;hasRequiredOkdbJwtUtils=0x1;const _0x5f02ca=require$$0$6,_0x521e69=require$$1$3,_0x195882=require$$2;function _0x6e030f(_0x32d4dc){const _0x19bc9b=_0x4307,_0x376c5a=String(_0x32d4dc||'')[_0x19bc9b(0x18e)](/-/g,'+')[_0x19bc9b(0x18e)](/_/g,'/'),_0x372506=_0x376c5a+'='['repeat']((0x4-(_0x376c5a['length']%0x4||0x4))%0x4);return Buffer[_0x19bc9b(0x2f3)](_0x372506,_0x19bc9b(0x4c8));}function _0x3c18cd(_0x2b552b){const _0x19a76d=_0x4307;if(typeof _0x2b552b!==_0x19a76d(0x44e))throw new Error(_0x19a76d(0x38c));const _0x1d8e11=_0x2b552b[_0x19a76d(0x3d5)]('.');if(_0x1d8e11[_0x19a76d(0x503)]!==0x3)throw new Error('Token\x20must\x20be\x20a\x20JWT');const [_0x3b785f,_0x1b0e34,_0x52f3b0]=_0x1d8e11,_0x432e16=JSON[_0x19a76d(0x663)](_0x6e030f(_0x3b785f)[_0x19a76d(0x288)]('utf8')),_0x16f9ff=JSON[_0x19a76d(0x663)](_0x6e030f(_0x1b0e34)[_0x19a76d(0x288)](_0x19a76d(0x6f6)));return{'header':_0x432e16,'payload':_0x16f9ff,'signature':_0x6e030f(_0x52f3b0),'signingInput':Buffer['from'](_0x3b785f+'.'+_0x1b0e34),'encodedHeader':_0x3b785f,'encodedPayload':_0x1b0e34};}function _0x4752b2(_0x42f622){const _0x50bc92=_0x4307;if(Array[_0x50bc92(0x65e)](_0x42f622))return _0x42f622;if(_0x42f622==null)return[];return[_0x42f622];}function _0x1caccf(_0x116572){const _0x4a5bd0=_0x4307,_0x5636a7=String(_0x116572||'')['match'](/.{1,64}/g)||[];return'-----BEGIN\x20CERTIFICATE-----\x0a'+_0x5636a7[_0x4a5bd0(0x29f)]('\x0a')+_0x4a5bd0(0x5ff);}function _0x2feb8f(_0x2d4706={}){const _0x840fac=_0x4307;if(_0x2d4706['x5c']?.[0x0])return _0x195882['createPublicKey'](_0x1caccf(_0x2d4706[_0x840fac(0x1e6)][0x0]));return _0x195882[_0x840fac(0x6d7)]({'key':_0x2d4706,'format':_0x840fac(0x794)});}function _0x24e8bd(_0x5874bd,_0x522200,_0x4f0150,_0x2f195e){const _0x80599f=_0x4307;if(_0x5874bd===_0x80599f(0x72d))return _0x195882['verify'](_0x80599f(0x28a),_0x4f0150,_0x522200,_0x2f195e);if(_0x5874bd===_0x80599f(0x413))return _0x195882['verify']('sha256',_0x4f0150,{'key':_0x522200,'dsaEncoding':_0x80599f(0x1a7)},_0x2f195e);return![];}function _0x1ea1fc(_0x386336){const _0x3b5a9a=_0x4307;if(typeof commonjsGlobal[_0x3b5a9a(0x379)]===_0x3b5a9a(0x5aa))return commonjsGlobal[_0x3b5a9a(0x379)](_0x386336,{'headers':{'accept':_0x3b5a9a(0x44b)}})[_0x3b5a9a(0x4a7)](async _0x131194=>{const _0x3b0be7=_0x3b5a9a;if(!_0x131194['ok']){const _0x476119=new Error(_0x3b0be7(0x550)+_0x131194[_0x3b0be7(0x7a3)]+_0x3b0be7(0x672)+_0x386336);_0x476119[_0x3b0be7(0x7a3)]=_0x131194[_0x3b0be7(0x7a3)];throw _0x476119;}return _0x131194[_0x3b0be7(0x2d8)]();});return new Promise((_0x4e9a8b,_0x4a7605)=>{const _0x1cb2d5=_0x3b5a9a,_0x5da8e4=String(_0x386336)[_0x1cb2d5(0x637)](_0x1cb2d5(0x63a))?_0x521e69:_0x5f02ca,_0x58616c=_0x5da8e4[_0x1cb2d5(0x3e6)](_0x386336,{'headers':{'accept':_0x1cb2d5(0x44b)}},_0x4aefed=>{const _0x2257f9=_0x1cb2d5;let _0x492d93='';_0x4aefed['setEncoding'](_0x2257f9(0x6f6)),_0x4aefed['on'](_0x2257f9(0x6af),_0x3076a3=>{_0x492d93+=_0x3076a3;}),_0x4aefed['on'](_0x2257f9(0x72e),()=>{const _0x2ecbfd=_0x2257f9;if(_0x4aefed[_0x2ecbfd(0x558)]<0xc8||_0x4aefed[_0x2ecbfd(0x558)]>=0x12c){const _0x314a6f=new Error(_0x2ecbfd(0x550)+_0x4aefed[_0x2ecbfd(0x558)]+_0x2ecbfd(0x672)+_0x386336);return _0x314a6f['status']=_0x4aefed[_0x2ecbfd(0x558)],_0x4a7605(_0x314a6f);}try{_0x4e9a8b(JSON[_0x2ecbfd(0x663)](_0x492d93||'{}'));}catch(_0x5a1d74){_0x4a7605(_0x5a1d74);}});});_0x58616c['on']('error',_0x4a7605),_0x58616c['end']();});}return okdbJwtUtils={'base64UrlDecode':_0x6e030f,'parseJwt':_0x3c18cd,'normalizeAudience':_0x4752b2,'normalizePemCertificate':_0x1caccf,'jwkToKeyObject':_0x2feb8f,'verifyJwtSignature':_0x24e8bd,'fetchJson':_0x1ea1fc},okdbJwtUtils;}var hasRequiredOkdbHttp;function _0x226c(){const _0x367660=['--username','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','(workers\x20can\x27t\x20share\x20the\x20cross-process\x20HLC/clock).\x20Forcing\x20single-process\x20(was\x20','cluster-wide','stdin','noAdmin','_done','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','\x20worker(s)\x20remaining','licenseType','additionalProperties','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','round','OKDBUniqueConstraintError','token_endpoint','started','fast','invalid','Type\x20\x27','cors','activation','\x1b[31m','fanout','__vocab/version','nodesView','_envs','toFixed','write','isPrimary','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','note','EXIT','List\x20tokens\x20and\x20users.','config\x20http.workers','logLevel','\x20\x20·\x20\x20','\x20\x20Path\x20access','data:write','createPublicKey','oauth','__OKDB_PUB_FINGERPRINT__','putSync','errors','\x20(expires\x20in\x20','ppid','_drainOne','\x20\x20(no\x20env\x20draining)','\x20\x20(unlimited)','extend','_collectWriterFacet','number','LICENSE_ALREADY_STORED','SIGINT','unique:violation','_instanceId','Read','blobs','role','_inflight','[okdb]\x20cluster\x20close\x20error:\x20','allSettled','processor:paused','onLicenseExpired','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping','FTS_REGISTERED','trim','readMs','processors/','utf8','_supervisorKey','SCHEMA_VALIDATION_FAILED','--changes','_nestedTotal','LABEL','/api/env/','now','fromEntries','boolean','HTTP_','processor:retry','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','dest','_cmd','allocUnsafe','\x20\x20✓\x20Removed\x20license\x20','liveThreadStats','queue','\x20MB\x20→\x20','--ttl','processorsView','regex','~tokens','socket','config\x20file\x20valid:\x20','CREATED','_rotateBucket','records','charCodeAt','startedAt','alloc','system:env_release','disconnect','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','_children','tokenUrl','typeSubDbs','scope','[okdb]\x20import\x20complete','operation','reject','Build\x20expects\x20public\x20key\x20fingerprint\x20','processes','sub','bind','_putRowSync','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','[okdb]\x20importing\x20','text/event-stream;\x20charset=utf-8','namespace','HTTP_CLUSTER_REMOVED','[okdb]\x20invalid\x20config\x20\x22http.host\x22:\x20','_buildOwnRow','\x22.\x20Use:\x20create,\x20list,\x20revoke','RS256','end','stringify','\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(','trimStart','\x20worker','compaction','TYPE_ALREADY_REGISTERED','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','\x20\x20[','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','instances','ms\x20p99=','setNoDelay','\x0a\x20\x20✓\x20License\x20added','cause','must\x20be\x20','getRange','--label','ttl','\x0a\x20\x20\x20\x20','no\x20.kdbconfig\x20(using\x20defaults)','\x27\x20on\x20type\x20\x27',')\x20—\x20they\x20will\x20NOT\x20be\x20preserved','access-control-allow-credentials','[okdb-cluster]\x20primary\x20pid=','FOREIGN_KEY_DELETE_RESTRICTED','argv','item:create','is\x20invalid','PIN','__writeCounter','License\x20already\x20stored','\x20cf-ray=','null','reads','ceil',',\x20got\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20active\x20environment\x20+\x20list\x20all\x20envs\x0a\x20\x20','Index\x20\x27','external','instanceId','env','cookieName','CLI\x20(`okdb\x20listen`),\x20or\x20use\x20Node\x27s\x20built-in\x20`cluster`\x20module\x20and\x20call\x20','\x20active\x20env:\x20','/types\x0a\x20\x20\x20\x20','middlewares','tags:\x20','\x0a\x20\x20✓\x20License\x20activated','quantum','_holderDead','Version\x20mismatch\x20for\x20','bus:env_release','BOOTSTRAP_LOCALHOST_ONLY','_rootDb','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','hex','[okdb]\x20primary\x20okdb\x20close\x20error:\x20','_pending','[okdb-cluster]\x20','_jwksNegativeCache','user','mkdirSync','_heartbeatTimer','host','_collectSingletonClaims','attachFeed','database\x20path\x20not\x20writable:\x20','Sync','shutdown','OKDBForeignKeyError','okdb-license-id:','white','_isWriter','keys:','info','fork','shmbuf/package.json','\x20\x20Error:\x20','items','off','\x20opening\x20','_heldTotal','config\x20file\x20invalid:\x20','type/users/item/alice\x20--env\x20staging','okdb','drain','headers','PAYLOAD_TOO_LARGE','sort','pid','permissions','_dispatch','closeAllConnections','\x20/\x20','VALIDATION_ERROR','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','(on\x20any\x20path\x20command)','_systemEnv','\x20\x20\x20\x20addedAt:\x20\x20\x20','addLicense','jwk','_migrateVocab','transactionSync','_heartbeatInFlight','seq','writes','mcp','--name','exp','isFinite','openDB','_flushTimer','/api/','content-type','internal','status','_totalRequests','/admin/index.html','[okdb]\x20close\x20error:\x20','embedded','\x0a\x20\x20License\x20details:','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','\x20documents\x20fail\x20validation','replace','\x20already\x20exists','appendFileSync','ITEM_CREATE','Cannot\x20delete\x20','test','Hint:\x20','gray','OKDBTypeAlreadyRegisteredError','--test','selfKey','\x0a[okdb]\x20error:\x20','cluster:','starting','derivePin','{}[]:,\x27\x22','--log-level','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','VERSION_MISMATCH','enable','\x20\x20\x20\x20api:\x20\x20\x20\x20\x20http://localhost:','_versionSkewWarned','Full-text\x20search','\x20—\x20','type/users\x20--help','ieee-p1363','createLoginState','defaults','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','_ensureTokensType','http://localhost:','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','is\x20not\x20allowed',',\x20stopping\x20workers…\x0a','[okdb]\x20preserved:\x20','\x0a\x20\x20Joining\x20cluster\x20at\x20','Protected\x20(gate)','system:clock_change','_flushDebounce','passive\x20HTTP\x20worker(s)\x20serving\x20:','cpuWindowMs','ms/','[body]','set-cookie','library\x20(okdb\x20node-model\x202.0).\x20For\x20multi-process\x20HTTP\x20serving\x20use\x20the\x20okdb\x20','/type/users\x0a\x20\x20\x20\x20','open','Search','\x27\x20is\x20already\x20registered','tierList','processingStatusView','debug','backup','ephemeral','auth','Query','_windowCbs','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20set\x20active\x20environment\x20(persists\x20in\x20session)\x0a\x20\x20','FTS_DROP','setLogger','Unsupported\x20JWT\x20alg:\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','kdb_admin_oauth_state','expired','current','formatListenAddr','\x20pid=','slot','stop','roles','authenticateToken','time','cf-ray','selfAddress','deaths','\x1b[0m','jwksTtlMs','2742240sMRjzw','includes','getHeader','destroyed','_rowKey','message','JWT\x20issuer\x20mismatch','FORBIDDEN','exports','bus:poke','[okdb]\x20loaded\x20config:\x20','x5c','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','--no-cluster','\x20ipc\x20error:\x20','loadEnvFile','cyan','raw','\x20deleted','processes:\x20','LICENSED_BUILD','parseBearer','ttl:expired','resetFts','listNodes','removeSupervisedChild','_totalReadMs','\x20sync','\x22\x20matches\x20','size','node','ms\x20busy=','_ownMeta','dropping','List,\x20download,\x20and\x20inspect\x20file\x20metadata.','maxMs','filter','typesPerEnv','children','preferred_username','queue-worker','grants','getChanges','import','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','--version','OIDC\x20discovery\x20missing\x20jwks_uri','required','methods','okdb_session_','license','3065847GslmEt','_rawDb','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','\x20binding\x20references\x20missing\x20input\x20field:\x20','_authOptions','\x20\x20\x20\x20admin:\x20http://localhost:','License\x20signature\x20invalid:\x20','unclaimed','HELP','safety','Schema\x20validation\x20failed\x20for\x20','addSSE','[okdb]\x20created\x20.kdbconfig','warn','[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping','\x20\x20✓\x20http\x20listening\x20on\x20','createHmac','default:\x20cores−1\x20=\x20','_acquiredAt','work','remoteAddress','\x20\x20\x20\x20expires:\x20\x20\x20','destroy',')\x20to\x20your\x20license\x20vendor.','Validation\x20failed:\x20','_isClusterController','Bearer\x20','\x20which\x20does\x20not\x20exist','\x27\x20doesn\x27t\x20exist','\x20worker(s)\x20still\x20serving','item:remove','_key','stack','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument','isHeld','\x22\x20on\x20\x22','http.workers','cpuPct','detachConsole','effective','dirname','header','maxExtra','_lookupByName','?\x0a\x20\x20(node\x20identity\x20and\x20licenses\x20are\x20preserved)\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','\x0a[okdb]\x20fatal\x20error:','unknown','\x20\x20env=','5710617XZJbyZ','transport','present','inflightAgesMs','_okdb','timeMachine','env:removed','stream','_buckets','der','Functions','freeze','issuer','_markSeen','sandbox','index:reset','api','--path','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','config','node:crypto','tokenSecret','\x20querySchema\x20references\x20missing\x20input\x20field:\x20','--key','type/users','view','sizeBefore','NAME','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','forceAfterMs','_dedupeKey','audience','endsWith','dim',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','license:added','(unset)','\x20\x20╚═══════════════════════════╝','--eval','txn:rollback','migrate','_nodeDbFor','\x20MB)','_license','exposeHeaders','\x22\x20already\x20exists','Examples','ORPHAN\x20(env-closed\x20write)','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20','max','reason','_totalErrors','log','Route\x20','inst:','OKDBIndexAlreadyRegisteredError','Admin','beforeWrite','flatMap','_lockDb','OKDBVersionMismatchError','crypto','exportBlobs','View\x20peer\x20status\x20and\x20replication\x20stats.','quit','INVALID_INDEX_KEY','processorId','dead','\x20to\x20browse\x20the\x20API,\x20','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','_cookieName','references','\x20to\x20quit.','toString','127.0.0.1','RSA-SHA256','Feature\x20not\x20licensed:\x20','export','access','dbPath','env/','\x20already\x20in\x20use','bus:drain','attach','win32','ms\x0a','cf-connecting-ip','query.','responseStatuses','password','[okdb]\x20reset:\x20','LICENSE_ACTIVATION_INVALID','cookie','pathParams','_fetchJwks','runtimeProcessesView','join','code','nodeKey','_validateOidcAccessToken','_shouldWrapResponse','<path>','List\x20functions\x20and\x20inspect\x20their\x20source.','\x20\x20\x20\x20status:\x20\x20\x20\x20','OKDB_HTTP_WORKERS\x20env','readFileSync','reverse','is\x20required','license:invalid','keys','system','[on|off|level]','peer','Types','_desiredOverlay','wrong_node','version','\x20\x20→\x20\x20','inspect','\x20cf-ip=','LICENSE_LIMIT_EXCEEDED','draining','exec','firstTs','ROUTES','send','getProcess','_role','feed:','(worst\x20','\x20origin=','shmbufNative','Invalid\x20index\x20key\x20type\x20for\x20\x27','ENV_CLOSING_RETRY','\x20\x20\x20\x20admin:\x20\x20\x20http://localhost:','_changefeed','remaining-fields','never','\x20(+','makeOkdb','splice','okdb-writer:\x20env\x20closing\x20—\x20retry','[okdb]\x20blobs:\x20imported=','signCookie','\x20\x20⚠\x20\x20','envs=','fts:reset','connection','_cursors','_nodeDead','summary','\x20(must\x20be\x20a\x20string\x20or\x20array\x20of\x20strings)','toISOString','json','question','ref:violation','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','matcher',';\x20SameSite=','stopHeartbeat','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','discoveryTtlMs','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/info\x0a\x20\x20\x20\x20','features','--print','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','_nodeDb','Forbidden\x20—\x20no\x20permissions\x20available','padStart','Forbidden','context','listening','registry\x20heartbeat\x20skipped\x20(writer=','DELETE','_sandbox','ITEM_REMOVE','hasCanonical','pending','_validateOperationRequest','_highWater','from','msg','May\x20write\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20write\x20permission.','../','assign','digest','\x20(slot=','Materialized\x20views:\x20query\x20definitions\x20that\x20are\x20continuously\x20maintained\x20and\x20queryable.','copy','supervisorKey','cpuUsage','3905672qIeGko','\x20does\x20not\x20exist','resolve','\x20\x20\x20\x20path:\x20\x20','listAll','[okdb]\x20exported\x20\x20types=','INVALID_PRIMARY_KEY','setDesired','\x20has\x20canonical\x20metadata\x20but\x20missing\x20valid\x20inputSchema','\x20tokens:','logs','\x20\x20changes=','_closed','API\x20tokens,\x20users,\x20and\x20credentials.','primary','params.','\x20<path>\x20[json-body]','ms\x20max=','standard','min','setOwnMeta','syncPeers','querySchema','validateRouteInput','removeNode','sync','floor','keys/public.pem','[okdb]\x20error:\x20','headers.','VERB','_bucketIdx','_putRowAsync','--types','protected:write','Content-Type','noteListenAddr','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','\x20SECURITY\x20NOTICE','Operator\x20surface:\x20server\x20info,\x20logs,\x20event\x20streams,\x20processor\x20status,\x20backups.','GONE','\x20@\x20','1ofN:','(primary\x20=\x20processor)','internalOnly','[req]\x20','METHOD_NOT_ALLOWED',':\x20ping\x0a\x0a','base64url','access-control-request-headers','participate','writeUInt16BE','rawBuf','ms\x20activeWriters=','_startedAt','cli','sourceType','Engines','Execute\x20full-text\x20and\x20vector\x20searches.','subject','\x20HTTP\x20server(s)\x20on\x20port\x20','sha256','blob','HEAD','OKDBInvalidValueError','OKDB_HTTP_WORKERS','bus:proc','Origin','maxAge','noCluster','maxWrites','(no\x20types)','_dedupeMax','query','unique:violation_resolved','--no-admin','\x1b[90m','setupPrimary','sync-node','maxBodyBytes','init','single','licenseHash','last-event-id','_draining','Records','authRequired','--help','targetType','\x20\x20(name:\x20','groups','prototype','operations','_enforceOperationAccess','_buildChildRow','{}[]:,\x0a\x0d\x09\x20','stopping','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','__identity','\x20process','rawResponse','PUBLIC_KEY_PEM','envs','--address','schema:set','stopped','isActive','registry-publish','Payload\x20too\x20large','_userPhase','Bearer\x20$1…','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','system:bus_state_change','set','--drop','<json-body>','registerIndex','description','writeUInt32BE','[okdb]\x20cluster\x20primary\x20pid=','username','Unknown\x20JWKS\x20kid:\x20','name','fetch','flushDebounce','force','servers','_caps','\x20\x20\x20\x20port:\x20\x20\x20\x20','_outstanding','rss','isDead','decodeLicenseBlob','\x20license(s)','\x20log\x20level:\x20','identity','rowKey','push',':\x20processor\x20(HTTP-silent),\x20','isWanted','category',',\x20signal=','Invalid\x20token','INDEX_RESET','hasLimit','--grants','running','idx:','../okdb','exit','createEnvironment','search','Register/update/delete\x20types,\x20register/drop/rebuild\x20indexes,\x20set\x20TTL\x20policy.','values','_writer','body.','entry','TYPES','\x20in\x20','\x20has\x20ambiguous\x20binding\x20for\x20path\x20field:\x20','bindings','[res]\x20','okdb-writer[','every','types:','platform','_licenseHash','Unauthorized','cluster','\x20\x20records=','url','processor','limits','decommission','node\x20','_isFree','data:\x20','online','failures','_lastTick','--workers','Environments','getCmd','uncaughtException','\x20│\x20','[okdb]\x20reset\x20aborted','OKDBSchemaCollectionError','verifyCookie','repeat','Create,\x20update,\x20and\x20delete\x20tokens\x20and\x20users;\x20rotate\x20keys.','~processes:cmd','\x1b[37m','_durs','child_process','match','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','FTS_RESET','once','_activateProcessesReader','\x20day(s).','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','\x20\x20All\x20checks\x20passed.\x0a','\x20for\x20system\x20env','\x20\x20Envs:\x20\x20\x20\x20','\x20has\x20illegal\x20binding\x20target\x20for\x20',';\x20Max-Age=','\x20\x20\x20\x20\x20\x20\x20','\x20has\x20unbound\x20input\x20fields\x20with\x20bodyMode:none:\x20','Blob\x20storage:\x20large\x20file\x20uploads\x20attached\x20to\x20records\x20or\x20stored\x20standalone.','examples','[okdb]\x20error:\x20--password\x20requires\x20--name',',\x20label:\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20','[okdb]\x20created\x20./okdb-data',']\x20already\x20maps\x20to\x20\x27','split','array','registerType','\x20\x20[okdb]\x20closed\x20cleanly\x0a','history','x-forwarded-for','QUIT','[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','clear','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','columns','dedupeMax','listDesired','events','Cluster\x20replication.\x20The\x20\x22peer\x22\x20op\x20is\x20for\x20cluster\x20nodes,\x20not\x20human\x20users.','/type/users/item/alice\x0a\x20\x20\x20\x20','UNSUPPORTED_MEDIA_TYPE','get','integer','_nestedWarned','view:progress','hidden','\x20has\x20invalid\x20http.bodyMode:\x20','Cannot\x20set\x20enforce\x20schema\x20on\x20','_active','item:update','randomUUID','undefined','OKDBInvalidIndexKeyError','help','Auth','level','stdout','building','green','authorization_endpoint','[filter]','\x20drainAge=','createInterface','SYNC_COMMITS','parkedNow','_held','OKDBForeignKeyDeleteError','reduce','result','\x20envs','event','\x20more','INDEX_ALREADY_REGISTERED','Activation\x20invalid:\x20','_matchRoute','\x20file','--inspect','writerStatus','--permissions','enabled','object','_admissionStarted','processor:progress','standalone','afterWrite','received\x20','ES256',';\x20Path=','\x20\x20\x20\x20licensee:\x20\x20','payload-or-self','pause','SIG_INVALID','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','homedir','disable','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Type\x20definitions,\x20all\x20index\x20registrations\x20(byIndex,\x20FTS,\x20vector),\x20and\x20TTL\x20policy.','activateLicense','emit','Foreign\x20key\x20violation:\x20','_hbTimer','processKey','registry\x20publish\x20failing:\x20','https','waiting','OKDBSchemaValidationError','_started','isSetupMode','_startHeartbeat','flushed','__okdbCluster','List\x20views,\x20query\x20view\x20output,\x20inspect\x20metadata\x20and\x20definition.','\x20\x20╔═══════════════════════════╗','\x20\x20#','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/staging/info\x0a\x0a','\x20supervised)','LICENSE_INVALID','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','isConnected','sig','handle','SERVICE_UNAVAILABLE','list','JWT\x20is\x20missing\x20kid','next','_lastCpuPct','REMOVE','\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','\x1b[33m','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','getClock','Create,\x20update,\x20and\x20delete\x20records\x20(including\x20bulk\x20import).','_db','unref','_coordinator','\x20\x20@','default','[okdb]\x20shutdown\x20drain\x20exceeded\x203000ms\x20—\x20hard-exiting\x0a','4826392QgYWNA','treeView','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','[okdb]\x20invalid\x20log\x20level:\x20\x22','application/json','jwks_uri','kid','string','input:\x20',';\x20shmbuf\x20native\x20missing\x20→\x20forced\x20single-process','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','ENVS','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.','Register,\x20configure,\x20and\x20remove\x20cluster\x20peers.','parseInt','Index\x20\x22','protected:read','\x20phase=','[okdb]\x20imported\x20\x20types=','Files','signalWant','1344333rigIzB','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20API\x20docs\x20for\x20a\x20path\x0a\x0a\x20\x20','\x20records','--token','\x20\x20Usage:','~licenses','\x27,\x20cannot\x20map\x20to\x20\x27','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','isBuffer','killable','(none)','Unique\x20constraint\x20violated\x20on\x20','_publishNow','Validation\x20failed','active:','hasOwnProperty','getAuthOptions','_handleInProcess','ms\x20env=','\x20result','node/','processors',';\x20Secure','_oidcDiscoveryCache','_totalWriteMs','find','~processes','execArgv','pin','.kdbconfig','51378WZDWrt','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','holder','true','\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a','creating','_committed','value','red','./okdb-backup','inputSchema','\x20while\x20this\x20process\x20runs\x20','offWindow','LICENSE_HASH_MISMATCH','remove','--no-repl','isAuthenticated','Forbidden\x20—\x20requires\x20','claims','POST','\x20has\x20ambiguous\x20binding\x20for\x20query\x20field:\x20','PUT','okdb-diag.','details','server','loop-lag\x20','processing','\x0a\x20\x20✓\x20License\x20already\x20stored\x20(no\x20change)','fn-runner','\x27:\x20','spki','doctor','setSchema','listen','kill','\x0a\x20\x20\x20\x20\x20\x20','\x1b[1m',':want','listRoutes','node\x20identity','resetReadTxn','[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20','route','dumpedAt','expires','then','.log','~processes:desired','consumeLoginState','detectInputType','process','tokenType','types\x20--env\x20staging','content-length','system:proc','_loginStates','existsSync','consecutiveFailures','Token\x20secret\x20not\x20configured','hasDesired','importBlobs','importFromFile','[okdb]\x20http\x20workers:\x20','env/:env','REQUEST_TIMEOUT','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','SIGBREAK','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','expiry','_drain','shift','uptime','kind','recordWrite','addedAt','label','Execute\x20functions\x20over\x20HTTP/MCP/shell.','application/x-www-form-urlencoded','base64','x-requested-with','token','\x20not\x20found','Invalid\x20activation\x20token:\x20','processor:ready','respawnTimer','updatedAt','field:resolver_registered','List\x20jobs,\x20view\x20stats,\x20list\x20buckets.','add','audiences','_selfKey','_enqueuedAt','none','tags','nbf','hasType','threads',')\x20exited\x20','\x0a\x20\x20okdb\x20—\x20standalone\x20OKDB\x20server\x0a\x0a\x20\x20Usage:\x0a\x20\x20\x20\x20okdb\x20[options]\x0a\x20\x20\x20\x20okdb\x20<command>\x0a\x0a\x20\x20Options:\x0a\x20\x20\x20\x20-p,\x20--port\x20<port>\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x20(default:\x208484)\x0a\x20\x20\x20\x20-d,\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x20(default:\x20./okdb-data)\x0a\x20\x20\x20\x20-k,\x20--key\x20\x20<secret>\x20\x20\x20\x20\x20\x20Encryption\x20key\x20for\x20data\x20at\x20rest\x0a\x20\x20\x20\x20-c,\x20--config\x20<file>\x20\x20\x20\x20\x20\x20Config\x20file\x20path\x20(default:\x20.kdbconfig)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-level\x20<level>\x20\x20Log\x20level:\x20debug\x20|\x20info\x20|\x20warn\x20|\x20error\x20(default:\x20info)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-repl\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20without\x20interactive\x20shell\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-admin\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20\x20\x20\x20\x20--open\x20[ip\x20...]\x20\x20\x20\x20\x20\x20Open\x20mode:\x20bypass\x20auth\x20for\x20listed\x20IPs\x20(default:\x20localhost).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Examples:\x20--open\x20\x20--open\x20192.168.1.0/24\x20\x20--open\x20*\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-requests\x20\x20\x20\x20\x20\x20\x20Print\x20every\x20HTTP\x20request\x20to\x20stdout\x20(for\x20debugging)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--workers\x20<n>\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20capable\x20worker\x20processes\x20sharing\x20the\x20listen\x20socket\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(default:\x20cores\x20−\x201).\x20Each\x20worker\x20serves\x20HTTP\x20+\x20SSE\x20AND\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20processes\x20(claims\x20leases,\x20drains\x20on\x20its\x20own\x20loop);\x20the\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20cluster\x20primary\x20is\x20a\x20thin\x20passive\x20supervisor.\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-cluster\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20single-process\x20(equivalent\x20to\x20--workers\x201)\x0a\x20\x20\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x0a\x20\x20Commands:\x0a\x20\x20\x20\x20version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20doctor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20health\x20checks\x0a\x20\x20\x20\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20.kdbconfig\x20and\x20okdb-data/\x0a\x20\x20\x20\x20token\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20a\x20token\x20in\x20the\x20local\x20DB\x20(direct\x20access,\x20no\x20HTTP)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--name\x20<name>\x20\x20\x20\x20\x20\x20For\x20password\x20login\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<pass>\x20\x20Password\x20(requires\x20--name)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--label\x20<text>\x20\x20\x20\x20\x20Human\x20description\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--permissions\x20<l>\x20\x20Comma-separated\x20baseline\x20permissions\x20(e.g.\x20\x22*\x22\x20or\x20\x22data:read\x22)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--grants\x20<json>\x20\x20\x20\x20Per-env\x20grants\x20as\x20JSON\x20(e.g.\x20\x27{\x22orders\x22:[\x22data:*\x22]}\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--ttl\x20<ms>\x20\x20\x20\x20\x20\x20\x20\x20\x20Optional\x20TTL\x20in\x20milliseconds\x0a\x20\x20\x20\x20token\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20all\x20tokens\x20in\x20the\x20local\x20DB\x0a\x20\x20\x20\x20token\x20revoke\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20Revoke\x20(delete)\x20a\x20token\x20by\x20id\x20(full\x20uuid\x20or\x20unique\x20prefix)\x0a\x20\x20\x20\x20join\x20<address>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Join\x20an\x20existing\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--token\x20<t>\x20\x20\x20\x20\x20\x20\x20\x20Bearer\x20token\x20from\x20the\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--username\x20<u>\x20\x20\x20\x20\x20Or,\x20username\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<p>\x20\x20\x20\x20\x20Password\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--address\x20<addr>\x20\x20\x20This\x20node\x27s\x20reachable\x20sync\x20address\x20(required)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20Local\x20DB\x20path\x0a\x20\x20\x20\x20backup\x20[dir]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Hot\x20filesystem\x20backup\x20via\x20LMDB\x20native\x20copy\x20(default:\x20./okdb-backup)\x0a\x20\x20\x20\x20export\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20export\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20env\x20to\x20export\x20(default:\x20default)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20comma-separated\x20type\x20filter\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20include\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20export\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20import\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20import\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20target\x20env\x20override\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20import\x20only\x20these\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--drop\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20drop\x20&\x20recreate\x20existing\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20restore\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20import\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20and\x20recreate\x20database\x20(with\x20confirmation);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20node\x20identity\x20and\x20licenses\x20are\x20preserved\x0a\x20\x20\x20\x20license\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20stored\x20licenses,\x20current\x20tier,\x20and\x20usage\x0a\x20\x20\x20\x20license\x20<blob|path>\x20\x20\x20\x20\x20\x20Add\x20a\x20license\x20blob\x20(or\x20read\x20from\x20a\x20.license\x20file)\x0a\x20\x20\x20\x20license\x20<activation>\x20\x20\x20\x20\x20Activate\x20a\x20previously-added\x20license\x20with\x20the\x20vendor\x27s\x20token\x0a\x20\x20\x20\x20license\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20details\x20for\x20one\x20stored\x20license\x20(by\x20uuid\x20or\x20prefix)\x0a\x20\x20\x20\x20license\x20remove\x20<id>\x20\x20\x20\x20\x20\x20Remove\x20a\x20stored\x20license\x0a\x0a\x20\x20Environment\x20variables:\x0a\x20\x20\x20\x20OKDB_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x0a\x20\x20\x20\x20OKDB_PATH\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x0a\x20\x20\x20\x20OKDB_LOG_LEVEL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log\x20level\x20(debug|info|warn|error)\x0a\x20\x20\x20\x20OKDB_KEY\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Encryption\x20key\x0a\x20\x20\x20\x20OKDB_NO_REPL=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20REPL\x0a\x20\x20\x20\x20OKDB_NO_ADMIN=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20OKDB_HTTP_WORKERS\x20\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20passive\x20HTTP\x20worker\x20processes\x20(default:\x20cores\x20−\x201;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20forced\x20to\x201\x20if\x20the\x20shmbuf\x20native\x20binding\x20is\x20unavailable)\x0a\x0a\x20\x20Config\x20file\x20(.kdbconfig)\x20—\x20JSON,\x20all\x20keys\x20optional:\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22port\x22:\x20\x20\x20\x20\x208484,\x0a\x20\x20\x20\x20\x20\x20\x22path\x22:\x20\x20\x20\x20\x20\x22./okdb-data\x22,\x0a\x20\x20\x20\x20\x20\x20\x22key\x22:\x20\x20\x20\x20\x20\x20\x22...\x22,\x0a\x20\x20\x20\x20\x20\x20\x22logLevel\x22:\x20\x22info\x22,\x0a\x20\x20\x20\x20\x20\x20\x22noAdmin\x22:\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22noRepl\x22:\x20\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22auth\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22open\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20Examples:\x0a\x20\x20\x20\x20okdb\x0a\x20\x20\x20\x20okdb\x20--port\x209000\x20--path\x20./mydb\x0a\x20\x20\x20\x20okdb\x20--no-repl\x20--port\x208080\x0a\x20\x20\x20\x20okdb\x20--open\x0a\x20\x20\x20\x20okdb\x20--open\x20192.168.1.0/24\x0a\x20\x20\x20\x20okdb\x20doctor\x0a\x20\x20\x20\x20okdb\x20backup\x20./my-backup\x0a','issuedAt','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20this\x20help\x0a\x20\x20','getCount','processor:resumed','singletonClaims','[okdb]\x20error:\x20failed\x20to\x20read\x20','schema:drop','available','OKDBTypeNotRegisteredError','_report','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20open\x20admin\x20UI\x20in\x20browser\x0a\x20\x20','HTTP\x20server\x20already\x20running','--port',');\x20','Embeddings','reload','_threadStats','fts','NOT_FOUND','setHeader','_openEnvLazy','targetKey','_seen','admin','mode','Machine-to-machine\x20cluster\x20protocol\x20(join\x20handshake,\x20replication\x20channel,\x20traffic).\x20Grant\x20only\x20to\x20peer\x20nodes\x20—\x20not\x20to\x20humans.','expiresAt','_runMiddlewares','licenses','getDesired','changes','types','line','[okdb]\x20invalid\x20port:\x20','toLowerCase','writeUInt8','env:opened','worker','length','sse','body','createHash','_userRouteCount','[okdb]\x20backup\x20complete','searchParams','http.listen:\x20host\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20an\x20array\x20of\x20them','bold','\x20(durable\x20desired-state)','change','ttl:clear','Work','decommissioned','alg','MALFORMED_TOKEN','register','\x20references\x20','bumpCmd','unhandledRejection','engines','.kdb_history','val','env/staging/info','_kind','GET','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','Peer','confirm','Access-Control-Request-Headers','Run','allowMethods','\x20licenses','Views','readUInt16BE','\x20statusEnv=','isFeatureEnabled','__esModule','_isStale','address','race','depth','Create,\x20delete,\x20and\x20compact\x20environments.','has','\x20\x20http://localhost:','toLocaleString','resume','create','terminal','_statusEnv','title','[okdb-cluster]\x20worker\x20pid=','uuid','decodeActivationToken','_clusterOnMessage','valid','(empty)','List\x20types,\x20get\x20type\x20schema,\x20list\x20registered\x20indexes.','_wantDb','caps','isTTY','\x20\x20Usage:\x20','scrypt','_lastCpuUsage','close','authenticateRequest','formatCookie','[okdb]\x20unknown\x20token\x20action:\x20\x22','_normalizeOAuthAuthResult','claimGated','concat','system:ready','.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22','captureStackTrace','[okdb]\x20warning:\x20could\x20not\x20read\x20node\x20identity/licenses\x20before\x20reset\x20(','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','INDEX_PROGRESS','HTTP\x20','Worker-side:\x20claim,\x20heartbeat,\x20complete,\x20fail,\x20progress.','[okdb]\x20backing\x20up\x20to\x20','_jwksCache','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','authMode','stderr','search:query','statusCode','_maybePublish','okdb.http.listen(port)\x20in\x20each\x20worker.','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','ESRCH','\x20\x20\x20\x20limits:\x20\x20\x20\x20','created','\x20\x20✗','delete','fts:registered',';\x20Expires=','_computeStatus','_nodeDbCache','writeFileSync','key','SYSTEM_STOPPED','_wantDbHandle','active','markClosed','\x1b[2m','fieldPath',',\x20closing…\x0a','_scheduleFlush','Unknown\x20error','pathname','_bpWaiters','\x27\x20already\x20registered','cpus','\x20for\x20commands,\x20','toUpperCase','handler','bus:type_drop','[okdb]\x20invalid\x20config\x20\x22','_lastCpuWindowMs','[okdb]\x20shmbuf\x20native\x20binding\x20unavailable\x20—\x20multi-process\x20clustering\x20is\x20unsafe\x20','metrics','License\x20limit\x20exceeded:\x20','http://','hostname','\x20\x20║','\x20uses\x20raw\x20bodyMode\x20without\x20addRaw/raw\x20route\x20metadata','\x22\x20→\x20','\x20\x20Some\x20checks\x20failed.\x0a','\x20\x20\x20\x20','[okdb]\x20export\x20complete','\x20HTTP\x20workers,\x20primary\x20=\x20processor)','_bestMatch','putNode','\x20writes\x20(','committed','meta','clearTtl','View\x20server\x20info,\x20logs,\x20SSE\x20event\x20streams,\x20processor\x20status,\x20backup\x20list.','_runGuards','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','start','\x20\x20(','ref:violation_resolved','[okdb]\x20closed\x20cleanly\x0a','_onStop','update','0123456789ABCDEFGHJKMNPQRSTVWXYZ','already\x20in\x20use','_buildProcessingFacet','clusterWorkers','\x20parkedNow=','async','functions','BAD_HOST','_baselines','origins','timingSafeEqual','cursorKey','\x20===','\x20\x20⚠','_totalReads','okdb-http-worker-child.js','bodyMode','\x20oldestPendingMs=','_onPoke','_getOidcDiscovery','abs','function','transaction','INVALID_VALUE','BAD_REQUEST','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','okdb_session','uri','SYSTEM_POKE','stats','authorization','index:progress','_ensureDesired','Lax','error','slice','count','--password','Get\x20and\x20list\x20records,\x20run\x20byIndex\x20queries.','startHeartbeat','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','run','forEach','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','shell','compact','SIGINT\x20(double-tap)','finally','\x20(must\x20be\x20true\x20or\x20false)','_processStartedAt','--config','[okdb]\x20opening\x20','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','workersFlag','unlinkSync','_handlePoke','--env','_onTick','flushLmdb','DELETE\x20type/users/item/x','type:registered','System','ENV','createServer','_getJwkKey','registerFts','\x0a\x20\x20Invalid\x20JSON:\x20','--watch','ready','\x20logs\x20on\x20\x20','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','tryAcquire',';\x20HttpOnly','\x0a\x20\x20✓\x20Token\x20created','method','verify','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/envs\x0a\x20\x20\x20\x20','_publishFailWarned','type','OPTIONS','_activateProcesses','ms\x20on\x20env=','include','exportToFile','http-server','cluster:\x20ready\x20(','_lastPublishAt','txn:start','peers=','decoded','_onProcEvent','revoke','indexOf','workers','id:\x20','/\x20quit\x20/\x20Ctrl+C','port','properties','SIGTERM','procmodeack/','closeIdleConnections','ITEM_UPDATE','/api','(?:','shutting\x20down…\x0a','\x0a-----END\x20CERTIFICATE-----\x0a','LICENSE_EXPIRED_ACTION','readUInt32BE','_wrapApiResponse','load','hint','removeSync','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','process\x20','\x0a\x20\x20','drop','http.listen({workers/makeOkdb/primaryOkdb})\x20is\x20no\x20longer\x20supported\x20in\x20the\x20','/type/users/query\x0a\x20\x20\x20\x20','guard','getSecurityNotices','writeMs','_listenAddr','_totalWrites','ID\x20token\x20is\x20not\x20accepted','heapTotal','origin','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','2rapuJO','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','UNAUTHORIZED','all','padEnd','Create\x20and\x20delete\x20views,\x20start,\x20stop,\x20and\x20rebuild\x20them.','other','\x0d[okdb]\x20blobs:\x20','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','embeddings','JWT\x20expired','reset','_bpParkedTotal','\x20license\x20—\x20no\x20activation\x20needed)','_isReader','path','Gate\x20flag\x20required\x20to\x20touch\x20system\x20types\x20(those\x20whose\x20name\x20starts\x20with\x20\x22~\x22).\x20Combined\x20with\x20the\x20underlying\x20namespace\x20permission.','map','_sampleOwnStats','catch','field','_lock','entries','_groupByProcess','reap','x-okdb-raw-response','dynamic','access-control-max-age','LOGS','writes=','read','mcp-session-id','http','isInteger','startsWith','permission','params','https:','body:\x20','changed','payload','logRequests','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','_singletonLocks','\x20(id:\x20','allowedAlgs','\x20\x20\x20\x20\x20\x20','index:drop','\x20\x20\x20\x20features:\x20\x20','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','Write','Release','_released','fts:drop','TYPE_NOT_REGISTERED','Queue','percentile','[okdb]\x20starting…\x0a','busy','listenAddr','magenta','PATCH','_startAdmission','routes','_sockets','Pause/resume\x20processor,\x20trigger\x20backups,\x20restore.','database\x20path\x20writable:\x20','commitP99Ms','options','acquiredAt','equals','ACTIVATION_EXPIRED','SIGKILL','isArray','statuses','kdb_admin_csrf','commitsPerSec','commit','parse','requests','processor:error','_adminRelay','(?:/(.*))?$','call','\x20\x20Common\x20causes:','put','_singletonLock','prependListener','LENGTH_REQUIRED','\x22:\x20','\x20type','token_use','getPins','\x20fetching\x20','_timer','noRepl','\x20\x20Shell\x20commands','Background\x20job\x20queue:\x20enqueue\x20work,\x20observe\x20state,\x20and\x20process\x20jobs.','\x0d[okdb]\x20','open\x20','_quantum','licensee','_admissionTimer','cookies','record','authorizationUrl','mean','use','Events','req','_log','issueToken','heapUsed','removeLicense','state','sync:apply','SYSTEM_PROC','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','outputSchema','type/users/item/alice','_lastCpuAt','\x20\x20skipped=','addSupervisedChild','userAdded','clusterStatusView','\x20\x20\x20\x20writes:\x20\x20\x20\x20','start\x20','transport:\x20','_refreshDesiredSnapshot','ttlMs','UNIQUE_CONSTRAINT','isWorker','ingest','%),\x20','guards','JWT\x20audience\x20mismatch','\x20\x20Writes:\x20\x20','Upload,\x20update\x20metadata,\x20and\x20delete\x20files.','USE','addRaw','yellow','email','keep-alive','2.3.5','\x20\x20\x20\x20status:\x20\x20\x20\x20active','_desired','./okdb-export.ndjson','PUB_FINGERPRINT','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','updateSupervisedChildStats','files/','readUInt8','some','7mGwQVx','data','_onItem'];_0x226c=function(){return _0x367660;};return _0x226c();}function requireOkdbHttp(){const _0xfbb2ca=_0x362184;if(hasRequiredOkdbHttp)return okdbHttp[_0xfbb2ca(0x1e3)];hasRequiredOkdbHttp=0x1;const _0x58e0c1=require$$0$6,{URL:_0x112465}=require$$2$1,_0x229063=requireOkdbMetrics(),_0x13c763=requireOkdbAuthTokens(),{hasPermission:_0x5f398e,unionPermissions:_0x999112,resolveProtectedGate:_0x34217e}=requireOkdbAuthPermissions(),_0x28c109={0x190:_0xfbb2ca(0x5ad),0x191:_0xfbb2ca(0x617),0x193:_0xfbb2ca(0x1e2),0x194:_0xfbb2ca(0x4ef),0x195:_0xfbb2ca(0x32c),0x198:_0xfbb2ca(0x4ba),0x199:'CONFLICT',0x19a:_0xfbb2ca(0x326),0x19b:_0xfbb2ca(0x66d),0x19d:_0xfbb2ca(0x787),0x19f:_0xfbb2ca(0x3e5),0x1a6:'UNPROCESSABLE_ENTITY',0x1ad:'TOO_MANY_REQUESTS',0x1f4:'INTERNAL_ERROR',0x1f5:'NOT_IMPLEMENTED',0x1f6:'BAD_GATEWAY',0x1f7:_0xfbb2ca(0x436),0x1f8:'GATEWAY_TIMEOUT'},_0x13ad4d={'INVALID_VALUE':0x190,'BAD_CONFIG':0x190,'INVALID_PRIMARY_KEY':0x190,'INVALID_INDEX_KEY':0x190,'TYPE_NOT_REGISTERED':0x194,'INDEX_NOT_REGISTERED':0x194,'NOT_FOUND':0x194,'ALREADY_EXISTS':0x199,'VERSION_MISMATCH':0x199,'UNIQUE_CONSTRAINT':0x199,'TYPE_ALREADY_REGISTERED':0x199,'INDEX_ALREADY_REGISTERED':0x199,'FK_ERROR':0x199,'FK_DELETE_ERROR':0x199,'FOREIGN_KEY_VIOLATION':0x199,'FOREIGN_KEY_DELETE_RESTRICTED':0x199,'ENV_NOT_FOUND':0x194,'ENV_PROTECTED':0x193,'ENGINE_CONFIG_PATCH_UNSUPPORTED':0x190,'QUEUE_WORKER_JOB_TYPE_CONFLICT':0x199,'SCHEMA_VALIDATION_FAILED':0x1a6,'SCHEMA_COLLECTION_INVALID':0x199,'INVALID_SCHEMA':0x190,'BUCKET_CONFIG_INVALID':0x190,'BUCKET_INVALID_TIME_VALUE':0x1a6,'RESERVED_VIEW_NAME':0x190,'VIEW_NOT_BUCKETED':0x190,'VIEW_NOT_FOUND':0x194,'VIEW_RANGE_GRANULARITY_MISMATCH':0x190,'VIEW_RANGE_GRANULARITY_REQUIRED':0x190,'VIEW_REF_UNSUPPORTED_REDUCER':0x190},{hmac:_0x32578a,timingSafeEqual:_0x273c70,parseBearer:_0x266324,randomToken:_0x5bbee0,issueToken:_0x595d73,authenticateToken:_0x199cf6}=_0x13c763,{base64UrlDecode:_0x3cd520,parseJwt:_0x2d4b1d,normalizeAudience:_0x196c1f,normalizePemCertificate:_0x43960c,jwkToKeyObject:_0x2793b2,verifyJwtSignature:_0x3ba38d,fetchJson:_0x31d9c7}=requireOkdbJwtUtils();function _0x52d75c(_0x2be0fb){const _0x47a23e=_0xfbb2ca;return(_0x2be0fb||_0x47a23e(0x51c))[_0x47a23e(0x575)]();}function _0x362393(_0x328884){const _0x5ae7ba=_0xfbb2ca;if(Array[_0x5ae7ba(0x65e)](_0x328884))return _0x328884[_0x5ae7ba(0x279)](_0x362393);return String(_0x328884||'')[_0x5ae7ba(0x3d5)](',')[_0x5ae7ba(0x626)](_0x3644f9=>_0x3644f9[_0x5ae7ba(0x6f3)]())['filter'](Boolean);}function _0x3f378e(..._0x26731c){const _0x27204c=_0xfbb2ca;return[...new Set(_0x26731c[_0x27204c(0x279)](_0x362393))][_0x27204c(0x29f)](',\x20');}function _0x57ec07(_0x11b209,_0x5b670b){const _0x1ca9a4=_0xfbb2ca;if(!_0x11b209)return![];if(_0x5b670b==='*')return!![];if(_0x5b670b instanceof RegExp)return _0x5b670b[_0x1ca9a4(0x193)](_0x11b209);if(typeof _0x5b670b===_0x1ca9a4(0x5aa))return!!_0x5b670b(_0x11b209);if(Array[_0x1ca9a4(0x65e)](_0x5b670b))return _0x5b670b[_0x1ca9a4(0x1dc)](_0x11b209);return _0x5b670b===_0x11b209;}function _0x2b9661(_0x44db3d={},_0x199721={},_0x458874=null){const _0x46ceac=_0xfbb2ca;if(!_0x199721)return null;const _0x524ec1=_0x44db3d[_0x46ceac(0x613)],_0x258316=_0x199721[_0x46ceac(0x59e)]??_0x199721['origin']??'*',_0x20f627=_0x258316==='*'?'*':_0x57ec07(_0x524ec1,_0x258316)?_0x524ec1:null;if(!_0x20f627)return null;const _0x79302f=_0x44db3d[_0x46ceac(0x32f)],_0x57e463=_0x199721[_0x46ceac(0x786)]??_0x199721['allowHeaders']??[_0x46ceac(0x7a1),'authorization','mcp-session-id',_0x46ceac(0x351),_0x46ceac(0x4c9)],_0x46477e=_0x199721[_0x46ceac(0x20b)]??_0x199721[_0x46ceac(0x522)]??(_0x458874?[_0x458874,'OPTIONS']:[_0x46ceac(0x51c),_0x46ceac(0x48d),_0x46ceac(0x5e5)]),_0x2fe6da=_0x199721[_0x46ceac(0x26b)]??[_0x46ceac(0x634)],_0x597323={'access-control-allow-origin':_0x20f627,'access-control-allow-methods':Array[_0x46ceac(0x65e)](_0x46477e)?_0x46477e[_0x46ceac(0x29f)](',\x20'):String(_0x46477e),'access-control-allow-headers':_0x79302f?_0x3f378e(_0x57e463,_0x79302f):Array[_0x46ceac(0x65e)](_0x57e463)?_0x57e463['join'](',\x20'):String(_0x57e463),'access-control-expose-headers':Array[_0x46ceac(0x65e)](_0x2fe6da)?_0x2fe6da['join'](',\x20'):String(_0x2fe6da),'vary':_0x3f378e(_0x46ceac(0x341),_0x20f627==='*'?'':'Origin',_0x79302f?_0x46ceac(0x520):'')};if(_0x199721['credentials'])_0x597323[_0x46ceac(0x746)]='true';if(Number[_0x46ceac(0x79d)](_0x199721[_0x46ceac(0x342)]))_0x597323[_0x46ceac(0x630)]=String(_0x199721[_0x46ceac(0x342)]);return _0x597323;}function _0x570044(_0x283c45){const _0x400db0=_0xfbb2ca,_0x2f977d=[],_0xb3742f={};let _0x5407a1=![];_0x283c45[_0x400db0(0x25f)]('/*')&&(_0x5407a1=!![],_0x283c45=_0x283c45[_0x400db0(0x5b8)](0x0,-0x2),_0x2f977d[_0x400db0(0x387)]('*'));let _0x9ac3b7=_0x283c45[_0x400db0(0x18e)](/\/+$/,'')[_0x400db0(0x18e)](/\[([^\]]*)\]/g,(_0xf94376,_0x3d8afb)=>{const _0x25598c=_0x400db0,_0x44907a=_0x3d8afb[_0x25598c(0x18e)](/\/:(\w+)(?:=([^/\]\s]*))?/g,(_0x33c51a,_0x472594,_0x22dfbf)=>{_0x2f977d['push'](_0x472594);if(_0x22dfbf!==undefined)_0xb3742f[_0x472594]=_0x22dfbf;return'/([^/]+)';});return _0x25598c(0x5fd)+_0x44907a+')?';})['replace'](/\/:(\w+)/g,(_0x3ce9d6,_0xd8f76f)=>{const _0x4001cc=_0x400db0;return _0x2f977d[_0x4001cc(0x387)](_0xd8f76f),'/([^/]+)';});if(_0x9ac3b7==='')_0x9ac3b7='/';return{'keys':_0x2f977d,'defaults':_0xb3742f,'wildcard':_0x5407a1,'regex':new RegExp(_0x5407a1?'^'+_0x9ac3b7+_0x400db0(0x667):'^'+_0x9ac3b7+'$')};}function _0x31da51(_0x475234){const _0x5ecdf4=_0xfbb2ca;if(_0x475234==null)return _0x475234;return JSON[_0x5ecdf4(0x663)](JSON[_0x5ecdf4(0x72f)](_0x475234));}function _0x5f1969(_0x46125e){const _0x245b9a=_0xfbb2ca;if(_0x46125e==null)return null;if(_0x46125e[_0x245b9a(0x5e4)]===_0x245b9a(0x40d)&&_0x46125e[_0x245b9a(0x5f7)]&&!Array[_0x245b9a(0x65e)](_0x46125e[_0x245b9a(0x5f7)]))return _0x31da51(_0x46125e);const _0x57575c=Object[_0x245b9a(0x397)](_0x46125e),_0x1bbc21=_0x57575c['length']>0x0&&_0x57575c[_0x245b9a(0x3a1)](_0x533bf7=>{const _0x491873=_0x245b9a;return _0x533bf7&&typeof _0x533bf7===_0x491873(0x40d)&&!Array[_0x491873(0x65e)](_0x533bf7)&&(Object[_0x491873(0x359)][_0x491873(0x46b)][_0x491873(0x668)](_0x533bf7,_0x491873(0x5e4))||Object[_0x491873(0x359)][_0x491873(0x46b)][_0x491873(0x668)](_0x533bf7,_0x491873(0x5f7))||Object[_0x491873(0x359)][_0x491873(0x46b)][_0x491873(0x668)](_0x533bf7,_0x491873(0x77e))||Object[_0x491873(0x359)][_0x491873(0x46b)][_0x491873(0x668)](_0x533bf7,_0x491873(0x445)));});if(_0x1bbc21)return{'type':_0x245b9a(0x40d),'properties':_0x31da51(_0x46125e),'required':[],'additionalProperties':![]};const _0x4d5e26={},_0x315a5c=[];for(const [_0x4574c1,_0x410e4b]of Object['entries'](_0x46125e)){_0x4d5e26[_0x4574c1]=_0x22ae6a(_0x410e4b);if(_0x410e4b!==null&&_0x410e4b!==undefined)_0x315a5c[_0x245b9a(0x387)](_0x4574c1);}return{'type':_0x245b9a(0x40d),'properties':_0x4d5e26,'required':_0x315a5c,'additionalProperties':![]};}function _0x22ae6a(_0x1057e4){const _0x507d9a=_0xfbb2ca;if(_0x1057e4===null)return{'type':[_0x507d9a(0x750),_0x507d9a(0x44e),_0x507d9a(0x6e3),_0x507d9a(0x6ff),_0x507d9a(0x40d),'array']};if(Array[_0x507d9a(0x65e)](_0x1057e4))return{'type':'array','items':_0x1057e4[_0x507d9a(0x503)]>0x0?_0x22ae6a(_0x1057e4[0x0]):{}};switch(typeof _0x1057e4){case _0x507d9a(0x44e):return{'type':_0x507d9a(0x44e),'default':_0x1057e4};case _0x507d9a(0x6e3):return{'type':Number[_0x507d9a(0x636)](_0x1057e4)?'integer':_0x507d9a(0x6e3),'default':_0x1057e4};case _0x507d9a(0x6ff):return{'type':'boolean','default':_0x1057e4};case _0x507d9a(0x40d):{const _0x4078a2={};for(const [_0x50bcf0,_0xb2a30a]of Object['entries'](_0x1057e4))_0x4078a2[_0x50bcf0]=_0x22ae6a(_0xb2a30a);return{'type':_0x507d9a(0x40d),'properties':_0x4078a2,'additionalProperties':!![],'default':_0x31da51(_0x1057e4)};}default:return{};}}function _0x47f27c(_0x311e97,_0x465193){const _0x183ca8=_0xfbb2ca,_0x3edbbf=[];for(const _0x34c56a of _0x465193[_0x183ca8(0x2ac)]){if(_0x34c56a==='*')continue;_0x3edbbf[_0x183ca8(0x387)]({'name':_0x34c56a,'required':!Object[_0x183ca8(0x359)][_0x183ca8(0x46b)][_0x183ca8(0x668)](_0x465193[_0x183ca8(0x1a9)],_0x34c56a),'default':_0x465193[_0x183ca8(0x1a9)][_0x34c56a]});}return _0x3edbbf;}function _0x41e7e1(_0x5c8c4c={},_0x53d078){const _0x155811=_0xfbb2ca,_0x37e641=_0x5f1969(_0x5c8c4c[_0x155811(0x635)]?.['querySchema']??_0x5c8c4c[_0x155811(0x347)]??null),_0x5d3568=_0x5c8c4c[_0x155811(0x635)]?.[_0x155811(0x5a5)]??(_0x5c8c4c['raw']?_0x155811(0x1ec):_0x53d078[_0x155811(0x5e0)]===_0x155811(0x51c)||_0x53d078[_0x155811(0x5e0)]===_0x155811(0x33d)?_0x155811(0x4d6):_0x155811(0x2c7));return{'querySchema':_0x37e641,'bodyMode':_0x5d3568,'bindings':_0x31da51(_0x5c8c4c[_0x155811(0x635)]?.[_0x155811(0x39e)]??{}),'statuses':_0x31da51(_0x5c8c4c['http']?.[_0x155811(0x65f)]??(_0x5c8c4c[_0x155811(0x297)]||[])),'transport':_0x5c8c4c[_0x155811(0x635)]?.[_0x155811(0x240)]??(_0x5c8c4c[_0x155811(0x504)]?_0x155811(0x504):_0x5c8c4c[_0x155811(0x1ec)]?'raw':_0x155811(0x310)),'rawResponse':_0x5c8c4c[_0x155811(0x635)]?.['rawResponse']??!!_0x5c8c4c[_0x155811(0x362)],'cors':_0x31da51(_0x5c8c4c[_0x155811(0x635)]?.[_0x155811(0x6c4)]??_0x5c8c4c[_0x155811(0x6c4)]??null)};}function _0x26cb08(_0x3f5acc){const _0x14b9d1=_0xfbb2ca,_0xa69d50=_0x3f5acc[_0x14b9d1(0x58a)]||{},_0x3ed66c=_0x47f27c(_0x3f5acc[_0x14b9d1(0x624)],_0x3f5acc[_0x14b9d1(0x2dc)]),_0x158101=!!(_0xa69d50['id']||_0xa69d50['inputSchema']||_0xa69d50[_0x14b9d1(0x68b)]||_0xa69d50[_0x14b9d1(0x635)]||_0xa69d50['mcp']||_0xa69d50[_0x14b9d1(0x335)]||_0xa69d50[_0x14b9d1(0x28d)]||_0xa69d50['safety']),_0x58da71=_0x41e7e1(_0xa69d50,_0x3f5acc),_0x2a981f=_0xa69d50[_0x14b9d1(0x484)]?_0x31da51(_0xa69d50[_0x14b9d1(0x484)]):null;return{'id':_0xa69d50['id']??null,'summary':_0xa69d50[_0x14b9d1(0x2d5)]??null,'description':_0xa69d50[_0x14b9d1(0x373)]??null,'tags':_0x31da51(_0xa69d50[_0x14b9d1(0x4d7)]??[]),'category':_0xa69d50[_0x14b9d1(0x38a)]??null,'safety':_0x31da51(_0xa69d50[_0x14b9d1(0x217)]??null),'access':_0x31da51(_0xa69d50['access']??null),'inputSchema':_0x2a981f,'outputSchema':_0x31da51(_0xa69d50[_0x14b9d1(0x68b)]??null),'examples':_0x31da51(_0xa69d50[_0x14b9d1(0x3cf)]??[]),'pathParams':_0x3ed66c,'http':_0x58da71,'cli':_0x31da51(_0xa69d50[_0x14b9d1(0x335)]??null),'mcp':_0x31da51(_0xa69d50[_0x14b9d1(0x79a)]??null),'legacy':{'params':_0x31da51(_0xa69d50[_0x14b9d1(0x639)]??null),'query':_0x31da51(_0xa69d50[_0x14b9d1(0x347)]??null),'body':_0x31da51(_0xa69d50[_0x14b9d1(0x505)]??null),'response':_0x31da51(_0xa69d50['response']??null)},'transport':{'raw':!!_0xa69d50[_0x14b9d1(0x1ec)],'sse':!!_0xa69d50['sse'],'rawResponse':!!_0xa69d50[_0x14b9d1(0x362)],'cors':_0x31da51(_0xa69d50[_0x14b9d1(0x6c4)]??null)},'hasCanonical':_0x158101};}function _0x17afbb(_0x4aaa7b,_0x303ff2){const _0x12c763=_0xfbb2ca;if(!_0x303ff2?.[_0x12c763(0x2ef)])return;if(!_0x303ff2[_0x12c763(0x484)]||_0x303ff2[_0x12c763(0x484)][_0x12c763(0x5e4)]!==_0x12c763(0x40d)||!_0x303ff2['inputSchema']['properties'])throw new Error('Route\x20'+_0x4aaa7b[_0x12c763(0x5e0)]+'\x20'+_0x4aaa7b[_0x12c763(0x624)]+_0x12c763(0x306));const _0x44eb75=_0x303ff2[_0x12c763(0x484)][_0x12c763(0x5f7)]||{},_0x542f46=new Set(_0x303ff2[_0x12c763(0x29c)][_0x12c763(0x626)](_0x324095=>_0x324095['name'])),_0x5f3abc=new Set(Object[_0x12c763(0x2ac)](_0x303ff2[_0x12c763(0x635)]?.[_0x12c763(0x314)]?.['properties']||{})),_0x2cf793=new Set(Object['keys'](_0x303ff2[_0x12c763(0x635)]?.[_0x12c763(0x39e)]||{}));for(const _0x3a26df of _0x303ff2[_0x12c763(0x29c)]){if(!_0x44eb75[_0x3a26df['name']])throw new Error(_0x12c763(0x274)+_0x4aaa7b['method']+'\x20'+_0x4aaa7b[_0x12c763(0x624)]+'\x20missing\x20path\x20field\x20in\x20inputSchema:\x20'+_0x3a26df['name']);}for(const _0x43138f of _0x5f3abc){if(!_0x44eb75[_0x43138f])throw new Error(_0x12c763(0x274)+_0x4aaa7b['method']+'\x20'+_0x4aaa7b[_0x12c763(0x624)]+_0x12c763(0x255)+_0x43138f);}for(const _0x482a7f of _0x2cf793){if(!_0x44eb75[_0x482a7f])throw new Error('Route\x20'+_0x4aaa7b['method']+'\x20'+_0x4aaa7b['path']+_0x12c763(0x211)+_0x482a7f);}for(const _0x4435a9 of _0x2cf793){if(_0x542f46[_0x12c763(0x52e)](_0x4435a9))throw new Error(_0x12c763(0x274)+_0x4aaa7b[_0x12c763(0x5e0)]+'\x20'+_0x4aaa7b[_0x12c763(0x624)]+_0x12c763(0x39d)+_0x4435a9);if(_0x5f3abc[_0x12c763(0x52e)](_0x4435a9))throw new Error('Route\x20'+_0x4aaa7b['method']+'\x20'+_0x4aaa7b[_0x12c763(0x624)]+_0x12c763(0x48e)+_0x4435a9);const _0x17592f=_0x303ff2[_0x12c763(0x635)][_0x12c763(0x39e)][_0x4435a9];if(!/^params\.[A-Za-z0-9_*.-]+$/['test'](_0x17592f)&&!/^query\.[A-Za-z0-9_*.-]+$/['test'](_0x17592f)&&!/^body(?:\.[A-Za-z0-9_*.-]+)?$/[_0x12c763(0x193)](_0x17592f)&&!/^headers\.[A-Za-z0-9_*.-]+$/[_0x12c763(0x193)](_0x17592f))throw new Error(_0x12c763(0x274)+_0x4aaa7b['method']+'\x20'+_0x4aaa7b[_0x12c763(0x624)]+_0x12c763(0x3ca)+_0x4435a9+':\x20'+_0x17592f);}for(const _0x38607c of _0x5f3abc){if(_0x542f46[_0x12c763(0x52e)](_0x38607c))throw new Error('Route\x20'+_0x4aaa7b['method']+'\x20'+_0x4aaa7b[_0x12c763(0x624)]+'\x20has\x20ambiguous\x20query/path\x20field:\x20'+_0x38607c);}const _0x31c212=_0x303ff2[_0x12c763(0x635)]?.['bodyMode'],_0x28eaaa=new Set([_0x12c763(0x4d6),_0x12c763(0x2c7),_0x12c763(0x40d),_0x12c763(0x416),_0x12c763(0x3d6),_0x12c763(0x1ec)]);if(!_0x28eaaa[_0x12c763(0x52e)](_0x31c212))throw new Error(_0x12c763(0x274)+_0x4aaa7b['method']+'\x20'+_0x4aaa7b['path']+_0x12c763(0x3eb)+_0x31c212);if(_0x31c212===_0x12c763(0x1ec)&&!_0x4aaa7b[_0x12c763(0x58a)]?.[_0x12c763(0x1ec)])throw new Error(_0x12c763(0x274)+_0x4aaa7b['method']+'\x20'+_0x4aaa7b[_0x12c763(0x624)]+_0x12c763(0x580));if(_0x303ff2[_0x12c763(0x79a)]?.[_0x12c763(0x5e8)]!==![]&&(_0x4aaa7b[_0x12c763(0x58a)]?.[_0x12c763(0x1ec)]||_0x4aaa7b[_0x12c763(0x58a)]?.['sse']||_0x303ff2[_0x12c763(0x635)]?.['transport']===_0x12c763(0x246)))throw new Error(_0x12c763(0x274)+_0x4aaa7b[_0x12c763(0x5e0)]+'\x20'+_0x4aaa7b[_0x12c763(0x624)]+'\x20cannot\x20be\x20MCP-exposed\x20without\x20an\x20explicit\x20adapter\x20because\x20it\x20uses\x20'+_0x303ff2[_0x12c763(0x635)]?.['transport']);const _0x407e7f=Object[_0x12c763(0x2ac)](_0x44eb75)[_0x12c763(0x1ff)](_0x244cd3=>{const _0x5430f5=_0x12c763;if(_0x542f46[_0x5430f5(0x52e)](_0x244cd3))return![];if(_0x5f3abc[_0x5430f5(0x52e)](_0x244cd3))return![];if(_0x2cf793[_0x5430f5(0x52e)](_0x244cd3))return![];return!![];});if(_0x31c212===_0x12c763(0x4d6)&&_0x407e7f['length']>0x0)throw new Error('Route\x20'+_0x4aaa7b[_0x12c763(0x5e0)]+'\x20'+_0x4aaa7b[_0x12c763(0x624)]+_0x12c763(0x3cd)+_0x407e7f[_0x12c763(0x29f)](',\x20'));}function _0x2ee970(_0x7b0413){const _0x327e6b=_0xfbb2ca;if(Array[_0x327e6b(0x65e)](_0x7b0413))return _0x7b0413;if(_0x7b0413==null)return[];return[_0x7b0413];}function _0x29deac(_0x5ba19e,_0x42601a){const _0x57d72c=_0xfbb2ca;return _0x2ee970(_0x5ba19e?.[_0x57d72c(0x5e4)])[_0x57d72c(0x1dc)](_0x42601a);}function _0x526f56(_0x1b60ce,_0x2376f4){const _0x183015=_0xfbb2ca;if(_0x1b60ce==null||typeof _0x1b60ce!==_0x183015(0x44e))return _0x1b60ce;const _0x535503=_0x2ee970(_0x2376f4?.[_0x183015(0x5e4)]);if(_0x535503['length']===0x0)return _0x1b60ce;if(_0x535503[_0x183015(0x1dc)]('null')&&_0x1b60ce===_0x183015(0x750))return null;if(_0x535503['includes'](_0x183015(0x6ff))){if(_0x1b60ce===_0x183015(0x47d))return!![];if(_0x1b60ce==='false')return![];}if(_0x535503[_0x183015(0x1dc)](_0x183015(0x3e7))&&/^-?\d+$/[_0x183015(0x193)](_0x1b60ce))return Number[_0x183015(0x455)](_0x1b60ce,0xa);if(_0x535503[_0x183015(0x1dc)](_0x183015(0x6e3))&&/^-?(?:\d+|\d*\.\d+)$/['test'](_0x1b60ce))return Number(_0x1b60ce);return _0x1b60ce;}function _0x333d49(_0x3a83b9){return _0x31da51(_0x3a83b9);}function _0x16bfff(_0x151723,_0x5e7f67={},_0x1b104a={},_0x5172c1=null,_0x13ef87={}){const _0x5094d7=_0xfbb2ca,_0x3d482b=_0x151723?.[_0x5094d7(0x71e)];if(!_0x3d482b?.[_0x5094d7(0x2ef)]||!_0x3d482b[_0x5094d7(0x484)])return null;const _0xaa8526=_0x3d482b['inputSchema'][_0x5094d7(0x5f7)]||{},_0x458b1e=_0x3d482b[_0x5094d7(0x635)]?.[_0x5094d7(0x314)]?.[_0x5094d7(0x5f7)]||{},_0x351011=_0x3d482b[_0x5094d7(0x635)]?.[_0x5094d7(0x39e)]||{},_0x18bb18=new Set((_0x3d482b[_0x5094d7(0x29c)]||[])[_0x5094d7(0x626)](_0x5435c4=>_0x5435c4['name'])),_0x38b86b=new Set(Object[_0x5094d7(0x2ac)](_0x458b1e)),_0x167bad={};for(const [_0x326bb7,_0x3bef7f]of Object[_0x5094d7(0x62b)](_0xaa8526)){Object['prototype'][_0x5094d7(0x46b)][_0x5094d7(0x668)](_0x3bef7f||{},'default')&&(_0x167bad[_0x326bb7]=_0x333d49(_0x3bef7f[_0x5094d7(0x445)]));}for(const _0x28f24c of _0x3d482b[_0x5094d7(0x29c)]||[]){if(!Object['prototype'][_0x5094d7(0x46b)][_0x5094d7(0x668)](_0x5e7f67,_0x28f24c[_0x5094d7(0x378)]))continue;const _0x20dcaa=_0xaa8526[_0x28f24c[_0x5094d7(0x378)]]||{};_0x167bad[_0x28f24c[_0x5094d7(0x378)]]=_0x526f56(_0x5e7f67[_0x28f24c['name']],_0x20dcaa);}for(const [_0x59fc17,_0x564a29]of Object[_0x5094d7(0x62b)](_0x458b1e)){if(!Object[_0x5094d7(0x359)][_0x5094d7(0x46b)]['call'](_0x1b104a,_0x59fc17))continue;_0x167bad[_0x59fc17]=_0x526f56(_0x1b104a[_0x59fc17],_0x564a29||_0xaa8526[_0x59fc17]||{});}for(const [_0x235439,_0x4c2e62]of Object[_0x5094d7(0x62b)](_0x351011)){if(typeof _0x4c2e62!==_0x5094d7(0x44e))continue;let _0x138f2e;if(_0x4c2e62[_0x5094d7(0x637)](_0x5094d7(0x30d)))_0x138f2e=_0x5e7f67[_0x4c2e62[_0x5094d7(0x5b8)](0x7)];else{if(_0x4c2e62[_0x5094d7(0x637)](_0x5094d7(0x296)))_0x138f2e=_0x1b104a[_0x4c2e62[_0x5094d7(0x5b8)](0x6)];else{if(_0x4c2e62===_0x5094d7(0x505))_0x138f2e=_0x5172c1;else{if(_0x4c2e62[_0x5094d7(0x637)](_0x5094d7(0x399)))_0x138f2e=_0x5172c1?.[_0x4c2e62[_0x5094d7(0x5b8)](0x5)];else{if(_0x4c2e62[_0x5094d7(0x637)](_0x5094d7(0x31b)))_0x138f2e=_0x13ef87?.[_0x4c2e62['slice'](0x8)['toLowerCase']()]??_0x13ef87?.[_0x4c2e62[_0x5094d7(0x5b8)](0x8)];}}}}if(_0x138f2e!==undefined)_0x167bad[_0x235439]=_0x138f2e;}const _0x25ce43=_0x3d482b[_0x5094d7(0x635)]?.['bodyMode'];if(_0x25ce43!==_0x5094d7(0x4d6)&&_0x25ce43!==_0x5094d7(0x1ec)&&_0x5172c1!=null){if(_0x25ce43===_0x5094d7(0x40d))for(const [_0x1e8407,_0x27659d]of Object[_0x5094d7(0x62b)](_0xaa8526)){if(_0x18bb18[_0x5094d7(0x52e)](_0x1e8407)||_0x38b86b[_0x5094d7(0x52e)](_0x1e8407)||Object[_0x5094d7(0x359)][_0x5094d7(0x46b)][_0x5094d7(0x668)](_0x351011,_0x1e8407))continue;if(Object['prototype'][_0x5094d7(0x46b)][_0x5094d7(0x668)](_0x5172c1,_0x1e8407))_0x167bad[_0x1e8407]=_0x5172c1[_0x1e8407];else{if(_0x29deac(_0x27659d,_0x5094d7(0x40d)))_0x167bad[_0x1e8407]=_0x5172c1;}}else for(const [_0x3ed765,_0x3b57f3]of Object[_0x5094d7(0x62b)](_0x5172c1)){if(_0x18bb18[_0x5094d7(0x52e)](_0x3ed765)||_0x38b86b[_0x5094d7(0x52e)](_0x3ed765)||Object[_0x5094d7(0x359)][_0x5094d7(0x46b)][_0x5094d7(0x668)](_0x351011,_0x3ed765))continue;_0x167bad[_0x3ed765]=_0x3b57f3;}}return _0x167bad;}function _0x3b6278(_0x582ffd,_0xc81b7b,_0x48bbf5,_0x52083d){const _0x415735=_0xfbb2ca;if(!_0xc81b7b)return;const _0x429ea6=_0x2ee970(_0xc81b7b[_0x415735(0x5e4)]);if(_0x582ffd===undefined)return;if(_0x582ffd===null){_0x429ea6[_0x415735(0x503)]>0x0&&!_0x429ea6[_0x415735(0x1dc)](_0x415735(0x750))&&_0x52083d['push']({'field':_0x48bbf5,'message':'must\x20not\x20be\x20null','expected':_0x429ea6[_0x415735(0x29f)]('|'),'actual':null});return;}if(_0x429ea6[_0x415735(0x503)]===0x0)return;const _0x4dd251=_0x429ea6['some'](_0x951319=>{const _0x3691a7=_0x415735;switch(_0x951319){case _0x3691a7(0x44e):return typeof _0x582ffd==='string';case'integer':return Number[_0x3691a7(0x636)](_0x582ffd);case _0x3691a7(0x6e3):return typeof _0x582ffd===_0x3691a7(0x6e3)&&Number['isFinite'](_0x582ffd);case _0x3691a7(0x6ff):return typeof _0x582ffd===_0x3691a7(0x6ff);case _0x3691a7(0x40d):return _0x582ffd&&typeof _0x582ffd===_0x3691a7(0x40d)&&!Array['isArray'](_0x582ffd);case'array':return Array[_0x3691a7(0x65e)](_0x582ffd);case _0x3691a7(0x750):return _0x582ffd===null;default:return!![];}});if(!_0x4dd251){_0x52083d['push']({'field':_0x48bbf5,'message':_0x415735(0x73e)+_0x429ea6[_0x415735(0x29f)]('|'),'expected':_0x429ea6['join']('|'),'actual':_0x582ffd});return;}Array[_0x415735(0x65e)](_0x582ffd)&&_0xc81b7b[_0x415735(0x77e)]&&_0x582ffd[_0x415735(0x5c0)]((_0x55fe0d,_0x466695)=>_0x3b6278(_0x55fe0d,_0xc81b7b['items'],_0x48bbf5+'['+_0x466695+']',_0x52083d));}function _0x4e77a5(_0x22cae5,_0x5a35fa){const _0x1090eb=_0xfbb2ca,_0x248b52=_0x22cae5?.[_0x1090eb(0x71e)];if(!_0x248b52?.['hasCanonical']||!_0x248b52[_0x1090eb(0x484)])return null;const _0x22eb73=_0x248b52['inputSchema'],_0x586036=_0x22eb73[_0x1090eb(0x5f7)]||{},_0x468cbb=new Set(_0x22eb73[_0x1090eb(0x20a)]||[]),_0x2f7a4a=[];for(const _0x4c6817 of _0x468cbb){_0x5a35fa[_0x4c6817]===undefined&&_0x2f7a4a[_0x1090eb(0x387)]({'field':_0x4c6817,'message':_0x1090eb(0x2aa),'expected':_0x1090eb(0x241),'actual':undefined});}if(_0x22eb73[_0x1090eb(0x6bb)]===![])for(const _0x380de2 of Object[_0x1090eb(0x2ac)](_0x5a35fa||{})){!Object[_0x1090eb(0x359)]['hasOwnProperty'][_0x1090eb(0x668)](_0x586036,_0x380de2)&&_0x2f7a4a[_0x1090eb(0x387)]({'field':_0x380de2,'message':_0x1090eb(0x1ae),'expected':'known\x20field','actual':_0x5a35fa[_0x380de2]});}for(const [_0x34fc5,_0x12a1f2]of Object['entries'](_0x586036)){_0x3b6278(_0x5a35fa[_0x34fc5],_0x12a1f2,_0x34fc5,_0x2f7a4a);}if(_0x2f7a4a[_0x1090eb(0x503)]===0x0)return null;return{'code':_0x1090eb(0x78e),'errors':_0x2f7a4a};}function _0x29d205(_0x194b3c=[]){const _0x271442=_0xfbb2ca;if(!Array['isArray'](_0x194b3c)||_0x194b3c['length']===0x0)return null;const _0x1bedd2=_0x194b3c[_0x271442(0x5b8)](0x0,0x3)[_0x271442(0x626)]((_0x371c3b={})=>{const _0x134a8e=_0x271442,_0x15e393=_0x371c3b[_0x134a8e(0x629)]?_0x371c3b[_0x134a8e(0x629)]+'\x20':'';return(''+_0x15e393+(_0x371c3b['message']||_0x134a8e(0x74b)))[_0x134a8e(0x6f3)]();})[_0x271442(0x29f)](';\x20');return _0x194b3c[_0x271442(0x503)]>0x3?_0x1bedd2+_0x271442(0x2c9)+(_0x194b3c[_0x271442(0x503)]-0x3)+'\x20more)':_0x1bedd2;}function _0x433e5a(_0xb59b09,_0x3385b5={}){const _0x1e551d=_0xfbb2ca,_0x15a36c=_0x3385b5?.[_0x1e551d(0x401)]?.[_0x1e551d(0x5b7)]??_0x3385b5?.[_0x1e551d(0x5b7)]??_0x1e551d(0x56f),_0x3cab27=_0x3385b5?.['result']?.['details']??_0x3385b5?.['details']??_0x15a36c?.[_0x1e551d(0x491)]??null,_0x40ccff=_0x3385b5?.[_0x1e551d(0x401)]?.[_0x1e551d(0x2a0)]??_0x3385b5?.[_0x1e551d(0x2a0)]??_0x15a36c?.[_0x1e551d(0x2a0)]??null,_0x3314fb=_0x3385b5?.['result']?.['message']??_0x3385b5?.[_0x1e551d(0x1e0)]??_0x15a36c?.[_0x1e551d(0x1e0)]??null,_0x184a14=typeof _0x15a36c===_0x1e551d(0x44e)?_0x15a36c:null,_0x4ea753=typeof _0x184a14===_0x1e551d(0x44e)&&/^[A-Z0-9_]+$/[_0x1e551d(0x193)](_0x184a14),_0x522108=_0x40ccff??(_0x4ea753?_0x184a14:null)??(_0x28c109[_0xb59b09]||_0x1e551d(0x700)+_0xb59b09);let _0x173e78=_0x3314fb;!_0x173e78&&typeof _0x184a14===_0x1e551d(0x44e)&&!_0x4ea753&&(_0x173e78=_0x184a14);if(!_0x173e78&&_0x522108===_0x1e551d(0x78e)){const _0x5aa657=_0x29d205(_0x3cab27);_0x173e78=_0x5aa657?_0x1e551d(0x226)+_0x5aa657:_0x1e551d(0x469);}if(!_0x173e78&&Array['isArray'](_0x3cab27)&&_0x3cab27[_0x1e551d(0x503)]>0x0){const _0x24aee8=_0x29d205(_0x3cab27);if(_0x24aee8)_0x173e78=_0x24aee8;}if(!_0x173e78)_0x173e78=_0x28c109[_0xb59b09]||_0x1e551d(0x56f);const _0xc3a241={'code':_0x522108,'message':_0x173e78};if(_0x3cab27!=null)_0xc3a241[_0x1e551d(0x491)]=_0x3cab27;return _0xc3a241;}function _0x464a4b(_0x1324fb){const _0x21e993=_0xfbb2ca,_0x185c93={};if(!_0x1324fb)return _0x185c93;for(const _0x39bb62 of _0x1324fb[_0x21e993(0x3d5)](';')){const _0x1b0664=_0x39bb62['indexOf']('=');if(_0x1b0664===-0x1)continue;const _0x81a99b=_0x39bb62[_0x21e993(0x5b8)](0x0,_0x1b0664)[_0x21e993(0x6f3)](),_0x5a034b=_0x39bb62[_0x21e993(0x5b8)](_0x1b0664+0x1)[_0x21e993(0x6f3)]();_0x185c93[_0x81a99b]=decodeURIComponent(_0x5a034b);}return _0x185c93;}function _0x51a60c(_0xd9f7b5,_0x2f2741){const _0x56964a=_0xfbb2ca;return _0x2f2741=_0x446cee(_0x2f2741),{'status':_0x2f2741['status']??_0xd9f7b5[_0x56964a(0x7a3)],'headers':{..._0xd9f7b5[_0x56964a(0x786)]||{},..._0x2f2741[_0x56964a(0x786)]||{}},'body':_0x2f2741[_0x56964a(0x505)]??_0xd9f7b5['body']};}function _0x36494b(_0xfe9112={}){const _0x259523=_0xfbb2ca;return _0xfe9112[_0x259523(0x240)]||(_0xfe9112['internal']?'internal':_0x259523(0x635));}function _0xe74527(_0x3d2368){const _0x29b4ae=_0xfbb2ca;if(_0x3d2368[_0x29b4ae(0x2e9)]?.['internal']===!![])return!![];if(_0x3d2368[_0x29b4ae(0x2e9)]?.[_0x29b4ae(0x1c4)]?.[_0x29b4ae(0x48a)]===!![])return!![];if(_0x3d2368['context']?.[_0x29b4ae(0x1c4)]?.['ok']===!![])return!![];return![];}function _0x218674(_0x15ab97,_0x178ee4){const _0x5e340c=_0xfbb2ca,_0x4a0a63=_0x178ee4[_0x5e340c(0x3d5)]('.');let _0x38b701=_0x15ab97;for(const _0x5e7860 of _0x4a0a63){_0x38b701=_0x38b701?.[_0x5e7860];}return _0x38b701||null;}class _0xfbcc42{constructor(){const _0x3a30f1=_0xfbb2ca;this['middlewares']=[],this[_0x3a30f1(0x69b)]=[],this[_0x3a30f1(0x654)]=[],this['maxBodyBytes']=0x5*0x400*0x400,this[_0x3a30f1(0x492)]=null,this['servers']=[],this[_0x3a30f1(0x655)]=new Set(),this[_0x3a30f1(0x1c4)]={'cookieName':_0x3a30f1(0x5af),'stateCookieName':_0x3a30f1(0x1cc),'csrfCookieName':_0x3a30f1(0x660)},this[_0x3a30f1(0x212)]={},this[_0x3a30f1(0x4b1)]=new Map(),this['_oidcDiscoveryCache']=null,this[_0x3a30f1(0x553)]=null,this[_0x3a30f1(0x76b)]=new Map(),this[_0x3a30f1(0x57b)]=new _0x229063(),this[_0x3a30f1(0x36b)]=![],this[_0x3a30f1(0x507)]=0x0;}['configureAuth'](_0xb2a471={}){const _0x369b7b=_0xfbb2ca;return this['_authOptions']=_0xb2a471||{},this[_0x369b7b(0x555)]=_0xb2a471[_0x369b7b(0x4f5)]??'open',this['_authOptions'];}get[_0xfbb2ca(0x428)](){const _0x17b295=_0xfbb2ca;if(this[_0x17b295(0x243)]?.[_0x17b295(0x1c4)])return this['_okdb'][_0x17b295(0x1c4)][_0x17b295(0x428)];return![];}['getAuthOptions'](){const _0xf82de3=_0xfbb2ca;if(this['_okdb']?.[_0xf82de3(0x1c4)])return this[_0xf82de3(0x243)]['auth'][_0xf82de3(0x46c)]();return this[_0xf82de3(0x212)]||{};}[_0xfbb2ca(0x680)](_0x30c835){const _0x2e47ec=_0xfbb2ca;this['middlewares'][_0x2e47ec(0x387)](_0x30c835);}[_0xfbb2ca(0x60c)](_0x254475,_0x419955){const _0x348b82=_0xfbb2ca;this[_0x348b82(0x69b)][_0x348b82(0x387)]({'match':_0x254475,'handler':_0x419955});}[_0xfbb2ca(0x4d2)](_0xd1d977,_0x217cb0,_0xb8d107,_0x3f7479={}){const _0x4680f6=_0xfbb2ca,_0x4f7323={'method':_0x52d75c(_0xd1d977),'path':_0x217cb0,'matcher':_0x570044(_0x217cb0),'handler':_0xb8d107,'meta':_0x3f7479||{}},_0xeb774=_0x26cb08(_0x4f7323);_0x17afbb(_0x4f7323,_0xeb774),_0x4f7323['operation']=_0xeb774,_0x4f7323[_0x4680f6(0x690)]=this['_userPhase']===!![];if(_0x4f7323['userAdded'])this['_userRouteCount']++;this[_0x4680f6(0x654)][_0x4680f6(0x387)](_0x4f7323);}[_0xfbb2ca(0x6a0)](_0x20c2e0,_0x15b892,_0x343505,_0x19c9e7={}){const _0x30f0be=_0xfbb2ca;this[_0x30f0be(0x4d2)](_0x20c2e0,_0x15b892,_0x343505,{..._0x19c9e7,'raw':!![]});}[_0xfbb2ca(0x586)](_0x3d635f,_0x31cafb,{corsOnly:corsOnly=![]}={}){const _0x114a20=_0xfbb2ca;let _0x5b801f=null,_0x28be37=Infinity;for(const _0xf238a0 of this[_0x114a20(0x654)]){if(corsOnly){if(!_0xf238a0[_0x114a20(0x58a)]?.['cors'])continue;}else{if(_0xf238a0[_0x114a20(0x5e0)]!==_0x3d635f)continue;}if(!_0xf238a0[_0x114a20(0x2dc)][_0x114a20(0x70c)][_0x114a20(0x193)](_0x31cafb))continue;const _0x3027b0=_0xf238a0[_0x114a20(0x2dc)][_0x114a20(0x2ac)]?.['length']??0x0;if(_0x3027b0<_0x28be37){_0x5b801f=_0xf238a0,_0x28be37=_0x3027b0;if(_0x3027b0===0x0)break;}}return _0x5b801f;}['_matchRoute'](_0x1db78e,_0x5d6fda){const _0x3d77d4=_0xfbb2ca,_0x409717=_0x52d75c(_0x1db78e),_0x12cc0a=this[_0x3d77d4(0x586)](_0x409717,_0x5d6fda);if(_0x12cc0a)return _0x12cc0a;if(_0x409717==='OPTIONS')return this[_0x3d77d4(0x586)](_0x409717,_0x5d6fda,{'corsOnly':!![]});return null;}['_shouldWrapResponse'](_0x468bdf,_0x8e48e){const _0xb5b31c=_0xfbb2ca;if(_0x468bdf?.[_0xb5b31c(0x58a)]?.[_0xb5b31c(0x362)])return![];if(_0x8e48e?.['headers']?.[_0xb5b31c(0x62e)])return![];return!![];}['listRoutes'](){const _0x28a5f5=_0xfbb2ca;return this['routes'][_0x28a5f5(0x1ff)](_0x50d6ad=>!_0x50d6ad[_0x28a5f5(0x58a)]?.['hidden'])[_0x28a5f5(0x626)](_0xc4962d=>({'method':_0xc4962d['method'],'path':_0xc4962d[_0x28a5f5(0x624)],'defaults':_0xc4962d[_0x28a5f5(0x2dc)][_0x28a5f5(0x1a9)],'meta':_0xc4962d[_0x28a5f5(0x58a)],'operation':_0xc4962d['operation']}));}[_0xfbb2ca(0x219)](_0x23e46e,_0x1736a6,_0x26520b={}){const _0x228ce5=_0xfbb2ca,{PassThrough:_0x262382}=require$$8;this[_0x228ce5(0x4d2)](_0x228ce5(0x51c),_0x23e46e,({params:_0x3e8b7c,query:_0x53d14a,headers:_0x115838,context:_0x579ccf})=>{const _0x39c5c0=_0x228ce5,_0x40f5a0=new _0x262382();let _0x3b45ac=null;const _0x32ab47={};try{_0x579ccf?.['req']?.[_0x39c5c0(0x70e)]?.[_0x39c5c0(0x73b)](!![]);}catch{}_0x40f5a0[_0x39c5c0(0x6cc)](':\x20connected\x0a\x0a'),_0x3b45ac=setInterval(()=>{const _0x1c0aa3=_0x39c5c0;try{_0x40f5a0[_0x1c0aa3(0x6cc)](_0x1c0aa3(0x32d));}catch{}},0x3a98);const _0x3c8fc9=(_0x23ea70,_0x325eeb,_0xc9a2e5={})=>{const _0xd41daf=_0x39c5c0;try{const _0x11c006=_0xc9a2e5[_0xd41daf(0x1ec)]?String(_0x325eeb??''):JSON[_0xd41daf(0x72f)](_0x325eeb);_0xc9a2e5['id']!=null&&_0x40f5a0[_0xd41daf(0x6cc)](_0xd41daf(0x5f4)+_0xc9a2e5['id']+'\x0a');_0x40f5a0['write']('event:\x20'+_0x23ea70+'\x0a');for(const _0x21cc71 of _0x11c006['split']('\x0a')){_0x40f5a0['write'](_0xd41daf(0x3ae)+_0x21cc71+'\x0a');}_0x40f5a0['write']('\x0a');}catch{}},_0x2f0c59=()=>{const _0x551777=_0x39c5c0;_0x3b45ac&&(clearInterval(_0x3b45ac),_0x3b45ac=null);try{_0x40f5a0[_0x551777(0x224)]();}catch{}},_0x2e4781=(_0x4d73ee,_0x3f75ca)=>{_0x32ab47[_0x4d73ee]=_0x3f75ca;};_0x579ccf?.[_0x39c5c0(0x682)]?.['on'](_0x39c5c0(0x543),_0x2f0c59),_0x40f5a0['on']('close',_0x2f0c59);if(_0x579ccf?.[_0x39c5c0(0x1c4)]&&_0x579ccf[_0x39c5c0(0x1c4)]['open']!==!![]&&_0x579ccf['auth'][_0x39c5c0(0x48a)]){const _0x199ef6={'headers':_0x115838??{},'cookies':_0x464a4b(_0x115838?.['cookie']),'context':{},'socket':_0x579ccf?.[_0x39c5c0(0x682)]?.[_0x39c5c0(0x70e)]??{'remoteAddress':null}},_0x55f438=setInterval(async()=>{const _0x3a14cd=_0x39c5c0;try{const _0x6db2b7=await this[_0x3a14cd(0x544)](_0x199ef6);if(_0x6db2b7?.[_0x3a14cd(0x1bc)]===!![]||_0x6db2b7?.['isAuthenticated'])return;_0x3c8fc9(_0x3a14cd(0x1c4),{'expired':!![]}),_0x2f0c59();}catch{_0x2f0c59();}},0xea60);_0x55f438[_0x39c5c0(0x442)]?.(),_0x40f5a0['on'](_0x39c5c0(0x543),()=>clearInterval(_0x55f438));}const _0x253853=_0x1736a6({'send':_0x3c8fc9,'close':_0x2f0c59,'params':_0x3e8b7c??{},'query':_0x53d14a??{},'headers':_0x115838??{},'context':_0x579ccf,'setHeader':_0x2e4781});return typeof _0x253853==='function'&&_0x40f5a0['on'](_0x39c5c0(0x543),_0x253853),{'status':0xc8,'headers':{'content-type':_0x39c5c0(0x727),'cache-control':'no-cache,\x20no-transform','connection':_0x39c5c0(0x6a3),'x-accel-buffering':'no',..._0x32ab47},'body':_0x40f5a0};},{..._0x26520b,'sse':!![]});}async[_0xfbb2ca(0x58d)](_0x200245,_0x2f1008){const _0x15c71a=_0xfbb2ca;for(const _0x27ff24 of this['guards']){if(!_0x27ff24[_0x15c71a(0x3c0)](_0x200245))continue;const _0x1a4c8d=await _0x27ff24[_0x15c71a(0x576)](_0x200245,_0x2f1008);if(_0x1a4c8d===![])return![];}return!![];}async['_runMiddlewares'](_0x3a80fc,_0x3af970,_0x138c7c){let _0x1185ad=0x0;const _0x32afdb=async()=>{const _0x2fffd7=_0x4307,_0x35a182=this[_0x2fffd7(0x75d)][_0x1185ad++];if(!_0x35a182)return _0x138c7c();return _0x35a182(_0x3a80fc,_0x3af970,_0x32afdb);};return _0x32afdb();}[_0xfbb2ca(0x602)](_0x1f3e7e,_0x11cdcd){const _0x7d47f0=_0xfbb2ca,{status:status=0xc8,headers:headers={},body:_0x54e973}=_0x1f3e7e;if(status>=0x12c&&status<0x190)return _0x1f3e7e;if(_0x284df2(_0x54e973))return _0x1f3e7e;if(Buffer[_0x7d47f0(0x464)](_0x54e973))return _0x1f3e7e;if(typeof _0x54e973===_0x7d47f0(0x44e))return _0x1f3e7e;const _0x110020={'time':+_0x11cdcd[_0x7d47f0(0x6cb)](0x2)};if(_0x54e973?.[_0x7d47f0(0x58a)]&&typeof _0x54e973[_0x7d47f0(0x58a)]===_0x7d47f0(0x40d)){const {time:_0x23fb7a,..._0x38bfe8}=_0x54e973['meta'];Object['assign'](_0x110020,_0x38bfe8);}let _0x228c29;if(status>=0x190){const _0x425b43=_0x433e5a(status,_0x54e973);_0x228c29={'data':null,'error':_0x425b43,'meta':_0x110020};}else{if(status===0xcc||_0x54e973==null)_0x228c29={'data':null,'error':null,'meta':_0x110020};else{let _0x1bfc39;if(_0x7d47f0(0x401)in _0x54e973)_0x1bfc39=_0x54e973[_0x7d47f0(0x401)];else{const {meta:_0x391137,..._0x2de4db}=_0x54e973;_0x1bfc39=Object['keys'](_0x2de4db)[_0x7d47f0(0x503)]>0x0?_0x2de4db:null;}_0x228c29={'data':_0x1bfc39,'error':null,'meta':_0x110020};}}return{'status':status===0xcc?0xc8:status,'headers':headers,'body':_0x228c29};}async[_0xfbb2ca(0x435)](_0xc07b91,_0x51f4d2,_0x346e0c={},_0x38cac5={}){const _0xb9cd8e=_0xfbb2ca;_0xc07b91=_0x52d75c(_0xc07b91);const _0x31868b=this[_0xb9cd8e(0x407)](_0xc07b91,_0x51f4d2),_0x566573={'method':_0xc07b91,'path':_0x51f4d2,'headers':_0x346e0c[_0xb9cd8e(0x786)]??{},'body':_0x346e0c[_0xb9cd8e(0x505)]??null,'query':_0x346e0c[_0xb9cd8e(0x347)]??{},'context':_0x38cac5,'cookies':_0x464a4b(_0x346e0c[_0xb9cd8e(0x786)]?.[_0xb9cd8e(0x29b)]),'route':_0x31868b,'socket':{'remoteAddress':_0x346e0c[_0xb9cd8e(0x222)]??_0xb9cd8e(0x289)}};_0x566573['context']=_0x566573[_0xb9cd8e(0x2e9)]||{};!_0x566573[_0xb9cd8e(0x2e9)][_0xb9cd8e(0x1c4)]&&(_0x566573[_0xb9cd8e(0x2e9)][_0xb9cd8e(0x1c4)]=await this[_0xb9cd8e(0x544)](_0x566573));if(_0x566573['context'][_0xb9cd8e(0x1c4)]?.['bootstrapBlocked'])return _0x446cee({'status':0x193,'body':{'error':{'code':_0xb9cd8e(0x764),'message':'Server\x20is\x20in\x20bootstrap\x20mode\x20and\x20only\x20accepts\x20localhost\x20connections\x20until\x20the\x20first\x20token\x20is\x20created.'}}});_0x566573[_0xb9cd8e(0x2e9)]['auth']?.[_0xb9cd8e(0x76c)]&&!_0x566573[_0xb9cd8e(0x2e9)]['user']&&(_0x566573[_0xb9cd8e(0x2e9)][_0xb9cd8e(0x76c)]=_0x566573['context'][_0xb9cd8e(0x1c4)][_0xb9cd8e(0x76c)]);let _0x4cc598=null;const _0x55d035={'status'(_0x2a86d1){_0x4cc598=_0x4cc598||{},_0x4cc598['status']=_0x2a86d1;},'setHeader'(_0x37d70e,_0x2596b6){const _0x2f5900=_0xb9cd8e;_0x4cc598=_0x4cc598||{},_0x4cc598['headers']=_0x4cc598[_0x2f5900(0x786)]||{};const _0x53bb68=String(_0x37d70e)[_0x2f5900(0x4ff)]();if(_0x53bb68===_0x2f5900(0x1b9)){const _0x31e676=_0x4cc598[_0x2f5900(0x786)][_0x37d70e];if(!_0x31e676)_0x4cc598[_0x2f5900(0x786)][_0x37d70e]=_0x2596b6;else{if(Array[_0x2f5900(0x65e)](_0x31e676))_0x31e676[_0x2f5900(0x387)](_0x2596b6);else _0x4cc598[_0x2f5900(0x786)][_0x37d70e]=[_0x31e676,_0x2596b6];}return;}_0x4cc598[_0x2f5900(0x786)][_0x37d70e]=_0x2596b6;},'send'(_0x187c37){const _0x18f358=_0xb9cd8e;_0x4cc598=_0x4cc598||{},_0x4cc598[_0x18f358(0x505)]=_0x187c37;}},_0x16fa67=await this['_runGuards'](_0x566573,_0x55d035);if(!_0x16fa67)return _0x446cee(_0x4cc598??{'status':0x193});const _0x2faf4d=this[_0xb9cd8e(0x35b)](_0x566573);if(_0x2faf4d)return _0x446cee(_0x2faf4d);const _0x1ff170=this[_0xb9cd8e(0x2f1)](_0x566573);if(_0x1ff170)return _0x446cee(_0x1ff170);return await this[_0xb9cd8e(0x4f8)](_0x566573,_0x55d035,async()=>{const _0x315084=_0xb9cd8e,_0x12f35d=await this[_0x315084(0x78b)](_0x566573);if(_0x4cc598==null){_0x4cc598=_0x12f35d;return;}_0x4cc598=_0x51a60c(_0x4cc598,_0x12f35d);}),_0x446cee(_0x4cc598);}[_0xfbb2ca(0x35b)](_0x5ac52a){const _0x33ed90=_0xfbb2ca,_0x41f7f5=_0x5ac52a[_0x33ed90(0x4a4)]?.[_0x33ed90(0x71e)],_0x330ab4=_0x41f7f5?.[_0x33ed90(0x28d)];if(!_0x41f7f5?.[_0x33ed90(0x2ef)]||!_0x330ab4)return null;if(_0x5ac52a[_0x33ed90(0x2e9)]?.[_0x33ed90(0x1c4)]?.[_0x33ed90(0x1bc)]===!![]||_0x5ac52a['context']?.['auth']?.['isSystem']===!![])return null;const _0x1d2e19=_0x36494b(_0x5ac52a[_0x33ed90(0x2e9)]),_0x836c3c=Array['isArray'](_0x330ab4[_0x33ed90(0x4d3)])?_0x330ab4[_0x33ed90(0x4d3)]:null;if(_0x330ab4[_0x33ed90(0x32a)]&&_0x5ac52a['context']?.[_0x33ed90(0x7a2)]!==!![])return{'status':0x193,'body':{'error':_0x33ed90(0x2e8)}};if(_0x836c3c&&_0x836c3c[_0x33ed90(0x503)]>0x0&&!_0x836c3c[_0x33ed90(0x1dc)](_0x1d2e19)&&!(_0x1d2e19===_0x33ed90(0x7a2)&&_0x836c3c['includes'](_0x33ed90(0x5c2))))return{'status':0x193,'body':{'error':_0x33ed90(0x2e8)}};if(_0x330ab4['authRequired']&&!_0xe74527(_0x5ac52a))return{'status':0x191,'body':{'error':_0x33ed90(0x3a5)}};const _0x4d325a=_0x330ab4[_0x33ed90(0x638)];if(!_0x4d325a)return null;if(_0x5ac52a[_0x33ed90(0x2e9)]?.['auth']?.[_0x33ed90(0x5e4)]===_0x33ed90(0x34c))return null;const _0x24dafb=_0x5ac52a[_0x33ed90(0x2e9)]?.[_0x33ed90(0x1c4)]?.[_0x33ed90(0x4ca)];if(!_0x24dafb){if(_0x5ac52a[_0x33ed90(0x2e9)]?.['auth']?.['ok']===!![])return null;return{'status':0x193,'body':{'error':_0x33ed90(0x2e6)}};}if(!_0x5ac52a[_0x33ed90(0x639)]&&_0x5ac52a[_0x33ed90(0x4a4)]?.[_0x33ed90(0x2dc)]){const _0x5472d0=_0x5ac52a[_0x33ed90(0x4a4)][_0x33ed90(0x2dc)]['regex']['exec'](_0x5ac52a[_0x33ed90(0x624)]);_0x5472d0&&(_0x5ac52a['params']={},_0x5ac52a[_0x33ed90(0x4a4)][_0x33ed90(0x2dc)][_0x33ed90(0x2ac)][_0x33ed90(0x5c0)]((_0x62e121,_0x17d597)=>{const _0x24545d=_0x33ed90,_0x4d0aad=_0x5472d0[_0x17d597+0x1];_0x5ac52a[_0x24545d(0x639)][_0x62e121]=_0x4d0aad?decodeURIComponent(_0x4d0aad):_0x5ac52a['route'][_0x24545d(0x2dc)][_0x24545d(0x1a9)][_0x62e121]??undefined;}));}let _0x206d52=null;_0x330ab4[_0x33ed90(0x71c)]?.[_0x33ed90(0x758)]&&(_0x206d52=_0x218674(_0x5ac52a,_0x330ab4[_0x33ed90(0x71c)][_0x33ed90(0x758)]));if(_0x206d52&&_0x206d52[_0x33ed90(0x637)]('~')){const _0x3a1832=_0x34217e(_0x4d325a),_0x4f350b=_0x999112(_0x24dafb[_0x33ed90(0x78a)]||[],(_0x24dafb[_0x33ed90(0x204)]||{})[_0x206d52]||[]);if(!_0x5f398e(_0x4f350b,_0x3a1832))return{'status':0x193,'body':{'error':_0x33ed90(0x48b)+_0x3a1832+_0x33ed90(0x3c8)}};}const _0x1a7f61=_0x999112(_0x24dafb[_0x33ed90(0x78a)]||[],_0x206d52?(_0x24dafb[_0x33ed90(0x204)]||{})[_0x206d52]||[]:[]);if(!_0x5f398e(_0x1a7f61,_0x4d325a))return{'status':0x193,'body':{'error':_0x33ed90(0x48b)+_0x4d325a}};return null;}[_0xfbb2ca(0x2f1)](_0x2d6692){const _0x258c04=_0xfbb2ca,_0x13998a=_0x2d6692[_0x258c04(0x4a4)],_0x5f2aef=_0x13998a?.['operation'];if(!_0x5f2aef?.[_0x258c04(0x2ef)]||!_0x5f2aef['inputSchema'])return null;let _0x216ff2=_0x2d6692[_0x258c04(0x639)]??null;if(!_0x216ff2&&_0x13998a?.[_0x258c04(0x2dc)]){const _0x12d97a=_0x13998a[_0x258c04(0x2dc)][_0x258c04(0x70c)]['exec'](_0x2d6692[_0x258c04(0x624)]);_0x12d97a&&(_0x216ff2={},_0x13998a[_0x258c04(0x2dc)][_0x258c04(0x2ac)]['forEach']((_0x2675e0,_0x4951d8)=>{const _0x492177=_0x258c04,_0xdf68d0=_0x12d97a[_0x4951d8+0x1];_0x216ff2[_0x2675e0]=_0xdf68d0?decodeURIComponent(_0xdf68d0):_0x13998a[_0x492177(0x2dc)][_0x492177(0x1a9)][_0x2675e0]??undefined;}));}const _0x1841f4=_0x16bfff(_0x13998a,_0x216ff2??{},_0x2d6692[_0x258c04(0x347)]??{},_0x2d6692[_0x258c04(0x505)],_0x2d6692[_0x258c04(0x786)]??{}),_0x5ed9fd=_0x4e77a5(_0x13998a,_0x1841f4||{});if(!_0x5ed9fd)return null;const _0x1e8fdc=_0x29d205(_0x5ed9fd[_0x258c04(0x6db)]);return{'status':0x190,'body':{'error':_0x5ed9fd['code'],'code':_0x5ed9fd[_0x258c04(0x2a0)],'message':_0x1e8fdc?'Validation\x20failed:\x20'+_0x1e8fdc:_0x258c04(0x469),'details':_0x5ed9fd[_0x258c04(0x6db)]}};}[_0xfbb2ca(0x315)](_0x1f19ff,_0x16de92){const _0x3b7eeb=_0xfbb2ca,_0x46b67d=_0x4e77a5(_0x1f19ff,_0x16de92||{});if(!_0x46b67d)return null;return{'code':_0x46b67d[_0x3b7eeb(0x2a0)],'message':_0x29d205(_0x46b67d[_0x3b7eeb(0x6db)])?_0x3b7eeb(0x226)+_0x29d205(_0x46b67d[_0x3b7eeb(0x6db)]):_0x3b7eeb(0x469),'details':_0x46b67d[_0x3b7eeb(0x6db)]};}async[_0xfbb2ca(0x78b)](_0x22e57b){const _0x31074b=_0xfbb2ca;if(_0x22e57b[_0x31074b(0x5e0)]===_0x31074b(0x5e5)){const _0x21eafb=this[_0x31074b(0x586)]('OPTIONS',_0x22e57b[_0x31074b(0x624)],{'corsOnly':!![]});if(_0x21eafb)return{'status':0xcc,'headers':_0x2b9661(_0x22e57b['headers'],_0x21eafb[_0x31074b(0x58a)][_0x31074b(0x6c4)],_0x21eafb[_0x31074b(0x5e0)])||{}};}const _0xc75444=this[_0x31074b(0x586)](_0x22e57b['method'],_0x22e57b[_0x31074b(0x624)]);if(_0xc75444){const _0x43ae86=_0xc75444[_0x31074b(0x2dc)][_0x31074b(0x70c)][_0x31074b(0x2b9)](_0x22e57b[_0x31074b(0x624)]),_0x2d8ee2={};_0xc75444[_0x31074b(0x2dc)]['keys'][_0x31074b(0x5c0)]((_0x3e3e28,_0xd0130f)=>{const _0x1bf00e=_0x31074b,_0x1a0c59=_0x43ae86[_0xd0130f+0x1];_0x2d8ee2[_0x3e3e28]=_0x1a0c59?decodeURIComponent(_0x1a0c59):_0xc75444[_0x1bf00e(0x2dc)]['defaults'][_0x3e3e28]??undefined;}),_0x22e57b[_0x31074b(0x639)]=_0x2d8ee2;try{const _0x1bacdb=await _0xc75444[_0x31074b(0x576)]({'params':_0x2d8ee2,'body':_0x22e57b['body'],'query':_0x22e57b[_0x31074b(0x347)],'headers':_0x22e57b[_0x31074b(0x786)],'context':_0x22e57b[_0x31074b(0x2e9)]}),_0xf279b1=_0x446cee(_0x1bacdb),_0x2705d4=_0x2b9661(_0x22e57b['headers'],_0xc75444[_0x31074b(0x58a)]?.[_0x31074b(0x6c4)],_0xc75444[_0x31074b(0x5e0)]);if(!_0x2705d4)return _0xf279b1;return{..._0xf279b1,'headers':{..._0xf279b1[_0x31074b(0x786)]||{},..._0x2705d4}};}catch(_0x2984ec){const _0x17edfa=_0x2984ec?.['status']||_0x13ad4d[_0x2984ec?.[_0x31074b(0x2a0)]]||0x1f4;return{'status':_0x17edfa,'body':{'error':_0x2984ec[_0x31074b(0x1e0)]||'Internal\x20error','code':_0x2984ec?.[_0x31074b(0x2a0)]||_0x28c109[_0x17edfa]||_0x31074b(0x700)+_0x17edfa,'message':_0x2984ec?.[_0x31074b(0x1e0)]||'Internal\x20error',..._0x2984ec?.[_0x31074b(0x491)]!=null?{'details':_0x2984ec[_0x31074b(0x491)]}:{}}};}}return{'status':0x194,'body':{'error':'Not\x20Found'}};}['listen'](_0x2537ee,_0x4fd996={}){const _0x11a2e2=_0xfbb2ca;if(typeof _0x4fd996===_0x11a2e2(0x44e)||Array[_0x11a2e2(0x65e)](_0x4fd996))_0x4fd996={'host':_0x4fd996};_0x4fd996=_0x4fd996??{};const _0x44d104=Number(_0x4fd996[_0x11a2e2(0x5f3)])||0x0;if(_0x44d104>=0x1||_0x4fd996[_0x11a2e2(0x2ca)]!=null||_0x4fd996['primaryOkdb']!=null){const _0x53015c=new Error(_0x11a2e2(0x60a)+_0x11a2e2(0x1ba)+_0x11a2e2(0x75a)+_0x11a2e2(0x55a));_0x53015c[_0x11a2e2(0x2a0)]=_0x11a2e2(0x729);throw _0x53015c;}if(this[_0x11a2e2(0x492)])throw new Error(_0x11a2e2(0x4e8));const _0x4f3b9d=_0x4fd996['host']==null?[undefined]:[][_0x11a2e2(0x549)](_0x4fd996[_0x11a2e2(0x76f)]);if(!_0x4f3b9d[_0x11a2e2(0x503)]||_0x4f3b9d[_0x11a2e2(0x6ad)](_0x299392=>_0x299392!==undefined&&(typeof _0x299392!=='string'||!_0x299392))){const _0x50559a=new Error(_0x11a2e2(0x50a));_0x50559a[_0x11a2e2(0x2a0)]=_0x11a2e2(0x59c);throw _0x50559a;}_0x2537ee&&this[_0x11a2e2(0x1c4)][_0x11a2e2(0x759)]===_0x11a2e2(0x5af)&&(this[_0x11a2e2(0x1c4)]['cookieName']=_0x11a2e2(0x20c)+_0x2537ee,this[_0x11a2e2(0x243)]?.[_0x11a2e2(0x1c4)]&&(this[_0x11a2e2(0x243)]['auth'][_0x11a2e2(0x285)]=this['auth'][_0x11a2e2(0x759)]));const _0x46448b=this['_okdb']?.[_0x11a2e2(0x659)]?.[_0x11a2e2(0x1c1)]?.['logRequests']??![],_0x4e33ba=async(_0x35c845,_0x20a6a0)=>{const _0x241792=_0x11a2e2,_0xc7e926=Date[_0x241792(0x6fd)]();if(_0x46448b){const _0x543441=_0x35c845['url']||'/',_0x11457d=_0x35c845[_0x241792(0x786)]?.['authorization']?_0x35c845[_0x241792(0x786)][_0x241792(0x5b3)]['replace'](/^Bearer\s+(\S{0,8})\S*/i,_0x241792(0x36c)):'-',_0x330c29=_0x35c845[_0x241792(0x786)]?.[_0x241792(0x1d6)]||'-',_0x4f8ebf=_0x35c845[_0x241792(0x786)]?.[_0x241792(0x295)]||_0x35c845[_0x241792(0x786)]?.[_0x241792(0x3da)]||'-',_0x374ce8=_0x35c845[_0x241792(0x786)]?.[_0x241792(0x613)]||'-';process[_0x241792(0x3f5)][_0x241792(0x6cc)](_0x241792(0x32b)+_0x35c845['method'][_0x241792(0x619)](0x7)+'\x20'+_0x543441[_0x241792(0x619)](0x2d)+'\x20'+('auth='+_0x11457d+_0x241792(0x2c1)+_0x374ce8+_0x241792(0x74f)+_0x330c29+_0x241792(0x2b6)+_0x4f8ebf+'\x0a'));}try{const _0x4f2f74=new _0x112465(_0x35c845[_0x241792(0x3a8)],_0x241792(0x57d)+_0x35c845['headers'][_0x241792(0x76f)]),_0x1f04ae=this[_0x241792(0x407)](_0x35c845['method'],_0x4f2f74['pathname']),_0x54afbf=_0x1f04ae?.[_0x241792(0x58a)]?.[_0x241792(0x1ec)]===!![];if(_0x54afbf){const _0x7708de=_0x35c845[_0x241792(0x786)]?.[_0x241792(0x4af)];if(_0x7708de!=null){const _0x1833ae=Number(_0x7708de);if(Number['isFinite'](_0x1833ae)&&_0x1833ae>this['maxBodyBytes']){_0x20a6a0[_0x241792(0x558)]=0x19d,_0x20a6a0[_0x241792(0x72e)](_0x241792(0x36a));return;}}}const _0x3424a1=_0x54afbf?null:await _0x5e103f(_0x35c845,this[_0x241792(0x34d)]),_0x5674cc=_0x54afbf?_0x47de2f(_0x35c845,this['maxBodyBytes']):undefined,_0x66c7f2=await this['handle'](_0x35c845[_0x241792(0x5e0)],_0x4f2f74[_0x241792(0x570)],{'body':_0x3424a1,'query':Object[_0x241792(0x6fe)](_0x4f2f74[_0x241792(0x509)][_0x241792(0x62b)]()),'headers':_0x35c845[_0x241792(0x786)]},{'req':_0x35c845,'res':_0x20a6a0,'rawStream':_0x5674cc}),_0x3ed12c=this['_matchRoute'](_0x35c845[_0x241792(0x5e0)],_0x4f2f74[_0x241792(0x570)]),_0x3ecccd=Date[_0x241792(0x6fd)]()-_0xc7e926,_0x23e014=this[_0x241792(0x2a3)](_0x3ed12c,_0x66c7f2)?this['_wrapApiResponse'](_0x66c7f2,_0x3ecccd):_0x446cee(_0x66c7f2),_0x522f91=(_0x23e014['status']||0xc8)>=0x190;this['metrics'][_0x241792(0x67d)](_0x35c845['method'],_0x3ecccd,_0x522f91),_0x2602a8(_0x20a6a0,_0x23e014);if(_0x46448b){const _0x14845a=_0x23e014[_0x241792(0x7a3)]||0xc8,_0x59bd94=Date[_0x241792(0x6fd)]()-_0xc7e926;process[_0x241792(0x3f5)][_0x241792(0x6cc)](_0x241792(0x39f)+_0x35c845[_0x241792(0x5e0)][_0x241792(0x619)](0x7)+'\x20'+_0x4f2f74[_0x241792(0x570)][_0x241792(0x619)](0x2d)+'\x20'+_0x14845a+'\x20\x20'+_0x59bd94+_0x241792(0x294));}}catch(_0xd8bf6e){const _0x4264a7=Date[_0x241792(0x6fd)]()-_0xc7e926;this[_0x241792(0x57b)]['record'](_0x35c845['method'],_0x4264a7,!![]);const _0x1ae9e7=_0xd8bf6e?.['status']||0x1f4;_0x20a6a0[_0x241792(0x558)]=_0x1ae9e7,_0x1ae9e7===0x19d?_0x20a6a0['end']('Payload\x20too\x20large'):_0x20a6a0[_0x241792(0x72e)](_0xd8bf6e[_0x241792(0x1e0)]||'Internal\x20error');}};this[_0x11a2e2(0x37c)]=_0x4f3b9d[_0x11a2e2(0x626)](_0x3d0c73=>{const _0x5163e5=_0x11a2e2,_0x5acd93=_0x58e0c1[_0x5163e5(0x5d5)](_0x4e33ba);_0x5acd93['on'](_0x5163e5(0x2d2),_0x6535e1=>{const _0x2b465e=_0x5163e5;this['_sockets'][_0x2b465e(0x4d2)](_0x6535e1),_0x6535e1['on'](_0x2b465e(0x543),()=>this['_sockets'][_0x2b465e(0x560)](_0x6535e1));});if(_0x3d0c73===undefined)_0x5acd93[_0x5163e5(0x49b)](_0x2537ee);else _0x5acd93[_0x5163e5(0x49b)](_0x2537ee,_0x3d0c73);return _0x5acd93;}),this['server']=this[_0x11a2e2(0x37c)][0x0];for(const _0x6712c8 of this[_0x11a2e2(0x37c)]['slice'](0x1))_0x6712c8['on'](_0x11a2e2(0x5b7),_0x9fac6c=>this[_0x11a2e2(0x492)]?.[_0x11a2e2(0x41f)](_0x11a2e2(0x5b7),_0x9fac6c));const _0x547a37=_0x242381(_0x2537ee,_0x4fd996[_0x11a2e2(0x76f)]),_0x4dcfb4=this[_0x11a2e2(0x243)];return _0x4dcfb4?.[_0x11a2e2(0x721)]&&(_0x4dcfb4['processes'][_0x11a2e2(0x322)](_0x547a37),require$$1$2[_0x11a2e2(0x698)]?_0x4dcfb4[_0x11a2e2(0x3c4)]?.({'kind':_0x11a2e2(0x5ea)})[_0x11a2e2(0x628)](()=>{}):_0x4dcfb4[_0x11a2e2(0x5e6)]?.({'kind':_0x11a2e2(0x410),'listenAddr':_0x547a37})['catch'](()=>{})),this[_0x11a2e2(0x492)];}async[_0xfbb2ca(0x543)](_0x5458f2={}){const _0x3db1f2=_0xfbb2ca,_0x225454=this[_0x3db1f2(0x492)];this[_0x3db1f2(0x492)]=null;const _0x47604c=this[_0x3db1f2(0x37c)]['includes'](_0x225454)?this[_0x3db1f2(0x37c)]:_0x225454?[_0x225454]:[];this['servers']=[];if(_0x225454&&_0x225454['_isClusterController']){try{await _0x225454[_0x3db1f2(0x543)]();}catch{}this[_0x3db1f2(0x57b)]&&this['metrics'][_0x3db1f2(0x543)]();return;}if(_0x47604c[_0x3db1f2(0x503)]){const _0x3e86ad=Number[_0x3db1f2(0x79d)](_0x5458f2[_0x3db1f2(0x25c)])?Math['max'](0x0,_0x5458f2[_0x3db1f2(0x25c)]):0x3e8,_0x3e1dbb=_0xe53a94=>new Promise(_0xe1a441=>{const _0x5d2a97=_0x3db1f2;let _0x1ec21f=![],_0x3f3597=null,_0x50c32f=null;const _0x5b2e56=()=>{if(_0x1ec21f)return;_0x1ec21f=!![];if(_0x3f3597)clearTimeout(_0x3f3597);if(_0x50c32f)clearTimeout(_0x50c32f);_0xe1a441();};try{_0xe53a94[_0x5d2a97(0x543)](_0x5b2e56);}catch{_0x5b2e56();return;}try{_0xe53a94[_0x5d2a97(0x5fa)]?.();}catch{}_0x3f3597=setTimeout(()=>{const _0x32c91f=_0x5d2a97;try{_0xe53a94[_0x32c91f(0x78c)]?.();}catch{}for(const _0x1923cd of this[_0x32c91f(0x655)]){try{_0x1923cd[_0x32c91f(0x224)]();}catch{}}_0x50c32f=setTimeout(_0x5b2e56,0x64),_0x50c32f[_0x32c91f(0x442)]?.();},_0x3e86ad),_0x3f3597['unref']?.();});await Promise['all'](_0x47604c['map'](_0x3e1dbb));}this[_0x3db1f2(0x57b)]&&this[_0x3db1f2(0x57b)]['close']();}[_0xfbb2ca(0x2ce)](_0x52b3f0,_0x9ba33d,_0x5a11fd=0x36ee80){const _0x2e73d1=_0xfbb2ca,_0x49260c=Date[_0x2e73d1(0x6fd)](),_0x1d8cf0=Buffer['from'](JSON[_0x2e73d1(0x72f)]({'iat':_0x49260c,'exp':_0x49260c+_0x5a11fd,..._0x52b3f0}))[_0x2e73d1(0x288)](_0x2e73d1(0x32e)),_0x1b8430=_0x32578a(_0x1d8cf0,_0x9ba33d);return _0x1d8cf0+'.'+_0x1b8430;}[_0xfbb2ca(0x545)](_0x3b7208,_0x40667b={}){const _0x3bcbd1=_0xfbb2ca,{httpOnly:httpOnly=!![],sameSite:sameSite=_0x3bcbd1(0x5b6),path:path='/',secure:secure=![],maxAge:maxAge=null,expires:expires=null}=_0x40667b;let _0x522e0e=this[_0x3bcbd1(0x1c4)][_0x3bcbd1(0x759)]+'='+_0x3b7208;if(httpOnly)_0x522e0e+=';\x20HttpOnly';if(sameSite)_0x522e0e+=_0x3bcbd1(0x2dd)+sameSite;if(path)_0x522e0e+=_0x3bcbd1(0x414)+path;if(secure)_0x522e0e+=_0x3bcbd1(0x472);if(Number[_0x3bcbd1(0x79d)](maxAge))_0x522e0e+=_0x3bcbd1(0x3cb)+Math[_0x3bcbd1(0x270)](0x0,Math[_0x3bcbd1(0x318)](maxAge));if(expires instanceof Date)_0x522e0e+=_0x3bcbd1(0x562)+expires['toUTCString']();return _0x522e0e;}['clearCookie'](_0x5467aa=this[_0xfbb2ca(0x1c4)]['cookieName'],_0x3971ca={}){const _0x5a81a7=_0xfbb2ca,{path:path='/',sameSite:sameSite='Lax',secure:secure=![],httpOnly:httpOnly=!![]}=_0x3971ca;let _0x3470b0=_0x5467aa+'=';if(httpOnly)_0x3470b0+=_0x5a81a7(0x5de);if(sameSite)_0x3470b0+=_0x5a81a7(0x2dd)+sameSite;if(path)_0x3470b0+=_0x5a81a7(0x414)+path;if(secure)_0x3470b0+=_0x5a81a7(0x472);return _0x3470b0+=';\x20Max-Age=0;\x20Expires=Thu,\x2001\x20Jan\x201970\x2000:00:00\x20GMT',_0x3470b0;}[_0xfbb2ca(0x3b9)](_0x3199e2,_0x149fd5){const _0x1a6d06=_0xfbb2ca;if(!_0x3199e2)return null;const [_0x453e5,_0x14be86]=String(_0x3199e2)[_0x1a6d06(0x3d5)]('.');if(!_0x453e5||!_0x14be86)return null;const _0x43c8bd=_0x32578a(_0x453e5,_0x149fd5);if(!_0x273c70(_0x14be86,_0x43c8bd))return null;try{const _0x565c60=JSON[_0x1a6d06(0x663)](Buffer[_0x1a6d06(0x2f3)](_0x453e5,'base64url')[_0x1a6d06(0x288)]());if(_0x565c60['exp']<=Date[_0x1a6d06(0x6fd)]())return null;return _0x565c60;}catch{return null;}}[_0xfbb2ca(0x1f0)](_0x46a014){const _0x2c0b7e=_0xfbb2ca;if(this[_0x2c0b7e(0x243)]?.[_0x2c0b7e(0x1c4)])return this[_0x2c0b7e(0x243)][_0x2c0b7e(0x1c4)][_0x2c0b7e(0x1f0)](_0x46a014);return _0x266324(_0x46a014);}[_0xfbb2ca(0x684)](_0x2e4375){const _0x3845d3=_0xfbb2ca;if(this[_0x3845d3(0x243)]?.[_0x3845d3(0x1c4)])return this[_0x3845d3(0x243)][_0x3845d3(0x1c4)][_0x3845d3(0x684)](_0x2e4375);const _0x1c8e80=this[_0x3845d3(0x212)]?.['tokenTtl']??0x36ee80,_0x30a9ad=this[_0x3845d3(0x212)]?.[_0x3845d3(0x254)];return _0x595d73(_0x2e4375,_0x30a9ad,_0x1c8e80);}[_0xfbb2ca(0x1d4)](_0x78e69e){const _0x1277d1=_0xfbb2ca;if(this[_0x1277d1(0x243)]?.[_0x1277d1(0x1c4)])return this['_okdb'][_0x1277d1(0x1c4)]['authenticateToken'](_0x78e69e);const _0x1ad13f=this[_0x1277d1(0x212)]?.[_0x1277d1(0x254)];return _0x199cf6(_0x78e69e,_0x1ad13f);}async[_0xfbb2ca(0x544)](_0x448960){const _0x123a89=_0xfbb2ca;if(this[_0x123a89(0x243)]?.[_0x123a89(0x1c4)])return this[_0x123a89(0x243)]['auth'][_0x123a89(0x544)](_0x448960);if(_0x448960[_0x123a89(0x2e9)]?.['internal']===!![]||this[_0x123a89(0x555)]===_0x123a89(0x1bc))return{'id':'system','username':_0x123a89(0x2ad),'roles':[_0x123a89(0x4f4)],'isAuthenticated':!![],'isSystem':!![],'user':{'id':_0x123a89(0x2ad),'username':_0x123a89(0x2ad),'roles':[_0x123a89(0x4f4)],'isAuthenticated':!![],'isSystem':!![]}};const _0x269e9e=this[_0x123a89(0x1f0)](_0x448960[_0x123a89(0x786)]?.['authorization']),_0x159577=_0x448960[_0x123a89(0x67c)]?.[this[_0x123a89(0x1c4)][_0x123a89(0x759)]],_0x4e2220=_0x269e9e||_0x159577;if(!_0x4e2220)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x1b26c9=this['authenticateToken'](_0x4e2220);if(!_0x1b26c9)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x1165a1={'id':_0x1b26c9['sub']??null,'username':_0x1b26c9['username']??null,'roles':Array[_0x123a89(0x65e)](_0x1b26c9['roles'])?_0x1b26c9[_0x123a89(0x1d3)]:[],'isAuthenticated':!![],'isSystem':![]};return{'id':_0x1165a1['id'],'username':_0x1165a1[_0x123a89(0x376)],'roles':_0x1165a1[_0x123a89(0x1d3)],'isAuthenticated':!![],'isSystem':![],'user':_0x1165a1,'claims':_0x1b26c9,'subject':_0x1165a1['id']};}async[_0xfbb2ca(0x2a2)](_0x4d91c2,_0x486365={}){const _0x1562dc=_0xfbb2ca,_0x19e36a=_0x2d4b1d(_0x4d91c2),_0x343145=Array[_0x1562dc(0x65e)](_0x486365[_0x1562dc(0x642)])&&_0x486365[_0x1562dc(0x642)][_0x1562dc(0x503)]>0x0?_0x486365[_0x1562dc(0x642)]:[_0x1562dc(0x72d),'ES256'],_0x53978a=_0x19e36a[_0x1562dc(0x238)]?.[_0x1562dc(0x511)];if(!_0x343145['includes'](_0x53978a))throw new Error(_0x1562dc(0x1ca)+_0x53978a);if(!_0x19e36a[_0x1562dc(0x238)]?.[_0x1562dc(0x44d)])throw new Error(_0x1562dc(0x438));const _0xde64e2=await this[_0x1562dc(0x5a8)](_0x486365);if(!_0xde64e2?.[_0x1562dc(0x44c)])throw new Error(_0x1562dc(0x209));const _0x58f792=await this['_getJwkKey'](_0xde64e2[_0x1562dc(0x44c)],_0x19e36a['header'][_0x1562dc(0x44d)],_0x486365);if(!_0x3ba38d(_0x53978a,_0x58f792,_0x19e36a['signingInput'],_0x19e36a['signature']))throw new Error('JWT\x20signature\x20verification\x20failed');const _0x2a87ed=Math['floor'](Date[_0x1562dc(0x6fd)]()/0x3e8),_0x3bb548=_0x19e36a[_0x1562dc(0x63d)]||{};if(_0x3bb548['iss']!==_0xde64e2[_0x1562dc(0x24b)])throw new Error(_0x1562dc(0x1e1));const _0xfee21d=_0x486365[_0x1562dc(0x25e)];if(_0xfee21d){const _0x496429=_0x196c1f(_0x3bb548['aud']);if(!_0x496429['includes'](_0xfee21d))throw new Error(_0x1562dc(0x69c));}if(typeof _0x3bb548[_0x1562dc(0x79c)]!==_0x1562dc(0x6e3)||_0x3bb548[_0x1562dc(0x79c)]<=_0x2a87ed)throw new Error(_0x1562dc(0x61f));if(_0x3bb548[_0x1562dc(0x4d8)]!=null&&_0x3bb548[_0x1562dc(0x4d8)]>_0x2a87ed)throw new Error('JWT\x20not\x20yet\x20valid');if(_0x3bb548[_0x1562dc(0x670)]==='id')throw new Error(_0x1562dc(0x611));return{'subject':_0x3bb548['sub']??null,'email':_0x3bb548[_0x1562dc(0x6a2)]??null,'scopes':typeof _0x3bb548[_0x1562dc(0x71c)]==='string'?_0x3bb548[_0x1562dc(0x71c)][_0x1562dc(0x3d5)](/\s+/)['filter'](Boolean):[],'claims':_0x3bb548,'tokenType':_0x1562dc(0x28d)};}async[_0xfbb2ca(0x5a8)](_0x11f025={}){const _0x734bd1=_0xfbb2ca,_0x222e37=String(_0x11f025['issuer']||'')[_0x734bd1(0x18e)](/\/+$/,'');if(!_0x222e37)return null;const _0x2b537a=Number[_0x734bd1(0x79d)](_0x11f025[_0x734bd1(0x2e0)])?_0x11f025[_0x734bd1(0x2e0)]:0xa*0x3c*0x3e8;if(this[_0x734bd1(0x473)]?.[_0x734bd1(0x24b)]===_0x222e37&&this['_oidcDiscoveryCache'][_0x734bd1(0x4f7)]>Date[_0x734bd1(0x6fd)]())return this[_0x734bd1(0x473)][_0x734bd1(0x481)];const _0x5eb51b=await _0x31d9c7(_0x222e37+'/.well-known/openid-configuration'),_0x1d3669={'issuer':_0x5eb51b[_0x734bd1(0x24b)]||_0x222e37,'authorization_endpoint':_0x11f025[_0x734bd1(0x67e)]||_0x5eb51b[_0x734bd1(0x3f8)],'token_endpoint':_0x11f025[_0x734bd1(0x71a)]||_0x5eb51b[_0x734bd1(0x6bf)],'jwks_uri':_0x11f025['jwksUri']||_0x5eb51b[_0x734bd1(0x44c)]};return this['_oidcDiscoveryCache']={'issuer':_0x222e37,'value':_0x1d3669,'expiresAt':Date[_0x734bd1(0x6fd)]()+_0x2b537a},_0x1d3669;}async[_0xfbb2ca(0x29d)](_0x4c6f84,_0x3a0a23=0x5*0x3c*0x3e8){const _0x49de6d=_0xfbb2ca,_0x3153ae=await _0x31d9c7(_0x4c6f84),_0x25afa3=new Map();for(const _0x35219a of _0x3153ae[_0x49de6d(0x2ac)]||[]){if(!_0x35219a?.[_0x49de6d(0x44d)])continue;_0x25afa3[_0x49de6d(0x36f)](_0x35219a[_0x49de6d(0x44d)],_0x2793b2(_0x35219a));}return this[_0x49de6d(0x553)]={'uri':_0x4c6f84,'keys':_0x25afa3,'expiresAt':Date[_0x49de6d(0x6fd)]()+_0x3a0a23},this[_0x49de6d(0x553)];}async[_0xfbb2ca(0x5d6)](_0x3d2f09,_0x345dbf,_0x9a19bc={}){const _0x4294ee=_0xfbb2ca,_0x44b973=Number['isFinite'](_0x9a19bc[_0x4294ee(0x1da)])?_0x9a19bc[_0x4294ee(0x1da)]:0x5*0x3c*0x3e8,_0x385833=0x1e*0x3e8,_0x4efa8e=this['_jwksNegativeCache'][_0x4294ee(0x3e6)](_0x345dbf);if(_0x4efa8e!==undefined&&_0x4efa8e>Date[_0x4294ee(0x6fd)]())throw new Error('Unknown\x20JWKS\x20kid:\x20'+_0x345dbf);(!this[_0x4294ee(0x553)]||this['_jwksCache'][_0x4294ee(0x5b0)]!==_0x3d2f09||this[_0x4294ee(0x553)][_0x4294ee(0x4f7)]<=Date[_0x4294ee(0x6fd)]())&&await this[_0x4294ee(0x29d)](_0x3d2f09,_0x44b973);let _0x6788ef=this['_jwksCache']?.[_0x4294ee(0x2ac)]?.[_0x4294ee(0x3e6)](_0x345dbf);if(_0x6788ef)return _0x6788ef;await this[_0x4294ee(0x29d)](_0x3d2f09,_0x44b973),_0x6788ef=this[_0x4294ee(0x553)]?.['keys']?.[_0x4294ee(0x3e6)](_0x345dbf);if(!_0x6788ef){this[_0x4294ee(0x76b)]['set'](_0x345dbf,Date[_0x4294ee(0x6fd)]()+_0x385833);throw new Error(_0x4294ee(0x377)+_0x345dbf);}return _0x6788ef;}[_0xfbb2ca(0x547)](_0xf9f108){const _0x52a474=_0xfbb2ca;if(this[_0x52a474(0x243)]?.['auth'])return this[_0x52a474(0x243)][_0x52a474(0x1c4)]['_normalizeOAuthAuthResult'](_0xf9f108);const _0x106124=_0xf9f108?.[_0x52a474(0x48c)]||{},_0x222bd7={'sub':_0xf9f108?.[_0x52a474(0x339)]??_0x106124[_0x52a474(0x722)]??null,'email':_0xf9f108?.[_0x52a474(0x6a2)]??_0x106124['email']??null,'name':_0xf9f108?.['name']??_0x106124[_0x52a474(0x378)]??_0x106124[_0x52a474(0x202)]??null,'groups':_0xf9f108?.[_0x52a474(0x358)]??_0x106124['groups']??[],'roles':_0xf9f108?.[_0x52a474(0x1d3)]??_0x106124[_0x52a474(0x1d3)]??[]};return{'type':_0x52a474(0x6d8),'tokenType':_0xf9f108?.[_0x52a474(0x4ad)]??_0x52a474(0x28d),'subject':_0x222bd7['sub'],'email':_0x222bd7[_0x52a474(0x6a2)],'scopes':_0xf9f108?.['scopes']??_0x106124[_0x52a474(0x71c)]?.[_0x52a474(0x3d5)]?.('\x20')?.[_0x52a474(0x1ff)](Boolean)??[],'claims':_0x106124,'user':_0x222bd7,'isAuthenticated':!![]};}[_0xfbb2ca(0x1a8)](_0x42fe72={},_0x367612=0x927c0){const _0x3a5041=_0xfbb2ca;if(this[_0x3a5041(0x243)]?.[_0x3a5041(0x1c4)])return this[_0x3a5041(0x243)][_0x3a5041(0x1c4)]['createLoginState'](_0x42fe72,_0x367612);const _0x52507b=_0x5bbee0(0x18);this[_0x3a5041(0x4b1)]['set'](_0x52507b,{..._0x42fe72,'exp':Date[_0x3a5041(0x6fd)]()+_0x367612});if(this[_0x3a5041(0x4b1)][_0x3a5041(0x1f8)]%0x32===0x0){const _0x56ccdc=Date[_0x3a5041(0x6fd)]();for(const [_0x46e573,_0x2d5f8b]of this[_0x3a5041(0x4b1)]){if(_0x2d5f8b[_0x3a5041(0x79c)]<=_0x56ccdc)this[_0x3a5041(0x4b1)]['delete'](_0x46e573);}}return _0x52507b;}[_0xfbb2ca(0x4aa)](_0x2b6ee2){const _0x488f9e=_0xfbb2ca;if(this[_0x488f9e(0x243)]?.[_0x488f9e(0x1c4)])return this[_0x488f9e(0x243)][_0x488f9e(0x1c4)]['consumeLoginState'](_0x2b6ee2);if(!_0x2b6ee2)return null;const _0x5711b1=this[_0x488f9e(0x4b1)][_0x488f9e(0x3e6)](_0x2b6ee2);this[_0x488f9e(0x4b1)][_0x488f9e(0x560)](_0x2b6ee2);if(!_0x5711b1)return null;if(_0x5711b1[_0x488f9e(0x79c)]<=Date[_0x488f9e(0x6fd)]())return null;return _0x5711b1;}}function _0x446cee(_0x3bac22){const _0x4230cd=_0xfbb2ca;if(_0x3bac22==null)return{'status':0xcc};if(Buffer['isBuffer'](_0x3bac22)||_0x284df2(_0x3bac22))return{'status':0xc8,'body':_0x3bac22};if(typeof _0x3bac22===_0x4230cd(0x40d)&&_0x4230cd(0x7a3)in _0x3bac22){if(!(_0x4230cd(0x505)in _0x3bac22)&&!_0x284df2(_0x3bac22['body'])){const {status:_0x33d241,headers:_0x3adc58,..._0x23b476}=_0x3bac22;if(Object[_0x4230cd(0x2ac)](_0x23b476)[_0x4230cd(0x503)]>0x0)return{'status':_0x33d241,'headers':_0x3adc58,'body':_0x23b476};}return _0x3bac22;}return{'status':0xc8,'body':_0x3bac22};}function _0x284df2(_0x1893e5){const _0x215ddb=_0xfbb2ca;return _0x1893e5&&typeof _0x1893e5['pipe']===_0x215ddb(0x5aa);}function _0x47de2f(_0x1d4558,_0x58f808){const _0x358cb0=_0xfbb2ca,{PassThrough:_0x21163b}=require$$8;let _0x2fd0d9=0x0,_0x3d0a04=![];const _0x17c24c=new _0x21163b();return _0x1d4558['on'](_0x358cb0(0x6af),_0x3947a7=>{const _0x2a08c7=_0x358cb0;if(_0x3d0a04)return;_0x2fd0d9+=_0x3947a7[_0x2a08c7(0x503)];if(_0x2fd0d9>_0x58f808){_0x3d0a04=!![];const _0x45a5a3=new Error(_0x2a08c7(0x36a));_0x45a5a3[_0x2a08c7(0x7a3)]=0x19d,_0x17c24c[_0x2a08c7(0x224)](_0x45a5a3);return;}if(!_0x17c24c[_0x2a08c7(0x1de)])_0x17c24c[_0x2a08c7(0x387)](_0x3947a7);}),_0x1d4558['on'](_0x358cb0(0x72e),()=>{const _0x217fdc=_0x358cb0;!_0x3d0a04&&!_0x17c24c[_0x217fdc(0x1de)]&&(_0x3d0a04=!![],_0x17c24c[_0x217fdc(0x72e)]());}),_0x1d4558['on'](_0x358cb0(0x5b7),_0x1bce5f=>{const _0x474c73=_0x358cb0;if(!_0x17c24c[_0x474c73(0x1de)])_0x17c24c[_0x474c73(0x224)](_0x1bce5f);}),_0x1d4558[_0x358cb0(0x417)](),_0x17c24c['on']('resume',()=>{const _0x101207=_0x358cb0;if(!_0x17c24c[_0x101207(0x1de)])_0x1d4558['resume']();}),_0x17c24c;}function _0x5e103f(_0x217283,_0x2fb9d3){const _0x303995=_0xfbb2ca;if(_0x217283[_0x303995(0x5e0)]===_0x303995(0x51c)||_0x217283[_0x303995(0x5e0)]===_0x303995(0x33d))return null;const _0x2145b4=_0x217283[_0x303995(0x786)]?.[_0x303995(0x4af)];if(_0x2145b4!=null){const _0x5c32a9=Number(_0x2145b4);if(Number['isFinite'](_0x5c32a9)&&_0x5c32a9>_0x2fb9d3){const _0x36eda3=new Error(_0x303995(0x36a));_0x36eda3[_0x303995(0x7a3)]=0x19d;throw _0x36eda3;}}return new Promise((_0x5017c7,_0x4fb686)=>{const _0x16b1eb=_0x303995;let _0x28d905='',_0xf1dfdd=0x0;_0x217283['on'](_0x16b1eb(0x6af),_0x58b9b7=>{const _0x59a4aa=_0x16b1eb;_0xf1dfdd+=_0x58b9b7[_0x59a4aa(0x503)];if(_0xf1dfdd>_0x2fb9d3){try{_0x217283[_0x59a4aa(0x224)]();}catch{}const _0x3bdc04=new Error(_0x59a4aa(0x36a));_0x3bdc04[_0x59a4aa(0x7a3)]=0x19d,_0x4fb686(_0x3bdc04);return;}_0x28d905+=_0x58b9b7;}),_0x217283['on'](_0x16b1eb(0x72e),()=>{const _0x4657f4=_0x16b1eb;if(!_0x28d905)return _0x5017c7(null);const _0x116307=_0x217283[_0x4657f4(0x786)]?.[_0x4657f4(0x7a1)]||'';if(_0x116307[_0x4657f4(0x1dc)](_0x4657f4(0x4c7))){const _0x5b086f={};for(const [_0x244f6d,_0x56f4f0]of new URLSearchParams(_0x28d905))_0x5b086f[_0x244f6d]=_0x56f4f0;return _0x5017c7(_0x5b086f);}try{_0x5017c7(JSON[_0x4657f4(0x663)](_0x28d905));}catch(_0x58fade){_0x4fb686(_0x58fade);}}),_0x217283['on'](_0x16b1eb(0x5b7),_0x4fb686);});}function _0x2602a8(_0x93c849,_0x1ea4b9){const _0x3d389b=_0xfbb2ca,{status:status=0xc8,headers:headers={},body:_0x1436cb}=_0x1ea4b9;_0x93c849[_0x3d389b(0x558)]=status;for(const [_0x5a2a56,_0x24dcdc]of Object['entries'](headers)){_0x93c849['setHeader'](_0x5a2a56,_0x24dcdc);}if(_0x1436cb==null){_0x93c849['end']();return;}if(_0x284df2(_0x1436cb)){_0x1436cb['pipe'](_0x93c849);return;}if(Buffer[_0x3d389b(0x464)](_0x1436cb)){_0x93c849[_0x3d389b(0x72e)](_0x1436cb);return;}if(typeof _0x1436cb===_0x3d389b(0x40d)){!_0x93c849[_0x3d389b(0x1dd)]('Content-Type')&&_0x93c849[_0x3d389b(0x4f0)](_0x3d389b(0x321),_0x3d389b(0x44b));_0x93c849[_0x3d389b(0x72e)](JSON['stringify'](_0x1436cb));return;}_0x93c849[_0x3d389b(0x72e)](String(_0x1436cb));}function _0x242381(_0x4762d3,_0x45ab72){const _0x35d16a=_0xfbb2ca;if(_0x45ab72==null)return':'+_0x4762d3;return[][_0x35d16a(0x549)](_0x45ab72)[_0x35d16a(0x626)](_0x299c57=>(_0x299c57[_0x35d16a(0x1dc)](':')?'['+_0x299c57+']':_0x299c57)+':'+_0x4762d3)[_0x35d16a(0x29f)](',\x20');}return okdbHttp[_0xfbb2ca(0x1e3)]=_0xfbcc42,okdbHttp[_0xfbb2ca(0x1e3)][_0xfbb2ca(0x1cf)]=_0x242381,okdbHttp[_0xfbb2ca(0x1e3)]['OKDB_CODE_TO_HTTP_STATUS']=_0x13ad4d,okdbHttp['exports'];}var hasRequiredOkdb;function requireOkdb(){const _0x5a22a6=_0x362184;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x5a22a6(0x1ea)]();}catch{}const _0x8e4ba8=require$$1,_0x2c9780=require$$1$1,{resolveWorkers:_0x3f588f,isShmbufNative:_0x426793}=requireOkdbWorkers();function _0x1b8588(_0x448358){const _0x420005=_0x5a22a6,_0x1f3ea2=_0x448358[_0x420005(0x5b8)](0x2),_0x448755={};let _0x263f1b=0x0;while(_0x263f1b<_0x1f3ea2[_0x420005(0x503)]){const _0x2e50f2=_0x1f3ea2[_0x263f1b];if(_0x2e50f2==='--port'||_0x2e50f2==='-p')_0x448755[_0x420005(0x5f6)]=Number(_0x1f3ea2[++_0x263f1b]);else{if(_0x2e50f2==='--path'||_0x2e50f2==='-d')_0x448755[_0x420005(0x624)]=_0x1f3ea2[++_0x263f1b];else{if(_0x2e50f2==='--key'||_0x2e50f2==='-k')_0x448755[_0x420005(0x566)]=_0x1f3ea2[++_0x263f1b];else{if(_0x2e50f2===_0x420005(0x5c8)||_0x2e50f2==='-c')_0x448755['config']=_0x1f3ea2[++_0x263f1b];else{if(_0x2e50f2===_0x420005(0x19e))_0x448755[_0x420005(0x6d3)]=_0x1f3ea2[++_0x263f1b];else{if(_0x2e50f2===_0x420005(0x489))_0x448755[_0x420005(0x674)]=!![];else{if(_0x2e50f2===_0x420005(0x349))_0x448755['noAdmin']=!![];else{if(_0x2e50f2===_0x420005(0x3b2))_0x448755['workers']=_0x1f3ea2[++_0x263f1b];else{if(_0x2e50f2==='--no-cluster')_0x448755[_0x420005(0x343)]=!![];else{if(_0x2e50f2===_0x420005(0x5ce)||_0x2e50f2==='-e')_0x448755[_0x420005(0x758)]=_0x1f3ea2[++_0x263f1b];else{if(_0x2e50f2===_0x420005(0x31f))_0x448755['types']=_0x1f3ea2[++_0x263f1b];else{if(_0x2e50f2===_0x420005(0x6f9))_0x448755['changes']=!![];else{if(_0x2e50f2==='--blobs')_0x448755[_0x420005(0x6e9)]=!![];else{if(_0x2e50f2===_0x420005(0x370))_0x448755[_0x420005(0x609)]=!![];else{if(_0x2e50f2==='--open'){const _0x1abe53=[];while(_0x263f1b+0x1<_0x1f3ea2[_0x420005(0x503)]&&!_0x1f3ea2[_0x263f1b+0x1]['startsWith']('--')){_0x1abe53[_0x420005(0x387)](_0x1f3ea2[++_0x263f1b]);}_0x448755[_0x420005(0x1bc)]=_0x1abe53[_0x420005(0x503)]>0x0?_0x1abe53:!![];}else{if(_0x2e50f2==='--log-requests')_0x448755['logRequests']=!![];else{if(_0x2e50f2===_0x420005(0x79b))_0x448755['name']=_0x1f3ea2[++_0x263f1b];else{if(_0x2e50f2===_0x420005(0x5ba))_0x448755[_0x420005(0x298)]=_0x1f3ea2[++_0x263f1b];else{if(_0x2e50f2===_0x420005(0x740))_0x448755[_0x420005(0x4c5)]=_0x1f3ea2[++_0x263f1b];else{if(_0x2e50f2===_0x420005(0x40b))_0x448755[_0x420005(0x78a)]=_0x1f3ea2[++_0x263f1b];else{if(_0x2e50f2==='--grants')_0x448755[_0x420005(0x204)]=_0x1f3ea2[++_0x263f1b];else{if(_0x2e50f2===_0x420005(0x70a))_0x448755[_0x420005(0x741)]=_0x1f3ea2[++_0x263f1b];else{if(_0x2e50f2===_0x420005(0x45f))_0x448755[_0x420005(0x4ca)]=_0x1f3ea2[++_0x263f1b];else{if(_0x2e50f2===_0x420005(0x6b1)||_0x2e50f2==='-u')_0x448755[_0x420005(0x376)]=_0x1f3ea2[++_0x263f1b];else{if(_0x2e50f2===_0x420005(0x365))_0x448755[_0x420005(0x1d7)]=_0x1f3ea2[++_0x263f1b];else{if(_0x2e50f2===_0x420005(0x208)||_0x2e50f2==='-v'){const _0x4b04b7=require$$3;console[_0x420005(0x273)](_0x4b04b7[_0x420005(0x2b3)]),process[_0x420005(0x393)](0x0);}else(_0x2e50f2===_0x420005(0x355)||_0x2e50f2==='-h')&&(_0x55ffc1(),process[_0x420005(0x393)](0x0));}}}}}}}}}}}}}}}}}}}}}}}}}_0x263f1b++;}return _0x448755;}function _0x55ffc1(){const _0x29101a=_0x5a22a6;console[_0x29101a(0x273)](_0x29101a(0x4dc));}const _0x11207d=new Set([_0x5a22a6(0x1c1),_0x5a22a6(0x77a),_0x5a22a6(0x21b),_0x5a22a6(0x5b7)]);function _0x14062f(_0x5b0c22){const _0x33b161=_0x5a22a6,_0x51a900=_0x5b0c22[_0x33b161(0x252)]?_0x8e4ba8[_0x33b161(0x300)](_0x5b0c22[_0x33b161(0x252)]):_0x8e4ba8[_0x33b161(0x300)](_0x33b161(0x479));let _0x33dd2a={};if(_0x2c9780['existsSync'](_0x51a900))try{const _0x38893f=_0x2c9780[_0x33b161(0x2a8)](_0x51a900,'utf8')[_0x33b161(0x18e)](/^\uFEFF/,'');_0x33dd2a=JSON[_0x33b161(0x663)](_0x38893f),console[_0x33b161(0x273)](_0x33b161(0x1e5)+_0x51a900);}catch(_0x200217){console[_0x33b161(0x5b7)](_0x33b161(0x4a3)+_0x51a900+':\x20'+_0x200217[_0x33b161(0x1e0)]),process[_0x33b161(0x393)](0x1);}const _0x3afb5d={'port':process.env.OKDB_PORT?Number(process.env.OKDB_PORT):undefined,'path':process.env.OKDB_PATH??undefined,'key':process.env.OKDB_KEY??undefined,'logLevel':process.env.OKDB_LOG_LEVEL??undefined,'noRepl':process.env.OKDB_NO_REPL==='1'?!![]:undefined,'noAdmin':process.env.OKDB_NO_ADMIN==='1'?!![]:undefined},_0x901249={'port':_0x5b0c22[_0x33b161(0x5f6)]??_0x33dd2a[_0x33b161(0x5f6)]??_0x3afb5d['port']??0x2124,'dbPath':_0x5b0c22[_0x33b161(0x624)]??_0x33dd2a[_0x33b161(0x624)]??_0x3afb5d[_0x33b161(0x624)]??'./okdb-data','key':_0x5b0c22['key']??_0x33dd2a[_0x33b161(0x566)]??_0x3afb5d[_0x33b161(0x566)]??undefined,'logLevel':_0x5b0c22['logLevel']??_0x33dd2a[_0x33b161(0x6d3)]??_0x3afb5d['logLevel']??_0x33b161(0x77a),'noRepl':_0x5b0c22[_0x33b161(0x674)]??_0x33dd2a['noRepl']??_0x3afb5d['noRepl']??![],'noAdmin':_0x5b0c22[_0x33b161(0x6b6)]??_0x33dd2a[_0x33b161(0x6b6)]??_0x3afb5d[_0x33b161(0x6b6)]??![],'admin':_0x33dd2a['admin']??{},'api':_0x33dd2a[_0x33b161(0x24f)]??undefined,'auth':_0x33dd2a[_0x33b161(0x1c4)]??undefined,'mcp':_0x33dd2a[_0x33b161(0x79a)]??undefined,'http':_0x33dd2a[_0x33b161(0x635)]??undefined,'timeMachine':_0x33dd2a[_0x33b161(0x244)]!==![]?_0x33dd2a[_0x33b161(0x244)]??{}:![],'processors':_0x33dd2a[_0x33b161(0x471)],'engines':_0x33dd2a[_0x33b161(0x517)],'compaction':_0x33dd2a[_0x33b161(0x733)]};if(_0x5b0c22[_0x33b161(0x343)])_0x901249['noCluster']=!![];if(_0x5b0c22[_0x33b161(0x5f3)]!==undefined)_0x901249[_0x33b161(0x5cb)]=_0x5b0c22[_0x33b161(0x5f3)];_0x5b0c22[_0x33b161(0x1bc)]!==undefined&&(_0x901249[_0x33b161(0x1c4)]=_0x901249[_0x33b161(0x1c4)]||{},_0x901249[_0x33b161(0x1c4)]['open']=_0x5b0c22[_0x33b161(0x1bc)]);_0x5b0c22[_0x33b161(0x63e)]&&(_0x901249[_0x33b161(0x1c1)]=_0x901249[_0x33b161(0x1c1)]||{},_0x901249[_0x33b161(0x1c1)]['logRequests']=!![]);(!Number['isInteger'](_0x901249[_0x33b161(0x5f6)])||_0x901249[_0x33b161(0x5f6)]<0x1||_0x901249['port']>0xffff)&&(console[_0x33b161(0x5b7)](_0x33b161(0x4fe)+_0x901249['port']+'\x20(must\x20be\x201–65535)'),process[_0x33b161(0x393)](0x1));!_0x11207d[_0x33b161(0x52e)](_0x901249[_0x33b161(0x6d3)])&&(console[_0x33b161(0x5b7)](_0x33b161(0x44a)+_0x901249['logLevel']+'\x22\x20(must\x20be\x20debug|info|warn|error)'),process[_0x33b161(0x393)](0x1));const _0x38be41=_0x901249['http']?.[_0x33b161(0x76f)];_0x38be41!==undefined&&!(typeof _0x38be41===_0x33b161(0x44e)&&_0x38be41)&&!(Array[_0x33b161(0x65e)](_0x38be41)&&_0x38be41[_0x33b161(0x503)]&&_0x38be41[_0x33b161(0x3a1)](_0x9ba5f9=>typeof _0x9ba5f9===_0x33b161(0x44e)&&_0x9ba5f9))&&(console['error'](_0x33b161(0x72a)+JSON[_0x33b161(0x72f)](_0x38be41)+_0x33b161(0x2d6)),process['exit'](0x1));for(const _0x5e7a21 of _0x5e827f){_0x901249[_0x5e7a21]!==undefined&&typeof _0x901249[_0x5e7a21]!==_0x33b161(0x6ff)&&(console[_0x33b161(0x5b7)](_0x33b161(0x578)+_0x5e7a21+_0x33b161(0x66e)+JSON[_0x33b161(0x72f)](_0x901249[_0x5e7a21])+_0x33b161(0x5c6)),process[_0x33b161(0x393)](0x1));}return _0x901249;}const _0x5e827f=[_0x5a22a6(0x471),_0x5a22a6(0x517),_0x5a22a6(0x733)];function _0x5e0778(_0x371dec){const _0x37ecff=_0x5a22a6;return!!(_0x371dec&&typeof _0x371dec===_0x37ecff(0x40d)&&!Array['isArray'](_0x371dec)&&Object[_0x37ecff(0x2ac)](_0x371dec)['length']>0x0);}function _0x13ec0a(_0x3340da){const _0x5426ca=_0x5a22a6;return{..._0x3340da[_0x5426ca(0x566)]?{'encryptionKey':_0x3340da[_0x5426ca(0x566)]}:{},'engines':![],'processors':![],'compaction':![]};}const _0x224489=!process['stdout'][_0x5a22a6(0x53f)]||!!process.env.NO_COLOR;function _0x4f037e(_0x3c9bbc,_0x425515){const _0x8144c1=_0x5a22a6;return _0x224489?_0x425515:'\x1b['+_0x3c9bbc+'m'+_0x425515+_0x8144c1(0x1d9);}function _0x4bc1a7(_0x3cefb1){const _0x3f366d=_0x5a22a6;if(!_0x3cefb1||_0x3cefb1[_0x3f366d(0x503)]===0x0)return;const _0x1a24c9='─'['repeat'](0x38);process[_0x3f366d(0x556)][_0x3f366d(0x6cc)]('\x0a'),process['stderr'][_0x3f366d(0x6cc)](_0x4f037e('33',_0x3f366d(0x2cf)+_0x3cefb1['length']+_0x3f366d(0x324)+(_0x3cefb1[_0x3f366d(0x503)]>0x1?'S':'')+'\x0a')),process[_0x3f366d(0x556)]['write']('\x20\x20'+_0x1a24c9+'\x0a');for(const _0x5b1740 of _0x3cefb1){const _0x6d62e7=_0x5b1740[_0x3f366d(0x3f4)]===_0x3f366d(0x5b7)?_0x4f037e('31',_0x3f366d(0x55f)):_0x4f037e('33',_0x3f366d(0x5a2));process[_0x3f366d(0x556)][_0x3f366d(0x6cc)](_0x6d62e7+'\x20\x20'+_0x4f037e('1',_0x5b1740[_0x3f366d(0x535)])+'\x0a'),process[_0x3f366d(0x556)]['write'](_0x3f366d(0x3cc)+_0x5b1740[_0x3f366d(0x1e0)]+'\x0a');if(_0x5b1740[_0x3f366d(0x604)])process[_0x3f366d(0x556)]['write'](_0x3f366d(0x3cc)+_0x4f037e('2',_0x3f366d(0x194)+_0x5b1740[_0x3f366d(0x604)])+'\x0a');process[_0x3f366d(0x556)][_0x3f366d(0x6cc)]('\x0a');}process[_0x3f366d(0x556)][_0x3f366d(0x6cc)]('\x20\x20'+_0x1a24c9+'\x0a\x0a');}function _0x4dc6fd(_0x47bbfe,_0x322e6c,_0x1a8459={}){const _0x5b2a29=_0x5a22a6,_0x5a148b=_0x47bbfe[_0x5b2a29(0x635)][_0x5b2a29(0x49b)](_0x322e6c,_0x1a8459);if(_0x5a148b&&_0x5a148b[_0x5b2a29(0x227)])return Promise[_0x5b2a29(0x300)](_0x5a148b);const _0x24fe3f=_0x47bbfe['http']['servers']?.['length']?_0x47bbfe[_0x5b2a29(0x635)][_0x5b2a29(0x37c)]:[_0x5a148b];return new Promise((_0x4e4212,_0x37150f)=>{const _0x42fe88=_0x5b2a29;_0x5a148b[_0x42fe88(0x3c3)](_0x42fe88(0x5b7),_0x37150f),Promise[_0x42fe88(0x618)](_0x24fe3f[_0x42fe88(0x626)](_0x445221=>_0x445221[_0x42fe88(0x2ea)]?null:new Promise(_0x5a596a=>_0x445221['once'](_0x42fe88(0x2ea),_0x5a596a))))[_0x42fe88(0x4a7)](()=>_0x4e4212(_0x5a148b));});}function _0x1a2551(_0x5c26d8){const _0x4ea787=_0x5a22a6;return _0x5c26d8[_0x4ea787(0x635)]?.[_0x4ea787(0x76f)]!==undefined?{'host':_0x5c26d8['http']['host']}:{};}async function _0x1a7253(_0x317e78){const _0x321295=_0x5a22a6,_0x463746=require$$4$1;console[_0x321295(0x273)]('\x0a\x20\x20okdb\x20doctor\x0a');let _0x2c46a1=!![];const _0x361e0a=(_0x1313dc,_0x7edf7b)=>{const _0x24ab9b=_0x321295;console[_0x24ab9b(0x273)]('\x20\x20'+(_0x1313dc?'✓':'✗')+'\x20'+_0x7edf7b);if(!_0x1313dc)_0x2c46a1=![];},_0xf9f7b7=Number(process[_0x321295(0x2b3)][_0x321295(0x18e)]('v','')[_0x321295(0x3d5)]('.')[0x0]);_0x361e0a(_0xf9f7b7>=0x12,_0x321295(0x3ac)+process[_0x321295(0x2b3)]+(_0xf9f7b7<0x12?'\x20\x20(need\x20≥\x2018)':''));const _0x3e1961=_0x8e4ba8['resolve'](_0x317e78['dbPath']);try{_0x2c9780[_0x321295(0x76d)](_0x3e1961,{'recursive':!![]});const _0x2ee285=_0x8e4ba8[_0x321295(0x29f)](_0x3e1961,'.okdb-write-test');_0x2c9780['writeFileSync'](_0x2ee285,''),_0x2c9780[_0x321295(0x5cc)](_0x2ee285),_0x361e0a(!![],_0x321295(0x657)+_0x3e1961);}catch(_0x4ecce1){_0x361e0a(![],_0x321295(0x772)+_0x3e1961+'\x20\x20('+_0x4ecce1['message']+')');}const _0x44d1ac=await new Promise(_0x581f90=>{const _0x12132f=_0x321295,_0x26d19e=_0x463746[_0x12132f(0x5d5)]();_0x26d19e[_0x12132f(0x3c3)](_0x12132f(0x5b7),()=>_0x581f90(![])),_0x26d19e[_0x12132f(0x3c3)]('listening',()=>{_0x26d19e['close'](),_0x581f90(!![]);}),_0x26d19e['listen'](_0x317e78[_0x12132f(0x5f6)],_0x12132f(0x289));});_0x361e0a(_0x44d1ac,'port\x20'+_0x317e78['port']+'\x20'+(_0x44d1ac?_0x321295(0x4e4):_0x321295(0x596)));const _0x337bfb=_0x8e4ba8[_0x321295(0x300)](_0x321295(0x479));if(_0x2c9780[_0x321295(0x4b2)](_0x337bfb))try{JSON[_0x321295(0x663)](_0x2c9780['readFileSync'](_0x337bfb,_0x321295(0x6f6))[_0x321295(0x18e)](/^\uFEFF/,'')),_0x361e0a(!![],_0x321295(0x70f)+_0x337bfb);}catch(_0x16d534){_0x361e0a(![],_0x321295(0x782)+_0x16d534['message']);}else _0x361e0a(!![],_0x321295(0x743));if(_0x426793()){const _0x4fea87=_0x3f588f(_0x317e78,{'shmbufNative':!![]});_0x361e0a(!![],_0x321295(0x5eb)+_0x4fea87+_0x321295(0x732)+(_0x4fea87===0x1?'':'s')+')');}else _0x361e0a(!![],'cluster:\x20unavailable\x20(shmbuf\x20native\x20missing)\x20—\x20running\x20single-process');if(!_0x44d1ac)try{const _0x2fe266=require(_0x321295(0x392)),_0x1fc286=new _0x2fe266(_0x3e1961,{'engines':![],'processors':![],'compaction':![],'http':![],'auth':{'open':!![]}});await _0x1fc286[_0x321295(0x1bc)]();try{await _0x1fc286['processes'][_0x321295(0x1bc)]({'reader':!![]});const _0x120f86=_0x1fc286['processes']['listNodes'](),_0x1549df=_0x120f86[_0x321295(0x1ff)](_0xfa052f=>_0xfa052f[_0x321295(0x2fc)]!=null)[_0x321295(0x503)];_0x361e0a(!![],_0x321295(0x1ee)+_0x120f86['length']+_0x321295(0x361)+(_0x120f86[_0x321295(0x503)]===0x1?'':'es')+'\x20('+_0x1549df+_0x321295(0x430));}finally{await _0x1fc286[_0x321295(0x543)]();}}catch{}console[_0x321295(0x273)](''),_0x2c46a1?console['log'](_0x321295(0x3c7)):(console[_0x321295(0x273)](_0x321295(0x582)),process[_0x321295(0x393)](0x1));}async function _0x2ca5b7(){const _0x2abf78=_0x5a22a6,_0x38d0c1=_0x8e4ba8[_0x2abf78(0x300)](_0x2abf78(0x479));!_0x2c9780[_0x2abf78(0x4b2)](_0x38d0c1)?(_0x2c9780[_0x2abf78(0x565)](_0x38d0c1,JSON[_0x2abf78(0x72f)]({'port':0x2124,'path':'./okdb-data','logLevel':_0x2abf78(0x77a),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x2abf78(0x273)](_0x2abf78(0x21a))):console[_0x2abf78(0x273)](_0x2abf78(0x21c));const _0x43e124=_0x8e4ba8[_0x2abf78(0x300)]('./okdb-data');!_0x2c9780['existsSync'](_0x43e124)?(_0x2c9780[_0x2abf78(0x76d)](_0x43e124,{'recursive':!![]}),console[_0x2abf78(0x273)](_0x2abf78(0x3d3))):console[_0x2abf78(0x273)](_0x2abf78(0x6f1)),console[_0x2abf78(0x273)](_0x2abf78(0x554));}async function _0x3d9123(_0x2f2cd3){const _0xbad88b=_0x5a22a6,_0x14b22e=_0x8e4ba8['resolve'](_0x2f2cd3[_0xbad88b(0x28e)]);if(!_0x2c9780[_0xbad88b(0x4b2)](_0x14b22e)){console[_0xbad88b(0x273)]('[okdb]\x20nothing\x20to\x20reset\x20—\x20'+_0x14b22e+_0xbad88b(0x2ff));return;}const _0x327a7e=require$$0$2,_0x54f8c2=_0x327a7e[_0xbad88b(0x3fb)]({'input':process[_0xbad88b(0x6b5)],'output':process[_0xbad88b(0x3f5)]}),_0x1ddef4=await new Promise(_0x37a512=>_0x54f8c2[_0xbad88b(0x2d9)](_0xbad88b(0x2df)+_0x14b22e+_0xbad88b(0x23b),_0x37a512));_0x54f8c2['close'](),console[_0xbad88b(0x273)]('');if(_0x1ddef4[_0xbad88b(0x6f3)]()[_0xbad88b(0x4ff)]()!=='yes'){console[_0xbad88b(0x273)](_0xbad88b(0x3b7));return;}let _0x11f116=null;try{_0x11f116=await _0x4f9507(_0x14b22e,_0x2f2cd3,async _0x59be1b=>{const _0x382dbd=_0xbad88b,_0x32fbe1=_0x59be1b[_0x382dbd(0x791)],_0xc8a2ac=_0x32fbe1?.['db']?.[_0x382dbd(0x3e6)](_0x382dbd(0x360))??null,_0x390145=[];if(_0x32fbe1?.['hasType']('~licenses'))for(const {key:_0x25da00,value:_0x577d76}of _0x32fbe1[_0x382dbd(0x73f)]('~licenses')){_0x390145['push']({'key':_0x25da00,'value':_0x577d76});}return{'identity':_0xc8a2ac,'licenses':_0x390145};});}catch(_0x185f02){console[_0xbad88b(0x273)](_0xbad88b(0x54d)+_0x185f02[_0xbad88b(0x1e0)]+_0xbad88b(0x745));}_0x2c9780['rmSync'](_0x14b22e,{'recursive':!![],'force':!![]}),console[_0xbad88b(0x273)](_0xbad88b(0x299)+_0x14b22e+_0xbad88b(0x1ed));if(_0x11f116&&(_0x11f116[_0xbad88b(0x385)]||_0x11f116['licenses'][_0xbad88b(0x503)]>0x0))try{await _0x4f9507(_0x14b22e,_0x2f2cd3,async _0x2fdc9e=>{const _0x53cd4e=_0xbad88b,_0x1fcf42=_0x2fdc9e[_0x53cd4e(0x791)];_0x11f116[_0x53cd4e(0x385)]&&_0x1fcf42['db'][_0x53cd4e(0x6da)](_0x53cd4e(0x360),_0x11f116[_0x53cd4e(0x385)]);if(_0x11f116[_0x53cd4e(0x4f9)][_0x53cd4e(0x503)]>0x0){if(!_0x1fcf42[_0x53cd4e(0x4d9)](_0x53cd4e(0x461)))await _0x1fcf42[_0x53cd4e(0x3d7)](_0x53cd4e(0x461));for(const {key:_0x50ff56,value:_0x480848}of _0x11f116[_0x53cd4e(0x4f9)]){await _0x1fcf42[_0x53cd4e(0x66a)](_0x53cd4e(0x461),_0x50ff56,_0x480848);}}});const _0x328737=[];if(_0x11f116[_0xbad88b(0x385)])_0x328737[_0xbad88b(0x387)](_0xbad88b(0x4a1));if(_0x11f116[_0xbad88b(0x4f9)][_0xbad88b(0x503)]>0x0)_0x328737[_0xbad88b(0x387)](_0x11f116[_0xbad88b(0x4f9)][_0xbad88b(0x503)]+_0xbad88b(0x383));console[_0xbad88b(0x273)](_0xbad88b(0x1b0)+_0x328737[_0xbad88b(0x29f)]('\x20+\x20'));}catch(_0x361f76){console[_0xbad88b(0x273)]('[okdb]\x20warning:\x20failed\x20to\x20restore\x20identity/licenses\x20after\x20reset:\x20'+_0x361f76[_0xbad88b(0x1e0)]);}}async function _0x4f9507(_0x484c5e,_0x58ae19,_0x3c91ec){const _0x3eccc9=_0x5a22a6,_0x56d0a2=require$$5,_0x48a54a=new _0x56d0a2(_0x484c5e,{'admin':![],'mcp':![],'http':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],..._0x13ec0a(_0x58ae19)});await _0x48a54a[_0x3eccc9(0x1bc)]();try{return await _0x3c91ec(_0x48a54a);}finally{await _0x48a54a[_0x3eccc9(0x543)]();}}async function _0x1715fa(_0x5d5b2d,_0x1dd798){const _0x32e0ad=_0x5a22a6,_0x416381=require$$5,_0x53c388=_0x8e4ba8[_0x32e0ad(0x300)](_0x1dd798[_0x32e0ad(0x28e)]);console['log'](_0x32e0ad(0x5c9)+_0x53c388+'…');const _0x4885b7=new _0x416381(_0x53c388,_0x13ec0a(_0x1dd798));await _0x4885b7['open'](),console['log'](_0x32e0ad(0x552)+_0x5d5b2d+'…');const {envs:_0x28af20}=await _0x4885b7['migrate'][_0x32e0ad(0x1c2)](_0x5d5b2d);for(const _0x3940b4 of _0x28af20){const _0x39ef20=_0x3940b4[_0x32e0ad(0x259)]>0x0?'\x20\x20('+(_0x3940b4[_0x32e0ad(0x259)]/0x400/0x400)[_0x32e0ad(0x6cb)](0x2)+_0x32e0ad(0x709)+(_0x3940b4['sizeAfter']/0x400/0x400)['toFixed'](0x2)+_0x32e0ad(0x269):'';console[_0x32e0ad(0x273)]('\x20\x20✓\x20'+_0x3940b4['name']+_0x32e0ad(0x2b4)+_0x3940b4[_0x32e0ad(0x703)]+_0x39ef20);}await _0x4885b7['close'](),console['log'](_0x32e0ad(0x508));}async function _0x4ab435(_0x40ef4c,_0x27abec,_0xf7b246){const _0x2dc7fd=_0x5a22a6,_0x42e741=require$$5,_0x4015a=_0x8e4ba8[_0x2dc7fd(0x300)](_0x27abec['dbPath']),_0x2d844c=_0xf7b246['env']??_0x2dc7fd(0x445),_0x3543d7=_0xf7b246['types']?_0xf7b246[_0x2dc7fd(0x4fc)]['split'](',')[_0x2dc7fd(0x626)](_0x425aa2=>_0x425aa2['trim']()):null;console[_0x2dc7fd(0x273)](_0x2dc7fd(0x5c9)+_0x4015a+'…');const _0x526826=new _0x42e741(_0x4015a,_0x13ec0a(_0x27abec));await _0x526826[_0x2dc7fd(0x1bc)](),console[_0x2dc7fd(0x273)]('[okdb]\x20exporting\x20env\x20\x22'+_0x2d844c+_0x2dc7fd(0x581)+_0x40ef4c+'…');const _0x22ba72=await _0x526826[_0x2dc7fd(0x267)][_0x2dc7fd(0x5e9)](_0x40ef4c,{'envName':_0x2d844c,'types':_0x3543d7,'includeChanges':!!_0xf7b246[_0x2dc7fd(0x4fb)]});console[_0x2dc7fd(0x273)](_0x2dc7fd(0x303)+_0x22ba72['types']+_0x2dc7fd(0x3a7)+_0x22ba72[_0x2dc7fd(0x712)]+_0x2dc7fd(0x309)+_0x22ba72[_0x2dc7fd(0x4fb)]);if(_0xf7b246[_0x2dc7fd(0x6e9)]){const _0x24d97b=_0x8e4ba8[_0x2dc7fd(0x29f)](_0x8e4ba8['dirname'](_0x40ef4c),'blobs');process['stdout'][_0x2dc7fd(0x6cc)]('[okdb]\x20exporting\x20blobs…');const {count:_0x622b3d,bytes:_0x479edb}=await _0x526826['migrate'][_0x2dc7fd(0x27d)](_0x24d97b);console[_0x2dc7fd(0x273)](_0x2dc7fd(0x61c)+_0x24d97b+_0x2dc7fd(0x590)+_0x622b3d+_0x2dc7fd(0x408)+(_0x622b3d!==0x1?'s':'')+',\x20'+(_0x479edb/0x400/0x400)[_0x2dc7fd(0x6cb)](0x2)+_0x2dc7fd(0x269));}await _0x526826[_0x2dc7fd(0x543)](),console[_0x2dc7fd(0x273)](_0x2dc7fd(0x584));}async function _0x4f856f(_0x46a40a,_0x11928b,_0x1255b2){const _0x3ba662=_0x5a22a6,_0x4f2f6d=require$$5,_0x161ece=_0x8e4ba8[_0x3ba662(0x300)](_0x11928b[_0x3ba662(0x28e)]),_0x193dce=_0x1255b2[_0x3ba662(0x758)]??null,_0x1406f9=_0x1255b2[_0x3ba662(0x4fc)]?_0x1255b2['types'][_0x3ba662(0x3d5)](',')[_0x3ba662(0x626)](_0xb1a75e=>_0xb1a75e[_0x3ba662(0x6f3)]()):null,_0x1ba7f3=!!_0x1255b2[_0x3ba662(0x609)];console[_0x3ba662(0x273)](_0x3ba662(0x5c9)+_0x161ece+'…');const _0x25509c=new _0x4f2f6d(_0x161ece,_0x13ec0a(_0x11928b));await _0x25509c['open'](),console[_0x3ba662(0x273)](_0x3ba662(0x726)+_0x46a40a+'…');const _0x4cba22=await _0x25509c['migrate'][_0x3ba662(0x4b7)](_0x46a40a,{'envName':_0x193dce,'types':_0x1406f9,'dropExisting':_0x1ba7f3,'includeChanges':!!_0x1255b2[_0x3ba662(0x4fb)],'onProgress':({type:_0x1233e5,count:_0x1058fd})=>{const _0x2648fc=_0x3ba662;process['stdout'][_0x2648fc(0x6cc)](_0x2648fc(0x677)+_0x1233e5+':\x20'+_0x1058fd+'\x20records…');}});process[_0x3ba662(0x3f5)][_0x3ba662(0x6cc)]('\x0a'),console[_0x3ba662(0x273)](_0x3ba662(0x459)+_0x4cba22[_0x3ba662(0x4fc)]+_0x3ba662(0x3a7)+_0x4cba22[_0x3ba662(0x712)]+_0x3ba662(0x309)+_0x4cba22[_0x3ba662(0x4fb)]);if(_0x1255b2[_0x3ba662(0x6e9)]){const _0x42356d=_0x8e4ba8[_0x3ba662(0x29f)](_0x8e4ba8[_0x3ba662(0x237)](_0x46a40a),_0x3ba662(0x6e9));if(_0x2c9780[_0x3ba662(0x4b2)](_0x42356d)){const {imported:_0x45723a,skipped:_0x81f7fb}=await _0x25509c[_0x3ba662(0x267)][_0x3ba662(0x4b6)](_0x42356d);console[_0x3ba662(0x273)](_0x3ba662(0x2cd)+_0x45723a+_0x3ba662(0x68e)+_0x81f7fb);}}await _0x25509c['close'](),console[_0x3ba662(0x273)](_0x3ba662(0x71d));}async function _0x987941(_0x482b3b,_0x75c413){const _0x51a9b9=_0x5a22a6;_0x75c413[_0x51a9b9(0x298)]&&!_0x75c413[_0x51a9b9(0x378)]&&(console[_0x51a9b9(0x5b7)](_0x51a9b9(0x3d0)),process['exit'](0x1));const _0x1f6bf0=_0x75c413[_0x51a9b9(0x78a)]?_0x75c413[_0x51a9b9(0x78a)]['split'](',')[_0x51a9b9(0x626)](_0x5343d1=>_0x5343d1[_0x51a9b9(0x6f3)]())[_0x51a9b9(0x1ff)](Boolean):[];let _0x5094a9={};if(_0x75c413['grants'])try{_0x5094a9=JSON[_0x51a9b9(0x663)](_0x75c413['grants']);if(typeof _0x5094a9!==_0x51a9b9(0x40d)||Array['isArray'](_0x5094a9)||_0x5094a9===null)throw new Error();}catch{console['error']('[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object'),process[_0x51a9b9(0x393)](0x1);}const _0x1fe5fa=require$$5,{randomToken:_0x273981,hashToken:_0x409fc,hashPassword:_0x3b3ef8}=requireOkdbAuthTokens(),_0x337afb=require$$2,_0xc725e2=_0x8e4ba8[_0x51a9b9(0x300)](_0x482b3b[_0x51a9b9(0x28e)]),_0x1cd125=new _0x1fe5fa(_0xc725e2,_0x13ec0a(_0x482b3b));await _0x1cd125[_0x51a9b9(0x1bc)]();try{await _0x1cd125['auth'][_0x51a9b9(0x1ab)]();if(_0x75c413[_0x51a9b9(0x378)]){const _0x3508ff=await _0x1cd125[_0x51a9b9(0x1c4)][_0x51a9b9(0x23a)](_0x75c413[_0x51a9b9(0x378)]);_0x3508ff&&(console['error']('[okdb]\x20error:\x20token\x20with\x20name\x20\x22'+_0x75c413[_0x51a9b9(0x378)]+_0x51a9b9(0x26c)),process[_0x51a9b9(0x393)](0x1));}const _0x2e561c=_0x273981(0x20),_0x428475=_0x409fc(_0x2e561c),_0x2dd6b3=_0x75c413[_0x51a9b9(0x298)]?await _0x3b3ef8(_0x75c413[_0x51a9b9(0x298)]):null,_0x7cd53c=_0x337afb[_0x51a9b9(0x3ef)](),_0x1d9e15={'tokenHash':_0x428475,'name':_0x75c413[_0x51a9b9(0x378)]||null,'passwordHash':_0x2dd6b3,'label':_0x75c413[_0x51a9b9(0x4c5)]||null,'permissions':_0x1f6bf0,'grants':_0x5094a9,'createdAt':Date[_0x51a9b9(0x6fd)](),'lastUsedAt':null},_0x5b0e8d=_0x75c413[_0x51a9b9(0x741)]?{'ttl':Number(_0x75c413['ttl'])}:undefined;await _0x1cd125[_0x51a9b9(0x791)]['put'](_0x51a9b9(0x70d),_0x7cd53c,_0x1d9e15,_0x5b0e8d),console[_0x51a9b9(0x273)](_0x51a9b9(0x5df)),console[_0x51a9b9(0x273)](_0x51a9b9(0x41c)+_0x7cd53c),console[_0x51a9b9(0x273)](_0x51a9b9(0x646)+(_0x75c413[_0x51a9b9(0x378)]||_0x51a9b9(0x263))),console['log'](_0x51a9b9(0x3c6)+(_0x75c413[_0x51a9b9(0x4c5)]||_0x51a9b9(0x263))),console[_0x51a9b9(0x273)]('\x20\x20\x20\x20permissions:\x20'+(_0x1f6bf0['join'](',\x20')||'(none)')),console['log']('\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a'),console[_0x51a9b9(0x273)](_0x51a9b9(0x583)+_0x2e561c+'\x0a');}finally{await _0x1cd125[_0x51a9b9(0x543)]();}}async function _0x202504(_0x16d48f){const _0x4bfe0d=_0x5a22a6,_0x48bd5c=require$$5,_0x693fae=_0x8e4ba8[_0x4bfe0d(0x300)](_0x16d48f[_0x4bfe0d(0x28e)]),_0x5d0aa6=new _0x48bd5c(_0x693fae,_0x13ec0a(_0x16d48f));await _0x5d0aa6['open']();try{const _0x1daac5=_0x5d0aa6[_0x4bfe0d(0x791)];if(!_0x1daac5||!_0x1daac5[_0x4bfe0d(0x4d9)](_0x4bfe0d(0x70d))){console[_0x4bfe0d(0x273)]('No\x20tokens.');return;}const _0x1f7aa7=[];for(const {key:_0x4805ee,value:_0x4d28bf}of _0x1daac5[_0x4bfe0d(0x73f)]('~tokens')){_0x1f7aa7['push']({'id':_0x4805ee,'name':_0x4d28bf[_0x4bfe0d(0x378)]||_0x4bfe0d(0x263),'label':_0x4d28bf[_0x4bfe0d(0x4c5)]||'(unset)','permissions':Array['isArray'](_0x4d28bf[_0x4bfe0d(0x78a)])?_0x4d28bf['permissions'][_0x4bfe0d(0x29f)](','):'','created':_0x4d28bf['createdAt']?new Date(_0x4d28bf['createdAt'])[_0x4bfe0d(0x2d7)]()['slice'](0x0,0xa):''});}if(_0x1f7aa7['length']===0x0){console[_0x4bfe0d(0x273)]('No\x20tokens.');return;}const _0x2702da=!process[_0x4bfe0d(0x3f5)][_0x4bfe0d(0x3df)]||process[_0x4bfe0d(0x3f5)][_0x4bfe0d(0x3df)]>=0x64,_0x1abb3c=_0x2702da?0x24:0xa,_0x25bd70=['ID'[_0x4bfe0d(0x619)](_0x1abb3c),_0x4bfe0d(0x25a)[_0x4bfe0d(0x619)](0x10),_0x4bfe0d(0x6fb)[_0x4bfe0d(0x619)](0x14),'PERMISSIONS'[_0x4bfe0d(0x619)](0x14),_0x4bfe0d(0x710)]['join']('\x20\x20');console['log']('\x0a'+_0x25bd70),console[_0x4bfe0d(0x273)]('-'[_0x4bfe0d(0x3ba)](_0x25bd70[_0x4bfe0d(0x503)]));for(const _0x172e3a of _0x1f7aa7){const _0x1ae83b=_0x2702da?_0x172e3a['id']:_0x172e3a['id'][_0x4bfe0d(0x5b8)](0x0,0x8)+'…';console[_0x4bfe0d(0x273)]([_0x1ae83b[_0x4bfe0d(0x619)](_0x1abb3c),_0x172e3a[_0x4bfe0d(0x378)][_0x4bfe0d(0x5b8)](0x0,0x10)[_0x4bfe0d(0x619)](0x10),_0x172e3a[_0x4bfe0d(0x4c5)][_0x4bfe0d(0x5b8)](0x0,0x14)[_0x4bfe0d(0x619)](0x14),_0x172e3a[_0x4bfe0d(0x78a)][_0x4bfe0d(0x5b8)](0x0,0x14)['padEnd'](0x14),_0x172e3a[_0x4bfe0d(0x55e)]][_0x4bfe0d(0x29f)]('\x20\x20'));}console[_0x4bfe0d(0x273)]('');}finally{await _0x5d0aa6[_0x4bfe0d(0x543)]();}}async function _0x294de0(_0x41473c,_0x593554){const _0x307c93=_0x5a22a6;!_0x41473c&&(console[_0x307c93(0x5b7)](_0x307c93(0x230)),process['exit'](0x1));const _0x433a7a=require$$5,_0x19e0eb=_0x8e4ba8[_0x307c93(0x300)](_0x593554[_0x307c93(0x28e)]),_0x4fd1bd=new _0x433a7a(_0x19e0eb,_0x13ec0a(_0x593554));await _0x4fd1bd[_0x307c93(0x1bc)]();try{const _0x3beba8=_0x4fd1bd[_0x307c93(0x791)];(!_0x3beba8||!_0x3beba8[_0x307c93(0x4d9)](_0x307c93(0x70d)))&&(console[_0x307c93(0x5b7)](_0x307c93(0x735)+_0x41473c+'\x22'),process['exit'](0x1));let _0x1c404d=null,_0x5092fd=null;const _0x1dc7a4=_0x3beba8[_0x307c93(0x3e6)](_0x307c93(0x70d),_0x41473c);if(_0x1dc7a4)_0x1c404d=_0x41473c,_0x5092fd=_0x1dc7a4;else{const _0x38c9d7=[];for(const {key:_0x2be66d,value:_0x137ca9}of _0x3beba8[_0x307c93(0x73f)]('~tokens')){if(_0x2be66d[_0x307c93(0x637)](_0x41473c))_0x38c9d7['push']({'key':_0x2be66d,'value':_0x137ca9});}_0x38c9d7[_0x307c93(0x503)]===0x0&&(console[_0x307c93(0x5b7)](_0x307c93(0x735)+_0x41473c+'\x22'),process['exit'](0x1));if(_0x38c9d7[_0x307c93(0x503)]>0x1){console['error'](_0x307c93(0x36d)+_0x41473c+'\x22\x20matches\x20'+_0x38c9d7[_0x307c93(0x503)]+_0x307c93(0x307));for(const _0x39ba12 of _0x38c9d7){console['error']('\x20\x20'+_0x39ba12[_0x307c93(0x566)]+_0x307c93(0x357)+(_0x39ba12[_0x307c93(0x481)][_0x307c93(0x378)]||'(unset)')+')');}process[_0x307c93(0x393)](0x1);}_0x1c404d=_0x38c9d7[0x0][_0x307c93(0x566)],_0x5092fd=_0x38c9d7[0x0][_0x307c93(0x481)];}await _0x3beba8[_0x307c93(0x488)](_0x307c93(0x70d),_0x1c404d),console[_0x307c93(0x273)]('\x20\x20✓\x20Revoked\x20token\x20'+_0x1c404d+_0x307c93(0x357)+(_0x5092fd['name']||_0x307c93(0x263))+_0x307c93(0x3d1)+(_0x5092fd['label']||'(unset)')+')');}finally{await _0x4fd1bd[_0x307c93(0x543)]();}}function _0x3432f5(_0x2f9603,_0x2211de){const _0x418c99=_0x5a22a6;if(!_0x2f9603[_0x418c99(0x6c5)])return _0x418c99(0x2f0);const _0x3b9586=_0x2f9603[_0x418c99(0x4f7)];if(!_0x3b9586)return'active';if(_0x2211de>_0x3b9586)return'expired';return _0x418c99(0x569);}function _0x180e58(_0x2ffc76){const _0x2b8e8a=_0x5a22a6;if(!_0x2ffc76||typeof _0x2ffc76!==_0x2b8e8a(0x40d))return'';const _0x22e6f7=Object[_0x2b8e8a(0x62b)](_0x2ffc76)[_0x2b8e8a(0x1ff)](([,_0x266567])=>_0x266567)[_0x2b8e8a(0x626)](([_0x2ce596])=>_0x2ce596);if(_0x22e6f7[_0x2b8e8a(0x503)]===0x0)return _0x2b8e8a(0x466);if(_0x22e6f7[_0x2b8e8a(0x503)]<=0x3)return _0x22e6f7[_0x2b8e8a(0x29f)]('\x20');return _0x22e6f7['slice'](0x0,0x3)[_0x2b8e8a(0x29f)]('\x20')+('\x20+'+(_0x22e6f7[_0x2b8e8a(0x503)]-0x3));}async function _0x4aa96c(_0x3d96ee){const _0x5ac385=_0x5a22a6,_0x12c82a=require$$5,_0x2765a9=requireOkdbLicenseCodec(),{_C:_0xf508d2}=requireOkdbLicense(),_0x36c20b=_0x8e4ba8[_0x5ac385(0x300)](_0x3d96ee['dbPath']),_0x5d5bbc=new _0x12c82a(_0x36c20b,_0x13ec0a(_0x3d96ee));await _0x5d5bbc['open']();try{const _0x1c1e01=_0x5d5bbc[_0x5ac385(0x791)],_0x34c9ec=_0x1c1e01?.['db']?.[_0x5ac385(0x3e6)]?.(_0x5ac385(0x74d))??0x0,_0x3f313a=[..._0x5d5bbc['_envs']['keys']()][_0x5ac385(0x1ff)](_0x36aef6=>!_0x36aef6[_0x5ac385(0x637)]('~'))[_0x5ac385(0x503)],_0x152efd=_0x5d5bbc[_0x5ac385(0x26a)]?.[_0x5ac385(0x236)];if(_0x152efd){const _0x2cbdae=_0x152efd[_0x5ac385(0x3ad)]===!![],_0x1d5f35=_0x2cbdae?'free\x20tier':_0x5d5bbc[_0x5ac385(0x26a)]['active']?.[_0x5ac385(0x67a)]||'licensed';console['log'](''),console[_0x5ac385(0x273)]('\x20\x20Tier:\x20\x20\x20\x20'+_0x1d5f35);const _0x28aa4e=_0x152efd[_0x5ac385(0x3aa)]||{};if(_0x28aa4e[_0x5ac385(0x344)]){const _0x16e999=Math[_0x5ac385(0x6bd)](_0x34c9ec/_0x28aa4e[_0x5ac385(0x344)]*0x64);console[_0x5ac385(0x273)](_0x5ac385(0x69d)+_0x34c9ec[_0x5ac385(0x530)]()+_0x5ac385(0x78d)+_0x28aa4e[_0x5ac385(0x344)][_0x5ac385(0x530)]()+'\x20\x20('+_0x16e999+'%)');}else console[_0x5ac385(0x273)]('\x20\x20Writes:\x20\x20'+_0x34c9ec[_0x5ac385(0x530)]());_0x28aa4e[_0x5ac385(0x364)]?console[_0x5ac385(0x273)]('\x20\x20Envs:\x20\x20\x20\x20'+_0x3f313a+_0x5ac385(0x78d)+_0x28aa4e[_0x5ac385(0x364)]):console[_0x5ac385(0x273)](_0x5ac385(0x3c9)+_0x3f313a),_0xf508d2?.[_0x5ac385(0x6a8)]&&console[_0x5ac385(0x273)](_0x5ac385(0x5be)+_0xf508d2[_0x5ac385(0x6a8)]+_0x5ac385(0x6bc));}if(!_0x1c1e01||!_0x1c1e01[_0x5ac385(0x4d9)](_0x5ac385(0x461))){console['log'](''),console[_0x5ac385(0x273)](_0x5ac385(0x718)),console[_0x5ac385(0x273)]('');return;}const _0x3ff83d=[],_0x27d7a7=Date[_0x5ac385(0x6fd)](),_0x110a94=_0x5d5bbc['id'],_0x1fd221=_0x5ac385(0x6d9);for(const {key:_0x55b844,value:_0x313278}of _0x1c1e01[_0x5ac385(0x73f)](_0x5ac385(0x461))){const _0x2735dd=_0x313278['_licenseHash']?Buffer['from'](_0x313278['_licenseHash'],_0x5ac385(0x767)):Buffer[_0x5ac385(0x715)](0x8);let _0x3bbd82='';try{_0x3bbd82=_0x2765a9[_0x5ac385(0x19c)](_0x110a94,_0x2735dd,_0x1fd221)['pin'];}catch{}_0x3ff83d[_0x5ac385(0x387)]({'id':_0x55b844,'licensee':_0x313278[_0x5ac385(0x67a)]||'','expires':_0x313278[_0x5ac385(0x4f7)]?new Date(_0x313278[_0x5ac385(0x4f7)])[_0x5ac385(0x2d7)]()[_0x5ac385(0x5b8)](0x0,0xa):'','features':_0x180e58(_0x313278[_0x5ac385(0x2e2)]),'pin':_0x3bbd82,'status':_0x3432f5(_0x313278,_0x27d7a7)});}if(_0x3ff83d[_0x5ac385(0x503)]===0x0){console[_0x5ac385(0x273)](''),console[_0x5ac385(0x273)]('\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.'),console['log']('');return;}const _0x2245f4=['\x20\x20'+'ID'[_0x5ac385(0x619)](0xe),'LICENSEE'[_0x5ac385(0x619)](0xe),'EXPIRES'[_0x5ac385(0x619)](0xc),'FEATURES'[_0x5ac385(0x619)](0x1e),_0x5ac385(0x74c)[_0x5ac385(0x619)](0xa),'STATUS'][_0x5ac385(0x29f)]('\x20');console[_0x5ac385(0x273)]('\x0a'+_0x2245f4);for(const _0x15ca26 of _0x3ff83d){const _0x2c16e9=_0x15ca26['id'][_0x5ac385(0x5b8)](0x0,0x8)+'\u2026';console[_0x5ac385(0x273)](['\x20\x20'+_0x2c16e9[_0x5ac385(0x619)](0xe),_0x15ca26[_0x5ac385(0x67a)][_0x5ac385(0x5b8)](0x0,0xe)[_0x5ac385(0x619)](0xe),_0x15ca26[_0x5ac385(0x4a6)]['padEnd'](0xc),_0x15ca26[_0x5ac385(0x2e2)][_0x5ac385(0x5b8)](0x0,0x1e)[_0x5ac385(0x619)](0x1e),_0x15ca26['pin'][_0x5ac385(0x619)](0xa),_0x15ca26[_0x5ac385(0x7a3)]][_0x5ac385(0x29f)]('\x20'));}console['log']('');}finally{await _0x5d5bbc[_0x5ac385(0x543)]();}}async function _0x1eb9cc(_0x5f2cc5,_0x47931f){const _0x100144=_0x5a22a6,_0x51491c=require$$5,_0x49416f=requireOkdbLicenseCodec();let _0x2eac68=_0x5f2cc5;(_0x49416f[_0x100144(0x4ab)](_0x5f2cc5)==='path'||_0x2c9780['existsSync'](_0x5f2cc5)&&_0x2c9780['statSync'](_0x5f2cc5)['isFile']())&&(_0x2eac68=_0x2c9780[_0x100144(0x2a8)](_0x5f2cc5,_0x100144(0x6f6))[_0x100144(0x6f3)]());const _0x403472=_0x8e4ba8[_0x100144(0x300)](_0x47931f[_0x100144(0x28e)]),_0x3c7d41=new _0x51491c(_0x403472,_0x13ec0a(_0x47931f));await _0x3c7d41['open']();try{let _0x573bef;try{_0x573bef=await _0x3c7d41['licenses']['add']({'blob':_0x2eac68});}catch(_0x460390){console[_0x100144(0x5b7)]('[okdb]\x20error:\x20'+_0x460390[_0x100144(0x1e0)]),process[_0x100144(0x393)](0x1);}const _0x46232b=_0x573bef['pin']||'',_0x138a89=Object['entries'](_0x573bef['features']||{})[_0x100144(0x1ff)](([,_0x231852])=>_0x231852)[_0x100144(0x626)](([_0x2e7915])=>_0x2e7915),_0x318c03=_0x573bef[_0x100144(0x3aa)]||{},_0x124ffb=[_0x318c03[_0x100144(0x364)]?_0x100144(0x2d0)+_0x318c03['envs']:null,_0x318c03['typesPerEnv']?'types/env='+_0x318c03[_0x100144(0x200)]:null,_0x318c03[_0x100144(0x313)]?_0x100144(0x5ee)+_0x318c03[_0x100144(0x313)]:null,_0x318c03['maxWrites']?_0x100144(0x632)+_0x318c03[_0x100144(0x344)][_0x100144(0x530)]():null][_0x100144(0x1ff)](Boolean)[_0x100144(0x29f)]('\x20\x20'),_0x22a1b0=_0x573bef['type']!=='standard';console[_0x100144(0x273)](_0x573bef[_0x100144(0x63c)]?_0x100144(0x73c):_0x100144(0x495)),console[_0x100144(0x273)](_0x100144(0x207)+_0x573bef['id']),console[_0x100144(0x273)](_0x100144(0x415)+_0x573bef['licensee']),console[_0x100144(0x273)]('\x20\x20\x20\x20expires:\x20\x20\x20'+(_0x573bef[_0x100144(0x4f7)]?new Date(_0x573bef[_0x100144(0x4f7)])['toISOString']()[_0x100144(0x5b8)](0x0,0xa):'never')),console['log']('\x20\x20\x20\x20features:\x20\x20'+(_0x138a89['join'](',\x20')||'(none)'));if(_0x124ffb)console[_0x100144(0x273)](_0x100144(0x55d)+_0x124ffb);if(_0x22a1b0)console[_0x100144(0x273)](_0x100144(0x730)+_0x573bef['type']+_0x100144(0x622)),console['log']('');else!_0x573bef['needsActivation']?(console[_0x100144(0x273)](_0x100144(0x2a6)+_0x573bef[_0x100144(0x7a3)]),console[_0x100144(0x273)]('')):(console[_0x100144(0x273)](_0x100144(0x616)+_0x46232b),console['log'](_0x100144(0x5ae)),console[_0x100144(0x273)](''),console[_0x100144(0x273)]('\x20\x20Next\x20step\x20\u2014\x20activate\x20the\x20license:'),console[_0x100144(0x273)]('\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20('+_0x46232b+_0x100144(0x225)),console[_0x100144(0x273)](_0x100144(0x210)),console[_0x100144(0x273)](_0x100144(0x25b)),console[_0x100144(0x273)](''));}finally{await _0x3c7d41['close']();}}async function _0x3aad41(_0x5ecc33,_0x27bdec){const _0x5c5ebd=_0x5a22a6,_0x5cad2b=require$$5,_0x3e263c=_0x8e4ba8[_0x5c5ebd(0x300)](_0x27bdec['dbPath']),_0x7a8eb1=new _0x5cad2b(_0x3e263c,_0x13ec0a(_0x27bdec));await _0x7a8eb1['open']();try{let _0xb7c184;try{_0xb7c184=await _0x7a8eb1[_0x5c5ebd(0x4f9)]['activate'](_0x5ecc33);}catch(_0x303827){console['error'](_0x5c5ebd(0x31a)+_0x303827[_0x5c5ebd(0x1e0)]),console[_0x5c5ebd(0x5b7)](''),console['error'](_0x5c5ebd(0x669)),console[_0x5c5ebd(0x5b7)](_0x5c5ebd(0x22f)),console[_0x5c5ebd(0x5b7)](_0x5c5ebd(0x6b2)),console[_0x5c5ebd(0x5b7)](_0x5c5ebd(0x702)),console[_0x5c5ebd(0x5b7)](''),process['exit'](0x1);}console[_0x5c5ebd(0x273)](_0x5c5ebd(0x75f)),console['log']('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0xb7c184['id']),console[_0x5c5ebd(0x273)](_0x5c5ebd(0x415)+_0xb7c184[_0x5c5ebd(0x67a)]),console[_0x5c5ebd(0x273)](_0x5c5ebd(0x223)+(_0xb7c184[_0x5c5ebd(0x4f7)]?new Date(_0xb7c184['expiresAt'])['toISOString']()[_0x5c5ebd(0x5b8)](0x0,0xa):_0x5c5ebd(0x2c8))),console[_0x5c5ebd(0x273)](_0x5c5ebd(0x6a5)),console[_0x5c5ebd(0x273)]('');}finally{await _0x7a8eb1[_0x5c5ebd(0x543)]();}}async function _0x287077(_0x2aff0d,_0x24c72e){const _0x1bb487=_0x5a22a6;!_0x2aff0d&&(console['error'](_0x1bb487(0x19f)),process[_0x1bb487(0x393)](0x1));const _0x5f23b2=require$$5,_0x214f12=requireOkdbLicenseCodec(),_0x19c929=_0x8e4ba8[_0x1bb487(0x300)](_0x24c72e[_0x1bb487(0x28e)]),_0x59ab9f=new _0x5f23b2(_0x19c929,_0x13ec0a(_0x24c72e));await _0x59ab9f[_0x1bb487(0x1bc)]();try{const _0x1dcaeb=_0x59ab9f[_0x1bb487(0x791)];(!_0x1dcaeb||!_0x1dcaeb[_0x1bb487(0x4d9)]('~licenses'))&&(console[_0x1bb487(0x5b7)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x2aff0d+'\x22'),process[_0x1bb487(0x393)](0x1));let _0x2e54d7=null,_0x4f3d33=null;const _0x2274c8=_0x1dcaeb['get'](_0x1bb487(0x461),_0x2aff0d);if(_0x2274c8)_0x2e54d7=_0x2aff0d,_0x4f3d33=_0x2274c8;else{const _0x138c83=[];for(const {key:_0x21292b,value:_0x4d7324}of _0x1dcaeb[_0x1bb487(0x73f)]('~licenses')){if(_0x21292b[_0x1bb487(0x637)](_0x2aff0d))_0x138c83[_0x1bb487(0x387)]({'key':_0x21292b,'value':_0x4d7324});}_0x138c83[_0x1bb487(0x503)]===0x0&&(console['error']('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x2aff0d+'\x22'),process[_0x1bb487(0x393)](0x1)),_0x138c83['length']>0x1&&(console[_0x1bb487(0x5b7)](_0x1bb487(0x36d)+_0x2aff0d+'\x22\x20matches\x20'+_0x138c83[_0x1bb487(0x503)]+_0x1bb487(0x523)),process[_0x1bb487(0x393)](0x1)),_0x2e54d7=_0x138c83[0x0]['key'],_0x4f3d33=_0x138c83[0x0][_0x1bb487(0x481)];}const _0x241fa4=Date[_0x1bb487(0x6fd)](),_0x276813=_0x3432f5(_0x4f3d33,_0x241fa4),_0x4d0368=_0x59ab9f['id'],_0x15f4c3=_0x1bb487(0x6d9);let _0x242309='';try{const _0x55274d=Buffer[_0x1bb487(0x2f3)](_0x4f3d33[_0x1bb487(0x3a4)],_0x1bb487(0x767));_0x242309=_0x214f12[_0x1bb487(0x19c)](_0x4d0368,_0x55274d,_0x15f4c3)[_0x1bb487(0x478)];}catch{}const _0x24477b=_0x4f3d33[_0x1bb487(0x2e2)]?Object[_0x1bb487(0x62b)](_0x4f3d33['features'])[_0x1bb487(0x1ff)](([,_0x836989])=>_0x836989)[_0x1bb487(0x626)](([_0x4b3dcb])=>_0x4b3dcb):[],_0x41a460=_0x4f3d33[_0x1bb487(0x3aa)]||{},_0x235802=_0x1dcaeb?.['db']?.[_0x1bb487(0x3e6)]?.(_0x1bb487(0x74d))??0x0,_0x22c241=[..._0x59ab9f['_envs']['keys']()][_0x1bb487(0x1ff)](_0x1764cc=>!_0x1764cc[_0x1bb487(0x637)]('~'))[_0x1bb487(0x503)];console[_0x1bb487(0x273)](_0x1bb487(0x18b)),console[_0x1bb487(0x273)](_0x1bb487(0x207)+_0x2e54d7),console[_0x1bb487(0x273)](_0x1bb487(0x415)+(_0x4f3d33[_0x1bb487(0x67a)]||'')),console['log'](_0x1bb487(0x223)+(_0x4f3d33['expiresAt']?new Date(_0x4f3d33[_0x1bb487(0x4f7)])[_0x1bb487(0x2d7)]()[_0x1bb487(0x5b8)](0x0,0xa):'')),console['log'](_0x1bb487(0x645)+(_0x24477b[_0x1bb487(0x29f)](',\x20')||_0x1bb487(0x466))),console[_0x1bb487(0x273)](_0x1bb487(0x616)+_0x242309),console['log'](_0x1bb487(0x2a6)+_0x276813),console[_0x1bb487(0x273)](_0x1bb487(0x792)+new Date(_0x4f3d33[_0x1bb487(0x4c4)])[_0x1bb487(0x2d7)]());if(_0x276813===_0x1bb487(0x569)){console['log'](''),console[_0x1bb487(0x273)](_0x1bb487(0x460));if(_0x41a460[_0x1bb487(0x344)]){const _0x23f97a=Math[_0x1bb487(0x6bd)](_0x235802/_0x41a460[_0x1bb487(0x344)]*0x64);console[_0x1bb487(0x273)](_0x1bb487(0x692)+_0x235802[_0x1bb487(0x530)]()+_0x1bb487(0x78d)+_0x41a460['maxWrites'][_0x1bb487(0x530)]()+_0x1bb487(0x590)+_0x23f97a+'%)');}else console[_0x1bb487(0x273)](_0x1bb487(0x692)+_0x235802[_0x1bb487(0x530)]()+'\x20\x20(unlimited)');_0x41a460[_0x1bb487(0x364)]?console[_0x1bb487(0x273)](_0x1bb487(0x43e)+_0x22c241+_0x1bb487(0x78d)+_0x41a460[_0x1bb487(0x364)]):console[_0x1bb487(0x273)](_0x1bb487(0x43e)+_0x22c241+_0x1bb487(0x6e0));}console[_0x1bb487(0x273)]('');}finally{await _0x59ab9f[_0x1bb487(0x543)]();}}async function _0x167be8(_0x1dec7d,_0x1575f0){const _0x44ddff=_0x5a22a6;!_0x1dec7d&&(console[_0x44ddff(0x5b7)](_0x44ddff(0x4bb)),process['exit'](0x1));const _0x9925e4=require$$5,_0x2e5e1f=_0x8e4ba8[_0x44ddff(0x300)](_0x1575f0[_0x44ddff(0x28e)]),_0x55e82e=new _0x9925e4(_0x2e5e1f,_0x13ec0a(_0x1575f0));await _0x55e82e['open']();try{const _0x1ef46b=_0x55e82e[_0x44ddff(0x791)];(!_0x1ef46b||!_0x1ef46b[_0x44ddff(0x4d9)](_0x44ddff(0x461)))&&(console[_0x44ddff(0x5b7)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x1dec7d+'\x22'),process['exit'](0x1));let _0x545525=null,_0x101918=null;const _0x42a5ef=_0x1ef46b[_0x44ddff(0x3e6)](_0x44ddff(0x461),_0x1dec7d);if(_0x42a5ef)_0x545525=_0x1dec7d,_0x101918=_0x42a5ef;else{const _0x51a9d8=[];for(const {key:_0x340b23,value:_0x27533b}of _0x1ef46b['getRange'](_0x44ddff(0x461))){if(_0x340b23['startsWith'](_0x1dec7d))_0x51a9d8[_0x44ddff(0x387)]({'key':_0x340b23,'value':_0x27533b});}_0x51a9d8[_0x44ddff(0x503)]===0x0&&(console[_0x44ddff(0x5b7)](_0x44ddff(0x2db)+_0x1dec7d+'\x22'),process[_0x44ddff(0x393)](0x1)),_0x51a9d8[_0x44ddff(0x503)]>0x1&&(console['error'](_0x44ddff(0x36d)+_0x1dec7d+_0x44ddff(0x1f7)+_0x51a9d8[_0x44ddff(0x503)]+_0x44ddff(0x523)),process[_0x44ddff(0x393)](0x1)),_0x545525=_0x51a9d8[0x0]['key'],_0x101918=_0x51a9d8[0x0]['value'];}await _0x1ef46b[_0x44ddff(0x488)](_0x44ddff(0x461),_0x545525),console['log'](_0x44ddff(0x706)+_0x545525+'\x20\x20(licensee:\x20'+(_0x101918[_0x44ddff(0x67a)]||_0x44ddff(0x263))+')');}finally{await _0x55e82e[_0x44ddff(0x543)]();}}async function _0x86c751(_0x3658d5,_0x5d20d8,_0x460e86){const _0xec44f1=_0x5a22a6;!_0x3658d5&&(console[_0xec44f1(0x5b7)]('[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>'),process[_0xec44f1(0x393)](0x1));!_0x460e86[_0xec44f1(0x4ca)]&&!(_0x460e86[_0xec44f1(0x376)]&&_0x460e86[_0xec44f1(0x298)])&&(console[_0xec44f1(0x5b7)](_0xec44f1(0x6b8)),process[_0xec44f1(0x393)](0x1));const _0x257a5e=_0x460e86['selfAddress']||_0x5d20d8['sync']?.[_0xec44f1(0x52a)];!_0x257a5e&&(console[_0xec44f1(0x5b7)](_0xec44f1(0x432)+_0xec44f1(0x766)+_0xec44f1(0x4bd)),process[_0xec44f1(0x393)](0x1));const _0x2fde69=require$$5,_0xbed865=new _0x2fde69(_0x5d20d8[_0xec44f1(0x28e)],{'sync':{'address':_0x257a5e,'auto_reconcile':![]}});await _0xbed865[_0xec44f1(0x1bc)]();try{const _0x3c9d66=_0xbed865[_0xec44f1(0x791)];if(_0x3c9d66&&_0x3c9d66[_0xec44f1(0x4d9)](_0xec44f1(0x70d))){let _0x2e0d11=![];for(const _0x5e298b of _0x3c9d66[_0xec44f1(0x73f)](_0xec44f1(0x70d))){_0x2e0d11=!![];break;}_0x2e0d11&&console[_0xec44f1(0x273)](_0xec44f1(0x1aa)+'\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.');}console[_0xec44f1(0x273)](_0xec44f1(0x1b1)+_0x3658d5+'…'),await _0xbed865[_0xec44f1(0x317)][_0xec44f1(0x29f)](_0x3658d5[_0xec44f1(0x18e)](/\/+$/,''),{'token':_0x460e86['token'],'username':_0x460e86[_0xec44f1(0x376)],'password':_0x460e86['password']}),console['log'](_0xec44f1(0x6a9)),console[_0xec44f1(0x273)](_0xec44f1(0x449));}finally{await _0xbed865[_0xec44f1(0x543)]();}}async function _0x49634e(){const _0x40bc18=_0x5a22a6,_0x24e901=Date[_0x40bc18(0x6fd)](),_0x3abac3=_0x1b8588(process[_0x40bc18(0x749)]),_0x2c0570=_0x14062f(_0x3abac3),_0x17af1a=_0x8e4ba8[_0x40bc18(0x300)](_0x2c0570['dbPath']);!_0x2c0570[_0x40bc18(0x674)]&&!process[_0x40bc18(0x6b5)][_0x40bc18(0x53f)]&&(_0x2c0570[_0x40bc18(0x674)]=!![]);const _0x411f9d=require$$5,{start:_0x24935b,colorLog:_0x5552c7}=requireOkdbShell(),_0x234992=require$$1$2,_0x5f355f={..._0x2c0570[_0x40bc18(0x566)]?{'encryptionKey':_0x2c0570[_0x40bc18(0x566)]}:{},..._0x2c0570[_0x40bc18(0x6b6)]?{'admin':![]}:_0x5e0778(_0x2c0570[_0x40bc18(0x4f4)])?{'admin':_0x2c0570['admin']}:{},..._0x5e0778(_0x2c0570[_0x40bc18(0x24f)])?{'api':_0x2c0570['api']}:{},..._0x5e0778(_0x2c0570['auth'])?{'auth':_0x2c0570[_0x40bc18(0x1c4)]}:{},..._0x5e0778(_0x2c0570[_0x40bc18(0x79a)])?{'mcp':_0x2c0570['mcp']}:{},..._0x2c0570['timeMachine']!==![]?{'timeMachine':_0x2c0570[_0x40bc18(0x244)]}:{},...Object[_0x40bc18(0x6fe)](_0x5e827f['filter'](_0x21d5ae=>_0x2c0570[_0x21d5ae]!==undefined)['map'](_0x4b44bf=>[_0x4b44bf,_0x2c0570[_0x4b44bf]]))},_0x5ca2f2=_0x3f588f(_0x2c0570);if(!_0x234992[_0x40bc18(0x698)]){const _0x2b41bc=_0x426793(),_0x13fdaa=_0x2c0570['noCluster']?_0x40bc18(0x1e8):_0x2c0570[_0x40bc18(0x5cb)]!=null&&_0x2c0570[_0x40bc18(0x5cb)]!==''?_0x40bc18(0x3b2):process.env.OKDB_HTTP_WORKERS?_0x40bc18(0x2a7):_0x2c0570['http']?.[_0x40bc18(0x5f3)]!=null?_0x40bc18(0x6d2):_0x40bc18(0x21f)+Math['max'](0x1,require$$0[_0x40bc18(0x573)]()[_0x40bc18(0x503)]-0x1);process[_0x40bc18(0x3f5)]['write'](_0x40bc18(0x4b8)+_0x5ca2f2+'\x20('+_0x13fdaa+(!_0x2b41bc?_0x40bc18(0x450):'')+')\x0a');}if(_0x234992[_0x40bc18(0x698)]){const _0x41cfa3={..._0x5f355f},_0x4c4ff5=new _0x411f9d(_0x17af1a,_0x41cfa3);_0x4c4ff5['log'][_0x40bc18(0x235)]?.();const _0x47e50e=process.env.OKDB_CLUSTER_SLOT??'?',_0x120b10={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x1e8687=_0x120b10[_0x2c0570[_0x40bc18(0x6d3)]]??_0x120b10[_0x40bc18(0x77a)];_0x4c4ff5[_0x40bc18(0x273)]['attach'](_0x485ce7=>{const _0x257e2f=_0x40bc18;if((_0x120b10[_0x485ce7[_0x257e2f(0x3f4)]]??0x1)<_0x1e8687)return;try{process[_0x257e2f(0x2bc)]?.({'__okdbCluster':_0x257e2f(0x273),'slot':_0x47e50e,'pid':process[_0x257e2f(0x789)],'entry':_0x485ce7});}catch{}}),await _0x4c4ff5[_0x40bc18(0x1bc)]();const {attachWorkerCluster:_0x37ad4f}=requireOkdbCluster();_0x37ad4f(_0x4c4ff5),await _0x4dc6fd(_0x4c4ff5,_0x2c0570['port'],_0x1a2551(_0x2c0570));return;}if(_0x5ca2f2>0x1){const {runClustered:_0xf38ed9}=requireOkdbCluster(),_0x1225e5=new _0x411f9d(_0x17af1a,{..._0x5f355f,'engines':![],'processors':![],'compaction':![]});await _0x1225e5[_0x40bc18(0x1bc)]();const _0x5d1bf7=async()=>{const _0x2a7e32=_0x40bc18,_0x473c1c=new _0x411f9d(_0x17af1a,{..._0x5f355f});return await _0x473c1c[_0x2a7e32(0x1bc)](),_0x473c1c;},_0x3e5a3f=Object[_0x40bc18(0x6fe)](_0x5e827f['map'](_0x1b97e5=>[_0x1b97e5,_0x5f355f[_0x1b97e5]??!![]])),{formatListenAddr:_0x2bd406}=requireOkdbHttp(),_0x349b46=_0x2bd406(_0x2c0570['port'],_0x2c0570[_0x40bc18(0x635)]?.[_0x40bc18(0x76f)]),_0x1a4ea4=_0xf38ed9({'workers':_0x5ca2f2,'makeOkdb':_0x5d1bf7,'port':_0x2c0570[_0x40bc18(0x5f6)],'primaryOkdb':_0x1225e5,'workerRole':_0x3e5a3f,'listenAddr':_0x349b46});let _0x3c165f=![];async function _0x20100e(_0x1a8010){const _0x270028=_0x40bc18;_0x3c165f&&(process[_0x270028(0x556)][_0x270028(0x6cc)]('\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a'),process[_0x270028(0x393)](0x82));_0x3c165f=!![],process['stderr']['write']('\x0a[okdb]\x20received\x20'+(_0x1a8010||'shutdown')+_0x270028(0x1af));const _0x47024c=setTimeout(()=>{const _0x1cd08c=_0x270028;process[_0x1cd08c(0x556)]['write'](_0x1cd08c(0x446)),process[_0x1cd08c(0x393)](0x0);},0xbb8);_0x47024c[_0x270028(0x442)]?.();try{await _0x1a4ea4['close']();}catch(_0x1e8453){process[_0x270028(0x556)]['write'](_0x270028(0x6ec)+(_0x1e8453?.[_0x270028(0x1e0)]??_0x1e8453)+'\x0a');}try{await _0x1225e5[_0x270028(0x543)]();}catch(_0x94791e){process[_0x270028(0x556)]['write'](_0x270028(0x768)+(_0x94791e?.[_0x270028(0x1e0)]??_0x94791e)+'\x0a');}process[_0x270028(0x393)](0x0);}_0x2c0570[_0x40bc18(0x598)]=_0x5ca2f2;if(!_0x2c0570[_0x40bc18(0x674)]){_0x1225e5[_0x40bc18(0x273)][_0x40bc18(0x235)]?.(),_0x4bc1a7(_0x1225e5[_0x40bc18(0x1c4)]?.['getSecurityNotices']?.()??[]),await _0x24935b(_0x1225e5,_0x2c0570);return;}process[_0x40bc18(0x3f5)][_0x40bc18(0x6cc)](_0x40bc18(0x375)+process[_0x40bc18(0x789)]+_0x40bc18(0x388)+_0x5ca2f2+'\x20'+(_0x40bc18(0x1b5)+_0x2c0570[_0x40bc18(0x5f6)]+'\x0a')),console[_0x40bc18(0x273)](''),console[_0x40bc18(0x273)]('\x20\x20✓\x20OKDB\x20cluster\x20running'),console[_0x40bc18(0x273)](_0x40bc18(0x37e)+_0x2c0570[_0x40bc18(0x5f6)]+_0x40bc18(0x590)+_0x5ca2f2+_0x40bc18(0x585)),console['log']('\x20\x20\x20\x20path:\x20\x20\x20\x20'+_0x17af1a),console[_0x40bc18(0x273)](_0x40bc18(0x26f)+_0x1225e5['id']),console[_0x40bc18(0x273)](_0x40bc18(0x1a2)+_0x2c0570[_0x40bc18(0x5f6)]+'/api');!_0x2c0570[_0x40bc18(0x6b6)]&&console[_0x40bc18(0x273)](_0x40bc18(0x2c5)+_0x2c0570[_0x40bc18(0x5f6)]+_0x40bc18(0x7a5));console[_0x40bc18(0x273)](''),_0x4bc1a7(_0x1225e5[_0x40bc18(0x1c4)]?.[_0x40bc18(0x60d)]?.()??[]),process['on']('SIGINT',()=>_0x20100e(_0x40bc18(0x6e5))),process['on'](_0x40bc18(0x5f8),()=>_0x20100e(_0x40bc18(0x5f8))),process['on'](_0x40bc18(0x4bc),()=>_0x20100e('SIGBREAK'));return;}const _0xcf2a2e=new _0x411f9d(_0x17af1a,_0x5f355f);_0xcf2a2e['log'][_0x40bc18(0x235)]?.();const _0x6ca586=_0xcf2a2e['log'][_0x40bc18(0x292)](_0x5e0a36=>_0x5552c7(_0x5e0a36,_0x2c0570[_0x40bc18(0x6d3)]));if(_0x2c0570['noRepl'])process['stdout'][_0x40bc18(0x6cc)](_0x40bc18(0x64e));await _0xcf2a2e[_0x40bc18(0x1bc)]();if(_0x2c0570[_0x40bc18(0x674)])process['stdout'][_0x40bc18(0x6cc)]('\x20\x20✓\x20database\x20opened\x0a');try{await _0x4dc6fd(_0xcf2a2e,_0x2c0570[_0x40bc18(0x5f6)],_0x1a2551(_0x2c0570));}catch(_0x5373e8){_0x5373e8[_0x40bc18(0x2a0)]==='EADDRINUSE'&&(console['error']('[okdb]\x20port\x20'+_0x2c0570['port']+_0x40bc18(0x290)),process['exit'](0x1));throw _0x5373e8;}if(_0x2c0570['noRepl']){const _0x59db21=_0x2c0570[_0x40bc18(0x635)]?.[_0x40bc18(0x76f)]!==undefined?[][_0x40bc18(0x549)](_0x2c0570['http'][_0x40bc18(0x76f)])[_0x40bc18(0x29f)](',\x20')+'\x20':'';process[_0x40bc18(0x3f5)]['write'](_0x40bc18(0x21d)+_0x59db21+':'+_0x2c0570[_0x40bc18(0x5f6)]+'\x0a');}if(!_0x2c0570[_0x40bc18(0x674)])_0xcf2a2e[_0x40bc18(0x273)][_0x40bc18(0x235)]?.(),_0x6ca586?.(),_0x4bc1a7(_0xcf2a2e[_0x40bc18(0x1c4)]?.[_0x40bc18(0x60d)]?.()??[]),await _0x24935b(_0xcf2a2e,_0x2c0570);else{const _0x4f16dc=_0x8e4ba8[_0x40bc18(0x29f)](_0x17af1a,'okdb.pid');try{_0x2c9780[_0x40bc18(0x565)](_0x4f16dc,String(process['pid']));}catch{}const _0x5d3b5c=Date['now']()-_0x24e901;console[_0x40bc18(0x273)](''),console[_0x40bc18(0x273)]('\x20\x20✓\x20OKDB\x20server\x20running'),console[_0x40bc18(0x273)]('\x20\x20\x20\x20port:\x20\x20'+_0x2c0570[_0x40bc18(0x5f6)]),console[_0x40bc18(0x273)](_0x40bc18(0x301)+_0x17af1a),console[_0x40bc18(0x273)]('\x20\x20\x20\x20id:\x20\x20\x20\x20'+_0xcf2a2e['id']);{const _0x4875cc=_0xcf2a2e[_0x40bc18(0x791)]?.['db']?.['get']?.(_0x40bc18(0x74d))??0x0,_0x3c85c0=[..._0xcf2a2e[_0x40bc18(0x6ca)][_0x40bc18(0x2ac)]()][_0x40bc18(0x1ff)](_0x2bae09=>!_0x2bae09[_0x40bc18(0x637)]('~'))[_0x40bc18(0x503)];if(_0xcf2a2e[_0x40bc18(0x26a)]?.[_0x40bc18(0x569)]?.[_0x40bc18(0x6ba)]===0x1){const _0x1d7ce3=Math[_0x40bc18(0x752)]((_0xcf2a2e[_0x40bc18(0x26a)][_0x40bc18(0x569)][_0x40bc18(0x4f7)]-Date['now']())/0x5265c00);console[_0x40bc18(0x273)](_0x40bc18(0x5dc)+_0xcf2a2e['_license']['active']['licensee']+_0x40bc18(0x6dc)+_0x1d7ce3+'\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)');}else{if(_0xcf2a2e[_0x40bc18(0x26a)]?.[_0x40bc18(0x569)]){const _0x37118d=_0xcf2a2e[_0x40bc18(0x26a)][_0x40bc18(0x569)];console[_0x40bc18(0x273)]('\x20\x20\x20\x20license:\x20'+_0x37118d[_0x40bc18(0x67a)]+'\x20(expires\x20'+new Date(_0x37118d['expiresAt'])['toISOString']()[_0x40bc18(0x5b8)](0x0,0xa)+')');const _0x5a6de9=_0x37118d[_0x40bc18(0x3aa)]||{};if(_0x5a6de9[_0x40bc18(0x344)]){const _0x241dcd=Math['round'](_0x4875cc/_0x5a6de9['maxWrites']*0x64);console['log']('\x20\x20\x20\x20usage:\x20\x20\x20'+_0x4875cc[_0x40bc18(0x530)]()+_0x40bc18(0x78d)+_0x5a6de9[_0x40bc18(0x344)][_0x40bc18(0x530)]()+_0x40bc18(0x588)+_0x241dcd+_0x40bc18(0x69a)+_0x3c85c0+(_0x5a6de9[_0x40bc18(0x364)]?'/'+_0x5a6de9['envs']:'')+'\x20env'+(_0x3c85c0===0x1?'':'s'));}}else{if(_0xcf2a2e['_license']){const _0x1939ae=_0xcf2a2e[_0x40bc18(0x26a)][_0x40bc18(0x671)](),_0x4ca417=_0x1939ae['length']?_0x1939ae[_0x40bc18(0x626)](_0x58471d=>_0x58471d[_0x40bc18(0x478)])[_0x40bc18(0x29f)](',\x20'):'(add\x20a\x20license\x20first)',_0x5522a9=_0xcf2a2e[_0x40bc18(0x26a)][_0x40bc18(0x236)],_0x44baf7=_0x5522a9[_0x40bc18(0x3aa)][_0x40bc18(0x344)]?Math[_0x40bc18(0x6bd)](_0x4875cc/_0x5522a9[_0x40bc18(0x3aa)][_0x40bc18(0x344)]*0x64):0x0;console[_0x40bc18(0x273)](_0x40bc18(0x725)),console['log']('\x20\x20\x20\x20usage:\x20\x20\x20'+_0x4875cc[_0x40bc18(0x530)]()+_0x40bc18(0x78d)+_0x5522a9[_0x40bc18(0x3aa)]['maxWrites']['toLocaleString']()+_0x40bc18(0x588)+_0x44baf7+_0x40bc18(0x69a)+_0x3c85c0+'\x20/\x20'+_0x5522a9[_0x40bc18(0x3aa)][_0x40bc18(0x364)]+_0x40bc18(0x402)),console[_0x40bc18(0x273)](_0x40bc18(0x51d)+_0x4ca417);}}}}console[_0x40bc18(0x273)](_0x40bc18(0x5ca)+_0x2c0570[_0x40bc18(0x5f6)]+_0x40bc18(0x5fc));!_0x2c0570[_0x40bc18(0x6b6)]&&console['log'](_0x40bc18(0x213)+_0x2c0570[_0x40bc18(0x5f6)]+_0x40bc18(0x7a5));console[_0x40bc18(0x273)](''),console[_0x40bc18(0x273)]('[okdb]\x20started\x20in\x20'+_0x5d3b5c+'ms'),_0x4bc1a7(_0xcf2a2e[_0x40bc18(0x1c4)]?.['getSecurityNotices']?.()??[]);let _0x377403=![];async function _0x82198e(_0x569870){const _0x4607ff=_0x40bc18;_0x377403&&(process['stderr'][_0x4607ff(0x6cc)]('\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a'),process[_0x4607ff(0x393)](0x82));_0x377403=!![],process[_0x4607ff(0x556)][_0x4607ff(0x6cc)]('\x0a[okdb]\x20received\x20'+(_0x569870||_0x4607ff(0x774))+_0x4607ff(0x56d));const _0x21eec5=setTimeout(()=>{const _0xd58d2e=_0x4607ff;process[_0xd58d2e(0x556)][_0xd58d2e(0x6cc)](_0xd58d2e(0x3dc)),process[_0xd58d2e(0x393)](0x1);},0x1388);try{_0x2c9780['unlinkSync'](_0x4f16dc);}catch{}try{await _0xcf2a2e['close']();}catch(_0x4b83ec){process[_0x4607ff(0x556)]['write'](_0x4607ff(0x7a6)+(_0x4b83ec?.[_0x4607ff(0x1e0)]??_0x4b83ec)+'\x0a');}clearTimeout(_0x21eec5),process[_0x4607ff(0x556)]['write'](_0x4607ff(0x592)),process[_0x4607ff(0x393)](0x0);}process['on'](_0x40bc18(0x6e5),()=>_0x82198e(_0x40bc18(0x6e5))),process['on'](_0x40bc18(0x5f8),()=>_0x82198e(_0x40bc18(0x5f8))),process['on'](_0x40bc18(0x4bc),()=>_0x82198e(_0x40bc18(0x4bc)));}}const _0x594c2d=new Set([_0x5a22a6(0x2b3),_0x5a22a6(0x499),'init',_0x5a22a6(0x1c2),_0x5a22a6(0x28c),_0x5a22a6(0x206),'reset','token',_0x5a22a6(0x29f),_0x5a22a6(0x20d)]),_0x18f50b=process['argv'][0x2];if(_0x18f50b===_0x5a22a6(0x2b3))console[_0x5a22a6(0x273)](require$$3[_0x5a22a6(0x2b3)]),process[_0x5a22a6(0x393)](0x0);else{if(_0x18f50b&&_0x594c2d['has'](_0x18f50b)){const _0x256f3a=process[_0x5a22a6(0x749)]['slice'](0x3),_0x5bce32=_0x1b8588(['node',_0x5a22a6(0x784),..._0x256f3a]),_0x3c4c12=_0x14062f(_0x5bce32),_0x1dd1bc=new Set([_0x5a22a6(0x250),'-d',_0x5a22a6(0x256),'-k',_0x5a22a6(0x5c8),'-c',_0x5a22a6(0x4e9),'-p',_0x5a22a6(0x19e),_0x5a22a6(0x5ce),'-e',_0x5a22a6(0x31f),_0x5a22a6(0x79b),_0x5a22a6(0x5ba),_0x5a22a6(0x740),'--permissions',_0x5a22a6(0x38f),'--ttl',_0x5a22a6(0x45f),_0x5a22a6(0x6b1),'-u',_0x5a22a6(0x365)]);let _0x503802=null;for(let _0x5c9efe=0x0;_0x5c9efe<_0x256f3a[_0x5a22a6(0x503)];_0x5c9efe++){if(_0x1dd1bc[_0x5a22a6(0x52e)](_0x256f3a[_0x5c9efe])){_0x5c9efe++;continue;}if(!_0x256f3a[_0x5c9efe]['startsWith']('-')){_0x503802=_0x256f3a[_0x5c9efe];break;}}(async()=>{const _0x2f6cc9=_0x5a22a6;if(_0x18f50b===_0x2f6cc9(0x4ca)){const _0x324baa=process[_0x2f6cc9(0x749)][0x3],_0x340080=process[_0x2f6cc9(0x749)][_0x2f6cc9(0x5b8)](0x4),_0x55ae6e=_0x1b8588([_0x2f6cc9(0x1f9),'okdb',..._0x340080]),_0x59f2bc=_0x14062f(_0x55ae6e),_0x38e728=new Set([_0x2f6cc9(0x250),'-d',_0x2f6cc9(0x256),'-k',_0x2f6cc9(0x5c8),'-c',_0x2f6cc9(0x4e9),'-p',_0x2f6cc9(0x79b),_0x2f6cc9(0x5ba),'--label',_0x2f6cc9(0x40b),_0x2f6cc9(0x38f),_0x2f6cc9(0x70a),_0x2f6cc9(0x19e),_0x2f6cc9(0x5ce),'-e',_0x2f6cc9(0x31f)]),_0x39dd58=[];for(let _0x36e70b=0x0;_0x36e70b<_0x340080[_0x2f6cc9(0x503)];_0x36e70b++){if(_0x38e728['has'](_0x340080[_0x36e70b])){_0x36e70b++;continue;}if(_0x340080[_0x36e70b][_0x2f6cc9(0x637)]('-'))continue;_0x39dd58[_0x2f6cc9(0x387)](_0x340080[_0x36e70b]);}switch(_0x324baa){case _0x2f6cc9(0x532):await _0x987941(_0x59f2bc,_0x55ae6e);break;case _0x2f6cc9(0x437):await _0x202504(_0x59f2bc);break;case _0x2f6cc9(0x5f1):await _0x294de0(_0x39dd58[0x0],_0x59f2bc);break;default:console['error'](_0x2f6cc9(0x546)+_0x324baa+_0x2f6cc9(0x72c)),process[_0x2f6cc9(0x393)](0x1);}return;}if(_0x18f50b===_0x2f6cc9(0x20d)){const _0x4ec2cb=requireOkdbLicenseCodec(),_0x3e572c=process[_0x2f6cc9(0x749)]['slice'](0x3),_0x24e14d=_0x1b8588([_0x2f6cc9(0x1f9),_0x2f6cc9(0x784),..._0x3e572c]),_0x43f625=_0x14062f(_0x24e14d),_0x45f95a=new Set(['--path','-d','--key','-k',_0x2f6cc9(0x5c8),'-c',_0x2f6cc9(0x4e9),'-p',_0x2f6cc9(0x19e)]),_0x4ccd5b=[];for(let _0x7abf24=0x0;_0x7abf24<_0x3e572c[_0x2f6cc9(0x503)];_0x7abf24++){if(_0x45f95a[_0x2f6cc9(0x52e)](_0x3e572c[_0x7abf24])){_0x7abf24++;continue;}if(_0x3e572c[_0x7abf24][_0x2f6cc9(0x637)]('-'))continue;_0x4ccd5b['push'](_0x3e572c[_0x7abf24]);}const _0x680a15=_0x4ccd5b[0x0]??null;if(_0x680a15===_0x2f6cc9(0x488))await _0x167be8(_0x4ccd5b[0x1],_0x43f625);else{if(!_0x680a15)await _0x4aa96c(_0x43f625);else{let _0x379eb6=_0x4ec2cb['detectInputType'](_0x680a15);if(_0x379eb6===_0x2f6cc9(0x23d)&&_0x2c9780[_0x2f6cc9(0x4b2)](_0x680a15))_0x379eb6=_0x2f6cc9(0x624);if(_0x379eb6===_0x2f6cc9(0x624))try{const _0x458c58=_0x2c9780[_0x2f6cc9(0x2a8)](_0x680a15,_0x2f6cc9(0x6f6))['trim'](),_0x679aeb=_0x4ec2cb[_0x2f6cc9(0x4ab)](_0x458c58);if(_0x679aeb===_0x2f6cc9(0x6c5)){await _0x3aad41(_0x458c58,_0x43f625);return;}await _0x1eb9cc(_0x680a15,_0x43f625);return;}catch(_0x45c9ca){console[_0x2f6cc9(0x5b7)](_0x2f6cc9(0x4e2)+_0x680a15+':\x20'+_0x45c9ca[_0x2f6cc9(0x1e0)]),process[_0x2f6cc9(0x393)](0x1);}switch(_0x379eb6){case _0x2f6cc9(0x33c):await _0x1eb9cc(_0x680a15,_0x43f625);break;case _0x2f6cc9(0x6c5):await _0x3aad41(_0x680a15,_0x43f625);break;case _0x2f6cc9(0x537):await _0x287077(_0x680a15,_0x43f625);break;default:console['error'](_0x2f6cc9(0x61d)+_0x680a15+'\x22'),console[_0x2f6cc9(0x5b7)](''),console[_0x2f6cc9(0x5b7)]('\x20\x20Expected\x20one\x20of:'),console[_0x2f6cc9(0x5b7)](_0x2f6cc9(0x78f)),console[_0x2f6cc9(0x5b7)](_0x2f6cc9(0x54e)),console['error']('\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)'),console[_0x2f6cc9(0x5b7)](_0x2f6cc9(0x323)),console[_0x2f6cc9(0x5b7)](''),console['error']('\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]'),process[_0x2f6cc9(0x393)](0x1);}}}return;}switch(_0x18f50b){case _0x2f6cc9(0x499):await _0x1a7253(_0x3c4c12);break;case _0x2f6cc9(0x34e):await _0x2ca5b7();break;case _0x2f6cc9(0x620):await _0x3d9123(_0x3c4c12);break;case'backup':await _0x1715fa(_0x503802??_0x8e4ba8[_0x2f6cc9(0x300)](_0x2f6cc9(0x483)),_0x3c4c12);break;case'export':await _0x4ab435(_0x503802??_0x8e4ba8[_0x2f6cc9(0x300)](_0x2f6cc9(0x6a7)),_0x3c4c12,_0x5bce32);break;case _0x2f6cc9(0x206):await _0x4f856f(_0x503802??_0x8e4ba8[_0x2f6cc9(0x300)](_0x2f6cc9(0x6a7)),_0x3c4c12,_0x5bce32);break;case'join':await _0x86c751(_0x503802,_0x3c4c12,_0x5bce32);break;}})()['then'](()=>process[_0x5a22a6(0x393)](0x0))[_0x5a22a6(0x628)](_0x122504=>{const _0x292aef=_0x5a22a6;console['error'](_0x292aef(0x199)+(_0x122504[_0x292aef(0x1e0)]||_0x122504)+'\x0a'),process[_0x292aef(0x393)](0x1);});}else _0x49634e()['catch'](_0x145180=>{const _0x478ec3=_0x5a22a6;console[_0x478ec3(0x5b7)](_0x478ec3(0x23c)),console[_0x478ec3(0x5b7)](_0x145180[_0x478ec3(0x22e)]||_0x145180),process['exit'](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module['exports']=okdb;
2
+ 'use strict';const _0x3f6c2b=_0x2ba0;(function(_0x29354e,_0x2356be){const _0x48f74a=_0x2ba0,_0x272804=_0x29354e();while(!![]){try{const _0x2e020c=parseInt(_0x48f74a(0x19c))/0x1+-parseInt(_0x48f74a(0x622))/0x2*(-parseInt(_0x48f74a(0x4cb))/0x3)+-parseInt(_0x48f74a(0x2d2))/0x4+parseInt(_0x48f74a(0x2fb))/0x5*(parseInt(_0x48f74a(0x34b))/0x6)+-parseInt(_0x48f74a(0x1d7))/0x7*(-parseInt(_0x48f74a(0x38c))/0x8)+parseInt(_0x48f74a(0x7bd))/0x9+-parseInt(_0x48f74a(0x56d))/0xa;if(_0x2e020c===_0x2356be)break;else _0x272804['push'](_0x272804['shift']());}catch(_0x423bb1){_0x272804['push'](_0x272804['shift']());}}}(_0xc0fe,0xbfaa2));function _0xc0fe(){const _0x30ddda=['\x20active\x20env:\x20','--env\x20<name>','[okdb]\x20nothing\x20to\x20reset\x20—\x20','logRequests','_wantDbOf','heapUsed','\x20(passive),\x20','parts','ESRCH','index','assertFeature','isBuffer','(unset)','\x20log\x20level:\x20','tryAcquire','\x20(must\x20be\x20true\x20or\x20false)','--workers','\x20\x20\x20\x20\x20\x20\x20','\x20\x20⚠\x20\x20','/\x20quit\x20/\x20Ctrl+C','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20open\x20admin\x20UI\x20in\x20browser\x0a\x20\x20','shm-gc:\x20/proc\x20is\x20not\x20readable\x20—\x20cannot\x20tell\x20which\x20segments\x20are\x20in\x20use','process','alloc','\x20\x20Usage:\x20','/api/env/','UNSUPPORTED_MEDIA_TYPE','SCHEMA_COLLECTION_INVALID','state','_lastCpuWindowMs','acquiredAt','tokenizer','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','method','time','time-machine','isDead','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','signalWant','processKey',';\x20Expires=','OPEN','unique:violation','allSettled','\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(','/admin/index.html','\x20has\x20ambiguous\x20query/path\x20field:\x20','\x20\x20\x20\x20path:\x20\x20\x20\x20','(?:/(.*))?$','shmbufNative','treeView','mean','include','_lastCpuUsage','errors','level:\x20info','preferred_username','LICENSE_EXPIRED_ACTION','reads','_committed','exports','[okdb]\x20error:\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/envs\x0a\x20\x20\x20\x20','params.','PUT\x20type/users/item/x\x20{\x22n\x22:1}','Schema\x20&\x20Indexes','prototype','authorization','dropFts','/type/users/query\x0a\x20\x20\x20\x20','Origin','uptime','--token','Environments','prefix','_lockDb','_nestedWarned','lost','CREATED','issuedAt','shutdown',';\x20Max-Age=','No\x20tokens.','isConnected','\x20\x20\x20http://localhost:','\x22\x20has\x20been\x20retiring\x20for\x20','gray','bumpCmd','children','targetKey','repairBlobRefs','_totalErrors','_oidcDiscoveryCache','_flushTimer','Build\x20expects\x20public\x20key\x20fingerprint\x20','_startAdmission','reverse','function','size','--label','[okdb]\x20invalid\x20log\x20level:\x20\x22','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','List\x20tokens\x20and\x20users.','req','view','_refreshDesiredSnapshot','OKDBInvalidPrimaryKeyError','_desired','Internal\x20error','basename','authRequired','map','LICENSEE','-backups','_admissionTimer','cpSync','LABEL','Route\x20','records','transport:\x20','LICENSE_FEATURE_DISABLED','role','[okdb]\x20imported\x20\x20types=','stopping','access','SIGBREAK','[okdb-cluster]\x20worker\x20pid=','\x20\x20scanned\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','.okdb-write-test','\x20\x20\x20\x20port:\x20\x20','unreadablePids','processor:retry','exportToFile','\x20has\x20unbound\x20input\x20fields\x20with\x20bodyMode:none:\x20','0123456789ABCDEFGHJKMNPQRSTVWXYZ','floor','\x20\x20env=','compact','never','\x20MB\x20→\x20','SIG_INVALID','_getType','Cannot\x20delete\x20','[okdb]\x20invalid\x20port:\x20','Lax','tmp','\x0a===\x20OKDB_DIAG\x20','\x20\x20╔═══════════════════════════╗','Not\x20Found','raw-put','hashed','default:\x20cores−1\x20=\x20','\x20\x20!\x20','draining','\x20\x20\x20\x20port:\x20\x20\x20\x20','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','keys:','\x20records…','comm','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','payload-or-self','\x20\x20→\x20\x20','BACKUP_MANIFEST','listRoutes','BAD_HOST','\x20\x20✓\x20http\x20listening\x20on\x20','\x20cf-ip=','jwksTtlMs','\x20(expires\x20in\x20','\x27\x20on\x20type\x20\x27','\x22\x20(hash:\x20','started','uid','bytes','--log-level','Execute\x20functions\x20over\x20HTTP/MCP/shell.','writeUInt8',';\x20HttpOnly','Create,\x20update,\x20and\x20delete\x20tokens\x20and\x20users;\x20rotate\x20keys.','_isWriter','--expose-gc','--test','importFromStream','NOT_FOUND','feed:','Views','cluster-wide','_log','orphan','PIN','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','nodesView','Data','body:\x20','files\x20feature\x20not\x20available','Unauthorized','pause','standalone','params.env','claimGated','[okdb]\x20loaded\x20config:\x20','_report','\x20day(s).','isFile','stopped','Forbidden','received\x20','(workers\x20can\x27t\x20share\x20the\x20cross-process\x20HLC/clock).\x20Forcing\x20single-process\x20(was\x20','exportJSON','--any-size','enforce','registry\x20publish\x20failing:\x20','creating','add','inputSchema','import','meta','writeUInt16BE','online','info','bootstrapBlocked','Release','queue/','cookie',':\x20mapped\x20','updatedAt','prependListener','argv','\x20logs\x20off\x0a','closeIdleConnections','Validation\x20failed','-----BEGIN\x20CERTIFICATE-----\x0a','OKDBIndexNotRegisteredError','paused','Shutting\x20down\x20due\x20to\x20license\x20expiry','every','view:progress','/type/users\x0a\x20\x20\x20\x20','anySize','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','ALREADY_EXISTS','(code=','\x20/\x20','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','\x0a\x20\x20✓\x20Token\x20created','next','recheck','host','true','statuses','\x0a\x20\x20\x20\x20\x20\x20','Invalid\x20license\x20blob:\x20','lifecycle','shutting\x20down…\x0a',':\x20connected\x0a\x0a','skip\x20','\x20envs','_children','headers.','--ttl','removeNode','\x20HTTP\x20workers,\x20each\x20serves\x20+\x20processes)','SCHEMA_VALIDATION_FAILED','credentials','_totalWriteMs','HELP','ftsIndexes','\x0a\x20\x20Joining\x20cluster\x20at\x20','_blobsDir','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','system:drain','issuer','\x20(must\x20be\x20a\x20string\x20or\x20array\x20of\x20strings)','tags','\x20has\x20ambiguous\x20binding\x20for\x20path\x20field:\x20','off','derivePin','race','toLocaleString','\x27\x20doesn\x27t\x20exist','backupRoot','REMOVE','already\x20in\x20use','readdirSync','fts:reset','_normalizeOAuthAuthResult','[env]','\x20\x20\x20\x20licensee:\x20\x20','auth','abs','gate','\x20while\x20this\x20process\x20runs\x20','_enableChangelog','--dry-run','\x20\x20#','Files','/proc','\x0a\x0a\x20\x20','\x20bytes,\x20need\x20>=\x2065)','\x20entries\x20in\x20','_isFree','transactionSync','views','matched','userAdded','Records\x20inside\x20your\x20types\x20—\x20the\x20actual\x20rows\x20you\x20store.','_sync','consumeLoginState','SHM_SEGMENT_RETIRING','clockToChangeDb','hasType','Engines','search','createInterface','bus:env_release','aud','signingInput','getKeys','needsActivation','List\x20types,\x20get\x20type\x20schema,\x20list\x20registered\x20indexes.','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','\x20which\x20does\x20not\x20exist','copyFileSync','\x20times\x20in\x20','segmentNameFor:\x20suffix\x20must\x20look\x20like\x20\x22_name\x22\x20(got\x20','trim','2.5.0','pid','config\x20file\x20invalid:\x20','_isClusterController','Cannot\x20set\x20enforce\x20schema\x20on\x20','files','\x20\x20score:','promises','message','maxMs','type/users/item/alice','keys/public.pem','\x20\x20✓\x20database\x20opened\x0a',')\x20→\x20','port\x20','9349515nlWhUa',';\x20Max-Age=0;\x20Expires=Thu,\x2001\x20Jan\x201970\x2000:00:00\x20GMT','_putRowAsync','processingStatusView','LICENSE_ALREADY_STORED','_seen','system','_lockDbOf','\x20\x20(no\x20env\x20draining)','[okdb]\x20invalid\x20config\x20\x22http.host\x22:\x20','okdb','ms\x20busy=',':\x20prefix\x20','sse','cause','\x20\x20Common\x20causes:','_heldTotal','processor:paused','details','\x20binding\x20references\x20missing\x20input\x20field:\x20','putSync','127.0.0.1','ES256','\x27\x20already\x20registered','quarantined:\x20','toFixed','_instanceId','\x20\x20\x20\x20path:\x20\x20','memoryUsage','\x20\x20✓\x20OKDB\x20server\x20running','red','INVALID_PRIMARY_KEY','\x20more)','base64url',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','[okdb]\x20exporting\x20blobs…','properties','decommission','~processes:cmd','fetch','\x20to\x20browse\x20the\x20API,\x20','loadEnvFile','[okdb]\x20port\x20','http.workers','parseInt','\x20\x20\x20\x20license:\x20','_license','~system','_selfKey','setDesired','_db','writerStatus','ITEM_UPDATE','SWAP','fts','blob\x20status\x20db\x20not\x20available','licensee','pending','\x20(durable\x20desired-state)','verifySignature','okdb-writer:\x20env\x20closing\x20—\x20retry',')\x20—\x20they\x20will\x20NOT\x20be\x20preserved','--permissions','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','\x22\x20on\x20\x22','\x0a\x20\x20✓\x20License\x20added','.kdb_history','threadId','_sockets','NOT_IMPLEMENTED','create','\x0a[okdb]\x20fatal\x20error:','HTTP\x20','yes','refs','context','inst:','\x20<path>\x20[json-body]','resetIndex','available','listen','_rowKey','roles','consecutiveFailures','type','commitsPerSec','darwin','_sandbox','decodeActivationToken','export:\x20stream\x20closed\x20before\x20drain','clearThreadStats','makeOkdb','user','_threadStats','build','processor:ready','array','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','searchParams','uuid','system:ready','blob','<path>','\x22\x20—\x20pass\x20a\x20path\x20relative\x20to\x20it\x20(configure\x20with\x20the\x20`backup.root`\x20option)','\x20missing\x20path\x20field\x20in\x20inputSchema:\x20','Run','grants','building','padEnd','expiry','activateLicense','groups','INDEX_HAS_CONSUMERS','emit','timeMachine','async','servers','indexToDb','licenseHash','maxExtra','\x20\x20✓\x20Removed\x20license\x20','\x20\x20records=','busy','rows=','store','guard','\x0a\x20\x20','ms\x20env=','mode','query','SIGTERM','supervisorKey','SYSTEM_POKE','item:pending','allowHeaders','forceAfterMs','sizeAfter','_isStale','deleted','fts:','_userRouteCount','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','\x0a[okdb]\x20received\x20','\x20(deleting\x20requires\x20--force\x20if\x20none\x20of\x20them\x20is\x20okdb)','randomBytes','decommissioned','env:opened','boolean','createEnvironment','some','_authOptions','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','API\x20tokens,\x20users,\x20and\x20credentials.','description','reload',';\x20Path=','_rootDb','known\x20field','statusCode','SYNC_COMMITS','assign','\x20@\x20','shift','resume','toUTCString',');\x20','_onTick','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','readMs','input:\x20','OIDC\x20discovery\x20missing\x20jwks_uri','starting','\x22\x20(must\x20be\x20debug|info|warn|error)','--prefix','search:query','dropExisting','--grants','licensed','/.well-known/openid-configuration','\x0a\x20\x20okdb\x20—\x20standalone\x20OKDB\x20server\x0a\x0a\x20\x20Usage:\x0a\x20\x20\x20\x20okdb\x20[options]\x0a\x20\x20\x20\x20okdb\x20<command>\x0a\x0a\x20\x20Options:\x0a\x20\x20\x20\x20-p,\x20--port\x20<port>\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x20(default:\x208484)\x0a\x20\x20\x20\x20-d,\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x20(default:\x20./okdb-data)\x0a\x20\x20\x20\x20-k,\x20--key\x20\x20<secret>\x20\x20\x20\x20\x20\x20Encryption\x20key\x20for\x20data\x20at\x20rest\x0a\x20\x20\x20\x20-c,\x20--config\x20<file>\x20\x20\x20\x20\x20\x20Config\x20file\x20path\x20(default:\x20.kdbconfig)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-level\x20<level>\x20\x20Log\x20level:\x20debug\x20|\x20info\x20|\x20warn\x20|\x20error\x20(default:\x20info)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-repl\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20without\x20interactive\x20shell\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-admin\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20\x20\x20\x20\x20--open\x20[ip\x20...]\x20\x20\x20\x20\x20\x20Open\x20mode:\x20bypass\x20auth\x20for\x20listed\x20IPs\x20(default:\x20localhost).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Examples:\x20--open\x20\x20--open\x20192.168.1.0/24\x20\x20--open\x20*\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-requests\x20\x20\x20\x20\x20\x20\x20Print\x20every\x20HTTP\x20request\x20to\x20stdout\x20(for\x20debugging)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--workers\x20<n>\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20capable\x20worker\x20processes\x20sharing\x20the\x20listen\x20socket\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(default:\x20cores\x20−\x201).\x20Each\x20worker\x20serves\x20HTTP\x20+\x20SSE\x20AND\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20processes\x20(claims\x20leases,\x20drains\x20on\x20its\x20own\x20loop);\x20the\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20cluster\x20primary\x20is\x20a\x20thin\x20passive\x20supervisor.\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-cluster\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20single-process\x20(equivalent\x20to\x20--workers\x201)\x0a\x20\x20\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x0a\x20\x20Commands:\x0a\x20\x20\x20\x20version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20doctor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20health\x20checks\x0a\x20\x20\x20\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20.kdbconfig\x20and\x20okdb-data/\x0a\x20\x20\x20\x20token\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20a\x20token\x20in\x20the\x20local\x20DB\x20(direct\x20access,\x20no\x20HTTP)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--name\x20<name>\x20\x20\x20\x20\x20\x20For\x20password\x20login\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<pass>\x20\x20Password\x20(requires\x20--name)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--label\x20<text>\x20\x20\x20\x20\x20Human\x20description\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--permissions\x20<l>\x20\x20Comma-separated\x20baseline\x20permissions\x20(e.g.\x20\x22*\x22\x20or\x20\x22data:read\x22)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--grants\x20<json>\x20\x20\x20\x20Per-env\x20grants\x20as\x20JSON\x20(e.g.\x20\x27{\x22orders\x22:[\x22data:*\x22]}\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--ttl\x20<ms>\x20\x20\x20\x20\x20\x20\x20\x20\x20Optional\x20TTL\x20in\x20milliseconds\x0a\x20\x20\x20\x20token\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20all\x20tokens\x20in\x20the\x20local\x20DB\x0a\x20\x20\x20\x20token\x20revoke\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20Revoke\x20(delete)\x20a\x20token\x20by\x20id\x20(full\x20uuid\x20or\x20unique\x20prefix)\x0a\x20\x20\x20\x20join\x20<address>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Join\x20an\x20existing\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--token\x20<t>\x20\x20\x20\x20\x20\x20\x20\x20Bearer\x20token\x20from\x20the\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--username\x20<u>\x20\x20\x20\x20\x20Or,\x20username\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<p>\x20\x20\x20\x20\x20Password\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--address\x20<addr>\x20\x20\x20This\x20node\x27s\x20reachable\x20sync\x20address\x20(required)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20Local\x20DB\x20path\x0a\x20\x20\x20\x20backup\x20[dir]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Hot\x20backup:\x20LMDB\x20snapshot\x20copy\x20of\x20every\x20env\x20+\x20time-machine\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20history\x20+\x20file\x20blobs\x20into\x20a\x20NEW\x20dir\x20(default:\x20./okdb-backup);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20full-text\x20indexes\x20are\x20rebuilt\x20on\x20first\x20open,\x20not\x20copied\x0a\x20\x20\x20\x20restore\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Restore\x20a\x20backup\x20dir\x20into\x20--path\x20(must\x20not\x20exist\x20or\x20be\x20empty)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--new-identity\x20\x20\x20\x20bring\x20the\x20copy\x20up\x20as\x20a\x20NEW\x20node\x20(fresh\x20id,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20no\x20sync\x20membership)\x20instead\x20of\x20replacing\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20the\x20original\x20—\x20see\x20docs/migration.md\x0a\x20\x20\x20\x20export\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20export\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20env\x20to\x20export\x20(default:\x20default)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20comma-separated\x20type\x20filter\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20include\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20export\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20import\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20import\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20target\x20env\x20override\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20import\x20only\x20these\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--drop\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20drop\x20&\x20recreate\x20existing\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20restore\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20import\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20and\x20recreate\x20database\x20(with\x20confirmation);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20node\x20identity\x20and\x20licenses\x20are\x20preserved\x0a\x20\x20\x20\x20license\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20stored\x20licenses,\x20current\x20tier,\x20and\x20usage\x0a\x20\x20\x20\x20license\x20<blob|path>\x20\x20\x20\x20\x20\x20Add\x20a\x20license\x20blob\x20(or\x20read\x20from\x20a\x20.license\x20file)\x0a\x20\x20\x20\x20license\x20<activation>\x20\x20\x20\x20\x20Activate\x20a\x20previously-added\x20license\x20with\x20the\x20vendor\x27s\x20token\x0a\x20\x20\x20\x20license\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20details\x20for\x20one\x20stored\x20license\x20(by\x20uuid\x20or\x20prefix)\x0a\x20\x20\x20\x20license\x20remove\x20<id>\x20\x20\x20\x20\x20\x20Remove\x20a\x20stored\x20license\x0a\x20\x20\x20\x20shm-gc\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20leaked\x20okdb\x20shared-memory\x20segments\x20no\x20process\x20uses\x20(Linux)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--dry-run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20report\x20only\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--prefix\x20<p>\x20\x20\x20\x20\x20\x20\x20only\x20names\x20starting\x20with\x20<p>\x20(default\x20\x22-tmp-\x22)\x0a\x0a\x20\x20Environment\x20variables:\x0a\x20\x20\x20\x20OKDB_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x0a\x20\x20\x20\x20OKDB_PATH\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x0a\x20\x20\x20\x20OKDB_LOG_LEVEL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log\x20level\x20(debug|info|warn|error)\x0a\x20\x20\x20\x20OKDB_KEY\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Encryption\x20key\x0a\x20\x20\x20\x20OKDB_NO_REPL=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20REPL\x0a\x20\x20\x20\x20OKDB_NO_ADMIN=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20OKDB_HTTP_WORKERS\x20\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20passive\x20HTTP\x20worker\x20processes\x20(default:\x20cores\x20−\x201;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20forced\x20to\x201\x20if\x20the\x20shmbuf\x20native\x20binding\x20is\x20unavailable)\x0a\x0a\x20\x20Config\x20file\x20(.kdbconfig)\x20—\x20JSON,\x20all\x20keys\x20optional:\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22port\x22:\x20\x20\x20\x20\x208484,\x0a\x20\x20\x20\x20\x20\x20\x22path\x22:\x20\x20\x20\x20\x20\x22./okdb-data\x22,\x0a\x20\x20\x20\x20\x20\x20\x22key\x22:\x20\x20\x20\x20\x20\x20\x22...\x22,\x0a\x20\x20\x20\x20\x20\x20\x22logLevel\x22:\x20\x22info\x22,\x0a\x20\x20\x20\x20\x20\x20\x22noAdmin\x22:\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22noRepl\x22:\x20\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22auth\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22open\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20Examples:\x0a\x20\x20\x20\x20okdb\x0a\x20\x20\x20\x20okdb\x20--port\x209000\x20--path\x20./mydb\x0a\x20\x20\x20\x20okdb\x20--no-repl\x20--port\x208080\x0a\x20\x20\x20\x20okdb\x20--open\x0a\x20\x20\x20\x20okdb\x20--open\x20192.168.1.0/24\x0a\x20\x20\x20\x20okdb\x20doctor\x0a\x20\x20\x20\x20okdb\x20backup\x20./my-backup\x0a\x20\x20\x20\x20okdb\x20restore\x20./my-backup\x20--path\x20./okdb-data\x0a','cli','schema','authenticateRequest','\x20\x20(licensee:\x20','--blobs','concat','content-length','decoded','unref','\x20license\x20—\x20no\x20activation\x20needed)','replace','enable','inUse','cookieName','[filter]','route','hasIndex','count','INDEX_REGISTERED','reason','clusterWorkers','admin','null','body.','OPTIONS','msg','\x20drainAge=','May\x20write\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20write\x20permission.','key','ppid','\x20(+','--key','dropSchema','license','okdb-http-worker-child.js','x-okdb-raw-response','listenAddr','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','activate','disconnect','false','\x20\x20\x20\x20status:\x20\x20\x20\x20','hidden','flushed','--changes','shm-gc:\x20Linux\x20only\x20(POSIX\x20shared\x20memory\x20under\x20/dev/shm)','METHOD_NOT_ALLOWED','\x20file','field','exportBlobs','relative','allowedAlgs','legacy','protected:write','\x20type','--types','[okdb]\x20blobs:\x20imported=','maxAge','JWT\x20audience\x20mismatch','178586YxflGx','processors','_totalReadMs','\x20not\x20found','envName','activation','NAME','[okdb]\x20cluster\x20close\x20error:\x20','UNAUTHORIZED','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20API\x20docs\x20for\x20a\x20path\x0a\x0a\x20\x20','Indexes','randomUUID','config\x20file\x20valid:\x20','startsWith','other','closeSync','unknown','flatMap','string','[okdb]\x20created\x20.kdbconfig','selfKey','mkdirSync','TYPES','No\x20license\x20found\x20matching\x20this\x20activation\x20token','bind','revived','LOGS','running','https','Queue','Background\x20job\x20queue:\x20enqueue\x20work,\x20observe\x20state,\x20and\x20process\x20jobs.','[okdb]\x20primary\x20okdb\x20close\x20error:\x20','SERVICE_UNAVAILABLE','end','System','_clusterOnMessage','none','access-control-max-age','backup\x20destination\x20\x22','\x20===','verifyCookie','stringify','\x20—\x20','_draining','\x22\x20resolves\x20outside\x20the\x20backup\x20root\x20\x22','syncPeers','setSchema','shm-gc:\x20cannot\x20read\x20the\x20memory\x20maps\x20of\x20','Unsupported\x20JWT\x20alg:\x20','cookies','version','\x20+\x20','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','skippedByProtocol','_dedupeMax','kid','quantum','_nodeDb','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/staging/info\x0a\x0a','77SEFXlv','\x20\x20errors\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','origin','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20','foreignOwner','field:resolver_registered','then','ms\x20p99=','LICENSE_ACTIVATION_INVALID','\x20\x20Flags','nbf','\x22.\x20Use:\x20create,\x20list,\x20revoke','is\x20invalid','assertLimit','\x20\x20·\x20','Feature\x20not\x20licensed:\x20','getCmd','split','CONFLICT','.kdbconfig','protected:read','current','listDesired','_cmd','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20set\x20active\x20environment\x20(persists\x20in\x20session)\x0a\x20\x20','isDirectory','embedded','createHash','revoke','\x20HTTP\x20workers\x20','\x20SECURITY\x20NOTICE',':\x20key\x20[','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','exec','--config','http.listen:\x20host\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20an\x20array\x20of\x20them','raw-remove','TOO_MANY_REQUESTS','okdb-lock:\x20env\x20closed','indexOf','--path','padStart','must\x20be\x20','content-type','Blob\x20file\x20missing\x20for\x20~files\x20record\x20\x22','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20active\x20environment\x20+\x20list\x20all\x20envs\x0a\x20\x20','GiB','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.','okdb-backup-','createReadStream','\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','raw','white','getSecurityNotices','_sampleOwnStats','use','capable\x20HTTP\x20worker(s)\x20serving\x20:','listNodes','verifyActivation','_clusterOrphanWatch','\x20\x20\x20\x20expires:\x20\x20\x20','UNPROCESSABLE_ENTITY','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','_matchRoute','_supervisorKey','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','_released','Access-Control-Request-Headers','drain','\x0a\x20\x20✓\x20License\x20activated','items','cyan','Search','_allEnvsWithFiles','tierList','\x20\x20\x20\x20api:\x20\x20\x20\x20\x20http://localhost:','reportThreadStats','_lock','\x20is\x20not\x20a\x20complete\x20okdb\x20backup\x20(no\x20','\x20\x20\x20\x20admin:\x20http://localhost:','--force','openDB','has','transport','enabled','is\x20not\x20allowed','--port','load','_cursors','present','--version','system:bus_state_change','\x20(must\x20be\x20an\x20integer\x20>=\x201)\x20—\x20using\x201','parkedNow','dropType','readUInt8','lstatSync','_fetchJwks','[okdb]\x20started\x20in\x20','typesDb','shm\x20segment\x20','no-cache,\x20no-transform','created','List\x20functions\x20and\x20inspect\x20their\x20source.','middlewares','der','change','schema:set','Write','\x20has\x20invalid\x20http.bodyMode:\x20','\x20\x20\x20\x20limits:\x20\x20\x20\x20','_onStop','\x20MB)','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','commit','createdAt','system:poke','types/env=','object','events','[res]\x20','isTTY','Index\x20\x27','putNode','child_process','getCount','writes','exit','expiresAt','issueToken','Work','__vocab/version','\x20supervised)','List\x20environments\x20and\x20read\x20environment\x20info.','cpus','childTransaction','processes','\x20of\x20them\x20run\x20as\x20this\x20user\x20and\x20could\x20map\x20these\x20segments:\x20','cpuPct','writeUInt32BE','columns','createServer','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','heldBy','_held','Upload,\x20update\x20metadata,\x20and\x20delete\x20files.','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','operations','Sync','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/info\x0a\x20\x20\x20\x20','kind','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','Index\x20\x22','authenticateToken','onRetiring','setFlagsFromString','\x20(must\x20be\x201–65535)','xdg-open\x20','\x20\x20Type\x20','error\x20','_listTypes','fanout','\x20\x20note:\x20','type:drop','sandbox','~tokens','dest','jwk','index:registered','shm-gc','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','ms\x20on\x20env=','committed','_typeSchema','rawBuf','[okdb]\x20import\x20complete','\x20size,\x20','ACTIVATION_EXPIRED','values','createWriteStream','retiring','hostname','find','stack','reduce','catch','ttl','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','types','get','password','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','extend','__okdbCluster','data','_store','setTtl','\x20forked\x20','charCodeAt','invalid','verbose','TYPE_ALREADY_REGISTERED','_handlePending','noAdmin','cursorKey','prompt','min','_handlePoke','--eval','_lastPublishAt','detachConsole','Type\x20\x27','\x20\x20skipped=','_processStartedAt','\x20HTTP\x20server(s)\x20on\x20port\x20','Token\x20must\x20be\x20a\x20JWT','outOfTree','\x20(slot=','okdb-license-id:','loop-lag\x20','isInteger','./okdb-data','INDEX_NOT_REGISTERED','[okdb-cluster]\x20respawning\x20worker\x20slot=','markClosed','worker','ITEM_PENDING','engines','blindPids','[req]\x20','RS256','USE','\x20\x20╚═══════════════════════════╝','okdb.http.listen(port)\x20in\x20each\x20worker.','[okdb]\x20warning:\x20failed\x20to\x20restore\x20identity/licenses\x20after\x20reset:\x20','\x20records','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20this\x20help\x0a\x20\x20','\x0a\x20\x20okdb\x20doctor\x0a','_started','isAuthenticated','\x27,\x20cannot\x20map\x20to\x20\x27','[okdb]\x20error:\x20failed\x20to\x20read\x20','Register,\x20update,\x20and\x20delete\x20function\x20definitions.','matcher','handler','standard','index:drop','ttlMs','_loginStates',').\x20If\x20none\x20of\x20them\x20runs\x20okdb,\x20pass\x20--force;\x20','1421756BEXqtk','scrypt','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','round','existsSync','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','Validation\x20failed:\x20','not\x20open','_windowCbs','event:\x20','unhandledRejection','store\x20will\x20open\x20THAT\x20directory,\x20not\x20the\x20copy\x20in\x20','handle','_quantum','active:','createLoginState','license:removed','parse','\x20already\x20exists','token','\x1b[36m','listLicenses','INDEX_READY','resetReadTxn','ENOENT','stop\x20every\x20okdb\x20process\x20on\x20this\x20path\x20and\x20run\x20`okdb\x20shm-gc`.','\x20\x20\x20\x20','{}[]:,\x27\x22','detectInputType','readFileSync','importFromFile','isBusy','_jwksNegativeCache','required','resolve','(primary\x20=\x20processor)','PUT','set-cookie','_blobStatusDb','[okdb]\x20unknown\x20token\x20action:\x20\x22','port','10JlWwVl','/([^/]+)','params','BACKUP_PATH_OUTSIDE_ROOT','discoveryTtlMs','node:perf_hooks','linux','[okdb]\x20created\x20./okdb-data','platform','event','\x1b[90m','GATEWAY_TIMEOUT','(?:','VIEW_PROGRESS','from','--help','_buckets','mcp','\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','missing_blob','x5c','tokenTtl','slotKey','label','resetting','sync:apply','unique','INDEX_ALREADY_REGISTERED','--address','toString','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','blocks','env/:env','base64','GONE','\x20pid=','auth=','OKDB_CODE_TO_HTTP_STATUS','send','lmdb','_baselines','access-control-request-headers','maxWrites','x-requested-with','Admin','ttl:set','homedir','HTTP_CLUSTER_REMOVED','GET','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','newIdentity','\x20\x20\x20\x20addedAt:\x20\x20\x20','MiB','length','stderr','startedAt','slice','dirname','cluster','\x0a\x20\x20✓\x20License\x20already\x20stored\x20(no\x20change)','ingest','\x20│\x20','name','/api','sourcePath','reap',':want','level','Register/update/delete\x20types,\x20register/drop/rebuild\x20indexes,\x20set\x20TTL\x20policy.','toISOString','logLevel','processingSig','[on|off|level]','doctor','\x20\x20(+\x20time-machine)','Protected\x20(gate)','parseBearer','history','registerType','ms\x0a','1166964GLkkRl','hasDesired','dynamic','BACKUP_DEST_INSIDE_STORE','\x20does\x20not\x20exist','_bpWaiters','safety','nodeKey','attached','\x20\x20deleted\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','onThreadExit','external','outputSchema','namespace','put','writeFileSync','\x20\x20⚠','_buildChildRow','pin','?\x0a\x20\x20(node\x20identity\x20and\x20licenses\x20are\x20preserved)\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','startHeartbeat','clearLine','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','sync-node','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','halted','license:activated','_okdb','run','win32','http','\x1b[1m','type/users\x20--help','(empty)','exposeHeaders','_participate','restore','hasOwnProperty','byteLength','Materialized\x20views:\x20query\x20definitions\x20that\x20are\x20continuously\x20maintained\x20and\x20queryable.','_key','open','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','setLogger','_closed','listening','migrations','work','createHmac','okdb_session_','_totalRequests','_writer','_servingEngines','Machine-to-machine\x20cluster\x20protocol\x20(join\x20handshake,\x20replication\x20channel,\x20traffic).\x20Grant\x20only\x20to\x20peer\x20nodes\x20—\x20not\x20to\x20humans.','payload','_ensure','envs','_nodeDbCache','flushLmdb','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20','EADDRINUSE','\x20\x20Error:\x20','_singletonLocks','regex','897256xOgNju','forEach','\x22\x20is\x20inside\x20the\x20store\x20\x22','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','mcp-session-id','validateBlobIntegrity','~lock','~licenses','\x20in\x20','ENV_CLOSING_RETRY','_countFileRefs','_collectSingletonClaims','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','blobs','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','runInNewContext','HEAD','permissions','respawnTimer','index:ready','queue','dataBytes','typeSubDbs','Cluster\x20replication.\x20The\x20\x22peer\x22\x20op\x20is\x20for\x20cluster\x20nodes,\x20not\x20human\x20users.','getProcess','_putRowSync','heapTotal','param','fts:registered','test','node\x20identity','audiences','SYSTEM_PROC','_publishFailWarned','att','toLowerCase','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','_inflight','_flushDebounce','sha256','yellow','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','main','statSync','export','[okdb]\x20closed\x20cleanly\x0a','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','_lastCpuPct','Enqueue,\x20cancel,\x20retry,\x20remove\x20jobs;\x20manage\x20buckets;\x20reconcile\x20and\x20rebuild\x20stats.','okdb-writer[','[okdb]\x20restoring\x20','ms\x20(attempt\x20','set','\x20\x20Writes:\x20\x20','verify','notOkdbShaped','exp','JWT\x20issuer\x20mismatch','alg','shmbuf','INVALID_INDEX_KEY','[okdb]\x20reset\x20aborted','dryRun','bindings','deaths','OKDBInvalidValueError','--watch','[okdb-cluster]\x20','authMode','_drainOne','\x20\x20Tier:\x20\x20\x20\x20','[body]','\x20→\x20POST\x20/api/env/','_resolveOrCreateEnv','_drain','reset','\x20oldestPendingMs=','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','stdin','noCluster','\x20for\x20system\x20env','internal','join','ensureType','processor:progress','killable','reject','addSSE','singletonClaims','getDesired','_jwksCache','getChanges','PUB_FINGERPRINT','\x20\x20(need\x20≥\x2018)','\x20opening\x20','Processors','OKDB_HTTP_WORKERS\x20env','access-control-allow-credentials','primaryOkdb','~processes:desired','utf8','effective','ieee-p1363','item:create','getPins','Content-Type','[okdb]\x20http\x20workers:\x20','[okdb]\x20backing\x20up\x20to\x20','\x0a\x20\x20\x20\x20','rowKey','_clusterWorkerAttached','force','id:\x20','okdb_session','read','peers=','ENV','isEnabled','_heartbeatTimer','\x20\x20✓\x20OKDB\x20cluster\x20running','result','_bestMatch','[okdb]\x20opening\x20','\x20\x20changes=','recordWrite','license:added','--prefix=','Blob\x20on\x20disk\x20has\x20no\x20~files\x20record\x20in\x20any\x20env\x20(hash:\x20','OKDBUniqueConstraintError','offWindow','procmodeack/','\x20\x20Envs:\x20\x20\x20\x20','permission','_nodeDead','LICENSED_BUILD','FOREIGN_KEY_VIOLATION','\x20\x20\x20\x20usage:\x20\x20\x20','_bpParkedTotal','finish','defaults','dumpedAt','_pendingLocal','ITEM_REMOVE','__esModule','_onPoke','cluster:\x20ready\x20(','status','\x1b[35m','_active','api','pipe','cpuUsage','http://','heartbeatMs','bodyMode','splice','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','expires','inspect','_cookieName','backup','_rawDb','copy','max','OKDBTypeNotRegisteredError','dim','readline','endsWith','keys','onWindow','[okdb-cluster]\x20slot=','attach','_outstanding','start\x20','setOwnMeta','ITEM_CREATE','_enforceOperationAccess','config\x20http.workers','pathParams','server','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','removeLicense','Blob\x20ref-count\x20is\x20zero\x20for\x20~files\x20record\x20\x22','OKDBVersionMismatchError','LICENSE_INVALID','dbPath','attachFeed','\x20more','_rotateBucket','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','hex',':\x20expected\x20','root','_changefeed','candidatesLegacyNamed','--log-requests','VERSION_MISMATCH','\x20\x20\x20\x20\x20\x20','[okdb]\x20backup\x20complete','participate','\x20licenses','\x20\x20All\x20checks\x20passed.\x0a','ENVS','typesPerEnv','idx:','\x20querySchema\x20references\x20missing\x20input\x20field:\x20','_getOidcDiscovery','%),\x20','_admissionStarted','entries','indexes','\x20\x20(name:\x20','types\x20--env\x20staging','__identity','[okdb]\x20invalid\x20','shmbuf.node','_wantDbHandle','signCookie','undefined','Create,\x20delete,\x20and\x20compact\x20environments.','[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','_kind','REQUEST_TIMEOUT','_computeStatus','VALIDATION_ERROR','View\x20peer\x20status\x20and\x20replication\x20stats.','shell','licenseType','note','OKDBNotFoundError','operation','RSA-SHA256','_onItem','_startedAt','\x20\x20(unlimited)','_totalReads','perf_hooks','\x20references\x20','changes','\x20\x20✓\x20','finally','_totalWrites','FTS_DROP','decodeLicenseBlob','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','sync','instances','\x20uses\x20raw\x20bodyMode\x20without\x20addRaw/raw\x20route\x20metadata','_coordinator','Environment\x20lifecycle.\x20Listing\x20and\x20creating\x20envs\x20is\x20system-level.','_activateProcesses','importBlobs','\x20\x20\x20\x20admin:\x20\x20\x20http://localhost:','options','runtimeProcessesView',',\x20which\x20still\x20exists\x20—\x20the\x20restored\x20','[okdb]\x20preserved:\x20','\x20\x20✓\x20Revoked\x20token\x20','geo','\x20\x20✓\x20~blobs\x20\x20(','importJSON','email','noRepl','readInt32LE','EXPIRES','\x20cf-ray=','destroy','/type/users/item/alice\x0a\x20\x20\x20\x20','_buildOwnRow','holder','ceil','_dedupeKey','_adminRelay','--inspect','readUInt16BE','Bearer\x20$1…','_validateOidcAccessToken','database\x20path\x20not\x20writable:\x20','setupPrimary','--open','\x20\x20[okdb]\x20closed\x20cleanly\x0a','drop','hasCanonical','ID\x20token\x20is\x20not\x20accepted','_listenAddr','Forbidden\x20—\x20no\x20permissions\x20available','application/x-www-form-urlencoded','node:events','changed','setEncoding','quit','BOOTSTRAP_LOCALHOST_ONLY','includes','Foreign\x20key\x20violation:\x20','index:reset','formatCookie','\x20\x20[','register','\x20\x20skipped:\x20','_buildProcessingFacet','envsOpen','\x20process(es)\x20that\x20could\x20map\x20these\x20','inflightAgesMs','open\x20','code','BAD_REQUEST','list','../','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','_shouldWrapResponse','isHeld','hasLimit','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','digest','fields','write','exportToStream','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','_blobPath','3brZLlM','registry-publish','UNIQUE_CONSTRAINT','_caps','\x20worker(s)\x20still\x20serving','okdb.pid','\x20died\x20','body','_desiredOverlay','release','\x20license(s)','percentile','beforeWrite','[okdb]\x20close\x20error:\x20','http-server','start','registerIndex','__OKDB_PUB_FINGERPRINT__','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','number','Unknown\x20JWKS\x20kid:\x20','shmbuf/package.json','publishChildRow','kdb_admin_csrf','_licenseHash','config','SIGINT','[okdb]\x20reset:\x20','target\x20','--password','/api/','system:env_release','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','blindCommands','cf-connecting-ip','bus:poke','addRaw','\x20(deleted)','cors','match','_dispatch','querySchema','scope','[okdb]\x20error:\x20--password\x20requires\x20--name','registerFts','value','ORPHAN\x20(env-closed\x20write)','call','is\x20required','INDEX_RESET','\x22\x20matches\x20','writes=','/dev/shm/','_scheduleFlush','--env','json','type/users/query\x20{\x22active\x22:true}','hint','processorId','origins','bus:type_drop','unlinked','Forbidden\x20—\x20requires\x20','removeSupervisedChild','writeMs','files/','_bucketIdx','Blob\x20storage:\x20large\x20file\x20uploads\x20attached\x20to\x20records\x20or\x20stored\x20standalone.','MAX_POOL_HOLDS','isSystem','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','SYSTEM_STOPPED','threads','timingSafeEqual','log','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20worker\x20slot=','\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','isWorker','INTERNAL_ERROR','once','\x20deleted','\x20env','username','jwks_uri','wait','migrate','\x20fetching\x20','type/users','uncaughtException','_pending','addedAt','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','[okdb]\x20exported\x20\x20types=','\x20\x20\x20\x20features:\x20\x20','env','_startHeartbeat','\x1b[0m','toUpperCase','decommissioning','update','--drop','\x20statusEnv=','[okdb]\x20restore\x20complete\x20—\x20full-text\x20indexes\x20rebuild\x20on\x20first\x20open','\x20has\x20canonical\x20metadata\x20but\x20missing\x20valid\x20inputSchema','(none)','_userPhase','[okdb]\x20shmbuf\x20native\x20binding\x20unavailable\x20—\x20multi-process\x20clustering\x20is\x20unsafe\x20','loop-lag','connected','delete','scanned','\x20\x20\x20\x20writes:\x20\x20\x20\x20','OKDBError','Read','licenses','slot','_nodeDbFor','_getJwkKey','bus:drain','View\x20server\x20info,\x20logs,\x20SSE\x20event\x20streams,\x20processor\x20status,\x20backup\x20list.','responseStatuses','question','isPrimary','dead','node\x20','expired','deletedAllocated','~processes','_durs','[okdb]\x20cluster\x20supervisor\x20pid=','ttl:expired','x-forwarded-for','\x20\x20kept\x20(attached/retiring\x20when\x20retired)\x20','dropIndex','_done','_wantDb','node/','setPrompt','now','guards','Operator\x20surface:\x20server\x20info,\x20logs,\x20event\x20streams,\x20processor\x20status,\x20backups.','_resolveEnv','Type\x20definitions,\x20all\x20index\x20registrations\x20(byIndex,\x20FTS,\x20vector),\x20and\x20TTL\x20policy.','error:\x20','magenta','__fts:','OKDBInvalidIndexKeyError','DELETE\x20type/users/item/x','JWT\x20signature\x20verification\x20failed','_envs','index:progress','[okdb]\x20starting…\x0a','OKDBIndexAlreadyRegisteredError','MALFORMED_TOKEN','PUBLIC_KEY_PEM','_removeRowAsync','_nestedTotal','\x20\x20✗','\x20is\x20inside\x20the\x20backup\x20','destroyed','identity','26836980oqcwMG',']\x20already\x20maps\x20to\x20\x27','Examples','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','The\x20following\x20routes\x20require\x20auth\x20but\x20declare\x20no\x20permission:\x0a\x20\x20','workers','\x22\x20in\x20env\x20\x22','integer','features','node','--name','maxBodyBytes','clock','Unknown\x20error','database\x20path\x20writable:\x20','close','oldestPendingMs','stop','unique:violation_resolved','closed','setNoDelay','Auth','_heartbeatInFlight','spki','ftruncateSync','\x20named\x20by\x20okdb\x20≤\x202.4.0)','PERMISSIONS','line','\x20\x20\x20\x20\x20http://localhost:','additionalProperties','compareExchange','hash','depth','trimStart','path','fork','_enqueuedAt','header','warn','\x20\x20in\x20use\x20(mapped/fd)\x20','Gate\x20flag\x20required\x20to\x20touch\x20system\x20types\x20(those\x20whose\x20name\x20starts\x20with\x20\x22~\x22).\x20Combined\x20with\x20the\x20underlying\x20namespace\x20permission.','repeat','POST','precision','ver','_onPending','Version\x20mismatch\x20for\x20','headers',';\x20SameSite=','\x20(expires\x20','OKDBForeignKeyDeleteError','single','ms\x20max=','_groupByProcess','candidateAllocated','targetType','\x1b[37m','instanceId','fieldPath','debug','_runMiddlewares','system:proc','FTS_REGISTERED','afterWrite','\x20already\x20in\x20use','_readNDJSON','_copyDir','_migrateVocab','examples','\x22\x20—\x20choose\x20a\x20directory\x20outside\x20it','valid','data:write','--username','tags:\x20','_holderDead','[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping','record','stopHeartbeat','dedupeMax','_isReader','\x1b[34m','Writable','ref:violation_resolved','help','\x20<\x20','STATUS','--new-identity','default','processing','system:stopped','bold','_onProcEvent','text/event-stream;\x20charset=utf-8','metrics','category','\x20\x20+','__okdbSlot','realpathSync','access:\x20','_acquiredAt','clear','hard-killed','entry','\x20\x20matching\x20prefix\x20\x20\x20\x20','processor:error','List\x20views,\x20query\x20view\x20output,\x20inspect\x20metadata\x20and\x20definition.','logs','push','token_use','Invalid\x20primary\x20key\x20type:\x20','Embeddings','LICENSE_HASH_MISMATCH','caps','exportEnvsToStream','active','createPublicKey','_singletonLock','remove','unlinkSync','_systemEnv','resetFts','_highWater','sort','\x22\x20already\x20exists','\x1b[2m','\x27:\x20','limits','data:read','compaction','data.mdb','/dev/shm','noteListenAddr','embeddings','error','\x20sync','Types','QUIT','INDEX_PROGRESS','_timer','procmode/','readUInt32BE','LICENSE_LIMIT_EXCEEDED','getRange','internalOnly','token_endpoint','ftsName','tokenSecret','allocUnsafe','green','\x20\x20✓\x20marked\x20for\x20a\x20new\x20identity\x20—\x20the\x20first\x20open\x20gives\x20this\x20copy\x20its\x20own\x20node\x20id','live\x20process\x20registry;\x20disposable','.log','transaction','unclaimed','_handleInProcess','wrong_node','sig','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','response','dropping','primary','clusterStatusView','pathname','closeAllConnections','processes:\x20','no\x20.kdbconfig\x20(using\x20defaults)','stats','freeze','\x0a[okdb]\x20error:\x20','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a','Records','(on\x20any\x20path\x20command)','sab','all','_hbTimer','_versionSkewWarned','sizeBefore','\x20\x20(','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','publishOwnRow','1968118fVVENs','bus:proc','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','setHeader','ready','/types\x0a\x20\x20\x20\x20','firstTs','references','_lastCpuAt','isAbsolute','epoch','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','workersFlag','ref:violation','fromEntries','_boot','OKDB-PIN-V1:','_ensureDesired','opendirSync','Usage:\x20okdb\x20shm-gc\x20[--dry-run]\x20[--prefix\x20<p>]\x20[--any-size]\x20[--force]\x20[--verbose]\x0a\x0aDelete\x20okdb\x20shared-memory\x20segments\x20in\x20/dev/shm\x20that\x20no\x20live\x20process\x20maps\x20or\x20holds\x20open\x0a(older\x20okdb\x20versions\x20never\x20unlinked\x20them).\x20Recognises\x20both\x20the\x20current\x20hashed\x20names\x0a(<path>-<hash>)\x20and\x20the\x20bare-path\x20names\x20of\x20okdb\x20<=\x202.4.0.\x20Linux\x20only.\x0a\x0a\x20\x20--dry-run,\x20-n\x20\x20\x20report\x20what\x20would\x20be\x20deleted,\x20delete\x20nothing\x0a\x20\x20--prefix\x20<p>\x20\x20\x20\x20only\x20names\x20starting\x20with\x20<p>\x20(default\x20\x22-tmp-\x22:\x20stores\x20under\x20/tmp;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x22\x22\x20=\x20every\x20okdb-shaped\x20name)\x0a\x20\x20--any-size\x20\x20\x20\x20\x20\x20don\x27t\x20require\x20an\x20okdb\x20segment\x20size\x0a\x20\x20--force\x20\x20\x20\x20\x20\x20\x20\x20\x20delete\x20even\x20if\x20some\x20same-user\x20process\x27s\x20maps\x20could\x20not\x20be\x20read\x0a\x20\x20--verbose,\x20-v\x20\x20\x20print\x20every\x20kept\x20segment\x20and\x20why','<json-body>','\x0a-----END\x20CERTIFICATE-----\x0a','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','rss','rawResponse','execArgv','type/','[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping','\x20tokens:','_publishNow','_lastTick','--verbose','https:','\x20(id:\x20','okdb-diag.','isFinite','KiB','\x20\x20·\x20\x20','processor:resumed','uri','~files','_assertUsable','[okdb]\x20warning:\x20could\x20not\x20read\x20node\x20identity/licenses\x20before\x20reset\x20(','sub','filter','application/json','hdr','./okdb-backup','geoConfig','configureAuth','isArray','removeSync','(null)','Payload\x20too\x20large','_validateOperationRequest','allowMethods','processor','kill','_statusEnv','\x20writes\x20(','requests','__writeCounter','getClock','HTTP_','routes','stdout','\x20\x20[okdb]\x20','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)'];_0xc0fe=function(){return _0x30ddda;};return _0xc0fe();}var require$$1=require(_0x3f6c2b(0x58f)),require$$0$1=require('fs'),require$$0=require('os'),require$$4$1=require('net'),require$$5$1=require('../okdb'),require$$0$3=require(_0x3f6c2b(0x432)),require$$2=require(_0x3f6c2b(0x322)),require$$5=require('stream'),require$$2$1=require('crypto'),require$$0$2=require('node:crypto'),require$$4=require(_0x3f6c2b(0x253)),require$$1$1=require('cluster'),require$$0$4=require(_0x3f6c2b(0x300)),require$$0$5=require(_0x3f6c2b(0x478)),require$$0$6=require(_0x3f6c2b(0x4ab)),require$$0$7=require(_0x3f6c2b(0x36a)),require$$1$2=require(_0x3f6c2b(0x1b8)),require$$2$2=require('url'),require$$2$3=require('worker_threads'),require$$3$1=require('shmbuf'),commonjsGlobal=typeof globalThis!=='undefined'?globalThis:typeof window!==_0x3f6c2b(0x466)?window:typeof global!==_0x3f6c2b(0x466)?global:typeof self!==_0x3f6c2b(0x466)?self:{};function getDefaultExportFromCjs(_0x4cb7c3){const _0x10fa29=_0x3f6c2b;return _0x4cb7c3&&_0x4cb7c3[_0x10fa29(0x41b)]&&Object[_0x10fa29(0x6aa)][_0x10fa29(0x371)][_0x10fa29(0x4fa)](_0x4cb7c3,_0x10fa29(0x5c4))?_0x4cb7c3[_0x10fa29(0x5c4)]:_0x4cb7c3;}var okdb$1={},okdbWorkers,hasRequiredOkdbWorkers;function requireOkdbWorkers(){if(hasRequiredOkdbWorkers)return okdbWorkers;hasRequiredOkdbWorkers=0x1;const _0x4691c3=require$$0,_0x1567dc=require$$0$1,_0x669d0f=require$$1;let _0x59ac37;function _0x425321(){const _0x54f0b4=_0x2ba0;if(process.env.OKDB_FORCE_SHMBUF_FALLBACK==='1')return![];if(_0x59ac37!==undefined)return _0x59ac37;try{const _0x17783a=_0x669d0f['dirname'](require['resolve'](_0x54f0b4(0x4e0)));_0x59ac37=_0x1567dc[_0x54f0b4(0x2d6)](_0x669d0f[_0x54f0b4(0x3de)](_0x17783a,_0x54f0b4(0x10b),_0x54f0b4(0x745),_0x54f0b4(0x463)));}catch{_0x59ac37=![];}return _0x59ac37;}function _0x1a3126(){const _0x43c410=_0x2ba0,_0x49cd9f=_0x4691c3[_0x43c410(0x25d)]()[_0x43c410(0x330)];return Math[_0x43c410(0x42f)](0x1,_0x49cd9f-0x1);}function _0x3eb5df(_0xda5373,_0x340958={}){const _0x555e63=_0x2ba0,_0xd0787a=_0x340958[_0x555e63(0x699)]!==undefined?_0x340958['shmbufNative']:_0x425321();let _0x4640e8;if(_0xda5373?.[_0x555e63(0x3db)])_0x4640e8=0x1;else{let _0x3f54f5,_0x27b060;if(_0xda5373?.[_0x555e63(0x62e)]!==undefined&&_0xda5373[_0x555e63(0x62e)]!==null&&_0xda5373['workersFlag']!=='')_0x3f54f5=_0xda5373[_0x555e63(0x62e)],_0x27b060=_0x555e63(0x676);else{if(process.env.OKDB_HTTP_WORKERS!==undefined&&process.env.OKDB_HTTP_WORKERS!=='')_0x3f54f5=process.env.OKDB_HTTP_WORKERS,_0x27b060='OKDB_HTTP_WORKERS';else _0xda5373?.[_0x555e63(0x36a)]?.[_0x555e63(0x572)]!==undefined&&_0xda5373[_0x555e63(0x36a)][_0x555e63(0x572)]!==null&&_0xda5373[_0x555e63(0x36a)]['workers']!==''&&(_0x3f54f5=_0xda5373[_0x555e63(0x36a)][_0x555e63(0x572)],_0x27b060=_0x555e63(0xd8));}if(_0x3f54f5===undefined)_0x4640e8=_0x1a3126();else{const _0x3bba6b=Number(_0x3f54f5);!Number['isInteger'](_0x3bba6b)||_0x3bba6b<0x1?(console[_0x555e63(0x593)](_0x555e63(0x462)+_0x27b060+'='+JSON[_0x555e63(0x1c5)](_0x3f54f5)+_0x555e63(0x233)),_0x4640e8=0x1):_0x4640e8=_0x3bba6b;}}return!_0xd0787a&&_0x4640e8>0x1&&(console['warn'](_0x555e63(0x536)+(_0x555e63(0x737)+_0x4640e8+').')),_0x4640e8=0x1),_0x4640e8;}return okdbWorkers={'isShmbufNative':_0x425321,'defaultWorkers':_0x1a3126,'resolveWorkers':_0x3eb5df},okdbWorkers;}var version=_0x3f6c2b(0x7ae),require$$3={'version':version},okdbMigrate={'exports':{}},okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x138acd extends Error{constructor(_0x4c91b3,_0x319686,_0x3d4e62={}){const _0x5e46d7=_0x2ba0;super(_0x4c91b3),this[_0x5e46d7(0x339)]=_0x5e46d7(0x53c),this['code']=_0x319686,this[_0x5e46d7(0x7cf)]=_0x3d4e62,_0x3d4e62[_0x5e46d7(0x7cb)]&&(this[_0x5e46d7(0x7cb)]=_0x3d4e62[_0x5e46d7(0x7cb)]),Error['captureStackTrace'](this,this['constructor']);}}class _0x136b8d extends _0x138acd{constructor(_0x3c4457,_0x1383ee,_0x382eae,_0x5a6343){const _0x482681=_0x2ba0;super(_0x482681(0x59b)+_0x3c4457+'@'+_0x1383ee+_0x482681(0x44b)+_0x382eae+',\x20got\x20'+_0x5a6343,_0x482681(0x450),{'type':_0x3c4457,'key':_0x1383ee,'expectedVersion':_0x382eae,'actualVersion':_0x5a6343}),this['name']=_0x482681(0x443);}}class _0x22f9e7 extends _0x138acd{constructor(_0x2d5f63,_0x5b2555){const _0x42670c=_0x2ba0;super(_0x2d5f63+'@'+_0x5b2555+_0x42670c(0x34f),_0x42670c(0x71f),{'type':_0x2d5f63,'key':_0x5b2555}),this[_0x42670c(0x339)]=_0x42670c(0x471);}}class _0x9a3fb6 extends _0x138acd{constructor(_0x2b7bed,_0x140450){const _0x12d649=_0x2ba0;super(_0x2b7bed+'@'+_0x140450+_0x12d649(0x2e4),_0x12d649(0x758),{'type':_0x2b7bed,'key':_0x140450}),this['name']='OKDBAlreadyExistsError';}}class _0x270510 extends _0x138acd{constructor(_0x2351ac,_0x364ed0){const _0x3fad3b=_0x2ba0,_0x1a5776=typeof _0x364ed0;super('Invalid\x20index\x20key\x20type\x20for\x20\x27'+_0x2351ac+_0x3fad3b(0x5ea)+_0x1a5776+_0x3fad3b(0x10e)+_0x364ed0,_0x3fad3b(0x3c8),{'index':_0x2351ac,'key':_0x364ed0,'keyType':_0x1a5776}),this[_0x3fad3b(0x339)]=_0x3fad3b(0x55e);}}class _0x379ca3 extends _0x138acd{constructor(_0x7b175a){const _0xc126f9=_0x2ba0,_0x3ad2c0=typeof _0x7b175a;super(_0xc126f9(0x5da)+_0x3ad2c0+'.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20'+_0x7b175a,_0xc126f9(0xcc),{'key':_0x7b175a,'keyType':_0x3ad2c0}),this['name']=_0xc126f9(0x6d2);}}class _0x36a44b extends _0x138acd{constructor(_0x433be5){const _0x5bd14b=_0x2ba0;super('Type\x20\x27'+_0x433be5+_0x5bd14b(0x77f),'TYPE_NOT_REGISTERED',{'type':_0x433be5}),this[_0x5bd14b(0x339)]=_0x5bd14b(0x430);}}class _0x211c69 extends _0x138acd{constructor(_0x559001){const _0x1a5b64=_0x2ba0;super(_0x1a5b64(0x2ab)+_0x559001+_0x1a5b64(0xc4),_0x1a5b64(0x2a1),{'type':_0x559001}),this[_0x1a5b64(0x339)]='OKDBTypeAlreadyRegisteredError';}}class _0x40a61a extends _0x138acd{constructor(_0x308fd0,_0x342ef3){const _0x1bd53b=_0x2ba0;super('Index\x20\x27'+_0x342ef3+_0x1bd53b(0x711)+_0x308fd0+_0x1bd53b(0x77f),_0x1bd53b(0x2b6),{'type':_0x308fd0,'index':_0x342ef3}),this[_0x1bd53b(0x339)]=_0x1bd53b(0x750);}}class _0x367e3b extends _0x138acd{constructor(_0x59cdb9,_0x5052f8){const _0x37ca23=_0x2ba0;super(_0x37ca23(0x251)+_0x5052f8+_0x37ca23(0x711)+_0x59cdb9+'\x27\x20is\x20already\x20registered',_0x37ca23(0x316),{'type':_0x59cdb9,'index':_0x5052f8}),this['name']=_0x37ca23(0x564);}}class _0x5e30d0 extends _0x138acd{constructor(_0x286ad8,_0x5c294b={}){const _0x30560c=_0x2ba0;super(_0x286ad8,'INVALID_VALUE',_0x5c294b),this[_0x30560c(0x339)]=_0x30560c(0x3cd);}}class _0x67d2a6 extends _0x138acd{constructor(_0x17e593,_0x330b48,_0x361d89,_0x26185e,_0x5216db){const _0x2090b5=_0x2ba0;super('Unique\x20constraint\x20violated\x20on\x20'+_0x17e593+'@'+_0x330b48+_0x2090b5(0x1f6)+_0x361d89+_0x2090b5(0x56e)+_0x26185e+_0x2090b5(0x2c8)+_0x5216db+'\x27',_0x2090b5(0x4cd),{'type':_0x17e593,'index':_0x330b48,'indexKey':_0x361d89,'existingKey':_0x26185e,'conflictingKey':_0x5216db}),this[_0x2090b5(0x339)]=_0x2090b5(0x40c);}}class _0x510044 extends _0x138acd{constructor(_0x2d0ae0,_0x336f21,_0x4aa795){const _0x5a14c6=_0x2ba0;super('Schema\x20validation\x20failed\x20for\x20'+_0x2d0ae0+'@'+_0x336f21,_0x5a14c6(0x76e),{'type':_0x2d0ae0,'key':_0x336f21,'errors':_0x4aa795}),this['name']='OKDBSchemaValidationError',this[_0x5a14c6(0x101)]=_0x2d0ae0,this[_0x5a14c6(0x17d)]=_0x336f21,this[_0x5a14c6(0x69e)]=_0x4aa795;}}class _0x2aa01a extends _0x138acd{constructor(_0x2a8db1,_0x5aaeda){const _0x497d6d=_0x2ba0;super(_0x497d6d(0x7b2)+_0x2a8db1+':\x20'+_0x5aaeda[_0x497d6d(0x330)]+'\x20documents\x20fail\x20validation',_0x497d6d(0x683),{'type':_0x2a8db1,'failures':_0x5aaeda}),this[_0x497d6d(0x339)]='OKDBSchemaCollectionError',this[_0x497d6d(0x101)]=_0x2a8db1,this['failures']=_0x5aaeda;}}class _0x1d628d extends _0x138acd{constructor(_0x48e638,_0x12d367,_0x5dc49c,_0x31a40c,_0x5600cd){const _0xfcd9b8=_0x2ba0;super(_0xfcd9b8(0x4b1)+_0x48e638+'@'+_0x12d367+'.'+_0x5dc49c+_0xfcd9b8(0x479)+_0x31a40c+'@'+_0x5600cd+_0xfcd9b8(0x7a9),_0xfcd9b8(0x413),{'sourceType':_0x48e638,'sourceKey':_0x12d367,'fieldPath':_0x5dc49c,'targetType':_0x31a40c,'targetKey':_0x5600cd}),this['name']='OKDBForeignKeyError',this['sourceType']=_0x48e638,this['sourceKey']=_0x12d367,this[_0xfcd9b8(0x5a7)]=_0x5dc49c,this['targetType']=_0x31a40c,this[_0xfcd9b8(0x6c1)]=_0x5600cd;}}class _0x3119e9 extends _0x138acd{constructor(_0x53c127,_0x348a36,_0xf682e){const _0x4ee726=_0x2ba0;super(_0x4ee726(0x6f6)+_0x53c127+'@'+_0x348a36+':\x20'+_0xf682e[_0x4ee726(0x330)]+'\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','FOREIGN_KEY_DELETE_RESTRICTED',{'targetType':_0x53c127,'targetKey':_0x348a36,'references':_0xf682e}),this[_0x4ee726(0x339)]=_0x4ee726(0x59f),this[_0x4ee726(0x5a4)]=_0x53c127,this['targetKey']=_0x348a36,this[_0x4ee726(0x629)]=_0xf682e;}}class _0x4845e4 extends _0x138acd{constructor(_0x10a4b6,_0x5ae568,_0x5d8d00){const _0x17dfd8=_0x2ba0;super(_0x17dfd8(0x26f)+_0x5ae568+_0x17dfd8(0xed)+_0x10a4b6+'\x22\x20is\x20used\x20by:\x20'+_0x5d8d00[_0x17dfd8(0x6d7)](_0x39fab2=>_0x39fab2[_0x17dfd8(0x26d)]+':'+_0x39fab2[_0x17dfd8(0x339)])[_0x17dfd8(0x3de)](',\x20'),_0x17dfd8(0x11d),{'type':_0x10a4b6,'index':_0x5ae568,'usedBy':_0x5d8d00}),this[_0x17dfd8(0x339)]='OKDBIndexHasConsumersError';}}return okdbError={'OKDBError':_0x138acd,'OKDBVersionMismatchError':_0x136b8d,'OKDBNotFoundError':_0x22f9e7,'OKDBAlreadyExistsError':_0x9a3fb6,'OKDBInvalidIndexKeyError':_0x270510,'OKDBInvalidPrimaryKeyError':_0x379ca3,'OKDBTypeNotRegisteredError':_0x36a44b,'OKDBTypeAlreadyRegisteredError':_0x211c69,'OKDBIndexNotRegisteredError':_0x40a61a,'OKDBIndexAlreadyRegisteredError':_0x367e3b,'OKDBInvalidValueError':_0x5e30d0,'OKDBUniqueConstraintError':_0x67d2a6,'OKDBSchemaValidationError':_0x510044,'OKDBSchemaCollectionError':_0x2aa01a,'OKDBForeignKeyError':_0x1d628d,'OKDBForeignKeyDeleteError':_0x3119e9,'OKDBIndexHasConsumersError':_0x4845e4},okdbError;}var hasRequiredOkdbMigrate;function requireOkdbMigrate(){const _0xa84743=_0x3f6c2b;if(hasRequiredOkdbMigrate)return okdbMigrate[_0xa84743(0x6a4)];hasRequiredOkdbMigrate=0x1;const _0x33a385=require$$0$1,_0x1611d6=require$$1,_0x370ef8=require$$2,{OKDBError:_0x3db65d}=requireOkdbError(),_0x5531a7=_0xa84743(0x592),_0x520b56=_0xa84743(0x52a),_0x45c8b1='schema',_0x12887b='data',_0x2009e5=_0xa84743(0x241),_0x2f71b9=0x1f4,_0x12635a=0x3e8,_0x44ae71='okdb-backup.json';async function _0x175639(_0x29830c,_0x3642ce,_0x5c3f3b,_0x10769d){const _0x2e05ab=_0xa84743;if(_0x29830c){await _0x29830c[_0x2e05ab(0x42c)](_0x5c3f3b,Boolean(_0x10769d));return;}const _0x108f0d=_0x370ef8[_0x2e05ab(0x375)](_0x3642ce,{'readOnly':!![],'maxDbs':0x8});try{await _0x108f0d[_0x2e05ab(0x42c)](_0x5c3f3b,Boolean(_0x10769d));}finally{await _0x108f0d[_0x2e05ab(0x57c)]();}}const _0x539ca6=()=>new Promise(_0x3ca3ef=>setImmediate(_0x3ca3ef));function _0xc05d1c(_0x2b358c,_0x38433){const _0x1b4142=_0xa84743;if(_0x2b358c[_0x1b4142(0x4c7)](_0x38433))return Promise[_0x1b4142(0x2f4)]();return new Promise((_0x2dbd6d,_0x3ebdd6)=>{const _0x55c330=_0x1b4142,_0x5d29c7=_0x5dcbd2=>{const _0x205d6e=_0x2ba0;_0x2b358c[_0x205d6e(0x77b)]?.(_0x205d6e(0x21b),_0x5096e0),_0x2b358c[_0x205d6e(0x77b)]?.(_0x205d6e(0x5f2),_0x2a5120),_0x2b358c['off']?.(_0x205d6e(0x57c),_0x4a2139);if(_0x5dcbd2)_0x3ebdd6(_0x5dcbd2);else _0x2dbd6d();},_0x5096e0=()=>_0x5d29c7(),_0x2a5120=_0x3bbb88=>_0x5d29c7(_0x3bbb88),_0x4a2139=()=>_0x5d29c7(new Error(_0x55c330(0x106)));_0x2b358c[_0x55c330(0x51b)](_0x55c330(0x21b),_0x5096e0),_0x2b358c[_0x55c330(0x51b)](_0x55c330(0x5f2),_0x2a5120),_0x2b358c[_0x55c330(0x51b)]('close',_0x4a2139);});}async function _0x16e5e3(_0x257dcc,_0xa7199f,_0x3cc12b){const _0x21d0f0=_0xa84743;let _0x2bc9ce=0x0,_0x18a72a,_0x4cfece=!![];for(;;){const _0x399a14={'snapshot':!![],'limit':_0x12635a};!_0x4cfece&&(_0x399a14[_0x21d0f0(0x4da)]=_0x18a72a,_0x399a14['exclusiveStart']=!![]);_0x4cfece=![];const _0x2e622a=Array[_0x21d0f0(0x309)](_0xa7199f[_0x21d0f0(0x5fb)](_0x399a14));if(_0x2e622a[_0x21d0f0(0x330)]===0x0)break;let _0x2aab3b='';for(const _0x288644 of _0x2e622a)_0x2aab3b+=_0x3cc12b(_0x288644)+'\x0a';_0x18a72a=_0x2e622a[_0x2e622a['length']-0x1][_0x21d0f0(0x17d)],_0x2bc9ce+=_0x2e622a[_0x21d0f0(0x330)],await _0xc05d1c(_0x257dcc,_0x2aab3b);if(_0x2e622a[_0x21d0f0(0x330)]<_0x12635a)break;await _0x539ca6();}return _0x2bc9ce;}class _0x212070{constructor(_0x14be71){const _0x472f0c=_0xa84743;this[_0x472f0c(0x7c7)]=_0x14be71;}[_0xa84743(0x559)](_0x17c0a9='default'){return this['okdb']['env'](_0x17c0a9);}async['_resolveOrCreateEnv'](_0xb5eeca=_0xa84743(0x5c4)){const _0x192002=_0xa84743;return!this[_0x192002(0x7c7)][_0x192002(0x561)][_0x192002(0x229)](_0xb5eeca)&&await this[_0x192002(0x7c7)][_0x192002(0x141)](_0xb5eeca,{'sync':!![]}),this[_0x192002(0x7c7)][_0x192002(0x52a)](_0xb5eeca);}['_listTypes'](_0xe5dcce,_0x3a00ec){const _0x493506=_0xa84743,_0x12838c=[..._0xe5dcce[_0x493506(0x23a)][_0x493506(0x7a5)]()][_0x493506(0x64e)](_0x12a75e=>!_0x12a75e[_0x493506(0x1a9)]('~')&&!_0x12a75e[_0x493506(0x1a9)](_0x493506(0x55d)));if(!_0x3a00ec)return _0x12838c;return _0x12838c[_0x493506(0x64e)](_0x548fcf=>_0x3a00ec[_0x493506(0x4b0)](_0x548fcf));}[_0xa84743(0x284)](_0x1ec112,_0x4c184b){const _0x5c542d=_0xa84743,_0x58ffc6=_0x1ec112[_0x5c542d(0x3a2)][_0x5c542d(0x294)](_0x4c184b),_0x467e11=_0x1ec112[_0x5c542d(0x23a)][_0x5c542d(0x294)](_0x4c184b)||{},_0x4db4fe=[];for(const [,_0x4440d4]of _0x58ffc6?.[_0x5c542d(0x122)]??new Map()){const _0x3deeb3={'fields':_0x4440d4[_0x5c542d(0x66d)]};if(_0x4440d4[_0x5c542d(0x652)])_0x3deeb3[_0x5c542d(0x48e)]=_0x4440d4[_0x5c542d(0x652)];if(_0x4440d4[_0x5c542d(0x315)])_0x3deeb3[_0x5c542d(0x315)]=!![];_0x4db4fe[_0x5c542d(0x5d8)](_0x3deeb3);}const _0x28ceb={};for(const [_0x215894,_0x58cde3]of Object['entries'](_0x467e11[_0x5c542d(0x772)]||{})){_0x28ceb[_0x215894]={'fields':_0x58cde3[_0x5c542d(0x4e4)]?.['fields'],'tokenizer':_0x58cde3[_0x5c542d(0x4e4)]?.[_0x5c542d(0x687)]};}const _0x4d2429={'indexes':_0x4db4fe,'ftsIndexes':_0x28ceb};return _0x467e11[_0x5c542d(0x162)]&&(_0x4d2429[_0x5c542d(0x162)]=_0x467e11[_0x5c542d(0x162)]),_0x4d2429;}async[_0xa84743(0x4c8)](_0xe79776,_0x223804={}){const _0x1eeb1a=_0xa84743,{envName:envName=_0x1eeb1a(0x5c4),types:types=null,includeChanges:includeChanges=![],_noHeader:_noHeader=![]}=_0x223804,_0x4aff99=this[_0x1eeb1a(0x559)](envName),_0x1eaed3=this[_0x1eeb1a(0x277)](_0x4aff99,types);let _0x58459f=0x0,_0x27b1ae=0x0;!_noHeader&&await _0xc05d1c(_0xe79776,JSON[_0x1eeb1a(0x1c5)]({'r':_0x5531a7,'kdbVersion':require$$3['version'],'exportedAt':Date[_0x1eeb1a(0x556)](),'envName':envName})+'\x0a');for(const _0x2944cb of _0x1eaed3){const _0x173d0e=_0x4aff99['typeSubDbs'][_0x1eeb1a(0x294)](_0x2944cb);if(!_0x173d0e)continue;const _0x51d078=this[_0x1eeb1a(0x284)](_0x4aff99,_0x2944cb);await _0xc05d1c(_0xe79776,JSON[_0x1eeb1a(0x1c5)]({'r':_0x45c8b1,'type':_0x2944cb,..._0x51d078})+'\x0a'),_0x58459f+=await _0x16e5e3(_0xe79776,_0x173d0e['data'],({key:_0x2864e6,value:_0x75cae8,version:_0x274ca2})=>JSON[_0x1eeb1a(0x1c5)]({'r':_0x12887b,'t':_0x2944cb,'k':_0x2864e6,'v':_0x75cae8,'ver':_0x274ca2}));}return includeChanges&&_0x4aff99[_0x1eeb1a(0x79a)]&&(_0x27b1ae=await _0x16e5e3(_0xe79776,_0x4aff99[_0x1eeb1a(0x79d)],({key:_0x51b09b,value:_0x31455b})=>JSON['stringify']({'r':_0x2009e5,'clock':_0x51b09b,'event':_0x31455b}))),{'types':_0x1eaed3['length'],'records':_0x58459f,'changes':_0x27b1ae};}async[_0xa84743(0x6ec)](_0x4534b1,_0x5f005c={}){const _0x47d225=_0xa84743;_0x33a385['mkdirSync'](_0x1611d6[_0x47d225(0x334)](_0x4534b1),{'recursive':!![]});const _0x18d79c=_0x33a385[_0x47d225(0x28a)](_0x4534b1),_0x51c98d=await this[_0x47d225(0x4c8)](_0x18d79c,_0x5f005c);return await new Promise((_0x581d77,_0x18afc8)=>{const _0xc3e7d2=_0x47d225;_0x18d79c[_0xc3e7d2(0x1bd)](),_0x18d79c['once'](_0xc3e7d2(0x416),_0x581d77),_0x18d79c['once'](_0xc3e7d2(0x5f2),_0x18afc8);}),{..._0x51c98d,'filePath':_0x4534b1};}async[_0xa84743(0x5de)](_0x4cbdf0,_0x25aa78={}){const _0xc3074b=_0xa84743,{envNames:envNames=null,types:types=null,includeChanges:includeChanges=![]}=_0x25aa78,_0x23531e=[...this[_0xc3074b(0x7c7)][_0xc3074b(0x561)][_0xc3074b(0x434)]()][_0xc3074b(0x64e)](_0x4ba17e=>!_0x4ba17e['startsWith']('~')),_0x540448=envNames?_0x23531e['filter'](_0x596af3=>envNames[_0xc3074b(0x4b0)](_0x596af3)):_0x23531e;await _0xc05d1c(_0x4cbdf0,JSON['stringify']({'r':_0x5531a7,'kdbVersion':require$$3[_0xc3074b(0x1ce)],'exportedAt':Date[_0xc3074b(0x556)](),'envNames':_0x540448})+'\x0a');let _0x195d24=0x0,_0x34f7e5=0x0,_0x394261=0x0;for(const _0x328423 of _0x540448){await _0xc05d1c(_0x4cbdf0,JSON[_0xc3074b(0x1c5)]({'r':_0x520b56,'name':_0x328423})+'\x0a');const _0x267537=await this['exportToStream'](_0x4cbdf0,{'envName':_0x328423,'types':types,'includeChanges':includeChanges,'_noHeader':!![]});_0x195d24+=_0x267537['types'],_0x34f7e5+=_0x267537[_0xc3074b(0x6de)],_0x394261+=_0x267537['changes'];}return{'envs':_0x540448[_0xc3074b(0x330)],'types':_0x195d24,'records':_0x34f7e5,'changes':_0x394261};}async['importFromStream'](_0x3fca4b,_0x495ae1={}){const _0x486807=_0xa84743,{envName:_0x816d79=null,types:_0x4c9b41=null,dropExisting:dropExisting=![],batchSize:batchSize=_0x2f71b9,includeChanges:includeChanges=![],onProgress:onProgress=null}=_0x495ae1;let _0x3ccb22=_0x816d79??_0x486807(0x5c4),_0x37a42c=null,_0x4bf5cd=0x0,_0x228422=0x0,_0x22bbb8=0x0,_0x3d693f=null,_0x20c188=[];const _0x58f4d5=[],_0x57157a=async()=>{const _0x89f698=_0x486807;if(!_0x20c188[_0x89f698(0x330)]||!_0x3d693f||!_0x37a42c)return;await _0x37a42c[_0x89f698(0x37f)][_0x89f698(0x605)](()=>{const _0x45d156=_0x89f698;for(const {k:_0x33807e,v:_0x36864e,ver:_0x35c2d1}of _0x20c188){_0x37a42c['_put'](null,_0x3d693f,_0x33807e,_0x36864e,{'version':_0x35c2d1,'origin':_0x45d156(0x73f)});}}),_0x228422+=_0x20c188['length'],onProgress?.({'type':_0x3d693f,'count':_0x228422}),_0x20c188=[];};await this[_0x486807(0x5ae)](_0x3fca4b,async _0x14476f=>{const _0xb6374b=_0x486807,_0xae76a4=_0x14476f['r'];if(_0xae76a4===_0x5531a7){if(!_0x816d79&&_0x14476f['envName'])_0x3ccb22=_0x14476f[_0xb6374b(0x1a0)];_0x37a42c=await this[_0xb6374b(0x3d5)](_0x3ccb22);return;}if(!_0x37a42c)_0x37a42c=await this[_0xb6374b(0x3d5)](_0x3ccb22);if(_0xae76a4===_0x520b56){await _0x57157a(),_0x3d693f=null,_0x3ccb22=_0x816d79??_0x14476f['name'],_0x37a42c=await this['_resolveOrCreateEnv'](_0x3ccb22);return;}if(_0xae76a4===_0x45c8b1){const {type:_0x5c5100,indexes:indexes=[],ftsIndexes:ftsIndexes={},schema:_0x25b699}=_0x14476f;if(_0x4c9b41&&!_0x4c9b41['includes'](_0x5c5100))return;await _0x57157a(),_0x3d693f=_0x5c5100;dropExisting&&_0x37a42c[_0xb6374b(0x79e)](_0x5c5100)&&await _0x37a42c['dropType'](_0x5c5100);!_0x37a42c[_0xb6374b(0x79e)](_0x5c5100)&&(await _0x37a42c[_0xb6374b(0x349)](_0x5c5100),_0x4bf5cd++);for(const _0x3cb21d of indexes){if(!_0x37a42c[_0xb6374b(0x171)](_0x5c5100,_0x3cb21d[_0xb6374b(0x4c6)])){const _0x3227eb={};_0x3cb21d[_0xb6374b(0x48e)]&&(_0x3227eb[_0xb6374b(0x101)]=_0xb6374b(0x48e),_0x3227eb[_0xb6374b(0x598)]=_0x3cb21d['geo'][_0xb6374b(0x598)]);if(_0x3cb21d[_0xb6374b(0x315)])_0x3227eb['unique']=!![];await _0x37a42c[_0xb6374b(0x4db)](_0x5c5100,_0x3cb21d[_0xb6374b(0x4c6)],_0x3227eb);}}for(const [_0x164796,_0x56a8c6]of Object[_0xb6374b(0x45d)](ftsIndexes)){!this[_0xb6374b(0x7c7)][_0xb6374b(0xe3)]['has'](_0x5c5100,_0x164796,_0x37a42c)&&await this[_0xb6374b(0x7c7)][_0xb6374b(0xe3)][_0xb6374b(0x4b5)](_0x5c5100,_0x164796,{'fields':_0x56a8c6[_0xb6374b(0x4c6)],'tokenizer':_0x56a8c6[_0xb6374b(0x687)]},undefined,_0x37a42c);}_0x25b699?.['definition']&&_0x58f4d5[_0xb6374b(0x5d8)]({'env':_0x37a42c,'type':_0x5c5100,'schema':_0x25b699});return;}if(_0xae76a4===_0x12887b){if(_0x4c9b41&&!_0x4c9b41['includes'](_0x14476f['t']))return;_0x14476f['t']!==_0x3d693f&&(await _0x57157a(),_0x3d693f=_0x14476f['t']);_0x20c188[_0xb6374b(0x5d8)]({'k':_0x14476f['k'],'v':_0x14476f['v'],'ver':_0x14476f['ver']});if(_0x20c188[_0xb6374b(0x330)]>=batchSize)await _0x57157a();return;}_0xae76a4===_0x2009e5&&includeChanges&&_0x37a42c[_0xb6374b(0x79a)]&&(_0x37a42c[_0xb6374b(0x79d)][_0xb6374b(0xc1)](_0x14476f[_0xb6374b(0x579)],_0x14476f[_0xb6374b(0x304)]),_0x22bbb8++);}),await _0x57157a();for(const {env:_0x45d0b5,type:_0x1e3211,schema:_0xdff1c0}of _0x58f4d5){try{await _0x45d0b5[_0x486807(0x1ca)](_0x1e3211,_0xdff1c0);}catch{if(_0xdff1c0[_0x486807(0x73a)])try{await _0x45d0b5['setSchema'](_0x1e3211,{..._0xdff1c0,'enforce':![]});}catch{}}}return{'types':_0x4bf5cd,'records':_0x228422,'changes':_0x22bbb8};}async[_0xa84743(0x2f0)](_0x11d69b,_0x3515f6={}){const _0x267125=_0xa84743,_0x1b920f=_0x33a385[_0x267125(0x208)](_0x11d69b,{'encoding':_0x267125(0x3f0)});return this['importFromStream'](_0x1b920f,_0x3515f6);}[_0xa84743(0x5ae)](_0x3c2f31,_0x348a4d){return new Promise((_0x1f2cff,_0x4bc397)=>{const _0x41496c=_0x2ba0;let _0x1ddad5='',_0xbc69fb=Promise['resolve']();const _0x22d805=async _0x92fa1e=>{const _0x2c148b=_0x2ba0;_0x1ddad5+=_0x92fa1e;const _0x515656=_0x1ddad5[_0x2c148b(0x1e8)]('\x0a');_0x1ddad5=_0x515656['pop']();for(const _0x385c1d of _0x515656){const _0x33ed39=_0x385c1d['trim']();if(!_0x33ed39)continue;let _0x2899b7;try{_0x2899b7=JSON['parse'](_0x33ed39);}catch{continue;}await _0x348a4d(_0x2899b7);}};_0x3c2f31['on'](_0x41496c(0x29a),_0x426d2a=>{_0xbc69fb=_0xbc69fb['then'](()=>_0x22d805(String(_0x426d2a)));}),_0x3c2f31['on'](_0x41496c(0x1bd),()=>{const _0x2f0ad3=_0x41496c;_0xbc69fb['then'](async()=>{const _0x11599e=_0x2ba0,_0x29436c=_0x1ddad5[_0x11599e(0x7ad)]();if(_0x29436c)try{await _0x348a4d(JSON[_0x11599e(0x2e3)](_0x29436c));}catch{}_0x1f2cff();})[_0x2f0ad3(0x290)](_0x4bc397);}),_0x3c2f31['on'](_0x41496c(0x5f2),_0x4bc397);});}async[_0xa84743(0x42c)](_0x45e9a2,_0x1fda99={}){const _0x15a6e5=_0xa84743,{envNames:envNames=null,compact:compact=!![]}=_0x1fda99,_0x322ee3=this[_0x15a6e5(0x7c7)],_0x75375e=_0x1611d6[_0x15a6e5(0x2f4)](_0x322ee3[_0x15a6e5(0x58f)]),_0x46e1ec=_0x1611d6[_0x15a6e5(0x2f4)](_0x45e9a2),_0x54e6de=_0x1611d6['relative'](_0x75375e,_0x46e1ec);if(_0x54e6de===''||!(_0x54e6de[_0x15a6e5(0x1a9)]('..')||_0x1611d6[_0x15a6e5(0x62b)](_0x54e6de)))throw new _0x3db65d(_0x15a6e5(0x1c2)+_0x46e1ec+_0x15a6e5(0x38e)+_0x75375e+_0x15a6e5(0x5b2),_0x15a6e5(0x34e));if(_0x33a385['existsSync'](_0x46e1ec)&&_0x33a385[_0x15a6e5(0x783)](_0x46e1ec)[_0x15a6e5(0x330)]>0x0)throw new _0x3db65d(_0x15a6e5(0x1c2)+_0x46e1ec+'\x22\x20is\x20not\x20empty\x20—\x20backups\x20never\x20overwrite;\x20choose\x20a\x20new\x20directory','BACKUP_DEST_NOT_EMPTY');_0x33a385[_0x15a6e5(0x1b1)](_0x46e1ec,{'recursive':!![]});const _0x2e2c5c=envNames?new Set([...envNames,_0x15a6e5(0xdc)]):null,_0x312250=[],_0x2e25f8=[],_0x10bf96=[];for(const [_0x24ce40,_0x4f00bb]of[..._0x322ee3[_0x15a6e5(0x561)][_0x15a6e5(0x45d)]()]){if(_0x2e2c5c&&!_0x2e2c5c[_0x15a6e5(0x229)](_0x24ce40))continue;if(_0x24ce40===_0x15a6e5(0x54b))continue;if(!_0x4f00bb['_isOpen']||!_0x4f00bb['db']){_0x2e25f8[_0x15a6e5(0x5d8)]({'name':_0x24ce40,'reason':_0x15a6e5(0x2d9)});continue;}const _0x4fbd33=_0x1611d6[_0x15a6e5(0x2f4)](_0x4f00bb['path']),_0x3b6c0a=_0x1611d6[_0x15a6e5(0x193)](_0x75375e,_0x4fbd33),_0x2b1667=_0x3b6c0a===''||_0x3b6c0a[_0x15a6e5(0x1a9)]('..')||_0x1611d6[_0x15a6e5(0x62b)](_0x3b6c0a),_0x108f1d=_0x2b1667?_0x322ee3['_safeEnvDirName'](_0x24ce40):_0x3b6c0a,_0x5d4540=_0x1611d6[_0x15a6e5(0x3de)](_0x46e1ec,_0x108f1d);_0x33a385[_0x15a6e5(0x1b1)](_0x5d4540,{'recursive':!![]});const _0x2406df=_0x1611d6[_0x15a6e5(0x3de)](_0x4fbd33,_0x15a6e5(0x68b));let _0x23aa70=![];if(_0x33a385['existsSync'](_0x1611d6[_0x15a6e5(0x3de)](_0x2406df,_0x15a6e5(0x5ee)))){const _0x5dbce7=_0x1611d6[_0x15a6e5(0x3de)](_0x5d4540,_0x15a6e5(0x68b));_0x33a385['mkdirSync'](_0x5dbce7,{'recursive':!![]}),await _0x175639(_0x4f00bb[_0x15a6e5(0x11f)]?.[_0x15a6e5(0x29b)]?.['db'],_0x2406df,_0x5dbce7,compact),_0x23aa70=!![];}let _0x326044=0x0;try{_0x326044=_0x33a385[_0x15a6e5(0x3b7)](_0x1611d6[_0x15a6e5(0x3de)](_0x4fbd33,_0x15a6e5(0x5ee)))[_0x15a6e5(0x6ca)];}catch{}await _0x4f00bb['db'][_0x15a6e5(0x42c)](_0x5d4540,Boolean(compact));let _0x302be0=0x0;try{_0x302be0=_0x33a385[_0x15a6e5(0x3b7)](_0x1611d6[_0x15a6e5(0x3de)](_0x5d4540,'data.mdb'))['size'];}catch{}_0x312250['push']({'name':_0x24ce40,'dest':_0x5d4540,'sizeBefore':_0x326044,'sizeAfter':_0x302be0,'timeMachine':_0x23aa70}),_0x10bf96[_0x15a6e5(0x5d8)]({'name':_0x24ce40,'dir':_0x108f1d,'timeMachine':_0x23aa70,..._0x2b1667?{'outOfTree':_0x2b1667,'sourcePath':_0x4fbd33}:{}});}for(const [_0x594025,_0x27cab9]of _0x322ee3['_quarantinedEnvs']??[]){if(_0x2e2c5c&&!_0x2e2c5c[_0x15a6e5(0x229)](_0x594025))continue;_0x2e25f8[_0x15a6e5(0x5d8)]({'name':_0x594025,'reason':_0x15a6e5(0xc5)+(_0x27cab9?.[_0x15a6e5(0x5f2)]??'failed\x20to\x20open')});}const _0x58b854={'count':0x0,'bytes':0x0},_0xb4df5=_0x322ee3[_0x15a6e5(0x7b3)]?.[_0x15a6e5(0x774)];_0xb4df5&&_0x33a385[_0x15a6e5(0x2d6)](_0xb4df5)&&await this['_copyDir'](_0xb4df5,_0x1611d6[_0x15a6e5(0x3de)](_0x46e1ec,'~blobs'),_0x58b854,(_0x2caf3e,_0x565b30)=>_0x565b30===0x0&&_0x2caf3e===_0x15a6e5(0x6f9));const _0x2de4ec=_0x1611d6[_0x15a6e5(0x3de)](_0x46e1ec,_0x44ae71),_0xc580ed={'format':0x1,'okdbVersion':require$$3[_0x15a6e5(0x1ce)],'createdAt':new Date()[_0x15a6e5(0x340)](),'source':_0x75375e,'compact':Boolean(compact),'envs':_0x10bf96,'blobs':_0x58b854,'skipped':_0x2e25f8,'excluded':{'~fts':'derived;\x20rebuilt\x20from\x20source\x20docs\x20on\x20first\x20open\x20of\x20the\x20restored\x20store','~processes':_0x15a6e5(0x603)}};return _0x33a385['writeFileSync'](_0x2de4ec,JSON[_0x15a6e5(0x1c5)](_0xc580ed,null,0x2)+'\x0a'),{'ok':!![],'dest':_0x46e1ec,'envs':_0x312250,'blobs':_0x58b854,'skipped':_0x2e25f8,'manifest':_0x2de4ec};}[_0xa84743(0x780)](){const _0x5dd145=_0xa84743,_0x83a96e=this[_0x5dd145(0x7c7)][_0x5dd145(0x489)]?.[_0x5dd145(0x42c)]?.[_0x5dd145(0x44c)];if(_0x83a96e)return _0x1611d6['resolve'](_0x83a96e);const _0x1a7127=_0x1611d6['resolve'](this[_0x5dd145(0x7c7)][_0x5dd145(0x58f)]);return _0x1611d6['join'](_0x1611d6[_0x5dd145(0x334)](_0x1a7127),_0x1611d6['basename'](_0x1a7127)+_0x5dd145(0x6d9));}['resolveBackupDest'](_0x4d6684){const _0x3fd7c9=_0xa84743,_0x4eb3a3=this[_0x3fd7c9(0x780)]();_0x33a385[_0x3fd7c9(0x1b1)](_0x4eb3a3,{'recursive':!![]});const _0x9b7035=_0x33a385[_0x3fd7c9(0x5ce)](_0x4eb3a3),_0x17ee72=_0x4d6684==null||String(_0x4d6684)['trim']()===''?_0x3fd7c9(0x207)+new Date()[_0x3fd7c9(0x340)]()['replace'](/[:.]/g,'-'):String(_0x4d6684)[_0x3fd7c9(0x7ad)](),_0x128e52=_0x1611d6[_0x3fd7c9(0x2f4)](_0x4eb3a3,_0x17ee72);let _0x524a54=_0x128e52;const _0x585c86=[];while(!_0x33a385[_0x3fd7c9(0x2d6)](_0x524a54)){_0x585c86['unshift'](_0x1611d6[_0x3fd7c9(0x6d5)](_0x524a54));const _0x5ab8ea=_0x1611d6[_0x3fd7c9(0x334)](_0x524a54);if(_0x5ab8ea===_0x524a54)break;_0x524a54=_0x5ab8ea;}const _0x5bee27=_0x1611d6[_0x3fd7c9(0x3de)](_0x33a385[_0x3fd7c9(0x5ce)](_0x524a54),..._0x585c86),_0x3a080c=_0x1611d6[_0x3fd7c9(0x193)](_0x9b7035,_0x5bee27);if(_0x3a080c===''||_0x3a080c[_0x3fd7c9(0x1a9)]('..')||_0x1611d6[_0x3fd7c9(0x62b)](_0x3a080c))throw new _0x3db65d('backup\x20destination\x20\x22'+_0x17ee72+_0x3fd7c9(0x1c8)+_0x4eb3a3+_0x3fd7c9(0x114),_0x3fd7c9(0x2fe),{'root':_0x4eb3a3,'destDir':_0x17ee72});return{'root':_0x4eb3a3,'dest':_0x5bee27};}async[_0xa84743(0x5af)](_0x109a40,_0x4f0f74,_0x33f752={'count':0x0,'bytes':0x0},_0x1e707b=null,_0x2d7ad2=0x0){const _0x57b325=_0xa84743;_0x33a385['mkdirSync'](_0x4f0f74,{'recursive':!![]});for(const _0x293ca9 of _0x33a385[_0x57b325(0x783)](_0x109a40,{'withFileTypes':!![]})){if(_0x1e707b?.(_0x293ca9['name'],_0x2d7ad2))continue;const _0xbddb26=_0x1611d6['join'](_0x109a40,_0x293ca9[_0x57b325(0x339)]),_0xb29af=_0x1611d6[_0x57b325(0x3de)](_0x4f0f74,_0x293ca9[_0x57b325(0x339)]);if(_0x293ca9[_0x57b325(0x1f0)]())await this['_copyDir'](_0xbddb26,_0xb29af,_0x33f752,_0x1e707b,_0x2d7ad2+0x1);else{try{await _0x33a385[_0x57b325(0x7b5)]['copyFile'](_0xbddb26,_0xb29af);}catch(_0x4866e0){if(_0x4866e0?.[_0x57b325(0x4bc)]===_0x57b325(0x2ea))continue;throw _0x4866e0;}_0x33f752[_0x57b325(0x172)]++;try{_0x33f752[_0x57b325(0x715)]+=_0x33a385[_0x57b325(0x3b7)](_0xb29af)[_0x57b325(0x6ca)];}catch{}}}return _0x33f752;}async[_0xa84743(0x3b8)](_0xec0fa0={}){const _0x1afa23=_0xa84743,{envName:envName='default',types:types=null,includeChanges:includeChanges=![]}=_0xec0fa0,_0x1c2e4a={'types':{},'changes':[]},_0x2421fb=[],_0xeee8ac=new require$$5[(_0x1afa23(0x5be))]({'write'(_0x24ae54,_0x4d4c1e,_0x243ec7){const _0x1ab13d=_0x1afa23;_0x2421fb[_0x1ab13d(0x5d8)](String(_0x24ae54)),_0x243ec7();}});await this[_0x1afa23(0x4c8)](_0xeee8ac,{'envName':envName,'types':types,'includeChanges':includeChanges});for(const _0x4e45e8 of _0x2421fb[_0x1afa23(0x3de)]('')[_0x1afa23(0x1e8)]('\x0a')){const _0xb838a1=_0x4e45e8[_0x1afa23(0x7ad)]();if(!_0xb838a1)continue;let _0x56b20c;try{_0x56b20c=JSON['parse'](_0xb838a1);}catch{continue;}if(_0x56b20c['r']===_0x45c8b1){if(!_0x1c2e4a['types'][_0x56b20c[_0x1afa23(0x101)]])_0x1c2e4a[_0x1afa23(0x293)][_0x56b20c[_0x1afa23(0x101)]]={'entries':[]};if(_0x56b20c[_0x1afa23(0x45e)])_0x1c2e4a[_0x1afa23(0x293)][_0x56b20c[_0x1afa23(0x101)]][_0x1afa23(0x45e)]=_0x56b20c[_0x1afa23(0x45e)];if(_0x56b20c['ftsIndexes'])_0x1c2e4a[_0x1afa23(0x293)][_0x56b20c[_0x1afa23(0x101)]][_0x1afa23(0x772)]=_0x56b20c[_0x1afa23(0x772)];if(_0x56b20c[_0x1afa23(0x162)])_0x1c2e4a['types'][_0x56b20c['type']]['schema']=_0x56b20c[_0x1afa23(0x162)];}else{if(_0x56b20c['r']===_0x12887b){if(!_0x1c2e4a['types'][_0x56b20c['t']])_0x1c2e4a['types'][_0x56b20c['t']]={'entries':[]};_0x1c2e4a[_0x1afa23(0x293)][_0x56b20c['t']][_0x1afa23(0x45d)]['push']({'key':_0x56b20c['k'],'value':_0x56b20c['v'],'version':_0x56b20c[_0x1afa23(0x599)]});}else _0x56b20c['r']===_0x2009e5&&_0x1c2e4a[_0x1afa23(0x47a)][_0x1afa23(0x5d8)]({'clock':_0x56b20c[_0x1afa23(0x579)],'event':_0x56b20c[_0x1afa23(0x304)]});}}return _0x1c2e4a;}async[_0xa84743(0x73f)](_0x5a47c0,_0xd392dd={}){const _0x379872=_0xa84743,_0x3028f0=[];for(const [_0x432821,_0x349c1f]of Object[_0x379872(0x45d)](_0x5a47c0['types']||{})){const _0xb63fe2={'r':_0x45c8b1,'type':_0x432821,'indexes':_0x349c1f[_0x379872(0x45e)]||[],'ftsIndexes':_0x349c1f[_0x379872(0x772)]||{}};if(_0x349c1f[_0x379872(0x162)])_0xb63fe2['schema']=_0x349c1f[_0x379872(0x162)];_0x3028f0['push'](JSON[_0x379872(0x1c5)](_0xb63fe2));for(const {key:_0x190d69,value:_0x2ff39f,version:_0x4c0b81}of _0x349c1f[_0x379872(0x45d)]||[]){_0x3028f0[_0x379872(0x5d8)](JSON[_0x379872(0x1c5)]({'r':_0x12887b,'t':_0x432821,'k':_0x190d69,'v':_0x2ff39f,'ver':_0x4c0b81}));}}for(const {clock:_0x2fc5fb,event:_0x21a692}of _0x5a47c0[_0x379872(0x47a)]||[]){_0x3028f0['push'](JSON['stringify']({'r':_0x2009e5,'clock':_0x2fc5fb,'event':_0x21a692}));}const {Readable:_0x45c550}=require$$5,_0x36c841=_0x45c550['from'](_0x3028f0[_0x379872(0x3de)]('\x0a')+'\x0a');return this[_0x379872(0x71e)](_0x36c841,{..._0xd392dd,'dropExisting':_0xd392dd[_0x379872(0x15c)]??!![]});}async[_0xa84743(0x738)]({pretty:pretty=![]}={}){const _0x4892a0=_0xa84743,_0x1d0307=await this[_0x4892a0(0x3b8)]();return JSON['stringify'](_0x1d0307,null,pretty?0x2:0x0);}async[_0xa84743(0x490)](_0x554f9c){const _0x3da7c5=_0xa84743,_0x525467=JSON[_0x3da7c5(0x2e3)](_0x554f9c);return this['import'](_0x525467);}async['exportBlobs'](_0x39d852){const _0x309411=_0xa84743;if(!this[_0x309411(0x7c7)]['files'])throw new Error(_0x309411(0x72a));const _0x37e93a=this['okdb'][_0x309411(0x7b3)][_0x309411(0x774)];let _0x3ad0e1=0x0,_0x110121=0x0;const _0x1ad8a7=_0x3e0782=>{const _0x4974c9=_0x309411;if(!_0x33a385[_0x4974c9(0x2d6)](_0x3e0782))return;for(const _0xb55091 of _0x33a385[_0x4974c9(0x783)](_0x3e0782,{'withFileTypes':!![]})){const _0x32145c=_0x1611d6['join'](_0x3e0782,_0xb55091[_0x4974c9(0x339)]);if(_0xb55091[_0x4974c9(0x1f0)]()){if(_0xb55091[_0x4974c9(0x339)]===_0x4974c9(0x6f9))continue;_0x1ad8a7(_0x32145c);}else{const _0x3029f1=_0x1611d6[_0x4974c9(0x6d5)](_0x1611d6[_0x4974c9(0x334)](_0x32145c)),_0x316e1f=_0x3029f1+_0xb55091[_0x4974c9(0x339)],_0x27acaa=_0x1611d6[_0x4974c9(0x3de)](_0x39d852,_0x316e1f[_0x4974c9(0x333)](0x0,0x2)),_0x34899f=_0x1611d6[_0x4974c9(0x3de)](_0x27acaa,_0x316e1f['slice'](0x2));_0x33a385[_0x4974c9(0x1b1)](_0x27acaa,{'recursive':!![]}),_0x33a385[_0x4974c9(0x7aa)](_0x32145c,_0x34899f),_0x3ad0e1++;try{_0x110121+=_0x33a385['statSync'](_0x32145c)[_0x4974c9(0x6ca)];}catch{}}}};return _0x33a385[_0x309411(0x1b1)](_0x39d852,{'recursive':!![]}),_0x1ad8a7(_0x37e93a),{'count':_0x3ad0e1,'bytes':_0x110121};}async[_0xa84743(0x487)](_0x5d64fe){const _0x52877b=_0xa84743;if(!this[_0x52877b(0x7c7)][_0x52877b(0x7b3)])throw new Error(_0x52877b(0x72a));await this['okdb'][_0x52877b(0x7b3)][_0x52877b(0x383)]();let _0x486027=0x0,_0x5abfa4=0x0;const _0x66ea30=_0x39b241=>{const _0x88cc39=_0x52877b;if(!_0x33a385[_0x88cc39(0x2d6)](_0x39b241))return;for(const _0x1f81e2 of _0x33a385['readdirSync'](_0x39b241,{'withFileTypes':!![]})){const _0x46f7a3=_0x1611d6['join'](_0x39b241,_0x1f81e2['name']);if(_0x1f81e2['isDirectory']())_0x66ea30(_0x46f7a3);else{const _0x3fc52e=_0x1611d6[_0x88cc39(0x6d5)](_0x1611d6[_0x88cc39(0x334)](_0x46f7a3)),_0x326529=_0x3fc52e+_0x1f81e2['name'],_0x4f8c35=this[_0x88cc39(0x7c7)][_0x88cc39(0x7b3)][_0x88cc39(0x4ca)](_0x326529);if(_0x33a385[_0x88cc39(0x2d6)](_0x4f8c35)){_0x5abfa4++;continue;}const _0x4ceb68=_0x1611d6[_0x88cc39(0x334)](_0x4f8c35);_0x33a385[_0x88cc39(0x1b1)](_0x4ceb68,{'recursive':!![]}),_0x33a385[_0x88cc39(0x7aa)](_0x46f7a3,_0x4f8c35);const _0xb4f072=this[_0x88cc39(0x7c7)][_0x88cc39(0x7b3)][_0x88cc39(0x396)](_0x326529);this[_0x88cc39(0x7c7)][_0x88cc39(0x7b3)][_0x88cc39(0x2f8)]?.[_0x88cc39(0xc1)](_0x326529,{'refs':_0xb4f072}),_0x486027++;}}};return _0x66ea30(_0x5d64fe),{'imported':_0x486027,'skipped':_0x5abfa4};}[_0xa84743(0x220)](){const _0x598181=_0xa84743,_0x2acb65=[];for(const [,_0x1333e5]of this[_0x598181(0x7c7)][_0x598181(0x561)]){if(_0x1333e5[_0x598181(0x79a)]&&_0x1333e5[_0x598181(0x79e)](_0x598181(0x64a)))_0x2acb65[_0x598181(0x5d8)](_0x1333e5);}return _0x2acb65;}async[_0xa84743(0x391)](){const _0x433157=_0xa84743;if(!this['okdb'][_0x433157(0x7b3)])throw new Error(_0x433157(0x72a));await this[_0x433157(0x7c7)][_0x433157(0x7b3)][_0x433157(0x383)]();const _0x2287ce=[],_0x288863=this['okdb'][_0x433157(0x7b3)];for(const _0x5b82b9 of this['_allEnvsWithFiles']()){for(const {key:_0x35ae9f,value:_0x242eba}of _0x5b82b9[_0x433157(0x5fb)](_0x433157(0x64a))){if(!_0x242eba[_0x433157(0x58c)])continue;const _0x2e9398=_0x288863[_0x433157(0x4ca)](_0x242eba['hash']);!_0x33a385['existsSync'](_0x2e9398)&&_0x2287ce['push']({'type':_0x433157(0x30e),'env':_0x5b82b9[_0x433157(0x339)],'id':String(_0x35ae9f),'hash':_0x242eba[_0x433157(0x58c)],'message':_0x433157(0x203)+_0x35ae9f+_0x433157(0x573)+_0x5b82b9[_0x433157(0x339)]+_0x433157(0x712)+_0x242eba[_0x433157(0x58c)][_0x433157(0x333)](0x0,0x8)+'…)'});const _0x4c5e62=_0x288863[_0x433157(0x2f8)]?.[_0x433157(0x294)](_0x242eba[_0x433157(0x58c)]);(!_0x4c5e62||_0x4c5e62[_0x433157(0xf7)]<=0x0)&&_0x2287ce['push']({'type':'zero_refs','env':_0x5b82b9['name'],'id':String(_0x35ae9f),'hash':_0x242eba[_0x433157(0x58c)],'message':_0x433157(0x442)+_0x35ae9f+_0x433157(0x573)+_0x5b82b9[_0x433157(0x339)]+_0x433157(0x712)+_0x242eba['hash'][_0x433157(0x333)](0x0,0x8)+'…)'});}}const _0x39d2b9=new Set();for(const _0x11166e of this[_0x433157(0x220)]()){for(const {value:_0x2ba84a}of _0x11166e[_0x433157(0x5fb)](_0x433157(0x64a))){if(_0x2ba84a['hash'])_0x39d2b9[_0x433157(0x73d)](_0x2ba84a[_0x433157(0x58c)]);}}const _0x282589=_0x26271f=>{const _0x2f3c8b=_0x433157;if(!_0x33a385[_0x2f3c8b(0x2d6)](_0x26271f))return;for(const _0x12f993 of _0x33a385['readdirSync'](_0x26271f,{'withFileTypes':!![]})){const _0x5566f9=_0x1611d6['join'](_0x26271f,_0x12f993['name']);if(_0x12f993[_0x2f3c8b(0x1f0)]()){if(_0x12f993['name']===_0x2f3c8b(0x6f9))continue;_0x282589(_0x5566f9);}else{const _0x2d567f=_0x1611d6[_0x2f3c8b(0x6d5)](_0x1611d6[_0x2f3c8b(0x334)](_0x5566f9)),_0x5c4edf=_0x2d567f+_0x12f993[_0x2f3c8b(0x339)];!_0x39d2b9[_0x2f3c8b(0x229)](_0x5c4edf)&&_0x2287ce['push']({'type':'orphan_blob','hash':_0x5c4edf,'message':_0x2f3c8b(0x40b)+_0x5c4edf[_0x2f3c8b(0x333)](0x0,0x8)+'…)'});}}};return _0x282589(_0x288863['_blobsDir']),_0x2287ce;}async[_0xa84743(0x6c2)](){const _0x5a9540=_0xa84743;if(!this[_0x5a9540(0x7c7)][_0x5a9540(0x7b3)])throw new Error(_0x5a9540(0x72a));await this[_0x5a9540(0x7c7)][_0x5a9540(0x7b3)][_0x5a9540(0x383)]();const _0x5da658=this['okdb'][_0x5a9540(0x7b3)][_0x5a9540(0x2f8)];if(!_0x5da658)throw new Error(_0x5a9540(0xe4));const _0x22e498=[];for(const {key:_0x35adbd}of _0x5da658[_0x5a9540(0x5fb)]())_0x22e498['push'](_0x35adbd);for(const _0x5f7dd7 of _0x22e498)_0x5da658[_0x5a9540(0x655)](_0x5f7dd7);const _0x5cde2a=new Map();for(const _0x52337d of this[_0x5a9540(0x220)]()){for(const {value:_0x575fbc}of _0x52337d[_0x5a9540(0x5fb)](_0x5a9540(0x64a))){_0x575fbc['hash']&&_0x5cde2a[_0x5a9540(0x3c0)](_0x575fbc[_0x5a9540(0x58c)],(_0x5cde2a[_0x5a9540(0x294)](_0x575fbc['hash'])??0x0)+0x1);}}for(const [_0x111cae,_0x17dd6e]of _0x5cde2a){_0x5da658[_0x5a9540(0xc1)](_0x111cae,{'refs':_0x17dd6e});}return{'rebuilt':_0x5cde2a[_0x5a9540(0x6ca)]};}}return okdbMigrate['exports']=_0x212070,okdbMigrate[_0xa84743(0x6a4)][_0xa84743(0x70a)]=_0x44ae71,okdbMigrate[_0xa84743(0x6a4)];}var okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x43f1cc=require$$2$1;function _0x51beb4(_0x21a5e1,_0x39a972){const _0x10ff63=_0x2ba0;return _0x43f1cc[_0x10ff63(0x37c)]('sha256',_0x39a972)[_0x10ff63(0x52f)](_0x21a5e1)[_0x10ff63(0x4c5)](_0x10ff63(0xce));}function _0x5c979c(_0x8447a5,_0x506c8e){const _0x5926a9=_0x2ba0;if(typeof _0x8447a5!=='string'||typeof _0x506c8e!==_0x5926a9(0x1ae))return![];if(Buffer[_0x5926a9(0x372)](_0x8447a5)!==Buffer[_0x5926a9(0x372)](_0x506c8e))return![];return _0x43f1cc[_0x5926a9(0x514)](Buffer['from'](_0x8447a5),Buffer[_0x5926a9(0x309)](_0x506c8e));}function _0x57dfec(_0x568f93){const _0x5e9d9b=_0x2ba0;if(!_0x568f93?.[_0x5e9d9b(0x1a9)]('Bearer\x20'))return null;return _0x568f93[_0x5e9d9b(0x333)](0x7);}function _0x2f1e6d(_0x5a8d8f=0x20){const _0x4eef6d=_0x2ba0;return _0x43f1cc['randomBytes'](_0x5a8d8f)[_0x4eef6d(0x318)]('base64url');}function _0x49da4c(_0x4471c8){const _0x291973=_0x2ba0;return _0x43f1cc[_0x291973(0x1f2)](_0x291973(0x3b3))[_0x291973(0x52f)](_0x4471c8)['digest']('hex');}function _0x3fe76e(_0x325eea,_0x59708d,_0x3cf27e=0x36ee80){const _0x1b8ca0=_0x2ba0;if(!_0x59708d)throw new Error('Token\x20secret\x20not\x20configured');const _0x3da566=Date[_0x1b8ca0(0x556)](),_0x2021ee=Buffer[_0x1b8ca0(0x309)](JSON[_0x1b8ca0(0x1c5)]({'iat':_0x3da566,'exp':_0x3da566+_0x3cf27e,'sub':_0x325eea?.['id']??_0x325eea?.[_0x1b8ca0(0x64d)]??null,'username':_0x325eea?.[_0x1b8ca0(0x51e)]??_0x325eea?.[_0x1b8ca0(0x339)]??null,'roles':Array[_0x1b8ca0(0x654)](_0x325eea?.[_0x1b8ca0(0xff)])?_0x325eea[_0x1b8ca0(0xff)]:[]}))[_0x1b8ca0(0x318)](_0x1b8ca0(0xce)),_0x17fe8e=_0x51beb4(_0x2021ee,_0x59708d);return _0x2021ee+'.'+_0x17fe8e;}function _0x103b4a(_0x378280,_0x138978){const _0x126860=_0x2ba0;if(!_0x138978||typeof _0x378280!==_0x126860(0x1ae))return null;const [_0x23814c,_0x4bfbd4]=_0x378280['split']('.');if(!_0x23814c||!_0x4bfbd4)return null;const _0x149b72=_0x51beb4(_0x23814c,_0x138978);if(!_0x5c979c(_0x4bfbd4,_0x149b72))return null;try{const _0x2afd76=JSON[_0x126860(0x2e3)](Buffer[_0x126860(0x309)](_0x23814c,_0x126860(0xce))[_0x126860(0x318)]()),_0x5d24e9=0x7530;if(Date[_0x126860(0x556)]()>Number(_0x2afd76?.[_0x126860(0x3c4)]??0x0)+_0x5d24e9)return null;return _0x2afd76;}catch{return null;}}async function _0x1012c4(_0x1924d4){return new Promise((_0x20c308,_0x3e53b9)=>{const _0xa3c06b=_0x2ba0,_0x121e84=_0x43f1cc[_0xa3c06b(0x13d)](0x10);_0x43f1cc['scrypt'](_0x1924d4,_0x121e84,0x40,(_0x30cb26,_0x5a03d4)=>{const _0x137fb2=_0xa3c06b;if(_0x30cb26)return _0x3e53b9(_0x30cb26);_0x20c308(_0x121e84['toString'](_0x137fb2(0x44a))+':'+_0x5a03d4[_0x137fb2(0x318)](_0x137fb2(0x44a)));});});}async function _0xed0eda(_0x592da0,_0x3868ec){const _0x37a535=_0x2ba0;if(typeof _0x3868ec!==_0x37a535(0x1ae))return![];const [_0x9da226,_0x538907]=_0x3868ec[_0x37a535(0x1e8)](':');if(!_0x9da226||!_0x538907)return![];const _0x4efe1e=Buffer[_0x37a535(0x309)](_0x9da226,_0x37a535(0x44a)),_0x42f7f4=Buffer['from'](_0x538907,'hex');if(_0x42f7f4[_0x37a535(0x330)]!==0x40)return![];return new Promise((_0x184662,_0x5557d9)=>{const _0x3a0a03=_0x37a535;_0x43f1cc[_0x3a0a03(0x2d3)](_0x592da0,_0x4efe1e,0x40,(_0x3de2f9,_0x1059b7)=>{if(_0x3de2f9)return _0x5557d9(_0x3de2f9);_0x184662(_0x43f1cc['timingSafeEqual'](_0x1059b7,_0x42f7f4));});});}return okdbAuthTokens={'hmac':_0x51beb4,'timingSafeEqual':_0x5c979c,'parseBearer':_0x57dfec,'randomToken':_0x2f1e6d,'hashToken':_0x49da4c,'issueToken':_0x3fe76e,'authenticateToken':_0x103b4a,'hashPassword':_0x1012c4,'verifyPassword':_0xed0eda},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x168431=_0x3f6c2b;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x4d8b9d=require$$0$2,_0x53704b=_0x168431(0x6ee),_0xe3299f=new Uint8Array(0x100)['fill'](0xff);for(let _0x1a8ad3=0x0;_0x1a8ad3<_0x53704b[_0x168431(0x330)];_0x1a8ad3++){_0xe3299f[_0x53704b[_0x168431(0x29e)](_0x1a8ad3)]=_0x1a8ad3,_0xe3299f[_0x53704b[_0x168431(0x29e)](_0x1a8ad3)+0x20]=_0x1a8ad3;}_0xe3299f['O'['charCodeAt'](0x0)]=0x0,_0xe3299f['o'[_0x168431(0x29e)](0x0)]=0x0,_0xe3299f['I'['charCodeAt'](0x0)]=0x1,_0xe3299f['i'[_0x168431(0x29e)](0x0)]=0x1,_0xe3299f['L'[_0x168431(0x29e)](0x0)]=0x1,_0xe3299f['l'[_0x168431(0x29e)](0x0)]=0x1;function _0x730a67(_0x3b6535){const _0x134d91=_0x168431;let _0x4c9b8d=0x0,_0x22929f=0x0,_0x29ddd1='';for(let _0x41bffa=0x0;_0x41bffa<_0x3b6535[_0x134d91(0x330)];_0x41bffa++){_0x22929f=_0x22929f<<0x8|_0x3b6535[_0x41bffa],_0x4c9b8d+=0x8;while(_0x4c9b8d>=0x5){_0x4c9b8d-=0x5,_0x29ddd1+=_0x53704b[_0x22929f>>>_0x4c9b8d&0x1f];}}return _0x4c9b8d>0x0&&(_0x29ddd1+=_0x53704b[_0x22929f<<0x5-_0x4c9b8d&0x1f]),_0x29ddd1;}function _0x3edcc1(_0x5d47be){const _0x131229=_0x168431;_0x5d47be=_0x5d47be[_0x131229(0x16b)](/-/g,'')[_0x131229(0x52d)]();let _0xe5f804=0x0,_0x13cc77=0x0;const _0x33730b=[];for(let _0x1005ba=0x0;_0x1005ba<_0x5d47be[_0x131229(0x330)];_0x1005ba++){const _0x18b4f5=_0xe3299f[_0x5d47be[_0x131229(0x29e)](_0x1005ba)];if(_0x18b4f5===0xff)continue;_0x13cc77=_0x13cc77<<0x5|_0x18b4f5,_0xe5f804+=0x5,_0xe5f804>=0x8&&(_0xe5f804-=0x8,_0x33730b['push'](_0x13cc77>>>_0xe5f804&0xff));}return Buffer[_0x131229(0x309)](_0x33730b);}const _0x17f9c0=['sync',_0x168431(0x5f1),'engines',_0x168431(0xe3),'timeMachine',_0x168431(0x796),'mcp',_0x168431(0x7b3)],_0x1a3994=0x0,_0x25a4bb=0x1,_0x4a0902=0x2,_0x8ef730=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x4c2806({issuedAt:_0x5d02c3,expiresAt:_0x234a5b,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x1a3994}){const _0x579a67=_0x168431,_0x461f31=Buffer['from'](licensee,_0x579a67(0x3f0))[_0x579a67(0x333)](0x0,0x40),_0x23861b=0x1+0x1+0x4+0x4+0x1+_0x461f31[_0x579a67(0x330)]+0x2+0x10,_0x16ce06=Buffer[_0x579a67(0x600)](_0x23861b);let _0x7025b=0x0;_0x16ce06[_0x579a67(0x718)](0x1,_0x7025b++),_0x16ce06[_0x579a67(0x718)](licenseType,_0x7025b++),_0x16ce06[_0x579a67(0x262)](Math[_0x579a67(0x6ef)](_0x5d02c3/0x3e8),_0x7025b),_0x7025b+=0x4,_0x16ce06['writeUInt32BE'](Math[_0x579a67(0x6ef)](_0x234a5b/0x3e8),_0x7025b),_0x7025b+=0x4,_0x16ce06[_0x579a67(0x718)](_0x461f31['length'],_0x7025b++),_0x461f31[_0x579a67(0x42e)](_0x16ce06,_0x7025b),_0x7025b+=_0x461f31[_0x579a67(0x330)];let _0x47609c=0x0;for(let _0x24290b=0x0;_0x24290b<_0x17f9c0['length'];_0x24290b++){if(features[_0x17f9c0[_0x24290b]])_0x47609c|=0x1<<_0x24290b;}_0x16ce06[_0x579a67(0x741)](_0x47609c,_0x7025b),_0x7025b+=0x2;const _0x528a9e=[_0x579a67(0x384),'typesPerEnv',_0x579a67(0x1c9),_0x579a67(0x325)];for(const _0x5db27c of _0x528a9e){_0x16ce06[_0x579a67(0x262)](limits[_0x5db27c]||0x0,_0x7025b),_0x7025b+=0x4;}return _0x16ce06;}function _0x208c27(_0x5d4ab2){const _0x3f934f=_0x168431;let _0x271579=0x0;const _0xc8fe32=_0x5d4ab2[_0x3f934f(0x236)](_0x271579++),_0x23cb69=_0x5d4ab2[_0x3f934f(0x236)](_0x271579++),_0x455785=_0x5d4ab2[_0x3f934f(0x5f9)](_0x271579);_0x271579+=0x4;const _0x2694e7=_0x5d4ab2[_0x3f934f(0x5f9)](_0x271579);_0x271579+=0x4;const _0x56acdd=_0x5d4ab2[_0x3f934f(0x236)](_0x271579++),_0x480c7d=_0x5d4ab2['slice'](_0x271579,_0x271579+_0x56acdd)[_0x3f934f(0x318)](_0x3f934f(0x3f0));_0x271579+=_0x56acdd;const _0x3e2cb6=_0x5d4ab2[_0x3f934f(0x49e)](_0x271579);_0x271579+=0x2;const _0x47c887={};for(let _0x354818=0x0;_0x354818<_0x17f9c0['length'];_0x354818++){_0x47c887[_0x17f9c0[_0x354818]]=Boolean(_0x3e2cb6&0x1<<_0x354818);}const _0x32cbf4=[_0x3f934f(0x384),'typesPerEnv',_0x3f934f(0x1c9),_0x3f934f(0x325)],_0x189168={};for(const _0xfe14f4 of _0x32cbf4){const _0x372124=_0x5d4ab2[_0x3f934f(0x5f9)](_0x271579);_0x271579+=0x4,_0x189168[_0xfe14f4]=_0x372124===0x0?null:_0x372124;}return{'v':_0xc8fe32,'licenseType':_0x23cb69,'issuedAt':_0x455785*0x3e8,'expiresAt':_0x2694e7*0x3e8,'licensee':_0x480c7d,'features':_0x47c887,'limits':_0x189168};}function _0x558871(_0x1f5b56,_0x136fb6){const _0x96ca46=_0x168431,_0x1818a2=Buffer['concat']([_0x1f5b56,_0x136fb6]),_0x588cf4=_0x730a67(_0x1818a2),_0x11033c=[];for(let _0x2305a2=0x0;_0x2305a2<_0x588cf4[_0x96ca46(0x330)];_0x2305a2+=0x8){_0x11033c['push'](_0x588cf4['slice'](_0x2305a2,_0x2305a2+0x8));}return _0x11033c[_0x96ca46(0x3de)]('-');}function _0x15ca22(_0x15ddf1){const _0x3f355a=_0x168431;if(typeof _0x15ddf1!==_0x3f355a(0x1ae))throw new Error(_0x3f355a(0x707));const _0x442210=_0x3edcc1(_0x15ddf1[_0x3f355a(0x16b)](/-/g,''));if(_0x442210[_0x3f355a(0x330)]<0x41)throw new Error('decodeLicenseBlob:\x20blob\x20too\x20short\x20('+_0x442210[_0x3f355a(0x330)]+_0x3f355a(0x792));const _0x58f12a=_0x442210[_0x3f355a(0x333)](0x0,_0x442210[_0x3f355a(0x330)]-0x40),_0x1bd21b=_0x442210['slice'](_0x442210[_0x3f355a(0x330)]-0x40);let _0x5610f2;try{_0x5610f2=_0x208c27(_0x58f12a);}catch(_0x3d693b){throw new Error('decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20'+_0x3d693b[_0x3f355a(0x7b6)]);}return{'rawBuf':_0x442210,'payload':_0x58f12a,'sig':_0x1bd21b,'decoded':_0x5610f2};}function _0x56650c(_0x5d0da3){const _0x301fce=_0x168431;return _0x4d8b9d[_0x301fce(0x1f2)](_0x301fce(0x3b3))[_0x301fce(0x52f)](_0x5d0da3)[_0x301fce(0x4c5)]()[_0x301fce(0x333)](0x0,0x8);}function _0x3ae386(_0x1d89cd,_0x498690,_0x31c434){const _0x2ae81b=_0x168431,_0x231254=_0x2ae81b(0x632)+_0x31c434,_0x530e16=Buffer[_0x2ae81b(0x166)]([Buffer[_0x2ae81b(0x309)](_0x1d89cd,_0x2ae81b(0x3f0)),_0x498690]),_0x4d98ab=_0x4d8b9d[_0x2ae81b(0x37c)]('sha256',_0x231254)[_0x2ae81b(0x52f)](_0x530e16)[_0x2ae81b(0x4c5)](),_0x47c45a=_0x730a67(_0x4d98ab[_0x2ae81b(0x333)](0x0,0x5));return{'pin':_0x47c45a,'pinHmac':_0x4d98ab};}function _0xe0789d(_0x22a961,_0x2d0bf0,_0x404b0f){const _0x21fdae=_0x168431,_0x5cee58=Buffer[_0x21fdae(0x600)](0x4d);let _0x3f4ccd=0x0;_0x5cee58['writeUInt8'](0x1,_0x3f4ccd++),_0x22a961[_0x21fdae(0x42e)](_0x5cee58,_0x3f4ccd),_0x3f4ccd+=0x8,_0x5cee58[_0x21fdae(0x262)](_0x2d0bf0,_0x3f4ccd),_0x3f4ccd+=0x4,_0x404b0f[_0x21fdae(0x42e)](_0x5cee58,_0x3f4ccd);const _0x28a75a=_0x730a67(_0x5cee58),_0x7c2a6f=[];for(let _0x3acc91=0x0;_0x3acc91<_0x28a75a[_0x21fdae(0x330)];_0x3acc91+=0x6){_0x7c2a6f[_0x21fdae(0x5d8)](_0x28a75a['slice'](_0x3acc91,_0x3acc91+0x6));}return _0x7c2a6f[_0x21fdae(0x3de)]('-');}function _0x52797c(_0x3966ca){const _0x21231e=_0x168431;if(typeof _0x3966ca!==_0x21231e(0x1ae))throw new Error(_0x21231e(0x297));const _0x5651a5=_0x3edcc1(_0x3966ca[_0x21231e(0x16b)](/-/g,''));if(_0x5651a5[_0x21231e(0x330)]!==0x4d)throw new Error(_0x21231e(0x292)+_0x5651a5[_0x21231e(0x330)]);let _0x13e295=0x0;const _0xbf376e=_0x5651a5[_0x21231e(0x236)](_0x13e295++),_0x32a0f3=_0x5651a5['slice'](_0x13e295,_0x13e295+0x8);_0x13e295+=0x8;const _0x10c289=_0x5651a5[_0x21231e(0x5f9)](_0x13e295);_0x13e295+=0x4;const _0xd6e8cd=_0x5651a5[_0x21231e(0x333)](_0x13e295);return{'v':_0xbf376e,'licenseHash':_0x32a0f3,'expiry':_0x10c289,'sig':_0xd6e8cd};}const _0x4fa170=0x100,_0x3acaf5=new Set(),_0x26b45a=new Map();function _0xb61c2a(_0x462392,_0xba548e,_0x12f611){const _0x307076=_0x168431;if(typeof _0x12f611!==_0x307076(0x1ae)||!Buffer[_0x307076(0x671)](_0x462392)||!Buffer[_0x307076(0x671)](_0xba548e))return _0x4d8b9d[_0x307076(0x3c2)](null,_0x462392,_0x12f611,_0xba548e);const _0x2284c3=_0x12f611+'\x0a'+_0x462392[_0x307076(0x318)](_0x307076(0x31c))+'\x0a'+_0xba548e['toString']('base64');if(_0x3acaf5[_0x307076(0x229)](_0x2284c3))return!![];let _0x126097=_0x26b45a[_0x307076(0x294)](_0x12f611);if(!_0x126097){_0x126097=_0x4d8b9d[_0x307076(0x5e0)](_0x12f611);if(_0x26b45a[_0x307076(0x6ca)]>=0x10)_0x26b45a['clear']();_0x26b45a[_0x307076(0x3c0)](_0x12f611,_0x126097);}const _0x24f69a=_0x4d8b9d[_0x307076(0x3c2)](null,_0x462392,_0x126097,_0xba548e)===!![];if(_0x24f69a){if(_0x3acaf5[_0x307076(0x6ca)]>=_0x4fa170)_0x3acaf5[_0x307076(0x5d1)]();_0x3acaf5['add'](_0x2284c3);}return _0x24f69a;}function _0x430764({tokenString:_0x26295e,nodeId:_0x53abbf,rawBlobBuf:_0x4af25e,pubKeyPem:_0x124d6a,pubFingerprint:_0x3e4870}){const _0x3bdb9f=_0x168431;let _0x3ba81b;try{_0x3ba81b=_0x52797c(_0x26295e);}catch(_0x2ad511){return{'valid':![],'reason':_0x3bdb9f(0x565)};}const _0x23ca14=_0x56650c(_0x4af25e);if(!_0x23ca14['equals'](_0x3ba81b[_0x3bdb9f(0x123)]))return{'valid':![],'reason':_0x3bdb9f(0x5dc)};const {pinHmac:_0x289277}=_0x3ae386(_0x53abbf,_0x23ca14,_0x3e4870),_0x4c5e2c=Buffer['allocUnsafe'](0x4);_0x4c5e2c[_0x3bdb9f(0x262)](_0x3ba81b[_0x3bdb9f(0x11a)],0x0);const _0x1b75d4=Buffer[_0x3bdb9f(0x166)]([Buffer[_0x3bdb9f(0x309)]([_0x3ba81b['v']]),_0x289277[_0x3bdb9f(0x333)](0x0,0x5),_0x3ba81b[_0x3bdb9f(0x123)],_0x4c5e2c]);try{const _0x351eff=_0xb61c2a(_0x1b75d4,_0x3ba81b[_0x3bdb9f(0x609)],_0x124d6a);if(!_0x351eff)return{'valid':![],'reason':'SIG_INVALID'};}catch(_0x4d2d83){return{'valid':![],'reason':_0x3bdb9f(0x6f4)};}if(_0x3ba81b['expiry']<Date[_0x3bdb9f(0x556)]()/0x3e8)return{'valid':![],'reason':_0x3bdb9f(0x288)};return{'valid':!![],'reason':'ok'};}function _0x9177e0(_0x315533){const _0x11d527=_0x168431;if(typeof _0x315533!=='string')return _0x11d527(0x1ac);const _0x1487f4=_0x315533[_0x11d527(0x7ad)]();if(_0x1487f4[_0x11d527(0x1a9)]('/')||_0x1487f4['startsWith']('./')||_0x1487f4[_0x11d527(0x1a9)](_0x11d527(0x4bf))||/^[A-Za-z]:[\\/]/[_0x11d527(0x3a9)](_0x1487f4))return'path';if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i['test'](_0x1487f4))return _0x11d527(0x110);const _0x365c95=_0x1487f4[_0x11d527(0x16b)](/[\s-]+/g,'')[_0x11d527(0x330)];if(_0x365c95===0x7c)return _0x11d527(0x1a1);if(_0x365c95>=0x95&&_0x365c95<=0xfc)return _0x11d527(0x112);return _0x11d527(0x1ac);}return okdbLicenseCodec={'toBase32':_0x730a67,'fromBase32':_0x3edcc1,'encodeLicensePayload':_0x4c2806,'decodeLicensePayload':_0x208c27,'encodeLicenseBlob':_0x558871,'decodeLicenseBlob':_0x15ca22,'licenseHash':_0x56650c,'derivePin':_0x3ae386,'encodeActivationToken':_0xe0789d,'decodeActivationToken':_0x52797c,'verifyActivation':_0x430764,'verifySignature':_0xb61c2a,'detectInputType':_0x9177e0,'FEATURE_NAMES':_0x17f9c0,'LICENSE_TYPE_STANDARD':_0x1a3994,'LICENSE_TYPE_OPEN':_0x25a4bb,'LICENSE_TYPE_INTERNAL':_0x4a0902,'OPEN_LICENSE_MAX_DURATION_MS':_0x8ef730},okdbLicenseCodec;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0xcfac4d=_0x3f6c2b;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x10df8e={'PUT':_0xcfac4d(0x359),'REMOVE':_0xcfac4d(0x5e2),'INDEX_DROP':_0xcfac4d(0x551),'INDEX_REGISTER':_0xcfac4d(0x4db),'INDEX_RESET':_0xcfac4d(0xfb),'TYPE_REGISTER':_0xcfac4d(0x349),'TYPE_DROP':_0xcfac4d(0x235),'FTS_REGISTER':_0xcfac4d(0x4f7),'FTS_DROP':_0xcfac4d(0x6ac),'FTS_RESET':_0xcfac4d(0x5e5),'SCHEMA_SET':_0xcfac4d(0x1ca),'SCHEMA_DROP':_0xcfac4d(0x181),'TTL_SET':_0xcfac4d(0x29c),'TTL_CLEAR':'clearTtl'},_0x89bf3b={'SYSTEM_READY':_0xcfac4d(0x111),'FIELD_RESOLVER_REGISTERED':_0xcfac4d(0x1dc),'SYSTEM_STOPPED':_0xcfac4d(0x5c6),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0xcfac4d(0x24b),'SYSTEM_DRAIN':_0xcfac4d(0x776),'SYSTEM_TYPE_DROP':'system:type_drop','SYSTEM_PROC':_0xcfac4d(0x5aa),'SYSTEM_BUS_STATE_CHANGE':_0xcfac4d(0x232),'ITEM_CREATE':_0xcfac4d(0x3f3),'ITEM_UPDATE':'item:update','ITEM_REMOVE':'item:remove','ITEM_PENDING':_0xcfac4d(0x132),'INDEX_RESET':_0xcfac4d(0x4b2),'INDEX_READY':_0xcfac4d(0x39f),'INDEX_PROGRESS':_0xcfac4d(0x562),'VIEW_PROGRESS':_0xcfac4d(0x754),'INDEX_DROP':_0xcfac4d(0x2ce),'INDEX_REGISTERED':_0xcfac4d(0x27f),'FTS_REGISTERED':_0xcfac4d(0x3a8),'FTS_DROP':'fts:drop','FTS_RESET':_0xcfac4d(0x784),'SCHEMA_SET':_0xcfac4d(0x242),'SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':_0xcfac4d(0x692),'UNIQUE_VIOLATION_RESOLVED':_0xcfac4d(0x57f),'REF_VIOLATION':_0xcfac4d(0x62f),'REF_VIOLATION_RESOLVED':_0xcfac4d(0x5bf),'SYNC_APPLY':_0xcfac4d(0x314),'TXN_START':'txn:start','TXN_END':'txn:end','TXN_ROLLBACK':'txn:rollback','TYPE_REGISTERED':'type:registered','TYPE_DROP':_0xcfac4d(0x27a),'ENV_OPENED':_0xcfac4d(0x13f),'ENV_REMOVED':'env:removed','SYSTEM_ENV_RELEASE':_0xcfac4d(0x4ea),'TTL_EXPIRED':_0xcfac4d(0x54e),'TTL_SET':_0xcfac4d(0x328),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':'license:invalid','LICENSE_ADDED':_0xcfac4d(0x409),'LICENSE_ACTIVATED':_0xcfac4d(0x366),'LICENSE_REMOVED':_0xcfac4d(0x2e2)},_0x37fec9={'CREATING':_0xcfac4d(0x73c),'RESETTING':_0xcfac4d(0x313),'READY':_0xcfac4d(0x626),'DROPPING':_0xcfac4d(0x60c),'WAITING':'waiting','ERROR':_0xcfac4d(0x5f2)},_0x1a55bb={'CREATED':_0xcfac4d(0x23d),'STARTING':_0xcfac4d(0x158),'STARTED':_0xcfac4d(0x713),'STOPPING':_0xcfac4d(0x6e3),'STOPPED':_0xcfac4d(0x734)},_0x4768c2={'CREATING':_0xcfac4d(0x73c),'READY':_0xcfac4d(0x626),'HALTED':_0xcfac4d(0x365),'STOPPED':_0xcfac4d(0x734),'RESETTING':_0xcfac4d(0x313)},_0x899ab=Object[_0xcfac4d(0x614)]({'POKE':_0xcfac4d(0x4ee),'DRAIN':_0xcfac4d(0x542),'TYPE_DROP':_0xcfac4d(0x507),'PROC':_0xcfac4d(0x623),'ENV_RELEASE':_0xcfac4d(0x7a2)});return okdbEnums={'BUS_EVENTS':_0x899ab,'CHANGE_ACTIONS':_0x10df8e,'EVENTS':_0x89bf3b,'INDEX_STATE':_0x37fec9,'OKDB_STATE':_0x1a55bb,'VIEW_STATE':_0x4768c2},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x376921=_0x3f6c2b;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x147b56=require$$0$1,_0x52d193=require$$1,_0x10f341=require$$2$1,_0x37d235=_0x147b56[_0x376921(0x2ef)](_0x52d193['join'](__dirname,_0x376921(0x7b9)),_0x376921(0x3f0))[_0x376921(0x7ad)](),_0x343957=_0x10f341[_0x376921(0x5e0)](_0x37d235)[_0x376921(0x3b8)]({'type':_0x376921(0x584),'format':_0x376921(0x240)}),_0x5dda54=_0x10f341[_0x376921(0x1f2)](_0x376921(0x3b3))[_0x376921(0x52f)](_0x343957)['digest'](_0x376921(0x44a))[_0x376921(0x333)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x37d235,'PUB_FINGERPRINT':_0x5dda54},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x26f754=_0x3f6c2b;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0xce9a8a=require$$2$1,{OKDBError:_0x446044}=requireOkdbError(),{EVENTS:_0x47030f}=requireOkdbEnums(),_0x5a4587=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x54c77f,LICENSE_TYPE_INTERNAL:_0x207c6e,OPEN_LICENSE_MAX_DURATION_MS:_0x847b27}=_0x5a4587,_0x59a11a=requireOkdbPubkey(),_0x1d8b0e={'LICENSED_BUILD':_0x26f754(0x760),'PUBLIC_KEY_PEM':_0x59a11a[_0x26f754(0x566)],'PUB_FINGERPRINT':_0x59a11a[_0x26f754(0x3e8)],'LICENSE_EXPIRED_ACTION':'log'},_0x340cd9=_0x26f754(0x393),_0x3d1f11={'features':{'sync':![],'embeddings':!![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x5,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240,'pipelinesPerEnv':0x2},'_isFree':!![]};async function _0x4a5869(_0x444308){const _0x24df69=_0x26f754;await _0x444308[_0x24df69(0x3df)](_0x340cd9);}class _0x356c74{constructor(_0x3c781b){const _0x15b37c=_0x26f754;this[_0x15b37c(0x7c7)]=_0x3c781b,this[_0x15b37c(0x420)]=null;}async[_0x26f754(0x147)](){const _0x182d4e=_0x26f754,_0x4ef1c7=this['okdb']['_systemEnv'];if(!_0x4ef1c7||!_0x4ef1c7[_0x182d4e(0x79e)](_0x340cd9)){this[_0x182d4e(0x420)]=null;return;}const _0x54b984=this[_0x182d4e(0x7c7)]['id'];let _0x1c5e90=null;for(const {key:_0x5dd79f,value:_0x1ecca7}of _0x4ef1c7[_0x182d4e(0x5fb)](_0x340cd9)){const _0x52273d=this[_0x182d4e(0x46b)](_0x1ecca7,_0x54b984);_0x52273d==='active'&&!_0x1c5e90&&(_0x1c5e90={..._0x1ecca7,'id':_0x5dd79f,'status':_0x52273d});}this[_0x182d4e(0x420)]=_0x1c5e90;if(this['_active']&&this[_0x182d4e(0x420)][_0x182d4e(0x46f)]===_0x54c77f){const _0x29c5d2=Math['ceil']((this[_0x182d4e(0x420)]['expiresAt']-Date[_0x182d4e(0x556)]())/0x5265c00);this[_0x182d4e(0x7c7)][_0x182d4e(0x515)]?.[_0x182d4e(0x593)](_0x182d4e(0xec)+_0x29c5d2+_0x182d4e(0x732),{'feature':_0x182d4e(0x182),'licensee':this[_0x182d4e(0x420)][_0x182d4e(0xe5)],'expiresAt':new Date(this[_0x182d4e(0x420)][_0x182d4e(0x257)])[_0x182d4e(0x340)]()});}this[_0x182d4e(0x420)]&&this[_0x182d4e(0x420)][_0x182d4e(0x46f)]===_0x207c6e&&this[_0x182d4e(0x7c7)][_0x182d4e(0x515)]?.['warn'](_0x182d4e(0x218),{'feature':_0x182d4e(0x182),'licensee':this[_0x182d4e(0x420)][_0x182d4e(0xe5)]});}['_computeStatus'](_0x46e5c6,_0x2d4673){const _0x56a770=_0x26f754;if(!_0x46e5c6['blob'])return'invalid';let _0x34fafc;try{_0x34fafc=_0x5a4587[_0x56a770(0x47f)](_0x46e5c6['blob']);}catch(_0x469988){return'invalid';}try{const _0x5060cc=_0x5a4587[_0x56a770(0xe8)](_0x34fafc['payload'],_0x34fafc[_0x56a770(0x609)],_0x1d8b0e[_0x56a770(0x566)]);if(!_0x5060cc)return _0x56a770(0x29f);}catch(_0x5ae619){return _0x56a770(0x29f);}if(_0x34fafc[_0x56a770(0x168)][_0x56a770(0x46f)]===_0x207c6e)return _0x56a770(0x5df);if(_0x34fafc['decoded']['expiresAt']<=Date[_0x56a770(0x556)]())return _0x56a770(0x549);if(_0x34fafc[_0x56a770(0x168)][_0x56a770(0x46f)]===_0x54c77f)return'active';if(!_0x46e5c6[_0x56a770(0x1a1)])return _0x56a770(0xe6);const _0x4c118d=_0x5a4587[_0x56a770(0x211)]({'tokenString':_0x46e5c6['activation'],'nodeId':_0x2d4673,'rawBlobBuf':_0x34fafc['rawBuf'],'pubKeyPem':_0x1d8b0e[_0x56a770(0x566)],'pubFingerprint':_0x1d8b0e[_0x56a770(0x3e8)]});if(_0x4c118d[_0x56a770(0x174)]===_0x56a770(0x5dc)||_0x4c118d[_0x56a770(0x174)]==='SIG_INVALID')return'wrong_node';if(_0x4c118d[_0x56a770(0x174)]==='ACTIVATION_EXPIRED')return _0x56a770(0x549);if(!_0x4c118d[_0x56a770(0x5b3)])return _0x56a770(0x608);return _0x56a770(0x5df);}get['active'](){const _0x2c4297=_0x26f754;return this[_0x2c4297(0x420)];}get[_0x26f754(0x3f1)](){const _0x1d9d65=_0x26f754;return this[_0x1d9d65(0x420)]??_0x3d1f11;}[_0x26f754(0x670)](_0x4e279f){const _0x42442f=_0x26f754;if(_0x1d8b0e[_0x42442f(0x412)]!=='true')return;const _0x118988=this[_0x42442f(0x3f1)];if(!_0x118988['features']?.[_0x4e279f]){const _0x369889=_0x118988[_0x42442f(0x794)]?_0x42442f(0x527)+_0x4e279f+_0x42442f(0x67a)+_0x4e279f+'\x22\x20to\x20enable\x20it.':_0x42442f(0x1e6)+_0x4e279f+'.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22'+_0x4e279f+'\x22.';throw new _0x446044(_0x369889,_0x42442f(0x6e0),{'feature':_0x4e279f});}}['isFeatureEnabled'](_0x1e4798){const _0x3b0e2c=_0x26f754;if(_0x1d8b0e[_0x3b0e2c(0x412)]!==_0x3b0e2c(0x760))return!![];return!!this['effective'][_0x3b0e2c(0x575)]?.[_0x1e4798];}[_0x26f754(0x4c3)](_0x24ee31){const _0x4a3f9d=_0x26f754;if(_0x1d8b0e[_0x4a3f9d(0x412)]!==_0x4a3f9d(0x760))return![];const _0x3312f6=this[_0x4a3f9d(0x3f1)]['limits']?.[_0x24ee31];return!(_0x3312f6===null||_0x3312f6===undefined||_0x3312f6===0x0);}[_0x26f754(0x1e4)](_0x5c9807,_0x213660){const _0x2ce785=_0x26f754;if(_0x1d8b0e[_0x2ce785(0x412)]!==_0x2ce785(0x760))return;const _0x598b07=this[_0x2ce785(0x3f1)],_0x4a3c4e=_0x598b07[_0x2ce785(0x5eb)]?.[_0x5c9807];if(_0x4a3c4e===null||_0x4a3c4e===undefined||_0x4a3c4e===0x0)return;if(_0x213660>=_0x4a3c4e)throw new _0x446044('License\x20limit\x20exceeded:\x20'+_0x5c9807+'\x20('+_0x213660+'/'+_0x4a3c4e+')',_0x2ce785(0x5fa),{'limit':_0x5c9807,'current':_0x213660,'max':_0x4a3c4e});}async['addLicense'](_0x237e63){const _0x463f9e=_0x26f754;let _0x457e7a;try{_0x457e7a=_0x5a4587[_0x463f9e(0x47f)](_0x237e63);}catch(_0x195bd3){throw new _0x446044(_0x463f9e(0x763)+_0x195bd3['message'],_0x463f9e(0x444));}let _0x4c3b5e;try{_0x4c3b5e=_0x5a4587['verifySignature'](_0x457e7a[_0x463f9e(0x382)],_0x457e7a[_0x463f9e(0x609)],_0x1d8b0e[_0x463f9e(0x566)]);}catch(_0x4a0987){throw new _0x446044('License\x20signature\x20invalid:\x20'+_0x4a0987[_0x463f9e(0x7b6)],_0x463f9e(0x444));}if(!_0x4c3b5e)throw new _0x446044(_0x463f9e(0x3b0)+(_0x463f9e(0x6c6)+_0x1d8b0e[_0x463f9e(0x3e8)]+'.\x20')+_0x463f9e(0x26e),'LICENSE_INVALID',{'expectedFingerprint':_0x1d8b0e['PUB_FINGERPRINT']});if(_0x457e7a[_0x463f9e(0x168)]['licenseType']===_0x54c77f){const _0x30163c=_0x457e7a[_0x463f9e(0x168)]['expiresAt']-_0x457e7a[_0x463f9e(0x168)][_0x463f9e(0x6b7)];if(_0x30163c>_0x847b27)throw new _0x446044(_0x463f9e(0x2d7)+Math[_0x463f9e(0x49a)](_0x30163c/(0x1e*0x5265c00))+'\x20months\x20from\x20issuance)',_0x463f9e(0x444));}const _0x5aa2f0=this[_0x463f9e(0x7c7)][_0x463f9e(0x5e4)];await _0x4a5869(_0x5aa2f0);const _0x487f03=_0x5a4587[_0x463f9e(0x123)](_0x457e7a[_0x463f9e(0x285)])[_0x463f9e(0x318)](_0x463f9e(0x44a));for(const {key:_0x459929,value:_0x1ae9f5}of _0x5aa2f0['getRange'](_0x340cd9)){if(_0x1ae9f5['_licenseHash']===_0x487f03)throw new _0x446044('License\x20already\x20stored',_0x463f9e(0x7c1),{'id':_0x459929});}const _0x1fb88f=_0xce9a8a[_0x463f9e(0x1f2)]('sha256')[_0x463f9e(0x52f)](_0x463f9e(0x2b2))[_0x463f9e(0x52f)](_0x457e7a[_0x463f9e(0x285)])[_0x463f9e(0x4c5)]('hex'),_0x52284f=_0x1fb88f['slice'](0x0,0x8)+'-'+_0x1fb88f[_0x463f9e(0x333)](0x8,0xc)+'-5'+_0x1fb88f[_0x463f9e(0x333)](0xd,0x10)+'-'+(parseInt(_0x1fb88f[0x10],0x10)&0x3|0x8)[_0x463f9e(0x318)](0x10)+_0x1fb88f[_0x463f9e(0x333)](0x11,0x14)+'-'+_0x1fb88f[_0x463f9e(0x333)](0x14,0x20),_0x5c7b6e={'blob':_0x237e63,'activation':null,'addedAt':Date[_0x463f9e(0x556)](),'_licenseHash':_0x487f03,'licensee':_0x457e7a[_0x463f9e(0x168)][_0x463f9e(0xe5)],'expiresAt':_0x457e7a['decoded'][_0x463f9e(0x257)],'features':_0x457e7a[_0x463f9e(0x168)]['features'],'limits':_0x457e7a[_0x463f9e(0x168)]['limits'],'licenseType':_0x457e7a[_0x463f9e(0x168)][_0x463f9e(0x46f)]};return await _0x5aa2f0[_0x463f9e(0x359)](_0x340cd9,_0x52284f,_0x5c7b6e),{'id':_0x52284f,..._0x5c7b6e};}async[_0x26f754(0x11b)](_0x24dd25){const _0x2e0bf8=_0x26f754;let _0x30f56c;try{_0x30f56c=_0x5a4587[_0x2e0bf8(0x105)](_0x24dd25);}catch(_0x26b548){throw new _0x446044('Invalid\x20activation\x20token:\x20'+_0x26b548['message'],_0x2e0bf8(0x1df));}const _0x47839e=_0x30f56c['licenseHash'][_0x2e0bf8(0x318)](_0x2e0bf8(0x44a)),_0x256767=this['okdb']['_systemEnv'];if(!_0x256767||!_0x256767[_0x2e0bf8(0x79e)](_0x340cd9))throw new _0x446044('No\x20license\x20found\x20matching\x20this\x20activation\x20token',_0x2e0bf8(0x1df));let _0xd1b667=null,_0x5ba840=null;for(const {key:_0x4626cd,value:_0x1714ef}of _0x256767[_0x2e0bf8(0x5fb)](_0x340cd9)){if(_0x1714ef[_0x2e0bf8(0x4e3)]===_0x47839e){_0xd1b667=_0x4626cd,_0x5ba840=_0x1714ef;break;}}if(!_0xd1b667)throw new _0x446044(_0x2e0bf8(0x1b3),_0x2e0bf8(0x1df));const {rawBuf:_0x57b326}=_0x5a4587[_0x2e0bf8(0x47f)](_0x5ba840[_0x2e0bf8(0x112)]),_0x254cf4=_0x5a4587['verifyActivation']({'tokenString':_0x24dd25,'nodeId':this['okdb']['id'],'rawBlobBuf':_0x57b326,'pubKeyPem':_0x1d8b0e[_0x2e0bf8(0x566)],'pubFingerprint':_0x1d8b0e[_0x2e0bf8(0x3e8)]});if(!_0x254cf4[_0x2e0bf8(0x5b3)])throw new _0x446044('Activation\x20invalid:\x20'+_0x254cf4[_0x2e0bf8(0x174)],_0x2e0bf8(0x1df),{'reason':_0x254cf4[_0x2e0bf8(0x174)]});const _0x76e23f={..._0x5ba840,'activation':_0x24dd25};return await _0x256767['update'](_0x340cd9,_0xd1b667,_0x76e23f),{'id':_0xd1b667,..._0x76e23f};}async[_0x26f754(0x441)](_0x1bb423){const _0x3d38ed=_0x26f754,_0x3ce29c=this[_0x3d38ed(0x7c7)][_0x3d38ed(0x5e4)];if(!_0x3ce29c||!_0x3ce29c['hasType'](_0x340cd9))return;await _0x3ce29c[_0x3d38ed(0x5e2)](_0x340cd9,_0x1bb423);}async[_0x26f754(0x2e7)](){const _0x3f56f5=_0x26f754,_0x516801=this['okdb'][_0x3f56f5(0x5e4)];if(!_0x516801||!_0x516801[_0x3f56f5(0x79e)](_0x340cd9))return[];const _0x38adb0=this[_0x3f56f5(0x7c7)]['id'],_0x7c24b=[];for(const {key:_0x5be4d3,value:_0x4bfca3}of _0x516801[_0x3f56f5(0x5fb)](_0x340cd9)){const _0x24761d=this[_0x3f56f5(0x46b)](_0x4bfca3,_0x38adb0);_0x7c24b[_0x3f56f5(0x5d8)]({..._0x4bfca3,'id':_0x5be4d3,'status':_0x24761d});}return _0x7c24b;}['getPins'](){const _0x189b93=_0x26f754,_0x304f9a=this['okdb'][_0x189b93(0x5e4)];if(!_0x304f9a||!_0x304f9a['hasType'](_0x340cd9))return[];const _0x2c851c=this['okdb']['id'],_0x414331=[];for(const {key:_0x4ad7ea,value:_0x1a79c0}of _0x304f9a[_0x189b93(0x5fb)](_0x340cd9)){if(_0x1a79c0[_0x189b93(0x4e3)]){if(_0x1a79c0[_0x189b93(0x46f)]===_0x54c77f)_0x414331[_0x189b93(0x5d8)]({'licenseId':_0x4ad7ea,'pin':null});else{const _0x182d6d=Buffer[_0x189b93(0x309)](_0x1a79c0[_0x189b93(0x4e3)],_0x189b93(0x44a)),{pin:_0x4489bf}=_0x5a4587['derivePin'](_0x2c851c,_0x182d6d,_0x1d8b0e[_0x189b93(0x3e8)]);_0x414331['push']({'licenseId':_0x4ad7ea,'pin':_0x4489bf});}}}return _0x414331;}async[_0x26f754(0x75e)](){const _0x2d1e27=_0x26f754,_0x3ffb27=this[_0x2d1e27(0x420)];await this[_0x2d1e27(0x147)]();if(this['_active']&&this[_0x2d1e27(0x420)][_0x2d1e27(0x46f)]===_0x54c77f){const _0x32da39=Math['ceil']((this['_active'][_0x2d1e27(0x257)]-Date[_0x2d1e27(0x556)]())/0x5265c00);this['okdb'][_0x2d1e27(0x515)]?.[_0x2d1e27(0x593)]('⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20'+_0x32da39+_0x2d1e27(0x732),{'feature':_0x2d1e27(0x182),'licensee':this[_0x2d1e27(0x420)][_0x2d1e27(0xe5)],'expiresAt':new Date(this[_0x2d1e27(0x420)][_0x2d1e27(0x257)])[_0x2d1e27(0x340)]()});}this['_active']&&this[_0x2d1e27(0x420)][_0x2d1e27(0x46f)]===_0x207c6e&&this[_0x2d1e27(0x7c7)][_0x2d1e27(0x515)]?.[_0x2d1e27(0x593)](_0x2d1e27(0x218),{'feature':_0x2d1e27(0x182),'licensee':this[_0x2d1e27(0x420)][_0x2d1e27(0xe5)]});if(_0x3ffb27&&!this['_active']){this[_0x2d1e27(0x7c7)]['log']?.['warn']('License\x20expired\x20or\x20invalidated',{'feature':_0x2d1e27(0x182)}),this[_0x2d1e27(0x7c7)]['events']?.[_0x2d1e27(0x11e)](_0x47030f['LICENSE_INVALID'],{'previous':_0x3ffb27});const _0x557bd7=this[_0x2d1e27(0x7c7)][_0x2d1e27(0x489)]?.['onLicenseExpired']??_0x1d8b0e[_0x2d1e27(0x6a1)];_0x557bd7===_0x2d1e27(0x6b8)&&(this[_0x2d1e27(0x7c7)][_0x2d1e27(0x515)]?.[_0x2d1e27(0x5f2)](_0x2d1e27(0x752),{'feature':_0x2d1e27(0x182)}),this[_0x2d1e27(0x7c7)][_0x2d1e27(0x57c)]()[_0x2d1e27(0x290)](()=>{})[_0x2d1e27(0x47c)](()=>process['exit'](0x1)));}}}return okdbLicense={'LicenseChecker':_0x356c74,'_C':_0x1d8b0e,'FREE_TIER':_0x3d1f11},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x3d3152=_0x3f6c2b;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x494a4b=require$$0$3,_0x4f97e5=require$$0$1,_0x5d9eff=require$$0,_0xc34d5a=require$$1,_0x4595da=_0xc34d5a[_0x3d3152(0x3de)](_0x5d9eff[_0x3d3152(0x329)](),_0x3d3152(0xef)),_0x2eb68a=0x3e8,_0x4be853={'reset':_0x3d3152(0x52c),'bold':_0x3d3152(0x36b),'dim':_0x3d3152(0x5e9),'red':'\x1b[31m','green':'\x1b[32m','yellow':'\x1b[33m','blue':_0x3d3152(0x5bd),'magenta':_0x3d3152(0x41f),'cyan':_0x3d3152(0x2e6),'white':_0x3d3152(0x5a5),'gray':_0x3d3152(0x305)},_0x1213d1=!process[_0x3d3152(0x663)][_0x3d3152(0x250)]||!!process.env.NO_COLOR,_0x44e93b=(_0x42c8f5,_0x22cbf4)=>_0x1213d1?_0x22cbf4:''+_0x42c8f5+_0x22cbf4+_0x4be853[_0x3d3152(0x3d7)],_0x5b2dab={'error':_0x4be853[_0x3d3152(0xcb)],'warn':_0x4be853[_0x3d3152(0x3b4)],'info':_0x4be853[_0x3d3152(0x21e)],'debug':_0x4be853[_0x3d3152(0x6be)]},_0x5a2f39={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x1d3409(_0x370bfa,_0x41aa58=_0x3d3152(0x743)){const _0x556f24=_0x3d3152,{level:_0x241b4f,msg:_0x5ea395,meta:_0x24887d,context:_0x4f3763,ts:_0xd3c2f6}=_0x370bfa;if((_0x5a2f39[_0x241b4f]??0x1)<(_0x5a2f39[_0x41aa58]??0x1))return;const _0x184293=_0x44e93b(_0x4be853['gray'],new Date(_0xd3c2f6)[_0x556f24(0x340)]()),_0x1ef714=_0x44e93b(_0x5b2dab[_0x241b4f]??_0x4be853['white'],_0x241b4f['padEnd'](0x5));let _0x5a943b='\x20\x20'+_0x184293+'\x20'+_0x44e93b(_0x4be853[_0x556f24(0x5c7)],_0x1ef714)+'\x20'+_0x5ea395;if(_0x24887d&&Object[_0x556f24(0x434)](_0x24887d)['length']>0x0){const _0x395505=Object['entries'](_0x24887d)[_0x556f24(0x6d7)](([_0x5dde6b,_0x3e02a3])=>_0x5dde6b+'='+_0x3e02a3)[_0x556f24(0x3de)]('\x20');_0x5a943b+=_0x44e93b(_0x4be853[_0x556f24(0x431)],'\x20\x20['+_0x395505+']');}if(_0x4f3763!==undefined){const _0x57de81=typeof _0x4f3763==='object'?JSON['stringify'](_0x4f3763):String(_0x4f3763);_0x5a943b+=_0x44e93b(_0x4be853[_0x556f24(0x431)],'\x20\x20'+_0x57de81);}const _0x50d1fd=_0x241b4f===_0x556f24(0x5f2)||_0x241b4f===_0x556f24(0x593)?process[_0x556f24(0x331)][_0x556f24(0x4c7)][_0x556f24(0x1b4)](process[_0x556f24(0x331)]):process[_0x556f24(0x663)][_0x556f24(0x4c7)][_0x556f24(0x1b4)](process[_0x556f24(0x663)]);_0x50d1fd(_0x5a943b+'\x0a');}function _0x2c50d4(_0x4409a3,_0xcaef29){const _0x25cd87=_0x3d3152;if(_0x4409a3===0xcc||_0x4409a3>=0xc8&&_0x4409a3<0x12c&&!_0xcaef29){console['log']('\x0a\x20\x20'+_0x44e93b(_0x4be853[_0x25cd87(0x601)],'✓')+'\x0a');return;}if(_0x4409a3>=0x190||_0xcaef29?.[_0x25cd87(0x5f2)]){const _0x1192b4=_0xcaef29?.['error']??_0xcaef29?.[_0x25cd87(0x7b6)]??_0x25cd87(0xf5)+_0x4409a3;console[_0x25cd87(0x515)]('\x0a\x20\x20'+_0x44e93b(_0x4be853[_0x25cd87(0xcb)],'✗')+'\x20'+_0x44e93b(_0x4be853[_0x25cd87(0x5c7)]+_0x4be853[_0x25cd87(0xcb)],String(_0x4409a3))+'\x20\x20'+_0x1192b4+'\x0a');return;}const _0x743895=Object['prototype']['hasOwnProperty'][_0x25cd87(0x4fa)](_0xcaef29??{},_0x25cd87(0x404))?_0xcaef29[_0x25cd87(0x404)]:_0xcaef29,_0x20ebac=_0xcaef29?.[_0x25cd87(0x740)];console[_0x25cd87(0x515)](''),_0xae24d1(_0x743895,'\x20\x20');if(_0x20ebac?.[_0x25cd87(0x172)]!=null||_0x20ebac?.[_0x25cd87(0x68a)]!=null){const _0x161a0b=[];if(_0x20ebac['count']!=null)_0x161a0b[_0x25cd87(0x5d8)](_0x20ebac[_0x25cd87(0x172)]+'\x20result'+(_0x20ebac['count']!==0x1?'s':''));if(_0x20ebac[_0x25cd87(0x68a)]!=null)_0x161a0b[_0x25cd87(0x5d8)](_0x20ebac[_0x25cd87(0x68a)]+'ms');console[_0x25cd87(0x515)]('\x0a\x20\x20'+_0x44e93b(_0x4be853[_0x25cd87(0x431)],_0x161a0b['join'](_0x25cd87(0x647))));}console['log']('');}function _0xae24d1(_0x51ca63,_0x20b3f1=''){const _0x54ac2f=_0x3d3152;if(_0x51ca63===null||_0x51ca63===undefined){console[_0x54ac2f(0x515)](_0x20b3f1+_0x44e93b(_0x4be853[_0x54ac2f(0x431)],_0x54ac2f(0x656)));return;}if(Array[_0x54ac2f(0x654)](_0x51ca63)){if(_0x51ca63[_0x54ac2f(0x330)]===0x0){console[_0x54ac2f(0x515)](_0x20b3f1+_0x44e93b(_0x4be853['dim'],_0x54ac2f(0x36d)));return;}if(_0x51ca63[_0x54ac2f(0x753)](_0x3c866f=>_0x3c866f&&typeof _0x3c866f==='object'&&_0x54ac2f(0x17d)in _0x3c866f&&_0x54ac2f(0x4f8)in _0x3c866f)){_0x1c0a09(_0x51ca63,_0x20b3f1);return;}if(_0x51ca63['every'](_0x45e64f=>_0x45e64f&&typeof _0x45e64f==='object'&&_0x54ac2f(0x101)in _0x45e64f&&_0x54ac2f(0x172)in _0x45e64f)){_0x469bd4(_0x51ca63,_0x20b3f1);return;}if(_0x51ca63[_0x54ac2f(0x753)](_0x15c74e=>typeof _0x15c74e!=='object'||_0x15c74e===null)){_0x51ca63[_0x54ac2f(0x38d)]((_0x4aeea5,_0x48040c)=>console[_0x54ac2f(0x515)](_0x20b3f1+_0x44e93b(_0x4be853['gray'],_0x48040c+0x1+'.')+'\x20'+_0x44e93b(_0x4be853[_0x54ac2f(0x20b)],String(_0x4aeea5))));return;}_0x51ca63[_0x54ac2f(0x38d)]((_0x27fb0b,_0x3919c3)=>{const _0x2733f2=_0x54ac2f;console['log'](_0x20b3f1+_0x44e93b(_0x4be853[_0x2733f2(0x431)],'['+_0x3919c3+']'));if(typeof _0x27fb0b===_0x2733f2(0x24d)&&_0x27fb0b!==null)_0x18f3c1(_0x27fb0b,_0x20b3f1+'\x20\x20');else console[_0x2733f2(0x515)](_0x20b3f1+'\x20\x20'+String(_0x27fb0b));});return;}if(typeof _0x51ca63===_0x54ac2f(0x24d)){if('key'in _0x51ca63&&_0x54ac2f(0x4f8)in _0x51ca63&&Object[_0x54ac2f(0x434)](_0x51ca63)[_0x54ac2f(0x330)]<=0x3){console['log'](_0x20b3f1+_0x44e93b(_0x4be853[_0x54ac2f(0x5c7)]+_0x4be853[_0x54ac2f(0x21e)],String(_0x51ca63[_0x54ac2f(0x17d)])));const _0x4f5f3c=_0x51ca63[_0x54ac2f(0x4f8)];if(_0x4f5f3c&&typeof _0x4f5f3c===_0x54ac2f(0x24d))_0x18f3c1(_0x4f5f3c,_0x20b3f1);else console['log'](_0x20b3f1+_0x44e93b(_0x4be853['white'],String(_0x4f5f3c)));return;}_0x18f3c1(_0x51ca63,_0x20b3f1);return;}console[_0x54ac2f(0x515)](_0x20b3f1+_0x44e93b(_0x4be853[_0x54ac2f(0x20b)],String(_0x51ca63)));}function _0x18f3c1(_0x397ec7,_0x16ddd8=''){const _0x2a3b71=_0x3d3152,_0x42b83f=Object[_0x2a3b71(0x45d)](_0x397ec7);if(_0x42b83f[_0x2a3b71(0x330)]===0x0){console[_0x2a3b71(0x515)](_0x16ddd8+_0x44e93b(_0x4be853['dim'],'{}'));return;}const _0xbe16c3=Math[_0x2a3b71(0x2a6)](0x1c,Math['max'](..._0x42b83f[_0x2a3b71(0x6d7)](([_0x2135e1])=>_0x2135e1[_0x2a3b71(0x330)])));for(const [_0x562a13,_0x298623]of _0x42b83f){const _0x4e9e68=_0x44e93b(_0x4be853[_0x2a3b71(0x21e)],_0x562a13[_0x2a3b71(0x119)](_0xbe16c3));if(_0x298623===null||_0x298623===undefined)console[_0x2a3b71(0x515)](_0x16ddd8+_0x4e9e68+'\x20\x20'+_0x44e93b(_0x4be853[_0x2a3b71(0x431)],_0x2a3b71(0x177)));else{if(typeof _0x298623===_0x2a3b71(0x24d)){const _0x189c3f=JSON[_0x2a3b71(0x1c5)](_0x298623);_0x189c3f[_0x2a3b71(0x330)]<=0x50?console[_0x2a3b71(0x515)](_0x16ddd8+_0x4e9e68+'\x20\x20'+_0x44e93b(_0x4be853['dim'],_0x189c3f)):(console['log'](_0x16ddd8+_0x4e9e68),_0xae24d1(_0x298623,_0x16ddd8+'\x20\x20'));}else{const _0x32f1a0=typeof _0x298623==='boolean'?_0x44e93b(_0x298623?_0x4be853[_0x2a3b71(0x601)]:_0x4be853[_0x2a3b71(0x3b4)],String(_0x298623)):typeof _0x298623==='number'?_0x44e93b(_0x4be853['magenta'],String(_0x298623)):_0x44e93b(_0x4be853['white'],String(_0x298623));console[_0x2a3b71(0x515)](_0x16ddd8+_0x4e9e68+'\x20\x20'+_0x32f1a0);}}}}function _0x1c0a09(_0x10e707,_0x175e09=''){const _0x2de1e2=_0x3d3152,_0x526f8c=Math['min'](0x20,Math[_0x2de1e2(0x42f)](..._0x10e707[_0x2de1e2(0x6d7)](_0x589b81=>String(_0x589b81[_0x2de1e2(0x17d)])['length'])));for(const {key:_0x508c49,value:_0x18a3c8,score:_0x23a83a,clock:_0x132757}of _0x10e707){const _0x3686f8=_0x44e93b(_0x4be853[_0x2de1e2(0x5c7)]+_0x4be853[_0x2de1e2(0x21e)],String(_0x508c49)[_0x2de1e2(0x119)](_0x526f8c)),_0x38cc1d=_0x18a3c8==null?_0x44e93b(_0x4be853[_0x2de1e2(0x431)],_0x2de1e2(0x177)):typeof _0x18a3c8===_0x2de1e2(0x24d)?_0x44e93b(_0x4be853['dim'],JSON[_0x2de1e2(0x1c5)](_0x18a3c8)):_0x44e93b(_0x4be853[_0x2de1e2(0x20b)],String(_0x18a3c8)),_0x17c03f=_0x23a83a!=null?_0x44e93b(_0x4be853[_0x2de1e2(0x6be)],_0x2de1e2(0x7b4)+_0x23a83a[_0x2de1e2(0xc6)](0x4)):'',_0x16f88e=_0x132757!=null?_0x44e93b(_0x4be853[_0x2de1e2(0x6be)],'\x20\x20@'+_0x132757):'';console['log'](_0x175e09+_0x3686f8+'\x20\x20'+_0x38cc1d+_0x17c03f+_0x16f88e);}}function _0x469bd4(_0x17ca5b,_0x71b2d4=''){const _0x4c14c2=_0x3d3152,_0x3d7eb3=Math[_0x4c14c2(0x2a6)](0x20,Math['max'](..._0x17ca5b['map'](_0x1e1a7c=>_0x1e1a7c['type'][_0x4c14c2(0x330)])));for(const {type:_0x34c9f8,count:_0x2c0a51,fields:_0x635aac}of _0x17ca5b){if(_0x34c9f8[_0x4c14c2(0x1a9)]('~'))continue;const _0x46391a=_0x44e93b(_0x4be853['bold']+_0x4be853['cyan'],_0x34c9f8[_0x4c14c2(0x119)](_0x3d7eb3)),_0x3a2c34=_0x44e93b(_0x4be853['magenta'],String(_0x2c0a51)[_0x4c14c2(0x200)](0x6))+_0x44e93b(_0x4be853[_0x4c14c2(0x431)],_0x4c14c2(0x2c3)),_0x57280f=_0x635aac&&Object[_0x4c14c2(0x434)](_0x635aac)['length']?_0x44e93b(_0x4be853[_0x4c14c2(0x431)],_0x4c14c2(0x1e5)+Object[_0x4c14c2(0x434)](_0x635aac)[_0x4c14c2(0x333)](0x0,0x6)[_0x4c14c2(0x3de)](',\x20')+(Object['keys'](_0x635aac)[_0x4c14c2(0x330)]>0x6?'…':'')):'';console[_0x4c14c2(0x515)](_0x71b2d4+_0x46391a+'\x20\x20'+_0x3a2c34+_0x57280f);}}const _0xe3e1c2=[_0x3d3152(0x293),_0x3d3152(0x63c),_0x3d3152(0x746),_0x3d3152(0x50c),'transaction','processors/'];function _0x5ddfac(_0x141121,_0x1e4b72){const _0xc6c9be=_0x3d3152;if(_0x141121['startsWith'](_0xc6c9be(0x4e9)))return _0x141121;if(_0x141121[_0xc6c9be(0x1a9)]('/'))return _0xc6c9be(0x33a)+_0x141121;if(_0x141121[_0xc6c9be(0x1a9)]('env/'))return'/api/'+_0x141121;const _0x3ea7e9=_0xe3e1c2[_0xc6c9be(0x142)](_0x47e9de=>_0x141121===_0x47e9de['replace'](/\/$/,'')||_0x141121[_0xc6c9be(0x1a9)](_0x47e9de));return _0x3ea7e9?_0xc6c9be(0x681)+_0x1e4b72+'/'+_0x141121:'/api/'+_0x141121;}function _0x28676c(_0x4aff0a){const _0x3afa21=_0x3d3152,_0x3154e7={},_0x2199e5=[];let _0x263c07=0x0;while(_0x263c07<_0x4aff0a[_0x3afa21(0x330)]){if((_0x4aff0a[_0x263c07]===_0x3afa21(0x501)||_0x4aff0a[_0x263c07]==='-e')&&_0x4aff0a[_0x263c07+0x1]&&!_0x4aff0a[_0x263c07+0x1]['startsWith']('-'))_0x3154e7[_0x3afa21(0x52a)]=_0x4aff0a[++_0x263c07];else _0x4aff0a[_0x263c07]===_0x3afa21(0x30a)||_0x4aff0a[_0x263c07]==='-h'?_0x3154e7[_0x3afa21(0x5c0)]=!![]:_0x2199e5[_0x3afa21(0x5d8)](_0x4aff0a[_0x263c07]);_0x263c07++;}return{'flags':_0x3154e7,'rest':_0x2199e5};}const _0x336400={'system':_0x3d3152(0x1be),'envs':_0x3d3152(0x6b1),'types':_0x3d3152(0x5f4),'data':_0x3d3152(0x618),'indexes':_0x3d3152(0x1a6),'fts':'Full-text\x20search','sync':_0x3d3152(0x26b),'queue':_0x3d3152(0x1b9),'files':_0x3d3152(0x78f),'embeddings':_0x3d3152(0x5db),'engines':_0x3d3152(0x79f),'admin':_0x3d3152(0x327),'event':'Events','processor':_0x3d3152(0x3eb)},_0x438edc=['system',_0x3d3152(0x384),_0x3d3152(0x293),'data',_0x3d3152(0x45e),'fts',_0x3d3152(0x481),_0x3d3152(0x3a0),_0x3d3152(0x7b3),_0x3d3152(0x5f1),'engines','admin'];function _0x363fef(_0xd40985){const _0x1a72df=_0x3d3152;return _0xd40985[_0x1a72df(0x16b)](/^\/api/,'')[_0x1a72df(0x16b)](/^\[\/env\/:env=[^\]]*\]/,_0x1a72df(0x786))[_0x1a72df(0x16b)](/^\/env\/:env/,_0x1a72df(0x31b))[_0x1a72df(0x16b)](/^\//,'');}function _0x5a6c83(_0x49d79a,_0x2228fd=''){const _0x2c7376=_0x3d3152,_0x2f0c9f=_0x49d79a[_0x2c7376(0x36a)][_0x2c7376(0x70b)]()[_0x2c7376(0x64e)](_0x4f069c=>!_0x4f069c['meta']?.[_0x2c7376(0x18b)]),_0x39ceec=_0x2228fd?_0x2f0c9f['filter'](_0x586e76=>_0x586e76[_0x2c7376(0x58f)][_0x2c7376(0x3af)]()[_0x2c7376(0x4b0)](_0x2228fd[_0x2c7376(0x3af)]())||(_0x42e9b2(_0x586e76)??'')[_0x2c7376(0x3af)]()['includes'](_0x2228fd[_0x2c7376(0x3af)]())||_0x1dbd2b(_0x586e76)[_0x2c7376(0x142)](_0x2a5f26=>_0x2a5f26[_0x2c7376(0x3af)]()[_0x2c7376(0x4b0)](_0x2228fd['toLowerCase']()))):_0x2f0c9f;if(!_0x39ceec[_0x2c7376(0x330)]){console['log'](_0x44e93b(_0x4be853[_0x2c7376(0x3b4)],'\x0a\x20\x20No\x20routes\x20matching\x20\x22'+_0x2228fd+'\x22\x0a'));return;}const _0x312c40=new Map();for(const _0x349cd3 of _0x39ceec){const _0x41dfc0=_0x1dbd2b(_0x349cd3)[0x0]??_0x2c7376(0x1aa);if(!_0x312c40[_0x2c7376(0x229)](_0x41dfc0))_0x312c40[_0x2c7376(0x3c0)](_0x41dfc0,[]);_0x312c40['get'](_0x41dfc0)[_0x2c7376(0x5d8)](_0x349cd3);}const _0x26a0d=[..._0x438edc[_0x2c7376(0x64e)](_0x21b033=>_0x312c40[_0x2c7376(0x229)](_0x21b033)),...[..._0x312c40[_0x2c7376(0x434)]()]['filter'](_0x1538d4=>!_0x438edc[_0x2c7376(0x4b0)](_0x1538d4))];console[_0x2c7376(0x515)]('');for(const _0x919e29 of _0x26a0d){const _0x263faf=_0x312c40[_0x2c7376(0x294)](_0x919e29);if(!_0x263faf?.[_0x2c7376(0x330)])continue;console['log'](_0x44e93b(_0x4be853['bold'],'\x20\x20'+(_0x336400[_0x919e29]??_0x919e29)));for(const _0x360e8a of _0x263faf){const _0xd0fe7=_0x44e93b(_0x4be853[_0x2c7376(0x55c)],_0x360e8a[_0x2c7376(0x689)][_0x2c7376(0x119)](0x7)),_0x1da16c=_0x44e93b(_0x4be853[_0x2c7376(0x21e)],_0x363fef(_0x360e8a[_0x2c7376(0x58f)])),_0x198c3d=_0x42e9b2(_0x360e8a)?_0x44e93b(_0x4be853[_0x2c7376(0x431)],'\x20\x20'+_0x42e9b2(_0x360e8a)):'',_0x4a404e=_0x360e8a[_0x2c7376(0x472)]?.['id']?_0x44e93b(_0x4be853[_0x2c7376(0x6be)],_0x2c7376(0x4b4)+_0x360e8a['operation']['id']+']'):'';console[_0x2c7376(0x515)](_0x2c7376(0x2ec)+_0xd0fe7+'\x20'+_0x1da16c+_0x198c3d+_0x4a404e);}console['log']('');}}function _0x596872(_0x57be78,_0x2e007f){const _0x16f84d=_0x3d3152,_0x204587=_0x2e007f[_0x16f84d(0x16b)](/^\/api(\/env\/[^/]+)?\//,'')[_0x16f84d(0x1e8)]('/')[0x0],_0x4b7960=_0x57be78[_0x16f84d(0x36a)][_0x16f84d(0x70b)]()[_0x16f84d(0x64e)](_0x45679e=>_0x45679e[_0x16f84d(0x58f)][_0x16f84d(0x3af)]()[_0x16f84d(0x4b0)](_0x204587['toLowerCase']()));if(!_0x4b7960[_0x16f84d(0x330)]){console['log'](_0x44e93b(_0x4be853['yellow'],_0x16f84d(0x376)+_0x2e007f+'\x0a'));return;}console['log']('');for(const _0x516069 of _0x4b7960[_0x16f84d(0x333)](0x0,0xc)){for(const _0x4baf6a of _0x244e83(_0x516069)){console[_0x16f84d(0x515)](_0x4baf6a);}console[_0x16f84d(0x515)]('');}}function _0x42e9b2(_0x47eb81){const _0x58de13=_0x3d3152;return _0x47eb81[_0x58de13(0x472)]?.['summary']??_0x47eb81[_0x58de13(0x740)]?.['summary']??'';}function _0x35df16(_0x18a9d2){const _0x5691a9=_0x3d3152;return _0x18a9d2[_0x5691a9(0x472)]?.[_0x5691a9(0x146)]??_0x18a9d2[_0x5691a9(0x740)]?.[_0x5691a9(0x146)]??'';}function _0x1dbd2b(_0x17f31d){const _0x2a427e=_0x3d3152;return _0x17f31d[_0x2a427e(0x472)]?.[_0x2a427e(0x779)]?.[_0x2a427e(0x330)]?_0x17f31d['operation'][_0x2a427e(0x779)]:_0x17f31d[_0x2a427e(0x740)]?.[_0x2a427e(0x779)]??[];}function _0x244e83(_0x59bbff){const _0x25bf28=_0x3d3152,_0x3556e4=[];_0x3556e4['push']('\x20\x20'+_0x44e93b(_0x4be853[_0x25bf28(0x5c7)]+_0x4be853[_0x25bf28(0x55c)],_0x59bbff[_0x25bf28(0x689)][_0x25bf28(0x119)](0x7))+'\x20'+_0x44e93b(_0x4be853['bold']+_0x4be853[_0x25bf28(0x21e)],_0x59bbff[_0x25bf28(0x58f)]));_0x59bbff[_0x25bf28(0x472)]?.['id']&&_0x3556e4[_0x25bf28(0x5d8)](_0x25bf28(0x516)+_0x44e93b(_0x4be853[_0x25bf28(0x6be)],_0x25bf28(0x3fc)+_0x59bbff[_0x25bf28(0x472)]['id']));_0x42e9b2(_0x59bbff)&&_0x3556e4[_0x25bf28(0x5d8)](_0x25bf28(0x516)+_0x44e93b(_0x4be853[_0x25bf28(0x20b)],_0x42e9b2(_0x59bbff)));_0x35df16(_0x59bbff)&&_0x3556e4[_0x25bf28(0x5d8)](_0x25bf28(0x516)+_0x44e93b(_0x4be853[_0x25bf28(0x431)],_0x35df16(_0x59bbff)));_0x1dbd2b(_0x59bbff)['length']&&_0x3556e4[_0x25bf28(0x5d8)](_0x25bf28(0x516)+_0x44e93b(_0x4be853[_0x25bf28(0x6be)],_0x25bf28(0x5b6)+_0x1dbd2b(_0x59bbff)[_0x25bf28(0x3de)](',\x20')));_0x59bbff[_0x25bf28(0x472)]?.[_0x25bf28(0x351)]?.[_0x25bf28(0x6e4)]&&_0x3556e4['push'](_0x25bf28(0x516)+_0x44e93b(_0x4be853[_0x25bf28(0x6be)],_0x25bf28(0x5cf)+_0x59bbff['operation'][_0x25bf28(0x351)][_0x25bf28(0x6e4)]));_0x59bbff[_0x25bf28(0x472)]?.[_0x25bf28(0x36a)]?.[_0x25bf28(0x22a)]&&_0x59bbff['operation'][_0x25bf28(0x36a)][_0x25bf28(0x22a)]!==_0x25bf28(0x2cd)&&_0x3556e4['push'](_0x25bf28(0x516)+_0x44e93b(_0x4be853['gray'],_0x25bf28(0x6df)+_0x59bbff[_0x25bf28(0x472)][_0x25bf28(0x36a)]['transport']));if(_0x59bbff[_0x25bf28(0x472)]?.['inputSchema']){const _0x11f0d4=Object['keys'](_0x59bbff['operation'][_0x25bf28(0x73e)][_0x25bf28(0xd1)]||{});if(_0x11f0d4[_0x25bf28(0x330)])_0x3556e4[_0x25bf28(0x5d8)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x44e93b(_0x4be853['gray'],_0x25bf28(0x156)+_0x11f0d4['join'](',\x20')));}return _0x59bbff['meta']?.[_0x25bf28(0x4d2)]&&_0x3556e4[_0x25bf28(0x5d8)](_0x25bf28(0x516)+_0x44e93b(_0x4be853[_0x25bf28(0x6be)],_0x25bf28(0x729)+JSON[_0x25bf28(0x1c5)](_0x59bbff[_0x25bf28(0x740)][_0x25bf28(0x4d2)]))),_0x3556e4;}async function _0x538e22(_0x4694d0,_0x262385,_0x4ab153,_0x47031e=null){const _0x7a848f=_0x3d3152,_0x26f815=_0x4ab153['indexOf']('?'),_0x413fe5=_0x26f815>=0x0?_0x4ab153['slice'](0x0,_0x26f815):_0x4ab153,_0x32cbf5=_0x26f815>=0x0?_0x4ab153[_0x7a848f(0x333)](_0x26f815+0x1):'',_0x3404af=Object[_0x7a848f(0x630)](new URLSearchParams(_0x32cbf5)['entries']());return _0x4694d0['http']['handle'](_0x262385,_0x413fe5,{'body':_0x47031e,'query':_0x3404af,'headers':{'content-type':_0x7a848f(0x64f)}},{'internal':!![]});}function _0x17a34b(_0x5266d5){const _0x3ed8a8=_0x3d3152;if(!_0x5266d5)return null;const _0x40acb9=_0x5266d5[_0x3ed8a8(0x7ad)]();if(!_0x40acb9)return null;try{return JSON['parse'](_0x40acb9);}catch{}try{return JSON[_0x3ed8a8(0x2e3)](_0x16b300(_0x40acb9));}catch(_0x1d760d){throw new SyntaxError(_0x1d760d['message'],{'cause':_0x1d760d});}}function _0x16b300(_0xba741e){const _0xd58b36=_0x3d3152;let _0x4da7fc='',_0x773cb2=0x0;while(_0x773cb2<_0xba741e[_0xd58b36(0x330)]){const _0x38f70e=_0xba741e[_0x773cb2];if(_0x38f70e==='\x22'){_0x4da7fc+='\x22',_0x773cb2++;while(_0x773cb2<_0xba741e['length']&&_0xba741e[_0x773cb2]!=='\x22'){if(_0xba741e[_0x773cb2]==='\x5c'){_0x4da7fc+=_0xba741e[_0x773cb2++];if(_0x773cb2<_0xba741e[_0xd58b36(0x330)])_0x4da7fc+=_0xba741e[_0x773cb2++];}else _0x4da7fc+=_0xba741e[_0x773cb2++];}_0x4da7fc+='\x22';if(_0x773cb2<_0xba741e[_0xd58b36(0x330)])_0x773cb2++;continue;}if(_0x38f70e==='\x27'){_0x4da7fc+='\x22',_0x773cb2++;while(_0x773cb2<_0xba741e[_0xd58b36(0x330)]&&_0xba741e[_0x773cb2]!=='\x27'){if(_0xba741e[_0x773cb2]==='\x5c'&&_0xba741e[_0x773cb2+0x1]==='\x27')_0x4da7fc+='\x27',_0x773cb2+=0x2;else _0xba741e[_0x773cb2]==='\x22'?(_0x4da7fc+='\x5c\x22',_0x773cb2++):_0x4da7fc+=_0xba741e[_0x773cb2++];}_0x4da7fc+='\x22';if(_0x773cb2<_0xba741e[_0xd58b36(0x330)])_0x773cb2++;continue;}if('{}[]:,\x0a\x0d\x09\x20'[_0xd58b36(0x4b0)](_0x38f70e)){_0x4da7fc+=_0x38f70e,_0x773cb2++;continue;}let _0x3dc2af='';while(_0x773cb2<_0xba741e[_0xd58b36(0x330)]&&!_0xd58b36(0x2ed)[_0xd58b36(0x4b0)](_0xba741e[_0x773cb2])&&_0xba741e[_0x773cb2]!=='\x20'&&_0xba741e[_0x773cb2]!=='\x09'&&_0xba741e[_0x773cb2]!=='\x0a'&&_0xba741e[_0x773cb2]!=='\x0d'){_0x3dc2af+=_0xba741e[_0x773cb2++];}let _0x266d9d=_0x773cb2;while(_0x266d9d<_0xba741e[_0xd58b36(0x330)]&&(_0xba741e[_0x266d9d]==='\x20'||_0xba741e[_0x266d9d]==='\x09'))_0x266d9d++;if(_0xba741e[_0x266d9d]===':')_0x4da7fc+='\x22'+_0x3dc2af+'\x22';else _0x3dc2af===_0xd58b36(0x760)||_0x3dc2af===_0xd58b36(0x189)||_0x3dc2af===_0xd58b36(0x177)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0xd58b36(0x3a9)](_0x3dc2af)?_0x4da7fc+=_0x3dc2af:_0x4da7fc+='\x22'+_0x3dc2af+'\x22';}return _0x4da7fc[_0xd58b36(0x16b)](/,(\s*[}\]])/g,'$1');}function _0x24e6f0(_0x5840b2){const _0x5648c0=_0x3d3152,_0x5f4eae=[];let _0x342a0e=0x0;while(_0x342a0e<_0x5840b2['length']){while(_0x342a0e<_0x5840b2[_0x5648c0(0x330)]&&(_0x5840b2[_0x342a0e]==='\x20'||_0x5840b2[_0x342a0e]==='\x09'))_0x342a0e++;if(_0x342a0e>=_0x5840b2[_0x5648c0(0x330)])break;const _0x526aeb=_0x5840b2[_0x342a0e];if(_0x526aeb==='{'||_0x526aeb==='['){const _0x4ec71c=_0x526aeb==='{'?'}':']',_0x374cb8=_0x342a0e++;let _0x153415=0x1,_0x3a075f=![],_0x58e733='';while(_0x342a0e<_0x5840b2[_0x5648c0(0x330)]&&_0x153415>0x0){const _0x438ae8=_0x5840b2[_0x342a0e];if(_0x3a075f){if(_0x438ae8==='\x5c')_0x342a0e++;else{if(_0x438ae8===_0x58e733)_0x3a075f=![];}}else{if(_0x438ae8==='\x22'||_0x438ae8==='\x27')_0x3a075f=!![],_0x58e733=_0x438ae8;else{if(_0x438ae8===_0x526aeb)_0x153415++;else{if(_0x438ae8===_0x4ec71c)_0x153415--;}}}_0x342a0e++;}_0x5f4eae['push'](_0x5840b2[_0x5648c0(0x333)](_0x374cb8,_0x342a0e));continue;}if(_0x526aeb==='\x22'||_0x526aeb==='\x27'){const _0x59caa4=_0x526aeb;_0x342a0e++;let _0x3338b5='';while(_0x342a0e<_0x5840b2[_0x5648c0(0x330)]&&_0x5840b2[_0x342a0e]!==_0x59caa4){if(_0x5840b2[_0x342a0e]==='\x5c'&&_0x342a0e+0x1<_0x5840b2[_0x5648c0(0x330)])_0x342a0e++,_0x3338b5+=_0x5840b2[_0x342a0e++];else _0x3338b5+=_0x5840b2[_0x342a0e++];}if(_0x342a0e<_0x5840b2[_0x5648c0(0x330)])_0x342a0e++;_0x5f4eae[_0x5648c0(0x5d8)](_0x3338b5);continue;}let _0x33cdc7='';while(_0x342a0e<_0x5840b2[_0x5648c0(0x330)]&&_0x5840b2[_0x342a0e]!=='\x20'&&_0x5840b2[_0x342a0e]!=='\x09'&&_0x5840b2[_0x342a0e]!=='{'&&_0x5840b2[_0x342a0e]!=='['){_0x33cdc7+=_0x5840b2[_0x342a0e++];}if(_0x33cdc7)_0x5f4eae[_0x5648c0(0x5d8)](_0x33cdc7);}return _0x5f4eae;}function _0x13a9cf(_0x4571b7,_0x592950){const _0x331db0=_0x3d3152,_0x41d501=[..._0x4571b7[_0x331db0(0x561)][_0x331db0(0x434)]()][_0x331db0(0x64e)](_0x23d7e1=>!_0x23d7e1['startsWith']('~'));console['log'](['',_0x44e93b(_0x4be853[_0x331db0(0x5c7)]+_0x4be853[_0x331db0(0x21e)],_0x331db0(0x6fb)),_0x44e93b(_0x4be853[_0x331db0(0x5c7)]+_0x4be853[_0x331db0(0x21e)],'\x20\x20║')+_0x44e93b(_0x4be853[_0x331db0(0x5c7)],_0x331db0(0x387))+_0x44e93b(_0x4be853['bold']+_0x4be853[_0x331db0(0x21e)],'║'),_0x44e93b(_0x4be853['bold']+_0x4be853[_0x331db0(0x21e)],_0x331db0(0x2c0)),'','\x20\x20'+_0x44e93b(_0x4be853[_0x331db0(0x601)],'✓')+'\x20'+_0x44e93b(_0x4be853[_0x331db0(0x5c7)],_0x331db0(0x43f))+'\x20\x20http://localhost:'+_0x592950[_0x331db0(0x2fa)],..._0x592950[_0x331db0(0x175)]>0x1?['\x20\x20'+_0x44e93b(_0x4be853['green'],'✓')+'\x20'+_0x44e93b(_0x4be853[_0x331db0(0x5c7)],_0x331db0(0x335))+'\x20'+_0x592950[_0x331db0(0x175)]+_0x331db0(0x1f4)+_0x44e93b(_0x4be853[_0x331db0(0x6be)],_0x331db0(0x2f5))]:[],'\x20\x20'+_0x44e93b(_0x4be853[_0x331db0(0x601)],'✓')+'\x20'+_0x44e93b(_0x4be853[_0x331db0(0x5c7)],_0x331db0(0x421))+_0x331db0(0x589)+_0x592950[_0x331db0(0x2fa)]+_0x331db0(0x33a),'\x20\x20'+_0x44e93b(_0x4be853['green'],'✓')+'\x20'+_0x44e93b(_0x4be853[_0x331db0(0x5c7)],'path')+_0x331db0(0x2ec)+_0x592950['dbPath'],'\x20\x20'+_0x44e93b(_0x4be853[_0x331db0(0x601)],'✓')+'\x20'+_0x44e93b(_0x4be853['bold'],'id')+_0x331db0(0x451)+_0x44e93b(_0x4be853['gray'],_0x4571b7['id']),'\x20\x20'+_0x44e93b(_0x4be853[_0x331db0(0x601)],'✓')+'\x20'+_0x44e93b(_0x4be853[_0x331db0(0x5c7)],_0x331db0(0x384))+_0x331db0(0x2ec)+_0x41d501['map'](_0x5a71c8=>_0x44e93b(_0x4be853[_0x331db0(0x21e)],_0x5a71c8))['join']('\x20\x20'),..._0x592950['noAdmin']?[]:['\x20\x20'+_0x44e93b(_0x4be853[_0x331db0(0x601)],'✓')+'\x20'+_0x44e93b(_0x4be853[_0x331db0(0x5c7)],_0x331db0(0x176))+_0x331db0(0x6bc)+_0x592950['port']+_0x331db0(0x695)],'',_0x44e93b(_0x4be853[_0x331db0(0x431)],_0x331db0(0x275)+_0x44e93b(_0x4be853[_0x331db0(0x5c7)],'help')+'\x20for\x20commands,\x20'+_0x44e93b(_0x4be853[_0x331db0(0x5c7)],_0x331db0(0x662))+_0x331db0(0xd5)+_0x44e93b(_0x4be853[_0x331db0(0x5c7)],'exit')+'\x20to\x20quit.'),''][_0x331db0(0x3de)]('\x0a'));}function _0x449777(_0x57c854){const _0x456b03=_0x3d3152;console[_0x456b03(0x515)]('\x0a'+_0x44e93b(_0x4be853['bold'],'\x20\x20Path\x20access')+'\x20\x20'+_0x44e93b(_0x4be853[_0x456b03(0x431)],_0x456b03(0x480))+_0x456b03(0x791)+_0x44e93b(_0x4be853[_0x456b03(0x21e)],_0x456b03(0x113))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20'+_0x44e93b(_0x4be853[_0x456b03(0x21e)],_0x456b03(0x113))+'\x20'+_0x44e93b(_0x4be853[_0x456b03(0x3b4)],_0x456b03(0x636))+'\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20'+_0x44e93b(_0x4be853[_0x456b03(0x21e)],'VERB')+'\x20'+_0x44e93b(_0x4be853['cyan'],_0x456b03(0x113))+'\x20'+_0x44e93b(_0x4be853[_0x456b03(0x3b4)],_0x456b03(0x3d3))+_0x456b03(0x703)+_0x44e93b(_0x4be853[_0x456b03(0x431)],_0x456b03(0x56f))+_0x456b03(0x3f8)+_0x44e93b(_0x4be853[_0x456b03(0x6be)],'info')+_0x456b03(0x26c)+_0x44e93b(_0x4be853[_0x456b03(0x6be)],_0x456b03(0x384))+_0x456b03(0x6a6)+_0x44e93b(_0x4be853[_0x456b03(0x6be)],_0x456b03(0x293))+_0x456b03(0x2d4)+_0x57c854[_0x456b03(0x52a)]+_0x456b03(0x627)+_0x44e93b(_0x4be853[_0x456b03(0x6be)],_0x456b03(0x523))+_0x456b03(0x3ba)+_0x57c854[_0x456b03(0x52a)]+_0x456b03(0x755)+_0x44e93b(_0x4be853['gray'],_0x456b03(0x7b8))+_0x456b03(0x269)+_0x57c854[_0x456b03(0x52a)]+_0x456b03(0x497)+_0x44e93b(_0x4be853['gray'],_0x456b03(0x503))+_0x456b03(0x3d4)+_0x57c854[_0x456b03(0x52a)]+_0x456b03(0x6ad)+_0x44e93b(_0x4be853[_0x456b03(0x6be)],_0x456b03(0x6a8))+_0x456b03(0x3f8)+_0x44e93b(_0x4be853[_0x456b03(0x6be)],_0x456b03(0x55f))+_0x456b03(0x3f8)+_0x44e93b(_0x4be853['gray'],'env/staging/info')+_0x456b03(0x1d6)+_0x44e93b(_0x4be853['bold'],_0x456b03(0x1e0))+'\x20\x20'+_0x44e93b(_0x4be853['dim'],_0x456b03(0x619))+'\x0a\x0a\x20\x20'+_0x44e93b(_0x4be853['cyan'],_0x456b03(0x667))+_0x456b03(0x67b)+_0x44e93b(_0x4be853['cyan'],_0x456b03(0x30a))+_0x456b03(0x1a5)+_0x44e93b(_0x4be853[_0x456b03(0x431)],'Examples')+_0x456b03(0x3f8)+_0x44e93b(_0x4be853['gray'],_0x456b03(0x460))+'\x0a\x20\x20\x20\x20'+_0x44e93b(_0x4be853[_0x456b03(0x6be)],'type/users/item/alice\x20--env\x20staging')+_0x456b03(0x3f8)+_0x44e93b(_0x4be853[_0x456b03(0x6be)],_0x456b03(0x36c))+'\x0a\x0a'+_0x44e93b(_0x4be853[_0x456b03(0x5c7)],'\x20\x20Shell\x20commands')+_0x456b03(0x791)+_0x44e93b(_0x4be853['cyan'],'use\x20<env>')+_0x456b03(0x1ef)+_0x44e93b(_0x4be853['cyan'],_0x456b03(0x52a))+_0x456b03(0x204)+_0x44e93b(_0x4be853['cyan'],_0x456b03(0x662))+'\x20'+_0x44e93b(_0x4be853[_0x456b03(0x431)],_0x456b03(0x16f))+_0x456b03(0x726)+_0x44e93b(_0x4be853['cyan'],'logs')+'\x20'+_0x44e93b(_0x4be853['dim'],_0x456b03(0x343))+_0x456b03(0x624)+_0x44e93b(_0x4be853['cyan'],_0x456b03(0x375))+_0x456b03(0x67c)+_0x44e93b(_0x4be853[_0x456b03(0x21e)],'help')+_0x456b03(0x2c4)+_0x44e93b(_0x4be853[_0x456b03(0x21e)],_0x456b03(0x256))+'\x20'+_0x44e93b(_0x4be853[_0x456b03(0x431)],_0x456b03(0x679))+'\x20\x20\x20\x20graceful\x20shutdown\x0a');}let _0xa20fff=![];async function _0x51391f(_0x34898a,_0x7f11d5=0x0,_0x5226d5=null){const _0x55b113=_0x3d3152;_0xa20fff&&(process[_0x55b113(0x331)][_0x55b113(0x4c7)](_0x44e93b(_0x4be853[_0x55b113(0xcb)],_0x55b113(0x518))),process[_0x55b113(0x256)](0x82));_0xa20fff=!![],process[_0x55b113(0x663)]['write']('\x0a'),process[_0x55b113(0x331)][_0x55b113(0x4c7)](_0x44e93b(_0x4be853[_0x55b113(0x3b4)],_0x55b113(0x664)+(_0x5226d5?_0x55b113(0x736)+_0x5226d5+',\x20':'')+_0x55b113(0x765)));const _0x5ba3c4=setTimeout(()=>{const _0x172cb7=_0x55b113;process[_0x172cb7(0x331)]['write'](_0x44e93b(_0x4be853[_0x172cb7(0xcb)],_0x172cb7(0x209))),process[_0x172cb7(0x256)](0x1);},0x1388);try{await _0x34898a[_0x55b113(0x57c)]();}catch(_0x227f1a){console[_0x55b113(0x5f2)](_0x44e93b(_0x4be853[_0x55b113(0xcb)],'\x20\x20'+_0x227f1a[_0x55b113(0x7b6)]));}clearTimeout(_0x5ba3c4),process['stderr'][_0x55b113(0x4c7)](_0x44e93b(_0x4be853[_0x55b113(0x431)],_0x55b113(0x4a4))),process[_0x55b113(0x256)](_0x7f11d5);}function _0x2ec81a(_0x4b5ef3){const _0x1b9ef5=_0x3d3152,_0x5c6678=_0x4b5ef3['env']!==_0x1b9ef5(0x5c4)?_0x44e93b(_0x4be853[_0x1b9ef5(0x3b4)],'['+_0x4b5ef3[_0x1b9ef5(0x52a)]+']'):'';return _0x44e93b(_0x4be853['bold']+_0x4be853[_0x1b9ef5(0x21e)],_0x1b9ef5(0x7c7))+_0x5c6678+_0x44e93b(_0x4be853[_0x1b9ef5(0x6be)],'>\x20');}const _0x52bf0a=new Set([_0x3d3152(0x32b),_0x3d3152(0x597),_0x3d3152(0x2f6),'PATCH','DELETE']);async function _0x139217(_0x1984a7,_0x5853c3,_0xe7a363,_0x206f8b,_0x3a1adf,_0x507435){const _0x16e08f=_0x3d3152;_0x1984a7=_0x1984a7['trim']();if(!_0x1984a7||_0x1984a7['startsWith']('#'))return;const _0x54f47b=_0x24e6f0(_0x1984a7),{flags:_0x21bd94,rest:_0x47351b}=_0x28676c(_0x54f47b);if(!_0x47351b[_0x16e08f(0x330)])return;const _0x59d907=_0x47351b[0x0],_0x420a19=_0x59d907['toUpperCase']();if(_0x420a19===_0x16e08f(0x771)){if(_0x47351b[0x1])_0x596872(_0x5853c3,_0x5ddfac(_0x47351b[0x1],_0x21bd94[_0x16e08f(0x52a)]??_0x3a1adf[_0x16e08f(0x52a)]));else _0x449777(_0x3a1adf);return;}if(_0x420a19===_0x16e08f(0x2bf)){const _0x65829e=_0x47351b[0x1];if(!_0x65829e){console['log'](_0x44e93b(_0x4be853['red'],'\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a'));return;}try{_0x5853c3['env'](_0x65829e),_0x3a1adf[_0x16e08f(0x52a)]=_0x65829e,_0x507435?.[_0x16e08f(0x555)](_0x2ec81a(_0x3a1adf)),console[_0x16e08f(0x515)](_0x16e08f(0x12b)+_0x44e93b(_0x4be853[_0x16e08f(0x601)],'✓')+_0x16e08f(0x666)+_0x44e93b(_0x4be853[_0x16e08f(0x5c7)]+_0x4be853[_0x16e08f(0x21e)],_0x65829e)+'\x0a');}catch{console['log']('\x0a\x20\x20'+_0x44e93b(_0x4be853[_0x16e08f(0xcb)],'✗')+'\x20environment\x20'+_0x44e93b(_0x4be853[_0x16e08f(0x5c7)],_0x65829e)+_0x16e08f(0x19f)+_0x44e93b(_0x4be853[_0x16e08f(0x431)],'\x20—\x20type\x20env\x20to\x20list\x20available\x0a'));}return;}if(_0x420a19===_0x16e08f(0x400)){const _0xdbc838=[..._0x5853c3['_envs'][_0x16e08f(0x434)]()]['filter'](_0x5a4260=>!_0x5a4260[_0x16e08f(0x1a9)]('~'));console[_0x16e08f(0x515)]('');for(const _0x5b6a68 of _0xdbc838){const _0x3445fa=_0x5b6a68===_0x3a1adf[_0x16e08f(0x52a)];console[_0x16e08f(0x515)]('\x20\x20'+(_0x3445fa?_0x44e93b(_0x4be853[_0x16e08f(0x601)],'●'):_0x44e93b(_0x4be853[_0x16e08f(0x431)],'○'))+'\x20\x20'+(_0x3445fa?_0x44e93b(_0x4be853[_0x16e08f(0x5c7)]+_0x4be853[_0x16e08f(0x21e)],_0x5b6a68):_0x44e93b(_0x4be853[_0x16e08f(0x431)],_0x5b6a68)));}console[_0x16e08f(0x515)](_0x16e08f(0x12b)+_0x44e93b(_0x4be853['dim'],_0x16e08f(0x2e0))+'\x20'+_0x44e93b(_0x4be853['cyan'],_0x3a1adf[_0x16e08f(0x52a)])),console[_0x16e08f(0x515)]('');return;}if(_0x420a19===_0x16e08f(0x456)){const _0x4b8c01=[..._0x5853c3[_0x16e08f(0x561)]['values']()][_0x16e08f(0x64e)](_0x423fb7=>!_0x423fb7[_0x16e08f(0x339)]['startsWith']('~'));console['log']('');const _0x2c305c=Math['max'](..._0x4b8c01['map'](_0x3836c3=>_0x3836c3['name']['length']));for(const _0x150760 of _0x4b8c01){const _0x5723a6=_0x150760[_0x16e08f(0x339)]===_0x3a1adf[_0x16e08f(0x52a)],_0x32f1ec=_0x5723a6?_0x44e93b(_0x4be853[_0x16e08f(0x601)],'●'):_0x44e93b(_0x4be853[_0x16e08f(0x431)],'○'),_0x449c93=_0x5723a6?_0x44e93b(_0x4be853[_0x16e08f(0x5c7)]+_0x4be853[_0x16e08f(0x21e)],_0x150760[_0x16e08f(0x339)]['padEnd'](_0x2c305c)):_0x44e93b(_0x4be853['dim'],_0x150760[_0x16e08f(0x339)]['padEnd'](_0x2c305c)),_0x19a901=[..._0x150760[_0x16e08f(0x3a2)][_0x16e08f(0x434)]()]['filter'](_0x20674f=>!_0x20674f[_0x16e08f(0x1a9)]('~')),_0x5bec42=_0x19a901[_0x16e08f(0x330)]?_0x44e93b(_0x4be853['dim'],_0x19a901['slice'](0x0,0x5)[_0x16e08f(0x3de)](',\x20')+(_0x19a901[_0x16e08f(0x330)]>0x5?_0x16e08f(0x5cc)+(_0x19a901['length']-0x5)+_0x16e08f(0x447):'')):_0x44e93b(_0x4be853[_0x16e08f(0x431)],'(no\x20types)');console[_0x16e08f(0x515)]('\x20\x20'+_0x32f1ec+'\x20\x20'+_0x449c93+'\x20\x20'+_0x5bec42);}console[_0x16e08f(0x515)]('');return;}if(_0x420a19===_0x16e08f(0x1b2)){const _0x184c3e=_0x21bd94[_0x16e08f(0x52a)]??_0x47351b[0x1]??_0x3a1adf[_0x16e08f(0x52a)];try{const _0x204cdd=_0x5853c3[_0x16e08f(0x52a)](_0x184c3e),_0x211356=[..._0x204cdd['typeSubDbs']['keys']()][_0x16e08f(0x64e)](_0x23de1d=>!_0x23de1d[_0x16e08f(0x1a9)]('~'))['sort']();console[_0x16e08f(0x515)]('\x0a\x20\x20'+_0x44e93b(_0x4be853[_0x16e08f(0x431)],_0x211356[_0x16e08f(0x330)]+_0x16e08f(0x197)+(_0x211356['length']!==0x1?'s':'')+_0x16e08f(0x394)+_0x184c3e));for(const _0x1084b4 of _0x211356){const _0xf7f4de=_0x204cdd[_0x16e08f(0x3a2)][_0x16e08f(0x294)](_0x1084b4),_0x5f3716=_0xf7f4de?.[_0x16e08f(0x29a)]?.[_0x16e08f(0x254)]?.()??0x0,_0x3bd130=_0x44e93b(_0x4be853[_0x16e08f(0x5c7)]+_0x4be853[_0x16e08f(0x21e)],_0x1084b4[_0x16e08f(0x119)](0x1c));console[_0x16e08f(0x515)](_0x16e08f(0x2ec)+_0x3bd130+'\x20\x20'+_0x44e93b(_0x4be853[_0x16e08f(0x55c)],String(_0x5f3716)['padStart'](0x6))+'\x20'+_0x44e93b(_0x4be853[_0x16e08f(0x431)],'records'));}console['log']('');}catch(_0x1f7171){console['error'](_0x44e93b(_0x4be853[_0x16e08f(0xcb)],_0x16e08f(0x12b)+_0x1f7171[_0x16e08f(0x7b6)]+'\x0a'));}return;}if(_0x420a19==='ROUTES'){_0x5a6c83(_0x5853c3,_0x47351b[_0x16e08f(0x333)](0x1)['join']('\x20'));return;}if(_0x420a19===_0x16e08f(0x1b6)){const _0xf04508=(_0x47351b[0x1]??'')[_0x16e08f(0x3af)]();if(!_0xf04508||_0xf04508==='on')_0x206f8b[_0x16e08f(0x22b)]=!![],_0x206f8b['level']=_0x16e08f(0x743),console[_0x16e08f(0x515)](_0x16e08f(0x12b)+_0x44e93b(_0x4be853['green'],'✓')+'\x20logs\x20on\x20\x20'+_0x44e93b(_0x4be853['dim'],_0x16e08f(0x69f))+'\x0a');else{if(_0xf04508==='off')_0x206f8b[_0x16e08f(0x22b)]=![],console[_0x16e08f(0x515)](_0x16e08f(0x12b)+_0x44e93b(_0x4be853[_0x16e08f(0x3b4)],'○')+_0x16e08f(0x74c));else _0x5a2f39[_0xf04508]!==undefined?(_0x206f8b[_0x16e08f(0x22b)]=!![],_0x206f8b[_0x16e08f(0x33e)]=_0xf04508,console[_0x16e08f(0x515)](_0x16e08f(0x12b)+_0x44e93b(_0x4be853[_0x16e08f(0x601)],'✓')+_0x16e08f(0x673)+_0x44e93b(_0x4be853[_0x16e08f(0x5c7)],_0xf04508)+'\x0a')):console[_0x16e08f(0x5f2)](_0x44e93b(_0x4be853['red'],_0x16e08f(0x265)));}return;}if(_0x420a19==='EXIT'||_0x420a19===_0x16e08f(0x5f5)){await _0x51391f(_0x5853c3,0x0);return;}if(_0x420a19===_0x16e08f(0x691)){const _0x46d89b='http://localhost:'+_0xe7a363[_0x16e08f(0x2fa)]+_0x16e08f(0x695),_0x2011c4=process[_0x16e08f(0x303)]===_0x16e08f(0x369)?_0x16e08f(0x439)+_0x46d89b:process[_0x16e08f(0x303)]===_0x16e08f(0x103)?_0x16e08f(0x4bb)+_0x46d89b:_0x16e08f(0x274)+_0x46d89b;require$$4[_0x16e08f(0x1f8)](_0x2011c4),console[_0x16e08f(0x515)](_0x16e08f(0x12b)+_0x44e93b(_0x4be853[_0x16e08f(0x601)],'✓')+_0x16e08f(0x3ea)+_0x44e93b(_0x4be853[_0x16e08f(0x21e)],_0x46d89b)+'\x0a');return;}let _0x57ec13,_0x38d0d8,_0x2d303c;if(_0x52bf0a[_0x16e08f(0x229)](_0x420a19)){_0x57ec13=_0x420a19,_0x38d0d8=_0x47351b[0x1],_0x2d303c=_0x47351b[_0x16e08f(0x333)](0x2);if(!_0x38d0d8){console[_0x16e08f(0x5f2)](_0x44e93b(_0x4be853[_0x16e08f(0xcb)],_0x16e08f(0x680)+_0x59d907+_0x16e08f(0xfa)));return;}}else _0x57ec13=null,_0x38d0d8=_0x47351b[0x0],_0x2d303c=_0x47351b[_0x16e08f(0x333)](0x1);const _0x323e03=_0x21bd94[_0x16e08f(0x52a)]??_0x3a1adf[_0x16e08f(0x52a)],_0x1ed7d1=_0x5ddfac(_0x38d0d8,_0x323e03);if(_0x21bd94[_0x16e08f(0x5c0)]){_0x596872(_0x5853c3,_0x1ed7d1);return;}let _0x3adcbd=null;if(_0x2d303c[_0x16e08f(0x330)]){const _0x1b26e9=_0x2d303c[_0x16e08f(0x3de)]('\x20');try{_0x3adcbd=_0x17a34b(_0x1b26e9);}catch(_0x190091){console[_0x16e08f(0x5f2)](_0x44e93b(_0x4be853[_0x16e08f(0xcb)],'\x0a\x20\x20Invalid\x20JSON:\x20'+_0x1b26e9+'\x0a\x20\x20'+_0x44e93b(_0x4be853['dim'],_0x190091['message'])+'\x0a'));return;}}if(!_0x57ec13)_0x57ec13=_0x3adcbd!==null?'POST':_0x16e08f(0x32b);try{const _0x11b7d6=await _0x538e22(_0x5853c3,_0x57ec13,_0x1ed7d1,_0x3adcbd);_0x2c50d4(_0x11b7d6[_0x16e08f(0x41e)],_0x11b7d6[_0x16e08f(0x4d2)]);}catch(_0x69c7e8){console[_0x16e08f(0x5f2)](_0x16e08f(0x12b)+_0x44e93b(_0x4be853[_0x16e08f(0xcb)],'✗')+'\x20'+_0x69c7e8[_0x16e08f(0x7b6)]+'\x0a');}}class _0x4ae70e{constructor(){this['children']=new Map(),this['dynamic']=null,this['terminal']=![];}}function _0x5469d2(_0x343911){const _0x4b0e0c=_0x3d3152,_0x298c63=new _0x4ae70e();for(const _0x5eb9b5 of _0x343911){if(_0x5eb9b5['meta']?.['hidden'])continue;const _0x4b2c82=_0x5eb9b5[_0x4b0e0c(0x58f)][_0x4b0e0c(0x16b)](/^\/api/,'')[_0x4b0e0c(0x16b)](/^\[\/env\/:env=[^\]]*\]/,'')['replace'](/^\//,'');if(!_0x4b2c82)continue;let _0x4cbe97=_0x298c63;for(const _0x36282a of _0x4b2c82[_0x4b0e0c(0x1e8)]('/')[_0x4b0e0c(0x64e)](Boolean)){if(_0x36282a[_0x4b0e0c(0x1a9)](':')){const _0xdf9be=_0x36282a[_0x4b0e0c(0x333)](0x1);if(!_0x4cbe97[_0x4b0e0c(0x34d)])_0x4cbe97[_0x4b0e0c(0x34d)]={'param':_0xdf9be,'node':new _0x4ae70e()};_0x4cbe97=_0x4cbe97[_0x4b0e0c(0x34d)]['node'];}else{if(!_0x4cbe97['children'][_0x4b0e0c(0x229)](_0x36282a))_0x4cbe97[_0x4b0e0c(0x6c0)][_0x4b0e0c(0x3c0)](_0x36282a,new _0x4ae70e());_0x4cbe97=_0x4cbe97[_0x4b0e0c(0x6c0)]['get'](_0x36282a);}}_0x4cbe97['terminal']=!![];}return _0x298c63;}const _0x4feb53=new Map();function _0x3944fb(_0x2c9e45,_0x27b922,_0x4787fc){const _0x52e327=_0x3d3152,_0x1059eb=_0x4feb53[_0x52e327(0x294)](_0x2c9e45);if(_0x1059eb&&_0x1059eb[_0x52e327(0x3c4)]>Date['now']())return _0x1059eb['val'];const _0x71c28a=_0x4787fc();return _0x4feb53[_0x52e327(0x3c0)](_0x2c9e45,{'val':_0x71c28a,'exp':Date[_0x52e327(0x556)]()+_0x27b922}),_0x71c28a;}function _0x442d50(_0x38f06e,_0x23a993,_0x2a41d3,_0x329d31){const _0x73b2ba=_0x3d3152,_0x2b9b29=_0x23a993[_0x73b2ba(0x52a)]??_0x329d31['env'];switch(_0x38f06e){case _0x73b2ba(0x52a):return[..._0x2a41d3[_0x73b2ba(0x561)]['keys']()][_0x73b2ba(0x64e)](_0x13b9f7=>!_0x13b9f7[_0x73b2ba(0x1a9)]('~'));case _0x73b2ba(0x101):return _0x3944fb('types:'+_0x2b9b29,0x7d0,()=>{const _0x1bc8c8=_0x73b2ba;try{return[..._0x2a41d3['env'](_0x2b9b29)[_0x1bc8c8(0x3a2)][_0x1bc8c8(0x434)]()][_0x1bc8c8(0x64e)](_0x464959=>!_0x464959[_0x1bc8c8(0x1a9)]('~'));}catch{return[];}});case _0x73b2ba(0x17d):if(!_0x23a993['type'])return[];return _0x3944fb(_0x73b2ba(0x704)+_0x2b9b29+':'+_0x23a993['type'],0x5dc,()=>{const _0x9a0c93=_0x73b2ba;try{const _0xb02179=_0x2a41d3[_0x9a0c93(0x52a)](_0x2b9b29)[_0x9a0c93(0x3a2)][_0x9a0c93(0x294)](_0x23a993[_0x9a0c93(0x101)]);if(!_0xb02179?.['data'])return[];const _0x2c8077=[];for(const {key:_0x963285}of _0xb02179[_0x9a0c93(0x29a)][_0x9a0c93(0x5fb)]({'limit':0x32})){_0x2c8077[_0x9a0c93(0x5d8)](String(_0x963285));if(_0x2c8077['length']>=0x32)break;}return _0x2c8077;}catch{return[];}});case _0x73b2ba(0x66f):if(!_0x23a993[_0x73b2ba(0x101)])return[];return _0x3944fb(_0x73b2ba(0x458)+_0x2b9b29+':'+_0x23a993[_0x73b2ba(0x101)],0x7d0,()=>{const _0x499656=_0x73b2ba;try{const _0x5b7298=_0x2a41d3[_0x499656(0x52a)](_0x2b9b29)[_0x499656(0x3a2)]['get'](_0x23a993[_0x499656(0x101)]);return _0x5b7298?[..._0x5b7298[_0x499656(0x122)]?.[_0x499656(0x434)]()??[]]:[];}catch{return[];}});case _0x73b2ba(0x5fe):if(!_0x23a993['type'])return[];return _0x3944fb(_0x73b2ba(0x138)+_0x2b9b29+':'+_0x23a993[_0x73b2ba(0x101)],0x7d0,()=>{const _0x36f86f=_0x73b2ba;try{return _0x2a41d3[_0x36f86f(0xe3)]?.[_0x36f86f(0x4be)]?.(_0x23a993[_0x36f86f(0x101)],_0x2a41d3[_0x36f86f(0x52a)](_0x2b9b29))?.[_0x36f86f(0x6d7)](_0x431fe1=>_0x431fe1[_0x36f86f(0x339)])??[];}catch{return[];}});default:return[];}}function _0x5767fc(_0x53e689,_0x259a12,_0x4394a8,_0x1d3dbb){const _0x1913cb=_0x3d3152,_0x54d675=_0x53e689['endsWith']('/'),_0x7c06cd=_0x53e689[_0x1913cb(0x1e8)]('/'),_0x15d504=_0x54d675?_0x7c06cd[_0x1913cb(0x333)](0x0,-0x1):_0x7c06cd['slice'](0x0,-0x1),_0x23a59a=_0x54d675?'':_0x7c06cd[_0x7c06cd[_0x1913cb(0x330)]-0x1];let _0x5e5b87=_0x259a12;const _0x1a4aeb={};for(const _0x3c992b of _0x15d504){if(!_0x3c992b)continue;if(_0x5e5b87[_0x1913cb(0x6c0)][_0x1913cb(0x229)](_0x3c992b))_0x5e5b87=_0x5e5b87['children'][_0x1913cb(0x294)](_0x3c992b);else{if(_0x5e5b87[_0x1913cb(0x34d)])_0x1a4aeb[_0x5e5b87['dynamic'][_0x1913cb(0x3a7)]]=_0x3c992b,_0x5e5b87=_0x5e5b87[_0x1913cb(0x34d)][_0x1913cb(0x576)];else return[];}}const _0x101c4a=_0x15d504[_0x1913cb(0x64e)](Boolean),_0x5e5c4b=_0x101c4a[_0x1913cb(0x330)]?_0x101c4a['join']('/')+'/':'',_0x5ba21c=[];for(const [_0x29eac6]of _0x5e5b87['children']){if(_0x29eac6[_0x1913cb(0x1a9)](_0x23a59a))_0x5ba21c[_0x1913cb(0x5d8)](_0x5e5c4b+_0x29eac6);}if(_0x5e5b87[_0x1913cb(0x34d)])for(const _0x14256a of _0x442d50(_0x5e5b87['dynamic'][_0x1913cb(0x3a7)],_0x1a4aeb,_0x4394a8,_0x1d3dbb)){if(String(_0x14256a)[_0x1913cb(0x1a9)](_0x23a59a))_0x5ba21c[_0x1913cb(0x5d8)](_0x5e5c4b+_0x14256a);}return _0x5ba21c[_0x1913cb(0x333)](0x0,0x64);}const _0x15d689=[_0x3d3152(0x5c0),'use','env',_0x3d3152(0x384),'types','routes',_0x3d3152(0x5d7),_0x3d3152(0x375),_0x3d3152(0x256),_0x3d3152(0x4ae)];function _0x2ba2e8(_0x1c227c,_0x3d708d,_0x89c44f){return function _0x19502d(_0x3ae695){const _0x5b599b=_0x2ba0;try{const _0x348c33=_0x3ae695[_0x5b599b(0x7a0)](/\s[{[]/),_0x3d1154=_0x348c33>=0x0?_0x3ae695[_0x5b599b(0x333)](0x0,_0x348c33):_0x3ae695,_0x36713b=_0x3d1154[_0x5b599b(0x58e)]();if(!_0x36713b){const _0x3c8bb4=[..._0x15d689,...[..._0x1c227c[_0x5b599b(0x6c0)]['keys']()]][_0x5b599b(0x333)](0x0,0x64);return[_0x3c8bb4,''];}const _0x38bfd9=_0x36713b[_0x5b599b(0x1e8)](/\s+/),_0x413dda=_0x38bfd9[0x0],_0x377a1d=_0x413dda[_0x5b599b(0x52d)]();if(_0x38bfd9[_0x5b599b(0x330)]===0x1){const _0x1eb828=_0x413dda[_0x5b599b(0x3af)](),_0x232ae7=_0x15d689[_0x5b599b(0x64e)](_0x2b68e0=>_0x2b68e0['startsWith'](_0x1eb828)),_0x4710e3=_0x5767fc(_0x413dda,_0x1c227c,_0x3d708d,_0x89c44f),_0x1fbffc=[...new Set([..._0x232ae7,..._0x4710e3])][_0x5b599b(0x333)](0x0,0x64);return[_0x1fbffc,_0x413dda];}if(_0x52bf0a[_0x5b599b(0x229)](_0x377a1d)&&_0x38bfd9[_0x5b599b(0x330)]===0x2){const _0x3d7192=_0x38bfd9[0x1],_0x47a094=_0x5767fc(_0x3d7192,_0x1c227c,_0x3d708d,_0x89c44f);return[_0x47a094[_0x5b599b(0x6d7)](_0x3a1987=>_0x413dda+'\x20'+_0x3a1987),_0x413dda+'\x20'+_0x3d7192];}if(!_0x52bf0a['has'](_0x377a1d)&&_0x38bfd9[_0x5b599b(0x330)]>0x1){const _0x5f4892=_0x5767fc(_0x413dda,_0x1c227c,_0x3d708d,_0x89c44f),_0x4d9dcc='\x20'+_0x38bfd9[_0x5b599b(0x333)](0x1)[_0x5b599b(0x3de)]('\x20');return[_0x5f4892[_0x5b599b(0x6d7)](_0x4c1d9a=>_0x4c1d9a+_0x4d9dcc),_0x413dda+_0x4d9dcc];}return[[],_0x3ae695];}catch{return[[],_0x3ae695];}};}async function _0x4cf264(_0x31ab87,_0x52cc52){const _0x1ca7cf=_0x3d3152,_0x5545b9={'enabled':!![],'level':_0x52cc52[_0x1ca7cf(0x341)]??'info'},_0x544e6d={'env':_0x1ca7cf(0x5c4)},_0x5c2f2f={'current':null},_0x4ed1d8=_0x5469d2(_0x31ab87[_0x1ca7cf(0x36a)]['listRoutes']()),_0x59c0b5=_0x2ba2e8(_0x4ed1d8,_0x31ab87,_0x544e6d);_0x31ab87[_0x1ca7cf(0x515)][_0x1ca7cf(0x437)](_0x5160de=>{const _0x51fddb=_0x1ca7cf;if(!_0x5545b9[_0x51fddb(0x22b)])return;_0x1d3409(_0x5160de,_0x5545b9[_0x51fddb(0x33e)]),_0x5c2f2f[_0x51fddb(0x1ec)]?.[_0x51fddb(0x2a5)](!![]);}),_0x13a9cf(_0x31ab87,_0x52cc52);const _0x573f07=_0x494a4b[_0x1ca7cf(0x7a1)]({'input':process[_0x1ca7cf(0x3da)],'output':process[_0x1ca7cf(0x663)],'terminal':!![],'completer':_0x59c0b5,'prompt':_0x2ec81a(_0x544e6d),'historySize':_0x2eb68a});try{const _0x5b6407=_0x4f97e5[_0x1ca7cf(0x2ef)](_0x4595da,_0x1ca7cf(0x3f0))[_0x1ca7cf(0x1e8)]('\x0a')[_0x1ca7cf(0x64e)](Boolean);_0x573f07['history']=_0x5b6407[_0x1ca7cf(0x6c8)]()[_0x1ca7cf(0x333)](0x0,_0x2eb68a);}catch{}_0x5c2f2f['current']=_0x573f07,_0x573f07['on'](_0x1ca7cf(0x588),async _0x3616b3=>{const _0x597a97=_0x1ca7cf;_0x573f07[_0x597a97(0x72c)]();try{await _0x139217(_0x3616b3,_0x31ab87,_0x52cc52,_0x5545b9,_0x544e6d,_0x573f07);}catch(_0x399109){console[_0x597a97(0x5f2)](_0x44e93b(_0x4be853[_0x597a97(0xcb)],_0x597a97(0x389)+_0x399109['message']));}finally{_0x573f07['resume'](),_0x573f07[_0x597a97(0x2a5)]();}}),_0x573f07['on'](_0x1ca7cf(0x57c),()=>{const _0x46986d=_0x1ca7cf;try{const _0x323122=[..._0x573f07[_0x46986d(0x348)]]['reverse']()[_0x46986d(0x64e)](Boolean)[_0x46986d(0x333)](0x0,_0x2eb68a);_0x4f97e5[_0x46986d(0x35a)](_0x4595da,_0x323122['join']('\x0a')+'\x0a');}catch{}_0x51391f(_0x31ab87,0x0);});let _0x3739b2=0x0;return process['on'](_0x1ca7cf(0x4e5),()=>{const _0x3a1ada=_0x1ca7cf;if(_0xa20fff)return _0x51391f(_0x31ab87,0x82,_0x3a1ada(0x4e5));if(_0x573f07[_0x3a1ada(0x588)]==='')return _0x51391f(_0x31ab87,0x0,_0x3a1ada(0x4e5));const _0x11a8f1=Date['now']();if(_0x11a8f1-_0x3739b2<0x5dc)return _0x51391f(_0x31ab87,0x0,'SIGINT\x20(double-tap)');_0x3739b2=_0x11a8f1,process[_0x3a1ada(0x663)][_0x3a1ada(0x4c7)]('\x0a'),_0x573f07[_0x3a1ada(0x361)](0x0),_0x573f07[_0x3a1ada(0x2a5)](),process[_0x3a1ada(0x331)]['write'](_0x44e93b(_0x4be853[_0x3a1ada(0x431)],_0x3a1ada(0x617)));}),process['on'](_0x1ca7cf(0x12f),()=>_0x51391f(_0x31ab87,0x0,_0x1ca7cf(0x12f))),process['on']('SIGBREAK',()=>_0x51391f(_0x31ab87,0x0,_0x1ca7cf(0x6e5))),_0x573f07['prompt'](),_0x573f07;}return okdbShell={'start':_0x4cf264,'colorLog':_0x1d3409,'lenientParse':_0x17a34b,'_splitLine':_0x24e6f0,'_formatRouteHelpLines':_0x244e83,'_routeSummary':_0x42e9b2,'_routeTags':_0x1dbd2b},okdbShell;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x4ad866=_0x3f6c2b;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x43e761,performance:_0x3b98c4}=require$$0$4,_0x3a13b3=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG==='true',_0x2926ac=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x31f541=process.env.OKDB_LOOP_LAG_ALL==='1',_0x28bb61=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x5a3d53{constructor(){const _0x1e70fc=_0x2ba0;this[_0x1e70fc(0x22b)]=_0x3a13b3,this[_0x1e70fc(0x30b)]=new Map(),this['_h']=null,this[_0x1e70fc(0x5f7)]=null,this['_started']=![],this[_0x1e70fc(0x723)]=(_0x40ffde,_0x4d9e0)=>process[_0x1e70fc(0x331)]['write'](_0x40ffde+(_0x4d9e0?'\x20'+JSON[_0x1e70fc(0x1c5)](_0x4d9e0):'')+'\x0a');}['now'](){const _0x268836=_0x2ba0;return _0x3b98c4[_0x268836(0x556)]();}[_0x4ad866(0x377)](_0x1824d0){const _0x1489ee=_0x4ad866;if(typeof _0x1824d0==='function')this[_0x1489ee(0x723)]=_0x1824d0;}[_0x4ad866(0x470)](_0xd897f9,_0x3bf49e,_0x281356){const _0x489679=_0x4ad866;if(!this[_0x489679(0x22b)])return;let _0x1dddaa=this['_buckets']['get'](_0xd897f9);!_0x1dddaa&&(_0x1dddaa={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this['_buckets']['set'](_0xd897f9,_0x1dddaa)),_0x1dddaa['ms']+=_0x3bf49e,_0x1dddaa[_0x489679(0x172)]+=0x1,_0x3bf49e>_0x1dddaa[_0x489679(0x7b7)]&&(_0x1dddaa[_0x489679(0x7b7)]=_0x3bf49e,_0x1dddaa['maxExtra']=_0x281356||'');}[_0x4ad866(0x4da)](_0x445c8e){const _0x3b683a=_0x4ad866;if(!this['enabled']||this[_0x3b683a(0x2c6)])return;this[_0x3b683a(0x2c6)]=!![];if(_0x445c8e)this[_0x3b683a(0x723)]=_0x445c8e;this['_h']=_0x43e761({'resolution':0xa}),this['_h'][_0x3b683a(0x16c)](),this[_0x3b683a(0x5f7)]=setInterval(()=>this[_0x3b683a(0x731)](),_0x2926ac);if(this['_timer'][_0x3b683a(0x169)])this[_0x3b683a(0x5f7)][_0x3b683a(0x169)]();}[_0x4ad866(0x435)](_0x588943){const _0x179070=_0x4ad866;if(!this[_0x179070(0x2da)])this[_0x179070(0x2da)]=new Set();this[_0x179070(0x2da)][_0x179070(0x73d)](_0x588943);if(!this[_0x179070(0x2c6)])this[_0x179070(0x6c7)]();}[_0x4ad866(0x40d)](_0x213328){const _0x26503a=_0x4ad866;this[_0x26503a(0x2da)]?.['delete'](_0x213328);}[_0x4ad866(0x6c7)](){const _0x919e5a=_0x4ad866;if(this[_0x919e5a(0x45c)])return;this[_0x919e5a(0x45c)]=!![];!this['_h']&&(this['_h']=_0x43e761({'resolution':0xa}),this['_h'][_0x919e5a(0x16c)]());const _0x5d3d21=_0x2926ac;this['_admissionTimer']=setInterval(()=>{const _0x13a176=_0x919e5a,_0x38a3a5=this['_h'];if(!_0x38a3a5)return;const _0x5428e0=_0x38a3a5[_0x13a176(0x4d6)](0x63)/0xf4240,_0x2d7e0e=_0x38a3a5[_0x13a176(0x42f)]/0xf4240,_0x265bdd=_0x38a3a5[_0x13a176(0x69b)]/0xf4240;_0x38a3a5[_0x13a176(0x3d7)]();if(this[_0x13a176(0x2da)])for(const _0x296b1c of this[_0x13a176(0x2da)]){try{_0x296b1c({'p99Ms':_0x5428e0,'maxMs':_0x2d7e0e,'meanMs':_0x265bdd,'reportMs':_0x5d3d21});}catch{}}},_0x5d3d21);if(this[_0x919e5a(0x6da)][_0x919e5a(0x169)])this[_0x919e5a(0x6da)][_0x919e5a(0x169)]();}[_0x4ad866(0x731)](){const _0x22520d=_0x4ad866,_0x434752=this['_h'],_0x47a852=_0x434752[_0x22520d(0x42f)]/0xf4240,_0x115d6d=_0x434752[_0x22520d(0x4d6)](0x63)/0xf4240,_0x1cf261=_0x434752['mean']/0xf4240;_0x434752['reset']();const _0x2ba008=[...this[_0x22520d(0x30b)][_0x22520d(0x45d)]()][_0x22520d(0x6d7)](([_0x16196c,_0x474c51])=>({'label':_0x16196c,..._0x474c51}))[_0x22520d(0x5e7)]((_0x4a0b2c,_0x58c8a1)=>_0x58c8a1['ms']-_0x4a0b2c['ms'])[_0x22520d(0x333)](0x0,0x8);this[_0x22520d(0x30b)]['clear']();const _0x1bf90b=_0x2ba008[_0x22520d(0x28f)]((_0x2e0658,_0x3af392)=>_0x2e0658+_0x3af392['ms'],0x0),_0xf2dcc5=_0x2ba008[_0x22520d(0x6d7)](_0x2e5dd5=>_0x2e5dd5['label']+'='+_0x2e5dd5['ms'][_0x22520d(0xc6)](0x0)+'ms/'+_0x2e5dd5[_0x22520d(0x172)]+(_0x2e5dd5['maxMs']>0x5?'(worst\x20'+_0x2e5dd5[_0x22520d(0x7b7)][_0x22520d(0xc6)](0x0)+'ms'+(_0x2e5dd5[_0x22520d(0x124)]?'\x20'+_0x2e5dd5[_0x22520d(0x124)]:'')+')':''));(_0x31f541||_0x47a852>=_0x28bb61)&&this[_0x22520d(0x723)](_0x22520d(0x2b3)+_0x2926ac+_0x22520d(0x5a1)+_0x47a852['toFixed'](0x0)+_0x22520d(0x1de)+_0x115d6d[_0x22520d(0xc6)](0x0)+'ms\x20mean='+_0x1cf261['toFixed'](0x0)+_0x22520d(0x7c8)+_0x1bf90b['toFixed'](0x0)+'ms'+(_0xf2dcc5['length']?_0x22520d(0x338)+_0xf2dcc5[_0x22520d(0x3de)]('\x20\x20'):''),{'feature':_0x22520d(0x537)});if(this[_0x22520d(0x2da)])for(const _0x222af3 of this[_0x22520d(0x2da)]){try{_0x222af3({'p99Ms':_0x115d6d,'maxMs':_0x47a852,'meanMs':_0x1cf261,'reportMs':_0x2926ac});}catch{}}}[_0x4ad866(0x57e)](){const _0xe69b19=_0x4ad866;if(this[_0xe69b19(0x5f7)])clearInterval(this['_timer']);if(this['_h'])this['_h']['disable']();this['_timer']=null,this['_h']=null,this[_0xe69b19(0x2c6)]=![];}}const _0x21658d=new _0x5a3d53();if(_0x21658d[_0x4ad866(0x22b)])_0x21658d[_0x4ad866(0x4da)]();return okdbLoopMonitor={'LOOP':_0x21658d},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x51ecb5=require$$0$1,_0x274266=require$$1;let _0x4f56dd,_0x4ca43b,_0x5008cd,_0x15087d,_0x4d0769,_0x7691d2,_0x1773fa,_0x103973=![];const _0x4ba26e=new Set();let _0x5b079d=null;const _0x9db378=new Map();function _0x2c818e(){if(_0x4f56dd!==undefined)return _0x4f56dd;_0x4f56dd=process.env.OKDB_DIAG==='1';if(!_0x4f56dd)return![];_0x4ca43b=process.env.OKDB_DIAG_STACK==='1',_0x15087d=Math['max'](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x5008cd=new Array(_0x15087d),_0x4d0769=0x0,_0x7691d2=0x0,_0x1773fa=process.env.OKDB_DIAG_DIR||null;if(_0x1773fa)try{_0x51ecb5['mkdirSync'](_0x1773fa,{'recursive':!![]});}catch{}return!![];}function _0x2b91a6(){return _0x4f56dd===undefined?_0x2c818e():_0x4f56dd;}function _0x37965d(_0x5e127b,_0x46d3fb){const _0x233657=_0x2ba0;if(_0x4f56dd===undefined?!_0x2c818e():!_0x4f56dd)return;let _0x383d21;if(_0x4ca43b){const _0x2b897b=new Error()[_0x233657(0x28e)]||'';_0x383d21=_0x2b897b[_0x233657(0x1e8)]('\x0a')[_0x233657(0x333)](0x3)['map'](_0x1194a8=>_0x1194a8[_0x233657(0x7ad)]())[_0x233657(0x64e)](Boolean)[_0x233657(0x333)](0x0,0x8);}_0x5008cd[_0x4d0769]={'seq':_0x7691d2++,'t':Date['now'](),'env':_0x5e127b,'kind':_0x46d3fb||_0x233657(0x249),'stack':_0x383d21},_0x4d0769=(_0x4d0769+0x1)%_0x15087d;}function _0x323c18(_0x46a8d9){const _0x16f8b2=_0x2ba0,_0xabfe23=[];for(let _0x147273=0x0;_0x147273<_0x15087d;_0x147273++){const _0x529ada=_0x5008cd[(_0x4d0769-0x1-_0x147273+_0x15087d*0x2)%_0x15087d];if(!_0x529ada)continue;_0xabfe23[_0x16f8b2(0x5d8)](_0x529ada);if(_0xabfe23[_0x16f8b2(0x330)]>=_0x46a8d9)break;}return _0xabfe23;}function _0x56fd03(_0x1f4a8b){const _0x13a509=_0x2ba0;try{process[_0x13a509(0x331)]['write'](_0x1f4a8b+'\x0a');}catch{}if(_0x1773fa)try{_0x51ecb5['appendFileSync'](_0x274266['join'](_0x1773fa,_0x13a509(0x644)+process[_0x13a509(0x7af)]+_0x13a509(0x604)),_0x1f4a8b+'\x0a');}catch{}}function _0x4a508e(_0x14203b){const _0xb0f210=_0x2ba0,_0x54843d=_0x323c18(_0x14203b);if(!_0x54843d[_0xb0f210(0x330)])return'\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)';const _0x38d2c5=Date[_0xb0f210(0x556)]();return _0x54843d['map'](_0x9a8700=>{const _0x4f8ee6=_0xb0f210,_0x16ecc5=_0x4f8ee6(0x78e)+_0x9a8700['seq']+'\x20-'+(_0x38d2c5-_0x9a8700['t'])+_0x4f8ee6(0x12c)+_0x9a8700['env']+'\x20'+_0x9a8700[_0x4f8ee6(0x26d)];return _0x9a8700[_0x4f8ee6(0x28e)]&&_0x9a8700[_0x4f8ee6(0x28e)][_0x4f8ee6(0x330)]?_0x16ecc5+'\x0a\x20\x20\x20\x20\x20\x20'+_0x9a8700[_0x4f8ee6(0x28e)][_0x4f8ee6(0x3de)](_0x4f8ee6(0x762)):_0x16ecc5;})[_0xb0f210(0x3de)]('\x0a');}function _0x57d263(_0x3ea8d5,_0x28492b){const _0x4a6e79=_0x2ba0,_0x53bcde=_0x4a6e79(0x6fa)+_0x3ea8d5+'\x20@\x20'+new Date()['toISOString']()+_0x4a6e79(0x31e)+process['pid']+'\x20===',_0x141af9=[_0x53bcde,_0x4a6e79(0x55b)+(_0x28492b&&_0x28492b[_0x4a6e79(0x28e)]?_0x28492b[_0x4a6e79(0x28e)]['split']('\x0a')[0x0]:_0x28492b),'recent\x20writes\x20(newest\x20first)'+(_0x4ca43b?'':_0x4a6e79(0x32c))+':',_0x4a508e(0x18),_0x35a856(),'='[_0x4a6e79(0x596)](_0x53bcde[_0x4a6e79(0x330)]-0x1)];_0x56fd03(_0x141af9[_0x4a6e79(0x3de)]('\x0a'));}function _0x3e1700(_0x3ab50b){const _0x52be34=_0x2ba0;if(!_0x2b91a6())return;const _0x4ba9b9=String(_0x3ab50b&&_0x3ab50b[_0x52be34(0x7b6)]||_0x3ab50b||''),_0x4e5ca2=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x52be34(0x3a9)](_0x4ba9b9);_0x57d263(_0x4e5ca2?_0x52be34(0x4f9):_0x52be34(0x524),_0x3ab50b);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x4e5ca2)return;try{console[_0x52be34(0x5f2)](_0x3ab50b&&_0x3ab50b[_0x52be34(0x28e)]?_0x3ab50b[_0x52be34(0x28e)]:_0x3ab50b);}catch{}process[_0x52be34(0x256)](0x1);}function _0x91ac3a(_0x276795){const _0x3f443c=_0x2ba0;if(!_0x2b91a6())return;const _0x16ae1f=String(_0x276795&&_0x276795['message']||_0x276795||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x3f443c(0x3a9)](_0x16ae1f)&&_0x57d263('ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)',_0x276795);}function _0x35a856(){const _0x4469fe=_0x2ba0,_0x9276d=[_0x4469fe(0x4c9)];let _0x45f11c=![];for(const _0x2f1d66 of _0x4ba26e){const _0x39cd64=_0x2f1d66&&_0x2f1d66['_envs'];if(!_0x39cd64)continue;for(const [_0x28cd5f,_0x428497]of _0x39cd64){const _0x376ba0=_0x428497&&_0x428497['_coordinator']&&_0x428497['_coordinator'][_0x4469fe(0x6d0)];if(!_0x376ba0)continue;let _0x5d4939,_0x1e785d;try{_0x5d4939=Atomics[_0x4469fe(0x22e)](_0x376ba0,0x0),_0x1e785d=Atomics[_0x4469fe(0x22e)](_0x376ba0,0x1);}catch{continue;}if(_0x5d4939===0x0)continue;_0x45f11c=!![];const _0x705d3e=_0x5d4939>0x0?_0x4469fe(0xe2):_0x4469fe(0x42e),_0x397368=Date[_0x4469fe(0x556)]()-Math[_0x4469fe(0x789)](_0x5d4939)*0x3e8,_0x10aff6=((()=>{const _0xac31a1=_0x4469fe;try{return _0x428497[_0xac31a1(0x37f)]&&_0x428497[_0xac31a1(0x37f)]['status']?_0x428497[_0xac31a1(0x37f)][_0xac31a1(0x41e)]():null;}catch{return null;}})());_0x9276d[_0x4469fe(0x5d8)](_0x4469fe(0x6f0)+_0x28cd5f+'\x20phase='+_0x705d3e+_0x4469fe(0x17b)+_0x397368+'ms\x20activeWriters='+_0x1e785d+(_0x10aff6?'\x20writer{depth='+_0x10aff6[_0x4469fe(0x58d)]+_0x4469fe(0x3d8)+_0x10aff6['oldestPendingMs']+'\x20parkedNow='+_0x10aff6['parkedNow']+'}':''));}}if(!_0x45f11c)_0x9276d['push'](_0x4469fe(0x7c5));return _0x9276d['join']('\x0a');}function _0x66625(){const _0x1c9eb6=_0x2ba0;if(!_0x2b91a6())return;const _0x3cbf50=Math[_0x1c9eb6(0x42f)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x1e02ad=Date[_0x1c9eb6(0x556)]();for(const _0x4fd486 of _0x4ba26e){const _0x2f0b9d=_0x4fd486&&_0x4fd486[_0x1c9eb6(0x561)];if(!_0x2f0b9d)continue;for(const [_0x1e06d1,_0x4cc5ed]of _0x2f0b9d){const _0x2f0a51=_0x4cc5ed&&_0x4cc5ed[_0x1c9eb6(0x484)]&&_0x4cc5ed[_0x1c9eb6(0x484)][_0x1c9eb6(0x6d0)];if(!_0x2f0a51)continue;let _0x47f255;try{_0x47f255=Atomics[_0x1c9eb6(0x22e)](_0x2f0a51,0x0);}catch{continue;}const _0x2ff0c1=_0x4fd486[_0x1c9eb6(0x58f)]+'|'+_0x1e06d1;if(_0x47f255<=0x0){_0x9db378[_0x1c9eb6(0x539)](_0x2ff0c1);continue;}const _0x5ed906=_0x1e02ad-_0x47f255*0x3e8,_0x4177cc=_0x9db378[_0x1c9eb6(0x294)](_0x2ff0c1);if(_0x5ed906<_0x3cbf50)continue;if(_0x4177cc&&_0x1e02ad-_0x4177cc[_0x1c9eb6(0x418)]<_0x3cbf50)continue;_0x9db378[_0x1c9eb6(0x3c0)](_0x2ff0c1,{'firstTs':_0x4177cc?_0x4177cc[_0x1c9eb6(0x628)]:_0x47f255,'dumpedAt':_0x1e02ad});const _0x368c63=_0x1c9eb6(0x364)+_0x5ed906+_0x1c9eb6(0x282)+_0x1e06d1+_0x1c9eb6(0x14e)+new Date()['toISOString']()+_0x1c9eb6(0x31e)+process['pid']+_0x1c9eb6(0x1c3);_0x56fd03([_0x368c63,_0x35a856(),'='[_0x1c9eb6(0x596)](_0x368c63[_0x1c9eb6(0x330)]-0x1)][_0x1c9eb6(0x3de)]('\x0a'));}}}function _0x47f51a(){const _0x4730af=_0x2ba0;if(!_0x2b91a6()||_0x103973)return;_0x103973=!![],process[_0x4730af(0x74a)]('uncaughtException',_0x3e1700),process[_0x4730af(0x74a)](_0x4730af(0x2dc),_0x91ac3a);const _0x3d94c6=Math['max'](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x5b079d=setInterval(_0x66625,_0x3d94c6);if(_0x5b079d['unref'])_0x5b079d[_0x4730af(0x169)]();}function _0x2f49a7(_0xd71136){const _0x5a5f8b=_0x2ba0;if(!_0x2b91a6()||!_0xd71136)return;_0x4ba26e[_0x5a5f8b(0x73d)](_0xd71136),_0x47f51a();}function _0x547cca(_0x1332b7){const _0x53ebbf=_0x2ba0;_0x4ba26e[_0x53ebbf(0x539)](_0x1332b7);}function _0x40acaf(){const _0xbabf54=_0x2ba0;if(!_0x2b91a6())return{'enabled':![],'hint':_0xbabf54(0x665)};return{'enabled':!![],'stackCapture':!!_0x4ca43b,'recentWrites':_0x323c18(0x10),'drain':_0x35a856()};}return okdbDiag={'isEnabled':_0x2b91a6,'recordWrite':_0x37965d,'installDiag':_0x47f51a,'registerOkdb':_0x2f49a7,'unregisterOkdb':_0x547cca,'snapshot':_0x40acaf},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x17fab2=_0x3f6c2b;if(hasRequiredOkdbWriter)return okdbWriter[_0x17fab2(0x6a4)];hasRequiredOkdbWriter=0x1;const {performance:_0x4885fa}=require$$0$5,_0x43b49f=requireOkdbDiag(),_0x3d6113=process.env.OKDB_COMMIT_MODE===_0x17fab2(0x481);class _0x1bc90c{constructor(_0x303bcb){const _0x3322fd=_0x17fab2;this[_0x3322fd(0x52a)]=_0x303bcb,this['_inflight']=new Set(),this[_0x3322fd(0x591)]=new Map(),this[_0x3322fd(0x6a3)]=0x0,this[_0x3322fd(0x54c)]=[],this[_0x3322fd(0x552)]=[],this['_highWater']=Math['max'](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x3322fd(0x438)]=0x0,this[_0x3322fd(0x350)]=[],this['_bpParkedTotal']=0x0,this[_0x3322fd(0x267)]=null,this[_0x3322fd(0x7cd)]=0x0,this[_0x3322fd(0x568)]=0x0,this[_0x3322fd(0x6b4)]=![];}async['transaction'](_0x33109e,_0x368be9,{admitted:admitted=![]}={}){const _0x57dfc3=_0x17fab2;if(_0x43b49f[_0x57dfc3(0x401)]())_0x43b49f[_0x57dfc3(0x408)](this[_0x57dfc3(0x52a)]?.[_0x57dfc3(0x339)],_0x368be9);if(this[_0x57dfc3(0x378)]){const _0x2fe7a7=new Error(_0x57dfc3(0xe9));_0x2fe7a7[_0x57dfc3(0x4bc)]=_0x57dfc3(0x395);throw _0x2fe7a7;}if(this[_0x57dfc3(0x5e6)]>0x0){let _0x41bcf0=![];while(this[_0x57dfc3(0x438)]>=this[_0x57dfc3(0x5e6)]&&!this[_0x57dfc3(0x378)]){!_0x41bcf0&&(_0x41bcf0=!![],this[_0x57dfc3(0x415)]++),await new Promise(_0x483a13=>this['_bpWaiters'][_0x57dfc3(0x5d8)](_0x483a13));}if(this[_0x57dfc3(0x378)]){const _0x8994b=new Error(_0x57dfc3(0xe9));_0x8994b[_0x57dfc3(0x4bc)]=_0x57dfc3(0x395);throw _0x8994b;}}this[_0x57dfc3(0x438)]++;const _0x47ea46=admitted?null:this[_0x57dfc3(0x52a)][_0x57dfc3(0x484)];for(;;){while(this[_0x57dfc3(0x267)])await this[_0x57dfc3(0x267)];if(_0x47ea46)try{await _0x47ea46[_0x57dfc3(0x4d7)]();}catch(_0x2b7b0f){this[_0x57dfc3(0x438)]--;if(this['_bpWaiters'][_0x57dfc3(0x330)]&&this[_0x57dfc3(0x438)]<this[_0x57dfc3(0x5e6)])this[_0x57dfc3(0x350)][_0x57dfc3(0x14f)]()();throw _0x2b7b0f;}if(!this[_0x57dfc3(0x267)])break;if(_0x47ea46)_0x47ea46[_0x57dfc3(0x5ac)]();}if(this[_0x57dfc3(0x378)]){if(_0x47ea46)_0x47ea46['afterWrite']();this[_0x57dfc3(0x438)]--;if(this[_0x57dfc3(0x350)]['length']&&this['_outstanding']<this[_0x57dfc3(0x5e6)])this[_0x57dfc3(0x350)][_0x57dfc3(0x14f)]()();const _0x265f91=new Error(_0x57dfc3(0xe9));_0x265f91['code']='ENV_CLOSING_RETRY';throw _0x265f91;}const _0x47ca0c=_0x4885fa[_0x57dfc3(0x556)]();if(_0x3d6113)try{const _0x540b74=this[_0x57dfc3(0x52a)]['db']['transactionSync'](_0x33109e);this[_0x57dfc3(0x6a3)]++;if(this[_0x57dfc3(0x54c)]['push'](_0x4885fa[_0x57dfc3(0x556)]()-_0x47ca0c)>0x100)this['_durs'][_0x57dfc3(0x14f)]();if(this[_0x57dfc3(0x552)][_0x57dfc3(0x5d8)](_0x4885fa[_0x57dfc3(0x556)]())>0x800)this[_0x57dfc3(0x552)]['shift']();return _0x540b74;}finally{this['_outstanding']--;if(this[_0x57dfc3(0x350)][_0x57dfc3(0x330)]&&this[_0x57dfc3(0x438)]<this[_0x57dfc3(0x5e6)])this[_0x57dfc3(0x350)][_0x57dfc3(0x14f)]()();if(_0x47ea46)_0x47ea46[_0x57dfc3(0x5ac)]();}let _0x56100b=null;const _0x149498=()=>{const _0x41337a=_0x57dfc3,_0x425c6d=_0x33109e();if(_0x425c6d&&typeof _0x425c6d['then']==='function'&&!_0x56100b){this[_0x41337a(0x7cd)]++;let _0x5a6955;const _0x3bf958=new Promise(_0x22e138=>_0x5a6955=_0x22e138);this[_0x41337a(0x267)]=_0x3bf958,_0x56100b=()=>{const _0x2666dd=_0x41337a;if(this[_0x2666dd(0x267)]===_0x3bf958)this[_0x2666dd(0x267)]=null;_0x5a6955();};}return _0x425c6d;};let _0xb58400;try{_0xb58400=this[_0x57dfc3(0x52a)]['db'][_0x57dfc3(0x25e)](_0x149498);}catch(_0xa16840){_0xb58400=Promise[_0x57dfc3(0x3e2)](_0xa16840);}(!_0xb58400||typeof _0xb58400[_0x57dfc3(0x1dd)]!==_0x57dfc3(0x6c9))&&(this[_0x57dfc3(0x568)]++,!this[_0x57dfc3(0x6b4)]&&(this[_0x57dfc3(0x6b4)]=!![],console['warn'](_0x57dfc3(0x3bd)+(this[_0x57dfc3(0x52a)]?.[_0x57dfc3(0x339)]??'?')+']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller')),_0xb58400=Promise[_0x57dfc3(0x2f4)](_0xb58400));const _0x4ec49b=()=>{if(_0x56100b)_0x56100b();};_0xb58400[_0x57dfc3(0x1dd)](_0x4ec49b,_0x4ec49b),this['_inflight']['add'](_0xb58400),this[_0x57dfc3(0x591)][_0x57dfc3(0x3c0)](_0xb58400,_0x47ca0c);const _0x312897=()=>{const _0x530ae3=_0x57dfc3;this[_0x530ae3(0x3b1)][_0x530ae3(0x539)](_0xb58400),this['_enqueuedAt'][_0x530ae3(0x539)](_0xb58400),this[_0x530ae3(0x6a3)]++,this[_0x530ae3(0x438)]--;this[_0x530ae3(0x350)][_0x530ae3(0x330)]&&this[_0x530ae3(0x438)]<this[_0x530ae3(0x5e6)]&&this[_0x530ae3(0x350)][_0x530ae3(0x14f)]()();if(this[_0x530ae3(0x54c)][_0x530ae3(0x5d8)](_0x4885fa[_0x530ae3(0x556)]()-_0x47ca0c)>0x100)this['_durs'][_0x530ae3(0x14f)]();if(this[_0x530ae3(0x552)][_0x530ae3(0x5d8)](_0x4885fa[_0x530ae3(0x556)]())>0x800)this[_0x530ae3(0x552)][_0x530ae3(0x14f)]();};_0xb58400[_0x57dfc3(0x1dd)](_0x312897,_0x312897);try{return await _0xb58400;}finally{if(_0x47ea46)_0x47ea46[_0x57dfc3(0x5ac)]();}}[_0x17fab2(0x41e)](){const _0x2dacf3=_0x17fab2,_0xbb4783=_0x4885fa[_0x2dacf3(0x556)]();let _0x3df4cf=0x0;for(const _0x34b2d8 of this['_enqueuedAt'][_0x2dacf3(0x289)]()){const _0x2d0af5=_0xbb4783-_0x34b2d8;if(_0x2d0af5>_0x3df4cf)_0x3df4cf=_0x2d0af5;}let _0x102a7c=0x0;for(let _0x547c89=this[_0x2dacf3(0x552)][_0x2dacf3(0x330)]-0x1;_0x547c89>=0x0;_0x547c89--){if(_0xbb4783-this['_done'][_0x547c89]>0x3e8)break;_0x102a7c++;}let _0xf13a9e=0x0;if(this[_0x2dacf3(0x54c)][_0x2dacf3(0x330)]){const _0x95b942=[...this[_0x2dacf3(0x54c)]][_0x2dacf3(0x5e7)]((_0x3641b3,_0x4c8e01)=>_0x3641b3-_0x4c8e01);_0xf13a9e=_0x95b942[Math[_0x2dacf3(0x2a6)](_0x95b942[_0x2dacf3(0x330)]-0x1,Math[_0x2dacf3(0x6ef)](_0x95b942[_0x2dacf3(0x330)]*0.99))];}return{'depth':this[_0x2dacf3(0x3b1)][_0x2dacf3(0x6ca)],'oldestPendingMs':Math[_0x2dacf3(0x2d5)](_0x3df4cf),'committed':this['_committed'],'commitsPerSec':_0x102a7c,'commitP99Ms':Math[_0x2dacf3(0x2d5)](_0xf13a9e),'parkedNow':this['_bpWaiters'][_0x2dacf3(0x330)],'parkedTotal':this['_bpParkedTotal'],'highWater':this['_highWater']};}[_0x17fab2(0x4ba)](){const _0x51fd6f=_0x17fab2,_0x5832a7=_0x4885fa[_0x51fd6f(0x556)]();return[...this['_enqueuedAt']['values']()][_0x51fd6f(0x6d7)](_0x4a6df5=>Math['round'](_0x5832a7-_0x4a6df5))['sort']((_0x14dc57,_0xc31309)=>_0xc31309-_0x14dc57);}[_0x17fab2(0x2b8)](){const _0x18ad08=_0x17fab2;this[_0x18ad08(0x378)]=!![];for(const _0x44a53b of this[_0x18ad08(0x350)][_0x18ad08(0x427)](0x0))_0x44a53b();}async[_0x17fab2(0x21b)](){const _0xfa46c9=_0x17fab2;let _0x2b9f2a=0x0;while(this[_0xfa46c9(0x3b1)]['size']&&_0x2b9f2a++<0x3e8){await Promise[_0xfa46c9(0x693)]([...this[_0xfa46c9(0x3b1)]]);}}async[_0x17fab2(0x359)](_0x1624f6,_0x2a97c7,_0x552ee7,_0x2437a5){const _0x1a9faa=_0x17fab2;return this[_0x1a9faa(0x605)](()=>{const _0x3f1f1a=_0x1a9faa;if(_0x2437a5===undefined)_0x1624f6[_0x3f1f1a(0xc1)](_0x2a97c7,_0x552ee7);else _0x1624f6['putSync'](_0x2a97c7,_0x552ee7,_0x2437a5);},_0x1a9faa(0x6fd));}async[_0x17fab2(0x5e2)](_0x208e00,_0x331b11){const _0x1682ce=_0x17fab2;return this[_0x1682ce(0x605)](()=>_0x208e00[_0x1682ce(0x655)](_0x331b11),_0x1682ce(0x1fb));}}async function _0x266a8c(_0x3c5d94,_0x41513e){const _0x20c54c=_0x17fab2;if(_0x41513e==null)_0x41513e=Math['max'](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x1c6276=_0x3c5d94?.[_0x20c54c(0x18c)];if(!_0x1c6276||typeof _0x1c6276[_0x20c54c(0x1dd)]!==_0x20c54c(0x6c9))return;await Promise[_0x20c54c(0x77d)]([Promise[_0x20c54c(0x2f4)](_0x1c6276)[_0x20c54c(0x290)](()=>{}),new Promise(_0x223628=>{const _0x5d656b=_0x20c54c,_0x17da52=setTimeout(_0x223628,_0x41513e);if(_0x17da52[_0x5d656b(0x169)])_0x17da52[_0x5d656b(0x169)]();})]);}catch{}}function _0x992865(_0x4b4321){const _0x378f26=_0x17fab2;if(_0x3d6113)return Promise[_0x378f26(0x2f4)]();const _0xbaa5b6=_0x4b4321?.[_0x378f26(0x283)];return _0xbaa5b6&&typeof _0xbaa5b6[_0x378f26(0x1dd)]===_0x378f26(0x6c9)?_0xbaa5b6:Promise[_0x378f26(0x2f4)]();}const _0xaccdda=Math['max'](0x1,Math[_0x17fab2(0x6ef)](Number(process.env.UV_THREADPOOL_SIZE))||0x4),_0x4e391a=Math['max'](0x1,_0xaccdda-0x2);let _0x147e59=0x0;const _0x53e823=[];async function _0x3b37eb(_0x1decee){const _0x28a356=_0x17fab2;if(_0x147e59<_0x4e391a)_0x147e59++;else await new Promise(_0x161093=>_0x53e823['push'](_0x161093));try{return await _0x1decee();}finally{const _0x45b99c=_0x53e823[_0x28a356(0x14f)]();if(_0x45b99c)_0x45b99c();else _0x147e59--;}}return okdbWriter[_0x17fab2(0x6a4)]=_0x1bc90c,okdbWriter[_0x17fab2(0x6a4)]['withPoolHold']=_0x3b37eb,okdbWriter[_0x17fab2(0x6a4)][_0x17fab2(0x50f)]=_0x4e391a,okdbWriter[_0x17fab2(0x6a4)][_0x17fab2(0x386)]=_0x266a8c,okdbWriter['exports'][_0x17fab2(0x283)]=_0x992865,okdbWriter['exports'][_0x17fab2(0x14c)]=_0x3d6113,okdbWriter[_0x17fab2(0x6a4)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x55981f=_0x3f6c2b;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x1a9dba=require$$0,{SYNC_COMMITS:_0x57a2ec}=requireOkdbWriter(),_0x3c3da0=_0x55981f(0x392);class _0x591314{constructor(_0x4601f0,_0x3b173f,_0x474c5c){const _0x27ad76=_0x55981f;this[_0x27ad76(0x224)]=_0x4601f0,this['_key']=_0x3b173f,this[_0x27ad76(0x5d0)]=_0x474c5c,this[_0x27ad76(0x219)]=![],this[_0x27ad76(0x402)]=null,this['_heartbeatInFlight']=null;}[_0x55981f(0x4c2)](){const _0x449c2f=_0x55981f;if(this['_released'])return![];try{const _0xa21fad=this[_0x449c2f(0x224)][_0x449c2f(0xdf)]()['get'](this['_key']);if(!_0xa21fad||_0xa21fad[_0x449c2f(0x686)]!==this['_acquiredAt'])return![];const _0x9a4fe=_0xa21fad['updatedAt']??_0xa21fad[_0x449c2f(0x686)];if(_0x9a4fe+_0xa21fad[_0x449c2f(0x2cf)]<Date[_0x449c2f(0x556)]())return![];return!![];}catch{return!this[_0x449c2f(0x219)];}}[_0x55981f(0x499)](){const _0x461ae7=_0x55981f;if(this[_0x461ae7(0x219)])return null;try{return this['_lock']['_db']()['get'](this['_key'])??null;}catch{return null;}}async[_0x55981f(0x298)](_0x50210f){const _0x2574e1=_0x55981f;if(this['_released'])return;try{if(this[_0x2574e1(0x224)]['_closed']())return;const _0x35cc68=this[_0x2574e1(0x224)][_0x2574e1(0xdf)]()['get'](this[_0x2574e1(0x374)]);if(!_0x35cc68||_0x35cc68[_0x2574e1(0x686)]!==this[_0x2574e1(0x5d0)])return;if(_0x57a2ec)this[_0x2574e1(0x224)][_0x2574e1(0xdf)]()[_0x2574e1(0xc1)](this[_0x2574e1(0x374)],{..._0x35cc68,'ttlMs':_0x35cc68[_0x2574e1(0x2cf)]+_0x50210f});else await this[_0x2574e1(0x224)]['_db']()[_0x2574e1(0x359)](this[_0x2574e1(0x374)],{..._0x35cc68,'ttlMs':_0x35cc68[_0x2574e1(0x2cf)]+_0x50210f});}catch{}}async[_0x55981f(0x4d4)](){const _0x27551e=_0x55981f;if(this[_0x27551e(0x219)])return;if(this[_0x27551e(0x583)])try{await this[_0x27551e(0x583)];}catch{}clearInterval(this[_0x27551e(0x402)]),this[_0x27551e(0x402)]=null,this['_released']=!![];try{if(this[_0x27551e(0x224)][_0x27551e(0x378)]())return;const _0x581199=this[_0x27551e(0x224)][_0x27551e(0xdf)]()[_0x27551e(0x294)](this[_0x27551e(0x374)]);if(_0x581199&&_0x581199['acquiredAt']===this['_acquiredAt']){if(_0x57a2ec)this[_0x27551e(0x224)][_0x27551e(0xdf)]()[_0x27551e(0x655)](this[_0x27551e(0x374)]);else await this[_0x27551e(0x224)][_0x27551e(0xdf)]()[_0x27551e(0x5e2)](this[_0x27551e(0x374)]);}}catch{}}[_0x55981f(0x52b)](_0x2478d0,_0x52bb6b){const _0x26f3ef=_0x55981f,_0xc86d9e=_0x52bb6b??Math[_0x26f3ef(0x6ef)](_0x2478d0/0x3);this[_0x26f3ef(0x402)]=setInterval(()=>{const _0x378da9=_0x26f3ef;if(this[_0x378da9(0x219)])return;this[_0x378da9(0x583)]=((async()=>{const _0x246fcc=_0x378da9;try{if(this[_0x246fcc(0x224)]['_closed']())return;const _0x55448e=this[_0x246fcc(0x224)][_0x246fcc(0xdf)]()[_0x246fcc(0x294)](this['_key']);if(!_0x55448e||_0x55448e[_0x246fcc(0x686)]!==this[_0x246fcc(0x5d0)]){this['_released']=!![],clearInterval(this[_0x246fcc(0x402)]),this[_0x246fcc(0x402)]=null;return;}if(_0x57a2ec)this[_0x246fcc(0x224)][_0x246fcc(0xdf)]()[_0x246fcc(0xc1)](this[_0x246fcc(0x374)],{..._0x55448e,'updatedAt':Date[_0x246fcc(0x556)]()});else await this[_0x246fcc(0x224)]['_db']()[_0x246fcc(0x359)](this[_0x246fcc(0x374)],{..._0x55448e,'updatedAt':Date[_0x246fcc(0x556)]()});}catch{}this[_0x246fcc(0x583)]=null;})());},_0xc86d9e);if(this[_0x26f3ef(0x402)][_0x26f3ef(0x169)])this[_0x26f3ef(0x402)]['unref']();}}class _0x33fe89{constructor(_0x312ddd,{namespace:_0x3b17f8,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x1bfb6a=_0x55981f;this[_0x1bfb6a(0x42d)]=_0x312ddd,this[_0x1bfb6a(0x358)]=_0x3b17f8,this[_0x1bfb6a(0x2cf)]=ttlMs,this[_0x1bfb6a(0x425)]=heartbeatMs,this[_0x1bfb6a(0x6b3)]=null;}['_db'](){const _0x30221c=_0x55981f;return this[_0x30221c(0x64b)](),(!this[_0x30221c(0x6b3)]||this[_0x30221c(0x7c4)]!==this[_0x30221c(0x42d)])&&(this['_lockDb']=this[_0x30221c(0x42d)][_0x30221c(0x228)](_0x3c3da0,{'dupSort':![]}),this[_0x30221c(0x7c4)]=this[_0x30221c(0x42d)]),this[_0x30221c(0x6b3)];}['_wantDb'](){const _0x16ab0f=_0x55981f;return this['_assertUsable'](),(!this[_0x16ab0f(0x464)]||this[_0x16ab0f(0x66a)]!==this[_0x16ab0f(0x42d)])&&(this[_0x16ab0f(0x464)]=this['_rawDb'][_0x16ab0f(0x228)](_0x3c3da0+_0x16ab0f(0x33d),{'dupSort':![]}),this[_0x16ab0f(0x66a)]=this[_0x16ab0f(0x42d)]),this[_0x16ab0f(0x464)];}[_0x55981f(0x378)](){const _0x47c9e0=_0x55981f,_0x5f4c9a=this['_rawDb']?.['status'];return _0x5f4c9a==='closing'||_0x5f4c9a===_0x47c9e0(0x580);}[_0x55981f(0x64b)](){const _0x1362ed=_0x55981f;if(this[_0x1362ed(0x378)]())throw new Error(_0x1362ed(0x1fd));}['_key'](_0x6dceca){const _0x34408e=_0x55981f;return this[_0x34408e(0x358)]+':'+_0x6dceca;}[_0x55981f(0x68e)](_0x526cad){const _0x4e730e=_0x55981f;try{if(this['_closed']())return;_0x57a2ec?this[_0x4e730e(0x553)]()[_0x4e730e(0xc1)](this[_0x4e730e(0x374)](_0x526cad),Date['now']()):this[_0x4e730e(0x553)]()[_0x4e730e(0x359)](this[_0x4e730e(0x374)](_0x526cad),Date['now']())?.[_0x4e730e(0x290)]?.(()=>{});}catch{}}['isWanted'](_0x21c527,_0x254056=0x3e8){const _0x25a723=_0x55981f;try{const _0x5e4b7b=this[_0x25a723(0x553)]()[_0x25a723(0x294)](this[_0x25a723(0x374)](_0x21c527));return typeof _0x5e4b7b===_0x25a723(0x4de)&&Date[_0x25a723(0x556)]()-_0x5e4b7b<_0x254056;}catch{return![];}}[_0x55981f(0x136)](_0x31b5c4){const _0xd30921=_0x55981f,_0x432933=_0x31b5c4['updatedAt']??_0x31b5c4[_0xd30921(0x686)];return _0x432933+_0x31b5c4['ttlMs']<Date[_0xd30921(0x556)]();}static[_0x55981f(0x5b7)](_0x4a18a0){const _0x21e891=_0x55981f,_0x369d09=_0x4a18a0?.[_0x21e891(0x499)];if(!_0x369d09||typeof _0x369d09[_0x21e891(0x7af)]!==_0x21e891(0x4de))return![];if(_0x369d09[_0x21e891(0x28c)]!==_0x1a9dba[_0x21e891(0x28c)]())return![];if(_0x369d09[_0x21e891(0x7af)]===process[_0x21e891(0x7af)])return![];try{return process[_0x21e891(0x65b)](_0x369d09[_0x21e891(0x7af)],0x0),![];}catch(_0x23efcb){return _0x23efcb[_0x21e891(0x4bc)]===_0x21e891(0x66e);}}async[_0x55981f(0x674)](_0x52d51c,_0xe26450={},_0x52ceb9={}){const _0x17c71e=_0x55981f,_0x2f2644=this[_0x17c71e(0x374)](_0x52d51c),_0x2a2d44=_0x52ceb9[_0x17c71e(0x2cf)]??this['ttlMs'],_0x1108e0=Date['now'](),_0x19d3bc={'holder':{'pid':process[_0x17c71e(0x7af)],'hostname':_0x1a9dba[_0x17c71e(0x28c)](),..._0xe26450},'acquiredAt':_0x1108e0,'updatedAt':_0x1108e0,'ttlMs':_0x2a2d44};let _0x433931=![],_0x4b320d=null;if(this[_0x17c71e(0x378)]())return{'acquired':![],'handle':null,'current':null};try{const _0x49cb5e=()=>{const _0x4d59e8=_0x17c71e,_0x3929b7=this[_0x4d59e8(0xdf)]()[_0x4d59e8(0x294)](_0x2f2644);if(_0x3929b7&&!this['_isStale'](_0x3929b7)&&!_0x33fe89['_holderDead'](_0x3929b7)){const _0x4f96e6=_0xe26450['processorId']!=null&&_0x3929b7[_0x4d59e8(0x499)][_0x4d59e8(0x7af)]===process[_0x4d59e8(0x7af)]&&_0x3929b7[_0x4d59e8(0x499)][_0x4d59e8(0x505)]===_0xe26450[_0x4d59e8(0x505)];if(!_0x4f96e6){_0x433931=![],_0x4b320d=_0x3929b7;return;}_0x19d3bc[_0x4d59e8(0x686)]<=_0x3929b7[_0x4d59e8(0x686)]&&(_0x19d3bc[_0x4d59e8(0x686)]=_0x3929b7['acquiredAt']+0x1,_0x19d3bc[_0x4d59e8(0x749)]=_0x19d3bc['acquiredAt']);}this['_db']()[_0x4d59e8(0x359)](_0x2f2644,_0x19d3bc),_0x433931=!![],_0x4b320d=_0x19d3bc;};if(_0x57a2ec)this[_0x17c71e(0xdf)]()[_0x17c71e(0x795)](_0x49cb5e);else await this[_0x17c71e(0xdf)]()[_0x17c71e(0x25e)](_0x49cb5e);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x433931)return{'acquired':![],'handle':null,'current':_0x4b320d};const _0x4340d0=new _0x591314(this,_0x2f2644,_0x19d3bc[_0x17c71e(0x686)]);return _0x4340d0[_0x17c71e(0x52b)](_0x2a2d44,this[_0x17c71e(0x425)]),{'acquired':!![],'handle':_0x4340d0,'current':_0x4b320d};}[_0x55981f(0x42a)](_0x15de9d){const _0xd41163=_0x55981f;try{return this[_0xd41163(0xdf)]()[_0xd41163(0x294)](this[_0xd41163(0x374)](_0x15de9d))??null;}catch{return null;}}['list'](){const _0x2d9ff1=_0x55981f,_0x3355ea=this[_0x2d9ff1(0x358)]+':',_0x354c54=[];try{for(const {key:_0x36b37f,value:_0x3be6b7}of this[_0x2d9ff1(0xdf)]()[_0x2d9ff1(0x5fb)]({'start':_0x3355ea,'end':_0x3355ea+'\xff'})){typeof _0x36b37f===_0x2d9ff1(0x1ae)&&_0x36b37f[_0x2d9ff1(0x1a9)](_0x3355ea)&&_0x354c54[_0x2d9ff1(0x5d8)]({'id':_0x36b37f[_0x2d9ff1(0x333)](_0x3355ea[_0x2d9ff1(0x330)]),'entry':_0x3be6b7});}}catch{}return _0x354c54;}static['listAll'](_0x2be2f6){const _0x5b1767=_0x55981f,_0x2a5ec6=[];try{const _0x5d9bcf=_0x2be2f6[_0x5b1767(0x228)](_0x3c3da0,{'dupSort':![]});for(const {key:_0x12ca8f,value:_0x2a4d78}of _0x5d9bcf[_0x5b1767(0x5fb)]({})){if(typeof _0x12ca8f!==_0x5b1767(0x1ae))continue;const _0x51e438=_0x12ca8f[_0x5b1767(0x1fe)](':');if(_0x51e438<0x1)continue;_0x2a5ec6[_0x5b1767(0x5d8)]({'namespace':_0x12ca8f[_0x5b1767(0x333)](0x0,_0x51e438),'id':_0x12ca8f[_0x5b1767(0x333)](_0x51e438+0x1),'entry':_0x2a4d78});}}catch{}return _0x2a5ec6;}}return okdbLock={'OKDBLock':_0x33fe89},okdbLock;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x345d18=_0x3f6c2b;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x5a652a=require$$0,_0x429cf8=require$$1$1,_0x527a8d=require$$2$1,{LOOP:_0x5d8afd}=requireOkdbLoopMonitor(),{OKDBLock:_0xfe1fca}=requireOkdbLock(),{SYNC_COMMITS:_0x1b42d3}=requireOkdbWriter(),_0x330af0=_0x345d18(0x54b),_0x350718=_0x345d18(0x576),_0x4b0495=_0x345d18(0x3ef),_0xbe7716=_0x345d18(0xd3),_0x87a5f1=(_0x5ae9d1,_0x42586d)=>_0x5ae9d1+':'+_0x42586d,_0xbf66d5=(_0x265b2c,_0xdd9adb)=>_0x265b2c+'::'+_0xdd9adb,_0x24d8c6=(_0x16cc60,_0x34a44c)=>_0x16cc60+'/'+_0x34a44c,_0x55845b=(_0x44a665,_0xa5c0b0)=>_0x44a665+'#'+_0xa5c0b0,_0x2e8ed7=_0x720235=>{const _0x21bd5f=_0x345d18;if(_0x720235?.[_0x21bd5f(0x68f)])return _0x720235['processKey'];const _0x50f129=_0x720235?.['nodeKey'];return typeof _0x50f129===_0x21bd5f(0x1ae)&&_0x50f129[_0x21bd5f(0x4b0)]('#')?_0x50f129[_0x21bd5f(0x333)](0x0,_0x50f129['indexOf']('#')):_0x50f129;},_0x39286b=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x2880dd=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x51f057=_0x39286b*0x3,_0x260598=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x345d18(0x42f)](0x927c0,_0x51f057*0x14),_0x2a17ff=[_0x345d18(0x3e0),'processor:ready',_0x345d18(0x6eb),_0x345d18(0x5d5),_0x345d18(0x7ce),_0x345d18(0x648)];let _0x49bfb7=null;function _0x2dfe71(){const _0x4d857=_0x345d18;if(_0x49bfb7==null)_0x49bfb7=Math[_0x4d857(0x2d5)]((Date['now']()-process['uptime']()*0x3e8)/0x3e8)*0x3e8;return _0x49bfb7;}function _0x5e3138(_0x48e6d7){const _0x14a724=_0x345d18;if(process.env.OKDB_PROCESS_KILL===_0x14a724(0x77b))return![];if(_0x48e6d7?.[_0x14a724(0x489)]?.['processes']&&typeof _0x48e6d7[_0x14a724(0x489)]['processes']==='object'&&_0x48e6d7[_0x14a724(0x489)]['processes'][_0x14a724(0x65b)]===![])return![];return!![];}function _0x3576c7(_0x3e5a5f,_0x4be943){const _0x10527e=_0x345d18,_0x3e33f4=!!_0x4be943?.[_0x10527e(0x19d)];switch(_0x3e5a5f){case'primary':return{'controllable':_0x3e33f4,'decommissionable':![],'killable':!![],'killConfirm':_0x10527e(0x722)};case'cli':case _0x10527e(0x72d):return{'controllable':_0x3e33f4,'decommissionable':![],'killable':!![],'killConfirm':'confirm'};case'embedded':return{'controllable':![],'decommissionable':![],'killable':![]};case _0x10527e(0x4d9):case'queue-worker':case'fn-runner':case _0x10527e(0x2b9):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':'force'};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x4167b8{constructor(_0x492c25){const _0x2d11fe=_0x345d18;this[_0x2d11fe(0x7c7)]=_0x492c25,this[_0x2d11fe(0x65c)]=null,this[_0x2d11fe(0x6d3)]=null,this['_desiredOverlay']=new Map(),this[_0x2d11fe(0x1ee)]=null,this[_0x2d11fe(0x71b)]=![],this[_0x2d11fe(0x5bc)]=![],this[_0x2d11fe(0x2ad)]=_0x2dfe71(),this[_0x2d11fe(0xdd)]=_0x87a5f1(process[_0x2d11fe(0x7af)],this[_0x2d11fe(0x2ad)]),this['_instanceId']=_0x527a8d[_0x2d11fe(0x1a7)]()[_0x2d11fe(0x333)](0x0,0x8),this['_rowKey']=_0x55845b(this['_selfKey'],this['_instanceId']),this['_startedAt']=Date['now'](),this[_0x2d11fe(0x469)]=null,this[_0x2d11fe(0x217)]=null,this[_0x2d11fe(0x4a8)]=null,this['_hbTimer']=null,this[_0x2d11fe(0x5c8)]=null,this['_onTick']=null,this[_0x2d11fe(0x2a9)]=0x0,this['_ownMeta']={},this[_0x2d11fe(0x769)]=new Map(),this[_0x2d11fe(0x69d)]=process[_0x2d11fe(0x423)](),this[_0x2d11fe(0x62a)]=Date[_0x2d11fe(0x556)](),this[_0x2d11fe(0x3bb)]=0x0,this['_threadStats']=new Map();}get[_0x345d18(0x1b0)](){const _0x456dbb=_0x345d18;return this[_0x456dbb(0xdd)];}get[_0x345d18(0x3f9)](){const _0xfce06b=_0x345d18;return this[_0xfce06b(0xfe)];}[_0x345d18(0x4ce)](_0x507651,_0x5e5722){const _0x561547=_0x345d18,_0x96824f=_0x3576c7(_0x507651,_0x5e5722);if(_0x96824f[_0x561547(0x3e1)]&&!_0x5e3138(this[_0x561547(0x7c7)]))return{..._0x96824f,'killable':![],'killConfirm':undefined};return _0x96824f;}['isActive'](){const _0x1eb9c7=_0x345d18;return!!this[_0x1eb9c7(0x65c)];}[_0x345d18(0x43a)](_0x39988c){const _0x4639ef=_0x345d18;Object[_0x4639ef(0x14d)](this['_ownMeta'],_0x39988c||{});}[_0x345d18(0x5f0)](_0xb9115b){const _0x3263c0=_0x345d18;if(_0xb9115b)this[_0x3263c0(0x4a8)]=_0xb9115b;}[_0x345d18(0x4b5)](_0x4e8515={}){const _0x1dd5b2=_0x345d18;return this[_0x1dd5b2(0x7c7)][_0x1dd5b2(0x486)](_0x4e8515);}[_0x345d18(0x7c0)](){const _0x334d03=_0x345d18,_0x1f381e={};let _0x3f1e62=0x0,_0x193c3a=0x0;const _0x49486a=new Set();for(const _0x34a0d9 of this['listNodes']()){_0x193c3a++;const _0x41ebe3=_0x34a0d9[_0x334d03(0x5c5)];if(!_0x41ebe3)continue;if(_0x41ebe3[_0x334d03(0x453)])_0x3f1e62++;for(const _0x319468 of _0x41ebe3[_0x334d03(0x19d)]||[]){if(![_0x334d03(0x5a0),'fanout'][_0x334d03(0x4b0)](_0x319468['mode']))continue;(_0x319468[_0x334d03(0x684)]==='online'||_0x319468['state']===_0x334d03(0x118))&&_0x319468[_0x334d03(0x2a4)]&&_0x49486a['add']((_0x319468[_0x334d03(0x52a)]||_0x334d03(0x5c4))+':'+_0x319468[_0x334d03(0x2a4)]);const _0x12cb62=_0x319468[_0x334d03(0x52a)]||_0x334d03(0x5c4);(_0x1f381e[_0x12cb62]||=[])[_0x334d03(0x5d8)]({..._0x319468,'env':_0x12cb62,'owner':{'pid':_0x34a0d9[_0x334d03(0x7af)]??null,'kind':_0x34a0d9[_0x334d03(0x26d)]??null}});}}for(const [_0x523093,_0x48adca]of Object[_0x334d03(0x45d)](_0x1f381e)){for(const _0x461cd2 of _0x48adca){if(_0x461cd2[_0x334d03(0x12d)]===_0x334d03(0x5a0)&&!_0x461cd2['claimGated']){const _0x4a4462=_0x523093+':'+(_0x461cd2[_0x334d03(0x2a4)]??'');if(!_0x49486a[_0x334d03(0x229)](_0x4a4462))_0x461cd2[_0x334d03(0x606)]=!![];}}}return{'envs':_0x1f381e,'policy':null,'participation':{'participating':_0x3f1e62,'total':_0x193c3a},'source':_0x334d03(0x572)};}['processorsView'](){const _0x152e1c=_0x345d18,_0xa4dcde=_0x16e887=>{const _0x283bc2=_0x2ba0;if(_0x16e887[_0x283bc2(0x684)]===_0x283bc2(0x742)||_0x16e887[_0x283bc2(0x684)]===_0x283bc2(0x118)||_0x16e887[_0x283bc2(0x684)]===_0x283bc2(0x5f2))return 0x3;if(_0x16e887['claimGated'])return 0x1;return 0x2;},_0x48e61a=new Map();for(const _0x1a3043 of this[_0x152e1c(0x210)]()){for(const _0x409259 of _0x1a3043[_0x152e1c(0x5c5)]?.[_0x152e1c(0x19d)]||[]){const _0x3860c1={..._0x409259,'owner':{'pid':_0x1a3043[_0x152e1c(0x7af)]??null,'kind':_0x1a3043[_0x152e1c(0x26d)]??null,'host':_0x1a3043['host']??null}},_0x2cf9e5=_0x409259[_0x152e1c(0x12d)]===_0x152e1c(0x5a0)?'1ofN:'+(_0x409259['env']??'')+'::'+(_0x409259['cursorKey']??_0x409259['type']??_0x409259['id']):_0x152e1c(0xf9)+(_0x1a3043[_0x152e1c(0x352)]??_0x1a3043[_0x152e1c(0x68f)]??'')+'::'+(_0x409259[_0x152e1c(0x52a)]??'')+'::'+_0x409259['id'],_0xcad5de=_0x48e61a[_0x152e1c(0x294)](_0x2cf9e5);if(!_0xcad5de||_0xa4dcde(_0x3860c1)>_0xa4dcde(_0xcad5de))_0x48e61a[_0x152e1c(0x3c0)](_0x2cf9e5,_0x3860c1);}}return[..._0x48e61a[_0x152e1c(0x289)]()];}[_0x345d18(0x60e)](){const _0x4ae891=_0x345d18,_0x27b42f=Date['now'](),_0x449698=this[_0x4ae891(0x210)](),_0x5cd709=_0x1e09bc=>Math[_0x4ae891(0x42f)](0x0,Math['round']((_0x27b42f-(_0x1e09bc[_0x4ae891(0x332)]||_0x27b42f))/0x3e8)),_0xd9406d=_0x449698[_0x4ae891(0x28d)](_0x8f6d8d=>_0x8f6d8d[_0x4ae891(0x26d)]===_0x4ae891(0x60d)),_0x1c74ef=_0x449698['filter'](_0x4b3cb7=>_0x4b3cb7[_0x4ae891(0x26d)]===_0x4ae891(0x4d9));if(_0xd9406d||_0x1c74ef[_0x4ae891(0x330)])return{'primary':_0xd9406d?{'pid':_0xd9406d[_0x4ae891(0x7af)],'uptime':_0x5cd709(_0xd9406d)}:null,'workers':_0x1c74ef[_0x4ae891(0x6d7)](_0x56b6f9=>({'pid':_0x56b6f9[_0x4ae891(0x7af)],'uptime':_0x5cd709(_0x56b6f9)})),'workersConfigured':_0xd9406d?.[_0x4ae891(0x740)]?.['workersConfigured']??_0x1c74ef[_0x4ae891(0x330)],'mode':_0x4ae891(0x335)};const _0x26b492=_0x449698[_0x4ae891(0x28d)](_0x4b016b=>_0x4b016b[_0x4ae891(0x26d)]===_0x4ae891(0x161)||_0x4b016b[_0x4ae891(0x26d)]==='standalone'||_0x4b016b[_0x4ae891(0x26d)]===_0x4ae891(0x1f1)),_0x11d2cf=_0x26b492?{'pid':_0x26b492[_0x4ae891(0x7af)],'uptime':_0x5cd709(_0x26b492)}:{'pid':process[_0x4ae891(0x7af)],'uptime':Math[_0x4ae891(0x42f)](0x0,Math['round'](process[_0x4ae891(0x6af)]()))};return{'primary':_0x11d2cf,'workers':[_0x11d2cf],'workersConfigured':0x1,'mode':_0x4ae891(0x5a0)};}[_0x345d18(0x727)](){const _0x1f71d9=_0x345d18;return this[_0x1f71d9(0x5a2)]();}[_0x345d18(0x69a)](){const _0xabeb4b=_0x345d18,_0xbcf3c8=new Map();for(const _0x13fb43 of this[_0xabeb4b(0x5a2)]())_0xbcf3c8[_0xabeb4b(0x3c0)](_0x13fb43[_0xabeb4b(0x68f)],{..._0x13fb43,'children':[]});const _0xef9816=[];for(const _0x3566ea of _0xbcf3c8[_0xabeb4b(0x289)]()){const _0xd49b17=_0x3566ea[_0xabeb4b(0x130)]?_0xbcf3c8[_0xabeb4b(0x294)](_0x3566ea[_0xabeb4b(0x130)]):null;if(_0xd49b17&&_0xd49b17!==_0x3566ea)_0xd49b17[_0xabeb4b(0x6c0)][_0xabeb4b(0x5d8)](_0x3566ea);else _0xef9816[_0xabeb4b(0x5d8)](_0x3566ea);}const _0x5a183f=(_0x2bcf8e,_0x17aa98)=>_0x2bcf8e[_0xabeb4b(0x26d)]===_0x17aa98[_0xabeb4b(0x26d)]?(_0x2bcf8e[_0xabeb4b(0x7af)]||0x0)-(_0x17aa98[_0xabeb4b(0x7af)]||0x0):(_0x2bcf8e[_0xabeb4b(0x26d)]??'')<(_0x17aa98[_0xabeb4b(0x26d)]??'')?-0x1:0x1,_0x27b6fe=_0x5468af=>{const _0x3bb993=_0xabeb4b;_0x5468af['sort'](_0x5a183f);for(const _0x29c322 of _0x5468af)if(_0x29c322[_0x3bb993(0x6c0)]['length'])_0x27b6fe(_0x29c322['children']);};return _0x27b6fe(_0xef9816),_0xef9816;}[_0x345d18(0x3a4)](_0x71b5be){const _0x30f6ea=_0x345d18;return this[_0x30f6ea(0x5a2)]()[_0x30f6ea(0x28d)](_0x5b3ee7=>_0x5b3ee7[_0x30f6ea(0x68f)]===_0x71b5be)??null;}['_groupByProcess'](_0x323678=Date[_0x345d18(0x556)]()){const _0xa5e727=_0x345d18,_0x11c818=new Map();for(const _0x30aa19 of this[_0xa5e727(0x210)]()){const _0x3102c4=_0x2e8ed7(_0x30aa19);let _0x17c4e2=_0x11c818[_0xa5e727(0x294)](_0x3102c4);!_0x17c4e2&&(_0x17c4e2={'processKey':_0x3102c4,'nodeKey':_0x3102c4,'pid':_0x30aa19[_0xa5e727(0x7af)],'ppid':_0x30aa19[_0xa5e727(0x17e)]??null,'host':_0x30aa19['host']??null,'kind':_0x30aa19[_0xa5e727(0x26d)],'role':null,'supervisorKey':_0x30aa19[_0xa5e727(0x130)]??null,'slot':_0x30aa19[_0xa5e727(0x53f)]??null,'slotKey':_0x30aa19[_0xa5e727(0x311)]??null,'caps':_0x30aa19['caps']??null,'lifecycle':_0x30aa19[_0xa5e727(0x764)]??null,'uptime':Math[_0xa5e727(0x42f)](0x0,Math[_0xa5e727(0x2d5)]((_0x323678-(_0x30aa19[_0xa5e727(0x332)]||_0x323678))/0x3e8)),'startedAt':_0x30aa19[_0xa5e727(0x332)]??null,'meta':_0x30aa19[_0xa5e727(0x740)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x11c818[_0xa5e727(0x3c0)](_0x3102c4,_0x17c4e2));_0x17c4e2[_0xa5e727(0x482)][_0xa5e727(0x5d8)]({'instanceId':_0x30aa19[_0xa5e727(0x5a6)]??null,'role':_0x30aa19['role']??null,'listenAddr':_0x30aa19[_0xa5e727(0x185)]??null,'lifecycle':_0x30aa19[_0xa5e727(0x764)]??null,'processing':_0x30aa19[_0xa5e727(0x5c5)]??null});if(!_0x17c4e2[_0xa5e727(0x6e1)]&&_0x30aa19['role'])_0x17c4e2[_0xa5e727(0x6e1)]=_0x30aa19[_0xa5e727(0x6e1)];if(!_0x17c4e2[_0xa5e727(0x185)]&&_0x30aa19['listenAddr'])_0x17c4e2['listenAddr']=_0x30aa19[_0xa5e727(0x185)];if(!_0x17c4e2[_0xa5e727(0x5c5)]&&_0x30aa19[_0xa5e727(0x5c5)])_0x17c4e2[_0xa5e727(0x5c5)]=_0x30aa19[_0xa5e727(0x5c5)];if(!_0x17c4e2[_0xa5e727(0x2bb)]&&_0x30aa19[_0xa5e727(0x2bb)])_0x17c4e2[_0xa5e727(0x2bb)]=_0x30aa19[_0xa5e727(0x2bb)];if(!_0x17c4e2[_0xa5e727(0x3e4)]&&_0x30aa19[_0xa5e727(0x3e4)])_0x17c4e2['singletonClaims']=_0x30aa19[_0xa5e727(0x3e4)];if(_0x17c4e2['caps']==null&&_0x30aa19[_0xa5e727(0x5dd)])_0x17c4e2[_0xa5e727(0x5dd)]=_0x30aa19[_0xa5e727(0x5dd)];if(_0x30aa19['stats']&&(!_0x17c4e2[_0xa5e727(0x613)]||(_0x30aa19[_0xa5e727(0x613)]['at']??0x0)>(_0x17c4e2['stats']['at']??0x0)))_0x17c4e2[_0xa5e727(0x613)]=_0x30aa19['stats'];}return[..._0x11c818[_0xa5e727(0x289)]()];}[_0x345d18(0x48a)](){const _0x3ca11d=_0x345d18,_0x3e8228=[],_0x3a3309={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x76382d of this[_0x3ca11d(0x5a2)]()){_0x3e8228[_0x3ca11d(0x5d8)]({'processKey':_0x76382d['processKey'],'kind':_0x76382d[_0x3ca11d(0x26d)],'pid':_0x76382d[_0x3ca11d(0x7af)],'supervisorKey':_0x76382d[_0x3ca11d(0x130)],'meta':_0x76382d[_0x3ca11d(0x740)]??null,'uptime':_0x76382d[_0x3ca11d(0x6af)],'stats':_0x76382d[_0x3ca11d(0x613)]??null}),_0x3a3309['processes']++;if(_0x76382d['stats']){_0x3a3309[_0x3ca11d(0x639)]+=_0x76382d[_0x3ca11d(0x613)][_0x3ca11d(0x639)]||0x0,_0x3a3309[_0x3ca11d(0x66b)]+=(_0x76382d[_0x3ca11d(0x613)]['heapUsed']||0x0)+(_0x76382d['stats'][_0x3ca11d(0x513)]?.[_0x3ca11d(0x66b)]||0x0);const _0x4b2776=_0x76382d['stats']['threads'];_0x4b2776&&(_0x3a3309[_0x3ca11d(0x513)][_0x3ca11d(0x172)]+=_0x4b2776['count']||0x0,_0x3a3309[_0x3ca11d(0x513)][_0x3ca11d(0x27b)]+=_0x4b2776[_0x3ca11d(0x27b)]||0x0,_0x3a3309['threads'][_0x3ca11d(0x127)]+=_0x4b2776[_0x3ca11d(0x127)]||0x0);}}return{'totals':_0x3a3309,'nodes':_0x3e8228};}async[_0x345d18(0x375)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x7899b6=_0x345d18;this[_0x7899b6(0x71b)]=this[_0x7899b6(0x71b)]||!!writer,this[_0x7899b6(0x5bc)]=this['_isReader']||!!reader,this[_0x7899b6(0x469)]=kind||this['_kind']||(_0x429cf8[_0x7899b6(0x519)]?'http-server':_0x7899b6(0x161)),this['_supervisorKey']=supervisorKey??this[_0x7899b6(0x217)],this[_0x7899b6(0x4a8)]=listenAddr??this[_0x7899b6(0x4a8)],this[_0x7899b6(0x633)](),await this[_0x7899b6(0x5b0)]();if(!writer&&!reader)return null;if(!this[_0x7899b6(0x65c)]){const _0x5e25b2=await this[_0x7899b6(0x7c7)][_0x7899b6(0x141)](_0x330af0,{'sync':![],'durability':'fast'});await _0x5e25b2[_0x7899b6(0x3df)](_0x350718),this[_0x7899b6(0x65c)]=_0x5e25b2;}return this[_0x7899b6(0x65c)];}[_0x345d18(0x1d5)](){const _0x1b3a05=_0x345d18;return this[_0x1b3a05(0x540)]!==this[_0x1b3a05(0x65c)]&&(this['_nodeDbFor']=this['_statusEnv'],this[_0x1b3a05(0x385)]=this[_0x1b3a05(0x65c)][_0x1b3a05(0x6f5)](_0x350718)[_0x1b3a05(0x29a)]),this[_0x1b3a05(0x385)];}[_0x345d18(0x7bf)](_0x452bbc){const _0x4733d3=_0x345d18;if(_0x1b42d3)return this['_nodeDb']()[_0x4733d3(0xc1)](_0x452bbc[_0x4733d3(0x352)],_0x452bbc,0x1);const _0x20bd70=this['_nodeDb']()['put'](_0x452bbc[_0x4733d3(0x352)],_0x452bbc,0x1);if(_0x20bd70&&typeof _0x20bd70[_0x4733d3(0x1dd)]===_0x4733d3(0x6c9))_0x20bd70[_0x4733d3(0x1dd)](undefined,()=>{});return _0x20bd70;}[_0x345d18(0x3a5)](_0x2f00b5){const _0x4521ed=_0x345d18;return this['_nodeDb']()[_0x4521ed(0xc1)](_0x2f00b5['nodeKey'],_0x2f00b5,0x1);}['_removeRowAsync'](_0x5c3074){const _0x394275=_0x345d18;if(_0x1b42d3)try{return this[_0x394275(0x1d5)]()[_0x394275(0x655)](_0x5c3074);}catch{return![];}const _0x2dd112=this['_nodeDb']()['remove'](_0x5c3074);if(_0x2dd112&&typeof _0x2dd112[_0x394275(0x1dd)]===_0x394275(0x6c9))_0x2dd112['then'](undefined,()=>{});return _0x2dd112;}async[_0x345d18(0x252)](_0x5bec27){const _0x11e7f3=_0x345d18;if(!this['_statusEnv']||!this[_0x11e7f3(0x71b)]||!_0x5bec27?.[_0x11e7f3(0x352)])return;return this[_0x11e7f3(0x7bf)](_0x5bec27);}async[_0x345d18(0x76c)](_0x45ba1d){const _0x140e68=_0x345d18;if(!this[_0x140e68(0x65c)]||!this[_0x140e68(0x71b)]||!_0x45ba1d)return;const _0x587902=_0x45ba1d[_0x140e68(0x4b0)]('#'),_0x11d0de=[];for(const {key:_0x2d249a}of this['_statusEnv'][_0x140e68(0x5fb)](_0x350718)){if(_0x2d249a===_0x45ba1d||!_0x587902&&typeof _0x2d249a==='string'&&_0x2d249a[_0x140e68(0x1a9)](_0x45ba1d+'#'))_0x11d0de[_0x140e68(0x5d8)](_0x2d249a);}for(const _0x3fa01c of _0x11d0de){try{this['_nodeDb']()[_0x140e68(0x655)](_0x3fa01c);}catch{}}}[_0x345d18(0x411)](_0x560a8c){const _0x1f38b9=_0x345d18;if(typeof _0x560a8c?.[_0x1f38b9(0x7af)]!=='number')return![];if(_0x560a8c[_0x1f38b9(0x75f)]!==_0x5a652a[_0x1f38b9(0x28c)]())return![];if(_0x560a8c['pid']===process[_0x1f38b9(0x7af)])return![];if(_0x560a8c['expiresAt']!=null&&_0x560a8c['expiresAt']<Date[_0x1f38b9(0x556)]()-_0x260598)return!![];try{return process[_0x1f38b9(0x65b)](_0x560a8c[_0x1f38b9(0x7af)],0x0),![];}catch(_0x317312){return _0x317312[_0x1f38b9(0x4bc)]===_0x1f38b9(0x66e);}}[_0x345d18(0x210)](){const _0x29c150=_0x345d18;if(!this['_statusEnv'])return[];try{this[_0x29c150(0x65c)]['db']?.['resetReadTxn']?.();}catch{}const _0x5c1ebd=Date[_0x29c150(0x556)](),_0x16f1bf=_0x5a652a[_0x29c150(0x28c)](),_0x9a30f8=[];for(const {value:_0x4dcb2b}of this[_0x29c150(0x65c)][_0x29c150(0x5fb)](_0x350718)){if(!_0x4dcb2b)continue;let _0x3dc856=null;_0x4dcb2b[_0x29c150(0x75f)]===_0x16f1bf&&typeof _0x4dcb2b[_0x29c150(0x7af)]===_0x29c150(0x4de)&&(_0x3dc856=!this[_0x29c150(0x411)](_0x4dcb2b));if(_0x3dc856===![])continue;const _0x1a245d=_0x4dcb2b[_0x29c150(0x257)]==null||_0x4dcb2b[_0x29c150(0x257)]>=_0x5c1ebd;if(_0x3dc856===!![]||_0x1a245d)_0x9a30f8[_0x29c150(0x5d8)](_0x4dcb2b);}return _0x9a30f8;}async['reap'](_0x509f60=0x0){const _0x335768=_0x345d18;if(!this[_0x335768(0x65c)]||!this[_0x335768(0x71b)])return;const _0x36c7ab=Date[_0x335768(0x556)]()-_0x509f60,_0x54bd82=new Set(),_0x28410e=[],_0x5f3431=_0x5a652a[_0x335768(0x28c)](),_0x89558c=require$$3[_0x335768(0x1ce)];for(const {key:_0x5455a7,value:_0x39d3ae}of this['_statusEnv']['getRange'](_0x350718)){if(!_0x39d3ae)continue;const _0x4281e1=_0x39d3ae[_0x335768(0x75f)]===_0x5f3431&&typeof _0x39d3ae['pid']==='number',_0x3eebbd=_0x4281e1?this[_0x335768(0x411)](_0x39d3ae):_0x39d3ae[_0x335768(0x257)]!=null&&_0x39d3ae[_0x335768(0x257)]<_0x36c7ab;if(_0x3eebbd)_0x28410e[_0x335768(0x5d8)](_0x5455a7);else{_0x54bd82[_0x335768(0x73d)](_0x2e8ed7(_0x39d3ae)??_0x5455a7);if(_0x39d3ae[_0x335768(0x1ce)]&&_0x39d3ae[_0x335768(0x1ce)]!==_0x89558c){if(!this[_0x335768(0x61d)])this[_0x335768(0x61d)]=new Set();!this['_versionSkewWarned'][_0x335768(0x229)](_0x39d3ae[_0x335768(0x1ce)])&&(this[_0x335768(0x61d)][_0x335768(0x73d)](_0x39d3ae[_0x335768(0x1ce)]),this[_0x335768(0x7c7)]['log']?.[_0x335768(0x593)]?.('process\x20'+(_0x39d3ae['pid']??'?')+'\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20'+_0x39d3ae[_0x335768(0x1ce)]+_0x335768(0x78b)+_0x89558c+_0x335768(0x1c6)+_0x335768(0x206),{'feature':_0x335768(0x37a)}));}}}for(const _0x448673 of _0x28410e)this[_0x335768(0x567)](_0x448673);if(this[_0x335768(0x633)]()){const _0xec1731=[];for(const {key:_0x3db8d1}of this[_0x335768(0x1ed)]('node')){if(!_0x54bd82[_0x335768(0x229)](_0x3db8d1)){if(_0x1b42d3)try{this[_0x335768(0x6d3)]['removeSync'](_0x335768(0x554)+_0x3db8d1);}catch{}else _0xec1731[_0x335768(0x5d8)](this[_0x335768(0x6d3)][_0x335768(0x5e2)](_0x335768(0x554)+_0x3db8d1));}}if(_0xec1731[_0x335768(0x330)])await Promise[_0x335768(0x693)](_0xec1731);}}[_0x345d18(0x360)](_0x2d0f6d=null){const _0x58106f=_0x345d18;if(this[_0x58106f(0x61c)])return;if(!this['_isWriter']||!this['_statusEnv']){this[_0x58106f(0x7c7)]?.[_0x58106f(0x515)]?.[_0x58106f(0x593)]?.('registry\x20heartbeat\x20skipped\x20(writer='+this['_isWriter']+_0x58106f(0x531)+!!this[_0x58106f(0x65c)]+_0x58106f(0xcf),{'feature':_0x58106f(0x25f)});return;}this[_0x58106f(0x153)]=_0x2d0f6d,this[_0x58106f(0x5c8)]=()=>this['_maybePublish']();for(const _0x4fe1c3 of _0x2a17ff)this[_0x58106f(0x7c7)][_0x58106f(0x24e)]['on'](_0x4fe1c3,this[_0x58106f(0x5c8)]);this[_0x58106f(0x63f)]();const _0x459bd6=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x39286b;this[_0x58106f(0x61c)]=setInterval(()=>{const _0x3a15f2=_0x58106f;if(this[_0x3a15f2(0x153)])try{this['_onTick']();}catch{}this[_0x3a15f2(0x63f)](),this[_0x3a15f2(0x33c)]()[_0x3a15f2(0x290)](()=>{});},_0x459bd6);if(this[_0x58106f(0x61c)]['unref'])this[_0x58106f(0x61c)][_0x58106f(0x169)]();}['_maybePublish'](){const _0x3202b6=_0x345d18;if(!this['_isWriter']||!this[_0x3202b6(0x65c)])return;if(Date[_0x3202b6(0x556)]()-this['_lastPublishAt']<_0x2880dd)return;this[_0x3202b6(0x63f)]();}['_publishNow'](){const _0x228ef4=_0x345d18;if(!this[_0x228ef4(0x71b)]||!this[_0x228ef4(0x65c)])return;this[_0x228ef4(0x2a9)]=Date[_0x228ef4(0x556)]();try{const _0xbae383=[this['_buildOwnRow']()];for(const _0x28d9b3 of this[_0x228ef4(0x769)][_0x228ef4(0x289)]())_0xbae383[_0x228ef4(0x5d8)](this['_buildChildRow'](_0x28d9b3));const _0xfab6ad=_0x5d8afd[_0x228ef4(0x22b)]?_0x5d8afd[_0x228ef4(0x556)]():0x0;for(const _0x2999f4 of _0xbae383){try{this['_putRowSync'](_0x2999f4),this['_publishFailWarned']=![];}catch(_0x4725be){!this[_0x228ef4(0x3ad)]&&(this['_publishFailWarned']=!![],this[_0x228ef4(0x7c7)]?.[_0x228ef4(0x515)]?.[_0x228ef4(0x593)]?.(_0x228ef4(0x73b)+_0x4725be[_0x228ef4(0x7b6)],{'feature':'processes'}));}}if(_0x5d8afd['enabled'])_0x5d8afd[_0x228ef4(0x470)](_0x228ef4(0x4cc),_0x5d8afd[_0x228ef4(0x556)]()-_0xfab6ad,_0x228ef4(0x128)+_0xbae383[_0x228ef4(0x330)]+_0x228ef4(0x5f3));}catch(_0x3fa16c){!this[_0x228ef4(0x3ad)]&&(this[_0x228ef4(0x3ad)]=!![],this['okdb']?.[_0x228ef4(0x515)]?.['warn']?.(_0x228ef4(0x73b)+_0x3fa16c[_0x228ef4(0x7b6)],{'feature':_0x228ef4(0x25f)}));}}async[_0x345d18(0x5ba)](){const _0x339880=_0x345d18;if(this[_0x339880(0x5c8)]){for(const _0x358ce0 of _0x2a17ff){try{this[_0x339880(0x7c7)][_0x339880(0x24e)][_0x339880(0x77b)](_0x358ce0,this['_onProcEvent']);}catch{}}this[_0x339880(0x5c8)]=null;}this[_0x339880(0x61c)]&&(clearInterval(this['_hbTimer']),this['_hbTimer']=null);try{if(this[_0x339880(0x65c)]&&this[_0x339880(0x71b)])await this[_0x339880(0x76c)](this[_0x339880(0xfe)]);}catch{}}async['deregisterSelf'](){const _0x12a591=_0x345d18;if(!this[_0x12a591(0x65c)]||!this['_isWriter'])return;try{await this[_0x12a591(0x76c)](this[_0x12a591(0xfe)]);}catch{}try{const _0x44f91e=[];for(const {value:_0x3ff49f}of this[_0x12a591(0x65c)]['getRange'](_0x350718)){if(_0x3ff49f?.[_0x12a591(0x17e)]===process[_0x12a591(0x7af)]&&_0x3ff49f[_0x12a591(0x352)])_0x44f91e[_0x12a591(0x5d8)](_0x3ff49f['nodeKey']);}for(const _0x4b70ed of _0x44f91e){try{await this[_0x12a591(0x76c)](_0x4b70ed);}catch{}}}catch{}}async[_0x345d18(0x621)](){const _0x27499b=_0x345d18;return this[_0x27499b(0x252)](this[_0x27499b(0x498)]());}async['publishChildRow'](_0x47e515){const _0x141bdb=_0x345d18;if(!this[_0x141bdb(0x65c)]||!this[_0x141bdb(0x71b)])return;return this[_0x141bdb(0x252)](this[_0x141bdb(0x35c)](_0x47e515));}[_0x345d18(0x35c)]({pid:_0x1b8424,startedAt:_0x3ade6a,kind:_0x1a36f3,supervisorKey:_0x49583a,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x345d18(0x1b7),meta:meta=null,stats:stats=null}){const _0x51d355=_0x345d18,_0xd5d2a7=Date[_0x51d355(0x556)](),_0x2c4966=_0x87a5f1(_0x1b8424,_0x3ade6a);return{'nodeKey':_0x55845b(_0x2c4966,'0'),'processKey':_0x2c4966,'instanceId':'0','pid':_0x1b8424,'startedAt':_0x3ade6a,'ppid':process[_0x51d355(0x7af)],'host':_0x5a652a[_0x51d355(0x28c)](),'supervisorKey':_0x49583a,'slot':slot,'slotKey':slotKey,'kind':_0x1a36f3,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0xd5d2a7,'expiresAt':_0xd5d2a7+_0x51f057,'caps':this[_0x51d355(0x4ce)](_0x1a36f3,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async['addSupervisedChild'](_0x3adf3c){const _0x4c7afc=_0x345d18;if(!_0x3adf3c?.[_0x4c7afc(0x7af)])return null;const _0x446bd9=_0x87a5f1(_0x3adf3c[_0x4c7afc(0x7af)],_0x3adf3c['startedAt']);this[_0x4c7afc(0x769)][_0x4c7afc(0x3c0)](_0x446bd9,{..._0x3adf3c,'supervisorKey':_0x3adf3c['supervisorKey']??this['_selfKey']});if(this[_0x4c7afc(0x71b)])await this[_0x4c7afc(0x4e1)](this[_0x4c7afc(0x769)]['get'](_0x446bd9))['catch']?.(()=>{});return _0x446bd9;}[_0x345d18(0x50a)](_0x568c3c){if(!_0x568c3c)return;return this['_children']['delete'](_0x568c3c),this['removeNode'](_0x568c3c);}[_0x345d18(0x20d)](){const _0x1507ea=_0x345d18,_0x1220af=Date[_0x1507ea(0x556)](),_0x43c991=process[_0x1507ea(0x423)](),_0x357ac7=(_0x1220af-this['_lastCpuAt'])*0x3e8;if(_0x357ac7>=0x3d090){const _0x73b089=_0x43c991[_0x1507ea(0x109)]-this['_lastCpuUsage'][_0x1507ea(0x109)]+(_0x43c991[_0x1507ea(0x7c3)]-this[_0x1507ea(0x69d)][_0x1507ea(0x7c3)]),_0x3eaf6a=_0x5a652a[_0x1507ea(0x25d)]()[_0x1507ea(0x330)]||0x1;this[_0x1507ea(0x3bb)]=Math['min'](0x64,Math['round'](_0x73b089/(_0x357ac7*_0x3eaf6a)*0x64)),this[_0x1507ea(0x685)]=Math['round'](_0x357ac7/0x3e8),this['_lastCpuUsage']=_0x43c991,this[_0x1507ea(0x62a)]=_0x1220af;}const _0x1f16f0=process[_0x1507ea(0xc9)](),_0x13b772=this[_0x1507ea(0x10a)][_0x1507ea(0x6ca)];let _0x370d9b=0x0;if(_0x13b772>0x0){const _0x2f7fc6=[this[_0x1507ea(0x7c7)],...this['okdb'][_0x1507ea(0x561)]?.['values']?.()??[]];for(const _0x4c8086 of _0x2f7fc6){const _0x8494f7=_0x4c8086['functions']?.[_0x1507ea(0x104)];if(_0x8494f7)_0x370d9b+=_0x8494f7['liveThreadStats'][_0x1507ea(0x127)];}}let _0x246059=null;const _0x2ffe9e=_0x13b772;if(_0x2ffe9e>0x0){let _0xda036f=0x0;for(const _0x436414 of this[_0x1507ea(0x10a)][_0x1507ea(0x289)]())_0xda036f+=_0x436414[_0x1507ea(0x66b)]||0x0;_0x246059={'count':_0x2ffe9e,'heapUsed':_0xda036f,'sandbox':_0x13b772,'busy':_0x370d9b};}return{'rss':_0x1f16f0[_0x1507ea(0x639)],'heapUsed':_0x1f16f0['heapUsed'],'heapTotal':_0x1f16f0['heapTotal'],'external':_0x1f16f0[_0x1507ea(0x356)],'cpuPct':this[_0x1507ea(0x3bb)],'cpuWindowMs':this[_0x1507ea(0x685)]??null,'threads':_0x246059,'at':_0x1220af};}[_0x345d18(0x223)](_0x366d12,_0xe35025){const _0x19f65f=_0x345d18;if(!_0x366d12||!_0xe35025)return;this[_0x19f65f(0x10a)][_0x19f65f(0x3c0)](_0x366d12,_0xe35025);}[_0x345d18(0x107)](_0x85b903){const _0x30805f=_0x345d18;this[_0x30805f(0x10a)][_0x30805f(0x539)](_0x85b903);}['updateSupervisedChildStats'](_0x2845fc,_0x422d97,_0x3ccf2f=undefined){const _0x2dbdd6=_0x345d18,_0x57285f=this[_0x2dbdd6(0x769)][_0x2dbdd6(0x294)](_0x2845fc);if(!_0x57285f||!_0x422d97)return;if(_0x3ccf2f!==undefined)_0x57285f[_0x2dbdd6(0x5c5)]=_0x3ccf2f;_0x57285f[_0x2dbdd6(0x613)]={'rss':_0x422d97[_0x2dbdd6(0x639)]??null,'heapUsed':_0x422d97[_0x2dbdd6(0x66b)]??null,'heapTotal':_0x422d97[_0x2dbdd6(0x3a6)]??null,'external':_0x422d97[_0x2dbdd6(0x356)]??null,'cpuPct':_0x422d97[_0x2dbdd6(0x261)]??null,'cpuWindowMs':_0x422d97['cpuWindowMs']??null,'threads':_0x422d97[_0x2dbdd6(0x513)]??null,'claims':_0x422d97['claims']??null,'envsOpen':_0x422d97[_0x2dbdd6(0x4b8)]??null,'at':Date[_0x2dbdd6(0x556)]()};}[_0x345d18(0x498)](){const _0x313d32=_0x345d18,_0x4f1f50=Date[_0x313d32(0x556)](),_0x4a99e9=this[_0x313d32(0x7c7)]['_role']||{},_0x206f01=this[_0x313d32(0x469)]||_0x313d32(0x161);return{'nodeKey':this['_rowKey'],'processKey':this[_0x313d32(0xdd)],'instanceId':this[_0x313d32(0xc7)],'pid':process[_0x313d32(0x7af)],'startedAt':this[_0x313d32(0x2ad)],'instanceStartedAt':this[_0x313d32(0x475)],'ppid':typeof process[_0x313d32(0x17e)]===_0x313d32(0x4de)?process[_0x313d32(0x17e)]:null,'host':_0x5a652a[_0x313d32(0x28c)](),'supervisorKey':this[_0x313d32(0x217)]??null,'version':require$$3['version'],'kind':_0x206f01,'role':{'engines':!!_0x4a99e9[_0x313d32(0x2bb)],'processors':!!_0x4a99e9[_0x313d32(0x19d)],'compaction':_0x4a99e9[_0x313d32(0x5ed)],'http':_0x4a99e9[_0x313d32(0x36a)]},'listenAddr':this[_0x313d32(0x4a8)]??null,'heartbeatAt':_0x4f1f50,'expiresAt':_0x4f1f50+_0x51f057,'caps':this[_0x313d32(0x4ce)](_0x206f01,_0x4a99e9),'lifecycle':{'state':_0x313d32(0x1b7),'desiredVersionApplied':null},'meta':{...this['_ownMeta']},'processing':_0x4a99e9['processors']?this['_buildProcessingFacet']():null,'engines':_0x4a99e9[_0x313d32(0x2bb)]?[...this[_0x313d32(0x7c7)][_0x313d32(0x380)]??[]]:null,'singletonClaims':this[_0x313d32(0x397)](),'stats':this['_sampleOwnStats'](),'writers':this['_collectWriterFacet']()};}['_collectWriterFacet'](){const _0x59f418=_0x345d18,_0x3c8615={};try{for(const [_0x3413d9,_0x4e2b10]of this[_0x59f418(0x7c7)][_0x59f418(0x561)]){try{const _0x108179=_0x4e2b10[_0x59f418(0xe0)]?.();if(!_0x108179)continue;if(!_0x108179[_0x59f418(0x58d)]&&!_0x108179[_0x59f418(0x283)]&&!(_0x108179[_0x59f418(0x234)]??0x0)&&!_0x108179[_0x59f418(0x701)])continue;_0x3c8615[_0x3413d9]={'depth':_0x108179[_0x59f418(0x58d)],'oldestPendingMs':_0x108179[_0x59f418(0x57d)],'committed':_0x108179[_0x59f418(0x283)],'commitsPerSec':_0x108179[_0x59f418(0x102)],'commitP99Ms':_0x108179['commitP99Ms'],'parkedNow':_0x108179[_0x59f418(0x234)]??0x0,'draining':!!_0x108179[_0x59f418(0x701)]};}catch{}}}catch{}return Object[_0x59f418(0x434)](_0x3c8615)[_0x59f418(0x330)]?_0x3c8615:null;}[_0x345d18(0x397)](){const _0x26a1b4=_0x345d18,_0x5aa653=process[_0x26a1b4(0x7af)],_0x4933f2=Date[_0x26a1b4(0x556)](),_0x46d38b=_0x9c5ac7=>{const _0x58bdb3=_0x26a1b4;if(!_0x9c5ac7)return[];const _0x4568e5=[];try{for(const {id:_0x54a054,entry:_0x43770c}of _0x9c5ac7[_0x58bdb3(0x4be)]()){if(_0x43770c?.[_0x58bdb3(0x499)]?.[_0x58bdb3(0x7af)]!==_0x5aa653)continue;const _0x414f3b=_0x43770c[_0x58bdb3(0x749)]??_0x43770c[_0x58bdb3(0x686)]??0x0;if(_0x414f3b+(_0x43770c[_0x58bdb3(0x2cf)]??0x0)<_0x4933f2)continue;_0x4568e5[_0x58bdb3(0x5d8)](_0x54a054);}}catch{}return _0x4568e5;},_0x5d7933=_0x46d38b(this[_0x26a1b4(0x5e1)](_0x26a1b4(0x6f1))),_0x5d4d86=_0x46d38b(this[_0x26a1b4(0x5e1)](_0x26a1b4(0x481)));if(!_0x5d7933[_0x26a1b4(0x330)]&&!_0x5d4d86['length'])return null;return{'compact':_0x5d7933,'replicate':_0x5d4d86};}[_0x345d18(0x5e1)](_0x336b3e){const _0x1e0387=_0x345d18;if(!this[_0x1e0387(0x7c7)]?.[_0x1e0387(0x149)])return null;if(!this[_0x1e0387(0x38a)])this['_singletonLocks']=new Map();let _0xa9bd57=this['_singletonLocks'][_0x1e0387(0x294)](_0x336b3e);if(!_0xa9bd57)try{_0xa9bd57=new _0xfe1fca(this['okdb']['_rootDb'],{'namespace':_0x336b3e}),this[_0x1e0387(0x38a)]['set'](_0x336b3e,_0xa9bd57);}catch{return null;}return _0xa9bd57;}['_buildProcessingFacet'](){const _0x4786b9=_0x345d18,_0x3cbf89=[];try{for(const [_0x4e1fac,_0x1a61bc]of this[_0x4786b9(0x7c7)]['_envs']){if(_0x4e1fac[_0x4786b9(0x1a9)]('~'))continue;for(const _0x34c50d of _0x1a61bc[_0x4786b9(0x65a)][_0x4786b9(0x221)]())_0x3cbf89[_0x4786b9(0x5d8)]({..._0x34c50d,'env':_0x4e1fac});}}catch{}return{'participate':this['okdb'][_0x4786b9(0x19d)]?.[_0x4786b9(0x36f)]??![],'processors':_0x3cbf89};}[_0x345d18(0x633)](){const _0x2576f2=_0x345d18;if(this[_0x2576f2(0x6d3)])return!![];const _0x5afebf=this[_0x2576f2(0x7c7)]['_rootDb'];if(!_0x5afebf)return![];return this[_0x2576f2(0x6d3)]=_0x5afebf[_0x2576f2(0x228)](_0x4b0495,{'dupSort':![]}),this['_cmd']=_0x5afebf['openDB'](_0xbe7716,{'dupSort':![]}),!![];}async['_migrateVocab'](){const _0x3f57c8=_0x345d18;if(!this[_0x3f57c8(0x633)]())return;const _0x194b40=_0x3f57c8(0x25a),_0x20c842=0x1,_0x4fbe51=this['_desired'][_0x3f57c8(0x294)](_0x194b40)??0x0;if(_0x4fbe51>=_0x20c842)return;const _0x51b485=_0x50da78=>{const _0x2e4a2e=_0x3f57c8;if(_0x50da78===_0x2e4a2e(0x2b9))return _0x2e4a2e(0x5a0);if(_0x50da78===_0x2e4a2e(0x120))return _0x2e4a2e(0x278);return _0x50da78;};await this['okdb']['_systemEnv'][_0x3f57c8(0x37f)]['transaction'](()=>{const _0x3208e8=_0x3f57c8;for(const _0x2dedeb of[_0x3208e8(0x5f8),_0x3208e8(0x40e)]){for(const {key:_0x28abc2,value:_0x2220d0}of this[_0x3208e8(0x6d3)][_0x3208e8(0x5fb)]({'start':_0x2dedeb,'end':_0x2dedeb+'\xff'})){if(typeof _0x28abc2!=='string'||!_0x28abc2['startsWith'](_0x2dedeb))break;const _0x585314=_0x51b485(_0x2220d0[_0x3208e8(0x12d)]);if(_0x585314!==_0x2220d0[_0x3208e8(0x12d)])this[_0x3208e8(0x6d3)]['put'](_0x28abc2,{..._0x2220d0,'mode':_0x585314});}}this[_0x3208e8(0x6d3)]['put'](_0x194b40,_0x20c842);});}[_0x345d18(0x34c)](){const _0x44a470=_0x345d18;return!!this[_0x44a470(0x6d3)];}['getDesired'](_0x540902,_0x7fa89b){const _0x3f0b3e=_0x345d18;if(!this[_0x3f0b3e(0x633)]())return null;const _0x2c705d=_0x540902+'/'+_0x7fa89b;return this['_refreshDesiredSnapshot'](),this['_desiredOverlay'][_0x3f0b3e(0x294)](_0x2c705d)??this[_0x3f0b3e(0x6d3)][_0x3f0b3e(0x294)](_0x2c705d)??null;}[_0x345d18(0x6d1)](){const _0x2e3a12=_0x345d18;if(!_0x1b42d3)return;try{this['okdb'][_0x2e3a12(0x5e4)]?.['db']?.[_0x2e3a12(0x2e9)]?.();}catch{}}async[_0x345d18(0xde)](_0x364c17,_0x40d471,_0x7187e8){const _0x3784da=_0x345d18;if(!this[_0x3784da(0x633)]())return null;const _0x3408cc=_0x364c17+'/'+_0x40d471;this[_0x3784da(0x6d1)]();const _0x53ea77=this[_0x3784da(0x4d3)][_0x3784da(0x294)](_0x3408cc)??this[_0x3784da(0x6d3)]['get'](_0x3408cc)??{'version':0x0},_0x5b22b7=(_0x53ea77[_0x3784da(0x1ce)]||0x0)+0x1,_0x21283c={..._0x53ea77,..._0x7187e8,'version':_0x5b22b7,'updatedAt':Date[_0x3784da(0x556)]()};this[_0x3784da(0x4d3)][_0x3784da(0x3c0)](_0x3408cc,_0x21283c);try{await this[_0x3784da(0x7c7)]['_systemEnv']['_writer']['transaction'](()=>{const _0xbbd52f=_0x3784da;this[_0xbbd52f(0x6d3)][_0xbbd52f(0x359)](_0x3408cc,_0x21283c);});}finally{if(this[_0x3784da(0x4d3)][_0x3784da(0x294)](_0x3408cc)===_0x21283c)this[_0x3784da(0x4d3)][_0x3784da(0x539)](_0x3408cc);}return _0x5b22b7;}[_0x345d18(0x1ed)](_0x517f9f){const _0x4ed239=_0x345d18;if(!this['_ensureDesired']())return[];this[_0x4ed239(0x6d1)]();const _0x93f843=_0x517f9f+'/',_0x960911=[];for(const {key:_0x2da363,value:_0x39609c}of this[_0x4ed239(0x6d3)]['getRange']({'start':_0x93f843,'end':_0x93f843+'\xff'})){if(typeof _0x2da363!==_0x4ed239(0x1ae)||!_0x2da363[_0x4ed239(0x1a9)](_0x93f843))break;_0x960911['push']({'key':_0x2da363[_0x4ed239(0x333)](_0x93f843[_0x4ed239(0x330)]),'value':_0x39609c});}return _0x960911;}[_0x345d18(0x1e7)](_0x58344d){const _0x11c958=_0x345d18;if(!this[_0x11c958(0x633)]())return null;return this['_cmd'][_0x11c958(0x294)](_0x58344d)??null;}async[_0x345d18(0x6bf)](_0x494dd0,_0x533bfe,_0x246ae2={}){const _0x33e063=_0x345d18;if(!this[_0x33e063(0x633)]())return null;let _0x3a8eb9;return await this[_0x33e063(0x7c7)][_0x33e063(0x5e4)][_0x33e063(0x37f)][_0x33e063(0x605)](()=>{const _0x15c7c0=_0x33e063,_0x167792=this[_0x15c7c0(0x1ee)][_0x15c7c0(0x294)](_0x494dd0)||{'epoch':0x0};_0x3a8eb9=(_0x167792[_0x15c7c0(0x62c)]||0x0)+0x1,this['_cmd'][_0x15c7c0(0x359)](_0x494dd0,{..._0x167792,..._0x246ae2,'cmd':_0x533bfe,'epoch':_0x3a8eb9,'updatedAt':Date['now']()});}),_0x3a8eb9;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x4167b8,'nodeKey':_0x87a5f1,'logicalKey':_0xbf66d5,'slotKey':_0x24d8c6,'PROCESS_ENV':_0x330af0,'NODE_TYPE':_0x350718},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x28a0ab=_0x3f6c2b;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x47db7e=require$$0$6,{EVENTS:_0x6db0ec,CHANGE_ACTIONS:_0x45938b}=requireOkdbEnums(),{LOOP:_0x11992d}=requireOkdbLoopMonitor(),_0x5424c6=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x48258a=0x5,_0x3d8ede=0x2710;class _0xfe265f extends _0x47db7e{constructor(_0x2d2ded,_0x26cbbe={}){const _0x326331=_0x2ba0;super(),this['okdb']=_0x2d2ded,this[_0x326331(0x2df)]=_0x26cbbe[_0x326331(0x1d4)]??_0x5424c6,this[_0x326331(0x3b2)]=_0x26cbbe['flushDebounce']??_0x48258a,this[_0x326331(0x1d2)]=_0x26cbbe[_0x326331(0x5bb)]??_0x3d8ede,this[_0x326331(0x2c6)]=![],this[_0x326331(0x22f)]=new Map(),this[_0x326331(0x323)]=new Map(),this[_0x326331(0x525)]=new Map(),this[_0x326331(0x6c5)]=null,this['_draining']=![],this[_0x326331(0x7c2)]=new Set(),this[_0x326331(0x419)]=new Set(),this['_onItem']=_0xf87d48=>this[_0x326331(0x607)](_0xf87d48),this[_0x326331(0x59a)]=_0x27eb7d=>this[_0x326331(0x2a2)](_0x27eb7d),this['_onPoke']=_0xb7daaa=>this['_handlePoke'](_0xb7daaa),this[_0x326331(0x246)]=()=>this['stop']();}['start'](){const _0x335ee4=_0x2ba0;if(this[_0x335ee4(0x2c6)])return;this['_started']=!![];for(const [_0x32f1b6,_0x47caec]of this[_0x335ee4(0x7c7)][_0x335ee4(0x561)]){if(_0x32f1b6['startsWith']('~'))continue;try{_0x47caec[_0x335ee4(0x78c)]();}catch{}}for(const [_0x575375,_0x1ebd82]of this[_0x335ee4(0x7c7)]['_envs']){if(_0x575375[_0x335ee4(0x1a9)]('~'))continue;try{this['_baselines'][_0x335ee4(0x3c0)](_0x575375,_0x1ebd82[_0x335ee4(0x660)]()||0x0);}catch{}}const {events:_0x58a976}=this['okdb'];_0x58a976['on'](_0x6db0ec[_0x335ee4(0x2ba)],this[_0x335ee4(0x59a)]),_0x58a976['on'](_0x6db0ec[_0x335ee4(0x43b)],this[_0x335ee4(0x474)]),_0x58a976['on'](_0x6db0ec[_0x335ee4(0xe1)],this[_0x335ee4(0x474)]),_0x58a976['on'](_0x6db0ec[_0x335ee4(0x41a)],this['_onItem']),_0x58a976['on'](_0x6db0ec[_0x335ee4(0x131)],this[_0x335ee4(0x41c)]),_0x58a976[_0x335ee4(0x51b)](_0x6db0ec[_0x335ee4(0x512)],this[_0x335ee4(0x246)]);}[_0x28a0ab(0x57e)](){const _0x5c50a6=_0x28a0ab;if(!this[_0x5c50a6(0x2c6)])return;this[_0x5c50a6(0x2c6)]=![];const {events:_0x5dba93}=this[_0x5c50a6(0x7c7)];_0x5dba93[_0x5c50a6(0x77b)](_0x6db0ec['ITEM_PENDING'],this[_0x5c50a6(0x59a)]),_0x5dba93[_0x5c50a6(0x77b)](_0x6db0ec['ITEM_CREATE'],this[_0x5c50a6(0x474)]),_0x5dba93[_0x5c50a6(0x77b)](_0x6db0ec[_0x5c50a6(0xe1)],this[_0x5c50a6(0x474)]),_0x5dba93[_0x5c50a6(0x77b)](_0x6db0ec[_0x5c50a6(0x41a)],this[_0x5c50a6(0x474)]),_0x5dba93['off'](_0x6db0ec[_0x5c50a6(0x131)],this['_onPoke']);try{_0x5dba93[_0x5c50a6(0x77b)](_0x6db0ec['SYSTEM_STOPPED'],this['_onStop']);}catch{}this[_0x5c50a6(0x6c5)]&&(clearTimeout(this['_flushTimer']),this[_0x5c50a6(0x6c5)]=null),this['_pending'][_0x5c50a6(0x5d1)](),this[_0x5c50a6(0x22f)][_0x5c50a6(0x5d1)](),this[_0x5c50a6(0x323)][_0x5c50a6(0x5d1)](),this['_seen'][_0x5c50a6(0x5d1)](),this['_pendingLocal'][_0x5c50a6(0x5d1)]();}[_0x28a0ab(0x49b)](_0x53e388,_0x4b9ef0,_0x1d2f77,_0x5c08a7){return _0x53e388+'\x00'+_0x4b9ef0+'\x00'+_0x1d2f77+'\x00'+_0x5c08a7;}['_markSeen'](_0x5f1252,_0x41b54,_0xe3c165,_0x475272){const _0x3728d5=_0x28a0ab,_0x1aa162=this[_0x3728d5(0x49b)](_0x5f1252,_0x41b54,_0xe3c165,_0x475272);if(this[_0x3728d5(0x7c2)][_0x3728d5(0x229)](_0x1aa162))return![];this[_0x3728d5(0x7c2)][_0x3728d5(0x73d)](_0x1aa162);if(this[_0x3728d5(0x7c2)][_0x3728d5(0x6ca)]>this['_dedupeMax']){const _0x1e313e=this[_0x3728d5(0x7c2)][_0x3728d5(0x289)]()[_0x3728d5(0x75d)]()[_0x3728d5(0x4f8)];this[_0x3728d5(0x7c2)]['delete'](_0x1e313e);}return!![];}['_handlePending'](_0x290fd9){const _0x4b7b8b=_0x28a0ab;if(!this[_0x4b7b8b(0x2c6)]||!_0x290fd9)return;const {env:_0x5bdd83,type:_0x1bc015,key:_0x2d37a1,clock:_0x3ca48f}=_0x290fd9;if(_0x5bdd83==null||_0x1bc015==null||_0x2d37a1==null)return;if(typeof _0x5bdd83===_0x4b7b8b(0x1ae)&&_0x5bdd83[_0x4b7b8b(0x1a9)]('~'))return;if(typeof _0x1bc015===_0x4b7b8b(0x1ae)&&_0x1bc015[_0x4b7b8b(0x1a9)]('~'))return;this[_0x4b7b8b(0x419)][_0x4b7b8b(0x73d)](this['_dedupeKey'](_0x5bdd83,_0x1bc015,_0x2d37a1,_0x3ca48f)),this[_0x4b7b8b(0x419)][_0x4b7b8b(0x6ca)]>this[_0x4b7b8b(0x1d2)]&&this[_0x4b7b8b(0x419)][_0x4b7b8b(0x539)](this[_0x4b7b8b(0x419)][_0x4b7b8b(0x289)]()[_0x4b7b8b(0x75d)]()[_0x4b7b8b(0x4f8)]);}[_0x28a0ab(0x607)](_0x11b247){const _0x1c8b12=_0x28a0ab;if(!this[_0x1c8b12(0x2c6)]||!_0x11b247)return;const {env:_0x1bdcb2,type:_0x25e9f7,key:_0x16ed1d,clock:_0x3ee5d7,origin:_0x18250f,action:_0x1fc6a5,newValue:_0x8a131f,oldValue:_0x1b8da6}=_0x11b247;if(_0x1bdcb2==null||_0x25e9f7==null||_0x16ed1d==null)return;if(typeof _0x1bdcb2===_0x1c8b12(0x1ae)&&_0x1bdcb2[_0x1c8b12(0x1a9)]('~'))return;if(typeof _0x25e9f7===_0x1c8b12(0x1ae)&&_0x25e9f7[_0x1c8b12(0x1a9)]('~'))return;this['_pendingLocal'][_0x1c8b12(0x539)](this[_0x1c8b12(0x49b)](_0x1bdcb2,_0x25e9f7,_0x16ed1d,_0x3ee5d7));if(!this['_markSeen'](_0x1bdcb2,_0x25e9f7,_0x16ed1d,_0x3ee5d7))return;const _0x26bc24=_0x1fc6a5===_0x45938b[_0x1c8b12(0x781)]?_0x1c8b12(0x5e2):_0x1c8b12(0x359);this['emit'](_0x1c8b12(0x241),{'env':_0x1bdcb2,'type':_0x25e9f7,'key':_0x16ed1d,'op':_0x26bc24,'clock':_0x3ee5d7,'origin':_0x18250f,'value':_0x26bc24===_0x1c8b12(0x5e2)?null:_0x8a131f,'prevValue':_0x1b8da6});}[_0x28a0ab(0x2a7)](_0x32f35b){const _0x3e72d9=_0x28a0ab;if(!this[_0x3e72d9(0x2c6)])return;if(!_0x32f35b||typeof _0x32f35b[_0x3e72d9(0x52a)]!=='string'||typeof _0x32f35b[_0x3e72d9(0x101)]!=='string')return;const {env:_0x2e5a71,type:_0x52f29f}=_0x32f35b;if(_0x2e5a71[_0x3e72d9(0x1a9)]('~')||_0x52f29f[_0x3e72d9(0x1a9)]('~'))return;this[_0x3e72d9(0x525)]['set'](_0x2e5a71+'\x00'+_0x52f29f,{'env':_0x2e5a71,'type':_0x52f29f}),this[_0x3e72d9(0x500)]();}[_0x28a0ab(0x500)](){const _0x5d6662=_0x28a0ab;if(this['_flushTimer'])return;const _0x1c2390=()=>{const _0x2473b2=_0x2ba0;this[_0x2473b2(0x6c5)]=null,this[_0x2473b2(0x3d6)]()[_0x2473b2(0x290)](()=>{});};this[_0x5d6662(0x6c5)]=setTimeout(_0x1c2390,this[_0x5d6662(0x3b2)]>0x0?this[_0x5d6662(0x3b2)]:0x0);}async[_0x28a0ab(0x3d6)](){const _0x35fda7=_0x28a0ab;if(this[_0x35fda7(0x1c7)]){this[_0x35fda7(0x500)]();return;}this[_0x35fda7(0x1c7)]=!![];try{const _0x1be607=[...this[_0x35fda7(0x525)]['values']()];this['_pending'][_0x35fda7(0x5d1)]();let _0x2f78ce=![];for(const {env:_0x4e1315,type:_0x478547}of _0x1be607){try{const _0xad2f69=await this[_0x35fda7(0x3d1)](_0x4e1315,_0x478547);if(_0xad2f69)_0x2f78ce=!![];}catch{this['_pending']['set'](_0x4e1315+'\x00'+_0x478547,{'env':_0x4e1315,'type':_0x478547}),_0x2f78ce=!![];}}if(_0x2f78ce||this[_0x35fda7(0x525)][_0x35fda7(0x6ca)]>0x0)this[_0x35fda7(0x500)]();}finally{this['_draining']=![];}}async[_0x28a0ab(0x3d1)](_0xff8fdb,_0xaaf9d9){const _0x54a67e=_0x28a0ab,_0x487dc9=await this[_0x54a67e(0x7c7)]['_openEnvLazy'](_0xff8fdb),_0x47ceae=_0xff8fdb+'\x00'+_0xaaf9d9;!this[_0x54a67e(0x22f)][_0x54a67e(0x229)](_0x47ceae)&&(!this[_0x54a67e(0x323)][_0x54a67e(0x229)](_0xff8fdb)&&(_0x487dc9[_0x54a67e(0x78c)](),this[_0x54a67e(0x323)][_0x54a67e(0x3c0)](_0xff8fdb,_0x487dc9[_0x54a67e(0x660)]()||0x0)),this['_cursors'][_0x54a67e(0x3c0)](_0x47ceae,this[_0x54a67e(0x323)][_0x54a67e(0x294)](_0xff8fdb)));const _0x59a0c5=this[_0x54a67e(0x22f)][_0x54a67e(0x294)](_0x47ceae),_0x564dfc=_0x487dc9[_0x54a67e(0x660)](_0xaaf9d9)||0x0;if(_0x564dfc<=_0x59a0c5)return![];const _0x489731=_0x59a0c5+this[_0x54a67e(0x2df)],_0x246246=Math[_0x54a67e(0x2a6)](_0x564dfc,_0x489731),_0x5e0297=_0x11992d[_0x54a67e(0x22b)]?_0x11992d[_0x54a67e(0x556)]():0x0,_0x163a14=Array[_0x54a67e(0x309)](_0x487dc9[_0x54a67e(0x3e7)](_0xaaf9d9,_0x59a0c5+0x1,_0x246246));let _0x1114c1=_0x59a0c5;for(const _0x186986 of _0x163a14){const {clock:_0x33cdd7,key:_0x5c605a,action:_0x1468ab,origin:_0x58fa5c}=_0x186986;if(_0x33cdd7>_0x1114c1)_0x1114c1=_0x33cdd7;if(_0x5c605a==null)continue;if(this['_pendingLocal'][_0x54a67e(0x229)](this[_0x54a67e(0x49b)](_0xff8fdb,_0xaaf9d9,_0x5c605a,_0x33cdd7)))continue;if(!this['_markSeen'](_0xff8fdb,_0xaaf9d9,_0x5c605a,_0x33cdd7))continue;let _0x1981fb,_0x397575;if(_0x1468ab===_0x45938b[_0x54a67e(0x781)])_0x1981fb=_0x54a67e(0x5e2),_0x397575=null;else{const _0x4d60e2=_0x487dc9['get'](_0xaaf9d9,_0x5c605a);_0x4d60e2==null?(_0x1981fb=_0x54a67e(0x5e2),_0x397575=null):(_0x1981fb='put',_0x397575=_0x4d60e2);}this[_0x54a67e(0x11e)]('change',{'env':_0xff8fdb,'type':_0xaaf9d9,'key':_0x5c605a,'op':_0x1981fb,'clock':_0x33cdd7,'origin':_0x58fa5c,'value':_0x397575});}if(_0x11992d[_0x54a67e(0x22b)])_0x11992d[_0x54a67e(0x470)](_0x54a67e(0x720)+_0xff8fdb+':'+_0xaaf9d9,_0x11992d[_0x54a67e(0x556)]()-_0x5e0297,'n='+_0x163a14[_0x54a67e(0x330)]);return this['_cursors'][_0x54a67e(0x3c0)](_0x47ceae,Math['max'](_0x1114c1,_0x246246)),_0x487dc9['getClock'](_0xaaf9d9)>_0x246246;}[_0x28a0ab(0x41e)](){const _0x880d70=_0x28a0ab;return{'started':this[_0x880d70(0x2c6)],'quantum':this['_quantum'],'flushDebounce':this[_0x880d70(0x3b2)],'cursors':Object[_0x880d70(0x630)]([...this[_0x880d70(0x22f)][_0x880d70(0x45d)]()][_0x880d70(0x6d7)](([_0x384a7c,_0x487804])=>[_0x384a7c[_0x880d70(0x16b)]('\x00',':'),_0x487804])),'pending':this['_pending']['size'],'seen':this[_0x880d70(0x7c2)][_0x880d70(0x6ca)]};}}return _0xfe265f['CHANGEFEED_QUANTUM']=_0x5424c6,okdbChangefeed={'OKDBChangefeed':_0xfe265f},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x37360f=_0x3f6c2b;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x57f6ce=require$$1$1,_0x1355ab=require$$1,{EVENTS:_0x460db0}=requireOkdbEnums(),_0x99f09e=require$$0,{slotKey:_0x19bd8f}=requireOkdbProcessRegistry(),_0x453643=Number(process.env.OKDB_CLUSTER_RESPAWN_BACKOFF_MS)||0xfa,_0x10698d=0xfa0,_0x3bf30d=0x5,_0x37be30=0x2710,_0x468a20=0xbb8,_0x4eedfd=0x7d0,_0x4752bf=_0x37360f(0x299),_0x27f589='ephemeral',_0x3bd3ef=_0x37360f(0x515),_0x5a2b92=_0x37360f(0x613),_0x293c00=[_0x460db0[_0x37360f(0x308)],_0x460db0[_0x37360f(0x5ab)],_0x460db0[_0x37360f(0x47e)],_0x460db0['FTS_RESET'],_0x460db0[_0x37360f(0x5f6)],_0x460db0[_0x37360f(0x2e8)],_0x460db0[_0x37360f(0x4fc)],_0x460db0[_0x37360f(0x173)],_0x37360f(0x10c),_0x37360f(0x3e0),_0x37360f(0x5d5),'processor:paused',_0x37360f(0x648),_0x37360f(0x6eb)],_0xb8f2b3=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0,_0x4eb7de=0x64;function _0xe5c2b5(_0x199eba){const _0x44b990=_0x37360f;if(!_0x199eba)return _0x44b990(0x177);const _0x4de9bd=(_0x199eba['processors']||[])['map'](_0x55e2c9=>[_0x55e2c9[_0x44b990(0x52a)],_0x55e2c9['id'],_0x55e2c9['mode'],_0x55e2c9[_0x44b990(0x684)],!!_0x55e2c9[_0x44b990(0x751)],!!_0x55e2c9[_0x44b990(0x606)],!!_0x55e2c9[_0x44b990(0x72f)],_0x55e2c9[_0x44b990(0x266)]?.['pid']??null,_0x55e2c9[_0x44b990(0x5f2)]?String(_0x55e2c9[_0x44b990(0x5f2)]?.[_0x44b990(0x7b6)]??_0x55e2c9['error']):null]);return JSON[_0x44b990(0x1c5)]([!!_0x199eba['participate'],_0x4de9bd]);}function _0x5e0842({workers:_0x2b7b94,makeOkdb:_0x2d4b53,port:_0x5c3e77,primaryOkdb:_0x45684d,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0x542f0d=_0x37360f;if(_0x57f6ce[_0x542f0d(0x546)])return childEntry&&_0x57f6ce[_0x542f0d(0x4a2)]({'exec':_0x1355ab[_0x542f0d(0x3de)](__dirname,_0x542f0d(0x183)),'args':[],'execArgv':((()=>{const _0x166720=_0x542f0d,_0x3fe67f=[];for(let _0x437627=0x0;_0x437627<process['execArgv'][_0x166720(0x330)];_0x437627++){const _0x11930c=process[_0x166720(0x63b)][_0x437627];if(_0x11930c[_0x166720(0x1a9)](_0x166720(0x71d))||_0x11930c[_0x166720(0x1a9)](_0x166720(0x3ce))||_0x11930c[_0x166720(0x1a9)](_0x166720(0x49d)))continue;if(_0x11930c==='-e'||_0x11930c===_0x166720(0x2a8)||_0x11930c==='-p'||_0x11930c==='--print'){_0x437627++;continue;}_0x3fe67f[_0x166720(0x5d8)](_0x11930c);}return _0x3fe67f;})())}),_0x44f7b1({'workers':_0x2b7b94,'port':_0x5c3e77,'primaryOkdb':_0x45684d,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x5c3e77});return _0xb93963({'makeOkdb':_0x2d4b53,'port':_0x5c3e77});}function _0x44f7b1({workers:_0xca8aa3,port:_0x543002,primaryOkdb:_0x5eb393,workerEnv:_0x23c171,workerRole:_0x13b537,listenAddr:_0x4d132e}){const _0x217f84=_0x37360f,_0x20689a=new Map(),_0x270919=new Map();let _0x35dc8e=![];const _0x3185e8=_0x330e92=>_0x330e92?.[_0x217f84(0x5cd)],_0x48d479=_0xfd2328=>{const _0x2f9d1e=_0x217f84,_0x190d5d=_0x57f6ce[_0x2f9d1e(0x590)]({...process.env,..._0x23c171||{},'OKDB_CLUSTER_SLOT':String(_0xfd2328)});return _0x190d5d['__okdbSlot']=_0xfd2328,_0x20689a[_0x2f9d1e(0x3c0)](_0x190d5d[_0x2f9d1e(0x67e)][_0x2f9d1e(0x7af)],{'worker':_0x190d5d,'startedAt':Date[_0x2f9d1e(0x556)](),'slot':_0xfd2328}),_0x190d5d['on'](_0x2f9d1e(0x5f2),_0x84b538=>{const _0x4b8b84=_0x2f9d1e;console[_0x4b8b84(0x515)](_0x4b8b84(0x6e6)+_0x190d5d['process'][_0x4b8b84(0x7af)]+'\x20ipc\x20error:\x20'+(_0x84b538?.['message']??_0x84b538));}),_0x190d5d['on']('online',()=>_0x435531()),_0x190d5d;},_0x4852cb=_0x332916=>{const _0x13b8a5=_0x217f84;for(const {worker:_0x3b2278}of _0x20689a[_0x13b8a5(0x289)]()){if(_0x3b2278[_0x13b8a5(0x68c)]()||!_0x3b2278[_0x13b8a5(0x6bb)]())continue;try{_0x3b2278[_0x13b8a5(0x321)](_0x332916);}catch{}}};_0x5eb393?.[_0x217f84(0x486)]?.({'kind':_0x217f84(0x60d),'listenAddr':_0x4d132e})['catch'](()=>{}),_0x5eb393?.[_0x217f84(0x25f)]?.[_0x217f84(0x43a)]?.({'workersConfigured':_0xca8aa3});const _0x2fd19c={'engines':!![],'processors':!![],'compaction':!![],..._0x13b537,'http':!![]},_0x435531=()=>{const _0x45b35a=_0x217f84,_0x1a671a=_0x5eb393?.[_0x45b35a(0x25f)];if(!_0x1a671a||!_0x1a671a['_isWriter'])return;const _0x352cff=_0x1a671a[_0x45b35a(0x1b0)];for(const {worker:_0x4f4c2b,startedAt:_0x11f53c,slot:_0x2b5dd3,stats:_0x3e2a26,processing:_0x563f61}of _0x20689a[_0x45b35a(0x289)]()){if(_0x4f4c2b[_0x45b35a(0x68c)]())continue;const _0x3eb8ea=_0x1a671a[_0x45b35a(0x34c)]?.()&&_0x1a671a[_0x45b35a(0x3e5)]('slot',_0x13e790(_0x2b5dd3))?.[_0x45b35a(0xd2)]===!![];_0x1a671a['publishChildRow']({'pid':_0x4f4c2b[_0x45b35a(0x67e)][_0x45b35a(0x7af)],'startedAt':_0x11f53c,'kind':_0x45b35a(0x4d9),'supervisorKey':_0x352cff,'slot':_0x2b5dd3,'slotKey':_0x13e790(_0x2b5dd3),'role':_0x2fd19c,'listenAddr':_0x4d132e,'lifecycle':_0x3eb8ea?_0x45b35a(0x52e):_0x45b35a(0x1b7),'processing':_0x563f61??null,'stats':_0x3e2a26??null})[_0x45b35a(0x290)](()=>{});}},_0x13e790=_0x2d4da2=>_0x19bd8f('cluster:'+_0x543002,_0x2d4da2),_0x94ef19=_0x5c30b4=>{const _0x1eab23=_0x217f84,_0x3fd041=_0x5eb393?.[_0x1eab23(0x25f)];if(!_0x3fd041?.['hasDesired']?.())return![];return _0x3fd041[_0x1eab23(0x3e5)](_0x1eab23(0x53f),_0x13e790(_0x5c30b4))?.[_0x1eab23(0xd2)]===!![];};for(let _0x3466c7=0x0;_0x3466c7<_0xca8aa3;_0x3466c7++){const _0x483c2d=_0x94ef19(_0x3466c7);_0x270919['set'](_0x3466c7,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x483c2d,'respawnTimer':null}),_0x483c2d?console[_0x217f84(0x515)](_0x217f84(0x436)+_0x3466c7+_0x217f84(0x35f)):_0x48d479(_0x3466c7);}const _0x5137b5=()=>{const _0x15b608=_0x217f84,_0x2943bb=_0x5eb393?.[_0x15b608(0x25f)];if(!_0x2943bb?.['_isWriter']||!_0x2943bb[_0x15b608(0x34c)]?.())return;for(const [_0x167f17,_0x4ddf75]of _0x270919[_0x15b608(0x45d)]()){const _0x5cfa11=_0x2943bb[_0x15b608(0x3e5)](_0x15b608(0x53f),_0x13e790(_0x167f17)),_0x303048=_0x5cfa11?.[_0x15b608(0xd2)]===!![],_0x315827=_0x5cfa11?.[_0x15b608(0x65b)]===!![];if(_0x303048&&!_0x4ddf75[_0x15b608(0x547)]){_0x4ddf75[_0x15b608(0x547)]=!![];_0x4ddf75['respawnTimer']&&(clearTimeout(_0x4ddf75[_0x15b608(0x39e)]),_0x4ddf75[_0x15b608(0x39e)]=null);for(const {worker:_0x385070}of _0x20689a['values']()){if(_0x3185e8(_0x385070)!==_0x167f17||_0x385070[_0x15b608(0x68c)]())continue;try{if(_0x315827)_0x385070['process'][_0x15b608(0x65b)]('SIGKILL');else _0x385070[_0x15b608(0x6bb)]()&&_0x385070[_0x15b608(0x188)]();}catch{}}console[_0x15b608(0x515)](_0x15b608(0x3cf)+(_0x315827?_0x15b608(0x5d2):_0x15b608(0x13e))+_0x15b608(0x517)+_0x167f17+_0x15b608(0xe7));}else{if(!_0x303048&&_0x4ddf75[_0x15b608(0x547)]&&_0x5cfa11){_0x4ddf75['dead']=![],_0x4ddf75['deaths']=[],_0x4ddf75['consecutiveFailures']=0x0;const _0x2894b5=[..._0x20689a['values']()][_0x15b608(0x142)](({worker:_0xdfe89d})=>_0x3185e8(_0xdfe89d)===_0x167f17&&!_0xdfe89d[_0x15b608(0x68c)]());!_0x2894b5&&!_0x35dc8e&&(_0x48d479(_0x167f17),console[_0x15b608(0x515)](_0x15b608(0x757)+_0x167f17));}}}},_0x5929bf=()=>{try{_0x5137b5();}catch{}};_0x5eb393?.['events']?.['on']?.(_0x460db0['SYSTEM_PROC'],_0x5929bf);const _0x180002=[];if(_0x5eb393?.['events']?.['on'])for(const _0x5e3b80 of _0x293c00){const _0x45d4dc=_0x2529aa=>{_0x4852cb({[_0x4752bf]:_0x27f589,'event':_0x5e3b80,'data':_0x2529aa??{}});};_0x5eb393[_0x217f84(0x24e)]['on'](_0x5e3b80,_0x45d4dc),_0x180002[_0x217f84(0x5d8)]({'event':_0x5e3b80,'handler':_0x45d4dc});}const _0x59c592=setInterval(()=>{_0x5137b5(),_0x435531();},_0xb8f2b3);_0x59c592[_0x217f84(0x169)]?.();const _0x515668=(_0x59212d,_0xb09ac7)=>{const _0x1676d9=_0x217f84;if(!_0xb09ac7||typeof _0xb09ac7!==_0x1676d9(0x24d)||_0xb09ac7[_0x4752bf]!==_0x3bd3ef)return;if(!_0x5eb393?.[_0x1676d9(0x515)]?.[_0x1676d9(0x337)])return;const _0x4eca3c=_0xb09ac7[_0x1676d9(0x5d3)]||{};_0x5eb393[_0x1676d9(0x515)]['ingest']({..._0x4eca3c,'msg':'[w'+_0xb09ac7['slot']+']\x20'+(_0x4eca3c[_0x1676d9(0x17a)]??''),'meta':{..._0x4eca3c['meta']||{},'worker':_0xb09ac7[_0x1676d9(0x53f)],'workerPid':_0xb09ac7[_0x1676d9(0x7af)]}});};_0x57f6ce['on']('message',_0x515668);const _0x39b1a3=(_0x37a5e0,_0x1f9001)=>{const _0x1b5598=_0x217f84;if(!_0x1f9001||typeof _0x1f9001!=='object'||_0x1f9001[_0x4752bf]!==_0x5a2b92)return;const _0x3ef177=_0x20689a[_0x1b5598(0x294)](_0x37a5e0[_0x1b5598(0x67e)][_0x1b5598(0x7af)]);if(_0x3ef177){_0x3ef177[_0x1b5598(0x613)]={..._0x1f9001[_0x1b5598(0x613)],'at':Date[_0x1b5598(0x556)]()};if(_0x1f9001[_0x1b5598(0x5c5)]!==undefined){const _0x238a91=_0xe5c2b5(_0x1f9001[_0x1b5598(0x5c5)]);_0x238a91!==_0x3ef177[_0x1b5598(0x342)]&&(_0x3ef177[_0x1b5598(0x342)]=_0x238a91,_0x4178d2()),_0x3ef177[_0x1b5598(0x5c5)]=_0x1f9001['processing'];}}};let _0x4f603f=null;const _0x4178d2=()=>{const _0x1a8879=_0x217f84;if(_0x4f603f||_0x35dc8e)return;_0x4f603f=setTimeout(()=>{_0x4f603f=null;if(!_0x35dc8e)_0x435531();},_0x4eb7de),_0x4f603f[_0x1a8879(0x169)]?.();};_0x57f6ce['on'](_0x217f84(0x7b6),_0x39b1a3),_0x57f6ce['on'](_0x217f84(0x256),(_0x58076a,_0xecb2cf,_0x17e796)=>{const _0x706c4a=_0x217f84,_0x6555d5=_0x58076a[_0x706c4a(0x67e)][_0x706c4a(0x7af)],_0x5b7457=_0x3185e8(_0x58076a),_0x3f99b2=_0x20689a[_0x706c4a(0x294)](_0x6555d5);if(_0x3f99b2&&_0x5eb393?.['processes'])_0x5eb393['processes']['removeNode'](_0x6555d5+':'+_0x3f99b2['startedAt'])[_0x706c4a(0x290)](()=>{});_0x20689a[_0x706c4a(0x539)](_0x6555d5),console[_0x706c4a(0x515)]('[okdb-cluster]\x20worker\x20pid='+_0x6555d5+_0x706c4a(0x2b1)+(_0x5b7457??'?')+')\x20exited\x20'+(_0x706c4a(0x759)+_0xecb2cf+',\x20signal='+(_0x17e796??'none')+_0x706c4a(0x152)+_0x20689a[_0x706c4a(0x6ca)]+'\x20worker(s)\x20remaining')),_0x435531();if(_0x35dc8e||_0x5b7457==null)return;const _0x589191=_0x270919[_0x706c4a(0x294)](_0x5b7457);if(!_0x589191||_0x589191['dead'])return;const _0x28fa61=Date[_0x706c4a(0x556)]();_0x589191[_0x706c4a(0x3cc)][_0x706c4a(0x5d8)](_0x28fa61),_0x589191[_0x706c4a(0x3cc)]=_0x589191[_0x706c4a(0x3cc)]['filter'](_0x36ed33=>_0x28fa61-_0x36ed33<=_0x37be30);if(_0x589191['deaths']['length']>=_0x3bf30d){_0x589191[_0x706c4a(0x547)]=!![],console[_0x706c4a(0x5f2)](_0x706c4a(0x440)+_0x5b7457+_0x706c4a(0x4d1)+_0x589191[_0x706c4a(0x3cc)][_0x706c4a(0x330)]+_0x706c4a(0x7ab)+(_0x37be30+_0x706c4a(0x62d)+_0x20689a[_0x706c4a(0x6ca)]+_0x706c4a(0x4cf)));return;}_0x589191[_0x706c4a(0x100)]++;const _0x56a126=Math[_0x706c4a(0x2a6)](_0x10698d,_0x453643*0x2**(_0x589191[_0x706c4a(0x100)]-0x1));console[_0x706c4a(0x515)](_0x706c4a(0x2b7)+_0x5b7457+'\x20in\x20'+_0x56a126+_0x706c4a(0x3bf)+_0x589191['consecutiveFailures']+')'),_0x589191['respawnTimer']=setTimeout(()=>{const _0x2c443a=_0x706c4a;_0x589191[_0x2c443a(0x39e)]=null;if(_0x35dc8e||_0x589191[_0x2c443a(0x547)])return;const _0x214358=_0x48d479(_0x5b7457);_0x214358['once'](_0x2c443a(0x379),()=>{const _0x1ccfb1=_0x2c443a;if(_0x270919[_0x1ccfb1(0x294)](_0x5b7457)===_0x589191)_0x589191[_0x1ccfb1(0x100)]=0x0;});},_0x56a126),_0x589191['respawnTimer'][_0x706c4a(0x169)]?.();});const _0x3b8f64=[..._0x20689a[_0x217f84(0x434)]()];console['log']('[okdb-cluster]\x20primary\x20pid='+process[_0x217f84(0x7af)]+_0x217f84(0x29d)+_0xca8aa3+_0x217f84(0x2ae)+_0x543002+':\x20'+('['+_0x3b8f64['join'](',\x20')+']'));const _0x121eb8={'_isClusterController':!![],'port':_0x543002,'primaryOkdb':_0x5eb393??null,'status'(){const _0x504048=_0x217f84;return{'clustered':!![],'primaryPid':process[_0x504048(0x7af)],'port':_0x543002,'primaryRole':_0x5eb393?.[_0x504048(0x6e1)]??null,'processorPid':null,'supervisorPid':process[_0x504048(0x7af)],'workers':[..._0x20689a[_0x504048(0x289)]()]['map'](({worker:_0x58858f})=>({'pid':_0x58858f[_0x504048(0x67e)][_0x504048(0x7af)],'id':_0x58858f['id'],'dead':_0x58858f[_0x504048(0x68c)]()}))};},async 'close'(){const _0x55fa53=_0x217f84;_0x35dc8e=!![];for(const _0x5aeec9 of _0x270919[_0x55fa53(0x289)]()){_0x5aeec9[_0x55fa53(0x547)]=!![],_0x5aeec9['respawnTimer']&&(clearTimeout(_0x5aeec9[_0x55fa53(0x39e)]),_0x5aeec9[_0x55fa53(0x39e)]=null);}clearInterval(_0x59c592);_0x4f603f&&(clearTimeout(_0x4f603f),_0x4f603f=null);_0x57f6ce[_0x55fa53(0x77b)](_0x55fa53(0x7b6),_0x515668),_0x57f6ce['off'](_0x55fa53(0x7b6),_0x39b1a3),_0x5eb393?.[_0x55fa53(0x24e)]?.['off']?.(_0x460db0[_0x55fa53(0x3ac)],_0x5929bf);if(_0x5eb393?.[_0x55fa53(0x24e)]?.[_0x55fa53(0x77b)])for(const {event:_0x302328,handler:_0x20cffe}of _0x180002){try{_0x5eb393[_0x55fa53(0x24e)][_0x55fa53(0x77b)](_0x302328,_0x20cffe);}catch{}}_0x180002[_0x55fa53(0x330)]=0x0;const _0x371881=[..._0x20689a['values']()][_0x55fa53(0x6d7)](({worker:_0x5f4e67})=>_0x5f4e67);if(_0x371881['length']===0x0)return;await Promise[_0x55fa53(0x61b)](_0x371881['map'](_0x5e6b94=>new Promise(_0x3335cf=>{const _0x3501b5=_0x55fa53;if(_0x5e6b94[_0x3501b5(0x68c)]()){_0x3335cf();return;}let _0x166589=![];const _0x517472=()=>{if(_0x166589)return;_0x166589=!![];if(_0x5a3dce)clearTimeout(_0x5a3dce);_0x3335cf();};_0x5e6b94[_0x3501b5(0x51b)](_0x3501b5(0x256),_0x517472);const _0x5a3dce=setTimeout(()=>{const _0x3ae241=_0x3501b5;try{_0x5e6b94[_0x3ae241(0x67e)]['kill']();}catch{}},_0x468a20+0x1f4);_0x5a3dce[_0x3501b5(0x169)]?.();try{_0x5e6b94[_0x3501b5(0x188)]();}catch{try{_0x5e6b94[_0x3501b5(0x67e)][_0x3501b5(0x65b)]();}catch{}}})));}};return _0x121eb8;}async function _0xb93963({makeOkdb:_0x4e5179,port:_0x3069ab}){const _0x3da661=_0x37360f,_0x538905=await _0x4e5179();return _0x28c016(_0x538905),_0x538905['http'][_0x3da661(0xfd)](_0x3069ab);}function _0x28c016(_0x20322b){const _0x1a8bda=_0x37360f;if(!_0x20322b||_0x20322b['_clusterWorkerAttached'])return;_0x20322b[_0x1a8bda(0x3fa)]=!![];try{const {OKDBChangefeed:_0x3273a3}=requireOkdbChangefeed(),_0x54cef7=_0x20322b[_0x1a8bda(0x49c)];if(_0x54cef7&&typeof _0x54cef7[_0x1a8bda(0x446)]===_0x1a8bda(0x6c9)){const _0x37bae2=new _0x3273a3(_0x20322b);_0x37bae2[_0x1a8bda(0x4da)](),_0x54cef7[_0x1a8bda(0x446)](_0x37bae2),_0x20322b[_0x1a8bda(0x44d)]=_0x37bae2;}}catch(_0x4342d0){_0x20322b['log']?.['warn']?.('[okdb-cluster]\x20change-feed\x20init\x20failed:\x20'+(_0x4342d0?.[_0x1a8bda(0x7b6)]??_0x4342d0),{'feature':_0x1a8bda(0x335)});}const _0x5ebbe6=_0x26b76f=>{const _0x5c41ff=_0x1a8bda;if(!_0x26b76f||typeof _0x26b76f!==_0x5c41ff(0x24d)||_0x26b76f[_0x4752bf]==null)return;if(_0x26b76f[_0x4752bf]===_0x27f589)try{_0x20322b[_0x5c41ff(0x49c)]?.['pushEphemeral']?.(_0x26b76f[_0x5c41ff(0x304)],_0x26b76f[_0x5c41ff(0x29a)]);}catch{}};process['on'](_0x1a8bda(0x7b6),_0x5ebbe6),_0x20322b[_0x1a8bda(0x1bf)]=_0x5ebbe6;{let _0xaf4793=process[_0x1a8bda(0x423)](),_0x5d48cb=Date[_0x1a8bda(0x556)]();const _0x162193=()=>{const _0x395717=_0x1a8bda;if(typeof process[_0x395717(0x321)]!==_0x395717(0x6c9)||!process[_0x395717(0x538)])return;const _0x57fb81=Date[_0x395717(0x556)](),_0x3235ee=process['cpuUsage'](),_0x44931e=(_0x57fb81-_0x5d48cb)*0x3e8,_0x24c660=_0x3235ee['user']-_0xaf4793[_0x395717(0x109)]+(_0x3235ee[_0x395717(0x7c3)]-_0xaf4793[_0x395717(0x7c3)]),_0x2c9d48=_0x44931e>0x0?Math[_0x395717(0x2a6)](0x64,Math['round'](_0x24c660/(_0x44931e*(_0x99f09e[_0x395717(0x25d)]()[_0x395717(0x330)]||0x1))*0x64)):0x0;_0xaf4793=_0x3235ee,_0x5d48cb=_0x57fb81;const _0x313bed=process[_0x395717(0xc9)]();let _0x5183dc=null;try{_0x5183dc=_0x20322b[_0x395717(0x6e1)]?.[_0x395717(0x19d)]?_0x20322b[_0x395717(0x25f)]?.[_0x395717(0x4b7)]?.()??null:null;}catch{}try{process['send']({[_0x4752bf]:_0x5a2b92,'stats':{'rss':_0x313bed[_0x395717(0x639)],'heapUsed':_0x313bed['heapUsed'],'heapTotal':_0x313bed[_0x395717(0x3a6)],'external':_0x313bed['external'],'cpuPct':_0x2c9d48,'cpuWindowMs':Math['round'](_0x44931e/0x3e8)||null},'processing':_0x5183dc});}catch{}},_0xb10dbf=Math[_0x1a8bda(0x42f)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x5e11c8=setInterval(_0x162193,_0xb10dbf);_0x5e11c8[_0x1a8bda(0x169)]?.(),_0x162193();for(const _0xf65ad0 of[_0x1a8bda(0x7ce),_0x1a8bda(0x648)]){_0x20322b[_0x1a8bda(0x24e)]?.['on']?.(_0xf65ad0,()=>{try{_0x162193();}catch{}});}}let _0x3a4fdc=![];const _0x26c866=async _0x374e53=>{const _0x4902b1=_0x1a8bda;if(_0x3a4fdc)return;_0x3a4fdc=!![];const _0x20e31f=setTimeout(()=>process[_0x4902b1(0x256)](_0x374e53),_0x468a20);_0x20e31f[_0x4902b1(0x169)]?.();try{await _0x20322b['close']?.();}catch{}process[_0x4902b1(0x256)](_0x374e53);};process['on'](_0x1a8bda(0x188),()=>_0x26c866(0x0));if(process[_0x1a8bda(0x321)]&&!process[_0x1a8bda(0x538)])_0x26c866(0x0);if(process['platform']!==_0x1a8bda(0x369)){const _0x51b37c=setInterval(()=>{if(process['ppid']===0x1)_0x26c866(0x0);},_0x4eedfd);_0x51b37c['unref']?.(),_0x20322b[_0x1a8bda(0x212)]=_0x51b37c;}}return okdbCluster={'runClustered':_0x5e0842,'attachWorkerCluster':_0x28c016},okdbCluster;}var okdbHttp={'exports':{}},okdbMetrics,hasRequiredOkdbMetrics;function requireOkdbMetrics(){const _0x769f9=_0x3f6c2b;if(hasRequiredOkdbMetrics)return okdbMetrics;hasRequiredOkdbMetrics=0x1;const _0x100a90=0x3c;function _0xb368c1(){return{'requests':0x0,'reads':0x0,'writes':0x0,'errors':0x0,'readMs':0x0,'writeMs':0x0};}class _0x274dff{constructor(){const _0x2c7361=_0x2ba0;this[_0x2c7361(0x37e)]=0x0,this['_totalReads']=0x0,this[_0x2c7361(0x47d)]=0x0,this['_totalErrors']=0x0,this[_0x2c7361(0x19e)]=0x0,this[_0x2c7361(0x770)]=0x0,this['_buckets']=Array['from']({'length':_0x100a90},_0xb368c1),this[_0x2c7361(0x50d)]=0x0,this[_0x2c7361(0x640)]=Date['now'](),this[_0x2c7361(0x5f7)]=setInterval(()=>this[_0x2c7361(0x448)](),0x3e8);if(this[_0x2c7361(0x5f7)]['unref'])this[_0x2c7361(0x5f7)][_0x2c7361(0x169)]();}[_0x769f9(0x448)](){const _0xe1e696=_0x769f9;this[_0xe1e696(0x50d)]=(this[_0xe1e696(0x50d)]+0x1)%_0x100a90,this[_0xe1e696(0x30b)][this[_0xe1e696(0x50d)]]=_0xb368c1(),this[_0xe1e696(0x640)]=Date['now']();}[_0x769f9(0x5b9)](_0x15f062,_0x4ad745,_0x1a17a8){const _0x5d6b1c=_0x769f9,_0x516c67=/^(POST|PUT|PATCH|DELETE)$/i[_0x5d6b1c(0x3a9)](_0x15f062),_0x24d691=this[_0x5d6b1c(0x30b)][this[_0x5d6b1c(0x50d)]];this['_totalRequests']++,_0x24d691[_0x5d6b1c(0x65e)]++,_0x1a17a8&&(this[_0x5d6b1c(0x6c3)]++,_0x24d691[_0x5d6b1c(0x69e)]++),_0x516c67?(this[_0x5d6b1c(0x47d)]++,this['_totalWriteMs']+=_0x4ad745,_0x24d691[_0x5d6b1c(0x255)]++,_0x24d691[_0x5d6b1c(0x50b)]+=_0x4ad745):(this[_0x5d6b1c(0x477)]++,this['_totalReadMs']+=_0x4ad745,_0x24d691[_0x5d6b1c(0x6a2)]++,_0x24d691['readMs']+=_0x4ad745);}[_0x769f9(0x613)](){const _0x1df03d=_0x769f9;let _0x4913c5=0x0,_0x1f8563=0x0,_0x5357fd=0x0,_0x4f3f1e=0x0,_0x26564a=0x0,_0x458e4d=0x0;for(const _0xde8d39 of this[_0x1df03d(0x30b)]){_0x4913c5+=_0xde8d39[_0x1df03d(0x65e)],_0x1f8563+=_0xde8d39[_0x1df03d(0x6a2)],_0x5357fd+=_0xde8d39['writes'],_0x4f3f1e+=_0xde8d39[_0x1df03d(0x69e)],_0x26564a+=_0xde8d39[_0x1df03d(0x155)],_0x458e4d+=_0xde8d39[_0x1df03d(0x50b)];}const _0x1b07d0=_0x100a90;return{'lifetime':{'requests':this[_0x1df03d(0x37e)],'reads':this['_totalReads'],'writes':this[_0x1df03d(0x47d)],'errors':this[_0x1df03d(0x6c3)],'avgReadMs':this[_0x1df03d(0x477)]>0x0?+(this[_0x1df03d(0x19e)]/this[_0x1df03d(0x477)])[_0x1df03d(0xc6)](0x2):null,'avgWriteMs':this[_0x1df03d(0x47d)]>0x0?+(this[_0x1df03d(0x770)]/this[_0x1df03d(0x47d)])['toFixed'](0x2):null},'window':{'seconds':_0x1b07d0,'requests':_0x4913c5,'reads':_0x1f8563,'writes':_0x5357fd,'errors':_0x4f3f1e,'reqPerSec':+(_0x4913c5/_0x1b07d0)[_0x1df03d(0xc6)](0x2),'readPerSec':+(_0x1f8563/_0x1b07d0)['toFixed'](0x2),'writePerSec':+(_0x5357fd/_0x1b07d0)[_0x1df03d(0xc6)](0x2),'avgReadMs':_0x1f8563>0x0?+(_0x26564a/_0x1f8563)[_0x1df03d(0xc6)](0x2):null,'avgWriteMs':_0x5357fd>0x0?+(_0x458e4d/_0x5357fd)[_0x1df03d(0xc6)](0x2):null}};}['close'](){const _0x5afe86=_0x769f9;clearInterval(this[_0x5afe86(0x5f7)]);}}return okdbMetrics=_0x274dff,okdbMetrics;}var okdbAuthNamespaces,hasRequiredOkdbAuthNamespaces;function requireOkdbAuthNamespaces(){const _0x4bc5ce=_0x3f6c2b;if(hasRequiredOkdbAuthNamespaces)return okdbAuthNamespaces;hasRequiredOkdbAuthNamespaces=0x1;const _0x81dada={'data':{'label':_0x4bc5ce(0x728),'scope':_0x4bc5ce(0x52a),'description':_0x4bc5ce(0x799),'operations':{'read':{'label':_0x4bc5ce(0x53d),'summary':'Get\x20and\x20list\x20records,\x20run\x20byIndex\x20queries.'},'write':{'label':_0x4bc5ce(0x243),'summary':'Create,\x20update,\x20and\x20delete\x20records\x20(including\x20bulk\x20import).'}}},'schema':{'label':_0x4bc5ce(0x6a9),'scope':_0x4bc5ce(0x52a),'description':_0x4bc5ce(0x55a),'operations':{'read':{'label':_0x4bc5ce(0x53d),'summary':_0x4bc5ce(0x7a7)},'write':{'label':_0x4bc5ce(0x243),'summary':_0x4bc5ce(0x33f)}}},'search':{'label':_0x4bc5ce(0x21f),'scope':_0x4bc5ce(0x52a),'description':'Run\x20searches\x20against\x20registered\x20FTS\x20and\x20vector\x20indexes.','operations':{'query':{'label':'Query','summary':'Execute\x20full-text\x20and\x20vector\x20searches.'}}},'queue':{'label':'Queue','scope':_0x4bc5ce(0x52a),'description':_0x4bc5ce(0x1ba),'operations':{'read':{'label':_0x4bc5ce(0x53d),'summary':'List\x20jobs,\x20view\x20stats,\x20list\x20buckets.'},'write':{'label':_0x4bc5ce(0x243),'summary':_0x4bc5ce(0x3bc)},'work':{'label':_0x4bc5ce(0x259),'summary':'Worker-side:\x20claim,\x20heartbeat,\x20complete,\x20fail,\x20progress.'}}},'files':{'label':_0x4bc5ce(0x78f),'scope':_0x4bc5ce(0x52a),'description':_0x4bc5ce(0x50e),'operations':{'read':{'label':_0x4bc5ce(0x53d),'summary':'List,\x20download,\x20and\x20inspect\x20file\x20metadata.'},'write':{'label':_0x4bc5ce(0x243),'summary':_0x4bc5ce(0x268)}}},'functions':{'label':'Functions','scope':_0x4bc5ce(0x52a),'description':'Server-side\x20user-defined\x20functions\x20registered\x20per\x20environment.','operations':{'read':{'label':_0x4bc5ce(0x53d),'summary':_0x4bc5ce(0x23e)},'write':{'label':'Write','summary':_0x4bc5ce(0x2ca)},'run':{'label':_0x4bc5ce(0x116),'summary':_0x4bc5ce(0x717)}}},'views':{'label':_0x4bc5ce(0x721),'scope':_0x4bc5ce(0x52a),'description':_0x4bc5ce(0x373),'operations':{'read':{'label':_0x4bc5ce(0x53d),'summary':_0x4bc5ce(0x5d6)},'write':{'label':_0x4bc5ce(0x243),'summary':'Create\x20and\x20delete\x20views,\x20start,\x20stop,\x20and\x20rebuild\x20them.'}}},'env':{'label':_0x4bc5ce(0x6b1),'scope':_0x4bc5ce(0x52a),'description':_0x4bc5ce(0x485),'operations':{'read':{'label':_0x4bc5ce(0x53d),'summary':_0x4bc5ce(0x25c)},'write':{'label':'Write','summary':_0x4bc5ce(0x467)}}},'auth':{'label':_0x4bc5ce(0x582),'scope':_0x4bc5ce(0x7c3),'description':_0x4bc5ce(0x145),'operations':{'read':{'label':_0x4bc5ce(0x53d),'summary':_0x4bc5ce(0x6ce)},'write':{'label':_0x4bc5ce(0x243),'summary':_0x4bc5ce(0x71a)}}},'system':{'label':_0x4bc5ce(0x1be),'scope':'system','description':_0x4bc5ce(0x558),'operations':{'read':{'label':'Read','summary':_0x4bc5ce(0x543)},'write':{'label':_0x4bc5ce(0x243),'summary':'Pause/resume\x20processor,\x20trigger\x20backups,\x20restore.'}}},'sync':{'label':_0x4bc5ce(0x26b),'scope':_0x4bc5ce(0x7c3),'description':_0x4bc5ce(0x3a3),'operations':{'read':{'label':'Read','summary':_0x4bc5ce(0x46d)},'write':{'label':'Write','summary':'Register,\x20configure,\x20and\x20remove\x20cluster\x20peers.'},'peer':{'label':'Peer','summary':_0x4bc5ce(0x381),'machineOnly':!![]}}},'protected':{'label':_0x4bc5ce(0x346),'scope':_0x4bc5ce(0x78a),'description':_0x4bc5ce(0x595),'operations':{'read':{'label':_0x4bc5ce(0x53d),'summary':'May\x20read\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20read\x20permission.'},'write':{'label':_0x4bc5ce(0x243),'summary':_0x4bc5ce(0x17c)}}}},_0x1f5bb5={'schema:read':[_0x4bc5ce(0x5ec),_0x4bc5ce(0x5b4),_0x4bc5ce(0x15b)]},_0x33bba9=[_0x4bc5ce(0x3fe),_0x4bc5ce(0x12e),_0x4bc5ce(0x368),_0x4bc5ce(0x4c7),_0x4bc5ce(0x37b),'peer'];function _0x4c82d1(){const _0x565e8c=_0x4bc5ce,_0x845187=[];for(const [_0x1d6cc1,_0x4bd60c]of Object[_0x565e8c(0x45d)](_0x81dada)){for(const _0xc9578b of Object[_0x565e8c(0x434)](_0x4bd60c[_0x565e8c(0x26a)])){_0x845187[_0x565e8c(0x5d8)](_0x1d6cc1+':'+_0xc9578b);}}return _0x845187;}function _0x4a74dc(_0x52d2c9){return _0x81dada[_0x52d2c9]||null;}function _0x43ad5f(_0x412b00,_0x4b2c93){const _0x4ca90d=_0x4bc5ce;return _0x81dada[_0x412b00]?.[_0x4ca90d(0x26a)][_0x4b2c93]||null;}return okdbAuthNamespaces={'NAMESPACES':_0x81dada,'IMPLIED_BY':_0x1f5bb5,'OP_ORDER':_0x33bba9,'listAllPermissions':_0x4c82d1,'getNamespaceMeta':_0x4a74dc,'getOperationMeta':_0x43ad5f},okdbAuthNamespaces;}var okdbAuthPermissions,hasRequiredOkdbAuthPermissions;function requireOkdbAuthPermissions(){const _0xb23db5=_0x3f6c2b;if(hasRequiredOkdbAuthPermissions)return okdbAuthPermissions;hasRequiredOkdbAuthPermissions=0x1;const {IMPLIED_BY:_0x3b3aa9}=requireOkdbAuthNamespaces(),_0x27eaab=new Set([_0xb23db5(0x3fe),_0xb23db5(0x12e)]);function _0x389946(_0xc5dfa1,_0x3bc9ef){const _0x2280d0=_0xb23db5;if(!Array['isArray'](_0xc5dfa1)||_0xc5dfa1['length']===0x0)return![];for(const _0x1d1052 of _0xc5dfa1){if(typeof _0x1d1052!==_0x2280d0(0x1ae)||!_0x1d1052[_0x2280d0(0x4b0)](':')){if(_0x1d1052==='*')return!![];continue;}const [_0x14051a,_0x1332d6]=_0x1d1052[_0x2280d0(0x1e8)](':'),[_0x2e31df,_0x57c62e]=_0x3bc9ef[_0x2280d0(0x1e8)](':'),_0x20643c=_0x14051a==='*'||_0x14051a===_0x2e31df,_0x22cd95=_0x1332d6==='*'||_0x1332d6===_0x57c62e;if(_0x20643c&&_0x22cd95)return!![];}const _0x564096=_0x3b3aa9[_0x3bc9ef];if(_0x564096)for(const _0x5cacb5 of _0x564096){if(_0x389946(_0xc5dfa1,_0x5cacb5))return!![];}return![];}function _0x169b0e(_0xff50ec,_0x125cc4){const _0x377c20=_0xb23db5,_0x157c88=new Set();if(Array['isArray'](_0xff50ec)){for(const _0x15fc85 of _0xff50ec)_0x157c88[_0x377c20(0x73d)](_0x15fc85);}if(Array[_0x377c20(0x654)](_0x125cc4)){for(const _0xb10bd8 of _0x125cc4)_0x157c88[_0x377c20(0x73d)](_0xb10bd8);}return Array[_0x377c20(0x309)](_0x157c88);}function _0x55edc0(_0x13e5b7){const _0x5d3471=_0xb23db5;if(typeof _0x13e5b7!==_0x5d3471(0x1ae))return![];const [,_0xf50bfd]=_0x13e5b7[_0x5d3471(0x1e8)](':');return _0x27eaab[_0x5d3471(0x229)](_0xf50bfd);}function _0xc0ceb4(_0xd0b478){const _0x22b15b=_0xb23db5;return _0x55edc0(_0xd0b478)?_0x22b15b(0x1eb):_0x22b15b(0x196);}function _0x518b34(_0x4fc01c,_0x5a0da1){const _0x3b1464=_0xb23db5;return _0x169b0e(_0x4fc01c[_0x3b1464(0x39d)]||[],_0x5a0da1?(_0x4fc01c[_0x3b1464(0x117)]||{})[_0x5a0da1]||[]:[]);}function _0xba6a42(_0x234422){const _0x8d2f80=_0xb23db5,_0x122e27=[];for(const _0x549ecb of _0x234422[_0x8d2f80(0x70b)]()){const _0x5d5754=_0x549ecb[_0x8d2f80(0x472)]?.[_0x8d2f80(0x6e4)];if(!_0x5d5754)continue;_0x5d5754['authRequired']&&!_0x5d5754[_0x8d2f80(0x410)]&&_0x122e27['push'](_0x549ecb[_0x8d2f80(0x689)]+'\x20'+_0x549ecb[_0x8d2f80(0x58f)]+_0x8d2f80(0x643)+(_0x549ecb[_0x8d2f80(0x472)]['id']??'?')+')');}if(_0x122e27['length'])throw new Error(_0x8d2f80(0x571)+_0x122e27[_0x8d2f80(0x3de)](_0x8d2f80(0x12b)));}return okdbAuthPermissions={'hasPermission':_0x389946,'unionPermissions':_0x169b0e,'isReadOperation':_0x55edc0,'resolveProtectedGate':_0xc0ceb4,'getEffectivePermissions':_0x518b34,'assertEveryRouteHasPermission':_0xba6a42},okdbAuthPermissions;}var okdbJwtUtils,hasRequiredOkdbJwtUtils;function requireOkdbJwtUtils(){if(hasRequiredOkdbJwtUtils)return okdbJwtUtils;hasRequiredOkdbJwtUtils=0x1;const _0x3f86a1=require$$0$7,_0x11f0e6=require$$1$2,_0x1b2304=require$$2$1;function _0x3f4097(_0x4e4a73){const _0x59a5f0=_0x2ba0,_0x24d014=String(_0x4e4a73||'')[_0x59a5f0(0x16b)](/-/g,'+')[_0x59a5f0(0x16b)](/_/g,'/'),_0x349602=_0x24d014+'='['repeat']((0x4-(_0x24d014[_0x59a5f0(0x330)]%0x4||0x4))%0x4);return Buffer['from'](_0x349602,'base64');}function _0x1e1cca(_0x2fdc12){const _0x6c4436=_0x2ba0;if(typeof _0x2fdc12!==_0x6c4436(0x1ae))throw new Error('Invalid\x20token');const _0x4ebcbe=_0x2fdc12['split']('.');if(_0x4ebcbe[_0x6c4436(0x330)]!==0x3)throw new Error(_0x6c4436(0x2af));const [_0x1daf70,_0x5566f0,_0x254428]=_0x4ebcbe,_0x1bffb3=JSON[_0x6c4436(0x2e3)](_0x3f4097(_0x1daf70)[_0x6c4436(0x318)](_0x6c4436(0x3f0))),_0x2b2043=JSON['parse'](_0x3f4097(_0x5566f0)[_0x6c4436(0x318)]('utf8'));return{'header':_0x1bffb3,'payload':_0x2b2043,'signature':_0x3f4097(_0x254428),'signingInput':Buffer[_0x6c4436(0x309)](_0x1daf70+'.'+_0x5566f0),'encodedHeader':_0x1daf70,'encodedPayload':_0x5566f0};}function _0x278e71(_0x36d68d){if(Array['isArray'](_0x36d68d))return _0x36d68d;if(_0x36d68d==null)return[];return[_0x36d68d];}function _0x509df9(_0x587178){const _0xbaf793=_0x2ba0,_0x44217b=String(_0x587178||'')[_0xbaf793(0x4f2)](/.{1,64}/g)||[];return _0xbaf793(0x74f)+_0x44217b['join']('\x0a')+_0xbaf793(0x637);}function _0x4d6710(_0x26a4a8={}){const _0x51c2b8=_0x2ba0;if(_0x26a4a8[_0x51c2b8(0x30f)]?.[0x0])return _0x1b2304[_0x51c2b8(0x5e0)](_0x509df9(_0x26a4a8['x5c'][0x0]));return _0x1b2304[_0x51c2b8(0x5e0)]({'key':_0x26a4a8,'format':_0x51c2b8(0x27e)});}function _0x2ffd95(_0x46e031,_0x4e7550,_0x2c0f30,_0x3f2dae){const _0x27f0e4=_0x2ba0;if(_0x46e031==='RS256')return _0x1b2304[_0x27f0e4(0x3c2)](_0x27f0e4(0x473),_0x2c0f30,_0x4e7550,_0x3f2dae);if(_0x46e031===_0x27f0e4(0xc3))return _0x1b2304[_0x27f0e4(0x3c2)](_0x27f0e4(0x3b3),_0x2c0f30,{'key':_0x4e7550,'dsaEncoding':_0x27f0e4(0x3f2)},_0x3f2dae);return![];}function _0xbffc61(_0x316617){const _0x3f4475=_0x2ba0;if(typeof commonjsGlobal[_0x3f4475(0xd4)]===_0x3f4475(0x6c9))return commonjsGlobal[_0x3f4475(0xd4)](_0x316617,{'headers':{'accept':_0x3f4475(0x64f)}})[_0x3f4475(0x1dd)](async _0x144959=>{const _0x4a05f4=_0x3f4475;if(!_0x144959['ok']){const _0x1c07bb=new Error(_0x4a05f4(0xf5)+_0x144959['status']+_0x4a05f4(0x522)+_0x316617);_0x1c07bb[_0x4a05f4(0x41e)]=_0x144959['status'];throw _0x1c07bb;}return _0x144959[_0x4a05f4(0x502)]();});return new Promise((_0x112d32,_0x1b68f9)=>{const _0x16c397=_0x3f4475,_0x59036c=String(_0x316617)[_0x16c397(0x1a9)](_0x16c397(0x642))?_0x11f0e6:_0x3f86a1,_0x3531c7=_0x59036c['get'](_0x316617,{'headers':{'accept':_0x16c397(0x64f)}},_0x4d10a4=>{const _0x3b6964=_0x16c397;let _0x16b989='';_0x4d10a4[_0x3b6964(0x4ad)](_0x3b6964(0x3f0)),_0x4d10a4['on']('data',_0x127e76=>{_0x16b989+=_0x127e76;}),_0x4d10a4['on'](_0x3b6964(0x1bd),()=>{const _0x3c7003=_0x3b6964;if(_0x4d10a4['statusCode']<0xc8||_0x4d10a4['statusCode']>=0x12c){const _0x2bae4f=new Error('HTTP\x20'+_0x4d10a4[_0x3c7003(0x14b)]+_0x3c7003(0x522)+_0x316617);return _0x2bae4f['status']=_0x4d10a4['statusCode'],_0x1b68f9(_0x2bae4f);}try{_0x112d32(JSON[_0x3c7003(0x2e3)](_0x16b989||'{}'));}catch(_0x410787){_0x1b68f9(_0x410787);}});});_0x3531c7['on']('error',_0x1b68f9),_0x3531c7['end']();});}return okdbJwtUtils={'base64UrlDecode':_0x3f4097,'parseJwt':_0x1e1cca,'normalizeAudience':_0x278e71,'normalizePemCertificate':_0x509df9,'jwkToKeyObject':_0x4d6710,'verifyJwtSignature':_0x2ffd95,'fetchJson':_0xbffc61},okdbJwtUtils;}var hasRequiredOkdbHttp;function requireOkdbHttp(){const _0x1f8a51=_0x3f6c2b;if(hasRequiredOkdbHttp)return okdbHttp['exports'];hasRequiredOkdbHttp=0x1;const _0x148438=require$$0$7,{URL:_0x2906b0}=require$$2$2,_0x3aeabf=requireOkdbMetrics(),_0x1d5cc0=requireOkdbAuthTokens(),{hasPermission:_0x37e786,unionPermissions:_0x5e8d30,resolveProtectedGate:_0xf0a4dc}=requireOkdbAuthPermissions(),_0x1e2131={0x190:_0x1f8a51(0x4bd),0x191:_0x1f8a51(0x1a4),0x193:'FORBIDDEN',0x194:'NOT_FOUND',0x195:_0x1f8a51(0x18f),0x198:_0x1f8a51(0x46a),0x199:_0x1f8a51(0x1e9),0x19a:_0x1f8a51(0x31d),0x19b:'LENGTH_REQUIRED',0x19d:'PAYLOAD_TOO_LARGE',0x19f:_0x1f8a51(0x682),0x1a6:_0x1f8a51(0x214),0x1ad:_0x1f8a51(0x1fc),0x1f4:_0x1f8a51(0x51a),0x1f5:_0x1f8a51(0xf2),0x1f6:'BAD_GATEWAY',0x1f7:_0x1f8a51(0x1bc),0x1f8:_0x1f8a51(0x306)},_0x485bbf={'INVALID_VALUE':0x190,'BAD_CONFIG':0x190,'INVALID_PRIMARY_KEY':0x190,'INVALID_INDEX_KEY':0x190,'TYPE_NOT_REGISTERED':0x194,'INDEX_NOT_REGISTERED':0x194,'NOT_FOUND':0x194,'ALREADY_EXISTS':0x199,'VERSION_MISMATCH':0x199,'UNIQUE_CONSTRAINT':0x199,'TYPE_ALREADY_REGISTERED':0x199,'INDEX_ALREADY_REGISTERED':0x199,'FK_ERROR':0x199,'FK_DELETE_ERROR':0x199,'FOREIGN_KEY_VIOLATION':0x199,'FOREIGN_KEY_DELETE_RESTRICTED':0x199,'ENV_NOT_FOUND':0x194,'ENV_PROTECTED':0x193,'ENGINE_CONFIG_PATCH_UNSUPPORTED':0x190,'QUEUE_WORKER_JOB_TYPE_CONFLICT':0x199,'SCHEMA_VALIDATION_FAILED':0x1a6,'SCHEMA_COLLECTION_INVALID':0x199,'INVALID_SCHEMA':0x190,'QUERY_OPERATOR_FORBIDDEN':0x190,'BUCKET_CONFIG_INVALID':0x190,'BUCKET_INVALID_TIME_VALUE':0x1a6,'BUCKET_PROJECT_NOT_PERSISTABLE':0x190,'BUCKET_PROJECT_UNKNOWN':0x190,'VIEW_UNKNOWN_REDUCER':0x190,'RESERVED_VIEW_NAME':0x190,'VIEW_NOT_BUCKETED':0x190,'VIEW_NOT_FOUND':0x194,'VIEW_RANGE_GRANULARITY_MISMATCH':0x190,'VIEW_RANGE_GRANULARITY_REQUIRED':0x190,'VIEW_REF_UNSUPPORTED_REDUCER':0x190},{hmac:_0x4c9e00,timingSafeEqual:_0x5d149f,parseBearer:_0x5e56fa,randomToken:_0x153375,issueToken:_0x131436,authenticateToken:_0x4f98f4}=_0x1d5cc0,{base64UrlDecode:_0xd6a304,parseJwt:_0x3d91f4,normalizeAudience:_0x2e005b,normalizePemCertificate:_0x9926f8,jwkToKeyObject:_0x5b4e5c,verifyJwtSignature:_0x1e88e5,fetchJson:_0x4e85e2}=requireOkdbJwtUtils();function _0x1d3bd8(_0x91800d){const _0x974ec=_0x1f8a51;return(_0x91800d||_0x974ec(0x32b))[_0x974ec(0x52d)]();}function _0x273212(_0x2a4e75){const _0x26aafe=_0x1f8a51;if(Array[_0x26aafe(0x654)](_0x2a4e75))return _0x2a4e75[_0x26aafe(0x1ad)](_0x273212);return String(_0x2a4e75||'')[_0x26aafe(0x1e8)](',')[_0x26aafe(0x6d7)](_0x4c3507=>_0x4c3507[_0x26aafe(0x7ad)]())[_0x26aafe(0x64e)](Boolean);}function _0x331afb(..._0x458532){const _0x48bddf=_0x1f8a51;return[...new Set(_0x458532['flatMap'](_0x273212))][_0x48bddf(0x3de)](',\x20');}function _0x450d96(_0x3ced48,_0x5dd4bd){const _0x1b744b=_0x1f8a51;if(!_0x3ced48)return![];if(_0x5dd4bd==='*')return!![];if(_0x5dd4bd instanceof RegExp)return _0x5dd4bd[_0x1b744b(0x3a9)](_0x3ced48);if(typeof _0x5dd4bd===_0x1b744b(0x6c9))return!!_0x5dd4bd(_0x3ced48);if(Array[_0x1b744b(0x654)](_0x5dd4bd))return _0x5dd4bd[_0x1b744b(0x4b0)](_0x3ced48);return _0x5dd4bd===_0x3ced48;}function _0x4ab174(_0x480946={},_0x380cf7={},_0x1c8888=null){const _0xe166c2=_0x1f8a51;if(!_0x380cf7)return null;const _0x15105a=_0x480946[_0xe166c2(0x1d9)],_0x5b21de=_0x380cf7[_0xe166c2(0x506)]??_0x380cf7['origin']??'*',_0x1314d6=_0x5b21de==='*'?'*':_0x450d96(_0x15105a,_0x5b21de)?_0x15105a:null;if(!_0x1314d6)return null;const _0x503e1b=_0x480946[_0xe166c2(0x324)],_0x4537c2=_0x380cf7[_0xe166c2(0x59c)]??_0x380cf7[_0xe166c2(0x133)]??[_0xe166c2(0x202),'authorization',_0xe166c2(0x390),'last-event-id',_0xe166c2(0x326)],_0x50e37d=_0x380cf7['methods']??_0x380cf7[_0xe166c2(0x659)]??(_0x1c8888?[_0x1c8888,_0xe166c2(0x179)]:['GET','POST',_0xe166c2(0x179)]),_0x9f72f=_0x380cf7[_0xe166c2(0x36e)]??[_0xe166c2(0x390)],_0x3d0b92={'access-control-allow-origin':_0x1314d6,'access-control-allow-methods':Array[_0xe166c2(0x654)](_0x50e37d)?_0x50e37d[_0xe166c2(0x3de)](',\x20'):String(_0x50e37d),'access-control-allow-headers':_0x503e1b?_0x331afb(_0x4537c2,_0x503e1b):Array[_0xe166c2(0x654)](_0x4537c2)?_0x4537c2['join'](',\x20'):String(_0x4537c2),'access-control-expose-headers':Array['isArray'](_0x9f72f)?_0x9f72f[_0xe166c2(0x3de)](',\x20'):String(_0x9f72f),'vary':_0x331afb(_0xe166c2(0x6ae),_0x1314d6==='*'?'':_0xe166c2(0x6ae),_0x503e1b?_0xe166c2(0x21a):'')};if(_0x380cf7[_0xe166c2(0x76f)])_0x3d0b92[_0xe166c2(0x3ed)]=_0xe166c2(0x760);if(Number[_0xe166c2(0x645)](_0x380cf7[_0xe166c2(0x19a)]))_0x3d0b92[_0xe166c2(0x1c1)]=String(_0x380cf7[_0xe166c2(0x19a)]);return _0x3d0b92;}function _0x26cc43(_0x2db8be){const _0x3ee93d=_0x1f8a51,_0x18e341=[],_0x5a6574={};let _0x22f95a=![];_0x2db8be[_0x3ee93d(0x433)]('/*')&&(_0x22f95a=!![],_0x2db8be=_0x2db8be[_0x3ee93d(0x333)](0x0,-0x2),_0x18e341[_0x3ee93d(0x5d8)]('*'));let _0x419460=_0x2db8be[_0x3ee93d(0x16b)](/\/+$/,'')[_0x3ee93d(0x16b)](/\[([^\]]*)\]/g,(_0x447636,_0x3fa6ad)=>{const _0x31ae1a=_0x3ee93d,_0x2c24e7=_0x3fa6ad['replace'](/\/:(\w+)(?:=([^/\]\s]*))?/g,(_0x1d0dd4,_0x581b0f,_0x32222c)=>{const _0x1a5213=_0x2ba0;_0x18e341[_0x1a5213(0x5d8)](_0x581b0f);if(_0x32222c!==undefined)_0x5a6574[_0x581b0f]=_0x32222c;return _0x1a5213(0x2fc);});return _0x31ae1a(0x307)+_0x2c24e7+')?';})[_0x3ee93d(0x16b)](/\/:(\w+)/g,(_0x486e27,_0xf53d)=>{const _0x24bcbf=_0x3ee93d;return _0x18e341[_0x24bcbf(0x5d8)](_0xf53d),_0x24bcbf(0x2fc);});if(_0x419460==='')_0x419460='/';return{'keys':_0x18e341,'defaults':_0x5a6574,'wildcard':_0x22f95a,'regex':new RegExp(_0x22f95a?'^'+_0x419460+_0x3ee93d(0x698):'^'+_0x419460+'$')};}function _0x4e143d(_0x39e0b6){const _0x1857af=_0x1f8a51;if(_0x39e0b6==null)return _0x39e0b6;return JSON['parse'](JSON[_0x1857af(0x1c5)](_0x39e0b6));}function _0x37c81f(_0x161317){const _0x254d14=_0x1f8a51;if(_0x161317==null)return null;if(_0x161317[_0x254d14(0x101)]==='object'&&_0x161317[_0x254d14(0xd1)]&&!Array[_0x254d14(0x654)](_0x161317[_0x254d14(0xd1)]))return _0x4e143d(_0x161317);const _0xa1875f=Object['values'](_0x161317),_0x38beb4=_0xa1875f['length']>0x0&&_0xa1875f[_0x254d14(0x753)](_0x262ade=>{const _0x1c07f0=_0x254d14;return _0x262ade&&typeof _0x262ade===_0x1c07f0(0x24d)&&!Array[_0x1c07f0(0x654)](_0x262ade)&&(Object[_0x1c07f0(0x6aa)][_0x1c07f0(0x371)]['call'](_0x262ade,_0x1c07f0(0x101))||Object[_0x1c07f0(0x6aa)][_0x1c07f0(0x371)][_0x1c07f0(0x4fa)](_0x262ade,_0x1c07f0(0xd1))||Object[_0x1c07f0(0x6aa)]['hasOwnProperty'][_0x1c07f0(0x4fa)](_0x262ade,_0x1c07f0(0x21d))||Object[_0x1c07f0(0x6aa)][_0x1c07f0(0x371)][_0x1c07f0(0x4fa)](_0x262ade,_0x1c07f0(0x5c4)));});if(_0x38beb4)return{'type':_0x254d14(0x24d),'properties':_0x4e143d(_0x161317),'required':[],'additionalProperties':![]};const _0x8ccf0b={},_0x4ae506=[];for(const [_0x13462a,_0xf1d397]of Object[_0x254d14(0x45d)](_0x161317)){_0x8ccf0b[_0x13462a]=_0x12e887(_0xf1d397);if(_0xf1d397!==null&&_0xf1d397!==undefined)_0x4ae506['push'](_0x13462a);}return{'type':_0x254d14(0x24d),'properties':_0x8ccf0b,'required':_0x4ae506,'additionalProperties':![]};}function _0x12e887(_0x4fd317){const _0x472f07=_0x1f8a51;if(_0x4fd317===null)return{'type':[_0x472f07(0x177),_0x472f07(0x1ae),_0x472f07(0x4de),_0x472f07(0x140),'object',_0x472f07(0x10d)]};if(Array[_0x472f07(0x654)](_0x4fd317))return{'type':_0x472f07(0x10d),'items':_0x4fd317[_0x472f07(0x330)]>0x0?_0x12e887(_0x4fd317[0x0]):{}};switch(typeof _0x4fd317){case'string':return{'type':_0x472f07(0x1ae),'default':_0x4fd317};case'number':return{'type':Number['isInteger'](_0x4fd317)?_0x472f07(0x574):_0x472f07(0x4de),'default':_0x4fd317};case _0x472f07(0x140):return{'type':_0x472f07(0x140),'default':_0x4fd317};case _0x472f07(0x24d):{const _0x3b6968={};for(const [_0x3ecd67,_0x2852ef]of Object[_0x472f07(0x45d)](_0x4fd317))_0x3b6968[_0x3ecd67]=_0x12e887(_0x2852ef);return{'type':_0x472f07(0x24d),'properties':_0x3b6968,'additionalProperties':!![],'default':_0x4e143d(_0x4fd317)};}default:return{};}}function _0x2fbbb6(_0x351941,_0x225561){const _0x3bd5da=_0x1f8a51,_0x501ae4=[];for(const _0x55d811 of _0x225561[_0x3bd5da(0x434)]){if(_0x55d811==='*')continue;_0x501ae4[_0x3bd5da(0x5d8)]({'name':_0x55d811,'required':!Object[_0x3bd5da(0x6aa)][_0x3bd5da(0x371)][_0x3bd5da(0x4fa)](_0x225561['defaults'],_0x55d811),'default':_0x225561['defaults'][_0x55d811]});}return _0x501ae4;}function _0x2b6c58(_0x1284e8={},_0x258894){const _0x646bb6=_0x1f8a51,_0x47270b=_0x37c81f(_0x1284e8['http']?.['querySchema']??_0x1284e8[_0x646bb6(0x12e)]??null),_0x383ac4=_0x1284e8['http']?.[_0x646bb6(0x426)]??(_0x1284e8[_0x646bb6(0x20a)]?'raw':_0x258894[_0x646bb6(0x689)]==='GET'||_0x258894['method']===_0x646bb6(0x39c)?_0x646bb6(0x1c0):'remaining-fields');return{'querySchema':_0x47270b,'bodyMode':_0x383ac4,'bindings':_0x4e143d(_0x1284e8['http']?.[_0x646bb6(0x3cb)]??{}),'statuses':_0x4e143d(_0x1284e8['http']?.[_0x646bb6(0x761)]??(_0x1284e8[_0x646bb6(0x544)]||[])),'transport':_0x1284e8[_0x646bb6(0x36a)]?.[_0x646bb6(0x22a)]??(_0x1284e8[_0x646bb6(0x7ca)]?_0x646bb6(0x7ca):_0x1284e8[_0x646bb6(0x20a)]?_0x646bb6(0x20a):_0x646bb6(0x2cd)),'rawResponse':_0x1284e8['http']?.[_0x646bb6(0x63a)]??!!_0x1284e8['rawResponse'],'cors':_0x4e143d(_0x1284e8[_0x646bb6(0x36a)]?.['cors']??_0x1284e8['cors']??null)};}function _0x54bc79(_0x2fc6e6){const _0x9b5363=_0x1f8a51,_0x142278=_0x2fc6e6[_0x9b5363(0x740)]||{},_0x258e24=_0x2fbbb6(_0x2fc6e6[_0x9b5363(0x58f)],_0x2fc6e6[_0x9b5363(0x2cb)]),_0x17f15b=!!(_0x142278['id']||_0x142278[_0x9b5363(0x73e)]||_0x142278[_0x9b5363(0x357)]||_0x142278[_0x9b5363(0x36a)]||_0x142278['mcp']||_0x142278['cli']||_0x142278[_0x9b5363(0x6e4)]||_0x142278['safety']),_0x34009e=_0x2b6c58(_0x142278,_0x2fc6e6),_0x462582=_0x142278[_0x9b5363(0x73e)]?_0x4e143d(_0x142278['inputSchema']):null;return{'id':_0x142278['id']??null,'summary':_0x142278['summary']??null,'description':_0x142278[_0x9b5363(0x146)]??null,'tags':_0x4e143d(_0x142278[_0x9b5363(0x779)]??[]),'category':_0x142278[_0x9b5363(0x5cb)]??null,'safety':_0x4e143d(_0x142278[_0x9b5363(0x351)]??null),'access':_0x4e143d(_0x142278[_0x9b5363(0x6e4)]??null),'inputSchema':_0x462582,'outputSchema':_0x4e143d(_0x142278[_0x9b5363(0x357)]??null),'examples':_0x4e143d(_0x142278[_0x9b5363(0x5b1)]??[]),'pathParams':_0x258e24,'http':_0x34009e,'cli':_0x4e143d(_0x142278['cli']??null),'mcp':_0x4e143d(_0x142278[_0x9b5363(0x30c)]??null),'legacy':{'params':_0x4e143d(_0x142278[_0x9b5363(0x2fd)]??null),'query':_0x4e143d(_0x142278['query']??null),'body':_0x4e143d(_0x142278[_0x9b5363(0x4d2)]??null),'response':_0x4e143d(_0x142278[_0x9b5363(0x60b)]??null)},'transport':{'raw':!!_0x142278[_0x9b5363(0x20a)],'sse':!!_0x142278[_0x9b5363(0x7ca)],'rawResponse':!!_0x142278[_0x9b5363(0x63a)],'cors':_0x4e143d(_0x142278[_0x9b5363(0x4f1)]??null)},'hasCanonical':_0x17f15b};}function _0x296fa0(_0x4937a5,_0x3e74a2){const _0x3cba35=_0x1f8a51;if(!_0x3e74a2?.[_0x3cba35(0x4a6)])return;if(!_0x3e74a2[_0x3cba35(0x73e)]||_0x3e74a2[_0x3cba35(0x73e)]['type']!==_0x3cba35(0x24d)||!_0x3e74a2['inputSchema']['properties'])throw new Error(_0x3cba35(0x6dd)+_0x4937a5[_0x3cba35(0x689)]+'\x20'+_0x4937a5[_0x3cba35(0x58f)]+_0x3cba35(0x533));const _0x1055f2=_0x3e74a2[_0x3cba35(0x73e)][_0x3cba35(0xd1)]||{},_0xead79d=new Set(_0x3e74a2[_0x3cba35(0x43e)]['map'](_0x3a38bc=>_0x3a38bc['name'])),_0x4fdbf7=new Set(Object[_0x3cba35(0x434)](_0x3e74a2['http']?.['querySchema']?.[_0x3cba35(0xd1)]||{})),_0x1f2f96=new Set(Object['keys'](_0x3e74a2['http']?.[_0x3cba35(0x3cb)]||{}));for(const _0x11a79b of _0x3e74a2[_0x3cba35(0x43e)]){if(!_0x1055f2[_0x11a79b[_0x3cba35(0x339)]])throw new Error('Route\x20'+_0x4937a5[_0x3cba35(0x689)]+'\x20'+_0x4937a5[_0x3cba35(0x58f)]+_0x3cba35(0x115)+_0x11a79b[_0x3cba35(0x339)]);}for(const _0x464abe of _0x4fdbf7){if(!_0x1055f2[_0x464abe])throw new Error(_0x3cba35(0x6dd)+_0x4937a5[_0x3cba35(0x689)]+'\x20'+_0x4937a5[_0x3cba35(0x58f)]+_0x3cba35(0x459)+_0x464abe);}for(const _0x18af6a of _0x1f2f96){if(!_0x1055f2[_0x18af6a])throw new Error(_0x3cba35(0x6dd)+_0x4937a5['method']+'\x20'+_0x4937a5[_0x3cba35(0x58f)]+_0x3cba35(0x7d0)+_0x18af6a);}for(const _0x566065 of _0x1f2f96){if(_0xead79d['has'](_0x566065))throw new Error(_0x3cba35(0x6dd)+_0x4937a5['method']+'\x20'+_0x4937a5[_0x3cba35(0x58f)]+_0x3cba35(0x77a)+_0x566065);if(_0x4fdbf7['has'](_0x566065))throw new Error(_0x3cba35(0x6dd)+_0x4937a5[_0x3cba35(0x689)]+'\x20'+_0x4937a5['path']+'\x20has\x20ambiguous\x20binding\x20for\x20query\x20field:\x20'+_0x566065);const _0x582033=_0x3e74a2[_0x3cba35(0x36a)][_0x3cba35(0x3cb)][_0x566065];if(!/^params\.[A-Za-z0-9_*.-]+$/['test'](_0x582033)&&!/^query\.[A-Za-z0-9_*.-]+$/['test'](_0x582033)&&!/^body(?:\.[A-Za-z0-9_*.-]+)?$/[_0x3cba35(0x3a9)](_0x582033)&&!/^headers\.[A-Za-z0-9_*.-]+$/['test'](_0x582033))throw new Error(_0x3cba35(0x6dd)+_0x4937a5[_0x3cba35(0x689)]+'\x20'+_0x4937a5[_0x3cba35(0x58f)]+'\x20has\x20illegal\x20binding\x20target\x20for\x20'+_0x566065+':\x20'+_0x582033);}for(const _0x4c3628 of _0x4fdbf7){if(_0xead79d[_0x3cba35(0x229)](_0x4c3628))throw new Error('Route\x20'+_0x4937a5['method']+'\x20'+_0x4937a5['path']+_0x3cba35(0x696)+_0x4c3628);}const _0x1ea49f=_0x3e74a2[_0x3cba35(0x36a)]?.[_0x3cba35(0x426)],_0x1a7002=new Set([_0x3cba35(0x1c0),'remaining-fields','object',_0x3cba35(0x708),_0x3cba35(0x10d),_0x3cba35(0x20a)]);if(!_0x1a7002['has'](_0x1ea49f))throw new Error(_0x3cba35(0x6dd)+_0x4937a5[_0x3cba35(0x689)]+'\x20'+_0x4937a5['path']+_0x3cba35(0x244)+_0x1ea49f);if(_0x1ea49f===_0x3cba35(0x20a)&&!_0x4937a5[_0x3cba35(0x740)]?.[_0x3cba35(0x20a)])throw new Error('Route\x20'+_0x4937a5[_0x3cba35(0x689)]+'\x20'+_0x4937a5[_0x3cba35(0x58f)]+_0x3cba35(0x483));if(_0x3e74a2[_0x3cba35(0x30c)]?.[_0x3cba35(0x69c)]!==![]&&(_0x4937a5[_0x3cba35(0x740)]?.[_0x3cba35(0x20a)]||_0x4937a5[_0x3cba35(0x740)]?.[_0x3cba35(0x7ca)]||_0x3e74a2[_0x3cba35(0x36a)]?.['transport']==='stream'))throw new Error(_0x3cba35(0x6dd)+_0x4937a5[_0x3cba35(0x689)]+'\x20'+_0x4937a5[_0x3cba35(0x58f)]+'\x20cannot\x20be\x20MCP-exposed\x20without\x20an\x20explicit\x20adapter\x20because\x20it\x20uses\x20'+_0x3e74a2['http']?.[_0x3cba35(0x22a)]);const _0xf9bd1e=Object[_0x3cba35(0x434)](_0x1055f2)['filter'](_0x4faf45=>{const _0x2f08ef=_0x3cba35;if(_0xead79d[_0x2f08ef(0x229)](_0x4faf45))return![];if(_0x4fdbf7['has'](_0x4faf45))return![];if(_0x1f2f96[_0x2f08ef(0x229)](_0x4faf45))return![];return!![];});if(_0x1ea49f===_0x3cba35(0x1c0)&&_0xf9bd1e[_0x3cba35(0x330)]>0x0)throw new Error('Route\x20'+_0x4937a5[_0x3cba35(0x689)]+'\x20'+_0x4937a5[_0x3cba35(0x58f)]+_0x3cba35(0x6ed)+_0xf9bd1e['join'](',\x20'));if(_0x1ea49f==='array'&&_0xf9bd1e[_0x3cba35(0x64e)](_0x5bf271=>_0x5d8028(_0x1055f2[_0x5bf271],_0x3cba35(0x10d)))['length']!==0x1)throw new Error(_0x3cba35(0x6dd)+_0x4937a5[_0x3cba35(0x689)]+'\x20'+_0x4937a5[_0x3cba35(0x58f)]+'\x20uses\x20bodyMode:array\x20but\x20does\x20not\x20have\x20exactly\x20one\x20unbound\x20array\x20input\x20field');}function _0x18be05(_0x21668e,_0x1ce402,_0x11894a,_0x3b2bee){const _0x4003bf=_0x1f8a51;for(const [_0x537c13,_0x53ec80]of Object[_0x4003bf(0x45d)](_0x21668e)){if(_0x1ce402[_0x4003bf(0x229)](_0x537c13)||_0x11894a[_0x4003bf(0x229)](_0x537c13)||Object[_0x4003bf(0x6aa)][_0x4003bf(0x371)]['call'](_0x3b2bee,_0x537c13))continue;if(_0x5d8028(_0x53ec80,_0x4003bf(0x10d)))return _0x537c13;}return null;}function _0x105e7b(_0xb4d44d){if(Array['isArray'](_0xb4d44d))return _0xb4d44d;if(_0xb4d44d==null)return[];return[_0xb4d44d];}function _0x5d8028(_0x302c13,_0x2d46f6){const _0x112d08=_0x1f8a51;return _0x105e7b(_0x302c13?.['type'])[_0x112d08(0x4b0)](_0x2d46f6);}function _0x51c9b7(_0x90b5f6,_0x130aa8){const _0x36a732=_0x1f8a51;if(_0x90b5f6==null||typeof _0x90b5f6!==_0x36a732(0x1ae))return _0x90b5f6;const _0x72b9ee=_0x105e7b(_0x130aa8?.[_0x36a732(0x101)]);if(_0x72b9ee[_0x36a732(0x330)]===0x0)return _0x90b5f6;if(_0x72b9ee[_0x36a732(0x4b0)](_0x36a732(0x177))&&_0x90b5f6===_0x36a732(0x177))return null;if(_0x72b9ee[_0x36a732(0x4b0)](_0x36a732(0x140))){if(_0x90b5f6==='true')return!![];if(_0x90b5f6===_0x36a732(0x189))return![];}if(_0x72b9ee[_0x36a732(0x4b0)](_0x36a732(0x574))&&/^-?\d+$/[_0x36a732(0x3a9)](_0x90b5f6))return Number[_0x36a732(0xd9)](_0x90b5f6,0xa);if(_0x72b9ee[_0x36a732(0x4b0)](_0x36a732(0x4de))&&/^-?(?:\d+|\d*\.\d+)$/[_0x36a732(0x3a9)](_0x90b5f6))return Number(_0x90b5f6);return _0x90b5f6;}function _0x1c26fb(_0x4f3e77){return _0x4e143d(_0x4f3e77);}function _0x386053(_0x4b5a19,_0x345661={},_0x720c91={},_0x492f76=null,_0x505743={}){const _0x5e892a=_0x1f8a51,_0x48a2df=_0x4b5a19?.[_0x5e892a(0x472)];if(!_0x48a2df?.[_0x5e892a(0x4a6)]||!_0x48a2df[_0x5e892a(0x73e)])return null;const _0x211efc=_0x48a2df[_0x5e892a(0x73e)][_0x5e892a(0xd1)]||{},_0x39da58=_0x48a2df[_0x5e892a(0x36a)]?.[_0x5e892a(0x4f4)]?.['properties']||{},_0x2e253a=_0x48a2df['http']?.[_0x5e892a(0x3cb)]||{},_0x5ea414=new Set((_0x48a2df[_0x5e892a(0x43e)]||[])['map'](_0x462a6a=>_0x462a6a[_0x5e892a(0x339)])),_0x330c91=new Set(Object[_0x5e892a(0x434)](_0x39da58)),_0x2db96a={};for(const [_0x464677,_0x59def6]of Object[_0x5e892a(0x45d)](_0x211efc)){Object[_0x5e892a(0x6aa)][_0x5e892a(0x371)][_0x5e892a(0x4fa)](_0x59def6||{},_0x5e892a(0x5c4))&&(_0x2db96a[_0x464677]=_0x1c26fb(_0x59def6[_0x5e892a(0x5c4)]));}for(const _0x510dd4 of _0x48a2df[_0x5e892a(0x43e)]||[]){if(!Object[_0x5e892a(0x6aa)]['hasOwnProperty'][_0x5e892a(0x4fa)](_0x345661,_0x510dd4[_0x5e892a(0x339)]))continue;const _0x137117=_0x211efc[_0x510dd4[_0x5e892a(0x339)]]||{};_0x2db96a[_0x510dd4[_0x5e892a(0x339)]]=_0x51c9b7(_0x345661[_0x510dd4[_0x5e892a(0x339)]],_0x137117);}for(const [_0x1b6da2,_0x1f8bea]of Object[_0x5e892a(0x45d)](_0x39da58)){if(!Object[_0x5e892a(0x6aa)][_0x5e892a(0x371)][_0x5e892a(0x4fa)](_0x720c91,_0x1b6da2))continue;_0x2db96a[_0x1b6da2]=_0x51c9b7(_0x720c91[_0x1b6da2],_0x1f8bea||_0x211efc[_0x1b6da2]||{});}for(const [_0x1063ea,_0x233f0]of Object[_0x5e892a(0x45d)](_0x2e253a)){if(typeof _0x233f0!==_0x5e892a(0x1ae))continue;let _0x1719eb;if(_0x233f0[_0x5e892a(0x1a9)](_0x5e892a(0x6a7)))_0x1719eb=_0x345661[_0x233f0[_0x5e892a(0x333)](0x7)];else{if(_0x233f0[_0x5e892a(0x1a9)]('query.'))_0x1719eb=_0x720c91[_0x233f0[_0x5e892a(0x333)](0x6)];else{if(_0x233f0===_0x5e892a(0x4d2))_0x1719eb=_0x492f76;else{if(_0x233f0[_0x5e892a(0x1a9)](_0x5e892a(0x178)))_0x1719eb=_0x492f76?.[_0x233f0[_0x5e892a(0x333)](0x5)];else{if(_0x233f0[_0x5e892a(0x1a9)](_0x5e892a(0x76a)))_0x1719eb=_0x505743?.[_0x233f0[_0x5e892a(0x333)](0x8)[_0x5e892a(0x3af)]()]??_0x505743?.[_0x233f0[_0x5e892a(0x333)](0x8)];}}}}if(_0x1719eb!==undefined)_0x2db96a[_0x1063ea]=_0x1719eb;}const _0x30fb67=_0x48a2df[_0x5e892a(0x36a)]?.[_0x5e892a(0x426)];if(_0x30fb67!==_0x5e892a(0x1c0)&&_0x30fb67!==_0x5e892a(0x20a)&&_0x492f76!=null){if(_0x30fb67==='array'&&Array[_0x5e892a(0x654)](_0x492f76)){const _0x1665b0=_0x18be05(_0x211efc,_0x5ea414,_0x330c91,_0x2e253a);if(_0x1665b0)_0x2db96a[_0x1665b0]=_0x492f76;}else{if(_0x30fb67===_0x5e892a(0x24d))for(const [_0x3e6731,_0x203e1f]of Object['entries'](_0x211efc)){if(_0x5ea414[_0x5e892a(0x229)](_0x3e6731)||_0x330c91[_0x5e892a(0x229)](_0x3e6731)||Object[_0x5e892a(0x6aa)][_0x5e892a(0x371)][_0x5e892a(0x4fa)](_0x2e253a,_0x3e6731))continue;if(Object[_0x5e892a(0x6aa)]['hasOwnProperty'][_0x5e892a(0x4fa)](_0x492f76,_0x3e6731))_0x2db96a[_0x3e6731]=_0x492f76[_0x3e6731];else{if(_0x5d8028(_0x203e1f,'object'))_0x2db96a[_0x3e6731]=_0x492f76;}}else for(const [_0x29d8b9,_0xb4cae9]of Object[_0x5e892a(0x45d)](_0x492f76)){if(_0x5ea414[_0x5e892a(0x229)](_0x29d8b9)||_0x330c91[_0x5e892a(0x229)](_0x29d8b9)||Object[_0x5e892a(0x6aa)][_0x5e892a(0x371)][_0x5e892a(0x4fa)](_0x2e253a,_0x29d8b9))continue;_0x2db96a[_0x29d8b9]=_0xb4cae9;}}}return _0x2db96a;}function _0x5c7314(_0x114936,_0x1bfcbd,_0x18cedb,_0x46e8fe){const _0x56be82=_0x1f8a51;if(!_0x1bfcbd)return;const _0x28f00e=_0x105e7b(_0x1bfcbd[_0x56be82(0x101)]);if(_0x114936===undefined)return;if(_0x114936===null){_0x28f00e[_0x56be82(0x330)]>0x0&&!_0x28f00e['includes'](_0x56be82(0x177))&&_0x46e8fe[_0x56be82(0x5d8)]({'field':_0x18cedb,'message':'must\x20not\x20be\x20null','expected':_0x28f00e[_0x56be82(0x3de)]('|'),'actual':null});return;}if(_0x28f00e[_0x56be82(0x330)]===0x0)return;const _0x289d9d=_0x28f00e['some'](_0x175a4d=>{const _0x45acee=_0x56be82;switch(_0x175a4d){case _0x45acee(0x1ae):return typeof _0x114936===_0x45acee(0x1ae);case _0x45acee(0x574):return Number[_0x45acee(0x2b4)](_0x114936);case'number':return typeof _0x114936===_0x45acee(0x4de)&&Number[_0x45acee(0x645)](_0x114936);case _0x45acee(0x140):return typeof _0x114936==='boolean';case _0x45acee(0x24d):return _0x114936&&typeof _0x114936==='object'&&!Array[_0x45acee(0x654)](_0x114936);case'array':return Array[_0x45acee(0x654)](_0x114936);case'null':return _0x114936===null;default:return!![];}});if(!_0x289d9d){_0x46e8fe[_0x56be82(0x5d8)]({'field':_0x18cedb,'message':_0x56be82(0x201)+_0x28f00e['join']('|'),'expected':_0x28f00e[_0x56be82(0x3de)]('|'),'actual':_0x114936});return;}Array[_0x56be82(0x654)](_0x114936)&&_0x1bfcbd[_0x56be82(0x21d)]&&_0x114936['forEach']((_0xdd9bc5,_0x4d82b9)=>_0x5c7314(_0xdd9bc5,_0x1bfcbd[_0x56be82(0x21d)],_0x18cedb+'['+_0x4d82b9+']',_0x46e8fe));}function _0x298262(_0x317c0d,_0x4655b1){const _0x26dabe=_0x1f8a51,_0x49be59=_0x317c0d?.[_0x26dabe(0x472)];if(!_0x49be59?.[_0x26dabe(0x4a6)]||!_0x49be59[_0x26dabe(0x73e)])return null;const _0x4b1e10=_0x49be59[_0x26dabe(0x73e)],_0x9e5edd=_0x4b1e10[_0x26dabe(0xd1)]||{},_0x3374e9=new Set(_0x4b1e10[_0x26dabe(0x2f3)]||[]),_0x3a50e2=[];for(const _0x5dde35 of _0x3374e9){_0x4655b1[_0x5dde35]===undefined&&_0x3a50e2['push']({'field':_0x5dde35,'message':_0x26dabe(0x4fb),'expected':_0x26dabe(0x230),'actual':undefined});}if(_0x4b1e10[_0x26dabe(0x58a)]===![])for(const _0x75e033 of Object[_0x26dabe(0x434)](_0x4655b1||{})){!Object[_0x26dabe(0x6aa)]['hasOwnProperty'][_0x26dabe(0x4fa)](_0x9e5edd,_0x75e033)&&_0x3a50e2[_0x26dabe(0x5d8)]({'field':_0x75e033,'message':_0x26dabe(0x22c),'expected':_0x26dabe(0x14a),'actual':_0x4655b1[_0x75e033]});}for(const [_0x353223,_0x130afc]of Object[_0x26dabe(0x45d)](_0x9e5edd)){_0x5c7314(_0x4655b1[_0x353223],_0x130afc,_0x353223,_0x3a50e2);}if(_0x3a50e2[_0x26dabe(0x330)]===0x0)return null;return{'code':'VALIDATION_ERROR','errors':_0x3a50e2};}function _0x1c2e08(_0x497c2b=[]){const _0x568c2d=_0x1f8a51;if(!Array[_0x568c2d(0x654)](_0x497c2b)||_0x497c2b[_0x568c2d(0x330)]===0x0)return null;const _0x2555b1=_0x497c2b['slice'](0x0,0x3)[_0x568c2d(0x6d7)]((_0x4f1fe2={})=>{const _0x2d2479=_0x568c2d,_0x39d6f1=_0x4f1fe2[_0x2d2479(0x191)]?_0x4f1fe2[_0x2d2479(0x191)]+'\x20':'';return(''+_0x39d6f1+(_0x4f1fe2[_0x2d2479(0x7b6)]||_0x2d2479(0x1e3)))[_0x2d2479(0x7ad)]();})['join'](';\x20');return _0x497c2b[_0x568c2d(0x330)]>0x3?_0x2555b1+_0x568c2d(0x17f)+(_0x497c2b[_0x568c2d(0x330)]-0x3)+_0x568c2d(0xcd):_0x2555b1;}function _0x2f0918(_0x1a18b1,_0x4fa867={}){const _0x20f2f0=_0x1f8a51,_0x29335d=_0x4fa867?.[_0x20f2f0(0x404)]?.[_0x20f2f0(0x5f2)]??_0x4fa867?.[_0x20f2f0(0x5f2)]??_0x20f2f0(0x57a),_0x55ba63=_0x4fa867?.[_0x20f2f0(0x404)]?.[_0x20f2f0(0x7cf)]??_0x4fa867?.[_0x20f2f0(0x7cf)]??_0x29335d?.['details']??null,_0x245045=_0x4fa867?.[_0x20f2f0(0x404)]?.[_0x20f2f0(0x4bc)]??_0x4fa867?.[_0x20f2f0(0x4bc)]??_0x29335d?.['code']??null,_0x57765d=_0x4fa867?.['result']?.['message']??_0x4fa867?.[_0x20f2f0(0x7b6)]??_0x29335d?.['message']??null,_0x2488a0=typeof _0x29335d===_0x20f2f0(0x1ae)?_0x29335d:null,_0x3c0c9e=typeof _0x2488a0==='string'&&/^[A-Z0-9_]+$/[_0x20f2f0(0x3a9)](_0x2488a0),_0x591286=_0x245045??(_0x3c0c9e?_0x2488a0:null)??(_0x1e2131[_0x1a18b1]||_0x20f2f0(0x661)+_0x1a18b1);let _0x532efc=_0x57765d;!_0x532efc&&typeof _0x2488a0==='string'&&!_0x3c0c9e&&(_0x532efc=_0x2488a0);if(!_0x532efc&&_0x591286===_0x20f2f0(0x46c)){const _0x3817cd=_0x1c2e08(_0x55ba63);_0x532efc=_0x3817cd?_0x20f2f0(0x2d8)+_0x3817cd:_0x20f2f0(0x74e);}if(!_0x532efc&&Array[_0x20f2f0(0x654)](_0x55ba63)&&_0x55ba63['length']>0x0){const _0x3b58ea=_0x1c2e08(_0x55ba63);if(_0x3b58ea)_0x532efc=_0x3b58ea;}if(!_0x532efc)_0x532efc=_0x1e2131[_0x1a18b1]||_0x20f2f0(0x57a);const _0x37c9bc={'code':_0x591286,'message':_0x532efc};if(_0x55ba63!=null)_0x37c9bc[_0x20f2f0(0x7cf)]=_0x55ba63;return _0x37c9bc;}function _0x843a9a(_0x34271a){const _0x2b4fc1=_0x1f8a51,_0x1bd9e7={};if(!_0x34271a)return _0x1bd9e7;for(const _0x48789c of _0x34271a[_0x2b4fc1(0x1e8)](';')){const _0x59547a=_0x48789c['indexOf']('=');if(_0x59547a===-0x1)continue;const _0x17d0b5=_0x48789c[_0x2b4fc1(0x333)](0x0,_0x59547a)[_0x2b4fc1(0x7ad)](),_0xfd3880=_0x48789c[_0x2b4fc1(0x333)](_0x59547a+0x1)['trim']();_0x1bd9e7[_0x17d0b5]=decodeURIComponent(_0xfd3880);}return _0x1bd9e7;}function _0x5af339(_0x292763,_0x16b667){const _0x32abd1=_0x1f8a51;return _0x16b667=_0x179e11(_0x16b667),{'status':_0x16b667[_0x32abd1(0x41e)]??_0x292763[_0x32abd1(0x41e)],'headers':{..._0x292763['headers']||{},..._0x16b667[_0x32abd1(0x59c)]||{}},'body':_0x16b667[_0x32abd1(0x4d2)]??_0x292763[_0x32abd1(0x4d2)]};}function _0x2762f4(_0x5139e8={}){const _0x27de69=_0x1f8a51;return _0x5139e8[_0x27de69(0x22a)]||(_0x5139e8['internal']?_0x27de69(0x3dd):_0x27de69(0x36a));}function _0x1b42a2(_0x2abb21){const _0x578fdd=_0x1f8a51;if(_0x2abb21[_0x578fdd(0xf8)]?.[_0x578fdd(0x3dd)]===!![])return!![];if(_0x2abb21[_0x578fdd(0xf8)]?.['auth']?.[_0x578fdd(0x2c7)]===!![])return!![];if(_0x2abb21[_0x578fdd(0xf8)]?.[_0x578fdd(0x788)]?.['ok']===!![])return!![];return![];}function _0x5b4e15(_0x494540,_0x24a34c){const _0x37fa0c=_0x1f8a51,_0x4cf287=_0x24a34c[_0x37fa0c(0x1e8)]('.');let _0x2847a1=_0x494540;for(const _0x380e20 of _0x4cf287){_0x2847a1=_0x2847a1?.[_0x380e20];}return _0x2847a1||null;}class _0x4fc4db{constructor(){const _0x54c1dd=_0x1f8a51;this[_0x54c1dd(0x23f)]=[],this[_0x54c1dd(0x557)]=[],this[_0x54c1dd(0x662)]=[],this[_0x54c1dd(0x578)]=0x5*0x400*0x400,this[_0x54c1dd(0x43f)]=null,this[_0x54c1dd(0x121)]=[],this[_0x54c1dd(0xf1)]=new Set(),this[_0x54c1dd(0x788)]={'cookieName':'okdb_session','stateCookieName':'kdb_admin_oauth_state','csrfCookieName':_0x54c1dd(0x4e2)},this[_0x54c1dd(0x143)]={},this[_0x54c1dd(0x2d0)]=new Map(),this[_0x54c1dd(0x6c4)]=null,this['_jwksCache']=null,this[_0x54c1dd(0x2f2)]=new Map(),this[_0x54c1dd(0x5ca)]=new _0x3aeabf(),this['_userPhase']=![],this[_0x54c1dd(0x139)]=0x0;}[_0x1f8a51(0x653)](_0x41a504={}){const _0x558b55=_0x1f8a51;return this['_authOptions']=_0x41a504||{},this[_0x558b55(0x3d0)]=_0x41a504['mode']??_0x558b55(0x375),this[_0x558b55(0x143)];}get['isSetupMode'](){const _0x3109f1=_0x1f8a51;if(this[_0x3109f1(0x367)]?.['auth'])return this[_0x3109f1(0x367)][_0x3109f1(0x788)]['isSetupMode'];return![];}['getAuthOptions'](){const _0x3ca213=_0x1f8a51;if(this['_okdb']?.[_0x3ca213(0x788)])return this[_0x3ca213(0x367)][_0x3ca213(0x788)]['getAuthOptions']();return this[_0x3ca213(0x143)]||{};}[_0x1f8a51(0x20e)](_0x5c6eb5){const _0x44aef6=_0x1f8a51;this[_0x44aef6(0x23f)][_0x44aef6(0x5d8)](_0x5c6eb5);}[_0x1f8a51(0x12a)](_0x620194,_0xfafd97){const _0xab6c71=_0x1f8a51;this[_0xab6c71(0x557)][_0xab6c71(0x5d8)]({'match':_0x620194,'handler':_0xfafd97});}['add'](_0x1d8962,_0x1d115c,_0x2a3254,_0x112fe9={}){const _0x17bccd=_0x1f8a51,_0x56dfc5={'method':_0x1d3bd8(_0x1d8962),'path':_0x1d115c,'matcher':_0x26cc43(_0x1d115c),'handler':_0x2a3254,'meta':_0x112fe9||{}},_0xf3c959=_0x54bc79(_0x56dfc5);_0x296fa0(_0x56dfc5,_0xf3c959),_0x56dfc5[_0x17bccd(0x472)]=_0xf3c959,_0x56dfc5[_0x17bccd(0x798)]=this[_0x17bccd(0x535)]===!![];if(_0x56dfc5[_0x17bccd(0x798)])this[_0x17bccd(0x139)]++;this[_0x17bccd(0x662)][_0x17bccd(0x5d8)](_0x56dfc5);}[_0x1f8a51(0x4ef)](_0x555a7a,_0x13ce67,_0x5d3d25,_0x11507a={}){const _0x9b429a=_0x1f8a51;this[_0x9b429a(0x73d)](_0x555a7a,_0x13ce67,_0x5d3d25,{..._0x11507a,'raw':!![]});}[_0x1f8a51(0x405)](_0xb6c35d,_0x2e50b7,{corsOnly:corsOnly=![]}={}){const _0xa401d4=_0x1f8a51;let _0x3e99cf=null,_0x680e9c=Infinity;for(const _0x21a6b0 of this[_0xa401d4(0x662)]){if(corsOnly){if(!_0x21a6b0['meta']?.[_0xa401d4(0x4f1)])continue;}else{if(_0x21a6b0['method']!==_0xb6c35d)continue;}if(!_0x21a6b0['matcher'][_0xa401d4(0x38b)][_0xa401d4(0x3a9)](_0x2e50b7))continue;const _0x37c766=_0x21a6b0[_0xa401d4(0x2cb)][_0xa401d4(0x434)]?.[_0xa401d4(0x330)]??0x0;if(_0x37c766<_0x680e9c){_0x3e99cf=_0x21a6b0,_0x680e9c=_0x37c766;if(_0x37c766===0x0)break;}}return _0x3e99cf;}[_0x1f8a51(0x216)](_0x11944d,_0x4b73df){const _0x40d15f=_0x1f8a51,_0x1a62e0=_0x1d3bd8(_0x11944d),_0xf52937=this[_0x40d15f(0x405)](_0x1a62e0,_0x4b73df);if(_0xf52937)return _0xf52937;if(_0x1a62e0==='OPTIONS')return this['_bestMatch'](_0x1a62e0,_0x4b73df,{'corsOnly':!![]});return null;}[_0x1f8a51(0x4c1)](_0x3b89b4,_0x567ecf){const _0x499f58=_0x1f8a51;if(_0x3b89b4?.[_0x499f58(0x740)]?.[_0x499f58(0x63a)])return![];if(_0x567ecf?.[_0x499f58(0x59c)]?.[_0x499f58(0x184)])return![];return!![];}['listRoutes'](){const _0x39638a=_0x1f8a51;return this['routes'][_0x39638a(0x64e)](_0x584d1a=>!_0x584d1a['meta']?.[_0x39638a(0x18b)])['map'](_0x2dc9d5=>({'method':_0x2dc9d5[_0x39638a(0x689)],'path':_0x2dc9d5['path'],'defaults':_0x2dc9d5[_0x39638a(0x2cb)]['defaults'],'meta':_0x2dc9d5[_0x39638a(0x740)],'operation':_0x2dc9d5[_0x39638a(0x472)]}));}[_0x1f8a51(0x3e3)](_0x1e3e9d,_0x2115b9,_0x19ea7d={}){const _0x3cc41d=_0x1f8a51,{PassThrough:_0x1b90fa}=require$$5;this[_0x3cc41d(0x73d)](_0x3cc41d(0x32b),_0x1e3e9d,({params:_0x7009c1,query:_0x39b3b3,headers:_0x1d857a,context:_0x5101d1})=>{const _0x8679de=_0x3cc41d,_0x551618=new _0x1b90fa();let _0x300313=null;const _0x4001c1={};try{_0x5101d1?.[_0x8679de(0x6cf)]?.['socket']?.[_0x8679de(0x581)](!![]);}catch{}_0x551618['write'](_0x8679de(0x766)),_0x300313=setInterval(()=>{try{_0x551618['write'](':\x20ping\x0a\x0a');}catch{}},0x3a98);const _0x116973=(_0x5a05bc,_0x1abee2,_0x296e21={})=>{const _0x4be925=_0x8679de;try{const _0x3e5523=_0x296e21[_0x4be925(0x20a)]?String(_0x1abee2??''):JSON[_0x4be925(0x1c5)](_0x1abee2);_0x296e21['id']!=null&&_0x551618[_0x4be925(0x4c7)]('id:\x20'+_0x296e21['id']+'\x0a');_0x551618[_0x4be925(0x4c7)](_0x4be925(0x2db)+_0x5a05bc+'\x0a');for(const _0xef6c2a of _0x3e5523['split']('\x0a')){_0x551618['write']('data:\x20'+_0xef6c2a+'\x0a');}_0x551618[_0x4be925(0x4c7)]('\x0a');}catch{}},_0x5c4fa9=()=>{const _0x102cb8=_0x8679de;_0x300313&&(clearInterval(_0x300313),_0x300313=null);try{_0x551618[_0x102cb8(0x496)]();}catch{}},_0x3d5ad7=(_0x3b7e2c,_0x57b111)=>{_0x4001c1[_0x3b7e2c]=_0x57b111;};_0x5101d1?.[_0x8679de(0x6cf)]?.['on'](_0x8679de(0x57c),_0x5c4fa9),_0x551618['on']('close',_0x5c4fa9);if(_0x5101d1?.[_0x8679de(0x788)]&&_0x5101d1[_0x8679de(0x788)][_0x8679de(0x375)]!==!![]&&_0x5101d1[_0x8679de(0x788)][_0x8679de(0x2c7)]){const _0x582b4b={'headers':_0x1d857a??{},'cookies':_0x843a9a(_0x1d857a?.[_0x8679de(0x747)]),'context':{},'socket':_0x5101d1?.[_0x8679de(0x6cf)]?.['socket']??{'remoteAddress':null}},_0x212896=setInterval(async()=>{const _0x10116b=_0x8679de;try{const _0x27112b=await this[_0x10116b(0x163)](_0x582b4b);if(_0x27112b?.[_0x10116b(0x375)]===!![]||_0x27112b?.[_0x10116b(0x2c7)])return;_0x116973(_0x10116b(0x788),{'expired':!![]}),_0x5c4fa9();}catch{_0x5c4fa9();}},0xea60);_0x212896[_0x8679de(0x169)]?.(),_0x551618['on'](_0x8679de(0x57c),()=>clearInterval(_0x212896));}const _0x5c55dd=_0x2115b9({'send':_0x116973,'close':_0x5c4fa9,'params':_0x7009c1??{},'query':_0x39b3b3??{},'headers':_0x1d857a??{},'context':_0x5101d1,'setHeader':_0x3d5ad7});return typeof _0x5c55dd===_0x8679de(0x6c9)&&_0x551618['on'](_0x8679de(0x57c),_0x5c55dd),{'status':0xc8,'headers':{'content-type':_0x8679de(0x5c9),'cache-control':_0x8679de(0x23c),'connection':'keep-alive','x-accel-buffering':'no',..._0x4001c1},'body':_0x551618};},{..._0x19ea7d,'sse':!![]});}async['_runGuards'](_0x30d09d,_0x5c7d9c){const _0x26d11a=_0x1f8a51;for(const _0x230241 of this['guards']){if(!_0x230241[_0x26d11a(0x4f2)](_0x30d09d))continue;const _0x133bb4=await _0x230241[_0x26d11a(0x2cc)](_0x30d09d,_0x5c7d9c);if(_0x133bb4===![])return![];}return!![];}async[_0x1f8a51(0x5a9)](_0x447fc5,_0xe0023d,_0x2dae69){let _0x42817d=0x0;const _0x1ed3bf=async()=>{const _0x438654=this['middlewares'][_0x42817d++];if(!_0x438654)return _0x2dae69();return _0x438654(_0x447fc5,_0xe0023d,_0x1ed3bf);};return _0x1ed3bf();}['_wrapApiResponse'](_0x38e3cc,_0x52a210){const _0x1aa83c=_0x1f8a51,{status:status=0xc8,headers:headers={},body:_0x18ea1f}=_0x38e3cc;if(status>=0x12c&&status<0x190)return _0x38e3cc;if(_0x182f47(_0x18ea1f))return _0x38e3cc;if(Buffer[_0x1aa83c(0x671)](_0x18ea1f))return _0x38e3cc;if(typeof _0x18ea1f===_0x1aa83c(0x1ae))return _0x38e3cc;const _0x6c4c12={'time':+_0x52a210[_0x1aa83c(0xc6)](0x2)};if(_0x18ea1f?.['meta']&&typeof _0x18ea1f[_0x1aa83c(0x740)]===_0x1aa83c(0x24d)){const {time:_0x3f2956,..._0x43a953}=_0x18ea1f[_0x1aa83c(0x740)];Object[_0x1aa83c(0x14d)](_0x6c4c12,_0x43a953);}let _0x43b480;if(status>=0x190){const _0x513051=_0x2f0918(status,_0x18ea1f);_0x43b480={'data':null,'error':_0x513051,'meta':_0x6c4c12};}else{if(status===0xcc||_0x18ea1f==null)_0x43b480={'data':null,'error':null,'meta':_0x6c4c12};else{let _0x5df783;if(_0x1aa83c(0x404)in _0x18ea1f)_0x5df783=_0x18ea1f[_0x1aa83c(0x404)];else{const {meta:_0x5a02b6,..._0x5b9c83}=_0x18ea1f;_0x5df783=Object[_0x1aa83c(0x434)](_0x5b9c83)[_0x1aa83c(0x330)]>0x0?_0x5b9c83:null;}_0x43b480={'data':_0x5df783,'error':null,'meta':_0x6c4c12};}}return{'status':status===0xcc?0xc8:status,'headers':headers,'body':_0x43b480};}async[_0x1f8a51(0x2de)](_0x4d0505,_0x4d1143,_0x8743c9={},_0x4f0f5c={}){const _0x233ed0=_0x1f8a51;_0x4d0505=_0x1d3bd8(_0x4d0505);const _0x575213=this[_0x233ed0(0x216)](_0x4d0505,_0x4d1143),_0x102940={'method':_0x4d0505,'path':_0x4d1143,'headers':_0x8743c9[_0x233ed0(0x59c)]??{},'body':_0x8743c9[_0x233ed0(0x4d2)]??null,'query':_0x8743c9[_0x233ed0(0x12e)]??{},'context':_0x4f0f5c,'cookies':_0x843a9a(_0x8743c9[_0x233ed0(0x59c)]?.[_0x233ed0(0x747)]),'route':_0x575213,'socket':{'remoteAddress':_0x8743c9['remoteAddress']??_0x233ed0(0xc2)}};_0x102940['context']=_0x102940['context']||{};!_0x102940[_0x233ed0(0xf8)][_0x233ed0(0x788)]&&(_0x102940[_0x233ed0(0xf8)]['auth']=await this[_0x233ed0(0x163)](_0x102940));if(_0x102940[_0x233ed0(0xf8)][_0x233ed0(0x788)]?.[_0x233ed0(0x744)])return _0x179e11({'status':0x193,'body':{'error':{'code':_0x233ed0(0x4af),'message':'Server\x20is\x20in\x20bootstrap\x20mode\x20and\x20only\x20accepts\x20localhost\x20connections\x20until\x20the\x20first\x20token\x20is\x20created.'}}});_0x102940[_0x233ed0(0xf8)][_0x233ed0(0x788)]?.['user']&&!_0x102940[_0x233ed0(0xf8)][_0x233ed0(0x109)]&&(_0x102940['context'][_0x233ed0(0x109)]=_0x102940[_0x233ed0(0xf8)][_0x233ed0(0x788)]['user']);let _0x1e8023=null;const _0x11d8d5={'status'(_0x279d66){_0x1e8023=_0x1e8023||{},_0x1e8023['status']=_0x279d66;},'setHeader'(_0x2cb426,_0x553f6b){const _0x1808da=_0x233ed0;_0x1e8023=_0x1e8023||{},_0x1e8023['headers']=_0x1e8023[_0x1808da(0x59c)]||{};const _0x2cb31d=String(_0x2cb426)[_0x1808da(0x3af)]();if(_0x2cb31d===_0x1808da(0x2f7)){const _0x3b134b=_0x1e8023['headers'][_0x2cb426];if(!_0x3b134b)_0x1e8023[_0x1808da(0x59c)][_0x2cb426]=_0x553f6b;else{if(Array[_0x1808da(0x654)](_0x3b134b))_0x3b134b[_0x1808da(0x5d8)](_0x553f6b);else _0x1e8023['headers'][_0x2cb426]=[_0x3b134b,_0x553f6b];}return;}_0x1e8023['headers'][_0x2cb426]=_0x553f6b;},'send'(_0x4f4427){const _0x55cd4a=_0x233ed0;_0x1e8023=_0x1e8023||{},_0x1e8023[_0x55cd4a(0x4d2)]=_0x4f4427;}},_0x1757c7=await this['_runGuards'](_0x102940,_0x11d8d5);if(!_0x1757c7)return _0x179e11(_0x1e8023??{'status':0x193});const _0x148ea8=this['_enforceOperationAccess'](_0x102940);if(_0x148ea8)return _0x179e11(_0x148ea8);const _0xd146f5=this[_0x233ed0(0x658)](_0x102940);if(_0xd146f5)return _0x179e11(_0xd146f5);return await this[_0x233ed0(0x5a9)](_0x102940,_0x11d8d5,async()=>{const _0x12b014=_0x233ed0,_0x22fdcc=await this[_0x12b014(0x4f3)](_0x102940);if(_0x1e8023==null){_0x1e8023=_0x22fdcc;return;}_0x1e8023=_0x5af339(_0x1e8023,_0x22fdcc);}),_0x179e11(_0x1e8023);}[_0x1f8a51(0x43c)](_0x408367){const _0x35c0e2=_0x1f8a51,_0x2bd1ba=_0x408367['route']?.['operation'],_0x2749a1=_0x2bd1ba?.[_0x35c0e2(0x6e4)];if(!_0x2bd1ba?.[_0x35c0e2(0x4a6)]||!_0x2749a1)return null;if(_0x408367[_0x35c0e2(0xf8)]?.[_0x35c0e2(0x788)]?.[_0x35c0e2(0x375)]===!![]||_0x408367[_0x35c0e2(0xf8)]?.['auth']?.[_0x35c0e2(0x510)]===!![])return null;const _0x249061=_0x2762f4(_0x408367[_0x35c0e2(0xf8)]),_0x494c58=Array[_0x35c0e2(0x654)](_0x2749a1[_0x35c0e2(0x3ab)])?_0x2749a1[_0x35c0e2(0x3ab)]:null;if(_0x2749a1[_0x35c0e2(0x5fc)]&&_0x408367['context']?.[_0x35c0e2(0x3dd)]!==!![])return{'status':0x193,'body':{'error':'Forbidden'}};if(_0x494c58&&_0x494c58['length']>0x0&&!_0x494c58[_0x35c0e2(0x4b0)](_0x249061)&&!(_0x249061===_0x35c0e2(0x3dd)&&_0x494c58[_0x35c0e2(0x4b0)](_0x35c0e2(0x46e))))return{'status':0x193,'body':{'error':_0x35c0e2(0x735)}};if(_0x2749a1[_0x35c0e2(0x6d6)]&&!_0x1b42a2(_0x408367))return{'status':0x191,'body':{'error':_0x35c0e2(0x72b)}};const _0x2185b4=_0x2749a1['permission'];if(!_0x2185b4)return null;if(_0x408367[_0x35c0e2(0xf8)]?.[_0x35c0e2(0x788)]?.[_0x35c0e2(0x101)]===_0x35c0e2(0x363))return null;const _0x2f16f9=_0x408367[_0x35c0e2(0xf8)]?.['auth']?.[_0x35c0e2(0x2e5)];if(!_0x2f16f9){if(_0x408367[_0x35c0e2(0xf8)]?.[_0x35c0e2(0x788)]?.['ok']===!![])return null;return{'status':0x193,'body':{'error':_0x35c0e2(0x4a9)}};}if(!_0x408367[_0x35c0e2(0x2fd)]&&_0x408367[_0x35c0e2(0x170)]?.[_0x35c0e2(0x2cb)]){const _0x1e423f=_0x408367[_0x35c0e2(0x170)][_0x35c0e2(0x2cb)][_0x35c0e2(0x38b)]['exec'](_0x408367[_0x35c0e2(0x58f)]);_0x1e423f&&(_0x408367[_0x35c0e2(0x2fd)]={},_0x408367[_0x35c0e2(0x170)]['matcher'][_0x35c0e2(0x434)]['forEach']((_0x1d4bc7,_0x33c1a3)=>{const _0x231548=_0x35c0e2,_0xc12a6=_0x1e423f[_0x33c1a3+0x1];_0x408367[_0x231548(0x2fd)][_0x1d4bc7]=_0xc12a6?decodeURIComponent(_0xc12a6):_0x408367[_0x231548(0x170)][_0x231548(0x2cb)][_0x231548(0x417)][_0x1d4bc7]??undefined;}));}let _0x6c56aa=null;const _0x6afea4=_0x2749a1[_0x35c0e2(0x4f5)]===_0x35c0e2(0x52a)?_0x35c0e2(0x72e):_0x2749a1[_0x35c0e2(0x4f5)]?.[_0x35c0e2(0x52a)];_0x6afea4&&(_0x6c56aa=_0x5b4e15(_0x408367,_0x6afea4));if(_0x6c56aa&&_0x6c56aa[_0x35c0e2(0x1a9)]('~')){const _0x2bb135=_0xf0a4dc(_0x2185b4),_0x311ea3=_0x5e8d30(_0x2f16f9[_0x35c0e2(0x39d)]||[],(_0x2f16f9[_0x35c0e2(0x117)]||{})[_0x6c56aa]||[]);if(!_0x37e786(_0x311ea3,_0x2bb135))return{'status':0x193,'body':{'error':_0x35c0e2(0x509)+_0x2bb135+_0x35c0e2(0x3dc)}};}const _0x535081=_0x5e8d30(_0x2f16f9[_0x35c0e2(0x39d)]||[],_0x6c56aa?(_0x2f16f9[_0x35c0e2(0x117)]||{})[_0x6c56aa]||[]:[]);if(!_0x37e786(_0x535081,_0x2185b4))return{'status':0x193,'body':{'error':'Forbidden\x20—\x20requires\x20'+_0x2185b4}};return null;}[_0x1f8a51(0x658)](_0x344c92){const _0x28af7c=_0x1f8a51,_0x40a321=_0x344c92[_0x28af7c(0x170)],_0x3ba469=_0x40a321?.['operation'];if(!_0x3ba469?.[_0x28af7c(0x4a6)]||!_0x3ba469[_0x28af7c(0x73e)])return null;let _0x35a8bd=_0x344c92['params']??null;if(!_0x35a8bd&&_0x40a321?.['matcher']){const _0x27b0e4=_0x40a321[_0x28af7c(0x2cb)]['regex'][_0x28af7c(0x1f8)](_0x344c92[_0x28af7c(0x58f)]);_0x27b0e4&&(_0x35a8bd={},_0x40a321[_0x28af7c(0x2cb)][_0x28af7c(0x434)][_0x28af7c(0x38d)]((_0x5ae3df,_0x3f232d)=>{const _0x117cfa=_0x28af7c,_0x32bd8f=_0x27b0e4[_0x3f232d+0x1];_0x35a8bd[_0x5ae3df]=_0x32bd8f?decodeURIComponent(_0x32bd8f):_0x40a321['matcher'][_0x117cfa(0x417)][_0x5ae3df]??undefined;}));}const _0x4c362c=_0x386053(_0x40a321,_0x35a8bd??{},_0x344c92[_0x28af7c(0x12e)]??{},_0x344c92[_0x28af7c(0x4d2)],_0x344c92['headers']??{}),_0x77d0fc=_0x298262(_0x40a321,_0x4c362c||{});if(!_0x77d0fc)return null;const _0x5ac9cf=_0x1c2e08(_0x77d0fc['errors']);return{'status':0x190,'body':{'error':_0x77d0fc[_0x28af7c(0x4bc)],'code':_0x77d0fc[_0x28af7c(0x4bc)],'message':_0x5ac9cf?'Validation\x20failed:\x20'+_0x5ac9cf:_0x28af7c(0x74e),'details':_0x77d0fc[_0x28af7c(0x69e)]}};}['validateRouteInput'](_0x8eb320,_0x49c77e){const _0x26d68f=_0x1f8a51,_0x5ab4ef=_0x298262(_0x8eb320,_0x49c77e||{});if(!_0x5ab4ef)return null;return{'code':_0x5ab4ef[_0x26d68f(0x4bc)],'message':_0x1c2e08(_0x5ab4ef['errors'])?_0x26d68f(0x2d8)+_0x1c2e08(_0x5ab4ef[_0x26d68f(0x69e)]):_0x26d68f(0x74e),'details':_0x5ab4ef[_0x26d68f(0x69e)]};}async[_0x1f8a51(0x4f3)](_0x328f16){const _0x3232ef=_0x1f8a51;if(_0x328f16[_0x3232ef(0x689)]==='OPTIONS'){const _0x46b83b=this[_0x3232ef(0x405)](_0x3232ef(0x179),_0x328f16[_0x3232ef(0x58f)],{'corsOnly':!![]});if(_0x46b83b)return{'status':0xcc,'headers':_0x4ab174(_0x328f16[_0x3232ef(0x59c)],_0x46b83b[_0x3232ef(0x740)][_0x3232ef(0x4f1)],_0x46b83b[_0x3232ef(0x689)])||{}};}const _0x1a2ce2=this[_0x3232ef(0x405)](_0x328f16[_0x3232ef(0x689)],_0x328f16[_0x3232ef(0x58f)]);if(_0x1a2ce2){const _0x45efac=_0x1a2ce2[_0x3232ef(0x2cb)][_0x3232ef(0x38b)][_0x3232ef(0x1f8)](_0x328f16[_0x3232ef(0x58f)]),_0x372cad={};_0x1a2ce2['matcher'][_0x3232ef(0x434)][_0x3232ef(0x38d)]((_0x169f09,_0x5c24b3)=>{const _0x48e0a0=_0x3232ef,_0x272829=_0x45efac[_0x5c24b3+0x1];_0x372cad[_0x169f09]=_0x272829?decodeURIComponent(_0x272829):_0x1a2ce2['matcher'][_0x48e0a0(0x417)][_0x169f09]??undefined;}),_0x328f16[_0x3232ef(0x2fd)]=_0x372cad;try{const _0x35e051=await _0x1a2ce2[_0x3232ef(0x2cc)]({'params':_0x372cad,'body':_0x328f16[_0x3232ef(0x4d2)],'query':_0x328f16[_0x3232ef(0x12e)],'headers':_0x328f16['headers'],'context':_0x328f16[_0x3232ef(0xf8)]}),_0x545b60=_0x179e11(_0x35e051),_0x5a5f26=_0x4ab174(_0x328f16[_0x3232ef(0x59c)],_0x1a2ce2[_0x3232ef(0x740)]?.[_0x3232ef(0x4f1)],_0x1a2ce2['method']);if(!_0x5a5f26)return _0x545b60;return{..._0x545b60,'headers':{..._0x545b60[_0x3232ef(0x59c)]||{},..._0x5a5f26}};}catch(_0x37b3e0){const _0x14c09d=_0x37b3e0?.[_0x3232ef(0x41e)]||_0x485bbf[_0x37b3e0?.[_0x3232ef(0x4bc)]]||0x1f4;return{'status':_0x14c09d,'body':{'error':_0x37b3e0[_0x3232ef(0x7b6)]||_0x3232ef(0x6d4),'code':_0x37b3e0?.[_0x3232ef(0x4bc)]||_0x1e2131[_0x14c09d]||_0x3232ef(0x661)+_0x14c09d,'message':_0x37b3e0?.[_0x3232ef(0x7b6)]||'Internal\x20error',..._0x37b3e0?.[_0x3232ef(0x7cf)]!=null?{'details':_0x37b3e0['details']}:{}}};}}return{'status':0x194,'body':{'error':_0x3232ef(0x6fc)}};}[_0x1f8a51(0xfd)](_0x33b083,_0x213f73={}){const _0x9d8757=_0x1f8a51;if(typeof _0x213f73===_0x9d8757(0x1ae)||Array['isArray'](_0x213f73))_0x213f73={'host':_0x213f73};_0x213f73=_0x213f73??{};const _0x20d5f5=Number(_0x213f73[_0x9d8757(0x572)])||0x0;if(_0x20d5f5>=0x1||_0x213f73[_0x9d8757(0x108)]!=null||_0x213f73[_0x9d8757(0x3ee)]!=null){const _0x4467ab=new Error('http.listen({workers/makeOkdb/primaryOkdb})\x20is\x20no\x20longer\x20supported\x20in\x20the\x20'+'library\x20(okdb\x20node-model\x202.0).\x20For\x20multi-process\x20HTTP\x20serving\x20use\x20the\x20okdb\x20'+'CLI\x20(`okdb\x20listen`),\x20or\x20use\x20Node\x27s\x20built-in\x20`cluster`\x20module\x20and\x20call\x20'+_0x9d8757(0x2c1));_0x4467ab[_0x9d8757(0x4bc)]=_0x9d8757(0x32a);throw _0x4467ab;}if(this['server'])throw new Error('HTTP\x20server\x20already\x20running');const _0x213533=_0x213f73['host']==null?[undefined]:[][_0x9d8757(0x166)](_0x213f73['host']);if(!_0x213533['length']||_0x213533[_0x9d8757(0x142)](_0x222399=>_0x222399!==undefined&&(typeof _0x222399!==_0x9d8757(0x1ae)||!_0x222399))){const _0xc978ff=new Error(_0x9d8757(0x1fa));_0xc978ff[_0x9d8757(0x4bc)]=_0x9d8757(0x70c);throw _0xc978ff;}_0x33b083&&this[_0x9d8757(0x788)][_0x9d8757(0x16e)]===_0x9d8757(0x3fd)&&(this[_0x9d8757(0x788)][_0x9d8757(0x16e)]=_0x9d8757(0x37d)+_0x33b083,this[_0x9d8757(0x367)]?.[_0x9d8757(0x788)]&&(this[_0x9d8757(0x367)][_0x9d8757(0x788)][_0x9d8757(0x42b)]=this[_0x9d8757(0x788)][_0x9d8757(0x16e)]));const _0x50e760=this[_0x9d8757(0x367)]?.[_0x9d8757(0x489)]?.[_0x9d8757(0x5a8)]?.[_0x9d8757(0x669)]??![],_0x16fc9b=async(_0x4db66a,_0xeb5510)=>{const _0x27e1ca=_0x9d8757,_0xad30c1=Date[_0x27e1ca(0x556)]();if(_0x50e760){const _0x2ed56b=_0x4db66a['url']||'/',_0x4117f8=_0x4db66a[_0x27e1ca(0x59c)]?.['authorization']?_0x4db66a[_0x27e1ca(0x59c)][_0x27e1ca(0x6ab)]['replace'](/^Bearer\s+(\S{0,8})\S*/i,_0x27e1ca(0x49f)):'-',_0x43a5d4=_0x4db66a[_0x27e1ca(0x59c)]?.['cf-ray']||'-',_0x4e42da=_0x4db66a[_0x27e1ca(0x59c)]?.[_0x27e1ca(0x4ed)]||_0x4db66a[_0x27e1ca(0x59c)]?.[_0x27e1ca(0x54f)]||'-',_0x49d3ca=_0x4db66a[_0x27e1ca(0x59c)]?.['origin']||'-';process[_0x27e1ca(0x663)][_0x27e1ca(0x4c7)](_0x27e1ca(0x2bd)+_0x4db66a[_0x27e1ca(0x689)]['padEnd'](0x7)+'\x20'+_0x2ed56b[_0x27e1ca(0x119)](0x2d)+'\x20'+(_0x27e1ca(0x31f)+_0x4117f8+'\x20origin='+_0x49d3ca+_0x27e1ca(0x495)+_0x43a5d4+_0x27e1ca(0x70e)+_0x4e42da+'\x0a'));}try{const _0x39711a=new _0x2906b0(_0x4db66a['url'],_0x27e1ca(0x424)+_0x4db66a[_0x27e1ca(0x59c)][_0x27e1ca(0x75f)]),_0x4c887c=this[_0x27e1ca(0x216)](_0x4db66a[_0x27e1ca(0x689)],_0x39711a[_0x27e1ca(0x60f)]),_0x49bf46=_0x4c887c?.[_0x27e1ca(0x740)]?.[_0x27e1ca(0x20a)]===!![];if(_0x49bf46){const _0x1f9f15=_0x4db66a[_0x27e1ca(0x59c)]?.[_0x27e1ca(0x167)];if(_0x1f9f15!=null){const _0x1e15a9=Number(_0x1f9f15);if(Number[_0x27e1ca(0x645)](_0x1e15a9)&&_0x1e15a9>this[_0x27e1ca(0x578)]){_0xeb5510[_0x27e1ca(0x14b)]=0x19d,_0xeb5510[_0x27e1ca(0x1bd)](_0x27e1ca(0x657));return;}}}const _0xe96274=_0x49bf46?null:await _0x533507(_0x4db66a,this['maxBodyBytes']),_0x5050dc=_0x49bf46?_0x42f776(_0x4db66a,this[_0x27e1ca(0x578)]):undefined,_0x5dfbfc=await this['handle'](_0x4db66a['method'],_0x39711a['pathname'],{'body':_0xe96274,'query':Object['fromEntries'](_0x39711a[_0x27e1ca(0x10f)][_0x27e1ca(0x45d)]()),'headers':_0x4db66a[_0x27e1ca(0x59c)]},{'req':_0x4db66a,'res':_0xeb5510,'rawStream':_0x5050dc}),_0x58d2b2=this['_matchRoute'](_0x4db66a[_0x27e1ca(0x689)],_0x39711a[_0x27e1ca(0x60f)]),_0x14135a=Date[_0x27e1ca(0x556)]()-_0xad30c1,_0x554d9e=this[_0x27e1ca(0x4c1)](_0x58d2b2,_0x5dfbfc)?this['_wrapApiResponse'](_0x5dfbfc,_0x14135a):_0x179e11(_0x5dfbfc),_0x26d08d=(_0x554d9e[_0x27e1ca(0x41e)]||0xc8)>=0x190;this['metrics'][_0x27e1ca(0x5b9)](_0x4db66a[_0x27e1ca(0x689)],_0x14135a,_0x26d08d),_0x2473e2(_0xeb5510,_0x554d9e);if(_0x50e760){const _0x411eda=_0x554d9e['status']||0xc8,_0x1194d8=Date[_0x27e1ca(0x556)]()-_0xad30c1;process[_0x27e1ca(0x663)]['write'](_0x27e1ca(0x24f)+_0x4db66a[_0x27e1ca(0x689)][_0x27e1ca(0x119)](0x7)+'\x20'+_0x39711a[_0x27e1ca(0x60f)][_0x27e1ca(0x119)](0x2d)+'\x20'+_0x411eda+'\x20\x20'+_0x1194d8+_0x27e1ca(0x34a));}}catch(_0x1d3c3c){const _0x1a9904=Date[_0x27e1ca(0x556)]()-_0xad30c1;this['metrics'][_0x27e1ca(0x5b9)](_0x4db66a[_0x27e1ca(0x689)],_0x1a9904,!![]);const _0x4162d6=_0x1d3c3c?.[_0x27e1ca(0x41e)]||0x1f4;_0xeb5510[_0x27e1ca(0x14b)]=_0x4162d6,_0x4162d6===0x19d?_0xeb5510[_0x27e1ca(0x1bd)](_0x27e1ca(0x657)):_0xeb5510[_0x27e1ca(0x1bd)](_0x1d3c3c['message']||_0x27e1ca(0x6d4));}};this[_0x9d8757(0x121)]=_0x213533[_0x9d8757(0x6d7)](_0x5d6465=>{const _0x4b887d=_0x9d8757,_0x3ac7db=_0x148438[_0x4b887d(0x264)](_0x16fc9b);_0x3ac7db['on']('connection',_0x50d30a=>{const _0x3f5039=_0x4b887d;this[_0x3f5039(0xf1)]['add'](_0x50d30a),_0x50d30a['on'](_0x3f5039(0x57c),()=>this[_0x3f5039(0xf1)][_0x3f5039(0x539)](_0x50d30a));});if(_0x5d6465===undefined)_0x3ac7db[_0x4b887d(0xfd)](_0x33b083);else _0x3ac7db[_0x4b887d(0xfd)](_0x33b083,_0x5d6465);return _0x3ac7db;}),this[_0x9d8757(0x43f)]=this['servers'][0x0];for(const _0x43a1e8 of this[_0x9d8757(0x121)][_0x9d8757(0x333)](0x1))_0x43a1e8['on'](_0x9d8757(0x5f2),_0x8e078=>this['server']?.[_0x9d8757(0x11e)](_0x9d8757(0x5f2),_0x8e078));const _0x525ed1=_0x42b718(_0x33b083,_0x213f73[_0x9d8757(0x75f)]),_0x41c7f3=this[_0x9d8757(0x367)];return _0x41c7f3?.['processes']&&(_0x41c7f3[_0x9d8757(0x25f)][_0x9d8757(0x5f0)](_0x525ed1),require$$1$1['isWorker']?_0x41c7f3['_activateProcessesReader']?.({'kind':_0x9d8757(0x4d9)})[_0x9d8757(0x290)](()=>{}):_0x41c7f3[_0x9d8757(0x486)]?.({'kind':_0x9d8757(0x72d),'listenAddr':_0x525ed1})[_0x9d8757(0x290)](()=>{})),this['server'];}async['close'](_0x592208={}){const _0x2a33b2=_0x1f8a51,_0x548f93=this[_0x2a33b2(0x43f)];this[_0x2a33b2(0x43f)]=null;const _0x41ccb8=this[_0x2a33b2(0x121)][_0x2a33b2(0x4b0)](_0x548f93)?this[_0x2a33b2(0x121)]:_0x548f93?[_0x548f93]:[];this[_0x2a33b2(0x121)]=[];if(_0x548f93&&_0x548f93[_0x2a33b2(0x7b1)]){try{await _0x548f93[_0x2a33b2(0x57c)]();}catch{}this['metrics']&&this[_0x2a33b2(0x5ca)][_0x2a33b2(0x57c)]();return;}if(_0x41ccb8[_0x2a33b2(0x330)]){const _0x37bcfe=Number[_0x2a33b2(0x645)](_0x592208[_0x2a33b2(0x134)])?Math[_0x2a33b2(0x42f)](0x0,_0x592208[_0x2a33b2(0x134)]):0x3e8,_0x3200aa=_0x2bfbc4=>new Promise(_0x398e31=>{const _0xe3642c=_0x2a33b2;let _0x2d48cb=![],_0xb22b5c=null,_0x43b9c9=null;const _0x2ffe3c=()=>{if(_0x2d48cb)return;_0x2d48cb=!![];if(_0xb22b5c)clearTimeout(_0xb22b5c);if(_0x43b9c9)clearTimeout(_0x43b9c9);_0x398e31();};try{_0x2bfbc4[_0xe3642c(0x57c)](_0x2ffe3c);}catch{_0x2ffe3c();return;}try{_0x2bfbc4[_0xe3642c(0x74d)]?.();}catch{}_0xb22b5c=setTimeout(()=>{const _0x15c349=_0xe3642c;try{_0x2bfbc4[_0x15c349(0x610)]?.();}catch{}for(const _0x8ca415 of this[_0x15c349(0xf1)]){try{_0x8ca415['destroy']();}catch{}}_0x43b9c9=setTimeout(_0x2ffe3c,0x64),_0x43b9c9[_0x15c349(0x169)]?.();},_0x37bcfe),_0xb22b5c[_0xe3642c(0x169)]?.();});await Promise[_0x2a33b2(0x61b)](_0x41ccb8[_0x2a33b2(0x6d7)](_0x3200aa));}this[_0x2a33b2(0x5ca)]&&this[_0x2a33b2(0x5ca)][_0x2a33b2(0x57c)]();}[_0x1f8a51(0x465)](_0x1a7963,_0x15a50d,_0x463e65=0x36ee80){const _0x2f068d=_0x1f8a51,_0x78f1d=Date[_0x2f068d(0x556)](),_0x3633f7=Buffer[_0x2f068d(0x309)](JSON[_0x2f068d(0x1c5)]({'iat':_0x78f1d,'exp':_0x78f1d+_0x463e65,..._0x1a7963}))[_0x2f068d(0x318)](_0x2f068d(0xce)),_0x3260a6=_0x4c9e00(_0x3633f7,_0x15a50d);return _0x3633f7+'.'+_0x3260a6;}[_0x1f8a51(0x4b3)](_0x47f1cb,_0x18b900={}){const _0x283b7d=_0x1f8a51,{httpOnly:httpOnly=!![],sameSite:sameSite=_0x283b7d(0x6f8),path:path='/',secure:secure=![],maxAge:maxAge=null,expires:expires=null}=_0x18b900;let _0x4b3a42=this['auth']['cookieName']+'='+_0x47f1cb;if(httpOnly)_0x4b3a42+=_0x283b7d(0x719);if(sameSite)_0x4b3a42+=';\x20SameSite='+sameSite;if(path)_0x4b3a42+=';\x20Path='+path;if(secure)_0x4b3a42+=';\x20Secure';if(Number[_0x283b7d(0x645)](maxAge))_0x4b3a42+=_0x283b7d(0x6b9)+Math[_0x283b7d(0x42f)](0x0,Math[_0x283b7d(0x6ef)](maxAge));if(expires instanceof Date)_0x4b3a42+=_0x283b7d(0x690)+expires[_0x283b7d(0x151)]();return _0x4b3a42;}['clearCookie'](_0x284f1c=this[_0x1f8a51(0x788)]['cookieName'],_0x1e7319={}){const _0x2bd9d5=_0x1f8a51,{path:path='/',sameSite:sameSite='Lax',secure:secure=![],httpOnly:httpOnly=!![]}=_0x1e7319;let _0x3961de=_0x284f1c+'=';if(httpOnly)_0x3961de+=_0x2bd9d5(0x719);if(sameSite)_0x3961de+=_0x2bd9d5(0x59d)+sameSite;if(path)_0x3961de+=_0x2bd9d5(0x148)+path;if(secure)_0x3961de+=';\x20Secure';return _0x3961de+=_0x2bd9d5(0x7be),_0x3961de;}[_0x1f8a51(0x1c4)](_0x5941fd,_0x3071fb){const _0x2440eb=_0x1f8a51;if(!_0x5941fd)return null;const [_0x2ab428,_0x475ca0]=String(_0x5941fd)[_0x2440eb(0x1e8)]('.');if(!_0x2ab428||!_0x475ca0)return null;const _0x55152b=_0x4c9e00(_0x2ab428,_0x3071fb);if(!_0x5d149f(_0x475ca0,_0x55152b))return null;try{const _0x48a147=JSON[_0x2440eb(0x2e3)](Buffer[_0x2440eb(0x309)](_0x2ab428,_0x2440eb(0xce))['toString']());if(_0x48a147[_0x2440eb(0x3c4)]<=Date[_0x2440eb(0x556)]())return null;return _0x48a147;}catch{return null;}}[_0x1f8a51(0x347)](_0x5e9954){const _0x3d8875=_0x1f8a51;if(this[_0x3d8875(0x367)]?.[_0x3d8875(0x788)])return this[_0x3d8875(0x367)][_0x3d8875(0x788)][_0x3d8875(0x347)](_0x5e9954);return _0x5e56fa(_0x5e9954);}['issueToken'](_0x3a654c){const _0x20ceda=_0x1f8a51;if(this[_0x20ceda(0x367)]?.[_0x20ceda(0x788)])return this[_0x20ceda(0x367)][_0x20ceda(0x788)][_0x20ceda(0x258)](_0x3a654c);const _0x182651=this[_0x20ceda(0x143)]?.[_0x20ceda(0x310)]??0x36ee80,_0x3f4a8d=this[_0x20ceda(0x143)]?.[_0x20ceda(0x5ff)];return _0x131436(_0x3a654c,_0x3f4a8d,_0x182651);}[_0x1f8a51(0x270)](_0x12d2ec){const _0x5263f7=_0x1f8a51;if(this[_0x5263f7(0x367)]?.[_0x5263f7(0x788)])return this[_0x5263f7(0x367)][_0x5263f7(0x788)][_0x5263f7(0x270)](_0x12d2ec);const _0x561f9f=this['_authOptions']?.[_0x5263f7(0x5ff)];return _0x4f98f4(_0x12d2ec,_0x561f9f);}async[_0x1f8a51(0x163)](_0x2ec562){const _0x238fce=_0x1f8a51;if(this[_0x238fce(0x367)]?.[_0x238fce(0x788)])return this['_okdb']['auth'][_0x238fce(0x163)](_0x2ec562);if(_0x2ec562['context']?.[_0x238fce(0x3dd)]===!![]||this['authMode']===_0x238fce(0x375))return{'id':'system','username':_0x238fce(0x7c3),'roles':['admin'],'isAuthenticated':!![],'isSystem':!![],'user':{'id':_0x238fce(0x7c3),'username':_0x238fce(0x7c3),'roles':[_0x238fce(0x176)],'isAuthenticated':!![],'isSystem':!![]}};const _0x4f1f27=this[_0x238fce(0x347)](_0x2ec562['headers']?.[_0x238fce(0x6ab)]),_0x4df2e7=_0x2ec562[_0x238fce(0x1cd)]?.[this[_0x238fce(0x788)][_0x238fce(0x16e)]],_0x202bbd=_0x4f1f27||_0x4df2e7;if(!_0x202bbd)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x16e3ff=this[_0x238fce(0x270)](_0x202bbd);if(!_0x16e3ff)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x57f1c1={'id':_0x16e3ff[_0x238fce(0x64d)]??null,'username':_0x16e3ff[_0x238fce(0x51e)]??null,'roles':Array[_0x238fce(0x654)](_0x16e3ff[_0x238fce(0xff)])?_0x16e3ff[_0x238fce(0xff)]:[],'isAuthenticated':!![],'isSystem':![]};return{'id':_0x57f1c1['id'],'username':_0x57f1c1[_0x238fce(0x51e)],'roles':_0x57f1c1['roles'],'isAuthenticated':!![],'isSystem':![],'user':_0x57f1c1,'claims':_0x16e3ff,'subject':_0x57f1c1['id']};}async[_0x1f8a51(0x4a0)](_0x492206,_0x1b8870={}){const _0x553f1c=_0x1f8a51,_0x330b85=_0x3d91f4(_0x492206),_0x55aa91=Array['isArray'](_0x1b8870[_0x553f1c(0x194)])&&_0x1b8870[_0x553f1c(0x194)][_0x553f1c(0x330)]>0x0?_0x1b8870[_0x553f1c(0x194)]:[_0x553f1c(0x2be),_0x553f1c(0xc3)],_0x20c21d=_0x330b85[_0x553f1c(0x592)]?.[_0x553f1c(0x3c6)];if(!_0x55aa91[_0x553f1c(0x4b0)](_0x20c21d))throw new Error(_0x553f1c(0x1cc)+_0x20c21d);if(!_0x330b85[_0x553f1c(0x592)]?.[_0x553f1c(0x1d3)])throw new Error('JWT\x20is\x20missing\x20kid');const _0x52bd34=await this[_0x553f1c(0x45a)](_0x1b8870);if(!_0x52bd34?.[_0x553f1c(0x51f)])throw new Error(_0x553f1c(0x157));const _0x422362=await this[_0x553f1c(0x541)](_0x52bd34[_0x553f1c(0x51f)],_0x330b85['header'][_0x553f1c(0x1d3)],_0x1b8870);if(!_0x1e88e5(_0x20c21d,_0x422362,_0x330b85[_0x553f1c(0x7a4)],_0x330b85['signature']))throw new Error(_0x553f1c(0x560));const _0x19c3a1=Math[_0x553f1c(0x6ef)](Date['now']()/0x3e8),_0x4b757f=_0x330b85[_0x553f1c(0x382)]||{};if(_0x4b757f['iss']!==_0x52bd34[_0x553f1c(0x777)])throw new Error(_0x553f1c(0x3c5));const _0x409dea=_0x1b8870['audience'];if(_0x409dea){const _0x312319=_0x2e005b(_0x4b757f[_0x553f1c(0x7a3)]);if(!_0x312319[_0x553f1c(0x4b0)](_0x409dea))throw new Error(_0x553f1c(0x19b));}if(typeof _0x4b757f[_0x553f1c(0x3c4)]!==_0x553f1c(0x4de)||_0x4b757f[_0x553f1c(0x3c4)]<=_0x19c3a1)throw new Error('JWT\x20expired');if(_0x4b757f['nbf']!=null&&_0x4b757f[_0x553f1c(0x1e1)]>_0x19c3a1)throw new Error('JWT\x20not\x20yet\x20valid');if(_0x4b757f[_0x553f1c(0x5d9)]==='id')throw new Error(_0x553f1c(0x4a7));return{'subject':_0x4b757f['sub']??null,'email':_0x4b757f[_0x553f1c(0x491)]??null,'scopes':typeof _0x4b757f[_0x553f1c(0x4f5)]===_0x553f1c(0x1ae)?_0x4b757f['scope']['split'](/\s+/)[_0x553f1c(0x64e)](Boolean):[],'claims':_0x4b757f,'tokenType':_0x553f1c(0x6e4)};}async[_0x1f8a51(0x45a)](_0xe21ff9={}){const _0x443a1c=_0x1f8a51,_0x20583e=String(_0xe21ff9['issuer']||'')[_0x443a1c(0x16b)](/\/+$/,'');if(!_0x20583e)return null;const _0x56e294=Number[_0x443a1c(0x645)](_0xe21ff9[_0x443a1c(0x2ff)])?_0xe21ff9[_0x443a1c(0x2ff)]:0xa*0x3c*0x3e8;if(this['_oidcDiscoveryCache']?.[_0x443a1c(0x777)]===_0x20583e&&this[_0x443a1c(0x6c4)][_0x443a1c(0x257)]>Date[_0x443a1c(0x556)]())return this[_0x443a1c(0x6c4)][_0x443a1c(0x4f8)];const _0x5f034d=await _0x4e85e2(_0x20583e+_0x443a1c(0x15f)),_0x2c1107={'issuer':_0x5f034d[_0x443a1c(0x777)]||_0x20583e,'authorization_endpoint':_0xe21ff9['authorizationUrl']||_0x5f034d['authorization_endpoint'],'token_endpoint':_0xe21ff9['tokenUrl']||_0x5f034d[_0x443a1c(0x5fd)],'jwks_uri':_0xe21ff9['jwksUri']||_0x5f034d[_0x443a1c(0x51f)]};return this['_oidcDiscoveryCache']={'issuer':_0x20583e,'value':_0x2c1107,'expiresAt':Date[_0x443a1c(0x556)]()+_0x56e294},_0x2c1107;}async[_0x1f8a51(0x238)](_0xdac466,_0x56039b=0x5*0x3c*0x3e8){const _0x509085=_0x1f8a51,_0x3867c6=await _0x4e85e2(_0xdac466),_0x4434b1=new Map();for(const _0x4b6cf3 of _0x3867c6[_0x509085(0x434)]||[]){if(!_0x4b6cf3?.['kid'])continue;_0x4434b1['set'](_0x4b6cf3[_0x509085(0x1d3)],_0x5b4e5c(_0x4b6cf3));}return this[_0x509085(0x3e6)]={'uri':_0xdac466,'keys':_0x4434b1,'expiresAt':Date[_0x509085(0x556)]()+_0x56039b},this[_0x509085(0x3e6)];}async[_0x1f8a51(0x541)](_0xd22981,_0x418b04,_0x2add17={}){const _0x4feb6f=_0x1f8a51,_0x2afa91=Number[_0x4feb6f(0x645)](_0x2add17[_0x4feb6f(0x70f)])?_0x2add17[_0x4feb6f(0x70f)]:0x5*0x3c*0x3e8,_0x70978b=0x1e*0x3e8,_0x4bf125=this[_0x4feb6f(0x2f2)][_0x4feb6f(0x294)](_0x418b04);if(_0x4bf125!==undefined&&_0x4bf125>Date['now']())throw new Error(_0x4feb6f(0x4df)+_0x418b04);(!this[_0x4feb6f(0x3e6)]||this[_0x4feb6f(0x3e6)][_0x4feb6f(0x649)]!==_0xd22981||this[_0x4feb6f(0x3e6)][_0x4feb6f(0x257)]<=Date['now']())&&await this[_0x4feb6f(0x238)](_0xd22981,_0x2afa91);let _0x3d1a62=this[_0x4feb6f(0x3e6)]?.[_0x4feb6f(0x434)]?.[_0x4feb6f(0x294)](_0x418b04);if(_0x3d1a62)return _0x3d1a62;await this[_0x4feb6f(0x238)](_0xd22981,_0x2afa91),_0x3d1a62=this['_jwksCache']?.[_0x4feb6f(0x434)]?.[_0x4feb6f(0x294)](_0x418b04);if(!_0x3d1a62){this['_jwksNegativeCache'][_0x4feb6f(0x3c0)](_0x418b04,Date[_0x4feb6f(0x556)]()+_0x70978b);throw new Error(_0x4feb6f(0x4df)+_0x418b04);}return _0x3d1a62;}['_normalizeOAuthAuthResult'](_0x5e7de2){const _0x114949=_0x1f8a51;if(this[_0x114949(0x367)]?.[_0x114949(0x788)])return this[_0x114949(0x367)][_0x114949(0x788)][_0x114949(0x785)](_0x5e7de2);const _0x498606=_0x5e7de2?.['claims']||{},_0xd4ba11={'sub':_0x5e7de2?.['subject']??_0x498606[_0x114949(0x64d)]??null,'email':_0x5e7de2?.[_0x114949(0x491)]??_0x498606[_0x114949(0x491)]??null,'name':_0x5e7de2?.[_0x114949(0x339)]??_0x498606['name']??_0x498606[_0x114949(0x6a0)]??null,'groups':_0x5e7de2?.[_0x114949(0x11c)]??_0x498606[_0x114949(0x11c)]??[],'roles':_0x5e7de2?.[_0x114949(0xff)]??_0x498606['roles']??[]};return{'type':'oauth','tokenType':_0x5e7de2?.['tokenType']??_0x114949(0x6e4),'subject':_0xd4ba11[_0x114949(0x64d)],'email':_0xd4ba11[_0x114949(0x491)],'scopes':_0x5e7de2?.['scopes']??_0x498606['scope']?.[_0x114949(0x1e8)]?.('\x20')?.[_0x114949(0x64e)](Boolean)??[],'claims':_0x498606,'user':_0xd4ba11,'isAuthenticated':!![]};}['createLoginState'](_0x2ac3e4={},_0x41d6f9=0x927c0){const _0x1cb6f3=_0x1f8a51;if(this[_0x1cb6f3(0x367)]?.['auth'])return this[_0x1cb6f3(0x367)][_0x1cb6f3(0x788)][_0x1cb6f3(0x2e1)](_0x2ac3e4,_0x41d6f9);const _0x12abb0=_0x153375(0x18);this[_0x1cb6f3(0x2d0)][_0x1cb6f3(0x3c0)](_0x12abb0,{..._0x2ac3e4,'exp':Date[_0x1cb6f3(0x556)]()+_0x41d6f9});if(this[_0x1cb6f3(0x2d0)][_0x1cb6f3(0x6ca)]%0x32===0x0){const _0x391cf7=Date['now']();for(const [_0x5864d4,_0x227a54]of this['_loginStates']){if(_0x227a54['exp']<=_0x391cf7)this[_0x1cb6f3(0x2d0)][_0x1cb6f3(0x539)](_0x5864d4);}}return _0x12abb0;}[_0x1f8a51(0x79b)](_0x492abc){const _0xf729e4=_0x1f8a51;if(this['_okdb']?.[_0xf729e4(0x788)])return this[_0xf729e4(0x367)][_0xf729e4(0x788)][_0xf729e4(0x79b)](_0x492abc);if(!_0x492abc)return null;const _0x4bcc60=this[_0xf729e4(0x2d0)][_0xf729e4(0x294)](_0x492abc);this[_0xf729e4(0x2d0)][_0xf729e4(0x539)](_0x492abc);if(!_0x4bcc60)return null;if(_0x4bcc60['exp']<=Date[_0xf729e4(0x556)]())return null;return _0x4bcc60;}}function _0x179e11(_0x49bf4f){const _0x273526=_0x1f8a51;if(_0x49bf4f==null)return{'status':0xcc};if(Buffer['isBuffer'](_0x49bf4f)||_0x182f47(_0x49bf4f))return{'status':0xc8,'body':_0x49bf4f};if(typeof _0x49bf4f===_0x273526(0x24d)&&_0x273526(0x41e)in _0x49bf4f){if(!(_0x273526(0x4d2)in _0x49bf4f)&&!_0x182f47(_0x49bf4f['body'])){const {status:_0xe5e830,headers:_0x172416,..._0x5d3d11}=_0x49bf4f;if(Object[_0x273526(0x434)](_0x5d3d11)[_0x273526(0x330)]>0x0)return{'status':_0xe5e830,'headers':_0x172416,'body':_0x5d3d11};}return _0x49bf4f;}return{'status':0xc8,'body':_0x49bf4f};}function _0x182f47(_0x42bf50){return _0x42bf50&&typeof _0x42bf50['pipe']==='function';}function _0x42f776(_0x2dbdbc,_0x4dd8c9){const _0x10985e=_0x1f8a51,{PassThrough:_0x2267e7}=require$$5;let _0xcc6cbd=0x0,_0x50b21c=![];const _0x1bba47=new _0x2267e7();return _0x2dbdbc['on']('data',_0x5221d8=>{const _0x5b06e1=_0x2ba0;if(_0x50b21c)return;_0xcc6cbd+=_0x5221d8[_0x5b06e1(0x330)];if(_0xcc6cbd>_0x4dd8c9){_0x50b21c=!![];const _0x4044ea=new Error(_0x5b06e1(0x657));_0x4044ea[_0x5b06e1(0x41e)]=0x19d,_0x1bba47[_0x5b06e1(0x496)](_0x4044ea);return;}if(!_0x1bba47['destroyed'])_0x1bba47[_0x5b06e1(0x5d8)](_0x5221d8);}),_0x2dbdbc['on']('end',()=>{const _0x1b396b=_0x2ba0;!_0x50b21c&&!_0x1bba47[_0x1b396b(0x56b)]&&(_0x50b21c=!![],_0x1bba47['end']());}),_0x2dbdbc['on'](_0x10985e(0x5f2),_0x5a00a0=>{const _0xe16d10=_0x10985e;if(!_0x1bba47[_0xe16d10(0x56b)])_0x1bba47[_0xe16d10(0x496)](_0x5a00a0);}),_0x2dbdbc[_0x10985e(0x72c)](),_0x1bba47['on'](_0x10985e(0x150),()=>{const _0xa1c99c=_0x10985e;if(!_0x1bba47[_0xa1c99c(0x56b)])_0x2dbdbc[_0xa1c99c(0x150)]();}),_0x1bba47;}function _0x533507(_0x2b6e2d,_0x1ea5d3){const _0x221148=_0x1f8a51;if(_0x2b6e2d[_0x221148(0x689)]===_0x221148(0x32b)||_0x2b6e2d[_0x221148(0x689)]===_0x221148(0x39c))return null;const _0xf2bedf=_0x2b6e2d['headers']?.['content-length'];if(_0xf2bedf!=null){const _0x125177=Number(_0xf2bedf);if(Number[_0x221148(0x645)](_0x125177)&&_0x125177>_0x1ea5d3){const _0x4f5895=new Error(_0x221148(0x657));_0x4f5895[_0x221148(0x41e)]=0x19d;throw _0x4f5895;}}return new Promise((_0x2294b2,_0x321e9a)=>{const _0xd565d9=_0x221148;let _0x595fbb='',_0x2eae3f=0x0;_0x2b6e2d['on']('data',_0x22438a=>{const _0xb10989=_0x2ba0;_0x2eae3f+=_0x22438a[_0xb10989(0x330)];if(_0x2eae3f>_0x1ea5d3){try{_0x2b6e2d[_0xb10989(0x496)]();}catch{}const _0x51d3d5=new Error(_0xb10989(0x657));_0x51d3d5[_0xb10989(0x41e)]=0x19d,_0x321e9a(_0x51d3d5);return;}_0x595fbb+=_0x22438a;}),_0x2b6e2d['on'](_0xd565d9(0x1bd),()=>{const _0x583d0b=_0xd565d9;if(!_0x595fbb)return _0x2294b2(null);const _0x409d66=_0x2b6e2d['headers']?.[_0x583d0b(0x202)]||'';if(_0x409d66[_0x583d0b(0x4b0)](_0x583d0b(0x4aa))){const _0x150938={};for(const [_0x1c5b2c,_0x10b211]of new URLSearchParams(_0x595fbb))_0x150938[_0x1c5b2c]=_0x10b211;return _0x2294b2(_0x150938);}try{_0x2294b2(JSON['parse'](_0x595fbb));}catch(_0x59c2ed){_0x321e9a(_0x59c2ed);}}),_0x2b6e2d['on'](_0xd565d9(0x5f2),_0x321e9a);});}function _0x2473e2(_0x5e13fa,_0xfc6d74){const _0x4fecb9=_0x1f8a51,{status:status=0xc8,headers:headers={},body:_0x4efe15}=_0xfc6d74;_0x5e13fa[_0x4fecb9(0x14b)]=status;for(const [_0x2178cd,_0xfcd6f1]of Object[_0x4fecb9(0x45d)](headers)){_0x5e13fa[_0x4fecb9(0x625)](_0x2178cd,_0xfcd6f1);}if(_0x4efe15==null){_0x5e13fa[_0x4fecb9(0x1bd)]();return;}if(_0x182f47(_0x4efe15)){_0x4efe15[_0x4fecb9(0x422)](_0x5e13fa);return;}if(Buffer[_0x4fecb9(0x671)](_0x4efe15)){_0x5e13fa[_0x4fecb9(0x1bd)](_0x4efe15);return;}if(typeof _0x4efe15===_0x4fecb9(0x24d)){!_0x5e13fa['getHeader']('Content-Type')&&_0x5e13fa[_0x4fecb9(0x625)](_0x4fecb9(0x3f5),_0x4fecb9(0x64f));_0x5e13fa['end'](JSON[_0x4fecb9(0x1c5)](_0x4efe15));return;}_0x5e13fa['end'](String(_0x4efe15));}function _0x42b718(_0xddffdc,_0x8111df){const _0x98dad8=_0x1f8a51;if(_0x8111df==null)return':'+_0xddffdc;return[][_0x98dad8(0x166)](_0x8111df)[_0x98dad8(0x6d7)](_0x388476=>(_0x388476['includes'](':')?'['+_0x388476+']':_0x388476)+':'+_0xddffdc)[_0x98dad8(0x3de)](',\x20');}return okdbHttp['exports']=_0x4fc4db,okdbHttp['exports']['formatListenAddr']=_0x42b718,okdbHttp[_0x1f8a51(0x6a4)][_0x1f8a51(0x320)]=_0x485bbf,okdbHttp[_0x1f8a51(0x6a4)];}var okdbShmSegment,hasRequiredOkdbShmSegment;function requireOkdbShmSegment(){const _0x359217=_0x3f6c2b;if(hasRequiredOkdbShmSegment)return okdbShmSegment;hasRequiredOkdbShmSegment=0x1;const _0x1f2195=require$$0$1,_0x4626de=require$$2$1,_0x118a53=0x80,_0x1baa8d=0x0,_0x3e8361=0x1,_0x505579=0x2,_0x41cca7=0x3,_0x495514=0x4,_0x2e2d69=_0x495514+_0x118a53,_0x346c59=_0x2e2d69+_0x118a53,_0x301442=require$$2$3[_0x359217(0xf0)],_0x448028=_0x346c59*0x4,_0x96aeec=process[_0x359217(0x303)]!==_0x359217(0x369),_0xc5ee28=0xc,_0x3725d9=process['platform']===_0x359217(0x103)?0x1f:0xa0,_0x5dadff=/^[A-Za-z0-9-]+(?:_boot)?$/,_0x8e408c=/^[A-Za-z0-9-]*-[0-9a-f]{12}(?:_boot)?$/,_0x5dbc9e=_0x335b58=>_0x335b58[_0x359217(0x16b)](/[^a-zA-Z0-9]/g,'-');function _0x39c73d(_0x224302,_0x423363=''){const _0x5d4394=_0x359217;if(typeof _0x224302!==_0x5d4394(0x1ae)||_0x224302==='')throw new TypeError('segmentNameFor:\x20canonicalPath\x20must\x20be\x20a\x20non-empty\x20string');if(_0x423363!==''&&!/^_[A-Za-z0-9]+$/[_0x5d4394(0x3a9)](_0x423363))throw new TypeError(_0x5d4394(0x7ac)+JSON[_0x5d4394(0x1c5)](_0x423363)+')');const _0x2968ec=_0x4626de[_0x5d4394(0x1f2)](_0x5d4394(0x3b3))[_0x5d4394(0x52f)](_0x224302)['digest']('hex')[_0x5d4394(0x333)](0x0,_0xc5ee28),_0x222fab=Math[_0x5d4394(0x42f)](0x0,_0x3725d9-0x1-_0xc5ee28-_0x423363[_0x5d4394(0x330)]);return _0x5dbc9e(_0x224302)[_0x5d4394(0x333)](0x0,_0x222fab)+'-'+_0x2968ec+_0x423363;}function _0x5b5d53(_0x30e110,_0x5455d0=''){return''+_0x5dbc9e(_0x30e110)+_0x5455d0;}function _0x18a852(_0x5975f2){const _0x2d715a=_0x359217;if(_0x8e408c[_0x2d715a(0x3a9)](_0x5975f2))return _0x2d715a(0x6fe);if(_0x5dadff[_0x2d715a(0x3a9)](_0x5975f2))return _0x2d715a(0x195);return null;}const _0xc09b3b={'onMapped':null,'onClaimed':null,'onRetiring':null},_0x414553=_0x36930f=>Math['ceil'](_0x36930f/0x8)*0x8,_0x32d055=_0x59bf18=>_0x414553(_0x59bf18)+_0x448028;function _0x352596(_0x13d543){const _0xfa8f0e=_0x359217;try{return process[_0xfa8f0e(0x65b)](_0x13d543,0x0),![];}catch(_0x3db62b){return _0x3db62b['code']==='ESRCH';}}const _0x43783e=new Int32Array(new SharedArrayBuffer(0x4));function _0x19fdf8(_0x5c7bd1){const _0x24626f=_0x359217;if(_0x5c7bd1>0x0)Atomics[_0x24626f(0x520)](_0x43783e,0x0,0x0,_0x5c7bd1);}function _0x374c1e(_0x47c5b3,_0x59d611){const _0x20849b=_0x359217;if(process[_0x20849b(0x303)]!==_0x20849b(0x301))return;let _0x31a260;try{_0x31a260=_0x1f2195['openSync'](_0x20849b(0x4ff)+_0x47c5b3,'r+');if(_0x1f2195['fstatSync'](_0x31a260)[_0x20849b(0x6ca)]<_0x59d611)_0x1f2195[_0x20849b(0x585)](_0x31a260,_0x59d611);}catch{}finally{if(_0x31a260!==undefined)try{_0x1f2195[_0x20849b(0x1ab)](_0x31a260);}catch{}}}function _0x1975f1(_0x4e791c,_0xa62414){const _0x22ff4a=_0x359217,_0x2be685=require$$3$1;for(let _0x427ba8=0x0;;_0x427ba8++){try{return _0x2be685[_0x22ff4a(0x375)](_0x4e791c,_0xa62414);}catch(_0x4b723b){if(_0x427ba8>=0x3e8||!/No such file or directory/[_0x22ff4a(0x3a9)](_0x4b723b?.[_0x22ff4a(0x7b6)]??''))throw _0x4b723b;}}}function _0x144ff1(_0x42eceb,_0x2e7e87){const _0x56ef1b=_0x359217,_0x2d0b2e=_0x32d055(_0x2e7e87),_0x549264=_0x1975f1(_0x42eceb,_0x2d0b2e);_0x374c1e(_0x42eceb,_0x2d0b2e);if(_0x549264['byteLength']<_0x2d0b2e)throw new Error(_0x56ef1b(0x23b)+_0x42eceb+_0x56ef1b(0x748)+_0x549264[_0x56ef1b(0x372)]+_0x56ef1b(0x5c1)+_0x2d0b2e+'\x20bytes');return{'sab':_0x549264,'hdr':new Int32Array(_0x549264,_0x414553(_0x2e7e87),_0x346c59)};}function _0x2895d2(_0x5913df){const _0x3eafbd=_0x359217;try{require(_0x3eafbd(0x3c7))['close'](_0x5913df);}catch{}}function _0x52004d(_0x7aae9a){const _0x5286fe=_0x359217;try{require(_0x5286fe(0x3c7))['unlink'](_0x7aae9a);}catch{}}function _0x33d9fa(_0x4147df){const _0x4e2ff6=_0x359217;if(Atomics[_0x4e2ff6(0x22e)](_0x4147df,_0x505579)!==0x0&&Atomics['load'](_0x4147df,_0x41cca7)!==0x0)return;const _0x297f68=_0x4626de[_0x4e2ff6(0x13d)](0x8),_0x1fcb08=_0x297f68[_0x4e2ff6(0x493)](0x0)||0x1,_0x5eb360=_0x297f68[_0x4e2ff6(0x493)](0x4)||0x1;Atomics['compareExchange'](_0x4147df,_0x505579,0x0,_0x1fcb08),Atomics['compareExchange'](_0x4147df,_0x41cca7,0x0,_0x5eb360);}function _0x4e7d02(_0x483e52){const _0x515fe9=_0x359217,_0x56cc47=process[_0x515fe9(0x7af)];for(let _0x2ce5aa=0x0;_0x2ce5aa<_0x118a53;_0x2ce5aa++){const _0x50634b=Atomics[_0x515fe9(0x22e)](_0x483e52,_0x495514+_0x2ce5aa);if(_0x50634b===0x0||_0x50634b===_0x56cc47)continue;if(!_0x352596(_0x50634b))continue;Atomics[_0x515fe9(0x129)](_0x483e52,_0x2e2d69+_0x2ce5aa,0x0),Atomics[_0x515fe9(0x58b)](_0x483e52,_0x495514+_0x2ce5aa,_0x50634b,0x0);}}function _0x1193ca(_0xe994a6){const _0x38cb4f=_0x359217;if(Atomics[_0x38cb4f(0x22e)](_0xe994a6,_0x3e8361)!==0x0)return!![];for(let _0x299cd1=0x0;_0x299cd1<_0x118a53;_0x299cd1++)if(Atomics[_0x38cb4f(0x22e)](_0xe994a6,_0x495514+_0x299cd1)!==0x0)return!![];return![];}function _0x36db31(_0x35ddac){const _0x20b52c=_0x359217,_0x45e603=process[_0x20b52c(0x7af)];for(let _0x4885f7=0x0;_0x4885f7<0x2;_0x4885f7++){for(let _0x2676fe=0x0;_0x2676fe<_0x118a53;_0x2676fe++){if(Atomics['compareExchange'](_0x35ddac,_0x495514+_0x2676fe,0x0,_0x45e603)===0x0)return Atomics[_0x20b52c(0x129)](_0x35ddac,_0x2e2d69+_0x2676fe,_0x301442),_0x2676fe;}_0x4e7d02(_0x35ddac);}return Atomics['add'](_0x35ddac,_0x3e8361,0x1),-0x1;}function _0x2ec3a6(_0x3d48f5,_0x14cd68){const _0x46be15=_0x359217;if(_0x14cd68>=0x0)Atomics['store'](_0x3d48f5,_0x2e2d69+_0x14cd68,0x0),Atomics[_0x46be15(0x58b)](_0x3d48f5,_0x495514+_0x14cd68,process[_0x46be15(0x7af)],0x0);else Atomics[_0x46be15(0x64d)](_0x3d48f5,_0x3e8361,0x1);}function _0x2e2163(_0x36e66f,_0x2cbb7a,_0x4b46df,_0x5ce8ef){const _0x3bc432=_0x359217,_0x329985=process[_0x3bc432(0x7af)];if(Atomics[_0x3bc432(0x58b)](_0x4b46df,_0x1baa8d,_0x5ce8ef,_0x329985)!==_0x5ce8ef)return _0x3bc432(0x6b5);const _0x49aa15=Atomics[_0x3bc432(0x22e)](_0x4b46df,_0x505579),_0x3c073c=Atomics['load'](_0x4b46df,_0x41cca7);let _0x325dac;try{_0x325dac=_0x144ff1(_0x36e66f,_0x2cbb7a)[_0x3bc432(0x650)];}catch{return'orphan';}if(Atomics[_0x3bc432(0x22e)](_0x325dac,_0x505579)!==_0x49aa15||Atomics['load'](_0x325dac,_0x41cca7)!==_0x3c073c)return _0x3bc432(0x724);_0x4e7d02(_0x4b46df);if(_0x1193ca(_0x4b46df))return Atomics[_0x3bc432(0x58b)](_0x4b46df,_0x1baa8d,_0x329985,0x0),_0x3bc432(0x1b5);return _0x52004d(_0x36e66f),_0x3bc432(0x508);}function _0x565f45(_0x248676,_0x5ead60,{timeoutMs:_0x30b7dc}={}){const _0x459cc7=_0x359217;_0x30b7dc=_0x30b7dc??(Number(process.env.OKDB_SHM_ATTACH_TIMEOUT_MS)||0x7530);const _0x4e145a=process['pid'],_0x3f41fa=Date['now']()+_0x30b7dc;for(let _0x2667fb=0x0;;_0x2667fb++){const {sab:_0x734803,hdr:_0x234532}=_0x144ff1(_0x248676,_0x5ead60);_0xc09b3b['onMapped']?.(_0x248676,_0x2667fb),_0x33d9fa(_0x234532);const _0x52c201=_0x36db31(_0x234532);_0xc09b3b['onClaimed']?.(_0x248676,_0x2667fb);const _0x10426a=Atomics[_0x459cc7(0x22e)](_0x234532,_0x1baa8d);if(_0x10426a===0x0||!_0x96aeec){if(_0x2667fb===0x0)_0x4e7d02(_0x234532);return{'sab':_0x734803,'hdr':_0x234532,'slot':_0x52c201};}_0x2ec3a6(_0x234532,_0x52c201);if(_0x10426a!==_0x4e145a&&_0x352596(_0x10426a))_0x2e2163(_0x248676,_0x5ead60,_0x234532,_0x10426a);_0x2895d2(_0x248676);if(Date[_0x459cc7(0x556)]()>_0x3f41fa){const {OKDBError:_0x3052c9}=requireOkdbError();throw new _0x3052c9('shared-memory\x20segment\x20\x22'+_0x248676+_0x459cc7(0x6bd)+_0x30b7dc+'ms\x20(pid\x20'+_0x10426a+_0x459cc7(0x152)+_0x459cc7(0x2eb),_0x459cc7(0x79c));}_0x19fdf8(_0x2667fb<0x14?0x0:0x1);}}function _0x5992e6(_0x4bbc95,_0x38ab1b,_0x1ea202,_0x1856a1){const _0x2f8cba=_0x359217,{hdr:_0x30b59b,slot:_0x1eed92}=_0x1ea202;if(_0x1eed92!==null)_0x2ec3a6(_0x30b59b,_0x1eed92);let _0x7d48d9=![];try{if(!_0x96aeec)return![];const _0x5c8102=process[_0x2f8cba(0x7af)];_0x4e7d02(_0x30b59b);if(_0x1193ca(_0x30b59b)||_0x1856a1?.(_0x1ea202[_0x2f8cba(0x61a)]))return![];if(Atomics[_0x2f8cba(0x58b)](_0x30b59b,_0x1baa8d,0x0,_0x5c8102)!==0x0)return![];let _0x282a0d=!![];try{_0xc09b3b[_0x2f8cba(0x271)]?.(_0x4bbc95),!_0x1193ca(_0x30b59b)&&!_0x1856a1?.(_0x1ea202[_0x2f8cba(0x61a)])&&(_0x282a0d=![],_0x52004d(_0x4bbc95),_0x7d48d9=!![]);}finally{if(_0x282a0d)Atomics[_0x2f8cba(0x58b)](_0x30b59b,_0x1baa8d,_0x5c8102,0x0);}return _0x7d48d9;}finally{_0x2895d2(_0x4bbc95);}}function _0x4471b8(_0x10573f,_0x53e612,{isBusy:_0x345404}={}){const _0x4c76de=_0x359217,_0x15f8ed=process[_0x4c76de(0x7af)],{sab:_0x21566e,hdr:_0x33ba1f}=_0x144ff1(_0x10573f,_0x53e612);try{_0x4e7d02(_0x33ba1f);const _0x459732=Atomics[_0x4c76de(0x22e)](_0x33ba1f,_0x1baa8d);if(_0x459732!==0x0){if(_0x459732===_0x15f8ed||!_0x352596(_0x459732))return _0x4c76de(0x28b);return _0x2e2163(_0x10573f,_0x53e612,_0x33ba1f,_0x459732);}if(_0x1193ca(_0x33ba1f))return _0x4c76de(0x353);if(_0x345404?.(_0x21566e))return _0x4c76de(0x127);if(Atomics[_0x4c76de(0x58b)](_0x33ba1f,_0x1baa8d,0x0,_0x15f8ed)!==0x0)return'retiring';if(_0x1193ca(_0x33ba1f)||_0x345404?.(_0x21566e))return Atomics[_0x4c76de(0x58b)](_0x33ba1f,_0x1baa8d,_0x15f8ed,0x0),_0x4c76de(0x353);return _0x52004d(_0x10573f),_0x4c76de(0x508);}finally{_0x2895d2(_0x10573f);}}const _0xb2d2e3=new Map(),_0x479ac5=new Set();function _0x1e5982(_0x2e43c0){const _0xb64ee8=_0x359217,_0x4810d8=process[_0xb64ee8(0x7af)];for(let _0x557982=0x0;_0x557982<_0x118a53;_0x557982++){if(Atomics[_0xb64ee8(0x22e)](_0x2e43c0,_0x495514+_0x557982)===_0x4810d8&&Atomics['load'](_0x2e43c0,_0x2e2d69+_0x557982)!==_0x301442)return!![];}return![];}function _0x28a4d4(_0x2ce9f6,_0x24f581,_0x25a685={}){const _0x30b9f6=_0x359217;let _0x2ee575=_0xb2d2e3[_0x30b9f6(0x294)](_0x2ce9f6);if(!_0x2ee575){const _0x3efefe=_0x565f45(_0x2ce9f6,_0x24f581,_0x25a685);_0x2ee575={'att':_0x3efefe,'dataBytes':_0x24f581,'refs':0x0,'isBusy':_0x25a685[_0x30b9f6(0x2f1)]??null,'onThreadExit':_0x25a685['onThreadExit']??null},_0xb2d2e3[_0x30b9f6(0x3c0)](_0x2ce9f6,_0x2ee575);}if(_0x25a685[_0x30b9f6(0x2f1)])_0x2ee575[_0x30b9f6(0x2f1)]=_0x25a685['isBusy'];if(_0x25a685[_0x30b9f6(0x355)])_0x2ee575[_0x30b9f6(0x355)]=_0x25a685[_0x30b9f6(0x355)];_0x2ee575['refs']++;let _0x268859=![];return{'sab':_0x2ee575[_0x30b9f6(0x3ae)][_0x30b9f6(0x61a)],'name':_0x2ce9f6,'release'(){const _0x4c38eb=_0x30b9f6;if(_0x268859)return![];_0x268859=!![];if(--_0x2ee575[_0x4c38eb(0xf7)]>0x0)return![];if(_0xb2d2e3['get'](_0x2ce9f6)===_0x2ee575)_0xb2d2e3['delete'](_0x2ce9f6);const _0x214425=_0x5992e6(_0x2ce9f6,_0x2ee575[_0x4c38eb(0x3a1)],_0x2ee575[_0x4c38eb(0x3ae)],_0x2ee575[_0x4c38eb(0x2f1)]);!_0x214425&&_0x96aeec&&_0x1e5982(_0x2ee575[_0x4c38eb(0x3ae)][_0x4c38eb(0x650)])&&_0x479ac5['add']({'name':_0x2ce9f6,'dataBytes':_0x2ee575['dataBytes'],'att':{..._0x2ee575[_0x4c38eb(0x3ae)],'slot':null},'isBusy':_0x2ee575[_0x4c38eb(0x2f1)],'onThreadExit':_0x2ee575[_0x4c38eb(0x355)]});if(_0x479ac5[_0x4c38eb(0x6ca)])_0x4e8929();return _0x214425;}};}function _0x68ba17(_0x2a4481){const _0x5e1c66=_0x359217;if(!(_0x2a4481>0x0))return 0x0;const _0x9ed125=process[_0x5e1c66(0x7af)];let _0x3cad84=0x0;const _0x5a2a53=({att:_0x3d630f,onThreadExit:_0x10640c})=>{const _0x11dfaa=_0x5e1c66;try{_0x10640c?.(_0x3d630f['sab'],_0x2a4481);}catch{}const {hdr:_0x370096}=_0x3d630f;for(let _0x473629=0x0;_0x473629<_0x118a53;_0x473629++){if(Atomics[_0x11dfaa(0x22e)](_0x370096,_0x495514+_0x473629)!==_0x9ed125||Atomics[_0x11dfaa(0x22e)](_0x370096,_0x2e2d69+_0x473629)!==_0x2a4481)continue;Atomics['store'](_0x370096,_0x2e2d69+_0x473629,0x0);if(Atomics['compareExchange'](_0x370096,_0x495514+_0x473629,_0x9ed125,0x0)===_0x9ed125)_0x3cad84++;}};for(const _0x5037c0 of _0xb2d2e3[_0x5e1c66(0x289)]())_0x5a2a53(_0x5037c0);for(const _0xe4ea52 of _0x479ac5)_0x5a2a53(_0xe4ea52);return _0x4e8929(),_0x3cad84;}function _0x4e8929(){const _0x55c51f=_0x359217;for(const _0x35000c of[..._0x479ac5]){if(_0x1e5982(_0x35000c['att'][_0x55c51f(0x650)]))continue;_0x479ac5[_0x55c51f(0x539)](_0x35000c),_0x5992e6(_0x35000c[_0x55c51f(0x339)],_0x35000c['dataBytes'],_0x35000c['att'],_0x35000c[_0x55c51f(0x2f1)]);}}return okdbShmSegment={'attachSegment':_0x28a4d4,'releaseThreadSlots':_0x68ba17,'segmentNameFor':_0x39c73d,'legacySegmentNameFor':_0x5b5d53,'segmentNameStyle':_0x18a852,'SEG_NAME_MAX':_0x3725d9,'retireIfUnused':_0x4471b8,'totalBytes':_0x32d055,'headerOffset':_0x414553,'MAX_SLOTS':_0x118a53,'_attachRaw':_0x565f45,'_detachRaw':_0x5992e6,'_takeover':_0x2e2163,'_mapByName':_0x144ff1,'_hooks':_0xc09b3b,'_registry':_0xb2d2e3,'_lingering':_0x479ac5,'_H':{'STATE':_0x1baa8d,'OVERFLOW':_0x3e8361,'NONCE_A':_0x505579,'NONCE_B':_0x41cca7,'SLOTS':_0x495514,'TIDS':_0x2e2d69}},okdbShmSegment;}var okdbShmGc,hasRequiredOkdbShmGc;function requireOkdbShmGc(){const _0x54293a=_0x3f6c2b;if(hasRequiredOkdbShmGc)return okdbShmGc;hasRequiredOkdbShmGc=0x1;const _0x377121=require$$0$1,_0x117a1d=require$$1,_0x57f28c=_0x54293a(0x5ef),_0x4ab862=0x18+0x3*0x100*0x4,_0x247dc0=0x18+0x2*0x100*0x4,_0x2c38d7=0xc;function _0x47e00a(){const {totalBytes:_0x15471d}=requireOkdbShmSegment();return new Set([0x0,0x8,0x18,_0x247dc0,_0x2c38d7,_0x15471d(_0x247dc0),_0x15471d(_0x4ab862),_0x15471d(_0x2c38d7)]);}function _0x5c95c9(_0x4bdc54,_0xc5bf2b,_0x330e64){const _0x49bb08=_0x54293a,{totalBytes:_0x412bbe}=requireOkdbShmSegment();if(_0x4bdc54[_0x49bb08(0x433)](_0x49bb08(0x631))||_0xc5bf2b===_0x2c38d7||_0xc5bf2b===_0x412bbe(_0x2c38d7))return _0x2c38d7;if(_0xc5bf2b===_0x412bbe(_0x4ab862))return _0x4ab862;if(_0xc5bf2b===_0x412bbe(_0x247dc0))return _0x247dc0;return _0x330e64===_0x49bb08(0x6fe)?_0x4ab862:_0x247dc0;}function _0x378b7e(){const _0x55cd23=_0x54293a,_0x595126=new Set(),_0x5226bb=[],_0x3f7380=_0x57f28c+'/';let _0x2dba53;try{_0x2dba53=_0x377121['readdirSync']('/proc')['filter'](_0xf2fb9=>/^\d+$/[_0x55cd23(0x3a9)](_0xf2fb9));}catch{throw new Error(_0x55cd23(0x67d));}for(const _0x3bbc80 of _0x2dba53){const _0x37b20c=_0x117a1d['join'](_0x55cd23(0x790),_0x3bbc80);let _0x5e75ff=!![];try{const _0x3639db=_0x377121[_0x55cd23(0x2ef)](_0x117a1d[_0x55cd23(0x3de)](_0x37b20c,'maps'),_0x55cd23(0x3f0));let _0x3ac89c=_0x3639db[_0x55cd23(0x1fe)](_0x3f7380);while(_0x3ac89c!==-0x1){const _0x285e4e=_0x3639db['indexOf']('\x0a',_0x3ac89c),_0x4fb660=_0x3639db['slice'](_0x3ac89c+_0x3f7380[_0x55cd23(0x330)],_0x285e4e===-0x1?undefined:_0x285e4e);if(!_0x4fb660[_0x55cd23(0x433)](_0x55cd23(0x4f0)))_0x595126[_0x55cd23(0x73d)](_0x4fb660);_0x3ac89c=_0x3639db[_0x55cd23(0x1fe)](_0x3f7380,_0x3ac89c+0x1);}}catch(_0x384866){if(_0x384866[_0x55cd23(0x4bc)]!==_0x55cd23(0x2ea)&&_0x384866[_0x55cd23(0x4bc)]!==_0x55cd23(0x66e))_0x5e75ff=![];}try{for(const _0x92f910 of _0x377121[_0x55cd23(0x783)](_0x117a1d[_0x55cd23(0x3de)](_0x37b20c,'fd'))){let _0x22e15a;try{_0x22e15a=_0x377121['readlinkSync'](_0x117a1d[_0x55cd23(0x3de)](_0x37b20c,'fd',_0x92f910));}catch{continue;}if(_0x22e15a['startsWith'](_0x3f7380)&&!_0x22e15a[_0x55cd23(0x433)]('\x20(deleted)'))_0x595126[_0x55cd23(0x73d)](_0x22e15a[_0x55cd23(0x333)](_0x3f7380['length']));}}catch(_0x4dab90){if(_0x4dab90[_0x55cd23(0x4bc)]!=='ENOENT'&&_0x4dab90[_0x55cd23(0x4bc)]!==_0x55cd23(0x66e))_0x5e75ff=![];}if(!_0x5e75ff){let _0x401c1d=null;try{_0x401c1d=_0x377121[_0x55cd23(0x3b7)](_0x37b20c)[_0x55cd23(0x714)];}catch{}let _0x28363a='?';try{_0x28363a=_0x377121[_0x55cd23(0x2ef)](_0x117a1d[_0x55cd23(0x3de)](_0x37b20c,_0x55cd23(0x706)),_0x55cd23(0x3f0))[_0x55cd23(0x7ad)]();}catch{}if(_0x401c1d!==null)_0x5226bb[_0x55cd23(0x5d8)]({'pid':Number(_0x3bbc80),'uid':_0x401c1d,'comm':_0x28363a});}}return{'inUse':_0x595126,'unreadable':_0x5226bb};}function _0x3c88b3({prefix:prefix='-tmp-',dryRun:dryRun=![],anySize:anySize=![],force:force=![],log:log=()=>{}}={}){const _0x50e563=_0x54293a;if(process['platform']!==_0x50e563(0x301)||!_0x377121[_0x50e563(0x2d6)](_0x57f28c))throw new Error(_0x50e563(0x18e));const _0x420ba3=process['getuid'](),_0x244480=_0x420ba3===0x0,_0x289e5b=_0x47e00a(),{inUse:_0x493361,unreadable:_0x2fd23d}=_0x378b7e(),_0x2cde0a=_0x2fd23d[_0x50e563(0x64e)](_0x56bcd6=>_0x244480||_0x56bcd6[_0x50e563(0x714)]===_0x420ba3),_0x106f7e={'dryRun':dryRun,'prefix':prefix,'scanned':0x0,'matched':0x0,'inUse':0x0,'notOkdbShaped':0x0,'foreignOwner':0x0,'candidates':0x0,'candidatesLegacyNamed':0x0,'candidateBytes':0x0,'candidateAllocated':0x0,'deleted':0x0,'deletedAllocated':0x0,'skippedByProtocol':0x0,'errors':0x0,'unreadablePids':_0x2fd23d[_0x50e563(0x330)],'blindPids':_0x2cde0a['map'](_0x44ed36=>_0x44ed36[_0x50e563(0x7af)]),'blindCommands':_0x277d97(_0x2cde0a)};if(_0x2cde0a['length']&&!dryRun&&!force)throw new Error(_0x50e563(0x1cb)+_0x2cde0a['length']+_0x50e563(0x4b9)+('segments\x20('+_0x106f7e[_0x50e563(0x4ec)]+_0x50e563(0x2d1))+'otherwise\x20rerun\x20as\x20root.');const {retireIfUnused:_0xe21c24,segmentNameStyle:_0x39c9e2,_registry:_0x4d2552}=requireOkdbShmSegment();let _0x373852=null;if(!dryRun)try{require('v8')[_0x50e563(0x272)](_0x50e563(0x71c)),_0x373852=require('vm')[_0x50e563(0x39b)]('gc');}catch{}const _0x11d250=_0x377121[_0x50e563(0x634)](_0x57f28c);try{let _0x4c705a,_0x3fec6e=0x0;while(_0x4c705a=_0x11d250['readSync']()){_0x106f7e[_0x50e563(0x53a)]++;const _0x1a8753=_0x4c705a['name'];if(!_0x1a8753[_0x50e563(0x1a9)](prefix))continue;_0x106f7e[_0x50e563(0x797)]++;if(_0x4d2552[_0x50e563(0x229)](_0x1a8753)){_0x106f7e[_0x50e563(0x16d)]++;continue;}if(_0x493361[_0x50e563(0x229)](_0x1a8753)){_0x106f7e[_0x50e563(0x16d)]++;continue;}let _0x59acfd;try{_0x59acfd=_0x377121[_0x50e563(0x237)](_0x117a1d[_0x50e563(0x3de)](_0x57f28c,_0x1a8753));}catch{continue;}if(!_0x59acfd[_0x50e563(0x733)]())continue;const _0x15499b=_0x39c9e2(_0x1a8753);if(!_0x15499b||!anySize&&!_0x289e5b[_0x50e563(0x229)](_0x59acfd['size'])){_0x106f7e[_0x50e563(0x3c3)]++;continue;}if(!_0x244480&&_0x59acfd[_0x50e563(0x714)]!==_0x420ba3){_0x106f7e['foreignOwner']++;continue;}_0x106f7e['candidates']++;if(_0x15499b===_0x50e563(0x195))_0x106f7e[_0x50e563(0x44e)]++;_0x106f7e['candidateBytes']+=_0x59acfd[_0x50e563(0x6ca)],_0x106f7e[_0x50e563(0x5a3)]+=_0x59acfd[_0x50e563(0x31a)]*0x200;if(dryRun)continue;const _0x203bdc=_0x5c95c9(_0x1a8753,_0x59acfd[_0x50e563(0x6ca)],_0x15499b);try{const _0x5cdd60=_0xe21c24(_0x1a8753,_0x203bdc);_0x5cdd60===_0x50e563(0x508)?(_0x106f7e[_0x50e563(0x137)]++,_0x106f7e['deletedAllocated']+=_0x59acfd[_0x50e563(0x31a)]*0x200):(_0x106f7e[_0x50e563(0x1d1)]++,log(_0x50e563(0x767)+_0x1a8753+':\x20'+_0x5cdd60));}catch(_0x40781a){_0x106f7e['errors']++,log(_0x50e563(0x276)+_0x1a8753+':\x20'+_0x40781a['message']);}_0x373852&&++_0x3fec6e>=0x200&&(_0x3fec6e=0x0,_0x373852());}}finally{_0x11d250[_0x50e563(0x1ab)]();}return _0x106f7e;}function _0x277d97(_0x124d72){const _0x3afb09=_0x54293a,_0x1cd8e5=new Map();for(const _0x23b658 of _0x124d72)_0x1cd8e5[_0x3afb09(0x3c0)](_0x23b658[_0x3afb09(0x706)],(_0x1cd8e5[_0x3afb09(0x294)](_0x23b658[_0x3afb09(0x706)])??0x0)+0x1);return[..._0x1cd8e5]['map'](([_0x1adf00,_0x1c1fdc])=>_0x1c1fdc>0x1?_0x1adf00+'×'+_0x1c1fdc:_0x1adf00)['join'](',\x20');}function _0xca45ac(_0x2046aa){const _0x1f99c9=_0x54293a,_0x5330aa=['B',_0x1f99c9(0x646),_0x1f99c9(0x32f),_0x1f99c9(0x205),'TiB'];let _0x4c46bf=0x0;while(_0x2046aa>=0x400&&_0x4c46bf<_0x5330aa[_0x1f99c9(0x330)]-0x1){_0x2046aa/=0x400,_0x4c46bf++;}return _0x2046aa[_0x1f99c9(0xc6)](_0x4c46bf?0x1:0x0)+'\x20'+_0x5330aa[_0x4c46bf];}function _0x387030(_0x13bb8a){const _0x275b21=_0x54293a,_0x505f87=[_0x275b21(0x280)+(_0x13bb8a[_0x275b21(0x3ca)]?'\x20(dry\x20run)':'')+_0x275b21(0x7c9)+JSON[_0x275b21(0x1c5)](_0x13bb8a[_0x275b21(0x6b2)]),_0x275b21(0x6e7)+_0x13bb8a[_0x275b21(0x53a)]+_0x275b21(0x793)+_0x57f28c,_0x275b21(0x5d4)+_0x13bb8a[_0x275b21(0x797)],_0x275b21(0x594)+_0x13bb8a[_0x275b21(0x16d)],'\x20\x20not\x20okdb-shaped\x20\x20\x20\x20'+_0x13bb8a['notOkdbShaped'],'\x20\x20other\x20owner\x20\x20\x20\x20\x20\x20\x20\x20'+_0x13bb8a[_0x275b21(0x1db)],'\x20\x20unused\x20(deletable)\x20'+_0x13bb8a['candidates']+_0x275b21(0x1c6)+_0xca45ac(_0x13bb8a['candidateBytes'])+_0x275b21(0x287)+_0xca45ac(_0x13bb8a[_0x275b21(0x5a3)])+'\x20allocated'+(_0x13bb8a[_0x275b21(0x44e)]?'\x20('+_0x13bb8a[_0x275b21(0x44e)]+_0x275b21(0x586):'')];if(!_0x13bb8a[_0x275b21(0x3ca)]){_0x505f87['push'](_0x275b21(0x354)+_0x13bb8a['deleted']+'\x20—\x20'+_0xca45ac(_0x13bb8a[_0x275b21(0x54a)])+'\x20freed');if(_0x13bb8a[_0x275b21(0x1d1)])_0x505f87[_0x275b21(0x5d8)](_0x275b21(0x550)+_0x13bb8a['skippedByProtocol']);if(_0x13bb8a['errors'])_0x505f87[_0x275b21(0x5d8)](_0x275b21(0x1d8)+_0x13bb8a[_0x275b21(0x69e)]);}return _0x13bb8a[_0x275b21(0x6ea)]&&_0x505f87[_0x275b21(0x5d8)](_0x275b21(0x279)+_0x13bb8a[_0x275b21(0x6ea)]+'\x20process(es)\x20had\x20unreadable\x20maps'+(_0x13bb8a['blindPids'][_0x275b21(0x330)]?'\x20—\x20'+_0x13bb8a[_0x275b21(0x2bc)][_0x275b21(0x330)]+_0x275b21(0x260)+(_0x13bb8a[_0x275b21(0x4ec)]+_0x275b21(0x13c)):'\x20(other\x20users;\x20cannot\x20map\x200600\x20segments)')),_0x505f87['join']('\x0a');}function _0x182090(_0x2ad949){const _0x506b86=_0x54293a,_0x319eec={'prefix':'-tmp-','dryRun':![],'anySize':![],'force':![],'verbose':![]};for(let _0x234879=0x0;_0x234879<_0x2ad949['length'];_0x234879++){const _0x2df8a0=_0x2ad949[_0x234879];if(_0x2df8a0===_0x506b86(0x78d)||_0x2df8a0==='-n')_0x319eec[_0x506b86(0x3ca)]=!![];else{if(_0x2df8a0===_0x506b86(0x739))_0x319eec[_0x506b86(0x756)]=!![];else{if(_0x2df8a0===_0x506b86(0x227))_0x319eec[_0x506b86(0x3fb)]=!![];else{if(_0x2df8a0===_0x506b86(0x641)||_0x2df8a0==='-v')_0x319eec[_0x506b86(0x2a0)]=!![];else{if(_0x2df8a0===_0x506b86(0x15a))_0x319eec['prefix']=_0x2ad949[++_0x234879]??'';else{if(_0x2df8a0['startsWith'](_0x506b86(0x40a)))_0x319eec['prefix']=_0x2df8a0[_0x506b86(0x333)](_0x506b86(0x40a)[_0x506b86(0x330)]);else{if(_0x2df8a0==='--help'||_0x2df8a0==='-h')_0x319eec[_0x506b86(0x5c0)]=!![];else throw new Error('shm-gc:\x20unknown\x20argument\x20'+_0x2df8a0);}}}}}}}return _0x319eec;}const _0x43f826=_0x54293a(0x635);function _0x9ddfbc(_0x2cf8fa){const _0x50233c=_0x54293a;let _0x236723;try{_0x236723=_0x182090(_0x2cf8fa);}catch(_0x4adf09){return console[_0x50233c(0x5f2)](_0x4adf09[_0x50233c(0x7b6)]),console[_0x50233c(0x5f2)](_0x43f826),0x2;}if(_0x236723[_0x50233c(0x5c0)])return console['log'](_0x43f826),0x0;const _0x343d51=_0x3c88b3({..._0x236723,'log':_0x236723[_0x50233c(0x2a0)]?_0x330682=>console[_0x50233c(0x515)](_0x330682):undefined});return console[_0x50233c(0x515)](_0x387030(_0x343d51)),_0x343d51['errors']?0x1:0x0;}return okdbShmGc={'shmGc':_0x3c88b3,'formatReport':_0x387030,'main':_0x9ddfbc,'scanInUse':_0x378b7e,'ENV_DATA_BYTES':_0x4ab862,'LEGACY_ENV_DATA_BYTES':_0x247dc0,'BOOT_DATA_BYTES':_0x2c38d7},okdbShmGc;}var hasRequiredOkdb;function requireOkdb(){const _0x507df9=_0x3f6c2b;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x507df9(0xd6)]();}catch{}const _0x6a5b17=require$$1,_0x2ed8f5=require$$0$1,{resolveWorkers:_0x2037c8,isShmbufNative:_0xc10c15}=requireOkdbWorkers();function _0x200209(_0x4b28a2){const _0x2e8d01=_0x507df9,_0x5c5a32=_0x4b28a2[_0x2e8d01(0x333)](0x2),_0xc44db0={};let _0x2ee1a5=0x0;while(_0x2ee1a5<_0x5c5a32[_0x2e8d01(0x330)]){const _0x4f6026=_0x5c5a32[_0x2ee1a5];if(_0x4f6026===_0x2e8d01(0x22d)||_0x4f6026==='-p')_0xc44db0['port']=Number(_0x5c5a32[++_0x2ee1a5]);else{if(_0x4f6026===_0x2e8d01(0x1ff)||_0x4f6026==='-d')_0xc44db0[_0x2e8d01(0x58f)]=_0x5c5a32[++_0x2ee1a5];else{if(_0x4f6026===_0x2e8d01(0x180)||_0x4f6026==='-k')_0xc44db0[_0x2e8d01(0x17d)]=_0x5c5a32[++_0x2ee1a5];else{if(_0x4f6026==='--config'||_0x4f6026==='-c')_0xc44db0[_0x2e8d01(0x4e4)]=_0x5c5a32[++_0x2ee1a5];else{if(_0x4f6026===_0x2e8d01(0x716))_0xc44db0[_0x2e8d01(0x341)]=_0x5c5a32[++_0x2ee1a5];else{if(_0x4f6026==='--no-repl')_0xc44db0[_0x2e8d01(0x492)]=!![];else{if(_0x4f6026==='--no-admin')_0xc44db0[_0x2e8d01(0x2a3)]=!![];else{if(_0x4f6026===_0x2e8d01(0x676))_0xc44db0['workers']=_0x5c5a32[++_0x2ee1a5];else{if(_0x4f6026==='--no-cluster')_0xc44db0[_0x2e8d01(0x3db)]=!![];else{if(_0x4f6026===_0x2e8d01(0x501)||_0x4f6026==='-e')_0xc44db0[_0x2e8d01(0x52a)]=_0x5c5a32[++_0x2ee1a5];else{if(_0x4f6026===_0x2e8d01(0x198))_0xc44db0['types']=_0x5c5a32[++_0x2ee1a5];else{if(_0x4f6026===_0x2e8d01(0x18d))_0xc44db0[_0x2e8d01(0x47a)]=!![];else{if(_0x4f6026===_0x2e8d01(0x165))_0xc44db0[_0x2e8d01(0x399)]=!![];else{if(_0x4f6026===_0x2e8d01(0x5c3))_0xc44db0[_0x2e8d01(0x32d)]=!![];else{if(_0x4f6026===_0x2e8d01(0x530))_0xc44db0[_0x2e8d01(0x4a5)]=!![];else{if(_0x4f6026===_0x2e8d01(0x4a3)){const _0x52abc8=[];while(_0x2ee1a5+0x1<_0x5c5a32['length']&&!_0x5c5a32[_0x2ee1a5+0x1][_0x2e8d01(0x1a9)]('--')){_0x52abc8[_0x2e8d01(0x5d8)](_0x5c5a32[++_0x2ee1a5]);}_0xc44db0[_0x2e8d01(0x375)]=_0x52abc8['length']>0x0?_0x52abc8:!![];}else{if(_0x4f6026===_0x2e8d01(0x44f))_0xc44db0[_0x2e8d01(0x669)]=!![];else{if(_0x4f6026===_0x2e8d01(0x577))_0xc44db0['name']=_0x5c5a32[++_0x2ee1a5];else{if(_0x4f6026===_0x2e8d01(0x4e8))_0xc44db0[_0x2e8d01(0x295)]=_0x5c5a32[++_0x2ee1a5];else{if(_0x4f6026===_0x2e8d01(0x6cb))_0xc44db0[_0x2e8d01(0x312)]=_0x5c5a32[++_0x2ee1a5];else{if(_0x4f6026===_0x2e8d01(0xeb))_0xc44db0[_0x2e8d01(0x39d)]=_0x5c5a32[++_0x2ee1a5];else{if(_0x4f6026===_0x2e8d01(0x15d))_0xc44db0[_0x2e8d01(0x117)]=_0x5c5a32[++_0x2ee1a5];else{if(_0x4f6026===_0x2e8d01(0x76b))_0xc44db0[_0x2e8d01(0x291)]=_0x5c5a32[++_0x2ee1a5];else{if(_0x4f6026===_0x2e8d01(0x6b0))_0xc44db0[_0x2e8d01(0x2e5)]=_0x5c5a32[++_0x2ee1a5];else{if(_0x4f6026===_0x2e8d01(0x5b5)||_0x4f6026==='-u')_0xc44db0[_0x2e8d01(0x51e)]=_0x5c5a32[++_0x2ee1a5];else{if(_0x4f6026===_0x2e8d01(0x317))_0xc44db0['selfAddress']=_0x5c5a32[++_0x2ee1a5];else{if(_0x4f6026===_0x2e8d01(0x231)||_0x4f6026==='-v'){const _0x791c9e=require$$3;console[_0x2e8d01(0x515)](_0x791c9e[_0x2e8d01(0x1ce)]),process['exit'](0x0);}else(_0x4f6026===_0x2e8d01(0x30a)||_0x4f6026==='-h')&&(_0x1d9cc4(),process[_0x2e8d01(0x256)](0x0));}}}}}}}}}}}}}}}}}}}}}}}}}}_0x2ee1a5++;}return _0xc44db0;}function _0x1d9cc4(){const _0x53c437=_0x507df9;console[_0x53c437(0x515)](_0x53c437(0x160));}const _0x36296f=new Set([_0x507df9(0x5a8),_0x507df9(0x743),_0x507df9(0x593),_0x507df9(0x5f2)]);function _0x25f13d(_0x5c32c6){const _0x81e95b=_0x507df9,_0x257eb1=_0x5c32c6[_0x81e95b(0x4e4)]?_0x6a5b17['resolve'](_0x5c32c6[_0x81e95b(0x4e4)]):_0x6a5b17[_0x81e95b(0x2f4)](_0x81e95b(0x1ea));let _0x4dd58a={};if(_0x2ed8f5['existsSync'](_0x257eb1))try{const _0x130f7e=_0x2ed8f5[_0x81e95b(0x2ef)](_0x257eb1,_0x81e95b(0x3f0))[_0x81e95b(0x16b)](/^\uFEFF/,'');_0x4dd58a=JSON[_0x81e95b(0x2e3)](_0x130f7e),console[_0x81e95b(0x515)](_0x81e95b(0x730)+_0x257eb1);}catch(_0x3bec42){console['error']('[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20'+_0x257eb1+':\x20'+_0x3bec42[_0x81e95b(0x7b6)]),process['exit'](0x1);}const _0x1b792f={'port':process.env.OKDB_PORT?Number(process.env.OKDB_PORT):undefined,'path':process.env.OKDB_PATH??undefined,'key':process.env.OKDB_KEY??undefined,'logLevel':process.env.OKDB_LOG_LEVEL??undefined,'noRepl':process.env.OKDB_NO_REPL==='1'?!![]:undefined,'noAdmin':process.env.OKDB_NO_ADMIN==='1'?!![]:undefined},_0x3d1d16={'port':_0x5c32c6[_0x81e95b(0x2fa)]??_0x4dd58a['port']??_0x1b792f[_0x81e95b(0x2fa)]??0x2124,'dbPath':_0x5c32c6['path']??_0x4dd58a[_0x81e95b(0x58f)]??_0x1b792f[_0x81e95b(0x58f)]??_0x81e95b(0x2b5),'key':_0x5c32c6[_0x81e95b(0x17d)]??_0x4dd58a[_0x81e95b(0x17d)]??_0x1b792f[_0x81e95b(0x17d)]??undefined,'logLevel':_0x5c32c6[_0x81e95b(0x341)]??_0x4dd58a[_0x81e95b(0x341)]??_0x1b792f['logLevel']??_0x81e95b(0x743),'noRepl':_0x5c32c6[_0x81e95b(0x492)]??_0x4dd58a[_0x81e95b(0x492)]??_0x1b792f[_0x81e95b(0x492)]??![],'noAdmin':_0x5c32c6['noAdmin']??_0x4dd58a[_0x81e95b(0x2a3)]??_0x1b792f[_0x81e95b(0x2a3)]??![],'admin':_0x4dd58a[_0x81e95b(0x176)]??{},'api':_0x4dd58a[_0x81e95b(0x421)]??undefined,'auth':_0x4dd58a[_0x81e95b(0x788)]??undefined,'mcp':_0x4dd58a[_0x81e95b(0x30c)]??undefined,'http':_0x4dd58a[_0x81e95b(0x36a)]??undefined,'backup':_0x4dd58a[_0x81e95b(0x42c)]??undefined,'timeMachine':_0x4dd58a[_0x81e95b(0x11f)]!==![]?_0x4dd58a[_0x81e95b(0x11f)]??{}:![],'processors':_0x4dd58a['processors'],'engines':_0x4dd58a['engines'],'compaction':_0x4dd58a[_0x81e95b(0x5ed)]};if(_0x5c32c6[_0x81e95b(0x3db)])_0x3d1d16['noCluster']=!![];if(_0x5c32c6[_0x81e95b(0x572)]!==undefined)_0x3d1d16[_0x81e95b(0x62e)]=_0x5c32c6[_0x81e95b(0x572)];_0x5c32c6[_0x81e95b(0x375)]!==undefined&&(_0x3d1d16['auth']=_0x3d1d16[_0x81e95b(0x788)]||{},_0x3d1d16['auth'][_0x81e95b(0x375)]=_0x5c32c6[_0x81e95b(0x375)]);_0x5c32c6['logRequests']&&(_0x3d1d16[_0x81e95b(0x5a8)]=_0x3d1d16[_0x81e95b(0x5a8)]||{},_0x3d1d16[_0x81e95b(0x5a8)]['logRequests']=!![]);(!Number[_0x81e95b(0x2b4)](_0x3d1d16[_0x81e95b(0x2fa)])||_0x3d1d16[_0x81e95b(0x2fa)]<0x1||_0x3d1d16[_0x81e95b(0x2fa)]>0xffff)&&(console[_0x81e95b(0x5f2)](_0x81e95b(0x6f7)+_0x3d1d16[_0x81e95b(0x2fa)]+_0x81e95b(0x273)),process['exit'](0x1));!_0x36296f[_0x81e95b(0x229)](_0x3d1d16['logLevel'])&&(console[_0x81e95b(0x5f2)](_0x81e95b(0x6cc)+_0x3d1d16['logLevel']+_0x81e95b(0x159)),process['exit'](0x1));const _0x2930d8=_0x3d1d16['http']?.['host'];_0x2930d8!==undefined&&!(typeof _0x2930d8==='string'&&_0x2930d8)&&!(Array[_0x81e95b(0x654)](_0x2930d8)&&_0x2930d8['length']&&_0x2930d8[_0x81e95b(0x753)](_0x3f4ab6=>typeof _0x3f4ab6===_0x81e95b(0x1ae)&&_0x3f4ab6))&&(console[_0x81e95b(0x5f2)](_0x81e95b(0x7c6)+JSON[_0x81e95b(0x1c5)](_0x2930d8)+_0x81e95b(0x778)),process[_0x81e95b(0x256)](0x1));for(const _0x1f8046 of _0x45c958){_0x3d1d16[_0x1f8046]!==undefined&&typeof _0x3d1d16[_0x1f8046]!==_0x81e95b(0x140)&&(console[_0x81e95b(0x5f2)]('[okdb]\x20invalid\x20config\x20\x22'+_0x1f8046+'\x22:\x20'+JSON[_0x81e95b(0x1c5)](_0x3d1d16[_0x1f8046])+_0x81e95b(0x675)),process[_0x81e95b(0x256)](0x1));}return _0x3d1d16;}const _0x45c958=[_0x507df9(0x19d),_0x507df9(0x2bb),_0x507df9(0x5ed)];function _0x2c4455(_0x54c351){const _0x3d29b5=_0x507df9;return!!(_0x54c351&&typeof _0x54c351===_0x3d29b5(0x24d)&&!Array[_0x3d29b5(0x654)](_0x54c351)&&Object['keys'](_0x54c351)[_0x3d29b5(0x330)]>0x0);}function _0x5b24a3(_0x3a6f21){const _0x38d076=_0x507df9;return{..._0x3a6f21[_0x38d076(0x17d)]?{'encryptionKey':_0x3a6f21[_0x38d076(0x17d)]}:{},'engines':![],'processors':![],'compaction':![]};}const _0x155d85=!process[_0x507df9(0x663)][_0x507df9(0x250)]||!!process.env.NO_COLOR;function _0x934510(_0x33e137,_0x54331e){const _0x4e3a94=_0x507df9;return _0x155d85?_0x54331e:'\x1b['+_0x33e137+'m'+_0x54331e+_0x4e3a94(0x52c);}function _0x4b32cc(_0x1391df){const _0x550180=_0x507df9;if(!_0x1391df||_0x1391df[_0x550180(0x330)]===0x0)return;const _0x55c65c='─'['repeat'](0x38);process[_0x550180(0x331)][_0x550180(0x4c7)]('\x0a'),process[_0x550180(0x331)][_0x550180(0x4c7)](_0x934510('33',_0x550180(0x678)+_0x1391df['length']+_0x550180(0x1f5)+(_0x1391df[_0x550180(0x330)]>0x1?'S':'')+'\x0a')),process['stderr'][_0x550180(0x4c7)]('\x20\x20'+_0x55c65c+'\x0a');for(const _0x404977 of _0x1391df){const _0x4b9c84=_0x404977[_0x550180(0x33e)]===_0x550180(0x5f2)?_0x934510('31',_0x550180(0x569)):_0x934510('33',_0x550180(0x35b));process[_0x550180(0x331)]['write'](_0x4b9c84+'\x20\x20'+_0x934510('1',_0x404977['title'])+'\x0a'),process[_0x550180(0x331)][_0x550180(0x4c7)](_0x550180(0x677)+_0x404977['message']+'\x0a');if(_0x404977['hint'])process['stderr']['write'](_0x550180(0x677)+_0x934510('2','Hint:\x20'+_0x404977[_0x550180(0x504)])+'\x0a');process['stderr'][_0x550180(0x4c7)]('\x0a');}process[_0x550180(0x331)][_0x550180(0x4c7)]('\x20\x20'+_0x55c65c+'\x0a\x0a');}function _0x5dcff2(_0x5f09ea,_0x2a52c1,_0x5ae54d={}){const _0x39b27f=_0x507df9,_0x258e6f=_0x5f09ea[_0x39b27f(0x36a)][_0x39b27f(0xfd)](_0x2a52c1,_0x5ae54d);if(_0x258e6f&&_0x258e6f[_0x39b27f(0x7b1)])return Promise[_0x39b27f(0x2f4)](_0x258e6f);const _0x44a31b=_0x5f09ea[_0x39b27f(0x36a)]['servers']?.[_0x39b27f(0x330)]?_0x5f09ea[_0x39b27f(0x36a)][_0x39b27f(0x121)]:[_0x258e6f];return new Promise((_0x6d9110,_0x3b309b)=>{const _0x132a51=_0x39b27f;_0x258e6f[_0x132a51(0x51b)](_0x132a51(0x5f2),_0x3b309b),Promise['all'](_0x44a31b[_0x132a51(0x6d7)](_0x491c4c=>_0x491c4c['listening']?null:new Promise(_0x484488=>_0x491c4c[_0x132a51(0x51b)]('listening',_0x484488))))[_0x132a51(0x1dd)](()=>_0x6d9110(_0x258e6f));});}function _0xc62b2d(_0x2d489b){const _0x388f67=_0x507df9;return _0x2d489b['http']?.[_0x388f67(0x75f)]!==undefined?{'host':_0x2d489b[_0x388f67(0x36a)][_0x388f67(0x75f)]}:{};}async function _0xa35f35(_0x3c5372){const _0x32fa55=_0x507df9,_0x56930c=require$$4$1;console[_0x32fa55(0x515)](_0x32fa55(0x2c5));let _0x40dc33=!![];const _0xa01f50=(_0x530bed,_0x54e146)=>{const _0x1227f5=_0x32fa55;console[_0x1227f5(0x515)]('\x20\x20'+(_0x530bed?'✓':'✗')+'\x20'+_0x54e146);if(!_0x530bed)_0x40dc33=![];},_0x14a25f=Number(process[_0x32fa55(0x1ce)][_0x32fa55(0x16b)]('v','')[_0x32fa55(0x1e8)]('.')[0x0]);_0xa01f50(_0x14a25f>=0x12,_0x32fa55(0x548)+process['version']+(_0x14a25f<0x12?_0x32fa55(0x3e9):''));const _0x228f5d=_0x6a5b17[_0x32fa55(0x2f4)](_0x3c5372[_0x32fa55(0x445)]);try{_0x2ed8f5[_0x32fa55(0x1b1)](_0x228f5d,{'recursive':!![]});const _0x164726=_0x6a5b17[_0x32fa55(0x3de)](_0x228f5d,_0x32fa55(0x6e8));_0x2ed8f5['writeFileSync'](_0x164726,''),_0x2ed8f5[_0x32fa55(0x5e3)](_0x164726),_0xa01f50(!![],_0x32fa55(0x57b)+_0x228f5d);}catch(_0x2bfb75){_0xa01f50(![],_0x32fa55(0x4a1)+_0x228f5d+_0x32fa55(0x61f)+_0x2bfb75['message']+')');}const _0x6ea3ea=await new Promise(_0x382e04=>{const _0x1478b5=_0x32fa55,_0x7d41e3=_0x56930c[_0x1478b5(0x264)]();_0x7d41e3[_0x1478b5(0x51b)](_0x1478b5(0x5f2),()=>_0x382e04(![])),_0x7d41e3[_0x1478b5(0x51b)]('listening',()=>{const _0x125c69=_0x1478b5;_0x7d41e3[_0x125c69(0x57c)](),_0x382e04(!![]);}),_0x7d41e3[_0x1478b5(0xfd)](_0x3c5372['port'],_0x1478b5(0xc2));});_0xa01f50(_0x6ea3ea,_0x32fa55(0x7bc)+_0x3c5372[_0x32fa55(0x2fa)]+'\x20'+(_0x6ea3ea?_0x32fa55(0xfc):_0x32fa55(0x782)));const _0x2fbb9d=_0x6a5b17[_0x32fa55(0x2f4)](_0x32fa55(0x1ea));if(_0x2ed8f5[_0x32fa55(0x2d6)](_0x2fbb9d))try{JSON[_0x32fa55(0x2e3)](_0x2ed8f5[_0x32fa55(0x2ef)](_0x2fbb9d,_0x32fa55(0x3f0))[_0x32fa55(0x16b)](/^\uFEFF/,'')),_0xa01f50(!![],_0x32fa55(0x1a8)+_0x2fbb9d);}catch(_0x1c62cb){_0xa01f50(![],_0x32fa55(0x7b0)+_0x1c62cb['message']);}else _0xa01f50(!![],_0x32fa55(0x612));if(_0xc10c15()){const _0x3f46ba=_0x2037c8(_0x3c5372,{'shmbufNative':!![]});_0xa01f50(!![],_0x32fa55(0x41d)+_0x3f46ba+'\x20worker'+(_0x3f46ba===0x1?'':'s')+')');}else _0xa01f50(!![],'cluster:\x20unavailable\x20(shmbuf\x20native\x20missing)\x20—\x20running\x20single-process');if(!_0x6ea3ea)try{const _0x33f909=require('../okdb'),_0x324415=new _0x33f909(_0x228f5d,{'engines':![],'processors':![],'compaction':![],'auth':{'open':!![]}});await _0x324415[_0x32fa55(0x375)]();try{await _0x324415[_0x32fa55(0x25f)][_0x32fa55(0x375)]({'reader':!![]});const _0x571656=_0x324415[_0x32fa55(0x25f)][_0x32fa55(0x210)](),_0x439de0=_0x571656[_0x32fa55(0x64e)](_0x21edba=>_0x21edba[_0x32fa55(0x130)]!=null)[_0x32fa55(0x330)];_0xa01f50(!![],_0x32fa55(0x611)+_0x571656[_0x32fa55(0x330)]+'\x20process'+(_0x571656['length']===0x1?'':'es')+'\x20('+_0x439de0+_0x32fa55(0x25b));}finally{await _0x324415['close']();}}catch{}console['log'](''),_0x40dc33?console[_0x32fa55(0x515)](_0x32fa55(0x455)):(console['log']('\x20\x20Some\x20checks\x20failed.\x0a'),process[_0x32fa55(0x256)](0x1));}async function _0x4a0ecd(){const _0x2d9fed=_0x507df9,_0x1fbf6f=_0x6a5b17[_0x2d9fed(0x2f4)](_0x2d9fed(0x1ea));!_0x2ed8f5['existsSync'](_0x1fbf6f)?(_0x2ed8f5['writeFileSync'](_0x1fbf6f,JSON[_0x2d9fed(0x1c5)]({'port':0x2124,'path':_0x2d9fed(0x2b5),'logLevel':_0x2d9fed(0x743),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x2d9fed(0x515)](_0x2d9fed(0x1af))):console[_0x2d9fed(0x515)](_0x2d9fed(0x5b8));const _0x51f8c1=_0x6a5b17[_0x2d9fed(0x2f4)](_0x2d9fed(0x2b5));!_0x2ed8f5['existsSync'](_0x51f8c1)?(_0x2ed8f5[_0x2d9fed(0x1b1)](_0x51f8c1,{'recursive':!![]}),console[_0x2d9fed(0x515)](_0x2d9fed(0x302))):console[_0x2d9fed(0x515)](_0x2d9fed(0x63d)),console[_0x2d9fed(0x515)](_0x2d9fed(0x362));}async function _0x4ef324(_0x1ac221){const _0x284412=_0x507df9,_0x418d8d=_0x6a5b17[_0x284412(0x2f4)](_0x1ac221[_0x284412(0x445)]);if(!_0x2ed8f5[_0x284412(0x2d6)](_0x418d8d)){console['log'](_0x284412(0x668)+_0x418d8d+'\x20does\x20not\x20exist');return;}const _0x14f861=require$$0$3,_0x5d7c48=_0x14f861[_0x284412(0x7a1)]({'input':process[_0x284412(0x3da)],'output':process[_0x284412(0x663)]}),_0x4aa29d=await new Promise(_0x5bd145=>_0x5d7c48[_0x284412(0x545)](_0x284412(0x13a)+_0x418d8d+_0x284412(0x35e),_0x5bd145));_0x5d7c48[_0x284412(0x57c)](),console['log']('');if(_0x4aa29d[_0x284412(0x7ad)]()[_0x284412(0x3af)]()!==_0x284412(0xf6)){console['log'](_0x284412(0x3c9));return;}let _0x4a858f=null;try{_0x4a858f=await _0x44a692(_0x418d8d,_0x1ac221,async _0x397c0b=>{const _0x59d7c5=_0x284412,_0x416140=_0x397c0b[_0x59d7c5(0x5e4)],_0x203d83=_0x416140?.['db']?.[_0x59d7c5(0x294)](_0x59d7c5(0x461))??null,_0x58f0f4=[];if(_0x416140?.[_0x59d7c5(0x79e)](_0x59d7c5(0x393)))for(const {key:_0x1d5119,value:_0x1e9fb7}of _0x416140[_0x59d7c5(0x5fb)](_0x59d7c5(0x393))){_0x58f0f4[_0x59d7c5(0x5d8)]({'key':_0x1d5119,'value':_0x1e9fb7});}return{'identity':_0x203d83,'licenses':_0x58f0f4};});}catch(_0x3e3ed5){console[_0x284412(0x515)](_0x284412(0x64c)+_0x3e3ed5[_0x284412(0x7b6)]+_0x284412(0xea));}_0x2ed8f5['rmSync'](_0x418d8d,{'recursive':!![],'force':!![]}),console['log'](_0x284412(0x4e6)+_0x418d8d+_0x284412(0x51c));if(_0x4a858f&&(_0x4a858f[_0x284412(0x56c)]||_0x4a858f[_0x284412(0x53e)][_0x284412(0x330)]>0x0))try{await _0x44a692(_0x418d8d,_0x1ac221,async _0x334f95=>{const _0xad9aa8=_0x284412,_0x51a231=_0x334f95[_0xad9aa8(0x5e4)];_0x4a858f[_0xad9aa8(0x56c)]&&_0x51a231['db'][_0xad9aa8(0xc1)](_0xad9aa8(0x461),_0x4a858f[_0xad9aa8(0x56c)]);if(_0x4a858f[_0xad9aa8(0x53e)][_0xad9aa8(0x330)]>0x0){if(!_0x51a231[_0xad9aa8(0x79e)](_0xad9aa8(0x393)))await _0x51a231[_0xad9aa8(0x349)](_0xad9aa8(0x393));for(const {key:_0x3803ba,value:_0x1556a1}of _0x4a858f[_0xad9aa8(0x53e)]){await _0x51a231['put'](_0xad9aa8(0x393),_0x3803ba,_0x1556a1);}}});const _0x5a7b7b=[];if(_0x4a858f[_0x284412(0x56c)])_0x5a7b7b[_0x284412(0x5d8)](_0x284412(0x3aa));if(_0x4a858f[_0x284412(0x53e)][_0x284412(0x330)]>0x0)_0x5a7b7b[_0x284412(0x5d8)](_0x4a858f['licenses'][_0x284412(0x330)]+_0x284412(0x4d5));console[_0x284412(0x515)](_0x284412(0x48c)+_0x5a7b7b[_0x284412(0x3de)](_0x284412(0x1cf)));}catch(_0x47f22b){console['log'](_0x284412(0x2c2)+_0x47f22b[_0x284412(0x7b6)]);}}async function _0x44a692(_0x3b059c,_0x1b0531,_0x16c4a8){const _0x31fa4f=_0x507df9,_0x1eeb55=require$$5$1,_0x19adf6=new _0x1eeb55(_0x3b059c,{'admin':![],'mcp':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],..._0x5b24a3(_0x1b0531)});await _0x19adf6['open']();try{return await _0x16c4a8(_0x19adf6);}finally{await _0x19adf6[_0x31fa4f(0x57c)]();}}async function _0x9302c2(_0x10ee94,_0x4dcd89){const _0x1bdc79=_0x507df9,_0x4c8463=require$$5$1,_0x1382c2=_0x6a5b17[_0x1bdc79(0x2f4)](_0x4dcd89[_0x1bdc79(0x445)]);console['log'](_0x1bdc79(0x406)+_0x1382c2+'…');const _0x447e8a=new _0x4c8463(_0x1382c2,_0x5b24a3(_0x4dcd89));await _0x447e8a[_0x1bdc79(0x375)](),console[_0x1bdc79(0x515)](_0x1bdc79(0x3f7)+_0x10ee94+'…');const {envs:_0x420c2c,blobs:_0x95e5b8,skipped:_0x4f499c}=await _0x447e8a[_0x1bdc79(0x521)][_0x1bdc79(0x42c)](_0x10ee94);for(const _0x306edd of _0x420c2c){const _0x59f6ee=_0x306edd['sizeBefore']>0x0?_0x1bdc79(0x61f)+(_0x306edd[_0x1bdc79(0x61e)]/0x400/0x400)[_0x1bdc79(0xc6)](0x2)+_0x1bdc79(0x6f3)+(_0x306edd[_0x1bdc79(0x135)]/0x400/0x400)[_0x1bdc79(0xc6)](0x2)+_0x1bdc79(0x247):'';console[_0x1bdc79(0x515)](_0x1bdc79(0x47b)+_0x306edd[_0x1bdc79(0x339)]+_0x1bdc79(0x709)+_0x306edd[_0x1bdc79(0x27d)]+_0x59f6ee+(_0x306edd[_0x1bdc79(0x11f)]?_0x1bdc79(0x345):''));}if(_0x95e5b8[_0x1bdc79(0x172)]>0x0)console['log'](_0x1bdc79(0x48f)+_0x95e5b8[_0x1bdc79(0x172)]+'\x20files)');for(const _0x354be5 of _0x4f499c)console[_0x1bdc79(0x515)]('\x20\x20✗\x20'+_0x354be5[_0x1bdc79(0x339)]+_0x1bdc79(0x4b6)+_0x354be5['reason']);await _0x447e8a['close'](),console['log'](_0x1bdc79(0x452));}async function _0x3207fc(_0x2b44db,_0x493ab3,_0x2716e6={}){const _0x214656=_0x507df9,{BACKUP_MANIFEST:_0x2bf1eb}=requireOkdbMigrate(),_0x2fbe28=_0x6a5b17[_0x214656(0x2f4)](_0x493ab3[_0x214656(0x445)]),_0x2e87c1=_0x6a5b17[_0x214656(0x3de)](_0x2b44db,_0x2bf1eb);if(!_0x2ed8f5[_0x214656(0x2d6)](_0x2e87c1))throw new Error(_0x2b44db+_0x214656(0x225)+_0x2bf1eb+')');const _0x3fed2f=JSON[_0x214656(0x2e3)](_0x2ed8f5[_0x214656(0x2ef)](_0x2e87c1,_0x214656(0x3f0))),_0x4493f5=_0x6a5b17[_0x214656(0x193)](_0x2b44db,_0x2fbe28);if(_0x4493f5===''||!(_0x4493f5[_0x214656(0x1a9)]('..')||_0x6a5b17[_0x214656(0x62b)](_0x4493f5)))throw new Error(_0x214656(0x4e7)+_0x2fbe28+_0x214656(0x56a)+_0x2b44db);if(_0x2ed8f5[_0x214656(0x2d6)](_0x2fbe28)&&_0x2ed8f5['readdirSync'](_0x2fbe28)[_0x214656(0x330)]>0x0)throw new Error('target\x20'+_0x2fbe28+'\x20is\x20not\x20empty\x20—\x20restore\x20only\x20into\x20a\x20new\x20or\x20empty\x20directory');console['log'](_0x214656(0x3be)+_0x2b44db+'\x20(okdb\x20'+_0x3fed2f['okdbVersion']+',\x20'+_0x3fed2f[_0x214656(0x24a)]+_0x214656(0x7bb)+_0x2fbe28+'…'),_0x2ed8f5[_0x214656(0x6db)](_0x2b44db,_0x2fbe28,{'recursive':!![],'errorOnExist':!![]});for(const _0x63c0a of _0x3fed2f[_0x214656(0x384)]??[]){console[_0x214656(0x515)](_0x214656(0x47b)+_0x63c0a['name']+(_0x63c0a[_0x214656(0x11f)]?_0x214656(0x345):'')),_0x63c0a[_0x214656(0x2b0)]&&_0x63c0a[_0x214656(0x33b)]&&_0x2ed8f5[_0x214656(0x2d6)](_0x63c0a[_0x214656(0x33b)])&&console[_0x214656(0x515)](_0x214656(0x700)+_0x63c0a[_0x214656(0x339)]+'\x20lived\x20outside\x20the\x20store\x20at\x20'+_0x63c0a[_0x214656(0x33b)]+_0x214656(0x48b)+(_0x214656(0x2dd)+_0x63c0a['dir']+'.\x20Move\x20it\x20away\x20first\x20to\x20use\x20the\x20copy.'));}_0x2716e6[_0x214656(0x32d)]&&(require$$5$1['reidentify'](_0x2fbe28),console[_0x214656(0x515)](_0x214656(0x602))),console[_0x214656(0x515)](_0x214656(0x532));}async function _0x23c6b4(_0x455546,_0x63604c,_0x1b3cde){const _0x2a72db=_0x507df9,_0x115c6a=require$$5$1,_0x33f22b=_0x6a5b17[_0x2a72db(0x2f4)](_0x63604c['dbPath']),_0x3164e5=_0x1b3cde[_0x2a72db(0x52a)]??_0x2a72db(0x5c4),_0x5a21c7=_0x1b3cde[_0x2a72db(0x293)]?_0x1b3cde['types'][_0x2a72db(0x1e8)](',')[_0x2a72db(0x6d7)](_0x40c5da=>_0x40c5da[_0x2a72db(0x7ad)]()):null;console[_0x2a72db(0x515)]('[okdb]\x20opening\x20'+_0x33f22b+'…');const _0x38f506=new _0x115c6a(_0x33f22b,_0x5b24a3(_0x63604c));await _0x38f506[_0x2a72db(0x375)](),console['log']('[okdb]\x20exporting\x20env\x20\x22'+_0x3164e5+'\x22\x20→\x20'+_0x455546+'…');const _0xd06fc0=await _0x38f506[_0x2a72db(0x521)][_0x2a72db(0x6ec)](_0x455546,{'envName':_0x3164e5,'types':_0x5a21c7,'includeChanges':!!_0x1b3cde[_0x2a72db(0x47a)]});console[_0x2a72db(0x515)](_0x2a72db(0x528)+_0xd06fc0['types']+_0x2a72db(0x126)+_0xd06fc0['records']+'\x20\x20changes='+_0xd06fc0[_0x2a72db(0x47a)]);if(_0x1b3cde['blobs']){const _0x525b8e=_0x6a5b17[_0x2a72db(0x3de)](_0x6a5b17[_0x2a72db(0x334)](_0x455546),_0x2a72db(0x399));process[_0x2a72db(0x663)]['write'](_0x2a72db(0xd0));const {count:_0x239da2,bytes:_0x34cde0}=await _0x38f506['migrate'][_0x2a72db(0x192)](_0x525b8e);console[_0x2a72db(0x515)]('\x0d[okdb]\x20blobs:\x20'+_0x525b8e+'\x20\x20('+_0x239da2+_0x2a72db(0x190)+(_0x239da2!==0x1?'s':'')+',\x20'+(_0x34cde0/0x400/0x400)[_0x2a72db(0xc6)](0x2)+_0x2a72db(0x247));}await _0x38f506[_0x2a72db(0x57c)](),console[_0x2a72db(0x515)]('[okdb]\x20export\x20complete');}async function _0x41a1ab(_0x1a945d,_0xc86de9,_0x598b30){const _0x3af811=_0x507df9,_0x25f60e=require$$5$1,_0x3e108e=_0x6a5b17[_0x3af811(0x2f4)](_0xc86de9[_0x3af811(0x445)]),_0x3fce5a=_0x598b30[_0x3af811(0x52a)]??null,_0x3f965e=_0x598b30[_0x3af811(0x293)]?_0x598b30[_0x3af811(0x293)][_0x3af811(0x1e8)](',')['map'](_0x4ea5b2=>_0x4ea5b2['trim']()):null,_0xfca42d=!!_0x598b30['drop'];console[_0x3af811(0x515)](_0x3af811(0x406)+_0x3e108e+'…');const _0x59b584=new _0x25f60e(_0x3e108e,_0x5b24a3(_0xc86de9));await _0x59b584[_0x3af811(0x375)](),console[_0x3af811(0x515)]('[okdb]\x20importing\x20'+_0x1a945d+'…');const _0x25659b=await _0x59b584[_0x3af811(0x521)][_0x3af811(0x2f0)](_0x1a945d,{'envName':_0x3fce5a,'types':_0x3f965e,'dropExisting':_0xfca42d,'includeChanges':!!_0x598b30[_0x3af811(0x47a)],'onProgress':({type:_0x26d90c,count:_0x20c801})=>{const _0x24ee59=_0x3af811;process[_0x24ee59(0x663)][_0x24ee59(0x4c7)]('\x0d[okdb]\x20'+_0x26d90c+':\x20'+_0x20c801+_0x24ee59(0x705));}});process[_0x3af811(0x663)][_0x3af811(0x4c7)]('\x0a'),console[_0x3af811(0x515)](_0x3af811(0x6e2)+_0x25659b[_0x3af811(0x293)]+_0x3af811(0x126)+_0x25659b[_0x3af811(0x6de)]+_0x3af811(0x407)+_0x25659b['changes']);if(_0x598b30[_0x3af811(0x399)]){const _0x3adb2f=_0x6a5b17['join'](_0x6a5b17['dirname'](_0x1a945d),_0x3af811(0x399));if(_0x2ed8f5[_0x3af811(0x2d6)](_0x3adb2f)){const {imported:_0xdd8179,skipped:_0x1287bb}=await _0x59b584[_0x3af811(0x521)][_0x3af811(0x487)](_0x3adb2f);console['log'](_0x3af811(0x199)+_0xdd8179+_0x3af811(0x2ac)+_0x1287bb);}}await _0x59b584[_0x3af811(0x57c)](),console['log'](_0x3af811(0x286));}async function _0x3c67d5(_0x2c2571,_0x2782d6){const _0xed23de=_0x507df9;_0x2782d6[_0xed23de(0x295)]&&!_0x2782d6[_0xed23de(0x339)]&&(console[_0xed23de(0x5f2)](_0xed23de(0x4f6)),process['exit'](0x1));const _0x354bcc=_0x2782d6['permissions']?_0x2782d6[_0xed23de(0x39d)][_0xed23de(0x1e8)](',')[_0xed23de(0x6d7)](_0xcb826a=>_0xcb826a['trim']())[_0xed23de(0x64e)](Boolean):[];let _0x42e841={};if(_0x2782d6[_0xed23de(0x117)])try{_0x42e841=JSON[_0xed23de(0x2e3)](_0x2782d6[_0xed23de(0x117)]);if(typeof _0x42e841!==_0xed23de(0x24d)||Array[_0xed23de(0x654)](_0x42e841)||_0x42e841===null)throw new Error();}catch{console[_0xed23de(0x5f2)](_0xed23de(0x688)),process[_0xed23de(0x256)](0x1);}const _0x300d09=require$$5$1,{randomToken:_0xeac82d,hashToken:_0x26fa54,hashPassword:_0x241d9b}=requireOkdbAuthTokens(),_0x1bb12b=require$$2$1,_0x42f91c=_0x6a5b17[_0xed23de(0x2f4)](_0x2c2571[_0xed23de(0x445)]),_0x3bcbbb=new _0x300d09(_0x42f91c,_0x5b24a3(_0x2c2571));await _0x3bcbbb[_0xed23de(0x375)]();try{await _0x3bcbbb[_0xed23de(0x788)]['_ensureTokensType']();if(_0x2782d6[_0xed23de(0x339)]){const _0x47648a=await _0x3bcbbb[_0xed23de(0x788)]['_lookupByName'](_0x2782d6['name']);_0x47648a&&(console[_0xed23de(0x5f2)](_0xed23de(0x620)+_0x2782d6['name']+_0xed23de(0x5e8)),process['exit'](0x1));}const _0x37e580=_0xeac82d(0x20),_0x561c12=_0x26fa54(_0x37e580),_0x5a64b1=_0x2782d6[_0xed23de(0x295)]?await _0x241d9b(_0x2782d6[_0xed23de(0x295)]):null,_0x2b5293=_0x1bb12b[_0xed23de(0x1a7)](),_0x4efe6e={'tokenHash':_0x561c12,'name':_0x2782d6[_0xed23de(0x339)]||null,'passwordHash':_0x5a64b1,'label':_0x2782d6[_0xed23de(0x312)]||null,'permissions':_0x354bcc,'grants':_0x42e841,'createdAt':Date[_0xed23de(0x556)](),'lastUsedAt':null},_0x36e1d0=_0x2782d6[_0xed23de(0x291)]?{'ttl':Number(_0x2782d6['ttl'])}:undefined;await _0x3bcbbb[_0xed23de(0x5e4)][_0xed23de(0x359)](_0xed23de(0x27c),_0x2b5293,_0x4efe6e,_0x36e1d0),console['log'](_0xed23de(0x75c)),console[_0xed23de(0x515)](_0xed23de(0x1d0)+_0x2b5293),console['log'](_0xed23de(0x215)+(_0x2782d6['name']||'(unset)')),console[_0xed23de(0x515)](_0xed23de(0x4eb)+(_0x2782d6[_0xed23de(0x312)]||_0xed23de(0x672))),console[_0xed23de(0x515)]('\x20\x20\x20\x20permissions:\x20'+(_0x354bcc['join'](',\x20')||'(none)')),console[_0xed23de(0x515)]('\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a'),console[_0xed23de(0x515)](_0xed23de(0x2ec)+_0x37e580+'\x0a');}finally{await _0x3bcbbb['close']();}}async function _0x26ee32(_0xc2cb56){const _0x22c970=_0x507df9,_0x5f2dcb=require$$5$1,_0x365ac5=_0x6a5b17[_0x22c970(0x2f4)](_0xc2cb56[_0x22c970(0x445)]),_0x20d59b=new _0x5f2dcb(_0x365ac5,_0x5b24a3(_0xc2cb56));await _0x20d59b[_0x22c970(0x375)]();try{const _0x3e1364=_0x20d59b['_systemEnv'];if(!_0x3e1364||!_0x3e1364[_0x22c970(0x79e)](_0x22c970(0x27c))){console[_0x22c970(0x515)](_0x22c970(0x6ba));return;}const _0x559775=[];for(const {key:_0x5a35c6,value:_0x5f47d9}of _0x3e1364[_0x22c970(0x5fb)](_0x22c970(0x27c))){_0x559775[_0x22c970(0x5d8)]({'id':_0x5a35c6,'name':_0x5f47d9['name']||_0x22c970(0x672),'label':_0x5f47d9[_0x22c970(0x312)]||_0x22c970(0x672),'permissions':Array[_0x22c970(0x654)](_0x5f47d9[_0x22c970(0x39d)])?_0x5f47d9[_0x22c970(0x39d)][_0x22c970(0x3de)](','):'','created':_0x5f47d9['createdAt']?new Date(_0x5f47d9[_0x22c970(0x24a)])['toISOString']()[_0x22c970(0x333)](0x0,0xa):''});}if(_0x559775['length']===0x0){console[_0x22c970(0x515)](_0x22c970(0x6ba));return;}const _0x1ab830=!process[_0x22c970(0x663)][_0x22c970(0x263)]||process[_0x22c970(0x663)][_0x22c970(0x263)]>=0x64,_0x45f879=_0x1ab830?0x24:0xa,_0x1ff743=['ID'[_0x22c970(0x119)](_0x45f879),_0x22c970(0x1a2)[_0x22c970(0x119)](0x10),_0x22c970(0x6dc)[_0x22c970(0x119)](0x14),_0x22c970(0x587)['padEnd'](0x14),_0x22c970(0x6b6)][_0x22c970(0x3de)]('\x20\x20');console['log']('\x0a'+_0x1ff743),console['log']('-'['repeat'](_0x1ff743['length']));for(const _0x4da04b of _0x559775){const _0x59751f=_0x1ab830?_0x4da04b['id']:_0x4da04b['id'][_0x22c970(0x333)](0x0,0x8)+'…';console['log']([_0x59751f[_0x22c970(0x119)](_0x45f879),_0x4da04b[_0x22c970(0x339)][_0x22c970(0x333)](0x0,0x10)[_0x22c970(0x119)](0x10),_0x4da04b['label']['slice'](0x0,0x14)[_0x22c970(0x119)](0x14),_0x4da04b[_0x22c970(0x39d)][_0x22c970(0x333)](0x0,0x14)[_0x22c970(0x119)](0x14),_0x4da04b['created']][_0x22c970(0x3de)]('\x20\x20'));}console[_0x22c970(0x515)]('');}finally{await _0x20d59b['close']();}}async function _0x385308(_0x39a479,_0x23025a){const _0x521743=_0x507df9;!_0x39a479&&(console[_0x521743(0x5f2)]('[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument'),process['exit'](0x1));const _0x10c701=require$$5$1,_0x4285b7=_0x6a5b17[_0x521743(0x2f4)](_0x23025a['dbPath']),_0xd97ec3=new _0x10c701(_0x4285b7,_0x5b24a3(_0x23025a));await _0xd97ec3[_0x521743(0x375)]();try{const _0x452095=_0xd97ec3[_0x521743(0x5e4)];(!_0x452095||!_0x452095[_0x521743(0x79e)](_0x521743(0x27c)))&&(console[_0x521743(0x5f2)](_0x521743(0x60a)+_0x39a479+'\x22'),process['exit'](0x1));let _0x5bb8a3=null,_0x483a6f=null;const _0x298764=_0x452095[_0x521743(0x294)](_0x521743(0x27c),_0x39a479);if(_0x298764)_0x5bb8a3=_0x39a479,_0x483a6f=_0x298764;else{const _0x50d413=[];for(const {key:_0x3e7d20,value:_0x381b58}of _0x452095[_0x521743(0x5fb)](_0x521743(0x27c))){if(_0x3e7d20[_0x521743(0x1a9)](_0x39a479))_0x50d413['push']({'key':_0x3e7d20,'value':_0x381b58});}_0x50d413[_0x521743(0x330)]===0x0&&(console['error'](_0x521743(0x60a)+_0x39a479+'\x22'),process[_0x521743(0x256)](0x1));if(_0x50d413['length']>0x1){console[_0x521743(0x5f2)]('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x39a479+_0x521743(0x4fd)+_0x50d413['length']+_0x521743(0x63e));for(const _0x543215 of _0x50d413){console[_0x521743(0x5f2)]('\x20\x20'+_0x543215[_0x521743(0x17d)]+_0x521743(0x45f)+(_0x543215[_0x521743(0x4f8)][_0x521743(0x339)]||_0x521743(0x672))+')');}process[_0x521743(0x256)](0x1);}_0x5bb8a3=_0x50d413[0x0][_0x521743(0x17d)],_0x483a6f=_0x50d413[0x0][_0x521743(0x4f8)];}await _0x452095[_0x521743(0x5e2)](_0x521743(0x27c),_0x5bb8a3),console['log'](_0x521743(0x48d)+_0x5bb8a3+_0x521743(0x45f)+(_0x483a6f[_0x521743(0x339)]||_0x521743(0x672))+',\x20label:\x20'+(_0x483a6f[_0x521743(0x312)]||_0x521743(0x672))+')');}finally{await _0xd97ec3[_0x521743(0x57c)]();}}function _0x4f6edb(_0x4c1aa3,_0x17b05c){const _0x2890d6=_0x507df9;if(!_0x4c1aa3[_0x2890d6(0x1a1)])return'pending';const _0x2dae16=_0x4c1aa3[_0x2890d6(0x257)];if(!_0x2dae16)return'active';if(_0x17b05c>_0x2dae16)return _0x2890d6(0x549);return'active';}function _0x50bc8c(_0x31ea31){const _0x286301=_0x507df9;if(!_0x31ea31||typeof _0x31ea31!=='object')return'';const _0x529e1f=Object[_0x286301(0x45d)](_0x31ea31)[_0x286301(0x64e)](([,_0x8405f2])=>_0x8405f2)[_0x286301(0x6d7)](([_0x9df79b])=>_0x9df79b);if(_0x529e1f[_0x286301(0x330)]===0x0)return'(none)';if(_0x529e1f[_0x286301(0x330)]<=0x3)return _0x529e1f['join']('\x20');return _0x529e1f[_0x286301(0x333)](0x0,0x3)[_0x286301(0x3de)]('\x20')+('\x20+'+(_0x529e1f[_0x286301(0x330)]-0x3));}async function _0x50e64c(_0x11c345){const _0x2c68bd=_0x507df9,_0x5b397c=require$$5$1,_0x433c6f=requireOkdbLicenseCodec(),{_C:_0x4001d7}=requireOkdbLicense(),_0x9289cf=_0x6a5b17[_0x2c68bd(0x2f4)](_0x11c345['dbPath']),_0x3824b6=new _0x5b397c(_0x9289cf,_0x5b24a3(_0x11c345));await _0x3824b6[_0x2c68bd(0x375)]();try{const _0x5dfc97=_0x3824b6[_0x2c68bd(0x5e4)],_0x29c605=_0x5dfc97?.['db']?.['get']?.(_0x2c68bd(0x65f))??0x0,_0x120efc=[..._0x3824b6[_0x2c68bd(0x561)][_0x2c68bd(0x434)]()][_0x2c68bd(0x64e)](_0x2f8ec4=>!_0x2f8ec4['startsWith']('~'))[_0x2c68bd(0x330)],_0x36151f=_0x3824b6[_0x2c68bd(0xdb)]?.[_0x2c68bd(0x3f1)];if(_0x36151f){const _0x21987d=_0x36151f[_0x2c68bd(0x794)]===!![],_0x3c1637=_0x21987d?'free\x20tier':_0x3824b6[_0x2c68bd(0xdb)][_0x2c68bd(0x5df)]?.[_0x2c68bd(0xe5)]||_0x2c68bd(0x15e);console['log'](''),console[_0x2c68bd(0x515)](_0x2c68bd(0x3d2)+_0x3c1637);const _0x48d67b=_0x36151f[_0x2c68bd(0x5eb)]||{};if(_0x48d67b[_0x2c68bd(0x325)]){const _0x4c2bf0=Math[_0x2c68bd(0x2d5)](_0x29c605/_0x48d67b[_0x2c68bd(0x325)]*0x64);console[_0x2c68bd(0x515)](_0x2c68bd(0x3c1)+_0x29c605['toLocaleString']()+_0x2c68bd(0x75a)+_0x48d67b['maxWrites']['toLocaleString']()+_0x2c68bd(0x61f)+_0x4c2bf0+'%)');}else console[_0x2c68bd(0x515)](_0x2c68bd(0x3c1)+_0x29c605[_0x2c68bd(0x77e)]());_0x48d67b[_0x2c68bd(0x384)]?console[_0x2c68bd(0x515)](_0x2c68bd(0x40f)+_0x120efc+'\x20/\x20'+_0x48d67b[_0x2c68bd(0x384)]):console['log'](_0x2c68bd(0x40f)+_0x120efc),_0x4001d7?.[_0x2c68bd(0x3e8)]&&console[_0x2c68bd(0x515)](_0x2c68bd(0x1f7)+_0x4001d7[_0x2c68bd(0x3e8)]+_0x2c68bd(0x144));}if(!_0x5dfc97||!_0x5dfc97[_0x2c68bd(0x79e)](_0x2c68bd(0x393))){console['log'](''),console[_0x2c68bd(0x515)](_0x2c68bd(0x296)),console[_0x2c68bd(0x515)]('');return;}const _0x13ce1c=[],_0x13e9d=Date[_0x2c68bd(0x556)](),_0x471784=_0x3824b6['id'],_0x4fbed6=_0x2c68bd(0x4dc);for(const {key:_0x568bc3,value:_0x41ebc4}of _0x5dfc97['getRange'](_0x2c68bd(0x393))){const _0x10c48c=_0x41ebc4['_licenseHash']?Buffer[_0x2c68bd(0x309)](_0x41ebc4['_licenseHash'],'hex'):Buffer[_0x2c68bd(0x67f)](0x8);let _0x15a9df='';try{_0x15a9df=_0x433c6f[_0x2c68bd(0x77c)](_0x471784,_0x10c48c,_0x4fbed6)[_0x2c68bd(0x35d)];}catch{}_0x13ce1c['push']({'id':_0x568bc3,'licensee':_0x41ebc4[_0x2c68bd(0xe5)]||'','expires':_0x41ebc4[_0x2c68bd(0x257)]?new Date(_0x41ebc4[_0x2c68bd(0x257)])[_0x2c68bd(0x340)]()[_0x2c68bd(0x333)](0x0,0xa):'','features':_0x50bc8c(_0x41ebc4[_0x2c68bd(0x575)]),'pin':_0x15a9df,'status':_0x4f6edb(_0x41ebc4,_0x13e9d)});}if(_0x13ce1c[_0x2c68bd(0x330)]===0x0){console[_0x2c68bd(0x515)](''),console['log'](_0x2c68bd(0x296)),console[_0x2c68bd(0x515)]('');return;}const _0x3533e9=['\x20\x20'+'ID'[_0x2c68bd(0x119)](0xe),_0x2c68bd(0x6d8)['padEnd'](0xe),_0x2c68bd(0x494)[_0x2c68bd(0x119)](0xc),'FEATURES'[_0x2c68bd(0x119)](0x1e),_0x2c68bd(0x725)[_0x2c68bd(0x119)](0xa),_0x2c68bd(0x5c2)][_0x2c68bd(0x3de)]('\x20');console[_0x2c68bd(0x515)]('\x0a'+_0x3533e9);for(const _0x4245f7 of _0x13ce1c){const _0x200520=_0x4245f7['id']['slice'](0x0,0x8)+'\u2026';console[_0x2c68bd(0x515)](['\x20\x20'+_0x200520[_0x2c68bd(0x119)](0xe),_0x4245f7[_0x2c68bd(0xe5)][_0x2c68bd(0x333)](0x0,0xe)[_0x2c68bd(0x119)](0xe),_0x4245f7[_0x2c68bd(0x429)][_0x2c68bd(0x119)](0xc),_0x4245f7[_0x2c68bd(0x575)][_0x2c68bd(0x333)](0x0,0x1e)[_0x2c68bd(0x119)](0x1e),_0x4245f7[_0x2c68bd(0x35d)][_0x2c68bd(0x119)](0xa),_0x4245f7[_0x2c68bd(0x41e)]][_0x2c68bd(0x3de)]('\x20'));}console[_0x2c68bd(0x515)]('');}finally{await _0x3824b6[_0x2c68bd(0x57c)]();}}async function _0x4b43bb(_0x3578b9,_0x33c537){const _0x4ed053=_0x507df9,_0x3b69d0=require$$5$1,_0x19748d=requireOkdbLicenseCodec();let _0x50cb1c=_0x3578b9;(_0x19748d[_0x4ed053(0x2ee)](_0x3578b9)===_0x4ed053(0x58f)||_0x2ed8f5[_0x4ed053(0x2d6)](_0x3578b9)&&_0x2ed8f5[_0x4ed053(0x3b7)](_0x3578b9)['isFile']())&&(_0x50cb1c=_0x2ed8f5[_0x4ed053(0x2ef)](_0x3578b9,_0x4ed053(0x3f0))['trim']());const _0x1bc0ce=_0x6a5b17['resolve'](_0x33c537[_0x4ed053(0x445)]),_0x2cef4a=new _0x3b69d0(_0x1bc0ce,_0x5b24a3(_0x33c537));await _0x2cef4a[_0x4ed053(0x375)]();try{let _0x1612e9;try{_0x1612e9=await _0x2cef4a['licenses']['add']({'blob':_0x50cb1c});}catch(_0x5f4cff){console[_0x4ed053(0x5f2)](_0x4ed053(0x6a5)+_0x5f4cff[_0x4ed053(0x7b6)]),process[_0x4ed053(0x256)](0x1);}const _0xcbe5fe=_0x1612e9['pin']||'',_0x5a01fc=Object[_0x4ed053(0x45d)](_0x1612e9[_0x4ed053(0x575)]||{})[_0x4ed053(0x64e)](([,_0x290357])=>_0x290357)[_0x4ed053(0x6d7)](([_0x36133a])=>_0x36133a),_0x4c4633=_0x1612e9[_0x4ed053(0x5eb)]||{},_0x4553aa=[_0x4c4633['envs']?'envs='+_0x4c4633[_0x4ed053(0x384)]:null,_0x4c4633[_0x4ed053(0x457)]?_0x4ed053(0x24c)+_0x4c4633[_0x4ed053(0x457)]:null,_0x4c4633[_0x4ed053(0x1c9)]?_0x4ed053(0x3ff)+_0x4c4633[_0x4ed053(0x1c9)]:null,_0x4c4633[_0x4ed053(0x325)]?_0x4ed053(0x4fe)+_0x4c4633['maxWrites'][_0x4ed053(0x77e)]():null][_0x4ed053(0x64e)](Boolean)['join']('\x20\x20'),_0x3e9f94=_0x1612e9['type']!=='standard';console[_0x4ed053(0x515)](_0x1612e9[_0x4ed053(0x4ac)]?_0x4ed053(0xee):_0x4ed053(0x336)),console['log']('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1612e9['id']),console['log']('\x20\x20\x20\x20licensee:\x20\x20'+_0x1612e9[_0x4ed053(0xe5)]),console[_0x4ed053(0x515)](_0x4ed053(0x213)+(_0x1612e9[_0x4ed053(0x257)]?new Date(_0x1612e9[_0x4ed053(0x257)])['toISOString']()[_0x4ed053(0x333)](0x0,0xa):_0x4ed053(0x6f2))),console[_0x4ed053(0x515)](_0x4ed053(0x529)+(_0x5a01fc['join'](',\x20')||_0x4ed053(0x534)));if(_0x4553aa)console[_0x4ed053(0x515)](_0x4ed053(0x245)+_0x4553aa);if(_0x3e9f94)console[_0x4ed053(0x515)](_0x4ed053(0x694)+_0x1612e9[_0x4ed053(0x101)]+_0x4ed053(0x16a)),console[_0x4ed053(0x515)]('');else!_0x1612e9[_0x4ed053(0x7a6)]?(console[_0x4ed053(0x515)](_0x4ed053(0x18a)+_0x1612e9[_0x4ed053(0x41e)]),console['log']('')):(console[_0x4ed053(0x515)](_0x4ed053(0x154)+_0xcbe5fe),console[_0x4ed053(0x515)](_0x4ed053(0x39a)),console[_0x4ed053(0x515)](''),console[_0x4ed053(0x515)](_0x4ed053(0x638)),console[_0x4ed053(0x515)]('\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20('+_0xcbe5fe+')\x20to\x20your\x20license\x20vendor.'),console[_0x4ed053(0x515)](_0x4ed053(0x248)),console['log'](_0x4ed053(0x4c0)),console['log'](''));}finally{await _0x2cef4a[_0x4ed053(0x57c)]();}}async function _0x3482dd(_0x3b089c,_0x47ed9f){const _0x2ca9ed=_0x507df9,_0x4d1c1c=require$$5$1,_0x43d886=_0x6a5b17[_0x2ca9ed(0x2f4)](_0x47ed9f[_0x2ca9ed(0x445)]),_0x1704d0=new _0x4d1c1c(_0x43d886,_0x5b24a3(_0x47ed9f));await _0x1704d0['open']();try{let _0x1a7bbf;try{_0x1a7bbf=await _0x1704d0[_0x2ca9ed(0x53e)][_0x2ca9ed(0x187)](_0x3b089c);}catch(_0x149a70){console[_0x2ca9ed(0x5f2)]('[okdb]\x20error:\x20'+_0x149a70[_0x2ca9ed(0x7b6)]),console[_0x2ca9ed(0x5f2)](''),console[_0x2ca9ed(0x5f2)](_0x2ca9ed(0x7cc)),console[_0x2ca9ed(0x5f2)](_0x2ca9ed(0x570)),console[_0x2ca9ed(0x5f2)](_0x2ca9ed(0x7a8)),console[_0x2ca9ed(0x5f2)]('\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.'),console['error'](''),process[_0x2ca9ed(0x256)](0x1);}console[_0x2ca9ed(0x515)](_0x2ca9ed(0x21c)),console[_0x2ca9ed(0x515)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1a7bbf['id']),console[_0x2ca9ed(0x515)](_0x2ca9ed(0x787)+_0x1a7bbf[_0x2ca9ed(0xe5)]),console['log']('\x20\x20\x20\x20expires:\x20\x20\x20'+(_0x1a7bbf[_0x2ca9ed(0x257)]?new Date(_0x1a7bbf[_0x2ca9ed(0x257)])[_0x2ca9ed(0x340)]()[_0x2ca9ed(0x333)](0x0,0xa):_0x2ca9ed(0x6f2))),console[_0x2ca9ed(0x515)]('\x20\x20\x20\x20status:\x20\x20\x20\x20active'),console[_0x2ca9ed(0x515)]('');}finally{await _0x1704d0[_0x2ca9ed(0x57c)]();}}async function _0x35590e(_0xdec698,_0x448429){const _0x1290b7=_0x507df9;!_0xdec698&&(console['error'](_0x1290b7(0x511)),process[_0x1290b7(0x256)](0x1));const _0x524e25=require$$5$1,_0x2cc229=requireOkdbLicenseCodec(),_0x2ebd01=_0x6a5b17[_0x1290b7(0x2f4)](_0x448429[_0x1290b7(0x445)]),_0x4ccec3=new _0x524e25(_0x2ebd01,_0x5b24a3(_0x448429));await _0x4ccec3[_0x1290b7(0x375)]();try{const _0x451a1c=_0x4ccec3[_0x1290b7(0x5e4)];(!_0x451a1c||!_0x451a1c[_0x1290b7(0x79e)]('~licenses'))&&(console['error'](_0x1290b7(0x38f)+_0xdec698+'\x22'),process[_0x1290b7(0x256)](0x1));let _0x15d2fa=null,_0x12d41c=null;const _0x5977ae=_0x451a1c[_0x1290b7(0x294)]('~licenses',_0xdec698);if(_0x5977ae)_0x15d2fa=_0xdec698,_0x12d41c=_0x5977ae;else{const _0x11c292=[];for(const {key:_0x2284f1,value:_0x1dc15a}of _0x451a1c[_0x1290b7(0x5fb)](_0x1290b7(0x393))){if(_0x2284f1[_0x1290b7(0x1a9)](_0xdec698))_0x11c292[_0x1290b7(0x5d8)]({'key':_0x2284f1,'value':_0x1dc15a});}_0x11c292[_0x1290b7(0x330)]===0x0&&(console[_0x1290b7(0x5f2)](_0x1290b7(0x38f)+_0xdec698+'\x22'),process['exit'](0x1)),_0x11c292[_0x1290b7(0x330)]>0x1&&(console[_0x1290b7(0x5f2)]('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0xdec698+_0x1290b7(0x4fd)+_0x11c292[_0x1290b7(0x330)]+_0x1290b7(0x454)),process[_0x1290b7(0x256)](0x1)),_0x15d2fa=_0x11c292[0x0][_0x1290b7(0x17d)],_0x12d41c=_0x11c292[0x0][_0x1290b7(0x4f8)];}const _0x36fa91=Date[_0x1290b7(0x556)](),_0x5be921=_0x4f6edb(_0x12d41c,_0x36fa91),_0x44ddc8=_0x4ccec3['id'],_0x4bbbb7=_0x1290b7(0x4dc);let _0x3d9255='';try{const _0xf7d6f=Buffer[_0x1290b7(0x309)](_0x12d41c[_0x1290b7(0x4e3)],_0x1290b7(0x44a));_0x3d9255=_0x2cc229[_0x1290b7(0x77c)](_0x44ddc8,_0xf7d6f,_0x4bbbb7)[_0x1290b7(0x35d)];}catch{}const _0x251c07=_0x12d41c[_0x1290b7(0x575)]?Object['entries'](_0x12d41c[_0x1290b7(0x575)])[_0x1290b7(0x64e)](([,_0x4d07ea])=>_0x4d07ea)[_0x1290b7(0x6d7)](([_0x52d93e])=>_0x52d93e):[],_0x2be67d=_0x12d41c['limits']||{},_0x2098ba=_0x451a1c?.['db']?.['get']?.(_0x1290b7(0x65f))??0x0,_0x434d8f=[..._0x4ccec3[_0x1290b7(0x561)][_0x1290b7(0x434)]()]['filter'](_0x251ef7=>!_0x251ef7[_0x1290b7(0x1a9)]('~'))[_0x1290b7(0x330)];console[_0x1290b7(0x515)]('\x0a\x20\x20License\x20details:'),console[_0x1290b7(0x515)](_0x1290b7(0x428)+_0x15d2fa),console[_0x1290b7(0x515)]('\x20\x20\x20\x20licensee:\x20\x20'+(_0x12d41c['licensee']||'')),console[_0x1290b7(0x515)](_0x1290b7(0x213)+(_0x12d41c[_0x1290b7(0x257)]?new Date(_0x12d41c[_0x1290b7(0x257)])['toISOString']()[_0x1290b7(0x333)](0x0,0xa):'')),console[_0x1290b7(0x515)](_0x1290b7(0x529)+(_0x251c07[_0x1290b7(0x3de)](',\x20')||'(none)')),console[_0x1290b7(0x515)]('\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20'+_0x3d9255),console['log'](_0x1290b7(0x18a)+_0x5be921),console['log'](_0x1290b7(0x32e)+new Date(_0x12d41c[_0x1290b7(0x526)])[_0x1290b7(0x340)]());if(_0x5be921===_0x1290b7(0x5df)){console[_0x1290b7(0x515)](''),console['log']('\x20\x20Usage:');if(_0x2be67d[_0x1290b7(0x325)]){const _0x584405=Math[_0x1290b7(0x2d5)](_0x2098ba/_0x2be67d[_0x1290b7(0x325)]*0x64);console[_0x1290b7(0x515)]('\x20\x20\x20\x20writes:\x20\x20\x20\x20'+_0x2098ba[_0x1290b7(0x77e)]()+_0x1290b7(0x75a)+_0x2be67d[_0x1290b7(0x325)][_0x1290b7(0x77e)]()+_0x1290b7(0x61f)+_0x584405+'%)');}else console[_0x1290b7(0x515)](_0x1290b7(0x53b)+_0x2098ba[_0x1290b7(0x77e)]()+'\x20\x20(unlimited)');_0x2be67d[_0x1290b7(0x384)]?console['log'](_0x1290b7(0x4dd)+_0x434d8f+_0x1290b7(0x75a)+_0x2be67d[_0x1290b7(0x384)]):console[_0x1290b7(0x515)](_0x1290b7(0x4dd)+_0x434d8f+_0x1290b7(0x476));}console['log']('');}finally{await _0x4ccec3[_0x1290b7(0x57c)]();}}async function _0x1c3aae(_0x5025ab,_0x62d176){const _0x35d74a=_0x507df9;!_0x5025ab&&(console[_0x35d74a(0x5f2)]('[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument'),process[_0x35d74a(0x256)](0x1));const _0x239bc7=require$$5$1,_0x5183d4=_0x6a5b17[_0x35d74a(0x2f4)](_0x62d176[_0x35d74a(0x445)]),_0x368370=new _0x239bc7(_0x5183d4,_0x5b24a3(_0x62d176));await _0x368370[_0x35d74a(0x375)]();try{const _0x475e43=_0x368370[_0x35d74a(0x5e4)];(!_0x475e43||!_0x475e43['hasType']('~licenses'))&&(console[_0x35d74a(0x5f2)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x5025ab+'\x22'),process[_0x35d74a(0x256)](0x1));let _0x48db24=null,_0x2b245c=null;const _0x42ec68=_0x475e43[_0x35d74a(0x294)](_0x35d74a(0x393),_0x5025ab);if(_0x42ec68)_0x48db24=_0x5025ab,_0x2b245c=_0x42ec68;else{const _0x536944=[];for(const {key:_0x554ac5,value:_0x89b9e6}of _0x475e43['getRange'](_0x35d74a(0x393))){if(_0x554ac5[_0x35d74a(0x1a9)](_0x5025ab))_0x536944[_0x35d74a(0x5d8)]({'key':_0x554ac5,'value':_0x89b9e6});}_0x536944[_0x35d74a(0x330)]===0x0&&(console[_0x35d74a(0x5f2)](_0x35d74a(0x38f)+_0x5025ab+'\x22'),process[_0x35d74a(0x256)](0x1)),_0x536944['length']>0x1&&(console[_0x35d74a(0x5f2)](_0x35d74a(0x775)+_0x5025ab+_0x35d74a(0x4fd)+_0x536944[_0x35d74a(0x330)]+_0x35d74a(0x454)),process[_0x35d74a(0x256)](0x1)),_0x48db24=_0x536944[0x0]['key'],_0x2b245c=_0x536944[0x0][_0x35d74a(0x4f8)];}await _0x475e43[_0x35d74a(0x5e2)](_0x35d74a(0x393),_0x48db24),console[_0x35d74a(0x515)](_0x35d74a(0x125)+_0x48db24+_0x35d74a(0x164)+(_0x2b245c[_0x35d74a(0xe5)]||_0x35d74a(0x672))+')');}finally{await _0x368370[_0x35d74a(0x57c)]();}}async function _0x3eeab0(_0x5382a9,_0x2fcf38,_0x22000c){const _0x2d2334=_0x507df9;!_0x5382a9&&(console[_0x2d2334(0x5f2)](_0x2d2334(0x3b5)),process[_0x2d2334(0x256)](0x1));!_0x22000c[_0x2d2334(0x2e5)]&&!(_0x22000c[_0x2d2334(0x51e)]&&_0x22000c[_0x2d2334(0x295)])&&(console[_0x2d2334(0x5f2)](_0x2d2334(0x398)),process[_0x2d2334(0x256)](0x1));const _0xd68640=_0x22000c['selfAddress']||_0x2fcf38[_0x2d2334(0x481)]?.['address'];!_0xd68640&&(console['error']('[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a'+_0x2d2334(0x319)+_0x2d2334(0x6cd)),process[_0x2d2334(0x256)](0x1));const _0x39f88f=require$$5$1,_0x1d126b=new _0x39f88f(_0x2fcf38[_0x2d2334(0x445)],{'sync':{'address':_0xd68640,'auto_reconcile':![]}});await _0x1d126b[_0x2d2334(0x375)]();try{const _0x178d5e=_0x1d126b[_0x2d2334(0x5e4)];if(_0x178d5e&&_0x178d5e[_0x2d2334(0x79e)](_0x2d2334(0x27c))){let _0x20513e=![];for(const _0x20da83 of _0x178d5e[_0x2d2334(0x5fb)]('~tokens')){_0x20513e=!![];break;}_0x20513e&&console['log']('\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a'+_0x2d2334(0x4c4));}console[_0x2d2334(0x515)](_0x2d2334(0x773)+_0x5382a9+'…'),await _0x1d126b[_0x2d2334(0x481)][_0x2d2334(0x3de)](_0x5382a9[_0x2d2334(0x16b)](/\/+$/,''),{'token':_0x22000c['token'],'username':_0x22000c[_0x2d2334(0x51e)],'password':_0x22000c[_0x2d2334(0x295)]}),console['log']('\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated'),console[_0x2d2334(0x515)]('\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a');}finally{await _0x1d126b[_0x2d2334(0x57c)]();}}async function _0x172624(){const _0x51c635=_0x507df9,_0x429670=Date['now'](),_0x3a952a=_0x200209(process['argv']),_0x594fbd=_0x25f13d(_0x3a952a),_0x432929=_0x6a5b17[_0x51c635(0x2f4)](_0x594fbd[_0x51c635(0x445)]);!_0x594fbd[_0x51c635(0x492)]&&!process['stdin'][_0x51c635(0x250)]&&(_0x594fbd[_0x51c635(0x492)]=!![]);const _0x5c4125=require$$5$1,{start:_0x682406,colorLog:_0x5a630f}=requireOkdbShell(),_0x39125b=require$$1$1,_0x540bf9={..._0x594fbd[_0x51c635(0x17d)]?{'encryptionKey':_0x594fbd['key']}:{},..._0x594fbd['noAdmin']?{'admin':![]}:_0x2c4455(_0x594fbd[_0x51c635(0x176)])?{'admin':_0x594fbd['admin']}:{},..._0x2c4455(_0x594fbd[_0x51c635(0x421)])?{'api':_0x594fbd['api']}:{},..._0x2c4455(_0x594fbd[_0x51c635(0x788)])?{'auth':_0x594fbd[_0x51c635(0x788)]}:{},..._0x2c4455(_0x594fbd[_0x51c635(0x30c)])?{'mcp':_0x594fbd[_0x51c635(0x30c)]}:{},..._0x2c4455(_0x594fbd[_0x51c635(0x42c)])?{'backup':_0x594fbd['backup']}:{},..._0x594fbd['timeMachine']!==![]?{'timeMachine':_0x594fbd[_0x51c635(0x11f)]}:{},...Object[_0x51c635(0x630)](_0x45c958[_0x51c635(0x64e)](_0xfd795d=>_0x594fbd[_0xfd795d]!==undefined)[_0x51c635(0x6d7)](_0x19e84f=>[_0x19e84f,_0x594fbd[_0x19e84f]]))},_0x3dfe53=_0x2037c8(_0x594fbd);if(!_0x39125b[_0x51c635(0x519)]){const _0x2eba20=_0xc10c15(),_0x322695=_0x594fbd[_0x51c635(0x3db)]?'--no-cluster':_0x594fbd['workersFlag']!=null&&_0x594fbd[_0x51c635(0x62e)]!==''?_0x51c635(0x676):process.env.OKDB_HTTP_WORKERS?_0x51c635(0x3ec):_0x594fbd[_0x51c635(0x36a)]?.['workers']!=null?_0x51c635(0x43d):_0x51c635(0x6ff)+Math[_0x51c635(0x42f)](0x1,require$$0['cpus']()[_0x51c635(0x330)]-0x1);process['stdout']['write'](_0x51c635(0x3f6)+_0x3dfe53+'\x20('+_0x322695+(!_0x2eba20?';\x20shmbuf\x20native\x20missing\x20→\x20forced\x20single-process':'')+')\x0a');}if(_0x39125b[_0x51c635(0x519)]){const _0x33814e={..._0x540bf9},_0x5898fa=new _0x5c4125(_0x432929,_0x33814e);_0x5898fa['log']['detachConsole']?.();const _0x50faad=process.env.OKDB_CLUSTER_SLOT??'?',_0x205c5d={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x5b79ba=_0x205c5d[_0x594fbd['logLevel']]??_0x205c5d[_0x51c635(0x743)];_0x5898fa[_0x51c635(0x515)]['attach'](_0x1adf78=>{const _0x14d91b=_0x51c635;if((_0x205c5d[_0x1adf78[_0x14d91b(0x33e)]]??0x1)<_0x5b79ba)return;try{process[_0x14d91b(0x321)]?.({'__okdbCluster':_0x14d91b(0x515),'slot':_0x50faad,'pid':process[_0x14d91b(0x7af)],'entry':_0x1adf78});}catch{}}),await _0x5898fa['open']();const {attachWorkerCluster:_0xfd5360}=requireOkdbCluster();_0xfd5360(_0x5898fa),await _0x5dcff2(_0x5898fa,_0x594fbd['port'],_0xc62b2d(_0x594fbd));return;}if(_0x3dfe53>0x1){const {runClustered:_0x28ed45}=requireOkdbCluster(),_0x50a04e=new _0x5c4125(_0x432929,{..._0x540bf9,'engines':![],'processors':![],'compaction':![]});await _0x50a04e['open']();const _0x2092c7=async()=>{const _0x342e57=_0x51c635,_0x16642f=new _0x5c4125(_0x432929,{..._0x540bf9});return await _0x16642f[_0x342e57(0x375)](),_0x16642f;},_0x5e7324=Object[_0x51c635(0x630)](_0x45c958[_0x51c635(0x6d7)](_0x3fcb8c=>[_0x3fcb8c,_0x540bf9[_0x3fcb8c]??!![]])),{formatListenAddr:_0x1bb86c}=requireOkdbHttp(),_0x419a4f=_0x1bb86c(_0x594fbd[_0x51c635(0x2fa)],_0x594fbd[_0x51c635(0x36a)]?.[_0x51c635(0x75f)]),_0x400a86=_0x28ed45({'workers':_0x3dfe53,'makeOkdb':_0x2092c7,'port':_0x594fbd[_0x51c635(0x2fa)],'primaryOkdb':_0x50a04e,'workerRole':_0x5e7324,'listenAddr':_0x419a4f});let _0x4cfd0e=![];async function _0x4debbe(_0x2c8b1f){const _0x11db6a=_0x51c635;_0x4cfd0e&&(process[_0x11db6a(0x331)][_0x11db6a(0x4c7)](_0x11db6a(0x30d)),process[_0x11db6a(0x256)](0x82));_0x4cfd0e=!![],process['stderr']['write'](_0x11db6a(0x13b)+(_0x2c8b1f||_0x11db6a(0x6b8))+',\x20stopping\x20workers…\x0a');const _0x303725=setTimeout(()=>{const _0x270c8d=_0x11db6a;process[_0x270c8d(0x331)]['write']('[okdb]\x20shutdown\x20drain\x20exceeded\x203000ms\x20—\x20hard-exiting\x0a'),process['exit'](0x0);},0xbb8);_0x303725[_0x11db6a(0x169)]?.();try{await _0x400a86[_0x11db6a(0x57c)]();}catch(_0x52295e){process[_0x11db6a(0x331)][_0x11db6a(0x4c7)](_0x11db6a(0x1a3)+(_0x52295e?.[_0x11db6a(0x7b6)]??_0x52295e)+'\x0a');}try{await _0x50a04e[_0x11db6a(0x57c)]();}catch(_0x56b13c){process[_0x11db6a(0x331)][_0x11db6a(0x4c7)](_0x11db6a(0x1bb)+(_0x56b13c?.[_0x11db6a(0x7b6)]??_0x56b13c)+'\x0a');}process[_0x11db6a(0x256)](0x0);}_0x594fbd[_0x51c635(0x175)]=_0x3dfe53;if(!_0x594fbd[_0x51c635(0x492)]){_0x50a04e[_0x51c635(0x515)][_0x51c635(0x2aa)]?.(),_0x4b32cc(_0x50a04e[_0x51c635(0x788)]?.[_0x51c635(0x20c)]?.()??[]),await _0x682406(_0x50a04e,_0x594fbd);return;}process[_0x51c635(0x663)]['write'](_0x51c635(0x54d)+process[_0x51c635(0x7af)]+_0x51c635(0x66c)+_0x3dfe53+'\x20'+(_0x51c635(0x20f)+_0x594fbd[_0x51c635(0x2fa)]+'\x0a')),console[_0x51c635(0x515)](''),console[_0x51c635(0x515)](_0x51c635(0x403)),console[_0x51c635(0x515)](_0x51c635(0x702)+_0x594fbd[_0x51c635(0x2fa)]+_0x51c635(0x61f)+_0x3dfe53+_0x51c635(0x76d)),console[_0x51c635(0x515)](_0x51c635(0x697)+_0x432929),console[_0x51c635(0x515)](_0x51c635(0x1da)+_0x50a04e['id']),console[_0x51c635(0x515)](_0x51c635(0x222)+_0x594fbd[_0x51c635(0x2fa)]+'/api');!_0x594fbd['noAdmin']&&console['log'](_0x51c635(0x488)+_0x594fbd[_0x51c635(0x2fa)]+_0x51c635(0x695));console[_0x51c635(0x515)](''),_0x4b32cc(_0x50a04e['auth']?.['getSecurityNotices']?.()??[]),process['on'](_0x51c635(0x4e5),()=>_0x4debbe(_0x51c635(0x4e5))),process['on'](_0x51c635(0x12f),()=>_0x4debbe(_0x51c635(0x12f))),process['on']('SIGBREAK',()=>_0x4debbe('SIGBREAK'));return;}const _0x4be378=new _0x5c4125(_0x432929,_0x540bf9);_0x4be378[_0x51c635(0x515)]['detachConsole']?.();const _0x322d46=_0x4be378['log'][_0x51c635(0x437)](_0x54d4bc=>_0x5a630f(_0x54d4bc,_0x594fbd['logLevel']));if(_0x594fbd[_0x51c635(0x492)])process['stdout'][_0x51c635(0x4c7)](_0x51c635(0x563));await _0x4be378[_0x51c635(0x375)]();if(_0x594fbd[_0x51c635(0x492)])process[_0x51c635(0x663)][_0x51c635(0x4c7)](_0x51c635(0x7ba));try{await _0x5dcff2(_0x4be378,_0x594fbd[_0x51c635(0x2fa)],_0xc62b2d(_0x594fbd));}catch(_0x5676f4){_0x5676f4[_0x51c635(0x4bc)]===_0x51c635(0x388)&&(console[_0x51c635(0x5f2)](_0x51c635(0xd7)+_0x594fbd[_0x51c635(0x2fa)]+_0x51c635(0x5ad)),process['exit'](0x1));throw _0x5676f4;}if(_0x594fbd[_0x51c635(0x492)]){const _0x5ab42f=_0x594fbd[_0x51c635(0x36a)]?.[_0x51c635(0x75f)]!==undefined?[][_0x51c635(0x166)](_0x594fbd[_0x51c635(0x36a)][_0x51c635(0x75f)])[_0x51c635(0x3de)](',\x20')+'\x20':'';process[_0x51c635(0x663)][_0x51c635(0x4c7)](_0x51c635(0x70d)+_0x5ab42f+':'+_0x594fbd[_0x51c635(0x2fa)]+'\x0a');}if(!_0x594fbd['noRepl'])_0x4be378[_0x51c635(0x515)][_0x51c635(0x2aa)]?.(),_0x322d46?.(),_0x4b32cc(_0x4be378[_0x51c635(0x788)]?.[_0x51c635(0x20c)]?.()??[]),await _0x682406(_0x4be378,_0x594fbd);else{const _0x4e4995=_0x6a5b17['join'](_0x432929,_0x51c635(0x4d0));try{_0x2ed8f5[_0x51c635(0x35a)](_0x4e4995,String(process[_0x51c635(0x7af)]));}catch{}const _0x2ce84c=Date[_0x51c635(0x556)]()-_0x429670;console[_0x51c635(0x515)](''),console[_0x51c635(0x515)](_0x51c635(0xca)),console[_0x51c635(0x515)](_0x51c635(0x6e9)+_0x594fbd[_0x51c635(0x2fa)]),console[_0x51c635(0x515)](_0x51c635(0xc8)+_0x432929),console['log']('\x20\x20\x20\x20id:\x20\x20\x20\x20'+_0x4be378['id']);{const _0x47b605=_0x4be378[_0x51c635(0x5e4)]?.['db']?.[_0x51c635(0x294)]?.(_0x51c635(0x65f))??0x0,_0x4970d3=[..._0x4be378[_0x51c635(0x561)][_0x51c635(0x434)]()][_0x51c635(0x64e)](_0x834793=>!_0x834793[_0x51c635(0x1a9)]('~'))[_0x51c635(0x330)];if(_0x4be378['_license']?.[_0x51c635(0x5df)]?.[_0x51c635(0x46f)]===0x1){const _0xb6d6f6=Math['ceil']((_0x4be378['_license'][_0x51c635(0x5df)][_0x51c635(0x257)]-Date[_0x51c635(0x556)]())/0x5265c00);console[_0x51c635(0x515)](_0x51c635(0x68d)+_0x4be378[_0x51c635(0xdb)][_0x51c635(0x5df)][_0x51c635(0xe5)]+_0x51c635(0x710)+_0xb6d6f6+'\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)');}else{if(_0x4be378[_0x51c635(0xdb)]?.[_0x51c635(0x5df)]){const _0x2a0692=_0x4be378[_0x51c635(0xdb)]['active'];console[_0x51c635(0x515)](_0x51c635(0xda)+_0x2a0692[_0x51c635(0xe5)]+_0x51c635(0x59e)+new Date(_0x2a0692[_0x51c635(0x257)])[_0x51c635(0x340)]()[_0x51c635(0x333)](0x0,0xa)+')');const _0x58aba3=_0x2a0692[_0x51c635(0x5eb)]||{};if(_0x58aba3[_0x51c635(0x325)]){const _0x42963d=Math[_0x51c635(0x2d5)](_0x47b605/_0x58aba3['maxWrites']*0x64);console[_0x51c635(0x515)](_0x51c635(0x414)+_0x47b605[_0x51c635(0x77e)]()+_0x51c635(0x75a)+_0x58aba3[_0x51c635(0x325)][_0x51c635(0x77e)]()+_0x51c635(0x65d)+_0x42963d+'%),\x20'+_0x4970d3+(_0x58aba3[_0x51c635(0x384)]?'/'+_0x58aba3[_0x51c635(0x384)]:'')+_0x51c635(0x51d)+(_0x4970d3===0x1?'':'s'));}}else{if(_0x4be378['_license']){const _0x205db0=_0x4be378[_0x51c635(0xdb)][_0x51c635(0x3f4)](),_0x182918=_0x205db0['length']?_0x205db0[_0x51c635(0x6d7)](_0x2c5f5=>_0x2c5f5[_0x51c635(0x35d)])['join'](',\x20'):'(add\x20a\x20license\x20first)',_0x19e851=_0x4be378[_0x51c635(0xdb)]['effective'],_0x15ebc3=_0x19e851[_0x51c635(0x5eb)][_0x51c635(0x325)]?Math[_0x51c635(0x2d5)](_0x47b605/_0x19e851[_0x51c635(0x5eb)][_0x51c635(0x325)]*0x64):0x0;console[_0x51c635(0x515)](_0x51c635(0x186)),console[_0x51c635(0x515)](_0x51c635(0x414)+_0x47b605[_0x51c635(0x77e)]()+_0x51c635(0x75a)+_0x19e851[_0x51c635(0x5eb)][_0x51c635(0x325)][_0x51c635(0x77e)]()+_0x51c635(0x65d)+_0x15ebc3+_0x51c635(0x45b)+_0x4970d3+_0x51c635(0x75a)+_0x19e851[_0x51c635(0x5eb)][_0x51c635(0x384)]+_0x51c635(0x768)),console[_0x51c635(0x515)](_0x51c635(0x616)+_0x182918);}}}}console[_0x51c635(0x515)]('\x20\x20\x20\x20api:\x20\x20\x20http://localhost:'+_0x594fbd[_0x51c635(0x2fa)]+'/api');!_0x594fbd[_0x51c635(0x2a3)]&&console[_0x51c635(0x515)](_0x51c635(0x226)+_0x594fbd[_0x51c635(0x2fa)]+_0x51c635(0x695));console['log'](''),console[_0x51c635(0x515)](_0x51c635(0x239)+_0x2ce84c+'ms'),_0x4b32cc(_0x4be378[_0x51c635(0x788)]?.['getSecurityNotices']?.()??[]);let _0x1a3815=![];async function _0x90e13(_0x1af983){const _0x15726f=_0x51c635;_0x1a3815&&(process[_0x15726f(0x331)][_0x15726f(0x4c7)]('\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a'),process[_0x15726f(0x256)](0x82));_0x1a3815=!![],process['stderr'][_0x15726f(0x4c7)](_0x15726f(0x13b)+(_0x1af983||_0x15726f(0x6b8))+',\x20closing…\x0a');const _0x2732cb=setTimeout(()=>{const _0xc0d868=_0x15726f;process['stderr'][_0xc0d868(0x4c7)](_0xc0d868(0x468)),process[_0xc0d868(0x256)](0x1);},0x1388);try{_0x2ed8f5[_0x15726f(0x5e3)](_0x4e4995);}catch{}try{await _0x4be378[_0x15726f(0x57c)]();}catch(_0x1d9e2f){process[_0x15726f(0x331)][_0x15726f(0x4c7)](_0x15726f(0x4d8)+(_0x1d9e2f?.['message']??_0x1d9e2f)+'\x0a');}clearTimeout(_0x2732cb),process['stderr']['write'](_0x15726f(0x3b9)),process['exit'](0x0);}process['on']('SIGINT',()=>_0x90e13('SIGINT')),process['on']('SIGTERM',()=>_0x90e13(_0x51c635(0x12f))),process['on'](_0x51c635(0x6e5),()=>_0x90e13(_0x51c635(0x6e5)));}}const _0x28241d=new Set([_0x507df9(0x1ce),'doctor','init',_0x507df9(0x42c),_0x507df9(0x370),'export',_0x507df9(0x73f),'reset','token','join','license']),_0x406e09=process[_0x507df9(0x74b)][0x2];if(_0x406e09==='version')console[_0x507df9(0x515)](require$$3[_0x507df9(0x1ce)]),process[_0x507df9(0x256)](0x0);else{if(_0x406e09===_0x507df9(0x280))process[_0x507df9(0x256)](requireOkdbShmGc()[_0x507df9(0x3b6)](process[_0x507df9(0x74b)]['slice'](0x3)));else{if(_0x406e09&&_0x28241d[_0x507df9(0x229)](_0x406e09)){const _0x2e2abf=process['argv']['slice'](0x3),_0x375d3f=_0x200209([_0x507df9(0x576),_0x507df9(0x7c7),..._0x2e2abf]),_0x2cc927=_0x25f13d(_0x375d3f),_0x292eae=new Set([_0x507df9(0x1ff),'-d',_0x507df9(0x180),'-k',_0x507df9(0x1f9),'-c',_0x507df9(0x22d),'-p','--log-level','--env','-e',_0x507df9(0x198),_0x507df9(0x577),_0x507df9(0x4e8),'--label','--permissions',_0x507df9(0x15d),'--ttl','--token',_0x507df9(0x5b5),'-u','--address']);let _0x483f9a=null;for(let _0x1a7265=0x0;_0x1a7265<_0x2e2abf[_0x507df9(0x330)];_0x1a7265++){if(_0x292eae[_0x507df9(0x229)](_0x2e2abf[_0x1a7265])){_0x1a7265++;continue;}if(!_0x2e2abf[_0x1a7265][_0x507df9(0x1a9)]('-')){_0x483f9a=_0x2e2abf[_0x1a7265];break;}}(async()=>{const _0x179d21=_0x507df9;if(_0x406e09===_0x179d21(0x2e5)){const _0x162aea=process[_0x179d21(0x74b)][0x3],_0x47f5b4=process[_0x179d21(0x74b)][_0x179d21(0x333)](0x4),_0x206c1d=_0x200209([_0x179d21(0x576),_0x179d21(0x7c7),..._0x47f5b4]),_0x2938c6=_0x25f13d(_0x206c1d),_0x21a9ec=new Set([_0x179d21(0x1ff),'-d','--key','-k',_0x179d21(0x1f9),'-c',_0x179d21(0x22d),'-p',_0x179d21(0x577),_0x179d21(0x4e8),_0x179d21(0x6cb),_0x179d21(0xeb),_0x179d21(0x15d),_0x179d21(0x76b),_0x179d21(0x716),_0x179d21(0x501),'-e','--types']),_0x48954d=[];for(let _0x1a0f59=0x0;_0x1a0f59<_0x47f5b4['length'];_0x1a0f59++){if(_0x21a9ec[_0x179d21(0x229)](_0x47f5b4[_0x1a0f59])){_0x1a0f59++;continue;}if(_0x47f5b4[_0x1a0f59][_0x179d21(0x1a9)]('-'))continue;_0x48954d[_0x179d21(0x5d8)](_0x47f5b4[_0x1a0f59]);}switch(_0x162aea){case _0x179d21(0xf3):await _0x3c67d5(_0x2938c6,_0x206c1d);break;case'list':await _0x26ee32(_0x2938c6);break;case _0x179d21(0x1f3):await _0x385308(_0x48954d[0x0],_0x2938c6);break;default:console[_0x179d21(0x5f2)](_0x179d21(0x2f9)+_0x162aea+_0x179d21(0x1e2)),process[_0x179d21(0x256)](0x1);}return;}if(_0x406e09===_0x179d21(0x182)){const _0x4a63ab=requireOkdbLicenseCodec(),_0x4770fb=process[_0x179d21(0x74b)][_0x179d21(0x333)](0x3),_0x286a89=_0x200209(['node','okdb',..._0x4770fb]),_0x5ae272=_0x25f13d(_0x286a89),_0x5a859b=new Set(['--path','-d','--key','-k',_0x179d21(0x1f9),'-c',_0x179d21(0x22d),'-p',_0x179d21(0x716)]),_0x4310d0=[];for(let _0x5b3f13=0x0;_0x5b3f13<_0x4770fb[_0x179d21(0x330)];_0x5b3f13++){if(_0x5a859b['has'](_0x4770fb[_0x5b3f13])){_0x5b3f13++;continue;}if(_0x4770fb[_0x5b3f13][_0x179d21(0x1a9)]('-'))continue;_0x4310d0[_0x179d21(0x5d8)](_0x4770fb[_0x5b3f13]);}const _0xbe5b93=_0x4310d0[0x0]??null;if(_0xbe5b93==='remove')await _0x1c3aae(_0x4310d0[0x1],_0x5ae272);else{if(!_0xbe5b93)await _0x50e64c(_0x5ae272);else{let _0xd0f980=_0x4a63ab[_0x179d21(0x2ee)](_0xbe5b93);if(_0xd0f980===_0x179d21(0x1ac)&&_0x2ed8f5[_0x179d21(0x2d6)](_0xbe5b93))_0xd0f980=_0x179d21(0x58f);if(_0xd0f980===_0x179d21(0x58f))try{const _0x95116b=_0x2ed8f5[_0x179d21(0x2ef)](_0xbe5b93,_0x179d21(0x3f0))[_0x179d21(0x7ad)](),_0x4a76dc=_0x4a63ab[_0x179d21(0x2ee)](_0x95116b);if(_0x4a76dc==='activation'){await _0x3482dd(_0x95116b,_0x5ae272);return;}await _0x4b43bb(_0xbe5b93,_0x5ae272);return;}catch(_0x63774f){console[_0x179d21(0x5f2)](_0x179d21(0x2c9)+_0xbe5b93+':\x20'+_0x63774f['message']),process[_0x179d21(0x256)](0x1);}switch(_0xd0f980){case'blob':await _0x4b43bb(_0xbe5b93,_0x5ae272);break;case _0x179d21(0x1a1):await _0x3482dd(_0xbe5b93,_0x5ae272);break;case'uuid':await _0x35590e(_0xbe5b93,_0x5ae272);break;default:console[_0x179d21(0x5f2)]('[okdb]\x20error:\x20unrecognized\x20input:\x20\x22'+_0xbe5b93+'\x22'),console['error'](''),console['error']('\x20\x20Expected\x20one\x20of:'),console[_0x179d21(0x5f2)](_0x179d21(0x449)),console['error'](_0x179d21(0x3d9)),console[_0x179d21(0x5f2)]('\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)'),console[_0x179d21(0x5f2)](_0x179d21(0x75b)),console['error'](''),console[_0x179d21(0x5f2)](_0x179d21(0x281)),process['exit'](0x1);}}}return;}switch(_0x406e09){case _0x179d21(0x344):await _0xa35f35(_0x2cc927);break;case'init':await _0x4a0ecd();break;case'reset':await _0x4ef324(_0x2cc927);break;case _0x179d21(0x42c):await _0x9302c2(_0x483f9a??_0x6a5b17['resolve'](_0x179d21(0x651)),_0x2cc927);break;case _0x179d21(0x370):if(!_0x483f9a)throw new Error('usage:\x20okdb\x20restore\x20<backup-dir>\x20--path\x20<target-data-dir>');await _0x3207fc(_0x6a5b17['resolve'](_0x483f9a),_0x2cc927,_0x375d3f);break;case _0x179d21(0x3b8):await _0x23c6b4(_0x483f9a??_0x6a5b17['resolve']('./okdb-export.ndjson'),_0x2cc927,_0x375d3f);break;case _0x179d21(0x73f):await _0x41a1ab(_0x483f9a??_0x6a5b17['resolve']('./okdb-export.ndjson'),_0x2cc927,_0x375d3f);break;case _0x179d21(0x3de):await _0x3eeab0(_0x483f9a,_0x2cc927,_0x375d3f);break;}})()['then'](()=>process['exit'](0x0))[_0x507df9(0x290)](_0x3b1501=>{const _0xa562f3=_0x507df9;console[_0xa562f3(0x5f2)](_0xa562f3(0x615)+(_0x3b1501['message']||_0x3b1501)+'\x0a'),process[_0xa562f3(0x256)](0x1);});}else _0x172624()[_0x507df9(0x290)](_0x5dc347=>{const _0x126bfb=_0x507df9;console[_0x126bfb(0x5f2)](_0x126bfb(0xf4)),console[_0x126bfb(0x5f2)](_0x5dc347[_0x126bfb(0x28e)]||_0x5dc347),process['exit'](0x1);});}}return okdb$1;}function _0x2ba0(_0x1a838e,_0x3e88b1){_0x1a838e=_0x1a838e-0xc1;const _0xc0fed8=_0xc0fe();let _0x2ba0ee=_0xc0fed8[_0x1a838e];return _0x2ba0ee;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x3f6c2b(0x6a4)]=okdb;