insite-users-server-ws 2.0.3 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bun.lockb +0 -0
- package/dist/index.js +1 -12
- package/dist/index.js.map +4 -4
- package/package.json +6 -6
- package/link +0 -16
package/dist/index.js
CHANGED
|
@@ -1,13 +1,2 @@
|
|
|
1
|
-
var $t=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(u,d)=>(typeof require<"u"?require:u)[d]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});import{_ids as ms,Err as nt,includesAll as Cr,isEmpty as mo,removeAll as fo,union as fs,without as c1}from"@nesvet/n";import{Binary as As}from"insite-db";import{Users as Cs}from"insite-users-server";import us from"sift";var Vo=Object.create,jr=Object.defineProperty,Go=Object.getOwnPropertyDescriptor,Ho=Object.getOwnPropertyNames,qo=Object.getPrototypeOf,Ko=Object.prototype.hasOwnProperty,ve=(e=>typeof $t<"u"?$t:typeof Proxy<"u"?new Proxy(e,{get:(u,d)=>(typeof $t<"u"?$t:u)[d]}):e)(function(e){if(typeof $t<"u")return $t.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),Yo=(e,u)=>()=>(e&&(u=e(e=0)),u),J=(e,u)=>()=>(u||e((u={exports:{}}).exports,u),u.exports),U1=(e,u)=>{for(var d in u)jr(e,d,{get:u[d],enumerable:!0})},Lr=(e,u,d,h)=>{if(u&&typeof u=="object"||typeof u=="function")for(let a of Ho(u))!Ko.call(e,a)&&a!==d&&jr(e,a,{get:()=>u[a],enumerable:!(h=Go(u,a))||h.enumerable});return e},Jo=(e,u,d)=>(Lr(e,u,"default"),d&&Lr(d,u,"default")),$r=(e,u,d)=>(d=e!=null?Vo(qo(e)):{},Lr(u||!e||!e.__esModule?jr(d,"default",{value:e,enumerable:!0}):d,e)),Xo=e=>Lr(jr({},"__esModule",{value:!0}),e),kr=J(e=>{"use strict";function u(s){return["[object ArrayBuffer]","[object SharedArrayBuffer]"].includes(Object.prototype.toString.call(s))}function d(s){return Object.prototype.toString.call(s)==="[object Uint8Array]"}function h(s){return Object.prototype.toString.call(s)==="[object RegExp]"}function a(s){return Object.prototype.toString.call(s)==="[object Map]"}function l(s){return Object.prototype.toString.call(s)==="[object Date]"}function i(s,t){return JSON.stringify(s,(B,C)=>typeof C=="bigint"?{$numberLong:`${C}`}:a(C)?Object.fromEntries(C):C)}function p(s){if(s!=null&&typeof s=="object"&&"stylize"in s&&typeof s.stylize=="function")return s.stylize}var A=6,o=2147483647,n=-2147483648,r=Math.pow(2,63)-1,E=-Math.pow(2,63),m=Math.pow(2,53),c=-Math.pow(2,53),b=1,f=2,O=3,F=4,y=5,g=6,T=7,D=8,N=9,_=10,R=11,j=12,L=13,I=14,M=15,S=16,v=17,w=18,k=19,$=255,X=127,de=0,Y=4,se=Object.freeze({double:1,string:2,object:3,array:4,binData:5,undefined:6,objectId:7,bool:8,date:9,null:10,regex:11,dbPointer:12,javascript:13,symbol:14,javascriptWithScope:15,int:16,timestamp:17,long:18,decimal:19,minKey:-1,maxKey:127}),x=class extends Error{get bsonError(){return!0}get name(){return"BSONError"}constructor(s,t){super(s,t)}static isBSONError(s){return s!=null&&typeof s=="object"&&"bsonError"in s&&s.bsonError===!0&&"name"in s&&"message"in s&&"stack"in s}},G=class extends x{get name(){return"BSONVersionError"}constructor(){super(`Unsupported BSON version, bson types must be from bson ${A}.x.x`)}},Q=class extends x{get name(){return"BSONRuntimeError"}constructor(s){super(s)}},oe=class extends x{get name(){return"BSONOffsetError"}constructor(s,t,B){super(`${s}. offset: ${t}`,B),this.offset=t}},Ee,De;function Je(s,t,B,C){if(C){Ee??=new TextDecoder("utf8",{fatal:!0});try{return Ee.decode(s.subarray(t,B))}catch(U){throw new x("Invalid UTF-8 string in BSON document",{cause:U})}}return De??=new TextDecoder("utf8",{fatal:!1}),De.decode(s.subarray(t,B))}function ze(s,t,B){if(s.length===0)return"";let C=B-t;if(C===0)return"";if(C>20)return null;if(C===1&&s[t]<128)return String.fromCharCode(s[t]);if(C===2&&s[t]<128&&s[t+1]<128)return String.fromCharCode(s[t])+String.fromCharCode(s[t+1]);if(C===3&&s[t]<128&&s[t+1]<128&&s[t+2]<128)return String.fromCharCode(s[t])+String.fromCharCode(s[t+1])+String.fromCharCode(s[t+2]);let U=[];for(let V=t;V<B;V++){let ee=s[V];if(ee>127)return null;U.push(ee)}return String.fromCharCode(...U)}function Ce(s,t,B){if(t.length===0)return 0;if(t.length>25||s.length-B<t.length)return null;for(let C=0,U=B;C<t.length;C++,U++){let V=t.charCodeAt(C);if(V>127)return null;s[U]=V}return t.length}function Me(s){return Ge.fromNumberArray(Array.from({length:s},()=>Math.floor(Math.random()*256)))}var qe=(()=>{try{return ve("crypto").randomBytes}catch{return Me}})(),Ge={toLocalBufferType(s){if(Buffer.isBuffer(s))return s;if(ArrayBuffer.isView(s))return Buffer.from(s.buffer,s.byteOffset,s.byteLength);let t=s?.[Symbol.toStringTag]??Object.prototype.toString.call(s);if(t==="ArrayBuffer"||t==="SharedArrayBuffer"||t==="[object ArrayBuffer]"||t==="[object SharedArrayBuffer]")return Buffer.from(s);throw new x(`Cannot create Buffer from ${String(s)}`)},allocate(s){return Buffer.alloc(s)},allocateUnsafe(s){return Buffer.allocUnsafe(s)},equals(s,t){return Ge.toLocalBufferType(s).equals(t)},fromNumberArray(s){return Buffer.from(s)},fromBase64(s){return Buffer.from(s,"base64")},toBase64(s){return Ge.toLocalBufferType(s).toString("base64")},fromISO88591(s){return Buffer.from(s,"binary")},toISO88591(s){return Ge.toLocalBufferType(s).toString("binary")},fromHex(s){return Buffer.from(s,"hex")},toHex(s){return Ge.toLocalBufferType(s).toString("hex")},toUTF8(s,t,B,C){let U=B-t<=20?ze(s,t,B):null;if(U!=null)return U;let V=Ge.toLocalBufferType(s).toString("utf8",t,B);if(C){for(let ee=0;ee<V.length;ee++)if(V.charCodeAt(ee)===65533){Je(s,t,B,!0);break}}return V},utf8ByteLength(s){return Buffer.byteLength(s,"utf8")},encodeUTF8Into(s,t,B){return Ce(s,t,B)??Ge.toLocalBufferType(s).write(t,B,void 0,"utf8")},randomBytes:qe};function ct(){let{navigator:s}=globalThis;return typeof s=="object"&&s.product==="ReactNative"}function St(s){if(s<0)throw new RangeError(`The argument 'byteLength' is invalid. Received ${s}`);return te.fromNumberArray(Array.from({length:s},()=>Math.floor(Math.random()*256)))}var K=(()=>{let{crypto:s}=globalThis;if(s!=null&&typeof s.getRandomValues=="function")return t=>s.getRandomValues(te.allocate(t));if(ct()){let{console:t}=globalThis;t?.warn?.("BSON: For React Native please polyfill crypto.getRandomValues, e.g. using: https://www.npmjs.com/package/react-native-get-random-values.")}return St})(),P=/(\d|[a-f])/i,te={toLocalBufferType(s){let t=s?.[Symbol.toStringTag]??Object.prototype.toString.call(s);if(t==="Uint8Array")return s;if(ArrayBuffer.isView(s))return new Uint8Array(s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength));if(t==="ArrayBuffer"||t==="SharedArrayBuffer"||t==="[object ArrayBuffer]"||t==="[object SharedArrayBuffer]")return new Uint8Array(s);throw new x(`Cannot make a Uint8Array from ${String(s)}`)},allocate(s){if(typeof s!="number")throw new TypeError(`The "size" argument must be of type number. Received ${String(s)}`);return new Uint8Array(s)},allocateUnsafe(s){return te.allocate(s)},equals(s,t){if(s.byteLength!==t.byteLength)return!1;for(let B=0;B<s.byteLength;B++)if(s[B]!==t[B])return!1;return!0},fromNumberArray(s){return Uint8Array.from(s)},fromBase64(s){return Uint8Array.from(atob(s),t=>t.charCodeAt(0))},toBase64(s){return btoa(te.toISO88591(s))},fromISO88591(s){return Uint8Array.from(s,t=>t.charCodeAt(0)&255)},toISO88591(s){return Array.from(Uint16Array.from(s),t=>String.fromCharCode(t)).join("")},fromHex(s){let t=s.length%2===0?s:s.slice(0,s.length-1),B=[];for(let C=0;C<t.length;C+=2){let U=t[C],V=t[C+1];if(!P.test(U)||!P.test(V))break;let ee=Number.parseInt(`${U}${V}`,16);B.push(ee)}return Uint8Array.from(B)},toHex(s){return Array.from(s,t=>t.toString(16).padStart(2,"0")).join("")},toUTF8(s,t,B,C){return(B-t<=20?ze(s,t,B):null)??Je(s,t,B,C)},utf8ByteLength(s){return new TextEncoder().encode(s).byteLength},encodeUTF8Into(s,t,B){let C=new TextEncoder().encode(t);return s.set(C,B),C.byteLength},randomBytes:K},le=typeof Buffer=="function"&&Buffer.prototype?._isBuffer!==!0,q=le?Ge:te,ge=class{get[Symbol.for("@@mdb.bson.version")](){return A}[Symbol.for("nodejs.util.inspect.custom")](s,t,B){return this.inspect(s,t,B)}},Se=class vt extends ge{get _bsontype(){return"Binary"}constructor(t,B){if(super(),t!=null&&typeof t=="string"&&!ArrayBuffer.isView(t)&&!u(t)&&!Array.isArray(t))throw new x("Binary can only be constructed from Uint8Array or number[]");this.sub_type=B??vt.BSON_BINARY_SUBTYPE_DEFAULT,t==null?(this.buffer=q.allocate(vt.BUFFER_SIZE),this.position=0):(this.buffer=Array.isArray(t)?q.fromNumberArray(t):q.toLocalBufferType(t),this.position=this.buffer.byteLength)}put(t){if(typeof t=="string"&&t.length!==1)throw new x("only accepts single character String");if(typeof t!="number"&&t.length!==1)throw new x("only accepts single character Uint8Array or Array");let B;if(typeof t=="string"?B=t.charCodeAt(0):typeof t=="number"?B=t:B=t[0],B<0||B>255)throw new x("only accepts number in a valid unsigned byte range 0-255");if(this.buffer.byteLength>this.position)this.buffer[this.position++]=B;else{let C=q.allocate(vt.BUFFER_SIZE+this.buffer.length);C.set(this.buffer,0),this.buffer=C,this.buffer[this.position++]=B}}write(t,B){if(B=typeof B=="number"?B:this.position,this.buffer.byteLength<B+t.length){let C=q.allocate(this.buffer.byteLength+t.length);C.set(this.buffer,0),this.buffer=C}if(ArrayBuffer.isView(t))this.buffer.set(q.toLocalBufferType(t),B),this.position=B+t.byteLength>this.position?B+t.length:this.position;else if(typeof t=="string")throw new x("input cannot be string")}read(t,B){return B=B&&B>0?B:this.position,this.buffer.slice(t,t+B)}value(){return this.buffer.length===this.position?this.buffer:this.buffer.subarray(0,this.position)}length(){return this.position}toJSON(){return q.toBase64(this.buffer.subarray(0,this.position))}toString(t){return t==="hex"?q.toHex(this.buffer.subarray(0,this.position)):t==="base64"?q.toBase64(this.buffer.subarray(0,this.position)):t==="utf8"||t==="utf-8"?q.toUTF8(this.buffer,0,this.position,!1):q.toUTF8(this.buffer,0,this.position,!1)}toExtendedJSON(t){t=t||{};let B=q.toBase64(this.buffer),C=Number(this.sub_type).toString(16);return t.legacy?{$binary:B,$type:C.length===1?"0"+C:C}:{$binary:{base64:B,subType:C.length===1?"0"+C:C}}}toUUID(){if(this.sub_type===vt.SUBTYPE_UUID)return new dt(this.buffer.slice(0,this.position));throw new x(`Binary sub_type "${this.sub_type}" is not supported for converting to UUID. Only "${vt.SUBTYPE_UUID}" is currently supported.`)}static createFromHexString(t,B){return new vt(q.fromHex(t),B)}static createFromBase64(t,B){return new vt(q.fromBase64(t),B)}static fromExtendedJSON(t,B){B=B||{};let C,U;if("$binary"in t?B.legacy&&typeof t.$binary=="string"&&"$type"in t?(U=t.$type?parseInt(t.$type,16):0,C=q.fromBase64(t.$binary)):typeof t.$binary!="string"&&(U=t.$binary.subType?parseInt(t.$binary.subType,16):0,C=q.fromBase64(t.$binary.base64)):"$uuid"in t&&(U=4,C=dt.bytesFromString(t.$uuid)),!C)throw new x(`Unexpected Binary Extended JSON format ${JSON.stringify(t)}`);return U===Y?new dt(C):new vt(C,U)}inspect(t,B,C){C??=i;let U=q.toBase64(this.buffer.subarray(0,this.position)),V=C(U,B),ee=C(this.sub_type,B);return`Binary.createFromBase64(${V}, ${ee})`}};Se.BSON_BINARY_SUBTYPE_DEFAULT=0,Se.BUFFER_SIZE=256,Se.SUBTYPE_DEFAULT=0,Se.SUBTYPE_FUNCTION=1,Se.SUBTYPE_BYTE_ARRAY=2,Se.SUBTYPE_UUID_OLD=3,Se.SUBTYPE_UUID=4,Se.SUBTYPE_MD5=5,Se.SUBTYPE_ENCRYPTED=6,Se.SUBTYPE_COLUMN=7,Se.SUBTYPE_SENSITIVE=8,Se.SUBTYPE_USER_DEFINED=128;var He=16,ht=/^[0-9A-F]{32}$/i,ot=/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i,dt=class Ct extends Se{constructor(t){let B;if(t==null)B=Ct.generate();else if(t instanceof Ct)B=q.toLocalBufferType(new Uint8Array(t.buffer));else if(ArrayBuffer.isView(t)&&t.byteLength===He)B=q.toLocalBufferType(t);else if(typeof t=="string")B=Ct.bytesFromString(t);else throw new x("Argument passed in UUID constructor must be a UUID, a 16 byte Buffer or a 32/36 character hex string (dashes excluded/included, format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).");super(B,Y)}get id(){return this.buffer}set id(t){this.buffer=t}toHexString(t=!0){return t?[q.toHex(this.buffer.subarray(0,4)),q.toHex(this.buffer.subarray(4,6)),q.toHex(this.buffer.subarray(6,8)),q.toHex(this.buffer.subarray(8,10)),q.toHex(this.buffer.subarray(10,16))].join("-"):q.toHex(this.buffer)}toString(t){return t==="hex"?q.toHex(this.id):t==="base64"?q.toBase64(this.id):this.toHexString()}toJSON(){return this.toHexString()}equals(t){if(!t)return!1;if(t instanceof Ct)return q.equals(t.id,this.id);try{return q.equals(new Ct(t).id,this.id)}catch{return!1}}toBinary(){return new Se(this.id,Se.SUBTYPE_UUID)}static generate(){let t=q.randomBytes(He);return t[6]=t[6]&15|64,t[8]=t[8]&63|128,t}static isValid(t){return t?typeof t=="string"?Ct.isValidUUIDString(t):d(t)?t.byteLength===He:t._bsontype==="Binary"&&t.sub_type===this.SUBTYPE_UUID&&t.buffer.byteLength===16:!1}static createFromHexString(t){let B=Ct.bytesFromString(t);return new Ct(B)}static createFromBase64(t){return new Ct(q.fromBase64(t))}static bytesFromString(t){if(!Ct.isValidUUIDString(t))throw new x("UUID string representation must be 32 hex digits or canonical hyphenated representation");return q.fromHex(t.replace(/-/g,""))}static isValidUUIDString(t){return ht.test(t)||ot.test(t)}inspect(t,B,C){return C??=i,`new UUID(${C(this.toHexString(),B)})`}},bt=class j1 extends ge{get _bsontype(){return"Code"}constructor(t,B){super(),this.code=t.toString(),this.scope=B??null}toJSON(){return this.scope!=null?{code:this.code,scope:this.scope}:{code:this.code}}toExtendedJSON(){return this.scope?{$code:this.code,$scope:this.scope}:{$code:this.code}}static fromExtendedJSON(t){return new j1(t.$code,t.$scope)}inspect(t,B,C){C??=i;let U=C(this.code,B),V=U.includes(`
|
|
2
|
-
`);this.scope!=null&&(U+=`,${V?`
|
|
3
|
-
`:" "}${C(this.scope,B)}`);let ee=V&&this.scope===null;return`new Code(${V?`
|
|
4
|
-
`:""}${U}${ee?`
|
|
5
|
-
`:""})`}};function tr(s){return s!=null&&typeof s=="object"&&"$id"in s&&s.$id!=null&&"$ref"in s&&typeof s.$ref=="string"&&(!("$db"in s)||"$db"in s&&typeof s.$db=="string")}var Bt=class $1 extends ge{get _bsontype(){return"DBRef"}constructor(t,B,C,U){super();let V=t.split(".");V.length===2&&(C=V.shift(),t=V.shift()),this.collection=t,this.oid=B,this.db=C,this.fields=U||{}}get namespace(){return this.collection}set namespace(t){this.collection=t}toJSON(){let t=Object.assign({$ref:this.collection,$id:this.oid},this.fields);return this.db!=null&&(t.$db=this.db),t}toExtendedJSON(t){t=t||{};let B={$ref:this.collection,$id:this.oid};return t.legacy||(this.db&&(B.$db=this.db),B=Object.assign(B,this.fields)),B}static fromExtendedJSON(t){let B=Object.assign({},t);return delete B.$ref,delete B.$id,delete B.$db,new $1(t.$ref,t.$id,t.$db,B)}inspect(t,B,C){C??=i;let U=[C(this.namespace,B),C(this.oid,B),...this.db?[C(this.db,B)]:[],...Object.keys(this.fields).length>0?[C(this.fields,B)]:[]];return U[1]=C===i?`new ObjectId(${U[1]})`:U[1],`new DBRef(${U.join(", ")})`}};function Br(s){if(s==="")return s;let t=0,B=s[t]==="-",C=s[t]==="+";(C||B)&&(t+=1);let U=!1;for(;t<s.length&&s[t]==="0";++t)U=!0;return U?`${B?"-":""}${s.length===t?"0":s.slice(t)}`:C?s.slice(1):s}function nu(s,t){t=t??10;let B="0123456789abcdefghijklmnopqrstuvwxyz".slice(0,t);return new RegExp(`[^-+${B}]`,"i").test(s)?!1:s}var it;try{it=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{}var Dr=65536,Or=1<<24,W=Dr*Dr,H=W*W,re=H/2,fe={},_e={},We=20,$e=/^(\+?0|(\+|-)?[1-9][0-9]*)$/,ae=class ue extends ge{get _bsontype(){return"Long"}get __isLong__(){return!0}constructor(t=0,B,C){super();let U=typeof B=="boolean"?B:!!C,V=typeof B=="number"?B:0,ee=typeof t=="string"?ue.fromString(t,U):typeof t=="bigint"?ue.fromBigInt(t,U):{low:t|0,high:V|0,unsigned:U};this.low=ee.low,this.high=ee.high,this.unsigned=ee.unsigned}static fromBits(t,B,C){return new ue(t,B,C)}static fromInt(t,B){let C,U,V;return B?(t>>>=0,(V=0<=t&&t<256)&&(U=_e[t],U)?U:(C=ue.fromBits(t,(t|0)<0?-1:0,!0),V&&(_e[t]=C),C)):(t|=0,(V=-128<=t&&t<128)&&(U=fe[t],U)?U:(C=ue.fromBits(t,t<0?-1:0,!1),V&&(fe[t]=C),C))}static fromNumber(t,B){if(isNaN(t))return B?ue.UZERO:ue.ZERO;if(B){if(t<0)return ue.UZERO;if(t>=H)return ue.MAX_UNSIGNED_VALUE}else{if(t<=-re)return ue.MIN_VALUE;if(t+1>=re)return ue.MAX_VALUE}return t<0?ue.fromNumber(-t,B).neg():ue.fromBits(t%W|0,t/W|0,B)}static fromBigInt(t,B){let C=BigInt(4294967295),U=BigInt(32);return new ue(Number(t&C),Number(t>>U&C),B)}static _fromString(t,B,C){if(t.length===0)throw new x("empty string");if(C<2||36<C)throw new x("radix");let U;if((U=t.indexOf("-"))>0)throw new x("interior hyphen");if(U===0)return ue._fromString(t.substring(1),B,C).neg();let V=ue.fromNumber(Math.pow(C,8)),ee=ue.ZERO;for(let ce=0;ce<t.length;ce+=8){let z=Math.min(8,t.length-ce),Be=parseInt(t.substring(ce,ce+z),C);if(z<8){let ie=ue.fromNumber(Math.pow(C,z));ee=ee.mul(ie).add(ue.fromNumber(Be))}else ee=ee.mul(V),ee=ee.add(ue.fromNumber(Be))}return ee.unsigned=B,ee}static fromStringStrict(t,B,C){let U=!1;if(typeof B=="number"?(C=B,B=!1):U=!!B,C??=10,t.trim()!==t)throw new x(`Input: '${t}' contains leading and/or trailing whitespace`);if(!nu(t,C))throw new x(`Input: '${t}' contains invalid characters for radix: ${C}`);let V=Br(t),ee=ue._fromString(V,U,C);if(ee.toString(C).toLowerCase()!==V.toLowerCase())throw new x(`Input: ${t} is not representable as ${ee.unsigned?"an unsigned":"a signed"} 64-bit Long ${C!=null?`with radix: ${C}`:""}`);return ee}static fromString(t,B,C){let U=!1;return typeof B=="number"?(C=B,B=!1):U=!!B,C??=10,t==="NaN"&&C<24||(t==="Infinity"||t==="+Infinity"||t==="-Infinity")&&C<35?ue.ZERO:ue._fromString(t,U,C)}static fromBytes(t,B,C){return C?ue.fromBytesLE(t,B):ue.fromBytesBE(t,B)}static fromBytesLE(t,B){return new ue(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,B)}static fromBytesBE(t,B){return new ue(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],B)}static isLong(t){return t!=null&&typeof t=="object"&&"__isLong__"in t&&t.__isLong__===!0}static fromValue(t,B){return typeof t=="number"?ue.fromNumber(t,B):typeof t=="string"?ue.fromString(t,B):ue.fromBits(t.low,t.high,typeof B=="boolean"?B:t.unsigned)}add(t){ue.isLong(t)||(t=ue.fromValue(t));let B=this.high>>>16,C=this.high&65535,U=this.low>>>16,V=this.low&65535,ee=t.high>>>16,ce=t.high&65535,z=t.low>>>16,Be=t.low&65535,ie=0,Z=0,ne=0,Ae=0;return Ae+=V+Be,ne+=Ae>>>16,Ae&=65535,ne+=U+z,Z+=ne>>>16,ne&=65535,Z+=C+ce,ie+=Z>>>16,Z&=65535,ie+=B+ee,ie&=65535,ue.fromBits(ne<<16|Ae,ie<<16|Z,this.unsigned)}and(t){return ue.isLong(t)||(t=ue.fromValue(t)),ue.fromBits(this.low&t.low,this.high&t.high,this.unsigned)}compare(t){if(ue.isLong(t)||(t=ue.fromValue(t)),this.eq(t))return 0;let B=this.isNegative(),C=t.isNegative();return B&&!C?-1:!B&&C?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1}comp(t){return this.compare(t)}divide(t){if(ue.isLong(t)||(t=ue.fromValue(t)),t.isZero())throw new x("division by zero");if(it){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;let V=(this.unsigned?it.div_u:it.div_s)(this.low,this.high,t.low,t.high);return ue.fromBits(V,it.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?ue.UZERO:ue.ZERO;let B,C,U;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return ue.UZERO;if(t.gt(this.shru(1)))return ue.UONE;U=ue.UZERO}else{if(this.eq(ue.MIN_VALUE))return t.eq(ue.ONE)||t.eq(ue.NEG_ONE)?ue.MIN_VALUE:t.eq(ue.MIN_VALUE)?ue.ONE:(B=this.shr(1).div(t).shl(1),B.eq(ue.ZERO)?t.isNegative()?ue.ONE:ue.NEG_ONE:(C=this.sub(t.mul(B)),U=B.add(C.div(t)),U));if(t.eq(ue.MIN_VALUE))return this.unsigned?ue.UZERO:ue.ZERO;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();U=ue.ZERO}for(C=this;C.gte(t);){B=Math.max(1,Math.floor(C.toNumber()/t.toNumber()));let V=Math.ceil(Math.log(B)/Math.LN2),ee=V<=48?1:Math.pow(2,V-48),ce=ue.fromNumber(B),z=ce.mul(t);for(;z.isNegative()||z.gt(C);)B-=ee,ce=ue.fromNumber(B,this.unsigned),z=ce.mul(t);ce.isZero()&&(ce=ue.ONE),U=U.add(ce),C=C.sub(z)}return U}div(t){return this.divide(t)}equals(t){return ue.isLong(t)||(t=ue.fromValue(t)),this.unsigned!==t.unsigned&&this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low}eq(t){return this.equals(t)}getHighBits(){return this.high}getHighBitsUnsigned(){return this.high>>>0}getLowBits(){return this.low}getLowBitsUnsigned(){return this.low>>>0}getNumBitsAbs(){if(this.isNegative())return this.eq(ue.MIN_VALUE)?64:this.neg().getNumBitsAbs();let t=this.high!==0?this.high:this.low,B;for(B=31;B>0&&!(t&1<<B);B--);return this.high!==0?B+33:B+1}greaterThan(t){return this.comp(t)>0}gt(t){return this.greaterThan(t)}greaterThanOrEqual(t){return this.comp(t)>=0}gte(t){return this.greaterThanOrEqual(t)}ge(t){return this.greaterThanOrEqual(t)}isEven(){return(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(t){return this.comp(t)<0}lt(t){return this.lessThan(t)}lessThanOrEqual(t){return this.comp(t)<=0}lte(t){return this.lessThanOrEqual(t)}modulo(t){if(ue.isLong(t)||(t=ue.fromValue(t)),it){let B=(this.unsigned?it.rem_u:it.rem_s)(this.low,this.high,t.low,t.high);return ue.fromBits(B,it.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))}mod(t){return this.modulo(t)}rem(t){return this.modulo(t)}multiply(t){if(this.isZero())return ue.ZERO;if(ue.isLong(t)||(t=ue.fromValue(t)),it){let me=it.mul(this.low,this.high,t.low,t.high);return ue.fromBits(me,it.get_high(),this.unsigned)}if(t.isZero())return ue.ZERO;if(this.eq(ue.MIN_VALUE))return t.isOdd()?ue.MIN_VALUE:ue.ZERO;if(t.eq(ue.MIN_VALUE))return this.isOdd()?ue.MIN_VALUE:ue.ZERO;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(ue.TWO_PWR_24)&&t.lt(ue.TWO_PWR_24))return ue.fromNumber(this.toNumber()*t.toNumber(),this.unsigned);let B=this.high>>>16,C=this.high&65535,U=this.low>>>16,V=this.low&65535,ee=t.high>>>16,ce=t.high&65535,z=t.low>>>16,Be=t.low&65535,ie=0,Z=0,ne=0,Ae=0;return Ae+=V*Be,ne+=Ae>>>16,Ae&=65535,ne+=U*Be,Z+=ne>>>16,ne&=65535,ne+=V*z,Z+=ne>>>16,ne&=65535,Z+=C*Be,ie+=Z>>>16,Z&=65535,Z+=U*z,ie+=Z>>>16,Z&=65535,Z+=V*ce,ie+=Z>>>16,Z&=65535,ie+=B*Be+C*z+U*ce+V*ee,ie&=65535,ue.fromBits(ne<<16|Ae,ie<<16|Z,this.unsigned)}mul(t){return this.multiply(t)}negate(){return!this.unsigned&&this.eq(ue.MIN_VALUE)?ue.MIN_VALUE:this.not().add(ue.ONE)}neg(){return this.negate()}not(){return ue.fromBits(~this.low,~this.high,this.unsigned)}notEquals(t){return!this.equals(t)}neq(t){return this.notEquals(t)}ne(t){return this.notEquals(t)}or(t){return ue.isLong(t)||(t=ue.fromValue(t)),ue.fromBits(this.low|t.low,this.high|t.high,this.unsigned)}shiftLeft(t){return ue.isLong(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?ue.fromBits(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):ue.fromBits(0,this.low<<t-32,this.unsigned)}shl(t){return this.shiftLeft(t)}shiftRight(t){return ue.isLong(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?ue.fromBits(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):ue.fromBits(this.high>>t-32,this.high>=0?0:-1,this.unsigned)}shr(t){return this.shiftRight(t)}shiftRightUnsigned(t){if(ue.isLong(t)&&(t=t.toInt()),t&=63,t===0)return this;{let B=this.high;if(t<32){let C=this.low;return ue.fromBits(C>>>t|B<<32-t,B>>>t,this.unsigned)}else return t===32?ue.fromBits(B,0,this.unsigned):ue.fromBits(B>>>t-32,0,this.unsigned)}}shr_u(t){return this.shiftRightUnsigned(t)}shru(t){return this.shiftRightUnsigned(t)}subtract(t){return ue.isLong(t)||(t=ue.fromValue(t)),this.add(t.neg())}sub(t){return this.subtract(t)}toInt(){return this.unsigned?this.low>>>0:this.low}toNumber(){return this.unsigned?(this.high>>>0)*W+(this.low>>>0):this.high*W+(this.low>>>0)}toBigInt(){return BigInt(this.toString())}toBytes(t){return t?this.toBytesLE():this.toBytesBE()}toBytesLE(){let t=this.high,B=this.low;return[B&255,B>>>8&255,B>>>16&255,B>>>24,t&255,t>>>8&255,t>>>16&255,t>>>24]}toBytesBE(){let t=this.high,B=this.low;return[t>>>24,t>>>16&255,t>>>8&255,t&255,B>>>24,B>>>16&255,B>>>8&255,B&255]}toSigned(){return this.unsigned?ue.fromBits(this.low,this.high,!1):this}toString(t){if(t=t||10,t<2||36<t)throw new x("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(ue.MIN_VALUE)){let V=ue.fromNumber(t),ee=this.div(V),ce=ee.mul(V).sub(this);return ee.toString(t)+ce.toInt().toString(t)}else return"-"+this.neg().toString(t);let B=ue.fromNumber(Math.pow(t,6),this.unsigned),C=this,U="";for(;;){let V=C.div(B),ee=(C.sub(V.mul(B)).toInt()>>>0).toString(t);if(C=V,C.isZero())return ee+U;for(;ee.length<6;)ee="0"+ee;U=""+ee+U}}toUnsigned(){return this.unsigned?this:ue.fromBits(this.low,this.high,!0)}xor(t){return ue.isLong(t)||(t=ue.fromValue(t)),ue.fromBits(this.low^t.low,this.high^t.high,this.unsigned)}eqz(){return this.isZero()}le(t){return this.lessThanOrEqual(t)}toExtendedJSON(t){return t&&t.relaxed?this.toNumber():{$numberLong:this.toString()}}static fromExtendedJSON(t,B){let{useBigInt64:C=!1,relaxed:U=!0}={...B};if(t.$numberLong.length>We)throw new x("$numberLong string is too long");if(!$e.test(t.$numberLong))throw new x(`$numberLong string "${t.$numberLong}" is in an invalid format`);if(C){let ee=BigInt(t.$numberLong);return BigInt.asIntN(64,ee)}let V=ue.fromString(t.$numberLong);return U?V.toNumber():V}inspect(t,B,C){C??=i;let U=C(this.toString(),B),V=this.unsigned?`, ${C(this.unsigned,B)}`:"";return`new Long(${U}${V})`}};ae.TWO_PWR_24=ae.fromInt(Or),ae.MAX_UNSIGNED_VALUE=ae.fromBits(-1,-1,!0),ae.ZERO=ae.fromInt(0),ae.UZERO=ae.fromInt(0,!0),ae.ONE=ae.fromInt(1),ae.UONE=ae.fromInt(1,!0),ae.NEG_ONE=ae.fromInt(-1),ae.MAX_VALUE=ae.fromBits(-1,2147483647,!1),ae.MIN_VALUE=ae.fromBits(0,-2147483648,!1);var wt=/^(\+|-)?(\d+|(\d*\.\d*))?(E|e)?([-+])?(\d+)?$/,br=/^(\+|-)?(Infinity|inf)$/i,yo=/^(\+|-)?NaN$/i,zt=6111,rr=-6176,p1=6176,E1=34,ou=q.fromNumberArray([124,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse()),m1=q.fromNumberArray([248,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse()),f1=q.fromNumberArray([120,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0].reverse()),So=/^([-+])?(\d+)?$/,Bo=31,A1=16383,Do=30,Oo=31;function C1(s){return!isNaN(parseInt(s,10))}function bo(s){let t=ae.fromNumber(1e9),B=ae.fromNumber(0);if(!s.parts[0]&&!s.parts[1]&&!s.parts[2]&&!s.parts[3])return{quotient:s,rem:B};for(let C=0;C<=3;C++)B=B.shiftLeft(32),B=B.add(new ae(s.parts[C],0)),s.parts[C]=B.div(t).low,B=B.modulo(t);return{quotient:s,rem:B}}function wo(s,t){if(!s&&!t)return{high:ae.fromNumber(0),low:ae.fromNumber(0)};let B=s.shiftRightUnsigned(32),C=new ae(s.getLowBits(),0),U=t.shiftRightUnsigned(32),V=new ae(t.getLowBits(),0),ee=B.multiply(U),ce=B.multiply(V),z=C.multiply(U),Be=C.multiply(V);return ee=ee.add(ce.shiftRightUnsigned(32)),ce=new ae(ce.getLowBits(),0).add(z).add(Be.shiftRightUnsigned(32)),ee=ee.add(ce.shiftRightUnsigned(32)),Be=ce.shiftLeft(32).add(new ae(Be.getLowBits(),0)),{high:ee,low:Be}}function Fo(s,t){let B=s.high>>>0,C=t.high>>>0;if(B<C)return!0;if(B===C){let U=s.low>>>0,V=t.low>>>0;if(U<V)return!0}return!1}function ft(s,t){throw new x(`"${s}" is not a valid Decimal128 string - ${t}`)}var ur=class gt extends ge{get _bsontype(){return"Decimal128"}constructor(t){if(super(),typeof t=="string")this.bytes=gt.fromString(t).bytes;else if(d(t)){if(t.byteLength!==16)throw new x("Decimal128 must take a Buffer of 16 bytes");this.bytes=t}else throw new x("Decimal128 must take a Buffer or string")}static fromString(t){return gt._fromString(t,{allowRounding:!1})}static fromStringWithRounding(t){return gt._fromString(t,{allowRounding:!0})}static _fromString(t,B){let C=!1,U=!1,V=!1,ee=!1,ce=0,z=0,Be=0,ie=0,Z=0,ne=[0],Ae=0,me=0,Ne=0,Le=0,Ke=new ae(0,0),ke=new ae(0,0),Ve=0,Te=0;if(t.length>=7e3)throw new x(""+t+" not a valid Decimal128 string");let Dt=t.match(wt),Re=t.match(br),Fe=t.match(yo);if(!Dt&&!Re&&!Fe||t.length===0)throw new x(""+t+" not a valid Decimal128 string");if(Dt){let he=Dt[2],be=Dt[4],Pe=Dt[5],Qe=Dt[6];be&&Qe===void 0&&ft(t,"missing exponent power"),be&&he===void 0&&ft(t,"missing exponent base"),be===void 0&&(Pe||Qe)&&ft(t,"missing e before exponent")}if((t[Te]==="+"||t[Te]==="-")&&(U=!0,C=t[Te++]==="-"),!C1(t[Te])&&t[Te]!=="."){if(t[Te]==="i"||t[Te]==="I")return new gt(C?m1:f1);if(t[Te]==="N")return new gt(ou)}for(;C1(t[Te])||t[Te]===".";){if(t[Te]==="."){V&&ft(t,"contains multiple periods"),V=!0,Te=Te+1;continue}Ae<E1&&(t[Te]!=="0"||ee)&&(ee||(Z=z),ee=!0,ne[me++]=parseInt(t[Te],10),Ae=Ae+1),ee&&(Be=Be+1),V&&(ie=ie+1),z=z+1,Te=Te+1}if(V&&!z)throw new x(""+t+" not a valid Decimal128 string");if(t[Te]==="e"||t[Te]==="E"){let he=t.substr(++Te).match(So);if(!he||!he[2])return new gt(ou);Le=parseInt(he[0],10),Te=Te+he[0].length}if(t[Te])return new gt(ou);if(!Ae)ne[0]=0,Be=1,Ae=1,ce=0;else if(Ne=Ae-1,ce=Be,ce!==1)for(;t[Z+ce-1+Number(U)+Number(V)]==="0";)ce=ce-1;for(Le<=ie&&ie>Le+16384?Le=rr:Le=Le-ie;Le>zt;){if(Ne=Ne+1,Ne>=E1){if(ce===0){Le=zt;break}ft(t,"overflow")}Le=Le-1}if(B.allowRounding){for(;Le<rr||Ae<Be;){if(Ne===0&&ce<Ae){Le=rr,ce=0;break}if(Ae<Be?Be=Be-1:Ne=Ne-1,Le<zt)Le=Le+1;else{if(ne.join("").match(/^0+$/)){Le=zt;break}ft(t,"overflow")}}if(Ne+1<ce){let he=z;V&&(Z=Z+1,he=he+1),U&&(Z=Z+1,he=he+1);let be=parseInt(t[Z+Ne+1],10),Pe=0;if(be>=5&&(Pe=1,be===5)){Pe=ne[Ne]%2===1?1:0;for(let Qe=Z+Ne+2;Qe<he;Qe++)if(parseInt(t[Qe],10)){Pe=1;break}}if(Pe){let Qe=Ne;for(;Qe>=0&&++ne[Qe]>9;Qe--)if(ne[Qe]=0,Qe===0)if(Le<zt)Le=Le+1,ne[Qe]=1;else return new gt(C?m1:f1)}}}else{for(;Le<rr||Ae<Be;){if(Ne===0){if(ce===0){Le=rr;break}ft(t,"exponent underflow")}Ae<Be?(t[Be-1+Number(U)+Number(V)]!=="0"&&ce!==0&&ft(t,"inexact rounding"),Be=Be-1):(ne[Ne]!==0&&ft(t,"inexact rounding"),Ne=Ne-1),Le<zt?Le=Le+1:ft(t,"overflow")}Ne+1<ce&&(V&&(Z=Z+1),U&&(Z=Z+1),parseInt(t[Z+Ne+1],10)!==0&&ft(t,"inexact rounding"))}if(Ke=ae.fromNumber(0),ke=ae.fromNumber(0),ce===0)Ke=ae.fromNumber(0),ke=ae.fromNumber(0);else if(Ne<17){let he=0;for(ke=ae.fromNumber(ne[he++]),Ke=new ae(0,0);he<=Ne;he++)ke=ke.multiply(ae.fromNumber(10)),ke=ke.add(ae.fromNumber(ne[he]))}else{let he=0;for(Ke=ae.fromNumber(ne[he++]);he<=Ne-17;he++)Ke=Ke.multiply(ae.fromNumber(10)),Ke=Ke.add(ae.fromNumber(ne[he]));for(ke=ae.fromNumber(ne[he++]);he<=Ne;he++)ke=ke.multiply(ae.fromNumber(10)),ke=ke.add(ae.fromNumber(ne[he]))}let et=wo(Ke,ae.fromString("100000000000000000"));et.low=et.low.add(ke),Fo(et.low,ke)&&(et.high=et.high.add(ae.fromNumber(1))),Ve=Le+p1;let Ie={low:ae.fromNumber(0),high:ae.fromNumber(0)};et.high.shiftRightUnsigned(49).and(ae.fromNumber(1)).equals(ae.fromNumber(1))?(Ie.high=Ie.high.or(ae.fromNumber(3).shiftLeft(61)),Ie.high=Ie.high.or(ae.fromNumber(Ve).and(ae.fromNumber(16383).shiftLeft(47))),Ie.high=Ie.high.or(et.high.and(ae.fromNumber(0x7fffffffffff)))):(Ie.high=Ie.high.or(ae.fromNumber(Ve&16383).shiftLeft(49)),Ie.high=Ie.high.or(et.high.and(ae.fromNumber(562949953421311)))),Ie.low=et.low,C&&(Ie.high=Ie.high.or(ae.fromString("9223372036854775808")));let Oe=q.allocateUnsafe(16);return Te=0,Oe[Te++]=Ie.low.low&255,Oe[Te++]=Ie.low.low>>8&255,Oe[Te++]=Ie.low.low>>16&255,Oe[Te++]=Ie.low.low>>24&255,Oe[Te++]=Ie.low.high&255,Oe[Te++]=Ie.low.high>>8&255,Oe[Te++]=Ie.low.high>>16&255,Oe[Te++]=Ie.low.high>>24&255,Oe[Te++]=Ie.high.low&255,Oe[Te++]=Ie.high.low>>8&255,Oe[Te++]=Ie.high.low>>16&255,Oe[Te++]=Ie.high.low>>24&255,Oe[Te++]=Ie.high.high&255,Oe[Te++]=Ie.high.high>>8&255,Oe[Te++]=Ie.high.high>>16&255,Oe[Te++]=Ie.high.high>>24&255,new gt(Oe)}toString(){let t,B=0,C=new Array(36);for(let Ve=0;Ve<C.length;Ve++)C[Ve]=0;let U=0,V=!1,ee,ce={parts:[0,0,0,0]},z,Be,ie=[];U=0;let Z=this.bytes,ne=Z[U++]|Z[U++]<<8|Z[U++]<<16|Z[U++]<<24,Ae=Z[U++]|Z[U++]<<8|Z[U++]<<16|Z[U++]<<24,me=Z[U++]|Z[U++]<<8|Z[U++]<<16|Z[U++]<<24,Ne=Z[U++]|Z[U++]<<8|Z[U++]<<16|Z[U++]<<24;U=0,{low:new ae(ne,Ae),high:new ae(me,Ne)}.high.lessThan(ae.ZERO)&&ie.push("-");let Le=Ne>>26&Bo;if(Le>>3===3){if(Le===Do)return ie.join("")+"Infinity";if(Le===Oo)return"NaN";t=Ne>>15&A1,ee=8+(Ne>>14&1)}else ee=Ne>>14&7,t=Ne>>17&A1;let Ke=t-p1;if(ce.parts[0]=(Ne&16383)+((ee&15)<<14),ce.parts[1]=me,ce.parts[2]=Ae,ce.parts[3]=ne,ce.parts[0]===0&&ce.parts[1]===0&&ce.parts[2]===0&&ce.parts[3]===0)V=!0;else for(Be=3;Be>=0;Be--){let Ve=0,Te=bo(ce);if(ce=Te.quotient,Ve=Te.rem.low,!!Ve)for(z=8;z>=0;z--)C[Be*9+z]=Ve%10,Ve=Math.floor(Ve/10)}if(V)B=1,C[U]=0;else for(B=36;!C[U];)B=B-1,U=U+1;let ke=B-1+Ke;if(ke>=34||ke<=-7||Ke>0){if(B>34)return ie.push("0"),Ke>0?ie.push(`E+${Ke}`):Ke<0&&ie.push(`E${Ke}`),ie.join("");ie.push(`${C[U++]}`),B=B-1,B&&ie.push(".");for(let Ve=0;Ve<B;Ve++)ie.push(`${C[U++]}`);ie.push("E"),ke>0?ie.push(`+${ke}`):ie.push(`${ke}`)}else if(Ke>=0)for(let Ve=0;Ve<B;Ve++)ie.push(`${C[U++]}`);else{let Ve=B+Ke;if(Ve>0)for(let Te=0;Te<Ve;Te++)ie.push(`${C[U++]}`);else ie.push("0");for(ie.push(".");Ve++<0;)ie.push("0");for(let Te=0;Te<B-Math.max(Ve-1,0);Te++)ie.push(`${C[U++]}`)}return ie.join("")}toJSON(){return{$numberDecimal:this.toString()}}toExtendedJSON(){return{$numberDecimal:this.toString()}}static fromExtendedJSON(t){return gt.fromString(t.$numberDecimal)}inspect(t,B,C){return C??=i,`new Decimal128(${C(this.toString(),B)})`}},Vt=class Yt extends ge{get _bsontype(){return"Double"}constructor(t){super(),t instanceof Number&&(t=t.valueOf()),this.value=+t}static fromString(t){let B=Number(t);if(t==="NaN")return new Yt(NaN);if(t==="Infinity")return new Yt(1/0);if(t==="-Infinity")return new Yt(-1/0);if(!Number.isFinite(B))throw new x(`Input: ${t} is not representable as a Double`);if(t.trim()!==t)throw new x(`Input: '${t}' contains whitespace`);if(t==="")throw new x("Input is an empty string");if(/[^-0-9.+eE]/.test(t))throw new x(`Input: '${t}' is not in decimal or exponential notation`);return new Yt(B)}valueOf(){return this.value}toJSON(){return this.value}toString(t){return this.value.toString(t)}toExtendedJSON(t){return t&&(t.legacy||t.relaxed&&isFinite(this.value))?this.value:Object.is(Math.sign(this.value),-0)?{$numberDouble:"-0.0"}:{$numberDouble:Number.isInteger(this.value)?this.value.toFixed(1):this.value.toString()}}static fromExtendedJSON(t,B){let C=parseFloat(t.$numberDouble);return B&&B.relaxed?C:new Yt(C)}inspect(t,B,C){return C??=i,`new Double(${C(this.value,B)})`}},Gt=class Ru extends ge{get _bsontype(){return"Int32"}constructor(t){super(),t instanceof Number&&(t=t.valueOf()),this.value=+t|0}static fromString(t){let B=Br(t),C=Number(t);if(o<C)throw new x(`Input: '${t}' is larger than the maximum value for Int32`);if(n>C)throw new x(`Input: '${t}' is smaller than the minimum value for Int32`);if(Number.isSafeInteger(C)){if(C.toString()!==B)throw new x(`Input: '${t}' is not a valid Int32 string`)}else throw new x(`Input: '${t}' is not a safe integer`);return new Ru(C)}valueOf(){return this.value}toString(t){return this.value.toString(t)}toJSON(){return this.value}toExtendedJSON(t){return t&&(t.relaxed||t.legacy)?this.value:{$numberInt:this.value.toString()}}static fromExtendedJSON(t,B){return B&&B.relaxed?parseInt(t.$numberInt,10):new Ru(t.$numberInt)}inspect(t,B,C){return C??=i,`new Int32(${C(this.value,B)})`}},nr=class W1 extends ge{get _bsontype(){return"MaxKey"}toExtendedJSON(){return{$maxKey:1}}static fromExtendedJSON(){return new W1}inspect(){return"new MaxKey()"}},or=class z1 extends ge{get _bsontype(){return"MinKey"}toExtendedJSON(){return{$minKey:1}}static fromExtendedJSON(){return new z1}inspect(){return"new MinKey()"}},Ht=new Float64Array(1),xe=new Uint8Array(Ht.buffer,0,8);Ht[0]=-1;var g1=xe[7]===0,we={getNonnegativeInt32LE(s,t){if(s[t+3]>127)throw new RangeError(`Size cannot be negative at offset: ${t}`);return s[t]|s[t+1]<<8|s[t+2]<<16|s[t+3]<<24},getInt32LE(s,t){return s[t]|s[t+1]<<8|s[t+2]<<16|s[t+3]<<24},getUint32LE(s,t){return s[t]+s[t+1]*256+s[t+2]*65536+s[t+3]*16777216},getUint32BE(s,t){return s[t+3]+s[t+2]*256+s[t+1]*65536+s[t]*16777216},getBigInt64LE(s,t){let B=we.getUint32LE(s,t),C=we.getUint32LE(s,t+4);return(BigInt(C)<<BigInt(32))+BigInt(B)},getFloat64LE:g1?(s,t)=>(xe[7]=s[t],xe[6]=s[t+1],xe[5]=s[t+2],xe[4]=s[t+3],xe[3]=s[t+4],xe[2]=s[t+5],xe[1]=s[t+6],xe[0]=s[t+7],Ht[0]):(s,t)=>(xe[0]=s[t],xe[1]=s[t+1],xe[2]=s[t+2],xe[3]=s[t+3],xe[4]=s[t+4],xe[5]=s[t+5],xe[6]=s[t+6],xe[7]=s[t+7],Ht[0]),setInt32BE(s,t,B){return s[t+3]=B,B>>>=8,s[t+2]=B,B>>>=8,s[t+1]=B,B>>>=8,s[t]=B,4},setInt32LE(s,t,B){return s[t]=B,B>>>=8,s[t+1]=B,B>>>=8,s[t+2]=B,B>>>=8,s[t+3]=B,4},setBigInt64LE(s,t,B){let C=BigInt(4294967295),U=Number(B&C);s[t]=U,U>>=8,s[t+1]=U,U>>=8,s[t+2]=U,U>>=8,s[t+3]=U;let V=Number(B>>BigInt(32)&C);return s[t+4]=V,V>>=8,s[t+5]=V,V>>=8,s[t+6]=V,V>>=8,s[t+7]=V,8},setFloat64LE:g1?(s,t,B)=>(Ht[0]=B,s[t]=xe[7],s[t+1]=xe[6],s[t+2]=xe[5],s[t+3]=xe[4],s[t+4]=xe[3],s[t+5]=xe[2],s[t+6]=xe[1],s[t+7]=xe[0],8):(s,t,B)=>(Ht[0]=B,s[t]=xe[0],s[t+1]=xe[1],s[t+2]=xe[2],s[t+3]=xe[3],s[t+4]=xe[4],s[t+5]=xe[5],s[t+6]=xe[6],s[t+7]=xe[7],8)},vo=new RegExp("^[0-9a-fA-F]{24}$"),Lt=null,kt=class ut extends ge{get _bsontype(){return"ObjectId"}constructor(t){super();let B;if(typeof t=="object"&&t&&"id"in t){if(typeof t.id!="string"&&!ArrayBuffer.isView(t.id))throw new x("Argument passed in must have an id that is of type string or Buffer");"toHexString"in t&&typeof t.toHexString=="function"?B=q.fromHex(t.toHexString()):B=t.id}else B=t;if(B==null||typeof B=="number")this.buffer=ut.generate(typeof B=="number"?B:void 0);else if(ArrayBuffer.isView(B)&&B.byteLength===12)this.buffer=q.toLocalBufferType(B);else if(typeof B=="string")if(B.length===24&&vo.test(B))this.buffer=q.fromHex(B);else throw new x("input must be a 24 character hex string, 12 byte Uint8Array, or an integer");else throw new x("Argument passed in does not match the accepted types");ut.cacheHexString&&(this.__id=q.toHex(this.id))}get id(){return this.buffer}set id(t){this.buffer=t,ut.cacheHexString&&(this.__id=q.toHex(t))}toHexString(){if(ut.cacheHexString&&this.__id)return this.__id;let t=q.toHex(this.id);return ut.cacheHexString&&!this.__id&&(this.__id=t),t}static getInc(){return ut.index=(ut.index+1)%16777215}static generate(t){typeof t!="number"&&(t=Math.floor(Date.now()/1e3));let B=ut.getInc(),C=q.allocateUnsafe(12);return we.setInt32BE(C,0,t),Lt===null&&(Lt=q.randomBytes(5)),C[4]=Lt[0],C[5]=Lt[1],C[6]=Lt[2],C[7]=Lt[3],C[8]=Lt[4],C[11]=B&255,C[10]=B>>8&255,C[9]=B>>16&255,C}toString(t){return t==="base64"?q.toBase64(this.id):t==="hex"?this.toHexString():this.toHexString()}toJSON(){return this.toHexString()}static is(t){return t!=null&&typeof t=="object"&&"_bsontype"in t&&t._bsontype==="ObjectId"}equals(t){if(t==null)return!1;if(ut.is(t))return this.buffer[11]===t.buffer[11]&&q.equals(this.buffer,t.buffer);if(typeof t=="string")return t.toLowerCase()===this.toHexString();if(typeof t=="object"&&typeof t.toHexString=="function"){let B=t.toHexString(),C=this.toHexString();return typeof B=="string"&&B.toLowerCase()===C}return!1}getTimestamp(){let t=new Date,B=we.getUint32BE(this.buffer,0);return t.setTime(Math.floor(B)*1e3),t}static createPk(){return new ut}serializeInto(t,B){return t[B]=this.buffer[0],t[B+1]=this.buffer[1],t[B+2]=this.buffer[2],t[B+3]=this.buffer[3],t[B+4]=this.buffer[4],t[B+5]=this.buffer[5],t[B+6]=this.buffer[6],t[B+7]=this.buffer[7],t[B+8]=this.buffer[8],t[B+9]=this.buffer[9],t[B+10]=this.buffer[10],t[B+11]=this.buffer[11],12}static createFromTime(t){let B=q.allocate(12);for(let C=11;C>=4;C--)B[C]=0;return we.setInt32BE(B,0,t),new ut(B)}static createFromHexString(t){if(t?.length!==24)throw new x("hex string must be 24 characters");return new ut(q.fromHex(t))}static createFromBase64(t){if(t?.length!==16)throw new x("base64 string must be 16 characters");return new ut(q.fromBase64(t))}static isValid(t){if(t==null)return!1;try{return new ut(t),!0}catch{return!1}}toExtendedJSON(){return this.toHexString?{$oid:this.toHexString()}:{$oid:this.toString("hex")}}static fromExtendedJSON(t){return new ut(t.$oid)}inspect(t,B,C){return C??=i,`new ObjectId(${C(this.toHexString(),B)})`}};kt.index=Math.floor(Math.random()*16777215);function wr(s,t,B){let C=5;if(Array.isArray(s))for(let U=0;U<s.length;U++)C+=y1(U.toString(),s[U],t,!0,B);else{typeof s?.toBSON=="function"&&(s=s.toBSON());for(let U of Object.keys(s))C+=y1(U,s[U],t,!1,B)}return C}function y1(s,t,B=!1,C=!1,U=!1){switch(typeof t?.toBSON=="function"&&(t=t.toBSON()),typeof t){case"string":return 1+q.utf8ByteLength(s)+1+4+q.utf8ByteLength(t)+1;case"number":return Math.floor(t)===t&&t>=c&&t<=m&&t>=n&&t<=o?(s!=null?q.utf8ByteLength(s)+1:0)+5:(s!=null?q.utf8ByteLength(s)+1:0)+9;case"undefined":return C||!U?(s!=null?q.utf8ByteLength(s)+1:0)+1:0;case"boolean":return(s!=null?q.utf8ByteLength(s)+1:0)+2;case"object":if(t!=null&&typeof t._bsontype=="string"&&t[Symbol.for("@@mdb.bson.version")]!==A)throw new G;if(t==null||t._bsontype==="MinKey"||t._bsontype==="MaxKey")return(s!=null?q.utf8ByteLength(s)+1:0)+1;if(t._bsontype==="ObjectId")return(s!=null?q.utf8ByteLength(s)+1:0)+13;if(t instanceof Date||l(t))return(s!=null?q.utf8ByteLength(s)+1:0)+9;if(ArrayBuffer.isView(t)||t instanceof ArrayBuffer||u(t))return(s!=null?q.utf8ByteLength(s)+1:0)+6+t.byteLength;if(t._bsontype==="Long"||t._bsontype==="Double"||t._bsontype==="Timestamp")return(s!=null?q.utf8ByteLength(s)+1:0)+9;if(t._bsontype==="Decimal128")return(s!=null?q.utf8ByteLength(s)+1:0)+17;if(t._bsontype==="Code")return t.scope!=null&&Object.keys(t.scope).length>0?(s!=null?q.utf8ByteLength(s)+1:0)+1+4+4+q.utf8ByteLength(t.code.toString())+1+wr(t.scope,B,U):(s!=null?q.utf8ByteLength(s)+1:0)+1+4+q.utf8ByteLength(t.code.toString())+1;if(t._bsontype==="Binary"){let V=t;return V.sub_type===Se.SUBTYPE_BYTE_ARRAY?(s!=null?q.utf8ByteLength(s)+1:0)+(V.position+1+4+1+4):(s!=null?q.utf8ByteLength(s)+1:0)+(V.position+1+4+1)}else{if(t._bsontype==="Symbol")return(s!=null?q.utf8ByteLength(s)+1:0)+q.utf8ByteLength(t.value)+4+1+1;if(t._bsontype==="DBRef"){let V=Object.assign({$ref:t.collection,$id:t.oid},t.fields);return t.db!=null&&(V.$db=t.db),(s!=null?q.utf8ByteLength(s)+1:0)+1+wr(V,B,U)}else return t instanceof RegExp||h(t)?(s!=null?q.utf8ByteLength(s)+1:0)+1+q.utf8ByteLength(t.source)+1+(t.global?1:0)+(t.ignoreCase?1:0)+(t.multiline?1:0)+1:t._bsontype==="BSONRegExp"?(s!=null?q.utf8ByteLength(s)+1:0)+1+q.utf8ByteLength(t.pattern)+1+q.utf8ByteLength(t.options)+1:(s!=null?q.utf8ByteLength(s)+1:0)+wr(t,B,U)+1}case"function":if(B)return(s!=null?q.utf8ByteLength(s)+1:0)+1+4+q.utf8ByteLength(t.toString())+1}return 0}function To(s){return s.split("").sort().join("")}var Ut=class lr extends ge{get _bsontype(){return"BSONRegExp"}constructor(t,B){if(super(),this.pattern=t,this.options=To(B??""),this.pattern.indexOf("\0")!==-1)throw new x(`BSON Regex patterns cannot contain null bytes, found: ${JSON.stringify(this.pattern)}`);if(this.options.indexOf("\0")!==-1)throw new x(`BSON Regex options cannot contain null bytes, found: ${JSON.stringify(this.options)}`);for(let C=0;C<this.options.length;C++)if(!(this.options[C]==="i"||this.options[C]==="m"||this.options[C]==="x"||this.options[C]==="l"||this.options[C]==="s"||this.options[C]==="u"))throw new x(`The regular expression option [${this.options[C]}] is not supported`)}static parseOptions(t){return t?t.split("").sort().join(""):""}toExtendedJSON(t){return t=t||{},t.legacy?{$regex:this.pattern,$options:this.options}:{$regularExpression:{pattern:this.pattern,options:this.options}}}static fromExtendedJSON(t){if("$regex"in t)if(typeof t.$regex!="string"){if(t.$regex._bsontype==="BSONRegExp")return t}else return new lr(t.$regex,lr.parseOptions(t.$options));if("$regularExpression"in t)return new lr(t.$regularExpression.pattern,lr.parseOptions(t.$regularExpression.options));throw new x(`Unexpected BSONRegExp EJSON object form: ${JSON.stringify(t)}`)}inspect(t,B,C){let U=p(B)??(ce=>ce);C??=i;let V=U(C(this.pattern),"regexp"),ee=U(C(this.options),"regexp");return`new BSONRegExp(${V}, ${ee})`}},ir=class V1 extends ge{get _bsontype(){return"BSONSymbol"}constructor(t){super(),this.value=t}valueOf(){return this.value}toString(){return this.value}toJSON(){return this.value}toExtendedJSON(){return{$symbol:this.value}}static fromExtendedJSON(t){return new V1(t.$symbol)}inspect(t,B,C){return C??=i,`new BSONSymbol(${C(this.value,B)})`}},Mo=ae,qt=class Jt extends Mo{get _bsontype(){return"Timestamp"}constructor(t){if(t==null)super(0,0,!0);else if(typeof t=="bigint")super(t,!0);else if(ae.isLong(t))super(t.low,t.high,!0);else if(typeof t=="object"&&"t"in t&&"i"in t){if(typeof t.t!="number"&&(typeof t.t!="object"||t.t._bsontype!=="Int32"))throw new x("Timestamp constructed from { t, i } must provide t as a number");if(typeof t.i!="number"&&(typeof t.i!="object"||t.i._bsontype!=="Int32"))throw new x("Timestamp constructed from { t, i } must provide i as a number");let B=Number(t.t),C=Number(t.i);if(B<0||Number.isNaN(B))throw new x("Timestamp constructed from { t, i } must provide a positive t");if(C<0||Number.isNaN(C))throw new x("Timestamp constructed from { t, i } must provide a positive i");if(B>4294967295)throw new x("Timestamp constructed from { t, i } must provide t equal or less than uint32 max");if(C>4294967295)throw new x("Timestamp constructed from { t, i } must provide i equal or less than uint32 max");super(C,B,!0)}else throw new x("A Timestamp can only be constructed with: bigint, Long, or { t: number; i: number }")}toJSON(){return{$timestamp:this.toString()}}static fromInt(t){return new Jt(ae.fromInt(t,!0))}static fromNumber(t){return new Jt(ae.fromNumber(t,!0))}static fromBits(t,B){return new Jt({i:t,t:B})}static fromString(t,B){return new Jt(ae.fromString(t,!0,B))}toExtendedJSON(){return{$timestamp:{t:this.high>>>0,i:this.low>>>0}}}static fromExtendedJSON(t){let B=ae.isLong(t.$timestamp.i)?t.$timestamp.i.getLowBitsUnsigned():t.$timestamp.i,C=ae.isLong(t.$timestamp.t)?t.$timestamp.t.getLowBitsUnsigned():t.$timestamp.t;return new Jt({t:C,i:B})}inspect(t,B,C){C??=i;let U=C(this.high>>>0,B),V=C(this.low>>>0,B);return`new Timestamp({ t: ${U}, i: ${V} })`}};qt.MAX_VALUE=ae.MAX_UNSIGNED_VALUE;var No=ae.fromNumber(m),Ro=ae.fromNumber(c);function S1(s,t,B){t=t??{};let C=t&&t.index?t.index:0,U=we.getInt32LE(s,C);if(U<5)throw new x(`bson size must be >= 5, is ${U}`);if(t.allowObjectSmallerThanBufferSize&&s.length<U)throw new x(`buffer length ${s.length} must be >= bson size ${U}`);if(!t.allowObjectSmallerThanBufferSize&&s.length!==U)throw new x(`buffer length ${s.length} must === bson size ${U}`);if(U+C>s.byteLength)throw new x(`(bson size ${U} + options.index ${C} must be <= buffer length ${s.byteLength})`);if(s[C+U-1]!==0)throw new x("One object, sized correctly, with a spot for an EOO, but the EOO isn't 0x00");return Fr(s,C,t,B)}var Io=/^\$ref$|^\$id$|^\$db$/;function Fr(s,t,B,C=!1){let U=B.fieldsAsRaw==null?null:B.fieldsAsRaw,V=B.raw==null?!1:B.raw,ee=typeof B.bsonRegExp=="boolean"?B.bsonRegExp:!1,ce=B.promoteBuffers??!1,z=B.promoteLongs??!0,Be=B.promoteValues??!0,ie=B.useBigInt64??!1;if(ie&&!Be)throw new x("Must either request bigint or Long for int64 deserialization");if(ie&&!z)throw new x("Must either request bigint or Long for int64 deserialization");let Z=B.validation==null?{utf8:!0}:B.validation,ne=!0,Ae,me,Ne=Z.utf8;if(typeof Ne=="boolean")Ae=Ne;else{ne=!1;let Re=Object.keys(Ne).map(function(Fe){return Ne[Fe]});if(Re.length===0)throw new x("UTF-8 validation setting cannot be empty");if(typeof Re[0]!="boolean")throw new x("Invalid UTF-8 validation option, must specify boolean values");if(Ae=Re[0],!Re.every(Fe=>Fe===Ae))throw new x("Invalid UTF-8 validation option - keys must be all true or all false")}if(!ne){me=new Set;for(let Re of Object.keys(Ne))me.add(Re)}let Le=t;if(s.length<5)throw new x("corrupt bson message < 5 bytes long");let Ke=we.getInt32LE(s,t);if(t+=4,Ke<5||Ke>s.length)throw new x("corrupt bson message");let ke=C?[]:{},Ve=0,Te=!1,Dt=C?!1:null;for(;!Te;){let Re=s[t++];if(Re===0)break;let Fe=t;for(;s[Fe]!==0&&Fe<s.length;)Fe++;if(Fe>=s.byteLength)throw new x("Bad BSON Document: illegal CString");let et=C?Ve++:q.toUTF8(s,t,Fe,!1),Ie=!0;ne||me?.has(et)?Ie=Ae:Ie=!Ae,Dt!==!1&&et[0]==="$"&&(Dt=Io.test(et));let Oe;if(t=Fe+1,Re===f){let he=we.getInt32LE(s,t);if(t+=4,he<=0||he>s.length-t||s[t+he-1]!==0)throw new x("bad string length in bson");Oe=q.toUTF8(s,t,t+he-1,Ie),t=t+he}else if(Re===T){let he=q.allocateUnsafe(12);for(let be=0;be<12;be++)he[be]=s[t+be];Oe=new kt(he),t=t+12}else if(Re===S&&Be===!1)Oe=new Gt(we.getInt32LE(s,t)),t+=4;else if(Re===S)Oe=we.getInt32LE(s,t),t+=4;else if(Re===b)Oe=we.getFloat64LE(s,t),t+=8,Be===!1&&(Oe=new Vt(Oe));else if(Re===N){let he=we.getInt32LE(s,t),be=we.getInt32LE(s,t+4);t+=8,Oe=new Date(new ae(he,be).toNumber())}else if(Re===D){if(s[t]!==0&&s[t]!==1)throw new x("illegal boolean type value");Oe=s[t++]===1}else if(Re===O){let he=t,be=we.getInt32LE(s,t);if(be<=0||be>s.length-t)throw new x("bad embedded document length in bson");if(V)Oe=s.slice(t,t+be);else{let Pe=B;ne||(Pe={...B,validation:{utf8:Ie}}),Oe=Fr(s,he,Pe,!1)}t=t+be}else if(Re===F){let he=t,be=we.getInt32LE(s,t),Pe=B,Qe=t+be;if(U&&U[et]&&(Pe={...B,raw:!0}),ne||(Pe={...Pe,validation:{utf8:Ie}}),Oe=Fr(s,he,Pe,!0),t=t+be,s[t-1]!==0)throw new x("invalid array terminator byte");if(t!==Qe)throw new x("corrupted array bson")}else if(Re===g)Oe=void 0;else if(Re===_)Oe=null;else if(Re===w)if(ie)Oe=we.getBigInt64LE(s,t),t+=8;else{let he=we.getInt32LE(s,t),be=we.getInt32LE(s,t+4);t+=8;let Pe=new ae(he,be);z&&Be===!0?Oe=Pe.lessThanOrEqual(No)&&Pe.greaterThanOrEqual(Ro)?Pe.toNumber():Pe:Oe=Pe}else if(Re===k){let he=q.allocateUnsafe(16);for(let be=0;be<16;be++)he[be]=s[t+be];t=t+16,Oe=new ur(he)}else if(Re===y){let he=we.getInt32LE(s,t);t+=4;let be=he,Pe=s[t++];if(he<0)throw new x("Negative binary type element size found");if(he>s.byteLength)throw new x("Binary type size larger than document size");if(s.slice!=null){if(Pe===Se.SUBTYPE_BYTE_ARRAY){if(he=we.getInt32LE(s,t),t+=4,he<0)throw new x("Negative binary type element size found for subtype 0x02");if(he>be-4)throw new x("Binary type with subtype 0x02 contains too long binary size");if(he<be-4)throw new x("Binary type with subtype 0x02 contains too short binary size")}ce&&Be?Oe=q.toLocalBufferType(s.slice(t,t+he)):(Oe=new Se(s.slice(t,t+he),Pe),Pe===Y&&dt.isValid(Oe)&&(Oe=Oe.toUUID()))}else{if(Pe===Se.SUBTYPE_BYTE_ARRAY){if(he=we.getInt32LE(s,t),t+=4,he<0)throw new x("Negative binary type element size found for subtype 0x02");if(he>be-4)throw new x("Binary type with subtype 0x02 contains too long binary size");if(he<be-4)throw new x("Binary type with subtype 0x02 contains too short binary size")}if(ce&&Be)for(Oe=q.allocateUnsafe(he),Fe=0;Fe<he;Fe++)Oe[Fe]=s[t+Fe];else Oe=new Se(s.slice(t,t+he),Pe),Pe===Y&&dt.isValid(Oe)&&(Oe=Oe.toUUID())}t=t+he}else if(Re===R&&ee===!1){for(Fe=t;s[Fe]!==0&&Fe<s.length;)Fe++;if(Fe>=s.length)throw new x("Bad BSON Document: illegal CString");let he=q.toUTF8(s,t,Fe,!1);for(t=Fe+1,Fe=t;s[Fe]!==0&&Fe<s.length;)Fe++;if(Fe>=s.length)throw new x("Bad BSON Document: illegal CString");let be=q.toUTF8(s,t,Fe,!1);t=Fe+1;let Pe=new Array(be.length);for(Fe=0;Fe<be.length;Fe++)switch(be[Fe]){case"m":Pe[Fe]="m";break;case"s":Pe[Fe]="g";break;case"i":Pe[Fe]="i";break}Oe=new RegExp(he,Pe.join(""))}else if(Re===R&&ee===!0){for(Fe=t;s[Fe]!==0&&Fe<s.length;)Fe++;if(Fe>=s.length)throw new x("Bad BSON Document: illegal CString");let he=q.toUTF8(s,t,Fe,!1);for(t=Fe+1,Fe=t;s[Fe]!==0&&Fe<s.length;)Fe++;if(Fe>=s.length)throw new x("Bad BSON Document: illegal CString");let be=q.toUTF8(s,t,Fe,!1);t=Fe+1,Oe=new Ut(he,be)}else if(Re===I){let he=we.getInt32LE(s,t);if(t+=4,he<=0||he>s.length-t||s[t+he-1]!==0)throw new x("bad string length in bson");let be=q.toUTF8(s,t,t+he-1,Ie);Oe=Be?be:new ir(be),t=t+he}else if(Re===v)Oe=new qt({i:we.getUint32LE(s,t),t:we.getUint32LE(s,t+4)}),t+=8;else if(Re===$)Oe=new or;else if(Re===X)Oe=new nr;else if(Re===L){let he=we.getInt32LE(s,t);if(t+=4,he<=0||he>s.length-t||s[t+he-1]!==0)throw new x("bad string length in bson");let be=q.toUTF8(s,t,t+he-1,Ie);Oe=new bt(be),t=t+he}else if(Re===M){let he=we.getInt32LE(s,t);if(t+=4,he<13)throw new x("code_w_scope total size shorter minimum expected length");let be=we.getInt32LE(s,t);if(t+=4,be<=0||be>s.length-t||s[t+be-1]!==0)throw new x("bad string length in bson");let Pe=q.toUTF8(s,t,t+be-1,Ie);t=t+be;let Qe=t,Rt=we.getInt32LE(s,t),zo=Fr(s,Qe,B,!1);if(t=t+Rt,he<8+Rt+be)throw new x("code_w_scope total size is too short, truncating scope");if(he>8+Rt+be)throw new x("code_w_scope total size is too long, clips outer document");Oe=new bt(Pe,zo)}else if(Re===j){let he=we.getInt32LE(s,t);if(t+=4,he<=0||he>s.length-t||s[t+he-1]!==0)throw new x("bad string length in bson");let be=q.toUTF8(s,t,t+he-1,Ie);t=t+he;let Pe=q.allocateUnsafe(12);for(let Rt=0;Rt<12;Rt++)Pe[Rt]=s[t+Rt];let Qe=new kt(Pe);t=t+12,Oe=new Bt(be,Qe)}else throw new x(`Detected unknown BSON type ${Re.toString(16)} for fieldname "${et}"`);et==="__proto__"?Object.defineProperty(ke,et,{value:Oe,writable:!0,enumerable:!0,configurable:!0}):ke[et]=Oe}if(Ke!==t-Le)throw C?new x("corrupt array bson"):new x("corrupt object bson");if(!Dt)return ke;if(tr(ke)){let Re=Object.assign({},ke);return delete Re.$ref,delete Re.$id,delete Re.$db,new Bt(ke.$ref,ke.$id,ke.$db,Re)}return ke}var vr=/\x00/,B1=new Set(["$db","$ref","$id","$clusterTime"]);function iu(s,t,B,C){s[C++]=f;let U=q.encodeUTF8Into(s,t,C);C=C+U+1,s[C-1]=0;let V=q.encodeUTF8Into(s,B,C+4);return we.setInt32LE(s,C,V+1),C=C+4+V,s[C++]=0,C}function su(s,t,B,C){let U=!Object.is(B,-0)&&Number.isSafeInteger(B)&&B<=o&&B>=n?S:b;s[C++]=U;let V=q.encodeUTF8Into(s,t,C);return C=C+V,s[C++]=0,U===S?C+=we.setInt32LE(s,C,B):C+=we.setFloat64LE(s,C,B),C}function au(s,t,B,C){s[C++]=w;let U=q.encodeUTF8Into(s,t,C);return C+=U,s[C++]=0,C+=we.setBigInt64LE(s,C,B),C}function sr(s,t,B,C){s[C++]=_;let U=q.encodeUTF8Into(s,t,C);return C=C+U,s[C++]=0,C}function lu(s,t,B,C){s[C++]=D;let U=q.encodeUTF8Into(s,t,C);return C=C+U,s[C++]=0,s[C++]=B?1:0,C}function cu(s,t,B,C){s[C++]=N;let U=q.encodeUTF8Into(s,t,C);C=C+U,s[C++]=0;let V=ae.fromNumber(B.getTime()),ee=V.getLowBits(),ce=V.getHighBits();return C+=we.setInt32LE(s,C,ee),C+=we.setInt32LE(s,C,ce),C}function hu(s,t,B,C){s[C++]=R;let U=q.encodeUTF8Into(s,t,C);if(C=C+U,s[C++]=0,B.source&&B.source.match(vr)!=null)throw new x("value "+B.source+" must not contain null bytes");return C=C+q.encodeUTF8Into(s,B.source,C),s[C++]=0,B.ignoreCase&&(s[C++]=105),B.global&&(s[C++]=115),B.multiline&&(s[C++]=109),s[C++]=0,C}function du(s,t,B,C){s[C++]=R;let U=q.encodeUTF8Into(s,t,C);if(C=C+U,s[C++]=0,B.pattern.match(vr)!=null)throw new x("pattern "+B.pattern+" must not contain null bytes");C=C+q.encodeUTF8Into(s,B.pattern,C),s[C++]=0;let V=B.options.split("").sort().join("");return C=C+q.encodeUTF8Into(s,V,C),s[C++]=0,C}function pu(s,t,B,C){B===null?s[C++]=_:B._bsontype==="MinKey"?s[C++]=$:s[C++]=X;let U=q.encodeUTF8Into(s,t,C);return C=C+U,s[C++]=0,C}function Eu(s,t,B,C){s[C++]=T;let U=q.encodeUTF8Into(s,t,C);return C=C+U,s[C++]=0,C+=B.serializeInto(s,C),C}function mu(s,t,B,C){s[C++]=y;let U=q.encodeUTF8Into(s,t,C);C=C+U,s[C++]=0;let V=B.length;if(C+=we.setInt32LE(s,C,V),s[C++]=de,V<=16)for(let ee=0;ee<V;ee++)s[C+ee]=B[ee];else s.set(B,C);return C=C+V,C}function fu(s,t,B,C,U,V,ee,ce,z){if(z.has(B))throw new x("Cannot convert circular structure to BSON");z.add(B),s[C++]=Array.isArray(B)?F:O;let Be=q.encodeUTF8Into(s,t,C);C=C+Be,s[C++]=0;let ie=ar(s,B,U,C,V+1,ee,ce,z);return z.delete(B),ie}function Au(s,t,B,C){s[C++]=k;let U=q.encodeUTF8Into(s,t,C);C=C+U,s[C++]=0;for(let V=0;V<16;V++)s[C+V]=B.bytes[V];return C+16}function Cu(s,t,B,C){s[C++]=B._bsontype==="Long"?w:v;let U=q.encodeUTF8Into(s,t,C);C=C+U,s[C++]=0;let V=B.getLowBits(),ee=B.getHighBits();return C+=we.setInt32LE(s,C,V),C+=we.setInt32LE(s,C,ee),C}function gu(s,t,B,C){B=B.valueOf(),s[C++]=S;let U=q.encodeUTF8Into(s,t,C);return C=C+U,s[C++]=0,C+=we.setInt32LE(s,C,B),C}function yu(s,t,B,C){s[C++]=b;let U=q.encodeUTF8Into(s,t,C);return C=C+U,s[C++]=0,C+=we.setFloat64LE(s,C,B.value),C}function Su(s,t,B,C){s[C++]=L;let U=q.encodeUTF8Into(s,t,C);C=C+U,s[C++]=0;let V=B.toString(),ee=q.encodeUTF8Into(s,V,C+4)+1;return we.setInt32LE(s,C,ee),C=C+4+ee-1,s[C++]=0,C}function Bu(s,t,B,C,U=!1,V=0,ee=!1,ce=!0,z){if(B.scope&&typeof B.scope=="object"){s[C++]=M;let Be=q.encodeUTF8Into(s,t,C);C=C+Be,s[C++]=0;let ie=C,Z=B.code;C=C+4;let ne=q.encodeUTF8Into(s,Z,C+4)+1;we.setInt32LE(s,C,ne),s[C+4+ne-1]=0,C=C+ne+4;let Ae=ar(s,B.scope,U,C,V+1,ee,ce,z);C=Ae-1;let me=Ae-ie;ie+=we.setInt32LE(s,ie,me),s[C++]=0}else{s[C++]=L;let Be=q.encodeUTF8Into(s,t,C);C=C+Be,s[C++]=0;let ie=B.code.toString(),Z=q.encodeUTF8Into(s,ie,C+4)+1;we.setInt32LE(s,C,Z),C=C+4+Z-1,s[C++]=0}return C}function Du(s,t,B,C){s[C++]=y;let U=q.encodeUTF8Into(s,t,C);C=C+U,s[C++]=0;let V=B.buffer,ee=B.position;if(B.sub_type===Se.SUBTYPE_BYTE_ARRAY&&(ee=ee+4),C+=we.setInt32LE(s,C,ee),s[C++]=B.sub_type,B.sub_type===Se.SUBTYPE_BYTE_ARRAY&&(ee=ee-4,C+=we.setInt32LE(s,C,ee)),ee<=16)for(let ce=0;ce<ee;ce++)s[C+ce]=V[ce];else s.set(V,C);return C=C+B.position,C}function Ou(s,t,B,C){s[C++]=I;let U=q.encodeUTF8Into(s,t,C);C=C+U,s[C++]=0;let V=q.encodeUTF8Into(s,B.value,C+4)+1;return we.setInt32LE(s,C,V),C=C+4+V-1,s[C++]=0,C}function bu(s,t,B,C,U,V,ee){s[C++]=O;let ce=q.encodeUTF8Into(s,t,C);C=C+ce,s[C++]=0;let z=C,Be={$ref:B.collection||B.namespace,$id:B.oid};B.db!=null&&(Be.$db=B.db),Be=Object.assign(Be,B.fields);let ie=ar(s,Be,!1,C,U+1,V,!0,ee),Z=ie-z;return z+=we.setInt32LE(s,C,Z),ie}function ar(s,t,B,C,U,V,ee,ce){if(ce==null){if(t==null)return s[0]=5,s[1]=0,s[2]=0,s[3]=0,s[4]=0,5;if(Array.isArray(t))throw new x("serialize does not support an array as the root input");if(typeof t!="object")throw new x("serialize does not support non-object as the root input");if("_bsontype"in t&&typeof t._bsontype=="string")throw new x("BSON types cannot be serialized as a document");if(l(t)||h(t)||d(t)||u(t))throw new x("date, regexp, typedarray, and arraybuffer cannot be BSON documents");ce=new Set}ce.add(t);let z=C+4;if(Array.isArray(t))for(let ie=0;ie<t.length;ie++){let Z=`${ie}`,ne=t[ie];if(typeof ne?.toBSON=="function"&&(ne=ne.toBSON()),typeof ne=="string")z=iu(s,Z,ne,z);else if(typeof ne=="number")z=su(s,Z,ne,z);else if(typeof ne=="bigint")z=au(s,Z,ne,z);else if(typeof ne=="boolean")z=lu(s,Z,ne,z);else if(ne instanceof Date||l(ne))z=cu(s,Z,ne,z);else if(ne===void 0)z=sr(s,Z,ne,z);else if(ne===null)z=sr(s,Z,ne,z);else if(d(ne))z=mu(s,Z,ne,z);else if(ne instanceof RegExp||h(ne))z=hu(s,Z,ne,z);else if(typeof ne=="object"&&ne._bsontype==null)z=fu(s,Z,ne,z,B,U,V,ee,ce);else{if(typeof ne=="object"&&ne[Symbol.for("@@mdb.bson.version")]!==A)throw new G;if(ne._bsontype==="ObjectId")z=Eu(s,Z,ne,z);else if(ne._bsontype==="Decimal128")z=Au(s,Z,ne,z);else if(ne._bsontype==="Long"||ne._bsontype==="Timestamp")z=Cu(s,Z,ne,z);else if(ne._bsontype==="Double")z=yu(s,Z,ne,z);else if(typeof ne=="function"&&V)z=Su(s,Z,ne,z);else if(ne._bsontype==="Code")z=Bu(s,Z,ne,z,B,U,V,ee,ce);else if(ne._bsontype==="Binary")z=Du(s,Z,ne,z);else if(ne._bsontype==="BSONSymbol")z=Ou(s,Z,ne,z);else if(ne._bsontype==="DBRef")z=bu(s,Z,ne,z,U,V,ce);else if(ne._bsontype==="BSONRegExp")z=du(s,Z,ne,z);else if(ne._bsontype==="Int32")z=gu(s,Z,ne,z);else if(ne._bsontype==="MinKey"||ne._bsontype==="MaxKey")z=pu(s,Z,ne,z);else if(typeof ne._bsontype<"u")throw new x(`Unrecognized or invalid _bsontype: ${String(ne._bsontype)}`)}}else if(t instanceof Map||a(t)){let ie=t.entries(),Z=!1;for(;!Z;){let ne=ie.next();if(Z=!!ne.done,Z)continue;let Ae=ne.value[0],me=ne.value[1];typeof me?.toBSON=="function"&&(me=me.toBSON());let Ne=typeof me;if(typeof Ae=="string"&&!B1.has(Ae)){if(Ae.match(vr)!=null)throw new x("key "+Ae+" must not contain null bytes");if(B){if(Ae[0]==="$")throw new x("key "+Ae+" must not start with '$'");if(Ae.includes("."))throw new x("key "+Ae+" must not contain '.'")}}if(Ne==="string")z=iu(s,Ae,me,z);else if(Ne==="number")z=su(s,Ae,me,z);else if(Ne==="bigint")z=au(s,Ae,me,z);else if(Ne==="boolean")z=lu(s,Ae,me,z);else if(me instanceof Date||l(me))z=cu(s,Ae,me,z);else if(me===null||me===void 0&&ee===!1)z=sr(s,Ae,me,z);else if(d(me))z=mu(s,Ae,me,z);else if(me instanceof RegExp||h(me))z=hu(s,Ae,me,z);else if(Ne==="object"&&me._bsontype==null)z=fu(s,Ae,me,z,B,U,V,ee,ce);else{if(typeof me=="object"&&me[Symbol.for("@@mdb.bson.version")]!==A)throw new G;if(me._bsontype==="ObjectId")z=Eu(s,Ae,me,z);else if(Ne==="object"&&me._bsontype==="Decimal128")z=Au(s,Ae,me,z);else if(me._bsontype==="Long"||me._bsontype==="Timestamp")z=Cu(s,Ae,me,z);else if(me._bsontype==="Double")z=yu(s,Ae,me,z);else if(me._bsontype==="Code")z=Bu(s,Ae,me,z,B,U,V,ee,ce);else if(typeof me=="function"&&V)z=Su(s,Ae,me,z);else if(me._bsontype==="Binary")z=Du(s,Ae,me,z);else if(me._bsontype==="BSONSymbol")z=Ou(s,Ae,me,z);else if(me._bsontype==="DBRef")z=bu(s,Ae,me,z,U,V,ce);else if(me._bsontype==="BSONRegExp")z=du(s,Ae,me,z);else if(me._bsontype==="Int32")z=gu(s,Ae,me,z);else if(me._bsontype==="MinKey"||me._bsontype==="MaxKey")z=pu(s,Ae,me,z);else if(typeof me._bsontype<"u")throw new x(`Unrecognized or invalid _bsontype: ${String(me._bsontype)}`)}}}else{if(typeof t?.toBSON=="function"&&(t=t.toBSON(),t!=null&&typeof t!="object"))throw new x("toBSON function did not return an object");for(let ie of Object.keys(t)){let Z=t[ie];typeof Z?.toBSON=="function"&&(Z=Z.toBSON());let ne=typeof Z;if(typeof ie=="string"&&!B1.has(ie)){if(ie.match(vr)!=null)throw new x("key "+ie+" must not contain null bytes");if(B){if(ie[0]==="$")throw new x("key "+ie+" must not start with '$'");if(ie.includes("."))throw new x("key "+ie+" must not contain '.'")}}if(ne==="string")z=iu(s,ie,Z,z);else if(ne==="number")z=su(s,ie,Z,z);else if(ne==="bigint")z=au(s,ie,Z,z);else if(ne==="boolean")z=lu(s,ie,Z,z);else if(Z instanceof Date||l(Z))z=cu(s,ie,Z,z);else if(Z===void 0)ee===!1&&(z=sr(s,ie,Z,z));else if(Z===null)z=sr(s,ie,Z,z);else if(d(Z))z=mu(s,ie,Z,z);else if(Z instanceof RegExp||h(Z))z=hu(s,ie,Z,z);else if(ne==="object"&&Z._bsontype==null)z=fu(s,ie,Z,z,B,U,V,ee,ce);else{if(typeof Z=="object"&&Z[Symbol.for("@@mdb.bson.version")]!==A)throw new G;if(Z._bsontype==="ObjectId")z=Eu(s,ie,Z,z);else if(ne==="object"&&Z._bsontype==="Decimal128")z=Au(s,ie,Z,z);else if(Z._bsontype==="Long"||Z._bsontype==="Timestamp")z=Cu(s,ie,Z,z);else if(Z._bsontype==="Double")z=yu(s,ie,Z,z);else if(Z._bsontype==="Code")z=Bu(s,ie,Z,z,B,U,V,ee,ce);else if(typeof Z=="function"&&V)z=Su(s,ie,Z,z);else if(Z._bsontype==="Binary")z=Du(s,ie,Z,z);else if(Z._bsontype==="BSONSymbol")z=Ou(s,ie,Z,z);else if(Z._bsontype==="DBRef")z=bu(s,ie,Z,z,U,V,ce);else if(Z._bsontype==="BSONRegExp")z=du(s,ie,Z,z);else if(Z._bsontype==="Int32")z=gu(s,ie,Z,z);else if(Z._bsontype==="MinKey"||Z._bsontype==="MaxKey")z=pu(s,ie,Z,z);else if(typeof Z._bsontype<"u")throw new x(`Unrecognized or invalid _bsontype: ${String(Z._bsontype)}`)}}}ce.delete(t),s[z++]=0;let Be=z-C;return C+=we.setInt32LE(s,C,Be),z}function _o(s){return s!=null&&typeof s=="object"&&"_bsontype"in s&&typeof s._bsontype=="string"}var Po={$oid:kt,$binary:Se,$uuid:Se,$symbol:ir,$numberInt:Gt,$numberDecimal:ur,$numberDouble:Vt,$numberLong:ae,$minKey:or,$maxKey:nr,$regex:Ut,$regularExpression:Ut,$timestamp:qt};function D1(s,t={}){if(typeof s=="number"){let C=s<=o&&s>=n,U=s<=r&&s>=E;if(t.relaxed||t.legacy)return s;if(Number.isInteger(s)&&!Object.is(s,-0)){if(C)return new Gt(s);if(U)return t.useBigInt64?BigInt(s):ae.fromNumber(s)}return new Vt(s)}if(s==null||typeof s!="object")return s;if(s.$undefined)return null;let B=Object.keys(s).filter(C=>C.startsWith("$")&&s[C]!=null);for(let C=0;C<B.length;C++){let U=Po[B[C]];if(U)return U.fromExtendedJSON(s,t)}if(s.$date!=null){let C=s.$date,U=new Date;if(t.legacy)if(typeof C=="number")U.setTime(C);else if(typeof C=="string")U.setTime(Date.parse(C));else if(typeof C=="bigint")U.setTime(Number(C));else throw new Q(`Unrecognized type for EJSON date: ${typeof C}`);else if(typeof C=="string")U.setTime(Date.parse(C));else if(ae.isLong(C))U.setTime(C.toNumber());else if(typeof C=="number"&&t.relaxed)U.setTime(C);else if(typeof C=="bigint")U.setTime(Number(C));else throw new Q(`Unrecognized type for EJSON date: ${typeof C}`);return U}if(s.$code!=null){let C=Object.assign({},s);return s.$scope&&(C.$scope=D1(s.$scope)),bt.fromExtendedJSON(s)}if(tr(s)||s.$dbPointer){let C=s.$ref?s:s.$dbPointer;if(C instanceof Bt)return C;let U=Object.keys(C).filter(ee=>ee.startsWith("$")),V=!0;if(U.forEach(ee=>{["$ref","$id","$db"].indexOf(ee)===-1&&(V=!1)}),V)return Bt.fromExtendedJSON(C)}return s}function xo(s,t){return s.map((B,C)=>{t.seenObjects.push({propertyName:`index ${C}`,obj:null});try{return Ft(B,t)}finally{t.seenObjects.pop()}})}function O1(s){let t=s.toISOString();return s.getUTCMilliseconds()!==0?t:t.slice(0,-5)+"Z"}function Ft(s,t){if(s instanceof Map||a(s)){let B=Object.create(null);for(let[C,U]of s){if(typeof C!="string")throw new x("Can only serialize maps with string keys");B[C]=U}return Ft(B,t)}if((typeof s=="object"||typeof s=="function")&&s!==null){let B=t.seenObjects.findIndex(C=>C.obj===s);if(B!==-1){let C=t.seenObjects.map(ie=>ie.propertyName),U=C.slice(0,B).map(ie=>`${ie} -> `).join(""),V=C[B],ee=" -> "+C.slice(B+1,C.length-1).map(ie=>`${ie} -> `).join(""),ce=C[C.length-1],z=" ".repeat(U.length+V.length/2),Be="-".repeat(ee.length+(V.length+ce.length)/2-1);throw new x(`Converting circular structure to EJSON:
|
|
6
|
-
${U}${V}${ee}${ce}
|
|
7
|
-
${z}\\${Be}/`)}t.seenObjects[t.seenObjects.length-1].obj=s}if(Array.isArray(s))return xo(s,t);if(s===void 0)return null;if(s instanceof Date||l(s)){let B=s.getTime(),C=B>-1&&B<2534023188e5;return t.legacy?t.relaxed&&C?{$date:s.getTime()}:{$date:O1(s)}:t.relaxed&&C?{$date:O1(s)}:{$date:{$numberLong:s.getTime().toString()}}}if(typeof s=="number"&&(!t.relaxed||!isFinite(s))){if(Number.isInteger(s)&&!Object.is(s,-0)){if(s>=n&&s<=o)return{$numberInt:s.toString()};if(s>=E&&s<=r)return{$numberLong:s.toString()}}return{$numberDouble:Object.is(s,-0)?"-0.0":s.toString()}}if(typeof s=="bigint")return t.relaxed?Number(BigInt.asIntN(64,s)):{$numberLong:BigInt.asIntN(64,s).toString()};if(s instanceof RegExp||h(s)){let B=s.flags;if(B===void 0){let C=s.toString().match(/[gimuy]*$/);C&&(B=C[0])}return new Ut(s.source,B).toExtendedJSON(t)}return s!=null&&typeof s=="object"?ko(s,t):s}var Lo={Binary:s=>new Se(s.value(),s.sub_type),Code:s=>new bt(s.code,s.scope),DBRef:s=>new Bt(s.collection||s.namespace,s.oid,s.db,s.fields),Decimal128:s=>new ur(s.bytes),Double:s=>new Vt(s.value),Int32:s=>new Gt(s.value),Long:s=>ae.fromBits(s.low!=null?s.low:s.low_,s.low!=null?s.high:s.high_,s.low!=null?s.unsigned:s.unsigned_),MaxKey:()=>new nr,MinKey:()=>new or,ObjectId:s=>new kt(s),BSONRegExp:s=>new Ut(s.pattern,s.options),BSONSymbol:s=>new ir(s.value),Timestamp:s=>qt.fromBits(s.low,s.high)};function ko(s,t){if(s==null||typeof s!="object")throw new x("not an object instance");let B=s._bsontype;if(typeof B>"u"){let C={};for(let U of Object.keys(s)){t.seenObjects.push({propertyName:U,obj:null});try{let V=Ft(s[U],t);U==="__proto__"?Object.defineProperty(C,U,{value:V,writable:!0,enumerable:!0,configurable:!0}):C[U]=V}finally{t.seenObjects.pop()}}return C}else{if(s!=null&&typeof s=="object"&&typeof s._bsontype=="string"&&s[Symbol.for("@@mdb.bson.version")]!==A)throw new G;if(_o(s)){let C=s;if(typeof C.toExtendedJSON!="function"){let U=Lo[s._bsontype];if(!U)throw new x("Unrecognized or invalid _bsontype: "+s._bsontype);C=U(C)}return B==="Code"&&C.scope?C=new bt(C.code,Ft(C.scope,t)):B==="DBRef"&&C.oid&&(C=new Bt(Ft(C.collection,t),Ft(C.oid,t),Ft(C.db,t),Ft(C.fields,t))),C.toExtendedJSON(t)}else throw new x("_bsontype must be a string, but was: "+typeof B)}}function b1(s,t){let B={useBigInt64:t?.useBigInt64??!1,relaxed:t?.relaxed??!0,legacy:t?.legacy??!1};return JSON.parse(s,(C,U)=>{if(C.indexOf("\0")!==-1)throw new x(`BSON Document field names cannot contain null bytes, found: ${JSON.stringify(C)}`);return D1(U,B)})}function w1(s,t,B,C){B!=null&&typeof B=="object"&&(C=B,B=0),t!=null&&typeof t=="object"&&!Array.isArray(t)&&(C=t,t=void 0,B=0);let U=Object.assign({relaxed:!0,legacy:!1},C,{seenObjects:[{propertyName:"(root)",obj:null}]}),V=Ft(s,U);return JSON.stringify(V,t,B)}function Uo(s,t){return t=t||{},JSON.parse(w1(s,t))}function jo(s,t){return t=t||{},b1(JSON.stringify(s),t)}var jt=Object.create(null);jt.parse=b1,jt.stringify=w1,jt.serialize=Uo,jt.deserialize=jo,Object.freeze(jt);function wu(s,t){try{return we.getNonnegativeInt32LE(s,t)}catch(B){throw new oe("BSON size cannot be negative",t,{cause:B})}}function Fu(s,t){let B=t;for(;s[B]!==0;B++);if(B===s.length-1)throw new oe("Null terminator not found",t);return B}function $o(s,t=0){if(t??=0,s.length<5)throw new oe(`Input must be at least 5 bytes, got ${s.length} bytes`,t);let B=wu(s,t);if(B>s.length-t)throw new oe(`Parsed documentSize (${B} bytes) does not match input length (${s.length} bytes)`,t);if(s[t+B-1]!==0)throw new oe("BSON documents must end in 0x00",t+B);let C=[],U=t+4;for(;U<=B+t;){let V=s[U];if(U+=1,V===0){if(U-t!==B)throw new oe("Invalid 0x00 type byte",U);break}let ee=U,ce=Fu(s,U)-ee;U+=ce+1;let z;if(V===1||V===18||V===9||V===17)z=8;else if(V===16)z=4;else if(V===7)z=12;else if(V===19)z=16;else if(V===8)z=1;else if(V===10||V===6||V===127||V===255)z=0;else if(V===11)z=Fu(s,Fu(s,U)+1)+1-U;else if(V===3||V===4||V===15)z=wu(s,U);else if(V===2||V===5||V===12||V===13||V===14)z=wu(s,U)+4,V===5&&(z+=1),V===12&&(z+=12);else throw new oe(`Invalid 0x${V.toString(16).padStart(2,"0")} type byte`,U);if(z>B)throw new oe("value reports length larger than document",U);C.push([V,ee,ce,U,z]),U+=z}return C}var Kt=Object.create(null);Kt.parseToElements=$o,Kt.ByteUtils=q,Kt.NumberUtils=we,Object.freeze(Kt);var F1=1024*1024*17,Nt=q.allocate(F1);function v1(s){Nt.length<s&&(Nt=q.allocate(s))}function T1(s,t={}){let B=typeof t.checkKeys=="boolean"?t.checkKeys:!1,C=typeof t.serializeFunctions=="boolean"?t.serializeFunctions:!1,U=typeof t.ignoreUndefined=="boolean"?t.ignoreUndefined:!0,V=typeof t.minInternalBufferSize=="number"?t.minInternalBufferSize:F1;Nt.length<V&&(Nt=q.allocate(V));let ee=ar(Nt,s,B,0,0,C,U,null),ce=q.allocateUnsafe(ee);return ce.set(Nt.subarray(0,ee),0),ce}function M1(s,t,B={}){let C=typeof B.checkKeys=="boolean"?B.checkKeys:!1,U=typeof B.serializeFunctions=="boolean"?B.serializeFunctions:!1,V=typeof B.ignoreUndefined=="boolean"?B.ignoreUndefined:!0,ee=typeof B.index=="number"?B.index:0,ce=ar(Nt,s,C,0,0,U,V,null);return t.set(Nt.subarray(0,ce),ee),ee+ce-1}function N1(s,t={}){return S1(q.toLocalBufferType(s),t)}function R1(s,t={}){t=t||{};let B=typeof t.serializeFunctions=="boolean"?t.serializeFunctions:!1,C=typeof t.ignoreUndefined=="boolean"?t.ignoreUndefined:!0;return wr(s,B,C)}function I1(s,t,B,C,U,V){let ee=Object.assign({allowObjectSmallerThanBufferSize:!0,index:0},V),ce=q.toLocalBufferType(s),z=t;for(let Be=0;Be<B;Be++){let ie=we.getInt32LE(ce,z);ee.index=z,C[U+Be]=S1(ce,ee),z=z+ie}return z}var Wo=Object.freeze({__proto__:null,BSONError:x,BSONOffsetError:oe,BSONRegExp:Ut,BSONRuntimeError:Q,BSONSymbol:ir,BSONType:se,BSONValue:ge,BSONVersionError:G,Binary:Se,Code:bt,DBRef:Bt,Decimal128:ur,Double:Vt,EJSON:jt,Int32:Gt,Long:ae,MaxKey:nr,MinKey:or,ObjectId:kt,Timestamp:qt,UUID:dt,calculateObjectSize:R1,deserialize:N1,deserializeStream:I1,onDemand:Kt,serialize:T1,serializeWithBufferAndIndex:M1,setInternalBufferSize:v1});e.BSON=Wo,e.BSONError=x,e.BSONOffsetError=oe,e.BSONRegExp=Ut,e.BSONRuntimeError=Q,e.BSONSymbol=ir,e.BSONType=se,e.BSONValue=ge,e.BSONVersionError=G,e.Binary=Se,e.Code=bt,e.DBRef=Bt,e.Decimal128=ur,e.Double=Vt,e.EJSON=jt,e.Int32=Gt,e.Long=ae,e.MaxKey=nr,e.MinKey=or,e.ObjectId=kt,e.Timestamp=qt,e.UUID=dt,e.calculateObjectSize=R1,e.deserialize=N1,e.deserializeStream=I1,e.onDemand=Kt,e.serialize=T1,e.serializeWithBufferAndIndex=M1,e.setInternalBufferSize=v1}),Ue=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resolveBSONOptions=e.pluckBSONSerializeOptions=e.toUTF8=e.getBigInt64LE=e.getFloat64LE=e.getInt32LE=e.parseToElementsToArray=e.UUID=e.Timestamp=e.serialize=e.ObjectId=e.MinKey=e.MaxKey=e.Long=e.Int32=e.EJSON=e.Double=e.deserialize=e.Decimal128=e.DBRef=e.Code=e.calculateObjectSize=e.BSONType=e.BSONSymbol=e.BSONRegExp=e.BSONError=e.BSON=e.Binary=void 0;var u=kr(),d=kr();Object.defineProperty(e,"Binary",{enumerable:!0,get:function(){return d.Binary}}),Object.defineProperty(e,"BSON",{enumerable:!0,get:function(){return d.BSON}}),Object.defineProperty(e,"BSONError",{enumerable:!0,get:function(){return d.BSONError}}),Object.defineProperty(e,"BSONRegExp",{enumerable:!0,get:function(){return d.BSONRegExp}}),Object.defineProperty(e,"BSONSymbol",{enumerable:!0,get:function(){return d.BSONSymbol}}),Object.defineProperty(e,"BSONType",{enumerable:!0,get:function(){return d.BSONType}}),Object.defineProperty(e,"calculateObjectSize",{enumerable:!0,get:function(){return d.calculateObjectSize}}),Object.defineProperty(e,"Code",{enumerable:!0,get:function(){return d.Code}}),Object.defineProperty(e,"DBRef",{enumerable:!0,get:function(){return d.DBRef}}),Object.defineProperty(e,"Decimal128",{enumerable:!0,get:function(){return d.Decimal128}}),Object.defineProperty(e,"deserialize",{enumerable:!0,get:function(){return d.deserialize}}),Object.defineProperty(e,"Double",{enumerable:!0,get:function(){return d.Double}}),Object.defineProperty(e,"EJSON",{enumerable:!0,get:function(){return d.EJSON}}),Object.defineProperty(e,"Int32",{enumerable:!0,get:function(){return d.Int32}}),Object.defineProperty(e,"Long",{enumerable:!0,get:function(){return d.Long}}),Object.defineProperty(e,"MaxKey",{enumerable:!0,get:function(){return d.MaxKey}}),Object.defineProperty(e,"MinKey",{enumerable:!0,get:function(){return d.MinKey}}),Object.defineProperty(e,"ObjectId",{enumerable:!0,get:function(){return d.ObjectId}}),Object.defineProperty(e,"serialize",{enumerable:!0,get:function(){return d.serialize}}),Object.defineProperty(e,"Timestamp",{enumerable:!0,get:function(){return d.Timestamp}}),Object.defineProperty(e,"UUID",{enumerable:!0,get:function(){return d.UUID}});function h(i,p){let A=u.BSON.onDemand.parseToElements(i,p);return Array.isArray(A)?A:[...A]}e.parseToElementsToArray=h,e.getInt32LE=u.BSON.onDemand.NumberUtils.getInt32LE,e.getFloat64LE=u.BSON.onDemand.NumberUtils.getFloat64LE,e.getBigInt64LE=u.BSON.onDemand.NumberUtils.getBigInt64LE,e.toUTF8=u.BSON.onDemand.ByteUtils.toUTF8;function a(i){let{fieldsAsRaw:p,useBigInt64:A,promoteValues:o,promoteBuffers:n,promoteLongs:r,serializeFunctions:E,ignoreUndefined:m,bsonRegExp:c,raw:b,enableUtf8Validation:f}=i;return{fieldsAsRaw:p,useBigInt64:A,promoteValues:o,promoteBuffers:n,promoteLongs:r,serializeFunctions:E,ignoreUndefined:m,bsonRegExp:c,raw:b,enableUtf8Validation:f}}e.pluckBSONSerializeOptions=a;function l(i,p){let A=p?.bsonOptions;return{raw:i?.raw??A?.raw??!1,useBigInt64:i?.useBigInt64??A?.useBigInt64??!1,promoteLongs:i?.promoteLongs??A?.promoteLongs??!0,promoteValues:i?.promoteValues??A?.promoteValues??!0,promoteBuffers:i?.promoteBuffers??A?.promoteBuffers??!1,ignoreUndefined:i?.ignoreUndefined??A?.ignoreUndefined??!1,bsonRegExp:i?.bsonRegExp??A?.bsonRegExp??!1,serializeFunctions:i?.serializeFunctions??A?.serializeFunctions??!1,fieldsAsRaw:i?.fieldsAsRaw??A?.fieldsAsRaw??{},enableUtf8Validation:i?.enableUtf8Validation??A?.enableUtf8Validation??!0}}e.resolveBSONOptions=l}),pe=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isResumableError=e.isNetworkTimeoutError=e.isSDAMUnrecoverableError=e.isNodeShuttingDownError=e.isRetryableReadError=e.isRetryableWriteError=e.needsRetryableWriteLabel=e.MongoWriteConcernError=e.MongoServerSelectionError=e.MongoSystemError=e.MongoMissingDependencyError=e.MongoMissingCredentialsError=e.MongoCompatibilityError=e.MongoInvalidArgumentError=e.MongoParseError=e.MongoNetworkTimeoutError=e.MongoNetworkError=e.isNetworkErrorBeforeHandshake=e.MongoTopologyClosedError=e.MongoCursorExhaustedError=e.MongoServerClosedError=e.MongoCursorInUseError=e.MongoUnexpectedServerResponseError=e.MongoGridFSChunkError=e.MongoGridFSStreamError=e.MongoTailableCursorError=e.MongoChangeStreamError=e.MongoGCPError=e.MongoAzureError=e.MongoOIDCError=e.MongoAWSError=e.MongoKerberosError=e.MongoExpiredSessionError=e.MongoTransactionError=e.MongoNotConnectedError=e.MongoDecompressionError=e.MongoBatchReExecutionError=e.MongoRuntimeError=e.MongoAPIError=e.MongoDriverError=e.MongoServerError=e.MongoError=e.MongoErrorLabel=e.GET_MORE_RESUMABLE_CODES=e.MONGODB_ERROR_CODES=e.NODE_IS_RECOVERING_ERROR_MESSAGE=e.LEGACY_NOT_PRIMARY_OR_SECONDARY_ERROR_MESSAGE=e.LEGACY_NOT_WRITABLE_PRIMARY_ERROR_MESSAGE=void 0;var u=Symbol("errorLabels");e.LEGACY_NOT_WRITABLE_PRIMARY_ERROR_MESSAGE=new RegExp("not master","i"),e.LEGACY_NOT_PRIMARY_OR_SECONDARY_ERROR_MESSAGE=new RegExp("not master or secondary","i"),e.NODE_IS_RECOVERING_ERROR_MESSAGE=new RegExp("node is recovering","i"),e.MONGODB_ERROR_CODES=Object.freeze({HostUnreachable:6,HostNotFound:7,AuthenticationFailed:18,NetworkTimeout:89,ShutdownInProgress:91,PrimarySteppedDown:189,ExceededTimeLimit:262,SocketException:9001,NotWritablePrimary:10107,InterruptedAtShutdown:11600,InterruptedDueToReplStateChange:11602,NotPrimaryNoSecondaryOk:13435,NotPrimaryOrSecondary:13436,StaleShardVersion:63,StaleEpoch:150,StaleConfig:13388,RetryChangeStream:234,FailedToSatisfyReadPreference:133,CursorNotFound:43,LegacyNotPrimary:10058,WriteConcernFailed:64,NamespaceNotFound:26,IllegalOperation:20,MaxTimeMSExpired:50,UnknownReplWriteConcern:79,UnsatisfiableWriteConcern:100,Reauthenticate:391,ReadConcernMajorityNotAvailableYet:134}),e.GET_MORE_RESUMABLE_CODES=new Set([e.MONGODB_ERROR_CODES.HostUnreachable,e.MONGODB_ERROR_CODES.HostNotFound,e.MONGODB_ERROR_CODES.NetworkTimeout,e.MONGODB_ERROR_CODES.ShutdownInProgress,e.MONGODB_ERROR_CODES.PrimarySteppedDown,e.MONGODB_ERROR_CODES.ExceededTimeLimit,e.MONGODB_ERROR_CODES.SocketException,e.MONGODB_ERROR_CODES.NotWritablePrimary,e.MONGODB_ERROR_CODES.InterruptedAtShutdown,e.MONGODB_ERROR_CODES.InterruptedDueToReplStateChange,e.MONGODB_ERROR_CODES.NotPrimaryNoSecondaryOk,e.MONGODB_ERROR_CODES.NotPrimaryOrSecondary,e.MONGODB_ERROR_CODES.StaleShardVersion,e.MONGODB_ERROR_CODES.StaleEpoch,e.MONGODB_ERROR_CODES.StaleConfig,e.MONGODB_ERROR_CODES.RetryChangeStream,e.MONGODB_ERROR_CODES.FailedToSatisfyReadPreference,e.MONGODB_ERROR_CODES.CursorNotFound]),e.MongoErrorLabel=Object.freeze({RetryableWriteError:"RetryableWriteError",TransientTransactionError:"TransientTransactionError",UnknownTransactionCommitResult:"UnknownTransactionCommitResult",ResumableChangeStreamError:"ResumableChangeStreamError",HandshakeError:"HandshakeError",ResetPool:"ResetPool",PoolRequstedRetry:"PoolRequstedRetry",InterruptInUseConnections:"InterruptInUseConnections",NoWritesPerformed:"NoWritesPerformed"});function d(K){return K!=null&&typeof K=="object"&&"errors"in K&&Array.isArray(K.errors)}var h=class extends Error{constructor(K,P){super(K,P),this[u]=new Set}static buildErrorMessage(K){return typeof K=="string"?K:d(K)&&K.message.length===0?K.errors.length===0?"AggregateError has an empty errors array. Please check the `cause` property for more information.":K.errors.map(({message:P})=>P).join(", "):K!=null&&typeof K=="object"&&"message"in K&&typeof K.message=="string"?K.message:"empty error message"}get name(){return"MongoError"}get errmsg(){return this.message}hasErrorLabel(K){return this[u].has(K)}addErrorLabel(K){this[u].add(K)}get errorLabels(){return Array.from(this[u])}};e.MongoError=h;var a=class extends h{constructor(K){super(K.message||K.errmsg||K.$err||"n/a"),K.errorLabels&&(this[u]=new Set(K.errorLabels)),this.errorResponse=K;for(let P in K)P!=="errorLabels"&&P!=="errmsg"&&P!=="message"&&P!=="errorResponse"&&(this[P]=K[P])}get name(){return"MongoServerError"}};e.MongoServerError=a;var l=class extends h{constructor(K,P){super(K,P)}get name(){return"MongoDriverError"}};e.MongoDriverError=l;var i=class extends l{constructor(K,P){super(K,P)}get name(){return"MongoAPIError"}};e.MongoAPIError=i;var p=class extends l{constructor(K,P){super(K,P)}get name(){return"MongoRuntimeError"}};e.MongoRuntimeError=p;var A=class extends i{constructor(K="This batch has already been executed, create new batch to execute"){super(K)}get name(){return"MongoBatchReExecutionError"}};e.MongoBatchReExecutionError=A;var o=class extends p{constructor(K){super(K)}get name(){return"MongoDecompressionError"}};e.MongoDecompressionError=o;var n=class extends i{constructor(K){super(K)}get name(){return"MongoNotConnectedError"}};e.MongoNotConnectedError=n;var r=class extends i{constructor(K){super(K)}get name(){return"MongoTransactionError"}};e.MongoTransactionError=r;var E=class extends i{constructor(K="Cannot use a session that has ended"){super(K)}get name(){return"MongoExpiredSessionError"}};e.MongoExpiredSessionError=E;var m=class extends p{constructor(K){super(K)}get name(){return"MongoKerberosError"}};e.MongoKerberosError=m;var c=class extends p{constructor(K,P){super(K,P)}get name(){return"MongoAWSError"}};e.MongoAWSError=c;var b=class extends p{constructor(K){super(K)}get name(){return"MongoOIDCError"}};e.MongoOIDCError=b;var f=class extends b{constructor(K){super(K)}get name(){return"MongoAzureError"}};e.MongoAzureError=f;var O=class extends b{constructor(K){super(K)}get name(){return"MongoGCPError"}};e.MongoGCPError=O;var F=class extends p{constructor(K){super(K)}get name(){return"MongoChangeStreamError"}};e.MongoChangeStreamError=F;var y=class extends i{constructor(K="Tailable cursor does not support this operation"){super(K)}get name(){return"MongoTailableCursorError"}};e.MongoTailableCursorError=y;var g=class extends p{constructor(K){super(K)}get name(){return"MongoGridFSStreamError"}};e.MongoGridFSStreamError=g;var T=class extends p{constructor(K){super(K)}get name(){return"MongoGridFSChunkError"}};e.MongoGridFSChunkError=T;var D=class extends p{constructor(K,P){super(K,P)}get name(){return"MongoUnexpectedServerResponseError"}};e.MongoUnexpectedServerResponseError=D;var N=class extends i{constructor(K="Cursor is already initialized"){super(K)}get name(){return"MongoCursorInUseError"}};e.MongoCursorInUseError=N;var _=class extends i{constructor(K="Server is closed"){super(K)}get name(){return"MongoServerClosedError"}};e.MongoServerClosedError=_;var R=class extends i{constructor(K){super(K||"Cursor is exhausted")}get name(){return"MongoCursorExhaustedError"}};e.MongoCursorExhaustedError=R;var j=class extends i{constructor(K="Topology is closed"){super(K)}get name(){return"MongoTopologyClosedError"}};e.MongoTopologyClosedError=j;var L=Symbol("beforeHandshake");function I(K){return K[L]===!0}e.isNetworkErrorBeforeHandshake=I;var M=class extends h{constructor(K,P){super(K,{cause:P?.cause}),P&&typeof P.beforeHandshake=="boolean"&&(this[L]=P.beforeHandshake)}get name(){return"MongoNetworkError"}};e.MongoNetworkError=M;var S=class extends M{constructor(K,P){super(K,P)}get name(){return"MongoNetworkTimeoutError"}};e.MongoNetworkTimeoutError=S;var v=class extends l{constructor(K){super(K)}get name(){return"MongoParseError"}};e.MongoParseError=v;var w=class extends i{constructor(K){super(K)}get name(){return"MongoInvalidArgumentError"}};e.MongoInvalidArgumentError=w;var k=class extends i{constructor(K){super(K)}get name(){return"MongoCompatibilityError"}};e.MongoCompatibilityError=k;var $=class extends i{constructor(K){super(K)}get name(){return"MongoMissingCredentialsError"}};e.MongoMissingCredentialsError=$;var X=class extends i{constructor(K,P){super(K,P),this.dependencyName=P.dependencyName}get name(){return"MongoMissingDependencyError"}};e.MongoMissingDependencyError=X;var de=class extends h{constructor(K,P){P&&P.error?super(h.buildErrorMessage(P.error.message||P.error),{cause:P.error}):super(K),P&&(this.reason=P),this.code=P.error?.code}get name(){return"MongoSystemError"}};e.MongoSystemError=de;var Y=class extends de{constructor(K,P){super(K,P)}get name(){return"MongoServerSelectionError"}};e.MongoServerSelectionError=Y;var se=class extends a{constructor(K){super({...K,...K.writeConcernError}),this.errInfo=K.writeConcernError.errInfo,this.result=K}get name(){return"MongoWriteConcernError"}};e.MongoWriteConcernError=se;var x=new Set([e.MONGODB_ERROR_CODES.HostUnreachable,e.MONGODB_ERROR_CODES.HostNotFound,e.MONGODB_ERROR_CODES.NetworkTimeout,e.MONGODB_ERROR_CODES.ShutdownInProgress,e.MONGODB_ERROR_CODES.PrimarySteppedDown,e.MONGODB_ERROR_CODES.SocketException,e.MONGODB_ERROR_CODES.NotWritablePrimary,e.MONGODB_ERROR_CODES.InterruptedAtShutdown,e.MONGODB_ERROR_CODES.InterruptedDueToReplStateChange,e.MONGODB_ERROR_CODES.NotPrimaryNoSecondaryOk,e.MONGODB_ERROR_CODES.NotPrimaryOrSecondary,e.MONGODB_ERROR_CODES.ExceededTimeLimit,e.MONGODB_ERROR_CODES.ReadConcernMajorityNotAvailableYet]),G=x;function Q(K,P){return K instanceof M?!0:K instanceof h&&(P>=9||oe(K))&&!K.hasErrorLabel(e.MongoErrorLabel.HandshakeError)?!1:K instanceof se?G.has(K.result?.code??K.code??0):K instanceof h&&typeof K.code=="number"?G.has(K.code):!!(e.LEGACY_NOT_WRITABLE_PRIMARY_ERROR_MESSAGE.test(K.message)||e.NODE_IS_RECOVERING_ERROR_MESSAGE.test(K.message))}e.needsRetryableWriteLabel=Q;function oe(K){return K.hasErrorLabel(e.MongoErrorLabel.RetryableWriteError)||K.hasErrorLabel(e.MongoErrorLabel.PoolRequstedRetry)}e.isRetryableWriteError=oe;function Ee(K){return!!(typeof K.code=="number"&&x.has(K.code)||K instanceof M||e.LEGACY_NOT_WRITABLE_PRIMARY_ERROR_MESSAGE.test(K.message)||e.NODE_IS_RECOVERING_ERROR_MESSAGE.test(K.message))}e.isRetryableReadError=Ee;var De=new Set([e.MONGODB_ERROR_CODES.ShutdownInProgress,e.MONGODB_ERROR_CODES.PrimarySteppedDown,e.MONGODB_ERROR_CODES.InterruptedAtShutdown,e.MONGODB_ERROR_CODES.InterruptedDueToReplStateChange,e.MONGODB_ERROR_CODES.NotPrimaryOrSecondary]),Je=new Set([e.MONGODB_ERROR_CODES.NotWritablePrimary,e.MONGODB_ERROR_CODES.NotPrimaryNoSecondaryOk,e.MONGODB_ERROR_CODES.LegacyNotPrimary]),ze=new Set([e.MONGODB_ERROR_CODES.InterruptedAtShutdown,e.MONGODB_ERROR_CODES.ShutdownInProgress]);function Ce(K){return typeof K.code=="number"?De.has(K.code):e.LEGACY_NOT_PRIMARY_OR_SECONDARY_ERROR_MESSAGE.test(K.message)||e.NODE_IS_RECOVERING_ERROR_MESSAGE.test(K.message)}function Me(K){return typeof K.code=="number"?Je.has(K.code):Ce(K)?!1:e.LEGACY_NOT_WRITABLE_PRIMARY_ERROR_MESSAGE.test(K.message)}function qe(K){return!!(typeof K.code=="number"&&ze.has(K.code))}e.isNodeShuttingDownError=qe;function Ge(K){return K instanceof v||K==null?!0:Ce(K)||Me(K)}e.isSDAMUnrecoverableError=Ge;function ct(K){return!!(K instanceof M&&K.message.match(/timed out/))}e.isNetworkTimeoutError=ct;function St(K,P){return K==null||!(K instanceof h)?!1:K instanceof M?!0:P!=null&&P>=9?K.code===e.MONGODB_ERROR_CODES.CursorNotFound?!0:K.hasErrorLabel(e.MongoErrorLabel.ResumableChangeStreamError):typeof K.code=="number"?e.GET_MORE_RESUMABLE_CODES.has(K.code):!1}e.isResumableError=St}),rt=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReadPreference=e.ReadPreferenceMode=void 0;var u=pe();e.ReadPreferenceMode=Object.freeze({primary:"primary",primaryPreferred:"primaryPreferred",secondary:"secondary",secondaryPreferred:"secondaryPreferred",nearest:"nearest"});var d=class Ye{constructor(a,l,i){if(!Ye.isValid(a))throw new u.MongoInvalidArgumentError(`Invalid read preference mode ${JSON.stringify(a)}`);if(i==null&&typeof l=="object"&&!Array.isArray(l))i=l,l=void 0;else if(l&&!Array.isArray(l))throw new u.MongoInvalidArgumentError("ReadPreference tags must be an array");if(this.mode=a,this.tags=l,this.hedge=i?.hedge,this.maxStalenessSeconds=void 0,this.minWireVersion=void 0,i=i??{},i.maxStalenessSeconds!=null){if(i.maxStalenessSeconds<=0)throw new u.MongoInvalidArgumentError("maxStalenessSeconds must be a positive integer");this.maxStalenessSeconds=i.maxStalenessSeconds,this.minWireVersion=5}if(this.mode===Ye.PRIMARY){if(this.tags&&Array.isArray(this.tags)&&this.tags.length>0)throw new u.MongoInvalidArgumentError("Primary read preference cannot be combined with tags");if(this.maxStalenessSeconds)throw new u.MongoInvalidArgumentError("Primary read preference cannot be combined with maxStalenessSeconds");if(this.hedge)throw new u.MongoInvalidArgumentError("Primary read preference cannot be combined with hedge")}}get preference(){return this.mode}static fromString(a){return new Ye(a)}static fromOptions(a){if(!a)return;let l=a.readPreference??a.session?.transaction.options.readPreference,i=a.readPreferenceTags;if(l!=null){if(typeof l=="string")return new Ye(l,i,{maxStalenessSeconds:a.maxStalenessSeconds,hedge:a.hedge});if(!(l instanceof Ye)&&typeof l=="object"){let p=l.mode||l.preference;if(p&&typeof p=="string")return new Ye(p,l.tags??i,{maxStalenessSeconds:l.maxStalenessSeconds,hedge:a.hedge})}return i&&(l.tags=i),l}}static translate(a){if(a.readPreference==null)return a;let l=a.readPreference;if(typeof l=="string")a.readPreference=new Ye(l);else if(l&&!(l instanceof Ye)&&typeof l=="object"){let i=l.mode||l.preference;i&&typeof i=="string"&&(a.readPreference=new Ye(i,l.tags,{maxStalenessSeconds:l.maxStalenessSeconds}))}else if(!(l instanceof Ye))throw new u.MongoInvalidArgumentError(`Invalid read preference: ${l}`);return a}static isValid(a){return new Set([Ye.PRIMARY,Ye.PRIMARY_PREFERRED,Ye.SECONDARY,Ye.SECONDARY_PREFERRED,Ye.NEAREST,null]).has(a)}isValid(a){return Ye.isValid(typeof a=="string"?a:this.mode)}secondaryOk(){return new Set([Ye.PRIMARY_PREFERRED,Ye.SECONDARY,Ye.SECONDARY_PREFERRED,Ye.NEAREST]).has(this.mode)}equals(a){return a.mode===this.mode}toJSON(){let a={mode:this.mode};return Array.isArray(this.tags)&&(a.tags=this.tags),this.maxStalenessSeconds&&(a.maxStalenessSeconds=this.maxStalenessSeconds),this.hedge&&(a.hedge=this.hedge),a}};d.PRIMARY=e.ReadPreferenceMode.primary,d.PRIMARY_PREFERRED=e.ReadPreferenceMode.primaryPreferred,d.SECONDARY=e.ReadPreferenceMode.secondary,d.SECONDARY_PREFERRED=e.ReadPreferenceMode.secondaryPreferred,d.NEAREST=e.ReadPreferenceMode.nearest,d.primary=new d(e.ReadPreferenceMode.primary),d.primaryPreferred=new d(e.ReadPreferenceMode.primaryPreferred),d.secondary=new d(e.ReadPreferenceMode.secondary),d.secondaryPreferred=new d(e.ReadPreferenceMode.secondaryPreferred),d.nearest=new d(e.ReadPreferenceMode.nearest),e.ReadPreference=d}),pt=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e._advanceClusterTime=e.drainTimerQueue=e.ServerType=e.TopologyType=e.STATE_CONNECTED=e.STATE_CONNECTING=e.STATE_CLOSED=e.STATE_CLOSING=void 0;var u=ve("timers");e.STATE_CLOSING="closing",e.STATE_CLOSED="closed",e.STATE_CONNECTING="connecting",e.STATE_CONNECTED="connected",e.TopologyType=Object.freeze({Single:"Single",ReplicaSetNoPrimary:"ReplicaSetNoPrimary",ReplicaSetWithPrimary:"ReplicaSetWithPrimary",Sharded:"Sharded",Unknown:"Unknown",LoadBalanced:"LoadBalanced"}),e.ServerType=Object.freeze({Standalone:"Standalone",Mongos:"Mongos",PossiblePrimary:"PossiblePrimary",RSPrimary:"RSPrimary",RSSecondary:"RSSecondary",RSArbiter:"RSArbiter",RSOther:"RSOther",RSGhost:"RSGhost",Unknown:"Unknown",LoadBalancer:"LoadBalancer"});function d(a){a.forEach(u.clearTimeout),a.clear()}e.drainTimerQueue=d;function h(a,l){(a.clusterTime==null||l.clusterTime.greaterThan(a.clusterTime.clusterTime))&&(a.clusterTime=l)}e._advanceClusterTime=h}),Wr=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.readPreferenceServerSelector=e.secondaryWritableServerSelector=e.sameServerSelector=e.writableServerSelector=e.MIN_SECONDARY_WRITE_WIRE_VERSION=void 0;var u=pe(),d=rt(),h=pt(),a=1e4,l=90;e.MIN_SECONDARY_WRITE_WIRE_VERSION=13;function i(){return function(y,g){return E(y,g.filter(T=>T.isWritable))}}e.writableServerSelector=i;function p(y){return function(g,T){return y?T.filter(D=>D.address===y.address&&D.type!==h.ServerType.Unknown):[]}}e.sameServerSelector=p;function A(y,g){return!g||!y||y&&y<e.MIN_SECONDARY_WRITE_WIRE_VERSION?F(d.ReadPreference.primary):F(g)}e.secondaryWritableServerSelector=A;function o(y,g,T){if(y.maxStalenessSeconds==null||y.maxStalenessSeconds<0)return T;let D=y.maxStalenessSeconds,N=(g.heartbeatFrequencyMS+a)/1e3;if(D<N)throw new u.MongoInvalidArgumentError(`Option "maxStalenessSeconds" must be at least ${N} seconds`);if(D<l)throw new u.MongoInvalidArgumentError(`Option "maxStalenessSeconds" must be at least ${l} seconds`);if(g.type===h.TopologyType.ReplicaSetWithPrimary){let _=Array.from(g.servers.values()).filter(m)[0];return T.reduce((R,j)=>{let L=(j.lastUpdateTime-j.lastWriteDate-(_.lastUpdateTime-_.lastWriteDate)+g.heartbeatFrequencyMS)/1e3,I=y.maxStalenessSeconds??0;return L<=I&&R.push(j),R},[])}if(g.type===h.TopologyType.ReplicaSetNoPrimary){if(T.length===0)return T;let _=T.reduce((R,j)=>j.lastWriteDate>R.lastWriteDate?j:R);return T.reduce((R,j)=>{let L=(_.lastWriteDate-j.lastWriteDate+g.heartbeatFrequencyMS)/1e3,I=y.maxStalenessSeconds??0;return L<=I&&R.push(j),R},[])}return T}function n(y,g){let T=Object.keys(y),D=Object.keys(g);for(let N=0;N<T.length;++N){let _=T[N];if(D.indexOf(_)===-1||g[_]!==y[_])return!1}return!0}function r(y,g){if(y.tags==null||Array.isArray(y.tags)&&y.tags.length===0)return g;for(let T=0;T<y.tags.length;++T){let D=y.tags[T],N=g.reduce((_,R)=>(n(D,R.tags)&&_.push(R),_),[]);if(N.length)return N}return[]}function E(y,g){let T=g.reduce((N,_)=>Math.min(_.roundTripTime,N),1/0),D=T+y.localThresholdMS;return g.reduce((N,_)=>(_.roundTripTime<=D&&_.roundTripTime>=T&&N.push(_),N),[])}function m(y){return y.type===h.ServerType.RSPrimary}function c(y){return y.type===h.ServerType.RSSecondary}function b(y){return y.type===h.ServerType.RSSecondary||y.type===h.ServerType.RSPrimary}function f(y){return y.type!==h.ServerType.Unknown}function O(y){return y.type===h.ServerType.LoadBalancer}function F(y){if(!y.isValid())throw new u.MongoInvalidArgumentError("Invalid read preference specified");return function(g,T,D=[]){let N=g.commonWireVersion;if(N&&y.minWireVersion&&y.minWireVersion>N)throw new u.MongoCompatibilityError(`Minimum wire version '${y.minWireVersion}' required, but found '${N}'`);if(g.type===h.TopologyType.LoadBalanced)return T.filter(O);if(g.type===h.TopologyType.Unknown)return[];if(g.type===h.TopologyType.Single)return E(g,T.filter(f));if(g.type===h.TopologyType.Sharded){let L=T.filter(M=>!D.includes(M)),I=L.length>0?L:D;return E(g,I.filter(f))}let _=y.mode;if(_===d.ReadPreference.PRIMARY)return T.filter(m);if(_===d.ReadPreference.PRIMARY_PREFERRED){let L=T.filter(m);if(L.length)return L}let R=_===d.ReadPreference.NEAREST?b:c,j=E(g,r(y,o(y,g,T.filter(R))));return _===d.ReadPreference.SECONDARY_PREFERRED&&j.length===0?T.filter(m):j}}e.readPreferenceServerSelector=F}),Zt=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OP_MSG=e.OP_COMPRESSED=e.OP_DELETE=e.OP_QUERY=e.OP_INSERT=e.OP_UPDATE=e.OP_REPLY=e.MIN_SUPPORTED_QE_SERVER_VERSION=e.MIN_SUPPORTED_QE_WIRE_VERSION=e.MAX_SUPPORTED_WIRE_VERSION=e.MIN_SUPPORTED_WIRE_VERSION=e.MAX_SUPPORTED_SERVER_VERSION=e.MIN_SUPPORTED_SERVER_VERSION=void 0,e.MIN_SUPPORTED_SERVER_VERSION="3.6",e.MAX_SUPPORTED_SERVER_VERSION="7.0",e.MIN_SUPPORTED_WIRE_VERSION=6,e.MAX_SUPPORTED_WIRE_VERSION=21,e.MIN_SUPPORTED_QE_WIRE_VERSION=21,e.MIN_SUPPORTED_QE_SERVER_VERSION="7.0",e.OP_REPLY=1,e.OP_UPDATE=2001,e.OP_INSERT=2002,e.OP_QUERY=2004,e.OP_DELETE=2006,e.OP_COMPRESSED=2012,e.OP_MSG=2013}),Xe=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.END=e.CHANGE=e.INIT=e.MORE=e.RESPONSE=e.SERVER_HEARTBEAT_FAILED=e.SERVER_HEARTBEAT_SUCCEEDED=e.SERVER_HEARTBEAT_STARTED=e.COMMAND_FAILED=e.COMMAND_SUCCEEDED=e.COMMAND_STARTED=e.CLUSTER_TIME_RECEIVED=e.CONNECTION_CHECKED_IN=e.CONNECTION_CHECKED_OUT=e.CONNECTION_CHECK_OUT_FAILED=e.CONNECTION_CHECK_OUT_STARTED=e.CONNECTION_CLOSED=e.CONNECTION_READY=e.CONNECTION_CREATED=e.CONNECTION_POOL_READY=e.CONNECTION_POOL_CLEARED=e.CONNECTION_POOL_CLOSED=e.CONNECTION_POOL_CREATED=e.WAITING_FOR_SUITABLE_SERVER=e.SERVER_SELECTION_SUCCEEDED=e.SERVER_SELECTION_FAILED=e.SERVER_SELECTION_STARTED=e.TOPOLOGY_DESCRIPTION_CHANGED=e.TOPOLOGY_CLOSED=e.TOPOLOGY_OPENING=e.SERVER_DESCRIPTION_CHANGED=e.SERVER_CLOSED=e.SERVER_OPENING=e.DESCRIPTION_RECEIVED=e.UNPINNED=e.PINNED=e.MESSAGE=e.ENDED=e.CLOSED=e.CONNECT=e.OPEN=e.CLOSE=e.TIMEOUT=e.ERROR=e.SYSTEM_JS_COLLECTION=e.SYSTEM_COMMAND_COLLECTION=e.SYSTEM_USER_COLLECTION=e.SYSTEM_PROFILE_COLLECTION=e.SYSTEM_INDEX_COLLECTION=e.SYSTEM_NAMESPACE_COLLECTION=void 0,e.kDecoratedKeys=e.kDecorateResult=e.LEGACY_HELLO_COMMAND_CAMEL_CASE=e.LEGACY_HELLO_COMMAND=e.MONGO_CLIENT_EVENTS=e.LOCAL_SERVER_EVENTS=e.SERVER_RELAY_EVENTS=e.APM_EVENTS=e.TOPOLOGY_EVENTS=e.CMAP_EVENTS=e.HEARTBEAT_EVENTS=e.RESUME_TOKEN_CHANGED=void 0,e.SYSTEM_NAMESPACE_COLLECTION="system.namespaces",e.SYSTEM_INDEX_COLLECTION="system.indexes",e.SYSTEM_PROFILE_COLLECTION="system.profile",e.SYSTEM_USER_COLLECTION="system.users",e.SYSTEM_COMMAND_COLLECTION="$cmd",e.SYSTEM_JS_COLLECTION="system.js",e.ERROR="error",e.TIMEOUT="timeout",e.CLOSE="close",e.OPEN="open",e.CONNECT="connect",e.CLOSED="closed",e.ENDED="ended",e.MESSAGE="message",e.PINNED="pinned",e.UNPINNED="unpinned",e.DESCRIPTION_RECEIVED="descriptionReceived",e.SERVER_OPENING="serverOpening",e.SERVER_CLOSED="serverClosed",e.SERVER_DESCRIPTION_CHANGED="serverDescriptionChanged",e.TOPOLOGY_OPENING="topologyOpening",e.TOPOLOGY_CLOSED="topologyClosed",e.TOPOLOGY_DESCRIPTION_CHANGED="topologyDescriptionChanged",e.SERVER_SELECTION_STARTED="serverSelectionStarted",e.SERVER_SELECTION_FAILED="serverSelectionFailed",e.SERVER_SELECTION_SUCCEEDED="serverSelectionSucceeded",e.WAITING_FOR_SUITABLE_SERVER="waitingForSuitableServer",e.CONNECTION_POOL_CREATED="connectionPoolCreated",e.CONNECTION_POOL_CLOSED="connectionPoolClosed",e.CONNECTION_POOL_CLEARED="connectionPoolCleared",e.CONNECTION_POOL_READY="connectionPoolReady",e.CONNECTION_CREATED="connectionCreated",e.CONNECTION_READY="connectionReady",e.CONNECTION_CLOSED="connectionClosed",e.CONNECTION_CHECK_OUT_STARTED="connectionCheckOutStarted",e.CONNECTION_CHECK_OUT_FAILED="connectionCheckOutFailed",e.CONNECTION_CHECKED_OUT="connectionCheckedOut",e.CONNECTION_CHECKED_IN="connectionCheckedIn",e.CLUSTER_TIME_RECEIVED="clusterTimeReceived",e.COMMAND_STARTED="commandStarted",e.COMMAND_SUCCEEDED="commandSucceeded",e.COMMAND_FAILED="commandFailed",e.SERVER_HEARTBEAT_STARTED="serverHeartbeatStarted",e.SERVER_HEARTBEAT_SUCCEEDED="serverHeartbeatSucceeded",e.SERVER_HEARTBEAT_FAILED="serverHeartbeatFailed",e.RESPONSE="response",e.MORE="more",e.INIT="init",e.CHANGE="change",e.END="end",e.RESUME_TOKEN_CHANGED="resumeTokenChanged",e.HEARTBEAT_EVENTS=Object.freeze([e.SERVER_HEARTBEAT_STARTED,e.SERVER_HEARTBEAT_SUCCEEDED,e.SERVER_HEARTBEAT_FAILED]),e.CMAP_EVENTS=Object.freeze([e.CONNECTION_POOL_CREATED,e.CONNECTION_POOL_READY,e.CONNECTION_POOL_CLEARED,e.CONNECTION_POOL_CLOSED,e.CONNECTION_CREATED,e.CONNECTION_READY,e.CONNECTION_CLOSED,e.CONNECTION_CHECK_OUT_STARTED,e.CONNECTION_CHECK_OUT_FAILED,e.CONNECTION_CHECKED_OUT,e.CONNECTION_CHECKED_IN]),e.TOPOLOGY_EVENTS=Object.freeze([e.SERVER_OPENING,e.SERVER_CLOSED,e.SERVER_DESCRIPTION_CHANGED,e.TOPOLOGY_OPENING,e.TOPOLOGY_CLOSED,e.TOPOLOGY_DESCRIPTION_CHANGED,e.ERROR,e.TIMEOUT,e.CLOSE]),e.APM_EVENTS=Object.freeze([e.COMMAND_STARTED,e.COMMAND_SUCCEEDED,e.COMMAND_FAILED]),e.SERVER_RELAY_EVENTS=Object.freeze([e.SERVER_HEARTBEAT_STARTED,e.SERVER_HEARTBEAT_SUCCEEDED,e.SERVER_HEARTBEAT_FAILED,e.COMMAND_STARTED,e.COMMAND_SUCCEEDED,e.COMMAND_FAILED,...e.CMAP_EVENTS]),e.LOCAL_SERVER_EVENTS=Object.freeze([e.CONNECT,e.DESCRIPTION_RECEIVED,e.CLOSED,e.ENDED]),e.MONGO_CLIENT_EVENTS=Object.freeze([...e.CMAP_EVENTS,...e.APM_EVENTS,...e.TOPOLOGY_EVENTS,...e.HEARTBEAT_EVENTS]),e.LEGACY_HELLO_COMMAND="ismaster",e.LEGACY_HELLO_COMMAND_CAMEL_CASE="isMaster",e.kDecorateResult=Symbol.for("@@mdb.decorateDecryptionResult"),e.kDecoratedKeys=Symbol.for("@@mdb.decryptedKeys")}),yt=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReadConcern=e.ReadConcernLevel=void 0,e.ReadConcernLevel=Object.freeze({local:"local",majority:"majority",linearizable:"linearizable",available:"available",snapshot:"snapshot"});var u=class cr{constructor(h){this.level=e.ReadConcernLevel[h]??h}static fromOptions(h){if(h!=null){if(h.readConcern){let{readConcern:a}=h;if(a instanceof cr)return a;if(typeof a=="string")return new cr(a);if("level"in a&&a.level)return new cr(a.level)}if(h.level)return new cr(h.level)}}static get MAJORITY(){return e.ReadConcernLevel.majority}static get AVAILABLE(){return e.ReadConcernLevel.available}static get LINEARIZABLE(){return e.ReadConcernLevel.linearizable}static get SNAPSHOT(){return e.ReadConcernLevel.snapshot}toJSON(){return{level:this.level}}};e.ReadConcern=u}),Zo=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OnDemandDocument=void 0;var u=Ue(),d=class Iu{constructor(a,l=0,i=!1,p){this.bson=a,this.offset=l,this.isArray=i,this.cache=Object.create(null),this.indexFound=Object.create(null),this.elements=p??(0,u.parseToElementsToArray)(this.bson,l)}isElementName(a,l){let i=l[2],p=l[1];if(a.length!==i)return!1;let A=p+i;for(let o=p,n=0;n<a.length&&o<A;n++,o++)if(this.bson[o]!==a.charCodeAt(n))return!1;return!0}getElement(a){let l=this.cache[a];if(l===!1)return null;if(l!=null)return l;if(typeof a=="number")if(this.isArray)if(a<this.elements.length){let i={element:this.elements[a],value:void 0};return this.cache[a]=i,this.indexFound[a]=!0,i}else return null;else return null;for(let i=0;i<this.elements.length;i++){let p=this.elements[i];if(!(i in this.indexFound)&&this.isElementName(a,p)){let A={element:p,value:void 0};return this.cache[a]=A,this.indexFound[i]=!0,A}}return this.cache[a]=!1,null}toJSValue(a,l){let i=a[0],p=a[3],A=a[4];if(l!==i)return null;switch(l){case u.BSONType.null:case u.BSONType.undefined:return null;case u.BSONType.double:return(0,u.getFloat64LE)(this.bson,p);case u.BSONType.int:return(0,u.getInt32LE)(this.bson,p);case u.BSONType.long:return(0,u.getBigInt64LE)(this.bson,p);case u.BSONType.bool:return!!this.bson[p];case u.BSONType.objectId:return new u.ObjectId(this.bson.subarray(p,p+12));case u.BSONType.timestamp:return new u.Timestamp((0,u.getBigInt64LE)(this.bson,p));case u.BSONType.string:return(0,u.toUTF8)(this.bson,p+4,p+A-1,!1);case u.BSONType.binData:{let o=(0,u.getInt32LE)(this.bson,p),n=this.bson[p+4];if(n===2){let r=(0,u.getInt32LE)(this.bson,p+1+4);if(r<0)throw new u.BSONError("Negative binary type element size found for subtype 0x02");if(r>o-4)throw new u.BSONError("Binary type with subtype 0x02 contains too long binary size");if(r<o-4)throw new u.BSONError("Binary type with subtype 0x02 contains too short binary size");return new u.Binary(this.bson.subarray(p+1+4+4,p+1+4+4+r),2)}return new u.Binary(this.bson.subarray(p+1+4,p+1+4+o),n)}case u.BSONType.date:return new Date(Number((0,u.getBigInt64LE)(this.bson,p)));case u.BSONType.object:return new Iu(this.bson,p);case u.BSONType.array:return new Iu(this.bson,p,!0);default:throw new u.BSONError(`Unsupported BSON type: ${l}`)}}size(){return this.elements.length}has(a){let l=this.cache[a];return l===!1?!1:l!=null?!0:this.getElement(a)!=null}get(a,l,i){let p=this.getElement(a);if(p==null){if(i===!0)throw new u.BSONError(`BSON element "${a}" is missing`);return null}if(p.value==null){let A=this.toJSValue(p.element,l);if(A==null){if(i===!0)throw new u.BSONError(`BSON element "${a}" is missing`);return null}p.value=A}return p.value}getNumber(a,l){let i=this.get(a,u.BSONType.bool),p=i==null?null:i?1:0,A=this.get(a,u.BSONType.long),o=A==null?null:Number(A),n=p??o??this.get(a,u.BSONType.int)??this.get(a,u.BSONType.double);if(l===!0&&n==null)throw new u.BSONError(`BSON element "${a}" is missing`);return n}toObject(a){return u.BSON.deserialize(this.bson,{...a,index:this.offset,allowObjectSmallerThanBufferSize:!0})}toBytes(){let a=(0,u.getInt32LE)(this.bson,this.offset);return this.bson.subarray(this.offset,this.offset+a)}};e.OnDemandDocument=d}),Tt=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExplainedCursorResponse=e.CursorResponse=e.MongoDBResponse=e.isErrorResponse=void 0;var u=Ue(),d=pe(),h=ye(),a=Zo();function l(o,n){for(let r=0;r<n.length;r++){let E=n[r];if(E[2]===2){let m=E[1];if(o[m]===111&&o[m+1]===107){let c=E[3],b=E[4];for(let f=c;f<c+b;f++)if(o[f]!==0)return!1;return!0}}}return!0}e.isErrorResponse=l;var i=class _u extends a.OnDemandDocument{get(n,r,E){try{return super.get(n,r,E)}catch(m){throw new d.MongoUnexpectedServerResponseError(m.message,{cause:m})}}static is(n){return n instanceof _u}static make(n){let r=(0,u.parseToElementsToArray)(n,0);return l(n,r)?new _u(n,0,!1,r):new this(n,0,!1,r)}get recoveryToken(){return this.get("recoveryToken",u.BSONType.object)?.toObject({promoteValues:!1,promoteLongs:!1,promoteBuffers:!1})??null}get atClusterTime(){return this.get("cursor",u.BSONType.object)?.get("atClusterTime",u.BSONType.timestamp)??this.get("atClusterTime",u.BSONType.timestamp)}get operationTime(){return this.get("operationTime",u.BSONType.timestamp)}get ok(){return this.getNumber("ok")?1:0}get $err(){return this.get("$err",u.BSONType.string)}get errmsg(){return this.get("errmsg",u.BSONType.string)}get code(){return this.getNumber("code")}get $clusterTime(){if(!("clusterTime"in this)){let n=this.get("$clusterTime",u.BSONType.object);if(n==null)return this.clusterTime=null,null;let r=n.get("clusterTime",u.BSONType.timestamp,!0),E=n.get("signature",u.BSONType.object)?.toObject();this.clusterTime={clusterTime:r,signature:E}}return this.clusterTime??null}toObject(n){let r={...(0,u.pluckBSONSerializeOptions)(n??{}),validation:this.parseBsonSerializationOptions(n)};return super.toObject(r)}parseBsonSerializationOptions(n){return n?.enableUtf8Validation===!1?{utf8:!1}:{utf8:{writeErrors:!1}}}};i.empty=new i(new Uint8Array([13,0,0,0,16,111,107,0,1,0,0,0,0])),e.MongoDBResponse=i;var p=class Pu extends i{constructor(){super(...arguments),this._batch=null,this.iterated=0,this._encryptedBatch=null}static is(n){return n instanceof Pu||n===Pu.emptyGetMore}get cursor(){return this.get("cursor",u.BSONType.object,!0)}get id(){try{return u.Long.fromBigInt(this.cursor.get("id",u.BSONType.long,!0))}catch(n){throw new d.MongoUnexpectedServerResponseError(n.message,{cause:n})}}get ns(){let n=this.cursor.get("ns",u.BSONType.string);return n!=null?(0,h.ns)(n):null}get length(){return Math.max(this.batchSize-this.iterated,0)}get encryptedBatch(){if(this.encryptedResponse==null)return null;if(this._encryptedBatch!=null)return this._encryptedBatch;let n=this.encryptedResponse?.get("cursor",u.BSONType.object);if(n?.has("firstBatch"))this._encryptedBatch=n.get("firstBatch",u.BSONType.array,!0);else if(n?.has("nextBatch"))this._encryptedBatch=n.get("nextBatch",u.BSONType.array,!0);else throw new d.MongoUnexpectedServerResponseError("Cursor document did not contain a batch");return this._encryptedBatch}get batch(){if(this._batch!=null)return this._batch;let n=this.cursor;if(n.has("firstBatch"))this._batch=n.get("firstBatch",u.BSONType.array,!0);else if(n.has("nextBatch"))this._batch=n.get("nextBatch",u.BSONType.array,!0);else throw new d.MongoUnexpectedServerResponseError("Cursor document did not contain a batch");return this._batch}get batchSize(){return this.batch?.size()}get postBatchResumeToken(){return this.cursor.get("postBatchResumeToken",u.BSONType.object)?.toObject({promoteValues:!1,promoteLongs:!1,promoteBuffers:!1})??null}shift(n){if(this.iterated>=this.batchSize)return null;let r=this.batch.get(this.iterated,u.BSONType.object,!0)??null,E=this.encryptedBatch?.get(this.iterated,u.BSONType.object,!0)??null;if(this.iterated+=1,n?.raw)return r.toBytes();{let m=r.toObject(n);return E&&(0,h.decorateDecryptionResult)(m,E.toObject(n),!0),m}}clear(){this.iterated=this.batchSize}};p.emptyGetMore={id:new u.Long(0),length:0,shift:()=>null},e.CursorResponse=p;var A=class extends p{constructor(){super(...arguments),this.isExplain=!0,this._length=1}get id(){return u.Long.fromBigInt(0n)}get batchSize(){return 0}get ns(){return null}get length(){return this._length}shift(o){return this._length===0?null:(this._length-=1,this.toObject(o))}};e.ExplainedCursorResponse=A}),at=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.throwIfWriteConcernError=e.WriteConcern=e.WRITE_CONCERN_KEYS=void 0;var u=Tt(),d=pe();e.WRITE_CONCERN_KEYS=["w","wtimeout","j","journal","fsync"];var h=class Nr{constructor(i,p,A,o){i!=null&&(Number.isNaN(Number(i))?this.w=i:this.w=Number(i)),p!=null&&(this.wtimeoutMS=this.wtimeout=p),A!=null&&(this.journal=this.j=A),o!=null&&(this.journal=this.j=!!o)}static apply(i,p){let A={};return p.w!=null&&(A.w=p.w),p.wtimeoutMS!=null&&(A.wtimeout=p.wtimeoutMS),p.journal!=null&&(A.j=p.j),i.writeConcern=A,i}static fromOptions(i,p){if(i==null)return;p=p??{};let A;typeof i=="string"||typeof i=="number"?A={w:i}:i instanceof Nr?A=i:A=i.writeConcern;let o=p instanceof Nr?p:p.writeConcern,{w:n=void 0,wtimeout:r=void 0,j:E=void 0,fsync:m=void 0,journal:c=void 0,wtimeoutMS:b=void 0}={...o,...A};if(n!=null||r!=null||b!=null||E!=null||c!=null||m!=null)return new Nr(n,r??b,E??c,m)}};e.WriteConcern=h;function a(l){if(typeof l=="object"&&l!=null){let i=u.MongoDBResponse.is(l)&&l.has("writeConcernError")?l.toObject():!u.MongoDBResponse.is(l)&&"writeConcernError"in l?l:null;if(i!=null)throw new d.MongoWriteConcernError(i)}}e.throwIfWriteConcernError=a}),ye=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.COSMOS_DB_CHECK=e.DOCUMENT_DB_CHECK=e.request=e.get=e.matchesParentDomain=e.parseUnsignedInteger=e.parseInteger=e.compareObjectId=e.commandSupportsReadConcern=e.shuffle=e.supportsRetryableWrites=e.enumToString=e.emitWarningOnce=e.emitWarning=e.MONGODB_WARNING_CODE=e.DEFAULT_PK_FACTORY=e.HostAddress=e.BufferPool=e.List=e.deepCopy=e.isRecord=e.setDifference=e.isHello=e.isSuperset=e.resolveOptions=e.hasAtomicOperators=e.calculateDurationInMs=e.now=e.makeStateMachine=e.errorStrictEqual=e.arrayStrictEqual=e.maxWireVersion=e.uuidV4=e.makeCounter=e.MongoDBCollectionNamespace=e.MongoDBNamespace=e.ns=e.getTopology=e.decorateWithExplain=e.decorateWithReadConcern=e.decorateWithCollation=e.isPromiseLike=e.applyRetryableWrites=e.filterOptions=e.mergeOptions=e.isObject=e.normalizeHintField=e.hostMatchesWildcards=e.isUint8Array=e.ByteUtils=void 0,e.decorateDecryptionResult=e.noop=e.fileIsAccessible=e.maybeAddIdToDocuments=e.once=e.randomBytes=e.squashError=e.promiseWithResolvers=e.isHostMatch=e.COSMOS_DB_MSG=e.DOCUMENT_DB_MSG=void 0;var u=ve("crypto"),d=ve("fs"),h=ve("http"),a=ve("timers"),l=ve("url"),i=ve("url"),p=ve("util"),A=Ue(),o=Zt(),n=Xe(),r=pe(),E=yt(),m=rt(),c=pt(),b=at();e.ByteUtils={toLocalBufferType(W){return Buffer.isBuffer(W)?W:Buffer.from(W.buffer,W.byteOffset,W.byteLength)},equals(W,H){return e.ByteUtils.toLocalBufferType(W).equals(H)},compare(W,H){return e.ByteUtils.toLocalBufferType(W).compare(H)},toBase64(W){return e.ByteUtils.toLocalBufferType(W).toString("base64")}};function f(W){return W!=null&&typeof W=="object"&&Symbol.toStringTag in W&&W[Symbol.toStringTag]==="Uint8Array"}e.isUint8Array=f;function O(W,H){for(let re of H)if(W===re||re.startsWith("*.")&&W?.endsWith(re.substring(2,re.length))||re.startsWith("*/")&&W?.endsWith(re.substring(2,re.length)))return!0;return!1}e.hostMatchesWildcards=O;function F(W){let H;if(typeof W=="string")H=W;else if(Array.isArray(W))H={},W.forEach(re=>{H[re]=1});else if(W!=null&&typeof W=="object"){H={};for(let re in W)H[re]=W[re]}return H}e.normalizeHintField=F;var y=W=>Object.prototype.toString.call(W);function g(W){return y(W)==="[object Object]"}e.isObject=g;function T(W,H){return{...W,...H}}e.mergeOptions=T;function D(W,H){let re={};for(let fe in W)H.includes(fe)&&(re[fe]=W[fe]);return re}e.filterOptions=D;function N(W,H){return H&&H.s.options?.retryWrites&&(W.retryWrites=!0),W}e.applyRetryableWrites=N;function _(W){return W!=null&&typeof W=="object"&&"then"in W&&typeof W.then=="function"}e.isPromiseLike=_;function R(W,H,re){let fe=I(H).capabilities;if(re.collation&&typeof re.collation=="object")if(fe&&fe.commandsTakeCollation)W.collation=re.collation;else throw new r.MongoCompatibilityError("Current topology does not support collation")}e.decorateWithCollation=R;function j(W,H,re){if(re&&re.session&&re.session.inTransaction())return;let fe=Object.assign({},W.readConcern||{});H.s.readConcern&&Object.assign(fe,H.s.readConcern),Object.keys(fe).length>0&&Object.assign(W,{readConcern:fe})}e.decorateWithReadConcern=j;function L(W,H){return W.explain?W:{explain:W,verbosity:H.verbosity}}e.decorateWithExplain=L;function I(W){if("topology"in W&&W.topology)return W.topology;if("client"in W&&W.client.topology)return W.client.topology;throw new r.MongoNotConnectedError("MongoClient must be connected to perform this operation")}e.getTopology=I;function M(W){return S.fromString(W)}e.ns=M;var S=class G1{constructor(H,re){this.db=H,this.collection=re,this.collection=re===""?void 0:re}toString(){return this.collection?`${this.db}.${this.collection}`:this.db}withCollection(H){return new v(this.db,H)}static fromString(H){if(typeof H!="string"||H==="")throw new r.MongoRuntimeError(`Cannot parse namespace from "${H}"`);let[re,...fe]=H.split("."),_e=fe.join(".");return new G1(re,_e===""?void 0:_e)}};e.MongoDBNamespace=S;var v=class extends S{constructor(W,H){super(W,H),this.collection=H}static fromString(W){return super.fromString(W)}};e.MongoDBCollectionNamespace=v;function*w(W=0){let H=W;for(;;){let re=H;H+=1,yield re}}e.makeCounter=w;function k(){let W=u.randomBytes(16);return W[6]=W[6]&15|64,W[8]=W[8]&63|128,W}e.uuidV4=k;function $(W){if(W){if(W.loadBalanced||W.serverApi?.version)return o.MAX_SUPPORTED_WIRE_VERSION;if(W.hello)return W.hello.maxWireVersion;if("lastHello"in W&&typeof W.lastHello=="function"){let H=W.lastHello();if(H)return H.maxWireVersion}if(W.description&&"maxWireVersion"in W.description&&W.description.maxWireVersion!=null)return W.description.maxWireVersion}return 0}e.maxWireVersion=$;function X(W,H){return!Array.isArray(W)||!Array.isArray(H)?!1:W.length===H.length&&W.every((re,fe)=>re===H[fe])}e.arrayStrictEqual=X;function de(W,H){return W===H?!0:!W||!H?W===H:!(W==null&&H!=null||W!=null&&H==null||W.constructor.name!==H.constructor.name||W.message!==H.message)}e.errorStrictEqual=de;function Y(W){return function(H,re){let fe=W[H.s.state];if(fe&&fe.indexOf(re)<0)throw new r.MongoRuntimeError(`illegal state transition from [${H.s.state}] => [${re}], allowed: [${fe}]`);H.emit("stateChanged",H.s.state,re),H.s.state=re}}e.makeStateMachine=Y;function se(){let W=process.hrtime();return Math.floor(W[0]*1e3+W[1]/1e6)}e.now=se;function x(W){if(typeof W!="number")return-1;let H=se()-W;return H<0?0:H}e.calculateDurationInMs=x;function G(W){if(Array.isArray(W)){for(let re of W)if(G(re))return!0;return!1}let H=Object.keys(W);return H.length>0&&H[0][0]==="$"}e.hasAtomicOperators=G;function Q(W,H){let re=Object.assign({},H,(0,A.resolveBSONOptions)(H,W));if(!H?.session?.inTransaction()){let _e=E.ReadConcern.fromOptions(H)??W?.readConcern;_e&&(re.readConcern=_e);let We=b.WriteConcern.fromOptions(H)??W?.writeConcern;We&&(re.writeConcern=We)}let fe=m.ReadPreference.fromOptions(H)??W?.readPreference;return fe&&(re.readPreference=fe),re}e.resolveOptions=Q;function oe(W,H){W=Array.isArray(W)?new Set(W):W,H=Array.isArray(H)?new Set(H):H;for(let re of H)if(!W.has(re))return!1;return!0}e.isSuperset=oe;function Ee(W){return!!(W[n.LEGACY_HELLO_COMMAND]||W.hello)}e.isHello=Ee;function De(W,H){let re=new Set(W);for(let fe of H)re.delete(fe);return re}e.setDifference=De;var Je=(W,H)=>Object.prototype.hasOwnProperty.call(W,H);function ze(W,H=void 0){if(!g(W))return!1;let re=W.constructor;if(re&&re.prototype&&(!g(re.prototype)||!Je(re.prototype,"isPrototypeOf")))return!1;if(H){let fe=Object.keys(W);return oe(fe,H)}return!0}e.isRecord=ze;function Ce(W){if(W==null)return W;if(Array.isArray(W))return W.map(re=>Ce(re));if(ze(W)){let re={};for(let fe in W)re[fe]=Ce(W[fe]);return re}let H=W.constructor;if(H)switch(H.name.toLowerCase()){case"date":return new H(Number(W));case"map":return new Map(W);case"set":return new Set(W);case"buffer":return Buffer.from(W)}return W}e.deepCopy=Ce;var Me=class{get length(){return this.count}get[Symbol.toStringTag](){return"List"}constructor(){this.count=0,this.head={next:null,prev:null,value:null},this.head.next=this.head,this.head.prev=this.head}toArray(){return Array.from(this)}toString(){return`head <=> ${this.toArray().join(" <=> ")} <=> head`}*[Symbol.iterator](){for(let W of this.nodes())yield W.value}*nodes(){let W=this.head.next;for(;W!==this.head;){let{next:H}=W;yield W,W=H}}push(W){this.count+=1;let H={next:this.head,prev:this.head.prev,value:W};this.head.prev.next=H,this.head.prev=H}pushMany(W){for(let H of W)this.push(H)}unshift(W){this.count+=1;let H={next:this.head.next,prev:this.head,value:W};this.head.next.prev=H,this.head.next=H}remove(W){if(W===this.head||this.length===0)return null;this.count-=1;let H=W.prev,re=W.next;return H.next=re,re.prev=H,W.value}shift(){return this.remove(this.head.next)}pop(){return this.remove(this.head.prev)}prune(W){for(let H of this.nodes())W(H.value)&&this.remove(H)}clear(){this.count=0,this.head.next=this.head,this.head.prev=this.head}first(){return this.head.next.value}last(){return this.head.prev.value}};e.List=Me;var qe=class{constructor(){this.buffers=new Me,this.totalByteLength=0}get length(){return this.totalByteLength}append(W){this.buffers.push(W),this.totalByteLength+=W.length}getInt32(){if(this.totalByteLength<4)return null;let W=this.buffers.first();if(W!=null&&W.byteLength>=4)return W.readInt32LE(0);let H=this.read(4),re=H.readInt32LE(0);return this.totalByteLength+=4,this.buffers.unshift(H),re}read(W){if(typeof W!="number"||W<0)throw new r.MongoInvalidArgumentError('Argument "size" must be a non-negative number');if(W>this.totalByteLength)return Buffer.alloc(0);let H=Buffer.allocUnsafe(W);for(let re=0;re<W;){let fe=this.buffers.shift();if(fe==null)break;let _e=W-re,We=Math.min(_e,fe.byteLength),$e=fe.subarray(0,We);H.set($e,re),re+=We,this.totalByteLength-=We,We<fe.byteLength&&this.buffers.unshift(fe.subarray(We))}return H}};e.BufferPool=qe;var Ge=class Rr{constructor(H){this.host=void 0,this.port=void 0,this.socketPath=void 0,this.isIPv6=!1;let re=H.split(" ").join("%20");if(re.endsWith(".sock")){this.socketPath=decodeURIComponent(re);return}let fe=`iLoveJS://${re}`,_e;try{_e=new i.URL(fe)}catch(wt){let br=new r.MongoRuntimeError(`Unable to parse ${re} with URL`);throw br.cause=wt,br}let We=_e.hostname,$e=_e.port,ae=decodeURIComponent(We).toLowerCase();if(ae.startsWith("[")&&ae.endsWith("]")&&(this.isIPv6=!0,ae=ae.substring(1,We.length-1)),this.host=ae.toLowerCase(),typeof $e=="number"?this.port=$e:typeof $e=="string"&&$e!==""?this.port=Number.parseInt($e,10):this.port=27017,this.port===0)throw new r.MongoParseError("Invalid port (zero) with hostname");Object.freeze(this)}[Symbol.for("nodejs.util.inspect.custom")](){return this.inspect()}inspect(){return`new HostAddress('${this.toString()}')`}toString(){return typeof this.host=="string"?this.isIPv6?`[${this.host}]:${this.port}`:`${this.host}:${this.port}`:`${this.socketPath}`}static fromString(H){return new Rr(H)}static fromHostPort(H,re){return H.includes(":")&&(H=`[${H}]`),Rr.fromString(`${H}:${re}`)}static fromSrvRecord({name:H,port:re}){return Rr.fromHostPort(H,re)}toHostPort(){if(this.socketPath)return{host:this.socketPath,port:0};let H=this.host??"",re=this.port??0;return{host:H,port:re}}};e.HostAddress=Ge,e.DEFAULT_PK_FACTORY={createPk(){return new A.ObjectId}},e.MONGODB_WARNING_CODE="MONGODB DRIVER";function ct(W){return process.emitWarning(W,{code:e.MONGODB_WARNING_CODE})}e.emitWarning=ct;var St=new Set;function K(W){if(!St.has(W))return St.add(W),ct(W)}e.emitWarningOnce=K;function P(W){return Object.values(W).join(", ")}e.enumToString=P;function te(W){return W?!!(W.loadBalanced||W.description.logicalSessionTimeoutMinutes!=null&&W.description.type!==c.ServerType.Standalone):!1}e.supportsRetryableWrites=te;function le(W,H=0){let re=Array.from(W);if(H>re.length)throw new r.MongoRuntimeError("Limit must be less than the number of items");let fe=re.length,_e=H%re.length===0?1:re.length-H;for(;fe>_e;){let We=Math.floor(Math.random()*fe);fe-=1;let $e=re[fe];re[fe]=re[We],re[We]=$e}return H%re.length===0?re:re.slice(_e)}e.shuffle=le;function q(W){return!!(W.aggregate||W.count||W.distinct||W.find||W.geoNear)}e.commandSupportsReadConcern=q;function ge(W,H){return W==null&&H==null?0:W==null?-1:H==null?1:e.ByteUtils.compare(W.id,H.id)}e.compareObjectId=ge;function Se(W){if(typeof W=="number")return Math.trunc(W);let H=Number.parseInt(String(W),10);return Number.isNaN(H)?null:H}e.parseInteger=Se;function He(W){let H=Se(W);return H!=null&&H>=0?H:null}e.parseUnsignedInteger=He;function ht(W,H){let re=W.endsWith(".")?W.slice(0,W.length-1):W,fe=H.endsWith(".")?H.slice(0,H.length-1):H,_e=/^.*?\./,We=`.${re.replace(_e,"")}`,$e=`.${fe.replace(_e,"")}`;return We.endsWith($e)}e.matchesParentDomain=ht;function ot(W,H={}){return new Promise((re,fe)=>{let _e,We=h.get(W,H,$e=>{$e.setEncoding("utf8");let ae="";$e.on("data",wt=>ae+=wt),$e.on("end",()=>{(0,a.clearTimeout)(_e),re({status:$e.statusCode,body:ae})})}).on("error",$e=>{(0,a.clearTimeout)(_e),fe($e)}).end();_e=(0,a.setTimeout)(()=>{We.destroy(new r.MongoNetworkTimeoutError("request timed out after 10 seconds"))},1e4)})}e.get=ot;async function dt(W,H={}){return await new Promise((re,fe)=>{let _e={method:"GET",timeout:1e4,json:!0,...l.parse(W),...H},We=h.request(_e,$e=>{$e.setEncoding("utf8");let ae="";$e.on("data",wt=>{ae+=wt}),$e.once("end",()=>{if(H.json===!1){re(ae);return}try{let wt=JSON.parse(ae);re(wt)}catch{fe(new r.MongoRuntimeError(`Invalid JSON response: "${ae}"`))}})});We.once("timeout",()=>We.destroy(new r.MongoNetworkTimeoutError(`Network request to ${W} timed out after ${H.timeout} ms`))),We.once("error",$e=>fe($e)),We.end()})}e.request=dt,e.DOCUMENT_DB_CHECK=/(\.docdb\.amazonaws\.com$)|(\.docdb-elastic\.amazonaws\.com$)/,e.COSMOS_DB_CHECK=/\.cosmos\.azure\.com$/,e.DOCUMENT_DB_MSG="You appear to be connected to a DocumentDB cluster. For more information regarding feature compatibility and support please visit https://www.mongodb.com/supportability/documentdb",e.COSMOS_DB_MSG="You appear to be connected to a CosmosDB cluster. For more information regarding feature compatibility and support please visit https://www.mongodb.com/supportability/cosmosdb";function bt(W,H){return!!(H&&W.test(H.toLowerCase()))}e.isHostMatch=bt;function tr(){let W,H;return{promise:new Promise(function(re,fe){W=re,H=fe}),resolve:W,reject:H}}e.promiseWithResolvers=tr;function Bt(W){}e.squashError=Bt,e.randomBytes=(0,p.promisify)(u.randomBytes);async function Br(W,H){let{promise:re,resolve:fe,reject:_e}=tr(),We=ae=>fe(ae),$e=ae=>_e(ae);W.once(H,We).once("error",$e);try{let ae=await re;return W.off("error",$e),ae}catch(ae){throw W.off(H,We),ae}}e.once=Br;function nu(W,H,re){if((typeof re.forceServerObjectId=="boolean"?re.forceServerObjectId:W.s.db.options?.forceServerObjectId)===!0)return H;let fe=_e=>(_e._id==null&&(_e._id=W.s.pkFactory.createPk()),_e);return Array.isArray(H)?H.map(fe):fe(H)}e.maybeAddIdToDocuments=nu;async function it(W,H){try{return await d.promises.access(W,H),!0}catch{return!1}}e.fileIsAccessible=it;function Dr(){}e.noop=Dr;function Or(W,H,re=!0){if(re&&(Buffer.isBuffer(H)&&(H=(0,A.deserialize)(H)),Buffer.isBuffer(W)))throw new r.MongoRuntimeError("Expected result of decryption to be deserialized BSON object");if(!(!W||typeof W!="object"))for(let fe of Object.keys(W)){let _e=H[fe];if(_e&&_e._bsontype==="Binary"&&_e.sub_type===6){W[n.kDecoratedKeys]||Object.defineProperty(W,n.kDecoratedKeys,{value:[],configurable:!0,enumerable:!1,writable:!1}),W[n.kDecoratedKeys].push(fe);continue}Or(W[fe],_e,!1)}}e.decorateDecryptionResult=Or}),je=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defineAspects=e.AbstractOperation=e.Aspect=void 0;var u=Ue(),d=rt();e.Aspect={READ_OPERATION:Symbol("READ_OPERATION"),WRITE_OPERATION:Symbol("WRITE_OPERATION"),RETRYABLE:Symbol("RETRYABLE"),EXPLAINABLE:Symbol("EXPLAINABLE"),SKIP_COLLATION:Symbol("SKIP_COLLATION"),CURSOR_CREATING:Symbol("CURSOR_CREATING"),MUST_SELECT_SAME_SERVER:Symbol("MUST_SELECT_SAME_SERVER")};var h=Symbol("session"),a=class{constructor(i={}){this.readPreference=this.hasAspect(e.Aspect.WRITE_OPERATION)?d.ReadPreference.primary:d.ReadPreference.fromOptions(i)??d.ReadPreference.primary,this.bsonOptions=(0,u.resolveBSONOptions)(i),this[h]=i.session!=null?i.session:void 0,this.options=i,this.bypassPinningCheck=!!i.bypassPinningCheck,this.trySecondaryWrite=!1}hasAspect(i){let p=this.constructor;return p.aspects==null?!1:p.aspects.has(i)}get session(){return this[h]}clearSession(){this[h]=void 0}get canRetryRead(){return!0}get canRetryWrite(){return!0}};e.AbstractOperation=a;function l(i,p){return!Array.isArray(p)&&!(p instanceof Set)&&(p=[p]),p=new Set(p),Object.defineProperty(i,"aspects",{value:p,writable:!1}),p}e.defineAspects=l}),lt=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.executeOperation=void 0;var u=pe(),d=rt(),h=Wr(),a=ye(),l=je(),i=u.MONGODB_ERROR_CODES.IllegalOperation,p="This MongoDB deployment does not support retryable writes. Please add retryWrites=false to your connection string.";async function A(n,r){if(!(r instanceof l.AbstractOperation))throw new u.MongoRuntimeError("This method requires a valid operation instance");if(n.topology==null){if(n.s.hasBeenClosed)throw new u.MongoNotConnectedError("Client must be connected before running operations");n.s.options[Symbol.for("@@mdb.skipPingOnConnect")]=!0;try{await n.connect()}finally{delete n.s.options[Symbol.for("@@mdb.skipPingOnConnect")]}}let{topology:E}=n;if(E==null)throw new u.MongoRuntimeError("client.connect did not create a topology but also did not throw");let m=r.session,c;if(m==null)c=Symbol(),m=n.startSession({owner:c,explicit:!1});else{if(m.hasEnded)throw new u.MongoExpiredSessionError("Use of expired sessions is not permitted");if(m.snapshotEnabled&&!E.capabilities.supportsSnapshotReads)throw new u.MongoCompatibilityError("Snapshot reads require MongoDB 5.0 or later");if(m.client!==n)throw new u.MongoInvalidArgumentError("ClientSession must be from the same MongoClient")}if(m.explicit&&m?.timeoutMS!=null&&r.options.timeoutMS!=null)throw new u.MongoInvalidArgumentError("Do not specify timeoutMS on operation if already specified on an explicit session");let b=r.readPreference??d.ReadPreference.primary,f=!!m?.inTransaction(),O=r.hasAspect(l.Aspect.READ_OPERATION),F=r.hasAspect(l.Aspect.WRITE_OPERATION);if(f&&!b.equals(d.ReadPreference.primary)&&(O||r.commandName==="runCommand"))throw new u.MongoTransactionError(`Read preference in a transaction must be primary, not: ${b.mode}`);m?.isPinned&&m.transaction.isCommitted&&!r.bypassPinningCheck&&m.unpin();let y;r.hasAspect(l.Aspect.MUST_SELECT_SAME_SERVER)?y=(0,h.sameServerSelector)(r.server?.description):r.trySecondaryWrite?y=(0,h.secondaryWritableServerSelector)(E.commonWireVersion,b):y=b;let g=await E.selectServer(y,{session:m,operationName:r.commandName});if(m==null)return await r.execute(g,void 0);if(!r.hasAspect(l.Aspect.RETRYABLE))try{return await r.execute(g,m)}finally{if(m?.owner!=null&&m.owner===c)try{await m.endSession()}catch(_){(0,a.squashError)(_)}}let T=E.s.options.retryReads&&!f&&r.canRetryRead,D=E.s.options.retryWrites&&!f&&(0,a.supportsRetryableWrites)(g)&&r.canRetryWrite,N=O&&T||F&&D;F&&D&&(r.options.willRetryWrite=!0,m.incrementTransactionNumber());try{return await r.execute(g,m)}catch(_){if(N&&_ instanceof u.MongoError)return await o(r,_,{session:m,topology:E,selector:y,previousServer:g.description});throw _}finally{if(m?.owner!=null&&m.owner===c)try{await m.endSession()}catch(_){(0,a.squashError)(_)}}}e.executeOperation=A;async function o(n,r,{session:E,topology:m,selector:c,previousServer:b}){let f=n.hasAspect(l.Aspect.WRITE_OPERATION),O=n.hasAspect(l.Aspect.READ_OPERATION);if(f&&r.code===i)throw new u.MongoServerError({message:p,errmsg:p,originalError:r});if(f&&!(0,u.isRetryableWriteError)(r)||O&&!(0,u.isRetryableReadError)(r))throw r;r instanceof u.MongoNetworkError&&E.isPinned&&!E.inTransaction()&&n.hasAspect(l.Aspect.CURSOR_CREATING)&&E.unpin({force:!0,forceClear:!0});let F=await m.selectServer(c,{session:E,operationName:n.commandName,previousServer:b});if(f&&!(0,a.supportsRetryableWrites)(F))throw new u.MongoUnexpectedServerResponseError("Selected server does not support retryable writes");try{return await n.execute(F,E)}catch(y){throw y instanceof u.MongoError&&y.hasErrorLabel(u.MongoErrorLabel.NoWritesPerformed)?r:y}}}),H1=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Explain=e.ExplainVerbosity=void 0;var u=pe();e.ExplainVerbosity=Object.freeze({queryPlanner:"queryPlanner",queryPlannerExtended:"queryPlannerExtended",executionStats:"executionStats",allPlansExecution:"allPlansExecution"});var d=class q1{constructor(a){typeof a=="boolean"?this.verbosity=a?e.ExplainVerbosity.allPlansExecution:e.ExplainVerbosity.queryPlanner:this.verbosity=a}static fromOptions(a){if(a?.explain==null)return;let l=a.explain;if(typeof l=="boolean"||typeof l=="string")return new q1(l);throw new u.MongoInvalidArgumentError('Field "explain" must be a string or a boolean')}};e.Explain=d}),Ze=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommandOperation=void 0;var u=pe(),d=H1(),h=yt(),a=Wr(),l=ye(),i=at(),p=je(),A=class extends p.AbstractOperation{constructor(o,n){super(n),this.options=n??{};let r=n?.dbName||n?.authdb;if(r?this.ns=new l.MongoDBNamespace(r,"$cmd"):this.ns=o?o.s.namespace.withCollection("$cmd"):new l.MongoDBNamespace("admin","$cmd"),this.readConcern=h.ReadConcern.fromOptions(n),this.writeConcern=i.WriteConcern.fromOptions(n),this.hasAspect(p.Aspect.EXPLAINABLE))this.explain=d.Explain.fromOptions(n);else if(n?.explain!=null)throw new u.MongoInvalidArgumentError('Option "explain" is not supported on this command')}get canRetryWrite(){return this.hasAspect(p.Aspect.EXPLAINABLE)?this.explain==null:!0}async executeCommand(o,n,r,E){this.server=o;let m={...this.options,...this.bsonOptions,readPreference:this.readPreference,session:n},c=(0,l.maxWireVersion)(o),b=this.session&&this.session.inTransaction();return this.readConcern&&(0,l.commandSupportsReadConcern)(r)&&!b&&Object.assign(r,{readConcern:this.readConcern}),this.trySecondaryWrite&&c<a.MIN_SECONDARY_WRITE_WIRE_VERSION&&(m.omitReadPreference=!0),this.writeConcern&&this.hasAspect(p.Aspect.WRITE_OPERATION)&&!b&&i.WriteConcern.apply(r,this.writeConcern),m.collation&&typeof m.collation=="object"&&!this.hasAspect(p.Aspect.SKIP_COLLATION)&&Object.assign(r,{collation:m.collation}),typeof m.maxTimeMS=="number"&&(r.maxTimeMS=m.maxTimeMS),this.hasAspect(p.Aspect.EXPLAINABLE)&&this.explain&&(r=(0,l.decorateWithExplain)(r,this.explain)),await o.command(this.ns,r,m,E)}};e.CommandOperation=A}),Qo=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListDatabasesOperation=void 0;var u=ye(),d=Ze(),h=je(),a=class extends d.CommandOperation{constructor(l,i){super(l,i),this.options=i??{},this.ns=new u.MongoDBNamespace("admin","$cmd")}get commandName(){return"listDatabases"}async execute(l,i){let p={listDatabases:1};return typeof this.options.nameOnly=="boolean"&&(p.nameOnly=this.options.nameOnly),this.options.filter&&(p.filter=this.options.filter),typeof this.options.authorizedDatabases=="boolean"&&(p.authorizedDatabases=this.options.authorizedDatabases),(0,u.maxWireVersion)(l)>=9&&this.options.comment!==void 0&&(p.comment=this.options.comment),await super.executeCommand(l,i,p)}};e.ListDatabasesOperation=a,(0,h.defineAspects)(a,[h.Aspect.READ_OPERATION,h.Aspect.RETRYABLE])}),K1=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RemoveUserOperation=void 0;var u=Ze(),d=je(),h=class extends u.CommandOperation{constructor(a,l,i){super(a,i),this.options=i,this.username=l}get commandName(){return"dropUser"}async execute(a,l){return await super.executeCommand(a,l,{dropUser:this.username}),!0}};e.RemoveUserOperation=h,(0,d.defineAspects)(h,[d.Aspect.WRITE_OPERATION])}),mr=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RunAdminCommandOperation=e.RunCommandOperation=void 0;var u=ye(),d=je(),h=class extends d.AbstractOperation{constructor(l,i,p){super(p),this.command=i,this.options=p,this.ns=l.s.namespace.withCollection("$cmd")}get commandName(){return"runCommand"}async execute(l,i){return this.server=l,await l.command(this.ns,this.command,{...this.options,readPreference:this.readPreference,session:i},this.options.responseType)}};e.RunCommandOperation=h;var a=class extends d.AbstractOperation{constructor(l,i){super(i),this.command=l,this.options=i,this.ns=new u.MongoDBNamespace("admin","$cmd")}get commandName(){return"runCommand"}async execute(l,i){return this.server=l,await l.command(this.ns,this.command,{...this.options,readPreference:this.readPreference,session:i})}};e.RunAdminCommandOperation=a}),ei=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ValidateCollectionOperation=void 0;var u=pe(),d=Ze(),h=class extends d.CommandOperation{constructor(a,l,i){let p={validate:l},A=Object.keys(i);for(let o=0;o<A.length;o++)Object.prototype.hasOwnProperty.call(i,A[o])&&A[o]!=="session"&&(p[A[o]]=i[A[o]]);super(a.s.db,i),this.options=i,this.command=p,this.collectionName=l}get commandName(){return"validate"}async execute(a,l){let i=this.collectionName,p=await super.executeCommand(a,l,this.command);if(p.result!=null&&typeof p.result!="string")throw new u.MongoUnexpectedServerResponseError("Error with validation data");if(p.result!=null&&p.result.match(/exception|corrupt/)!=null)throw new u.MongoUnexpectedServerResponseError(`Invalid collection ${i}`);if(p.valid!=null&&!p.valid)throw new u.MongoUnexpectedServerResponseError(`Invalid collection ${i}`);return p}};e.ValidateCollectionOperation=h}),Y1=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Admin=void 0;var u=Ue(),d=lt(),h=Qo(),a=K1(),l=mr(),i=ei(),p=class{constructor(A){this.s={db:A}}async command(A,o){return await(0,d.executeOperation)(this.s.db.client,new l.RunAdminCommandOperation(A,{...(0,u.resolveBSONOptions)(o),session:o?.session,readPreference:o?.readPreference}))}async buildInfo(A){return await this.command({buildinfo:1},A)}async serverInfo(A){return await this.command({buildinfo:1},A)}async serverStatus(A){return await this.command({serverStatus:1},A)}async ping(A){return await this.command({ping:1},A)}async removeUser(A,o){return await(0,d.executeOperation)(this.s.db.client,new a.RemoveUserOperation(this.s.db,A,{dbName:"admin",...o}))}async validateCollection(A,o={}){return await(0,d.executeOperation)(this.s.db.client,new i.ValidateCollectionOperation(this,A,o))}async listDatabases(A){return await(0,d.executeOperation)(this.s.db.client,new h.ListDatabasesOperation(this.s.db,A))}async replSetGetStatus(A){return await this.command({replSetGetStatus:1},A)}};e.Admin=p}),J1=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.makeDeleteStatement=e.DeleteManyOperation=e.DeleteOneOperation=e.DeleteOperation=void 0;var u=pe(),d=Ze(),h=je(),a=class extends d.CommandOperation{constructor(A,o,n){super(void 0,n),this.options=n,this.ns=A,this.statements=o}get commandName(){return"delete"}get canRetryWrite(){return super.canRetryWrite===!1?!1:this.statements.every(A=>A.limit!=null?A.limit>0:!0)}async execute(A,o){let n=this.options??{},r=typeof n.ordered=="boolean"?n.ordered:!0,E={delete:this.ns.collection,deletes:this.statements,ordered:r};if(n.let&&(E.let=n.let),n.comment!==void 0&&(E.comment=n.comment),this.writeConcern&&this.writeConcern.w===0&&this.statements.find(m=>m.hint))throw new u.MongoCompatibilityError("hint is not supported with unacknowledged writes");return await super.executeCommand(A,o,E)}};e.DeleteOperation=a;var l=class extends a{constructor(A,o,n){super(A.s.namespace,[p(o,{...n,limit:1})],n)}async execute(A,o){let n=await super.execute(A,o);if(this.explain)return n;if(n.code)throw new u.MongoServerError(n);if(n.writeErrors)throw new u.MongoServerError(n.writeErrors[0]);return{acknowledged:this.writeConcern?.w!==0,deletedCount:n.n}}};e.DeleteOneOperation=l;var i=class extends a{constructor(A,o,n){super(A.s.namespace,[p(o,n)],n)}async execute(A,o){let n=await super.execute(A,o);if(this.explain)return n;if(n.code)throw new u.MongoServerError(n);if(n.writeErrors)throw new u.MongoServerError(n.writeErrors[0]);return{acknowledged:this.writeConcern?.w!==0,deletedCount:n.n}}};e.DeleteManyOperation=i;function p(A,o){let n={q:A,limit:typeof o.limit=="number"?o.limit:0};return o.collation&&(n.collation=o.collation),o.hint&&(n.hint=o.hint),n}e.makeDeleteStatement=p,(0,h.defineAspects)(a,[h.Aspect.RETRYABLE,h.Aspect.WRITE_OPERATION]),(0,h.defineAspects)(l,[h.Aspect.RETRYABLE,h.Aspect.WRITE_OPERATION,h.Aspect.EXPLAINABLE,h.Aspect.SKIP_COLLATION]),(0,h.defineAspects)(i,[h.Aspect.WRITE_OPERATION,h.Aspect.EXPLAINABLE,h.Aspect.SKIP_COLLATION])}),X1=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BulkWriteOperation=void 0;var u=je(),d=class extends u.AbstractOperation{constructor(h,a,l){super(l),this.options=l,this.collection=h,this.operations=a}get commandName(){return"bulkWrite"}async execute(h,a){let l=this.collection,i=this.operations,p={...this.options,...this.bsonOptions,readPreference:this.readPreference},A=p.ordered===!1?l.initializeUnorderedBulkOp(p):l.initializeOrderedBulkOp(p);for(let o=0;o<i.length;o++)A.raw(i[o]);return await A.execute({...p,session:a})}};e.BulkWriteOperation=d,(0,u.defineAspects)(d,[u.Aspect.WRITE_OPERATION])}),Z1=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InsertManyOperation=e.InsertOneOperation=e.InsertOperation=void 0;var u=pe(),d=ye(),h=at(),a=X1(),l=Ze(),i=je(),p=class extends l.CommandOperation{constructor(n,r,E){super(void 0,E),this.options={...E,checkKeys:E.checkKeys??!1},this.ns=n,this.documents=r}get commandName(){return"insert"}async execute(n,r){let E=this.options??{},m=typeof E.ordered=="boolean"?E.ordered:!0,c={insert:this.ns.collection,documents:this.documents,ordered:m};return typeof E.bypassDocumentValidation=="boolean"&&(c.bypassDocumentValidation=E.bypassDocumentValidation),E.comment!==void 0&&(c.comment=E.comment),await super.executeCommand(n,r,c)}};e.InsertOperation=p;var A=class extends p{constructor(n,r,E){super(n.s.namespace,(0,d.maybeAddIdToDocuments)(n,[r],E),E)}async execute(n,r){let E=await super.execute(n,r);if(E.code)throw new u.MongoServerError(E);if(E.writeErrors)throw new u.MongoServerError(E.writeErrors[0]);return{acknowledged:this.writeConcern?.w!==0,insertedId:this.documents[0]._id}}};e.InsertOneOperation=A;var o=class extends i.AbstractOperation{constructor(n,r,E){if(super(E),!Array.isArray(r))throw new u.MongoInvalidArgumentError('Argument "docs" must be an array of documents');this.options=E,this.collection=n,this.docs=r}get commandName(){return"insert"}async execute(n,r){let E=this.collection,m={...this.options,...this.bsonOptions,readPreference:this.readPreference},c=h.WriteConcern.fromOptions(m),b=new a.BulkWriteOperation(E,this.docs.map(f=>({insertOne:{document:f}})),m);try{let f=await b.execute(n,r);return{acknowledged:c?.w!==0,insertedCount:f.insertedCount,insertedIds:f.insertedIds}}catch(f){throw f&&f.message==="Operation must be an object with an operation key"?new u.MongoInvalidArgumentError("Collection.insertMany() cannot be called with an array that has null/undefined values"):f}}};e.InsertManyOperation=o,(0,i.defineAspects)(p,[i.Aspect.RETRYABLE,i.Aspect.WRITE_OPERATION]),(0,i.defineAspects)(A,[i.Aspect.RETRYABLE,i.Aspect.WRITE_OPERATION]),(0,i.defineAspects)(o,[i.Aspect.WRITE_OPERATION])}),Q1=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.makeUpdateStatement=e.ReplaceOneOperation=e.UpdateManyOperation=e.UpdateOneOperation=e.UpdateOperation=void 0;var u=pe(),d=ye(),h=Ze(),a=je(),l=class extends h.CommandOperation{constructor(n,r,E){super(void 0,E),this.options=E,this.ns=n,this.statements=r}get commandName(){return"update"}get canRetryWrite(){return super.canRetryWrite===!1?!1:this.statements.every(n=>n.multi==null||n.multi===!1)}async execute(n,r){let E=this.options??{},m=typeof E.ordered=="boolean"?E.ordered:!0,c={update:this.ns.collection,updates:this.statements,ordered:m};if(typeof E.bypassDocumentValidation=="boolean"&&(c.bypassDocumentValidation=E.bypassDocumentValidation),E.let&&(c.let=E.let),E.comment!==void 0&&(c.comment=E.comment),this.writeConcern&&this.writeConcern.w===0&&this.statements.find(b=>b.hint))throw new u.MongoCompatibilityError("hint is not supported with unacknowledged writes");return await super.executeCommand(n,r,c)}};e.UpdateOperation=l;var i=class extends l{constructor(n,r,E,m){if(super(n.s.namespace,[o(r,E,{...m,multi:!1})],m),!(0,d.hasAtomicOperators)(E))throw new u.MongoInvalidArgumentError("Update document requires atomic operators")}async execute(n,r){let E=await super.execute(n,r);if(this.explain!=null)return E;if(E.code)throw new u.MongoServerError(E);if(E.writeErrors)throw new u.MongoServerError(E.writeErrors[0]);return{acknowledged:this.writeConcern?.w!==0,modifiedCount:E.nModified??E.n,upsertedId:Array.isArray(E.upserted)&&E.upserted.length>0?E.upserted[0]._id:null,upsertedCount:Array.isArray(E.upserted)&&E.upserted.length?E.upserted.length:0,matchedCount:Array.isArray(E.upserted)&&E.upserted.length>0?0:E.n}}};e.UpdateOneOperation=i;var p=class extends l{constructor(n,r,E,m){if(super(n.s.namespace,[o(r,E,{...m,multi:!0})],m),!(0,d.hasAtomicOperators)(E))throw new u.MongoInvalidArgumentError("Update document requires atomic operators")}async execute(n,r){let E=await super.execute(n,r);if(this.explain!=null)return E;if(E.code)throw new u.MongoServerError(E);if(E.writeErrors)throw new u.MongoServerError(E.writeErrors[0]);return{acknowledged:this.writeConcern?.w!==0,modifiedCount:E.nModified??E.n,upsertedId:Array.isArray(E.upserted)&&E.upserted.length>0?E.upserted[0]._id:null,upsertedCount:Array.isArray(E.upserted)&&E.upserted.length?E.upserted.length:0,matchedCount:Array.isArray(E.upserted)&&E.upserted.length>0?0:E.n}}};e.UpdateManyOperation=p;var A=class extends l{constructor(n,r,E,m){if(super(n.s.namespace,[o(r,E,{...m,multi:!1})],m),(0,d.hasAtomicOperators)(E))throw new u.MongoInvalidArgumentError("Replacement document must not contain atomic operators")}async execute(n,r){let E=await super.execute(n,r);if(this.explain!=null)return E;if(E.code)throw new u.MongoServerError(E);if(E.writeErrors)throw new u.MongoServerError(E.writeErrors[0]);return{acknowledged:this.writeConcern?.w!==0,modifiedCount:E.nModified??E.n,upsertedId:Array.isArray(E.upserted)&&E.upserted.length>0?E.upserted[0]._id:null,upsertedCount:Array.isArray(E.upserted)&&E.upserted.length?E.upserted.length:0,matchedCount:Array.isArray(E.upserted)&&E.upserted.length>0?0:E.n}}};e.ReplaceOneOperation=A;function o(n,r,E){if(n==null||typeof n!="object")throw new u.MongoInvalidArgumentError("Selector must be a valid JavaScript object");if(r==null||typeof r!="object")throw new u.MongoInvalidArgumentError("Document must be a valid JavaScript object");let m={q:n,u:r};return typeof E.upsert=="boolean"&&(m.upsert=E.upsert),E.multi&&(m.multi=E.multi),E.hint&&(m.hint=E.hint),E.arrayFilters&&(m.arrayFilters=E.arrayFilters),E.collation&&(m.collation=E.collation),m}e.makeUpdateStatement=o,(0,a.defineAspects)(l,[a.Aspect.RETRYABLE,a.Aspect.WRITE_OPERATION,a.Aspect.SKIP_COLLATION]),(0,a.defineAspects)(i,[a.Aspect.RETRYABLE,a.Aspect.WRITE_OPERATION,a.Aspect.EXPLAINABLE,a.Aspect.SKIP_COLLATION]),(0,a.defineAspects)(p,[a.Aspect.WRITE_OPERATION,a.Aspect.EXPLAINABLE,a.Aspect.SKIP_COLLATION]),(0,a.defineAspects)(A,[a.Aspect.RETRYABLE,a.Aspect.WRITE_OPERATION,a.Aspect.SKIP_COLLATION])}),Ur=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BulkOperationBase=e.BulkWriteShimOperation=e.FindOperators=e.MongoBulkWriteError=e.mergeBatchResults=e.WriteError=e.WriteConcernError=e.BulkWriteResult=e.Batch=e.BatchType=void 0;var u=ve("util"),d=Ue(),h=pe(),a=J1(),l=lt(),i=Z1(),p=je(),A=Q1(),o=ye(),n=ye(),r=at(),E=Symbol("serverError");e.BatchType=Object.freeze({INSERT:1,UPDATE:2,DELETE:3});var m=class{constructor(M,S){this.originalZeroIndex=S,this.currentIndex=0,this.originalIndexes=[],this.batchType=M,this.operations=[],this.size=0,this.sizeBytes=0}};e.Batch=m;var c=class xu{static generateIdMap(S){let v={};for(let w of S)v[w.index]=w._id;return v}constructor(S,v){this.result=S,this.insertedCount=this.result.nInserted??0,this.matchedCount=this.result.nMatched??0,this.modifiedCount=this.result.nModified??0,this.deletedCount=this.result.nRemoved??0,this.upsertedCount=this.result.upserted.length??0,this.upsertedIds=xu.generateIdMap(this.result.upserted),this.insertedIds=xu.generateIdMap(this.getSuccessfullyInsertedIds(S,v)),Object.defineProperty(this,"result",{value:this.result,enumerable:!1})}get ok(){return this.result.ok}getSuccessfullyInsertedIds(S,v){return S.writeErrors.length===0?S.insertedIds:v?S.insertedIds.slice(0,S.writeErrors[0].index):S.insertedIds.filter(({index:w})=>!S.writeErrors.some(k=>w===k.index))}getUpsertedIdAt(S){return this.result.upserted[S]}getRawResponse(){return this.result}hasWriteErrors(){return this.result.writeErrors.length>0}getWriteErrorCount(){return this.result.writeErrors.length}getWriteErrorAt(S){return S<this.result.writeErrors.length?this.result.writeErrors[S]:void 0}getWriteErrors(){return this.result.writeErrors}getWriteConcernError(){if(this.result.writeConcernErrors.length!==0){if(this.result.writeConcernErrors.length===1)return this.result.writeConcernErrors[0];{let S="";for(let v=0;v<this.result.writeConcernErrors.length;v++){let w=this.result.writeConcernErrors[v];S=S+w.errmsg,v===0&&(S=S+" and ")}return new b({errmsg:S,code:h.MONGODB_ERROR_CODES.WriteConcernFailed})}}}toString(){return`BulkWriteResult(${this.result})`}isOk(){return this.result.ok===1}};e.BulkWriteResult=c;var b=class{constructor(M){this[E]=M}get code(){return this[E].code}get errmsg(){return this[E].errmsg}get errInfo(){return this[E].errInfo}toJSON(){return this[E]}toString(){return`WriteConcernError(${this.errmsg})`}};e.WriteConcernError=b;var f=class{constructor(M){this.err=M}get code(){return this.err.code}get index(){return this.err.index}get errmsg(){return this.err.errmsg}get errInfo(){return this.err.errInfo}getOperation(){return this.err.op}toJSON(){return{code:this.err.code,index:this.err.index,errmsg:this.err.errmsg,op:this.err.op}}toString(){return`WriteError(${JSON.stringify(this.toJSON())})`}};e.WriteError=f;function O(M,S,v,w){if(v?w=v:w&&w.result&&(w=w.result),w==null)return;if(w.ok===0&&S.ok===1){S.ok=0;let $={index:0,code:w.code||0,errmsg:w.message,errInfo:w.errInfo,op:M.operations[0]};S.writeErrors.push(new f($));return}else if(w.ok===0&&S.ok===0)return;R(M)&&w.n&&(S.nInserted=S.nInserted+w.n),L(M)&&w.n&&(S.nRemoved=S.nRemoved+w.n);let k=0;if(Array.isArray(w.upserted)){k=w.upserted.length;for(let $=0;$<w.upserted.length;$++)S.upserted.push({index:w.upserted[$].index+M.originalZeroIndex,_id:w.upserted[$]._id})}else w.upserted&&(k=1,S.upserted.push({index:M.originalZeroIndex,_id:w.upserted}));if(j(M)&&w.n){let $=w.nModified;S.nUpserted=S.nUpserted+k,S.nMatched=S.nMatched+(w.n-k),typeof $=="number"?S.nModified=S.nModified+$:S.nModified=0}if(Array.isArray(w.writeErrors))for(let $=0;$<w.writeErrors.length;$++){let X={index:M.originalIndexes[w.writeErrors[$].index],code:w.writeErrors[$].code,errmsg:w.writeErrors[$].errmsg,errInfo:w.writeErrors[$].errInfo,op:M.operations[w.writeErrors[$].index]};S.writeErrors.push(new f(X))}w.writeConcernError&&S.writeConcernErrors.push(new b(w.writeConcernError))}e.mergeBatchResults=O;function F(M,S,v){if(M.s.batches.length===0)return v(void 0,new c(M.s.bulkResult,M.isOrdered));let w=M.s.batches.shift();function k(X,de){if(X&&"message"in X&&!(X instanceof h.MongoWriteConcernError))return v(new g(X,new c(M.s.bulkResult,M.isOrdered)));if(X instanceof h.MongoWriteConcernError)return y(w,M.s.bulkResult,M.isOrdered,X,v);O(w,M.s.bulkResult,X,de);let Y=new c(M.s.bulkResult,M.isOrdered);M.handleWriteError(v,Y)||F(M,S,v)}let $=(0,n.resolveOptions)(M,{...S,ordered:M.isOrdered});$.bypassDocumentValidation!==!0&&delete $.bypassDocumentValidation,M.operationId&&(k.operationId=M.operationId),M.s.bypassDocumentValidation===!0&&($.bypassDocumentValidation=!0),M.s.checkKeys===!1&&($.checkKeys=!1),$.retryWrites&&(j(w)&&($.retryWrites=$.retryWrites&&!w.operations.some(X=>X.multi)),L(w)&&($.retryWrites=$.retryWrites&&!w.operations.some(X=>X.limit===0)));try{let X=R(w)?new i.InsertOperation(M.s.namespace,w.operations,$):j(w)?new A.UpdateOperation(M.s.namespace,w.operations,$):L(w)?new a.DeleteOperation(M.s.namespace,w.operations,$):null;X!=null&&(0,l.executeOperation)(M.s.collection.client,X).then(de=>k(void 0,de),de=>k(de))}catch(X){X.ok=0,O(w,M.s.bulkResult,X,void 0),v()}}function y(M,S,v,w,k){O(M,S,void 0,w.result),k(new g({message:w.result?.writeConcernError.errmsg,code:w.result?.writeConcernError.result},new c(S,v)))}var g=class extends h.MongoServerError{constructor(M,S){super(M),this.writeErrors=[],M instanceof b?this.err=M:M instanceof Error||(this.message=M.message,this.code=M.code,this.writeErrors=M.writeErrors??[]),this.result=S,Object.assign(this,M)}get name(){return"MongoBulkWriteError"}get insertedCount(){return this.result.insertedCount}get matchedCount(){return this.result.matchedCount}get modifiedCount(){return this.result.modifiedCount}get deletedCount(){return this.result.deletedCount}get upsertedCount(){return this.result.upsertedCount}get insertedIds(){return this.result.insertedIds}get upsertedIds(){return this.result.upsertedIds}};e.MongoBulkWriteError=g;var T=class{constructor(M){this.bulkOperation=M}update(M){let S=I(this.bulkOperation);return this.bulkOperation.addToOperationsList(e.BatchType.UPDATE,(0,A.makeUpdateStatement)(S.selector,M,{...S,multi:!0}))}updateOne(M){if(!(0,n.hasAtomicOperators)(M))throw new h.MongoInvalidArgumentError("Update document requires atomic operators");let S=I(this.bulkOperation);return this.bulkOperation.addToOperationsList(e.BatchType.UPDATE,(0,A.makeUpdateStatement)(S.selector,M,{...S,multi:!1}))}replaceOne(M){if((0,n.hasAtomicOperators)(M))throw new h.MongoInvalidArgumentError("Replacement document must not use atomic operators");let S=I(this.bulkOperation);return this.bulkOperation.addToOperationsList(e.BatchType.UPDATE,(0,A.makeUpdateStatement)(S.selector,M,{...S,multi:!1}))}deleteOne(){let M=I(this.bulkOperation);return this.bulkOperation.addToOperationsList(e.BatchType.DELETE,(0,a.makeDeleteStatement)(M.selector,{...M,limit:1}))}delete(){let M=I(this.bulkOperation);return this.bulkOperation.addToOperationsList(e.BatchType.DELETE,(0,a.makeDeleteStatement)(M.selector,{...M,limit:0}))}upsert(){return this.bulkOperation.s.currentOp||(this.bulkOperation.s.currentOp={}),this.bulkOperation.s.currentOp.upsert=!0,this}collation(M){return this.bulkOperation.s.currentOp||(this.bulkOperation.s.currentOp={}),this.bulkOperation.s.currentOp.collation=M,this}arrayFilters(M){return this.bulkOperation.s.currentOp||(this.bulkOperation.s.currentOp={}),this.bulkOperation.s.currentOp.arrayFilters=M,this}hint(M){return this.bulkOperation.s.currentOp||(this.bulkOperation.s.currentOp={}),this.bulkOperation.s.currentOp.hint=M,this}};e.FindOperators=T;var D=(0,u.promisify)(F),N=class extends p.AbstractOperation{constructor(M,S){super(S),this.bulkOperation=M}get commandName(){return"bulkWrite"}execute(M,S){return this.options.session==null&&(this.options.session=S),D(this.bulkOperation,this.options)}};e.BulkWriteShimOperation=N;var _=class{constructor(M,S,v){this.collection=M,this.isOrdered=v;let w=(0,n.getTopology)(M);S=S??{};let k=M.s.namespace,$=!1,X,de=w.lastHello(),Y=!!(w.s.options&&w.s.options.autoEncrypter),se=de&&de.maxBsonObjectSize?de.maxBsonObjectSize:1024*1024*16,x=Y?1024*1024*2:se,G=de&&de.maxWriteBatchSize?de.maxWriteBatchSize:1e3,Q=(G-1).toString(10).length+2,oe=Object.assign({},S);oe=(0,n.applyRetryableWrites)(oe,M.s.db);let Ee={ok:1,writeErrors:[],writeConcernErrors:[],insertedIds:[],nInserted:0,nUpserted:0,nMatched:0,nModified:0,nRemoved:0,upserted:[]};this.s={bulkResult:Ee,currentBatch:void 0,currentIndex:0,currentBatchSize:0,currentBatchSizeBytes:0,currentInsertBatch:void 0,currentUpdateBatch:void 0,currentRemoveBatch:void 0,batches:[],writeConcern:r.WriteConcern.fromOptions(S),maxBsonObjectSize:se,maxBatchSizeBytes:x,maxWriteBatchSize:G,maxKeySize:Q,namespace:k,topology:w,options:oe,bsonOptions:(0,d.resolveBSONOptions)(S),currentOp:X,executed:$,collection:M,err:void 0,checkKeys:typeof S.checkKeys=="boolean"?S.checkKeys:!1},S.bypassDocumentValidation===!0&&(this.s.bypassDocumentValidation=!0)}insert(M){return(0,o.maybeAddIdToDocuments)(this.collection,M,{forceServerObjectId:this.shouldForceServerObjectId()}),this.addToOperationsList(e.BatchType.INSERT,M)}find(M){if(!M)throw new h.MongoInvalidArgumentError("Bulk find operation must specify a selector");return this.s.currentOp={selector:M},new T(this)}raw(M){if(M==null||typeof M!="object")throw new h.MongoInvalidArgumentError("Operation must be an object with an operation key");if("insertOne"in M){let S=this.shouldForceServerObjectId(),v=M.insertOne&&M.insertOne.document==null?M.insertOne:M.insertOne.document;return(0,o.maybeAddIdToDocuments)(this.collection,v,{forceServerObjectId:S}),this.addToOperationsList(e.BatchType.INSERT,v)}if("replaceOne"in M||"updateOne"in M||"updateMany"in M){if("replaceOne"in M){if("q"in M.replaceOne)throw new h.MongoInvalidArgumentError("Raw operations are not allowed");let S=(0,A.makeUpdateStatement)(M.replaceOne.filter,M.replaceOne.replacement,{...M.replaceOne,multi:!1});if((0,n.hasAtomicOperators)(S.u))throw new h.MongoInvalidArgumentError("Replacement document must not use atomic operators");return this.addToOperationsList(e.BatchType.UPDATE,S)}if("updateOne"in M){if("q"in M.updateOne)throw new h.MongoInvalidArgumentError("Raw operations are not allowed");let S=(0,A.makeUpdateStatement)(M.updateOne.filter,M.updateOne.update,{...M.updateOne,multi:!1});if(!(0,n.hasAtomicOperators)(S.u))throw new h.MongoInvalidArgumentError("Update document requires atomic operators");return this.addToOperationsList(e.BatchType.UPDATE,S)}if("updateMany"in M){if("q"in M.updateMany)throw new h.MongoInvalidArgumentError("Raw operations are not allowed");let S=(0,A.makeUpdateStatement)(M.updateMany.filter,M.updateMany.update,{...M.updateMany,multi:!0});if(!(0,n.hasAtomicOperators)(S.u))throw new h.MongoInvalidArgumentError("Update document requires atomic operators");return this.addToOperationsList(e.BatchType.UPDATE,S)}}if("deleteOne"in M){if("q"in M.deleteOne)throw new h.MongoInvalidArgumentError("Raw operations are not allowed");return this.addToOperationsList(e.BatchType.DELETE,(0,a.makeDeleteStatement)(M.deleteOne.filter,{...M.deleteOne,limit:1}))}if("deleteMany"in M){if("q"in M.deleteMany)throw new h.MongoInvalidArgumentError("Raw operations are not allowed");return this.addToOperationsList(e.BatchType.DELETE,(0,a.makeDeleteStatement)(M.deleteMany.filter,{...M.deleteMany,limit:0}))}throw new h.MongoInvalidArgumentError("bulkWrite only supports insertOne, updateOne, updateMany, deleteOne, deleteMany")}get bsonOptions(){return this.s.bsonOptions}get writeConcern(){return this.s.writeConcern}get batches(){let M=[...this.s.batches];return this.isOrdered?this.s.currentBatch&&M.push(this.s.currentBatch):(this.s.currentInsertBatch&&M.push(this.s.currentInsertBatch),this.s.currentUpdateBatch&&M.push(this.s.currentUpdateBatch),this.s.currentRemoveBatch&&M.push(this.s.currentRemoveBatch)),M}async execute(M={}){if(this.s.executed)throw new h.MongoBatchReExecutionError;let S=r.WriteConcern.fromOptions(M);if(S&&(this.s.writeConcern=S),this.isOrdered?this.s.currentBatch&&this.s.batches.push(this.s.currentBatch):(this.s.currentInsertBatch&&this.s.batches.push(this.s.currentInsertBatch),this.s.currentUpdateBatch&&this.s.batches.push(this.s.currentUpdateBatch),this.s.currentRemoveBatch&&this.s.batches.push(this.s.currentRemoveBatch)),this.s.batches.length===0)throw new h.MongoInvalidArgumentError("Invalid BulkOperation, Batch cannot be empty");this.s.executed=!0;let v={...this.s.options,...M},w=new N(this,v);return await(0,l.executeOperation)(this.s.collection.client,w)}handleWriteError(M,S){if(this.s.bulkResult.writeErrors.length>0){let w=this.s.bulkResult.writeErrors[0].errmsg?this.s.bulkResult.writeErrors[0].errmsg:"write operation failed";return M(new g({message:w,code:this.s.bulkResult.writeErrors[0].code,writeErrors:this.s.bulkResult.writeErrors},S)),!0}let v=S.getWriteConcernError();return v?(M(new g(v,S)),!0):!1}shouldForceServerObjectId(){return this.s.options.forceServerObjectId===!0||this.s.collection.s.db.options?.forceServerObjectId===!0}};e.BulkOperationBase=_,Object.defineProperty(_.prototype,"length",{enumerable:!0,get(){return this.s.currentIndex}});function R(M){return M.batchType===e.BatchType.INSERT}function j(M){return M.batchType===e.BatchType.UPDATE}function L(M){return M.batchType===e.BatchType.DELETE}function I(M){let{currentOp:S}=M.s;return M.s.currentOp=void 0,S||(S={}),S}}),en=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OrderedBulkOperation=void 0;var u=Ue(),d=pe(),h=Ur(),a=class extends h.BulkOperationBase{constructor(l,i){super(l,i,!0)}addToOperationsList(l,i){let p=u.calculateObjectSize(i,{checkKeys:!1,ignoreUndefined:!1});if(p>=this.s.maxBsonObjectSize)throw new d.MongoInvalidArgumentError(`Document is larger than the maximum size ${this.s.maxBsonObjectSize}`);this.s.currentBatch==null&&(this.s.currentBatch=new h.Batch(l,this.s.currentIndex));let A=this.s.maxKeySize;if((this.s.currentBatchSize+1>=this.s.maxWriteBatchSize||this.s.currentBatchSize>0&&this.s.currentBatchSizeBytes+A+p>=this.s.maxBatchSizeBytes||this.s.currentBatch.batchType!==l)&&(this.s.batches.push(this.s.currentBatch),this.s.currentBatch=new h.Batch(l,this.s.currentIndex),this.s.currentBatchSize=0,this.s.currentBatchSizeBytes=0),l===h.BatchType.INSERT&&this.s.bulkResult.insertedIds.push({index:this.s.currentIndex,_id:i._id}),Array.isArray(i))throw new d.MongoInvalidArgumentError("Operation passed in cannot be an Array");return this.s.currentBatch.originalIndexes.push(this.s.currentIndex),this.s.currentBatch.operations.push(i),this.s.currentBatchSize+=1,this.s.currentBatchSizeBytes+=A+p,this.s.currentIndex+=1,this}};e.OrderedBulkOperation=a}),tn=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnorderedBulkOperation=void 0;var u=Ue(),d=pe(),h=Ur(),a=class extends h.BulkOperationBase{constructor(l,i){super(l,i,!1)}handleWriteError(l,i){return this.s.batches.length?!1:super.handleWriteError(l,i)}addToOperationsList(l,i){let p=u.calculateObjectSize(i,{checkKeys:!1,ignoreUndefined:!1});if(p>=this.s.maxBsonObjectSize)throw new d.MongoInvalidArgumentError(`Document is larger than the maximum size ${this.s.maxBsonObjectSize}`);this.s.currentBatch=void 0,l===h.BatchType.INSERT?this.s.currentBatch=this.s.currentInsertBatch:l===h.BatchType.UPDATE?this.s.currentBatch=this.s.currentUpdateBatch:l===h.BatchType.DELETE&&(this.s.currentBatch=this.s.currentRemoveBatch);let A=this.s.maxKeySize;if(this.s.currentBatch==null&&(this.s.currentBatch=new h.Batch(l,this.s.currentIndex)),(this.s.currentBatch.size+1>=this.s.maxWriteBatchSize||this.s.currentBatch.size>0&&this.s.currentBatch.sizeBytes+A+p>=this.s.maxBatchSizeBytes||this.s.currentBatch.batchType!==l)&&(this.s.batches.push(this.s.currentBatch),this.s.currentBatch=new h.Batch(l,this.s.currentIndex)),Array.isArray(i))throw new d.MongoInvalidArgumentError("Operation passed in cannot be an Array");return this.s.currentBatch.operations.push(i),this.s.currentBatch.originalIndexes.push(this.s.currentIndex),this.s.currentIndex=this.s.currentIndex+1,l===h.BatchType.INSERT?(this.s.currentInsertBatch=this.s.currentBatch,this.s.bulkResult.insertedIds.push({index:this.s.bulkResult.insertedIds.length,_id:i._id})):l===h.BatchType.UPDATE?this.s.currentUpdateBatch=this.s.currentBatch:l===h.BatchType.DELETE&&(this.s.currentRemoveBatch=this.s.currentBatch),this.s.currentBatch.size+=1,this.s.currentBatch.sizeBytes+=A+p,this}};e.UnorderedBulkOperation=a}),rn=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AggregateOperation=e.DB_AGGREGATE_COLLECTION=void 0;var u=Tt(),d=pe(),h=ye(),a=at(),l=Ze(),i=je();e.DB_AGGREGATE_COLLECTION=1;var p=8,A=class extends l.CommandOperation{constructor(o,n,r){if(super(void 0,{...r,dbName:o.db}),this.options={...r},this.target=o.collection||e.DB_AGGREGATE_COLLECTION,this.pipeline=n,this.hasWriteStage=!1,typeof r?.out=="string")this.pipeline=this.pipeline.concat({$out:r.out}),this.hasWriteStage=!0;else if(n.length>0){let E=n[n.length-1];(E.$out||E.$merge)&&(this.hasWriteStage=!0)}if(this.hasWriteStage?this.trySecondaryWrite=!0:delete this.options.writeConcern,this.explain&&this.writeConcern)throw new d.MongoInvalidArgumentError('Option "explain" cannot be used on an aggregate call with writeConcern');if(r?.cursor!=null&&typeof r.cursor!="object")throw new d.MongoInvalidArgumentError("Cursor options must be an object")}get commandName(){return"aggregate"}get canRetryRead(){return!this.hasWriteStage}addToPipeline(o){this.pipeline.push(o)}async execute(o,n){let r=this.options,E=(0,h.maxWireVersion)(o),m={aggregate:this.target,pipeline:this.pipeline};return this.hasWriteStage&&E<p&&(this.readConcern=void 0),this.hasWriteStage&&this.writeConcern&&a.WriteConcern.apply(m,this.writeConcern),r.bypassDocumentValidation===!0&&(m.bypassDocumentValidation=r.bypassDocumentValidation),typeof r.allowDiskUse=="boolean"&&(m.allowDiskUse=r.allowDiskUse),r.hint&&(m.hint=r.hint),r.let&&(m.let=r.let),r.comment!==void 0&&(m.comment=r.comment),m.cursor=r.cursor||{},r.batchSize&&!this.hasWriteStage&&(m.cursor.batchSize=r.batchSize),await super.executeCommand(o,n,m,this.explain?u.ExplainedCursorResponse:u.CursorResponse)}};e.AggregateOperation=A,(0,i.defineAspects)(A,[i.Aspect.READ_OPERATION,i.Aspect.RETRYABLE,i.Aspect.EXPLAINABLE,i.Aspect.CURSOR_CREATING])}),Qt=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MongoLogger=e.defaultLogTransform=e.stringifyWithMaxLen=e.createStdioLogger=e.parseSeverityFromString=e.MongoLoggableComponent=e.SEVERITY_LEVEL_MAP=e.DEFAULT_MAX_DOCUMENT_LENGTH=e.SeverityLevel=void 0;var u=ve("util"),d=Ue(),h=Xe(),a=ye();e.SeverityLevel=Object.freeze({EMERGENCY:"emergency",ALERT:"alert",CRITICAL:"critical",ERROR:"error",WARNING:"warn",NOTICE:"notice",INFORMATIONAL:"info",DEBUG:"debug",TRACE:"trace",OFF:"off"}),e.DEFAULT_MAX_DOCUMENT_LENGTH=1e3;var l=class extends Map{constructor(g){let T=[];for(let[D,N]of g)T.push([N,D]);T.push(...g),super(T)}getNumericSeverityLevel(g){return this.get(g)}getSeverityLevelName(g){return this.get(g)}};e.SEVERITY_LEVEL_MAP=new l([[e.SeverityLevel.OFF,-1/0],[e.SeverityLevel.EMERGENCY,0],[e.SeverityLevel.ALERT,1],[e.SeverityLevel.CRITICAL,2],[e.SeverityLevel.ERROR,3],[e.SeverityLevel.WARNING,4],[e.SeverityLevel.NOTICE,5],[e.SeverityLevel.INFORMATIONAL,6],[e.SeverityLevel.DEBUG,7],[e.SeverityLevel.TRACE,8]]),e.MongoLoggableComponent=Object.freeze({COMMAND:"command",TOPOLOGY:"topology",SERVER_SELECTION:"serverSelection",CONNECTION:"connection",CLIENT:"client"});function i(g){let T=Object.values(e.SeverityLevel),D=g?.toLowerCase();return D!=null&&T.includes(D)?D:null}e.parseSeverityFromString=i;function p(g){return{write:(0,u.promisify)((T,D)=>{let N=(0,u.inspect)(T,{compact:!0,breakLength:1/0});g.write(`${N}
|
|
8
|
-
`,"utf-8",D)})}}e.createStdioLogger=p;function A({MONGODB_LOG_PATH:g},{mongodbLogPath:T}){return typeof T=="string"&&/^stderr$/i.test(T)?{mongodbLogPath:p(process.stderr),mongodbLogPathIsStdErr:!0}:typeof T=="string"&&/^stdout$/i.test(T)?{mongodbLogPath:p(process.stdout),mongodbLogPathIsStdErr:!1}:typeof T=="object"&&typeof T?.write=="function"?{mongodbLogPath:T,mongodbLogPathIsStdErr:!1}:g&&/^stderr$/i.test(g)?{mongodbLogPath:p(process.stderr),mongodbLogPathIsStdErr:!0}:g&&/^stdout$/i.test(g)?{mongodbLogPath:p(process.stdout),mongodbLogPathIsStdErr:!1}:{mongodbLogPath:p(process.stderr),mongodbLogPathIsStdErr:!0}}function o(g,T,D){return i(g)??i(T)??D}function n(g,T){let D=e.SEVERITY_LEVEL_MAP.getNumericSeverityLevel(g),N=e.SEVERITY_LEVEL_MAP.getNumericSeverityLevel(T);return D<N?-1:D>N?1:0}function r(g,T,D={}){let N="";if(typeof g=="string")N=g;else if(typeof g=="function")N=g.name;else try{N=d.EJSON.stringify(g,D)}catch(_){N=`Extended JSON serialization failed with: ${_.message}`}return T!==0&&N.length>T&&N.charCodeAt(T-1)!==N.codePointAt(T-1)&&(T--,T===0)?"":T!==0&&N.length>T?`${N.slice(0,T)}...`:N}e.stringifyWithMaxLen=r;function E(g){let T=g;return T.toLog!==void 0&&typeof T.toLog=="function"}function m(g,T,D=e.DEFAULT_MAX_DOCUMENT_LENGTH){let{selector:N,operation:_,topologyDescription:R,message:j}=T;return g.selector=r(N,D),g.operation=_,g.topologyDescription=r(R,D),g.message=j,g}function c(g,T){g.commandName=T.commandName,g.requestId=T.requestId,g.driverConnectionId=T.connectionId;let{host:D,port:N}=a.HostAddress.fromString(T.address).toHostPort();return g.serverHost=D,g.serverPort=N,T?.serviceId&&(g.serviceId=T.serviceId.toHexString()),g.databaseName=T.databaseName,g.serverConnectionId=T.serverConnectionId,g}function b(g,T){let{host:D,port:N}=a.HostAddress.fromString(T.address).toHostPort();return g.serverHost=D,g.serverPort=N,g}function f(g,T){return g.topologyId=T.topologyId,g}function O(g,T){let{awaited:D,connectionId:N}=T;g.awaited=D,g.driverConnectionId=T.connectionId;let{host:_,port:R}=a.HostAddress.fromString(N).toHostPort();return g.serverHost=_,g.serverPort=R,g}function F(g,T=e.DEFAULT_MAX_DOCUMENT_LENGTH){let D=Object.create(null);switch(g.name){case h.SERVER_SELECTION_STARTED:return D=m(D,g,T),D;case h.SERVER_SELECTION_FAILED:return D=m(D,g,T),D.failure=g.failure?.message,D;case h.SERVER_SELECTION_SUCCEEDED:return D=m(D,g,T),D.serverHost=g.serverHost,D.serverPort=g.serverPort,D;case h.WAITING_FOR_SUITABLE_SERVER:return D=m(D,g,T),D.remainingTimeMS=g.remainingTimeMS,D;case h.COMMAND_STARTED:return D=c(D,g),D.message="Command started",D.command=r(g.command,T,{relaxed:!0}),D.databaseName=g.databaseName,D;case h.COMMAND_SUCCEEDED:return D=c(D,g),D.message="Command succeeded",D.durationMS=g.duration,D.reply=r(g.reply,T,{relaxed:!0}),D;case h.COMMAND_FAILED:return D=c(D,g),D.message="Command failed",D.durationMS=g.duration,D.failure=g.failure?.message??"(redacted)",D;case h.CONNECTION_POOL_CREATED:if(D=b(D,g),D.message="Connection pool created",g.options){let{maxIdleTimeMS:N,minPoolSize:_,maxPoolSize:R,maxConnecting:j,waitQueueTimeoutMS:L}=g.options;D={...D,maxIdleTimeMS:N,minPoolSize:_,maxPoolSize:R,maxConnecting:j,waitQueueTimeoutMS:L}}return D;case h.CONNECTION_POOL_READY:return D=b(D,g),D.message="Connection pool ready",D;case h.CONNECTION_POOL_CLEARED:return D=b(D,g),D.message="Connection pool cleared",g.serviceId?._bsontype==="ObjectId"&&(D.serviceId=g.serviceId?.toHexString()),D;case h.CONNECTION_POOL_CLOSED:return D=b(D,g),D.message="Connection pool closed",D;case h.CONNECTION_CREATED:return D=b(D,g),D.message="Connection created",D.driverConnectionId=g.connectionId,D;case h.CONNECTION_READY:return D=b(D,g),D.message="Connection ready",D.driverConnectionId=g.connectionId,D;case h.CONNECTION_CLOSED:switch(D=b(D,g),D.message="Connection closed",D.driverConnectionId=g.connectionId,g.reason){case"stale":D.reason="Connection became stale because the pool was cleared";break;case"idle":D.reason="Connection has been available but unused for longer than the configured max idle time";break;case"error":D.reason="An error occurred while using the connection",g.error&&(D.error=g.error);break;case"poolClosed":D.reason="Connection pool was closed";break;default:D.reason=`Unknown close reason: ${g.reason}`}return D;case h.CONNECTION_CHECK_OUT_STARTED:return D=b(D,g),D.message="Connection checkout started",D;case h.CONNECTION_CHECK_OUT_FAILED:switch(D=b(D,g),D.message="Connection checkout failed",g.reason){case"poolClosed":D.reason="Connection pool was closed";break;case"timeout":D.reason="Wait queue timeout elapsed without a connection becoming available";break;case"connectionError":D.reason="An error occurred while trying to establish a new connection",g.error&&(D.error=g.error);break;default:D.reason=`Unknown close reason: ${g.reason}`}return D;case h.CONNECTION_CHECKED_OUT:return D=b(D,g),D.message="Connection checked out",D.driverConnectionId=g.connectionId,D;case h.CONNECTION_CHECKED_IN:return D=b(D,g),D.message="Connection checked in",D.driverConnectionId=g.connectionId,D;case h.SERVER_OPENING:return D=f(D,g),D=b(D,g),D.message="Starting server monitoring",D;case h.SERVER_CLOSED:return D=f(D,g),D=b(D,g),D.message="Stopped server monitoring",D;case h.SERVER_HEARTBEAT_STARTED:return D=f(D,g),D=O(D,g),D.message="Server heartbeat started",D;case h.SERVER_HEARTBEAT_SUCCEEDED:return D=f(D,g),D=O(D,g),D.message="Server heartbeat succeeded",D.durationMS=g.duration,D.serverConnectionId=g.serverConnectionId,D.reply=r(g.reply,T,{relaxed:!0}),D;case h.SERVER_HEARTBEAT_FAILED:return D=f(D,g),D=O(D,g),D.message="Server heartbeat failed",D.durationMS=g.duration,D.failure=g.failure?.message,D;case h.TOPOLOGY_OPENING:return D=f(D,g),D.message="Starting topology monitoring",D;case h.TOPOLOGY_CLOSED:return D=f(D,g),D.message="Stopped topology monitoring",D;case h.TOPOLOGY_DESCRIPTION_CHANGED:return D=f(D,g),D.message="Topology description changed",D.previousDescription=D.reply=r(g.previousDescription,T),D.newDescription=D.reply=r(g.newDescription,T),D;default:for(let[N,_]of Object.entries(g))_!=null&&(D[N]=_)}return D}e.defaultLogTransform=F;var y=class{constructor(g){this.pendingLog=null,this.error=this.log.bind(this,"error"),this.warn=this.log.bind(this,"warn"),this.info=this.log.bind(this,"info"),this.debug=this.log.bind(this,"debug"),this.trace=this.log.bind(this,"trace"),this.componentSeverities=g.componentSeverities,this.maxDocumentLength=g.maxDocumentLength,this.logDestination=g.logDestination,this.logDestinationIsStdErr=g.logDestinationIsStdErr,this.severities=this.createLoggingSeverities()}createLoggingSeverities(){let g=Object();for(let T of Object.values(e.MongoLoggableComponent)){g[T]={};for(let D of Object.values(e.SeverityLevel))g[T][D]=n(D,this.componentSeverities[T])<=0}return g}turnOffSeverities(){for(let g of Object.values(e.MongoLoggableComponent)){this.componentSeverities[g]=e.SeverityLevel.OFF;for(let T of Object.values(e.SeverityLevel))this.severities[g][T]=!1}}logWriteFailureHandler(g){if(this.logDestinationIsStdErr){this.turnOffSeverities(),this.clearPendingLog();return}this.logDestination=p(process.stderr),this.logDestinationIsStdErr=!0,this.clearPendingLog(),this.error(e.MongoLoggableComponent.CLIENT,{toLog:function(){return{message:"User input for mongodbLogPath is now invalid. Logging is halted.",error:g.message}}}),this.turnOffSeverities(),this.clearPendingLog()}clearPendingLog(){this.pendingLog=null}willLog(g,T){return T===e.SeverityLevel.OFF?!1:this.severities[g][T]}log(g,T,D){if(!this.willLog(T,g))return;let N={t:new Date,c:T,s:g};if(typeof D=="string"?N.message=D:typeof D=="object"&&(E(D)?N={...N,...D.toLog()}:N={...N,...F(D,this.maxDocumentLength)}),(0,a.isPromiseLike)(this.pendingLog)){this.pendingLog=this.pendingLog.then(()=>this.logDestination.write(N)).then(this.clearPendingLog.bind(this),this.logWriteFailureHandler.bind(this));return}try{let _=this.logDestination.write(N);(0,a.isPromiseLike)(_)&&(this.pendingLog=_.then(this.clearPendingLog.bind(this),this.logWriteFailureHandler.bind(this)))}catch(_){this.logWriteFailureHandler(_)}}static resolveOptions(g,T){let D=A(g,T),N={...g,...T,mongodbLogPath:D.mongodbLogPath,mongodbLogPathIsStdErr:D.mongodbLogPathIsStdErr},_=o(N.mongodbLogComponentSeverities?.default,N.MONGODB_LOG_ALL,e.SeverityLevel.OFF);return{componentSeverities:{command:o(N.mongodbLogComponentSeverities?.command,N.MONGODB_LOG_COMMAND,_),topology:o(N.mongodbLogComponentSeverities?.topology,N.MONGODB_LOG_TOPOLOGY,_),serverSelection:o(N.mongodbLogComponentSeverities?.serverSelection,N.MONGODB_LOG_SERVER_SELECTION,_),connection:o(N.mongodbLogComponentSeverities?.connection,N.MONGODB_LOG_CONNECTION,_),client:o(N.mongodbLogComponentSeverities?.client,N.MONGODB_LOG_CLIENT,_),default:_},maxDocumentLength:N.mongodbLogMaxDocumentLength??(0,a.parseUnsignedInteger)(N.MONGODB_LOG_MAX_DOCUMENT_LENGTH)??1e3,logDestination:N.mongodbLogPath,logDestinationIsStdErr:N.mongodbLogPathIsStdErr}}};e.MongoLogger=y}),Et=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationToken=e.TypedEventEmitter=void 0;var u=ve("events"),d=Qt(),h=class extends u.EventEmitter{emitAndLog(l,...i){this.emit(l,...i),this.component&&this.mongoLogger?.debug(this.component,i[0])}emitAndLogHeartbeat(l,i,p,...A){if(this.emit(l,...A),this.component){let o={topologyId:i,serverConnectionId:p??null,...A[0]};this.mongoLogger?.debug(this.component,o)}}emitAndLogCommand(l,i,p,A,...o){if(l&&this.emit(i,...o),A){let n={databaseName:p,...o[0]};this.mongoLogger?.debug(d.MongoLoggableComponent.COMMAND,n)}}};e.TypedEventEmitter=h;var a=class extends h{};e.CancellationToken=a}),un=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GetMoreOperation=void 0;var u=Tt(),d=pe(),h=ye(),a=je(),l=class extends a.AbstractOperation{constructor(i,p,A,o){super(o),this.options=o,this.ns=i,this.cursorId=p,this.server=A}get commandName(){return"getMore"}async execute(i,p){if(i!==this.server)throw new d.MongoRuntimeError("Getmore must run on the same server operation began on");if(this.cursorId==null||this.cursorId.isZero())throw new d.MongoRuntimeError("Unable to iterate cursor with no id");let A=this.ns.collection;if(A==null)throw new d.MongoRuntimeError("A collection name must be determined before getMore");let o={getMore:this.cursorId,collection:A};typeof this.options.batchSize=="number"&&(o.batchSize=Math.abs(this.options.batchSize)),typeof this.options.maxAwaitTimeMS=="number"&&(o.maxTimeMS=this.options.maxAwaitTimeMS),this.options.comment!==void 0&&(0,h.maxWireVersion)(i)>=9&&(o.comment=this.options.comment);let n={returnFieldSelector:null,documentsReturnedIn:"nextBatch",...this.options};return await i.command(this.ns,o,n,u.CursorResponse)}};e.GetMoreOperation=l,(0,a.defineAspects)(l,[a.Aspect.READ_OPERATION,a.Aspect.MUST_SELECT_SAME_SERVER])}),ti=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.KillCursorsOperation=void 0;var u=pe(),d=ye(),h=je(),a=class extends h.AbstractOperation{constructor(l,i,p,A){super(A),this.ns=i,this.cursorId=l,this.server=p}get commandName(){return"killCursors"}async execute(l,i){if(l!==this.server)throw new u.MongoRuntimeError("Killcursor must run on the same server operation began on");let p=this.ns.collection;if(p==null)throw new u.MongoRuntimeError("A collection name must be determined before killCursors");let A={killCursors:p,cursors:[this.cursorId]};try{await l.command(this.ns,A,{session:i})}catch(o){(0,d.squashError)(o)}}};e.KillCursorsOperation=a,(0,h.defineAspects)(a,[h.Aspect.MUST_SELECT_SAME_SERVER])}),nn=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConnectionPoolMetrics=void 0;var u=class hr{constructor(){this.txnConnections=0,this.cursorConnections=0,this.otherConnections=0}markPinned(h){h===hr.TXN?this.txnConnections+=1:h===hr.CURSOR?this.cursorConnections+=1:this.otherConnections+=1}markUnpinned(h){h===hr.TXN?this.txnConnections-=1:h===hr.CURSOR?this.cursorConnections-=1:this.otherConnections-=1}info(h){return`Timed out while checking out a connection from connection pool: maxPoolSize: ${h}, connections in use by cursors: ${this.cursorConnections}, connections in use by transactions: ${this.txnConnections}, connections in use by other operations: ${this.otherConnections}`}reset(){this.txnConnections=0,this.cursorConnections=0,this.otherConnections=0}};u.TXN="txn",u.CURSOR="cursor",u.OTHER="other",e.ConnectionPoolMetrics=u}),zr=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compareTopologyVersion=e.parseServerType=e.ServerDescription=void 0;var u=Ue(),d=pe(),h=ye(),a=pt(),l=new Set([a.ServerType.RSPrimary,a.ServerType.Standalone,a.ServerType.Mongos,a.ServerType.LoadBalancer]),i=new Set([a.ServerType.RSPrimary,a.ServerType.RSSecondary,a.ServerType.Mongos,a.ServerType.Standalone,a.ServerType.LoadBalancer]),p=class{constructor(r,E,m={}){if(r==null||r==="")throw new d.MongoRuntimeError("ServerDescription must be provided with a non-empty address");this.address=typeof r=="string"?h.HostAddress.fromString(r).toString():r.toString(),this.type=A(E,m),this.hosts=E?.hosts?.map(c=>c.toLowerCase())??[],this.passives=E?.passives?.map(c=>c.toLowerCase())??[],this.arbiters=E?.arbiters?.map(c=>c.toLowerCase())??[],this.tags=E?.tags??{},this.minWireVersion=E?.minWireVersion??0,this.maxWireVersion=E?.maxWireVersion??0,this.roundTripTime=m?.roundTripTime??-1,this.minRoundTripTime=m?.minRoundTripTime??0,this.lastUpdateTime=(0,h.now)(),this.lastWriteDate=E?.lastWrite?.lastWriteDate??0,this.error=m.error??null,this.topologyVersion=this.error?.topologyVersion??E?.topologyVersion??null,this.setName=E?.setName??null,this.setVersion=E?.setVersion??null,this.electionId=E?.electionId??null,this.logicalSessionTimeoutMinutes=E?.logicalSessionTimeoutMinutes??null,this.primary=E?.primary??null,this.me=E?.me?.toLowerCase()??null,this.$clusterTime=E?.$clusterTime??null}get hostAddress(){return h.HostAddress.fromString(this.address)}get allHosts(){return this.hosts.concat(this.arbiters).concat(this.passives)}get isReadable(){return this.type===a.ServerType.RSSecondary||this.isWritable}get isDataBearing(){return i.has(this.type)}get isWritable(){return l.has(this.type)}get host(){let r=`:${this.port}`.length;return this.address.slice(0,-r)}get port(){let r=this.address.split(":").pop();return r?Number.parseInt(r,10):27017}equals(r){let E=this.topologyVersion===r?.topologyVersion||n(this.topologyVersion,r?.topologyVersion)===0,m=this.electionId!=null&&r?.electionId!=null?(0,h.compareObjectId)(this.electionId,r.electionId)===0:this.electionId===r?.electionId;return r!=null&&(0,h.errorStrictEqual)(this.error,r.error)&&this.type===r.type&&this.minWireVersion===r.minWireVersion&&(0,h.arrayStrictEqual)(this.hosts,r.hosts)&&o(this.tags,r.tags)&&this.setName===r.setName&&this.setVersion===r.setVersion&&m&&this.primary===r.primary&&this.logicalSessionTimeoutMinutes===r.logicalSessionTimeoutMinutes&&E}};e.ServerDescription=p;function A(r,E){return E?.loadBalanced?a.ServerType.LoadBalancer:!r||!r.ok?a.ServerType.Unknown:r.isreplicaset?a.ServerType.RSGhost:r.msg&&r.msg==="isdbgrid"?a.ServerType.Mongos:r.setName?r.hidden?a.ServerType.RSOther:r.isWritablePrimary?a.ServerType.RSPrimary:r.secondary?a.ServerType.RSSecondary:r.arbiterOnly?a.ServerType.RSArbiter:a.ServerType.RSOther:a.ServerType.Standalone}e.parseServerType=A;function o(r,E){let m=Object.keys(r),c=Object.keys(E);return m.length===c.length&&m.every(b=>E[b]===r[b])}function n(r,E){if(r==null||E==null||!r.processId.equals(E.processId))return-1;let m=typeof r.counter=="bigint"?u.Long.fromBigInt(r.counter):u.Long.isLong(r.counter)?r.counter:u.Long.fromNumber(r.counter),c=typeof E.counter=="bigint"?u.Long.fromBigInt(E.counter):u.Long.isLong(E.counter)?E.counter:u.Long.fromNumber(E.counter);return m.compare(c)}e.compareTopologyVersion=n}),on=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TopologyDescription=void 0;var u=Ue(),d=Zt(),h=pe(),a=ye(),l=pt(),i=zr(),p=d.MIN_SUPPORTED_SERVER_VERSION,A=d.MAX_SUPPORTED_SERVER_VERSION,o=d.MIN_SUPPORTED_WIRE_VERSION,n=d.MAX_SUPPORTED_WIRE_VERSION,r=new Set([l.ServerType.Mongos,l.ServerType.Unknown]),E=new Set([l.ServerType.Mongos,l.ServerType.Standalone]),m=new Set([l.ServerType.RSSecondary,l.ServerType.RSArbiter,l.ServerType.RSOther]),c=class Ir{constructor(T,D=null,N=null,_=null,R=null,j=null,L=null){L=L??{},this.type=T??l.TopologyType.Unknown,this.servers=D??new Map,this.stale=!1,this.compatible=!0,this.heartbeatFrequencyMS=L.heartbeatFrequencyMS??0,this.localThresholdMS=L.localThresholdMS??15,this.setName=N??null,this.maxElectionId=R??null,this.maxSetVersion=_??null,this.commonWireVersion=j??0;for(let I of this.servers.values())if(!(I.type===l.ServerType.Unknown||I.type===l.ServerType.LoadBalancer)&&(I.minWireVersion>n&&(this.compatible=!1,this.compatibilityError=`Server at ${I.address} requires wire version ${I.minWireVersion}, but this version of the driver only supports up to ${n} (MongoDB ${A})`),I.maxWireVersion<o)){this.compatible=!1,this.compatibilityError=`Server at ${I.address} reports wire version ${I.maxWireVersion}, but this version of the driver requires at least ${o} (MongoDB ${p}).`;break}this.logicalSessionTimeoutMinutes=null;for(let[,I]of this.servers)if(I.isReadable){if(I.logicalSessionTimeoutMinutes==null){this.logicalSessionTimeoutMinutes=null;break}if(this.logicalSessionTimeoutMinutes==null){this.logicalSessionTimeoutMinutes=I.logicalSessionTimeoutMinutes;continue}this.logicalSessionTimeoutMinutes=Math.min(this.logicalSessionTimeoutMinutes,I.logicalSessionTimeoutMinutes)}}updateFromSrvPollingEvent(T,D=0){let N=T.hostnames(),_=new Set(this.servers.keys()),R=new Set(N),j=new Set;for(let I of _)R.delete(I),N.has(I)||j.add(I);if(R.size===0&&j.size===0)return this;let L=new Map(this.servers);for(let I of j)L.delete(I);if(R.size>0){if(D===0)for(let I of R)L.set(I,new i.ServerDescription(I));else if(L.size<D){let I=(0,a.shuffle)(R,D-L.size);for(let M of I)L.set(M,new i.ServerDescription(M))}}return new Ir(this.type,L,this.setName,this.maxSetVersion,this.maxElectionId,this.commonWireVersion,{heartbeatFrequencyMS:this.heartbeatFrequencyMS,localThresholdMS:this.localThresholdMS})}update(T){let D=T.address,{type:N,setName:_,maxSetVersion:R,maxElectionId:j,commonWireVersion:L}=this,I=T.type,M=new Map(this.servers);if(T.maxWireVersion!==0&&(L==null?L=T.maxWireVersion:L=Math.min(L,T.maxWireVersion)),typeof T.setName=="string"&&typeof _=="string"&&T.setName!==_&&(N===l.TopologyType.Single?T=new i.ServerDescription(D):M.delete(D)),M.set(D,T),N===l.TopologyType.Single)return new Ir(l.TopologyType.Single,M,_,R,j,L,{heartbeatFrequencyMS:this.heartbeatFrequencyMS,localThresholdMS:this.localThresholdMS});if(N===l.TopologyType.Unknown&&(I===l.ServerType.Standalone&&this.servers.size!==1?M.delete(D):N=b(I)),N===l.TopologyType.Sharded&&(r.has(I)||M.delete(D)),N===l.TopologyType.ReplicaSetNoPrimary){if(E.has(I)&&M.delete(D),I===l.ServerType.RSPrimary){let S=f(M,T,_,R,j);N=S[0],_=S[1],R=S[2],j=S[3]}else if(m.has(I)){let S=F(M,T,_);N=S[0],_=S[1]}}if(N===l.TopologyType.ReplicaSetWithPrimary)if(E.has(I))M.delete(D),N=y(M);else if(I===l.ServerType.RSPrimary){let S=f(M,T,_,R,j);N=S[0],_=S[1],R=S[2],j=S[3]}else m.has(I)?N=O(M,T,_):N=y(M);return new Ir(N,M,_,R,j,L,{heartbeatFrequencyMS:this.heartbeatFrequencyMS,localThresholdMS:this.localThresholdMS})}get error(){let T=Array.from(this.servers.values()).filter(D=>D.error);return T.length>0?T[0].error:null}get hasKnownServers(){return Array.from(this.servers.values()).some(T=>T.type!==l.ServerType.Unknown)}get hasDataBearingServers(){return Array.from(this.servers.values()).some(T=>T.isDataBearing)}hasServer(T){return this.servers.has(T)}toJSON(){return u.EJSON.serialize(this)}};e.TopologyDescription=c;function b(g){switch(g){case l.ServerType.Standalone:return l.TopologyType.Single;case l.ServerType.Mongos:return l.TopologyType.Sharded;case l.ServerType.RSPrimary:return l.TopologyType.ReplicaSetWithPrimary;case l.ServerType.RSOther:case l.ServerType.RSSecondary:return l.TopologyType.ReplicaSetNoPrimary;default:return l.TopologyType.Unknown}}function f(g,T,D=null,N=null,_=null){if(D=D||T.setName,D!==T.setName)return g.delete(T.address),[y(g),D,N,_];if(T.maxWireVersion>=17){let L=(0,a.compareObjectId)(_,T.electionId),I=L===0,M=L===-1,S=(N??-1)<=(T.setVersion??-1);if(M||I&&S)_=T.electionId,N=T.setVersion;else return g.set(T.address,new i.ServerDescription(T.address)),[y(g),D,N,_]}else{let L=T.electionId?T.electionId:null;if(T.setVersion&&L){if(N&&_&&(N>T.setVersion||(0,a.compareObjectId)(_,L)>0))return g.set(T.address,new i.ServerDescription(T.address)),[y(g),D,N,_];_=T.electionId}T.setVersion!=null&&(N==null||T.setVersion>N)&&(N=T.setVersion)}for(let[L,I]of g)if(I.type===l.ServerType.RSPrimary&&I.address!==T.address){g.set(L,new i.ServerDescription(I.address));break}T.allHosts.forEach(L=>{g.has(L)||g.set(L,new i.ServerDescription(L))});let R=Array.from(g.keys()),j=T.allHosts;return R.filter(L=>j.indexOf(L)===-1).forEach(L=>{g.delete(L)}),[y(g),D,N,_]}function O(g,T,D=null){if(D==null)throw new h.MongoRuntimeError('Argument "setName" is required if connected to a replica set');return(D!==T.setName||T.me&&T.address!==T.me)&&g.delete(T.address),y(g)}function F(g,T,D=null){let N=l.TopologyType.ReplicaSetNoPrimary;return D=D??T.setName,D!==T.setName?(g.delete(T.address),[N,D]):(T.allHosts.forEach(_=>{g.has(_)||g.set(_,new i.ServerDescription(_))}),T.me&&T.address!==T.me&&g.delete(T.address),[N,D])}function y(g){for(let T of g.values())if(T.type===l.ServerType.RSPrimary)return l.TopologyType.ReplicaSetWithPrimary;return l.TopologyType.ReplicaSetNoPrimary}}),sn=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isSharded=e.getReadPreference=void 0;var u=pe(),d=rt(),h=pt(),a=on();function l(p){let A=p?.readPreference??d.ReadPreference.primary;if(typeof A=="string"&&(A=d.ReadPreference.fromString(A)),!(A instanceof d.ReadPreference))throw new u.MongoInvalidArgumentError('Option "readPreference" must be a ReadPreference instance');return A}e.getReadPreference=l;function i(p){return p==null?!1:p.description&&p.description.type===h.ServerType.Mongos?!0:p.description&&p.description instanceof a.TopologyDescription?Array.from(p.description.servers.values()).some(A=>A.type===h.ServerType.Mongos):!1}e.isSharded=i}),an=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isTransactionCommand=e.Transaction=e.TxnState=void 0;var u=pe(),d=yt(),h=rt(),a=at();e.TxnState=Object.freeze({NO_TRANSACTION:"NO_TRANSACTION",STARTING_TRANSACTION:"STARTING_TRANSACTION",TRANSACTION_IN_PROGRESS:"TRANSACTION_IN_PROGRESS",TRANSACTION_COMMITTED:"TRANSACTION_COMMITTED",TRANSACTION_COMMITTED_EMPTY:"TRANSACTION_COMMITTED_EMPTY",TRANSACTION_ABORTED:"TRANSACTION_ABORTED"});var l={[e.TxnState.NO_TRANSACTION]:[e.TxnState.NO_TRANSACTION,e.TxnState.STARTING_TRANSACTION],[e.TxnState.STARTING_TRANSACTION]:[e.TxnState.TRANSACTION_IN_PROGRESS,e.TxnState.TRANSACTION_COMMITTED,e.TxnState.TRANSACTION_COMMITTED_EMPTY,e.TxnState.TRANSACTION_ABORTED],[e.TxnState.TRANSACTION_IN_PROGRESS]:[e.TxnState.TRANSACTION_IN_PROGRESS,e.TxnState.TRANSACTION_COMMITTED,e.TxnState.TRANSACTION_ABORTED],[e.TxnState.TRANSACTION_COMMITTED]:[e.TxnState.TRANSACTION_COMMITTED,e.TxnState.TRANSACTION_COMMITTED_EMPTY,e.TxnState.STARTING_TRANSACTION,e.TxnState.NO_TRANSACTION],[e.TxnState.TRANSACTION_ABORTED]:[e.TxnState.STARTING_TRANSACTION,e.TxnState.NO_TRANSACTION],[e.TxnState.TRANSACTION_COMMITTED_EMPTY]:[e.TxnState.TRANSACTION_COMMITTED_EMPTY,e.TxnState.NO_TRANSACTION]},i=new Set([e.TxnState.STARTING_TRANSACTION,e.TxnState.TRANSACTION_IN_PROGRESS]),p=new Set([e.TxnState.TRANSACTION_COMMITTED,e.TxnState.TRANSACTION_COMMITTED_EMPTY,e.TxnState.TRANSACTION_ABORTED]),A=class{constructor(n){n=n??{},this.state=e.TxnState.NO_TRANSACTION,this.options={};let r=a.WriteConcern.fromOptions(n);if(r){if(r.w===0)throw new u.MongoTransactionError("Transactions do not support unacknowledged write concern");this.options.writeConcern=r}n.readConcern&&(this.options.readConcern=d.ReadConcern.fromOptions(n)),n.readPreference&&(this.options.readPreference=h.ReadPreference.fromOptions(n)),n.maxCommitTimeMS&&(this.options.maxTimeMS=n.maxCommitTimeMS),this._pinnedServer=void 0,this._recoveryToken=void 0}get server(){return this._pinnedServer}get recoveryToken(){return this._recoveryToken}get isPinned(){return!!this.server}get isStarting(){return this.state===e.TxnState.STARTING_TRANSACTION}get isActive(){return i.has(this.state)}get isCommitted(){return p.has(this.state)}transition(n){let r=l[this.state];if(r&&r.includes(n)){this.state=n,(this.state===e.TxnState.NO_TRANSACTION||this.state===e.TxnState.STARTING_TRANSACTION||this.state===e.TxnState.TRANSACTION_ABORTED)&&this.unpinServer();return}throw new u.MongoRuntimeError(`Attempted illegal state transition from [${this.state}] to [${n}]`)}pinServer(n){this.isActive&&(this._pinnedServer=n)}unpinServer(){this._pinnedServer=void 0}};e.Transaction=A;function o(n){return!!(n.commitTransaction||n.abortTransaction)}e.isTransactionCommand=o}),Vr=J(e=>{"use strict";var u;Object.defineProperty(e,"__esModule",{value:!0}),e.updateSessionFromResponse=e.applySession=e.ServerSessionPool=e.ServerSession=e.maybeClearPinnedConnection=e.ClientSession=void 0;var d=Ue(),h=nn(),a=sn(),l=Xe(),i=pe(),p=Et(),A=lt(),o=mr(),n=yt(),r=rt(),E=pt(),m=an(),c=ye(),b=at(),f=8,O=Symbol("serverSession"),F=Symbol("snapshotTime"),y=Symbol("snapshotEnabled"),g=Symbol("pinnedConnection"),T=Symbol("txnNumberIncrement"),D=class ln extends p.TypedEventEmitter{constructor(G,Q,oe,Ee){if(super(),this[u]=!1,G==null)throw new i.MongoRuntimeError("ClientSession requires a MongoClient");if(Q==null||!(Q instanceof de))throw new i.MongoRuntimeError("ClientSession requires a ServerSessionPool");if(oe=oe??{},oe.snapshot===!0&&(this[y]=!0,oe.causalConsistency===!0))throw new i.MongoInvalidArgumentError('Properties "causalConsistency" and "snapshot" are mutually exclusive');this.client=G,this.sessionPool=Q,this.hasEnded=!1,this.clientOptions=Ee,this.timeoutMS=oe.defaultTimeoutMS??G.s.options?.timeoutMS,this.explicit=!!oe.explicit,this[O]=this.explicit?this.sessionPool.acquire():null,this[T]=0;let De=this.explicit&&oe.snapshot!==!0;this.supports={causalConsistency:oe.causalConsistency??De},this.clusterTime=oe.initialClusterTime,this.operationTime=void 0,this.owner=oe.owner,this.defaultTransactionOptions={...oe.defaultTransactionOptions},this.transaction=new m.Transaction}get id(){return this[O]?.id}get serverSession(){let G=this[O];if(G==null){if(this.explicit)throw new i.MongoRuntimeError("Unexpected null serverSession for an explicit session");if(this.hasEnded)throw new i.MongoRuntimeError("Unexpected null serverSession for an ended implicit session");G=this.sessionPool.acquire(),this[O]=G}return G}get snapshotEnabled(){return this[y]}get loadBalanced(){return this.client.topology?.description.type===E.TopologyType.LoadBalanced}get pinnedConnection(){return this[g]}pin(G){if(this[g])throw TypeError("Cannot pin multiple connections to the same session");this[g]=G,G.emit(l.PINNED,this.inTransaction()?h.ConnectionPoolMetrics.TXN:h.ConnectionPoolMetrics.CURSOR)}unpin(G){if(this.loadBalanced)return L(this,G);this.transaction.unpinServer()}get isPinned(){return this.loadBalanced?!!this[g]:this.transaction.isPinned}async endSession(G){try{if(this.inTransaction()&&await this.abortTransaction(),!this.hasEnded){let Q=this[O];Q!=null&&(this.sessionPool.release(Q),Object.defineProperty(this,O,{value:X.clone(Q),writable:!1})),this.hasEnded=!0,this.emit("ended",this)}}catch(Q){(0,c.squashError)(Q)}finally{L(this,{force:!0,...G})}}advanceOperationTime(G){if(this.operationTime==null){this.operationTime=G;return}G.greaterThan(this.operationTime)&&(this.operationTime=G)}advanceClusterTime(G){if(!G||typeof G!="object")throw new i.MongoInvalidArgumentError("input cluster time must be an object");if(!G.clusterTime||G.clusterTime._bsontype!=="Timestamp")throw new i.MongoInvalidArgumentError('input cluster time "clusterTime" property must be a valid BSON Timestamp');if(!G.signature||G.signature.hash?._bsontype!=="Binary"||typeof G.signature.keyId!="bigint"&&typeof G.signature.keyId!="number"&&G.signature.keyId?._bsontype!=="Long")throw new i.MongoInvalidArgumentError('input cluster time must have a valid "signature" property with BSON Binary hash and BSON Long keyId');(0,E._advanceClusterTime)(this,G)}equals(G){return!(G instanceof ln)||this.id==null||G.id==null?!1:c.ByteUtils.equals(this.id.id.buffer,G.id.id.buffer)}incrementTransactionNumber(){this[T]+=1}inTransaction(){return this.transaction.isActive}startTransaction(G){if(this[y])throw new i.MongoCompatibilityError("Transactions are not supported in snapshot sessions");if(this.inTransaction())throw new i.MongoTransactionError("Transaction already in progress");this.isPinned&&this.transaction.isCommitted&&this.unpin();let Q=(0,c.maxWireVersion)(this.client.topology);if((0,a.isSharded)(this.client.topology)&&Q!=null&&Q<f)throw new i.MongoCompatibilityError("Transactions are not supported on sharded clusters in MongoDB < 4.2.");this.incrementTransactionNumber(),this.transaction=new m.Transaction({readConcern:G?.readConcern??this.defaultTransactionOptions.readConcern??this.clientOptions?.readConcern,writeConcern:G?.writeConcern??this.defaultTransactionOptions.writeConcern??this.clientOptions?.writeConcern,readPreference:G?.readPreference??this.defaultTransactionOptions.readPreference??this.clientOptions?.readPreference,maxCommitTimeMS:G?.maxCommitTimeMS??this.defaultTransactionOptions.maxCommitTimeMS}),this.transaction.transition(m.TxnState.STARTING_TRANSACTION)}async commitTransaction(){return await k(this,"commitTransaction")}async abortTransaction(){return await k(this,"abortTransaction")}toBSON(){throw new i.MongoRuntimeError("ClientSession cannot be serialized to BSON.")}async withTransaction(G,Q){let oe=(0,c.now)();return await w(this,oe,G,Q)}};e.ClientSession=D,u=y;var N=12e4,_=new Set(["CannotSatisfyWriteConcern","UnknownReplWriteConcern","UnsatisfiableWriteConcern"]);function R(x,G){return(0,c.calculateDurationInMs)(x)<G}function j(x){let G=x instanceof i.MongoServerError&&x.codeName&&_.has(x.codeName);return I(x)||!G&&x.code!==i.MONGODB_ERROR_CODES.UnsatisfiableWriteConcern&&x.code!==i.MONGODB_ERROR_CODES.UnknownReplWriteConcern}function L(x,G){let Q=x[g],oe=G?.error;if(x.inTransaction()&&oe&&oe instanceof i.MongoError&&oe.hasErrorLabel(i.MongoErrorLabel.TransientTransactionError))return;let Ee=x.client.topology;if(Q&&Ee!=null){let De=Array.from(Ee.s.servers.values())[0];(G?.error==null||G?.force)&&(De.pool.checkIn(Q),x[g]=void 0,Q.emit(l.UNPINNED,x.transaction.state!==m.TxnState.NO_TRANSACTION?h.ConnectionPoolMetrics.TXN:h.ConnectionPoolMetrics.CURSOR),G?.forceClear&&De.pool.clear({serviceId:Q.serviceId}))}}e.maybeClearPinnedConnection=L;function I(x){return x==null||!(x instanceof i.MongoServerError)?!1:x.code===i.MONGODB_ERROR_CODES.MaxTimeMSExpired||x.writeConcernError&&x.writeConcernError.code===i.MONGODB_ERROR_CODES.MaxTimeMSExpired}async function M(x,G,Q,oe,Ee){try{return await x.commitTransaction(),oe}catch(De){if(De instanceof i.MongoError&&R(G,N)&&!I(De)){if(De.hasErrorLabel(i.MongoErrorLabel.UnknownTransactionCommitResult))return await M(x,G,Q,oe,Ee);if(De.hasErrorLabel(i.MongoErrorLabel.TransientTransactionError))return await w(x,G,Q,Ee)}throw De}}var S=new Set([m.TxnState.NO_TRANSACTION,m.TxnState.TRANSACTION_COMMITTED,m.TxnState.TRANSACTION_ABORTED]);function v(x){return S.has(x.transaction.state)}async function w(x,G,Q,oe={}){x.startTransaction(oe);let Ee;try{Ee=Q(x)}catch(De){Ee=Promise.reject(De)}if(!(0,c.isPromiseLike)(Ee)){try{await x.abortTransaction()}catch(De){(0,c.squashError)(De)}throw new i.MongoInvalidArgumentError("Function provided to `withTransaction` must return a Promise")}try{let De=await Ee;return v(x)?De:await M(x,G,Q,De,oe)}catch(De){if(x.inTransaction()&&await x.abortTransaction(),De instanceof i.MongoError&&De.hasErrorLabel(i.MongoErrorLabel.TransientTransactionError)&&R(G,N))return await w(x,G,Q,oe);throw I(De)&&De.addErrorLabel(i.MongoErrorLabel.UnknownTransactionCommitResult),De}}async function k(x,G){let Q=x.transaction.state;if(Q===m.TxnState.NO_TRANSACTION)throw new i.MongoTransactionError("No transaction started");if(G==="commitTransaction"){if(Q===m.TxnState.STARTING_TRANSACTION||Q===m.TxnState.TRANSACTION_COMMITTED_EMPTY){x.transaction.transition(m.TxnState.TRANSACTION_COMMITTED_EMPTY);return}if(Q===m.TxnState.TRANSACTION_ABORTED)throw new i.MongoTransactionError("Cannot call commitTransaction after calling abortTransaction")}else{if(Q===m.TxnState.STARTING_TRANSACTION){x.transaction.transition(m.TxnState.TRANSACTION_ABORTED);return}if(Q===m.TxnState.TRANSACTION_ABORTED)throw new i.MongoTransactionError("Cannot call abortTransaction twice");if(Q===m.TxnState.TRANSACTION_COMMITTED||Q===m.TxnState.TRANSACTION_COMMITTED_EMPTY)throw new i.MongoTransactionError("Cannot call abortTransaction after calling commitTransaction")}let oe={[G]:1},Ee;x.transaction.options.writeConcern?Ee=Object.assign({},x.transaction.options.writeConcern):x.clientOptions&&x.clientOptions.writeConcern&&(Ee={w:x.clientOptions.writeConcern.w}),Q===m.TxnState.TRANSACTION_COMMITTED&&(Ee=Object.assign({wtimeoutMS:1e4},Ee,{w:"majority"})),Ee&&b.WriteConcern.apply(oe,Ee),G==="commitTransaction"&&x.transaction.options.maxTimeMS&&Object.assign(oe,{maxTimeMS:x.transaction.options.maxTimeMS}),x.transaction.recoveryToken&&(oe.recoveryToken=x.transaction.recoveryToken);try{await(0,A.executeOperation)(x.client,new o.RunAdminCommandOperation(oe,{session:x,readPreference:r.ReadPreference.primary,bypassPinningCheck:!0})),oe.abortTransaction&&x.unpin(),G!=="commitTransaction"?(x.transaction.transition(m.TxnState.TRANSACTION_ABORTED),x.loadBalanced&&L(x,{force:!1})):x.transaction.transition(m.TxnState.TRANSACTION_COMMITTED)}catch(De){if(oe.abortTransaction&&x.unpin(),De instanceof i.MongoError&&(0,i.isRetryableWriteError)(De)){oe.commitTransaction&&(x.unpin({force:!0}),oe.writeConcern=Object.assign({wtimeout:1e4},oe.writeConcern,{w:"majority"}));try{await(0,A.executeOperation)(x.client,new o.RunAdminCommandOperation(oe,{session:x,readPreference:r.ReadPreference.primary,bypassPinningCheck:!0})),G!=="commitTransaction"?(x.transaction.transition(m.TxnState.TRANSACTION_ABORTED),x.loadBalanced&&L(x,{force:!1})):x.transaction.transition(m.TxnState.TRANSACTION_COMMITTED)}catch(Je){$(x,G,Je)}}else $(x,G,De)}}function $(x,G,Q){if(G!=="commitTransaction"){x.transaction.transition(m.TxnState.TRANSACTION_ABORTED),x.loadBalanced&&L(x,{force:!1});return}throw x.transaction.transition(m.TxnState.TRANSACTION_COMMITTED),Q instanceof i.MongoError&&((0,i.isRetryableWriteError)(Q)||Q instanceof i.MongoWriteConcernError||I(Q)?j(Q)&&(Q.addErrorLabel(i.MongoErrorLabel.UnknownTransactionCommitResult),x.unpin({error:Q})):Q.hasErrorLabel(i.MongoErrorLabel.TransientTransactionError)&&x.unpin({error:Q})),Q}var X=class cn{constructor(){this.id={id:new d.Binary((0,c.uuidV4)(),d.Binary.SUBTYPE_UUID)},this.lastUse=(0,c.now)(),this.txnNumber=0,this.isDirty=!1}hasTimedOut(G){return Math.round((0,c.calculateDurationInMs)(this.lastUse)%864e5%36e5/6e4)>G-1}static clone(G){let Q=new ArrayBuffer(16),oe=Buffer.from(Q);oe.set(G.id.id.buffer);let Ee=new d.Binary(oe,G.id.id.sub_type);return Object.setPrototypeOf({id:{id:Ee},lastUse:G.lastUse,txnNumber:G.txnNumber,isDirty:G.isDirty},cn.prototype)}};e.ServerSession=X;var de=class{constructor(x){if(x==null)throw new i.MongoRuntimeError("ServerSessionPool requires a MongoClient");this.client=x,this.sessions=new c.List}acquire(){let x=this.client.topology?.logicalSessionTimeoutMinutes??10,G=null;for(;this.sessions.length>0;){let Q=this.sessions.shift();if(Q!=null&&(this.client.topology?.loadBalanced||!Q.hasTimedOut(x))){G=Q;break}}return G==null&&(G=new X),G}release(x){let G=this.client.topology?.logicalSessionTimeoutMinutes??10;if(this.client.topology?.loadBalanced&&!G&&this.sessions.unshift(x),!!G&&(this.sessions.prune(Q=>Q.hasTimedOut(G)),!x.hasTimedOut(G))){if(x.isDirty)return;this.sessions.unshift(x)}}};e.ServerSessionPool=de;function Y(x,G,Q){if(x.hasEnded)return new i.MongoExpiredSessionError;let oe=x.serverSession;if(oe==null)return new i.MongoRuntimeError("Unable to acquire server session");if(Q.writeConcern?.w===0)return x&&x.explicit?new i.MongoAPIError("Cannot have explicit session with unacknowledged writes"):void 0;oe.lastUse=(0,c.now)(),G.lsid=oe.id;let Ee=x.inTransaction()||(0,m.isTransactionCommand)(G);if((Q.willRetryWrite||Ee)&&(oe.txnNumber+=x[T],x[T]=0,G.txnNumber=d.Long.fromNumber(oe.txnNumber)),!Ee){x.transaction.state!==m.TxnState.NO_TRANSACTION&&x.transaction.transition(m.TxnState.NO_TRANSACTION),x.supports.causalConsistency&&x.operationTime&&(0,c.commandSupportsReadConcern)(G)?(G.readConcern=G.readConcern||{},Object.assign(G.readConcern,{afterClusterTime:x.operationTime})):x[y]&&(G.readConcern=G.readConcern||{level:n.ReadConcernLevel.snapshot},x[F]!=null&&Object.assign(G.readConcern,{atClusterTime:x[F]}));return}if(G.autocommit=!1,x.transaction.state===m.TxnState.STARTING_TRANSACTION){x.transaction.transition(m.TxnState.TRANSACTION_IN_PROGRESS),G.startTransaction=!0;let De=x.transaction.options.readConcern||x?.clientOptions?.readConcern;De&&(G.readConcern=De),x.supports.causalConsistency&&x.operationTime&&(G.readConcern=G.readConcern||{},Object.assign(G.readConcern,{afterClusterTime:x.operationTime}))}}e.applySession=Y;function se(x,G){if(G.$clusterTime&&(0,E._advanceClusterTime)(x,G.$clusterTime),G.operationTime&&x&&x.supports.causalConsistency&&x.advanceOperationTime(G.operationTime),G.recoveryToken&&x&&x.inTransaction()&&(x.transaction._recoveryToken=G.recoveryToken),x?.[y]&&x[F]==null){let Q=G.atClusterTime;Q&&(x[F]=Q)}}e.updateSessionFromResponse=se}),Pt=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractCursor=e.CURSOR_FLAGS=void 0;var u=ve("stream"),d=Ue(),h=pe(),a=Et(),l=lt(),i=un(),p=ti(),A=yt(),o=rt(),n=Vr(),r=ye();e.CURSOR_FLAGS=["tailable","oplogReplay","noCursorTimeout","awaitData","exhaust","partial"];var E=class extends a.TypedEventEmitter{constructor(c,b,f={}){if(super(),this.documents=null,this.hasEmittedClose=!1,!c.s.isMongoClient)throw new h.MongoRuntimeError("Cursor must be constructed with MongoClient");this.cursorClient=c,this.cursorNamespace=b,this.cursorId=null,this.initialized=!1,this.isClosed=!1,this.isKilled=!1,this.cursorOptions={readPreference:f.readPreference&&f.readPreference instanceof o.ReadPreference?f.readPreference:o.ReadPreference.primary,...(0,d.pluckBSONSerializeOptions)(f)},this.cursorOptions.timeoutMS=f.timeoutMS;let O=A.ReadConcern.fromOptions(f);O&&(this.cursorOptions.readConcern=O),typeof f.batchSize=="number"&&(this.cursorOptions.batchSize=f.batchSize),f.comment!==void 0&&(this.cursorOptions.comment=f.comment),typeof f.maxTimeMS=="number"&&(this.cursorOptions.maxTimeMS=f.maxTimeMS),typeof f.maxAwaitTimeMS=="number"&&(this.cursorOptions.maxAwaitTimeMS=f.maxAwaitTimeMS),f.session instanceof n.ClientSession?this.cursorSession=f.session:this.cursorSession=this.cursorClient.startSession({owner:this,explicit:!1})}get id(){return this.cursorId??void 0}get isDead(){return(this.cursorId?.isZero()??!1)||this.isClosed||this.isKilled}get client(){return this.cursorClient}get server(){return this.selectedServer}get namespace(){return this.cursorNamespace}get readPreference(){return this.cursorOptions.readPreference}get readConcern(){return this.cursorOptions.readConcern}get session(){return this.cursorSession}set session(c){this.cursorSession=c}get closed(){return this.isClosed&&(this.documents?.length??0)===0}get killed(){return this.isKilled}get loadBalanced(){return!!this.cursorClient.topology?.loadBalanced}bufferedCount(){return this.documents?.length??0}readBufferedDocuments(c){let b=[],f=Math.min(c??this.documents?.length??0,this.documents?.length??0);for(let O=0;O<f;O++){let F=this.documents?.shift(this.cursorOptions);F!=null&&b.push(F)}return b}async*[Symbol.asyncIterator](){if(!this.isClosed)try{for(;;){if(this.isKilled||this.closed||this.cursorId!=null&&this.isDead&&(this.documents?.length??0)===0)return;let c=await this.next();if(c===null)return;yield c}}finally{if(!this.isClosed)try{await this.close()}catch(c){(0,r.squashError)(c)}}}stream(c){if(c?.transform){let b=c.transform,f=new m(this),O=f.pipe(new u.Transform({objectMode:!0,highWaterMark:1,transform(F,y,g){try{let T=b(F);g(void 0,T)}catch(T){g(T)}}}));return f.on("error",F=>O.emit("error",F)),O}return new m(this)}async hasNext(){if(this.cursorId===d.Long.ZERO)return!1;do{if((this.documents?.length??0)!==0)return!0;await this.fetchBatch()}while(!this.isDead||(this.documents?.length??0)!==0);return!1}async next(){if(this.cursorId===d.Long.ZERO)throw new h.MongoCursorExhaustedError;do{let c=this.documents?.shift(this.cursorOptions);if(c!=null)return this.transform!=null?await this.transformDocument(c):c;await this.fetchBatch()}while(!this.isDead||(this.documents?.length??0)!==0);return null}async tryNext(){if(this.cursorId===d.Long.ZERO)throw new h.MongoCursorExhaustedError;let c=this.documents?.shift(this.cursorOptions);return c!=null?this.transform!=null?await this.transformDocument(c):c:(await this.fetchBatch(),c=this.documents?.shift(this.cursorOptions),c!=null?this.transform!=null?await this.transformDocument(c):c:null)}async forEach(c){if(typeof c!="function")throw new h.MongoInvalidArgumentError('Argument "iterator" must be a function');for await(let b of this)if(c(b)===!1)break}async close(){await this.cleanup()}async toArray(){let c=[];for await(let b of this)c.push(b);return c}addCursorFlag(c,b){if(this.throwIfInitialized(),!e.CURSOR_FLAGS.includes(c))throw new h.MongoInvalidArgumentError(`Flag ${c} is not one of ${e.CURSOR_FLAGS}`);if(typeof b!="boolean")throw new h.MongoInvalidArgumentError(`Flag ${c} must be a boolean value`);return this.cursorOptions[c]=b,this}map(c){this.throwIfInitialized();let b=this.transform;return b?this.transform=f=>c(b(f)):this.transform=c,this}withReadPreference(c){if(this.throwIfInitialized(),c instanceof o.ReadPreference)this.cursorOptions.readPreference=c;else if(typeof c=="string")this.cursorOptions.readPreference=o.ReadPreference.fromString(c);else throw new h.MongoInvalidArgumentError(`Invalid read preference: ${c}`);return this}withReadConcern(c){this.throwIfInitialized();let b=A.ReadConcern.fromOptions({readConcern:c});return b&&(this.cursorOptions.readConcern=b),this}maxTimeMS(c){if(this.throwIfInitialized(),typeof c!="number")throw new h.MongoInvalidArgumentError("Argument for maxTimeMS must be a number");return this.cursorOptions.maxTimeMS=c,this}batchSize(c){if(this.throwIfInitialized(),this.cursorOptions.tailable)throw new h.MongoTailableCursorError("Tailable cursor does not support batchSize");if(typeof c!="number")throw new h.MongoInvalidArgumentError('Operation "batchSize" requires an integer');return this.cursorOptions.batchSize=c,this}rewind(){if(!this.initialized)return;this.cursorId=null,this.documents?.clear(),this.isClosed=!1,this.isKilled=!1,this.initialized=!1;let c=this.cursorSession;c&&c.explicit===!1&&(c.hasEnded||c.endSession().then(void 0,r.squashError),this.cursorSession=this.cursorClient.startSession({owner:this,explicit:!1}))}async getMore(c){if(this.cursorId==null)throw new h.MongoRuntimeError("Unexpected null cursor id. A cursor creating command should have set this");if(this.selectedServer==null)throw new h.MongoRuntimeError("Unexpected null selectedServer. A cursor creating command should have set this");let b=new i.GetMoreOperation(this.cursorNamespace,this.cursorId,this.selectedServer,{...this.cursorOptions,session:this.cursorSession,batchSize:c});return await(0,l.executeOperation)(this.cursorClient,b)}async cursorInit(){try{let c=await this._initialize(this.cursorSession),b=c.response;this.selectedServer=c.server,this.cursorId=b.id,this.cursorNamespace=b.ns??this.namespace,this.documents=b,this.initialized=!0}catch(c){throw this.initialized=!0,await this.cleanup(c),c}this.isDead&&await this.cleanup()}async fetchBatch(){if(this.isClosed)return;if(this.isDead){await this.cleanup();return}if(this.cursorId==null&&(await this.cursorInit(),(this.documents?.length??0)!==0||this.isDead))return;let c=this.cursorOptions.batchSize||1e3;try{let b=await this.getMore(c);this.cursorId=b.id,this.documents=b}catch(b){try{await this.cleanup(b)}catch(f){(0,r.squashError)(f)}throw b}this.isDead&&await this.cleanup()}async cleanup(c){this.isClosed=!0;let b=this.cursorSession;try{if(!this.isKilled&&this.cursorId&&!this.cursorId.isZero()&&this.cursorNamespace&&this.selectedServer&&!b.hasEnded){this.isKilled=!0;let f=this.cursorId;this.cursorId=d.Long.ZERO,await(0,l.executeOperation)(this.cursorClient,new p.KillCursorsOperation(f,this.cursorNamespace,this.selectedServer,{session:b}))}}catch(f){(0,r.squashError)(f)}finally{b?.owner===this&&await b.endSession({error:c}),b?.inTransaction()||(0,n.maybeClearPinnedConnection)(b,{error:c}),this.emitClose()}}emitClose(){try{!this.hasEmittedClose&&((this.documents?.length??0)===0||this.isClosed)&&this.emit("close")}finally{this.hasEmittedClose=!0}}async transformDocument(c){if(this.transform==null)return c;try{let b=this.transform(c);if(b===null){let f="Cursor returned a `null` document, but the cursor is not exhausted. Mapping documents to `null` is not supported in the cursor transform.";throw new h.MongoAPIError(f)}return b}catch(b){try{await this.close()}catch(f){(0,r.squashError)(f)}throw b}}throwIfInitialized(){if(this.initialized)throw new h.MongoCursorInUseError}};E.CLOSE="close",e.AbstractCursor=E;var m=class extends u.Readable{constructor(c){super({objectMode:!0,autoDestroy:!1,highWaterMark:1}),this._readInProgress=!1,this._cursor=c}_read(c){this._readInProgress||(this._readInProgress=!0,this._readNext())}_destroy(c,b){this._cursor.close().then(()=>b(c),f=>b(f))}_readNext(){if(this._cursor.id===d.Long.ZERO){this.push(null);return}this._cursor.next().then(c=>{if(c==null)this.push(null);else if(this.destroyed)this._cursor.close().then(void 0,r.squashError);else{if(this.push(c))return this._readNext();this._readInProgress=!1}},c=>c.message.match(/server is closed/)?(this._cursor.close().then(void 0,r.squashError),this.push(null)):c.message.match(/operation was interrupted/)?this.push(null):this.destroy(c))}}}),Gr=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AggregationCursor=void 0;var u=rn(),d=lt(),h=ye(),a=Pt(),l=class hn extends a.AbstractCursor{constructor(p,A,o=[],n={}){super(p,A,n),this.pipeline=o,this.aggregateOptions=n}clone(){let p=(0,h.mergeOptions)({},this.aggregateOptions);return delete p.session,new hn(this.client,this.namespace,this.pipeline,{...p})}map(p){return super.map(p)}async _initialize(p){let A=new u.AggregateOperation(this.namespace,this.pipeline,{...this.aggregateOptions,...this.cursorOptions,session:p}),o=await(0,d.executeOperation)(this.client,A);return{server:A.server,session:p,response:o}}async explain(p){return(await(0,d.executeOperation)(this.client,new u.AggregateOperation(this.namespace,this.pipeline,{...this.aggregateOptions,...this.cursorOptions,explain:p??!0}))).shift(this.aggregateOptions)}addStage(p){return this.throwIfInitialized(),this.pipeline.push(p),this}group(p){return this.addStage({$group:p})}limit(p){return this.addStage({$limit:p})}match(p){return this.addStage({$match:p})}out(p){return this.addStage({$out:p})}project(p){return this.addStage({$project:p})}lookup(p){return this.addStage({$lookup:p})}redact(p){return this.addStage({$redact:p})}skip(p){return this.addStage({$skip:p})}sort(p){return this.addStage({$sort:p})}unwind(p){return this.addStage({$unwind:p})}geoNear(p){return this.addStage({$geoNear:p})}};e.AggregationCursor=l}),dn=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CountOperation=void 0;var u=Ze(),d=je(),h=class extends u.CommandOperation{constructor(a,l,i){super({s:{namespace:a}},i),this.options=i,this.collectionName=a.collection,this.query=l}get commandName(){return"count"}async execute(a,l){let i=this.options,p={count:this.collectionName,query:this.query};typeof i.limit=="number"&&(p.limit=i.limit),typeof i.skip=="number"&&(p.skip=i.skip),i.hint!=null&&(p.hint=i.hint),typeof i.maxTimeMS=="number"&&(p.maxTimeMS=i.maxTimeMS);let A=await super.executeCommand(a,l,p);return A?A.n:0}};e.CountOperation=h,(0,d.defineAspects)(h,[d.Aspect.READ_OPERATION,d.Aspect.RETRYABLE])}),qu=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.formatSort=void 0;var u=pe();function d(m=1){let c=`${m}`.toLowerCase();if(h(m))return m;switch(c){case"ascending":case"asc":case"1":return 1;case"descending":case"desc":case"-1":return-1;default:throw new u.MongoInvalidArgumentError(`Invalid sort direction: ${JSON.stringify(m)}`)}}function h(m){return typeof m=="object"&&m!=null&&"$meta"in m&&typeof m.$meta=="string"}function a(m){if(Array.isArray(m)&&m.length===2)try{return d(m[1]),!0}catch{return!1}return!1}function l(m){return Array.isArray(m)&&Array.isArray(m[0])}function i(m){return m instanceof Map&&m.size>0}function p(m){return new Map([[`${m[0]}`,d([m[1]])]])}function A(m){let c=m.map(([b,f])=>[`${b}`,d(f)]);return new Map(c)}function o(m){let c=m.map(b=>[`${b}`,1]);return new Map(c)}function n(m){let c=Object.entries(m).map(([b,f])=>[`${b}`,d(f)]);return new Map(c)}function r(m){let c=Array.from(m).map(([b,f])=>[`${b}`,d(f)]);return new Map(c)}function E(m,c){if(m!=null){if(typeof m=="string")return new Map([[m,d(c)]]);if(typeof m!="object")throw new u.MongoInvalidArgumentError(`Invalid sort format: ${JSON.stringify(m)} Sort must be a valid object`);if(!Array.isArray(m))return i(m)?r(m):Object.keys(m).length?n(m):void 0;if(m.length)return l(m)?A(m):a(m)?p(m):o(m)}}e.formatSort=E}),ri=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindOperation=void 0;var u=Tt(),d=pe(),h=yt(),a=qu(),l=ye(),i=Ze(),p=je(),A=class extends i.CommandOperation{constructor(n,r={},E={}){if(super(void 0,E),this.options={...E},delete this.options.writeConcern,this.ns=n,typeof r!="object"||Array.isArray(r))throw new d.MongoInvalidArgumentError("Query filter must be a plain object or ObjectId");this.filter=r!=null&&r._bsontype==="ObjectId"?{_id:r}:r}get commandName(){return"find"}async execute(n,r){this.server=n;let E=this.options,m=o(this.ns,this.filter,E);return this.explain&&(m=(0,l.decorateWithExplain)(m,this.explain)),await n.command(this.ns,m,{...this.options,...this.bsonOptions,documentsReturnedIn:"firstBatch",session:r},this.explain?u.ExplainedCursorResponse:u.CursorResponse)}};e.FindOperation=A;function o(n,r,E){let m={find:n.collection,filter:r};if(E.sort&&(m.sort=(0,a.formatSort)(E.sort)),E.projection){let b=E.projection;b&&Array.isArray(b)&&(b=b.length?b.reduce((f,O)=>(f[O]=1,f),{}):{_id:1}),m.projection=b}E.hint&&(m.hint=(0,l.normalizeHintField)(E.hint)),typeof E.skip=="number"&&(m.skip=E.skip),typeof E.limit=="number"&&(E.limit<0?(m.limit=-E.limit,m.singleBatch=!0):m.limit=E.limit),typeof E.batchSize=="number"&&(E.batchSize<0?(E.limit&&E.limit!==0&&Math.abs(E.batchSize)<Math.abs(E.limit)&&(m.limit=-E.batchSize),m.singleBatch=!0):m.batchSize=E.batchSize),typeof E.singleBatch=="boolean"&&(m.singleBatch=E.singleBatch),E.comment!==void 0&&(m.comment=E.comment),typeof E.maxTimeMS=="number"&&(m.maxTimeMS=E.maxTimeMS);let c=h.ReadConcern.fromOptions(E);return c&&(m.readConcern=c.toJSON()),E.max&&(m.max=E.max),E.min&&(m.min=E.min),typeof E.returnKey=="boolean"&&(m.returnKey=E.returnKey),typeof E.showRecordId=="boolean"&&(m.showRecordId=E.showRecordId),typeof E.tailable=="boolean"&&(m.tailable=E.tailable),typeof E.oplogReplay=="boolean"&&(m.oplogReplay=E.oplogReplay),typeof E.timeout=="boolean"?m.noCursorTimeout=!E.timeout:typeof E.noCursorTimeout=="boolean"&&(m.noCursorTimeout=E.noCursorTimeout),typeof E.awaitData=="boolean"&&(m.awaitData=E.awaitData),typeof E.allowPartialResults=="boolean"&&(m.allowPartialResults=E.allowPartialResults),E.collation&&(m.collation=E.collation),typeof E.allowDiskUse=="boolean"&&(m.allowDiskUse=E.allowDiskUse),E.let&&(m.let=E.let),m}(0,p.defineAspects)(A,[p.Aspect.READ_OPERATION,p.Aspect.RETRYABLE,p.Aspect.EXPLAINABLE,p.Aspect.CURSOR_CREATING])}),pn=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindCursor=e.FLAGS=void 0;var u=Tt(),d=pe(),h=dn(),a=lt(),l=ri(),i=qu(),p=ye(),A=Pt();e.FLAGS=["tailable","oplogReplay","noCursorTimeout","awaitData","exhaust","partial"];var o=class En extends A.AbstractCursor{constructor(r,E,m={},c={}){super(r,E,c),this.numReturned=0,this.cursorFilter=m,this.findOptions=c,c.sort!=null&&(this.findOptions.sort=(0,i.formatSort)(c.sort))}clone(){let r=(0,p.mergeOptions)({},this.findOptions);return delete r.session,new En(this.client,this.namespace,this.cursorFilter,{...r})}map(r){return super.map(r)}async _initialize(r){let E=new l.FindOperation(this.namespace,this.cursorFilter,{...this.findOptions,...this.cursorOptions,session:r}),m=await(0,a.executeOperation)(this.client,E);return this.numReturned=m.batchSize,{server:E.server,session:r,response:m}}async getMore(r){let E=this.numReturned;if(E){let c=this.findOptions.limit;if(r=c&&c>0&&E+r>c?c-E:r,r<=0){try{await this.close()}catch(b){(0,p.squashError)(b)}return u.CursorResponse.emptyGetMore}}let m=await super.getMore(r);return this.numReturned=this.numReturned+m.batchSize,m}async count(r){if((0,p.emitWarningOnce)("cursor.count is deprecated and will be removed in the next major version, please use `collection.estimatedDocumentCount` or `collection.countDocuments` instead "),typeof r=="boolean")throw new d.MongoInvalidArgumentError("Invalid first parameter to count");return await(0,a.executeOperation)(this.client,new h.CountOperation(this.namespace,this.cursorFilter,{...this.findOptions,...this.cursorOptions,...r}))}async explain(r){return(await(0,a.executeOperation)(this.client,new l.FindOperation(this.namespace,this.cursorFilter,{...this.findOptions,...this.cursorOptions,explain:r??!0}))).shift(this.findOptions)}filter(r){return this.throwIfInitialized(),this.cursorFilter=r,this}hint(r){return this.throwIfInitialized(),this.findOptions.hint=r,this}min(r){return this.throwIfInitialized(),this.findOptions.min=r,this}max(r){return this.throwIfInitialized(),this.findOptions.max=r,this}returnKey(r){return this.throwIfInitialized(),this.findOptions.returnKey=r,this}showRecordId(r){return this.throwIfInitialized(),this.findOptions.showRecordId=r,this}addQueryModifier(r,E){if(this.throwIfInitialized(),r[0]!=="$")throw new d.MongoInvalidArgumentError(`${r} is not a valid query modifier`);switch(r.substr(1)){case"comment":this.findOptions.comment=E;break;case"explain":this.findOptions.explain=E;break;case"hint":this.findOptions.hint=E;break;case"max":this.findOptions.max=E;break;case"maxTimeMS":this.findOptions.maxTimeMS=E;break;case"min":this.findOptions.min=E;break;case"orderby":this.findOptions.sort=(0,i.formatSort)(E);break;case"query":this.cursorFilter=E;break;case"returnKey":this.findOptions.returnKey=E;break;case"showDiskLoc":this.findOptions.showRecordId=E;break;default:throw new d.MongoInvalidArgumentError(`Invalid query modifier: ${r}`)}return this}comment(r){return this.throwIfInitialized(),this.findOptions.comment=r,this}maxAwaitTimeMS(r){if(this.throwIfInitialized(),typeof r!="number")throw new d.MongoInvalidArgumentError("Argument for maxAwaitTimeMS must be a number");return this.findOptions.maxAwaitTimeMS=r,this}maxTimeMS(r){if(this.throwIfInitialized(),typeof r!="number")throw new d.MongoInvalidArgumentError("Argument for maxTimeMS must be a number");return this.findOptions.maxTimeMS=r,this}project(r){return this.throwIfInitialized(),this.findOptions.projection=r,this}sort(r,E){if(this.throwIfInitialized(),this.findOptions.tailable)throw new d.MongoTailableCursorError("Tailable cursor does not support sorting");return this.findOptions.sort=(0,i.formatSort)(r,E),this}allowDiskUse(r=!0){if(this.throwIfInitialized(),!this.findOptions.sort)throw new d.MongoInvalidArgumentError('Option "allowDiskUse" requires a sort specification');return r?(this.findOptions.allowDiskUse=!0,this):(this.findOptions.allowDiskUse=!1,this)}collation(r){return this.throwIfInitialized(),this.findOptions.collation=r,this}limit(r){if(this.throwIfInitialized(),this.findOptions.tailable)throw new d.MongoTailableCursorError("Tailable cursor does not support limit");if(typeof r!="number")throw new d.MongoInvalidArgumentError('Operation "limit" requires an integer');return this.findOptions.limit=r,this}skip(r){if(this.throwIfInitialized(),this.findOptions.tailable)throw new d.MongoTailableCursorError("Tailable cursor does not support skip");if(typeof r!="number")throw new d.MongoInvalidArgumentError('Operation "skip" requires an integer');return this.findOptions.skip=r,this}};e.FindCursor=o}),Hr=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListIndexesOperation=e.DropIndexOperation=e.CreateIndexesOperation=void 0;var u=Tt(),d=pe(),h=ye(),a=Ze(),l=je(),i=new Set(["background","unique","name","partialFilterExpression","sparse","hidden","expireAfterSeconds","storageEngine","collation","version","weights","default_language","language_override","textIndexVersion","2dsphereIndexVersion","bits","min","max","bucketSize","wildcardProjection"]);function p(c){return typeof c=="number"||c==="2d"||c==="2dsphere"||c==="text"||c==="geoHaystack"}function A(c){return Array.isArray(c)&&c.length===2&&p(c[1])}function o(c){let b=new Map,f=!Array.isArray(c)||A(c)?[c]:c;for(let O of f)if(typeof O=="string")b.set(O,1);else if(Array.isArray(O))b.set(O[0],O[1]??1);else if(O instanceof Map)for(let[F,y]of O)b.set(F,y);else if((0,h.isObject)(O))for(let[F,y]of Object.entries(O))b.set(F,y);return b}function n(c){let b=Object.entries(c).filter(([f])=>i.has(f));return Object.fromEntries(b.map(([f,O])=>f==="version"?["v",O]:[f,O]))}var r=class Lu extends a.CommandOperation{constructor(b,f,O,F){super(b,F),this.options=F??{},this.collectionName=f,this.indexes=O.map(y=>{let g=y.key instanceof Map?y.key:new Map(Object.entries(y.key)),T=y.name??Array.from(g).flat().join("_");return{...n(y),name:T,key:g}})}static fromIndexDescriptionArray(b,f,O,F){return new Lu(b,f,O,F)}static fromIndexSpecification(b,f,O,F={}){let y=o(O),g={...F,key:y};return new Lu(b,f,[g],F)}get commandName(){return"createIndexes"}async execute(b,f){let O=this.options,F=this.indexes,y=(0,h.maxWireVersion)(b),g={createIndexes:this.collectionName,indexes:F};if(O.commitQuorum!=null){if(y<9)throw new d.MongoCompatibilityError("Option `commitQuorum` for `createIndexes` not supported on servers < 4.4");g.commitQuorum=O.commitQuorum}return this.options.collation=void 0,await super.executeCommand(b,f,g),F.map(T=>T.name||"")}};e.CreateIndexesOperation=r;var E=class extends a.CommandOperation{constructor(c,b,f){super(c,f),this.options=f??{},this.collection=c,this.indexName=b}get commandName(){return"dropIndexes"}async execute(c,b){let f={dropIndexes:this.collection.collectionName,index:this.indexName};return await super.executeCommand(c,b,f)}};e.DropIndexOperation=E;var m=class extends a.CommandOperation{constructor(c,b){super(c,b),this.options={...b},delete this.options.writeConcern,this.collectionNamespace=c.s.namespace}get commandName(){return"listIndexes"}async execute(c,b){let f=(0,h.maxWireVersion)(c),O=this.options.batchSize?{batchSize:this.options.batchSize}:{},F={listIndexes:this.collectionNamespace.collection,cursor:O};return f>=9&&this.options.comment!==void 0&&(F.comment=this.options.comment),await super.executeCommand(c,b,F,u.CursorResponse)}};e.ListIndexesOperation=m,(0,l.defineAspects)(m,[l.Aspect.READ_OPERATION,l.Aspect.RETRYABLE,l.Aspect.CURSOR_CREATING]),(0,l.defineAspects)(r,[l.Aspect.WRITE_OPERATION]),(0,l.defineAspects)(E,[l.Aspect.WRITE_OPERATION])}),mn=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListIndexesCursor=void 0;var u=lt(),d=Hr(),h=Pt(),a=class fn extends h.AbstractCursor{constructor(i,p){super(i.client,i.s.namespace,p),this.parent=i,this.options=p}clone(){return new fn(this.parent,{...this.options,...this.cursorOptions})}async _initialize(i){let p=new d.ListIndexesOperation(this.parent,{...this.cursorOptions,...this.options,session:i}),A=await(0,u.executeOperation)(this.parent.client,p);return{server:p.server,session:i,response:A}}};e.ListIndexesCursor=a}),ui=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListSearchIndexesCursor=void 0;var u=Gr(),d=class extends u.AggregationCursor{constructor({fullNamespace:h,client:a},l,i={}){let p=l==null?[{$listSearchIndexes:{}}]:[{$listSearchIndexes:{name:l}}];super(a,h,p,i)}};e.ListSearchIndexesCursor=d}),ni=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DistinctOperation=void 0;var u=ye(),d=Ze(),h=je(),a=class extends d.CommandOperation{constructor(l,i,p,A){super(l,A),this.options=A??{},this.collection=l,this.key=i,this.query=p}get commandName(){return"distinct"}async execute(l,i){let p=this.collection,A=this.key,o=this.query,n=this.options,r={distinct:p.collectionName,key:A,query:o};typeof n.maxTimeMS=="number"&&(r.maxTimeMS=n.maxTimeMS),typeof n.comment<"u"&&(r.comment=n.comment),(0,u.decorateWithReadConcern)(r,p,n),(0,u.decorateWithCollation)(r,p,n);let E=await super.executeCommand(l,i,r);return this.explain?E:E.values}};e.DistinctOperation=a,(0,h.defineAspects)(a,[h.Aspect.READ_OPERATION,h.Aspect.RETRYABLE,h.Aspect.EXPLAINABLE])}),An=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropDatabaseOperation=e.DropCollectionOperation=void 0;var u=pe(),d=Ze(),h=je(),a=class Cn extends d.CommandOperation{constructor(p,A,o={}){super(p,o),this.db=p,this.options=o,this.name=A}get commandName(){return"drop"}async execute(p,A){let o=this.db,n=this.options,r=this.name,E=o.client.options.autoEncryption?.encryptedFieldsMap,m=n.encryptedFields??E?.[`${o.databaseName}.${r}`];if(!m&&E&&(m=(await o.listCollections({name:r},{nameOnly:!1}).toArray())?.[0]?.options?.encryptedFields),m){let c=m.escCollection||`enxcol_.${r}.esc`,b=m.ecocCollection||`enxcol_.${r}.ecoc`;for(let f of[c,b]){let O=new Cn(o,f);try{await O.executeWithoutEncryptedFieldsCheck(p,A)}catch(F){if(!(F instanceof u.MongoServerError)||F.code!==u.MONGODB_ERROR_CODES.NamespaceNotFound)throw F}}}return await this.executeWithoutEncryptedFieldsCheck(p,A)}async executeWithoutEncryptedFieldsCheck(p,A){return await super.executeCommand(p,A,{drop:this.name}),!0}};e.DropCollectionOperation=a;var l=class extends d.CommandOperation{constructor(i,p){super(i,p),this.options=p}get commandName(){return"dropDatabase"}async execute(i,p){return await super.executeCommand(i,p,{dropDatabase:1}),!0}};e.DropDatabaseOperation=l,(0,h.defineAspects)(a,[h.Aspect.WRITE_OPERATION]),(0,h.defineAspects)(l,[h.Aspect.WRITE_OPERATION])}),oi=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.EstimatedDocumentCountOperation=void 0;var u=Ze(),d=je(),h=class extends u.CommandOperation{constructor(a,l={}){super(a,l),this.options=l,this.collectionName=a.collectionName}get commandName(){return"count"}async execute(a,l){let i={count:this.collectionName};return typeof this.options.maxTimeMS=="number"&&(i.maxTimeMS=this.options.maxTimeMS),this.options.comment!==void 0&&(i.comment=this.options.comment),(await super.executeCommand(a,l,i))?.n||0}};e.EstimatedDocumentCountOperation=h,(0,d.defineAspects)(h,[d.Aspect.READ_OPERATION,d.Aspect.RETRYABLE,d.Aspect.CURSOR_CREATING])}),gn=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FindOneAndUpdateOperation=e.FindOneAndReplaceOperation=e.FindOneAndDeleteOperation=e.FindAndModifyOperation=e.ReturnDocument=void 0;var u=pe(),d=rt(),h=qu(),a=ye(),l=Ze(),i=je();e.ReturnDocument=Object.freeze({BEFORE:"before",AFTER:"after"});function p(E,m){return E.new=m.returnDocument===e.ReturnDocument.AFTER,E.upsert=m.upsert===!0,m.bypassDocumentValidation===!0&&(E.bypassDocumentValidation=m.bypassDocumentValidation),E}var A=class extends l.CommandOperation{constructor(E,m,c){super(E,c),this.options=c??{},this.cmdBase={remove:!1,new:!1,upsert:!1},c.includeResultMetadata??=!1;let b=(0,h.formatSort)(c.sort);b&&(this.cmdBase.sort=b),c.projection&&(this.cmdBase.fields=c.projection),c.maxTimeMS&&(this.cmdBase.maxTimeMS=c.maxTimeMS),c.writeConcern&&(this.cmdBase.writeConcern=c.writeConcern),c.let&&(this.cmdBase.let=c.let),c.comment!==void 0&&(this.cmdBase.comment=c.comment),this.readPreference=d.ReadPreference.primary,this.collection=E,this.query=m}get commandName(){return"findAndModify"}async execute(E,m){let c=this.collection,b=this.query,f={...this.options,...this.bsonOptions},O={findAndModify:c.collectionName,query:b,...this.cmdBase};try{(0,a.decorateWithCollation)(O,c,f)}catch(y){return y}if(f.hint){if(this.writeConcern?.w===0||(0,a.maxWireVersion)(E)<8)throw new u.MongoCompatibilityError("The current topology does not support a hint on findAndModify commands");O.hint=f.hint}let F=await super.executeCommand(E,m,O);return f.includeResultMetadata?F:F.value??null}};e.FindAndModifyOperation=A;var o=class extends A{constructor(E,m,c){if(m==null||typeof m!="object")throw new u.MongoInvalidArgumentError('Argument "filter" must be an object');super(E,m,c),this.cmdBase.remove=!0}};e.FindOneAndDeleteOperation=o;var n=class extends A{constructor(E,m,c,b){if(m==null||typeof m!="object")throw new u.MongoInvalidArgumentError('Argument "filter" must be an object');if(c==null||typeof c!="object")throw new u.MongoInvalidArgumentError('Argument "replacement" must be an object');if((0,a.hasAtomicOperators)(c))throw new u.MongoInvalidArgumentError("Replacement document must not contain atomic operators");super(E,m,b),this.cmdBase.update=c,p(this.cmdBase,b)}};e.FindOneAndReplaceOperation=n;var r=class extends A{constructor(E,m,c,b){if(m==null||typeof m!="object")throw new u.MongoInvalidArgumentError('Argument "filter" must be an object');if(c==null||typeof c!="object")throw new u.MongoInvalidArgumentError('Argument "update" must be an object');if(!(0,a.hasAtomicOperators)(c))throw new u.MongoInvalidArgumentError("Update document requires atomic operators");super(E,m,b),this.cmdBase.update=c,p(this.cmdBase,b),b.arrayFilters&&(this.cmdBase.arrayFilters=b.arrayFilters)}};e.FindOneAndUpdateOperation=r,(0,i.defineAspects)(A,[i.Aspect.WRITE_OPERATION,i.Aspect.RETRYABLE,i.Aspect.EXPLAINABLE])}),ii=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.IsCappedOperation=void 0;var u=pe(),d=je(),h=class extends d.AbstractOperation{constructor(a,l){super(l),this.options=l,this.collection=a}get commandName(){return"listCollections"}async execute(a,l){let i=this.collection,[p]=await i.s.db.listCollections({name:i.collectionName},{...this.options,nameOnly:!1,readPreference:this.readPreference,session:l}).toArray();if(p==null||p.options==null)throw new u.MongoAPIError(`collection ${i.namespace} not found`);return!!p.options?.capped}};e.IsCappedOperation=h}),si=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OptionsOperation=void 0;var u=pe(),d=je(),h=class extends d.AbstractOperation{constructor(a,l){super(l),this.options=l,this.collection=a}get commandName(){return"listCollections"}async execute(a,l){let i=this.collection,[p]=await i.s.db.listCollections({name:i.collectionName},{...this.options,nameOnly:!1,readPreference:this.readPreference,session:l}).toArray();if(p==null||p.options==null)throw new u.MongoAPIError(`collection ${i.namespace} not found`);return p.options}};e.OptionsOperation=h}),yn=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RenameOperation=void 0;var u=er(),d=ye(),h=Ze(),a=je(),l=class extends h.CommandOperation{constructor(i,p,A){super(i,A),this.collection=i,this.newName=p,this.options=A,this.ns=new d.MongoDBNamespace("admin","$cmd")}get commandName(){return"renameCollection"}async execute(i,p){let A=this.collection.namespace,o=this.collection.s.namespace.withCollection(this.newName).toString(),n=typeof this.options.dropTarget=="boolean"?this.options.dropTarget:!1,r={renameCollection:A,to:o,dropTarget:n};return await super.executeCommand(i,p,r),new u.Collection(this.collection.s.db,this.newName,this.collection.s.options)}};e.RenameOperation=l,(0,a.defineAspects)(l,[a.Aspect.WRITE_OPERATION])}),ai=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CreateSearchIndexesOperation=void 0;var u=je(),d=class extends u.AbstractOperation{constructor(h,a){super(),this.collection=h,this.descriptions=a}get commandName(){return"createSearchIndexes"}async execute(h,a){let l=this.collection.fullNamespace,i={createSearchIndexes:l.collection,indexes:this.descriptions};return((await h.command(l,i,{session:a}))?.indexesCreated??[]).map(({name:p})=>p)}};e.CreateSearchIndexesOperation=d}),li=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DropSearchIndexOperation=void 0;var u=pe(),d=je(),h=class extends d.AbstractOperation{constructor(a,l){super(),this.collection=a,this.name=l}get commandName(){return"dropSearchIndex"}async execute(a,l){let i=this.collection.fullNamespace,p={dropSearchIndex:i.collection};typeof this.name=="string"&&(p.name=this.name);try{await a.command(i,p,{session:l})}catch(A){if(!(A instanceof u.MongoServerError&&A.code===u.MONGODB_ERROR_CODES.NamespaceNotFound))throw A}}};e.DropSearchIndexOperation=h}),ci=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UpdateSearchIndexOperation=void 0;var u=je(),d=class extends u.AbstractOperation{constructor(h,a,l){super(),this.collection=h,this.name=a,this.definition=l}get commandName(){return"updateSearchIndex"}async execute(h,a){let l=this.collection.fullNamespace,i={updateSearchIndex:l.collection,name:this.name,definition:this.definition};await h.command(l,i,{session:a})}};e.UpdateSearchIndexOperation=d}),er=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Collection=void 0;var u=Ue(),d=en(),h=tn(),a=Ar(),l=Gr(),i=pn(),p=mn(),A=ui(),o=pe(),n=X1(),r=dn(),E=J1(),m=ni(),c=An(),b=oi(),f=lt(),O=gn(),F=Hr(),y=Z1(),g=ii(),T=si(),D=yn(),N=ai(),_=li(),R=ci(),j=Q1(),L=yt(),I=rt(),M=ye(),S=at(),v=class{constructor(w,k,$){this.s={db:w,options:$,namespace:new M.MongoDBCollectionNamespace(w.databaseName,k),pkFactory:w.options?.pkFactory??M.DEFAULT_PK_FACTORY,readPreference:I.ReadPreference.fromOptions($),bsonOptions:(0,u.resolveBSONOptions)($,w),readConcern:L.ReadConcern.fromOptions($),writeConcern:S.WriteConcern.fromOptions($)},this.client=w.client}get dbName(){return this.s.namespace.db}get collectionName(){return this.s.namespace.collection}get namespace(){return this.fullNamespace.toString()}get fullNamespace(){return this.s.namespace}get readConcern(){return this.s.readConcern==null?this.s.db.readConcern:this.s.readConcern}get readPreference(){return this.s.readPreference==null?this.s.db.readPreference:this.s.readPreference}get bsonOptions(){return this.s.bsonOptions}get writeConcern(){return this.s.writeConcern==null?this.s.db.writeConcern:this.s.writeConcern}get hint(){return this.s.collectionHint}set hint(w){this.s.collectionHint=(0,M.normalizeHintField)(w)}async insertOne(w,k){return await(0,f.executeOperation)(this.client,new y.InsertOneOperation(this,w,(0,M.resolveOptions)(this,k)))}async insertMany(w,k){return await(0,f.executeOperation)(this.client,new y.InsertManyOperation(this,w,(0,M.resolveOptions)(this,k??{ordered:!0})))}async bulkWrite(w,k){if(!Array.isArray(w))throw new o.MongoInvalidArgumentError('Argument "operations" must be an array of documents');return await(0,f.executeOperation)(this.client,new n.BulkWriteOperation(this,w,(0,M.resolveOptions)(this,k??{ordered:!0})))}async updateOne(w,k,$){return await(0,f.executeOperation)(this.client,new j.UpdateOneOperation(this,w,k,(0,M.resolveOptions)(this,$)))}async replaceOne(w,k,$){return await(0,f.executeOperation)(this.client,new j.ReplaceOneOperation(this,w,k,(0,M.resolveOptions)(this,$)))}async updateMany(w,k,$){return await(0,f.executeOperation)(this.client,new j.UpdateManyOperation(this,w,k,(0,M.resolveOptions)(this,$)))}async deleteOne(w={},k={}){return await(0,f.executeOperation)(this.client,new E.DeleteOneOperation(this,w,(0,M.resolveOptions)(this,k)))}async deleteMany(w={},k={}){return await(0,f.executeOperation)(this.client,new E.DeleteManyOperation(this,w,(0,M.resolveOptions)(this,k)))}async rename(w,k){return await(0,f.executeOperation)(this.client,new D.RenameOperation(this,w,{...k,readPreference:I.ReadPreference.PRIMARY}))}async drop(w){return await(0,f.executeOperation)(this.client,new c.DropCollectionOperation(this.s.db,this.collectionName,w))}async findOne(w={},k={}){let $=this.find(w,k).limit(-1).batchSize(1),X=await $.next();return await $.close(),X}find(w={},k={}){return new i.FindCursor(this.client,this.s.namespace,w,(0,M.resolveOptions)(this,k))}async options(w){return await(0,f.executeOperation)(this.client,new T.OptionsOperation(this,(0,M.resolveOptions)(this,w)))}async isCapped(w){return await(0,f.executeOperation)(this.client,new g.IsCappedOperation(this,(0,M.resolveOptions)(this,w)))}async createIndex(w,k){return(await(0,f.executeOperation)(this.client,F.CreateIndexesOperation.fromIndexSpecification(this,this.collectionName,w,(0,M.resolveOptions)(this,k))))[0]}async createIndexes(w,k){return await(0,f.executeOperation)(this.client,F.CreateIndexesOperation.fromIndexDescriptionArray(this,this.collectionName,w,(0,M.resolveOptions)(this,{...k,maxTimeMS:void 0})))}async dropIndex(w,k){return await(0,f.executeOperation)(this.client,new F.DropIndexOperation(this,w,{...(0,M.resolveOptions)(this,k),readPreference:I.ReadPreference.primary}))}async dropIndexes(w){try{return await(0,f.executeOperation)(this.client,new F.DropIndexOperation(this,"*",(0,M.resolveOptions)(this,w))),!0}catch{return!1}}listIndexes(w){return new p.ListIndexesCursor(this,(0,M.resolveOptions)(this,w))}async indexExists(w,k){let $=Array.isArray(w)?w:[w],X=new Set(await this.listIndexes(k).map(({name:de})=>de).toArray());return $.every(de=>X.has(de))}async indexInformation(w){return await this.indexes({...w,full:w?.full??!1})}async estimatedDocumentCount(w){return await(0,f.executeOperation)(this.client,new b.EstimatedDocumentCountOperation(this,(0,M.resolveOptions)(this,w)))}async countDocuments(w={},k={}){let $=[];$.push({$match:w}),typeof k.skip=="number"&&$.push({$skip:k.skip}),typeof k.limit=="number"&&$.push({$limit:k.limit}),$.push({$group:{_id:1,n:{$sum:1}}});let X=this.aggregate($,k),de=await X.next();return await X.close(),de?.n??0}async distinct(w,k={},$={}){return await(0,f.executeOperation)(this.client,new m.DistinctOperation(this,w,k,(0,M.resolveOptions)(this,$)))}async indexes(w){let k=await this.listIndexes(w).toArray();return w?.full??!0?k:Object.fromEntries(k.map(({name:$,key:X})=>[$,Object.entries(X)]))}async findOneAndDelete(w,k){return await(0,f.executeOperation)(this.client,new O.FindOneAndDeleteOperation(this,w,(0,M.resolveOptions)(this,k)))}async findOneAndReplace(w,k,$){return await(0,f.executeOperation)(this.client,new O.FindOneAndReplaceOperation(this,w,k,(0,M.resolveOptions)(this,$)))}async findOneAndUpdate(w,k,$){return await(0,f.executeOperation)(this.client,new O.FindOneAndUpdateOperation(this,w,k,(0,M.resolveOptions)(this,$)))}aggregate(w=[],k){if(!Array.isArray(w))throw new o.MongoInvalidArgumentError('Argument "pipeline" must be an array of aggregation stages');return new l.AggregationCursor(this.client,this.s.namespace,w,(0,M.resolveOptions)(this,k))}watch(w=[],k={}){return Array.isArray(w)||(k=w,w=[]),new a.ChangeStream(this,w,(0,M.resolveOptions)(this,k))}initializeUnorderedBulkOp(w){return new h.UnorderedBulkOperation(this,(0,M.resolveOptions)(this,w))}initializeOrderedBulkOp(w){return new d.OrderedBulkOperation(this,(0,M.resolveOptions)(this,w))}async count(w={},k={}){return await(0,f.executeOperation)(this.client,new r.CountOperation(this.fullNamespace,w,(0,M.resolveOptions)(this,k)))}listSearchIndexes(w,k){k=typeof w=="object"?w:k??{};let $=w==null||typeof w=="object"?null:w;return new A.ListSearchIndexesCursor(this,$,k)}async createSearchIndex(w){let[k]=await this.createSearchIndexes([w]);return k}async createSearchIndexes(w){return await(0,f.executeOperation)(this.client,new N.CreateSearchIndexesOperation(this,w))}async dropSearchIndex(w){return await(0,f.executeOperation)(this.client,new _.DropSearchIndexOperation(this,w))}async updateSearchIndex(w,k){return await(0,f.executeOperation)(this.client,new R.UpdateSearchIndexOperation(this,w,k))}};e.Collection=v}),Sn=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ChangeStreamCursor=void 0;var u=Ar(),d=Xe(),h=rn(),a=lt(),l=ye(),i=Pt(),p=class Bn extends i.AbstractCursor{constructor(o,n,r=[],E={}){super(o,n,E),this.pipeline=r,this.changeStreamCursorOptions=E,this._resumeToken=null,this.startAtOperationTime=E.startAtOperationTime??null,E.startAfter?this.resumeToken=E.startAfter:E.resumeAfter&&(this.resumeToken=E.resumeAfter)}set resumeToken(o){this._resumeToken=o,this.emit(u.ChangeStream.RESUME_TOKEN_CHANGED,o)}get resumeToken(){return this._resumeToken}get resumeOptions(){let o={...this.changeStreamCursorOptions};for(let n of["resumeAfter","startAfter","startAtOperationTime"])delete o[n];return this.resumeToken!=null?this.changeStreamCursorOptions.startAfter&&!this.hasReceived?o.startAfter=this.resumeToken:o.resumeAfter=this.resumeToken:this.startAtOperationTime!=null&&(0,l.maxWireVersion)(this.server)>=7&&(o.startAtOperationTime=this.startAtOperationTime),o}cacheResumeToken(o){this.bufferedCount()===0&&this.postBatchResumeToken?this.resumeToken=this.postBatchResumeToken:this.resumeToken=o,this.hasReceived=!0}_processBatch(o){let{postBatchResumeToken:n}=o;n&&(this.postBatchResumeToken=n,o.batchSize===0&&(this.resumeToken=n))}clone(){return new Bn(this.client,this.namespace,this.pipeline,{...this.cursorOptions})}async _initialize(o){let n=new h.AggregateOperation(this.namespace,this.pipeline,{...this.cursorOptions,...this.changeStreamCursorOptions,session:o}),r=await(0,a.executeOperation)(o.client,n),E=n.server;return this.maxWireVersion=(0,l.maxWireVersion)(E),this.startAtOperationTime==null&&this.changeStreamCursorOptions.resumeAfter==null&&this.changeStreamCursorOptions.startAfter==null&&this.maxWireVersion>=7&&(this.startAtOperationTime=r.operationTime),this._processBatch(r),this.emit(d.INIT,r),this.emit(d.RESPONSE),{server:E,session:o,response:r}}async getMore(o){let n=await super.getMore(o);return this.maxWireVersion=(0,l.maxWireVersion)(this.server),this._processBatch(n),this.emit(u.ChangeStream.MORE,n),this.emit(u.ChangeStream.RESPONSE),n}};e.ChangeStreamCursor=p}),hi=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListCollectionsOperation=void 0;var u=Tt(),d=ye(),h=Ze(),a=je(),l=class extends h.CommandOperation{constructor(i,p,A){super(i,A),this.options={...A},delete this.options.writeConcern,this.db=i,this.filter=p,this.nameOnly=!!this.options.nameOnly,this.authorizedCollections=!!this.options.authorizedCollections,typeof this.options.batchSize=="number"&&(this.batchSize=this.options.batchSize)}get commandName(){return"listCollections"}async execute(i,p){return await super.executeCommand(i,p,this.generateCommand((0,d.maxWireVersion)(i)),u.CursorResponse)}generateCommand(i){let p={listCollections:1,filter:this.filter,cursor:this.batchSize?{batchSize:this.batchSize}:{},nameOnly:this.nameOnly,authorizedCollections:this.authorizedCollections};return i>=9&&this.options.comment!==void 0&&(p.comment=this.options.comment),p}};e.ListCollectionsOperation=l,(0,a.defineAspects)(l,[a.Aspect.READ_OPERATION,a.Aspect.RETRYABLE,a.Aspect.CURSOR_CREATING])}),Dn=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ListCollectionsCursor=void 0;var u=lt(),d=hi(),h=Pt(),a=class On extends h.AbstractCursor{constructor(i,p,A){super(i.client,i.s.namespace,A),this.parent=i,this.filter=p,this.options=A}clone(){return new On(this.parent,this.filter,{...this.options,...this.cursorOptions})}async _initialize(i){let p=new d.ListCollectionsOperation(this.parent,this.filter,{...this.cursorOptions,...this.options,session:i}),A=await(0,u.executeOperation)(this.parent.client,p);return{server:p.server,session:i,response:A}}};e.ListCollectionsCursor=a}),di=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RunCommandCursor=void 0;var u=Tt(),d=pe(),h=lt(),a=un(),l=mr(),i=ye(),p=Pt(),A=class extends p.AbstractCursor{setComment(o){return this.getMoreOptions.comment=o,this}setMaxTimeMS(o){return this.getMoreOptions.maxAwaitTimeMS=o,this}setBatchSize(o){return this.getMoreOptions.batchSize=o,this}clone(){throw new d.MongoAPIError("Clone not supported, create a new cursor with db.runCursorCommand")}withReadConcern(o){throw new d.MongoAPIError("RunCommandCursor does not support readConcern it must be attached to the command being run")}addCursorFlag(o,n){throw new d.MongoAPIError("RunCommandCursor does not support cursor flags, they must be attached to the command being run")}maxTimeMS(o){throw new d.MongoAPIError("maxTimeMS must be configured on the command document directly, to configure getMore.maxTimeMS use cursor.setMaxTimeMS()")}batchSize(o){throw new d.MongoAPIError("batchSize must be configured on the command document directly, to configure getMore.batchSize use cursor.setBatchSize()")}constructor(o,n,r={}){super(o.client,(0,i.ns)(o.namespace),r),this.getMoreOptions={},this.db=o,this.command=Object.freeze({...n})}async _initialize(o){let n=new l.RunCommandOperation(this.db,this.command,{...this.cursorOptions,session:o,readPreference:this.cursorOptions.readPreference,responseType:u.CursorResponse}),r=await(0,h.executeOperation)(this.client,n);return{server:n.server,session:o,response:r}}async getMore(o){let n=new a.GetMoreOperation(this.namespace,this.id,this.server,{...this.cursorOptions,session:this.session,...this.getMoreOptions});return await(0,h.executeOperation)(this.client,n)}};e.RunCommandCursor=A}),pi=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CollectionsOperation=void 0;var u=er(),d=je(),h=class extends d.AbstractOperation{constructor(a,l){super(l),this.options=l,this.db=a}get commandName(){return"listCollections"}async execute(a,l){let i=await this.db.listCollections({},{...this.options,nameOnly:!0,readPreference:this.readPreference,session:l}).toArray(),p=[];for(let{name:A}of i)A.includes("$")||p.push(new u.Collection(this.db,A,this.db.s.options));return p}};e.CollectionsOperation=h}),Ei=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CreateCollectionOperation=void 0;var u=Zt(),d=er(),h=pe(),a=Ze(),l=Hr(),i=je(),p=new Set(["w","wtimeout","j","fsync","autoIndexId","pkFactory","raw","readPreference","session","readConcern","writeConcern","raw","fieldsAsRaw","useBigInt64","promoteLongs","promoteValues","promoteBuffers","bsonRegExp","serializeFunctions","ignoreUndefined","enableUtf8Validation"]),A="Driver support of Queryable Encryption is incompatible with server. Upgrade server to use Queryable Encryption.",o=class bn extends a.CommandOperation{constructor(r,E,m={}){super(r,m),this.options=m,this.db=r,this.name=E}get commandName(){return"create"}async execute(r,E){let m=this.db,c=this.name,b=this.options,f=b.encryptedFields??m.client.options.autoEncryption?.encryptedFieldsMap?.[`${m.databaseName}.${c}`];if(f){if(!r.loadBalanced&&r.description.maxWireVersion<u.MIN_SUPPORTED_QE_WIRE_VERSION)throw new h.MongoCompatibilityError(`${A} The minimum server version required is ${u.MIN_SUPPORTED_QE_SERVER_VERSION}`);let F=f.escCollection??`enxcol_.${c}.esc`,y=f.ecocCollection??`enxcol_.${c}.ecoc`;for(let g of[F,y])await new bn(m,g,{clusteredIndex:{key:{_id:1},unique:!0}}).executeWithoutEncryptedFieldsCheck(r,E);b.encryptedFields||(this.options={...this.options,encryptedFields:f})}let O=await this.executeWithoutEncryptedFieldsCheck(r,E);return f&&await l.CreateIndexesOperation.fromIndexSpecification(m,c,{__safeContent__:1},{}).execute(r,E),O}async executeWithoutEncryptedFieldsCheck(r,E){let m=this.db,c=this.name,b=this.options,f={create:c};for(let O in b)b[O]!=null&&typeof b[O]!="function"&&!p.has(O)&&(f[O]=b[O]);return await super.executeCommand(r,E,f),new d.Collection(m,c,b)}};e.CreateCollectionOperation=o,(0,i.defineAspects)(o,[i.Aspect.WRITE_OPERATION])}),mi=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProfilingLevelOperation=void 0;var u=pe(),d=Ze(),h=class extends d.CommandOperation{constructor(a,l){super(a,l),this.options=l}get commandName(){return"profile"}async execute(a,l){let i=await super.executeCommand(a,l,{profile:-1});if(i.ok===1){let p=i.was;if(p===0)return"off";if(p===1)return"slow_only";if(p===2)return"all";throw new u.MongoUnexpectedServerResponseError(`Illegal profiling level value ${p}`)}else throw new u.MongoUnexpectedServerResponseError("Error with profile command")}};e.ProfilingLevelOperation=h}),wn=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SetProfilingLevelOperation=e.ProfilingLevel=void 0;var u=pe(),d=ye(),h=Ze(),a=new Set(["off","slow_only","all"]);e.ProfilingLevel=Object.freeze({off:"off",slowOnly:"slow_only",all:"all"});var l=class extends h.CommandOperation{constructor(i,p,A){switch(super(i,A),this.options=A,p){case e.ProfilingLevel.off:this.profile=0;break;case e.ProfilingLevel.slowOnly:this.profile=1;break;case e.ProfilingLevel.all:this.profile=2;break;default:this.profile=0;break}this.level=p}get commandName(){return"profile"}async execute(i,p){let A=this.level;if(!a.has(A))throw new u.MongoInvalidArgumentError(`Profiling level must be one of "${(0,d.enumToString)(e.ProfilingLevel)}"`);return await super.executeCommand(i,p,{profile:this.profile}),A}};e.SetProfilingLevelOperation=l}),fi=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DbStatsOperation=void 0;var u=Ze(),d=je(),h=class extends u.CommandOperation{constructor(a,l){super(a,l),this.options=l}get commandName(){return"dbStats"}async execute(a,l){let i={dbStats:!0};return this.options.scale!=null&&(i.scale=this.options.scale),await super.executeCommand(a,l,i)}};e.DbStatsOperation=h,(0,d.defineAspects)(h,[d.Aspect.READ_OPERATION])}),Ku=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Db=void 0;var u=Y1(),d=Ue(),h=Ar(),a=er(),l=Xe(),i=Gr(),p=Dn(),A=di(),o=pe(),n=pi(),r=Ei(),E=An(),m=lt(),c=Hr(),b=mi(),f=K1(),O=yn(),F=mr(),y=wn(),g=fi(),T=yt(),D=rt(),N=ye(),_=at(),R=["writeConcern","readPreference","readPreferenceTags","native_parser","forceServerObjectId","pkFactory","serializeFunctions","raw","authSource","ignoreUndefined","readConcern","retryMiliSeconds","numberOfRetries","useBigInt64","promoteBuffers","promoteLongs","bsonRegExp","enableUtf8Validation","promoteValues","compression","retryWrites","timeoutMS"],j=class{constructor(L,I,M){if(M=M??{},M=(0,N.filterOptions)(M,R),typeof I=="string"&&I.includes("."))throw new o.MongoInvalidArgumentError("Database names cannot contain the character '.'");this.s={options:M,readPreference:D.ReadPreference.fromOptions(M),bsonOptions:(0,d.resolveBSONOptions)(M,L),pkFactory:M?.pkFactory??N.DEFAULT_PK_FACTORY,readConcern:T.ReadConcern.fromOptions(M),writeConcern:_.WriteConcern.fromOptions(M),namespace:new N.MongoDBNamespace(I)},this.client=L}get databaseName(){return this.s.namespace.db}get options(){return this.s.options}get secondaryOk(){return this.s.readPreference?.preference!=="primary"||!1}get readConcern(){return this.s.readConcern}get readPreference(){return this.s.readPreference==null?this.client.readPreference:this.s.readPreference}get bsonOptions(){return this.s.bsonOptions}get writeConcern(){return this.s.writeConcern}get namespace(){return this.s.namespace.toString()}async createCollection(L,I){return await(0,m.executeOperation)(this.client,new r.CreateCollectionOperation(this,L,(0,N.resolveOptions)(this,I)))}async command(L,I){return await(0,m.executeOperation)(this.client,new F.RunCommandOperation(this,L,{...(0,d.resolveBSONOptions)(I),session:I?.session,readPreference:I?.readPreference}))}aggregate(L=[],I){return new i.AggregationCursor(this.client,this.s.namespace,L,(0,N.resolveOptions)(this,I))}admin(){return new u.Admin(this)}collection(L,I={}){if(typeof I=="function")throw new o.MongoInvalidArgumentError("The callback form of this helper has been removed.");return new a.Collection(this,L,(0,N.resolveOptions)(this,I))}async stats(L){return await(0,m.executeOperation)(this.client,new g.DbStatsOperation(this,(0,N.resolveOptions)(this,L)))}listCollections(L={},I={}){return new p.ListCollectionsCursor(this,L,(0,N.resolveOptions)(this,I))}async renameCollection(L,I,M){return await(0,m.executeOperation)(this.client,new O.RenameOperation(this.collection(L),I,{...M,new_collection:!0,readPreference:D.ReadPreference.primary}))}async dropCollection(L,I){return await(0,m.executeOperation)(this.client,new E.DropCollectionOperation(this,L,(0,N.resolveOptions)(this,I)))}async dropDatabase(L){return await(0,m.executeOperation)(this.client,new E.DropDatabaseOperation(this,(0,N.resolveOptions)(this,L)))}async collections(L){return await(0,m.executeOperation)(this.client,new n.CollectionsOperation(this,(0,N.resolveOptions)(this,L)))}async createIndex(L,I,M){return(await(0,m.executeOperation)(this.client,c.CreateIndexesOperation.fromIndexSpecification(this,L,I,M)))[0]}async removeUser(L,I){return await(0,m.executeOperation)(this.client,new f.RemoveUserOperation(this,L,(0,N.resolveOptions)(this,I)))}async setProfilingLevel(L,I){return await(0,m.executeOperation)(this.client,new y.SetProfilingLevelOperation(this,L,(0,N.resolveOptions)(this,I)))}async profilingLevel(L){return await(0,m.executeOperation)(this.client,new b.ProfilingLevelOperation(this,(0,N.resolveOptions)(this,L)))}async indexInformation(L,I){return await this.collection(L).indexInformation((0,N.resolveOptions)(this,I))}watch(L=[],I={}){return Array.isArray(L)||(I=L,L=[]),new h.ChangeStream(this,L,(0,N.resolveOptions)(this,I))}runCursorCommand(L,I){return new A.RunCommandCursor(this,L,I)}};j.SYSTEM_NAMESPACE_COLLECTION=l.SYSTEM_NAMESPACE_COLLECTION,j.SYSTEM_INDEX_COLLECTION=l.SYSTEM_INDEX_COLLECTION,j.SYSTEM_PROFILE_COLLECTION=l.SYSTEM_PROFILE_COLLECTION,j.SYSTEM_USER_COLLECTION=l.SYSTEM_USER_COLLECTION,j.SYSTEM_COMMAND_COLLECTION=l.SYSTEM_COMMAND_COLLECTION,j.SYSTEM_JS_COLLECTION=l.SYSTEM_JS_COLLECTION,e.Db=j}),Ot=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getMongoDBClientEncryption=e.aws4=e.getSocks=e.getSnappy=e.getGcpMetadata=e.getAwsCredentialProvider=e.getZstdLibrary=e.getKerberos=void 0;var u=pe();function d(r){let E=r?{kModuleError:r}:{};return new Proxy(E,{get:(m,c)=>{if(c==="kModuleError")return r;throw r},set:()=>{throw r}})}function h(){let r;try{r=ve("kerberos")}catch(E){r=d(new u.MongoMissingDependencyError("Optional module `kerberos` not found. Please install it to enable kerberos authentication",{cause:E,dependencyName:"kerberos"}))}return r}e.getKerberos=h;function a(){let r;try{r=ve("@mongodb-js/zstd")}catch(E){r=d(new u.MongoMissingDependencyError("Optional module `@mongodb-js/zstd` not found. Please install it to enable zstd compression",{cause:E,dependencyName:"zstd"}))}return r}e.getZstdLibrary=a;function l(){try{return ve("@aws-sdk/credential-providers")}catch(r){return d(new u.MongoMissingDependencyError("Optional module `@aws-sdk/credential-providers` not found. Please install it to enable getting aws credentials via the official sdk.",{cause:r,dependencyName:"@aws-sdk/credential-providers"}))}}e.getAwsCredentialProvider=l;function i(){try{return ve("gcp-metadata")}catch(r){return d(new u.MongoMissingDependencyError("Optional module `gcp-metadata` not found. Please install it to enable getting gcp credentials via the official sdk.",{cause:r,dependencyName:"gcp-metadata"}))}}e.getGcpMetadata=i;function p(){try{return ve("snappy")}catch(r){return{kModuleError:new u.MongoMissingDependencyError("Optional module `snappy` not found. Please install it to enable snappy compression",{cause:r,dependencyName:"snappy"})}}}e.getSnappy=p;function A(){try{return ve("socks")}catch(r){return{kModuleError:new u.MongoMissingDependencyError("Optional module `socks` not found. Please install it to connections over a SOCKS5 proxy",{cause:r,dependencyName:"socks"})}}}e.getSocks=A,e.aws4=o();function o(){let r;try{r=ve("aws4")}catch(E){r=d(new u.MongoMissingDependencyError("Optional module `aws4` not found. Please install it to enable AWS authentication",{cause:E,dependencyName:"aws4"}))}return r}function n(){let r=null;try{r=ve("mongodb-client-encryption")}catch(E){return{kModuleError:new u.MongoMissingDependencyError("Optional module `mongodb-client-encryption` not found. Please install it to use auto encryption or ClientEncryption.",{cause:E,dependencyName:"mongodb-client-encryption"})}}return r}e.getMongoDBClientEncryption=n}),xt=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AuthProvider=e.AuthContext=void 0;var u=pe(),d=class{constructor(a,l,i){this.reauthenticating=!1,this.connection=a,this.credentials=l,this.options=i}};e.AuthContext=d;var h=class{async prepare(a,l){return a}async reauth(a){if(a.reauthenticating)throw new u.MongoRuntimeError("Reauthentication already in progress.");try{a.reauthenticating=!0,await this.auth(a)}finally{a.reauthenticating=!1}}};e.AuthProvider=h}),Yu=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.resolveCname=e.performGSSAPICanonicalizeHostName=e.GSSAPI=e.GSSAPICanonicalizationValue=void 0;var u=ve("dns"),d=Ot(),h=pe(),a=ye(),l=xt();e.GSSAPICanonicalizationValue=Object.freeze({on:!0,off:!1,none:"none",forward:"forward",forwardAndReverse:"forwardAndReverse"});async function i(O,F){return await O.command((0,a.ns)("$external.$cmd"),F)}var p,A=class extends l.AuthProvider{async auth(O){let{connection:F,credentials:y}=O;if(y==null)throw new h.MongoMissingCredentialsError("Credentials required for GSSAPI authentication");let{username:g}=y,T=await o(O),D=await T.step(""),N=await i(F,n(D)),_=await E(T,10,N.payload),R=await i(F,r(_,N.conversationId)),j=await m(T,g,R.payload);await i(F,{saslContinue:1,conversationId:R.conversationId,payload:j})}};e.GSSAPI=A;async function o(O){let{hostAddress:F}=O.options,{credentials:y}=O;if(!F||typeof F.host!="string"||!y)throw new h.MongoInvalidArgumentError("Connection must have host and port and credentials defined.");if(f(),"kModuleError"in p)throw p.kModuleError;let{initializeClient:g}=p,{username:T,password:D}=y,N=y.mechanismProperties,_=N.SERVICE_NAME??"mongodb",R=await c(F.host,N),j={};D!=null&&Object.assign(j,{user:T,password:D});let L=N.SERVICE_HOST??R,I=`${_}${process.platform==="win32"?"/":"@"}${L}`;return"SERVICE_REALM"in N&&(I=`${I}@${N.SERVICE_REALM}`),await g(I,j)}function n(O){return{saslStart:1,mechanism:"GSSAPI",payload:O,autoAuthorize:1}}function r(O,F){return{saslContinue:1,conversationId:F,payload:O}}async function E(O,F,y){try{return await O.step(y)||""}catch(g){if(F===0)throw g;return await E(O,F-1,y)}}async function m(O,F,y){let g=await O.unwrap(y);return await O.wrap(g||"",{user:F})}async function c(O,F){let y=F.CANONICALIZE_HOST_NAME;if(!y||y===e.GSSAPICanonicalizationValue.none)return O;if(y===e.GSSAPICanonicalizationValue.on||y===e.GSSAPICanonicalizationValue.forwardAndReverse){let{address:g}=await u.promises.lookup(O);try{let T=await u.promises.resolvePtr(g);return T.length>0?T[0]:O}catch{return await b(O)}}else return await b(O)}e.performGSSAPICanonicalizeHostName=c;async function b(O){try{let F=await u.promises.resolveCname(O);return F.length>0?F[0]:O}catch{return O}}e.resolveCname=b;function f(){p||(p=(0,d.getKerberos)())}}),Mt=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AUTH_MECHS_AUTH_SRC_EXTERNAL=e.AuthMechanism=void 0,e.AuthMechanism=Object.freeze({MONGODB_AWS:"MONGODB-AWS",MONGODB_CR:"MONGODB-CR",MONGODB_DEFAULT:"DEFAULT",MONGODB_GSSAPI:"GSSAPI",MONGODB_PLAIN:"PLAIN",MONGODB_SCRAM_SHA1:"SCRAM-SHA-1",MONGODB_SCRAM_SHA256:"SCRAM-SHA-256",MONGODB_X509:"MONGODB-X509",MONGODB_OIDC:"MONGODB-OIDC"}),e.AUTH_MECHS_AUTH_SRC_EXTERNAL=new Set([e.AuthMechanism.MONGODB_GSSAPI,e.AuthMechanism.MONGODB_AWS,e.AuthMechanism.MONGODB_OIDC,e.AuthMechanism.MONGODB_X509])}),Ju=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MongoCredentials=e.DEFAULT_ALLOWED_HOSTS=void 0;var u=pe(),d=Yu(),h=Mt();function a(o){if(o){if(Array.isArray(o.saslSupportedMechs))return o.saslSupportedMechs.includes(h.AuthMechanism.MONGODB_SCRAM_SHA256)?h.AuthMechanism.MONGODB_SCRAM_SHA256:h.AuthMechanism.MONGODB_SCRAM_SHA1;if(o.maxWireVersion>=3)return h.AuthMechanism.MONGODB_SCRAM_SHA1}return h.AuthMechanism.MONGODB_CR}var l=["test","azure","gcp"],i="Auth mechanism property ALLOWED_HOSTS must be an array of strings.";e.DEFAULT_ALLOWED_HOSTS=["*.mongodb.net","*.mongodb-qa.net","*.mongodb-dev.net","*.mongodbgov.net","localhost","127.0.0.1","::1"];var p="TOKEN_RESOURCE must be set in the auth mechanism properties when ENVIRONMENT is azure or gcp.",A=class ku{constructor(n){this.username=n.username??"",this.password=n.password,this.source=n.source,!this.source&&n.db&&(this.source=n.db),this.mechanism=n.mechanism||h.AuthMechanism.MONGODB_DEFAULT,this.mechanismProperties=n.mechanismProperties||{},this.mechanism.match(/MONGODB-AWS/i)&&(!this.username&&process.env.AWS_ACCESS_KEY_ID&&(this.username=process.env.AWS_ACCESS_KEY_ID),!this.password&&process.env.AWS_SECRET_ACCESS_KEY&&(this.password=process.env.AWS_SECRET_ACCESS_KEY),this.mechanismProperties.AWS_SESSION_TOKEN==null&&process.env.AWS_SESSION_TOKEN!=null&&(this.mechanismProperties={...this.mechanismProperties,AWS_SESSION_TOKEN:process.env.AWS_SESSION_TOKEN})),this.mechanism===h.AuthMechanism.MONGODB_OIDC&&!this.mechanismProperties.ALLOWED_HOSTS&&(this.mechanismProperties={...this.mechanismProperties,ALLOWED_HOSTS:e.DEFAULT_ALLOWED_HOSTS}),Object.freeze(this.mechanismProperties),Object.freeze(this)}equals(n){return this.mechanism===n.mechanism&&this.username===n.username&&this.password===n.password&&this.source===n.source}resolveAuthMechanism(n){return this.mechanism.match(/DEFAULT/i)?new ku({username:this.username,password:this.password,source:this.source,mechanism:a(n),mechanismProperties:this.mechanismProperties}):this}validate(){if((this.mechanism===h.AuthMechanism.MONGODB_GSSAPI||this.mechanism===h.AuthMechanism.MONGODB_CR||this.mechanism===h.AuthMechanism.MONGODB_PLAIN||this.mechanism===h.AuthMechanism.MONGODB_SCRAM_SHA1||this.mechanism===h.AuthMechanism.MONGODB_SCRAM_SHA256)&&!this.username)throw new u.MongoMissingCredentialsError(`Username required for mechanism '${this.mechanism}'`);if(this.mechanism===h.AuthMechanism.MONGODB_OIDC){if(this.username&&this.mechanismProperties.ENVIRONMENT&&this.mechanismProperties.ENVIRONMENT!=="azure")throw new u.MongoInvalidArgumentError(`username and ENVIRONMENT '${this.mechanismProperties.ENVIRONMENT}' may not be used together for mechanism '${this.mechanism}'.`);if(this.username&&this.password)throw new u.MongoInvalidArgumentError(`No password is allowed in ENVIRONMENT '${this.mechanismProperties.ENVIRONMENT}' for '${this.mechanism}'.`);if((this.mechanismProperties.ENVIRONMENT==="azure"||this.mechanismProperties.ENVIRONMENT==="gcp")&&!this.mechanismProperties.TOKEN_RESOURCE)throw new u.MongoInvalidArgumentError(p);if(this.mechanismProperties.ENVIRONMENT&&!l.includes(this.mechanismProperties.ENVIRONMENT))throw new u.MongoInvalidArgumentError(`Currently only a ENVIRONMENT in ${l.join(",")} is supported for mechanism '${this.mechanism}'.`);if(!this.mechanismProperties.ENVIRONMENT&&!this.mechanismProperties.OIDC_CALLBACK&&!this.mechanismProperties.OIDC_HUMAN_CALLBACK)throw new u.MongoInvalidArgumentError(`Either a ENVIRONMENT, OIDC_CALLBACK, or OIDC_HUMAN_CALLBACK must be specified for mechanism '${this.mechanism}'.`);if(this.mechanismProperties.ALLOWED_HOSTS){let r=this.mechanismProperties.ALLOWED_HOSTS;if(!Array.isArray(r))throw new u.MongoInvalidArgumentError(i);for(let E of r)if(typeof E!="string")throw new u.MongoInvalidArgumentError(i)}}if(h.AUTH_MECHS_AUTH_SRC_EXTERNAL.has(this.mechanism)&&this.source!=null&&this.source!=="$external")throw new u.MongoAPIError(`Invalid source '${this.source}' for mechanism '${this.mechanism}' specified.`);if(this.mechanism===h.AuthMechanism.MONGODB_PLAIN&&this.source==null)throw new u.MongoAPIError("PLAIN Authentication Mechanism needs an auth source");if(this.mechanism===h.AuthMechanism.MONGODB_X509&&this.password!=null){if(this.password===""){Reflect.set(this,"password",void 0);return}throw new u.MongoAPIError("Password not allowed for mechanism MONGODB-X509")}let n=this.mechanismProperties.CANONICALIZE_HOST_NAME??!1;if(!Object.values(d.GSSAPICanonicalizationValue).includes(n))throw new u.MongoAPIError(`Invalid CANONICALIZE_HOST_NAME value: ${n}`)}static merge(n,r){return new ku({username:r.username??n?.username??"",password:r.password??n?.password??"",mechanism:r.mechanism??n?.mechanism??h.AuthMechanism.MONGODB_DEFAULT,mechanismProperties:r.mechanismProperties??n?.mechanismProperties??{},source:r.source??r.db??n?.source??"admin"})}};e.MongoCredentials=A}),Xu=J(e=>{"use strict";function u(O,F,y){return y.globals&&(O=y.globals[O.name]),new O(`${y.context?y.context:"Value"} ${F}.`)}function d(O,F){if(typeof O=="bigint")throw u(TypeError,"is a BigInt which cannot be converted to a number",F);return F.globals?F.globals.Number(O):Number(O)}function h(O){return O>0&&O%1===.5&&!(O&1)||O<0&&O%1===-.5&&(O&1)===1?p(Math.floor(O)):p(Math.round(O))}function a(O){return p(Math.trunc(O))}function l(O){return O<0?-1:1}function i(O,F){let y=O%F;return l(F)!==l(y)?y+F:y}function p(O){return O===0?0:O}function A(O,{unsigned:F}){let y,g;F?(y=0,g=2**O-1):(y=-(2**(O-1)),g=2**(O-1)-1);let T=2**O,D=2**(O-1);return(N,_={})=>{let R=d(N,_);if(R=p(R),_.enforceRange){if(!Number.isFinite(R))throw u(TypeError,"is not a finite number",_);if(R=a(R),R<y||R>g)throw u(TypeError,`is outside the accepted range of ${y} to ${g}, inclusive`,_);return R}return!Number.isNaN(R)&&_.clamp?(R=Math.min(Math.max(R,y),g),R=h(R),R):!Number.isFinite(R)||R===0?0:(R=a(R),R>=y&&R<=g?R:(R=i(R,T),!F&&R>=D?R-T:R))}}function o(O,{unsigned:F}){let y=Number.MAX_SAFE_INTEGER,g=F?0:Number.MIN_SAFE_INTEGER,T=F?BigInt.asUintN:BigInt.asIntN;return(D,N={})=>{let _=d(D,N);if(_=p(_),N.enforceRange){if(!Number.isFinite(_))throw u(TypeError,"is not a finite number",N);if(_=a(_),_<g||_>y)throw u(TypeError,`is outside the accepted range of ${g} to ${y}, inclusive`,N);return _}if(!Number.isNaN(_)&&N.clamp)return _=Math.min(Math.max(_,g),y),_=h(_),_;if(!Number.isFinite(_)||_===0)return 0;let R=BigInt(a(_));return R=T(O,R),Number(R)}}e.any=O=>O,e.undefined=()=>{},e.boolean=O=>!!O,e.byte=A(8,{unsigned:!1}),e.octet=A(8,{unsigned:!0}),e.short=A(16,{unsigned:!1}),e["unsigned short"]=A(16,{unsigned:!0}),e.long=A(32,{unsigned:!1}),e["unsigned long"]=A(32,{unsigned:!0}),e["long long"]=o(64,{unsigned:!1}),e["unsigned long long"]=o(64,{unsigned:!0}),e.double=(O,F={})=>{let y=d(O,F);if(!Number.isFinite(y))throw u(TypeError,"is not a finite floating-point value",F);return y},e["unrestricted double"]=(O,F={})=>d(O,F),e.float=(O,F={})=>{let y=d(O,F);if(!Number.isFinite(y))throw u(TypeError,"is not a finite floating-point value",F);if(Object.is(y,-0))return y;let g=Math.fround(y);if(!Number.isFinite(g))throw u(TypeError,"is outside the range of a single-precision floating-point value",F);return g},e["unrestricted float"]=(O,F={})=>{let y=d(O,F);return isNaN(y)||Object.is(y,-0)?y:Math.fround(y)},e.DOMString=(O,F={})=>{if(F.treatNullAsEmptyString&&O===null)return"";if(typeof O=="symbol")throw u(TypeError,"is a symbol, which cannot be converted to a string",F);return(F.globals?F.globals.String:String)(O)},e.ByteString=(O,F={})=>{let y=e.DOMString(O,F),g;for(let T=0;(g=y.codePointAt(T))!==void 0;++T)if(g>255)throw u(TypeError,"is not a valid ByteString",F);return y},e.USVString=(O,F={})=>{let y=e.DOMString(O,F),g=y.length,T=[];for(let D=0;D<g;++D){let N=y.charCodeAt(D);if(N<55296||N>57343)T.push(String.fromCodePoint(N));else if(56320<=N&&N<=57343)T.push(String.fromCodePoint(65533));else if(D===g-1)T.push(String.fromCodePoint(65533));else{let _=y.charCodeAt(D+1);if(56320<=_&&_<=57343){let R=N&1023,j=_&1023;T.push(String.fromCodePoint(65536+1024*R+j)),++D}else T.push(String.fromCodePoint(65533))}}return T.join("")},e.object=(O,F={})=>{if(O===null||typeof O!="object"&&typeof O!="function")throw u(TypeError,"is not an object",F);return O};var n=Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get,r=typeof SharedArrayBuffer=="function"?Object.getOwnPropertyDescriptor(SharedArrayBuffer.prototype,"byteLength").get:null;function E(O){try{return n.call(O),!0}catch{return!1}}function m(O){try{return r.call(O),!0}catch{return!1}}function c(O){try{return new Uint8Array(O),!1}catch{return!0}}e.ArrayBuffer=(O,F={})=>{if(!E(O))throw F.allowShared&&!m(O)?u(TypeError,"is not an ArrayBuffer or SharedArrayBuffer",F):u(TypeError,"is not an ArrayBuffer",F);if(c(O))throw u(TypeError,"is a detached ArrayBuffer",F);return O};var b=Object.getOwnPropertyDescriptor(DataView.prototype,"byteLength").get;e.DataView=(O,F={})=>{try{b.call(O)}catch{throw u(TypeError,"is not a DataView",F)}if(!F.allowShared&&m(O.buffer))throw u(TypeError,"is backed by a SharedArrayBuffer, which is not allowed",F);if(c(O.buffer))throw u(TypeError,"is backed by a detached ArrayBuffer",F);return O};var f=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Uint8Array).prototype,Symbol.toStringTag).get;[Int8Array,Int16Array,Int32Array,Uint8Array,Uint16Array,Uint32Array,Uint8ClampedArray,Float32Array,Float64Array].forEach(O=>{let{name:F}=O,y=/^[AEIOU]/u.test(F)?"an":"a";e[F]=(g,T={})=>{if(!ArrayBuffer.isView(g)||f.call(g)!==F)throw u(TypeError,`is not ${y} ${F} object`,T);if(!T.allowShared&&m(g.buffer))throw u(TypeError,"is a view on a SharedArrayBuffer, which is not allowed",T);if(c(g.buffer))throw u(TypeError,"is a view on a detached ArrayBuffer",T);return g}}),e.ArrayBufferView=(O,F={})=>{if(!ArrayBuffer.isView(O))throw u(TypeError,"is not a view on an ArrayBuffer or SharedArrayBuffer",F);if(!F.allowShared&&m(O.buffer))throw u(TypeError,"is a view on a SharedArrayBuffer, which is not allowed",F);if(c(O.buffer))throw u(TypeError,"is a view on a detached ArrayBuffer",F);return O},e.BufferSource=(O,F={})=>{if(ArrayBuffer.isView(O)){if(!F.allowShared&&m(O.buffer))throw u(TypeError,"is a view on a SharedArrayBuffer, which is not allowed",F);if(c(O.buffer))throw u(TypeError,"is a view on a detached ArrayBuffer",F);return O}if(!F.allowShared&&!E(O))throw u(TypeError,"is not an ArrayBuffer or a view on one",F);if(F.allowShared&&!m(O)&&!E(O))throw u(TypeError,"is not an ArrayBuffer, SharedArrayBuffer, or a view on one",F);if(c(O))throw u(TypeError,"is a detached ArrayBuffer",F);return O},e.DOMTimeStamp=e["unsigned long long"]}),Zu=J((e,u)=>{"use strict";function d(Y){return typeof Y=="object"&&Y!==null||typeof Y=="function"}var h=Function.prototype.call.bind(Object.prototype.hasOwnProperty);function a(Y,se){for(let x of Reflect.ownKeys(se)){let G=Reflect.getOwnPropertyDescriptor(se,x);if(G&&!Reflect.defineProperty(Y,x,G))throw new TypeError(`Cannot redefine property: ${String(x)}`)}}function l(Y,se){let x=r(Y);return Object.defineProperties(Object.create(x["%Object.prototype%"]),Object.getOwnPropertyDescriptors(se))}var i=Symbol("wrapper"),p=Symbol("impl"),A=Symbol("SameObject caches"),o=Symbol.for("[webidl2js] constructor registry"),n=Object.getPrototypeOf(Object.getPrototypeOf(async function*(){}).prototype);function r(Y){if(h(Y,o))return Y[o];let se=Object.create(null);se["%Object.prototype%"]=Y.Object.prototype,se["%IteratorPrototype%"]=Object.getPrototypeOf(Object.getPrototypeOf(new Y.Array()[Symbol.iterator]()));try{se["%AsyncIteratorPrototype%"]=Object.getPrototypeOf(Object.getPrototypeOf(Y.eval("(async function* () {})").prototype))}catch{se["%AsyncIteratorPrototype%"]=n}return Y[o]=se,se}function E(Y,se,x){return Y[A]||(Y[A]=Object.create(null)),se in Y[A]||(Y[A][se]=x()),Y[A][se]}function m(Y){return Y?Y[i]:null}function c(Y){return Y?Y[p]:null}function b(Y){return m(Y)||Y}function f(Y){return c(Y)||Y}var O=Symbol("internal");function F(Y){if(typeof Y!="string")return!1;let se=Y>>>0;if(se===2**32-1)return!1;let x=`${se}`;return Y===x}var y=Object.getOwnPropertyDescriptor(ArrayBuffer.prototype,"byteLength").get;function g(Y){try{return y.call(Y),!0}catch{return!1}}function T([Y,se],x){let G;switch(x){case"key":G=Y;break;case"value":G=se;break;case"key+value":G=[Y,se];break}return{value:G,done:!1}}var D=Symbol("supports property index"),N=Symbol("supported property indices"),_=Symbol("supports property name"),R=Symbol("supported property names"),j=Symbol("indexed property get"),L=Symbol("indexed property set new"),I=Symbol("indexed property set existing"),M=Symbol("named property get"),S=Symbol("named property set new"),v=Symbol("named property set existing"),w=Symbol("named property delete"),k=Symbol("async iterator get the next iteration result"),$=Symbol("async iterator return steps"),X=Symbol("async iterator initialization steps"),de=Symbol("async iterator end of iteration");u.exports=e={isObject:d,hasOwn:h,define:a,newObjectInRealm:l,wrapperSymbol:i,implSymbol:p,getSameObject:E,ctorRegistrySymbol:o,initCtorRegistry:r,wrapperForImpl:m,implForWrapper:c,tryWrapperForImpl:b,tryImplForWrapper:f,iterInternalSymbol:O,isArrayBuffer:g,isArrayIndexPropName:F,supportsPropertyIndex:D,supportedPropertyIndices:N,supportsPropertyName:_,supportedPropertyNames:R,indexedGet:j,indexedSetNew:L,indexedSetExisting:I,namedGet:M,namedSetNew:S,namedSetExisting:v,namedDelete:w,asyncIteratorNext:k,asyncIteratorReturn:$,asyncIteratorInit:X,asyncIteratorEOI:de,iteratorResult:T}}),Fn={};U1(Fn,{decode:()=>_r,default:()=>Mn,encode:()=>Pr,toASCII:()=>Wu,toUnicode:()=>$u,ucs2decode:()=>Uu,ucs2encode:()=>ju});function It(e){throw new RangeError(Tn[e])}function Ai(e,u){let d=[],h=e.length;for(;h--;)d[h]=u(e[h]);return d}function _1(e,u){let d=e.split("@"),h="";d.length>1&&(h=d[0]+"@",e=d[1]),e=e.replace(vn,".");let a=e.split("."),l=Ai(a,u).join(".");return h+l}function Uu(e){let u=[],d=0,h=e.length;for(;d<h;){let a=e.charCodeAt(d++);if(a>=55296&&a<=56319&&d<h){let l=e.charCodeAt(d++);(l&64512)==56320?u.push(((a&1023)<<10)+(l&1023)+65536):(u.push(a),d--)}else u.push(a)}return u}var vu,P1,x1,vn,Tn,Tr,At,Mr,ju,L1,Tu,Mu,_r,Pr,$u,Wu,k1,Mn,Ci=Yo(()=>{"use strict";vu="-",P1=/^xn--/,x1=/[^\0-\x7F]/,vn=/[\x2E\u3002\uFF0E\uFF61]/g,Tn={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Tr=35,At=Math.floor,Mr=String.fromCharCode,ju=e=>String.fromCodePoint(...e),L1=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:36},Tu=function(e,u){return e+22+75*(e<26)-((u!=0)<<5)},Mu=function(e,u,d){let h=0;for(e=d?At(e/700):e>>1,e+=At(e/u);e>Tr*26>>1;h+=36)e=At(e/Tr);return At(h+(Tr+1)*e/(e+38))},_r=function(e){let u=[],d=e.length,h=0,a=128,l=72,i=e.lastIndexOf(vu);i<0&&(i=0);for(let p=0;p<i;++p)e.charCodeAt(p)>=128&&It("not-basic"),u.push(e.charCodeAt(p));for(let p=i>0?i+1:0;p<d;){let A=h;for(let n=1,r=36;;r+=36){p>=d&&It("invalid-input");let E=L1(e.charCodeAt(p++));E>=36&&It("invalid-input"),E>At((2147483647-h)/n)&&It("overflow"),h+=E*n;let m=r<=l?1:r>=l+26?26:r-l;if(E<m)break;let c=36-m;n>At(2147483647/c)&&It("overflow"),n*=c}let o=u.length+1;l=Mu(h-A,o,A==0),At(h/o)>2147483647-a&&It("overflow"),a+=At(h/o),h%=o,u.splice(h++,0,a)}return String.fromCodePoint(...u)},Pr=function(e){let u=[];e=Uu(e);let d=e.length,h=128,a=0,l=72;for(let A of e)A<128&&u.push(Mr(A));let i=u.length,p=i;for(i&&u.push(vu);p<d;){let A=2147483647;for(let n of e)n>=h&&n<A&&(A=n);let o=p+1;A-h>At((2147483647-a)/o)&&It("overflow"),a+=(A-h)*o,h=A;for(let n of e)if(n<h&&++a>2147483647&&It("overflow"),n===h){let r=a;for(let E=36;;E+=36){let m=E<=l?1:E>=l+26?26:E-l;if(r<m)break;let c=r-m,b=36-m;u.push(Mr(Tu(m+c%b,0))),r=At(c/b)}u.push(Mr(Tu(r,0))),l=Mu(a,o,p===i),a=0,++p}++a,++h}return u.join("")},$u=function(e){return _1(e,function(u){return P1.test(u)?_r(u.slice(4).toLowerCase()):u})},Wu=function(e){return _1(e,function(u){return x1.test(u)?"xn--"+Pr(u):u})},k1={version:"2.3.1",ucs2:{decode:Uu,encode:ju},decode:_r,encode:Pr,toASCII:Wu,toUnicode:$u},Mn=k1}),gi=J((e,u)=>{"use strict";var d=/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\u{101FD}\u{102E0}\u{10376}-\u{1037A}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10D24}-\u{10D27}\u{10EAB}\u{10EAC}\u{10EFD}-\u{10EFF}\u{10F46}-\u{10F50}\u{10F82}-\u{10F85}\u{11000}-\u{11002}\u{11038}-\u{11046}\u{11070}\u{11073}\u{11074}\u{1107F}-\u{11082}\u{110B0}-\u{110BA}\u{110C2}\u{11100}-\u{11102}\u{11127}-\u{11134}\u{11145}\u{11146}\u{11173}\u{11180}-\u{11182}\u{111B3}-\u{111C0}\u{111C9}-\u{111CC}\u{111CE}\u{111CF}\u{1122C}-\u{11237}\u{1123E}\u{11241}\u{112DF}-\u{112EA}\u{11300}-\u{11303}\u{1133B}\u{1133C}\u{1133E}-\u{11344}\u{11347}\u{11348}\u{1134B}-\u{1134D}\u{11357}\u{11362}\u{11363}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{11435}-\u{11446}\u{1145E}\u{114B0}-\u{114C3}\u{115AF}-\u{115B5}\u{115B8}-\u{115C0}\u{115DC}\u{115DD}\u{11630}-\u{11640}\u{116AB}-\u{116B7}\u{1171D}-\u{1172B}\u{1182C}-\u{1183A}\u{11930}-\u{11935}\u{11937}\u{11938}\u{1193B}-\u{1193E}\u{11940}\u{11942}\u{11943}\u{119D1}-\u{119D7}\u{119DA}-\u{119E0}\u{119E4}\u{11A01}-\u{11A0A}\u{11A33}-\u{11A39}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A5B}\u{11A8A}-\u{11A99}\u{11C2F}-\u{11C36}\u{11C38}-\u{11C3F}\u{11C92}-\u{11CA7}\u{11CA9}-\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D8A}-\u{11D8E}\u{11D90}\u{11D91}\u{11D93}-\u{11D97}\u{11EF3}-\u{11EF6}\u{11F00}\u{11F01}\u{11F03}\u{11F34}-\u{11F3A}\u{11F3E}-\u{11F42}\u{13440}\u{13447}-\u{13455}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F51}-\u{16F87}\u{16F8F}-\u{16F92}\u{16FE4}\u{16FF0}\u{16FF1}\u{1BC9D}\u{1BC9E}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1D165}-\u{1D169}\u{1D16D}-\u{1D172}\u{1D17B}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D242}-\u{1D244}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E08F}\u{1E130}-\u{1E136}\u{1E2AE}\u{1E2EC}-\u{1E2EF}\u{1E4EC}-\u{1E4EF}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94A}\u{E0100}-\u{E01EF}]/u,h=/[\u094D\u09CD\u0A4D\u0ACD\u0B4D\u0BCD\u0C4D\u0CCD\u0D3B\u0D3C\u0D4D\u0DCA\u0E3A\u0EBA\u0F84\u1039\u103A\u1714\u1734\u17D2\u1A60\u1B44\u1BAA\u1BAB\u1BF2\u1BF3\u2D7F\uA806\uA8C4\uA953\uA9C0\uAAF6\uABED\u{10A3F}\u{11046}\u{1107F}\u{110B9}\u{11133}\u{11134}\u{111C0}\u{11235}\u{112EA}\u{1134D}\u{11442}\u{114C2}\u{115BF}\u{1163F}\u{116B6}\u{1172B}\u{11839}\u{119E0}\u{11A34}\u{11A47}\u{11A99}\u{11C3F}\u{11D44}\u{11D45}\u{11D97}]/u,a=/[\u0620\u0626\u0628\u062A-\u062E\u0633-\u063F\u0641-\u0647\u0649\u064A\u066E\u066F\u0678-\u0687\u069A-\u06BF\u06C1\u06C2\u06CC\u06CE\u06D0\u06D1\u06FA-\u06FC\u06FF\u0712-\u0714\u071A-\u071D\u071F-\u0727\u0729\u072B\u072D\u072E\u074E-\u0758\u075C-\u076A\u076D-\u0770\u0772\u0775-\u0777\u077A-\u077F\u07CA-\u07EA\u0841-\u0845\u0848\u084A-\u0853\u0855\u0860\u0862-\u0865\u0868\u08A0-\u08A9\u08AF\u08B0\u08B3\u08B4\u08B6-\u08B8\u08BA-\u08BD\u1807\u1820-\u1878\u1887-\u18A8\u18AA\uA840-\uA872\u{10AC0}-\u{10AC4}\u{10ACD}\u{10AD3}-\u{10ADC}\u{10ADE}-\u{10AE0}\u{10AEB}-\u{10AEE}\u{10B80}\u{10B82}\u{10B86}-\u{10B88}\u{10B8A}\u{10B8B}\u{10B8D}\u{10B90}\u{10BAD}\u{10BAE}\u{10D00}-\u{10D21}\u{10D23}\u{10F30}-\u{10F32}\u{10F34}-\u{10F44}\u{10F51}-\u{10F53}\u{1E900}-\u{1E943}][\xAD\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u061C\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u070F\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC6\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200B\u200E\u200F\u202A-\u202E\u2060-\u2064\u206A-\u206F\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFEFF\uFFF9-\uFFFB\u{101FD}\u{102E0}\u{10376}-\u{1037A}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10D24}-\u{10D27}\u{10F46}-\u{10F50}\u{11001}\u{11038}-\u{11046}\u{1107F}-\u{11081}\u{110B3}-\u{110B6}\u{110B9}\u{110BA}\u{11100}-\u{11102}\u{11127}-\u{1112B}\u{1112D}-\u{11134}\u{11173}\u{11180}\u{11181}\u{111B6}-\u{111BE}\u{111C9}-\u{111CC}\u{1122F}-\u{11231}\u{11234}\u{11236}\u{11237}\u{1123E}\u{112DF}\u{112E3}-\u{112EA}\u{11300}\u{11301}\u{1133B}\u{1133C}\u{11340}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{11438}-\u{1143F}\u{11442}-\u{11444}\u{11446}\u{1145E}\u{114B3}-\u{114B8}\u{114BA}\u{114BF}\u{114C0}\u{114C2}\u{114C3}\u{115B2}-\u{115B5}\u{115BC}\u{115BD}\u{115BF}\u{115C0}\u{115DC}\u{115DD}\u{11633}-\u{1163A}\u{1163D}\u{1163F}\u{11640}\u{116AB}\u{116AD}\u{116B0}-\u{116B5}\u{116B7}\u{1171D}-\u{1171F}\u{11722}-\u{11725}\u{11727}-\u{1172B}\u{1182F}-\u{11837}\u{11839}\u{1183A}\u{119D4}-\u{119D7}\u{119DA}\u{119DB}\u{119E0}\u{11A01}-\u{11A0A}\u{11A33}-\u{11A38}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A56}\u{11A59}-\u{11A5B}\u{11A8A}-\u{11A96}\u{11A98}\u{11A99}\u{11C30}-\u{11C36}\u{11C38}-\u{11C3D}\u{11C3F}\u{11C92}-\u{11CA7}\u{11CAA}-\u{11CB0}\u{11CB2}\u{11CB3}\u{11CB5}\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D90}\u{11D91}\u{11D95}\u{11D97}\u{11EF3}\u{11EF4}\u{13430}-\u{13438}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F8F}-\u{16F92}\u{1BC9D}\u{1BC9E}\u{1BCA0}-\u{1BCA3}\u{1D167}-\u{1D169}\u{1D173}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D242}-\u{1D244}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E130}-\u{1E136}\u{1E2EC}-\u{1E2EF}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94B}\u{E0001}\u{E0020}-\u{E007F}\u{E0100}-\u{E01EF}]*\u200C[\xAD\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u061C\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u070F\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C04\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CBF\u0CC6\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u200B\u200E\u200F\u202A-\u202E\u2060-\u2064\u206A-\u206F\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFEFF\uFFF9-\uFFFB\u{101FD}\u{102E0}\u{10376}-\u{1037A}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10D24}-\u{10D27}\u{10F46}-\u{10F50}\u{11001}\u{11038}-\u{11046}\u{1107F}-\u{11081}\u{110B3}-\u{110B6}\u{110B9}\u{110BA}\u{11100}-\u{11102}\u{11127}-\u{1112B}\u{1112D}-\u{11134}\u{11173}\u{11180}\u{11181}\u{111B6}-\u{111BE}\u{111C9}-\u{111CC}\u{1122F}-\u{11231}\u{11234}\u{11236}\u{11237}\u{1123E}\u{112DF}\u{112E3}-\u{112EA}\u{11300}\u{11301}\u{1133B}\u{1133C}\u{11340}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{11438}-\u{1143F}\u{11442}-\u{11444}\u{11446}\u{1145E}\u{114B3}-\u{114B8}\u{114BA}\u{114BF}\u{114C0}\u{114C2}\u{114C3}\u{115B2}-\u{115B5}\u{115BC}\u{115BD}\u{115BF}\u{115C0}\u{115DC}\u{115DD}\u{11633}-\u{1163A}\u{1163D}\u{1163F}\u{11640}\u{116AB}\u{116AD}\u{116B0}-\u{116B5}\u{116B7}\u{1171D}-\u{1171F}\u{11722}-\u{11725}\u{11727}-\u{1172B}\u{1182F}-\u{11837}\u{11839}\u{1183A}\u{119D4}-\u{119D7}\u{119DA}\u{119DB}\u{119E0}\u{11A01}-\u{11A0A}\u{11A33}-\u{11A38}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A56}\u{11A59}-\u{11A5B}\u{11A8A}-\u{11A96}\u{11A98}\u{11A99}\u{11C30}-\u{11C36}\u{11C38}-\u{11C3D}\u{11C3F}\u{11C92}-\u{11CA7}\u{11CAA}-\u{11CB0}\u{11CB2}\u{11CB3}\u{11CB5}\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D90}\u{11D91}\u{11D95}\u{11D97}\u{11EF3}\u{11EF4}\u{13430}-\u{13438}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F8F}-\u{16F92}\u{1BC9D}\u{1BC9E}\u{1BCA0}-\u{1BCA3}\u{1D167}-\u{1D169}\u{1D173}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D242}-\u{1D244}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E130}-\u{1E136}\u{1E2EC}-\u{1E2EF}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94B}\u{E0001}\u{E0020}-\u{E007F}\u{E0100}-\u{E01EF}]*[\u0620\u0622-\u063F\u0641-\u064A\u066E\u066F\u0671-\u0673\u0675-\u06D3\u06D5\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u077F\u07CA-\u07EA\u0840-\u0855\u0860\u0862-\u0865\u0867-\u086A\u08A0-\u08AC\u08AE-\u08B4\u08B6-\u08BD\u1807\u1820-\u1878\u1887-\u18A8\u18AA\uA840-\uA871\u{10AC0}-\u{10AC5}\u{10AC7}\u{10AC9}\u{10ACA}\u{10ACE}-\u{10AD6}\u{10AD8}-\u{10AE1}\u{10AE4}\u{10AEB}-\u{10AEF}\u{10B80}-\u{10B91}\u{10BA9}-\u{10BAE}\u{10D01}-\u{10D23}\u{10F30}-\u{10F44}\u{10F51}-\u{10F54}\u{1E900}-\u{1E943}]/u,l=/[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05EA\u05EF-\u05F4\u0600-\u0605\u0608\u060B\u060D\u061B-\u064A\u0660-\u0669\u066B-\u066F\u0671-\u06D5\u06DD\u06E5\u06E6\u06EE\u06EF\u06FA-\u070D\u070F\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u083E\u0840-\u0858\u085E\u0860-\u086A\u0870-\u088E\u0890\u0891\u08A0-\u08C9\u08E2\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBC2\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFC\uFE70-\uFE74\uFE76-\uFEFC\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10857}-\u{1089E}\u{108A7}-\u{108AF}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{108FB}-\u{1091B}\u{10920}-\u{10939}\u{1093F}\u{10980}-\u{109B7}\u{109BC}-\u{109CF}\u{109D2}-\u{10A00}\u{10A10}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A40}-\u{10A48}\u{10A50}-\u{10A58}\u{10A60}-\u{10A9F}\u{10AC0}-\u{10AE4}\u{10AEB}-\u{10AF6}\u{10B00}-\u{10B35}\u{10B40}-\u{10B55}\u{10B58}-\u{10B72}\u{10B78}-\u{10B91}\u{10B99}-\u{10B9C}\u{10BA9}-\u{10BAF}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10CFA}-\u{10D23}\u{10D30}-\u{10D39}\u{10E60}-\u{10E7E}\u{10E80}-\u{10EA9}\u{10EAD}\u{10EB0}\u{10EB1}\u{10F00}-\u{10F27}\u{10F30}-\u{10F45}\u{10F51}-\u{10F59}\u{10F70}-\u{10F81}\u{10F86}-\u{10F89}\u{10FB0}-\u{10FCB}\u{10FE0}-\u{10FF6}\u{1E800}-\u{1E8C4}\u{1E8C7}-\u{1E8CF}\u{1E900}-\u{1E943}\u{1E94B}\u{1E950}-\u{1E959}\u{1E95E}\u{1E95F}\u{1EC71}-\u{1ECB4}\u{1ED01}-\u{1ED3D}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}]/u,i=/[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02BB-\u02C1\u02D0\u02D1\u02E0-\u02E4\u02EE\u0370-\u0373\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0482\u048A-\u052F\u0531-\u0556\u0559-\u0589\u0903-\u0939\u093B\u093D-\u0940\u0949-\u094C\u094E-\u0950\u0958-\u0961\u0964-\u0980\u0982\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD-\u09C0\u09C7\u09C8\u09CB\u09CC\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09FA\u09FC\u09FD\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3E-\u0A40\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A76\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD-\u0AC0\u0AC9\u0ACB\u0ACC\u0AD0\u0AE0\u0AE1\u0AE6-\u0AF0\u0AF9\u0B02\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B3E\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0B57\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0BD0\u0BD7\u0BE6-\u0BF2\u0C01-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C41-\u0C44\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C77\u0C7F\u0C80\u0C82-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD-\u0CC4\u0CC6-\u0CC8\u0CCA\u0CCB\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1-\u0CF3\u0D02-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D4E\u0D4F\u0D54-\u0D61\u0D66-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCF-\u0DD1\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF4\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E4F-\u0E5B\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00-\u0F17\u0F1A-\u0F34\u0F36\u0F38\u0F3E-\u0F47\u0F49-\u0F6C\u0F7F\u0F85\u0F88-\u0F8C\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FDA\u1000-\u102C\u1031\u1038\u103B\u103C\u103F-\u1057\u105A-\u105D\u1061-\u1070\u1075-\u1081\u1083\u1084\u1087-\u108C\u108E-\u109C\u109E-\u10C5\u10C7\u10CD\u10D0-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1360-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u167F\u1681-\u169A\u16A0-\u16F8\u1700-\u1711\u1715\u171F-\u1731\u1734-\u1736\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17B6\u17BE-\u17C5\u17C7\u17C8\u17D4-\u17DA\u17DC\u17E0-\u17E9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A19\u1A1A\u1A1E-\u1A55\u1A57\u1A61\u1A63\u1A64\u1A6D-\u1A72\u1A80-\u1A89\u1A90-\u1A99\u1AA0-\u1AAD\u1B04-\u1B33\u1B35\u1B3B\u1B3D-\u1B41\u1B43-\u1B4C\u1B50-\u1B6A\u1B74-\u1B7E\u1B82-\u1BA1\u1BA6\u1BA7\u1BAA\u1BAE-\u1BE5\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1BFC-\u1C2B\u1C34\u1C35\u1C3B-\u1C49\u1C4D-\u1C88\u1C90-\u1CBA\u1CBD-\u1CC7\u1CD3\u1CE1\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5-\u1CF7\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200E\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u214F\u2160-\u2188\u2336-\u237A\u2395\u249C-\u24E9\u26AC\u2800-\u28FF\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D70\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u302E\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3190-\u31BF\u31F0-\u321C\u3220-\u324F\u3260-\u327B\u327F-\u32B0\u32C0-\u32CB\u32D0-\u3376\u337B-\u33DD\u33E0-\u33FE\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA60C\uA610-\uA62B\uA640-\uA66E\uA680-\uA69D\uA6A0-\uA6EF\uA6F2-\uA6F7\uA722-\uA787\uA789-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA824\uA827\uA830-\uA837\uA840-\uA873\uA880-\uA8C3\uA8CE-\uA8D9\uA8F2-\uA8FE\uA900-\uA925\uA92E-\uA946\uA952\uA953\uA95F-\uA97C\uA983-\uA9B2\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9CD\uA9CF-\uA9D9\uA9DE-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA2F\uAA30\uAA33\uAA34\uAA40-\uAA42\uAA44-\uAA4B\uAA4D\uAA50-\uAA59\uAA5C-\uAA7B\uAA7D-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAAEB\uAAEE-\uAAF5\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB69\uAB70-\uABE4\uABE6\uABE7\uABE9-\uABEC\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uD800-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\u{10000}-\u{1000B}\u{1000D}-\u{10026}\u{10028}-\u{1003A}\u{1003C}\u{1003D}\u{1003F}-\u{1004D}\u{10050}-\u{1005D}\u{10080}-\u{100FA}\u{10100}\u{10102}\u{10107}-\u{10133}\u{10137}-\u{1013F}\u{1018D}\u{1018E}\u{101D0}-\u{101FC}\u{10280}-\u{1029C}\u{102A0}-\u{102D0}\u{10300}-\u{10323}\u{1032D}-\u{1034A}\u{10350}-\u{10375}\u{10380}-\u{1039D}\u{1039F}-\u{103C3}\u{103C8}-\u{103D5}\u{10400}-\u{1049D}\u{104A0}-\u{104A9}\u{104B0}-\u{104D3}\u{104D8}-\u{104FB}\u{10500}-\u{10527}\u{10530}-\u{10563}\u{1056F}-\u{1057A}\u{1057C}-\u{1058A}\u{1058C}-\u{10592}\u{10594}\u{10595}\u{10597}-\u{105A1}\u{105A3}-\u{105B1}\u{105B3}-\u{105B9}\u{105BB}\u{105BC}\u{10600}-\u{10736}\u{10740}-\u{10755}\u{10760}-\u{10767}\u{10780}-\u{10785}\u{10787}-\u{107B0}\u{107B2}-\u{107BA}\u{11000}\u{11002}-\u{11037}\u{11047}-\u{1104D}\u{11066}-\u{1106F}\u{11071}\u{11072}\u{11075}\u{11082}-\u{110B2}\u{110B7}\u{110B8}\u{110BB}-\u{110C1}\u{110CD}\u{110D0}-\u{110E8}\u{110F0}-\u{110F9}\u{11103}-\u{11126}\u{1112C}\u{11136}-\u{11147}\u{11150}-\u{11172}\u{11174}-\u{11176}\u{11182}-\u{111B5}\u{111BF}-\u{111C8}\u{111CD}\u{111CE}\u{111D0}-\u{111DF}\u{111E1}-\u{111F4}\u{11200}-\u{11211}\u{11213}-\u{1122E}\u{11232}\u{11233}\u{11235}\u{11238}-\u{1123D}\u{1123F}\u{11240}\u{11280}-\u{11286}\u{11288}\u{1128A}-\u{1128D}\u{1128F}-\u{1129D}\u{1129F}-\u{112A9}\u{112B0}-\u{112DE}\u{112E0}-\u{112E2}\u{112F0}-\u{112F9}\u{11302}\u{11303}\u{11305}-\u{1130C}\u{1130F}\u{11310}\u{11313}-\u{11328}\u{1132A}-\u{11330}\u{11332}\u{11333}\u{11335}-\u{11339}\u{1133D}-\u{1133F}\u{11341}-\u{11344}\u{11347}\u{11348}\u{1134B}-\u{1134D}\u{11350}\u{11357}\u{1135D}-\u{11363}\u{11400}-\u{11437}\u{11440}\u{11441}\u{11445}\u{11447}-\u{1145B}\u{1145D}\u{1145F}-\u{11461}\u{11480}-\u{114B2}\u{114B9}\u{114BB}-\u{114BE}\u{114C1}\u{114C4}-\u{114C7}\u{114D0}-\u{114D9}\u{11580}-\u{115B1}\u{115B8}-\u{115BB}\u{115BE}\u{115C1}-\u{115DB}\u{11600}-\u{11632}\u{1163B}\u{1163C}\u{1163E}\u{11641}-\u{11644}\u{11650}-\u{11659}\u{11680}-\u{116AA}\u{116AC}\u{116AE}\u{116AF}\u{116B6}\u{116B8}\u{116B9}\u{116C0}-\u{116C9}\u{11700}-\u{1171A}\u{11720}\u{11721}\u{11726}\u{11730}-\u{11746}\u{11800}-\u{1182E}\u{11838}\u{1183B}\u{118A0}-\u{118F2}\u{118FF}-\u{11906}\u{11909}\u{1190C}-\u{11913}\u{11915}\u{11916}\u{11918}-\u{11935}\u{11937}\u{11938}\u{1193D}\u{1193F}-\u{11942}\u{11944}-\u{11946}\u{11950}-\u{11959}\u{119A0}-\u{119A7}\u{119AA}-\u{119D3}\u{119DC}-\u{119DF}\u{119E1}-\u{119E4}\u{11A00}\u{11A07}\u{11A08}\u{11A0B}-\u{11A32}\u{11A39}\u{11A3A}\u{11A3F}-\u{11A46}\u{11A50}\u{11A57}\u{11A58}\u{11A5C}-\u{11A89}\u{11A97}\u{11A9A}-\u{11AA2}\u{11AB0}-\u{11AF8}\u{11B00}-\u{11B09}\u{11C00}-\u{11C08}\u{11C0A}-\u{11C2F}\u{11C3E}-\u{11C45}\u{11C50}-\u{11C6C}\u{11C70}-\u{11C8F}\u{11CA9}\u{11CB1}\u{11CB4}\u{11D00}-\u{11D06}\u{11D08}\u{11D09}\u{11D0B}-\u{11D30}\u{11D46}\u{11D50}-\u{11D59}\u{11D60}-\u{11D65}\u{11D67}\u{11D68}\u{11D6A}-\u{11D8E}\u{11D93}\u{11D94}\u{11D96}\u{11D98}\u{11DA0}-\u{11DA9}\u{11EE0}-\u{11EF2}\u{11EF5}-\u{11EF8}\u{11F02}-\u{11F10}\u{11F12}-\u{11F35}\u{11F3E}\u{11F3F}\u{11F41}\u{11F43}-\u{11F59}\u{11FB0}\u{11FC0}-\u{11FD4}\u{11FFF}-\u{12399}\u{12400}-\u{1246E}\u{12470}-\u{12474}\u{12480}-\u{12543}\u{12F90}-\u{12FF2}\u{13000}-\u{1343F}\u{13441}-\u{13446}\u{14400}-\u{14646}\u{16800}-\u{16A38}\u{16A40}-\u{16A5E}\u{16A60}-\u{16A69}\u{16A6E}-\u{16ABE}\u{16AC0}-\u{16AC9}\u{16AD0}-\u{16AED}\u{16AF5}\u{16B00}-\u{16B2F}\u{16B37}-\u{16B45}\u{16B50}-\u{16B59}\u{16B5B}-\u{16B61}\u{16B63}-\u{16B77}\u{16B7D}-\u{16B8F}\u{16E40}-\u{16E9A}\u{16F00}-\u{16F4A}\u{16F50}-\u{16F87}\u{16F93}-\u{16F9F}\u{16FE0}\u{16FE1}\u{16FE3}\u{16FF0}\u{16FF1}\u{17000}-\u{187F7}\u{18800}-\u{18CD5}\u{18D00}-\u{18D08}\u{1AFF0}-\u{1AFF3}\u{1AFF5}-\u{1AFFB}\u{1AFFD}\u{1AFFE}\u{1B000}-\u{1B122}\u{1B132}\u{1B150}-\u{1B152}\u{1B155}\u{1B164}-\u{1B167}\u{1B170}-\u{1B2FB}\u{1BC00}-\u{1BC6A}\u{1BC70}-\u{1BC7C}\u{1BC80}-\u{1BC88}\u{1BC90}-\u{1BC99}\u{1BC9C}\u{1BC9F}\u{1CF50}-\u{1CFC3}\u{1D000}-\u{1D0F5}\u{1D100}-\u{1D126}\u{1D129}-\u{1D166}\u{1D16A}-\u{1D172}\u{1D183}\u{1D184}\u{1D18C}-\u{1D1A9}\u{1D1AE}-\u{1D1E8}\u{1D2C0}-\u{1D2D3}\u{1D2E0}-\u{1D2F3}\u{1D360}-\u{1D378}\u{1D400}-\u{1D454}\u{1D456}-\u{1D49C}\u{1D49E}\u{1D49F}\u{1D4A2}\u{1D4A5}\u{1D4A6}\u{1D4A9}-\u{1D4AC}\u{1D4AE}-\u{1D4B9}\u{1D4BB}\u{1D4BD}-\u{1D4C3}\u{1D4C5}-\u{1D505}\u{1D507}-\u{1D50A}\u{1D50D}-\u{1D514}\u{1D516}-\u{1D51C}\u{1D51E}-\u{1D539}\u{1D53B}-\u{1D53E}\u{1D540}-\u{1D544}\u{1D546}\u{1D54A}-\u{1D550}\u{1D552}-\u{1D6A5}\u{1D6A8}-\u{1D6DA}\u{1D6DC}-\u{1D714}\u{1D716}-\u{1D74E}\u{1D750}-\u{1D788}\u{1D78A}-\u{1D7C2}\u{1D7C4}-\u{1D7CB}\u{1D800}-\u{1D9FF}\u{1DA37}-\u{1DA3A}\u{1DA6D}-\u{1DA74}\u{1DA76}-\u{1DA83}\u{1DA85}-\u{1DA8B}\u{1DF00}-\u{1DF1E}\u{1DF25}-\u{1DF2A}\u{1E030}-\u{1E06D}\u{1E100}-\u{1E12C}\u{1E137}-\u{1E13D}\u{1E140}-\u{1E149}\u{1E14E}\u{1E14F}\u{1E290}-\u{1E2AD}\u{1E2C0}-\u{1E2EB}\u{1E2F0}-\u{1E2F9}\u{1E4D0}-\u{1E4EB}\u{1E4F0}-\u{1E4F9}\u{1E7E0}-\u{1E7E6}\u{1E7E8}-\u{1E7EB}\u{1E7ED}\u{1E7EE}\u{1E7F0}-\u{1E7FE}\u{1F110}-\u{1F12E}\u{1F130}-\u{1F169}\u{1F170}-\u{1F1AC}\u{1F1E6}-\u{1F202}\u{1F210}-\u{1F23B}\u{1F240}-\u{1F248}\u{1F250}\u{1F251}\u{20000}-\u{2A6DF}\u{2A700}-\u{2B739}\u{2B740}-\u{2B81D}\u{2B820}-\u{2CEA1}\u{2CEB0}-\u{2EBE0}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{323AF}\u{F0000}-\u{FFFFD}\u{100000}-\u{10FFFD}]/u,p=/[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05EA\u05EF-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u070D\u070F\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u083E\u0840-\u0858\u085E\u0860-\u086A\u0870-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBC2\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFC\uFE70-\uFE74\uFE76-\uFEFC\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10857}-\u{1089E}\u{108A7}-\u{108AF}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{108FB}-\u{1091B}\u{10920}-\u{10939}\u{1093F}\u{10980}-\u{109B7}\u{109BC}-\u{109CF}\u{109D2}-\u{10A00}\u{10A10}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A40}-\u{10A48}\u{10A50}-\u{10A58}\u{10A60}-\u{10A9F}\u{10AC0}-\u{10AE4}\u{10AEB}-\u{10AF6}\u{10B00}-\u{10B35}\u{10B40}-\u{10B55}\u{10B58}-\u{10B72}\u{10B78}-\u{10B91}\u{10B99}-\u{10B9C}\u{10BA9}-\u{10BAF}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10CFA}-\u{10D23}\u{10E80}-\u{10EA9}\u{10EAD}\u{10EB0}\u{10EB1}\u{10F00}-\u{10F27}\u{10F30}-\u{10F45}\u{10F51}-\u{10F59}\u{10F70}-\u{10F81}\u{10F86}-\u{10F89}\u{10FB0}-\u{10FCB}\u{10FE0}-\u{10FF6}\u{1E800}-\u{1E8C4}\u{1E8C7}-\u{1E8CF}\u{1E900}-\u{1E943}\u{1E94B}\u{1E950}-\u{1E959}\u{1E95E}\u{1E95F}\u{1EC71}-\u{1ECB4}\u{1ED01}-\u{1ED3D}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}]/u,A=/^[\0-\x08\x0E-\x1B!-@\[-`\{-\x84\x86-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02B9\u02BA\u02C2-\u02CF\u02D2-\u02DF\u02E5-\u02ED\u02EF-\u036F\u0374\u0375\u037E\u0384\u0385\u0387\u03F6\u0483-\u0489\u058A\u058D-\u058F\u0591-\u05C7\u05D0-\u05EA\u05EF-\u05F4\u0600-\u070D\u070F-\u074A\u074D-\u07B1\u07C0-\u07FA\u07FD-\u082D\u0830-\u083E\u0840-\u085B\u085E\u0860-\u086A\u0870-\u088E\u0890\u0891\u0898-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09F2\u09F3\u09FB\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AF1\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B55\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0BF3-\u0BFA\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C78-\u0C7E\u0C81\u0CBC\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0D81\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E3F\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39-\u0F3D\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1390-\u1399\u1400\u169B\u169C\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DB\u17DD\u17F0-\u17F9\u1800-\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1940\u1944\u1945\u19DE-\u19FF\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u200B-\u200D\u200F-\u2027\u202F-\u205E\u2060-\u2064\u206A-\u2070\u2074-\u207E\u2080-\u208E\u20A0-\u20C0\u20D0-\u20F0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u2150-\u215F\u2189-\u218B\u2190-\u2335\u237B-\u2394\u2396-\u2426\u2440-\u244A\u2460-\u249B\u24EA-\u26AB\u26AD-\u27FF\u2900-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF9-\u2CFF\u2D7F\u2DE0-\u2E5D\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u3004\u3008-\u3020\u302A-\u302D\u3030\u3036\u3037\u303D-\u303F\u3099-\u309C\u30A0\u30FB\u31C0-\u31E3\u321D\u321E\u3250-\u325F\u327C-\u327E\u32B1-\u32BF\u32CC-\u32CF\u3377-\u337A\u33DE\u33DF\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA60D-\uA60F\uA66F-\uA67F\uA69E\uA69F\uA6F0\uA6F1\uA700-\uA721\uA788\uA802\uA806\uA80B\uA825\uA826\uA828-\uA82C\uA838\uA839\uA874-\uA877\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uAB6A\uAB6B\uABE5\uABE8\uABED\uFB1D-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBC2\uFBD3-\uFD8F\uFD92-\uFDC7\uFDCF\uFDF0-\uFE19\uFE20-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFE70-\uFE74\uFE76-\uFEFC\uFEFF\uFF01-\uFF20\uFF3B-\uFF40\uFF5B-\uFF65\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFF9-\uFFFD\u{10101}\u{10140}-\u{1018C}\u{10190}-\u{1019C}\u{101A0}\u{101FD}\u{102E0}-\u{102FB}\u{10376}-\u{1037A}\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10857}-\u{1089E}\u{108A7}-\u{108AF}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{108FB}-\u{1091B}\u{1091F}-\u{10939}\u{1093F}\u{10980}-\u{109B7}\u{109BC}-\u{109CF}\u{109D2}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A38}-\u{10A3A}\u{10A3F}-\u{10A48}\u{10A50}-\u{10A58}\u{10A60}-\u{10A9F}\u{10AC0}-\u{10AE6}\u{10AEB}-\u{10AF6}\u{10B00}-\u{10B35}\u{10B39}-\u{10B55}\u{10B58}-\u{10B72}\u{10B78}-\u{10B91}\u{10B99}-\u{10B9C}\u{10BA9}-\u{10BAF}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10CFA}-\u{10D27}\u{10D30}-\u{10D39}\u{10E60}-\u{10E7E}\u{10E80}-\u{10EA9}\u{10EAB}-\u{10EAD}\u{10EB0}\u{10EB1}\u{10EFD}-\u{10F27}\u{10F30}-\u{10F59}\u{10F70}-\u{10F89}\u{10FB0}-\u{10FCB}\u{10FE0}-\u{10FF6}\u{11001}\u{11038}-\u{11046}\u{11052}-\u{11065}\u{11070}\u{11073}\u{11074}\u{1107F}-\u{11081}\u{110B3}-\u{110B6}\u{110B9}\u{110BA}\u{110C2}\u{11100}-\u{11102}\u{11127}-\u{1112B}\u{1112D}-\u{11134}\u{11173}\u{11180}\u{11181}\u{111B6}-\u{111BE}\u{111C9}-\u{111CC}\u{111CF}\u{1122F}-\u{11231}\u{11234}\u{11236}\u{11237}\u{1123E}\u{11241}\u{112DF}\u{112E3}-\u{112EA}\u{11300}\u{11301}\u{1133B}\u{1133C}\u{11340}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{11438}-\u{1143F}\u{11442}-\u{11444}\u{11446}\u{1145E}\u{114B3}-\u{114B8}\u{114BA}\u{114BF}\u{114C0}\u{114C2}\u{114C3}\u{115B2}-\u{115B5}\u{115BC}\u{115BD}\u{115BF}\u{115C0}\u{115DC}\u{115DD}\u{11633}-\u{1163A}\u{1163D}\u{1163F}\u{11640}\u{11660}-\u{1166C}\u{116AB}\u{116AD}\u{116B0}-\u{116B5}\u{116B7}\u{1171D}-\u{1171F}\u{11722}-\u{11725}\u{11727}-\u{1172B}\u{1182F}-\u{11837}\u{11839}\u{1183A}\u{1193B}\u{1193C}\u{1193E}\u{11943}\u{119D4}-\u{119D7}\u{119DA}\u{119DB}\u{119E0}\u{11A01}-\u{11A06}\u{11A09}\u{11A0A}\u{11A33}-\u{11A38}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A56}\u{11A59}-\u{11A5B}\u{11A8A}-\u{11A96}\u{11A98}\u{11A99}\u{11C30}-\u{11C36}\u{11C38}-\u{11C3D}\u{11C92}-\u{11CA7}\u{11CAA}-\u{11CB0}\u{11CB2}\u{11CB3}\u{11CB5}\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D90}\u{11D91}\u{11D95}\u{11D97}\u{11EF3}\u{11EF4}\u{11F00}\u{11F01}\u{11F36}-\u{11F3A}\u{11F40}\u{11F42}\u{11FD5}-\u{11FF1}\u{13440}\u{13447}-\u{13455}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F8F}-\u{16F92}\u{16FE2}\u{16FE4}\u{1BC9D}\u{1BC9E}\u{1BCA0}-\u{1BCA3}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1D167}-\u{1D169}\u{1D173}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D1E9}\u{1D1EA}\u{1D200}-\u{1D245}\u{1D300}-\u{1D356}\u{1D6DB}\u{1D715}\u{1D74F}\u{1D789}\u{1D7C3}\u{1D7CE}-\u{1D7FF}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E08F}\u{1E130}-\u{1E136}\u{1E2AE}\u{1E2EC}-\u{1E2EF}\u{1E2FF}\u{1E4EC}-\u{1E4EF}\u{1E800}-\u{1E8C4}\u{1E8C7}-\u{1E8D6}\u{1E900}-\u{1E94B}\u{1E950}-\u{1E959}\u{1E95E}\u{1E95F}\u{1EC71}-\u{1ECB4}\u{1ED01}-\u{1ED3D}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}\u{1EEF0}\u{1EEF1}\u{1F000}-\u{1F02B}\u{1F030}-\u{1F093}\u{1F0A0}-\u{1F0AE}\u{1F0B1}-\u{1F0BF}\u{1F0C1}-\u{1F0CF}\u{1F0D1}-\u{1F0F5}\u{1F100}-\u{1F10F}\u{1F12F}\u{1F16A}-\u{1F16F}\u{1F1AD}\u{1F260}-\u{1F265}\u{1F300}-\u{1F6D7}\u{1F6DC}-\u{1F6EC}\u{1F6F0}-\u{1F6FC}\u{1F700}-\u{1F776}\u{1F77B}-\u{1F7D9}\u{1F7E0}-\u{1F7EB}\u{1F7F0}\u{1F800}-\u{1F80B}\u{1F810}-\u{1F847}\u{1F850}-\u{1F859}\u{1F860}-\u{1F887}\u{1F890}-\u{1F8AD}\u{1F8B0}\u{1F8B1}\u{1F900}-\u{1FA53}\u{1FA60}-\u{1FA6D}\u{1FA70}-\u{1FA7C}\u{1FA80}-\u{1FA88}\u{1FA90}-\u{1FABD}\u{1FABF}-\u{1FAC5}\u{1FACE}-\u{1FADB}\u{1FAE0}-\u{1FAE8}\u{1FAF0}-\u{1FAF8}\u{1FB00}-\u{1FB92}\u{1FB94}-\u{1FBCA}\u{1FBF0}-\u{1FBF9}\u{E0001}\u{E0020}-\u{E007F}\u{E0100}-\u{E01EF}]*$/u,o=/[0-9\xB2\xB3\xB9\u05BE\u05C0\u05C3\u05C6\u05D0-\u05EA\u05EF-\u05F4\u0600-\u0605\u0608\u060B\u060D\u061B-\u064A\u0660-\u0669\u066B-\u066F\u0671-\u06D5\u06DD\u06E5\u06E6\u06EE-\u070D\u070F\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u07FE-\u0815\u081A\u0824\u0828\u0830-\u083E\u0840-\u0858\u085E\u0860-\u086A\u0870-\u088E\u0890\u0891\u08A0-\u08C9\u08E2\u200F\u2070\u2074-\u2079\u2080-\u2089\u2488-\u249B\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBC2\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFC\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\u{102E1}-\u{102FB}\u{10800}-\u{10805}\u{10808}\u{1080A}-\u{10835}\u{10837}\u{10838}\u{1083C}\u{1083F}-\u{10855}\u{10857}-\u{1089E}\u{108A7}-\u{108AF}\u{108E0}-\u{108F2}\u{108F4}\u{108F5}\u{108FB}-\u{1091B}\u{10920}-\u{10939}\u{1093F}\u{10980}-\u{109B7}\u{109BC}-\u{109CF}\u{109D2}-\u{10A00}\u{10A10}-\u{10A13}\u{10A15}-\u{10A17}\u{10A19}-\u{10A35}\u{10A40}-\u{10A48}\u{10A50}-\u{10A58}\u{10A60}-\u{10A9F}\u{10AC0}-\u{10AE4}\u{10AEB}-\u{10AF6}\u{10B00}-\u{10B35}\u{10B40}-\u{10B55}\u{10B58}-\u{10B72}\u{10B78}-\u{10B91}\u{10B99}-\u{10B9C}\u{10BA9}-\u{10BAF}\u{10C00}-\u{10C48}\u{10C80}-\u{10CB2}\u{10CC0}-\u{10CF2}\u{10CFA}-\u{10D23}\u{10D30}-\u{10D39}\u{10E60}-\u{10E7E}\u{10E80}-\u{10EA9}\u{10EAD}\u{10EB0}\u{10EB1}\u{10F00}-\u{10F27}\u{10F30}-\u{10F45}\u{10F51}-\u{10F59}\u{10F70}-\u{10F81}\u{10F86}-\u{10F89}\u{10FB0}-\u{10FCB}\u{10FE0}-\u{10FF6}\u{1D7CE}-\u{1D7FF}\u{1E800}-\u{1E8C4}\u{1E8C7}-\u{1E8CF}\u{1E900}-\u{1E943}\u{1E94B}\u{1E950}-\u{1E959}\u{1E95E}\u{1E95F}\u{1EC71}-\u{1ECB4}\u{1ED01}-\u{1ED3D}\u{1EE00}-\u{1EE03}\u{1EE05}-\u{1EE1F}\u{1EE21}\u{1EE22}\u{1EE24}\u{1EE27}\u{1EE29}-\u{1EE32}\u{1EE34}-\u{1EE37}\u{1EE39}\u{1EE3B}\u{1EE42}\u{1EE47}\u{1EE49}\u{1EE4B}\u{1EE4D}-\u{1EE4F}\u{1EE51}\u{1EE52}\u{1EE54}\u{1EE57}\u{1EE59}\u{1EE5B}\u{1EE5D}\u{1EE5F}\u{1EE61}\u{1EE62}\u{1EE64}\u{1EE67}-\u{1EE6A}\u{1EE6C}-\u{1EE72}\u{1EE74}-\u{1EE77}\u{1EE79}-\u{1EE7C}\u{1EE7E}\u{1EE80}-\u{1EE89}\u{1EE8B}-\u{1EE9B}\u{1EEA1}-\u{1EEA3}\u{1EEA5}-\u{1EEA9}\u{1EEAB}-\u{1EEBB}\u{1F100}-\u{1F10A}\u{1FBF0}-\u{1FBF9}][\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B55\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0D81\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\u{101FD}\u{102E0}\u{10376}-\u{1037A}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10D24}-\u{10D27}\u{10EAB}\u{10EAC}\u{10EFD}-\u{10EFF}\u{10F46}-\u{10F50}\u{10F82}-\u{10F85}\u{11001}\u{11038}-\u{11046}\u{11070}\u{11073}\u{11074}\u{1107F}-\u{11081}\u{110B3}-\u{110B6}\u{110B9}\u{110BA}\u{110C2}\u{11100}-\u{11102}\u{11127}-\u{1112B}\u{1112D}-\u{11134}\u{11173}\u{11180}\u{11181}\u{111B6}-\u{111BE}\u{111C9}-\u{111CC}\u{111CF}\u{1122F}-\u{11231}\u{11234}\u{11236}\u{11237}\u{1123E}\u{11241}\u{112DF}\u{112E3}-\u{112EA}\u{11300}\u{11301}\u{1133B}\u{1133C}\u{11340}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{11438}-\u{1143F}\u{11442}-\u{11444}\u{11446}\u{1145E}\u{114B3}-\u{114B8}\u{114BA}\u{114BF}\u{114C0}\u{114C2}\u{114C3}\u{115B2}-\u{115B5}\u{115BC}\u{115BD}\u{115BF}\u{115C0}\u{115DC}\u{115DD}\u{11633}-\u{1163A}\u{1163D}\u{1163F}\u{11640}\u{116AB}\u{116AD}\u{116B0}-\u{116B5}\u{116B7}\u{1171D}-\u{1171F}\u{11722}-\u{11725}\u{11727}-\u{1172B}\u{1182F}-\u{11837}\u{11839}\u{1183A}\u{1193B}\u{1193C}\u{1193E}\u{11943}\u{119D4}-\u{119D7}\u{119DA}\u{119DB}\u{119E0}\u{11A01}-\u{11A06}\u{11A09}\u{11A0A}\u{11A33}-\u{11A38}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A56}\u{11A59}-\u{11A5B}\u{11A8A}-\u{11A96}\u{11A98}\u{11A99}\u{11C30}-\u{11C36}\u{11C38}-\u{11C3D}\u{11C92}-\u{11CA7}\u{11CAA}-\u{11CB0}\u{11CB2}\u{11CB3}\u{11CB5}\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D90}\u{11D91}\u{11D95}\u{11D97}\u{11EF3}\u{11EF4}\u{11F00}\u{11F01}\u{11F36}-\u{11F3A}\u{11F40}\u{11F42}\u{13440}\u{13447}-\u{13455}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F8F}-\u{16F92}\u{16FE4}\u{1BC9D}\u{1BC9E}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1D167}-\u{1D169}\u{1D17B}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D242}-\u{1D244}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E08F}\u{1E130}-\u{1E136}\u{1E2AE}\u{1E2EC}-\u{1E2EF}\u{1E4EC}-\u{1E4EF}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94A}\u{E0100}-\u{E01EF}]*$/u,n=/[0-9\xB2\xB3\xB9\u06F0-\u06F9\u2070\u2074-\u2079\u2080-\u2089\u2488-\u249B\uFF10-\uFF19\u{102E1}-\u{102FB}\u{1D7CE}-\u{1D7FF}\u{1F100}-\u{1F10A}\u{1FBF0}-\u{1FBF9}]/u,r=/[\u0600-\u0605\u0660-\u0669\u066B\u066C\u06DD\u0890\u0891\u08E2\u{10D30}-\u{10D39}\u{10E60}-\u{10E7E}]/u,E=/^[\0-\x08\x0E-\x1B!-\x84\x86-\u0377\u037A-\u037F\u0384-\u038A\u038C\u038E-\u03A1\u03A3-\u052F\u0531-\u0556\u0559-\u058A\u058D-\u058F\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0606\u0607\u0609\u060A\u060C\u060E-\u061A\u064B-\u065F\u066A\u0670\u06D6-\u06DC\u06DE-\u06E4\u06E7-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07F6-\u07F9\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A76\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AF1\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B77\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BFA\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C77-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1-\u0CF3\u0D00-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4F\u0D54-\u0D63\u0D66-\u0D7F\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF4\u0E01-\u0E3A\u0E3F-\u0E5B\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECE\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00-\u0F47\u0F49-\u0F6C\u0F71-\u0F97\u0F99-\u0FBC\u0FBE-\u0FCC\u0FCE-\u0FDA\u1000-\u10C5\u10C7\u10CD\u10D0-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u137C\u1380-\u1399\u13A0-\u13F5\u13F8-\u13FD\u1400-\u167F\u1681-\u169C\u16A0-\u16F8\u1700-\u1715\u171F-\u1736\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17DD\u17E0-\u17E9\u17F0-\u17F9\u1800-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1940\u1944-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u19DE-\u1A1B\u1A1E-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA0-\u1AAD\u1AB0-\u1ACE\u1B00-\u1B4C\u1B50-\u1B7E\u1B80-\u1BF3\u1BFC-\u1C37\u1C3B-\u1C49\u1C4D-\u1C88\u1C90-\u1CBA\u1CBD-\u1CC7\u1CD0-\u1CFA\u1D00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FC4\u1FC6-\u1FD3\u1FD6-\u1FDB\u1FDD-\u1FEF\u1FF2-\u1FF4\u1FF6-\u1FFE\u200B-\u200E\u2010-\u2027\u202F-\u205E\u2060-\u2064\u206A-\u2071\u2074-\u208E\u2090-\u209C\u20A0-\u20C0\u20D0-\u20F0\u2100-\u218B\u2190-\u2426\u2440-\u244A\u2460-\u2B73\u2B76-\u2B95\u2B97-\u2CF3\u2CF9-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D70\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2E5D\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303F\u3041-\u3096\u3099-\u30FF\u3105-\u312F\u3131-\u318E\u3190-\u31E3\u31F0-\u321E\u3220-\uA48C\uA490-\uA4C6\uA4D0-\uA62B\uA640-\uA6F7\uA700-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA82C\uA830-\uA839\uA840-\uA877\uA880-\uA8C5\uA8CE-\uA8D9\uA8E0-\uA953\uA95F-\uA97C\uA980-\uA9CD\uA9CF-\uA9D9\uA9DE-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA5C-\uAAC2\uAADB-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB6B\uAB70-\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uD800-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1E\uFB29\uFD3E-\uFD4F\uFDCF\uFDFD-\uFE19\uFE20-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFEFF\uFF01-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFF9-\uFFFD\u{10000}-\u{1000B}\u{1000D}-\u{10026}\u{10028}-\u{1003A}\u{1003C}\u{1003D}\u{1003F}-\u{1004D}\u{10050}-\u{1005D}\u{10080}-\u{100FA}\u{10100}-\u{10102}\u{10107}-\u{10133}\u{10137}-\u{1018E}\u{10190}-\u{1019C}\u{101A0}\u{101D0}-\u{101FD}\u{10280}-\u{1029C}\u{102A0}-\u{102D0}\u{102E0}-\u{102FB}\u{10300}-\u{10323}\u{1032D}-\u{1034A}\u{10350}-\u{1037A}\u{10380}-\u{1039D}\u{1039F}-\u{103C3}\u{103C8}-\u{103D5}\u{10400}-\u{1049D}\u{104A0}-\u{104A9}\u{104B0}-\u{104D3}\u{104D8}-\u{104FB}\u{10500}-\u{10527}\u{10530}-\u{10563}\u{1056F}-\u{1057A}\u{1057C}-\u{1058A}\u{1058C}-\u{10592}\u{10594}\u{10595}\u{10597}-\u{105A1}\u{105A3}-\u{105B1}\u{105B3}-\u{105B9}\u{105BB}\u{105BC}\u{10600}-\u{10736}\u{10740}-\u{10755}\u{10760}-\u{10767}\u{10780}-\u{10785}\u{10787}-\u{107B0}\u{107B2}-\u{107BA}\u{1091F}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10B39}-\u{10B3F}\u{10D24}-\u{10D27}\u{10EAB}\u{10EAC}\u{10EFD}-\u{10EFF}\u{10F46}-\u{10F50}\u{10F82}-\u{10F85}\u{11000}-\u{1104D}\u{11052}-\u{11075}\u{1107F}-\u{110C2}\u{110CD}\u{110D0}-\u{110E8}\u{110F0}-\u{110F9}\u{11100}-\u{11134}\u{11136}-\u{11147}\u{11150}-\u{11176}\u{11180}-\u{111DF}\u{111E1}-\u{111F4}\u{11200}-\u{11211}\u{11213}-\u{11241}\u{11280}-\u{11286}\u{11288}\u{1128A}-\u{1128D}\u{1128F}-\u{1129D}\u{1129F}-\u{112A9}\u{112B0}-\u{112EA}\u{112F0}-\u{112F9}\u{11300}-\u{11303}\u{11305}-\u{1130C}\u{1130F}\u{11310}\u{11313}-\u{11328}\u{1132A}-\u{11330}\u{11332}\u{11333}\u{11335}-\u{11339}\u{1133B}-\u{11344}\u{11347}\u{11348}\u{1134B}-\u{1134D}\u{11350}\u{11357}\u{1135D}-\u{11363}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{11400}-\u{1145B}\u{1145D}-\u{11461}\u{11480}-\u{114C7}\u{114D0}-\u{114D9}\u{11580}-\u{115B5}\u{115B8}-\u{115DD}\u{11600}-\u{11644}\u{11650}-\u{11659}\u{11660}-\u{1166C}\u{11680}-\u{116B9}\u{116C0}-\u{116C9}\u{11700}-\u{1171A}\u{1171D}-\u{1172B}\u{11730}-\u{11746}\u{11800}-\u{1183B}\u{118A0}-\u{118F2}\u{118FF}-\u{11906}\u{11909}\u{1190C}-\u{11913}\u{11915}\u{11916}\u{11918}-\u{11935}\u{11937}\u{11938}\u{1193B}-\u{11946}\u{11950}-\u{11959}\u{119A0}-\u{119A7}\u{119AA}-\u{119D7}\u{119DA}-\u{119E4}\u{11A00}-\u{11A47}\u{11A50}-\u{11AA2}\u{11AB0}-\u{11AF8}\u{11B00}-\u{11B09}\u{11C00}-\u{11C08}\u{11C0A}-\u{11C36}\u{11C38}-\u{11C45}\u{11C50}-\u{11C6C}\u{11C70}-\u{11C8F}\u{11C92}-\u{11CA7}\u{11CA9}-\u{11CB6}\u{11D00}-\u{11D06}\u{11D08}\u{11D09}\u{11D0B}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D47}\u{11D50}-\u{11D59}\u{11D60}-\u{11D65}\u{11D67}\u{11D68}\u{11D6A}-\u{11D8E}\u{11D90}\u{11D91}\u{11D93}-\u{11D98}\u{11DA0}-\u{11DA9}\u{11EE0}-\u{11EF8}\u{11F00}-\u{11F10}\u{11F12}-\u{11F3A}\u{11F3E}-\u{11F59}\u{11FB0}\u{11FC0}-\u{11FF1}\u{11FFF}-\u{12399}\u{12400}-\u{1246E}\u{12470}-\u{12474}\u{12480}-\u{12543}\u{12F90}-\u{12FF2}\u{13000}-\u{13455}\u{14400}-\u{14646}\u{16800}-\u{16A38}\u{16A40}-\u{16A5E}\u{16A60}-\u{16A69}\u{16A6E}-\u{16ABE}\u{16AC0}-\u{16AC9}\u{16AD0}-\u{16AED}\u{16AF0}-\u{16AF5}\u{16B00}-\u{16B45}\u{16B50}-\u{16B59}\u{16B5B}-\u{16B61}\u{16B63}-\u{16B77}\u{16B7D}-\u{16B8F}\u{16E40}-\u{16E9A}\u{16F00}-\u{16F4A}\u{16F4F}-\u{16F87}\u{16F8F}-\u{16F9F}\u{16FE0}-\u{16FE4}\u{16FF0}\u{16FF1}\u{17000}-\u{187F7}\u{18800}-\u{18CD5}\u{18D00}-\u{18D08}\u{1AFF0}-\u{1AFF3}\u{1AFF5}-\u{1AFFB}\u{1AFFD}\u{1AFFE}\u{1B000}-\u{1B122}\u{1B132}\u{1B150}-\u{1B152}\u{1B155}\u{1B164}-\u{1B167}\u{1B170}-\u{1B2FB}\u{1BC00}-\u{1BC6A}\u{1BC70}-\u{1BC7C}\u{1BC80}-\u{1BC88}\u{1BC90}-\u{1BC99}\u{1BC9C}-\u{1BCA3}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1CF50}-\u{1CFC3}\u{1D000}-\u{1D0F5}\u{1D100}-\u{1D126}\u{1D129}-\u{1D1EA}\u{1D200}-\u{1D245}\u{1D2C0}-\u{1D2D3}\u{1D2E0}-\u{1D2F3}\u{1D300}-\u{1D356}\u{1D360}-\u{1D378}\u{1D400}-\u{1D454}\u{1D456}-\u{1D49C}\u{1D49E}\u{1D49F}\u{1D4A2}\u{1D4A5}\u{1D4A6}\u{1D4A9}-\u{1D4AC}\u{1D4AE}-\u{1D4B9}\u{1D4BB}\u{1D4BD}-\u{1D4C3}\u{1D4C5}-\u{1D505}\u{1D507}-\u{1D50A}\u{1D50D}-\u{1D514}\u{1D516}-\u{1D51C}\u{1D51E}-\u{1D539}\u{1D53B}-\u{1D53E}\u{1D540}-\u{1D544}\u{1D546}\u{1D54A}-\u{1D550}\u{1D552}-\u{1D6A5}\u{1D6A8}-\u{1D7CB}\u{1D7CE}-\u{1DA8B}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1DF00}-\u{1DF1E}\u{1DF25}-\u{1DF2A}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E030}-\u{1E06D}\u{1E08F}\u{1E100}-\u{1E12C}\u{1E130}-\u{1E13D}\u{1E140}-\u{1E149}\u{1E14E}\u{1E14F}\u{1E290}-\u{1E2AE}\u{1E2C0}-\u{1E2F9}\u{1E2FF}\u{1E4D0}-\u{1E4F9}\u{1E7E0}-\u{1E7E6}\u{1E7E8}-\u{1E7EB}\u{1E7ED}\u{1E7EE}\u{1E7F0}-\u{1E7FE}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94A}\u{1EEF0}\u{1EEF1}\u{1F000}-\u{1F02B}\u{1F030}-\u{1F093}\u{1F0A0}-\u{1F0AE}\u{1F0B1}-\u{1F0BF}\u{1F0C1}-\u{1F0CF}\u{1F0D1}-\u{1F0F5}\u{1F100}-\u{1F1AD}\u{1F1E6}-\u{1F202}\u{1F210}-\u{1F23B}\u{1F240}-\u{1F248}\u{1F250}\u{1F251}\u{1F260}-\u{1F265}\u{1F300}-\u{1F6D7}\u{1F6DC}-\u{1F6EC}\u{1F6F0}-\u{1F6FC}\u{1F700}-\u{1F776}\u{1F77B}-\u{1F7D9}\u{1F7E0}-\u{1F7EB}\u{1F7F0}\u{1F800}-\u{1F80B}\u{1F810}-\u{1F847}\u{1F850}-\u{1F859}\u{1F860}-\u{1F887}\u{1F890}-\u{1F8AD}\u{1F8B0}\u{1F8B1}\u{1F900}-\u{1FA53}\u{1FA60}-\u{1FA6D}\u{1FA70}-\u{1FA7C}\u{1FA80}-\u{1FA88}\u{1FA90}-\u{1FABD}\u{1FABF}-\u{1FAC5}\u{1FACE}-\u{1FADB}\u{1FAE0}-\u{1FAE8}\u{1FAF0}-\u{1FAF8}\u{1FB00}-\u{1FB92}\u{1FB94}-\u{1FBCA}\u{1FBF0}-\u{1FBF9}\u{20000}-\u{2A6DF}\u{2A700}-\u{2B739}\u{2B740}-\u{2B81D}\u{2B820}-\u{2CEA1}\u{2CEB0}-\u{2EBE0}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{323AF}\u{E0001}\u{E0020}-\u{E007F}\u{E0100}-\u{E01EF}\u{F0000}-\u{FFFFD}\u{100000}-\u{10FFFD}]*$/u,m=/[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02B8\u02BB-\u02C1\u02D0\u02D1\u02E0-\u02E4\u02EE\u0370-\u0373\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0482\u048A-\u052F\u0531-\u0556\u0559-\u0589\u06F0-\u06F9\u0903-\u0939\u093B\u093D-\u0940\u0949-\u094C\u094E-\u0950\u0958-\u0961\u0964-\u0980\u0982\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD-\u09C0\u09C7\u09C8\u09CB\u09CC\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09FA\u09FC\u09FD\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3E-\u0A40\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A76\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD-\u0AC0\u0AC9\u0ACB\u0ACC\u0AD0\u0AE0\u0AE1\u0AE6-\u0AF0\u0AF9\u0B02\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B3E\u0B40\u0B47\u0B48\u0B4B\u0B4C\u0B57\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE\u0BBF\u0BC1\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCC\u0BD0\u0BD7\u0BE6-\u0BF2\u0C01-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C41-\u0C44\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C77\u0C7F\u0C80\u0C82-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD-\u0CC4\u0CC6-\u0CC8\u0CCA\u0CCB\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1-\u0CF3\u0D02-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D40\u0D46-\u0D48\u0D4A-\u0D4C\u0D4E\u0D4F\u0D54-\u0D61\u0D66-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCF-\u0DD1\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF4\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E4F-\u0E5B\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00-\u0F17\u0F1A-\u0F34\u0F36\u0F38\u0F3E-\u0F47\u0F49-\u0F6C\u0F7F\u0F85\u0F88-\u0F8C\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE-\u0FDA\u1000-\u102C\u1031\u1038\u103B\u103C\u103F-\u1057\u105A-\u105D\u1061-\u1070\u1075-\u1081\u1083\u1084\u1087-\u108C\u108E-\u109C\u109E-\u10C5\u10C7\u10CD\u10D0-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1360-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u167F\u1681-\u169A\u16A0-\u16F8\u1700-\u1711\u1715\u171F-\u1731\u1734-\u1736\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17B6\u17BE-\u17C5\u17C7\u17C8\u17D4-\u17DA\u17DC\u17E0-\u17E9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1923-\u1926\u1929-\u192B\u1930\u1931\u1933-\u1938\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A19\u1A1A\u1A1E-\u1A55\u1A57\u1A61\u1A63\u1A64\u1A6D-\u1A72\u1A80-\u1A89\u1A90-\u1A99\u1AA0-\u1AAD\u1B04-\u1B33\u1B35\u1B3B\u1B3D-\u1B41\u1B43-\u1B4C\u1B50-\u1B6A\u1B74-\u1B7E\u1B82-\u1BA1\u1BA6\u1BA7\u1BAA\u1BAE-\u1BE5\u1BE7\u1BEA-\u1BEC\u1BEE\u1BF2\u1BF3\u1BFC-\u1C2B\u1C34\u1C35\u1C3B-\u1C49\u1C4D-\u1C88\u1C90-\u1CBA\u1CBD-\u1CC7\u1CD3\u1CE1\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5-\u1CF7\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200E\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u214F\u2160-\u2188\u2336-\u237A\u2395\u2488-\u24E9\u26AC\u2800-\u28FF\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D70\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u302E\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3190-\u31BF\u31F0-\u321C\u3220-\u324F\u3260-\u327B\u327F-\u32B0\u32C0-\u32CB\u32D0-\u3376\u337B-\u33DD\u33E0-\u33FE\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA60C\uA610-\uA62B\uA640-\uA66E\uA680-\uA69D\uA6A0-\uA6EF\uA6F2-\uA6F7\uA722-\uA787\uA789-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA824\uA827\uA830-\uA837\uA840-\uA873\uA880-\uA8C3\uA8CE-\uA8D9\uA8F2-\uA8FE\uA900-\uA925\uA92E-\uA946\uA952\uA953\uA95F-\uA97C\uA983-\uA9B2\uA9B4\uA9B5\uA9BA\uA9BB\uA9BE-\uA9CD\uA9CF-\uA9D9\uA9DE-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA2F\uAA30\uAA33\uAA34\uAA40-\uAA42\uAA44-\uAA4B\uAA4D\uAA50-\uAA59\uAA5C-\uAA7B\uAA7D-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAAEB\uAAEE-\uAAF5\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB69\uAB70-\uABE4\uABE6\uABE7\uABE9-\uABEC\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uD800-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\u{10000}-\u{1000B}\u{1000D}-\u{10026}\u{10028}-\u{1003A}\u{1003C}\u{1003D}\u{1003F}-\u{1004D}\u{10050}-\u{1005D}\u{10080}-\u{100FA}\u{10100}\u{10102}\u{10107}-\u{10133}\u{10137}-\u{1013F}\u{1018D}\u{1018E}\u{101D0}-\u{101FC}\u{10280}-\u{1029C}\u{102A0}-\u{102D0}\u{102E1}-\u{102FB}\u{10300}-\u{10323}\u{1032D}-\u{1034A}\u{10350}-\u{10375}\u{10380}-\u{1039D}\u{1039F}-\u{103C3}\u{103C8}-\u{103D5}\u{10400}-\u{1049D}\u{104A0}-\u{104A9}\u{104B0}-\u{104D3}\u{104D8}-\u{104FB}\u{10500}-\u{10527}\u{10530}-\u{10563}\u{1056F}-\u{1057A}\u{1057C}-\u{1058A}\u{1058C}-\u{10592}\u{10594}\u{10595}\u{10597}-\u{105A1}\u{105A3}-\u{105B1}\u{105B3}-\u{105B9}\u{105BB}\u{105BC}\u{10600}-\u{10736}\u{10740}-\u{10755}\u{10760}-\u{10767}\u{10780}-\u{10785}\u{10787}-\u{107B0}\u{107B2}-\u{107BA}\u{11000}\u{11002}-\u{11037}\u{11047}-\u{1104D}\u{11066}-\u{1106F}\u{11071}\u{11072}\u{11075}\u{11082}-\u{110B2}\u{110B7}\u{110B8}\u{110BB}-\u{110C1}\u{110CD}\u{110D0}-\u{110E8}\u{110F0}-\u{110F9}\u{11103}-\u{11126}\u{1112C}\u{11136}-\u{11147}\u{11150}-\u{11172}\u{11174}-\u{11176}\u{11182}-\u{111B5}\u{111BF}-\u{111C8}\u{111CD}\u{111CE}\u{111D0}-\u{111DF}\u{111E1}-\u{111F4}\u{11200}-\u{11211}\u{11213}-\u{1122E}\u{11232}\u{11233}\u{11235}\u{11238}-\u{1123D}\u{1123F}\u{11240}\u{11280}-\u{11286}\u{11288}\u{1128A}-\u{1128D}\u{1128F}-\u{1129D}\u{1129F}-\u{112A9}\u{112B0}-\u{112DE}\u{112E0}-\u{112E2}\u{112F0}-\u{112F9}\u{11302}\u{11303}\u{11305}-\u{1130C}\u{1130F}\u{11310}\u{11313}-\u{11328}\u{1132A}-\u{11330}\u{11332}\u{11333}\u{11335}-\u{11339}\u{1133D}-\u{1133F}\u{11341}-\u{11344}\u{11347}\u{11348}\u{1134B}-\u{1134D}\u{11350}\u{11357}\u{1135D}-\u{11363}\u{11400}-\u{11437}\u{11440}\u{11441}\u{11445}\u{11447}-\u{1145B}\u{1145D}\u{1145F}-\u{11461}\u{11480}-\u{114B2}\u{114B9}\u{114BB}-\u{114BE}\u{114C1}\u{114C4}-\u{114C7}\u{114D0}-\u{114D9}\u{11580}-\u{115B1}\u{115B8}-\u{115BB}\u{115BE}\u{115C1}-\u{115DB}\u{11600}-\u{11632}\u{1163B}\u{1163C}\u{1163E}\u{11641}-\u{11644}\u{11650}-\u{11659}\u{11680}-\u{116AA}\u{116AC}\u{116AE}\u{116AF}\u{116B6}\u{116B8}\u{116B9}\u{116C0}-\u{116C9}\u{11700}-\u{1171A}\u{11720}\u{11721}\u{11726}\u{11730}-\u{11746}\u{11800}-\u{1182E}\u{11838}\u{1183B}\u{118A0}-\u{118F2}\u{118FF}-\u{11906}\u{11909}\u{1190C}-\u{11913}\u{11915}\u{11916}\u{11918}-\u{11935}\u{11937}\u{11938}\u{1193D}\u{1193F}-\u{11942}\u{11944}-\u{11946}\u{11950}-\u{11959}\u{119A0}-\u{119A7}\u{119AA}-\u{119D3}\u{119DC}-\u{119DF}\u{119E1}-\u{119E4}\u{11A00}\u{11A07}\u{11A08}\u{11A0B}-\u{11A32}\u{11A39}\u{11A3A}\u{11A3F}-\u{11A46}\u{11A50}\u{11A57}\u{11A58}\u{11A5C}-\u{11A89}\u{11A97}\u{11A9A}-\u{11AA2}\u{11AB0}-\u{11AF8}\u{11B00}-\u{11B09}\u{11C00}-\u{11C08}\u{11C0A}-\u{11C2F}\u{11C3E}-\u{11C45}\u{11C50}-\u{11C6C}\u{11C70}-\u{11C8F}\u{11CA9}\u{11CB1}\u{11CB4}\u{11D00}-\u{11D06}\u{11D08}\u{11D09}\u{11D0B}-\u{11D30}\u{11D46}\u{11D50}-\u{11D59}\u{11D60}-\u{11D65}\u{11D67}\u{11D68}\u{11D6A}-\u{11D8E}\u{11D93}\u{11D94}\u{11D96}\u{11D98}\u{11DA0}-\u{11DA9}\u{11EE0}-\u{11EF2}\u{11EF5}-\u{11EF8}\u{11F02}-\u{11F10}\u{11F12}-\u{11F35}\u{11F3E}\u{11F3F}\u{11F41}\u{11F43}-\u{11F59}\u{11FB0}\u{11FC0}-\u{11FD4}\u{11FFF}-\u{12399}\u{12400}-\u{1246E}\u{12470}-\u{12474}\u{12480}-\u{12543}\u{12F90}-\u{12FF2}\u{13000}-\u{1343F}\u{13441}-\u{13446}\u{14400}-\u{14646}\u{16800}-\u{16A38}\u{16A40}-\u{16A5E}\u{16A60}-\u{16A69}\u{16A6E}-\u{16ABE}\u{16AC0}-\u{16AC9}\u{16AD0}-\u{16AED}\u{16AF5}\u{16B00}-\u{16B2F}\u{16B37}-\u{16B45}\u{16B50}-\u{16B59}\u{16B5B}-\u{16B61}\u{16B63}-\u{16B77}\u{16B7D}-\u{16B8F}\u{16E40}-\u{16E9A}\u{16F00}-\u{16F4A}\u{16F50}-\u{16F87}\u{16F93}-\u{16F9F}\u{16FE0}\u{16FE1}\u{16FE3}\u{16FF0}\u{16FF1}\u{17000}-\u{187F7}\u{18800}-\u{18CD5}\u{18D00}-\u{18D08}\u{1AFF0}-\u{1AFF3}\u{1AFF5}-\u{1AFFB}\u{1AFFD}\u{1AFFE}\u{1B000}-\u{1B122}\u{1B132}\u{1B150}-\u{1B152}\u{1B155}\u{1B164}-\u{1B167}\u{1B170}-\u{1B2FB}\u{1BC00}-\u{1BC6A}\u{1BC70}-\u{1BC7C}\u{1BC80}-\u{1BC88}\u{1BC90}-\u{1BC99}\u{1BC9C}\u{1BC9F}\u{1CF50}-\u{1CFC3}\u{1D000}-\u{1D0F5}\u{1D100}-\u{1D126}\u{1D129}-\u{1D166}\u{1D16A}-\u{1D172}\u{1D183}\u{1D184}\u{1D18C}-\u{1D1A9}\u{1D1AE}-\u{1D1E8}\u{1D2C0}-\u{1D2D3}\u{1D2E0}-\u{1D2F3}\u{1D360}-\u{1D378}\u{1D400}-\u{1D454}\u{1D456}-\u{1D49C}\u{1D49E}\u{1D49F}\u{1D4A2}\u{1D4A5}\u{1D4A6}\u{1D4A9}-\u{1D4AC}\u{1D4AE}-\u{1D4B9}\u{1D4BB}\u{1D4BD}-\u{1D4C3}\u{1D4C5}-\u{1D505}\u{1D507}-\u{1D50A}\u{1D50D}-\u{1D514}\u{1D516}-\u{1D51C}\u{1D51E}-\u{1D539}\u{1D53B}-\u{1D53E}\u{1D540}-\u{1D544}\u{1D546}\u{1D54A}-\u{1D550}\u{1D552}-\u{1D6A5}\u{1D6A8}-\u{1D6DA}\u{1D6DC}-\u{1D714}\u{1D716}-\u{1D74E}\u{1D750}-\u{1D788}\u{1D78A}-\u{1D7C2}\u{1D7C4}-\u{1D7CB}\u{1D7CE}-\u{1D9FF}\u{1DA37}-\u{1DA3A}\u{1DA6D}-\u{1DA74}\u{1DA76}-\u{1DA83}\u{1DA85}-\u{1DA8B}\u{1DF00}-\u{1DF1E}\u{1DF25}-\u{1DF2A}\u{1E030}-\u{1E06D}\u{1E100}-\u{1E12C}\u{1E137}-\u{1E13D}\u{1E140}-\u{1E149}\u{1E14E}\u{1E14F}\u{1E290}-\u{1E2AD}\u{1E2C0}-\u{1E2EB}\u{1E2F0}-\u{1E2F9}\u{1E4D0}-\u{1E4EB}\u{1E4F0}-\u{1E4F9}\u{1E7E0}-\u{1E7E6}\u{1E7E8}-\u{1E7EB}\u{1E7ED}\u{1E7EE}\u{1E7F0}-\u{1E7FE}\u{1F100}-\u{1F10A}\u{1F110}-\u{1F12E}\u{1F130}-\u{1F169}\u{1F170}-\u{1F1AC}\u{1F1E6}-\u{1F202}\u{1F210}-\u{1F23B}\u{1F240}-\u{1F248}\u{1F250}\u{1F251}\u{1FBF0}-\u{1FBF9}\u{20000}-\u{2A6DF}\u{2A700}-\u{2B739}\u{2B740}-\u{2B81D}\u{2B820}-\u{2CEA1}\u{2CEB0}-\u{2EBE0}\u{2F800}-\u{2FA1D}\u{30000}-\u{3134A}\u{31350}-\u{323AF}\u{F0000}-\u{FFFFD}\u{100000}-\u{10FFFD}][\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0902\u093A\u093C\u0941-\u0948\u094D\u0951-\u0957\u0962\u0963\u0981\u09BC\u09C1-\u09C4\u09CD\u09E2\u09E3\u09FE\u0A01\u0A02\u0A3C\u0A41\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81\u0A82\u0ABC\u0AC1-\u0AC5\u0AC7\u0AC8\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01\u0B3C\u0B3F\u0B41-\u0B44\u0B4D\u0B55\u0B56\u0B62\u0B63\u0B82\u0BC0\u0BCD\u0C00\u0C04\u0C3C\u0C3E-\u0C40\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81\u0CBC\u0CCC\u0CCD\u0CE2\u0CE3\u0D00\u0D01\u0D3B\u0D3C\u0D41-\u0D44\u0D4D\u0D62\u0D63\u0D81\u0DCA\u0DD2-\u0DD4\u0DD6\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F71-\u0F7E\u0F80-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102D-\u1030\u1032-\u1037\u1039\u103A\u103D\u103E\u1058\u1059\u105E-\u1060\u1071-\u1074\u1082\u1085\u1086\u108D\u109D\u135D-\u135F\u1712-\u1714\u1732\u1733\u1752\u1753\u1772\u1773\u17B4\u17B5\u17B7-\u17BD\u17C6\u17C9-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193B\u1A17\u1A18\u1A1B\u1A56\u1A58-\u1A5E\u1A60\u1A62\u1A65-\u1A6C\u1A73-\u1A7C\u1A7F\u1AB0-\u1ACE\u1B00-\u1B03\u1B34\u1B36-\u1B3A\u1B3C\u1B42\u1B6B-\u1B73\u1B80\u1B81\u1BA2-\u1BA5\u1BA8\u1BA9\u1BAB-\u1BAD\u1BE6\u1BE8\u1BE9\u1BED\u1BEF-\u1BF1\u1C2C-\u1C33\u1C36\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE0\u1CE2-\u1CE8\u1CED\u1CF4\u1CF8\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302D\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA825\uA826\uA82C\uA8C4\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA951\uA980-\uA982\uA9B3\uA9B6-\uA9B9\uA9BC\uA9BD\uA9E5\uAA29-\uAA2E\uAA31\uAA32\uAA35\uAA36\uAA43\uAA4C\uAA7C\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEC\uAAED\uAAF6\uABE5\uABE8\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\u{101FD}\u{102E0}\u{10376}-\u{1037A}\u{10A01}-\u{10A03}\u{10A05}\u{10A06}\u{10A0C}-\u{10A0F}\u{10A38}-\u{10A3A}\u{10A3F}\u{10AE5}\u{10AE6}\u{10D24}-\u{10D27}\u{10EAB}\u{10EAC}\u{10EFD}-\u{10EFF}\u{10F46}-\u{10F50}\u{10F82}-\u{10F85}\u{11001}\u{11038}-\u{11046}\u{11070}\u{11073}\u{11074}\u{1107F}-\u{11081}\u{110B3}-\u{110B6}\u{110B9}\u{110BA}\u{110C2}\u{11100}-\u{11102}\u{11127}-\u{1112B}\u{1112D}-\u{11134}\u{11173}\u{11180}\u{11181}\u{111B6}-\u{111BE}\u{111C9}-\u{111CC}\u{111CF}\u{1122F}-\u{11231}\u{11234}\u{11236}\u{11237}\u{1123E}\u{11241}\u{112DF}\u{112E3}-\u{112EA}\u{11300}\u{11301}\u{1133B}\u{1133C}\u{11340}\u{11366}-\u{1136C}\u{11370}-\u{11374}\u{11438}-\u{1143F}\u{11442}-\u{11444}\u{11446}\u{1145E}\u{114B3}-\u{114B8}\u{114BA}\u{114BF}\u{114C0}\u{114C2}\u{114C3}\u{115B2}-\u{115B5}\u{115BC}\u{115BD}\u{115BF}\u{115C0}\u{115DC}\u{115DD}\u{11633}-\u{1163A}\u{1163D}\u{1163F}\u{11640}\u{116AB}\u{116AD}\u{116B0}-\u{116B5}\u{116B7}\u{1171D}-\u{1171F}\u{11722}-\u{11725}\u{11727}-\u{1172B}\u{1182F}-\u{11837}\u{11839}\u{1183A}\u{1193B}\u{1193C}\u{1193E}\u{11943}\u{119D4}-\u{119D7}\u{119DA}\u{119DB}\u{119E0}\u{11A01}-\u{11A06}\u{11A09}\u{11A0A}\u{11A33}-\u{11A38}\u{11A3B}-\u{11A3E}\u{11A47}\u{11A51}-\u{11A56}\u{11A59}-\u{11A5B}\u{11A8A}-\u{11A96}\u{11A98}\u{11A99}\u{11C30}-\u{11C36}\u{11C38}-\u{11C3D}\u{11C92}-\u{11CA7}\u{11CAA}-\u{11CB0}\u{11CB2}\u{11CB3}\u{11CB5}\u{11CB6}\u{11D31}-\u{11D36}\u{11D3A}\u{11D3C}\u{11D3D}\u{11D3F}-\u{11D45}\u{11D47}\u{11D90}\u{11D91}\u{11D95}\u{11D97}\u{11EF3}\u{11EF4}\u{11F00}\u{11F01}\u{11F36}-\u{11F3A}\u{11F40}\u{11F42}\u{13440}\u{13447}-\u{13455}\u{16AF0}-\u{16AF4}\u{16B30}-\u{16B36}\u{16F4F}\u{16F8F}-\u{16F92}\u{16FE4}\u{1BC9D}\u{1BC9E}\u{1CF00}-\u{1CF2D}\u{1CF30}-\u{1CF46}\u{1D167}-\u{1D169}\u{1D17B}-\u{1D182}\u{1D185}-\u{1D18B}\u{1D1AA}-\u{1D1AD}\u{1D242}-\u{1D244}\u{1DA00}-\u{1DA36}\u{1DA3B}-\u{1DA6C}\u{1DA75}\u{1DA84}\u{1DA9B}-\u{1DA9F}\u{1DAA1}-\u{1DAAF}\u{1E000}-\u{1E006}\u{1E008}-\u{1E018}\u{1E01B}-\u{1E021}\u{1E023}\u{1E024}\u{1E026}-\u{1E02A}\u{1E08F}\u{1E130}-\u{1E136}\u{1E2AE}\u{1E2EC}-\u{1E2EF}\u{1E4EC}-\u{1E4EF}\u{1E8D0}-\u{1E8D6}\u{1E944}-\u{1E94A}\u{E0100}-\u{E01EF}]*$/u;u.exports={combiningMarks:d,combiningClassVirama:h,validZWNJ:a,bidiDomain:l,bidiS1LTR:i,bidiS1RTL:p,bidiS2:A,bidiS3:o,bidiS4EN:n,bidiS4AN:r,bidiS5:E,bidiS6:m}}),yi=J((e,u)=>{u.exports=[[[0,44],4],[[45,46],2],[47,4],[[48,57],2],[[58,64],4],[65,1,"a"],[66,1,"b"],[67,1,"c"],[68,1,"d"],[69,1,"e"],[70,1,"f"],[71,1,"g"],[72,1,"h"],[73,1,"i"],[74,1,"j"],[75,1,"k"],[76,1,"l"],[77,1,"m"],[78,1,"n"],[79,1,"o"],[80,1,"p"],[81,1,"q"],[82,1,"r"],[83,1,"s"],[84,1,"t"],[85,1,"u"],[86,1,"v"],[87,1,"w"],[88,1,"x"],[89,1,"y"],[90,1,"z"],[[91,96],4],[[97,122],2],[[123,127],4],[[128,159],3],[160,5," "],[[161,167],2],[168,5," \u0308"],[169,2],[170,1,"a"],[[171,172],2],[173,7],[174,2],[175,5," \u0304"],[[176,177],2],[178,1,"2"],[179,1,"3"],[180,5," \u0301"],[181,1,"\u03BC"],[182,2],[183,2],[184,5," \u0327"],[185,1,"1"],[186,1,"o"],[187,2],[188,1,"1\u20444"],[189,1,"1\u20442"],[190,1,"3\u20444"],[191,2],[192,1,"\xE0"],[193,1,"\xE1"],[194,1,"\xE2"],[195,1,"\xE3"],[196,1,"\xE4"],[197,1,"\xE5"],[198,1,"\xE6"],[199,1,"\xE7"],[200,1,"\xE8"],[201,1,"\xE9"],[202,1,"\xEA"],[203,1,"\xEB"],[204,1,"\xEC"],[205,1,"\xED"],[206,1,"\xEE"],[207,1,"\xEF"],[208,1,"\xF0"],[209,1,"\xF1"],[210,1,"\xF2"],[211,1,"\xF3"],[212,1,"\xF4"],[213,1,"\xF5"],[214,1,"\xF6"],[215,2],[216,1,"\xF8"],[217,1,"\xF9"],[218,1,"\xFA"],[219,1,"\xFB"],[220,1,"\xFC"],[221,1,"\xFD"],[222,1,"\xFE"],[223,6,"ss"],[[224,246],2],[247,2],[[248,255],2],[256,1,"\u0101"],[257,2],[258,1,"\u0103"],[259,2],[260,1,"\u0105"],[261,2],[262,1,"\u0107"],[263,2],[264,1,"\u0109"],[265,2],[266,1,"\u010B"],[267,2],[268,1,"\u010D"],[269,2],[270,1,"\u010F"],[271,2],[272,1,"\u0111"],[273,2],[274,1,"\u0113"],[275,2],[276,1,"\u0115"],[277,2],[278,1,"\u0117"],[279,2],[280,1,"\u0119"],[281,2],[282,1,"\u011B"],[283,2],[284,1,"\u011D"],[285,2],[286,1,"\u011F"],[287,2],[288,1,"\u0121"],[289,2],[290,1,"\u0123"],[291,2],[292,1,"\u0125"],[293,2],[294,1,"\u0127"],[295,2],[296,1,"\u0129"],[297,2],[298,1,"\u012B"],[299,2],[300,1,"\u012D"],[301,2],[302,1,"\u012F"],[303,2],[304,1,"i\u0307"],[305,2],[[306,307],1,"ij"],[308,1,"\u0135"],[309,2],[310,1,"\u0137"],[[311,312],2],[313,1,"\u013A"],[314,2],[315,1,"\u013C"],[316,2],[317,1,"\u013E"],[318,2],[[319,320],1,"l\xB7"],[321,1,"\u0142"],[322,2],[323,1,"\u0144"],[324,2],[325,1,"\u0146"],[326,2],[327,1,"\u0148"],[328,2],[329,1,"\u02BCn"],[330,1,"\u014B"],[331,2],[332,1,"\u014D"],[333,2],[334,1,"\u014F"],[335,2],[336,1,"\u0151"],[337,2],[338,1,"\u0153"],[339,2],[340,1,"\u0155"],[341,2],[342,1,"\u0157"],[343,2],[344,1,"\u0159"],[345,2],[346,1,"\u015B"],[347,2],[348,1,"\u015D"],[349,2],[350,1,"\u015F"],[351,2],[352,1,"\u0161"],[353,2],[354,1,"\u0163"],[355,2],[356,1,"\u0165"],[357,2],[358,1,"\u0167"],[359,2],[360,1,"\u0169"],[361,2],[362,1,"\u016B"],[363,2],[364,1,"\u016D"],[365,2],[366,1,"\u016F"],[367,2],[368,1,"\u0171"],[369,2],[370,1,"\u0173"],[371,2],[372,1,"\u0175"],[373,2],[374,1,"\u0177"],[375,2],[376,1,"\xFF"],[377,1,"\u017A"],[378,2],[379,1,"\u017C"],[380,2],[381,1,"\u017E"],[382,2],[383,1,"s"],[384,2],[385,1,"\u0253"],[386,1,"\u0183"],[387,2],[388,1,"\u0185"],[389,2],[390,1,"\u0254"],[391,1,"\u0188"],[392,2],[393,1,"\u0256"],[394,1,"\u0257"],[395,1,"\u018C"],[[396,397],2],[398,1,"\u01DD"],[399,1,"\u0259"],[400,1,"\u025B"],[401,1,"\u0192"],[402,2],[403,1,"\u0260"],[404,1,"\u0263"],[405,2],[406,1,"\u0269"],[407,1,"\u0268"],[408,1,"\u0199"],[[409,411],2],[412,1,"\u026F"],[413,1,"\u0272"],[414,2],[415,1,"\u0275"],[416,1,"\u01A1"],[417,2],[418,1,"\u01A3"],[419,2],[420,1,"\u01A5"],[421,2],[422,1,"\u0280"],[423,1,"\u01A8"],[424,2],[425,1,"\u0283"],[[426,427],2],[428,1,"\u01AD"],[429,2],[430,1,"\u0288"],[431,1,"\u01B0"],[432,2],[433,1,"\u028A"],[434,1,"\u028B"],[435,1,"\u01B4"],[436,2],[437,1,"\u01B6"],[438,2],[439,1,"\u0292"],[440,1,"\u01B9"],[[441,443],2],[444,1,"\u01BD"],[[445,451],2],[[452,454],1,"d\u017E"],[[455,457],1,"lj"],[[458,460],1,"nj"],[461,1,"\u01CE"],[462,2],[463,1,"\u01D0"],[464,2],[465,1,"\u01D2"],[466,2],[467,1,"\u01D4"],[468,2],[469,1,"\u01D6"],[470,2],[471,1,"\u01D8"],[472,2],[473,1,"\u01DA"],[474,2],[475,1,"\u01DC"],[[476,477],2],[478,1,"\u01DF"],[479,2],[480,1,"\u01E1"],[481,2],[482,1,"\u01E3"],[483,2],[484,1,"\u01E5"],[485,2],[486,1,"\u01E7"],[487,2],[488,1,"\u01E9"],[489,2],[490,1,"\u01EB"],[491,2],[492,1,"\u01ED"],[493,2],[494,1,"\u01EF"],[[495,496],2],[[497,499],1,"dz"],[500,1,"\u01F5"],[501,2],[502,1,"\u0195"],[503,1,"\u01BF"],[504,1,"\u01F9"],[505,2],[506,1,"\u01FB"],[507,2],[508,1,"\u01FD"],[509,2],[510,1,"\u01FF"],[511,2],[512,1,"\u0201"],[513,2],[514,1,"\u0203"],[515,2],[516,1,"\u0205"],[517,2],[518,1,"\u0207"],[519,2],[520,1,"\u0209"],[521,2],[522,1,"\u020B"],[523,2],[524,1,"\u020D"],[525,2],[526,1,"\u020F"],[527,2],[528,1,"\u0211"],[529,2],[530,1,"\u0213"],[531,2],[532,1,"\u0215"],[533,2],[534,1,"\u0217"],[535,2],[536,1,"\u0219"],[537,2],[538,1,"\u021B"],[539,2],[540,1,"\u021D"],[541,2],[542,1,"\u021F"],[543,2],[544,1,"\u019E"],[545,2],[546,1,"\u0223"],[547,2],[548,1,"\u0225"],[549,2],[550,1,"\u0227"],[551,2],[552,1,"\u0229"],[553,2],[554,1,"\u022B"],[555,2],[556,1,"\u022D"],[557,2],[558,1,"\u022F"],[559,2],[560,1,"\u0231"],[561,2],[562,1,"\u0233"],[563,2],[[564,566],2],[[567,569],2],[570,1,"\u2C65"],[571,1,"\u023C"],[572,2],[573,1,"\u019A"],[574,1,"\u2C66"],[[575,576],2],[577,1,"\u0242"],[578,2],[579,1,"\u0180"],[580,1,"\u0289"],[581,1,"\u028C"],[582,1,"\u0247"],[583,2],[584,1,"\u0249"],[585,2],[586,1,"\u024B"],[587,2],[588,1,"\u024D"],[589,2],[590,1,"\u024F"],[591,2],[[592,680],2],[[681,685],2],[[686,687],2],[688,1,"h"],[689,1,"\u0266"],[690,1,"j"],[691,1,"r"],[692,1,"\u0279"],[693,1,"\u027B"],[694,1,"\u0281"],[695,1,"w"],[696,1,"y"],[[697,705],2],[[706,709],2],[[710,721],2],[[722,727],2],[728,5," \u0306"],[729,5," \u0307"],[730,5," \u030A"],[731,5," \u0328"],[732,5," \u0303"],[733,5," \u030B"],[734,2],[735,2],[736,1,"\u0263"],[737,1,"l"],[738,1,"s"],[739,1,"x"],[740,1,"\u0295"],[[741,745],2],[[746,747],2],[748,2],[749,2],[750,2],[[751,767],2],[[768,831],2],[832,1,"\u0300"],[833,1,"\u0301"],[834,2],[835,1,"\u0313"],[836,1,"\u0308\u0301"],[837,1,"\u03B9"],[[838,846],2],[847,7],[[848,855],2],[[856,860],2],[[861,863],2],[[864,865],2],[866,2],[[867,879],2],[880,1,"\u0371"],[881,2],[882,1,"\u0373"],[883,2],[884,1,"\u02B9"],[885,2],[886,1,"\u0377"],[887,2],[[888,889],3],[890,5," \u03B9"],[[891,893],2],[894,5,";"],[895,1,"\u03F3"],[[896,899],3],[900,5," \u0301"],[901,5," \u0308\u0301"],[902,1,"\u03AC"],[903,1,"\xB7"],[904,1,"\u03AD"],[905,1,"\u03AE"],[906,1,"\u03AF"],[907,3],[908,1,"\u03CC"],[909,3],[910,1,"\u03CD"],[911,1,"\u03CE"],[912,2],[913,1,"\u03B1"],[914,1,"\u03B2"],[915,1,"\u03B3"],[916,1,"\u03B4"],[917,1,"\u03B5"],[918,1,"\u03B6"],[919,1,"\u03B7"],[920,1,"\u03B8"],[921,1,"\u03B9"],[922,1,"\u03BA"],[923,1,"\u03BB"],[924,1,"\u03BC"],[925,1,"\u03BD"],[926,1,"\u03BE"],[927,1,"\u03BF"],[928,1,"\u03C0"],[929,1,"\u03C1"],[930,3],[931,1,"\u03C3"],[932,1,"\u03C4"],[933,1,"\u03C5"],[934,1,"\u03C6"],[935,1,"\u03C7"],[936,1,"\u03C8"],[937,1,"\u03C9"],[938,1,"\u03CA"],[939,1,"\u03CB"],[[940,961],2],[962,6,"\u03C3"],[[963,974],2],[975,1,"\u03D7"],[976,1,"\u03B2"],[977,1,"\u03B8"],[978,1,"\u03C5"],[979,1,"\u03CD"],[980,1,"\u03CB"],[981,1,"\u03C6"],[982,1,"\u03C0"],[983,2],[984,1,"\u03D9"],[985,2],[986,1,"\u03DB"],[987,2],[988,1,"\u03DD"],[989,2],[990,1,"\u03DF"],[991,2],[992,1,"\u03E1"],[993,2],[994,1,"\u03E3"],[995,2],[996,1,"\u03E5"],[997,2],[998,1,"\u03E7"],[999,2],[1e3,1,"\u03E9"],[1001,2],[1002,1,"\u03EB"],[1003,2],[1004,1,"\u03ED"],[1005,2],[1006,1,"\u03EF"],[1007,2],[1008,1,"\u03BA"],[1009,1,"\u03C1"],[1010,1,"\u03C3"],[1011,2],[1012,1,"\u03B8"],[1013,1,"\u03B5"],[1014,2],[1015,1,"\u03F8"],[1016,2],[1017,1,"\u03C3"],[1018,1,"\u03FB"],[1019,2],[1020,2],[1021,1,"\u037B"],[1022,1,"\u037C"],[1023,1,"\u037D"],[1024,1,"\u0450"],[1025,1,"\u0451"],[1026,1,"\u0452"],[1027,1,"\u0453"],[1028,1,"\u0454"],[1029,1,"\u0455"],[1030,1,"\u0456"],[1031,1,"\u0457"],[1032,1,"\u0458"],[1033,1,"\u0459"],[1034,1,"\u045A"],[1035,1,"\u045B"],[1036,1,"\u045C"],[1037,1,"\u045D"],[1038,1,"\u045E"],[1039,1,"\u045F"],[1040,1,"\u0430"],[1041,1,"\u0431"],[1042,1,"\u0432"],[1043,1,"\u0433"],[1044,1,"\u0434"],[1045,1,"\u0435"],[1046,1,"\u0436"],[1047,1,"\u0437"],[1048,1,"\u0438"],[1049,1,"\u0439"],[1050,1,"\u043A"],[1051,1,"\u043B"],[1052,1,"\u043C"],[1053,1,"\u043D"],[1054,1,"\u043E"],[1055,1,"\u043F"],[1056,1,"\u0440"],[1057,1,"\u0441"],[1058,1,"\u0442"],[1059,1,"\u0443"],[1060,1,"\u0444"],[1061,1,"\u0445"],[1062,1,"\u0446"],[1063,1,"\u0447"],[1064,1,"\u0448"],[1065,1,"\u0449"],[1066,1,"\u044A"],[1067,1,"\u044B"],[1068,1,"\u044C"],[1069,1,"\u044D"],[1070,1,"\u044E"],[1071,1,"\u044F"],[[1072,1103],2],[1104,2],[[1105,1116],2],[1117,2],[[1118,1119],2],[1120,1,"\u0461"],[1121,2],[1122,1,"\u0463"],[1123,2],[1124,1,"\u0465"],[1125,2],[1126,1,"\u0467"],[1127,2],[1128,1,"\u0469"],[1129,2],[1130,1,"\u046B"],[1131,2],[1132,1,"\u046D"],[1133,2],[1134,1,"\u046F"],[1135,2],[1136,1,"\u0471"],[1137,2],[1138,1,"\u0473"],[1139,2],[1140,1,"\u0475"],[1141,2],[1142,1,"\u0477"],[1143,2],[1144,1,"\u0479"],[1145,2],[1146,1,"\u047B"],[1147,2],[1148,1,"\u047D"],[1149,2],[1150,1,"\u047F"],[1151,2],[1152,1,"\u0481"],[1153,2],[1154,2],[[1155,1158],2],[1159,2],[[1160,1161],2],[1162,1,"\u048B"],[1163,2],[1164,1,"\u048D"],[1165,2],[1166,1,"\u048F"],[1167,2],[1168,1,"\u0491"],[1169,2],[1170,1,"\u0493"],[1171,2],[1172,1,"\u0495"],[1173,2],[1174,1,"\u0497"],[1175,2],[1176,1,"\u0499"],[1177,2],[1178,1,"\u049B"],[1179,2],[1180,1,"\u049D"],[1181,2],[1182,1,"\u049F"],[1183,2],[1184,1,"\u04A1"],[1185,2],[1186,1,"\u04A3"],[1187,2],[1188,1,"\u04A5"],[1189,2],[1190,1,"\u04A7"],[1191,2],[1192,1,"\u04A9"],[1193,2],[1194,1,"\u04AB"],[1195,2],[1196,1,"\u04AD"],[1197,2],[1198,1,"\u04AF"],[1199,2],[1200,1,"\u04B1"],[1201,2],[1202,1,"\u04B3"],[1203,2],[1204,1,"\u04B5"],[1205,2],[1206,1,"\u04B7"],[1207,2],[1208,1,"\u04B9"],[1209,2],[1210,1,"\u04BB"],[1211,2],[1212,1,"\u04BD"],[1213,2],[1214,1,"\u04BF"],[1215,2],[1216,3],[1217,1,"\u04C2"],[1218,2],[1219,1,"\u04C4"],[1220,2],[1221,1,"\u04C6"],[1222,2],[1223,1,"\u04C8"],[1224,2],[1225,1,"\u04CA"],[1226,2],[1227,1,"\u04CC"],[1228,2],[1229,1,"\u04CE"],[1230,2],[1231,2],[1232,1,"\u04D1"],[1233,2],[1234,1,"\u04D3"],[1235,2],[1236,1,"\u04D5"],[1237,2],[1238,1,"\u04D7"],[1239,2],[1240,1,"\u04D9"],[1241,2],[1242,1,"\u04DB"],[1243,2],[1244,1,"\u04DD"],[1245,2],[1246,1,"\u04DF"],[1247,2],[1248,1,"\u04E1"],[1249,2],[1250,1,"\u04E3"],[1251,2],[1252,1,"\u04E5"],[1253,2],[1254,1,"\u04E7"],[1255,2],[1256,1,"\u04E9"],[1257,2],[1258,1,"\u04EB"],[1259,2],[1260,1,"\u04ED"],[1261,2],[1262,1,"\u04EF"],[1263,2],[1264,1,"\u04F1"],[1265,2],[1266,1,"\u04F3"],[1267,2],[1268,1,"\u04F5"],[1269,2],[1270,1,"\u04F7"],[1271,2],[1272,1,"\u04F9"],[1273,2],[1274,1,"\u04FB"],[1275,2],[1276,1,"\u04FD"],[1277,2],[1278,1,"\u04FF"],[1279,2],[1280,1,"\u0501"],[1281,2],[1282,1,"\u0503"],[1283,2],[1284,1,"\u0505"],[1285,2],[1286,1,"\u0507"],[1287,2],[1288,1,"\u0509"],[1289,2],[1290,1,"\u050B"],[1291,2],[1292,1,"\u050D"],[1293,2],[1294,1,"\u050F"],[1295,2],[1296,1,"\u0511"],[1297,2],[1298,1,"\u0513"],[1299,2],[1300,1,"\u0515"],[1301,2],[1302,1,"\u0517"],[1303,2],[1304,1,"\u0519"],[1305,2],[1306,1,"\u051B"],[1307,2],[1308,1,"\u051D"],[1309,2],[1310,1,"\u051F"],[1311,2],[1312,1,"\u0521"],[1313,2],[1314,1,"\u0523"],[1315,2],[1316,1,"\u0525"],[1317,2],[1318,1,"\u0527"],[1319,2],[1320,1,"\u0529"],[1321,2],[1322,1,"\u052B"],[1323,2],[1324,1,"\u052D"],[1325,2],[1326,1,"\u052F"],[1327,2],[1328,3],[1329,1,"\u0561"],[1330,1,"\u0562"],[1331,1,"\u0563"],[1332,1,"\u0564"],[1333,1,"\u0565"],[1334,1,"\u0566"],[1335,1,"\u0567"],[1336,1,"\u0568"],[1337,1,"\u0569"],[1338,1,"\u056A"],[1339,1,"\u056B"],[1340,1,"\u056C"],[1341,1,"\u056D"],[1342,1,"\u056E"],[1343,1,"\u056F"],[1344,1,"\u0570"],[1345,1,"\u0571"],[1346,1,"\u0572"],[1347,1,"\u0573"],[1348,1,"\u0574"],[1349,1,"\u0575"],[1350,1,"\u0576"],[1351,1,"\u0577"],[1352,1,"\u0578"],[1353,1,"\u0579"],[1354,1,"\u057A"],[1355,1,"\u057B"],[1356,1,"\u057C"],[1357,1,"\u057D"],[1358,1,"\u057E"],[1359,1,"\u057F"],[1360,1,"\u0580"],[1361,1,"\u0581"],[1362,1,"\u0582"],[1363,1,"\u0583"],[1364,1,"\u0584"],[1365,1,"\u0585"],[1366,1,"\u0586"],[[1367,1368],3],[1369,2],[[1370,1375],2],[1376,2],[[1377,1414],2],[1415,1,"\u0565\u0582"],[1416,2],[1417,2],[1418,2],[[1419,1420],3],[[1421,1422],2],[1423,2],[1424,3],[[1425,1441],2],[1442,2],[[1443,1455],2],[[1456,1465],2],[1466,2],[[1467,1469],2],[1470,2],[1471,2],[1472,2],[[1473,1474],2],[1475,2],[1476,2],[1477,2],[1478,2],[1479,2],[[1480,1487],3],[[1488,1514],2],[[1515,1518],3],[1519,2],[[1520,1524],2],[[1525,1535],3],[[1536,1539],3],[1540,3],[1541,3],[[1542,1546],2],[1547,2],[1548,2],[[1549,1551],2],[[1552,1557],2],[[1558,1562],2],[1563,2],[1564,3],[1565,2],[1566,2],[1567,2],[1568,2],[[1569,1594],2],[[1595,1599],2],[1600,2],[[1601,1618],2],[[1619,1621],2],[[1622,1624],2],[[1625,1630],2],[1631,2],[[1632,1641],2],[[1642,1645],2],[[1646,1647],2],[[1648,1652],2],[1653,1,"\u0627\u0674"],[1654,1,"\u0648\u0674"],[1655,1,"\u06C7\u0674"],[1656,1,"\u064A\u0674"],[[1657,1719],2],[[1720,1721],2],[[1722,1726],2],[1727,2],[[1728,1742],2],[1743,2],[[1744,1747],2],[1748,2],[[1749,1756],2],[1757,3],[1758,2],[[1759,1768],2],[1769,2],[[1770,1773],2],[[1774,1775],2],[[1776,1785],2],[[1786,1790],2],[1791,2],[[1792,1805],2],[1806,3],[1807,3],[[1808,1836],2],[[1837,1839],2],[[1840,1866],2],[[1867,1868],3],[[1869,1871],2],[[1872,1901],2],[[1902,1919],2],[[1920,1968],2],[1969,2],[[1970,1983],3],[[1984,2037],2],[[2038,2042],2],[[2043,2044],3],[2045,2],[[2046,2047],2],[[2048,2093],2],[[2094,2095],3],[[2096,2110],2],[2111,3],[[2112,2139],2],[[2140,2141],3],[2142,2],[2143,3],[[2144,2154],2],[[2155,2159],3],[[2160,2183],2],[2184,2],[[2185,2190],2],[2191,3],[[2192,2193],3],[[2194,2199],3],[[2200,2207],2],[2208,2],[2209,2],[[2210,2220],2],[[2221,2226],2],[[2227,2228],2],[2229,2],[[2230,2237],2],[[2238,2247],2],[[2248,2258],2],[2259,2],[[2260,2273],2],[2274,3],[2275,2],[[2276,2302],2],[2303,2],[2304,2],[[2305,2307],2],[2308,2],[[2309,2361],2],[[2362,2363],2],[[2364,2381],2],[2382,2],[2383,2],[[2384,2388],2],[2389,2],[[2390,2391],2],[2392,1,"\u0915\u093C"],[2393,1,"\u0916\u093C"],[2394,1,"\u0917\u093C"],[2395,1,"\u091C\u093C"],[2396,1,"\u0921\u093C"],[2397,1,"\u0922\u093C"],[2398,1,"\u092B\u093C"],[2399,1,"\u092F\u093C"],[[2400,2403],2],[[2404,2405],2],[[2406,2415],2],[2416,2],[[2417,2418],2],[[2419,2423],2],[2424,2],[[2425,2426],2],[[2427,2428],2],[2429,2],[[2430,2431],2],[2432,2],[[2433,2435],2],[2436,3],[[2437,2444],2],[[2445,2446],3],[[2447,2448],2],[[2449,2450],3],[[2451,2472],2],[2473,3],[[2474,2480],2],[2481,3],[2482,2],[[2483,2485],3],[[2486,2489],2],[[2490,2491],3],[2492,2],[2493,2],[[2494,2500],2],[[2501,2502],3],[[2503,2504],2],[[2505,2506],3],[[2507,2509],2],[2510,2],[[2511,2518],3],[2519,2],[[2520,2523],3],[2524,1,"\u09A1\u09BC"],[2525,1,"\u09A2\u09BC"],[2526,3],[2527,1,"\u09AF\u09BC"],[[2528,2531],2],[[2532,2533],3],[[2534,2545],2],[[2546,2554],2],[2555,2],[2556,2],[2557,2],[2558,2],[[2559,2560],3],[2561,2],[2562,2],[2563,2],[2564,3],[[2565,2570],2],[[2571,2574],3],[[2575,2576],2],[[2577,2578],3],[[2579,2600],2],[2601,3],[[2602,2608],2],[2609,3],[2610,2],[2611,1,"\u0A32\u0A3C"],[2612,3],[2613,2],[2614,1,"\u0A38\u0A3C"],[2615,3],[[2616,2617],2],[[2618,2619],3],[2620,2],[2621,3],[[2622,2626],2],[[2627,2630],3],[[2631,2632],2],[[2633,2634],3],[[2635,2637],2],[[2638,2640],3],[2641,2],[[2642,2648],3],[2649,1,"\u0A16\u0A3C"],[2650,1,"\u0A17\u0A3C"],[2651,1,"\u0A1C\u0A3C"],[2652,2],[2653,3],[2654,1,"\u0A2B\u0A3C"],[[2655,2661],3],[[2662,2676],2],[2677,2],[2678,2],[[2679,2688],3],[[2689,2691],2],[2692,3],[[2693,2699],2],[2700,2],[2701,2],[2702,3],[[2703,2705],2],[2706,3],[[2707,2728],2],[2729,3],[[2730,2736],2],[2737,3],[[2738,2739],2],[2740,3],[[2741,2745],2],[[2746,2747],3],[[2748,2757],2],[2758,3],[[2759,2761],2],[2762,3],[[2763,2765],2],[[2766,2767],3],[2768,2],[[2769,2783],3],[2784,2],[[2785,2787],2],[[2788,2789],3],[[2790,2799],2],[2800,2],[2801,2],[[2802,2808],3],[2809,2],[[2810,2815],2],[2816,3],[[2817,2819],2],[2820,3],[[2821,2828],2],[[2829,2830],3],[[2831,2832],2],[[2833,2834],3],[[2835,2856],2],[2857,3],[[2858,2864],2],[2865,3],[[2866,2867],2],[2868,3],[2869,2],[[2870,2873],2],[[2874,2875],3],[[2876,2883],2],[2884,2],[[2885,2886],3],[[2887,2888],2],[[2889,2890],3],[[2891,2893],2],[[2894,2900],3],[2901,2],[[2902,2903],2],[[2904,2907],3],[2908,1,"\u0B21\u0B3C"],[2909,1,"\u0B22\u0B3C"],[2910,3],[[2911,2913],2],[[2914,2915],2],[[2916,2917],3],[[2918,2927],2],[2928,2],[2929,2],[[2930,2935],2],[[2936,2945],3],[[2946,2947],2],[2948,3],[[2949,2954],2],[[2955,2957],3],[[2958,2960],2],[2961,3],[[2962,2965],2],[[2966,2968],3],[[2969,2970],2],[2971,3],[2972,2],[2973,3],[[2974,2975],2],[[2976,2978],3],[[2979,2980],2],[[2981,2983],3],[[2984,2986],2],[[2987,2989],3],[[2990,2997],2],[2998,2],[[2999,3001],2],[[3002,3005],3],[[3006,3010],2],[[3011,3013],3],[[3014,3016],2],[3017,3],[[3018,3021],2],[[3022,3023],3],[3024,2],[[3025,3030],3],[3031,2],[[3032,3045],3],[3046,2],[[3047,3055],2],[[3056,3058],2],[[3059,3066],2],[[3067,3071],3],[3072,2],[[3073,3075],2],[3076,2],[[3077,3084],2],[3085,3],[[3086,3088],2],[3089,3],[[3090,3112],2],[3113,3],[[3114,3123],2],[3124,2],[[3125,3129],2],[[3130,3131],3],[3132,2],[3133,2],[[3134,3140],2],[3141,3],[[3142,3144],2],[3145,3],[[3146,3149],2],[[3150,3156],3],[[3157,3158],2],[3159,3],[[3160,3161],2],[3162,2],[[3163,3164],3],[3165,2],[[3166,3167],3],[[3168,3169],2],[[3170,3171],2],[[3172,3173],3],[[3174,3183],2],[[3184,3190],3],[3191,2],[[3192,3199],2],[3200,2],[3201,2],[[3202,3203],2],[3204,2],[[3205,3212],2],[3213,3],[[3214,3216],2],[3217,3],[[3218,3240],2],[3241,3],[[3242,3251],2],[3252,3],[[3253,3257],2],[[3258,3259],3],[[3260,3261],2],[[3262,3268],2],[3269,3],[[3270,3272],2],[3273,3],[[3274,3277],2],[[3278,3284],3],[[3285,3286],2],[[3287,3292],3],[3293,2],[3294,2],[3295,3],[[3296,3297],2],[[3298,3299],2],[[3300,3301],3],[[3302,3311],2],[3312,3],[[3313,3314],2],[3315,2],[[3316,3327],3],[3328,2],[3329,2],[[3330,3331],2],[3332,2],[[3333,3340],2],[3341,3],[[3342,3344],2],[3345,3],[[3346,3368],2],[3369,2],[[3370,3385],2],[3386,2],[[3387,3388],2],[3389,2],[[3390,3395],2],[3396,2],[3397,3],[[3398,3400],2],[3401,3],[[3402,3405],2],[3406,2],[3407,2],[[3408,3411],3],[[3412,3414],2],[3415,2],[[3416,3422],2],[3423,2],[[3424,3425],2],[[3426,3427],2],[[3428,3429],3],[[3430,3439],2],[[3440,3445],2],[[3446,3448],2],[3449,2],[[3450,3455],2],[3456,3],[3457,2],[[3458,3459],2],[3460,3],[[3461,3478],2],[[3479,3481],3],[[3482,3505],2],[3506,3],[[3507,3515],2],[3516,3],[3517,2],[[3518,3519],3],[[3520,3526],2],[[3527,3529],3],[3530,2],[[3531,3534],3],[[3535,3540],2],[3541,3],[3542,2],[3543,3],[[3544,3551],2],[[3552,3557],3],[[3558,3567],2],[[3568,3569],3],[[3570,3571],2],[3572,2],[[3573,3584],3],[[3585,3634],2],[3635,1,"\u0E4D\u0E32"],[[3636,3642],2],[[3643,3646],3],[3647,2],[[3648,3662],2],[3663,2],[[3664,3673],2],[[3674,3675],2],[[3676,3712],3],[[3713,3714],2],[3715,3],[3716,2],[3717,3],[3718,2],[[3719,3720],2],[3721,2],[3722,2],[3723,3],[3724,2],[3725,2],[[3726,3731],2],[[3732,3735],2],[3736,2],[[3737,3743],2],[3744,2],[[3745,3747],2],[3748,3],[3749,2],[3750,3],[3751,2],[[3752,3753],2],[[3754,3755],2],[3756,2],[[3757,3762],2],[3763,1,"\u0ECD\u0EB2"],[[3764,3769],2],[3770,2],[[3771,3773],2],[[3774,3775],3],[[3776,3780],2],[3781,3],[3782,2],[3783,3],[[3784,3789],2],[3790,2],[3791,3],[[3792,3801],2],[[3802,3803],3],[3804,1,"\u0EAB\u0E99"],[3805,1,"\u0EAB\u0EA1"],[[3806,3807],2],[[3808,3839],3],[3840,2],[[3841,3850],2],[3851,2],[3852,1,"\u0F0B"],[[3853,3863],2],[[3864,3865],2],[[3866,3871],2],[[3872,3881],2],[[3882,3892],2],[3893,2],[3894,2],[3895,2],[3896,2],[3897,2],[[3898,3901],2],[[3902,3906],2],[3907,1,"\u0F42\u0FB7"],[[3908,3911],2],[3912,3],[[3913,3916],2],[3917,1,"\u0F4C\u0FB7"],[[3918,3921],2],[3922,1,"\u0F51\u0FB7"],[[3923,3926],2],[3927,1,"\u0F56\u0FB7"],[[3928,3931],2],[3932,1,"\u0F5B\u0FB7"],[[3933,3944],2],[3945,1,"\u0F40\u0FB5"],[3946,2],[[3947,3948],2],[[3949,3952],3],[[3953,3954],2],[3955,1,"\u0F71\u0F72"],[3956,2],[3957,1,"\u0F71\u0F74"],[3958,1,"\u0FB2\u0F80"],[3959,1,"\u0FB2\u0F71\u0F80"],[3960,1,"\u0FB3\u0F80"],[3961,1,"\u0FB3\u0F71\u0F80"],[[3962,3968],2],[3969,1,"\u0F71\u0F80"],[[3970,3972],2],[3973,2],[[3974,3979],2],[[3980,3983],2],[[3984,3986],2],[3987,1,"\u0F92\u0FB7"],[[3988,3989],2],[3990,2],[3991,2],[3992,3],[[3993,3996],2],[3997,1,"\u0F9C\u0FB7"],[[3998,4001],2],[4002,1,"\u0FA1\u0FB7"],[[4003,4006],2],[4007,1,"\u0FA6\u0FB7"],[[4008,4011],2],[4012,1,"\u0FAB\u0FB7"],[4013,2],[[4014,4016],2],[[4017,4023],2],[4024,2],[4025,1,"\u0F90\u0FB5"],[[4026,4028],2],[4029,3],[[4030,4037],2],[4038,2],[[4039,4044],2],[4045,3],[4046,2],[4047,2],[[4048,4049],2],[[4050,4052],2],[[4053,4056],2],[[4057,4058],2],[[4059,4095],3],[[4096,4129],2],[4130,2],[[4131,4135],2],[4136,2],[[4137,4138],2],[4139,2],[[4140,4146],2],[[4147,4149],2],[[4150,4153],2],[[4154,4159],2],[[4160,4169],2],[[4170,4175],2],[[4176,4185],2],[[4186,4249],2],[[4250,4253],2],[[4254,4255],2],[[4256,4293],3],[4294,3],[4295,1,"\u2D27"],[[4296,4300],3],[4301,1,"\u2D2D"],[[4302,4303],3],[[4304,4342],2],[[4343,4344],2],[[4345,4346],2],[4347,2],[4348,1,"\u10DC"],[[4349,4351],2],[[4352,4441],2],[[4442,4446],2],[[4447,4448],3],[[4449,4514],2],[[4515,4519],2],[[4520,4601],2],[[4602,4607],2],[[4608,4614],2],[4615,2],[[4616,4678],2],[4679,2],[4680,2],[4681,3],[[4682,4685],2],[[4686,4687],3],[[4688,4694],2],[4695,3],[4696,2],[4697,3],[[4698,4701],2],[[4702,4703],3],[[4704,4742],2],[4743,2],[4744,2],[4745,3],[[4746,4749],2],[[4750,4751],3],[[4752,4782],2],[4783,2],[4784,2],[4785,3],[[4786,4789],2],[[4790,4791],3],[[4792,4798],2],[4799,3],[4800,2],[4801,3],[[4802,4805],2],[[4806,4807],3],[[4808,4814],2],[4815,2],[[4816,4822],2],[4823,3],[[4824,4846],2],[4847,2],[[4848,4878],2],[4879,2],[4880,2],[4881,3],[[4882,4885],2],[[4886,4887],3],[[4888,4894],2],[4895,2],[[4896,4934],2],[4935,2],[[4936,4954],2],[[4955,4956],3],[[4957,4958],2],[4959,2],[4960,2],[[4961,4988],2],[[4989,4991],3],[[4992,5007],2],[[5008,5017],2],[[5018,5023],3],[[5024,5108],2],[5109,2],[[5110,5111],3],[5112,1,"\u13F0"],[5113,1,"\u13F1"],[5114,1,"\u13F2"],[5115,1,"\u13F3"],[5116,1,"\u13F4"],[5117,1,"\u13F5"],[[5118,5119],3],[5120,2],[[5121,5740],2],[[5741,5742],2],[[5743,5750],2],[[5751,5759],2],[5760,3],[[5761,5786],2],[[5787,5788],2],[[5789,5791],3],[[5792,5866],2],[[5867,5872],2],[[5873,5880],2],[[5881,5887],3],[[5888,5900],2],[5901,2],[[5902,5908],2],[5909,2],[[5910,5918],3],[5919,2],[[5920,5940],2],[[5941,5942],2],[[5943,5951],3],[[5952,5971],2],[[5972,5983],3],[[5984,5996],2],[5997,3],[[5998,6e3],2],[6001,3],[[6002,6003],2],[[6004,6015],3],[[6016,6067],2],[[6068,6069],3],[[6070,6099],2],[[6100,6102],2],[6103,2],[[6104,6107],2],[6108,2],[6109,2],[[6110,6111],3],[[6112,6121],2],[[6122,6127],3],[[6128,6137],2],[[6138,6143],3],[[6144,6149],2],[6150,3],[[6151,6154],2],[[6155,6157],7],[6158,3],[6159,7],[[6160,6169],2],[[6170,6175],3],[[6176,6263],2],[6264,2],[[6265,6271],3],[[6272,6313],2],[6314,2],[[6315,6319],3],[[6320,6389],2],[[6390,6399],3],[[6400,6428],2],[[6429,6430],2],[6431,3],[[6432,6443],2],[[6444,6447],3],[[6448,6459],2],[[6460,6463],3],[6464,2],[[6465,6467],3],[[6468,6469],2],[[6470,6509],2],[[6510,6511],3],[[6512,6516],2],[[6517,6527],3],[[6528,6569],2],[[6570,6571],2],[[6572,6575],3],[[6576,6601],2],[[6602,6607],3],[[6608,6617],2],[6618,2],[[6619,6621],3],[[6622,6623],2],[[6624,6655],2],[[6656,6683],2],[[6684,6685],3],[[6686,6687],2],[[6688,6750],2],[6751,3],[[6752,6780],2],[[6781,6782],3],[[6783,6793],2],[[6794,6799],3],[[6800,6809],2],[[6810,6815],3],[[6816,6822],2],[6823,2],[[6824,6829],2],[[6830,6831],3],[[6832,6845],2],[6846,2],[[6847,6848],2],[[6849,6862],2],[[6863,6911],3],[[6912,6987],2],[6988,2],[[6989,6991],3],[[6992,7001],2],[[7002,7018],2],[[7019,7027],2],[[7028,7036],2],[[7037,7038],2],[7039,3],[[7040,7082],2],[[7083,7085],2],[[7086,7097],2],[[7098,7103],2],[[7104,7155],2],[[7156,7163],3],[[7164,7167],2],[[7168,7223],2],[[7224,7226],3],[[7227,7231],2],[[7232,7241],2],[[7242,7244],3],[[7245,7293],2],[[7294,7295],2],[7296,1,"\u0432"],[7297,1,"\u0434"],[7298,1,"\u043E"],[7299,1,"\u0441"],[[7300,7301],1,"\u0442"],[7302,1,"\u044A"],[7303,1,"\u0463"],[7304,1,"\uA64B"],[[7305,7311],3],[7312,1,"\u10D0"],[7313,1,"\u10D1"],[7314,1,"\u10D2"],[7315,1,"\u10D3"],[7316,1,"\u10D4"],[7317,1,"\u10D5"],[7318,1,"\u10D6"],[7319,1,"\u10D7"],[7320,1,"\u10D8"],[7321,1,"\u10D9"],[7322,1,"\u10DA"],[7323,1,"\u10DB"],[7324,1,"\u10DC"],[7325,1,"\u10DD"],[7326,1,"\u10DE"],[7327,1,"\u10DF"],[7328,1,"\u10E0"],[7329,1,"\u10E1"],[7330,1,"\u10E2"],[7331,1,"\u10E3"],[7332,1,"\u10E4"],[7333,1,"\u10E5"],[7334,1,"\u10E6"],[7335,1,"\u10E7"],[7336,1,"\u10E8"],[7337,1,"\u10E9"],[7338,1,"\u10EA"],[7339,1,"\u10EB"],[7340,1,"\u10EC"],[7341,1,"\u10ED"],[7342,1,"\u10EE"],[7343,1,"\u10EF"],[7344,1,"\u10F0"],[7345,1,"\u10F1"],[7346,1,"\u10F2"],[7347,1,"\u10F3"],[7348,1,"\u10F4"],[7349,1,"\u10F5"],[7350,1,"\u10F6"],[7351,1,"\u10F7"],[7352,1,"\u10F8"],[7353,1,"\u10F9"],[7354,1,"\u10FA"],[[7355,7356],3],[7357,1,"\u10FD"],[7358,1,"\u10FE"],[7359,1,"\u10FF"],[[7360,7367],2],[[7368,7375],3],[[7376,7378],2],[7379,2],[[7380,7410],2],[[7411,7414],2],[7415,2],[[7416,7417],2],[7418,2],[[7419,7423],3],[[7424,7467],2],[7468,1,"a"],[7469,1,"\xE6"],[7470,1,"b"],[7471,2],[7472,1,"d"],[7473,1,"e"],[7474,1,"\u01DD"],[7475,1,"g"],[7476,1,"h"],[7477,1,"i"],[7478,1,"j"],[7479,1,"k"],[7480,1,"l"],[7481,1,"m"],[7482,1,"n"],[7483,2],[7484,1,"o"],[7485,1,"\u0223"],[7486,1,"p"],[7487,1,"r"],[7488,1,"t"],[7489,1,"u"],[7490,1,"w"],[7491,1,"a"],[7492,1,"\u0250"],[7493,1,"\u0251"],[7494,1,"\u1D02"],[7495,1,"b"],[7496,1,"d"],[7497,1,"e"],[7498,1,"\u0259"],[7499,1,"\u025B"],[7500,1,"\u025C"],[7501,1,"g"],[7502,2],[7503,1,"k"],[7504,1,"m"],[7505,1,"\u014B"],[7506,1,"o"],[7507,1,"\u0254"],[7508,1,"\u1D16"],[7509,1,"\u1D17"],[7510,1,"p"],[7511,1,"t"],[7512,1,"u"],[7513,1,"\u1D1D"],[7514,1,"\u026F"],[7515,1,"v"],[7516,1,"\u1D25"],[7517,1,"\u03B2"],[7518,1,"\u03B3"],[7519,1,"\u03B4"],[7520,1,"\u03C6"],[7521,1,"\u03C7"],[7522,1,"i"],[7523,1,"r"],[7524,1,"u"],[7525,1,"v"],[7526,1,"\u03B2"],[7527,1,"\u03B3"],[7528,1,"\u03C1"],[7529,1,"\u03C6"],[7530,1,"\u03C7"],[7531,2],[[7532,7543],2],[7544,1,"\u043D"],[[7545,7578],2],[7579,1,"\u0252"],[7580,1,"c"],[7581,1,"\u0255"],[7582,1,"\xF0"],[7583,1,"\u025C"],[7584,1,"f"],[7585,1,"\u025F"],[7586,1,"\u0261"],[7587,1,"\u0265"],[7588,1,"\u0268"],[7589,1,"\u0269"],[7590,1,"\u026A"],[7591,1,"\u1D7B"],[7592,1,"\u029D"],[7593,1,"\u026D"],[7594,1,"\u1D85"],[7595,1,"\u029F"],[7596,1,"\u0271"],[7597,1,"\u0270"],[7598,1,"\u0272"],[7599,1,"\u0273"],[7600,1,"\u0274"],[7601,1,"\u0275"],[7602,1,"\u0278"],[7603,1,"\u0282"],[7604,1,"\u0283"],[7605,1,"\u01AB"],[7606,1,"\u0289"],[7607,1,"\u028A"],[7608,1,"\u1D1C"],[7609,1,"\u028B"],[7610,1,"\u028C"],[7611,1,"z"],[7612,1,"\u0290"],[7613,1,"\u0291"],[7614,1,"\u0292"],[7615,1,"\u03B8"],[[7616,7619],2],[[7620,7626],2],[[7627,7654],2],[[7655,7669],2],[[7670,7673],2],[7674,2],[7675,2],[7676,2],[7677,2],[[7678,7679],2],[7680,1,"\u1E01"],[7681,2],[7682,1,"\u1E03"],[7683,2],[7684,1,"\u1E05"],[7685,2],[7686,1,"\u1E07"],[7687,2],[7688,1,"\u1E09"],[7689,2],[7690,1,"\u1E0B"],[7691,2],[7692,1,"\u1E0D"],[7693,2],[7694,1,"\u1E0F"],[7695,2],[7696,1,"\u1E11"],[7697,2],[7698,1,"\u1E13"],[7699,2],[7700,1,"\u1E15"],[7701,2],[7702,1,"\u1E17"],[7703,2],[7704,1,"\u1E19"],[7705,2],[7706,1,"\u1E1B"],[7707,2],[7708,1,"\u1E1D"],[7709,2],[7710,1,"\u1E1F"],[7711,2],[7712,1,"\u1E21"],[7713,2],[7714,1,"\u1E23"],[7715,2],[7716,1,"\u1E25"],[7717,2],[7718,1,"\u1E27"],[7719,2],[7720,1,"\u1E29"],[7721,2],[7722,1,"\u1E2B"],[7723,2],[7724,1,"\u1E2D"],[7725,2],[7726,1,"\u1E2F"],[7727,2],[7728,1,"\u1E31"],[7729,2],[7730,1,"\u1E33"],[7731,2],[7732,1,"\u1E35"],[7733,2],[7734,1,"\u1E37"],[7735,2],[7736,1,"\u1E39"],[7737,2],[7738,1,"\u1E3B"],[7739,2],[7740,1,"\u1E3D"],[7741,2],[7742,1,"\u1E3F"],[7743,2],[7744,1,"\u1E41"],[7745,2],[7746,1,"\u1E43"],[7747,2],[7748,1,"\u1E45"],[7749,2],[7750,1,"\u1E47"],[7751,2],[7752,1,"\u1E49"],[7753,2],[7754,1,"\u1E4B"],[7755,2],[7756,1,"\u1E4D"],[7757,2],[7758,1,"\u1E4F"],[7759,2],[7760,1,"\u1E51"],[7761,2],[7762,1,"\u1E53"],[7763,2],[7764,1,"\u1E55"],[7765,2],[7766,1,"\u1E57"],[7767,2],[7768,1,"\u1E59"],[7769,2],[7770,1,"\u1E5B"],[7771,2],[7772,1,"\u1E5D"],[7773,2],[7774,1,"\u1E5F"],[7775,2],[7776,1,"\u1E61"],[7777,2],[7778,1,"\u1E63"],[7779,2],[7780,1,"\u1E65"],[7781,2],[7782,1,"\u1E67"],[7783,2],[7784,1,"\u1E69"],[7785,2],[7786,1,"\u1E6B"],[7787,2],[7788,1,"\u1E6D"],[7789,2],[7790,1,"\u1E6F"],[7791,2],[7792,1,"\u1E71"],[7793,2],[7794,1,"\u1E73"],[7795,2],[7796,1,"\u1E75"],[7797,2],[7798,1,"\u1E77"],[7799,2],[7800,1,"\u1E79"],[7801,2],[7802,1,"\u1E7B"],[7803,2],[7804,1,"\u1E7D"],[7805,2],[7806,1,"\u1E7F"],[7807,2],[7808,1,"\u1E81"],[7809,2],[7810,1,"\u1E83"],[7811,2],[7812,1,"\u1E85"],[7813,2],[7814,1,"\u1E87"],[7815,2],[7816,1,"\u1E89"],[7817,2],[7818,1,"\u1E8B"],[7819,2],[7820,1,"\u1E8D"],[7821,2],[7822,1,"\u1E8F"],[7823,2],[7824,1,"\u1E91"],[7825,2],[7826,1,"\u1E93"],[7827,2],[7828,1,"\u1E95"],[[7829,7833],2],[7834,1,"a\u02BE"],[7835,1,"\u1E61"],[[7836,7837],2],[7838,1,"ss"],[7839,2],[7840,1,"\u1EA1"],[7841,2],[7842,1,"\u1EA3"],[7843,2],[7844,1,"\u1EA5"],[7845,2],[7846,1,"\u1EA7"],[7847,2],[7848,1,"\u1EA9"],[7849,2],[7850,1,"\u1EAB"],[7851,2],[7852,1,"\u1EAD"],[7853,2],[7854,1,"\u1EAF"],[7855,2],[7856,1,"\u1EB1"],[7857,2],[7858,1,"\u1EB3"],[7859,2],[7860,1,"\u1EB5"],[7861,2],[7862,1,"\u1EB7"],[7863,2],[7864,1,"\u1EB9"],[7865,2],[7866,1,"\u1EBB"],[7867,2],[7868,1,"\u1EBD"],[7869,2],[7870,1,"\u1EBF"],[7871,2],[7872,1,"\u1EC1"],[7873,2],[7874,1,"\u1EC3"],[7875,2],[7876,1,"\u1EC5"],[7877,2],[7878,1,"\u1EC7"],[7879,2],[7880,1,"\u1EC9"],[7881,2],[7882,1,"\u1ECB"],[7883,2],[7884,1,"\u1ECD"],[7885,2],[7886,1,"\u1ECF"],[7887,2],[7888,1,"\u1ED1"],[7889,2],[7890,1,"\u1ED3"],[7891,2],[7892,1,"\u1ED5"],[7893,2],[7894,1,"\u1ED7"],[7895,2],[7896,1,"\u1ED9"],[7897,2],[7898,1,"\u1EDB"],[7899,2],[7900,1,"\u1EDD"],[7901,2],[7902,1,"\u1EDF"],[7903,2],[7904,1,"\u1EE1"],[7905,2],[7906,1,"\u1EE3"],[7907,2],[7908,1,"\u1EE5"],[7909,2],[7910,1,"\u1EE7"],[7911,2],[7912,1,"\u1EE9"],[7913,2],[7914,1,"\u1EEB"],[7915,2],[7916,1,"\u1EED"],[7917,2],[7918,1,"\u1EEF"],[7919,2],[7920,1,"\u1EF1"],[7921,2],[7922,1,"\u1EF3"],[7923,2],[7924,1,"\u1EF5"],[7925,2],[7926,1,"\u1EF7"],[7927,2],[7928,1,"\u1EF9"],[7929,2],[7930,1,"\u1EFB"],[7931,2],[7932,1,"\u1EFD"],[7933,2],[7934,1,"\u1EFF"],[7935,2],[[7936,7943],2],[7944,1,"\u1F00"],[7945,1,"\u1F01"],[7946,1,"\u1F02"],[7947,1,"\u1F03"],[7948,1,"\u1F04"],[7949,1,"\u1F05"],[7950,1,"\u1F06"],[7951,1,"\u1F07"],[[7952,7957],2],[[7958,7959],3],[7960,1,"\u1F10"],[7961,1,"\u1F11"],[7962,1,"\u1F12"],[7963,1,"\u1F13"],[7964,1,"\u1F14"],[7965,1,"\u1F15"],[[7966,7967],3],[[7968,7975],2],[7976,1,"\u1F20"],[7977,1,"\u1F21"],[7978,1,"\u1F22"],[7979,1,"\u1F23"],[7980,1,"\u1F24"],[7981,1,"\u1F25"],[7982,1,"\u1F26"],[7983,1,"\u1F27"],[[7984,7991],2],[7992,1,"\u1F30"],[7993,1,"\u1F31"],[7994,1,"\u1F32"],[7995,1,"\u1F33"],[7996,1,"\u1F34"],[7997,1,"\u1F35"],[7998,1,"\u1F36"],[7999,1,"\u1F37"],[[8e3,8005],2],[[8006,8007],3],[8008,1,"\u1F40"],[8009,1,"\u1F41"],[8010,1,"\u1F42"],[8011,1,"\u1F43"],[8012,1,"\u1F44"],[8013,1,"\u1F45"],[[8014,8015],3],[[8016,8023],2],[8024,3],[8025,1,"\u1F51"],[8026,3],[8027,1,"\u1F53"],[8028,3],[8029,1,"\u1F55"],[8030,3],[8031,1,"\u1F57"],[[8032,8039],2],[8040,1,"\u1F60"],[8041,1,"\u1F61"],[8042,1,"\u1F62"],[8043,1,"\u1F63"],[8044,1,"\u1F64"],[8045,1,"\u1F65"],[8046,1,"\u1F66"],[8047,1,"\u1F67"],[8048,2],[8049,1,"\u03AC"],[8050,2],[8051,1,"\u03AD"],[8052,2],[8053,1,"\u03AE"],[8054,2],[8055,1,"\u03AF"],[8056,2],[8057,1,"\u03CC"],[8058,2],[8059,1,"\u03CD"],[8060,2],[8061,1,"\u03CE"],[[8062,8063],3],[8064,1,"\u1F00\u03B9"],[8065,1,"\u1F01\u03B9"],[8066,1,"\u1F02\u03B9"],[8067,1,"\u1F03\u03B9"],[8068,1,"\u1F04\u03B9"],[8069,1,"\u1F05\u03B9"],[8070,1,"\u1F06\u03B9"],[8071,1,"\u1F07\u03B9"],[8072,1,"\u1F00\u03B9"],[8073,1,"\u1F01\u03B9"],[8074,1,"\u1F02\u03B9"],[8075,1,"\u1F03\u03B9"],[8076,1,"\u1F04\u03B9"],[8077,1,"\u1F05\u03B9"],[8078,1,"\u1F06\u03B9"],[8079,1,"\u1F07\u03B9"],[8080,1,"\u1F20\u03B9"],[8081,1,"\u1F21\u03B9"],[8082,1,"\u1F22\u03B9"],[8083,1,"\u1F23\u03B9"],[8084,1,"\u1F24\u03B9"],[8085,1,"\u1F25\u03B9"],[8086,1,"\u1F26\u03B9"],[8087,1,"\u1F27\u03B9"],[8088,1,"\u1F20\u03B9"],[8089,1,"\u1F21\u03B9"],[8090,1,"\u1F22\u03B9"],[8091,1,"\u1F23\u03B9"],[8092,1,"\u1F24\u03B9"],[8093,1,"\u1F25\u03B9"],[8094,1,"\u1F26\u03B9"],[8095,1,"\u1F27\u03B9"],[8096,1,"\u1F60\u03B9"],[8097,1,"\u1F61\u03B9"],[8098,1,"\u1F62\u03B9"],[8099,1,"\u1F63\u03B9"],[8100,1,"\u1F64\u03B9"],[8101,1,"\u1F65\u03B9"],[8102,1,"\u1F66\u03B9"],[8103,1,"\u1F67\u03B9"],[8104,1,"\u1F60\u03B9"],[8105,1,"\u1F61\u03B9"],[8106,1,"\u1F62\u03B9"],[8107,1,"\u1F63\u03B9"],[8108,1,"\u1F64\u03B9"],[8109,1,"\u1F65\u03B9"],[8110,1,"\u1F66\u03B9"],[8111,1,"\u1F67\u03B9"],[[8112,8113],2],[8114,1,"\u1F70\u03B9"],[8115,1,"\u03B1\u03B9"],[8116,1,"\u03AC\u03B9"],[8117,3],[8118,2],[8119,1,"\u1FB6\u03B9"],[8120,1,"\u1FB0"],[8121,1,"\u1FB1"],[8122,1,"\u1F70"],[8123,1,"\u03AC"],[8124,1,"\u03B1\u03B9"],[8125,5," \u0313"],[8126,1,"\u03B9"],[8127,5," \u0313"],[8128,5," \u0342"],[8129,5," \u0308\u0342"],[8130,1,"\u1F74\u03B9"],[8131,1,"\u03B7\u03B9"],[8132,1,"\u03AE\u03B9"],[8133,3],[8134,2],[8135,1,"\u1FC6\u03B9"],[8136,1,"\u1F72"],[8137,1,"\u03AD"],[8138,1,"\u1F74"],[8139,1,"\u03AE"],[8140,1,"\u03B7\u03B9"],[8141,5," \u0313\u0300"],[8142,5," \u0313\u0301"],[8143,5," \u0313\u0342"],[[8144,8146],2],[8147,1,"\u0390"],[[8148,8149],3],[[8150,8151],2],[8152,1,"\u1FD0"],[8153,1,"\u1FD1"],[8154,1,"\u1F76"],[8155,1,"\u03AF"],[8156,3],[8157,5," \u0314\u0300"],[8158,5," \u0314\u0301"],[8159,5," \u0314\u0342"],[[8160,8162],2],[8163,1,"\u03B0"],[[8164,8167],2],[8168,1,"\u1FE0"],[8169,1,"\u1FE1"],[8170,1,"\u1F7A"],[8171,1,"\u03CD"],[8172,1,"\u1FE5"],[8173,5," \u0308\u0300"],[8174,5," \u0308\u0301"],[8175,5,"`"],[[8176,8177],3],[8178,1,"\u1F7C\u03B9"],[8179,1,"\u03C9\u03B9"],[8180,1,"\u03CE\u03B9"],[8181,3],[8182,2],[8183,1,"\u1FF6\u03B9"],[8184,1,"\u1F78"],[8185,1,"\u03CC"],[8186,1,"\u1F7C"],[8187,1,"\u03CE"],[8188,1,"\u03C9\u03B9"],[8189,5," \u0301"],[8190,5," \u0314"],[8191,3],[[8192,8202],5," "],[8203,7],[[8204,8205],6,""],[[8206,8207],3],[8208,2],[8209,1,"\u2010"],[[8210,8214],2],[8215,5," \u0333"],[[8216,8227],2],[[8228,8230],3],[8231,2],[[8232,8238],3],[8239,5," "],[[8240,8242],2],[8243,1,"\u2032\u2032"],[8244,1,"\u2032\u2032\u2032"],[8245,2],[8246,1,"\u2035\u2035"],[8247,1,"\u2035\u2035\u2035"],[[8248,8251],2],[8252,5,"!!"],[8253,2],[8254,5," \u0305"],[[8255,8262],2],[8263,5,"??"],[8264,5,"?!"],[8265,5,"!?"],[[8266,8269],2],[[8270,8274],2],[[8275,8276],2],[[8277,8278],2],[8279,1,"\u2032\u2032\u2032\u2032"],[[8280,8286],2],[8287,5," "],[8288,7],[[8289,8291],3],[8292,7],[8293,3],[[8294,8297],3],[[8298,8303],3],[8304,1,"0"],[8305,1,"i"],[[8306,8307],3],[8308,1,"4"],[8309,1,"5"],[8310,1,"6"],[8311,1,"7"],[8312,1,"8"],[8313,1,"9"],[8314,5,"+"],[8315,1,"\u2212"],[8316,5,"="],[8317,5,"("],[8318,5,")"],[8319,1,"n"],[8320,1,"0"],[8321,1,"1"],[8322,1,"2"],[8323,1,"3"],[8324,1,"4"],[8325,1,"5"],[8326,1,"6"],[8327,1,"7"],[8328,1,"8"],[8329,1,"9"],[8330,5,"+"],[8331,1,"\u2212"],[8332,5,"="],[8333,5,"("],[8334,5,")"],[8335,3],[8336,1,"a"],[8337,1,"e"],[8338,1,"o"],[8339,1,"x"],[8340,1,"\u0259"],[8341,1,"h"],[8342,1,"k"],[8343,1,"l"],[8344,1,"m"],[8345,1,"n"],[8346,1,"p"],[8347,1,"s"],[8348,1,"t"],[[8349,8351],3],[[8352,8359],2],[8360,1,"rs"],[[8361,8362],2],[8363,2],[8364,2],[[8365,8367],2],[[8368,8369],2],[[8370,8373],2],[[8374,8376],2],[8377,2],[8378,2],[[8379,8381],2],[8382,2],[8383,2],[8384,2],[[8385,8399],3],[[8400,8417],2],[[8418,8419],2],[[8420,8426],2],[8427,2],[[8428,8431],2],[8432,2],[[8433,8447],3],[8448,5,"a/c"],[8449,5,"a/s"],[8450,1,"c"],[8451,1,"\xB0c"],[8452,2],[8453,5,"c/o"],[8454,5,"c/u"],[8455,1,"\u025B"],[8456,2],[8457,1,"\xB0f"],[8458,1,"g"],[[8459,8462],1,"h"],[8463,1,"\u0127"],[[8464,8465],1,"i"],[[8466,8467],1,"l"],[8468,2],[8469,1,"n"],[8470,1,"no"],[[8471,8472],2],[8473,1,"p"],[8474,1,"q"],[[8475,8477],1,"r"],[[8478,8479],2],[8480,1,"sm"],[8481,1,"tel"],[8482,1,"tm"],[8483,2],[8484,1,"z"],[8485,2],[8486,1,"\u03C9"],[8487,2],[8488,1,"z"],[8489,2],[8490,1,"k"],[8491,1,"\xE5"],[8492,1,"b"],[8493,1,"c"],[8494,2],[[8495,8496],1,"e"],[8497,1,"f"],[8498,3],[8499,1,"m"],[8500,1,"o"],[8501,1,"\u05D0"],[8502,1,"\u05D1"],[8503,1,"\u05D2"],[8504,1,"\u05D3"],[8505,1,"i"],[8506,2],[8507,1,"fax"],[8508,1,"\u03C0"],[[8509,8510],1,"\u03B3"],[8511,1,"\u03C0"],[8512,1,"\u2211"],[[8513,8516],2],[[8517,8518],1,"d"],[8519,1,"e"],[8520,1,"i"],[8521,1,"j"],[[8522,8523],2],[8524,2],[8525,2],[8526,2],[8527,2],[8528,1,"1\u20447"],[8529,1,"1\u20449"],[8530,1,"1\u204410"],[8531,1,"1\u20443"],[8532,1,"2\u20443"],[8533,1,"1\u20445"],[8534,1,"2\u20445"],[8535,1,"3\u20445"],[8536,1,"4\u20445"],[8537,1,"1\u20446"],[8538,1,"5\u20446"],[8539,1,"1\u20448"],[8540,1,"3\u20448"],[8541,1,"5\u20448"],[8542,1,"7\u20448"],[8543,1,"1\u2044"],[8544,1,"i"],[8545,1,"ii"],[8546,1,"iii"],[8547,1,"iv"],[8548,1,"v"],[8549,1,"vi"],[8550,1,"vii"],[8551,1,"viii"],[8552,1,"ix"],[8553,1,"x"],[8554,1,"xi"],[8555,1,"xii"],[8556,1,"l"],[8557,1,"c"],[8558,1,"d"],[8559,1,"m"],[8560,1,"i"],[8561,1,"ii"],[8562,1,"iii"],[8563,1,"iv"],[8564,1,"v"],[8565,1,"vi"],[8566,1,"vii"],[8567,1,"viii"],[8568,1,"ix"],[8569,1,"x"],[8570,1,"xi"],[8571,1,"xii"],[8572,1,"l"],[8573,1,"c"],[8574,1,"d"],[8575,1,"m"],[[8576,8578],2],[8579,3],[8580,2],[[8581,8584],2],[8585,1,"0\u20443"],[[8586,8587],2],[[8588,8591],3],[[8592,8682],2],[[8683,8691],2],[[8692,8703],2],[[8704,8747],2],[8748,1,"\u222B\u222B"],[8749,1,"\u222B\u222B\u222B"],[8750,2],[8751,1,"\u222E\u222E"],[8752,1,"\u222E\u222E\u222E"],[[8753,8799],2],[8800,4],[[8801,8813],2],[[8814,8815],4],[[8816,8945],2],[[8946,8959],2],[8960,2],[8961,2],[[8962,9e3],2],[9001,1,"\u3008"],[9002,1,"\u3009"],[[9003,9082],2],[9083,2],[9084,2],[[9085,9114],2],[[9115,9166],2],[[9167,9168],2],[[9169,9179],2],[[9180,9191],2],[9192,2],[[9193,9203],2],[[9204,9210],2],[[9211,9214],2],[9215,2],[[9216,9252],2],[[9253,9254],2],[[9255,9279],3],[[9280,9290],2],[[9291,9311],3],[9312,1,"1"],[9313,1,"2"],[9314,1,"3"],[9315,1,"4"],[9316,1,"5"],[9317,1,"6"],[9318,1,"7"],[9319,1,"8"],[9320,1,"9"],[9321,1,"10"],[9322,1,"11"],[9323,1,"12"],[9324,1,"13"],[9325,1,"14"],[9326,1,"15"],[9327,1,"16"],[9328,1,"17"],[9329,1,"18"],[9330,1,"19"],[9331,1,"20"],[9332,5,"(1)"],[9333,5,"(2)"],[9334,5,"(3)"],[9335,5,"(4)"],[9336,5,"(5)"],[9337,5,"(6)"],[9338,5,"(7)"],[9339,5,"(8)"],[9340,5,"(9)"],[9341,5,"(10)"],[9342,5,"(11)"],[9343,5,"(12)"],[9344,5,"(13)"],[9345,5,"(14)"],[9346,5,"(15)"],[9347,5,"(16)"],[9348,5,"(17)"],[9349,5,"(18)"],[9350,5,"(19)"],[9351,5,"(20)"],[[9352,9371],3],[9372,5,"(a)"],[9373,5,"(b)"],[9374,5,"(c)"],[9375,5,"(d)"],[9376,5,"(e)"],[9377,5,"(f)"],[9378,5,"(g)"],[9379,5,"(h)"],[9380,5,"(i)"],[9381,5,"(j)"],[9382,5,"(k)"],[9383,5,"(l)"],[9384,5,"(m)"],[9385,5,"(n)"],[9386,5,"(o)"],[9387,5,"(p)"],[9388,5,"(q)"],[9389,5,"(r)"],[9390,5,"(s)"],[9391,5,"(t)"],[9392,5,"(u)"],[9393,5,"(v)"],[9394,5,"(w)"],[9395,5,"(x)"],[9396,5,"(y)"],[9397,5,"(z)"],[9398,1,"a"],[9399,1,"b"],[9400,1,"c"],[9401,1,"d"],[9402,1,"e"],[9403,1,"f"],[9404,1,"g"],[9405,1,"h"],[9406,1,"i"],[9407,1,"j"],[9408,1,"k"],[9409,1,"l"],[9410,1,"m"],[9411,1,"n"],[9412,1,"o"],[9413,1,"p"],[9414,1,"q"],[9415,1,"r"],[9416,1,"s"],[9417,1,"t"],[9418,1,"u"],[9419,1,"v"],[9420,1,"w"],[9421,1,"x"],[9422,1,"y"],[9423,1,"z"],[9424,1,"a"],[9425,1,"b"],[9426,1,"c"],[9427,1,"d"],[9428,1,"e"],[9429,1,"f"],[9430,1,"g"],[9431,1,"h"],[9432,1,"i"],[9433,1,"j"],[9434,1,"k"],[9435,1,"l"],[9436,1,"m"],[9437,1,"n"],[9438,1,"o"],[9439,1,"p"],[9440,1,"q"],[9441,1,"r"],[9442,1,"s"],[9443,1,"t"],[9444,1,"u"],[9445,1,"v"],[9446,1,"w"],[9447,1,"x"],[9448,1,"y"],[9449,1,"z"],[9450,1,"0"],[[9451,9470],2],[9471,2],[[9472,9621],2],[[9622,9631],2],[[9632,9711],2],[[9712,9719],2],[[9720,9727],2],[[9728,9747],2],[[9748,9749],2],[[9750,9751],2],[9752,2],[9753,2],[[9754,9839],2],[[9840,9841],2],[[9842,9853],2],[[9854,9855],2],[[9856,9865],2],[[9866,9873],2],[[9874,9884],2],[9885,2],[[9886,9887],2],[[9888,9889],2],[[9890,9905],2],[9906,2],[[9907,9916],2],[[9917,9919],2],[[9920,9923],2],[[9924,9933],2],[9934,2],[[9935,9953],2],[9954,2],[9955,2],[[9956,9959],2],[[9960,9983],2],[9984,2],[[9985,9988],2],[9989,2],[[9990,9993],2],[[9994,9995],2],[[9996,10023],2],[10024,2],[[10025,10059],2],[10060,2],[10061,2],[10062,2],[[10063,10066],2],[[10067,10069],2],[10070,2],[10071,2],[[10072,10078],2],[[10079,10080],2],[[10081,10087],2],[[10088,10101],2],[[10102,10132],2],[[10133,10135],2],[[10136,10159],2],[10160,2],[[10161,10174],2],[10175,2],[[10176,10182],2],[[10183,10186],2],[10187,2],[10188,2],[10189,2],[[10190,10191],2],[[10192,10219],2],[[10220,10223],2],[[10224,10239],2],[[10240,10495],2],[[10496,10763],2],[10764,1,"\u222B\u222B\u222B\u222B"],[[10765,10867],2],[10868,5,"::="],[10869,5,"=="],[10870,5,"==="],[[10871,10971],2],[10972,1,"\u2ADD\u0338"],[[10973,11007],2],[[11008,11021],2],[[11022,11027],2],[[11028,11034],2],[[11035,11039],2],[[11040,11043],2],[[11044,11084],2],[[11085,11087],2],[[11088,11092],2],[[11093,11097],2],[[11098,11123],2],[[11124,11125],3],[[11126,11157],2],[11158,3],[11159,2],[[11160,11193],2],[[11194,11196],2],[[11197,11208],2],[11209,2],[[11210,11217],2],[11218,2],[[11219,11243],2],[[11244,11247],2],[[11248,11262],2],[11263,2],[11264,1,"\u2C30"],[11265,1,"\u2C31"],[11266,1,"\u2C32"],[11267,1,"\u2C33"],[11268,1,"\u2C34"],[11269,1,"\u2C35"],[11270,1,"\u2C36"],[11271,1,"\u2C37"],[11272,1,"\u2C38"],[11273,1,"\u2C39"],[11274,1,"\u2C3A"],[11275,1,"\u2C3B"],[11276,1,"\u2C3C"],[11277,1,"\u2C3D"],[11278,1,"\u2C3E"],[11279,1,"\u2C3F"],[11280,1,"\u2C40"],[11281,1,"\u2C41"],[11282,1,"\u2C42"],[11283,1,"\u2C43"],[11284,1,"\u2C44"],[11285,1,"\u2C45"],[11286,1,"\u2C46"],[11287,1,"\u2C47"],[11288,1,"\u2C48"],[11289,1,"\u2C49"],[11290,1,"\u2C4A"],[11291,1,"\u2C4B"],[11292,1,"\u2C4C"],[11293,1,"\u2C4D"],[11294,1,"\u2C4E"],[11295,1,"\u2C4F"],[11296,1,"\u2C50"],[11297,1,"\u2C51"],[11298,1,"\u2C52"],[11299,1,"\u2C53"],[11300,1,"\u2C54"],[11301,1,"\u2C55"],[11302,1,"\u2C56"],[11303,1,"\u2C57"],[11304,1,"\u2C58"],[11305,1,"\u2C59"],[11306,1,"\u2C5A"],[11307,1,"\u2C5B"],[11308,1,"\u2C5C"],[11309,1,"\u2C5D"],[11310,1,"\u2C5E"],[11311,1,"\u2C5F"],[[11312,11358],2],[11359,2],[11360,1,"\u2C61"],[11361,2],[11362,1,"\u026B"],[11363,1,"\u1D7D"],[11364,1,"\u027D"],[[11365,11366],2],[11367,1,"\u2C68"],[11368,2],[11369,1,"\u2C6A"],[11370,2],[11371,1,"\u2C6C"],[11372,2],[11373,1,"\u0251"],[11374,1,"\u0271"],[11375,1,"\u0250"],[11376,1,"\u0252"],[11377,2],[11378,1,"\u2C73"],[11379,2],[11380,2],[11381,1,"\u2C76"],[[11382,11383],2],[[11384,11387],2],[11388,1,"j"],[11389,1,"v"],[11390,1,"\u023F"],[11391,1,"\u0240"],[11392,1,"\u2C81"],[11393,2],[11394,1,"\u2C83"],[11395,2],[11396,1,"\u2C85"],[11397,2],[11398,1,"\u2C87"],[11399,2],[11400,1,"\u2C89"],[11401,2],[11402,1,"\u2C8B"],[11403,2],[11404,1,"\u2C8D"],[11405,2],[11406,1,"\u2C8F"],[11407,2],[11408,1,"\u2C91"],[11409,2],[11410,1,"\u2C93"],[11411,2],[11412,1,"\u2C95"],[11413,2],[11414,1,"\u2C97"],[11415,2],[11416,1,"\u2C99"],[11417,2],[11418,1,"\u2C9B"],[11419,2],[11420,1,"\u2C9D"],[11421,2],[11422,1,"\u2C9F"],[11423,2],[11424,1,"\u2CA1"],[11425,2],[11426,1,"\u2CA3"],[11427,2],[11428,1,"\u2CA5"],[11429,2],[11430,1,"\u2CA7"],[11431,2],[11432,1,"\u2CA9"],[11433,2],[11434,1,"\u2CAB"],[11435,2],[11436,1,"\u2CAD"],[11437,2],[11438,1,"\u2CAF"],[11439,2],[11440,1,"\u2CB1"],[11441,2],[11442,1,"\u2CB3"],[11443,2],[11444,1,"\u2CB5"],[11445,2],[11446,1,"\u2CB7"],[11447,2],[11448,1,"\u2CB9"],[11449,2],[11450,1,"\u2CBB"],[11451,2],[11452,1,"\u2CBD"],[11453,2],[11454,1,"\u2CBF"],[11455,2],[11456,1,"\u2CC1"],[11457,2],[11458,1,"\u2CC3"],[11459,2],[11460,1,"\u2CC5"],[11461,2],[11462,1,"\u2CC7"],[11463,2],[11464,1,"\u2CC9"],[11465,2],[11466,1,"\u2CCB"],[11467,2],[11468,1,"\u2CCD"],[11469,2],[11470,1,"\u2CCF"],[11471,2],[11472,1,"\u2CD1"],[11473,2],[11474,1,"\u2CD3"],[11475,2],[11476,1,"\u2CD5"],[11477,2],[11478,1,"\u2CD7"],[11479,2],[11480,1,"\u2CD9"],[11481,2],[11482,1,"\u2CDB"],[11483,2],[11484,1,"\u2CDD"],[11485,2],[11486,1,"\u2CDF"],[11487,2],[11488,1,"\u2CE1"],[11489,2],[11490,1,"\u2CE3"],[[11491,11492],2],[[11493,11498],2],[11499,1,"\u2CEC"],[11500,2],[11501,1,"\u2CEE"],[[11502,11505],2],[11506,1,"\u2CF3"],[11507,2],[[11508,11512],3],[[11513,11519],2],[[11520,11557],2],[11558,3],[11559,2],[[11560,11564],3],[11565,2],[[11566,11567],3],[[11568,11621],2],[[11622,11623],2],[[11624,11630],3],[11631,1,"\u2D61"],[11632,2],[[11633,11646],3],[11647,2],[[11648,11670],2],[[11671,11679],3],[[11680,11686],2],[11687,3],[[11688,11694],2],[11695,3],[[11696,11702],2],[11703,3],[[11704,11710],2],[11711,3],[[11712,11718],2],[11719,3],[[11720,11726],2],[11727,3],[[11728,11734],2],[11735,3],[[11736,11742],2],[11743,3],[[11744,11775],2],[[11776,11799],2],[[11800,11803],2],[[11804,11805],2],[[11806,11822],2],[11823,2],[11824,2],[11825,2],[[11826,11835],2],[[11836,11842],2],[[11843,11844],2],[[11845,11849],2],[[11850,11854],2],[11855,2],[[11856,11858],2],[[11859,11869],2],[[11870,11903],3],[[11904,11929],2],[11930,3],[[11931,11934],2],[11935,1,"\u6BCD"],[[11936,12018],2],[12019,1,"\u9F9F"],[[12020,12031],3],[12032,1,"\u4E00"],[12033,1,"\u4E28"],[12034,1,"\u4E36"],[12035,1,"\u4E3F"],[12036,1,"\u4E59"],[12037,1,"\u4E85"],[12038,1,"\u4E8C"],[12039,1,"\u4EA0"],[12040,1,"\u4EBA"],[12041,1,"\u513F"],[12042,1,"\u5165"],[12043,1,"\u516B"],[12044,1,"\u5182"],[12045,1,"\u5196"],[12046,1,"\u51AB"],[12047,1,"\u51E0"],[12048,1,"\u51F5"],[12049,1,"\u5200"],[12050,1,"\u529B"],[12051,1,"\u52F9"],[12052,1,"\u5315"],[12053,1,"\u531A"],[12054,1,"\u5338"],[12055,1,"\u5341"],[12056,1,"\u535C"],[12057,1,"\u5369"],[12058,1,"\u5382"],[12059,1,"\u53B6"],[12060,1,"\u53C8"],[12061,1,"\u53E3"],[12062,1,"\u56D7"],[12063,1,"\u571F"],[12064,1,"\u58EB"],[12065,1,"\u5902"],[12066,1,"\u590A"],[12067,1,"\u5915"],[12068,1,"\u5927"],[12069,1,"\u5973"],[12070,1,"\u5B50"],[12071,1,"\u5B80"],[12072,1,"\u5BF8"],[12073,1,"\u5C0F"],[12074,1,"\u5C22"],[12075,1,"\u5C38"],[12076,1,"\u5C6E"],[12077,1,"\u5C71"],[12078,1,"\u5DDB"],[12079,1,"\u5DE5"],[12080,1,"\u5DF1"],[12081,1,"\u5DFE"],[12082,1,"\u5E72"],[12083,1,"\u5E7A"],[12084,1,"\u5E7F"],[12085,1,"\u5EF4"],[12086,1,"\u5EFE"],[12087,1,"\u5F0B"],[12088,1,"\u5F13"],[12089,1,"\u5F50"],[12090,1,"\u5F61"],[12091,1,"\u5F73"],[12092,1,"\u5FC3"],[12093,1,"\u6208"],[12094,1,"\u6236"],[12095,1,"\u624B"],[12096,1,"\u652F"],[12097,1,"\u6534"],[12098,1,"\u6587"],[12099,1,"\u6597"],[12100,1,"\u65A4"],[12101,1,"\u65B9"],[12102,1,"\u65E0"],[12103,1,"\u65E5"],[12104,1,"\u66F0"],[12105,1,"\u6708"],[12106,1,"\u6728"],[12107,1,"\u6B20"],[12108,1,"\u6B62"],[12109,1,"\u6B79"],[12110,1,"\u6BB3"],[12111,1,"\u6BCB"],[12112,1,"\u6BD4"],[12113,1,"\u6BDB"],[12114,1,"\u6C0F"],[12115,1,"\u6C14"],[12116,1,"\u6C34"],[12117,1,"\u706B"],[12118,1,"\u722A"],[12119,1,"\u7236"],[12120,1,"\u723B"],[12121,1,"\u723F"],[12122,1,"\u7247"],[12123,1,"\u7259"],[12124,1,"\u725B"],[12125,1,"\u72AC"],[12126,1,"\u7384"],[12127,1,"\u7389"],[12128,1,"\u74DC"],[12129,1,"\u74E6"],[12130,1,"\u7518"],[12131,1,"\u751F"],[12132,1,"\u7528"],[12133,1,"\u7530"],[12134,1,"\u758B"],[12135,1,"\u7592"],[12136,1,"\u7676"],[12137,1,"\u767D"],[12138,1,"\u76AE"],[12139,1,"\u76BF"],[12140,1,"\u76EE"],[12141,1,"\u77DB"],[12142,1,"\u77E2"],[12143,1,"\u77F3"],[12144,1,"\u793A"],[12145,1,"\u79B8"],[12146,1,"\u79BE"],[12147,1,"\u7A74"],[12148,1,"\u7ACB"],[12149,1,"\u7AF9"],[12150,1,"\u7C73"],[12151,1,"\u7CF8"],[12152,1,"\u7F36"],[12153,1,"\u7F51"],[12154,1,"\u7F8A"],[12155,1,"\u7FBD"],[12156,1,"\u8001"],[12157,1,"\u800C"],[12158,1,"\u8012"],[12159,1,"\u8033"],[12160,1,"\u807F"],[12161,1,"\u8089"],[12162,1,"\u81E3"],[12163,1,"\u81EA"],[12164,1,"\u81F3"],[12165,1,"\u81FC"],[12166,1,"\u820C"],[12167,1,"\u821B"],[12168,1,"\u821F"],[12169,1,"\u826E"],[12170,1,"\u8272"],[12171,1,"\u8278"],[12172,1,"\u864D"],[12173,1,"\u866B"],[12174,1,"\u8840"],[12175,1,"\u884C"],[12176,1,"\u8863"],[12177,1,"\u897E"],[12178,1,"\u898B"],[12179,1,"\u89D2"],[12180,1,"\u8A00"],[12181,1,"\u8C37"],[12182,1,"\u8C46"],[12183,1,"\u8C55"],[12184,1,"\u8C78"],[12185,1,"\u8C9D"],[12186,1,"\u8D64"],[12187,1,"\u8D70"],[12188,1,"\u8DB3"],[12189,1,"\u8EAB"],[12190,1,"\u8ECA"],[12191,1,"\u8F9B"],[12192,1,"\u8FB0"],[12193,1,"\u8FB5"],[12194,1,"\u9091"],[12195,1,"\u9149"],[12196,1,"\u91C6"],[12197,1,"\u91CC"],[12198,1,"\u91D1"],[12199,1,"\u9577"],[12200,1,"\u9580"],[12201,1,"\u961C"],[12202,1,"\u96B6"],[12203,1,"\u96B9"],[12204,1,"\u96E8"],[12205,1,"\u9751"],[12206,1,"\u975E"],[12207,1,"\u9762"],[12208,1,"\u9769"],[12209,1,"\u97CB"],[12210,1,"\u97ED"],[12211,1,"\u97F3"],[12212,1,"\u9801"],[12213,1,"\u98A8"],[12214,1,"\u98DB"],[12215,1,"\u98DF"],[12216,1,"\u9996"],[12217,1,"\u9999"],[12218,1,"\u99AC"],[12219,1,"\u9AA8"],[12220,1,"\u9AD8"],[12221,1,"\u9ADF"],[12222,1,"\u9B25"],[12223,1,"\u9B2F"],[12224,1,"\u9B32"],[12225,1,"\u9B3C"],[12226,1,"\u9B5A"],[12227,1,"\u9CE5"],[12228,1,"\u9E75"],[12229,1,"\u9E7F"],[12230,1,"\u9EA5"],[12231,1,"\u9EBB"],[12232,1,"\u9EC3"],[12233,1,"\u9ECD"],[12234,1,"\u9ED1"],[12235,1,"\u9EF9"],[12236,1,"\u9EFD"],[12237,1,"\u9F0E"],[12238,1,"\u9F13"],[12239,1,"\u9F20"],[12240,1,"\u9F3B"],[12241,1,"\u9F4A"],[12242,1,"\u9F52"],[12243,1,"\u9F8D"],[12244,1,"\u9F9C"],[12245,1,"\u9FA0"],[[12246,12271],3],[[12272,12283],3],[[12284,12287],3],[12288,5," "],[12289,2],[12290,1,"."],[[12291,12292],2],[[12293,12295],2],[[12296,12329],2],[[12330,12333],2],[[12334,12341],2],[12342,1,"\u3012"],[12343,2],[12344,1,"\u5341"],[12345,1,"\u5344"],[12346,1,"\u5345"],[12347,2],[12348,2],[12349,2],[12350,2],[12351,2],[12352,3],[[12353,12436],2],[[12437,12438],2],[[12439,12440],3],[[12441,12442],2],[12443,5," \u3099"],[12444,5," \u309A"],[[12445,12446],2],[12447,1,"\u3088\u308A"],[12448,2],[[12449,12542],2],[12543,1,"\u30B3\u30C8"],[[12544,12548],3],[[12549,12588],2],[12589,2],[12590,2],[12591,2],[12592,3],[12593,1,"\u1100"],[12594,1,"\u1101"],[12595,1,"\u11AA"],[12596,1,"\u1102"],[12597,1,"\u11AC"],[12598,1,"\u11AD"],[12599,1,"\u1103"],[12600,1,"\u1104"],[12601,1,"\u1105"],[12602,1,"\u11B0"],[12603,1,"\u11B1"],[12604,1,"\u11B2"],[12605,1,"\u11B3"],[12606,1,"\u11B4"],[12607,1,"\u11B5"],[12608,1,"\u111A"],[12609,1,"\u1106"],[12610,1,"\u1107"],[12611,1,"\u1108"],[12612,1,"\u1121"],[12613,1,"\u1109"],[12614,1,"\u110A"],[12615,1,"\u110B"],[12616,1,"\u110C"],[12617,1,"\u110D"],[12618,1,"\u110E"],[12619,1,"\u110F"],[12620,1,"\u1110"],[12621,1,"\u1111"],[12622,1,"\u1112"],[12623,1,"\u1161"],[12624,1,"\u1162"],[12625,1,"\u1163"],[12626,1,"\u1164"],[12627,1,"\u1165"],[12628,1,"\u1166"],[12629,1,"\u1167"],[12630,1,"\u1168"],[12631,1,"\u1169"],[12632,1,"\u116A"],[12633,1,"\u116B"],[12634,1,"\u116C"],[12635,1,"\u116D"],[12636,1,"\u116E"],[12637,1,"\u116F"],[12638,1,"\u1170"],[12639,1,"\u1171"],[12640,1,"\u1172"],[12641,1,"\u1173"],[12642,1,"\u1174"],[12643,1,"\u1175"],[12644,3],[12645,1,"\u1114"],[12646,1,"\u1115"],[12647,1,"\u11C7"],[12648,1,"\u11C8"],[12649,1,"\u11CC"],[12650,1,"\u11CE"],[12651,1,"\u11D3"],[12652,1,"\u11D7"],[12653,1,"\u11D9"],[12654,1,"\u111C"],[12655,1,"\u11DD"],[12656,1,"\u11DF"],[12657,1,"\u111D"],[12658,1,"\u111E"],[12659,1,"\u1120"],[12660,1,"\u1122"],[12661,1,"\u1123"],[12662,1,"\u1127"],[12663,1,"\u1129"],[12664,1,"\u112B"],[12665,1,"\u112C"],[12666,1,"\u112D"],[12667,1,"\u112E"],[12668,1,"\u112F"],[12669,1,"\u1132"],[12670,1,"\u1136"],[12671,1,"\u1140"],[12672,1,"\u1147"],[12673,1,"\u114C"],[12674,1,"\u11F1"],[12675,1,"\u11F2"],[12676,1,"\u1157"],[12677,1,"\u1158"],[12678,1,"\u1159"],[12679,1,"\u1184"],[12680,1,"\u1185"],[12681,1,"\u1188"],[12682,1,"\u1191"],[12683,1,"\u1192"],[12684,1,"\u1194"],[12685,1,"\u119E"],[12686,1,"\u11A1"],[12687,3],[[12688,12689],2],[12690,1,"\u4E00"],[12691,1,"\u4E8C"],[12692,1,"\u4E09"],[12693,1,"\u56DB"],[12694,1,"\u4E0A"],[12695,1,"\u4E2D"],[12696,1,"\u4E0B"],[12697,1,"\u7532"],[12698,1,"\u4E59"],[12699,1,"\u4E19"],[12700,1,"\u4E01"],[12701,1,"\u5929"],[12702,1,"\u5730"],[12703,1,"\u4EBA"],[[12704,12727],2],[[12728,12730],2],[[12731,12735],2],[[12736,12751],2],[[12752,12771],2],[[12772,12783],3],[[12784,12799],2],[12800,5,"(\u1100)"],[12801,5,"(\u1102)"],[12802,5,"(\u1103)"],[12803,5,"(\u1105)"],[12804,5,"(\u1106)"],[12805,5,"(\u1107)"],[12806,5,"(\u1109)"],[12807,5,"(\u110B)"],[12808,5,"(\u110C)"],[12809,5,"(\u110E)"],[12810,5,"(\u110F)"],[12811,5,"(\u1110)"],[12812,5,"(\u1111)"],[12813,5,"(\u1112)"],[12814,5,"(\uAC00)"],[12815,5,"(\uB098)"],[12816,5,"(\uB2E4)"],[12817,5,"(\uB77C)"],[12818,5,"(\uB9C8)"],[12819,5,"(\uBC14)"],[12820,5,"(\uC0AC)"],[12821,5,"(\uC544)"],[12822,5,"(\uC790)"],[12823,5,"(\uCC28)"],[12824,5,"(\uCE74)"],[12825,5,"(\uD0C0)"],[12826,5,"(\uD30C)"],[12827,5,"(\uD558)"],[12828,5,"(\uC8FC)"],[12829,5,"(\uC624\uC804)"],[12830,5,"(\uC624\uD6C4)"],[12831,3],[12832,5,"(\u4E00)"],[12833,5,"(\u4E8C)"],[12834,5,"(\u4E09)"],[12835,5,"(\u56DB)"],[12836,5,"(\u4E94)"],[12837,5,"(\u516D)"],[12838,5,"(\u4E03)"],[12839,5,"(\u516B)"],[12840,5,"(\u4E5D)"],[12841,5,"(\u5341)"],[12842,5,"(\u6708)"],[12843,5,"(\u706B)"],[12844,5,"(\u6C34)"],[12845,5,"(\u6728)"],[12846,5,"(\u91D1)"],[12847,5,"(\u571F)"],[12848,5,"(\u65E5)"],[12849,5,"(\u682A)"],[12850,5,"(\u6709)"],[12851,5,"(\u793E)"],[12852,5,"(\u540D)"],[12853,5,"(\u7279)"],[12854,5,"(\u8CA1)"],[12855,5,"(\u795D)"],[12856,5,"(\u52B4)"],[12857,5,"(\u4EE3)"],[12858,5,"(\u547C)"],[12859,5,"(\u5B66)"],[12860,5,"(\u76E3)"],[12861,5,"(\u4F01)"],[12862,5,"(\u8CC7)"],[12863,5,"(\u5354)"],[12864,5,"(\u796D)"],[12865,5,"(\u4F11)"],[12866,5,"(\u81EA)"],[12867,5,"(\u81F3)"],[12868,1,"\u554F"],[12869,1,"\u5E7C"],[12870,1,"\u6587"],[12871,1,"\u7B8F"],[[12872,12879],2],[12880,1,"pte"],[12881,1,"21"],[12882,1,"22"],[12883,1,"23"],[12884,1,"24"],[12885,1,"25"],[12886,1,"26"],[12887,1,"27"],[12888,1,"28"],[12889,1,"29"],[12890,1,"30"],[12891,1,"31"],[12892,1,"32"],[12893,1,"33"],[12894,1,"34"],[12895,1,"35"],[12896,1,"\u1100"],[12897,1,"\u1102"],[12898,1,"\u1103"],[12899,1,"\u1105"],[12900,1,"\u1106"],[12901,1,"\u1107"],[12902,1,"\u1109"],[12903,1,"\u110B"],[12904,1,"\u110C"],[12905,1,"\u110E"],[12906,1,"\u110F"],[12907,1,"\u1110"],[12908,1,"\u1111"],[12909,1,"\u1112"],[12910,1,"\uAC00"],[12911,1,"\uB098"],[12912,1,"\uB2E4"],[12913,1,"\uB77C"],[12914,1,"\uB9C8"],[12915,1,"\uBC14"],[12916,1,"\uC0AC"],[12917,1,"\uC544"],[12918,1,"\uC790"],[12919,1,"\uCC28"],[12920,1,"\uCE74"],[12921,1,"\uD0C0"],[12922,1,"\uD30C"],[12923,1,"\uD558"],[12924,1,"\uCC38\uACE0"],[12925,1,"\uC8FC\uC758"],[12926,1,"\uC6B0"],[12927,2],[12928,1,"\u4E00"],[12929,1,"\u4E8C"],[12930,1,"\u4E09"],[12931,1,"\u56DB"],[12932,1,"\u4E94"],[12933,1,"\u516D"],[12934,1,"\u4E03"],[12935,1,"\u516B"],[12936,1,"\u4E5D"],[12937,1,"\u5341"],[12938,1,"\u6708"],[12939,1,"\u706B"],[12940,1,"\u6C34"],[12941,1,"\u6728"],[12942,1,"\u91D1"],[12943,1,"\u571F"],[12944,1,"\u65E5"],[12945,1,"\u682A"],[12946,1,"\u6709"],[12947,1,"\u793E"],[12948,1,"\u540D"],[12949,1,"\u7279"],[12950,1,"\u8CA1"],[12951,1,"\u795D"],[12952,1,"\u52B4"],[12953,1,"\u79D8"],[12954,1,"\u7537"],[12955,1,"\u5973"],[12956,1,"\u9069"],[12957,1,"\u512A"],[12958,1,"\u5370"],[12959,1,"\u6CE8"],[12960,1,"\u9805"],[12961,1,"\u4F11"],[12962,1,"\u5199"],[12963,1,"\u6B63"],[12964,1,"\u4E0A"],[12965,1,"\u4E2D"],[12966,1,"\u4E0B"],[12967,1,"\u5DE6"],[12968,1,"\u53F3"],[12969,1,"\u533B"],[12970,1,"\u5B97"],[12971,1,"\u5B66"],[12972,1,"\u76E3"],[12973,1,"\u4F01"],[12974,1,"\u8CC7"],[12975,1,"\u5354"],[12976,1,"\u591C"],[12977,1,"36"],[12978,1,"37"],[12979,1,"38"],[12980,1,"39"],[12981,1,"40"],[12982,1,"41"],[12983,1,"42"],[12984,1,"43"],[12985,1,"44"],[12986,1,"45"],[12987,1,"46"],[12988,1,"47"],[12989,1,"48"],[12990,1,"49"],[12991,1,"50"],[12992,1,"1\u6708"],[12993,1,"2\u6708"],[12994,1,"3\u6708"],[12995,1,"4\u6708"],[12996,1,"5\u6708"],[12997,1,"6\u6708"],[12998,1,"7\u6708"],[12999,1,"8\u6708"],[13e3,1,"9\u6708"],[13001,1,"10\u6708"],[13002,1,"11\u6708"],[13003,1,"12\u6708"],[13004,1,"hg"],[13005,1,"erg"],[13006,1,"ev"],[13007,1,"ltd"],[13008,1,"\u30A2"],[13009,1,"\u30A4"],[13010,1,"\u30A6"],[13011,1,"\u30A8"],[13012,1,"\u30AA"],[13013,1,"\u30AB"],[13014,1,"\u30AD"],[13015,1,"\u30AF"],[13016,1,"\u30B1"],[13017,1,"\u30B3"],[13018,1,"\u30B5"],[13019,1,"\u30B7"],[13020,1,"\u30B9"],[13021,1,"\u30BB"],[13022,1,"\u30BD"],[13023,1,"\u30BF"],[13024,1,"\u30C1"],[13025,1,"\u30C4"],[13026,1,"\u30C6"],[13027,1,"\u30C8"],[13028,1,"\u30CA"],[13029,1,"\u30CB"],[13030,1,"\u30CC"],[13031,1,"\u30CD"],[13032,1,"\u30CE"],[13033,1,"\u30CF"],[13034,1,"\u30D2"],[13035,1,"\u30D5"],[13036,1,"\u30D8"],[13037,1,"\u30DB"],[13038,1,"\u30DE"],[13039,1,"\u30DF"],[13040,1,"\u30E0"],[13041,1,"\u30E1"],[13042,1,"\u30E2"],[13043,1,"\u30E4"],[13044,1,"\u30E6"],[13045,1,"\u30E8"],[13046,1,"\u30E9"],[13047,1,"\u30EA"],[13048,1,"\u30EB"],[13049,1,"\u30EC"],[13050,1,"\u30ED"],[13051,1,"\u30EF"],[13052,1,"\u30F0"],[13053,1,"\u30F1"],[13054,1,"\u30F2"],[13055,1,"\u4EE4\u548C"],[13056,1,"\u30A2\u30D1\u30FC\u30C8"],[13057,1,"\u30A2\u30EB\u30D5\u30A1"],[13058,1,"\u30A2\u30F3\u30DA\u30A2"],[13059,1,"\u30A2\u30FC\u30EB"],[13060,1,"\u30A4\u30CB\u30F3\u30B0"],[13061,1,"\u30A4\u30F3\u30C1"],[13062,1,"\u30A6\u30A9\u30F3"],[13063,1,"\u30A8\u30B9\u30AF\u30FC\u30C9"],[13064,1,"\u30A8\u30FC\u30AB\u30FC"],[13065,1,"\u30AA\u30F3\u30B9"],[13066,1,"\u30AA\u30FC\u30E0"],[13067,1,"\u30AB\u30A4\u30EA"],[13068,1,"\u30AB\u30E9\u30C3\u30C8"],[13069,1,"\u30AB\u30ED\u30EA\u30FC"],[13070,1,"\u30AC\u30ED\u30F3"],[13071,1,"\u30AC\u30F3\u30DE"],[13072,1,"\u30AE\u30AC"],[13073,1,"\u30AE\u30CB\u30FC"],[13074,1,"\u30AD\u30E5\u30EA\u30FC"],[13075,1,"\u30AE\u30EB\u30C0\u30FC"],[13076,1,"\u30AD\u30ED"],[13077,1,"\u30AD\u30ED\u30B0\u30E9\u30E0"],[13078,1,"\u30AD\u30ED\u30E1\u30FC\u30C8\u30EB"],[13079,1,"\u30AD\u30ED\u30EF\u30C3\u30C8"],[13080,1,"\u30B0\u30E9\u30E0"],[13081,1,"\u30B0\u30E9\u30E0\u30C8\u30F3"],[13082,1,"\u30AF\u30EB\u30BC\u30A4\u30ED"],[13083,1,"\u30AF\u30ED\u30FC\u30CD"],[13084,1,"\u30B1\u30FC\u30B9"],[13085,1,"\u30B3\u30EB\u30CA"],[13086,1,"\u30B3\u30FC\u30DD"],[13087,1,"\u30B5\u30A4\u30AF\u30EB"],[13088,1,"\u30B5\u30F3\u30C1\u30FC\u30E0"],[13089,1,"\u30B7\u30EA\u30F3\u30B0"],[13090,1,"\u30BB\u30F3\u30C1"],[13091,1,"\u30BB\u30F3\u30C8"],[13092,1,"\u30C0\u30FC\u30B9"],[13093,1,"\u30C7\u30B7"],[13094,1,"\u30C9\u30EB"],[13095,1,"\u30C8\u30F3"],[13096,1,"\u30CA\u30CE"],[13097,1,"\u30CE\u30C3\u30C8"],[13098,1,"\u30CF\u30A4\u30C4"],[13099,1,"\u30D1\u30FC\u30BB\u30F3\u30C8"],[13100,1,"\u30D1\u30FC\u30C4"],[13101,1,"\u30D0\u30FC\u30EC\u30EB"],[13102,1,"\u30D4\u30A2\u30B9\u30C8\u30EB"],[13103,1,"\u30D4\u30AF\u30EB"],[13104,1,"\u30D4\u30B3"],[13105,1,"\u30D3\u30EB"],[13106,1,"\u30D5\u30A1\u30E9\u30C3\u30C9"],[13107,1,"\u30D5\u30A3\u30FC\u30C8"],[13108,1,"\u30D6\u30C3\u30B7\u30A7\u30EB"],[13109,1,"\u30D5\u30E9\u30F3"],[13110,1,"\u30D8\u30AF\u30BF\u30FC\u30EB"],[13111,1,"\u30DA\u30BD"],[13112,1,"\u30DA\u30CB\u30D2"],[13113,1,"\u30D8\u30EB\u30C4"],[13114,1,"\u30DA\u30F3\u30B9"],[13115,1,"\u30DA\u30FC\u30B8"],[13116,1,"\u30D9\u30FC\u30BF"],[13117,1,"\u30DD\u30A4\u30F3\u30C8"],[13118,1,"\u30DC\u30EB\u30C8"],[13119,1,"\u30DB\u30F3"],[13120,1,"\u30DD\u30F3\u30C9"],[13121,1,"\u30DB\u30FC\u30EB"],[13122,1,"\u30DB\u30FC\u30F3"],[13123,1,"\u30DE\u30A4\u30AF\u30ED"],[13124,1,"\u30DE\u30A4\u30EB"],[13125,1,"\u30DE\u30C3\u30CF"],[13126,1,"\u30DE\u30EB\u30AF"],[13127,1,"\u30DE\u30F3\u30B7\u30E7\u30F3"],[13128,1,"\u30DF\u30AF\u30ED\u30F3"],[13129,1,"\u30DF\u30EA"],[13130,1,"\u30DF\u30EA\u30D0\u30FC\u30EB"],[13131,1,"\u30E1\u30AC"],[13132,1,"\u30E1\u30AC\u30C8\u30F3"],[13133,1,"\u30E1\u30FC\u30C8\u30EB"],[13134,1,"\u30E4\u30FC\u30C9"],[13135,1,"\u30E4\u30FC\u30EB"],[13136,1,"\u30E6\u30A2\u30F3"],[13137,1,"\u30EA\u30C3\u30C8\u30EB"],[13138,1,"\u30EA\u30E9"],[13139,1,"\u30EB\u30D4\u30FC"],[13140,1,"\u30EB\u30FC\u30D6\u30EB"],[13141,1,"\u30EC\u30E0"],[13142,1,"\u30EC\u30F3\u30C8\u30B2\u30F3"],[13143,1,"\u30EF\u30C3\u30C8"],[13144,1,"0\u70B9"],[13145,1,"1\u70B9"],[13146,1,"2\u70B9"],[13147,1,"3\u70B9"],[13148,1,"4\u70B9"],[13149,1,"5\u70B9"],[13150,1,"6\u70B9"],[13151,1,"7\u70B9"],[13152,1,"8\u70B9"],[13153,1,"9\u70B9"],[13154,1,"10\u70B9"],[13155,1,"11\u70B9"],[13156,1,"12\u70B9"],[13157,1,"13\u70B9"],[13158,1,"14\u70B9"],[13159,1,"15\u70B9"],[13160,1,"16\u70B9"],[13161,1,"17\u70B9"],[13162,1,"18\u70B9"],[13163,1,"19\u70B9"],[13164,1,"20\u70B9"],[13165,1,"21\u70B9"],[13166,1,"22\u70B9"],[13167,1,"23\u70B9"],[13168,1,"24\u70B9"],[13169,1,"hpa"],[13170,1,"da"],[13171,1,"au"],[13172,1,"bar"],[13173,1,"ov"],[13174,1,"pc"],[13175,1,"dm"],[13176,1,"dm2"],[13177,1,"dm3"],[13178,1,"iu"],[13179,1,"\u5E73\u6210"],[13180,1,"\u662D\u548C"],[13181,1,"\u5927\u6B63"],[13182,1,"\u660E\u6CBB"],[13183,1,"\u682A\u5F0F\u4F1A\u793E"],[13184,1,"pa"],[13185,1,"na"],[13186,1,"\u03BCa"],[13187,1,"ma"],[13188,1,"ka"],[13189,1,"kb"],[13190,1,"mb"],[13191,1,"gb"],[13192,1,"cal"],[13193,1,"kcal"],[13194,1,"pf"],[13195,1,"nf"],[13196,1,"\u03BCf"],[13197,1,"\u03BCg"],[13198,1,"mg"],[13199,1,"kg"],[13200,1,"hz"],[13201,1,"khz"],[13202,1,"mhz"],[13203,1,"ghz"],[13204,1,"thz"],[13205,1,"\u03BCl"],[13206,1,"ml"],[13207,1,"dl"],[13208,1,"kl"],[13209,1,"fm"],[13210,1,"nm"],[13211,1,"\u03BCm"],[13212,1,"mm"],[13213,1,"cm"],[13214,1,"km"],[13215,1,"mm2"],[13216,1,"cm2"],[13217,1,"m2"],[13218,1,"km2"],[13219,1,"mm3"],[13220,1,"cm3"],[13221,1,"m3"],[13222,1,"km3"],[13223,1,"m\u2215s"],[13224,1,"m\u2215s2"],[13225,1,"pa"],[13226,1,"kpa"],[13227,1,"mpa"],[13228,1,"gpa"],[13229,1,"rad"],[13230,1,"rad\u2215s"],[13231,1,"rad\u2215s2"],[13232,1,"ps"],[13233,1,"ns"],[13234,1,"\u03BCs"],[13235,1,"ms"],[13236,1,"pv"],[13237,1,"nv"],[13238,1,"\u03BCv"],[13239,1,"mv"],[13240,1,"kv"],[13241,1,"mv"],[13242,1,"pw"],[13243,1,"nw"],[13244,1,"\u03BCw"],[13245,1,"mw"],[13246,1,"kw"],[13247,1,"mw"],[13248,1,"k\u03C9"],[13249,1,"m\u03C9"],[13250,3],[13251,1,"bq"],[13252,1,"cc"],[13253,1,"cd"],[13254,1,"c\u2215kg"],[13255,3],[13256,1,"db"],[13257,1,"gy"],[13258,1,"ha"],[13259,1,"hp"],[13260,1,"in"],[13261,1,"kk"],[13262,1,"km"],[13263,1,"kt"],[13264,1,"lm"],[13265,1,"ln"],[13266,1,"log"],[13267,1,"lx"],[13268,1,"mb"],[13269,1,"mil"],[13270,1,"mol"],[13271,1,"ph"],[13272,3],[13273,1,"ppm"],[13274,1,"pr"],[13275,1,"sr"],[13276,1,"sv"],[13277,1,"wb"],[13278,1,"v\u2215m"],[13279,1,"a\u2215m"],[13280,1,"1\u65E5"],[13281,1,"2\u65E5"],[13282,1,"3\u65E5"],[13283,1,"4\u65E5"],[13284,1,"5\u65E5"],[13285,1,"6\u65E5"],[13286,1,"7\u65E5"],[13287,1,"8\u65E5"],[13288,1,"9\u65E5"],[13289,1,"10\u65E5"],[13290,1,"11\u65E5"],[13291,1,"12\u65E5"],[13292,1,"13\u65E5"],[13293,1,"14\u65E5"],[13294,1,"15\u65E5"],[13295,1,"16\u65E5"],[13296,1,"17\u65E5"],[13297,1,"18\u65E5"],[13298,1,"19\u65E5"],[13299,1,"20\u65E5"],[13300,1,"21\u65E5"],[13301,1,"22\u65E5"],[13302,1,"23\u65E5"],[13303,1,"24\u65E5"],[13304,1,"25\u65E5"],[13305,1,"26\u65E5"],[13306,1,"27\u65E5"],[13307,1,"28\u65E5"],[13308,1,"29\u65E5"],[13309,1,"30\u65E5"],[13310,1,"31\u65E5"],[13311,1,"gal"],[[13312,19893],2],[[19894,19903],2],[[19904,19967],2],[[19968,40869],2],[[40870,40891],2],[[40892,40899],2],[[40900,40907],2],[40908,2],[[40909,40917],2],[[40918,40938],2],[[40939,40943],2],[[40944,40956],2],[[40957,40959],2],[[40960,42124],2],[[42125,42127],3],[[42128,42145],2],[[42146,42147],2],[[42148,42163],2],[42164,2],[[42165,42176],2],[42177,2],[[42178,42180],2],[42181,2],[42182,2],[[42183,42191],3],[[42192,42237],2],[[42238,42239],2],[[42240,42508],2],[[42509,42511],2],[[42512,42539],2],[[42540,42559],3],[42560,1,"\uA641"],[42561,2],[42562,1,"\uA643"],[42563,2],[42564,1,"\uA645"],[42565,2],[42566,1,"\uA647"],[42567,2],[42568,1,"\uA649"],[42569,2],[42570,1,"\uA64B"],[42571,2],[42572,1,"\uA64D"],[42573,2],[42574,1,"\uA64F"],[42575,2],[42576,1,"\uA651"],[42577,2],[42578,1,"\uA653"],[42579,2],[42580,1,"\uA655"],[42581,2],[42582,1,"\uA657"],[42583,2],[42584,1,"\uA659"],[42585,2],[42586,1,"\uA65B"],[42587,2],[42588,1,"\uA65D"],[42589,2],[42590,1,"\uA65F"],[42591,2],[42592,1,"\uA661"],[42593,2],[42594,1,"\uA663"],[42595,2],[42596,1,"\uA665"],[42597,2],[42598,1,"\uA667"],[42599,2],[42600,1,"\uA669"],[42601,2],[42602,1,"\uA66B"],[42603,2],[42604,1,"\uA66D"],[[42605,42607],2],[[42608,42611],2],[[42612,42619],2],[[42620,42621],2],[42622,2],[42623,2],[42624,1,"\uA681"],[42625,2],[42626,1,"\uA683"],[42627,2],[42628,1,"\uA685"],[42629,2],[42630,1,"\uA687"],[42631,2],[42632,1,"\uA689"],[42633,2],[42634,1,"\uA68B"],[42635,2],[42636,1,"\uA68D"],[42637,2],[42638,1,"\uA68F"],[42639,2],[42640,1,"\uA691"],[42641,2],[42642,1,"\uA693"],[42643,2],[42644,1,"\uA695"],[42645,2],[42646,1,"\uA697"],[42647,2],[42648,1,"\uA699"],[42649,2],[42650,1,"\uA69B"],[42651,2],[42652,1,"\u044A"],[42653,1,"\u044C"],[42654,2],[42655,2],[[42656,42725],2],[[42726,42735],2],[[42736,42737],2],[[42738,42743],2],[[42744,42751],3],[[42752,42774],2],[[42775,42778],2],[[42779,42783],2],[[42784,42785],2],[42786,1,"\uA723"],[42787,2],[42788,1,"\uA725"],[42789,2],[42790,1,"\uA727"],[42791,2],[42792,1,"\uA729"],[42793,2],[42794,1,"\uA72B"],[42795,2],[42796,1,"\uA72D"],[42797,2],[42798,1,"\uA72F"],[[42799,42801],2],[42802,1,"\uA733"],[42803,2],[42804,1,"\uA735"],[42805,2],[42806,1,"\uA737"],[42807,2],[42808,1,"\uA739"],[42809,2],[42810,1,"\uA73B"],[42811,2],[42812,1,"\uA73D"],[42813,2],[42814,1,"\uA73F"],[42815,2],[42816,1,"\uA741"],[42817,2],[42818,1,"\uA743"],[42819,2],[42820,1,"\uA745"],[42821,2],[42822,1,"\uA747"],[42823,2],[42824,1,"\uA749"],[42825,2],[42826,1,"\uA74B"],[42827,2],[42828,1,"\uA74D"],[42829,2],[42830,1,"\uA74F"],[42831,2],[42832,1,"\uA751"],[42833,2],[42834,1,"\uA753"],[42835,2],[42836,1,"\uA755"],[42837,2],[42838,1,"\uA757"],[42839,2],[42840,1,"\uA759"],[42841,2],[42842,1,"\uA75B"],[42843,2],[42844,1,"\uA75D"],[42845,2],[42846,1,"\uA75F"],[42847,2],[42848,1,"\uA761"],[42849,2],[42850,1,"\uA763"],[42851,2],[42852,1,"\uA765"],[42853,2],[42854,1,"\uA767"],[42855,2],[42856,1,"\uA769"],[42857,2],[42858,1,"\uA76B"],[42859,2],[42860,1,"\uA76D"],[42861,2],[42862,1,"\uA76F"],[42863,2],[42864,1,"\uA76F"],[[42865,42872],2],[42873,1,"\uA77A"],[42874,2],[42875,1,"\uA77C"],[42876,2],[42877,1,"\u1D79"],[42878,1,"\uA77F"],[42879,2],[42880,1,"\uA781"],[42881,2],[42882,1,"\uA783"],[42883,2],[42884,1,"\uA785"],[42885,2],[42886,1,"\uA787"],[[42887,42888],2],[[42889,42890],2],[42891,1,"\uA78C"],[42892,2],[42893,1,"\u0265"],[42894,2],[42895,2],[42896,1,"\uA791"],[42897,2],[42898,1,"\uA793"],[42899,2],[[42900,42901],2],[42902,1,"\uA797"],[42903,2],[42904,1,"\uA799"],[42905,2],[42906,1,"\uA79B"],[42907,2],[42908,1,"\uA79D"],[42909,2],[42910,1,"\uA79F"],[42911,2],[42912,1,"\uA7A1"],[42913,2],[42914,1,"\uA7A3"],[42915,2],[42916,1,"\uA7A5"],[42917,2],[42918,1,"\uA7A7"],[42919,2],[42920,1,"\uA7A9"],[42921,2],[42922,1,"\u0266"],[42923,1,"\u025C"],[42924,1,"\u0261"],[42925,1,"\u026C"],[42926,1,"\u026A"],[42927,2],[42928,1,"\u029E"],[42929,1,"\u0287"],[42930,1,"\u029D"],[42931,1,"\uAB53"],[42932,1,"\uA7B5"],[42933,2],[42934,1,"\uA7B7"],[42935,2],[42936,1,"\uA7B9"],[42937,2],[42938,1,"\uA7BB"],[42939,2],[42940,1,"\uA7BD"],[42941,2],[42942,1,"\uA7BF"],[42943,2],[42944,1,"\uA7C1"],[42945,2],[42946,1,"\uA7C3"],[42947,2],[42948,1,"\uA794"],[42949,1,"\u0282"],[42950,1,"\u1D8E"],[42951,1,"\uA7C8"],[42952,2],[42953,1,"\uA7CA"],[42954,2],[[42955,42959],3],[42960,1,"\uA7D1"],[42961,2],[42962,3],[42963,2],[42964,3],[42965,2],[42966,1,"\uA7D7"],[42967,2],[42968,1,"\uA7D9"],[42969,2],[[42970,42993],3],[42994,1,"c"],[42995,1,"f"],[42996,1,"q"],[42997,1,"\uA7F6"],[42998,2],[42999,2],[43e3,1,"\u0127"],[43001,1,"\u0153"],[43002,2],[[43003,43007],2],[[43008,43047],2],[[43048,43051],2],[43052,2],[[43053,43055],3],[[43056,43065],2],[[43066,43071],3],[[43072,43123],2],[[43124,43127],2],[[43128,43135],3],[[43136,43204],2],[43205,2],[[43206,43213],3],[[43214,43215],2],[[43216,43225],2],[[43226,43231],3],[[43232,43255],2],[[43256,43258],2],[43259,2],[43260,2],[43261,2],[[43262,43263],2],[[43264,43309],2],[[43310,43311],2],[[43312,43347],2],[[43348,43358],3],[43359,2],[[43360,43388],2],[[43389,43391],3],[[43392,43456],2],[[43457,43469],2],[43470,3],[[43471,43481],2],[[43482,43485],3],[[43486,43487],2],[[43488,43518],2],[43519,3],[[43520,43574],2],[[43575,43583],3],[[43584,43597],2],[[43598,43599],3],[[43600,43609],2],[[43610,43611],3],[[43612,43615],2],[[43616,43638],2],[[43639,43641],2],[[43642,43643],2],[[43644,43647],2],[[43648,43714],2],[[43715,43738],3],[[43739,43741],2],[[43742,43743],2],[[43744,43759],2],[[43760,43761],2],[[43762,43766],2],[[43767,43776],3],[[43777,43782],2],[[43783,43784],3],[[43785,43790],2],[[43791,43792],3],[[43793,43798],2],[[43799,43807],3],[[43808,43814],2],[43815,3],[[43816,43822],2],[43823,3],[[43824,43866],2],[43867,2],[43868,1,"\uA727"],[43869,1,"\uAB37"],[43870,1,"\u026B"],[43871,1,"\uAB52"],[[43872,43875],2],[[43876,43877],2],[[43878,43879],2],[43880,2],[43881,1,"\u028D"],[[43882,43883],2],[[43884,43887],3],[43888,1,"\u13A0"],[43889,1,"\u13A1"],[43890,1,"\u13A2"],[43891,1,"\u13A3"],[43892,1,"\u13A4"],[43893,1,"\u13A5"],[43894,1,"\u13A6"],[43895,1,"\u13A7"],[43896,1,"\u13A8"],[43897,1,"\u13A9"],[43898,1,"\u13AA"],[43899,1,"\u13AB"],[43900,1,"\u13AC"],[43901,1,"\u13AD"],[43902,1,"\u13AE"],[43903,1,"\u13AF"],[43904,1,"\u13B0"],[43905,1,"\u13B1"],[43906,1,"\u13B2"],[43907,1,"\u13B3"],[43908,1,"\u13B4"],[43909,1,"\u13B5"],[43910,1,"\u13B6"],[43911,1,"\u13B7"],[43912,1,"\u13B8"],[43913,1,"\u13B9"],[43914,1,"\u13BA"],[43915,1,"\u13BB"],[43916,1,"\u13BC"],[43917,1,"\u13BD"],[43918,1,"\u13BE"],[43919,1,"\u13BF"],[43920,1,"\u13C0"],[43921,1,"\u13C1"],[43922,1,"\u13C2"],[43923,1,"\u13C3"],[43924,1,"\u13C4"],[43925,1,"\u13C5"],[43926,1,"\u13C6"],[43927,1,"\u13C7"],[43928,1,"\u13C8"],[43929,1,"\u13C9"],[43930,1,"\u13CA"],[43931,1,"\u13CB"],[43932,1,"\u13CC"],[43933,1,"\u13CD"],[43934,1,"\u13CE"],[43935,1,"\u13CF"],[43936,1,"\u13D0"],[43937,1,"\u13D1"],[43938,1,"\u13D2"],[43939,1,"\u13D3"],[43940,1,"\u13D4"],[43941,1,"\u13D5"],[43942,1,"\u13D6"],[43943,1,"\u13D7"],[43944,1,"\u13D8"],[43945,1,"\u13D9"],[43946,1,"\u13DA"],[43947,1,"\u13DB"],[43948,1,"\u13DC"],[43949,1,"\u13DD"],[43950,1,"\u13DE"],[43951,1,"\u13DF"],[43952,1,"\u13E0"],[43953,1,"\u13E1"],[43954,1,"\u13E2"],[43955,1,"\u13E3"],[43956,1,"\u13E4"],[43957,1,"\u13E5"],[43958,1,"\u13E6"],[43959,1,"\u13E7"],[43960,1,"\u13E8"],[43961,1,"\u13E9"],[43962,1,"\u13EA"],[43963,1,"\u13EB"],[43964,1,"\u13EC"],[43965,1,"\u13ED"],[43966,1,"\u13EE"],[43967,1,"\u13EF"],[[43968,44010],2],[44011,2],[[44012,44013],2],[[44014,44015],3],[[44016,44025],2],[[44026,44031],3],[[44032,55203],2],[[55204,55215],3],[[55216,55238],2],[[55239,55242],3],[[55243,55291],2],[[55292,55295],3],[[55296,57343],3],[[57344,63743],3],[63744,1,"\u8C48"],[63745,1,"\u66F4"],[63746,1,"\u8ECA"],[63747,1,"\u8CC8"],[63748,1,"\u6ED1"],[63749,1,"\u4E32"],[63750,1,"\u53E5"],[[63751,63752],1,"\u9F9C"],[63753,1,"\u5951"],[63754,1,"\u91D1"],[63755,1,"\u5587"],[63756,1,"\u5948"],[63757,1,"\u61F6"],[63758,1,"\u7669"],[63759,1,"\u7F85"],[63760,1,"\u863F"],[63761,1,"\u87BA"],[63762,1,"\u88F8"],[63763,1,"\u908F"],[63764,1,"\u6A02"],[63765,1,"\u6D1B"],[63766,1,"\u70D9"],[63767,1,"\u73DE"],[63768,1,"\u843D"],[63769,1,"\u916A"],[63770,1,"\u99F1"],[63771,1,"\u4E82"],[63772,1,"\u5375"],[63773,1,"\u6B04"],[63774,1,"\u721B"],[63775,1,"\u862D"],[63776,1,"\u9E1E"],[63777,1,"\u5D50"],[63778,1,"\u6FEB"],[63779,1,"\u85CD"],[63780,1,"\u8964"],[63781,1,"\u62C9"],[63782,1,"\u81D8"],[63783,1,"\u881F"],[63784,1,"\u5ECA"],[63785,1,"\u6717"],[63786,1,"\u6D6A"],[63787,1,"\u72FC"],[63788,1,"\u90CE"],[63789,1,"\u4F86"],[63790,1,"\u51B7"],[63791,1,"\u52DE"],[63792,1,"\u64C4"],[63793,1,"\u6AD3"],[63794,1,"\u7210"],[63795,1,"\u76E7"],[63796,1,"\u8001"],[63797,1,"\u8606"],[63798,1,"\u865C"],[63799,1,"\u8DEF"],[63800,1,"\u9732"],[63801,1,"\u9B6F"],[63802,1,"\u9DFA"],[63803,1,"\u788C"],[63804,1,"\u797F"],[63805,1,"\u7DA0"],[63806,1,"\u83C9"],[63807,1,"\u9304"],[63808,1,"\u9E7F"],[63809,1,"\u8AD6"],[63810,1,"\u58DF"],[63811,1,"\u5F04"],[63812,1,"\u7C60"],[63813,1,"\u807E"],[63814,1,"\u7262"],[63815,1,"\u78CA"],[63816,1,"\u8CC2"],[63817,1,"\u96F7"],[63818,1,"\u58D8"],[63819,1,"\u5C62"],[63820,1,"\u6A13"],[63821,1,"\u6DDA"],[63822,1,"\u6F0F"],[63823,1,"\u7D2F"],[63824,1,"\u7E37"],[63825,1,"\u964B"],[63826,1,"\u52D2"],[63827,1,"\u808B"],[63828,1,"\u51DC"],[63829,1,"\u51CC"],[63830,1,"\u7A1C"],[63831,1,"\u7DBE"],[63832,1,"\u83F1"],[63833,1,"\u9675"],[63834,1,"\u8B80"],[63835,1,"\u62CF"],[63836,1,"\u6A02"],[63837,1,"\u8AFE"],[63838,1,"\u4E39"],[63839,1,"\u5BE7"],[63840,1,"\u6012"],[63841,1,"\u7387"],[63842,1,"\u7570"],[63843,1,"\u5317"],[63844,1,"\u78FB"],[63845,1,"\u4FBF"],[63846,1,"\u5FA9"],[63847,1,"\u4E0D"],[63848,1,"\u6CCC"],[63849,1,"\u6578"],[63850,1,"\u7D22"],[63851,1,"\u53C3"],[63852,1,"\u585E"],[63853,1,"\u7701"],[63854,1,"\u8449"],[63855,1,"\u8AAA"],[63856,1,"\u6BBA"],[63857,1,"\u8FB0"],[63858,1,"\u6C88"],[63859,1,"\u62FE"],[63860,1,"\u82E5"],[63861,1,"\u63A0"],[63862,1,"\u7565"],[63863,1,"\u4EAE"],[63864,1,"\u5169"],[63865,1,"\u51C9"],[63866,1,"\u6881"],[63867,1,"\u7CE7"],[63868,1,"\u826F"],[63869,1,"\u8AD2"],[63870,1,"\u91CF"],[63871,1,"\u52F5"],[63872,1,"\u5442"],[63873,1,"\u5973"],[63874,1,"\u5EEC"],[63875,1,"\u65C5"],[63876,1,"\u6FFE"],[63877,1,"\u792A"],[63878,1,"\u95AD"],[63879,1,"\u9A6A"],[63880,1,"\u9E97"],[63881,1,"\u9ECE"],[63882,1,"\u529B"],[63883,1,"\u66C6"],[63884,1,"\u6B77"],[63885,1,"\u8F62"],[63886,1,"\u5E74"],[63887,1,"\u6190"],[63888,1,"\u6200"],[63889,1,"\u649A"],[63890,1,"\u6F23"],[63891,1,"\u7149"],[63892,1,"\u7489"],[63893,1,"\u79CA"],[63894,1,"\u7DF4"],[63895,1,"\u806F"],[63896,1,"\u8F26"],[63897,1,"\u84EE"],[63898,1,"\u9023"],[63899,1,"\u934A"],[63900,1,"\u5217"],[63901,1,"\u52A3"],[63902,1,"\u54BD"],[63903,1,"\u70C8"],[63904,1,"\u88C2"],[63905,1,"\u8AAA"],[63906,1,"\u5EC9"],[63907,1,"\u5FF5"],[63908,1,"\u637B"],[63909,1,"\u6BAE"],[63910,1,"\u7C3E"],[63911,1,"\u7375"],[63912,1,"\u4EE4"],[63913,1,"\u56F9"],[63914,1,"\u5BE7"],[63915,1,"\u5DBA"],[63916,1,"\u601C"],[63917,1,"\u73B2"],[63918,1,"\u7469"],[63919,1,"\u7F9A"],[63920,1,"\u8046"],[63921,1,"\u9234"],[63922,1,"\u96F6"],[63923,1,"\u9748"],[63924,1,"\u9818"],[63925,1,"\u4F8B"],[63926,1,"\u79AE"],[63927,1,"\u91B4"],[63928,1,"\u96B8"],[63929,1,"\u60E1"],[63930,1,"\u4E86"],[63931,1,"\u50DA"],[63932,1,"\u5BEE"],[63933,1,"\u5C3F"],[63934,1,"\u6599"],[63935,1,"\u6A02"],[63936,1,"\u71CE"],[63937,1,"\u7642"],[63938,1,"\u84FC"],[63939,1,"\u907C"],[63940,1,"\u9F8D"],[63941,1,"\u6688"],[63942,1,"\u962E"],[63943,1,"\u5289"],[63944,1,"\u677B"],[63945,1,"\u67F3"],[63946,1,"\u6D41"],[63947,1,"\u6E9C"],[63948,1,"\u7409"],[63949,1,"\u7559"],[63950,1,"\u786B"],[63951,1,"\u7D10"],[63952,1,"\u985E"],[63953,1,"\u516D"],[63954,1,"\u622E"],[63955,1,"\u9678"],[63956,1,"\u502B"],[63957,1,"\u5D19"],[63958,1,"\u6DEA"],[63959,1,"\u8F2A"],[63960,1,"\u5F8B"],[63961,1,"\u6144"],[63962,1,"\u6817"],[63963,1,"\u7387"],[63964,1,"\u9686"],[63965,1,"\u5229"],[63966,1,"\u540F"],[63967,1,"\u5C65"],[63968,1,"\u6613"],[63969,1,"\u674E"],[63970,1,"\u68A8"],[63971,1,"\u6CE5"],[63972,1,"\u7406"],[63973,1,"\u75E2"],[63974,1,"\u7F79"],[63975,1,"\u88CF"],[63976,1,"\u88E1"],[63977,1,"\u91CC"],[63978,1,"\u96E2"],[63979,1,"\u533F"],[63980,1,"\u6EBA"],[63981,1,"\u541D"],[63982,1,"\u71D0"],[63983,1,"\u7498"],[63984,1,"\u85FA"],[63985,1,"\u96A3"],[63986,1,"\u9C57"],[63987,1,"\u9E9F"],[63988,1,"\u6797"],[63989,1,"\u6DCB"],[63990,1,"\u81E8"],[63991,1,"\u7ACB"],[63992,1,"\u7B20"],[63993,1,"\u7C92"],[63994,1,"\u72C0"],[63995,1,"\u7099"],[63996,1,"\u8B58"],[63997,1,"\u4EC0"],[63998,1,"\u8336"],[63999,1,"\u523A"],[64e3,1,"\u5207"],[64001,1,"\u5EA6"],[64002,1,"\u62D3"],[64003,1,"\u7CD6"],[64004,1,"\u5B85"],[64005,1,"\u6D1E"],[64006,1,"\u66B4"],[64007,1,"\u8F3B"],[64008,1,"\u884C"],[64009,1,"\u964D"],[64010,1,"\u898B"],[64011,1,"\u5ED3"],[64012,1,"\u5140"],[64013,1,"\u55C0"],[[64014,64015],2],[64016,1,"\u585A"],[64017,2],[64018,1,"\u6674"],[[64019,64020],2],[64021,1,"\u51DE"],[64022,1,"\u732A"],[64023,1,"\u76CA"],[64024,1,"\u793C"],[64025,1,"\u795E"],[64026,1,"\u7965"],[64027,1,"\u798F"],[64028,1,"\u9756"],[64029,1,"\u7CBE"],[64030,1,"\u7FBD"],[64031,2],[64032,1,"\u8612"],[64033,2],[64034,1,"\u8AF8"],[[64035,64036],2],[64037,1,"\u9038"],[64038,1,"\u90FD"],[[64039,64041],2],[64042,1,"\u98EF"],[64043,1,"\u98FC"],[64044,1,"\u9928"],[64045,1,"\u9DB4"],[64046,1,"\u90DE"],[64047,1,"\u96B7"],[64048,1,"\u4FAE"],[64049,1,"\u50E7"],[64050,1,"\u514D"],[64051,1,"\u52C9"],[64052,1,"\u52E4"],[64053,1,"\u5351"],[64054,1,"\u559D"],[64055,1,"\u5606"],[64056,1,"\u5668"],[64057,1,"\u5840"],[64058,1,"\u58A8"],[64059,1,"\u5C64"],[64060,1,"\u5C6E"],[64061,1,"\u6094"],[64062,1,"\u6168"],[64063,1,"\u618E"],[64064,1,"\u61F2"],[64065,1,"\u654F"],[64066,1,"\u65E2"],[64067,1,"\u6691"],[64068,1,"\u6885"],[64069,1,"\u6D77"],[64070,1,"\u6E1A"],[64071,1,"\u6F22"],[64072,1,"\u716E"],[64073,1,"\u722B"],[64074,1,"\u7422"],[64075,1,"\u7891"],[64076,1,"\u793E"],[64077,1,"\u7949"],[64078,1,"\u7948"],[64079,1,"\u7950"],[64080,1,"\u7956"],[64081,1,"\u795D"],[64082,1,"\u798D"],[64083,1,"\u798E"],[64084,1,"\u7A40"],[64085,1,"\u7A81"],[64086,1,"\u7BC0"],[64087,1,"\u7DF4"],[64088,1,"\u7E09"],[64089,1,"\u7E41"],[64090,1,"\u7F72"],[64091,1,"\u8005"],[64092,1,"\u81ED"],[[64093,64094],1,"\u8279"],[64095,1,"\u8457"],[64096,1,"\u8910"],[64097,1,"\u8996"],[64098,1,"\u8B01"],[64099,1,"\u8B39"],[64100,1,"\u8CD3"],[64101,1,"\u8D08"],[64102,1,"\u8FB6"],[64103,1,"\u9038"],[64104,1,"\u96E3"],[64105,1,"\u97FF"],[64106,1,"\u983B"],[64107,1,"\u6075"],[64108,1,"\u{242EE}"],[64109,1,"\u8218"],[[64110,64111],3],[64112,1,"\u4E26"],[64113,1,"\u51B5"],[64114,1,"\u5168"],[64115,1,"\u4F80"],[64116,1,"\u5145"],[64117,1,"\u5180"],[64118,1,"\u52C7"],[64119,1,"\u52FA"],[64120,1,"\u559D"],[64121,1,"\u5555"],[64122,1,"\u5599"],[64123,1,"\u55E2"],[64124,1,"\u585A"],[64125,1,"\u58B3"],[64126,1,"\u5944"],[64127,1,"\u5954"],[64128,1,"\u5A62"],[64129,1,"\u5B28"],[64130,1,"\u5ED2"],[64131,1,"\u5ED9"],[64132,1,"\u5F69"],[64133,1,"\u5FAD"],[64134,1,"\u60D8"],[64135,1,"\u614E"],[64136,1,"\u6108"],[64137,1,"\u618E"],[64138,1,"\u6160"],[64139,1,"\u61F2"],[64140,1,"\u6234"],[64141,1,"\u63C4"],[64142,1,"\u641C"],[64143,1,"\u6452"],[64144,1,"\u6556"],[64145,1,"\u6674"],[64146,1,"\u6717"],[64147,1,"\u671B"],[64148,1,"\u6756"],[64149,1,"\u6B79"],[64150,1,"\u6BBA"],[64151,1,"\u6D41"],[64152,1,"\u6EDB"],[64153,1,"\u6ECB"],[64154,1,"\u6F22"],[64155,1,"\u701E"],[64156,1,"\u716E"],[64157,1,"\u77A7"],[64158,1,"\u7235"],[64159,1,"\u72AF"],[64160,1,"\u732A"],[64161,1,"\u7471"],[64162,1,"\u7506"],[64163,1,"\u753B"],[64164,1,"\u761D"],[64165,1,"\u761F"],[64166,1,"\u76CA"],[64167,1,"\u76DB"],[64168,1,"\u76F4"],[64169,1,"\u774A"],[64170,1,"\u7740"],[64171,1,"\u78CC"],[64172,1,"\u7AB1"],[64173,1,"\u7BC0"],[64174,1,"\u7C7B"],[64175,1,"\u7D5B"],[64176,1,"\u7DF4"],[64177,1,"\u7F3E"],[64178,1,"\u8005"],[64179,1,"\u8352"],[64180,1,"\u83EF"],[64181,1,"\u8779"],[64182,1,"\u8941"],[64183,1,"\u8986"],[64184,1,"\u8996"],[64185,1,"\u8ABF"],[64186,1,"\u8AF8"],[64187,1,"\u8ACB"],[64188,1,"\u8B01"],[64189,1,"\u8AFE"],[64190,1,"\u8AED"],[64191,1,"\u8B39"],[64192,1,"\u8B8A"],[64193,1,"\u8D08"],[64194,1,"\u8F38"],[64195,1,"\u9072"],[64196,1,"\u9199"],[64197,1,"\u9276"],[64198,1,"\u967C"],[64199,1,"\u96E3"],[64200,1,"\u9756"],[64201,1,"\u97DB"],[64202,1,"\u97FF"],[64203,1,"\u980B"],[64204,1,"\u983B"],[64205,1,"\u9B12"],[64206,1,"\u9F9C"],[64207,1,"\u{2284A}"],[64208,1,"\u{22844}"],[64209,1,"\u{233D5}"],[64210,1,"\u3B9D"],[64211,1,"\u4018"],[64212,1,"\u4039"],[64213,1,"\u{25249}"],[64214,1,"\u{25CD0}"],[64215,1,"\u{27ED3}"],[64216,1,"\u9F43"],[64217,1,"\u9F8E"],[[64218,64255],3],[64256,1,"ff"],[64257,1,"fi"],[64258,1,"fl"],[64259,1,"ffi"],[64260,1,"ffl"],[[64261,64262],1,"st"],[[64263,64274],3],[64275,1,"\u0574\u0576"],[64276,1,"\u0574\u0565"],[64277,1,"\u0574\u056B"],[64278,1,"\u057E\u0576"],[64279,1,"\u0574\u056D"],[[64280,64284],3],[64285,1,"\u05D9\u05B4"],[64286,2],[64287,1,"\u05F2\u05B7"],[64288,1,"\u05E2"],[64289,1,"\u05D0"],[64290,1,"\u05D3"],[64291,1,"\u05D4"],[64292,1,"\u05DB"],[64293,1,"\u05DC"],[64294,1,"\u05DD"],[64295,1,"\u05E8"],[64296,1,"\u05EA"],[64297,5,"+"],[64298,1,"\u05E9\u05C1"],[64299,1,"\u05E9\u05C2"],[64300,1,"\u05E9\u05BC\u05C1"],[64301,1,"\u05E9\u05BC\u05C2"],[64302,1,"\u05D0\u05B7"],[64303,1,"\u05D0\u05B8"],[64304,1,"\u05D0\u05BC"],[64305,1,"\u05D1\u05BC"],[64306,1,"\u05D2\u05BC"],[64307,1,"\u05D3\u05BC"],[64308,1,"\u05D4\u05BC"],[64309,1,"\u05D5\u05BC"],[64310,1,"\u05D6\u05BC"],[64311,3],[64312,1,"\u05D8\u05BC"],[64313,1,"\u05D9\u05BC"],[64314,1,"\u05DA\u05BC"],[64315,1,"\u05DB\u05BC"],[64316,1,"\u05DC\u05BC"],[64317,3],[64318,1,"\u05DE\u05BC"],[64319,3],[64320,1,"\u05E0\u05BC"],[64321,1,"\u05E1\u05BC"],[64322,3],[64323,1,"\u05E3\u05BC"],[64324,1,"\u05E4\u05BC"],[64325,3],[64326,1,"\u05E6\u05BC"],[64327,1,"\u05E7\u05BC"],[64328,1,"\u05E8\u05BC"],[64329,1,"\u05E9\u05BC"],[64330,1,"\u05EA\u05BC"],[64331,1,"\u05D5\u05B9"],[64332,1,"\u05D1\u05BF"],[64333,1,"\u05DB\u05BF"],[64334,1,"\u05E4\u05BF"],[64335,1,"\u05D0\u05DC"],[[64336,64337],1,"\u0671"],[[64338,64341],1,"\u067B"],[[64342,64345],1,"\u067E"],[[64346,64349],1,"\u0680"],[[64350,64353],1,"\u067A"],[[64354,64357],1,"\u067F"],[[64358,64361],1,"\u0679"],[[64362,64365],1,"\u06A4"],[[64366,64369],1,"\u06A6"],[[64370,64373],1,"\u0684"],[[64374,64377],1,"\u0683"],[[64378,64381],1,"\u0686"],[[64382,64385],1,"\u0687"],[[64386,64387],1,"\u068D"],[[64388,64389],1,"\u068C"],[[64390,64391],1,"\u068E"],[[64392,64393],1,"\u0688"],[[64394,64395],1,"\u0698"],[[64396,64397],1,"\u0691"],[[64398,64401],1,"\u06A9"],[[64402,64405],1,"\u06AF"],[[64406,64409],1,"\u06B3"],[[64410,64413],1,"\u06B1"],[[64414,64415],1,"\u06BA"],[[64416,64419],1,"\u06BB"],[[64420,64421],1,"\u06C0"],[[64422,64425],1,"\u06C1"],[[64426,64429],1,"\u06BE"],[[64430,64431],1,"\u06D2"],[[64432,64433],1,"\u06D3"],[[64434,64449],2],[64450,2],[[64451,64466],3],[[64467,64470],1,"\u06AD"],[[64471,64472],1,"\u06C7"],[[64473,64474],1,"\u06C6"],[[64475,64476],1,"\u06C8"],[64477,1,"\u06C7\u0674"],[[64478,64479],1,"\u06CB"],[[64480,64481],1,"\u06C5"],[[64482,64483],1,"\u06C9"],[[64484,64487],1,"\u06D0"],[[64488,64489],1,"\u0649"],[[64490,64491],1,"\u0626\u0627"],[[64492,64493],1,"\u0626\u06D5"],[[64494,64495],1,"\u0626\u0648"],[[64496,64497],1,"\u0626\u06C7"],[[64498,64499],1,"\u0626\u06C6"],[[64500,64501],1,"\u0626\u06C8"],[[64502,64504],1,"\u0626\u06D0"],[[64505,64507],1,"\u0626\u0649"],[[64508,64511],1,"\u06CC"],[64512,1,"\u0626\u062C"],[64513,1,"\u0626\u062D"],[64514,1,"\u0626\u0645"],[64515,1,"\u0626\u0649"],[64516,1,"\u0626\u064A"],[64517,1,"\u0628\u062C"],[64518,1,"\u0628\u062D"],[64519,1,"\u0628\u062E"],[64520,1,"\u0628\u0645"],[64521,1,"\u0628\u0649"],[64522,1,"\u0628\u064A"],[64523,1,"\u062A\u062C"],[64524,1,"\u062A\u062D"],[64525,1,"\u062A\u062E"],[64526,1,"\u062A\u0645"],[64527,1,"\u062A\u0649"],[64528,1,"\u062A\u064A"],[64529,1,"\u062B\u062C"],[64530,1,"\u062B\u0645"],[64531,1,"\u062B\u0649"],[64532,1,"\u062B\u064A"],[64533,1,"\u062C\u062D"],[64534,1,"\u062C\u0645"],[64535,1,"\u062D\u062C"],[64536,1,"\u062D\u0645"],[64537,1,"\u062E\u062C"],[64538,1,"\u062E\u062D"],[64539,1,"\u062E\u0645"],[64540,1,"\u0633\u062C"],[64541,1,"\u0633\u062D"],[64542,1,"\u0633\u062E"],[64543,1,"\u0633\u0645"],[64544,1,"\u0635\u062D"],[64545,1,"\u0635\u0645"],[64546,1,"\u0636\u062C"],[64547,1,"\u0636\u062D"],[64548,1,"\u0636\u062E"],[64549,1,"\u0636\u0645"],[64550,1,"\u0637\u062D"],[64551,1,"\u0637\u0645"],[64552,1,"\u0638\u0645"],[64553,1,"\u0639\u062C"],[64554,1,"\u0639\u0645"],[64555,1,"\u063A\u062C"],[64556,1,"\u063A\u0645"],[64557,1,"\u0641\u062C"],[64558,1,"\u0641\u062D"],[64559,1,"\u0641\u062E"],[64560,1,"\u0641\u0645"],[64561,1,"\u0641\u0649"],[64562,1,"\u0641\u064A"],[64563,1,"\u0642\u062D"],[64564,1,"\u0642\u0645"],[64565,1,"\u0642\u0649"],[64566,1,"\u0642\u064A"],[64567,1,"\u0643\u0627"],[64568,1,"\u0643\u062C"],[64569,1,"\u0643\u062D"],[64570,1,"\u0643\u062E"],[64571,1,"\u0643\u0644"],[64572,1,"\u0643\u0645"],[64573,1,"\u0643\u0649"],[64574,1,"\u0643\u064A"],[64575,1,"\u0644\u062C"],[64576,1,"\u0644\u062D"],[64577,1,"\u0644\u062E"],[64578,1,"\u0644\u0645"],[64579,1,"\u0644\u0649"],[64580,1,"\u0644\u064A"],[64581,1,"\u0645\u062C"],[64582,1,"\u0645\u062D"],[64583,1,"\u0645\u062E"],[64584,1,"\u0645\u0645"],[64585,1,"\u0645\u0649"],[64586,1,"\u0645\u064A"],[64587,1,"\u0646\u062C"],[64588,1,"\u0646\u062D"],[64589,1,"\u0646\u062E"],[64590,1,"\u0646\u0645"],[64591,1,"\u0646\u0649"],[64592,1,"\u0646\u064A"],[64593,1,"\u0647\u062C"],[64594,1,"\u0647\u0645"],[64595,1,"\u0647\u0649"],[64596,1,"\u0647\u064A"],[64597,1,"\u064A\u062C"],[64598,1,"\u064A\u062D"],[64599,1,"\u064A\u062E"],[64600,1,"\u064A\u0645"],[64601,1,"\u064A\u0649"],[64602,1,"\u064A\u064A"],[64603,1,"\u0630\u0670"],[64604,1,"\u0631\u0670"],[64605,1,"\u0649\u0670"],[64606,5," \u064C\u0651"],[64607,5," \u064D\u0651"],[64608,5," \u064E\u0651"],[64609,5," \u064F\u0651"],[64610,5," \u0650\u0651"],[64611,5," \u0651\u0670"],[64612,1,"\u0626\u0631"],[64613,1,"\u0626\u0632"],[64614,1,"\u0626\u0645"],[64615,1,"\u0626\u0646"],[64616,1,"\u0626\u0649"],[64617,1,"\u0626\u064A"],[64618,1,"\u0628\u0631"],[64619,1,"\u0628\u0632"],[64620,1,"\u0628\u0645"],[64621,1,"\u0628\u0646"],[64622,1,"\u0628\u0649"],[64623,1,"\u0628\u064A"],[64624,1,"\u062A\u0631"],[64625,1,"\u062A\u0632"],[64626,1,"\u062A\u0645"],[64627,1,"\u062A\u0646"],[64628,1,"\u062A\u0649"],[64629,1,"\u062A\u064A"],[64630,1,"\u062B\u0631"],[64631,1,"\u062B\u0632"],[64632,1,"\u062B\u0645"],[64633,1,"\u062B\u0646"],[64634,1,"\u062B\u0649"],[64635,1,"\u062B\u064A"],[64636,1,"\u0641\u0649"],[64637,1,"\u0641\u064A"],[64638,1,"\u0642\u0649"],[64639,1,"\u0642\u064A"],[64640,1,"\u0643\u0627"],[64641,1,"\u0643\u0644"],[64642,1,"\u0643\u0645"],[64643,1,"\u0643\u0649"],[64644,1,"\u0643\u064A"],[64645,1,"\u0644\u0645"],[64646,1,"\u0644\u0649"],[64647,1,"\u0644\u064A"],[64648,1,"\u0645\u0627"],[64649,1,"\u0645\u0645"],[64650,1,"\u0646\u0631"],[64651,1,"\u0646\u0632"],[64652,1,"\u0646\u0645"],[64653,1,"\u0646\u0646"],[64654,1,"\u0646\u0649"],[64655,1,"\u0646\u064A"],[64656,1,"\u0649\u0670"],[64657,1,"\u064A\u0631"],[64658,1,"\u064A\u0632"],[64659,1,"\u064A\u0645"],[64660,1,"\u064A\u0646"],[64661,1,"\u064A\u0649"],[64662,1,"\u064A\u064A"],[64663,1,"\u0626\u062C"],[64664,1,"\u0626\u062D"],[64665,1,"\u0626\u062E"],[64666,1,"\u0626\u0645"],[64667,1,"\u0626\u0647"],[64668,1,"\u0628\u062C"],[64669,1,"\u0628\u062D"],[64670,1,"\u0628\u062E"],[64671,1,"\u0628\u0645"],[64672,1,"\u0628\u0647"],[64673,1,"\u062A\u062C"],[64674,1,"\u062A\u062D"],[64675,1,"\u062A\u062E"],[64676,1,"\u062A\u0645"],[64677,1,"\u062A\u0647"],[64678,1,"\u062B\u0645"],[64679,1,"\u062C\u062D"],[64680,1,"\u062C\u0645"],[64681,1,"\u062D\u062C"],[64682,1,"\u062D\u0645"],[64683,1,"\u062E\u062C"],[64684,1,"\u062E\u0645"],[64685,1,"\u0633\u062C"],[64686,1,"\u0633\u062D"],[64687,1,"\u0633\u062E"],[64688,1,"\u0633\u0645"],[64689,1,"\u0635\u062D"],[64690,1,"\u0635\u062E"],[64691,1,"\u0635\u0645"],[64692,1,"\u0636\u062C"],[64693,1,"\u0636\u062D"],[64694,1,"\u0636\u062E"],[64695,1,"\u0636\u0645"],[64696,1,"\u0637\u062D"],[64697,1,"\u0638\u0645"],[64698,1,"\u0639\u062C"],[64699,1,"\u0639\u0645"],[64700,1,"\u063A\u062C"],[64701,1,"\u063A\u0645"],[64702,1,"\u0641\u062C"],[64703,1,"\u0641\u062D"],[64704,1,"\u0641\u062E"],[64705,1,"\u0641\u0645"],[64706,1,"\u0642\u062D"],[64707,1,"\u0642\u0645"],[64708,1,"\u0643\u062C"],[64709,1,"\u0643\u062D"],[64710,1,"\u0643\u062E"],[64711,1,"\u0643\u0644"],[64712,1,"\u0643\u0645"],[64713,1,"\u0644\u062C"],[64714,1,"\u0644\u062D"],[64715,1,"\u0644\u062E"],[64716,1,"\u0644\u0645"],[64717,1,"\u0644\u0647"],[64718,1,"\u0645\u062C"],[64719,1,"\u0645\u062D"],[64720,1,"\u0645\u062E"],[64721,1,"\u0645\u0645"],[64722,1,"\u0646\u062C"],[64723,1,"\u0646\u062D"],[64724,1,"\u0646\u062E"],[64725,1,"\u0646\u0645"],[64726,1,"\u0646\u0647"],[64727,1,"\u0647\u062C"],[64728,1,"\u0647\u0645"],[64729,1,"\u0647\u0670"],[64730,1,"\u064A\u062C"],[64731,1,"\u064A\u062D"],[64732,1,"\u064A\u062E"],[64733,1,"\u064A\u0645"],[64734,1,"\u064A\u0647"],[64735,1,"\u0626\u0645"],[64736,1,"\u0626\u0647"],[64737,1,"\u0628\u0645"],[64738,1,"\u0628\u0647"],[64739,1,"\u062A\u0645"],[64740,1,"\u062A\u0647"],[64741,1,"\u062B\u0645"],[64742,1,"\u062B\u0647"],[64743,1,"\u0633\u0645"],[64744,1,"\u0633\u0647"],[64745,1,"\u0634\u0645"],[64746,1,"\u0634\u0647"],[64747,1,"\u0643\u0644"],[64748,1,"\u0643\u0645"],[64749,1,"\u0644\u0645"],[64750,1,"\u0646\u0645"],[64751,1,"\u0646\u0647"],[64752,1,"\u064A\u0645"],[64753,1,"\u064A\u0647"],[64754,1,"\u0640\u064E\u0651"],[64755,1,"\u0640\u064F\u0651"],[64756,1,"\u0640\u0650\u0651"],[64757,1,"\u0637\u0649"],[64758,1,"\u0637\u064A"],[64759,1,"\u0639\u0649"],[64760,1,"\u0639\u064A"],[64761,1,"\u063A\u0649"],[64762,1,"\u063A\u064A"],[64763,1,"\u0633\u0649"],[64764,1,"\u0633\u064A"],[64765,1,"\u0634\u0649"],[64766,1,"\u0634\u064A"],[64767,1,"\u062D\u0649"],[64768,1,"\u062D\u064A"],[64769,1,"\u062C\u0649"],[64770,1,"\u062C\u064A"],[64771,1,"\u062E\u0649"],[64772,1,"\u062E\u064A"],[64773,1,"\u0635\u0649"],[64774,1,"\u0635\u064A"],[64775,1,"\u0636\u0649"],[64776,1,"\u0636\u064A"],[64777,1,"\u0634\u062C"],[64778,1,"\u0634\u062D"],[64779,1,"\u0634\u062E"],[64780,1,"\u0634\u0645"],[64781,1,"\u0634\u0631"],[64782,1,"\u0633\u0631"],[64783,1,"\u0635\u0631"],[64784,1,"\u0636\u0631"],[64785,1,"\u0637\u0649"],[64786,1,"\u0637\u064A"],[64787,1,"\u0639\u0649"],[64788,1,"\u0639\u064A"],[64789,1,"\u063A\u0649"],[64790,1,"\u063A\u064A"],[64791,1,"\u0633\u0649"],[64792,1,"\u0633\u064A"],[64793,1,"\u0634\u0649"],[64794,1,"\u0634\u064A"],[64795,1,"\u062D\u0649"],[64796,1,"\u062D\u064A"],[64797,1,"\u062C\u0649"],[64798,1,"\u062C\u064A"],[64799,1,"\u062E\u0649"],[64800,1,"\u062E\u064A"],[64801,1,"\u0635\u0649"],[64802,1,"\u0635\u064A"],[64803,1,"\u0636\u0649"],[64804,1,"\u0636\u064A"],[64805,1,"\u0634\u062C"],[64806,1,"\u0634\u062D"],[64807,1,"\u0634\u062E"],[64808,1,"\u0634\u0645"],[64809,1,"\u0634\u0631"],[64810,1,"\u0633\u0631"],[64811,1,"\u0635\u0631"],[64812,1,"\u0636\u0631"],[64813,1,"\u0634\u062C"],[64814,1,"\u0634\u062D"],[64815,1,"\u0634\u062E"],[64816,1,"\u0634\u0645"],[64817,1,"\u0633\u0647"],[64818,1,"\u0634\u0647"],[64819,1,"\u0637\u0645"],[64820,1,"\u0633\u062C"],[64821,1,"\u0633\u062D"],[64822,1,"\u0633\u062E"],[64823,1,"\u0634\u062C"],[64824,1,"\u0634\u062D"],[64825,1,"\u0634\u062E"],[64826,1,"\u0637\u0645"],[64827,1,"\u0638\u0645"],[[64828,64829],1,"\u0627\u064B"],[[64830,64831],2],[[64832,64847],2],[64848,1,"\u062A\u062C\u0645"],[[64849,64850],1,"\u062A\u062D\u062C"],[64851,1,"\u062A\u062D\u0645"],[64852,1,"\u062A\u062E\u0645"],[64853,1,"\u062A\u0645\u062C"],[64854,1,"\u062A\u0645\u062D"],[64855,1,"\u062A\u0645\u062E"],[[64856,64857],1,"\u062C\u0645\u062D"],[64858,1,"\u062D\u0645\u064A"],[64859,1,"\u062D\u0645\u0649"],[64860,1,"\u0633\u062D\u062C"],[64861,1,"\u0633\u062C\u062D"],[64862,1,"\u0633\u062C\u0649"],[[64863,64864],1,"\u0633\u0645\u062D"],[64865,1,"\u0633\u0645\u062C"],[[64866,64867],1,"\u0633\u0645\u0645"],[[64868,64869],1,"\u0635\u062D\u062D"],[64870,1,"\u0635\u0645\u0645"],[[64871,64872],1,"\u0634\u062D\u0645"],[64873,1,"\u0634\u062C\u064A"],[[64874,64875],1,"\u0634\u0645\u062E"],[[64876,64877],1,"\u0634\u0645\u0645"],[64878,1,"\u0636\u062D\u0649"],[[64879,64880],1,"\u0636\u062E\u0645"],[[64881,64882],1,"\u0637\u0645\u062D"],[64883,1,"\u0637\u0645\u0645"],[64884,1,"\u0637\u0645\u064A"],[64885,1,"\u0639\u062C\u0645"],[[64886,64887],1,"\u0639\u0645\u0645"],[64888,1,"\u0639\u0645\u0649"],[64889,1,"\u063A\u0645\u0645"],[64890,1,"\u063A\u0645\u064A"],[64891,1,"\u063A\u0645\u0649"],[[64892,64893],1,"\u0641\u062E\u0645"],[64894,1,"\u0642\u0645\u062D"],[64895,1,"\u0642\u0645\u0645"],[64896,1,"\u0644\u062D\u0645"],[64897,1,"\u0644\u062D\u064A"],[64898,1,"\u0644\u062D\u0649"],[[64899,64900],1,"\u0644\u062C\u062C"],[[64901,64902],1,"\u0644\u062E\u0645"],[[64903,64904],1,"\u0644\u0645\u062D"],[64905,1,"\u0645\u062D\u062C"],[64906,1,"\u0645\u062D\u0645"],[64907,1,"\u0645\u062D\u064A"],[64908,1,"\u0645\u062C\u062D"],[64909,1,"\u0645\u062C\u0645"],[64910,1,"\u0645\u062E\u062C"],[64911,1,"\u0645\u062E\u0645"],[[64912,64913],3],[64914,1,"\u0645\u062C\u062E"],[64915,1,"\u0647\u0645\u062C"],[64916,1,"\u0647\u0645\u0645"],[64917,1,"\u0646\u062D\u0645"],[64918,1,"\u0646\u062D\u0649"],[[64919,64920],1,"\u0646\u062C\u0645"],[64921,1,"\u0646\u062C\u0649"],[64922,1,"\u0646\u0645\u064A"],[64923,1,"\u0646\u0645\u0649"],[[64924,64925],1,"\u064A\u0645\u0645"],[64926,1,"\u0628\u062E\u064A"],[64927,1,"\u062A\u062C\u064A"],[64928,1,"\u062A\u062C\u0649"],[64929,1,"\u062A\u062E\u064A"],[64930,1,"\u062A\u062E\u0649"],[64931,1,"\u062A\u0645\u064A"],[64932,1,"\u062A\u0645\u0649"],[64933,1,"\u062C\u0645\u064A"],[64934,1,"\u062C\u062D\u0649"],[64935,1,"\u062C\u0645\u0649"],[64936,1,"\u0633\u062E\u0649"],[64937,1,"\u0635\u062D\u064A"],[64938,1,"\u0634\u062D\u064A"],[64939,1,"\u0636\u062D\u064A"],[64940,1,"\u0644\u062C\u064A"],[64941,1,"\u0644\u0645\u064A"],[64942,1,"\u064A\u062D\u064A"],[64943,1,"\u064A\u062C\u064A"],[64944,1,"\u064A\u0645\u064A"],[64945,1,"\u0645\u0645\u064A"],[64946,1,"\u0642\u0645\u064A"],[64947,1,"\u0646\u062D\u064A"],[64948,1,"\u0642\u0645\u062D"],[64949,1,"\u0644\u062D\u0645"],[64950,1,"\u0639\u0645\u064A"],[64951,1,"\u0643\u0645\u064A"],[64952,1,"\u0646\u062C\u062D"],[64953,1,"\u0645\u062E\u064A"],[64954,1,"\u0644\u062C\u0645"],[64955,1,"\u0643\u0645\u0645"],[64956,1,"\u0644\u062C\u0645"],[64957,1,"\u0646\u062C\u062D"],[64958,1,"\u062C\u062D\u064A"],[64959,1,"\u062D\u062C\u064A"],[64960,1,"\u0645\u062C\u064A"],[64961,1,"\u0641\u0645\u064A"],[64962,1,"\u0628\u062D\u064A"],[64963,1,"\u0643\u0645\u0645"],[64964,1,"\u0639\u062C\u0645"],[64965,1,"\u0635\u0645\u0645"],[64966,1,"\u0633\u062E\u064A"],[64967,1,"\u0646\u062C\u064A"],[[64968,64974],3],[64975,2],[[64976,65007],3],[65008,1,"\u0635\u0644\u06D2"],[65009,1,"\u0642\u0644\u06D2"],[65010,1,"\u0627\u0644\u0644\u0647"],[65011,1,"\u0627\u0643\u0628\u0631"],[65012,1,"\u0645\u062D\u0645\u062F"],[65013,1,"\u0635\u0644\u0639\u0645"],[65014,1,"\u0631\u0633\u0648\u0644"],[65015,1,"\u0639\u0644\u064A\u0647"],[65016,1,"\u0648\u0633\u0644\u0645"],[65017,1,"\u0635\u0644\u0649"],[65018,5,"\u0635\u0644\u0649 \u0627\u0644\u0644\u0647 \u0639\u0644\u064A\u0647 \u0648\u0633\u0644\u0645"],[65019,5,"\u062C\u0644 \u062C\u0644\u0627\u0644\u0647"],[65020,1,"\u0631\u06CC\u0627\u0644"],[65021,2],[[65022,65023],2],[[65024,65039],7],[65040,5,","],[65041,1,"\u3001"],[65042,3],[65043,5,":"],[65044,5,";"],[65045,5,"!"],[65046,5,"?"],[65047,1,"\u3016"],[65048,1,"\u3017"],[65049,3],[[65050,65055],3],[[65056,65059],2],[[65060,65062],2],[[65063,65069],2],[[65070,65071],2],[65072,3],[65073,1,"\u2014"],[65074,1,"\u2013"],[[65075,65076],5,"_"],[65077,5,"("],[65078,5,")"],[65079,5,"{"],[65080,5,"}"],[65081,1,"\u3014"],[65082,1,"\u3015"],[65083,1,"\u3010"],[65084,1,"\u3011"],[65085,1,"\u300A"],[65086,1,"\u300B"],[65087,1,"\u3008"],[65088,1,"\u3009"],[65089,1,"\u300C"],[65090,1,"\u300D"],[65091,1,"\u300E"],[65092,1,"\u300F"],[[65093,65094],2],[65095,5,"["],[65096,5,"]"],[[65097,65100],5," \u0305"],[[65101,65103],5,"_"],[65104,5,","],[65105,1,"\u3001"],[65106,3],[65107,3],[65108,5,";"],[65109,5,":"],[65110,5,"?"],[65111,5,"!"],[65112,1,"\u2014"],[65113,5,"("],[65114,5,")"],[65115,5,"{"],[65116,5,"}"],[65117,1,"\u3014"],[65118,1,"\u3015"],[65119,5,"#"],[65120,5,"&"],[65121,5,"*"],[65122,5,"+"],[65123,1,"-"],[65124,5,"<"],[65125,5,">"],[65126,5,"="],[65127,3],[65128,5,"\\"],[65129,5,"$"],[65130,5,"%"],[65131,5,"@"],[[65132,65135],3],[65136,5," \u064B"],[65137,1,"\u0640\u064B"],[65138,5," \u064C"],[65139,2],[65140,5," \u064D"],[65141,3],[65142,5," \u064E"],[65143,1,"\u0640\u064E"],[65144,5," \u064F"],[65145,1,"\u0640\u064F"],[65146,5," \u0650"],[65147,1,"\u0640\u0650"],[65148,5," \u0651"],[65149,1,"\u0640\u0651"],[65150,5," \u0652"],[65151,1,"\u0640\u0652"],[65152,1,"\u0621"],[[65153,65154],1,"\u0622"],[[65155,65156],1,"\u0623"],[[65157,65158],1,"\u0624"],[[65159,65160],1,"\u0625"],[[65161,65164],1,"\u0626"],[[65165,65166],1,"\u0627"],[[65167,65170],1,"\u0628"],[[65171,65172],1,"\u0629"],[[65173,65176],1,"\u062A"],[[65177,65180],1,"\u062B"],[[65181,65184],1,"\u062C"],[[65185,65188],1,"\u062D"],[[65189,65192],1,"\u062E"],[[65193,65194],1,"\u062F"],[[65195,65196],1,"\u0630"],[[65197,65198],1,"\u0631"],[[65199,65200],1,"\u0632"],[[65201,65204],1,"\u0633"],[[65205,65208],1,"\u0634"],[[65209,65212],1,"\u0635"],[[65213,65216],1,"\u0636"],[[65217,65220],1,"\u0637"],[[65221,65224],1,"\u0638"],[[65225,65228],1,"\u0639"],[[65229,65232],1,"\u063A"],[[65233,65236],1,"\u0641"],[[65237,65240],1,"\u0642"],[[65241,65244],1,"\u0643"],[[65245,65248],1,"\u0644"],[[65249,65252],1,"\u0645"],[[65253,65256],1,"\u0646"],[[65257,65260],1,"\u0647"],[[65261,65262],1,"\u0648"],[[65263,65264],1,"\u0649"],[[65265,65268],1,"\u064A"],[[65269,65270],1,"\u0644\u0622"],[[65271,65272],1,"\u0644\u0623"],[[65273,65274],1,"\u0644\u0625"],[[65275,65276],1,"\u0644\u0627"],[[65277,65278],3],[65279,7],[65280,3],[65281,5,"!"],[65282,5,'"'],[65283,5,"#"],[65284,5,"$"],[65285,5,"%"],[65286,5,"&"],[65287,5,"'"],[65288,5,"("],[65289,5,")"],[65290,5,"*"],[65291,5,"+"],[65292,5,","],[65293,1,"-"],[65294,1,"."],[65295,5,"/"],[65296,1,"0"],[65297,1,"1"],[65298,1,"2"],[65299,1,"3"],[65300,1,"4"],[65301,1,"5"],[65302,1,"6"],[65303,1,"7"],[65304,1,"8"],[65305,1,"9"],[65306,5,":"],[65307,5,";"],[65308,5,"<"],[65309,5,"="],[65310,5,">"],[65311,5,"?"],[65312,5,"@"],[65313,1,"a"],[65314,1,"b"],[65315,1,"c"],[65316,1,"d"],[65317,1,"e"],[65318,1,"f"],[65319,1,"g"],[65320,1,"h"],[65321,1,"i"],[65322,1,"j"],[65323,1,"k"],[65324,1,"l"],[65325,1,"m"],[65326,1,"n"],[65327,1,"o"],[65328,1,"p"],[65329,1,"q"],[65330,1,"r"],[65331,1,"s"],[65332,1,"t"],[65333,1,"u"],[65334,1,"v"],[65335,1,"w"],[65336,1,"x"],[65337,1,"y"],[65338,1,"z"],[65339,5,"["],[65340,5,"\\"],[65341,5,"]"],[65342,5,"^"],[65343,5,"_"],[65344,5,"`"],[65345,1,"a"],[65346,1,"b"],[65347,1,"c"],[65348,1,"d"],[65349,1,"e"],[65350,1,"f"],[65351,1,"g"],[65352,1,"h"],[65353,1,"i"],[65354,1,"j"],[65355,1,"k"],[65356,1,"l"],[65357,1,"m"],[65358,1,"n"],[65359,1,"o"],[65360,1,"p"],[65361,1,"q"],[65362,1,"r"],[65363,1,"s"],[65364,1,"t"],[65365,1,"u"],[65366,1,"v"],[65367,1,"w"],[65368,1,"x"],[65369,1,"y"],[65370,1,"z"],[65371,5,"{"],[65372,5,"|"],[65373,5,"}"],[65374,5,"~"],[65375,1,"\u2985"],[65376,1,"\u2986"],[65377,1,"."],[65378,1,"\u300C"],[65379,1,"\u300D"],[65380,1,"\u3001"],[65381,1,"\u30FB"],[65382,1,"\u30F2"],[65383,1,"\u30A1"],[65384,1,"\u30A3"],[65385,1,"\u30A5"],[65386,1,"\u30A7"],[65387,1,"\u30A9"],[65388,1,"\u30E3"],[65389,1,"\u30E5"],[65390,1,"\u30E7"],[65391,1,"\u30C3"],[65392,1,"\u30FC"],[65393,1,"\u30A2"],[65394,1,"\u30A4"],[65395,1,"\u30A6"],[65396,1,"\u30A8"],[65397,1,"\u30AA"],[65398,1,"\u30AB"],[65399,1,"\u30AD"],[65400,1,"\u30AF"],[65401,1,"\u30B1"],[65402,1,"\u30B3"],[65403,1,"\u30B5"],[65404,1,"\u30B7"],[65405,1,"\u30B9"],[65406,1,"\u30BB"],[65407,1,"\u30BD"],[65408,1,"\u30BF"],[65409,1,"\u30C1"],[65410,1,"\u30C4"],[65411,1,"\u30C6"],[65412,1,"\u30C8"],[65413,1,"\u30CA"],[65414,1,"\u30CB"],[65415,1,"\u30CC"],[65416,1,"\u30CD"],[65417,1,"\u30CE"],[65418,1,"\u30CF"],[65419,1,"\u30D2"],[65420,1,"\u30D5"],[65421,1,"\u30D8"],[65422,1,"\u30DB"],[65423,1,"\u30DE"],[65424,1,"\u30DF"],[65425,1,"\u30E0"],[65426,1,"\u30E1"],[65427,1,"\u30E2"],[65428,1,"\u30E4"],[65429,1,"\u30E6"],[65430,1,"\u30E8"],[65431,1,"\u30E9"],[65432,1,"\u30EA"],[65433,1,"\u30EB"],[65434,1,"\u30EC"],[65435,1,"\u30ED"],[65436,1,"\u30EF"],[65437,1,"\u30F3"],[65438,1,"\u3099"],[65439,1,"\u309A"],[65440,3],[65441,1,"\u1100"],[65442,1,"\u1101"],[65443,1,"\u11AA"],[65444,1,"\u1102"],[65445,1,"\u11AC"],[65446,1,"\u11AD"],[65447,1,"\u1103"],[65448,1,"\u1104"],[65449,1,"\u1105"],[65450,1,"\u11B0"],[65451,1,"\u11B1"],[65452,1,"\u11B2"],[65453,1,"\u11B3"],[65454,1,"\u11B4"],[65455,1,"\u11B5"],[65456,1,"\u111A"],[65457,1,"\u1106"],[65458,1,"\u1107"],[65459,1,"\u1108"],[65460,1,"\u1121"],[65461,1,"\u1109"],[65462,1,"\u110A"],[65463,1,"\u110B"],[65464,1,"\u110C"],[65465,1,"\u110D"],[65466,1,"\u110E"],[65467,1,"\u110F"],[65468,1,"\u1110"],[65469,1,"\u1111"],[65470,1,"\u1112"],[[65471,65473],3],[65474,1,"\u1161"],[65475,1,"\u1162"],[65476,1,"\u1163"],[65477,1,"\u1164"],[65478,1,"\u1165"],[65479,1,"\u1166"],[[65480,65481],3],[65482,1,"\u1167"],[65483,1,"\u1168"],[65484,1,"\u1169"],[65485,1,"\u116A"],[65486,1,"\u116B"],[65487,1,"\u116C"],[[65488,65489],3],[65490,1,"\u116D"],[65491,1,"\u116E"],[65492,1,"\u116F"],[65493,1,"\u1170"],[65494,1,"\u1171"],[65495,1,"\u1172"],[[65496,65497],3],[65498,1,"\u1173"],[65499,1,"\u1174"],[65500,1,"\u1175"],[[65501,65503],3],[65504,1,"\xA2"],[65505,1,"\xA3"],[65506,1,"\xAC"],[65507,5," \u0304"],[65508,1,"\xA6"],[65509,1,"\xA5"],[65510,1,"\u20A9"],[65511,3],[65512,1,"\u2502"],[65513,1,"\u2190"],[65514,1,"\u2191"],[65515,1,"\u2192"],[65516,1,"\u2193"],[65517,1,"\u25A0"],[65518,1,"\u25CB"],[[65519,65528],3],[[65529,65531],3],[65532,3],[65533,3],[[65534,65535],3],[[65536,65547],2],[65548,3],[[65549,65574],2],[65575,3],[[65576,65594],2],[65595,3],[[65596,65597],2],[65598,3],[[65599,65613],2],[[65614,65615],3],[[65616,65629],2],[[65630,65663],3],[[65664,65786],2],[[65787,65791],3],[[65792,65794],2],[[65795,65798],3],[[65799,65843],2],[[65844,65846],3],[[65847,65855],2],[[65856,65930],2],[[65931,65932],2],[[65933,65934],2],[65935,3],[[65936,65947],2],[65948,2],[[65949,65951],3],[65952,2],[[65953,65999],3],[[66e3,66044],2],[66045,2],[[66046,66175],3],[[66176,66204],2],[[66205,66207],3],[[66208,66256],2],[[66257,66271],3],[66272,2],[[66273,66299],2],[[66300,66303],3],[[66304,66334],2],[66335,2],[[66336,66339],2],[[66340,66348],3],[[66349,66351],2],[[66352,66368],2],[66369,2],[[66370,66377],2],[66378,2],[[66379,66383],3],[[66384,66426],2],[[66427,66431],3],[[66432,66461],2],[66462,3],[66463,2],[[66464,66499],2],[[66500,66503],3],[[66504,66511],2],[[66512,66517],2],[[66518,66559],3],[66560,1,"\u{10428}"],[66561,1,"\u{10429}"],[66562,1,"\u{1042A}"],[66563,1,"\u{1042B}"],[66564,1,"\u{1042C}"],[66565,1,"\u{1042D}"],[66566,1,"\u{1042E}"],[66567,1,"\u{1042F}"],[66568,1,"\u{10430}"],[66569,1,"\u{10431}"],[66570,1,"\u{10432}"],[66571,1,"\u{10433}"],[66572,1,"\u{10434}"],[66573,1,"\u{10435}"],[66574,1,"\u{10436}"],[66575,1,"\u{10437}"],[66576,1,"\u{10438}"],[66577,1,"\u{10439}"],[66578,1,"\u{1043A}"],[66579,1,"\u{1043B}"],[66580,1,"\u{1043C}"],[66581,1,"\u{1043D}"],[66582,1,"\u{1043E}"],[66583,1,"\u{1043F}"],[66584,1,"\u{10440}"],[66585,1,"\u{10441}"],[66586,1,"\u{10442}"],[66587,1,"\u{10443}"],[66588,1,"\u{10444}"],[66589,1,"\u{10445}"],[66590,1,"\u{10446}"],[66591,1,"\u{10447}"],[66592,1,"\u{10448}"],[66593,1,"\u{10449}"],[66594,1,"\u{1044A}"],[66595,1,"\u{1044B}"],[66596,1,"\u{1044C}"],[66597,1,"\u{1044D}"],[66598,1,"\u{1044E}"],[66599,1,"\u{1044F}"],[[66600,66637],2],[[66638,66717],2],[[66718,66719],3],[[66720,66729],2],[[66730,66735],3],[66736,1,"\u{104D8}"],[66737,1,"\u{104D9}"],[66738,1,"\u{104DA}"],[66739,1,"\u{104DB}"],[66740,1,"\u{104DC}"],[66741,1,"\u{104DD}"],[66742,1,"\u{104DE}"],[66743,1,"\u{104DF}"],[66744,1,"\u{104E0}"],[66745,1,"\u{104E1}"],[66746,1,"\u{104E2}"],[66747,1,"\u{104E3}"],[66748,1,"\u{104E4}"],[66749,1,"\u{104E5}"],[66750,1,"\u{104E6}"],[66751,1,"\u{104E7}"],[66752,1,"\u{104E8}"],[66753,1,"\u{104E9}"],[66754,1,"\u{104EA}"],[66755,1,"\u{104EB}"],[66756,1,"\u{104EC}"],[66757,1,"\u{104ED}"],[66758,1,"\u{104EE}"],[66759,1,"\u{104EF}"],[66760,1,"\u{104F0}"],[66761,1,"\u{104F1}"],[66762,1,"\u{104F2}"],[66763,1,"\u{104F3}"],[66764,1,"\u{104F4}"],[66765,1,"\u{104F5}"],[66766,1,"\u{104F6}"],[66767,1,"\u{104F7}"],[66768,1,"\u{104F8}"],[66769,1,"\u{104F9}"],[66770,1,"\u{104FA}"],[66771,1,"\u{104FB}"],[[66772,66775],3],[[66776,66811],2],[[66812,66815],3],[[66816,66855],2],[[66856,66863],3],[[66864,66915],2],[[66916,66926],3],[66927,2],[66928,1,"\u{10597}"],[66929,1,"\u{10598}"],[66930,1,"\u{10599}"],[66931,1,"\u{1059A}"],[66932,1,"\u{1059B}"],[66933,1,"\u{1059C}"],[66934,1,"\u{1059D}"],[66935,1,"\u{1059E}"],[66936,1,"\u{1059F}"],[66937,1,"\u{105A0}"],[66938,1,"\u{105A1}"],[66939,3],[66940,1,"\u{105A3}"],[66941,1,"\u{105A4}"],[66942,1,"\u{105A5}"],[66943,1,"\u{105A6}"],[66944,1,"\u{105A7}"],[66945,1,"\u{105A8}"],[66946,1,"\u{105A9}"],[66947,1,"\u{105AA}"],[66948,1,"\u{105AB}"],[66949,1,"\u{105AC}"],[66950,1,"\u{105AD}"],[66951,1,"\u{105AE}"],[66952,1,"\u{105AF}"],[66953,1,"\u{105B0}"],[66954,1,"\u{105B1}"],[66955,3],[66956,1,"\u{105B3}"],[66957,1,"\u{105B4}"],[66958,1,"\u{105B5}"],[66959,1,"\u{105B6}"],[66960,1,"\u{105B7}"],[66961,1,"\u{105B8}"],[66962,1,"\u{105B9}"],[66963,3],[66964,1,"\u{105BB}"],[66965,1,"\u{105BC}"],[66966,3],[[66967,66977],2],[66978,3],[[66979,66993],2],[66994,3],[[66995,67001],2],[67002,3],[[67003,67004],2],[[67005,67071],3],[[67072,67382],2],[[67383,67391],3],[[67392,67413],2],[[67414,67423],3],[[67424,67431],2],[[67432,67455],3],[67456,2],[67457,1,"\u02D0"],[67458,1,"\u02D1"],[67459,1,"\xE6"],[67460,1,"\u0299"],[67461,1,"\u0253"],[67462,3],[67463,1,"\u02A3"],[67464,1,"\uAB66"],[67465,1,"\u02A5"],[67466,1,"\u02A4"],[67467,1,"\u0256"],[67468,1,"\u0257"],[67469,1,"\u1D91"],[67470,1,"\u0258"],[67471,1,"\u025E"],[67472,1,"\u02A9"],[67473,1,"\u0264"],[67474,1,"\u0262"],[67475,1,"\u0260"],[67476,1,"\u029B"],[67477,1,"\u0127"],[67478,1,"\u029C"],[67479,1,"\u0267"],[67480,1,"\u0284"],[67481,1,"\u02AA"],[67482,1,"\u02AB"],[67483,1,"\u026C"],[67484,1,"\u{1DF04}"],[67485,1,"\uA78E"],[67486,1,"\u026E"],[67487,1,"\u{1DF05}"],[67488,1,"\u028E"],[67489,1,"\u{1DF06}"],[67490,1,"\xF8"],[67491,1,"\u0276"],[67492,1,"\u0277"],[67493,1,"q"],[67494,1,"\u027A"],[67495,1,"\u{1DF08}"],[67496,1,"\u027D"],[67497,1,"\u027E"],[67498,1,"\u0280"],[67499,1,"\u02A8"],[67500,1,"\u02A6"],[67501,1,"\uAB67"],[67502,1,"\u02A7"],[67503,1,"\u0288"],[67504,1,"\u2C71"],[67505,3],[67506,1,"\u028F"],[67507,1,"\u02A1"],[67508,1,"\u02A2"],[67509,1,"\u0298"],[67510,1,"\u01C0"],[67511,1,"\u01C1"],[67512,1,"\u01C2"],[67513,1,"\u{1DF0A}"],[67514,1,"\u{1DF1E}"],[[67515,67583],3],[[67584,67589],2],[[67590,67591],3],[67592,2],[67593,3],[[67594,67637],2],[67638,3],[[67639,67640],2],[[67641,67643],3],[67644,2],[[67645,67646],3],[67647,2],[[67648,67669],2],[67670,3],[[67671,67679],2],[[67680,67702],2],[[67703,67711],2],[[67712,67742],2],[[67743,67750],3],[[67751,67759],2],[[67760,67807],3],[[67808,67826],2],[67827,3],[[67828,67829],2],[[67830,67834],3],[[67835,67839],2],[[67840,67861],2],[[67862,67865],2],[[67866,67867],2],[[67868,67870],3],[67871,2],[[67872,67897],2],[[67898,67902],3],[67903,2],[[67904,67967],3],[[67968,68023],2],[[68024,68027],3],[[68028,68029],2],[[68030,68031],2],[[68032,68047],2],[[68048,68049],3],[[68050,68095],2],[[68096,68099],2],[68100,3],[[68101,68102],2],[[68103,68107],3],[[68108,68115],2],[68116,3],[[68117,68119],2],[68120,3],[[68121,68147],2],[[68148,68149],2],[[68150,68151],3],[[68152,68154],2],[[68155,68158],3],[68159,2],[[68160,68167],2],[68168,2],[[68169,68175],3],[[68176,68184],2],[[68185,68191],3],[[68192,68220],2],[[68221,68223],2],[[68224,68252],2],[[68253,68255],2],[[68256,68287],3],[[68288,68295],2],[68296,2],[[68297,68326],2],[[68327,68330],3],[[68331,68342],2],[[68343,68351],3],[[68352,68405],2],[[68406,68408],3],[[68409,68415],2],[[68416,68437],2],[[68438,68439],3],[[68440,68447],2],[[68448,68466],2],[[68467,68471],3],[[68472,68479],2],[[68480,68497],2],[[68498,68504],3],[[68505,68508],2],[[68509,68520],3],[[68521,68527],2],[[68528,68607],3],[[68608,68680],2],[[68681,68735],3],[68736,1,"\u{10CC0}"],[68737,1,"\u{10CC1}"],[68738,1,"\u{10CC2}"],[68739,1,"\u{10CC3}"],[68740,1,"\u{10CC4}"],[68741,1,"\u{10CC5}"],[68742,1,"\u{10CC6}"],[68743,1,"\u{10CC7}"],[68744,1,"\u{10CC8}"],[68745,1,"\u{10CC9}"],[68746,1,"\u{10CCA}"],[68747,1,"\u{10CCB}"],[68748,1,"\u{10CCC}"],[68749,1,"\u{10CCD}"],[68750,1,"\u{10CCE}"],[68751,1,"\u{10CCF}"],[68752,1,"\u{10CD0}"],[68753,1,"\u{10CD1}"],[68754,1,"\u{10CD2}"],[68755,1,"\u{10CD3}"],[68756,1,"\u{10CD4}"],[68757,1,"\u{10CD5}"],[68758,1,"\u{10CD6}"],[68759,1,"\u{10CD7}"],[68760,1,"\u{10CD8}"],[68761,1,"\u{10CD9}"],[68762,1,"\u{10CDA}"],[68763,1,"\u{10CDB}"],[68764,1,"\u{10CDC}"],[68765,1,"\u{10CDD}"],[68766,1,"\u{10CDE}"],[68767,1,"\u{10CDF}"],[68768,1,"\u{10CE0}"],[68769,1,"\u{10CE1}"],[68770,1,"\u{10CE2}"],[68771,1,"\u{10CE3}"],[68772,1,"\u{10CE4}"],[68773,1,"\u{10CE5}"],[68774,1,"\u{10CE6}"],[68775,1,"\u{10CE7}"],[68776,1,"\u{10CE8}"],[68777,1,"\u{10CE9}"],[68778,1,"\u{10CEA}"],[68779,1,"\u{10CEB}"],[68780,1,"\u{10CEC}"],[68781,1,"\u{10CED}"],[68782,1,"\u{10CEE}"],[68783,1,"\u{10CEF}"],[68784,1,"\u{10CF0}"],[68785,1,"\u{10CF1}"],[68786,1,"\u{10CF2}"],[[68787,68799],3],[[68800,68850],2],[[68851,68857],3],[[68858,68863],2],[[68864,68903],2],[[68904,68911],3],[[68912,68921],2],[[68922,69215],3],[[69216,69246],2],[69247,3],[[69248,69289],2],[69290,3],[[69291,69292],2],[69293,2],[[69294,69295],3],[[69296,69297],2],[[69298,69372],3],[[69373,69375],2],[[69376,69404],2],[[69405,69414],2],[69415,2],[[69416,69423],3],[[69424,69456],2],[[69457,69465],2],[[69466,69487],3],[[69488,69509],2],[[69510,69513],2],[[69514,69551],3],[[69552,69572],2],[[69573,69579],2],[[69580,69599],3],[[69600,69622],2],[[69623,69631],3],[[69632,69702],2],[[69703,69709],2],[[69710,69713],3],[[69714,69733],2],[[69734,69743],2],[[69744,69749],2],[[69750,69758],3],[69759,2],[[69760,69818],2],[[69819,69820],2],[69821,3],[[69822,69825],2],[69826,2],[[69827,69836],3],[69837,3],[[69838,69839],3],[[69840,69864],2],[[69865,69871],3],[[69872,69881],2],[[69882,69887],3],[[69888,69940],2],[69941,3],[[69942,69951],2],[[69952,69955],2],[[69956,69958],2],[69959,2],[[69960,69967],3],[[69968,70003],2],[[70004,70005],2],[70006,2],[[70007,70015],3],[[70016,70084],2],[[70085,70088],2],[[70089,70092],2],[70093,2],[[70094,70095],2],[[70096,70105],2],[70106,2],[70107,2],[70108,2],[[70109,70111],2],[70112,3],[[70113,70132],2],[[70133,70143],3],[[70144,70161],2],[70162,3],[[70163,70199],2],[[70200,70205],2],[70206,2],[[70207,70209],2],[[70210,70271],3],[[70272,70278],2],[70279,3],[70280,2],[70281,3],[[70282,70285],2],[70286,3],[[70287,70301],2],[70302,3],[[70303,70312],2],[70313,2],[[70314,70319],3],[[70320,70378],2],[[70379,70383],3],[[70384,70393],2],[[70394,70399],3],[70400,2],[[70401,70403],2],[70404,3],[[70405,70412],2],[[70413,70414],3],[[70415,70416],2],[[70417,70418],3],[[70419,70440],2],[70441,3],[[70442,70448],2],[70449,3],[[70450,70451],2],[70452,3],[[70453,70457],2],[70458,3],[70459,2],[[70460,70468],2],[[70469,70470],3],[[70471,70472],2],[[70473,70474],3],[[70475,70477],2],[[70478,70479],3],[70480,2],[[70481,70486],3],[70487,2],[[70488,70492],3],[[70493,70499],2],[[70500,70501],3],[[70502,70508],2],[[70509,70511],3],[[70512,70516],2],[[70517,70655],3],[[70656,70730],2],[[70731,70735],2],[[70736,70745],2],[70746,2],[70747,2],[70748,3],[70749,2],[70750,2],[70751,2],[[70752,70753],2],[[70754,70783],3],[[70784,70853],2],[70854,2],[70855,2],[[70856,70863],3],[[70864,70873],2],[[70874,71039],3],[[71040,71093],2],[[71094,71095],3],[[71096,71104],2],[[71105,71113],2],[[71114,71127],2],[[71128,71133],2],[[71134,71167],3],[[71168,71232],2],[[71233,71235],2],[71236,2],[[71237,71247],3],[[71248,71257],2],[[71258,71263],3],[[71264,71276],2],[[71277,71295],3],[[71296,71351],2],[71352,2],[71353,2],[[71354,71359],3],[[71360,71369],2],[[71370,71423],3],[[71424,71449],2],[71450,2],[[71451,71452],3],[[71453,71467],2],[[71468,71471],3],[[71472,71481],2],[[71482,71487],2],[[71488,71494],2],[[71495,71679],3],[[71680,71738],2],[71739,2],[[71740,71839],3],[71840,1,"\u{118C0}"],[71841,1,"\u{118C1}"],[71842,1,"\u{118C2}"],[71843,1,"\u{118C3}"],[71844,1,"\u{118C4}"],[71845,1,"\u{118C5}"],[71846,1,"\u{118C6}"],[71847,1,"\u{118C7}"],[71848,1,"\u{118C8}"],[71849,1,"\u{118C9}"],[71850,1,"\u{118CA}"],[71851,1,"\u{118CB}"],[71852,1,"\u{118CC}"],[71853,1,"\u{118CD}"],[71854,1,"\u{118CE}"],[71855,1,"\u{118CF}"],[71856,1,"\u{118D0}"],[71857,1,"\u{118D1}"],[71858,1,"\u{118D2}"],[71859,1,"\u{118D3}"],[71860,1,"\u{118D4}"],[71861,1,"\u{118D5}"],[71862,1,"\u{118D6}"],[71863,1,"\u{118D7}"],[71864,1,"\u{118D8}"],[71865,1,"\u{118D9}"],[71866,1,"\u{118DA}"],[71867,1,"\u{118DB}"],[71868,1,"\u{118DC}"],[71869,1,"\u{118DD}"],[71870,1,"\u{118DE}"],[71871,1,"\u{118DF}"],[[71872,71913],2],[[71914,71922],2],[[71923,71934],3],[71935,2],[[71936,71942],2],[[71943,71944],3],[71945,2],[[71946,71947],3],[[71948,71955],2],[71956,3],[[71957,71958],2],[71959,3],[[71960,71989],2],[71990,3],[[71991,71992],2],[[71993,71994],3],[[71995,72003],2],[[72004,72006],2],[[72007,72015],3],[[72016,72025],2],[[72026,72095],3],[[72096,72103],2],[[72104,72105],3],[[72106,72151],2],[[72152,72153],3],[[72154,72161],2],[72162,2],[[72163,72164],2],[[72165,72191],3],[[72192,72254],2],[[72255,72262],2],[72263,2],[[72264,72271],3],[[72272,72323],2],[[72324,72325],2],[[72326,72345],2],[[72346,72348],2],[72349,2],[[72350,72354],2],[[72355,72367],3],[[72368,72383],2],[[72384,72440],2],[[72441,72447],3],[[72448,72457],2],[[72458,72703],3],[[72704,72712],2],[72713,3],[[72714,72758],2],[72759,3],[[72760,72768],2],[[72769,72773],2],[[72774,72783],3],[[72784,72793],2],[[72794,72812],2],[[72813,72815],3],[[72816,72817],2],[[72818,72847],2],[[72848,72849],3],[[72850,72871],2],[72872,3],[[72873,72886],2],[[72887,72959],3],[[72960,72966],2],[72967,3],[[72968,72969],2],[72970,3],[[72971,73014],2],[[73015,73017],3],[73018,2],[73019,3],[[73020,73021],2],[73022,3],[[73023,73031],2],[[73032,73039],3],[[73040,73049],2],[[73050,73055],3],[[73056,73061],2],[73062,3],[[73063,73064],2],[73065,3],[[73066,73102],2],[73103,3],[[73104,73105],2],[73106,3],[[73107,73112],2],[[73113,73119],3],[[73120,73129],2],[[73130,73439],3],[[73440,73462],2],[[73463,73464],2],[[73465,73471],3],[[73472,73488],2],[73489,3],[[73490,73530],2],[[73531,73533],3],[[73534,73538],2],[[73539,73551],2],[[73552,73561],2],[[73562,73647],3],[73648,2],[[73649,73663],3],[[73664,73713],2],[[73714,73726],3],[73727,2],[[73728,74606],2],[[74607,74648],2],[74649,2],[[74650,74751],3],[[74752,74850],2],[[74851,74862],2],[74863,3],[[74864,74867],2],[74868,2],[[74869,74879],3],[[74880,75075],2],[[75076,77711],3],[[77712,77808],2],[[77809,77810],2],[[77811,77823],3],[[77824,78894],2],[78895,2],[[78896,78904],3],[[78905,78911],3],[[78912,78933],2],[[78934,82943],3],[[82944,83526],2],[[83527,92159],3],[[92160,92728],2],[[92729,92735],3],[[92736,92766],2],[92767,3],[[92768,92777],2],[[92778,92781],3],[[92782,92783],2],[[92784,92862],2],[92863,3],[[92864,92873],2],[[92874,92879],3],[[92880,92909],2],[[92910,92911],3],[[92912,92916],2],[92917,2],[[92918,92927],3],[[92928,92982],2],[[92983,92991],2],[[92992,92995],2],[[92996,92997],2],[[92998,93007],3],[[93008,93017],2],[93018,3],[[93019,93025],2],[93026,3],[[93027,93047],2],[[93048,93052],3],[[93053,93071],2],[[93072,93759],3],[93760,1,"\u{16E60}"],[93761,1,"\u{16E61}"],[93762,1,"\u{16E62}"],[93763,1,"\u{16E63}"],[93764,1,"\u{16E64}"],[93765,1,"\u{16E65}"],[93766,1,"\u{16E66}"],[93767,1,"\u{16E67}"],[93768,1,"\u{16E68}"],[93769,1,"\u{16E69}"],[93770,1,"\u{16E6A}"],[93771,1,"\u{16E6B}"],[93772,1,"\u{16E6C}"],[93773,1,"\u{16E6D}"],[93774,1,"\u{16E6E}"],[93775,1,"\u{16E6F}"],[93776,1,"\u{16E70}"],[93777,1,"\u{16E71}"],[93778,1,"\u{16E72}"],[93779,1,"\u{16E73}"],[93780,1,"\u{16E74}"],[93781,1,"\u{16E75}"],[93782,1,"\u{16E76}"],[93783,1,"\u{16E77}"],[93784,1,"\u{16E78}"],[93785,1,"\u{16E79}"],[93786,1,"\u{16E7A}"],[93787,1,"\u{16E7B}"],[93788,1,"\u{16E7C}"],[93789,1,"\u{16E7D}"],[93790,1,"\u{16E7E}"],[93791,1,"\u{16E7F}"],[[93792,93823],2],[[93824,93850],2],[[93851,93951],3],[[93952,94020],2],[[94021,94026],2],[[94027,94030],3],[94031,2],[[94032,94078],2],[[94079,94087],2],[[94088,94094],3],[[94095,94111],2],[[94112,94175],3],[94176,2],[94177,2],[94178,2],[94179,2],[94180,2],[[94181,94191],3],[[94192,94193],2],[[94194,94207],3],[[94208,100332],2],[[100333,100337],2],[[100338,100343],2],[[100344,100351],3],[[100352,101106],2],[[101107,101589],2],[[101590,101631],3],[[101632,101640],2],[[101641,110575],3],[[110576,110579],2],[110580,3],[[110581,110587],2],[110588,3],[[110589,110590],2],[110591,3],[[110592,110593],2],[[110594,110878],2],[[110879,110882],2],[[110883,110897],3],[110898,2],[[110899,110927],3],[[110928,110930],2],[[110931,110932],3],[110933,2],[[110934,110947],3],[[110948,110951],2],[[110952,110959],3],[[110960,111355],2],[[111356,113663],3],[[113664,113770],2],[[113771,113775],3],[[113776,113788],2],[[113789,113791],3],[[113792,113800],2],[[113801,113807],3],[[113808,113817],2],[[113818,113819],3],[113820,2],[[113821,113822],2],[113823,2],[[113824,113827],7],[[113828,118527],3],[[118528,118573],2],[[118574,118575],3],[[118576,118598],2],[[118599,118607],3],[[118608,118723],2],[[118724,118783],3],[[118784,119029],2],[[119030,119039],3],[[119040,119078],2],[[119079,119080],3],[119081,2],[[119082,119133],2],[119134,1,"\u{1D157}\u{1D165}"],[119135,1,"\u{1D158}\u{1D165}"],[119136,1,"\u{1D158}\u{1D165}\u{1D16E}"],[119137,1,"\u{1D158}\u{1D165}\u{1D16F}"],[119138,1,"\u{1D158}\u{1D165}\u{1D170}"],[119139,1,"\u{1D158}\u{1D165}\u{1D171}"],[119140,1,"\u{1D158}\u{1D165}\u{1D172}"],[[119141,119154],2],[[119155,119162],3],[[119163,119226],2],[119227,1,"\u{1D1B9}\u{1D165}"],[119228,1,"\u{1D1BA}\u{1D165}"],[119229,1,"\u{1D1B9}\u{1D165}\u{1D16E}"],[119230,1,"\u{1D1BA}\u{1D165}\u{1D16E}"],[119231,1,"\u{1D1B9}\u{1D165}\u{1D16F}"],[119232,1,"\u{1D1BA}\u{1D165}\u{1D16F}"],[[119233,119261],2],[[119262,119272],2],[[119273,119274],2],[[119275,119295],3],[[119296,119365],2],[[119366,119487],3],[[119488,119507],2],[[119508,119519],3],[[119520,119539],2],[[119540,119551],3],[[119552,119638],2],[[119639,119647],3],[[119648,119665],2],[[119666,119672],2],[[119673,119807],3],[119808,1,"a"],[119809,1,"b"],[119810,1,"c"],[119811,1,"d"],[119812,1,"e"],[119813,1,"f"],[119814,1,"g"],[119815,1,"h"],[119816,1,"i"],[119817,1,"j"],[119818,1,"k"],[119819,1,"l"],[119820,1,"m"],[119821,1,"n"],[119822,1,"o"],[119823,1,"p"],[119824,1,"q"],[119825,1,"r"],[119826,1,"s"],[119827,1,"t"],[119828,1,"u"],[119829,1,"v"],[119830,1,"w"],[119831,1,"x"],[119832,1,"y"],[119833,1,"z"],[119834,1,"a"],[119835,1,"b"],[119836,1,"c"],[119837,1,"d"],[119838,1,"e"],[119839,1,"f"],[119840,1,"g"],[119841,1,"h"],[119842,1,"i"],[119843,1,"j"],[119844,1,"k"],[119845,1,"l"],[119846,1,"m"],[119847,1,"n"],[119848,1,"o"],[119849,1,"p"],[119850,1,"q"],[119851,1,"r"],[119852,1,"s"],[119853,1,"t"],[119854,1,"u"],[119855,1,"v"],[119856,1,"w"],[119857,1,"x"],[119858,1,"y"],[119859,1,"z"],[119860,1,"a"],[119861,1,"b"],[119862,1,"c"],[119863,1,"d"],[119864,1,"e"],[119865,1,"f"],[119866,1,"g"],[119867,1,"h"],[119868,1,"i"],[119869,1,"j"],[119870,1,"k"],[119871,1,"l"],[119872,1,"m"],[119873,1,"n"],[119874,1,"o"],[119875,1,"p"],[119876,1,"q"],[119877,1,"r"],[119878,1,"s"],[119879,1,"t"],[119880,1,"u"],[119881,1,"v"],[119882,1,"w"],[119883,1,"x"],[119884,1,"y"],[119885,1,"z"],[119886,1,"a"],[119887,1,"b"],[119888,1,"c"],[119889,1,"d"],[119890,1,"e"],[119891,1,"f"],[119892,1,"g"],[119893,3],[119894,1,"i"],[119895,1,"j"],[119896,1,"k"],[119897,1,"l"],[119898,1,"m"],[119899,1,"n"],[119900,1,"o"],[119901,1,"p"],[119902,1,"q"],[119903,1,"r"],[119904,1,"s"],[119905,1,"t"],[119906,1,"u"],[119907,1,"v"],[119908,1,"w"],[119909,1,"x"],[119910,1,"y"],[119911,1,"z"],[119912,1,"a"],[119913,1,"b"],[119914,1,"c"],[119915,1,"d"],[119916,1,"e"],[119917,1,"f"],[119918,1,"g"],[119919,1,"h"],[119920,1,"i"],[119921,1,"j"],[119922,1,"k"],[119923,1,"l"],[119924,1,"m"],[119925,1,"n"],[119926,1,"o"],[119927,1,"p"],[119928,1,"q"],[119929,1,"r"],[119930,1,"s"],[119931,1,"t"],[119932,1,"u"],[119933,1,"v"],[119934,1,"w"],[119935,1,"x"],[119936,1,"y"],[119937,1,"z"],[119938,1,"a"],[119939,1,"b"],[119940,1,"c"],[119941,1,"d"],[119942,1,"e"],[119943,1,"f"],[119944,1,"g"],[119945,1,"h"],[119946,1,"i"],[119947,1,"j"],[119948,1,"k"],[119949,1,"l"],[119950,1,"m"],[119951,1,"n"],[119952,1,"o"],[119953,1,"p"],[119954,1,"q"],[119955,1,"r"],[119956,1,"s"],[119957,1,"t"],[119958,1,"u"],[119959,1,"v"],[119960,1,"w"],[119961,1,"x"],[119962,1,"y"],[119963,1,"z"],[119964,1,"a"],[119965,3],[119966,1,"c"],[119967,1,"d"],[[119968,119969],3],[119970,1,"g"],[[119971,119972],3],[119973,1,"j"],[119974,1,"k"],[[119975,119976],3],[119977,1,"n"],[119978,1,"o"],[119979,1,"p"],[119980,1,"q"],[119981,3],[119982,1,"s"],[119983,1,"t"],[119984,1,"u"],[119985,1,"v"],[119986,1,"w"],[119987,1,"x"],[119988,1,"y"],[119989,1,"z"],[119990,1,"a"],[119991,1,"b"],[119992,1,"c"],[119993,1,"d"],[119994,3],[119995,1,"f"],[119996,3],[119997,1,"h"],[119998,1,"i"],[119999,1,"j"],[12e4,1,"k"],[120001,1,"l"],[120002,1,"m"],[120003,1,"n"],[120004,3],[120005,1,"p"],[120006,1,"q"],[120007,1,"r"],[120008,1,"s"],[120009,1,"t"],[120010,1,"u"],[120011,1,"v"],[120012,1,"w"],[120013,1,"x"],[120014,1,"y"],[120015,1,"z"],[120016,1,"a"],[120017,1,"b"],[120018,1,"c"],[120019,1,"d"],[120020,1,"e"],[120021,1,"f"],[120022,1,"g"],[120023,1,"h"],[120024,1,"i"],[120025,1,"j"],[120026,1,"k"],[120027,1,"l"],[120028,1,"m"],[120029,1,"n"],[120030,1,"o"],[120031,1,"p"],[120032,1,"q"],[120033,1,"r"],[120034,1,"s"],[120035,1,"t"],[120036,1,"u"],[120037,1,"v"],[120038,1,"w"],[120039,1,"x"],[120040,1,"y"],[120041,1,"z"],[120042,1,"a"],[120043,1,"b"],[120044,1,"c"],[120045,1,"d"],[120046,1,"e"],[120047,1,"f"],[120048,1,"g"],[120049,1,"h"],[120050,1,"i"],[120051,1,"j"],[120052,1,"k"],[120053,1,"l"],[120054,1,"m"],[120055,1,"n"],[120056,1,"o"],[120057,1,"p"],[120058,1,"q"],[120059,1,"r"],[120060,1,"s"],[120061,1,"t"],[120062,1,"u"],[120063,1,"v"],[120064,1,"w"],[120065,1,"x"],[120066,1,"y"],[120067,1,"z"],[120068,1,"a"],[120069,1,"b"],[120070,3],[120071,1,"d"],[120072,1,"e"],[120073,1,"f"],[120074,1,"g"],[[120075,120076],3],[120077,1,"j"],[120078,1,"k"],[120079,1,"l"],[120080,1,"m"],[120081,1,"n"],[120082,1,"o"],[120083,1,"p"],[120084,1,"q"],[120085,3],[120086,1,"s"],[120087,1,"t"],[120088,1,"u"],[120089,1,"v"],[120090,1,"w"],[120091,1,"x"],[120092,1,"y"],[120093,3],[120094,1,"a"],[120095,1,"b"],[120096,1,"c"],[120097,1,"d"],[120098,1,"e"],[120099,1,"f"],[120100,1,"g"],[120101,1,"h"],[120102,1,"i"],[120103,1,"j"],[120104,1,"k"],[120105,1,"l"],[120106,1,"m"],[120107,1,"n"],[120108,1,"o"],[120109,1,"p"],[120110,1,"q"],[120111,1,"r"],[120112,1,"s"],[120113,1,"t"],[120114,1,"u"],[120115,1,"v"],[120116,1,"w"],[120117,1,"x"],[120118,1,"y"],[120119,1,"z"],[120120,1,"a"],[120121,1,"b"],[120122,3],[120123,1,"d"],[120124,1,"e"],[120125,1,"f"],[120126,1,"g"],[120127,3],[120128,1,"i"],[120129,1,"j"],[120130,1,"k"],[120131,1,"l"],[120132,1,"m"],[120133,3],[120134,1,"o"],[[120135,120137],3],[120138,1,"s"],[120139,1,"t"],[120140,1,"u"],[120141,1,"v"],[120142,1,"w"],[120143,1,"x"],[120144,1,"y"],[120145,3],[120146,1,"a"],[120147,1,"b"],[120148,1,"c"],[120149,1,"d"],[120150,1,"e"],[120151,1,"f"],[120152,1,"g"],[120153,1,"h"],[120154,1,"i"],[120155,1,"j"],[120156,1,"k"],[120157,1,"l"],[120158,1,"m"],[120159,1,"n"],[120160,1,"o"],[120161,1,"p"],[120162,1,"q"],[120163,1,"r"],[120164,1,"s"],[120165,1,"t"],[120166,1,"u"],[120167,1,"v"],[120168,1,"w"],[120169,1,"x"],[120170,1,"y"],[120171,1,"z"],[120172,1,"a"],[120173,1,"b"],[120174,1,"c"],[120175,1,"d"],[120176,1,"e"],[120177,1,"f"],[120178,1,"g"],[120179,1,"h"],[120180,1,"i"],[120181,1,"j"],[120182,1,"k"],[120183,1,"l"],[120184,1,"m"],[120185,1,"n"],[120186,1,"o"],[120187,1,"p"],[120188,1,"q"],[120189,1,"r"],[120190,1,"s"],[120191,1,"t"],[120192,1,"u"],[120193,1,"v"],[120194,1,"w"],[120195,1,"x"],[120196,1,"y"],[120197,1,"z"],[120198,1,"a"],[120199,1,"b"],[120200,1,"c"],[120201,1,"d"],[120202,1,"e"],[120203,1,"f"],[120204,1,"g"],[120205,1,"h"],[120206,1,"i"],[120207,1,"j"],[120208,1,"k"],[120209,1,"l"],[120210,1,"m"],[120211,1,"n"],[120212,1,"o"],[120213,1,"p"],[120214,1,"q"],[120215,1,"r"],[120216,1,"s"],[120217,1,"t"],[120218,1,"u"],[120219,1,"v"],[120220,1,"w"],[120221,1,"x"],[120222,1,"y"],[120223,1,"z"],[120224,1,"a"],[120225,1,"b"],[120226,1,"c"],[120227,1,"d"],[120228,1,"e"],[120229,1,"f"],[120230,1,"g"],[120231,1,"h"],[120232,1,"i"],[120233,1,"j"],[120234,1,"k"],[120235,1,"l"],[120236,1,"m"],[120237,1,"n"],[120238,1,"o"],[120239,1,"p"],[120240,1,"q"],[120241,1,"r"],[120242,1,"s"],[120243,1,"t"],[120244,1,"u"],[120245,1,"v"],[120246,1,"w"],[120247,1,"x"],[120248,1,"y"],[120249,1,"z"],[120250,1,"a"],[120251,1,"b"],[120252,1,"c"],[120253,1,"d"],[120254,1,"e"],[120255,1,"f"],[120256,1,"g"],[120257,1,"h"],[120258,1,"i"],[120259,1,"j"],[120260,1,"k"],[120261,1,"l"],[120262,1,"m"],[120263,1,"n"],[120264,1,"o"],[120265,1,"p"],[120266,1,"q"],[120267,1,"r"],[120268,1,"s"],[120269,1,"t"],[120270,1,"u"],[120271,1,"v"],[120272,1,"w"],[120273,1,"x"],[120274,1,"y"],[120275,1,"z"],[120276,1,"a"],[120277,1,"b"],[120278,1,"c"],[120279,1,"d"],[120280,1,"e"],[120281,1,"f"],[120282,1,"g"],[120283,1,"h"],[120284,1,"i"],[120285,1,"j"],[120286,1,"k"],[120287,1,"l"],[120288,1,"m"],[120289,1,"n"],[120290,1,"o"],[120291,1,"p"],[120292,1,"q"],[120293,1,"r"],[120294,1,"s"],[120295,1,"t"],[120296,1,"u"],[120297,1,"v"],[120298,1,"w"],[120299,1,"x"],[120300,1,"y"],[120301,1,"z"],[120302,1,"a"],[120303,1,"b"],[120304,1,"c"],[120305,1,"d"],[120306,1,"e"],[120307,1,"f"],[120308,1,"g"],[120309,1,"h"],[120310,1,"i"],[120311,1,"j"],[120312,1,"k"],[120313,1,"l"],[120314,1,"m"],[120315,1,"n"],[120316,1,"o"],[120317,1,"p"],[120318,1,"q"],[120319,1,"r"],[120320,1,"s"],[120321,1,"t"],[120322,1,"u"],[120323,1,"v"],[120324,1,"w"],[120325,1,"x"],[120326,1,"y"],[120327,1,"z"],[120328,1,"a"],[120329,1,"b"],[120330,1,"c"],[120331,1,"d"],[120332,1,"e"],[120333,1,"f"],[120334,1,"g"],[120335,1,"h"],[120336,1,"i"],[120337,1,"j"],[120338,1,"k"],[120339,1,"l"],[120340,1,"m"],[120341,1,"n"],[120342,1,"o"],[120343,1,"p"],[120344,1,"q"],[120345,1,"r"],[120346,1,"s"],[120347,1,"t"],[120348,1,"u"],[120349,1,"v"],[120350,1,"w"],[120351,1,"x"],[120352,1,"y"],[120353,1,"z"],[120354,1,"a"],[120355,1,"b"],[120356,1,"c"],[120357,1,"d"],[120358,1,"e"],[120359,1,"f"],[120360,1,"g"],[120361,1,"h"],[120362,1,"i"],[120363,1,"j"],[120364,1,"k"],[120365,1,"l"],[120366,1,"m"],[120367,1,"n"],[120368,1,"o"],[120369,1,"p"],[120370,1,"q"],[120371,1,"r"],[120372,1,"s"],[120373,1,"t"],[120374,1,"u"],[120375,1,"v"],[120376,1,"w"],[120377,1,"x"],[120378,1,"y"],[120379,1,"z"],[120380,1,"a"],[120381,1,"b"],[120382,1,"c"],[120383,1,"d"],[120384,1,"e"],[120385,1,"f"],[120386,1,"g"],[120387,1,"h"],[120388,1,"i"],[120389,1,"j"],[120390,1,"k"],[120391,1,"l"],[120392,1,"m"],[120393,1,"n"],[120394,1,"o"],[120395,1,"p"],[120396,1,"q"],[120397,1,"r"],[120398,1,"s"],[120399,1,"t"],[120400,1,"u"],[120401,1,"v"],[120402,1,"w"],[120403,1,"x"],[120404,1,"y"],[120405,1,"z"],[120406,1,"a"],[120407,1,"b"],[120408,1,"c"],[120409,1,"d"],[120410,1,"e"],[120411,1,"f"],[120412,1,"g"],[120413,1,"h"],[120414,1,"i"],[120415,1,"j"],[120416,1,"k"],[120417,1,"l"],[120418,1,"m"],[120419,1,"n"],[120420,1,"o"],[120421,1,"p"],[120422,1,"q"],[120423,1,"r"],[120424,1,"s"],[120425,1,"t"],[120426,1,"u"],[120427,1,"v"],[120428,1,"w"],[120429,1,"x"],[120430,1,"y"],[120431,1,"z"],[120432,1,"a"],[120433,1,"b"],[120434,1,"c"],[120435,1,"d"],[120436,1,"e"],[120437,1,"f"],[120438,1,"g"],[120439,1,"h"],[120440,1,"i"],[120441,1,"j"],[120442,1,"k"],[120443,1,"l"],[120444,1,"m"],[120445,1,"n"],[120446,1,"o"],[120447,1,"p"],[120448,1,"q"],[120449,1,"r"],[120450,1,"s"],[120451,1,"t"],[120452,1,"u"],[120453,1,"v"],[120454,1,"w"],[120455,1,"x"],[120456,1,"y"],[120457,1,"z"],[120458,1,"a"],[120459,1,"b"],[120460,1,"c"],[120461,1,"d"],[120462,1,"e"],[120463,1,"f"],[120464,1,"g"],[120465,1,"h"],[120466,1,"i"],[120467,1,"j"],[120468,1,"k"],[120469,1,"l"],[120470,1,"m"],[120471,1,"n"],[120472,1,"o"],[120473,1,"p"],[120474,1,"q"],[120475,1,"r"],[120476,1,"s"],[120477,1,"t"],[120478,1,"u"],[120479,1,"v"],[120480,1,"w"],[120481,1,"x"],[120482,1,"y"],[120483,1,"z"],[120484,1,"\u0131"],[120485,1,"\u0237"],[[120486,120487],3],[120488,1,"\u03B1"],[120489,1,"\u03B2"],[120490,1,"\u03B3"],[120491,1,"\u03B4"],[120492,1,"\u03B5"],[120493,1,"\u03B6"],[120494,1,"\u03B7"],[120495,1,"\u03B8"],[120496,1,"\u03B9"],[120497,1,"\u03BA"],[120498,1,"\u03BB"],[120499,1,"\u03BC"],[120500,1,"\u03BD"],[120501,1,"\u03BE"],[120502,1,"\u03BF"],[120503,1,"\u03C0"],[120504,1,"\u03C1"],[120505,1,"\u03B8"],[120506,1,"\u03C3"],[120507,1,"\u03C4"],[120508,1,"\u03C5"],[120509,1,"\u03C6"],[120510,1,"\u03C7"],[120511,1,"\u03C8"],[120512,1,"\u03C9"],[120513,1,"\u2207"],[120514,1,"\u03B1"],[120515,1,"\u03B2"],[120516,1,"\u03B3"],[120517,1,"\u03B4"],[120518,1,"\u03B5"],[120519,1,"\u03B6"],[120520,1,"\u03B7"],[120521,1,"\u03B8"],[120522,1,"\u03B9"],[120523,1,"\u03BA"],[120524,1,"\u03BB"],[120525,1,"\u03BC"],[120526,1,"\u03BD"],[120527,1,"\u03BE"],[120528,1,"\u03BF"],[120529,1,"\u03C0"],[120530,1,"\u03C1"],[[120531,120532],1,"\u03C3"],[120533,1,"\u03C4"],[120534,1,"\u03C5"],[120535,1,"\u03C6"],[120536,1,"\u03C7"],[120537,1,"\u03C8"],[120538,1,"\u03C9"],[120539,1,"\u2202"],[120540,1,"\u03B5"],[120541,1,"\u03B8"],[120542,1,"\u03BA"],[120543,1,"\u03C6"],[120544,1,"\u03C1"],[120545,1,"\u03C0"],[120546,1,"\u03B1"],[120547,1,"\u03B2"],[120548,1,"\u03B3"],[120549,1,"\u03B4"],[120550,1,"\u03B5"],[120551,1,"\u03B6"],[120552,1,"\u03B7"],[120553,1,"\u03B8"],[120554,1,"\u03B9"],[120555,1,"\u03BA"],[120556,1,"\u03BB"],[120557,1,"\u03BC"],[120558,1,"\u03BD"],[120559,1,"\u03BE"],[120560,1,"\u03BF"],[120561,1,"\u03C0"],[120562,1,"\u03C1"],[120563,1,"\u03B8"],[120564,1,"\u03C3"],[120565,1,"\u03C4"],[120566,1,"\u03C5"],[120567,1,"\u03C6"],[120568,1,"\u03C7"],[120569,1,"\u03C8"],[120570,1,"\u03C9"],[120571,1,"\u2207"],[120572,1,"\u03B1"],[120573,1,"\u03B2"],[120574,1,"\u03B3"],[120575,1,"\u03B4"],[120576,1,"\u03B5"],[120577,1,"\u03B6"],[120578,1,"\u03B7"],[120579,1,"\u03B8"],[120580,1,"\u03B9"],[120581,1,"\u03BA"],[120582,1,"\u03BB"],[120583,1,"\u03BC"],[120584,1,"\u03BD"],[120585,1,"\u03BE"],[120586,1,"\u03BF"],[120587,1,"\u03C0"],[120588,1,"\u03C1"],[[120589,120590],1,"\u03C3"],[120591,1,"\u03C4"],[120592,1,"\u03C5"],[120593,1,"\u03C6"],[120594,1,"\u03C7"],[120595,1,"\u03C8"],[120596,1,"\u03C9"],[120597,1,"\u2202"],[120598,1,"\u03B5"],[120599,1,"\u03B8"],[120600,1,"\u03BA"],[120601,1,"\u03C6"],[120602,1,"\u03C1"],[120603,1,"\u03C0"],[120604,1,"\u03B1"],[120605,1,"\u03B2"],[120606,1,"\u03B3"],[120607,1,"\u03B4"],[120608,1,"\u03B5"],[120609,1,"\u03B6"],[120610,1,"\u03B7"],[120611,1,"\u03B8"],[120612,1,"\u03B9"],[120613,1,"\u03BA"],[120614,1,"\u03BB"],[120615,1,"\u03BC"],[120616,1,"\u03BD"],[120617,1,"\u03BE"],[120618,1,"\u03BF"],[120619,1,"\u03C0"],[120620,1,"\u03C1"],[120621,1,"\u03B8"],[120622,1,"\u03C3"],[120623,1,"\u03C4"],[120624,1,"\u03C5"],[120625,1,"\u03C6"],[120626,1,"\u03C7"],[120627,1,"\u03C8"],[120628,1,"\u03C9"],[120629,1,"\u2207"],[120630,1,"\u03B1"],[120631,1,"\u03B2"],[120632,1,"\u03B3"],[120633,1,"\u03B4"],[120634,1,"\u03B5"],[120635,1,"\u03B6"],[120636,1,"\u03B7"],[120637,1,"\u03B8"],[120638,1,"\u03B9"],[120639,1,"\u03BA"],[120640,1,"\u03BB"],[120641,1,"\u03BC"],[120642,1,"\u03BD"],[120643,1,"\u03BE"],[120644,1,"\u03BF"],[120645,1,"\u03C0"],[120646,1,"\u03C1"],[[120647,120648],1,"\u03C3"],[120649,1,"\u03C4"],[120650,1,"\u03C5"],[120651,1,"\u03C6"],[120652,1,"\u03C7"],[120653,1,"\u03C8"],[120654,1,"\u03C9"],[120655,1,"\u2202"],[120656,1,"\u03B5"],[120657,1,"\u03B8"],[120658,1,"\u03BA"],[120659,1,"\u03C6"],[120660,1,"\u03C1"],[120661,1,"\u03C0"],[120662,1,"\u03B1"],[120663,1,"\u03B2"],[120664,1,"\u03B3"],[120665,1,"\u03B4"],[120666,1,"\u03B5"],[120667,1,"\u03B6"],[120668,1,"\u03B7"],[120669,1,"\u03B8"],[120670,1,"\u03B9"],[120671,1,"\u03BA"],[120672,1,"\u03BB"],[120673,1,"\u03BC"],[120674,1,"\u03BD"],[120675,1,"\u03BE"],[120676,1,"\u03BF"],[120677,1,"\u03C0"],[120678,1,"\u03C1"],[120679,1,"\u03B8"],[120680,1,"\u03C3"],[120681,1,"\u03C4"],[120682,1,"\u03C5"],[120683,1,"\u03C6"],[120684,1,"\u03C7"],[120685,1,"\u03C8"],[120686,1,"\u03C9"],[120687,1,"\u2207"],[120688,1,"\u03B1"],[120689,1,"\u03B2"],[120690,1,"\u03B3"],[120691,1,"\u03B4"],[120692,1,"\u03B5"],[120693,1,"\u03B6"],[120694,1,"\u03B7"],[120695,1,"\u03B8"],[120696,1,"\u03B9"],[120697,1,"\u03BA"],[120698,1,"\u03BB"],[120699,1,"\u03BC"],[120700,1,"\u03BD"],[120701,1,"\u03BE"],[120702,1,"\u03BF"],[120703,1,"\u03C0"],[120704,1,"\u03C1"],[[120705,120706],1,"\u03C3"],[120707,1,"\u03C4"],[120708,1,"\u03C5"],[120709,1,"\u03C6"],[120710,1,"\u03C7"],[120711,1,"\u03C8"],[120712,1,"\u03C9"],[120713,1,"\u2202"],[120714,1,"\u03B5"],[120715,1,"\u03B8"],[120716,1,"\u03BA"],[120717,1,"\u03C6"],[120718,1,"\u03C1"],[120719,1,"\u03C0"],[120720,1,"\u03B1"],[120721,1,"\u03B2"],[120722,1,"\u03B3"],[120723,1,"\u03B4"],[120724,1,"\u03B5"],[120725,1,"\u03B6"],[120726,1,"\u03B7"],[120727,1,"\u03B8"],[120728,1,"\u03B9"],[120729,1,"\u03BA"],[120730,1,"\u03BB"],[120731,1,"\u03BC"],[120732,1,"\u03BD"],[120733,1,"\u03BE"],[120734,1,"\u03BF"],[120735,1,"\u03C0"],[120736,1,"\u03C1"],[120737,1,"\u03B8"],[120738,1,"\u03C3"],[120739,1,"\u03C4"],[120740,1,"\u03C5"],[120741,1,"\u03C6"],[120742,1,"\u03C7"],[120743,1,"\u03C8"],[120744,1,"\u03C9"],[120745,1,"\u2207"],[120746,1,"\u03B1"],[120747,1,"\u03B2"],[120748,1,"\u03B3"],[120749,1,"\u03B4"],[120750,1,"\u03B5"],[120751,1,"\u03B6"],[120752,1,"\u03B7"],[120753,1,"\u03B8"],[120754,1,"\u03B9"],[120755,1,"\u03BA"],[120756,1,"\u03BB"],[120757,1,"\u03BC"],[120758,1,"\u03BD"],[120759,1,"\u03BE"],[120760,1,"\u03BF"],[120761,1,"\u03C0"],[120762,1,"\u03C1"],[[120763,120764],1,"\u03C3"],[120765,1,"\u03C4"],[120766,1,"\u03C5"],[120767,1,"\u03C6"],[120768,1,"\u03C7"],[120769,1,"\u03C8"],[120770,1,"\u03C9"],[120771,1,"\u2202"],[120772,1,"\u03B5"],[120773,1,"\u03B8"],[120774,1,"\u03BA"],[120775,1,"\u03C6"],[120776,1,"\u03C1"],[120777,1,"\u03C0"],[[120778,120779],1,"\u03DD"],[[120780,120781],3],[120782,1,"0"],[120783,1,"1"],[120784,1,"2"],[120785,1,"3"],[120786,1,"4"],[120787,1,"5"],[120788,1,"6"],[120789,1,"7"],[120790,1,"8"],[120791,1,"9"],[120792,1,"0"],[120793,1,"1"],[120794,1,"2"],[120795,1,"3"],[120796,1,"4"],[120797,1,"5"],[120798,1,"6"],[120799,1,"7"],[120800,1,"8"],[120801,1,"9"],[120802,1,"0"],[120803,1,"1"],[120804,1,"2"],[120805,1,"3"],[120806,1,"4"],[120807,1,"5"],[120808,1,"6"],[120809,1,"7"],[120810,1,"8"],[120811,1,"9"],[120812,1,"0"],[120813,1,"1"],[120814,1,"2"],[120815,1,"3"],[120816,1,"4"],[120817,1,"5"],[120818,1,"6"],[120819,1,"7"],[120820,1,"8"],[120821,1,"9"],[120822,1,"0"],[120823,1,"1"],[120824,1,"2"],[120825,1,"3"],[120826,1,"4"],[120827,1,"5"],[120828,1,"6"],[120829,1,"7"],[120830,1,"8"],[120831,1,"9"],[[120832,121343],2],[[121344,121398],2],[[121399,121402],2],[[121403,121452],2],[[121453,121460],2],[121461,2],[[121462,121475],2],[121476,2],[[121477,121483],2],[[121484,121498],3],[[121499,121503],2],[121504,3],[[121505,121519],2],[[121520,122623],3],[[122624,122654],2],[[122655,122660],3],[[122661,122666],2],[[122667,122879],3],[[122880,122886],2],[122887,3],[[122888,122904],2],[[122905,122906],3],[[122907,122913],2],[122914,3],[[122915,122916],2],[122917,3],[[122918,122922],2],[[122923,122927],3],[122928,1,"\u0430"],[122929,1,"\u0431"],[122930,1,"\u0432"],[122931,1,"\u0433"],[122932,1,"\u0434"],[122933,1,"\u0435"],[122934,1,"\u0436"],[122935,1,"\u0437"],[122936,1,"\u0438"],[122937,1,"\u043A"],[122938,1,"\u043B"],[122939,1,"\u043C"],[122940,1,"\u043E"],[122941,1,"\u043F"],[122942,1,"\u0440"],[122943,1,"\u0441"],[122944,1,"\u0442"],[122945,1,"\u0443"],[122946,1,"\u0444"],[122947,1,"\u0445"],[122948,1,"\u0446"],[122949,1,"\u0447"],[122950,1,"\u0448"],[122951,1,"\u044B"],[122952,1,"\u044D"],[122953,1,"\u044E"],[122954,1,"\uA689"],[122955,1,"\u04D9"],[122956,1,"\u0456"],[122957,1,"\u0458"],[122958,1,"\u04E9"],[122959,1,"\u04AF"],[122960,1,"\u04CF"],[122961,1,"\u0430"],[122962,1,"\u0431"],[122963,1,"\u0432"],[122964,1,"\u0433"],[122965,1,"\u0434"],[122966,1,"\u0435"],[122967,1,"\u0436"],[122968,1,"\u0437"],[122969,1,"\u0438"],[122970,1,"\u043A"],[122971,1,"\u043B"],[122972,1,"\u043E"],[122973,1,"\u043F"],[122974,1,"\u0441"],[122975,1,"\u0443"],[122976,1,"\u0444"],[122977,1,"\u0445"],[122978,1,"\u0446"],[122979,1,"\u0447"],[122980,1,"\u0448"],[122981,1,"\u044A"],[122982,1,"\u044B"],[122983,1,"\u0491"],[122984,1,"\u0456"],[122985,1,"\u0455"],[122986,1,"\u045F"],[122987,1,"\u04AB"],[122988,1,"\uA651"],[122989,1,"\u04B1"],[[122990,123022],3],[123023,2],[[123024,123135],3],[[123136,123180],2],[[123181,123183],3],[[123184,123197],2],[[123198,123199],3],[[123200,123209],2],[[123210,123213],3],[123214,2],[123215,2],[[123216,123535],3],[[123536,123566],2],[[123567,123583],3],[[123584,123641],2],[[123642,123646],3],[123647,2],[[123648,124111],3],[[124112,124153],2],[[124154,124895],3],[[124896,124902],2],[124903,3],[[124904,124907],2],[124908,3],[[124909,124910],2],[124911,3],[[124912,124926],2],[124927,3],[[124928,125124],2],[[125125,125126],3],[[125127,125135],2],[[125136,125142],2],[[125143,125183],3],[125184,1,"\u{1E922}"],[125185,1,"\u{1E923}"],[125186,1,"\u{1E924}"],[125187,1,"\u{1E925}"],[125188,1,"\u{1E926}"],[125189,1,"\u{1E927}"],[125190,1,"\u{1E928}"],[125191,1,"\u{1E929}"],[125192,1,"\u{1E92A}"],[125193,1,"\u{1E92B}"],[125194,1,"\u{1E92C}"],[125195,1,"\u{1E92D}"],[125196,1,"\u{1E92E}"],[125197,1,"\u{1E92F}"],[125198,1,"\u{1E930}"],[125199,1,"\u{1E931}"],[125200,1,"\u{1E932}"],[125201,1,"\u{1E933}"],[125202,1,"\u{1E934}"],[125203,1,"\u{1E935}"],[125204,1,"\u{1E936}"],[125205,1,"\u{1E937}"],[125206,1,"\u{1E938}"],[125207,1,"\u{1E939}"],[125208,1,"\u{1E93A}"],[125209,1,"\u{1E93B}"],[125210,1,"\u{1E93C}"],[125211,1,"\u{1E93D}"],[125212,1,"\u{1E93E}"],[125213,1,"\u{1E93F}"],[125214,1,"\u{1E940}"],[125215,1,"\u{1E941}"],[125216,1,"\u{1E942}"],[125217,1,"\u{1E943}"],[[125218,125258],2],[125259,2],[[125260,125263],3],[[125264,125273],2],[[125274,125277],3],[[125278,125279],2],[[125280,126064],3],[[126065,126132],2],[[126133,126208],3],[[126209,126269],2],[[126270,126463],3],[126464,1,"\u0627"],[126465,1,"\u0628"],[126466,1,"\u062C"],[126467,1,"\u062F"],[126468,3],[126469,1,"\u0648"],[126470,1,"\u0632"],[126471,1,"\u062D"],[126472,1,"\u0637"],[126473,1,"\u064A"],[126474,1,"\u0643"],[126475,1,"\u0644"],[126476,1,"\u0645"],[126477,1,"\u0646"],[126478,1,"\u0633"],[126479,1,"\u0639"],[126480,1,"\u0641"],[126481,1,"\u0635"],[126482,1,"\u0642"],[126483,1,"\u0631"],[126484,1,"\u0634"],[126485,1,"\u062A"],[126486,1,"\u062B"],[126487,1,"\u062E"],[126488,1,"\u0630"],[126489,1,"\u0636"],[126490,1,"\u0638"],[126491,1,"\u063A"],[126492,1,"\u066E"],[126493,1,"\u06BA"],[126494,1,"\u06A1"],[126495,1,"\u066F"],[126496,3],[126497,1,"\u0628"],[126498,1,"\u062C"],[126499,3],[126500,1,"\u0647"],[[126501,126502],3],[126503,1,"\u062D"],[126504,3],[126505,1,"\u064A"],[126506,1,"\u0643"],[126507,1,"\u0644"],[126508,1,"\u0645"],[126509,1,"\u0646"],[126510,1,"\u0633"],[126511,1,"\u0639"],[126512,1,"\u0641"],[126513,1,"\u0635"],[126514,1,"\u0642"],[126515,3],[126516,1,"\u0634"],[126517,1,"\u062A"],[126518,1,"\u062B"],[126519,1,"\u062E"],[126520,3],[126521,1,"\u0636"],[126522,3],[126523,1,"\u063A"],[[126524,126529],3],[126530,1,"\u062C"],[[126531,126534],3],[126535,1,"\u062D"],[126536,3],[126537,1,"\u064A"],[126538,3],[126539,1,"\u0644"],[126540,3],[126541,1,"\u0646"],[126542,1,"\u0633"],[126543,1,"\u0639"],[126544,3],[126545,1,"\u0635"],[126546,1,"\u0642"],[126547,3],[126548,1,"\u0634"],[[126549,126550],3],[126551,1,"\u062E"],[126552,3],[126553,1,"\u0636"],[126554,3],[126555,1,"\u063A"],[126556,3],[126557,1,"\u06BA"],[126558,3],[126559,1,"\u066F"],[126560,3],[126561,1,"\u0628"],[126562,1,"\u062C"],[126563,3],[126564,1,"\u0647"],[[126565,126566],3],[126567,1,"\u062D"],[126568,1,"\u0637"],[126569,1,"\u064A"],[126570,1,"\u0643"],[126571,3],[126572,1,"\u0645"],[126573,1,"\u0646"],[126574,1,"\u0633"],[126575,1,"\u0639"],[126576,1,"\u0641"],[126577,1,"\u0635"],[126578,1,"\u0642"],[126579,3],[126580,1,"\u0634"],[126581,1,"\u062A"],[126582,1,"\u062B"],[126583,1,"\u062E"],[126584,3],[126585,1,"\u0636"],[126586,1,"\u0638"],[126587,1,"\u063A"],[126588,1,"\u066E"],[126589,3],[126590,1,"\u06A1"],[126591,3],[126592,1,"\u0627"],[126593,1,"\u0628"],[126594,1,"\u062C"],[126595,1,"\u062F"],[126596,1,"\u0647"],[126597,1,"\u0648"],[126598,1,"\u0632"],[126599,1,"\u062D"],[126600,1,"\u0637"],[126601,1,"\u064A"],[126602,3],[126603,1,"\u0644"],[126604,1,"\u0645"],[126605,1,"\u0646"],[126606,1,"\u0633"],[126607,1,"\u0639"],[126608,1,"\u0641"],[126609,1,"\u0635"],[126610,1,"\u0642"],[126611,1,"\u0631"],[126612,1,"\u0634"],[126613,1,"\u062A"],[126614,1,"\u062B"],[126615,1,"\u062E"],[126616,1,"\u0630"],[126617,1,"\u0636"],[126618,1,"\u0638"],[126619,1,"\u063A"],[[126620,126624],3],[126625,1,"\u0628"],[126626,1,"\u062C"],[126627,1,"\u062F"],[126628,3],[126629,1,"\u0648"],[126630,1,"\u0632"],[126631,1,"\u062D"],[126632,1,"\u0637"],[126633,1,"\u064A"],[126634,3],[126635,1,"\u0644"],[126636,1,"\u0645"],[126637,1,"\u0646"],[126638,1,"\u0633"],[126639,1,"\u0639"],[126640,1,"\u0641"],[126641,1,"\u0635"],[126642,1,"\u0642"],[126643,1,"\u0631"],[126644,1,"\u0634"],[126645,1,"\u062A"],[126646,1,"\u062B"],[126647,1,"\u062E"],[126648,1,"\u0630"],[126649,1,"\u0636"],[126650,1,"\u0638"],[126651,1,"\u063A"],[[126652,126703],3],[[126704,126705],2],[[126706,126975],3],[[126976,127019],2],[[127020,127023],3],[[127024,127123],2],[[127124,127135],3],[[127136,127150],2],[[127151,127152],3],[[127153,127166],2],[127167,2],[127168,3],[[127169,127183],2],[127184,3],[[127185,127199],2],[[127200,127221],2],[[127222,127231],3],[127232,3],[127233,5,"0,"],[127234,5,"1,"],[127235,5,"2,"],[127236,5,"3,"],[127237,5,"4,"],[127238,5,"5,"],[127239,5,"6,"],[127240,5,"7,"],[127241,5,"8,"],[127242,5,"9,"],[[127243,127244],2],[[127245,127247],2],[127248,5,"(a)"],[127249,5,"(b)"],[127250,5,"(c)"],[127251,5,"(d)"],[127252,5,"(e)"],[127253,5,"(f)"],[127254,5,"(g)"],[127255,5,"(h)"],[127256,5,"(i)"],[127257,5,"(j)"],[127258,5,"(k)"],[127259,5,"(l)"],[127260,5,"(m)"],[127261,5,"(n)"],[127262,5,"(o)"],[127263,5,"(p)"],[127264,5,"(q)"],[127265,5,"(r)"],[127266,5,"(s)"],[127267,5,"(t)"],[127268,5,"(u)"],[127269,5,"(v)"],[127270,5,"(w)"],[127271,5,"(x)"],[127272,5,"(y)"],[127273,5,"(z)"],[127274,1,"\u3014s\u3015"],[127275,1,"c"],[127276,1,"r"],[127277,1,"cd"],[127278,1,"wz"],[127279,2],[127280,1,"a"],[127281,1,"b"],[127282,1,"c"],[127283,1,"d"],[127284,1,"e"],[127285,1,"f"],[127286,1,"g"],[127287,1,"h"],[127288,1,"i"],[127289,1,"j"],[127290,1,"k"],[127291,1,"l"],[127292,1,"m"],[127293,1,"n"],[127294,1,"o"],[127295,1,"p"],[127296,1,"q"],[127297,1,"r"],[127298,1,"s"],[127299,1,"t"],[127300,1,"u"],[127301,1,"v"],[127302,1,"w"],[127303,1,"x"],[127304,1,"y"],[127305,1,"z"],[127306,1,"hv"],[127307,1,"mv"],[127308,1,"sd"],[127309,1,"ss"],[127310,1,"ppv"],[127311,1,"wc"],[[127312,127318],2],[127319,2],[[127320,127326],2],[127327,2],[[127328,127337],2],[127338,1,"mc"],[127339,1,"md"],[127340,1,"mr"],[[127341,127343],2],[[127344,127352],2],[127353,2],[127354,2],[[127355,127356],2],[[127357,127358],2],[127359,2],[[127360,127369],2],[[127370,127373],2],[[127374,127375],2],[127376,1,"dj"],[[127377,127386],2],[[127387,127404],2],[127405,2],[[127406,127461],3],[[127462,127487],2],[127488,1,"\u307B\u304B"],[127489,1,"\u30B3\u30B3"],[127490,1,"\u30B5"],[[127491,127503],3],[127504,1,"\u624B"],[127505,1,"\u5B57"],[127506,1,"\u53CC"],[127507,1,"\u30C7"],[127508,1,"\u4E8C"],[127509,1,"\u591A"],[127510,1,"\u89E3"],[127511,1,"\u5929"],[127512,1,"\u4EA4"],[127513,1,"\u6620"],[127514,1,"\u7121"],[127515,1,"\u6599"],[127516,1,"\u524D"],[127517,1,"\u5F8C"],[127518,1,"\u518D"],[127519,1,"\u65B0"],[127520,1,"\u521D"],[127521,1,"\u7D42"],[127522,1,"\u751F"],[127523,1,"\u8CA9"],[127524,1,"\u58F0"],[127525,1,"\u5439"],[127526,1,"\u6F14"],[127527,1,"\u6295"],[127528,1,"\u6355"],[127529,1,"\u4E00"],[127530,1,"\u4E09"],[127531,1,"\u904A"],[127532,1,"\u5DE6"],[127533,1,"\u4E2D"],[127534,1,"\u53F3"],[127535,1,"\u6307"],[127536,1,"\u8D70"],[127537,1,"\u6253"],[127538,1,"\u7981"],[127539,1,"\u7A7A"],[127540,1,"\u5408"],[127541,1,"\u6E80"],[127542,1,"\u6709"],[127543,1,"\u6708"],[127544,1,"\u7533"],[127545,1,"\u5272"],[127546,1,"\u55B6"],[127547,1,"\u914D"],[[127548,127551],3],[127552,1,"\u3014\u672C\u3015"],[127553,1,"\u3014\u4E09\u3015"],[127554,1,"\u3014\u4E8C\u3015"],[127555,1,"\u3014\u5B89\u3015"],[127556,1,"\u3014\u70B9\u3015"],[127557,1,"\u3014\u6253\u3015"],[127558,1,"\u3014\u76D7\u3015"],[127559,1,"\u3014\u52DD\u3015"],[127560,1,"\u3014\u6557\u3015"],[[127561,127567],3],[127568,1,"\u5F97"],[127569,1,"\u53EF"],[[127570,127583],3],[[127584,127589],2],[[127590,127743],3],[[127744,127776],2],[[127777,127788],2],[[127789,127791],2],[[127792,127797],2],[127798,2],[[127799,127868],2],[127869,2],[[127870,127871],2],[[127872,127891],2],[[127892,127903],2],[[127904,127940],2],[127941,2],[[127942,127946],2],[[127947,127950],2],[[127951,127955],2],[[127956,127967],2],[[127968,127984],2],[[127985,127991],2],[[127992,127999],2],[[128e3,128062],2],[128063,2],[128064,2],[128065,2],[[128066,128247],2],[128248,2],[[128249,128252],2],[[128253,128254],2],[128255,2],[[128256,128317],2],[[128318,128319],2],[[128320,128323],2],[[128324,128330],2],[[128331,128335],2],[[128336,128359],2],[[128360,128377],2],[128378,2],[[128379,128419],2],[128420,2],[[128421,128506],2],[[128507,128511],2],[128512,2],[[128513,128528],2],[128529,2],[[128530,128532],2],[128533,2],[128534,2],[128535,2],[128536,2],[128537,2],[128538,2],[128539,2],[[128540,128542],2],[128543,2],[[128544,128549],2],[[128550,128551],2],[[128552,128555],2],[128556,2],[128557,2],[[128558,128559],2],[[128560,128563],2],[128564,2],[[128565,128576],2],[[128577,128578],2],[[128579,128580],2],[[128581,128591],2],[[128592,128639],2],[[128640,128709],2],[[128710,128719],2],[128720,2],[[128721,128722],2],[[128723,128724],2],[128725,2],[[128726,128727],2],[[128728,128731],3],[128732,2],[[128733,128735],2],[[128736,128748],2],[[128749,128751],3],[[128752,128755],2],[[128756,128758],2],[[128759,128760],2],[128761,2],[128762,2],[[128763,128764],2],[[128765,128767],3],[[128768,128883],2],[[128884,128886],2],[[128887,128890],3],[[128891,128895],2],[[128896,128980],2],[[128981,128984],2],[128985,2],[[128986,128991],3],[[128992,129003],2],[[129004,129007],3],[129008,2],[[129009,129023],3],[[129024,129035],2],[[129036,129039],3],[[129040,129095],2],[[129096,129103],3],[[129104,129113],2],[[129114,129119],3],[[129120,129159],2],[[129160,129167],3],[[129168,129197],2],[[129198,129199],3],[[129200,129201],2],[[129202,129279],3],[[129280,129291],2],[129292,2],[[129293,129295],2],[[129296,129304],2],[[129305,129310],2],[129311,2],[[129312,129319],2],[[129320,129327],2],[129328,2],[[129329,129330],2],[[129331,129342],2],[129343,2],[[129344,129355],2],[129356,2],[[129357,129359],2],[[129360,129374],2],[[129375,129387],2],[[129388,129392],2],[129393,2],[129394,2],[[129395,129398],2],[[129399,129400],2],[129401,2],[129402,2],[129403,2],[[129404,129407],2],[[129408,129412],2],[[129413,129425],2],[[129426,129431],2],[[129432,129442],2],[[129443,129444],2],[[129445,129450],2],[[129451,129453],2],[[129454,129455],2],[[129456,129465],2],[[129466,129471],2],[129472,2],[[129473,129474],2],[[129475,129482],2],[129483,2],[129484,2],[[129485,129487],2],[[129488,129510],2],[[129511,129535],2],[[129536,129619],2],[[129620,129631],3],[[129632,129645],2],[[129646,129647],3],[[129648,129651],2],[129652,2],[[129653,129655],2],[[129656,129658],2],[[129659,129660],2],[[129661,129663],3],[[129664,129666],2],[[129667,129670],2],[[129671,129672],2],[[129673,129679],3],[[129680,129685],2],[[129686,129704],2],[[129705,129708],2],[[129709,129711],2],[[129712,129718],2],[[129719,129722],2],[[129723,129725],2],[129726,3],[129727,2],[[129728,129730],2],[[129731,129733],2],[[129734,129741],3],[[129742,129743],2],[[129744,129750],2],[[129751,129753],2],[[129754,129755],2],[[129756,129759],3],[[129760,129767],2],[129768,2],[[129769,129775],3],[[129776,129782],2],[[129783,129784],2],[[129785,129791],3],[[129792,129938],2],[129939,3],[[129940,129994],2],[[129995,130031],3],[130032,1,"0"],[130033,1,"1"],[130034,1,"2"],[130035,1,"3"],[130036,1,"4"],[130037,1,"5"],[130038,1,"6"],[130039,1,"7"],[130040,1,"8"],[130041,1,"9"],[[130042,131069],3],[[131070,131071],3],[[131072,173782],2],[[173783,173789],2],[[173790,173791],2],[[173792,173823],3],[[173824,177972],2],[[177973,177976],2],[177977,2],[[177978,177983],3],[[177984,178205],2],[[178206,178207],3],[[178208,183969],2],[[183970,183983],3],[[183984,191456],2],[[191457,194559],3],[194560,1,"\u4E3D"],[194561,1,"\u4E38"],[194562,1,"\u4E41"],[194563,1,"\u{20122}"],[194564,1,"\u4F60"],[194565,1,"\u4FAE"],[194566,1,"\u4FBB"],[194567,1,"\u5002"],[194568,1,"\u507A"],[194569,1,"\u5099"],[194570,1,"\u50E7"],[194571,1,"\u50CF"],[194572,1,"\u349E"],[194573,1,"\u{2063A}"],[194574,1,"\u514D"],[194575,1,"\u5154"],[194576,1,"\u5164"],[194577,1,"\u5177"],[194578,1,"\u{2051C}"],[194579,1,"\u34B9"],[194580,1,"\u5167"],[194581,1,"\u518D"],[194582,1,"\u{2054B}"],[194583,1,"\u5197"],[194584,1,"\u51A4"],[194585,1,"\u4ECC"],[194586,1,"\u51AC"],[194587,1,"\u51B5"],[194588,1,"\u{291DF}"],[194589,1,"\u51F5"],[194590,1,"\u5203"],[194591,1,"\u34DF"],[194592,1,"\u523B"],[194593,1,"\u5246"],[194594,1,"\u5272"],[194595,1,"\u5277"],[194596,1,"\u3515"],[194597,1,"\u52C7"],[194598,1,"\u52C9"],[194599,1,"\u52E4"],[194600,1,"\u52FA"],[194601,1,"\u5305"],[194602,1,"\u5306"],[194603,1,"\u5317"],[194604,1,"\u5349"],[194605,1,"\u5351"],[194606,1,"\u535A"],[194607,1,"\u5373"],[194608,1,"\u537D"],[[194609,194611],1,"\u537F"],[194612,1,"\u{20A2C}"],[194613,1,"\u7070"],[194614,1,"\u53CA"],[194615,1,"\u53DF"],[194616,1,"\u{20B63}"],[194617,1,"\u53EB"],[194618,1,"\u53F1"],[194619,1,"\u5406"],[194620,1,"\u549E"],[194621,1,"\u5438"],[194622,1,"\u5448"],[194623,1,"\u5468"],[194624,1,"\u54A2"],[194625,1,"\u54F6"],[194626,1,"\u5510"],[194627,1,"\u5553"],[194628,1,"\u5563"],[[194629,194630],1,"\u5584"],[194631,1,"\u5599"],[194632,1,"\u55AB"],[194633,1,"\u55B3"],[194634,1,"\u55C2"],[194635,1,"\u5716"],[194636,1,"\u5606"],[194637,1,"\u5717"],[194638,1,"\u5651"],[194639,1,"\u5674"],[194640,1,"\u5207"],[194641,1,"\u58EE"],[194642,1,"\u57CE"],[194643,1,"\u57F4"],[194644,1,"\u580D"],[194645,1,"\u578B"],[194646,1,"\u5832"],[194647,1,"\u5831"],[194648,1,"\u58AC"],[194649,1,"\u{214E4}"],[194650,1,"\u58F2"],[194651,1,"\u58F7"],[194652,1,"\u5906"],[194653,1,"\u591A"],[194654,1,"\u5922"],[194655,1,"\u5962"],[194656,1,"\u{216A8}"],[194657,1,"\u{216EA}"],[194658,1,"\u59EC"],[194659,1,"\u5A1B"],[194660,1,"\u5A27"],[194661,1,"\u59D8"],[194662,1,"\u5A66"],[194663,1,"\u36EE"],[194664,3],[194665,1,"\u5B08"],[[194666,194667],1,"\u5B3E"],[194668,1,"\u{219C8}"],[194669,1,"\u5BC3"],[194670,1,"\u5BD8"],[194671,1,"\u5BE7"],[194672,1,"\u5BF3"],[194673,1,"\u{21B18}"],[194674,1,"\u5BFF"],[194675,1,"\u5C06"],[194676,3],[194677,1,"\u5C22"],[194678,1,"\u3781"],[194679,1,"\u5C60"],[194680,1,"\u5C6E"],[194681,1,"\u5CC0"],[194682,1,"\u5C8D"],[194683,1,"\u{21DE4}"],[194684,1,"\u5D43"],[194685,1,"\u{21DE6}"],[194686,1,"\u5D6E"],[194687,1,"\u5D6B"],[194688,1,"\u5D7C"],[194689,1,"\u5DE1"],[194690,1,"\u5DE2"],[194691,1,"\u382F"],[194692,1,"\u5DFD"],[194693,1,"\u5E28"],[194694,1,"\u5E3D"],[194695,1,"\u5E69"],[194696,1,"\u3862"],[194697,1,"\u{22183}"],[194698,1,"\u387C"],[194699,1,"\u5EB0"],[194700,1,"\u5EB3"],[194701,1,"\u5EB6"],[194702,1,"\u5ECA"],[194703,1,"\u{2A392}"],[194704,1,"\u5EFE"],[[194705,194706],1,"\u{22331}"],[194707,1,"\u8201"],[[194708,194709],1,"\u5F22"],[194710,1,"\u38C7"],[194711,1,"\u{232B8}"],[194712,1,"\u{261DA}"],[194713,1,"\u5F62"],[194714,1,"\u5F6B"],[194715,1,"\u38E3"],[194716,1,"\u5F9A"],[194717,1,"\u5FCD"],[194718,1,"\u5FD7"],[194719,1,"\u5FF9"],[194720,1,"\u6081"],[194721,1,"\u393A"],[194722,1,"\u391C"],[194723,1,"\u6094"],[194724,1,"\u{226D4}"],[194725,1,"\u60C7"],[194726,1,"\u6148"],[194727,1,"\u614C"],[194728,1,"\u614E"],[194729,1,"\u614C"],[194730,1,"\u617A"],[194731,1,"\u618E"],[194732,1,"\u61B2"],[194733,1,"\u61A4"],[194734,1,"\u61AF"],[194735,1,"\u61DE"],[194736,1,"\u61F2"],[194737,1,"\u61F6"],[194738,1,"\u6210"],[194739,1,"\u621B"],[194740,1,"\u625D"],[194741,1,"\u62B1"],[194742,1,"\u62D4"],[194743,1,"\u6350"],[194744,1,"\u{22B0C}"],[194745,1,"\u633D"],[194746,1,"\u62FC"],[194747,1,"\u6368"],[194748,1,"\u6383"],[194749,1,"\u63E4"],[194750,1,"\u{22BF1}"],[194751,1,"\u6422"],[194752,1,"\u63C5"],[194753,1,"\u63A9"],[194754,1,"\u3A2E"],[194755,1,"\u6469"],[194756,1,"\u647E"],[194757,1,"\u649D"],[194758,1,"\u6477"],[194759,1,"\u3A6C"],[194760,1,"\u654F"],[194761,1,"\u656C"],[194762,1,"\u{2300A}"],[194763,1,"\u65E3"],[194764,1,"\u66F8"],[194765,1,"\u6649"],[194766,1,"\u3B19"],[194767,1,"\u6691"],[194768,1,"\u3B08"],[194769,1,"\u3AE4"],[194770,1,"\u5192"],[194771,1,"\u5195"],[194772,1,"\u6700"],[194773,1,"\u669C"],[194774,1,"\u80AD"],[194775,1,"\u43D9"],[194776,1,"\u6717"],[194777,1,"\u671B"],[194778,1,"\u6721"],[194779,1,"\u675E"],[194780,1,"\u6753"],[194781,1,"\u{233C3}"],[194782,1,"\u3B49"],[194783,1,"\u67FA"],[194784,1,"\u6785"],[194785,1,"\u6852"],[194786,1,"\u6885"],[194787,1,"\u{2346D}"],[194788,1,"\u688E"],[194789,1,"\u681F"],[194790,1,"\u6914"],[194791,1,"\u3B9D"],[194792,1,"\u6942"],[194793,1,"\u69A3"],[194794,1,"\u69EA"],[194795,1,"\u6AA8"],[194796,1,"\u{236A3}"],[194797,1,"\u6ADB"],[194798,1,"\u3C18"],[194799,1,"\u6B21"],[194800,1,"\u{238A7}"],[194801,1,"\u6B54"],[194802,1,"\u3C4E"],[194803,1,"\u6B72"],[194804,1,"\u6B9F"],[194805,1,"\u6BBA"],[194806,1,"\u6BBB"],[194807,1,"\u{23A8D}"],[194808,1,"\u{21D0B}"],[194809,1,"\u{23AFA}"],[194810,1,"\u6C4E"],[194811,1,"\u{23CBC}"],[194812,1,"\u6CBF"],[194813,1,"\u6CCD"],[194814,1,"\u6C67"],[194815,1,"\u6D16"],[194816,1,"\u6D3E"],[194817,1,"\u6D77"],[194818,1,"\u6D41"],[194819,1,"\u6D69"],[194820,1,"\u6D78"],[194821,1,"\u6D85"],[194822,1,"\u{23D1E}"],[194823,1,"\u6D34"],[194824,1,"\u6E2F"],[194825,1,"\u6E6E"],[194826,1,"\u3D33"],[194827,1,"\u6ECB"],[194828,1,"\u6EC7"],[194829,1,"\u{23ED1}"],[194830,1,"\u6DF9"],[194831,1,"\u6F6E"],[194832,1,"\u{23F5E}"],[194833,1,"\u{23F8E}"],[194834,1,"\u6FC6"],[194835,1,"\u7039"],[194836,1,"\u701E"],[194837,1,"\u701B"],[194838,1,"\u3D96"],[194839,1,"\u704A"],[194840,1,"\u707D"],[194841,1,"\u7077"],[194842,1,"\u70AD"],[194843,1,"\u{20525}"],[194844,1,"\u7145"],[194845,1,"\u{24263}"],[194846,1,"\u719C"],[194847,3],[194848,1,"\u7228"],[194849,1,"\u7235"],[194850,1,"\u7250"],[194851,1,"\u{24608}"],[194852,1,"\u7280"],[194853,1,"\u7295"],[194854,1,"\u{24735}"],[194855,1,"\u{24814}"],[194856,1,"\u737A"],[194857,1,"\u738B"],[194858,1,"\u3EAC"],[194859,1,"\u73A5"],[[194860,194861],1,"\u3EB8"],[194862,1,"\u7447"],[194863,1,"\u745C"],[194864,1,"\u7471"],[194865,1,"\u7485"],[194866,1,"\u74CA"],[194867,1,"\u3F1B"],[194868,1,"\u7524"],[194869,1,"\u{24C36}"],[194870,1,"\u753E"],[194871,1,"\u{24C92}"],[194872,1,"\u7570"],[194873,1,"\u{2219F}"],[194874,1,"\u7610"],[194875,1,"\u{24FA1}"],[194876,1,"\u{24FB8}"],[194877,1,"\u{25044}"],[194878,1,"\u3FFC"],[194879,1,"\u4008"],[194880,1,"\u76F4"],[194881,1,"\u{250F3}"],[194882,1,"\u{250F2}"],[194883,1,"\u{25119}"],[194884,1,"\u{25133}"],[194885,1,"\u771E"],[[194886,194887],1,"\u771F"],[194888,1,"\u774A"],[194889,1,"\u4039"],[194890,1,"\u778B"],[194891,1,"\u4046"],[194892,1,"\u4096"],[194893,1,"\u{2541D}"],[194894,1,"\u784E"],[194895,1,"\u788C"],[194896,1,"\u78CC"],[194897,1,"\u40E3"],[194898,1,"\u{25626}"],[194899,1,"\u7956"],[194900,1,"\u{2569A}"],[194901,1,"\u{256C5}"],[194902,1,"\u798F"],[194903,1,"\u79EB"],[194904,1,"\u412F"],[194905,1,"\u7A40"],[194906,1,"\u7A4A"],[194907,1,"\u7A4F"],[194908,1,"\u{2597C}"],[[194909,194910],1,"\u{25AA7}"],[194911,3],[194912,1,"\u4202"],[194913,1,"\u{25BAB}"],[194914,1,"\u7BC6"],[194915,1,"\u7BC9"],[194916,1,"\u4227"],[194917,1,"\u{25C80}"],[194918,1,"\u7CD2"],[194919,1,"\u42A0"],[194920,1,"\u7CE8"],[194921,1,"\u7CE3"],[194922,1,"\u7D00"],[194923,1,"\u{25F86}"],[194924,1,"\u7D63"],[194925,1,"\u4301"],[194926,1,"\u7DC7"],[194927,1,"\u7E02"],[194928,1,"\u7E45"],[194929,1,"\u4334"],[194930,1,"\u{26228}"],[194931,1,"\u{26247}"],[194932,1,"\u4359"],[194933,1,"\u{262D9}"],[194934,1,"\u7F7A"],[194935,1,"\u{2633E}"],[194936,1,"\u7F95"],[194937,1,"\u7FFA"],[194938,1,"\u8005"],[194939,1,"\u{264DA}"],[194940,1,"\u{26523}"],[194941,1,"\u8060"],[194942,1,"\u{265A8}"],[194943,1,"\u8070"],[194944,1,"\u{2335F}"],[194945,1,"\u43D5"],[194946,1,"\u80B2"],[194947,1,"\u8103"],[194948,1,"\u440B"],[194949,1,"\u813E"],[194950,1,"\u5AB5"],[194951,1,"\u{267A7}"],[194952,1,"\u{267B5}"],[194953,1,"\u{23393}"],[194954,1,"\u{2339C}"],[194955,1,"\u8201"],[194956,1,"\u8204"],[194957,1,"\u8F9E"],[194958,1,"\u446B"],[194959,1,"\u8291"],[194960,1,"\u828B"],[194961,1,"\u829D"],[194962,1,"\u52B3"],[194963,1,"\u82B1"],[194964,1,"\u82B3"],[194965,1,"\u82BD"],[194966,1,"\u82E6"],[194967,1,"\u{26B3C}"],[194968,1,"\u82E5"],[194969,1,"\u831D"],[194970,1,"\u8363"],[194971,1,"\u83AD"],[194972,1,"\u8323"],[194973,1,"\u83BD"],[194974,1,"\u83E7"],[194975,1,"\u8457"],[194976,1,"\u8353"],[194977,1,"\u83CA"],[194978,1,"\u83CC"],[194979,1,"\u83DC"],[194980,1,"\u{26C36}"],[194981,1,"\u{26D6B}"],[194982,1,"\u{26CD5}"],[194983,1,"\u452B"],[194984,1,"\u84F1"],[194985,1,"\u84F3"],[194986,1,"\u8516"],[194987,1,"\u{273CA}"],[194988,1,"\u8564"],[194989,1,"\u{26F2C}"],[194990,1,"\u455D"],[194991,1,"\u4561"],[194992,1,"\u{26FB1}"],[194993,1,"\u{270D2}"],[194994,1,"\u456B"],[194995,1,"\u8650"],[194996,1,"\u865C"],[194997,1,"\u8667"],[194998,1,"\u8669"],[194999,1,"\u86A9"],[195e3,1,"\u8688"],[195001,1,"\u870E"],[195002,1,"\u86E2"],[195003,1,"\u8779"],[195004,1,"\u8728"],[195005,1,"\u876B"],[195006,1,"\u8786"],[195007,3],[195008,1,"\u87E1"],[195009,1,"\u8801"],[195010,1,"\u45F9"],[195011,1,"\u8860"],[195012,1,"\u8863"],[195013,1,"\u{27667}"],[195014,1,"\u88D7"],[195015,1,"\u88DE"],[195016,1,"\u4635"],[195017,1,"\u88FA"],[195018,1,"\u34BB"],[195019,1,"\u{278AE}"],[195020,1,"\u{27966}"],[195021,1,"\u46BE"],[195022,1,"\u46C7"],[195023,1,"\u8AA0"],[195024,1,"\u8AED"],[195025,1,"\u8B8A"],[195026,1,"\u8C55"],[195027,1,"\u{27CA8}"],[195028,1,"\u8CAB"],[195029,1,"\u8CC1"],[195030,1,"\u8D1B"],[195031,1,"\u8D77"],[195032,1,"\u{27F2F}"],[195033,1,"\u{20804}"],[195034,1,"\u8DCB"],[195035,1,"\u8DBC"],[195036,1,"\u8DF0"],[195037,1,"\u{208DE}"],[195038,1,"\u8ED4"],[195039,1,"\u8F38"],[195040,1,"\u{285D2}"],[195041,1,"\u{285ED}"],[195042,1,"\u9094"],[195043,1,"\u90F1"],[195044,1,"\u9111"],[195045,1,"\u{2872E}"],[195046,1,"\u911B"],[195047,1,"\u9238"],[195048,1,"\u92D7"],[195049,1,"\u92D8"],[195050,1,"\u927C"],[195051,1,"\u93F9"],[195052,1,"\u9415"],[195053,1,"\u{28BFA}"],[195054,1,"\u958B"],[195055,1,"\u4995"],[195056,1,"\u95B7"],[195057,1,"\u{28D77}"],[195058,1,"\u49E6"],[195059,1,"\u96C3"],[195060,1,"\u5DB2"],[195061,1,"\u9723"],[195062,1,"\u{29145}"],[195063,1,"\u{2921A}"],[195064,1,"\u4A6E"],[195065,1,"\u4A76"],[195066,1,"\u97E0"],[195067,1,"\u{2940A}"],[195068,1,"\u4AB2"],[195069,1,"\u{29496}"],[[195070,195071],1,"\u980B"],[195072,1,"\u9829"],[195073,1,"\u{295B6}"],[195074,1,"\u98E2"],[195075,1,"\u4B33"],[195076,1,"\u9929"],[195077,1,"\u99A7"],[195078,1,"\u99C2"],[195079,1,"\u99FE"],[195080,1,"\u4BCE"],[195081,1,"\u{29B30}"],[195082,1,"\u9B12"],[195083,1,"\u9C40"],[195084,1,"\u9CFD"],[195085,1,"\u4CCE"],[195086,1,"\u4CED"],[195087,1,"\u9D67"],[195088,1,"\u{2A0CE}"],[195089,1,"\u4CF8"],[195090,1,"\u{2A105}"],[195091,1,"\u{2A20E}"],[195092,1,"\u{2A291}"],[195093,1,"\u9EBB"],[195094,1,"\u4D56"],[195095,1,"\u9EF9"],[195096,1,"\u9EFE"],[195097,1,"\u9F05"],[195098,1,"\u9F0F"],[195099,1,"\u9F16"],[195100,1,"\u9F3B"],[195101,1,"\u{2A600}"],[[195102,196605],3],[[196606,196607],3],[[196608,201546],2],[[201547,201551],3],[[201552,205743],2],[[205744,262141],3],[[262142,262143],3],[[262144,327677],3],[[327678,327679],3],[[327680,393213],3],[[393214,393215],3],[[393216,458749],3],[[458750,458751],3],[[458752,524285],3],[[524286,524287],3],[[524288,589821],3],[[589822,589823],3],[[589824,655357],3],[[655358,655359],3],[[655360,720893],3],[[720894,720895],3],[[720896,786429],3],[[786430,786431],3],[[786432,851965],3],[[851966,851967],3],[[851968,917501],3],[[917502,917503],3],[917504,3],[917505,3],[[917506,917535],3],[[917536,917631],3],[[917632,917759],3],[[917760,917999],7],[[918e3,983037],3],[[983038,983039],3],[[983040,1048573],3],[[1048574,1048575],3],[[1048576,1114109],3],[[1114110,1114111],3]]}),Si=J((e,u)=>{"use strict";u.exports.STATUS_MAPPING={mapped:1,valid:2,disallowed:3,disallowed_STD3_valid:4,disallowed_STD3_mapped:5,deviation:6,ignored:7}}),Bi=J((e,u)=>{"use strict";var d=(Ci(),Xo(Fn)),h=gi(),a=yi(),{STATUS_MAPPING:l}=Si();function i(c){return/[^\x00-\x7F]/u.test(c)}function p(c,{useSTD3ASCIIRules:b}){let f=0,O=a.length-1;for(;f<=O;){let F=Math.floor((f+O)/2),y=a[F],g=Array.isArray(y[0])?y[0][0]:y[0],T=Array.isArray(y[0])?y[0][1]:y[0];if(g<=c&&T>=c)return b&&(y[1]===l.disallowed_STD3_valid||y[1]===l.disallowed_STD3_mapped)?[l.disallowed,...y.slice(2)]:y[1]===l.disallowed_STD3_valid?[l.valid,...y.slice(2)]:y[1]===l.disallowed_STD3_mapped?[l.mapped,...y.slice(2)]:y.slice(1);g>c?O=F-1:f=F+1}return null}function A(c,{useSTD3ASCIIRules:b,processingOption:f}){let O=!1,F="";for(let y of c){let[g,T]=p(y.codePointAt(0),{useSTD3ASCIIRules:b});switch(g){case l.disallowed:O=!0,F+=y;break;case l.ignored:break;case l.mapped:F+=T;break;case l.deviation:f==="transitional"?F+=T:F+=y;break;case l.valid:F+=y;break}}return{string:F,error:O}}function o(c,{checkHyphens:b,checkBidi:f,checkJoiners:O,processingOption:F,useSTD3ASCIIRules:y}){if(c.normalize("NFC")!==c)return!1;let g=Array.from(c);if(b&&(g[2]==="-"&&g[3]==="-"||c.startsWith("-")||c.endsWith("-"))||c.includes(".")||g.length>0&&h.combiningMarks.test(g[0]))return!1;for(let T of g){let[D]=p(T.codePointAt(0),{useSTD3ASCIIRules:y});if(F==="transitional"&&D!==l.valid||F==="nontransitional"&&D!==l.valid&&D!==l.deviation)return!1}if(O){let T=0;for(let[D,N]of g.entries())if(N==="\u200C"||N==="\u200D"){if(D>0){if(h.combiningClassVirama.test(g[D-1]))continue;if(N==="\u200C"){let _=g.indexOf("\u200C",D+1),R=_<0?g.slice(T):g.slice(T,_);if(h.validZWNJ.test(R.join(""))){T=D+1;continue}}}return!1}}if(f&&g.length>0){let T;if(h.bidiS1LTR.test(g[0]))T=!1;else if(h.bidiS1RTL.test(g[0]))T=!0;else return!1;if(T){if(!h.bidiS2.test(c)||!h.bidiS3.test(c)||h.bidiS4EN.test(c)&&h.bidiS4AN.test(c))return!1}else if(!h.bidiS5.test(c)||!h.bidiS6.test(c))return!1}return!0}function n(c){let b=c.map(f=>{if(f.startsWith("xn--"))try{return d.decode(f.substring(4))}catch{return""}return f}).join(".");return h.bidiDomain.test(b)}function r(c,b){let{processingOption:f}=b,{string:O,error:F}=A(c,b);O=O.normalize("NFC");let y=O.split("."),g=n(y);for(let[T,D]of y.entries()){let N=D,_=f;if(N.startsWith("xn--")){try{N=d.decode(N.substring(4)),y[T]=N}catch{F=!0;continue}_="nontransitional"}F||o(N,{...b,processingOption:_,checkBidi:b.checkBidi&&g})||(F=!0)}return{string:y.join("."),error:F}}function E(c,{checkHyphens:b=!1,checkBidi:f=!1,checkJoiners:O=!1,useSTD3ASCIIRules:F=!1,processingOption:y="nontransitional",verifyDNSLength:g=!1}={}){if(y!=="transitional"&&y!=="nontransitional")throw new RangeError("processingOption must be either transitional or nontransitional");let T=r(c,{processingOption:y,checkHyphens:b,checkBidi:f,checkJoiners:O,useSTD3ASCIIRules:F}),D=T.string.split(".");if(D=D.map(N=>{if(i(N))try{return`xn--${d.encode(N)}`}catch{T.error=!0}return N}),g){let N=D.join(".").length;(N>253||N===0)&&(T.error=!0);for(let _=0;_<D.length;++_)if(D[_].length>63||D[_].length===0){T.error=!0;break}}return T.error?null:D.join(".")}function m(c,{checkHyphens:b=!1,checkBidi:f=!1,checkJoiners:O=!1,useSTD3ASCIIRules:F=!1,processingOption:y="nontransitional"}={}){let g=r(c,{processingOption:y,checkHyphens:b,checkBidi:f,checkJoiners:O,useSTD3ASCIIRules:F});return{domain:g.string,error:g.error}}u.exports={toASCII:E,toUnicode:m}}),Nn=J((e,u)=>{"use strict";function d(i){return i>=48&&i<=57}function h(i){return i>=65&&i<=90||i>=97&&i<=122}function a(i){return h(i)||d(i)}function l(i){return d(i)||i>=65&&i<=70||i>=97&&i<=102}u.exports={isASCIIDigit:d,isASCIIAlpha:h,isASCIIAlphanumeric:a,isASCIIHex:l}}),Qu=J((e,u)=>{"use strict";var d=new TextEncoder,h=new TextDecoder("utf-8",{ignoreBOM:!0});function a(i){return d.encode(i)}function l(i){return h.decode(i)}u.exports={utf8Encode:a,utf8DecodeWithoutBOM:l}}),e1=J((e,u)=>{"use strict";var{isASCIIHex:d}=Nn(),{utf8Encode:h}=Qu();function a(R){return R.codePointAt(0)}function l(R){let j=R.toString(16).toUpperCase();return j.length===1&&(j=`0${j}`),`%${j}`}function i(R){let j=new Uint8Array(R.byteLength),L=0;for(let I=0;I<R.byteLength;++I){let M=R[I];if(M!==37)j[L++]=M;else if(M===37&&(!d(R[I+1])||!d(R[I+2])))j[L++]=M;else{let S=parseInt(String.fromCodePoint(R[I+1],R[I+2]),16);j[L++]=S,I+=2}}return j.slice(0,L)}function p(R){let j=h(R);return i(j)}function A(R){return R<=31||R>126}var o=new Set([a(" "),a('"'),a("<"),a(">"),a("`")]);function n(R){return A(R)||o.has(R)}var r=new Set([a(" "),a('"'),a("#"),a("<"),a(">")]);function E(R){return A(R)||r.has(R)}function m(R){return E(R)||R===a("'")}var c=new Set([a("?"),a("`"),a("{"),a("}")]);function b(R){return E(R)||c.has(R)}var f=new Set([a("/"),a(":"),a(";"),a("="),a("@"),a("["),a("\\"),a("]"),a("^"),a("|")]);function O(R){return b(R)||f.has(R)}var F=new Set([a("$"),a("%"),a("&"),a("+"),a(",")]);function y(R){return O(R)||F.has(R)}var g=new Set([a("!"),a("'"),a("("),a(")"),a("~")]);function T(R){return y(R)||g.has(R)}function D(R,j){let L=h(R),I="";for(let M of L)j(M)?I+=l(M):I+=String.fromCharCode(M);return I}function N(R,j){return D(String.fromCodePoint(R),j)}function _(R,j,L=!1){let I="";for(let M of R)L&&M===" "?I+="+":I+=D(M,j);return I}u.exports={isC0ControlPercentEncode:A,isFragmentPercentEncode:n,isQueryPercentEncode:E,isSpecialQueryPercentEncode:m,isPathPercentEncode:b,isUserinfoPercentEncode:O,isURLEncodedPercentEncode:T,percentDecodeString:p,percentDecodeBytes:i,utf8PercentEncodeString:_,utf8PercentEncodeCodePoint:N}}),Rn=J((e,u)=>{"use strict";var d=Bi(),h=Nn(),{utf8DecodeWithoutBOM:a}=Qu(),{percentDecodeString:l,utf8PercentEncodeCodePoint:i,utf8PercentEncodeString:p,isC0ControlPercentEncode:A,isFragmentPercentEncode:o,isQueryPercentEncode:n,isSpecialQueryPercentEncode:r,isPathPercentEncode:E,isUserinfoPercentEncode:m}=e1();function c(P){return P.codePointAt(0)}var b={ftp:21,file:null,http:80,https:443,ws:80,wss:443},f=Symbol("failure");function O(P){return[...P].length}function F(P,te){let le=P[te];return isNaN(le)?void 0:String.fromCodePoint(le)}function y(P){return P==="."||P.toLowerCase()==="%2e"}function g(P){return P=P.toLowerCase(),P===".."||P==="%2e."||P===".%2e"||P==="%2e%2e"}function T(P,te){return h.isASCIIAlpha(P)&&(te===c(":")||te===c("|"))}function D(P){return P.length===2&&h.isASCIIAlpha(P.codePointAt(0))&&(P[1]===":"||P[1]==="|")}function N(P){return P.length===2&&h.isASCIIAlpha(P.codePointAt(0))&&P[1]===":"}function _(P){return P.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|<|>|\?|@|\[|\\|\]|\^|\|/u)!==-1}function R(P){return _(P)||P.search(/[\u0000-\u001F]|%|\u007F/u)!==-1}function j(P){return b[P]!==void 0}function L(P){return j(P.scheme)}function I(P){return!j(P.scheme)}function M(P){return b[P]}function S(P){if(P==="")return f;let te=10;if(P.length>=2&&P.charAt(0)==="0"&&P.charAt(1).toLowerCase()==="x"?(P=P.substring(2),te=16):P.length>=2&&P.charAt(0)==="0"&&(P=P.substring(1),te=8),P==="")return 0;let le=/[^0-7]/u;return te===10&&(le=/[^0-9]/u),te===16&&(le=/[^0-9A-Fa-f]/u),le.test(P)?f:parseInt(P,te)}function v(P){let te=P.split(".");if(te[te.length-1]===""&&te.length>1&&te.pop(),te.length>4)return f;let le=[];for(let Se of te){let He=S(Se);if(He===f)return f;le.push(He)}for(let Se=0;Se<le.length-1;++Se)if(le[Se]>255)return f;if(le[le.length-1]>=256**(5-le.length))return f;let q=le.pop(),ge=0;for(let Se of le)q+=Se*256**(3-ge),++ge;return q}function w(P){let te="",le=P;for(let q=1;q<=4;++q)te=String(le%256)+te,q!==4&&(te=`.${te}`),le=Math.floor(le/256);return te}function k(P){let te=[0,0,0,0,0,0,0,0],le=0,q=null,ge=0;if(P=Array.from(P,Se=>Se.codePointAt(0)),P[ge]===c(":")){if(P[ge+1]!==c(":"))return f;ge+=2,++le,q=le}for(;ge<P.length;){if(le===8)return f;if(P[ge]===c(":")){if(q!==null)return f;++ge,++le,q=le;continue}let Se=0,He=0;for(;He<4&&h.isASCIIHex(P[ge]);)Se=Se*16+parseInt(F(P,ge),16),++ge,++He;if(P[ge]===c(".")){if(He===0||(ge-=He,le>6))return f;let ht=0;for(;P[ge]!==void 0;){let ot=null;if(ht>0)if(P[ge]===c(".")&&ht<4)++ge;else return f;if(!h.isASCIIDigit(P[ge]))return f;for(;h.isASCIIDigit(P[ge]);){let dt=parseInt(F(P,ge));if(ot===null)ot=dt;else{if(ot===0)return f;ot=ot*10+dt}if(ot>255)return f;++ge}te[le]=te[le]*256+ot,++ht,(ht===2||ht===4)&&++le}if(ht!==4)return f;break}else if(P[ge]===c(":")){if(++ge,P[ge]===void 0)return f}else if(P[ge]!==void 0)return f;te[le]=Se,++le}if(q!==null){let Se=le-q;for(le=7;le!==0&&Se>0;){let He=te[q+Se-1];te[q+Se-1]=te[le],te[le]=He,--le,--Se}}else if(q===null&&le!==8)return f;return te}function $(P){let te="",le=se(P),q=!1;for(let ge=0;ge<=7;++ge)if(!(q&&P[ge]===0)){if(q&&(q=!1),le===ge){te+=ge===0?"::":":",q=!0;continue}te+=P[ge].toString(16),ge!==7&&(te+=":")}return te}function X(P,te=!1){if(P[0]==="[")return P[P.length-1]!=="]"?f:k(P.substring(1,P.length-1));if(te)return Y(P);let le=a(l(P)),q=G(le);return q===f||R(q)?f:de(q)?v(q):q}function de(P){let te=P.split(".");if(te[te.length-1]===""){if(te.length===1)return!1;te.pop()}let le=te[te.length-1];return!!(S(le)!==f||/^[0-9]+$/u.test(le))}function Y(P){return _(P)?f:p(P,A)}function se(P){let te=null,le=1,q=null,ge=0;for(let Se=0;Se<P.length;++Se)P[Se]!==0?(ge>le&&(te=q,le=ge),q=null,ge=0):(q===null&&(q=Se),++ge);return ge>le?q:te}function x(P){return typeof P=="number"?w(P):P instanceof Array?`[${$(P)}]`:P}function G(P,te=!1){let le=d.toASCII(P,{checkBidi:!0,checkHyphens:!1,checkJoiners:!0,useSTD3ASCIIRules:te,verifyDNSLength:te});return le===null||le===""?f:le}function Q(P){return P.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/ug,"")}function oe(P){return P.replace(/\u0009|\u000A|\u000D/ug,"")}function Ee(P){let{path:te}=P;te.length!==0&&(P.scheme==="file"&&te.length===1&&Ce(te[0])||te.pop())}function De(P){return P.username!==""||P.password!==""}function Je(P){return P.host===null||P.host===""||P.scheme==="file"}function ze(P){return typeof P.path=="string"}function Ce(P){return/^[A-Za-z]:$/u.test(P)}function Me(P,te,le,q,ge){if(this.pointer=0,this.input=P,this.base=te||null,this.encodingOverride=le||"utf-8",this.stateOverride=ge,this.url=q,this.failure=!1,this.parseError=!1,!this.url){this.url={scheme:"",username:"",password:"",host:null,port:null,path:[],query:null,fragment:null};let He=Q(this.input);He!==this.input&&(this.parseError=!0),this.input=He}let Se=oe(this.input);for(Se!==this.input&&(this.parseError=!0),this.input=Se,this.state=ge||"scheme start",this.buffer="",this.atFlag=!1,this.arrFlag=!1,this.passwordTokenSeenFlag=!1,this.input=Array.from(this.input,He=>He.codePointAt(0));this.pointer<=this.input.length;++this.pointer){let He=this.input[this.pointer],ht=isNaN(He)?void 0:String.fromCodePoint(He),ot=this[`parse ${this.state}`](He,ht);if(ot){if(ot===f){this.failure=!0;break}}else break}}Me.prototype["parse scheme start"]=function(P,te){if(h.isASCIIAlpha(P))this.buffer+=te.toLowerCase(),this.state="scheme";else if(!this.stateOverride)this.state="no scheme",--this.pointer;else return this.parseError=!0,f;return!0},Me.prototype["parse scheme"]=function(P,te){if(h.isASCIIAlphanumeric(P)||P===c("+")||P===c("-")||P===c("."))this.buffer+=te.toLowerCase();else if(P===c(":")){if(this.stateOverride&&(L(this.url)&&!j(this.buffer)||!L(this.url)&&j(this.buffer)||(De(this.url)||this.url.port!==null)&&this.buffer==="file"||this.url.scheme==="file"&&this.url.host===""))return!1;if(this.url.scheme=this.buffer,this.stateOverride)return this.url.port===M(this.url.scheme)&&(this.url.port=null),!1;this.buffer="",this.url.scheme==="file"?((this.input[this.pointer+1]!==c("/")||this.input[this.pointer+2]!==c("/"))&&(this.parseError=!0),this.state="file"):L(this.url)&&this.base!==null&&this.base.scheme===this.url.scheme?this.state="special relative or authority":L(this.url)?this.state="special authority slashes":this.input[this.pointer+1]===c("/")?(this.state="path or authority",++this.pointer):(this.url.path="",this.state="opaque path")}else if(!this.stateOverride)this.buffer="",this.state="no scheme",this.pointer=-1;else return this.parseError=!0,f;return!0},Me.prototype["parse no scheme"]=function(P){return this.base===null||ze(this.base)&&P!==c("#")?f:(ze(this.base)&&P===c("#")?(this.url.scheme=this.base.scheme,this.url.path=this.base.path,this.url.query=this.base.query,this.url.fragment="",this.state="fragment"):this.base.scheme==="file"?(this.state="file",--this.pointer):(this.state="relative",--this.pointer),!0)},Me.prototype["parse special relative or authority"]=function(P){return P===c("/")&&this.input[this.pointer+1]===c("/")?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="relative",--this.pointer),!0},Me.prototype["parse path or authority"]=function(P){return P===c("/")?this.state="authority":(this.state="path",--this.pointer),!0},Me.prototype["parse relative"]=function(P){return this.url.scheme=this.base.scheme,P===c("/")?this.state="relative slash":L(this.url)&&P===c("\\")?(this.parseError=!0,this.state="relative slash"):(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.url.path=this.base.path.slice(),this.url.query=this.base.query,P===c("?")?(this.url.query="",this.state="query"):P===c("#")?(this.url.fragment="",this.state="fragment"):isNaN(P)||(this.url.query=null,this.url.path.pop(),this.state="path",--this.pointer)),!0},Me.prototype["parse relative slash"]=function(P){return L(this.url)&&(P===c("/")||P===c("\\"))?(P===c("\\")&&(this.parseError=!0),this.state="special authority ignore slashes"):P===c("/")?this.state="authority":(this.url.username=this.base.username,this.url.password=this.base.password,this.url.host=this.base.host,this.url.port=this.base.port,this.state="path",--this.pointer),!0},Me.prototype["parse special authority slashes"]=function(P){return P===c("/")&&this.input[this.pointer+1]===c("/")?(this.state="special authority ignore slashes",++this.pointer):(this.parseError=!0,this.state="special authority ignore slashes",--this.pointer),!0},Me.prototype["parse special authority ignore slashes"]=function(P){return P!==c("/")&&P!==c("\\")?(this.state="authority",--this.pointer):this.parseError=!0,!0},Me.prototype["parse authority"]=function(P,te){if(P===c("@")){this.parseError=!0,this.atFlag&&(this.buffer=`%40${this.buffer}`),this.atFlag=!0;let le=O(this.buffer);for(let q=0;q<le;++q){let ge=this.buffer.codePointAt(q);if(ge===c(":")&&!this.passwordTokenSeenFlag){this.passwordTokenSeenFlag=!0;continue}let Se=i(ge,m);this.passwordTokenSeenFlag?this.url.password+=Se:this.url.username+=Se}this.buffer=""}else if(isNaN(P)||P===c("/")||P===c("?")||P===c("#")||L(this.url)&&P===c("\\")){if(this.atFlag&&this.buffer==="")return this.parseError=!0,f;this.pointer-=O(this.buffer)+1,this.buffer="",this.state="host"}else this.buffer+=te;return!0},Me.prototype["parse hostname"]=Me.prototype["parse host"]=function(P,te){if(this.stateOverride&&this.url.scheme==="file")--this.pointer,this.state="file host";else if(P===c(":")&&!this.arrFlag){if(this.buffer==="")return this.parseError=!0,f;if(this.stateOverride==="hostname")return!1;let le=X(this.buffer,I(this.url));if(le===f)return f;this.url.host=le,this.buffer="",this.state="port"}else if(isNaN(P)||P===c("/")||P===c("?")||P===c("#")||L(this.url)&&P===c("\\")){if(--this.pointer,L(this.url)&&this.buffer==="")return this.parseError=!0,f;if(this.stateOverride&&this.buffer===""&&(De(this.url)||this.url.port!==null))return this.parseError=!0,!1;let le=X(this.buffer,I(this.url));if(le===f)return f;if(this.url.host=le,this.buffer="",this.state="path start",this.stateOverride)return!1}else P===c("[")?this.arrFlag=!0:P===c("]")&&(this.arrFlag=!1),this.buffer+=te;return!0},Me.prototype["parse port"]=function(P,te){if(h.isASCIIDigit(P))this.buffer+=te;else if(isNaN(P)||P===c("/")||P===c("?")||P===c("#")||L(this.url)&&P===c("\\")||this.stateOverride){if(this.buffer!==""){let le=parseInt(this.buffer);if(le>2**16-1)return this.parseError=!0,f;this.url.port=le===M(this.url.scheme)?null:le,this.buffer=""}if(this.stateOverride)return!1;this.state="path start",--this.pointer}else return this.parseError=!0,f;return!0};var qe=new Set([c("/"),c("\\"),c("?"),c("#")]);function Ge(P,te){let le=P.length-te;return le>=2&&T(P[te],P[te+1])&&(le===2||qe.has(P[te+2]))}Me.prototype["parse file"]=function(P){return this.url.scheme="file",this.url.host="",P===c("/")||P===c("\\")?(P===c("\\")&&(this.parseError=!0),this.state="file slash"):this.base!==null&&this.base.scheme==="file"?(this.url.host=this.base.host,this.url.path=this.base.path.slice(),this.url.query=this.base.query,P===c("?")?(this.url.query="",this.state="query"):P===c("#")?(this.url.fragment="",this.state="fragment"):isNaN(P)||(this.url.query=null,Ge(this.input,this.pointer)?(this.parseError=!0,this.url.path=[]):Ee(this.url),this.state="path",--this.pointer)):(this.state="path",--this.pointer),!0},Me.prototype["parse file slash"]=function(P){return P===c("/")||P===c("\\")?(P===c("\\")&&(this.parseError=!0),this.state="file host"):(this.base!==null&&this.base.scheme==="file"&&(!Ge(this.input,this.pointer)&&N(this.base.path[0])&&this.url.path.push(this.base.path[0]),this.url.host=this.base.host),this.state="path",--this.pointer),!0},Me.prototype["parse file host"]=function(P,te){if(isNaN(P)||P===c("/")||P===c("\\")||P===c("?")||P===c("#"))if(--this.pointer,!this.stateOverride&&D(this.buffer))this.parseError=!0,this.state="path";else if(this.buffer===""){if(this.url.host="",this.stateOverride)return!1;this.state="path start"}else{let le=X(this.buffer,I(this.url));if(le===f)return f;if(le==="localhost"&&(le=""),this.url.host=le,this.stateOverride)return!1;this.buffer="",this.state="path start"}else this.buffer+=te;return!0},Me.prototype["parse path start"]=function(P){return L(this.url)?(P===c("\\")&&(this.parseError=!0),this.state="path",P!==c("/")&&P!==c("\\")&&--this.pointer):!this.stateOverride&&P===c("?")?(this.url.query="",this.state="query"):!this.stateOverride&&P===c("#")?(this.url.fragment="",this.state="fragment"):P!==void 0?(this.state="path",P!==c("/")&&--this.pointer):this.stateOverride&&this.url.host===null&&this.url.path.push(""),!0},Me.prototype["parse path"]=function(P){return isNaN(P)||P===c("/")||L(this.url)&&P===c("\\")||!this.stateOverride&&(P===c("?")||P===c("#"))?(L(this.url)&&P===c("\\")&&(this.parseError=!0),g(this.buffer)?(Ee(this.url),P!==c("/")&&!(L(this.url)&&P===c("\\"))&&this.url.path.push("")):y(this.buffer)&&P!==c("/")&&!(L(this.url)&&P===c("\\"))?this.url.path.push(""):y(this.buffer)||(this.url.scheme==="file"&&this.url.path.length===0&&D(this.buffer)&&(this.buffer=`${this.buffer[0]}:`),this.url.path.push(this.buffer)),this.buffer="",P===c("?")&&(this.url.query="",this.state="query"),P===c("#")&&(this.url.fragment="",this.state="fragment")):(P===c("%")&&(!h.isASCIIHex(this.input[this.pointer+1])||!h.isASCIIHex(this.input[this.pointer+2]))&&(this.parseError=!0),this.buffer+=i(P,E)),!0},Me.prototype["parse opaque path"]=function(P){return P===c("?")?(this.url.query="",this.state="query"):P===c("#")?(this.url.fragment="",this.state="fragment"):(!isNaN(P)&&P!==c("%")&&(this.parseError=!0),P===c("%")&&(!h.isASCIIHex(this.input[this.pointer+1])||!h.isASCIIHex(this.input[this.pointer+2]))&&(this.parseError=!0),isNaN(P)||(this.url.path+=i(P,A))),!0},Me.prototype["parse query"]=function(P,te){if((!L(this.url)||this.url.scheme==="ws"||this.url.scheme==="wss")&&(this.encodingOverride="utf-8"),!this.stateOverride&&P===c("#")||isNaN(P)){let le=L(this.url)?r:n;this.url.query+=p(this.buffer,le),this.buffer="",P===c("#")&&(this.url.fragment="",this.state="fragment")}else isNaN(P)||(P===c("%")&&(!h.isASCIIHex(this.input[this.pointer+1])||!h.isASCIIHex(this.input[this.pointer+2]))&&(this.parseError=!0),this.buffer+=te);return!0},Me.prototype["parse fragment"]=function(P){return isNaN(P)||(P===c("%")&&(!h.isASCIIHex(this.input[this.pointer+1])||!h.isASCIIHex(this.input[this.pointer+2]))&&(this.parseError=!0),this.url.fragment+=i(P,o)),!0};function ct(P,te){let le=`${P.scheme}:`;return P.host!==null&&(le+="//",(P.username!==""||P.password!=="")&&(le+=P.username,P.password!==""&&(le+=`:${P.password}`),le+="@"),le+=x(P.host),P.port!==null&&(le+=`:${P.port}`)),P.host===null&&!ze(P)&&P.path.length>1&&P.path[0]===""&&(le+="/."),le+=K(P),P.query!==null&&(le+=`?${P.query}`),!te&&P.fragment!==null&&(le+=`#${P.fragment}`),le}function St(P){let te=`${P.scheme}://`;return te+=x(P.host),P.port!==null&&(te+=`:${P.port}`),te}function K(P){if(ze(P))return P.path;let te="";for(let le of P.path)te+=`/${le}`;return te}u.exports.serializeURL=ct,u.exports.serializePath=K,u.exports.serializeURLOrigin=function(P){switch(P.scheme){case"blob":{let te=u.exports.parseURL(K(P));return te===null||te.scheme!=="http"&&te.scheme!=="https"?"null":u.exports.serializeURLOrigin(te)}case"ftp":case"http":case"https":case"ws":case"wss":return St({scheme:P.scheme,host:P.host,port:P.port});case"file":return"null";default:return"null"}},u.exports.basicURLParse=function(P,te){te===void 0&&(te={});let le=new Me(P,te.baseURL,te.encodingOverride,te.url,te.stateOverride);return le.failure?null:le.url},u.exports.setTheUsername=function(P,te){P.username=p(te,m)},u.exports.setThePassword=function(P,te){P.password=p(te,m)},u.exports.serializeHost=x,u.exports.cannotHaveAUsernamePasswordPort=Je,u.exports.hasAnOpaquePath=ze,u.exports.serializeInteger=function(P){return String(P)},u.exports.parseURL=function(P,te){return te===void 0&&(te={}),u.exports.basicURLParse(P,{baseURL:te.baseURL,encodingOverride:te.encodingOverride})}}),In=J((e,u)=>{"use strict";var{utf8Encode:d,utf8DecodeWithoutBOM:h}=Qu(),{percentDecodeBytes:a,utf8PercentEncodeString:l,isURLEncodedPercentEncode:i}=e1();function p(m){return m.codePointAt(0)}function A(m){let c=r(m,p("&")),b=[];for(let f of c){if(f.length===0)continue;let O,F,y=f.indexOf(p("="));y>=0?(O=f.slice(0,y),F=f.slice(y+1)):(O=f,F=new Uint8Array(0)),O=E(O,43,32),F=E(F,43,32);let g=h(a(O)),T=h(a(F));b.push([g,T])}return b}function o(m){return A(d(m))}function n(m,c=void 0){let b="utf-8";c!==void 0&&(b=c);let f="";for(let[O,F]of m.entries()){let y=l(F[0],i,!0),g=F[1];F.length>2&&F[2]!==void 0&&(F[2]==="hidden"&&y==="_charset_"?g=b:F[2]==="file"&&(g=g.name)),g=l(g,i,!0),O!==0&&(f+="&"),f+=`${y}=${g}`}return f}function r(m,c){let b=[],f=0,O=m.indexOf(c);for(;O>=0;)b.push(m.slice(f,O)),f=O+1,O=m.indexOf(c,f);return f!==m.length&&b.push(m.slice(f)),b}function E(m,c,b){let f=m.indexOf(c);for(;f>=0;)m[f]=b,f=m.indexOf(c,f+1);return m}u.exports={parseUrlencodedString:o,serializeUrlencoded:n}}),Di=J(e=>{"use strict";var u=Xu(),d=Zu();e.convert=(h,a,{context:l="The provided value"}={})=>{if(typeof a!="function")throw new h.TypeError(l+" is not a function");function i(...p){let A=d.tryWrapperForImpl(this),o;for(let n=0;n<p.length;n++)p[n]=d.tryWrapperForImpl(p[n]);return o=Reflect.apply(a,A,p),o=u.any(o,{context:l,globals:h}),o}return i.construct=(...p)=>{for(let o=0;o<p.length;o++)p[o]=d.tryWrapperForImpl(p[o]);let A=Reflect.construct(a,p);return A=u.any(A,{context:l,globals:h}),A},i[d.wrapperSymbol]=a,i.objectReference=a,i}}),Oi=J(e=>{"use strict";var u=In();e.implementation=class{constructor(d,h,{doNotStripQMark:a=!1}){let l=h[0];if(this._list=[],this._url=null,!a&&typeof l=="string"&&l[0]==="?"&&(l=l.slice(1)),Array.isArray(l))for(let i of l){if(i.length!==2)throw new TypeError("Failed to construct 'URLSearchParams': parameter 1 sequence's element does not contain exactly two elements.");this._list.push([i[0],i[1]])}else if(typeof l=="object"&&Object.getPrototypeOf(l)===null)for(let i of Object.keys(l)){let p=l[i];this._list.push([i,p])}else this._list=u.parseUrlencodedString(l)}_updateSteps(){if(this._url!==null){let d=u.serializeUrlencoded(this._list);d===""&&(d=null),this._url._url.query=d,d===null&&this._url._potentiallyStripTrailingSpacesFromAnOpaquePath()}}get size(){return this._list.length}append(d,h){this._list.push([d,h]),this._updateSteps()}delete(d,h){let a=0;for(;a<this._list.length;)this._list[a][0]===d&&(h===void 0||this._list[a][1]===h)?this._list.splice(a,1):a++;this._updateSteps()}get(d){for(let h of this._list)if(h[0]===d)return h[1];return null}getAll(d){let h=[];for(let a of this._list)a[0]===d&&h.push(a[1]);return h}has(d,h){for(let a of this._list)if(a[0]===d&&(h===void 0||a[1]===h))return!0;return!1}set(d,h){let a=!1,l=0;for(;l<this._list.length;)this._list[l][0]===d?a?this._list.splice(l,1):(a=!0,this._list[l][1]=h,l++):l++;a||this._list.push([d,h]),this._updateSteps()}sort(){this._list.sort((d,h)=>d[0]<h[0]?-1:d[0]>h[0]?1:0),this._updateSteps()}[Symbol.iterator](){return this._list[Symbol.iterator]()}toString(){return u.serializeUrlencoded(this._list)}}}),_n=J(e=>{"use strict";var u=Xu(),d=Zu(),h=Di(),a=d.newObjectInRealm,l=d.implSymbol,i=d.ctorRegistrySymbol,p="URLSearchParams";e.is=r=>d.isObject(r)&&d.hasOwn(r,l)&&r[l]instanceof n.implementation,e.isImpl=r=>d.isObject(r)&&r instanceof n.implementation,e.convert=(r,E,{context:m="The provided value"}={})=>{if(e.is(E))return d.implForWrapper(E);throw new r.TypeError(`${m} is not of type 'URLSearchParams'.`)},e.createDefaultIterator=(r,E,m)=>{let c=r[i]["URLSearchParams Iterator"],b=Object.create(c);return Object.defineProperty(b,d.iterInternalSymbol,{value:{target:E,kind:m,index:0},configurable:!0}),b};function A(r,E){let m;return E!==void 0&&(m=E.prototype),d.isObject(m)||(m=r[i].URLSearchParams.prototype),Object.create(m)}e.create=(r,E,m)=>{let c=A(r);return e.setup(c,r,E,m)},e.createImpl=(r,E,m)=>{let c=e.create(r,E,m);return d.implForWrapper(c)},e._internalSetup=(r,E)=>{},e.setup=(r,E,m=[],c={})=>(c.wrapper=r,e._internalSetup(r,E),Object.defineProperty(r,l,{value:new n.implementation(E,m,c),configurable:!0}),r[l][d.wrapperSymbol]=r,n.init&&n.init(r[l]),r),e.new=(r,E)=>{let m=A(r,E);return e._internalSetup(m,r),Object.defineProperty(m,l,{value:Object.create(n.implementation.prototype),configurable:!0}),m[l][d.wrapperSymbol]=m,n.init&&n.init(m[l]),m[l]};var o=new Set(["Window","Worker"]);e.install=(r,E)=>{if(!E.some(b=>o.has(b)))return;let m=d.initCtorRegistry(r);class c{constructor(){let f=[];{let O=arguments[0];if(O!==void 0)if(d.isObject(O))if(O[Symbol.iterator]!==void 0)if(d.isObject(O)){let F=[],y=O;for(let g of y){if(d.isObject(g)){let T=[],D=g;for(let N of D)N=u.USVString(N,{context:"Failed to construct 'URLSearchParams': parameter 1 sequence's element's element",globals:r}),T.push(N);g=T}else throw new r.TypeError("Failed to construct 'URLSearchParams': parameter 1 sequence's element is not an iterable object.");F.push(g)}O=F}else throw new r.TypeError("Failed to construct 'URLSearchParams': parameter 1 sequence is not an iterable object.");else if(d.isObject(O)){let F=Object.create(null);for(let y of Reflect.ownKeys(O)){let g=Object.getOwnPropertyDescriptor(O,y);if(g&&g.enumerable){let T=y;T=u.USVString(T,{context:"Failed to construct 'URLSearchParams': parameter 1 record's key",globals:r});let D=O[y];D=u.USVString(D,{context:"Failed to construct 'URLSearchParams': parameter 1 record's value",globals:r}),F[T]=D}}O=F}else throw new r.TypeError("Failed to construct 'URLSearchParams': parameter 1 record is not an object.");else O=u.USVString(O,{context:"Failed to construct 'URLSearchParams': parameter 1",globals:r});else O="";f.push(O)}return e.setup(Object.create(new.target.prototype),r,f)}append(f,O){let F=this!==null&&this!==void 0?this:r;if(!e.is(F))throw new r.TypeError("'append' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<2)throw new r.TypeError(`Failed to execute 'append' on 'URLSearchParams': 2 arguments required, but only ${arguments.length} present.`);let y=[];{let g=arguments[0];g=u.USVString(g,{context:"Failed to execute 'append' on 'URLSearchParams': parameter 1",globals:r}),y.push(g)}{let g=arguments[1];g=u.USVString(g,{context:"Failed to execute 'append' on 'URLSearchParams': parameter 2",globals:r}),y.push(g)}return d.tryWrapperForImpl(F[l].append(...y))}delete(f){let O=this!==null&&this!==void 0?this:r;if(!e.is(O))throw new r.TypeError("'delete' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new r.TypeError(`Failed to execute 'delete' on 'URLSearchParams': 1 argument required, but only ${arguments.length} present.`);let F=[];{let y=arguments[0];y=u.USVString(y,{context:"Failed to execute 'delete' on 'URLSearchParams': parameter 1",globals:r}),F.push(y)}{let y=arguments[1];y!==void 0&&(y=u.USVString(y,{context:"Failed to execute 'delete' on 'URLSearchParams': parameter 2",globals:r})),F.push(y)}return d.tryWrapperForImpl(O[l].delete(...F))}get(f){let O=this!==null&&this!==void 0?this:r;if(!e.is(O))throw new r.TypeError("'get' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new r.TypeError(`Failed to execute 'get' on 'URLSearchParams': 1 argument required, but only ${arguments.length} present.`);let F=[];{let y=arguments[0];y=u.USVString(y,{context:"Failed to execute 'get' on 'URLSearchParams': parameter 1",globals:r}),F.push(y)}return O[l].get(...F)}getAll(f){let O=this!==null&&this!==void 0?this:r;if(!e.is(O))throw new r.TypeError("'getAll' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new r.TypeError(`Failed to execute 'getAll' on 'URLSearchParams': 1 argument required, but only ${arguments.length} present.`);let F=[];{let y=arguments[0];y=u.USVString(y,{context:"Failed to execute 'getAll' on 'URLSearchParams': parameter 1",globals:r}),F.push(y)}return d.tryWrapperForImpl(O[l].getAll(...F))}has(f){let O=this!==null&&this!==void 0?this:r;if(!e.is(O))throw new r.TypeError("'has' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new r.TypeError(`Failed to execute 'has' on 'URLSearchParams': 1 argument required, but only ${arguments.length} present.`);let F=[];{let y=arguments[0];y=u.USVString(y,{context:"Failed to execute 'has' on 'URLSearchParams': parameter 1",globals:r}),F.push(y)}{let y=arguments[1];y!==void 0&&(y=u.USVString(y,{context:"Failed to execute 'has' on 'URLSearchParams': parameter 2",globals:r})),F.push(y)}return O[l].has(...F)}set(f,O){let F=this!==null&&this!==void 0?this:r;if(!e.is(F))throw new r.TypeError("'set' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<2)throw new r.TypeError(`Failed to execute 'set' on 'URLSearchParams': 2 arguments required, but only ${arguments.length} present.`);let y=[];{let g=arguments[0];g=u.USVString(g,{context:"Failed to execute 'set' on 'URLSearchParams': parameter 1",globals:r}),y.push(g)}{let g=arguments[1];g=u.USVString(g,{context:"Failed to execute 'set' on 'URLSearchParams': parameter 2",globals:r}),y.push(g)}return d.tryWrapperForImpl(F[l].set(...y))}sort(){let f=this!==null&&this!==void 0?this:r;if(!e.is(f))throw new r.TypeError("'sort' called on an object that is not a valid instance of URLSearchParams.");return d.tryWrapperForImpl(f[l].sort())}toString(){let f=this!==null&&this!==void 0?this:r;if(!e.is(f))throw new r.TypeError("'toString' called on an object that is not a valid instance of URLSearchParams.");return f[l].toString()}keys(){if(!e.is(this))throw new r.TypeError("'keys' called on an object that is not a valid instance of URLSearchParams.");return e.createDefaultIterator(r,this,"key")}values(){if(!e.is(this))throw new r.TypeError("'values' called on an object that is not a valid instance of URLSearchParams.");return e.createDefaultIterator(r,this,"value")}entries(){if(!e.is(this))throw new r.TypeError("'entries' called on an object that is not a valid instance of URLSearchParams.");return e.createDefaultIterator(r,this,"key+value")}forEach(f){if(!e.is(this))throw new r.TypeError("'forEach' called on an object that is not a valid instance of URLSearchParams.");if(arguments.length<1)throw new r.TypeError("Failed to execute 'forEach' on 'iterable': 1 argument required, but only 0 present.");f=h.convert(r,f,{context:"Failed to execute 'forEach' on 'iterable': The callback provided as parameter 1"});let O=arguments[1],F=Array.from(this[l]),y=0;for(;y<F.length;){let[g,T]=F[y].map(d.tryWrapperForImpl);f.call(O,T,g,this),F=Array.from(this[l]),y++}}get size(){let f=this!==null&&this!==void 0?this:r;if(!e.is(f))throw new r.TypeError("'get size' called on an object that is not a valid instance of URLSearchParams.");return f[l].size}}Object.defineProperties(c.prototype,{append:{enumerable:!0},delete:{enumerable:!0},get:{enumerable:!0},getAll:{enumerable:!0},has:{enumerable:!0},set:{enumerable:!0},sort:{enumerable:!0},toString:{enumerable:!0},keys:{enumerable:!0},values:{enumerable:!0},entries:{enumerable:!0},forEach:{enumerable:!0},size:{enumerable:!0},[Symbol.toStringTag]:{value:"URLSearchParams",configurable:!0},[Symbol.iterator]:{value:c.prototype.entries,configurable:!0,writable:!0}}),m[p]=c,m["URLSearchParams Iterator"]=Object.create(m["%IteratorPrototype%"],{[Symbol.toStringTag]:{configurable:!0,value:"URLSearchParams Iterator"}}),d.define(m["URLSearchParams Iterator"],{next(){let b=this&&this[d.iterInternalSymbol];if(!b)throw new r.TypeError("next() called on a value that is not a URLSearchParams iterator object");let{target:f,kind:O,index:F}=b,y=Array.from(f[l]),g=y.length;if(F>=g)return a(r,{value:void 0,done:!0});let T=y[F];return b.index=F+1,a(r,d.iteratorResult(T.map(d.tryWrapperForImpl),O))}}),Object.defineProperty(r,p,{configurable:!0,writable:!0,value:c})};var n=Oi()}),bi=J(e=>{"use strict";var u=Rn(),d=In(),h=_n();e.implementation=class{constructor(a,l){let i=l[0],p=l[1],A=null;if(p!==void 0&&(A=u.basicURLParse(p),A===null))throw new TypeError(`Invalid base URL: ${p}`);let o=u.basicURLParse(i,{baseURL:A});if(o===null)throw new TypeError(`Invalid URL: ${i}`);let n=o.query!==null?o.query:"";this._url=o,this._query=h.createImpl(a,[n],{doNotStripQMark:!0}),this._query._url=this}static canParse(a,l){let i=null;return!(l!==void 0&&(i=u.basicURLParse(l),i===null)||u.basicURLParse(a,{baseURL:i})===null)}get href(){return u.serializeURL(this._url)}set href(a){let l=u.basicURLParse(a);if(l===null)throw new TypeError(`Invalid URL: ${a}`);this._url=l,this._query._list.splice(0);let{query:i}=l;i!==null&&(this._query._list=d.parseUrlencodedString(i))}get origin(){return u.serializeURLOrigin(this._url)}get protocol(){return`${this._url.scheme}:`}set protocol(a){u.basicURLParse(`${a}:`,{url:this._url,stateOverride:"scheme start"})}get username(){return this._url.username}set username(a){u.cannotHaveAUsernamePasswordPort(this._url)||u.setTheUsername(this._url,a)}get password(){return this._url.password}set password(a){u.cannotHaveAUsernamePasswordPort(this._url)||u.setThePassword(this._url,a)}get host(){let a=this._url;return a.host===null?"":a.port===null?u.serializeHost(a.host):`${u.serializeHost(a.host)}:${u.serializeInteger(a.port)}`}set host(a){u.hasAnOpaquePath(this._url)||u.basicURLParse(a,{url:this._url,stateOverride:"host"})}get hostname(){return this._url.host===null?"":u.serializeHost(this._url.host)}set hostname(a){u.hasAnOpaquePath(this._url)||u.basicURLParse(a,{url:this._url,stateOverride:"hostname"})}get port(){return this._url.port===null?"":u.serializeInteger(this._url.port)}set port(a){u.cannotHaveAUsernamePasswordPort(this._url)||(a===""?this._url.port=null:u.basicURLParse(a,{url:this._url,stateOverride:"port"}))}get pathname(){return u.serializePath(this._url)}set pathname(a){u.hasAnOpaquePath(this._url)||(this._url.path=[],u.basicURLParse(a,{url:this._url,stateOverride:"path start"}))}get search(){return this._url.query===null||this._url.query===""?"":`?${this._url.query}`}set search(a){let l=this._url;if(a===""){l.query=null,this._query._list=[],this._potentiallyStripTrailingSpacesFromAnOpaquePath();return}let i=a[0]==="?"?a.substring(1):a;l.query="",u.basicURLParse(i,{url:l,stateOverride:"query"}),this._query._list=d.parseUrlencodedString(i)}get searchParams(){return this._query}get hash(){return this._url.fragment===null||this._url.fragment===""?"":`#${this._url.fragment}`}set hash(a){if(a===""){this._url.fragment=null,this._potentiallyStripTrailingSpacesFromAnOpaquePath();return}let l=a[0]==="#"?a.substring(1):a;this._url.fragment="",u.basicURLParse(l,{url:this._url,stateOverride:"fragment"})}toJSON(){return this.href}_potentiallyStripTrailingSpacesFromAnOpaquePath(){u.hasAnOpaquePath(this._url)&&this._url.fragment===null&&this._url.query===null&&(this._url.path=this._url.path.replace(/\u0020+$/u,""))}}}),wi=J(e=>{"use strict";var u=Xu(),d=Zu(),h=d.implSymbol,a=d.ctorRegistrySymbol,l="URL";e.is=o=>d.isObject(o)&&d.hasOwn(o,h)&&o[h]instanceof A.implementation,e.isImpl=o=>d.isObject(o)&&o instanceof A.implementation,e.convert=(o,n,{context:r="The provided value"}={})=>{if(e.is(n))return d.implForWrapper(n);throw new o.TypeError(`${r} is not of type 'URL'.`)};function i(o,n){let r;return n!==void 0&&(r=n.prototype),d.isObject(r)||(r=o[a].URL.prototype),Object.create(r)}e.create=(o,n,r)=>{let E=i(o);return e.setup(E,o,n,r)},e.createImpl=(o,n,r)=>{let E=e.create(o,n,r);return d.implForWrapper(E)},e._internalSetup=(o,n)=>{},e.setup=(o,n,r=[],E={})=>(E.wrapper=o,e._internalSetup(o,n),Object.defineProperty(o,h,{value:new A.implementation(n,r,E),configurable:!0}),o[h][d.wrapperSymbol]=o,A.init&&A.init(o[h]),o),e.new=(o,n)=>{let r=i(o,n);return e._internalSetup(r,o),Object.defineProperty(r,h,{value:Object.create(A.implementation.prototype),configurable:!0}),r[h][d.wrapperSymbol]=r,A.init&&A.init(r[h]),r[h]};var p=new Set(["Window","Worker"]);e.install=(o,n)=>{if(!n.some(m=>p.has(m)))return;let r=d.initCtorRegistry(o);class E{constructor(c){if(arguments.length<1)throw new o.TypeError(`Failed to construct 'URL': 1 argument required, but only ${arguments.length} present.`);let b=[];{let f=arguments[0];f=u.USVString(f,{context:"Failed to construct 'URL': parameter 1",globals:o}),b.push(f)}{let f=arguments[1];f!==void 0&&(f=u.USVString(f,{context:"Failed to construct 'URL': parameter 2",globals:o})),b.push(f)}return e.setup(Object.create(new.target.prototype),o,b)}toJSON(){let c=this!==null&&this!==void 0?this:o;if(!e.is(c))throw new o.TypeError("'toJSON' called on an object that is not a valid instance of URL.");return c[h].toJSON()}get href(){let c=this!==null&&this!==void 0?this:o;if(!e.is(c))throw new o.TypeError("'get href' called on an object that is not a valid instance of URL.");return c[h].href}set href(c){let b=this!==null&&this!==void 0?this:o;if(!e.is(b))throw new o.TypeError("'set href' called on an object that is not a valid instance of URL.");c=u.USVString(c,{context:"Failed to set the 'href' property on 'URL': The provided value",globals:o}),b[h].href=c}toString(){let c=this;if(!e.is(c))throw new o.TypeError("'toString' called on an object that is not a valid instance of URL.");return c[h].href}get origin(){let c=this!==null&&this!==void 0?this:o;if(!e.is(c))throw new o.TypeError("'get origin' called on an object that is not a valid instance of URL.");return c[h].origin}get protocol(){let c=this!==null&&this!==void 0?this:o;if(!e.is(c))throw new o.TypeError("'get protocol' called on an object that is not a valid instance of URL.");return c[h].protocol}set protocol(c){let b=this!==null&&this!==void 0?this:o;if(!e.is(b))throw new o.TypeError("'set protocol' called on an object that is not a valid instance of URL.");c=u.USVString(c,{context:"Failed to set the 'protocol' property on 'URL': The provided value",globals:o}),b[h].protocol=c}get username(){let c=this!==null&&this!==void 0?this:o;if(!e.is(c))throw new o.TypeError("'get username' called on an object that is not a valid instance of URL.");return c[h].username}set username(c){let b=this!==null&&this!==void 0?this:o;if(!e.is(b))throw new o.TypeError("'set username' called on an object that is not a valid instance of URL.");c=u.USVString(c,{context:"Failed to set the 'username' property on 'URL': The provided value",globals:o}),b[h].username=c}get password(){let c=this!==null&&this!==void 0?this:o;if(!e.is(c))throw new o.TypeError("'get password' called on an object that is not a valid instance of URL.");return c[h].password}set password(c){let b=this!==null&&this!==void 0?this:o;if(!e.is(b))throw new o.TypeError("'set password' called on an object that is not a valid instance of URL.");c=u.USVString(c,{context:"Failed to set the 'password' property on 'URL': The provided value",globals:o}),b[h].password=c}get host(){let c=this!==null&&this!==void 0?this:o;if(!e.is(c))throw new o.TypeError("'get host' called on an object that is not a valid instance of URL.");return c[h].host}set host(c){let b=this!==null&&this!==void 0?this:o;if(!e.is(b))throw new o.TypeError("'set host' called on an object that is not a valid instance of URL.");c=u.USVString(c,{context:"Failed to set the 'host' property on 'URL': The provided value",globals:o}),b[h].host=c}get hostname(){let c=this!==null&&this!==void 0?this:o;if(!e.is(c))throw new o.TypeError("'get hostname' called on an object that is not a valid instance of URL.");return c[h].hostname}set hostname(c){let b=this!==null&&this!==void 0?this:o;if(!e.is(b))throw new o.TypeError("'set hostname' called on an object that is not a valid instance of URL.");c=u.USVString(c,{context:"Failed to set the 'hostname' property on 'URL': The provided value",globals:o}),b[h].hostname=c}get port(){let c=this!==null&&this!==void 0?this:o;if(!e.is(c))throw new o.TypeError("'get port' called on an object that is not a valid instance of URL.");return c[h].port}set port(c){let b=this!==null&&this!==void 0?this:o;if(!e.is(b))throw new o.TypeError("'set port' called on an object that is not a valid instance of URL.");c=u.USVString(c,{context:"Failed to set the 'port' property on 'URL': The provided value",globals:o}),b[h].port=c}get pathname(){let c=this!==null&&this!==void 0?this:o;if(!e.is(c))throw new o.TypeError("'get pathname' called on an object that is not a valid instance of URL.");return c[h].pathname}set pathname(c){let b=this!==null&&this!==void 0?this:o;if(!e.is(b))throw new o.TypeError("'set pathname' called on an object that is not a valid instance of URL.");c=u.USVString(c,{context:"Failed to set the 'pathname' property on 'URL': The provided value",globals:o}),b[h].pathname=c}get search(){let c=this!==null&&this!==void 0?this:o;if(!e.is(c))throw new o.TypeError("'get search' called on an object that is not a valid instance of URL.");return c[h].search}set search(c){let b=this!==null&&this!==void 0?this:o;if(!e.is(b))throw new o.TypeError("'set search' called on an object that is not a valid instance of URL.");c=u.USVString(c,{context:"Failed to set the 'search' property on 'URL': The provided value",globals:o}),b[h].search=c}get searchParams(){let c=this!==null&&this!==void 0?this:o;if(!e.is(c))throw new o.TypeError("'get searchParams' called on an object that is not a valid instance of URL.");return d.getSameObject(this,"searchParams",()=>d.tryWrapperForImpl(c[h].searchParams))}get hash(){let c=this!==null&&this!==void 0?this:o;if(!e.is(c))throw new o.TypeError("'get hash' called on an object that is not a valid instance of URL.");return c[h].hash}set hash(c){let b=this!==null&&this!==void 0?this:o;if(!e.is(b))throw new o.TypeError("'set hash' called on an object that is not a valid instance of URL.");c=u.USVString(c,{context:"Failed to set the 'hash' property on 'URL': The provided value",globals:o}),b[h].hash=c}static canParse(c){if(arguments.length<1)throw new o.TypeError(`Failed to execute 'canParse' on 'URL': 1 argument required, but only ${arguments.length} present.`);let b=[];{let f=arguments[0];f=u.USVString(f,{context:"Failed to execute 'canParse' on 'URL': parameter 1",globals:o}),b.push(f)}{let f=arguments[1];f!==void 0&&(f=u.USVString(f,{context:"Failed to execute 'canParse' on 'URL': parameter 2",globals:o})),b.push(f)}return A.implementation.canParse(...b)}}Object.defineProperties(E.prototype,{toJSON:{enumerable:!0},href:{enumerable:!0},toString:{enumerable:!0},origin:{enumerable:!0},protocol:{enumerable:!0},username:{enumerable:!0},password:{enumerable:!0},host:{enumerable:!0},hostname:{enumerable:!0},port:{enumerable:!0},pathname:{enumerable:!0},search:{enumerable:!0},searchParams:{enumerable:!0},hash:{enumerable:!0},[Symbol.toStringTag]:{value:"URL",configurable:!0}}),Object.defineProperties(E,{canParse:{enumerable:!0}}),r[l]=E,Object.defineProperty(o,l,{configurable:!0,writable:!0,value:E}),n.includes("Window")&&Object.defineProperty(o,"webkitURL",{configurable:!0,writable:!0,value:E})};var A=bi()}),Fi=J(e=>{"use strict";var u=wi(),d=_n();e.URL=u,e.URLSearchParams=d}),vi=J(e=>{"use strict";var{URL:u,URLSearchParams:d}=Fi(),h=Rn(),a=e1(),l={Array,Object,Promise,String,TypeError};u.install(l,["Window"]),d.install(l,["Window"]),e.URL=l.URL,e.URLSearchParams=l.URLSearchParams,e.parseURL=h.parseURL,e.basicURLParse=h.basicURLParse,e.serializeURL=h.serializeURL,e.serializePath=h.serializePath,e.serializeHost=h.serializeHost,e.serializeInteger=h.serializeInteger,e.serializeURLOrigin=h.serializeURLOrigin,e.setTheUsername=h.setTheUsername,e.setThePassword=h.setThePassword,e.cannotHaveAUsernamePasswordPort=h.cannotHaveAUsernamePasswordPort,e.hasAnOpaquePath=h.hasAnOpaquePath,e.percentDecodeString=a.percentDecodeString,e.percentDecodeBytes=a.percentDecodeBytes}),Ti=J(e=>{"use strict";var u=e&&e.__createBinding||(Object.create?function(p,A,o,n){n===void 0&&(n=o);var r=Object.getOwnPropertyDescriptor(A,o);(!r||("get"in r?!A.__esModule:r.writable||r.configurable))&&(r={enumerable:!0,get:function(){return A[o]}}),Object.defineProperty(p,n,r)}:function(p,A,o,n){n===void 0&&(n=o),p[n]=A[o]}),d=e&&e.__setModuleDefault||(Object.create?function(p,A){Object.defineProperty(p,"default",{enumerable:!0,value:A})}:function(p,A){p.default=A}),h=e&&e.__importStar||function(p){if(p&&p.__esModule)return p;var A={};if(p!=null)for(var o in p)o!=="default"&&Object.prototype.hasOwnProperty.call(p,o)&&u(A,p,o);return d(A,p),A};Object.defineProperty(e,"__esModule",{value:!0}),e.redactConnectionString=e.redactValidConnectionString=void 0;var a=h(Pn());function l(p,A){var o,n;let r=p.clone(),E=(o=A?.replacementString)!==null&&o!==void 0?o:"_credentials_",m=(n=A?.redactUsernames)!==null&&n!==void 0?n:!0;if((r.username||r.password)&&m?(r.username=E,r.password=""):r.password&&(r.password=E),r.searchParams.has("authMechanismProperties")){let c=new a.CommaAndColonSeparatedRecord(r.searchParams.get("authMechanismProperties"));c.get("AWS_SESSION_TOKEN")&&(c.set("AWS_SESSION_TOKEN",E),r.searchParams.set("authMechanismProperties",c.toString()))}return r.searchParams.has("tlsCertificateKeyFilePassword")&&r.searchParams.set("tlsCertificateKeyFilePassword",E),r.searchParams.has("proxyUsername")&&m&&r.searchParams.set("proxyUsername",E),r.searchParams.has("proxyPassword")&&r.searchParams.set("proxyPassword",E),r}e.redactValidConnectionString=l;function i(p,A){var o,n;let r=(o=A?.replacementString)!==null&&o!==void 0?o:"<credentials>",E=(n=A?.redactUsernames)!==null&&n!==void 0?n:!0,m;try{m=new a.default(p)}catch{}if(m)return A={...A,replacementString:"___credentials___"},m.redact(A).toString().replace(/___credentials___/g,r);let c=r,b=[f=>f.replace(E?/(\/\/)(.*)(@)/g:/(\/\/[^@]*:)(.*)(@)/g,`$1${c}$3`),f=>f.replace(/(AWS_SESSION_TOKEN(:|%3A))([^,&]+)/gi,`$1${c}`),f=>f.replace(/(tlsCertificateKeyFilePassword=)([^&]+)/gi,`$1${c}`),f=>E?f.replace(/(proxyUsername=)([^&]+)/gi,`$1${c}`):f,f=>f.replace(/(proxyPassword=)([^&]+)/gi,`$1${c}`)];for(let f of b)p=f(p);return p}e.redactConnectionString=i}),Pn=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CommaAndColonSeparatedRecord=e.ConnectionString=e.redactConnectionString=void 0;var u=vi(),d=Ti();Object.defineProperty(e,"redactConnectionString",{enumerable:!0,get:function(){return d.redactConnectionString}});var h="__this_is_a_placeholder__";function a(E){return E.startsWith("mongodb://")||E.startsWith("mongodb+srv://")}var l=/^(?<protocol>[^/]+):\/\/(?:(?<username>[^:@]*)(?::(?<password>[^@]*))?@)?(?<hosts>(?!:)[^/?@]*)(?<rest>.*)/,i=class extends Map{delete(E){return super.delete(this._normalizeKey(E))}get(E){return super.get(this._normalizeKey(E))}has(E){return super.has(this._normalizeKey(E))}set(E,m){return super.set(this._normalizeKey(E),m)}_normalizeKey(E){E=`${E}`;for(let m of this.keys())if(m.toLowerCase()===E.toLowerCase()){E=m;break}return E}};function p(E){return class extends E{append(m,c){return super.append(this._normalizeKey(m),c)}delete(m){return super.delete(this._normalizeKey(m))}get(m){return super.get(this._normalizeKey(m))}getAll(m){return super.getAll(this._normalizeKey(m))}has(m){return super.has(this._normalizeKey(m))}set(m,c){return super.set(this._normalizeKey(m),c)}keys(){return super.keys()}values(){return super.values()}entries(){return super.entries()}[Symbol.iterator](){return super[Symbol.iterator]()}_normalizeKey(m){return i.prototype._normalizeKey.call(this,m)}}}var A=class extends u.URL{},o=class extends Error{get name(){return"MongoParseError"}},n=class zu extends A{constructor(m,c={}){var b;let{looseValidation:f}=c;if(!f&&!a(m))throw new o('Invalid scheme, expected connection string to start with "mongodb://" or "mongodb+srv://"');let O=m.match(l);if(!O)throw new o(`Invalid connection string "${m}"`);let{protocol:F,username:y,password:g,hosts:T,rest:D}=(b=O.groups)!==null&&b!==void 0?b:{};if(!f){if(!F||!T)throw new o(`Protocol and host list are required in "${m}"`);try{decodeURIComponent(y??""),decodeURIComponent(g??"")}catch(R){throw new o(R.message)}let _=/[:/?#[\]@]/gi;if(y?.match(_))throw new o(`Username contains unescaped characters ${y}`);if(!y||!g){let R=m.replace(`${F}://`,"");if(R.startsWith("@")||R.startsWith(":"))throw new o("URI contained empty userinfo section")}if(g?.match(_))throw new o("Password contains unescaped characters")}let N="";typeof y=="string"&&(N+=y),typeof g=="string"&&(N+=`:${g}`),N&&(N+="@");try{super(`${F.toLowerCase()}://${N}${h}${D}`)}catch(_){throw f&&new zu(m,{...c,looseValidation:!1}),typeof _.message=="string"&&(_.message=_.message.replace(h,T)),_}if(this._hosts=T.split(","),!f){if(this.isSRV&&this.hosts.length!==1)throw new o("mongodb+srv URI cannot have multiple service names");if(this.isSRV&&this.hosts.some(_=>_.includes(":")))throw new o("mongodb+srv URI cannot have port number")}this.pathname||(this.pathname="/"),Object.setPrototypeOf(this.searchParams,p(this.searchParams.constructor).prototype)}get host(){return h}set host(m){throw new Error("No single host for connection string")}get hostname(){return h}set hostname(m){throw new Error("No single host for connection string")}get port(){return""}set port(m){throw new Error("No single host for connection string")}get href(){return this.toString()}set href(m){throw new Error("Cannot set href for connection strings")}get isSRV(){return this.protocol.includes("srv")}get hosts(){return this._hosts}set hosts(m){this._hosts=m}toString(){return super.toString().replace(h,this.hosts.join(","))}clone(){return new zu(this.toString(),{looseValidation:!0})}redact(m){return(0,d.redactValidConnectionString)(this,m)}typedSearchParams(){return this.searchParams}[Symbol.for("nodejs.util.inspect.custom")](){let{href:m,origin:c,protocol:b,username:f,password:O,hosts:F,pathname:y,search:g,searchParams:T,hash:D}=this;return{href:m,origin:c,protocol:b,username:f,password:O,hosts:F,pathname:y,search:g,searchParams:T,hash:D}}};e.ConnectionString=n;var r=class extends i{constructor(E){super();for(let m of(E??"").split(",")){if(!m)continue;let c=m.indexOf(":");c===-1?this.set(m,""):this.set(m.slice(0,c),m.slice(c+1))}}toString(){return[...this].map(E=>E.join(":")).join(",")}};e.CommaAndColonSeparatedRecord=r,e.default=n}),Mi=J((e,u)=>{u.exports={name:"mongodb",version:"6.8.0",description:"The official MongoDB driver for Node.js",main:"lib/index.js",files:["lib","src","etc/prepare.js","mongodb.d.ts","tsconfig.json"],types:"mongodb.d.ts",repository:{type:"git",url:"git@github.com:mongodb/node-mongodb-native.git"},keywords:["mongodb","driver","official"],author:{name:"The MongoDB NodeJS Team",email:"dbx-node@mongodb.com"},dependencies:{"@mongodb-js/saslprep":"^1.1.5",bson:"^6.7.0","mongodb-connection-string-url":"^3.0.0"},peerDependencies:{"@aws-sdk/credential-providers":"^3.188.0","@mongodb-js/zstd":"^1.1.0","gcp-metadata":"^5.2.0",kerberos:"^2.0.1","mongodb-client-encryption":">=6.0.0 <7",snappy:"^7.2.2",socks:"^2.7.1"},peerDependenciesMeta:{"@aws-sdk/credential-providers":{optional:!0},"@mongodb-js/zstd":{optional:!0},kerberos:{optional:!0},snappy:{optional:!0},"mongodb-client-encryption":{optional:!0},"gcp-metadata":{optional:!0},socks:{optional:!0}},devDependencies:{"@aws-sdk/credential-providers":"^3.515.0","@iarna/toml":"^2.2.5","@istanbuljs/nyc-config-typescript":"^1.0.2","@microsoft/api-extractor":"^7.43.1","@microsoft/tsdoc-config":"^0.16.2","@mongodb-js/zstd":"^1.2.0","@types/chai":"^4.3.14","@types/chai-subset":"^1.3.5","@types/express":"^4.17.21","@types/kerberos":"^1.1.5","@types/mocha":"^10.0.6","@types/node":"^20.12.7","@types/saslprep":"^1.0.3","@types/semver":"^7.5.8","@types/sinon":"^17.0.3","@types/sinon-chai":"^3.2.12","@types/whatwg-url":"^11.0.4","@typescript-eslint/eslint-plugin":"^5.62.0","@typescript-eslint/parser":"^5.62.0",chai:"^4.4.1","chai-subset":"^1.6.0",chalk:"^4.1.2",eslint:"^8.56.0","eslint-config-prettier":"^8.10.0","eslint-plugin-github":"^4.10.2","eslint-plugin-import":"^2.29.1","eslint-plugin-mocha":"^10.4.1","eslint-plugin-prettier":"^4.2.1","eslint-plugin-simple-import-sort":"^10.0.0","eslint-plugin-tsdoc":"^0.2.17","eslint-plugin-unused-imports":"^2.0.0",express:"^4.19.2","gcp-metadata":"^5.3.0","js-yaml":"^4.1.0",mocha:"^10.4.0","mocha-sinon":"^2.1.2","mongodb-client-encryption":"^6.0.1","mongodb-legacy":"^6.0.1",nyc:"^15.1.0",prettier:"^2.8.8",semver:"^7.6.0",sinon:"^17.0.1","sinon-chai":"^3.7.0",snappy:"^7.2.2",socks:"^2.8.1","source-map-support":"^0.5.21","ts-node":"^10.9.2",tsd:"^0.31.0",typescript:"5.0","typescript-cached-transpile":"^0.0.6","v8-heapsnapshot":"^1.3.1",yargs:"^17.7.2"},license:"Apache-2.0",engines:{node:">=16.20.1"},bugs:{url:"https://jira.mongodb.org/projects/NODE/issues/"},homepage:"https://github.com/mongodb/node-mongodb-native",scripts:{"build:evergreen":"node .evergreen/generate_evergreen_tasks.js","build:ts":"node ./node_modules/typescript/bin/tsc","build:dts":"npm run build:ts && api-extractor run && node etc/clean_definition_files.cjs && eslint mongodb.d.ts --fix","build:docs":"./etc/docs/build.ts","build:typedoc":"typedoc","build:nightly":"node ./.github/scripts/nightly.mjs","check:bench":"node test/benchmarks/driverBench","check:coverage":"nyc npm run test:all","check:integration-coverage":"nyc npm run check:test","check:lambda":"mocha --config test/mocha_lambda.json test/integration/node-specific/examples/handler.test.js","check:lambda:aws":"mocha --config test/mocha_lambda.json test/integration/node-specific/examples/aws_handler.test.js","check:lint":"npm run build:dts && npm run check:dts && npm run check:eslint && npm run check:tsd","check:eslint":"eslint -v && eslint --max-warnings=0 --ext '.js,.ts' src test","check:tsd":"tsd --version && tsd","check:dependencies":"mocha test/action/dependency.test.ts","check:dts":"node ./node_modules/typescript/bin/tsc --noEmit mongodb.d.ts && tsd","check:search-indexes":"nyc mocha --config test/mocha_mongodb.json test/manual/search-index-management.prose.test.ts","check:test":"mocha --config test/mocha_mongodb.json test/integration","check:unit":"mocha test/unit","check:ts":"node ./node_modules/typescript/bin/tsc -v && node ./node_modules/typescript/bin/tsc --noEmit","check:atlas":"mocha --config test/manual/mocharc.json test/manual/atlas_connectivity.test.ts","check:drivers-atlas-testing":"mocha --config test/mocha_mongodb.json test/atlas/drivers_atlas_testing.test.ts","check:adl":"mocha --config test/mocha_mongodb.json test/manual/atlas-data-lake-testing","check:aws":"nyc mocha --config test/mocha_mongodb.json test/integration/auth/mongodb_aws.test.ts","check:oidc-auth":"mocha --config test/mocha_mongodb.json test/integration/auth/auth.spec.test.ts","check:oidc-test":"mocha --config test/mocha_mongodb.json test/integration/auth/mongodb_oidc.prose.test.ts","check:oidc-azure":"mocha --config test/mocha_mongodb.json test/integration/auth/mongodb_oidc_azure.prose.05.test.ts","check:oidc-gcp":"mocha --config test/mocha_mongodb.json test/integration/auth/mongodb_oidc_gcp.prose.06.test.ts","check:ocsp":"mocha --config test/manual/mocharc.json test/manual/ocsp_support.test.js","check:kerberos":"nyc mocha --config test/manual/mocharc.json test/manual/kerberos.test.ts","check:tls":"mocha --config test/manual/mocharc.json test/manual/tls_support.test.ts","check:ldap":"nyc mocha --config test/manual/mocharc.json test/manual/ldap.test.js","check:socks5":"mocha --config test/manual/mocharc.json test/manual/socks5.test.ts","check:csfle":"mocha --config test/mocha_mongodb.json test/integration/client-side-encryption","check:snappy":"mocha test/unit/assorted/snappy.test.js","check:x509":"mocha test/manual/x509_auth.test.ts","fix:eslint":"npm run check:eslint -- --fix",prepare:"node etc/prepare.js","preview:docs":"ts-node etc/docs/preview.ts",test:"npm run check:lint && npm run test:all","test:all":"npm run check:unit && npm run check:test","update:docs":"npm run build:docs -- --yes"},tsd:{directory:"test/types",compilerOptions:{strict:!0,target:"esnext",module:"commonjs",moduleResolution:"node"}}}}),xn=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getFAASEnv=e.addContainerMetadata=e.makeClientMetadata=e.LimitedSizeDocument=void 0;var u=ve("os"),d=ve("process"),h=Ue(),a=pe(),l=ye(),i=Mi().version,p=class{constructor(c){this.maxSize=c,this.document=new Map,this.documentSize=5}ifItFitsItSits(c,b){let f=h.BSON.serialize(new Map().set(c,b)).byteLength-5;return f+this.documentSize>this.maxSize?!1:(this.documentSize+=f,this.document.set(c,b),!0)}toObject(){return h.BSON.deserialize(h.BSON.serialize(this.document),{promoteLongs:!1,promoteBuffers:!1,promoteValues:!1,useBigInt64:!1})}};e.LimitedSizeDocument=p;function A(c){let b=new p(512),{appName:f=""}=c;if(f.length>0){let _=Buffer.byteLength(f,"utf8")<=128?c.appName:Buffer.from(f,"utf8").subarray(0,128).toString("utf8");b.ifItFitsItSits("application",{name:_})}let{name:O="",version:F="",platform:y=""}=c.driverInfo,g={name:O.length>0?`nodejs|${O}`:"nodejs",version:F.length>0?`${i}|${F}`:i};if(!b.ifItFitsItSits("driver",g))throw new a.MongoInvalidArgumentError("Unable to include driverInfo name and version, metadata cannot exceed 512 bytes");let T=m();if(y.length>0&&(T=`${T}|${y}`),!b.ifItFitsItSits("platform",T))throw new a.MongoInvalidArgumentError("Unable to include driverInfo platform, metadata cannot exceed 512 bytes");let D=new Map().set("name",d.platform).set("architecture",d.arch).set("version",u.release()).set("type",u.type());if(!b.ifItFitsItSits("os",D)){for(let _ of D.keys())if(D.delete(_),D.size===0||b.ifItFitsItSits("os",D))break}let N=E();if(N!=null&&!b.ifItFitsItSits("env",N)){for(let _ of N.keys())if(N.delete(_),N.size===0||b.ifItFitsItSits("env",N))break}return b.toObject()}e.makeClientMetadata=A;var o;async function n(){let c={};o??=(0,l.fileIsAccessible)("/.dockerenv");let b=await o,{KUBERNETES_SERVICE_HOST:f=""}=d.env,O=f.length>0;return b&&(c.runtime="docker"),O&&(c.orchestrator="kubernetes"),c}async function r(c){let b=await n();if(Object.keys(b).length===0)return c;let f=new p(512),O={...c?.env,container:b};for(let[F,y]of Object.entries(c))F!=="env"?f.ifItFitsItSits(F,y):f.ifItFitsItSits("env",O)||f.ifItFitsItSits("env",y);return"env"in c||f.ifItFitsItSits("env",O),f.toObject()}e.addContainerMetadata=r;function E(){let{AWS_EXECUTION_ENV:c="",AWS_LAMBDA_RUNTIME_API:b="",FUNCTIONS_WORKER_RUNTIME:f="",K_SERVICE:O="",FUNCTION_NAME:F="",VERCEL:y="",AWS_LAMBDA_FUNCTION_MEMORY_SIZE:g="",AWS_REGION:T="",FUNCTION_MEMORY_MB:D="",FUNCTION_REGION:N="",FUNCTION_TIMEOUT_SEC:_="",VERCEL_REGION:R=""}=d.env,j=c.startsWith("AWS_Lambda_")||b.length>0,L=f.length>0,I=O.length>0||F.length>0,M=y.length>0,S=new Map;return M&&!(L||I)?(R.length>0&&S.set("region",R),S.set("name","vercel"),S):j&&!(L||I||M)?(T.length>0&&S.set("region",T),g.length>0&&Number.isInteger(+g)&&S.set("memory_mb",new h.Int32(g)),S.set("name","aws.lambda"),S):L&&!(I||j||M)?(S.set("name","azure.func"),S):I&&!(L||j||M)?(N.length>0&&S.set("region",N),D.length>0&&Number.isInteger(+D)&&S.set("memory_mb",new h.Int32(D)),_.length>0&&Number.isInteger(+_)&&S.set("timeout_sec",new h.Int32(_)),S.set("name","gcp.func"),S):null}e.getFAASEnv=E;function m(){return"Deno"in globalThis?`Deno v${typeof Deno?.version?.deno=="string"?Deno?.version?.deno:"0.0.0-unknown"}, ${u.endianness()}`:"Bun"in globalThis?`Bun v${typeof Bun?.version=="string"?Bun?.version:"0.0.0-unknown"}, ${u.endianness()}`:`Node.js ${d.version}, ${u.endianness()}`}}),t1=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.OpCompressedRequest=e.OpMsgResponse=e.OpMsgRequest=e.OpReply=e.OpQueryRequest=void 0;var u=Ue(),d=pe(),h=qr(),a=Zt(),l=0,i=2,p=4,A=8,o=16,n=32,r=64,E=128,m=1,c=2,b=4,f=8,O=class Ln{constructor(I,M,S){this.databaseName=I,this.query=M;let v=`${I}.$cmd`;if(typeof I!="string")throw new d.MongoRuntimeError("Database name must be a string for a query");if(M==null)throw new d.MongoRuntimeError("A query document must be specified for query");if(v.indexOf("\0")!==-1)throw new d.MongoRuntimeError("Namespace cannot contain a null character");this.ns=v,this.numberToSkip=S.numberToSkip||0,this.numberToReturn=S.numberToReturn||0,this.returnFieldSelector=S.returnFieldSelector||void 0,this.requestId=S.requestId??Ln.getRequestId(),this.pre32Limit=S.pre32Limit,this.serializeFunctions=typeof S.serializeFunctions=="boolean"?S.serializeFunctions:!1,this.ignoreUndefined=typeof S.ignoreUndefined=="boolean"?S.ignoreUndefined:!1,this.maxBsonSize=S.maxBsonSize||1024*1024*16,this.checkKeys=typeof S.checkKeys=="boolean"?S.checkKeys:!1,this.batchSize=this.numberToReturn,this.tailable=!1,this.secondaryOk=typeof S.secondaryOk=="boolean"?S.secondaryOk:!1,this.oplogReplay=!1,this.noCursorTimeout=!1,this.awaitData=!1,this.exhaust=!1,this.partial=!1}incRequestId(){this.requestId=l++}nextRequestId(){return l+1}static getRequestId(){return++l}toBin(){let I=[],M=null,S=0;this.tailable&&(S|=i),this.secondaryOk&&(S|=p),this.oplogReplay&&(S|=A),this.noCursorTimeout&&(S|=o),this.awaitData&&(S|=n),this.exhaust&&(S|=r),this.partial&&(S|=E),this.batchSize!==this.numberToReturn&&(this.numberToReturn=this.batchSize);let v=Buffer.alloc(4*4+4+Buffer.byteLength(this.ns)+1+4+4);I.push(v);let w=u.serialize(this.query,{checkKeys:this.checkKeys,serializeFunctions:this.serializeFunctions,ignoreUndefined:this.ignoreUndefined});I.push(w),this.returnFieldSelector&&Object.keys(this.returnFieldSelector).length>0&&(M=u.serialize(this.returnFieldSelector,{checkKeys:this.checkKeys,serializeFunctions:this.serializeFunctions,ignoreUndefined:this.ignoreUndefined}),I.push(M));let k=v.length+w.length+(M?M.length:0),$=4;return v[3]=k>>24&255,v[2]=k>>16&255,v[1]=k>>8&255,v[0]=k&255,v[$+3]=this.requestId>>24&255,v[$+2]=this.requestId>>16&255,v[$+1]=this.requestId>>8&255,v[$]=this.requestId&255,$=$+4,v[$+3]=0,v[$+2]=0,v[$+1]=0,v[$]=0,$=$+4,v[$+3]=a.OP_QUERY>>24&255,v[$+2]=a.OP_QUERY>>16&255,v[$+1]=a.OP_QUERY>>8&255,v[$]=a.OP_QUERY&255,$=$+4,v[$+3]=S>>24&255,v[$+2]=S>>16&255,v[$+1]=S>>8&255,v[$]=S&255,$=$+4,$=$+v.write(this.ns,$,"utf8")+1,v[$-1]=0,v[$+3]=this.numberToSkip>>24&255,v[$+2]=this.numberToSkip>>16&255,v[$+1]=this.numberToSkip>>8&255,v[$]=this.numberToSkip&255,$=$+4,v[$+3]=this.numberToReturn>>24&255,v[$+2]=this.numberToReturn>>16&255,v[$+1]=this.numberToReturn>>8&255,v[$]=this.numberToReturn&255,$=$+4,I}};e.OpQueryRequest=O;var F=class{constructor(L,I,M,S){this.index=0,this.sections=[],this.moreToCome=!1,this.parsed=!1,this.raw=L,this.data=M,this.opts=S??{useBigInt64:!1,promoteLongs:!0,promoteValues:!0,promoteBuffers:!1,bsonRegExp:!1},this.length=I.length,this.requestId=I.requestId,this.responseTo=I.responseTo,this.opCode=I.opCode,this.fromCompressed=I.fromCompressed,this.useBigInt64=typeof this.opts.useBigInt64=="boolean"?this.opts.useBigInt64:!1,this.promoteLongs=typeof this.opts.promoteLongs=="boolean"?this.opts.promoteLongs:!0,this.promoteValues=typeof this.opts.promoteValues=="boolean"?this.opts.promoteValues:!0,this.promoteBuffers=typeof this.opts.promoteBuffers=="boolean"?this.opts.promoteBuffers:!1,this.bsonRegExp=typeof this.opts.bsonRegExp=="boolean"?this.opts.bsonRegExp:!1}isParsed(){return this.parsed}parse(){if(this.parsed)return this.sections[0];if(this.index=20,this.responseFlags=this.data.readInt32LE(0),this.cursorId=new u.Long(this.data.readInt32LE(4),this.data.readInt32LE(8)),this.startingFrom=this.data.readInt32LE(12),this.numberReturned=this.data.readInt32LE(16),this.numberReturned<0||this.numberReturned>2**32-1)throw new RangeError(`OP_REPLY numberReturned is an invalid array length ${this.numberReturned}`);this.cursorNotFound=(this.responseFlags&m)!==0,this.queryFailure=(this.responseFlags&c)!==0,this.shardConfigStale=(this.responseFlags&b)!==0,this.awaitCapable=(this.responseFlags&f)!==0;for(let L=0;L<this.numberReturned;L++){let I=this.data[this.index]|this.data[this.index+1]<<8|this.data[this.index+2]<<16|this.data[this.index+3]<<24,M=this.data.subarray(this.index,this.index+I);this.sections.push(M),this.index=this.index+I}return this.parsed=!0,this.sections[0]}};e.OpReply=F;var y=1,g=2,T=65536,D=class kn{constructor(I,M,S){if(this.databaseName=I,this.command=M,this.options=S,M==null)throw new d.MongoInvalidArgumentError("Query document must be specified for query");this.command.$db=I,this.options=S??{},this.requestId=S.requestId?S.requestId:kn.getRequestId(),this.serializeFunctions=typeof S.serializeFunctions=="boolean"?S.serializeFunctions:!1,this.ignoreUndefined=typeof S.ignoreUndefined=="boolean"?S.ignoreUndefined:!1,this.checkKeys=typeof S.checkKeys=="boolean"?S.checkKeys:!1,this.maxBsonSize=S.maxBsonSize||1024*1024*16,this.checksumPresent=!1,this.moreToCome=S.moreToCome||!1,this.exhaustAllowed=typeof S.exhaustAllowed=="boolean"?S.exhaustAllowed:!1}toBin(){let I=[],M=0;this.checksumPresent&&(M|=y),this.moreToCome&&(M|=g),this.exhaustAllowed&&(M|=T);let S=Buffer.alloc(4*4+4);I.push(S);let v=S.length,w=this.command;return v+=this.makeDocumentSegment(I,w),S.writeInt32LE(v,0),S.writeInt32LE(this.requestId,4),S.writeInt32LE(0,8),S.writeInt32LE(a.OP_MSG,12),S.writeUInt32LE(M,16),I}makeDocumentSegment(I,M){let S=Buffer.alloc(1);S[0]=0;let v=this.serializeBson(M);return I.push(S),I.push(v),S.length+v.length}serializeBson(I){return u.serialize(I,{checkKeys:this.checkKeys,serializeFunctions:this.serializeFunctions,ignoreUndefined:this.ignoreUndefined})}static getRequestId(){return l=l+1&2147483647,l}};e.OpMsgRequest=D;var N=class{constructor(L,I,M,S){this.index=0,this.sections=[],this.parsed=!1,this.raw=L,this.data=M,this.opts=S??{useBigInt64:!1,promoteLongs:!0,promoteValues:!0,promoteBuffers:!1,bsonRegExp:!1},this.length=I.length,this.requestId=I.requestId,this.responseTo=I.responseTo,this.opCode=I.opCode,this.fromCompressed=I.fromCompressed,this.responseFlags=M.readInt32LE(0),this.checksumPresent=(this.responseFlags&y)!==0,this.moreToCome=(this.responseFlags&g)!==0,this.exhaustAllowed=(this.responseFlags&T)!==0,this.useBigInt64=typeof this.opts.useBigInt64=="boolean"?this.opts.useBigInt64:!1,this.promoteLongs=typeof this.opts.promoteLongs=="boolean"?this.opts.promoteLongs:!0,this.promoteValues=typeof this.opts.promoteValues=="boolean"?this.opts.promoteValues:!0,this.promoteBuffers=typeof this.opts.promoteBuffers=="boolean"?this.opts.promoteBuffers:!1,this.bsonRegExp=typeof this.opts.bsonRegExp=="boolean"?this.opts.bsonRegExp:!1}isParsed(){return this.parsed}parse(){if(this.parsed)return this.sections[0];for(this.index=4;this.index<this.data.length;){let L=this.data.readUInt8(this.index++);if(L===0){let I=this.data.readUInt32LE(this.index),M=this.data.subarray(this.index,this.index+I);this.sections.push(M),this.index+=I}else if(L===1)throw new d.MongoRuntimeError("OP_MSG Payload Type 1 detected unsupported protocol")}return this.parsed=!0,this.sections[0]}};e.OpMsgResponse=N;var _=16,R=9,j=class{constructor(L,I){this.command=L,this.options=I}static canCompress(L){let I=L instanceof D?L.command:L.query,M=Object.keys(I)[0];return!h.uncompressibleCommands.has(M)}async toBin(){let L=Buffer.concat(this.command.toBin()),I=L.slice(_),M=L.readInt32LE(12),S=await(0,h.compress)(this.options,I),v=Buffer.alloc(_);v.writeInt32LE(_+R+S.length,0),v.writeInt32LE(this.command.requestId,4),v.writeInt32LE(0,8),v.writeInt32LE(a.OP_COMPRESSED,12);let w=Buffer.alloc(R);return w.writeInt32LE(M,0),w.writeInt32LE(I.length,4),w.writeUInt8(h.Compressor[this.options.agreedCompressor],8),[v,w,S]}};e.OpCompressedRequest=j}),qr=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decompressResponse=e.compressCommand=e.decompress=e.compress=e.uncompressibleCommands=e.Compressor=void 0;var u=ve("util"),d=ve("zlib"),h=Xe(),a=Ot(),l=pe(),i=t1(),p=Zt();e.Compressor=Object.freeze({none:0,snappy:1,zlib:2,zstd:3}),e.uncompressibleCommands=new Set([h.LEGACY_HELLO_COMMAND,"saslStart","saslContinue","getnonce","authenticate","createUser","updateUser","copydbSaslStart","copydbgetnonce","copydb"]);var A=3,o=(0,u.promisify)(d.inflate.bind(d)),n=(0,u.promisify)(d.deflate.bind(d)),r,E=null;function m(){if(E==null){let g=(0,a.getSnappy)();if("kModuleError"in g)throw g.kModuleError;E=g}return E}async function c(g,T){let D={};switch(g.agreedCompressor){case"snappy":return E??=m(),await E.compress(T);case"zstd":{if(f(),"kModuleError"in r)throw r.kModuleError;return await r.compress(T,A)}case"zlib":return g.zlibCompressionLevel&&(D.level=g.zlibCompressionLevel),await n(T,D);default:throw new l.MongoInvalidArgumentError(`Unknown compressor ${g.agreedCompressor} failed to compress`)}}e.compress=c;async function b(g,T){if(g!==e.Compressor.snappy&&g!==e.Compressor.zstd&&g!==e.Compressor.zlib&&g!==e.Compressor.none)throw new l.MongoDecompressionError(`Server sent message compressed using an unsupported compressor. (Received compressor ID ${g})`);switch(g){case e.Compressor.snappy:return E??=m(),await E.uncompress(T,{asBuffer:!0});case e.Compressor.zstd:{if(f(),"kModuleError"in r)throw r.kModuleError;return await r.decompress(T)}case e.Compressor.zlib:return await o(T);default:return T}}e.decompress=b;function f(){r||(r=(0,a.getZstdLibrary)())}var O=16;async function F(g,T){let D=await(T.agreedCompressor==="none"||!i.OpCompressedRequest.canCompress(g)?g:new i.OpCompressedRequest(g,{agreedCompressor:T.agreedCompressor??"none",zlibCompressionLevel:T.zlibCompressionLevel??0})).toBin();return Buffer.concat(D)}e.compressCommand=F;async function y(g){let T={length:g.readInt32LE(0),requestId:g.readInt32LE(4),responseTo:g.readInt32LE(8),opCode:g.readInt32LE(12)};if(T.opCode!==p.OP_COMPRESSED){let L=T.opCode===p.OP_MSG?i.OpMsgResponse:i.OpReply,I=g.subarray(O);return new L(g,T,I)}let D={...T,fromCompressed:!0,opCode:g.readInt32LE(O),length:g.readInt32LE(O+4)},N=g[O+8],_=g.slice(O+9),R=D.opCode===p.OP_MSG?i.OpMsgResponse:i.OpReply,j=await b(N,_);if(j.length!==D.length)throw new l.MongoDecompressionError("Message body and message header must be the same length");return new R(g,D,j)}e.decompressResponse=y}),Un=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hmacSha256Hook=e.hmacSha512Hook=e.aes256CtrDecryptHook=e.aes256CtrEncryptHook=e.aes256CbcDecryptHook=e.aes256CbcEncryptHook=e.signRsaSha256Hook=e.makeHmacHook=e.sha256Hook=e.randomHook=e.makeAES256Hook=void 0;var u=ve("crypto");function d(p,A){return function(o,n,r,E){let m;try{let c=u[p](A,o,n);c.setAutoPadding(!1),m=c.update(r);let b=c.final();b.length>0&&(m=Buffer.concat([m,b]))}catch(c){return c}return m.copy(E),m.length}}e.makeAES256Hook=d;function h(p,A){try{u.randomFillSync(p,0,A)}catch(o){return o}return A}e.randomHook=h;function a(p,A){let o;try{o=u.createHash("sha256").update(p).digest()}catch(n){return n}return o.copy(A),o.length}e.sha256Hook=a;function l(p){return(A,o,n)=>{let r;try{r=u.createHmac(p,A).update(o).digest()}catch(E){return E}return r.copy(n),r.length}}e.makeHmacHook=l;function i(p,A,o){let n;try{let r=u.createSign("sha256WithRSAEncryption"),E=Buffer.from(`-----BEGIN PRIVATE KEY-----
|
|
9
|
-
${p.toString("base64")}
|
|
10
|
-
-----END PRIVATE KEY-----
|
|
11
|
-
`);n=r.update(A).end().sign(E)}catch(r){return r}return n.copy(o),n.length}e.signRsaSha256Hook=i,e.aes256CbcEncryptHook=d("createCipheriv","aes-256-cbc"),e.aes256CbcDecryptHook=d("createDecipheriv","aes-256-cbc"),e.aes256CtrEncryptHook=d("createCipheriv","aes-256-ctr"),e.aes256CtrDecryptHook=d("createDecipheriv","aes-256-ctr"),e.hmacSha512Hook=l("sha512"),e.hmacSha256Hook=l("sha256")}),fr=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MongoCryptKMSRequestNetworkTimeoutError=e.MongoCryptAzureKMSRequestError=e.MongoCryptCreateEncryptedCollectionError=e.MongoCryptCreateDataKeyError=e.MongoCryptInvalidArgumentError=e.MongoCryptError=void 0;var u=pe(),d=class extends u.MongoError{constructor(A,o={}){super(A,o)}get name(){return"MongoCryptError"}};e.MongoCryptError=d;var h=class extends d{constructor(A){super(A)}get name(){return"MongoCryptInvalidArgumentError"}};e.MongoCryptInvalidArgumentError=h;var a=class extends d{constructor(A,{cause:o}){super(`Unable to complete creating data keys: ${o.message}`,{cause:o}),this.encryptedFields=A}get name(){return"MongoCryptCreateDataKeyError"}};e.MongoCryptCreateDataKeyError=a;var l=class extends d{constructor(A,{cause:o}){super(`Unable to create collection: ${o.message}`,{cause:o}),this.encryptedFields=A}get name(){return"MongoCryptCreateEncryptedCollectionError"}};e.MongoCryptCreateEncryptedCollectionError=l;var i=class extends d{constructor(A,o){super(A),this.body=o}get name(){return"MongoCryptAzureKMSRequestError"}};e.MongoCryptAzureKMSRequestError=i;var p=class extends d{get name(){return"MongoCryptKMSRequestNetworkTimeoutError"}};e.MongoCryptKMSRequestNetworkTimeoutError=p}),Ni=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MongocryptdManager=void 0;var u=pe(),d=class jn{constructor(a={}){this.uri=typeof a.mongocryptdURI=="string"&&a.mongocryptdURI.length>0?a.mongocryptdURI:jn.DEFAULT_MONGOCRYPTD_URI,this.bypassSpawn=!!a.mongocryptdBypassSpawn,this.spawnPath=a.mongocryptdSpawnPath||"",this.spawnArgs=[],Array.isArray(a.mongocryptdSpawnArgs)&&(this.spawnArgs=this.spawnArgs.concat(a.mongocryptdSpawnArgs)),this.spawnArgs.filter(l=>typeof l=="string").every(l=>l.indexOf("--idleShutdownTimeoutSecs")<0)&&this.spawnArgs.push("--idleShutdownTimeoutSecs","60")}async spawn(){let a=this.spawnPath||"mongocryptd",{spawn:l}=ve("child_process");this._child=l(a,this.spawnArgs,{stdio:"ignore",detached:!0}),this._child.on("error",()=>{}),this._child.unref()}async withRespawn(a){try{return await a()}catch(l){if(!(l instanceof u.MongoNetworkTimeoutError&&!this.bypassSpawn))throw l}return await this.spawn(),await a()}};d.DEFAULT_MONGOCRYPTD_URI="mongodb://localhost:27020",e.MongocryptdManager=d}),$n=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LegacyAWSTemporaryCredentialProvider=e.AWSSDKCredentialProvider=e.AWSTemporaryCredentialProvider=void 0;var u=Ot(),d=pe(),h=ye(),a="http://169.254.170.2",l="http://169.254.169.254",i="/latest/meta-data/iam/security-credentials",p=class xr{static get awsSDK(){return xr._awsSDK??=(0,u.getAwsCredentialProvider)(),xr._awsSDK}static get isAWSSDKInstalled(){return!("kModuleError"in xr.awsSDK)}};e.AWSTemporaryCredentialProvider=p;var A=class extends p{get provider(){if("kModuleError"in p.awsSDK)throw p.awsSDK.kModuleError;if(this._provider)return this._provider;let{AWS_STS_REGIONAL_ENDPOINTS:n="",AWS_REGION:r=""}=process.env;n=n.toLowerCase(),r=r.toLowerCase();let E=r.length!==0&&n.length!==0,m=n==="regional"||n==="legacy"&&!new Set(["ap-northeast-1","ap-south-1","ap-southeast-1","ap-southeast-2","aws-global","ca-central-1","eu-central-1","eu-north-1","eu-west-1","eu-west-2","eu-west-3","sa-east-1","us-east-1","us-east-2","us-west-1","us-west-2"]).has(r);return this._provider=E&&m?p.awsSDK.fromNodeProviderChain({clientConfig:{region:r}}):p.awsSDK.fromNodeProviderChain(),this._provider}async getCredentials(){try{let n=await this.provider();return{AccessKeyId:n.accessKeyId,SecretAccessKey:n.secretAccessKey,Token:n.sessionToken,Expiration:n.expiration}}catch(n){throw new d.MongoAWSError(n.message,{cause:n})}}};e.AWSSDKCredentialProvider=A;var o=class extends p{async getCredentials(){if(process.env.AWS_CONTAINER_CREDENTIALS_RELATIVE_URI)return await(0,h.request)(`${a}${process.env.AWS_CONTAINER_CREDENTIALS_RELATIVE_URI}`);let n=await(0,h.request)(`${l}/latest/api/token`,{method:"PUT",json:!1,headers:{"X-aws-ec2-metadata-token-ttl-seconds":30}}),r=await(0,h.request)(`${l}/${i}`,{json:!1,headers:{"X-aws-ec2-metadata-token":n}});return await(0,h.request)(`${l}/${i}/${r}`,{headers:{"X-aws-ec2-metadata-token":n}})}};e.LegacyAWSTemporaryCredentialProvider=o}),Ri=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.loadAWSCredentials=void 0;var u=$n();async function d(h){let a=new u.AWSSDKCredentialProvider,{SecretAccessKey:l="",AccessKeyId:i="",Token:p}=await a.getCredentials(),A={secretAccessKey:l,accessKeyId:i};return p!=null&&(A.sessionToken=p),{...h,aws:A}}e.loadAWSCredentials=d}),Wn=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.loadAzureCredentials=e.fetchAzureKMSToken=e.prepareRequest=e.addAzureParams=e.tokenCache=e.AzureCredentialCache=e.AZURE_BASE_URL=void 0;var u=pe(),d=ye(),h=fr(),a=6e3;e.AZURE_BASE_URL="http://169.254.169.254/metadata/identity/oauth2/token?";var l=class{constructor(){this.cachedToken=null}async getToken(){return(this.cachedToken==null||this.needsRefresh(this.cachedToken))&&(this.cachedToken=await this._getToken()),{accessToken:this.cachedToken.accessToken}}needsRefresh(r){return r.expiresOnTimestamp-Date.now()<=a}resetCache(){this.cachedToken=null}_getToken(){return o()}};e.AzureCredentialCache=l,e.tokenCache=new l;async function i(r){let{status:E,body:m}=r,c=(()=>{try{return JSON.parse(m)}catch{throw new h.MongoCryptAzureKMSRequestError("Malformed JSON body in GET request.")}})();if(E!==200)throw new h.MongoCryptAzureKMSRequestError("Unable to complete request.",c);if(!c.access_token)throw new h.MongoCryptAzureKMSRequestError("Malformed response body - missing field `access_token`.");if(!c.expires_in)throw new h.MongoCryptAzureKMSRequestError("Malformed response body - missing field `expires_in`.");let b=Number(c.expires_in)*1e3;if(Number.isNaN(b))throw new h.MongoCryptAzureKMSRequestError("Malformed response body - unable to parse int from `expires_in` field.");return{accessToken:c.access_token,expiresOnTimestamp:Date.now()+b}}function p(r,E,m){return r.searchParams.append("api-version","2018-02-01"),r.searchParams.append("resource",E),m&&r.searchParams.append("client_id",m),r}e.addAzureParams=p;function A(r){let E=new URL(r.url?.toString()??e.AZURE_BASE_URL);return p(E,"https://vault.azure.net"),{headers:{...r.headers,"Content-Type":"application/json",Metadata:!0},url:E}}e.prepareRequest=A;async function o(r={}){let{headers:E,url:m}=A(r);try{let c=await(0,d.get)(m,{headers:E});return await i(c)}catch(c){throw c instanceof u.MongoNetworkTimeoutError?new h.MongoCryptAzureKMSRequestError(`[Azure KMS] ${c.message}`):c}}e.fetchAzureKMSToken=o;async function n(r){let E=await e.tokenCache.getToken();return{...r,azure:E}}e.loadAzureCredentials=n}),Ii=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.loadGCPCredentials=void 0;var u=Ot();async function d(h){let a=(0,u.getGcpMetadata)();if("kModuleError"in a)return h;let{access_token:l}=await a.instance({property:"service-accounts/default/token"});return{...h,gcp:{accessToken:l}}}e.loadGCPCredentials=d}),zn=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.refreshKMSCredentials=e.isEmptyCredentials=void 0;var u=Ri(),d=Wn(),h=Ii();function a(i,p){let A=p[i];return A==null?!1:typeof A=="object"&&Object.keys(A).length===0}e.isEmptyCredentials=a;async function l(i){let p=i;return a("aws",i)&&(p=await(0,u.loadAWSCredentials)(p)),a("gcp",i)&&(p=await(0,h.loadGCPCredentials)(p)),a("azure",i)&&(p=await(0,d.loadAzureCredentials)(p)),p}e.refreshKMSCredentials=l}),Vn=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StateMachine=void 0;var u=ve("fs/promises"),d=ve("net"),h=ve("tls"),a=Ue(),l=Ot(),i=ye(),p=fr(),A=null;function o(){if(A==null){let _=(0,l.getSocks)();if("kModuleError"in _)throw _.kModuleError;A=_}return A}var n=0,r=1,E=2,m=3,c=7,b=4,f=5,O=6,F=443,y=new Map([[n,"MONGOCRYPT_CTX_ERROR"],[r,"MONGOCRYPT_CTX_NEED_MONGO_COLLINFO"],[E,"MONGOCRYPT_CTX_NEED_MONGO_MARKINGS"],[m,"MONGOCRYPT_CTX_NEED_MONGO_KEYS"],[c,"MONGOCRYPT_CTX_NEED_KMS_CREDENTIALS"],[b,"MONGOCRYPT_CTX_NEED_KMS"],[f,"MONGOCRYPT_CTX_READY"],[O,"MONGOCRYPT_CTX_DONE"]]),g=["tlsInsecure","tlsAllowInvalidCertificates","tlsAllowInvalidHostnames","tlsDisableOCSPEndpointCheck","tlsDisableCertificateRevocationCheck"];function T(_){process.env.MONGODB_CRYPT_DEBUG&&console.error(_)}var D,N=class{constructor(_,R=(0,a.pluckBSONSerializeOptions)(_)){this.options=_,this.bsonOptions=R}async execute(_,R){let j=_._keyVaultNamespace,L=_._keyVaultClient,I=_._metaDataClient,M=_._mongocryptdClient,S=_._mongocryptdManager,v=null;for(;R.state!==O&&R.state!==n;)switch(T(`[context#${R.id}] ${y.get(R.state)||R.state}`),R.state){case r:{let w=(0,a.deserialize)(R.nextMongoOperation());if(!I)throw new p.MongoCryptError("unreachable state machine state: entered MONGOCRYPT_CTX_NEED_MONGO_COLLINFO but metadata client is undefined");let k=await this.fetchCollectionInfo(I,R.ns,w);k&&R.addMongoOperationResponse(k),R.finishMongoOperation();break}case E:{let w=R.nextMongoOperation();if(!M)throw new p.MongoCryptError("unreachable state machine state: entered MONGOCRYPT_CTX_NEED_MONGO_MARKINGS but mongocryptdClient is undefined");let k=S?await S.withRespawn(this.markCommand.bind(this,M,R.ns,w)):await this.markCommand(M,R.ns,w);R.addMongoOperationResponse(k),R.finishMongoOperation();break}case m:{let w=R.nextMongoOperation(),k=await this.fetchKeys(L,j,w);k.length===0&&(v=D??=(0,a.serialize)({v:[]}));for await(let $ of k)R.addMongoOperationResponse((0,a.serialize)($));R.finishMongoOperation();break}case c:{let w=await _.askForKMSCredentials();R.provideKMSProviders((0,a.serialize)(w));break}case b:{let w=Array.from(this.requests(R));await Promise.all(w),R.finishKMSRequests();break}case f:{let w=R.finalize();if(R.state===n){let k=R.status.message||"Finalization error";throw new p.MongoCryptError(k)}v=w;break}default:throw new p.MongoCryptError(`Unknown state: ${R.state}`)}if(R.state===n||v==null){let w=R.status.message;throw w||T("unidentifiable error in MongoCrypt - received an error status from `libmongocrypt` but received no error message."),new p.MongoCryptError(w??"unidentifiable error in MongoCrypt - received an error status from `libmongocrypt` but received no error message.")}return v}async kmsRequest(_){let R=_.endpoint.split(":"),j=R[1]!=null?Number.parseInt(R[1],10):F,L={host:R[0],servername:R[0],port:j},I=_.message,M=new i.BufferPool,S=new d.Socket,v;function w(){for(let G of[v,S])G&&(G.removeAllListeners(),G.destroy())}function k(){return new p.MongoCryptError("KMS request timed out")}function $(G){return new p.MongoCryptError("KMS request failed",{cause:G})}function X(){return new p.MongoCryptError("KMS request closed")}let de=this.options.tlsOptions;if(de){let G=_.kmsProvider,Q=de[G];if(Q){let oe=this.validateTlsOptions(G,Q);if(oe)throw oe;try{await this.setTlsOptions(Q,L)}catch(Ee){throw $(Ee)}}}let{promise:Y,reject:se,resolve:x}=(0,i.promiseWithResolvers)();S.once("timeout",()=>se(k())).once("error",G=>se($(G))).once("close",()=>se(X())).once("connect",()=>x());try{if(this.options.proxyOptions&&this.options.proxyOptions.proxyHost){S.connect({host:this.options.proxyOptions.proxyHost,port:this.options.proxyOptions.proxyPort||1080}),await Y;try{A??=o(),L.socket=(await A.SocksClient.createConnection({existing_socket:S,command:"connect",destination:{host:L.host,port:L.port},proxy:{host:"iLoveJavaScript",port:0,type:5,userId:this.options.proxyOptions.proxyUsername,password:this.options.proxyOptions.proxyPassword}})).socket}catch(Ee){throw $(Ee)}}v=h.connect(L,()=>{v.write(I)});let{promise:G,reject:Q,resolve:oe}=(0,i.promiseWithResolvers)();v.once("timeout",()=>Q(k())).once("error",Ee=>Q($(Ee))).once("close",()=>Q(X())).on("data",Ee=>{for(M.append(Ee);_.bytesNeeded>0&&M.length;){let De=Math.min(_.bytesNeeded,M.length);_.addResponse(M.read(De))}_.bytesNeeded<=0&&oe()}),await G}finally{w()}}*requests(_){for(let R=_.nextKMSRequest();R!=null;R=_.nextKMSRequest())yield this.kmsRequest(R)}validateTlsOptions(_,R){let j=Object.keys(R);for(let L of g)if(j.includes(L))return new p.MongoCryptError(`Insecure TLS options prohibited for ${_}: ${L}`)}async setTlsOptions(_,R){if(_.tlsCertificateKeyFile){let j=await u.readFile(_.tlsCertificateKeyFile);R.cert=R.key=j}_.tlsCAFile&&(R.ca=await u.readFile(_.tlsCAFile)),_.tlsCertificateKeyFilePassword&&(R.passphrase=_.tlsCertificateKeyFilePassword)}async fetchCollectionInfo(_,R,j){let{db:L}=i.MongoDBCollectionNamespace.fromString(R),I=await _.db(L).listCollections(j,{promoteLongs:!1,promoteValues:!1}).toArray();return I.length>0?(0,a.serialize)(I[0]):null}async markCommand(_,R,j){let L={promoteLongs:!1,promoteValues:!1},{db:I}=i.MongoDBCollectionNamespace.fromString(R),M=(0,a.deserialize)(j,L),S=await _.db(I).command(M,L);return(0,a.serialize)(S,this.bsonOptions)}fetchKeys(_,R,j){let{db:L,collection:I}=i.MongoDBCollectionNamespace.fromString(R);return _.db(L).collection(I,{readConcern:{level:"majority"}}).find((0,a.deserialize)(j)).toArray()}};e.StateMachine=N}),Gn=J(e=>{"use strict";var u;Object.defineProperty(e,"__esModule",{value:!0}),e.AutoEncrypter=e.AutoEncryptionLoggerLevel=void 0;var d=Ue(),h=Xe(),a=Ot(),l=pe(),i=Xt(),p=ye(),A=Un(),o=fr(),n=Ni(),r=zn(),E=Vn();e.AutoEncryptionLoggerLevel=Object.freeze({FatalError:0,Error:1,Warning:2,Info:3,Trace:4});var m=class Vu{static getMongoCrypt(){let b=(0,a.getMongoDBClientEncryption)();if("kModuleError"in b)throw b.kModuleError;return b.MongoCrypt}constructor(b,f){this[u]=!1,this._client=b,this._bypassEncryption=f.bypassAutoEncryption===!0,this._keyVaultNamespace=f.keyVaultNamespace||"admin.datakeys",this._keyVaultClient=f.keyVaultClient||b,this._metaDataClient=f.metadataClient||b,this._proxyOptions=f.proxyOptions||{},this._tlsOptions=f.tlsOptions||{},this._kmsProviders=f.kmsProviders||{};let O={cryptoCallbacks:A};f.schemaMap&&(O.schemaMap=Buffer.isBuffer(f.schemaMap)?f.schemaMap:(0,d.serialize)(f.schemaMap)),f.encryptedFieldsMap&&(O.encryptedFieldsMap=Buffer.isBuffer(f.encryptedFieldsMap)?f.encryptedFieldsMap:(0,d.serialize)(f.encryptedFieldsMap)),O.kmsProviders=Buffer.isBuffer(this._kmsProviders)?this._kmsProviders:(0,d.serialize)(this._kmsProviders),f.options?.logger&&(O.logger=f.options.logger),f.extraOptions&&f.extraOptions.cryptSharedLibPath&&(O.cryptSharedLibPath=f.extraOptions.cryptSharedLibPath),f.bypassQueryAnalysis&&(O.bypassQueryAnalysis=f.bypassQueryAnalysis),this._bypassMongocryptdAndCryptShared=this._bypassEncryption||!!f.bypassQueryAnalysis,f.extraOptions&&f.extraOptions.cryptSharedLibSearchPaths?O.cryptSharedLibSearchPaths=f.extraOptions.cryptSharedLibSearchPaths:this._bypassMongocryptdAndCryptShared||(O.cryptSharedLibSearchPaths=["$SYSTEM"]);let F=Vu.getMongoCrypt();if(this._mongocrypt=new F(O),this._contextCounter=0,f.extraOptions&&f.extraOptions.cryptSharedLibRequired&&!this.cryptSharedLibVersionInfo)throw new o.MongoCryptInvalidArgumentError("`cryptSharedLibRequired` set but no crypt_shared library loaded");if(!this._bypassMongocryptdAndCryptShared&&!this.cryptSharedLibVersionInfo){this._mongocryptdManager=new n.MongocryptdManager(f.extraOptions);let y={serverSelectionTimeoutMS:1e4};(f.extraOptions==null||typeof f.extraOptions.mongocryptdURI!="string")&&(y.family=4),this._mongocryptdClient=new i.MongoClient(this._mongocryptdManager.uri,y)}}async init(){if(!(this._bypassMongocryptdAndCryptShared||this.cryptSharedLibVersionInfo)){if(!this._mongocryptdManager)throw new l.MongoRuntimeError("Reached impossible state: mongocryptdManager is undefined when neither bypassSpawn nor the shared lib are specified.");if(!this._mongocryptdClient)throw new l.MongoRuntimeError("Reached impossible state: mongocryptdClient is undefined when neither bypassSpawn nor the shared lib are specified.");this._mongocryptdManager.bypassSpawn||await this._mongocryptdManager.spawn();try{return await this._mongocryptdClient.connect()}catch(b){let{message:f}=b;throw f&&(f.match(/timed out after/)||f.match(/ENOTFOUND/))?new l.MongoRuntimeError("Unable to connect to `mongocryptd`, please make sure it is running or in your PATH for auto-spawn",{cause:b}):b}}}async teardown(b){await this._mongocryptdClient?.close(b)}async encrypt(b,f,O={}){if(this._bypassEncryption)return f;let F=Buffer.isBuffer(f)?f:(0,d.serialize)(f,O),y=this._mongocrypt.makeEncryptionContext(p.MongoDBCollectionNamespace.fromString(b).db,F);y.id=this._contextCounter++,y.ns=b,y.document=f;let g=new E.StateMachine({promoteValues:!1,promoteLongs:!1,proxyOptions:this._proxyOptions,tlsOptions:this._tlsOptions});return(0,d.deserialize)(await g.execute(this,y),{promoteValues:!1,promoteLongs:!1})}async decrypt(b,f={}){let O=this._mongocrypt.makeDecryptionContext(b);return O.id=this._contextCounter++,await new E.StateMachine({...f,proxyOptions:this._proxyOptions,tlsOptions:this._tlsOptions}).execute(this,O)}async askForKMSCredentials(){return await(0,r.refreshKMSCredentials)(this._kmsProviders)}get cryptSharedLibVersionInfo(){return this._mongocrypt.cryptSharedLibVersionInfo}static get libmongocryptVersion(){return Vu.getMongoCrypt().libmongocryptVersion}};e.AutoEncrypter=m,u=h.kDecorateResult}),_i=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Encrypter=void 0;var u=ve("util"),d=Gn(),h=Xe(),a=Ot(),l=pe(),i=Xt(),p=Symbol("internalClient"),A=class{constructor(o,n,r){if(typeof r.autoEncryption!="object")throw new l.MongoInvalidArgumentError('Option "autoEncryption" must be specified');this[p]=null,this.bypassAutoEncryption=!!r.autoEncryption.bypassAutoEncryption,this.needsConnecting=!1,r.maxPoolSize===0&&r.autoEncryption.keyVaultClient==null?r.autoEncryption.keyVaultClient=o:r.autoEncryption.keyVaultClient==null&&(r.autoEncryption.keyVaultClient=this.getInternalClient(o,n,r)),this.bypassAutoEncryption?r.autoEncryption.metadataClient=void 0:r.maxPoolSize===0?r.autoEncryption.metadataClient=o:r.autoEncryption.metadataClient=this.getInternalClient(o,n,r),r.proxyHost&&(r.autoEncryption.proxyOptions={proxyHost:r.proxyHost,proxyPort:r.proxyPort,proxyUsername:r.proxyUsername,proxyPassword:r.proxyPassword}),this.autoEncrypter=new d.AutoEncrypter(o,r.autoEncryption)}getInternalClient(o,n,r){let E=this[p];if(E==null){let m={};for(let c of[...Object.getOwnPropertyNames(r),...Object.getOwnPropertySymbols(r)])["autoEncryption","minPoolSize","servers","caseTranslate","dbName"].includes(c)||Reflect.set(m,c,Reflect.get(r,c));m.minPoolSize=0,E=new i.MongoClient(n,m),this[p]=E;for(let c of h.MONGO_CLIENT_EVENTS)for(let b of o.listeners(c))E.on(c,b);o.on("newListener",(c,b)=>{E?.on(c,b)}),this.needsConnecting=!0}return E}async connectInternalClient(){let o=this[p];this.needsConnecting&&o!=null&&(this.needsConnecting=!1,await o.connect())}closeCallback(o,n,r){(0,u.callbackify)(this.close.bind(this))(o,n,r)}async close(o,n){let r;try{await this.autoEncrypter.teardown(n)}catch(m){r=m}let E=this[p];if(E!=null&&o!==E)return await E.close(n);if(r!=null)throw r}static checkForMongoCrypt(){let o=(0,a.getMongoDBClientEncryption)();if("kModuleError"in o)throw new l.MongoMissingDependencyError("Auto-encryption requested, but the module is not installed. Please add `mongodb-client-encryption` as a dependency of your project",{cause:o.kModuleError,dependencyName:"mongodb-client-encryption"})}};e.Encrypter=A}),Hn=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SENSITIVE_COMMANDS=e.CommandFailedEvent=e.CommandSucceededEvent=e.CommandStartedEvent=void 0;var u=Xe(),d=ye(),h=t1(),a=class{constructor(F,y,g){this.name=u.COMMAND_STARTED;let T=b(y),D=A(T),{address:N,connectionId:_,serviceId:R}=O(F);e.SENSITIVE_COMMANDS.has(D)&&(this.commandObj={},this.commandObj[D]=!0),this.address=N,this.connectionId=_,this.serviceId=R,this.requestId=y.requestId,this.databaseName=y.databaseName,this.commandName=D,this.command=r(D,T,T),this.serverConnectionId=g}get hasServiceId(){return!!this.serviceId}};e.CommandStartedEvent=a;var l=class{constructor(F,y,g,T,D){this.name=u.COMMAND_SUCCEEDED;let N=b(y),_=A(N),{address:R,connectionId:j,serviceId:L}=O(F);this.address=R,this.connectionId=j,this.serviceId=L,this.requestId=y.requestId,this.commandName=_,this.duration=(0,d.calculateDurationInMs)(T),this.reply=r(_,N,f(y,g)),this.serverConnectionId=D}get hasServiceId(){return!!this.serviceId}};e.CommandSucceededEvent=l;var i=class{constructor(F,y,g,T,D){this.name=u.COMMAND_FAILED;let N=b(y),_=A(N),{address:R,connectionId:j,serviceId:L}=O(F);this.address=R,this.connectionId=j,this.serviceId=L,this.requestId=y.requestId,this.commandName=_,this.duration=(0,d.calculateDurationInMs)(T),this.failure=r(_,N,g),this.serverConnectionId=D}get hasServiceId(){return!!this.serviceId}};e.CommandFailedEvent=i,e.SENSITIVE_COMMANDS=new Set(["authenticate","saslStart","saslContinue","getnonce","createUser","updateUser","copydbgetnonce","copydbsaslstart","copydb"]);var p=new Set(["hello",u.LEGACY_HELLO_COMMAND,u.LEGACY_HELLO_COMMAND_CAMEL_CASE]),A=F=>Object.keys(F)[0],o=F=>F.ns,n=F=>F.ns.split(".")[1],r=(F,y,g)=>e.SENSITIVE_COMMANDS.has(F)||p.has(F)&&y.speculativeAuthenticate?{}:g,E={$query:"filter",$orderby:"sort",$hint:"hint",$comment:"comment",$maxScan:"maxScan",$max:"max",$min:"min",$returnKey:"returnKey",$showDiskLoc:"showRecordId",$maxTimeMS:"maxTimeMS",$snapshot:"snapshot"},m={numberToSkip:"skip",numberToReturn:"batchSize",returnFieldSelector:"projection"},c=["tailable","oplogReplay","noCursorTimeout","awaitData","partial","exhaust"];function b(F){if(F instanceof h.OpMsgRequest)return(0,d.deepCopy)(F.command);if(F.query?.$query){let T;return F.ns==="admin.$cmd"?T=Object.assign({},F.query.$query):(T={find:n(F)},Object.keys(E).forEach(D=>{F.query[D]!=null&&(T[E[D]]=(0,d.deepCopy)(F.query[D]))})),Object.keys(m).forEach(D=>{let N=D;F[N]!=null&&(T[m[N]]=(0,d.deepCopy)(F[N]))}),c.forEach(D=>{F[D]&&(T[D]=F[D])}),F.pre32Limit!=null&&(T.limit=F.pre32Limit),F.query.$explain?{explain:T}:T}let y={},g={};if(F.query){for(let T in F.query)y[T]=(0,d.deepCopy)(F.query[T]);g.query=y}for(let T in F)T!=="query"&&(g[T]=(0,d.deepCopy)(F[T]));return F.query?y:g}function f(F,y){return y&&(F instanceof h.OpMsgRequest?(0,d.deepCopy)(y.result?y.result:y):F.query&&F.query.$query!=null?{ok:1,cursor:{id:(0,d.deepCopy)(y.cursorId),ns:o(F),firstBatch:(0,d.deepCopy)(y.documents)}}:(0,d.deepCopy)(y.result?y.result:y))}function O(F){let y;return"id"in F&&(y=F.id),{address:F.address,serviceId:F.serviceId,connectionId:y}}}),Pi=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.StreamDescription=void 0;var u=Ue(),d=pt(),h=zr(),a=["minWireVersion","maxWireVersion","maxBsonObjectSize","maxMessageSizeBytes","maxWriteBatchSize","logicalSessionTimeoutMinutes"],l=class{constructor(i,p){this.hello=null,this.address=i,this.type=d.ServerType.Unknown,this.minWireVersion=void 0,this.maxWireVersion=void 0,this.maxBsonObjectSize=16777216,this.maxMessageSizeBytes=48e6,this.maxWriteBatchSize=1e5,this.logicalSessionTimeoutMinutes=p?.logicalSessionTimeoutMinutes,this.loadBalanced=!!p?.loadBalanced,this.compressors=p&&p.compressors&&Array.isArray(p.compressors)?p.compressors:[],this.serverConnectionId=null}receiveResponse(i){if(i!=null){this.hello=i,this.type=(0,h.parseServerType)(i),"connectionId"in i?this.serverConnectionId=this.parseServerConnectionID(i.connectionId):this.serverConnectionId=null;for(let p of a)i[p]!=null&&(this[p]=i[p]),"__nodejs_mock_server__"in i&&(this.__nodejs_mock_server__=i.__nodejs_mock_server__);i.compression&&(this.compressor=this.compressors.filter(p=>i.compression?.includes(p))[0])}}parseServerConnectionID(i){return u.Long.isLong(i)?i.toBigInt():BigInt(i)}};e.StreamDescription=l}),xi=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.onData=void 0;var u=ye();function d(h){let a=new u.List,l=new u.List,i=null,p=!1,A={next(){let E=a.shift();if(E!=null)return Promise.resolve({value:E,done:!1});if(i!=null){let f=Promise.reject(i);return i=null,f}if(p)return r();let{promise:m,resolve:c,reject:b}=(0,u.promiseWithResolvers)();return l.push({resolve:c,reject:b}),m},return(){return r()},throw(E){return n(E),Promise.resolve({value:void 0,done:!0})},[Symbol.asyncIterator](){return this}};return h.on("data",o),h.on("error",n),A;function o(E){let m=l.shift();m!=null?m.resolve({value:E,done:!1}):a.push(E)}function n(E){let m=l.shift();m!=null?m.reject(E):i=E,r()}function r(){h.off("data",o),h.off("error",n),p=!0;let E={value:void 0,done:p};for(let m of l)m.resolve(E);return Promise.resolve(E)}}e.onData=d}),r1=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CryptoConnection=e.SizedMessageTransform=e.Connection=e.hasSessionSupport=void 0;var u=ve("stream"),d=ve("timers"),h=Ue(),a=Xe(),l=pe(),i=Qt(),p=Et(),A=rt(),o=pt(),n=Vr(),r=ye(),E=Hn(),m=t1(),c=Pi(),b=qr(),f=xi(),O=Tt(),F=sn();function y(_){return _.description.logicalSessionTimeoutMinutes!=null}e.hasSessionSupport=y;function g(_,R){if(R.proxyHost)return R.hostAddress.toString();let{remoteAddress:j,remotePort:L}=_;return typeof j=="string"&&typeof L=="number"?r.HostAddress.fromHostPort(j,L).toString():(0,r.uuidV4)().toString("hex")}var T=class _t extends p.TypedEventEmitter{constructor(R,j){super(),this.lastHelloMS=-1,this.helloOk=!1,this.delayedTimeoutId=null,this.closed=!1,this.clusterTime=null,this.error=null,this.dataEvents=null,this.socket=R,this.id=j.id,this.address=g(R,j),this.socketTimeoutMS=j.socketTimeoutMS??0,this.monitorCommands=j.monitorCommands,this.serverApi=j.serverApi,this.mongoLogger=j.mongoLogger,this.established=!1,this.description=new c.StreamDescription(this.address,j),this.generation=j.generation,this.lastUseTime=(0,r.now)(),this.messageStream=this.socket.on("error",this.onError.bind(this)).pipe(new D({connection:this})).on("error",this.onError.bind(this)),this.socket.on("close",this.onClose.bind(this)),this.socket.on("timeout",this.onTimeout.bind(this))}get hello(){return this.description.hello}set hello(R){this.description.receiveResponse(R),Object.freeze(this.description)}get serviceId(){return this.hello?.serviceId}get loadBalanced(){return this.description.loadBalanced}get idleTime(){return(0,r.calculateDurationInMs)(this.lastUseTime)}get hasSessionSupport(){return this.description.logicalSessionTimeoutMinutes!=null}get supportsOpMsg(){return this.description!=null&&(0,r.maxWireVersion)(this)>=6&&!this.description.__nodejs_mock_server__}get shouldEmitAndLogCommand(){return(this.monitorCommands||this.established&&!this.authContext?.reauthenticating&&this.mongoLogger?.willLog(i.MongoLoggableComponent.COMMAND,i.SeverityLevel.DEBUG))??!1}markAvailable(){this.lastUseTime=(0,r.now)()}onError(R){this.cleanup(R)}onClose(){let R=`connection ${this.id} to ${this.address} closed`;this.cleanup(new l.MongoNetworkError(R))}onTimeout(){this.delayedTimeoutId=(0,d.setTimeout)(()=>{let R=`connection ${this.id} to ${this.address} timed out`,j=this.hello==null;this.cleanup(new l.MongoNetworkTimeoutError(R,{beforeHandshake:j}))},1).unref()}destroy(){if(this.closed)return;this.removeAllListeners(_t.PINNED),this.removeAllListeners(_t.UNPINNED);let R=`connection ${this.id} to ${this.address} closed`;this.cleanup(new l.MongoNetworkError(R))}cleanup(R){this.closed||(this.socket.destroy(),this.error=R,this.dataEvents?.throw(R).then(void 0,r.squashError),this.closed=!0,this.emit(_t.CLOSE))}prepareCommand(R,j,L){let I={...j},M=(0,F.getReadPreference)(L),S=L?.session,v=this.clusterTime;if(this.serverApi){let{version:k,strict:$,deprecationErrors:X}=this.serverApi;I.apiVersion=k,$!=null&&(I.apiStrict=$),X!=null&&(I.apiDeprecationErrors=X)}if(this.hasSessionSupport&&S){S.clusterTime&&v&&S.clusterTime.clusterTime.greaterThan(v.clusterTime)&&(v=S.clusterTime);let k=(0,n.applySession)(S,I,L);if(k)throw k}else if(S?.explicit)throw new l.MongoCompatibilityError("Current topology does not support sessions");v&&(I.$clusterTime=v),this.description.type!==o.ServerType.Standalone&&(!(0,F.isSharded)(this)&&!this.description.loadBalanced&&this.supportsOpMsg&&L.directConnection===!0&&M?.mode==="primary"?I.$readPreference=A.ReadPreference.primaryPreferred.toJSON():(0,F.isSharded)(this)&&!this.supportsOpMsg&&M?.mode!=="primary"?I={$query:I,$readPreference:M.toJSON()}:M?.mode!=="primary"&&(I.$readPreference=M.toJSON()));let w={numberToSkip:0,numberToReturn:-1,checkKeys:!1,secondaryOk:M.secondaryOk(),...L};return this.supportsOpMsg?new m.OpMsgRequest(R,I,w):new m.OpQueryRequest(R,I,w)}async*sendWire(R,j,L){this.throwIfAborted(),typeof j.socketTimeoutMS=="number"?this.socket.setTimeout(j.socketTimeoutMS):this.socketTimeoutMS!==0&&this.socket.setTimeout(this.socketTimeoutMS);try{if(await this.writeCommand(R,{agreedCompressor:this.description.compressor??"none",zlibCompressionLevel:this.description.zlibCompressionLevel}),j.noResponse){yield O.MongoDBResponse.empty;return}this.throwIfAborted();for await(let I of this.readMany()){this.socket.setTimeout(0);let M=I.parse();yield(L??O.MongoDBResponse).make(M),this.throwIfAborted(),typeof j.socketTimeoutMS=="number"?this.socket.setTimeout(j.socketTimeoutMS):this.socketTimeoutMS!==0&&this.socket.setTimeout(this.socketTimeoutMS)}}finally{this.socket.setTimeout(0)}}async*sendCommand(R,j,L,I){let M=this.prepareCommand(R.db,j,L),S=0;this.shouldEmitAndLogCommand&&(S=(0,r.now)(),this.emitAndLogCommand(this.monitorCommands,_t.COMMAND_STARTED,M.databaseName,this.established,new E.CommandStartedEvent(this,M,this.description.serverConnectionId)));let v=L.documentsReturnedIn==null||!L.raw?L:{...L,raw:!1,fieldsAsRaw:{[L.documentsReturnedIn]:!0}},w,k;try{this.throwIfAborted();for await(w of this.sendWire(M,L,I)){if(k=void 0,L.session!=null&&(0,n.updateSessionFromResponse)(L.session,w),w.$clusterTime&&(this.clusterTime=w.$clusterTime,this.emit(_t.CLUSTER_TIME_RECEIVED,w.$clusterTime)),w.ok===0)throw new l.MongoServerError(k??=w.toObject(v));this.shouldEmitAndLogCommand&&this.emitAndLogCommand(this.monitorCommands,_t.COMMAND_SUCCEEDED,M.databaseName,this.established,new E.CommandSucceededEvent(this,M,L.noResponse?void 0:k??=w.toObject(v),S,this.description.serverConnectionId)),I==null?yield k??=w.toObject(v):yield w,this.throwIfAborted()}}catch($){throw this.shouldEmitAndLogCommand&&this.emitAndLogCommand(this.monitorCommands,_t.COMMAND_FAILED,M.databaseName,this.established,new E.CommandFailedEvent(this,M,$,S,this.description.serverConnectionId)),$}}async command(R,j,L={},I){this.throwIfAborted();for await(let M of this.sendCommand(R,j,L,I))return M;throw new l.MongoUnexpectedServerResponseError("Unable to get response from server")}exhaustCommand(R,j,L,I){(async()=>{this.throwIfAborted();for await(let M of this.sendCommand(R,j,L))I(void 0,M),this.throwIfAborted();throw new l.MongoUnexpectedServerResponseError("Server ended moreToCome unexpectedly")})().then(void 0,I)}throwIfAborted(){if(this.error)throw this.error}async writeCommand(R,j){let L=j.agreedCompressor==="none"||!m.OpCompressedRequest.canCompress(R)?R:new m.OpCompressedRequest(R,{agreedCompressor:j.agreedCompressor??"none",zlibCompressionLevel:j.zlibCompressionLevel??0}),I=Buffer.concat(await L.toBin());if(!this.socket.write(I))return await(0,r.once)(this.socket,"drain")}async*readMany(){try{this.dataEvents=(0,f.onData)(this.messageStream);for await(let R of this.dataEvents){let j=await(0,b.decompressResponse)(R);if(yield j,!j.moreToCome)return}}finally{this.dataEvents=null,this.throwIfAborted()}}};T.COMMAND_STARTED=a.COMMAND_STARTED,T.COMMAND_SUCCEEDED=a.COMMAND_SUCCEEDED,T.COMMAND_FAILED=a.COMMAND_FAILED,T.CLUSTER_TIME_RECEIVED=a.CLUSTER_TIME_RECEIVED,T.CLOSE=a.CLOSE,T.PINNED=a.PINNED,T.UNPINNED=a.UNPINNED,e.Connection=T;var D=class extends u.Transform{constructor({connection:_}){super({objectMode:!1}),this.bufferPool=new r.BufferPool,this.connection=_}_transform(_,R,j){this.connection.delayedTimeoutId!=null&&((0,d.clearTimeout)(this.connection.delayedTimeoutId),this.connection.delayedTimeoutId=null),this.bufferPool.append(_);let L=this.bufferPool.getInt32();if(L==null)return j();if(L<0)return j(new l.MongoParseError(`Invalid message size: ${L}, too small`));if(L>this.bufferPool.length)return j();let I=this.bufferPool.read(L);return j(null,I)}};e.SizedMessageTransform=D;var N=class extends T{constructor(_,R){super(_,R),this.autoEncrypter=R.autoEncrypter}async command(_,R,j,L){let{autoEncrypter:I}=this;if(!I)throw new l.MongoMissingDependencyError("No AutoEncrypter available for encryption",{dependencyName:"n/a"});let M=(0,r.maxWireVersion)(this);if(M===0)return await super.command(_,R,j,L);if(M<8)throw new l.MongoCompatibilityError("Auto-encryption requires a minimum MongoDB version of 4.2");let S=R.find||R.findAndModify?R.sort:null,v=R.createIndexes?R.indexes.map(de=>de.key):null,w=await I.encrypt(_.toString(),R,j);if(S!=null&&(R.find||R.findAndModify)&&(w.sort=S),v!=null&&R.createIndexes)for(let[de,Y]of v.entries())w.indexes[de].key=Y;let k=await super.command(_,w,j,L??O.MongoDBResponse),$=await I.decrypt(k.toBytes(),j),X=L?.make($)??(0,h.deserialize)($,j);return I[a.kDecorateResult]&&(L==null?(0,r.decorateDecryptionResult)(X,k.toObject(),!0):X instanceof O.CursorResponse&&(X.encryptedResponse=k)),X}};e.CryptoConnection=N}),qn=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.makeSocket=e.LEGAL_TCP_SOCKET_OPTIONS=e.LEGAL_TLS_SOCKET_OPTIONS=e.prepareHandshakeDocument=e.performInitialHandshake=e.makeConnection=e.connect=void 0;var u=ve("net"),d=ve("tls"),h=Xe(),a=Ot(),l=pe(),i=ye(),p=xt(),A=Mt(),o=r1(),n=Zt();async function r(N){let _=null;try{let R=await F(N);return _=E(N,R),await c(_,N),_}catch(R){throw _?.destroy(),R}}e.connect=r;function E(N,_){let R=N.connectionType??o.Connection;return N.autoEncrypter&&(R=o.CryptoConnection),new R(_,N)}e.makeConnection=E;function m(N,_){let R=Number(N.maxWireVersion),j=Number(N.minWireVersion),L=!Number.isNaN(R)&&R>=n.MIN_SUPPORTED_WIRE_VERSION,I=!Number.isNaN(j)&&j<=n.MAX_SUPPORTED_WIRE_VERSION;if(L){if(I)return null;let S=`Server at ${_.hostAddress} reports minimum wire version ${JSON.stringify(N.minWireVersion)}, but this version of the Node.js Driver requires at most ${n.MAX_SUPPORTED_WIRE_VERSION} (MongoDB ${n.MAX_SUPPORTED_SERVER_VERSION})`;return new l.MongoCompatibilityError(S)}let M=`Server at ${_.hostAddress} reports maximum wire version ${JSON.stringify(N.maxWireVersion)??0}, but this version of the Node.js Driver requires at least ${n.MIN_SUPPORTED_WIRE_VERSION} (MongoDB ${n.MIN_SUPPORTED_SERVER_VERSION})`;return new l.MongoCompatibilityError(M)}async function c(N,_){let R=_.credentials;if(R&&R.mechanism!==A.AuthMechanism.MONGODB_DEFAULT&&!_.authProviders.getOrCreateProvider(R.mechanism,R.mechanismProperties))throw new l.MongoInvalidArgumentError(`AuthMechanism '${R.mechanism}' not supported`);let j=new p.AuthContext(N,R,_);N.authContext=j;let L=await b(j),I={..._,raw:!1};typeof _.connectTimeoutMS=="number"&&(I.socketTimeoutMS=_.connectTimeoutMS);let M=new Date().getTime(),S=await N.command((0,i.ns)("admin.$cmd"),L,I);"isWritablePrimary"in S||(S.isWritablePrimary=S[h.LEGACY_HELLO_COMMAND]),S.helloOk&&(N.helloOk=!0);let v=m(S,_);if(v)throw v;if(_.loadBalanced&&!S.serviceId)throw new l.MongoCompatibilityError("Driver attempted to initialize in load balancing mode, but the server does not support this mode.");if(N.hello=S,N.lastHelloMS=new Date().getTime()-M,!S.arbiterOnly&&R){j.response=S;let w=R.resolveAuthMechanism(S),k=_.authProviders.getOrCreateProvider(w.mechanism,w.mechanismProperties);if(!k)throw new l.MongoInvalidArgumentError(`No AuthProvider for ${w.mechanism} defined.`);try{await k.auth(j)}catch($){throw $ instanceof l.MongoError&&($.addErrorLabel(l.MongoErrorLabel.HandshakeError),(0,l.needsRetryableWriteLabel)($,S.maxWireVersion)&&$.addErrorLabel(l.MongoErrorLabel.RetryableWriteError)),$}}N.established=!0}e.performInitialHandshake=c;async function b(N){let _=N.options,R=_.compressors?_.compressors:[],{serverApi:j}=N.connection,L=await _.extendedMetadata,I={[j?.version||_.loadBalanced===!0?"hello":h.LEGACY_HELLO_COMMAND]:1,helloOk:!0,client:L,compression:R};_.loadBalanced===!0&&(I.loadBalanced=!0);let M=N.credentials;if(M){if(M.mechanism===A.AuthMechanism.MONGODB_DEFAULT&&M.username){I.saslSupportedMechs=`${M.source}.${M.username}`;let v=N.options.authProviders.getOrCreateProvider(A.AuthMechanism.MONGODB_SCRAM_SHA256,M.mechanismProperties);if(!v)throw new l.MongoInvalidArgumentError(`No AuthProvider for ${A.AuthMechanism.MONGODB_SCRAM_SHA256} defined.`);return await v.prepare(I,N)}let S=N.options.authProviders.getOrCreateProvider(M.mechanism,M.mechanismProperties);if(!S)throw new l.MongoInvalidArgumentError(`No AuthProvider for ${M.mechanism} defined.`);return await S.prepare(I,N)}return I}e.prepareHandshakeDocument=b,e.LEGAL_TLS_SOCKET_OPTIONS=["ALPNProtocols","ca","cert","checkServerIdentity","ciphers","crl","ecdhCurve","key","minDHSize","passphrase","pfx","rejectUnauthorized","secureContext","secureProtocol","servername","session"],e.LEGAL_TCP_SOCKET_OPTIONS=["family","hints","localAddress","localPort","lookup"];function f(N){let _=N.hostAddress;if(!_)throw new l.MongoInvalidArgumentError('Option "hostAddress" is required');let R={};for(let j of e.LEGAL_TCP_SOCKET_OPTIONS)N[j]!=null&&(R[j]=N[j]);if(typeof _.socketPath=="string")return R.path=_.socketPath,R;if(typeof _.host=="string")return R.host=_.host,R.port=_.port,R;throw new l.MongoRuntimeError(`Unexpected HostAddress ${JSON.stringify(_)}`)}function O(N){let _=f(N);for(let R of e.LEGAL_TLS_SOCKET_OPTIONS)N[R]!=null&&(_[R]=N[R]);return N.existingSocket&&(_.socket=N.existingSocket),_.servername==null&&_.host&&!u.isIP(_.host)&&(_.servername=_.host),_}async function F(N){let _=N.tls??!1,R=N.noDelay??!0,j=N.connectTimeoutMS??3e4,L=N.existingSocket,I;if(N.proxyHost!=null)return await T({...N,connectTimeoutMS:j});if(_){let k=d.connect(O(N));typeof k.disableRenegotiation=="function"&&k.disableRenegotiation(),I=k}else L?I=L:I=u.createConnection(f(N));I.setKeepAlive(!0,3e5),I.setTimeout(j),I.setNoDelay(R);let M=null,{promise:S,resolve:v,reject:w}=(0,i.promiseWithResolvers)();if(L)v(I);else{let k=_?"secureConnect":"connect";I.once(k,()=>v(I)).once("error",$=>w(D("error",$))).once("timeout",()=>w(D("timeout"))).once("close",()=>w(D("close"))),N.cancellationToken!=null&&(M=()=>w(D("cancel")),N.cancellationToken.once("cancel",M))}try{return I=await S,I}catch(k){throw I.destroy(),k}finally{I.setTimeout(0),I.removeAllListeners(),M!=null&&N.cancellationToken?.removeListener("cancel",M)}}e.makeSocket=F;var y=null;function g(){if(y==null){let N=(0,a.getSocks)();if("kModuleError"in N)throw N.kModuleError;y=N}return y}async function T(N){let _=i.HostAddress.fromHostPort(N.proxyHost??"",N.proxyPort??1080),R=await F({...N,hostAddress:_,tls:!1,proxyHost:void 0}),j=f(N);if(typeof j.host!="string"||typeof j.port!="number")throw new l.MongoInvalidArgumentError("Can only make Socks5 connections to TCP hosts");y??=g();try{let{socket:L}=await y.SocksClient.createConnection({existing_socket:R,timeout:N.connectTimeoutMS,command:"connect",destination:{host:j.host,port:j.port},proxy:{host:"iLoveJavaScript",port:0,type:5,userId:N.proxyUsername||void 0,password:N.proxyPassword||void 0}});return await F({...N,existingSocket:L,proxyHost:void 0})}catch(L){throw D("error",L)}}function D(N,_){switch(N){case"error":return new l.MongoNetworkError(l.MongoError.buildErrorMessage(_),{cause:_});case"timeout":return new l.MongoNetworkTimeoutError("connection timed out");case"close":return new l.MongoNetworkError("connection closed");case"cancel":return new l.MongoNetworkError("connection establishment was cancelled");default:return new l.MongoNetworkError("unknown network error")}}}),u1=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ServerHeartbeatFailedEvent=e.ServerHeartbeatSucceededEvent=e.ServerHeartbeatStartedEvent=e.TopologyClosedEvent=e.TopologyOpeningEvent=e.TopologyDescriptionChangedEvent=e.ServerClosedEvent=e.ServerOpeningEvent=e.ServerDescriptionChangedEvent=void 0;var u=Xe(),d=class{constructor(r,E,m,c){this.name=u.SERVER_DESCRIPTION_CHANGED,this.topologyId=r,this.address=E,this.previousDescription=m,this.newDescription=c}};e.ServerDescriptionChangedEvent=d;var h=class{constructor(r,E){this.name=u.SERVER_OPENING,this.topologyId=r,this.address=E}};e.ServerOpeningEvent=h;var a=class{constructor(r,E){this.name=u.SERVER_CLOSED,this.topologyId=r,this.address=E}};e.ServerClosedEvent=a;var l=class{constructor(r,E,m){this.name=u.TOPOLOGY_DESCRIPTION_CHANGED,this.topologyId=r,this.previousDescription=E,this.newDescription=m}};e.TopologyDescriptionChangedEvent=l;var i=class{constructor(r){this.name=u.TOPOLOGY_OPENING,this.topologyId=r}};e.TopologyOpeningEvent=i;var p=class{constructor(r){this.name=u.TOPOLOGY_CLOSED,this.topologyId=r}};e.TopologyClosedEvent=p;var A=class{constructor(r,E){this.name=u.SERVER_HEARTBEAT_STARTED,this.connectionId=r,this.awaited=E}};e.ServerHeartbeatStartedEvent=A;var o=class{constructor(r,E,m,c){this.name=u.SERVER_HEARTBEAT_SUCCEEDED,this.connectionId=r,this.duration=E,this.reply=m??{},this.awaited=c}};e.ServerHeartbeatSucceededEvent=o;var n=class{constructor(r,E,m,c){this.name=u.SERVER_HEARTBEAT_FAILED,this.connectionId=r,this.duration=E,this.failure=m,this.awaited=c}};e.ServerHeartbeatFailedEvent=n}),Kr=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Timeout=e.TimeoutError=void 0;var u=ve("timers"),d=pe(),h=ye(),a=class extends Error{get name(){return"TimeoutError"}constructor(i,p){super(i,p)}static is(i){return i!=null&&typeof i=="object"&&"name"in i&&i.name==="TimeoutError"}};e.TimeoutError=a;var l=class Kn extends Promise{get[Symbol.toStringTag](){return"MongoDBTimeout"}constructor(p=()=>null,A,o=!1){let n;if(A<0)throw new d.MongoInvalidArgumentError("Cannot create a Timeout with a negative duration");super((r,E)=>{n=E,p(h.noop,E)}),this.ended=null,this.timedOut=!1,this.duration=A,this.start=Math.trunc(performance.now()),this.duration>0&&(this.id=(0,u.setTimeout)(()=>{this.ended=Math.trunc(performance.now()),this.timedOut=!0,n(new a(`Expired after ${A}ms`))},this.duration),typeof this.id.unref=="function"&&o&&this.id.unref())}clear(){(0,u.clearTimeout)(this.id),this.id=void 0}static expires(p,A){return new Kn(void 0,p,A)}static is(p){return typeof p=="object"&&p!=null&&Symbol.toStringTag in p&&p[Symbol.toStringTag]==="MongoDBTimeout"&&"then"in p&&typeof p.then=="function"}};e.Timeout=l}),Yn=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConnectionPoolClearedEvent=e.ConnectionCheckedInEvent=e.ConnectionCheckedOutEvent=e.ConnectionCheckOutFailedEvent=e.ConnectionCheckOutStartedEvent=e.ConnectionClosedEvent=e.ConnectionReadyEvent=e.ConnectionCreatedEvent=e.ConnectionPoolClosedEvent=e.ConnectionPoolReadyEvent=e.ConnectionPoolCreatedEvent=e.ConnectionPoolMonitoringEvent=void 0;var u=Xe(),d=class{constructor(c){this.time=new Date,this.address=c.address}};e.ConnectionPoolMonitoringEvent=d;var h=class extends d{constructor(c){super(c),this.name=u.CONNECTION_POOL_CREATED;let{maxConnecting:b,maxPoolSize:f,minPoolSize:O,maxIdleTimeMS:F,waitQueueTimeoutMS:y}=c.options;this.options={maxConnecting:b,maxPoolSize:f,minPoolSize:O,maxIdleTimeMS:F,waitQueueTimeoutMS:y}}};e.ConnectionPoolCreatedEvent=h;var a=class extends d{constructor(c){super(c),this.name=u.CONNECTION_POOL_READY}};e.ConnectionPoolReadyEvent=a;var l=class extends d{constructor(c){super(c),this.name=u.CONNECTION_POOL_CLOSED}};e.ConnectionPoolClosedEvent=l;var i=class extends d{constructor(c,b){super(c),this.name=u.CONNECTION_CREATED,this.connectionId=b.id}};e.ConnectionCreatedEvent=i;var p=class extends d{constructor(c,b){super(c),this.name=u.CONNECTION_READY,this.connectionId=b.id}};e.ConnectionReadyEvent=p;var A=class extends d{constructor(c,b,f,O){super(c),this.name=u.CONNECTION_CLOSED,this.connectionId=b.id,this.reason=f,this.serviceId=b.serviceId,this.error=O??null}};e.ConnectionClosedEvent=A;var o=class extends d{constructor(c){super(c),this.name=u.CONNECTION_CHECK_OUT_STARTED}};e.ConnectionCheckOutStartedEvent=o;var n=class extends d{constructor(c,b,f){super(c),this.name=u.CONNECTION_CHECK_OUT_FAILED,this.reason=b,this.error=f}};e.ConnectionCheckOutFailedEvent=n;var r=class extends d{constructor(c,b){super(c),this.name=u.CONNECTION_CHECKED_OUT,this.connectionId=b.id}};e.ConnectionCheckedOutEvent=r;var E=class extends d{constructor(c,b){super(c),this.name=u.CONNECTION_CHECKED_IN,this.connectionId=b.id}};e.ConnectionCheckedInEvent=E;var m=class extends d{constructor(c,b={}){super(c),this.name=u.CONNECTION_POOL_CLEARED,this.serviceId=b.serviceId,this.interruptInUseConnections=b.interruptInUseConnections}};e.ConnectionPoolClearedEvent=m}),Jn=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WaitQueueTimeoutError=e.PoolClearedOnNetworkError=e.PoolClearedError=e.PoolClosedError=void 0;var u=pe(),d=class extends u.MongoDriverError{constructor(i){super("Attempted to check out a connection from closed connection pool"),this.address=i.address}get name(){return"MongoPoolClosedError"}};e.PoolClosedError=d;var h=class extends u.MongoNetworkError{constructor(i,p){let A=p||`Connection pool for ${i.address} was cleared because another operation failed with: "${i.serverError?.message}"`;super(A,i.serverError?{cause:i.serverError}:void 0),this.address=i.address,this.addErrorLabel(u.MongoErrorLabel.PoolRequstedRetry)}get name(){return"MongoPoolClearedError"}};e.PoolClearedError=h;var a=class extends h{constructor(i){super(i,`Connection to ${i.address} interrupted due to server monitor timeout`)}get name(){return"PoolClearedOnNetworkError"}};e.PoolClearedOnNetworkError=a;var l=class extends u.MongoDriverError{constructor(i,p){super(i),this.address=p}get name(){return"MongoWaitQueueTimeoutError"}};e.WaitQueueTimeoutError=l}),Li=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConnectionPool=e.PoolState=void 0;var u=ve("timers"),d=Xe(),h=pe(),a=Et(),l=Kr(),i=ye(),p=qn(),A=r1(),o=Yn(),n=Jn(),r=nn(),E=Symbol("server"),m=Symbol("connections"),c=Symbol("pending"),b=Symbol("checkedOut"),f=Symbol("minPoolSizeTimer"),O=Symbol("generation"),F=Symbol("serviceGenerations"),y=Symbol("connectionCounter"),g=Symbol("cancellationToken"),T=Symbol("waitQueue"),D=Symbol("cancelled"),N=Symbol("metrics"),_=Symbol("processingWaitQueue"),R=Symbol("poolState");e.PoolState=Object.freeze({paused:"paused",ready:"ready",closed:"closed"});var j=class tt extends a.TypedEventEmitter{constructor(I,M){if(super(),this.options=Object.freeze({connectionType:A.Connection,...M,maxPoolSize:M.maxPoolSize??100,minPoolSize:M.minPoolSize??0,maxConnecting:M.maxConnecting??2,maxIdleTimeMS:M.maxIdleTimeMS??0,waitQueueTimeoutMS:M.waitQueueTimeoutMS??0,minPoolSizeCheckFrequencyMS:M.minPoolSizeCheckFrequencyMS??100,autoEncrypter:M.autoEncrypter}),this.options.minPoolSize>this.options.maxPoolSize)throw new h.MongoInvalidArgumentError("Connection pool minimum size must not be greater than maximum pool size");this[R]=e.PoolState.paused,this[E]=I,this[m]=new i.List,this[c]=0,this[b]=new Set,this[f]=void 0,this[O]=0,this[F]=new Map,this[y]=(0,i.makeCounter)(1),this[g]=new a.CancellationToken,this[g].setMaxListeners(1/0),this[T]=new i.List,this[N]=new r.ConnectionPoolMetrics,this[_]=!1,this.mongoLogger=this[E].topology.client?.mongoLogger,this.component="connection",process.nextTick(()=>{this.emitAndLog(tt.CONNECTION_POOL_CREATED,new o.ConnectionPoolCreatedEvent(this))})}get address(){return this.options.hostAddress.toString()}get closed(){return this[R]===e.PoolState.closed}get generation(){return this[O]}get totalConnectionCount(){return this.availableConnectionCount+this.pendingConnectionCount+this.currentCheckedOutCount}get availableConnectionCount(){return this[m].length}get pendingConnectionCount(){return this[c]}get currentCheckedOutCount(){return this[b].size}get waitQueueSize(){return this[T].length}get loadBalanced(){return this.options.loadBalanced}get serviceGenerations(){return this[F]}get serverError(){return this[E].description.error}get checkedOutConnections(){return this[b]}waitQueueErrorMetrics(){return this[N].info(this.options.maxPoolSize)}ready(){this[R]===e.PoolState.paused&&(this[R]=e.PoolState.ready,this.emitAndLog(tt.CONNECTION_POOL_READY,new o.ConnectionPoolReadyEvent(this)),(0,u.clearTimeout)(this[f]),this.ensureMinPoolSize())}async checkOut(){this.emitAndLog(tt.CONNECTION_CHECK_OUT_STARTED,new o.ConnectionCheckOutStartedEvent(this));let I=this.options.waitQueueTimeoutMS,{promise:M,resolve:S,reject:v}=(0,i.promiseWithResolvers)(),w=l.Timeout.expires(I),k={resolve:S,reject:v,timeout:w};this[T].push(k),process.nextTick(()=>this.processWaitQueue());try{return await Promise.race([M,k.timeout])}catch($){throw l.TimeoutError.is($)?(k[D]=!0,k.timeout.clear(),this.emitAndLog(tt.CONNECTION_CHECK_OUT_FAILED,new o.ConnectionCheckOutFailedEvent(this,"timeout")),new n.WaitQueueTimeoutError(this.loadBalanced?this.waitQueueErrorMetrics():"Timed out while checking out a connection from connection pool",this.address)):$}}checkIn(I){if(!this[b].has(I))return;let M=this.closed,S=this.connectionIsStale(I),v=!!(M||S||I.closed);if(v||(I.markAvailable(),this[m].unshift(I)),this[b].delete(I),this.emitAndLog(tt.CONNECTION_CHECKED_IN,new o.ConnectionCheckedInEvent(this,I)),v){let w=I.closed?"error":M?"poolClosed":"stale";this.destroyConnection(I,w)}process.nextTick(()=>this.processWaitQueue())}clear(I={}){if(this.closed)return;if(this.loadBalanced){let{serviceId:w}=I;if(!w)throw new h.MongoRuntimeError("ConnectionPool.clear() called in load balanced mode with no serviceId.");let k=w.toHexString(),$=this.serviceGenerations.get(k);if($==null)throw new h.MongoRuntimeError("Service generations are required in load balancer mode.");this.serviceGenerations.set(k,$+1),this.emitAndLog(tt.CONNECTION_POOL_CLEARED,new o.ConnectionPoolClearedEvent(this,{serviceId:w}));return}let M=I.interruptInUseConnections??!1,S=this[O];this[O]+=1;let v=this[R]===e.PoolState.paused;this[R]=e.PoolState.paused,this.clearMinPoolSizeTimer(),v||this.emitAndLog(tt.CONNECTION_POOL_CLEARED,new o.ConnectionPoolClearedEvent(this,{interruptInUseConnections:M})),M&&process.nextTick(()=>this.interruptInUseConnections(S)),this.processWaitQueue()}interruptInUseConnections(I){for(let M of this[b])M.generation<=I&&(M.onError(new n.PoolClearedOnNetworkError(this)),this.checkIn(M))}close(){if(!this.closed){this[g].emit("cancel"),typeof this[y].return=="function"&&this[y].return(void 0),this[R]=e.PoolState.closed,this.clearMinPoolSizeTimer(),this.processWaitQueue();for(let I of this[m])this.emitAndLog(tt.CONNECTION_CLOSED,new o.ConnectionClosedEvent(this,I,"poolClosed")),I.destroy();this[m].clear(),this.emitAndLog(tt.CONNECTION_POOL_CLOSED,new o.ConnectionPoolClosedEvent(this))}}async reauthenticate(I){let M=I.authContext;if(!M)throw new h.MongoRuntimeError("No auth context found on connection.");let S=M.credentials;if(!S)throw new h.MongoMissingCredentialsError("Connection is missing credentials when asked to reauthenticate");let v=S.resolveAuthMechanism(I.hello),w=this[E].topology.client.s.authProviders.getOrCreateProvider(v.mechanism,v.mechanismProperties);if(!w)throw new h.MongoMissingCredentialsError(`Reauthenticate failed due to no auth provider for ${S.mechanism}`);await w.reauth(M)}clearMinPoolSizeTimer(){let I=this[f];I&&(0,u.clearTimeout)(I)}destroyConnection(I,M){this.emitAndLog(tt.CONNECTION_CLOSED,new o.ConnectionClosedEvent(this,I,M)),I.destroy()}connectionIsStale(I){let M=I.serviceId;if(this.loadBalanced&&M){let S=M.toHexString(),v=this.serviceGenerations.get(S);return I.generation!==v}return I.generation!==this[O]}connectionIsIdle(I){return!!(this.options.maxIdleTimeMS&&I.idleTime>this.options.maxIdleTimeMS)}destroyConnectionIfPerished(I){let M=this.connectionIsStale(I),S=this.connectionIsIdle(I);if(!M&&!S&&!I.closed)return!1;let v=I.closed?"error":M?"stale":"idle";return this.destroyConnection(I,v),!0}createConnection(I){let M={...this.options,id:this[y].next().value,generation:this[O],cancellationToken:this[g],mongoLogger:this.mongoLogger,authProviders:this[E].topology.client.s.authProviders};this[c]++,this.emitAndLog(tt.CONNECTION_CREATED,new o.ConnectionCreatedEvent(this,{id:M.id})),(0,p.connect)(M).then(S=>{if(this[R]!==e.PoolState.ready){this[c]--,S.destroy(),I(this.closed?new n.PoolClosedError(this):new n.PoolClearedError(this));return}for(let v of[...d.APM_EVENTS,A.Connection.CLUSTER_TIME_RECEIVED])S.on(v,w=>this.emit(v,w));if(this.loadBalanced){S.on(A.Connection.PINNED,w=>this[N].markPinned(w)),S.on(A.Connection.UNPINNED,w=>this[N].markUnpinned(w));let v=S.serviceId;if(v){let w,k=v.toHexString();(w=this.serviceGenerations.get(k))?S.generation=w:(this.serviceGenerations.set(k,0),S.generation=0)}}S.markAvailable(),this.emitAndLog(tt.CONNECTION_READY,new o.ConnectionReadyEvent(this,S)),this[c]--,I(void 0,S)},S=>{this[c]--,this.emitAndLog(tt.CONNECTION_CLOSED,new o.ConnectionClosedEvent(this,{id:M.id,serviceId:void 0},"error",S)),(S instanceof h.MongoNetworkError||S instanceof h.MongoServerError)&&(S.connectionGeneration=M.generation),I(S??new h.MongoRuntimeError("Connection creation failed without error"))})}ensureMinPoolSize(){let I=this.options.minPoolSize;this[R]!==e.PoolState.ready||I===0||(this[m].prune(M=>this.destroyConnectionIfPerished(M)),this.totalConnectionCount<I&&this.pendingConnectionCount<this.options.maxConnecting?this.createConnection((M,S)=>{M&&this[E].handleError(M),!M&&S&&(this[m].push(S),process.nextTick(()=>this.processWaitQueue())),this[R]===e.PoolState.ready&&((0,u.clearTimeout)(this[f]),this[f]=(0,u.setTimeout)(()=>this.ensureMinPoolSize(),this.options.minPoolSizeCheckFrequencyMS))}):((0,u.clearTimeout)(this[f]),this[f]=(0,u.setTimeout)(()=>this.ensureMinPoolSize(),this.options.minPoolSizeCheckFrequencyMS)))}processWaitQueue(){if(this[_])return;for(this[_]=!0;this.waitQueueSize;){let S=this[T].first();if(!S){this[T].shift();continue}if(S[D]){this[T].shift();continue}if(this[R]!==e.PoolState.ready){let w=this.closed?"poolClosed":"connectionError",k=this.closed?new n.PoolClosedError(this):new n.PoolClearedError(this);this.emitAndLog(tt.CONNECTION_CHECK_OUT_FAILED,new o.ConnectionCheckOutFailedEvent(this,w,k)),S.timeout.clear(),this[T].shift(),S.reject(k);continue}if(!this.availableConnectionCount)break;let v=this[m].shift();if(!v)break;this.destroyConnectionIfPerished(v)||(this[b].add(v),this.emitAndLog(tt.CONNECTION_CHECKED_OUT,new o.ConnectionCheckedOutEvent(this,v)),S.timeout.clear(),this[T].shift(),S.resolve(v))}let{maxPoolSize:I,maxConnecting:M}=this.options;for(;this.waitQueueSize>0&&this.pendingConnectionCount<M&&(I===0||this.totalConnectionCount<I);){let S=this[T].shift();!S||S[D]||this.createConnection((v,w)=>{S[D]?!v&&w&&this[m].push(w):(v?(this.emitAndLog(tt.CONNECTION_CHECK_OUT_FAILED,new o.ConnectionCheckOutFailedEvent(this,"connectionError",v)),S.reject(v)):w&&(this[b].add(w),this.emitAndLog(tt.CONNECTION_CHECKED_OUT,new o.ConnectionCheckedOutEvent(this,w)),S.resolve(w)),S.timeout.clear()),process.nextTick(()=>this.processWaitQueue())})}this[_]=!1}};j.CONNECTION_POOL_CREATED=d.CONNECTION_POOL_CREATED,j.CONNECTION_POOL_CLOSED=d.CONNECTION_POOL_CLOSED,j.CONNECTION_POOL_CLEARED=d.CONNECTION_POOL_CLEARED,j.CONNECTION_POOL_READY=d.CONNECTION_POOL_READY,j.CONNECTION_CREATED=d.CONNECTION_CREATED,j.CONNECTION_READY=d.CONNECTION_READY,j.CONNECTION_CLOSED=d.CONNECTION_CLOSED,j.CONNECTION_CHECK_OUT_STARTED=d.CONNECTION_CHECK_OUT_STARTED,j.CONNECTION_CHECK_OUT_FAILED=d.CONNECTION_CHECK_OUT_FAILED,j.CONNECTION_CHECKED_OUT=d.CONNECTION_CHECKED_OUT,j.CONNECTION_CHECKED_IN=d.CONNECTION_CHECKED_IN,e.ConnectionPool=j}),Xn=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Server=void 0;var u=r1(),d=Li(),h=Jn(),a=Xe(),l=pe(),i=Et(),p=an(),A=ye(),o=at(),n=pt(),r=Zn(),E=zr(),m=(0,A.makeStateMachine)({[n.STATE_CLOSED]:[n.STATE_CLOSED,n.STATE_CONNECTING],[n.STATE_CONNECTING]:[n.STATE_CONNECTING,n.STATE_CLOSING,n.STATE_CONNECTED,n.STATE_CLOSED],[n.STATE_CONNECTED]:[n.STATE_CONNECTED,n.STATE_CLOSING,n.STATE_CLOSED],[n.STATE_CLOSING]:[n.STATE_CLOSING,n.STATE_CLOSED]}),c=class dr extends i.TypedEventEmitter{constructor(D,N,_){super(),this.serverApi=_.serverApi;let R={hostAddress:N.hostAddress,..._};this.topology=D,this.pool=new d.ConnectionPool(this,R),this.s={description:N,options:_,state:n.STATE_CLOSED,operationCount:0};for(let j of[...a.CMAP_EVENTS,...a.APM_EVENTS])this.pool.on(j,L=>this.emit(j,L));if(this.pool.on(u.Connection.CLUSTER_TIME_RECEIVED,j=>{this.clusterTime=j}),this.loadBalanced){this.monitor=null;return}this.monitor=new r.Monitor(this,this.s.options);for(let j of a.HEARTBEAT_EVENTS)this.monitor.on(j,L=>this.emit(j,L));this.monitor.on("resetServer",j=>b(this,j)),this.monitor.on(dr.SERVER_HEARTBEAT_SUCCEEDED,j=>{this.emit(dr.DESCRIPTION_RECEIVED,new E.ServerDescription(this.description.hostAddress,j.reply,{roundTripTime:this.monitor?.roundTripTime,minRoundTripTime:this.monitor?.minRoundTripTime})),this.s.state===n.STATE_CONNECTING&&(m(this,n.STATE_CONNECTED),this.emit(dr.CONNECT,this))})}get clusterTime(){return this.topology.clusterTime}set clusterTime(D){this.topology.clusterTime=D}get description(){return this.s.description}get name(){return this.s.description.address}get autoEncrypter(){if(this.s.options&&this.s.options.autoEncrypter)return this.s.options.autoEncrypter}get loadBalanced(){return this.topology.description.type===n.TopologyType.LoadBalanced}connect(){this.s.state===n.STATE_CLOSED&&(m(this,n.STATE_CONNECTING),this.loadBalanced?(m(this,n.STATE_CONNECTED),this.emit(dr.CONNECT,this)):this.monitor?.connect())}destroy(){this.s.state!==n.STATE_CLOSED&&(m(this,n.STATE_CLOSING),this.loadBalanced||this.monitor?.close(),this.pool.close(),m(this,n.STATE_CLOSED),this.emit("closed"))}requestCheck(){this.loadBalanced||this.monitor?.requestCheck()}async command(D,N,_,R){if(D.db==null||typeof D=="string")throw new l.MongoInvalidArgumentError("Namespace must not be a string");if(this.s.state===n.STATE_CLOSING||this.s.state===n.STATE_CLOSED)throw new l.MongoServerClosedError;let j=Object.assign({},_,{wireProtocolCommand:!1,directConnection:this.topology.s.options.directConnection});j.omitReadPreference&&delete j.readPreference;let L=j.session,I=L?.pinnedConnection;if(this.incrementOperationCount(),I==null)try{I=await this.pool.checkOut(),this.loadBalanced&&f(N,L)&&L?.pin(I)}catch(M){throw this.decrementOperationCount(),M instanceof h.PoolClearedError||this.handleError(M),M}try{try{let M=await I.command(D,N,j,R);return(0,o.throwIfWriteConcernError)(M),M}catch(M){throw this.decorateCommandError(I,N,j,M)}}catch(M){if(M instanceof l.MongoError&&M.code===l.MONGODB_ERROR_CODES.Reauthenticate){await this.pool.reauthenticate(I);try{let S=await I.command(D,N,j,R);return(0,o.throwIfWriteConcernError)(S),S}catch(S){throw this.decorateCommandError(I,N,j,S)}}else throw M}finally{this.decrementOperationCount(),L?.pinnedConnection!==I&&this.pool.checkIn(I)}}handleError(D,N){if(!(D instanceof l.MongoError)||D.connectionGeneration&&D.connectionGeneration<this.pool.generation)return;let _=D instanceof l.MongoNetworkError&&!(D instanceof l.MongoNetworkTimeoutError),R=(0,l.isNetworkErrorBeforeHandshake)(D),j=D.hasErrorLabel(l.MongoErrorLabel.HandshakeError);if(_||R||j)this.loadBalanced?N&&this.pool.clear({serviceId:N.serviceId}):(D.addErrorLabel(l.MongoErrorLabel.ResetPool),b(this,D));else if((0,l.isSDAMUnrecoverableError)(D)&&F(this,D)){let L=(0,A.maxWireVersion)(this)<=7||(0,l.isNodeShuttingDownError)(D);this.loadBalanced&&N&&L&&this.pool.clear({serviceId:N.serviceId}),this.loadBalanced||(L&&D.addErrorLabel(l.MongoErrorLabel.ResetPool),b(this,D),process.nextTick(()=>this.requestCheck()))}}decorateCommandError(D,N,_,R){if(typeof R!="object"||R==null||!("name"in R))throw new l.MongoRuntimeError("An unexpected error type: "+typeof R);if(R.name==="AbortError"&&"cause"in R&&R.cause instanceof l.MongoError&&(R=R.cause),!(R instanceof l.MongoError)||O(this.pool,D))return R;let j=_?.session;return R instanceof l.MongoNetworkError?(j&&!j.hasEnded&&j.serverSession&&(j.serverSession.isDirty=!0),y(j,N)&&!R.hasErrorLabel(l.MongoErrorLabel.TransientTransactionError)&&R.addErrorLabel(l.MongoErrorLabel.TransientTransactionError),(g(this.topology)||(0,p.isTransactionCommand)(N))&&(0,A.supportsRetryableWrites)(this)&&!y(j,N)&&R.addErrorLabel(l.MongoErrorLabel.RetryableWriteError)):(g(this.topology)||(0,p.isTransactionCommand)(N))&&(0,l.needsRetryableWriteLabel)(R,(0,A.maxWireVersion)(this))&&!y(j,N)&&R.addErrorLabel(l.MongoErrorLabel.RetryableWriteError),j&&j.isPinned&&R.hasErrorLabel(l.MongoErrorLabel.TransientTransactionError)&&j.unpin({force:!0}),this.handleError(R,D),R}decrementOperationCount(){return this.s.operationCount-=1}incrementOperationCount(){return this.s.operationCount+=1}};c.SERVER_HEARTBEAT_STARTED=a.SERVER_HEARTBEAT_STARTED,c.SERVER_HEARTBEAT_SUCCEEDED=a.SERVER_HEARTBEAT_SUCCEEDED,c.SERVER_HEARTBEAT_FAILED=a.SERVER_HEARTBEAT_FAILED,c.CONNECT=a.CONNECT,c.DESCRIPTION_RECEIVED=a.DESCRIPTION_RECEIVED,c.CLOSED=a.CLOSED,c.ENDED=a.ENDED,e.Server=c;function b(T,D){T.loadBalanced||(D instanceof l.MongoNetworkError&&!(D instanceof l.MongoNetworkTimeoutError)&&T.monitor?.reset(),T.emit(c.DESCRIPTION_RECEIVED,new E.ServerDescription(T.description.hostAddress,void 0,{error:D})))}function f(T,D){return D?D.inTransaction()||D.transaction.isCommitted&&"commitTransaction"in T||"aggregate"in T||"find"in T||"getMore"in T||"listCollections"in T||"listIndexes"in T:!1}function O(T,D){return D.serviceId?D.generation!==T.serviceGenerations.get(D.serviceId.toHexString()):D.generation!==T.generation}function F(T,D){let N=D.topologyVersion,_=T.description.topologyVersion;return(0,E.compareTopologyVersion)(_,N)<0}function y(T,D){return T&&T.inTransaction()&&!(0,p.isTransactionCommand)(D)}function g(T){return T.s.options.retryWrites!==!1}}),Zn=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RTTSampler=e.MonitorInterval=e.RTTPinger=e.Monitor=e.ServerMonitoringMode=void 0;var u=ve("timers"),d=Ue(),h=qn(),a=xn(),l=Xe(),i=pe(),p=Qt(),A=Et(),o=ye(),n=pt(),r=u1(),E=Xn(),m=Symbol("server"),c=Symbol("monitorId"),b=Symbol("cancellationToken"),f="idle",O="monitoring",F=(0,o.makeStateMachine)({[n.STATE_CLOSING]:[n.STATE_CLOSING,f,n.STATE_CLOSED],[n.STATE_CLOSED]:[n.STATE_CLOSED,O],[f]:[f,O,n.STATE_CLOSING],[O]:[O,f,n.STATE_CLOSING]}),y=new Set([n.STATE_CLOSING,n.STATE_CLOSED,O]);function g(S){return S.s.state===n.STATE_CLOSED||S.s.state===n.STATE_CLOSING}e.ServerMonitoringMode=Object.freeze({auto:"auto",poll:"poll",stream:"stream"});var T=class extends A.TypedEventEmitter{constructor(S,v){super(),this.component=p.MongoLoggableComponent.TOPOLOGY,this[m]=S,this.connection=null,this[b]=new A.CancellationToken,this[b].setMaxListeners(1/0),this[c]=void 0,this.s={state:n.STATE_CLOSED},this.address=S.description.address,this.options=Object.freeze({connectTimeoutMS:v.connectTimeoutMS??1e4,heartbeatFrequencyMS:v.heartbeatFrequencyMS??1e4,minHeartbeatFrequencyMS:v.minHeartbeatFrequencyMS??500,serverMonitoringMode:v.serverMonitoringMode}),this.isRunningInFaasEnv=(0,a.getFAASEnv)()!=null,this.mongoLogger=this[m].topology.client?.mongoLogger,this.rttSampler=new M(10);let w=this[b],k={id:"<monitor>",generation:S.pool.generation,cancellationToken:w,hostAddress:S.description.hostAddress,...v,raw:!1,useBigInt64:!1,promoteLongs:!0,promoteValues:!0,promoteBuffers:!0};delete k.credentials,k.autoEncrypter&&delete k.autoEncrypter,this.connectOptions=Object.freeze(k)}connect(){if(this.s.state!==n.STATE_CLOSED)return;let S=this.options.heartbeatFrequencyMS,v=this.options.minHeartbeatFrequencyMS;this[c]=new I(R(this),{heartbeatFrequencyMS:S,minHeartbeatFrequencyMS:v,immediate:!0})}requestCheck(){y.has(this.s.state)||this[c]?.wake()}reset(){let S=this[m].description.topologyVersion;if(g(this)||S==null)return;F(this,n.STATE_CLOSING),D(this),F(this,f);let v=this.options.heartbeatFrequencyMS,w=this.options.minHeartbeatFrequencyMS;this[c]=new I(R(this),{heartbeatFrequencyMS:v,minHeartbeatFrequencyMS:w})}close(){g(this)||(F(this,n.STATE_CLOSING),D(this),this.emit("close"),F(this,n.STATE_CLOSED))}get roundTripTime(){return this.rttSampler.average()}get minRoundTripTime(){return this.rttSampler.min()}get latestRtt(){return this.rttSampler.last}addRttSample(S){this.rttSampler.addSample(S)}clearRttSamples(){this.rttSampler.clear()}};e.Monitor=T;function D(S){S[c]?.stop(),S[c]=void 0,S.rttPinger?.close(),S.rttPinger=void 0,S[b].emit("cancel"),S.connection?.destroy(),S.connection=null,S.clearRttSamples()}function N(S,v){if(v==null)return!1;let w=S.options.serverMonitoringMode;return w===e.ServerMonitoringMode.poll?!1:w===e.ServerMonitoringMode.stream?!0:!S.isRunningInFaasEnv}function _(S,v){let w,k,$=S[m].description.topologyVersion,X=N(S,$);S.emitAndLogHeartbeat(E.Server.SERVER_HEARTBEAT_STARTED,S[m].topology.s.id,void 0,new r.ServerHeartbeatStartedEvent(S.address,X));function de(x){S.connection?.destroy(),S.connection=null,S.emitAndLogHeartbeat(E.Server.SERVER_HEARTBEAT_FAILED,S[m].topology.s.id,void 0,new r.ServerHeartbeatFailedEvent(S.address,(0,o.calculateDurationInMs)(w),x,k));let G=x instanceof i.MongoError?x:new i.MongoError(i.MongoError.buildErrorMessage(x),{cause:x});G.addErrorLabel(i.MongoErrorLabel.ResetPool),G instanceof i.MongoNetworkTimeoutError&&G.addErrorLabel(i.MongoErrorLabel.InterruptInUseConnections),S.emit("resetServer",G),v(x)}function Y(x){"isWritablePrimary"in x||(x.isWritablePrimary=x[l.LEGACY_HELLO_COMMAND]);let G=X&&S.rttPinger?S.rttPinger.latestRtt??(0,o.calculateDurationInMs)(w):(0,o.calculateDurationInMs)(w);S.addRttSample(G),S.emitAndLogHeartbeat(E.Server.SERVER_HEARTBEAT_SUCCEEDED,S[m].topology.s.id,x.connectionId,new r.ServerHeartbeatSucceededEvent(S.address,G,x,X)),X?(S.emitAndLogHeartbeat(E.Server.SERVER_HEARTBEAT_STARTED,S[m].topology.s.id,void 0,new r.ServerHeartbeatStartedEvent(S.address,!0)),w=(0,o.now)()):(S.rttPinger?.close(),S.rttPinger=void 0,v(void 0,x))}let{connection:se}=S;if(se&&!se.closed){let{serverApi:x,helloOk:G}=se,Q=S.options.connectTimeoutMS,oe=S.options.heartbeatFrequencyMS,Ee={[x?.version||G?"hello":l.LEGACY_HELLO_COMMAND]:1,...X&&$?{maxAwaitTimeMS:oe,topologyVersion:j($)}:{}},De=X?{socketTimeoutMS:Q?Q+oe:0,exhaustAllowed:!0}:{socketTimeoutMS:Q};if(X&&S.rttPinger==null&&(S.rttPinger=new L(S)),w=(0,o.now)(),X)return k=!0,se.exhaustCommand((0,o.ns)("admin.$cmd"),Ee,De,(Je,ze)=>Je?de(Je):Y(ze));k=!1,se.command((0,o.ns)("admin.$cmd"),Ee,De).then(Y,de);return}(async()=>{let x=await(0,h.makeSocket)(S.connectOptions),G=(0,h.makeConnection)(S.connectOptions,x);w=(0,o.now)();try{return await(0,h.performInitialHandshake)(G,S.connectOptions),G}catch(Q){throw G.destroy(),Q}})().then(x=>{if(g(S)){x.destroy();return}let G=(0,o.calculateDurationInMs)(w);S.addRttSample(G),S.connection=x,S.emitAndLogHeartbeat(E.Server.SERVER_HEARTBEAT_SUCCEEDED,S[m].topology.s.id,x.hello?.connectionId,new r.ServerHeartbeatSucceededEvent(S.address,G,x.hello,N(S,x.hello?.topologyVersion))),v(void 0,x.hello)},x=>{S.connection=null,k=!1,de(x)})}function R(S){return v=>{if(S.s.state===O){process.nextTick(v);return}F(S,O);function w(){g(S)||F(S,f),v()}_(S,(k,$)=>{if(k&&S[m].description.type===n.ServerType.Unknown)return w();N(S,$?.topologyVersion)&&(0,u.setTimeout)(()=>{g(S)||S[c]?.wake()},0),w()})}}function j(S){return{processId:S.processId,counter:d.Long.isLong(S.counter)?S.counter:d.Long.fromNumber(S.counter)}}var L=class{constructor(S){this.connection=void 0,this[b]=S[b],this.closed=!1,this.monitor=S,this.latestRtt=S.latestRtt??void 0;let v=S.options.heartbeatFrequencyMS;this[c]=(0,u.setTimeout)(()=>this.measureRoundTripTime(),v)}get roundTripTime(){return this.monitor.roundTripTime}get minRoundTripTime(){return this.monitor.minRoundTripTime}close(){this.closed=!0,(0,u.clearTimeout)(this[c]),this.connection?.destroy(),this.connection=void 0}measureAndReschedule(S,v){if(this.closed){v?.destroy();return}this.connection==null&&(this.connection=v),this.latestRtt=(0,o.calculateDurationInMs)(S),this[c]=(0,u.setTimeout)(()=>this.measureRoundTripTime(),this.monitor.options.heartbeatFrequencyMS)}measureRoundTripTime(){let S=(0,o.now)();if(this.closed)return;let v=this.connection;if(v==null){(0,h.connect)(this.monitor.connectOptions).then(k=>{this.measureAndReschedule(S,k)},()=>{this.connection=void 0});return}let w=v.serverApi?.version||v.helloOk?"hello":l.LEGACY_HELLO_COMMAND;v.command((0,o.ns)("admin.$cmd"),{[w]:1},void 0).then(()=>this.measureAndReschedule(S),()=>{this.connection?.destroy(),this.connection=void 0})}};e.RTTPinger=L;var I=class{constructor(S,v={}){this.isExpeditedCallToFnScheduled=!1,this.stopped=!1,this.isExecutionInProgress=!1,this.hasExecutedOnce=!1,this._executeAndReschedule=()=>{this.stopped||(this.timerId&&(0,u.clearTimeout)(this.timerId),this.isExpeditedCallToFnScheduled=!1,this.isExecutionInProgress=!0,this.fn(()=>{this.lastExecutionEnded=(0,o.now)(),this.isExecutionInProgress=!1,this._reschedule(this.heartbeatFrequencyMS)}))},this.fn=S,this.lastExecutionEnded=-1/0,this.heartbeatFrequencyMS=v.heartbeatFrequencyMS??1e3,this.minHeartbeatFrequencyMS=v.minHeartbeatFrequencyMS??500,v.immediate?this._executeAndReschedule():this._reschedule(void 0)}wake(){let S=(0,o.now)()-this.lastExecutionEnded;if(S<0)return this._executeAndReschedule();if(!this.isExecutionInProgress&&!this.isExpeditedCallToFnScheduled){if(S<this.minHeartbeatFrequencyMS){this.isExpeditedCallToFnScheduled=!0,this._reschedule(this.minHeartbeatFrequencyMS-S);return}this._executeAndReschedule()}}stop(){this.stopped=!0,this.timerId&&((0,u.clearTimeout)(this.timerId),this.timerId=void 0),this.lastExecutionEnded=-1/0,this.isExpeditedCallToFnScheduled=!1}toString(){return JSON.stringify(this)}toJSON(){let S=(0,o.now)(),v=S-this.lastExecutionEnded;return{timerId:this.timerId!=null?"set":"cleared",lastCallTime:this.lastExecutionEnded,isExpeditedCheckScheduled:this.isExpeditedCallToFnScheduled,stopped:this.stopped,heartbeatFrequencyMS:this.heartbeatFrequencyMS,minHeartbeatFrequencyMS:this.minHeartbeatFrequencyMS,currentTime:S,timeSinceLastCall:v}}_reschedule(S){this.stopped||(this.timerId&&(0,u.clearTimeout)(this.timerId),this.timerId=(0,u.setTimeout)(this._executeAndReschedule,S||this.heartbeatFrequencyMS))}};e.MonitorInterval=I;var M=class{constructor(S=10){this.rttSamples=new Float64Array(S),this.length=0,this.writeIndex=0}addSample(S){this.rttSamples[this.writeIndex++]=S,this.length<this.rttSamples.length&&this.length++,this.writeIndex%=this.rttSamples.length}min(){if(this.length<2)return 0;let S=this.rttSamples[0];for(let v=1;v<this.length;v++)this.rttSamples[v]<S&&(S=this.rttSamples[v]);return S}average(){if(this.length===0)return 0;let S=0;for(let v=0;v<this.length;v++)S+=this.rttSamples[v];return S/this.length}get last(){return this.length===0?null:this.rttSamples[this.writeIndex===0?this.length-1:this.writeIndex-1]}clear(){this.length=0,this.writeIndex=0}};e.RTTSampler=M}),Qn=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FEATURE_FLAGS=e.DEFAULT_OPTIONS=e.OPTIONS=e.parseOptions=e.resolveSRVRecord=void 0;var u=ve("dns"),d=Pn(),h=ve("url"),a=Ju(),l=Mt(),i=xn(),p=qr(),A=_i(),o=pe(),n=Xt(),r=Qt(),E=yt(),m=rt(),c=Zn(),b=ye(),f=at(),O=["authSource","replicaSet","loadBalanced"],F="loadBalanced option only supported with a single host in the URI",y="loadBalanced option not supported with a replicaSet option",g="loadBalanced option not supported when directConnection is provided";async function T(v){if(typeof v.srvHost!="string")throw new o.MongoAPIError('Option "srvHost" must not be empty');if(v.srvHost.split(".").length<3)throw new o.MongoAPIError("URI must include hostname, domain name, and tld");let w=v.srvHost,k=u.promises.resolveTxt(w);k.then(void 0,b.squashError);let $=await u.promises.resolveSrv(`_${v.srvServiceName}._tcp.${w}`);if($.length===0)throw new o.MongoAPIError("No addresses found at host");for(let{name:Q}of $)if(!(0,b.matchesParentDomain)(Q,w))throw new o.MongoAPIError("Server record does not share hostname with parent URI");let X=$.map(Q=>b.HostAddress.fromString(`${Q.name}:${Q.port??27017}`));M(X,v,!0);let de;try{de=await k}catch(Q){if(Q.code!=="ENODATA"&&Q.code!=="ENOTFOUND")throw Q;return X}if(de.length>1)throw new o.MongoParseError("Multiple text records not allowed");let Y=new h.URLSearchParams(de[0].join(""));if([...Y.keys()].some(Q=>!O.includes(Q)))throw new o.MongoParseError(`Text record may only set any of: ${O.join(", ")}`);if(O.some(Q=>Y.get(Q)===""))throw new o.MongoParseError("Cannot have empty URI params in DNS TXT Record");let se=Y.get("authSource")??void 0,x=Y.get("replicaSet")??void 0,G=Y.get("loadBalanced")??void 0;if(!v.userSpecifiedAuthSource&&se&&v.credentials&&!l.AUTH_MECHS_AUTH_SRC_EXTERNAL.has(v.credentials.mechanism)&&(v.credentials=a.MongoCredentials.merge(v.credentials,{source:se})),!v.userSpecifiedReplicaSet&&x&&(v.replicaSet=x),G==="true"&&(v.loadBalanced=!0),v.replicaSet&&v.srvMaxHosts>0)throw new o.MongoParseError("Cannot combine replicaSet option with srvMaxHosts");return M(X,v,!0),X}e.resolveSRVRecord=T;function D(v){if(!v)return;let w=(k,$)=>{if(v.has(k)&&v.has($))throw new o.MongoAPIError(`The '${k}' option cannot be used with the '${$}' option`)};w("tlsInsecure","tlsAllowInvalidCertificates"),w("tlsInsecure","tlsAllowInvalidHostnames"),w("tlsInsecure","tlsDisableCertificateRevocationCheck"),w("tlsInsecure","tlsDisableOCSPEndpointCheck"),w("tlsAllowInvalidCertificates","tlsDisableCertificateRevocationCheck"),w("tlsAllowInvalidCertificates","tlsDisableOCSPEndpointCheck"),w("tlsDisableCertificateRevocationCheck","tlsDisableOCSPEndpointCheck")}function N(v,w){if(typeof w=="boolean")return w;switch(w){case"true":return!0;case"false":return!1;default:throw new o.MongoParseError(`${v} must be either "true" or "false"`)}}function _(v,w){let k=(0,b.parseInteger)(w);if(k!=null)return k;throw new o.MongoParseError(`Expected ${v} to be stringified int value, got: ${w}`)}function R(v,w){let k=_(v,w);if(k<0)throw new o.MongoParseError(`${v} can only be a positive int value, got: ${w}`);return k}function*j(v){if(v==="")return;let w=v.split(",");for(let k of w){let[$,X]=k.split(/:(.*)/);if(X==null)throw new o.MongoParseError("Cannot have undefined values in key value pairs");yield[$,X]}}var L=class extends Map{constructor(v=[]){super(v.map(([w,k])=>[w.toLowerCase(),k]))}has(v){return super.has(v.toLowerCase())}get(v){return super.get(v.toLowerCase())}set(v,w){return super.set(v.toLowerCase(),w)}delete(v){return super.delete(v.toLowerCase())}};function I(v,w=void 0,k={}){if(w!=null&&!(w instanceof n.MongoClient)&&(k=w,w=void 0),k.useBigInt64&&typeof k.promoteLongs=="boolean"&&!k.promoteLongs)throw new o.MongoAPIError("Must request either bigint or Long for int64 deserialization");if(k.useBigInt64&&typeof k.promoteValues=="boolean"&&!k.promoteValues)throw new o.MongoAPIError("Must request either bigint or Long for int64 deserialization");let $=new d.default(v),{hosts:X,isSRV:de}=$,Y=Object.create(null);for(let Ce of Object.getOwnPropertySymbols(k))e.FEATURE_FLAGS.has(Ce)&&(Y[Ce]=k[Ce]);Y.hosts=de?[]:X.map(b.HostAddress.fromString);let se=new L;if($.pathname!=="/"&&$.pathname!==""){let Ce=decodeURIComponent($.pathname[0]==="/"?$.pathname.slice(1):$.pathname);Ce&&se.set("dbName",[Ce])}if($.username!==""){let Ce={username:decodeURIComponent($.username)};typeof $.password=="string"&&(Ce.password=decodeURIComponent($.password)),se.set("auth",[Ce])}for(let Ce of $.searchParams.keys()){let Me=$.searchParams.getAll(Ce),qe=/readPreferenceTags/i.test(Ce);if(!qe&&Me.length>1)throw new o.MongoInvalidArgumentError(`URI option "${Ce}" cannot appear more than once in the connection string`);if(!qe&&Me.includes(""))throw new o.MongoAPIError(`URI option "${Ce}" cannot be specified with no value`);se.has(Ce)||se.set(Ce,Me)}let x=new L(Object.entries(k).filter(([,Ce])=>Ce!=null));if(se.has("serverApi"))throw new o.MongoParseError("URI cannot contain `serverApi`, it can only be passed to the client");let G=se.get("authMechanismProperties");if(G){for(let Ce of G)if(/(^|,)ALLOWED_HOSTS:/.test(Ce))throw new o.MongoParseError("Auth mechanism property ALLOWED_HOSTS is not allowed in the connection string.")}if(x.has("loadBalanced"))throw new o.MongoParseError("loadBalanced is only a valid option in the URI");let Q=new L,oe=new Set([...se.keys(),...x.keys()]);for(let Ce of oe){let Me=[],qe=x.get(Ce);qe!=null&&Me.push(qe);let Ge=se.get(Ce)??[];Me.push(...Ge),Q.set(Ce,Me)}if(Q.has("tls")||Q.has("ssl")){let Ce=(Q.get("tls")||[]).concat(Q.get("ssl")||[]).map(N.bind(null,"tls/ssl"));if(new Set(Ce).size!==1)throw new o.MongoParseError("All values of tls/ssl must be the same.")}D(Q);let Ee=(0,b.setDifference)(oe,Array.from(Object.keys(e.OPTIONS)).map(Ce=>Ce.toLowerCase()));if(Ee.size!==0){let Ce=Ee.size>1?"options":"option",Me=Ee.size>1?"are":"is";throw new o.MongoParseError(`${Ce} ${Array.from(Ee).join(", ")} ${Me} not supported`)}for(let[Ce,Me]of Object.entries(e.OPTIONS)){let qe=Q.get(Ce);if(!qe||qe.length===0)e.DEFAULT_OPTIONS.has(Ce)&&S(Y,Ce,Me,[e.DEFAULT_OPTIONS.get(Ce)]);else{let{deprecated:Ge}=Me;if(Ge){let ct=typeof Ge=="string"?`: ${Ge}`:"";(0,b.emitWarning)(`${Ce} is a deprecated option${ct}`)}S(Y,Ce,Me,qe)}}if(Y.credentials){let Ce=Y.credentials.mechanism===l.AuthMechanism.MONGODB_GSSAPI,Me=Y.credentials.mechanism===l.AuthMechanism.MONGODB_X509,qe=Y.credentials.mechanism===l.AuthMechanism.MONGODB_AWS,Ge=Y.credentials.mechanism===l.AuthMechanism.MONGODB_OIDC;if((Ce||Me)&&Q.has("authSource")&&Y.credentials.source!=="$external")throw new o.MongoParseError(`authMechanism ${Y.credentials.mechanism} requires an authSource of '$external'`);if(!(Ce||Me||qe||Ge)&&Y.dbName&&!Q.has("authSource")&&(Y.credentials=a.MongoCredentials.merge(Y.credentials,{source:Y.dbName})),qe&&Y.credentials.username&&!Y.credentials.password)throw new o.MongoMissingCredentialsError(`When using ${Y.credentials.mechanism} password must be set when a username is specified`);Y.credentials.validate(),Y.credentials.password===""&&Y.credentials.username===""&&Y.credentials.mechanism===l.AuthMechanism.MONGODB_DEFAULT&&Object.keys(Y.credentials.mechanismProperties).length===0&&delete Y.credentials}if(Y.dbName||(Y.dbName="test"),M(X,Y,de),w&&Y.autoEncryption&&(A.Encrypter.checkForMongoCrypt(),Y.encrypter=new A.Encrypter(w,v,k),Y.autoEncrypter=Y.encrypter.autoEncrypter),Y.userSpecifiedAuthSource=x.has("authSource")||se.has("authSource"),Y.userSpecifiedReplicaSet=x.has("replicaSet")||se.has("replicaSet"),de){if(Y.srvHost=X[0],Y.directConnection)throw new o.MongoAPIError("SRV URI does not support directConnection");if(Y.srvMaxHosts>0&&typeof Y.replicaSet=="string")throw new o.MongoParseError("Cannot use srvMaxHosts option with replicaSet");let Ce=!x.has("tls")&&!se.has("tls"),Me=!x.has("ssl")&&!se.has("ssl");Ce&&Me&&(Y.tls=!0)}else if(se.has("srvMaxHosts")||x.has("srvMaxHosts")||se.has("srvServiceName")||x.has("srvServiceName"))throw new o.MongoParseError("Cannot use srvMaxHosts or srvServiceName with a non-srv connection string");if(Y.directConnection&&Y.hosts.length!==1)throw new o.MongoParseError("directConnection option requires exactly one host");if(!Y.proxyHost&&(Y.proxyPort||Y.proxyUsername||Y.proxyPassword))throw new o.MongoParseError("Must specify proxyHost if other proxy options are passed");if(Y.proxyUsername&&!Y.proxyPassword||!Y.proxyUsername&&Y.proxyPassword)throw new o.MongoParseError("Can only specify both of proxy username/password or neither");if(["proxyHost","proxyPort","proxyUsername","proxyPassword"].map(Ce=>se.get(Ce)??[]).some(Ce=>Ce.length>1))throw new o.MongoParseError("Proxy options cannot be specified multiple times in the connection string");let De=Symbol.for("@@mdb.enableMongoLogger");Y[De]=Y[De]??!1;let Je={},ze={};return Y[De]&&(Je={MONGODB_LOG_COMMAND:process.env.MONGODB_LOG_COMMAND,MONGODB_LOG_TOPOLOGY:process.env.MONGODB_LOG_TOPOLOGY,MONGODB_LOG_SERVER_SELECTION:process.env.MONGODB_LOG_SERVER_SELECTION,MONGODB_LOG_CONNECTION:process.env.MONGODB_LOG_CONNECTION,MONGODB_LOG_CLIENT:process.env.MONGODB_LOG_CLIENT,MONGODB_LOG_ALL:process.env.MONGODB_LOG_ALL,MONGODB_LOG_MAX_DOCUMENT_LENGTH:process.env.MONGODB_LOG_MAX_DOCUMENT_LENGTH,MONGODB_LOG_PATH:process.env.MONGODB_LOG_PATH,...Y[Symbol.for("@@mdb.internalLoggerConfig")]},ze={mongodbLogPath:Y.mongodbLogPath,mongodbLogComponentSeverities:Y.mongodbLogComponentSeverities,mongodbLogMaxDocumentLength:Y.mongodbLogMaxDocumentLength}),Y.mongoLoggerOptions=r.MongoLogger.resolveOptions(Je,ze),Y.metadata=(0,i.makeClientMetadata)(Y),Y.extendedMetadata=(0,i.addContainerMetadata)(Y.metadata).then(void 0,b.squashError),Y}e.parseOptions=I;function M(v,w,k){if(w.loadBalanced){if(v.length>1)throw new o.MongoParseError(F);if(w.replicaSet)throw new o.MongoParseError(y);if(w.directConnection)throw new o.MongoParseError(g);if(k&&w.srvMaxHosts>0)throw new o.MongoParseError("Cannot limit srv hosts with loadBalanced enabled")}}function S(v,w,k,$){let{target:X,type:de,transform:Y}=k,se=X??w;switch(de){case"boolean":v[se]=N(se,$[0]);break;case"int":v[se]=_(se,$[0]);break;case"uint":v[se]=R(se,$[0]);break;case"string":if($[0]==null)break;v[se]=String($[0]);break;case"record":if(!(0,b.isRecord)($[0]))throw new o.MongoParseError(`${se} must be an object`);v[se]=$[0];break;case"any":v[se]=$[0];break;default:{if(!Y)throw new o.MongoParseError("Descriptors missing a type must define a transform");let x=Y({name:se,options:v,values:$});v[se]=x;break}}}e.OPTIONS={appName:{type:"string"},auth:{target:"credentials",transform({name:v,options:w,values:[k]}){if(!(0,b.isRecord)(k,["username","password"]))throw new o.MongoParseError(`${v} must be an object with 'username' and 'password' properties`);return a.MongoCredentials.merge(w.credentials,{username:k.username,password:k.password})}},authMechanism:{target:"credentials",transform({options:v,values:[w]}){let k=Object.values(l.AuthMechanism),[$]=k.filter(Y=>Y.match(RegExp(String.raw`\b${w}\b`,"i")));if(!$)throw new o.MongoParseError(`authMechanism one of ${k}, got ${w}`);let X=v.credentials?.source;($===l.AuthMechanism.MONGODB_PLAIN||l.AUTH_MECHS_AUTH_SRC_EXTERNAL.has($))&&(X="$external");let de=v.credentials?.password;return $===l.AuthMechanism.MONGODB_X509&&de===""&&(de=void 0),a.MongoCredentials.merge(v.credentials,{mechanism:$,source:X,password:de})}},authMechanismProperties:{target:"credentials",transform({options:v,values:w}){let k=Object.create(null);for(let $ of w)if(typeof $=="string")for(let[X,de]of j($))try{k[X]=N(X,de)}catch{k[X]=de}else{if(!(0,b.isRecord)($))throw new o.MongoParseError("AuthMechanismProperties must be an object");k={...$}}return a.MongoCredentials.merge(v.credentials,{mechanismProperties:k})}},authSource:{target:"credentials",transform({options:v,values:[w]}){let k=String(w);return a.MongoCredentials.merge(v.credentials,{source:k})}},autoEncryption:{type:"record"},bsonRegExp:{type:"boolean"},serverApi:{target:"serverApi",transform({values:[v]}){let w=typeof v=="string"?{version:v}:v,k=w&&w.version;if(!k)throw new o.MongoParseError(`Invalid \`serverApi\` property; must specify a version from the following enum: ["${Object.values(n.ServerApiVersion).join('", "')}"]`);if(!Object.values(n.ServerApiVersion).some($=>$===k))throw new o.MongoParseError(`Invalid server API version=${k}; must be in the following enum: ["${Object.values(n.ServerApiVersion).join('", "')}"]`);return w}},checkKeys:{type:"boolean"},compressors:{default:"none",target:"compressors",transform({values:v}){let w=new Set;for(let k of v){let $=typeof k=="string"?k.split(","):k;if(!Array.isArray($))throw new o.MongoInvalidArgumentError("compressors must be an array or a comma-delimited list of strings");for(let X of $)if(Object.keys(p.Compressor).includes(String(X)))w.add(String(X));else throw new o.MongoInvalidArgumentError(`${X} is not a valid compression mechanism. Must be one of: ${Object.keys(p.Compressor)}.`)}return[...w]}},connectTimeoutMS:{default:3e4,type:"uint"},dbName:{type:"string"},directConnection:{default:!1,type:"boolean"},driverInfo:{default:{},type:"record"},enableUtf8Validation:{type:"boolean",default:!0},family:{transform({name:v,values:[w]}){let k=_(v,w);if(k===4||k===6)return k;throw new o.MongoParseError(`Option 'family' must be 4 or 6 got ${k}.`)}},fieldsAsRaw:{type:"record"},forceServerObjectId:{default:!1,type:"boolean"},fsync:{deprecated:"Please use journal instead",target:"writeConcern",transform({name:v,options:w,values:[k]}){let $=f.WriteConcern.fromOptions({writeConcern:{...w.writeConcern,fsync:N(v,k)}});if(!$)throw new o.MongoParseError(`Unable to make a writeConcern from fsync=${k}`);return $}},heartbeatFrequencyMS:{default:1e4,type:"uint"},ignoreUndefined:{type:"boolean"},j:{deprecated:"Please use journal instead",target:"writeConcern",transform({name:v,options:w,values:[k]}){let $=f.WriteConcern.fromOptions({writeConcern:{...w.writeConcern,journal:N(v,k)}});if(!$)throw new o.MongoParseError(`Unable to make a writeConcern from journal=${k}`);return $}},journal:{target:"writeConcern",transform({name:v,options:w,values:[k]}){let $=f.WriteConcern.fromOptions({writeConcern:{...w.writeConcern,journal:N(v,k)}});if(!$)throw new o.MongoParseError(`Unable to make a writeConcern from journal=${k}`);return $}},loadBalanced:{default:!1,type:"boolean"},localThresholdMS:{default:15,type:"uint"},maxConnecting:{default:2,transform({name:v,values:[w]}){let k=R(v,w);if(k===0)throw new o.MongoInvalidArgumentError("maxConnecting must be > 0 if specified");return k}},maxIdleTimeMS:{default:0,type:"uint"},maxPoolSize:{default:100,type:"uint"},maxStalenessSeconds:{target:"readPreference",transform({name:v,options:w,values:[k]}){let $=R(v,k);return w.readPreference?m.ReadPreference.fromOptions({readPreference:{...w.readPreference,maxStalenessSeconds:$}}):new m.ReadPreference("secondary",void 0,{maxStalenessSeconds:$})}},minInternalBufferSize:{type:"uint"},minPoolSize:{default:0,type:"uint"},minHeartbeatFrequencyMS:{default:500,type:"uint"},monitorCommands:{default:!1,type:"boolean"},name:{target:"driverInfo",transform({values:[v],options:w}){return{...w.driverInfo,name:String(v)}}},noDelay:{default:!0,type:"boolean"},pkFactory:{default:b.DEFAULT_PK_FACTORY,transform({values:[v]}){if((0,b.isRecord)(v,["createPk"])&&typeof v.createPk=="function")return v;throw new o.MongoParseError(`Option pkFactory must be an object with a createPk function, got ${v}`)}},promoteBuffers:{type:"boolean"},promoteLongs:{type:"boolean"},promoteValues:{type:"boolean"},useBigInt64:{type:"boolean"},proxyHost:{type:"string"},proxyPassword:{type:"string"},proxyPort:{type:"uint"},proxyUsername:{type:"string"},raw:{default:!1,type:"boolean"},readConcern:{transform({values:[v],options:w}){if(v instanceof E.ReadConcern||(0,b.isRecord)(v,["level"]))return E.ReadConcern.fromOptions({...w.readConcern,...v});throw new o.MongoParseError(`ReadConcern must be an object, got ${JSON.stringify(v)}`)}},readConcernLevel:{target:"readConcern",transform({values:[v],options:w}){return E.ReadConcern.fromOptions({...w.readConcern,level:v})}},readPreference:{default:m.ReadPreference.primary,transform({values:[v],options:w}){if(v instanceof m.ReadPreference)return m.ReadPreference.fromOptions({readPreference:{...w.readPreference,...v},...v});if((0,b.isRecord)(v,["mode"])){let k=m.ReadPreference.fromOptions({readPreference:{...w.readPreference,...v},...v});if(k)return k;throw new o.MongoParseError(`Cannot make read preference from ${JSON.stringify(v)}`)}if(typeof v=="string"){let k={hedge:w.readPreference?.hedge,maxStalenessSeconds:w.readPreference?.maxStalenessSeconds};return new m.ReadPreference(v,w.readPreference?.tags,k)}throw new o.MongoParseError(`Unknown ReadPreference value: ${v}`)}},readPreferenceTags:{target:"readPreference",transform({values:v,options:w}){let k=Array.isArray(v[0])?v[0]:v,$=[];for(let X of k){let de=Object.create(null);if(typeof X=="string")for(let[Y,se]of j(X))de[Y]=se;if((0,b.isRecord)(X))for(let[Y,se]of Object.entries(X))de[Y]=se;$.push(de)}return m.ReadPreference.fromOptions({readPreference:w.readPreference,readPreferenceTags:$})}},replicaSet:{type:"string"},retryReads:{default:!0,type:"boolean"},retryWrites:{default:!0,type:"boolean"},serializeFunctions:{type:"boolean"},serverMonitoringMode:{default:"auto",transform({values:[v]}){if(!Object.values(c.ServerMonitoringMode).includes(v))throw new o.MongoParseError("serverMonitoringMode must be one of `auto`, `poll`, or `stream`");return v}},serverSelectionTimeoutMS:{default:3e4,type:"uint"},servername:{type:"string"},socketTimeoutMS:{default:0,type:"uint"},srvMaxHosts:{type:"uint",default:0},srvServiceName:{type:"string",default:"mongodb"},ssl:{target:"tls",type:"boolean"},timeoutMS:{type:"uint"},tls:{type:"boolean"},tlsAllowInvalidCertificates:{target:"rejectUnauthorized",transform({name:v,values:[w]}){return!N(v,w)}},tlsAllowInvalidHostnames:{target:"checkServerIdentity",transform({name:v,values:[w]}){return N(v,w)?()=>{}:void 0}},tlsCAFile:{type:"string"},tlsCRLFile:{type:"string"},tlsCertificateKeyFile:{type:"string"},tlsCertificateKeyFilePassword:{target:"passphrase",type:"any"},tlsInsecure:{transform({name:v,options:w,values:[k]}){let $=N(v,k);return $?(w.checkServerIdentity=()=>{},w.rejectUnauthorized=!1):(w.checkServerIdentity=w.tlsAllowInvalidHostnames?()=>{}:void 0,w.rejectUnauthorized=!w.tlsAllowInvalidCertificates),$}},w:{target:"writeConcern",transform({values:[v],options:w}){return f.WriteConcern.fromOptions({writeConcern:{...w.writeConcern,w:v}})}},waitQueueTimeoutMS:{default:0,type:"uint"},writeConcern:{target:"writeConcern",transform({values:[v],options:w}){if((0,b.isRecord)(v)||v instanceof f.WriteConcern)return f.WriteConcern.fromOptions({writeConcern:{...w.writeConcern,...v}});if(v==="majority"||typeof v=="number")return f.WriteConcern.fromOptions({writeConcern:{...w.writeConcern,w:v}});throw new o.MongoParseError(`Invalid WriteConcern cannot parse: ${JSON.stringify(v)}`)}},wtimeout:{deprecated:"Please use wtimeoutMS instead",target:"writeConcern",transform({values:[v],options:w}){let k=f.WriteConcern.fromOptions({writeConcern:{...w.writeConcern,wtimeout:R("wtimeout",v)}});if(k)return k;throw new o.MongoParseError("Cannot make WriteConcern from wtimeout")}},wtimeoutMS:{target:"writeConcern",transform({values:[v],options:w}){let k=f.WriteConcern.fromOptions({writeConcern:{...w.writeConcern,wtimeoutMS:R("wtimeoutMS",v)}});if(k)return k;throw new o.MongoParseError("Cannot make WriteConcern from wtimeout")}},zlibCompressionLevel:{default:0,type:"int"},connectionType:{type:"any"},srvPoller:{type:"any"},minDHSize:{type:"any"},pskCallback:{type:"any"},secureContext:{type:"any"},enableTrace:{type:"any"},requestCert:{type:"any"},rejectUnauthorized:{type:"any"},checkServerIdentity:{type:"any"},ALPNProtocols:{type:"any"},SNICallback:{type:"any"},session:{type:"any"},requestOCSP:{type:"any"},localAddress:{type:"any"},localPort:{type:"any"},hints:{type:"any"},lookup:{type:"any"},ca:{type:"any"},cert:{type:"any"},ciphers:{type:"any"},crl:{type:"any"},ecdhCurve:{type:"any"},key:{type:"any"},passphrase:{type:"any"},pfx:{type:"any"},secureProtocol:{type:"any"},index:{type:"any"},useNewUrlParser:{type:"boolean",deprecated:"useNewUrlParser has no effect since Node.js Driver version 4.0.0 and will be removed in the next major version"},useUnifiedTopology:{type:"boolean",deprecated:"useUnifiedTopology has no effect since Node.js Driver version 4.0.0 and will be removed in the next major version"},mongodbLogPath:{transform({values:[v]}){if(!(typeof v=="string"&&["stderr","stdout"].includes(v)||v&&typeof v=="object"&&"write"in v&&typeof v.write=="function"))throw new o.MongoAPIError("Option 'mongodbLogPath' must be of type 'stderr' | 'stdout' | MongoDBLogWritable");return v}},mongodbLogComponentSeverities:{transform({values:[v]}){if(typeof v!="object"||!v)throw new o.MongoAPIError("Option 'mongodbLogComponentSeverities' must be a non-null object");for(let[w,k]of Object.entries(v)){if(typeof k!="string"||typeof w!="string")throw new o.MongoAPIError("User input for option 'mongodbLogComponentSeverities' object cannot include a non-string key or value");if(!Object.values(r.MongoLoggableComponent).some($=>$===w)&&w!=="default")throw new o.MongoAPIError(`User input for option 'mongodbLogComponentSeverities' contains invalid key: ${w}`);if(!Object.values(r.SeverityLevel).some($=>$===k))throw new o.MongoAPIError(`Option 'mongodbLogComponentSeverities' does not support ${k} as a value for ${w}`)}return v}},mongodbLogMaxDocumentLength:{type:"uint"}},e.DEFAULT_OPTIONS=new L(Object.entries(e.OPTIONS).filter(([,v])=>v.default!=null).map(([v,w])=>[v,w.default])),e.FEATURE_FLAGS=new Set([Symbol.for("@@mdb.skipPingOnConnect"),Symbol.for("@@mdb.enableMongoLogger"),Symbol.for("@@mdb.internalLoggerConfig")])}),ki=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MongoCR=void 0;var u=ve("crypto"),d=pe(),h=ye(),a=xt(),l=class extends a.AuthProvider{async auth(i){let{connection:p,credentials:A}=i;if(!A)throw new d.MongoMissingCredentialsError("AuthContext must provide credentials.");let{username:o,password:n,source:r}=A,{nonce:E}=await p.command((0,h.ns)(`${r}.$cmd`),{getnonce:1},void 0),m=u.createHash("md5").update(`${o}:mongo:${n}`,"utf8").digest("hex"),c=u.createHash("md5").update(`${E}${o}${m}`,"utf8").digest("hex"),b={authenticate:1,user:o,nonce:E,key:c};await p.command((0,h.ns)(`${r}.$cmd`),b,void 0)}};e.MongoCR=l}),Ui=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MongoDBAWS=void 0;var u=Ue(),d=Ot(),h=pe(),a=ye(),l=xt(),i=$n(),p=Ju(),A=Mt(),o=110,n={useBigInt64:!1,promoteLongs:!0,promoteValues:!0,promoteBuffers:!1,bsonRegExp:!1},r=class extends l.AuthProvider{constructor(){super(),this.credentialFetcher=i.AWSTemporaryCredentialProvider.isAWSSDKInstalled?new i.AWSSDKCredentialProvider:new i.LegacyAWSTemporaryCredentialProvider}async auth(c){let{connection:b}=c;if(!c.credentials)throw new h.MongoMissingCredentialsError("AuthContext must provide credentials.");if("kModuleError"in d.aws4)throw d.aws4.kModuleError;let{sign:f}=d.aws4;if((0,a.maxWireVersion)(b)<9)throw new h.MongoCompatibilityError("MONGODB-AWS authentication requires MongoDB version 4.4 or later");c.credentials.username||(c.credentials=await E(c.credentials,this.credentialFetcher));let{credentials:O}=c,F=O.username,y=O.password,g=O.mechanismProperties.AWS_SESSION_TOKEN,T=F&&y&&g?{accessKeyId:F,secretAccessKey:y,sessionToken:g}:F&&y?{accessKeyId:F,secretAccessKey:y}:void 0,D=O.source,N=await(0,a.randomBytes)(32),_={saslStart:1,mechanism:"MONGODB-AWS",payload:u.serialize({r:N,p:o},n)},R=await b.command((0,a.ns)(`${D}.$cmd`),_,void 0),j=u.deserialize(R.payload.buffer,n),L=j.h,I=j.s.buffer;if(I.length!==64)throw new h.MongoRuntimeError(`Invalid server nonce length ${I.length}, expected 64`);if(!a.ByteUtils.equals(I.subarray(0,N.byteLength),N))throw new h.MongoRuntimeError("Server nonce does not begin with client nonce");if(L.length<1||L.length>255||L.indexOf("..")!==-1)throw new h.MongoRuntimeError(`Server returned an invalid host: "${L}"`);let M="Action=GetCallerIdentity&Version=2011-06-15",S=f({method:"POST",host:L,region:m(j.h),service:"sts",headers:{"Content-Type":"application/x-www-form-urlencoded","Content-Length":M.length,"X-MongoDB-Server-Nonce":a.ByteUtils.toBase64(I),"X-MongoDB-GS2-CB-Flag":"n"},path:"/",body:M},T),v={a:S.headers.Authorization,d:S.headers["X-Amz-Date"]};g&&(v.t=g);let w={saslContinue:1,conversationId:1,payload:u.serialize(v,n)};await b.command((0,a.ns)(`${D}.$cmd`),w,void 0)}};e.MongoDBAWS=r;async function E(c,b){function f(F){if(!F.AccessKeyId||!F.SecretAccessKey)throw new h.MongoMissingCredentialsError("Could not obtain temporary MONGODB-AWS credentials");return new p.MongoCredentials({username:F.AccessKeyId,password:F.SecretAccessKey,source:c.source,mechanism:A.AuthMechanism.MONGODB_AWS,mechanismProperties:{AWS_SESSION_TOKEN:F.Token}})}let O=await b.getCredentials();return f(O)}function m(c){let b=c.split(".");return b.length===1||b[1]==="amazonaws"?"us-east-1":b[1]}}),eo=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.startCommandDocument=e.finishCommandDocument=void 0;var u=kr(),d=Mt();function h(l,i){return i!=null?{saslContinue:1,conversationId:i,payload:new u.Binary(u.BSON.serialize({jwt:l}))}:{saslStart:1,mechanism:d.AuthMechanism.MONGODB_OIDC,payload:new u.Binary(u.BSON.serialize({jwt:l}))}}e.finishCommandDocument=h;function a(l){let i={};return l.username&&(i.n=l.username),{saslStart:1,autoAuthorize:1,mechanism:d.AuthMechanism.MONGODB_OIDC,payload:new u.Binary(u.BSON.serialize(i))}}e.startCommandDocument=a}),n1=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MachineWorkflow=void 0;var u=ve("timers/promises"),d=ye(),h=eo(),a=100,l=class{constructor(i){this.cache=i,this.callback=this.withLock(this.getToken.bind(this)),this.lastExecutionTime=Date.now()-a}async execute(i,p){let A=await this.getTokenFromCacheOrEnv(i,p),o=(0,h.finishCommandDocument)(A);await i.command((0,d.ns)(p.source),o,void 0)}async reauthenticate(i,p){this.cache.hasAccessToken&&(i.accessToken===this.cache.getAccessToken()?(this.cache.removeAccessToken(),delete i.accessToken):i.accessToken=this.cache.getAccessToken()),await this.execute(i,p)}async speculativeAuth(i,p){if(!this.cache.hasAccessToken)return{};let A=await this.getTokenFromCacheOrEnv(i,p),o=(0,h.finishCommandDocument)(A);return o.db=p.source,{speculativeAuthenticate:o}}async getTokenFromCacheOrEnv(i,p){if(this.cache.hasAccessToken)return this.cache.getAccessToken();{let A=await this.callback(p);return this.cache.put({accessToken:A.access_token,expiresInSeconds:A.expires_in}),i.accessToken=A.access_token,A.access_token}}withLock(i){let p=Promise.resolve();return async A=>(await p,p=p.catch(()=>null).then(async()=>{let o=Date.now()-this.lastExecutionTime;return o<=a&&await(0,u.setTimeout)(a-o),this.lastExecutionTime=Date.now(),await i(A)}),await p)}};e.MachineWorkflow=l}),ji=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AzureMachineWorkflow=void 0;var u=Wn(),d=pe(),h=ye(),a=n1(),l=Object.freeze({Metadata:"true",Accept:"application/json"}),i="Azure endpoint did not return a value with only access_token and expires_in properties",p="TOKEN_RESOURCE must be set in the auth mechanism properties when ENVIRONMENT is azure.",A=class extends a.MachineWorkflow{constructor(r){super(r)}async getToken(r){let E=r?.mechanismProperties.TOKEN_RESOURCE,m=r?.username;if(!E)throw new d.MongoAzureError(p);let c=await o(E,m);if(!n(c))throw new d.MongoAzureError(i);return c}};e.AzureMachineWorkflow=A;async function o(r,E){let m=new URL(u.AZURE_BASE_URL);(0,u.addAzureParams)(m,r,E);let c=await(0,h.get)(m,{headers:l});if(c.status!==200)throw new d.MongoAzureError(`Status code ${c.status} returned from the Azure endpoint. Response body: ${c.body}`);let b=JSON.parse(c.body);return{access_token:b.access_token,expires_in:Number(b.expires_in)}}function n(r){return r==null||typeof r!="object"?!1:"access_token"in r&&typeof r.access_token=="string"&&"expires_in"in r&&typeof r.expires_in=="number"}}),$i=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GCPMachineWorkflow=void 0;var u=pe(),d=ye(),h=n1(),a="http://metadata/computeMetadata/v1/instance/service-accounts/default/identity",l=Object.freeze({"Metadata-Flavor":"Google"}),i="TOKEN_RESOURCE must be set in the auth mechanism properties when ENVIRONMENT is gcp.",p=class extends h.MachineWorkflow{constructor(o){super(o)}async getToken(o){let n=o?.mechanismProperties.TOKEN_RESOURCE;if(!n)throw new u.MongoGCPError(i);return await A(n)}};e.GCPMachineWorkflow=p;async function A(o){let n=new URL(a);n.searchParams.append("audience",o);let r=await(0,d.get)(n,{headers:l});if(r.status!==200)throw new u.MongoGCPError(`Status code ${r.status} returned from the GCP endpoint. Response body: ${r.body}`);return{access_token:r.body}}}),to=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenCache=void 0;var u=pe(),d=class extends u.MongoDriverError{},h=class{get hasAccessToken(){return!!this.accessToken}get hasRefreshToken(){return!!this.refreshToken}get hasIdpInfo(){return!!this.idpInfo}getAccessToken(){if(!this.accessToken)throw new d("Attempted to get an access token when none exists.");return this.accessToken}getRefreshToken(){if(!this.refreshToken)throw new d("Attempted to get a refresh token when none exists.");return this.refreshToken}getIdpInfo(){if(!this.idpInfo)throw new d("Attempted to get IDP information when none exists.");return this.idpInfo}put(a,l){this.accessToken=a.accessToken,this.refreshToken=a.refreshToken,this.expiresInSeconds=a.expiresInSeconds,l&&(this.idpInfo=l)}removeAccessToken(){this.accessToken=void 0}removeRefreshToken(){this.refreshToken=void 0}};e.TokenCache=h}),Wi=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenMachineWorkflow=void 0;var u=ve("fs"),d=pe(),h=n1(),a="OIDC_TOKEN_FILE must be set in the environment.",l=class extends h.MachineWorkflow{constructor(i){super(i)}async getToken(){let i=process.env.OIDC_TOKEN_FILE;if(!i)throw new d.MongoAWSError(a);return{access_token:await u.promises.readFile(i,"utf8")}}};e.TokenMachineWorkflow=l}),o1=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MongoDBOIDC=e.OIDC_WORKFLOWS=e.OIDC_VERSION=void 0;var u=pe(),d=xt(),h=ji(),a=$i(),l=to(),i=Wi(),p="AuthContext must provide credentials.";e.OIDC_VERSION=1,e.OIDC_WORKFLOWS=new Map,e.OIDC_WORKFLOWS.set("test",()=>new i.TokenMachineWorkflow(new l.TokenCache)),e.OIDC_WORKFLOWS.set("azure",()=>new h.AzureMachineWorkflow(new l.TokenCache)),e.OIDC_WORKFLOWS.set("gcp",()=>new a.GCPMachineWorkflow(new l.TokenCache));var A=class extends d.AuthProvider{constructor(n){if(super(),!n)throw new u.MongoInvalidArgumentError("No workflow provided to the OIDC auth provider.");this.workflow=n}async auth(n){let{connection:r,reauthenticating:E,response:m}=n;if(m?.speculativeAuthenticate?.done)return;let c=o(n);E?await this.workflow.reauthenticate(r,c):await this.workflow.execute(r,c,m)}async prepare(n,r){let{connection:E}=r,m=o(r),c=await this.workflow.speculativeAuth(E,m);return{...n,...c}}};e.MongoDBOIDC=A;function o(n){let{credentials:r}=n;if(!r)throw new u.MongoMissingCredentialsError(p);return r}}),ro=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CallbackWorkflow=e.AUTOMATED_TIMEOUT_MS=e.HUMAN_TIMEOUT_MS=void 0;var u=ve("timers/promises"),d=pe(),h=ye(),a=eo();e.HUMAN_TIMEOUT_MS=3e5,e.AUTOMATED_TIMEOUT_MS=6e4;var l=["accessToken","expiresInSeconds","refreshToken"],i="User provided OIDC callbacks must return a valid object with an accessToken.",p=100,A=class{constructor(n,r){this.cache=n,this.callback=this.withLock(r),this.lastExecutionTime=Date.now()-p}async speculativeAuth(n,r){if(this.cache.hasAccessToken){let E=this.cache.getAccessToken();n.accessToken=E;let m=(0,a.finishCommandDocument)(E);return m.db=r.source,{speculativeAuthenticate:m}}return{}}async reauthenticate(n,r){this.cache.hasAccessToken&&(n.accessToken===this.cache.getAccessToken()?(this.cache.removeAccessToken(),delete n.accessToken):n.accessToken=this.cache.getAccessToken()),await this.execute(n,r)}async startAuthentication(n,r,E){let m;return E?.speculativeAuthenticate?m=E.speculativeAuthenticate:m=await n.command((0,h.ns)(r.source),(0,a.startCommandDocument)(r),void 0),m}async finishAuthentication(n,r,E,m){await n.command((0,h.ns)(r.source),(0,a.finishCommandDocument)(E,m),void 0)}async executeAndValidateCallback(n){let r=await this.callback(n);if(o(r))throw new d.MongoMissingCredentialsError(i);return r}withLock(n){let r=Promise.resolve();return async E=>(await r,r=r.catch(()=>null).then(async()=>{let m=Date.now()-this.lastExecutionTime;return m<=p&&await(0,u.setTimeout)(p-m,{signal:E.timeoutContext}),this.lastExecutionTime=Date.now(),await n(E)}),await r)}};e.CallbackWorkflow=A;function o(n){return n==null||typeof n!="object"||!("accessToken"in n)?!0:!Object.getOwnPropertyNames(n).every(r=>l.includes(r))}}),zi=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AutomatedCallbackWorkflow=void 0;var u=pe(),d=Kr(),h=o1(),a=ro(),l=class extends a.CallbackWorkflow{constructor(i,p){super(i,p)}async execute(i,p){if(this.cache.hasAccessToken){let o=this.cache.getAccessToken();try{return await this.finishAuthentication(i,p,o)}catch(n){if(n instanceof u.MongoError&&n.code===u.MONGODB_ERROR_CODES.AuthenticationFailed)return this.cache.removeAccessToken(),await this.execute(i,p);throw n}}let A=await this.fetchAccessToken(p);this.cache.put(A),i.accessToken=A.accessToken,await this.finishAuthentication(i,p,A.accessToken)}async fetchAccessToken(i){let p=new AbortController,A={timeoutContext:p.signal,version:h.OIDC_VERSION};i.username&&(A.username=i.username);let o=d.Timeout.expires(a.AUTOMATED_TIMEOUT_MS);try{return await Promise.race([this.executeAndValidateCallback(A),o])}catch(n){throw d.TimeoutError.is(n)?(p.abort(),new u.MongoOIDCError(`OIDC callback timed out after ${a.AUTOMATED_TIMEOUT_MS}ms.`)):n}finally{o.clear()}}};e.AutomatedCallbackWorkflow=l}),Vi=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HumanCallbackWorkflow=void 0;var u=kr(),d=pe(),h=Kr(),a=o1(),l=ro(),i=class extends l.CallbackWorkflow{constructor(p,A){super(p,A)}async execute(p,A){if(this.cache.hasAccessToken){let m=this.cache.getAccessToken();p.accessToken=m;try{return await this.finishAuthentication(p,A,m)}catch(c){if(c instanceof d.MongoError&&c.code===d.MONGODB_ERROR_CODES.AuthenticationFailed)return this.cache.removeAccessToken(),delete p.accessToken,await this.execute(p,A);throw c}}if(this.cache.hasRefreshToken){let m=this.cache.getRefreshToken(),c=await this.fetchAccessToken(this.cache.getIdpInfo(),A,m);this.cache.put(c),p.accessToken=c.accessToken;try{return await this.finishAuthentication(p,A,c.accessToken)}catch(b){if(b instanceof d.MongoError&&b.code===d.MONGODB_ERROR_CODES.AuthenticationFailed)return this.cache.removeRefreshToken(),delete p.accessToken,await this.execute(p,A);throw b}}let o=await this.startAuthentication(p,A),n=o.conversationId,r=u.BSON.deserialize(o.payload.buffer),E=await this.fetchAccessToken(r,A);return this.cache.put(E,r),p.accessToken=E.accessToken,await this.finishAuthentication(p,A,E.accessToken,n)}async fetchAccessToken(p,A,o){let n=new AbortController,r={timeoutContext:n.signal,version:a.OIDC_VERSION,idpInfo:p};A.username&&(r.username=A.username),o&&(r.refreshToken=o);let E=h.Timeout.expires(l.HUMAN_TIMEOUT_MS);try{return await Promise.race([this.executeAndValidateCallback(r),E])}catch(m){throw h.TimeoutError.is(m)?(n.abort(),new d.MongoOIDCError(`OIDC callback timed out after ${l.HUMAN_TIMEOUT_MS}ms.`)):m}finally{E.clear()}}};e.HumanCallbackWorkflow=i}),Gi=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Plain=void 0;var u=Ue(),d=pe(),h=ye(),a=xt(),l=class extends a.AuthProvider{async auth(i){let{connection:p,credentials:A}=i;if(!A)throw new d.MongoMissingCredentialsError("AuthContext must provide credentials.");let{username:o,password:n}=A,r={saslStart:1,mechanism:"PLAIN",payload:new u.Binary(Buffer.from(`\0${o}\0${n}`)),autoAuthorize:1};await p.command((0,h.ns)("$external.$cmd"),r,void 0)}};e.Plain=l}),Hi=J((e,u)=>{"use strict";var d=p=>p.codePointAt(0),h=p=>p[0],a=p=>p[p.length-1];function l(p){let A=[],o=p.length;for(let n=0;n<o;n+=1){let r=p.charCodeAt(n);if(r>=55296&&r<=56319&&o>n+1){let E=p.charCodeAt(n+1);if(E>=56320&&E<=57343){A.push((r-55296)*1024+E-56320+65536),n+=1;continue}}A.push(r)}return A}function i({unassigned_code_points:p,commonly_mapped_to_nothing:A,non_ASCII_space_characters:o,prohibited_characters:n,bidirectional_r_al:r,bidirectional_l:E},m,c={}){let b=o,f=A;if(typeof m!="string")throw new TypeError("Expected string.");if(m.length===0)return"";let O=l(m).map(_=>b.get(_)?32:_).filter(_=>!f.get(_)),F=String.fromCodePoint.apply(null,O).normalize("NFKC"),y=l(F);if(y.some(_=>n.get(_)))throw new Error("Prohibited character, see https://tools.ietf.org/html/rfc4013#section-2.3");if(c.allowUnassigned!==!0&&y.some(_=>p.get(_)))throw new Error("Unassigned code point, see https://tools.ietf.org/html/rfc4013#section-2.5");let g=y.some(_=>r.get(_)),T=y.some(_=>E.get(_));if(g&&T)throw new Error("String must not contain RandALCat and LCat at the same time, see https://tools.ietf.org/html/rfc3454#section-6");let D=r.get(d(h(F))),N=r.get(d(a(F)));if(g&&!(D&&N))throw new Error("Bidirectional RandALCat character must be the first and the last character of the string, see https://tools.ietf.org/html/rfc3454#section-6");return F}i.saslprep=i,i.default=i,u.exports=i}),qi=J((e,u)=>{u.exports=d;function d(o,n){if(!(this instanceof d))return new d(o,n);this.length=0,this.updates=[],this.path=new Uint16Array(4),this.pages=new Array(32768),this.maxPages=this.pages.length,this.level=0,this.pageSize=o||1024,this.deduplicate=n?n.deduplicate:null,this.zeros=this.deduplicate?l(this.deduplicate.length):null}d.prototype.updated=function(o){for(;this.deduplicate&&o.buffer[o.deduplicate]===this.deduplicate[o.deduplicate];)if(o.deduplicate++,o.deduplicate===this.deduplicate.length){o.deduplicate=0,o.buffer.equals&&o.buffer.equals(this.deduplicate)&&(o.buffer=this.deduplicate);break}o.updated||!this.updates||(o.updated=!0,this.updates.push(o))},d.prototype.lastUpdate=function(){if(!this.updates||!this.updates.length)return null;var o=this.updates.pop();return o.updated=!1,o},d.prototype._array=function(o,n){if(o>=this.maxPages){if(n)return;h(this,o)}A(o,this.path);for(var r=this.pages,E=this.level;E>0;E--){var m=this.path[E],c=r[m];if(!c){if(n)return;c=r[m]=new Array(32768)}r=c}return r},d.prototype.get=function(o,n){var r=this._array(o,n),E=this.path[0],m=r&&r[E];return!m&&!n&&(m=r[E]=new p(o,l(this.pageSize)),o>=this.length&&(this.length=o+1)),m&&m.buffer===this.deduplicate&&this.deduplicate&&!n&&(m.buffer=i(m.buffer),m.deduplicate=0),m},d.prototype.set=function(o,n){var r=this._array(o,!1),E=this.path[0];if(o>=this.length&&(this.length=o+1),!n||this.zeros&&n.equals&&n.equals(this.zeros)){r[E]=void 0;return}this.deduplicate&&n.equals&&n.equals(this.deduplicate)&&(n=this.deduplicate);var m=r[E],c=a(n,this.pageSize);m?m.buffer=c:r[E]=new p(o,c)},d.prototype.toBuffer=function(){for(var o=new Array(this.length),n=l(this.pageSize),r=0;r<o.length;)for(var E=this._array(r,!0),m=0;m<32768&&r<o.length;m++)o[r++]=E&&E[m]?E[m].buffer:n;return Buffer.concat(o)};function h(o,n){for(;o.maxPages<n;){var r=o.pages;o.pages=new Array(32768),o.pages[0]=r,o.level++,o.maxPages*=32768}}function a(o,n){if(o.length===n)return o;if(o.length>n)return o.slice(0,n);var r=l(n);return o.copy(r),r}function l(o){if(Buffer.alloc)return Buffer.alloc(o);var n=new Buffer(o);return n.fill(0),n}function i(o){var n=Buffer.allocUnsafe?Buffer.allocUnsafe(o.length):new Buffer(o.length);return o.copy(n),n}function p(o,n){this.offset=o*n.length,this.buffer=n,this.updated=!1,this.deduplicate=0}function A(o,n){o=(o-(n[0]=o&32767))/32768,o=(o-(n[1]=o&32767))/32768,n[3]=(o-(n[2]=o&32767))/32768&32767}}),Ki=J((e,u)=>{var d=qi();u.exports=h;function h(i){if(!(this instanceof h))return new h(i);if(i||(i={}),Buffer.isBuffer(i)&&(i={buffer:i}),this.pageOffset=i.pageOffset||0,this.pageSize=i.pageSize||1024,this.pages=i.pages||d(this.pageSize),this.byteLength=this.pages.length*this.pageSize,this.length=8*this.byteLength,!l(this.pageSize))throw new Error("The page size should be a power of two");if(this._trackUpdates=!!i.trackUpdates,this._pageMask=this.pageSize-1,i.buffer){for(var p=0;p<i.buffer.length;p+=this.pageSize)this.pages.set(p/this.pageSize,i.buffer.slice(p,p+this.pageSize));this.byteLength=i.buffer.length,this.length=8*this.byteLength}}h.prototype.get=function(i){var p=i&7,A=(i-p)/8;return!!(this.getByte(A)&128>>p)},h.prototype.getByte=function(i){var p=i&this._pageMask,A=(i-p)/this.pageSize,o=this.pages.get(A,!0);return o?o.buffer[p+this.pageOffset]:0},h.prototype.set=function(i,p){var A=i&7,o=(i-A)/8,n=this.getByte(o);return this.setByte(o,p?n|128>>A:n&(255^128>>A))},h.prototype.toBuffer=function(){for(var i=a(this.pages.length*this.pageSize),p=0;p<this.pages.length;p++){var A=this.pages.get(p,!0),o=p*this.pageSize;A&&A.buffer.copy(i,o,this.pageOffset,this.pageOffset+this.pageSize)}return i},h.prototype.setByte=function(i,p){var A=i&this._pageMask,o=(i-A)/this.pageSize,n=this.pages.get(o,!1);return A+=this.pageOffset,n.buffer[A]===p?!1:(n.buffer[A]=p,i>=this.byteLength&&(this.byteLength=i+1,this.length=this.byteLength*8),this._trackUpdates&&this.pages.updated(n),!0)};function a(i){if(Buffer.alloc)return Buffer.alloc(i);var p=new Buffer(i);return p.fill(0),p}function l(i){return!(i&i-1)}}),Yi=J(e=>{"use strict";var u=e&&e.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(e,"__esModule",{value:!0}),e.createMemoryCodePoints=void 0;var d=u(Ki());function h(a){let l=0;function i(){let m=a.readUInt32BE(l);l+=4;let c=a.slice(l,l+m);return l+=m,(0,d.default)({buffer:c})}let p=i(),A=i(),o=i(),n=i(),r=i(),E=i();return{unassigned_code_points:p,commonly_mapped_to_nothing:A,non_ASCII_space_characters:o,prohibited_characters:n,bidirectional_r_al:r,bidirectional_l:E}}e.createMemoryCodePoints=h}),Ji=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var u=ve("zlib");e.default=(0,u.gunzipSync)(Buffer.from("H4sIAAAAAAACA+3dTYgcaRkA4LemO9Mhxm0FITnE9Cwr4jHgwgZ22B6YywqCJ0HQg5CL4sGTuOjCtGSF4CkHEW856MlTQHD3EJnWkU0Owh5VxE3LHlYQdNxd2U6mU59UV/d09fw4M2EySSXPAzNdP1/9fX/99bzVNZEN4jisRDulVFnQmLxm1aXF9Id/2/xMxNJ4XZlg576yuYlGt9gupV6xoFf8jhu9YvulVrFlp5XSx+lfvYhORGPXvqIRWSxERKtIm8bKFd10WNfKDS5Fo9jJWrq2+M2IlW+8uHgl/+BsROfPF4v5L7148Ur68Sha6dqZpYiVVy8tvLCWXo80Sf/lS89dGX2wHGvpzoXVn75/YWH5wmqe8uika82ViJXTy83Ve2k5Urozm38wm4/ls6t5uT6yfsTSJ7J3T0VKt8c5ExEXI8aFkH729c3eT+7EC6ca8cVULZUiYacX0R5PNWNxlh9L1y90q5kyzrpyy+9WcvOV6URntqw7La9sNVstXyczWVaWYbaaTYqzOHpr7pyiNT3/YzKuT63Z/FqKZlFTiuXtFM2vVOtIq7jiyKJbWZaOWD0euz0yoV2Z7kY0xq2x0YhfzVpmM5px9nTEH7JZ0ot5u39p0ma75Z472/s/H+2yr2inYyuq7fMvJivH2rM72N/Z3lyL31F2b1ya1P0zn816k2KP6JU9UzseucdQH5YqVeH/lFajSN2udg+TLJ9rksNxlvV2lki19rXKI43TPLejFu4ov7k3nMbhyhfY3Xb37f8BAGCf0eMTOH5szf154KmnNgKcnLb+Fzi2AfXktbN7fJelwTAiO/W5uQ2KINXRYu+znqo/WTAdLadURHmy3qciazd3bra4T3w16/f7t7Ms9U5gfJu10955sx1r3vmhBAAAAAAAgId20J1iZbDowNvIjuH427Gr5l/eiC+8OplZON8sVjx/qr9y+Pj+YRItT+NqAM+kkZs3AAAAAID6yfx1FwCAI97/dCh1/ub6SA0AAAAAAAAAgNoT/wcAAAAAAACA+hP/BwAAAAAAAID6E/8HAAAAAAAAgPoT/wcAAAAAAACA+hP/BwAAAAAAAID6E/8HAAAAAAAAgPoT/wcAAAAAAACA+hP/BwAAAAAAAID6E/8HAAAAAAAAgPoT/wcAAAAAAACA+hutp5SiQpYAAAAAAAAAQO2MIpZiT804flnAE2fhwjOeAZXr76kOAAAAAAAA8FjNf4N/l0NE3U/vuVQskLpSd4/Yh2xu9xTu0tFeeNYsLI2f/VMdNxTzj6Je9E/+6pp6Nn3awW3A54goe4Bss6v+PGsjQGMAAAAAAOBp5XEgwH6e7J7rwEQHRb/XvAMAAAAAAAA8yzoDeQDwVGjIAgAAAAAAAACoPfF/AAAAAAAAAKg/8X8AAAAAAAAAqD/xfwAAAAAAAACoP/F/AAAAAAAAAKg/8X8AAAAAAAAAqD/xfwAAAAAAAACoP/F/AAAAAAAAAKg/8X8AAAAAAAAAqD/xfwAAAAAAAACoP/F/AAAAAAAAAKg/8X8AAAAAAAAAqL/GSkSkClkCAAAAAAAAALXTSAAAAAAAAABA3Y1kAQAAAAAAAADUX8RSXZ9dsHC9+M8Fg2Ex/em1lAZpEBGttcrVjZqLEa+k0XpKw9mG4zWx4ukPUMhkAQAAAAAAABzBqbSe3//rXOS9HxGdo4TqR2XkutCdBu+LaPZw/lBbO7cbHnh2C7N7AIo4evEznllqLqWUp/LnYOtpM2bnOH66wI1+9GO4sOuISwv/TOlumu56FDv3NZhc4mR9v7zYIrafr40j/Cccvj9Xns3t3mu99E7qxUv3bqS0/ouNH/08++RGemfQ+nsx/5uNXsQPGulynPvv3ZTW37zd+1ovrqaYpP/122X6Xpx779Z3zr/3YOPKW1lkaRDf31pPaf3j/msRsVGkL+d/f+/m4sJsPm1cfSsr16e8m9Ldj/KsnyIuR3nXw83Is3EhxLd/2V773ks3m/cj/THKUummdP9qKhIOImuOU0Xjwb3y+oqt735rpTetVbF9n8R4x9crRfO77TKqVOZpDclv5bfK18lMnk+q0K18UpxF/RrGXE0Zxtqx3tWSj+vxbL4XaasfKb0dRbtLW73JsfPGg177H+OmGKlfvS1msllt7JEJm9XOJqXR+Fkfo1H66uy5H1v3Xx5+uJmGLw9jro2u7Loj4PnuR6+f+e3d261+eazNhzrL7X83MohoHpS4PddV8ki1it61//pw1g7z6p1U/26Nm2llST57B5rUvuG0XqSU/rPd7jYrqWcbd+beJQ77BgPMDwn37/8BAGCf0eMTOH4cPlufv9VGgJOzqf8Fjm1APXkd7B7f5dF57GPMaWy/MTvjvNvtXj6h8W2+GXvnzXaseeeHEgAAAAAAAB7aQXeKlcGiadBoEOeLb2dtpGOL2MyOtf391a3P/zD96c3JzIP3t4oV797vrh8+vn+YRL5bBuj/AQAAAABqJvfHXQAAHkX82zfXAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACeAgkAAAAAAAAAqLuRLAAAAAAAAACA2hv9D1iu/VAYaAYA","base64"))}),Xi=J((e,u)=>{"use strict";var d=e&&e.__importDefault||function(A){return A&&A.__esModule?A:{default:A}},h=d(Hi()),a=Yi(),l=d(Ji()),i=(0,a.createMemoryCodePoints)(l.default);function p(A,o){return(0,h.default)(i,A,o)}p.saslprep=p,p.default=p,u.exports=p}),Zi=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ScramSHA256=e.ScramSHA1=void 0;var u=Xi(),d=ve("crypto"),h=Ue(),a=pe(),l=ye(),i=xt(),p=Mt(),A=class extends i.AuthProvider{constructor(L){super(),this.cryptoMethod=L||"sha1"}async prepare(L,I){let M=this.cryptoMethod,S=I.credentials;if(!S)throw new a.MongoMissingCredentialsError("AuthContext must provide credentials.");let v=await(0,l.randomBytes)(24);return I.nonce=v,{...L,speculativeAuthenticate:{...r(M,S,v),db:S.source}}}async auth(L){let{reauthenticating:I,response:M}=L;return M?.speculativeAuthenticate&&!I?await m(this.cryptoMethod,M.speculativeAuthenticate,L):await E(this.cryptoMethod,L)}};function o(L){return L.replace("=","=3D").replace(",","=2C")}function n(L,I){return Buffer.concat([Buffer.from("n=","utf8"),Buffer.from(L,"utf8"),Buffer.from(",r=","utf8"),Buffer.from(I.toString("base64"),"utf8")])}function r(L,I,M){let S=o(I.username);return{saslStart:1,mechanism:L==="sha1"?p.AuthMechanism.MONGODB_SCRAM_SHA1:p.AuthMechanism.MONGODB_SCRAM_SHA256,payload:new h.Binary(Buffer.concat([Buffer.from("n,,","utf8"),n(S,M)])),autoAuthorize:1,options:{skipEmptyExchange:!0}}}async function E(L,I){let{connection:M,credentials:S}=I;if(!S)throw new a.MongoMissingCredentialsError("AuthContext must provide credentials.");if(!I.nonce)throw new a.MongoInvalidArgumentError("AuthContext must contain a valid nonce property");let v=I.nonce,w=S.source,k=r(L,S,v),$=await M.command((0,l.ns)(`${w}.$cmd`),k,void 0);await m(L,$,I)}async function m(L,I,M){let S=M.connection,v=M.credentials;if(!v)throw new a.MongoMissingCredentialsError("AuthContext must provide credentials.");if(!M.nonce)throw new a.MongoInvalidArgumentError("Unable to continue SCRAM without valid nonce");let w=M.nonce,k=v.source,$=o(v.username),X=v.password,de=L==="sha256"?(0,u.saslprep)(X):b($,X),Y=Buffer.isBuffer(I.payload)?new h.Binary(I.payload):I.payload,se=c(Y),x=parseInt(se.i,10);if(x&&x<4096)throw new a.MongoRuntimeError(`Server returned an invalid iteration count ${x}`);let G=se.s,Q=se.r;if(Q.startsWith("nonce"))throw new a.MongoRuntimeError(`Server returned an invalid nonce: ${Q}`);let oe=`c=biws,r=${Q}`,Ee=N(de,Buffer.from(G,"base64"),x,L),De=F(L,Ee,"Client Key"),Je=F(L,Ee,"Server Key"),ze=O(L,De),Ce=[n($,w),Y.toString("utf8"),oe].join(","),Me=F(L,ze,Ce),qe=`p=${f(De,Me)}`,Ge=[oe,qe].join(","),ct=F(L,Je,Ce),St={saslContinue:1,conversationId:I.conversationId,payload:new h.Binary(Buffer.from(Ge))},K=await S.command((0,l.ns)(`${k}.$cmd`),St,void 0),P=c(K.payload);if(!_(Buffer.from(P.v,"base64"),ct))throw new a.MongoRuntimeError("Server returned an invalid signature");if(K.done!==!1)return;let te={saslContinue:1,conversationId:K.conversationId,payload:Buffer.alloc(0)};await S.command((0,l.ns)(`${k}.$cmd`),te,void 0)}function c(L){let I=L.toString("utf8"),M={},S=I.split(",");for(let v=0;v<S.length;v++){let w=(S[v].match(/^([^=]*)=(.*)$/)??[]).slice(1);M[w[0]]=w[1]}return M}function b(L,I){if(typeof L!="string")throw new a.MongoInvalidArgumentError("Username must be a string");if(typeof I!="string")throw new a.MongoInvalidArgumentError("Password must be a string");if(I.length===0)throw new a.MongoInvalidArgumentError("Password cannot be empty");let M;try{M=d.createHash("md5")}catch(S){throw d.getFips()?new Error("Auth mechanism SCRAM-SHA-1 is not supported in FIPS mode"):S}return M.update(`${L}:mongo:${I}`,"utf8"),M.digest("hex")}function f(L,I){Buffer.isBuffer(L)||(L=Buffer.from(L)),Buffer.isBuffer(I)||(I=Buffer.from(I));let M=Math.max(L.length,I.length),S=[];for(let v=0;v<M;v+=1)S.push(L[v]^I[v]);return Buffer.from(S).toString("base64")}function O(L,I){return d.createHash(L).update(I).digest()}function F(L,I,M){return d.createHmac(L,I).update(M).digest()}var y={},g=0;function T(){y={},g=0}var D={sha256:32,sha1:20};function N(L,I,M,S){let v=[L,I.toString("base64"),M].join("_");if(y[v]!=null)return y[v];let w=d.pbkdf2Sync(L,I,M,D[S],S);return g>=200&&T(),y[v]=w,g+=1,w}function _(L,I){if(L.length!==I.length)return!1;if(typeof d.timingSafeEqual=="function")return d.timingSafeEqual(L,I);let M=0;for(let S=0;S<L.length;S++)M|=L[S]^I[S];return M===0}var R=class extends A{constructor(){super("sha1")}};e.ScramSHA1=R;var j=class extends A{constructor(){super("sha256")}};e.ScramSHA256=j}),Qi=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.X509=void 0;var u=pe(),d=ye(),h=xt(),a=class extends h.AuthProvider{async prepare(i,p){let{credentials:A}=p;if(!A)throw new u.MongoMissingCredentialsError("AuthContext must provide credentials.");return{...i,speculativeAuthenticate:l(A)}}async auth(i){let p=i.connection,A=i.credentials;if(!A)throw new u.MongoMissingCredentialsError("AuthContext must provide credentials.");i.response?.speculativeAuthenticate||await p.command((0,d.ns)("$external.$cmd"),l(A),void 0)}};e.X509=a;function l(i){let p={authenticate:1,mechanism:"MONGODB-X509"};return i.username&&(p.user=i.username),p}}),uo=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MongoClientAuthProviders=void 0;var u=Yu(),d=ki(),h=Ui(),a=o1(),l=zi(),i=Vi(),p=to(),A=Gi(),o=Mt(),n=Zi(),r=Qi(),E=pe(),m=new Map([[o.AuthMechanism.MONGODB_AWS,()=>new h.MongoDBAWS],[o.AuthMechanism.MONGODB_CR,()=>new d.MongoCR],[o.AuthMechanism.MONGODB_GSSAPI,()=>new u.GSSAPI],[o.AuthMechanism.MONGODB_OIDC,b=>new a.MongoDBOIDC(b)],[o.AuthMechanism.MONGODB_PLAIN,()=>new A.Plain],[o.AuthMechanism.MONGODB_SCRAM_SHA1,()=>new n.ScramSHA1],[o.AuthMechanism.MONGODB_SCRAM_SHA256,()=>new n.ScramSHA256],[o.AuthMechanism.MONGODB_X509,()=>new r.X509]]),c=class{constructor(){this.existingProviders=new Map}getOrCreateProvider(b,f){let O=this.existingProviders.get(b);if(O)return O;let F=m.get(b);if(!F)throw new E.MongoInvalidArgumentError(`authMechanism ${b} not supported`);let y;return b===o.AuthMechanism.MONGODB_OIDC?y=F(this.getWorkflow(f)):y=F(),this.existingProviders.set(b,y),y}getWorkflow(b){if(b.OIDC_HUMAN_CALLBACK)return new i.HumanCallbackWorkflow(new p.TokenCache,b.OIDC_HUMAN_CALLBACK);if(b.OIDC_CALLBACK)return new l.AutomatedCallbackWorkflow(new p.TokenCache,b.OIDC_CALLBACK);{let f=b.ENVIRONMENT,O=a.OIDC_WORKFLOWS.get(f)?.();if(!O)throw new E.MongoInvalidArgumentError(`Could not load workflow for environment ${b.ENVIRONMENT}`);return O}}};e.MongoClientAuthProviders=c}),no=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WaitingForSuitableServerEvent=e.ServerSelectionSucceededEvent=e.ServerSelectionFailedEvent=e.ServerSelectionStartedEvent=e.ServerSelectionEvent=void 0;var u=ye(),d=Xe(),h=class{constructor(A,o,n){this.selector=A,this.operation=n,this.topologyDescription=o}};e.ServerSelectionEvent=h;var a=class extends h{constructor(A,o,n){super(A,o,n),this.name=d.SERVER_SELECTION_STARTED,this.message="Server selection started"}};e.ServerSelectionStartedEvent=a;var l=class extends h{constructor(A,o,n,r){super(A,o,r),this.name=d.SERVER_SELECTION_FAILED,this.message="Server selection failed",this.failure=n}};e.ServerSelectionFailedEvent=l;var i=class extends h{constructor(A,o,n,r){super(A,o,r),this.name=d.SERVER_SELECTION_SUCCEEDED,this.message="Server selection succeeded";let{host:E,port:m}=u.HostAddress.fromString(n).toHostPort();this.serverHost=E,this.serverPort=m}};e.ServerSelectionSucceededEvent=i;var p=class extends h{constructor(A,o,n,r){super(A,o,r),this.name=d.WAITING_FOR_SUITABLE_SERVER,this.message="Waiting for suitable server to become available",this.remainingTimeMS=n}};e.WaitingForSuitableServerEvent=p}),oo=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SrvPoller=e.SrvPollingEvent=void 0;var u=ve("dns"),d=ve("timers"),h=pe(),a=Et(),l=ye(),i=class{constructor(A){this.srvRecords=A}hostnames(){return new Set(this.srvRecords.map(A=>l.HostAddress.fromSrvRecord(A).toString()))}};e.SrvPollingEvent=i;var p=class io extends a.TypedEventEmitter{constructor(o){if(super(),!o||!o.srvHost)throw new h.MongoRuntimeError("Options for SrvPoller must exist and include srvHost");this.srvHost=o.srvHost,this.srvMaxHosts=o.srvMaxHosts??0,this.srvServiceName=o.srvServiceName??"mongodb",this.rescanSrvIntervalMS=6e4,this.heartbeatFrequencyMS=o.heartbeatFrequencyMS??1e4,this.haMode=!1,this.generation=0,this._timeout=void 0}get srvAddress(){return`_${this.srvServiceName}._tcp.${this.srvHost}`}get intervalMS(){return this.haMode?this.heartbeatFrequencyMS:this.rescanSrvIntervalMS}start(){this._timeout||this.schedule()}stop(){this._timeout&&((0,d.clearTimeout)(this._timeout),this.generation+=1,this._timeout=void 0)}schedule(){this._timeout&&(0,d.clearTimeout)(this._timeout),this._timeout=(0,d.setTimeout)(()=>{this._poll().then(void 0,l.squashError)},this.intervalMS)}success(o){this.haMode=!1,this.schedule(),this.emit(io.SRV_RECORD_DISCOVERY,new i(o))}failure(){this.haMode=!0,this.schedule()}async _poll(){let o=this.generation,n;try{n=await u.promises.resolveSrv(this.srvAddress)}catch{this.failure();return}if(o!==this.generation)return;let r=[];for(let E of n)(0,l.matchesParentDomain)(E.name,this.srvHost)&&r.push(E);if(!r.length){this.failure();return}this.success(r)}};p.SRV_RECORD_DISCOVERY="srvRecordDiscovery",e.SrvPoller=p}),es=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ServerCapabilities=e.Topology=void 0;var u=Qn(),d=Xe(),h=pe(),a=Qt(),l=Et(),i=rt(),p=Kr(),A=ye(),o=pt(),n=u1(),r=Xn(),E=zr(),m=Wr(),c=no(),b=oo(),f=on(),O=0,F=(0,A.makeStateMachine)({[o.STATE_CLOSED]:[o.STATE_CLOSED,o.STATE_CONNECTING],[o.STATE_CONNECTING]:[o.STATE_CONNECTING,o.STATE_CLOSING,o.STATE_CONNECTED,o.STATE_CLOSED],[o.STATE_CONNECTED]:[o.STATE_CONNECTED,o.STATE_CLOSING,o.STATE_CLOSED],[o.STATE_CLOSING]:[o.STATE_CLOSING,o.STATE_CLOSED]}),y=Symbol("cancelled"),g=Symbol("waitQueue"),T=class st extends l.TypedEventEmitter{constructor(v,w,k){super(),this.client=v,k=k??{hosts:[A.HostAddress.fromString("localhost:27017")],...Object.fromEntries(u.DEFAULT_OPTIONS.entries()),...Object.fromEntries(u.FEATURE_FLAGS.entries())},typeof w=="string"?w=[A.HostAddress.fromString(w)]:Array.isArray(w)||(w=[w]);let $=[];for(let x of w)if(typeof x=="string")$.push(A.HostAddress.fromString(x));else if(x instanceof A.HostAddress)$.push(x);else throw new h.MongoRuntimeError(`Topology cannot be constructed from ${JSON.stringify(x)}`);let X=N(k),de=O++,Y=k.srvMaxHosts==null||k.srvMaxHosts===0||k.srvMaxHosts>=$.length?$:(0,A.shuffle)($,k.srvMaxHosts),se=new Map;for(let x of Y)se.set(x.toString(),new E.ServerDescription(x));this[g]=new A.List,this.s={id:de,options:k,seedlist:$,state:o.STATE_CLOSED,description:new f.TopologyDescription(X,se,k.replicaSet,void 0,void 0,void 0,k),serverSelectionTimeoutMS:k.serverSelectionTimeoutMS,heartbeatFrequencyMS:k.heartbeatFrequencyMS,minHeartbeatFrequencyMS:k.minHeartbeatFrequencyMS,servers:new Map,credentials:k?.credentials,clusterTime:void 0,connectionTimers:new Set,detectShardedTopology:x=>this.detectShardedTopology(x),detectSrvRecords:x=>this.detectSrvRecords(x)},this.mongoLogger=v.mongoLogger,this.component="topology",k.srvHost&&!k.loadBalanced&&(this.s.srvPoller=k.srvPoller??new b.SrvPoller({heartbeatFrequencyMS:this.s.heartbeatFrequencyMS,srvHost:k.srvHost,srvMaxHosts:k.srvMaxHosts,srvServiceName:k.srvServiceName}),this.on(st.TOPOLOGY_DESCRIPTION_CHANGED,this.s.detectShardedTopology)),this.connectionLock=void 0}detectShardedTopology(v){let w=v.previousDescription.type,k=v.newDescription.type,$=w!==o.TopologyType.Sharded&&k===o.TopologyType.Sharded,X=!!this.s.srvPoller?.listeners(b.SrvPoller.SRV_RECORD_DISCOVERY)?.includes(this.s.detectSrvRecords);$&&!X&&(this.s.srvPoller?.on(b.SrvPoller.SRV_RECORD_DISCOVERY,this.s.detectSrvRecords),this.s.srvPoller?.start())}detectSrvRecords(v){let w=this.s.description;this.s.description=this.s.description.updateFromSrvPollingEvent(v,this.s.options.srvMaxHosts),this.s.description!==w&&(R(this),this.emitAndLog(st.TOPOLOGY_DESCRIPTION_CHANGED,new n.TopologyDescriptionChangedEvent(this.s.id,w,this.s.description)))}get description(){return this.s.description}get loadBalanced(){return this.s.options.loadBalanced}get serverApi(){return this.s.options.serverApi}get capabilities(){return new M(this.lastHello())}async connect(v){this.connectionLock??=this._connect(v);try{return await this.connectionLock,this}finally{this.connectionLock=void 0}return this}async _connect(v){if(v=v??{},this.s.state===o.STATE_CONNECTED)return this;F(this,o.STATE_CONNECTING),this.emitAndLog(st.TOPOLOGY_OPENING,new n.TopologyOpeningEvent(this.s.id)),this.emitAndLog(st.TOPOLOGY_DESCRIPTION_CHANGED,new n.TopologyDescriptionChangedEvent(this.s.id,new f.TopologyDescription(o.TopologyType.Unknown),this.s.description));let w=Array.from(this.s.description.servers.values());if(this.s.servers=new Map(w.map(X=>[X.address,_(this,X)])),this.s.options.loadBalanced)for(let X of w){let de=new E.ServerDescription(X.hostAddress,void 0,{loadBalanced:this.s.options.loadBalanced});this.serverUpdateHandler(de)}let k=v.readPreference??i.ReadPreference.primary,$={operationName:"ping",...v};try{let X=await this.selectServer((0,m.readPreferenceServerSelector)(k),$);return this.s.options[Symbol.for("@@mdb.skipPingOnConnect")]!==!0&&X&&this.s.credentials?(await X.command((0,A.ns)("admin.$cmd"),{ping:1},{}),F(this,o.STATE_CONNECTED),this.emit(st.OPEN,this),this.emit(st.CONNECT,this),this):(F(this,o.STATE_CONNECTED),this.emit(st.OPEN,this),this.emit(st.CONNECT,this),this)}catch(X){throw this.close(),X}}close(){if(!(this.s.state===o.STATE_CLOSED||this.s.state===o.STATE_CLOSING)){for(let v of this.s.servers.values())D(v,this);this.s.servers.clear(),F(this,o.STATE_CLOSING),j(this[g],new h.MongoTopologyClosedError),(0,o.drainTimerQueue)(this.s.connectionTimers),this.s.srvPoller&&(this.s.srvPoller.stop(),this.s.srvPoller.removeListener(b.SrvPoller.SRV_RECORD_DISCOVERY,this.s.detectSrvRecords)),this.removeListener(st.TOPOLOGY_DESCRIPTION_CHANGED,this.s.detectShardedTopology),F(this,o.STATE_CLOSED),this.emitAndLog(st.TOPOLOGY_CLOSED,new n.TopologyClosedEvent(this.s.id))}}async selectServer(v,w){let k;if(typeof v!="function")if(typeof v=="string")k=(0,m.readPreferenceServerSelector)(i.ReadPreference.fromString(v));else{let oe;v instanceof i.ReadPreference?oe=v:(i.ReadPreference.translate(w),oe=w.readPreference||i.ReadPreference.primary),k=(0,m.readPreferenceServerSelector)(oe)}else k=v;w={serverSelectionTimeoutMS:this.s.serverSelectionTimeoutMS,...w},this.client.mongoLogger?.willLog(a.MongoLoggableComponent.SERVER_SELECTION,a.SeverityLevel.DEBUG)&&this.client.mongoLogger?.debug(a.MongoLoggableComponent.SERVER_SELECTION,new c.ServerSelectionStartedEvent(v,this.description,w.operationName));let $=this.description.type===o.TopologyType.Sharded,X=w.session,de=X&&X.transaction;if($&&de&&de.server)return this.client.mongoLogger?.willLog(a.MongoLoggableComponent.SERVER_SELECTION,a.SeverityLevel.DEBUG)&&this.client.mongoLogger?.debug(a.MongoLoggableComponent.SERVER_SELECTION,new c.ServerSelectionSucceededEvent(v,this.description,de.server.pool.address,w.operationName)),de.server;let{promise:Y,resolve:se,reject:x}=(0,A.promiseWithResolvers)(),G=p.Timeout.expires(w.serverSelectionTimeoutMS??0),Q={serverSelector:k,topologyDescription:this.description,mongoLogger:this.client.mongoLogger,transaction:de,resolve:se,reject:x,timeout:G,startTime:(0,A.now)(),operationName:w.operationName,waitingLogged:!1,previousServer:w.previousServer};this[g].push(Q),L(this);try{return await Promise.race([Y,Q.timeout])}catch(oe){if(p.TimeoutError.is(oe)){Q[y]=!0,G.clear();let Ee=new h.MongoServerSelectionError(`Server selection timed out after ${w.serverSelectionTimeoutMS} ms`,this.description);throw this.client.mongoLogger?.willLog(a.MongoLoggableComponent.SERVER_SELECTION,a.SeverityLevel.DEBUG)&&this.client.mongoLogger?.debug(a.MongoLoggableComponent.SERVER_SELECTION,new c.ServerSelectionFailedEvent(v,this.description,Ee,w.operationName)),Ee}throw oe}}serverUpdateHandler(v){if(!this.s.description.hasServer(v.address)||I(this.s.description,v))return;let w=this.s.description,k=this.s.description.servers.get(v.address);if(!k)return;let $=v.$clusterTime;$&&(0,o._advanceClusterTime)(this,$);let X=k&&k.equals(v);if(this.s.description=this.s.description.update(v),this.s.description.compatibilityError){this.emit(st.ERROR,new h.MongoCompatibilityError(this.s.description.compatibilityError));return}if(!X){let de=this.s.description.servers.get(v.address);de&&this.emit(st.SERVER_DESCRIPTION_CHANGED,new n.ServerDescriptionChangedEvent(this.s.id,v.address,k,de))}R(this,v),this[g].length>0&&L(this),X||this.emitAndLog(st.TOPOLOGY_DESCRIPTION_CHANGED,new n.TopologyDescriptionChangedEvent(this.s.id,w,this.s.description))}auth(v,w){typeof v=="function"&&(w=v,v=void 0),typeof w=="function"&&w(void 0,!0)}get clientMetadata(){return this.s.options.metadata}isConnected(){return this.s.state===o.STATE_CONNECTED}isDestroyed(){return this.s.state===o.STATE_CLOSED}lastHello(){let v=Array.from(this.description.servers.values());return v.length===0?{}:v.filter(w=>w.type!==o.ServerType.Unknown)[0]||{maxWireVersion:this.description.commonWireVersion}}get commonWireVersion(){return this.description.commonWireVersion}get logicalSessionTimeoutMinutes(){return this.description.logicalSessionTimeoutMinutes}get clusterTime(){return this.s.clusterTime}set clusterTime(v){this.s.clusterTime=v}};T.SERVER_OPENING=d.SERVER_OPENING,T.SERVER_CLOSED=d.SERVER_CLOSED,T.SERVER_DESCRIPTION_CHANGED=d.SERVER_DESCRIPTION_CHANGED,T.TOPOLOGY_OPENING=d.TOPOLOGY_OPENING,T.TOPOLOGY_CLOSED=d.TOPOLOGY_CLOSED,T.TOPOLOGY_DESCRIPTION_CHANGED=d.TOPOLOGY_DESCRIPTION_CHANGED,T.ERROR=d.ERROR,T.OPEN=d.OPEN,T.CONNECT=d.CONNECT,T.CLOSE=d.CLOSE,T.TIMEOUT=d.TIMEOUT,e.Topology=T;function D(S,v){for(let w of d.LOCAL_SERVER_EVENTS)S.removeAllListeners(w);S.destroy(),v.emitAndLog(T.SERVER_CLOSED,new n.ServerClosedEvent(v.s.id,S.description.address));for(let w of d.SERVER_RELAY_EVENTS)S.removeAllListeners(w)}function N(S){return S?.directConnection?o.TopologyType.Single:S?.replicaSet?o.TopologyType.ReplicaSetNoPrimary:S?.loadBalanced?o.TopologyType.LoadBalanced:o.TopologyType.Unknown}function _(S,v){S.emitAndLog(T.SERVER_OPENING,new n.ServerOpeningEvent(S.s.id,v.address));let w=new r.Server(S,v,S.s.options);for(let k of d.SERVER_RELAY_EVENTS)w.on(k,$=>S.emit(k,$));return w.on(r.Server.DESCRIPTION_RECEIVED,k=>S.serverUpdateHandler(k)),w.connect(),w}function R(S,v){if(v&&S.s.servers.has(v.address)){let w=S.s.servers.get(v.address);if(w){if(w.s.description=v,v.error instanceof h.MongoError&&v.error.hasErrorLabel(h.MongoErrorLabel.ResetPool)){let k=v.error.hasErrorLabel(h.MongoErrorLabel.InterruptInUseConnections);w.pool.clear({interruptInUseConnections:k})}else if(v.error==null){let k=S.s.description.type;(v.isDataBearing||v.type!==o.ServerType.Unknown&&k===o.TopologyType.Single)&&w.pool.ready()}}}for(let w of S.description.servers.values())if(!S.s.servers.has(w.address)){let k=_(S,w);S.s.servers.set(w.address,k)}for(let w of S.s.servers){let k=w[0];if(S.description.hasServer(k)||!S.s.servers.has(k))continue;let $=S.s.servers.get(k);S.s.servers.delete(k),$&&D($,S)}}function j(S,v){for(;S.length;){let w=S.shift();w&&(w.timeout.clear(),w[y]||(w.mongoLogger?.willLog(a.MongoLoggableComponent.SERVER_SELECTION,a.SeverityLevel.DEBUG)&&w.mongoLogger?.debug(a.MongoLoggableComponent.SERVER_SELECTION,new c.ServerSelectionFailedEvent(w.serverSelector,w.topologyDescription,v,w.operationName)),w.reject(v)))}}function L(S){if(S.s.state===o.STATE_CLOSED){j(S[g],new h.MongoTopologyClosedError);return}let v=S.description.type===o.TopologyType.Sharded,w=Array.from(S.description.servers.values()),k=S[g].length;for(let $=0;$<k;++$){let X=S[g].shift();if(!X||X[y])continue;let de;try{let x=X.serverSelector,G=X.previousServer;de=x?x(S.description,w,G?[G]:[]):w}catch(x){X.timeout.clear(),S.client.mongoLogger?.willLog(a.MongoLoggableComponent.SERVER_SELECTION,a.SeverityLevel.DEBUG)&&S.client.mongoLogger?.debug(a.MongoLoggableComponent.SERVER_SELECTION,new c.ServerSelectionFailedEvent(X.serverSelector,S.description,x,X.operationName)),X.reject(x);continue}let Y;if(de.length===0){X.waitingLogged||(S.client.mongoLogger?.willLog(a.MongoLoggableComponent.SERVER_SELECTION,a.SeverityLevel.INFORMATIONAL)&&S.client.mongoLogger?.info(a.MongoLoggableComponent.SERVER_SELECTION,new c.WaitingForSuitableServerEvent(X.serverSelector,S.description,S.s.serverSelectionTimeoutMS!==0?S.s.serverSelectionTimeoutMS-((0,A.now)()-X.startTime):-1,X.operationName)),X.waitingLogged=!0),S[g].push(X);continue}else if(de.length===1)Y=S.s.servers.get(de[0].address);else{let x=(0,A.shuffle)(de,2),G=S.s.servers.get(x[0].address),Q=S.s.servers.get(x[1].address);Y=G&&Q&&G.s.operationCount<Q.s.operationCount?G:Q}if(!Y){let x=new h.MongoServerSelectionError("server selection returned a server description but the server was not found in the topology",S.description);S.client.mongoLogger?.willLog(a.MongoLoggableComponent.SERVER_SELECTION,a.SeverityLevel.DEBUG)&&S.client.mongoLogger?.debug(a.MongoLoggableComponent.SERVER_SELECTION,new c.ServerSelectionFailedEvent(X.serverSelector,S.description,x,X.operationName)),X.reject(x);return}let se=X.transaction;v&&se&&se.isActive&&Y&&se.pinServer(Y),X.timeout.clear(),S.client.mongoLogger?.willLog(a.MongoLoggableComponent.SERVER_SELECTION,a.SeverityLevel.DEBUG)&&S.client.mongoLogger?.debug(a.MongoLoggableComponent.SERVER_SELECTION,new c.ServerSelectionSucceededEvent(X.serverSelector,X.topologyDescription,Y.pool.address,X.operationName)),X.resolve(Y)}if(S[g].length>0)for(let[,$]of S.s.servers)process.nextTick(function(){return $.requestCheck()})}function I(S,v){let w=S.servers.get(v.address)?.topologyVersion;return(0,E.compareTopologyVersion)(w,v.topologyVersion)>0}var M=class{constructor(S){this.minWireVersion=S.minWireVersion||0,this.maxWireVersion=S.maxWireVersion||0}get hasAggregationCursor(){return this.maxWireVersion>=1}get hasWriteCommands(){return this.maxWireVersion>=2}get hasTextSearch(){return this.minWireVersion>=0}get hasAuthCommands(){return this.maxWireVersion>=1}get hasListCollectionsCommand(){return this.maxWireVersion>=3}get hasListIndexesCommand(){return this.maxWireVersion>=3}get supportsSnapshotReads(){return this.maxWireVersion>=13}get commandsTakeWriteConcern(){return this.maxWireVersion>=5}get commandsTakeCollation(){return this.maxWireVersion>=5}};e.ServerCapabilities=M}),Xt=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MongoClient=e.ServerApiVersion=void 0;var u=ve("fs"),d=Ue(),h=Ar(),a=Ju(),l=Mt(),i=Qn(),p=Xe(),A=Ku(),o=pe(),n=uo(),r=Qt(),E=Et(),m=lt(),c=mr(),b=rt(),f=Wr(),O=es(),F=Vr(),y=ye();e.ServerApiVersion=Object.freeze({v1:"1"});var g=Symbol("options"),T=class extends E.TypedEventEmitter{constructor(D,N){super(),this[g]=(0,i.parseOptions)(D,this,N);let _=Object.values(this[g].mongoLoggerOptions.componentSeverities).some(j=>j!==r.SeverityLevel.OFF);this.mongoLogger=_?new r.MongoLogger(this[g].mongoLoggerOptions):void 0;let R=this;this.s={url:D,bsonOptions:(0,d.resolveBSONOptions)(this[g]),namespace:(0,y.ns)("admin"),hasBeenClosed:!1,sessionPool:new F.ServerSessionPool(this),activeSessions:new Set,authProviders:new n.MongoClientAuthProviders,get options(){return R[g]},get readConcern(){return R[g].readConcern},get writeConcern(){return R[g].writeConcern},get readPreference(){return R[g].readPreference},get isMongoClient(){return!0}},this.checkForNonGenuineHosts()}checkForNonGenuineHosts(){let D=this[g].hosts.filter(j=>(0,y.isHostMatch)(y.DOCUMENT_DB_CHECK,j.host)),N=(0,y.isHostMatch)(y.DOCUMENT_DB_CHECK,this[g].srvHost),_=this[g].hosts.filter(j=>(0,y.isHostMatch)(y.COSMOS_DB_CHECK,j.host)),R=(0,y.isHostMatch)(y.COSMOS_DB_CHECK,this[g].srvHost);D.length!==0||N?this.mongoLogger?.info("client",y.DOCUMENT_DB_MSG):(_.length!==0||R)&&this.mongoLogger?.info("client",y.COSMOS_DB_MSG)}get options(){return Object.freeze({...this[g]})}get serverApi(){return this[g].serverApi&&Object.freeze({...this[g].serverApi})}get monitorCommands(){return this[g].monitorCommands}set monitorCommands(D){this[g].monitorCommands=D}get autoEncrypter(){return this[g].autoEncrypter}get readConcern(){return this.s.readConcern}get writeConcern(){return this.s.writeConcern}get readPreference(){return this.s.readPreference}get bsonOptions(){return this.s.bsonOptions}async connect(){if(this.connectionLock)return await this.connectionLock;try{this.connectionLock=this._connect(),await this.connectionLock}finally{this.connectionLock=void 0}return this}async _connect(){if(this.topology&&this.topology.isConnected())return this;let D=this[g];if(D.tls&&(typeof D.tlsCAFile=="string"&&(D.ca??=await u.promises.readFile(D.tlsCAFile)),typeof D.tlsCRLFile=="string"&&(D.crl??=await u.promises.readFile(D.tlsCRLFile)),typeof D.tlsCertificateKeyFile=="string"&&(!D.key||!D.cert))){let _=await u.promises.readFile(D.tlsCertificateKeyFile);D.key??=_,D.cert??=_}if(typeof D.srvHost=="string"){let _=await(0,i.resolveSRVRecord)(D);for(let[R,j]of _.entries())D.hosts[R]=j}if(D.credentials?.mechanism===l.AuthMechanism.MONGODB_OIDC){let _=D.credentials?.mechanismProperties?.ALLOWED_HOSTS||a.DEFAULT_ALLOWED_HOSTS;if(!D.credentials?.mechanismProperties?.ENVIRONMENT){for(let R of D.hosts)if(!(0,y.hostMatchesWildcards)(R.toHostPort().host,_))throw new o.MongoInvalidArgumentError(`Host '${R}' is not valid for OIDC authentication with ALLOWED_HOSTS of '${_.join(",")}'`)}}this.topology=new O.Topology(this,D.hosts,D),this.topology.once(O.Topology.OPEN,()=>this.emit("open",this));for(let _ of p.MONGO_CLIENT_EVENTS)this.topology.on(_,(...R)=>this.emit(_,...R));let N=async()=>{try{await this.topology?.connect(D)}catch(_){throw this.topology?.close(),_}};return this.autoEncrypter?(await this.autoEncrypter?.init(),await N(),await D.encrypter.connectInternalClient()):await N(),this}async close(D=!1){Object.defineProperty(this.s,"hasBeenClosed",{value:!0,enumerable:!0,configurable:!1,writable:!1});let N=Array.from(this.s.activeSessions,M=>M.endSession());if(this.s.activeSessions.clear(),await Promise.all(N),this.topology==null)return;let _=(0,f.readPreferenceServerSelector)(b.ReadPreference.primaryPreferred),R=this.topology.description,j=Array.from(R.servers.values());if(_(R,j).length!==0){let M=Array.from(this.s.sessionPool.sessions,({id:S})=>S);if(M.length!==0)try{await(0,m.executeOperation)(this,new c.RunAdminCommandOperation({endSessions:M},{readPreference:b.ReadPreference.primaryPreferred,noResponse:!0}))}catch(S){(0,y.squashError)(S)}}let L=this.topology;this.topology=void 0,L.close();let{encrypter:I}=this[g];I&&await I.close(this,D)}db(D,N){N=N??{},D||(D=this.options.dbName);let _=Object.assign({},this[g],N);return new A.Db(this,D,_)}static async connect(D,N){return await new this(D,N).connect()}startSession(D){let N=new F.ClientSession(this,this.s.sessionPool,{explicit:!0,...D},this[g]);return this.s.activeSessions.add(N),N.once("ended",()=>{this.s.activeSessions.delete(N)}),N}async withSession(D,N){let _={owner:Symbol(),...typeof D=="object"?D:{}},R=typeof D=="function"?D:N;if(R==null)throw new o.MongoInvalidArgumentError("Missing required callback parameter");let j=this.startSession(_);try{return await R(j)}finally{try{await j.endSession()}catch(L){(0,y.squashError)(L)}}}watch(D=[],N={}){return Array.isArray(D)||(N=D,D=[]),new h.ChangeStream(this,D,(0,y.resolveOptions)(this,N))}};e.MongoClient=T}),Ar=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ChangeStream=void 0;var u=er(),d=Xe(),h=Sn(),a=Ku(),l=pe(),i=Xt(),p=Et(),A=ye(),o=Symbol("cursorStream"),n=Symbol("closed"),r=Symbol("mode"),E=["resumeAfter","startAfter","startAtOperationTime","fullDocument","fullDocumentBeforeChange","showExpandedEvents"],m={COLLECTION:Symbol("Collection"),DATABASE:Symbol("Database"),CLUSTER:Symbol("Cluster")},c=[d.RESUME_TOKEN_CHANGED,d.END,d.CLOSE],b="A change stream document has been received that lacks a resume token (_id).",f="ChangeStream is closed",O=class pr extends p.TypedEventEmitter{constructor(y,g=[],T={}){if(super(),this.pipeline=g,this.options={...T},delete this.options.writeConcern,y instanceof u.Collection)this.type=m.COLLECTION;else if(y instanceof a.Db)this.type=m.DATABASE;else if(y instanceof i.MongoClient)this.type=m.CLUSTER;else throw new l.MongoChangeStreamError("Parent provided to ChangeStream constructor must be an instance of Collection, Db, or MongoClient");this.parent=y,this.namespace=y.s.namespace,!this.options.readPreference&&y.readPreference&&(this.options.readPreference=y.readPreference),this.cursor=this._createChangeStreamCursor(T),this[n]=!1,this[r]=!1,this.on("newListener",D=>{D==="change"&&this.cursor&&this.listenerCount("change")===0&&this._streamEvents(this.cursor)}),this.on("removeListener",D=>{D==="change"&&this.listenerCount("change")===0&&this.cursor&&this[o]?.removeAllListeners("data")})}get cursorStream(){return this[o]}get resumeToken(){return this.cursor?.resumeToken}async hasNext(){for(this._setIsIterator();;)try{return await this.cursor.hasNext()}catch(y){try{await this._processErrorIteratorMode(y)}catch(g){try{await this.close()}catch(T){(0,A.squashError)(T)}throw g}}}async next(){for(this._setIsIterator();;)try{let y=await this.cursor.next();return this._processChange(y??null)}catch(y){try{await this._processErrorIteratorMode(y)}catch(g){try{await this.close()}catch(T){(0,A.squashError)(T)}throw g}}}async tryNext(){for(this._setIsIterator();;)try{return await this.cursor.tryNext()??null}catch(y){try{await this._processErrorIteratorMode(y)}catch(g){try{await this.close()}catch(T){(0,A.squashError)(T)}throw g}}}async*[Symbol.asyncIterator](){if(!this.closed)try{for(;;)yield await this.next()}finally{try{await this.close()}catch(y){(0,A.squashError)(y)}}}get closed(){return this[n]||this.cursor.closed}async close(){this[n]=!0;let y=this.cursor;try{await y.close()}finally{this._endStream()}}stream(y){if(this.closed)throw new l.MongoChangeStreamError(f);return this.streamOptions=y,this.cursor.stream(y)}_setIsEmitter(){if(this[r]==="iterator")throw new l.MongoAPIError("ChangeStream cannot be used as an EventEmitter after being used as an iterator");this[r]="emitter"}_setIsIterator(){if(this[r]==="emitter")throw new l.MongoAPIError("ChangeStream cannot be used as an iterator after being used as an EventEmitter");this[r]="iterator"}_createChangeStreamCursor(y){let g=(0,A.filterOptions)(y,E);this.type===m.CLUSTER&&(g.allChangesForCluster=!0);let T=[{$changeStream:g},...this.pipeline],D=this.type===m.CLUSTER?this.parent:this.type===m.DATABASE?this.parent.client:this.type===m.COLLECTION?this.parent.client:null;if(D==null)throw new l.MongoRuntimeError(`Changestream type should only be one of cluster, database, collection. Found ${this.type.toString()}`);let N=new h.ChangeStreamCursor(D,this.namespace,T,y);for(let _ of c)N.on(_,R=>this.emit(_,R));return this.listenerCount(pr.CHANGE)>0&&this._streamEvents(N),N}_closeEmitterModeWithError(y){this.emit(pr.ERROR,y),this.close().then(void 0,A.squashError)}_streamEvents(y){this._setIsEmitter();let g=this[o]??y.stream();this[o]=g,g.on("data",T=>{try{let D=this._processChange(T);this.emit(pr.CHANGE,D)}catch(D){this.emit(pr.ERROR,D)}}),g.on("error",T=>this._processErrorStreamMode(T))}_endStream(){let y=this[o];y&&(["data","close","end","error"].forEach(g=>y.removeAllListeners(g)),y.destroy()),this[o]=void 0}_processChange(y){if(this[n])throw new l.MongoAPIError(f);if(y==null)throw new l.MongoRuntimeError(f);if(y&&!y._id)throw new l.MongoChangeStreamError(b);return this.cursor.cacheResumeToken(y._id),this.options.startAtOperationTime=void 0,y}_processErrorStreamMode(y){this[n]||((0,l.isResumableError)(y,this.cursor.maxWireVersion)?(this._endStream(),this.cursor.close().then(void 0,A.squashError),(0,A.getTopology)(this.parent).selectServer(this.cursor.readPreference,{operationName:"reconnect topology in change stream"}).then(()=>{this.cursor=this._createChangeStreamCursor(this.cursor.resumeOptions)},()=>this._closeEmitterModeWithError(y))):this._closeEmitterModeWithError(y))}async _processErrorIteratorMode(y){if(this[n])throw new l.MongoAPIError(f);if(!(0,l.isResumableError)(y,this.cursor.maxWireVersion)){try{await this.close()}catch(T){(0,A.squashError)(T)}throw y}try{await this.cursor.close()}catch(T){(0,A.squashError)(T)}let g=(0,A.getTopology)(this.parent);try{await g.selectServer(this.cursor.readPreference,{operationName:"reconnect topology in change stream"}),this.cursor=this._createChangeStreamCursor(this.cursor.resumeOptions)}catch{throw await this.close(),y}}};O.RESPONSE=d.RESPONSE,O.MORE=d.MORE,O.INIT=d.INIT,O.CLOSE=d.CLOSE,O.CHANGE=d.CHANGE,O.END=d.END,O.ERROR=d.ERROR,O.RESUME_TOKEN_CHANGED=d.RESUME_TOKEN_CHANGED,e.ChangeStream=O}),so=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GridFSBucketReadStream=void 0;var u=ve("stream"),d=pe(),h=class extends u.Readable{constructor(n,r,E,m,c){super({emitClose:!0}),this.s={bytesToTrim:0,bytesToSkip:0,bytesRead:0,chunks:n,expected:0,files:r,filter:m,init:!1,expectedEnd:0,options:{start:0,end:0,...c},readPreference:E}}_read(){this.destroyed||p(this,()=>l(this))}start(n=0){return a(this),this.s.options.start=n,this}end(n=0){return a(this),this.s.options.end=n,this}async abort(){this.push(null),this.destroy(),await this.s.cursor?.close()}};h.FILE="file",e.GridFSBucketReadStream=h;function a(n){if(n.s.init)throw new d.MongoGridFSStreamError("Options cannot be changed after the stream is initialized")}function l(n){if(n.destroyed||!n.s.cursor||!n.s.file)return;let r=E=>{if(n.destroyed)return;if(!E){n.push(null),n.s.cursor?.close().then(void 0,T=>n.destroy(T));return}if(!n.s.file)return;let m=n.s.file.length-n.s.bytesRead,c=n.s.expected++,b=Math.min(n.s.file.chunkSize,m);if(E.n>c)return n.destroy(new d.MongoGridFSChunkError(`ChunkIsMissing: Got unexpected n: ${E.n}, expected: ${c}`));if(E.n<c)return n.destroy(new d.MongoGridFSChunkError(`ExtraChunk: Got unexpected n: ${E.n}, expected: ${c}`));let f=Buffer.isBuffer(E.data)?E.data:E.data.buffer;if(f.byteLength!==b)return m<=0?n.destroy(new d.MongoGridFSChunkError(`ExtraChunk: Got unexpected n: ${E.n}, expected file length ${n.s.file.length} bytes but already read ${n.s.bytesRead} bytes`)):n.destroy(new d.MongoGridFSChunkError(`ChunkIsWrongSize: Got unexpected length: ${f.byteLength}, expected: ${b}`));if(n.s.bytesRead+=f.byteLength,f.byteLength===0)return n.push(null);let O=null,F=null;n.s.bytesToSkip!=null&&(O=n.s.bytesToSkip,n.s.bytesToSkip=0);let y=c===n.s.expectedEnd-1,g=n.s.options.end-n.s.bytesToSkip;y&&n.s.bytesToTrim!=null?F=n.s.file.chunkSize-n.s.bytesToTrim:n.s.options.end&&g<E.data.byteLength&&(F=g),(O!=null||F!=null)&&(f=f.slice(O||0,F||f.byteLength)),n.push(f)};n.s.cursor.next().then(r,E=>{n.destroyed||n.destroy(E)})}function i(n){let r={};n.s.readPreference&&(r.readPreference=n.s.readPreference),n.s.options&&n.s.options.sort&&(r.sort=n.s.options.sort),n.s.options&&n.s.options.skip&&(r.skip=n.s.options.skip);let E=m=>{if(n.destroyed)return;if(!m){let b=`FileNotFound: file ${n.s.filter._id?n.s.filter._id.toString():n.s.filter.filename} was not found`,f=new d.MongoRuntimeError(b);return f.code="ENOENT",n.destroy(f)}if(m.length<=0){n.push(null);return}if(n.destroyed){n.destroy();return}try{n.s.bytesToSkip=A(n,m,n.s.options)}catch(b){return n.destroy(b)}let c={files_id:m._id};if(n.s.options&&n.s.options.start!=null){let b=Math.floor(n.s.options.start/m.chunkSize);b>0&&(c.n={$gte:b})}n.s.cursor=n.s.chunks.find(c).sort({n:1}),n.s.readPreference&&n.s.cursor.withReadPreference(n.s.readPreference),n.s.expectedEnd=Math.ceil(m.length/m.chunkSize),n.s.file=m;try{n.s.bytesToTrim=o(n,m,n.s.cursor,n.s.options)}catch(b){return n.destroy(b)}n.emit(h.FILE,m)};n.s.files.findOne(n.s.filter,r).then(E,m=>{n.destroyed||n.destroy(m)})}function p(n,r){if(n.s.file)return r();n.s.init||(i(n),n.s.init=!0),n.once("file",()=>{r()})}function A(n,r,E){if(E&&E.start!=null){if(E.start>r.length)throw new d.MongoInvalidArgumentError(`Stream start (${E.start}) must not be more than the length of the file (${r.length})`);if(E.start<0)throw new d.MongoInvalidArgumentError(`Stream start (${E.start}) must not be negative`);if(E.end!=null&&E.end<E.start)throw new d.MongoInvalidArgumentError(`Stream start (${E.start}) must not be greater than stream end (${E.end})`);return n.s.bytesRead=Math.floor(E.start/r.chunkSize)*r.chunkSize,n.s.expected=Math.floor(E.start/r.chunkSize),E.start-n.s.bytesRead}throw new d.MongoInvalidArgumentError("Start option must be defined")}function o(n,r,E,m){if(m&&m.end!=null){if(m.end>r.length)throw new d.MongoInvalidArgumentError(`Stream end (${m.end}) must not be more than the length of the file (${r.length})`);if(m.start==null||m.start<0)throw new d.MongoInvalidArgumentError(`Stream end (${m.end}) must not be negative`);let c=m.start!=null?Math.floor(m.start/r.chunkSize):0;return E.limit(Math.ceil(m.end/r.chunkSize)-c),n.s.expectedEnd=Math.ceil(m.end/r.chunkSize),Math.ceil(m.end/r.chunkSize)*r.chunkSize-m.end}throw new d.MongoInvalidArgumentError("End option must be defined")}}),ao=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GridFSBucketWriteStream=void 0;var u=ve("stream"),d=Ue(),h=pe(),a=ye(),l=at(),i=class extends u.Writable{constructor(f,O,F){super(),this.gridFSFile=null,F=F??{},this.bucket=f,this.chunks=f.s._chunksCollection,this.filename=O,this.files=f.s._filesCollection,this.options=F,this.writeConcern=l.WriteConcern.fromOptions(F)||f.s.options.writeConcern,this.done=!1,this.id=F.id?F.id:new d.ObjectId,this.chunkSizeBytes=F.chunkSizeBytes||this.bucket.s.options.chunkSizeBytes,this.bufToStore=Buffer.alloc(this.chunkSizeBytes),this.length=0,this.n=0,this.pos=0,this.state={streamEnd:!1,outstandingRequests:0,errored:!1,aborted:!1},this.bucket.s.calledOpenUploadStream||(this.bucket.s.calledOpenUploadStream=!0,r(this).then(()=>{this.bucket.s.checkedIndexes=!0,this.bucket.emit("index")},a.squashError))}_construct(f){if(this.bucket.s.checkedIndexes)return process.nextTick(f);this.bucket.once("index",f)}_write(f,O,F){m(this,f,O,F)}_final(f){if(this.state.streamEnd)return process.nextTick(f);this.state.streamEnd=!0,c(this,f)}async abort(){if(this.state.streamEnd)throw new h.MongoAPIError("Cannot abort a stream that has already completed");if(this.state.aborted)throw new h.MongoAPIError("Cannot call abort() on a stream twice");this.state.aborted=!0,await this.chunks.deleteMany({files_id:this.id})}};e.GridFSBucketWriteStream=i;function p(f,O,F){if(f.state.errored){process.nextTick(F);return}f.state.errored=!0,process.nextTick(F,O)}function A(f,O,F){return{_id:new d.ObjectId,files_id:f,n:O,data:F}}async function o(f){let O={files_id:1,n:1},F;try{F=await f.chunks.listIndexes().toArray()}catch(y){if(y instanceof h.MongoError&&y.code===h.MONGODB_ERROR_CODES.NamespaceNotFound)F=[];else throw y}F.find(y=>Object.keys(y.key).length===2&&y.key.files_id===1&&y.key.n===1)||await f.chunks.createIndex(O,{...f.writeConcern,background:!0,unique:!0})}function n(f,O){if(f.done)return process.nextTick(O);if(f.state.streamEnd&&f.state.outstandingRequests===0&&!f.state.errored){f.done=!0;let F=E(f.id,f.length,f.chunkSizeBytes,f.filename,f.options.contentType,f.options.aliases,f.options.metadata);if(b(f,O))return;f.files.insertOne(F,{writeConcern:f.writeConcern}).then(()=>{f.gridFSFile=F,O()},y=>p(f,y,O));return}process.nextTick(O)}async function r(f){if(await f.files.findOne({},{projection:{_id:1}})!=null)return;let O={filename:1,uploadDate:1},F;try{F=await f.files.listIndexes().toArray()}catch(y){if(y instanceof h.MongoError&&y.code===h.MONGODB_ERROR_CODES.NamespaceNotFound)F=[];else throw y}F.find(y=>Object.keys(y.key).length===2&&y.key.filename===1&&y.key.uploadDate===1)||await f.files.createIndex(O,{background:!1}),await o(f)}function E(f,O,F,y,g,T,D){let N={_id:f,length:O,chunkSize:F,uploadDate:new Date,filename:y};return g&&(N.contentType=g),T&&(N.aliases=T),D&&(N.metadata=D),N}function m(f,O,F,y){if(b(f,y))return;let g=Buffer.isBuffer(O)?O:Buffer.from(O,F);if(f.length+=g.length,f.pos+g.length<f.chunkSizeBytes){g.copy(f.bufToStore,f.pos),f.pos+=g.length,process.nextTick(y);return}let T=g.length,D=f.chunkSizeBytes-f.pos,N=Math.min(D,g.length),_=0;for(;T>0;){let R=g.length-T;g.copy(f.bufToStore,f.pos,R,R+N),f.pos+=N,D-=N;let j;if(D===0){if(j=A(f.id,f.n,Buffer.from(f.bufToStore)),++f.state.outstandingRequests,++_,b(f,y))return;f.chunks.insertOne(j,{writeConcern:f.writeConcern}).then(()=>{--f.state.outstandingRequests,--_,_||n(f,y)},L=>p(f,L,y)),D=f.chunkSizeBytes,f.pos=0,++f.n}T-=N,N=Math.min(D,T)}}function c(f,O){if(f.pos===0)return n(f,O);++f.state.outstandingRequests;let F=Buffer.alloc(f.pos);f.bufToStore.copy(F,0,0,f.pos);let y=A(f.id,f.n,F);b(f,O)||f.chunks.insertOne(y,{writeConcern:f.writeConcern}).then(()=>{--f.state.outstandingRequests,n(f,O)},g=>p(f,g,O))}function b(f,O){return f.state.aborted?(process.nextTick(O,new h.MongoAPIError("Stream has been aborted")),!0):!1}}),ts=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GridFSBucket=void 0;var u=pe(),d=Et(),h=at(),a=so(),l=ao(),i={bucketName:"fs",chunkSizeBytes:255*1024},p=class extends d.TypedEventEmitter{constructor(A,o){super(),this.setMaxListeners(0);let n={...i,...o,writeConcern:h.WriteConcern.fromOptions(o)};this.s={db:A,options:n,_chunksCollection:A.collection(n.bucketName+".chunks"),_filesCollection:A.collection(n.bucketName+".files"),checkedIndexes:!1,calledOpenUploadStream:!1}}openUploadStream(A,o){return new l.GridFSBucketWriteStream(this,A,o)}openUploadStreamWithId(A,o,n){return new l.GridFSBucketWriteStream(this,o,{...n,id:A})}openDownloadStream(A,o){return new a.GridFSBucketReadStream(this.s._chunksCollection,this.s._filesCollection,this.s.options.readPreference,{_id:A},o)}async delete(A){let{deletedCount:o}=await this.s._filesCollection.deleteOne({_id:A});if(await this.s._chunksCollection.deleteMany({files_id:A}),o===0)throw new u.MongoRuntimeError(`File not found for id ${A}`)}find(A={},o={}){return this.s._filesCollection.find(A,o)}openDownloadStreamByName(A,o){let n={uploadDate:-1},r;return o&&o.revision!=null&&(o.revision>=0?(n={uploadDate:1},r=o.revision):r=-o.revision-1),new a.GridFSBucketReadStream(this.s._chunksCollection,this.s._filesCollection,this.s.options.readPreference,{filename:A},{...o,sort:n,skip:r})}async rename(A,o){let n={_id:A},r={$set:{filename:o}},{matchedCount:E}=await this.s._filesCollection.updateOne(n,r);if(E===0)throw new u.MongoRuntimeError(`File with id ${A} not found`)}async drop(){await this.s._filesCollection.drop(),await this.s._chunksCollection.drop()}};p.INDEX="index",e.GridFSBucket=p}),rs=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ClientEncryption=void 0;var u=Ue(),d=Ot(),h=ye(),a=Un(),l=fr(),i=zn(),p=Vn(),A=class Gu{static getMongoCrypt(){let n=(0,d.getMongoDBClientEncryption)();if("kModuleError"in n)throw n.kModuleError;return n.MongoCrypt}constructor(n,r){if(this._client=n,this._proxyOptions=r.proxyOptions??{},this._tlsOptions=r.tlsOptions??{},this._kmsProviders=r.kmsProviders||{},r.keyVaultNamespace==null)throw new l.MongoCryptInvalidArgumentError("Missing required option `keyVaultNamespace`");let E={...r,cryptoCallbacks:a,kmsProviders:Buffer.isBuffer(this._kmsProviders)?this._kmsProviders:(0,u.serialize)(this._kmsProviders)};this._keyVaultNamespace=r.keyVaultNamespace,this._keyVaultClient=r.keyVaultClient||n;let m=Gu.getMongoCrypt();this._mongoCrypt=new m(E)}async createDataKey(n,r={}){if(r.keyAltNames&&!Array.isArray(r.keyAltNames))throw new l.MongoCryptInvalidArgumentError(`Option "keyAltNames" must be an array of strings, but was of type ${typeof r.keyAltNames}.`);let E;r.keyAltNames&&r.keyAltNames.length>0&&(E=r.keyAltNames.map((T,D)=>{if(typeof T!="string")throw new l.MongoCryptInvalidArgumentError(`Option "keyAltNames" must be an array of strings, but item at index ${D} was of type ${typeof T}`);return(0,u.serialize)({keyAltName:T})}));let m;r.keyMaterial&&(m=(0,u.serialize)({keyMaterial:r.keyMaterial}));let c=(0,u.serialize)({provider:n,...r.masterKey}),b=this._mongoCrypt.makeDataKeyContext(c,{keyAltNames:E,keyMaterial:m}),f=new p.StateMachine({proxyOptions:this._proxyOptions,tlsOptions:this._tlsOptions}),O=(0,u.deserialize)(await f.execute(this,b)),{db:F,collection:y}=h.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace),{insertedId:g}=await this._keyVaultClient.db(F).collection(y).insertOne(O,{writeConcern:{w:"majority"}});return g}async rewrapManyDataKey(n,r){let E;if(r){let g=Object.assign({provider:r.provider},r.masterKey);E=(0,u.serialize)(g)}let m=(0,u.serialize)(n),c=this._mongoCrypt.makeRewrapManyDataKeyContext(m,E),b=new p.StateMachine({proxyOptions:this._proxyOptions,tlsOptions:this._tlsOptions}),{v:f}=(0,u.deserialize)(await b.execute(this,c));if(f.length===0)return{};let{db:O,collection:F}=h.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace),y=f.map(g=>({updateOne:{filter:{_id:g._id},update:{$set:{masterKey:g.masterKey,keyMaterial:g.keyMaterial},$currentDate:{updateDate:!0}}}}));return{bulkWriteResult:await this._keyVaultClient.db(O).collection(F).bulkWrite(y,{writeConcern:{w:"majority"}})}}async deleteKey(n){let{db:r,collection:E}=h.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace);return await this._keyVaultClient.db(r).collection(E).deleteOne({_id:n},{writeConcern:{w:"majority"}})}getKeys(){let{db:n,collection:r}=h.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace);return this._keyVaultClient.db(n).collection(r).find({},{readConcern:{level:"majority"}})}async getKey(n){let{db:r,collection:E}=h.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace);return await this._keyVaultClient.db(r).collection(E).findOne({_id:n},{readConcern:{level:"majority"}})}async getKeyByAltName(n){let{db:r,collection:E}=h.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace);return await this._keyVaultClient.db(r).collection(E).findOne({keyAltNames:n},{readConcern:{level:"majority"}})}async addKeyAltName(n,r){let{db:E,collection:m}=h.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace);return await this._keyVaultClient.db(E).collection(m).findOneAndUpdate({_id:n},{$addToSet:{keyAltNames:r}},{writeConcern:{w:"majority"},returnDocument:"before"})}async removeKeyAltName(n,r){let{db:E,collection:m}=h.MongoDBCollectionNamespace.fromString(this._keyVaultNamespace),c=[{$set:{keyAltNames:{$cond:[{$eq:["$keyAltNames",[r]]},"$$REMOVE",{$filter:{input:"$keyAltNames",cond:{$ne:["$$this",r]}}}]}}}];return await this._keyVaultClient.db(E).collection(m).findOneAndUpdate({_id:n},c,{writeConcern:{w:"majority"},returnDocument:"before"})}async createEncryptedCollection(n,r,E){let{provider:m,masterKey:c,createCollectionOptions:{encryptedFields:{...b},...f}}=E;if(Array.isArray(b.fields)){let O=b.fields.map(async g=>g==null||typeof g!="object"||g.keyId!=null?g:{...g,keyId:await this.createDataKey(m,{masterKey:c})}),F=await Promise.allSettled(O);b.fields=F.map((g,T)=>g.status==="fulfilled"?g.value:b.fields[T]);let y=F.find(g=>g.status==="rejected");if(y!=null)throw new l.MongoCryptCreateDataKeyError(b,{cause:y.reason})}try{return{collection:await n.createCollection(r,{...f,encryptedFields:b}),encryptedFields:b}}catch(O){throw new l.MongoCryptCreateEncryptedCollectionError(b,{cause:O})}}async encrypt(n,r){return await this._encrypt(n,!1,r)}async encryptExpression(n,r){return await this._encrypt(n,!0,r)}async decrypt(n){let r=(0,u.serialize)({v:n}),E=this._mongoCrypt.makeExplicitDecryptionContext(r),m=new p.StateMachine({proxyOptions:this._proxyOptions,tlsOptions:this._tlsOptions}),{v:c}=(0,u.deserialize)(await m.execute(this,E));return c}async askForKMSCredentials(){return await(0,i.refreshKMSCredentials)(this._kmsProviders)}static get libmongocryptVersion(){return Gu.getMongoCrypt().libmongocryptVersion}async _encrypt(n,r,E){let{algorithm:m,keyId:c,keyAltName:b,contentionFactor:f,queryType:O,rangeOptions:F}=E,y={expressionMode:r,algorithm:m};if(c&&(y.keyId=c.buffer),b){if(c)throw new l.MongoCryptInvalidArgumentError('"options" cannot contain both "keyId" and "keyAltName"');if(typeof b!="string")throw new l.MongoCryptInvalidArgumentError(`"options.keyAltName" must be of type string, but was of type ${typeof b}`);y.keyAltName=(0,u.serialize)({keyAltName:b})}(typeof f=="number"||typeof f=="bigint")&&(y.contentionFactor=f),typeof O=="string"&&(y.queryType=O),typeof F=="object"&&(y.rangeOptions=(0,u.serialize)(F));let g=(0,u.serialize)({v:n}),T=new p.StateMachine({proxyOptions:this._proxyOptions,tlsOptions:this._tlsOptions}),D=this._mongoCrypt.makeExplicitEncryptionContext(g,y),{v:N}=(0,u.deserialize)(await T.execute(this,D));return N}};e.ClientEncryption=A}),Yr=J(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MongoTopologyClosedError=e.MongoTailableCursorError=e.MongoSystemError=e.MongoServerSelectionError=e.MongoServerError=e.MongoServerClosedError=e.MongoRuntimeError=e.MongoParseError=e.MongoOIDCError=e.MongoNotConnectedError=e.MongoNetworkTimeoutError=e.MongoNetworkError=e.MongoMissingDependencyError=e.MongoMissingCredentialsError=e.MongoKerberosError=e.MongoInvalidArgumentError=e.MongoGridFSStreamError=e.MongoGridFSChunkError=e.MongoGCPError=e.MongoExpiredSessionError=e.MongoError=e.MongoDriverError=e.MongoDecompressionError=e.MongoCursorInUseError=e.MongoCursorExhaustedError=e.MongoCompatibilityError=e.MongoChangeStreamError=e.MongoBatchReExecutionError=e.MongoAzureError=e.MongoAWSError=e.MongoAPIError=e.ChangeStreamCursor=e.ClientEncryption=e.MongoBulkWriteError=e.UUID=e.Timestamp=e.ObjectId=e.MinKey=e.MaxKey=e.Long=e.Int32=e.Double=e.Decimal128=e.DBRef=e.Code=e.BSONType=e.BSONSymbol=e.BSONRegExp=e.Binary=e.BSON=void 0,e.ConnectionPoolCreatedEvent=e.ConnectionPoolClosedEvent=e.ConnectionPoolClearedEvent=e.ConnectionCreatedEvent=e.ConnectionClosedEvent=e.ConnectionCheckOutStartedEvent=e.ConnectionCheckOutFailedEvent=e.ConnectionCheckedOutEvent=e.ConnectionCheckedInEvent=e.CommandSucceededEvent=e.CommandStartedEvent=e.CommandFailedEvent=e.WriteConcern=e.ReadPreference=e.ReadConcern=e.TopologyType=e.ServerType=e.ReadPreferenceMode=e.ReadConcernLevel=e.ProfilingLevel=e.ReturnDocument=e.ServerApiVersion=e.ExplainVerbosity=e.MongoErrorLabel=e.CURSOR_FLAGS=e.Compressor=e.AuthMechanism=e.GSSAPICanonicalizationValue=e.AutoEncryptionLoggerLevel=e.BatchType=e.UnorderedBulkOperation=e.OrderedBulkOperation=e.MongoClient=e.ListIndexesCursor=e.ListCollectionsCursor=e.GridFSBucketWriteStream=e.GridFSBucketReadStream=e.GridFSBucket=e.FindCursor=e.Db=e.Collection=e.ClientSession=e.ChangeStream=e.CancellationToken=e.AggregationCursor=e.Admin=e.AbstractCursor=e.MongoWriteConcernError=e.MongoUnexpectedServerResponseError=e.MongoTransactionError=void 0,e.MongoClientAuthProviders=e.MongoCryptKMSRequestNetworkTimeoutError=e.MongoCryptInvalidArgumentError=e.MongoCryptError=e.MongoCryptCreateEncryptedCollectionError=e.MongoCryptCreateDataKeyError=e.MongoCryptAzureKMSRequestError=e.SrvPollingEvent=e.WaitingForSuitableServerEvent=e.ServerSelectionSucceededEvent=e.ServerSelectionStartedEvent=e.ServerSelectionFailedEvent=e.ServerSelectionEvent=e.TopologyOpeningEvent=e.TopologyDescriptionChangedEvent=e.TopologyClosedEvent=e.ServerOpeningEvent=e.ServerHeartbeatSucceededEvent=e.ServerHeartbeatStartedEvent=e.ServerHeartbeatFailedEvent=e.ServerDescriptionChangedEvent=e.ServerClosedEvent=e.ConnectionReadyEvent=e.ConnectionPoolReadyEvent=e.ConnectionPoolMonitoringEvent=void 0;var u=Y1();Object.defineProperty(e,"Admin",{enumerable:!0,get:function(){return u.Admin}});var d=en();Object.defineProperty(e,"OrderedBulkOperation",{enumerable:!0,get:function(){return d.OrderedBulkOperation}});var h=tn();Object.defineProperty(e,"UnorderedBulkOperation",{enumerable:!0,get:function(){return h.UnorderedBulkOperation}});var a=Ar();Object.defineProperty(e,"ChangeStream",{enumerable:!0,get:function(){return a.ChangeStream}});var l=er();Object.defineProperty(e,"Collection",{enumerable:!0,get:function(){return l.Collection}});var i=Pt();Object.defineProperty(e,"AbstractCursor",{enumerable:!0,get:function(){return i.AbstractCursor}});var p=Gr();Object.defineProperty(e,"AggregationCursor",{enumerable:!0,get:function(){return p.AggregationCursor}});var A=pn();Object.defineProperty(e,"FindCursor",{enumerable:!0,get:function(){return A.FindCursor}});var o=Dn();Object.defineProperty(e,"ListCollectionsCursor",{enumerable:!0,get:function(){return o.ListCollectionsCursor}});var n=mn();Object.defineProperty(e,"ListIndexesCursor",{enumerable:!0,get:function(){return n.ListIndexesCursor}});var r=Ku();Object.defineProperty(e,"Db",{enumerable:!0,get:function(){return r.Db}});var E=ts();Object.defineProperty(e,"GridFSBucket",{enumerable:!0,get:function(){return E.GridFSBucket}});var m=so();Object.defineProperty(e,"GridFSBucketReadStream",{enumerable:!0,get:function(){return m.GridFSBucketReadStream}});var c=ao();Object.defineProperty(e,"GridFSBucketWriteStream",{enumerable:!0,get:function(){return c.GridFSBucketWriteStream}});var b=Xt();Object.defineProperty(e,"MongoClient",{enumerable:!0,get:function(){return b.MongoClient}});var f=Et();Object.defineProperty(e,"CancellationToken",{enumerable:!0,get:function(){return f.CancellationToken}});var O=Vr();Object.defineProperty(e,"ClientSession",{enumerable:!0,get:function(){return O.ClientSession}});var F=Ue();Object.defineProperty(e,"BSON",{enumerable:!0,get:function(){return F.BSON}});var y=Ue();Object.defineProperty(e,"Binary",{enumerable:!0,get:function(){return y.Binary}}),Object.defineProperty(e,"BSONRegExp",{enumerable:!0,get:function(){return y.BSONRegExp}}),Object.defineProperty(e,"BSONSymbol",{enumerable:!0,get:function(){return y.BSONSymbol}}),Object.defineProperty(e,"BSONType",{enumerable:!0,get:function(){return y.BSONType}}),Object.defineProperty(e,"Code",{enumerable:!0,get:function(){return y.Code}}),Object.defineProperty(e,"DBRef",{enumerable:!0,get:function(){return y.DBRef}}),Object.defineProperty(e,"Decimal128",{enumerable:!0,get:function(){return y.Decimal128}}),Object.defineProperty(e,"Double",{enumerable:!0,get:function(){return y.Double}}),Object.defineProperty(e,"Int32",{enumerable:!0,get:function(){return y.Int32}}),Object.defineProperty(e,"Long",{enumerable:!0,get:function(){return y.Long}}),Object.defineProperty(e,"MaxKey",{enumerable:!0,get:function(){return y.MaxKey}}),Object.defineProperty(e,"MinKey",{enumerable:!0,get:function(){return y.MinKey}}),Object.defineProperty(e,"ObjectId",{enumerable:!0,get:function(){return y.ObjectId}}),Object.defineProperty(e,"Timestamp",{enumerable:!0,get:function(){return y.Timestamp}}),Object.defineProperty(e,"UUID",{enumerable:!0,get:function(){return y.UUID}});var g=Ur();Object.defineProperty(e,"MongoBulkWriteError",{enumerable:!0,get:function(){return g.MongoBulkWriteError}});var T=rs();Object.defineProperty(e,"ClientEncryption",{enumerable:!0,get:function(){return T.ClientEncryption}});var D=Sn();Object.defineProperty(e,"ChangeStreamCursor",{enumerable:!0,get:function(){return D.ChangeStreamCursor}});var N=pe();Object.defineProperty(e,"MongoAPIError",{enumerable:!0,get:function(){return N.MongoAPIError}}),Object.defineProperty(e,"MongoAWSError",{enumerable:!0,get:function(){return N.MongoAWSError}}),Object.defineProperty(e,"MongoAzureError",{enumerable:!0,get:function(){return N.MongoAzureError}}),Object.defineProperty(e,"MongoBatchReExecutionError",{enumerable:!0,get:function(){return N.MongoBatchReExecutionError}}),Object.defineProperty(e,"MongoChangeStreamError",{enumerable:!0,get:function(){return N.MongoChangeStreamError}}),Object.defineProperty(e,"MongoCompatibilityError",{enumerable:!0,get:function(){return N.MongoCompatibilityError}}),Object.defineProperty(e,"MongoCursorExhaustedError",{enumerable:!0,get:function(){return N.MongoCursorExhaustedError}}),Object.defineProperty(e,"MongoCursorInUseError",{enumerable:!0,get:function(){return N.MongoCursorInUseError}}),Object.defineProperty(e,"MongoDecompressionError",{enumerable:!0,get:function(){return N.MongoDecompressionError}}),Object.defineProperty(e,"MongoDriverError",{enumerable:!0,get:function(){return N.MongoDriverError}}),Object.defineProperty(e,"MongoError",{enumerable:!0,get:function(){return N.MongoError}}),Object.defineProperty(e,"MongoExpiredSessionError",{enumerable:!0,get:function(){return N.MongoExpiredSessionError}}),Object.defineProperty(e,"MongoGCPError",{enumerable:!0,get:function(){return N.MongoGCPError}}),Object.defineProperty(e,"MongoGridFSChunkError",{enumerable:!0,get:function(){return N.MongoGridFSChunkError}}),Object.defineProperty(e,"MongoGridFSStreamError",{enumerable:!0,get:function(){return N.MongoGridFSStreamError}}),Object.defineProperty(e,"MongoInvalidArgumentError",{enumerable:!0,get:function(){return N.MongoInvalidArgumentError}}),Object.defineProperty(e,"MongoKerberosError",{enumerable:!0,get:function(){return N.MongoKerberosError}}),Object.defineProperty(e,"MongoMissingCredentialsError",{enumerable:!0,get:function(){return N.MongoMissingCredentialsError}}),Object.defineProperty(e,"MongoMissingDependencyError",{enumerable:!0,get:function(){return N.MongoMissingDependencyError}}),Object.defineProperty(e,"MongoNetworkError",{enumerable:!0,get:function(){return N.MongoNetworkError}}),Object.defineProperty(e,"MongoNetworkTimeoutError",{enumerable:!0,get:function(){return N.MongoNetworkTimeoutError}}),Object.defineProperty(e,"MongoNotConnectedError",{enumerable:!0,get:function(){return N.MongoNotConnectedError}}),Object.defineProperty(e,"MongoOIDCError",{enumerable:!0,get:function(){return N.MongoOIDCError}}),Object.defineProperty(e,"MongoParseError",{enumerable:!0,get:function(){return N.MongoParseError}}),Object.defineProperty(e,"MongoRuntimeError",{enumerable:!0,get:function(){return N.MongoRuntimeError}}),Object.defineProperty(e,"MongoServerClosedError",{enumerable:!0,get:function(){return N.MongoServerClosedError}}),Object.defineProperty(e,"MongoServerError",{enumerable:!0,get:function(){return N.MongoServerError}}),Object.defineProperty(e,"MongoServerSelectionError",{enumerable:!0,get:function(){return N.MongoServerSelectionError}}),Object.defineProperty(e,"MongoSystemError",{enumerable:!0,get:function(){return N.MongoSystemError}}),Object.defineProperty(e,"MongoTailableCursorError",{enumerable:!0,get:function(){return N.MongoTailableCursorError}}),Object.defineProperty(e,"MongoTopologyClosedError",{enumerable:!0,get:function(){return N.MongoTopologyClosedError}}),Object.defineProperty(e,"MongoTransactionError",{enumerable:!0,get:function(){return N.MongoTransactionError}}),Object.defineProperty(e,"MongoUnexpectedServerResponseError",{enumerable:!0,get:function(){return N.MongoUnexpectedServerResponseError}}),Object.defineProperty(e,"MongoWriteConcernError",{enumerable:!0,get:function(){return N.MongoWriteConcernError}});var _=Ur();Object.defineProperty(e,"BatchType",{enumerable:!0,get:function(){return _.BatchType}});var R=Gn();Object.defineProperty(e,"AutoEncryptionLoggerLevel",{enumerable:!0,get:function(){return R.AutoEncryptionLoggerLevel}});var j=Yu();Object.defineProperty(e,"GSSAPICanonicalizationValue",{enumerable:!0,get:function(){return j.GSSAPICanonicalizationValue}});var L=Mt();Object.defineProperty(e,"AuthMechanism",{enumerable:!0,get:function(){return L.AuthMechanism}});var I=qr();Object.defineProperty(e,"Compressor",{enumerable:!0,get:function(){return I.Compressor}});var M=Pt();Object.defineProperty(e,"CURSOR_FLAGS",{enumerable:!0,get:function(){return M.CURSOR_FLAGS}});var S=pe();Object.defineProperty(e,"MongoErrorLabel",{enumerable:!0,get:function(){return S.MongoErrorLabel}});var v=H1();Object.defineProperty(e,"ExplainVerbosity",{enumerable:!0,get:function(){return v.ExplainVerbosity}});var w=Xt();Object.defineProperty(e,"ServerApiVersion",{enumerable:!0,get:function(){return w.ServerApiVersion}});var k=gn();Object.defineProperty(e,"ReturnDocument",{enumerable:!0,get:function(){return k.ReturnDocument}});var $=wn();Object.defineProperty(e,"ProfilingLevel",{enumerable:!0,get:function(){return $.ProfilingLevel}});var X=yt();Object.defineProperty(e,"ReadConcernLevel",{enumerable:!0,get:function(){return X.ReadConcernLevel}});var de=rt();Object.defineProperty(e,"ReadPreferenceMode",{enumerable:!0,get:function(){return de.ReadPreferenceMode}});var Y=pt();Object.defineProperty(e,"ServerType",{enumerable:!0,get:function(){return Y.ServerType}}),Object.defineProperty(e,"TopologyType",{enumerable:!0,get:function(){return Y.TopologyType}});var se=yt();Object.defineProperty(e,"ReadConcern",{enumerable:!0,get:function(){return se.ReadConcern}});var x=rt();Object.defineProperty(e,"ReadPreference",{enumerable:!0,get:function(){return x.ReadPreference}});var G=at();Object.defineProperty(e,"WriteConcern",{enumerable:!0,get:function(){return G.WriteConcern}});var Q=Hn();Object.defineProperty(e,"CommandFailedEvent",{enumerable:!0,get:function(){return Q.CommandFailedEvent}}),Object.defineProperty(e,"CommandStartedEvent",{enumerable:!0,get:function(){return Q.CommandStartedEvent}}),Object.defineProperty(e,"CommandSucceededEvent",{enumerable:!0,get:function(){return Q.CommandSucceededEvent}});var oe=Yn();Object.defineProperty(e,"ConnectionCheckedInEvent",{enumerable:!0,get:function(){return oe.ConnectionCheckedInEvent}}),Object.defineProperty(e,"ConnectionCheckedOutEvent",{enumerable:!0,get:function(){return oe.ConnectionCheckedOutEvent}}),Object.defineProperty(e,"ConnectionCheckOutFailedEvent",{enumerable:!0,get:function(){return oe.ConnectionCheckOutFailedEvent}}),Object.defineProperty(e,"ConnectionCheckOutStartedEvent",{enumerable:!0,get:function(){return oe.ConnectionCheckOutStartedEvent}}),Object.defineProperty(e,"ConnectionClosedEvent",{enumerable:!0,get:function(){return oe.ConnectionClosedEvent}}),Object.defineProperty(e,"ConnectionCreatedEvent",{enumerable:!0,get:function(){return oe.ConnectionCreatedEvent}}),Object.defineProperty(e,"ConnectionPoolClearedEvent",{enumerable:!0,get:function(){return oe.ConnectionPoolClearedEvent}}),Object.defineProperty(e,"ConnectionPoolClosedEvent",{enumerable:!0,get:function(){return oe.ConnectionPoolClosedEvent}}),Object.defineProperty(e,"ConnectionPoolCreatedEvent",{enumerable:!0,get:function(){return oe.ConnectionPoolCreatedEvent}}),Object.defineProperty(e,"ConnectionPoolMonitoringEvent",{enumerable:!0,get:function(){return oe.ConnectionPoolMonitoringEvent}}),Object.defineProperty(e,"ConnectionPoolReadyEvent",{enumerable:!0,get:function(){return oe.ConnectionPoolReadyEvent}}),Object.defineProperty(e,"ConnectionReadyEvent",{enumerable:!0,get:function(){return oe.ConnectionReadyEvent}});var Ee=u1();Object.defineProperty(e,"ServerClosedEvent",{enumerable:!0,get:function(){return Ee.ServerClosedEvent}}),Object.defineProperty(e,"ServerDescriptionChangedEvent",{enumerable:!0,get:function(){return Ee.ServerDescriptionChangedEvent}}),Object.defineProperty(e,"ServerHeartbeatFailedEvent",{enumerable:!0,get:function(){return Ee.ServerHeartbeatFailedEvent}}),Object.defineProperty(e,"ServerHeartbeatStartedEvent",{enumerable:!0,get:function(){return Ee.ServerHeartbeatStartedEvent}}),Object.defineProperty(e,"ServerHeartbeatSucceededEvent",{enumerable:!0,get:function(){return Ee.ServerHeartbeatSucceededEvent}}),Object.defineProperty(e,"ServerOpeningEvent",{enumerable:!0,get:function(){return Ee.ServerOpeningEvent}}),Object.defineProperty(e,"TopologyClosedEvent",{enumerable:!0,get:function(){return Ee.TopologyClosedEvent}}),Object.defineProperty(e,"TopologyDescriptionChangedEvent",{enumerable:!0,get:function(){return Ee.TopologyDescriptionChangedEvent}}),Object.defineProperty(e,"TopologyOpeningEvent",{enumerable:!0,get:function(){return Ee.TopologyOpeningEvent}});var De=no();Object.defineProperty(e,"ServerSelectionEvent",{enumerable:!0,get:function(){return De.ServerSelectionEvent}}),Object.defineProperty(e,"ServerSelectionFailedEvent",{enumerable:!0,get:function(){return De.ServerSelectionFailedEvent}}),Object.defineProperty(e,"ServerSelectionStartedEvent",{enumerable:!0,get:function(){return De.ServerSelectionStartedEvent}}),Object.defineProperty(e,"ServerSelectionSucceededEvent",{enumerable:!0,get:function(){return De.ServerSelectionSucceededEvent}}),Object.defineProperty(e,"WaitingForSuitableServerEvent",{enumerable:!0,get:function(){return De.WaitingForSuitableServerEvent}});var Je=oo();Object.defineProperty(e,"SrvPollingEvent",{enumerable:!0,get:function(){return Je.SrvPollingEvent}});var ze=fr();Object.defineProperty(e,"MongoCryptAzureKMSRequestError",{enumerable:!0,get:function(){return ze.MongoCryptAzureKMSRequestError}}),Object.defineProperty(e,"MongoCryptCreateDataKeyError",{enumerable:!0,get:function(){return ze.MongoCryptCreateDataKeyError}}),Object.defineProperty(e,"MongoCryptCreateEncryptedCollectionError",{enumerable:!0,get:function(){return ze.MongoCryptCreateEncryptedCollectionError}}),Object.defineProperty(e,"MongoCryptError",{enumerable:!0,get:function(){return ze.MongoCryptError}}),Object.defineProperty(e,"MongoCryptInvalidArgumentError",{enumerable:!0,get:function(){return ze.MongoCryptInvalidArgumentError}}),Object.defineProperty(e,"MongoCryptKMSRequestNetworkTimeoutError",{enumerable:!0,get:function(){return ze.MongoCryptKMSRequestNetworkTimeoutError}});var Ce=uo();Object.defineProperty(e,"MongoClientAuthProviders",{enumerable:!0,get:function(){return Ce.MongoClientAuthProviders}})}),Hu=globalThis.__insite_publications??=new Map,lo=class{constructor(e,u){this.name=e,u&&Object.assign(this,u),Hu.set(e,this)}name;onSubscribe;onUnsubscribe;type="object";subscriptions=new Set;fetchSubscription(e,...u){return this.fetch?.(...e.args)}subscribe(e){this.subscriptions.add(e),this.onSubscribe?.(e)}changed(e){for(let u of this.subscriptions)u.changed(e)}unsubscribe(e){this.onUnsubscribe?.(e),this.subscriptions.delete(e)}static publications=Hu},ns=class{constructor(e,u,d,h,a){let l=Hu.get(e);l?(this.publication=l,this.args=u,this.handler=d,a||(this.publication.subscribe(this),h&&this.changed(null))):process.env.NODE_ENV==="development"&&console.error("Unknown publication",e)}publication;args;handler;async changed(e){this.handler(await this.publication.fetchSubscription(this,e),e)}cancel(){this.publication?.unsubscribe(this)}renew(){return this.publication?.unsubscribe(this),this.publication?.subscribe(this),this.changed(null)}},Nu=class extends ns{constructor(e,u,d,h){super(e,u,d,h,!0),this.publication&&(this.publication.subscribe(this),h&&this.changed(null))}ids=new Set;query=null;projection=null;isProjectionInclusive=!1;fields=null;sort=null;match;async changed(e){this.handler([await this.publication.fetchSubscription(this,e)])}updates=[];flushTimeout;flushUpdates=()=>{this.updates.length&&(this.handler(this.updates),this.updates=[])};collectionChangeListener=async e=>{!co.has(e)&&"documentKey"in e&&(this.ids.has(e.documentKey._id)?e.operationType!=="update"||!this.fields||e.updateDescription.updatedFields&&Object.keys(e.updateDescription.updatedFields).some(u=>this.fields.has(u)):"fullDocument"in e&&this.match(e.fullDocument))&&(clearTimeout(this.flushTimeout),this.updates.push(await this.publication.fetchSubscription(this,e)),this.flushTimeout=setTimeout(this.flushUpdates,1))}};function Er(e,u,d=!0,h=!0){if(u)if(d){let a={};for(let l in u){let i=u[l];a[l]=typeof i=="object"?Array.isArray(e[l])?e[l].map(p=>Er(p,i,!0,!1)):Er(e[l],i,!0,!1):e[l]}return h&&u._id===0&&delete a._id,a}else{let a={...e};for(let l in u){let i=u[l];typeof i=="object"?a[l]=Array.isArray(e[l])?e[l].map(p=>Er(p,i,!1,!1)):Er(e[l],i,!1,!1):delete a[l]}return a}return e}var co=new WeakSet,os=class extends lo{constructor(e,u,d,h){super(u),this.collection=e,this.queryProps=d,this.transform=h}type="map";collection;queryProps;transform;skip(e){co.add(e)}makeQueryProps(e){let{query:u=null,projection:d=null,sort:h=null,triggers:a}=(typeof this.queryProps=="function"?this.queryProps(...e):this.queryProps)||{},l=!1,i=null;if(d){for(let p in d)if(l=!!d[p],p!=="_id")break;l&&(i=new Set([...Object.keys(u??{}),...Object.keys(d),...a??[]]),i.delete("_id"),d._id!==0&&(d._id=1))}return{query:u,projection:d,isProjectionInclusive:l,fields:i,sort:h,args:e}}async fetchSubscription(e,u){if(e instanceof Nu&&e.query){if(u&&"documentKey"in u){let a=u.documentKey._id;if(u.operationType==="insert"||u.operationType!=="delete"&&e.match(u.fullDocument)){let l=Er(u.fullDocument,e.projection,e.isProjectionInclusive);return this.transform?.(l,e.args),e.ids.has(a)?["u",l,"updateDescription"in u&&u.updateDescription.updatedFields&&Object.keys(u.updateDescription.updatedFields)]:(e.ids.add(a),["c",l])}return e.ids.delete(a),["d",a]}let d=this.collection.find(e.query);e.projection&&d.project(e.projection),e.sort&&d.sort(e.sort);let h=await d.toArray();if(e.ids)if(e.ids.clear(),this.transform)for(let a of h)e.ids.add(a._id),this.transform(a,e.args);else for(let a of h)e.ids.add(a._id);else if(this.transform)for(let a of h)this.transform(a,e.args);return["i",h,e.sort]}return null}changed(e){return Promise.all([...this.subscriptions].map(u=>u.changed(e)))}onSubscribe=e=>{e instanceof Nu&&(Object.assign(e,this.makeQueryProps(e.args)),e.query&&(e.match=us(e.query),this.collection.changeListeners.add(e.collectionChangeListener)))};flushInitial(){return Promise.all([...this.subscriptions].map(async e=>{let u=await this.fetchSubscription(e,null);e.handler([u]),e.updates=[]}))}onUnsubscribe=e=>{e instanceof Nu&&e.query&&this.collection.changeListeners.delete(e.collectionChangeListener)}},Wt=class extends os{constructor(e,...u){super(e,...u)}};var i1=class extends lo{constructor(...e){super(...e)}};var ho={};U1(ho,{connect:()=>ds,newObjectIdString:()=>ps});var is=$r(Yr(),1),ss=$r(Yr(),1),as=$r(Yr(),1);Jo(ho,$r(Yr(),1));function ls(e){process.env.NODE_ENV==="development"&&console.log("Change stream change",this.parent.collectionName,e);for(let u of this.parent.changeListeners)u(e)}function cs(e){console.error(`\u{1F33F}\u2757\uFE0F Mongo ${this.parent.collectionName} Change Stream:
|
|
12
|
-
`,e.stack)}var hs=class extends Map{constructor(e){super(),this.db=e}db;async ensure(e,u={}){let{db:d}=this,h=this.get(e);return h||((await d.listCollections({name:e},{nameOnly:!0}).toArray()).length?h=d.collection(e):(h=await d.createCollection(e,{...u.jsonSchema&&{validator:{$jsonSchema:u.jsonSchema}},...u.blockCompressor&&{storageEngine:{wiredTiger:{configString:`block_compressor=${u.blockCompressor}`}}}}),delete u.jsonSchema,delete u.blockCompressor),this.set(e,h),this[e]=h,u.watch!==!1&&(h.changeListeners=new Set,h.changeStream=h.watch(void 0,{fullDocument:u.fullDocument===!1?void 0:"updateLookup"}).on("change",ls).on("error",cs))),u.jsonSchema&&await d.command({collMod:e,...u.jsonSchema&&{validator:{$jsonSchema:u.jsonSchema}}}),h}};async function ds({url:e,name:u,...d}){/localhost/.test(e)&&(e=e.replace(/localhost/,"127.0.0.1"));let h=new is.MongoClient(e,{maxPoolSize:100,...d});try{await h.connect(),console.info("\u{1F33F} Mongo Client connected to",e.replace(/(?<=\/\/)[^:]+?:[^@]+@/,"").replace(/[/?][^/]*$/,""))}catch(i){console.error("\u{1F33F}\u2757\uFE0F Mongo Client connection: ",i)}h.on("close",()=>console.error("\u{1F33F}\u2757\uFE0F Mongo DB socket closed")).on("error",i=>console.error("\u{1F33F}\u2757\uFE0F Mongo DB:",i)).on("parseError",i=>console.error("\u{1F33F}\u2757\uFE0F Mongo DB parse:",i)).on("reconnect",()=>console.info("\u{1F33F} Mongo DB reconnected")).on("timeout",()=>console.error("\u{1F33F}\u2757\uFE0F Mongo DB timeout"));let a=h.db(u),l=new hs(a);return{client:h,db:a,collections:l}}ss.Collection.prototype.ensureIndexes=async function(e){try{for(let u of e)await this.createIndex(...u)}catch{}};function ps(){return new as.ObjectId().toString()}import{_ids as Eo,includesAny as Es,intersection as s1,pick as a1}from"@nesvet/n";var Jr=class extends i1{constructor(u){super("abilities",{fetch(d){return d.user?.abilities.inSite?.sections?.includes("users")?{abilities:u.getSchemeFor(d.user)}:null}})}},Xr=class extends Wt{constructor(u,d={}){let{projection:h={title:1,description:1},sort:a={_o:1},transform:l}=d;Object.assign(h,{involves:1,abilities:1}),super(u.collection,"roles",i=>i.user?.abilities.inSite?.sections?.includes("users")&&{query:{_id:{$in:i.user.slaveRoleIds}},projection:h,sort:a},i=>{let{involves:p,abilities:A,inheritedAbilities:o,displayTitle:n,_o:r}=u.get(i._id);Object.assign(i,{...i.involves?{ownInvolves:i.involves,involves:Eo(p),abilities:A,inheritedAbilities:o}:{},...h.title?{displayTitle:n}:{},_o:r}),l?.(i)})}},po=new WeakMap,Zr=class extends i1{constructor(u,d={}){let{fieldsToUpdate:h=[],projection:a,transform:l}=d;for(let i of["email","name","name.first","name.middle","name.last","org","job","avatar"])(!a||a[i]!==0)&&h.push(i);super("user",{onSubscribe(i){let[{user:p}]=i.args;if(p){let{_id:A}=p,o=n=>{if("documentKey"in n&&n.documentKey._id===A)switch(n.operationType){case"update":if(!Es(Object.keys(n.updateDescription.updatedFields),h))break;case"replace":case"delete":i.changed(n)}};u.collection.changeListeners.add(o),po.set(i,o)}},fetch({user:i,session:p},A){if(i){let o=a1(i,["_id","email","name","initials","displayLabel","job","avatarUrl","abilities","slaveIds"]);if(Object.assign(o,{orgId:i.org._id,sessionId:A?p?._id:void 0,isOnline:!0}),a)for(let n in a)a[n]&&n in i?Object.assign(o,{[n]:i[n]}):delete o[n];return l?.(o),o}return null},onUnsubscribe(i){let p=po.get(i);p&&u.collection.changeListeners.delete(p)}})}},Qr=class extends Wt{constructor(u,d={}){let{projection:h={email:1,name:1,org:1,job:1,avatar:1},sort:a={"name.last":1},transform:l}=d;super(u.collection,"users",i=>i.user?.abilities.login&&{query:{},projection:h,sort:a},i=>{let p=u.get(i._id);Object.assign(i,a1(p,["initials","displayLabel","avatarUrl","isOnline"]),{orgId:i.org}),delete i.org,delete i.avatar,l?.(i)})}},eu=class extends Wt{constructor(u,d={}){let{projection:h={_id:1},sort:a,triggers:l=[],transform:i}=d;l.includes("roles")||l.push("roles"),super(u.collection,"users.extended",p=>p.user?.abilities.inSite?.sections?.includes("users")&&{query:{_id:{$in:p.user.slaveIds}},projection:h,sort:a,triggers:l},(p,[A])=>{let o=u.get(p._id);Object.assign(p,{roleIds:s1(o.ownRoleIds,A.user.slaveRoleIds)}),i?.(p)})}},tu=class extends Wt{constructor(u){super(u.collection,"users.people.sessions",(d,h)=>d.user?.abilities.inSite?.sections?.includes("users")&&d.user.permissiveIds.includes(h)&&{query:{user:h},projection:{remoteAddress:1,isOnline:1,prolongedAt:1},sort:{prolongedAt:-1}})}},ru=class extends Wt{constructor(u,d={}){let{projection:h={title:1},sort:a={title:1},transform:l}=d;super(u.collection,"orgs",i=>i.user?.abilities.login&&{query:{},projection:h,sort:a},i=>{let p=u.get(i._id);Object.assign(i,a1(p,["initials","displayLabel"])),l?.(i)})}},uu=class extends Wt{constructor(u,d={}){let{projection:h={note:1},sort:a={_o:1},triggers:l=[],transform:i}=d;l.includes("owners")||l.push("owners"),super(u.collection,"orgs.extended",p=>p.user?.abilities.inSite?.sections?.includes("users")&&{query:{_id:{$in:p.user.slaveIds}},projection:h,sort:a,triggers:l},(p,[A])=>{let o=u.get(p._id),{ownerIds:n,slaveOrgs:r,_o:E}=o;Object.assign(p,{owners:s1(n,A.user.slaveIds),slaveOrgs:Eo(s1(r,A.user.slaveOrgs)),_o:E}),i?.(p)})}};var l1={email:/^[^\s@]{1,63}@[^\s@]{1,63}\.[^\s@]{1,63}$/,role:/^[\d_a-z-]{1,64}$/};var gs=["image/webp"],ys=1024*512,Ao=class e{constructor(u){this.initPromise=this.init(u)}userWsMap=new WeakMap;sessionsWsMap=new WeakMap;wss;users;getSessionProps;incomingTransport;abilitiesPublication;rolesPublication;usersPublication;usersExtendedPublication;userPublication;orgsPublication;orgsExtendedPublication;sessionsPublication;init=async u=>{let{wss:d,collections:h,users:a,publication:l,extendedPublication:i,userPublication:p,roles:A={},orgs:o={},getSessionProps:n,incomingTransport:r}=u,{publication:E}=A,{publication:m,extendedPublication:c}=o;this.wss=d,this.users=await Cs.init(h,a),this.getSessionProps=n,this.incomingTransport=r;for(let f of this.users.values())this.handleUserCreate(f);if(this.abilitiesPublication=new Jr(this.users.abilitiesMap),this.rolesPublication=new Xr(this.users.roles,E),this.usersPublication=new Qr(this.users,l),this.usersExtendedPublication=new eu(this.users,i),this.userPublication=new Zr(this.users,p),this.orgsPublication=new ru(this.users.orgs,m),this.orgsExtendedPublication=new uu(this.users.orgs,c),this.sessionsPublication=new tu(this.users.sessions),this.users.on("roles-update",this.handleRolesUpdate),this.users.on("roles-role-update",this.handleRolesRoleUpdate),this.users.on("user-create",this.handleUserCreate),this.users.on("user-is-online",this.handleUserIsOnline),this.users.on("session-delete",this.handleSessionDelete),this.users.on("orgs-update",this.handleOrgsUpdate),this.users.on("orgs-org-update",this.handleOrgsOrgUpdate),this.users.on("user-permissions-change",this.handleUserPermissionsChange),this.wss.onRequest("login",this.handleClientRequestLogin),this.wss.onRequest("logout",this.handleClientRequestLogout),this.wss.on("client-closed",this.handleClientClosed),this.wss.onRequest("users.people.check-email",(f,O)=>{if(f.user?.abilities.inSite?.sections?.includes("users")){if(!l1.email.test(O))throw new nt("Not email","notemail");if(this.users.byEmail.has(O))throw new nt("Email already exists","exists")}}),this.wss.onRequest("users.people.add",async(f,{roles:O,org:F,...y})=>{if(f.user?.abilities.inSite?.sections?.includes("users")){if(!O.length)throw new nt("Roles shouldn't be empty","emptyroles");if(!Cr(f.user.slaveRoleIds,O))throw new nt("Can't assign role the user is not involved in","forbiddenrole");if(F&&!f.user.slaveIds.includes(F))throw new nt("Can't assign org the user is not master of","forbiddenorg");await this.users.new({roles:O,org:F,...y})}}),this.wss.onRequest("users.people.change-password",async(f,O,F)=>{if(f.user?.abilities.inSite?.sections?.includes("users")&&f.user.permissiveIds.includes(O)){if(typeof F!="string")throw new nt("Type of password is incorrect","wrongpasswordtype");if(!F)throw new nt("Password can't be empty","emptypassword");await this.users.changePassword(O,F)}}),this.wss.onRequest("users.people.update",async(f,O,F)=>{if(f.user?.abilities.inSite?.sections?.includes("users")&&f.user.permissiveIds.includes(O)){if(F.roles){if(!F.roles.length)throw new nt("Roles can't be empty","emptyroles");if(!Cr(f.user.slaveRoleIds,F.roles))throw new nt("Can't assign role the user is not involved in","forbiddenrole");let y=this.users.get(O);y&&(F.roles=y.isRoot?["root"]:this.users.roles.cleanUpIds(c1(y.ownRoleIds,f.user.slaveRoleIds).concat(F.roles)))}if(F.org&&!f.user.slaveIds.includes(F.org))throw new nt("Can't assign org the user is not master of","forbiddenorg");mo(F)||await this.users.collection.updateOne({_id:O},{$set:F})}}),this.wss.onRequest("users.people.delete",async(f,O)=>{f.user?.abilities.inSite?.sections?.includes("users")&&f.user.slaveIds.includes(O)&&await this.users.collection.deleteOne({_id:O})}),this.wss.onRequest("users.people.destroy-session",async(f,O)=>{f.user?.abilities.inSite?.sections?.includes("users")&&f.user.permissiveIds.includes(this.users.bySessionId.get(O)?._id)&&await this.users.sessions.collection.deleteOne({_id:O})}),this.incomingTransport){let f=O=>({begin:async(F,y)=>(!O||await O(F,y))&&gs.includes(y.metadata.type)&&y.size<=ys,end:async(F,{data:y,metadata:{type:g,_id:T}})=>{let D=As.createFromBase64(y.slice(y.indexOf(","))),N=Date.now().toString(36);await Promise.all([this.users.avatars.collection.replaceOne({_id:T},{type:g,size:D.length(),ts:N,data:D},{upsert:!0}),this.users.collection.updateOne({_id:T},{$set:{avatar:N}})])}});this.incomingTransport.on("users.people.avatar",f((O,{metadata:{_id:F}})=>O.user?.abilities.inSite?.sections?.includes("users")&&O.user.permissiveIds.includes(F))),this.incomingTransport.on("user.avatar",f((O,F)=>O.user&&O.user._id===F.metadata._id))}let b=async f=>{await Promise.all([this.users.avatars.collection.deleteOne({_id:f}),this.users.collection.updateOne({_id:f},{$set:{avatar:null}})])};return this.wss.onRequest("users.people.delete-avatar",async(f,O)=>f.user?.abilities.inSite?.sections?.includes("users")&&f.user.permissiveIds.includes(O)&&await b(O)),this.wss.onRequest("user.delete-avatar",async(f,O)=>f.user&&f.user._id===O&&await b(O)),this.wss.onRequest("users.orgs.add",async(f,O)=>{if(f.user?.abilities.inSite?.sections?.includes("users")){if(!O.title)throw new nt("Title can't be empty","emptytitle");await this.users.orgs.new(O,f.user._id)}}),this.wss.onRequest("users.orgs.update",async(f,O,F)=>{if(f.user?.abilities.inSite?.sections?.includes("users")&&f.user.slaveIds.includes(O)){if(F.title!==void 0&&!F.title)throw new nt("Title can't be empty","emptytitle");if(F.owners){if(!Cr(f.user.slaveIds,F.owners))throw new nt("Can't assign owners the user is not master of","forbiddenowners");let y=this.users.orgs.get(O);y&&(F.owners=this.users.sortIds(fs(c1(y.ownerIds,f.user.slaveIds),c1(F.owners,[y._id,...ms(y.slaveOrgs)]))))}mo(F)||await this.users.orgs.collection.updateOne({_id:O},{$set:F})}}),this.wss.onRequest("users.orgs.delete",async(f,O)=>{f.user?.abilities.inSite?.sections?.includes("users")&&f.user.slaveIds.includes(O)&&await this.users.orgs.collectionDelete(O)}),this.wss.onRequest("users.roles.check-id",(f,O)=>{if(f.user?.abilities.inSite?.sections?.includes("users")){if(!l1.role.test(O))throw new nt("Role ID is incorrect","notroleid");if(this.users.roles.has(O))throw new nt("Role ID already exists","exists")}}),this.wss.onRequest("users.roles.add",async(f,O)=>{f.user?.abilities.inSite?.sections?.includes("users")&&await this.users.roles.new(O)}),this.wss.onRequest("users.roles.update",async(f,O,{abilities:F,...y})=>{if(f.user?.abilities.inSite?.sections?.includes("users")&&f.user.slaveRoleIds.includes(O)){if(y.involves)if(Cr(f.user.slaveRoleIds,y.involves)){fo(y.involves,[O]);let g=this.users.roles.get(O);if(g)for(let T of y.involves)this.users.roles.get(T)?.involves.has(g)&&fo(y.involves,[T]);y.involves=this.users.roles.cleanUpIds(y.involves)}else throw new nt("Can't assign role the user is not involved in","forbiddenrole");await this.users.roles.collection.updateOne({_id:O},{$set:y})}}),this.wss.onRequest("users.roles.set-ability",async(f,O,F,y,g)=>{if(f.user?.abilities.inSite?.sections?.includes("users")&&f.user.slaveRoleIds.includes(O)&&f.user.abilities[F]){let T=this.users.roles.get(O);if(T){let D=structuredClone(T.ownAbilities),N;if(y){D[F]||(D[F]={});let _=this.users.abilitiesMap.get(F)?.params?.find(R=>R._id===y);if(_){let R=f.user.abilities[F],j=D[F];_.type==="number"?R[y]>=g&&(j[y]=g,N=!0):_.type==="items"&&R[y]&&Cr(R[y],g)&&(j[y]=g,N=!0)}}else g?D[F]=this.users.abilitiesMap.getMinimumOf(F):function _(R){if(R&&(delete D[R._id],R.subAbilities))for(let j of R.subAbilities)D[j._id]&&_(j)}(this.users.abilitiesMap.get(F)),N=!0;N&&await this.users.roles.collection.updateOne({_id:O},{$set:{abilities:D}})}}}),this.wss.on("client-message:users.roles.delete",async(f,O)=>{f.user?.abilities.inSite?.sections?.includes("users")&&f.user.slaveRoleIds.includes(O)&&await this.users.roles.collectionDelete(O)}),this};initPromise;whenReady(){return this.initPromise}getDefaultSessionProps({userAgent:u,remoteAddress:d}){return{userAgent:u,remoteAddress:d}}setSession(u,d,h){d===null?d=void 0:typeof d=="string"&&(d=this.users.sessions.get(d)),u.session!==d&&(u.session&&this.sessionsWsMap.delete(u.session),d?(u.session=d,u.user=d.user,u.lastUserId=d.user._id,this.userWsMap.get(d.user)?.add(u),this.sessionsWsMap.set(d,u),h&&d.prolong({...this.getDefaultSessionProps(u),...this.getSessionProps?.(u),isOnline:!0})):(delete u.session,this.userWsMap.get(u.user)?.delete(u)),this.wss.emit("client-session",u,h))}login=async(u,d,h)=>{let a=await this.users.login(d,h,{...this.getDefaultSessionProps(u),...this.getSessionProps?.(u),isOnline:!0});a&&this.setSession(u,a)};logout=u=>{u.session&&(this.users.logout(u.session),this.setSession(u,null))};handleRolesUpdate=()=>this.rolesPublication.flushInitial();handleRolesRoleUpdate=(u,d)=>d&&this.rolesPublication.skip(d);handleUserCreate=u=>this.userWsMap.set(u,new Set);handleUserIsOnline=({_id:u,isOnline:d})=>{let h={_id:u,isOnline:d};for(let a of this.usersPublication.subscriptions){let[l]=a.args;l.user&&l.user._id!==u&&a.handler([["u",h,!0]])}};handleSessionDelete=u=>{let d=this.sessionsWsMap.get(u);d&&this.setSession(d,null)};handleOrgsUpdate=()=>{this.orgsPublication.flushInitial(),this.orgsExtendedPublication.flushInitial()};handleOrgsOrgUpdate=(u,d)=>{d&&(this.orgsPublication.skip(d),this.orgsExtendedPublication.skip(d))};handleUserPermissionsChange=u=>{let d=this.userWsMap.get(u);d&&this.wss.emit("should-renew-subscriptions",[...d])};handleClientRequestLogin=(u,d,h)=>this.login(u,d,h);handleClientRequestLogout=u=>this.logout(u);handleClientClosed=u=>{u.session?.offline(),this.setSession(u,null)};static init(u){return new e(u).whenReady()}};import Co from"node:fs";import Ss from"node:http";import Bs from"node:https";import{debounce as Ds,uid as Os}from"@nesvet/n";var yr={request:"~r-q",response:"~r-s"},h1=Symbol("heartbeatInterval"),gr=Symbol("defib"),Sr=Symbol("pingTs"),mt=class d1 extends PrepareWebSocket{get isConnecting(){return this.readyState===this.CONNECTING}get isOpen(){return this.readyState===this.OPEN}get isClosing(){return this.readyState===this.CLOSING}get isClosed(){return this.readyState===this.CLOSED}isWebSocketServerClient=!0;isWebSocketServer=!1;isWebSocket=!1;wss;userAgent="";remoteAddress="";[gr]=d1.makeDefib.call(this);latency=0;[Sr];[h1]=d1.makeHeartbeatInterval.call(this);sendMessage(...u){return this.send(JSON.stringify(u))}sendRequest(...u){let d=Os(),h=`message:${yr.response}-${d}`;return typeof u.at(-1)=="function"?(this.once(h,u.splice(-1,1)[0]),this.sendMessage(yr.request,d,...u),this):new Promise((a,l)=>{this.once(h,(i,p)=>{if(i){let{message:A,...o}=i;l(Object.assign(new Error(A),o))}else a(p)}),this.sendMessage(yr.request,d,...u)})}static makeDefib(){return Ds(()=>this.terminate(),65e3)}static makeHeartbeatInterval(){return setInterval(()=>{this[Sr]=Date.now(),this.send("")},5e3)}},k2=class extends PrepareWebSocketServer{constructor(e,u,d){let{ssl:h,port:a,...l}=e;if(h){if(typeof h.cert=="string"&&!/^-{3,}BEGIN/.test(h.cert))try{h.cert=Co.readFileSync(h.cert)}catch{}if(typeof h.key=="string"&&!/^-{3,}BEGIN/.test(h.key))try{h.key=Co.readFileSync(h.key)}catch{}}let{server:i=h?Bs.createServer({...h}):Ss.createServer()}=l;super({WebSocket:mt,...l,server:i}),this.port=typeof a=="string"?Number.parseInt(a):a,u&&(typeof u=="function"?d=u:Object.assign(this,u)),this.on("connection",this.handleConnection),this.on(`client-message:${yr.request}`,this.handleRequest),i.listen(this.port,d)}isWebSocketServer=!0;isWebSocketServerClient=!1;isWebSocket=!1;port;requestListeners=new Map;addRequestListener(e,u){return this.requestListeners.set(e,u),this}onRequest=this.addRequestListener;removeRequestListener(e){return this.requestListeners.delete(e),this}offRequest=this.removeRequestListener;handleRequest=async(e,u,d,...h)=>{let a=this.requestListeners.get(d),l,i=null;if(a)try{l=await a.call(this,e,...h)}catch(p){if(p instanceof Error){let{message:A,...o}=p;i={message:A,...o}}}else i={message:`Unknown request kind "${d}"`};e.sendMessage(`${yr.response}-${u}`,i,l)};handleConnection(e,u){if(!(e instanceof mt)){Object.defineProperties(e,{isConnecting:{get:Object.getOwnPropertyDescriptor(mt.prototype,"isConnecting").get},isOpen:{get:Object.getOwnPropertyDescriptor(mt.prototype,"isOpen").get},isClosing:{get:Object.getOwnPropertyDescriptor(mt.prototype,"isClosing").get},isClosed:{get:Object.getOwnPropertyDescriptor(mt.prototype,"isClosed").get}});let{terminate:d}=e;Object.assign(e,{isWebSocketServerClient:!0,isWebSocketServer:!1,isWebSocket:!1,[gr]:mt.makeDefib.call(e),latency:0,[h1]:mt.makeHeartbeatInterval.call(e),sendMessage:mt.prototype.sendMessage,sendRequest:mt.prototype.sendRequest,terminate(){try{d.call(e)}catch(h){console.error(h)}}})}Object.assign(e,{wss:this,userAgent:u.headers["user-agent"]??"",remoteAddress:u.headers["x-real-ip"]??u.headers["x-forwarded-for"]??""}),e[gr](),e.on("message",d=>this.handleClientMessage(e,d)),e.on("error",d=>this.handleClientError(e,d)),e.on("close",(...d)=>this.handleClientClose(e,...d)),this.emit("client-connect",e,u)}handleClientMessage(e,u){let d=u.toString();if(e[gr](),d)try{let[h,...a]=JSON.parse(d);e.emit(`message:${h}`,...a),this.emit("client-message",e,h,...a),this.emit(`client-message:${h}`,e,...a)}catch(h){this.handleClientError(e,h)}else e[Sr]&&(e.latency=Date.now()-e[Sr],delete e[Sr])}handleClientError(e,u){u instanceof Event&&(u=void 0),process.env.NODE_ENV==="development"&&console.error("WebSocketServer Client error",u),this.emit("client-error",e,u)}handleClientClose(e,...u){process.env.NODE_ENV==="development"&&console.info("WebSocketServer Client closed",...u),e[gr].clear(),clearInterval(e[h1]),this.emit("client-close",e),this.emit("client-closed",e)}};var go=class extends mt{user;lastUserId;session};export{Ao as UsersServer,go as WSSCWithUser};
|
|
1
|
+
import{_ids as ie,Err as g,includesAll as C,isEmpty as V,removeAll as Q,union as re,without as G}from"@nesvet/n";import{Binary as ne}from"insite-db";import{Users as oe}from"insite-users-server";import{CollectionMapPublication as O,Publication as K}from"insite-subscriptions-server/ws";import{_ids as J,includesAny as te,intersection as _,pick as $}from"@nesvet/n";var I=class extends K{constructor(e){super("abilities",{fetch(s){return s.user?.abilities.inSite?.sections?.includes("users")?{abilities:e.getSchemeFor(s.user)}:null}})}},k=class extends O{constructor(e,s={}){let{projection:o={title:1,description:1},sort:l={_o:1},transform:d}=s;Object.assign(o,{involves:1,abilities:1}),super(e.collection,"roles",r=>r.user?.abilities.inSite?.sections?.includes("users")&&{query:{_id:{$in:r.user.slaveRoleIds}},projection:o,sort:l},r=>{let{involves:c,abilities:S,inheritedAbilities:p,displayTitle:h,_o:P}=e.get(r._id);Object.assign(r,{...r.involves?{ownInvolves:r.involves,involves:J(c),abilities:S,inheritedAbilities:p}:{},...o.title?{displayTitle:h}:{},_o:P}),d?.(r)})}},B=new WeakMap,q=class extends K{constructor(e,s={}){let{fieldsToUpdate:o=[],projection:l,transform:d}=s;for(let r of["email","name","name.first","name.middle","name.last","org","job","avatar"])(!l||l[r]!==0)&&o.push(r);super("user",{onSubscribe(r){let[{user:c}]=r.args;if(c){let{_id:S}=c,p=h=>{if("documentKey"in h&&h.documentKey._id===S)switch(h.operationType){case"update":if(!te(Object.keys(h.updateDescription.updatedFields),o))break;case"replace":case"delete":r.changed(h)}};e.collection.changeListeners.add(p),B.set(r,p)}},fetch({user:r,session:c},S){if(r){let p=$(r,["_id","email","name","initials","displayLabel","job","avatarUrl","abilities","slaveIds"]);if(Object.assign(p,{orgId:r.org._id,sessionId:S?c?._id:void 0,isOnline:!0}),l)for(let h in l)l[h]&&h in r?Object.assign(p,{[h]:r[h]}):delete p[h];return d?.(p),p}return null},onUnsubscribe(r){let c=B.get(r);c&&e.collection.changeListeners.delete(c)}})}},D=class extends O{constructor(e,s={}){let{projection:o={email:1,name:1,org:1,job:1,avatar:1},sort:l={"name.last":1},transform:d}=s;super(e.collection,"users",r=>r.user?.abilities.login&&{query:{},projection:o,sort:l},r=>{let c=e.get(r._id);Object.assign(r,$(c,["initials","displayLabel","avatarUrl","isOnline"]),{orgId:r.org}),delete r.org,delete r.avatar,d?.(r)})}},j=class extends O{constructor(e,s={}){let{projection:o={_id:1},sort:l,triggers:d=[],transform:r}=s;d.includes("roles")||d.push("roles"),super(e.collection,"users.extended",c=>c.user?.abilities.inSite?.sections?.includes("users")&&{query:{_id:{$in:c.user.slaveIds}},projection:o,sort:l,triggers:d},(c,[S])=>{let p=e.get(c._id);Object.assign(c,{roleIds:_(p.ownRoleIds,S.user.slaveRoleIds)}),r?.(c)})}},E=class extends O{constructor(e){super(e.collection,"users.people.sessions",(s,o)=>s.user?.abilities.inSite?.sections?.includes("users")&&s.user.permissiveIds.includes(o)&&{query:{user:o},projection:{remoteAddress:1,isOnline:1,prolongedAt:1},sort:{prolongedAt:-1}})}},M=class extends O{constructor(e,s={}){let{projection:o={title:1},sort:l={title:1},transform:d}=s;super(e.collection,"orgs",r=>r.user?.abilities.login&&{query:{},projection:o,sort:l},r=>{let c=e.get(r._id);Object.assign(r,$(c,["initials","displayLabel"])),d?.(r)})}},T=class extends O{constructor(e,s={}){let{projection:o={note:1},sort:l={_o:1},triggers:d=[],transform:r}=s;d.includes("owners")||d.push("owners"),super(e.collection,"orgs.extended",c=>c.user?.abilities.inSite?.sections?.includes("users")&&{query:{_id:{$in:c.user.slaveIds}},projection:o,sort:l,triggers:d},(c,[S])=>{let p=e.get(c._id),{ownerIds:h,slaveOrgs:P,_o:L}=p;Object.assign(c,{owners:_(h,S.user.slaveIds),slaveOrgs:J(_(P,S.user.slaveOrgs)),_o:L}),r?.(c)})}};var N={email:/^[^\s@]{1,63}@[^\s@]{1,63}\.[^\s@]{1,63}$/,role:/^[\d_a-z-]{1,64}$/};var ae=["image/webp"],le=1024*512,X=class n{constructor(e){this.initPromise=this.init(e)}userWsMap=new WeakMap;sessionsWsMap=new WeakMap;wss;users;getSessionProps;incomingTransport;abilitiesPublication;rolesPublication;usersPublication;usersExtendedPublication;userPublication;orgsPublication;orgsExtendedPublication;sessionsPublication;init=async e=>{let{wss:s,collections:o,users:l,publication:d,extendedPublication:r,userPublication:c,roles:S={},orgs:p={},getSessionProps:h,incomingTransport:P}=e,{publication:L}=S,{publication:ee,extendedPublication:se}=p;this.wss=s,this.users=await oe.init(o,l),this.getSessionProps=h,this.incomingTransport=P;for(let t of this.users.values())this.handleUserCreate(t);if(this.abilitiesPublication=new I(this.users.abilitiesMap),this.rolesPublication=new k(this.users.roles,L),this.usersPublication=new D(this.users,d),this.usersExtendedPublication=new j(this.users,r),this.userPublication=new q(this.users,c),this.orgsPublication=new M(this.users.orgs,ee),this.orgsExtendedPublication=new T(this.users.orgs,se),this.sessionsPublication=new E(this.users.sessions),this.users.on("roles-update",this.handleRolesUpdate),this.users.on("roles-role-update",this.handleRolesRoleUpdate),this.users.on("user-create",this.handleUserCreate),this.users.on("user-is-online",this.handleUserIsOnline),this.users.on("session-delete",this.handleSessionDelete),this.users.on("orgs-update",this.handleOrgsUpdate),this.users.on("orgs-org-update",this.handleOrgsOrgUpdate),this.users.on("user-permissions-change",this.handleUserPermissionsChange),this.wss.onRequest("login",this.handleClientRequestLogin),this.wss.onRequest("logout",this.handleClientRequestLogout),this.wss.on("client-closed",this.handleClientClosed),this.wss.onRequest("users.people.check-email",(t,i)=>{if(t.user?.abilities.inSite?.sections?.includes("users")){if(!N.email.test(i))throw new g("Not email","notemail");if(this.users.byEmail.has(i))throw new g("Email already exists","exists")}}),this.wss.onRequest("users.people.add",async(t,{roles:i,org:a,...u})=>{if(t.user?.abilities.inSite?.sections?.includes("users")){if(!i.length)throw new g("Roles shouldn't be empty","emptyroles");if(!C(t.user.slaveRoleIds,i))throw new g("Can't assign role the user is not involved in","forbiddenrole");if(a&&!t.user.slaveIds.includes(a))throw new g("Can't assign org the user is not master of","forbiddenorg");await this.users.new({roles:i,org:a,...u})}}),this.wss.onRequest("users.people.change-password",async(t,i,a)=>{if(t.user?.abilities.inSite?.sections?.includes("users")&&t.user.permissiveIds.includes(i)){if(typeof a!="string")throw new g("Type of password is incorrect","wrongpasswordtype");if(!a)throw new g("Password can't be empty","emptypassword");await this.users.changePassword(i,a)}}),this.wss.onRequest("users.people.update",async(t,i,a)=>{if(t.user?.abilities.inSite?.sections?.includes("users")&&t.user.permissiveIds.includes(i)){if(a.roles){if(!a.roles.length)throw new g("Roles can't be empty","emptyroles");if(!C(t.user.slaveRoleIds,a.roles))throw new g("Can't assign role the user is not involved in","forbiddenrole");let u=this.users.get(i);u&&(a.roles=u.isRoot?["root"]:this.users.roles.cleanUpIds(G(u.ownRoleIds,t.user.slaveRoleIds).concat(a.roles)))}if(a.org&&!t.user.slaveIds.includes(a.org))throw new g("Can't assign org the user is not master of","forbiddenorg");V(a)||await this.users.collection.updateOne({_id:i},{$set:a})}}),this.wss.onRequest("users.people.delete",async(t,i)=>{t.user?.abilities.inSite?.sections?.includes("users")&&t.user.slaveIds.includes(i)&&await this.users.collection.deleteOne({_id:i})}),this.wss.onRequest("users.people.destroy-session",async(t,i)=>{t.user?.abilities.inSite?.sections?.includes("users")&&t.user.permissiveIds.includes(this.users.bySessionId.get(i)?._id)&&await this.users.sessions.collection.deleteOne({_id:i})}),this.incomingTransport){let t=i=>({begin:async(a,u)=>(!i||await i(a,u))&&ae.includes(u.metadata.type)&&u.size<=le,end:async(a,{data:u,metadata:{type:m,_id:y}})=>{let f=ne.createFromBase64(u.slice(u.indexOf(","))),A=Date.now().toString(36);await Promise.all([this.users.avatars.collection.replaceOne({_id:y},{type:m,size:f.length(),ts:A,data:f},{upsert:!0}),this.users.collection.updateOne({_id:y},{$set:{avatar:A}})])}});this.incomingTransport.on("users.people.avatar",t((i,{metadata:{_id:a}})=>i.user?.abilities.inSite?.sections?.includes("users")&&i.user.permissiveIds.includes(a))),this.incomingTransport.on("user.avatar",t((i,a)=>i.user&&i.user._id===a.metadata._id))}let z=async t=>{await Promise.all([this.users.avatars.collection.deleteOne({_id:t}),this.users.collection.updateOne({_id:t},{$set:{avatar:null}})])};return this.wss.onRequest("users.people.delete-avatar",async(t,i)=>t.user?.abilities.inSite?.sections?.includes("users")&&t.user.permissiveIds.includes(i)&&await z(i)),this.wss.onRequest("user.delete-avatar",async(t,i)=>t.user&&t.user._id===i&&await z(i)),this.wss.onRequest("users.orgs.add",async(t,i)=>{if(t.user?.abilities.inSite?.sections?.includes("users")){if(!i.title)throw new g("Title can't be empty","emptytitle");await this.users.orgs.new(i,t.user._id)}}),this.wss.onRequest("users.orgs.update",async(t,i,a)=>{if(t.user?.abilities.inSite?.sections?.includes("users")&&t.user.slaveIds.includes(i)){if(a.title!==void 0&&!a.title)throw new g("Title can't be empty","emptytitle");if(a.owners){if(!C(t.user.slaveIds,a.owners))throw new g("Can't assign owners the user is not master of","forbiddenowners");let u=this.users.orgs.get(i);u&&(a.owners=this.users.sortIds(re(G(u.ownerIds,t.user.slaveIds),G(a.owners,[u._id,...ie(u.slaveOrgs)]))))}V(a)||await this.users.orgs.collection.updateOne({_id:i},{$set:a})}}),this.wss.onRequest("users.orgs.delete",async(t,i)=>{t.user?.abilities.inSite?.sections?.includes("users")&&t.user.slaveIds.includes(i)&&await this.users.orgs.collectionDelete(i)}),this.wss.onRequest("users.roles.check-id",(t,i)=>{if(t.user?.abilities.inSite?.sections?.includes("users")){if(!N.role.test(i))throw new g("Role ID is incorrect","notroleid");if(this.users.roles.has(i))throw new g("Role ID already exists","exists")}}),this.wss.onRequest("users.roles.add",async(t,i)=>{t.user?.abilities.inSite?.sections?.includes("users")&&await this.users.roles.new(i)}),this.wss.onRequest("users.roles.update",async(t,i,{abilities:a,...u})=>{if(t.user?.abilities.inSite?.sections?.includes("users")&&t.user.slaveRoleIds.includes(i)){if(u.involves)if(C(t.user.slaveRoleIds,u.involves)){Q(u.involves,[i]);let m=this.users.roles.get(i);if(m)for(let y of u.involves)this.users.roles.get(y)?.involves.has(m)&&Q(u.involves,[y]);u.involves=this.users.roles.cleanUpIds(u.involves)}else throw new g("Can't assign role the user is not involved in","forbiddenrole");await this.users.roles.collection.updateOne({_id:i},{$set:u})}}),this.wss.onRequest("users.roles.set-ability",async(t,i,a,u,m)=>{if(t.user?.abilities.inSite?.sections?.includes("users")&&t.user.slaveRoleIds.includes(i)&&t.user.abilities[a]){let y=this.users.roles.get(i);if(y){let f=structuredClone(y.ownAbilities),A;if(u){f[a]||(f[a]={});let W=this.users.abilitiesMap.get(a)?.params?.find(v=>v._id===u);if(W){let v=t.user.abilities[a],U=f[a];W.type==="number"?v[u]>=m&&(U[u]=m,A=!0):W.type==="items"&&v[u]&&C(v[u],m)&&(U[u]=m,A=!0)}}else m?f[a]=this.users.abilitiesMap.getMinimumOf(a):function W(v){if(v&&(delete f[v._id],v.subAbilities))for(let U of v.subAbilities)f[U._id]&&W(U)}(this.users.abilitiesMap.get(a)),A=!0;A&&await this.users.roles.collection.updateOne({_id:i},{$set:{abilities:f}})}}}),this.wss.on("client-message:users.roles.delete",async(t,i)=>{t.user?.abilities.inSite?.sections?.includes("users")&&t.user.slaveRoleIds.includes(i)&&await this.users.roles.collectionDelete(i)}),this};initPromise;whenReady(){return this.initPromise}getDefaultSessionProps({userAgent:e,remoteAddress:s}){return{userAgent:e,remoteAddress:s}}setSession(e,s,o){s===null?s=void 0:typeof s=="string"&&(s=this.users.sessions.get(s)),e.session!==s&&(e.session&&this.sessionsWsMap.delete(e.session),s?(e.session=s,e.user=s.user,e.lastUserId=s.user._id,this.userWsMap.get(s.user)?.add(e),this.sessionsWsMap.set(s,e),o&&s.prolong({...this.getDefaultSessionProps(e),...this.getSessionProps?.(e),isOnline:!0})):(delete e.session,this.userWsMap.get(e.user)?.delete(e)),this.wss.emit("client-session",e,o))}login=async(e,s,o)=>{let l=await this.users.login(s,o,{...this.getDefaultSessionProps(e),...this.getSessionProps?.(e),isOnline:!0});l&&this.setSession(e,l)};logout=e=>{e.session&&(this.users.logout(e.session),this.setSession(e,null))};handleRolesUpdate=()=>this.rolesPublication.flushInitial();handleRolesRoleUpdate=(e,s)=>s&&this.rolesPublication.skip(s);handleUserCreate=e=>this.userWsMap.set(e,new Set);handleUserIsOnline=({_id:e,isOnline:s})=>{let o={_id:e,isOnline:s};for(let l of this.usersPublication.subscriptions){let[d]=l.args;d.user&&d.user._id!==e&&l.handler([["u",o,!0]])}};handleSessionDelete=e=>{let s=this.sessionsWsMap.get(e);s&&this.setSession(s,null)};handleOrgsUpdate=()=>{this.orgsPublication.flushInitial(),this.orgsExtendedPublication.flushInitial()};handleOrgsOrgUpdate=(e,s)=>{s&&(this.orgsPublication.skip(s),this.orgsExtendedPublication.skip(s))};handleUserPermissionsChange=e=>{let s=this.userWsMap.get(e);s&&this.wss.emit("should-renew-subscriptions",[...s])};handleClientRequestLogin=(e,s,o)=>this.login(e,s,o);handleClientRequestLogout=e=>this.logout(e);handleClientClosed=e=>{e.session?.offline(),this.setSession(e,null)};static init(e){return new n(e).whenReady()}};import Y from"node:fs";import ce from"node:http";import ue from"node:https";import{debounce as de,uid as pe}from"@nesvet/n";var x={request:"~r-q",response:"~r-s"},F=Symbol("heartbeatInterval"),w=Symbol("defib"),R=Symbol("pingTs"),b=class H extends PrepareWebSocket{get isConnecting(){return this.readyState===this.CONNECTING}get isOpen(){return this.readyState===this.OPEN}get isClosing(){return this.readyState===this.CLOSING}get isClosed(){return this.readyState===this.CLOSED}isWebSocketServerClient=!0;isWebSocketServer=!1;isWebSocket=!1;wss;userAgent="";remoteAddress="";[w]=H.makeDefib.call(this);latency=0;[R];[F]=H.makeHeartbeatInterval.call(this);sendMessage(...e){return this.send(JSON.stringify(e))}sendRequest(...e){let s=pe(),o=`message:${x.response}-${s}`;return typeof e.at(-1)=="function"?(this.once(o,e.splice(-1,1)[0]),this.sendMessage(x.request,s,...e),this):new Promise((l,d)=>{this.once(o,(r,c)=>{if(r){let{message:S,...p}=r;d(Object.assign(new Error(S),p))}else l(c)}),this.sendMessage(x.request,s,...e)})}static makeDefib(){return de(()=>this.terminate(),65e3)}static makeHeartbeatInterval(){return setInterval(()=>{this[R]=Date.now(),this.send("")},5e3)}},ke=class extends PrepareWebSocketServer{constructor(n,e,s){let{ssl:o,port:l,...d}=n;if(o){if(typeof o.cert=="string"&&!/^-{3,}BEGIN/.test(o.cert))try{o.cert=Y.readFileSync(o.cert)}catch{}if(typeof o.key=="string"&&!/^-{3,}BEGIN/.test(o.key))try{o.key=Y.readFileSync(o.key)}catch{}}let{server:r=o?ue.createServer({...o}):ce.createServer()}=d;super({WebSocket:b,...d,server:r}),this.port=typeof l=="string"?Number.parseInt(l):l,e&&(typeof e=="function"?s=e:Object.assign(this,e)),this.on("connection",this.handleConnection),this.on(`client-message:${x.request}`,this.handleRequest),r.listen(this.port,s)}isWebSocketServer=!0;isWebSocketServerClient=!1;isWebSocket=!1;port;requestListeners=new Map;addRequestListener(n,e){return this.requestListeners.set(n,e),this}onRequest=this.addRequestListener;removeRequestListener(n){return this.requestListeners.delete(n),this}offRequest=this.removeRequestListener;handleRequest=async(n,e,s,...o)=>{let l=this.requestListeners.get(s),d,r=null;if(l)try{d=await l.call(this,n,...o)}catch(c){if(c instanceof Error){let{message:S,...p}=c;r={message:S,...p}}}else r={message:`Unknown request kind "${s}"`};n.sendMessage(`${x.response}-${e}`,r,d)};handleConnection(n,e){if(!(n instanceof b)){Object.defineProperties(n,{isConnecting:{get:Object.getOwnPropertyDescriptor(b.prototype,"isConnecting").get},isOpen:{get:Object.getOwnPropertyDescriptor(b.prototype,"isOpen").get},isClosing:{get:Object.getOwnPropertyDescriptor(b.prototype,"isClosing").get},isClosed:{get:Object.getOwnPropertyDescriptor(b.prototype,"isClosed").get}});let{terminate:s}=n;Object.assign(n,{isWebSocketServerClient:!0,isWebSocketServer:!1,isWebSocket:!1,[w]:b.makeDefib.call(n),latency:0,[F]:b.makeHeartbeatInterval.call(n),sendMessage:b.prototype.sendMessage,sendRequest:b.prototype.sendRequest,terminate(){try{s.call(n)}catch(o){console.error(o)}}})}Object.assign(n,{wss:this,userAgent:e.headers["user-agent"]??"",remoteAddress:e.headers["x-real-ip"]??e.headers["x-forwarded-for"]??""}),n[w](),n.on("message",s=>this.handleClientMessage(n,s)),n.on("error",s=>this.handleClientError(n,s)),n.on("close",(...s)=>this.handleClientClose(n,...s)),this.emit("client-connect",n,e)}handleClientMessage(n,e){let s=e.toString();if(n[w](),s)try{let[o,...l]=JSON.parse(s);n.emit(`message:${o}`,...l),this.emit("client-message",n,o,...l),this.emit(`client-message:${o}`,n,...l)}catch(o){this.handleClientError(n,o)}else n[R]&&(n.latency=Date.now()-n[R],delete n[R])}handleClientError(n,e){e instanceof Event&&(e=void 0),process.env.NODE_ENV==="development"&&console.error("WebSocketServer Client error",e),this.emit("client-error",n,e)}handleClientClose(n,...e){process.env.NODE_ENV==="development"&&console.info("WebSocketServer Client closed",...e),n[w].clear(),clearInterval(n[F]),this.emit("client-close",n),this.emit("client-closed",n)}};var Z=class extends b{user;lastUserId;session};export{X as UsersServer,Z as WSSCWithUser};
|
|
13
2
|
//# sourceMappingURL=index.js.map
|