mongo-my-admin 0.0.0-stage → 0.1.4

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 (394) hide show
  1. package/.next/BUILD_ID +1 -0
  2. package/.next/app-build-manifest.json +513 -0
  3. package/.next/app-path-routes-manifest.json +60 -0
  4. package/.next/build-manifest.json +33 -0
  5. package/.next/diagnostics/build-diagnostics.json +6 -0
  6. package/.next/diagnostics/framework.json +1 -0
  7. package/.next/export-marker.json +6 -0
  8. package/.next/images-manifest.json +58 -0
  9. package/.next/next-minimal-server.js.nft.json +1 -0
  10. package/.next/next-server.js.nft.json +1 -0
  11. package/.next/package.json +1 -0
  12. package/.next/prerender-manifest.json +90 -0
  13. package/.next/react-loadable-manifest.json +8 -0
  14. package/.next/required-server-files.json +323 -0
  15. package/.next/routes-manifest.json +410 -0
  16. package/.next/server/app/(app)/admin/audit/page.js +2 -0
  17. package/.next/server/app/(app)/admin/audit/page.js.nft.json +1 -0
  18. package/.next/server/app/(app)/admin/audit/page_client-reference-manifest.js +1 -0
  19. package/.next/server/app/(app)/admin/connections/page.js +2 -0
  20. package/.next/server/app/(app)/admin/connections/page.js.nft.json +1 -0
  21. package/.next/server/app/(app)/admin/connections/page_client-reference-manifest.js +1 -0
  22. package/.next/server/app/(app)/admin/security/page.js +2 -0
  23. package/.next/server/app/(app)/admin/security/page.js.nft.json +1 -0
  24. package/.next/server/app/(app)/admin/security/page_client-reference-manifest.js +1 -0
  25. package/.next/server/app/(app)/admin/users/page.js +2 -0
  26. package/.next/server/app/(app)/admin/users/page.js.nft.json +1 -0
  27. package/.next/server/app/(app)/admin/users/page_client-reference-manifest.js +1 -0
  28. package/.next/server/app/(app)/ai/page.js +12 -0
  29. package/.next/server/app/(app)/ai/page.js.nft.json +1 -0
  30. package/.next/server/app/(app)/ai/page_client-reference-manifest.js +1 -0
  31. package/.next/server/app/(app)/c/[cid]/[db]/[coll]/page.js +2 -0
  32. package/.next/server/app/(app)/c/[cid]/[db]/[coll]/page.js.nft.json +1 -0
  33. package/.next/server/app/(app)/c/[cid]/[db]/[coll]/page_client-reference-manifest.js +1 -0
  34. package/.next/server/app/(app)/c/[cid]/[db]/page.js +2 -0
  35. package/.next/server/app/(app)/c/[cid]/[db]/page.js.nft.json +1 -0
  36. package/.next/server/app/(app)/c/[cid]/[db]/page_client-reference-manifest.js +1 -0
  37. package/.next/server/app/(app)/c/[cid]/page.js +2 -0
  38. package/.next/server/app/(app)/c/[cid]/page.js.nft.json +1 -0
  39. package/.next/server/app/(app)/c/[cid]/page_client-reference-manifest.js +1 -0
  40. package/.next/server/app/(app)/c/[cid]/performance/page.js +2 -0
  41. package/.next/server/app/(app)/c/[cid]/performance/page.js.nft.json +1 -0
  42. package/.next/server/app/(app)/c/[cid]/performance/page_client-reference-manifest.js +1 -0
  43. package/.next/server/app/(app)/c/[cid]/shell/page.js +2 -0
  44. package/.next/server/app/(app)/c/[cid]/shell/page.js.nft.json +1 -0
  45. package/.next/server/app/(app)/c/[cid]/shell/page_client-reference-manifest.js +1 -0
  46. package/.next/server/app/(app)/page.js +2 -0
  47. package/.next/server/app/(app)/page.js.nft.json +1 -0
  48. package/.next/server/app/(app)/page_client-reference-manifest.js +1 -0
  49. package/.next/server/app/(app)/queries/page.js +2 -0
  50. package/.next/server/app/(app)/queries/page.js.nft.json +1 -0
  51. package/.next/server/app/(app)/queries/page_client-reference-manifest.js +1 -0
  52. package/.next/server/app/_not-found/page.js +2 -0
  53. package/.next/server/app/_not-found/page.js.nft.json +1 -0
  54. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -0
  55. package/.next/server/app/_not-found.html +1 -0
  56. package/.next/server/app/_not-found.meta +16 -0
  57. package/.next/server/app/_not-found.rsc +19 -0
  58. package/.next/server/app/api/admin/approvals/[id]/route.js +1 -0
  59. package/.next/server/app/api/admin/approvals/[id]/route.js.nft.json +1 -0
  60. package/.next/server/app/api/admin/approvals/[id]/route_client-reference-manifest.js +1 -0
  61. package/.next/server/app/api/admin/approvals/route.js +1 -0
  62. package/.next/server/app/api/admin/approvals/route.js.nft.json +1 -0
  63. package/.next/server/app/api/admin/approvals/route_client-reference-manifest.js +1 -0
  64. package/.next/server/app/api/admin/audit/route.js +1 -0
  65. package/.next/server/app/api/admin/audit/route.js.nft.json +1 -0
  66. package/.next/server/app/api/admin/audit/route_client-reference-manifest.js +1 -0
  67. package/.next/server/app/api/admin/security/route.js +1 -0
  68. package/.next/server/app/api/admin/security/route.js.nft.json +1 -0
  69. package/.next/server/app/api/admin/security/route_client-reference-manifest.js +1 -0
  70. package/.next/server/app/api/admin/users/[uid]/route.js +1 -0
  71. package/.next/server/app/api/admin/users/[uid]/route.js.nft.json +1 -0
  72. package/.next/server/app/api/admin/users/[uid]/route_client-reference-manifest.js +1 -0
  73. package/.next/server/app/api/admin/users/route.js +1 -0
  74. package/.next/server/app/api/admin/users/route.js.nft.json +1 -0
  75. package/.next/server/app/api/admin/users/route_client-reference-manifest.js +1 -0
  76. package/.next/server/app/api/ai/chat/route.js +2 -0
  77. package/.next/server/app/api/ai/chat/route.js.nft.json +1 -0
  78. package/.next/server/app/api/ai/chat/route_client-reference-manifest.js +1 -0
  79. package/.next/server/app/api/ai/confirm/route.js +2 -0
  80. package/.next/server/app/api/ai/confirm/route.js.nft.json +1 -0
  81. package/.next/server/app/api/ai/confirm/route_client-reference-manifest.js +1 -0
  82. package/.next/server/app/api/ai/policy/route.js +2 -0
  83. package/.next/server/app/api/ai/policy/route.js.nft.json +1 -0
  84. package/.next/server/app/api/ai/policy/route_client-reference-manifest.js +1 -0
  85. package/.next/server/app/api/ai/providers/[id]/route.js +2 -0
  86. package/.next/server/app/api/ai/providers/[id]/route.js.nft.json +1 -0
  87. package/.next/server/app/api/ai/providers/[id]/route_client-reference-manifest.js +1 -0
  88. package/.next/server/app/api/ai/providers/[id]/test/route.js +2 -0
  89. package/.next/server/app/api/ai/providers/[id]/test/route.js.nft.json +1 -0
  90. package/.next/server/app/api/ai/providers/[id]/test/route_client-reference-manifest.js +1 -0
  91. package/.next/server/app/api/ai/providers/route.js +2 -0
  92. package/.next/server/app/api/ai/providers/route.js.nft.json +1 -0
  93. package/.next/server/app/api/ai/providers/route_client-reference-manifest.js +1 -0
  94. package/.next/server/app/api/ai/tokens/[id]/route.js +2 -0
  95. package/.next/server/app/api/ai/tokens/[id]/route.js.nft.json +1 -0
  96. package/.next/server/app/api/ai/tokens/[id]/route_client-reference-manifest.js +1 -0
  97. package/.next/server/app/api/ai/tokens/route.js +2 -0
  98. package/.next/server/app/api/ai/tokens/route.js.nft.json +1 -0
  99. package/.next/server/app/api/ai/tokens/route_client-reference-manifest.js +1 -0
  100. package/.next/server/app/api/auth/login/route.js +1 -0
  101. package/.next/server/app/api/auth/login/route.js.nft.json +1 -0
  102. package/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -0
  103. package/.next/server/app/api/auth/logout/route.js +1 -0
  104. package/.next/server/app/api/auth/logout/route.js.nft.json +1 -0
  105. package/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -0
  106. package/.next/server/app/api/c/[cid]/[db]/[coll]/aggregate/route.js +1 -0
  107. package/.next/server/app/api/c/[cid]/[db]/[coll]/aggregate/route.js.nft.json +1 -0
  108. package/.next/server/app/api/c/[cid]/[db]/[coll]/aggregate/route_client-reference-manifest.js +1 -0
  109. package/.next/server/app/api/c/[cid]/[db]/[coll]/bulk/route.js +1 -0
  110. package/.next/server/app/api/c/[cid]/[db]/[coll]/bulk/route.js.nft.json +1 -0
  111. package/.next/server/app/api/c/[cid]/[db]/[coll]/bulk/route_client-reference-manifest.js +1 -0
  112. package/.next/server/app/api/c/[cid]/[db]/[coll]/count/route.js +1 -0
  113. package/.next/server/app/api/c/[cid]/[db]/[coll]/count/route.js.nft.json +1 -0
  114. package/.next/server/app/api/c/[cid]/[db]/[coll]/count/route_client-reference-manifest.js +1 -0
  115. package/.next/server/app/api/c/[cid]/[db]/[coll]/danger/route.js +1 -0
  116. package/.next/server/app/api/c/[cid]/[db]/[coll]/danger/route.js.nft.json +1 -0
  117. package/.next/server/app/api/c/[cid]/[db]/[coll]/danger/route_client-reference-manifest.js +1 -0
  118. package/.next/server/app/api/c/[cid]/[db]/[coll]/docs/route.js +1 -0
  119. package/.next/server/app/api/c/[cid]/[db]/[coll]/docs/route.js.nft.json +1 -0
  120. package/.next/server/app/api/c/[cid]/[db]/[coll]/docs/route_client-reference-manifest.js +1 -0
  121. package/.next/server/app/api/c/[cid]/[db]/[coll]/explain/route.js +1 -0
  122. package/.next/server/app/api/c/[cid]/[db]/[coll]/explain/route.js.nft.json +1 -0
  123. package/.next/server/app/api/c/[cid]/[db]/[coll]/explain/route_client-reference-manifest.js +1 -0
  124. package/.next/server/app/api/c/[cid]/[db]/[coll]/export/route.js +1 -0
  125. package/.next/server/app/api/c/[cid]/[db]/[coll]/export/route.js.nft.json +1 -0
  126. package/.next/server/app/api/c/[cid]/[db]/[coll]/export/route_client-reference-manifest.js +1 -0
  127. package/.next/server/app/api/c/[cid]/[db]/[coll]/find/route.js +1 -0
  128. package/.next/server/app/api/c/[cid]/[db]/[coll]/find/route.js.nft.json +1 -0
  129. package/.next/server/app/api/c/[cid]/[db]/[coll]/find/route_client-reference-manifest.js +1 -0
  130. package/.next/server/app/api/c/[cid]/[db]/[coll]/import/route.js +1 -0
  131. package/.next/server/app/api/c/[cid]/[db]/[coll]/import/route.js.nft.json +1 -0
  132. package/.next/server/app/api/c/[cid]/[db]/[coll]/import/route_client-reference-manifest.js +1 -0
  133. package/.next/server/app/api/c/[cid]/[db]/[coll]/indexes/route.js +1 -0
  134. package/.next/server/app/api/c/[cid]/[db]/[coll]/indexes/route.js.nft.json +1 -0
  135. package/.next/server/app/api/c/[cid]/[db]/[coll]/indexes/route_client-reference-manifest.js +1 -0
  136. package/.next/server/app/api/c/[cid]/[db]/[coll]/schema/route.js +1 -0
  137. package/.next/server/app/api/c/[cid]/[db]/[coll]/schema/route.js.nft.json +1 -0
  138. package/.next/server/app/api/c/[cid]/[db]/[coll]/schema/route_client-reference-manifest.js +1 -0
  139. package/.next/server/app/api/c/[cid]/[db]/[coll]/stats/route.js +1 -0
  140. package/.next/server/app/api/c/[cid]/[db]/[coll]/stats/route.js.nft.json +1 -0
  141. package/.next/server/app/api/c/[cid]/[db]/[coll]/stats/route_client-reference-manifest.js +1 -0
  142. package/.next/server/app/api/c/[cid]/[db]/[coll]/validation/route.js +1 -0
  143. package/.next/server/app/api/c/[cid]/[db]/[coll]/validation/route.js.nft.json +1 -0
  144. package/.next/server/app/api/c/[cid]/[db]/[coll]/validation/route_client-reference-manifest.js +1 -0
  145. package/.next/server/app/api/c/[cid]/[db]/collections/route.js +1 -0
  146. package/.next/server/app/api/c/[cid]/[db]/collections/route.js.nft.json +1 -0
  147. package/.next/server/app/api/c/[cid]/[db]/collections/route_client-reference-manifest.js +1 -0
  148. package/.next/server/app/api/c/[cid]/[db]/collstats/route.js +1 -0
  149. package/.next/server/app/api/c/[cid]/[db]/collstats/route.js.nft.json +1 -0
  150. package/.next/server/app/api/c/[cid]/[db]/collstats/route_client-reference-manifest.js +1 -0
  151. package/.next/server/app/api/c/[cid]/[db]/danger/route.js +1 -0
  152. package/.next/server/app/api/c/[cid]/[db]/danger/route.js.nft.json +1 -0
  153. package/.next/server/app/api/c/[cid]/[db]/danger/route_client-reference-manifest.js +1 -0
  154. package/.next/server/app/api/c/[cid]/[db]/stats/route.js +1 -0
  155. package/.next/server/app/api/c/[cid]/[db]/stats/route.js.nft.json +1 -0
  156. package/.next/server/app/api/c/[cid]/[db]/stats/route_client-reference-manifest.js +1 -0
  157. package/.next/server/app/api/c/[cid]/databases/route.js +1 -0
  158. package/.next/server/app/api/c/[cid]/databases/route.js.nft.json +1 -0
  159. package/.next/server/app/api/c/[cid]/databases/route_client-reference-manifest.js +1 -0
  160. package/.next/server/app/api/c/[cid]/server/route.js +1 -0
  161. package/.next/server/app/api/c/[cid]/server/route.js.nft.json +1 -0
  162. package/.next/server/app/api/c/[cid]/server/route_client-reference-manifest.js +1 -0
  163. package/.next/server/app/api/c/[cid]/shell/route.js +1 -0
  164. package/.next/server/app/api/c/[cid]/shell/route.js.nft.json +1 -0
  165. package/.next/server/app/api/c/[cid]/shell/route_client-reference-manifest.js +1 -0
  166. package/.next/server/app/api/c/[cid]/tree/route.js +1 -0
  167. package/.next/server/app/api/c/[cid]/tree/route.js.nft.json +1 -0
  168. package/.next/server/app/api/c/[cid]/tree/route_client-reference-manifest.js +1 -0
  169. package/.next/server/app/api/connections/[cid]/route.js +1 -0
  170. package/.next/server/app/api/connections/[cid]/route.js.nft.json +1 -0
  171. package/.next/server/app/api/connections/[cid]/route_client-reference-manifest.js +1 -0
  172. package/.next/server/app/api/connections/route.js +1 -0
  173. package/.next/server/app/api/connections/route.js.nft.json +1 -0
  174. package/.next/server/app/api/connections/route_client-reference-manifest.js +1 -0
  175. package/.next/server/app/api/connections/test/route.js +1 -0
  176. package/.next/server/app/api/connections/test/route.js.nft.json +1 -0
  177. package/.next/server/app/api/connections/test/route_client-reference-manifest.js +1 -0
  178. package/.next/server/app/api/mcp/route.js +31 -0
  179. package/.next/server/app/api/mcp/route.js.nft.json +1 -0
  180. package/.next/server/app/api/mcp/route_client-reference-manifest.js +1 -0
  181. package/.next/server/app/api/me/route.js +1 -0
  182. package/.next/server/app/api/me/route.js.nft.json +1 -0
  183. package/.next/server/app/api/me/route_client-reference-manifest.js +1 -0
  184. package/.next/server/app/api/me/totp/route.js +1 -0
  185. package/.next/server/app/api/me/totp/route.js.nft.json +1 -0
  186. package/.next/server/app/api/me/totp/route_client-reference-manifest.js +1 -0
  187. package/.next/server/app/favicon.ico/route.js +1 -0
  188. package/.next/server/app/favicon.ico/route.js.nft.json +1 -0
  189. package/.next/server/app/favicon.ico.body +0 -0
  190. package/.next/server/app/favicon.ico.meta +1 -0
  191. package/.next/server/app/login/page.js +2 -0
  192. package/.next/server/app/login/page.js.nft.json +1 -0
  193. package/.next/server/app/login/page_client-reference-manifest.js +1 -0
  194. package/.next/server/app/login.html +1 -0
  195. package/.next/server/app/login.meta +15 -0
  196. package/.next/server/app/login.rsc +23 -0
  197. package/.next/server/app-paths-manifest.json +60 -0
  198. package/.next/server/chunks/1005.js +13 -0
  199. package/.next/server/chunks/1671.js +3 -0
  200. package/.next/server/chunks/3249.js +55 -0
  201. package/.next/server/chunks/3336.js +1 -0
  202. package/.next/server/chunks/3565.js +1 -0
  203. package/.next/server/chunks/4357.js +128 -0
  204. package/.next/server/chunks/4811.js +15 -0
  205. package/.next/server/chunks/5207.js +1 -0
  206. package/.next/server/chunks/5611.js +6 -0
  207. package/.next/server/chunks/641.js +1 -0
  208. package/.next/server/chunks/7090.js +1 -0
  209. package/.next/server/chunks/7900.js +4 -0
  210. package/.next/server/chunks/890.js +22 -0
  211. package/.next/server/functions-config-manifest.json +4 -0
  212. package/.next/server/interception-route-rewrite-manifest.js +1 -0
  213. package/.next/server/middleware-build-manifest.js +1 -0
  214. package/.next/server/middleware-manifest.json +6 -0
  215. package/.next/server/middleware-react-loadable-manifest.js +1 -0
  216. package/.next/server/next-font-manifest.js +1 -0
  217. package/.next/server/next-font-manifest.json +1 -0
  218. package/.next/server/pages/404.html +1 -0
  219. package/.next/server/pages/500.html +1 -0
  220. package/.next/server/pages/_app.js +1 -0
  221. package/.next/server/pages/_app.js.nft.json +1 -0
  222. package/.next/server/pages/_document.js +1 -0
  223. package/.next/server/pages/_document.js.nft.json +1 -0
  224. package/.next/server/pages/_error.js +19 -0
  225. package/.next/server/pages/_error.js.nft.json +1 -0
  226. package/.next/server/pages-manifest.json +6 -0
  227. package/.next/server/server-reference-manifest.js +1 -0
  228. package/.next/server/server-reference-manifest.json +1 -0
  229. package/.next/server/webpack-runtime.js +1 -0
  230. package/.next/static/G4cngSmGFZg9r2ZjPR60A/_buildManifest.js +1 -0
  231. package/.next/static/G4cngSmGFZg9r2ZjPR60A/_ssgManifest.js +1 -0
  232. package/.next/static/chunks/1255-b84741b894bb9354.js +1 -0
  233. package/.next/static/chunks/3510-eb016c974975272c.js +1 -0
  234. package/.next/static/chunks/363642f4-b76d1a643b93556c.js +1 -0
  235. package/.next/static/chunks/4bd1b696-f785427dddbba9fb.js +1 -0
  236. package/.next/static/chunks/5376-9379c07669d2c28f.js +1 -0
  237. package/.next/static/chunks/5483-41e5f4776321671b.js +1 -0
  238. package/.next/static/chunks/559-bb0824aa49e1e88f.js +1 -0
  239. package/.next/static/chunks/5854-e53d093ab3d47bac.js +1 -0
  240. package/.next/static/chunks/6094-2acc6d932aabc2c5.js +1 -0
  241. package/.next/static/chunks/6545-2920df06f8188678.js +1 -0
  242. package/.next/static/chunks/6569.dd7c980e8da3a8f9.js +1 -0
  243. package/.next/static/chunks/7064-2c9c3ef8e8802efe.js +1 -0
  244. package/.next/static/chunks/8166-ebfa3185c20f6afa.js +1 -0
  245. package/.next/static/chunks/8720-bddd249d42ab6b16.js +1 -0
  246. package/.next/static/chunks/app/(app)/admin/audit/page-37753625bab57838.js +1 -0
  247. package/.next/static/chunks/app/(app)/admin/connections/page-820cf63eafd1599a.js +1 -0
  248. package/.next/static/chunks/app/(app)/admin/security/page-eac00bd22a1d165c.js +1 -0
  249. package/.next/static/chunks/app/(app)/admin/users/page-0b5011243a0fec97.js +1 -0
  250. package/.next/static/chunks/app/(app)/ai/page-df132e69b1d649f8.js +1 -0
  251. package/.next/static/chunks/app/(app)/c/[cid]/[db]/[coll]/page-0c7d71c115a02eb6.js +1 -0
  252. package/.next/static/chunks/app/(app)/c/[cid]/[db]/page-e700371c72058bc1.js +1 -0
  253. package/.next/static/chunks/app/(app)/c/[cid]/page-65d8810975a53cf0.js +1 -0
  254. package/.next/static/chunks/app/(app)/c/[cid]/performance/page-c6ae1521644ca6f1.js +1 -0
  255. package/.next/static/chunks/app/(app)/c/[cid]/shell/page-7900bef5bb856829.js +1 -0
  256. package/.next/static/chunks/app/(app)/layout-51a850b461498da4.js +1 -0
  257. package/.next/static/chunks/app/(app)/page-1c4d519e29aa2713.js +1 -0
  258. package/.next/static/chunks/app/(app)/queries/page-5c17ba95a116f5fa.js +1 -0
  259. package/.next/static/chunks/app/_not-found/page-1b209d37768dae8e.js +1 -0
  260. package/.next/static/chunks/app/api/admin/approvals/[id]/route-92dc981ff2fa6cf3.js +1 -0
  261. package/.next/static/chunks/app/api/admin/approvals/route-92dc981ff2fa6cf3.js +1 -0
  262. package/.next/static/chunks/app/api/admin/audit/route-92dc981ff2fa6cf3.js +1 -0
  263. package/.next/static/chunks/app/api/admin/security/route-92dc981ff2fa6cf3.js +1 -0
  264. package/.next/static/chunks/app/api/admin/users/[uid]/route-92dc981ff2fa6cf3.js +1 -0
  265. package/.next/static/chunks/app/api/admin/users/route-92dc981ff2fa6cf3.js +1 -0
  266. package/.next/static/chunks/app/api/ai/chat/route-92dc981ff2fa6cf3.js +1 -0
  267. package/.next/static/chunks/app/api/ai/confirm/route-92dc981ff2fa6cf3.js +1 -0
  268. package/.next/static/chunks/app/api/ai/policy/route-92dc981ff2fa6cf3.js +1 -0
  269. package/.next/static/chunks/app/api/ai/providers/[id]/route-92dc981ff2fa6cf3.js +1 -0
  270. package/.next/static/chunks/app/api/ai/providers/[id]/test/route-92dc981ff2fa6cf3.js +1 -0
  271. package/.next/static/chunks/app/api/ai/providers/route-92dc981ff2fa6cf3.js +1 -0
  272. package/.next/static/chunks/app/api/ai/tokens/[id]/route-92dc981ff2fa6cf3.js +1 -0
  273. package/.next/static/chunks/app/api/ai/tokens/route-92dc981ff2fa6cf3.js +1 -0
  274. package/.next/static/chunks/app/api/auth/login/route-92dc981ff2fa6cf3.js +1 -0
  275. package/.next/static/chunks/app/api/auth/logout/route-92dc981ff2fa6cf3.js +1 -0
  276. package/.next/static/chunks/app/api/c/[cid]/[db]/[coll]/aggregate/route-92dc981ff2fa6cf3.js +1 -0
  277. package/.next/static/chunks/app/api/c/[cid]/[db]/[coll]/bulk/route-92dc981ff2fa6cf3.js +1 -0
  278. package/.next/static/chunks/app/api/c/[cid]/[db]/[coll]/count/route-92dc981ff2fa6cf3.js +1 -0
  279. package/.next/static/chunks/app/api/c/[cid]/[db]/[coll]/danger/route-92dc981ff2fa6cf3.js +1 -0
  280. package/.next/static/chunks/app/api/c/[cid]/[db]/[coll]/docs/route-92dc981ff2fa6cf3.js +1 -0
  281. package/.next/static/chunks/app/api/c/[cid]/[db]/[coll]/explain/route-92dc981ff2fa6cf3.js +1 -0
  282. package/.next/static/chunks/app/api/c/[cid]/[db]/[coll]/export/route-92dc981ff2fa6cf3.js +1 -0
  283. package/.next/static/chunks/app/api/c/[cid]/[db]/[coll]/find/route-92dc981ff2fa6cf3.js +1 -0
  284. package/.next/static/chunks/app/api/c/[cid]/[db]/[coll]/import/route-92dc981ff2fa6cf3.js +1 -0
  285. package/.next/static/chunks/app/api/c/[cid]/[db]/[coll]/indexes/route-92dc981ff2fa6cf3.js +1 -0
  286. package/.next/static/chunks/app/api/c/[cid]/[db]/[coll]/schema/route-92dc981ff2fa6cf3.js +1 -0
  287. package/.next/static/chunks/app/api/c/[cid]/[db]/[coll]/stats/route-92dc981ff2fa6cf3.js +1 -0
  288. package/.next/static/chunks/app/api/c/[cid]/[db]/[coll]/validation/route-92dc981ff2fa6cf3.js +1 -0
  289. package/.next/static/chunks/app/api/c/[cid]/[db]/collections/route-92dc981ff2fa6cf3.js +1 -0
  290. package/.next/static/chunks/app/api/c/[cid]/[db]/collstats/route-92dc981ff2fa6cf3.js +1 -0
  291. package/.next/static/chunks/app/api/c/[cid]/[db]/danger/route-92dc981ff2fa6cf3.js +1 -0
  292. package/.next/static/chunks/app/api/c/[cid]/[db]/stats/route-92dc981ff2fa6cf3.js +1 -0
  293. package/.next/static/chunks/app/api/c/[cid]/databases/route-92dc981ff2fa6cf3.js +1 -0
  294. package/.next/static/chunks/app/api/c/[cid]/server/route-92dc981ff2fa6cf3.js +1 -0
  295. package/.next/static/chunks/app/api/c/[cid]/shell/route-92dc981ff2fa6cf3.js +1 -0
  296. package/.next/static/chunks/app/api/c/[cid]/tree/route-92dc981ff2fa6cf3.js +1 -0
  297. package/.next/static/chunks/app/api/connections/[cid]/route-92dc981ff2fa6cf3.js +1 -0
  298. package/.next/static/chunks/app/api/connections/route-92dc981ff2fa6cf3.js +1 -0
  299. package/.next/static/chunks/app/api/connections/test/route-92dc981ff2fa6cf3.js +1 -0
  300. package/.next/static/chunks/app/api/mcp/route-92dc981ff2fa6cf3.js +1 -0
  301. package/.next/static/chunks/app/api/me/route-92dc981ff2fa6cf3.js +1 -0
  302. package/.next/static/chunks/app/api/me/totp/route-92dc981ff2fa6cf3.js +1 -0
  303. package/.next/static/chunks/app/layout-e8f9794c3ac6a87d.js +1 -0
  304. package/.next/static/chunks/app/login/page-40fc4571688a5fe4.js +1 -0
  305. package/.next/static/chunks/bb55d925-1f4f527ca293a78d.js +3 -0
  306. package/.next/static/chunks/framework-c58965a13b4aab6d.js +1 -0
  307. package/.next/static/chunks/main-app-804a108971cfb50b.js +1 -0
  308. package/.next/static/chunks/main-b95b5f7f62b64ae7.js +1 -0
  309. package/.next/static/chunks/pages/_app-6c8c2371b16a04b8.js +1 -0
  310. package/.next/static/chunks/pages/_error-94812ad32cad7365.js +1 -0
  311. package/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
  312. package/.next/static/chunks/webpack-0ce8f621312b1eec.js +1 -0
  313. package/.next/static/css/d9c6fe72e33886b3.css +3 -0
  314. package/.next/static/media/0aa834ed78bf6d07-s.woff2 +0 -0
  315. package/.next/static/media/19cfc7226ec3afaa-s.woff2 +0 -0
  316. package/.next/static/media/21350d82a1f187e9-s.woff2 +0 -0
  317. package/.next/static/media/67957d42bae0796d-s.woff2 +0 -0
  318. package/.next/static/media/886030b0b59bc5a7-s.woff2 +0 -0
  319. package/.next/static/media/8e9860b6e62d6359-s.woff2 +0 -0
  320. package/.next/static/media/939c4f875ee75fbb-s.woff2 +0 -0
  321. package/.next/static/media/ba9851c3c22cd980-s.woff2 +0 -0
  322. package/.next/static/media/bb3ef058b751a6ad-s.p.woff2 +0 -0
  323. package/.next/static/media/c5fe6dc8356a8c31-s.woff2 +0 -0
  324. package/.next/static/media/df0a9ae256c0569c-s.woff2 +0 -0
  325. package/.next/static/media/e4af272ccee01ff0-s.p.woff2 +0 -0
  326. package/.next/static/media/f911b923c6adde36-s.woff2 +0 -0
  327. package/.next/trace +6 -0
  328. package/.next/types/app/(app)/admin/audit/page.ts +84 -0
  329. package/.next/types/app/(app)/admin/connections/page.ts +84 -0
  330. package/.next/types/app/(app)/admin/security/page.ts +84 -0
  331. package/.next/types/app/(app)/admin/users/page.ts +84 -0
  332. package/.next/types/app/(app)/ai/page.ts +84 -0
  333. package/.next/types/app/(app)/c/[cid]/[db]/[coll]/page.ts +84 -0
  334. package/.next/types/app/(app)/c/[cid]/[db]/page.ts +84 -0
  335. package/.next/types/app/(app)/c/[cid]/page.ts +84 -0
  336. package/.next/types/app/(app)/c/[cid]/performance/page.ts +84 -0
  337. package/.next/types/app/(app)/c/[cid]/shell/page.ts +84 -0
  338. package/.next/types/app/(app)/page.ts +84 -0
  339. package/.next/types/app/(app)/queries/page.ts +84 -0
  340. package/.next/types/app/api/admin/approvals/[id]/route.ts +347 -0
  341. package/.next/types/app/api/admin/approvals/route.ts +347 -0
  342. package/.next/types/app/api/admin/audit/route.ts +347 -0
  343. package/.next/types/app/api/admin/security/route.ts +347 -0
  344. package/.next/types/app/api/admin/users/[uid]/route.ts +347 -0
  345. package/.next/types/app/api/admin/users/route.ts +347 -0
  346. package/.next/types/app/api/ai/chat/route.ts +347 -0
  347. package/.next/types/app/api/ai/confirm/route.ts +347 -0
  348. package/.next/types/app/api/ai/policy/route.ts +347 -0
  349. package/.next/types/app/api/ai/providers/[id]/route.ts +347 -0
  350. package/.next/types/app/api/ai/providers/[id]/test/route.ts +347 -0
  351. package/.next/types/app/api/ai/providers/route.ts +347 -0
  352. package/.next/types/app/api/ai/tokens/[id]/route.ts +347 -0
  353. package/.next/types/app/api/ai/tokens/route.ts +347 -0
  354. package/.next/types/app/api/auth/login/route.ts +347 -0
  355. package/.next/types/app/api/auth/logout/route.ts +347 -0
  356. package/.next/types/app/api/c/[cid]/[db]/[coll]/aggregate/route.ts +347 -0
  357. package/.next/types/app/api/c/[cid]/[db]/[coll]/bulk/route.ts +347 -0
  358. package/.next/types/app/api/c/[cid]/[db]/[coll]/count/route.ts +347 -0
  359. package/.next/types/app/api/c/[cid]/[db]/[coll]/danger/route.ts +347 -0
  360. package/.next/types/app/api/c/[cid]/[db]/[coll]/docs/route.ts +347 -0
  361. package/.next/types/app/api/c/[cid]/[db]/[coll]/explain/route.ts +347 -0
  362. package/.next/types/app/api/c/[cid]/[db]/[coll]/export/route.ts +347 -0
  363. package/.next/types/app/api/c/[cid]/[db]/[coll]/find/route.ts +347 -0
  364. package/.next/types/app/api/c/[cid]/[db]/[coll]/import/route.ts +347 -0
  365. package/.next/types/app/api/c/[cid]/[db]/[coll]/indexes/route.ts +347 -0
  366. package/.next/types/app/api/c/[cid]/[db]/[coll]/schema/route.ts +347 -0
  367. package/.next/types/app/api/c/[cid]/[db]/[coll]/stats/route.ts +347 -0
  368. package/.next/types/app/api/c/[cid]/[db]/[coll]/validation/route.ts +347 -0
  369. package/.next/types/app/api/c/[cid]/[db]/collections/route.ts +347 -0
  370. package/.next/types/app/api/c/[cid]/[db]/collstats/route.ts +347 -0
  371. package/.next/types/app/api/c/[cid]/[db]/danger/route.ts +347 -0
  372. package/.next/types/app/api/c/[cid]/[db]/stats/route.ts +347 -0
  373. package/.next/types/app/api/c/[cid]/databases/route.ts +347 -0
  374. package/.next/types/app/api/c/[cid]/server/route.ts +347 -0
  375. package/.next/types/app/api/c/[cid]/shell/route.ts +347 -0
  376. package/.next/types/app/api/c/[cid]/tree/route.ts +347 -0
  377. package/.next/types/app/api/connections/[cid]/route.ts +347 -0
  378. package/.next/types/app/api/connections/route.ts +347 -0
  379. package/.next/types/app/api/connections/test/route.ts +347 -0
  380. package/.next/types/app/api/mcp/route.ts +347 -0
  381. package/.next/types/app/api/me/route.ts +347 -0
  382. package/.next/types/app/api/me/totp/route.ts +347 -0
  383. package/.next/types/app/layout.ts +84 -0
  384. package/.next/types/app/login/page.ts +84 -0
  385. package/.next/types/cache-life.d.ts +141 -0
  386. package/.next/types/package.json +1 -0
  387. package/.next/types/routes.d.ts +127 -0
  388. package/.next/types/validator.ts +574 -0
  389. package/LICENSE +21 -0
  390. package/NOTICE +17 -0
  391. package/README.md +212 -2
  392. package/bin/mongoadmin.mjs +118 -0
  393. package/next.config.mjs +23 -0
  394. package/package.json +93 -4
@@ -0,0 +1,3 @@
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7555],{5520:(t,e,r)=>{let i,n,s;r.d(e,{On:()=>tN});var o=r(5376).Buffer;let f=(()=>{let t=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Uint8Array.prototype),Symbol.toStringTag).get;return e=>t.call(e)})();function u(t){return"Uint8Array"===f(t)}function a(t){return"object"==typeof t&&null!=t&&Symbol.toStringTag in t&&("ArrayBuffer"===t[Symbol.toStringTag]||"SharedArrayBuffer"===t[Symbol.toStringTag])}function h(t){return t instanceof RegExp||"[object RegExp]"===Object.prototype.toString.call(t)}function l(t){return"object"==typeof t&&null!=t&&Symbol.toStringTag in t&&"Map"===t[Symbol.toStringTag]}function g(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function c(t,e){return JSON.stringify(t,(t,e)=>"bigint"==typeof e?{$numberLong:`${e}`}:l(e)?Object.fromEntries(e):e)}let m=Symbol.for("@@mdb.bson.version"),d=0x8000000000000000-1;Object.freeze({double:1,string:2,object:3,array:4,binData:5,undefined:6,objectId:7,bool:8,date:9,null:10,regex:11,dbPointer:12,javascript:13,symbol:14,javascriptWithScope:15,int:16,timestamp:17,long:18,decimal:19,minKey:-1,maxKey:127});class b extends Error{get bsonError(){return!0}get name(){return"BSONError"}constructor(t,e){super(t,e)}static isBSONError(t){return null!=t&&"object"==typeof t&&"bsonError"in t&&!0===t.bsonError&&"name"in t&&"message"in t&&"stack"in t}}class p extends b{get name(){return"BSONVersionError"}constructor(){super("Unsupported BSON version, bson types must be from bson 7.x.x")}}class y extends b{get name(){return"BSONRuntimeError"}constructor(t){super(t)}}class w extends b{get name(){return"BSONOffsetError"}offset;constructor(t,e,r){super(`${t}. offset: ${e}`,r),this.offset=e}}function S(t,e,r,s){if(s){i??=new TextDecoder("utf8",{fatal:!0});try{return i.decode(t.subarray(e,r))}catch(t){throw new b("Invalid UTF-8 string in BSON document",{cause:t})}}return(n??=new TextDecoder("utf8",{fatal:!1})).decode(t.subarray(e,r))}function x(t,e,r){if(0===t.length)return"";let i=r-e;if(0===i)return"";if(i>20)return null;if(1===i&&t[e]<128)return String.fromCharCode(t[e]);if(2===i&&t[e]<128&&t[e+1]<128)return String.fromCharCode(t[e])+String.fromCharCode(t[e+1]);if(3===i&&t[e]<128&&t[e+1]<128&&t[e+2]<128)return String.fromCharCode(t[e])+String.fromCharCode(t[e+1])+String.fromCharCode(t[e+2]);let n=[];for(let i=e;i<r;i++){let e=t[i];if(e>127)return null;n.push(e)}return String.fromCharCode(...n)}function N(t){return B.fromNumberArray(Array.from({length:t},()=>Math.floor(256*Math.random())))}function E(t){return crypto.getRandomValues(B.allocate(t))}let B={isUint8Array:u,toLocalBufferType(t){if(o.isBuffer(t))return t;if(ArrayBuffer.isView(t))return o.from(t.buffer,t.byteOffset,t.byteLength);let e=t?.[Symbol.toStringTag]??Object.prototype.toString.call(t);if("ArrayBuffer"===e||"SharedArrayBuffer"===e||"[object ArrayBuffer]"===e||"[object SharedArrayBuffer]"===e)return o.from(t);throw new b("Cannot create Buffer from the passed potentialBuffer.")},allocate:t=>o.alloc(t),allocateUnsafe:t=>o.allocUnsafe(t),compare:(t,e)=>B.toLocalBufferType(t).compare(e),concat:t=>o.concat(t),copy:(t,e,r,i,n)=>B.toLocalBufferType(t).copy(e,r??0,i??0,n??t.length),equals:(t,e)=>B.toLocalBufferType(t).equals(e),fromNumberArray:t=>o.from(t),fromBase64:t=>o.from(t,"base64"),fromUTF8:t=>o.from(t,"utf8"),toBase64:t=>B.toLocalBufferType(t).toString("base64"),fromISO88591:t=>o.from(t,"binary"),toISO88591:t=>B.toLocalBufferType(t).toString("binary"),fromHex:t=>o.from(t,"hex"),toHex:t=>B.toLocalBufferType(t).toString("hex"),toUTF8(t,e,r,i){let n=r-e<=20?x(t,e,r):null;if(null!=n)return n;let s=B.toLocalBufferType(t).toString("utf8",e,r);if(i){for(let i=0;i<s.length;i++)if(65533===s.charCodeAt(i)){S(t,e,r,!0);break}}return s},utf8ByteLength:t=>o.byteLength(t,"utf8"),encodeUTF8Into(t,e,r){let i=function(t,e,r){if(0===e.length)return 0;if(e.length>25||t.length-r<e.length)return null;for(let i=0,n=r;i<e.length;i++,n++){let r=e.charCodeAt(i);if(r>127)return null;t[n]=r}return e.length}(t,e,r);return null!=i?i:B.toLocalBufferType(t).write(e,r,void 0,"utf8")},randomBytes:(()=>{let{crypto:t}=globalThis;return null!=t&&"function"==typeof t.getRandomValues?E:N})(),swap32:t=>B.toLocalBufferType(t).swap32()};function O(t){if(t<0)throw RangeError(`The argument 'byteLength' is invalid. Received ${t}`);return U.fromNumberArray(Array.from({length:t},()=>Math.floor(256*Math.random())))}let $=(()=>{let{crypto:t}=globalThis;if(null!=t&&"function"==typeof t.getRandomValues)return e=>t.getRandomValues(U.allocate(e));if(function(){let{navigator:t}=globalThis;return"object"==typeof t&&"ReactNative"===t.product}()){let{console:t}=globalThis;t?.warn?.("BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.")}return O})(),I=/(\d|[a-f])/i,U={isUint8Array:u,toLocalBufferType(t){let e=t?.[Symbol.toStringTag]??Object.prototype.toString.call(t);if("Uint8Array"===e)return t;if(ArrayBuffer.isView(t))return new Uint8Array(t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength));if("ArrayBuffer"===e||"SharedArrayBuffer"===e||"[object ArrayBuffer]"===e||"[object SharedArrayBuffer]"===e)return new Uint8Array(t);throw new b("Cannot make a Uint8Array from passed potentialBuffer.")},allocate(t){if("number"!=typeof t)throw TypeError(`The "size" argument must be of type number. Received ${String(t)}`);return new Uint8Array(t)},allocateUnsafe:t=>U.allocate(t),compare(t,e){if(t===e)return 0;let r=Math.min(t.length,e.length);for(let i=0;i<r;i++){if(t[i]<e[i])return -1;if(t[i]>e[i])return 1}return t.length<e.length?-1:+(t.length>e.length)},concat(t){if(0===t.length)return U.allocate(0);let e=0;for(let r of t)e+=r.length;let r=U.allocate(e),i=0;for(let e of t)r.set(e,i),i+=e.length;return r},copy(t,e,r,i,n){if(void 0!==n&&n<0)throw RangeError(`The value of "sourceEnd" is out of range. It must be >= 0. Received ${n}`);if(n=n??t.length,void 0!==i&&(i<0||i>n))throw RangeError(`The value of "sourceStart" is out of range. It must be >= 0 and <= ${n}. Received ${i}`);if(i=i??0,void 0!==r&&r<0)throw RangeError(`The value of "targetStart" is out of range. It must be >= 0. Received ${r}`);r=r??0;let s=t.subarray(i,n),o=Math.min(s.length,e.length-r);return o<=0?0:(e.set(s.subarray(0,o),r),o)},equals(t,e){if(t.byteLength!==e.byteLength)return!1;for(let r=0;r<t.byteLength;r++)if(t[r]!==e[r])return!1;return!0},fromNumberArray:t=>Uint8Array.from(t),fromBase64:t=>Uint8Array.from(atob(t),t=>t.charCodeAt(0)),fromUTF8:t=>new TextEncoder().encode(t),toBase64:t=>btoa(U.toISO88591(t)),fromISO88591:t=>Uint8Array.from(t,t=>255&t.charCodeAt(0)),toISO88591:t=>Array.from(Uint16Array.from(t),t=>String.fromCharCode(t)).join(""),fromHex(t){let e=t.length%2==0?t:t.slice(0,t.length-1),r=[];for(let t=0;t<e.length;t+=2){let i=e[t],n=e[t+1];if(!I.test(i)||!I.test(n))break;let s=Number.parseInt(`${i}${n}`,16);r.push(s)}return Uint8Array.from(r)},toHex:t=>Array.from(t,t=>t.toString(16).padStart(2,"0")).join(""),toUTF8(t,e,r,i){let n=r-e<=20?x(t,e,r):null;return null!=n?n:S(t,e,r,i)},utf8ByteLength:t=>new TextEncoder().encode(t).byteLength,encodeUTF8Into(t,e,r){let i=new TextEncoder().encode(e);return t.set(i,r),i.byteLength},randomBytes:$,swap32(t){if(t.length%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let e=0;e<t.length;e+=4){let r=t[e],i=t[e+1],n=t[e+2],s=t[e+3];t[e]=s,t[e+1]=n,t[e+2]=i,t[e+3]=r}return t}},_="function"==typeof o&&o.prototype?._isBuffer!==!0?B:U,T=Symbol.for("@@mdb.bson.type");class v{get[T](){return this._bsontype}get[m](){return 7}[Symbol.for("nodejs.util.inspect.custom")](t,e,r){return this.inspect(t,e,r)}}let A=new Float64Array(1),L=new Uint8Array(A.buffer,0,8);A[0]=-1;let R=0===L[7],j={isBigEndian:R,getNonnegativeInt32LE(t,e){if(t[e+3]>127)throw RangeError(`Size cannot be negative at offset: ${e}`);return t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24},getInt32LE:(t,e)=>t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24,getUint32LE:(t,e)=>t[e]+256*t[e+1]+65536*t[e+2]+0x1000000*t[e+3],getUint32BE:(t,e)=>t[e+3]+256*t[e+2]+65536*t[e+1]+0x1000000*t[e],getBigInt64LE:(t,e)=>(BigInt(t[e+4]+256*t[e+5]+65536*t[e+6]+(t[e+7]<<24))<<32n)+BigInt(t[e]+256*t[e+1]+65536*t[e+2]+0x1000000*t[e+3]),getFloat64LE:R?(t,e)=>(L[7]=t[e],L[6]=t[e+1],L[5]=t[e+2],L[4]=t[e+3],L[3]=t[e+4],L[2]=t[e+5],L[1]=t[e+6],L[0]=t[e+7],A[0]):(t,e)=>(L[0]=t[e],L[1]=t[e+1],L[2]=t[e+2],L[3]=t[e+3],L[4]=t[e+4],L[5]=t[e+5],L[6]=t[e+6],L[7]=t[e+7],A[0]),setInt32BE:(t,e,r)=>(t[e+3]=r,r>>>=8,t[e+2]=r,r>>>=8,t[e+1]=r,r>>>=8,t[e]=r,4),setInt32LE:(t,e,r)=>(t[e]=r,r>>>=8,t[e+1]=r,r>>>=8,t[e+2]=r,r>>>=8,t[e+3]=r,4),setBigInt64LE(t,e,r){let i=Number(4294967295n&r);t[e]=i,i>>=8,t[e+1]=i,i>>=8,t[e+2]=i,i>>=8,t[e+3]=i;let n=Number(r>>32n&4294967295n);return t[e+4]=n,n>>=8,t[e+5]=n,n>>=8,t[e+6]=n,n>>=8,t[e+7]=n,8},setFloat64LE:R?(t,e,r)=>(A[0]=r,t[e]=L[7],t[e+1]=L[6],t[e+2]=L[5],t[e+3]=L[4],t[e+4]=L[3],t[e+5]=L[2],t[e+6]=L[1],t[e+7]=L[0],8):(t,e,r)=>(A[0]=r,t[e]=L[0],t[e+1]=L[1],t[e+2]=L[2],t[e+3]=L[3],t[e+4]=L[4],t[e+5]=L[5],t[e+6]=L[6],t[e+7]=L[7],8)};class C extends v{get _bsontype(){return"Binary"}static BSON_BINARY_SUBTYPE_DEFAULT=0;static BUFFER_SIZE=256;static SUBTYPE_DEFAULT=0;static SUBTYPE_FUNCTION=1;static SUBTYPE_BYTE_ARRAY=2;static SUBTYPE_UUID_OLD=3;static SUBTYPE_UUID=4;static SUBTYPE_MD5=5;static SUBTYPE_ENCRYPTED=6;static SUBTYPE_COLUMN=7;static SUBTYPE_SENSITIVE=8;static SUBTYPE_VECTOR=9;static SUBTYPE_USER_DEFINED=128;static VECTOR_TYPE=Object.freeze({Int8:3,Float32:39,PackedBit:16});buffer;sub_type;position;constructor(t,e){if(super(),null!=t&&"string"==typeof t&&!ArrayBuffer.isView(t)&&!a(t)&&!Array.isArray(t))throw new b("Binary can only be constructed from Uint8Array or number[]");this.sub_type=(e??C.BSON_BINARY_SUBTYPE_DEFAULT)&255,null==t?(this.buffer=_.allocate(C.BUFFER_SIZE),this.position=0):(this.buffer=Array.isArray(t)?_.fromNumberArray(t):_.toLocalBufferType(t),this.position=this.buffer.byteLength)}put(t){let e;if("string"==typeof t&&1!==t.length)throw new b("only accepts single character String");if("number"!=typeof t&&1!==t.length)throw new b("only accepts single character Uint8Array or Array");if((e="string"==typeof t?t.charCodeAt(0):"number"==typeof t?t:t[0])<0||e>255)throw new b("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.byteLength>this.position)this.buffer[this.position++]=e;else{let t=_.allocate(C.BUFFER_SIZE+this.buffer.length);t.set(this.buffer,0),this.buffer=t,this.buffer[this.position++]=e}}write(t,e){if(e="number"==typeof e?e:this.position,this.buffer.byteLength<e+t.length){let e=_.allocate(this.buffer.byteLength+t.length);e.set(this.buffer,0),this.buffer=e}if(ArrayBuffer.isView(t))this.buffer.set(_.toLocalBufferType(t),e),this.position=e+t.byteLength>this.position?e+t.length:this.position;else if("string"==typeof t)throw new b("input cannot be string")}read(t,e){let r=t+(e=e&&e>0?e:this.position);return this.buffer.subarray(t,r>this.position?this.position:r)}value(){return this.buffer.length===this.position?this.buffer:this.buffer.subarray(0,this.position)}length(){return this.position}toJSON(){return _.toBase64(this.buffer.subarray(0,this.position))}toString(t){return"hex"===t?_.toHex(this.buffer.subarray(0,this.position)):"base64"===t?_.toBase64(this.buffer.subarray(0,this.position)):_.toUTF8(this.buffer,0,this.position,!1)}toExtendedJSON(t){t=t||{},this.sub_type===C.SUBTYPE_VECTOR&&V(this);let e=_.toBase64(this.buffer),r=Number(this.sub_type).toString(16);return t.legacy?{$binary:e,$type:1===r.length?"0"+r:r}:{$binary:{base64:e,subType:1===r.length?"0"+r:r}}}toUUID(){if(this.sub_type===C.SUBTYPE_UUID)return new F(this.buffer.subarray(0,this.position));throw new b(`Binary sub_type "${this.sub_type}" (${typeof this.sub_type}) is not supported for converting to UUID. Only 0x${C.SUBTYPE_UUID.toString(16).padStart(2,"0")} is currently supported.`)}static createFromHexString(t,e){return new C(_.fromHex(t),e)}static createFromBase64(t,e){return new C(_.fromBase64(t),e)}static fromExtendedJSON(t,e){let r,i;if(e=e||{},"$binary"in t?e.legacy&&"string"==typeof t.$binary&&"$type"in t?(i=t.$type?parseInt(t.$type,16):0,r=_.fromBase64(t.$binary)):"string"!=typeof t.$binary&&(i=t.$binary.subType?parseInt(t.$binary.subType,16):0,r=_.fromBase64(t.$binary.base64)):"$uuid"in t&&(i=4,r=F.bytesFromString(t.$uuid)),!r)throw new b(`Unexpected Binary Extended JSON format ${JSON.stringify(t)}`);return 4===i?new F(r):new C(r,i)}inspect(t,e,r){r??=c;let i=_.toBase64(this.buffer.subarray(0,this.position)),n=r(i,e),s=r(this.sub_type,e);return`Binary.createFromBase64(${n}, ${s})`}toInt8Array(){if(this.sub_type!==C.SUBTYPE_VECTOR)throw new b("Binary sub_type is not Vector");if(this.buffer[0]!==C.VECTOR_TYPE.Int8)throw new b("Binary datatype field is not Int8");return V(this),new Int8Array(this.buffer.buffer.slice(this.buffer.byteOffset+2,this.buffer.byteOffset+this.position))}toFloat32Array(){if(this.sub_type!==C.SUBTYPE_VECTOR)throw new b("Binary sub_type is not Vector");if(this.buffer[0]!==C.VECTOR_TYPE.Float32)throw new b("Binary datatype field is not Float32");V(this);let t=new Uint8Array(this.buffer.buffer.slice(this.buffer.byteOffset+2,this.buffer.byteOffset+this.position));return j.isBigEndian&&_.swap32(t),new Float32Array(t.buffer)}toPackedBits(){if(this.sub_type!==C.SUBTYPE_VECTOR)throw new b("Binary sub_type is not Vector");if(this.buffer[0]!==C.VECTOR_TYPE.PackedBit)throw new b("Binary datatype field is not packed bit");return V(this),new Uint8Array(this.buffer.buffer.slice(this.buffer.byteOffset+2,this.buffer.byteOffset+this.position))}toBits(){if(this.sub_type!==C.SUBTYPE_VECTOR)throw new b("Binary sub_type is not Vector");if(this.buffer[0]!==C.VECTOR_TYPE.PackedBit)throw new b("Binary datatype field is not packed bit");V(this);let t=new Int8Array(8*(this.length()-2)-this.buffer[1]);for(let e=0;e<t.length;e++){let r=e/8|0,i=this.buffer[r+2]>>7-e%8&1;t[e]=i}return t}static fromInt8Array(t){let e=_.allocate(t.byteLength+2);e[0]=C.VECTOR_TYPE.Int8,e[1]=0;let r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);e.set(r,2);let i=new this(e,this.SUBTYPE_VECTOR);return V(i),i}static fromFloat32Array(t){let e=_.allocate(t.byteLength+2);e[0]=C.VECTOR_TYPE.Float32,e[1]=0;let r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength);e.set(r,2),j.isBigEndian&&_.swap32(new Uint8Array(e.buffer,2));let i=new this(e,this.SUBTYPE_VECTOR);return V(i),i}static fromPackedBits(t,e=0){let r=_.allocate(t.byteLength+2);r[0]=C.VECTOR_TYPE.PackedBit,r[1]=e,r.set(t,2);let i=new this(r,this.SUBTYPE_VECTOR);return V(i),i}static fromBits(t){let e=new Uint8Array((t.length+7>>>3)+2);e[0]=C.VECTOR_TYPE.PackedBit;let r=t.length%8;e[1]=0===r?0:8-r;for(let r=0;r<t.length;r++){let i=r>>>3,n=t[r];if(0!==n&&1!==n)throw new b(`Invalid bit value at ${r}: must be 0 or 1, found ${t[r]}`);if(0===n)continue;let s=7-r%8;e[i+2]|=n<<s}return new this(e,C.SUBTYPE_VECTOR)}}function V(t){if(t.sub_type!==C.SUBTYPE_VECTOR)return;let e=t.position,r=t.buffer[0],i=t.buffer[1];if((r===C.VECTOR_TYPE.Float32||r===C.VECTOR_TYPE.Int8)&&0!==i)throw new b("Invalid Vector: padding must be zero for int8 and float32 vectors");if(r===C.VECTOR_TYPE.Float32&&0!==e&&e-2!=0&&(e-2)%4!=0)throw new b("Invalid Vector: Float32 vector must contain a multiple of 4 bytes");if(r===C.VECTOR_TYPE.PackedBit&&0!==i&&2===e)throw new b("Invalid Vector: padding must be zero for packed bit vectors that are empty");if(r===C.VECTOR_TYPE.PackedBit&&i>7)throw new b(`Invalid Vector: padding must be a value between 0 and 7. found: ${i}`)}let D=/^[0-9A-F]{32}$/i,P=/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i;class F extends C{constructor(t){let e;if(null==t)e=F.generate();else if(t instanceof F)e=_.toLocalBufferType(new Uint8Array(t.buffer));else if(ArrayBuffer.isView(t)&&16===t.byteLength)e=_.toLocalBufferType(t);else if("string"==typeof t)e=F.bytesFromString(t);else throw new b("Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).");super(e,4)}get id(){return this.buffer}set id(t){this.buffer=t}toHexString(t=!0){return t?[_.toHex(this.buffer.subarray(0,4)),_.toHex(this.buffer.subarray(4,6)),_.toHex(this.buffer.subarray(6,8)),_.toHex(this.buffer.subarray(8,10)),_.toHex(this.buffer.subarray(10,16))].join("-"):_.toHex(this.buffer)}toString(t){return"hex"===t?_.toHex(this.id):"base64"===t?_.toBase64(this.id):this.toHexString()}toJSON(){return this.toHexString()}equals(t){if(!t)return!1;if(t instanceof F)return _.equals(t.id,this.id);try{return _.equals(new F(t).id,this.id)}catch{return!1}}toBinary(){return new C(this.id,C.SUBTYPE_UUID)}static generate(){let t=_.randomBytes(16);return t[6]=15&t[6]|64,t[8]=63&t[8]|128,t}static isValid(t){return!!t&&("string"==typeof t?F.isValidUUIDString(t):u(t)?16===t.byteLength:"Binary"===t._bsontype&&t.sub_type===this.SUBTYPE_UUID&&16===t.buffer.byteLength)}static createFromHexString(t){let e=F.bytesFromString(t);return new F(e)}static createFromBase64(t){return new F(_.fromBase64(t))}static bytesFromString(t){if(!F.isValidUUIDString(t))throw new b("UUID string representation must be 32 hex digits or canonical hyphenated representation");return _.fromHex(t.replace(/-/g,""))}static isValidUUIDString(t){return D.test(t)||P.test(t)}inspect(t,e,r){return r??=c,`new UUID(${r(this.toHexString(),e)})`}}class J extends v{get _bsontype(){return"Code"}code;scope;constructor(t,e){super(),this.code=t.toString(),this.scope=e??null}toJSON(){return null!=this.scope?{code:this.code,scope:this.scope}:{code:this.code}}toExtendedJSON(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}}static fromExtendedJSON(t){return new J(t.$code,t.$scope)}inspect(t,e,r){let i=(r??=c)(this.code,e),n=i.includes("\n");null!=this.scope&&(i+=`,${n?"\n":" "}${r(this.scope,e)}`);let s=n&&null===this.scope;return`new Code(${n?"\n":""}${i}${s?"\n":""})`}}function M(t){return null!=t&&"object"==typeof t&&"$id"in t&&null!=t.$id&&"$ref"in t&&"string"==typeof t.$ref&&(!("$db"in t)||"$db"in t&&"string"==typeof t.$db)}class H extends v{get _bsontype(){return"DBRef"}collection;oid;db;fields;constructor(t,e,r,i){super();let n=t.split(".");2===n.length&&(r=n.shift(),t=n.shift()),this.collection=t,this.oid=e,this.db=r,this.fields=i||{}}get namespace(){return this.collection}set namespace(t){this.collection=t}toJSON(){let t=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return null!=this.db&&(t.$db=this.db),t}toExtendedJSON(t){t=t||{};let e={$ref:this.collection,$id:this.oid};return t.legacy?e:(this.db&&(e.$db=this.db),e=Object.assign(e,this.fields))}static fromExtendedJSON(t){let e=Object.assign({},t);return delete e.$ref,delete e.$id,delete e.$db,new H(t.$ref,t.$id,t.$db,e)}inspect(t,e,r){let i=[(r??=c)(this.namespace,e),r(this.oid,e),...this.db?[r(this.db,e)]:[],...Object.keys(this.fields).length>0?[r(this.fields,e)]:[]];return i[1]=r===c?`new ObjectId(${i[1]})`:i[1],`new DBRef(${i.join(", ")})`}}function Y(t){if(""===t)return t;let e=0,r="-"===t[0],i="+"===t[e];(i||r)&&(e+=1);let n=!1;for(;e<t.length&&"0"===t[e];++e)n=!0;return n?`${r?"-":""}${t.length===e?"0":t.slice(e)}`:i?t.slice(1):t}try{s=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}let q={},k={},Z=/^(\+?0|(\+|-)?[1-9][0-9]*)$/;class z extends v{get _bsontype(){return"Long"}get __isLong__(){return!0}high;low;unsigned;constructor(t=0,e,r){super();let i="boolean"==typeof e?e:!!r,n="string"==typeof t?z.fromString(t,i):"bigint"==typeof t?z.fromBigInt(t,i):{low:0|t,high:0|("number"==typeof e?e:0),unsigned:i};this.low=n.low,this.high=n.high,this.unsigned=n.unsigned}static TWO_PWR_24=z.fromInt(0x1000000);static MAX_UNSIGNED_VALUE=z.fromBits(-1,-1,!0);static ZERO=z.fromInt(0);static UZERO=z.fromInt(0,!0);static ONE=z.fromInt(1);static UONE=z.fromInt(1,!0);static NEG_ONE=z.fromInt(-1);static MAX_VALUE=z.fromBits(-1,0x7fffffff,!1);static MIN_VALUE=z.fromBits(0,-0x80000000,!1);static fromBits(t,e,r){return new z(t,e,r)}static fromInt(t,e){let r,i,n;if(e)return(t>>>=0,(n=0<=t&&t<256)&&(i=k[t]))?i:(r=z.fromBits(t,(0|t)<0?-1:0,!0),n&&(k[t]=r),r);return(t|=0,(n=-128<=t&&t<128)&&(i=q[t]))?i:(r=z.fromBits(t,t<0?-1:0,!1),n&&(q[t]=r),r)}static fromNumber(t,e){if(isNaN(t))return e?z.UZERO:z.ZERO;if(e){if(t<0)return z.UZERO;if(t>=0xffffffffffffffff)return z.MAX_UNSIGNED_VALUE}else{if(t<=-0x8000000000000000)return z.MIN_VALUE;if(t+1>=0x8000000000000000)return z.MAX_VALUE}return t<0?z.fromNumber(-t,e).neg():z.fromBits(t%0x100000000|0,t/0x100000000|0,e)}static fromBigInt(t,e){return new z(Number(4294967295n&t),Number(t>>32n&4294967295n),e)}static _fromString(t,e,r){let i;if(0===t.length)throw new b("empty string");if(r<2||36<r)throw new b("radix");if((i=t.indexOf("-"))>0)throw new b("interior hyphen");if(0===i)return z._fromString(t.substring(1),e,r).neg();let n=z.fromNumber(Math.pow(r,8)),s=z.ZERO;for(let e=0;e<t.length;e+=8){let i=Math.min(8,t.length-e),o=parseInt(t.substring(e,e+i),r);if(i<8){let t=z.fromNumber(Math.pow(r,i));s=s.mul(t).add(z.fromNumber(o))}else s=(s=s.mul(n)).add(z.fromNumber(o))}return s.unsigned=e,s}static fromStringStrict(t,e,r){let i=!1;if("number"==typeof e?(r=e,e=!1):i=!!e,r??=10,t.trim()!==t)throw new b(`Input: '${t}' contains leading and/or trailing whitespace`);if(!function(t,e){e=e??10;let r="0123456789abcdefghijklmnopqrstuvwxyz".slice(0,e);return!RegExp(`[^-+${r}]`,"i").test(t)&&t}(t,r))throw new b(`Input: '${t}' contains invalid characters for radix: ${r}`);let n=Y(t),s=z._fromString(n,i,r);if(s.toString(r).toLowerCase()!==n.toLowerCase())throw new b(`Input: ${t} is not representable as ${s.unsigned?"an unsigned":"a signed"} 64-bit Long ${null!=r?`with radix: ${r}`:""}`);return s}static fromString(t,e,r){let i=!1;return("number"==typeof e?(r=e,e=!1):i=!!e,r??=10,"NaN"===t&&r<24||("Infinity"===t||"+Infinity"===t||"-Infinity"===t)&&r<35)?z.ZERO:z._fromString(t,i,r)}static fromBytes(t,e,r){return r?z.fromBytesLE(t,e):z.fromBytesBE(t,e)}static fromBytesLE(t,e){return new z(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,e)}static fromBytesBE(t,e){return new z(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],e)}static isLong(t){return null!=t&&"object"==typeof t&&"__isLong__"in t&&!0===t.__isLong__}static fromValue(t,e){return"number"==typeof t?z.fromNumber(t,e):"string"==typeof t?z.fromString(t,e):z.fromBits(t.low,t.high,"boolean"==typeof e?e:t.unsigned)}add(t){z.isLong(t)||(t=z.fromValue(t));let e=this.high>>>16,r=65535&this.high,i=this.low>>>16,n=65535&this.low,s=t.high>>>16,o=65535&t.high,f=t.low>>>16,u=65535&t.low,a=0,h=0,l,g;return l=0+((g=0+(n+u))>>>16),g&=65535,l+=i+f,h+=l>>>16,l&=65535,h+=r+o,a+=h>>>16,h&=65535,a+=e+s,a&=65535,z.fromBits(l<<16|g,a<<16|h,this.unsigned)}and(t){return z.isLong(t)||(t=z.fromValue(t)),z.fromBits(this.low&t.low,this.high&t.high,this.unsigned)}compare(t){if(z.isLong(t)||(t=z.fromValue(t)),this.eq(t))return 0;let e=this.isNegative(),r=t.isNegative();return e&&!r?-1:!e&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1}comp(t){return this.compare(t)}divide(t){let e,r,i;if(z.isLong(t)||(t=z.fromValue(t)),t.isZero())throw new b("division by zero");if(s){if(!this.unsigned&&-0x80000000===this.high&&-1===t.low&&-1===t.high)return this;let e=(this.unsigned?s.div_u:s.div_s)(this.low,this.high,t.low,t.high);return z.fromBits(e,s.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?z.UZERO:z.ZERO;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return z.UZERO;if(t.gt(this.shru(1)))return z.UONE;i=z.UZERO}else{if(this.eq(z.MIN_VALUE))if(t.eq(z.ONE)||t.eq(z.NEG_ONE))return z.MIN_VALUE;else return t.eq(z.MIN_VALUE)?z.ONE:(e=this.shr(1).div(t).shl(1)).eq(z.ZERO)?t.isNegative()?z.ONE:z.NEG_ONE:(r=this.sub(t.mul(e)),i=e.add(r.div(t)));if(t.eq(z.MIN_VALUE))return this.unsigned?z.UZERO:z.ZERO;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();i=z.ZERO}for(r=this;r.gte(t);){let n=Math.ceil(Math.log(e=Math.max(1,Math.floor(r.toNumber()/t.toNumber())))/Math.LN2),s=n<=48?1:Math.pow(2,n-48),o=z.fromNumber(e),f=o.mul(t);for(;f.isNegative()||f.gt(r);)e-=s,f=(o=z.fromNumber(e,this.unsigned)).mul(t);o.isZero()&&(o=z.ONE),i=i.add(o),r=r.sub(f)}return i}div(t){return this.divide(t)}equals(t){return z.isLong(t)||(t=z.fromValue(t)),(this.unsigned===t.unsigned||this.high>>>31!=1||t.high>>>31!=1)&&this.high===t.high&&this.low===t.low}eq(t){return this.equals(t)}getHighBits(){return this.high}getHighBitsUnsigned(){return this.high>>>0}getLowBits(){return this.low}getLowBitsUnsigned(){return this.low>>>0}getNumBitsAbs(){let t;if(this.isNegative())return this.eq(z.MIN_VALUE)?64:this.neg().getNumBitsAbs();let e=0!==this.high?this.high:this.low;for(t=31;t>0&&(e&1<<t)==0;t--);return 0!==this.high?t+33:t+1}greaterThan(t){return this.comp(t)>0}gt(t){return this.greaterThan(t)}greaterThanOrEqual(t){return this.comp(t)>=0}gte(t){return this.greaterThanOrEqual(t)}ge(t){return this.greaterThanOrEqual(t)}isEven(){return(1&this.low)==0}isNegative(){return!this.unsigned&&this.high<0}isOdd(){return(1&this.low)==1}isPositive(){return this.unsigned||this.high>=0}isZero(){return 0===this.high&&0===this.low}lessThan(t){return 0>this.comp(t)}lt(t){return this.lessThan(t)}lessThanOrEqual(t){return 0>=this.comp(t)}lte(t){return this.lessThanOrEqual(t)}modulo(t){if(z.isLong(t)||(t=z.fromValue(t)),s){let e=(this.unsigned?s.rem_u:s.rem_s)(this.low,this.high,t.low,t.high);return z.fromBits(e,s.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))}mod(t){return this.modulo(t)}rem(t){return this.modulo(t)}multiply(t){if(this.isZero())return z.ZERO;if(z.isLong(t)||(t=z.fromValue(t)),s){let e=s.mul(this.low,this.high,t.low,t.high);return z.fromBits(e,s.get_high(),this.unsigned)}if(t.isZero())return z.ZERO;if(this.eq(z.MIN_VALUE))return t.isOdd()?z.MIN_VALUE:z.ZERO;if(t.eq(z.MIN_VALUE))return this.isOdd()?z.MIN_VALUE:z.ZERO;if(this.isNegative())if(t.isNegative())return this.neg().mul(t.neg());else return this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(z.TWO_PWR_24)&&t.lt(z.TWO_PWR_24))return z.fromNumber(this.toNumber()*t.toNumber(),this.unsigned);let e=this.high>>>16,r=65535&this.high,i=this.low>>>16,n=65535&this.low,o=t.high>>>16,f=65535&t.high,u=t.low>>>16,a=65535&t.low,h=0,l=0,g,c;return g=0+((c=0+n*a)>>>16),c&=65535,g+=i*a,l+=g>>>16,g&=65535,g+=n*u,l+=g>>>16,g&=65535,l+=r*a,h+=l>>>16,l&=65535,l+=i*u,h+=l>>>16,l&=65535,l+=n*f,h+=l>>>16,l&=65535,h+=e*a+r*u+i*f+n*o,h&=65535,z.fromBits(g<<16|c,h<<16|l,this.unsigned)}mul(t){return this.multiply(t)}negate(){return!this.unsigned&&this.eq(z.MIN_VALUE)?z.MIN_VALUE:this.not().add(z.ONE)}neg(){return this.negate()}not(){return z.fromBits(~this.low,~this.high,this.unsigned)}notEquals(t){return!this.equals(t)}neq(t){return this.notEquals(t)}ne(t){return this.notEquals(t)}or(t){return z.isLong(t)||(t=z.fromValue(t)),z.fromBits(this.low|t.low,this.high|t.high,this.unsigned)}shiftLeft(t){return(z.isLong(t)&&(t=t.toInt()),0==(t&=63))?this:t<32?z.fromBits(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):z.fromBits(0,this.low<<t-32,this.unsigned)}shl(t){return this.shiftLeft(t)}shiftRight(t){return(z.isLong(t)&&(t=t.toInt()),0==(t&=63))?this:t<32?z.fromBits(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):z.fromBits(this.high>>t-32,this.high>=0?0:-1,this.unsigned)}shr(t){return this.shiftRight(t)}shiftRightUnsigned(t){if(z.isLong(t)&&(t=t.toInt()),0==(t&=63))return this;{let e=this.high;if(t<32){let r=this.low;return z.fromBits(r>>>t|e<<32-t,e>>>t,this.unsigned)}return 32===t?z.fromBits(e,0,this.unsigned):z.fromBits(e>>>t-32,0,this.unsigned)}}shr_u(t){return this.shiftRightUnsigned(t)}shru(t){return this.shiftRightUnsigned(t)}subtract(t){return z.isLong(t)||(t=z.fromValue(t)),this.add(t.neg())}sub(t){return this.subtract(t)}toInt(){return this.unsigned?this.low>>>0:this.low}toNumber(){return this.unsigned?(this.high>>>0)*0x100000000+(this.low>>>0):0x100000000*this.high+(this.low>>>0)}toBigInt(){return BigInt(this.toString())}toBytes(t){return t?this.toBytesLE():this.toBytesBE()}toBytesLE(){let t=this.high,e=this.low;return[255&e,e>>>8&255,e>>>16&255,e>>>24,255&t,t>>>8&255,t>>>16&255,t>>>24]}toBytesBE(){let t=this.high,e=this.low;return[t>>>24,t>>>16&255,t>>>8&255,255&t,e>>>24,e>>>16&255,e>>>8&255,255&e]}toSigned(){return this.unsigned?z.fromBits(this.low,this.high,!1):this}toString(t){if((t=t||10)<2||36<t)throw new b("radix");if(this.isZero())return"0";if(this.isNegative())if(!this.eq(z.MIN_VALUE))return"-"+this.neg().toString(t);else{let e=z.fromNumber(t),r=this.div(e),i=r.mul(e).sub(this);return r.toString(t)+i.toInt().toString(t)}let e=z.fromNumber(Math.pow(t,6),this.unsigned),r=this,i="";for(;;){let n=r.div(e),s=(r.sub(n.mul(e)).toInt()>>>0).toString(t);if((r=n).isZero())return s+i;for(;s.length<6;)s="0"+s;i=""+s+i}}toUnsigned(){return this.unsigned?this:z.fromBits(this.low,this.high,!0)}xor(t){return z.isLong(t)||(t=z.fromValue(t)),z.fromBits(this.low^t.low,this.high^t.high,this.unsigned)}eqz(){return this.isZero()}le(t){return this.lessThanOrEqual(t)}toExtendedJSON(t){return t&&t.relaxed?this.toNumber():{$numberLong:this.toString()}}static fromExtendedJSON(t,e){let{useBigInt64:r=!1,relaxed:i=!0}={...e};if(t.$numberLong.length>20)throw new b("$numberLong string is too long");if(!Z.test(t.$numberLong))throw new b(`$numberLong string "${t.$numberLong}" is in an invalid format`);if(r)return BigInt.asIntN(64,BigInt(t.$numberLong));let n=z.fromString(t.$numberLong);return i?n.toNumber():n}inspect(t,e,r){let i=(r??=c)(this.toString(),e),n=this.unsigned?`, ${r(this.unsigned,e)}`:"";return`new Long(${i}${n})`}}let K=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,W=/^(\+|-)?(Infinity|inf)$/i,G=/^(\+|-)?NaN$/i,X=_.fromNumberArray([124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse()),Q=_.fromNumberArray([248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse()),tt=_.fromNumberArray([120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse()),te=/^([-+])?(\d+)?$/;function tr(t){return!isNaN(parseInt(t,10))}function ti(t,e){throw new b(`"${t}" is not a valid Decimal128 string - ${e}`)}class tn extends v{get _bsontype(){return"Decimal128"}bytes;constructor(t){if(super(),"string"==typeof t)this.bytes=tn.fromString(t).bytes;else if(t instanceof Uint8Array||u(t)){if(16!==t.byteLength)throw new b("Decimal128 must take a Buffer of 16 bytes");this.bytes=t}else throw new b("Decimal128 must take a Buffer or string")}static fromString(t){return tn._fromString(t,{allowRounding:!1})}static fromStringWithRounding(t){return tn._fromString(t,{allowRounding:!0})}static _fromString(t,e){let r=!1,i=!1,n=!1,s=!1,o=0,f=0,u=0,a=0,h=0,l=[0],g=0,c=0,m=0,d=0,p=new z(0,0),y=new z(0,0),w=0,S=0;if(t.length>=7e3)throw new b(""+t+" not a valid Decimal128 string");let x=t.match(K),N=t.match(W),E=t.match(G);if(!x&&!N&&!E||0===t.length)throw new b(""+t+" not a valid Decimal128 string");if(x){let e=x[2],r=x[4],i=x[5],n=x[6];r&&void 0===n&&ti(t,"missing exponent power"),r&&void 0===e&&ti(t,"missing exponent base"),void 0===r&&(i||n)&&ti(t,"missing e before exponent")}if(("+"===t[S]||"-"===t[S])&&(i=!0,r="-"===t[S++]),!tr(t[S])&&"."!==t[S]){if("i"===t[S]||"I"===t[S])return new tn(r?Q:tt);else if("N"===t[S])return new tn(X)}for(;tr(t[S])||"."===t[S];){if("."===t[S]){n&&ti(t,"contains multiple periods"),n=!0,S+=1;continue}g<34&&("0"!==t[S]||s)&&(s||(h=f),s=!0,l[c++]=parseInt(t[S],10),g+=1),s&&(u+=1),n&&(a+=1),f+=1,S+=1}if(n&&!f)throw new b(""+t+" not a valid Decimal128 string");if("e"===t[S]||"E"===t[S]){let e=t.substr(++S).match(te);if(!e||!e[2])return new tn(X);d=parseInt(e[0],10),S+=e[0].length}if(t[S])return new tn(X);if(g){if(m=g-1,1!==(o=u))for(;"0"===t[h+o-1+Number(i)+Number(n)];)o-=1}else l[0]=0,u=1,g=1,o=0;for(d<=a&&a>d+16384?d=-6176:d-=a;d>6111;){if((m+=1)>=34){if(0===o){d=6111;break}ti(t,"overflow")}d-=1}if(e.allowRounding){for(;d<-6176||g<u;){if(0===m&&o<g){d=-6176,o=0;break}if(g<u?u-=1:m-=1,d<6111)d+=1;else{if(l.join("").match(/^0+$/)){d=6111;break}ti(t,"overflow")}}if(m+1<o){let e=f;n&&(h+=1,e+=1),i&&(h+=1,e+=1);let s=parseInt(t[h+m+1],10),o=0;if(s>=5&&(o=1,5===s)){o=+(l[m]%2==1);for(let r=h+m+2;r<e;r++)if(parseInt(t[r],10)){o=1;break}}if(o){let t=m;for(;t>=0;t--)if(++l[t]>9){if(l[t]=0,0===t)if(!(d<6111))return new tn(r?Q:tt);else d+=1,l[t]=1}else break}}}else{for(;d<-6176||g<u;){if(0===m){if(0===o){d=-6176;break}ti(t,"exponent underflow")}g<u?("0"!==t[u-1+Number(i)+Number(n)]&&0!==o&&ti(t,"inexact rounding"),u-=1):(0!==l[m]&&ti(t,"inexact rounding"),m-=1),d<6111?d+=1:ti(t,"overflow")}m+1<o&&(n&&(h+=1),i&&(h+=1),0!==parseInt(t[h+m+1],10)&&ti(t,"inexact rounding"))}if(p=z.fromNumber(0),y=z.fromNumber(0),0===o)p=z.fromNumber(0),y=z.fromNumber(0);else if(m<17){let t=0;for(y=z.fromNumber(l[t++]),p=new z(0,0);t<=m;t++)y=(y=y.multiply(z.fromNumber(10))).add(z.fromNumber(l[t]))}else{let t=0;for(p=z.fromNumber(l[t++]);t<=m-17;t++)p=(p=p.multiply(z.fromNumber(10))).add(z.fromNumber(l[t]));for(y=z.fromNumber(l[t++]);t<=m;t++)y=(y=y.multiply(z.fromNumber(10))).add(z.fromNumber(l[t]))}let B=function(t,e){if(!t&&!e)return{high:z.fromNumber(0),low:z.fromNumber(0)};let r=t.shiftRightUnsigned(32),i=new z(t.getLowBits(),0),n=e.shiftRightUnsigned(32),s=new z(e.getLowBits(),0),o=r.multiply(n),f=r.multiply(s),u=i.multiply(n),a=i.multiply(s);return o=o.add(f.shiftRightUnsigned(32)),f=new z(f.getLowBits(),0).add(u).add(a.shiftRightUnsigned(32)),{high:o=o.add(f.shiftRightUnsigned(32)),low:a=f.shiftLeft(32).add(new z(a.getLowBits(),0))}}(p,z.fromString("100000000000000000"));B.low=B.low.add(y),function(t,e){let r=t.high>>>0,i=e.high>>>0;if(r<i)return!0;if(r===i&&t.low>>>0<e.low>>>0)return!0;return!1}(B.low,y)&&(B.high=B.high.add(z.fromNumber(1))),w=d+6176;let O={low:z.fromNumber(0),high:z.fromNumber(0)};B.high.shiftRightUnsigned(49).and(z.fromNumber(1)).equals(z.fromNumber(1))?(O.high=O.high.or(z.fromNumber(3).shiftLeft(61)),O.high=O.high.or(z.fromNumber(w).and(z.fromNumber(16383).shiftLeft(47))),O.high=O.high.or(B.high.and(z.fromNumber(0x7fffffffffff)))):(O.high=O.high.or(z.fromNumber(16383&w).shiftLeft(49)),O.high=O.high.or(B.high.and(z.fromNumber(0x1ffffffffffff)))),O.low=B.low,r&&(O.high=O.high.or(z.fromString("9223372036854775808")));let $=_.allocateUnsafe(16);return S=0,$[S++]=255&O.low.low,$[S++]=O.low.low>>8&255,$[S++]=O.low.low>>16&255,$[S++]=O.low.low>>24&255,$[S++]=255&O.low.high,$[S++]=O.low.high>>8&255,$[S++]=O.low.high>>16&255,$[S++]=O.low.high>>24&255,$[S++]=255&O.high.low,$[S++]=O.high.low>>8&255,$[S++]=O.high.low>>16&255,$[S++]=O.high.low>>24&255,$[S++]=255&O.high.high,$[S++]=O.high.high>>8&255,$[S++]=O.high.high>>16&255,$[S++]=O.high.high>>24&255,new tn($)}toString(){let t,e,r,i,n=0,s=Array(36);for(let t=0;t<s.length;t++)s[t]=0;let o=0,f=!1,u={parts:[0,0,0,0]},a=[];o=0;let h=this.bytes,l=h[o++]|h[o++]<<8|h[o++]<<16|h[o++]<<24,g=h[o++]|h[o++]<<8|h[o++]<<16|h[o++]<<24,c=h[o++]|h[o++]<<8|h[o++]<<16|h[o++]<<24,m=h[o++]|h[o++]<<8|h[o++]<<16|h[o++]<<24;o=0,({low:new z(l,g),high:new z(c,m)}).high.lessThan(z.ZERO)&&a.push("-");let d=m>>26&31;if(d>>3==3)if(30===d)return a.join("")+"Infinity";else{if(31===d)return"NaN";t=m>>15&16383,e=8+(m>>14&1)}else e=m>>14&7,t=m>>17&16383;let b=t-6176;if(u.parts[0]=(16383&m)+((15&e)<<14),u.parts[1]=c,u.parts[2]=g,u.parts[3]=l,0===u.parts[0]&&0===u.parts[1]&&0===u.parts[2]&&0===u.parts[3])f=!0;else for(i=3;i>=0;i--){let t=0,e=function(t){let e=z.fromNumber(1e9),r=z.fromNumber(0);if(!t.parts[0]&&!t.parts[1]&&!t.parts[2]&&!t.parts[3])return{quotient:t,rem:r};for(let i=0;i<=3;i++)r=(r=r.shiftLeft(32)).add(new z(t.parts[i],0)),t.parts[i]=r.div(e).low,r=r.modulo(e);return{quotient:t,rem:r}}(u);if(u=e.quotient,t=e.rem.low)for(r=8;r>=0;r--)s[9*i+r]=t%10,t=Math.floor(t/10)}if(f)n=1,s[o]=0;else for(n=36;!s[o];)n-=1,o+=1;let p=n-1+b;if(p>=34||p<=-7||b>0){if(n>34)return a.push("0"),b>0?a.push(`E+${b}`):b<0&&a.push(`E${b}`),a.join("");a.push(`${s[o++]}`),(n-=1)&&a.push(".");for(let t=0;t<n;t++)a.push(`${s[o++]}`);a.push("E"),p>0?a.push(`+${p}`):a.push(`${p}`)}else if(b>=0)for(let t=0;t<n;t++)a.push(`${s[o++]}`);else{let t=n+b;if(t>0)for(let e=0;e<t;e++)a.push(`${s[o++]}`);else a.push("0");for(a.push(".");t++<0;)a.push("0");for(let e=0;e<n-Math.max(t-1,0);e++)a.push(`${s[o++]}`)}return a.join("")}toJSON(){return{$numberDecimal:this.toString()}}toExtendedJSON(){return{$numberDecimal:this.toString()}}static fromExtendedJSON(t){return tn.fromString(t.$numberDecimal)}inspect(t,e,r){let i=(r??=c)(this.toString(),e);return`new Decimal128(${i})`}}class ts extends v{get _bsontype(){return"Double"}value;constructor(t){super(),t instanceof Number&&(t=t.valueOf()),this.value=+t}static fromString(t){let e=Number(t);if("NaN"===t)return new ts(NaN);if("Infinity"===t)return new ts(1/0);if("-Infinity"===t)return new ts(-1/0);if(!Number.isFinite(e))throw new b(`Input: ${t} is not representable as a Double`);if(t.trim()!==t)throw new b(`Input: '${t}' contains whitespace`);if(""===t)throw new b("Input is an empty string");if(/[^-0-9.+eE]/.test(t))throw new b(`Input: '${t}' is not in decimal or exponential notation`);return new ts(e)}valueOf(){return this.value}toJSON(){return this.value}toString(t){return this.value.toString(t)}toExtendedJSON(t){return t&&(t.legacy||t.relaxed&&isFinite(this.value))?this.value:Object.is(Math.sign(this.value),-0)?{$numberDouble:"-0.0"}:{$numberDouble:Number.isInteger(this.value)?this.value.toFixed(1):this.value.toString()}}static fromExtendedJSON(t,e){let r=parseFloat(t.$numberDouble);return e&&e.relaxed?r:new ts(r)}inspect(t,e,r){return r??=c,`new Double(${r(this.value,e)})`}}class to extends v{get _bsontype(){return"Int32"}value;constructor(t){super(),t instanceof Number&&(t=t.valueOf()),this.value=0|t}static fromString(t){let e=Y(t),r=Number(t);if(0x7fffffff<r)throw new b(`Input: '${t}' is larger than the maximum value for Int32`);if(-0x80000000>r)throw new b(`Input: '${t}' is smaller than the minimum value for Int32`);if(Number.isSafeInteger(r)){if(r.toString()!==e)throw new b(`Input: '${t}' is not a valid Int32 string`)}else throw new b(`Input: '${t}' is not a safe integer`);return new to(r)}valueOf(){return this.value}toString(t){return this.value.toString(t)}toJSON(){return this.value}toExtendedJSON(t){return t&&(t.relaxed||t.legacy)?this.value:{$numberInt:this.value.toString()}}static fromExtendedJSON(t,e){return e&&e.relaxed?parseInt(t.$numberInt,10):new to(t.$numberInt)}inspect(t,e,r){return r??=c,`new Int32(${r(this.value,e)})`}}class tf extends v{get _bsontype(){return"MaxKey"}toExtendedJSON(){return{$maxKey:1}}static fromExtendedJSON(){return new tf}inspect(){return"new MaxKey()"}}class tu extends v{get _bsontype(){return"MinKey"}toExtendedJSON(){return{$minKey:1}}static fromExtendedJSON(){return new tu}inspect(){return"new MinKey()"}}let ta=new WeakMap,th=[];for(let t=0;t<256;t++)th.push(t.toString(16).padStart(2,"0"));let tl=new Int8Array(103);for(let t=48;t<=57;t++)tl[t]=t-48;for(let t=65;t<=70;t++)tl[t]=t-55;for(let t=97;t<=102;t++)tl[t]=t-87;class tg extends v{get _bsontype(){return"ObjectId"}static index=0;static PROCESS_UNIQUE=null;static resetState=()=>{this.index=Math.floor(0x1000000*Math.random()),this.PROCESS_UNIQUE=null};static{let t;this.resetState();let e=!1;try{t=globalThis?.process?.getBuiltinModule?.("v8")??{}}catch{}let r=t?.startupSnapshot;try{e=r?.isBuildingSnapshot?.()}catch{}e&&r?.addDeserializeCallback?.(this.resetState)}static cacheHexString;i0;i1;i2;i3;setFromBytes(t,e=0){this.i0=t[e]<<16|t[e+1]<<8|t[e+2],this.i1=t[e+3]<<16|t[e+4]<<8|t[e+5],this.i2=t[e+6]<<16|t[e+7]<<8|t[e+8],this.i3=t[e+9]<<16|t[e+10]<<8|t[e+11]}setFromHex(t){this.i0=tl[t.charCodeAt(0)]<<20|tl[t.charCodeAt(1)]<<16|tl[t.charCodeAt(2)]<<12|tl[t.charCodeAt(3)]<<8|tl[t.charCodeAt(4)]<<4|tl[t.charCodeAt(5)],this.i1=tl[t.charCodeAt(6)]<<20|tl[t.charCodeAt(7)]<<16|tl[t.charCodeAt(8)]<<12|tl[t.charCodeAt(9)]<<8|tl[t.charCodeAt(10)]<<4|tl[t.charCodeAt(11)],this.i2=tl[t.charCodeAt(12)]<<20|tl[t.charCodeAt(13)]<<16|tl[t.charCodeAt(14)]<<12|tl[t.charCodeAt(15)]<<8|tl[t.charCodeAt(16)]<<4|tl[t.charCodeAt(17)],this.i3=tl[t.charCodeAt(18)]<<20|tl[t.charCodeAt(19)]<<16|tl[t.charCodeAt(20)]<<12|tl[t.charCodeAt(21)]<<8|tl[t.charCodeAt(22)]<<4|tl[t.charCodeAt(23)]}constructor(t,e){let r;if(super(),"number"==typeof e)return void this.setFromBytes(t,e);if("object"==typeof t&&t&&"id"in t){if(tg.is(t)&&"number"==typeof t.i0&&"number"==typeof t.i1&&"number"==typeof t.i2&&"number"==typeof t.i3){this.i0=t.i0,this.i1=t.i1,this.i2=t.i2,this.i3=t.i3;return}if("string"!=typeof t.id&&!ArrayBuffer.isView(t.id))throw new b("Argument passed in must have an id that is of type string or Buffer");r="toHexString"in t&&"function"==typeof t.toHexString?_.fromHex(t.toHexString()):t.id}else r=t;if(null==r){let t=Math.floor(Date.now()/1e3),e=tg.getInc(),r=tg.PROCESS_UNIQUE??=_.randomBytes(5);this.i0=t>>>8&0xffffff,this.i1=(255&t)<<16|r[0]<<8|r[1],this.i2=r[2]<<16|r[3]<<8|r[4],this.i3=0xffffff&e}else if(ArrayBuffer.isView(r)&&12===r.byteLength)this.setFromBytes(r instanceof Uint8Array?r:_.toLocalBufferType(r));else if("string"==typeof r)if(tg.validateHexString(r))this.setFromHex(r),tg.cacheHexString&&ta.set(this,r);else throw new b("input must be a 24 character hex string, 12 byte Uint8Array, or an integer");else throw new b("Argument passed in does not match the accepted types")}get id(){let t=_.allocateUnsafe(12);return t[0]=this.i0>>>16&255,t[1]=this.i0>>>8&255,t[2]=255&this.i0,t[3]=this.i1>>>16&255,t[4]=this.i1>>>8&255,t[5]=255&this.i1,t[6]=this.i2>>>16&255,t[7]=this.i2>>>8&255,t[8]=255&this.i2,t[9]=this.i3>>>16&255,t[10]=this.i3>>>8&255,t[11]=255&this.i3,t}set id(t){let e=t instanceof Uint8Array?t:_.toLocalBufferType(t);this.setFromBytes(e),tg.cacheHexString&&ta.set(this,_.toHex(e))}static validateHexString(t){if(t?.length!==24)return!1;for(let e=0;e<24;e++){let r=t.charCodeAt(e);if((!(r>=48)||!(r<=57))&&(!(r>=97)||!(r<=102))&&(!(r>=65)||!(r<=70)))return!1}return!0}toHexString(){if(tg.cacheHexString){let t=ta.get(this);if(t)return t}let t=this.i0,e=this.i1,r=this.i2,i=this.i3,n=th[t>>>16&255]+th[t>>>8&255]+th[255&t]+th[e>>>16&255]+th[e>>>8&255]+th[255&e]+th[r>>>16&255]+th[r>>>8&255]+th[255&r]+th[i>>>16&255]+th[i>>>8&255]+th[255&i];return tg.cacheHexString&&ta.set(this,n),n}static getInc(){return tg.index=(tg.index+1)%0x1000000}static generate(t){"number"!=typeof t&&(t=Math.floor(Date.now()/1e3));let e=tg.getInc(),r=_.allocateUnsafe(12);j.setInt32BE(r,0,t);let i=this.PROCESS_UNIQUE??=_.randomBytes(5);return r[4]=i[0],r[5]=i[1],r[6]=i[2],r[7]=i[3],r[8]=i[4],r[11]=255&e,r[10]=e>>>8&255,r[9]=e>>>16&255,r}toString(t){return"base64"===t?_.toBase64(this.id):this.toHexString()}toJSON(){return this.toHexString()}static is(t){return null!=t&&"object"==typeof t&&"_bsontype"in t&&"ObjectId"===t._bsontype}equals(t){if(null==t)return!1;if(tg.is(t)&&"number"==typeof t.i0&&"number"==typeof t.i1&&"number"==typeof t.i2&&"number"==typeof t.i3)return this.i3===t.i3&&this.i0===t.i0&&this.i1===t.i1&&this.i2===t.i2;if("string"==typeof t)return t.toLowerCase()===this.toHexString();if("object"==typeof t&&"function"==typeof t.toHexString){let e=t.toHexString(),r=this.toHexString();return"string"==typeof e&&e.toLowerCase()===r}return!1}getTimestamp(){let t=new Date,e=256*this.i0+(this.i1>>>16);return t.setTime(1e3*e),t}static createPk(){return new tg}serializeInto(t,e){return t[e]=this.i0>>>16&255,t[e+1]=this.i0>>>8&255,t[e+2]=255&this.i0,t[e+3]=this.i1>>>16&255,t[e+4]=this.i1>>>8&255,t[e+5]=255&this.i1,t[e+6]=this.i2>>>16&255,t[e+7]=this.i2>>>8&255,t[e+8]=255&this.i2,t[e+9]=this.i3>>>16&255,t[e+10]=this.i3>>>8&255,t[e+11]=255&this.i3,12}static createFromTime(t){let e=_.allocate(12);for(let t=11;t>=4;t--)e[t]=0;return j.setInt32BE(e,0,t),new tg(e)}static createFromHexString(t){if(t?.length!==24)throw new b("hex string must be 24 characters");return new tg(_.fromHex(t))}static createFromBase64(t){if(t?.length!==16)throw new b("base64 string must be 16 characters");return new tg(_.fromBase64(t))}static isValid(t){if(null==t)return!1;if("string"==typeof t)return tg.validateHexString(t);try{return new tg(t),!0}catch{return!1}}toExtendedJSON(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}}static fromExtendedJSON(t){return new tg(t.$oid)}isCached(){return tg.cacheHexString&&ta.has(this)}inspect(t,e,r){return r??=c,`new ObjectId(${r(this.toHexString(),e)})`}}class tc extends v{get _bsontype(){return"BSONRegExp"}pattern;options;constructor(t,e){if(super(),this.pattern=t,this.options=(e??"").split("").sort().join(""),-1!==this.pattern.indexOf("\0"))throw new b(`BSON Regex patterns cannot contain null bytes, found: ${JSON.stringify(this.pattern)}`);if(-1!==this.options.indexOf("\0"))throw new b(`BSON Regex options cannot contain null bytes, found: ${JSON.stringify(this.options)}`);for(let t=0;t<this.options.length;t++)if("i"!==this.options[t]&&"m"!==this.options[t]&&"x"!==this.options[t]&&"l"!==this.options[t]&&"s"!==this.options[t]&&"u"!==this.options[t])throw new b(`The regular expression option [${this.options[t]}] is not supported`)}static parseOptions(t){return t?t.split("").sort().join(""):""}toExtendedJSON(t){return(t=t||{}).legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}}static fromExtendedJSON(t){if("$regex"in t){if("string"==typeof t.$regex)return new tc(t.$regex,tc.parseOptions(t.$options));else if("BSONRegExp"===t.$regex._bsontype)return t}if("$regularExpression"in t)return new tc(t.$regularExpression.pattern,tc.parseOptions(t.$regularExpression.options));throw new b(`Unexpected BSONRegExp EJSON object form: ${JSON.stringify(t)}`)}inspect(t,e,r){let i=function(t){if(null!=t&&"object"==typeof t&&"stylize"in t&&"function"==typeof t.stylize)return t.stylize}(e)??(t=>t),n=i((r??=c)(this.pattern),"regexp"),s=i(r(this.options),"regexp");return`new BSONRegExp(${n}, ${s})`}}class tm extends v{get _bsontype(){return"BSONSymbol"}value;constructor(t){super(),this.value=t}valueOf(){return this.value}toString(){return this.value}toJSON(){return this.value}toExtendedJSON(){return{$symbol:this.value}}static fromExtendedJSON(t){return new tm(t.$symbol)}inspect(t,e,r){return r??=c,`new BSONSymbol(${r(this.value,e)})`}}let td=z;class tb extends td{get _bsontype(){return"Timestamp"}get[T](){return"Timestamp"}static MAX_VALUE=z.MAX_UNSIGNED_VALUE;get i(){return this.low>>>0}get t(){return this.high>>>0}constructor(t){if(null==t)super(0,0,!0);else if("bigint"==typeof t)super(t,!0);else if(z.isLong(t))super(t.low,t.high,!0);else if("object"==typeof t&&"t"in t&&"i"in t){if("number"!=typeof t.t&&("object"!=typeof t.t||"Int32"!==t.t._bsontype))throw new b("Timestamp constructed from { t, i } must provide t as a number");if("number"!=typeof t.i&&("object"!=typeof t.i||"Int32"!==t.i._bsontype))throw new b("Timestamp constructed from { t, i } must provide i as a number");let e=Number(t.t),r=Number(t.i);if(e<0||Number.isNaN(e))throw new b("Timestamp constructed from { t, i } must provide a positive t");if(r<0||Number.isNaN(r))throw new b("Timestamp constructed from { t, i } must provide a positive i");if(e>0xffffffff)throw new b("Timestamp constructed from { t, i } must provide t equal or less than uint32 max");if(r>0xffffffff)throw new b("Timestamp constructed from { t, i } must provide i equal or less than uint32 max");super(r,e,!0)}else throw new b("A Timestamp can only be constructed with: bigint, Long, or { t: number; i: number }")}toJSON(){return{$timestamp:this.toString()}}static fromInt(t){return new tb(z.fromInt(t,!0))}static fromNumber(t){return new tb(z.fromNumber(t,!0))}static fromBits(t,e){return new tb({i:t,t:e})}static fromString(t,e){return new tb(z.fromString(t,!0,e))}toExtendedJSON(){return{$timestamp:{t:this.t,i:this.i}}}static fromExtendedJSON(t){let e=z.isLong(t.$timestamp.i)?t.$timestamp.i.getLowBitsUnsigned():t.$timestamp.i;return new tb({t:z.isLong(t.$timestamp.t)?t.$timestamp.t.getLowBitsUnsigned():t.$timestamp.t,i:e})}inspect(t,e,r){let i=(r??=c)(this.t,e),n=r(this.i,e);return`new Timestamp({ t: ${i}, i: ${n} })`}}z.fromNumber(0x20000000000000),z.fromNumber(-0x20000000000000);let tp={$oid:tg,$binary:C,$uuid:C,$symbol:tm,$numberInt:to,$numberDecimal:tn,$numberDouble:ts,$numberLong:z,$minKey:tu,$maxKey:tf,$regex:tc,$regularExpression:tc,$timestamp:tb};function ty(t){let e=t.toISOString();return 0!==t.getUTCMilliseconds()?e:e.slice(0,-5)+"Z"}let tw={Binary:t=>new C(t.value(),t.sub_type),Code:t=>new J(t.code,t.scope),DBRef:t=>new H(t.collection||t.namespace,t.oid,t.db,t.fields),Decimal128:t=>new tn(t.bytes),Double:t=>new ts(t.value),Int32:t=>new to(t.value),Long:t=>z.fromBits(null!=t.low?t.low:t.low_,null!=t.low?t.high:t.high_,null!=t.low?t.unsigned:t.unsigned_),MaxKey:()=>new tf,MinKey:()=>new tu,ObjectId:t=>new tg(t),BSONRegExp:t=>new tc(t.pattern,t.options),BSONSymbol:t=>new tm(t.value),Timestamp:t=>tb.fromBits(t.low,t.high)};function tS(t,e){let r={useBigInt64:e?.useBigInt64??!1,relaxed:e?.relaxed??!0,legacy:e?.legacy??!1};return JSON.parse(t,(t,e)=>{if(-1!==t.indexOf("\0"))throw new b(`BSON Document field names cannot contain null bytes, found: ${JSON.stringify(t)}`);return function t(e,r={}){if("number"==typeof e){let t=e<=0x7fffffff&&e>=-0x80000000,i=e<=d&&e>=-0x8000000000000000;if(r.relaxed||r.legacy)return e;if(Number.isInteger(e)&&!Object.is(e,-0)){if(t)return new to(e);if(i)return r.useBigInt64?BigInt(e):z.fromNumber(e)}return new ts(e)}if(null==e||"object"!=typeof e)return e;if(e.$undefined)return null;let i=Object.keys(e).filter(t=>t.startsWith("$")&&null!=e[t]);for(let t=0;t<i.length;t++){let n=tp[i[t]];if(n)return n.fromExtendedJSON(e,r)}if(null!=e.$date){let t=e.$date,i=new Date;if(r.legacy)if("number"==typeof t)i.setTime(t);else if("string"==typeof t)i.setTime(Date.parse(t));else if("bigint"==typeof t)i.setTime(Number(t));else throw new y(`Unrecognized type for EJSON date: ${typeof t}`);else if("string"==typeof t)i.setTime(Date.parse(t));else if(z.isLong(t))i.setTime(t.toNumber());else if("number"==typeof t&&r.relaxed)i.setTime(t);else if("bigint"==typeof t)i.setTime(Number(t));else throw new y(`Unrecognized type for EJSON date: ${typeof t}`);return i}if(null!=e.$code){let r=Object.assign({},e);return e.$scope&&(r.$scope=t(e.$scope)),J.fromExtendedJSON(e)}if(M(e)||e.$dbPointer){let t=e.$ref?e:e.$dbPointer;if(t instanceof H)return t;let r=Object.keys(t).filter(t=>t.startsWith("$")),i=!0;if(r.forEach(t=>{-1===["$ref","$id","$db"].indexOf(t)&&(i=!1)}),i)return H.fromExtendedJSON(t)}return e}(e,r)})}function tx(t,e,r,i){return null!=r&&"object"==typeof r&&(i=r,r=void 0),null==e||"object"!=typeof e||Array.isArray(e)||(i=e,e=void 0),JSON.stringify(function t(e,r){if(e instanceof Map||l(e)){let i=Object.create(null);for(let[t,r]of e){if("string"!=typeof t)throw new b("Can only serialize maps with string keys");i[t]=r}return t(i,r)}if(("object"==typeof e||"function"==typeof e)&&null!==e){let t=r.seenObjects.findIndex(t=>t.obj===e);if(-1!==t){let e=r.seenObjects.map(t=>t.propertyName),i=e.slice(0,t).map(t=>`${t} -> `).join(""),n=e[t],s=" -> "+e.slice(t+1,e.length-1).map(t=>`${t} -> `).join(""),o=e[e.length-1],f=" ".repeat(i.length+n.length/2),u="-".repeat(s.length+(n.length+o.length)/2-1);throw new b(`Converting circular structure to EJSON:
2
+ ${i}${n}${s}${o}
3
+ ${f}\\${u}/`)}r.seenObjects[r.seenObjects.length-1].obj=e}if(Array.isArray(e))return e.map((e,i)=>{r.seenObjects.push({propertyName:`index ${i}`,obj:null});try{return t(e,r)}finally{r.seenObjects.pop()}});if(void 0===e)return r.ignoreUndefined?void 0:null;if(e instanceof Date||g(e)){let t=e.getTime(),i=t>-1&&t<2534023008e5;return r.legacy?r.relaxed&&i?{$date:e.getTime()}:{$date:ty(e)}:r.relaxed&&i?{$date:ty(e)}:{$date:{$numberLong:e.getTime().toString()}}}if("number"==typeof e&&(!r.relaxed||!isFinite(e))){if(Number.isInteger(e)&&!Object.is(e,-0)){if(e>=-0x80000000&&e<=0x7fffffff)return{$numberInt:e.toString()};if(e>=-0x8000000000000000&&e<=d)return{$numberLong:e.toString()}}return{$numberDouble:Object.is(e,-0)?"-0.0":e.toString()}}if("bigint"==typeof e)return r.relaxed?Number(BigInt.asIntN(64,e)):{$numberLong:BigInt.asIntN(64,e).toString()};if(e instanceof RegExp||h(e)){let t=e.flags;if(void 0===t){let r=e.toString().match(/[gimuy]*$/);r&&(t=r[0])}return new tc(e.source,t).toExtendedJSON(r)}return null!=e&&"object"==typeof e?function(e,r){if(null==e||"object"!=typeof e)throw new b("not an object instance");let i=e._bsontype;if(void 0===i){let i={};for(let n of Object.keys(e)){r.seenObjects.push({propertyName:n,obj:null});try{let s=t(e[n],r);"__proto__"===n?Object.defineProperty(i,n,{value:s,writable:!0,enumerable:!0,configurable:!0}):i[n]=s}finally{r.seenObjects.pop()}}return i}if(null!=e&&"object"==typeof e&&"string"==typeof e._bsontype&&7!==e[m])throw new p;if(null!=e&&"object"==typeof e&&"_bsontype"in e&&"string"==typeof e._bsontype){let n=e;if("function"!=typeof n.toExtendedJSON){let t=tw[e._bsontype];if(!t)throw new b("Unrecognized or invalid _bsontype: "+e._bsontype);n=t(n)}return"Code"===i&&n.scope?n=new J(n.code,t(n.scope,r)):"DBRef"===i&&n.oid&&(n=new H(t(n.collection,r),t(n.oid,r),t(n.db,r),t(n.fields,r))),n.toExtendedJSON(r)}throw new b("_bsontype must be a string, but was: "+typeof i)}(e,r):e}(t,Object.assign({relaxed:!0,legacy:!1},i,{seenObjects:[{propertyName:"(root)",obj:null}]})),e,r)}let tN=Object.create(null);tN.parse=tS,tN.stringify=tx,tN.serialize=function(t,e){return JSON.parse(tx(t,e=e||{}))},tN.deserialize=function(t,e){return e=e||{},tS(JSON.stringify(t),e)},Object.freeze(tN);let tE={double:1,string:2,object:3,array:4,binData:5,undefined:6,objectId:7,bool:8,date:9,null:10,regex:11,dbPointer:12,javascript:13,symbol:14,javascriptWithScope:15,int:16,timestamp:17,long:18,decimal:19,minKey:255,maxKey:127};function tB(t,e){try{return j.getNonnegativeInt32LE(t,e)}catch(t){throw new w("BSON size cannot be negative",e,{cause:t})}}function tO(t,e){let r=e;for(;t[r];r++);if(r>=t.length-1)throw new w("Null terminator not found",e);return r}let t$=Object.create(null);t$.parseToElements=function(t,e=0){if(e??=0,t.length<5)throw new w(`Input must be at least 5 bytes, got ${t.length} bytes`,e);let r=tB(t,e);if(r>t.length-e)throw new w(`Parsed documentSize (${r} bytes) does not match input length (${t.length} bytes)`,e);if(0!==t[e+r-1])throw new w("BSON documents must end in 0x00",e+r);let i=[],n=e+4;for(;n<=r+e;){let s,o=t[n];if(n+=1,0===o){if(n-e!==r)throw new w("Invalid 0x00 type byte",n);break}let f=n,u=tO(t,n)-f;if(n+=u+1,o===tE.double||o===tE.long||o===tE.date||o===tE.timestamp)s=8;else if(o===tE.int)s=4;else if(o===tE.objectId)s=12;else if(o===tE.decimal)s=16;else if(o===tE.bool)s=1;else if(o===tE.null||o===tE.undefined||o===tE.maxKey||o===tE.minKey)s=0;else if(o===tE.regex)s=tO(t,tO(t,n)+1)+1-n;else if(o===tE.object||o===tE.array||o===tE.javascriptWithScope)s=tB(t,n);else if(o===tE.string||o===tE.binData||o===tE.dbPointer||o===tE.javascript||o===tE.symbol)s=tB(t,n)+4,o===tE.binData&&(s+=1),o===tE.dbPointer&&(s+=12);else throw new w(`Invalid 0x${o.toString(16).padStart(2,"0")} type byte`,n);if(n+s>e+r-1)throw new w("value reports length larger than document",n);i.push([o,f,u,n,s]),n+=s}return i},t$.ByteUtils=_,t$.NumberUtils=j,Object.freeze(t$),_.allocate(0x1100000)}}]);