@loaders.gl/bson 4.2.1 → 4.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bson-loader.js +1 -1
- package/dist/bson-writer.js +1 -1
- package/dist/dist.min.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/package.json +5 -5
package/dist/bson-loader.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { parseBSONSync } from "./lib/parsers/parse-bson.js";
|
|
2
2
|
// __VERSION__ is injected by babel-plugin-version-inline
|
|
3
3
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
4
|
-
const VERSION = typeof "4.2.
|
|
4
|
+
const VERSION = typeof "4.2.2" !== 'undefined' ? "4.2.2" : 'latest';
|
|
5
5
|
export const BSONLoader = {
|
|
6
6
|
dataType: null,
|
|
7
7
|
batchType: null,
|
package/dist/bson-writer.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { encodeBSONSync } from "./lib/encoders/encode-bson.js";
|
|
5
5
|
// __VERSION__ is injected by babel-plugin-version-inline
|
|
6
6
|
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
|
|
7
|
-
const VERSION = typeof "4.2.
|
|
7
|
+
const VERSION = typeof "4.2.2" !== 'undefined' ? "4.2.2" : 'latest';
|
|
8
8
|
export const BSONWriter = {
|
|
9
9
|
name: 'BSON',
|
|
10
10
|
id: 'bson',
|
package/dist/dist.min.js
CHANGED
|
@@ -13,6 +13,6 @@
|
|
|
13
13
|
`))):E=B.stylize("[Circular]","special")),pt(a)){if(f&&l.match(/^\d+$/))return E;a=JSON.stringify(""+l),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=B.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=B.stylize(a,"string"))}return a+": "+E}function ur(B,e,y){var b=B.reduce(function(l,f){return f.indexOf(`
|
|
14
14
|
`)>=0,l+f.replace(/\u001b\[\d\d?m/g,"").length+1},0);return b>60?y[0]+(e===""?"":e+`
|
|
15
15
|
`)+" "+B.join(`,
|
|
16
|
-
`)+" "+y[1]:y[0]+e+" "+B.join(", ")+" "+y[1]}function we(B){return Array.isArray(B)}function he(B){return typeof B=="boolean"}function Qt(B){return B===null}function ar(B){return B==null}function Te(B){return typeof B=="number"}function xt(B){return typeof B=="string"}function lr(B){return babelHelpers.typeof(B)==="symbol"}function pt(B){return B===void 0}function Xt(B){return Pt(B)&&_e(B)==="[object RegExp]"}function Pt(B){return babelHelpers.typeof(B)==="object"&&B!==null}function ae(B){return Pt(B)&&_e(B)==="[object Date]"}function kt(B){return Pt(B)&&(_e(B)==="[object Error]"||B instanceof Error)}function Kt(B){return typeof B=="function"}function cr(B){return B===null||typeof B=="boolean"||typeof B=="number"||typeof B=="string"||babelHelpers.typeof(B)==="symbol"||typeof B>"u"}function hr(B){return Buffer.isBuffer(B)}function _e(B){return Object.prototype.toString.call(B)}function se(B){return B<10?"0"+B.toString(10):B.toString(10)}var _r=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function yr(){var B=new Date,e=[se(B.getHours()),se(B.getMinutes()),se(B.getSeconds())].join(":");return[B.getDate(),_r[B.getMonth()],e].join(" ")}function Br(){console.log("%s - %s",yr(),ce.apply(null,arguments))}function Ie(B,e){if(!e||!Pt(e))return B;for(var y=Object.keys(e),b=y.length;b--;)B[y[b]]=e[y[b]];return B}function De(B,e){return Object.prototype.hasOwnProperty.call(B,e)}var Nr={inherits:tr,_extend:Ie,log:Br,isBuffer:hr,isPrimitive:cr,isFunction:Kt,isError:kt,isDate:ae,isObject:Pt,isRegExp:Xt,isUndefined:pt,isSymbol:lr,isString:xt,isNumber:Te,isNullOrUndefined:ar,isNull:Qt,isBoolean:he,isArray:we,inspect:Ot,deprecate:me,format:ce,debuglog:rr},rt=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.deprecate=e.isObjectLike=e.isDate=e.isBuffer=e.haveBuffer=e.isBigUInt64Array=e.isBigInt64Array=e.isUint8Array=e.randomBytes=e.normalizedFunctionString=void 0;function y(n){return n.toString().replace("function(","function (")}e.normalizedFunctionString=y;function b(n){let w=C.Buffer.alloc(n);for(let U=0;U<n;++U)w[U]=Math.floor(Math.random()*256);return w}if(e.randomBytes=b,typeof window<"u"&&window.crypto&&window.crypto.getRandomValues)e.randomBytes=n=>window.crypto.getRandomValues(C.Buffer.alloc(n));else{try{e.randomBytes=$e.randomBytes}catch{}e.randomBytes==null&&(e.randomBytes=b)}function l(n){return Object.prototype.toString.call(n)==="[object Uint8Array]"}e.isUint8Array=l;function f(n){return Object.prototype.toString.call(n)==="[object BigInt64Array]"}e.isBigInt64Array=f;function a(n){return Object.prototype.toString.call(n)==="[object BigUint64Array]"}e.isBigUInt64Array=a;function E(){return typeof Ht<"u"&&typeof Ht.Buffer<"u"}e.haveBuffer=E;function o(n){return E()&&C.Buffer.isBuffer(n)}e.isBuffer=o;function c(n){return h(n)&&Object.prototype.toString.call(n)==="[object Date]"}e.isDate=c;function h(n){return typeof n=="object"&&n!==null}e.isObjectLike=h;function p(n,w){if(typeof window>"u"||typeof self>"u")return Nr.deprecate(n,w);let U=!1;function N(...Y){return U||(console.warn(w),U=!0),n.apply(this,...Y)}return N}e.deprecate=p});st(rt);var Ur=rt.deprecate,Mr=rt.isObjectLike,Pr=rt.isDate,jr=rt.isBuffer,Yr=rt.haveBuffer,vr=rt.isBigUInt64Array,Fr=rt.isBigInt64Array,Lr=rt.isUint8Array,Cr=rt.randomBytes,zr=rt.normalizedFunctionString,Nt=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.DBRef=e.isDBRefLike=void 0;function y(l){return rt.isObjectLike(l)&&l.$id!=null&&l.$ref!=null}e.isDBRefLike=y;class b{constructor(f,a,E,o){let c=f.split(".");c.length===2&&(E=c.shift(),f=c.shift()),this.collection=f,this.oid=a,this.db=E,this.fields=o||{}}get namespace(){return this.collection}set namespace(f){this.collection=f}toJSON(){let f=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return this.db!=null&&(f.$db=this.db),f}toExtendedJSON(f){f=f||{};let a={$ref:this.collection,$id:this.oid};return f.legacy||(this.db&&(a.$db=this.db),a=Object.assign(a,this.fields)),a}static fromExtendedJSON(f){let a=Object.assign({},f);return delete a.$ref,delete a.$id,delete a.$db,new b(f.$ref,f.$id,f.$db,a)}}e.DBRef=b,Object.defineProperty(b.prototype,"_bsontype",{value:"DBRef"})});st(Nt);var Jr=Nt.DBRef,Wr=Nt.isDBRefLike,K=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Long=void 0;let y;try{y=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 b=1<<16,l=1<<24,f=b*b,a=f*f,E=a/2,o={},c={};class h{constructor(n=0,w=0,U){this.comp=h.prototype.compare,this.div=h.prototype.divide,this.eq=h.prototype.equals,this.gt=h.prototype.greaterThan,this.gte=h.prototype.greaterThanOrEqual,this.ge=h.prototype.greaterThanOrEqual,this.lt=h.prototype.lessThan,this.lte=h.prototype.lessThanOrEqual,this.mod=h.prototype.modulo,this.rem=h.prototype.modulo,this.mul=h.prototype.multiply,this.neg=h.prototype.negate,this.neq=h.prototype.notEquals,this.ne=h.prototype.notEquals,this.shl=h.prototype.shiftLeft,this.shr=h.prototype.shiftRight,this.shr_u=h.prototype.shiftRightUnsigned,this.shru=h.prototype.shiftRightUnsigned,this.sub=h.prototype.subtract,this.eqz=h.prototype.isZero,this.le=h.prototype.lessThanOrEqual,this.low=n|0,this.high=w|0,this.unsigned=!!U,Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}static fromBits(n,w,U){return new h(n,w,U)}static fromInt(n,w){let U,N,Y;return w?(n>>>=0,(Y=0<=n&&n<256)&&(N=c[n],N)?N:(U=h.fromBits(n,(n|0)<0?-1:0,!0),Y&&(c[n]=U),U)):(n|=0,(Y=-128<=n&&n<128)&&(N=o[n],N)?N:(U=h.fromBits(n,n<0?-1:0,!1),Y&&(o[n]=U),U))}static fromNumber(n,w){if(isNaN(n))return w?h.UZERO:h.ZERO;if(w){if(n<0)return h.UZERO;if(n>=a)return h.MAX_UNSIGNED_VALUE}else{if(n<=-E)return h.MIN_VALUE;if(n+1>=E)return h.MAX_VALUE}return n<0?h.fromNumber(-n,w).neg():h.fromBits(n%f|0,n/f|0,w)}static fromBigInt(n,w){return h.fromString(n.toString(),w)}static fromString(n,w,U){if(n.length===0)throw Error("empty string");if(n==="NaN"||n==="Infinity"||n==="+Infinity"||n==="-Infinity")return h.ZERO;if(typeof w=="number"?(U=w,w=!1):w=!!w,U=U||10,U<2||36<U)throw RangeError("radix");let N;if((N=n.indexOf("-"))>0)throw Error("interior hyphen");if(N===0)return h.fromString(n.substring(1),w,U).neg();let Y=h.fromNumber(Math.pow(U,8)),J=h.ZERO;for(let R=0;R<n.length;R+=8){let W=Math.min(8,n.length-R),x=parseInt(n.substring(R,R+W),U);if(W<8){let G=h.fromNumber(Math.pow(U,W));J=J.mul(G).add(h.fromNumber(x))}else J=J.mul(Y),J=J.add(h.fromNumber(x))}return J.unsigned=w,J}static fromBytes(n,w,U){return U?h.fromBytesLE(n,w):h.fromBytesBE(n,w)}static fromBytesLE(n,w){return new h(n[0]|n[1]<<8|n[2]<<16|n[3]<<24,n[4]|n[5]<<8|n[6]<<16|n[7]<<24,w)}static fromBytesBE(n,w){return new h(n[4]<<24|n[5]<<16|n[6]<<8|n[7],n[0]<<24|n[1]<<16|n[2]<<8|n[3],w)}static isLong(n){return rt.isObjectLike(n)&&n.__isLong__===!0}static fromValue(n,w){return typeof n=="number"?h.fromNumber(n,w):typeof n=="string"?h.fromString(n,w):h.fromBits(n.low,n.high,typeof w=="boolean"?w:n.unsigned)}add(n){h.isLong(n)||(n=h.fromValue(n));let w=this.high>>>16,U=this.high&65535,N=this.low>>>16,Y=this.low&65535,J=n.high>>>16,R=n.high&65535,W=n.low>>>16,x=n.low&65535,G=0,M=0,V=0,z=0;return z+=Y+x,V+=z>>>16,z&=65535,V+=N+W,M+=V>>>16,V&=65535,M+=U+R,G+=M>>>16,M&=65535,G+=w+J,G&=65535,h.fromBits(V<<16|z,G<<16|M,this.unsigned)}and(n){return h.isLong(n)||(n=h.fromValue(n)),h.fromBits(this.low&n.low,this.high&n.high,this.unsigned)}compare(n){if(h.isLong(n)||(n=h.fromValue(n)),this.eq(n))return 0;let w=this.isNegative(),U=n.isNegative();return w&&!U?-1:!w&&U?1:this.unsigned?n.high>>>0>this.high>>>0||n.high===this.high&&n.low>>>0>this.low>>>0?-1:1:this.sub(n).isNegative()?-1:1}divide(n){if(h.isLong(n)||(n=h.fromValue(n)),n.isZero())throw Error("division by zero");if(y){if(!this.unsigned&&this.high===-2147483648&&n.low===-1&&n.high===-1)return this;let Y=(this.unsigned?y.div_u:y.div_s)(this.low,this.high,n.low,n.high);return h.fromBits(Y,y.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?h.UZERO:h.ZERO;let w,U,N;if(this.unsigned){if(n.unsigned||(n=n.toUnsigned()),n.gt(this))return h.UZERO;if(n.gt(this.shru(1)))return h.UONE;N=h.UZERO}else{if(this.eq(h.MIN_VALUE))return n.eq(h.ONE)||n.eq(h.NEG_ONE)?h.MIN_VALUE:n.eq(h.MIN_VALUE)?h.ONE:(w=this.shr(1).div(n).shl(1),w.eq(h.ZERO)?n.isNegative()?h.ONE:h.NEG_ONE:(U=this.sub(n.mul(w)),N=w.add(U.div(n)),N));if(n.eq(h.MIN_VALUE))return this.unsigned?h.UZERO:h.ZERO;if(this.isNegative())return n.isNegative()?this.neg().div(n.neg()):this.neg().div(n).neg();if(n.isNegative())return this.div(n.neg()).neg();N=h.ZERO}for(U=this;U.gte(n);){w=Math.max(1,Math.floor(U.toNumber()/n.toNumber()));let Y=Math.ceil(Math.log(w)/Math.LN2),J=Y<=48?1:Math.pow(2,Y-48),R=h.fromNumber(w),W=R.mul(n);for(;W.isNegative()||W.gt(U);)w-=J,R=h.fromNumber(w,this.unsigned),W=R.mul(n);R.isZero()&&(R=h.ONE),N=N.add(R),U=U.sub(W)}return N}equals(n){return h.isLong(n)||(n=h.fromValue(n)),this.unsigned!==n.unsigned&&this.high>>>31===1&&n.high>>>31===1?!1:this.high===n.high&&this.low===n.low}getHighBits(){return this.high}getHighBitsUnsigned(){return this.high>>>0}getLowBits(){return this.low}getLowBitsUnsigned(){return this.low>>>0}getNumBitsAbs(){if(this.isNegative())return this.eq(h.MIN_VALUE)?64:this.neg().getNumBitsAbs();let n=this.high!==0?this.high:this.low,w;for(w=31;w>0&&!(n&1<<w);w--);return this.high!==0?w+33:w+1}greaterThan(n){return this.comp(n)>0}greaterThanOrEqual(n){return this.comp(n)>=0}isEven(){return(this.low&1)===0}isNegative(){return!this.unsigned&&this.high<0}isOdd(){return(this.low&1)===1}isPositive(){return this.unsigned||this.high>=0}isZero(){return this.high===0&&this.low===0}lessThan(n){return this.comp(n)<0}lessThanOrEqual(n){return this.comp(n)<=0}modulo(n){if(h.isLong(n)||(n=h.fromValue(n)),y){let w=(this.unsigned?y.rem_u:y.rem_s)(this.low,this.high,n.low,n.high);return h.fromBits(w,y.get_high(),this.unsigned)}return this.sub(this.div(n).mul(n))}multiply(n){if(this.isZero())return h.ZERO;if(h.isLong(n)||(n=h.fromValue(n)),y){let Z=y.mul(this.low,this.high,n.low,n.high);return h.fromBits(Z,y.get_high(),this.unsigned)}if(n.isZero())return h.ZERO;if(this.eq(h.MIN_VALUE))return n.isOdd()?h.MIN_VALUE:h.ZERO;if(n.eq(h.MIN_VALUE))return this.isOdd()?h.MIN_VALUE:h.ZERO;if(this.isNegative())return n.isNegative()?this.neg().mul(n.neg()):this.neg().mul(n).neg();if(n.isNegative())return this.mul(n.neg()).neg();if(this.lt(h.TWO_PWR_24)&&n.lt(h.TWO_PWR_24))return h.fromNumber(this.toNumber()*n.toNumber(),this.unsigned);let w=this.high>>>16,U=this.high&65535,N=this.low>>>16,Y=this.low&65535,J=n.high>>>16,R=n.high&65535,W=n.low>>>16,x=n.low&65535,G=0,M=0,V=0,z=0;return z+=Y*x,V+=z>>>16,z&=65535,V+=N*x,M+=V>>>16,V&=65535,V+=Y*W,M+=V>>>16,V&=65535,M+=U*x,G+=M>>>16,M&=65535,M+=N*W,G+=M>>>16,M&=65535,M+=Y*R,G+=M>>>16,M&=65535,G+=w*x+U*W+N*R+Y*J,G&=65535,h.fromBits(V<<16|z,G<<16|M,this.unsigned)}negate(){return!this.unsigned&&this.eq(h.MIN_VALUE)?h.MIN_VALUE:this.not().add(h.ONE)}not(){return h.fromBits(~this.low,~this.high,this.unsigned)}notEquals(n){return!this.equals(n)}or(n){return h.isLong(n)||(n=h.fromValue(n)),h.fromBits(this.low|n.low,this.high|n.high,this.unsigned)}shiftLeft(n){return h.isLong(n)&&(n=n.toInt()),(n&=63)===0?this:n<32?h.fromBits(this.low<<n,this.high<<n|this.low>>>32-n,this.unsigned):h.fromBits(0,this.low<<n-32,this.unsigned)}shiftRight(n){return h.isLong(n)&&(n=n.toInt()),(n&=63)===0?this:n<32?h.fromBits(this.low>>>n|this.high<<32-n,this.high>>n,this.unsigned):h.fromBits(this.high>>n-32,this.high>=0?0:-1,this.unsigned)}shiftRightUnsigned(n){if(h.isLong(n)&&(n=n.toInt()),n&=63,n===0)return this;{let w=this.high;if(n<32){let U=this.low;return h.fromBits(U>>>n|w<<32-n,w>>>n,this.unsigned)}else return n===32?h.fromBits(w,0,this.unsigned):h.fromBits(w>>>n-32,0,this.unsigned)}}subtract(n){return h.isLong(n)||(n=h.fromValue(n)),this.add(n.neg())}toInt(){return this.unsigned?this.low>>>0:this.low}toNumber(){return this.unsigned?(this.high>>>0)*f+(this.low>>>0):this.high*f+(this.low>>>0)}toBigInt(){return BigInt(this.toString())}toBytes(n){return n?this.toBytesLE():this.toBytesBE()}toBytesLE(){let n=this.high,w=this.low;return[w&255,w>>>8&255,w>>>16&255,w>>>24,n&255,n>>>8&255,n>>>16&255,n>>>24]}toBytesBE(){let n=this.high,w=this.low;return[n>>>24,n>>>16&255,n>>>8&255,n&255,w>>>24,w>>>16&255,w>>>8&255,w&255]}toSigned(){return this.unsigned?h.fromBits(this.low,this.high,!1):this}toString(n){if(n=n||10,n<2||36<n)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(h.MIN_VALUE)){let Y=h.fromNumber(n),J=this.div(Y),R=J.mul(Y).sub(this);return J.toString(n)+R.toInt().toString(n)}else return"-"+this.neg().toString(n);let w=h.fromNumber(Math.pow(n,6),this.unsigned),U=this,N="";for(;;){let Y=U.div(w),R=(U.sub(Y.mul(w)).toInt()>>>0).toString(n);if(U=Y,U.isZero())return R+N;for(;R.length<6;)R="0"+R;N=""+R+N}}toUnsigned(){return this.unsigned?this:h.fromBits(this.low,this.high,!0)}xor(n){return h.isLong(n)||(n=h.fromValue(n)),h.fromBits(this.low^n.low,this.high^n.high,this.unsigned)}toExtendedJSON(n){return n&&n.relaxed?this.toNumber():{$numberLong:this.toString()}}static fromExtendedJSON(n,w){let U=h.fromString(n.$numberLong);return w&&w.relaxed?U.toNumber():U}}e.Long=h,h.TWO_PWR_24=h.fromInt(l),h.MAX_UNSIGNED_VALUE=h.fromBits(-1,-1,!0),h.ZERO=h.fromInt(0),h.UZERO=h.fromInt(0,!0),h.ONE=h.fromInt(1),h.UONE=h.fromInt(1,!0),h.NEG_ONE=h.fromInt(-1),h.MAX_VALUE=h.fromBits(-1,2147483647,!1),h.MIN_VALUE=h.fromBits(0,-2147483648,!1),Object.defineProperty(h.prototype,"__isLong__",{value:!0}),Object.defineProperty(h.prototype,"_bsontype",{value:"Long"})});st(K);var Xr=K.Long,dt=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Decimal128=void 0;let y=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,b=/^(\+|-)?(Infinity|inf)$/i,l=/^(\+|-)?NaN$/i,f=6111,a=-6176,E=6176,o=34,c=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),h=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),p=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),n=/^([-+])?(\d+)?$/,w=31,U=16383,N=30,Y=31;function J(V){return!isNaN(parseInt(V,10))}function R(V){let z=K.Long.fromNumber(1e9),Z=K.Long.fromNumber(0);if(!V.parts[0]&&!V.parts[1]&&!V.parts[2]&&!V.parts[3])return{quotient:V,rem:Z};for(let s=0;s<=3;s++)Z=Z.shiftLeft(32),Z=Z.add(new K.Long(V.parts[s],0)),V.parts[s]=Z.div(z).low,Z=Z.modulo(z);return{quotient:V,rem:Z}}function W(V,z){if(!V&&!z)return{high:K.Long.fromNumber(0),low:K.Long.fromNumber(0)};let Z=V.shiftRightUnsigned(32),s=new K.Long(V.getLowBits(),0),A=z.shiftRightUnsigned(32),O=new K.Long(z.getLowBits(),0),i=Z.multiply(A),m=Z.multiply(O),D=s.multiply(A),j=s.multiply(O);return i=i.add(m.shiftRightUnsigned(32)),m=new K.Long(m.getLowBits(),0).add(D).add(j.shiftRightUnsigned(32)),i=i.add(m.shiftRightUnsigned(32)),j=m.shiftLeft(32).add(new K.Long(j.getLowBits(),0)),{high:i,low:j}}function x(V,z){let Z=V.high>>>0,s=z.high>>>0;if(Z<s)return!0;if(Z===s){let A=V.low>>>0,O=z.low>>>0;if(A<O)return!0}return!1}function G(V,z){throw new TypeError(`"${V}" is not a valid Decimal128 string - ${z}`)}class M{constructor(z){this.bytes=z}static fromString(z){let Z=!1,s=!1,A=!1,O=0,i=0,m=0,D=0,j=0,F=[0],g=0,$=0,L=0,T=0,d=0,q=0,X=new K.Long(0,0),et=new K.Long(0,0),Bt=0,k=0;if(z.length>=7e3)throw new TypeError(""+z+" not a valid Decimal128 string");let lt=z.match(y),ee=z.match(b),Ft=z.match(l);if(!lt&&!ee&&!Ft||z.length===0)throw new TypeError(""+z+" not a valid Decimal128 string");if(lt){let nt=lt[2],u=lt[4],t=lt[5],r=lt[6];u&&r===void 0&&G(z,"missing exponent power"),u&&nt===void 0&&G(z,"missing exponent base"),u===void 0&&(t||r)&&G(z,"missing e before exponent")}if((z[k]==="+"||z[k]==="-")&&(Z=z[k++]==="-"),!J(z[k])&&z[k]!=="."){if(z[k]==="i"||z[k]==="I")return new M(C.Buffer.from(Z?h:p));if(z[k]==="N")return new M(C.Buffer.from(c))}for(;J(z[k])||z[k]===".";){if(z[k]==="."){s&&G(z,"contains multiple periods"),s=!0,k=k+1;continue}g<34&&(z[k]!=="0"||A)&&(A||(j=i),A=!0,F[$++]=parseInt(z[k],10),g=g+1),A&&(m=m+1),s&&(D=D+1),i=i+1,k=k+1}if(s&&!i)throw new TypeError(""+z+" not a valid Decimal128 string");if(z[k]==="e"||z[k]==="E"){let nt=z.substr(++k).match(n);if(!nt||!nt[2])return new M(C.Buffer.from(c));d=parseInt(nt[0],10),k=k+nt[0].length}if(z[k])return new M(C.Buffer.from(c));if(L=0,!g)L=0,T=0,F[0]=0,m=1,g=1,O=0;else if(T=g-1,O=m,O!==1)for(;z[j+O-1]==="0";)O=O-1;for(d<=D&&D-d>1<<14?d=a:d=d-D;d>f;){if(T=T+1,T-L>o){if(F.join("").match(/^0+$/)){d=f;break}G(z,"overflow")}d=d-1}for(;d<a||g<m;){if(T===0&&O<g){d=a,O=0;break}if(g<m?m=m-1:T=T-1,d<f)d=d+1;else{if(F.join("").match(/^0+$/)){d=f;break}G(z,"overflow")}}if(T-L+1<O){let nt=i;s&&(j=j+1,nt=nt+1),Z&&(j=j+1,nt=nt+1);let u=parseInt(z[j+T+1],10),t=0;if(u>=5&&(t=1,u===5)){for(t=F[T]%2===1?1:0,q=j+T+2;q<nt;q++)if(parseInt(z[q],10)){t=1;break}}if(t){let r=T;for(;r>=0;r--)if(++F[r]>9&&(F[r]=0,r===0))if(d<f)d=d+1,F[r]=1;else return new M(C.Buffer.from(Z?h:p))}}if(X=K.Long.fromNumber(0),et=K.Long.fromNumber(0),O===0)X=K.Long.fromNumber(0),et=K.Long.fromNumber(0);else if(T-L<17){let nt=L;for(et=K.Long.fromNumber(F[nt++]),X=new K.Long(0,0);nt<=T;nt++)et=et.multiply(K.Long.fromNumber(10)),et=et.add(K.Long.fromNumber(F[nt]))}else{let nt=L;for(X=K.Long.fromNumber(F[nt++]);nt<=T-17;nt++)X=X.multiply(K.Long.fromNumber(10)),X=X.add(K.Long.fromNumber(F[nt]));for(et=K.Long.fromNumber(F[nt++]);nt<=T;nt++)et=et.multiply(K.Long.fromNumber(10)),et=et.add(K.Long.fromNumber(F[nt]))}let ht=W(X,K.Long.fromString("100000000000000000"));ht.low=ht.low.add(et),x(ht.low,et)&&(ht.high=ht.high.add(K.Long.fromNumber(1))),Bt=d+E;let Q={low:K.Long.fromNumber(0),high:K.Long.fromNumber(0)};ht.high.shiftRightUnsigned(49).and(K.Long.fromNumber(1)).equals(K.Long.fromNumber(1))?(Q.high=Q.high.or(K.Long.fromNumber(3).shiftLeft(61)),Q.high=Q.high.or(K.Long.fromNumber(Bt).and(K.Long.fromNumber(16383).shiftLeft(47))),Q.high=Q.high.or(ht.high.and(K.Long.fromNumber(0x7fffffffffff)))):(Q.high=Q.high.or(K.Long.fromNumber(Bt&16383).shiftLeft(49)),Q.high=Q.high.or(ht.high.and(K.Long.fromNumber(562949953421311)))),Q.low=ht.low,Z&&(Q.high=Q.high.or(K.Long.fromString("9223372036854775808")));let at=C.Buffer.alloc(16);return k=0,at[k++]=Q.low.low&255,at[k++]=Q.low.low>>8&255,at[k++]=Q.low.low>>16&255,at[k++]=Q.low.low>>24&255,at[k++]=Q.low.high&255,at[k++]=Q.low.high>>8&255,at[k++]=Q.low.high>>16&255,at[k++]=Q.low.high>>24&255,at[k++]=Q.high.low&255,at[k++]=Q.high.low>>8&255,at[k++]=Q.high.low>>16&255,at[k++]=Q.high.low>>24&255,at[k++]=Q.high.high&255,at[k++]=Q.high.high>>8&255,at[k++]=Q.high.high>>16&255,at[k++]=Q.high.high>>24&255,new M(at)}toString(){let z,Z=0,s=new Array(36);for(let k=0;k<s.length;k++)s[k]=0;let A=0,O=!1,i,m={parts:[0,0,0,0]},D,j,F=[];A=0;let g=this.bytes,$=g[A++]|g[A++]<<8|g[A++]<<16|g[A++]<<24,L=g[A++]|g[A++]<<8|g[A++]<<16|g[A++]<<24,T=g[A++]|g[A++]<<8|g[A++]<<16|g[A++]<<24,d=g[A++]|g[A++]<<8|g[A++]<<16|g[A++]<<24;A=0,{low:new K.Long($,L),high:new K.Long(T,d)}.high.lessThan(K.Long.ZERO)&&F.push("-");let X=d>>26&w;if(X>>3===3){if(X===N)return F.join("")+"Infinity";if(X===Y)return"NaN";z=d>>15&U,i=8+(d>>14&1)}else i=d>>14&7,z=d>>17&U;let et=z-E;if(m.parts[0]=(d&16383)+((i&15)<<14),m.parts[1]=T,m.parts[2]=L,m.parts[3]=$,m.parts[0]===0&&m.parts[1]===0&&m.parts[2]===0&&m.parts[3]===0)O=!0;else for(j=3;j>=0;j--){let k=0,lt=R(m);if(m=lt.quotient,k=lt.rem.low,!!k)for(D=8;D>=0;D--)s[j*9+D]=k%10,k=Math.floor(k/10)}if(O)Z=1,s[A]=0;else for(Z=36;!s[A];)Z=Z-1,A=A+1;let Bt=Z-1+et;if(Bt>=34||Bt<=-7||et>0){if(Z>34)return F.push(`${0}`),et>0?F.push("E+"+et):et<0&&F.push("E"+et),F.join("");F.push(`${s[A++]}`),Z=Z-1,Z&&F.push(".");for(let k=0;k<Z;k++)F.push(`${s[A++]}`);F.push("E"),Bt>0?F.push("+"+Bt):F.push(`${Bt}`)}else if(et>=0)for(let k=0;k<Z;k++)F.push(`${s[A++]}`);else{let k=Z+et;if(k>0)for(let lt=0;lt<k;lt++)F.push(`${s[A++]}`);else F.push("0");for(F.push(".");k++<0;)F.push("0");for(let lt=0;lt<Z-Math.max(k-1,0);lt++)F.push(`${s[A++]}`)}return F.join("")}toJSON(){return{$numberDecimal:this.toString()}}toExtendedJSON(){return{$numberDecimal:this.toString()}}static fromExtendedJSON(z){return M.fromString(z.$numberDecimal)}}e.Decimal128=M,Object.defineProperty(M.prototype,"_bsontype",{value:"Decimal128"})});st(dt);var kr=dt.Decimal128,It=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Double=void 0;class y{constructor(l){l instanceof Number&&(l=l.valueOf()),this.value=+l}valueOf(){return this.value}toJSON(){return this.value}toExtendedJSON(l){if(l&&(l.legacy||l.relaxed&&isFinite(this.value)))return this.value;if(Object.is(Math.sign(this.value),-0))return{$numberDouble:`-${this.value.toFixed(1)}`};let f;return Number.isInteger(this.value)?(f=this.value.toFixed(1),f.length>=13&&(f=this.value.toExponential(13).toUpperCase())):f=this.value.toString(),{$numberDouble:f}}static fromExtendedJSON(l,f){let a=parseFloat(l.$numberDouble);return f&&f.relaxed?a:new y(a)}}e.Double=y,Object.defineProperty(y.prototype,"_bsontype",{value:"Double"})});st(It);var Kr=It.Double,Dt=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Int32=void 0;class y{constructor(l){l instanceof Number&&(l=l.valueOf()),this.value=+l}valueOf(){return this.value}toJSON(){return this.value}toExtendedJSON(l){return l&&(l.relaxed||l.legacy)?this.value:{$numberInt:this.value.toString()}}static fromExtendedJSON(l,f){return f&&f.relaxed?parseInt(l.$numberInt,10):new y(l.$numberInt)}}e.Int32=y,Object.defineProperty(y.prototype,"_bsontype",{value:"Int32"})});st(Dt);var Hr=Dt.Int32,$t=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Map=void 0;let y;e.Map=y;let b=function(a){return a&&a.Math==Math&&a};function l(){return b(typeof globalThis=="object"&&globalThis)||b(typeof window=="object"&&window)||b(typeof self=="object"&&self)||b(typeof Ht=="object"&&Ht)||Function("return this")()}let f=l();Object.prototype.hasOwnProperty.call(f,"Map")?e.Map=y=f.Map:e.Map=y=class{constructor(E=[]){this._keys=[],this._values={};for(let o=0;o<E.length;o++){if(E[o]==null)continue;let c=E[o],h=c[0],p=c[1];this._keys.push(h),this._values[h]={v:p,i:this._keys.length-1}}}clear(){this._keys=[],this._values={}}delete(E){let o=this._values[E];return o==null?!1:(delete this._values[E],this._keys.splice(o.i,1),!0)}entries(){let E=0;return{next:()=>{let o=this._keys[E++];return{value:o!==void 0?[o,this._values[o].v]:void 0,done:o===void 0}}}}forEach(E,o){o=o||this;for(let c=0;c<this._keys.length;c++){let h=this._keys[c];E.call(o,this._values[h].v,h,o)}}get(E){return this._values[E]?this._values[E].v:void 0}has(E){return this._values[E]!=null}keys(){let E=0;return{next:()=>{let o=this._keys[E++];return{value:o!==void 0?o:void 0,done:o===void 0}}}}set(E,o){return this._values[E]?(this._values[E].v=o,this):(this._keys.push(E),this._values[E]={v:o,i:this._keys.length-1},this)}values(){let E=0;return{next:()=>{let o=this._keys[E++];return{value:o!==void 0?this._values[o].v:void 0,done:o===void 0}}}}get size(){return this._keys.length}}});st($t);var Vr=$t.Map,Rt=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MaxKey=void 0;class y{toExtendedJSON(){return{$maxKey:1}}static fromExtendedJSON(){return new y}}e.MaxKey=y,Object.defineProperty(y.prototype,"_bsontype",{value:"MaxKey"})});st(Rt);var Zr=Rt.MaxKey,Ut=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MinKey=void 0;class y{toExtendedJSON(){return{$minKey:1}}static fromExtendedJSON(){return new y}}e.MinKey=y,Object.defineProperty(y.prototype,"_bsontype",{value:"MinKey"})});st(Ut);var qr=Ut.MinKey,St=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectId=void 0;let y=rt.randomBytes(5),b=new RegExp("^[0-9a-fA-F]{24}$"),l=[];for(let h=0;h<256;h++)l[h]=(h<=15?"0":"")+h.toString(16);let f=[],a=0;for(;a<10;)f[48+a]=a++;for(;a<16;)f[65-10+a]=f[97-10+a]=a++;let E=Symbol("id");class o{constructor(p){if(p instanceof o&&(this[E]=p.id,this.__id=p.__id),typeof p=="object"&&p&&"id"in p&&("toHexString"in p&&typeof p.toHexString=="function"?this[E]=C.Buffer.from(p.toHexString(),"hex"):this[E]=typeof p.id=="string"?C.Buffer.from(p.id):p.id),(p==null||typeof p=="number")&&(this[E]=o.generate(typeof p=="number"?p:void 0),o.cacheHexString&&(this.__id=this.id.toString("hex"))),ArrayBuffer.isView(p)&&p.byteLength===12&&(this[E]=mt.ensureBuffer(p)),typeof p=="string")if(p.length===12){let n=C.Buffer.from(p);n.byteLength===12&&(this[E]=n)}else if(p.length===24&&b.test(p))this[E]=C.Buffer.from(p,"hex");else throw new TypeError("Argument passed in must be a Buffer or string of 12 bytes or a string of 24 hex characters");o.cacheHexString&&(this.__id=this.id.toString("hex"))}get id(){return this[E]}set id(p){this[E]=p,o.cacheHexString&&(this.__id=p.toString("hex"))}get generationTime(){return this.id.readInt32BE(0)}set generationTime(p){this.id.writeUInt32BE(p,0)}toHexString(){if(o.cacheHexString&&this.__id)return this.__id;let p=this.id.toString("hex");return o.cacheHexString&&!this.__id&&(this.__id=p),p}static getInc(){return o.index=(o.index+1)%16777215}static generate(p){typeof p!="number"&&(p=~~(Date.now()/1e3));let n=o.getInc(),w=C.Buffer.alloc(12);return w.writeUInt32BE(p,0),w[4]=y[0],w[5]=y[1],w[6]=y[2],w[7]=y[3],w[8]=y[4],w[11]=n&255,w[10]=n>>8&255,w[9]=n>>16&255,w}toString(p){return p?this.id.toString(p):this.toHexString()}toJSON(){return this.toHexString()}equals(p){return p==null?!1:p instanceof o?this.toString()===p.toString():typeof p=="string"&&o.isValid(p)&&p.length===12&&this.id instanceof C.Buffer?p===this.id.toString("binary"):typeof p=="string"&&o.isValid(p)&&p.length===24?p.toLowerCase()===this.toHexString():typeof p=="string"&&o.isValid(p)&&p.length===12?C.Buffer.from(p).equals(this.id):typeof p=="object"&&"toHexString"in p&&typeof p.toHexString=="function"?p.toHexString()===this.toHexString():!1}getTimestamp(){let p=new Date,n=this.id.readUInt32BE(0);return p.setTime(Math.floor(n)*1e3),p}static createPk(){return new o}static createFromTime(p){let n=C.Buffer.from([0,0,0,0,0,0,0,0,0,0,0,0]);return n.writeUInt32BE(p,0),new o(n)}static createFromHexString(p){if(typeof p>"u"||p!=null&&p.length!==24)throw new TypeError("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new o(C.Buffer.from(p,"hex"))}static isValid(p){return p==null?!1:typeof p=="number"?!0:typeof p=="string"?p.length===12||p.length===24&&b.test(p):p instanceof o||p instanceof C.Buffer&&p.length===12?!0:typeof p=="object"&&"toHexString"in p&&typeof p.toHexString=="function"?typeof p.id=="string"?p.id.length===12:p.toHexString().length===24&&b.test(p.id.toString("hex")):!1}toExtendedJSON(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}}static fromExtendedJSON(p){return new o(p.$oid)}}e.ObjectId=o,o.index=~~(Math.random()*16777215),Object.defineProperty(o.prototype,"generate",{value:rt.deprecate(h=>o.generate(h),"Please use the static `ObjectId.generate(time)` instead")}),Object.defineProperty(o.prototype,"getInc",{value:rt.deprecate(()=>o.getInc(),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(o.prototype,"get_inc",{value:rt.deprecate(()=>o.getInc(),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(o,"get_inc",{value:rt.deprecate(()=>o.getInc(),"Please use the static `ObjectId.getInc()` instead")});let c=Symbol.for("nodejs.util.inspect.custom");Object.defineProperty(o.prototype,c,o.prototype.toString),Object.defineProperty(o.prototype,"inspect",o.prototype.toString),Object.defineProperty(o.prototype,"_bsontype",{value:"ObjectID"})});st(St);var Qr=St.ObjectId,I=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BSON_BINARY_SUBTYPE_USER_DEFINED=e.BSON_BINARY_SUBTYPE_MD5=e.BSON_BINARY_SUBTYPE_UUID_NEW=e.BSON_BINARY_SUBTYPE_UUID=e.BSON_BINARY_SUBTYPE_BYTE_ARRAY=e.BSON_BINARY_SUBTYPE_FUNCTION=e.BSON_BINARY_SUBTYPE_DEFAULT=e.BSON_DATA_MAX_KEY=e.BSON_DATA_MIN_KEY=e.BSON_DATA_DECIMAL128=e.BSON_DATA_LONG=e.BSON_DATA_TIMESTAMP=e.BSON_DATA_INT=e.BSON_DATA_CODE_W_SCOPE=e.BSON_DATA_SYMBOL=e.BSON_DATA_CODE=e.BSON_DATA_DBPOINTER=e.BSON_DATA_REGEXP=e.BSON_DATA_NULL=e.BSON_DATA_DATE=e.BSON_DATA_BOOLEAN=e.BSON_DATA_OID=e.BSON_DATA_UNDEFINED=e.BSON_DATA_BINARY=e.BSON_DATA_ARRAY=e.BSON_DATA_OBJECT=e.BSON_DATA_STRING=e.BSON_DATA_NUMBER=e.JS_INT_MIN=e.JS_INT_MAX=e.BSON_INT64_MIN=e.BSON_INT64_MAX=e.BSON_INT32_MIN=e.BSON_INT32_MAX=void 0,e.BSON_INT32_MAX=2147483647,e.BSON_INT32_MIN=-2147483648,e.BSON_INT64_MAX=Math.pow(2,63)-1,e.BSON_INT64_MIN=-Math.pow(2,63),e.JS_INT_MAX=Math.pow(2,53),e.JS_INT_MIN=-Math.pow(2,53),e.BSON_DATA_NUMBER=1,e.BSON_DATA_STRING=2,e.BSON_DATA_OBJECT=3,e.BSON_DATA_ARRAY=4,e.BSON_DATA_BINARY=5,e.BSON_DATA_UNDEFINED=6,e.BSON_DATA_OID=7,e.BSON_DATA_BOOLEAN=8,e.BSON_DATA_DATE=9,e.BSON_DATA_NULL=10,e.BSON_DATA_REGEXP=11,e.BSON_DATA_DBPOINTER=12,e.BSON_DATA_CODE=13,e.BSON_DATA_SYMBOL=14,e.BSON_DATA_CODE_W_SCOPE=15,e.BSON_DATA_INT=16,e.BSON_DATA_TIMESTAMP=17,e.BSON_DATA_LONG=18,e.BSON_DATA_DECIMAL128=19,e.BSON_DATA_MIN_KEY=255,e.BSON_DATA_MAX_KEY=127,e.BSON_BINARY_SUBTYPE_DEFAULT=0,e.BSON_BINARY_SUBTYPE_FUNCTION=1,e.BSON_BINARY_SUBTYPE_BYTE_ARRAY=2,e.BSON_BINARY_SUBTYPE_UUID=3,e.BSON_BINARY_SUBTYPE_UUID_NEW=4,e.BSON_BINARY_SUBTYPE_MD5=5,e.BSON_BINARY_SUBTYPE_USER_DEFINED=128});st(I);var xr=I.BSON_BINARY_SUBTYPE_USER_DEFINED,$r=I.BSON_BINARY_SUBTYPE_MD5,tn=I.BSON_BINARY_SUBTYPE_UUID_NEW,en=I.BSON_BINARY_SUBTYPE_UUID,rn=I.BSON_BINARY_SUBTYPE_BYTE_ARRAY,nn=I.BSON_BINARY_SUBTYPE_FUNCTION,on=I.BSON_BINARY_SUBTYPE_DEFAULT,sn=I.BSON_DATA_MAX_KEY,fn=I.BSON_DATA_MIN_KEY,un=I.BSON_DATA_DECIMAL128,an=I.BSON_DATA_LONG,ln=I.BSON_DATA_TIMESTAMP,cn=I.BSON_DATA_INT,hn=I.BSON_DATA_CODE_W_SCOPE,_n=I.BSON_DATA_SYMBOL,yn=I.BSON_DATA_CODE,Bn=I.BSON_DATA_DBPOINTER,Nn=I.BSON_DATA_REGEXP,gn=I.BSON_DATA_NULL,pn=I.BSON_DATA_DATE,On=I.BSON_DATA_BOOLEAN,Sn=I.BSON_DATA_OID,An=I.BSON_DATA_UNDEFINED,En=I.BSON_DATA_BINARY,mn=I.BSON_DATA_ARRAY,wn=I.BSON_DATA_OBJECT,Tn=I.BSON_DATA_STRING,In=I.BSON_DATA_NUMBER,Dn=I.JS_INT_MIN,bn=I.JS_INT_MAX,dn=I.BSON_INT64_MIN,Rn=I.BSON_INT64_MAX,Un=I.BSON_INT32_MIN,Mn=I.BSON_INT32_MAX,ye=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.calculateObjectSize=void 0;function y(l,f,a){let E=5;if(Array.isArray(l))for(let o=0;o<l.length;o++)E+=b(o.toString(),l[o],f,!0,a);else{l.toBSON&&(l=l.toBSON());for(let o in l)E+=b(o,l[o],f,!1,a)}return E}e.calculateObjectSize=y;function b(l,f,a=!1,E=!1,o=!1){switch(f&&f.toBSON&&(f=f.toBSON()),typeof f){case"string":return 1+C.Buffer.byteLength(l,"utf8")+1+4+C.Buffer.byteLength(f,"utf8")+1;case"number":return Math.floor(f)===f&&f>=I.JS_INT_MIN&&f<=I.JS_INT_MAX&&f>=I.BSON_INT32_MIN&&f<=I.BSON_INT32_MAX?(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+(4+1):(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+(8+1);case"undefined":return E||!o?(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+1:0;case"boolean":return(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+(1+1);case"object":if(f==null||f._bsontype==="MinKey"||f._bsontype==="MaxKey")return(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+1;if(f._bsontype==="ObjectId"||f._bsontype==="ObjectID")return(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+(12+1);if(f instanceof Date||rt.isDate(f))return(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+(8+1);if(ArrayBuffer.isView(f)||f instanceof ArrayBuffer)return(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+(1+4+1)+f.byteLength;if(f._bsontype==="Long"||f._bsontype==="Double"||f._bsontype==="Timestamp")return(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+(8+1);if(f._bsontype==="Decimal128")return(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+(16+1);if(f._bsontype==="Code")return f.scope!=null&&Object.keys(f.scope).length>0?(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+1+4+4+C.Buffer.byteLength(f.code.toString(),"utf8")+1+y(f.scope,a,o):(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+1+4+C.Buffer.byteLength(f.code.toString(),"utf8")+1;if(f._bsontype==="Binary")return f.sub_type===_t.Binary.SUBTYPE_BYTE_ARRAY?(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+(f.position+1+4+1+4):(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+(f.position+1+4+1);if(f._bsontype==="Symbol")return(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+C.Buffer.byteLength(f.value,"utf8")+4+1+1;if(f._bsontype==="DBRef"){let c=Object.assign({$ref:f.collection,$id:f.oid},f.fields);return f.db!=null&&(c.$db=f.db),(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+1+y(c,a,o)}else return f instanceof RegExp||Object.prototype.toString.call(f)==="[object RegExp]"?(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+1+C.Buffer.byteLength(f.source,"utf8")+1+(f.global?1:0)+(f.ignoreCase?1:0)+(f.multiline?1:0)+1:f._bsontype==="BSONRegExp"?(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+1+C.Buffer.byteLength(f.pattern,"utf8")+1+C.Buffer.byteLength(f.options,"utf8")+1:(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+y(f,a,o)+1;case"function":if(f instanceof RegExp||Object.prototype.toString.call(f)==="[object RegExp]"||String.call(f)==="[object RegExp]")return(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+1+C.Buffer.byteLength(f.source,"utf8")+1+(f.global?1:0)+(f.ignoreCase?1:0)+(f.multiline?1:0)+1;if(a&&f.scope!=null&&Object.keys(f.scope).length>0)return(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+1+4+4+C.Buffer.byteLength(rt.normalizedFunctionString(f),"utf8")+1+y(f.scope,a,o);if(a)return(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+1+4+C.Buffer.byteLength(rt.normalizedFunctionString(f),"utf8")+1}return 0}});st(ye);var Pn=ye.calculateObjectSize,At=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BSONRegExp=void 0;function y(l){return l.split("").sort().join("")}class b{constructor(f,a){this.pattern=f,this.options=a??"",y(this.options);for(let E=0;E<this.options.length;E++)if(!(this.options[E]==="i"||this.options[E]==="m"||this.options[E]==="x"||this.options[E]==="l"||this.options[E]==="s"||this.options[E]==="u"))throw new Error(`The regular expression option [${this.options[E]}] is not supported`)}static parseOptions(f){return f?f.split("").sort().join(""):""}toExtendedJSON(f){return f=f||{},f.legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}}static fromExtendedJSON(f){if("$regex"in f)if(typeof f.$regex!="string"){if(f.$regex._bsontype==="BSONRegExp")return f}else return new b(f.$regex,b.parseOptions(f.$options));if("$regularExpression"in f)return new b(f.$regularExpression.pattern,b.parseOptions(f.$regularExpression.options));throw new TypeError(`Unexpected BSONRegExp EJSON object form: ${JSON.stringify(f)}`)}}e.BSONRegExp=b,Object.defineProperty(b.prototype,"_bsontype",{value:"BSONRegExp"})});st(At);var jn=At.BSONRegExp,Mt=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BSONSymbol=void 0;class y{constructor(l){this.value=l}valueOf(){return this.value}toString(){return this.value}inspect(){return this.value}toJSON(){return this.value}toExtendedJSON(){return{$symbol:this.value}}static fromExtendedJSON(l){return new y(l.$symbol)}}e.BSONSymbol=y,Object.defineProperty(y.prototype,"_bsontype",{value:"Symbol"})});st(Mt);var Yn=Mt.BSONSymbol,wt=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Timestamp=e.LongWithoutOverridesClass=void 0,e.LongWithoutOverridesClass=K.Long;class y extends e.LongWithoutOverridesClass{constructor(l,f){K.Long.isLong(l)?super(l.low,l.high,!0):super(l,f,!0),Object.defineProperty(this,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1})}toJSON(){return{$timestamp:this.toString()}}static fromInt(l){return new y(K.Long.fromInt(l,!0))}static fromNumber(l){return new y(K.Long.fromNumber(l,!0))}static fromBits(l,f){return new y(l,f)}static fromString(l,f){return new y(K.Long.fromString(l,!0,f))}toExtendedJSON(){return{$timestamp:{t:this.high>>>0,i:this.low>>>0}}}static fromExtendedJSON(l){return new y(l.$timestamp.i,l.$timestamp.t)}}e.Timestamp=y,y.MAX_VALUE=K.Long.MAX_UNSIGNED_VALUE});st(wt);var vn=wt.Timestamp,Fn=wt.LongWithoutOverridesClass,Vt=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateUtf8=void 0;let y=128,b=192,l=224,f=240,a=248,E=192,o=224,c=240,h=128;function p(n,w,U){let N=0;for(let Y=w;Y<U;Y+=1){let J=n[Y];if(N){if((J&b)!==h)return!1;N-=1}else if(J&y)if((J&l)===E)N=1;else if((J&f)===o)N=2;else if((J&a)===c)N=3;else return!1}return!N}e.validateUtf8=p});st(Vt);var Ln=Vt.validateUtf8,Zt=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.deserialize=void 0;let y=K.Long.fromNumber(I.JS_INT_MAX),b=K.Long.fromNumber(I.JS_INT_MIN),l={};function f(o,c,h){c=c??{};let p=c&&c.index?c.index:0,n=o[p]|o[p+1]<<8|o[p+2]<<16|o[p+3]<<24;if(n<5)throw new Error(`bson size must be >= 5, is ${n}`);if(c.allowObjectSmallerThanBufferSize&&o.length<n)throw new Error(`buffer length ${o.length} must be >= bson size ${n}`);if(!c.allowObjectSmallerThanBufferSize&&o.length!==n)throw new Error(`buffer length ${o.length} must === bson size ${n}`);if(n+p>o.byteLength)throw new Error(`(bson size ${n} + options.index ${p} must be <= buffer length ${o.byteLength})`);if(o[p+n-1]!==0)throw new Error("One object, sized correctly, with a spot for an EOO, but the EOO isn't 0x00");return a(o,p,c,h)}e.deserialize=f;function a(o,c,h,p=!1){let n=h.evalFunctions==null?!1:h.evalFunctions,w=h.cacheFunctions==null?!1:h.cacheFunctions,U=h.fieldsAsRaw==null?null:h.fieldsAsRaw,N=h.raw==null?!1:h.raw,Y=typeof h.bsonRegExp=="boolean"?h.bsonRegExp:!1,J=h.promoteBuffers==null?!1:h.promoteBuffers,R=h.promoteLongs==null?!0:h.promoteLongs,W=h.promoteValues==null?!0:h.promoteValues,x=c;if(o.length<5)throw new Error("corrupt bson message < 5 bytes long");let G=o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24;if(G<5||G>o.length)throw new Error("corrupt bson message");let M=p?[]:{},V=0,z=!1;for(;!z;){let A=o[c++];if(A===0)break;let O=c;for(;o[O]!==0&&O<o.length;)O++;if(O>=o.byteLength)throw new Error("Bad BSON Document: illegal CString");let i=p?V++:o.toString("utf8",c,O);if(c=O+1,A===I.BSON_DATA_STRING){let m=o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24;if(m<=0||m>o.length-c||o[c+m-1]!==0)throw new Error("bad string length in bson");if(!Vt.validateUtf8(o,c,c+m-1))throw new Error("Invalid UTF-8 string in BSON document");let D=o.toString("utf8",c,c+m-1);M[i]=D,c=c+m}else if(A===I.BSON_DATA_OID){let m=C.Buffer.alloc(12);o.copy(m,0,c,c+12),M[i]=new St.ObjectId(m),c=c+12}else if(A===I.BSON_DATA_INT&&W===!1)M[i]=new Dt.Int32(o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24);else if(A===I.BSON_DATA_INT)M[i]=o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24;else if(A===I.BSON_DATA_NUMBER&&W===!1)M[i]=new It.Double(o.readDoubleLE(c)),c=c+8;else if(A===I.BSON_DATA_NUMBER)M[i]=o.readDoubleLE(c),c=c+8;else if(A===I.BSON_DATA_DATE){let m=o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24,D=o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24;M[i]=new Date(new K.Long(m,D).toNumber())}else if(A===I.BSON_DATA_BOOLEAN){if(o[c]!==0&&o[c]!==1)throw new Error("illegal boolean type value");M[i]=o[c++]===1}else if(A===I.BSON_DATA_OBJECT){let m=c,D=o[c]|o[c+1]<<8|o[c+2]<<16|o[c+3]<<24;if(D<=0||D>o.length-c)throw new Error("bad embedded document length in bson");N?M[i]=o.slice(c,c+D):M[i]=a(o,m,h,!1),c=c+D}else if(A===I.BSON_DATA_ARRAY){let m=c,D=o[c]|o[c+1]<<8|o[c+2]<<16|o[c+3]<<24,j=h,F=c+D;if(U&&U[i]){j={};for(let g in h)j[g]=h[g];j.raw=!0}if(M[i]=a(o,m,j,!0),c=c+D,o[c-1]!==0)throw new Error("invalid array terminator byte");if(c!==F)throw new Error("corrupted array bson")}else if(A===I.BSON_DATA_UNDEFINED)M[i]=void 0;else if(A===I.BSON_DATA_NULL)M[i]=null;else if(A===I.BSON_DATA_LONG){let m=o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24,D=o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24,j=new K.Long(m,D);R&&W===!0?M[i]=j.lessThanOrEqual(y)&&j.greaterThanOrEqual(b)?j.toNumber():j:M[i]=j}else if(A===I.BSON_DATA_DECIMAL128){let m=C.Buffer.alloc(16);o.copy(m,0,c,c+16),c=c+16;let D=new dt.Decimal128(m);"toObject"in D&&typeof D.toObject=="function"?M[i]=D.toObject():M[i]=D}else if(A===I.BSON_DATA_BINARY){let m=o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24,D=m,j=o[c++];if(m<0)throw new Error("Negative binary type element size found");if(m>o.byteLength)throw new Error("Binary type size larger than document size");if(o.slice!=null){if(j===_t.Binary.SUBTYPE_BYTE_ARRAY){if(m=o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24,m<0)throw new Error("Negative binary type element size found for subtype 0x02");if(m>D-4)throw new Error("Binary type with subtype 0x02 contains too long binary size");if(m<D-4)throw new Error("Binary type with subtype 0x02 contains too short binary size")}J&&W?M[i]=o.slice(c,c+m):M[i]=new _t.Binary(o.slice(c,c+m),j)}else{let F=C.Buffer.alloc(m);if(j===_t.Binary.SUBTYPE_BYTE_ARRAY){if(m=o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24,m<0)throw new Error("Negative binary type element size found for subtype 0x02");if(m>D-4)throw new Error("Binary type with subtype 0x02 contains too long binary size");if(m<D-4)throw new Error("Binary type with subtype 0x02 contains too short binary size")}for(O=0;O<m;O++)F[O]=o[c+O];J&&W?M[i]=F:M[i]=new _t.Binary(F,j)}c=c+m}else if(A===I.BSON_DATA_REGEXP&&Y===!1){for(O=c;o[O]!==0&&O<o.length;)O++;if(O>=o.length)throw new Error("Bad BSON Document: illegal CString");let m=o.toString("utf8",c,O);for(c=O+1,O=c;o[O]!==0&&O<o.length;)O++;if(O>=o.length)throw new Error("Bad BSON Document: illegal CString");let D=o.toString("utf8",c,O);c=O+1;let j=new Array(D.length);for(O=0;O<D.length;O++)switch(D[O]){case"m":j[O]="m";break;case"s":j[O]="g";break;case"i":j[O]="i";break}M[i]=new RegExp(m,j.join(""))}else if(A===I.BSON_DATA_REGEXP&&Y===!0){for(O=c;o[O]!==0&&O<o.length;)O++;if(O>=o.length)throw new Error("Bad BSON Document: illegal CString");let m=o.toString("utf8",c,O);for(c=O+1,O=c;o[O]!==0&&O<o.length;)O++;if(O>=o.length)throw new Error("Bad BSON Document: illegal CString");let D=o.toString("utf8",c,O);c=O+1,M[i]=new At.BSONRegExp(m,D)}else if(A===I.BSON_DATA_SYMBOL){let m=o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24;if(m<=0||m>o.length-c||o[c+m-1]!==0)throw new Error("bad string length in bson");let D=o.toString("utf8",c,c+m-1);M[i]=W?D:new Mt.BSONSymbol(D),c=c+m}else if(A===I.BSON_DATA_TIMESTAMP){let m=o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24,D=o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24;M[i]=new wt.Timestamp(m,D)}else if(A===I.BSON_DATA_MIN_KEY)M[i]=new Ut.MinKey;else if(A===I.BSON_DATA_MAX_KEY)M[i]=new Rt.MaxKey;else if(A===I.BSON_DATA_CODE){let m=o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24;if(m<=0||m>o.length-c||o[c+m-1]!==0)throw new Error("bad string length in bson");let D=o.toString("utf8",c,c+m-1);n?w?M[i]=E(D,l,M):M[i]=E(D):M[i]=new Et.Code(D),c=c+m}else if(A===I.BSON_DATA_CODE_W_SCOPE){let m=o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24;if(m<4+4+4+1)throw new Error("code_w_scope total size shorter minimum expected length");let D=o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24;if(D<=0||D>o.length-c||o[c+D-1]!==0)throw new Error("bad string length in bson");let j=o.toString("utf8",c,c+D-1);c=c+D;let F=c,g=o[c]|o[c+1]<<8|o[c+2]<<16|o[c+3]<<24,$=a(o,F,h,!1);if(c=c+g,m<4+4+g+D)throw new Error("code_w_scope total size is too short, truncating scope");if(m>4+4+g+D)throw new Error("code_w_scope total size is too long, clips outer document");n?(w?M[i]=E(j,l,M):M[i]=E(j),M[i].scope=$):M[i]=new Et.Code(j,$)}else if(A===I.BSON_DATA_DBPOINTER){let m=o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24;if(m<=0||m>o.length-c||o[c+m-1]!==0)throw new Error("bad string length in bson");if(!Vt.validateUtf8(o,c,c+m-1))throw new Error("Invalid UTF-8 string in BSON document");let D=o.toString("utf8",c,c+m-1);c=c+m;let j=C.Buffer.alloc(12);o.copy(j,0,c,c+12);let F=new St.ObjectId(j);c=c+12,M[i]=new Nt.DBRef(D,F)}else throw new Error("Detected unknown BSON type "+A.toString(16)+' for fieldname "'+i+'"')}if(G!==c-x)throw p?new Error("corrupt array bson"):new Error("corrupt object bson");let Z=Object.keys(M).filter(A=>A.startsWith("$")),s=!0;if(Z.forEach(A=>{["$ref","$id","$db"].indexOf(A)===-1&&(s=!1)}),!s)return M;if(Nt.isDBRefLike(M)){let A=Object.assign({},M);return delete A.$ref,delete A.$id,delete A.$db,new Nt.DBRef(M.$ref,M.$id,M.$db,A)}return M}function E(o,c,h){return c?(c[o]==null&&(c[o]=new Function(o)),c[o].bind(h)):new Function(o)}});st(Zt);var Cn=Zt.deserialize,Yt=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.EJSON=e.isBSONType=void 0;function y(N){return rt.isObjectLike(N)&&Reflect.has(N,"_bsontype")&&typeof N._bsontype=="string"}e.isBSONType=y;let b=2147483647,l=-2147483648,f=9223372036854776e3,a=-9223372036854776e3,E={$oid:St.ObjectId,$binary:_t.Binary,$uuid:_t.Binary,$symbol:Mt.BSONSymbol,$numberInt:Dt.Int32,$numberDecimal:dt.Decimal128,$numberDouble:It.Double,$numberLong:K.Long,$minKey:Ut.MinKey,$maxKey:Rt.MaxKey,$regex:At.BSONRegExp,$regularExpression:At.BSONRegExp,$timestamp:wt.Timestamp};function o(N,Y={}){if(typeof N=="number"){if(Y.relaxed||Y.legacy)return N;if(Math.floor(N)===N){if(N>=l&&N<=b)return new Dt.Int32(N);if(N>=a&&N<=f)return K.Long.fromNumber(N)}return new It.Double(N)}if(N==null||typeof N!="object")return N;if(N.$undefined)return null;let J=Object.keys(N).filter(R=>R.startsWith("$")&&N[R]!=null);for(let R=0;R<J.length;R++){let W=E[J[R]];if(W)return W.fromExtendedJSON(N,Y)}if(N.$date!=null){let R=N.$date,W=new Date;return Y.legacy?typeof R=="number"?W.setTime(R):typeof R=="string"&&W.setTime(Date.parse(R)):typeof R=="string"?W.setTime(Date.parse(R)):K.Long.isLong(R)?W.setTime(R.toNumber()):typeof R=="number"&&Y.relaxed&&W.setTime(R),W}if(N.$code!=null){let R=Object.assign({},N);return N.$scope&&(R.$scope=o(N.$scope)),Et.Code.fromExtendedJSON(N)}if(N.$ref!=null||N.$dbPointer!=null){let R=N.$ref?N:N.$dbPointer;if(R instanceof Nt.DBRef)return R;let W=Object.keys(R).filter(G=>G.startsWith("$")),x=!0;if(W.forEach(G=>{["$ref","$id","$db"].indexOf(G)===-1&&(x=!1)}),x)return Nt.DBRef.fromExtendedJSON(R)}return N}function c(N,Y){return N.map(J=>p(J,Y))}function h(N){let Y=N.toISOString();return N.getUTCMilliseconds()!==0?Y:Y.slice(0,-5)+"Z"}function p(N,Y){if(Array.isArray(N))return c(N,Y);if(N===void 0)return null;if(N instanceof Date){let J=N.getTime(),R=J>-1&&J<2534023188e5;return Y.legacy?Y.relaxed&&R?{$date:N.getTime()}:{$date:h(N)}:Y.relaxed&&R?{$date:h(N)}:{$date:{$numberLong:N.getTime().toString()}}}if(typeof N=="number"&&!Y.relaxed){if(Math.floor(N)===N){let J=N>=l&&N<=b,R=N>=a&&N<=f;if(J)return{$numberInt:N.toString()};if(R)return{$numberLong:N.toString()}}return{$numberDouble:N.toString()}}if(N instanceof RegExp){let J=N.flags;if(J===void 0){let W=N.toString().match(/[gimuy]*$/);W&&(J=W[0])}return new At.BSONRegExp(N.source,J).toExtendedJSON(Y)}return N!=null&&typeof N=="object"?w(N,Y):N}let n={Binary:N=>new _t.Binary(N.value(),N.sub_type),Code:N=>new Et.Code(N.code,N.scope),DBRef:N=>new Nt.DBRef(N.collection||N.namespace,N.oid,N.db,N.fields),Decimal128:N=>new dt.Decimal128(N.bytes),Double:N=>new It.Double(N.value),Int32:N=>new Dt.Int32(N.value),Long:N=>K.Long.fromBits(N.low!=null?N.low:N.low_,N.low!=null?N.high:N.high_,N.low!=null?N.unsigned:N.unsigned_),MaxKey:()=>new Rt.MaxKey,MinKey:()=>new Ut.MinKey,ObjectID:N=>new St.ObjectId(N),ObjectId:N=>new St.ObjectId(N),BSONRegExp:N=>new At.BSONRegExp(N.pattern,N.options),Symbol:N=>new Mt.BSONSymbol(N.value),Timestamp:N=>wt.Timestamp.fromBits(N.low,N.high)};function w(N,Y){if(N==null||typeof N!="object")throw new Error("not an object instance");let J=N._bsontype;if(typeof J>"u"){let R={};for(let W in N)R[W]=p(N[W],Y);return R}else if(y(N)){let R=N;if(typeof R.toExtendedJSON!="function"){let W=n[N._bsontype];if(!W)throw new TypeError("Unrecognized or invalid _bsontype: "+N._bsontype);R=W(R)}return J==="Code"&&R.scope?R=new Et.Code(R.code,p(R.scope,Y)):J==="DBRef"&&R.oid&&(R=new Nt.DBRef(R.collection,p(R.oid,Y),R.db,R.fields)),R.toExtendedJSON(Y)}else throw new Error("_bsontype must be a string, but was: "+typeof J)}var U;(function(N){function Y(x,G){let M=Object.assign({},{relaxed:!0,legacy:!1},G);return typeof M.relaxed=="boolean"&&(M.strict=!M.relaxed),typeof M.strict=="boolean"&&(M.relaxed=!M.strict),JSON.parse(x,(V,z)=>o(z,M))}N.parse=Y;function J(x,G,M,V){M!=null&&typeof M=="object"&&(V=M,M=0),G!=null&&typeof G=="object"&&!Array.isArray(G)&&(V=G,G=void 0,M=0),V=Object.assign({},{relaxed:!0,legacy:!1},V);let z=p(x,V);return JSON.stringify(z,G,M)}N.stringify=J;function R(x,G){return G=G||{},JSON.parse(J(x,G))}N.serialize=R;function W(x,G){return G=G||{},Y(JSON.stringify(x),G)}N.deserialize=W})(U=e.EJSON||(e.EJSON={}))});st(Yt);var zn=Yt.EJSON,Jn=Yt.isBSONType,jt=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.writeIEEE754=e.readIEEE754=void 0;function y(l,f,a,E,o){let c,h,p=a==="big",n=o*8-E-1,w=(1<<n)-1,U=w>>1,N=-7,Y=p?0:o-1,J=p?1:-1,R=l[f+Y];for(Y+=J,c=R&(1<<-N)-1,R>>=-N,N+=n;N>0;c=c*256+l[f+Y],Y+=J,N-=8);for(h=c&(1<<-N)-1,c>>=-N,N+=E;N>0;h=h*256+l[f+Y],Y+=J,N-=8);if(c===0)c=1-U;else{if(c===w)return h?NaN:(R?-1:1)*(1/0);h=h+Math.pow(2,E),c=c-U}return(R?-1:1)*h*Math.pow(2,c-E)}e.readIEEE754=y;function b(l,f,a,E,o,c){let h,p,n,w=E==="big",U=c*8-o-1,N=(1<<U)-1,Y=N>>1,J=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,R=w?c-1:0,W=w?-1:1,x=f<0||f===0&&1/f<0?1:0;for(f=Math.abs(f),isNaN(f)||f===1/0?(p=isNaN(f)?1:0,h=N):(h=Math.floor(Math.log(f)/Math.LN2),f*(n=Math.pow(2,-h))<1&&(h--,n*=2),h+Y>=1?f+=J/n:f+=J*Math.pow(2,1-Y),f*n>=2&&(h++,n/=2),h+Y>=N?(p=0,h=N):h+Y>=1?(p=(f*n-1)*Math.pow(2,o),h=h+Y):(p=f*Math.pow(2,Y-1)*Math.pow(2,o),h=0)),isNaN(f)&&(p=0);o>=8;)l[a+R]=p&255,R+=W,p/=256,o-=8;for(h=h<<o|p,isNaN(f)&&(h+=8),U+=o;U>0;)l[a+R]=h&255,R+=W,h/=256,U-=8;l[a+R-W]|=x*128}e.writeIEEE754=b});st(jt);var Wn=jt.writeIEEE754,Xn=jt.readIEEE754,qt=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeInto=void 0;let y=/\x00/,b=new Set(["$db","$ref","$id","$clusterTime"]);function l(s){return Object.prototype.toString.call(s)==="[object RegExp]"}function f(s,A,O,i,m){s[i++]=I.BSON_DATA_STRING;let D=m?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");i=i+D+1,s[i-1]=0;let j=s.write(O,i+4,void 0,"utf8");return s[i+3]=j+1>>24&255,s[i+2]=j+1>>16&255,s[i+1]=j+1>>8&255,s[i]=j+1&255,i=i+4+j,s[i++]=0,i}function a(s,A,O,i,m){if(Number.isInteger(O)&&O>=I.BSON_INT32_MIN&&O<=I.BSON_INT32_MAX){s[i++]=I.BSON_DATA_INT;let D=m?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");i=i+D,s[i++]=0,s[i++]=O&255,s[i++]=O>>8&255,s[i++]=O>>16&255,s[i++]=O>>24&255}else{s[i++]=I.BSON_DATA_NUMBER;let D=m?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");i=i+D,s[i++]=0,jt.writeIEEE754(s,O,i,"little",52,8),i=i+8}return i}function E(s,A,O,i,m){s[i++]=I.BSON_DATA_NULL;let D=m?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");return i=i+D,s[i++]=0,i}function o(s,A,O,i,m){s[i++]=I.BSON_DATA_BOOLEAN;let D=m?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");return i=i+D,s[i++]=0,s[i++]=O?1:0,i}function c(s,A,O,i,m){s[i++]=I.BSON_DATA_DATE;let D=m?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");i=i+D,s[i++]=0;let j=K.Long.fromNumber(O.getTime()),F=j.getLowBits(),g=j.getHighBits();return s[i++]=F&255,s[i++]=F>>8&255,s[i++]=F>>16&255,s[i++]=F>>24&255,s[i++]=g&255,s[i++]=g>>8&255,s[i++]=g>>16&255,s[i++]=g>>24&255,i}function h(s,A,O,i,m){s[i++]=I.BSON_DATA_REGEXP;let D=m?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");if(i=i+D,s[i++]=0,O.source&&O.source.match(y)!=null)throw Error("value "+O.source+" must not contain null bytes");return i=i+s.write(O.source,i,void 0,"utf8"),s[i++]=0,O.ignoreCase&&(s[i++]=105),O.global&&(s[i++]=115),O.multiline&&(s[i++]=109),s[i++]=0,i}function p(s,A,O,i,m){s[i++]=I.BSON_DATA_REGEXP;let D=m?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");if(i=i+D,s[i++]=0,O.pattern.match(y)!=null)throw Error("pattern "+O.pattern+" must not contain null bytes");return i=i+s.write(O.pattern,i,void 0,"utf8"),s[i++]=0,i=i+s.write(O.options.split("").sort().join(""),i,void 0,"utf8"),s[i++]=0,i}function n(s,A,O,i,m){O===null?s[i++]=I.BSON_DATA_NULL:O._bsontype==="MinKey"?s[i++]=I.BSON_DATA_MIN_KEY:s[i++]=I.BSON_DATA_MAX_KEY;let D=m?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");return i=i+D,s[i++]=0,i}function w(s,A,O,i,m){s[i++]=I.BSON_DATA_OID;let D=m?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");if(i=i+D,s[i++]=0,typeof O.id=="string")s.write(O.id,i,void 0,"binary");else if(O.id&&O.id.copy)O.id.copy(s,i,0,12);else throw new TypeError("object ["+JSON.stringify(O)+"] is not a valid ObjectId");return i+12}function U(s,A,O,i,m){s[i++]=I.BSON_DATA_BINARY;let D=m?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");i=i+D,s[i++]=0;let j=O.length;return s[i++]=j&255,s[i++]=j>>8&255,s[i++]=j>>16&255,s[i++]=j>>24&255,s[i++]=I.BSON_BINARY_SUBTYPE_DEFAULT,s.set(mt.ensureBuffer(O),i),i=i+j,i}function N(s,A,O,i,m=!1,D=0,j=!1,F=!0,g=!1,$=[]){for(let d=0;d<$.length;d++)if($[d]===O)throw new Error("cyclic dependency detected");$.push(O),s[i++]=Array.isArray(O)?I.BSON_DATA_ARRAY:I.BSON_DATA_OBJECT;let L=g?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");i=i+L,s[i++]=0;let T=Z(s,O,m,i,D+1,j,F,$);return $.pop(),T}function Y(s,A,O,i,m){s[i++]=I.BSON_DATA_DECIMAL128;let D=m?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");return i=i+D,s[i++]=0,O.bytes.copy(s,i,0,16),i+16}function J(s,A,O,i,m){s[i++]=O._bsontype==="Long"?I.BSON_DATA_LONG:I.BSON_DATA_TIMESTAMP;let D=m?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");i=i+D,s[i++]=0;let j=O.getLowBits(),F=O.getHighBits();return s[i++]=j&255,s[i++]=j>>8&255,s[i++]=j>>16&255,s[i++]=j>>24&255,s[i++]=F&255,s[i++]=F>>8&255,s[i++]=F>>16&255,s[i++]=F>>24&255,i}function R(s,A,O,i,m){O=O.valueOf(),s[i++]=I.BSON_DATA_INT;let D=m?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");return i=i+D,s[i++]=0,s[i++]=O&255,s[i++]=O>>8&255,s[i++]=O>>16&255,s[i++]=O>>24&255,i}function W(s,A,O,i,m){s[i++]=I.BSON_DATA_NUMBER;let D=m?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");return i=i+D,s[i++]=0,jt.writeIEEE754(s,O.value,i,"little",52,8),i=i+8,i}function x(s,A,O,i,m=!1,D=0,j){s[i++]=I.BSON_DATA_CODE;let F=j?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");i=i+F,s[i++]=0;let g=rt.normalizedFunctionString(O),$=s.write(g,i+4,void 0,"utf8")+1;return s[i]=$&255,s[i+1]=$>>8&255,s[i+2]=$>>16&255,s[i+3]=$>>24&255,i=i+4+$-1,s[i++]=0,i}function G(s,A,O,i,m=!1,D=0,j=!1,F=!0,g=!1){if(O.scope&&typeof O.scope=="object"){s[i++]=I.BSON_DATA_CODE_W_SCOPE;let $=g?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");i=i+$,s[i++]=0;let L=i,T=typeof O.code=="string"?O.code:O.code.toString();i=i+4;let d=s.write(T,i+4,void 0,"utf8")+1;s[i]=d&255,s[i+1]=d>>8&255,s[i+2]=d>>16&255,s[i+3]=d>>24&255,s[i+4+d-1]=0,i=i+d+4;let q=Z(s,O.scope,m,i,D+1,j,F);i=q-1;let X=q-L;s[L++]=X&255,s[L++]=X>>8&255,s[L++]=X>>16&255,s[L++]=X>>24&255,s[i++]=0}else{s[i++]=I.BSON_DATA_CODE;let $=g?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");i=i+$,s[i++]=0;let L=O.code.toString(),T=s.write(L,i+4,void 0,"utf8")+1;s[i]=T&255,s[i+1]=T>>8&255,s[i+2]=T>>16&255,s[i+3]=T>>24&255,i=i+4+T-1,s[i++]=0}return i}function M(s,A,O,i,m){s[i++]=I.BSON_DATA_BINARY;let D=m?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");i=i+D,s[i++]=0;let j=O.value(!0),F=O.position;return O.sub_type===_t.Binary.SUBTYPE_BYTE_ARRAY&&(F=F+4),s[i++]=F&255,s[i++]=F>>8&255,s[i++]=F>>16&255,s[i++]=F>>24&255,s[i++]=O.sub_type,O.sub_type===_t.Binary.SUBTYPE_BYTE_ARRAY&&(F=F-4,s[i++]=F&255,s[i++]=F>>8&255,s[i++]=F>>16&255,s[i++]=F>>24&255),s.set(j,i),i=i+O.position,i}function V(s,A,O,i,m){s[i++]=I.BSON_DATA_SYMBOL;let D=m?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");i=i+D,s[i++]=0;let j=s.write(O.value,i+4,void 0,"utf8")+1;return s[i]=j&255,s[i+1]=j>>8&255,s[i+2]=j>>16&255,s[i+3]=j>>24&255,i=i+4+j-1,s[i++]=0,i}function z(s,A,O,i,m,D,j){s[i++]=I.BSON_DATA_OBJECT;let F=j?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");i=i+F,s[i++]=0;let g=i,$={$ref:O.collection||O.namespace,$id:O.oid};O.db!=null&&($.$db=O.db),$=Object.assign($,O.fields);let L=Z(s,$,!1,i,m+1,D),T=L-g;return s[g++]=T&255,s[g++]=T>>8&255,s[g++]=T>>16&255,s[g++]=T>>24&255,L}function Z(s,A,O=!1,i=0,m=0,D=!1,j=!0,F=[]){i=i||0,F=F||[],F.push(A);let g=i+4;if(Array.isArray(A))for(let L=0;L<A.length;L++){let T=""+L,d=A[L];if(d&&d.toBSON){if(typeof d.toBSON!="function")throw new TypeError("toBSON is not a function");d=d.toBSON()}if(typeof d=="string")g=f(s,T,d,g,!0);else if(typeof d=="number")g=a(s,T,d,g,!0);else{if(typeof d=="bigint")throw new TypeError("Unsupported type BigInt, please use Decimal128");if(typeof d=="boolean")g=o(s,T,d,g,!0);else if(d instanceof Date||rt.isDate(d))g=c(s,T,d,g,!0);else if(d===void 0)g=E(s,T,d,g,!0);else if(d===null)g=E(s,T,d,g,!0);else if(d._bsontype==="ObjectId"||d._bsontype==="ObjectID")g=w(s,T,d,g,!0);else if(C.Buffer.isBuffer(d)||rt.isUint8Array(d))g=U(s,T,d,g,!0);else if(d instanceof RegExp||l(d))g=h(s,T,d,g,!0);else if(typeof d=="object"&&d._bsontype==null)g=N(s,T,d,g,O,m,D,j,!0,F);else if(typeof d=="object"&&Yt.isBSONType(d)&&d._bsontype==="Decimal128")g=Y(s,T,d,g,!0);else if(d._bsontype==="Long"||d._bsontype==="Timestamp")g=J(s,T,d,g,!0);else if(d._bsontype==="Double")g=W(s,T,d,g,!0);else if(typeof d=="function"&&D)g=x(s,T,d,g,O,m,!0);else if(d._bsontype==="Code")g=G(s,T,d,g,O,m,D,j,!0);else if(d._bsontype==="Binary")g=M(s,T,d,g,!0);else if(d._bsontype==="Symbol")g=V(s,T,d,g,!0);else if(d._bsontype==="DBRef")g=z(s,T,d,g,m,D,!0);else if(d._bsontype==="BSONRegExp")g=p(s,T,d,g,!0);else if(d._bsontype==="Int32")g=R(s,T,d,g,!0);else if(d._bsontype==="MinKey"||d._bsontype==="MaxKey")g=n(s,T,d,g,!0);else if(typeof d._bsontype<"u")throw new TypeError("Unrecognized or invalid _bsontype: "+d._bsontype)}}else if(A instanceof $t.Map){let L=A.entries(),T=!1;for(;!T;){let d=L.next();if(T=!!d.done,T)continue;let q=d.value[0],X=d.value[1],et=typeof X;if(typeof q=="string"&&!b.has(q)){if(q.match(y)!=null)throw Error("key "+q+" must not contain null bytes");if(O){if(q[0]==="$")throw Error("key "+q+" must not start with '$'");if(~q.indexOf("."))throw Error("key "+q+" must not contain '.'")}}if(et==="string")g=f(s,q,X,g);else if(et==="number")g=a(s,q,X,g);else{if(et==="bigint"||rt.isBigInt64Array(X)||rt.isBigUInt64Array(X))throw new TypeError("Unsupported type BigInt, please use Decimal128");if(et==="boolean")g=o(s,q,X,g);else if(X instanceof Date||rt.isDate(X))g=c(s,q,X,g);else if(X===null||X===void 0&&j===!1)g=E(s,q,X,g);else if(X._bsontype==="ObjectId"||X._bsontype==="ObjectID")g=w(s,q,X,g);else if(C.Buffer.isBuffer(X)||rt.isUint8Array(X))g=U(s,q,X,g);else if(X instanceof RegExp||l(X))g=h(s,q,X,g);else if(et==="object"&&X._bsontype==null)g=N(s,q,X,g,O,m,D,j,!1,F);else if(et==="object"&&X._bsontype==="Decimal128")g=Y(s,q,X,g);else if(X._bsontype==="Long"||X._bsontype==="Timestamp")g=J(s,q,X,g);else if(X._bsontype==="Double")g=W(s,q,X,g);else if(X._bsontype==="Code")g=G(s,q,X,g,O,m,D,j);else if(typeof X=="function"&&D)g=x(s,q,X,g,O,m,D);else if(X._bsontype==="Binary")g=M(s,q,X,g);else if(X._bsontype==="Symbol")g=V(s,q,X,g);else if(X._bsontype==="DBRef")g=z(s,q,X,g,m,D);else if(X._bsontype==="BSONRegExp")g=p(s,q,X,g);else if(X._bsontype==="Int32")g=R(s,q,X,g);else if(X._bsontype==="MinKey"||X._bsontype==="MaxKey")g=n(s,q,X,g);else if(typeof X._bsontype<"u")throw new TypeError("Unrecognized or invalid _bsontype: "+X._bsontype)}}}else{if(A.toBSON){if(typeof A.toBSON!="function")throw new TypeError("toBSON is not a function");if(A=A.toBSON(),A!=null&&typeof A!="object")throw new TypeError("toBSON function did not return an object")}for(let L in A){let T=A[L];if(T&&T.toBSON){if(typeof T.toBSON!="function")throw new TypeError("toBSON is not a function");T=T.toBSON()}let d=typeof T;if(typeof L=="string"&&!b.has(L)){if(L.match(y)!=null)throw Error("key "+L+" must not contain null bytes");if(O){if(L[0]==="$")throw Error("key "+L+" must not start with '$'");if(~L.indexOf("."))throw Error("key "+L+" must not contain '.'")}}if(d==="string")g=f(s,L,T,g);else if(d==="number")g=a(s,L,T,g);else{if(d==="bigint")throw new TypeError("Unsupported type BigInt, please use Decimal128");if(d==="boolean")g=o(s,L,T,g);else if(T instanceof Date||rt.isDate(T))g=c(s,L,T,g);else if(T===void 0)j===!1&&(g=E(s,L,T,g));else if(T===null)g=E(s,L,T,g);else if(T._bsontype==="ObjectId"||T._bsontype==="ObjectID")g=w(s,L,T,g);else if(C.Buffer.isBuffer(T)||rt.isUint8Array(T))g=U(s,L,T,g);else if(T instanceof RegExp||l(T))g=h(s,L,T,g);else if(d==="object"&&T._bsontype==null)g=N(s,L,T,g,O,m,D,j,!1,F);else if(d==="object"&&T._bsontype==="Decimal128")g=Y(s,L,T,g);else if(T._bsontype==="Long"||T._bsontype==="Timestamp")g=J(s,L,T,g);else if(T._bsontype==="Double")g=W(s,L,T,g);else if(T._bsontype==="Code")g=G(s,L,T,g,O,m,D,j);else if(typeof T=="function"&&D)g=x(s,L,T,g,O,m,D);else if(T._bsontype==="Binary")g=M(s,L,T,g);else if(T._bsontype==="Symbol")g=V(s,L,T,g);else if(T._bsontype==="DBRef")g=z(s,L,T,g,m,D);else if(T._bsontype==="BSONRegExp")g=p(s,L,T,g);else if(T._bsontype==="Int32")g=R(s,L,T,g);else if(T._bsontype==="MinKey"||T._bsontype==="MaxKey")g=n(s,L,T,g);else if(typeof T._bsontype<"u")throw new TypeError("Unrecognized or invalid _bsontype: "+T._bsontype)}}}F.pop(),s[g++]=0;let $=g-i;return s[i++]=$&255,s[i++]=$>>8&255,s[i++]=$>>16&255,s[i++]=$>>24&255,g}e.serializeInto=Z});st(qt);var kn=qt.serializeInto,H=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.deserializeStream=e.calculateObjectSize=e.deserialize=e.serializeWithBufferAndIndex=e.serialize=e.setInternalBufferSize=e.ObjectID=e.Decimal128=e.BSONRegExp=e.MaxKey=e.MinKey=e.Int32=e.Double=e.Timestamp=e.Long=e.ObjectId=e.Binary=e.DBRef=e.BSONSymbol=e.Map=e.Code=e.LongWithoutOverridesClass=e.EJSON=e.JS_INT_MIN=e.JS_INT_MAX=e.BSON_INT64_MIN=e.BSON_INT64_MAX=e.BSON_INT32_MIN=e.BSON_INT32_MAX=e.BSON_DATA_UNDEFINED=e.BSON_DATA_TIMESTAMP=e.BSON_DATA_SYMBOL=e.BSON_DATA_STRING=e.BSON_DATA_REGEXP=e.BSON_DATA_OID=e.BSON_DATA_OBJECT=e.BSON_DATA_NUMBER=e.BSON_DATA_NULL=e.BSON_DATA_MIN_KEY=e.BSON_DATA_MAX_KEY=e.BSON_DATA_LONG=e.BSON_DATA_INT=e.BSON_DATA_DECIMAL128=e.BSON_DATA_DBPOINTER=e.BSON_DATA_DATE=e.BSON_DATA_CODE_W_SCOPE=e.BSON_DATA_CODE=e.BSON_DATA_BOOLEAN=e.BSON_DATA_BINARY=e.BSON_DATA_ARRAY=e.BSON_BINARY_SUBTYPE_UUID_NEW=e.BSON_BINARY_SUBTYPE_UUID=e.BSON_BINARY_SUBTYPE_USER_DEFINED=e.BSON_BINARY_SUBTYPE_MD5=e.BSON_BINARY_SUBTYPE_FUNCTION=e.BSON_BINARY_SUBTYPE_DEFAULT=e.BSON_BINARY_SUBTYPE_BYTE_ARRAY=void 0,Object.defineProperty(e,"Binary",{enumerable:!0,get:function(){return _t.Binary}}),Object.defineProperty(e,"Code",{enumerable:!0,get:function(){return Et.Code}}),Object.defineProperty(e,"DBRef",{enumerable:!0,get:function(){return Nt.DBRef}}),Object.defineProperty(e,"Decimal128",{enumerable:!0,get:function(){return dt.Decimal128}}),Object.defineProperty(e,"Double",{enumerable:!0,get:function(){return It.Double}}),Object.defineProperty(e,"Int32",{enumerable:!0,get:function(){return Dt.Int32}}),Object.defineProperty(e,"Long",{enumerable:!0,get:function(){return K.Long}}),Object.defineProperty(e,"Map",{enumerable:!0,get:function(){return $t.Map}}),Object.defineProperty(e,"MaxKey",{enumerable:!0,get:function(){return Rt.MaxKey}}),Object.defineProperty(e,"MinKey",{enumerable:!0,get:function(){return Ut.MinKey}}),Object.defineProperty(e,"ObjectId",{enumerable:!0,get:function(){return St.ObjectId}}),Object.defineProperty(e,"ObjectID",{enumerable:!0,get:function(){return St.ObjectId}}),Object.defineProperty(e,"BSONRegExp",{enumerable:!0,get:function(){return At.BSONRegExp}}),Object.defineProperty(e,"BSONSymbol",{enumerable:!0,get:function(){return Mt.BSONSymbol}}),Object.defineProperty(e,"Timestamp",{enumerable:!0,get:function(){return wt.Timestamp}}),Object.defineProperty(e,"BSON_BINARY_SUBTYPE_BYTE_ARRAY",{enumerable:!0,get:function(){return I.BSON_BINARY_SUBTYPE_BYTE_ARRAY}}),Object.defineProperty(e,"BSON_BINARY_SUBTYPE_DEFAULT",{enumerable:!0,get:function(){return I.BSON_BINARY_SUBTYPE_DEFAULT}}),Object.defineProperty(e,"BSON_BINARY_SUBTYPE_FUNCTION",{enumerable:!0,get:function(){return I.BSON_BINARY_SUBTYPE_FUNCTION}}),Object.defineProperty(e,"BSON_BINARY_SUBTYPE_MD5",{enumerable:!0,get:function(){return I.BSON_BINARY_SUBTYPE_MD5}}),Object.defineProperty(e,"BSON_BINARY_SUBTYPE_USER_DEFINED",{enumerable:!0,get:function(){return I.BSON_BINARY_SUBTYPE_USER_DEFINED}}),Object.defineProperty(e,"BSON_BINARY_SUBTYPE_UUID",{enumerable:!0,get:function(){return I.BSON_BINARY_SUBTYPE_UUID}}),Object.defineProperty(e,"BSON_BINARY_SUBTYPE_UUID_NEW",{enumerable:!0,get:function(){return I.BSON_BINARY_SUBTYPE_UUID_NEW}}),Object.defineProperty(e,"BSON_DATA_ARRAY",{enumerable:!0,get:function(){return I.BSON_DATA_ARRAY}}),Object.defineProperty(e,"BSON_DATA_BINARY",{enumerable:!0,get:function(){return I.BSON_DATA_BINARY}}),Object.defineProperty(e,"BSON_DATA_BOOLEAN",{enumerable:!0,get:function(){return I.BSON_DATA_BOOLEAN}}),Object.defineProperty(e,"BSON_DATA_CODE",{enumerable:!0,get:function(){return I.BSON_DATA_CODE}}),Object.defineProperty(e,"BSON_DATA_CODE_W_SCOPE",{enumerable:!0,get:function(){return I.BSON_DATA_CODE_W_SCOPE}}),Object.defineProperty(e,"BSON_DATA_DATE",{enumerable:!0,get:function(){return I.BSON_DATA_DATE}}),Object.defineProperty(e,"BSON_DATA_DBPOINTER",{enumerable:!0,get:function(){return I.BSON_DATA_DBPOINTER}}),Object.defineProperty(e,"BSON_DATA_DECIMAL128",{enumerable:!0,get:function(){return I.BSON_DATA_DECIMAL128}}),Object.defineProperty(e,"BSON_DATA_INT",{enumerable:!0,get:function(){return I.BSON_DATA_INT}}),Object.defineProperty(e,"BSON_DATA_LONG",{enumerable:!0,get:function(){return I.BSON_DATA_LONG}}),Object.defineProperty(e,"BSON_DATA_MAX_KEY",{enumerable:!0,get:function(){return I.BSON_DATA_MAX_KEY}}),Object.defineProperty(e,"BSON_DATA_MIN_KEY",{enumerable:!0,get:function(){return I.BSON_DATA_MIN_KEY}}),Object.defineProperty(e,"BSON_DATA_NULL",{enumerable:!0,get:function(){return I.BSON_DATA_NULL}}),Object.defineProperty(e,"BSON_DATA_NUMBER",{enumerable:!0,get:function(){return I.BSON_DATA_NUMBER}}),Object.defineProperty(e,"BSON_DATA_OBJECT",{enumerable:!0,get:function(){return I.BSON_DATA_OBJECT}}),Object.defineProperty(e,"BSON_DATA_OID",{enumerable:!0,get:function(){return I.BSON_DATA_OID}}),Object.defineProperty(e,"BSON_DATA_REGEXP",{enumerable:!0,get:function(){return I.BSON_DATA_REGEXP}}),Object.defineProperty(e,"BSON_DATA_STRING",{enumerable:!0,get:function(){return I.BSON_DATA_STRING}}),Object.defineProperty(e,"BSON_DATA_SYMBOL",{enumerable:!0,get:function(){return I.BSON_DATA_SYMBOL}}),Object.defineProperty(e,"BSON_DATA_TIMESTAMP",{enumerable:!0,get:function(){return I.BSON_DATA_TIMESTAMP}}),Object.defineProperty(e,"BSON_DATA_UNDEFINED",{enumerable:!0,get:function(){return I.BSON_DATA_UNDEFINED}}),Object.defineProperty(e,"BSON_INT32_MAX",{enumerable:!0,get:function(){return I.BSON_INT32_MAX}}),Object.defineProperty(e,"BSON_INT32_MIN",{enumerable:!0,get:function(){return I.BSON_INT32_MIN}}),Object.defineProperty(e,"BSON_INT64_MAX",{enumerable:!0,get:function(){return I.BSON_INT64_MAX}}),Object.defineProperty(e,"BSON_INT64_MIN",{enumerable:!0,get:function(){return I.BSON_INT64_MIN}}),Object.defineProperty(e,"JS_INT_MAX",{enumerable:!0,get:function(){return I.JS_INT_MAX}}),Object.defineProperty(e,"JS_INT_MIN",{enumerable:!0,get:function(){return I.JS_INT_MIN}}),Object.defineProperty(e,"EJSON",{enumerable:!0,get:function(){return Yt.EJSON}});var y=wt;Object.defineProperty(e,"LongWithoutOverridesClass",{enumerable:!0,get:function(){return y.LongWithoutOverridesClass}});let b=1024*1024*17,l=C.Buffer.alloc(b);function f(p){l.length<p&&(l=C.Buffer.alloc(p))}e.setInternalBufferSize=f;function a(p,n={}){let w=typeof n.checkKeys=="boolean"?n.checkKeys:!1,U=typeof n.serializeFunctions=="boolean"?n.serializeFunctions:!1,N=typeof n.ignoreUndefined=="boolean"?n.ignoreUndefined:!0,Y=typeof n.minInternalBufferSize=="number"?n.minInternalBufferSize:b;l.length<Y&&(l=C.Buffer.alloc(Y));let J=qt.serializeInto(l,p,w,0,0,U,N,[]),R=C.Buffer.alloc(J);return l.copy(R,0,0,R.length),R}e.serialize=a;function E(p,n,w={}){let U=typeof w.checkKeys=="boolean"?w.checkKeys:!1,N=typeof w.serializeFunctions=="boolean"?w.serializeFunctions:!1,Y=typeof w.ignoreUndefined=="boolean"?w.ignoreUndefined:!0,J=typeof w.index=="number"?w.index:0,R=qt.serializeInto(l,p,U,0,0,N,Y);return l.copy(n,J,0,R),J+R-1}e.serializeWithBufferAndIndex=E;function o(p,n={}){return Zt.deserialize(mt.ensureBuffer(p),n)}e.deserialize=o;function c(p,n={}){n=n||{};let w=typeof n.serializeFunctions=="boolean"?n.serializeFunctions:!1,U=typeof n.ignoreUndefined=="boolean"?n.ignoreUndefined:!0;return ye.calculateObjectSize(p,w,U)}e.calculateObjectSize=c;function h(p,n,w,U,N,Y){let J=Object.assign({allowObjectSmallerThanBufferSize:!0,index:0},Y),R=mt.ensureBuffer(p),W=n;for(let x=0;x<w;x++){let G=R[W]|R[W+1]<<8|R[W+2]<<16|R[W+3]<<24;J.index=W,U[N+x]=Zt.deserialize(R,J),W=W+G}return W}e.deserializeStream=h}),Kn=st(H),Hn=H.deserializeStream,Gn=H.calculateObjectSize,be=H.deserialize,Vn=H.serializeWithBufferAndIndex,de=H.serialize,Zn=H.setInternalBufferSize,qn=H.ObjectID,Qn=H.Decimal128,xn=H.BSONRegExp,$n=H.MaxKey,ti=H.MinKey,ei=H.Int32,ri=H.Double,ni=H.Timestamp,ii=H.Long,oi=H.ObjectId,si=H.Binary,fi=H.DBRef,ui=H.BSONSymbol,ai=H.Map,li=H.Code,ci=H.LongWithoutOverridesClass,hi=H.EJSON,_i=H.JS_INT_MIN,yi=H.JS_INT_MAX,Bi=H.BSON_INT64_MIN,Ni=H.BSON_INT64_MAX,gi=H.BSON_INT32_MIN,pi=H.BSON_INT32_MAX,Oi=H.BSON_DATA_UNDEFINED,Si=H.BSON_DATA_TIMESTAMP,Ai=H.BSON_DATA_SYMBOL,Ei=H.BSON_DATA_STRING,mi=H.BSON_DATA_REGEXP,wi=H.BSON_DATA_OID,Ti=H.BSON_DATA_OBJECT,Ii=H.BSON_DATA_NUMBER,Di=H.BSON_DATA_NULL,bi=H.BSON_DATA_MIN_KEY,di=H.BSON_DATA_MAX_KEY,Ri=H.BSON_DATA_LONG,Ui=H.BSON_DATA_INT,Mi=H.BSON_DATA_DECIMAL128,Pi=H.BSON_DATA_DBPOINTER,ji=H.BSON_DATA_DATE,Yi=H.BSON_DATA_CODE_W_SCOPE,vi=H.BSON_DATA_CODE,Fi=H.BSON_DATA_BOOLEAN,Li=H.BSON_DATA_BINARY,Ci=H.BSON_DATA_ARRAY,zi=H.BSON_BINARY_SUBTYPE_UUID_NEW,Ji=H.BSON_BINARY_SUBTYPE_UUID,Wi=H.BSON_BINARY_SUBTYPE_USER_DEFINED,Xi=H.BSON_BINARY_SUBTYPE_MD5,ki=H.BSON_BINARY_SUBTYPE_FUNCTION,Ki=H.BSON_BINARY_SUBTYPE_DEFAULT,Hi=H.BSON_BINARY_SUBTYPE_BYTE_ARRAY;function Be(B,e){return be(new Uint8Array(B),e)}var gr="4.2.0",te={dataType:null,batchType:null,name:"BSON",id:"bson",module:"bson",version:gr,extensions:["bson"],mimeTypes:["application/bson"],category:"json",binary:!0,parse:pr,parseSync:Or,options:{bson:{}}};async function pr(B,e){let y={...te.options.bson,...e?.bson};return Be(B,y)}function Or(B,e){let y={...te.options.bson,...e?.bson};return Be(B,y)}function Ne(B,e){return de(B).buffer}var Sr="4.2.0",Ue={name:"BSON",id:"bson",module:"bson",version:Sr,extensions:["bson"],options:{bson:{}},async encode(B,e){return Ne(B,{})},encodeSync(B,e){return Ne(B,{})}};return ze(vt);})();
|
|
16
|
+
`)+" "+y[1]:y[0]+e+" "+B.join(", ")+" "+y[1]}function we(B){return Array.isArray(B)}function he(B){return typeof B=="boolean"}function Qt(B){return B===null}function ar(B){return B==null}function Te(B){return typeof B=="number"}function xt(B){return typeof B=="string"}function lr(B){return babelHelpers.typeof(B)==="symbol"}function pt(B){return B===void 0}function Xt(B){return Pt(B)&&_e(B)==="[object RegExp]"}function Pt(B){return babelHelpers.typeof(B)==="object"&&B!==null}function ae(B){return Pt(B)&&_e(B)==="[object Date]"}function kt(B){return Pt(B)&&(_e(B)==="[object Error]"||B instanceof Error)}function Kt(B){return typeof B=="function"}function cr(B){return B===null||typeof B=="boolean"||typeof B=="number"||typeof B=="string"||babelHelpers.typeof(B)==="symbol"||typeof B>"u"}function hr(B){return Buffer.isBuffer(B)}function _e(B){return Object.prototype.toString.call(B)}function se(B){return B<10?"0"+B.toString(10):B.toString(10)}var _r=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function yr(){var B=new Date,e=[se(B.getHours()),se(B.getMinutes()),se(B.getSeconds())].join(":");return[B.getDate(),_r[B.getMonth()],e].join(" ")}function Br(){console.log("%s - %s",yr(),ce.apply(null,arguments))}function Ie(B,e){if(!e||!Pt(e))return B;for(var y=Object.keys(e),b=y.length;b--;)B[y[b]]=e[y[b]];return B}function De(B,e){return Object.prototype.hasOwnProperty.call(B,e)}var Nr={inherits:tr,_extend:Ie,log:Br,isBuffer:hr,isPrimitive:cr,isFunction:Kt,isError:kt,isDate:ae,isObject:Pt,isRegExp:Xt,isUndefined:pt,isSymbol:lr,isString:xt,isNumber:Te,isNullOrUndefined:ar,isNull:Qt,isBoolean:he,isArray:we,inspect:Ot,deprecate:me,format:ce,debuglog:rr},rt=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.deprecate=e.isObjectLike=e.isDate=e.isBuffer=e.haveBuffer=e.isBigUInt64Array=e.isBigInt64Array=e.isUint8Array=e.randomBytes=e.normalizedFunctionString=void 0;function y(n){return n.toString().replace("function(","function (")}e.normalizedFunctionString=y;function b(n){let w=C.Buffer.alloc(n);for(let U=0;U<n;++U)w[U]=Math.floor(Math.random()*256);return w}if(e.randomBytes=b,typeof window<"u"&&window.crypto&&window.crypto.getRandomValues)e.randomBytes=n=>window.crypto.getRandomValues(C.Buffer.alloc(n));else{try{e.randomBytes=$e.randomBytes}catch{}e.randomBytes==null&&(e.randomBytes=b)}function l(n){return Object.prototype.toString.call(n)==="[object Uint8Array]"}e.isUint8Array=l;function f(n){return Object.prototype.toString.call(n)==="[object BigInt64Array]"}e.isBigInt64Array=f;function a(n){return Object.prototype.toString.call(n)==="[object BigUint64Array]"}e.isBigUInt64Array=a;function E(){return typeof Ht<"u"&&typeof Ht.Buffer<"u"}e.haveBuffer=E;function o(n){return E()&&C.Buffer.isBuffer(n)}e.isBuffer=o;function c(n){return h(n)&&Object.prototype.toString.call(n)==="[object Date]"}e.isDate=c;function h(n){return typeof n=="object"&&n!==null}e.isObjectLike=h;function p(n,w){if(typeof window>"u"||typeof self>"u")return Nr.deprecate(n,w);let U=!1;function N(...Y){return U||(console.warn(w),U=!0),n.apply(this,...Y)}return N}e.deprecate=p});st(rt);var Ur=rt.deprecate,Mr=rt.isObjectLike,Pr=rt.isDate,jr=rt.isBuffer,Yr=rt.haveBuffer,vr=rt.isBigUInt64Array,Fr=rt.isBigInt64Array,Lr=rt.isUint8Array,Cr=rt.randomBytes,zr=rt.normalizedFunctionString,Nt=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.DBRef=e.isDBRefLike=void 0;function y(l){return rt.isObjectLike(l)&&l.$id!=null&&l.$ref!=null}e.isDBRefLike=y;class b{constructor(f,a,E,o){let c=f.split(".");c.length===2&&(E=c.shift(),f=c.shift()),this.collection=f,this.oid=a,this.db=E,this.fields=o||{}}get namespace(){return this.collection}set namespace(f){this.collection=f}toJSON(){let f=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return this.db!=null&&(f.$db=this.db),f}toExtendedJSON(f){f=f||{};let a={$ref:this.collection,$id:this.oid};return f.legacy||(this.db&&(a.$db=this.db),a=Object.assign(a,this.fields)),a}static fromExtendedJSON(f){let a=Object.assign({},f);return delete a.$ref,delete a.$id,delete a.$db,new b(f.$ref,f.$id,f.$db,a)}}e.DBRef=b,Object.defineProperty(b.prototype,"_bsontype",{value:"DBRef"})});st(Nt);var Jr=Nt.DBRef,Wr=Nt.isDBRefLike,K=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Long=void 0;let y;try{y=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 b=1<<16,l=1<<24,f=b*b,a=f*f,E=a/2,o={},c={};class h{constructor(n=0,w=0,U){this.comp=h.prototype.compare,this.div=h.prototype.divide,this.eq=h.prototype.equals,this.gt=h.prototype.greaterThan,this.gte=h.prototype.greaterThanOrEqual,this.ge=h.prototype.greaterThanOrEqual,this.lt=h.prototype.lessThan,this.lte=h.prototype.lessThanOrEqual,this.mod=h.prototype.modulo,this.rem=h.prototype.modulo,this.mul=h.prototype.multiply,this.neg=h.prototype.negate,this.neq=h.prototype.notEquals,this.ne=h.prototype.notEquals,this.shl=h.prototype.shiftLeft,this.shr=h.prototype.shiftRight,this.shr_u=h.prototype.shiftRightUnsigned,this.shru=h.prototype.shiftRightUnsigned,this.sub=h.prototype.subtract,this.eqz=h.prototype.isZero,this.le=h.prototype.lessThanOrEqual,this.low=n|0,this.high=w|0,this.unsigned=!!U,Object.defineProperty(this,"__isLong__",{value:!0,configurable:!1,writable:!1,enumerable:!1})}static fromBits(n,w,U){return new h(n,w,U)}static fromInt(n,w){let U,N,Y;return w?(n>>>=0,(Y=0<=n&&n<256)&&(N=c[n],N)?N:(U=h.fromBits(n,(n|0)<0?-1:0,!0),Y&&(c[n]=U),U)):(n|=0,(Y=-128<=n&&n<128)&&(N=o[n],N)?N:(U=h.fromBits(n,n<0?-1:0,!1),Y&&(o[n]=U),U))}static fromNumber(n,w){if(isNaN(n))return w?h.UZERO:h.ZERO;if(w){if(n<0)return h.UZERO;if(n>=a)return h.MAX_UNSIGNED_VALUE}else{if(n<=-E)return h.MIN_VALUE;if(n+1>=E)return h.MAX_VALUE}return n<0?h.fromNumber(-n,w).neg():h.fromBits(n%f|0,n/f|0,w)}static fromBigInt(n,w){return h.fromString(n.toString(),w)}static fromString(n,w,U){if(n.length===0)throw Error("empty string");if(n==="NaN"||n==="Infinity"||n==="+Infinity"||n==="-Infinity")return h.ZERO;if(typeof w=="number"?(U=w,w=!1):w=!!w,U=U||10,U<2||36<U)throw RangeError("radix");let N;if((N=n.indexOf("-"))>0)throw Error("interior hyphen");if(N===0)return h.fromString(n.substring(1),w,U).neg();let Y=h.fromNumber(Math.pow(U,8)),J=h.ZERO;for(let R=0;R<n.length;R+=8){let W=Math.min(8,n.length-R),x=parseInt(n.substring(R,R+W),U);if(W<8){let G=h.fromNumber(Math.pow(U,W));J=J.mul(G).add(h.fromNumber(x))}else J=J.mul(Y),J=J.add(h.fromNumber(x))}return J.unsigned=w,J}static fromBytes(n,w,U){return U?h.fromBytesLE(n,w):h.fromBytesBE(n,w)}static fromBytesLE(n,w){return new h(n[0]|n[1]<<8|n[2]<<16|n[3]<<24,n[4]|n[5]<<8|n[6]<<16|n[7]<<24,w)}static fromBytesBE(n,w){return new h(n[4]<<24|n[5]<<16|n[6]<<8|n[7],n[0]<<24|n[1]<<16|n[2]<<8|n[3],w)}static isLong(n){return rt.isObjectLike(n)&&n.__isLong__===!0}static fromValue(n,w){return typeof n=="number"?h.fromNumber(n,w):typeof n=="string"?h.fromString(n,w):h.fromBits(n.low,n.high,typeof w=="boolean"?w:n.unsigned)}add(n){h.isLong(n)||(n=h.fromValue(n));let w=this.high>>>16,U=this.high&65535,N=this.low>>>16,Y=this.low&65535,J=n.high>>>16,R=n.high&65535,W=n.low>>>16,x=n.low&65535,G=0,M=0,V=0,z=0;return z+=Y+x,V+=z>>>16,z&=65535,V+=N+W,M+=V>>>16,V&=65535,M+=U+R,G+=M>>>16,M&=65535,G+=w+J,G&=65535,h.fromBits(V<<16|z,G<<16|M,this.unsigned)}and(n){return h.isLong(n)||(n=h.fromValue(n)),h.fromBits(this.low&n.low,this.high&n.high,this.unsigned)}compare(n){if(h.isLong(n)||(n=h.fromValue(n)),this.eq(n))return 0;let w=this.isNegative(),U=n.isNegative();return w&&!U?-1:!w&&U?1:this.unsigned?n.high>>>0>this.high>>>0||n.high===this.high&&n.low>>>0>this.low>>>0?-1:1:this.sub(n).isNegative()?-1:1}divide(n){if(h.isLong(n)||(n=h.fromValue(n)),n.isZero())throw Error("division by zero");if(y){if(!this.unsigned&&this.high===-2147483648&&n.low===-1&&n.high===-1)return this;let Y=(this.unsigned?y.div_u:y.div_s)(this.low,this.high,n.low,n.high);return h.fromBits(Y,y.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?h.UZERO:h.ZERO;let w,U,N;if(this.unsigned){if(n.unsigned||(n=n.toUnsigned()),n.gt(this))return h.UZERO;if(n.gt(this.shru(1)))return h.UONE;N=h.UZERO}else{if(this.eq(h.MIN_VALUE))return n.eq(h.ONE)||n.eq(h.NEG_ONE)?h.MIN_VALUE:n.eq(h.MIN_VALUE)?h.ONE:(w=this.shr(1).div(n).shl(1),w.eq(h.ZERO)?n.isNegative()?h.ONE:h.NEG_ONE:(U=this.sub(n.mul(w)),N=w.add(U.div(n)),N));if(n.eq(h.MIN_VALUE))return this.unsigned?h.UZERO:h.ZERO;if(this.isNegative())return n.isNegative()?this.neg().div(n.neg()):this.neg().div(n).neg();if(n.isNegative())return this.div(n.neg()).neg();N=h.ZERO}for(U=this;U.gte(n);){w=Math.max(1,Math.floor(U.toNumber()/n.toNumber()));let Y=Math.ceil(Math.log(w)/Math.LN2),J=Y<=48?1:Math.pow(2,Y-48),R=h.fromNumber(w),W=R.mul(n);for(;W.isNegative()||W.gt(U);)w-=J,R=h.fromNumber(w,this.unsigned),W=R.mul(n);R.isZero()&&(R=h.ONE),N=N.add(R),U=U.sub(W)}return N}equals(n){return h.isLong(n)||(n=h.fromValue(n)),this.unsigned!==n.unsigned&&this.high>>>31===1&&n.high>>>31===1?!1:this.high===n.high&&this.low===n.low}getHighBits(){return this.high}getHighBitsUnsigned(){return this.high>>>0}getLowBits(){return this.low}getLowBitsUnsigned(){return this.low>>>0}getNumBitsAbs(){if(this.isNegative())return this.eq(h.MIN_VALUE)?64:this.neg().getNumBitsAbs();let n=this.high!==0?this.high:this.low,w;for(w=31;w>0&&!(n&1<<w);w--);return this.high!==0?w+33:w+1}greaterThan(n){return this.comp(n)>0}greaterThanOrEqual(n){return this.comp(n)>=0}isEven(){return(this.low&1)===0}isNegative(){return!this.unsigned&&this.high<0}isOdd(){return(this.low&1)===1}isPositive(){return this.unsigned||this.high>=0}isZero(){return this.high===0&&this.low===0}lessThan(n){return this.comp(n)<0}lessThanOrEqual(n){return this.comp(n)<=0}modulo(n){if(h.isLong(n)||(n=h.fromValue(n)),y){let w=(this.unsigned?y.rem_u:y.rem_s)(this.low,this.high,n.low,n.high);return h.fromBits(w,y.get_high(),this.unsigned)}return this.sub(this.div(n).mul(n))}multiply(n){if(this.isZero())return h.ZERO;if(h.isLong(n)||(n=h.fromValue(n)),y){let Z=y.mul(this.low,this.high,n.low,n.high);return h.fromBits(Z,y.get_high(),this.unsigned)}if(n.isZero())return h.ZERO;if(this.eq(h.MIN_VALUE))return n.isOdd()?h.MIN_VALUE:h.ZERO;if(n.eq(h.MIN_VALUE))return this.isOdd()?h.MIN_VALUE:h.ZERO;if(this.isNegative())return n.isNegative()?this.neg().mul(n.neg()):this.neg().mul(n).neg();if(n.isNegative())return this.mul(n.neg()).neg();if(this.lt(h.TWO_PWR_24)&&n.lt(h.TWO_PWR_24))return h.fromNumber(this.toNumber()*n.toNumber(),this.unsigned);let w=this.high>>>16,U=this.high&65535,N=this.low>>>16,Y=this.low&65535,J=n.high>>>16,R=n.high&65535,W=n.low>>>16,x=n.low&65535,G=0,M=0,V=0,z=0;return z+=Y*x,V+=z>>>16,z&=65535,V+=N*x,M+=V>>>16,V&=65535,V+=Y*W,M+=V>>>16,V&=65535,M+=U*x,G+=M>>>16,M&=65535,M+=N*W,G+=M>>>16,M&=65535,M+=Y*R,G+=M>>>16,M&=65535,G+=w*x+U*W+N*R+Y*J,G&=65535,h.fromBits(V<<16|z,G<<16|M,this.unsigned)}negate(){return!this.unsigned&&this.eq(h.MIN_VALUE)?h.MIN_VALUE:this.not().add(h.ONE)}not(){return h.fromBits(~this.low,~this.high,this.unsigned)}notEquals(n){return!this.equals(n)}or(n){return h.isLong(n)||(n=h.fromValue(n)),h.fromBits(this.low|n.low,this.high|n.high,this.unsigned)}shiftLeft(n){return h.isLong(n)&&(n=n.toInt()),(n&=63)===0?this:n<32?h.fromBits(this.low<<n,this.high<<n|this.low>>>32-n,this.unsigned):h.fromBits(0,this.low<<n-32,this.unsigned)}shiftRight(n){return h.isLong(n)&&(n=n.toInt()),(n&=63)===0?this:n<32?h.fromBits(this.low>>>n|this.high<<32-n,this.high>>n,this.unsigned):h.fromBits(this.high>>n-32,this.high>=0?0:-1,this.unsigned)}shiftRightUnsigned(n){if(h.isLong(n)&&(n=n.toInt()),n&=63,n===0)return this;{let w=this.high;if(n<32){let U=this.low;return h.fromBits(U>>>n|w<<32-n,w>>>n,this.unsigned)}else return n===32?h.fromBits(w,0,this.unsigned):h.fromBits(w>>>n-32,0,this.unsigned)}}subtract(n){return h.isLong(n)||(n=h.fromValue(n)),this.add(n.neg())}toInt(){return this.unsigned?this.low>>>0:this.low}toNumber(){return this.unsigned?(this.high>>>0)*f+(this.low>>>0):this.high*f+(this.low>>>0)}toBigInt(){return BigInt(this.toString())}toBytes(n){return n?this.toBytesLE():this.toBytesBE()}toBytesLE(){let n=this.high,w=this.low;return[w&255,w>>>8&255,w>>>16&255,w>>>24,n&255,n>>>8&255,n>>>16&255,n>>>24]}toBytesBE(){let n=this.high,w=this.low;return[n>>>24,n>>>16&255,n>>>8&255,n&255,w>>>24,w>>>16&255,w>>>8&255,w&255]}toSigned(){return this.unsigned?h.fromBits(this.low,this.high,!1):this}toString(n){if(n=n||10,n<2||36<n)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(h.MIN_VALUE)){let Y=h.fromNumber(n),J=this.div(Y),R=J.mul(Y).sub(this);return J.toString(n)+R.toInt().toString(n)}else return"-"+this.neg().toString(n);let w=h.fromNumber(Math.pow(n,6),this.unsigned),U=this,N="";for(;;){let Y=U.div(w),R=(U.sub(Y.mul(w)).toInt()>>>0).toString(n);if(U=Y,U.isZero())return R+N;for(;R.length<6;)R="0"+R;N=""+R+N}}toUnsigned(){return this.unsigned?this:h.fromBits(this.low,this.high,!0)}xor(n){return h.isLong(n)||(n=h.fromValue(n)),h.fromBits(this.low^n.low,this.high^n.high,this.unsigned)}toExtendedJSON(n){return n&&n.relaxed?this.toNumber():{$numberLong:this.toString()}}static fromExtendedJSON(n,w){let U=h.fromString(n.$numberLong);return w&&w.relaxed?U.toNumber():U}}e.Long=h,h.TWO_PWR_24=h.fromInt(l),h.MAX_UNSIGNED_VALUE=h.fromBits(-1,-1,!0),h.ZERO=h.fromInt(0),h.UZERO=h.fromInt(0,!0),h.ONE=h.fromInt(1),h.UONE=h.fromInt(1,!0),h.NEG_ONE=h.fromInt(-1),h.MAX_VALUE=h.fromBits(-1,2147483647,!1),h.MIN_VALUE=h.fromBits(0,-2147483648,!1),Object.defineProperty(h.prototype,"__isLong__",{value:!0}),Object.defineProperty(h.prototype,"_bsontype",{value:"Long"})});st(K);var Xr=K.Long,dt=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Decimal128=void 0;let y=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,b=/^(\+|-)?(Infinity|inf)$/i,l=/^(\+|-)?NaN$/i,f=6111,a=-6176,E=6176,o=34,c=[124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),h=[248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),p=[120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse(),n=/^([-+])?(\d+)?$/,w=31,U=16383,N=30,Y=31;function J(V){return!isNaN(parseInt(V,10))}function R(V){let z=K.Long.fromNumber(1e9),Z=K.Long.fromNumber(0);if(!V.parts[0]&&!V.parts[1]&&!V.parts[2]&&!V.parts[3])return{quotient:V,rem:Z};for(let s=0;s<=3;s++)Z=Z.shiftLeft(32),Z=Z.add(new K.Long(V.parts[s],0)),V.parts[s]=Z.div(z).low,Z=Z.modulo(z);return{quotient:V,rem:Z}}function W(V,z){if(!V&&!z)return{high:K.Long.fromNumber(0),low:K.Long.fromNumber(0)};let Z=V.shiftRightUnsigned(32),s=new K.Long(V.getLowBits(),0),A=z.shiftRightUnsigned(32),O=new K.Long(z.getLowBits(),0),i=Z.multiply(A),m=Z.multiply(O),D=s.multiply(A),j=s.multiply(O);return i=i.add(m.shiftRightUnsigned(32)),m=new K.Long(m.getLowBits(),0).add(D).add(j.shiftRightUnsigned(32)),i=i.add(m.shiftRightUnsigned(32)),j=m.shiftLeft(32).add(new K.Long(j.getLowBits(),0)),{high:i,low:j}}function x(V,z){let Z=V.high>>>0,s=z.high>>>0;if(Z<s)return!0;if(Z===s){let A=V.low>>>0,O=z.low>>>0;if(A<O)return!0}return!1}function G(V,z){throw new TypeError(`"${V}" is not a valid Decimal128 string - ${z}`)}class M{constructor(z){this.bytes=z}static fromString(z){let Z=!1,s=!1,A=!1,O=0,i=0,m=0,D=0,j=0,F=[0],g=0,$=0,L=0,T=0,d=0,q=0,X=new K.Long(0,0),et=new K.Long(0,0),Bt=0,k=0;if(z.length>=7e3)throw new TypeError(""+z+" not a valid Decimal128 string");let lt=z.match(y),ee=z.match(b),Ft=z.match(l);if(!lt&&!ee&&!Ft||z.length===0)throw new TypeError(""+z+" not a valid Decimal128 string");if(lt){let nt=lt[2],u=lt[4],t=lt[5],r=lt[6];u&&r===void 0&&G(z,"missing exponent power"),u&&nt===void 0&&G(z,"missing exponent base"),u===void 0&&(t||r)&&G(z,"missing e before exponent")}if((z[k]==="+"||z[k]==="-")&&(Z=z[k++]==="-"),!J(z[k])&&z[k]!=="."){if(z[k]==="i"||z[k]==="I")return new M(C.Buffer.from(Z?h:p));if(z[k]==="N")return new M(C.Buffer.from(c))}for(;J(z[k])||z[k]===".";){if(z[k]==="."){s&&G(z,"contains multiple periods"),s=!0,k=k+1;continue}g<34&&(z[k]!=="0"||A)&&(A||(j=i),A=!0,F[$++]=parseInt(z[k],10),g=g+1),A&&(m=m+1),s&&(D=D+1),i=i+1,k=k+1}if(s&&!i)throw new TypeError(""+z+" not a valid Decimal128 string");if(z[k]==="e"||z[k]==="E"){let nt=z.substr(++k).match(n);if(!nt||!nt[2])return new M(C.Buffer.from(c));d=parseInt(nt[0],10),k=k+nt[0].length}if(z[k])return new M(C.Buffer.from(c));if(L=0,!g)L=0,T=0,F[0]=0,m=1,g=1,O=0;else if(T=g-1,O=m,O!==1)for(;z[j+O-1]==="0";)O=O-1;for(d<=D&&D-d>1<<14?d=a:d=d-D;d>f;){if(T=T+1,T-L>o){if(F.join("").match(/^0+$/)){d=f;break}G(z,"overflow")}d=d-1}for(;d<a||g<m;){if(T===0&&O<g){d=a,O=0;break}if(g<m?m=m-1:T=T-1,d<f)d=d+1;else{if(F.join("").match(/^0+$/)){d=f;break}G(z,"overflow")}}if(T-L+1<O){let nt=i;s&&(j=j+1,nt=nt+1),Z&&(j=j+1,nt=nt+1);let u=parseInt(z[j+T+1],10),t=0;if(u>=5&&(t=1,u===5)){for(t=F[T]%2===1?1:0,q=j+T+2;q<nt;q++)if(parseInt(z[q],10)){t=1;break}}if(t){let r=T;for(;r>=0;r--)if(++F[r]>9&&(F[r]=0,r===0))if(d<f)d=d+1,F[r]=1;else return new M(C.Buffer.from(Z?h:p))}}if(X=K.Long.fromNumber(0),et=K.Long.fromNumber(0),O===0)X=K.Long.fromNumber(0),et=K.Long.fromNumber(0);else if(T-L<17){let nt=L;for(et=K.Long.fromNumber(F[nt++]),X=new K.Long(0,0);nt<=T;nt++)et=et.multiply(K.Long.fromNumber(10)),et=et.add(K.Long.fromNumber(F[nt]))}else{let nt=L;for(X=K.Long.fromNumber(F[nt++]);nt<=T-17;nt++)X=X.multiply(K.Long.fromNumber(10)),X=X.add(K.Long.fromNumber(F[nt]));for(et=K.Long.fromNumber(F[nt++]);nt<=T;nt++)et=et.multiply(K.Long.fromNumber(10)),et=et.add(K.Long.fromNumber(F[nt]))}let ht=W(X,K.Long.fromString("100000000000000000"));ht.low=ht.low.add(et),x(ht.low,et)&&(ht.high=ht.high.add(K.Long.fromNumber(1))),Bt=d+E;let Q={low:K.Long.fromNumber(0),high:K.Long.fromNumber(0)};ht.high.shiftRightUnsigned(49).and(K.Long.fromNumber(1)).equals(K.Long.fromNumber(1))?(Q.high=Q.high.or(K.Long.fromNumber(3).shiftLeft(61)),Q.high=Q.high.or(K.Long.fromNumber(Bt).and(K.Long.fromNumber(16383).shiftLeft(47))),Q.high=Q.high.or(ht.high.and(K.Long.fromNumber(0x7fffffffffff)))):(Q.high=Q.high.or(K.Long.fromNumber(Bt&16383).shiftLeft(49)),Q.high=Q.high.or(ht.high.and(K.Long.fromNumber(562949953421311)))),Q.low=ht.low,Z&&(Q.high=Q.high.or(K.Long.fromString("9223372036854775808")));let at=C.Buffer.alloc(16);return k=0,at[k++]=Q.low.low&255,at[k++]=Q.low.low>>8&255,at[k++]=Q.low.low>>16&255,at[k++]=Q.low.low>>24&255,at[k++]=Q.low.high&255,at[k++]=Q.low.high>>8&255,at[k++]=Q.low.high>>16&255,at[k++]=Q.low.high>>24&255,at[k++]=Q.high.low&255,at[k++]=Q.high.low>>8&255,at[k++]=Q.high.low>>16&255,at[k++]=Q.high.low>>24&255,at[k++]=Q.high.high&255,at[k++]=Q.high.high>>8&255,at[k++]=Q.high.high>>16&255,at[k++]=Q.high.high>>24&255,new M(at)}toString(){let z,Z=0,s=new Array(36);for(let k=0;k<s.length;k++)s[k]=0;let A=0,O=!1,i,m={parts:[0,0,0,0]},D,j,F=[];A=0;let g=this.bytes,$=g[A++]|g[A++]<<8|g[A++]<<16|g[A++]<<24,L=g[A++]|g[A++]<<8|g[A++]<<16|g[A++]<<24,T=g[A++]|g[A++]<<8|g[A++]<<16|g[A++]<<24,d=g[A++]|g[A++]<<8|g[A++]<<16|g[A++]<<24;A=0,{low:new K.Long($,L),high:new K.Long(T,d)}.high.lessThan(K.Long.ZERO)&&F.push("-");let X=d>>26&w;if(X>>3===3){if(X===N)return F.join("")+"Infinity";if(X===Y)return"NaN";z=d>>15&U,i=8+(d>>14&1)}else i=d>>14&7,z=d>>17&U;let et=z-E;if(m.parts[0]=(d&16383)+((i&15)<<14),m.parts[1]=T,m.parts[2]=L,m.parts[3]=$,m.parts[0]===0&&m.parts[1]===0&&m.parts[2]===0&&m.parts[3]===0)O=!0;else for(j=3;j>=0;j--){let k=0,lt=R(m);if(m=lt.quotient,k=lt.rem.low,!!k)for(D=8;D>=0;D--)s[j*9+D]=k%10,k=Math.floor(k/10)}if(O)Z=1,s[A]=0;else for(Z=36;!s[A];)Z=Z-1,A=A+1;let Bt=Z-1+et;if(Bt>=34||Bt<=-7||et>0){if(Z>34)return F.push(`${0}`),et>0?F.push("E+"+et):et<0&&F.push("E"+et),F.join("");F.push(`${s[A++]}`),Z=Z-1,Z&&F.push(".");for(let k=0;k<Z;k++)F.push(`${s[A++]}`);F.push("E"),Bt>0?F.push("+"+Bt):F.push(`${Bt}`)}else if(et>=0)for(let k=0;k<Z;k++)F.push(`${s[A++]}`);else{let k=Z+et;if(k>0)for(let lt=0;lt<k;lt++)F.push(`${s[A++]}`);else F.push("0");for(F.push(".");k++<0;)F.push("0");for(let lt=0;lt<Z-Math.max(k-1,0);lt++)F.push(`${s[A++]}`)}return F.join("")}toJSON(){return{$numberDecimal:this.toString()}}toExtendedJSON(){return{$numberDecimal:this.toString()}}static fromExtendedJSON(z){return M.fromString(z.$numberDecimal)}}e.Decimal128=M,Object.defineProperty(M.prototype,"_bsontype",{value:"Decimal128"})});st(dt);var kr=dt.Decimal128,It=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Double=void 0;class y{constructor(l){l instanceof Number&&(l=l.valueOf()),this.value=+l}valueOf(){return this.value}toJSON(){return this.value}toExtendedJSON(l){if(l&&(l.legacy||l.relaxed&&isFinite(this.value)))return this.value;if(Object.is(Math.sign(this.value),-0))return{$numberDouble:`-${this.value.toFixed(1)}`};let f;return Number.isInteger(this.value)?(f=this.value.toFixed(1),f.length>=13&&(f=this.value.toExponential(13).toUpperCase())):f=this.value.toString(),{$numberDouble:f}}static fromExtendedJSON(l,f){let a=parseFloat(l.$numberDouble);return f&&f.relaxed?a:new y(a)}}e.Double=y,Object.defineProperty(y.prototype,"_bsontype",{value:"Double"})});st(It);var Kr=It.Double,Dt=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Int32=void 0;class y{constructor(l){l instanceof Number&&(l=l.valueOf()),this.value=+l}valueOf(){return this.value}toJSON(){return this.value}toExtendedJSON(l){return l&&(l.relaxed||l.legacy)?this.value:{$numberInt:this.value.toString()}}static fromExtendedJSON(l,f){return f&&f.relaxed?parseInt(l.$numberInt,10):new y(l.$numberInt)}}e.Int32=y,Object.defineProperty(y.prototype,"_bsontype",{value:"Int32"})});st(Dt);var Hr=Dt.Int32,$t=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Map=void 0;let y;e.Map=y;let b=function(a){return a&&a.Math==Math&&a};function l(){return b(typeof globalThis=="object"&&globalThis)||b(typeof window=="object"&&window)||b(typeof self=="object"&&self)||b(typeof Ht=="object"&&Ht)||Function("return this")()}let f=l();Object.prototype.hasOwnProperty.call(f,"Map")?e.Map=y=f.Map:e.Map=y=class{constructor(E=[]){this._keys=[],this._values={};for(let o=0;o<E.length;o++){if(E[o]==null)continue;let c=E[o],h=c[0],p=c[1];this._keys.push(h),this._values[h]={v:p,i:this._keys.length-1}}}clear(){this._keys=[],this._values={}}delete(E){let o=this._values[E];return o==null?!1:(delete this._values[E],this._keys.splice(o.i,1),!0)}entries(){let E=0;return{next:()=>{let o=this._keys[E++];return{value:o!==void 0?[o,this._values[o].v]:void 0,done:o===void 0}}}}forEach(E,o){o=o||this;for(let c=0;c<this._keys.length;c++){let h=this._keys[c];E.call(o,this._values[h].v,h,o)}}get(E){return this._values[E]?this._values[E].v:void 0}has(E){return this._values[E]!=null}keys(){let E=0;return{next:()=>{let o=this._keys[E++];return{value:o!==void 0?o:void 0,done:o===void 0}}}}set(E,o){return this._values[E]?(this._values[E].v=o,this):(this._keys.push(E),this._values[E]={v:o,i:this._keys.length-1},this)}values(){let E=0;return{next:()=>{let o=this._keys[E++];return{value:o!==void 0?this._values[o].v:void 0,done:o===void 0}}}}get size(){return this._keys.length}}});st($t);var Vr=$t.Map,Rt=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MaxKey=void 0;class y{toExtendedJSON(){return{$maxKey:1}}static fromExtendedJSON(){return new y}}e.MaxKey=y,Object.defineProperty(y.prototype,"_bsontype",{value:"MaxKey"})});st(Rt);var Zr=Rt.MaxKey,Ut=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.MinKey=void 0;class y{toExtendedJSON(){return{$minKey:1}}static fromExtendedJSON(){return new y}}e.MinKey=y,Object.defineProperty(y.prototype,"_bsontype",{value:"MinKey"})});st(Ut);var qr=Ut.MinKey,St=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.ObjectId=void 0;let y=rt.randomBytes(5),b=new RegExp("^[0-9a-fA-F]{24}$"),l=[];for(let h=0;h<256;h++)l[h]=(h<=15?"0":"")+h.toString(16);let f=[],a=0;for(;a<10;)f[48+a]=a++;for(;a<16;)f[65-10+a]=f[97-10+a]=a++;let E=Symbol("id");class o{constructor(p){if(p instanceof o&&(this[E]=p.id,this.__id=p.__id),typeof p=="object"&&p&&"id"in p&&("toHexString"in p&&typeof p.toHexString=="function"?this[E]=C.Buffer.from(p.toHexString(),"hex"):this[E]=typeof p.id=="string"?C.Buffer.from(p.id):p.id),(p==null||typeof p=="number")&&(this[E]=o.generate(typeof p=="number"?p:void 0),o.cacheHexString&&(this.__id=this.id.toString("hex"))),ArrayBuffer.isView(p)&&p.byteLength===12&&(this[E]=mt.ensureBuffer(p)),typeof p=="string")if(p.length===12){let n=C.Buffer.from(p);n.byteLength===12&&(this[E]=n)}else if(p.length===24&&b.test(p))this[E]=C.Buffer.from(p,"hex");else throw new TypeError("Argument passed in must be a Buffer or string of 12 bytes or a string of 24 hex characters");o.cacheHexString&&(this.__id=this.id.toString("hex"))}get id(){return this[E]}set id(p){this[E]=p,o.cacheHexString&&(this.__id=p.toString("hex"))}get generationTime(){return this.id.readInt32BE(0)}set generationTime(p){this.id.writeUInt32BE(p,0)}toHexString(){if(o.cacheHexString&&this.__id)return this.__id;let p=this.id.toString("hex");return o.cacheHexString&&!this.__id&&(this.__id=p),p}static getInc(){return o.index=(o.index+1)%16777215}static generate(p){typeof p!="number"&&(p=~~(Date.now()/1e3));let n=o.getInc(),w=C.Buffer.alloc(12);return w.writeUInt32BE(p,0),w[4]=y[0],w[5]=y[1],w[6]=y[2],w[7]=y[3],w[8]=y[4],w[11]=n&255,w[10]=n>>8&255,w[9]=n>>16&255,w}toString(p){return p?this.id.toString(p):this.toHexString()}toJSON(){return this.toHexString()}equals(p){return p==null?!1:p instanceof o?this.toString()===p.toString():typeof p=="string"&&o.isValid(p)&&p.length===12&&this.id instanceof C.Buffer?p===this.id.toString("binary"):typeof p=="string"&&o.isValid(p)&&p.length===24?p.toLowerCase()===this.toHexString():typeof p=="string"&&o.isValid(p)&&p.length===12?C.Buffer.from(p).equals(this.id):typeof p=="object"&&"toHexString"in p&&typeof p.toHexString=="function"?p.toHexString()===this.toHexString():!1}getTimestamp(){let p=new Date,n=this.id.readUInt32BE(0);return p.setTime(Math.floor(n)*1e3),p}static createPk(){return new o}static createFromTime(p){let n=C.Buffer.from([0,0,0,0,0,0,0,0,0,0,0,0]);return n.writeUInt32BE(p,0),new o(n)}static createFromHexString(p){if(typeof p>"u"||p!=null&&p.length!==24)throw new TypeError("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");return new o(C.Buffer.from(p,"hex"))}static isValid(p){return p==null?!1:typeof p=="number"?!0:typeof p=="string"?p.length===12||p.length===24&&b.test(p):p instanceof o||p instanceof C.Buffer&&p.length===12?!0:typeof p=="object"&&"toHexString"in p&&typeof p.toHexString=="function"?typeof p.id=="string"?p.id.length===12:p.toHexString().length===24&&b.test(p.id.toString("hex")):!1}toExtendedJSON(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}}static fromExtendedJSON(p){return new o(p.$oid)}}e.ObjectId=o,o.index=~~(Math.random()*16777215),Object.defineProperty(o.prototype,"generate",{value:rt.deprecate(h=>o.generate(h),"Please use the static `ObjectId.generate(time)` instead")}),Object.defineProperty(o.prototype,"getInc",{value:rt.deprecate(()=>o.getInc(),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(o.prototype,"get_inc",{value:rt.deprecate(()=>o.getInc(),"Please use the static `ObjectId.getInc()` instead")}),Object.defineProperty(o,"get_inc",{value:rt.deprecate(()=>o.getInc(),"Please use the static `ObjectId.getInc()` instead")});let c=Symbol.for("nodejs.util.inspect.custom");Object.defineProperty(o.prototype,c,o.prototype.toString),Object.defineProperty(o.prototype,"inspect",o.prototype.toString),Object.defineProperty(o.prototype,"_bsontype",{value:"ObjectID"})});st(St);var Qr=St.ObjectId,I=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BSON_BINARY_SUBTYPE_USER_DEFINED=e.BSON_BINARY_SUBTYPE_MD5=e.BSON_BINARY_SUBTYPE_UUID_NEW=e.BSON_BINARY_SUBTYPE_UUID=e.BSON_BINARY_SUBTYPE_BYTE_ARRAY=e.BSON_BINARY_SUBTYPE_FUNCTION=e.BSON_BINARY_SUBTYPE_DEFAULT=e.BSON_DATA_MAX_KEY=e.BSON_DATA_MIN_KEY=e.BSON_DATA_DECIMAL128=e.BSON_DATA_LONG=e.BSON_DATA_TIMESTAMP=e.BSON_DATA_INT=e.BSON_DATA_CODE_W_SCOPE=e.BSON_DATA_SYMBOL=e.BSON_DATA_CODE=e.BSON_DATA_DBPOINTER=e.BSON_DATA_REGEXP=e.BSON_DATA_NULL=e.BSON_DATA_DATE=e.BSON_DATA_BOOLEAN=e.BSON_DATA_OID=e.BSON_DATA_UNDEFINED=e.BSON_DATA_BINARY=e.BSON_DATA_ARRAY=e.BSON_DATA_OBJECT=e.BSON_DATA_STRING=e.BSON_DATA_NUMBER=e.JS_INT_MIN=e.JS_INT_MAX=e.BSON_INT64_MIN=e.BSON_INT64_MAX=e.BSON_INT32_MIN=e.BSON_INT32_MAX=void 0,e.BSON_INT32_MAX=2147483647,e.BSON_INT32_MIN=-2147483648,e.BSON_INT64_MAX=Math.pow(2,63)-1,e.BSON_INT64_MIN=-Math.pow(2,63),e.JS_INT_MAX=Math.pow(2,53),e.JS_INT_MIN=-Math.pow(2,53),e.BSON_DATA_NUMBER=1,e.BSON_DATA_STRING=2,e.BSON_DATA_OBJECT=3,e.BSON_DATA_ARRAY=4,e.BSON_DATA_BINARY=5,e.BSON_DATA_UNDEFINED=6,e.BSON_DATA_OID=7,e.BSON_DATA_BOOLEAN=8,e.BSON_DATA_DATE=9,e.BSON_DATA_NULL=10,e.BSON_DATA_REGEXP=11,e.BSON_DATA_DBPOINTER=12,e.BSON_DATA_CODE=13,e.BSON_DATA_SYMBOL=14,e.BSON_DATA_CODE_W_SCOPE=15,e.BSON_DATA_INT=16,e.BSON_DATA_TIMESTAMP=17,e.BSON_DATA_LONG=18,e.BSON_DATA_DECIMAL128=19,e.BSON_DATA_MIN_KEY=255,e.BSON_DATA_MAX_KEY=127,e.BSON_BINARY_SUBTYPE_DEFAULT=0,e.BSON_BINARY_SUBTYPE_FUNCTION=1,e.BSON_BINARY_SUBTYPE_BYTE_ARRAY=2,e.BSON_BINARY_SUBTYPE_UUID=3,e.BSON_BINARY_SUBTYPE_UUID_NEW=4,e.BSON_BINARY_SUBTYPE_MD5=5,e.BSON_BINARY_SUBTYPE_USER_DEFINED=128});st(I);var xr=I.BSON_BINARY_SUBTYPE_USER_DEFINED,$r=I.BSON_BINARY_SUBTYPE_MD5,tn=I.BSON_BINARY_SUBTYPE_UUID_NEW,en=I.BSON_BINARY_SUBTYPE_UUID,rn=I.BSON_BINARY_SUBTYPE_BYTE_ARRAY,nn=I.BSON_BINARY_SUBTYPE_FUNCTION,on=I.BSON_BINARY_SUBTYPE_DEFAULT,sn=I.BSON_DATA_MAX_KEY,fn=I.BSON_DATA_MIN_KEY,un=I.BSON_DATA_DECIMAL128,an=I.BSON_DATA_LONG,ln=I.BSON_DATA_TIMESTAMP,cn=I.BSON_DATA_INT,hn=I.BSON_DATA_CODE_W_SCOPE,_n=I.BSON_DATA_SYMBOL,yn=I.BSON_DATA_CODE,Bn=I.BSON_DATA_DBPOINTER,Nn=I.BSON_DATA_REGEXP,gn=I.BSON_DATA_NULL,pn=I.BSON_DATA_DATE,On=I.BSON_DATA_BOOLEAN,Sn=I.BSON_DATA_OID,An=I.BSON_DATA_UNDEFINED,En=I.BSON_DATA_BINARY,mn=I.BSON_DATA_ARRAY,wn=I.BSON_DATA_OBJECT,Tn=I.BSON_DATA_STRING,In=I.BSON_DATA_NUMBER,Dn=I.JS_INT_MIN,bn=I.JS_INT_MAX,dn=I.BSON_INT64_MIN,Rn=I.BSON_INT64_MAX,Un=I.BSON_INT32_MIN,Mn=I.BSON_INT32_MAX,ye=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.calculateObjectSize=void 0;function y(l,f,a){let E=5;if(Array.isArray(l))for(let o=0;o<l.length;o++)E+=b(o.toString(),l[o],f,!0,a);else{l.toBSON&&(l=l.toBSON());for(let o in l)E+=b(o,l[o],f,!1,a)}return E}e.calculateObjectSize=y;function b(l,f,a=!1,E=!1,o=!1){switch(f&&f.toBSON&&(f=f.toBSON()),typeof f){case"string":return 1+C.Buffer.byteLength(l,"utf8")+1+4+C.Buffer.byteLength(f,"utf8")+1;case"number":return Math.floor(f)===f&&f>=I.JS_INT_MIN&&f<=I.JS_INT_MAX&&f>=I.BSON_INT32_MIN&&f<=I.BSON_INT32_MAX?(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+(4+1):(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+(8+1);case"undefined":return E||!o?(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+1:0;case"boolean":return(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+(1+1);case"object":if(f==null||f._bsontype==="MinKey"||f._bsontype==="MaxKey")return(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+1;if(f._bsontype==="ObjectId"||f._bsontype==="ObjectID")return(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+(12+1);if(f instanceof Date||rt.isDate(f))return(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+(8+1);if(ArrayBuffer.isView(f)||f instanceof ArrayBuffer)return(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+(1+4+1)+f.byteLength;if(f._bsontype==="Long"||f._bsontype==="Double"||f._bsontype==="Timestamp")return(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+(8+1);if(f._bsontype==="Decimal128")return(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+(16+1);if(f._bsontype==="Code")return f.scope!=null&&Object.keys(f.scope).length>0?(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+1+4+4+C.Buffer.byteLength(f.code.toString(),"utf8")+1+y(f.scope,a,o):(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+1+4+C.Buffer.byteLength(f.code.toString(),"utf8")+1;if(f._bsontype==="Binary")return f.sub_type===_t.Binary.SUBTYPE_BYTE_ARRAY?(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+(f.position+1+4+1+4):(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+(f.position+1+4+1);if(f._bsontype==="Symbol")return(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+C.Buffer.byteLength(f.value,"utf8")+4+1+1;if(f._bsontype==="DBRef"){let c=Object.assign({$ref:f.collection,$id:f.oid},f.fields);return f.db!=null&&(c.$db=f.db),(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+1+y(c,a,o)}else return f instanceof RegExp||Object.prototype.toString.call(f)==="[object RegExp]"?(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+1+C.Buffer.byteLength(f.source,"utf8")+1+(f.global?1:0)+(f.ignoreCase?1:0)+(f.multiline?1:0)+1:f._bsontype==="BSONRegExp"?(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+1+C.Buffer.byteLength(f.pattern,"utf8")+1+C.Buffer.byteLength(f.options,"utf8")+1:(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+y(f,a,o)+1;case"function":if(f instanceof RegExp||Object.prototype.toString.call(f)==="[object RegExp]"||String.call(f)==="[object RegExp]")return(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+1+C.Buffer.byteLength(f.source,"utf8")+1+(f.global?1:0)+(f.ignoreCase?1:0)+(f.multiline?1:0)+1;if(a&&f.scope!=null&&Object.keys(f.scope).length>0)return(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+1+4+4+C.Buffer.byteLength(rt.normalizedFunctionString(f),"utf8")+1+y(f.scope,a,o);if(a)return(l!=null?C.Buffer.byteLength(l,"utf8")+1:0)+1+4+C.Buffer.byteLength(rt.normalizedFunctionString(f),"utf8")+1}return 0}});st(ye);var Pn=ye.calculateObjectSize,At=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BSONRegExp=void 0;function y(l){return l.split("").sort().join("")}class b{constructor(f,a){this.pattern=f,this.options=a??"",y(this.options);for(let E=0;E<this.options.length;E++)if(!(this.options[E]==="i"||this.options[E]==="m"||this.options[E]==="x"||this.options[E]==="l"||this.options[E]==="s"||this.options[E]==="u"))throw new Error(`The regular expression option [${this.options[E]}] is not supported`)}static parseOptions(f){return f?f.split("").sort().join(""):""}toExtendedJSON(f){return f=f||{},f.legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}}static fromExtendedJSON(f){if("$regex"in f)if(typeof f.$regex!="string"){if(f.$regex._bsontype==="BSONRegExp")return f}else return new b(f.$regex,b.parseOptions(f.$options));if("$regularExpression"in f)return new b(f.$regularExpression.pattern,b.parseOptions(f.$regularExpression.options));throw new TypeError(`Unexpected BSONRegExp EJSON object form: ${JSON.stringify(f)}`)}}e.BSONRegExp=b,Object.defineProperty(b.prototype,"_bsontype",{value:"BSONRegExp"})});st(At);var jn=At.BSONRegExp,Mt=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BSONSymbol=void 0;class y{constructor(l){this.value=l}valueOf(){return this.value}toString(){return this.value}inspect(){return this.value}toJSON(){return this.value}toExtendedJSON(){return{$symbol:this.value}}static fromExtendedJSON(l){return new y(l.$symbol)}}e.BSONSymbol=y,Object.defineProperty(y.prototype,"_bsontype",{value:"Symbol"})});st(Mt);var Yn=Mt.BSONSymbol,wt=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Timestamp=e.LongWithoutOverridesClass=void 0,e.LongWithoutOverridesClass=K.Long;class y extends e.LongWithoutOverridesClass{constructor(l,f){K.Long.isLong(l)?super(l.low,l.high,!0):super(l,f,!0),Object.defineProperty(this,"_bsontype",{value:"Timestamp",writable:!1,configurable:!1,enumerable:!1})}toJSON(){return{$timestamp:this.toString()}}static fromInt(l){return new y(K.Long.fromInt(l,!0))}static fromNumber(l){return new y(K.Long.fromNumber(l,!0))}static fromBits(l,f){return new y(l,f)}static fromString(l,f){return new y(K.Long.fromString(l,!0,f))}toExtendedJSON(){return{$timestamp:{t:this.high>>>0,i:this.low>>>0}}}static fromExtendedJSON(l){return new y(l.$timestamp.i,l.$timestamp.t)}}e.Timestamp=y,y.MAX_VALUE=K.Long.MAX_UNSIGNED_VALUE});st(wt);var vn=wt.Timestamp,Fn=wt.LongWithoutOverridesClass,Vt=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateUtf8=void 0;let y=128,b=192,l=224,f=240,a=248,E=192,o=224,c=240,h=128;function p(n,w,U){let N=0;for(let Y=w;Y<U;Y+=1){let J=n[Y];if(N){if((J&b)!==h)return!1;N-=1}else if(J&y)if((J&l)===E)N=1;else if((J&f)===o)N=2;else if((J&a)===c)N=3;else return!1}return!N}e.validateUtf8=p});st(Vt);var Ln=Vt.validateUtf8,Zt=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.deserialize=void 0;let y=K.Long.fromNumber(I.JS_INT_MAX),b=K.Long.fromNumber(I.JS_INT_MIN),l={};function f(o,c,h){c=c??{};let p=c&&c.index?c.index:0,n=o[p]|o[p+1]<<8|o[p+2]<<16|o[p+3]<<24;if(n<5)throw new Error(`bson size must be >= 5, is ${n}`);if(c.allowObjectSmallerThanBufferSize&&o.length<n)throw new Error(`buffer length ${o.length} must be >= bson size ${n}`);if(!c.allowObjectSmallerThanBufferSize&&o.length!==n)throw new Error(`buffer length ${o.length} must === bson size ${n}`);if(n+p>o.byteLength)throw new Error(`(bson size ${n} + options.index ${p} must be <= buffer length ${o.byteLength})`);if(o[p+n-1]!==0)throw new Error("One object, sized correctly, with a spot for an EOO, but the EOO isn't 0x00");return a(o,p,c,h)}e.deserialize=f;function a(o,c,h,p=!1){let n=h.evalFunctions==null?!1:h.evalFunctions,w=h.cacheFunctions==null?!1:h.cacheFunctions,U=h.fieldsAsRaw==null?null:h.fieldsAsRaw,N=h.raw==null?!1:h.raw,Y=typeof h.bsonRegExp=="boolean"?h.bsonRegExp:!1,J=h.promoteBuffers==null?!1:h.promoteBuffers,R=h.promoteLongs==null?!0:h.promoteLongs,W=h.promoteValues==null?!0:h.promoteValues,x=c;if(o.length<5)throw new Error("corrupt bson message < 5 bytes long");let G=o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24;if(G<5||G>o.length)throw new Error("corrupt bson message");let M=p?[]:{},V=0,z=!1;for(;!z;){let A=o[c++];if(A===0)break;let O=c;for(;o[O]!==0&&O<o.length;)O++;if(O>=o.byteLength)throw new Error("Bad BSON Document: illegal CString");let i=p?V++:o.toString("utf8",c,O);if(c=O+1,A===I.BSON_DATA_STRING){let m=o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24;if(m<=0||m>o.length-c||o[c+m-1]!==0)throw new Error("bad string length in bson");if(!Vt.validateUtf8(o,c,c+m-1))throw new Error("Invalid UTF-8 string in BSON document");let D=o.toString("utf8",c,c+m-1);M[i]=D,c=c+m}else if(A===I.BSON_DATA_OID){let m=C.Buffer.alloc(12);o.copy(m,0,c,c+12),M[i]=new St.ObjectId(m),c=c+12}else if(A===I.BSON_DATA_INT&&W===!1)M[i]=new Dt.Int32(o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24);else if(A===I.BSON_DATA_INT)M[i]=o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24;else if(A===I.BSON_DATA_NUMBER&&W===!1)M[i]=new It.Double(o.readDoubleLE(c)),c=c+8;else if(A===I.BSON_DATA_NUMBER)M[i]=o.readDoubleLE(c),c=c+8;else if(A===I.BSON_DATA_DATE){let m=o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24,D=o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24;M[i]=new Date(new K.Long(m,D).toNumber())}else if(A===I.BSON_DATA_BOOLEAN){if(o[c]!==0&&o[c]!==1)throw new Error("illegal boolean type value");M[i]=o[c++]===1}else if(A===I.BSON_DATA_OBJECT){let m=c,D=o[c]|o[c+1]<<8|o[c+2]<<16|o[c+3]<<24;if(D<=0||D>o.length-c)throw new Error("bad embedded document length in bson");N?M[i]=o.slice(c,c+D):M[i]=a(o,m,h,!1),c=c+D}else if(A===I.BSON_DATA_ARRAY){let m=c,D=o[c]|o[c+1]<<8|o[c+2]<<16|o[c+3]<<24,j=h,F=c+D;if(U&&U[i]){j={};for(let g in h)j[g]=h[g];j.raw=!0}if(M[i]=a(o,m,j,!0),c=c+D,o[c-1]!==0)throw new Error("invalid array terminator byte");if(c!==F)throw new Error("corrupted array bson")}else if(A===I.BSON_DATA_UNDEFINED)M[i]=void 0;else if(A===I.BSON_DATA_NULL)M[i]=null;else if(A===I.BSON_DATA_LONG){let m=o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24,D=o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24,j=new K.Long(m,D);R&&W===!0?M[i]=j.lessThanOrEqual(y)&&j.greaterThanOrEqual(b)?j.toNumber():j:M[i]=j}else if(A===I.BSON_DATA_DECIMAL128){let m=C.Buffer.alloc(16);o.copy(m,0,c,c+16),c=c+16;let D=new dt.Decimal128(m);"toObject"in D&&typeof D.toObject=="function"?M[i]=D.toObject():M[i]=D}else if(A===I.BSON_DATA_BINARY){let m=o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24,D=m,j=o[c++];if(m<0)throw new Error("Negative binary type element size found");if(m>o.byteLength)throw new Error("Binary type size larger than document size");if(o.slice!=null){if(j===_t.Binary.SUBTYPE_BYTE_ARRAY){if(m=o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24,m<0)throw new Error("Negative binary type element size found for subtype 0x02");if(m>D-4)throw new Error("Binary type with subtype 0x02 contains too long binary size");if(m<D-4)throw new Error("Binary type with subtype 0x02 contains too short binary size")}J&&W?M[i]=o.slice(c,c+m):M[i]=new _t.Binary(o.slice(c,c+m),j)}else{let F=C.Buffer.alloc(m);if(j===_t.Binary.SUBTYPE_BYTE_ARRAY){if(m=o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24,m<0)throw new Error("Negative binary type element size found for subtype 0x02");if(m>D-4)throw new Error("Binary type with subtype 0x02 contains too long binary size");if(m<D-4)throw new Error("Binary type with subtype 0x02 contains too short binary size")}for(O=0;O<m;O++)F[O]=o[c+O];J&&W?M[i]=F:M[i]=new _t.Binary(F,j)}c=c+m}else if(A===I.BSON_DATA_REGEXP&&Y===!1){for(O=c;o[O]!==0&&O<o.length;)O++;if(O>=o.length)throw new Error("Bad BSON Document: illegal CString");let m=o.toString("utf8",c,O);for(c=O+1,O=c;o[O]!==0&&O<o.length;)O++;if(O>=o.length)throw new Error("Bad BSON Document: illegal CString");let D=o.toString("utf8",c,O);c=O+1;let j=new Array(D.length);for(O=0;O<D.length;O++)switch(D[O]){case"m":j[O]="m";break;case"s":j[O]="g";break;case"i":j[O]="i";break}M[i]=new RegExp(m,j.join(""))}else if(A===I.BSON_DATA_REGEXP&&Y===!0){for(O=c;o[O]!==0&&O<o.length;)O++;if(O>=o.length)throw new Error("Bad BSON Document: illegal CString");let m=o.toString("utf8",c,O);for(c=O+1,O=c;o[O]!==0&&O<o.length;)O++;if(O>=o.length)throw new Error("Bad BSON Document: illegal CString");let D=o.toString("utf8",c,O);c=O+1,M[i]=new At.BSONRegExp(m,D)}else if(A===I.BSON_DATA_SYMBOL){let m=o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24;if(m<=0||m>o.length-c||o[c+m-1]!==0)throw new Error("bad string length in bson");let D=o.toString("utf8",c,c+m-1);M[i]=W?D:new Mt.BSONSymbol(D),c=c+m}else if(A===I.BSON_DATA_TIMESTAMP){let m=o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24,D=o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24;M[i]=new wt.Timestamp(m,D)}else if(A===I.BSON_DATA_MIN_KEY)M[i]=new Ut.MinKey;else if(A===I.BSON_DATA_MAX_KEY)M[i]=new Rt.MaxKey;else if(A===I.BSON_DATA_CODE){let m=o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24;if(m<=0||m>o.length-c||o[c+m-1]!==0)throw new Error("bad string length in bson");let D=o.toString("utf8",c,c+m-1);n?w?M[i]=E(D,l,M):M[i]=E(D):M[i]=new Et.Code(D),c=c+m}else if(A===I.BSON_DATA_CODE_W_SCOPE){let m=o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24;if(m<4+4+4+1)throw new Error("code_w_scope total size shorter minimum expected length");let D=o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24;if(D<=0||D>o.length-c||o[c+D-1]!==0)throw new Error("bad string length in bson");let j=o.toString("utf8",c,c+D-1);c=c+D;let F=c,g=o[c]|o[c+1]<<8|o[c+2]<<16|o[c+3]<<24,$=a(o,F,h,!1);if(c=c+g,m<4+4+g+D)throw new Error("code_w_scope total size is too short, truncating scope");if(m>4+4+g+D)throw new Error("code_w_scope total size is too long, clips outer document");n?(w?M[i]=E(j,l,M):M[i]=E(j),M[i].scope=$):M[i]=new Et.Code(j,$)}else if(A===I.BSON_DATA_DBPOINTER){let m=o[c++]|o[c++]<<8|o[c++]<<16|o[c++]<<24;if(m<=0||m>o.length-c||o[c+m-1]!==0)throw new Error("bad string length in bson");if(!Vt.validateUtf8(o,c,c+m-1))throw new Error("Invalid UTF-8 string in BSON document");let D=o.toString("utf8",c,c+m-1);c=c+m;let j=C.Buffer.alloc(12);o.copy(j,0,c,c+12);let F=new St.ObjectId(j);c=c+12,M[i]=new Nt.DBRef(D,F)}else throw new Error("Detected unknown BSON type "+A.toString(16)+' for fieldname "'+i+'"')}if(G!==c-x)throw p?new Error("corrupt array bson"):new Error("corrupt object bson");let Z=Object.keys(M).filter(A=>A.startsWith("$")),s=!0;if(Z.forEach(A=>{["$ref","$id","$db"].indexOf(A)===-1&&(s=!1)}),!s)return M;if(Nt.isDBRefLike(M)){let A=Object.assign({},M);return delete A.$ref,delete A.$id,delete A.$db,new Nt.DBRef(M.$ref,M.$id,M.$db,A)}return M}function E(o,c,h){return c?(c[o]==null&&(c[o]=new Function(o)),c[o].bind(h)):new Function(o)}});st(Zt);var Cn=Zt.deserialize,Yt=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.EJSON=e.isBSONType=void 0;function y(N){return rt.isObjectLike(N)&&Reflect.has(N,"_bsontype")&&typeof N._bsontype=="string"}e.isBSONType=y;let b=2147483647,l=-2147483648,f=9223372036854776e3,a=-9223372036854776e3,E={$oid:St.ObjectId,$binary:_t.Binary,$uuid:_t.Binary,$symbol:Mt.BSONSymbol,$numberInt:Dt.Int32,$numberDecimal:dt.Decimal128,$numberDouble:It.Double,$numberLong:K.Long,$minKey:Ut.MinKey,$maxKey:Rt.MaxKey,$regex:At.BSONRegExp,$regularExpression:At.BSONRegExp,$timestamp:wt.Timestamp};function o(N,Y={}){if(typeof N=="number"){if(Y.relaxed||Y.legacy)return N;if(Math.floor(N)===N){if(N>=l&&N<=b)return new Dt.Int32(N);if(N>=a&&N<=f)return K.Long.fromNumber(N)}return new It.Double(N)}if(N==null||typeof N!="object")return N;if(N.$undefined)return null;let J=Object.keys(N).filter(R=>R.startsWith("$")&&N[R]!=null);for(let R=0;R<J.length;R++){let W=E[J[R]];if(W)return W.fromExtendedJSON(N,Y)}if(N.$date!=null){let R=N.$date,W=new Date;return Y.legacy?typeof R=="number"?W.setTime(R):typeof R=="string"&&W.setTime(Date.parse(R)):typeof R=="string"?W.setTime(Date.parse(R)):K.Long.isLong(R)?W.setTime(R.toNumber()):typeof R=="number"&&Y.relaxed&&W.setTime(R),W}if(N.$code!=null){let R=Object.assign({},N);return N.$scope&&(R.$scope=o(N.$scope)),Et.Code.fromExtendedJSON(N)}if(N.$ref!=null||N.$dbPointer!=null){let R=N.$ref?N:N.$dbPointer;if(R instanceof Nt.DBRef)return R;let W=Object.keys(R).filter(G=>G.startsWith("$")),x=!0;if(W.forEach(G=>{["$ref","$id","$db"].indexOf(G)===-1&&(x=!1)}),x)return Nt.DBRef.fromExtendedJSON(R)}return N}function c(N,Y){return N.map(J=>p(J,Y))}function h(N){let Y=N.toISOString();return N.getUTCMilliseconds()!==0?Y:Y.slice(0,-5)+"Z"}function p(N,Y){if(Array.isArray(N))return c(N,Y);if(N===void 0)return null;if(N instanceof Date){let J=N.getTime(),R=J>-1&&J<2534023188e5;return Y.legacy?Y.relaxed&&R?{$date:N.getTime()}:{$date:h(N)}:Y.relaxed&&R?{$date:h(N)}:{$date:{$numberLong:N.getTime().toString()}}}if(typeof N=="number"&&!Y.relaxed){if(Math.floor(N)===N){let J=N>=l&&N<=b,R=N>=a&&N<=f;if(J)return{$numberInt:N.toString()};if(R)return{$numberLong:N.toString()}}return{$numberDouble:N.toString()}}if(N instanceof RegExp){let J=N.flags;if(J===void 0){let W=N.toString().match(/[gimuy]*$/);W&&(J=W[0])}return new At.BSONRegExp(N.source,J).toExtendedJSON(Y)}return N!=null&&typeof N=="object"?w(N,Y):N}let n={Binary:N=>new _t.Binary(N.value(),N.sub_type),Code:N=>new Et.Code(N.code,N.scope),DBRef:N=>new Nt.DBRef(N.collection||N.namespace,N.oid,N.db,N.fields),Decimal128:N=>new dt.Decimal128(N.bytes),Double:N=>new It.Double(N.value),Int32:N=>new Dt.Int32(N.value),Long:N=>K.Long.fromBits(N.low!=null?N.low:N.low_,N.low!=null?N.high:N.high_,N.low!=null?N.unsigned:N.unsigned_),MaxKey:()=>new Rt.MaxKey,MinKey:()=>new Ut.MinKey,ObjectID:N=>new St.ObjectId(N),ObjectId:N=>new St.ObjectId(N),BSONRegExp:N=>new At.BSONRegExp(N.pattern,N.options),Symbol:N=>new Mt.BSONSymbol(N.value),Timestamp:N=>wt.Timestamp.fromBits(N.low,N.high)};function w(N,Y){if(N==null||typeof N!="object")throw new Error("not an object instance");let J=N._bsontype;if(typeof J>"u"){let R={};for(let W in N)R[W]=p(N[W],Y);return R}else if(y(N)){let R=N;if(typeof R.toExtendedJSON!="function"){let W=n[N._bsontype];if(!W)throw new TypeError("Unrecognized or invalid _bsontype: "+N._bsontype);R=W(R)}return J==="Code"&&R.scope?R=new Et.Code(R.code,p(R.scope,Y)):J==="DBRef"&&R.oid&&(R=new Nt.DBRef(R.collection,p(R.oid,Y),R.db,R.fields)),R.toExtendedJSON(Y)}else throw new Error("_bsontype must be a string, but was: "+typeof J)}var U;(function(N){function Y(x,G){let M=Object.assign({},{relaxed:!0,legacy:!1},G);return typeof M.relaxed=="boolean"&&(M.strict=!M.relaxed),typeof M.strict=="boolean"&&(M.relaxed=!M.strict),JSON.parse(x,(V,z)=>o(z,M))}N.parse=Y;function J(x,G,M,V){M!=null&&typeof M=="object"&&(V=M,M=0),G!=null&&typeof G=="object"&&!Array.isArray(G)&&(V=G,G=void 0,M=0),V=Object.assign({},{relaxed:!0,legacy:!1},V);let z=p(x,V);return JSON.stringify(z,G,M)}N.stringify=J;function R(x,G){return G=G||{},JSON.parse(J(x,G))}N.serialize=R;function W(x,G){return G=G||{},Y(JSON.stringify(x),G)}N.deserialize=W})(U=e.EJSON||(e.EJSON={}))});st(Yt);var zn=Yt.EJSON,Jn=Yt.isBSONType,jt=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.writeIEEE754=e.readIEEE754=void 0;function y(l,f,a,E,o){let c,h,p=a==="big",n=o*8-E-1,w=(1<<n)-1,U=w>>1,N=-7,Y=p?0:o-1,J=p?1:-1,R=l[f+Y];for(Y+=J,c=R&(1<<-N)-1,R>>=-N,N+=n;N>0;c=c*256+l[f+Y],Y+=J,N-=8);for(h=c&(1<<-N)-1,c>>=-N,N+=E;N>0;h=h*256+l[f+Y],Y+=J,N-=8);if(c===0)c=1-U;else{if(c===w)return h?NaN:(R?-1:1)*(1/0);h=h+Math.pow(2,E),c=c-U}return(R?-1:1)*h*Math.pow(2,c-E)}e.readIEEE754=y;function b(l,f,a,E,o,c){let h,p,n,w=E==="big",U=c*8-o-1,N=(1<<U)-1,Y=N>>1,J=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,R=w?c-1:0,W=w?-1:1,x=f<0||f===0&&1/f<0?1:0;for(f=Math.abs(f),isNaN(f)||f===1/0?(p=isNaN(f)?1:0,h=N):(h=Math.floor(Math.log(f)/Math.LN2),f*(n=Math.pow(2,-h))<1&&(h--,n*=2),h+Y>=1?f+=J/n:f+=J*Math.pow(2,1-Y),f*n>=2&&(h++,n/=2),h+Y>=N?(p=0,h=N):h+Y>=1?(p=(f*n-1)*Math.pow(2,o),h=h+Y):(p=f*Math.pow(2,Y-1)*Math.pow(2,o),h=0)),isNaN(f)&&(p=0);o>=8;)l[a+R]=p&255,R+=W,p/=256,o-=8;for(h=h<<o|p,isNaN(f)&&(h+=8),U+=o;U>0;)l[a+R]=h&255,R+=W,h/=256,U-=8;l[a+R-W]|=x*128}e.writeIEEE754=b});st(jt);var Wn=jt.writeIEEE754,Xn=jt.readIEEE754,qt=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.serializeInto=void 0;let y=/\x00/,b=new Set(["$db","$ref","$id","$clusterTime"]);function l(s){return Object.prototype.toString.call(s)==="[object RegExp]"}function f(s,A,O,i,m){s[i++]=I.BSON_DATA_STRING;let D=m?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");i=i+D+1,s[i-1]=0;let j=s.write(O,i+4,void 0,"utf8");return s[i+3]=j+1>>24&255,s[i+2]=j+1>>16&255,s[i+1]=j+1>>8&255,s[i]=j+1&255,i=i+4+j,s[i++]=0,i}function a(s,A,O,i,m){if(Number.isInteger(O)&&O>=I.BSON_INT32_MIN&&O<=I.BSON_INT32_MAX){s[i++]=I.BSON_DATA_INT;let D=m?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");i=i+D,s[i++]=0,s[i++]=O&255,s[i++]=O>>8&255,s[i++]=O>>16&255,s[i++]=O>>24&255}else{s[i++]=I.BSON_DATA_NUMBER;let D=m?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");i=i+D,s[i++]=0,jt.writeIEEE754(s,O,i,"little",52,8),i=i+8}return i}function E(s,A,O,i,m){s[i++]=I.BSON_DATA_NULL;let D=m?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");return i=i+D,s[i++]=0,i}function o(s,A,O,i,m){s[i++]=I.BSON_DATA_BOOLEAN;let D=m?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");return i=i+D,s[i++]=0,s[i++]=O?1:0,i}function c(s,A,O,i,m){s[i++]=I.BSON_DATA_DATE;let D=m?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");i=i+D,s[i++]=0;let j=K.Long.fromNumber(O.getTime()),F=j.getLowBits(),g=j.getHighBits();return s[i++]=F&255,s[i++]=F>>8&255,s[i++]=F>>16&255,s[i++]=F>>24&255,s[i++]=g&255,s[i++]=g>>8&255,s[i++]=g>>16&255,s[i++]=g>>24&255,i}function h(s,A,O,i,m){s[i++]=I.BSON_DATA_REGEXP;let D=m?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");if(i=i+D,s[i++]=0,O.source&&O.source.match(y)!=null)throw Error("value "+O.source+" must not contain null bytes");return i=i+s.write(O.source,i,void 0,"utf8"),s[i++]=0,O.ignoreCase&&(s[i++]=105),O.global&&(s[i++]=115),O.multiline&&(s[i++]=109),s[i++]=0,i}function p(s,A,O,i,m){s[i++]=I.BSON_DATA_REGEXP;let D=m?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");if(i=i+D,s[i++]=0,O.pattern.match(y)!=null)throw Error("pattern "+O.pattern+" must not contain null bytes");return i=i+s.write(O.pattern,i,void 0,"utf8"),s[i++]=0,i=i+s.write(O.options.split("").sort().join(""),i,void 0,"utf8"),s[i++]=0,i}function n(s,A,O,i,m){O===null?s[i++]=I.BSON_DATA_NULL:O._bsontype==="MinKey"?s[i++]=I.BSON_DATA_MIN_KEY:s[i++]=I.BSON_DATA_MAX_KEY;let D=m?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");return i=i+D,s[i++]=0,i}function w(s,A,O,i,m){s[i++]=I.BSON_DATA_OID;let D=m?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");if(i=i+D,s[i++]=0,typeof O.id=="string")s.write(O.id,i,void 0,"binary");else if(O.id&&O.id.copy)O.id.copy(s,i,0,12);else throw new TypeError("object ["+JSON.stringify(O)+"] is not a valid ObjectId");return i+12}function U(s,A,O,i,m){s[i++]=I.BSON_DATA_BINARY;let D=m?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");i=i+D,s[i++]=0;let j=O.length;return s[i++]=j&255,s[i++]=j>>8&255,s[i++]=j>>16&255,s[i++]=j>>24&255,s[i++]=I.BSON_BINARY_SUBTYPE_DEFAULT,s.set(mt.ensureBuffer(O),i),i=i+j,i}function N(s,A,O,i,m=!1,D=0,j=!1,F=!0,g=!1,$=[]){for(let d=0;d<$.length;d++)if($[d]===O)throw new Error("cyclic dependency detected");$.push(O),s[i++]=Array.isArray(O)?I.BSON_DATA_ARRAY:I.BSON_DATA_OBJECT;let L=g?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");i=i+L,s[i++]=0;let T=Z(s,O,m,i,D+1,j,F,$);return $.pop(),T}function Y(s,A,O,i,m){s[i++]=I.BSON_DATA_DECIMAL128;let D=m?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");return i=i+D,s[i++]=0,O.bytes.copy(s,i,0,16),i+16}function J(s,A,O,i,m){s[i++]=O._bsontype==="Long"?I.BSON_DATA_LONG:I.BSON_DATA_TIMESTAMP;let D=m?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");i=i+D,s[i++]=0;let j=O.getLowBits(),F=O.getHighBits();return s[i++]=j&255,s[i++]=j>>8&255,s[i++]=j>>16&255,s[i++]=j>>24&255,s[i++]=F&255,s[i++]=F>>8&255,s[i++]=F>>16&255,s[i++]=F>>24&255,i}function R(s,A,O,i,m){O=O.valueOf(),s[i++]=I.BSON_DATA_INT;let D=m?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");return i=i+D,s[i++]=0,s[i++]=O&255,s[i++]=O>>8&255,s[i++]=O>>16&255,s[i++]=O>>24&255,i}function W(s,A,O,i,m){s[i++]=I.BSON_DATA_NUMBER;let D=m?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");return i=i+D,s[i++]=0,jt.writeIEEE754(s,O.value,i,"little",52,8),i=i+8,i}function x(s,A,O,i,m=!1,D=0,j){s[i++]=I.BSON_DATA_CODE;let F=j?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");i=i+F,s[i++]=0;let g=rt.normalizedFunctionString(O),$=s.write(g,i+4,void 0,"utf8")+1;return s[i]=$&255,s[i+1]=$>>8&255,s[i+2]=$>>16&255,s[i+3]=$>>24&255,i=i+4+$-1,s[i++]=0,i}function G(s,A,O,i,m=!1,D=0,j=!1,F=!0,g=!1){if(O.scope&&typeof O.scope=="object"){s[i++]=I.BSON_DATA_CODE_W_SCOPE;let $=g?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");i=i+$,s[i++]=0;let L=i,T=typeof O.code=="string"?O.code:O.code.toString();i=i+4;let d=s.write(T,i+4,void 0,"utf8")+1;s[i]=d&255,s[i+1]=d>>8&255,s[i+2]=d>>16&255,s[i+3]=d>>24&255,s[i+4+d-1]=0,i=i+d+4;let q=Z(s,O.scope,m,i,D+1,j,F);i=q-1;let X=q-L;s[L++]=X&255,s[L++]=X>>8&255,s[L++]=X>>16&255,s[L++]=X>>24&255,s[i++]=0}else{s[i++]=I.BSON_DATA_CODE;let $=g?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");i=i+$,s[i++]=0;let L=O.code.toString(),T=s.write(L,i+4,void 0,"utf8")+1;s[i]=T&255,s[i+1]=T>>8&255,s[i+2]=T>>16&255,s[i+3]=T>>24&255,i=i+4+T-1,s[i++]=0}return i}function M(s,A,O,i,m){s[i++]=I.BSON_DATA_BINARY;let D=m?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");i=i+D,s[i++]=0;let j=O.value(!0),F=O.position;return O.sub_type===_t.Binary.SUBTYPE_BYTE_ARRAY&&(F=F+4),s[i++]=F&255,s[i++]=F>>8&255,s[i++]=F>>16&255,s[i++]=F>>24&255,s[i++]=O.sub_type,O.sub_type===_t.Binary.SUBTYPE_BYTE_ARRAY&&(F=F-4,s[i++]=F&255,s[i++]=F>>8&255,s[i++]=F>>16&255,s[i++]=F>>24&255),s.set(j,i),i=i+O.position,i}function V(s,A,O,i,m){s[i++]=I.BSON_DATA_SYMBOL;let D=m?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");i=i+D,s[i++]=0;let j=s.write(O.value,i+4,void 0,"utf8")+1;return s[i]=j&255,s[i+1]=j>>8&255,s[i+2]=j>>16&255,s[i+3]=j>>24&255,i=i+4+j-1,s[i++]=0,i}function z(s,A,O,i,m,D,j){s[i++]=I.BSON_DATA_OBJECT;let F=j?s.write(A,i,void 0,"ascii"):s.write(A,i,void 0,"utf8");i=i+F,s[i++]=0;let g=i,$={$ref:O.collection||O.namespace,$id:O.oid};O.db!=null&&($.$db=O.db),$=Object.assign($,O.fields);let L=Z(s,$,!1,i,m+1,D),T=L-g;return s[g++]=T&255,s[g++]=T>>8&255,s[g++]=T>>16&255,s[g++]=T>>24&255,L}function Z(s,A,O=!1,i=0,m=0,D=!1,j=!0,F=[]){i=i||0,F=F||[],F.push(A);let g=i+4;if(Array.isArray(A))for(let L=0;L<A.length;L++){let T=""+L,d=A[L];if(d&&d.toBSON){if(typeof d.toBSON!="function")throw new TypeError("toBSON is not a function");d=d.toBSON()}if(typeof d=="string")g=f(s,T,d,g,!0);else if(typeof d=="number")g=a(s,T,d,g,!0);else{if(typeof d=="bigint")throw new TypeError("Unsupported type BigInt, please use Decimal128");if(typeof d=="boolean")g=o(s,T,d,g,!0);else if(d instanceof Date||rt.isDate(d))g=c(s,T,d,g,!0);else if(d===void 0)g=E(s,T,d,g,!0);else if(d===null)g=E(s,T,d,g,!0);else if(d._bsontype==="ObjectId"||d._bsontype==="ObjectID")g=w(s,T,d,g,!0);else if(C.Buffer.isBuffer(d)||rt.isUint8Array(d))g=U(s,T,d,g,!0);else if(d instanceof RegExp||l(d))g=h(s,T,d,g,!0);else if(typeof d=="object"&&d._bsontype==null)g=N(s,T,d,g,O,m,D,j,!0,F);else if(typeof d=="object"&&Yt.isBSONType(d)&&d._bsontype==="Decimal128")g=Y(s,T,d,g,!0);else if(d._bsontype==="Long"||d._bsontype==="Timestamp")g=J(s,T,d,g,!0);else if(d._bsontype==="Double")g=W(s,T,d,g,!0);else if(typeof d=="function"&&D)g=x(s,T,d,g,O,m,!0);else if(d._bsontype==="Code")g=G(s,T,d,g,O,m,D,j,!0);else if(d._bsontype==="Binary")g=M(s,T,d,g,!0);else if(d._bsontype==="Symbol")g=V(s,T,d,g,!0);else if(d._bsontype==="DBRef")g=z(s,T,d,g,m,D,!0);else if(d._bsontype==="BSONRegExp")g=p(s,T,d,g,!0);else if(d._bsontype==="Int32")g=R(s,T,d,g,!0);else if(d._bsontype==="MinKey"||d._bsontype==="MaxKey")g=n(s,T,d,g,!0);else if(typeof d._bsontype<"u")throw new TypeError("Unrecognized or invalid _bsontype: "+d._bsontype)}}else if(A instanceof $t.Map){let L=A.entries(),T=!1;for(;!T;){let d=L.next();if(T=!!d.done,T)continue;let q=d.value[0],X=d.value[1],et=typeof X;if(typeof q=="string"&&!b.has(q)){if(q.match(y)!=null)throw Error("key "+q+" must not contain null bytes");if(O){if(q[0]==="$")throw Error("key "+q+" must not start with '$'");if(~q.indexOf("."))throw Error("key "+q+" must not contain '.'")}}if(et==="string")g=f(s,q,X,g);else if(et==="number")g=a(s,q,X,g);else{if(et==="bigint"||rt.isBigInt64Array(X)||rt.isBigUInt64Array(X))throw new TypeError("Unsupported type BigInt, please use Decimal128");if(et==="boolean")g=o(s,q,X,g);else if(X instanceof Date||rt.isDate(X))g=c(s,q,X,g);else if(X===null||X===void 0&&j===!1)g=E(s,q,X,g);else if(X._bsontype==="ObjectId"||X._bsontype==="ObjectID")g=w(s,q,X,g);else if(C.Buffer.isBuffer(X)||rt.isUint8Array(X))g=U(s,q,X,g);else if(X instanceof RegExp||l(X))g=h(s,q,X,g);else if(et==="object"&&X._bsontype==null)g=N(s,q,X,g,O,m,D,j,!1,F);else if(et==="object"&&X._bsontype==="Decimal128")g=Y(s,q,X,g);else if(X._bsontype==="Long"||X._bsontype==="Timestamp")g=J(s,q,X,g);else if(X._bsontype==="Double")g=W(s,q,X,g);else if(X._bsontype==="Code")g=G(s,q,X,g,O,m,D,j);else if(typeof X=="function"&&D)g=x(s,q,X,g,O,m,D);else if(X._bsontype==="Binary")g=M(s,q,X,g);else if(X._bsontype==="Symbol")g=V(s,q,X,g);else if(X._bsontype==="DBRef")g=z(s,q,X,g,m,D);else if(X._bsontype==="BSONRegExp")g=p(s,q,X,g);else if(X._bsontype==="Int32")g=R(s,q,X,g);else if(X._bsontype==="MinKey"||X._bsontype==="MaxKey")g=n(s,q,X,g);else if(typeof X._bsontype<"u")throw new TypeError("Unrecognized or invalid _bsontype: "+X._bsontype)}}}else{if(A.toBSON){if(typeof A.toBSON!="function")throw new TypeError("toBSON is not a function");if(A=A.toBSON(),A!=null&&typeof A!="object")throw new TypeError("toBSON function did not return an object")}for(let L in A){let T=A[L];if(T&&T.toBSON){if(typeof T.toBSON!="function")throw new TypeError("toBSON is not a function");T=T.toBSON()}let d=typeof T;if(typeof L=="string"&&!b.has(L)){if(L.match(y)!=null)throw Error("key "+L+" must not contain null bytes");if(O){if(L[0]==="$")throw Error("key "+L+" must not start with '$'");if(~L.indexOf("."))throw Error("key "+L+" must not contain '.'")}}if(d==="string")g=f(s,L,T,g);else if(d==="number")g=a(s,L,T,g);else{if(d==="bigint")throw new TypeError("Unsupported type BigInt, please use Decimal128");if(d==="boolean")g=o(s,L,T,g);else if(T instanceof Date||rt.isDate(T))g=c(s,L,T,g);else if(T===void 0)j===!1&&(g=E(s,L,T,g));else if(T===null)g=E(s,L,T,g);else if(T._bsontype==="ObjectId"||T._bsontype==="ObjectID")g=w(s,L,T,g);else if(C.Buffer.isBuffer(T)||rt.isUint8Array(T))g=U(s,L,T,g);else if(T instanceof RegExp||l(T))g=h(s,L,T,g);else if(d==="object"&&T._bsontype==null)g=N(s,L,T,g,O,m,D,j,!1,F);else if(d==="object"&&T._bsontype==="Decimal128")g=Y(s,L,T,g);else if(T._bsontype==="Long"||T._bsontype==="Timestamp")g=J(s,L,T,g);else if(T._bsontype==="Double")g=W(s,L,T,g);else if(T._bsontype==="Code")g=G(s,L,T,g,O,m,D,j);else if(typeof T=="function"&&D)g=x(s,L,T,g,O,m,D);else if(T._bsontype==="Binary")g=M(s,L,T,g);else if(T._bsontype==="Symbol")g=V(s,L,T,g);else if(T._bsontype==="DBRef")g=z(s,L,T,g,m,D);else if(T._bsontype==="BSONRegExp")g=p(s,L,T,g);else if(T._bsontype==="Int32")g=R(s,L,T,g);else if(T._bsontype==="MinKey"||T._bsontype==="MaxKey")g=n(s,L,T,g);else if(typeof T._bsontype<"u")throw new TypeError("Unrecognized or invalid _bsontype: "+T._bsontype)}}}F.pop(),s[g++]=0;let $=g-i;return s[i++]=$&255,s[i++]=$>>8&255,s[i++]=$>>16&255,s[i++]=$>>24&255,g}e.serializeInto=Z});st(qt);var kn=qt.serializeInto,H=ot(function(B,e){Object.defineProperty(e,"__esModule",{value:!0}),e.deserializeStream=e.calculateObjectSize=e.deserialize=e.serializeWithBufferAndIndex=e.serialize=e.setInternalBufferSize=e.ObjectID=e.Decimal128=e.BSONRegExp=e.MaxKey=e.MinKey=e.Int32=e.Double=e.Timestamp=e.Long=e.ObjectId=e.Binary=e.DBRef=e.BSONSymbol=e.Map=e.Code=e.LongWithoutOverridesClass=e.EJSON=e.JS_INT_MIN=e.JS_INT_MAX=e.BSON_INT64_MIN=e.BSON_INT64_MAX=e.BSON_INT32_MIN=e.BSON_INT32_MAX=e.BSON_DATA_UNDEFINED=e.BSON_DATA_TIMESTAMP=e.BSON_DATA_SYMBOL=e.BSON_DATA_STRING=e.BSON_DATA_REGEXP=e.BSON_DATA_OID=e.BSON_DATA_OBJECT=e.BSON_DATA_NUMBER=e.BSON_DATA_NULL=e.BSON_DATA_MIN_KEY=e.BSON_DATA_MAX_KEY=e.BSON_DATA_LONG=e.BSON_DATA_INT=e.BSON_DATA_DECIMAL128=e.BSON_DATA_DBPOINTER=e.BSON_DATA_DATE=e.BSON_DATA_CODE_W_SCOPE=e.BSON_DATA_CODE=e.BSON_DATA_BOOLEAN=e.BSON_DATA_BINARY=e.BSON_DATA_ARRAY=e.BSON_BINARY_SUBTYPE_UUID_NEW=e.BSON_BINARY_SUBTYPE_UUID=e.BSON_BINARY_SUBTYPE_USER_DEFINED=e.BSON_BINARY_SUBTYPE_MD5=e.BSON_BINARY_SUBTYPE_FUNCTION=e.BSON_BINARY_SUBTYPE_DEFAULT=e.BSON_BINARY_SUBTYPE_BYTE_ARRAY=void 0,Object.defineProperty(e,"Binary",{enumerable:!0,get:function(){return _t.Binary}}),Object.defineProperty(e,"Code",{enumerable:!0,get:function(){return Et.Code}}),Object.defineProperty(e,"DBRef",{enumerable:!0,get:function(){return Nt.DBRef}}),Object.defineProperty(e,"Decimal128",{enumerable:!0,get:function(){return dt.Decimal128}}),Object.defineProperty(e,"Double",{enumerable:!0,get:function(){return It.Double}}),Object.defineProperty(e,"Int32",{enumerable:!0,get:function(){return Dt.Int32}}),Object.defineProperty(e,"Long",{enumerable:!0,get:function(){return K.Long}}),Object.defineProperty(e,"Map",{enumerable:!0,get:function(){return $t.Map}}),Object.defineProperty(e,"MaxKey",{enumerable:!0,get:function(){return Rt.MaxKey}}),Object.defineProperty(e,"MinKey",{enumerable:!0,get:function(){return Ut.MinKey}}),Object.defineProperty(e,"ObjectId",{enumerable:!0,get:function(){return St.ObjectId}}),Object.defineProperty(e,"ObjectID",{enumerable:!0,get:function(){return St.ObjectId}}),Object.defineProperty(e,"BSONRegExp",{enumerable:!0,get:function(){return At.BSONRegExp}}),Object.defineProperty(e,"BSONSymbol",{enumerable:!0,get:function(){return Mt.BSONSymbol}}),Object.defineProperty(e,"Timestamp",{enumerable:!0,get:function(){return wt.Timestamp}}),Object.defineProperty(e,"BSON_BINARY_SUBTYPE_BYTE_ARRAY",{enumerable:!0,get:function(){return I.BSON_BINARY_SUBTYPE_BYTE_ARRAY}}),Object.defineProperty(e,"BSON_BINARY_SUBTYPE_DEFAULT",{enumerable:!0,get:function(){return I.BSON_BINARY_SUBTYPE_DEFAULT}}),Object.defineProperty(e,"BSON_BINARY_SUBTYPE_FUNCTION",{enumerable:!0,get:function(){return I.BSON_BINARY_SUBTYPE_FUNCTION}}),Object.defineProperty(e,"BSON_BINARY_SUBTYPE_MD5",{enumerable:!0,get:function(){return I.BSON_BINARY_SUBTYPE_MD5}}),Object.defineProperty(e,"BSON_BINARY_SUBTYPE_USER_DEFINED",{enumerable:!0,get:function(){return I.BSON_BINARY_SUBTYPE_USER_DEFINED}}),Object.defineProperty(e,"BSON_BINARY_SUBTYPE_UUID",{enumerable:!0,get:function(){return I.BSON_BINARY_SUBTYPE_UUID}}),Object.defineProperty(e,"BSON_BINARY_SUBTYPE_UUID_NEW",{enumerable:!0,get:function(){return I.BSON_BINARY_SUBTYPE_UUID_NEW}}),Object.defineProperty(e,"BSON_DATA_ARRAY",{enumerable:!0,get:function(){return I.BSON_DATA_ARRAY}}),Object.defineProperty(e,"BSON_DATA_BINARY",{enumerable:!0,get:function(){return I.BSON_DATA_BINARY}}),Object.defineProperty(e,"BSON_DATA_BOOLEAN",{enumerable:!0,get:function(){return I.BSON_DATA_BOOLEAN}}),Object.defineProperty(e,"BSON_DATA_CODE",{enumerable:!0,get:function(){return I.BSON_DATA_CODE}}),Object.defineProperty(e,"BSON_DATA_CODE_W_SCOPE",{enumerable:!0,get:function(){return I.BSON_DATA_CODE_W_SCOPE}}),Object.defineProperty(e,"BSON_DATA_DATE",{enumerable:!0,get:function(){return I.BSON_DATA_DATE}}),Object.defineProperty(e,"BSON_DATA_DBPOINTER",{enumerable:!0,get:function(){return I.BSON_DATA_DBPOINTER}}),Object.defineProperty(e,"BSON_DATA_DECIMAL128",{enumerable:!0,get:function(){return I.BSON_DATA_DECIMAL128}}),Object.defineProperty(e,"BSON_DATA_INT",{enumerable:!0,get:function(){return I.BSON_DATA_INT}}),Object.defineProperty(e,"BSON_DATA_LONG",{enumerable:!0,get:function(){return I.BSON_DATA_LONG}}),Object.defineProperty(e,"BSON_DATA_MAX_KEY",{enumerable:!0,get:function(){return I.BSON_DATA_MAX_KEY}}),Object.defineProperty(e,"BSON_DATA_MIN_KEY",{enumerable:!0,get:function(){return I.BSON_DATA_MIN_KEY}}),Object.defineProperty(e,"BSON_DATA_NULL",{enumerable:!0,get:function(){return I.BSON_DATA_NULL}}),Object.defineProperty(e,"BSON_DATA_NUMBER",{enumerable:!0,get:function(){return I.BSON_DATA_NUMBER}}),Object.defineProperty(e,"BSON_DATA_OBJECT",{enumerable:!0,get:function(){return I.BSON_DATA_OBJECT}}),Object.defineProperty(e,"BSON_DATA_OID",{enumerable:!0,get:function(){return I.BSON_DATA_OID}}),Object.defineProperty(e,"BSON_DATA_REGEXP",{enumerable:!0,get:function(){return I.BSON_DATA_REGEXP}}),Object.defineProperty(e,"BSON_DATA_STRING",{enumerable:!0,get:function(){return I.BSON_DATA_STRING}}),Object.defineProperty(e,"BSON_DATA_SYMBOL",{enumerable:!0,get:function(){return I.BSON_DATA_SYMBOL}}),Object.defineProperty(e,"BSON_DATA_TIMESTAMP",{enumerable:!0,get:function(){return I.BSON_DATA_TIMESTAMP}}),Object.defineProperty(e,"BSON_DATA_UNDEFINED",{enumerable:!0,get:function(){return I.BSON_DATA_UNDEFINED}}),Object.defineProperty(e,"BSON_INT32_MAX",{enumerable:!0,get:function(){return I.BSON_INT32_MAX}}),Object.defineProperty(e,"BSON_INT32_MIN",{enumerable:!0,get:function(){return I.BSON_INT32_MIN}}),Object.defineProperty(e,"BSON_INT64_MAX",{enumerable:!0,get:function(){return I.BSON_INT64_MAX}}),Object.defineProperty(e,"BSON_INT64_MIN",{enumerable:!0,get:function(){return I.BSON_INT64_MIN}}),Object.defineProperty(e,"JS_INT_MAX",{enumerable:!0,get:function(){return I.JS_INT_MAX}}),Object.defineProperty(e,"JS_INT_MIN",{enumerable:!0,get:function(){return I.JS_INT_MIN}}),Object.defineProperty(e,"EJSON",{enumerable:!0,get:function(){return Yt.EJSON}});var y=wt;Object.defineProperty(e,"LongWithoutOverridesClass",{enumerable:!0,get:function(){return y.LongWithoutOverridesClass}});let b=1024*1024*17,l=C.Buffer.alloc(b);function f(p){l.length<p&&(l=C.Buffer.alloc(p))}e.setInternalBufferSize=f;function a(p,n={}){let w=typeof n.checkKeys=="boolean"?n.checkKeys:!1,U=typeof n.serializeFunctions=="boolean"?n.serializeFunctions:!1,N=typeof n.ignoreUndefined=="boolean"?n.ignoreUndefined:!0,Y=typeof n.minInternalBufferSize=="number"?n.minInternalBufferSize:b;l.length<Y&&(l=C.Buffer.alloc(Y));let J=qt.serializeInto(l,p,w,0,0,U,N,[]),R=C.Buffer.alloc(J);return l.copy(R,0,0,R.length),R}e.serialize=a;function E(p,n,w={}){let U=typeof w.checkKeys=="boolean"?w.checkKeys:!1,N=typeof w.serializeFunctions=="boolean"?w.serializeFunctions:!1,Y=typeof w.ignoreUndefined=="boolean"?w.ignoreUndefined:!0,J=typeof w.index=="number"?w.index:0,R=qt.serializeInto(l,p,U,0,0,N,Y);return l.copy(n,J,0,R),J+R-1}e.serializeWithBufferAndIndex=E;function o(p,n={}){return Zt.deserialize(mt.ensureBuffer(p),n)}e.deserialize=o;function c(p,n={}){n=n||{};let w=typeof n.serializeFunctions=="boolean"?n.serializeFunctions:!1,U=typeof n.ignoreUndefined=="boolean"?n.ignoreUndefined:!0;return ye.calculateObjectSize(p,w,U)}e.calculateObjectSize=c;function h(p,n,w,U,N,Y){let J=Object.assign({allowObjectSmallerThanBufferSize:!0,index:0},Y),R=mt.ensureBuffer(p),W=n;for(let x=0;x<w;x++){let G=R[W]|R[W+1]<<8|R[W+2]<<16|R[W+3]<<24;J.index=W,U[N+x]=Zt.deserialize(R,J),W=W+G}return W}e.deserializeStream=h}),Kn=st(H),Hn=H.deserializeStream,Gn=H.calculateObjectSize,be=H.deserialize,Vn=H.serializeWithBufferAndIndex,de=H.serialize,Zn=H.setInternalBufferSize,qn=H.ObjectID,Qn=H.Decimal128,xn=H.BSONRegExp,$n=H.MaxKey,ti=H.MinKey,ei=H.Int32,ri=H.Double,ni=H.Timestamp,ii=H.Long,oi=H.ObjectId,si=H.Binary,fi=H.DBRef,ui=H.BSONSymbol,ai=H.Map,li=H.Code,ci=H.LongWithoutOverridesClass,hi=H.EJSON,_i=H.JS_INT_MIN,yi=H.JS_INT_MAX,Bi=H.BSON_INT64_MIN,Ni=H.BSON_INT64_MAX,gi=H.BSON_INT32_MIN,pi=H.BSON_INT32_MAX,Oi=H.BSON_DATA_UNDEFINED,Si=H.BSON_DATA_TIMESTAMP,Ai=H.BSON_DATA_SYMBOL,Ei=H.BSON_DATA_STRING,mi=H.BSON_DATA_REGEXP,wi=H.BSON_DATA_OID,Ti=H.BSON_DATA_OBJECT,Ii=H.BSON_DATA_NUMBER,Di=H.BSON_DATA_NULL,bi=H.BSON_DATA_MIN_KEY,di=H.BSON_DATA_MAX_KEY,Ri=H.BSON_DATA_LONG,Ui=H.BSON_DATA_INT,Mi=H.BSON_DATA_DECIMAL128,Pi=H.BSON_DATA_DBPOINTER,ji=H.BSON_DATA_DATE,Yi=H.BSON_DATA_CODE_W_SCOPE,vi=H.BSON_DATA_CODE,Fi=H.BSON_DATA_BOOLEAN,Li=H.BSON_DATA_BINARY,Ci=H.BSON_DATA_ARRAY,zi=H.BSON_BINARY_SUBTYPE_UUID_NEW,Ji=H.BSON_BINARY_SUBTYPE_UUID,Wi=H.BSON_BINARY_SUBTYPE_USER_DEFINED,Xi=H.BSON_BINARY_SUBTYPE_MD5,ki=H.BSON_BINARY_SUBTYPE_FUNCTION,Ki=H.BSON_BINARY_SUBTYPE_DEFAULT,Hi=H.BSON_BINARY_SUBTYPE_BYTE_ARRAY;function Be(B,e){return be(new Uint8Array(B),e)}var gr="4.2.2",te={dataType:null,batchType:null,name:"BSON",id:"bson",module:"bson",version:gr,extensions:["bson"],mimeTypes:["application/bson"],category:"json",binary:!0,parse:pr,parseSync:Or,options:{bson:{}}};async function pr(B,e){let y={...te.options.bson,...e?.bson};return Be(B,y)}function Or(B,e){let y={...te.options.bson,...e?.bson};return Be(B,y)}function Ne(B,e){return de(B).buffer}var Sr="4.2.2",Ue={name:"BSON",id:"bson",module:"bson",version:Sr,extensions:["bson"],options:{bson:{}},async encode(B,e){return Ne(B,{})},encodeSync(B,e){return Ne(B,{})}};return ze(vt);})();
|
|
17
17
|
return __exports__;
|
|
18
18
|
});
|
package/dist/index.cjs
CHANGED
|
@@ -43,7 +43,7 @@ function parseBSONSync(value, options) {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
// dist/bson-loader.js
|
|
46
|
-
var VERSION = true ? "4.2.
|
|
46
|
+
var VERSION = true ? "4.2.2" : "latest";
|
|
47
47
|
var BSONLoader = {
|
|
48
48
|
dataType: null,
|
|
49
49
|
batchType: null,
|
|
@@ -78,7 +78,7 @@ function encodeBSONSync(value, options) {
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
// dist/bson-writer.js
|
|
81
|
-
var VERSION2 = true ? "4.2.
|
|
81
|
+
var VERSION2 = true ? "4.2.2" : "latest";
|
|
82
82
|
var BSONWriter = {
|
|
83
83
|
name: "BSON",
|
|
84
84
|
id: "bson",
|
package/dist/index.cjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["index.js", "lib/parsers/parse-bson.js", "bson-loader.js", "lib/encoders/encode-bson.js", "bson-writer.js"],
|
|
4
|
-
"sourcesContent": ["// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nexport { BSONLoader } from \"./bson-loader.js\";\nexport { BSONWriter } from \"./bson-writer.js\";\n", "// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport * as BSON from 'bson';\nexport function parseBSONSync(value, options) {\n const parsedData = BSON.deserialize(new Uint8Array(value), options);\n return parsedData;\n}\n", "import { parseBSONSync } from \"./lib/parsers/parse-bson.js\";\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof \"4.2.
|
|
4
|
+
"sourcesContent": ["// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nexport { BSONLoader } from \"./bson-loader.js\";\nexport { BSONWriter } from \"./bson-writer.js\";\n", "// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport * as BSON from 'bson';\nexport function parseBSONSync(value, options) {\n const parsedData = BSON.deserialize(new Uint8Array(value), options);\n return parsedData;\n}\n", "import { parseBSONSync } from \"./lib/parsers/parse-bson.js\";\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof \"4.2.2\" !== 'undefined' ? \"4.2.2\" : 'latest';\nexport const BSONLoader = {\n dataType: null,\n batchType: null,\n name: 'BSON',\n id: 'bson',\n module: 'bson',\n version: VERSION,\n extensions: ['bson'],\n mimeTypes: ['application/bson'],\n category: 'json',\n binary: true,\n parse,\n parseSync,\n options: {\n bson: {}\n }\n};\nasync function parse(arrayBuffer, options) {\n const bsonOptions = { ...BSONLoader.options.bson, ...options?.bson };\n return parseBSONSync(arrayBuffer, bsonOptions);\n}\nfunction parseSync(arrayBuffer, options) {\n const bsonOptions = { ...BSONLoader.options.bson, ...options?.bson };\n return parseBSONSync(arrayBuffer, bsonOptions);\n}\n", "// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport * as BSON from 'bson';\nexport function encodeBSONSync(value, options) {\n const uint8Array = BSON.serialize(value);\n // TODO - make sure the uint8array occupies the entire buffer.\n return uint8Array.buffer;\n}\n", "// loaders.gl\n// SPDX-License-Identifier: MIT\n// Copyright (c) vis.gl contributors\nimport { encodeBSONSync } from \"./lib/encoders/encode-bson.js\";\n// __VERSION__ is injected by babel-plugin-version-inline\n// @ts-ignore TS2304: Cannot find name '__VERSION__'.\nconst VERSION = typeof \"4.2.2\" !== 'undefined' ? \"4.2.2\" : 'latest';\nexport const BSONWriter = {\n name: 'BSON',\n id: 'bson',\n module: 'bson',\n version: VERSION,\n extensions: ['bson'],\n options: {\n bson: {}\n },\n async encode(data, options) {\n return encodeBSONSync(data, {}); // options\n },\n encodeSync(data, options) {\n return encodeBSONSync(data, {}); // options\n }\n};\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACGA,WAAsB;AACf,SAAS,cAAc,OAAO,SAAS;AAC1C,QAAM,aAAkB,iBAAY,IAAI,WAAW,KAAK,GAAG,OAAO;AAClE,SAAO;AACX;;;ACJA,IAAM,UAAU,OAAiC,UAAU;AACpD,IAAM,aAAa;AAAA,EACtB,UAAU;AAAA,EACV,WAAW;AAAA,EACX,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,YAAY,CAAC,MAAM;AAAA,EACnB,WAAW,CAAC,kBAAkB;AAAA,EAC9B,UAAU;AAAA,EACV,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA,SAAS;AAAA,IACL,MAAM,CAAC;AAAA,EACX;AACJ;AACA,eAAe,MAAM,aAAa,SAAS;AACvC,QAAM,cAAc,EAAE,GAAG,WAAW,QAAQ,MAAM,GAAG,mCAAS,KAAK;AACnE,SAAO,cAAc,aAAa,WAAW;AACjD;AACA,SAAS,UAAU,aAAa,SAAS;AACrC,QAAM,cAAc,EAAE,GAAG,WAAW,QAAQ,MAAM,GAAG,mCAAS,KAAK;AACnE,SAAO,cAAc,aAAa,WAAW;AACjD;;;ACzBA,IAAAA,QAAsB;AACf,SAAS,eAAe,OAAO,SAAS;AAC3C,QAAM,aAAkB,gBAAU,KAAK;AAEvC,SAAO,WAAW;AACtB;;;ACFA,IAAMC,WAAU,OAAiC,UAAU;AACpD,IAAM,aAAa;AAAA,EACtB,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,QAAQ;AAAA,EACR,SAASA;AAAA,EACT,YAAY,CAAC,MAAM;AAAA,EACnB,SAAS;AAAA,IACL,MAAM,CAAC;AAAA,EACX;AAAA,EACA,MAAM,OAAO,MAAM,SAAS;AACxB,WAAO,eAAe,MAAM,CAAC,CAAC;AAAA,EAClC;AAAA,EACA,WAAW,MAAM,SAAS;AACtB,WAAO,eAAe,MAAM,CAAC,CAAC;AAAA,EAClC;AACJ;",
|
|
6
6
|
"names": ["BSON", "VERSION"]
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loaders.gl/bson",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.3",
|
|
4
4
|
"description": "Framework-independent loader for JSON and streaming JSON formats",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
"build-bundle-dev": "ocular-bundle ./bundle.ts --env=dev --output=dist/dist.dev.js"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@loaders.gl/gis": "4.2.
|
|
44
|
-
"@loaders.gl/loader-utils": "4.2.
|
|
45
|
-
"@loaders.gl/schema": "4.2.
|
|
43
|
+
"@loaders.gl/gis": "4.2.3",
|
|
44
|
+
"@loaders.gl/loader-utils": "4.2.3",
|
|
45
|
+
"@loaders.gl/schema": "4.2.3",
|
|
46
46
|
"@types/bson": "4.2.0",
|
|
47
47
|
"bson": "4.2.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"@loaders.gl/core": "^4.0.0"
|
|
51
51
|
},
|
|
52
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "b81621afebc699faf74a4987d7859a587fe73a78"
|
|
53
53
|
}
|