@kedem/okdb 2.5.0 → 2.6.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 (225) hide show
  1. package/CHANGELOG.md +82 -0
  2. package/algorithm-worker-thread.js +1 -1
  3. package/bin/okdb.js +1 -1
  4. package/docs/auth-permissions.md +31 -5
  5. package/okdb-functions-sandbox-worker.js +1 -1
  6. package/okdb-http-worker-child.js +1 -1
  7. package/okdb-views-bootstrap-worker.js +1 -1
  8. package/okdb.js +1 -1
  9. package/package.json +1 -1
  10. package/public/admin-app.js +1 -1
  11. package/public/components/schema-edit-modal.ok.js +1 -0
  12. package/public/core/db/db-section.ok.html +1 -0
  13. package/public/core/db/modals/add-item-modal.ok.js +1 -0
  14. package/public/core/db/modals/create-fts-modal.ok.js +1 -0
  15. package/public/core/db/modals/create-index-modal.ok.js +1 -0
  16. package/public/core/db/parts/db-overview.ok.js +1 -0
  17. package/public/core/db/parts/edit-row.ok.js +1 -0
  18. package/public/core/db/parts/type-changelog.ok.js +1 -0
  19. package/public/core/db/parts/type-data-tab.ok.js +1 -0
  20. package/public/core/db/parts/type-list.ok.js +1 -0
  21. package/public/core/db/parts/type-manage-tab.ok.js +1 -0
  22. package/public/core/db/parts/type-schema-tab.ok.js +1 -0
  23. package/public/core/db/parts/type-viewer.ok.js +1 -0
  24. package/public/core/db/type-ops.js +1 -0
  25. package/public/core/docs/docs-page.ok.html +1 -0
  26. package/public/core/license/license-panel.ok.js +1 -0
  27. package/public/core/system/parts/system-log.ok.js +1 -0
  28. package/public/core/system/parts/system-processing-panel.ok.js +1 -0
  29. package/public/core/system/parts/system-storage-panel.ok.js +1 -0
  30. package/public/core/system/system-events-page.ok.js +1 -0
  31. package/public/core/system/system-logs-page.ok.js +1 -0
  32. package/public/core/system/system-overview-page.ok.html +1 -0
  33. package/public/core/system/system-runtime-page.ok.js +1 -0
  34. package/public/core/system/system-section.ok.html +1 -0
  35. package/public/features/api/api-panel.ok.js +1 -0
  36. package/public/features/api/index.js +1 -0
  37. package/public/features/auth/auth-panel.ok.js +1 -0
  38. package/public/features/auth/index.js +1 -0
  39. package/public/features/files/files-section.ok.html +1 -0
  40. package/public/features/files/index.js +1 -0
  41. package/public/features/files/parts/files-file-list.ok.js +1 -0
  42. package/public/features/files/parts/files-path-browser.ok.js +1 -0
  43. package/public/features/files/parts/files-preview.ok.js +1 -0
  44. package/public/features/files/parts/files-upload-panel.ok.js +1 -0
  45. package/public/features/functions/exports.js +1 -0
  46. package/public/features/functions/functions-section.ok.html +1 -0
  47. package/public/features/functions/functions-store.js +1 -0
  48. package/public/features/functions/index.js +1 -0
  49. package/public/features/functions/modals/function-modal.ok.js +1 -0
  50. package/public/features/functions/parts/function-detail.ok.js +1 -0
  51. package/public/features/functions/parts/function-logs.ok.js +1 -0
  52. package/public/features/functions/parts/function-runner.ok.js +1 -0
  53. package/public/features/pipelines/engine-ui-utils.js +1 -0
  54. package/public/features/pipelines/exports.js +1 -0
  55. package/public/features/pipelines/index.js +1 -0
  56. package/public/features/pipelines/modals/create-pipeline-modal.ok.js +1 -0
  57. package/public/features/pipelines/modals/edit-pipeline-modal.ok.js +1 -0
  58. package/public/features/pipelines/modals/engine-modal.ok.js +1 -0
  59. package/public/features/pipelines/parts/embed-create-panel.ok.js +1 -0
  60. package/public/features/pipelines/parts/embed-embedder-panel.ok.js +1 -0
  61. package/public/features/pipelines/parts/embed-indexer-panel.ok.js +1 -0
  62. package/public/features/pipelines/parts/embed-search-panel.ok.js +1 -0
  63. package/public/features/pipelines/parts/embed-worker-panel.ok.js +1 -0
  64. package/public/features/pipelines/parts/embeddings-engine-panel.ok.js +1 -0
  65. package/public/features/pipelines/parts/engine-declaration-editor.ok.js +1 -0
  66. package/public/features/pipelines/parts/engines-overview.ok.js +1 -0
  67. package/public/features/pipelines/parts/generic-engine-panel.ok.js +1 -0
  68. package/public/features/pipelines/parts/pipeline-create-panel.ok.js +1 -0
  69. package/public/features/pipelines/parts/pipeline-flow-strip.ok.js +1 -0
  70. package/public/features/pipelines/parts/type-pipelines-tab.ok.js +1 -0
  71. package/public/features/pipelines/pipelines-section.ok.html +1 -0
  72. package/public/features/queue/index.js +1 -0
  73. package/public/features/queue/modals/create-bucket-modal.ok.js +1 -0
  74. package/public/features/queue/modals/edit-bucket-modal.ok.js +1 -0
  75. package/public/features/queue/modals/edit-job-modal.ok.js +1 -0
  76. package/public/features/queue/modals/enqueue-job-modal.ok.js +1 -0
  77. package/public/features/queue/modals/job-type-modal.ok.js +1 -0
  78. package/public/features/queue/parts/job-log-panel.ok.js +1 -0
  79. package/public/features/queue/parts/queue-buckets.ok.js +1 -0
  80. package/public/features/queue/parts/queue-job-types.ok.js +1 -0
  81. package/public/features/queue/parts/queue-jobs.ok.js +1 -0
  82. package/public/features/queue/parts/queue-types.ok.js +1 -0
  83. package/public/features/queue/parts/queue-workers.ok.js +1 -0
  84. package/public/features/queue/queue-section.ok.html +1 -0
  85. package/public/features/sync/index.js +1 -0
  86. package/public/features/sync/sync-panel.ok.js +1 -0
  87. package/public/features/views/index.js +1 -0
  88. package/public/features/views/modals/create-view-modal.ok.js +1 -0
  89. package/public/features/views/parts/views-list.ok.js +1 -0
  90. package/public/features/views/parts/views-overview.ok.js +1 -0
  91. package/public/features/views/views-section.ok.html +1 -0
  92. package/public/features/views/views-store.js +1 -0
  93. package/public/index.html +9 -3
  94. package/public/modules/ok.js +1 -1
  95. package/public/shell/admin-shell.ok.html +3 -0
  96. package/public/shell/core-manifest.js +1 -0
  97. package/public/shell/shell-piece.ok.js +1 -0
  98. package/public/shell/shell-section-host.ok.js +1 -0
  99. package/public/shell/shell-section.ok.js +1 -0
  100. package/public/shell/shell-store.js +1 -0
  101. package/public/stores/auth-store.js +1 -1
  102. package/public/stores/okdb-store.js +1 -1
  103. package/public/stores/storage-store.js +1 -0
  104. package/public/styles.css +1 -1
  105. package/public/vendor/okjs/ok.esm.min.js +1 -1
  106. package/public/vendor/okjs/toolkit/components/ok-chart.ok.js +1 -1
  107. package/public/vendor/okjs/toolkit/components/ok-doc-viewer.ok.js +1 -1
  108. package/public/vendor/okjs/toolkit/components/ok-marked.ok.js +1 -1
  109. package/public/vendor/okjs/toolkit/components/ok-monaco.ok.js +1 -1
  110. package/public/components/admin-route-host.ok.js +0 -1
  111. package/public/components/field.html +0 -158
  112. package/public/layouts/_default.ok.html +0 -3
  113. package/public/sections/api/index.ok.html +0 -1
  114. package/public/sections/auth/index.ok.html +0 -1
  115. package/public/sections/auth/modals/perm-info-popover.ok.js +0 -1
  116. package/public/sections/db/index.ok.html +0 -1
  117. package/public/sections/db/modals/add-item-modal.ok.js +0 -1
  118. package/public/sections/db/modals/create-fts-modal.ok.js +0 -1
  119. package/public/sections/db/modals/create-index-modal.ok.js +0 -1
  120. package/public/sections/db/modals/create-pipeline-modal.ok.js +0 -1
  121. package/public/sections/db/modals/schema-edit-modal.ok.js +0 -1
  122. package/public/sections/db/parts/db-overview.ok.js +0 -1
  123. package/public/sections/db/parts/edit-row.ok.js +0 -1
  124. package/public/sections/db/parts/type-changelog.ok.js +0 -1
  125. package/public/sections/db/parts/type-list.ok.js +0 -1
  126. package/public/sections/db/parts/type-pipelines-tab.ok.js +0 -1
  127. package/public/sections/db/parts/type-schema-tab.ok.js +0 -1
  128. package/public/sections/db/parts/type-viewer.ok.js +0 -1
  129. package/public/sections/db/parts/type-violations-tab.ok.js +0 -1
  130. package/public/sections/docs/index.ok.html +0 -1
  131. package/public/sections/embeddings/index.ok.html +0 -1
  132. package/public/sections/embeddings/modals/edit-pipeline-modal.ok.js +0 -1
  133. package/public/sections/embeddings/parts/embed-create-panel.ok.js +0 -1
  134. package/public/sections/embeddings/parts/embed-embedder-panel.ok.js +0 -1
  135. package/public/sections/embeddings/parts/embed-engine-declaration-editor.ok.js +0 -1
  136. package/public/sections/embeddings/parts/embed-engine-list.ok.js +0 -1
  137. package/public/sections/embeddings/parts/embed-indexer-panel.ok.js +0 -1
  138. package/public/sections/embeddings/parts/embed-lifecycle-bar.ok.js +0 -1
  139. package/public/sections/embeddings/parts/embed-overview.ok.js +0 -1
  140. package/public/sections/embeddings/parts/embed-search-panel.ok.js +0 -1
  141. package/public/sections/embeddings/parts/embed-worker-panel.ok.js +0 -1
  142. package/public/sections/embeddings/parts/embeddings-engine-panel.ok.js +0 -1
  143. package/public/sections/embeddings/parts/engines-overview.ok.js +0 -1
  144. package/public/sections/embeddings/parts/pipeline-create-panel.ok.js +0 -1
  145. package/public/sections/embeddings/parts/pipeline-flow-strip.ok.js +0 -1
  146. package/public/sections/engines/engine-ui-utils.js +0 -1
  147. package/public/sections/engines/index.ok.html +0 -1
  148. package/public/sections/engines/modals/engine-modal.ok.js +0 -1
  149. package/public/sections/engines/parts/engine-declaration-editor.ok.js +0 -1
  150. package/public/sections/engines/parts/generic-engine-panel.ok.js +0 -1
  151. package/public/sections/files/index.ok.html +0 -1
  152. package/public/sections/files/parts/files-collection-list.ok.js +0 -1
  153. package/public/sections/files/parts/files-collection-panel.ok.js +0 -1
  154. package/public/sections/files/parts/files-file-list.ok.js +0 -1
  155. package/public/sections/files/parts/files-path-browser.ok.js +0 -1
  156. package/public/sections/files/parts/files-preview.ok.js +0 -1
  157. package/public/sections/files/parts/files-upload-panel.ok.js +0 -1
  158. package/public/sections/functions/index.ok.html +0 -1
  159. package/public/sections/functions/modals/function-modal.ok.js +0 -1
  160. package/public/sections/functions/parts/function-detail.ok.js +0 -1
  161. package/public/sections/functions/parts/function-logs.ok.js +0 -1
  162. package/public/sections/functions/parts/function-runner.ok.js +0 -1
  163. package/public/sections/license/index.ok.html +0 -1
  164. package/public/sections/license/parts/license-panel.ok.js +0 -1
  165. package/public/sections/queue/index.ok.html +0 -1
  166. package/public/sections/queue/modals/create-bucket-modal.ok.js +0 -1
  167. package/public/sections/queue/modals/edit-bucket-modal.ok.js +0 -1
  168. package/public/sections/queue/modals/edit-job-modal.ok.js +0 -1
  169. package/public/sections/queue/modals/enqueue-job-modal.ok.js +0 -1
  170. package/public/sections/queue/modals/job-type-modal.ok.js +0 -1
  171. package/public/sections/queue/parts/job-log-panel.ok.js +0 -1
  172. package/public/sections/queue/parts/ok-job-form.ok.js +0 -1
  173. package/public/sections/queue/parts/queue-buckets.ok.js +0 -1
  174. package/public/sections/queue/parts/queue-job-types.ok.js +0 -1
  175. package/public/sections/queue/parts/queue-jobs.ok.js +0 -1
  176. package/public/sections/queue/parts/queue-types.ok.js +0 -1
  177. package/public/sections/queue/parts/queue-workers.ok.js +0 -1
  178. package/public/sections/sync/index.ok.html +0 -5
  179. package/public/sections/sync/parts/sync-node-detail.ok.js +0 -1
  180. package/public/sections/system/index.ok.html +0 -1
  181. package/public/sections/system/parts/system-api-panel.ok.js +0 -1
  182. package/public/sections/system/parts/system-auth-panel.ok.js +0 -1
  183. package/public/sections/system/parts/system-log.ok.js +0 -1
  184. package/public/sections/system/parts/system-processing-panel.ok.js +0 -1
  185. package/public/sections/system/parts/system-status.ok.js +0 -1
  186. package/public/sections/system/parts/system-storage-panel.ok.js +0 -1
  187. package/public/sections/system/parts/system-sync-panel.ok.js +0 -1
  188. package/public/sections/views/index.ok.html +0 -1
  189. package/public/sections/views/modals/create-view-modal.ok.js +0 -1
  190. package/public/sections/views/parts/views-list.ok.js +0 -1
  191. package/public/sections/views/parts/views-overview.ok.js +0 -1
  192. package/public/stores/functions-store.js +0 -1
  193. /package/public/{sections → core}/db/parts/tm-timeline.ok.js +0 -0
  194. /package/public/{util → core/db}/sift-schema.js +0 -0
  195. /package/public/{view-models → core/db}/type-query-vm.js +0 -0
  196. /package/public/{sections → core}/system/modals/data-ops-modal.ok.js +0 -0
  197. /package/public/{sections → core}/system/parts/system-locks-panel.ok.js +0 -0
  198. /package/public/{sections → core}/system/parts/system-log-history.ok.js +0 -0
  199. /package/public/{sections → core}/system/parts/system-process-panel.ok.js +0 -0
  200. /package/public/{sections → core}/system/parts/system-runtime-overview.ok.js +0 -0
  201. /package/public/{sections → features}/api/parts/api-endpoint.ok.js +0 -0
  202. /package/public/{sections → features}/auth/modals/create-token-modal.ok.js +0 -0
  203. /package/public/{sections → features}/auth/modals/edit-token-modal.ok.js +0 -0
  204. /package/public/{sections → features}/auth/parts/token-detail.ok.js +0 -0
  205. /package/public/{sections → features}/auth/parts/token-list.ok.js +0 -0
  206. /package/public/{sections → features}/files/parts/files-blob-status.ok.js +0 -0
  207. /package/public/{sections → features}/files/parts/files-overview.ok.js +0 -0
  208. /package/public/{sections → features}/functions/parts/functions-list.ok.js +0 -0
  209. /package/public/{sections/engines → features/pipelines}/engine-panel-shared-style.js +0 -0
  210. /package/public/{sections/embeddings → features/pipelines}/modals/register-model-modal.ok.js +0 -0
  211. /package/public/{sections/embeddings → features/pipelines}/modals/replace-embedder-modal.ok.js +0 -0
  212. /package/public/{sections/embeddings → features/pipelines}/parts/embed-model-catalog.ok.js +0 -0
  213. /package/public/{sections/engines → features/pipelines}/parts/engine-lifecycle-actions.ok.js +0 -0
  214. /package/public/{sections/engines → features/pipelines}/parts/engine-panel-shell.ok.js +0 -0
  215. /package/public/{sections/engines → features/pipelines}/parts/engine-resource-card.ok.js +0 -0
  216. /package/public/{sections/engines → features/pipelines}/parts/engine-row-item.ok.js +0 -0
  217. /package/public/{sections/embeddings → features/pipelines}/parts/pipeline-try-search.ok.js +0 -0
  218. /package/public/{sections → features}/queue/parts/code-panel.ok.js +0 -0
  219. /package/public/{sections → features}/sync/modals/connect-peer-modal.ok.js +0 -0
  220. /package/public/{sections → features}/sync/parts/sync-retention.ok.js +0 -0
  221. /package/public/{sections → features}/sync/parts/sync-topology.ok.js +0 -0
  222. /package/public/{sections → features}/views/parts/view-detail.ok.js +0 -0
  223. /package/public/{sections/db → shell}/modals/create-env-modal.ok.js +0 -0
  224. /package/public/{sections/db → shell}/modals/demo-env-modal.ok.js +0 -0
  225. /package/public/{sections/db → shell}/modals/remove-env-modal.ok.js +0 -0
@@ -1 +1 @@
1
- 'use strict';const _0x1f2bca=_0x2789;(function(_0x324f11,_0x119017){const _0x2ec401=_0x2789,_0x31c973=_0x324f11();while(!![]){try{const _0x32169b=parseInt(_0x2ec401(0x223))/0x1+-parseInt(_0x2ec401(0x2ff))/0x2*(parseInt(_0x2ec401(0x1ff))/0x3)+-parseInt(_0x2ec401(0x368))/0x4+parseInt(_0x2ec401(0x2b8))/0x5*(parseInt(_0x2ec401(0x2d3))/0x6)+parseInt(_0x2ec401(0x177))/0x7+-parseInt(_0x2ec401(0x2da))/0x8*(parseInt(_0x2ec401(0x190))/0x9)+parseInt(_0x2ec401(0x17f))/0xa;if(_0x32169b===_0x119017)break;else _0x31c973['push'](_0x31c973['shift']());}catch(_0x3ba58f){_0x31c973['push'](_0x31c973['shift']());}}}(_0x70b3,0xa3bc3));var require$$0$5=require('./okdb'),require$$1$1=require(_0x1f2bca(0x176)),require$$1=require(_0x1f2bca(0x2bb)),require$$0$3=require('os'),require$$2=require(_0x1f2bca(0x32e)),require$$0=require(_0x1f2bca(0x36b)),require$$0$2=require(_0x1f2bca(0x21f)),require$$0$1=require('fs'),require$$0$4=require(_0x1f2bca(0x1e7));function getDefaultExportFromCjs(_0x20d899){const _0x5f0fb4=_0x1f2bca;return _0x20d899&&_0x20d899[_0x5f0fb4(0x329)]&&Object[_0x5f0fb4(0x1c6)][_0x5f0fb4(0x2d0)][_0x5f0fb4(0x18d)](_0x20d899,'default')?_0x20d899[_0x5f0fb4(0x2e7)]:_0x20d899;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x1a2e66=_0x1f2bca;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0xacd92={'PUT':_0x1a2e66(0x134),'REMOVE':_0x1a2e66(0x13d),'INDEX_DROP':_0x1a2e66(0x1ea),'INDEX_REGISTER':_0x1a2e66(0x171),'INDEX_RESET':_0x1a2e66(0x2a3),'TYPE_REGISTER':_0x1a2e66(0x311),'TYPE_DROP':_0x1a2e66(0x189),'FTS_REGISTER':'registerFts','FTS_DROP':_0x1a2e66(0x140),'FTS_RESET':'resetFts','SCHEMA_SET':'setSchema','SCHEMA_DROP':_0x1a2e66(0x1f5),'TTL_SET':_0x1a2e66(0x188),'TTL_CLEAR':'clearTtl'},_0x4a78c0={'SYSTEM_READY':_0x1a2e66(0x2e4),'FIELD_RESOLVER_REGISTERED':'field:resolver_registered','SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':_0x1a2e66(0x291),'SYSTEM_POKE':_0x1a2e66(0x259),'SYSTEM_DRAIN':_0x1a2e66(0x28c),'SYSTEM_TYPE_DROP':_0x1a2e66(0x14a),'SYSTEM_PROC':_0x1a2e66(0x139),'SYSTEM_BUS_STATE_CHANGE':_0x1a2e66(0x31f),'ITEM_CREATE':_0x1a2e66(0x289),'ITEM_UPDATE':_0x1a2e66(0x30d),'ITEM_REMOVE':_0x1a2e66(0x25d),'ITEM_PENDING':_0x1a2e66(0x145),'INDEX_RESET':_0x1a2e66(0x239),'INDEX_READY':'index:ready','INDEX_PROGRESS':_0x1a2e66(0x2b6),'VIEW_PROGRESS':_0x1a2e66(0x2c8),'INDEX_DROP':_0x1a2e66(0x14f),'INDEX_REGISTERED':_0x1a2e66(0x347),'FTS_REGISTERED':_0x1a2e66(0x339),'FTS_DROP':'fts:drop','FTS_RESET':'fts:reset','SCHEMA_SET':_0x1a2e66(0x1d5),'SCHEMA_DROP':_0x1a2e66(0x1b8),'UNIQUE_VIOLATION':_0x1a2e66(0x2eb),'UNIQUE_VIOLATION_RESOLVED':_0x1a2e66(0x31d),'REF_VIOLATION':'ref:violation','REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':'sync:apply','TXN_START':'txn:start','TXN_END':_0x1a2e66(0x1a5),'TXN_ROLLBACK':_0x1a2e66(0x16b),'TYPE_REGISTERED':_0x1a2e66(0x1d1),'TYPE_DROP':'type:drop','ENV_OPENED':_0x1a2e66(0x254),'ENV_REMOVED':_0x1a2e66(0x2de),'SYSTEM_ENV_RELEASE':_0x1a2e66(0x2ca),'TTL_EXPIRED':_0x1a2e66(0x26e),'TTL_SET':_0x1a2e66(0x217),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':'license:invalid','LICENSE_ADDED':_0x1a2e66(0x292),'LICENSE_ACTIVATED':_0x1a2e66(0x1b2),'LICENSE_REMOVED':_0x1a2e66(0x27e)},_0x937616={'CREATING':'creating','RESETTING':'resetting','READY':_0x1a2e66(0x313),'DROPPING':_0x1a2e66(0x1de),'WAITING':_0x1a2e66(0x143),'ERROR':_0x1a2e66(0x263)},_0x4640f1={'CREATED':_0x1a2e66(0x2fa),'STARTING':_0x1a2e66(0x16f),'STARTED':_0x1a2e66(0x141),'STOPPING':_0x1a2e66(0x205),'STOPPED':_0x1a2e66(0x13b)},_0x297cfa={'CREATING':'creating','READY':_0x1a2e66(0x313),'HALTED':_0x1a2e66(0x27b),'STOPPED':'stopped','RESETTING':_0x1a2e66(0x28d)},_0x7ef601=Object[_0x1a2e66(0x285)]({'POKE':_0x1a2e66(0x1db),'DRAIN':_0x1a2e66(0x31c),'TYPE_DROP':_0x1a2e66(0x1fa),'PROC':'bus:proc','ENV_RELEASE':_0x1a2e66(0x356)});return okdbEnums={'BUS_EVENTS':_0x7ef601,'CHANGE_ACTIONS':_0xacd92,'EVENTS':_0x4a78c0,'INDEX_STATE':_0x937616,'OKDB_STATE':_0x4640f1,'VIEW_STATE':_0x297cfa},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0xeea1b5=_0x1f2bca;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x34748d,performance:_0xc9065a}=require$$0,_0x59fb11=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG==='true',_0x45dca1=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x7c831d=process.env.OKDB_LOOP_LAG_ALL==='1',_0x2ac8f5=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x379573{constructor(){const _0x26a9d5=_0x2789;this[_0x26a9d5(0x36c)]=_0x59fb11,this['_buckets']=new Map(),this['_h']=null,this[_0x26a9d5(0x1d9)]=null,this[_0x26a9d5(0x2b5)]=![],this[_0x26a9d5(0x23e)]=(_0x5146d5,_0x48dedc)=>process['stderr'][_0x26a9d5(0x133)](_0x5146d5+(_0x48dedc?'\x20'+JSON['stringify'](_0x48dedc):'')+'\x0a');}[_0xeea1b5(0x1cf)](){const _0x2fc33e=_0xeea1b5;return _0xc9065a[_0x2fc33e(0x1cf)]();}['setLogger'](_0x57b0eb){const _0x1ac06b=_0xeea1b5;if(typeof _0x57b0eb===_0x1ac06b(0x14b))this[_0x1ac06b(0x23e)]=_0x57b0eb;}['note'](_0xf0b82a,_0x268028,_0x596246){const _0x496933=_0xeea1b5;if(!this['enabled'])return;let _0x37b6c3=this[_0x496933(0x288)][_0x496933(0x245)](_0xf0b82a);!_0x37b6c3&&(_0x37b6c3={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this['_buckets'][_0x496933(0x1c4)](_0xf0b82a,_0x37b6c3)),_0x37b6c3['ms']+=_0x268028,_0x37b6c3[_0x496933(0x1b4)]+=0x1,_0x268028>_0x37b6c3[_0x496933(0x230)]&&(_0x37b6c3[_0x496933(0x230)]=_0x268028,_0x37b6c3[_0x496933(0x1d3)]=_0x596246||'');}[_0xeea1b5(0x35f)](_0x3db274){const _0x5c8754=_0xeea1b5;if(!this['enabled']||this['_started'])return;this[_0x5c8754(0x2b5)]=!![];if(_0x3db274)this[_0x5c8754(0x23e)]=_0x3db274;this['_h']=_0x34748d({'resolution':0xa}),this['_h'][_0x5c8754(0x2bf)](),this[_0x5c8754(0x1d9)]=setInterval(()=>this[_0x5c8754(0x1cd)](),_0x45dca1);if(this[_0x5c8754(0x1d9)][_0x5c8754(0x343)])this[_0x5c8754(0x1d9)][_0x5c8754(0x343)]();}[_0xeea1b5(0x21a)](_0x3137e6){const _0x4eea5c=_0xeea1b5;if(!this[_0x4eea5c(0x2f1)])this[_0x4eea5c(0x2f1)]=new Set();this[_0x4eea5c(0x2f1)][_0x4eea5c(0x342)](_0x3137e6);if(!this['_started'])this[_0x4eea5c(0x2be)]();}[_0xeea1b5(0x359)](_0x38cc74){const _0xc82677=_0xeea1b5;this[_0xc82677(0x2f1)]?.[_0xc82677(0x2d8)](_0x38cc74);}['_startAdmission'](){const _0x1fe17c=_0xeea1b5;if(this[_0x1fe17c(0x25c)])return;this[_0x1fe17c(0x25c)]=!![];!this['_h']&&(this['_h']=_0x34748d({'resolution':0xa}),this['_h']['enable']());const _0x58002c=_0x45dca1;this[_0x1fe17c(0x169)]=setInterval(()=>{const _0x475a81=_0x1fe17c,_0x3b26a8=this['_h'];if(!_0x3b26a8)return;const _0x5c072d=_0x3b26a8[_0x475a81(0x153)](0x63)/0xf4240,_0x11855c=_0x3b26a8['max']/0xf4240,_0x4ff6c2=_0x3b26a8[_0x475a81(0x20a)]/0xf4240;_0x3b26a8[_0x475a81(0x21b)]();if(this[_0x475a81(0x2f1)])for(const _0x570128 of this[_0x475a81(0x2f1)]){try{_0x570128({'p99Ms':_0x5c072d,'maxMs':_0x11855c,'meanMs':_0x4ff6c2,'reportMs':_0x58002c});}catch{}}},_0x58002c);if(this[_0x1fe17c(0x169)][_0x1fe17c(0x343)])this[_0x1fe17c(0x169)]['unref']();}[_0xeea1b5(0x1cd)](){const _0x5b0430=_0xeea1b5,_0xeccce8=this['_h'],_0x5bcfef=_0xeccce8[_0x5b0430(0x1a3)]/0xf4240,_0x24b8e7=_0xeccce8[_0x5b0430(0x153)](0x63)/0xf4240,_0x1b9a3=_0xeccce8[_0x5b0430(0x20a)]/0xf4240;_0xeccce8[_0x5b0430(0x21b)]();const _0x51c8fd=[...this[_0x5b0430(0x288)]['entries']()][_0x5b0430(0x328)](([_0x588e2a,_0x340ac1])=>({'label':_0x588e2a,..._0x340ac1}))[_0x5b0430(0x213)]((_0x3146d9,_0x12ea73)=>_0x12ea73['ms']-_0x3146d9['ms'])[_0x5b0430(0x2d1)](0x0,0x8);this[_0x5b0430(0x288)][_0x5b0430(0x30e)]();const _0x36a395=_0x51c8fd[_0x5b0430(0x352)]((_0x1669e3,_0x3f8bbd)=>_0x1669e3+_0x3f8bbd['ms'],0x0),_0x264391=_0x51c8fd[_0x5b0430(0x328)](_0x1daa9b=>_0x1daa9b[_0x5b0430(0x2af)]+'='+_0x1daa9b['ms'][_0x5b0430(0x252)](0x0)+_0x5b0430(0x1aa)+_0x1daa9b[_0x5b0430(0x1b4)]+(_0x1daa9b[_0x5b0430(0x230)]>0x5?_0x5b0430(0x30b)+_0x1daa9b['maxMs'][_0x5b0430(0x252)](0x0)+'ms'+(_0x1daa9b[_0x5b0430(0x1d3)]?'\x20'+_0x1daa9b['maxExtra']:'')+')':''));(_0x7c831d||_0x5bcfef>=_0x2ac8f5)&&this[_0x5b0430(0x23e)](_0x5b0430(0x144)+_0x45dca1+_0x5b0430(0x312)+_0x5bcfef[_0x5b0430(0x252)](0x0)+_0x5b0430(0x1e8)+_0x24b8e7[_0x5b0430(0x252)](0x0)+_0x5b0430(0x37a)+_0x1b9a3[_0x5b0430(0x252)](0x0)+_0x5b0430(0x198)+_0x36a395[_0x5b0430(0x252)](0x0)+'ms'+(_0x264391['length']?_0x5b0430(0x12b)+_0x264391[_0x5b0430(0x2fb)]('\x20\x20'):''),{'feature':_0x5b0430(0x350)});if(this['_windowCbs'])for(const _0x2c20af of this[_0x5b0430(0x2f1)]){try{_0x2c20af({'p99Ms':_0x24b8e7,'maxMs':_0x5bcfef,'meanMs':_0x1b9a3,'reportMs':_0x45dca1});}catch{}}}[_0xeea1b5(0x33c)](){const _0x361e02=_0xeea1b5;if(this[_0x361e02(0x1d9)])clearInterval(this['_timer']);if(this['_h'])this['_h'][_0x361e02(0x1ad)]();this['_timer']=null,this['_h']=null,this[_0x361e02(0x2b5)]=![];}}const _0xef1d4a=new _0x379573();if(_0xef1d4a[_0xeea1b5(0x36c)])_0xef1d4a[_0xeea1b5(0x35f)]();return okdbLoopMonitor={'LOOP':_0xef1d4a},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x94ac74=require$$0$1,_0x1709e3=require$$1;let _0x373fb6,_0x4d31de,_0x2b0d78,_0x5b7a37,_0x541ee4,_0x436b8a,_0x42cbb7,_0x3593ae=![];const _0x34798a=new Set();let _0x1cca8d=null;const _0x1d08c4=new Map();function _0x24c9a6(){const _0x10c861=_0x2789;if(_0x373fb6!==undefined)return _0x373fb6;_0x373fb6=process.env.OKDB_DIAG==='1';if(!_0x373fb6)return![];_0x4d31de=process.env.OKDB_DIAG_STACK==='1',_0x5b7a37=Math[_0x10c861(0x1a3)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x2b0d78=new Array(_0x5b7a37),_0x541ee4=0x0,_0x436b8a=0x0,_0x42cbb7=process.env.OKDB_DIAG_DIR||null;if(_0x42cbb7)try{_0x94ac74['mkdirSync'](_0x42cbb7,{'recursive':!![]});}catch{}return!![];}function _0x3b38ae(){return _0x373fb6===undefined?_0x24c9a6():_0x373fb6;}function _0x2e0839(_0x4240fb,_0x5de4d2){const _0x516488=_0x2789;if(_0x373fb6===undefined?!_0x24c9a6():!_0x373fb6)return;let _0x2773fa;if(_0x4d31de){const _0x212022=new Error()['stack']||'';_0x2773fa=_0x212022[_0x516488(0x296)]('\x0a')['slice'](0x3)[_0x516488(0x328)](_0x3949d6=>_0x3949d6[_0x516488(0x2d9)]())[_0x516488(0x336)](Boolean)[_0x516488(0x2d1)](0x0,0x8);}_0x2b0d78[_0x541ee4]={'seq':_0x436b8a++,'t':Date['now'](),'env':_0x4240fb,'kind':_0x5de4d2||'commit','stack':_0x2773fa},_0x541ee4=(_0x541ee4+0x1)%_0x5b7a37;}function _0x293ee0(_0x5d497a){const _0x42cca5=_0x2789,_0x289599=[];for(let _0x12cecd=0x0;_0x12cecd<_0x5b7a37;_0x12cecd++){const _0x370203=_0x2b0d78[(_0x541ee4-0x1-_0x12cecd+_0x5b7a37*0x2)%_0x5b7a37];if(!_0x370203)continue;_0x289599[_0x42cca5(0x22b)](_0x370203);if(_0x289599[_0x42cca5(0x2b7)]>=_0x5d497a)break;}return _0x289599;}function _0x49ceda(_0x6e67e2){const _0x5936f7=_0x2789;try{process[_0x5936f7(0x229)][_0x5936f7(0x133)](_0x6e67e2+'\x0a');}catch{}if(_0x42cbb7)try{_0x94ac74[_0x5936f7(0x2df)](_0x1709e3['join'](_0x42cbb7,_0x5936f7(0x286)+process[_0x5936f7(0x13a)]+_0x5936f7(0x207)),_0x6e67e2+'\x0a');}catch{}}function _0x2ec2f6(_0x42a4cc){const _0x4c4478=_0x2789,_0x1bbe71=_0x293ee0(_0x42a4cc);if(!_0x1bbe71[_0x4c4478(0x2b7)])return _0x4c4478(0x321);const _0x46d3cb=Date[_0x4c4478(0x1cf)]();return _0x1bbe71[_0x4c4478(0x328)](_0x4587e1=>{const _0xc1e78=_0x4c4478,_0x360c01=_0xc1e78(0x2f7)+_0x4587e1['seq']+'\x20-'+(_0x46d3cb-_0x4587e1['t'])+_0xc1e78(0x142)+_0x4587e1['env']+'\x20'+_0x4587e1[_0xc1e78(0x2c3)];return _0x4587e1[_0xc1e78(0x168)]&&_0x4587e1[_0xc1e78(0x168)][_0xc1e78(0x2b7)]?_0x360c01+'\x0a\x20\x20\x20\x20\x20\x20'+_0x4587e1[_0xc1e78(0x168)]['join'](_0xc1e78(0x335)):_0x360c01;})[_0x4c4478(0x2fb)]('\x0a');}function _0x40af2b(_0x5a76a2,_0x3b5b65){const _0x9ad7c4=_0x2789,_0x585fd2=_0x9ad7c4(0x25b)+_0x5a76a2+_0x9ad7c4(0x211)+new Date()[_0x9ad7c4(0x32f)]()+_0x9ad7c4(0x1d2)+process[_0x9ad7c4(0x13a)]+_0x9ad7c4(0x2f6),_0x99f4c6=[_0x585fd2,_0x9ad7c4(0x12a)+(_0x3b5b65&&_0x3b5b65[_0x9ad7c4(0x168)]?_0x3b5b65['stack'][_0x9ad7c4(0x296)]('\x0a')[0x0]:_0x3b5b65),_0x9ad7c4(0x24c)+(_0x4d31de?'':_0x9ad7c4(0x2cf))+':',_0x2ec2f6(0x18),_0x522ef1(),'='[_0x9ad7c4(0x186)](_0x585fd2['length']-0x1)];_0x49ceda(_0x99f4c6[_0x9ad7c4(0x2fb)]('\x0a'));}function _0x35e994(_0x2d8002){const _0x19629f=_0x2789;if(!_0x3b38ae())return;const _0x512558=String(_0x2d8002&&_0x2d8002[_0x19629f(0x2f8)]||_0x2d8002||''),_0x4e22f5=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x19629f(0x216)](_0x512558);_0x40af2b(_0x4e22f5?_0x19629f(0x2ac):'uncaughtException',_0x2d8002);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x4e22f5)return;try{console[_0x19629f(0x263)](_0x2d8002&&_0x2d8002[_0x19629f(0x168)]?_0x2d8002[_0x19629f(0x168)]:_0x2d8002);}catch{}process['exit'](0x1);}function _0x288a04(_0x395c4c){const _0x1c15bb=_0x2789;if(!_0x3b38ae())return;const _0x4fa929=String(_0x395c4c&&_0x395c4c[_0x1c15bb(0x2f8)]||_0x395c4c||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x1c15bb(0x216)](_0x4fa929)&&_0x40af2b(_0x1c15bb(0x32a),_0x395c4c);}function _0x522ef1(){const _0x409ed1=_0x2789,_0x1e575b=[_0x409ed1(0x18a)];let _0x5294a7=![];for(const _0x30899a of _0x34798a){const _0x5480e5=_0x30899a&&_0x30899a[_0x409ed1(0x30f)];if(!_0x5480e5)continue;for(const [_0x527443,_0x25b057]of _0x5480e5){const _0x5d14da=_0x25b057&&_0x25b057['_coordinator']&&_0x25b057[_0x409ed1(0x279)][_0x409ed1(0x246)];if(!_0x5d14da)continue;let _0x498fbc,_0x4d445a;try{_0x498fbc=Atomics[_0x409ed1(0x1c0)](_0x5d14da,0x0),_0x4d445a=Atomics[_0x409ed1(0x1c0)](_0x5d14da,0x1);}catch{continue;}if(_0x498fbc===0x0)continue;_0x5294a7=!![];const _0x22b47b=_0x498fbc>0x0?_0x409ed1(0x22f):_0x409ed1(0x364),_0x30a9be=Date[_0x409ed1(0x1cf)]()-Math[_0x409ed1(0x2a2)](_0x498fbc)*0x3e8,_0x61d4f5=((()=>{const _0x2835b4=_0x409ed1;try{return _0x25b057['_writer']&&_0x25b057[_0x2835b4(0x2ad)][_0x2835b4(0x1b7)]?_0x25b057[_0x2835b4(0x2ad)][_0x2835b4(0x1b7)]():null;}catch{return null;}})());_0x1e575b[_0x409ed1(0x22b)](_0x409ed1(0x202)+_0x527443+_0x409ed1(0x2fd)+_0x22b47b+_0x409ed1(0x333)+_0x30a9be+_0x409ed1(0x2c2)+_0x4d445a+(_0x61d4f5?_0x409ed1(0x1ee)+_0x61d4f5[_0x409ed1(0x1b5)]+_0x409ed1(0x24e)+_0x61d4f5[_0x409ed1(0x199)]+'\x20parkedNow='+_0x61d4f5['parkedNow']+'}':''));}}if(!_0x5294a7)_0x1e575b['push'](_0x409ed1(0x2fc));return _0x1e575b[_0x409ed1(0x2fb)]('\x0a');}function _0xd56de7(){const _0x3cc540=_0x2789;if(!_0x3b38ae())return;const _0x543d2f=Math[_0x3cc540(0x1a3)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x31a961=Date['now']();for(const _0x1ecb32 of _0x34798a){const _0x479008=_0x1ecb32&&_0x1ecb32[_0x3cc540(0x30f)];if(!_0x479008)continue;for(const [_0x49eed1,_0x190604]of _0x479008){const _0x34216c=_0x190604&&_0x190604[_0x3cc540(0x279)]&&_0x190604['_coordinator']['view'];if(!_0x34216c)continue;let _0x468d9f;try{_0x468d9f=Atomics[_0x3cc540(0x1c0)](_0x34216c,0x0);}catch{continue;}const _0x25e002=_0x1ecb32['path']+'|'+_0x49eed1;if(_0x468d9f<=0x0){_0x1d08c4[_0x3cc540(0x2d8)](_0x25e002);continue;}const _0x49c430=_0x31a961-_0x468d9f*0x3e8,_0x2dee08=_0x1d08c4[_0x3cc540(0x245)](_0x25e002);if(_0x49c430<_0x543d2f)continue;if(_0x2dee08&&_0x31a961-_0x2dee08[_0x3cc540(0x2a6)]<_0x543d2f)continue;_0x1d08c4[_0x3cc540(0x1c4)](_0x25e002,{'firstTs':_0x2dee08?_0x2dee08['firstTs']:_0x468d9f,'dumpedAt':_0x31a961});const _0x5a7721=_0x3cc540(0x19c)+_0x49c430+_0x3cc540(0x29e)+_0x49eed1+_0x3cc540(0x211)+new Date()[_0x3cc540(0x32f)]()+_0x3cc540(0x1d2)+process['pid']+_0x3cc540(0x2f6);_0x49ceda([_0x5a7721,_0x522ef1(),'='['repeat'](_0x5a7721[_0x3cc540(0x2b7)]-0x1)]['join']('\x0a'));}}}function _0x2836b3(){const _0x3d64fb=_0x2789;if(!_0x3b38ae()||_0x3593ae)return;_0x3593ae=!![],process[_0x3d64fb(0x284)](_0x3d64fb(0x301),_0x35e994),process[_0x3d64fb(0x284)](_0x3d64fb(0x295),_0x288a04);const _0x47c762=Math['max'](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x1cca8d=setInterval(_0xd56de7,_0x47c762);if(_0x1cca8d[_0x3d64fb(0x343)])_0x1cca8d['unref']();}function _0x180b13(_0x1edebf){if(!_0x3b38ae()||!_0x1edebf)return;_0x34798a['add'](_0x1edebf),_0x2836b3();}function _0x4a2a65(_0x320e24){const _0x25909f=_0x2789;_0x34798a[_0x25909f(0x2d8)](_0x320e24);}function _0x2e7af9(){const _0x3f47f8=_0x2789;if(!_0x3b38ae())return{'enabled':![],'hint':_0x3f47f8(0x260)};return{'enabled':!![],'stackCapture':!!_0x4d31de,'recentWrites':_0x293ee0(0x10),'drain':_0x522ef1()};}return okdbDiag={'isEnabled':_0x3b38ae,'recordWrite':_0x2e0839,'installDiag':_0x2836b3,'registerOkdb':_0x180b13,'unregisterOkdb':_0x4a2a65,'snapshot':_0x2e7af9},okdbDiag;}function _0x2789(_0x421321,_0x2ff325){_0x421321=_0x421321-0x129;const _0x70b330=_0x70b3();let _0x278995=_0x70b330[_0x421321];return _0x278995;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x3b2118=_0x1f2bca;if(hasRequiredOkdbWriter)return okdbWriter['exports'];hasRequiredOkdbWriter=0x1;const {performance:_0x38b668}=require$$0$2,_0x4faa99=requireOkdbDiag(),_0x1ce402=process.env.OKDB_COMMIT_MODE==='sync';class _0x383015{constructor(_0x351f77){const _0xe60803=_0x2789;this[_0xe60803(0x28e)]=_0x351f77,this['_inflight']=new Set(),this[_0xe60803(0x26d)]=new Map(),this[_0xe60803(0x282)]=0x0,this[_0xe60803(0x29d)]=[],this[_0xe60803(0x12c)]=[],this[_0xe60803(0x18b)]=Math[_0xe60803(0x1a3)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this['_outstanding']=0x0,this[_0xe60803(0x26c)]=[],this['_bpParkedTotal']=0x0,this[_0xe60803(0x280)]=null,this[_0xe60803(0x181)]=0x0,this['_nestedTotal']=0x0,this[_0xe60803(0x2f0)]=![];}async[_0x3b2118(0x1ed)](_0x36d0d1,_0x540eb2,{admitted:admitted=![]}={}){const _0xee1ef1=_0x3b2118;if(_0x4faa99[_0xee1ef1(0x1f4)]())_0x4faa99['recordWrite'](this['env']?.[_0xee1ef1(0x369)],_0x540eb2);if(this[_0xee1ef1(0x1dd)]){const _0x2ed097=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x2ed097[_0xee1ef1(0x187)]=_0xee1ef1(0x25a);throw _0x2ed097;}if(this[_0xee1ef1(0x18b)]>0x0){let _0x3994f3=![];while(this[_0xee1ef1(0x1bb)]>=this[_0xee1ef1(0x18b)]&&!this[_0xee1ef1(0x1dd)]){!_0x3994f3&&(_0x3994f3=!![],this[_0xee1ef1(0x283)]++),await new Promise(_0x3931f4=>this[_0xee1ef1(0x26c)][_0xee1ef1(0x22b)](_0x3931f4));}if(this['_closed']){const _0x11f215=new Error(_0xee1ef1(0x1da));_0x11f215[_0xee1ef1(0x187)]=_0xee1ef1(0x25a);throw _0x11f215;}}this['_outstanding']++;const _0x6a9989=admitted?null:this['env'][_0xee1ef1(0x279)];for(;;){while(this[_0xee1ef1(0x280)])await this[_0xee1ef1(0x280)];if(_0x6a9989)try{await _0x6a9989[_0xee1ef1(0x235)]();}catch(_0x29b09c){this[_0xee1ef1(0x1bb)]--;if(this[_0xee1ef1(0x26c)][_0xee1ef1(0x2b7)]&&this[_0xee1ef1(0x1bb)]<this[_0xee1ef1(0x18b)])this[_0xee1ef1(0x26c)][_0xee1ef1(0x35e)]()();throw _0x29b09c;}if(!this[_0xee1ef1(0x280)])break;if(_0x6a9989)_0x6a9989[_0xee1ef1(0x2e0)]();}if(this[_0xee1ef1(0x1dd)]){if(_0x6a9989)_0x6a9989['afterWrite']();this[_0xee1ef1(0x1bb)]--;if(this[_0xee1ef1(0x26c)][_0xee1ef1(0x2b7)]&&this[_0xee1ef1(0x1bb)]<this[_0xee1ef1(0x18b)])this[_0xee1ef1(0x26c)][_0xee1ef1(0x35e)]()();const _0x50446c=new Error(_0xee1ef1(0x1da));_0x50446c[_0xee1ef1(0x187)]='ENV_CLOSING_RETRY';throw _0x50446c;}const _0x4d2eff=_0x38b668['now']();if(_0x1ce402)try{const _0x48b701=this[_0xee1ef1(0x28e)]['db'][_0xee1ef1(0x222)](_0x36d0d1);this[_0xee1ef1(0x282)]++;if(this[_0xee1ef1(0x29d)][_0xee1ef1(0x22b)](_0x38b668['now']()-_0x4d2eff)>0x100)this[_0xee1ef1(0x29d)][_0xee1ef1(0x35e)]();if(this[_0xee1ef1(0x12c)][_0xee1ef1(0x22b)](_0x38b668[_0xee1ef1(0x1cf)]())>0x800)this[_0xee1ef1(0x12c)][_0xee1ef1(0x35e)]();return _0x48b701;}finally{this[_0xee1ef1(0x1bb)]--;if(this[_0xee1ef1(0x26c)]['length']&&this[_0xee1ef1(0x1bb)]<this[_0xee1ef1(0x18b)])this[_0xee1ef1(0x26c)][_0xee1ef1(0x35e)]()();if(_0x6a9989)_0x6a9989[_0xee1ef1(0x2e0)]();}let _0x2ba72c=null;const _0xc6887c=()=>{const _0x17eabd=_0xee1ef1,_0xd467ef=_0x36d0d1();if(_0xd467ef&&typeof _0xd467ef[_0x17eabd(0x156)]===_0x17eabd(0x14b)&&!_0x2ba72c){this[_0x17eabd(0x181)]++;let _0x4b7130;const _0x27cd75=new Promise(_0x12188c=>_0x4b7130=_0x12188c);this[_0x17eabd(0x280)]=_0x27cd75,_0x2ba72c=()=>{const _0x3992a7=_0x17eabd;if(this[_0x3992a7(0x280)]===_0x27cd75)this[_0x3992a7(0x280)]=null;_0x4b7130();};}return _0xd467ef;};let _0x14da1b;try{_0x14da1b=this[_0xee1ef1(0x28e)]['db'][_0xee1ef1(0x258)](_0xc6887c);}catch(_0x37eafd){_0x14da1b=Promise[_0xee1ef1(0x1a7)](_0x37eafd);}(!_0x14da1b||typeof _0x14da1b[_0xee1ef1(0x156)]!==_0xee1ef1(0x14b))&&(this[_0xee1ef1(0x330)]++,!this[_0xee1ef1(0x2f0)]&&(this['_nestedWarned']=!![],console['warn'](_0xee1ef1(0x224)+(this[_0xee1ef1(0x28e)]?.[_0xee1ef1(0x369)]??'?')+_0xee1ef1(0x14e))),_0x14da1b=Promise[_0xee1ef1(0x33a)](_0x14da1b));const _0x50b342=()=>{if(_0x2ba72c)_0x2ba72c();};_0x14da1b[_0xee1ef1(0x156)](_0x50b342,_0x50b342),this[_0xee1ef1(0x1fc)][_0xee1ef1(0x342)](_0x14da1b),this[_0xee1ef1(0x26d)][_0xee1ef1(0x1c4)](_0x14da1b,_0x4d2eff);const _0x3a6ccf=()=>{const _0xa4ad82=_0xee1ef1;this['_inflight'][_0xa4ad82(0x2d8)](_0x14da1b),this[_0xa4ad82(0x26d)]['delete'](_0x14da1b),this[_0xa4ad82(0x282)]++,this[_0xa4ad82(0x1bb)]--;this[_0xa4ad82(0x26c)][_0xa4ad82(0x2b7)]&&this[_0xa4ad82(0x1bb)]<this[_0xa4ad82(0x18b)]&&this[_0xa4ad82(0x26c)]['shift']()();if(this['_durs'][_0xa4ad82(0x22b)](_0x38b668[_0xa4ad82(0x1cf)]()-_0x4d2eff)>0x100)this[_0xa4ad82(0x29d)][_0xa4ad82(0x35e)]();if(this['_done'][_0xa4ad82(0x22b)](_0x38b668[_0xa4ad82(0x1cf)]())>0x800)this[_0xa4ad82(0x12c)][_0xa4ad82(0x35e)]();};_0x14da1b[_0xee1ef1(0x156)](_0x3a6ccf,_0x3a6ccf);try{return await _0x14da1b;}finally{if(_0x6a9989)_0x6a9989[_0xee1ef1(0x2e0)]();}}['status'](){const _0x5a7f57=_0x3b2118,_0x11f6a2=_0x38b668[_0x5a7f57(0x1cf)]();let _0x4063b6=0x0;for(const _0x2d0bd8 of this[_0x5a7f57(0x26d)][_0x5a7f57(0x20c)]()){const _0x351377=_0x11f6a2-_0x2d0bd8;if(_0x351377>_0x4063b6)_0x4063b6=_0x351377;}let _0x5cfb8c=0x0;for(let _0x1638fd=this[_0x5a7f57(0x12c)]['length']-0x1;_0x1638fd>=0x0;_0x1638fd--){if(_0x11f6a2-this['_done'][_0x1638fd]>0x3e8)break;_0x5cfb8c++;}let _0x48fb2c=0x0;if(this[_0x5a7f57(0x29d)][_0x5a7f57(0x2b7)]){const _0x1ae47e=[...this[_0x5a7f57(0x29d)]][_0x5a7f57(0x213)]((_0x5d3f1b,_0x3bd948)=>_0x5d3f1b-_0x3bd948);_0x48fb2c=_0x1ae47e[Math[_0x5a7f57(0x1f0)](_0x1ae47e['length']-0x1,Math[_0x5a7f57(0x1be)](_0x1ae47e[_0x5a7f57(0x2b7)]*0.99))];}return{'depth':this[_0x5a7f57(0x1fc)][_0x5a7f57(0x194)],'oldestPendingMs':Math[_0x5a7f57(0x24f)](_0x4063b6),'committed':this[_0x5a7f57(0x282)],'commitsPerSec':_0x5cfb8c,'commitP99Ms':Math[_0x5a7f57(0x24f)](_0x48fb2c),'parkedNow':this['_bpWaiters'][_0x5a7f57(0x2b7)],'parkedTotal':this[_0x5a7f57(0x283)],'highWater':this[_0x5a7f57(0x18b)]};}[_0x3b2118(0x308)](){const _0x550ac7=_0x3b2118,_0x140e44=_0x38b668[_0x550ac7(0x1cf)]();return[...this[_0x550ac7(0x26d)][_0x550ac7(0x20c)]()][_0x550ac7(0x328)](_0x43a8aa=>Math[_0x550ac7(0x24f)](_0x140e44-_0x43a8aa))[_0x550ac7(0x213)]((_0x2bbbb3,_0x264d16)=>_0x264d16-_0x2bbbb3);}['markClosed'](){const _0x26baec=_0x3b2118;this['_closed']=!![];for(const _0x4dc10b of this[_0x26baec(0x26c)][_0x26baec(0x1f6)](0x0))_0x4dc10b();}async[_0x3b2118(0x219)](){const _0x1769ae=_0x3b2118;let _0x439549=0x0;while(this['_inflight'][_0x1769ae(0x194)]&&_0x439549++<0x3e8){await Promise[_0x1769ae(0x1bd)]([...this[_0x1769ae(0x1fc)]]);}}async['put'](_0x3f8323,_0x1e9abc,_0xa45980,_0x58cbd5){const _0x58bf6c=_0x3b2118;return this[_0x58bf6c(0x1ed)](()=>{const _0xa2e8ff=_0x58bf6c;if(_0x58cbd5===undefined)_0x3f8323[_0xa2e8ff(0x22d)](_0x1e9abc,_0xa45980);else _0x3f8323[_0xa2e8ff(0x22d)](_0x1e9abc,_0xa45980,_0x58cbd5);},_0x58bf6c(0x225));}async[_0x3b2118(0x13d)](_0x1690d8,_0x12e996){const _0x2852b6=_0x3b2118;return this[_0x2852b6(0x1ed)](()=>_0x1690d8[_0x2852b6(0x267)](_0x12e996),_0x2852b6(0x1b3));}}async function _0xd9dea2(_0x2453f1,_0x1be925){const _0x1b7e98=_0x3b2118;if(_0x1be925==null)_0x1be925=Math[_0x1b7e98(0x1a3)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x39fc99=_0x2453f1?.[_0x1b7e98(0x17e)];if(!_0x39fc99||typeof _0x39fc99['then']!==_0x1b7e98(0x14b))return;await Promise[_0x1b7e98(0x1f7)]([Promise[_0x1b7e98(0x33a)](_0x39fc99)[_0x1b7e98(0x22e)](()=>{}),new Promise(_0x2f8cbb=>{const _0x172dd7=_0x1b7e98,_0x769b88=setTimeout(_0x2f8cbb,_0x1be925);if(_0x769b88[_0x172dd7(0x343)])_0x769b88[_0x172dd7(0x343)]();})]);}catch{}}function _0x583ca4(_0x33264b){const _0x3a9f11=_0x3b2118;if(_0x1ce402)return Promise[_0x3a9f11(0x33a)]();const _0x128c4b=_0x33264b?.[_0x3a9f11(0x15d)];return _0x128c4b&&typeof _0x128c4b[_0x3a9f11(0x156)]==='function'?_0x128c4b:Promise[_0x3a9f11(0x33a)]();}const _0x59a2c7=Math[_0x3b2118(0x1a3)](0x1,Math['floor'](Number(process.env.UV_THREADPOOL_SIZE))||0x4),_0x2663cc=Math[_0x3b2118(0x1a3)](0x1,_0x59a2c7-0x2);let _0x41e48e=0x0;const _0x9b8518=[];async function _0x261a1d(_0x2b0999){const _0x47477b=_0x3b2118;if(_0x41e48e<_0x2663cc)_0x41e48e++;else await new Promise(_0x26bacd=>_0x9b8518[_0x47477b(0x22b)](_0x26bacd));try{return await _0x2b0999();}finally{const _0x222f56=_0x9b8518[_0x47477b(0x35e)]();if(_0x222f56)_0x222f56();else _0x41e48e--;}}return okdbWriter[_0x3b2118(0x21c)]=_0x383015,okdbWriter['exports'][_0x3b2118(0x14c)]=_0x261a1d,okdbWriter[_0x3b2118(0x21c)][_0x3b2118(0x15f)]=_0x2663cc,okdbWriter[_0x3b2118(0x21c)][_0x3b2118(0x2ae)]=_0xd9dea2,okdbWriter[_0x3b2118(0x21c)][_0x3b2118(0x15d)]=_0x583ca4,okdbWriter[_0x3b2118(0x21c)][_0x3b2118(0x19d)]=_0x1ce402,okdbWriter[_0x3b2118(0x21c)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x46ea8c=_0x1f2bca;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x2fb108=require$$0$3,{SYNC_COMMITS:_0x124fea}=requireOkdbWriter(),_0x4e6018=_0x46ea8c(0x136);class _0xfe6ecd{constructor(_0x4f86c4,_0x4fdcce,_0x3b1c72){const _0x341434=_0x46ea8c;this[_0x341434(0x1d0)]=_0x4f86c4,this[_0x341434(0x33d)]=_0x4fdcce,this[_0x341434(0x2b4)]=_0x3b1c72,this[_0x341434(0x157)]=![],this['_heartbeatTimer']=null,this['_heartbeatInFlight']=null;}['isHeld'](){const _0x2befca=_0x46ea8c;if(this[_0x2befca(0x157)])return![];try{const _0x5bab79=this['_lock']['_db']()[_0x2befca(0x245)](this['_key']);if(!_0x5bab79||_0x5bab79[_0x2befca(0x26f)]!==this[_0x2befca(0x2b4)])return![];const _0x18839e=_0x5bab79[_0x2befca(0x208)]??_0x5bab79[_0x2befca(0x26f)];if(_0x18839e+_0x5bab79[_0x2befca(0x2ab)]<Date['now']())return![];return!![];}catch{return!this[_0x2befca(0x157)];}}[_0x46ea8c(0x160)](){const _0x2748f8=_0x46ea8c;if(this[_0x2748f8(0x157)])return null;try{return this[_0x2748f8(0x1d0)]['_db']()[_0x2748f8(0x245)](this['_key'])??null;}catch{return null;}}async[_0x46ea8c(0x331)](_0x4485ff){const _0x156937=_0x46ea8c;if(this[_0x156937(0x157)])return;try{if(this[_0x156937(0x1d0)][_0x156937(0x1dd)]())return;const _0x44bcb9=this[_0x156937(0x1d0)][_0x156937(0x2d6)]()[_0x156937(0x245)](this[_0x156937(0x33d)]);if(!_0x44bcb9||_0x44bcb9[_0x156937(0x26f)]!==this[_0x156937(0x2b4)])return;if(_0x124fea)this[_0x156937(0x1d0)][_0x156937(0x2d6)]()[_0x156937(0x22d)](this[_0x156937(0x33d)],{..._0x44bcb9,'ttlMs':_0x44bcb9[_0x156937(0x2ab)]+_0x4485ff});else await this[_0x156937(0x1d0)][_0x156937(0x2d6)]()[_0x156937(0x134)](this[_0x156937(0x33d)],{..._0x44bcb9,'ttlMs':_0x44bcb9[_0x156937(0x2ab)]+_0x4485ff});}catch{}}async[_0x46ea8c(0x297)](){const _0x50147b=_0x46ea8c;if(this[_0x50147b(0x157)])return;if(this[_0x50147b(0x32c)])try{await this[_0x50147b(0x32c)];}catch{}clearInterval(this[_0x50147b(0x2ee)]),this['_heartbeatTimer']=null,this[_0x50147b(0x157)]=!![];try{if(this[_0x50147b(0x1d0)][_0x50147b(0x1dd)]())return;const _0x1a2193=this[_0x50147b(0x1d0)][_0x50147b(0x2d6)]()['get'](this[_0x50147b(0x33d)]);if(_0x1a2193&&_0x1a2193[_0x50147b(0x26f)]===this[_0x50147b(0x2b4)]){if(_0x124fea)this[_0x50147b(0x1d0)][_0x50147b(0x2d6)]()[_0x50147b(0x267)](this['_key']);else await this[_0x50147b(0x1d0)][_0x50147b(0x2d6)]()[_0x50147b(0x13d)](this[_0x50147b(0x33d)]);}}catch{}}[_0x46ea8c(0x25e)](_0x5b5488,_0x58144e){const _0x540feb=_0x46ea8c,_0x1d95a2=_0x58144e??Math['floor'](_0x5b5488/0x3);this['_heartbeatTimer']=setInterval(()=>{const _0x726842=_0x2789;if(this['_released'])return;this[_0x726842(0x32c)]=((async()=>{const _0x8fbc9b=_0x726842;try{if(this[_0x8fbc9b(0x1d0)][_0x8fbc9b(0x1dd)]())return;const _0x497c1a=this[_0x8fbc9b(0x1d0)][_0x8fbc9b(0x2d6)]()[_0x8fbc9b(0x245)](this['_key']);if(!_0x497c1a||_0x497c1a[_0x8fbc9b(0x26f)]!==this[_0x8fbc9b(0x2b4)]){this[_0x8fbc9b(0x157)]=!![],clearInterval(this['_heartbeatTimer']),this[_0x8fbc9b(0x2ee)]=null;return;}if(_0x124fea)this[_0x8fbc9b(0x1d0)][_0x8fbc9b(0x2d6)]()[_0x8fbc9b(0x22d)](this[_0x8fbc9b(0x33d)],{..._0x497c1a,'updatedAt':Date['now']()});else await this[_0x8fbc9b(0x1d0)]['_db']()[_0x8fbc9b(0x134)](this[_0x8fbc9b(0x33d)],{..._0x497c1a,'updatedAt':Date[_0x8fbc9b(0x1cf)]()});}catch{}this[_0x8fbc9b(0x32c)]=null;})());},_0x1d95a2);if(this[_0x540feb(0x2ee)][_0x540feb(0x343)])this[_0x540feb(0x2ee)][_0x540feb(0x343)]();}}class _0x1a9c34{constructor(_0xab87a5,{namespace:_0x39dace,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x3177bd=_0x46ea8c;this[_0x3177bd(0x1ba)]=_0xab87a5,this['namespace']=_0x39dace,this[_0x3177bd(0x2ab)]=ttlMs,this[_0x3177bd(0x26b)]=heartbeatMs,this[_0x3177bd(0x281)]=null;}[_0x46ea8c(0x2d6)](){const _0x1d7e0e=_0x46ea8c;return this[_0x1d7e0e(0x1c1)](),(!this[_0x1d7e0e(0x281)]||this[_0x1d7e0e(0x1e3)]!==this[_0x1d7e0e(0x1ba)])&&(this[_0x1d7e0e(0x281)]=this[_0x1d7e0e(0x1ba)]['openDB'](_0x4e6018,{'dupSort':![]}),this[_0x1d7e0e(0x1e3)]=this[_0x1d7e0e(0x1ba)]),this[_0x1d7e0e(0x281)];}[_0x46ea8c(0x234)](){const _0x5a2ea0=_0x46ea8c;return this[_0x5a2ea0(0x1c1)](),(!this['_wantDbHandle']||this['_wantDbOf']!==this['_rawDb'])&&(this[_0x5a2ea0(0x24a)]=this[_0x5a2ea0(0x1ba)]['openDB'](_0x4e6018+_0x5a2ea0(0x1a0),{'dupSort':![]}),this[_0x5a2ea0(0x172)]=this['_rawDb']),this['_wantDbHandle'];}[_0x46ea8c(0x1dd)](){const _0x4a750d=_0x46ea8c,_0x9c2de9=this[_0x4a750d(0x1ba)]?.[_0x4a750d(0x1b7)];return _0x9c2de9==='closing'||_0x9c2de9===_0x4a750d(0x2c0);}[_0x46ea8c(0x1c1)](){const _0x17b594=_0x46ea8c;if(this[_0x17b594(0x1dd)]())throw new Error(_0x17b594(0x206));}[_0x46ea8c(0x33d)](_0x3ad570){const _0x25ab94=_0x46ea8c;return this[_0x25ab94(0x22c)]+':'+_0x3ad570;}[_0x46ea8c(0x1cc)](_0x42bcfc){const _0x53fe35=_0x46ea8c;try{if(this[_0x53fe35(0x1dd)]())return;_0x124fea?this[_0x53fe35(0x234)]()[_0x53fe35(0x22d)](this[_0x53fe35(0x33d)](_0x42bcfc),Date[_0x53fe35(0x1cf)]()):this[_0x53fe35(0x234)]()[_0x53fe35(0x134)](this[_0x53fe35(0x33d)](_0x42bcfc),Date[_0x53fe35(0x1cf)]())?.['catch']?.(()=>{});}catch{}}[_0x46ea8c(0x2e9)](_0x21e978,_0x3418ea=0x3e8){const _0x5e9015=_0x46ea8c;try{const _0x359104=this[_0x5e9015(0x234)]()[_0x5e9015(0x245)](this[_0x5e9015(0x33d)](_0x21e978));return typeof _0x359104===_0x5e9015(0x2f4)&&Date[_0x5e9015(0x1cf)]()-_0x359104<_0x3418ea;}catch{return![];}}['_isStale'](_0x5c433e){const _0x17b756=_0x46ea8c,_0x149095=_0x5c433e[_0x17b756(0x208)]??_0x5c433e[_0x17b756(0x26f)];return _0x149095+_0x5c433e[_0x17b756(0x2ab)]<Date[_0x17b756(0x1cf)]();}static[_0x46ea8c(0x1d6)](_0x68f7e7){const _0x37fe86=_0x46ea8c,_0xbd43ff=_0x68f7e7?.[_0x37fe86(0x160)];if(!_0xbd43ff||typeof _0xbd43ff['pid']!==_0x37fe86(0x2f4))return![];if(_0xbd43ff['hostname']!==_0x2fb108[_0x37fe86(0x15e)]())return![];if(_0xbd43ff[_0x37fe86(0x13a)]===process[_0x37fe86(0x13a)])return![];try{return process[_0x37fe86(0x2b3)](_0xbd43ff[_0x37fe86(0x13a)],0x0),![];}catch(_0x255f6b){return _0x255f6b[_0x37fe86(0x187)]===_0x37fe86(0x29f);}}async['tryAcquire'](_0x4c7efb,_0x12cc50={},_0x4a3fd8={}){const _0x23404e=_0x46ea8c,_0x2001ae=this[_0x23404e(0x33d)](_0x4c7efb),_0x58f5e3=_0x4a3fd8['ttlMs']??this[_0x23404e(0x2ab)],_0x53f25a=Date['now'](),_0x596d7e={'holder':{'pid':process[_0x23404e(0x13a)],'hostname':_0x2fb108[_0x23404e(0x15e)](),..._0x12cc50},'acquiredAt':_0x53f25a,'updatedAt':_0x53f25a,'ttlMs':_0x58f5e3};let _0x373be9=![],_0x52f796=null;if(this['_closed']())return{'acquired':![],'handle':null,'current':null};try{const _0x16f4e9=()=>{const _0x14c2f4=_0x23404e,_0x16e7f5=this[_0x14c2f4(0x2d6)]()[_0x14c2f4(0x245)](_0x2001ae);if(_0x16e7f5&&!this[_0x14c2f4(0x155)](_0x16e7f5)&&!_0x1a9c34['_holderDead'](_0x16e7f5)){const _0x18c7c4=_0x12cc50[_0x14c2f4(0x29b)]!=null&&_0x16e7f5[_0x14c2f4(0x160)][_0x14c2f4(0x13a)]===process['pid']&&_0x16e7f5[_0x14c2f4(0x160)]['processorId']===_0x12cc50['processorId'];if(!_0x18c7c4){_0x373be9=![],_0x52f796=_0x16e7f5;return;}_0x596d7e[_0x14c2f4(0x26f)]<=_0x16e7f5['acquiredAt']&&(_0x596d7e[_0x14c2f4(0x26f)]=_0x16e7f5[_0x14c2f4(0x26f)]+0x1,_0x596d7e[_0x14c2f4(0x208)]=_0x596d7e[_0x14c2f4(0x26f)]);}this[_0x14c2f4(0x2d6)]()[_0x14c2f4(0x134)](_0x2001ae,_0x596d7e),_0x373be9=!![],_0x52f796=_0x596d7e;};if(_0x124fea)this[_0x23404e(0x2d6)]()[_0x23404e(0x222)](_0x16f4e9);else await this['_db']()[_0x23404e(0x258)](_0x16f4e9);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x373be9)return{'acquired':![],'handle':null,'current':_0x52f796};const _0x3ce321=new _0xfe6ecd(this,_0x2001ae,_0x596d7e[_0x23404e(0x26f)]);return _0x3ce321[_0x23404e(0x25e)](_0x58f5e3,this[_0x23404e(0x26b)]),{'acquired':!![],'handle':_0x3ce321,'current':_0x52f796};}[_0x46ea8c(0x272)](_0x2229df){const _0x1a5dc8=_0x46ea8c;try{return this['_db']()['get'](this[_0x1a5dc8(0x33d)](_0x2229df))??null;}catch{return null;}}[_0x46ea8c(0x294)](){const _0x216ce2=_0x46ea8c,_0x4d15a7=this[_0x216ce2(0x22c)]+':',_0xcc375a=[];try{for(const {key:_0x4896a8,value:_0x1dc531}of this['_db']()[_0x216ce2(0x2dd)]({'start':_0x4d15a7,'end':_0x4d15a7+'\xff'})){typeof _0x4896a8===_0x216ce2(0x218)&&_0x4896a8[_0x216ce2(0x2c5)](_0x4d15a7)&&_0xcc375a['push']({'id':_0x4896a8[_0x216ce2(0x2d1)](_0x4d15a7[_0x216ce2(0x2b7)]),'entry':_0x1dc531});}}catch{}return _0xcc375a;}static[_0x46ea8c(0x317)](_0x3400ed){const _0x30a80b=_0x46ea8c,_0x3ff2a6=[];try{const _0x386a75=_0x3400ed[_0x30a80b(0x163)](_0x4e6018,{'dupSort':![]});for(const {key:_0x1b2423,value:_0x35e80a}of _0x386a75[_0x30a80b(0x2dd)]({})){if(typeof _0x1b2423!==_0x30a80b(0x218))continue;const _0x470a6e=_0x1b2423[_0x30a80b(0x276)](':');if(_0x470a6e<0x1)continue;_0x3ff2a6[_0x30a80b(0x22b)]({'namespace':_0x1b2423['slice'](0x0,_0x470a6e),'id':_0x1b2423[_0x30a80b(0x2d1)](_0x470a6e+0x1),'entry':_0x35e80a});}}catch{}return _0x3ff2a6;}}return okdbLock={'OKDBLock':_0x1a9c34},okdbLock;}function _0x70b3(){const _0x3a3f66=['instanceId','off',':want','_onItem','_rowKey','max','assign','txn:end','nodeKey','reject','isPrimary','SYSTEM_STOPPED','ms/','noteListenAddr','caps','disable','event','commitsPerSec','warn','null','license:activated','raw-remove','count','depth','_pending','status','schema:drop','listNodes','_rawDb','_outstanding','processor:retry','allSettled','floor','isDead','load','_assertUsable','_baselines','processor:error','set','_nodeDb','prototype','_adminRelay','_isWriter','http-server','procmode/','data','signalWant','_report','workers','now','_lock','type:registered','\x20pid=','maxExtra','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','schema:set','_holderDead','hard-killed','--inspect','_timer','okdb-writer:\x20env\x20closing\x20—\x20retry','bus:poke','flushDebounce','_closed','dropping','includes','listenAddr','_seen','publishChildRow','_lockDbOf','_getType','_cmd','engines','node:events','ms\x20p99=','publishOwnRow','dropIndex','_buildProcessingFacet','CHANGEFEED_QUANTUM','transaction','\x20writer{depth=','ITEM_PENDING','min','lifecycle','children','disconnect','isEnabled','dropSchema','splice','race','fn-runner','procmodeack/','bus:type_drop','listening','_inflight','_singletonLock','_clusterOrphanWatch','3okJZZj','cli','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','\x20\x20env=','_isReader','cluster-wide','stopping','okdb-lock:\x20env\x20closed','.log','updatedAt','__okdbSlot','mean','_collectSingletonClaims','values','_sampleOwnStats','processors','_singletonLocks','_versionSkewWarned','\x20@\x20','threads','sort','migrations','isActive','test','ttl:set','string','drain','onWindow','reset','exports','cpuWindowMs','_caps','perf_hooks','--watch','updateSupervisedChildStats','transactionSync','776876JXAyAc','okdb-writer[','raw-put','_handlePending','ms\x20(attempt\x20','getCmd','stderr','note','push','namespace','putSync','catch','SWAP','maxMs','draining','decommissioning','setupPrimary','_wantDb','beforeWrite','process','deaths','building','index:reset','getDesired','role','FTS_REGISTERED','quantum','_log','slot','once','setDesired','removeNode','stats','msg','get','view','_nodeDbCache','getClock','_desired','_wantDbHandle','__okdbCluster','recent\x20writes\x20(newest\x20first)','listen','\x20oldestPendingMs=','round','deregisterSelf','_publishNow','toFixed','parkedNow','env:opened','_openEnvLazy','_removeRowAsync','entry','childTransaction','system:poke','ENV_CLOSING_RETRY','\x0a===\x20OKDB_DIAG\x20','_admissionStarted','item:remove','_startHeartbeat','putNode','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','_kind','platform','error','runtimeProcessesView','killable','consecutiveFailures','removeSync','_nodeDead','createEnvironment','[okdb-cluster]\x20','heartbeatMs','_bpWaiters','_enqueuedAt','ttl:expired','acquiredAt','_groupByProcess','log','inspect','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','claimGated','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','indexOf','host','single','_coordinator','compaction','halted','keys','mode','license:removed','processorsView','_held','_lockDb','_committed','_bpParkedTotal','prependListener','freeze','okdb-diag.','paused','_buckets','item:create','_cursors','some','system:drain','resetting','env','_supervisorKey','_ownMeta','system:clock_change','license:added','hasDesired','list','unhandledRejection','split','release','send',')\x20exited\x20','1ofN:','processorId','cpus','_durs','ms\x20on\x20env=','ESRCH','dead','_systemEnv','abs','resetIndex','user','events','dumpedAt','_dedupeKey','exit','SYSTEM_PROC','SYSTEM_POKE','ttlMs','ORPHAN\x20(env-closed\x20write)','_writer','flushLmdb','label','claims','_maybePublish','heldBy','kill','_acquiredAt','_started','index:progress','length','3580095WAYeva','FTS_RESET','INDEX_READY','path','change','\x20statusEnv=','_startAdmission','enable','closed','supervisorKey','ms\x20activeWriters=','kind','find','startsWith','okdb','processing','view:progress','inst:','system:env_release','processor:ready','sandbox','execArgv','ITEM_UPDATE','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','hasOwnProperty','slice','from','6CGnjWh','respawnTimer','online','_db','registry\x20publish\x20failing:\x20','delete','trim','8032DvvnCE','primary','\x20ipc\x20error:\x20','getRange','env:removed','appendFileSync','afterWrite','_putRowAsync','_onStop','processKey','system:ready','_threadStats','running','default','startHeartbeat','isWanted','feed:','unique:violation','_quantum','_publishFailWarned','_heartbeatTimer','open','_nestedWarned','_windowCbs','confirm','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','number','_desiredOverlay','\x20===','\x20\x20#','message','INDEX_RESET','created','join','\x20\x20(no\x20env\x20draining)','\x20phase=','registry-publish','2287306YolECE','dedupeMax','uncaughtException','next','_handlePoke','node','~processes:desired','standalone','_onPoke','inflightAgesMs','_handleInProcess','ephemeral','(worst\x20','stopHeartbeat','item:update','clear','_envs','REMOVE','registerType','ms\x20max=','ready','\x20forked\x20','\x20worker\x20slot=','level','listAll','compact','_migrateVocab','singletonClaims','_putRowSync','bus:drain','unique:violation_resolved','_rootDb','system:bus_state_change','SIGKILL','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','FTS_DROP','getChanges','_markSeen','liveThreadStats','_children','_activateProcesses','map','__esModule','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','cursorKey','_heartbeatInFlight','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.','crypto','toISOString','_nestedTotal','extend','_lastCpuUsage','\x20drainAge=','entries','\x0a\x20\x20\x20\x20\x20\x20','filter','uptime','startedAt','fts:registered','resolve',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','stop','_key','ITEM_CREATE','functions','_onPending','meta','add','unref','_pendingLocal','info','embedded','index:registered','~processes','node/','async','_startedAt','heapUsed','ITEM_REMOVE','listDesired','ingest','loop-lag',',\x20signal=','reduce','_selfKey','writerStatus','worker','bus:env_release','selfKey','fanout','offWindow','slotKey','processor:resumed','_drain','cluster:','shift','start','win32','_draining','\x20died\x20','parse','copy','unclaimed','_hbTimer','[okdb-cluster]\x20slot=','292876tVolsD','name',');\x20','node:perf_hooks','enabled','_ensureDesired','state','attachFeed','_drainOne','reap','_onProcEvent','participate','stringify','_collectWriterFacet','processor:progress','\x20(durable\x20desired-state)','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','heapTotal','ms\x20mean=','ppid','error:\x20','\x20│\x20','_done','has','_buildOwnRow','sync','\x20worker(s)\x20still\x20serving','fromEntries','version','write','put','_enableChangelog','~lock','_flushDebounce','options','system:proc','pid','stopped','--eval','remove','[okdb-cluster]\x20worker\x20pid=','_nodeDbFor','dropFts','started','ms\x20env=','waiting','loop-lag\x20','item:pending','attach','_scheduleFlush','_dedupeMax','_instanceId','system:type_drop','function','withPoolHold','[okdb-cluster]\x20primary\x20pid=',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','index:drop','detachConsole','cpuPct','_onTick','percentile','rss','_isStale','then','_released','processes','instances','_statusEnv','close','~processes:cmd','committed','hostname','MAX_POOL_HOLDS','holder','memoryUsage','_buildChildRow','openDB','\x20while\x20this\x20process\x20runs\x20','setOwnMeta','isWorker','clusterStatusView','stack','_admissionTimer','connected','txn:rollback','cpuUsage','removeSupervisedChild','isConnected','starting','_processStartedAt','registerIndex','_wantDbOf','_lastCpuWindowMs','processingSig','\x20(slot=','cluster','3210522MClhtJ','_clusterWorkerAttached','system','_flushTimer','http','object','_lastCpuPct','flushed','3586740GhQUBq','pushEphemeral','_heldTotal','busy','INDEX_PROGRESS','expiresAt','envsOpen','repeat','code','setTtl','dropType','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','_highWater','--print','call','decommission','[okdb-cluster]\x20respawning\x20worker\x20slot=','3789dqggbJ','decommissioned','VIEW_PROGRESS','epoch','size','_refreshDesiredSnapshot','_lastPublishAt','_listenAddr','ms\x20busy=','oldestPendingMs','clearThreadStats','processor:paused','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','SYNC_COMMITS'];_0x70b3=function(){return _0x3a3f66;};return _0x70b3();}var version='2.5.0',require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x5c609f=_0x1f2bca;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x12226b=require$$0$3,_0x5022d3=require$$1$1,_0x1139e2=require$$2,{LOOP:_0x4e8e2c}=requireOkdbLoopMonitor(),{OKDBLock:_0x513caf}=requireOkdbLock(),{SYNC_COMMITS:_0x4fcfd1}=requireOkdbWriter(),_0x2aae72=_0x5c609f(0x348),_0x152022='node',_0x35404c=_0x5c609f(0x305),_0x4e28a1=_0x5c609f(0x15c),_0x21d492=(_0x53554d,_0x556d15)=>_0x53554d+':'+_0x556d15,_0x40a41e=(_0x429951,_0x5d5a80)=>_0x429951+'::'+_0x5d5a80,_0x2868ed=(_0x36fc2c,_0x18ff4a)=>_0x36fc2c+'/'+_0x18ff4a,_0x126f72=(_0x215658,_0x13af8b)=>_0x215658+'#'+_0x13af8b,_0x5cfd24=_0x33d5e1=>{const _0x53082a=_0x5c609f;if(_0x33d5e1?.[_0x53082a(0x2e3)])return _0x33d5e1['processKey'];const _0x1b4a5f=_0x33d5e1?.[_0x53082a(0x1a6)];return typeof _0x1b4a5f===_0x53082a(0x218)&&_0x1b4a5f[_0x53082a(0x1df)]('#')?_0x1b4a5f[_0x53082a(0x2d1)](0x0,_0x1b4a5f[_0x53082a(0x276)]('#')):_0x1b4a5f;},_0x208953=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x119659=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x5bc795=_0x208953*0x3,_0x18268e=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x5c609f(0x1a3)](0x927c0,_0x5bc795*0x14),_0x5b50c7=[_0x5c609f(0x376),_0x5c609f(0x2cb),_0x5c609f(0x1bc),_0x5c609f(0x1c3),_0x5c609f(0x19b),_0x5c609f(0x35b)];let _0x23efd7=null;function _0x5c5590(){const _0x33c1a4=_0x5c609f;if(_0x23efd7==null)_0x23efd7=Math[_0x33c1a4(0x24f)]((Date[_0x33c1a4(0x1cf)]()-process[_0x33c1a4(0x337)]()*0x3e8)/0x3e8)*0x3e8;return _0x23efd7;}function _0x3e193d(_0x489b33){const _0x55aed2=_0x5c609f;if(process.env.OKDB_PROCESS_KILL==='off')return![];if(_0x489b33?.[_0x55aed2(0x138)]?.[_0x55aed2(0x158)]&&typeof _0x489b33['options']['processes']==='object'&&_0x489b33[_0x55aed2(0x138)]['processes'][_0x55aed2(0x2b3)]===![])return![];return!![];}function _0x1dd7d1(_0x1d9d5c,_0x5c32c8){const _0xf8ad2a=_0x5c609f,_0x33378d=!!_0x5c32c8?.['processors'];switch(_0x1d9d5c){case _0xf8ad2a(0x2db):return{'controllable':_0x33378d,'decommissionable':![],'killable':!![],'killConfirm':_0xf8ad2a(0x204)};case'cli':case _0xf8ad2a(0x306):return{'controllable':_0x33378d,'decommissionable':![],'killable':!![],'killConfirm':_0xf8ad2a(0x2f2)};case _0xf8ad2a(0x346):return{'controllable':![],'decommissionable':![],'killable':![]};case'http-server':case'queue-worker':case _0xf8ad2a(0x1f8):case _0xf8ad2a(0x355):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':'force'};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x6866a6{constructor(_0x24f0ba){const _0x1e776e=_0x5c609f;this[_0x1e776e(0x2c6)]=_0x24f0ba,this['_statusEnv']=null,this['_desired']=null,this[_0x1e776e(0x2f5)]=new Map(),this[_0x1e776e(0x1e5)]=null,this['_isWriter']=![],this[_0x1e776e(0x203)]=![],this[_0x1e776e(0x170)]=_0x5c5590(),this['_selfKey']=_0x21d492(process['pid'],this[_0x1e776e(0x170)]),this[_0x1e776e(0x149)]=_0x1139e2['randomUUID']()[_0x1e776e(0x2d1)](0x0,0x8),this[_0x1e776e(0x1a2)]=_0x126f72(this['_selfKey'],this[_0x1e776e(0x149)]),this['_startedAt']=Date['now'](),this['_kind']=null,this[_0x1e776e(0x28f)]=null,this[_0x1e776e(0x197)]=null,this[_0x1e776e(0x366)]=null,this[_0x1e776e(0x372)]=null,this['_onTick']=null,this['_lastPublishAt']=0x0,this[_0x1e776e(0x290)]={},this['_children']=new Map(),this['_lastCpuUsage']=process[_0x1e776e(0x16c)](),this['_lastCpuAt']=Date['now'](),this[_0x1e776e(0x17d)]=0x0,this['_threadStats']=new Map();}get[_0x5c609f(0x357)](){const _0x1b3c75=_0x5c609f;return this[_0x1b3c75(0x353)];}get['rowKey'](){const _0x49ec18=_0x5c609f;return this[_0x49ec18(0x1a2)];}[_0x5c609f(0x21e)](_0x1937c8,_0x165bd8){const _0x2c9d21=_0x5c609f,_0x551ba0=_0x1dd7d1(_0x1937c8,_0x165bd8);if(_0x551ba0[_0x2c9d21(0x265)]&&!_0x3e193d(this[_0x2c9d21(0x2c6)]))return{..._0x551ba0,'killable':![],'killConfirm':undefined};return _0x551ba0;}[_0x5c609f(0x215)](){const _0x1fba1c=_0x5c609f;return!!this[_0x1fba1c(0x15a)];}[_0x5c609f(0x165)](_0x4fa565){const _0x693c27=_0x5c609f;Object[_0x693c27(0x1a4)](this['_ownMeta'],_0x4fa565||{});}[_0x5c609f(0x1ab)](_0x1d78f4){const _0x25ea89=_0x5c609f;if(_0x1d78f4)this[_0x25ea89(0x197)]=_0x1d78f4;}['register'](_0x45e910={}){const _0x3acc76=_0x5c609f;return this['okdb'][_0x3acc76(0x327)](_0x45e910);}['processingStatusView'](){const _0x3fb7ba=_0x5c609f,_0x122365={};let _0xccbdbe=0x0,_0x1b66ca=0x0;const _0x388bcd=new Set();for(const _0x12651a of this['listNodes']()){_0x1b66ca++;const _0xec0261=_0x12651a['processing'];if(!_0xec0261)continue;if(_0xec0261[_0x3fb7ba(0x373)])_0xccbdbe++;for(const _0x19b64a of _0xec0261[_0x3fb7ba(0x20e)]||[]){if(!['single',_0x3fb7ba(0x358)][_0x3fb7ba(0x1df)](_0x19b64a[_0x3fb7ba(0x27d)]))continue;(_0x19b64a[_0x3fb7ba(0x36e)]===_0x3fb7ba(0x2d5)||_0x19b64a[_0x3fb7ba(0x36e)]===_0x3fb7ba(0x238))&&_0x19b64a[_0x3fb7ba(0x32b)]&&_0x388bcd[_0x3fb7ba(0x342)]((_0x19b64a[_0x3fb7ba(0x28e)]||_0x3fb7ba(0x2e7))+':'+_0x19b64a[_0x3fb7ba(0x32b)]);const _0x14a810=_0x19b64a[_0x3fb7ba(0x28e)]||_0x3fb7ba(0x2e7);(_0x122365[_0x14a810]||=[])['push']({..._0x19b64a,'env':_0x14a810,'owner':{'pid':_0x12651a[_0x3fb7ba(0x13a)]??null,'kind':_0x12651a[_0x3fb7ba(0x2c3)]??null}});}}for(const [_0x100185,_0x38b9e3]of Object[_0x3fb7ba(0x334)](_0x122365)){for(const _0x1a5051 of _0x38b9e3){if(_0x1a5051[_0x3fb7ba(0x27d)]==='single'&&!_0x1a5051[_0x3fb7ba(0x274)]){const _0x59da62=_0x100185+':'+(_0x1a5051[_0x3fb7ba(0x32b)]??'');if(!_0x388bcd[_0x3fb7ba(0x12d)](_0x59da62))_0x1a5051[_0x3fb7ba(0x365)]=!![];}}}return{'envs':_0x122365,'policy':null,'participation':{'participating':_0xccbdbe,'total':_0x1b66ca},'source':_0x3fb7ba(0x1ce)};}[_0x5c609f(0x27f)](){const _0x59fdcc=_0x5c609f,_0x420ec4=_0x584b73=>{const _0x2b285a=_0x2789;if(_0x584b73[_0x2b285a(0x36e)]===_0x2b285a(0x2d5)||_0x584b73['state']===_0x2b285a(0x238)||_0x584b73['state']===_0x2b285a(0x263))return 0x3;if(_0x584b73['claimGated'])return 0x1;return 0x2;},_0x166ca6=new Map();for(const _0x4581d9 of this[_0x59fdcc(0x1b9)]()){for(const _0x339d9a of _0x4581d9[_0x59fdcc(0x2c7)]?.[_0x59fdcc(0x20e)]||[]){const _0xbf312d={..._0x339d9a,'owner':{'pid':_0x4581d9[_0x59fdcc(0x13a)]??null,'kind':_0x4581d9[_0x59fdcc(0x2c3)]??null,'host':_0x4581d9['host']??null}},_0x8e7897=_0x339d9a[_0x59fdcc(0x27d)]===_0x59fdcc(0x278)?_0x59fdcc(0x29a)+(_0x339d9a[_0x59fdcc(0x28e)]??'')+'::'+(_0x339d9a[_0x59fdcc(0x32b)]??_0x339d9a['type']??_0x339d9a['id']):_0x59fdcc(0x2c9)+(_0x4581d9[_0x59fdcc(0x1a6)]??_0x4581d9['processKey']??'')+'::'+(_0x339d9a[_0x59fdcc(0x28e)]??'')+'::'+_0x339d9a['id'],_0x3afa86=_0x166ca6['get'](_0x8e7897);if(!_0x3afa86||_0x420ec4(_0xbf312d)>_0x420ec4(_0x3afa86))_0x166ca6['set'](_0x8e7897,_0xbf312d);}}return[..._0x166ca6[_0x59fdcc(0x20c)]()];}[_0x5c609f(0x167)](){const _0xe34707=_0x5c609f,_0x4ef762=Date[_0xe34707(0x1cf)](),_0x38f807=this[_0xe34707(0x1b9)](),_0x30dbcd=_0x3f7286=>Math['max'](0x0,Math[_0xe34707(0x24f)]((_0x4ef762-(_0x3f7286[_0xe34707(0x338)]||_0x4ef762))/0x3e8)),_0x49bc17=_0x38f807[_0xe34707(0x2c4)](_0x545926=>_0x545926['kind']===_0xe34707(0x2db)),_0x25d278=_0x38f807[_0xe34707(0x336)](_0x5857ec=>_0x5857ec[_0xe34707(0x2c3)]===_0xe34707(0x1c9));if(_0x49bc17||_0x25d278[_0xe34707(0x2b7)])return{'primary':_0x49bc17?{'pid':_0x49bc17[_0xe34707(0x13a)],'uptime':_0x30dbcd(_0x49bc17)}:null,'workers':_0x25d278['map'](_0x50695e=>({'pid':_0x50695e['pid'],'uptime':_0x30dbcd(_0x50695e)})),'workersConfigured':_0x49bc17?.[_0xe34707(0x341)]?.['workersConfigured']??_0x25d278[_0xe34707(0x2b7)],'mode':_0xe34707(0x176)};const _0x5cc079=_0x38f807['find'](_0x583e48=>_0x583e48[_0xe34707(0x2c3)]===_0xe34707(0x200)||_0x583e48[_0xe34707(0x2c3)]==='standalone'||_0x583e48[_0xe34707(0x2c3)]===_0xe34707(0x346)),_0x338a74=_0x5cc079?{'pid':_0x5cc079[_0xe34707(0x13a)],'uptime':_0x30dbcd(_0x5cc079)}:{'pid':process[_0xe34707(0x13a)],'uptime':Math['max'](0x0,Math[_0xe34707(0x24f)](process[_0xe34707(0x337)]()))};return{'primary':_0x338a74,'workers':[_0x338a74],'workersConfigured':0x1,'mode':_0xe34707(0x278)};}['nodesView'](){const _0x14f954=_0x5c609f;return this[_0x14f954(0x270)]();}['treeView'](){const _0x1882e1=_0x5c609f,_0x40cf61=new Map();for(const _0xc0242c of this[_0x1882e1(0x270)]())_0x40cf61['set'](_0xc0242c[_0x1882e1(0x2e3)],{..._0xc0242c,'children':[]});const _0x5c18a1=[];for(const _0x29eaa4 of _0x40cf61[_0x1882e1(0x20c)]()){const _0x203e9c=_0x29eaa4['supervisorKey']?_0x40cf61[_0x1882e1(0x245)](_0x29eaa4[_0x1882e1(0x2c1)]):null;if(_0x203e9c&&_0x203e9c!==_0x29eaa4)_0x203e9c['children'][_0x1882e1(0x22b)](_0x29eaa4);else _0x5c18a1[_0x1882e1(0x22b)](_0x29eaa4);}const _0xf98203=(_0x8cffe8,_0x2f7ab9)=>_0x8cffe8['kind']===_0x2f7ab9[_0x1882e1(0x2c3)]?(_0x8cffe8['pid']||0x0)-(_0x2f7ab9[_0x1882e1(0x13a)]||0x0):(_0x8cffe8['kind']??'')<(_0x2f7ab9[_0x1882e1(0x2c3)]??'')?-0x1:0x1,_0x220818=_0x5b95fe=>{const _0xffb3e7=_0x1882e1;_0x5b95fe[_0xffb3e7(0x213)](_0xf98203);for(const _0x291b89 of _0x5b95fe)if(_0x291b89[_0xffb3e7(0x1f2)]['length'])_0x220818(_0x291b89[_0xffb3e7(0x1f2)]);};return _0x220818(_0x5c18a1),_0x5c18a1;}['getProcess'](_0x391636){const _0x56b65d=_0x5c609f;return this[_0x56b65d(0x270)]()[_0x56b65d(0x2c4)](_0x1a61a5=>_0x1a61a5[_0x56b65d(0x2e3)]===_0x391636)??null;}['_groupByProcess'](_0x483f2e=Date[_0x5c609f(0x1cf)]()){const _0x29b4de=_0x5c609f,_0x3a2e6b=new Map();for(const _0x3f4c1d of this[_0x29b4de(0x1b9)]()){const _0x23b89c=_0x5cfd24(_0x3f4c1d);let _0x4fe5bb=_0x3a2e6b[_0x29b4de(0x245)](_0x23b89c);!_0x4fe5bb&&(_0x4fe5bb={'processKey':_0x23b89c,'nodeKey':_0x23b89c,'pid':_0x3f4c1d[_0x29b4de(0x13a)],'ppid':_0x3f4c1d[_0x29b4de(0x129)]??null,'host':_0x3f4c1d[_0x29b4de(0x277)]??null,'kind':_0x3f4c1d[_0x29b4de(0x2c3)],'role':null,'supervisorKey':_0x3f4c1d[_0x29b4de(0x2c1)]??null,'slot':_0x3f4c1d[_0x29b4de(0x23f)]??null,'slotKey':_0x3f4c1d[_0x29b4de(0x35a)]??null,'caps':_0x3f4c1d[_0x29b4de(0x1ac)]??null,'lifecycle':_0x3f4c1d[_0x29b4de(0x1f1)]??null,'uptime':Math[_0x29b4de(0x1a3)](0x0,Math[_0x29b4de(0x24f)]((_0x483f2e-(_0x3f4c1d[_0x29b4de(0x338)]||_0x483f2e))/0x3e8)),'startedAt':_0x3f4c1d[_0x29b4de(0x338)]??null,'meta':_0x3f4c1d['meta']??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x3a2e6b[_0x29b4de(0x1c4)](_0x23b89c,_0x4fe5bb));_0x4fe5bb[_0x29b4de(0x159)]['push']({'instanceId':_0x3f4c1d[_0x29b4de(0x19e)]??null,'role':_0x3f4c1d[_0x29b4de(0x23b)]??null,'listenAddr':_0x3f4c1d[_0x29b4de(0x1e0)]??null,'lifecycle':_0x3f4c1d[_0x29b4de(0x1f1)]??null,'processing':_0x3f4c1d[_0x29b4de(0x2c7)]??null});if(!_0x4fe5bb[_0x29b4de(0x23b)]&&_0x3f4c1d['role'])_0x4fe5bb['role']=_0x3f4c1d[_0x29b4de(0x23b)];if(!_0x4fe5bb[_0x29b4de(0x1e0)]&&_0x3f4c1d[_0x29b4de(0x1e0)])_0x4fe5bb[_0x29b4de(0x1e0)]=_0x3f4c1d['listenAddr'];if(!_0x4fe5bb['processing']&&_0x3f4c1d[_0x29b4de(0x2c7)])_0x4fe5bb['processing']=_0x3f4c1d[_0x29b4de(0x2c7)];if(!_0x4fe5bb[_0x29b4de(0x1e6)]&&_0x3f4c1d[_0x29b4de(0x1e6)])_0x4fe5bb['engines']=_0x3f4c1d['engines'];if(!_0x4fe5bb[_0x29b4de(0x31a)]&&_0x3f4c1d['singletonClaims'])_0x4fe5bb[_0x29b4de(0x31a)]=_0x3f4c1d['singletonClaims'];if(_0x4fe5bb[_0x29b4de(0x1ac)]==null&&_0x3f4c1d[_0x29b4de(0x1ac)])_0x4fe5bb['caps']=_0x3f4c1d['caps'];if(_0x3f4c1d[_0x29b4de(0x243)]&&(!_0x4fe5bb[_0x29b4de(0x243)]||(_0x3f4c1d['stats']['at']??0x0)>(_0x4fe5bb[_0x29b4de(0x243)]['at']??0x0)))_0x4fe5bb[_0x29b4de(0x243)]=_0x3f4c1d['stats'];}return[..._0x3a2e6b[_0x29b4de(0x20c)]()];}[_0x5c609f(0x264)](){const _0xc03132=_0x5c609f,_0x7bced3=[],_0x20e894={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x5e3912 of this[_0xc03132(0x270)]()){_0x7bced3[_0xc03132(0x22b)]({'processKey':_0x5e3912[_0xc03132(0x2e3)],'kind':_0x5e3912[_0xc03132(0x2c3)],'pid':_0x5e3912[_0xc03132(0x13a)],'supervisorKey':_0x5e3912[_0xc03132(0x2c1)],'meta':_0x5e3912['meta']??null,'uptime':_0x5e3912['uptime'],'stats':_0x5e3912[_0xc03132(0x243)]??null}),_0x20e894[_0xc03132(0x158)]++;if(_0x5e3912[_0xc03132(0x243)]){_0x20e894['rss']+=_0x5e3912[_0xc03132(0x243)][_0xc03132(0x154)]||0x0,_0x20e894[_0xc03132(0x34c)]+=(_0x5e3912[_0xc03132(0x243)][_0xc03132(0x34c)]||0x0)+(_0x5e3912[_0xc03132(0x243)][_0xc03132(0x212)]?.[_0xc03132(0x34c)]||0x0);const _0x2bb675=_0x5e3912['stats']['threads'];_0x2bb675&&(_0x20e894['threads']['count']+=_0x2bb675[_0xc03132(0x1b4)]||0x0,_0x20e894[_0xc03132(0x212)]['sandbox']+=_0x2bb675[_0xc03132(0x2cc)]||0x0,_0x20e894[_0xc03132(0x212)]['busy']+=_0x2bb675['busy']||0x0);}}return{'totals':_0x20e894,'nodes':_0x7bced3};}async['open']({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x217aa1=_0x5c609f;this[_0x217aa1(0x1c8)]=this['_isWriter']||!!writer,this[_0x217aa1(0x203)]=this['_isReader']||!!reader,this[_0x217aa1(0x261)]=kind||this[_0x217aa1(0x261)]||(_0x5022d3[_0x217aa1(0x166)]?_0x217aa1(0x1c9):_0x217aa1(0x200)),this['_supervisorKey']=supervisorKey??this[_0x217aa1(0x28f)],this['_listenAddr']=listenAddr??this[_0x217aa1(0x197)],this[_0x217aa1(0x36d)](),await this['_migrateVocab']();if(!writer&&!reader)return null;if(!this[_0x217aa1(0x15a)]){const _0x5a94bc=await this['okdb'][_0x217aa1(0x269)](_0x2aae72,{'sync':![],'durability':'fast'});await _0x5a94bc['ensureType'](_0x152022),this[_0x217aa1(0x15a)]=_0x5a94bc;}return this['_statusEnv'];}[_0x5c609f(0x1c5)](){const _0x449d0d=_0x5c609f;return this[_0x449d0d(0x13f)]!==this[_0x449d0d(0x15a)]&&(this[_0x449d0d(0x13f)]=this[_0x449d0d(0x15a)],this[_0x449d0d(0x247)]=this[_0x449d0d(0x15a)][_0x449d0d(0x1e4)](_0x152022)[_0x449d0d(0x1cb)]),this[_0x449d0d(0x247)];}[_0x5c609f(0x2e1)](_0x1d3a9e){const _0x29a725=_0x5c609f;if(_0x4fcfd1)return this[_0x29a725(0x1c5)]()[_0x29a725(0x22d)](_0x1d3a9e['nodeKey'],_0x1d3a9e,0x1);const _0x403651=this[_0x29a725(0x1c5)]()[_0x29a725(0x134)](_0x1d3a9e[_0x29a725(0x1a6)],_0x1d3a9e,0x1);if(_0x403651&&typeof _0x403651[_0x29a725(0x156)]===_0x29a725(0x14b))_0x403651['then'](undefined,()=>{});return _0x403651;}['_putRowSync'](_0xec80f7){const _0x50c1b0=_0x5c609f;return this[_0x50c1b0(0x1c5)]()[_0x50c1b0(0x22d)](_0xec80f7['nodeKey'],_0xec80f7,0x1);}['_removeRowAsync'](_0x49859e){const _0x14c0cb=_0x5c609f;if(_0x4fcfd1)try{return this[_0x14c0cb(0x1c5)]()[_0x14c0cb(0x267)](_0x49859e);}catch{return![];}const _0x2361ba=this[_0x14c0cb(0x1c5)]()[_0x14c0cb(0x13d)](_0x49859e);if(_0x2361ba&&typeof _0x2361ba[_0x14c0cb(0x156)]===_0x14c0cb(0x14b))_0x2361ba[_0x14c0cb(0x156)](undefined,()=>{});return _0x2361ba;}async[_0x5c609f(0x25f)](_0x55b6d9){const _0xb4a769=_0x5c609f;if(!this[_0xb4a769(0x15a)]||!this[_0xb4a769(0x1c8)]||!_0x55b6d9?.[_0xb4a769(0x1a6)])return;return this['_putRowAsync'](_0x55b6d9);}async[_0x5c609f(0x242)](_0x2e4fe4){const _0x4911ba=_0x5c609f;if(!this[_0x4911ba(0x15a)]||!this[_0x4911ba(0x1c8)]||!_0x2e4fe4)return;const _0x1f3a34=_0x2e4fe4[_0x4911ba(0x1df)]('#'),_0x518474=[];for(const {key:_0x2d9a8c}of this[_0x4911ba(0x15a)][_0x4911ba(0x2dd)](_0x152022)){if(_0x2d9a8c===_0x2e4fe4||!_0x1f3a34&&typeof _0x2d9a8c===_0x4911ba(0x218)&&_0x2d9a8c['startsWith'](_0x2e4fe4+'#'))_0x518474[_0x4911ba(0x22b)](_0x2d9a8c);}for(const _0xe246a5 of _0x518474){try{this[_0x4911ba(0x1c5)]()[_0x4911ba(0x267)](_0xe246a5);}catch{}}}[_0x5c609f(0x268)](_0x21b7e7){const _0x2c44bb=_0x5c609f;if(typeof _0x21b7e7?.[_0x2c44bb(0x13a)]!==_0x2c44bb(0x2f4))return![];if(_0x21b7e7[_0x2c44bb(0x277)]!==_0x12226b['hostname']())return![];if(_0x21b7e7['pid']===process[_0x2c44bb(0x13a)])return![];if(_0x21b7e7[_0x2c44bb(0x184)]!=null&&_0x21b7e7['expiresAt']<Date[_0x2c44bb(0x1cf)]()-_0x18268e)return!![];try{return process[_0x2c44bb(0x2b3)](_0x21b7e7[_0x2c44bb(0x13a)],0x0),![];}catch(_0x19345e){return _0x19345e[_0x2c44bb(0x187)]===_0x2c44bb(0x29f);}}['listNodes'](){const _0x242f99=_0x5c609f;if(!this[_0x242f99(0x15a)])return[];try{this['_statusEnv']['db']?.['resetReadTxn']?.();}catch{}const _0x4d10a2=Date['now'](),_0x1e5b4b=_0x12226b[_0x242f99(0x15e)](),_0x21c5ff=[];for(const {value:_0x119c82}of this[_0x242f99(0x15a)]['getRange'](_0x152022)){if(!_0x119c82)continue;let _0x674af0=null;_0x119c82[_0x242f99(0x277)]===_0x1e5b4b&&typeof _0x119c82[_0x242f99(0x13a)]==='number'&&(_0x674af0=!this['_nodeDead'](_0x119c82));if(_0x674af0===![])continue;const _0x3be0ea=_0x119c82[_0x242f99(0x184)]==null||_0x119c82[_0x242f99(0x184)]>=_0x4d10a2;if(_0x674af0===!![]||_0x3be0ea)_0x21c5ff[_0x242f99(0x22b)](_0x119c82);}return _0x21c5ff;}async[_0x5c609f(0x371)](_0x42cddf=0x0){const _0x471a31=_0x5c609f;if(!this[_0x471a31(0x15a)]||!this['_isWriter'])return;const _0x2e44f8=Date[_0x471a31(0x1cf)]()-_0x42cddf,_0x5450f4=new Set(),_0x14fd7b=[],_0x3c5fea=_0x12226b[_0x471a31(0x15e)](),_0x322f16=require$$6[_0x471a31(0x132)];for(const {key:_0x382499,value:_0x5b8328}of this['_statusEnv'][_0x471a31(0x2dd)](_0x152022)){if(!_0x5b8328)continue;const _0x303944=_0x5b8328[_0x471a31(0x277)]===_0x3c5fea&&typeof _0x5b8328[_0x471a31(0x13a)]===_0x471a31(0x2f4),_0x1a481a=_0x303944?this[_0x471a31(0x268)](_0x5b8328):_0x5b8328[_0x471a31(0x184)]!=null&&_0x5b8328[_0x471a31(0x184)]<_0x2e44f8;if(_0x1a481a)_0x14fd7b[_0x471a31(0x22b)](_0x382499);else{_0x5450f4[_0x471a31(0x342)](_0x5cfd24(_0x5b8328)??_0x382499);if(_0x5b8328['version']&&_0x5b8328[_0x471a31(0x132)]!==_0x322f16){if(!this[_0x471a31(0x210)])this[_0x471a31(0x210)]=new Set();!this[_0x471a31(0x210)][_0x471a31(0x12d)](_0x5b8328['version'])&&(this['_versionSkewWarned'][_0x471a31(0x342)](_0x5b8328[_0x471a31(0x132)]),this[_0x471a31(0x2c6)]['log']?.[_0x471a31(0x1b0)]?.('process\x20'+(_0x5b8328[_0x471a31(0x13a)]??'?')+_0x471a31(0x275)+_0x5b8328['version']+_0x471a31(0x164)+_0x322f16+'\x20—\x20'+_0x471a31(0x32d),{'feature':_0x471a31(0x214)}));}}}for(const _0xb099fe of _0x14fd7b)this[_0x471a31(0x256)](_0xb099fe);if(this[_0x471a31(0x36d)]()){const _0x3517b7=[];for(const {key:_0x48297d}of this[_0x471a31(0x34e)](_0x471a31(0x304))){if(!_0x5450f4[_0x471a31(0x12d)](_0x48297d)){if(_0x4fcfd1)try{this[_0x471a31(0x249)]['removeSync'](_0x471a31(0x349)+_0x48297d);}catch{}else _0x3517b7['push'](this[_0x471a31(0x249)]['remove'](_0x471a31(0x349)+_0x48297d));}}if(_0x3517b7[_0x471a31(0x2b7)])await Promise['allSettled'](_0x3517b7);}}[_0x5c609f(0x2e8)](_0x28b5d7=null){const _0x35469b=_0x5c609f;if(this['_hbTimer'])return;if(!this[_0x35469b(0x1c8)]||!this[_0x35469b(0x15a)]){this['okdb']?.['log']?.['warn']?.('registry\x20heartbeat\x20skipped\x20(writer='+this[_0x35469b(0x1c8)]+_0x35469b(0x2bd)+!!this[_0x35469b(0x15a)]+_0x35469b(0x33b),{'feature':_0x35469b(0x158)});return;}this[_0x35469b(0x152)]=_0x28b5d7,this[_0x35469b(0x372)]=()=>this[_0x35469b(0x2b1)]();for(const _0x3ff5b0 of _0x5b50c7)this[_0x35469b(0x2c6)][_0x35469b(0x2a5)]['on'](_0x3ff5b0,this[_0x35469b(0x372)]);this[_0x35469b(0x251)]();const _0x307fa7=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x208953;this['_hbTimer']=setInterval(()=>{const _0x5bc401=_0x35469b;if(this[_0x5bc401(0x152)])try{this[_0x5bc401(0x152)]();}catch{}this[_0x5bc401(0x251)](),this['reap']()['catch'](()=>{});},_0x307fa7);if(this['_hbTimer']['unref'])this[_0x35469b(0x366)][_0x35469b(0x343)]();}['_maybePublish'](){const _0x8a4715=_0x5c609f;if(!this[_0x8a4715(0x1c8)]||!this[_0x8a4715(0x15a)])return;if(Date[_0x8a4715(0x1cf)]()-this[_0x8a4715(0x196)]<_0x119659)return;this[_0x8a4715(0x251)]();}[_0x5c609f(0x251)](){const _0x3560fc=_0x5c609f;if(!this[_0x3560fc(0x1c8)]||!this['_statusEnv'])return;this[_0x3560fc(0x196)]=Date['now']();try{const _0x560bc6=[this[_0x3560fc(0x12e)]()];for(const _0x27c534 of this[_0x3560fc(0x326)][_0x3560fc(0x20c)]())_0x560bc6[_0x3560fc(0x22b)](this['_buildChildRow'](_0x27c534));const _0x24fe2c=_0x4e8e2c['enabled']?_0x4e8e2c[_0x3560fc(0x1cf)]():0x0;for(const _0x3915f5 of _0x560bc6){try{this[_0x3560fc(0x31b)](_0x3915f5),this[_0x3560fc(0x2ed)]=![];}catch(_0x8f631){!this[_0x3560fc(0x2ed)]&&(this[_0x3560fc(0x2ed)]=!![],this[_0x3560fc(0x2c6)]?.[_0x3560fc(0x271)]?.[_0x3560fc(0x1b0)]?.(_0x3560fc(0x2d7)+_0x8f631[_0x3560fc(0x2f8)],{'feature':_0x3560fc(0x158)}));}}if(_0x4e8e2c[_0x3560fc(0x36c)])_0x4e8e2c[_0x3560fc(0x22a)](_0x3560fc(0x2fe),_0x4e8e2c[_0x3560fc(0x1cf)]()-_0x24fe2c,'rows='+_0x560bc6[_0x3560fc(0x2b7)]+'\x20sync');}catch(_0x598ea6){!this[_0x3560fc(0x2ed)]&&(this['_publishFailWarned']=!![],this[_0x3560fc(0x2c6)]?.[_0x3560fc(0x271)]?.['warn']?.(_0x3560fc(0x2d7)+_0x598ea6[_0x3560fc(0x2f8)],{'feature':_0x3560fc(0x158)}));}}async[_0x5c609f(0x30c)](){const _0x3dabec=_0x5c609f;if(this[_0x3dabec(0x372)]){for(const _0x12cd6a of _0x5b50c7){try{this['okdb']['events'][_0x3dabec(0x19f)](_0x12cd6a,this[_0x3dabec(0x372)]);}catch{}}this['_onProcEvent']=null;}this[_0x3dabec(0x366)]&&(clearInterval(this['_hbTimer']),this[_0x3dabec(0x366)]=null);try{if(this[_0x3dabec(0x15a)]&&this[_0x3dabec(0x1c8)])await this[_0x3dabec(0x242)](this[_0x3dabec(0x1a2)]);}catch{}}async[_0x5c609f(0x250)](){const _0x1fb7ff=_0x5c609f;if(!this[_0x1fb7ff(0x15a)]||!this[_0x1fb7ff(0x1c8)])return;try{await this['removeNode'](this[_0x1fb7ff(0x1a2)]);}catch{}try{const _0xb6ed81=[];for(const {value:_0x4952a1}of this[_0x1fb7ff(0x15a)]['getRange'](_0x152022)){if(_0x4952a1?.['ppid']===process[_0x1fb7ff(0x13a)]&&_0x4952a1[_0x1fb7ff(0x1a6)])_0xb6ed81[_0x1fb7ff(0x22b)](_0x4952a1[_0x1fb7ff(0x1a6)]);}for(const _0x392014 of _0xb6ed81){try{await this[_0x1fb7ff(0x242)](_0x392014);}catch{}}}catch{}}async[_0x5c609f(0x1e9)](){const _0x54f927=_0x5c609f;return this[_0x54f927(0x25f)](this['_buildOwnRow']());}async[_0x5c609f(0x1e2)](_0x8151df){const _0x5befa5=_0x5c609f;if(!this[_0x5befa5(0x15a)]||!this[_0x5befa5(0x1c8)])return;return this['putNode'](this[_0x5befa5(0x162)](_0x8151df));}['_buildChildRow']({pid:_0x5008f3,startedAt:_0x1dfdca,kind:_0x370fb7,supervisorKey:_0x138f25,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x5c609f(0x2e6),meta:meta=null,stats:stats=null}){const _0x47dda4=_0x5c609f,_0x5bf381=Date[_0x47dda4(0x1cf)](),_0x2dd6d7=_0x21d492(_0x5008f3,_0x1dfdca);return{'nodeKey':_0x126f72(_0x2dd6d7,'0'),'processKey':_0x2dd6d7,'instanceId':'0','pid':_0x5008f3,'startedAt':_0x1dfdca,'ppid':process[_0x47dda4(0x13a)],'host':_0x12226b[_0x47dda4(0x15e)](),'supervisorKey':_0x138f25,'slot':slot,'slotKey':slotKey,'kind':_0x370fb7,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x5bf381,'expiresAt':_0x5bf381+_0x5bc795,'caps':this['_caps'](_0x370fb7,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async['addSupervisedChild'](_0x2f6989){const _0x2babc0=_0x5c609f;if(!_0x2f6989?.['pid'])return null;const _0x182cd5=_0x21d492(_0x2f6989['pid'],_0x2f6989[_0x2babc0(0x338)]);this[_0x2babc0(0x326)]['set'](_0x182cd5,{..._0x2f6989,'supervisorKey':_0x2f6989[_0x2babc0(0x2c1)]??this[_0x2babc0(0x353)]});if(this[_0x2babc0(0x1c8)])await this['publishChildRow'](this[_0x2babc0(0x326)][_0x2babc0(0x245)](_0x182cd5))[_0x2babc0(0x22e)]?.(()=>{});return _0x182cd5;}[_0x5c609f(0x16d)](_0x41994){const _0x39704a=_0x5c609f;if(!_0x41994)return;return this[_0x39704a(0x326)][_0x39704a(0x2d8)](_0x41994),this[_0x39704a(0x242)](_0x41994);}[_0x5c609f(0x20d)](){const _0x1ba546=_0x5c609f,_0x5c19bb=Date['now'](),_0x403034=process['cpuUsage'](),_0x40748f=(_0x5c19bb-this['_lastCpuAt'])*0x3e8;if(_0x40748f>=0x3d090){const _0x1a24f9=_0x403034[_0x1ba546(0x2a4)]-this['_lastCpuUsage'][_0x1ba546(0x2a4)]+(_0x403034[_0x1ba546(0x179)]-this[_0x1ba546(0x332)][_0x1ba546(0x179)]),_0x27f87e=_0x12226b[_0x1ba546(0x29c)]()[_0x1ba546(0x2b7)]||0x1;this[_0x1ba546(0x17d)]=Math['min'](0x64,Math[_0x1ba546(0x24f)](_0x1a24f9/(_0x40748f*_0x27f87e)*0x64)),this['_lastCpuWindowMs']=Math['round'](_0x40748f/0x3e8),this[_0x1ba546(0x332)]=_0x403034,this['_lastCpuAt']=_0x5c19bb;}const _0x5c943b=process[_0x1ba546(0x161)](),_0x4fd7a2=this[_0x1ba546(0x2e5)][_0x1ba546(0x194)];let _0xe02500=0x0;if(_0x4fd7a2>0x0){const _0x337f9b=[this[_0x1ba546(0x2c6)],...this[_0x1ba546(0x2c6)][_0x1ba546(0x30f)]?.[_0x1ba546(0x20c)]?.()??[]];for(const _0x263546 of _0x337f9b){const _0x417d72=_0x263546[_0x1ba546(0x33f)]?.['_sandbox'];if(_0x417d72)_0xe02500+=_0x417d72[_0x1ba546(0x325)][_0x1ba546(0x182)];}}let _0x184431=null;const _0x3ef376=_0x4fd7a2;if(_0x3ef376>0x0){let _0x5f5008=0x0;for(const _0x2d33a4 of this[_0x1ba546(0x2e5)][_0x1ba546(0x20c)]())_0x5f5008+=_0x2d33a4[_0x1ba546(0x34c)]||0x0;_0x184431={'count':_0x3ef376,'heapUsed':_0x5f5008,'sandbox':_0x4fd7a2,'busy':_0xe02500};}return{'rss':_0x5c943b[_0x1ba546(0x154)],'heapUsed':_0x5c943b[_0x1ba546(0x34c)],'heapTotal':_0x5c943b[_0x1ba546(0x379)],'external':_0x5c943b['external'],'cpuPct':this[_0x1ba546(0x17d)],'cpuWindowMs':this[_0x1ba546(0x173)]??null,'threads':_0x184431,'at':_0x5c19bb};}['reportThreadStats'](_0xb6e5c2,_0x1a1cdc){const _0x377539=_0x5c609f;if(!_0xb6e5c2||!_0x1a1cdc)return;this[_0x377539(0x2e5)][_0x377539(0x1c4)](_0xb6e5c2,_0x1a1cdc);}[_0x5c609f(0x19a)](_0x143483){const _0xbe1f08=_0x5c609f;this[_0xbe1f08(0x2e5)]['delete'](_0x143483);}[_0x5c609f(0x221)](_0x257ccf,_0x4faa62,_0x3a5160=undefined){const _0x1ebabe=_0x5c609f,_0x1d4107=this[_0x1ebabe(0x326)][_0x1ebabe(0x245)](_0x257ccf);if(!_0x1d4107||!_0x4faa62)return;if(_0x3a5160!==undefined)_0x1d4107[_0x1ebabe(0x2c7)]=_0x3a5160;_0x1d4107[_0x1ebabe(0x243)]={'rss':_0x4faa62[_0x1ebabe(0x154)]??null,'heapUsed':_0x4faa62['heapUsed']??null,'heapTotal':_0x4faa62[_0x1ebabe(0x379)]??null,'external':_0x4faa62['external']??null,'cpuPct':_0x4faa62[_0x1ebabe(0x151)]??null,'cpuWindowMs':_0x4faa62[_0x1ebabe(0x21d)]??null,'threads':_0x4faa62[_0x1ebabe(0x212)]??null,'claims':_0x4faa62[_0x1ebabe(0x2b0)]??null,'envsOpen':_0x4faa62[_0x1ebabe(0x185)]??null,'at':Date[_0x1ebabe(0x1cf)]()};}[_0x5c609f(0x12e)](){const _0x2db744=_0x5c609f,_0x28d6a8=Date[_0x2db744(0x1cf)](),_0x43787c=this[_0x2db744(0x2c6)]['_role']||{},_0x3a1053=this[_0x2db744(0x261)]||'cli';return{'nodeKey':this[_0x2db744(0x1a2)],'processKey':this[_0x2db744(0x353)],'instanceId':this[_0x2db744(0x149)],'pid':process[_0x2db744(0x13a)],'startedAt':this[_0x2db744(0x170)],'instanceStartedAt':this[_0x2db744(0x34b)],'ppid':typeof process[_0x2db744(0x129)]===_0x2db744(0x2f4)?process[_0x2db744(0x129)]:null,'host':_0x12226b[_0x2db744(0x15e)](),'supervisorKey':this[_0x2db744(0x28f)]??null,'version':require$$6['version'],'kind':_0x3a1053,'role':{'engines':!!_0x43787c[_0x2db744(0x1e6)],'processors':!!_0x43787c[_0x2db744(0x20e)],'compaction':_0x43787c[_0x2db744(0x27a)],'http':_0x43787c[_0x2db744(0x17b)]},'listenAddr':this['_listenAddr']??null,'heartbeatAt':_0x28d6a8,'expiresAt':_0x28d6a8+_0x5bc795,'caps':this['_caps'](_0x3a1053,_0x43787c),'lifecycle':{'state':_0x2db744(0x2e6),'desiredVersionApplied':null},'meta':{...this[_0x2db744(0x290)]},'processing':_0x43787c[_0x2db744(0x20e)]?this['_buildProcessingFacet']():null,'engines':_0x43787c[_0x2db744(0x1e6)]?[...this[_0x2db744(0x2c6)]['_servingEngines']??[]]:null,'singletonClaims':this['_collectSingletonClaims'](),'stats':this[_0x2db744(0x20d)](),'writers':this[_0x2db744(0x375)]()};}[_0x5c609f(0x375)](){const _0x23e63a=_0x5c609f,_0x552a90={};try{for(const [_0x2f091f,_0x125a06]of this['okdb']['_envs']){try{const _0x3a5c7e=_0x125a06[_0x23e63a(0x354)]?.();if(!_0x3a5c7e)continue;if(!_0x3a5c7e[_0x23e63a(0x1b5)]&&!_0x3a5c7e[_0x23e63a(0x15d)]&&!(_0x3a5c7e[_0x23e63a(0x253)]??0x0)&&!_0x3a5c7e[_0x23e63a(0x231)])continue;_0x552a90[_0x2f091f]={'depth':_0x3a5c7e[_0x23e63a(0x1b5)],'oldestPendingMs':_0x3a5c7e[_0x23e63a(0x199)],'committed':_0x3a5c7e[_0x23e63a(0x15d)],'commitsPerSec':_0x3a5c7e[_0x23e63a(0x1af)],'commitP99Ms':_0x3a5c7e['commitP99Ms'],'parkedNow':_0x3a5c7e[_0x23e63a(0x253)]??0x0,'draining':!!_0x3a5c7e[_0x23e63a(0x231)]};}catch{}}}catch{}return Object[_0x23e63a(0x27c)](_0x552a90)[_0x23e63a(0x2b7)]?_0x552a90:null;}[_0x5c609f(0x20b)](){const _0x5df75c=_0x5c609f,_0x11a449=process[_0x5df75c(0x13a)],_0x74a3f6=Date['now'](),_0x1f9c1c=_0x1763ba=>{const _0x273125=_0x5df75c;if(!_0x1763ba)return[];const _0x41df33=[];try{for(const {id:_0x3a9cb7,entry:_0x54892e}of _0x1763ba['list']()){if(_0x54892e?.[_0x273125(0x160)]?.[_0x273125(0x13a)]!==_0x11a449)continue;const _0x9a3740=_0x54892e[_0x273125(0x208)]??_0x54892e['acquiredAt']??0x0;if(_0x9a3740+(_0x54892e[_0x273125(0x2ab)]??0x0)<_0x74a3f6)continue;_0x41df33[_0x273125(0x22b)](_0x3a9cb7);}}catch{}return _0x41df33;},_0x490bed=_0x1f9c1c(this[_0x5df75c(0x1fd)](_0x5df75c(0x318))),_0x2d3779=_0x1f9c1c(this[_0x5df75c(0x1fd)](_0x5df75c(0x12f)));if(!_0x490bed['length']&&!_0x2d3779[_0x5df75c(0x2b7)])return null;return{'compact':_0x490bed,'replicate':_0x2d3779};}[_0x5c609f(0x1fd)](_0x2ebf3e){const _0x4a4bee=_0x5c609f;if(!this[_0x4a4bee(0x2c6)]?.['_rootDb'])return null;if(!this[_0x4a4bee(0x20f)])this[_0x4a4bee(0x20f)]=new Map();let _0x2740f6=this['_singletonLocks'][_0x4a4bee(0x245)](_0x2ebf3e);if(!_0x2740f6)try{_0x2740f6=new _0x513caf(this[_0x4a4bee(0x2c6)][_0x4a4bee(0x31e)],{'namespace':_0x2ebf3e}),this['_singletonLocks'][_0x4a4bee(0x1c4)](_0x2ebf3e,_0x2740f6);}catch{return null;}return _0x2740f6;}['_buildProcessingFacet'](){const _0x6672dc=_0x5c609f,_0x4f7a42=[];try{for(const [_0x458669,_0x4d96e0]of this['okdb'][_0x6672dc(0x30f)]){if(_0x458669[_0x6672dc(0x2c5)]('~'))continue;for(const _0x6b27f4 of _0x4d96e0['processor']['tierList']())_0x4f7a42[_0x6672dc(0x22b)]({..._0x6b27f4,'env':_0x458669});}}catch{}return{'participate':this[_0x6672dc(0x2c6)]['processors']?.['_participate']??![],'processors':_0x4f7a42};}[_0x5c609f(0x36d)](){const _0x33bc59=_0x5c609f;if(this[_0x33bc59(0x249)])return!![];const _0xf343e9=this[_0x33bc59(0x2c6)][_0x33bc59(0x31e)];if(!_0xf343e9)return![];return this['_desired']=_0xf343e9[_0x33bc59(0x163)](_0x35404c,{'dupSort':![]}),this[_0x33bc59(0x1e5)]=_0xf343e9['openDB'](_0x4e28a1,{'dupSort':![]}),!![];}async[_0x5c609f(0x319)](){const _0x1d4fc3=_0x5c609f;if(!this['_ensureDesired']())return;const _0x186d46='__vocab/version',_0x29b3bb=0x1,_0x339223=this[_0x1d4fc3(0x249)][_0x1d4fc3(0x245)](_0x186d46)??0x0;if(_0x339223>=_0x29b3bb)return;const _0x3cd27c=_0x25fb78=>{const _0x4adb01=_0x1d4fc3;if(_0x25fb78===_0x4adb01(0x355))return _0x4adb01(0x278);if(_0x25fb78===_0x4adb01(0x34a))return _0x4adb01(0x358);return _0x25fb78;};await this[_0x1d4fc3(0x2c6)][_0x1d4fc3(0x2a1)]['_writer'][_0x1d4fc3(0x1ed)](()=>{const _0x176345=_0x1d4fc3;for(const _0x33fcab of[_0x176345(0x1ca),_0x176345(0x1f9)]){for(const {key:_0xa1cfc1,value:_0x13746f}of this['_desired'][_0x176345(0x2dd)]({'start':_0x33fcab,'end':_0x33fcab+'\xff'})){if(typeof _0xa1cfc1!==_0x176345(0x218)||!_0xa1cfc1['startsWith'](_0x33fcab))break;const _0xd3a44d=_0x3cd27c(_0x13746f[_0x176345(0x27d)]);if(_0xd3a44d!==_0x13746f['mode'])this[_0x176345(0x249)]['put'](_0xa1cfc1,{..._0x13746f,'mode':_0xd3a44d});}}this[_0x176345(0x249)][_0x176345(0x134)](_0x186d46,_0x29b3bb);});}[_0x5c609f(0x293)](){const _0xfac2df=_0x5c609f;return!!this[_0xfac2df(0x249)];}['getDesired'](_0x4cb934,_0x34b8d6){const _0x330e9b=_0x5c609f;if(!this[_0x330e9b(0x36d)]())return null;const _0x102b64=_0x4cb934+'/'+_0x34b8d6;return this[_0x330e9b(0x195)](),this['_desiredOverlay'][_0x330e9b(0x245)](_0x102b64)??this[_0x330e9b(0x249)][_0x330e9b(0x245)](_0x102b64)??null;}[_0x5c609f(0x195)](){const _0x23072c=_0x5c609f;if(!_0x4fcfd1)return;try{this[_0x23072c(0x2c6)][_0x23072c(0x2a1)]?.['db']?.['resetReadTxn']?.();}catch{}}async[_0x5c609f(0x241)](_0x56f73a,_0x5cd80b,_0x6b5f1d){const _0x2585ed=_0x5c609f;if(!this[_0x2585ed(0x36d)]())return null;const _0x16cf2e=_0x56f73a+'/'+_0x5cd80b;this[_0x2585ed(0x195)]();const _0x2bed17=this[_0x2585ed(0x2f5)][_0x2585ed(0x245)](_0x16cf2e)??this[_0x2585ed(0x249)][_0x2585ed(0x245)](_0x16cf2e)??{'version':0x0},_0x333aff=(_0x2bed17[_0x2585ed(0x132)]||0x0)+0x1,_0x459005={..._0x2bed17,..._0x6b5f1d,'version':_0x333aff,'updatedAt':Date[_0x2585ed(0x1cf)]()};this['_desiredOverlay'][_0x2585ed(0x1c4)](_0x16cf2e,_0x459005);try{await this['okdb'][_0x2585ed(0x2a1)][_0x2585ed(0x2ad)][_0x2585ed(0x1ed)](()=>{const _0x5773f4=_0x2585ed;this[_0x5773f4(0x249)][_0x5773f4(0x134)](_0x16cf2e,_0x459005);});}finally{if(this[_0x2585ed(0x2f5)][_0x2585ed(0x245)](_0x16cf2e)===_0x459005)this[_0x2585ed(0x2f5)][_0x2585ed(0x2d8)](_0x16cf2e);}return _0x333aff;}['listDesired'](_0x18fce6){const _0x32bddc=_0x5c609f;if(!this['_ensureDesired']())return[];this['_refreshDesiredSnapshot']();const _0x4e0a20=_0x18fce6+'/',_0x588cb5=[];for(const {key:_0x24f883,value:_0x32b4fa}of this['_desired'][_0x32bddc(0x2dd)]({'start':_0x4e0a20,'end':_0x4e0a20+'\xff'})){if(typeof _0x24f883!==_0x32bddc(0x218)||!_0x24f883['startsWith'](_0x4e0a20))break;_0x588cb5['push']({'key':_0x24f883[_0x32bddc(0x2d1)](_0x4e0a20[_0x32bddc(0x2b7)]),'value':_0x32b4fa});}return _0x588cb5;}[_0x5c609f(0x228)](_0x5cd6c5){const _0x1f42ef=_0x5c609f;if(!this[_0x1f42ef(0x36d)]())return null;return this[_0x1f42ef(0x1e5)][_0x1f42ef(0x245)](_0x5cd6c5)??null;}async['bumpCmd'](_0x3fd104,_0x463469,_0x7dc0c4={}){const _0x4f9370=_0x5c609f;if(!this[_0x4f9370(0x36d)]())return null;let _0x190520;return await this['okdb'][_0x4f9370(0x2a1)]['_writer'][_0x4f9370(0x1ed)](()=>{const _0x2841cb=_0x4f9370,_0x3c6260=this['_cmd']['get'](_0x3fd104)||{'epoch':0x0};_0x190520=(_0x3c6260[_0x2841cb(0x193)]||0x0)+0x1,this[_0x2841cb(0x1e5)]['put'](_0x3fd104,{..._0x3c6260,..._0x7dc0c4,'cmd':_0x463469,'epoch':_0x190520,'updatedAt':Date[_0x2841cb(0x1cf)]()});}),_0x190520;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x6866a6,'nodeKey':_0x21d492,'logicalKey':_0x40a41e,'slotKey':_0x2868ed,'PROCESS_ENV':_0x2aae72,'NODE_TYPE':_0x152022},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x48c4c7=_0x1f2bca;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x37d774=require$$0$4,{EVENTS:_0x1a607b,CHANGE_ACTIONS:_0x2d4315}=requireOkdbEnums(),{LOOP:_0x3f960a}=requireOkdbLoopMonitor(),_0x2f198b=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x2582d5=0x5,_0x3ae284=0x2710;class _0x2700dd extends _0x37d774{constructor(_0x4d4c7e,_0x537ffd={}){const _0x2b73c3=_0x2789;super(),this[_0x2b73c3(0x2c6)]=_0x4d4c7e,this[_0x2b73c3(0x2ec)]=_0x537ffd[_0x2b73c3(0x23d)]??_0x2f198b,this[_0x2b73c3(0x137)]=_0x537ffd[_0x2b73c3(0x1dc)]??_0x2582d5,this[_0x2b73c3(0x148)]=_0x537ffd[_0x2b73c3(0x300)]??_0x3ae284,this[_0x2b73c3(0x2b5)]=![],this[_0x2b73c3(0x28a)]=new Map(),this['_baselines']=new Map(),this[_0x2b73c3(0x1b6)]=new Map(),this[_0x2b73c3(0x17a)]=null,this[_0x2b73c3(0x361)]=![],this['_seen']=new Set(),this[_0x2b73c3(0x344)]=new Set(),this['_onItem']=_0x1ac13f=>this[_0x2b73c3(0x309)](_0x1ac13f),this[_0x2b73c3(0x340)]=_0x40417a=>this[_0x2b73c3(0x226)](_0x40417a),this[_0x2b73c3(0x307)]=_0x18bb3a=>this['_handlePoke'](_0x18bb3a),this['_onStop']=()=>this['stop']();}[_0x48c4c7(0x35f)](){const _0x36da77=_0x48c4c7;if(this['_started'])return;this[_0x36da77(0x2b5)]=!![];for(const [_0x122243,_0x566771]of this[_0x36da77(0x2c6)][_0x36da77(0x30f)]){if(_0x122243[_0x36da77(0x2c5)]('~'))continue;try{_0x566771['_enableChangelog']();}catch{}}for(const [_0x1c9567,_0x45f28c]of this['okdb'][_0x36da77(0x30f)]){if(_0x1c9567[_0x36da77(0x2c5)]('~'))continue;try{this['_baselines'][_0x36da77(0x1c4)](_0x1c9567,_0x45f28c[_0x36da77(0x248)]()||0x0);}catch{}}const {events:_0x31c047}=this[_0x36da77(0x2c6)];_0x31c047['on'](_0x1a607b[_0x36da77(0x1ef)],this[_0x36da77(0x340)]),_0x31c047['on'](_0x1a607b[_0x36da77(0x33e)],this['_onItem']),_0x31c047['on'](_0x1a607b[_0x36da77(0x2ce)],this[_0x36da77(0x1a1)]),_0x31c047['on'](_0x1a607b['ITEM_REMOVE'],this[_0x36da77(0x1a1)]),_0x31c047['on'](_0x1a607b[_0x36da77(0x2aa)],this[_0x36da77(0x307)]),_0x31c047[_0x36da77(0x240)](_0x1a607b[_0x36da77(0x1a9)],this[_0x36da77(0x2e2)]);}[_0x48c4c7(0x33c)](){const _0x24cce1=_0x48c4c7;if(!this[_0x24cce1(0x2b5)])return;this[_0x24cce1(0x2b5)]=![];const {events:_0x2882e1}=this[_0x24cce1(0x2c6)];_0x2882e1[_0x24cce1(0x19f)](_0x1a607b[_0x24cce1(0x1ef)],this[_0x24cce1(0x340)]),_0x2882e1[_0x24cce1(0x19f)](_0x1a607b[_0x24cce1(0x33e)],this[_0x24cce1(0x1a1)]),_0x2882e1[_0x24cce1(0x19f)](_0x1a607b[_0x24cce1(0x2ce)],this[_0x24cce1(0x1a1)]),_0x2882e1['off'](_0x1a607b[_0x24cce1(0x34d)],this['_onItem']),_0x2882e1['off'](_0x1a607b[_0x24cce1(0x2aa)],this[_0x24cce1(0x307)]);try{_0x2882e1[_0x24cce1(0x19f)](_0x1a607b[_0x24cce1(0x1a9)],this[_0x24cce1(0x2e2)]);}catch{}this[_0x24cce1(0x17a)]&&(clearTimeout(this[_0x24cce1(0x17a)]),this[_0x24cce1(0x17a)]=null),this[_0x24cce1(0x1b6)][_0x24cce1(0x30e)](),this[_0x24cce1(0x28a)][_0x24cce1(0x30e)](),this['_baselines'][_0x24cce1(0x30e)](),this[_0x24cce1(0x1e1)][_0x24cce1(0x30e)](),this[_0x24cce1(0x344)]['clear']();}[_0x48c4c7(0x2a7)](_0x30555e,_0x2472f2,_0x1cda1e,_0x26733c){return _0x30555e+'\x00'+_0x2472f2+'\x00'+_0x1cda1e+'\x00'+_0x26733c;}[_0x48c4c7(0x324)](_0x33df02,_0x5048ad,_0x598a48,_0x60910){const _0x373418=_0x48c4c7,_0x42c1f0=this[_0x373418(0x2a7)](_0x33df02,_0x5048ad,_0x598a48,_0x60910);if(this[_0x373418(0x1e1)][_0x373418(0x12d)](_0x42c1f0))return![];this[_0x373418(0x1e1)]['add'](_0x42c1f0);if(this[_0x373418(0x1e1)][_0x373418(0x194)]>this[_0x373418(0x148)]){const _0x5b47f8=this[_0x373418(0x1e1)][_0x373418(0x20c)]()[_0x373418(0x302)]()['value'];this['_seen'][_0x373418(0x2d8)](_0x5b47f8);}return!![];}['_handlePending'](_0xb61eaf){const _0x2beee5=_0x48c4c7;if(!this[_0x2beee5(0x2b5)]||!_0xb61eaf)return;const {env:_0x316182,type:_0x566203,key:_0x39e988,clock:_0x365a7f}=_0xb61eaf;if(_0x316182==null||_0x566203==null||_0x39e988==null)return;if(typeof _0x316182===_0x2beee5(0x218)&&_0x316182[_0x2beee5(0x2c5)]('~'))return;if(typeof _0x566203===_0x2beee5(0x218)&&_0x566203['startsWith']('~'))return;this[_0x2beee5(0x344)][_0x2beee5(0x342)](this[_0x2beee5(0x2a7)](_0x316182,_0x566203,_0x39e988,_0x365a7f)),this[_0x2beee5(0x344)][_0x2beee5(0x194)]>this[_0x2beee5(0x148)]&&this['_pendingLocal'][_0x2beee5(0x2d8)](this[_0x2beee5(0x344)][_0x2beee5(0x20c)]()[_0x2beee5(0x302)]()['value']);}['_handleInProcess'](_0x4f7ddc){const _0x4532ab=_0x48c4c7;if(!this['_started']||!_0x4f7ddc)return;const {env:_0x335cd6,type:_0x529f42,key:_0x3b612c,clock:_0x2985c2,origin:_0x1e7c70,action:_0xb1a3d4,newValue:_0x4cc843,oldValue:_0xbec5f1}=_0x4f7ddc;if(_0x335cd6==null||_0x529f42==null||_0x3b612c==null)return;if(typeof _0x335cd6==='string'&&_0x335cd6[_0x4532ab(0x2c5)]('~'))return;if(typeof _0x529f42===_0x4532ab(0x218)&&_0x529f42[_0x4532ab(0x2c5)]('~'))return;this['_pendingLocal']['delete'](this[_0x4532ab(0x2a7)](_0x335cd6,_0x529f42,_0x3b612c,_0x2985c2));if(!this[_0x4532ab(0x324)](_0x335cd6,_0x529f42,_0x3b612c,_0x2985c2))return;const _0xb02155=_0xb1a3d4===_0x2d4315[_0x4532ab(0x310)]?_0x4532ab(0x13d):'put';this['emit'](_0x4532ab(0x2bc),{'env':_0x335cd6,'type':_0x529f42,'key':_0x3b612c,'op':_0xb02155,'clock':_0x2985c2,'origin':_0x1e7c70,'value':_0xb02155==='remove'?null:_0x4cc843,'prevValue':_0xbec5f1});}[_0x48c4c7(0x303)](_0x5ae16e){const _0x50333f=_0x48c4c7;if(!this[_0x50333f(0x2b5)])return;if(!_0x5ae16e||typeof _0x5ae16e['env']!==_0x50333f(0x218)||typeof _0x5ae16e['type']!=='string')return;const {env:_0x35127e,type:_0x57ec96}=_0x5ae16e;if(_0x35127e[_0x50333f(0x2c5)]('~')||_0x57ec96['startsWith']('~'))return;this[_0x50333f(0x1b6)]['set'](_0x35127e+'\x00'+_0x57ec96,{'env':_0x35127e,'type':_0x57ec96}),this[_0x50333f(0x147)]();}[_0x48c4c7(0x147)](){const _0x36e2d2=_0x48c4c7;if(this['_flushTimer'])return;const _0xedc4f4=()=>{const _0x1dc9f7=_0x2789;this[_0x1dc9f7(0x17a)]=null,this['_drain']()[_0x1dc9f7(0x22e)](()=>{});};this[_0x36e2d2(0x17a)]=setTimeout(_0xedc4f4,this[_0x36e2d2(0x137)]>0x0?this[_0x36e2d2(0x137)]:0x0);}async[_0x48c4c7(0x35c)](){const _0x2803a0=_0x48c4c7;if(this[_0x2803a0(0x361)]){this[_0x2803a0(0x147)]();return;}this[_0x2803a0(0x361)]=!![];try{const _0x752f7c=[...this[_0x2803a0(0x1b6)][_0x2803a0(0x20c)]()];this['_pending'][_0x2803a0(0x30e)]();let _0x39c297=![];for(const {env:_0x265765,type:_0x536fd0}of _0x752f7c){try{const _0x53dc92=await this[_0x2803a0(0x370)](_0x265765,_0x536fd0);if(_0x53dc92)_0x39c297=!![];}catch{this[_0x2803a0(0x1b6)][_0x2803a0(0x1c4)](_0x265765+'\x00'+_0x536fd0,{'env':_0x265765,'type':_0x536fd0}),_0x39c297=!![];}}if(_0x39c297||this['_pending'][_0x2803a0(0x194)]>0x0)this[_0x2803a0(0x147)]();}finally{this['_draining']=![];}}async[_0x48c4c7(0x370)](_0x5e7473,_0x3dede5){const _0x550c1f=_0x48c4c7,_0x27646c=await this[_0x550c1f(0x2c6)][_0x550c1f(0x255)](_0x5e7473),_0xab8b24=_0x5e7473+'\x00'+_0x3dede5;!this['_cursors'][_0x550c1f(0x12d)](_0xab8b24)&&(!this['_baselines'][_0x550c1f(0x12d)](_0x5e7473)&&(_0x27646c[_0x550c1f(0x135)](),this['_baselines'][_0x550c1f(0x1c4)](_0x5e7473,_0x27646c[_0x550c1f(0x248)]()||0x0)),this['_cursors']['set'](_0xab8b24,this[_0x550c1f(0x1c2)][_0x550c1f(0x245)](_0x5e7473)));const _0x18e5a7=this['_cursors'][_0x550c1f(0x245)](_0xab8b24),_0x396398=_0x27646c['getClock'](_0x3dede5)||0x0;if(_0x396398<=_0x18e5a7)return![];const _0x5d1820=_0x18e5a7+this[_0x550c1f(0x2ec)],_0x3a336a=Math['min'](_0x396398,_0x5d1820),_0x507094=_0x3f960a[_0x550c1f(0x36c)]?_0x3f960a[_0x550c1f(0x1cf)]():0x0,_0x41036a=Array[_0x550c1f(0x2d2)](_0x27646c[_0x550c1f(0x323)](_0x3dede5,_0x18e5a7+0x1,_0x3a336a));let _0x3a294e=_0x18e5a7;for(const _0x2d9753 of _0x41036a){const {clock:_0x27bca9,key:_0x4d7153,action:_0x4c354f,origin:_0x34f162}=_0x2d9753;if(_0x27bca9>_0x3a294e)_0x3a294e=_0x27bca9;if(_0x4d7153==null)continue;if(this['_pendingLocal']['has'](this[_0x550c1f(0x2a7)](_0x5e7473,_0x3dede5,_0x4d7153,_0x27bca9)))continue;if(!this[_0x550c1f(0x324)](_0x5e7473,_0x3dede5,_0x4d7153,_0x27bca9))continue;let _0x715484,_0x551c08;if(_0x4c354f===_0x2d4315[_0x550c1f(0x310)])_0x715484=_0x550c1f(0x13d),_0x551c08=null;else{const _0x2af677=_0x27646c[_0x550c1f(0x245)](_0x3dede5,_0x4d7153);_0x2af677==null?(_0x715484=_0x550c1f(0x13d),_0x551c08=null):(_0x715484='put',_0x551c08=_0x2af677);}this['emit'](_0x550c1f(0x2bc),{'env':_0x5e7473,'type':_0x3dede5,'key':_0x4d7153,'op':_0x715484,'clock':_0x27bca9,'origin':_0x34f162,'value':_0x551c08});}if(_0x3f960a['enabled'])_0x3f960a[_0x550c1f(0x22a)](_0x550c1f(0x2ea)+_0x5e7473+':'+_0x3dede5,_0x3f960a[_0x550c1f(0x1cf)]()-_0x507094,'n='+_0x41036a[_0x550c1f(0x2b7)]);return this[_0x550c1f(0x28a)][_0x550c1f(0x1c4)](_0xab8b24,Math[_0x550c1f(0x1a3)](_0x3a294e,_0x3a336a)),_0x27646c[_0x550c1f(0x248)](_0x3dede5)>_0x3a336a;}[_0x48c4c7(0x1b7)](){const _0x5cb58c=_0x48c4c7;return{'started':this[_0x5cb58c(0x2b5)],'quantum':this[_0x5cb58c(0x2ec)],'flushDebounce':this[_0x5cb58c(0x137)],'cursors':Object[_0x5cb58c(0x131)]([...this[_0x5cb58c(0x28a)][_0x5cb58c(0x334)]()][_0x5cb58c(0x328)](([_0x3ce20f,_0x118eeb])=>[_0x3ce20f['replace']('\x00',':'),_0x118eeb])),'pending':this[_0x5cb58c(0x1b6)][_0x5cb58c(0x194)],'seen':this[_0x5cb58c(0x1e1)][_0x5cb58c(0x194)]};}}return _0x2700dd[_0x48c4c7(0x1ec)]=_0x2f198b,okdbChangefeed={'OKDBChangefeed':_0x2700dd},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x57631f=_0x1f2bca;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0xf2c981=require$$1$1,_0x58a900=require$$1,{EVENTS:_0x1eaa90}=requireOkdbEnums(),_0x48b894=require$$0$3,{slotKey:_0x225b86}=requireOkdbProcessRegistry(),_0xaceba1=Number(process.env.OKDB_CLUSTER_RESPAWN_BACKOFF_MS)||0xfa,_0x3eab39=0xfa0,_0x195d08=0x5,_0xf0d2a3=0x2710,_0xee7eed=0xbb8,_0x3645c9=0x7d0,_0x3f4fd0=_0x57631f(0x24b),_0x4d1859=_0x57631f(0x30a),_0x15544e='log',_0x3d1317='stats',_0x209f43=[_0x1eaa90[_0x57631f(0x192)],_0x1eaa90[_0x57631f(0x23c)],_0x1eaa90[_0x57631f(0x322)],_0x1eaa90[_0x57631f(0x2b9)],_0x1eaa90[_0x57631f(0x183)],_0x1eaa90[_0x57631f(0x2ba)],_0x1eaa90[_0x57631f(0x2f9)],_0x1eaa90['INDEX_REGISTERED'],_0x57631f(0x2cb),_0x57631f(0x376),_0x57631f(0x1c3),'processor:paused',_0x57631f(0x35b),'processor:retry'],_0x52564d=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0,_0x46e3fc=0x64;function _0x4a696b(_0x137caf){const _0x3debab=_0x57631f;if(!_0x137caf)return _0x3debab(0x1b1);const _0x40cb6f=(_0x137caf[_0x3debab(0x20e)]||[])[_0x3debab(0x328)](_0x3fb2b7=>[_0x3fb2b7[_0x3debab(0x28e)],_0x3fb2b7['id'],_0x3fb2b7[_0x3debab(0x27d)],_0x3fb2b7[_0x3debab(0x36e)],!!_0x3fb2b7[_0x3debab(0x287)],!!_0x3fb2b7[_0x3debab(0x365)],!!_0x3fb2b7[_0x3debab(0x274)],_0x3fb2b7[_0x3debab(0x2b2)]?.[_0x3debab(0x13a)]??null,_0x3fb2b7[_0x3debab(0x263)]?String(_0x3fb2b7[_0x3debab(0x263)]?.[_0x3debab(0x2f8)]??_0x3fb2b7[_0x3debab(0x263)]):null]);return JSON[_0x3debab(0x374)]([!!_0x137caf[_0x3debab(0x373)],_0x40cb6f]);}function _0x22aae5({workers:_0x1647c8,makeOkdb:_0x53cdd6,port:_0x1f7afd,primaryOkdb:_0x38c222,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0x56cc18=_0x57631f;if(_0xf2c981[_0x56cc18(0x1a8)])return childEntry&&_0xf2c981[_0x56cc18(0x233)]({'exec':_0x58a900[_0x56cc18(0x2fb)](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0x215218=_0x56cc18,_0x5d79d4=[];for(let _0x1957d1=0x0;_0x1957d1<process[_0x215218(0x2cd)][_0x215218(0x2b7)];_0x1957d1++){const _0x453cbf=process[_0x215218(0x2cd)][_0x1957d1];if(_0x453cbf[_0x215218(0x2c5)]('--test')||_0x453cbf[_0x215218(0x2c5)](_0x215218(0x220))||_0x453cbf[_0x215218(0x2c5)](_0x215218(0x1d8)))continue;if(_0x453cbf==='-e'||_0x453cbf===_0x215218(0x13c)||_0x453cbf==='-p'||_0x453cbf===_0x215218(0x18c)){_0x1957d1++;continue;}_0x5d79d4[_0x215218(0x22b)](_0x453cbf);}return _0x5d79d4;})())}),_0x4092a6({'workers':_0x1647c8,'port':_0x1f7afd,'primaryOkdb':_0x38c222,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x1f7afd});return _0x5d4555({'makeOkdb':_0x53cdd6,'port':_0x1f7afd});}function _0x4092a6({workers:_0x4aa27d,port:_0x35f3cf,primaryOkdb:_0x5dc233,workerEnv:_0x46f0de,workerRole:_0x1c1568,listenAddr:_0x2236ba}){const _0x512c2a=_0x57631f,_0x522fd2=new Map(),_0x197ba8=new Map();let _0x33b352=![];const _0x5e9732=_0x14cda0=>_0x14cda0?.[_0x512c2a(0x209)],_0x565ff6=_0x31df67=>{const _0x25f0cf=_0x512c2a,_0x389923=_0xf2c981['fork']({...process.env,..._0x46f0de||{},'OKDB_CLUSTER_SLOT':String(_0x31df67)});return _0x389923[_0x25f0cf(0x209)]=_0x31df67,_0x522fd2[_0x25f0cf(0x1c4)](_0x389923[_0x25f0cf(0x236)][_0x25f0cf(0x13a)],{'worker':_0x389923,'startedAt':Date[_0x25f0cf(0x1cf)](),'slot':_0x31df67}),_0x389923['on'](_0x25f0cf(0x263),_0x1c1915=>{const _0x5e5748=_0x25f0cf;console[_0x5e5748(0x271)](_0x5e5748(0x13e)+_0x389923['process']['pid']+_0x5e5748(0x2dc)+(_0x1c1915?.[_0x5e5748(0x2f8)]??_0x1c1915));}),_0x389923['on'](_0x25f0cf(0x2d5),()=>_0x157086()),_0x389923;},_0x4b8cfb=_0x413874=>{const _0x1ce1a9=_0x512c2a;for(const {worker:_0x1054f7}of _0x522fd2['values']()){if(_0x1054f7[_0x1ce1a9(0x1bf)]()||!_0x1054f7[_0x1ce1a9(0x16e)]())continue;try{_0x1054f7['send'](_0x413874);}catch{}}};_0x5dc233?.[_0x512c2a(0x327)]?.({'kind':_0x512c2a(0x2db),'listenAddr':_0x2236ba})[_0x512c2a(0x22e)](()=>{}),_0x5dc233?.[_0x512c2a(0x158)]?.[_0x512c2a(0x165)]?.({'workersConfigured':_0x4aa27d});const _0xc2610d={'engines':!![],'processors':!![],'compaction':!![],..._0x1c1568,'http':!![]},_0x157086=()=>{const _0x58ffcc=_0x512c2a,_0x4b3238=_0x5dc233?.[_0x58ffcc(0x158)];if(!_0x4b3238||!_0x4b3238[_0x58ffcc(0x1c8)])return;const _0x1af8df=_0x4b3238[_0x58ffcc(0x357)];for(const {worker:_0x2d0be7,startedAt:_0x224e09,slot:_0x517d5c,stats:_0x344749,processing:_0x10db51}of _0x522fd2[_0x58ffcc(0x20c)]()){if(_0x2d0be7['isDead']())continue;const _0x25b10a=_0x4b3238[_0x58ffcc(0x293)]?.()&&_0x4b3238[_0x58ffcc(0x23a)](_0x58ffcc(0x23f),_0x407fe5(_0x517d5c))?.[_0x58ffcc(0x18e)]===!![];_0x4b3238[_0x58ffcc(0x1e2)]({'pid':_0x2d0be7[_0x58ffcc(0x236)]['pid'],'startedAt':_0x224e09,'kind':_0x58ffcc(0x1c9),'supervisorKey':_0x1af8df,'slot':_0x517d5c,'slotKey':_0x407fe5(_0x517d5c),'role':_0xc2610d,'listenAddr':_0x2236ba,'lifecycle':_0x25b10a?_0x58ffcc(0x232):_0x58ffcc(0x2e6),'processing':_0x10db51??null,'stats':_0x344749??null})['catch'](()=>{});}},_0x407fe5=_0x5d0875=>_0x225b86(_0x512c2a(0x35d)+_0x35f3cf,_0x5d0875),_0x2746e2=_0x35748f=>{const _0x55f0db=_0x512c2a,_0x144d3f=_0x5dc233?.[_0x55f0db(0x158)];if(!_0x144d3f?.[_0x55f0db(0x293)]?.())return![];return _0x144d3f[_0x55f0db(0x23a)](_0x55f0db(0x23f),_0x407fe5(_0x35748f))?.[_0x55f0db(0x18e)]===!![];};for(let _0x56552c=0x0;_0x56552c<_0x4aa27d;_0x56552c++){const _0x42e3bf=_0x2746e2(_0x56552c);_0x197ba8[_0x512c2a(0x1c4)](_0x56552c,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x42e3bf,'respawnTimer':null}),_0x42e3bf?console[_0x512c2a(0x271)](_0x512c2a(0x367)+_0x56552c+_0x512c2a(0x378)):_0x565ff6(_0x56552c);}const _0x3b80c1=()=>{const _0x262b23=_0x512c2a,_0x130ae3=_0x5dc233?.[_0x262b23(0x158)];if(!_0x130ae3?.[_0x262b23(0x1c8)]||!_0x130ae3[_0x262b23(0x293)]?.())return;for(const [_0x45fa09,_0x3ad660]of _0x197ba8[_0x262b23(0x334)]()){const _0x500457=_0x130ae3[_0x262b23(0x23a)]('slot',_0x407fe5(_0x45fa09)),_0x4fbabd=_0x500457?.['decommission']===!![],_0x41cdf2=_0x500457?.[_0x262b23(0x2b3)]===!![];if(_0x4fbabd&&!_0x3ad660['dead']){_0x3ad660[_0x262b23(0x2a0)]=!![];_0x3ad660[_0x262b23(0x2d4)]&&(clearTimeout(_0x3ad660['respawnTimer']),_0x3ad660[_0x262b23(0x2d4)]=null);for(const {worker:_0x2d37cf}of _0x522fd2[_0x262b23(0x20c)]()){if(_0x5e9732(_0x2d37cf)!==_0x45fa09||_0x2d37cf[_0x262b23(0x1bf)]())continue;try{if(_0x41cdf2)_0x2d37cf[_0x262b23(0x236)][_0x262b23(0x2b3)](_0x262b23(0x320));else _0x2d37cf[_0x262b23(0x16e)]()&&_0x2d37cf[_0x262b23(0x1f3)]();}catch{}}console['log'](_0x262b23(0x26a)+(_0x41cdf2?_0x262b23(0x1d7):_0x262b23(0x191))+_0x262b23(0x315)+_0x45fa09+_0x262b23(0x377));}else{if(!_0x4fbabd&&_0x3ad660[_0x262b23(0x2a0)]&&_0x500457){_0x3ad660[_0x262b23(0x2a0)]=![],_0x3ad660[_0x262b23(0x237)]=[],_0x3ad660['consecutiveFailures']=0x0;const _0x41e81b=[..._0x522fd2[_0x262b23(0x20c)]()][_0x262b23(0x28b)](({worker:_0x2bbceb})=>_0x5e9732(_0x2bbceb)===_0x45fa09&&!_0x2bbceb[_0x262b23(0x1bf)]());!_0x41e81b&&!_0x33b352&&(_0x565ff6(_0x45fa09),console[_0x262b23(0x271)](_0x262b23(0x201)+_0x45fa09));}}}},_0x441d24=()=>{try{_0x3b80c1();}catch{}};_0x5dc233?.[_0x512c2a(0x2a5)]?.['on']?.(_0x1eaa90['SYSTEM_PROC'],_0x441d24);const _0xee6410=[];if(_0x5dc233?.['events']?.['on'])for(const _0x407328 of _0x209f43){const _0x48fcc7=_0x176372=>{_0x4b8cfb({[_0x3f4fd0]:_0x4d1859,'event':_0x407328,'data':_0x176372??{}});};_0x5dc233[_0x512c2a(0x2a5)]['on'](_0x407328,_0x48fcc7),_0xee6410[_0x512c2a(0x22b)]({'event':_0x407328,'handler':_0x48fcc7});}const _0x1d42f3=setInterval(()=>{_0x3b80c1(),_0x157086();},_0x52564d);_0x1d42f3['unref']?.();const _0x33b9fa=(_0x4f6502,_0x30c1ef)=>{const _0x4d8afc=_0x512c2a;if(!_0x30c1ef||typeof _0x30c1ef!=='object'||_0x30c1ef[_0x3f4fd0]!==_0x15544e)return;if(!_0x5dc233?.[_0x4d8afc(0x271)]?.[_0x4d8afc(0x34f)])return;const _0x3865a9=_0x30c1ef[_0x4d8afc(0x257)]||{};_0x5dc233[_0x4d8afc(0x271)][_0x4d8afc(0x34f)]({..._0x3865a9,'msg':'[w'+_0x30c1ef['slot']+']\x20'+(_0x3865a9[_0x4d8afc(0x244)]??''),'meta':{..._0x3865a9[_0x4d8afc(0x341)]||{},'worker':_0x30c1ef[_0x4d8afc(0x23f)],'workerPid':_0x30c1ef[_0x4d8afc(0x13a)]}});};_0xf2c981['on'](_0x512c2a(0x2f8),_0x33b9fa);const _0x1109b8=(_0x5224e4,_0xd9c17c)=>{const _0x177072=_0x512c2a;if(!_0xd9c17c||typeof _0xd9c17c!=='object'||_0xd9c17c[_0x3f4fd0]!==_0x3d1317)return;const _0x5e26f0=_0x522fd2[_0x177072(0x245)](_0x5224e4[_0x177072(0x236)][_0x177072(0x13a)]);if(_0x5e26f0){_0x5e26f0[_0x177072(0x243)]={..._0xd9c17c[_0x177072(0x243)],'at':Date[_0x177072(0x1cf)]()};if(_0xd9c17c[_0x177072(0x2c7)]!==undefined){const _0x2b04a9=_0x4a696b(_0xd9c17c[_0x177072(0x2c7)]);_0x2b04a9!==_0x5e26f0[_0x177072(0x174)]&&(_0x5e26f0[_0x177072(0x174)]=_0x2b04a9,_0x513202()),_0x5e26f0[_0x177072(0x2c7)]=_0xd9c17c['processing'];}}};let _0x584b47=null;const _0x513202=()=>{const _0x9be83d=_0x512c2a;if(_0x584b47||_0x33b352)return;_0x584b47=setTimeout(()=>{_0x584b47=null;if(!_0x33b352)_0x157086();},_0x46e3fc),_0x584b47[_0x9be83d(0x343)]?.();};_0xf2c981['on']('message',_0x1109b8),_0xf2c981['on'](_0x512c2a(0x2a8),(_0x1e552c,_0xd89518,_0xeb6af)=>{const _0xc81398=_0x512c2a,_0x3d8cb3=_0x1e552c[_0xc81398(0x236)][_0xc81398(0x13a)],_0x23f0c4=_0x5e9732(_0x1e552c),_0x2ba814=_0x522fd2[_0xc81398(0x245)](_0x3d8cb3);if(_0x2ba814&&_0x5dc233?.[_0xc81398(0x158)])_0x5dc233[_0xc81398(0x158)]['removeNode'](_0x3d8cb3+':'+_0x2ba814[_0xc81398(0x338)])['catch'](()=>{});_0x522fd2['delete'](_0x3d8cb3),console[_0xc81398(0x271)](_0xc81398(0x13e)+_0x3d8cb3+_0xc81398(0x175)+(_0x23f0c4??'?')+_0xc81398(0x299)+('(code='+_0xd89518+_0xc81398(0x351)+(_0xeb6af??'none')+_0xc81398(0x36a)+_0x522fd2[_0xc81398(0x194)]+'\x20worker(s)\x20remaining')),_0x157086();if(_0x33b352||_0x23f0c4==null)return;const _0x44a99a=_0x197ba8[_0xc81398(0x245)](_0x23f0c4);if(!_0x44a99a||_0x44a99a[_0xc81398(0x2a0)])return;const _0x58ad69=Date['now']();_0x44a99a['deaths'][_0xc81398(0x22b)](_0x58ad69),_0x44a99a[_0xc81398(0x237)]=_0x44a99a[_0xc81398(0x237)][_0xc81398(0x336)](_0x268fd6=>_0x58ad69-_0x268fd6<=_0xf0d2a3);if(_0x44a99a[_0xc81398(0x237)][_0xc81398(0x2b7)]>=_0x195d08){_0x44a99a[_0xc81398(0x2a0)]=!![],console[_0xc81398(0x263)]('[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot='+_0x23f0c4+_0xc81398(0x362)+_0x44a99a[_0xc81398(0x237)][_0xc81398(0x2b7)]+'\x20times\x20in\x20'+(_0xf0d2a3+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x522fd2[_0xc81398(0x194)]+_0xc81398(0x130)));return;}_0x44a99a[_0xc81398(0x266)]++;const _0x4e48e0=Math[_0xc81398(0x1f0)](_0x3eab39,_0xaceba1*0x2**(_0x44a99a[_0xc81398(0x266)]-0x1));console['log'](_0xc81398(0x18f)+_0x23f0c4+'\x20in\x20'+_0x4e48e0+_0xc81398(0x227)+_0x44a99a['consecutiveFailures']+')'),_0x44a99a[_0xc81398(0x2d4)]=setTimeout(()=>{const _0x345cb8=_0xc81398;_0x44a99a[_0x345cb8(0x2d4)]=null;if(_0x33b352||_0x44a99a[_0x345cb8(0x2a0)])return;const _0x13325f=_0x565ff6(_0x23f0c4);_0x13325f[_0x345cb8(0x240)](_0x345cb8(0x1fb),()=>{const _0x517a9f=_0x345cb8;if(_0x197ba8[_0x517a9f(0x245)](_0x23f0c4)===_0x44a99a)_0x44a99a[_0x517a9f(0x266)]=0x0;});},_0x4e48e0),_0x44a99a[_0xc81398(0x2d4)]['unref']?.();});const _0x1007eb=[..._0x522fd2[_0x512c2a(0x27c)]()];console[_0x512c2a(0x271)](_0x512c2a(0x14d)+process[_0x512c2a(0x13a)]+_0x512c2a(0x314)+_0x4aa27d+'\x20HTTP\x20server(s)\x20on\x20port\x20'+_0x35f3cf+':\x20'+('['+_0x1007eb[_0x512c2a(0x2fb)](',\x20')+']'));const _0x462c5d={'_isClusterController':!![],'port':_0x35f3cf,'primaryOkdb':_0x5dc233??null,'status'(){const _0x995e38=_0x512c2a;return{'clustered':!![],'primaryPid':process[_0x995e38(0x13a)],'port':_0x35f3cf,'primaryRole':_0x5dc233?.['role']??null,'processorPid':null,'supervisorPid':process['pid'],'workers':[..._0x522fd2[_0x995e38(0x20c)]()][_0x995e38(0x328)](({worker:_0x86d3c9})=>({'pid':_0x86d3c9[_0x995e38(0x236)][_0x995e38(0x13a)],'id':_0x86d3c9['id'],'dead':_0x86d3c9['isDead']()}))};},async 'close'(){const _0x4b3f28=_0x512c2a;_0x33b352=!![];for(const _0x20b0b3 of _0x197ba8['values']()){_0x20b0b3['dead']=!![],_0x20b0b3['respawnTimer']&&(clearTimeout(_0x20b0b3['respawnTimer']),_0x20b0b3['respawnTimer']=null);}clearInterval(_0x1d42f3);_0x584b47&&(clearTimeout(_0x584b47),_0x584b47=null);_0xf2c981[_0x4b3f28(0x19f)](_0x4b3f28(0x2f8),_0x33b9fa),_0xf2c981[_0x4b3f28(0x19f)](_0x4b3f28(0x2f8),_0x1109b8),_0x5dc233?.[_0x4b3f28(0x2a5)]?.[_0x4b3f28(0x19f)]?.(_0x1eaa90[_0x4b3f28(0x2a9)],_0x441d24);if(_0x5dc233?.[_0x4b3f28(0x2a5)]?.[_0x4b3f28(0x19f)])for(const {event:_0xc29b9c,handler:_0x34d1bc}of _0xee6410){try{_0x5dc233['events'][_0x4b3f28(0x19f)](_0xc29b9c,_0x34d1bc);}catch{}}_0xee6410['length']=0x0;const _0x215f6c=[..._0x522fd2[_0x4b3f28(0x20c)]()][_0x4b3f28(0x328)](({worker:_0x24982c})=>_0x24982c);if(_0x215f6c['length']===0x0)return;await Promise['all'](_0x215f6c['map'](_0x47023c=>new Promise(_0x2179de=>{const _0x2da59d=_0x4b3f28;if(_0x47023c[_0x2da59d(0x1bf)]()){_0x2179de();return;}let _0x1c9c79=![];const _0x574843=()=>{if(_0x1c9c79)return;_0x1c9c79=!![];if(_0x2d01a7)clearTimeout(_0x2d01a7);_0x2179de();};_0x47023c[_0x2da59d(0x240)](_0x2da59d(0x2a8),_0x574843);const _0x2d01a7=setTimeout(()=>{const _0x221368=_0x2da59d;try{_0x47023c[_0x221368(0x236)][_0x221368(0x2b3)]();}catch{}},_0xee7eed+0x1f4);_0x2d01a7[_0x2da59d(0x343)]?.();try{_0x47023c[_0x2da59d(0x1f3)]();}catch{try{_0x47023c['process'][_0x2da59d(0x2b3)]();}catch{}}})));}};return _0x462c5d;}async function _0x5d4555({makeOkdb:_0x277d4d,port:_0x480953}){const _0x28057=_0x57631f,_0x3dda54=await _0x277d4d();return _0x301823(_0x3dda54),_0x3dda54[_0x28057(0x17b)][_0x28057(0x24d)](_0x480953);}function _0x301823(_0x3a457c){const _0x16094f=_0x57631f;if(!_0x3a457c||_0x3a457c['_clusterWorkerAttached'])return;_0x3a457c[_0x16094f(0x178)]=!![];try{const {OKDBChangefeed:_0x7156ac}=requireOkdbChangefeed(),_0x23c88f=_0x3a457c[_0x16094f(0x1c7)];if(_0x23c88f&&typeof _0x23c88f['attachFeed']===_0x16094f(0x14b)){const _0x55397f=new _0x7156ac(_0x3a457c);_0x55397f[_0x16094f(0x35f)](),_0x23c88f[_0x16094f(0x36f)](_0x55397f),_0x3a457c['_changefeed']=_0x55397f;}}catch(_0x254dd8){_0x3a457c[_0x16094f(0x271)]?.['warn']?.(_0x16094f(0x1d4)+(_0x254dd8?.[_0x16094f(0x2f8)]??_0x254dd8),{'feature':_0x16094f(0x176)});}const _0x12188a=_0x51eb97=>{const _0x4e6e9d=_0x16094f;if(!_0x51eb97||typeof _0x51eb97!==_0x4e6e9d(0x17c)||_0x51eb97[_0x3f4fd0]==null)return;if(_0x51eb97[_0x3f4fd0]===_0x4d1859)try{_0x3a457c['_adminRelay']?.[_0x4e6e9d(0x180)]?.(_0x51eb97[_0x4e6e9d(0x1ae)],_0x51eb97[_0x4e6e9d(0x1cb)]);}catch{}};process['on'](_0x16094f(0x2f8),_0x12188a),_0x3a457c['_clusterOnMessage']=_0x12188a;{let _0x4fe0c8=process[_0x16094f(0x16c)](),_0xc53f55=Date[_0x16094f(0x1cf)]();const _0x299ca3=()=>{const _0x3d897e=_0x16094f;if(typeof process[_0x3d897e(0x298)]!==_0x3d897e(0x14b)||!process['connected'])return;const _0x35ac23=Date[_0x3d897e(0x1cf)](),_0x4175e4=process['cpuUsage'](),_0x30bed5=(_0x35ac23-_0xc53f55)*0x3e8,_0x5b7ed7=_0x4175e4[_0x3d897e(0x2a4)]-_0x4fe0c8['user']+(_0x4175e4[_0x3d897e(0x179)]-_0x4fe0c8[_0x3d897e(0x179)]),_0x3c98fa=_0x30bed5>0x0?Math['min'](0x64,Math[_0x3d897e(0x24f)](_0x5b7ed7/(_0x30bed5*(_0x48b894['cpus']()[_0x3d897e(0x2b7)]||0x1))*0x64)):0x0;_0x4fe0c8=_0x4175e4,_0xc53f55=_0x35ac23;const _0x5b7572=process['memoryUsage']();let _0x2f17d3=null;try{_0x2f17d3=_0x3a457c['role']?.[_0x3d897e(0x20e)]?_0x3a457c[_0x3d897e(0x158)]?.[_0x3d897e(0x1eb)]?.()??null:null;}catch{}try{process[_0x3d897e(0x298)]({[_0x3f4fd0]:_0x3d1317,'stats':{'rss':_0x5b7572[_0x3d897e(0x154)],'heapUsed':_0x5b7572[_0x3d897e(0x34c)],'heapTotal':_0x5b7572[_0x3d897e(0x379)],'external':_0x5b7572['external'],'cpuPct':_0x3c98fa,'cpuWindowMs':Math[_0x3d897e(0x24f)](_0x30bed5/0x3e8)||null},'processing':_0x2f17d3});}catch{}},_0x2528be=Math[_0x16094f(0x1a3)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0xab814b=setInterval(_0x299ca3,_0x2528be);_0xab814b[_0x16094f(0x343)]?.(),_0x299ca3();for(const _0x58e17b of[_0x16094f(0x19b),_0x16094f(0x35b)]){_0x3a457c[_0x16094f(0x2a5)]?.['on']?.(_0x58e17b,()=>{try{_0x299ca3();}catch{}});}}let _0x459876=![];const _0x29a89f=async _0x49173f=>{const _0x413e83=_0x16094f;if(_0x459876)return;_0x459876=!![];const _0x4b1d13=setTimeout(()=>process['exit'](_0x49173f),_0xee7eed);_0x4b1d13[_0x413e83(0x343)]?.();try{await _0x3a457c[_0x413e83(0x15b)]?.();}catch{}process[_0x413e83(0x2a8)](_0x49173f);};process['on'](_0x16094f(0x1f3),()=>_0x29a89f(0x0));if(process[_0x16094f(0x298)]&&!process[_0x16094f(0x16a)])_0x29a89f(0x0);if(process[_0x16094f(0x262)]!==_0x16094f(0x360)){const _0x5de02c=setInterval(()=>{const _0x117a86=_0x16094f;if(process[_0x117a86(0x129)]===0x1)_0x29a89f(0x0);},_0x3645c9);_0x5de02c['unref']?.(),_0x3a457c[_0x16094f(0x1fe)]=_0x5de02c;}}return okdbCluster={'runClustered':_0x22aae5,'attachWorkerCluster':_0x301823},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){const _0x507ee2=_0x1f2bca;if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x28e05d=require$$0$5,{attachWorkerCluster:_0x415acc}=requireOkdbCluster();async function _0x47ac3b(){const _0x3599f1=_0x2789,_0x1c7ff4=process.env.OKDB_HTTP_CHILD;if(!_0x1c7ff4)throw new Error(_0x3599f1(0x273));const {rootPath:_0x327736,port:_0x29e9c6,options:options={},logLevel:logLevel=_0x3599f1(0x345)}=JSON[_0x3599f1(0x363)](_0x1c7ff4);if(!_0x327736||!_0x29e9c6)throw new Error(_0x3599f1(0x2f3));const _0x873380=new _0x28e05d(_0x327736,{...options,'engines':![],'processors':![],'compaction':![]});_0x873380[_0x3599f1(0x271)][_0x3599f1(0x150)]?.();const _0x5f2f36=process.env.OKDB_CLUSTER_SLOT??'?',_0x5e3ed0={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x34d797=_0x5e3ed0[logLevel]??_0x5e3ed0['info'];_0x873380['log'][_0x3599f1(0x146)](_0x15370c=>{const _0x5cad6f=_0x3599f1;if((_0x5e3ed0[_0x15370c[_0x5cad6f(0x316)]]??0x1)<_0x34d797)return;try{process[_0x5cad6f(0x298)]?.({'__okdbCluster':_0x5cad6f(0x271),'slot':_0x5f2f36,'pid':process['pid'],'entry':_0x15370c});}catch{}}),await _0x873380[_0x3599f1(0x2ef)](),_0x415acc(_0x873380),await _0x873380[_0x3599f1(0x17b)][_0x3599f1(0x24d)](_0x29e9c6);}return _0x47ac3b()[_0x507ee2(0x22e)](_0x169272=>{const _0x82889e=_0x507ee2;try{process[_0x82889e(0x298)]?.({'__okdbCluster':_0x82889e(0x271),'slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process['pid'],'entry':{'level':_0x82889e(0x263),'msg':'http\x20worker\x20child\x20failed:\x20'+(_0x169272?.['message']??_0x169272)}});}catch{}process['exit'](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module[_0x1f2bca(0x21c)]=okdbHttpWorkerChild;
1
+ 'use strict';function _0x37d7(_0x4d0a78,_0x3a3491){_0x4d0a78=_0x4d0a78-0xa4;const _0x11c068=_0x11c0();let _0x37d72a=_0x11c068[_0x4d0a78];return _0x37d72a;}const _0x498b9d=_0x37d7;(function(_0x2d0d79,_0x5771e0){const _0x575ce2=_0x37d7,_0x1cf33e=_0x2d0d79();while(!![]){try{const _0x285f44=-parseInt(_0x575ce2(0x174))/0x1*(parseInt(_0x575ce2(0xcd))/0x2)+-parseInt(_0x575ce2(0x184))/0x3+parseInt(_0x575ce2(0x2aa))/0x4*(parseInt(_0x575ce2(0x22c))/0x5)+-parseInt(_0x575ce2(0x118))/0x6*(parseInt(_0x575ce2(0xf7))/0x7)+-parseInt(_0x575ce2(0x222))/0x8+parseInt(_0x575ce2(0xf4))/0x9+-parseInt(_0x575ce2(0x2db))/0xa*(-parseInt(_0x575ce2(0x132))/0xb);if(_0x285f44===_0x5771e0)break;else _0x1cf33e['push'](_0x1cf33e['shift']());}catch(_0x3f37a7){_0x1cf33e['push'](_0x1cf33e['shift']());}}}(_0x11c0,0x87015));var require$$0$5=require(_0x498b9d(0x1c9)),require$$1$1=require(_0x498b9d(0x18f)),require$$1=require(_0x498b9d(0x2df)),require$$0$3=require('os'),require$$2=require(_0x498b9d(0x1d5)),require$$0=require(_0x498b9d(0x24c)),require$$0$2=require(_0x498b9d(0x2d6)),require$$0$1=require('fs'),require$$0$4=require(_0x498b9d(0x1a4));function getDefaultExportFromCjs(_0x8080f6){const _0x327e78=_0x498b9d;return _0x8080f6&&_0x8080f6[_0x327e78(0x1e4)]&&Object[_0x327e78(0xb9)][_0x327e78(0x2c2)][_0x327e78(0x269)](_0x8080f6,_0x327e78(0x1fe))?_0x8080f6[_0x327e78(0x1fe)]:_0x8080f6;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function _0x11c0(){const _0x31375b=['4215688NcYvRT','[okdb-cluster]\x20','building','_desiredOverlay','isActive','maxMs','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','signalWant','INDEX_RESET','publishChildRow','40wqDefv','open','single','holder','max','entry','off','_onTick','closing','_singletonLock','writerStatus','bumpCmd','hasDesired','connected','external','reset','removeNode','startedAt','okdb-writer[','ms\x20on\x20env=','splice','raw-remove','bus:env_release','view:progress','put','SYSTEM_STOPPED','ms/','_systemEnv','[okdb-cluster]\x20worker\x20pid=','processKey','draining','runtimeProcessesView','node:perf_hooks','offWindow','okdb','value','repeat','SIGKILL','resetting','updateSupervisedChildStats','stats','\x20(durable\x20desired-state)','rss','inst:','round','toISOString','status','removeSupervisedChild','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','dropIndex','async','txn:rollback','queue-worker','keys','stderr','test','halted','~processes','claims','creating','http-server','call','split','fromEntries','\x20statusEnv=','heapUsed','processor:paused','addSupervisedChild','INDEX_READY','getClock','heapTotal','bus:type_drop','nodeKey','change','_threadStats','_caps','dropping','started','_clusterOrphanWatch','processors','unref','\x20drainAge=','deaths','entries','_nestedTotal','okdb-diag.','memoryUsage','startHeartbeat','parkedNow','_putRowAsync','isWanted','removeSync','procmodeack/','ms\x20(attempt\x20','prependListener','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','_sampleOwnStats','_rawDb','recent\x20writes\x20(newest\x20first)','_held','recordWrite','updatedAt','events','_changefeed','type:registered','slice','size','_flushTimer','instances','pid','(code=','running','note','waiting','_heartbeatInFlight','okdb-lock:\x20env\x20closed','setTtl','_participate','system','start','startsWith','level','ms\x20busy=','join','consecutiveFailures','data','1816RFVBeP','event','isDead','_drain','~processes:desired','_startedAt','code','now','getProcess','listenAddr','exit','once','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','withPoolHold','children','deregisterSelf','_assertUsable','meta','cursorKey','_wantDbOf','_closed','map','node','system:poke','hasOwnProperty','system:clock_change','\x20(slot=','push','_ownMeta','ITEM_CREATE','_handleInProcess','\x20worker\x20slot=','worker','flushDebounce','remove','_buildChildRow','\x20\x20env=','ppid','license:invalid','flushed','version','namespace','_timer','fts:drop','perf_hooks','find','compact','\x20times\x20in\x20','system:type_drop','10EFUKxN','~lock','heartbeatMs','registerType','path','appendFileSync','isEnabled','_putRowSync','system:stopped','clearThreadStats','_key','tierList','disable','paused','includes','unique:violation','markClosed','nodesView','dumpedAt','index:ready','_quantum','listening','_singletonLocks','txn:start','_committed','none','enabled','_lastPublishAt','name','commitsPerSec','respawnTimer','warn','field:resolver_registered','null','info','listNodes','instanceId','stopHeartbeat','prototype','decommissioning','log','randomUUID','\x20forked\x20','disconnect','detachConsole','killable','view','confirm','_draining','has','processes','load','okdb-writer:\x20env\x20closing\x20—\x20retry','--eval','processor:resumed','_report','user','primary','454VVRFUe','setSchema','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','decommission','\x0a\x20\x20\x20\x20\x20\x20','created','ESRCH','sync','_role','env:removed','_writer','\x20===','ms\x20max=','singletonClaims','flushLmdb','_selfKey','min','mode','dedupeMax','_statusEnv','_publishNow','stop','inspect','ms\x20mean=','_lock','REMOVE','force','engines','fork','[okdb-cluster]\x20respawning\x20worker\x20slot=','_started','schema:set','clearTtl','http\x20worker\x20child\x20failed:\x20','registry\x20heartbeat\x20skipped\x20(writer=','treeView','_bpParkedTotal','_pendingLocal','SWAP','2037204zgziMJ','_hbTimer','_heldTotal','4865427btaXXZ','_admissionStarted','\x20while\x20this\x20process\x20runs\x20','_seen','ttl:expired','_admissionTimer','1ofN:','registerFts','drain','_pending','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','embedded','cpuWindowMs',');\x20','claimGated','expiresAt','registry-publish','cli','_enableChangelog','parse','getCmd','process\x20','ITEM_REMOVE','_wantDbHandle','exports','then','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','resolve','_versionSkewWarned','processorId','_desired','filter','_nodeDbFor','6rlmjwN','enable','_lastCpuPct','percentile','_processStartedAt','stringify','allSettled','ttlMs','license:added','ensureType',':want','processingSig','MAX_POOL_HOLDS','length','list','FTS_REGISTERED','processorsView','raw-put','threads','delete','getDesired','system:drain','_listenAddr','_startHeartbeat','\x20phase=','_nodeDead','35418592BikuiO','workersConfigured','--print','epoch','_scheduleFlush','_inflight','_lockDbOf','process','_adminRelay','number','_buildOwnRow','_dedupeKey','_nestedWarned','isWorker','_holderDead','shift','sort','registerIndex','starting','_groupByProcess','_nodeDb','_handlePending','race','floor','okdb-http-worker-child.js','commit','http','_kind','SYSTEM_POKE','dropSchema','string','processor:error','_rootDb','item:pending','processor:retry','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','_cursors','uncaughtException','INDEX_REGISTERED','get','openDB','message','add','_onPoke','noteListenAddr','schema:drop','mean','hard-killed','_ensureDesired','procmode/','\x20sync','attach','index:progress','busy','getRange','register',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','_baselines','clear','_nodeDbCache','processingStatusView','_buildProcessingFacet','commitP99Ms','loop-lag\x20','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','processor:progress','3493uUdSor','\x20worker(s)\x20remaining','_onPending','listen','_startAdmission','_supervisorKey','cpuUsage','\x20@\x20','env','\x20HTTP\x20server(s)\x20on\x20port\x20','win32','unclaimed','listDesired','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','item:create','_isWriter','2645838fXYFro','__okdbSlot','quantum','_sandbox','_activateProcesses','dropType','_clusterWorkerAttached','FTS_DROP','execArgv','functions','depth','cluster','(worst\x20','maxExtra','feed:','slot','function','kill','_highWater','_cmd','_log','_outstanding','putNode','_onStop','_rowKey','set','_coordinator','_lastCpuUsage','_done','uptime','all','\x20—\x20','node:events','_durs','error','online','toFixed','_envs','state','_handlePoke','replace','sandbox','write','object','oldestPendingMs','_db','send','reap','msg','extend','setOwnMeta','_refreshDesiredSnapshot','host','mkdirSync','rowKey','reportThreadStats','setLogger','\x20oldestPendingMs=','_lastCpuWindowMs','_instanceId','_wantDb','selfKey','platform','_drainOne','_enqueuedAt','clusterStatusView','emit','listAll','index:registered','./okdb','\x20died\x20','_lastCpuAt','true','acquiredAt','env:opened','_windowCbs','\x20│\x20','index:drop','trim','hostname',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','crypto','workers','putSync','afterWrite','item:remove','processing','_heartbeatTimer','stopped','ttl:set','closed','system:bus_state_change','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','unique:violation_resolved','_removeRowAsync','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','__esModule','isPrimary','ref:violation','_onItem','indexOf','_children','_acquiredAt','.log','_dedupeMax','values','setupPrimary','caps','resetIndex','ms\x20env=','_bpWaiters','error:\x20','committed','\x0a===\x20OKDB_DIAG\x20','_publishFailWarned','\x20writer{depth=','processor:ready','stack','options','participate','--watch','cpus','default','bus:drain','count','_collectWriterFacet','dead','attachFeed','VIEW_PROGRESS','_released','_isStale','setDesired','catch','resetReadTxn','_onProcEvent','childTransaction','fts:registered',',\x20signal=','compaction','_lockDb','\x20\x20(no\x20env\x20draining)','ready',')\x20exited\x20','ENV_CLOSING_RETRY','transaction','_buckets','bus:poke','\x20pid=','_clusterOnMessage','_markSeen','role','_isReader','_openEnvLazy','heldBy','kind','_flushDebounce','isConnected','supervisorKey'];_0x11c0=function(){return _0x31375b;};return _0x11c0();}function requireOkdbEnums(){const _0x136492=_0x498b9d;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x3bacbd={'PUT':_0x136492(0x244),'REMOVE':_0x136492(0x2cc),'INDEX_DROP':_0x136492(0x25d),'INDEX_REGISTER':_0x136492(0x143),'INDEX_RESET':_0x136492(0x1f0),'TYPE_REGISTER':_0x136492(0x2de),'TYPE_DROP':_0x136492(0x189),'FTS_REGISTER':_0x136492(0xfe),'FTS_DROP':'dropFts','FTS_RESET':'resetFts','SCHEMA_SET':_0x136492(0xce),'SCHEMA_DROP':_0x136492(0x14f),'TTL_SET':_0x136492(0x2a0),'TTL_CLEAR':_0x136492(0xed)},_0x2d6c7c={'SYSTEM_READY':'system:ready','FIELD_RESOLVER_REGISTERED':_0x136492(0xb3),'SYSTEM_STOPPED':_0x136492(0x2e3),'SYSTEM_CLOCK_CHANGE':_0x136492(0x2c3),'SYSTEM_POKE':_0x136492(0x2c1),'SYSTEM_DRAIN':_0x136492(0x12d),'SYSTEM_TYPE_DROP':_0x136492(0x2da),'SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x136492(0x1df),'ITEM_CREATE':_0x136492(0x182),'ITEM_UPDATE':'item:update','ITEM_REMOVE':_0x136492(0x1d9),'ITEM_PENDING':_0x136492(0x153),'INDEX_RESET':'index:reset','INDEX_READY':_0x136492(0xa6),'INDEX_PROGRESS':_0x136492(0x166),'VIEW_PROGRESS':_0x136492(0x243),'INDEX_DROP':_0x136492(0x1d1),'INDEX_REGISTERED':_0x136492(0x1c8),'FTS_REGISTERED':_0x136492(0x20c),'FTS_DROP':_0x136492(0x2d5),'FTS_RESET':'fts:reset','SCHEMA_SET':_0x136492(0xec),'SCHEMA_DROP':_0x136492(0x15f),'UNIQUE_VIOLATION':_0x136492(0x2ea),'UNIQUE_VIOLATION_RESOLVED':_0x136492(0x1e1),'REF_VIOLATION':_0x136492(0x1e6),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':'sync:apply','TXN_START':_0x136492(0xaa),'TXN_END':'txn:end','TXN_ROLLBACK':_0x136492(0x25f),'TYPE_REGISTERED':_0x136492(0x294),'TYPE_DROP':'type:drop','ENV_OPENED':_0x136492(0x1ce),'ENV_REMOVED':_0x136492(0xd6),'SYSTEM_ENV_RELEASE':'system:env_release','TTL_EXPIRED':_0x136492(0xfb),'TTL_SET':_0x136492(0x1dd),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x136492(0x2d0),'LICENSE_ADDED':_0x136492(0x120),'LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':'license:removed'},_0x335baf={'CREATING':_0x136492(0x267),'RESETTING':_0x136492(0x252),'READY':_0x136492(0x211),'DROPPING':_0x136492(0x278),'WAITING':_0x136492(0x29d),'ERROR':'error'},_0x7d2d4b={'CREATED':_0x136492(0xd2),'STARTING':_0x136492(0x144),'STARTED':_0x136492(0x279),'STOPPING':'stopping','STOPPED':_0x136492(0x1dc)},_0x499ca0={'CREATING':_0x136492(0x267),'READY':_0x136492(0x211),'HALTED':_0x136492(0x264),'STOPPED':_0x136492(0x1dc),'RESETTING':_0x136492(0x252)},_0x531246=Object['freeze']({'POKE':_0x136492(0x216),'DRAIN':_0x136492(0x1ff),'TYPE_DROP':_0x136492(0x273),'PROC':'bus:proc','ENV_RELEASE':_0x136492(0x242)});return okdbEnums={'BUS_EVENTS':_0x531246,'CHANGE_ACTIONS':_0x3bacbd,'EVENTS':_0x2d6c7c,'INDEX_STATE':_0x335baf,'OKDB_STATE':_0x7d2d4b,'VIEW_STATE':_0x499ca0},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x3ac040=_0x498b9d;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x5763e5,performance:_0x4263bd}=require$$0,_0x318913=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x3ac040(0x1cc),_0x592624=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0xbb91ce=process.env.OKDB_LOOP_LAG_ALL==='1',_0x32a037=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x48950f{constructor(){const _0x270116=_0x3ac040;this[_0x270116(0xad)]=_0x318913,this[_0x270116(0x215)]=new Map(),this['_h']=null,this[_0x270116(0x2d4)]=null,this[_0x270116(0xeb)]=![],this[_0x270116(0x198)]=(_0x42ccca,_0x160e36)=>process[_0x270116(0x262)]['write'](_0x42ccca+(_0x160e36?'\x20'+JSON[_0x270116(0x11d)](_0x160e36):'')+'\x0a');}[_0x3ac040(0x2b1)](){return _0x4263bd['now']();}[_0x3ac040(0x1bc)](_0x131aee){const _0x28680c=_0x3ac040;if(typeof _0x131aee===_0x28680c(0x194))this[_0x28680c(0x198)]=_0x131aee;}['note'](_0x35f34d,_0xaa64d8,_0x511313){const _0x47baf5=_0x3ac040;if(!this['enabled'])return;let _0x20ab02=this[_0x47baf5(0x215)][_0x47baf5(0x159)](_0x35f34d);!_0x20ab02&&(_0x20ab02={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this['_buckets'][_0x47baf5(0x19d)](_0x35f34d,_0x20ab02)),_0x20ab02['ms']+=_0xaa64d8,_0x20ab02[_0x47baf5(0x200)]+=0x1,_0xaa64d8>_0x20ab02['maxMs']&&(_0x20ab02['maxMs']=_0xaa64d8,_0x20ab02[_0x47baf5(0x191)]=_0x511313||'');}[_0x3ac040(0x2a3)](_0x26c4b9){const _0x3f9b50=_0x3ac040;if(!this[_0x3f9b50(0xad)]||this[_0x3f9b50(0xeb)])return;this['_started']=!![];if(_0x26c4b9)this[_0x3f9b50(0x198)]=_0x26c4b9;this['_h']=_0x5763e5({'resolution':0xa}),this['_h'][_0x3f9b50(0x119)](),this['_timer']=setInterval(()=>this[_0x3f9b50(0xca)](),_0x592624);if(this[_0x3f9b50(0x2d4)][_0x3f9b50(0x27c)])this['_timer']['unref']();}['onWindow'](_0x3003f7){const _0x151c8e=_0x3ac040;if(!this[_0x151c8e(0x1cf)])this[_0x151c8e(0x1cf)]=new Set();this[_0x151c8e(0x1cf)][_0x151c8e(0x15c)](_0x3003f7);if(!this[_0x151c8e(0xeb)])this['_startAdmission']();}[_0x3ac040(0x24d)](_0x4ec1b5){const _0x34fa04=_0x3ac040;this[_0x34fa04(0x1cf)]?.[_0x34fa04(0x12b)](_0x4ec1b5);}[_0x3ac040(0x178)](){const _0x4aeb83=_0x3ac040;if(this[_0x4aeb83(0xf8)])return;this[_0x4aeb83(0xf8)]=!![];!this['_h']&&(this['_h']=_0x5763e5({'resolution':0xa}),this['_h'][_0x4aeb83(0x119)]());const _0x23e154=_0x592624;this[_0x4aeb83(0xfc)]=setInterval(()=>{const _0x10a50a=_0x4aeb83,_0x561abf=this['_h'];if(!_0x561abf)return;const _0x53b0d3=_0x561abf[_0x10a50a(0x11b)](0x63)/0xf4240,_0x38da33=_0x561abf['max']/0xf4240,_0x1d3ed4=_0x561abf[_0x10a50a(0x160)]/0xf4240;_0x561abf[_0x10a50a(0x23b)]();if(this[_0x10a50a(0x1cf)])for(const _0x4810c0 of this[_0x10a50a(0x1cf)]){try{_0x4810c0({'p99Ms':_0x53b0d3,'maxMs':_0x38da33,'meanMs':_0x1d3ed4,'reportMs':_0x23e154});}catch{}}},_0x23e154);if(this[_0x4aeb83(0xfc)][_0x4aeb83(0x27c)])this['_admissionTimer'][_0x4aeb83(0x27c)]();}[_0x3ac040(0xca)](){const _0xbc3a95=_0x3ac040,_0x50382f=this['_h'],_0x412072=_0x50382f[_0xbc3a95(0x230)]/0xf4240,_0x538212=_0x50382f[_0xbc3a95(0x11b)](0x63)/0xf4240,_0x49321d=_0x50382f['mean']/0xf4240;_0x50382f[_0xbc3a95(0x23b)]();const _0xcdd498=[...this[_0xbc3a95(0x215)][_0xbc3a95(0x27f)]()]['map'](([_0x4ef5,_0x9611d1])=>({'label':_0x4ef5,..._0x9611d1}))[_0xbc3a95(0x142)]((_0x362a2b,_0x40f079)=>_0x40f079['ms']-_0x362a2b['ms'])[_0xbc3a95(0x295)](0x0,0x8);this[_0xbc3a95(0x215)][_0xbc3a95(0x16c)]();const _0x4466f4=_0xcdd498['reduce']((_0xf1bda0,_0x4642a5)=>_0xf1bda0+_0x4642a5['ms'],0x0),_0x5c04b0=_0xcdd498[_0xbc3a95(0x2bf)](_0x4bce01=>_0x4bce01['label']+'='+_0x4bce01['ms']['toFixed'](0x0)+_0xbc3a95(0x246)+_0x4bce01[_0xbc3a95(0x200)]+(_0x4bce01[_0xbc3a95(0x227)]>0x5?_0xbc3a95(0x190)+_0x4bce01[_0xbc3a95(0x227)][_0xbc3a95(0x1a8)](0x0)+'ms'+(_0x4bce01[_0xbc3a95(0x191)]?'\x20'+_0x4bce01['maxExtra']:'')+')':''));(_0xbb91ce||_0x412072>=_0x32a037)&&this['_log'](_0xbc3a95(0x171)+_0x592624+_0xbc3a95(0xd9)+_0x412072[_0xbc3a95(0x1a8)](0x0)+'ms\x20p99='+_0x538212[_0xbc3a95(0x1a8)](0x0)+_0xbc3a95(0xe4)+_0x49321d['toFixed'](0x0)+_0xbc3a95(0x2a6)+_0x4466f4[_0xbc3a95(0x1a8)](0x0)+'ms'+(_0x5c04b0[_0xbc3a95(0x125)]?_0xbc3a95(0x1d0)+_0x5c04b0[_0xbc3a95(0x2a7)]('\x20\x20'):''),{'feature':'loop-lag'});if(this[_0xbc3a95(0x1cf)])for(const _0x4af8d1 of this[_0xbc3a95(0x1cf)]){try{_0x4af8d1({'p99Ms':_0x538212,'maxMs':_0x412072,'meanMs':_0x49321d,'reportMs':_0x592624});}catch{}}}[_0x3ac040(0xe2)](){const _0x18ecc0=_0x3ac040;if(this[_0x18ecc0(0x2d4)])clearInterval(this[_0x18ecc0(0x2d4)]);if(this['_h'])this['_h'][_0x18ecc0(0x2e7)]();this[_0x18ecc0(0x2d4)]=null,this['_h']=null,this[_0x18ecc0(0xeb)]=![];}}const _0x1b0d25=new _0x48950f();if(_0x1b0d25[_0x3ac040(0xad)])_0x1b0d25[_0x3ac040(0x2a3)]();return okdbLoopMonitor={'LOOP':_0x1b0d25},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x290a81=require$$0$1,_0x15a939=require$$1;let _0x34525a,_0x4b5820,_0x512a8f,_0x91a08d,_0x45c3ba,_0x2c069b,_0x3c8364,_0x4596dc=![];const _0x44f88d=new Set();let _0x3485e0=null;const _0x59cc5e=new Map();function _0x26f4f0(){const _0x780e8b=_0x37d7;if(_0x34525a!==undefined)return _0x34525a;_0x34525a=process.env.OKDB_DIAG==='1';if(!_0x34525a)return![];_0x4b5820=process.env.OKDB_DIAG_STACK==='1',_0x91a08d=Math['max'](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x512a8f=new Array(_0x91a08d),_0x45c3ba=0x0,_0x2c069b=0x0,_0x3c8364=process.env.OKDB_DIAG_DIR||null;if(_0x3c8364)try{_0x290a81[_0x780e8b(0x1b9)](_0x3c8364,{'recursive':!![]});}catch{}return!![];}function _0x236cd8(){return _0x34525a===undefined?_0x26f4f0():_0x34525a;}function _0x18d13b(_0x51bbca,_0x52a244){const _0x423e58=_0x37d7;if(_0x34525a===undefined?!_0x26f4f0():!_0x34525a)return;let _0x49c8c3;if(_0x4b5820){const _0x1807eb=new Error()[_0x423e58(0x1f9)]||'';_0x49c8c3=_0x1807eb[_0x423e58(0x26a)]('\x0a')[_0x423e58(0x295)](0x3)[_0x423e58(0x2bf)](_0x5aec1c=>_0x5aec1c[_0x423e58(0x1d2)]())[_0x423e58(0x116)](Boolean)['slice'](0x0,0x8);}_0x512a8f[_0x45c3ba]={'seq':_0x2c069b++,'t':Date[_0x423e58(0x2b1)](),'env':_0x51bbca,'kind':_0x52a244||_0x423e58(0x14b),'stack':_0x49c8c3},_0x45c3ba=(_0x45c3ba+0x1)%_0x91a08d;}function _0x37bc6f(_0x12f473){const _0x20cef4=_0x37d7,_0x4a5bdb=[];for(let _0x264317=0x0;_0x264317<_0x91a08d;_0x264317++){const _0x3a9db7=_0x512a8f[(_0x45c3ba-0x1-_0x264317+_0x91a08d*0x2)%_0x91a08d];if(!_0x3a9db7)continue;_0x4a5bdb['push'](_0x3a9db7);if(_0x4a5bdb[_0x20cef4(0x125)]>=_0x12f473)break;}return _0x4a5bdb;}function _0x347449(_0x5c64da){const _0x3da9b4=_0x37d7;try{process['stderr'][_0x3da9b4(0x1ae)](_0x5c64da+'\x0a');}catch{}if(_0x3c8364)try{_0x290a81[_0x3da9b4(0x2e0)](_0x15a939[_0x3da9b4(0x2a7)](_0x3c8364,_0x3da9b4(0x281)+process['pid']+_0x3da9b4(0x1eb)),_0x5c64da+'\x0a');}catch{}}function _0x1d16d4(_0x19015b){const _0x4abda9=_0x37d7,_0x311525=_0x37bc6f(_0x19015b);if(!_0x311525[_0x4abda9(0x125)])return _0x4abda9(0x1e0);const _0x3bf61c=Date[_0x4abda9(0x2b1)]();return _0x311525[_0x4abda9(0x2bf)](_0x13e165=>{const _0x2fd598=_0x4abda9,_0x1d8393='\x20\x20#'+_0x13e165['seq']+'\x20-'+(_0x3bf61c-_0x13e165['t'])+_0x2fd598(0x1f1)+_0x13e165[_0x2fd598(0x17c)]+'\x20'+_0x13e165['kind'];return _0x13e165[_0x2fd598(0x1f9)]&&_0x13e165[_0x2fd598(0x1f9)][_0x2fd598(0x125)]?_0x1d8393+_0x2fd598(0xd1)+_0x13e165[_0x2fd598(0x1f9)][_0x2fd598(0x2a7)](_0x2fd598(0xd1)):_0x1d8393;})[_0x4abda9(0x2a7)]('\x0a');}function _0x4dfc6d(_0x11fb2e,_0x32b97d){const _0x2941ff=_0x37d7,_0x55c037=_0x2941ff(0x1f5)+_0x11fb2e+_0x2941ff(0x17b)+new Date()[_0x2941ff(0x259)]()+_0x2941ff(0x217)+process['pid']+_0x2941ff(0xd8),_0x2e6a85=[_0x55c037,_0x2941ff(0x1f3)+(_0x32b97d&&_0x32b97d[_0x2941ff(0x1f9)]?_0x32b97d[_0x2941ff(0x1f9)][_0x2941ff(0x26a)]('\x0a')[0x0]:_0x32b97d),_0x2941ff(0x28e)+(_0x4b5820?'':_0x2941ff(0x155))+':',_0x1d16d4(0x18),_0x2b6f56(),'='[_0x2941ff(0x250)](_0x55c037[_0x2941ff(0x125)]-0x1)];_0x347449(_0x2e6a85[_0x2941ff(0x2a7)]('\x0a'));}function _0x568771(_0x4fa9a2){const _0x2b1fc3=_0x37d7;if(!_0x236cd8())return;const _0x52d2b8=String(_0x4fa9a2&&_0x4fa9a2['message']||_0x4fa9a2||''),_0x1416a6=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x2b1fc3(0x263)](_0x52d2b8);_0x4dfc6d(_0x1416a6?'ORPHAN\x20(env-closed\x20write)':'uncaughtException',_0x4fa9a2);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x1416a6)return;try{console[_0x2b1fc3(0x1a6)](_0x4fa9a2&&_0x4fa9a2[_0x2b1fc3(0x1f9)]?_0x4fa9a2[_0x2b1fc3(0x1f9)]:_0x4fa9a2);}catch{}process['exit'](0x1);}function _0x1375f1(_0x101d25){const _0x91df99=_0x37d7;if(!_0x236cd8())return;const _0x3886c8=String(_0x101d25&&_0x101d25['message']||_0x101d25||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x91df99(0x263)](_0x3886c8)&&_0x4dfc6d(_0x91df99(0x28b),_0x101d25);}function _0x2b6f56(){const _0xccc60b=_0x37d7,_0x1ff535=[_0xccc60b(0x1e3)];let _0x5a089b=![];for(const _0x3bbe48 of _0x44f88d){const _0x18a448=_0x3bbe48&&_0x3bbe48[_0xccc60b(0x1a9)];if(!_0x18a448)continue;for(const [_0x2da527,_0x17c17a]of _0x18a448){const _0x2dea95=_0x17c17a&&_0x17c17a[_0xccc60b(0x19e)]&&_0x17c17a['_coordinator']['view'];if(!_0x2dea95)continue;let _0x468822,_0x39820a;try{_0x468822=Atomics[_0xccc60b(0xc6)](_0x2dea95,0x0),_0x39820a=Atomics['load'](_0x2dea95,0x1);}catch{continue;}if(_0x468822===0x0)continue;_0x5a089b=!![];const _0x285361=_0x468822>0x0?_0xccc60b(0xf3):'copy',_0x4743b8=Date[_0xccc60b(0x2b1)]()-Math['abs'](_0x468822)*0x3e8,_0x20013e=((()=>{const _0x971315=_0xccc60b;try{return _0x17c17a[_0x971315(0xd7)]&&_0x17c17a[_0x971315(0xd7)][_0x971315(0x25a)]?_0x17c17a[_0x971315(0xd7)][_0x971315(0x25a)]():null;}catch{return null;}})());_0x1ff535[_0xccc60b(0x2c5)](_0xccc60b(0x2ce)+_0x2da527+_0xccc60b(0x130)+_0x285361+_0xccc60b(0x27d)+_0x4743b8+'ms\x20activeWriters='+_0x39820a+(_0x20013e?_0xccc60b(0x1f7)+_0x20013e[_0xccc60b(0x18e)]+_0xccc60b(0x1bd)+_0x20013e[_0xccc60b(0x1b0)]+'\x20parkedNow='+_0x20013e[_0xccc60b(0x284)]+'}':''));}}if(!_0x5a089b)_0x1ff535[_0xccc60b(0x2c5)](_0xccc60b(0x210));return _0x1ff535[_0xccc60b(0x2a7)]('\x0a');}function _0x201455(){const _0x44d55c=_0x37d7;if(!_0x236cd8())return;const _0x406b82=Math[_0x44d55c(0x230)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x37fb4e=Date[_0x44d55c(0x2b1)]();for(const _0x486fc1 of _0x44f88d){const _0x180428=_0x486fc1&&_0x486fc1[_0x44d55c(0x1a9)];if(!_0x180428)continue;for(const [_0x1744ad,_0x42f865]of _0x180428){const _0x17865d=_0x42f865&&_0x42f865['_coordinator']&&_0x42f865['_coordinator'][_0x44d55c(0xc1)];if(!_0x17865d)continue;let _0x5f1312;try{_0x5f1312=Atomics[_0x44d55c(0xc6)](_0x17865d,0x0);}catch{continue;}const _0x4852d3=_0x486fc1[_0x44d55c(0x2df)]+'|'+_0x1744ad;if(_0x5f1312<=0x0){_0x59cc5e[_0x44d55c(0x12b)](_0x4852d3);continue;}const _0x321590=_0x37fb4e-_0x5f1312*0x3e8,_0x516967=_0x59cc5e[_0x44d55c(0x159)](_0x4852d3);if(_0x321590<_0x406b82)continue;if(_0x516967&&_0x37fb4e-_0x516967[_0x44d55c(0xa5)]<_0x406b82)continue;_0x59cc5e[_0x44d55c(0x19d)](_0x4852d3,{'firstTs':_0x516967?_0x516967['firstTs']:_0x5f1312,'dumpedAt':_0x37fb4e});const _0x7aed9e=_0x44d55c(0x172)+_0x321590+_0x44d55c(0x23f)+_0x1744ad+'\x20@\x20'+new Date()['toISOString']()+_0x44d55c(0x217)+process['pid']+'\x20===';_0x347449([_0x7aed9e,_0x2b6f56(),'='[_0x44d55c(0x250)](_0x7aed9e[_0x44d55c(0x125)]-0x1)][_0x44d55c(0x2a7)]('\x0a'));}}}function _0x45d948(){const _0xa623d7=_0x37d7;if(!_0x236cd8()||_0x4596dc)return;_0x4596dc=!![],process[_0xa623d7(0x28a)](_0xa623d7(0x157),_0x568771),process[_0xa623d7(0x28a)]('unhandledRejection',_0x1375f1);const _0x31c1e4=Math[_0xa623d7(0x230)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x3485e0=setInterval(_0x201455,_0x31c1e4);if(_0x3485e0['unref'])_0x3485e0['unref']();}function _0x3d23ea(_0x5bfed9){const _0x575ae9=_0x37d7;if(!_0x236cd8()||!_0x5bfed9)return;_0x44f88d[_0x575ae9(0x15c)](_0x5bfed9),_0x45d948();}function _0x5e9eff(_0x53d3f2){const _0x10bd28=_0x37d7;_0x44f88d[_0x10bd28(0x12b)](_0x53d3f2);}function _0x847627(){const _0x4b392d=_0x37d7;if(!_0x236cd8())return{'enabled':![],'hint':_0x4b392d(0x2b6)};return{'enabled':!![],'stackCapture':!!_0x4b5820,'recentWrites':_0x37bc6f(0x10),'drain':_0x2b6f56()};}return okdbDiag={'isEnabled':_0x236cd8,'recordWrite':_0x18d13b,'installDiag':_0x45d948,'registerOkdb':_0x3d23ea,'unregisterOkdb':_0x5e9eff,'snapshot':_0x847627},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x49276c=_0x498b9d;if(hasRequiredOkdbWriter)return okdbWriter[_0x49276c(0x10f)];hasRequiredOkdbWriter=0x1;const {performance:_0x2a3078}=require$$0$2,_0x38f899=requireOkdbDiag(),_0xd5b23a=process.env.OKDB_COMMIT_MODE===_0x49276c(0xd4);class _0x1a13d7{constructor(_0x4729b8){const _0x5ac97b=_0x49276c;this[_0x5ac97b(0x17c)]=_0x4729b8,this['_inflight']=new Set(),this[_0x5ac97b(0x1c4)]=new Map(),this[_0x5ac97b(0xab)]=0x0,this[_0x5ac97b(0x1a5)]=[],this[_0x5ac97b(0x1a0)]=[],this[_0x5ac97b(0x196)]=Math[_0x5ac97b(0x230)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x5ac97b(0x199)]=0x0,this['_bpWaiters']=[],this[_0x5ac97b(0xf1)]=0x0,this[_0x5ac97b(0x28f)]=null,this[_0x5ac97b(0xf6)]=0x0,this[_0x5ac97b(0x280)]=0x0,this[_0x5ac97b(0x13e)]=![];}async['transaction'](_0x19b81e,_0x1980d2,{admitted:admitted=![]}={}){const _0xe05936=_0x49276c;if(_0x38f899[_0xe05936(0x2e1)]())_0x38f899[_0xe05936(0x290)](this[_0xe05936(0x17c)]?.[_0xe05936(0xaf)],_0x1980d2);if(this['_closed']){const _0x2bb388=new Error(_0xe05936(0xc7));_0x2bb388[_0xe05936(0x2b0)]=_0xe05936(0x213);throw _0x2bb388;}if(this['_highWater']>0x0){let _0x398486=![];while(this[_0xe05936(0x199)]>=this[_0xe05936(0x196)]&&!this[_0xe05936(0x2be)]){!_0x398486&&(_0x398486=!![],this['_bpParkedTotal']++),await new Promise(_0x1d4350=>this[_0xe05936(0x1f2)][_0xe05936(0x2c5)](_0x1d4350));}if(this[_0xe05936(0x2be)]){const _0x48ae8f=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x48ae8f[_0xe05936(0x2b0)]='ENV_CLOSING_RETRY';throw _0x48ae8f;}}this[_0xe05936(0x199)]++;const _0x212e48=admitted?null:this[_0xe05936(0x17c)][_0xe05936(0x19e)];for(;;){while(this[_0xe05936(0x28f)])await this[_0xe05936(0x28f)];if(_0x212e48)try{await _0x212e48['beforeWrite']();}catch(_0x279791){this[_0xe05936(0x199)]--;if(this[_0xe05936(0x1f2)][_0xe05936(0x125)]&&this[_0xe05936(0x199)]<this[_0xe05936(0x196)])this[_0xe05936(0x1f2)]['shift']()();throw _0x279791;}if(!this[_0xe05936(0x28f)])break;if(_0x212e48)_0x212e48[_0xe05936(0x1d8)]();}if(this[_0xe05936(0x2be)]){if(_0x212e48)_0x212e48[_0xe05936(0x1d8)]();this[_0xe05936(0x199)]--;if(this[_0xe05936(0x1f2)][_0xe05936(0x125)]&&this['_outstanding']<this[_0xe05936(0x196)])this[_0xe05936(0x1f2)][_0xe05936(0x141)]()();const _0x24f25c=new Error(_0xe05936(0xc7));_0x24f25c[_0xe05936(0x2b0)]='ENV_CLOSING_RETRY';throw _0x24f25c;}const _0x46d938=_0x2a3078[_0xe05936(0x2b1)]();if(_0xd5b23a)try{const _0x5b7e4e=this[_0xe05936(0x17c)]['db']['transactionSync'](_0x19b81e);this[_0xe05936(0xab)]++;if(this['_durs'][_0xe05936(0x2c5)](_0x2a3078['now']()-_0x46d938)>0x100)this['_durs'][_0xe05936(0x141)]();if(this['_done'][_0xe05936(0x2c5)](_0x2a3078[_0xe05936(0x2b1)]())>0x800)this[_0xe05936(0x1a0)][_0xe05936(0x141)]();return _0x5b7e4e;}finally{this[_0xe05936(0x199)]--;if(this[_0xe05936(0x1f2)]['length']&&this[_0xe05936(0x199)]<this[_0xe05936(0x196)])this[_0xe05936(0x1f2)][_0xe05936(0x141)]()();if(_0x212e48)_0x212e48[_0xe05936(0x1d8)]();}let _0x39fef7=null;const _0x3e919e=()=>{const _0x139ded=_0xe05936,_0x40ad1a=_0x19b81e();if(_0x40ad1a&&typeof _0x40ad1a['then']===_0x139ded(0x194)&&!_0x39fef7){this[_0x139ded(0xf6)]++;let _0x52c989;const _0x2e3cc3=new Promise(_0x11034f=>_0x52c989=_0x11034f);this[_0x139ded(0x28f)]=_0x2e3cc3,_0x39fef7=()=>{const _0xcd269c=_0x139ded;if(this[_0xcd269c(0x28f)]===_0x2e3cc3)this['_held']=null;_0x52c989();};}return _0x40ad1a;};let _0x487bb7;try{_0x487bb7=this[_0xe05936(0x17c)]['db'][_0xe05936(0x20b)](_0x3e919e);}catch(_0x361377){_0x487bb7=Promise['reject'](_0x361377);}(!_0x487bb7||typeof _0x487bb7[_0xe05936(0x110)]!=='function')&&(this[_0xe05936(0x280)]++,!this['_nestedWarned']&&(this[_0xe05936(0x13e)]=!![],console[_0xe05936(0xb2)](_0xe05936(0x23e)+(this[_0xe05936(0x17c)]?.[_0xe05936(0xaf)]??'?')+_0xe05936(0x1d4))),_0x487bb7=Promise[_0xe05936(0x112)](_0x487bb7));const _0x197ede=()=>{if(_0x39fef7)_0x39fef7();};_0x487bb7['then'](_0x197ede,_0x197ede),this[_0xe05936(0x137)][_0xe05936(0x15c)](_0x487bb7),this['_enqueuedAt'][_0xe05936(0x19d)](_0x487bb7,_0x46d938);const _0x1a28c5=()=>{const _0x483c76=_0xe05936;this['_inflight'][_0x483c76(0x12b)](_0x487bb7),this['_enqueuedAt']['delete'](_0x487bb7),this[_0x483c76(0xab)]++,this[_0x483c76(0x199)]--;this[_0x483c76(0x1f2)][_0x483c76(0x125)]&&this[_0x483c76(0x199)]<this['_highWater']&&this['_bpWaiters'][_0x483c76(0x141)]()();if(this[_0x483c76(0x1a5)][_0x483c76(0x2c5)](_0x2a3078[_0x483c76(0x2b1)]()-_0x46d938)>0x100)this['_durs'][_0x483c76(0x141)]();if(this[_0x483c76(0x1a0)]['push'](_0x2a3078[_0x483c76(0x2b1)]())>0x800)this['_done'][_0x483c76(0x141)]();};_0x487bb7['then'](_0x1a28c5,_0x1a28c5);try{return await _0x487bb7;}finally{if(_0x212e48)_0x212e48[_0xe05936(0x1d8)]();}}[_0x49276c(0x25a)](){const _0x36e7ff=_0x49276c,_0x34f1d0=_0x2a3078[_0x36e7ff(0x2b1)]();let _0x2d8fef=0x0;for(const _0x14fe37 of this[_0x36e7ff(0x1c4)]['values']()){const _0x2c6777=_0x34f1d0-_0x14fe37;if(_0x2c6777>_0x2d8fef)_0x2d8fef=_0x2c6777;}let _0x5e595e=0x0;for(let _0x37f6dd=this['_done'][_0x36e7ff(0x125)]-0x1;_0x37f6dd>=0x0;_0x37f6dd--){if(_0x34f1d0-this['_done'][_0x37f6dd]>0x3e8)break;_0x5e595e++;}let _0x161dc1=0x0;if(this[_0x36e7ff(0x1a5)][_0x36e7ff(0x125)]){const _0x258de7=[...this[_0x36e7ff(0x1a5)]][_0x36e7ff(0x142)]((_0x16a8cd,_0xd0d42)=>_0x16a8cd-_0xd0d42);_0x161dc1=_0x258de7[Math[_0x36e7ff(0xdd)](_0x258de7['length']-0x1,Math[_0x36e7ff(0x149)](_0x258de7[_0x36e7ff(0x125)]*0.99))];}return{'depth':this[_0x36e7ff(0x137)][_0x36e7ff(0x296)],'oldestPendingMs':Math[_0x36e7ff(0x258)](_0x2d8fef),'committed':this[_0x36e7ff(0xab)],'commitsPerSec':_0x5e595e,'commitP99Ms':Math[_0x36e7ff(0x258)](_0x161dc1),'parkedNow':this[_0x36e7ff(0x1f2)][_0x36e7ff(0x125)],'parkedTotal':this['_bpParkedTotal'],'highWater':this[_0x36e7ff(0x196)]};}['inflightAgesMs'](){const _0x3c4497=_0x49276c,_0x2e570c=_0x2a3078[_0x3c4497(0x2b1)]();return[...this[_0x3c4497(0x1c4)][_0x3c4497(0x1ed)]()][_0x3c4497(0x2bf)](_0x250fe8=>Math[_0x3c4497(0x258)](_0x2e570c-_0x250fe8))[_0x3c4497(0x142)]((_0x2bd10b,_0x1dcef1)=>_0x1dcef1-_0x2bd10b);}[_0x49276c(0x2eb)](){const _0x29f4e0=_0x49276c;this['_closed']=!![];for(const _0x566ba0 of this[_0x29f4e0(0x1f2)][_0x29f4e0(0x240)](0x0))_0x566ba0();}async[_0x49276c(0xff)](){const _0x42f30f=_0x49276c;let _0x54ae91=0x0;while(this[_0x42f30f(0x137)]['size']&&_0x54ae91++<0x3e8){await Promise[_0x42f30f(0x11e)]([...this[_0x42f30f(0x137)]]);}}async['put'](_0x592007,_0x52997b,_0x4839d4,_0x46da4d){const _0x3403a9=_0x49276c;return this[_0x3403a9(0x214)](()=>{const _0x20e444=_0x3403a9;if(_0x46da4d===undefined)_0x592007[_0x20e444(0x1d7)](_0x52997b,_0x4839d4);else _0x592007['putSync'](_0x52997b,_0x4839d4,_0x46da4d);},_0x3403a9(0x129));}async['remove'](_0x14df0e,_0x1a6df3){const _0x4a2863=_0x49276c;return this[_0x4a2863(0x214)](()=>_0x14df0e[_0x4a2863(0x287)](_0x1a6df3),_0x4a2863(0x241));}}async function _0x4e7dcf(_0x4758e0,_0x6876aa){const _0x11e102=_0x49276c;if(_0x6876aa==null)_0x6876aa=Math[_0x11e102(0x230)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x437f32=_0x4758e0?.[_0x11e102(0x2d1)];if(!_0x437f32||typeof _0x437f32[_0x11e102(0x110)]!==_0x11e102(0x194))return;await Promise[_0x11e102(0x148)]([Promise[_0x11e102(0x112)](_0x437f32)['catch'](()=>{}),new Promise(_0x4e7e68=>{const _0x240c00=_0x11e102,_0x556076=setTimeout(_0x4e7e68,_0x6876aa);if(_0x556076[_0x240c00(0x27c)])_0x556076['unref']();})]);}catch{}}function _0xd93eea(_0x376ddd){const _0x376ebc=_0x49276c;if(_0xd5b23a)return Promise['resolve']();const _0x30b9ec=_0x376ddd?.[_0x376ebc(0x1f4)];return _0x30b9ec&&typeof _0x30b9ec['then']===_0x376ebc(0x194)?_0x30b9ec:Promise[_0x376ebc(0x112)]();}const _0xc9a661=Math[_0x49276c(0x230)](0x1,Math[_0x49276c(0x149)](Number(process.env.UV_THREADPOOL_SIZE))||0x4),_0x44eb6a=Math[_0x49276c(0x230)](0x1,_0xc9a661-0x2);let _0x5ce522=0x0;const _0x297872=[];async function _0x5dac10(_0x15ef9f){const _0xf8dcfa=_0x49276c;if(_0x5ce522<_0x44eb6a)_0x5ce522++;else await new Promise(_0x16cbec=>_0x297872[_0xf8dcfa(0x2c5)](_0x16cbec));try{return await _0x15ef9f();}finally{const _0x349d9e=_0x297872[_0xf8dcfa(0x141)]();if(_0x349d9e)_0x349d9e();else _0x5ce522--;}}return okdbWriter[_0x49276c(0x10f)]=_0x1a13d7,okdbWriter[_0x49276c(0x10f)][_0x49276c(0x2b7)]=_0x5dac10,okdbWriter['exports'][_0x49276c(0x124)]=_0x44eb6a,okdbWriter[_0x49276c(0x10f)][_0x49276c(0xdb)]=_0x4e7dcf,okdbWriter['exports'][_0x49276c(0x1f4)]=_0xd93eea,okdbWriter['exports']['SYNC_COMMITS']=_0xd5b23a,okdbWriter[_0x49276c(0x10f)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x24b4a4=_0x498b9d;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x10bce9=require$$0$3,{SYNC_COMMITS:_0xce6ceb}=requireOkdbWriter(),_0xc4152f=_0x24b4a4(0x2dc);class _0x3b0bc1{constructor(_0x50d7ab,_0x5c7673,_0x20afa7){const _0x70571d=_0x24b4a4;this[_0x70571d(0xe5)]=_0x50d7ab,this[_0x70571d(0x2e5)]=_0x5c7673,this[_0x70571d(0x1ea)]=_0x20afa7,this[_0x70571d(0x205)]=![],this[_0x70571d(0x1db)]=null,this[_0x70571d(0x29e)]=null;}['isHeld'](){const _0x395043=_0x24b4a4;if(this[_0x395043(0x205)])return![];try{const _0x3e42d6=this[_0x395043(0xe5)]['_db']()[_0x395043(0x159)](this['_key']);if(!_0x3e42d6||_0x3e42d6[_0x395043(0x1cd)]!==this['_acquiredAt'])return![];const _0x1853cc=_0x3e42d6['updatedAt']??_0x3e42d6[_0x395043(0x1cd)];if(_0x1853cc+_0x3e42d6[_0x395043(0x11f)]<Date['now']())return![];return!![];}catch{return!this[_0x395043(0x205)];}}['holder'](){const _0x53f545=_0x24b4a4;if(this[_0x53f545(0x205)])return null;try{return this[_0x53f545(0xe5)][_0x53f545(0x1b1)]()['get'](this['_key'])??null;}catch{return null;}}async[_0x24b4a4(0x1b5)](_0x22fdd3){const _0x4abdc5=_0x24b4a4;if(this[_0x4abdc5(0x205)])return;try{if(this[_0x4abdc5(0xe5)][_0x4abdc5(0x2be)]())return;const _0x3e3114=this[_0x4abdc5(0xe5)][_0x4abdc5(0x1b1)]()[_0x4abdc5(0x159)](this['_key']);if(!_0x3e3114||_0x3e3114[_0x4abdc5(0x1cd)]!==this[_0x4abdc5(0x1ea)])return;if(_0xce6ceb)this[_0x4abdc5(0xe5)]['_db']()['putSync'](this[_0x4abdc5(0x2e5)],{..._0x3e3114,'ttlMs':_0x3e3114[_0x4abdc5(0x11f)]+_0x22fdd3});else await this[_0x4abdc5(0xe5)]['_db']()[_0x4abdc5(0x244)](this[_0x4abdc5(0x2e5)],{..._0x3e3114,'ttlMs':_0x3e3114[_0x4abdc5(0x11f)]+_0x22fdd3});}catch{}}async['release'](){const _0x331b23=_0x24b4a4;if(this[_0x331b23(0x205)])return;if(this['_heartbeatInFlight'])try{await this[_0x331b23(0x29e)];}catch{}clearInterval(this['_heartbeatTimer']),this[_0x331b23(0x1db)]=null,this['_released']=!![];try{if(this[_0x331b23(0xe5)][_0x331b23(0x2be)]())return;const _0x1446f0=this[_0x331b23(0xe5)][_0x331b23(0x1b1)]()[_0x331b23(0x159)](this[_0x331b23(0x2e5)]);if(_0x1446f0&&_0x1446f0[_0x331b23(0x1cd)]===this[_0x331b23(0x1ea)]){if(_0xce6ceb)this[_0x331b23(0xe5)][_0x331b23(0x1b1)]()[_0x331b23(0x287)](this['_key']);else await this[_0x331b23(0xe5)][_0x331b23(0x1b1)]()[_0x331b23(0x2cc)](this[_0x331b23(0x2e5)]);}}catch{}}[_0x24b4a4(0x12f)](_0x5106c7,_0x2e3d94){const _0x2d021c=_0x24b4a4,_0x56e40f=_0x2e3d94??Math[_0x2d021c(0x149)](_0x5106c7/0x3);this[_0x2d021c(0x1db)]=setInterval(()=>{const _0x5ca5a1=_0x2d021c;if(this[_0x5ca5a1(0x205)])return;this[_0x5ca5a1(0x29e)]=((async()=>{const _0xd4a0a=_0x5ca5a1;try{if(this[_0xd4a0a(0xe5)][_0xd4a0a(0x2be)]())return;const _0x1147ef=this[_0xd4a0a(0xe5)]['_db']()['get'](this['_key']);if(!_0x1147ef||_0x1147ef[_0xd4a0a(0x1cd)]!==this[_0xd4a0a(0x1ea)]){this[_0xd4a0a(0x205)]=!![],clearInterval(this[_0xd4a0a(0x1db)]),this[_0xd4a0a(0x1db)]=null;return;}if(_0xce6ceb)this[_0xd4a0a(0xe5)][_0xd4a0a(0x1b1)]()[_0xd4a0a(0x1d7)](this[_0xd4a0a(0x2e5)],{..._0x1147ef,'updatedAt':Date[_0xd4a0a(0x2b1)]()});else await this['_lock'][_0xd4a0a(0x1b1)]()['put'](this[_0xd4a0a(0x2e5)],{..._0x1147ef,'updatedAt':Date[_0xd4a0a(0x2b1)]()});}catch{}this[_0xd4a0a(0x29e)]=null;})());},_0x56e40f);if(this[_0x2d021c(0x1db)][_0x2d021c(0x27c)])this[_0x2d021c(0x1db)][_0x2d021c(0x27c)]();}}class _0x363ba7{constructor(_0x323790,{namespace:_0x3a286a,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x22579c=_0x24b4a4;this[_0x22579c(0x28d)]=_0x323790,this[_0x22579c(0x2d3)]=_0x3a286a,this['ttlMs']=ttlMs,this[_0x22579c(0x2dd)]=heartbeatMs,this[_0x22579c(0x20f)]=null;}[_0x24b4a4(0x1b1)](){const _0x3c7e91=_0x24b4a4;return this[_0x3c7e91(0x2ba)](),(!this[_0x3c7e91(0x20f)]||this[_0x3c7e91(0x138)]!==this[_0x3c7e91(0x28d)])&&(this[_0x3c7e91(0x20f)]=this[_0x3c7e91(0x28d)][_0x3c7e91(0x15a)](_0xc4152f,{'dupSort':![]}),this[_0x3c7e91(0x138)]=this[_0x3c7e91(0x28d)]),this[_0x3c7e91(0x20f)];}['_wantDb'](){const _0x4b625a=_0x24b4a4;return this['_assertUsable'](),(!this[_0x4b625a(0x10e)]||this['_wantDbOf']!==this['_rawDb'])&&(this[_0x4b625a(0x10e)]=this[_0x4b625a(0x28d)][_0x4b625a(0x15a)](_0xc4152f+_0x4b625a(0x122),{'dupSort':![]}),this[_0x4b625a(0x2bd)]=this[_0x4b625a(0x28d)]),this[_0x4b625a(0x10e)];}['_closed'](){const _0x55671f=_0x24b4a4,_0x24eda0=this[_0x55671f(0x28d)]?.[_0x55671f(0x25a)];return _0x24eda0===_0x55671f(0x234)||_0x24eda0===_0x55671f(0x1de);}[_0x24b4a4(0x2ba)](){const _0x573618=_0x24b4a4;if(this[_0x573618(0x2be)]())throw new Error(_0x573618(0x29f));}[_0x24b4a4(0x2e5)](_0x5ac67d){const _0x34e536=_0x24b4a4;return this[_0x34e536(0x2d3)]+':'+_0x5ac67d;}[_0x24b4a4(0x229)](_0x497e8e){const _0x565a6c=_0x24b4a4;try{if(this[_0x565a6c(0x2be)]())return;_0xce6ceb?this[_0x565a6c(0x1c0)]()['putSync'](this[_0x565a6c(0x2e5)](_0x497e8e),Date['now']()):this[_0x565a6c(0x1c0)]()[_0x565a6c(0x244)](this[_0x565a6c(0x2e5)](_0x497e8e),Date[_0x565a6c(0x2b1)]())?.['catch']?.(()=>{});}catch{}}[_0x24b4a4(0x286)](_0x177eef,_0x78e6af=0x3e8){const _0x1aecfa=_0x24b4a4;try{const _0x393a78=this['_wantDb']()[_0x1aecfa(0x159)](this[_0x1aecfa(0x2e5)](_0x177eef));return typeof _0x393a78===_0x1aecfa(0x13b)&&Date[_0x1aecfa(0x2b1)]()-_0x393a78<_0x78e6af;}catch{return![];}}['_isStale'](_0x381ec9){const _0x19fffb=_0x24b4a4,_0x5557e9=_0x381ec9[_0x19fffb(0x291)]??_0x381ec9[_0x19fffb(0x1cd)];return _0x5557e9+_0x381ec9[_0x19fffb(0x11f)]<Date[_0x19fffb(0x2b1)]();}static[_0x24b4a4(0x140)](_0x1b11e4){const _0x1eb077=_0x24b4a4,_0x2b235b=_0x1b11e4?.[_0x1eb077(0x22f)];if(!_0x2b235b||typeof _0x2b235b['pid']!==_0x1eb077(0x13b))return![];if(_0x2b235b['hostname']!==_0x10bce9[_0x1eb077(0x1d3)]())return![];if(_0x2b235b[_0x1eb077(0x299)]===process[_0x1eb077(0x299)])return![];try{return process['kill'](_0x2b235b[_0x1eb077(0x299)],0x0),![];}catch(_0x2c485f){return _0x2c485f[_0x1eb077(0x2b0)]===_0x1eb077(0xd3);}}async['tryAcquire'](_0x13d3fc,_0x189f98={},_0x5a3b7d={}){const _0x1f3458=_0x24b4a4,_0x1ee715=this[_0x1f3458(0x2e5)](_0x13d3fc),_0x3e473b=_0x5a3b7d[_0x1f3458(0x11f)]??this['ttlMs'],_0x4f06f3=Date[_0x1f3458(0x2b1)](),_0x49da4f={'holder':{'pid':process[_0x1f3458(0x299)],'hostname':_0x10bce9['hostname'](),..._0x189f98},'acquiredAt':_0x4f06f3,'updatedAt':_0x4f06f3,'ttlMs':_0x3e473b};let _0x350a11=![],_0x272d1c=null;if(this['_closed']())return{'acquired':![],'handle':null,'current':null};try{const _0x2d4d73=()=>{const _0x4a267c=_0x1f3458,_0x35b7e2=this[_0x4a267c(0x1b1)]()[_0x4a267c(0x159)](_0x1ee715);if(_0x35b7e2&&!this[_0x4a267c(0x206)](_0x35b7e2)&&!_0x363ba7[_0x4a267c(0x140)](_0x35b7e2)){const _0x55468a=_0x189f98[_0x4a267c(0x114)]!=null&&_0x35b7e2['holder'][_0x4a267c(0x299)]===process['pid']&&_0x35b7e2[_0x4a267c(0x22f)][_0x4a267c(0x114)]===_0x189f98['processorId'];if(!_0x55468a){_0x350a11=![],_0x272d1c=_0x35b7e2;return;}_0x49da4f[_0x4a267c(0x1cd)]<=_0x35b7e2[_0x4a267c(0x1cd)]&&(_0x49da4f[_0x4a267c(0x1cd)]=_0x35b7e2[_0x4a267c(0x1cd)]+0x1,_0x49da4f['updatedAt']=_0x49da4f[_0x4a267c(0x1cd)]);}this[_0x4a267c(0x1b1)]()[_0x4a267c(0x244)](_0x1ee715,_0x49da4f),_0x350a11=!![],_0x272d1c=_0x49da4f;};if(_0xce6ceb)this['_db']()['transactionSync'](_0x2d4d73);else await this[_0x1f3458(0x1b1)]()['childTransaction'](_0x2d4d73);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x350a11)return{'acquired':![],'handle':null,'current':_0x272d1c};const _0x2ec5f2=new _0x3b0bc1(this,_0x1ee715,_0x49da4f['acquiredAt']);return _0x2ec5f2[_0x1f3458(0x12f)](_0x3e473b,this[_0x1f3458(0x2dd)]),{'acquired':!![],'handle':_0x2ec5f2,'current':_0x272d1c};}[_0x24b4a4(0xe3)](_0x152d28){try{return this['_db']()['get'](this['_key'](_0x152d28))??null;}catch{return null;}}[_0x24b4a4(0x126)](){const _0x3be5ef=_0x24b4a4,_0x17c2cb=this[_0x3be5ef(0x2d3)]+':',_0x383fa3=[];try{for(const {key:_0x50270d,value:_0x318df6}of this['_db']()[_0x3be5ef(0x168)]({'start':_0x17c2cb,'end':_0x17c2cb+'\xff'})){typeof _0x50270d===_0x3be5ef(0x150)&&_0x50270d[_0x3be5ef(0x2a4)](_0x17c2cb)&&_0x383fa3[_0x3be5ef(0x2c5)]({'id':_0x50270d[_0x3be5ef(0x295)](_0x17c2cb['length']),'entry':_0x318df6});}}catch{}return _0x383fa3;}static[_0x24b4a4(0x1c7)](_0x207fb5){const _0x2766f7=_0x24b4a4,_0x5464ea=[];try{const _0x357790=_0x207fb5[_0x2766f7(0x15a)](_0xc4152f,{'dupSort':![]});for(const {key:_0x313d4d,value:_0x844c4c}of _0x357790['getRange']({})){if(typeof _0x313d4d!==_0x2766f7(0x150))continue;const _0x4aaaa4=_0x313d4d[_0x2766f7(0x1e8)](':');if(_0x4aaaa4<0x1)continue;_0x5464ea['push']({'namespace':_0x313d4d['slice'](0x0,_0x4aaaa4),'id':_0x313d4d[_0x2766f7(0x295)](_0x4aaaa4+0x1),'entry':_0x844c4c});}}catch{}return _0x5464ea;}}return okdbLock={'OKDBLock':_0x363ba7},okdbLock;}var version='2.6.0',require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x174019=_0x498b9d;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x2af0f3=require$$0$3,_0x4002d1=require$$1$1,_0x399681=require$$2,{LOOP:_0x7aa652}=requireOkdbLoopMonitor(),{OKDBLock:_0x351786}=requireOkdbLock(),{SYNC_COMMITS:_0x3f4025}=requireOkdbWriter(),_0x25f3f7=_0x174019(0x265),_0x18c686=_0x174019(0x2c0),_0x40cc73=_0x174019(0x2ae),_0x418851='~processes:cmd',_0x1f1286=(_0x494a82,_0x777aeb)=>_0x494a82+':'+_0x777aeb,_0x1e4841=(_0x8bcda2,_0x22bf01)=>_0x8bcda2+'::'+_0x22bf01,_0x239f10=(_0x324588,_0x1f85cb)=>_0x324588+'/'+_0x1f85cb,_0x45cb85=(_0x17f881,_0x555a08)=>_0x17f881+'#'+_0x555a08,_0x22ade0=_0x517459=>{const _0x58ef6f=_0x174019;if(_0x517459?.[_0x58ef6f(0x249)])return _0x517459[_0x58ef6f(0x249)];const _0xf0ba5=_0x517459?.[_0x58ef6f(0x274)];return typeof _0xf0ba5==='string'&&_0xf0ba5[_0x58ef6f(0x2e9)]('#')?_0xf0ba5[_0x58ef6f(0x295)](0x0,_0xf0ba5[_0x58ef6f(0x1e8)]('#')):_0xf0ba5;},_0xe3bd4=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x54339b=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x3f3740=_0xe3bd4*0x3,_0x4e045e=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x174019(0x230)](0x927c0,_0x3f3740*0x14),_0x871f9c=[_0x174019(0x173),'processor:ready',_0x174019(0x154),_0x174019(0x151),_0x174019(0x26e),'processor:resumed'];let _0x40eca2=null;function _0x3469f4(){const _0x1ca498=_0x174019;if(_0x40eca2==null)_0x40eca2=Math[_0x1ca498(0x258)]((Date[_0x1ca498(0x2b1)]()-process[_0x1ca498(0x1a1)]()*0x3e8)/0x3e8)*0x3e8;return _0x40eca2;}function _0x268e76(_0x318094){const _0x57ac76=_0x174019;if(process.env.OKDB_PROCESS_KILL===_0x57ac76(0x232))return![];if(_0x318094?.[_0x57ac76(0x1fa)]?.['processes']&&typeof _0x318094[_0x57ac76(0x1fa)][_0x57ac76(0xc5)]==='object'&&_0x318094[_0x57ac76(0x1fa)]['processes'][_0x57ac76(0x195)]===![])return![];return!![];}function _0xc288a9(_0x2a0157,_0x4c74f0){const _0x5bf558=_0x174019,_0x12f9a7=!!_0x4c74f0?.[_0x5bf558(0x27b)];switch(_0x2a0157){case _0x5bf558(0xcc):return{'controllable':_0x12f9a7,'decommissionable':![],'killable':!![],'killConfirm':'cluster-wide'};case _0x5bf558(0x108):case'standalone':return{'controllable':_0x12f9a7,'decommissionable':![],'killable':!![],'killConfirm':_0x5bf558(0xc2)};case _0x5bf558(0x102):return{'controllable':![],'decommissionable':![],'killable':![]};case'http-server':case _0x5bf558(0x260):case'fn-runner':case _0x5bf558(0x2ca):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x5bf558(0xe7)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x3ad314{constructor(_0x4445de){const _0x10839c=_0x174019;this[_0x10839c(0x24e)]=_0x4445de,this[_0x10839c(0xe0)]=null,this[_0x10839c(0x115)]=null,this[_0x10839c(0x225)]=new Map(),this[_0x10839c(0x197)]=null,this[_0x10839c(0x183)]=![],this[_0x10839c(0x21b)]=![],this[_0x10839c(0x11c)]=_0x3469f4(),this[_0x10839c(0xdc)]=_0x1f1286(process[_0x10839c(0x299)],this[_0x10839c(0x11c)]),this[_0x10839c(0x1bf)]=_0x399681[_0x10839c(0xbc)]()[_0x10839c(0x295)](0x0,0x8),this['_rowKey']=_0x45cb85(this[_0x10839c(0xdc)],this[_0x10839c(0x1bf)]),this[_0x10839c(0x2af)]=Date['now'](),this['_kind']=null,this[_0x10839c(0x179)]=null,this[_0x10839c(0x12e)]=null,this['_hbTimer']=null,this['_onProcEvent']=null,this[_0x10839c(0x233)]=null,this['_lastPublishAt']=0x0,this[_0x10839c(0x2c6)]={},this[_0x10839c(0x1e9)]=new Map(),this[_0x10839c(0x19f)]=process[_0x10839c(0x17a)](),this[_0x10839c(0x1cb)]=Date[_0x10839c(0x2b1)](),this['_lastCpuPct']=0x0,this[_0x10839c(0x276)]=new Map();}get[_0x174019(0x1c1)](){const _0x407cd1=_0x174019;return this[_0x407cd1(0xdc)];}get[_0x174019(0x1ba)](){const _0xeae055=_0x174019;return this[_0xeae055(0x19c)];}[_0x174019(0x277)](_0x380e2a,_0x1ba48c){const _0x10723a=_0x174019,_0x4d797b=_0xc288a9(_0x380e2a,_0x1ba48c);if(_0x4d797b[_0x10723a(0xc0)]&&!_0x268e76(this['okdb']))return{..._0x4d797b,'killable':![],'killConfirm':undefined};return _0x4d797b;}[_0x174019(0x226)](){const _0x24aa26=_0x174019;return!!this[_0x24aa26(0xe0)];}[_0x174019(0x1b6)](_0x43b6e4){const _0x15414b=_0x174019;Object['assign'](this[_0x15414b(0x2c6)],_0x43b6e4||{});}[_0x174019(0x15e)](_0x23e1a4){const _0x13da2c=_0x174019;if(_0x23e1a4)this[_0x13da2c(0x12e)]=_0x23e1a4;}[_0x174019(0x169)](_0x147aa4={}){const _0x87136c=_0x174019;return this[_0x87136c(0x24e)][_0x87136c(0x188)](_0x147aa4);}[_0x174019(0x16e)](){const _0x2c0785=_0x174019,_0x5c8590={};let _0x33f215=0x0,_0x40fdb3=0x0;const _0x11525f=new Set();for(const _0xd0a04a of this[_0x2c0785(0xb6)]()){_0x40fdb3++;const _0x4234c0=_0xd0a04a['processing'];if(!_0x4234c0)continue;if(_0x4234c0['participate'])_0x33f215++;for(const _0x5d98c8 of _0x4234c0[_0x2c0785(0x27b)]||[]){if(![_0x2c0785(0x22e),'fanout'][_0x2c0785(0x2e9)](_0x5d98c8[_0x2c0785(0xde)]))continue;(_0x5d98c8[_0x2c0785(0x1aa)]===_0x2c0785(0x1a7)||_0x5d98c8['state']===_0x2c0785(0x224))&&_0x5d98c8[_0x2c0785(0x2bc)]&&_0x11525f[_0x2c0785(0x15c)]((_0x5d98c8[_0x2c0785(0x17c)]||_0x2c0785(0x1fe))+':'+_0x5d98c8[_0x2c0785(0x2bc)]);const _0x2b7e69=_0x5d98c8[_0x2c0785(0x17c)]||_0x2c0785(0x1fe);(_0x5c8590[_0x2b7e69]||=[])[_0x2c0785(0x2c5)]({..._0x5d98c8,'env':_0x2b7e69,'owner':{'pid':_0xd0a04a['pid']??null,'kind':_0xd0a04a['kind']??null}});}}for(const [_0x256999,_0x4fb515]of Object[_0x2c0785(0x27f)](_0x5c8590)){for(const _0x48cc5d of _0x4fb515){if(_0x48cc5d[_0x2c0785(0xde)]===_0x2c0785(0x22e)&&!_0x48cc5d[_0x2c0785(0x105)]){const _0x5a0869=_0x256999+':'+(_0x48cc5d[_0x2c0785(0x2bc)]??'');if(!_0x11525f[_0x2c0785(0xc4)](_0x5a0869))_0x48cc5d['unclaimed']=!![];}}}return{'envs':_0x5c8590,'policy':null,'participation':{'participating':_0x33f215,'total':_0x40fdb3},'source':_0x2c0785(0x1d6)};}[_0x174019(0x128)](){const _0x3dbaf8=_0x174019,_0x1aaa57=_0x42107c=>{const _0xd3e3d7=_0x37d7;if(_0x42107c[_0xd3e3d7(0x1aa)]==='online'||_0x42107c[_0xd3e3d7(0x1aa)]==='building'||_0x42107c['state']===_0xd3e3d7(0x1a6))return 0x3;if(_0x42107c['claimGated'])return 0x1;return 0x2;},_0x43b329=new Map();for(const _0x9b4be3 of this[_0x3dbaf8(0xb6)]()){for(const _0x22160a of _0x9b4be3[_0x3dbaf8(0x1da)]?.[_0x3dbaf8(0x27b)]||[]){const _0x4dade6={..._0x22160a,'owner':{'pid':_0x9b4be3[_0x3dbaf8(0x299)]??null,'kind':_0x9b4be3[_0x3dbaf8(0x21e)]??null,'host':_0x9b4be3[_0x3dbaf8(0x1b8)]??null}},_0x467de9=_0x22160a[_0x3dbaf8(0xde)]===_0x3dbaf8(0x22e)?_0x3dbaf8(0xfd)+(_0x22160a['env']??'')+'::'+(_0x22160a[_0x3dbaf8(0x2bc)]??_0x22160a['type']??_0x22160a['id']):_0x3dbaf8(0x257)+(_0x9b4be3[_0x3dbaf8(0x274)]??_0x9b4be3[_0x3dbaf8(0x249)]??'')+'::'+(_0x22160a[_0x3dbaf8(0x17c)]??'')+'::'+_0x22160a['id'],_0x32af31=_0x43b329[_0x3dbaf8(0x159)](_0x467de9);if(!_0x32af31||_0x1aaa57(_0x4dade6)>_0x1aaa57(_0x32af31))_0x43b329[_0x3dbaf8(0x19d)](_0x467de9,_0x4dade6);}}return[..._0x43b329['values']()];}[_0x174019(0x1c5)](){const _0xd299a=_0x174019,_0x5d6555=Date[_0xd299a(0x2b1)](),_0x535fee=this['listNodes'](),_0x4ad9ca=_0x4b03b3=>Math[_0xd299a(0x230)](0x0,Math[_0xd299a(0x258)]((_0x5d6555-(_0x4b03b3['startedAt']||_0x5d6555))/0x3e8)),_0x270d0b=_0x535fee['find'](_0x548d54=>_0x548d54['kind']===_0xd299a(0xcc)),_0x746c6a=_0x535fee['filter'](_0x34d1e8=>_0x34d1e8[_0xd299a(0x21e)]===_0xd299a(0x268));if(_0x270d0b||_0x746c6a[_0xd299a(0x125)])return{'primary':_0x270d0b?{'pid':_0x270d0b[_0xd299a(0x299)],'uptime':_0x4ad9ca(_0x270d0b)}:null,'workers':_0x746c6a[_0xd299a(0x2bf)](_0x434583=>({'pid':_0x434583[_0xd299a(0x299)],'uptime':_0x4ad9ca(_0x434583)})),'workersConfigured':_0x270d0b?.[_0xd299a(0x2bb)]?.[_0xd299a(0x133)]??_0x746c6a[_0xd299a(0x125)],'mode':_0xd299a(0x18f)};const _0x579a57=_0x535fee[_0xd299a(0x2d7)](_0x2affe3=>_0x2affe3[_0xd299a(0x21e)]===_0xd299a(0x108)||_0x2affe3[_0xd299a(0x21e)]==='standalone'||_0x2affe3[_0xd299a(0x21e)]==='embedded'),_0x481b40=_0x579a57?{'pid':_0x579a57[_0xd299a(0x299)],'uptime':_0x4ad9ca(_0x579a57)}:{'pid':process['pid'],'uptime':Math[_0xd299a(0x230)](0x0,Math['round'](process['uptime']()))};return{'primary':_0x481b40,'workers':[_0x481b40],'workersConfigured':0x1,'mode':'single'};}[_0x174019(0xa4)](){const _0x4183fa=_0x174019;return this[_0x4183fa(0x145)]();}[_0x174019(0xf0)](){const _0x2a2d9f=_0x174019,_0x21fd5f=new Map();for(const _0x9b57bb of this[_0x2a2d9f(0x145)]())_0x21fd5f['set'](_0x9b57bb[_0x2a2d9f(0x249)],{..._0x9b57bb,'children':[]});const _0x150f48=[];for(const _0x2fb0bc of _0x21fd5f[_0x2a2d9f(0x1ed)]()){const _0x253e22=_0x2fb0bc[_0x2a2d9f(0x221)]?_0x21fd5f[_0x2a2d9f(0x159)](_0x2fb0bc[_0x2a2d9f(0x221)]):null;if(_0x253e22&&_0x253e22!==_0x2fb0bc)_0x253e22[_0x2a2d9f(0x2b8)][_0x2a2d9f(0x2c5)](_0x2fb0bc);else _0x150f48['push'](_0x2fb0bc);}const _0xa30b5f=(_0x4f583b,_0x1e0417)=>_0x4f583b['kind']===_0x1e0417[_0x2a2d9f(0x21e)]?(_0x4f583b[_0x2a2d9f(0x299)]||0x0)-(_0x1e0417[_0x2a2d9f(0x299)]||0x0):(_0x4f583b['kind']??'')<(_0x1e0417['kind']??'')?-0x1:0x1,_0x14f424=_0x5b7e46=>{const _0xea7391=_0x2a2d9f;_0x5b7e46[_0xea7391(0x142)](_0xa30b5f);for(const _0x2a5291 of _0x5b7e46)if(_0x2a5291[_0xea7391(0x2b8)][_0xea7391(0x125)])_0x14f424(_0x2a5291['children']);};return _0x14f424(_0x150f48),_0x150f48;}[_0x174019(0x2b2)](_0x2b5b70){const _0x4d9427=_0x174019;return this['_groupByProcess']()[_0x4d9427(0x2d7)](_0x232c27=>_0x232c27[_0x4d9427(0x249)]===_0x2b5b70)??null;}[_0x174019(0x145)](_0x8449de=Date[_0x174019(0x2b1)]()){const _0x38e5b9=_0x174019,_0x4f1f9c=new Map();for(const _0x55e503 of this[_0x38e5b9(0xb6)]()){const _0x362588=_0x22ade0(_0x55e503);let _0x150593=_0x4f1f9c['get'](_0x362588);!_0x150593&&(_0x150593={'processKey':_0x362588,'nodeKey':_0x362588,'pid':_0x55e503[_0x38e5b9(0x299)],'ppid':_0x55e503[_0x38e5b9(0x2cf)]??null,'host':_0x55e503['host']??null,'kind':_0x55e503[_0x38e5b9(0x21e)],'role':null,'supervisorKey':_0x55e503['supervisorKey']??null,'slot':_0x55e503[_0x38e5b9(0x193)]??null,'slotKey':_0x55e503['slotKey']??null,'caps':_0x55e503[_0x38e5b9(0x1ef)]??null,'lifecycle':_0x55e503['lifecycle']??null,'uptime':Math[_0x38e5b9(0x230)](0x0,Math[_0x38e5b9(0x258)]((_0x8449de-(_0x55e503['startedAt']||_0x8449de))/0x3e8)),'startedAt':_0x55e503[_0x38e5b9(0x23d)]??null,'meta':_0x55e503['meta']??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x4f1f9c[_0x38e5b9(0x19d)](_0x362588,_0x150593));_0x150593[_0x38e5b9(0x298)][_0x38e5b9(0x2c5)]({'instanceId':_0x55e503[_0x38e5b9(0xb7)]??null,'role':_0x55e503[_0x38e5b9(0x21a)]??null,'listenAddr':_0x55e503[_0x38e5b9(0x2b3)]??null,'lifecycle':_0x55e503['lifecycle']??null,'processing':_0x55e503['processing']??null});if(!_0x150593[_0x38e5b9(0x21a)]&&_0x55e503['role'])_0x150593[_0x38e5b9(0x21a)]=_0x55e503[_0x38e5b9(0x21a)];if(!_0x150593[_0x38e5b9(0x2b3)]&&_0x55e503[_0x38e5b9(0x2b3)])_0x150593[_0x38e5b9(0x2b3)]=_0x55e503['listenAddr'];if(!_0x150593['processing']&&_0x55e503['processing'])_0x150593['processing']=_0x55e503[_0x38e5b9(0x1da)];if(!_0x150593[_0x38e5b9(0xe8)]&&_0x55e503[_0x38e5b9(0xe8)])_0x150593[_0x38e5b9(0xe8)]=_0x55e503[_0x38e5b9(0xe8)];if(!_0x150593[_0x38e5b9(0xda)]&&_0x55e503[_0x38e5b9(0xda)])_0x150593[_0x38e5b9(0xda)]=_0x55e503[_0x38e5b9(0xda)];if(_0x150593[_0x38e5b9(0x1ef)]==null&&_0x55e503[_0x38e5b9(0x1ef)])_0x150593[_0x38e5b9(0x1ef)]=_0x55e503['caps'];if(_0x55e503['stats']&&(!_0x150593[_0x38e5b9(0x254)]||(_0x55e503['stats']['at']??0x0)>(_0x150593[_0x38e5b9(0x254)]['at']??0x0)))_0x150593[_0x38e5b9(0x254)]=_0x55e503['stats'];}return[..._0x4f1f9c[_0x38e5b9(0x1ed)]()];}[_0x174019(0x24b)](){const _0xd4c4ef=_0x174019,_0x24763e=[],_0x4471c5={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x56b642 of this[_0xd4c4ef(0x145)]()){_0x24763e['push']({'processKey':_0x56b642['processKey'],'kind':_0x56b642[_0xd4c4ef(0x21e)],'pid':_0x56b642['pid'],'supervisorKey':_0x56b642['supervisorKey'],'meta':_0x56b642[_0xd4c4ef(0x2bb)]??null,'uptime':_0x56b642['uptime'],'stats':_0x56b642[_0xd4c4ef(0x254)]??null}),_0x4471c5['processes']++;if(_0x56b642[_0xd4c4ef(0x254)]){_0x4471c5[_0xd4c4ef(0x256)]+=_0x56b642['stats'][_0xd4c4ef(0x256)]||0x0,_0x4471c5[_0xd4c4ef(0x26d)]+=(_0x56b642[_0xd4c4ef(0x254)][_0xd4c4ef(0x26d)]||0x0)+(_0x56b642[_0xd4c4ef(0x254)][_0xd4c4ef(0x12a)]?.['heapUsed']||0x0);const _0x2abb8d=_0x56b642[_0xd4c4ef(0x254)][_0xd4c4ef(0x12a)];_0x2abb8d&&(_0x4471c5[_0xd4c4ef(0x12a)]['count']+=_0x2abb8d['count']||0x0,_0x4471c5[_0xd4c4ef(0x12a)]['sandbox']+=_0x2abb8d[_0xd4c4ef(0x1ad)]||0x0,_0x4471c5['threads']['busy']+=_0x2abb8d[_0xd4c4ef(0x167)]||0x0);}}return{'totals':_0x4471c5,'nodes':_0x24763e};}async['open']({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x3036c5=_0x174019;this[_0x3036c5(0x183)]=this[_0x3036c5(0x183)]||!!writer,this['_isReader']=this[_0x3036c5(0x21b)]||!!reader,this[_0x3036c5(0x14d)]=kind||this[_0x3036c5(0x14d)]||(_0x4002d1[_0x3036c5(0x13f)]?_0x3036c5(0x268):'cli'),this[_0x3036c5(0x179)]=supervisorKey??this[_0x3036c5(0x179)],this['_listenAddr']=listenAddr??this[_0x3036c5(0x12e)],this[_0x3036c5(0x162)](),await this['_migrateVocab']();if(!writer&&!reader)return null;if(!this[_0x3036c5(0xe0)]){const _0x3323c1=await this[_0x3036c5(0x24e)]['createEnvironment'](_0x25f3f7,{'sync':![],'durability':'fast'});await _0x3323c1[_0x3036c5(0x121)](_0x18c686),this[_0x3036c5(0xe0)]=_0x3323c1;}return this[_0x3036c5(0xe0)];}[_0x174019(0x146)](){const _0x452d6e=_0x174019;return this[_0x452d6e(0x117)]!==this[_0x452d6e(0xe0)]&&(this[_0x452d6e(0x117)]=this[_0x452d6e(0xe0)],this[_0x452d6e(0x16d)]=this[_0x452d6e(0xe0)]['_getType'](_0x18c686)[_0x452d6e(0x2a9)]),this[_0x452d6e(0x16d)];}[_0x174019(0x285)](_0x1746a4){const _0x2c552d=_0x174019;if(_0x3f4025)return this[_0x2c552d(0x146)]()['putSync'](_0x1746a4['nodeKey'],_0x1746a4,0x1);const _0x2d0569=this[_0x2c552d(0x146)]()[_0x2c552d(0x244)](_0x1746a4[_0x2c552d(0x274)],_0x1746a4,0x1);if(_0x2d0569&&typeof _0x2d0569[_0x2c552d(0x110)]===_0x2c552d(0x194))_0x2d0569['then'](undefined,()=>{});return _0x2d0569;}[_0x174019(0x2e2)](_0x488988){const _0x1beb2d=_0x174019;return this[_0x1beb2d(0x146)]()['putSync'](_0x488988[_0x1beb2d(0x274)],_0x488988,0x1);}[_0x174019(0x1e2)](_0x320416){const _0x38080e=_0x174019;if(_0x3f4025)try{return this['_nodeDb']()['removeSync'](_0x320416);}catch{return![];}const _0x41e7f0=this['_nodeDb']()[_0x38080e(0x2cc)](_0x320416);if(_0x41e7f0&&typeof _0x41e7f0[_0x38080e(0x110)]==='function')_0x41e7f0[_0x38080e(0x110)](undefined,()=>{});return _0x41e7f0;}async[_0x174019(0x19a)](_0x2694d5){const _0x20ed7e=_0x174019;if(!this[_0x20ed7e(0xe0)]||!this[_0x20ed7e(0x183)]||!_0x2694d5?.['nodeKey'])return;return this['_putRowAsync'](_0x2694d5);}async[_0x174019(0x23c)](_0x1ef996){const _0x5a7e98=_0x174019;if(!this[_0x5a7e98(0xe0)]||!this[_0x5a7e98(0x183)]||!_0x1ef996)return;const _0x3900e9=_0x1ef996[_0x5a7e98(0x2e9)]('#'),_0x62ce12=[];for(const {key:_0x2f98ca}of this['_statusEnv'][_0x5a7e98(0x168)](_0x18c686)){if(_0x2f98ca===_0x1ef996||!_0x3900e9&&typeof _0x2f98ca===_0x5a7e98(0x150)&&_0x2f98ca[_0x5a7e98(0x2a4)](_0x1ef996+'#'))_0x62ce12[_0x5a7e98(0x2c5)](_0x2f98ca);}for(const _0x3d6ca7 of _0x62ce12){try{this[_0x5a7e98(0x146)]()[_0x5a7e98(0x287)](_0x3d6ca7);}catch{}}}['_nodeDead'](_0x554acb){const _0x5d8d1c=_0x174019;if(typeof _0x554acb?.['pid']!==_0x5d8d1c(0x13b))return![];if(_0x554acb[_0x5d8d1c(0x1b8)]!==_0x2af0f3[_0x5d8d1c(0x1d3)]())return![];if(_0x554acb['pid']===process['pid'])return![];if(_0x554acb['expiresAt']!=null&&_0x554acb['expiresAt']<Date[_0x5d8d1c(0x2b1)]()-_0x4e045e)return!![];try{return process[_0x5d8d1c(0x195)](_0x554acb[_0x5d8d1c(0x299)],0x0),![];}catch(_0x7d4dd9){return _0x7d4dd9[_0x5d8d1c(0x2b0)]===_0x5d8d1c(0xd3);}}[_0x174019(0xb6)](){const _0x2f4349=_0x174019;if(!this[_0x2f4349(0xe0)])return[];try{this[_0x2f4349(0xe0)]['db']?.[_0x2f4349(0x209)]?.();}catch{}const _0x153874=Date[_0x2f4349(0x2b1)](),_0x1af445=_0x2af0f3['hostname'](),_0x3e784c=[];for(const {value:_0x38ab85}of this[_0x2f4349(0xe0)][_0x2f4349(0x168)](_0x18c686)){if(!_0x38ab85)continue;let _0x15727e=null;_0x38ab85['host']===_0x1af445&&typeof _0x38ab85[_0x2f4349(0x299)]===_0x2f4349(0x13b)&&(_0x15727e=!this[_0x2f4349(0x131)](_0x38ab85));if(_0x15727e===![])continue;const _0x485c1a=_0x38ab85['expiresAt']==null||_0x38ab85['expiresAt']>=_0x153874;if(_0x15727e===!![]||_0x485c1a)_0x3e784c['push'](_0x38ab85);}return _0x3e784c;}async[_0x174019(0x1b3)](_0x5bd53f=0x0){const _0x1ed716=_0x174019;if(!this[_0x1ed716(0xe0)]||!this[_0x1ed716(0x183)])return;const _0x19e991=Date[_0x1ed716(0x2b1)]()-_0x5bd53f,_0x2e72f4=new Set(),_0x544448=[],_0x33144f=_0x2af0f3[_0x1ed716(0x1d3)](),_0xa8c3b0=require$$6[_0x1ed716(0x2d2)];for(const {key:_0x4633a8,value:_0x2bcb45}of this['_statusEnv'][_0x1ed716(0x168)](_0x18c686)){if(!_0x2bcb45)continue;const _0x1f6387=_0x2bcb45[_0x1ed716(0x1b8)]===_0x33144f&&typeof _0x2bcb45[_0x1ed716(0x299)]==='number',_0x712786=_0x1f6387?this[_0x1ed716(0x131)](_0x2bcb45):_0x2bcb45[_0x1ed716(0x106)]!=null&&_0x2bcb45[_0x1ed716(0x106)]<_0x19e991;if(_0x712786)_0x544448[_0x1ed716(0x2c5)](_0x4633a8);else{_0x2e72f4[_0x1ed716(0x15c)](_0x22ade0(_0x2bcb45)??_0x4633a8);if(_0x2bcb45[_0x1ed716(0x2d2)]&&_0x2bcb45[_0x1ed716(0x2d2)]!==_0xa8c3b0){if(!this['_versionSkewWarned'])this[_0x1ed716(0x113)]=new Set();!this[_0x1ed716(0x113)][_0x1ed716(0xc4)](_0x2bcb45[_0x1ed716(0x2d2)])&&(this[_0x1ed716(0x113)][_0x1ed716(0x15c)](_0x2bcb45[_0x1ed716(0x2d2)]),this[_0x1ed716(0x24e)][_0x1ed716(0xbb)]?.['warn']?.(_0x1ed716(0x10c)+(_0x2bcb45[_0x1ed716(0x299)]??'?')+_0x1ed716(0x111)+_0x2bcb45['version']+_0x1ed716(0xf9)+_0xa8c3b0+_0x1ed716(0x1a3)+'mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.',{'feature':'migrations'}));}}}for(const _0x2105dd of _0x544448)this['_removeRowAsync'](_0x2105dd);if(this[_0x1ed716(0x162)]()){const _0x19a859=[];for(const {key:_0x27e308}of this[_0x1ed716(0x180)](_0x1ed716(0x2c0))){if(!_0x2e72f4[_0x1ed716(0xc4)](_0x27e308)){if(_0x3f4025)try{this['_desired']['removeSync']('node/'+_0x27e308);}catch{}else _0x19a859[_0x1ed716(0x2c5)](this[_0x1ed716(0x115)][_0x1ed716(0x2cc)]('node/'+_0x27e308));}}if(_0x19a859['length'])await Promise[_0x1ed716(0x11e)](_0x19a859);}}[_0x174019(0x283)](_0x3d625e=null){const _0x2ed103=_0x174019;if(this[_0x2ed103(0xf5)])return;if(!this['_isWriter']||!this[_0x2ed103(0xe0)]){this['okdb']?.[_0x2ed103(0xbb)]?.[_0x2ed103(0xb2)]?.(_0x2ed103(0xef)+this[_0x2ed103(0x183)]+_0x2ed103(0x26c)+!!this[_0x2ed103(0xe0)]+_0x2ed103(0x16a),{'feature':'processes'});return;}this['_onTick']=_0x3d625e,this[_0x2ed103(0x20a)]=()=>this['_maybePublish']();for(const _0x3d6d7b of _0x871f9c)this[_0x2ed103(0x24e)]['events']['on'](_0x3d6d7b,this[_0x2ed103(0x20a)]);this[_0x2ed103(0xe1)]();const _0x5acd68=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0xe3bd4;this[_0x2ed103(0xf5)]=setInterval(()=>{const _0x2f0b7d=_0x2ed103;if(this[_0x2f0b7d(0x233)])try{this[_0x2f0b7d(0x233)]();}catch{}this['_publishNow'](),this[_0x2f0b7d(0x1b3)]()['catch'](()=>{});},_0x5acd68);if(this[_0x2ed103(0xf5)][_0x2ed103(0x27c)])this[_0x2ed103(0xf5)][_0x2ed103(0x27c)]();}['_maybePublish'](){const _0x3487f9=_0x174019;if(!this['_isWriter']||!this[_0x3487f9(0xe0)])return;if(Date[_0x3487f9(0x2b1)]()-this['_lastPublishAt']<_0x54339b)return;this['_publishNow']();}[_0x174019(0xe1)](){const _0x40460c=_0x174019;if(!this['_isWriter']||!this[_0x40460c(0xe0)])return;this[_0x40460c(0xae)]=Date[_0x40460c(0x2b1)]();try{const _0x4fe2de=[this[_0x40460c(0x13c)]()];for(const _0x13dada of this[_0x40460c(0x1e9)][_0x40460c(0x1ed)]())_0x4fe2de[_0x40460c(0x2c5)](this[_0x40460c(0x2cd)](_0x13dada));const _0x182fcb=_0x7aa652[_0x40460c(0xad)]?_0x7aa652[_0x40460c(0x2b1)]():0x0;for(const _0x384298 of _0x4fe2de){try{this[_0x40460c(0x2e2)](_0x384298),this['_publishFailWarned']=![];}catch(_0x559ccc){!this[_0x40460c(0x1f6)]&&(this[_0x40460c(0x1f6)]=!![],this['okdb']?.[_0x40460c(0xbb)]?.[_0x40460c(0xb2)]?.('registry\x20publish\x20failing:\x20'+_0x559ccc[_0x40460c(0x15b)],{'feature':_0x40460c(0xc5)}));}}if(_0x7aa652[_0x40460c(0xad)])_0x7aa652[_0x40460c(0x29c)](_0x40460c(0x107),_0x7aa652['now']()-_0x182fcb,'rows='+_0x4fe2de[_0x40460c(0x125)]+_0x40460c(0x164));}catch(_0x55831e){!this[_0x40460c(0x1f6)]&&(this['_publishFailWarned']=!![],this['okdb']?.[_0x40460c(0xbb)]?.['warn']?.('registry\x20publish\x20failing:\x20'+_0x55831e[_0x40460c(0x15b)],{'feature':_0x40460c(0xc5)}));}}async[_0x174019(0xb8)](){const _0x37912b=_0x174019;if(this[_0x37912b(0x20a)]){for(const _0x51e2a0 of _0x871f9c){try{this[_0x37912b(0x24e)]['events'][_0x37912b(0x232)](_0x51e2a0,this['_onProcEvent']);}catch{}}this[_0x37912b(0x20a)]=null;}this[_0x37912b(0xf5)]&&(clearInterval(this[_0x37912b(0xf5)]),this[_0x37912b(0xf5)]=null);try{if(this[_0x37912b(0xe0)]&&this[_0x37912b(0x183)])await this[_0x37912b(0x23c)](this['_rowKey']);}catch{}}async[_0x174019(0x2b9)](){const _0x233d77=_0x174019;if(!this[_0x233d77(0xe0)]||!this[_0x233d77(0x183)])return;try{await this['removeNode'](this['_rowKey']);}catch{}try{const _0x25724a=[];for(const {value:_0x36d812}of this[_0x233d77(0xe0)]['getRange'](_0x18c686)){if(_0x36d812?.['ppid']===process[_0x233d77(0x299)]&&_0x36d812[_0x233d77(0x274)])_0x25724a[_0x233d77(0x2c5)](_0x36d812[_0x233d77(0x274)]);}for(const _0x3ecbb2 of _0x25724a){try{await this[_0x233d77(0x23c)](_0x3ecbb2);}catch{}}}catch{}}async['publishOwnRow'](){const _0x1736ea=_0x174019;return this[_0x1736ea(0x19a)](this[_0x1736ea(0x13c)]());}async[_0x174019(0x22b)](_0x255e53){const _0x4ccd17=_0x174019;if(!this['_statusEnv']||!this[_0x4ccd17(0x183)])return;return this[_0x4ccd17(0x19a)](this[_0x4ccd17(0x2cd)](_0x255e53));}[_0x174019(0x2cd)]({pid:_0x1cb8ee,startedAt:_0x3bb478,kind:_0x1d5ceb,supervisorKey:_0x25915c,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x174019(0x29b),meta:meta=null,stats:stats=null}){const _0x4cf6c7=_0x174019,_0x30c8e0=Date[_0x4cf6c7(0x2b1)](),_0x32d26a=_0x1f1286(_0x1cb8ee,_0x3bb478);return{'nodeKey':_0x45cb85(_0x32d26a,'0'),'processKey':_0x32d26a,'instanceId':'0','pid':_0x1cb8ee,'startedAt':_0x3bb478,'ppid':process[_0x4cf6c7(0x299)],'host':_0x2af0f3[_0x4cf6c7(0x1d3)](),'supervisorKey':_0x25915c,'slot':slot,'slotKey':slotKey,'kind':_0x1d5ceb,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x30c8e0,'expiresAt':_0x30c8e0+_0x3f3740,'caps':this[_0x4cf6c7(0x277)](_0x1d5ceb,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x174019(0x26f)](_0x5c05bb){const _0x51ded2=_0x174019;if(!_0x5c05bb?.['pid'])return null;const _0x2ed8f6=_0x1f1286(_0x5c05bb['pid'],_0x5c05bb['startedAt']);this[_0x51ded2(0x1e9)][_0x51ded2(0x19d)](_0x2ed8f6,{..._0x5c05bb,'supervisorKey':_0x5c05bb[_0x51ded2(0x221)]??this[_0x51ded2(0xdc)]});if(this[_0x51ded2(0x183)])await this[_0x51ded2(0x22b)](this[_0x51ded2(0x1e9)][_0x51ded2(0x159)](_0x2ed8f6))['catch']?.(()=>{});return _0x2ed8f6;}[_0x174019(0x25b)](_0x136222){const _0x35b920=_0x174019;if(!_0x136222)return;return this[_0x35b920(0x1e9)][_0x35b920(0x12b)](_0x136222),this[_0x35b920(0x23c)](_0x136222);}['_sampleOwnStats'](){const _0x3cab4b=_0x174019,_0x19b938=Date[_0x3cab4b(0x2b1)](),_0x960acf=process[_0x3cab4b(0x17a)](),_0x1b22b8=(_0x19b938-this[_0x3cab4b(0x1cb)])*0x3e8;if(_0x1b22b8>=0x3d090){const _0x46db50=_0x960acf['user']-this[_0x3cab4b(0x19f)][_0x3cab4b(0xcb)]+(_0x960acf[_0x3cab4b(0x2a2)]-this[_0x3cab4b(0x19f)][_0x3cab4b(0x2a2)]),_0x28a9e3=_0x2af0f3[_0x3cab4b(0x1fd)]()[_0x3cab4b(0x125)]||0x1;this[_0x3cab4b(0x11a)]=Math[_0x3cab4b(0xdd)](0x64,Math['round'](_0x46db50/(_0x1b22b8*_0x28a9e3)*0x64)),this['_lastCpuWindowMs']=Math['round'](_0x1b22b8/0x3e8),this[_0x3cab4b(0x19f)]=_0x960acf,this[_0x3cab4b(0x1cb)]=_0x19b938;}const _0x5f43c4=process[_0x3cab4b(0x282)](),_0x5fe7ae=this[_0x3cab4b(0x276)][_0x3cab4b(0x296)];let _0x15c1d0=0x0;if(_0x5fe7ae>0x0){const _0x518a64=[this['okdb'],...this[_0x3cab4b(0x24e)][_0x3cab4b(0x1a9)]?.[_0x3cab4b(0x1ed)]?.()??[]];for(const _0xcb82b2 of _0x518a64){const _0x434efb=_0xcb82b2[_0x3cab4b(0x18d)]?.[_0x3cab4b(0x187)];if(_0x434efb)_0x15c1d0+=_0x434efb['liveThreadStats'][_0x3cab4b(0x167)];}}let _0x3fe6dc=null;const _0xfd4913=_0x5fe7ae;if(_0xfd4913>0x0){let _0x2ea0b2=0x0;for(const _0x2ff85e of this[_0x3cab4b(0x276)]['values']())_0x2ea0b2+=_0x2ff85e[_0x3cab4b(0x26d)]||0x0;_0x3fe6dc={'count':_0xfd4913,'heapUsed':_0x2ea0b2,'sandbox':_0x5fe7ae,'busy':_0x15c1d0};}return{'rss':_0x5f43c4[_0x3cab4b(0x256)],'heapUsed':_0x5f43c4[_0x3cab4b(0x26d)],'heapTotal':_0x5f43c4[_0x3cab4b(0x272)],'external':_0x5f43c4[_0x3cab4b(0x23a)],'cpuPct':this[_0x3cab4b(0x11a)],'cpuWindowMs':this[_0x3cab4b(0x1be)]??null,'threads':_0x3fe6dc,'at':_0x19b938};}[_0x174019(0x1bb)](_0x5b07a7,_0x4bd3c3){const _0x385796=_0x174019;if(!_0x5b07a7||!_0x4bd3c3)return;this[_0x385796(0x276)][_0x385796(0x19d)](_0x5b07a7,_0x4bd3c3);}[_0x174019(0x2e4)](_0x1e4489){const _0x5666a5=_0x174019;this[_0x5666a5(0x276)][_0x5666a5(0x12b)](_0x1e4489);}[_0x174019(0x253)](_0x313467,_0xad13,_0x75054f=undefined){const _0x3fe947=_0x174019,_0x24c6e0=this[_0x3fe947(0x1e9)][_0x3fe947(0x159)](_0x313467);if(!_0x24c6e0||!_0xad13)return;if(_0x75054f!==undefined)_0x24c6e0[_0x3fe947(0x1da)]=_0x75054f;_0x24c6e0[_0x3fe947(0x254)]={'rss':_0xad13['rss']??null,'heapUsed':_0xad13[_0x3fe947(0x26d)]??null,'heapTotal':_0xad13[_0x3fe947(0x272)]??null,'external':_0xad13[_0x3fe947(0x23a)]??null,'cpuPct':_0xad13['cpuPct']??null,'cpuWindowMs':_0xad13[_0x3fe947(0x103)]??null,'threads':_0xad13['threads']??null,'claims':_0xad13[_0x3fe947(0x266)]??null,'envsOpen':_0xad13['envsOpen']??null,'at':Date[_0x3fe947(0x2b1)]()};}['_buildOwnRow'](){const _0x25f237=_0x174019,_0x52aba8=Date[_0x25f237(0x2b1)](),_0x391eb4=this[_0x25f237(0x24e)][_0x25f237(0xd5)]||{},_0x31348a=this[_0x25f237(0x14d)]||'cli';return{'nodeKey':this['_rowKey'],'processKey':this[_0x25f237(0xdc)],'instanceId':this['_instanceId'],'pid':process[_0x25f237(0x299)],'startedAt':this[_0x25f237(0x11c)],'instanceStartedAt':this[_0x25f237(0x2af)],'ppid':typeof process['ppid']===_0x25f237(0x13b)?process[_0x25f237(0x2cf)]:null,'host':_0x2af0f3[_0x25f237(0x1d3)](),'supervisorKey':this[_0x25f237(0x179)]??null,'version':require$$6[_0x25f237(0x2d2)],'kind':_0x31348a,'role':{'engines':!!_0x391eb4[_0x25f237(0xe8)],'processors':!!_0x391eb4[_0x25f237(0x27b)],'compaction':_0x391eb4[_0x25f237(0x20e)],'http':_0x391eb4[_0x25f237(0x14c)]},'listenAddr':this[_0x25f237(0x12e)]??null,'heartbeatAt':_0x52aba8,'expiresAt':_0x52aba8+_0x3f3740,'caps':this[_0x25f237(0x277)](_0x31348a,_0x391eb4),'lifecycle':{'state':_0x25f237(0x29b),'desiredVersionApplied':null},'meta':{...this['_ownMeta']},'processing':_0x391eb4[_0x25f237(0x27b)]?this[_0x25f237(0x16f)]():null,'engines':_0x391eb4[_0x25f237(0xe8)]?[...this[_0x25f237(0x24e)]['_servingEngines']??[]]:null,'singletonClaims':this['_collectSingletonClaims'](),'stats':this[_0x25f237(0x28c)](),'writers':this[_0x25f237(0x201)]()};}[_0x174019(0x201)](){const _0x404f3a=_0x174019,_0x4e29f7={};try{for(const [_0x7ec250,_0x4c54f8]of this['okdb'][_0x404f3a(0x1a9)]){try{const _0xd6c7be=_0x4c54f8[_0x404f3a(0x236)]?.();if(!_0xd6c7be)continue;if(!_0xd6c7be[_0x404f3a(0x18e)]&&!_0xd6c7be[_0x404f3a(0x1f4)]&&!(_0xd6c7be['parkedNow']??0x0)&&!_0xd6c7be[_0x404f3a(0x24a)])continue;_0x4e29f7[_0x7ec250]={'depth':_0xd6c7be[_0x404f3a(0x18e)],'oldestPendingMs':_0xd6c7be[_0x404f3a(0x1b0)],'committed':_0xd6c7be[_0x404f3a(0x1f4)],'commitsPerSec':_0xd6c7be[_0x404f3a(0xb0)],'commitP99Ms':_0xd6c7be[_0x404f3a(0x170)],'parkedNow':_0xd6c7be[_0x404f3a(0x284)]??0x0,'draining':!!_0xd6c7be[_0x404f3a(0x24a)]};}catch{}}}catch{}return Object[_0x404f3a(0x261)](_0x4e29f7)[_0x404f3a(0x125)]?_0x4e29f7:null;}['_collectSingletonClaims'](){const _0x48d4d7=_0x174019,_0x20ff3a=process[_0x48d4d7(0x299)],_0x2528a0=Date[_0x48d4d7(0x2b1)](),_0x3350a1=_0x12817d=>{const _0x15fc0e=_0x48d4d7;if(!_0x12817d)return[];const _0x145e7b=[];try{for(const {id:_0x540e58,entry:_0xc0f287}of _0x12817d[_0x15fc0e(0x126)]()){if(_0xc0f287?.['holder']?.[_0x15fc0e(0x299)]!==_0x20ff3a)continue;const _0x281be2=_0xc0f287[_0x15fc0e(0x291)]??_0xc0f287[_0x15fc0e(0x1cd)]??0x0;if(_0x281be2+(_0xc0f287[_0x15fc0e(0x11f)]??0x0)<_0x2528a0)continue;_0x145e7b[_0x15fc0e(0x2c5)](_0x540e58);}}catch{}return _0x145e7b;},_0x27f977=_0x3350a1(this[_0x48d4d7(0x235)](_0x48d4d7(0x2d8))),_0x1945f2=_0x3350a1(this['_singletonLock'](_0x48d4d7(0xd4)));if(!_0x27f977[_0x48d4d7(0x125)]&&!_0x1945f2[_0x48d4d7(0x125)])return null;return{'compact':_0x27f977,'replicate':_0x1945f2};}[_0x174019(0x235)](_0x502083){const _0x33ae32=_0x174019;if(!this['okdb']?.[_0x33ae32(0x152)])return null;if(!this[_0x33ae32(0xa9)])this['_singletonLocks']=new Map();let _0x422654=this[_0x33ae32(0xa9)]['get'](_0x502083);if(!_0x422654)try{_0x422654=new _0x351786(this[_0x33ae32(0x24e)][_0x33ae32(0x152)],{'namespace':_0x502083}),this[_0x33ae32(0xa9)]['set'](_0x502083,_0x422654);}catch{return null;}return _0x422654;}['_buildProcessingFacet'](){const _0x57c890=_0x174019,_0x45e2da=[];try{for(const [_0x95a55a,_0x7aa2c6]of this['okdb'][_0x57c890(0x1a9)]){if(_0x95a55a[_0x57c890(0x2a4)]('~'))continue;for(const _0x1d787b of _0x7aa2c6['processor'][_0x57c890(0x2e6)]())_0x45e2da[_0x57c890(0x2c5)]({..._0x1d787b,'env':_0x95a55a});}}catch{}return{'participate':this[_0x57c890(0x24e)][_0x57c890(0x27b)]?.[_0x57c890(0x2a1)]??![],'processors':_0x45e2da};}[_0x174019(0x162)](){const _0x55c088=_0x174019;if(this[_0x55c088(0x115)])return!![];const _0x125d0e=this['okdb']['_rootDb'];if(!_0x125d0e)return![];return this[_0x55c088(0x115)]=_0x125d0e[_0x55c088(0x15a)](_0x40cc73,{'dupSort':![]}),this['_cmd']=_0x125d0e[_0x55c088(0x15a)](_0x418851,{'dupSort':![]}),!![];}async['_migrateVocab'](){const _0x119a9f=_0x174019;if(!this['_ensureDesired']())return;const _0x45615d='__vocab/version',_0x435478=0x1,_0x286f5a=this[_0x119a9f(0x115)][_0x119a9f(0x159)](_0x45615d)??0x0;if(_0x286f5a>=_0x435478)return;const _0xb631bc=_0x32aefd=>{const _0x528b2e=_0x119a9f;if(_0x32aefd==='worker')return _0x528b2e(0x22e);if(_0x32aefd===_0x528b2e(0x25e))return'fanout';return _0x32aefd;};await this[_0x119a9f(0x24e)]['_systemEnv'][_0x119a9f(0xd7)]['transaction'](()=>{const _0x113389=_0x119a9f;for(const _0x5eecdd of[_0x113389(0x163),_0x113389(0x288)]){for(const {key:_0x2309c9,value:_0x4c801f}of this[_0x113389(0x115)][_0x113389(0x168)]({'start':_0x5eecdd,'end':_0x5eecdd+'\xff'})){if(typeof _0x2309c9!==_0x113389(0x150)||!_0x2309c9[_0x113389(0x2a4)](_0x5eecdd))break;const _0x542f72=_0xb631bc(_0x4c801f[_0x113389(0xde)]);if(_0x542f72!==_0x4c801f[_0x113389(0xde)])this['_desired'][_0x113389(0x244)](_0x2309c9,{..._0x4c801f,'mode':_0x542f72});}}this[_0x113389(0x115)][_0x113389(0x244)](_0x45615d,_0x435478);});}['hasDesired'](){return!!this['_desired'];}[_0x174019(0x12c)](_0x50985c,_0x15305c){const _0x4e5b8c=_0x174019;if(!this[_0x4e5b8c(0x162)]())return null;const _0x86033b=_0x50985c+'/'+_0x15305c;return this[_0x4e5b8c(0x1b7)](),this[_0x4e5b8c(0x225)]['get'](_0x86033b)??this['_desired']['get'](_0x86033b)??null;}[_0x174019(0x1b7)](){const _0x5dff4c=_0x174019;if(!_0x3f4025)return;try{this[_0x5dff4c(0x24e)][_0x5dff4c(0x247)]?.['db']?.[_0x5dff4c(0x209)]?.();}catch{}}async[_0x174019(0x207)](_0x5000ea,_0x22a2a5,_0x2eb4c8){const _0x5380b1=_0x174019;if(!this['_ensureDesired']())return null;const _0x227f95=_0x5000ea+'/'+_0x22a2a5;this['_refreshDesiredSnapshot']();const _0x6bb0ef=this[_0x5380b1(0x225)][_0x5380b1(0x159)](_0x227f95)??this['_desired'][_0x5380b1(0x159)](_0x227f95)??{'version':0x0},_0x4a84d0=(_0x6bb0ef[_0x5380b1(0x2d2)]||0x0)+0x1,_0x1a2c44={..._0x6bb0ef,..._0x2eb4c8,'version':_0x4a84d0,'updatedAt':Date['now']()};this[_0x5380b1(0x225)][_0x5380b1(0x19d)](_0x227f95,_0x1a2c44);try{await this['okdb']['_systemEnv'][_0x5380b1(0xd7)][_0x5380b1(0x214)](()=>{const _0x38cadc=_0x5380b1;this[_0x38cadc(0x115)][_0x38cadc(0x244)](_0x227f95,_0x1a2c44);});}finally{if(this['_desiredOverlay'][_0x5380b1(0x159)](_0x227f95)===_0x1a2c44)this[_0x5380b1(0x225)][_0x5380b1(0x12b)](_0x227f95);}return _0x4a84d0;}[_0x174019(0x180)](_0x2b8c09){const _0x3b6d43=_0x174019;if(!this[_0x3b6d43(0x162)]())return[];this['_refreshDesiredSnapshot']();const _0x1616dd=_0x2b8c09+'/',_0x7adaa3=[];for(const {key:_0x62dd1a,value:_0x3688be}of this['_desired'][_0x3b6d43(0x168)]({'start':_0x1616dd,'end':_0x1616dd+'\xff'})){if(typeof _0x62dd1a!=='string'||!_0x62dd1a[_0x3b6d43(0x2a4)](_0x1616dd))break;_0x7adaa3['push']({'key':_0x62dd1a[_0x3b6d43(0x295)](_0x1616dd[_0x3b6d43(0x125)]),'value':_0x3688be});}return _0x7adaa3;}[_0x174019(0x10b)](_0x286d5e){const _0x58a2b2=_0x174019;if(!this[_0x58a2b2(0x162)]())return null;return this[_0x58a2b2(0x197)][_0x58a2b2(0x159)](_0x286d5e)??null;}async[_0x174019(0x237)](_0xc1964,_0x30978f,_0x1b5887={}){const _0x1f5769=_0x174019;if(!this[_0x1f5769(0x162)]())return null;let _0x47a769;return await this[_0x1f5769(0x24e)]['_systemEnv'][_0x1f5769(0xd7)]['transaction'](()=>{const _0x1d2f9c=_0x1f5769,_0x2a8731=this[_0x1d2f9c(0x197)][_0x1d2f9c(0x159)](_0xc1964)||{'epoch':0x0};_0x47a769=(_0x2a8731[_0x1d2f9c(0x135)]||0x0)+0x1,this['_cmd'][_0x1d2f9c(0x244)](_0xc1964,{..._0x2a8731,..._0x1b5887,'cmd':_0x30978f,'epoch':_0x47a769,'updatedAt':Date['now']()});}),_0x47a769;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x3ad314,'nodeKey':_0x1f1286,'logicalKey':_0x1e4841,'slotKey':_0x239f10,'PROCESS_ENV':_0x25f3f7,'NODE_TYPE':_0x18c686},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x2ac451=_0x498b9d;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x4ceeba=require$$0$4,{EVENTS:_0x11b767,CHANGE_ACTIONS:_0x31679b}=requireOkdbEnums(),{LOOP:_0x300d81}=requireOkdbLoopMonitor(),_0x76eaf3=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x4b3505=0x5,_0x1a51c2=0x2710;class _0x1fd4b9 extends _0x4ceeba{constructor(_0x3d267e,_0x2681c5={}){const _0x4f20bf=_0x37d7;super(),this[_0x4f20bf(0x24e)]=_0x3d267e,this[_0x4f20bf(0xa7)]=_0x2681c5[_0x4f20bf(0x186)]??_0x76eaf3,this[_0x4f20bf(0x21f)]=_0x2681c5[_0x4f20bf(0x2cb)]??_0x4b3505,this[_0x4f20bf(0x1ec)]=_0x2681c5[_0x4f20bf(0xdf)]??_0x1a51c2,this[_0x4f20bf(0xeb)]=![],this['_cursors']=new Map(),this['_baselines']=new Map(),this['_pending']=new Map(),this['_flushTimer']=null,this[_0x4f20bf(0xc3)]=![],this[_0x4f20bf(0xfa)]=new Set(),this[_0x4f20bf(0xf2)]=new Set(),this[_0x4f20bf(0x1e7)]=_0x4e1883=>this[_0x4f20bf(0x2c8)](_0x4e1883),this[_0x4f20bf(0x176)]=_0x179e90=>this[_0x4f20bf(0x147)](_0x179e90),this['_onPoke']=_0x5c9ec7=>this[_0x4f20bf(0x1ab)](_0x5c9ec7),this[_0x4f20bf(0x19b)]=()=>this[_0x4f20bf(0xe2)]();}[_0x2ac451(0x2a3)](){const _0x3e83c0=_0x2ac451;if(this[_0x3e83c0(0xeb)])return;this[_0x3e83c0(0xeb)]=!![];for(const [_0x11908a,_0x508e84]of this[_0x3e83c0(0x24e)][_0x3e83c0(0x1a9)]){if(_0x11908a['startsWith']('~'))continue;try{_0x508e84[_0x3e83c0(0x109)]();}catch{}}for(const [_0x206dcf,_0x2189d0]of this[_0x3e83c0(0x24e)][_0x3e83c0(0x1a9)]){if(_0x206dcf[_0x3e83c0(0x2a4)]('~'))continue;try{this['_baselines']['set'](_0x206dcf,_0x2189d0['getClock']()||0x0);}catch{}}const {events:_0x5b9540}=this[_0x3e83c0(0x24e)];_0x5b9540['on'](_0x11b767['ITEM_PENDING'],this[_0x3e83c0(0x176)]),_0x5b9540['on'](_0x11b767[_0x3e83c0(0x2c7)],this[_0x3e83c0(0x1e7)]),_0x5b9540['on'](_0x11b767['ITEM_UPDATE'],this[_0x3e83c0(0x1e7)]),_0x5b9540['on'](_0x11b767[_0x3e83c0(0x10d)],this[_0x3e83c0(0x1e7)]),_0x5b9540['on'](_0x11b767[_0x3e83c0(0x14e)],this[_0x3e83c0(0x15d)]),_0x5b9540['once'](_0x11b767[_0x3e83c0(0x245)],this['_onStop']);}[_0x2ac451(0xe2)](){const _0x1e92d4=_0x2ac451;if(!this[_0x1e92d4(0xeb)])return;this[_0x1e92d4(0xeb)]=![];const {events:_0xab9f6f}=this[_0x1e92d4(0x24e)];_0xab9f6f[_0x1e92d4(0x232)](_0x11b767['ITEM_PENDING'],this[_0x1e92d4(0x176)]),_0xab9f6f[_0x1e92d4(0x232)](_0x11b767[_0x1e92d4(0x2c7)],this[_0x1e92d4(0x1e7)]),_0xab9f6f[_0x1e92d4(0x232)](_0x11b767['ITEM_UPDATE'],this[_0x1e92d4(0x1e7)]),_0xab9f6f[_0x1e92d4(0x232)](_0x11b767[_0x1e92d4(0x10d)],this[_0x1e92d4(0x1e7)]),_0xab9f6f['off'](_0x11b767[_0x1e92d4(0x14e)],this[_0x1e92d4(0x15d)]);try{_0xab9f6f[_0x1e92d4(0x232)](_0x11b767['SYSTEM_STOPPED'],this[_0x1e92d4(0x19b)]);}catch{}this['_flushTimer']&&(clearTimeout(this[_0x1e92d4(0x297)]),this[_0x1e92d4(0x297)]=null),this[_0x1e92d4(0x100)][_0x1e92d4(0x16c)](),this[_0x1e92d4(0x156)][_0x1e92d4(0x16c)](),this[_0x1e92d4(0x16b)][_0x1e92d4(0x16c)](),this[_0x1e92d4(0xfa)][_0x1e92d4(0x16c)](),this[_0x1e92d4(0xf2)][_0x1e92d4(0x16c)]();}['_dedupeKey'](_0x32e089,_0x419787,_0x400548,_0xcc5b6){return _0x32e089+'\x00'+_0x419787+'\x00'+_0x400548+'\x00'+_0xcc5b6;}[_0x2ac451(0x219)](_0x55490f,_0x4f5b23,_0x1ba65a,_0x20e87a){const _0x5b6ccd=_0x2ac451,_0x589ed6=this[_0x5b6ccd(0x13d)](_0x55490f,_0x4f5b23,_0x1ba65a,_0x20e87a);if(this['_seen'][_0x5b6ccd(0xc4)](_0x589ed6))return![];this[_0x5b6ccd(0xfa)][_0x5b6ccd(0x15c)](_0x589ed6);if(this[_0x5b6ccd(0xfa)][_0x5b6ccd(0x296)]>this[_0x5b6ccd(0x1ec)]){const _0xe2fadc=this['_seen'][_0x5b6ccd(0x1ed)]()['next']()[_0x5b6ccd(0x24f)];this[_0x5b6ccd(0xfa)][_0x5b6ccd(0x12b)](_0xe2fadc);}return!![];}[_0x2ac451(0x147)](_0x239985){const _0x88fe30=_0x2ac451;if(!this[_0x88fe30(0xeb)]||!_0x239985)return;const {env:_0x25f396,type:_0x39417d,key:_0x1a7099,clock:_0x1408ec}=_0x239985;if(_0x25f396==null||_0x39417d==null||_0x1a7099==null)return;if(typeof _0x25f396===_0x88fe30(0x150)&&_0x25f396[_0x88fe30(0x2a4)]('~'))return;if(typeof _0x39417d==='string'&&_0x39417d[_0x88fe30(0x2a4)]('~'))return;this['_pendingLocal'][_0x88fe30(0x15c)](this[_0x88fe30(0x13d)](_0x25f396,_0x39417d,_0x1a7099,_0x1408ec)),this['_pendingLocal'][_0x88fe30(0x296)]>this['_dedupeMax']&&this[_0x88fe30(0xf2)]['delete'](this[_0x88fe30(0xf2)][_0x88fe30(0x1ed)]()['next']()[_0x88fe30(0x24f)]);}[_0x2ac451(0x2c8)](_0x1aad06){const _0x5be25d=_0x2ac451;if(!this[_0x5be25d(0xeb)]||!_0x1aad06)return;const {env:_0x30d21d,type:_0x46cbd4,key:_0x2304ab,clock:_0x19ac14,origin:_0xccce7,action:_0x5d524c,newValue:_0x2aec4d,oldValue:_0x3958e5}=_0x1aad06;if(_0x30d21d==null||_0x46cbd4==null||_0x2304ab==null)return;if(typeof _0x30d21d===_0x5be25d(0x150)&&_0x30d21d[_0x5be25d(0x2a4)]('~'))return;if(typeof _0x46cbd4===_0x5be25d(0x150)&&_0x46cbd4[_0x5be25d(0x2a4)]('~'))return;this[_0x5be25d(0xf2)]['delete'](this[_0x5be25d(0x13d)](_0x30d21d,_0x46cbd4,_0x2304ab,_0x19ac14));if(!this[_0x5be25d(0x219)](_0x30d21d,_0x46cbd4,_0x2304ab,_0x19ac14))return;const _0x5afd98=_0x5d524c===_0x31679b['REMOVE']?'remove':_0x5be25d(0x244);this['emit'](_0x5be25d(0x275),{'env':_0x30d21d,'type':_0x46cbd4,'key':_0x2304ab,'op':_0x5afd98,'clock':_0x19ac14,'origin':_0xccce7,'value':_0x5afd98===_0x5be25d(0x2cc)?null:_0x2aec4d,'prevValue':_0x3958e5});}[_0x2ac451(0x1ab)](_0x2758c4){const _0x5630ea=_0x2ac451;if(!this[_0x5630ea(0xeb)])return;if(!_0x2758c4||typeof _0x2758c4['env']!=='string'||typeof _0x2758c4['type']!==_0x5630ea(0x150))return;const {env:_0x1241ca,type:_0x201a1b}=_0x2758c4;if(_0x1241ca[_0x5630ea(0x2a4)]('~')||_0x201a1b[_0x5630ea(0x2a4)]('~'))return;this[_0x5630ea(0x100)][_0x5630ea(0x19d)](_0x1241ca+'\x00'+_0x201a1b,{'env':_0x1241ca,'type':_0x201a1b}),this[_0x5630ea(0x136)]();}[_0x2ac451(0x136)](){const _0x257029=_0x2ac451;if(this['_flushTimer'])return;const _0xe9faf2=()=>{const _0x3c28b4=_0x37d7;this[_0x3c28b4(0x297)]=null,this[_0x3c28b4(0x2ad)]()[_0x3c28b4(0x208)](()=>{});};this[_0x257029(0x297)]=setTimeout(_0xe9faf2,this[_0x257029(0x21f)]>0x0?this['_flushDebounce']:0x0);}async[_0x2ac451(0x2ad)](){const _0x2c3978=_0x2ac451;if(this[_0x2c3978(0xc3)]){this[_0x2c3978(0x136)]();return;}this[_0x2c3978(0xc3)]=!![];try{const _0x5f2d6c=[...this[_0x2c3978(0x100)][_0x2c3978(0x1ed)]()];this[_0x2c3978(0x100)][_0x2c3978(0x16c)]();let _0x5207f7=![];for(const {env:_0x3dea7e,type:_0x39fa73}of _0x5f2d6c){try{const _0x278eed=await this[_0x2c3978(0x1c3)](_0x3dea7e,_0x39fa73);if(_0x278eed)_0x5207f7=!![];}catch{this[_0x2c3978(0x100)][_0x2c3978(0x19d)](_0x3dea7e+'\x00'+_0x39fa73,{'env':_0x3dea7e,'type':_0x39fa73}),_0x5207f7=!![];}}if(_0x5207f7||this['_pending']['size']>0x0)this[_0x2c3978(0x136)]();}finally{this[_0x2c3978(0xc3)]=![];}}async[_0x2ac451(0x1c3)](_0x5b679e,_0x3a7d6b){const _0x1e99ec=_0x2ac451,_0x418868=await this[_0x1e99ec(0x24e)][_0x1e99ec(0x21c)](_0x5b679e),_0x3d3189=_0x5b679e+'\x00'+_0x3a7d6b;!this[_0x1e99ec(0x156)]['has'](_0x3d3189)&&(!this[_0x1e99ec(0x16b)][_0x1e99ec(0xc4)](_0x5b679e)&&(_0x418868[_0x1e99ec(0x109)](),this[_0x1e99ec(0x16b)][_0x1e99ec(0x19d)](_0x5b679e,_0x418868[_0x1e99ec(0x271)]()||0x0)),this[_0x1e99ec(0x156)]['set'](_0x3d3189,this['_baselines'][_0x1e99ec(0x159)](_0x5b679e)));const _0x2a84f0=this[_0x1e99ec(0x156)][_0x1e99ec(0x159)](_0x3d3189),_0x494f8d=_0x418868[_0x1e99ec(0x271)](_0x3a7d6b)||0x0;if(_0x494f8d<=_0x2a84f0)return![];const _0x1fcf79=_0x2a84f0+this[_0x1e99ec(0xa7)],_0x3dc575=Math['min'](_0x494f8d,_0x1fcf79),_0x1e60f7=_0x300d81[_0x1e99ec(0xad)]?_0x300d81[_0x1e99ec(0x2b1)]():0x0,_0x32acd3=Array['from'](_0x418868['getChanges'](_0x3a7d6b,_0x2a84f0+0x1,_0x3dc575));let _0x4651a2=_0x2a84f0;for(const _0x951b1d of _0x32acd3){const {clock:_0x85e9f8,key:_0x182ff6,action:_0x246959,origin:_0x53a003}=_0x951b1d;if(_0x85e9f8>_0x4651a2)_0x4651a2=_0x85e9f8;if(_0x182ff6==null)continue;if(this['_pendingLocal'][_0x1e99ec(0xc4)](this[_0x1e99ec(0x13d)](_0x5b679e,_0x3a7d6b,_0x182ff6,_0x85e9f8)))continue;if(!this[_0x1e99ec(0x219)](_0x5b679e,_0x3a7d6b,_0x182ff6,_0x85e9f8))continue;let _0xdca0ba,_0x173d4d;if(_0x246959===_0x31679b[_0x1e99ec(0xe6)])_0xdca0ba=_0x1e99ec(0x2cc),_0x173d4d=null;else{const _0xa6a7bf=_0x418868[_0x1e99ec(0x159)](_0x3a7d6b,_0x182ff6);_0xa6a7bf==null?(_0xdca0ba='remove',_0x173d4d=null):(_0xdca0ba=_0x1e99ec(0x244),_0x173d4d=_0xa6a7bf);}this[_0x1e99ec(0x1c6)]('change',{'env':_0x5b679e,'type':_0x3a7d6b,'key':_0x182ff6,'op':_0xdca0ba,'clock':_0x85e9f8,'origin':_0x53a003,'value':_0x173d4d});}if(_0x300d81[_0x1e99ec(0xad)])_0x300d81[_0x1e99ec(0x29c)](_0x1e99ec(0x192)+_0x5b679e+':'+_0x3a7d6b,_0x300d81['now']()-_0x1e60f7,'n='+_0x32acd3[_0x1e99ec(0x125)]);return this[_0x1e99ec(0x156)][_0x1e99ec(0x19d)](_0x3d3189,Math[_0x1e99ec(0x230)](_0x4651a2,_0x3dc575)),_0x418868['getClock'](_0x3a7d6b)>_0x3dc575;}[_0x2ac451(0x25a)](){const _0x2372c6=_0x2ac451;return{'started':this[_0x2372c6(0xeb)],'quantum':this[_0x2372c6(0xa7)],'flushDebounce':this['_flushDebounce'],'cursors':Object[_0x2372c6(0x26b)]([...this[_0x2372c6(0x156)][_0x2372c6(0x27f)]()][_0x2372c6(0x2bf)](([_0x375809,_0x41e53d])=>[_0x375809[_0x2372c6(0x1ac)]('\x00',':'),_0x41e53d])),'pending':this[_0x2372c6(0x100)]['size'],'seen':this[_0x2372c6(0xfa)][_0x2372c6(0x296)]};}}return _0x1fd4b9['CHANGEFEED_QUANTUM']=_0x76eaf3,okdbChangefeed={'OKDBChangefeed':_0x1fd4b9},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x57dda3=_0x498b9d;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x50f497=require$$1$1,_0x5568cf=require$$1,{EVENTS:_0x5b452a}=requireOkdbEnums(),_0x5e17d7=require$$0$3,{slotKey:_0x2e7a7f}=requireOkdbProcessRegistry(),_0x6b02ee=Number(process.env.OKDB_CLUSTER_RESPAWN_BACKOFF_MS)||0xfa,_0x3185bb=0xfa0,_0x530163=0x5,_0x360c9c=0x2710,_0x213543=0xbb8,_0x3ed24a=0x7d0,_0x35bd43='__okdbCluster',_0x50b055='ephemeral',_0x25b9ae=_0x57dda3(0xbb),_0x4d97f8=_0x57dda3(0x254),_0x809370=[_0x5b452a[_0x57dda3(0x204)],_0x5b452a[_0x57dda3(0x127)],_0x5b452a[_0x57dda3(0x18b)],_0x5b452a['FTS_RESET'],_0x5b452a['INDEX_PROGRESS'],_0x5b452a[_0x57dda3(0x270)],_0x5b452a[_0x57dda3(0x22a)],_0x5b452a[_0x57dda3(0x158)],_0x57dda3(0x1f8),_0x57dda3(0x173),_0x57dda3(0x151),_0x57dda3(0x26e),_0x57dda3(0xc9),_0x57dda3(0x154)],_0x57295f=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0,_0x588b7f=0x64;function _0x4d6e65(_0x3e5366){const _0x2ba519=_0x57dda3;if(!_0x3e5366)return _0x2ba519(0xb4);const _0x5bd43b=(_0x3e5366[_0x2ba519(0x27b)]||[])[_0x2ba519(0x2bf)](_0x1e17ae=>[_0x1e17ae[_0x2ba519(0x17c)],_0x1e17ae['id'],_0x1e17ae['mode'],_0x1e17ae[_0x2ba519(0x1aa)],!!_0x1e17ae[_0x2ba519(0x2e8)],!!_0x1e17ae[_0x2ba519(0x17f)],!!_0x1e17ae['claimGated'],_0x1e17ae[_0x2ba519(0x21d)]?.[_0x2ba519(0x299)]??null,_0x1e17ae['error']?String(_0x1e17ae[_0x2ba519(0x1a6)]?.[_0x2ba519(0x15b)]??_0x1e17ae[_0x2ba519(0x1a6)]):null]);return JSON[_0x2ba519(0x11d)]([!!_0x3e5366[_0x2ba519(0x1fb)],_0x5bd43b]);}function _0x3bc41d({workers:_0x4650b0,makeOkdb:_0x24bfb8,port:_0x31585c,primaryOkdb:_0x526fc6,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0xdbe06d=_0x57dda3;if(_0x50f497[_0xdbe06d(0x1e5)])return childEntry&&_0x50f497[_0xdbe06d(0x1ee)]({'exec':_0x5568cf[_0xdbe06d(0x2a7)](__dirname,_0xdbe06d(0x14a)),'args':[],'execArgv':((()=>{const _0x393a5b=_0xdbe06d,_0x1f2908=[];for(let _0x19f3ad=0x0;_0x19f3ad<process['execArgv'][_0x393a5b(0x125)];_0x19f3ad++){const _0x5d1eb2=process[_0x393a5b(0x18c)][_0x19f3ad];if(_0x5d1eb2['startsWith']('--test')||_0x5d1eb2[_0x393a5b(0x2a4)](_0x393a5b(0x1fc))||_0x5d1eb2[_0x393a5b(0x2a4)]('--inspect'))continue;if(_0x5d1eb2==='-e'||_0x5d1eb2===_0x393a5b(0xc8)||_0x5d1eb2==='-p'||_0x5d1eb2===_0x393a5b(0x134)){_0x19f3ad++;continue;}_0x1f2908['push'](_0x5d1eb2);}return _0x1f2908;})())}),_0x5a36ad({'workers':_0x4650b0,'port':_0x31585c,'primaryOkdb':_0x526fc6,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x31585c});return _0x25e525({'makeOkdb':_0x24bfb8,'port':_0x31585c});}function _0x5a36ad({workers:_0x2b121f,port:_0x5afd9d,primaryOkdb:_0x8ed0fe,workerEnv:_0x212712,workerRole:_0x96a3cc,listenAddr:_0x33bf51}){const _0x151fb7=_0x57dda3,_0x166a99=new Map(),_0x25dff8=new Map();let _0x243248=![];const _0x261405=_0x3b21e2=>_0x3b21e2?.['__okdbSlot'],_0x43da4f=_0x38e72d=>{const _0x2748c5=_0x37d7,_0x1941a2=_0x50f497[_0x2748c5(0xe9)]({...process.env,..._0x212712||{},'OKDB_CLUSTER_SLOT':String(_0x38e72d)});return _0x1941a2[_0x2748c5(0x185)]=_0x38e72d,_0x166a99['set'](_0x1941a2[_0x2748c5(0x139)][_0x2748c5(0x299)],{'worker':_0x1941a2,'startedAt':Date[_0x2748c5(0x2b1)](),'slot':_0x38e72d}),_0x1941a2['on'](_0x2748c5(0x1a6),_0x557cdf=>{const _0x2f41bc=_0x2748c5;console[_0x2f41bc(0xbb)](_0x2f41bc(0x248)+_0x1941a2['process']['pid']+'\x20ipc\x20error:\x20'+(_0x557cdf?.[_0x2f41bc(0x15b)]??_0x557cdf));}),_0x1941a2['on'](_0x2748c5(0x1a7),()=>_0x12ac0c()),_0x1941a2;},_0x1c88ac=_0x55acfc=>{const _0x3cf58d=_0x37d7;for(const {worker:_0x3ab3ab}of _0x166a99['values']()){if(_0x3ab3ab[_0x3cf58d(0x2ac)]()||!_0x3ab3ab['isConnected']())continue;try{_0x3ab3ab[_0x3cf58d(0x1b2)](_0x55acfc);}catch{}}};_0x8ed0fe?.[_0x151fb7(0x188)]?.({'kind':_0x151fb7(0xcc),'listenAddr':_0x33bf51})[_0x151fb7(0x208)](()=>{}),_0x8ed0fe?.['processes']?.[_0x151fb7(0x1b6)]?.({'workersConfigured':_0x2b121f});const _0x555e6d={'engines':!![],'processors':!![],'compaction':!![],..._0x96a3cc,'http':!![]},_0x12ac0c=()=>{const _0x101717=_0x151fb7,_0x82c266=_0x8ed0fe?.[_0x101717(0xc5)];if(!_0x82c266||!_0x82c266['_isWriter'])return;const _0x1ed6af=_0x82c266[_0x101717(0x1c1)];for(const {worker:_0x20c927,startedAt:_0x26e4ac,slot:_0x5b5b39,stats:_0x1f9ea4,processing:_0x4b0bd7}of _0x166a99[_0x101717(0x1ed)]()){if(_0x20c927['isDead']())continue;const _0x5a810b=_0x82c266['hasDesired']?.()&&_0x82c266[_0x101717(0x12c)]('slot',_0x97bf9d(_0x5b5b39))?.[_0x101717(0xd0)]===!![];_0x82c266[_0x101717(0x22b)]({'pid':_0x20c927[_0x101717(0x139)]['pid'],'startedAt':_0x26e4ac,'kind':_0x101717(0x268),'supervisorKey':_0x1ed6af,'slot':_0x5b5b39,'slotKey':_0x97bf9d(_0x5b5b39),'role':_0x555e6d,'listenAddr':_0x33bf51,'lifecycle':_0x5a810b?_0x101717(0xba):_0x101717(0x29b),'processing':_0x4b0bd7??null,'stats':_0x1f9ea4??null})[_0x101717(0x208)](()=>{});}},_0x97bf9d=_0x194cce=>_0x2e7a7f('cluster:'+_0x5afd9d,_0x194cce),_0x2b079b=_0x2bf54f=>{const _0x3a0421=_0x151fb7,_0x5c47d4=_0x8ed0fe?.[_0x3a0421(0xc5)];if(!_0x5c47d4?.[_0x3a0421(0x238)]?.())return![];return _0x5c47d4[_0x3a0421(0x12c)](_0x3a0421(0x193),_0x97bf9d(_0x2bf54f))?.[_0x3a0421(0xd0)]===!![];};for(let _0x2b7e8a=0x0;_0x2b7e8a<_0x2b121f;_0x2b7e8a++){const _0x465380=_0x2b079b(_0x2b7e8a);_0x25dff8['set'](_0x2b7e8a,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x465380,'respawnTimer':null}),_0x465380?console['log']('[okdb-cluster]\x20slot='+_0x2b7e8a+_0x151fb7(0x228)):_0x43da4f(_0x2b7e8a);}const _0x5b159b=()=>{const _0x2e70eb=_0x151fb7,_0x2e972=_0x8ed0fe?.[_0x2e70eb(0xc5)];if(!_0x2e972?.['_isWriter']||!_0x2e972[_0x2e70eb(0x238)]?.())return;for(const [_0x1bee7e,_0x33de74]of _0x25dff8[_0x2e70eb(0x27f)]()){const _0x5692cd=_0x2e972[_0x2e70eb(0x12c)](_0x2e70eb(0x193),_0x97bf9d(_0x1bee7e)),_0x553991=_0x5692cd?.[_0x2e70eb(0xd0)]===!![],_0x3a9662=_0x5692cd?.[_0x2e70eb(0x195)]===!![];if(_0x553991&&!_0x33de74[_0x2e70eb(0x202)]){_0x33de74[_0x2e70eb(0x202)]=!![];_0x33de74[_0x2e70eb(0xb1)]&&(clearTimeout(_0x33de74[_0x2e70eb(0xb1)]),_0x33de74[_0x2e70eb(0xb1)]=null);for(const {worker:_0x4b85fd}of _0x166a99[_0x2e70eb(0x1ed)]()){if(_0x261405(_0x4b85fd)!==_0x1bee7e||_0x4b85fd[_0x2e70eb(0x2ac)]())continue;try{if(_0x3a9662)_0x4b85fd[_0x2e70eb(0x139)][_0x2e70eb(0x195)](_0x2e70eb(0x251));else _0x4b85fd[_0x2e70eb(0x220)]()&&_0x4b85fd[_0x2e70eb(0xbe)]();}catch{}}console['log'](_0x2e70eb(0x223)+(_0x3a9662?_0x2e70eb(0x161):'decommissioned')+_0x2e70eb(0x2c9)+_0x1bee7e+_0x2e70eb(0x255));}else{if(!_0x553991&&_0x33de74[_0x2e70eb(0x202)]&&_0x5692cd){_0x33de74[_0x2e70eb(0x202)]=![],_0x33de74[_0x2e70eb(0x27e)]=[],_0x33de74[_0x2e70eb(0x2a8)]=0x0;const _0x16fc9a=[..._0x166a99['values']()]['some'](({worker:_0x563184})=>_0x261405(_0x563184)===_0x1bee7e&&!_0x563184[_0x2e70eb(0x2ac)]());!_0x16fc9a&&!_0x243248&&(_0x43da4f(_0x1bee7e),console['log']('[okdb-cluster]\x20recommissioned\x20worker\x20slot='+_0x1bee7e));}}}},_0x57b9ed=()=>{try{_0x5b159b();}catch{}};_0x8ed0fe?.[_0x151fb7(0x292)]?.['on']?.(_0x5b452a['SYSTEM_PROC'],_0x57b9ed);const _0xc1870b=[];if(_0x8ed0fe?.['events']?.['on'])for(const _0x304203 of _0x809370){const _0xd9138=_0x588501=>{_0x1c88ac({[_0x35bd43]:_0x50b055,'event':_0x304203,'data':_0x588501??{}});};_0x8ed0fe['events']['on'](_0x304203,_0xd9138),_0xc1870b[_0x151fb7(0x2c5)]({'event':_0x304203,'handler':_0xd9138});}const _0x1731d0=setInterval(()=>{_0x5b159b(),_0x12ac0c();},_0x57295f);_0x1731d0[_0x151fb7(0x27c)]?.();const _0x4c9e14=(_0x16f131,_0x5dc367)=>{const _0x1067f6=_0x151fb7;if(!_0x5dc367||typeof _0x5dc367!==_0x1067f6(0x1af)||_0x5dc367[_0x35bd43]!==_0x25b9ae)return;if(!_0x8ed0fe?.['log']?.['ingest'])return;const _0x1cc933=_0x5dc367[_0x1067f6(0x231)]||{};_0x8ed0fe[_0x1067f6(0xbb)]['ingest']({..._0x1cc933,'msg':'[w'+_0x5dc367[_0x1067f6(0x193)]+']\x20'+(_0x1cc933[_0x1067f6(0x1b4)]??''),'meta':{..._0x1cc933[_0x1067f6(0x2bb)]||{},'worker':_0x5dc367['slot'],'workerPid':_0x5dc367[_0x1067f6(0x299)]}});};_0x50f497['on'](_0x151fb7(0x15b),_0x4c9e14);const _0x4f98bb=(_0x407efc,_0x486b68)=>{const _0x7e6951=_0x151fb7;if(!_0x486b68||typeof _0x486b68!=='object'||_0x486b68[_0x35bd43]!==_0x4d97f8)return;const _0xf61018=_0x166a99[_0x7e6951(0x159)](_0x407efc['process'][_0x7e6951(0x299)]);if(_0xf61018){_0xf61018[_0x7e6951(0x254)]={..._0x486b68[_0x7e6951(0x254)],'at':Date['now']()};if(_0x486b68[_0x7e6951(0x1da)]!==undefined){const _0x1a21da=_0x4d6e65(_0x486b68['processing']);_0x1a21da!==_0xf61018[_0x7e6951(0x123)]&&(_0xf61018['processingSig']=_0x1a21da,_0x56bca7()),_0xf61018['processing']=_0x486b68['processing'];}}};let _0x3439dd=null;const _0x56bca7=()=>{if(_0x3439dd||_0x243248)return;_0x3439dd=setTimeout(()=>{_0x3439dd=null;if(!_0x243248)_0x12ac0c();},_0x588b7f),_0x3439dd['unref']?.();};_0x50f497['on'](_0x151fb7(0x15b),_0x4f98bb),_0x50f497['on'](_0x151fb7(0x2b4),(_0x24aafe,_0x1c4833,_0x16bd3a)=>{const _0x8271cd=_0x151fb7,_0x464ce0=_0x24aafe[_0x8271cd(0x139)]['pid'],_0x8cbfff=_0x261405(_0x24aafe),_0xec60c5=_0x166a99[_0x8271cd(0x159)](_0x464ce0);if(_0xec60c5&&_0x8ed0fe?.[_0x8271cd(0xc5)])_0x8ed0fe[_0x8271cd(0xc5)]['removeNode'](_0x464ce0+':'+_0xec60c5[_0x8271cd(0x23d)])['catch'](()=>{});_0x166a99[_0x8271cd(0x12b)](_0x464ce0),console[_0x8271cd(0xbb)](_0x8271cd(0x248)+_0x464ce0+_0x8271cd(0x2c4)+(_0x8cbfff??'?')+_0x8271cd(0x212)+(_0x8271cd(0x29a)+_0x1c4833+_0x8271cd(0x20d)+(_0x16bd3a??_0x8271cd(0xac))+_0x8271cd(0x104)+_0x166a99[_0x8271cd(0x296)]+_0x8271cd(0x175))),_0x12ac0c();if(_0x243248||_0x8cbfff==null)return;const _0x2f83d2=_0x25dff8[_0x8271cd(0x159)](_0x8cbfff);if(!_0x2f83d2||_0x2f83d2['dead'])return;const _0xd8df91=Date[_0x8271cd(0x2b1)]();_0x2f83d2[_0x8271cd(0x27e)][_0x8271cd(0x2c5)](_0xd8df91),_0x2f83d2[_0x8271cd(0x27e)]=_0x2f83d2['deaths'][_0x8271cd(0x116)](_0x578c78=>_0xd8df91-_0x578c78<=_0x360c9c);if(_0x2f83d2[_0x8271cd(0x27e)][_0x8271cd(0x125)]>=_0x530163){_0x2f83d2[_0x8271cd(0x202)]=!![],console[_0x8271cd(0x1a6)](_0x8271cd(0x101)+_0x8cbfff+_0x8271cd(0x1ca)+_0x2f83d2['deaths'][_0x8271cd(0x125)]+_0x8271cd(0x2d9)+(_0x360c9c+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x166a99['size']+'\x20worker(s)\x20still\x20serving'));return;}_0x2f83d2[_0x8271cd(0x2a8)]++;const _0x5793db=Math[_0x8271cd(0xdd)](_0x3185bb,_0x6b02ee*0x2**(_0x2f83d2['consecutiveFailures']-0x1));console[_0x8271cd(0xbb)](_0x8271cd(0xea)+_0x8cbfff+'\x20in\x20'+_0x5793db+_0x8271cd(0x289)+_0x2f83d2[_0x8271cd(0x2a8)]+')'),_0x2f83d2[_0x8271cd(0xb1)]=setTimeout(()=>{const _0x1ba6bc=_0x8271cd;_0x2f83d2['respawnTimer']=null;if(_0x243248||_0x2f83d2['dead'])return;const _0x41d0f9=_0x43da4f(_0x8cbfff);_0x41d0f9[_0x1ba6bc(0x2b5)](_0x1ba6bc(0xa8),()=>{const _0x3fdfbf=_0x1ba6bc;if(_0x25dff8[_0x3fdfbf(0x159)](_0x8cbfff)===_0x2f83d2)_0x2f83d2['consecutiveFailures']=0x0;});},_0x5793db),_0x2f83d2['respawnTimer'][_0x8271cd(0x27c)]?.();});const _0x2969a8=[..._0x166a99[_0x151fb7(0x261)]()];console[_0x151fb7(0xbb)]('[okdb-cluster]\x20primary\x20pid='+process['pid']+_0x151fb7(0xbd)+_0x2b121f+_0x151fb7(0x17d)+_0x5afd9d+':\x20'+('['+_0x2969a8[_0x151fb7(0x2a7)](',\x20')+']'));const _0x11db2d={'_isClusterController':!![],'port':_0x5afd9d,'primaryOkdb':_0x8ed0fe??null,'status'(){const _0x5b68f2=_0x151fb7;return{'clustered':!![],'primaryPid':process['pid'],'port':_0x5afd9d,'primaryRole':_0x8ed0fe?.[_0x5b68f2(0x21a)]??null,'processorPid':null,'supervisorPid':process[_0x5b68f2(0x299)],'workers':[..._0x166a99[_0x5b68f2(0x1ed)]()][_0x5b68f2(0x2bf)](({worker:_0x4644a5})=>({'pid':_0x4644a5[_0x5b68f2(0x139)][_0x5b68f2(0x299)],'id':_0x4644a5['id'],'dead':_0x4644a5[_0x5b68f2(0x2ac)]()}))};},async 'close'(){const _0xf4fede=_0x151fb7;_0x243248=!![];for(const _0x3c28a4 of _0x25dff8[_0xf4fede(0x1ed)]()){_0x3c28a4['dead']=!![],_0x3c28a4['respawnTimer']&&(clearTimeout(_0x3c28a4[_0xf4fede(0xb1)]),_0x3c28a4[_0xf4fede(0xb1)]=null);}clearInterval(_0x1731d0);_0x3439dd&&(clearTimeout(_0x3439dd),_0x3439dd=null);_0x50f497[_0xf4fede(0x232)](_0xf4fede(0x15b),_0x4c9e14),_0x50f497[_0xf4fede(0x232)]('message',_0x4f98bb),_0x8ed0fe?.[_0xf4fede(0x292)]?.['off']?.(_0x5b452a['SYSTEM_PROC'],_0x57b9ed);if(_0x8ed0fe?.[_0xf4fede(0x292)]?.['off'])for(const {event:_0x5a0882,handler:_0x4266de}of _0xc1870b){try{_0x8ed0fe[_0xf4fede(0x292)][_0xf4fede(0x232)](_0x5a0882,_0x4266de);}catch{}}_0xc1870b['length']=0x0;const _0x2b9794=[..._0x166a99[_0xf4fede(0x1ed)]()][_0xf4fede(0x2bf)](({worker:_0x6c8f98})=>_0x6c8f98);if(_0x2b9794['length']===0x0)return;await Promise[_0xf4fede(0x1a2)](_0x2b9794[_0xf4fede(0x2bf)](_0xf4dbd5=>new Promise(_0x55d4a8=>{const _0x18bbf4=_0xf4fede;if(_0xf4dbd5[_0x18bbf4(0x2ac)]()){_0x55d4a8();return;}let _0x510fd0=![];const _0x419931=()=>{if(_0x510fd0)return;_0x510fd0=!![];if(_0x1f22b6)clearTimeout(_0x1f22b6);_0x55d4a8();};_0xf4dbd5[_0x18bbf4(0x2b5)](_0x18bbf4(0x2b4),_0x419931);const _0x1f22b6=setTimeout(()=>{const _0x5db424=_0x18bbf4;try{_0xf4dbd5[_0x5db424(0x139)][_0x5db424(0x195)]();}catch{}},_0x213543+0x1f4);_0x1f22b6[_0x18bbf4(0x27c)]?.();try{_0xf4dbd5[_0x18bbf4(0xbe)]();}catch{try{_0xf4dbd5[_0x18bbf4(0x139)][_0x18bbf4(0x195)]();}catch{}}})));}};return _0x11db2d;}async function _0x25e525({makeOkdb:_0x5b51ec,port:_0x261d3b}){const _0x285fb7=_0x57dda3,_0x48a9f7=await _0x5b51ec();return _0x2d31da(_0x48a9f7),_0x48a9f7[_0x285fb7(0x14c)][_0x285fb7(0x177)](_0x261d3b);}function _0x2d31da(_0x596e99){const _0x56be22=_0x57dda3;if(!_0x596e99||_0x596e99[_0x56be22(0x18a)])return;_0x596e99[_0x56be22(0x18a)]=!![];try{const {OKDBChangefeed:_0x3cd7f8}=requireOkdbChangefeed(),_0x3d8db8=_0x596e99['_adminRelay'];if(_0x3d8db8&&typeof _0x3d8db8[_0x56be22(0x203)]==='function'){const _0x2e9995=new _0x3cd7f8(_0x596e99);_0x2e9995[_0x56be22(0x2a3)](),_0x3d8db8[_0x56be22(0x203)](_0x2e9995),_0x596e99[_0x56be22(0x293)]=_0x2e9995;}}catch(_0x4875f2){_0x596e99[_0x56be22(0xbb)]?.[_0x56be22(0xb2)]?.(_0x56be22(0xcf)+(_0x4875f2?.['message']??_0x4875f2),{'feature':'cluster'});}const _0x364ed6=_0x2292fd=>{const _0x37676c=_0x56be22;if(!_0x2292fd||typeof _0x2292fd!==_0x37676c(0x1af)||_0x2292fd[_0x35bd43]==null)return;if(_0x2292fd[_0x35bd43]===_0x50b055)try{_0x596e99[_0x37676c(0x13a)]?.['pushEphemeral']?.(_0x2292fd[_0x37676c(0x2ab)],_0x2292fd[_0x37676c(0x2a9)]);}catch{}};process['on']('message',_0x364ed6),_0x596e99[_0x56be22(0x218)]=_0x364ed6;{let _0x4bca13=process[_0x56be22(0x17a)](),_0xc9dca9=Date[_0x56be22(0x2b1)]();const _0x4594e0=()=>{const _0x2aa143=_0x56be22;if(typeof process[_0x2aa143(0x1b2)]!==_0x2aa143(0x194)||!process['connected'])return;const _0xb16ab3=Date[_0x2aa143(0x2b1)](),_0x44608a=process[_0x2aa143(0x17a)](),_0x55dcb6=(_0xb16ab3-_0xc9dca9)*0x3e8,_0x2c87b0=_0x44608a['user']-_0x4bca13[_0x2aa143(0xcb)]+(_0x44608a[_0x2aa143(0x2a2)]-_0x4bca13[_0x2aa143(0x2a2)]),_0x1e8f74=_0x55dcb6>0x0?Math[_0x2aa143(0xdd)](0x64,Math[_0x2aa143(0x258)](_0x2c87b0/(_0x55dcb6*(_0x5e17d7[_0x2aa143(0x1fd)]()[_0x2aa143(0x125)]||0x1))*0x64)):0x0;_0x4bca13=_0x44608a,_0xc9dca9=_0xb16ab3;const _0x4dd867=process['memoryUsage']();let _0x516fb7=null;try{_0x516fb7=_0x596e99[_0x2aa143(0x21a)]?.['processors']?_0x596e99[_0x2aa143(0xc5)]?.[_0x2aa143(0x16f)]?.()??null:null;}catch{}try{process[_0x2aa143(0x1b2)]({[_0x35bd43]:_0x4d97f8,'stats':{'rss':_0x4dd867[_0x2aa143(0x256)],'heapUsed':_0x4dd867[_0x2aa143(0x26d)],'heapTotal':_0x4dd867[_0x2aa143(0x272)],'external':_0x4dd867[_0x2aa143(0x23a)],'cpuPct':_0x1e8f74,'cpuWindowMs':Math[_0x2aa143(0x258)](_0x55dcb6/0x3e8)||null},'processing':_0x516fb7});}catch{}},_0x31078a=Math['max'](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x4f6cbc=setInterval(_0x4594e0,_0x31078a);_0x4f6cbc[_0x56be22(0x27c)]?.(),_0x4594e0();for(const _0x32f540 of['processor:paused',_0x56be22(0xc9)]){_0x596e99[_0x56be22(0x292)]?.['on']?.(_0x32f540,()=>{try{_0x4594e0();}catch{}});}}let _0x401cfb=![];const _0x3a74c0=async _0x5514a2=>{const _0x3e119a=_0x56be22;if(_0x401cfb)return;_0x401cfb=!![];const _0x49e965=setTimeout(()=>process[_0x3e119a(0x2b4)](_0x5514a2),_0x213543);_0x49e965[_0x3e119a(0x27c)]?.();try{await _0x596e99['close']?.();}catch{}process[_0x3e119a(0x2b4)](_0x5514a2);};process['on'](_0x56be22(0xbe),()=>_0x3a74c0(0x0));if(process[_0x56be22(0x1b2)]&&!process[_0x56be22(0x239)])_0x3a74c0(0x0);if(process[_0x56be22(0x1c2)]!==_0x56be22(0x17e)){const _0x395b31=setInterval(()=>{const _0x1c2384=_0x56be22;if(process[_0x1c2384(0x2cf)]===0x1)_0x3a74c0(0x0);},_0x3ed24a);_0x395b31[_0x56be22(0x27c)]?.(),_0x596e99[_0x56be22(0x27a)]=_0x395b31;}}return okdbCluster={'runClustered':_0x3bc41d,'attachWorkerCluster':_0x2d31da},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x4bffed=require$$0$5,{attachWorkerCluster:_0x235047}=requireOkdbCluster();async function _0x5ce18f(){const _0x544c10=_0x37d7,_0x5156cf=process.env.OKDB_HTTP_CHILD;if(!_0x5156cf)throw new Error(_0x544c10(0x25c));const {rootPath:_0x2faefc,port:_0x6e9096,options:options={},logLevel:logLevel='info'}=JSON[_0x544c10(0x10a)](_0x5156cf);if(!_0x2faefc||!_0x6e9096)throw new Error(_0x544c10(0x181));const _0x3026ae=new _0x4bffed(_0x2faefc,{...options,'engines':![],'processors':![],'compaction':![]});_0x3026ae[_0x544c10(0xbb)][_0x544c10(0xbf)]?.();const _0x4089e5=process.env.OKDB_CLUSTER_SLOT??'?',_0x4a478a={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x51accb=_0x4a478a[logLevel]??_0x4a478a[_0x544c10(0xb5)];_0x3026ae[_0x544c10(0xbb)][_0x544c10(0x165)](_0x3ef544=>{const _0x3838fc=_0x544c10;if((_0x4a478a[_0x3ef544[_0x3838fc(0x2a5)]]??0x1)<_0x51accb)return;try{process[_0x3838fc(0x1b2)]?.({'__okdbCluster':'log','slot':_0x4089e5,'pid':process['pid'],'entry':_0x3ef544});}catch{}}),await _0x3026ae[_0x544c10(0x22d)](),_0x235047(_0x3026ae),await _0x3026ae[_0x544c10(0x14c)][_0x544c10(0x177)](_0x6e9096);}return _0x5ce18f()['catch'](_0x1b7918=>{const _0x2bb65d=_0x37d7;try{process[_0x2bb65d(0x1b2)]?.({'__okdbCluster':'log','slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process['pid'],'entry':{'level':_0x2bb65d(0x1a6),'msg':_0x2bb65d(0xee)+(_0x1b7918?.['message']??_0x1b7918)}});}catch{}process[_0x2bb65d(0x2b4)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);module[_0x498b9d(0x10f)]=okdbHttpWorkerChild;