@kedem/okdb 2.4.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 (234) hide show
  1. package/CHANGELOG.md +160 -0
  2. package/algorithm-worker-thread.js +1 -1
  3. package/bin/okdb.js +1 -1
  4. package/docs/auth-and-sync.md +2 -1
  5. package/docs/auth-permissions.md +31 -5
  6. package/docs/change-log.md +6 -6
  7. package/docs/licensing.md +6 -1
  8. package/docs/migration.md +60 -1
  9. package/docs/plugins.md +1 -1
  10. package/docs/processors.md +1 -1
  11. package/docs/subscriptions.md +6 -4
  12. package/docs/views.md +4 -0
  13. package/okdb-functions-sandbox-worker.js +1 -1
  14. package/okdb-http-worker-child.js +1 -1
  15. package/okdb-views-bootstrap-worker.js +1 -1
  16. package/okdb.js +1 -1
  17. package/package.json +1 -1
  18. package/public/admin-app.js +1 -1
  19. package/public/components/schema-edit-modal.ok.js +1 -0
  20. package/public/core/db/db-section.ok.html +1 -0
  21. package/public/core/db/modals/add-item-modal.ok.js +1 -0
  22. package/public/core/db/modals/create-fts-modal.ok.js +1 -0
  23. package/public/core/db/modals/create-index-modal.ok.js +1 -0
  24. package/public/core/db/parts/db-overview.ok.js +1 -0
  25. package/public/core/db/parts/edit-row.ok.js +1 -0
  26. package/public/core/db/parts/type-changelog.ok.js +1 -0
  27. package/public/core/db/parts/type-data-tab.ok.js +1 -0
  28. package/public/core/db/parts/type-list.ok.js +1 -0
  29. package/public/core/db/parts/type-manage-tab.ok.js +1 -0
  30. package/public/core/db/parts/type-schema-tab.ok.js +1 -0
  31. package/public/core/db/parts/type-viewer.ok.js +1 -0
  32. package/public/core/db/type-ops.js +1 -0
  33. package/public/core/docs/docs-page.ok.html +1 -0
  34. package/public/core/license/license-panel.ok.js +1 -0
  35. package/public/core/system/parts/system-log.ok.js +1 -0
  36. package/public/core/system/parts/system-processing-panel.ok.js +1 -0
  37. package/public/core/system/parts/system-storage-panel.ok.js +1 -0
  38. package/public/core/system/system-events-page.ok.js +1 -0
  39. package/public/core/system/system-logs-page.ok.js +1 -0
  40. package/public/core/system/system-overview-page.ok.html +1 -0
  41. package/public/core/system/system-runtime-page.ok.js +1 -0
  42. package/public/core/system/system-section.ok.html +1 -0
  43. package/public/features/api/api-panel.ok.js +1 -0
  44. package/public/features/api/index.js +1 -0
  45. package/public/features/auth/auth-panel.ok.js +1 -0
  46. package/public/features/auth/index.js +1 -0
  47. package/public/features/files/files-section.ok.html +1 -0
  48. package/public/features/files/index.js +1 -0
  49. package/public/features/files/parts/files-file-list.ok.js +1 -0
  50. package/public/features/files/parts/files-path-browser.ok.js +1 -0
  51. package/public/features/files/parts/files-preview.ok.js +1 -0
  52. package/public/features/files/parts/files-upload-panel.ok.js +1 -0
  53. package/public/features/functions/exports.js +1 -0
  54. package/public/features/functions/functions-section.ok.html +1 -0
  55. package/public/features/functions/functions-store.js +1 -0
  56. package/public/features/functions/index.js +1 -0
  57. package/public/features/functions/modals/function-modal.ok.js +1 -0
  58. package/public/features/functions/parts/function-detail.ok.js +1 -0
  59. package/public/features/functions/parts/function-logs.ok.js +1 -0
  60. package/public/features/functions/parts/function-runner.ok.js +1 -0
  61. package/public/features/pipelines/engine-ui-utils.js +1 -0
  62. package/public/features/pipelines/exports.js +1 -0
  63. package/public/features/pipelines/index.js +1 -0
  64. package/public/features/pipelines/modals/create-pipeline-modal.ok.js +1 -0
  65. package/public/features/pipelines/modals/edit-pipeline-modal.ok.js +1 -0
  66. package/public/features/pipelines/modals/engine-modal.ok.js +1 -0
  67. package/public/features/pipelines/parts/embed-create-panel.ok.js +1 -0
  68. package/public/features/pipelines/parts/embed-embedder-panel.ok.js +1 -0
  69. package/public/features/pipelines/parts/embed-indexer-panel.ok.js +1 -0
  70. package/public/features/pipelines/parts/embed-search-panel.ok.js +1 -0
  71. package/public/features/pipelines/parts/embed-worker-panel.ok.js +1 -0
  72. package/public/features/pipelines/parts/embeddings-engine-panel.ok.js +1 -0
  73. package/public/features/pipelines/parts/engine-declaration-editor.ok.js +1 -0
  74. package/public/features/pipelines/parts/engines-overview.ok.js +1 -0
  75. package/public/features/pipelines/parts/generic-engine-panel.ok.js +1 -0
  76. package/public/features/pipelines/parts/pipeline-create-panel.ok.js +1 -0
  77. package/public/features/pipelines/parts/pipeline-flow-strip.ok.js +1 -0
  78. package/public/features/pipelines/parts/type-pipelines-tab.ok.js +1 -0
  79. package/public/features/pipelines/pipelines-section.ok.html +1 -0
  80. package/public/features/queue/index.js +1 -0
  81. package/public/features/queue/modals/create-bucket-modal.ok.js +1 -0
  82. package/public/features/queue/modals/edit-bucket-modal.ok.js +1 -0
  83. package/public/features/queue/modals/edit-job-modal.ok.js +1 -0
  84. package/public/features/queue/modals/enqueue-job-modal.ok.js +1 -0
  85. package/public/features/queue/modals/job-type-modal.ok.js +1 -0
  86. package/public/features/queue/parts/job-log-panel.ok.js +1 -0
  87. package/public/features/queue/parts/queue-buckets.ok.js +1 -0
  88. package/public/features/queue/parts/queue-job-types.ok.js +1 -0
  89. package/public/features/queue/parts/queue-jobs.ok.js +1 -0
  90. package/public/features/queue/parts/queue-types.ok.js +1 -0
  91. package/public/features/queue/parts/queue-workers.ok.js +1 -0
  92. package/public/features/queue/queue-section.ok.html +1 -0
  93. package/public/features/sync/index.js +1 -0
  94. package/public/features/sync/sync-panel.ok.js +1 -0
  95. package/public/features/views/index.js +1 -0
  96. package/public/features/views/modals/create-view-modal.ok.js +1 -0
  97. package/public/features/views/parts/views-list.ok.js +1 -0
  98. package/public/features/views/parts/views-overview.ok.js +1 -0
  99. package/public/features/views/views-section.ok.html +1 -0
  100. package/public/features/views/views-store.js +1 -0
  101. package/public/index.html +9 -3
  102. package/public/modules/ok.js +1 -1
  103. package/public/shell/admin-shell.ok.html +3 -0
  104. package/public/shell/core-manifest.js +1 -0
  105. package/public/shell/shell-piece.ok.js +1 -0
  106. package/public/shell/shell-section-host.ok.js +1 -0
  107. package/public/shell/shell-section.ok.js +1 -0
  108. package/public/shell/shell-store.js +1 -0
  109. package/public/stores/auth-store.js +1 -1
  110. package/public/stores/okdb-store.js +1 -1
  111. package/public/stores/storage-store.js +1 -0
  112. package/public/styles.css +1 -1
  113. package/public/vendor/okjs/ok.esm.min.js +1 -1
  114. package/public/vendor/okjs/toolkit/components/ok-chart.ok.js +1 -1
  115. package/public/vendor/okjs/toolkit/components/ok-doc-viewer.ok.js +1 -1
  116. package/public/vendor/okjs/toolkit/components/ok-marked.ok.js +1 -1
  117. package/public/vendor/okjs/toolkit/components/ok-monaco.ok.js +1 -1
  118. package/types/okdb.d.ts +20 -0
  119. package/public/components/admin-route-host.ok.js +0 -1
  120. package/public/components/field.html +0 -158
  121. package/public/layouts/_default.ok.html +0 -3
  122. package/public/sections/api/index.ok.html +0 -1
  123. package/public/sections/auth/index.ok.html +0 -1
  124. package/public/sections/auth/modals/perm-info-popover.ok.js +0 -1
  125. package/public/sections/db/index.ok.html +0 -1
  126. package/public/sections/db/modals/add-item-modal.ok.js +0 -1
  127. package/public/sections/db/modals/create-fts-modal.ok.js +0 -1
  128. package/public/sections/db/modals/create-index-modal.ok.js +0 -1
  129. package/public/sections/db/modals/create-pipeline-modal.ok.js +0 -1
  130. package/public/sections/db/modals/schema-edit-modal.ok.js +0 -1
  131. package/public/sections/db/parts/db-overview.ok.js +0 -1
  132. package/public/sections/db/parts/edit-row.ok.js +0 -1
  133. package/public/sections/db/parts/type-changelog.ok.js +0 -1
  134. package/public/sections/db/parts/type-list.ok.js +0 -1
  135. package/public/sections/db/parts/type-pipelines-tab.ok.js +0 -1
  136. package/public/sections/db/parts/type-schema-tab.ok.js +0 -1
  137. package/public/sections/db/parts/type-viewer.ok.js +0 -1
  138. package/public/sections/db/parts/type-violations-tab.ok.js +0 -1
  139. package/public/sections/docs/index.ok.html +0 -1
  140. package/public/sections/embeddings/index.ok.html +0 -1
  141. package/public/sections/embeddings/modals/edit-pipeline-modal.ok.js +0 -1
  142. package/public/sections/embeddings/parts/embed-create-panel.ok.js +0 -1
  143. package/public/sections/embeddings/parts/embed-embedder-panel.ok.js +0 -1
  144. package/public/sections/embeddings/parts/embed-engine-declaration-editor.ok.js +0 -1
  145. package/public/sections/embeddings/parts/embed-engine-list.ok.js +0 -1
  146. package/public/sections/embeddings/parts/embed-indexer-panel.ok.js +0 -1
  147. package/public/sections/embeddings/parts/embed-lifecycle-bar.ok.js +0 -1
  148. package/public/sections/embeddings/parts/embed-overview.ok.js +0 -1
  149. package/public/sections/embeddings/parts/embed-search-panel.ok.js +0 -1
  150. package/public/sections/embeddings/parts/embed-worker-panel.ok.js +0 -1
  151. package/public/sections/embeddings/parts/embeddings-engine-panel.ok.js +0 -1
  152. package/public/sections/embeddings/parts/engines-overview.ok.js +0 -1
  153. package/public/sections/embeddings/parts/pipeline-create-panel.ok.js +0 -1
  154. package/public/sections/embeddings/parts/pipeline-flow-strip.ok.js +0 -1
  155. package/public/sections/engines/engine-ui-utils.js +0 -1
  156. package/public/sections/engines/index.ok.html +0 -1
  157. package/public/sections/engines/modals/engine-modal.ok.js +0 -1
  158. package/public/sections/engines/parts/engine-declaration-editor.ok.js +0 -1
  159. package/public/sections/engines/parts/generic-engine-panel.ok.js +0 -1
  160. package/public/sections/files/index.ok.html +0 -1
  161. package/public/sections/files/parts/files-collection-list.ok.js +0 -1
  162. package/public/sections/files/parts/files-collection-panel.ok.js +0 -1
  163. package/public/sections/files/parts/files-file-list.ok.js +0 -1
  164. package/public/sections/files/parts/files-path-browser.ok.js +0 -1
  165. package/public/sections/files/parts/files-preview.ok.js +0 -1
  166. package/public/sections/files/parts/files-upload-panel.ok.js +0 -1
  167. package/public/sections/functions/index.ok.html +0 -1
  168. package/public/sections/functions/modals/function-modal.ok.js +0 -1
  169. package/public/sections/functions/parts/function-detail.ok.js +0 -1
  170. package/public/sections/functions/parts/function-logs.ok.js +0 -1
  171. package/public/sections/functions/parts/function-runner.ok.js +0 -1
  172. package/public/sections/license/index.ok.html +0 -1
  173. package/public/sections/license/parts/license-panel.ok.js +0 -1
  174. package/public/sections/queue/index.ok.html +0 -1
  175. package/public/sections/queue/modals/create-bucket-modal.ok.js +0 -1
  176. package/public/sections/queue/modals/edit-bucket-modal.ok.js +0 -1
  177. package/public/sections/queue/modals/edit-job-modal.ok.js +0 -1
  178. package/public/sections/queue/modals/enqueue-job-modal.ok.js +0 -1
  179. package/public/sections/queue/modals/job-type-modal.ok.js +0 -1
  180. package/public/sections/queue/parts/job-log-panel.ok.js +0 -1
  181. package/public/sections/queue/parts/ok-job-form.ok.js +0 -1
  182. package/public/sections/queue/parts/queue-buckets.ok.js +0 -1
  183. package/public/sections/queue/parts/queue-job-types.ok.js +0 -1
  184. package/public/sections/queue/parts/queue-jobs.ok.js +0 -1
  185. package/public/sections/queue/parts/queue-types.ok.js +0 -1
  186. package/public/sections/queue/parts/queue-workers.ok.js +0 -1
  187. package/public/sections/sync/index.ok.html +0 -5
  188. package/public/sections/sync/parts/sync-node-detail.ok.js +0 -1
  189. package/public/sections/system/index.ok.html +0 -1
  190. package/public/sections/system/parts/system-api-panel.ok.js +0 -1
  191. package/public/sections/system/parts/system-auth-panel.ok.js +0 -1
  192. package/public/sections/system/parts/system-log.ok.js +0 -1
  193. package/public/sections/system/parts/system-processing-panel.ok.js +0 -1
  194. package/public/sections/system/parts/system-status.ok.js +0 -1
  195. package/public/sections/system/parts/system-storage-panel.ok.js +0 -1
  196. package/public/sections/system/parts/system-sync-panel.ok.js +0 -1
  197. package/public/sections/views/index.ok.html +0 -1
  198. package/public/sections/views/modals/create-view-modal.ok.js +0 -1
  199. package/public/sections/views/parts/views-list.ok.js +0 -1
  200. package/public/sections/views/parts/views-overview.ok.js +0 -1
  201. package/public/stores/functions-store.js +0 -1
  202. /package/public/{sections → core}/db/parts/tm-timeline.ok.js +0 -0
  203. /package/public/{util → core/db}/sift-schema.js +0 -0
  204. /package/public/{view-models → core/db}/type-query-vm.js +0 -0
  205. /package/public/{sections → core}/system/modals/data-ops-modal.ok.js +0 -0
  206. /package/public/{sections → core}/system/parts/system-locks-panel.ok.js +0 -0
  207. /package/public/{sections → core}/system/parts/system-log-history.ok.js +0 -0
  208. /package/public/{sections → core}/system/parts/system-process-panel.ok.js +0 -0
  209. /package/public/{sections → core}/system/parts/system-runtime-overview.ok.js +0 -0
  210. /package/public/{sections → features}/api/parts/api-endpoint.ok.js +0 -0
  211. /package/public/{sections → features}/auth/modals/create-token-modal.ok.js +0 -0
  212. /package/public/{sections → features}/auth/modals/edit-token-modal.ok.js +0 -0
  213. /package/public/{sections → features}/auth/parts/token-detail.ok.js +0 -0
  214. /package/public/{sections → features}/auth/parts/token-list.ok.js +0 -0
  215. /package/public/{sections → features}/files/parts/files-blob-status.ok.js +0 -0
  216. /package/public/{sections → features}/files/parts/files-overview.ok.js +0 -0
  217. /package/public/{sections → features}/functions/parts/functions-list.ok.js +0 -0
  218. /package/public/{sections/engines → features/pipelines}/engine-panel-shared-style.js +0 -0
  219. /package/public/{sections/embeddings → features/pipelines}/modals/register-model-modal.ok.js +0 -0
  220. /package/public/{sections/embeddings → features/pipelines}/modals/replace-embedder-modal.ok.js +0 -0
  221. /package/public/{sections/embeddings → features/pipelines}/parts/embed-model-catalog.ok.js +0 -0
  222. /package/public/{sections/engines → features/pipelines}/parts/engine-lifecycle-actions.ok.js +0 -0
  223. /package/public/{sections/engines → features/pipelines}/parts/engine-panel-shell.ok.js +0 -0
  224. /package/public/{sections/engines → features/pipelines}/parts/engine-resource-card.ok.js +0 -0
  225. /package/public/{sections/engines → features/pipelines}/parts/engine-row-item.ok.js +0 -0
  226. /package/public/{sections/embeddings → features/pipelines}/parts/pipeline-try-search.ok.js +0 -0
  227. /package/public/{sections → features}/queue/parts/code-panel.ok.js +0 -0
  228. /package/public/{sections → features}/sync/modals/connect-peer-modal.ok.js +0 -0
  229. /package/public/{sections → features}/sync/parts/sync-retention.ok.js +0 -0
  230. /package/public/{sections → features}/sync/parts/sync-topology.ok.js +0 -0
  231. /package/public/{sections → features}/views/parts/view-detail.ok.js +0 -0
  232. /package/public/{sections/db → shell}/modals/create-env-modal.ok.js +0 -0
  233. /package/public/{sections/db → shell}/modals/demo-env-modal.ok.js +0 -0
  234. /package/public/{sections/db → shell}/modals/remove-env-modal.ok.js +0 -0
@@ -1 +1 @@
1
- 'use strict';const _0x18991b=_0x4fa3;(function(_0x8ab393,_0x529e12){const _0x28d2d2=_0x4fa3,_0x2abe43=_0x8ab393();while(!![]){try{const _0xe53ac4=parseInt(_0x28d2d2(0x23c))/0x1*(parseInt(_0x28d2d2(0xcd))/0x2)+-parseInt(_0x28d2d2(0x11e))/0x3*(parseInt(_0x28d2d2(0x1e3))/0x4)+-parseInt(_0x28d2d2(0xde))/0x5+-parseInt(_0x28d2d2(0x173))/0x6*(parseInt(_0x28d2d2(0x13d))/0x7)+parseInt(_0x28d2d2(0x15c))/0x8*(parseInt(_0x28d2d2(0xbf))/0x9)+parseInt(_0x28d2d2(0xad))/0xa+parseInt(_0x28d2d2(0xbc))/0xb;if(_0xe53ac4===_0x529e12)break;else _0x2abe43['push'](_0x2abe43['shift']());}catch(_0x329d34){_0x2abe43['push'](_0x2abe43['shift']());}}}(_0x4a2b,0x22c22));var require$$0$5=require(_0x18991b(0x24f)),require$$1$1=require(_0x18991b(0x143)),require$$1=require('path'),require$$0$3=require('os'),require$$2=require('crypto'),require$$0=require(_0x18991b(0x294)),require$$0$2=require(_0x18991b(0x11c)),require$$0$1=require('fs'),require$$0$4=require(_0x18991b(0x221));function getDefaultExportFromCjs(_0x4e65a3){return _0x4e65a3&&_0x4e65a3['__esModule']&&Object['prototype']['hasOwnProperty']['call'](_0x4e65a3,'default')?_0x4e65a3['default']:_0x4e65a3;}var okdbHttpWorkerChild$1={},okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x42df32=_0x18991b;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x2a1467={'PUT':_0x42df32(0x20d),'REMOVE':_0x42df32(0x1a5),'INDEX_DROP':_0x42df32(0xb3),'INDEX_REGISTER':_0x42df32(0x1c9),'INDEX_RESET':_0x42df32(0xdd),'TYPE_REGISTER':_0x42df32(0xfd),'TYPE_DROP':_0x42df32(0x1eb),'FTS_REGISTER':'registerFts','FTS_DROP':_0x42df32(0x2d1),'FTS_RESET':_0x42df32(0x1ea),'SCHEMA_SET':_0x42df32(0x212),'SCHEMA_DROP':'dropSchema','TTL_SET':_0x42df32(0xed),'TTL_CLEAR':'clearTtl'},_0x4c2042={'SYSTEM_READY':'system:ready','FIELD_RESOLVER_REGISTERED':_0x42df32(0x1aa),'SYSTEM_STOPPED':_0x42df32(0x2a0),'SYSTEM_CLOCK_CHANGE':_0x42df32(0x288),'SYSTEM_POKE':_0x42df32(0x167),'SYSTEM_DRAIN':_0x42df32(0x286),'SYSTEM_TYPE_DROP':'system:type_drop','SYSTEM_PROC':_0x42df32(0xcc),'SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':_0x42df32(0xb9),'ITEM_UPDATE':_0x42df32(0x1c5),'ITEM_REMOVE':'item:remove','ITEM_PENDING':_0x42df32(0x2a6),'INDEX_RESET':_0x42df32(0x105),'INDEX_READY':_0x42df32(0xae),'INDEX_PROGRESS':_0x42df32(0x153),'VIEW_PROGRESS':'view:progress','INDEX_DROP':_0x42df32(0x1b4),'INDEX_REGISTERED':'index:registered','FTS_REGISTERED':_0x42df32(0x2a3),'FTS_DROP':_0x42df32(0x2c1),'FTS_RESET':'fts:reset','SCHEMA_SET':_0x42df32(0x19f),'SCHEMA_DROP':_0x42df32(0x2bd),'UNIQUE_VIOLATION':_0x42df32(0x1f4),'UNIQUE_VIOLATION_RESOLVED':_0x42df32(0x104),'REF_VIOLATION':_0x42df32(0xa2),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x42df32(0x1d5),'TXN_START':'txn:start','TXN_END':_0x42df32(0x1ed),'TXN_ROLLBACK':_0x42df32(0x1d3),'TYPE_REGISTERED':_0x42df32(0x200),'TYPE_DROP':_0x42df32(0x299),'ENV_OPENED':'env:opened','ENV_REMOVED':_0x42df32(0x186),'SYSTEM_ENV_RELEASE':_0x42df32(0xd3),'TTL_EXPIRED':_0x42df32(0x2a7),'TTL_SET':'ttl:set','TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x42df32(0x1fb),'LICENSE_ADDED':_0x42df32(0x229),'LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':_0x42df32(0xe4)},_0x1e2ad4={'CREATING':_0x42df32(0xc3),'RESETTING':_0x42df32(0x25b),'READY':_0x42df32(0x138),'DROPPING':_0x42df32(0x25e),'WAITING':'waiting','ERROR':_0x42df32(0x1d4)},_0x22dfdc={'CREATED':_0x42df32(0x99),'STARTING':'starting','STARTED':_0x42df32(0xc6),'STOPPING':_0x42df32(0x14a),'STOPPED':_0x42df32(0x13b)},_0x378746={'CREATING':'creating','READY':'ready','HALTED':'halted','STOPPED':_0x42df32(0x13b),'RESETTING':_0x42df32(0x25b)},_0x1d8289=Object[_0x42df32(0x1df)]({'POKE':_0x42df32(0x1dc),'DRAIN':'bus:drain','TYPE_DROP':_0x42df32(0x1b3),'PROC':_0x42df32(0x1c2),'ENV_RELEASE':_0x42df32(0x2dc)});return okdbEnums={'BUS_EVENTS':_0x1d8289,'CHANGE_ACTIONS':_0x2a1467,'EVENTS':_0x4c2042,'INDEX_STATE':_0x1e2ad4,'OKDB_STATE':_0x22dfdc,'VIEW_STATE':_0x378746},okdbEnums;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x404aeb=_0x18991b;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x585dec,performance:_0x25ab9c}=require$$0,_0x224969=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG==='true',_0x54fdc4=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x31952f=process.env.OKDB_LOOP_LAG_ALL==='1',_0x3f60ef=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x294e76{constructor(){const _0x3c63dd=_0x4fa3;this[_0x3c63dd(0x11b)]=_0x224969,this['_buckets']=new Map(),this['_h']=null,this[_0x3c63dd(0x1bf)]=null,this['_started']=![],this['_log']=(_0xba86a2,_0x26955b)=>process[_0x3c63dd(0x2aa)][_0x3c63dd(0x1b0)](_0xba86a2+(_0x26955b?'\x20'+JSON['stringify'](_0x26955b):'')+'\x0a');}[_0x404aeb(0x194)](){const _0xd095cd=_0x404aeb;return _0x25ab9c[_0xd095cd(0x194)]();}[_0x404aeb(0x14e)](_0x4ceee3){const _0x3c78c3=_0x404aeb;if(typeof _0x4ceee3===_0x3c78c3(0x28f))this['_log']=_0x4ceee3;}[_0x404aeb(0x1a4)](_0x2ec508,_0x240c8a,_0x1b1b63){const _0x3a23a7=_0x404aeb;if(!this[_0x3a23a7(0x11b)])return;let _0x1028ef=this[_0x3a23a7(0x27e)][_0x3a23a7(0x10a)](_0x2ec508);!_0x1028ef&&(_0x1028ef={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x3a23a7(0x27e)]['set'](_0x2ec508,_0x1028ef)),_0x1028ef['ms']+=_0x240c8a,_0x1028ef['count']+=0x1,_0x240c8a>_0x1028ef[_0x3a23a7(0x2da)]&&(_0x1028ef[_0x3a23a7(0x2da)]=_0x240c8a,_0x1028ef['maxExtra']=_0x1b1b63||'');}['start'](_0x329888){const _0x547790=_0x404aeb;if(!this[_0x547790(0x11b)]||this['_started'])return;this[_0x547790(0x220)]=!![];if(_0x329888)this[_0x547790(0x10c)]=_0x329888;this['_h']=_0x585dec({'resolution':0xa}),this['_h'][_0x547790(0x16c)](),this['_timer']=setInterval(()=>this[_0x547790(0x209)](),_0x54fdc4);if(this[_0x547790(0x1bf)][_0x547790(0x232)])this[_0x547790(0x1bf)][_0x547790(0x232)]();}[_0x404aeb(0xbd)](_0x349843){const _0x196b32=_0x404aeb;if(!this['_windowCbs'])this[_0x196b32(0x2cb)]=new Set();this[_0x196b32(0x2cb)][_0x196b32(0x9e)](_0x349843);if(!this['_started'])this[_0x196b32(0xc2)]();}[_0x404aeb(0xb1)](_0x5377ac){const _0x34c142=_0x404aeb;this[_0x34c142(0x2cb)]?.['delete'](_0x5377ac);}['_startAdmission'](){const _0x42b3bd=_0x404aeb;if(this['_admissionStarted'])return;this[_0x42b3bd(0x157)]=!![];!this['_h']&&(this['_h']=_0x585dec({'resolution':0xa}),this['_h'][_0x42b3bd(0x16c)]());const _0x3ac7b9=_0x54fdc4;this['_admissionTimer']=setInterval(()=>{const _0x442af9=_0x42b3bd,_0x272a21=this['_h'];if(!_0x272a21)return;const _0x3996d7=_0x272a21[_0x442af9(0x27a)](0x63)/0xf4240,_0x158c64=_0x272a21[_0x442af9(0x2c5)]/0xf4240,_0x45fd20=_0x272a21['mean']/0xf4240;_0x272a21[_0x442af9(0x21e)]();if(this['_windowCbs'])for(const _0x320f68 of this['_windowCbs']){try{_0x320f68({'p99Ms':_0x3996d7,'maxMs':_0x158c64,'meanMs':_0x45fd20,'reportMs':_0x3ac7b9});}catch{}}},_0x3ac7b9);if(this[_0x42b3bd(0x23a)]['unref'])this[_0x42b3bd(0x23a)][_0x42b3bd(0x232)]();}[_0x404aeb(0x209)](){const _0x27135a=_0x404aeb,_0x24fe04=this['_h'],_0x395cbe=_0x24fe04[_0x27135a(0x2c5)]/0xf4240,_0x4376ba=_0x24fe04[_0x27135a(0x27a)](0x63)/0xf4240,_0x170c0e=_0x24fe04['mean']/0xf4240;_0x24fe04[_0x27135a(0x21e)]();const _0x10bfe5=[...this[_0x27135a(0x27e)][_0x27135a(0x206)]()][_0x27135a(0x284)](([_0x2e524f,_0x23f910])=>({'label':_0x2e524f,..._0x23f910}))[_0x27135a(0x2a2)]((_0xfbbcc0,_0x161b60)=>_0x161b60['ms']-_0xfbbcc0['ms'])['slice'](0x0,0x8);this[_0x27135a(0x27e)][_0x27135a(0x118)]();const _0x200d53=_0x10bfe5[_0x27135a(0x201)]((_0xe16e16,_0x20caa8)=>_0xe16e16+_0x20caa8['ms'],0x0),_0x2c1fa6=_0x10bfe5['map'](_0x4ae90a=>_0x4ae90a[_0x27135a(0x257)]+'='+_0x4ae90a['ms'][_0x27135a(0x1d9)](0x0)+'ms/'+_0x4ae90a[_0x27135a(0xfc)]+(_0x4ae90a[_0x27135a(0x2da)]>0x5?_0x27135a(0xe3)+_0x4ae90a[_0x27135a(0x2da)][_0x27135a(0x1d9)](0x0)+'ms'+(_0x4ae90a[_0x27135a(0x1bd)]?'\x20'+_0x4ae90a[_0x27135a(0x1bd)]:'')+')':''));(_0x31952f||_0x395cbe>=_0x3f60ef)&&this[_0x27135a(0x10c)]('loop-lag\x20'+_0x54fdc4+_0x27135a(0x17a)+_0x395cbe['toFixed'](0x0)+_0x27135a(0x12b)+_0x4376ba[_0x27135a(0x1d9)](0x0)+_0x27135a(0x190)+_0x170c0e['toFixed'](0x0)+'ms\x20busy='+_0x200d53['toFixed'](0x0)+'ms'+(_0x2c1fa6[_0x27135a(0x287)]?_0x27135a(0x148)+_0x2c1fa6[_0x27135a(0x296)]('\x20\x20'):''),{'feature':_0x27135a(0x276)});if(this[_0x27135a(0x2cb)])for(const _0x4a1598 of this[_0x27135a(0x2cb)]){try{_0x4a1598({'p99Ms':_0x4376ba,'maxMs':_0x395cbe,'meanMs':_0x170c0e,'reportMs':_0x54fdc4});}catch{}}}['stop'](){const _0x35bf7d=_0x404aeb;if(this[_0x35bf7d(0x1bf)])clearInterval(this[_0x35bf7d(0x1bf)]);if(this['_h'])this['_h'][_0x35bf7d(0xf3)]();this[_0x35bf7d(0x1bf)]=null,this['_h']=null,this[_0x35bf7d(0x220)]=![];}}const _0x5a652f=new _0x294e76();if(_0x5a652f['enabled'])_0x5a652f[_0x404aeb(0x269)]();return okdbLoopMonitor={'LOOP':_0x5a652f},okdbLoopMonitor;}function _0x4a2b(){const _0x35206c=['toFixed','building','signalWant','bus:poke','INDEX_PROGRESS','_heartbeatTimer','freeze','repeat','online','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','53036KFGOLI','ITEM_CREATE','_outstanding','_refreshDesiredSnapshot','procmode/','win32','assign','resetFts','dropType','_lastCpuAt','txn:end','_instanceId','commitsPerSec','setupPrimary','transaction','keys','toISOString','unique:violation','_assertUsable','INDEX_READY','confirm','_onItem','functions','test','license:invalid','REMOVE','slice','expiresAt','processor:progress','type:registered','reduce','_db','liveThreadStats','_heartbeatInFlight','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','entries','ms\x20activeWriters=','--print','_report','worker','status','paused','put','force','nodesView','_servingEngines','flushed','setSchema','type','_baselines','_lockDb',':want','next','_scheduleFlush','registry\x20heartbeat\x20skipped\x20(writer=','__vocab/version','_key','putNode','_startedAt','reset','send','_started','node:events','envsOpen','name','_putRowSync','_coordinator','okdb','pushEphemeral','reportThreadStats','license:added','ephemeral','default','has','okdb-http-worker-child:\x20rootPath\x20and\x20port\x20required','\x0a===\x20OKDB_DIAG\x20','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.','_supervisorKey','markClosed','unref','FTS_RESET','instances','decommissioned','_inflight','--eval','appendFileSync','process\x20','_admissionTimer','cpus','251063kmIdnI','writerStatus','rows=','cli','_committed','_kind','uptime','_wantDbHandle','lifecycle','_handleInProcess','_putRowAsync','dead','_wantDb','updatedAt','_highWater','inst:','attachFeed','\x0a\x20\x20\x20\x20\x20\x20','deregisterSelf','./okdb','_threadStats',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','string','acquiredAt','_holderDead','_sampleOwnStats','from','label','meta','_draining','_statusEnv','resetting','cluster-wide','stopHeartbeat','dropping','release','_handlePoke','_lastCpuUsage','state','_flushTimer','_envs','_getType','allSettled','listening','[okdb-cluster]\x20worker\x20pid=','start','copy','parkedNow','INDEX_REGISTERED','__okdbCluster','processorId','execArgv','reap','openDB','_enqueuedAt','_closed','_startHeartbeat','min','loop-lag','_lockDbOf','okdb-writer[','selfKey','percentile','disconnect','_activateProcesses','__okdbSlot','_buckets','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','includes','setDesired','msg','isConnected','map','_isStale','system:drain','length','system:clock_change','heartbeatMs','_onPoke','[okdb-cluster]\x20primary\x20pid=','setOwnMeta','processor','_quantum','function','slot','_rowKey','env','slotKey','node:perf_hooks','message','join','isEnabled','_enableChangelog','type:drop','cpuPct','_bpParkedTotal','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','_isWriter','noteListenAddr','_done','system:stopped','some','sort','fts:registered','registry-publish','push','item:pending','ttl:expired','uncaughtException','\x20\x20(no\x20env\x20draining)','stderr','unclaimed','view','exports','primary','inflightAgesMs','_writer','\x20forked\x20','raw-remove','okdb-http-worker-child:\x20OKDB_HTTP_CHILD\x20env\x20config\x20missing','\x20ipc\x20error:\x20','log','stack','_bpWaiters','_versionSkewWarned','ITEM_UPDATE','childTransaction','\x20pid=','_dedupeMax','schema:drop','participate','getClock','cpuWindowMs','fts:drop','supervisorKey','floor','_publishFailWarned','max','heapUsed','ENV_CLOSING_RETRY','_lock','kind','size','_windowCbs','getDesired','null','set','_ensureDesired','role','dropFts','mode','\x20\x20#','process','~processes','_onTick','listNodes','engines','_sandbox','maxMs','_desired','bus:env_release','_buildProcessingFacet','race','_buildChildRow','threads','fanout','ms\x20env=','created','ensureType','list','standalone','pid','add','_handlePending','kill','afterWrite','ref:violation','_desiredOverlay','_cursors','_clusterWorkerAttached','_pending','tierList','_durs','isWanted','node/','startedAt','draining','1256440hSyvWo','index:ready','attach','node','offWindow','ingest','dropIndex','FTS_REGISTERED','[okdb-cluster]\x20respawning\x20worker\x20slot=','flushLmdb',',\x20signal=','_collectSingletonClaims','item:create','_heldTotal','FTS_DROP','3600971jwjnFf','onWindow','_nodeDead','72Lprgno','removeSync','resetReadTxn','_startAdmission','creating','_singletonLock','quantum','started','clusterStatusView','CHANGEFEED_QUANTUM','consecutiveFailures','recordWrite','_processStartedAt','system:proc','2OaYMFw','once','\x20(durable\x20desired-state)','_nodeDbCache','_caps','\x20writer{depth=','system:env_release','cursorKey','SYSTEM_STOPPED','_lastPublishAt','_onStop','randomUUID','change','_selfKey','queue-worker','_drainOne','resetIndex','1255260zcqhKW','ESRCH','\x20while\x20this\x20process\x20runs\x20','removeSupervisedChild','caps','(worst\x20','license:removed','_markSeen','stats','entry','\x20—\x20','http','processingSig','sandbox','createEnvironment','setTtl','nodeKey','indexOf','oldestPendingMs','okdb-writer:\x20env\x20closing\x20—\x20retry','processKey','disable','SWAP','replace','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','_lastCpuPct','namespace','_publishNow','clearThreadStats','--watch','count','registerType','external','compaction','1ofN:','splice','_nodeDb','level','unique:violation_resolved','index:reset','find','_changefeed','isWorker','singletonClaims','get','processorsView','_log','emit','\x20HTTP\x20server(s)\x20on\x20port\x20','hasDesired','_groupByProcess','epoch','round','decommissioning','listen','claimGated','register','migrations','clear','_nodeDbFor','events','enabled','perf_hooks','\x20@\x20','57nhQnkx','_dedupeKey','_drain','SYSTEM_POKE','commit','ppid','trim','_systemEnv','http\x20worker\x20child\x20failed:\x20','_collectWriterFacet','\x20phase=','\x20(slot=','ms\x20on\x20env=','ms\x20p99=','putSync','addSupervisedChild','connected','processor:paused','claims','rss','single','prependListener','cpuUsage','_flushDebounce','isPrimary','treeView','ready','_singletonLocks','_seen','stopped','isHeld','1306907tRUqSQ','close','async','unhandledRejection','\x20worker\x20slot=','processor:resumed','cluster','shift','_children','holder','_role','\x20│\x20','off','stopping','ITEM_REMOVE','inspect','delete','setLogger','depth','hard-killed','stringify','committed','index:progress','_rootDb','running','system','_admissionStarted','workers','[okdb-cluster]\x20slot=','--inspect','detachConsole','127976eShAHA','all','\x20===',');\x20','listAll','host','--test','_buildOwnRow','\x20parkedNow=','_released','okdb-http-worker-child.js','system:poke','~processes:cmd','warn','_held','listDesired','enable','_clusterOnMessage','code','children','\x20sync','registry\x20publish\x20failing:\x20','version','6ZnzWtP','heapTotal',')\x20exited\x20','raw-put','user','open','mkdirSync','ms\x20max=','(code=','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','dumpedAt','decommission','values','ttlMs','startsWith','publishChildRow','deaths','respawnTimer','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','env:removed','_hbTimer','path','processor:error','processor:ready','split','_maybePublish','_onPending','_ownMeta','number','ms\x20mean=','data','_onProcEvent','object','now','filter','\x20in\x20','removeNode','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','hostname','ITEM_PENDING','closing','processors','recent\x20writes\x20(newest\x20first)','platform','schema:set','busy','beforeWrite','reject','_adminRelay','note','remove','processes','\x20worker(s)\x20remaining','stop','.log','field:resolver_registered','_listenAddr','_acquiredAt','catch','then','commitP99Ms','write','listenAddr','parse','bus:type_drop','index:drop','resolve','ORPHAN\x20(env-closed\x20write)','processing','processingStatusView','load','_rawDb','getRange','options','maxExtra','event','_timer','sync','transactionSync','bus:proc','publishOwnRow',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','item:update','value','exit','_cmd','registerIndex','info','runtimeProcessesView','isDead','_nestedTotal','_isReader','okdb-lock:\x20env\x20closed','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','_pendingLocal','embedded','txn:rollback','error','sync:apply','_removeRowAsync','http-server','getCmd'];_0x4a2b=function(){return _0x35206c;};return _0x4a2b();}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x99f122=require$$0$1,_0x7ed2ea=require$$1;let _0x2543b0,_0x4314c0,_0x495a15,_0x218129,_0x252879,_0x3372f3,_0x2ed96c,_0x4f8523=![];const _0x5ab3a6=new Set();let _0x27350b=null;const _0x2c5595=new Map();function _0x1b8935(){const _0x3c4847=_0x4fa3;if(_0x2543b0!==undefined)return _0x2543b0;_0x2543b0=process.env.OKDB_DIAG==='1';if(!_0x2543b0)return![];_0x4314c0=process.env.OKDB_DIAG_STACK==='1',_0x218129=Math[_0x3c4847(0x2c5)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x495a15=new Array(_0x218129),_0x252879=0x0,_0x3372f3=0x0,_0x2ed96c=process.env.OKDB_DIAG_DIR||null;if(_0x2ed96c)try{_0x99f122[_0x3c4847(0x179)](_0x2ed96c,{'recursive':!![]});}catch{}return!![];}function _0x18bcb4(){return _0x2543b0===undefined?_0x1b8935():_0x2543b0;}function _0xce2e37(_0x318633,_0x2a17a1){const _0x366d7b=_0x4fa3;if(_0x2543b0===undefined?!_0x1b8935():!_0x2543b0)return;let _0x5d0057;if(_0x4314c0){const _0x2e59a5=new Error()[_0x366d7b(0x2b6)]||'';_0x5d0057=_0x2e59a5['split']('\x0a')[_0x366d7b(0x1fd)](0x3)[_0x366d7b(0x284)](_0x51a5fa=>_0x51a5fa[_0x366d7b(0x124)]())[_0x366d7b(0x195)](Boolean)[_0x366d7b(0x1fd)](0x0,0x8);}_0x495a15[_0x252879]={'seq':_0x3372f3++,'t':Date['now'](),'env':_0x318633,'kind':_0x2a17a1||_0x366d7b(0x122),'stack':_0x5d0057},_0x252879=(_0x252879+0x1)%_0x218129;}function _0x57ef7c(_0x3d99d2){const _0x24b543=_0x4fa3,_0x7fc66a=[];for(let _0x2fbe15=0x0;_0x2fbe15<_0x218129;_0x2fbe15++){const _0x1e314e=_0x495a15[(_0x252879-0x1-_0x2fbe15+_0x218129*0x2)%_0x218129];if(!_0x1e314e)continue;_0x7fc66a[_0x24b543(0x2a5)](_0x1e314e);if(_0x7fc66a[_0x24b543(0x287)]>=_0x3d99d2)break;}return _0x7fc66a;}function _0x519478(_0x512f55){const _0x42734d=_0x4fa3;try{process[_0x42734d(0x2aa)][_0x42734d(0x1b0)](_0x512f55+'\x0a');}catch{}if(_0x2ed96c)try{_0x99f122[_0x42734d(0x238)](_0x7ed2ea['join'](_0x2ed96c,'okdb-diag.'+process['pid']+_0x42734d(0x1a9)),_0x512f55+'\x0a');}catch{}}function _0x22ac14(_0xd12040){const _0x3cb167=_0x4fa3,_0xdf8794=_0x57ef7c(_0xd12040);if(!_0xdf8794[_0x3cb167(0x287)])return _0x3cb167(0x1e2);const _0x17697b=Date['now']();return _0xdf8794['map'](_0x18aafc=>{const _0x504aec=_0x3cb167,_0x4c16b4=_0x504aec(0x2d3)+_0x18aafc['seq']+'\x20-'+(_0x17697b-_0x18aafc['t'])+_0x504aec(0x2e2)+_0x18aafc[_0x504aec(0x292)]+'\x20'+_0x18aafc[_0x504aec(0x2c9)];return _0x18aafc[_0x504aec(0x2b6)]&&_0x18aafc['stack']['length']?_0x4c16b4+'\x0a\x20\x20\x20\x20\x20\x20'+_0x18aafc[_0x504aec(0x2b6)][_0x504aec(0x296)](_0x504aec(0x24d)):_0x4c16b4;})[_0x3cb167(0x296)]('\x0a');}function _0x4a6ea1(_0x58201e,_0xc98ebb){const _0x3a7232=_0x4fa3,_0x14b7b1=_0x3a7232(0x22e)+_0x58201e+_0x3a7232(0x11d)+new Date()[_0x3a7232(0x1f3)]()+_0x3a7232(0x2bb)+process['pid']+'\x20===',_0x38a5d4=[_0x14b7b1,'error:\x20'+(_0xc98ebb&&_0xc98ebb[_0x3a7232(0x2b6)]?_0xc98ebb['stack'][_0x3a7232(0x18b)]('\x0a')[0x0]:_0xc98ebb),_0x3a7232(0x19d)+(_0x4314c0?'':_0x3a7232(0x205))+':',_0x22ac14(0x18),_0x55092b(),'='[_0x3a7232(0x1e0)](_0x14b7b1[_0x3a7232(0x287)]-0x1)];_0x519478(_0x38a5d4[_0x3a7232(0x296)]('\x0a'));}function _0x538f84(_0x60ad7e){const _0x596521=_0x4fa3;if(!_0x18bcb4())return;const _0x41b6f8=String(_0x60ad7e&&_0x60ad7e[_0x596521(0x295)]||_0x60ad7e||''),_0x38bd69=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x596521(0x1fa)](_0x41b6f8);_0x4a6ea1(_0x38bd69?_0x596521(0x1b6):_0x596521(0x2a8),_0x60ad7e);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x38bd69)return;try{console[_0x596521(0x1d4)](_0x60ad7e&&_0x60ad7e[_0x596521(0x2b6)]?_0x60ad7e[_0x596521(0x2b6)]:_0x60ad7e);}catch{}process[_0x596521(0x1c7)](0x1);}function _0x533142(_0x49e122){const _0x227077=_0x4fa3;if(!_0x18bcb4())return;const _0x3ccacc=String(_0x49e122&&_0x49e122[_0x227077(0x295)]||_0x49e122||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x227077(0x1fa)](_0x3ccacc)&&_0x4a6ea1(_0x227077(0x185),_0x49e122);}function _0x55092b(){const _0x3f94d3=_0x4fa3,_0x516943=[_0x3f94d3(0x27f)];let _0x51864b=![];for(const _0x402c3b of _0x5ab3a6){const _0x5f05cb=_0x402c3b&&_0x402c3b[_0x3f94d3(0x264)];if(!_0x5f05cb)continue;for(const [_0x12db94,_0x310779]of _0x5f05cb){const _0x245d2c=_0x310779&&_0x310779[_0x3f94d3(0x225)]&&_0x310779['_coordinator'][_0x3f94d3(0x2ac)];if(!_0x245d2c)continue;let _0x36418c,_0x4857c6;try{_0x36418c=Atomics['load'](_0x245d2c,0x0),_0x4857c6=Atomics[_0x3f94d3(0x1b9)](_0x245d2c,0x1);}catch{continue;}if(_0x36418c===0x0)continue;_0x51864b=!![];const _0x2ac662=_0x36418c>0x0?_0x3f94d3(0xf4):_0x3f94d3(0x26a),_0x1c1984=Date[_0x3f94d3(0x194)]()-Math['abs'](_0x36418c)*0x3e8,_0x22d3f4=((()=>{const _0x3981a8=_0x3f94d3;try{return _0x310779[_0x3981a8(0x2b0)]&&_0x310779[_0x3981a8(0x2b0)][_0x3981a8(0x20b)]?_0x310779[_0x3981a8(0x2b0)][_0x3981a8(0x20b)]():null;}catch{return null;}})());_0x516943[_0x3f94d3(0x2a5)]('\x20\x20env='+_0x12db94+_0x3f94d3(0x128)+_0x2ac662+'\x20drainAge='+_0x1c1984+_0x3f94d3(0x207)+_0x4857c6+(_0x22d3f4?_0x3f94d3(0xd2)+_0x22d3f4[_0x3f94d3(0x14f)]+'\x20oldestPendingMs='+_0x22d3f4[_0x3f94d3(0xf0)]+_0x3f94d3(0x164)+_0x22d3f4['parkedNow']+'}':''));}}if(!_0x51864b)_0x516943[_0x3f94d3(0x2a5)](_0x3f94d3(0x2a9));return _0x516943[_0x3f94d3(0x296)]('\x0a');}function _0x576054(){const _0x182712=_0x4fa3;if(!_0x18bcb4())return;const _0x38ae2b=Math[_0x182712(0x2c5)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x2cec31=Date[_0x182712(0x194)]();for(const _0xe5c372 of _0x5ab3a6){const _0x305c93=_0xe5c372&&_0xe5c372[_0x182712(0x264)];if(!_0x305c93)continue;for(const [_0x347408,_0x4fca1c]of _0x305c93){const _0x3bd5ed=_0x4fca1c&&_0x4fca1c[_0x182712(0x225)]&&_0x4fca1c[_0x182712(0x225)]['view'];if(!_0x3bd5ed)continue;let _0x34ffd1;try{_0x34ffd1=Atomics[_0x182712(0x1b9)](_0x3bd5ed,0x0);}catch{continue;}const _0x5525bb=_0xe5c372[_0x182712(0x188)]+'|'+_0x347408;if(_0x34ffd1<=0x0){_0x2c5595[_0x182712(0x14d)](_0x5525bb);continue;}const _0x878afa=_0x2cec31-_0x34ffd1*0x3e8,_0x2dc946=_0x2c5595[_0x182712(0x10a)](_0x5525bb);if(_0x878afa<_0x38ae2b)continue;if(_0x2dc946&&_0x2cec31-_0x2dc946[_0x182712(0x17d)]<_0x38ae2b)continue;_0x2c5595[_0x182712(0x2ce)](_0x5525bb,{'firstTs':_0x2dc946?_0x2dc946['firstTs']:_0x34ffd1,'dumpedAt':_0x2cec31});const _0x736224='\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20'+_0x878afa+_0x182712(0x12a)+_0x347408+'\x20@\x20'+new Date()['toISOString']()+_0x182712(0x2bb)+process[_0x182712(0x9d)]+_0x182712(0x15e);_0x519478([_0x736224,_0x55092b(),'='[_0x182712(0x1e0)](_0x736224[_0x182712(0x287)]-0x1)]['join']('\x0a'));}}}function _0x5a048d(){const _0x8ee659=_0x4fa3;if(!_0x18bcb4()||_0x4f8523)return;_0x4f8523=!![],process[_0x8ee659(0x133)](_0x8ee659(0x2a8),_0x538f84),process[_0x8ee659(0x133)](_0x8ee659(0x140),_0x533142);const _0x45a04c=Math[_0x8ee659(0x2c5)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x27350b=setInterval(_0x576054,_0x45a04c);if(_0x27350b[_0x8ee659(0x232)])_0x27350b[_0x8ee659(0x232)]();}function _0x4e9beb(_0x4a95dd){if(!_0x18bcb4()||!_0x4a95dd)return;_0x5ab3a6['add'](_0x4a95dd),_0x5a048d();}function _0x12a295(_0x141f52){const _0x20b8bd=_0x4fa3;_0x5ab3a6[_0x20b8bd(0x14d)](_0x141f52);}function _0x5b8e0c(){const _0x3b1cb2=_0x4fa3;if(!_0x18bcb4())return{'enabled':![],'hint':_0x3b1cb2(0x29c)};return{'enabled':!![],'stackCapture':!!_0x4314c0,'recentWrites':_0x57ef7c(0x10),'drain':_0x55092b()};}return okdbDiag={'isEnabled':_0x18bcb4,'recordWrite':_0xce2e37,'installDiag':_0x5a048d,'registerOkdb':_0x4e9beb,'unregisterOkdb':_0x12a295,'snapshot':_0x5b8e0c},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x9ffe74=_0x18991b;if(hasRequiredOkdbWriter)return okdbWriter[_0x9ffe74(0x2ad)];hasRequiredOkdbWriter=0x1;const {performance:_0x1780b2}=require$$0$2,_0x8b5608=requireOkdbDiag(),_0x5a0c48=process.env.OKDB_COMMIT_MODE===_0x9ffe74(0x1c0);class _0x41c781{constructor(_0x43d5d2){const _0x53f742=_0x9ffe74;this[_0x53f742(0x292)]=_0x43d5d2,this[_0x53f742(0x236)]=new Set(),this[_0x53f742(0x272)]=new Map(),this[_0x53f742(0x240)]=0x0,this[_0x53f742(0xa8)]=[],this['_done']=[],this[_0x53f742(0x24a)]=Math[_0x53f742(0x2c5)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x53f742(0x1e5)]=0x0,this['_bpWaiters']=[],this['_bpParkedTotal']=0x0,this['_held']=null,this[_0x53f742(0xba)]=0x0,this[_0x53f742(0x1cd)]=0x0,this['_nestedWarned']=![];}async[_0x9ffe74(0x1f1)](_0x250436,_0x48ed2d,{admitted:admitted=![]}={}){const _0x557780=_0x9ffe74;if(_0x8b5608[_0x557780(0x297)]())_0x8b5608[_0x557780(0xca)](this[_0x557780(0x292)]?.[_0x557780(0x223)],_0x48ed2d);if(this['_closed']){const _0x4470a4=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x4470a4[_0x557780(0x16e)]=_0x557780(0x2c7);throw _0x4470a4;}if(this[_0x557780(0x24a)]>0x0){let _0x3f4606=![];while(this['_outstanding']>=this['_highWater']&&!this[_0x557780(0x273)]){!_0x3f4606&&(_0x3f4606=!![],this['_bpParkedTotal']++),await new Promise(_0x5a744f=>this['_bpWaiters']['push'](_0x5a744f));}if(this[_0x557780(0x273)]){const _0x17a00d=new Error(_0x557780(0xf1));_0x17a00d[_0x557780(0x16e)]=_0x557780(0x2c7);throw _0x17a00d;}}this['_outstanding']++;const _0x60f8d5=admitted?null:this['env']['_coordinator'];for(;;){while(this['_held'])await this[_0x557780(0x16a)];if(_0x60f8d5)try{await _0x60f8d5[_0x557780(0x1a1)]();}catch(_0xdd3705){this['_outstanding']--;if(this[_0x557780(0x2b7)]['length']&&this[_0x557780(0x1e5)]<this[_0x557780(0x24a)])this[_0x557780(0x2b7)]['shift']()();throw _0xdd3705;}if(!this['_held'])break;if(_0x60f8d5)_0x60f8d5[_0x557780(0xa1)]();}if(this[_0x557780(0x273)]){if(_0x60f8d5)_0x60f8d5[_0x557780(0xa1)]();this[_0x557780(0x1e5)]--;if(this['_bpWaiters'][_0x557780(0x287)]&&this[_0x557780(0x1e5)]<this[_0x557780(0x24a)])this[_0x557780(0x2b7)][_0x557780(0x144)]()();const _0x2a37be=new Error(_0x557780(0xf1));_0x2a37be[_0x557780(0x16e)]=_0x557780(0x2c7);throw _0x2a37be;}const _0x546577=_0x1780b2['now']();if(_0x5a0c48)try{const _0x1407fe=this[_0x557780(0x292)]['db'][_0x557780(0x1c1)](_0x250436);this['_committed']++;if(this[_0x557780(0xa8)][_0x557780(0x2a5)](_0x1780b2['now']()-_0x546577)>0x100)this['_durs'][_0x557780(0x144)]();if(this[_0x557780(0x29f)][_0x557780(0x2a5)](_0x1780b2[_0x557780(0x194)]())>0x800)this['_done'][_0x557780(0x144)]();return _0x1407fe;}finally{this['_outstanding']--;if(this[_0x557780(0x2b7)][_0x557780(0x287)]&&this[_0x557780(0x1e5)]<this[_0x557780(0x24a)])this[_0x557780(0x2b7)][_0x557780(0x144)]()();if(_0x60f8d5)_0x60f8d5['afterWrite']();}let _0x4ecd1c=null;const _0x3a0449=()=>{const _0x5d2bb2=_0x557780,_0x8026f4=_0x250436();if(_0x8026f4&&typeof _0x8026f4[_0x5d2bb2(0x1ae)]===_0x5d2bb2(0x28f)&&!_0x4ecd1c){this[_0x5d2bb2(0xba)]++;let _0x376673;const _0x383d65=new Promise(_0x803dad=>_0x376673=_0x803dad);this['_held']=_0x383d65,_0x4ecd1c=()=>{const _0x51c45d=_0x5d2bb2;if(this[_0x51c45d(0x16a)]===_0x383d65)this[_0x51c45d(0x16a)]=null;_0x376673();};}return _0x8026f4;};let _0x16addc;try{_0x16addc=this[_0x557780(0x292)]['db'][_0x557780(0x2ba)](_0x3a0449);}catch(_0x5d0433){_0x16addc=Promise[_0x557780(0x1a2)](_0x5d0433);}(!_0x16addc||typeof _0x16addc[_0x557780(0x1ae)]!==_0x557780(0x28f))&&(this[_0x557780(0x1cd)]++,!this['_nestedWarned']&&(this['_nestedWarned']=!![],console[_0x557780(0x169)](_0x557780(0x278)+(this['env']?.[_0x557780(0x223)]??'?')+_0x557780(0x251))),_0x16addc=Promise[_0x557780(0x1b5)](_0x16addc));const _0x34ad46=()=>{if(_0x4ecd1c)_0x4ecd1c();};_0x16addc[_0x557780(0x1ae)](_0x34ad46,_0x34ad46),this[_0x557780(0x236)][_0x557780(0x9e)](_0x16addc),this[_0x557780(0x272)]['set'](_0x16addc,_0x546577);const _0x4b2de5=()=>{const _0x1654e1=_0x557780;this[_0x1654e1(0x236)]['delete'](_0x16addc),this['_enqueuedAt'][_0x1654e1(0x14d)](_0x16addc),this[_0x1654e1(0x240)]++,this['_outstanding']--;this[_0x1654e1(0x2b7)][_0x1654e1(0x287)]&&this[_0x1654e1(0x1e5)]<this['_highWater']&&this['_bpWaiters'][_0x1654e1(0x144)]()();if(this[_0x1654e1(0xa8)][_0x1654e1(0x2a5)](_0x1780b2[_0x1654e1(0x194)]()-_0x546577)>0x100)this[_0x1654e1(0xa8)][_0x1654e1(0x144)]();if(this['_done'][_0x1654e1(0x2a5)](_0x1780b2['now']())>0x800)this[_0x1654e1(0x29f)][_0x1654e1(0x144)]();};_0x16addc[_0x557780(0x1ae)](_0x4b2de5,_0x4b2de5);try{return await _0x16addc;}finally{if(_0x60f8d5)_0x60f8d5[_0x557780(0xa1)]();}}[_0x9ffe74(0x20b)](){const _0x3d638c=_0x9ffe74,_0xf6e6a6=_0x1780b2[_0x3d638c(0x194)]();let _0x1a1d60=0x0;for(const _0xf307fc of this[_0x3d638c(0x272)]['values']()){const _0x9b890d=_0xf6e6a6-_0xf307fc;if(_0x9b890d>_0x1a1d60)_0x1a1d60=_0x9b890d;}let _0x492015=0x0;for(let _0x5544b0=this['_done'][_0x3d638c(0x287)]-0x1;_0x5544b0>=0x0;_0x5544b0--){if(_0xf6e6a6-this['_done'][_0x5544b0]>0x3e8)break;_0x492015++;}let _0x354f24=0x0;if(this[_0x3d638c(0xa8)][_0x3d638c(0x287)]){const _0x47d1bf=[...this[_0x3d638c(0xa8)]][_0x3d638c(0x2a2)]((_0x87f67b,_0x1977dc)=>_0x87f67b-_0x1977dc);_0x354f24=_0x47d1bf[Math[_0x3d638c(0x275)](_0x47d1bf[_0x3d638c(0x287)]-0x1,Math[_0x3d638c(0x2c3)](_0x47d1bf[_0x3d638c(0x287)]*0.99))];}return{'depth':this[_0x3d638c(0x236)][_0x3d638c(0x2ca)],'oldestPendingMs':Math['round'](_0x1a1d60),'committed':this[_0x3d638c(0x240)],'commitsPerSec':_0x492015,'commitP99Ms':Math[_0x3d638c(0x112)](_0x354f24),'parkedNow':this[_0x3d638c(0x2b7)][_0x3d638c(0x287)],'parkedTotal':this[_0x3d638c(0x29b)],'highWater':this['_highWater']};}[_0x9ffe74(0x2af)](){const _0x8fff84=_0x9ffe74,_0x20c2b8=_0x1780b2['now']();return[...this[_0x8fff84(0x272)]['values']()]['map'](_0x72adcc=>Math[_0x8fff84(0x112)](_0x20c2b8-_0x72adcc))[_0x8fff84(0x2a2)]((_0xd875be,_0x4368c0)=>_0x4368c0-_0xd875be);}[_0x9ffe74(0x231)](){const _0x51eb0d=_0x9ffe74;this[_0x51eb0d(0x273)]=!![];for(const _0x21fb1f of this['_bpWaiters'][_0x51eb0d(0x101)](0x0))_0x21fb1f();}async['drain'](){const _0x465bbe=_0x9ffe74;let _0x306949=0x0;while(this[_0x465bbe(0x236)][_0x465bbe(0x2ca)]&&_0x306949++<0x3e8){await Promise[_0x465bbe(0x266)]([...this[_0x465bbe(0x236)]]);}}async[_0x9ffe74(0x20d)](_0x3466d6,_0x1d8588,_0x4d21ed,_0x470e76){const _0x3d912c=_0x9ffe74;return this[_0x3d912c(0x1f1)](()=>{const _0x688911=_0x3d912c;if(_0x470e76===undefined)_0x3466d6['putSync'](_0x1d8588,_0x4d21ed);else _0x3466d6[_0x688911(0x12c)](_0x1d8588,_0x4d21ed,_0x470e76);},_0x3d912c(0x176));}async['remove'](_0x15eb23,_0x3a95a7){const _0x12fa45=_0x9ffe74;return this['transaction'](()=>_0x15eb23[_0x12fa45(0xc0)](_0x3a95a7),_0x12fa45(0x2b2));}}async function _0x1bccdf(_0x4213d8,_0x23908a){const _0x1c2e96=_0x9ffe74;if(_0x23908a==null)_0x23908a=Math[_0x1c2e96(0x2c5)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x5d5325=_0x4213d8?.[_0x1c2e96(0x211)];if(!_0x5d5325||typeof _0x5d5325[_0x1c2e96(0x1ae)]!==_0x1c2e96(0x28f))return;await Promise[_0x1c2e96(0x2de)]([Promise[_0x1c2e96(0x1b5)](_0x5d5325)['catch'](()=>{}),new Promise(_0x2c5b5c=>{const _0x5866e3=_0x1c2e96,_0x56b2fb=setTimeout(_0x2c5b5c,_0x23908a);if(_0x56b2fb[_0x5866e3(0x232)])_0x56b2fb[_0x5866e3(0x232)]();})]);}catch{}}function _0x1add5a(_0x9bf4e3){const _0x4f7c19=_0x9ffe74;if(_0x5a0c48)return Promise[_0x4f7c19(0x1b5)]();const _0x27aa89=_0x9bf4e3?.['committed'];return _0x27aa89&&typeof _0x27aa89[_0x4f7c19(0x1ae)]==='function'?_0x27aa89:Promise[_0x4f7c19(0x1b5)]();}return okdbWriter[_0x9ffe74(0x2ad)]=_0x41c781,okdbWriter[_0x9ffe74(0x2ad)][_0x9ffe74(0xb6)]=_0x1bccdf,okdbWriter[_0x9ffe74(0x2ad)]['committed']=_0x1add5a,okdbWriter[_0x9ffe74(0x2ad)]['SYNC_COMMITS']=_0x5a0c48,okdbWriter[_0x9ffe74(0x2ad)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x6da1a4=_0x18991b;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x1db27e=require$$0$3,{SYNC_COMMITS:_0x485714}=requireOkdbWriter(),_0x4ceb86='~lock';class _0x1c5941{constructor(_0x510d54,_0x295318,_0x3ff7fd){const _0x4cc221=_0x4fa3;this['_lock']=_0x510d54,this[_0x4cc221(0x21b)]=_0x295318,this['_acquiredAt']=_0x3ff7fd,this[_0x4cc221(0x165)]=![],this[_0x4cc221(0x1de)]=null,this[_0x4cc221(0x204)]=null;}[_0x6da1a4(0x13c)](){const _0x22ad64=_0x6da1a4;if(this['_released'])return![];try{const _0x543c88=this[_0x22ad64(0x2c8)][_0x22ad64(0x202)]()[_0x22ad64(0x10a)](this[_0x22ad64(0x21b)]);if(!_0x543c88||_0x543c88[_0x22ad64(0x253)]!==this[_0x22ad64(0x1ac)])return![];const _0x48795c=_0x543c88[_0x22ad64(0x249)]??_0x543c88['acquiredAt'];if(_0x48795c+_0x543c88[_0x22ad64(0x180)]<Date[_0x22ad64(0x194)]())return![];return!![];}catch{return!this['_released'];}}[_0x6da1a4(0x146)](){const _0x48afae=_0x6da1a4;if(this[_0x48afae(0x165)])return null;try{return this[_0x48afae(0x2c8)]['_db']()[_0x48afae(0x10a)](this['_key'])??null;}catch{return null;}}async['extend'](_0x4d7b62){const _0xa9aa8d=_0x6da1a4;if(this[_0xa9aa8d(0x165)])return;try{if(this[_0xa9aa8d(0x2c8)][_0xa9aa8d(0x273)]())return;const _0x3c287f=this[_0xa9aa8d(0x2c8)][_0xa9aa8d(0x202)]()[_0xa9aa8d(0x10a)](this[_0xa9aa8d(0x21b)]);if(!_0x3c287f||_0x3c287f[_0xa9aa8d(0x253)]!==this[_0xa9aa8d(0x1ac)])return;if(_0x485714)this[_0xa9aa8d(0x2c8)]['_db']()['putSync'](this[_0xa9aa8d(0x21b)],{..._0x3c287f,'ttlMs':_0x3c287f['ttlMs']+_0x4d7b62});else await this[_0xa9aa8d(0x2c8)]['_db']()[_0xa9aa8d(0x20d)](this[_0xa9aa8d(0x21b)],{..._0x3c287f,'ttlMs':_0x3c287f[_0xa9aa8d(0x180)]+_0x4d7b62});}catch{}}async[_0x6da1a4(0x25f)](){const _0xc4ce5d=_0x6da1a4;if(this[_0xc4ce5d(0x165)])return;if(this[_0xc4ce5d(0x204)])try{await this[_0xc4ce5d(0x204)];}catch{}clearInterval(this[_0xc4ce5d(0x1de)]),this[_0xc4ce5d(0x1de)]=null,this[_0xc4ce5d(0x165)]=!![];try{if(this[_0xc4ce5d(0x2c8)][_0xc4ce5d(0x273)]())return;const _0xfeb9ff=this[_0xc4ce5d(0x2c8)][_0xc4ce5d(0x202)]()[_0xc4ce5d(0x10a)](this[_0xc4ce5d(0x21b)]);if(_0xfeb9ff&&_0xfeb9ff[_0xc4ce5d(0x253)]===this[_0xc4ce5d(0x1ac)]){if(_0x485714)this[_0xc4ce5d(0x2c8)][_0xc4ce5d(0x202)]()['removeSync'](this[_0xc4ce5d(0x21b)]);else await this[_0xc4ce5d(0x2c8)][_0xc4ce5d(0x202)]()['remove'](this[_0xc4ce5d(0x21b)]);}}catch{}}[_0x6da1a4(0x274)](_0x58c467,_0xed704d){const _0x507233=_0x6da1a4,_0x1f1136=_0xed704d??Math[_0x507233(0x2c3)](_0x58c467/0x3);this[_0x507233(0x1de)]=setInterval(()=>{const _0x36970b=_0x507233;if(this[_0x36970b(0x165)])return;this[_0x36970b(0x204)]=((async()=>{const _0x2a8124=_0x36970b;try{if(this[_0x2a8124(0x2c8)][_0x2a8124(0x273)]())return;const _0x2ad530=this['_lock'][_0x2a8124(0x202)]()[_0x2a8124(0x10a)](this[_0x2a8124(0x21b)]);if(!_0x2ad530||_0x2ad530[_0x2a8124(0x253)]!==this['_acquiredAt']){this[_0x2a8124(0x165)]=!![],clearInterval(this[_0x2a8124(0x1de)]),this['_heartbeatTimer']=null;return;}if(_0x485714)this['_lock'][_0x2a8124(0x202)]()[_0x2a8124(0x12c)](this[_0x2a8124(0x21b)],{..._0x2ad530,'updatedAt':Date[_0x2a8124(0x194)]()});else await this[_0x2a8124(0x2c8)]['_db']()[_0x2a8124(0x20d)](this[_0x2a8124(0x21b)],{..._0x2ad530,'updatedAt':Date[_0x2a8124(0x194)]()});}catch{}this[_0x2a8124(0x204)]=null;})());},_0x1f1136);if(this[_0x507233(0x1de)][_0x507233(0x232)])this['_heartbeatTimer'][_0x507233(0x232)]();}}class _0x359114{constructor(_0x4f08e7,{namespace:_0x2759ed,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x22b362=_0x6da1a4;this[_0x22b362(0x1ba)]=_0x4f08e7,this[_0x22b362(0xf8)]=_0x2759ed,this['ttlMs']=ttlMs,this[_0x22b362(0x289)]=heartbeatMs,this[_0x22b362(0x215)]=null;}[_0x6da1a4(0x202)](){const _0x433adf=_0x6da1a4;return this[_0x433adf(0x1f5)](),(!this[_0x433adf(0x215)]||this['_lockDbOf']!==this[_0x433adf(0x1ba)])&&(this['_lockDb']=this[_0x433adf(0x1ba)][_0x433adf(0x271)](_0x4ceb86,{'dupSort':![]}),this[_0x433adf(0x277)]=this[_0x433adf(0x1ba)]),this[_0x433adf(0x215)];}[_0x6da1a4(0x248)](){const _0x500840=_0x6da1a4;return this['_assertUsable'](),(!this[_0x500840(0x243)]||this['_wantDbOf']!==this[_0x500840(0x1ba)])&&(this['_wantDbHandle']=this['_rawDb'][_0x500840(0x271)](_0x4ceb86+_0x500840(0x216),{'dupSort':![]}),this['_wantDbOf']=this[_0x500840(0x1ba)]),this[_0x500840(0x243)];}['_closed'](){const _0x16ad50=_0x6da1a4,_0x26e8e5=this[_0x16ad50(0x1ba)]?.[_0x16ad50(0x20b)];return _0x26e8e5===_0x16ad50(0x19b)||_0x26e8e5==='closed';}[_0x6da1a4(0x1f5)](){const _0x2413af=_0x6da1a4;if(this[_0x2413af(0x273)]())throw new Error(_0x2413af(0x1cf));}[_0x6da1a4(0x21b)](_0x3428e8){const _0x68f139=_0x6da1a4;return this[_0x68f139(0xf8)]+':'+_0x3428e8;}[_0x6da1a4(0x1db)](_0x356b1a){const _0x1c0fe2=_0x6da1a4;try{if(this[_0x1c0fe2(0x273)]())return;_0x485714?this[_0x1c0fe2(0x248)]()[_0x1c0fe2(0x12c)](this[_0x1c0fe2(0x21b)](_0x356b1a),Date['now']()):this['_wantDb']()[_0x1c0fe2(0x20d)](this[_0x1c0fe2(0x21b)](_0x356b1a),Date['now']())?.[_0x1c0fe2(0x1ad)]?.(()=>{});}catch{}}[_0x6da1a4(0xa9)](_0x1f1866,_0xf7d7eb=0x3e8){const _0x122929=_0x6da1a4;try{const _0x5f0e7c=this[_0x122929(0x248)]()[_0x122929(0x10a)](this['_key'](_0x1f1866));return typeof _0x5f0e7c===_0x122929(0x18f)&&Date['now']()-_0x5f0e7c<_0xf7d7eb;}catch{return![];}}['_isStale'](_0x398a13){const _0x2e72ff=_0x6da1a4,_0x5b3a48=_0x398a13[_0x2e72ff(0x249)]??_0x398a13[_0x2e72ff(0x253)];return _0x5b3a48+_0x398a13['ttlMs']<Date[_0x2e72ff(0x194)]();}static['_holderDead'](_0xf5cb2b){const _0x6b2d09=_0x6da1a4,_0x105daa=_0xf5cb2b?.[_0x6b2d09(0x146)];if(!_0x105daa||typeof _0x105daa[_0x6b2d09(0x9d)]!==_0x6b2d09(0x18f))return![];if(_0x105daa[_0x6b2d09(0x199)]!==_0x1db27e[_0x6b2d09(0x199)]())return![];if(_0x105daa['pid']===process['pid'])return![];try{return process[_0x6b2d09(0xa0)](_0x105daa[_0x6b2d09(0x9d)],0x0),![];}catch(_0x31e1bd){return _0x31e1bd[_0x6b2d09(0x16e)]===_0x6b2d09(0xdf);}}async['tryAcquire'](_0x2b5360,_0xc796dc={},_0x3b650d={}){const _0x5385b3=_0x6da1a4,_0x1681a7=this['_key'](_0x2b5360),_0x55af52=_0x3b650d[_0x5385b3(0x180)]??this['ttlMs'],_0x4b750f=Date['now'](),_0x4fedbe={'holder':{'pid':process[_0x5385b3(0x9d)],'hostname':_0x1db27e['hostname'](),..._0xc796dc},'acquiredAt':_0x4b750f,'updatedAt':_0x4b750f,'ttlMs':_0x55af52};let _0x126b6e=![],_0x4cafeb=null;if(this[_0x5385b3(0x273)]())return{'acquired':![],'handle':null,'current':null};try{const _0x557d72=()=>{const _0x48c452=_0x5385b3,_0x791e20=this[_0x48c452(0x202)]()[_0x48c452(0x10a)](_0x1681a7);if(_0x791e20&&!this[_0x48c452(0x285)](_0x791e20)&&!_0x359114[_0x48c452(0x254)](_0x791e20)){const _0xf6214c=_0xc796dc[_0x48c452(0x26e)]!=null&&_0x791e20['holder'][_0x48c452(0x9d)]===process['pid']&&_0x791e20['holder'][_0x48c452(0x26e)]===_0xc796dc['processorId'];if(!_0xf6214c){_0x126b6e=![],_0x4cafeb=_0x791e20;return;}_0x4fedbe[_0x48c452(0x253)]<=_0x791e20[_0x48c452(0x253)]&&(_0x4fedbe[_0x48c452(0x253)]=_0x791e20[_0x48c452(0x253)]+0x1,_0x4fedbe['updatedAt']=_0x4fedbe[_0x48c452(0x253)]);}this[_0x48c452(0x202)]()[_0x48c452(0x20d)](_0x1681a7,_0x4fedbe),_0x126b6e=!![],_0x4cafeb=_0x4fedbe;};if(_0x485714)this[_0x5385b3(0x202)]()['transactionSync'](_0x557d72);else await this[_0x5385b3(0x202)]()['childTransaction'](_0x557d72);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x126b6e)return{'acquired':![],'handle':null,'current':_0x4cafeb};const _0x580bfd=new _0x1c5941(this,_0x1681a7,_0x4fedbe[_0x5385b3(0x253)]);return _0x580bfd[_0x5385b3(0x274)](_0x55af52,this['heartbeatMs']),{'acquired':!![],'handle':_0x580bfd,'current':_0x4cafeb};}[_0x6da1a4(0x14c)](_0x5b4292){const _0x26c304=_0x6da1a4;try{return this[_0x26c304(0x202)]()[_0x26c304(0x10a)](this[_0x26c304(0x21b)](_0x5b4292))??null;}catch{return null;}}[_0x6da1a4(0x9b)](){const _0x320b78=_0x6da1a4,_0x4d919b=this['namespace']+':',_0x595042=[];try{for(const {key:_0x4d3232,value:_0x5e1bf5}of this[_0x320b78(0x202)]()[_0x320b78(0x1bb)]({'start':_0x4d919b,'end':_0x4d919b+'\xff'})){typeof _0x4d3232==='string'&&_0x4d3232['startsWith'](_0x4d919b)&&_0x595042[_0x320b78(0x2a5)]({'id':_0x4d3232['slice'](_0x4d919b[_0x320b78(0x287)]),'entry':_0x5e1bf5});}}catch{}return _0x595042;}static[_0x6da1a4(0x160)](_0xa978ca){const _0x596080=_0x6da1a4,_0x3dba95=[];try{const _0x2cc0d3=_0xa978ca['openDB'](_0x4ceb86,{'dupSort':![]});for(const {key:_0x4569dd,value:_0x1f4b91}of _0x2cc0d3[_0x596080(0x1bb)]({})){if(typeof _0x4569dd!==_0x596080(0x252))continue;const _0x28440c=_0x4569dd[_0x596080(0xef)](':');if(_0x28440c<0x1)continue;_0x3dba95[_0x596080(0x2a5)]({'namespace':_0x4569dd[_0x596080(0x1fd)](0x0,_0x28440c),'id':_0x4569dd[_0x596080(0x1fd)](_0x28440c+0x1),'entry':_0x1f4b91});}}catch{}return _0x3dba95;}}return okdbLock={'OKDBLock':_0x359114},okdbLock;}var version='2.4.0',require$$6={'version':version},okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x11d8ec=_0x18991b;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x545f03=require$$0$3,_0x107b11=require$$1$1,_0x204ee8=require$$2,{LOOP:_0xc296d6}=requireOkdbLoopMonitor(),{OKDBLock:_0x5e0748}=requireOkdbLock(),{SYNC_COMMITS:_0x2d0451}=requireOkdbWriter(),_0x516b59=_0x11d8ec(0x2d5),_0x2a9114=_0x11d8ec(0xb0),_0x4abebd='~processes:desired',_0x157dab=_0x11d8ec(0x168),_0x37eb2f=(_0x42a762,_0x1c89a2)=>_0x42a762+':'+_0x1c89a2,_0x975d42=(_0x3eb220,_0x2ce68d)=>_0x3eb220+'::'+_0x2ce68d,_0x224dd0=(_0x143a41,_0xb33a9a)=>_0x143a41+'/'+_0xb33a9a,_0x4fefbf=(_0x4da802,_0x6e2096)=>_0x4da802+'#'+_0x6e2096,_0x16c72c=_0x1bcc01=>{const _0x2e0223=_0x11d8ec;if(_0x1bcc01?.[_0x2e0223(0xf2)])return _0x1bcc01['processKey'];const _0x4c3ec6=_0x1bcc01?.['nodeKey'];return typeof _0x4c3ec6===_0x2e0223(0x252)&&_0x4c3ec6[_0x2e0223(0x280)]('#')?_0x4c3ec6[_0x2e0223(0x1fd)](0x0,_0x4c3ec6[_0x2e0223(0xef)]('#')):_0x4c3ec6;},_0xe366f4=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x22e835=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0xa10a98=_0xe366f4*0x3,_0x2613d4=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x11d8ec(0x2c5)](0x927c0,_0xa10a98*0x14),_0x312dd8=[_0x11d8ec(0x1ff),_0x11d8ec(0x18a),'processor:retry','processor:error','processor:paused',_0x11d8ec(0x142)];let _0x5e2482=null;function _0x52c16f(){const _0x5606b1=_0x11d8ec;if(_0x5e2482==null)_0x5e2482=Math[_0x5606b1(0x112)]((Date[_0x5606b1(0x194)]()-process[_0x5606b1(0x242)]()*0x3e8)/0x3e8)*0x3e8;return _0x5e2482;}function _0x1a8b84(_0x26d772){const _0x6f2737=_0x11d8ec;if(process.env.OKDB_PROCESS_KILL===_0x6f2737(0x149))return![];if(_0x26d772?.[_0x6f2737(0x1bc)]?.[_0x6f2737(0x1a6)]&&typeof _0x26d772[_0x6f2737(0x1bc)][_0x6f2737(0x1a6)]===_0x6f2737(0x193)&&_0x26d772['options'][_0x6f2737(0x1a6)][_0x6f2737(0xa0)]===![])return![];return!![];}function _0x18fa9c(_0x2ad640,_0x255762){const _0x5f5744=_0x11d8ec,_0x523b09=!!_0x255762?.[_0x5f5744(0x19c)];switch(_0x2ad640){case _0x5f5744(0x2ae):return{'controllable':_0x523b09,'decommissionable':![],'killable':!![],'killConfirm':_0x5f5744(0x25c)};case _0x5f5744(0x23f):case _0x5f5744(0x9c):return{'controllable':_0x523b09,'decommissionable':![],'killable':!![],'killConfirm':_0x5f5744(0x1f7)};case _0x5f5744(0x1d2):return{'controllable':![],'decommissionable':![],'killable':![]};case _0x5f5744(0x1d7):case _0x5f5744(0xdb):case'fn-runner':case _0x5f5744(0x20a):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x5f5744(0x20e)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x487e6d{constructor(_0x47e552){const _0x4e4edc=_0x11d8ec;this[_0x4e4edc(0x226)]=_0x47e552,this[_0x4e4edc(0x25a)]=null,this['_desired']=null,this[_0x4e4edc(0xa3)]=new Map(),this[_0x4e4edc(0x1c8)]=null,this['_isWriter']=![],this[_0x4e4edc(0x1ce)]=![],this[_0x4e4edc(0xcb)]=_0x52c16f(),this['_selfKey']=_0x37eb2f(process[_0x4e4edc(0x9d)],this[_0x4e4edc(0xcb)]),this['_instanceId']=_0x204ee8[_0x4e4edc(0xd8)]()[_0x4e4edc(0x1fd)](0x0,0x8),this[_0x4e4edc(0x291)]=_0x4fefbf(this['_selfKey'],this[_0x4e4edc(0x1ee)]),this['_startedAt']=Date['now'](),this[_0x4e4edc(0x241)]=null,this[_0x4e4edc(0x230)]=null,this[_0x4e4edc(0x1ab)]=null,this['_hbTimer']=null,this['_onProcEvent']=null,this[_0x4e4edc(0x2d6)]=null,this[_0x4e4edc(0xd6)]=0x0,this[_0x4e4edc(0x18e)]={},this[_0x4e4edc(0x145)]=new Map(),this['_lastCpuUsage']=process[_0x4e4edc(0x134)](),this[_0x4e4edc(0x1ec)]=Date[_0x4e4edc(0x194)](),this[_0x4e4edc(0xf7)]=0x0,this[_0x4e4edc(0x250)]=new Map();}get[_0x11d8ec(0x279)](){const _0x3d735e=_0x11d8ec;return this[_0x3d735e(0xda)];}get['rowKey'](){const _0x47cb26=_0x11d8ec;return this[_0x47cb26(0x291)];}[_0x11d8ec(0xd1)](_0x1b59a8,_0x3906db){const _0x7373dd=_0x11d8ec,_0xb99ca3=_0x18fa9c(_0x1b59a8,_0x3906db);if(_0xb99ca3['killable']&&!_0x1a8b84(this[_0x7373dd(0x226)]))return{..._0xb99ca3,'killable':![],'killConfirm':undefined};return _0xb99ca3;}['isActive'](){const _0xad45c0=_0x11d8ec;return!!this[_0xad45c0(0x25a)];}[_0x11d8ec(0x28c)](_0x6bd14f){const _0x7fa27c=_0x11d8ec;Object[_0x7fa27c(0x1e9)](this[_0x7fa27c(0x18e)],_0x6bd14f||{});}[_0x11d8ec(0x29e)](_0x58d132){const _0x59e6a3=_0x11d8ec;if(_0x58d132)this[_0x59e6a3(0x1ab)]=_0x58d132;}[_0x11d8ec(0x116)](_0xe3b7c3={}){const _0x146426=_0x11d8ec;return this['okdb'][_0x146426(0x27c)](_0xe3b7c3);}[_0x11d8ec(0x1b8)](){const _0x4837bb=_0x11d8ec,_0xc95ca8={};let _0x2f2aee=0x0,_0x10a51e=0x0;const _0x2d6d94=new Set();for(const _0x25b065 of this[_0x4837bb(0x2d7)]()){_0x10a51e++;const _0x546641=_0x25b065['processing'];if(!_0x546641)continue;if(_0x546641[_0x4837bb(0x2be)])_0x2f2aee++;for(const _0x459133 of _0x546641[_0x4837bb(0x19c)]||[]){if(!['single',_0x4837bb(0x2e1)]['includes'](_0x459133[_0x4837bb(0x2d2)]))continue;(_0x459133[_0x4837bb(0x262)]===_0x4837bb(0x1e1)||_0x459133[_0x4837bb(0x262)]===_0x4837bb(0x1da))&&_0x459133[_0x4837bb(0xd4)]&&_0x2d6d94[_0x4837bb(0x9e)]((_0x459133[_0x4837bb(0x292)]||'default')+':'+_0x459133['cursorKey']);const _0x53d317=_0x459133[_0x4837bb(0x292)]||_0x4837bb(0x22b);(_0xc95ca8[_0x53d317]||=[])[_0x4837bb(0x2a5)]({..._0x459133,'env':_0x53d317,'owner':{'pid':_0x25b065[_0x4837bb(0x9d)]??null,'kind':_0x25b065[_0x4837bb(0x2c9)]??null}});}}for(const [_0x587677,_0x3b0753]of Object[_0x4837bb(0x206)](_0xc95ca8)){for(const _0x5d15d3 of _0x3b0753){if(_0x5d15d3[_0x4837bb(0x2d2)]===_0x4837bb(0x132)&&!_0x5d15d3['claimGated']){const _0x3394e0=_0x587677+':'+(_0x5d15d3[_0x4837bb(0xd4)]??'');if(!_0x2d6d94['has'](_0x3394e0))_0x5d15d3[_0x4837bb(0x2ab)]=!![];}}}return{'envs':_0xc95ca8,'policy':null,'participation':{'participating':_0x2f2aee,'total':_0x10a51e},'source':_0x4837bb(0x158)};}[_0x11d8ec(0x10b)](){const _0x3571aa=_0x11d8ec,_0x3907b5=_0x6b5857=>{const _0x210353=_0x4fa3;if(_0x6b5857['state']===_0x210353(0x1e1)||_0x6b5857[_0x210353(0x262)]===_0x210353(0x1da)||_0x6b5857[_0x210353(0x262)]==='error')return 0x3;if(_0x6b5857[_0x210353(0x115)])return 0x1;return 0x2;},_0x44b08d=new Map();for(const _0x28bf53 of this['listNodes']()){for(const _0x15edfa of _0x28bf53['processing']?.[_0x3571aa(0x19c)]||[]){const _0x2813ed={..._0x15edfa,'owner':{'pid':_0x28bf53[_0x3571aa(0x9d)]??null,'kind':_0x28bf53[_0x3571aa(0x2c9)]??null,'host':_0x28bf53['host']??null}},_0x4d4aa9=_0x15edfa[_0x3571aa(0x2d2)]===_0x3571aa(0x132)?_0x3571aa(0x100)+(_0x15edfa[_0x3571aa(0x292)]??'')+'::'+(_0x15edfa[_0x3571aa(0xd4)]??_0x15edfa[_0x3571aa(0x213)]??_0x15edfa['id']):_0x3571aa(0x24b)+(_0x28bf53[_0x3571aa(0xee)]??_0x28bf53[_0x3571aa(0xf2)]??'')+'::'+(_0x15edfa[_0x3571aa(0x292)]??'')+'::'+_0x15edfa['id'],_0xa779fc=_0x44b08d[_0x3571aa(0x10a)](_0x4d4aa9);if(!_0xa779fc||_0x3907b5(_0x2813ed)>_0x3907b5(_0xa779fc))_0x44b08d['set'](_0x4d4aa9,_0x2813ed);}}return[..._0x44b08d[_0x3571aa(0x17f)]()];}[_0x11d8ec(0xc7)](){const _0x2791f7=_0x11d8ec,_0x46c898=Date[_0x2791f7(0x194)](),_0x5ad3c8=this[_0x2791f7(0x2d7)](),_0x3cc808=_0x59c65f=>Math[_0x2791f7(0x2c5)](0x0,Math[_0x2791f7(0x112)]((_0x46c898-(_0x59c65f[_0x2791f7(0xab)]||_0x46c898))/0x3e8)),_0x2dd27f=_0x5ad3c8[_0x2791f7(0x106)](_0x136fc4=>_0x136fc4['kind']==='primary'),_0x2d1b32=_0x5ad3c8['filter'](_0x2c30c2=>_0x2c30c2[_0x2791f7(0x2c9)]==='http-server');if(_0x2dd27f||_0x2d1b32[_0x2791f7(0x287)])return{'primary':_0x2dd27f?{'pid':_0x2dd27f[_0x2791f7(0x9d)],'uptime':_0x3cc808(_0x2dd27f)}:null,'workers':_0x2d1b32[_0x2791f7(0x284)](_0x4102da=>({'pid':_0x4102da[_0x2791f7(0x9d)],'uptime':_0x3cc808(_0x4102da)})),'workersConfigured':_0x2dd27f?.['meta']?.['workersConfigured']??_0x2d1b32[_0x2791f7(0x287)],'mode':_0x2791f7(0x143)};const _0x34fc90=_0x5ad3c8['find'](_0x4a769f=>_0x4a769f[_0x2791f7(0x2c9)]===_0x2791f7(0x23f)||_0x4a769f[_0x2791f7(0x2c9)]==='standalone'||_0x4a769f[_0x2791f7(0x2c9)]===_0x2791f7(0x1d2)),_0x39773e=_0x34fc90?{'pid':_0x34fc90['pid'],'uptime':_0x3cc808(_0x34fc90)}:{'pid':process[_0x2791f7(0x9d)],'uptime':Math[_0x2791f7(0x2c5)](0x0,Math[_0x2791f7(0x112)](process[_0x2791f7(0x242)]()))};return{'primary':_0x39773e,'workers':[_0x39773e],'workersConfigured':0x1,'mode':_0x2791f7(0x132)};}[_0x11d8ec(0x20f)](){const _0x530b3c=_0x11d8ec;return this[_0x530b3c(0x110)]();}[_0x11d8ec(0x137)](){const _0x380232=_0x11d8ec,_0x1996a1=new Map();for(const _0x4820b9 of this['_groupByProcess']())_0x1996a1[_0x380232(0x2ce)](_0x4820b9[_0x380232(0xf2)],{..._0x4820b9,'children':[]});const _0x40a5ef=[];for(const _0x38fa1f of _0x1996a1[_0x380232(0x17f)]()){const _0x3ef1d1=_0x38fa1f[_0x380232(0x2c2)]?_0x1996a1['get'](_0x38fa1f[_0x380232(0x2c2)]):null;if(_0x3ef1d1&&_0x3ef1d1!==_0x38fa1f)_0x3ef1d1[_0x380232(0x16f)]['push'](_0x38fa1f);else _0x40a5ef[_0x380232(0x2a5)](_0x38fa1f);}const _0x4fc12a=(_0x3a3c39,_0x421e2d)=>_0x3a3c39[_0x380232(0x2c9)]===_0x421e2d[_0x380232(0x2c9)]?(_0x3a3c39[_0x380232(0x9d)]||0x0)-(_0x421e2d[_0x380232(0x9d)]||0x0):(_0x3a3c39[_0x380232(0x2c9)]??'')<(_0x421e2d[_0x380232(0x2c9)]??'')?-0x1:0x1,_0x58a1e7=_0x442eed=>{const _0x1601f5=_0x380232;_0x442eed[_0x1601f5(0x2a2)](_0x4fc12a);for(const _0x403769 of _0x442eed)if(_0x403769['children'][_0x1601f5(0x287)])_0x58a1e7(_0x403769['children']);};return _0x58a1e7(_0x40a5ef),_0x40a5ef;}['getProcess'](_0x4b52ab){const _0x1fbe3d=_0x11d8ec;return this[_0x1fbe3d(0x110)]()[_0x1fbe3d(0x106)](_0x41a376=>_0x41a376[_0x1fbe3d(0xf2)]===_0x4b52ab)??null;}[_0x11d8ec(0x110)](_0x41b2a5=Date[_0x11d8ec(0x194)]()){const _0x702759=_0x11d8ec,_0x1812f9=new Map();for(const _0x22ae9c of this[_0x702759(0x2d7)]()){const _0x471f76=_0x16c72c(_0x22ae9c);let _0x54ed13=_0x1812f9[_0x702759(0x10a)](_0x471f76);!_0x54ed13&&(_0x54ed13={'processKey':_0x471f76,'nodeKey':_0x471f76,'pid':_0x22ae9c[_0x702759(0x9d)],'ppid':_0x22ae9c[_0x702759(0x123)]??null,'host':_0x22ae9c[_0x702759(0x161)]??null,'kind':_0x22ae9c[_0x702759(0x2c9)],'role':null,'supervisorKey':_0x22ae9c[_0x702759(0x2c2)]??null,'slot':_0x22ae9c[_0x702759(0x290)]??null,'slotKey':_0x22ae9c[_0x702759(0x293)]??null,'caps':_0x22ae9c[_0x702759(0xe2)]??null,'lifecycle':_0x22ae9c[_0x702759(0x244)]??null,'uptime':Math[_0x702759(0x2c5)](0x0,Math[_0x702759(0x112)]((_0x41b2a5-(_0x22ae9c[_0x702759(0xab)]||_0x41b2a5))/0x3e8)),'startedAt':_0x22ae9c['startedAt']??null,'meta':_0x22ae9c['meta']??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x1812f9['set'](_0x471f76,_0x54ed13));_0x54ed13[_0x702759(0x234)][_0x702759(0x2a5)]({'instanceId':_0x22ae9c['instanceId']??null,'role':_0x22ae9c['role']??null,'listenAddr':_0x22ae9c[_0x702759(0x1b1)]??null,'lifecycle':_0x22ae9c[_0x702759(0x244)]??null,'processing':_0x22ae9c[_0x702759(0x1b7)]??null});if(!_0x54ed13[_0x702759(0x2d0)]&&_0x22ae9c['role'])_0x54ed13[_0x702759(0x2d0)]=_0x22ae9c[_0x702759(0x2d0)];if(!_0x54ed13['listenAddr']&&_0x22ae9c['listenAddr'])_0x54ed13['listenAddr']=_0x22ae9c[_0x702759(0x1b1)];if(!_0x54ed13['processing']&&_0x22ae9c[_0x702759(0x1b7)])_0x54ed13[_0x702759(0x1b7)]=_0x22ae9c[_0x702759(0x1b7)];if(!_0x54ed13['engines']&&_0x22ae9c['engines'])_0x54ed13[_0x702759(0x2d8)]=_0x22ae9c[_0x702759(0x2d8)];if(!_0x54ed13[_0x702759(0x109)]&&_0x22ae9c[_0x702759(0x109)])_0x54ed13[_0x702759(0x109)]=_0x22ae9c[_0x702759(0x109)];if(_0x54ed13[_0x702759(0xe2)]==null&&_0x22ae9c[_0x702759(0xe2)])_0x54ed13['caps']=_0x22ae9c[_0x702759(0xe2)];if(_0x22ae9c[_0x702759(0xe6)]&&(!_0x54ed13[_0x702759(0xe6)]||(_0x22ae9c['stats']['at']??0x0)>(_0x54ed13[_0x702759(0xe6)]['at']??0x0)))_0x54ed13[_0x702759(0xe6)]=_0x22ae9c['stats'];}return[..._0x1812f9[_0x702759(0x17f)]()];}[_0x11d8ec(0x1cb)](){const _0x1a85c0=_0x11d8ec,_0xcecedd=[],_0x21c4a7={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x8f42b2 of this['_groupByProcess']()){_0xcecedd[_0x1a85c0(0x2a5)]({'processKey':_0x8f42b2['processKey'],'kind':_0x8f42b2[_0x1a85c0(0x2c9)],'pid':_0x8f42b2[_0x1a85c0(0x9d)],'supervisorKey':_0x8f42b2[_0x1a85c0(0x2c2)],'meta':_0x8f42b2[_0x1a85c0(0x258)]??null,'uptime':_0x8f42b2[_0x1a85c0(0x242)],'stats':_0x8f42b2['stats']??null}),_0x21c4a7[_0x1a85c0(0x1a6)]++;if(_0x8f42b2[_0x1a85c0(0xe6)]){_0x21c4a7[_0x1a85c0(0x131)]+=_0x8f42b2[_0x1a85c0(0xe6)]['rss']||0x0,_0x21c4a7[_0x1a85c0(0x2c6)]+=(_0x8f42b2['stats'][_0x1a85c0(0x2c6)]||0x0)+(_0x8f42b2[_0x1a85c0(0xe6)][_0x1a85c0(0x2e0)]?.[_0x1a85c0(0x2c6)]||0x0);const _0x39944b=_0x8f42b2['stats']['threads'];_0x39944b&&(_0x21c4a7[_0x1a85c0(0x2e0)][_0x1a85c0(0xfc)]+=_0x39944b[_0x1a85c0(0xfc)]||0x0,_0x21c4a7[_0x1a85c0(0x2e0)][_0x1a85c0(0xeb)]+=_0x39944b[_0x1a85c0(0xeb)]||0x0,_0x21c4a7['threads'][_0x1a85c0(0x1a0)]+=_0x39944b[_0x1a85c0(0x1a0)]||0x0);}}return{'totals':_0x21c4a7,'nodes':_0xcecedd};}async['open']({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x110a44=_0x11d8ec;this[_0x110a44(0x29d)]=this['_isWriter']||!!writer,this['_isReader']=this['_isReader']||!!reader,this['_kind']=kind||this[_0x110a44(0x241)]||(_0x107b11[_0x110a44(0x108)]?'http-server':'cli'),this['_supervisorKey']=supervisorKey??this[_0x110a44(0x230)],this[_0x110a44(0x1ab)]=listenAddr??this['_listenAddr'],this['_ensureDesired'](),await this['_migrateVocab']();if(!writer&&!reader)return null;if(!this[_0x110a44(0x25a)]){const _0x36e770=await this['okdb'][_0x110a44(0xec)](_0x516b59,{'sync':![],'durability':'fast'});await _0x36e770[_0x110a44(0x9a)](_0x2a9114),this['_statusEnv']=_0x36e770;}return this[_0x110a44(0x25a)];}[_0x11d8ec(0x102)](){const _0x1aa95a=_0x11d8ec;return this[_0x1aa95a(0x119)]!==this[_0x1aa95a(0x25a)]&&(this['_nodeDbFor']=this[_0x1aa95a(0x25a)],this[_0x1aa95a(0xd0)]=this['_statusEnv'][_0x1aa95a(0x265)](_0x2a9114)[_0x1aa95a(0x191)]),this['_nodeDbCache'];}[_0x11d8ec(0x246)](_0x214721){const _0x1d058f=_0x11d8ec;if(_0x2d0451)return this[_0x1d058f(0x102)]()[_0x1d058f(0x12c)](_0x214721[_0x1d058f(0xee)],_0x214721,0x1);const _0x11f5f8=this[_0x1d058f(0x102)]()[_0x1d058f(0x20d)](_0x214721[_0x1d058f(0xee)],_0x214721,0x1);if(_0x11f5f8&&typeof _0x11f5f8[_0x1d058f(0x1ae)]==='function')_0x11f5f8[_0x1d058f(0x1ae)](undefined,()=>{});return _0x11f5f8;}[_0x11d8ec(0x224)](_0x3c409a){const _0xa0ae73=_0x11d8ec;return this['_nodeDb']()['putSync'](_0x3c409a[_0xa0ae73(0xee)],_0x3c409a,0x1);}[_0x11d8ec(0x1d6)](_0x562c2c){const _0x2239b3=_0x11d8ec;if(_0x2d0451)try{return this[_0x2239b3(0x102)]()[_0x2239b3(0xc0)](_0x562c2c);}catch{return![];}const _0x3a8957=this['_nodeDb']()[_0x2239b3(0x1a5)](_0x562c2c);if(_0x3a8957&&typeof _0x3a8957[_0x2239b3(0x1ae)]===_0x2239b3(0x28f))_0x3a8957[_0x2239b3(0x1ae)](undefined,()=>{});return _0x3a8957;}async['putNode'](_0x1e21c5){const _0x204f3b=_0x11d8ec;if(!this[_0x204f3b(0x25a)]||!this[_0x204f3b(0x29d)]||!_0x1e21c5?.[_0x204f3b(0xee)])return;return this[_0x204f3b(0x246)](_0x1e21c5);}async[_0x11d8ec(0x197)](_0x3a52f6){const _0xd5d57c=_0x11d8ec;if(!this[_0xd5d57c(0x25a)]||!this[_0xd5d57c(0x29d)]||!_0x3a52f6)return;const _0x7d17aa=_0x3a52f6[_0xd5d57c(0x280)]('#'),_0xdd64bf=[];for(const {key:_0x1ab0c7}of this['_statusEnv'][_0xd5d57c(0x1bb)](_0x2a9114)){if(_0x1ab0c7===_0x3a52f6||!_0x7d17aa&&typeof _0x1ab0c7===_0xd5d57c(0x252)&&_0x1ab0c7['startsWith'](_0x3a52f6+'#'))_0xdd64bf['push'](_0x1ab0c7);}for(const _0x4bcb95 of _0xdd64bf){try{this[_0xd5d57c(0x102)]()[_0xd5d57c(0xc0)](_0x4bcb95);}catch{}}}[_0x11d8ec(0xbe)](_0x56442e){const _0x35bf1d=_0x11d8ec;if(typeof _0x56442e?.[_0x35bf1d(0x9d)]!==_0x35bf1d(0x18f))return![];if(_0x56442e[_0x35bf1d(0x161)]!==_0x545f03['hostname']())return![];if(_0x56442e['pid']===process[_0x35bf1d(0x9d)])return![];if(_0x56442e[_0x35bf1d(0x1fe)]!=null&&_0x56442e['expiresAt']<Date[_0x35bf1d(0x194)]()-_0x2613d4)return!![];try{return process[_0x35bf1d(0xa0)](_0x56442e[_0x35bf1d(0x9d)],0x0),![];}catch(_0x25bcc1){return _0x25bcc1[_0x35bf1d(0x16e)]===_0x35bf1d(0xdf);}}[_0x11d8ec(0x2d7)](){const _0x80382d=_0x11d8ec;if(!this[_0x80382d(0x25a)])return[];try{this['_statusEnv']['db']?.[_0x80382d(0xc1)]?.();}catch{}const _0x37a61e=Date['now'](),_0x25f8ea=_0x545f03[_0x80382d(0x199)](),_0x14a59b=[];for(const {value:_0x5b3823}of this[_0x80382d(0x25a)][_0x80382d(0x1bb)](_0x2a9114)){if(!_0x5b3823)continue;let _0x123c78=null;_0x5b3823[_0x80382d(0x161)]===_0x25f8ea&&typeof _0x5b3823[_0x80382d(0x9d)]===_0x80382d(0x18f)&&(_0x123c78=!this['_nodeDead'](_0x5b3823));if(_0x123c78===![])continue;const _0x484ba6=_0x5b3823[_0x80382d(0x1fe)]==null||_0x5b3823[_0x80382d(0x1fe)]>=_0x37a61e;if(_0x123c78===!![]||_0x484ba6)_0x14a59b['push'](_0x5b3823);}return _0x14a59b;}async['reap'](_0x7ee948=0x0){const _0x46a52f=_0x11d8ec;if(!this[_0x46a52f(0x25a)]||!this[_0x46a52f(0x29d)])return;const _0x460e4b=Date[_0x46a52f(0x194)]()-_0x7ee948,_0x2b91a4=new Set(),_0x267777=[],_0x8495e2=_0x545f03[_0x46a52f(0x199)](),_0x9354c3=require$$6[_0x46a52f(0x172)];for(const {key:_0x4d21e2,value:_0x29505f}of this[_0x46a52f(0x25a)][_0x46a52f(0x1bb)](_0x2a9114)){if(!_0x29505f)continue;const _0x440b39=_0x29505f[_0x46a52f(0x161)]===_0x8495e2&&typeof _0x29505f[_0x46a52f(0x9d)]===_0x46a52f(0x18f),_0x76d20c=_0x440b39?this[_0x46a52f(0xbe)](_0x29505f):_0x29505f[_0x46a52f(0x1fe)]!=null&&_0x29505f['expiresAt']<_0x460e4b;if(_0x76d20c)_0x267777[_0x46a52f(0x2a5)](_0x4d21e2);else{_0x2b91a4[_0x46a52f(0x9e)](_0x16c72c(_0x29505f)??_0x4d21e2);if(_0x29505f[_0x46a52f(0x172)]&&_0x29505f[_0x46a52f(0x172)]!==_0x9354c3){if(!this[_0x46a52f(0x2b8)])this[_0x46a52f(0x2b8)]=new Set();!this[_0x46a52f(0x2b8)][_0x46a52f(0x22c)](_0x29505f[_0x46a52f(0x172)])&&(this['_versionSkewWarned'][_0x46a52f(0x9e)](_0x29505f[_0x46a52f(0x172)]),this[_0x46a52f(0x226)][_0x46a52f(0x2b5)]?.[_0x46a52f(0x169)]?.(_0x46a52f(0x239)+(_0x29505f['pid']??'?')+_0x46a52f(0x17c)+_0x29505f[_0x46a52f(0x172)]+_0x46a52f(0xe0)+_0x9354c3+_0x46a52f(0xe8)+_0x46a52f(0x22f),{'feature':_0x46a52f(0x117)}));}}}for(const _0x2bf8f6 of _0x267777)this[_0x46a52f(0x1d6)](_0x2bf8f6);if(this['_ensureDesired']()){const _0xe6099f=[];for(const {key:_0x19a702}of this['listDesired'](_0x46a52f(0xb0))){if(!_0x2b91a4['has'](_0x19a702)){if(_0x2d0451)try{this[_0x46a52f(0x2db)]['removeSync'](_0x46a52f(0xaa)+_0x19a702);}catch{}else _0xe6099f[_0x46a52f(0x2a5)](this['_desired']['remove']('node/'+_0x19a702));}}if(_0xe6099f[_0x46a52f(0x287)])await Promise['allSettled'](_0xe6099f);}}['startHeartbeat'](_0x2500af=null){const _0x9f2af9=_0x11d8ec;if(this[_0x9f2af9(0x187)])return;if(!this[_0x9f2af9(0x29d)]||!this['_statusEnv']){this['okdb']?.['log']?.[_0x9f2af9(0x169)]?.(_0x9f2af9(0x219)+this[_0x9f2af9(0x29d)]+'\x20statusEnv='+!!this[_0x9f2af9(0x25a)]+_0x9f2af9(0x1c4),{'feature':'processes'});return;}this[_0x9f2af9(0x2d6)]=_0x2500af,this[_0x9f2af9(0x192)]=()=>this['_maybePublish']();for(const _0x1b9fdc of _0x312dd8)this['okdb'][_0x9f2af9(0x11a)]['on'](_0x1b9fdc,this[_0x9f2af9(0x192)]);this['_publishNow']();const _0x206e88=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0xe366f4;this[_0x9f2af9(0x187)]=setInterval(()=>{const _0x32ffb1=_0x9f2af9;if(this['_onTick'])try{this[_0x32ffb1(0x2d6)]();}catch{}this['_publishNow'](),this[_0x32ffb1(0x270)]()[_0x32ffb1(0x1ad)](()=>{});},_0x206e88);if(this['_hbTimer'][_0x9f2af9(0x232)])this[_0x9f2af9(0x187)][_0x9f2af9(0x232)]();}[_0x11d8ec(0x18c)](){const _0x31cea4=_0x11d8ec;if(!this['_isWriter']||!this[_0x31cea4(0x25a)])return;if(Date[_0x31cea4(0x194)]()-this['_lastPublishAt']<_0x22e835)return;this[_0x31cea4(0xf9)]();}['_publishNow'](){const _0x2756f6=_0x11d8ec;if(!this[_0x2756f6(0x29d)]||!this[_0x2756f6(0x25a)])return;this[_0x2756f6(0xd6)]=Date[_0x2756f6(0x194)]();try{const _0x5221f5=[this[_0x2756f6(0x163)]()];for(const _0x518931 of this['_children'][_0x2756f6(0x17f)]())_0x5221f5['push'](this[_0x2756f6(0x2df)](_0x518931));const _0x30d68e=_0xc296d6['enabled']?_0xc296d6[_0x2756f6(0x194)]():0x0;for(const _0x57964e of _0x5221f5){try{this[_0x2756f6(0x224)](_0x57964e),this['_publishFailWarned']=![];}catch(_0x2079e3){!this['_publishFailWarned']&&(this['_publishFailWarned']=!![],this[_0x2756f6(0x226)]?.[_0x2756f6(0x2b5)]?.[_0x2756f6(0x169)]?.(_0x2756f6(0x171)+_0x2079e3['message'],{'feature':_0x2756f6(0x1a6)}));}}if(_0xc296d6['enabled'])_0xc296d6[_0x2756f6(0x1a4)](_0x2756f6(0x2a4),_0xc296d6[_0x2756f6(0x194)]()-_0x30d68e,_0x2756f6(0x23e)+_0x5221f5[_0x2756f6(0x287)]+_0x2756f6(0x170));}catch(_0x28cc0b){!this[_0x2756f6(0x2c4)]&&(this['_publishFailWarned']=!![],this[_0x2756f6(0x226)]?.[_0x2756f6(0x2b5)]?.[_0x2756f6(0x169)]?.('registry\x20publish\x20failing:\x20'+_0x28cc0b[_0x2756f6(0x295)],{'feature':_0x2756f6(0x1a6)}));}}async[_0x11d8ec(0x25d)](){const _0x2212ef=_0x11d8ec;if(this['_onProcEvent']){for(const _0x3d8454 of _0x312dd8){try{this[_0x2212ef(0x226)][_0x2212ef(0x11a)][_0x2212ef(0x149)](_0x3d8454,this[_0x2212ef(0x192)]);}catch{}}this[_0x2212ef(0x192)]=null;}this[_0x2212ef(0x187)]&&(clearInterval(this[_0x2212ef(0x187)]),this[_0x2212ef(0x187)]=null);try{if(this[_0x2212ef(0x25a)]&&this[_0x2212ef(0x29d)])await this['removeNode'](this[_0x2212ef(0x291)]);}catch{}}async[_0x11d8ec(0x24e)](){const _0x4b91d6=_0x11d8ec;if(!this[_0x4b91d6(0x25a)]||!this[_0x4b91d6(0x29d)])return;try{await this['removeNode'](this['_rowKey']);}catch{}try{const _0x373d9b=[];for(const {value:_0x5aec89}of this[_0x4b91d6(0x25a)][_0x4b91d6(0x1bb)](_0x2a9114)){if(_0x5aec89?.[_0x4b91d6(0x123)]===process[_0x4b91d6(0x9d)]&&_0x5aec89[_0x4b91d6(0xee)])_0x373d9b[_0x4b91d6(0x2a5)](_0x5aec89[_0x4b91d6(0xee)]);}for(const _0x1f461e of _0x373d9b){try{await this[_0x4b91d6(0x197)](_0x1f461e);}catch{}}}catch{}}async[_0x11d8ec(0x1c3)](){const _0x27d863=_0x11d8ec;return this['putNode'](this[_0x27d863(0x163)]());}async[_0x11d8ec(0x182)](_0x253a8b){const _0x201a2a=_0x11d8ec;if(!this[_0x201a2a(0x25a)]||!this[_0x201a2a(0x29d)])return;return this[_0x201a2a(0x21c)](this[_0x201a2a(0x2df)](_0x253a8b));}[_0x11d8ec(0x2df)]({pid:_0x289331,startedAt:_0x1a5f13,kind:_0x281da5,supervisorKey:_0x5df04b,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x11d8ec(0x155),meta:meta=null,stats:stats=null}){const _0x19f3d8=_0x11d8ec,_0x57b633=Date[_0x19f3d8(0x194)](),_0x381440=_0x37eb2f(_0x289331,_0x1a5f13);return{'nodeKey':_0x4fefbf(_0x381440,'0'),'processKey':_0x381440,'instanceId':'0','pid':_0x289331,'startedAt':_0x1a5f13,'ppid':process[_0x19f3d8(0x9d)],'host':_0x545f03['hostname'](),'supervisorKey':_0x5df04b,'slot':slot,'slotKey':slotKey,'kind':_0x281da5,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x57b633,'expiresAt':_0x57b633+_0xa10a98,'caps':this[_0x19f3d8(0xd1)](_0x281da5,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x11d8ec(0x12d)](_0x41e31e){const _0x27e7a2=_0x11d8ec;if(!_0x41e31e?.[_0x27e7a2(0x9d)])return null;const _0x2993a2=_0x37eb2f(_0x41e31e[_0x27e7a2(0x9d)],_0x41e31e['startedAt']);this[_0x27e7a2(0x145)][_0x27e7a2(0x2ce)](_0x2993a2,{..._0x41e31e,'supervisorKey':_0x41e31e[_0x27e7a2(0x2c2)]??this[_0x27e7a2(0xda)]});if(this[_0x27e7a2(0x29d)])await this[_0x27e7a2(0x182)](this[_0x27e7a2(0x145)][_0x27e7a2(0x10a)](_0x2993a2))['catch']?.(()=>{});return _0x2993a2;}[_0x11d8ec(0xe1)](_0x3bf019){const _0x3b6017=_0x11d8ec;if(!_0x3bf019)return;return this[_0x3b6017(0x145)]['delete'](_0x3bf019),this[_0x3b6017(0x197)](_0x3bf019);}[_0x11d8ec(0x255)](){const _0x3fb99c=_0x11d8ec,_0x46bd60=Date[_0x3fb99c(0x194)](),_0x42b6cf=process[_0x3fb99c(0x134)](),_0x14adad=(_0x46bd60-this['_lastCpuAt'])*0x3e8;if(_0x14adad>=0x3d090){const _0x28c736=_0x42b6cf[_0x3fb99c(0x177)]-this[_0x3fb99c(0x261)][_0x3fb99c(0x177)]+(_0x42b6cf['system']-this['_lastCpuUsage']['system']),_0x4206fc=_0x545f03['cpus']()[_0x3fb99c(0x287)]||0x1;this['_lastCpuPct']=Math[_0x3fb99c(0x275)](0x64,Math[_0x3fb99c(0x112)](_0x28c736/(_0x14adad*_0x4206fc)*0x64)),this['_lastCpuWindowMs']=Math['round'](_0x14adad/0x3e8),this[_0x3fb99c(0x261)]=_0x42b6cf,this['_lastCpuAt']=_0x46bd60;}const _0x53b3c2=process['memoryUsage'](),_0xc722cb=this[_0x3fb99c(0x250)]['size'];let _0x3bcebf=0x0;if(_0xc722cb>0x0){const _0x313ebd=[this[_0x3fb99c(0x226)],...this['okdb'][_0x3fb99c(0x264)]?.[_0x3fb99c(0x17f)]?.()??[]];for(const _0x413565 of _0x313ebd){const _0x19e983=_0x413565[_0x3fb99c(0x1f9)]?.[_0x3fb99c(0x2d9)];if(_0x19e983)_0x3bcebf+=_0x19e983[_0x3fb99c(0x203)][_0x3fb99c(0x1a0)];}}let _0xcd776f=null;const _0x3b5f6a=_0xc722cb;if(_0x3b5f6a>0x0){let _0x41ad3f=0x0;for(const _0x55e970 of this['_threadStats'][_0x3fb99c(0x17f)]())_0x41ad3f+=_0x55e970[_0x3fb99c(0x2c6)]||0x0;_0xcd776f={'count':_0x3b5f6a,'heapUsed':_0x41ad3f,'sandbox':_0xc722cb,'busy':_0x3bcebf};}return{'rss':_0x53b3c2['rss'],'heapUsed':_0x53b3c2[_0x3fb99c(0x2c6)],'heapTotal':_0x53b3c2[_0x3fb99c(0x174)],'external':_0x53b3c2[_0x3fb99c(0xfe)],'cpuPct':this[_0x3fb99c(0xf7)],'cpuWindowMs':this['_lastCpuWindowMs']??null,'threads':_0xcd776f,'at':_0x46bd60};}[_0x11d8ec(0x228)](_0x1d6e7d,_0x3aff38){const _0x1c0028=_0x11d8ec;if(!_0x1d6e7d||!_0x3aff38)return;this[_0x1c0028(0x250)][_0x1c0028(0x2ce)](_0x1d6e7d,_0x3aff38);}[_0x11d8ec(0xfa)](_0x2121b4){const _0x5849bb=_0x11d8ec;this[_0x5849bb(0x250)][_0x5849bb(0x14d)](_0x2121b4);}['updateSupervisedChildStats'](_0x26ee8f,_0xad8ed3,_0x349739=undefined){const _0x546388=_0x11d8ec,_0x5bde09=this[_0x546388(0x145)]['get'](_0x26ee8f);if(!_0x5bde09||!_0xad8ed3)return;if(_0x349739!==undefined)_0x5bde09[_0x546388(0x1b7)]=_0x349739;_0x5bde09['stats']={'rss':_0xad8ed3[_0x546388(0x131)]??null,'heapUsed':_0xad8ed3[_0x546388(0x2c6)]??null,'heapTotal':_0xad8ed3['heapTotal']??null,'external':_0xad8ed3[_0x546388(0xfe)]??null,'cpuPct':_0xad8ed3[_0x546388(0x29a)]??null,'cpuWindowMs':_0xad8ed3[_0x546388(0x2c0)]??null,'threads':_0xad8ed3[_0x546388(0x2e0)]??null,'claims':_0xad8ed3[_0x546388(0x130)]??null,'envsOpen':_0xad8ed3[_0x546388(0x222)]??null,'at':Date[_0x546388(0x194)]()};}[_0x11d8ec(0x163)](){const _0x4f8d7d=_0x11d8ec,_0x1cfa35=Date['now'](),_0x470b0b=this[_0x4f8d7d(0x226)][_0x4f8d7d(0x147)]||{},_0x5f4b33=this[_0x4f8d7d(0x241)]||_0x4f8d7d(0x23f);return{'nodeKey':this[_0x4f8d7d(0x291)],'processKey':this['_selfKey'],'instanceId':this[_0x4f8d7d(0x1ee)],'pid':process['pid'],'startedAt':this['_processStartedAt'],'instanceStartedAt':this[_0x4f8d7d(0x21d)],'ppid':typeof process[_0x4f8d7d(0x123)]===_0x4f8d7d(0x18f)?process[_0x4f8d7d(0x123)]:null,'host':_0x545f03['hostname'](),'supervisorKey':this[_0x4f8d7d(0x230)]??null,'version':require$$6['version'],'kind':_0x5f4b33,'role':{'engines':!!_0x470b0b[_0x4f8d7d(0x2d8)],'processors':!!_0x470b0b[_0x4f8d7d(0x19c)],'compaction':_0x470b0b[_0x4f8d7d(0xff)],'http':_0x470b0b[_0x4f8d7d(0xe9)]},'listenAddr':this[_0x4f8d7d(0x1ab)]??null,'heartbeatAt':_0x1cfa35,'expiresAt':_0x1cfa35+_0xa10a98,'caps':this[_0x4f8d7d(0xd1)](_0x5f4b33,_0x470b0b),'lifecycle':{'state':_0x4f8d7d(0x155),'desiredVersionApplied':null},'meta':{...this['_ownMeta']},'processing':_0x470b0b['processors']?this['_buildProcessingFacet']():null,'engines':_0x470b0b[_0x4f8d7d(0x2d8)]?[...this[_0x4f8d7d(0x226)][_0x4f8d7d(0x210)]??[]]:null,'singletonClaims':this['_collectSingletonClaims'](),'stats':this[_0x4f8d7d(0x255)](),'writers':this[_0x4f8d7d(0x127)]()};}[_0x11d8ec(0x127)](){const _0x3ea611=_0x11d8ec,_0xad75d2={};try{for(const [_0x51cf0c,_0x49f490]of this[_0x3ea611(0x226)][_0x3ea611(0x264)]){try{const _0x39348d=_0x49f490[_0x3ea611(0x23d)]?.();if(!_0x39348d)continue;if(!_0x39348d[_0x3ea611(0x14f)]&&!_0x39348d[_0x3ea611(0x152)]&&!(_0x39348d[_0x3ea611(0x26b)]??0x0)&&!_0x39348d[_0x3ea611(0xac)])continue;_0xad75d2[_0x51cf0c]={'depth':_0x39348d[_0x3ea611(0x14f)],'oldestPendingMs':_0x39348d[_0x3ea611(0xf0)],'committed':_0x39348d[_0x3ea611(0x152)],'commitsPerSec':_0x39348d[_0x3ea611(0x1ef)],'commitP99Ms':_0x39348d[_0x3ea611(0x1af)],'parkedNow':_0x39348d[_0x3ea611(0x26b)]??0x0,'draining':!!_0x39348d[_0x3ea611(0xac)]};}catch{}}}catch{}return Object[_0x3ea611(0x1f2)](_0xad75d2)[_0x3ea611(0x287)]?_0xad75d2:null;}[_0x11d8ec(0xb8)](){const _0x40f2f5=_0x11d8ec,_0x3d3e00=process['pid'],_0x49a28c=Date[_0x40f2f5(0x194)](),_0x424125=_0x2accc1=>{const _0x7b8925=_0x40f2f5;if(!_0x2accc1)return[];const _0x30952a=[];try{for(const {id:_0x477d4f,entry:_0x5e1f22}of _0x2accc1[_0x7b8925(0x9b)]()){if(_0x5e1f22?.['holder']?.[_0x7b8925(0x9d)]!==_0x3d3e00)continue;const _0x129fd2=_0x5e1f22[_0x7b8925(0x249)]??_0x5e1f22[_0x7b8925(0x253)]??0x0;if(_0x129fd2+(_0x5e1f22[_0x7b8925(0x180)]??0x0)<_0x49a28c)continue;_0x30952a[_0x7b8925(0x2a5)](_0x477d4f);}}catch{}return _0x30952a;},_0x17a146=_0x424125(this[_0x40f2f5(0xc4)]('compact')),_0x1a33b8=_0x424125(this['_singletonLock'](_0x40f2f5(0x1c0)));if(!_0x17a146[_0x40f2f5(0x287)]&&!_0x1a33b8[_0x40f2f5(0x287)])return null;return{'compact':_0x17a146,'replicate':_0x1a33b8};}[_0x11d8ec(0xc4)](_0x18ffa3){const _0x3f4587=_0x11d8ec;if(!this[_0x3f4587(0x226)]?.[_0x3f4587(0x154)])return null;if(!this['_singletonLocks'])this[_0x3f4587(0x139)]=new Map();let _0x5b139d=this[_0x3f4587(0x139)]['get'](_0x18ffa3);if(!_0x5b139d)try{_0x5b139d=new _0x5e0748(this[_0x3f4587(0x226)][_0x3f4587(0x154)],{'namespace':_0x18ffa3}),this['_singletonLocks'][_0x3f4587(0x2ce)](_0x18ffa3,_0x5b139d);}catch{return null;}return _0x5b139d;}[_0x11d8ec(0x2dd)](){const _0x472288=_0x11d8ec,_0x2c72b5=[];try{for(const [_0x116d6,_0x4fd51a]of this[_0x472288(0x226)][_0x472288(0x264)]){if(_0x116d6['startsWith']('~'))continue;for(const _0x517ebd of _0x4fd51a[_0x472288(0x28d)][_0x472288(0xa7)]())_0x2c72b5[_0x472288(0x2a5)]({..._0x517ebd,'env':_0x116d6});}}catch{}return{'participate':this['okdb'][_0x472288(0x19c)]?.['_participate']??![],'processors':_0x2c72b5};}[_0x11d8ec(0x2cf)](){const _0x1ad4d1=_0x11d8ec;if(this[_0x1ad4d1(0x2db)])return!![];const _0x92a90e=this[_0x1ad4d1(0x226)][_0x1ad4d1(0x154)];if(!_0x92a90e)return![];return this[_0x1ad4d1(0x2db)]=_0x92a90e[_0x1ad4d1(0x271)](_0x4abebd,{'dupSort':![]}),this['_cmd']=_0x92a90e[_0x1ad4d1(0x271)](_0x157dab,{'dupSort':![]}),!![];}async['_migrateVocab'](){const _0xe1b4c5=_0x11d8ec;if(!this[_0xe1b4c5(0x2cf)]())return;const _0x23e2d9=_0xe1b4c5(0x21a),_0x2301cb=0x1,_0xa86a20=this[_0xe1b4c5(0x2db)][_0xe1b4c5(0x10a)](_0x23e2d9)??0x0;if(_0xa86a20>=_0x2301cb)return;const _0x478fcf=_0x42ceec=>{const _0x5f1387=_0xe1b4c5;if(_0x42ceec==='worker')return _0x5f1387(0x132);if(_0x42ceec===_0x5f1387(0x13f))return'fanout';return _0x42ceec;};await this[_0xe1b4c5(0x226)][_0xe1b4c5(0x125)]['_writer'][_0xe1b4c5(0x1f1)](()=>{const _0x130c6a=_0xe1b4c5;for(const _0x52e582 of[_0x130c6a(0x1e7),'procmodeack/']){for(const {key:_0x225bbb,value:_0x483cac}of this[_0x130c6a(0x2db)]['getRange']({'start':_0x52e582,'end':_0x52e582+'\xff'})){if(typeof _0x225bbb!=='string'||!_0x225bbb[_0x130c6a(0x181)](_0x52e582))break;const _0x1d2c9a=_0x478fcf(_0x483cac[_0x130c6a(0x2d2)]);if(_0x1d2c9a!==_0x483cac['mode'])this[_0x130c6a(0x2db)][_0x130c6a(0x20d)](_0x225bbb,{..._0x483cac,'mode':_0x1d2c9a});}}this['_desired'][_0x130c6a(0x20d)](_0x23e2d9,_0x2301cb);});}[_0x11d8ec(0x10f)](){const _0x21e9fb=_0x11d8ec;return!!this[_0x21e9fb(0x2db)];}[_0x11d8ec(0x2cc)](_0x17140d,_0x4a2a3f){const _0xaac968=_0x11d8ec;if(!this[_0xaac968(0x2cf)]())return null;const _0x3622a5=_0x17140d+'/'+_0x4a2a3f;return this[_0xaac968(0x1e6)](),this[_0xaac968(0xa3)][_0xaac968(0x10a)](_0x3622a5)??this[_0xaac968(0x2db)]['get'](_0x3622a5)??null;}[_0x11d8ec(0x1e6)](){const _0x3ba584=_0x11d8ec;if(!_0x2d0451)return;try{this[_0x3ba584(0x226)]['_systemEnv']?.['db']?.[_0x3ba584(0xc1)]?.();}catch{}}async[_0x11d8ec(0x281)](_0x506c98,_0x31900f,_0x336b20){const _0x2ed8ab=_0x11d8ec;if(!this['_ensureDesired']())return null;const _0x8ab54f=_0x506c98+'/'+_0x31900f;this['_refreshDesiredSnapshot']();const _0x19ef50=this[_0x2ed8ab(0xa3)]['get'](_0x8ab54f)??this[_0x2ed8ab(0x2db)][_0x2ed8ab(0x10a)](_0x8ab54f)??{'version':0x0},_0x314183=(_0x19ef50[_0x2ed8ab(0x172)]||0x0)+0x1,_0xa20878={..._0x19ef50,..._0x336b20,'version':_0x314183,'updatedAt':Date['now']()};this[_0x2ed8ab(0xa3)]['set'](_0x8ab54f,_0xa20878);try{await this[_0x2ed8ab(0x226)][_0x2ed8ab(0x125)][_0x2ed8ab(0x2b0)][_0x2ed8ab(0x1f1)](()=>{const _0x435fc4=_0x2ed8ab;this[_0x435fc4(0x2db)][_0x435fc4(0x20d)](_0x8ab54f,_0xa20878);});}finally{if(this[_0x2ed8ab(0xa3)][_0x2ed8ab(0x10a)](_0x8ab54f)===_0xa20878)this[_0x2ed8ab(0xa3)]['delete'](_0x8ab54f);}return _0x314183;}[_0x11d8ec(0x16b)](_0xab0c36){const _0x5c944c=_0x11d8ec;if(!this[_0x5c944c(0x2cf)]())return[];this[_0x5c944c(0x1e6)]();const _0x33dcec=_0xab0c36+'/',_0x41aea5=[];for(const {key:_0x4a6c6c,value:_0x138224}of this[_0x5c944c(0x2db)][_0x5c944c(0x1bb)]({'start':_0x33dcec,'end':_0x33dcec+'\xff'})){if(typeof _0x4a6c6c!=='string'||!_0x4a6c6c[_0x5c944c(0x181)](_0x33dcec))break;_0x41aea5[_0x5c944c(0x2a5)]({'key':_0x4a6c6c[_0x5c944c(0x1fd)](_0x33dcec['length']),'value':_0x138224});}return _0x41aea5;}[_0x11d8ec(0x1d8)](_0x7d46e2){const _0xa1c814=_0x11d8ec;if(!this[_0xa1c814(0x2cf)]())return null;return this[_0xa1c814(0x1c8)][_0xa1c814(0x10a)](_0x7d46e2)??null;}async['bumpCmd'](_0x1e16d6,_0x3efe6f,_0x509473={}){const _0x239b83=_0x11d8ec;if(!this[_0x239b83(0x2cf)]())return null;let _0x399f44;return await this[_0x239b83(0x226)][_0x239b83(0x125)]['_writer'][_0x239b83(0x1f1)](()=>{const _0x40fcb6=_0x239b83,_0x4e4591=this['_cmd'][_0x40fcb6(0x10a)](_0x1e16d6)||{'epoch':0x0};_0x399f44=(_0x4e4591[_0x40fcb6(0x111)]||0x0)+0x1,this['_cmd'][_0x40fcb6(0x20d)](_0x1e16d6,{..._0x4e4591,..._0x509473,'cmd':_0x3efe6f,'epoch':_0x399f44,'updatedAt':Date['now']()});}),_0x399f44;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x487e6d,'nodeKey':_0x37eb2f,'logicalKey':_0x975d42,'slotKey':_0x224dd0,'PROCESS_ENV':_0x516b59,'NODE_TYPE':_0x2a9114},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x1d1c1f=_0x18991b;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x6387b2=require$$0$4,{EVENTS:_0x1471ef,CHANGE_ACTIONS:_0x7ba888}=requireOkdbEnums(),{LOOP:_0x329e04}=requireOkdbLoopMonitor(),_0x368fd1=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x548e24=0x5,_0x38825e=0x2710;class _0x31b6f3 extends _0x6387b2{constructor(_0x23cf65,_0x53e677={}){const _0x4c17b2=_0x4fa3;super(),this[_0x4c17b2(0x226)]=_0x23cf65,this[_0x4c17b2(0x28e)]=_0x53e677[_0x4c17b2(0xc5)]??_0x368fd1,this['_flushDebounce']=_0x53e677['flushDebounce']??_0x548e24,this[_0x4c17b2(0x2bc)]=_0x53e677['dedupeMax']??_0x38825e,this['_started']=![],this[_0x4c17b2(0xa4)]=new Map(),this[_0x4c17b2(0x214)]=new Map(),this[_0x4c17b2(0xa6)]=new Map(),this['_flushTimer']=null,this['_draining']=![],this['_seen']=new Set(),this[_0x4c17b2(0x1d1)]=new Set(),this[_0x4c17b2(0x1f8)]=_0x311cfb=>this[_0x4c17b2(0x245)](_0x311cfb),this[_0x4c17b2(0x18d)]=_0x129af1=>this[_0x4c17b2(0x9f)](_0x129af1),this[_0x4c17b2(0x28a)]=_0x5771db=>this[_0x4c17b2(0x260)](_0x5771db),this['_onStop']=()=>this[_0x4c17b2(0x1a8)]();}[_0x1d1c1f(0x269)](){const _0x3b5d85=_0x1d1c1f;if(this[_0x3b5d85(0x220)])return;this[_0x3b5d85(0x220)]=!![];for(const [_0x372c35,_0x545825]of this[_0x3b5d85(0x226)]['_envs']){if(_0x372c35[_0x3b5d85(0x181)]('~'))continue;try{_0x545825[_0x3b5d85(0x298)]();}catch{}}for(const [_0x3df0c1,_0x17234f]of this[_0x3b5d85(0x226)][_0x3b5d85(0x264)]){if(_0x3df0c1['startsWith']('~'))continue;try{this['_baselines']['set'](_0x3df0c1,_0x17234f[_0x3b5d85(0x2bf)]()||0x0);}catch{}}const {events:_0x3aa828}=this['okdb'];_0x3aa828['on'](_0x1471ef['ITEM_PENDING'],this['_onPending']),_0x3aa828['on'](_0x1471ef[_0x3b5d85(0x1e4)],this[_0x3b5d85(0x1f8)]),_0x3aa828['on'](_0x1471ef[_0x3b5d85(0x2b9)],this['_onItem']),_0x3aa828['on'](_0x1471ef[_0x3b5d85(0x14b)],this[_0x3b5d85(0x1f8)]),_0x3aa828['on'](_0x1471ef[_0x3b5d85(0x121)],this[_0x3b5d85(0x28a)]),_0x3aa828[_0x3b5d85(0xce)](_0x1471ef[_0x3b5d85(0xd5)],this[_0x3b5d85(0xd7)]);}[_0x1d1c1f(0x1a8)](){const _0x55b0b8=_0x1d1c1f;if(!this[_0x55b0b8(0x220)])return;this[_0x55b0b8(0x220)]=![];const {events:_0x362ed1}=this['okdb'];_0x362ed1[_0x55b0b8(0x149)](_0x1471ef[_0x55b0b8(0x19a)],this[_0x55b0b8(0x18d)]),_0x362ed1['off'](_0x1471ef[_0x55b0b8(0x1e4)],this['_onItem']),_0x362ed1[_0x55b0b8(0x149)](_0x1471ef['ITEM_UPDATE'],this[_0x55b0b8(0x1f8)]),_0x362ed1[_0x55b0b8(0x149)](_0x1471ef[_0x55b0b8(0x14b)],this[_0x55b0b8(0x1f8)]),_0x362ed1[_0x55b0b8(0x149)](_0x1471ef[_0x55b0b8(0x121)],this[_0x55b0b8(0x28a)]);try{_0x362ed1[_0x55b0b8(0x149)](_0x1471ef[_0x55b0b8(0xd5)],this[_0x55b0b8(0xd7)]);}catch{}this['_flushTimer']&&(clearTimeout(this['_flushTimer']),this[_0x55b0b8(0x263)]=null),this[_0x55b0b8(0xa6)]['clear'](),this[_0x55b0b8(0xa4)]['clear'](),this[_0x55b0b8(0x214)][_0x55b0b8(0x118)](),this[_0x55b0b8(0x13a)][_0x55b0b8(0x118)](),this[_0x55b0b8(0x1d1)]['clear']();}[_0x1d1c1f(0x11f)](_0xacf237,_0x5d9a9f,_0x2cd3da,_0x3c4d2a){return _0xacf237+'\x00'+_0x5d9a9f+'\x00'+_0x2cd3da+'\x00'+_0x3c4d2a;}[_0x1d1c1f(0xe5)](_0x41a68c,_0x520d74,_0x5317e2,_0x3431b6){const _0x5ead78=_0x1d1c1f,_0x437169=this[_0x5ead78(0x11f)](_0x41a68c,_0x520d74,_0x5317e2,_0x3431b6);if(this[_0x5ead78(0x13a)]['has'](_0x437169))return![];this[_0x5ead78(0x13a)][_0x5ead78(0x9e)](_0x437169);if(this[_0x5ead78(0x13a)]['size']>this['_dedupeMax']){const _0x5290d3=this[_0x5ead78(0x13a)][_0x5ead78(0x17f)]()[_0x5ead78(0x217)]()['value'];this[_0x5ead78(0x13a)]['delete'](_0x5290d3);}return!![];}[_0x1d1c1f(0x9f)](_0x2abe2b){const _0x36f1b3=_0x1d1c1f;if(!this['_started']||!_0x2abe2b)return;const {env:_0xc9490f,type:_0x10035f,key:_0x304875,clock:_0x1af441}=_0x2abe2b;if(_0xc9490f==null||_0x10035f==null||_0x304875==null)return;if(typeof _0xc9490f===_0x36f1b3(0x252)&&_0xc9490f[_0x36f1b3(0x181)]('~'))return;if(typeof _0x10035f===_0x36f1b3(0x252)&&_0x10035f[_0x36f1b3(0x181)]('~'))return;this[_0x36f1b3(0x1d1)]['add'](this[_0x36f1b3(0x11f)](_0xc9490f,_0x10035f,_0x304875,_0x1af441)),this[_0x36f1b3(0x1d1)][_0x36f1b3(0x2ca)]>this['_dedupeMax']&&this[_0x36f1b3(0x1d1)]['delete'](this[_0x36f1b3(0x1d1)][_0x36f1b3(0x17f)]()['next']()[_0x36f1b3(0x1c6)]);}[_0x1d1c1f(0x245)](_0x47dbeb){const _0x2e01fe=_0x1d1c1f;if(!this[_0x2e01fe(0x220)]||!_0x47dbeb)return;const {env:_0x5c6d7a,type:_0x389047,key:_0x47c134,clock:_0x497451,origin:_0x149102,action:_0x2ed6ce,newValue:_0x4f175b,oldValue:_0x17ed2a}=_0x47dbeb;if(_0x5c6d7a==null||_0x389047==null||_0x47c134==null)return;if(typeof _0x5c6d7a===_0x2e01fe(0x252)&&_0x5c6d7a[_0x2e01fe(0x181)]('~'))return;if(typeof _0x389047===_0x2e01fe(0x252)&&_0x389047[_0x2e01fe(0x181)]('~'))return;this['_pendingLocal'][_0x2e01fe(0x14d)](this[_0x2e01fe(0x11f)](_0x5c6d7a,_0x389047,_0x47c134,_0x497451));if(!this[_0x2e01fe(0xe5)](_0x5c6d7a,_0x389047,_0x47c134,_0x497451))return;const _0x1b639a=_0x2ed6ce===_0x7ba888[_0x2e01fe(0x1fc)]?_0x2e01fe(0x1a5):_0x2e01fe(0x20d);this[_0x2e01fe(0x10d)]('change',{'env':_0x5c6d7a,'type':_0x389047,'key':_0x47c134,'op':_0x1b639a,'clock':_0x497451,'origin':_0x149102,'value':_0x1b639a==='remove'?null:_0x4f175b,'prevValue':_0x17ed2a});}['_handlePoke'](_0x3cfec6){const _0x310477=_0x1d1c1f;if(!this[_0x310477(0x220)])return;if(!_0x3cfec6||typeof _0x3cfec6[_0x310477(0x292)]!==_0x310477(0x252)||typeof _0x3cfec6[_0x310477(0x213)]!=='string')return;const {env:_0x1536ab,type:_0x1e0410}=_0x3cfec6;if(_0x1536ab[_0x310477(0x181)]('~')||_0x1e0410[_0x310477(0x181)]('~'))return;this[_0x310477(0xa6)][_0x310477(0x2ce)](_0x1536ab+'\x00'+_0x1e0410,{'env':_0x1536ab,'type':_0x1e0410}),this[_0x310477(0x218)]();}[_0x1d1c1f(0x218)](){const _0x31b432=_0x1d1c1f;if(this[_0x31b432(0x263)])return;const _0x34c5a5=()=>{const _0x3742f8=_0x31b432;this['_flushTimer']=null,this[_0x3742f8(0x120)]()[_0x3742f8(0x1ad)](()=>{});};this[_0x31b432(0x263)]=setTimeout(_0x34c5a5,this[_0x31b432(0x135)]>0x0?this[_0x31b432(0x135)]:0x0);}async[_0x1d1c1f(0x120)](){const _0x3e0c28=_0x1d1c1f;if(this[_0x3e0c28(0x259)]){this[_0x3e0c28(0x218)]();return;}this['_draining']=!![];try{const _0x51cb03=[...this[_0x3e0c28(0xa6)][_0x3e0c28(0x17f)]()];this['_pending'][_0x3e0c28(0x118)]();let _0x2135a9=![];for(const {env:_0x523523,type:_0x2f9957}of _0x51cb03){try{const _0x4f6d5b=await this[_0x3e0c28(0xdc)](_0x523523,_0x2f9957);if(_0x4f6d5b)_0x2135a9=!![];}catch{this[_0x3e0c28(0xa6)][_0x3e0c28(0x2ce)](_0x523523+'\x00'+_0x2f9957,{'env':_0x523523,'type':_0x2f9957}),_0x2135a9=!![];}}if(_0x2135a9||this[_0x3e0c28(0xa6)][_0x3e0c28(0x2ca)]>0x0)this[_0x3e0c28(0x218)]();}finally{this[_0x3e0c28(0x259)]=![];}}async['_drainOne'](_0x3d701c,_0x42081e){const _0x4a8f75=_0x1d1c1f,_0x46c772=await this['okdb']['_openEnvLazy'](_0x3d701c),_0x2cab7b=_0x3d701c+'\x00'+_0x42081e;!this['_cursors']['has'](_0x2cab7b)&&(!this[_0x4a8f75(0x214)]['has'](_0x3d701c)&&(_0x46c772[_0x4a8f75(0x298)](),this[_0x4a8f75(0x214)][_0x4a8f75(0x2ce)](_0x3d701c,_0x46c772['getClock']()||0x0)),this['_cursors'][_0x4a8f75(0x2ce)](_0x2cab7b,this['_baselines'][_0x4a8f75(0x10a)](_0x3d701c)));const _0x4e0696=this[_0x4a8f75(0xa4)][_0x4a8f75(0x10a)](_0x2cab7b),_0x41ac52=_0x46c772['getClock'](_0x42081e)||0x0;if(_0x41ac52<=_0x4e0696)return![];const _0x5b92d9=_0x4e0696+this['_quantum'],_0x1ec16e=Math[_0x4a8f75(0x275)](_0x41ac52,_0x5b92d9),_0x1897c5=_0x329e04[_0x4a8f75(0x11b)]?_0x329e04[_0x4a8f75(0x194)]():0x0,_0x10f710=Array[_0x4a8f75(0x256)](_0x46c772['getChanges'](_0x42081e,_0x4e0696+0x1,_0x1ec16e));let _0x463620=_0x4e0696;for(const _0x3207e9 of _0x10f710){const {clock:_0x16c027,key:_0x2368bf,action:_0x276f6c,origin:_0x400cba}=_0x3207e9;if(_0x16c027>_0x463620)_0x463620=_0x16c027;if(_0x2368bf==null)continue;if(this[_0x4a8f75(0x1d1)]['has'](this['_dedupeKey'](_0x3d701c,_0x42081e,_0x2368bf,_0x16c027)))continue;if(!this['_markSeen'](_0x3d701c,_0x42081e,_0x2368bf,_0x16c027))continue;let _0x3c0c0b,_0x3b3aa5;if(_0x276f6c===_0x7ba888['REMOVE'])_0x3c0c0b=_0x4a8f75(0x1a5),_0x3b3aa5=null;else{const _0x213401=_0x46c772[_0x4a8f75(0x10a)](_0x42081e,_0x2368bf);_0x213401==null?(_0x3c0c0b=_0x4a8f75(0x1a5),_0x3b3aa5=null):(_0x3c0c0b=_0x4a8f75(0x20d),_0x3b3aa5=_0x213401);}this[_0x4a8f75(0x10d)](_0x4a8f75(0xd9),{'env':_0x3d701c,'type':_0x42081e,'key':_0x2368bf,'op':_0x3c0c0b,'clock':_0x16c027,'origin':_0x400cba,'value':_0x3b3aa5});}if(_0x329e04['enabled'])_0x329e04[_0x4a8f75(0x1a4)]('feed:'+_0x3d701c+':'+_0x42081e,_0x329e04[_0x4a8f75(0x194)]()-_0x1897c5,'n='+_0x10f710['length']);return this[_0x4a8f75(0xa4)][_0x4a8f75(0x2ce)](_0x2cab7b,Math[_0x4a8f75(0x2c5)](_0x463620,_0x1ec16e)),_0x46c772[_0x4a8f75(0x2bf)](_0x42081e)>_0x1ec16e;}[_0x1d1c1f(0x20b)](){const _0x39b2d8=_0x1d1c1f;return{'started':this['_started'],'quantum':this[_0x39b2d8(0x28e)],'flushDebounce':this[_0x39b2d8(0x135)],'cursors':Object['fromEntries']([...this[_0x39b2d8(0xa4)][_0x39b2d8(0x206)]()][_0x39b2d8(0x284)](([_0x224204,_0xf493c7])=>[_0x224204[_0x39b2d8(0xf5)]('\x00',':'),_0xf493c7])),'pending':this[_0x39b2d8(0xa6)][_0x39b2d8(0x2ca)],'seen':this[_0x39b2d8(0x13a)][_0x39b2d8(0x2ca)]};}}return _0x31b6f3[_0x1d1c1f(0xc8)]=_0x368fd1,okdbChangefeed={'OKDBChangefeed':_0x31b6f3},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x3fcfcf=_0x18991b;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x3d7660=require$$1$1,_0x506f1b=require$$1,{EVENTS:_0x1f0274}=requireOkdbEnums(),_0x4aec30=require$$0$3,{slotKey:_0x4893b0}=requireOkdbProcessRegistry(),_0x5891b4=Number(process.env.OKDB_CLUSTER_RESPAWN_BACKOFF_MS)||0xfa,_0x9b299e=0xfa0,_0x53f29c=0x5,_0x3dd582=0x2710,_0x3d6efd=0xbb8,_0x2c7bbc=0x7d0,_0x3dba24=_0x3fcfcf(0x26d),_0x574153=_0x3fcfcf(0x22a),_0x165975='log',_0x5212e6=_0x3fcfcf(0xe6),_0x3adf04=[_0x1f0274['VIEW_PROGRESS'],_0x1f0274[_0x3fcfcf(0xb4)],_0x1f0274[_0x3fcfcf(0xbb)],_0x1f0274[_0x3fcfcf(0x233)],_0x1f0274[_0x3fcfcf(0x1dd)],_0x1f0274[_0x3fcfcf(0x1f6)],_0x1f0274['INDEX_RESET'],_0x1f0274[_0x3fcfcf(0x26c)],_0x3fcfcf(0x18a),_0x3fcfcf(0x1ff),_0x3fcfcf(0x189),_0x3fcfcf(0x12f),'processor:resumed','processor:retry'],_0x4eb093=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0,_0x3ed741=0x64;function _0x4c050b(_0x1860c9){const _0x3944f1=_0x3fcfcf;if(!_0x1860c9)return _0x3944f1(0x2cd);const _0x3b6d1a=(_0x1860c9[_0x3944f1(0x19c)]||[])[_0x3944f1(0x284)](_0x254638=>[_0x254638[_0x3944f1(0x292)],_0x254638['id'],_0x254638[_0x3944f1(0x2d2)],_0x254638[_0x3944f1(0x262)],!!_0x254638[_0x3944f1(0x20c)],!!_0x254638[_0x3944f1(0x2ab)],!!_0x254638['claimGated'],_0x254638['heldBy']?.[_0x3944f1(0x9d)]??null,_0x254638[_0x3944f1(0x1d4)]?String(_0x254638[_0x3944f1(0x1d4)]?.[_0x3944f1(0x295)]??_0x254638[_0x3944f1(0x1d4)]):null]);return JSON[_0x3944f1(0x151)]([!!_0x1860c9[_0x3944f1(0x2be)],_0x3b6d1a]);}function _0xbc61d8({workers:_0x31338a,makeOkdb:_0x1f5e22,port:_0x26f474,primaryOkdb:_0x163842,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0x48509b=_0x3fcfcf;if(_0x3d7660[_0x48509b(0x136)])return childEntry&&_0x3d7660[_0x48509b(0x1f0)]({'exec':_0x506f1b[_0x48509b(0x296)](__dirname,_0x48509b(0x166)),'args':[],'execArgv':((()=>{const _0xe42120=_0x48509b,_0x5ae312=[];for(let _0x8d6a67=0x0;_0x8d6a67<process[_0xe42120(0x26f)][_0xe42120(0x287)];_0x8d6a67++){const _0x1d2879=process['execArgv'][_0x8d6a67];if(_0x1d2879['startsWith'](_0xe42120(0x162))||_0x1d2879['startsWith'](_0xe42120(0xfb))||_0x1d2879[_0xe42120(0x181)](_0xe42120(0x15a)))continue;if(_0x1d2879==='-e'||_0x1d2879===_0xe42120(0x237)||_0x1d2879==='-p'||_0x1d2879===_0xe42120(0x208)){_0x8d6a67++;continue;}_0x5ae312[_0xe42120(0x2a5)](_0x1d2879);}return _0x5ae312;})())}),_0x5d079b({'workers':_0x31338a,'port':_0x26f474,'primaryOkdb':_0x163842,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x26f474});return _0x52ea10({'makeOkdb':_0x1f5e22,'port':_0x26f474});}function _0x5d079b({workers:_0x501b2a,port:_0x5d1f4d,primaryOkdb:_0x57cf65,workerEnv:_0x1d9922,workerRole:_0x49827a,listenAddr:_0x4df01a}){const _0xfa681=_0x3fcfcf,_0x34f06c=new Map(),_0x1e2cff=new Map();let _0x4d065b=![];const _0x5bd554=_0x5cc583=>_0x5cc583?.[_0xfa681(0x27d)],_0x294672=_0x4c93b4=>{const _0x5601ff=_0xfa681,_0x5d7bc4=_0x3d7660['fork']({...process.env,..._0x1d9922||{},'OKDB_CLUSTER_SLOT':String(_0x4c93b4)});return _0x5d7bc4['__okdbSlot']=_0x4c93b4,_0x34f06c['set'](_0x5d7bc4[_0x5601ff(0x2d4)][_0x5601ff(0x9d)],{'worker':_0x5d7bc4,'startedAt':Date[_0x5601ff(0x194)](),'slot':_0x4c93b4}),_0x5d7bc4['on'](_0x5601ff(0x1d4),_0x4cb037=>{const _0x15c143=_0x5601ff;console[_0x15c143(0x2b5)](_0x15c143(0x268)+_0x5d7bc4['process'][_0x15c143(0x9d)]+_0x15c143(0x2b4)+(_0x4cb037?.['message']??_0x4cb037));}),_0x5d7bc4['on'](_0x5601ff(0x1e1),()=>_0x42f49f()),_0x5d7bc4;},_0x174f74=_0x3a6036=>{const _0x4069dd=_0xfa681;for(const {worker:_0x117526}of _0x34f06c[_0x4069dd(0x17f)]()){if(_0x117526[_0x4069dd(0x1cc)]()||!_0x117526[_0x4069dd(0x283)]())continue;try{_0x117526[_0x4069dd(0x21f)](_0x3a6036);}catch{}}};_0x57cf65?.[_0xfa681(0x27c)]?.({'kind':'primary','listenAddr':_0x4df01a})[_0xfa681(0x1ad)](()=>{}),_0x57cf65?.['processes']?.[_0xfa681(0x28c)]?.({'workersConfigured':_0x501b2a});const _0x20fc7a={'engines':!![],'processors':!![],'compaction':!![],..._0x49827a,'http':!![]},_0x42f49f=()=>{const _0x3d83c8=_0xfa681,_0x1971e9=_0x57cf65?.[_0x3d83c8(0x1a6)];if(!_0x1971e9||!_0x1971e9['_isWriter'])return;const _0x4eed88=_0x1971e9[_0x3d83c8(0x279)];for(const {worker:_0x324725,startedAt:_0x430cf2,slot:_0x3983f4,stats:_0x324d60,processing:_0x18c2a4}of _0x34f06c[_0x3d83c8(0x17f)]()){if(_0x324725['isDead']())continue;const _0x47b25a=_0x1971e9['hasDesired']?.()&&_0x1971e9['getDesired'](_0x3d83c8(0x290),_0x1c6c19(_0x3983f4))?.[_0x3d83c8(0x17e)]===!![];_0x1971e9['publishChildRow']({'pid':_0x324725[_0x3d83c8(0x2d4)]['pid'],'startedAt':_0x430cf2,'kind':'http-server','supervisorKey':_0x4eed88,'slot':_0x3983f4,'slotKey':_0x1c6c19(_0x3983f4),'role':_0x20fc7a,'listenAddr':_0x4df01a,'lifecycle':_0x47b25a?_0x3d83c8(0x113):'running','processing':_0x18c2a4??null,'stats':_0x324d60??null})['catch'](()=>{});}},_0x1c6c19=_0x374e52=>_0x4893b0('cluster:'+_0x5d1f4d,_0x374e52),_0x170ae0=_0x56af34=>{const _0x57d208=_0xfa681,_0x245faa=_0x57cf65?.[_0x57d208(0x1a6)];if(!_0x245faa?.[_0x57d208(0x10f)]?.())return![];return _0x245faa[_0x57d208(0x2cc)](_0x57d208(0x290),_0x1c6c19(_0x56af34))?.[_0x57d208(0x17e)]===!![];};for(let _0x2a8b3a=0x0;_0x2a8b3a<_0x501b2a;_0x2a8b3a++){const _0x4b2472=_0x170ae0(_0x2a8b3a);_0x1e2cff['set'](_0x2a8b3a,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x4b2472,'respawnTimer':null}),_0x4b2472?console['log'](_0xfa681(0x159)+_0x2a8b3a+_0xfa681(0x1d0)):_0x294672(_0x2a8b3a);}const _0x57cfbe=()=>{const _0x13df9c=_0xfa681,_0x131b5b=_0x57cf65?.[_0x13df9c(0x1a6)];if(!_0x131b5b?.[_0x13df9c(0x29d)]||!_0x131b5b[_0x13df9c(0x10f)]?.())return;for(const [_0x22093c,_0x3ea95d]of _0x1e2cff[_0x13df9c(0x206)]()){const _0x1ea8ca=_0x131b5b[_0x13df9c(0x2cc)](_0x13df9c(0x290),_0x1c6c19(_0x22093c)),_0x5f5b64=_0x1ea8ca?.['decommission']===!![],_0x16b307=_0x1ea8ca?.['kill']===!![];if(_0x5f5b64&&!_0x3ea95d[_0x13df9c(0x247)]){_0x3ea95d['dead']=!![];_0x3ea95d[_0x13df9c(0x184)]&&(clearTimeout(_0x3ea95d[_0x13df9c(0x184)]),_0x3ea95d[_0x13df9c(0x184)]=null);for(const {worker:_0x116fcf}of _0x34f06c[_0x13df9c(0x17f)]()){if(_0x5bd554(_0x116fcf)!==_0x22093c||_0x116fcf[_0x13df9c(0x1cc)]())continue;try{if(_0x16b307)_0x116fcf[_0x13df9c(0x2d4)]['kill']('SIGKILL');else _0x116fcf[_0x13df9c(0x283)]()&&_0x116fcf[_0x13df9c(0x27b)]();}catch{}}console[_0x13df9c(0x2b5)]('[okdb-cluster]\x20'+(_0x16b307?_0x13df9c(0x150):_0x13df9c(0x235))+_0x13df9c(0x141)+_0x22093c+_0x13df9c(0xcf));}else{if(!_0x5f5b64&&_0x3ea95d[_0x13df9c(0x247)]&&_0x1ea8ca){_0x3ea95d[_0x13df9c(0x247)]=![],_0x3ea95d[_0x13df9c(0x183)]=[],_0x3ea95d[_0x13df9c(0xc9)]=0x0;const _0x42c102=[..._0x34f06c[_0x13df9c(0x17f)]()][_0x13df9c(0x2a1)](({worker:_0x3bd0d6})=>_0x5bd554(_0x3bd0d6)===_0x22093c&&!_0x3bd0d6[_0x13df9c(0x1cc)]());!_0x42c102&&!_0x4d065b&&(_0x294672(_0x22093c),console[_0x13df9c(0x2b5)]('[okdb-cluster]\x20recommissioned\x20worker\x20slot='+_0x22093c));}}}},_0x571ef0=()=>{try{_0x57cfbe();}catch{}};_0x57cf65?.[_0xfa681(0x11a)]?.['on']?.(_0x1f0274['SYSTEM_PROC'],_0x571ef0);const _0x4ae39f=[];if(_0x57cf65?.['events']?.['on'])for(const _0x49650e of _0x3adf04){const _0x5b4053=_0x48c20e=>{_0x174f74({[_0x3dba24]:_0x574153,'event':_0x49650e,'data':_0x48c20e??{}});};_0x57cf65[_0xfa681(0x11a)]['on'](_0x49650e,_0x5b4053),_0x4ae39f[_0xfa681(0x2a5)]({'event':_0x49650e,'handler':_0x5b4053});}const _0x30185d=setInterval(()=>{_0x57cfbe(),_0x42f49f();},_0x4eb093);_0x30185d['unref']?.();const _0x20215d=(_0x62f5c,_0x1f6301)=>{const _0x4a37f6=_0xfa681;if(!_0x1f6301||typeof _0x1f6301!==_0x4a37f6(0x193)||_0x1f6301[_0x3dba24]!==_0x165975)return;if(!_0x57cf65?.[_0x4a37f6(0x2b5)]?.['ingest'])return;const _0x47c0de=_0x1f6301[_0x4a37f6(0xe7)]||{};_0x57cf65[_0x4a37f6(0x2b5)][_0x4a37f6(0xb2)]({..._0x47c0de,'msg':'[w'+_0x1f6301[_0x4a37f6(0x290)]+']\x20'+(_0x47c0de[_0x4a37f6(0x282)]??''),'meta':{..._0x47c0de[_0x4a37f6(0x258)]||{},'worker':_0x1f6301[_0x4a37f6(0x290)],'workerPid':_0x1f6301['pid']}});};_0x3d7660['on']('message',_0x20215d);const _0x1933d6=(_0x1c2fec,_0x455d39)=>{const _0x49939a=_0xfa681;if(!_0x455d39||typeof _0x455d39!=='object'||_0x455d39[_0x3dba24]!==_0x5212e6)return;const _0x59c7a6=_0x34f06c[_0x49939a(0x10a)](_0x1c2fec['process'][_0x49939a(0x9d)]);if(_0x59c7a6){_0x59c7a6[_0x49939a(0xe6)]={..._0x455d39[_0x49939a(0xe6)],'at':Date[_0x49939a(0x194)]()};if(_0x455d39[_0x49939a(0x1b7)]!==undefined){const _0x4ac311=_0x4c050b(_0x455d39[_0x49939a(0x1b7)]);_0x4ac311!==_0x59c7a6[_0x49939a(0xea)]&&(_0x59c7a6[_0x49939a(0xea)]=_0x4ac311,_0x54f313()),_0x59c7a6[_0x49939a(0x1b7)]=_0x455d39[_0x49939a(0x1b7)];}}};let _0x46b1ea=null;const _0x54f313=()=>{if(_0x46b1ea||_0x4d065b)return;_0x46b1ea=setTimeout(()=>{_0x46b1ea=null;if(!_0x4d065b)_0x42f49f();},_0x3ed741),_0x46b1ea['unref']?.();};_0x3d7660['on'](_0xfa681(0x295),_0x1933d6),_0x3d7660['on']('exit',(_0x1b47d9,_0x571b1f,_0x3dace9)=>{const _0x2cce78=_0xfa681,_0x409bb2=_0x1b47d9['process'][_0x2cce78(0x9d)],_0x230518=_0x5bd554(_0x1b47d9),_0x52a92d=_0x34f06c['get'](_0x409bb2);if(_0x52a92d&&_0x57cf65?.[_0x2cce78(0x1a6)])_0x57cf65[_0x2cce78(0x1a6)][_0x2cce78(0x197)](_0x409bb2+':'+_0x52a92d['startedAt'])[_0x2cce78(0x1ad)](()=>{});_0x34f06c[_0x2cce78(0x14d)](_0x409bb2),console[_0x2cce78(0x2b5)](_0x2cce78(0x268)+_0x409bb2+_0x2cce78(0x129)+(_0x230518??'?')+_0x2cce78(0x175)+(_0x2cce78(0x17b)+_0x571b1f+_0x2cce78(0xb7)+(_0x3dace9??'none')+_0x2cce78(0x15f)+_0x34f06c[_0x2cce78(0x2ca)]+_0x2cce78(0x1a7))),_0x42f49f();if(_0x4d065b||_0x230518==null)return;const _0x5a4105=_0x1e2cff['get'](_0x230518);if(!_0x5a4105||_0x5a4105[_0x2cce78(0x247)])return;const _0x45097e=Date[_0x2cce78(0x194)]();_0x5a4105[_0x2cce78(0x183)][_0x2cce78(0x2a5)](_0x45097e),_0x5a4105[_0x2cce78(0x183)]=_0x5a4105['deaths'][_0x2cce78(0x195)](_0x1055d3=>_0x45097e-_0x1055d3<=_0x3dd582);if(_0x5a4105['deaths'][_0x2cce78(0x287)]>=_0x53f29c){_0x5a4105[_0x2cce78(0x247)]=!![],console[_0x2cce78(0x1d4)](_0x2cce78(0x198)+_0x230518+'\x20died\x20'+_0x5a4105['deaths'][_0x2cce78(0x287)]+'\x20times\x20in\x20'+(_0x3dd582+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x34f06c[_0x2cce78(0x2ca)]+'\x20worker(s)\x20still\x20serving'));return;}_0x5a4105['consecutiveFailures']++;const _0x4586c=Math[_0x2cce78(0x275)](_0x9b299e,_0x5891b4*0x2**(_0x5a4105['consecutiveFailures']-0x1));console['log'](_0x2cce78(0xb5)+_0x230518+_0x2cce78(0x196)+_0x4586c+'ms\x20(attempt\x20'+_0x5a4105[_0x2cce78(0xc9)]+')'),_0x5a4105[_0x2cce78(0x184)]=setTimeout(()=>{const _0x282ae4=_0x2cce78;_0x5a4105[_0x282ae4(0x184)]=null;if(_0x4d065b||_0x5a4105[_0x282ae4(0x247)])return;const _0x50e7b2=_0x294672(_0x230518);_0x50e7b2[_0x282ae4(0xce)](_0x282ae4(0x267),()=>{const _0x59bc60=_0x282ae4;if(_0x1e2cff[_0x59bc60(0x10a)](_0x230518)===_0x5a4105)_0x5a4105['consecutiveFailures']=0x0;});},_0x4586c),_0x5a4105[_0x2cce78(0x184)][_0x2cce78(0x232)]?.();});const _0x3cdf47=[..._0x34f06c[_0xfa681(0x1f2)]()];console[_0xfa681(0x2b5)](_0xfa681(0x28b)+process[_0xfa681(0x9d)]+_0xfa681(0x2b1)+_0x501b2a+_0xfa681(0x10e)+_0x5d1f4d+':\x20'+('['+_0x3cdf47[_0xfa681(0x296)](',\x20')+']'));const _0x144342={'_isClusterController':!![],'port':_0x5d1f4d,'primaryOkdb':_0x57cf65??null,'status'(){const _0x414735=_0xfa681;return{'clustered':!![],'primaryPid':process[_0x414735(0x9d)],'port':_0x5d1f4d,'primaryRole':_0x57cf65?.[_0x414735(0x2d0)]??null,'processorPid':null,'supervisorPid':process[_0x414735(0x9d)],'workers':[..._0x34f06c[_0x414735(0x17f)]()][_0x414735(0x284)](({worker:_0x4c7428})=>({'pid':_0x4c7428['process'][_0x414735(0x9d)],'id':_0x4c7428['id'],'dead':_0x4c7428[_0x414735(0x1cc)]()}))};},async 'close'(){const _0x5ae5d3=_0xfa681;_0x4d065b=!![];for(const _0x365c55 of _0x1e2cff[_0x5ae5d3(0x17f)]()){_0x365c55[_0x5ae5d3(0x247)]=!![],_0x365c55[_0x5ae5d3(0x184)]&&(clearTimeout(_0x365c55[_0x5ae5d3(0x184)]),_0x365c55[_0x5ae5d3(0x184)]=null);}clearInterval(_0x30185d);_0x46b1ea&&(clearTimeout(_0x46b1ea),_0x46b1ea=null);_0x3d7660[_0x5ae5d3(0x149)](_0x5ae5d3(0x295),_0x20215d),_0x3d7660['off'](_0x5ae5d3(0x295),_0x1933d6),_0x57cf65?.['events']?.[_0x5ae5d3(0x149)]?.(_0x1f0274['SYSTEM_PROC'],_0x571ef0);if(_0x57cf65?.[_0x5ae5d3(0x11a)]?.['off'])for(const {event:_0x4874d8,handler:_0x4d3209}of _0x4ae39f){try{_0x57cf65[_0x5ae5d3(0x11a)][_0x5ae5d3(0x149)](_0x4874d8,_0x4d3209);}catch{}}_0x4ae39f[_0x5ae5d3(0x287)]=0x0;const _0x35b1b0=[..._0x34f06c[_0x5ae5d3(0x17f)]()][_0x5ae5d3(0x284)](({worker:_0xff6172})=>_0xff6172);if(_0x35b1b0[_0x5ae5d3(0x287)]===0x0)return;await Promise[_0x5ae5d3(0x15d)](_0x35b1b0[_0x5ae5d3(0x284)](_0x5d0fdf=>new Promise(_0x5dd1dd=>{const _0x8fbee6=_0x5ae5d3;if(_0x5d0fdf[_0x8fbee6(0x1cc)]()){_0x5dd1dd();return;}let _0x52b9f4=![];const _0x3cabb1=()=>{if(_0x52b9f4)return;_0x52b9f4=!![];if(_0x216b37)clearTimeout(_0x216b37);_0x5dd1dd();};_0x5d0fdf[_0x8fbee6(0xce)](_0x8fbee6(0x1c7),_0x3cabb1);const _0x216b37=setTimeout(()=>{const _0xbf77b5=_0x8fbee6;try{_0x5d0fdf['process'][_0xbf77b5(0xa0)]();}catch{}},_0x3d6efd+0x1f4);_0x216b37[_0x8fbee6(0x232)]?.();try{_0x5d0fdf[_0x8fbee6(0x27b)]();}catch{try{_0x5d0fdf[_0x8fbee6(0x2d4)][_0x8fbee6(0xa0)]();}catch{}}})));}};return _0x144342;}async function _0x52ea10({makeOkdb:_0x3ca9b0,port:_0x31e160}){const _0x1f717d=_0x3fcfcf,_0xbedd51=await _0x3ca9b0();return _0x16ce9c(_0xbedd51),_0xbedd51[_0x1f717d(0xe9)]['listen'](_0x31e160);}function _0x16ce9c(_0x3d9369){const _0x19bdc4=_0x3fcfcf;if(!_0x3d9369||_0x3d9369[_0x19bdc4(0xa5)])return;_0x3d9369[_0x19bdc4(0xa5)]=!![];try{const {OKDBChangefeed:_0x35b77e}=requireOkdbChangefeed(),_0x10a55d=_0x3d9369['_adminRelay'];if(_0x10a55d&&typeof _0x10a55d['attachFeed']===_0x19bdc4(0x28f)){const _0x500abd=new _0x35b77e(_0x3d9369);_0x500abd[_0x19bdc4(0x269)](),_0x10a55d[_0x19bdc4(0x24c)](_0x500abd),_0x3d9369[_0x19bdc4(0x107)]=_0x500abd;}}catch(_0x10a2a7){_0x3d9369[_0x19bdc4(0x2b5)]?.[_0x19bdc4(0x169)]?.(_0x19bdc4(0xf6)+(_0x10a2a7?.['message']??_0x10a2a7),{'feature':_0x19bdc4(0x143)});}const _0xd54ec3=_0x4b4156=>{const _0x253970=_0x19bdc4;if(!_0x4b4156||typeof _0x4b4156!=='object'||_0x4b4156[_0x3dba24]==null)return;if(_0x4b4156[_0x3dba24]===_0x574153)try{_0x3d9369[_0x253970(0x1a3)]?.[_0x253970(0x227)]?.(_0x4b4156[_0x253970(0x1be)],_0x4b4156[_0x253970(0x191)]);}catch{}};process['on']('message',_0xd54ec3),_0x3d9369[_0x19bdc4(0x16d)]=_0xd54ec3;{let _0x3377b5=process[_0x19bdc4(0x134)](),_0xad6348=Date[_0x19bdc4(0x194)]();const _0x3adcee=()=>{const _0x2dbd8d=_0x19bdc4;if(typeof process['send']!=='function'||!process[_0x2dbd8d(0x12e)])return;const _0x2663a3=Date[_0x2dbd8d(0x194)](),_0x117e32=process[_0x2dbd8d(0x134)](),_0x4dfea4=(_0x2663a3-_0xad6348)*0x3e8,_0x42eeb8=_0x117e32[_0x2dbd8d(0x177)]-_0x3377b5[_0x2dbd8d(0x177)]+(_0x117e32[_0x2dbd8d(0x156)]-_0x3377b5[_0x2dbd8d(0x156)]),_0x381b58=_0x4dfea4>0x0?Math['min'](0x64,Math['round'](_0x42eeb8/(_0x4dfea4*(_0x4aec30[_0x2dbd8d(0x23b)]()[_0x2dbd8d(0x287)]||0x1))*0x64)):0x0;_0x3377b5=_0x117e32,_0xad6348=_0x2663a3;const _0x8c157b=process['memoryUsage']();let _0x396ab5=null;try{_0x396ab5=_0x3d9369[_0x2dbd8d(0x2d0)]?.[_0x2dbd8d(0x19c)]?_0x3d9369[_0x2dbd8d(0x1a6)]?.[_0x2dbd8d(0x2dd)]?.()??null:null;}catch{}try{process[_0x2dbd8d(0x21f)]({[_0x3dba24]:_0x5212e6,'stats':{'rss':_0x8c157b[_0x2dbd8d(0x131)],'heapUsed':_0x8c157b[_0x2dbd8d(0x2c6)],'heapTotal':_0x8c157b[_0x2dbd8d(0x174)],'external':_0x8c157b[_0x2dbd8d(0xfe)],'cpuPct':_0x381b58,'cpuWindowMs':Math[_0x2dbd8d(0x112)](_0x4dfea4/0x3e8)||null},'processing':_0x396ab5});}catch{}},_0x1e2ca1=Math[_0x19bdc4(0x2c5)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x11583a=setInterval(_0x3adcee,_0x1e2ca1);_0x11583a[_0x19bdc4(0x232)]?.(),_0x3adcee();for(const _0x32b85c of[_0x19bdc4(0x12f),_0x19bdc4(0x142)]){_0x3d9369[_0x19bdc4(0x11a)]?.['on']?.(_0x32b85c,()=>{try{_0x3adcee();}catch{}});}}let _0x371b1d=![];const _0x55b58f=async _0x3818cd=>{const _0x3a316e=_0x19bdc4;if(_0x371b1d)return;_0x371b1d=!![];const _0x62f669=setTimeout(()=>process['exit'](_0x3818cd),_0x3d6efd);_0x62f669[_0x3a316e(0x232)]?.();try{await _0x3d9369[_0x3a316e(0x13e)]?.();}catch{}process[_0x3a316e(0x1c7)](_0x3818cd);};process['on'](_0x19bdc4(0x27b),()=>_0x55b58f(0x0));if(process[_0x19bdc4(0x19e)]!==_0x19bdc4(0x1e8)){const _0xe7d781=setInterval(()=>{const _0x421eec=_0x19bdc4;if(process[_0x421eec(0x123)]===0x1)_0x55b58f(0x0);},_0x2c7bbc);_0xe7d781['unref']?.(),_0x3d9369['_clusterOrphanWatch']=_0xe7d781;}}return okdbCluster={'runClustered':_0xbc61d8,'attachWorkerCluster':_0x16ce9c},okdbCluster;}var hasRequiredOkdbHttpWorkerChild;function requireOkdbHttpWorkerChild(){if(hasRequiredOkdbHttpWorkerChild)return okdbHttpWorkerChild$1;hasRequiredOkdbHttpWorkerChild=0x1;const _0x4996fd=require$$0$5,{attachWorkerCluster:_0x54e5cb}=requireOkdbCluster();async function _0x51af0e(){const _0xb67a5=_0x4fa3,_0x2241fe=process.env.OKDB_HTTP_CHILD;if(!_0x2241fe)throw new Error(_0xb67a5(0x2b3));const {rootPath:_0x31a7e7,port:_0x6854f7,options:options={},logLevel:logLevel='info'}=JSON[_0xb67a5(0x1b2)](_0x2241fe);if(!_0x31a7e7||!_0x6854f7)throw new Error(_0xb67a5(0x22d));const _0x26829d=new _0x4996fd(_0x31a7e7,{...options,'engines':![],'processors':![],'compaction':![]});_0x26829d['log'][_0xb67a5(0x15b)]?.();const _0x2e0fdc=process.env.OKDB_CLUSTER_SLOT??'?',_0x4e8e9a={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x3632b2=_0x4e8e9a[logLevel]??_0x4e8e9a[_0xb67a5(0x1ca)];_0x26829d[_0xb67a5(0x2b5)][_0xb67a5(0xaf)](_0x553204=>{const _0x8cb1a=_0xb67a5;if((_0x4e8e9a[_0x553204[_0x8cb1a(0x103)]]??0x1)<_0x3632b2)return;try{process[_0x8cb1a(0x21f)]?.({'__okdbCluster':'log','slot':_0x2e0fdc,'pid':process[_0x8cb1a(0x9d)],'entry':_0x553204});}catch{}}),await _0x26829d[_0xb67a5(0x178)](),_0x54e5cb(_0x26829d),await _0x26829d['http'][_0xb67a5(0x114)](_0x6854f7);}return _0x51af0e()['catch'](_0x49f280=>{const _0x210cb8=_0x4fa3;try{process[_0x210cb8(0x21f)]?.({'__okdbCluster':'log','slot':process.env.OKDB_CLUSTER_SLOT??'?','pid':process[_0x210cb8(0x9d)],'entry':{'level':_0x210cb8(0x1d4),'msg':_0x210cb8(0x126)+(_0x49f280?.[_0x210cb8(0x295)]??_0x49f280)}});}catch{}process[_0x210cb8(0x1c7)](0x1);}),okdbHttpWorkerChild$1;}var okdbHttpWorkerChildExports=requireOkdbHttpWorkerChild(),okdbHttpWorkerChild=getDefaultExportFromCjs(okdbHttpWorkerChildExports);function _0x4fa3(_0x4e8c52,_0x32b891){_0x4e8c52=_0x4e8c52-0x99;const _0x4a2b28=_0x4a2b();let _0x4fa34d=_0x4a2b28[_0x4e8c52];return _0x4fa34d;}module['exports']=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;